From 9f5745c1bca373fa6ea1c8daa57cd01f50b20968 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 30 Sep 2010 18:04:12 +0200 Subject: obo56: #163781# BuildAllDimensionMembers: from external source, after adding dimensions obo56: #163805# Authors: Niklas Nebel User Frank Peters --- readlicense_oo/docs/readme.xsl | 58 ++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 30 deletions(-) mode change 100644 => 100755 readlicense_oo/docs/readme.xsl diff --git a/readlicense_oo/docs/readme.xsl b/readlicense_oo/docs/readme.xsl old mode 100644 new mode 100755 index 4e77fa522c3d..e63e319cf502 --- a/readlicense_oo/docs/readme.xsl +++ b/readlicense_oo/docs/readme.xsl @@ -34,6 +34,13 @@ + + + + + + + @@ -115,59 +122,50 @@ - -* + * - - + - - + - - - + + - - -====================================================================== - + + ====================================================================== + - -====================================================================== + + ====================================================================== + - - ----------------------------------------------------------------------- - + + + ---------------------------------------------------------------------- + - ----------------------------------------------------------------------- - + + ---------------------------------------------------------------------- - - - + + - ----------------------------------------------------------------------- - + + ---------------------------------------------------------------------- - - -- cgit v1.2.3 From 2b839dc380c1b571d1c3d28665ffe1785d80c5cf Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 30 Sep 2010 18:04:12 +0200 Subject: obo56: #163781# BuildAllDimensionMembers: from external source, after adding dimensions obo56: #163805# Authors: Niklas Nebel User Frank Peters --- sc/inc/dpsave.hxx | 2 ++ sc/source/core/data/dpobject.cxx | 5 +++- sc/source/core/data/dpsave.cxx | 63 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 1 deletion(-) diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx index 8c4babc77da3..643b1e81748f 100644 --- a/sc/inc/dpsave.hxx +++ b/sc/inc/dpsave.hxx @@ -46,6 +46,7 @@ namespace com { namespace sun { namespace star { namespace sheet { class ScDPDimensionSaveData; class ScDPTableData; +class ScDPObject; // -------------------------------------------------------------------- // @@ -272,6 +273,7 @@ public: SC_DLLPUBLIC ScDPDimensionSaveData* GetDimensionData(); // create if not there void SetDimensionData( const ScDPDimensionSaveData* pNew ); // copied void BuildAllDimensionMembers(ScDPTableData* pData); + void BuildAllDimensionMembersFromSource(ScDPObject* pDPObj); /** * Check whether a dimension has one or more invisible members. diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index ad1932303da0..f52a4998af19 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -642,9 +642,12 @@ void ScDPObject::BuildAllDimensionMembers() return; // #i111857# don't always create empty mpTableData for external service. - // Ideally, xSource should be used instead of mpTableData. + // #163781# Initialize all members from xSource instead. if (pServDesc) + { + pSaveData->BuildAllDimensionMembersFromSource( this ); return; + } pSaveData->BuildAllDimensionMembers(GetTableData()); } diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx index 100db65df4b7..24df9f90b31f 100644 --- a/sc/source/core/data/dpsave.cxx +++ b/sc/source/core/data/dpsave.cxx @@ -34,6 +34,7 @@ #include "dpsave.hxx" #include "dpdimsave.hxx" +#include "dpobject.hxx" // GetMemberNames used in BuildAllDimensionMembersFromSource #include "miscuno.hxx" #include "scerrors.hxx" #include "unonames.hxx" @@ -874,6 +875,7 @@ ScDPSaveDimension* ScDPSaveData::GetDimensionByName(const String& rName) } ScDPSaveDimension* pNew = new ScDPSaveDimension( rName, sal_False ); aDimList.Insert( pNew, LIST_APPEND ); + mbDimensionMembersBuilt = false; // BuildAllDimensionMembers only handles existing entries in aDimList return pNew; } @@ -900,6 +902,7 @@ ScDPSaveDimension* ScDPSaveData::GetNewDimensionByName(const String& rName) } ScDPSaveDimension* pNew = new ScDPSaveDimension( rName, sal_False ); aDimList.Insert( pNew, LIST_APPEND ); + mbDimensionMembersBuilt = false; // BuildAllDimensionMembers only handles existing entries in aDimList return pNew; } @@ -911,6 +914,7 @@ ScDPSaveDimension* ScDPSaveData::GetDataLayoutDimension() ScDPSaveDimension* pNew = new ScDPSaveDimension( String(), sal_True ); aDimList.Insert( pNew, LIST_APPEND ); + mbDimensionMembersBuilt = false; // BuildAllDimensionMembers only handles existing entries in aDimList return pNew; } @@ -935,6 +939,7 @@ ScDPSaveDimension* ScDPSaveData::DuplicateDimension(const String& rName) ScDPSaveDimension* pNew = new ScDPSaveDimension( *pOld ); pNew->SetDupFlag( sal_True ); aDimList.Insert( pNew, LIST_APPEND ); + mbDimensionMembersBuilt = false; // BuildAllDimensionMembers only handles existing entries in aDimList return pNew; } @@ -958,6 +963,7 @@ ScDPSaveDimension& ScDPSaveData::DuplicateDimension( const ScDPSaveDimension& rD ScDPSaveDimension* pNew = new ScDPSaveDimension( rDim ); pNew->SetDupFlag( sal_True ); aDimList.Insert( pNew, LIST_APPEND ); + mbDimensionMembersBuilt = false; // BuildAllDimensionMembers only handles existing entries in aDimList return *pNew; } @@ -1275,6 +1281,63 @@ void ScDPSaveData::BuildAllDimensionMembers(ScDPTableData* pData) mbDimensionMembersBuilt = true; } +void ScDPSaveData::BuildAllDimensionMembersFromSource( ScDPObject* pDPObj ) +{ + // Initialize all members like BuildAllDimensionMembers, but access only the DataPilotSource, not the table data. + // This could also replace BuildAllDimensionMembers, but the performance implications still have to be checked. + // ScDPObject is used for the helper method GetMemberNames. + + if (mbDimensionMembersBuilt) + return; + + uno::Reference xSource = pDPObj->GetSource(); + uno::Reference xDimsName = xSource->getDimensions(); + // GetMemberNames uses the dimension index from getElementNames + uno::Sequence aDimNames = xDimsName->getElementNames(); + + // First, build a dimension name-to-index map. + typedef hash_map NameIndexMap; + NameIndexMap aMap; + long nColCount = aDimNames.getLength(); + for (long i = 0; i < nColCount; ++i) + aMap.insert( NameIndexMap::value_type(aDimNames[i], i) ); + + NameIndexMap::const_iterator itrEnd = aMap.end(); + + sal_uInt32 n = aDimList.Count(); + for (sal_uInt32 i = 0; i < n; ++i) + { + ScDPSaveDimension* pDim = static_cast(aDimList.GetObject(i)); + const String& rDimName = pDim->GetName(); + if (!rDimName.Len()) + // empty dimension name. It must be data layout. + continue; + + NameIndexMap::const_iterator itr = aMap.find(rDimName); + if (itr == itrEnd) + // dimension name not in the data. This should never happen! + continue; + + long nDimIndex = itr->second; + uno::Sequence aMemberNames; + pDPObj->GetMemberNames( nDimIndex, aMemberNames ); + sal_Int32 nMemberCount = aMemberNames.getLength(); + for (sal_Int32 j = 0; j < nMemberCount; ++j) + { + String aMemName = aMemberNames[j]; + if (pDim->GetExistingMemberByName(aMemName)) + // this member instance already exists. nothing to do. + continue; + + auto_ptr pNewMember(new ScDPSaveMember(aMemName)); + pNewMember->SetIsVisible(true); + pDim->AddMember(pNewMember.release()); + } + } + + mbDimensionMembersBuilt = true; +} + bool ScDPSaveData::HasInvisibleMember(const OUString& rDimName) const { ScDPSaveDimension* pDim = GetExistingDimensionByName(rDimName); -- cgit v1.2.3 From 6e810686b628d54462f5cc885c7d8e0c68a964f6 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Mon, 17 Jan 2011 08:44:59 +0100 Subject: dba34d: #i37466# align icons to create list --- dbaccess/source/ui/app/AppDetailView.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index dbe9ad112458..839784599795 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -99,6 +99,7 @@ #include #include "dbtreelistbox.hxx" #include "IApplicationController.hxx" +#include "imageprovider.hxx" using namespace ::dbaui; using namespace ::com::sun::star::uno; @@ -135,6 +136,7 @@ OCreationList::OCreationList( OTasksWindow& _rParent ) SetSpaceBetweenEntries(nSize); SetSelectionMode( NO_SELECTION ); SetExtendedWinBits( EWB_NO_AUTO_CURENTRY ); + SetNodeDefaultImages( ); EnableEntryMnemonics(); } // ----------------------------------------------------------------------------- @@ -412,6 +414,12 @@ OTasksWindow::OTasksWindow(Window* _pParent,OApplicationDetailView* _pDetailView m_aHelpText.SetHelpId(HID_APP_HELP_TEXT); m_aDescription.SetHelpId(HID_APP_DESCRIPTION_TEXT); m_aDescription.SetText(ModuleRes(STR_DESCRIPTION)); + + ImageProvider aImageProvider; + Image aFolderImage = aImageProvider.getFolderImage( DatabaseObject::FORM, false ); + m_aCreation.SetDefaultCollapsedEntryBmp( aFolderImage ); + m_aCreation.SetDefaultExpandedEntryBmp( aFolderImage ); + ImplInitSettings(sal_True,sal_True,sal_True); } // ----------------------------------------------------------------------------- -- cgit v1.2.3 From 24b4d38a88aa617c7df8f61615848d119f8064b3 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Mon, 17 Jan 2011 08:59:17 +0100 Subject: dba34d: #i116187# get value from queryValue --- reportdesign/source/ui/report/ReportController.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index cf303fb8e706..23c8d1dadffd 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -2496,8 +2496,11 @@ void OReportController::openPageDialog(const uno::Reference& _ if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_LRSPACE,sal_True,&pItem)) { - xProp->setPropertyValue(PROPERTY_LEFTMARGIN,uno::makeAny(static_cast(pItem)->GetLeft())); - xProp->setPropertyValue(PROPERTY_RIGHTMARGIN,uno::makeAny(static_cast(pItem)->GetRight())); + Any aValue; + static_cast(pItem)->QueryValue(aValue,MID_L_MARGIN); + xProp->setPropertyValue(PROPERTY_LEFTMARGIN,aValue); + static_cast(pItem)->QueryValue(aValue,MID_R_MARGIN); + xProp->setPropertyValue(PROPERTY_RIGHTMARGIN,aValue); } if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_ULSPACE,sal_True,&pItem)) { -- cgit v1.2.3 From 41e6c179e73191e15ad24af4d7fa18aff4878f8d Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Mon, 17 Jan 2011 10:11:36 +0100 Subject: dba34d: #i111015# XTextRange and derivee are not supported anymore by column object --- forms/source/component/Columns.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index a93d121d4b99..f8559fa2fbac 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -43,9 +43,11 @@ #include #include #include +#include #include #include #include +#include #include "services.hxx" #ifndef _FRM_RESOURCE_HRC_ #include "frm_resource.hrc" @@ -66,6 +68,7 @@ using namespace ::com::sun::star::awt; using namespace ::com::sun::star::io; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::util; +using namespace ::com::sun::star::text; using namespace ::com::sun::star::form::binding; const sal_uInt16 WIDTH = 0x0001; @@ -176,6 +179,7 @@ Sequence SAL_CALL OGridColumn::getTypes() throw(RuntimeException) aTypes.removeType( XServiceInfo::static_type() ); aTypes.removeType( XBindableValue::static_type() ); aTypes.removeType( XPropertyContainer::static_type() ); + // but re-add their base class(es) aTypes.addType( XChild::static_type() ); @@ -183,6 +187,10 @@ Sequence SAL_CALL OGridColumn::getTypes() throw(RuntimeException) if ( query_aggregation( m_xAggregate, xProv )) aTypes.addTypes( xProv->getTypes() ); + aTypes.removeType( XTextRange::static_type() ); + aTypes.removeType( XSimpleText::static_type() ); + aTypes.removeType( XText::static_type() ); + return aTypes.getTypes(); } @@ -195,6 +203,7 @@ Any SAL_CALL OGridColumn::queryAggregation( const Type& _rType ) throw (RuntimeE || _rType.equals(::getCppuType(static_cast< Reference< XServiceInfo >* >(NULL))) || _rType.equals(::getCppuType(static_cast< Reference< XBindableValue >* >(NULL))) || _rType.equals(::getCppuType(static_cast< Reference< XPropertyContainer >* >(NULL))) + || comphelper::isAssignableFrom(::getCppuType(static_cast< Reference< XTextRange >* >(NULL)),_rType) ) return aReturn; -- cgit v1.2.3 From 1b46f8da574d7c3dfe469f91821f63f9017300bb Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Mon, 17 Jan 2011 12:32:14 +0100 Subject: dba34d: #i116463# fix string and NaN --- .../layoutprocessor/FormatValueUtility.java | 24 ++++++++++++++-------- .../layoutprocessor/TableCellLayoutController.java | 8 +++++--- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java index 707c2de1c8ab..76ee85b52aba 100755 --- a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java @@ -143,7 +143,7 @@ public class FormatValueUtility { if ("date".equals(valueType)) { - variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "date-value", formatDate(HSSFDateUtil.getJavaDate((BigDecimal)value, false, 0))); + variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "date-value", formatDate(HSSFDateUtil.getJavaDate((BigDecimal) value, false, 0))); } else { @@ -156,13 +156,21 @@ public class FormatValueUtility } else if (value instanceof Boolean) { - if (Boolean.TRUE.equals(value)) + if ("float".equals(valueType)) { - variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, BOOLEAN_VALUE, OfficeToken.TRUE); + float fvalue = Boolean.TRUE.equals(value) ? 1 : 0; + variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE, String.valueOf(fvalue)); } else { - variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, BOOLEAN_VALUE, OfficeToken.FALSE); + if (Boolean.TRUE.equals(value)) + { + variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, BOOLEAN_VALUE, OfficeToken.TRUE); + } + else + { + variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, BOOLEAN_VALUE, OfficeToken.FALSE); + } } } else if (value != null) @@ -178,12 +186,10 @@ public class FormatValueUtility } if (!"string".equals(valueType)) { - variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE, String.valueOf(value)); - } - else - { - variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, STRING_VALUE, String.valueOf(value)); + variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE_TYPE, "string"); + //variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE, String.valueOf(value)); } + variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, STRING_VALUE, String.valueOf(value)); } else { diff --git a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java index f3c5ef383057..e575831ebf2a 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java @@ -69,12 +69,12 @@ public class TableCellLayoutController extends SectionLayoutController { final AttributeMap attributeMap = new AttributeMap(super.computeAttributes(fc, element, target)); final String definedStyle = (String) attributeMap.getAttribute(OfficeNamespaces.TABLE_NS, OfficeToken.STYLE_NAME); - final String valueType = (String) attributeMap.getAttribute(OfficeNamespaces.OFFICE_NS, FormatValueUtility.VALUE_TYPE); attributeMap.setAttribute(OfficeNamespaces.TABLE_NS, OfficeToken.STYLE_NAME, getDisplayStyleName((Section) element, definedStyle)); try { - final DataFlags value = computeValue(); + final DataFlags value = computeValue(attributeMap); + final String valueType = (String) attributeMap.getAttribute(OfficeNamespaces.OFFICE_NS, FormatValueUtility.VALUE_TYPE); if (value != null) { FormatValueUtility.applyValueForCell(value.getValue(), attributeMap, valueType); @@ -100,7 +100,7 @@ public class TableCellLayoutController extends SectionLayoutController return attributeMap; } - private DataFlags computeValue() throws DataSourceException + private DataFlags computeValue(final AttributeMap attributeMap) throws DataSourceException { // Search for the first FormattedTextElement final Section cell = (Section) getElement(); @@ -115,6 +115,8 @@ public class TableCellLayoutController extends SectionLayoutController final Object o = LayoutControllerUtil.evaluateExpression(getFlowController(), element, dc); if (Boolean.FALSE.equals(o)) { + attributeMap.setAttribute(OfficeNamespaces.OFFICE_NS, + FormatValueUtility.VALUE_TYPE, "string"); return null; } } -- cgit v1.2.3 From b7487b7abcf37bc54cdcb870454ded5bf8938e95 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Mon, 17 Jan 2011 14:06:45 +0100 Subject: dba34d: #i116345# create a new var in for loop --- dbaccess/source/ui/querydesign/QueryDesignView.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index e0b4a665a8bc..fc5f89a997b2 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -2496,9 +2496,10 @@ namespace { OQueryController& rController = static_cast(_pView->getController()); ::connectivity::OSQLParseNode* pGroupBy = pSelectRoot->getChild(3)->getChild(2)->getChild(2); - OTableFieldDescRef aDragInfo = new OTableFieldDesc(); + for( sal_uInt32 i=0 ; i < pGroupBy->count() && eOk == eErrorCode; ++i ) { + OTableFieldDescRef aDragInfo = new OTableFieldDesc(); ::connectivity::OSQLParseNode* pParamRef = NULL; ::connectivity::OSQLParseNode* pArgument = pGroupBy->getChild( i ); if(SQL_ISRULE(pArgument,column_ref)) -- cgit v1.2.3 From a5fa6f4652b4a723f935c611a68b039ed3f7f46c Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Wed, 19 Jan 2011 15:53:26 +0100 Subject: dba34d: #i98163# handle sorting for new report as groups with no header nor footer --- .../wizards/report/IReportBuilderLayouter.java | 8 + .../sun/star/wizards/report/ReportFinalizer.java | 6 +- .../com/sun/star/wizards/report/ReportWizard.java | 34 ++- .../reportbuilder/ReportBuilderImplementation.java | 104 ++++---- .../reportbuilder/layout/ColumnarSingleColumn.java | 3 +- .../reportbuilder/layout/ColumnarTwoColumns.java | 3 +- .../reportbuilder/layout/InBlocksLabelsAbove.java | 3 +- .../reportbuilder/layout/InBlocksLabelsLeft.java | 3 +- .../layout/ReportBuilderLayouter.java | 292 +++++++++++---------- .../reportbuilder/layout/SectionObject.java | 6 +- .../star/wizards/reportbuilder/layout/Tabular.java | 41 ++- 11 files changed, 277 insertions(+), 226 deletions(-) diff --git a/wizards/com/sun/star/wizards/report/IReportBuilderLayouter.java b/wizards/com/sun/star/wizards/report/IReportBuilderLayouter.java index 6422befd65f0..0de49032b901 100755 --- a/wizards/com/sun/star/wizards/report/IReportBuilderLayouter.java +++ b/wizards/com/sun/star/wizards/report/IReportBuilderLayouter.java @@ -102,6 +102,14 @@ public interface IReportBuilderLayouter */ public void insertGroupNames(String[] _aGroupFieldNames); + /** + * Insert the names of the groups which should be used as sorting, the group names are names out of the field names. + * + * If a group name is given here, it will not shown in the fields/titles, but must be in the field string list. + * @param _aSortFieldNames + */ + public void insertSortingNames(String[][] _aSortFieldNames); + /** * This method redraws the whole layout with all it's content */ diff --git a/wizards/com/sun/star/wizards/report/ReportFinalizer.java b/wizards/com/sun/star/wizards/report/ReportFinalizer.java index 1de9f32bff23..3b8b423a855e 100644 --- a/wizards/com/sun/star/wizards/report/ReportFinalizer.java +++ b/wizards/com/sun/star/wizards/report/ReportFinalizer.java @@ -179,9 +179,9 @@ public class ReportFinalizer // String sStorePath = ""; Short iState = (Short) CurUnoDialog.getControlProperty("optCreateReportTemplate", PropertyNames.PROPERTY_STATE); boolean bDoTemplateEnable = iState.shortValue() == 1; - CurUnoDialog.setControlProperty("optEditTemplate", PropertyNames.PROPERTY_ENABLED, new Boolean(bDoTemplateEnable)); - CurUnoDialog.setControlProperty("optUseTemplate", PropertyNames.PROPERTY_ENABLED, new Boolean(bDoTemplateEnable)); - CurUnoDialog.setControlProperty("lblHowProceed", PropertyNames.PROPERTY_ENABLED, new Boolean(bDoTemplateEnable)); + CurUnoDialog.setControlProperty("optEditTemplate", PropertyNames.PROPERTY_ENABLED, bDoTemplateEnable); + CurUnoDialog.setControlProperty("optUseTemplate", PropertyNames.PROPERTY_ENABLED, bDoTemplateEnable); + CurUnoDialog.setControlProperty("lblHowProceed", PropertyNames.PROPERTY_ENABLED, bDoTemplateEnable); String sTitle = xTitleTextBox.getText(); boolean bDoEnable = sTitle.equals(""); diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java b/wizards/com/sun/star/wizards/report/ReportWizard.java index 224cd7abeff3..0c9eef8f430d 100644 --- a/wizards/com/sun/star/wizards/report/ReportWizard.java +++ b/wizards/com/sun/star/wizards/report/ReportWizard.java @@ -272,10 +272,17 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, final SQLQueryComposer sqlQueryComposer = recordParser.getSQLQueryComposer(); if (this.CurDBCommandFieldSelection.getSelectedCommandType() == CommandType.TABLE) { - bQueryCreated = sqlQueryComposer.setQueryCommand(this.xWindow, false, false); - m_reportDocument.setCommandType(CommandType.COMMAND); - String sQuery = sqlQueryComposer.getQuery(); - m_reportDocument.setCommand(sQuery); + if (m_reportDocument instanceof ReportTextImplementation) + { + bQueryCreated = sqlQueryComposer.setQueryCommand(this.xWindow, false, false); + m_reportDocument.setCommandType(CommandType.COMMAND); + String sQuery = sqlQueryComposer.getQuery(); + m_reportDocument.setCommand(sQuery); + } + else + { + bQueryCreated = true; + } } else { @@ -289,19 +296,20 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, { // String sCommand = (String) oCommand.xPropertySet.getPropertyValue("Command"); bQueryCreated = (!sCommand.equals("")); - sqlQueryComposer.m_xQueryAnalyzer.setQuery(sCommand); - sqlQueryComposer.prependSortingCriteria(); -// TODO: check with query - m_reportDocument.setCommandType(CommandType.COMMAND); - m_reportDocument.setCommand(sqlQueryComposer.getQuery()); - bQueryCreated = true; + if (m_reportDocument instanceof ReportTextImplementation) + { + sqlQueryComposer.m_xQueryAnalyzer.setQuery(sCommand); + sqlQueryComposer.prependSortingCriteria(); + m_reportDocument.setCommandType(CommandType.COMMAND); + m_reportDocument.setCommand(sqlQueryComposer.getQuery()); + } } else { m_reportDocument.setCommandType(CommandType.COMMAND); m_reportDocument.setCommand(sCommand); - bQueryCreated = true; } + bQueryCreated = true; } catch (Exception e) { @@ -717,7 +725,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, else { boolean bEnabled = (CurGroupFieldSelection.getSelectedFieldNames().length > 0); - Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPPAGE), PropertyNames.PROPERTY_ENABLED, new Boolean(bEnabled)); + Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPPAGE), PropertyNames.PROPERTY_ENABLED, bEnabled); } } @@ -732,7 +740,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, else { boolean bEnabled = (CurGroupFieldSelection.getSelectedFieldNames().length > 0); - Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPPAGE), PropertyNames.PROPERTY_ENABLED, new Boolean(bEnabled)); + Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPPAGE), PropertyNames.PROPERTY_ENABLED, bEnabled); } } diff --git a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java index 6a90214696a5..b05559b30205 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java +++ b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java @@ -33,7 +33,6 @@ import com.sun.star.awt.XWindowPeer; import com.sun.star.beans.PropertyValue; import com.sun.star.beans.XPropertySet; import com.sun.star.container.XHierarchicalNameContainer; -import com.sun.star.container.XNameContainer; import com.sun.star.frame.XController; import com.sun.star.frame.XDispatch; import com.sun.star.frame.XDispatchProvider; @@ -78,23 +77,24 @@ import java.util.logging.Logger; public class ReportBuilderImplementation extends ReportImplementationHelper implements IReportDocument, IReportDefinitionReadAccess { - private Resource m_resource; - private XDatabaseDocumentUI m_documentUI; + private Resource m_resource; + private XDatabaseDocumentUI m_documentUI; private static final int MAXIMUM_GROUPCOUNT = 4; + private String[] groupNames = null; - private ReportBuilderImplementation( XMultiServiceFactory _serviceFactory ) + private ReportBuilderImplementation(XMultiServiceFactory _serviceFactory) { // creates an access to the ReportBuilder Extension super(_serviceFactory, ReportLayouter.SOOPTLANDSCAPE); } - public static IReportDocument create( XMultiServiceFactory i_serviceFactory ) + public static IReportDocument create(XMultiServiceFactory i_serviceFactory) { - return new ReportBuilderImplementation( i_serviceFactory ); + return new ReportBuilderImplementation(i_serviceFactory); } - public void initialize( final XDatabaseDocumentUI i_documentUI, final Resource i_resource ) + public void initialize(final XDatabaseDocumentUI i_documentUI, final Resource i_resource) { m_documentUI = i_documentUI; m_resource = i_resource; @@ -106,7 +106,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper public XWindowPeer getWizardParent() { - final XWindowPeer aWindowPeer = UnoRuntime.queryInterface( XWindowPeer.class, getFrame().getComponentWindow() ); + final XWindowPeer aWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, getFrame().getComponentWindow()); return aWindowPeer; } private XFrame m_xFrame = null; @@ -139,15 +139,18 @@ public class ReportBuilderImplementation extends ReportImplementationHelper try { NamedValueCollection creationArgs = new NamedValueCollection(); - creationArgs.put( "DocumentServiceName", "com.sun.star.report.ReportDefinition" ); - creationArgs.put( "Mode", "remote" ); + creationArgs.put("DocumentServiceName", "com.sun.star.report.ReportDefinition"); + creationArgs.put("Mode", "remote"); - XComponent[] docDefinition = new XComponent[] { null }; + XComponent[] docDefinition = new XComponent[] + { + null + }; XComponent reportDefinitionComp = m_documentUI.createComponentWithArguments( - DatabaseObject.REPORT, creationArgs.getPropertyValues(), docDefinition ); + DatabaseObject.REPORT, creationArgs.getPropertyValues(), docDefinition); - m_documentDefinition = UnoRuntime.queryInterface( XPropertySet.class, docDefinition[0] ); - m_reportDocument = UnoRuntime.queryInterface( XReportDefinition.class, reportDefinitionComp ); + m_documentDefinition = UnoRuntime.queryInterface(XPropertySet.class, docDefinition[0]); + m_reportDocument = UnoRuntime.queryInterface(XReportDefinition.class, reportDefinitionComp); } catch (com.sun.star.uno.Exception e) { @@ -164,7 +167,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper private XModeSelector getModeSelector() { final XController xController = getReportDefinition().getCurrentController(); - final XModeSelector xModeSelector = UnoRuntime.queryInterface( XModeSelector.class, xController ); + final XModeSelector xModeSelector = UnoRuntime.queryInterface(XModeSelector.class, xController); return xModeSelector; } @@ -209,11 +212,11 @@ public class ReportBuilderImplementation extends ReportImplementationHelper try { final XController xController = getReportDefinition().getCurrentController(); - final XDispatchProvider xDP = UnoRuntime.queryInterface( XDispatchProvider.class, xController ); + final XDispatchProvider xDP = UnoRuntime.queryInterface(XDispatchProvider.class, xController); // Create special service for parsing of given URL. final Object aURLTransformer = getMSF().createInstance("com.sun.star.util.URLTransformer"); - final XURLTransformer xURLTransformer = UnoRuntime.queryInterface( com.sun.star.util.XURLTransformer.class, aURLTransformer ); + final XURLTransformer xURLTransformer = UnoRuntime.queryInterface(com.sun.star.util.XURLTransformer.class, aURLTransformer); com.sun.star.util.URL[] aURL = new com.sun.star.util.URL[1]; aURL[0] = new com.sun.star.util.URL(); @@ -273,14 +276,14 @@ public class ReportBuilderImplementation extends ReportImplementationHelper return; } - final XCommandProcessor xProcessor = UnoRuntime.queryInterface( XCommandProcessor.class, m_documentDefinition ); + final XCommandProcessor xProcessor = UnoRuntime.queryInterface(XCommandProcessor.class, m_documentDefinition); final com.sun.star.ucb.Command aCommand = new com.sun.star.ucb.Command(); aCommand.Name = "store"; xProcessor.execute(aCommand, xProcessor.createCommandIdentifier(), null); final XHierarchicalNameContainer aNameContainer = UnoRuntime.queryInterface(XHierarchicalNameContainer.class, m_aReportDocument); - aNameContainer.insertByHierarchicalName( Name, m_documentDefinition ); + aNameContainer.insertByHierarchicalName(Name, m_documentDefinition); } public boolean liveupdate_addGroupNametoDocument(String[] GroupNames, String CurGroupTitle, Vector GroupFieldVector, ArrayList ReportPath, int iSelCount) @@ -366,19 +369,19 @@ public class ReportBuilderImplementation extends ReportImplementationHelper { try { - if ( m_documentDefinition != null ) + if (m_documentDefinition != null) { // set the document to "not modified", to ensure that it won't ask the user before closing - XModifiable documentModify = UnoRuntime.queryInterface( XModifiable.class, m_reportDocument ); - documentModify.setModified( false ); + XModifiable documentModify = UnoRuntime.queryInterface(XModifiable.class, m_reportDocument); + documentModify.setModified(false); // actually close - XSubDocument subComponent = UnoRuntime.queryInterface( XSubDocument.class, m_documentDefinition ); + XSubDocument subComponent = UnoRuntime.queryInterface(XSubDocument.class, m_documentDefinition); subComponent.close(); } } - catch ( Exception ex ) + catch (Exception ex) { - Logger.getLogger( ReportBuilderImplementation.class.getName() ).log( Level.SEVERE, null, ex ); + Logger.getLogger(ReportBuilderImplementation.class.getName()).log(Level.SEVERE, null, ex); } m_documentDefinition = null; m_reportDocument = null; @@ -407,15 +410,15 @@ public class ReportBuilderImplementation extends ReportImplementationHelper { } - private XComponent loadReport( final String i_reportName ) + private XComponent loadReport(final String i_reportName) { try { - return m_documentUI.loadComponent( DatabaseObject.REPORT, i_reportName, false ); + return m_documentUI.loadComponent(DatabaseObject.REPORT, i_reportName, false); } - catch ( Exception ex ) + catch (Exception ex) { - Logger.getLogger( ReportBuilderImplementation.class.getName() ).log( Level.SEVERE, null, ex ); + Logger.getLogger(ReportBuilderImplementation.class.getName()).log(Level.SEVERE, null, ex); } return null; } @@ -428,19 +431,19 @@ public class ReportBuilderImplementation extends ReportImplementationHelper aCommand.Name = "open"; try { - final Object result = commandProcessor.execute( aCommand, commandProcessor.createCommandIdentifier(), null ); - return UnoRuntime.queryInterface( XComponent.class, result ); + final Object result = commandProcessor.execute(aCommand, commandProcessor.createCommandIdentifier(), null); + return UnoRuntime.queryInterface(XComponent.class, result); } - catch ( Exception ex ) + catch (Exception ex) { - Logger.getLogger( ReportBuilderImplementation.class.getName() ).log( Level.SEVERE, null, ex ); + Logger.getLogger(ReportBuilderImplementation.class.getName()).log(Level.SEVERE, null, ex); } return null; } - public void createAndOpenReportDocument( String i_name, boolean i_asTemplate, boolean i_openForEditing ) + public void createAndOpenReportDocument(String i_name, boolean i_asTemplate, boolean i_openForEditing) { - if ( i_openForEditing ) + if (i_openForEditing) { // we won't destroy the report builder window, also don't create a document // Do we need to reopen the report builder with the known name? @@ -449,13 +452,13 @@ public class ReportBuilderImplementation extends ReportImplementationHelper return; } - if ( i_asTemplate ) + if (i_asTemplate) { // don't need the report definition anymore - the document it represents has already been stored closeReportDefinition(); // open the report, again, this time not in design, but containing data - loadReport( i_name ); + loadReport(i_name); } else { @@ -466,8 +469,10 @@ public class ReportBuilderImplementation extends ReportImplementationHelper closeReportDefinition(); // store the generated report - if ( getRecordParser().storeDatabaseDocumentToTempPath( document, i_name ) ) - getRecordParser().addReportDocument( document, false ); + if (getRecordParser().storeDatabaseDocumentToTempPath(document, i_name)) + { + getRecordParser().addReportDocument(document, false); + } } dispose(); @@ -509,10 +514,17 @@ public class ReportBuilderImplementation extends ReportImplementationHelper public void setSorting(String[][] _aSortFieldNames) { getRecordParser().setSortFieldNames(_aSortFieldNames); + if (groupNames != null) + { + getRecordParser().prependSortFieldNames(groupNames); + } + getReportBuilderLayouter().insertSortingNames(_aSortFieldNames); + getReportBuilderLayouter().layout(); } public void setGrouping(String[] _aGroupFieldNames) { + groupNames = _aGroupFieldNames; getRecordParser().prependSortFieldNames(_aGroupFieldNames); getReportBuilderLayouter().insertGroupNames(_aGroupFieldNames); @@ -532,12 +544,12 @@ public class ReportBuilderImplementation extends ReportImplementationHelper try { // Check general availability of office paths - m_aReportPath = FileAccess.getOfficePaths( getMSF(), "Template", "share", "/wizard" ); - FileAccess.combinePaths( getMSF(), m_aReportPath, "/wizard/report" ); + m_aReportPath = FileAccess.getOfficePaths(getMSF(), "Template", "share", "/wizard"); + FileAccess.combinePaths(getMSF(), m_aReportPath, "/wizard/report"); } - catch ( NoValidPathException ex ) + catch (NoValidPathException ex) { - Logger.getLogger( ReportBuilderImplementation.class.getName() ).log( Level.SEVERE, null, ex ); + Logger.getLogger(ReportBuilderImplementation.class.getName()).log(Level.SEVERE, null, ex); } } return m_aReportPath; @@ -727,7 +739,6 @@ public class ReportBuilderImplementation extends ReportImplementationHelper getReportDefinition().setCommandType(_nCommand); } - public void checkInvariants() throws java.lang.Exception { final String sDefaultHeaderLayoutPath = getDefaultHeaderLayout(); @@ -737,12 +748,9 @@ public class ReportBuilderImplementation extends ReportImplementationHelper } FileAccess aAccess = new FileAccess(getGlobalMSF()); - if (! aAccess.exists(sDefaultHeaderLayoutPath, true)) + if (!aAccess.exists(sDefaultHeaderLayoutPath, true)) { throw new java.io.IOException("default.otr"); } } - } - - diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarSingleColumn.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarSingleColumn.java index ccb74ebf6f07..9094807570ad 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarSingleColumn.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarSingleColumn.java @@ -28,6 +28,7 @@ package com.sun.star.wizards.reportbuilder.layout; import com.sun.star.awt.Rectangle; +import com.sun.star.report.XGroup; import com.sun.star.report.XSection; import com.sun.star.wizards.common.Resource; import com.sun.star.wizards.report.IReportDefinitionReadAccess; @@ -98,7 +99,7 @@ public class ColumnarSingleColumn extends ReportBuilderLayouter doNotBreakInTable(xSection); } - protected void insertDetailFieldTitles() + protected void insertDetailFieldTitles(int lastGroupPostion) { // we won't extra field titles } diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarTwoColumns.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarTwoColumns.java index d79713524021..023d447a939f 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarTwoColumns.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarTwoColumns.java @@ -28,6 +28,7 @@ package com.sun.star.wizards.reportbuilder.layout; import com.sun.star.awt.Rectangle; +import com.sun.star.report.XGroup; import com.sun.star.report.XSection; import com.sun.star.wizards.common.Resource; import com.sun.star.wizards.report.IReportDefinitionReadAccess; @@ -130,7 +131,7 @@ public class ColumnarTwoColumns extends ReportBuilderLayouter doNotBreakInTable(xSection); } - protected void insertDetailFieldTitles() + protected void insertDetailFieldTitles(int lastGroupPostion) { // we won't extra field titles } diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java b/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java index 9fd891a446f2..f1c02112414a 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java @@ -29,6 +29,7 @@ package com.sun.star.wizards.reportbuilder.layout; import com.sun.star.awt.Rectangle; +import com.sun.star.report.XGroup; import com.sun.star.report.XSection; import com.sun.star.wizards.common.Resource; import com.sun.star.wizards.report.IReportDefinitionReadAccess; @@ -159,7 +160,7 @@ public class InBlocksLabelsAbove extends ColumnarTwoColumns doNotBreakInTable(xSection); } - protected void insertDetailFieldTitles() + protected void insertDetailFieldTitles(int lastGroupPostion) { // we won't extra field titles } diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsLeft.java b/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsLeft.java index c03cf7cec909..b8ac18db61a4 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsLeft.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsLeft.java @@ -29,6 +29,7 @@ package com.sun.star.wizards.reportbuilder.layout; import com.sun.star.awt.Rectangle; +import com.sun.star.report.XGroup; import com.sun.star.report.XSection; import com.sun.star.wizards.common.Resource; import com.sun.star.wizards.report.IReportDefinitionReadAccess; @@ -126,7 +127,7 @@ public class InBlocksLabelsLeft extends ColumnarTwoColumns doNotBreakInTable(xSection); } - protected void insertDetailFieldTitles() + protected void insertDetailFieldTitles(int lastGroupPostion) { // we won't extra field titles } diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java index 0c2e5af3bd36..7c8dc8185617 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java @@ -42,6 +42,9 @@ import com.sun.star.beans.XPropertySet; import com.sun.star.beans.XPropertySetInfo; import com.sun.star.container.XEnumeration; import com.sun.star.container.XNameAccess; +import com.sun.star.lang.IllegalArgumentException; +import com.sun.star.lang.IndexOutOfBoundsException; +import com.sun.star.lang.WrappedTargetException; import com.sun.star.lang.XComponent; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.report.XFixedLine; @@ -72,6 +75,8 @@ import com.sun.star.wizards.report.IReportDefinitionReadAccess; import com.sun.star.wizards.ui.UIConsts; import java.util.HashMap; import java.util.Locale; +import java.util.logging.Level; +import java.util.logging.Logger; /** * This class is abstract and more like a helper for create different layouts for Report Builder Wizard. @@ -83,6 +88,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter private IReportDefinitionReadAccess m_xReportDefinitionReadAccess; private Resource m_aResource; + private String[][] m_aSortNames; /** * dispose the ReportBuilderLayouter @@ -91,7 +97,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter { closeDesignTemplate(); m_xReportDefinitionReadAccess = null; - // m_xReportBuilderLayouter = null; + // m_xReportBuilderLayouter = null; } /** @@ -148,11 +154,11 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter insertPageFooter(); clearGroups(); - insertGroups(); + int lastGroupPostion = insertGroups(); clearDetails(); // clearFieldTitles(); - insertDetailFieldTitles(); + insertDetailFieldTitles(lastGroupPostion); insertDetailFields(); } catch (java.lang.ArrayIndexOutOfBoundsException e) @@ -163,13 +169,13 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter { throw e; } - catch (Exception e) + catch (Exception ex) { - // Exception not set. Not from interest here. - int dummy = 0; + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex); } } // ------------------------------------------------------------------------- + /** * Remove all Groups */ @@ -183,13 +189,14 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter { xGroups.removeByIndex(0); } - catch (com.sun.star.uno.Exception e) + catch (com.sun.star.uno.Exception ex) { - // Exception not set. Not from interest here. + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex); } } } // ------------------------------------------------------------------------- + /** * Remove all fields * @param _xSectionToClear @@ -209,10 +216,9 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter final XShape aShape = (XShape) UnoRuntime.queryInterface(XShape.class, aObj); _xSectionToClear.remove(aShape); } - catch (com.sun.star.uno.Exception e) + catch (com.sun.star.uno.Exception ex) { - // Exception not set. - int dummy = 0; + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex); } } @@ -226,6 +232,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter // public void clearFieldTitles() // { // } + /** * * @param _nGroupCount @@ -307,10 +314,9 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } } } - catch (com.sun.star.uno.Exception e) + catch (com.sun.star.uno.Exception ex) { - // TODO: Exception not set. - e.printStackTrace(); + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex); } return aUsedStyle; } @@ -352,6 +358,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter return m_nPageWidth; } // ------------------------------------------------------------------------- + /** * Stores the Group names. To insert/create a report with such group names, call layout() * @param _aGroupNames @@ -361,6 +368,11 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter m_aGroupNames = _aGroupNames; } + public void insertSortingNames(String[][] _aSortFieldNames) + { + m_aSortNames = _aSortFieldNames; + } + protected void copyGroupProperties(int _nGroup) { if (getDesignTemplate() != null) @@ -368,103 +380,111 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter try { final XGroups xForeignGroups = getDesignTemplate().getGroups(); - int nGroups = xForeignGroups.getCount(); - Object aForeignGroup = xForeignGroups.getByIndex(_nGroup); - XGroup xForeignGroup = (XGroup) UnoRuntime.queryInterface(XGroup.class, aForeignGroup); - XSection xForeignGroupSection = xForeignGroup.getHeader(); - - if (xForeignGroupSection != null) + if (_nGroup < xForeignGroups.getCount()) { - final XGroups xGroups = getReportDefinition().getGroups(); - Object aGroup = xGroups.getByIndex(_nGroup); - XGroup xGroup = (XGroup) UnoRuntime.queryInterface(XGroup.class, aGroup); - XSection xGroupSection = xGroup.getHeader(); + XGroup xForeignGroup = UnoRuntime.queryInterface(XGroup.class, xForeignGroups.getByIndex(_nGroup)); + XSection xForeignGroupSection = xForeignGroup.getHeader(); - // copy Properties - copyProperties(xForeignGroupSection, xGroupSection); + if (xForeignGroupSection != null) + { + final XGroups xGroups = getReportDefinition().getGroups(); + Object aGroup = xGroups.getByIndex(_nGroup); + XGroup xGroup = (XGroup) UnoRuntime.queryInterface(XGroup.class, aGroup); + XSection xGroupSection = xGroup.getHeader(); + + // copy Properties + copyProperties(xForeignGroupSection, xGroupSection); + } } } - catch (Exception e) + catch (Exception ex) { - int dummy = 0; + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex); } } } // ------------------------------------------------------------------------- - protected void insertGroups() - { - if (m_aGroupNames == null) - { - return; - } + protected int insertGroups() + { final XGroups xGroups = getReportDefinition().getGroups(); - final int nLeftPageIndent = getLeftPageIndent(); - final int nLabelWidth = getMaxLabelWidth(); // 3000; - final int nUsablePageWidth = getPageWidth() - getLeftPageIndent() - getRightPageIndent() - getLeftGroupIndent(getCountOfGroups()); - final int nFieldWidth = nUsablePageWidth - nLabelWidth; - - // after done with all groups, we need access to the last group, for set property 'KeepTogether' so we remember it. - XGroup aLastGroup = null; + int lastGroupPosition = -1; - for (int i = 0; i < m_aGroupNames.length; i++) + if (m_aGroupNames != null) { - final XGroup xGroup = xGroups.createGroup(); - aLastGroup = xGroup; + final int nLeftPageIndent = getLeftPageIndent(); + final int nLabelWidth = getMaxLabelWidth(); // 3000; + final int nUsablePageWidth = getPageWidth() - getLeftPageIndent() - getRightPageIndent() - getLeftGroupIndent(getCountOfGroups()); + final int nFieldWidth = nUsablePageWidth - nLabelWidth; - // TODO: debug what the m_aGroupNames are, "field:[...]" or the "fieldname" - xGroup.setExpression(m_aGroupNames[i]); - xGroup.setHeaderOn(true); - // we don't want any group footer (default off) - // xGroup.setFooterOn(true); + XGroup aLastGroup = null; + // after done with all groups, we need access to the last group, for set property 'KeepTogether' so we remember it. - try + for (int i = 0; i < m_aGroupNames.length; i++) { - // we need to append by hand - // TODO: documentation is unclear here, that we have to insert by hand - int nCount = xGroups.getCount(); - xGroups.insertByIndex(nCount, xGroup); + lastGroupPosition = i; + final XGroup xGroup = xGroups.createGroup(); + aLastGroup = xGroup; - final XSection xGroupSection = xGroup.getHeader(); - copyGroupProperties(nCount); + xGroup.setExpression(m_aGroupNames[i]); + xGroup.setHeaderOn(true); - Rectangle aRect = new Rectangle(); - aRect.X = nLeftPageIndent + getLeftGroupIndent(i); - SectionObject aSO = getDesignTemplate().getGroupLabel(i); - int nLabelHeight = 0; -// if (aSO != null) -// { - nLabelHeight = aSO.getHeight(LayoutConstants.LabelHeight); - aRect = insertLabel(xGroupSection, getTitleFromFieldName(m_aGroupNames[i]), aRect, nLabelWidth, aSO); -// } -// else -// { -// nLabelHeight = 500; -// aRect = insertBoldLabel(xGroupSection, getTitleFromFieldName(m_aGroupNames[i]), aRect, nLabelWidth); -// } - final String sGroupName = convertToFieldName(m_aGroupNames[i]); - aSO = getDesignTemplate().getGroupTextField(i); - insertFormattedField(xGroupSection, sGroupName, aRect, nFieldWidth, aSO); - - // draw a line under the label/formattedfield - aRect.X = nLeftPageIndent + getLeftGroupIndent(i); - aRect.Y = nLabelHeight; - final int nLineWidth = getPageWidth() - getRightPageIndent() - aRect.X; - final int nLineHeight = LayoutConstants.LineHeight; - insertHorizontalLine(xGroupSection, aRect, nLineWidth, nLineHeight); - xGroupSection.setHeight(nLabelHeight + nLineHeight); + try + { + int nCount = xGroups.getCount(); + xGroups.insertByIndex(nCount, xGroup); + final XSection xGroupSection = xGroup.getHeader(); + copyGroupProperties(nCount); + + Rectangle aRect = new Rectangle(); + aRect.X = nLeftPageIndent + getLeftGroupIndent(i); + SectionObject aSO = getDesignTemplate().getGroupLabel(i); + aRect = insertLabel(xGroupSection, getTitleFromFieldName(m_aGroupNames[i]), aRect, nLabelWidth, aSO); + final String sGroupName = convertToFieldName(m_aGroupNames[i]); + aSO = getDesignTemplate().getGroupTextField(i); + aRect = insertFormattedField(xGroupSection, sGroupName, aRect, nFieldWidth, aSO); + int height = aRect.Height; + + // draw a line under the label/formattedfield + aRect.X = nLeftPageIndent + getLeftGroupIndent(i); + aRect.Y = aRect.Height; + final int nLineWidth = getPageWidth() - getRightPageIndent() - aRect.X; + final int nLineHeight = LayoutConstants.LineHeight; + insertHorizontalLine(xGroupSection, aRect, nLineWidth, nLineHeight); + xGroupSection.setHeight(height + nLineHeight); + } + catch (com.sun.star.uno.Exception ex) + { + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex); + } } - catch (com.sun.star.uno.Exception e) + + // hold the inner group together + if (aLastGroup != null) { - // TODO: Exception not set. + doNotBreakInTable(aLastGroup); } } - - // hold the inner group together - if (aLastGroup != null) + if (m_aSortNames != null) { - doNotBreakInTable(aLastGroup); + for (String[] sortFieldName : m_aSortNames) + { + try + { + final XGroup xGroup = xGroups.createGroup(); + xGroup.setExpression(sortFieldName[0]); + xGroup.setSortAscending("ASC".equals(sortFieldName[1])); + xGroup.setHeaderOn(false); + int nCount = xGroups.getCount(); + xGroups.insertByIndex(nCount, xGroup); + } + catch (java.lang.Exception ex) + { + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex); + } + } } + return lastGroupPosition; } // ------------------------------------------------------------------------- @@ -490,7 +510,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter return ""; } - protected int getTypeFromFieldName(String _sField) + protected int getTypeFromFieldName(String _sField) { for (int i = 0; i < m_aFieldNames.length; i++) { @@ -514,6 +534,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter return false; } // ------------------------------------------------------------------------- + /** * Helper to get all field names without the names which are already in the group names * @param _aList @@ -578,8 +599,10 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter return getNamesWithoutGroupNames(m_aFieldNames, m_aFieldTitleNames); } // ------------------------------------------------------------------------- - abstract protected void insertDetailFieldTitles(); + + abstract protected void insertDetailFieldTitles(int lastGroupPostion); // ------------------------------------------------------------------------- + /** * Give a list off all field names to insert the field names, call layout() * @param _aFieldNames @@ -627,12 +650,14 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter copyProperties(xForeignSection, xSection); } } - catch (Exception e) + catch (Exception ex) { + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex); } } } // ------------------------------------------------------------------------- + protected Rectangle insertLabel(XSection _xSection, String _sLabel, Rectangle _aRect, int _nWidth, SectionObject _aSO) { if (_xSection != null) @@ -678,15 +703,15 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter xFixedText.setHeight(nHeight); _xSection.add(xFixedText); } - catch (com.sun.star.uno.Exception e) + catch (com.sun.star.uno.Exception ex) { - // TODO: Exception not set. - int dummy = 0; + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex); } } return _aRect; } // ------------------------------------------------------------------------- + protected String convertToFieldName(String _sElementName) { final StringBuffer aDataField = new StringBuffer(32); @@ -694,6 +719,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter return aDataField.toString(); } + protected String convertFromFieldName(String _sName) { if (_sName.startsWith("field:[")) @@ -705,6 +731,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter return _sName; } // ------------------------------------------------------------------------- + /** * Insert a already formatted field name into a given section * @@ -732,9 +759,9 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter int nHeight = LayoutConstants.FormattedFieldHeight; int nType = getTypeFromFieldName(convertFromFieldName(_sFormattedfield)); - if (nType == DataType.BINARY || - nType == DataType.VARBINARY || - nType == DataType.LONGVARBINARY) + if (nType == DataType.BINARY + || nType == DataType.VARBINARY + || nType == DataType.LONGVARBINARY) { aField = getMSFofReportDefinition().createInstance("com.sun.star.report.ImageControl"); nHeight = LayoutConstants.BinaryHeight; @@ -744,6 +771,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter aField = getMSFofReportDefinition().createInstance("com.sun.star.report.FormattedField"); nHeight = LayoutConstants.FormattedFieldHeight; if (nType == DataType.LONGVARCHAR) /* memo */ + { nHeight = LayoutConstants.MemoFieldHeight; // special case for memo } @@ -757,7 +785,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter xReportControlModel.setDataField(_sFormattedfield); if (_aSO != null) { - // TODO: there seems to be some problems with copy all properties from the design template to the current design + // TODO: there seems to be some problems with copy all properties from the design template to the current design final FontDescriptor aFD = _aSO.getFontDescriptor(); if (aFD != null) { @@ -772,9 +800,9 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter _aRect.X += _nWidth; xReportControlModel.setHeight(nHeight); - if (nType == DataType.BINARY || - nType == DataType.VARBINARY || - nType == DataType.LONGVARBINARY) + if (nType == DataType.BINARY + || nType == DataType.VARBINARY + || nType == DataType.LONGVARBINARY) { // aField = getMSFofReportDefinition().createInstance("com.sun.star.report.ImageControl"); final XImageControl xImageControl = (XImageControl) UnoRuntime.queryInterface(XImageControl.class, xReportControlModel); @@ -795,9 +823,9 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter // xReportControlModel.??? // } } - catch (com.sun.star.beans.UnknownPropertyException e) + catch (com.sun.star.beans.UnknownPropertyException ex) { - // seems we not able to set ParaAdjust + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex); } } // spezial case rpt:now() (default date format) @@ -819,10 +847,9 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter _xSection.add(xReportControlModel); } } - catch (com.sun.star.uno.Exception e) + catch (com.sun.star.uno.Exception ex) { - // TODO: Exception not set. - int dummy = 0; + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex); } } return _aRect; @@ -851,6 +878,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter return m_xMSF; } // ------------------------------------------------------------------------- + protected Rectangle insertVerticalLine(XSection _xSection, Rectangle _aRect, int _nWidth, int _nHeight) { return insertLine(_xSection, _aRect, _nWidth, _nHeight, 1); @@ -882,15 +910,15 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter xFixedLine.setHeight(_nHeight); _xSection.add(xFixedLine); } - catch (com.sun.star.uno.Exception e) + catch (com.sun.star.uno.Exception ex) { - // TODO: Exception not set. - int dummy = 0; + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex); } } return _aRect; } // ------------------------------------------------------------------------- + protected void clearReportHeader() { XSection xSection; @@ -902,9 +930,9 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter emptySection(xSection); } } - catch (com.sun.star.container.NoSuchElementException e) + catch (com.sun.star.container.NoSuchElementException ex) { - // Exception not set. Not really from interest. + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex); } } @@ -930,6 +958,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } catch (Exception e) { + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e); } } else @@ -953,7 +982,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } catch (com.sun.star.container.NoSuchElementException e) { - // Exception not set. Not really from interest. + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e); } } @@ -979,6 +1008,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } catch (Exception e) { + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e); } } else @@ -989,6 +1019,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } } // ------------------------------------------------------------------------- + protected void clearPageHeader() { XSection xSection; @@ -1002,7 +1033,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } catch (com.sun.star.container.NoSuchElementException e) { - // Exception not set. Not really from interest. + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e); } } @@ -1017,7 +1048,6 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter // // DebugHelper.writeInfo("Date: " + aBuf.toString()); // return aBuf.toString(); // } - // protected String getCurrentDate() // { // Calendar aCalendar = Calendar.getInstance(); @@ -1060,7 +1090,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } catch (com.sun.star.container.NoSuchElementException e) { - // Exception not set. Should not from interest here. + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e); } } @@ -1150,7 +1180,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } catch (Exception e) { - // TODO: Exception not set. + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e); } return aSizeMM_100TH; } @@ -1174,9 +1204,9 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter sFirstName = (String) Helper.getUnoObjectbyName(oProdNameAccess, "givenname"); sLastName = (String) Helper.getUnoObjectbyName(oProdNameAccess, "sn"); } - catch (Exception exception) + catch (Exception e) { - exception.printStackTrace(System.out); + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e); } return sFirstName + " " + sLastName; } @@ -1210,6 +1240,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } catch (Exception e) { + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e); } } } @@ -1238,14 +1269,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter Object aClone = aComponent.createClone(); if (aClone != null) { - String sName = aComponent.getName(); - com.sun.star.awt.Point aPosition = aComponent.getPosition(); - Size aSize = aComponent.getSize(); - XShape aShape = (XShape) UnoRuntime.queryInterface(XShape.class, aClone); - String sShapeType = aShape.getShapeType(); - com.sun.star.awt.Point aShapePoint = aShape.getPosition(); - Size aShapeSize = aShape.getSize(); // normally 'createClone' will create a real clone of the component, // but there seems some problems, we have to controll. @@ -1260,9 +1284,10 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } catch (Exception e) { + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e); } - // String sName = xForeignSection.getName(); - // int dummy = 0; + // String sName = xForeignSection.getName(); + // int dummy = 0; } protected void insertPageHeader() @@ -1287,6 +1312,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } catch (Exception e) { + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e); } return; } @@ -1364,7 +1390,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } catch (com.sun.star.uno.Exception e) { - // TODO: Exception not set. + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e); } } } @@ -1390,6 +1416,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } catch (Exception e) { + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e); } } else @@ -1455,7 +1482,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } catch (Exception e) { - // TODO: Exception not set. + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e); } } } @@ -1595,7 +1622,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } catch (com.sun.star.uno.Exception e) { - // TODO: Exception not set. + Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e); } } return nWidth; @@ -1623,7 +1650,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter String sDefaultHeaderLayout = m_xReportDefinitionReadAccess.getDefaultHeaderLayout(); loadAndSetBackgroundTemplate(sDefaultHeaderLayout); - // copy all functions from the design template to the current report definition + // copy all functions from the design template to the current report definition // XFunctions xOtherFunctions = m_xDesignTemplate.getReportDefinition().getFunctions(); // final int nFunctionCount = xOtherFunctions.getCount(); // for (int i=0;i Date: Wed, 19 Jan 2011 15:53:52 +0100 Subject: dba34d: comile error --- reportdesign/source/ui/report/ReportController.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 23c8d1dadffd..06aec876f725 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -106,6 +106,7 @@ #include #include +#include #include #include #include -- cgit v1.2.3 From e0c1daa9561ff447351135f3318d1a1183077212 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Thu, 20 Jan 2011 13:12:51 +0100 Subject: dba34d: #i98163# import hidden value correted --- wizards/com/sun/star/wizards/db/DBMetaData.java | 58 ++++++------ .../com/sun/star/wizards/db/SQLQueryComposer.java | 34 ++++++- .../com/sun/star/wizards/document/FormHandler.java | 85 +++++++++-------- .../sun/star/wizards/report/CallReportWizard.java | 17 ++-- .../com/sun/star/wizards/report/Dataimport.java | 10 +- .../star/wizards/report/ReportTextDocument.java | 101 +++++++++++++-------- .../wizards/report/ReportTextImplementation.java | 33 +++++-- .../com/sun/star/wizards/report/ReportWizard.java | 2 +- .../com/sun/star/wizards/ui/SortingComponent.java | 6 +- 9 files changed, 213 insertions(+), 133 deletions(-) diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java index 5a151937d73f..f6f5d0212fc5 100644 --- a/wizards/com/sun/star/wizards/db/DBMetaData.java +++ b/wizards/com/sun/star/wizards/db/DBMetaData.java @@ -187,7 +187,7 @@ public class DBMetaData } catch (Exception e) { - e.printStackTrace(System.out); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); } } return oNumberFormatter; @@ -215,9 +215,9 @@ public class DBMetaData xNameAccess = UnoRuntime.queryInterface( XNameAccess.class, xDatabaseContext ); DataSourceNames = xNameAccess.getElementNames(); } - catch (Exception exception) + catch (Exception e) { - exception.printStackTrace(System.out); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); } } @@ -326,9 +326,9 @@ public class DBMetaData // TODO: Performance leak getColumns() take very long. xColumns = UnoRuntime.queryInterface( XNameAccess.class, xCommandCols.getColumns() ); } - catch (Exception exception) + catch (Exception e) { - exception.printStackTrace(System.out); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); } } public XNameAccess getColumns() @@ -357,7 +357,7 @@ public class DBMetaData } catch (Exception e) { - e.printStackTrace(System.out); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); } return bHasEscapeProcessing; } @@ -453,7 +453,7 @@ public class DBMetaData } catch (SQLException e) { - e.printStackTrace(System.out); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); return - 1; } } @@ -507,7 +507,7 @@ public class DBMetaData } catch (SQLException e) { - e.printStackTrace(System.out); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); } } @@ -530,7 +530,7 @@ public class DBMetaData } catch (Exception e) { - e.printStackTrace(); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); } return isSQL92CheckEnabled; } @@ -579,9 +579,9 @@ public class DBMetaData xModel = xDocu.getDatabaseDocument(); } } - catch (Exception exception) + catch (Exception e) { - exception.printStackTrace(System.out); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); } } @@ -653,15 +653,15 @@ public class DBMetaData } catch (IllegalArgumentException e) { - e.printStackTrace(System.out); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); } catch (UnknownPropertyException e) { - e.printStackTrace(System.out); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); } catch (WrappedTargetException e) { - e.printStackTrace(System.out); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); } return false; @@ -684,7 +684,7 @@ public class DBMetaData } catch (Exception e) { - e.printStackTrace(System.out); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); return false; } } @@ -746,11 +746,11 @@ public class DBMetaData } return bgetConnection; } - catch (Exception exception) + catch (Exception e) { String sMsgConnectionImpossible = oResource.getResText(RID_DB_COMMON + 35); showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, sMsgConnectionImpossible); - exception.printStackTrace(System.out); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); return false; } } @@ -767,7 +767,7 @@ public class DBMetaData } catch (SQLException e) { - e.printStackTrace(System.out); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); return 0; } } @@ -784,7 +784,7 @@ public class DBMetaData } catch (SQLException e) { - e.printStackTrace(System.out); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); return 0; } } @@ -816,7 +816,7 @@ public class DBMetaData } catch (SQLException e) { - e.printStackTrace(System.out); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); return false; } } @@ -877,13 +877,13 @@ public class DBMetaData } exception.printStackTrace(System.out); } - catch (SQLException exception) + catch (SQLException e) { - callSQLErrorMessageDialog(exception, null); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); } - catch (Exception exception) + catch (Exception e) { - exception.printStackTrace(System.out); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); } return false; } @@ -962,7 +962,7 @@ public class DBMetaData } catch (Exception e) { - e.printStackTrace(); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); } } @@ -992,7 +992,7 @@ public class DBMetaData } catch (SQLException e) { - e.printStackTrace(); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); } return sColValues; } @@ -1006,7 +1006,7 @@ public class DBMetaData } catch (SQLException e) { - e.printStackTrace(System.out); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); return null; } } @@ -1020,7 +1020,7 @@ public class DBMetaData } catch (SQLException e) { - e.printStackTrace(System.out); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); return null; } } @@ -1041,7 +1041,7 @@ public class DBMetaData } catch (Exception e) { - e.printStackTrace(System.out); + Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); return false; } } diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java index e088fb75641f..8e3d9706cc9d 100644 --- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java +++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java @@ -26,9 +26,11 @@ ************************************************************************/ package com.sun.star.wizards.db; - // import com.sun.star.lang.IllegalArgumentException; // import com.sun.star.lang.WrappedTargetException; +import com.sun.star.container.NoSuchElementException; +import com.sun.star.container.XNameAccess; +import com.sun.star.lang.WrappedTargetException; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.beans.*; // import com.sun.star.container.NoSuchElementException; @@ -49,6 +51,8 @@ import com.sun.star.sdb.SQLFilterOperator; import com.sun.star.wizards.common.*; import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; public class SQLQueryComposer { @@ -188,10 +192,32 @@ public class SQLQueryComposer { String sSortValue = CurDBMetaData.getSortFieldNames()[_SortIndex][0]; XPropertySet xColumn = CurDBMetaData.getColumnObjectByFieldName(sSortValue, _baddAliasFieldNames); + if (xColumn == null) + { + XNameAccess columns = UnoRuntime.queryInterface(XColumnsSupplier.class, m_queryComposer).getColumns(); + if (columns != null && columns.hasByName(sSortValue)) + { + try + { + xColumn = UnoRuntime.queryInterface(XPropertySet.class, columns.getByName(sSortValue)); + } + catch (NoSuchElementException ex) + { + Logger.getLogger(SQLQueryComposer.class.getName()).log(Level.SEVERE, null, ex); + } + catch (WrappedTargetException ex) + { + Logger.getLogger(SQLQueryComposer.class.getName()).log(Level.SEVERE, null, ex); + } + } + } - String sSort = CurDBMetaData.getSortFieldNames()[_SortIndex][1]; - boolean bascend = (sSort.equals("ASC")); - m_queryComposer.appendOrderByColumn(xColumn, bascend); + if (xColumn != null) + { + String sSort = CurDBMetaData.getSortFieldNames()[_SortIndex][1]; + boolean bascend = (sSort.equals("ASC")); + m_queryComposer.appendOrderByColumn(xColumn, bascend); + } } public void appendSortingcriteria(boolean _baddAliasFieldNames) throws SQLException diff --git a/wizards/com/sun/star/wizards/document/FormHandler.java b/wizards/com/sun/star/wizards/document/FormHandler.java index 17dece81a03e..e1fab5a3301b 100644 --- a/wizards/com/sun/star/wizards/document/FormHandler.java +++ b/wizards/com/sun/star/wizards/document/FormHandler.java @@ -59,9 +59,17 @@ import com.sun.star.lang.XComponent; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.lang.XServiceInfo; import com.sun.star.container.XNamed; +import java.util.logging.Level; +import java.util.logging.Logger; public class FormHandler { + private static final String CHECKBOX = "CheckBox"; + private static final String DATEFIELD = "DateField"; + private static final String FORMATTEDFIELD = "FormattedField"; + private static final String IMAGECONTROL = "ImageControl"; + private static final String TEXTFIELD = "TextField"; + private static final String TIMEFIELD = "TimeField"; public XFormsSupplier xFormsSupplier; public XMultiServiceFactory xMSFDoc; @@ -124,30 +132,30 @@ public class FormHandler sModelServices[SOIMAGECONTROL] = "com.sun.star.form.component.DatabaseImageControl"; oControlData = new ControlData[22]; - oControlData[0] = createControlData(DataType.BIT, SOCHECKBOX, "CheckBox", "CheckBox", false); - oControlData[1] = createControlData(DataType.BOOLEAN, SOCHECKBOX, "CheckBox", "CheckBox", false); - oControlData[2] = createControlData(DataType.TINYINT, SONUMERICCONTROL, "FormattedField", "FormattedField", false); - oControlData[3] = createControlData(DataType.SMALLINT, SONUMERICCONTROL, "FormattedField", "FormattedField", false); - oControlData[4] = createControlData(DataType.INTEGER, SONUMERICCONTROL, "FormattedField", "FormattedField", false); - oControlData[5] = createControlData(DataType.BIGINT, SONUMERICCONTROL, "FormattedField", "FormattedField", false); - oControlData[6] = createControlData(DataType.FLOAT, SONUMERICCONTROL, "FormattedField", "FormattedField", false); - oControlData[7] = createControlData(DataType.REAL, SONUMERICCONTROL, "FormattedField", "FormattedField", false); - oControlData[8] = createControlData(DataType.DOUBLE, SONUMERICCONTROL, "FormattedField", "FormattedField", false); - oControlData[9] = createControlData(DataType.NUMERIC, SONUMERICCONTROL, "FormattedField", "FormattedField", false); - oControlData[10] = createControlData(DataType.DECIMAL, SONUMERICCONTROL, "FormattedField", "FormattedField", false); - oControlData[11] = createControlData(DataType.CHAR, SOTEXTBOX, "TextField", "TextField", false); - oControlData[12] = createControlData(DataType.VARCHAR, SOTEXTBOX, "TextField", "TextField", true); - oControlData[13] = createControlData(DataType.LONGVARCHAR, SOTEXTBOX, "TextField", "TextField", true); - oControlData[14] = createControlData(DataType.DATE, SODATECONTROL, "DateField", "DateField", false); - oControlData[15] = createControlData(DataType.TIME, SOTIMECONTROL, "TimeField", "TimeField", false); - oControlData[16] = createControlData(DataType.TIMESTAMP, SODATECONTROL, "DateField", "TextField", false); + oControlData[0] = createControlData(DataType.BIT, SOCHECKBOX, CHECKBOX, CHECKBOX, false); + oControlData[1] = createControlData(DataType.BOOLEAN, SOCHECKBOX, CHECKBOX, CHECKBOX, false); + oControlData[2] = createControlData(DataType.TINYINT, SONUMERICCONTROL, FORMATTEDFIELD, FORMATTEDFIELD, false); + oControlData[3] = createControlData(DataType.SMALLINT, SONUMERICCONTROL, FORMATTEDFIELD, FORMATTEDFIELD, false); + oControlData[4] = createControlData(DataType.INTEGER, SONUMERICCONTROL, FORMATTEDFIELD, FORMATTEDFIELD, false); + oControlData[5] = createControlData(DataType.BIGINT, SONUMERICCONTROL, FORMATTEDFIELD, FORMATTEDFIELD, false); + oControlData[6] = createControlData(DataType.FLOAT, SONUMERICCONTROL, FORMATTEDFIELD, FORMATTEDFIELD, false); + oControlData[7] = createControlData(DataType.REAL, SONUMERICCONTROL, FORMATTEDFIELD, FORMATTEDFIELD, false); + oControlData[8] = createControlData(DataType.DOUBLE, SONUMERICCONTROL, FORMATTEDFIELD, FORMATTEDFIELD, false); + oControlData[9] = createControlData(DataType.NUMERIC, SONUMERICCONTROL, FORMATTEDFIELD, FORMATTEDFIELD, false); + oControlData[10] = createControlData(DataType.DECIMAL, SONUMERICCONTROL, FORMATTEDFIELD, FORMATTEDFIELD, false); + oControlData[11] = createControlData(DataType.CHAR, SOTEXTBOX, TEXTFIELD, TEXTFIELD, false); + oControlData[12] = createControlData(DataType.VARCHAR, SOTEXTBOX, TEXTFIELD, TEXTFIELD, true); + oControlData[13] = createControlData(DataType.LONGVARCHAR, SOTEXTBOX, TEXTFIELD, TEXTFIELD, true); + oControlData[14] = createControlData(DataType.DATE, SODATECONTROL, DATEFIELD, DATEFIELD, false); + oControlData[15] = createControlData(DataType.TIME, SOTIMECONTROL, TIMEFIELD, TIMEFIELD, false); + oControlData[16] = createControlData(DataType.TIMESTAMP, SODATECONTROL, DATEFIELD, TEXTFIELD, false); // oImageControlData = new ControlData[4]; - oControlData[17] = createControlData(DataType.BINARY, SOIMAGECONTROL, "ImageControl", "TextField", false); - oControlData[18] = createControlData(DataType.VARBINARY, SOIMAGECONTROL, "ImageControl", "TextField", false); - oControlData[19] = createControlData(DataType.LONGVARBINARY, SOIMAGECONTROL, "ImageControl", "TextField", false); - oControlData[20] = createControlData(DataType.BLOB, SOIMAGECONTROL, "ImageControl", "TextField", false); + oControlData[17] = createControlData(DataType.BINARY, SOIMAGECONTROL, IMAGECONTROL, TEXTFIELD, false); + oControlData[18] = createControlData(DataType.VARBINARY, SOIMAGECONTROL, IMAGECONTROL, TEXTFIELD, false); + oControlData[19] = createControlData(DataType.LONGVARBINARY, SOIMAGECONTROL, IMAGECONTROL, TEXTFIELD, false); + oControlData[20] = createControlData(DataType.BLOB, SOIMAGECONTROL, IMAGECONTROL, TEXTFIELD, false); - oControlData[21] = createControlData(DataType.OTHER, SOIMAGECONTROL, "ImageControl", "TextField", false); + oControlData[21] = createControlData(DataType.OTHER, SOIMAGECONTROL, IMAGECONTROL, TEXTFIELD, false); } public int getControlType(int _fieldtype) @@ -209,8 +217,7 @@ public class FormHandler public XNameContainer getDocumentForms() { - XNameContainer xNamedForms = xFormsSupplier.getForms(); - return xNamedForms; + return xFormsSupplier.getForms(); } public String getValueofHiddenControl(XNameAccess xNamedForm, String ControlName, String sMsg) throws com.sun.star.wizards.document.FormHandler.UnknownHiddenControlException @@ -238,7 +245,7 @@ public class FormHandler try { XInterface xHiddenControl; - if (xNameAccess.hasByName(ControlName) == true) + if (xNameAccess.hasByName(ControlName)) { xHiddenControl = (XInterface) AnyConverter.toObject(new Type(XInterface.class), xNameAccess.getByName(ControlName)); } @@ -249,9 +256,9 @@ public class FormHandler } Helper.setUnoPropertyValue(xHiddenControl, "HiddenValue", ControlValue); } - catch (Exception exception) + catch (Exception ex) { - exception.printStackTrace(System.out); + Logger.getLogger(FormHandler.class.getName()).log(Level.SEVERE, null, ex); } } @@ -285,9 +292,9 @@ public class FormHandler xNamedFormContainer.removeByName(_FormName); } } - catch (com.sun.star.uno.Exception exception) + catch (com.sun.star.uno.Exception ex) { - exception.printStackTrace(System.out); + Logger.getLogger(FormHandler.class.getName()).log(Level.SEVERE, null, ex); } } @@ -306,7 +313,7 @@ public class FormHandler } catch (Exception e) { - e.printStackTrace(System.out); + Logger.getLogger(FormHandler.class.getName()).log(Level.SEVERE, null, e); } } @@ -318,11 +325,11 @@ public class FormHandler } catch ( WrappedTargetException e ) { - e.printStackTrace( System.err ); + Logger.getLogger(FormHandler.class.getName()).log(Level.SEVERE, null, e); } catch( final NoSuchElementException e ) { - e.printStackTrace( System.err ); + Logger.getLogger(FormHandler.class.getName()).log(Level.SEVERE, null, e); } } @@ -363,9 +370,9 @@ public class FormHandler return getFormByName(_FormName); } } - catch (com.sun.star.uno.Exception exception) + catch (com.sun.star.uno.Exception e) { - exception.printStackTrace(System.out); + Logger.getLogger(FormHandler.class.getName()).log(Level.SEVERE, null, e); return null; } } @@ -393,7 +400,7 @@ public class FormHandler } catch (IllegalArgumentException e) { - e.printStackTrace(System.out); + Logger.getLogger(FormHandler.class.getName()).log(Level.SEVERE, null, e); } return xNamedForm; } @@ -490,7 +497,7 @@ public class FormHandler } catch (Exception e) { - e.printStackTrace(System.out); + Logger.getLogger(FormHandler.class.getName()).log(Level.SEVERE, null, e); } } @@ -538,7 +545,7 @@ public class FormHandler } catch (Exception e) { - e.printStackTrace(System.out); + Logger.getLogger(FormHandler.class.getName()).log(Level.SEVERE, null, e); return null; } } @@ -586,9 +593,9 @@ public class FormHandler XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, this.xMSFDoc.createInstance("com.sun.star.text.DocumentSettings")); xPropertySet.setPropertyValue("DoNotCaptureDrawObjsOnPage", new Boolean(!_bCaptureObjects)); } - catch (Exception ex) + catch (Exception e) { - ex.printStackTrace(System.out); + Logger.getLogger(FormHandler.class.getName()).log(Level.SEVERE, null, e); } } } diff --git a/wizards/com/sun/star/wizards/report/CallReportWizard.java b/wizards/com/sun/star/wizards/report/CallReportWizard.java index c66596e11c02..fc0a60447cd3 100644 --- a/wizards/com/sun/star/wizards/report/CallReportWizard.java +++ b/wizards/com/sun/star/wizards/report/CallReportWizard.java @@ -28,11 +28,12 @@ package com.sun.star.wizards.report; import com.sun.star.beans.PropertyValue; import com.sun.star.uno.Type; -import com.sun.star.uno.UnoRuntime; import com.sun.star.text.XTextDocument; import com.sun.star.wizards.common.Properties; import com.sun.star.sdb.application.XDatabaseDocumentUI; import com.sun.star.wizards.common.NamedValueCollection; +import java.util.logging.Level; +import java.util.logging.Logger; /** This class capsulates the class, that implements the minimal component, a * factory for creating the service (__getServiceFactory). @@ -138,9 +139,9 @@ public class CallReportWizard } } } - catch (Exception exception) + catch (Exception e) { - System.err.println(exception); + Logger.getLogger(CallReportWizard.class.getName()).log(Level.SEVERE, null, e); } System.gc(); } @@ -212,11 +213,11 @@ public class CallReportWizard try { - byteReturn = new String("" + this.hashCode()).getBytes(); + byteReturn = ("" + this.hashCode()).getBytes(); } - catch (Exception exception) + catch (Exception e) { - System.err.println(exception); + Logger.getLogger(CallReportWizard.class.getName()).log(Level.SEVERE, null, e); } return (byteReturn); @@ -251,9 +252,9 @@ public class CallReportWizard new Type(com.sun.star.lang.XInitialization.class) }; } - catch (Exception exception) + catch (Exception e) { - System.err.println(exception); + Logger.getLogger(CallReportWizard.class.getName()).log(Level.SEVERE, null, e); } return (typeReturn); diff --git a/wizards/com/sun/star/wizards/report/Dataimport.java b/wizards/com/sun/star/wizards/report/Dataimport.java index 00b58fb5e008..6ae33413605d 100644 --- a/wizards/com/sun/star/wizards/report/Dataimport.java +++ b/wizards/com/sun/star/wizards/report/Dataimport.java @@ -34,6 +34,8 @@ import com.sun.star.text.XTextDocument; import com.sun.star.wizards.ui.*; import com.sun.star.wizards.common.*; import com.sun.star.uno.Exception; +import java.util.logging.Level; +import java.util.logging.Logger; public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionListener { // extends ReportWizard @@ -186,14 +188,14 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi super.xReschedule.reschedule(); return; } - catch (Exception exception) + catch (Exception e) { - exception.printStackTrace(System.out); + Logger.getLogger(Dataimport.class.getName()).log(Level.SEVERE, null, e); // return; } - catch (java.lang.Exception jexception) + catch (java.lang.Exception e) { - jexception.printStackTrace(System.out); + Logger.getLogger(Dataimport.class.getName()).log(Level.SEVERE, null, e); // return; } } diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java index 3ab9e704b9b9..cec7f0cbed1d 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java +++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java @@ -53,9 +53,17 @@ import com.sun.star.wizards.text.TextStyleHandler; import com.sun.star.wizards.text.TextFieldHandler; import com.sun.star.wizards.text.ViewHandler; import com.sun.star.wizards.document.FormHandler; +import java.util.logging.Level; +import java.util.logging.Logger; class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implements Comparator { + + private static final String COMMAND = "Command"; + private static final String ISLANDSCAPE = "IsLandscape"; + private static final String ISVISIBLE = "IsVisible"; + private static final String QUERYNAME = "QueryName"; + private static final String SIZE = "Size"; // private XMultiServiceFactory xMSF; // private XMultiServiceFactory xMSFDoc; private Object ReportPageStyle; @@ -102,7 +110,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen lateInit(oResource, _aRP); } - void lateInit(Resource oResource, RecordParser _aRecordParser) + private void lateInit(Resource oResource, RecordParser _aRecordParser) { oTextTableHandler = new TextTableHandler(xMSFDoc, xTextDocument); oTextSectionHandler = new TextSectionHandler(xMSFDoc, xTextDocument); @@ -146,12 +154,12 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen { oTextSection = xTextSections.getByName(RECORDSECTION); } - boolean bLayoutMode = AnyConverter.toBoolean(Helper.getUnoPropertyValue(oTextSection, "IsVisible")); + boolean bLayoutMode = AnyConverter.toBoolean(Helper.getUnoPropertyValue(oTextSection, ISVISIBLE)); return bLayoutMode; } - catch (Exception exception) + catch (Exception e) { - exception.printStackTrace(System.out); + Logger.getLogger(ReportTextDocument.class.getName()).log(Level.SEVERE, null, e); // In doubt we rather suggest this is LayoutMode... return true; } @@ -172,7 +180,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen } // xProgressBar.setValue(100); oViewHandler.selectFirstPage(oTextTableHandler); - // xProgressBar.end(); + // xProgressBar.end(); } public void swapLayoutTemplate(String LayoutTemplatePath/*, String BitmapPath*/) @@ -181,17 +189,17 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen { // xProgressBar.start("", 10); this.LayoutTemplatePath = LayoutTemplatePath; - boolean bOldIsCurLandscape = AnyConverter.toBoolean(Helper.getUnoPropertyValue(ReportPageStyle, "IsLandscape")); + boolean bOldIsCurLandscape = AnyConverter.toBoolean(Helper.getUnoPropertyValue(ReportPageStyle, ISLANDSCAPE)); oTextStyleHandler.loadStyleTemplates(LayoutTemplatePath, "LoadPageStyles"); // xProgressBar.setValue(60); changePageOrientation(bOldIsCurLandscape); // xProgressBar.setValue(100); oViewHandler.selectFirstPage(oTextTableHandler); - // xProgressBar.end(); + // xProgressBar.end(); } - catch (Exception exception) + catch (Exception e) { - exception.printStackTrace(System.out); + Logger.getLogger(ReportTextDocument.class.getName()).log(Level.SEVERE, null, e); } } @@ -199,21 +207,41 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen { com.sun.star.container.XNameContainer xNamedForm = oFormHandler.insertFormbyName(SOREPORTFORMNAME); XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xNamedForm); - oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "CommandType", new String(Integer.toString(CurDBMetaData.getCommandType()))); + oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "CommandType", Integer.toString(CurDBMetaData.getCommandType())); if (CurDBMetaData.getCommandType() == CommandType.QUERY) { - oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "QueryName", CurDBMetaData.getCommandName()); - // oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "Command", ""); - DBMetaData.CommandObject oCommand = CurDBMetaData.getQueryByName(CurDBMetaData.getCommandName()); - oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "Command", CurDBMetaData.Command); + oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, QUERYNAME, CurDBMetaData.getCommandName()); + oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "Command", ""); + //DBMetaData.CommandObject oCommand = CurDBMetaData.getQueryByName(CurDBMetaData.getCommandName()); + //oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, COMMAND, CurDBMetaData.Command); } else { - oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "QueryName", ""); - oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "Command", CurDBMetaData.Command); + oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, QUERYNAME, ""); + oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, COMMAND, CurDBMetaData.Command); } oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "GroupFieldNames", JavaTools.ArraytoString(CurDBMetaData.GroupFieldNames)); oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "FieldNames", JavaTools.ArraytoString(CurDBMetaData.getFieldNames())); + String[][] sortFieldNames = CurDBMetaData.getSortFieldNames(); + if (sortFieldNames != null && sortFieldNames.length > 0) + { + final String space = ","; + final String colon = ";"; + StringBuilder orderBy = new StringBuilder(); + for (String[] sortPair : sortFieldNames) + { + orderBy.append(sortPair[0]).append(space).append(sortPair[1]).append(colon); + } + if (orderBy.length() != 0) + { + orderBy.delete(orderBy.lastIndexOf(colon), orderBy.length()); + } + oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "Sorting", orderBy.toString()); + } + else + { + oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "Sorting", ""); + } oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "RecordFieldNames", JavaTools.ArraytoString(CurDBMetaData.getRecordFieldNames())); } @@ -230,9 +258,9 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen ReportPageStyle = Helper.getUnoObjectbyName(oPageStyleFamily, "Standard"); FirstPageStyle = Helper.getUnoObjectbyName(oPageStyleFamily, "First Page"); } - catch (Exception exception) + catch (Exception e) { - exception.printStackTrace(System.out); + Logger.getLogger(ReportTextDocument.class.getName()).log(Level.SEVERE, null, e); } } @@ -242,15 +270,15 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen { com.sun.star.awt.Size oNewSize; getReportPageStyles(); - com.sun.star.awt.Size oLocSize = (com.sun.star.awt.Size) Helper.getUnoStructValue(ReportPageStyle, "Size"); - bIsCurLandscape = AnyConverter.toBoolean(Helper.getUnoPropertyValue(ReportPageStyle, "IsLandscape")); + com.sun.star.awt.Size oLocSize = (com.sun.star.awt.Size) Helper.getUnoStructValue(ReportPageStyle, SIZE); + bIsCurLandscape = AnyConverter.toBoolean(Helper.getUnoPropertyValue(ReportPageStyle, ISLANDSCAPE)); if (bIsCurLandscape != bNewLandscape) { oNewSize = new com.sun.star.awt.Size(oLocSize.Height, oLocSize.Width); - Helper.setUnoPropertyValue(ReportPageStyle, "IsLandscape", new Boolean(bNewLandscape)); - Helper.setUnoPropertyValue(ReportPageStyle, "Size", oNewSize); - Helper.setUnoPropertyValue(FirstPageStyle, "IsLandscape", new Boolean(bNewLandscape)); - Helper.setUnoPropertyValue(FirstPageStyle, "Size", oNewSize); + Helper.setUnoPropertyValue(ReportPageStyle, ISLANDSCAPE, bNewLandscape); + Helper.setUnoPropertyValue(ReportPageStyle, SIZE, oNewSize); + Helper.setUnoPropertyValue(FirstPageStyle, ISLANDSCAPE, bNewLandscape); + Helper.setUnoPropertyValue(FirstPageStyle, SIZE, oNewSize); int iLeftMargin = AnyConverter.toInt(Helper.getUnoPropertyValue(ReportPageStyle, "LeftMargin")); int iRightMargin = AnyConverter.toInt(Helper.getUnoPropertyValue(ReportPageStyle, "RightMargin")); PageWidth = oNewSize.Width - iLeftMargin - iRightMargin; @@ -260,9 +288,9 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen } } } - catch (Exception exception) + catch (Exception e) { - exception.printStackTrace(System.out); + Logger.getLogger(ReportTextDocument.class.getName()).log(Level.SEVERE, null, e); } } @@ -303,9 +331,9 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen } return true; } - catch (Exception exception) + catch (Exception e) { - exception.printStackTrace(System.out); + Logger.getLogger(ReportTextDocument.class.getName()).log(Level.SEVERE, null, e); return false; } } @@ -352,6 +380,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen // { // return (JavaTools.FieldInList(CurDBMetaData.GroupFieldNames, _FieldName) != -1); // } + public void replaceFieldValueInRecordSection(int RecordCount) { int GroupCount = CurDBMetaData.GroupFieldNames.length; @@ -367,7 +396,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen String TableName; DBColumn OldDBColumn; DBColumn CurDBColumn; - XNameAccess xTableNames = oTextTableHandler.xTextTablesSupplier.getTextTables(); + // XNameAccess xTableNames = oTextTableHandler.xTextTablesSupplier.getTextTables(); int GroupFieldCount = SelGroupNames.length; for (int i = 0; i < GroupFieldCount; i++) { @@ -639,7 +668,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen { try { - Vector aFieldColumns = new Vector(); + ArrayList aFieldColumns = new ArrayList(); for (int i = 0; i < _FieldColumns.length; i++) { FieldColumn CurFieldColumn = _FieldColumns[i]; @@ -654,7 +683,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen } catch (RuntimeException e) { - e.printStackTrace(System.out); + Logger.getLogger(ReportTextDocument.class.getName()).log(Level.SEVERE, null, e); return null; } } @@ -728,7 +757,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen { // xRelativeTextContentRemove.removeTextContentBefore(xTextContent); xRelativeTextContentRemove.removeTextContentAfter(xTextContent); - // IllegalArgumentException may be thrown when no paragraphbreak is there + // IllegalArgumentException may be thrown when no paragraphbreak is there } catch (IllegalArgumentException iexception) { @@ -751,17 +780,17 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen for (int i = 0; i < GroupFieldCount; i++) { oTextSection = xTextSections.getByName(GROUPSECTION + String.valueOf(i + 1)); - Helper.setUnoPropertyValue(oTextSection, "IsVisible", new Boolean(_IsVisible)); + Helper.setUnoPropertyValue(oTextSection, ISVISIBLE, _IsVisible); } if (xTextSections.hasByName(RECORDSECTION)) { oTextSection = xTextSections.getByName(RECORDSECTION); - Helper.setUnoPropertyValue(oTextSection, "IsVisible", new Boolean(_IsVisible)); + Helper.setUnoPropertyValue(oTextSection, ISVISIBLE, _IsVisible); } } - catch (Exception exception) + catch (Exception e) { - exception.printStackTrace(System.out); + Logger.getLogger(ReportTextDocument.class.getName()).log(Level.SEVERE, null, e); } } diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java index ceecaf28ba4f..535139b8f985 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java +++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java @@ -202,9 +202,9 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme } } } - catch (Exception exception) + catch (Exception ex) { - exception.printStackTrace(System.out); + Logger.getLogger( ReportTextImplementation.class.getName() ).log( Level.SEVERE, null, ex ); } return xNamedTextSection; } @@ -237,6 +237,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme String sCommandType = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "CommandType", sMsg); String sGroupFieldNames = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "GroupFieldNames", sMsg); String sFieldNames = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "FieldNames", sMsg); + final String sorting = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "Sorting", sMsg); String sRecordFieldNames = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "RecordFieldNames", sMsg); if (xNamedForm.hasByName("QueryName")) { @@ -244,16 +245,28 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme } String[] sFieldNameList = JavaTools.ArrayoutofString(sFieldNames, ";"); String[] sNewList = JavaTools.ArrayoutofString(sRecordFieldNames, ";"); + if ( !"".equals(sorting)) + { + String[] sortList = JavaTools.ArrayoutofString(sorting, ";"); + ArrayList aSortFields = new ArrayList(); + for (String sortEntry : sortList) + { + aSortFields.add(JavaTools.ArrayoutofString(sortEntry, ",")); + } + String[][] sortFieldNames = new String[aSortFields.size()][2]; + aSortFields.toArray(sortFieldNames); + getRecordParser().setSortFieldNames(sortFieldNames); + } getRecordParser().setRecordFieldNames(sNewList); getRecordParser().GroupFieldNames = JavaTools.ArrayoutofString(sGroupFieldNames, ";"); getRecordParser().setCommandType(Integer.valueOf(sCommandType).intValue()); + sMsgQueryCreationImpossible = JavaTools.replaceSubString(sMsgQueryCreationImpossible, getRecordParser().Command, ""); bgetConnection = getRecordParser().getConnection(_properties); int nCommandType = com.sun.star.sdb.CommandType.COMMAND; boolean bexecute = false; if (bgetConnection) { - if ((getRecordParser().getCommandType() == CommandType.QUERY) && (getRecordParser().Command.equals(""))) { DBMetaData.CommandObject oCommand = getRecordParser().getQueryByName(sQueryName); @@ -262,6 +275,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme getRecordParser().Command = (String) oCommand.getPropertySet().getPropertyValue("Command"); getRecordParser().getSQLQueryComposer().m_xQueryAnalyzer.setQuery(getRecordParser().Command); getRecordParser().getSQLQueryComposer().prependSortingCriteria(); + getRecordParser().Command = getRecordParser().getSQLQueryComposer().getQuery(); } else { @@ -293,13 +307,14 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme { return false; } - catch (java.lang.Exception javaexception) + catch (java.lang.Exception ex) { - javaexception.printStackTrace(System.out); + Logger.getLogger( ReportTextImplementation.class.getName() ).log( Level.SEVERE, null, ex ); return false; } - catch (com.sun.star.wizards.document.FormHandler.UnknownHiddenControlException exception) + catch (com.sun.star.wizards.document.FormHandler.UnknownHiddenControlException ex) { + Logger.getLogger( ReportTextImplementation.class.getName() ).log( Level.SEVERE, null, ex ); return false; } } @@ -322,8 +337,6 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme Object CurGroupValue; String CurGroupTableName; // RecordParser CurDBMetaData = getRecordParser(); - com.sun.star.style.BreakType CorrBreakValue = null; - String CorrPageDescName = ""; getDoc().oTextFieldHandler.fixDateFields(true); getDoc().removeAllVisibleTextSections(); getDoc().removeNonLayoutTextTables(); @@ -403,8 +416,9 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme } getDoc().oTextSectionHandler.breakLinkofTextSections(); } - catch (Exception exception) + catch (Exception ex) { + Logger.getLogger( ReportTextImplementation.class.getName() ).log( Level.SEVERE, null, ex ); } // catch (java.lang.Exception javaexception) // { @@ -629,6 +643,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme } catch (Exception e) { + Logger.getLogger( ReportTextImplementation.class.getName() ).log( Level.SEVERE, null, e ); } } return m_aReportPath; diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java b/wizards/com/sun/star/wizards/report/ReportWizard.java index 0c9eef8f430d..0ec981b54218 100644 --- a/wizards/com/sun/star/wizards/report/ReportWizard.java +++ b/wizards/com/sun/star/wizards/report/ReportWizard.java @@ -457,7 +457,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, // Get the path to the extension and try to add the path to the class loader String sLocation = getPathToExtension(xMSF); // TODO: Umlaut in filename! - if (sLocation.length() > 0) + if (sLocation.length() == 0) { try { diff --git a/wizards/com/sun/star/wizards/ui/SortingComponent.java b/wizards/com/sun/star/wizards/ui/SortingComponent.java index d15f5131b560..aa5e0b244022 100644 --- a/wizards/com/sun/star/wizards/ui/SortingComponent.java +++ b/wizards/com/sun/star/wizards/ui/SortingComponent.java @@ -111,7 +111,7 @@ public class SortingComponent "Dropdown", PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { - new Boolean(true), new Boolean(bDoEnable), 12, HIDString, new Short(UnoDialog.getListBoxLineCount()), "lstSort" + new Integer(i + 1), IListBoxPosX, new Integer(iCurPosY + 14), IStep, new Short(curtabindex++), IListBoxWidth + true, bDoEnable, 12, HIDString, new Short(UnoDialog.getListBoxLineCount()), "lstSort" + new Integer(i + 1), IListBoxPosX, new Integer(iCurPosY + 14), IStep, new Short(curtabindex++), IListBoxWidth }); //new Short((short) (17+i*4)) HIDString = HelpIds.getHelpIdString(FirstHelpIndex + 1); @@ -120,7 +120,7 @@ public class SortingComponent PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tag", PropertyNames.PROPERTY_WIDTH }, new Object[] { - new Boolean(bDoEnable), 10, HIDString, sSortAscend[i], IOptButtonPosX, new Integer(iCurPosY + 10), new Short((short) 1), IStep, new Short(curtabindex++), new String("ASC"), IOptButtonWidth + bDoEnable, 10, HIDString, sSortAscend[i], IOptButtonPosX, new Integer(iCurPosY + 10), new Short((short) 1), IStep, new Short(curtabindex++), "ASC", IOptButtonWidth }); //, new Short((short) (18+i*4)) HIDString = HelpIds.getHelpIdString(FirstHelpIndex + 2); @@ -129,7 +129,7 @@ public class SortingComponent PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tag", PropertyNames.PROPERTY_WIDTH }, new Object[] { - new Boolean(bDoEnable), 10, HIDString, sSortDescend[i], IOptButtonPosX, new Integer(iCurPosY + 24), new Short((short) 0), IStep, new Short(curtabindex++), new String("DESC"), IOptButtonWidth + bDoEnable, 10, HIDString, sSortDescend[i], IOptButtonPosX, new Integer(iCurPosY + 24), new Short((short) 0), IStep, new Short(curtabindex++), "DESC", IOptButtonWidth }); //, new Short((short) (19+i*4)) iCurPosY = iCurPosY + 36; FirstHelpIndex += 3; -- cgit v1.2.3 From 3b949fc2510279cb277f651d3b0b9976cbd1c5b6 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Thu, 20 Jan 2011 13:12:51 +0100 Subject: dba34d: #i98163# import hidden value correted --- xmloff/source/forms/elementimport.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index c010b666e552..80ef4629a580 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -890,12 +890,12 @@ namespace xmloff if (!bRetrievedValues) { getValuePropertyNames(m_eElementType, nClassId, pCurrentValueProperty, pValueProperty); - ENSURE_OR_BREAK( pCurrentValueProperty && pValueProperty, "OControlImport::StartElement: illegal value property names!" ); + ENSURE_OR_BREAK( pValueProperty, "OControlImport::StartElement: illegal value property names!" ); bRetrievedValues = sal_True; } - OSL_ENSURE((PROPID_VALUE != aValueProps->Handle) || pValueProperty, + ENSURE_OR_BREAK((PROPID_VALUE != aValueProps->Handle) || pValueProperty, "OControlImport::StartElement: the control does not have a value property!"); - OSL_ENSURE((PROPID_CURRENT_VALUE != aValueProps->Handle) || pCurrentValueProperty, + ENSURE_OR_BREAK((PROPID_CURRENT_VALUE != aValueProps->Handle) || pCurrentValueProperty, "OControlImport::StartElement: the control does not have a current-value property!"); // transfer the name -- cgit v1.2.3 From 9840529f8ad4c8f3ed8932db1af2c11b662b18c7 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Thu, 20 Jan 2011 15:58:09 +0100 Subject: dba34d: some refactoring --- .../sun/star/wizards/agenda/AgendaTemplate.java | 42 +- .../star/wizards/agenda/AgendaWizardDialog.java | 4 +- .../wizards/agenda/AgendaWizardDialogImpl.java | 15 +- wizards/com/sun/star/wizards/agenda/CGAgenda.java | 5 +- wizards/com/sun/star/wizards/agenda/CGTopic.java | 3 +- .../com/sun/star/wizards/agenda/CallWizard.java | 5 +- .../com/sun/star/wizards/agenda/TopicsControl.java | 24 +- wizards/com/sun/star/wizards/common/ConfigSet.java | 4 +- .../com/sun/star/wizards/common/Configuration.java | 4 +- wizards/com/sun/star/wizards/common/Desktop.java | 28 +- .../com/sun/star/wizards/common/FileAccess.java | 90 +-- wizards/com/sun/star/wizards/common/HelpIds.java | 724 ++++++++++----------- wizards/com/sun/star/wizards/common/JavaTools.java | 26 +- .../sun/star/wizards/common/NumericalHelper.java | 26 +- .../com/sun/star/wizards/common/PropertyNames.java | 14 + .../sun/star/wizards/common/PropertySetHelper.java | 2 +- wizards/com/sun/star/wizards/common/UCB.java | 4 +- wizards/com/sun/star/wizards/common/XMLHelper.java | 2 +- .../com/sun/star/wizards/db/BlindtextCreator.java | 7 +- .../com/sun/star/wizards/db/ColumnPropertySet.java | 6 +- .../com/sun/star/wizards/db/CommandMetaData.java | 7 +- wizards/com/sun/star/wizards/db/CommandName.java | 31 +- wizards/com/sun/star/wizards/db/DBMetaData.java | 10 +- wizards/com/sun/star/wizards/db/QueryMetaData.java | 2 +- wizards/com/sun/star/wizards/db/RecordParser.java | 7 +- .../sun/star/wizards/db/RelationController.java | 3 +- .../com/sun/star/wizards/db/SQLQueryComposer.java | 51 +- .../com/sun/star/wizards/db/TableDescriptor.java | 12 +- wizards/com/sun/star/wizards/db/TypeInspector.java | 3 +- wizards/com/sun/star/wizards/document/Control.java | 4 +- .../sun/star/wizards/document/DatabaseControl.java | 2 +- .../com/sun/star/wizards/document/GridControl.java | 2 +- .../sun/star/wizards/document/OfficeDocument.java | 10 +- .../star/wizards/document/TimeStampControl.java | 4 +- wizards/com/sun/star/wizards/fax/CallWizard.java | 5 +- wizards/com/sun/star/wizards/fax/FaxDocument.java | 4 +- .../com/sun/star/wizards/fax/FaxWizardDialog.java | 12 +- .../sun/star/wizards/fax/FaxWizardDialogImpl.java | 30 +- .../com/sun/star/wizards/form/CallFormWizard.java | 5 +- wizards/com/sun/star/wizards/form/FieldLinker.java | 16 +- wizards/com/sun/star/wizards/form/Finalizer.java | 2 +- .../sun/star/wizards/form/FormConfiguration.java | 6 +- .../sun/star/wizards/form/FormControlArranger.java | 6 +- .../com/sun/star/wizards/form/FormDocument.java | 6 +- wizards/com/sun/star/wizards/form/FormWizard.java | 8 +- .../com/sun/star/wizards/form/StyleApplier.java | 18 +- .../sun/star/wizards/form/UIControlArranger.java | 2 +- .../com/sun/star/wizards/letter/CallWizard.java | 5 +- .../sun/star/wizards/letter/LetterDocument.java | 4 +- .../star/wizards/letter/LetterWizardDialog.java | 14 +- .../wizards/letter/LetterWizardDialogImpl.java | 66 +- .../sun/star/wizards/query/CallQueryWizard.java | 9 +- wizards/com/sun/star/wizards/query/Finalizer.java | 8 +- .../com/sun/star/wizards/query/QuerySummary.java | 25 +- .../com/sun/star/wizards/query/QueryWizard.java | 2 +- .../sun/star/wizards/report/CallReportWizard.java | 5 +- wizards/com/sun/star/wizards/report/DBColumn.java | 4 +- .../com/sun/star/wizards/report/Dataimport.java | 10 +- .../sun/star/wizards/report/ReportFinalizer.java | 10 +- .../sun/star/wizards/report/ReportLayouter.java | 6 +- .../star/wizards/report/ReportTextDocument.java | 7 +- .../wizards/report/ReportTextImplementation.java | 34 +- .../com/sun/star/wizards/report/ReportWizard.java | 12 +- .../reportbuilder/ReportBuilderImplementation.java | 5 +- .../reportbuilder/layout/DesignTemplate.java | 5 +- .../layout/ReportBuilderLayouter.java | 21 +- .../sun/star/wizards/table/CallTableWizard.java | 9 +- .../sun/star/wizards/table/FieldDescription.java | 2 +- .../com/sun/star/wizards/table/FieldFormatter.java | 50 +- wizards/com/sun/star/wizards/table/Finalizer.java | 22 +- .../sun/star/wizards/table/PrimaryKeyHandler.java | 2 +- .../sun/star/wizards/table/ScenarioSelector.java | 8 +- .../com/sun/star/wizards/table/TableWizard.java | 14 +- .../com/sun/star/wizards/text/TextDocument.java | 13 +- .../sun/star/wizards/text/TextFieldHandler.java | 4 +- .../sun/star/wizards/text/TextSectionHandler.java | 9 +- .../sun/star/wizards/text/TextStyleHandler.java | 3 +- .../sun/star/wizards/ui/AggregateComponent.java | 12 +- wizards/com/sun/star/wizards/ui/ButtonList.java | 10 +- .../sun/star/wizards/ui/CommandFieldSelection.java | 42 +- .../com/sun/star/wizards/ui/ControlScroller.java | 10 +- .../star/wizards/ui/DBLimitedFieldSelection.java | 11 +- .../com/sun/star/wizards/ui/DocumentPreview.java | 3 +- .../com/sun/star/wizards/ui/FieldSelection.java | 22 +- .../com/sun/star/wizards/ui/FilterComponent.java | 36 +- wizards/com/sun/star/wizards/ui/ImageList.java | 8 +- wizards/com/sun/star/wizards/ui/PathSelection.java | 8 +- wizards/com/sun/star/wizards/ui/PeerConfig.java | 4 +- .../com/sun/star/wizards/ui/SortingComponent.java | 24 +- wizards/com/sun/star/wizards/ui/UnoDialog.java | 22 +- wizards/com/sun/star/wizards/ui/UnoDialog2.java | 2 +- wizards/com/sun/star/wizards/ui/WizardDialog.java | 16 +- .../com/sun/star/wizards/ui/event/DataAware.java | 2 +- .../sun/star/wizards/ui/event/DataAwareFields.java | 10 +- .../sun/star/wizards/ui/event/ListModelBinder.java | 11 +- .../star/wizards/ui/event/MethodInvocation.java | 1 - .../sun/star/wizards/ui/event/SimpleDataAware.java | 2 +- .../sun/star/wizards/ui/event/UnoDataAware.java | 8 +- .../sun/star/wizards/web/BackgroundsDialog.java | 5 +- wizards/com/sun/star/wizards/web/CallWizard.java | 7 +- wizards/com/sun/star/wizards/web/FTPDialog.java | 22 +- wizards/com/sun/star/wizards/web/IconsDialog.java | 5 +- .../com/sun/star/wizards/web/ImageListDialog.java | 10 +- .../com/sun/star/wizards/web/LogTaskListener.java | 3 +- wizards/com/sun/star/wizards/web/Process.java | 15 +- wizards/com/sun/star/wizards/web/StatusDialog.java | 2 +- wizards/com/sun/star/wizards/web/StylePreview.java | 5 +- wizards/com/sun/star/wizards/web/TOCPreview.java | 5 +- wizards/com/sun/star/wizards/web/WWD_Events.java | 38 +- wizards/com/sun/star/wizards/web/WWD_General.java | 6 +- wizards/com/sun/star/wizards/web/WWD_Startup.java | 20 +- .../com/sun/star/wizards/web/WebWizardDialog.java | 16 +- .../com/sun/star/wizards/web/data/CGDocument.java | 72 +- .../com/sun/star/wizards/web/data/CGExporter.java | 5 +- .../com/sun/star/wizards/web/data/CGPublish.java | 5 +- .../com/sun/star/wizards/web/data/CGSettings.java | 6 +- wizards/com/sun/star/wizards/web/data/CGStyle.java | 4 +- 117 files changed, 1123 insertions(+), 1083 deletions(-) diff --git a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java index 2d7174bdb69f..09d2fb9831b5 100644 --- a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java +++ b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java @@ -235,7 +235,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data { try { - itemsTables[i].write(""); + itemsTables[i].write(PropertyNames.EMPTY_STRING); } catch (Exception ex) { @@ -665,16 +665,16 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data private void writeTitle(TextElement te, XTextRange tr, String text) { - te.text = (text == null ? "" : text); + te.text = (text == null ? PropertyNames.EMPTY_STRING : text); te.write(tr); } private static long DAY_IN_MILLIS = (24 * 60 * 60 * 1000); private String getDateString(String d) { - if (d == null || d.equals("")) + if (d == null || d.equals(PropertyNames.EMPTY_STRING)) { - return ""; + return PropertyNames.EMPTY_STRING; } int date = new Integer(d).intValue(); calendar.clear(); @@ -694,9 +694,9 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data private String getTimeString(String s) { - if (s == null || s.equals("")) + if (s == null || s.equals(PropertyNames.EMPTY_STRING)) { - return ""; + return PropertyNames.EMPTY_STRING; } int time = new Integer(s).intValue(); @@ -733,7 +733,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data boolean visible = ((Boolean) Helper.getUnoPropertyValue(section, "IsVisible")).booleanValue(); if (!visible) { - ((XTextContent) UnoRuntime.queryInterface(XTextContent.class, section)).getAnchor().setString(""); + ((XTextContent) UnoRuntime.queryInterface(XTextContent.class, section)).getAnchor().setString(PropertyNames.EMPTY_STRING); } } } @@ -760,7 +760,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data { Object minutesAllSection = getSection(SECTION_MINUTES_ALL); XTextSection xTextSection = (XTextSection) UnoRuntime.queryInterface(XTextSection.class, minutesAllSection); - xTextSection.getAnchor().setString(""); + xTextSection.getAnchor().setString(PropertyNames.EMPTY_STRING); } catch (Exception ex) { @@ -831,15 +831,15 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data if (itemText.equals(FILLIN_MINUTE_NUM)) { - fillMinutesItem(item, topic[0].Value, ""); + fillMinutesItem(item, topic[0].Value, PropertyNames.EMPTY_STRING); } else if (itemText.equals(FILLIN_MINUTE_TOPIC)) { - fillMinutesItem(item, topic[1].Value, ""); + fillMinutesItem(item, topic[1].Value, PropertyNames.EMPTY_STRING); } else if (itemText.equals(FILLIN_MINUTE_RESPONSIBLE)) { - fillMinutesItem(item, topic[2].Value, ""); + fillMinutesItem(item, topic[2].Value, PropertyNames.EMPTY_STRING); } else if (itemText.equals(FILLIN_MINUTE_TIME)) { @@ -863,7 +863,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data topicStartTime += topicTime * 1000; time += getTimeString(String.valueOf(topicStartTime)); } - fillMinutesItem(item, time, ""); + fillMinutesItem(item, time, PropertyNames.EMPTY_STRING); } } @@ -889,16 +889,16 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data * If the given text is empty, uses a placeholder with the giveb placeholder text. * @param range text range to fill * @param text the text to fill to the text range object. - * @param placeholder the placeholder text to use, if the text argument is empty (null or "") + * @param placeholder the placeholder text to use, if the text argument is empty (null or PropertyNames.EMPTY_STRING) */ private void fillMinutesItem(XTextRange range, Object text, String placeholder) { String paraStyle = (String) Helper.getUnoPropertyValue(range, "ParaStyleName"); range.setString((String) text); Helper.setUnoPropertyValue(range, "ParaStyleName", paraStyle); - if (text == null || text.equals("")) + if (text == null || text.equals(PropertyNames.EMPTY_STRING)) { - if (placeholder != null && !placeholder.equals("")) + if (placeholder != null && !placeholder.equals(PropertyNames.EMPTY_STRING)) { XTextContent placeHolder = createPlaceHolder(docMSF, placeholder, resources.resPlaceHolderHint); try @@ -1024,7 +1024,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data // write items // =========== - String cellName = ""; + String cellName = PropertyNames.EMPTY_STRING; /* now go through all items that belong to this * table. Check each one agains the model. If it should @@ -1072,7 +1072,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data while ((!cellName.equals(cursor.getRangeName()) && (!cursor.getRangeName().startsWith("A")))) { cell = xTextTable.getCellByName(cursor.getRangeName()); - ((XTextRange) UnoRuntime.queryInterface(XTextRange.class, cell)).setString(""); + ((XTextRange) UnoRuntime.queryInterface(XTextRange.class, cell)).setString(PropertyNames.EMPTY_STRING); cellName = cursor.getRangeName(); cursor.goRight((short) 1, false); } @@ -1316,7 +1316,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data { writtenTopics.add(null); } - writtenTopics.set(topic, ""); + writtenTopics.set(topic, PropertyNames.EMPTY_STRING); // make sure threr are enough rows for me... int rows = getRowCount(table); @@ -1764,7 +1764,7 @@ class TextElement extends ParaStyled public void write(Object textRange) { ((XTextRange) UnoRuntime.queryInterface(XTextRange.class, textRange)).setString(text); - if (!text.equals("")) + if (!text.equals(PropertyNames.EMPTY_STRING)) { super.write(textRange); } @@ -1772,7 +1772,7 @@ class TextElement extends ParaStyled } /** - * A Text element which, if the text to write is empty (null or "") + * A Text element which, if the text to write is empty (null or PropertyNames.EMPTY_STRING) * inserts a placeholder instead. * @author rp143992 * @@ -1805,7 +1805,7 @@ class PlaceholderTextElement extends TextElement public void write(Object textRange) { super.write(textRange); - if (text == null || text.equals("")) + if (text == null || text.equals(PropertyNames.EMPTY_STRING)) { XTextRange xTextRange = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, textRange); try diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.java b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.java index ab600176080d..397985c2a937 100644 --- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.java +++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.java @@ -105,7 +105,7 @@ public abstract class AgendaWizardDialog extends WizardDialog implements Agenda XButton btnUp; XButton btnDown; - final private String IMGHELP1_HID = ""; + final private String IMGHELP1_HID = PropertyNames.EMPTY_STRING; //Font Descriptors as Class members. @@ -117,7 +117,7 @@ public abstract class AgendaWizardDialog extends WizardDialog implements Agenda AgendaWizardDialogResources resources; private String[] PROPS_LIST = new String[] {"Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}; - private String[] PROPS_LABEL_B = new String[] {"FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}; + private String[] PROPS_LABEL_B = new String[] {PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}; private String[] PROPS_CHECK = new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}; private String[] PROPS_BUTTON = new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}; private String[] PROPS_X = new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}; diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java index 50ee492f8c78..96f8d53eafff 100644 --- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java +++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java @@ -50,6 +50,7 @@ import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.NoValidPathException; import com.sun.star.wizards.common.SystemDialog; import com.sun.star.wizards.common.HelpIds; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.document.OfficeDocument; import com.sun.star.wizards.text.ViewHandler; import com.sun.star.wizards.ui.PathSelection; @@ -172,7 +173,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog // synchronize GUI and CGAgenda object. makeDA(); - if(myPathSelection.xSaveTextBox.getText().equalsIgnoreCase("")) {myPathSelection.initializePath();} + if(myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING)) {myPathSelection.initializePath();} executeDialog(agendaTemplate.xFrame); removeTerminateListener(); @@ -212,7 +213,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog private void initializePaths() { try { sTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard"); - sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", ""); + sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", PropertyNames.EMPTY_STRING); sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../wizard/bitmap"); } catch (NoValidPathException e) { e.printStackTrace(); @@ -221,14 +222,14 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog private void checkSavePath() { if (agenda.cp_TemplatePath == null || - agenda.cp_TemplatePath.equals("") || + agenda.cp_TemplatePath.equals(PropertyNames.EMPTY_STRING) || !getFileAccess().exists(FileAccess.getParentDir(agenda.cp_TemplatePath),false) || !getFileAccess().isDirectory(FileAccess.getParentDir(agenda.cp_TemplatePath ))) { try { agenda.cp_TemplatePath = FileAccess.connectURLs( - FileAccess.getOfficePath(xMSF, "Work", "", "") , + FileAccess.getOfficePath(xMSF, "Work", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING) , resources.resDefaultFilename ); } @@ -243,7 +244,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog */ private void makeDA() { - setControlProperty("listPageDesign", "StringItemList", agendaTemplates[0]); + setControlProperty("listPageDesign", PropertyNames.STRING_ITEM_LIST, agendaTemplates[0]); checkSavePath(); //setFilename(agenda.cp_TemplatePath); @@ -420,7 +421,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog */ private void setFilename(String url) { try { - String path = getFileAccess().getPath(url,""); + String path = getFileAccess().getPath(url,PropertyNames.EMPTY_STRING); Helper.setUnoPropertyValue( getModel(myPathSelection.xSaveTextBox), "Text", path); } catch (Exception ex) { @@ -463,7 +464,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog try { FileAccess fileAccess = new FileAccess(xMSF); sPath = myPathSelection.getSelectedPath(); - if (sPath.equals("")) { + if (sPath.equals(PropertyNames.EMPTY_STRING)) { myPathSelection.triggerPathPicker(); sPath = myPathSelection.getSelectedPath(); } diff --git a/wizards/com/sun/star/wizards/agenda/CGAgenda.java b/wizards/com/sun/star/wizards/agenda/CGAgenda.java index b7dc1cc37c00..d64ec8372bd3 100644 --- a/wizards/com/sun/star/wizards/agenda/CGAgenda.java +++ b/wizards/com/sun/star/wizards/agenda/CGAgenda.java @@ -28,6 +28,7 @@ package com.sun.star.wizards.agenda; import com.sun.star.wizards.common.ConfigGroup; import com.sun.star.wizards.common.ConfigSet; +import com.sun.star.wizards.common.PropertyNames; /** * CGAgenda means Configuration Group Agenda. @@ -43,13 +44,13 @@ public class CGAgenda extends ConfigGroup /** step 1 - include minutes*/ public boolean cp_IncludeMinutes; /** step 2 - title */ - public String cp_Title = ""; + public String cp_Title = PropertyNames.EMPTY_STRING; /** step 2 - date */ public String cp_Date; /** step 2 - time */ public String cp_Time; /** step 2 - location */ - public String cp_Location = ""; + public String cp_Location = PropertyNames.EMPTY_STRING; /** step 3 - show meeting type */ public boolean cp_ShowMeetingType; /** step 3 - show read */ diff --git a/wizards/com/sun/star/wizards/agenda/CGTopic.java b/wizards/com/sun/star/wizards/agenda/CGTopic.java index 74b818205b9f..6ef5ac21e3ea 100644 --- a/wizards/com/sun/star/wizards/agenda/CGTopic.java +++ b/wizards/com/sun/star/wizards/agenda/CGTopic.java @@ -30,6 +30,7 @@ package com.sun.star.wizards.agenda; import com.sun.star.beans.PropertyValue; import com.sun.star.wizards.common.ConfigGroup; import com.sun.star.wizards.common.Indexable; +import com.sun.star.wizards.common.PropertyNames; /** * CGTopic means: Configuration Group Topic. @@ -74,7 +75,7 @@ public class CGTopic extends ConfigGroup implements Indexable { */ public void setDataToRow(Object row) { PropertyValue[] pv = (PropertyValue[])row; - pv[0].Value = "" + cp_Index + "."; + pv[0].Value = PropertyNames.EMPTY_STRING + cp_Index + "."; pv[1].Value = cp_Topic; pv[2].Value = cp_Responsible; pv[3].Value = cp_Time; diff --git a/wizards/com/sun/star/wizards/agenda/CallWizard.java b/wizards/com/sun/star/wizards/agenda/CallWizard.java index 3dc8dcd8ef91..ae19b4ef311d 100644 --- a/wizards/com/sun/star/wizards/agenda/CallWizard.java +++ b/wizards/com/sun/star/wizards/agenda/CallWizard.java @@ -37,6 +37,7 @@ import com.sun.star.registry.XRegistryKey; import com.sun.star.task.XJob; import com.sun.star.task.XJobExecutor; import com.sun.star.uno.Type; +import com.sun.star.wizards.common.PropertyNames; /** * This class capsulates the class, that implements the minimal component, a factory for @@ -100,7 +101,7 @@ public class CallWizard { public void trigger(String str) { try { - if (str.equalsIgnoreCase("start")) { + if (str.equalsIgnoreCase(PropertyNames.START)) { AgendaWizardDialogImpl aw = new AgendaWizardDialogImpl(xmultiservicefactory); if (!AgendaWizardDialogImpl.running) { aw.startWizard(); @@ -184,7 +185,7 @@ public class CallWizard { }; try { - byteReturn = ("" + this.hashCode()).getBytes(); + byteReturn = (PropertyNames.EMPTY_STRING + this.hashCode()).getBytes(); } catch (Exception exception) { System.err.println(exception); } diff --git a/wizards/com/sun/star/wizards/agenda/TopicsControl.java b/wizards/com/sun/star/wizards/agenda/TopicsControl.java index 25f0cf9103a0..2361176f861f 100644 --- a/wizards/com/sun/star/wizards/agenda/TopicsControl.java +++ b/wizards/com/sun/star/wizards/agenda/TopicsControl.java @@ -304,7 +304,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener } /** - * in order to use the "move up", "down" "insert" and "remove" buttons, + * in order to use the "move up", "downPropertyNames.SPACEinsert" and "remove" buttons, * we track the last control the gained focus, in order to know which * row should be handled. * @param fe @@ -463,9 +463,9 @@ public class TopicsControl extends ControlScroller implements XFocusListener // after rotating all the properties from this row on, // we clear the row, so it is practically a new one... PropertyValue[] pv1 = (PropertyValue[]) scrollfields.get(lastFocusRow); - pv1[1].Value = ""; - pv1[2].Value = ""; - pv1[3].Value = ""; + pv1[1].Value = PropertyNames.EMPTY_STRING; + pv1[2].Value = PropertyNames.EMPTY_STRING; + pv1[3].Value = PropertyNames.EMPTY_STRING; // update the preview document. updateDocumentRow(lastFocusRow); @@ -487,10 +487,10 @@ public class TopicsControl extends ControlScroller implements XFocusListener private PropertyValue[] newRow(int i) { PropertyValue[] pv = new PropertyValue[4]; - pv[0] = Properties.createProperty(LABEL + i, "" + (i + 1) + "."); - pv[1] = Properties.createProperty(TOPIC + i, ""); - pv[2] = Properties.createProperty(RESP + i, ""); - pv[3] = Properties.createProperty(TIME + i, ""); + pv[0] = Properties.createProperty(LABEL + i, PropertyNames.EMPTY_STRING + (i + 1) + "."); + pv[1] = Properties.createProperty(TOPIC + i, PropertyNames.EMPTY_STRING); + pv[2] = Properties.createProperty(RESP + i, PropertyNames.EMPTY_STRING); + pv[3] = Properties.createProperty(TIME + i, PropertyNames.EMPTY_STRING); return pv; } @@ -536,9 +536,9 @@ public class TopicsControl extends ControlScroller implements XFocusListener PropertyValue[] data = getTopicData(row); // now - is this row empty? - return data[1].Value.equals("") && - data[2].Value.equals("") && - data[3].Value.equals(""); + return data[1].Value.equals(PropertyNames.EMPTY_STRING) && + data[2].Value.equals(PropertyNames.EMPTY_STRING) && + data[3].Value.equals(PropertyNames.EMPTY_STRING); } /** @@ -1173,7 +1173,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener LABEL_PROPS, new Object[] { - I_8, "" + (i + 1) + ".", new Integer(x + 4), new Integer(y + 2), IStep, new Short((short) tabindex), 10 + I_8, PropertyNames.EMPTY_STRING + (i + 1) + ".", new Integer(x + 4), new Integer(y + 2), IStep, new Short((short) tabindex), 10 }); textbox = dialog.insertTextField(TOPIC + i, "topicTextChanged", this, diff --git a/wizards/com/sun/star/wizards/common/ConfigSet.java b/wizards/com/sun/star/wizards/common/ConfigSet.java index 216f91b5e430..7684de5e10ce 100644 --- a/wizards/com/sun/star/wizards/common/ConfigSet.java +++ b/wizards/com/sun/star/wizards/common/ConfigSet.java @@ -90,11 +90,11 @@ public class ConfigSet implements ConfigNode, XMLProvider, ListModel public void add(int i, Object o) { int name = i; - while (getElement("" + name) != null) + while (getElement(PropertyNames.EMPTY_STRING + name) != null) { name++; } - childrenMap.put("" + name, o); + childrenMap.put(PropertyNames.EMPTY_STRING + name, o); childrenList.add(i, o); fireListDataListenerIntervalAdded(i, i); diff --git a/wizards/com/sun/star/wizards/common/Configuration.java b/wizards/com/sun/star/wizards/common/Configuration.java index 04dd385ddf60..a95e773649b1 100644 --- a/wizards/com/sun/star/wizards/common/Configuration.java +++ b/wizards/com/sun/star/wizards/common/Configuration.java @@ -97,7 +97,7 @@ public abstract class Configuration Object o = getNode(name, parent); if (AnyConverter.isVoid(o)) { - return ""; + return PropertyNames.EMPTY_STRING; } return (String) o; } @@ -213,7 +213,7 @@ public abstract class Configuration public static String getOfficeLocaleString(XMultiServiceFactory xMSF) { - String sLocale = ""; + String sLocale = PropertyNames.EMPTY_STRING; try { Locale aLocLocale = new Locale(); diff --git a/wizards/com/sun/star/wizards/common/Desktop.java b/wizards/com/sun/star/wizards/common/Desktop.java index 8902696c37b4..0f9bfbf0939d 100644 --- a/wizards/com/sun/star/wizards/common/Desktop.java +++ b/wizards/com/sun/star/wizards/common/Desktop.java @@ -161,7 +161,7 @@ public class Desktop public static void dispatchURL(XMultiServiceFactory xMSF, String sURL, XFrame xFrame) { - dispatchURL(xMSF, sURL, xFrame, ""); + dispatchURL(xMSF, sURL, xFrame, PropertyNames.EMPTY_STRING); } public static void dispatchURL(XDispatch _xDispatch, com.sun.star.util.URL oURL) @@ -190,7 +190,7 @@ public class Desktop { boolean bElementexists = true; int i = 1; - String sIncSuffix = ""; + String sIncSuffix = PropertyNames.EMPTY_STRING; String BaseName = ElementName; while (bElementexists == true) { @@ -212,7 +212,7 @@ public class Desktop { boolean bElementexists = true; int i = 1; - String sIncSuffix = ""; + String sIncSuffix = PropertyNames.EMPTY_STRING; String BaseName = ElementName; while (bElementexists == true) { @@ -238,7 +238,7 @@ public class Desktop int nContFlags = nStartFlags; Object ocharservice = _xMSF.createInstance("com.sun.star.i18n.CharacterClassification"); XCharacterClassification xCharacterClassification = (XCharacterClassification) UnoRuntime.queryInterface(XCharacterClassification.class, ocharservice); - ParseResult aResult = xCharacterClassification.parsePredefinedToken(KParseType.IDENTNAME, _sString, 0, _aLocale, nStartFlags, "", nContFlags, " "); + ParseResult aResult = xCharacterClassification.parsePredefinedToken(KParseType.IDENTNAME, _sString, 0, _aLocale, nStartFlags, PropertyNames.EMPTY_STRING, nContFlags, PropertyNames.SPACE); return aResult.EndPos; } catch (Exception e) @@ -258,7 +258,7 @@ public class Desktop if (i < snewname.length()) { String sspecialchar = snewname.substring(i, i + 1); - snewname = JavaTools.replaceSubString(snewname, "", sspecialchar); + snewname = JavaTools.replaceSubString(snewname, PropertyNames.EMPTY_STRING, sspecialchar); } } return snewname; @@ -322,7 +322,7 @@ public class Desktop } scompname = _sElementName + _sSuffixSeparator + a++; } - return ""; + return PropertyNames.EMPTY_STRING; } /** @@ -377,9 +377,9 @@ public class Desktop try { TemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard"); - UserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", ""); + UserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", PropertyNames.EMPTY_STRING); BitmapPath = FileAccess.combinePaths(xMSF, TemplatePath, "/../wizard/bitmap"); - WorkPath = FileAccess.getOfficePath(xMSF, "Work", "", ""); + WorkPath = FileAccess.getOfficePath(xMSF, "Work", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING); } catch (NoValidPathException nopathexception) { @@ -397,20 +397,20 @@ public class Desktop catch (NoValidPathException nopathexception) { } - return ""; + return PropertyNames.EMPTY_STRING; } public static String getUserTemplatePath(XMultiServiceFactory _xMSF) { try { - String sUserTemplatePath = FileAccess.getOfficePath(_xMSF, "Template", "user", ""); + String sUserTemplatePath = FileAccess.getOfficePath(_xMSF, "Template", "user", PropertyNames.EMPTY_STRING); return sUserTemplatePath; } catch (NoValidPathException nopathexception) { } - return ""; + return PropertyNames.EMPTY_STRING; } public static String getBitmapPath(XMultiServiceFactory _xMSF) @@ -423,20 +423,20 @@ public class Desktop catch (NoValidPathException nopathexception) { } - return ""; + return PropertyNames.EMPTY_STRING; } public static String getWorkPath(XMultiServiceFactory _xMSF) { try { - String sWorkPath = FileAccess.getOfficePath(_xMSF, "Work", "", ""); + String sWorkPath = FileAccess.getOfficePath(_xMSF, "Work", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING); return sWorkPath; } catch (NoValidPathException nopathexception) { } - return ""; + return PropertyNames.EMPTY_STRING; } public static XStringSubstitution createStringSubstitution(XMultiServiceFactory xMSF) diff --git a/wizards/com/sun/star/wizards/common/FileAccess.java b/wizards/com/sun/star/wizards/common/FileAccess.java index 6278d7e71a97..1b5e91c6c58b 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.java +++ b/wizards/com/sun/star/wizards/common/FileAccess.java @@ -74,22 +74,22 @@ public class FileAccess String ResultPath = getOfficePath(xMSF, sPath, xSimpleFileAccess); // As there are several conventions about the look of Url (e.g. with " " or with "%20") you cannot make a // simple String comparison to find out, if a path is already in "ResultPath" - String[] PathList = JavaTools.ArrayoutofString(ResultPath, ";"); + String[] PathList = JavaTools.ArrayoutofString(ResultPath, PropertyNames.SEMI_COLON); int MaxIndex = PathList.length - 1; String CompCurPath; // sAddPath.replace(null, (char) 47); - String CompAddPath = JavaTools.replaceSubString(sAddPath, "", "/"); + String CompAddPath = JavaTools.replaceSubString(sAddPath, PropertyNames.EMPTY_STRING, "/"); String CurPath; for (int i = 0; i <= MaxIndex; i++) { CurPath = JavaTools.convertfromURLNotation(PathList[i]); - CompCurPath = JavaTools.replaceSubString(CurPath, "", "/"); + CompCurPath = JavaTools.replaceSubString(CurPath, PropertyNames.EMPTY_STRING, "/"); if (CompCurPath.equals(CompAddPath)) { return; } } - ResultPath += ";" + sAddPath; + ResultPath += PropertyNames.SEMI_COLON + sAddPath; return; } @@ -117,7 +117,7 @@ public class FileAccess { try { - String ResultPath = ""; + String ResultPath = PropertyNames.EMPTY_STRING; XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.util.PathSettings"); ResultPath = com.sun.star.uno.AnyConverter.toString(Helper.getUnoPropertyValue(xInterface, sPath)); ResultPath = deleteLastSlashfromUrl(ResultPath); @@ -126,7 +126,7 @@ public class FileAccess catch (Exception exception) { exception.printStackTrace(System.out); - return ""; + return PropertyNames.EMPTY_STRING; } } @@ -135,7 +135,7 @@ public class FileAccess * chapter 6.2.7 * @param xMSF * @param sPath - * @param sType use "share" or "user". Set to "" if not needed eg for the WorkPath; + * @param sType use "share" or "user". Set to PropertyNames.EMPTY_STRING if not needed eg for the WorkPath; * In the return Officepath a possible slash at the end is cut off * @param sSearchDir * @return @@ -145,9 +145,9 @@ public class FileAccess { //This method currently only works with sPath="Template" - String ResultPath = ""; + String ResultPath = PropertyNames.EMPTY_STRING; - String Template_writable = ""; + String Template_writable = PropertyNames.EMPTY_STRING; String[] Template_internal; String[] Template_user; @@ -156,7 +156,7 @@ public class FileAccess { XInterface xPathInterface = (XInterface) xMSF.createInstance("com.sun.star.util.PathSettings"); XPropertySet xPropertySet = (XPropertySet) com.sun.star.uno.UnoRuntime.queryInterface(XPropertySet.class, xPathInterface); - String WritePath = ""; + String WritePath = PropertyNames.EMPTY_STRING; String[] ReadPaths = null; XInterface xUcbInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface); @@ -204,11 +204,11 @@ public class FileAccess catch (Exception exception) { exception.printStackTrace(System.out); - ResultPath = ""; + ResultPath = PropertyNames.EMPTY_STRING; } if (bexists == false) { - throw new NoValidPathException(xMSF, ""); + throw new NoValidPathException(xMSF, PropertyNames.EMPTY_STRING); } return ResultPath; } @@ -217,9 +217,9 @@ public class FileAccess { //This method currently only works with sPath="Template" - // String ResultPath = ""; + // String ResultPath = PropertyNames.EMPTY_STRING; ArrayList aPathList = new ArrayList(); - String Template_writable = ""; + String Template_writable = PropertyNames.EMPTY_STRING; String[] Template_internal; String[] Template_user; @@ -230,7 +230,7 @@ public class FileAccess { XInterface xPathInterface = (XInterface) xMSF.createInstance("com.sun.star.util.PathSettings"); XPropertySet xPropertySet = (XPropertySet) com.sun.star.uno.UnoRuntime.queryInterface(XPropertySet.class, xPathInterface); - // String WritePath = ""; + // String WritePath = PropertyNames.EMPTY_STRING; // XInterface xUcbInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); // XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface); @@ -288,11 +288,11 @@ public class FileAccess catch (Exception exception) { exception.printStackTrace(System.out); - // ResultPath = ""; + // ResultPath = PropertyNames.EMPTY_STRING; } // if (bexists == false) // { -// throw new NoValidPathException(xMSF, ""); +// throw new NoValidPathException(xMSF, PropertyNames.EMPTY_STRING); // } // return ResultPath; return aPathList; @@ -374,7 +374,7 @@ public class FileAccess /* public static String getOfficePath(XMultiServiceFactory xMSF, String sPath, String sType) throws NoValidPathException { - String ResultPath = ""; + String ResultPath = PropertyNames.EMPTY_STRING; Object oPathSettings; int iPathCount; String[] PathList; @@ -383,10 +383,10 @@ public class FileAccess XInterface xUcbInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface); ResultPath = getOfficePath(xMSF, sPath, xSimpleFileAccess); - PathList = JavaTools.ArrayoutofString(ResultPath, ";"); - if (!sType.equals("")) { - ResultPath = ""; - String CurPath = ""; + PathList = JavaTools.ArrayoutofString(ResultPath, PropertyNames.SEMI_COLON); + if (!sType.equals(PropertyNames.EMPTY_STRING)) { + ResultPath = PropertyNames.EMPTY_STRING; + String CurPath = PropertyNames.EMPTY_STRING; String EndString = "/" + sType; int EndLength = EndString.length(); sType = "/" + sType + "/"; @@ -403,11 +403,11 @@ public class FileAccess } } else ResultPath = PathList[0]; - if (ResultPath.equals("") == false) + if (ResultPath.equals(PropertyNames.EMPTY_STRING) == false) bexists = xSimpleFileAccess.exists(ResultPath); } catch (Exception exception) { exception.printStackTrace(System.out); - ResultPath = ""; + ResultPath = PropertyNames.EMPTY_STRING; } if (bexists == false) throw new NoValidPathException(xMSF); @@ -452,7 +452,7 @@ public class FileAccess public static String combinePaths(XMultiServiceFactory xMSF, String _sFirstPath, String _sSecondPath) throws NoValidPathException { boolean bexists = false; - String ReturnPath = ""; + String ReturnPath = PropertyNames.EMPTY_STRING; try { XInterface xUcbInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); @@ -463,18 +463,18 @@ public class FileAccess catch (Exception exception) { exception.printStackTrace(System.out); - return ""; + return PropertyNames.EMPTY_STRING; } if (bexists == false) { - throw new NoValidPathException(xMSF, ""); + throw new NoValidPathException(xMSF, PropertyNames.EMPTY_STRING); } return ReturnPath; } public static boolean createSubDirectory(XMultiServiceFactory xMSF, XSimpleFileAccess xSimpleFileAccess, String Path) { - String sNoDirCreation = ""; + String sNoDirCreation = PropertyNames.EMPTY_STRING; try { Resource oResource = new Resource(xMSF, "ImportWizard", "imp"); @@ -516,7 +516,7 @@ public class FileAccess try { String SubDir; - String SubDirPath = ""; + String SubDirPath = PropertyNames.EMPTY_STRING; int SubLen; int NewLen; int RestLen; @@ -604,7 +604,7 @@ public class FileAccess */ public static String[][] getFolderTitles(com.sun.star.lang.XMultiServiceFactory xMSF, String FilterName, String FolderName) { - String[][] LocLayoutFiles = new String[2][]; //{"",""}{""}; + String[][] LocLayoutFiles = new String[2][]; //{PropertyNames.EMPTY_STRING,PropertyNames.EMPTY_STRING}{PropertyNames.EMPTY_STRING}; try { java.util.Vector TitleVector = null; @@ -621,9 +621,9 @@ public class FileAccess TitleVector = new java.util.Vector(/*nameList.length*/); NameVector = new java.util.Vector(nameList.length); - FilterName = FilterName == null || FilterName.equals("") ? null : FilterName + "-"; + FilterName = FilterName == null || FilterName.equals(PropertyNames.EMPTY_STRING) ? null : FilterName + "-"; - String fileName = ""; + String fileName = PropertyNames.EMPTY_STRING; PropertyValue[] noArgs = { }; for (int i = 0; i < nameList.length; i++) { @@ -676,7 +676,7 @@ public class FileAccess public static String getPathFromList(XMultiServiceFactory xMSF, ArrayList _aList, String _sFile) { - String sFoundFile = ""; + String sFoundFile = PropertyNames.EMPTY_STRING; try { XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); @@ -709,12 +709,12 @@ public class FileAccess public static String[][] getFolderTitles(com.sun.star.lang.XMultiServiceFactory xMSF, String _sStartFilterName, ArrayList FolderNames) throws NoValidPathException { - return getFolderTitles(xMSF, _sStartFilterName, FolderNames, ""); + return getFolderTitles(xMSF, _sStartFilterName, FolderNames, PropertyNames.EMPTY_STRING); } private static String getTitle(XMultiServiceFactory xMSF, String _sFile) { - String sTitle = ""; + String sTitle = PropertyNames.EMPTY_STRING; try { XInterface xDocInterface = (XInterface) xMSF.createInstance("com.sun.star.document.DocumentProperties"); @@ -732,7 +732,7 @@ public class FileAccess public static String[][] getFolderTitles(com.sun.star.lang.XMultiServiceFactory xMSF, String _sStartFilterName, ArrayList FolderName, String _sEndFilterName) throws NoValidPathException { - String[][] LocLayoutFiles = new String[2][]; //{"",""}{""}; + String[][] LocLayoutFiles = new String[2][]; //{PropertyNames.EMPTY_STRING,PropertyNames.EMPTY_STRING}{PropertyNames.EMPTY_STRING}; if (FolderName.size() == 0) { throw new NoValidPathException(null, "Path not given."); @@ -759,9 +759,9 @@ public class FileAccess try { String[] nameList = xSimpleFileAccess.getFolderContents(sFolderName, false); - _sStartFilterName = _sStartFilterName == null || _sStartFilterName.equals("") ? null : _sStartFilterName + "-"; + _sStartFilterName = _sStartFilterName == null || _sStartFilterName.equals(PropertyNames.EMPTY_STRING) ? null : _sStartFilterName + "-"; - String fileName = ""; + String fileName = PropertyNames.EMPTY_STRING; for (int i = 0; i < nameList.length; i++) { fileName = getFilename(nameList[i]); @@ -769,13 +769,13 @@ public class FileAccess if (_sStartFilterName == null || fileName.startsWith(_sStartFilterName)) { - if (_sEndFilterName.equals("")) + if (_sEndFilterName.equals(PropertyNames.EMPTY_STRING)) { sTitle = getTitle(xMSF, nameList[i]); } else if (fileName.endsWith(_sEndFilterName)) { - fileName = fileName.replaceAll(_sEndFilterName + "$", ""); + fileName = fileName.replaceAll(_sEndFilterName + "$", PropertyNames.EMPTY_STRING); sTitle = fileName; } else @@ -842,7 +842,7 @@ public class FileAccess public String getPath(String parentURL, String childURL) { - return filenameConverter.getSystemPathFromFileURL(parentURL + (((childURL == null || childURL.equals("")) ? "" : "/" + childURL))); + return filenameConverter.getSystemPathFromFileURL(parentURL + (((childURL == null || childURL.equals(PropertyNames.EMPTY_STRING)) ? PropertyNames.EMPTY_STRING : "/" + childURL))); } /** @@ -855,7 +855,7 @@ public class FileAccess int p = filename.indexOf("."); if (p == -1) { - return ""; + return PropertyNames.EMPTY_STRING; } else { @@ -1083,7 +1083,7 @@ public class FileAccess public String createNewDir(String parentDir, String name) { - String s = getNewFile(parentDir, name, ""); + String s = getNewFile(parentDir, name, PropertyNames.EMPTY_STRING); if (mkdir(s)) { return s; @@ -1112,7 +1112,7 @@ public class FileAccess private static String filename(String name, String ext, int i) { - return name + (i == 0 ? "" : String.valueOf(i)) + (ext.equals("") ? "" : "." + ext); + return name + (i == 0 ? PropertyNames.EMPTY_STRING : String.valueOf(i)) + (ext.equals(PropertyNames.EMPTY_STRING) ? PropertyNames.EMPTY_STRING : "." + ext); } public int getSize(String url) @@ -1129,7 +1129,7 @@ public class FileAccess public static String connectURLs(String urlFolder, String urlFilename) { - return urlFolder + (urlFolder.endsWith("/") ? "" : "/") + + return urlFolder + (urlFolder.endsWith("/") ? PropertyNames.EMPTY_STRING : "/") + (urlFilename.startsWith("/") ? urlFilename.substring(1) : urlFilename); } diff --git a/wizards/com/sun/star/wizards/common/HelpIds.java b/wizards/com/sun/star/wizards/common/HelpIds.java index ad8faa2b2d42..a3b577d1e52b 100644 --- a/wizards/com/sun/star/wizards/common/HelpIds.java +++ b/wizards/com/sun/star/wizards/common/HelpIds.java @@ -38,7 +38,7 @@ public class HelpIds "HID:WIZARDS_HID0_CANCEL", // HID:34205 "HID:WIZARDS_HID0_STATUS_DIALOG", // HID:34206 "HID:WIZARDS_HID1_LST_SESSIONS", // HID:34207 - "", + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID1_BTN_DEL_SES", // HID:34209 "HID:WIZARDS_HID2_LST_DOCS", // HID:34210 "HID:WIZARDS_HID2_BTN_ADD_DOC", // HID:34211 @@ -81,13 +81,13 @@ public class HelpIds "HID:WIZARDS_HID5_BTN_BACKGND", // HID:34248 "HID:WIZARDS_HID5_BTN_ICONS", // HID:34249 "HID:WIZARDS_HID6_TXT_SITE_TITLE", // HID:34250 - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID6_TXT_SITE_DESC", // HID:34253 - "", + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID6_DATE_SITE_CREATED", // HID:34255 "HID:WIZARDS_HID6_DATE_SITE_UPDATED", // HID:34256 - "", + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID6_TXT_SITE_EMAIL", // HID:34258 "HID:WIZARDS_HID6_TXT_SITE_COPYRIGHT", // HID:34259 "HID:WIZARDS_HID7_BTN_PREVIEW", // HID:34260 @@ -102,24 +102,24 @@ public class HelpIds "HID:WIZARDS_HID7_BTN_FTP", // HID:34269 "HID:WIZARDS_HID7_CHK_SAVE", // HID:34270 "HID:WIZARDS_HID7_TXT_SAVE", // HID:34271 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_BG", // HID:34290 "HID:WIZARDS_HID_BG_BTN_OTHER", // HID:34291 "HID:WIZARDS_HID_BG_BTN_NONE", // HID:34292 @@ -143,23 +143,23 @@ public class HelpIds "HID:WIZARDS_HID_BG_BTN_IMG14", // HID:34300 "HID:WIZARDS_HID_BG_BTN_IMG15", // HID:34311 "HID:WIZARDS_HID_BG_BTN_IMG16", // HID:34312 - "", - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGREPORT_DIALOG", // HID:34320 - "", + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGREPORT_0_CMDPREV", // HID:34322 "HID:WIZARDS_HID_DLGREPORT_0_CMDNEXT", // HID:34323 "HID:WIZARDS_HID_DLGREPORT_0_CMDFINISH", // HID:34324 "HID:WIZARDS_HID_DLGREPORT_0_CMDCANCEL", // HID:34325 - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGREPORT_1_LBTABLES", // HID:34330 "HID:WIZARDS_HID_DLGREPORT_1_FIELDSAVAILABLE", // HID:34331 "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVESELECTED", // HID:34332 @@ -169,7 +169,7 @@ public class HelpIds "HID:WIZARDS_HID_DLGREPORT_1_FIELDSSELECTED", // HID:34336 "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEUP", // HID:34337 "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEDOWN", // HID:34338 - "", + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGREPORT_2_GROUPING", // HID:34340 "HID:WIZARDS_HID_DLGREPORT_2_CMDGROUP", // HID:34341 "HID:WIZARDS_HID_DLGREPORT_2_CMDUNGROUP", // HID:34342 @@ -188,18 +188,18 @@ public class HelpIds "HID:WIZARDS_HID_DLGREPORT_3_SORT4", // HID:34355 "HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND4", // HID:34356 "HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND4", // HID:34357 - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGREPORT_4_TITLE", // HID:34362 "HID:WIZARDS_HID_DLGREPORT_4_DATALAYOUT", // HID:34363 "HID:WIZARDS_HID_DLGREPORT_4_PAGELAYOUT", // HID:34364 "HID:WIZARDS_HID_DLGREPORT_4_LANDSCAPE", // HID:34365 "HID:WIZARDS_HID_DLGREPORT_4_PORTRAIT", // HID:34366 - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGREPORT_5_OPTDYNTEMPLATE", // HID:34370 "HID:WIZARDS_HID_DLGREPORT_5_OPTSTATDOCUMENT", // HID:34371 "HID:WIZARDS_HID_DLGREPORT_5_TXTTEMPLATEPATH", // HID:34372 @@ -209,8 +209,8 @@ public class HelpIds "HID:WIZARDS_HID_DLGREPORT_5_TXTDOCUMENTPATH", // HID:34376 "HID:WIZARDS_HID_DLGREPORT_5_CMDDOCUMENTPATH", // HID:34377 "HID:WIZARDS_HID_DLGREPORT_5_CHKLINKTODB", // HID:34378 - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_1", // HID:34381 "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_2", // HID:34382 "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_3", // HID:34383 @@ -218,29 +218,29 @@ public class HelpIds "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_5", // HID:34385 "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_6", // HID:34386 "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_7", // HID:34387 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGFORM_DIALOG", // HID:34400 - "", + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGFORM_CMDPREV", // HID:34402 "HID:WIZARDS_HID_DLGFORM_CMDNEXT", // HID:34403 "HID:WIZARDS_HID_DLGFORM_CMDFINISH", // HID:34404 "HID:WIZARDS_HID_DLGFORM_CMDCANCEL", // HID:34405 - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGFORM_MASTER_LBTABLES", // HID:34411 "HID:WIZARDS_HID_DLGFORM_MASTER_FIELDSAVAILABLE", // HID:34412 "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVESELECTED", // HID:34413 @@ -250,17 +250,17 @@ public class HelpIds "HID:WIZARDS_HID_DLGFORM_MASTER_FIELDSSELECTED", // HID:34417 "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEUP", // HID:34418 "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEDOWN", // HID:34419 - "", + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGFORM_CHKCREATESUBFORM", // HID:34421 "HID:WIZARDS_HID_DLGFORM_OPTONEXISTINGRELATION", // HID:34422 "HID:WIZARDS_HID_DLGFORM_OPTSELECTMANUALLY", // HID:34423 "HID:WIZARDS_HID_DLGFORM_lstRELATIONS", // HID:34424 - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGFORM_SUB_LBTABLES", // HID:34431 "HID:WIZARDS_HID_DLGFORM_SUB_FIELDSAVAILABLE", // HID:34432 "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVESELECTED", // HID:34433 @@ -270,7 +270,7 @@ public class HelpIds "HID:WIZARDS_HID_DLGFORM_SUB_FIELDSSELECTED", // HID:34437 "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEUP", // HID:34438 "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEDOWN", // HID:34439 - "", + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK1", // HID:34441 "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK1", // HID:34442 "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK2", // HID:34443 @@ -279,8 +279,8 @@ public class HelpIds "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK3", // HID:34446 "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK4", // HID:34447 "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK4", // HID:34448 - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGFORM_CMDALIGNLEFT", // HID:34451 "HID:WIZARDS_HID_DLGFORM_CMDALIGNRIGHT", // HID:34452 "HID:WIZARDS_HID_DLGFORM_CMDLEFTLABELED", // HID:34453 @@ -296,40 +296,40 @@ public class HelpIds "HID:WIZARDS_HID_DLGFORM_CHKNOMODIFICATION", // HID:34463 "HID:WIZARDS_HID_DLGFORM_CHKNODELETION", // HID:34464 "HID:WIZARDS_HID_DLGFORM_CHKNOADDITION", // HID:34465 - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGFORM_LSTSTYLES", // HID:34471 "HID:WIZARDS_HID_DLGFORM_CMDNOBORDER", // HID:34472 "HID:WIZARDS_HID_DLGFORM_CMD3DBORDER", // HID:34473 "HID:WIZARDS_HID_DLGFORM_CMDSIMPLEBORDER", // HID:34474 - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGFORM_TXTPATH", // HID:34481 "HID:WIZARDS_HID_DLGFORM_OPTWORKWITHFORM", // HID:34482 "HID:WIZARDS_HID_DLGFORM_OPTMODIFYFORM", // HID:34483 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGNEWSLTR_DIALOG", // HID:34500 "HID:WIZARDS_HID_DLGNEWSLTR_OPTSTANDARDLAYOUT", // HID:34501 "HID:WIZARDS_HID_DLGNEWSLTR_OPTPARTYLAYOUT", // HID:34502 @@ -337,19 +337,19 @@ public class HelpIds "HID:WIZARDS_HID_DLGNEWSLTR_OPTSINGLESIDED", // HID:34504 "HID:WIZARDS_HID_DLGNEWSLTR_OPTDOUBLESIDED", // HID:34505 "HID:WIZARDS_HID_DLGNEWSLTR_CMDGOON", // HID:34506 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGDEPOT_DIALOG_SELLBUY", // HID:34520 "HID:WIZARDS_HID_DLGDEPOT_0_TXTSTOCKID_SELLBUY", // HID:34521 "HID:WIZARDS_HID_DLGDEPOT_0_TXTQUANTITY", // HID:34522 @@ -381,25 +381,25 @@ public class HelpIds "HID:WIZARDS_HID_DLGDEPOT_LSTMARKETS", // HID:34548 "HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_HISTORY", // HID:34549 "HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_HISTORY", // HID:34550 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGIMPORT_DIALOG", // HID:34570 "HID:WIZARDS_HID_DLGIMPORT_0_CMDHELP", // HID:34571 "HID:WIZARDS_HID_DLGIMPORT_0_CMDCANCEL", // HID:34572 @@ -424,7 +424,7 @@ public class HelpIds "HID:WIZARDS_HID_DLGIMPORT_2_LBEXPORTDOCUMENTPATH", // HID:34591 "HID:WIZARDS_HID_DLGIMPORT_2_EDEXPORTDOCUMENTPATH", // HID:34592 "HID:WIZARDS_HID_DLGIMPORT_2_CMDEXPORTPATHSELECT", // HID:34593 - "", + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGIMPORT_3_TBSUMMARY", // HID:34595 "HID:WIZARDS_HID_DLGIMPORT_0_CHKWRITER", // HID:34596 "HID:WIZARDS_HID_DLGIMPORT_0_CHKCALC", // HID:34597 @@ -432,34 +432,34 @@ public class HelpIds "HID:WIZARDS_HID_DLGIMPORT_0_CHKMATHGLOBAL", // HID:34599 "HID:WIZARDS_HID_DLGIMPORT_2_CMDTEMPLATEPATHSELECT2", // HID:34600 "HID:WIZARDS_HID_DLGIMPORT_2_CMDDOCUMENTPATHSELECT2", // HID:34601 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGCORRESPONDENCE_DIALOG", // HID:34630 "HID:WIZARDS_HID_DLGCORRESPONDENCE_CANCEL", // HID:34631 "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONAGENDA1", // HID:34632 @@ -468,28 +468,28 @@ public class HelpIds "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER1", // HID:34635 "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER2", // HID:34636 "HID:WIZARDS_HID_DLGCORRESPONDENCE_LETTEROKAY", // HID:34637 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGSTYLES_DIALOG", // HID:34650 "HID:WIZARDS_HID_DLGSTYLES_LISTBOX", // HID:34651 "HID:WIZARDS_HID_DLGSTYLES_CANCEL", // HID:34652 "HID:WIZARDS_HID_DLGSTYLES_OKAY", // HID:34653 - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGCONVERT_DIALOG", // HID:34660 "HID:WIZARDS_HID_DLGCONVERT_CHECKBOX1", // HID:34661 "HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON1", // HID:34662 @@ -511,25 +511,25 @@ public class HelpIds "HID:WIZARDS_HID_DLGCONVERT_CBTARGETOPEN", // HID:34678 "HID:WIZARDS_HID_DLGCONVERT_CHKPROTECT", // HID:34679 "HID:WIZARDS_HID_DLGCONVERT_CHKTEXTDOCUMENTS", // HID:34680 - "", - "", - "", - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGPASSWORD_CMDGOON", // HID:34690 "HID:WIZARDS_HID_DLGPASSWORD_CMDCANCEL", // HID:34691 "HID:WIZARDS_HID_DLGPASSWORD_CMDHELP", // HID:34692 "HID:WIZARDS_HID_DLGPASSWORD_TXTPASSWORD", // HID:34693 - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGHOLIDAYCAL_DIALOG", // HID:34700 "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_PREVIEW", // HID:34701 "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_OPYEAR", // HID:34702 @@ -604,39 +604,39 @@ public class HelpIds "HID:WIZARDS_HID_LTRWIZ_OPTMAKECHANGES", // HID:40814 "HID:WIZARDS_HID_LTRWIZ_TXTPATH", // HID:40815 "HID:WIZARDS_HID_LTRWIZ_CMDPATH", // HID:40816 - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_LTRWIZARD", // HID:40820 "HID:WIZARDS_HID_LTRWIZARD_HELP", // HID:40821 "HID:WIZARDS_HID_LTRWIZARD_BACK", // HID:40822 "HID:WIZARDS_HID_LTRWIZARD_NEXT", // HID:40823 "HID:WIZARDS_HID_LTRWIZARD_CREATE", // HID:40824 "HID:WIZARDS_HID_LTRWIZARD_CANCEL", // HID:40825 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_QUERYWIZARD_LSTTABLES", // HID:40850 "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDS", // HID:40851 "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVESELECTED", // HID:40852 @@ -646,12 +646,12 @@ public class HelpIds "HID:WIZARDS_HID_QUERYWIZARD_LSTSELFIELDS", // HID:40856 "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEUP", // HID:40857 "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEDOWN", // HID:40858 - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_QUERYWIZARD_SORT1", // HID:40865 "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND1", // HID:40866 "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND1", // HID:40867 @@ -664,7 +664,7 @@ public class HelpIds "HID:WIZARDS_HID_QUERYWIZARD_SORT4", // HID:40874 "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND4", // HID:40875 "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND4", // HID:40876 - "", + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_QUERYWIZARD_OPTMATCHALL", // HID:40878 "HID:WIZARDS_HID_QUERYWIZARD_OPTMATCHANY", // HID:40879 "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_1", // HID:40880 @@ -676,12 +676,12 @@ public class HelpIds "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_3", // HID:40886 "HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_3", // HID:40887 "HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_3", // HID:40888 - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_QUERYWIZARD_OPTAGGREGATEDETAILQUERY", // HID:40895 "HID:WIZARDS_HID_QUERYWIZARD_OPTAGGREGATESUMMARYQUERY", // HID:40896 "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_1", // HID:40897 @@ -696,20 +696,20 @@ public class HelpIds "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_5", // HID:40906 "HID:WIZARDS_HID_QUERYWIZARD_BTNAGGREGATEPLUS", // HID:40907 "HID:WIZARDS_HID_QUERYWIZARD_BTNAGGREGATEMINUS", // HID:40908 - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDS", // HID:40915 "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVESELECTED", // HID:40916 "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERREMOVESELECTED", // HID:40917 "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERSELFIELDS", // HID:40918 "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEUP", // HID:40919 "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEDOWN", // HID:40920 - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_QUERYWIZARD_OPTGROUPMATCHALL", // HID:40923 "HID:WIZARDS_HID_QUERYWIZARD_OPTGROUPMATCHANY", // HID:40924 "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_1", // HID:40925 @@ -721,12 +721,12 @@ public class HelpIds "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_3", // HID:40931 "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_3", // HID:40932 "HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_3", // HID:40933 - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_1", // HID:40940 "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_2", // HID:40941 "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_3", // HID:40942 @@ -734,61 +734,61 @@ public class HelpIds "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_5", // HID:40944 "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_6", // HID:40945 "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_7", // HID:40946 - "", - "", - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_QUERYWIZARD_TXTQUERYTITLE", // HID:40955 "HID:WIZARDS_HID_QUERYWIZARD_OPTDISPLAYQUERY", // HID:40956 "HID:WIZARDS_HID_QUERYWIZARD_OPTMODIFYQUERY", // HID:40957 "HID:WIZARDS_HID_QUERYWIZARD_TXTSUMMARY", // HID:40958 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_QUERYWIZARD", // HID:40970 - "", + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_QUERYWIZARD_BACK", // HID:40972 "HID:WIZARDS_HID_QUERYWIZARD_NEXT", // HID:40973 "HID:WIZARDS_HID_QUERYWIZARD_CREATE", // HID:40974 "HID:WIZARDS_HID_QUERYWIZARD_CANCEL", // HID:40975 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_IS", // HID:41000 - "", + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_IS_BTN_NONE", // HID:41002 "HID:WIZARDS_HID_IS_BTN_OK", // HID:41003 "HID:WIZARDS_HID_IS_BTN_CANCEL", // HID:41004 @@ -824,9 +824,9 @@ public class HelpIds "HID:WIZARDS_HID_IS_BTN_IMG30", // HID:41034 "HID:WIZARDS_HID_IS_BTN_IMG31", // HID:41035 "HID:WIZARDS_HID_IS_BTN_IMG32", // HID:41036 - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_FTP", // HID:41040 "HID:WIZARDS_HID_FTP_SERVER", // HID:41041 "HID:WIZARDS_HID_FTP_USERNAME", // HID:41042 @@ -836,8 +836,8 @@ public class HelpIds "HID:WIZARDS_HID_FTP_BTN_PATH", // HID:41046 "HID:WIZARDS_HID_FTP_OK", // HID:41047 "HID:WIZARDS_HID_FTP_CANCEL", // HID:41048 - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_AGWIZ", // HID:41051 "HID:WIZARDS_HID_AGWIZ_HELP", // HID:41052 "HID:WIZARDS_HID_AGWIZ_NEXT", // HID:41053 @@ -886,27 +886,27 @@ public class HelpIds "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_5", // HID:41096 "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_5", // HID:41097 "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_5", // HID:41098 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_FAXWIZ_OPTBUSINESSFAX", // HID:41120 "HID:WIZARDS_HID_FAXWIZ_LSTBUSINESSSTYLE", // HID:41121 "HID:WIZARDS_HID_FAXWIZ_OPTPRIVATEFAX", // HID:41122 @@ -942,53 +942,53 @@ public class HelpIds "HID:WIZARDS_HID_IMAGECONTROL2", // HID:41152 "HID:WIZARDS_HID_FAXWIZ_TXTPATH", // HID:41153 "HID:WIZARDS_HID_FAXWIZ_CMDPATH", // HID:41154 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_FAXWIZARD", // HID:41180 "HID:WIZARDS_HID_FAXWIZARD_HELP", // HID:41181 "HID:WIZARDS_HID_FAXWIZARD_BACK", // HID:41182 "HID:WIZARDS_HID_FAXWIZARD_NEXT", // HID:41183 "HID:WIZARDS_HID_FAXWIZARD_CREATE", // HID:41184 "HID:WIZARDS_HID_FAXWIZARD_CANCEL", // HID:41185 - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGTABLE_DIALOG", // HID:41200 - "", + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGTABLE_CMDPREV", // HID:41202 "HID:WIZARDS_HID_DLGTABLE_CMDNEXT", // HID:41203 "HID:WIZARDS_HID_DLGTABLE_CMDFINISH", // HID:41204 @@ -1004,9 +1004,9 @@ public class HelpIds "HID:WIZARDS_HID_DLGTABLE_FIELDSSELECTED", // HID:41214 "HID:WIZARDS_HID_DLGTABLE_CMDMOVEUP", // HID:41215 "HID:WIZARDS_HID_DLGTABLE_CMDMOVEDOWN", // HID:41216 - "", - "", - "", + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, + PropertyNames.EMPTY_STRING, "HID:WIZARDS_HID_DLGTABLE_LB_SELFIELDNAMES", // HID:41220 "HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDUP", // HID:41221 "HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDDOWN", // HID:41222 diff --git a/wizards/com/sun/star/wizards/common/JavaTools.java b/wizards/com/sun/star/wizards/common/JavaTools.java index 836b2a7ea242..a05c3a6460f7 100644 --- a/wizards/com/sun/star/wizards/common/JavaTools.java +++ b/wizards/com/sun/star/wizards/common/JavaTools.java @@ -52,7 +52,7 @@ public class JavaTools /* public static void main(String args[]) { - String sPath = ""; + String sPath = PropertyNames.EMPTY_STRING; DateTime oDateTime = null; long n; String ConnectStr = "uno:socket,host=localhost,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.NamingService"; //localhost ;Lo-1.Germany.sun.com; 10.16.65.155 @@ -200,7 +200,7 @@ public class JavaTools public static String getlongestArrayItem(String[] StringArray) { - String sLongestItem = ""; + String sLongestItem = PropertyNames.EMPTY_STRING; int FieldCount = StringArray.length; int iOldLength = 0; int iCurLength = 0; @@ -218,17 +218,17 @@ public class JavaTools public static String ArraytoString(String[] LocArray) { - String ResultString = ""; + StringBuilder ResultString = new StringBuilder(PropertyNames.EMPTY_STRING); int iLen = LocArray.length; for (int i = 0; i < iLen; i++) { - ResultString += LocArray[i]; + ResultString.append(LocArray[i]); if (i < iLen - 1) { - ResultString += ";"; + ResultString.append(PropertyNames.SEMI_COLON); } } - return ResultString; + return ResultString.toString(); } /** @@ -377,7 +377,7 @@ public class JavaTools public static String[] ArrayoutofString(String MainString, String Token) { String[] StringArray; - if (MainString.equals("") == false) + if (MainString.equals(PropertyNames.EMPTY_STRING) == false) { Vector StringVector = new Vector(); String LocString = null; @@ -443,17 +443,17 @@ public class JavaTools { String sFilename = getFilenameOutOfPath(sPath); String[] FilenameList = ArrayoutofString(sFilename, "."); - String FileDescription = ""; + StringBuilder FileDescription = new StringBuilder(PropertyNames.EMPTY_STRING); for (int i = 0; i < FilenameList.length - 1; i++) { - FileDescription += FilenameList[i]; + FileDescription.append(FilenameList[i]); } - return FileDescription; + return FileDescription.toString(); } public static String convertfromURLNotation(String _sURLPath) { - String sPath = ""; + String sPath = PropertyNames.EMPTY_STRING; try { URL oJavaURL = new URL(_sURLPath); @@ -762,7 +762,7 @@ public class JavaTools { if (sSecondString != null) { - bissame = sSecondString.equals(""); + bissame = sSecondString.equals(PropertyNames.EMPTY_STRING); } else { @@ -771,7 +771,7 @@ public class JavaTools } else { - if (sFirstString.equals("")) + if (sFirstString.equals(PropertyNames.EMPTY_STRING)) { bissame = (sSecondString == null); } diff --git a/wizards/com/sun/star/wizards/common/NumericalHelper.java b/wizards/com/sun/star/wizards/common/NumericalHelper.java index 109affffd5ef..ff3795473fee 100644 --- a/wizards/com/sun/star/wizards/common/NumericalHelper.java +++ b/wizards/com/sun/star/wizards/common/NumericalHelper.java @@ -411,7 +411,7 @@ public class NumericalHelper // return toInt(_aValue); // } // catch(com.sun.star.lang.IllegalArgumentException e) { -// DebugHelper.exception(BasicErrorCode.SbERR_CONVERSION, ""); +// DebugHelper.exception(BasicErrorCode.SbERR_CONVERSION, PropertyNames.EMPTY_STRING); // return 0; // }} // @@ -421,8 +421,8 @@ public class NumericalHelper // return toString(_aValue); // } // catch(com.sun.star.lang.IllegalArgumentException e) { -// DebugHelper.exception(BasicErrorCode.SbERR_CONVERSION, ""); -// return ""; +// DebugHelper.exception(BasicErrorCode.SbERR_CONVERSION, PropertyNames.EMPTY_STRING); +// return PropertyNames.EMPTY_STRING; // }} // // @@ -431,7 +431,7 @@ public class NumericalHelper // return toInt(_aValue, _ndefaultValue); // } // catch(com.sun.star.uno.Exception e) { -// DebugHelper.exception(BasicErrorCode.SbERR_CONVERSION, ""); +// DebugHelper.exception(BasicErrorCode.SbERR_CONVERSION, PropertyNames.EMPTY_STRING); // return 0; // }} // @@ -445,7 +445,7 @@ public class NumericalHelper // return toBoolean(_oObject); // } // catch (java.lang.Exception e){ -// DebugHelper.exception(BasicErrorCode.SbERR_BAD_ARGUMENT, ""); +// DebugHelper.exception(BasicErrorCode.SbERR_BAD_ARGUMENT, PropertyNames.EMPTY_STRING); // return false; // } // } @@ -461,11 +461,11 @@ public class NumericalHelper // return false; // } // else{ -// DebugHelper.exception(BasicErrorCode.SbERR_OUT_OF_RANGE, ""); +// DebugHelper.exception(BasicErrorCode.SbERR_OUT_OF_RANGE, PropertyNames.EMPTY_STRING); // return false; // } // }catch (java.lang.Exception e){ -// DebugHelper.exception(BasicErrorCode.SbERR_OUT_OF_RANGE, ""); +// DebugHelper.exception(BasicErrorCode.SbERR_OUT_OF_RANGE, PropertyNames.EMPTY_STRING); // return false; // }} // @@ -489,12 +489,12 @@ public class NumericalHelper // return false; // } // else{ -// DebugHelper.exception(BasicErrorCode.SbERR_OUT_OF_RANGE, ""); +// DebugHelper.exception(BasicErrorCode.SbERR_OUT_OF_RANGE, PropertyNames.EMPTY_STRING); // return false; // } // } // }catch (java.lang.Exception e){ -// DebugHelper.exception(BasicErrorCode.SbERR_OUT_OF_RANGE, ""); +// DebugHelper.exception(BasicErrorCode.SbERR_OUT_OF_RANGE, PropertyNames.EMPTY_STRING); // return false; // }} /** @@ -983,13 +983,13 @@ public class NumericalHelper } else { - DebugHelper.exception(1/* BasicErrorCode.SbERR_CONVERSION*/, ""); + DebugHelper.exception(1/* BasicErrorCode.SbERR_CONVERSION*/, PropertyNames.EMPTY_STRING); } } } catch (com.sun.star.uno.Exception e) { - DebugHelper.exception(1 /*BasicErrorCode.SbERR_METHOD_FAILED*/, ""); + DebugHelper.exception(1 /*BasicErrorCode.SbERR_METHOD_FAILED*/, PropertyNames.EMPTY_STRING); } return nreturn; } @@ -1511,7 +1511,7 @@ public class NumericalHelper // } // } // catch (com.sun.star.uno.Exception e){ -// DebugHelper.exception(1 /*BasicErrorCode.SbERR_METHOD_FAILED*/, ""); +// DebugHelper.exception(1 /*BasicErrorCode.SbERR_METHOD_FAILED*/, PropertyNames.EMPTY_STRING); // return false; // }} /** @@ -1554,7 +1554,7 @@ public class NumericalHelper { if (n > MAX_NUMBER || n < MIN_NUMBER) { - DebugHelper.exception(1 /*BasicErrorCode.SbERR_OUT_OF_RANGE*/, ""); + DebugHelper.exception(1 /*BasicErrorCode.SbERR_OUT_OF_RANGE*/, PropertyNames.EMPTY_STRING); } String number = NumericalHelper.toString(new Integer(n)); /* converison idea: every digit is written with a maximum of two diff --git a/wizards/com/sun/star/wizards/common/PropertyNames.java b/wizards/com/sun/star/wizards/common/PropertyNames.java index 4361b2757773..bef4d4700864 100644 --- a/wizards/com/sun/star/wizards/common/PropertyNames.java +++ b/wizards/com/sun/star/wizards/common/PropertyNames.java @@ -51,4 +51,18 @@ public class PropertyNames public static String PROPERTY_MOVEABLE = "Moveable"; public static String PROPERTY_CLOSEABLE = "Closeable"; public static String PROPERTY_ALIGN = "Align"; + public static String COMMAND = "Command"; + public static String COMMAND_TYPE = "CommandType"; + public static String SELECTED_ITEMS = "SelectedItems"; + public static String URL = "URL"; + public static String ACTIVE_CONNECTION = "ActiveConnection"; + public static String ASC = "ASC"; + public static String SEMI_COLON = ";"; + public static String EMPTY_STRING = ""; + public static String START = "start"; + public static String ORIENTATION = "Orientation"; + public static String READ_ONLY = "ReadOnly"; + public static String SPACE = " "; + public static String STRING_ITEM_LIST = "StringItemList"; + public static String FONT_DESCRIPTOR = "FontDescriptor"; } diff --git a/wizards/com/sun/star/wizards/common/PropertySetHelper.java b/wizards/com/sun/star/wizards/common/PropertySetHelper.java index aec166a5c1c5..bdca296db552 100644 --- a/wizards/com/sun/star/wizards/common/PropertySetHelper.java +++ b/wizards/com/sun/star/wizards/common/PropertySetHelper.java @@ -371,7 +371,7 @@ public class PropertySetHelper */ public void showProperties() { - String sName = ""; + String sName = PropertyNames.EMPTY_STRING; if (m_xPropertySet != null) { diff --git a/wizards/com/sun/star/wizards/common/UCB.java b/wizards/com/sun/star/wizards/common/UCB.java index d49f006a0ca8..aa612ad5fef1 100644 --- a/wizards/com/sun/star/wizards/common/UCB.java +++ b/wizards/com/sun/star/wizards/common/UCB.java @@ -121,11 +121,11 @@ public class UCB */ public void copy(String sourceDir, String filename, String targetDir) throws Exception { - copy(sourceDir,filename, targetDir, ""); + copy(sourceDir,filename, targetDir, PropertyNames.EMPTY_STRING); } /** - * target name can be "", in which case the name stays lige the source name + * target name can be PropertyNames.EMPTY_STRING, in which case the name stays lige the source name * @param sourceDir * @param sourceFilename * @param targetDir diff --git a/wizards/com/sun/star/wizards/common/XMLHelper.java b/wizards/com/sun/star/wizards/common/XMLHelper.java index 326ba03fbeea..03af04a959f7 100644 --- a/wizards/com/sun/star/wizards/common/XMLHelper.java +++ b/wizards/com/sun/star/wizards/common/XMLHelper.java @@ -52,7 +52,7 @@ public class XMLHelper Element e = doc.createElement(name); for (int i = 0; i < attNames.length; i++) { - if (attValues[i] != null && (!attValues[i].equals(""))) + if (attValues[i] != null && (!attValues[i].equals(PropertyNames.EMPTY_STRING))) { e.setAttribute(attNames[i], attValues[i]); } diff --git a/wizards/com/sun/star/wizards/db/BlindtextCreator.java b/wizards/com/sun/star/wizards/db/BlindtextCreator.java index b52381def054..308eca03e121 100644 --- a/wizards/com/sun/star/wizards/db/BlindtextCreator.java +++ b/wizards/com/sun/star/wizards/db/BlindtextCreator.java @@ -27,6 +27,7 @@ package com.sun.star.wizards.db; import com.sun.star.wizards.common.JavaTools; +import com.sun.star.wizards.common.PropertyNames; /** * @@ -40,7 +41,7 @@ public class BlindtextCreator public static String adjustBlindTextlength(String FieldTitle, int FieldWidth, boolean bIsCurLandscape, boolean bIsGroupTable, String[] _RecordFieldNames) { - String BlindTextString = ""; + String BlindTextString = PropertyNames.EMPTY_STRING; if (bIsGroupTable) { return getBlindTextString(FieldTitle, FieldWidth, FieldWidth); @@ -66,7 +67,7 @@ public class BlindtextCreator public static String getBlindTextString(String FieldTitle, int FieldWidth, int MaxWidth) { - String[] BlindTextArray = JavaTools.ArrayoutofString(BlindText, " "); + String[] BlindTextArray = JavaTools.ArrayoutofString(BlindText, PropertyNames.SPACE); String PartBlindText = BlindTextArray[0]; String NewPartBlindText; int MaxHeaderWidth; @@ -88,7 +89,7 @@ public class BlindtextCreator int i = 1; do { - NewPartBlindText = PartBlindText + " " + BlindTextArray[i]; + NewPartBlindText = PartBlindText + PropertyNames.SPACE + BlindTextArray[i]; if (NewPartBlindText.length() < MaxWidth) { PartBlindText = NewPartBlindText; diff --git a/wizards/com/sun/star/wizards/db/ColumnPropertySet.java b/wizards/com/sun/star/wizards/db/ColumnPropertySet.java index db5ceb257118..18e85fea868e 100644 --- a/wizards/com/sun/star/wizards/db/ColumnPropertySet.java +++ b/wizards/com/sun/star/wizards/db/ColumnPropertySet.java @@ -40,7 +40,7 @@ public class ColumnPropertySet TypeInspector oTypeInspector; public XPropertySet xPropertySet; private int nType; - private String sTypeName = ""; + private String sTypeName = PropertyNames.EMPTY_STRING; public ColumnPropertySet(TypeInspector _oTypeInspector, XPropertySet _xPropertySet) { @@ -149,7 +149,7 @@ public class ColumnPropertySet private void setType(int _nType, String _sTypeName, Integer precision) { - if (_sTypeName.equals("")) + if (_sTypeName.equals(PropertyNames.EMPTY_STRING)) { sTypeName = oTypeInspector.getDefaultTypeName(nType, precision); } @@ -174,7 +174,7 @@ public class ColumnPropertySet else if (_spropname.equals(PropertyNames.PROPERTY_NAME)) { String sName = (String) _oValue; - if (!sName.equals("")) + if (!sName.equals(PropertyNames.EMPTY_STRING)) { xPropertySet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName); } diff --git a/wizards/com/sun/star/wizards/db/CommandMetaData.java b/wizards/com/sun/star/wizards/db/CommandMetaData.java index 1819d3485994..af4972c52e86 100644 --- a/wizards/com/sun/star/wizards/db/CommandMetaData.java +++ b/wizards/com/sun/star/wizards/db/CommandMetaData.java @@ -41,6 +41,7 @@ import com.sun.star.container.XNameAccess; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.JavaTools; import com.sun.star.wizards.common.NumberFormatter; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.Resource; import java.util.ArrayList; import java.util.HashMap; @@ -75,8 +76,8 @@ public class CommandMetaData extends DBMetaData private int CommandType; private String Command; boolean bCatalogAtStart = true; - String sCatalogSep = ""; - String sIdentifierQuote = ""; + String sCatalogSep = PropertyNames.EMPTY_STRING; + String sIdentifierQuote = PropertyNames.EMPTY_STRING; boolean bCommandComposerAttributesalreadyRetrieved = false; private XIndexAccess xIndexKeys; @@ -178,7 +179,7 @@ public class CommandMetaData extends DBMetaData } else { - sSortFieldName[1] = "ASC"; + sSortFieldName[1] = PropertyNames.ASC; } aSortFields.add(sSortFieldName); } diff --git a/wizards/com/sun/star/wizards/db/CommandName.java b/wizards/com/sun/star/wizards/db/CommandName.java index 3c6686868ff3..64e3f5cbeae5 100644 --- a/wizards/com/sun/star/wizards/db/CommandName.java +++ b/wizards/com/sun/star/wizards/db/CommandName.java @@ -29,17 +29,18 @@ package com.sun.star.wizards.db; import com.sun.star.sdbc.SQLException; import com.sun.star.uno.Exception; import com.sun.star.wizards.common.JavaTools; +import com.sun.star.wizards.common.PropertyNames; public class CommandName { protected CommandMetaData oCommandMetaData; - protected String CatalogName = ""; - protected String SchemaName = ""; - protected String TableName = ""; - protected String DisplayName = ""; - protected String ComposedName = ""; - protected String AliasName = ""; + protected String CatalogName = PropertyNames.EMPTY_STRING; + protected String SchemaName = PropertyNames.EMPTY_STRING; + protected String TableName = PropertyNames.EMPTY_STRING; + protected String DisplayName = PropertyNames.EMPTY_STRING; + protected String ComposedName = PropertyNames.EMPTY_STRING; + protected String AliasName = PropertyNames.EMPTY_STRING; protected boolean bCatalogAtStart; protected String sCatalogSep; protected String sIdentifierQuote; @@ -59,21 +60,21 @@ public class CommandName oCommandMetaData = _CommandMetaData; if ((_CatalogName != null) && (oCommandMetaData.xDBMetaData.supportsCatalogsInTableDefinitions())) { - if (!_CatalogName.equals("")) + if (!_CatalogName.equals(PropertyNames.EMPTY_STRING)) { CatalogName = _CatalogName; } } if ((_SchemaName != null) && (oCommandMetaData.xDBMetaData.supportsSchemasInTableDefinitions())) { - if (!_SchemaName.equals("")) + if (!_SchemaName.equals(PropertyNames.EMPTY_STRING)) { SchemaName = _SchemaName; } } if (_TableName != null) { - if (!_TableName.equals("")) + if (!_TableName.equals(PropertyNames.EMPTY_STRING)) { TableName = _TableName; } @@ -117,7 +118,7 @@ public class CommandName NameList = new String[0]; NameList = JavaTools.ArrayoutofString(_DisplayName, "."); SchemaName = NameList[0]; - TableName = NameList[1]; // TODO Was ist mit diesem Fall: CatalogSep = "." und CatalogName = "" + TableName = NameList[1]; // TODO Was ist mit diesem Fall: CatalogSep = "." und CatalogName = PropertyNames.EMPTY_STRING } else { @@ -138,7 +139,7 @@ public class CommandName { if (CatalogName != null) { - if (!CatalogName.equals("")) + if (!CatalogName.equals(PropertyNames.EMPTY_STRING)) { if (bCatalogAtStart == true) { @@ -148,12 +149,12 @@ public class CommandName } if (SchemaName != null) { - if (!SchemaName.equals("")) + if (!SchemaName.equals(PropertyNames.EMPTY_STRING)) { ComposedName += quoteName(SchemaName) + "."; } } - if (ComposedName.equals("")) + if (ComposedName.equals(PropertyNames.EMPTY_STRING)) { ComposedName = quoteName(TableName); } @@ -163,7 +164,7 @@ public class CommandName } if ((bCatalogAtStart == false) && (CatalogName != null)) { - if (!CatalogName.equals("")) + if (!CatalogName.equals(PropertyNames.EMPTY_STRING)) { ComposedName += sCatalogSep + quoteName(CatalogName); } @@ -203,7 +204,7 @@ public class CommandName { if (sName == null) { - sName = ""; + sName = PropertyNames.EMPTY_STRING; } return new StringBuilder(_sIdentifierQuote).append(sName).append(_sIdentifierQuote).toString(); } diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java index f6f5d0212fc5..54a68cad17b4 100644 --- a/wizards/com/sun/star/wizards/db/DBMetaData.java +++ b/wizards/com/sun/star/wizards/db/DBMetaData.java @@ -596,9 +596,9 @@ public class DBMetaData try { XConnection xConnection = null; - if (Properties.hasPropertyValue(curproperties, "ActiveConnection")) + if (Properties.hasPropertyValue(curproperties, PropertyNames.ACTIVE_CONNECTION)) { - xConnection = UnoRuntime.queryInterface( XConnection.class, Properties.getPropertyValue( curproperties, "ActiveConnection" ) ); + xConnection = UnoRuntime.queryInterface( XConnection.class, Properties.getPropertyValue( curproperties, PropertyNames.ACTIVE_CONNECTION ) ); if (xConnection != null) { com.sun.star.container.XChild child = UnoRuntime.queryInterface( com.sun.star.container.XChild.class, xConnection ); @@ -703,7 +703,7 @@ public class DBMetaData getDataSourceInterfaces(); if (bPasswordIsRequired == false) { - DBConnection = _dataSource.getConnection("", ""); + DBConnection = _dataSource.getConnection(PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING); bgetConnection = true; } else @@ -852,7 +852,7 @@ public class DBMetaData XPropertySet xPSet = UnoRuntime.queryInterface( XPropertySet.class, oQuery ); String s = _oSQLQueryComposer.m_xQueryAnalyzer.getQuery(); - xPSet.setPropertyValue("Command", s); + xPSet.setPropertyValue(PropertyNames.COMMAND, s); XNameContainer xNameCont = UnoRuntime.queryInterface( XNameContainer.class, xQueryDefs ); m_connectionTools.getObjectNames().checkNameForCreate(com.sun.star.sdb.CommandType.QUERY, _QueryName); @@ -949,7 +949,7 @@ public class DBMetaData NamedValueCollection creationArgs = new NamedValueCollection(); creationArgs.put( PropertyNames.PROPERTY_NAME, basename ); - creationArgs.put( "URL", documentURL ); + creationArgs.put( PropertyNames.URL, documentURL ); creationArgs.put( "AsTemplate", i_createTemplate ); XMultiServiceFactory xDocMSF = UnoRuntime.queryInterface( XMultiServiceFactory.class, _xDocNameAccess ); Object oDBDocument = xDocMSF.createInstanceWithArguments( "com.sun.star.sdb.DocumentDefinition", creationArgs.getPropertyValues() ); diff --git a/wizards/com/sun/star/wizards/db/QueryMetaData.java b/wizards/com/sun/star/wizards/db/QueryMetaData.java index 5fe6cd55c3a9..f6fe9176086c 100644 --- a/wizards/com/sun/star/wizards/db/QueryMetaData.java +++ b/wizards/com/sun/star/wizards/db/QueryMetaData.java @@ -196,7 +196,7 @@ public class QueryMetaData extends CommandMetaData ArrayList CommandNames = new ArrayList(1); for (int i = 0; i < _FieldNames.length; i++) { - String CurCommandName = ""; + String CurCommandName = PropertyNames.EMPTY_STRING; String[] MetaList = JavaTools.ArrayoutofString(_FieldNames[i], "."); if (MetaList.length > 1) { diff --git a/wizards/com/sun/star/wizards/db/RecordParser.java b/wizards/com/sun/star/wizards/db/RecordParser.java index 6c8ddb5b2c36..f9621fe8420d 100644 --- a/wizards/com/sun/star/wizards/db/RecordParser.java +++ b/wizards/com/sun/star/wizards/db/RecordParser.java @@ -44,6 +44,7 @@ import com.sun.star.wizards.common.JavaTools; import com.sun.star.wizards.common.NumberFormatter; import com.sun.star.sdbc.XResultSet; import com.sun.star.task.XInteractionHandler; +import com.sun.star.wizards.common.PropertyNames; public class RecordParser extends QueryMetaData { @@ -217,9 +218,9 @@ public class RecordParser extends QueryMetaData try { Helper.setUnoPropertyValue(xRowSet, "DataSourceName", DataSourceName); - Helper.setUnoPropertyValue(xRowSet, "ActiveConnection", DBConnection); - Helper.setUnoPropertyValue(xRowSet, "Command", Command); - Helper.setUnoPropertyValue(xRowSet, "CommandType", new Integer(_nCommandType)); // CommandType + Helper.setUnoPropertyValue(xRowSet, PropertyNames.ACTIVE_CONNECTION, DBConnection); + Helper.setUnoPropertyValue(xRowSet, PropertyNames.COMMAND, Command); + Helper.setUnoPropertyValue(xRowSet, PropertyNames.COMMAND_TYPE, new Integer(_nCommandType)); // CommandType xExecute.executeWithCompletion(xInteraction); com.sun.star.sdb.XResultSetAccess xResultAccess = (com.sun.star.sdb.XResultSetAccess) UnoRuntime.queryInterface(com.sun.star.sdb.XResultSetAccess.class, xRowSet); ResultSet = xResultAccess.createResultSet(); diff --git a/wizards/com/sun/star/wizards/db/RelationController.java b/wizards/com/sun/star/wizards/db/RelationController.java index acf47581d3e2..6c8b212f3cfd 100644 --- a/wizards/com/sun/star/wizards/db/RelationController.java +++ b/wizards/com/sun/star/wizards/db/RelationController.java @@ -33,6 +33,7 @@ import com.sun.star.sdbc.XResultSet; import com.sun.star.sdbc.XRow; import com.sun.star.uno.UnoRuntime; import com.sun.star.wizards.common.JavaTools; +import com.sun.star.wizards.common.PropertyNames; /** * @author bc93774 @@ -94,7 +95,7 @@ public class RelationController extends CommandName private Object getCatalogName(CommandName _oCommandName) { String sLocCatalog = _oCommandName.getCatalogName(); - if (sLocCatalog.equals("")) + if (sLocCatalog.equals(PropertyNames.EMPTY_STRING)) { return null; } diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java index 8e3d9706cc9d..b90e6ca90159 100644 --- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java +++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java @@ -96,7 +96,8 @@ public class SQLQueryComposer public String getSelectClause(boolean _baddAliasFieldNames) throws SQLException { String sSelectBaseClause = "SELECT "; - String sSelectClause = sSelectBaseClause; + StringBuilder sSelectClause = new StringBuilder(sSelectBaseClause); + boolean removeComma = false; for (int i = 0; i < CurDBMetaData.FieldColumns.length; i++) { if (addtoSelectClause(CurDBMetaData.FieldColumns[i].getDisplayFieldName())) @@ -104,33 +105,34 @@ public class SQLQueryComposer int iAggregate = CurDBMetaData.getAggregateIndex(CurDBMetaData.FieldColumns[i].getDisplayFieldName()); if (iAggregate > -1) { - sSelectClause += CurDBMetaData.AggregateFieldNames[iAggregate][1] + "(" + getComposedAliasFieldName(CurDBMetaData.AggregateFieldNames[iAggregate][0]) + ")"; + sSelectClause.append(CurDBMetaData.AggregateFieldNames[iAggregate][1]).append("(").append(getComposedAliasFieldName(CurDBMetaData.AggregateFieldNames[iAggregate][0])).append(")"); if (_baddAliasFieldNames) { - sSelectClause += getAliasFieldNameClause(CurDBMetaData.AggregateFieldNames[iAggregate][0]); + sSelectClause.append(getAliasFieldNameClause(CurDBMetaData.AggregateFieldNames[iAggregate][0])); } } else { - sSelectClause += getComposedAliasFieldName(CurDBMetaData.FieldColumns[i].getDisplayFieldName()); + sSelectClause.append(getComposedAliasFieldName(CurDBMetaData.FieldColumns[i].getDisplayFieldName())); if (_baddAliasFieldNames) { - sSelectClause += getAliasFieldNameClause(CurDBMetaData.FieldColumns[i].getDisplayFieldName()); + sSelectClause.append(getAliasFieldNameClause(CurDBMetaData.FieldColumns[i].getDisplayFieldName())); } } - sSelectClause += ", "; + sSelectClause.append(", "); + removeComma = true; } } // TODO: little bit unhandy version of remove the append 'comma' at the end - if (sSelectClause.equals(sSelectBaseClause)) + if (removeComma) { - sSelectClause = sSelectClause.substring(0, sSelectClause.length() - 1); + sSelectClause.delete(sSelectClause.length() - 2,sSelectClause.length()); } else { - sSelectClause = sSelectClause.substring(0, sSelectClause.length() - 2); + sSelectClause.delete(sSelectClause.length() - 1,sSelectClause.length()); } - return sSelectClause; + return sSelectClause.toString(); } public String getAliasFieldNameClause(String _FieldName) @@ -142,7 +144,7 @@ public class SQLQueryComposer } else { - return ""; + return PropertyNames.EMPTY_STRING; } } @@ -164,7 +166,7 @@ public class SQLQueryComposer public void prependSortingCriteria() throws SQLException { XIndexAccess xColumnIndexAccess = m_xQueryAnalyzer.getOrderColumns(); - m_queryComposer.setOrder(""); + m_queryComposer.setOrder(PropertyNames.EMPTY_STRING); for (int i = 0; i < CurDBMetaData.getSortFieldNames().length; i++) { appendSortingCriterion(i, false); @@ -215,38 +217,37 @@ public class SQLQueryComposer if (xColumn != null) { String sSort = CurDBMetaData.getSortFieldNames()[_SortIndex][1]; - boolean bascend = (sSort.equals("ASC")); + boolean bascend = (sSort.equals(PropertyNames.ASC)); m_queryComposer.appendOrderByColumn(xColumn, bascend); } } public void appendSortingcriteria(boolean _baddAliasFieldNames) throws SQLException { - String sOrder = ""; - m_queryComposer.setOrder(""); + m_queryComposer.setOrder(PropertyNames.EMPTY_STRING); for (int i = 0; i < CurDBMetaData.getSortFieldNames().length; i++) { String sSortValue = CurDBMetaData.getSortFieldNames()[i][0]; int iAggregate = CurDBMetaData.getAggregateIndex(sSortValue); if (iAggregate > -1) { - sOrder = m_xQueryAnalyzer.getOrder(); + StringBuilder sOrder = new StringBuilder(m_xQueryAnalyzer.getOrder()); if (sOrder.length() > 0) { - sOrder += ", "; + sOrder.append( ", "); } - sOrder += CurDBMetaData.AggregateFieldNames[iAggregate][1] + "(" + CurDBMetaData.AggregateFieldNames[iAggregate][0] + ")"; - sOrder += " " + CurDBMetaData.getSortFieldNames()[i][1]; - m_queryComposer.setOrder(sOrder); + sOrder.append(CurDBMetaData.AggregateFieldNames[iAggregate][1]).append("(").append(CurDBMetaData.AggregateFieldNames[iAggregate][0]).append(")"); + sOrder.append(PropertyNames.SPACE).append(CurDBMetaData.getSortFieldNames()[i][1]); + m_queryComposer.setOrder(sOrder.toString()); } else { appendSortingCriterion(i, _baddAliasFieldNames); } - sOrder = m_xQueryAnalyzer.getOrder(); + // sOrder = m_xQueryAnalyzer.getOrder(); } // just for debug! - sOrder = m_queryComposer.getOrder(); + // sOrder = m_queryComposer.getOrder(); } public void appendGroupByColumns(boolean _baddAliasFieldNames) throws SQLException @@ -289,7 +290,7 @@ public class SQLQueryComposer { CommandName curCommandName = new CommandName(CurDBMetaData, sCommandNames[i]); //(setComposedCommandName) curCommandName.setAliasName(getuniqueAliasName(curCommandName.getTableName())); - sFromClause.append(" ").append(curCommandName.getComposedName()).append(" ").append(quoteName(curCommandName.getAliasName())); + sFromClause.append(PropertyNames.SPACE).append(curCommandName.getComposedName()).append(PropertyNames.SPACE).append(quoteName(curCommandName.getAliasName())); if (i < sCommandNames.length - 1) { sFromClause.append(", "); @@ -313,7 +314,7 @@ public class SQLQueryComposer if (addQuery) { String sSelectClause = getSelectClause(_baddAliasFieldNames); - StringBuilder queryclause = new StringBuilder(sSelectClause).append(" ").append(getFromClause()); + StringBuilder queryclause = new StringBuilder(sSelectClause).append(PropertyNames.SPACE).append(getFromClause()); m_xQueryAnalyzer.setQuery(queryclause.toString()); if (CurDBMetaData.getFilterConditions() != null && CurDBMetaData.getFilterConditions().length > 0) { @@ -386,7 +387,7 @@ public class SQLQueryComposer public String getuniqueAliasName(String _TableName) { int a = 0; - String AliasName = ""; + String AliasName = PropertyNames.EMPTY_STRING; boolean bAliasNameexists = true; String locAliasName = _TableName; while (bAliasNameexists == true) diff --git a/wizards/com/sun/star/wizards/db/TableDescriptor.java b/wizards/com/sun/star/wizards/db/TableDescriptor.java index 0330e518b774..80fbfd9ed906 100644 --- a/wizards/com/sun/star/wizards/db/TableDescriptor.java +++ b/wizards/com/sun/star/wizards/db/TableDescriptor.java @@ -81,8 +81,8 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen private XColumnsSupplier xKeyColumnSupplier; private XPropertySet xKey; private boolean bIDFieldisInserted = false; - private String IDFieldName = ""; - private String sColumnAlreadyExistsMessage = ""; + private String IDFieldName = PropertyNames.EMPTY_STRING; + private String sColumnAlreadyExistsMessage = PropertyNames.EMPTY_STRING; // private WizardDialog oUnoDialog; private XWindow xWindow; @@ -319,7 +319,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen { try { - xPropTableDataDescriptor.setPropertyValue(PropertyNames.PROPERTY_NAME, ""); + xPropTableDataDescriptor.setPropertyValue(PropertyNames.PROPERTY_NAME, PropertyNames.EMPTY_STRING); if ((xKeyDrop != null) && (xIndexAccessKeys != null)) { int icount = xIndexAccessKeys.getCount(); @@ -374,7 +374,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen { if (_svalue != null) { - if (!_svalue.equals("")) + if (!_svalue.equals(PropertyNames.EMPTY_STRING)) { try { @@ -664,7 +664,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen { if (!hasByName(_columnname)) { - if (_columnname.equals("")) + if (_columnname.equals(PropertyNames.EMPTY_STRING)) { return false; } @@ -694,7 +694,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen try { XPropertySet xColPropertySet = xColumnDataDescriptorFactory.createDataDescriptor(); - IDFieldName = Desktop.getUniqueName(getColumnNames(), _columnname, ""); + IDFieldName = Desktop.getUniqueName(getColumnNames(), _columnname, PropertyNames.EMPTY_STRING); xColPropertySet.setPropertyValue(PropertyNames.PROPERTY_NAME, IDFieldName); int nDataType = oTypeInspector.convertDataType(com.sun.star.sdbc.DataType.INTEGER); diff --git a/wizards/com/sun/star/wizards/db/TypeInspector.java b/wizards/com/sun/star/wizards/db/TypeInspector.java index 1f22801fd8c5..6e6bc358aaea 100644 --- a/wizards/com/sun/star/wizards/db/TypeInspector.java +++ b/wizards/com/sun/star/wizards/db/TypeInspector.java @@ -38,6 +38,7 @@ import com.sun.star.sdbc.XRow; import com.sun.star.uno.AnyConverter; import com.sun.star.uno.UnoRuntime; import com.sun.star.wizards.common.JavaTools; +import com.sun.star.wizards.common.PropertyNames; public class TypeInspector { @@ -284,7 +285,7 @@ public class TypeInspector */ public String getDefaultTypeName(int _curDataType, Integer precision) { - String ret = ""; + String ret = PropertyNames.EMPTY_STRING; for (int i = 0; i < nDataTypeInfos.length; i++) { if (nDataTypeInfos[i] == _curDataType) diff --git a/wizards/com/sun/star/wizards/document/Control.java b/wizards/com/sun/star/wizards/document/Control.java index b5ec0ec4ff63..8a7b10f2cefd 100644 --- a/wizards/com/sun/star/wizards/document/Control.java +++ b/wizards/com/sun/star/wizards/document/Control.java @@ -145,7 +145,7 @@ public class Control extends Shape public String getControlName(String _fieldname) { - String controlname = ""; + String controlname = PropertyNames.EMPTY_STRING; switch (getControlType()) { case FormHandler.SOLABEL: @@ -338,7 +338,7 @@ public class Control extends Shape } xPropertySet.setPropertyValue("Text", stext); aPreferredSize = getPeer().getPreferredSize(); - xPropertySet.setPropertyValue("Text", ""); + xPropertySet.setPropertyValue("Text", PropertyNames.EMPTY_STRING); } return aPreferredSize; } diff --git a/wizards/com/sun/star/wizards/document/DatabaseControl.java b/wizards/com/sun/star/wizards/document/DatabaseControl.java index e26449bc4632..22b0af405b17 100644 --- a/wizards/com/sun/star/wizards/document/DatabaseControl.java +++ b/wizards/com/sun/star/wizards/document/DatabaseControl.java @@ -152,7 +152,7 @@ public class DatabaseControl extends Control return FormHandler.oControlData[i].GridColumnName; } } - return ""; + return PropertyNames.EMPTY_STRING; } public int getControlHeight() diff --git a/wizards/com/sun/star/wizards/document/GridControl.java b/wizards/com/sun/star/wizards/document/GridControl.java index ef13d5c12a66..284dc5ef4309 100644 --- a/wizards/com/sun/star/wizards/document/GridControl.java +++ b/wizards/com/sun/star/wizards/document/GridControl.java @@ -76,7 +76,7 @@ public class GridControl extends Shape FieldColumn curfieldcolumn = fieldcolumns[i]; if (curfieldcolumn.getFieldType() == DataType.TIMESTAMP) { - TimeStampControl oControl = new TimeStampControl(new Resource(_xMSF, "", "dbw"), this, curfieldcolumn); + TimeStampControl oControl = new TimeStampControl(new Resource(_xMSF, PropertyNames.EMPTY_STRING, "dbw"), this, curfieldcolumn); } else { diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.java b/wizards/com/sun/star/wizards/document/OfficeDocument.java index ea132453bb30..5e745dee7963 100644 --- a/wizards/com/sun/star/wizards/document/OfficeDocument.java +++ b/wizards/com/sun/star/wizards/document/OfficeDocument.java @@ -87,7 +87,7 @@ public class OfficeDocument oEventProperties[0].Name = "EventType"; oEventProperties[0].Value = EventType; // "Service", "StarBasic" oEventProperties[1] = new PropertyValue(); - oEventProperties[1].Name = "Script"; //"URL"; + oEventProperties[1].Name = "Script"; //PropertyNames.URL; oEventProperties[1].Value = EventURL; xEventsSuppl.getEvents().replaceByName(EventName, oEventProperties); } @@ -131,7 +131,7 @@ public class OfficeDocument PropertyValue[] loadValues = new PropertyValue[2]; loadValues[0] = new PropertyValue(); - loadValues[0].Name = "ReadOnly"; + loadValues[0].Name = PropertyNames.READ_ONLY; loadValues[0].Value = readonly ? Boolean.TRUE : Boolean.FALSE; loadValues[1] = new PropertyValue(); loadValues[1].Name = "Preview"; @@ -145,7 +145,7 @@ public class OfficeDocument try { xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, frame); - /*if (frame.getName() == null || frame.getName().equals("")); + /*if (frame.getName() == null || frame.getName().equals(PropertyNames.EMPTY_STRING)); frame.setName("T" + System.currentTimeMillis());*/ XComponent xComponent = xComponentLoader.loadComponentFromURL(sURL, "_self", 0, loadValues); @@ -389,13 +389,13 @@ public class OfficeDocument PropertyValue[][] mediaDescr = new PropertyValue[1][1]; mediaDescr[0][0] = new PropertyValue(); - mediaDescr[0][0].Name = "URL"; + mediaDescr[0][0].Name = PropertyNames.URL; mediaDescr[0][0].Value = url; String type = ((XTypeDetection) UnoRuntime.queryInterface(XTypeDetection.class, typeDetect)).queryTypeByDescriptor(mediaDescr, true); XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, typeDetect); - if (type.equals("")) + if (type.equals(PropertyNames.EMPTY_STRING)) { return null; } diff --git a/wizards/com/sun/star/wizards/document/TimeStampControl.java b/wizards/com/sun/star/wizards/document/TimeStampControl.java index 88733ee883c1..0ca625062e67 100644 --- a/wizards/com/sun/star/wizards/document/TimeStampControl.java +++ b/wizards/com/sun/star/wizards/document/TimeStampControl.java @@ -105,8 +105,8 @@ public class TimeStampControl extends DatabaseControl oResource = _oResource; sDateAppendix = oResource.getResText(UIConsts.RID_FORM + 88); sTimeAppendix = oResource.getResText(UIConsts.RID_FORM + 89); - oDateControl = new DatabaseControl(_oGridControl, _curfieldcolumn, DataType.DATE, _curfieldcolumn.getFieldTitle() + " " + sDateAppendix); - oTimeControl = new DatabaseControl(_oGridControl, _curfieldcolumn, DataType.TIME, _curfieldcolumn.getFieldTitle() + " " + sTimeAppendix); + oDateControl = new DatabaseControl(_oGridControl, _curfieldcolumn, DataType.DATE, _curfieldcolumn.getFieldTitle() + PropertyNames.SPACE + sDateAppendix); + oTimeControl = new DatabaseControl(_oGridControl, _curfieldcolumn, DataType.TIME, _curfieldcolumn.getFieldTitle() + PropertyNames.SPACE + sTimeAppendix); } public void setPropertyValue(String _sPropertyName, Object _aPropertyValue) throws Exception diff --git a/wizards/com/sun/star/wizards/fax/CallWizard.java b/wizards/com/sun/star/wizards/fax/CallWizard.java index 69e061f95918..fd0ad8307a4e 100644 --- a/wizards/com/sun/star/wizards/fax/CallWizard.java +++ b/wizards/com/sun/star/wizards/fax/CallWizard.java @@ -38,6 +38,7 @@ import com.sun.star.registry.XRegistryKey; import com.sun.star.task.XJob; import com.sun.star.task.XJobExecutor; import com.sun.star.uno.Type; +import com.sun.star.wizards.common.PropertyNames; /** * This class capsulates the class, that implements the minimal component, a factory for @@ -105,7 +106,7 @@ public class CallWizard */ public void trigger(String str) { - if (str.equalsIgnoreCase("start")) + if (str.equalsIgnoreCase(PropertyNames.START)) { FaxWizardDialogImpl lw = new FaxWizardDialogImpl(xmultiservicefactory); if (!FaxWizardDialogImpl.running) @@ -189,7 +190,7 @@ public class CallWizard try { - byteReturn = ("" + this.hashCode()).getBytes(); + byteReturn = (PropertyNames.EMPTY_STRING + this.hashCode()).getBytes(); } catch (Exception exception) { diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.java b/wizards/com/sun/star/wizards/fax/FaxDocument.java index 7cb8178d3264..d429ee42d2b8 100644 --- a/wizards/com/sun/star/wizards/fax/FaxDocument.java +++ b/wizards/com/sun/star/wizards/fax/FaxDocument.java @@ -153,7 +153,7 @@ public class FaxDocument extends TextDocument } else { - myFieldHandler.changeUserFieldContent(sFieldName, ""); + myFieldHandler.changeUserFieldContent(sFieldName, PropertyNames.EMPTY_STRING); } } @@ -179,7 +179,7 @@ public class FaxDocument extends TextDocument public void killEmptyUserFields() { TextFieldHandler myFieldHandler = new TextFieldHandler(xMSF, xTextDocument); - myFieldHandler.removeUserFieldByContent(""); + myFieldHandler.removeUserFieldByContent(PropertyNames.EMPTY_STRING); } public void killEmptyFrames() diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.java index b249bdd76035..02ccab6b177e 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.java +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.java @@ -179,7 +179,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblTitle1 = insertLabel("lblTitle1", new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -305,7 +305,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblTitle3 = insertLabel("lblTitle3", new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -453,7 +453,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblTitle4 = insertLabel("lblTitle4", new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -511,7 +511,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblFooter = insertLabel("lblFooter", new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -520,7 +520,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblTitle5 = insertLabel("lblTitle5", new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -617,7 +617,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblTitle6 = insertLabel("lblTitle6", new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java index 8ee9f0472c57..36d1d4af9add 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java @@ -162,7 +162,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog //update the dialog UI according to the loaded Configuration updateUI(); - if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase("")) + if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING)) { myPathSelection.initializePath(); } @@ -217,7 +217,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog //myFaxDoc.xTextDocument.lockControllers(); FileAccess fileAccess = new FileAccess(xMSF); sPath = myPathSelection.getSelectedPath(); - if (sPath.equals("")) + if (sPath.equals(PropertyNames.EMPTY_STRING)) { myPathSelection.triggerPathPicker(); sPath = myPathSelection.getSelectedPath(); @@ -356,7 +356,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog PropertyValue GraphicValues[] = new PropertyValue[1]; GraphicValues[0] = new PropertyValue(); - GraphicValues[0].Name = "URL"; + GraphicValues[0].Name = PropertyNames.URL; GraphicValues[0].Value = "private:resource/svx/imagelist/18000/18022"; XGraphic xGraphic = xGraphicProvider.queryGraphic(GraphicValues); @@ -380,7 +380,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog try { sTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard"); - sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", ""); + sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", PropertyNames.EMPTY_STRING); sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../wizard/bitmap"); } catch (NoValidPathException e) @@ -395,19 +395,19 @@ public class FaxWizardDialogImpl extends FaxWizardDialog { String sFaxSubPath = "/wizard/fax"; sFaxPath = FileAccess.combinePaths(xMSF, sTemplatePath, sFaxSubPath); - sWorkPath = FileAccess.getOfficePath(xMSF, "Work", "", ""); + sWorkPath = FileAccess.getOfficePath(xMSF, "Work", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING); BusinessFiles = FileAccess.getFolderTitles(xMSF, "bus", sFaxPath); PrivateFiles = FileAccess.getFolderTitles(xMSF, "pri", sFaxPath); - setControlProperty("lstBusinessStyle", "StringItemList", BusinessFiles[0]); - setControlProperty("lstPrivateStyle", "StringItemList", PrivateFiles[0]); + setControlProperty("lstBusinessStyle", PropertyNames.STRING_ITEM_LIST, BusinessFiles[0]); + setControlProperty("lstPrivateStyle", PropertyNames.STRING_ITEM_LIST, PrivateFiles[0]); - setControlProperty("lstBusinessStyle", "SelectedItems", new short[] + setControlProperty("lstBusinessStyle", PropertyNames.SELECTED_ITEMS, new short[] { 0 }); - setControlProperty("lstPrivateStyle", "SelectedItems", new short[] + setControlProperty("lstPrivateStyle", PropertyNames.SELECTED_ITEMS, new short[] { 0 }); @@ -432,34 +432,34 @@ public class FaxWizardDialogImpl extends FaxWizardDialog public void initializeSalutation() { - setControlProperty("lstSalutation", "StringItemList", resources.SalutationLabels); + setControlProperty("lstSalutation", PropertyNames.STRING_ITEM_LIST, resources.SalutationLabels); } public void initializeGreeting() { - setControlProperty("lstGreeting", "StringItemList", resources.GreetingLabels); + setControlProperty("lstGreeting", PropertyNames.STRING_ITEM_LIST, resources.GreetingLabels); } public void initializeCommunication() { - setControlProperty("lstCommunicationType", "StringItemList", resources.CommunicationLabels); + setControlProperty("lstCommunicationType", PropertyNames.STRING_ITEM_LIST, resources.CommunicationLabels); } private void setDefaultForGreetingAndSalutationAndCommunication() { XTextComponent xTextComponent; xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); - if (xTextComponent.getText().equals("")) + if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING)) { xTextComponent.setText(resources.SalutationLabels[0]); } xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); - if (xTextComponent.getText().equals("")) + if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING)) { xTextComponent.setText(resources.GreetingLabels[0]); } xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstCommunicationType); - if (xTextComponent.getText().equals("")) + if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING)) { xTextComponent.setText(resources.CommunicationLabels[0]); } diff --git a/wizards/com/sun/star/wizards/form/CallFormWizard.java b/wizards/com/sun/star/wizards/form/CallFormWizard.java index 0538eb5fa1b3..f53fef4dd90e 100644 --- a/wizards/com/sun/star/wizards/form/CallFormWizard.java +++ b/wizards/com/sun/star/wizards/form/CallFormWizard.java @@ -29,6 +29,7 @@ package com.sun.star.wizards.form; import com.sun.star.beans.PropertyValue; import com.sun.star.uno.Type; import com.sun.star.wizards.common.Properties; +import com.sun.star.wizards.common.PropertyNames; /** This class capsulates the class, that implements the minimal component, a * factory for creating the service (__getServiceFactory). @@ -81,7 +82,7 @@ public class CallFormWizard { try { - if (sEvent.compareTo("start") == 0) + if (sEvent.compareTo(PropertyNames.START) == 0) { FormWizard CurFormWizard = new FormWizard( m_serviceFactory, m_wizardContext ); CurFormWizard.startFormWizard(); @@ -159,7 +160,7 @@ public class CallFormWizard try { - byteReturn = new String("" + this.hashCode()).getBytes(); + byteReturn = new String(PropertyNames.EMPTY_STRING + this.hashCode()).getBytes(); } catch (Exception exception) { diff --git a/wizards/com/sun/star/wizards/form/FieldLinker.java b/wizards/com/sun/star/wizards/form/FieldLinker.java index 056d06934f55..e9671aaf91c0 100644 --- a/wizards/com/sun/star/wizards/form/FieldLinker.java +++ b/wizards/com/sun/star/wizards/form/FieldLinker.java @@ -81,8 +81,8 @@ public class FieldLinker extends DBLimitedFieldSelection SOTHIRDLINKLST = 2; SOFOURTHLINKLST = 3; IListBoxPosX = new Integer(iCompPosX + 6); - sSlaveListHeader = CurUnoDialog.m_oResource.getResArray(UIConsts.RID_FORM + 20, 4); //new String[rowcount];""; //CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 40); - sMasterListHeader = CurUnoDialog.m_oResource.getResArray(UIConsts.RID_FORM + 24, 4);// new String[rowcount];""; //CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 40); + sSlaveListHeader = CurUnoDialog.m_oResource.getResArray(UIConsts.RID_FORM + 20, 4); //new String[rowcount];PropertyNames.EMPTY_STRING; //CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 40); + sMasterListHeader = CurUnoDialog.m_oResource.getResArray(UIConsts.RID_FORM + 24, 4);// new String[rowcount];PropertyNames.EMPTY_STRING; //CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 40); SOLINKLST = new int[] { SOFIRSTLINKLST, SOSECLINKLST, SOTHIRDLINKLST, SOFOURTHLINKLST @@ -212,8 +212,8 @@ public class FieldLinker extends DBLimitedFieldSelection Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[i]), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); if (bDoEnable == false) { - Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[i]), "SelectedItems", new short[] { 0 }); - Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[i]), "SelectedItems", new short[] { 0 }); + Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[i]), PropertyNames.SELECTED_ITEMS, new short[] { 0 }); + Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[i]), PropertyNames.SELECTED_ITEMS, new short[] { 0 }); } } } @@ -225,11 +225,11 @@ public class FieldLinker extends DBLimitedFieldSelection if ((iNextMasterItemPos != 0) && (iNextSlaveItemPos != 0)) { - Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[curindex]), "SelectedItems", new short[] {iNextMasterItemPos }); - Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[curindex]), "SelectedItems", new short[] {iNextSlaveItemPos}); + Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[curindex]), PropertyNames.SELECTED_ITEMS, new short[] {iNextMasterItemPos }); + Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[curindex]), PropertyNames.SELECTED_ITEMS, new short[] {iNextSlaveItemPos}); - Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[curindex + 1]), "SelectedItems", new short[] { 0 }); - Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[curindex + 1]), "SelectedItems", new short[] { 0 }); + Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[curindex + 1]), PropertyNames.SELECTED_ITEMS, new short[] { 0 }); + Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[curindex + 1]), PropertyNames.SELECTED_ITEMS, new short[] { 0 }); toggleControlRow(curindex, true); } } diff --git a/wizards/com/sun/star/wizards/form/Finalizer.java b/wizards/com/sun/star/wizards/form/Finalizer.java index 997b9a885676..199e55d2ebb6 100644 --- a/wizards/com/sun/star/wizards/form/Finalizer.java +++ b/wizards/com/sun/star/wizards/form/Finalizer.java @@ -73,7 +73,7 @@ public class Finalizer }, new Object[] { - UIConsts.INTEGER_12, "HID:WIZARDS_HID_DLGFORM_TXTPATH", 97, 35, UIConsts.INTEGERS[8], new Short((short) 82), "", 185 + UIConsts.INTEGER_12, "HID:WIZARDS_HID_DLGFORM_TXTPATH", 97, 35, UIConsts.INTEGERS[8], new Short((short) 82), PropertyNames.EMPTY_STRING, 185 }); CurUnoDialog.insertLabel("lblProceed", new String[] diff --git a/wizards/com/sun/star/wizards/form/FormConfiguration.java b/wizards/com/sun/star/wizards/form/FormConfiguration.java index f8cc43a1833b..b6f6c476b84c 100644 --- a/wizards/com/sun/star/wizards/form/FormConfiguration.java +++ b/wizards/com/sun/star/wizards/form/FormConfiguration.java @@ -161,7 +161,7 @@ public class FormConfiguration oRelationController = _oRelationController; sreferencedTables = oRelationController.getExportedKeys(); bsupportsRelations = (sreferencedTables.length > 0); - Helper.setUnoPropertyValue(UnoDialog.getModel(lstRelations), "StringItemList", sreferencedTables); + Helper.setUnoPropertyValue(UnoDialog.getModel(lstRelations), PropertyNames.STRING_ITEM_LIST, sreferencedTables); this.CurSubFormFieldSelection = _CurSubFormFieldSelection; toggleRelationsListbox(); Helper.setUnoPropertyValue(UnoDialog.getModel(optOnExistingRelation), PropertyNames.PROPERTY_ENABLED, new Boolean(bsupportsRelations && (chkcreateSubForm.getState() == 1))); @@ -195,7 +195,7 @@ public class FormConfiguration { if (areexistingRelationsdefined()) { - short[] iselected = (short[]) Helper.getUnoArrayPropertyValue(UnoDialog.getModel(lstRelations), "SelectedItems"); + short[] iselected = (short[]) Helper.getUnoArrayPropertyValue(UnoDialog.getModel(lstRelations), PropertyNames.SELECTED_ITEMS); if (iselected != null) { if (iselected.length > 0) @@ -204,7 +204,7 @@ public class FormConfiguration } } } - return ""; + return PropertyNames.EMPTY_STRING; } public void onexistingRelationSelection() diff --git a/wizards/com/sun/star/wizards/form/FormControlArranger.java b/wizards/com/sun/star/wizards/form/FormControlArranger.java index 8d76f65f6435..916c92621efa 100644 --- a/wizards/com/sun/star/wizards/form/FormControlArranger.java +++ b/wizards/com/sun/star/wizards/form/FormControlArranger.java @@ -363,7 +363,7 @@ public class FormControlArranger m_currentMaxRowHeight = 0; nSecMaxRowY = 0; m_maxPostionX = 0; - xProgressBar.start("", FieldColumns.length); + xProgressBar.start(PropertyNames.EMPTY_STRING, FieldColumns.length); for (int i = 0; i < FieldColumns.length; i++) { try @@ -596,7 +596,7 @@ public class FormControlArranger { curLabelControl.setSize(new Size(m_LabelWidth, m_LabelHeight)); } -// if (CurHelpText != ""){ +// if (CurHelpText != PropertyNames.EMPTY_STRING){ // oModel.HelpText = CurHelptext; // } } @@ -630,7 +630,7 @@ public class FormControlArranger if (DBControlList[i].getControlType() == FormHandler.SOCHECKBOX) { // Checkboxes have no Label near by - DBControlList[i].setPropertyValue(PropertyNames.PROPERTY_LABEL, ""); + DBControlList[i].setPropertyValue(PropertyNames.PROPERTY_LABEL, PropertyNames.EMPTY_STRING); } } } diff --git a/wizards/com/sun/star/wizards/form/FormDocument.java b/wizards/com/sun/star/wizards/form/FormDocument.java index 8749f2ce39e8..63bd67a9f0ce 100644 --- a/wizards/com/sun/star/wizards/form/FormDocument.java +++ b/wizards/com/sun/star/wizards/form/FormDocument.java @@ -316,7 +316,7 @@ public class FormDocument extends TextDocument ControlForm oSubControlForm = getControlFormByName(SOSUBFORM); oSubControlForm.setFormProperties(aFormProperties, oSubFormDBMetaData); String sRefTableName = _curFormConfiguration.getreferencedTableName(); - if (sRefTableName.equals("")) + if (sRefTableName.equals(PropertyNames.EMPTY_STRING)) { LinkFieldNames = _curFieldLinker.getLinkFieldNames(); } @@ -512,8 +512,8 @@ public class FormDocument extends TextDocument try { xPropertySet.setPropertyValue("DataSourceName", getDataSourceName()); - xPropertySet.setPropertyValue("Command", _oDBMetaData.getCommandName()); - xPropertySet.setPropertyValue("CommandType", new Integer(_oDBMetaData.getCommandType())); + xPropertySet.setPropertyValue(PropertyNames.COMMAND, _oDBMetaData.getCommandName()); + xPropertySet.setPropertyValue(PropertyNames.COMMAND_TYPE, new Integer(_oDBMetaData.getCommandType())); for (int i = 0; i < _aPropertySetList.length; i++) { xPropertySet.setPropertyValue(_aPropertySetList[i].Name, _aPropertySetList[i].Value); diff --git a/wizards/com/sun/star/wizards/form/FormWizard.java b/wizards/com/sun/star/wizards/form/FormWizard.java index bc49311be433..101c054a2c2b 100644 --- a/wizards/com/sun/star/wizards/form/FormWizard.java +++ b/wizards/com/sun/star/wizards/form/FormWizard.java @@ -56,8 +56,8 @@ public class FormWizard extends DatabaseObjectWizard private Finalizer curFinalizer; private static String slblFields; private static String slblSelFields; - private String sShowBinaryFields = ""; - private String serrFormNameexists = ""; + private String sShowBinaryFields = PropertyNames.EMPTY_STRING; + private String serrFormNameexists = PropertyNames.EMPTY_STRING; public static final int SOMAIN_PAGE = 1; public static final int SOSUBFORM_PAGE = 2; public static final int SOSUBFORMFIELDS_PAGE = 3; @@ -343,7 +343,7 @@ public class FormWizard extends DatabaseObjectWizard { curFormDocument.oSubFormDBMetaData.getConnection(new PropertyValue[] { - Properties.createProperty("ActiveConnection", curFormDocument.oMainFormDBMetaData.DBConnection) + Properties.createProperty(PropertyNames.ACTIVE_CONNECTION, curFormDocument.oMainFormDBMetaData.DBConnection) }); curFormDocument.xProgressBar.setValue(20); buildSteps(); @@ -398,7 +398,7 @@ public class FormWizard extends DatabaseObjectWizard ID = 1; if (sIncSuffix != null) { - if ((!sIncSuffix.equals("")) && (!sIncSuffix.equals("_"))) + if ((!sIncSuffix.equals(PropertyNames.EMPTY_STRING)) && (!sIncSuffix.equals("_"))) { String sID = JavaTools.ArrayoutofString(sIncSuffix, "_")[1]; ID = Integer.parseInt(sID); diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java b/wizards/com/sun/star/wizards/form/StyleApplier.java index 3ce766717c07..657ca504fcfb 100644 --- a/wizards/com/sun/star/wizards/form/StyleApplier.java +++ b/wizards/com/sun/star/wizards/form/StyleApplier.java @@ -122,7 +122,7 @@ public class StyleApplier lstStyles = CurUnoDialog.insertListBox("lstStyles", null, SCHANGELAYOUT, this, new String[] { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "SelectedItems", PropertyNames.PROPERTY_STEP, "StringItemList", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.SELECTED_ITEMS, PropertyNames.PROPERTY_STEP, PropertyNames.STRING_ITEM_LIST, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -177,7 +177,7 @@ public class StyleApplier /* public void initialize(short _iStyleindex){ if (_iStyleindex < lstStyles.getItemCount()){ - Helper.setUnoPropertyValue(UnoDialog.getModel(lstStyles), "SelectedItems", new short[]{_iStyleindex}); + Helper.setUnoPropertyValue(UnoDialog.getModel(lstStyles), PropertyNames.SELECTED_ITEMS, new short[]{_iStyleindex}); applyStyle(true, false); } } @@ -208,7 +208,7 @@ public class StyleApplier { try { - short[] SelFields = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(lstStyles), "SelectedItems")); + short[] SelFields = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(lstStyles), PropertyNames.SELECTED_ITEMS)); if (SelFields != null) { return SelFields[0]; @@ -331,7 +331,7 @@ public class StyleApplier int index = JavaTools.FieldInList(_sDataList, _sHeader); if (index > -1) { - String sPropName = ""; + String sPropName = PropertyNames.EMPTY_STRING; int iStyleColor; while (((sPropName.indexOf("}") < 0) && (index < _sDataList.length - 1))) { @@ -345,8 +345,8 @@ public class StyleApplier sPropValue = sPropValue.trim(); if (sPropValue.indexOf("#") > 0) { - sPropValue = JavaTools.replaceSubString(sPropValue, "", ";"); - sPropValue = JavaTools.replaceSubString(sPropValue, "", " "); + sPropValue = JavaTools.replaceSubString(sPropValue, PropertyNames.EMPTY_STRING, PropertyNames.SEMI_COLON); + sPropValue = JavaTools.replaceSubString(sPropValue, PropertyNames.EMPTY_STRING, PropertyNames.SPACE); return Integer.decode(sPropValue).intValue(); } } @@ -367,7 +367,7 @@ public class StyleApplier try { // TODO: check different languages in header layouts - aStylePaths = FileAccess.getOfficePaths(getMSF(), "Config", "", ""); + aStylePaths = FileAccess.getOfficePaths(getMSF(), "Config", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING); FileAccess.combinePaths(getMSF(), aStylePaths, "/wizard/form/styles"); String[][] LayoutFiles = FileAccess.getFolderTitles(getMSF(), null, aStylePaths, ".css"); @@ -384,10 +384,10 @@ public class StyleApplier private String getStylePath() { // TODO: umstellen auf mehrere Pfade - String StylesPath = ""; + String StylesPath = PropertyNames.EMPTY_STRING; try { - StylesPath = FileAccess.getOfficePath(xMSF, "Config", "", ""); + StylesPath = FileAccess.getOfficePath(xMSF, "Config", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING); StylesPath = FileAccess.combinePaths(xMSF, StylesPath, "/wizard/form/styles"); } catch (NoValidPathException e) diff --git a/wizards/com/sun/star/wizards/form/UIControlArranger.java b/wizards/com/sun/star/wizards/form/UIControlArranger.java index cbab5c8c8ae6..678ed88962b0 100644 --- a/wizards/com/sun/star/wizards/form/UIControlArranger.java +++ b/wizards/com/sun/star/wizards/form/UIControlArranger.java @@ -191,7 +191,7 @@ public class UIControlArranger { if (listItem == null) { - return ""; + return PropertyNames.EMPTY_STRING; } return HelpTexts[((Integer) listItem).intValue()]; diff --git a/wizards/com/sun/star/wizards/letter/CallWizard.java b/wizards/com/sun/star/wizards/letter/CallWizard.java index ff993c61e506..250d59aea19f 100644 --- a/wizards/com/sun/star/wizards/letter/CallWizard.java +++ b/wizards/com/sun/star/wizards/letter/CallWizard.java @@ -38,6 +38,7 @@ import com.sun.star.registry.XRegistryKey; import com.sun.star.task.XJob; import com.sun.star.task.XJobExecutor; import com.sun.star.uno.Type; +import com.sun.star.wizards.common.PropertyNames; /** * This class capsulates the class, that implements the minimal component, a factory for @@ -105,7 +106,7 @@ public class CallWizard */ public void trigger(String str) { - if (str.equalsIgnoreCase("start")) + if (str.equalsIgnoreCase(PropertyNames.START)) { LetterWizardDialogImpl lw = new LetterWizardDialogImpl(xmultiservicefactory); if (!LetterWizardDialogImpl.running) @@ -189,7 +190,7 @@ public class CallWizard try { - byteReturn = ("" + this.hashCode()).getBytes(); + byteReturn = (PropertyNames.EMPTY_STRING + this.hashCode()).getBytes(); } catch (Exception exception) { diff --git a/wizards/com/sun/star/wizards/letter/LetterDocument.java b/wizards/com/sun/star/wizards/letter/LetterDocument.java index 3160ff1ed011..361e7d3da43d 100644 --- a/wizards/com/sun/star/wizards/letter/LetterDocument.java +++ b/wizards/com/sun/star/wizards/letter/LetterDocument.java @@ -158,7 +158,7 @@ public class LetterDocument extends TextDocument } else { - myFieldHandler.changeUserFieldContent(sFieldName, ""); + myFieldHandler.changeUserFieldContent(sFieldName, PropertyNames.EMPTY_STRING); } } @@ -183,7 +183,7 @@ public class LetterDocument extends TextDocument public void killEmptyUserFields() { TextFieldHandler myFieldHandler = new TextFieldHandler(xMSF, xTextDocument); - myFieldHandler.removeUserFieldByContent(""); + myFieldHandler.removeUserFieldByContent(PropertyNames.EMPTY_STRING); } public void killEmptyFrames() diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.java index c8de529d2d41..2f3f87f244ff 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.java +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.java @@ -246,7 +246,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblTitle1 = insertLabel("lblTitle1", new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -499,7 +499,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblTitle2 = insertLabel("lblTitle2", new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -620,7 +620,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblTitle3 = insertLabel("lblTitle3", new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -768,7 +768,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblTitle4 = insertLabel("lblTitle4", new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -808,7 +808,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblFooter = insertLabel("lblFooter", new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -817,7 +817,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblTitle5 = insertLabel("lblTitle5", new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -902,7 +902,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblTitle6 = insertLabel("lblTitle6", new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java index 295d900bdec6..6f4503d3936a 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java @@ -177,27 +177,27 @@ public class LetterWizardDialogImpl extends LetterWizardDialog myConfig.cp_PrivateLetter.cp_Norm = oL; initializeTemplates(xMSF); - if (myConfig.cp_BusinessLetter.cp_Greeting.equals("")) + if (myConfig.cp_BusinessLetter.cp_Greeting.equals(PropertyNames.EMPTY_STRING)) { myConfig.cp_BusinessLetter.cp_Greeting = resources.GreetingLabels[0]; } - if (myConfig.cp_BusinessLetter.cp_Salutation.equals("")) + if (myConfig.cp_BusinessLetter.cp_Salutation.equals(PropertyNames.EMPTY_STRING)) { myConfig.cp_BusinessLetter.cp_Salutation = resources.SalutationLabels[0]; } - if (myConfig.cp_PrivateOfficialLetter.cp_Greeting.equals("")) + if (myConfig.cp_PrivateOfficialLetter.cp_Greeting.equals(PropertyNames.EMPTY_STRING)) { myConfig.cp_PrivateOfficialLetter.cp_Greeting = resources.GreetingLabels[1]; } - if (myConfig.cp_PrivateOfficialLetter.cp_Salutation.equals("")) + if (myConfig.cp_PrivateOfficialLetter.cp_Salutation.equals(PropertyNames.EMPTY_STRING)) { myConfig.cp_PrivateOfficialLetter.cp_Salutation = resources.SalutationLabels[1]; } - if (myConfig.cp_PrivateLetter.cp_Greeting.equals("")) + if (myConfig.cp_PrivateLetter.cp_Greeting.equals(PropertyNames.EMPTY_STRING)) { myConfig.cp_PrivateLetter.cp_Greeting = resources.GreetingLabels[2]; } - if (myConfig.cp_PrivateLetter.cp_Salutation.equals("")) + if (myConfig.cp_PrivateLetter.cp_Salutation.equals(PropertyNames.EMPTY_STRING)) { myConfig.cp_PrivateLetter.cp_Salutation = resources.SalutationLabels[2]; } @@ -205,7 +205,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog //update the dialog UI according to the loaded Configuration updateUI(); - if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase("")) + if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING)) { myPathSelection.initializePath(); } @@ -258,7 +258,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog //myLetterDoc.xTextDocument.lockControllers(); FileAccess fileAccess = new FileAccess(xMSF); sPath = myPathSelection.getSelectedPath(); - if (sPath.equals("")) + if (sPath.equals(PropertyNames.EMPTY_STRING)) { myPathSelection.triggerPathPicker(); sPath = myPathSelection.getSelectedPath(); @@ -383,7 +383,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog lstBusinessStyleItemChanged(); enableSenderReceiver(); setPossibleFooter(true); - if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase("")) + if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING)) { myPathSelection.initializePath(); } @@ -403,7 +403,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog disableBusinessPaper(); enableSenderReceiver(); setPossibleFooter(true); - if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase("")) + if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING)) { myPathSelection.initializePath(); } @@ -423,7 +423,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog disableBusinessPaper(); disableSenderReceiver(); setPossibleFooter(false); - if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase("")) + if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING)) { myPathSelection.initializePath(); } @@ -687,7 +687,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog //Height of the Company Address in the Receiver Field int iReceiverHeight = (int) (0.5 * 1000); - BusCompanyAddressReceiver = myLetterDoc.new BusinessPaperObject(" ", iFrameWidth, iReceiverHeight, iFrameX, (iFrameY - iReceiverHeight)); + BusCompanyAddressReceiver = myLetterDoc.new BusinessPaperObject(PropertyNames.SPACE, iFrameWidth, iReceiverHeight, iFrameX, (iFrameY - iReceiverHeight)); setPossibleAddressReceiver(false); } @@ -941,12 +941,12 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { XTextComponent xTextComponent; xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); - if (xTextComponent.getText().equals("")) + if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING)) { xTextComponent.setText(resources.SalutationLabels[0]); } xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); - if (xTextComponent.getText().equals("")) + if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING)) { xTextComponent.setText(resources.GreetingLabels[0]); } @@ -1099,12 +1099,12 @@ public class LetterWizardDialogImpl extends LetterWizardDialog public void initializeSalutation() { - setControlProperty("lstSalutation", "StringItemList", resources.SalutationLabels); + setControlProperty("lstSalutation", PropertyNames.STRING_ITEM_LIST, resources.SalutationLabels); } public void initializeGreeting() { - setControlProperty("lstGreeting", "StringItemList", resources.GreetingLabels); + setControlProperty("lstGreeting", PropertyNames.STRING_ITEM_LIST, resources.GreetingLabels); } public void initializeNorms() @@ -1114,19 +1114,19 @@ public class LetterWizardDialogImpl extends LetterWizardDialog String[] allLocales = lc.getIDs(); Object[] nameList = { - "", "" + PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING }; String[] nameList1 = { - "", "" + PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING }; String[] nameList1b = { - "", "" + PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING }; String[] nameList2 = { - "", "" + PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING }; Vector allPaths = new Vector(); String sLetterSubPath = "/wizard/letter/"; @@ -1135,7 +1135,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { sTemplatePath = FileAccess.deleteLastSlashfromUrl(sTemplatePath); String[] PathParts = sTemplatePath.split("/"); - String nuString = ""; + String nuString = PropertyNames.EMPTY_STRING; String sMainPath; for (int i = 0; i < (PathParts.length - 1); i++) { @@ -1212,8 +1212,8 @@ public class LetterWizardDialogImpl extends LetterWizardDialog String[] LanguageLabels; boolean found = false; - String cIsoCode = ""; - String MSID = ""; + String cIsoCode = PropertyNames.EMPTY_STRING; + String MSID = PropertyNames.EMPTY_STRING; int z = 0; for (int i = 0; i < nameList.length; i++) { @@ -1221,7 +1221,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog cIsoCode = FileAccess.getFilename((String) nameList[i]); for (int t = 0; t < allLocales.length; t++) { - String[] aLang = allLocales[t].split(";"); + String[] aLang = allLocales[t].split(PropertyNames.SEMI_COLON); if (cIsoCode.equalsIgnoreCase(aLang[1])) { MSID = aLang[2]; @@ -1233,7 +1233,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { for (int t = 0; t < allLocales.length; t++) { - String[] aLang = allLocales[t].split(";"); + String[] aLang = allLocales[t].split(PropertyNames.SEMI_COLON); if (cIsoCode.equalsIgnoreCase(aLang[1].substring(0, 2))) { MSID = aLang[2]; @@ -1271,7 +1271,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog //NormPaths = new String[nameList.length]; //LanguageLabels = new String[Norms.length]; - setControlProperty("lstLetterNorm", "StringItemList", LanguageLabels); + setControlProperty("lstLetterNorm", PropertyNames.STRING_ITEM_LIST, LanguageLabels); } private CGLetter getCurrentLetter() @@ -1294,7 +1294,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog try { sTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard"); - sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", ""); + sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", PropertyNames.EMPTY_STRING); sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../wizard/bitmap"); } catch (NoValidPathException e) @@ -1315,19 +1315,19 @@ public class LetterWizardDialogImpl extends LetterWizardDialog OfficialFiles = FileAccess.getFolderTitles(xMSF, "off", sLetterPath); PrivateFiles = FileAccess.getFolderTitles(xMSF, "pri", sLetterPath); - setControlProperty("lstBusinessStyle", "StringItemList", BusinessFiles[0]); - setControlProperty("lstPrivOfficialStyle", "StringItemList", OfficialFiles[0]); - setControlProperty("lstPrivateStyle", "StringItemList", PrivateFiles[0]); + setControlProperty("lstBusinessStyle", PropertyNames.STRING_ITEM_LIST, BusinessFiles[0]); + setControlProperty("lstPrivOfficialStyle", PropertyNames.STRING_ITEM_LIST, OfficialFiles[0]); + setControlProperty("lstPrivateStyle", PropertyNames.STRING_ITEM_LIST, PrivateFiles[0]); - setControlProperty("lstBusinessStyle", "SelectedItems", new short[] + setControlProperty("lstBusinessStyle", PropertyNames.SELECTED_ITEMS, new short[] { 0 }); - setControlProperty("lstPrivOfficialStyle", "SelectedItems", new short[] + setControlProperty("lstPrivOfficialStyle", PropertyNames.SELECTED_ITEMS, new short[] { 0 }); - setControlProperty("lstPrivateStyle", "SelectedItems", new short[] + setControlProperty("lstPrivateStyle", PropertyNames.SELECTED_ITEMS, new short[] { 0 }); diff --git a/wizards/com/sun/star/wizards/query/CallQueryWizard.java b/wizards/com/sun/star/wizards/query/CallQueryWizard.java index 76da8d5dee55..84870f99646e 100644 --- a/wizards/com/sun/star/wizards/query/CallQueryWizard.java +++ b/wizards/com/sun/star/wizards/query/CallQueryWizard.java @@ -31,6 +31,7 @@ import com.sun.star.beans.PropertyValue; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.uno.Type; import com.sun.star.wizards.common.Properties; +import com.sun.star.wizards.common.PropertyNames; /** This class capsulates the class, that implements the minimal component, a * factory for creating the service (__getServiceFactory). @@ -81,15 +82,15 @@ public class CallQueryWizard { super(); m_serviceFactory = i_serviceFactory; - registerProperty( "Command", (short)( PropertyAttribute.READONLY | PropertyAttribute.MAYBEVOID ) ); - registerProperty( "CommandType", PropertyAttribute.READONLY ); + registerProperty( PropertyNames.COMMAND, (short)( PropertyAttribute.READONLY | PropertyAttribute.MAYBEVOID ) ); + registerProperty( PropertyNames.COMMAND_TYPE, PropertyAttribute.READONLY ); } public void trigger(String sEvent) { try { - if (sEvent.compareTo("start") == 0) + if (sEvent.compareTo(PropertyNames.START) == 0) { QueryWizard CurQueryWizard = new QueryWizard( m_serviceFactory, m_wizardContext ); Command = CurQueryWizard.startQueryWizard(); @@ -168,7 +169,7 @@ public class CallQueryWizard try { - byteReturn = ("" + this.hashCode()).getBytes(); + byteReturn = (PropertyNames.EMPTY_STRING + this.hashCode()).getBytes(); } catch (Exception exception) { diff --git a/wizards/com/sun/star/wizards/query/Finalizer.java b/wizards/com/sun/star/wizards/query/Finalizer.java index bfdb93c3bb02..ad11db4041d2 100644 --- a/wizards/com/sun/star/wizards/query/Finalizer.java +++ b/wizards/com/sun/star/wizards/query/Finalizer.java @@ -118,7 +118,7 @@ public class Finalizer }); m_queryWizard.insertTextField("txtSummary", 0, null, new String[] { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ReadOnly", PropertyNames.PROPERTY_STEP, "VScroll", PropertyNames.PROPERTY_WIDTH + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.READ_ONLY, PropertyNames.PROPERTY_STEP, "VScroll", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -142,7 +142,7 @@ public class Finalizer String sCurQueryName = AnyConverter.toString(Helper.getUnoPropertyValue(UnoDialog.getModel(m_aTxtTitle), "Text")); if (sCurQueryName != null) { - if (sCurQueryName.equals("")) + if (sCurQueryName.equals(PropertyNames.EMPTY_STRING)) { String[] sCommandNames = CurDBMetaData.getIncludedCommandNames(); sCurQueryName = resQuery + "_" + sCommandNames[0]; @@ -158,7 +158,7 @@ public class Finalizer catch (com.sun.star.uno.Exception exception) { exception.printStackTrace(System.out); - return ""; + return PropertyNames.EMPTY_STRING; } } @@ -176,7 +176,7 @@ public class Finalizer ) return queryName; - return ""; + return PropertyNames.EMPTY_STRING; } public final boolean displayQueryDesign() diff --git a/wizards/com/sun/star/wizards/query/QuerySummary.java b/wizards/com/sun/star/wizards/query/QuerySummary.java index deb56499c3a4..76e670a848be 100644 --- a/wizards/com/sun/star/wizards/query/QuerySummary.java +++ b/wizards/com/sun/star/wizards/query/QuerySummary.java @@ -29,6 +29,7 @@ package com.sun.star.wizards.query; import com.sun.star.beans.PropertyValue; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.wizards.common.JavaTools; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.Resource; import com.sun.star.wizards.db.FieldColumn; import com.sun.star.wizards.db.QueryMetaData; @@ -62,12 +63,12 @@ public class QuerySummary extends QueryMetaData { try { - String sFieldNamesFraction = ""; - String sSortingFraction = ""; - String sFilterFraction = ""; - String sAggregateFraction = ""; - String sGroupByFraction = ""; - String sHavingFraction = ""; + String sFieldNamesFraction = PropertyNames.EMPTY_STRING; + String sSortingFraction = PropertyNames.EMPTY_STRING; + String sFilterFraction = PropertyNames.EMPTY_STRING; + String sAggregateFraction = PropertyNames.EMPTY_STRING; + String sGroupByFraction = PropertyNames.EMPTY_STRING; + String sHavingFraction = PropertyNames.EMPTY_STRING; sFieldNamesFraction = combineFieldNameFraction() + sReturnChar; sSortingFraction = combinePartString(RID_QUERY + 51, getSortFieldNames(), RID_QUERY + 52, RID_QUERY + 93, new String[] { @@ -83,7 +84,7 @@ public class QuerySummary extends QueryMetaData } // TODO: remove the last return from the string sSummary = sFieldNamesFraction + sSortingFraction + sFilterFraction + sAggregateFraction + sGroupByFraction + sHavingFraction; - sSummary = JavaTools.replaceSubString(sSummary, "", "~"); + sSummary = JavaTools.replaceSubString(sSummary, PropertyNames.EMPTY_STRING, "~"); } catch (com.sun.star.uno.Exception exception) { @@ -100,7 +101,7 @@ public class QuerySummary extends QueryMetaData { if (_filterconditions != null && _filterconditions.length > 0) { - String sconditions = ""; + String sconditions = PropertyNames.EMPTY_STRING; String sStart = oResource.getResText(_InitResID); String BaseString = oResource.getResText(RID_QUERY + 96); if (_filterconditions.length == 1) @@ -109,7 +110,7 @@ public class QuerySummary extends QueryMetaData for (int i = 0; i < curfilterconditions.length; i++) { sconditions += FilterComponent.getDisplayCondition(BaseString, _filterconditions[0][i], this); - sconditions = appendClauseSeparator(sconditions, " " + sAnd + " ", i, curfilterconditions.length); + sconditions = appendClauseSeparator(sconditions, PropertyNames.SPACE + sAnd + PropertyNames.SPACE, i, curfilterconditions.length); } } else @@ -118,7 +119,7 @@ public class QuerySummary extends QueryMetaData for (int i = 0; i < _filterconditions.length; i++) { sconditions += FilterComponent.getDisplayCondition(BaseString, _filterconditions[i][0], this); - sconditions = appendClauseSeparator(sconditions, " " + sOr + " ", i, _filterconditions.length); + sconditions = appendClauseSeparator(sconditions, PropertyNames.SPACE + sOr + PropertyNames.SPACE, i, _filterconditions.length); } } String sreturn = sStart + sconditions; @@ -129,7 +130,7 @@ public class QuerySummary extends QueryMetaData private String combineFieldNameFraction() { - String CurString = ""; + String CurString = PropertyNames.EMPTY_STRING; String sReturn = oResource.getResText(RID_QUERY + 50); String BaseString = oResource.getResText(RID_QUERY + 92); for (int i = 0; i < FieldColumns.length; i++) @@ -197,7 +198,7 @@ public class QuerySummary extends QueryMetaData public String ArrayFieldsToString(int _InitResID, String[][] _FieldNames, int _BaseStringID, String[] _ReplaceTags) { - String CurString = ""; + String CurString = PropertyNames.EMPTY_STRING; String sReturn = oResource.getResText(_InitResID); int FieldCount = _FieldNames.length; if (FieldCount > 0) diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java b/wizards/com/sun/star/wizards/query/QueryWizard.java index a0696a435e77..9d1a454f9497 100644 --- a/wizards/com/sun/star/wizards/query/QueryWizard.java +++ b/wizards/com/sun/star/wizards/query/QueryWizard.java @@ -501,7 +501,7 @@ public class QueryWizard extends DatabaseObjectWizard ID = 1; if (sIncSuffix != null) { - if ((!sIncSuffix.equals("")) && (!sIncSuffix.equals("_"))) + if ((!sIncSuffix.equals(PropertyNames.EMPTY_STRING)) && (!sIncSuffix.equals("_"))) { String sID = JavaTools.ArrayoutofString(sIncSuffix, "_")[1]; ID = Integer.parseInt(sID); diff --git a/wizards/com/sun/star/wizards/report/CallReportWizard.java b/wizards/com/sun/star/wizards/report/CallReportWizard.java index fc0a60447cd3..31d4555757ee 100644 --- a/wizards/com/sun/star/wizards/report/CallReportWizard.java +++ b/wizards/com/sun/star/wizards/report/CallReportWizard.java @@ -32,6 +32,7 @@ import com.sun.star.text.XTextDocument; import com.sun.star.wizards.common.Properties; import com.sun.star.sdb.application.XDatabaseDocumentUI; import com.sun.star.wizards.common.NamedValueCollection; +import com.sun.star.wizards.common.PropertyNames; import java.util.logging.Level; import java.util.logging.Logger; @@ -115,7 +116,7 @@ public class CallReportWizard { try { - if (sEvent.compareTo("start") == 0) + if (sEvent.compareTo(PropertyNames.START) == 0) { if (bWizardstartedalready != true) { @@ -213,7 +214,7 @@ public class CallReportWizard try { - byteReturn = ("" + this.hashCode()).getBytes(); + byteReturn = (PropertyNames.EMPTY_STRING + this.hashCode()).getBytes(); } catch (Exception e) { diff --git a/wizards/com/sun/star/wizards/report/DBColumn.java b/wizards/com/sun/star/wizards/report/DBColumn.java index ee60f3744000..556c1c1cdaee 100644 --- a/wizards/com/sun/star/wizards/report/DBColumn.java +++ b/wizards/com/sun/star/wizards/report/DBColumn.java @@ -257,7 +257,7 @@ public class DBColumn XTextCursor xTextCursor = TextDocument.createTextCursor(xNameCell); xTextCursor.gotoStart(false); xTextCursor.gotoEnd(true); - xTextCursor.setString(""); + xTextCursor.setString(PropertyNames.EMPTY_STRING); oTextFieldHandler.insertUserField(xTextCursor, CurDBField.getFieldName(), CurDBField.getFieldTitle()); } @@ -266,7 +266,7 @@ public class DBColumn XTextCursor xTextCursor = TextDocument.createTextCursor(xCell); xTextCursor.gotoStart(false); xTextCursor.gotoEnd(true); - xTextCursor.setString(""); + xTextCursor.setString(PropertyNames.EMPTY_STRING); oTextFieldHandler.insertUserField(xTextCursor, CurDBField.getFieldName(), CurDBField.getFieldTitle()); } diff --git a/wizards/com/sun/star/wizards/report/Dataimport.java b/wizards/com/sun/star/wizards/report/Dataimport.java index 6ae33413605d..a467b3dbbeab 100644 --- a/wizards/com/sun/star/wizards/report/Dataimport.java +++ b/wizards/com/sun/star/wizards/report/Dataimport.java @@ -97,8 +97,8 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi // curproperties[0] = Properties.createProperty("DatabaseLocation", "file:///C:/Documents and Settings/bc93774.EHAM02-DEV/My Documents/MyHSQL.odb"); //// curproperties[0] = Properties.createProperty("DatabaseLocation", "file:///C:/Documents and Settings/bc93774.EHAM02-DEV/My Documents/MyDocAssign.odb"); //baseLocation ); "DataSourceName", "db1"); //// curproperties[0] = Properties.createProperty("DataSourceName", "Bibliography"); -// curproperties[1] = Properties.createProperty("CommandType", new Integer(CommandType.TABLE)); -// curproperties[2] = Properties.createProperty("Command", "Table2"); +// curproperties[1] = Properties.createProperty(PropertyNames.COMMAND_TYPE, new Integer(CommandType.TABLE)); +// curproperties[2] = Properties.createProperty(PropertyNames.COMMAND, "Table2"); // // Dataimport CurDataimport = new Dataimport(xMSF); // TextDocument oTextDocument = new TextDocument(xMSF, true, null); @@ -134,7 +134,7 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblProgressDBConnection", new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -156,7 +156,7 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblProgressDataImport", new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -170,7 +170,7 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi }, new Object[] { - 10, "", 12, 42, 0, 120 + 10, PropertyNames.EMPTY_STRING, 12, 42, 0, 120 }); insertButton("cmdCancel", 10000, this, diff --git a/wizards/com/sun/star/wizards/report/ReportFinalizer.java b/wizards/com/sun/star/wizards/report/ReportFinalizer.java index 3b8b423a855e..6fd22abd5093 100644 --- a/wizards/com/sun/star/wizards/report/ReportFinalizer.java +++ b/wizards/com/sun/star/wizards/report/ReportFinalizer.java @@ -176,7 +176,7 @@ public class ReportFinalizer */ public void toggleSubTemplateControls() { - // String sStorePath = ""; + // String sStorePath = PropertyNames.EMPTY_STRING; Short iState = (Short) CurUnoDialog.getControlProperty("optCreateReportTemplate", PropertyNames.PROPERTY_STATE); boolean bDoTemplateEnable = iState.shortValue() == 1; CurUnoDialog.setControlProperty("optEditTemplate", PropertyNames.PROPERTY_ENABLED, bDoTemplateEnable); @@ -184,7 +184,7 @@ public class ReportFinalizer CurUnoDialog.setControlProperty("lblHowProceed", PropertyNames.PROPERTY_ENABLED, bDoTemplateEnable); String sTitle = xTitleTextBox.getText(); - boolean bDoEnable = sTitle.equals(""); + boolean bDoEnable = sTitle.equals(PropertyNames.EMPTY_STRING); CurUnoDialog.enableFinishButton(!bDoEnable); } // private boolean fileexists(XMultiServiceFactory _xMSF, String _spath){ @@ -212,7 +212,7 @@ public class ReportFinalizer if (CurUnoDialog != null) { String LocStoreName = xTitleTextBox.getText(); - if (!LocStoreName.equals("")) + if (!LocStoreName.equals(PropertyNames.EMPTY_STRING)) { StoreName = LocStoreName; } @@ -234,7 +234,7 @@ public class ReportFinalizer catch (Exception e) { e.printStackTrace(System.out); - return ""; + return PropertyNames.EMPTY_STRING; } } @@ -242,7 +242,7 @@ public class ReportFinalizer { final String TitleName = xTitleTextBox.getText(); CurReportDocument.liveupdate_updateReportTitle(TitleName); - CurUnoDialog.enableFinishButton(!"".equals(TitleName)); + CurUnoDialog.enableFinishButton(!PropertyNames.EMPTY_STRING.equals(TitleName)); } public int getReportOpenMode() diff --git a/wizards/com/sun/star/wizards/report/ReportLayouter.java b/wizards/com/sun/star/wizards/report/ReportLayouter.java index 4286b8819c69..dac1b5f98101 100644 --- a/wizards/com/sun/star/wizards/report/ReportLayouter.java +++ b/wizards/com/sun/star/wizards/report/ReportLayouter.java @@ -111,7 +111,7 @@ public class ReportLayouter xContentListBox = CurUnoDialog.insertListBox("lstContent", SOCONTENTLST, new ActionListenerImpl(), new ItemListenerImpl(), new String[] { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "SelectedItems", PropertyNames.PROPERTY_STEP, "StringItemList", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.SELECTED_ITEMS, PropertyNames.PROPERTY_STEP, PropertyNames.STRING_ITEM_LIST, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -146,7 +146,7 @@ public class ReportLayouter xLayoutListBox = CurUnoDialog.insertListBox("lstLayout", SOLAYOUTLST, new ActionListenerImpl(), new ItemListenerImpl(), new String[] { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "SelectedItems", PropertyNames.PROPERTY_STEP, "StringItemList", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.SELECTED_ITEMS, PropertyNames.PROPERTY_STEP, PropertyNames.STRING_ITEM_LIST, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -227,7 +227,7 @@ public class ReportLayouter { // CurReportDocument.getDoc().xTextDocument.lockControllers(); CurReportDocument.layout_setupRecordSection(_defaultTemplatePath); - if (CurUnoDialog.getControlProperty("txtTitle", "Text").equals("")) + if (CurUnoDialog.getControlProperty("txtTitle", "Text").equals(PropertyNames.EMPTY_STRING)) { String[] sCommandNames = CurReportDocument.getRecordParser().getIncludedCommandNames(); CurUnoDialog.setControlProperty("txtTitle", "Text", sCommandNames[0]); diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java index cec7f0cbed1d..c0babfab9769 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java +++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java @@ -59,7 +59,6 @@ import java.util.logging.Logger; class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implements Comparator { - private static final String COMMAND = "Command"; private static final String ISLANDSCAPE = "IsLandscape"; private static final String ISVISIBLE = "IsVisible"; private static final String QUERYNAME = "QueryName"; @@ -207,18 +206,18 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen { com.sun.star.container.XNameContainer xNamedForm = oFormHandler.insertFormbyName(SOREPORTFORMNAME); XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xNamedForm); - oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "CommandType", Integer.toString(CurDBMetaData.getCommandType())); + oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, PropertyNames.COMMAND_TYPE, Integer.toString(CurDBMetaData.getCommandType())); if (CurDBMetaData.getCommandType() == CommandType.QUERY) { oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, QUERYNAME, CurDBMetaData.getCommandName()); - oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "Command", ""); + oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, PropertyNames.COMMAND, ""); //DBMetaData.CommandObject oCommand = CurDBMetaData.getQueryByName(CurDBMetaData.getCommandName()); //oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, COMMAND, CurDBMetaData.Command); } else { oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, QUERYNAME, ""); - oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, COMMAND, CurDBMetaData.Command); + oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, PropertyNames.COMMAND, CurDBMetaData.Command); } oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "GroupFieldNames", JavaTools.ArraytoString(CurDBMetaData.GroupFieldNames)); oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "FieldNames", JavaTools.ArraytoString(CurDBMetaData.getFieldNames())); diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java index 535139b8f985..039ae870359a 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java +++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java @@ -30,16 +30,12 @@ package com.sun.star.wizards.report; import com.sun.star.awt.VclWindowPeerAttribute; import com.sun.star.awt.XWindowPeer; import com.sun.star.beans.PropertyValue; -import com.sun.star.container.NoSuchElementException; import com.sun.star.container.XNameAccess; import com.sun.star.container.XNameContainer; import com.sun.star.container.XNamed; -import com.sun.star.frame.XController; import com.sun.star.frame.XFrame; -import com.sun.star.lang.IllegalArgumentException; import com.sun.star.lang.XComponent; import com.sun.star.sdb.CommandType; -import com.sun.star.sdbc.SQLException; import com.sun.star.table.XCellRange; import com.sun.star.text.XTextContent; import com.sun.star.text.XTextCursor; @@ -57,9 +53,9 @@ import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.sdb.application.DatabaseObject; import com.sun.star.sdb.application.XDatabaseDocumentUI; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.SystemDialog; import com.sun.star.wizards.db.DBMetaData; -import com.sun.star.wizards.db.SQLQueryComposer; import com.sun.star.wizards.document.OfficeDocument; import com.sun.star.wizards.ui.UIConsts; import java.util.ArrayList; @@ -228,13 +224,13 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme XNameContainer xNamedForms = getDoc().oFormHandler.getDocumentForms(); Object oDBForm = Helper.getUnoObjectbyName(xNamedForms, ReportWizard.SOREPORTFORMNAME); boolean bgetConnection; - String sQueryName = ""; + String sQueryName = PropertyNames.EMPTY_STRING; if (oDBForm != null) { String sMsg = sMsgHiddenControlMissing + (char) 13 + sMsgEndAutopilot; XNameAccess xNamedForm = UnoRuntime.queryInterface( XNameAccess.class, oDBForm ); - getRecordParser().Command = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "Command", sMsg); - String sCommandType = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "CommandType", sMsg); + getRecordParser().Command = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, PropertyNames.COMMAND, sMsg); + String sCommandType = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, PropertyNames.COMMAND_TYPE, sMsg); String sGroupFieldNames = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "GroupFieldNames", sMsg); String sFieldNames = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "FieldNames", sMsg); final String sorting = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "Sorting", sMsg); @@ -243,11 +239,11 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme { sQueryName = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "QueryName", sMsg); } - String[] sFieldNameList = JavaTools.ArrayoutofString(sFieldNames, ";"); - String[] sNewList = JavaTools.ArrayoutofString(sRecordFieldNames, ";"); - if ( !"".equals(sorting)) + String[] sFieldNameList = JavaTools.ArrayoutofString(sFieldNames, PropertyNames.SEMI_COLON); + String[] sNewList = JavaTools.ArrayoutofString(sRecordFieldNames, PropertyNames.SEMI_COLON); + if ( !PropertyNames.EMPTY_STRING.equals(sorting)) { - String[] sortList = JavaTools.ArrayoutofString(sorting, ";"); + String[] sortList = JavaTools.ArrayoutofString(sorting, PropertyNames.SEMI_COLON); ArrayList aSortFields = new ArrayList(); for (String sortEntry : sortList) { @@ -258,7 +254,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme getRecordParser().setSortFieldNames(sortFieldNames); } getRecordParser().setRecordFieldNames(sNewList); - getRecordParser().GroupFieldNames = JavaTools.ArrayoutofString(sGroupFieldNames, ";"); + getRecordParser().GroupFieldNames = JavaTools.ArrayoutofString(sGroupFieldNames, PropertyNames.SEMI_COLON); getRecordParser().setCommandType(Integer.valueOf(sCommandType).intValue()); sMsgQueryCreationImpossible = JavaTools.replaceSubString(sMsgQueryCreationImpossible, getRecordParser().Command, ""); @@ -267,12 +263,12 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme boolean bexecute = false; if (bgetConnection) { - if ((getRecordParser().getCommandType() == CommandType.QUERY) && (getRecordParser().Command.equals(""))) + if ((getRecordParser().getCommandType() == CommandType.QUERY) && (getRecordParser().Command.equals(PropertyNames.EMPTY_STRING))) { DBMetaData.CommandObject oCommand = getRecordParser().getQueryByName(sQueryName); if (getRecordParser().hasEscapeProcessing(oCommand.getPropertySet())) { - getRecordParser().Command = (String) oCommand.getPropertySet().getPropertyValue("Command"); + getRecordParser().Command = (String) oCommand.getPropertySet().getPropertyValue(PropertyNames.COMMAND); getRecordParser().getSQLQueryComposer().m_xQueryAnalyzer.setQuery(getRecordParser().Command); getRecordParser().getSQLQueryComposer().prependSortingCriteria(); getRecordParser().Command = getRecordParser().getSQLQueryComposer().getQuery(); @@ -402,7 +398,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme for (ColIndex = 0; ColIndex < GroupFieldCount; ColIndex++) { CurDBColumn = (DBColumn) getDoc().DBColumnsVector.elementAt(ColIndex); - Object oValue = ""; + Object oValue = PropertyNames.EMPTY_STRING; addLinkedTextSection(xTextCursor, ReportTextDocument.COPYOFGROUPSECTION + Integer.toString(ColIndex + 1), CurDBColumn, oValue); } addLinkedTextSection(xTextCursor, ReportTextDocument.COPYOFRECORDSECTION, null, null); @@ -476,7 +472,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme xNameCellCursor = ReportTextDocument.createTextCursor(CurDBColumn.xNameCell); xNameCellCursor.gotoStart(false); FieldContent = getDoc().oTextFieldHandler.getUserFieldContent(xNameCellCursor); - if (!FieldContent.equals("")) + if (!FieldContent.equals(PropertyNames.EMPTY_STRING)) { xNameCellCursor.goRight((short) 1, true); xNameCellCursor.setString(FieldContent); @@ -661,7 +657,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme return sPath; } } - return ""; + return PropertyNames.EMPTY_STRING; } public String getLayoutPath() @@ -676,7 +672,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme return sPath; } } - return ""; + return PropertyNames.EMPTY_STRING; } public int getDefaultPageOrientation() diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java b/wizards/com/sun/star/wizards/report/ReportWizard.java index 0ec981b54218..647eddaea46b 100644 --- a/wizards/com/sun/star/wizards/report/ReportWizard.java +++ b/wizards/com/sun/star/wizards/report/ReportWizard.java @@ -79,7 +79,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, private ReportLayouter CurReportLayouter; private ReportFinalizer CurReportFinalizer; private int nReportMode = ReportFinalizer.SOCREATEDOCUMENT; - private String m_sReportName = ""; + private String m_sReportName = PropertyNames.EMPTY_STRING; protected static final String SOREPORTFORMNAME = "ReportSource"; private static final int SOMAINPAGE = 1; private static final int SOTITLEPAGE = 2; @@ -291,11 +291,11 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, String sQueryName = CurDBCommandFieldSelection.getSelectedCommandName(); DBMetaData.CommandObject oCommand = recordParser.getQueryByName(sQueryName); bHasEscapeProcessing = recordParser.hasEscapeProcessing(oCommand.getPropertySet()); - String sCommand = (String) oCommand.getPropertySet().getPropertyValue("Command"); + String sCommand = (String) oCommand.getPropertySet().getPropertyValue(PropertyNames.COMMAND); if (bHasEscapeProcessing) { - // String sCommand = (String) oCommand.xPropertySet.getPropertyValue("Command"); - bQueryCreated = (!sCommand.equals("")); + // String sCommand = (String) oCommand.xPropertySet.getPropertyValue(PropertyNames.COMMAND); + bQueryCreated = (!sCommand.equals(PropertyNames.EMPTY_STRING)); if (m_reportDocument instanceof ReportTextImplementation) { sqlQueryComposer.m_xQueryAnalyzer.setQuery(sCommand); @@ -597,7 +597,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, public static String getBlindTextNote(Object _aDocument, Resource _oResource) { - String sBlindTextNote = ""; + String sBlindTextNote = PropertyNames.EMPTY_STRING; if (_aDocument instanceof ReportTextImplementation) { sBlindTextNote = _oResource.getResText(UIConsts.RID_REPORT + 75); @@ -706,7 +706,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, m_nID = 1; if (sIncSuffix != null) { - if ((!sIncSuffix.equals("")) && (!sIncSuffix.equals("_"))) + if ((!sIncSuffix.equals(PropertyNames.EMPTY_STRING)) && (!sIncSuffix.equals("_"))) { String sID = JavaTools.ArrayoutofString(sIncSuffix, "_")[1]; m_nID = Integer.parseInt(sID); diff --git a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java index b05559b30205..0e9945912425 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java +++ b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java @@ -59,6 +59,7 @@ import java.util.Set; import java.util.Vector; import com.sun.star.wizards.common.FileAccess; import com.sun.star.wizards.common.NamedValueCollection; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.report.IReportBuilderLayouter; import com.sun.star.wizards.report.IReportDefinitionReadAccess; import com.sun.star.wizards.report.IReportDocument; @@ -111,7 +112,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper } private XFrame m_xFrame = null; // private ReportBuilderLayouter m_aReportBuilderLayouter = null; - private String m_sReportBuilderLayoutName = ""; + private String m_sReportBuilderLayoutName = PropertyNames.EMPTY_STRING; /** * Get access to the current ReportLayouter, which depends on the name. @@ -557,7 +558,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper public String getContentPath() { - return ""; + return PropertyNames.EMPTY_STRING; } public int getDefaultPageOrientation() diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java b/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java index 55fdafe6c79a..f2bdbcd6e428 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java @@ -41,6 +41,7 @@ import com.sun.star.report.XReportDefinition; import com.sun.star.report.XSection; import com.sun.star.uno.UnoRuntime; import com.sun.star.wizards.common.Properties; +import com.sun.star.wizards.common.PropertyNames; /** * @@ -319,8 +320,8 @@ public class DesignTemplate m_xReportDefinition = (XReportDefinition) UnoRuntime.queryInterface(XReportDefinition.class, aObj); PropertyValue[] aLoadProps = new PropertyValue[2]; - aLoadProps[0] = Properties.createProperty("URL", _sPath); - aLoadProps[1] = Properties.createProperty("ReadOnly", Boolean.TRUE); + aLoadProps[0] = Properties.createProperty(PropertyNames.URL, _sPath); + aLoadProps[1] = Properties.createProperty(PropertyNames.READ_ONLY, Boolean.TRUE); m_xReportDefinition.load(aLoadProps); analyseReportDefinition(); diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java index 7c8dc8185617..e236405448f2 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java @@ -42,9 +42,6 @@ import com.sun.star.beans.XPropertySet; import com.sun.star.beans.XPropertySetInfo; import com.sun.star.container.XEnumeration; import com.sun.star.container.XNameAccess; -import com.sun.star.lang.IllegalArgumentException; -import com.sun.star.lang.IndexOutOfBoundsException; -import com.sun.star.lang.WrappedTargetException; import com.sun.star.lang.XComponent; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.report.XFixedLine; @@ -473,7 +470,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter { final XGroup xGroup = xGroups.createGroup(); xGroup.setExpression(sortFieldName[0]); - xGroup.setSortAscending("ASC".equals(sortFieldName[1])); + xGroup.setSortAscending(PropertyNames.ASC.equals(sortFieldName[1])); xGroup.setHeaderOn(false); int nCount = xGroups.getCount(); xGroups.insertByIndex(nCount, xGroup); @@ -507,7 +504,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter return m_aFieldTitleNames[i]; } } - return ""; + return PropertyNames.EMPTY_STRING; } protected int getTypeFromFieldName(String _sField) @@ -1142,7 +1139,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter final PropertySetHelper aPropertySetHelper = new PropertySetHelper(xFixedTextModel); // aPropertySetHelper.showProperties(); - aPropertySetHelper.setPropertyValueDontThrow("FontDescriptor", _aFont); + aPropertySetHelper.setPropertyValueDontThrow(PropertyNames.FONT_DESCRIPTOR, _aFont); final Object aUnoCtrlFixedText = getGlobalMSF().createInstance("com.sun.star.awt.UnoControlFixedText"); // XServiceInfo xServiceInfo2 = (XServiceInfo)UnoRuntime.queryInterface(XServiceInfo.class, aUnoCtrlFixedText); @@ -1191,13 +1188,13 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter { return m_sTableName; } - return ""; + return PropertyNames.EMPTY_STRING; } protected String getUserNameFromConfiguration() { - String sFirstName = ""; - String sLastName = ""; + String sFirstName = PropertyNames.EMPTY_STRING; + String sLastName = PropertyNames.EMPTY_STRING; try { Object oProdNameAccess = Configuration.getConfigurationRoot(getGlobalMSF(), "org.openoffice.UserProfile/Data", false); @@ -1208,7 +1205,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter { Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e); } - return sFirstName + " " + sLastName; + return sFirstName + PropertyNames.SPACE + sLastName; } /** @@ -1450,8 +1447,8 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter final String sSurroundDoubleQuotes = "\"" + sPageOf + "\""; final String sPageNumber = sSurroundDoubleQuotes.replaceAll("#page#", "\" & PageNumber() & \""); final String sPageCount = sPageNumber.replaceAll("#count#", "\" & PageCount() & \""); - final String sNoLastUnusedQuotes = sPageCount.replaceAll(" & \\\"\\\"", ""); - final String sNoFirstUnusedQuotes = sNoLastUnusedQuotes.replaceAll("\\\"\\\" & ", ""); + final String sNoLastUnusedQuotes = sPageCount.replaceAll(" & \\\"\\\"", PropertyNames.EMPTY_STRING); + final String sNoFirstUnusedQuotes = sNoLastUnusedQuotes.replaceAll("\\\"\\\" & ", PropertyNames.EMPTY_STRING); final int nUsablePageWidth = getPageWidth() - getLeftPageIndent() - getRightPageIndent(); diff --git a/wizards/com/sun/star/wizards/table/CallTableWizard.java b/wizards/com/sun/star/wizards/table/CallTableWizard.java index af685eadf343..21174d59ff74 100644 --- a/wizards/com/sun/star/wizards/table/CallTableWizard.java +++ b/wizards/com/sun/star/wizards/table/CallTableWizard.java @@ -30,6 +30,7 @@ import com.sun.star.beans.PropertyAttribute; import com.sun.star.beans.PropertyValue; import com.sun.star.uno.Type; import com.sun.star.wizards.common.Properties; +import com.sun.star.wizards.common.PropertyNames; /** This class capsulates the class, that implements the minimal component, a * factory for creating the service (__getServiceFactory). @@ -80,15 +81,15 @@ public class CallTableWizard { super(); m_serviceFactory = i_serviceFactory; - registerProperty( "Command", (short)( PropertyAttribute.READONLY | PropertyAttribute.MAYBEVOID ) ); - registerProperty( "CommandType", PropertyAttribute.READONLY ); + registerProperty( PropertyNames.COMMAND, (short)( PropertyAttribute.READONLY | PropertyAttribute.MAYBEVOID ) ); + registerProperty( PropertyNames.COMMAND_TYPE, PropertyAttribute.READONLY ); } public void trigger( String sEvent ) { try { - if ( sEvent.compareTo("start") == 0 ) + if ( sEvent.compareTo(PropertyNames.START) == 0 ) { TableWizard CurTableWizard = new TableWizard( m_serviceFactory, m_wizardContext ); Command = CurTableWizard.startTableWizard(); @@ -166,7 +167,7 @@ public class CallTableWizard try { - byteReturn = new String("" + this.hashCode()).getBytes(); + byteReturn = new String(PropertyNames.EMPTY_STRING + this.hashCode()).getBytes(); } catch (Exception exception) { diff --git a/wizards/com/sun/star/wizards/table/FieldDescription.java b/wizards/com/sun/star/wizards/table/FieldDescription.java index cf00c86f90d4..70fa37f18a2f 100644 --- a/wizards/com/sun/star/wizards/table/FieldDescription.java +++ b/wizards/com/sun/star/wizards/table/FieldDescription.java @@ -40,7 +40,7 @@ import com.sun.star.wizards.common.PropertyNames; public class FieldDescription { - private String tablename = ""; + private String tablename = PropertyNames.EMPTY_STRING; // String fieldname; private String keyname; private XNameAccess xNameAccessTableNode; diff --git a/wizards/com/sun/star/wizards/table/FieldFormatter.java b/wizards/com/sun/star/wizards/table/FieldFormatter.java index 5c5111e273b1..dbf2aeb730b7 100644 --- a/wizards/com/sun/star/wizards/table/FieldFormatter.java +++ b/wizards/com/sun/star/wizards/table/FieldFormatter.java @@ -110,7 +110,7 @@ public class FieldFormatter implements XItemListener btnShiftUp = CurUnoDialog.insertButton("btnShiftUp", "shiftFieldNameUp", this, new String[] { - PropertyNames.PROPERTY_ENABLED, "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.PROPERTY_ENABLED, PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -120,7 +120,7 @@ public class FieldFormatter implements XItemListener btnShiftDown = CurUnoDialog.insertButton("btnShiftDown", "shiftFieldNameDown", this, new String[] { - PropertyNames.PROPERTY_ENABLED, "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.PROPERTY_ENABLED, PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -132,7 +132,7 @@ public class FieldFormatter implements XItemListener btnminus = CurUnoDialog.insertButton("btnminus", "removeFieldName", this, new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -142,7 +142,7 @@ public class FieldFormatter implements XItemListener btnplus = CurUnoDialog.insertButton("btnplus", "addFieldName", this, new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -152,7 +152,7 @@ public class FieldFormatter implements XItemListener CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "ColDescriptorHeader", new String[] { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.ORIENTATION, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -177,7 +177,7 @@ public class FieldFormatter implements XItemListener }, new Object[] { - UIConsts.INTEGER_12, "HID:WIZARDS_HID_DLGTABLE_COLNAME", 274, 37, IFieldFormatStep, new Short(curtabindex++), "", 50 + UIConsts.INTEGER_12, "HID:WIZARDS_HID_DLGTABLE_COLNAME", 274, 37, IFieldFormatStep, new Short(curtabindex++), PropertyNames.EMPTY_STRING, 50 }); txtfieldname.addTextListener(CurUnoDialog); CurUnoDialog.getPeerConfiguration().setAccessibleName(btnplus, sbtnplushelptext); @@ -198,7 +198,7 @@ public class FieldFormatter implements XItemListener 85, 158, 49, IFieldFormatStep, new Short(curtabindex++), 166, 50 }); //, "HID:WIZARDS_HID_DLGTABLE_COLMODIFIER" curTableDescriptor = _curTableDescriptor; - Helper.setUnoPropertyValue(oColumnDescriptorModel, "ActiveConnection", _curTableDescriptor.DBConnection); + Helper.setUnoPropertyValue(oColumnDescriptorModel, PropertyNames.ACTIVE_CONNECTION, _curTableDescriptor.DBConnection); txtfieldname.setMaxTextLen((short) this.curTableDescriptor.getMaxColumnNameLength()); } else @@ -210,8 +210,8 @@ public class FieldFormatter implements XItemListener CurUnoDialog.repaintDialogStep(); } } - Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "StringItemList", _fieldnames); - Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "SelectedItems", new short[] + Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.STRING_ITEM_LIST, _fieldnames); + Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.SELECTED_ITEMS, new short[] { 0 }); @@ -224,7 +224,7 @@ public class FieldFormatter implements XItemListener { boolean benableShiftUpButton = false; boolean benableShiftDownButton = false; - boolean bfieldnameisselected = Helper.getUnoArrayPropertyValue(UnoDialog.getModel(xlstFieldNames), "SelectedItems") != null; + boolean bfieldnameisselected = Helper.getUnoArrayPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.SELECTED_ITEMS) != null; int ilistcount = /* xlstFieldNames.getItemCount();*/ UnoDialog.getListBoxItemCount(xlstFieldNames); boolean blistispopulated = (ilistcount > 0); if (bfieldnameisselected) @@ -241,12 +241,12 @@ public class FieldFormatter implements XItemListener public void addFieldName() { - String snewfieldname = Desktop.getUniqueName(xlstFieldNames.getItems(), suntitled, ""); + String snewfieldname = Desktop.getUniqueName(xlstFieldNames.getItems(), suntitled, PropertyNames.EMPTY_STRING); short icount = xlstFieldNames.getItemCount(); if (CurUnoDialog.verifyfieldcount(icount)) { xlstFieldNames.addItem(snewfieldname, icount); - Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "SelectedItems", new short[] + Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.SELECTED_ITEMS, new short[] { icount }); @@ -262,7 +262,7 @@ public class FieldFormatter implements XItemListener public void removeFieldName() { - String[] fieldnames = (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "StringItemList"); + String[] fieldnames = (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.STRING_ITEM_LIST); short ipos = UnoDialog.getSelectedItemPos(xlstFieldNames); String fieldname = fieldnames[ipos]; xlstFieldNames.removeItems(ipos, (short) 1); @@ -270,7 +270,7 @@ public class FieldFormatter implements XItemListener int ilistcount = /* xlstFieldNames.getItemCount();*/ UnoDialog.getListBoxItemCount(xlstFieldNames); if ((ipos) < ilistcount) { - Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "SelectedItems", new short[] + Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.SELECTED_ITEMS, new short[] { ipos }); @@ -280,14 +280,14 @@ public class FieldFormatter implements XItemListener if (ilistcount > -1) { ipos = (short) ((short) ilistcount - (short) 1); - Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "SelectedItems", new short[] + Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.SELECTED_ITEMS, new short[] { ipos }); } } curTableDescriptor.dropColumnbyName(fieldname); - fieldnames = (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "StringItemList"); + fieldnames = (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.STRING_ITEM_LIST); boolean benable = ((ipos > -1) && (ipos < fieldnames.length)); if (benable) { @@ -297,7 +297,7 @@ public class FieldFormatter implements XItemListener } else { - Helper.setUnoPropertyValue(UnoDialog.getModel(txtfieldname), "Text", ""); + Helper.setUnoPropertyValue(UnoDialog.getModel(txtfieldname), "Text", PropertyNames.EMPTY_STRING); Helper.setUnoPropertyValue(UnoDialog.getModel(btnminus), PropertyNames.PROPERTY_ENABLED, new Boolean(benable)); CurUnoDialog.setcompleted(TableWizard.SOFIELDSFORMATPAGE, benable); } @@ -323,8 +323,8 @@ public class FieldFormatter implements XItemListener String[] fieldnames = xlstFieldNames.getItems(); short ipos = xlstFieldNames.getSelectedItemPos(); fieldnames[ipos] = newfieldname; - Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "StringItemList", fieldnames); - Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "SelectedItems", new short[] + Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.STRING_ITEM_LIST, fieldnames); + Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.SELECTED_ITEMS, new short[] { ipos }); @@ -336,10 +336,10 @@ public class FieldFormatter implements XItemListener { short ipos = xlstFieldNames.getSelectedItemPos(); String[] snewlist = shiftArrayItem(xlstFieldNames.getItems(), ipos, -1); - Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "StringItemList", snewlist); + Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.STRING_ITEM_LIST, snewlist); if ((ipos - 1) > -1) { - Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "SelectedItems", new short[] + Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.SELECTED_ITEMS, new short[] { (short) (ipos - 1) }); @@ -352,10 +352,10 @@ public class FieldFormatter implements XItemListener { short ipos = xlstFieldNames.getSelectedItemPos(); String[] snewlist = shiftArrayItem(xlstFieldNames.getItems(), ipos, 1); - Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "StringItemList", snewlist); + Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.STRING_ITEM_LIST, snewlist); if ((ipos + 1) < xlstFieldNames.getItemCount()) { - Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "SelectedItems", new short[] + Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.SELECTED_ITEMS, new short[] { (short) (ipos + 1) }); @@ -415,13 +415,13 @@ public class FieldFormatter implements XItemListener public boolean iscompleted() { - String[] sfieldnames = (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "StringItemList"); + String[] sfieldnames = (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.STRING_ITEM_LIST); return sfieldnames.length > 0; } public String[] getFieldNames() { - return (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "StringItemList"); + return (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.STRING_ITEM_LIST); } /* (non-Javadoc) diff --git a/wizards/com/sun/star/wizards/table/Finalizer.java b/wizards/com/sun/star/wizards/table/Finalizer.java index 83c92aeb731f..dd6933385927 100644 --- a/wizards/com/sun/star/wizards/table/Finalizer.java +++ b/wizards/com/sun/star/wizards/table/Finalizer.java @@ -92,7 +92,7 @@ public class Finalizer }, new Object[] { - UIConsts.INTEGER_12, "HID:WIZARDS_HID_DLGTABLE_TXT_NAME", 97, 35, IFINALSTEP, new Short(curtabindex++), "", 223 + UIConsts.INTEGER_12, "HID:WIZARDS_HID_DLGTABLE_TXT_NAME", 97, 35, IFINALSTEP, new Short(curtabindex++), PropertyNames.EMPTY_STRING, 223 }); txtTableName.addTextListener(CurUnoDialog); txtTableName.setMaxTextLen((short) this.curtabledescriptor.getMaxTableNameLength()); @@ -103,7 +103,7 @@ public class Finalizer if (sCatalogNames.length > 0) { bsupportsCatalogs = true; - String sCatalog = ""; + String sCatalog = PropertyNames.EMPTY_STRING; try { sCatalog = curtabledescriptor.DBConnection.getCatalog(); @@ -127,7 +127,7 @@ public class Finalizer xCatalogListBox = CurUnoDialog.insertListBox("lstCatalog", null, null, new String[] { - "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, "StringItemList", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.STRING_ITEM_LIST, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -138,7 +138,7 @@ public class Finalizer { isel = 0; } - CurUnoDialog.setControlProperty("lstCatalog", "SelectedItems", new short[] + CurUnoDialog.setControlProperty("lstCatalog", PropertyNames.SELECTED_ITEMS, new short[] { (short) isel }); @@ -158,7 +158,7 @@ public class Finalizer if (sSchemaNames.length > 0) { bsupportsSchemata = true; - String sSchema = ""; + String sSchema = PropertyNames.EMPTY_STRING; try { sSchema = (String) curtabledescriptor.getDataSourcePropertySet().getPropertyValue("User"); @@ -182,7 +182,7 @@ public class Finalizer xSchemaListBox = CurUnoDialog.insertListBox("lstSchema", null, null, new String[] { - "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, "StringItemList", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.STRING_ITEM_LIST, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -193,7 +193,7 @@ public class Finalizer { isel = 0; } - CurUnoDialog.setControlProperty("lstSchema", "SelectedItems", new short[] + CurUnoDialog.setControlProperty("lstSchema", PropertyNames.SELECTED_ITEMS, new short[] { (short) isel }); @@ -302,7 +302,7 @@ public class Finalizer public void setTableName(String _tablename) { - if (txtTableName.getText().equals("")) + if (txtTableName.getText().equals(PropertyNames.EMPTY_STRING)) { String ssuffix = Desktop.getIncrementSuffix(curtabledescriptor.getTableNamesAsNameAccess(), getComposedTableName(_tablename)); txtTableName.setText(_tablename + ssuffix); @@ -317,7 +317,7 @@ public class Finalizer public String getTableName(String _firsttablename) { - if (txtTableName.getText().equals("")) + if (txtTableName.getText().equals(PropertyNames.EMPTY_STRING)) { setTableName(_firsttablename); } @@ -332,7 +332,7 @@ public class Finalizer } else { - return ""; + return PropertyNames.EMPTY_STRING; } } @@ -344,7 +344,7 @@ public class Finalizer } else { - return ""; + return PropertyNames.EMPTY_STRING; } } diff --git a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java index aec63204f64a..34c880c3bab5 100644 --- a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java +++ b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java @@ -210,7 +210,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener } } String selfield = lstSinglePrimeKey.getSelectedItem(); - Helper.setUnoPropertyValue(UnoDialog.getModel(lstSinglePrimeKey), "StringItemList", fieldnames); + Helper.setUnoPropertyValue(UnoDialog.getModel(lstSinglePrimeKey), PropertyNames.STRING_ITEM_LIST, fieldnames); if (selfield != null) { if (JavaTools.FieldInList(fieldnames, selfield) > -1) diff --git a/wizards/com/sun/star/wizards/table/ScenarioSelector.java b/wizards/com/sun/star/wizards/table/ScenarioSelector.java index e7b94596a90a..8c2b52cf5244 100644 --- a/wizards/com/sun/star/wizards/table/ScenarioSelector.java +++ b/wizards/com/sun/star/wizards/table/ScenarioSelector.java @@ -196,7 +196,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X public void initializeTable(int _iTable) { - Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), "SelectedItems", new short[] + Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.SELECTED_ITEMS, new short[] { (short) _iTable }); @@ -266,7 +266,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X { for (int i = 0; i < CurTableWizardUnoDialog.fielditems.size(); i++) { - String stablename = ""; + String stablename = PropertyNames.EMPTY_STRING; try { FieldDescription ofielddescription = (FieldDescription) CurTableWizardUnoDialog.fielditems.get(fieldnames[i]); @@ -276,7 +276,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X { e.printStackTrace(System.out); } - if (!stablename.equals("")) + if (!stablename.equals(PropertyNames.EMPTY_STRING)) { return stablename; } @@ -347,7 +347,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X if (iduplicate != -1) { XNameAccess xNameAccessFieldNode; - String sdisplayname = Desktop.getUniqueName(NewItems, NewItems[iduplicate], ""); + String sdisplayname = Desktop.getUniqueName(NewItems, NewItems[iduplicate], PropertyNames.EMPTY_STRING); FieldDescription curfielddescription = new FieldDescription(xMSF, aLocale, this, sdisplayname, NewItems[iduplicate], imaxcolumnchars); CurTableWizardUnoDialog.fielditems.put(sdisplayname, curfielddescription); NewItems[iduplicate] = sdisplayname; diff --git a/wizards/com/sun/star/wizards/table/TableWizard.java b/wizards/com/sun/star/wizards/table/TableWizard.java index 79ddb8ae1039..deb38a044f76 100644 --- a/wizards/com/sun/star/wizards/table/TableWizard.java +++ b/wizards/com/sun/star/wizards/table/TableWizard.java @@ -53,7 +53,7 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener, ScenarioSelector curScenarioSelector; FieldFormatter curFieldFormatter; PrimaryKeyHandler curPrimaryKeyHandler; - String sMsgWizardName = ""; + String sMsgWizardName = PropertyNames.EMPTY_STRING; public Hashtable fielditems; int wizardmode; String tablename; @@ -66,7 +66,7 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener, public static final int SOFIELDSFORMATPAGE = 2; public static final int SOPRIMARYKEYPAGE = 3; public static final int SOFINALPAGE = 4; - private String sMsgColumnAlreadyExists = ""; + private String sMsgColumnAlreadyExists = PropertyNames.EMPTY_STRING; String WizardHeaderText[] = new String[8]; private String m_tableName; @@ -325,15 +325,15 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener, Object oFormWizard = this.xMSF.createInstance("com.sun.star.wizards.form.CallFormWizard"); NamedValueCollection wizardContext = new NamedValueCollection(); - wizardContext.put( "ActiveConnection", curTableDescriptor.DBConnection ); + wizardContext.put( PropertyNames.ACTIVE_CONNECTION, curTableDescriptor.DBConnection ); wizardContext.put( "DataSource", curTableDescriptor.getDataSource() ); - wizardContext.put( "CommandType", CommandType.TABLE ); - wizardContext.put( "Command", scomposedtablename ); + wizardContext.put( PropertyNames.COMMAND_TYPE, CommandType.TABLE ); + wizardContext.put( PropertyNames.COMMAND, scomposedtablename ); wizardContext.put( "DocumentUI", m_docUI ); XInitialization xInitialization = UnoRuntime.queryInterface( XInitialization.class, oFormWizard ); xInitialization.initialize( wizardContext.getPropertyValues() ); XJobExecutor xJobExecutor = UnoRuntime.queryInterface( XJobExecutor.class, oFormWizard ); - xJobExecutor.trigger("start"); + xJobExecutor.trigger(PropertyNames.START); } catch (Exception e) { @@ -387,7 +387,7 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener, { jexception.printStackTrace(System.out); } - return ""; + return PropertyNames.EMPTY_STRING; } public boolean getTableResources() diff --git a/wizards/com/sun/star/wizards/text/TextDocument.java b/wizards/com/sun/star/wizards/text/TextDocument.java index 4fe2e9f0d710..732dcf777acd 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.java +++ b/wizards/com/sun/star/wizards/text/TextDocument.java @@ -74,6 +74,7 @@ import com.sun.star.wizards.common.Desktop; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.JavaTools; import com.sun.star.wizards.common.Helper.DateUtils; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.document.OfficeDocument; public class TextDocument @@ -210,7 +211,7 @@ public class TextDocument { XStatusIndicatorFactory xStatusIndicatorFactory = (XStatusIndicatorFactory) UnoRuntime.queryInterface(XStatusIndicatorFactory.class, xFrame); xProgressBar = xStatusIndicatorFactory.createStatusIndicator(); - xProgressBar.start("", 100); + xProgressBar.start(PropertyNames.EMPTY_STRING, 100); xProgressBar.setValue(5); } xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xFrame.getComponentWindow()); @@ -239,7 +240,7 @@ public class TextDocument { XStatusIndicatorFactory xStatusIndicatorFactory = (XStatusIndicatorFactory) UnoRuntime.queryInterface(XStatusIndicatorFactory.class, xFrame); xProgressBar = xStatusIndicatorFactory.createStatusIndicator(); - xProgressBar.start("", 100); + xProgressBar.start(PropertyNames.EMPTY_STRING, 100); xProgressBar.setValue(5); } @@ -248,7 +249,7 @@ public class TextDocument PropertyValue loadValues[] = new PropertyValue[3]; // open document in the Preview mode loadValues[0] = new PropertyValue(); - loadValues[0].Name = "ReadOnly"; + loadValues[0].Name = PropertyNames.READ_ONLY; loadValues[0].Value = Boolean.TRUE; loadValues[1] = new PropertyValue(); loadValues[1].Name = "AsTemplate"; @@ -365,7 +366,7 @@ public class TextDocument iScale = (iLastPos - iFirstPos) / iScaleLen; xTextCursor.gotoStart(false); xTextCursor.gotoEnd(true); - xTextCursor.setString(""); + xTextCursor.setString(PropertyNames.EMPTY_STRING); unlockallControllers(); return iScale; } @@ -399,7 +400,7 @@ public class TextDocument XNameAccess xNA = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, uD); Object gn = xNA.getByName("givenname"); Object sn = xNA.getByName("sn"); - String fullname = (String) gn + " " + (String) sn; + String fullname = (String) gn + PropertyNames.SPACE + (String) sn; Calendar cal = new GregorianCalendar(); int year = cal.get(Calendar.YEAR); @@ -418,7 +419,7 @@ public class TextDocument xDocProps2.setAuthor(fullname); xDocProps2.setModifiedBy(fullname); String description = xDocProps2.getDescription(); - description = description + " " + TemplateDescription; + description = description + PropertyNames.SPACE + TemplateDescription; description = JavaTools.replaceSubString(description, WizardName, ""); description = JavaTools.replaceSubString(description, myDate, ""); xDocProps2.setDescription(description); diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.java b/wizards/com/sun/star/wizards/text/TextFieldHandler.java index e25227516058..8236ddb86d3a 100644 --- a/wizards/com/sun/star/wizards/text/TextFieldHandler.java +++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.java @@ -82,7 +82,7 @@ public class TextFieldHandler Object oTextField = Helper.getUnoPropertyValue(xTextRange, "TextField"); if (com.sun.star.uno.AnyConverter.isVoid(oTextField)) { - return ""; + return PropertyNames.EMPTY_STRING; } else { @@ -96,7 +96,7 @@ public class TextFieldHandler { exception.printStackTrace(System.out); } - return ""; + return PropertyNames.EMPTY_STRING; } public void insertUserField(XTextCursor xTextCursor, String FieldName, String FieldTitle) diff --git a/wizards/com/sun/star/wizards/text/TextSectionHandler.java b/wizards/com/sun/star/wizards/text/TextSectionHandler.java index 42fd75879c3c..b948b2a60d4b 100644 --- a/wizards/com/sun/star/wizards/text/TextSectionHandler.java +++ b/wizards/com/sun/star/wizards/text/TextSectionHandler.java @@ -43,6 +43,7 @@ import com.sun.star.uno.AnyConverter; import com.sun.star.uno.Exception; import com.sun.star.uno.UnoRuntime; import com.sun.star.wizards.common.Helper; +import com.sun.star.wizards.common.PropertyNames; public class TextSectionHandler { @@ -161,7 +162,7 @@ public class TextSectionHandler XIndexAccess xAllTextSections = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xTextSectionsSupplier.getTextSections()); int iSectionCount = xAllTextSections.getCount(); SectionFileLink oSectionLink = new SectionFileLink(); - oSectionLink.FileURL = ""; + oSectionLink.FileURL = PropertyNames.EMPTY_STRING; for (int i = 0; i < iSectionCount; i++) { oTextSection = xAllTextSections.getByIndex(i); @@ -170,7 +171,7 @@ public class TextSectionHandler "FileLink", "LinkRegion" }, new Object[] { - oSectionLink, "" + oSectionLink, PropertyNames.EMPTY_STRING }); } } @@ -183,13 +184,13 @@ public class TextSectionHandler public void breakLinkOfTextSection(Object oTextSection) { SectionFileLink oSectionLink = new SectionFileLink(); - oSectionLink.FileURL = ""; + oSectionLink.FileURL = PropertyNames.EMPTY_STRING; Helper.setUnoPropertyValues(oTextSection, new String[] { "FileLink", "LinkRegion" }, new Object[] { - oSectionLink, "" + oSectionLink, PropertyNames.EMPTY_STRING }); } diff --git a/wizards/com/sun/star/wizards/text/TextStyleHandler.java b/wizards/com/sun/star/wizards/text/TextStyleHandler.java index e6c952e65785..82da36f16019 100644 --- a/wizards/com/sun/star/wizards/text/TextStyleHandler.java +++ b/wizards/com/sun/star/wizards/text/TextStyleHandler.java @@ -36,6 +36,7 @@ import com.sun.star.text.XTextDocument; import com.sun.star.uno.AnyConverter; import com.sun.star.uno.Exception; import com.sun.star.uno.UnoRuntime; +import com.sun.star.wizards.common.PropertyNames; public class TextStyleHandler { @@ -58,7 +59,7 @@ public class TextStyleHandler { XStyleLoader xStyleLoader = (XStyleLoader) UnoRuntime.queryInterface(XStyleLoader.class, xStyleFamiliesSupplier.getStyleFamilies()); com.sun.star.beans.PropertyValue[] StyleOptions = xStyleLoader.getStyleLoaderOptions(); - String CurOptionName = ""; + String CurOptionName = PropertyNames.EMPTY_STRING; int PropCount = StyleOptions.length; for (int i = 0; i < PropCount; i++) { diff --git a/wizards/com/sun/star/wizards/ui/AggregateComponent.java b/wizards/com/sun/star/wizards/ui/AggregateComponent.java index 3f37d68123a6..2940e89a6ae4 100644 --- a/wizards/com/sun/star/wizards/ui/AggregateComponent.java +++ b/wizards/com/sun/star/wizards/ui/AggregateComponent.java @@ -127,7 +127,7 @@ public class AggregateComponent extends ControlScroller CurUnoDialog.insertButton("btnplus", SOADDROW, new ActionListenerImpl(), new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -136,7 +136,7 @@ public class AggregateComponent extends ControlScroller CurUnoDialog.insertButton("btnminus", SOREMOVEROW, new ActionListenerImpl(), new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -528,7 +528,7 @@ public class AggregateComponent extends ControlScroller xFunctionListBox = CurUnoDialog.insertListBox(getFunctionControlName(index), 1, null, new ItemListenerImpl(), new String[] { - "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, "StringItemList", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.STRING_ITEM_LIST, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -570,13 +570,13 @@ public class AggregateComponent extends ControlScroller private void insertFieldNames() { - Helper.setUnoPropertyValue(UnoDialog.getModel(xFieldListBox), "StringItemList", CurDBMetaData.NumericFieldNames); + Helper.setUnoPropertyValue(UnoDialog.getModel(xFieldListBox), PropertyNames.STRING_ITEM_LIST, CurDBMetaData.NumericFieldNames); } private boolean isComplete() { - boolean bfieldnameisselected = (Helper.getUnoArrayPropertyValue(UnoDialog.getModel(xFieldListBox), "SelectedItems") != null); - boolean bfunctionisselected = (Helper.getUnoArrayPropertyValue(UnoDialog.getModel(xFunctionListBox), "SelectedItems") != null); + boolean bfieldnameisselected = (Helper.getUnoArrayPropertyValue(UnoDialog.getModel(xFieldListBox), PropertyNames.SELECTED_ITEMS) != null); + boolean bfunctionisselected = (Helper.getUnoArrayPropertyValue(UnoDialog.getModel(xFunctionListBox), PropertyNames.SELECTED_ITEMS) != null); return (bfieldnameisselected && bfunctionisselected); } diff --git a/wizards/com/sun/star/wizards/ui/ButtonList.java b/wizards/com/sun/star/wizards/ui/ButtonList.java index 2239b940798e..4436c5dbfe95 100644 --- a/wizards/com/sun/star/wizards/ui/ButtonList.java +++ b/wizards/com/sun/star/wizards/ui/ButtonList.java @@ -135,7 +135,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener new Object[] { Integer.valueOf(imageTextHeight), - "", + PropertyNames.EMPTY_STRING, "(1)", Integer.valueOf(nXPos), Integer.valueOf(nYPos), @@ -190,7 +190,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener lblCounter = dialog.insertLabel(m_aControlName + "_lblCounter", pNames1, new Object[] { Integer.valueOf(LINE_HEIGHT), - "", + PropertyNames.EMPTY_STRING, Integer.valueOf(pos.Width + btnSize.intValue() + 1), Integer.valueOf(pos.Height + (m_aButtonSize.Height + gap.Height) * rows + gap.Height + imageTextHeight + ((btnSize.intValue() - LINE_HEIGHT) / 2)), step, @@ -675,7 +675,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener private void refreshImageText() { Object item = m_nCurrentSelection >= 0 ? getListModel().getElementAt(m_nCurrentSelection) : null; - final String sText = " " + renderer.render(item); + final String sText = PropertyNames.SPACE + renderer.render(item); Helper.setUnoPropertyValue(getModel(lblImageText), PropertyNames.PROPERTY_LABEL, sText); } @@ -770,7 +770,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener // @Override public String render(Object counter) { - return "" + ((Counter) counter).start + ".." + ((Counter) counter).end + "/" + ((Counter) counter).max; + return PropertyNames.EMPTY_STRING + ((Counter) counter).start + ".." + ((Counter) counter).end + "/" + ((Counter) counter).max; } } @@ -891,7 +891,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener } // check which Button is pressed. - String sControlName = aHelper.getPropertyValueAsString(PropertyNames.PROPERTY_NAME, ""); + String sControlName = aHelper.getPropertyValueAsString(PropertyNames.PROPERTY_NAME, PropertyNames.EMPTY_STRING); final String sButton = sControlName.substring(7 + m_aControlName.length()); int nButton = new Integer(sButton).intValue(); diff --git a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java index 1352f70f9e83..b97fb6f5e84f 100644 --- a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java @@ -63,7 +63,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator public void itemStateChanged(com.sun.star.awt.ItemEvent EventObject) { - short[] SelItems = (short[]) CurUnoDialog.getControlProperty(sTableListBoxName, "SelectedItems"); + short[] SelItems = (short[]) CurUnoDialog.getControlProperty(sTableListBoxName, PropertyNames.SELECTED_ITEMS); if (SelItems.length > 0) { iOldSelPos = m_iSelPos; @@ -187,7 +187,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator } else { - return ""; + return PropertyNames.EMPTY_STRING; } } @@ -205,7 +205,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator private short getselectedItemPos() { - short[] iSelPoses = ((short[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xTableListBox), "SelectedItems")); + short[] iSelPoses = ((short[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.SELECTED_ITEMS)); if (iSelPoses.length > 0) { return iSelPoses[0]; @@ -214,7 +214,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator { if (this.bpreselectCommand) { - String[] sItemList = ((String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xTableListBox), "StringItemList")); + String[] sItemList = ((String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.STRING_ITEM_LIST)); if (sItemList.length > 0) { return (short) 0; @@ -229,10 +229,10 @@ public class CommandFieldSelection extends FieldSelection implements Comparator try { boolean binitialize = false; - String curCommandName = ""; + String curCommandName = PropertyNames.EMPTY_STRING; //As the peer of the control might not yet exist we have to query the model for the SelectedItems short iSelPos = getselectedItemPos(); - // String[] sLocList = (String[]) CurUnoDialog.getControlProperty(sTableListBoxName, "StringItemList"); + // String[] sLocList = (String[]) CurUnoDialog.getControlProperty(sTableListBoxName, PropertyNames.STRING_ITEM_LIST); final String sSelectedTableName = xTableListBox.getItem(iSelPos); if (!bgetQueries) { @@ -245,14 +245,14 @@ public class CommandFieldSelection extends FieldSelection implements Comparator if (sSelectedTableName.startsWith(sTablePrefix)) { CurDBMetaData.setCommandType(CommandType.TABLE); - curCommandName = JavaTools.replaceSubString(sSelectedTableName, "", sTablePrefix); + curCommandName = JavaTools.replaceSubString(sSelectedTableName, PropertyNames.EMPTY_STRING, sTablePrefix); CurDBMetaData.setTableByName(curCommandName); binitialize = CurDBMetaData.getFieldNamesOfCommand(curCommandName, CommandType.TABLE, AppendMode); } else { CurDBMetaData.setCommandType(CommandType.QUERY); - curCommandName = JavaTools.replaceSubString(sSelectedTableName, "", sQueryPrefix); + curCommandName = JavaTools.replaceSubString(sSelectedTableName, PropertyNames.EMPTY_STRING, sQueryPrefix); CurDBMetaData.setQueryByName(curCommandName); binitialize = CurDBMetaData.getFieldNamesOfCommand(curCommandName, CommandType.QUERY, AppendMode); } @@ -304,7 +304,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator ContentList = setPrefixinArray(ContentList, sTablePrefix, 0, CurDBMetaData.getTableNames().length); } java.util.Arrays.sort(ContentList, this); - Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), "StringItemList", ContentList); + Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.STRING_ITEM_LIST, ContentList); short iSelPos = getselectedItemPos(); if (bpreselectCommand) { @@ -322,7 +322,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator emptyFieldsListBoxes(); iSelArray = new short[] { (short) iSelPos }; } - Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), "SelectedItems", iSelArray); + Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.SELECTED_ITEMS, iSelArray); toggleCommandListBox(true); if (bgetFields) { @@ -404,10 +404,10 @@ public class CommandFieldSelection extends FieldSelection implements Comparator { try { - if (Properties.hasPropertyValue(_aPropertyValue, "CommandType")) + if (Properties.hasPropertyValue(_aPropertyValue, PropertyNames.COMMAND_TYPE)) { - int nCommandType = AnyConverter.toInt(Properties.getPropertyValue(_aPropertyValue, "CommandType")); - String sCommand = AnyConverter.toString(Properties.getPropertyValue(_aPropertyValue, "Command")); + int nCommandType = AnyConverter.toInt(Properties.getPropertyValue(_aPropertyValue, PropertyNames.COMMAND_TYPE)); + String sCommand = AnyConverter.toString(Properties.getPropertyValue(_aPropertyValue, PropertyNames.COMMAND)); if (sCommand != null) { preselectCommand(sCommand, nCommandType, _bReadOnly); @@ -424,12 +424,12 @@ public class CommandFieldSelection extends FieldSelection implements Comparator { if (_selitem.length() > 0) { - String[] sitems = (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xTableListBox), "StringItemList"); + String[] sitems = (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.STRING_ITEM_LIST); String sPrefix = getCommandPrefix(_nCommandType); short iselpos = (short) JavaTools.FieldInList(sitems, sPrefix + _selitem); if (iselpos > -1) { - Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), "SelectedItems", new short[] + Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.SELECTED_ITEMS, new short[] { iselpos }); @@ -438,13 +438,13 @@ public class CommandFieldSelection extends FieldSelection implements Comparator } else { - Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), "SelectedItems", new short[] + Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.SELECTED_ITEMS, new short[] { }); } if (_bReadOnly) { - Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), "ReadOnly", new Boolean(_selitem.length() > 0)); + Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.READ_ONLY, new Boolean(_selitem.length() > 0)); } } @@ -452,22 +452,22 @@ public class CommandFieldSelection extends FieldSelection implements Comparator { if (_selitem.length() > 0) { - String[] sitems = (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xTableListBox), "StringItemList"); + String[] sitems = (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.STRING_ITEM_LIST); short iselpos = (short) JavaTools.FieldInList(sitems, getTablePrefix() + _selitem); if (iselpos > -1) { - Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), "SelectedItems", new short[] { iselpos }); + Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.SELECTED_ITEMS, new short[] { iselpos }); } this.fillUpFieldsListbox(); } else { - Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), "SelectedItems", new short[] {} ); + Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.SELECTED_ITEMS, new short[] {} ); this.fillUpFieldsListbox(); } if (_bReadOnly) { - Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), "ReadOnly", new Boolean(_selitem.length() > 0)); + Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.READ_ONLY, new Boolean(_selitem.length() > 0)); } toggleListboxButtons((short)-1,(short)-1); } diff --git a/wizards/com/sun/star/wizards/ui/ControlScroller.java b/wizards/com/sun/star/wizards/ui/ControlScroller.java index b8f2036f9867..f25616098a26 100644 --- a/wizards/com/sun/star/wizards/ui/ControlScroller.java +++ b/wizards/com/sun/star/wizards/ui/ControlScroller.java @@ -26,8 +26,6 @@ ************************************************************************/ package com.sun.star.wizards.ui; -import com.sun.star.awt.XScrollBar; -import com.sun.star.awt.AdjustmentEvent; import com.sun.star.beans.*; import com.sun.star.awt.*; import com.sun.star.lang.XMultiServiceFactory; @@ -130,7 +128,7 @@ public abstract class ControlScroller new AdjustmentListenerImpl(), new String[] { - PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH + PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.ORIENTATION, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -158,7 +156,7 @@ public abstract class ControlScroller protected void setScrollBarOrientationHorizontal() { - Helper.setUnoPropertyValue(xScrollBar, "Orientation", new Integer(ScrollBarOrientation.HORIZONTAL)); + Helper.setUnoPropertyValue(xScrollBar, PropertyNames.ORIENTATION, new Integer(ScrollBarOrientation.HORIZONTAL)); } /** @@ -453,7 +451,7 @@ public abstract class ControlScroller { Object oControlModel = UnoDialog.getModel(CurUnoDialog.xDlgContainer.getControl(controlname)); String propertyname = UnoDialog.getDisplayProperty(oControlModel); - if (propertyname != "") + if (propertyname != PropertyNames.EMPTY_STRING) { CurUnoDialog.setControlProperty(controlname, propertyname, newvalue); } @@ -463,7 +461,7 @@ public abstract class ControlScroller { Object oControlModel = UnoDialog.getModel(CurUnoDialog.xDlgContainer.getControl(controlname)); String propertyname = UnoDialog.getDisplayProperty(oControlModel); - if (propertyname != "") + if (propertyname != PropertyNames.EMPTY_STRING) { return CurUnoDialog.getControlProperty(controlname, propertyname); } diff --git a/wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java b/wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java index 341ab73828c5..dfe5ff93f6a2 100644 --- a/wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java @@ -30,6 +30,7 @@ import com.sun.star.awt.XListBox; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.JavaTools; +import com.sun.star.wizards.common.PropertyNames; /** * @author Administrator @@ -122,7 +123,7 @@ public abstract class DBLimitedFieldSelection protected void initializeListBox(XListBox xListBox, String[] _AllFieldNames, String[] _SelFieldNames, int curindex) { short[] SelList = null; - Helper.setUnoPropertyValue(UnoDialog.getModel(xListBox), "StringItemList", _AllFieldNames); + Helper.setUnoPropertyValue(UnoDialog.getModel(xListBox), PropertyNames.STRING_ITEM_LIST, _AllFieldNames); if (_SelFieldNames != null) { if (curindex < _SelFieldNames.length) @@ -136,22 +137,22 @@ public abstract class DBLimitedFieldSelection { SelList = new short[] { (short) (0) }; } - Helper.setUnoPropertyValue(UnoDialog.getModel(xListBox), "SelectedItems", SelList); + Helper.setUnoPropertyValue(UnoDialog.getModel(xListBox), PropertyNames.SELECTED_ITEMS, SelList); return; } } SelList = new short[] { (short) (0) }; - Helper.setUnoPropertyValue(UnoDialog.getModel(xListBox), "SelectedItems", SelList); + Helper.setUnoPropertyValue(UnoDialog.getModel(xListBox), PropertyNames.SELECTED_ITEMS, SelList); } protected void initializeListBox(XListBox xListBox, String[] _AllFieldNames, String _SelFieldName) { - Helper.setUnoPropertyValue(UnoDialog.getModel(xListBox), "StringItemList", _AllFieldNames); + Helper.setUnoPropertyValue(UnoDialog.getModel(xListBox), PropertyNames.STRING_ITEM_LIST, _AllFieldNames); short[] SelList = null; int index = JavaTools.FieldInList(_AllFieldNames, _SelFieldName); SelList = new short[] { (short) (index) }; - Helper.setUnoPropertyValue(UnoDialog.getModel(xListBox), "SelectedItems", SelList); + Helper.setUnoPropertyValue(UnoDialog.getModel(xListBox), PropertyNames.SELECTED_ITEMS, SelList); } } diff --git a/wizards/com/sun/star/wizards/ui/DocumentPreview.java b/wizards/com/sun/star/wizards/ui/DocumentPreview.java index 173fae87f01b..3489ca0235b3 100644 --- a/wizards/com/sun/star/wizards/ui/DocumentPreview.java +++ b/wizards/com/sun/star/wizards/ui/DocumentPreview.java @@ -37,6 +37,7 @@ import com.sun.star.uno.UnoRuntime; import com.sun.star.util.CloseVetoException; import com.sun.star.util.XCloseable; import com.sun.star.wizards.common.Properties; +import com.sun.star.wizards.common.PropertyNames; /** * @author rpiterman @@ -126,7 +127,7 @@ public class DocumentPreview case PREVIEW_MODE: return setDocument(url, new String[] { - "Preview", "ReadOnly" + "Preview", PropertyNames.READ_ONLY }, new Object[] { Boolean.TRUE, Boolean.TRUE diff --git a/wizards/com/sun/star/wizards/ui/FieldSelection.java b/wizards/com/sun/star/wizards/ui/FieldSelection.java index 8159de0dd1dd..1a4ef1bf75e7 100644 --- a/wizards/com/sun/star/wizards/ui/FieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/FieldSelection.java @@ -317,7 +317,7 @@ public class FieldSelection Object btnmoveup = CurUnoDialog.insertButton("cmdMoveUp" + sIncSuffix, SOCMDMOVEUP, new ActionListenerImpl(), new String[] { - PropertyNames.PROPERTY_ENABLED, "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.PROPERTY_ENABLED, PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -327,7 +327,7 @@ public class FieldSelection Object btnmovedown = CurUnoDialog.insertButton("cmdMoveDown" + sIncSuffix, SOCMDMOVEDOWN, new ActionListenerImpl(), new String[] { - PropertyNames.PROPERTY_ENABLED, "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.PROPERTY_ENABLED, PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -336,8 +336,8 @@ public class FieldSelection CurUnoDialog.getPeerConfiguration().setAccessibleName(btnmoveselected, AccessTextMoveSelected); CurUnoDialog.getPeerConfiguration().setAccessibleName(btnremoveselected, AccessTextRemoveSelected); - CurUnoDialog.getPeerConfiguration().setAccessibleName(xFieldsListBox, JavaTools.replaceSubString(slblFields, "", "~")); - CurUnoDialog.getPeerConfiguration().setAccessibleName(xSelectedFieldsListBox, JavaTools.replaceSubString(slblSelFields, "", "~")); + CurUnoDialog.getPeerConfiguration().setAccessibleName(xFieldsListBox, JavaTools.replaceSubString(slblFields, PropertyNames.EMPTY_STRING, "~")); + CurUnoDialog.getPeerConfiguration().setAccessibleName(xSelectedFieldsListBox, JavaTools.replaceSubString(slblSelFields, PropertyNames.EMPTY_STRING, "~")); if (btnmoveall != null) { CurUnoDialog.getPeerConfiguration().setAccessibleName(btnmoveall, AccessTextMoveAll); @@ -402,7 +402,7 @@ public class FieldSelection String NeighborItem = NewItemList[iSelIndex + iNeighbor]; NewItemList[iSelIndex + iNeighbor] = CurItem; NewItemList[iSelIndex] = NeighborItem; - CurUnoDialog.setControlProperty("lstSelFields" + sIncSuffix, "StringItemList", NewItemList); + CurUnoDialog.setControlProperty("lstSelFields" + sIncSuffix, PropertyNames.STRING_ITEM_LIST, NewItemList); xSelectedFieldsListBox.selectItem(CurItem, true); if (xFieldSelection != null) { @@ -497,10 +497,10 @@ public class FieldSelection try { toggleListboxControls(Boolean.FALSE); - CurUnoDialog.setControlProperty("lstSelFields" + sIncSuffix, "StringItemList", new String[] + CurUnoDialog.setControlProperty("lstSelFields" + sIncSuffix, PropertyNames.STRING_ITEM_LIST, new String[] { }); - CurUnoDialog.setControlProperty("lstFields" + sIncSuffix, "StringItemList", new String[] + CurUnoDialog.setControlProperty("lstFields" + sIncSuffix, PropertyNames.STRING_ITEM_LIST, new String[] { }); } @@ -670,14 +670,14 @@ public class FieldSelection public String[] getSelectedFieldNames() { - return (String[]) CurUnoDialog.getControlProperty("lstSelFields" + sIncSuffix, "StringItemList"); + return (String[]) CurUnoDialog.getControlProperty("lstSelFields" + sIncSuffix, PropertyNames.STRING_ITEM_LIST); } public void setSelectedFieldNames(String[] _sfieldnames) { - CurUnoDialog.setControlProperty("lstSelFields" + sIncSuffix, "StringItemList", _sfieldnames); + CurUnoDialog.setControlProperty("lstSelFields" + sIncSuffix, PropertyNames.STRING_ITEM_LIST, _sfieldnames); String[] sleftboxfieldnames = JavaTools.removefromList(xFieldsListBox.getItems(), _sfieldnames); - CurUnoDialog.setControlProperty("lstFields" + sIncSuffix, "StringItemList", sleftboxfieldnames); + CurUnoDialog.setControlProperty("lstFields" + sIncSuffix, PropertyNames.STRING_ITEM_LIST, sleftboxfieldnames); } public void setModified(boolean _bModified) @@ -692,6 +692,6 @@ public class FieldSelection public void changeSelectedFieldNames(String[] _sfieldnames) { - CurUnoDialog.setControlProperty("lstSelFields" + sIncSuffix, "StringItemList", _sfieldnames); + CurUnoDialog.setControlProperty("lstSelFields" + sIncSuffix, PropertyNames.STRING_ITEM_LIST, _sfieldnames); } } diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java b/wizards/com/sun/star/wizards/ui/FilterComponent.java index 09937a6af6d4..1bc24f71ac41 100644 --- a/wizards/com/sun/star/wizards/ui/FilterComponent.java +++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java @@ -128,7 +128,7 @@ public class FilterComponent public void itemStateChanged(com.sun.star.awt.ItemEvent EventObject) { int iKey = CurUnoDialog.getControlKey(EventObject.Source, CurUnoDialog.ControlList); - String sControlName = ""; + String sControlName = PropertyNames.EMPTY_STRING; switch (iKey) { case SO_FIRSTFIELDNAME: @@ -232,7 +232,7 @@ public class FilterComponent { e.printStackTrace(System.out); } - return ""; + return PropertyNames.EMPTY_STRING; } public PropertyValue[][] getFilterConditions() @@ -249,7 +249,7 @@ public class FilterComponent final XPropertyContainer column = (XPropertyContainer) UnoRuntime.queryInterface(XPropertyContainer.class, oQueryMetaData.xMSF.createInstance(serviceName)); column.addProperty("Type", PropertyAttribute.BOUND, DataType.VARCHAR); - column.addProperty(PropertyNames.PROPERTY_NAME, PropertyAttribute.BOUND, ""); + column.addProperty(PropertyNames.PROPERTY_NAME, PropertyAttribute.BOUND, PropertyNames.EMPTY_STRING); column.addProperty("Value", (short) (PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE), null); final XPropertySet columnSet = UnoRuntime.queryInterface(XPropertySet.class, column); @@ -341,7 +341,7 @@ public class FilterComponent String sreturn = JavaTools.replaceSubString(_BaseString, FieldName, ""); String soperator = sLogicOperators[_filtercondition.Handle - 1]; sreturn = JavaTools.replaceSubString(sreturn, soperator, ""); - String sDisplayValue = ""; + String sDisplayValue = PropertyNames.EMPTY_STRING; if ((_filtercondition.Handle != SQLFilterOperator.SQLNULL) && (_filtercondition.Handle != SQLFilterOperator.NOT_SQLNULL) && !AnyConverter.isVoid(_filtercondition.Value)) @@ -355,7 +355,7 @@ public class FilterComponent { e.printStackTrace(System.out); } - return ""; + return PropertyNames.EMPTY_STRING; } private int getfilterstate() @@ -678,7 +678,7 @@ public class FilterComponent PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, - "StringItemList", + PropertyNames.STRING_ITEM_LIST, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, @@ -734,11 +734,11 @@ public class FilterComponent { try { - short[] SelFields = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTFIELDNAME]), "SelectedItems")); + short[] SelFields = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTFIELDNAME]), PropertyNames.SELECTED_ITEMS)); if (SelFields.length > 0) { int nSelOperator = getSelectedOperator(); - // short[] SelOperator = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), "SelectedItems")); + // short[] SelOperator = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), PropertyNames.SELECTED_ITEMS)); if (nSelOperator == com.sun.star.sdb.SQLFilterOperator.SQLNULL || /* is null */ nSelOperator == com.sun.star.sdb.SQLFilterOperator.NOT_SQLNULL) /* is not null */ @@ -761,7 +761,7 @@ public class FilterComponent if (!AnyConverter.isVoid(oValue)) { String sValue = (String.valueOf(oValue)); - return (!sValue.equals("")); + return (!sValue.equals(PropertyNames.EMPTY_STRING)); } } } @@ -788,8 +788,8 @@ public class FilterComponent String sValue = AnyConverter.toString(_filtercondition.Value); if (sValue.indexOf("{D '") > -1) { - sValue = JavaTools.replaceSubString(sValue, "", "{D '"); - sValue = JavaTools.replaceSubString(sValue, "", "' }"); + sValue = JavaTools.replaceSubString(sValue, PropertyNames.EMPTY_STRING, "{D '"); + sValue = JavaTools.replaceSubString(sValue, PropertyNames.EMPTY_STRING, "' }"); try { oQueryMetaData.getNumberFormatter().convertStringToNumber(iDateFormat, sValue); @@ -801,8 +801,8 @@ public class FilterComponent } else if (sValue.indexOf("{T '") > -1) { - sValue = JavaTools.replaceSubString(sValue, "", "{T '"); - sValue = JavaTools.replaceSubString(sValue, "", "' }"); + sValue = JavaTools.replaceSubString(sValue, PropertyNames.EMPTY_STRING, "{T '"); + sValue = JavaTools.replaceSubString(sValue, PropertyNames.EMPTY_STRING, "' }"); try { oQueryMetaData.getNumberFormatter().convertStringToNumber(iTimeFormat, sValue); @@ -836,7 +836,7 @@ public class FilterComponent protected void setFieldNames(String[] _FieldNames) { - Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTFIELDNAME]), "StringItemList", _FieldNames); + Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTFIELDNAME]), PropertyNames.STRING_ITEM_LIST, _FieldNames); FieldNames = _FieldNames; } @@ -867,7 +867,7 @@ public class FilterComponent }; try { - iselected = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), "SelectedItems")); + iselected = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), PropertyNames.SELECTED_ITEMS)); } catch (Exception e) { @@ -875,7 +875,7 @@ public class FilterComponent } if ((iselected.length) == 0) { - Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), "SelectedItems", new short[] + Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), PropertyNames.SELECTED_ITEMS, new short[] { 0 }); @@ -891,7 +891,7 @@ public class FilterComponent { try { - short[] SelFields = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTFIELDNAME]), "SelectedItems")); + short[] SelFields = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTFIELDNAME]), PropertyNames.SELECTED_ITEMS)); return FieldNames[SelFields[0]]; } catch (Exception exception) @@ -907,7 +907,7 @@ public class FilterComponent { try { - short[] SelFields = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), "SelectedItems")); + short[] SelFields = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), PropertyNames.SELECTED_ITEMS)); switch (SelFields[0]) { case 0: diff --git a/wizards/com/sun/star/wizards/ui/ImageList.java b/wizards/com/sun/star/wizards/ui/ImageList.java index 3f57e93edaa1..5ee289ecf8a4 100644 --- a/wizards/com/sun/star/wizards/ui/ImageList.java +++ b/wizards/com/sun/star/wizards/ui/ImageList.java @@ -240,7 +240,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener lblImageText = dialog.insertLabel(name + "_imageText", pNames1, new Object[] { new Integer(imageTextHeight), - "", + PropertyNames.EMPTY_STRING, new Integer(pos.Width + 1), new Integer(pos.Height + (imageSize.Height + gap.Height) * rows + gap.Height), step, @@ -281,7 +281,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener lblCounter = dialog.insertLabel(name + "_lblCounter", pNames1, new Object[] { new Integer(LINE_HEIGHT), - "", + PropertyNames.EMPTY_STRING, new Integer(pos.Width + btnSize.intValue() + 1), new Integer(pos.Height + (imageSize.Height + gap.Height) * rows + gap.Height + imageTextHeight + ((btnSize.intValue() - LINE_HEIGHT) / 2)), step, @@ -818,7 +818,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener private void refreshImageText() { Object item = selected >= 0 ? getListModel().getElementAt(selected) : null; - Helper.setUnoPropertyValue(getModel(lblImageText), PropertyNames.PROPERTY_LABEL, " " + renderer.render(item)); + Helper.setUnoPropertyValue(getModel(lblImageText), PropertyNames.PROPERTY_LABEL, PropertyNames.SPACE + renderer.render(item)); } /** @@ -945,7 +945,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener public String render(Object counter) { - return "" + ((Counter) counter).start + ".." + ((Counter) counter).end + "/" + ((Counter) counter).max; + return PropertyNames.EMPTY_STRING + ((Counter) counter).start + ".." + ((Counter) counter).end + "/" + ((Counter) counter).max; } } diff --git a/wizards/com/sun/star/wizards/ui/PathSelection.java b/wizards/com/sun/star/wizards/ui/PathSelection.java index a19ca220490b..249a47a6b803 100755 --- a/wizards/com/sun/star/wizards/ui/PathSelection.java +++ b/wizards/com/sun/star/wizards/ui/PathSelection.java @@ -41,9 +41,9 @@ public class PathSelection XMultiServiceFactory xMSF; int iDialogType; int iTransferMode; - public String sDefaultDirectory = ""; - public String sDefaultName = ""; - public String sDefaultFilter = ""; + public String sDefaultDirectory = PropertyNames.EMPTY_STRING; + public String sDefaultName = PropertyNames.EMPTY_STRING; + public String sDefaultFilter = PropertyNames.EMPTY_STRING; public boolean usedPathPicker = false; public XPathSelectionListener xAction; public XTextComponent xSaveTextBox; @@ -91,7 +91,7 @@ public class PathSelection { new Boolean(Enabled), 12, TxtHelpURL, new Integer(XPos), new Integer(YPos + 10), new Integer(DialogStep), new Short((short) (CurTabIndex + 1)), new Integer(Width - 26) }); - //CurUnoDialog.setControlProperty("txtSavePath", "ReadOnly", Boolean.TRUE); + //CurUnoDialog.setControlProperty("txtSavePath", PropertyNames.READ_ONLY, Boolean.TRUE); CurUnoDialog.setControlProperty("txtSavePath", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); CurUnoDialog.insertButton("cmdSelectPath", "triggerPathPicker", this, new String[] { diff --git a/wizards/com/sun/star/wizards/ui/PeerConfig.java b/wizards/com/sun/star/wizards/ui/PeerConfig.java index 19617b593bd6..a13a02f0153c 100644 --- a/wizards/com/sun/star/wizards/ui/PeerConfig.java +++ b/wizards/com/sun/star/wizards/ui/PeerConfig.java @@ -129,7 +129,7 @@ public class PeerConfig implements XWindowListener for (int i = 0; i < this.aImageUrlTasks.size(); i++) { ImageUrlTask aImageUrlTask = (ImageUrlTask) aImageUrlTasks.elementAt(i); - String sImageUrl = ""; + String sImageUrl = PropertyNames.EMPTY_STRING; if (AnyConverter.isInt(aImageUrlTask.oResource)) { sImageUrl = oUnoDialog.getWizardImageUrl(((Integer) aImageUrlTask.oResource).intValue(), ((Integer) aImageUrlTask.oHCResource).intValue()); @@ -138,7 +138,7 @@ public class PeerConfig implements XWindowListener { sImageUrl = oUnoDialog.getImageUrl(((String) aImageUrlTask.oResource), ((String) aImageUrlTask.oHCResource)); } - if (!sImageUrl.equals("")) + if (!sImageUrl.equals(PropertyNames.EMPTY_STRING)) { Helper.setUnoPropertyValue(aImageUrlTask.oModel, PropertyNames.PROPERTY_IMAGEURL, sImageUrl); } diff --git a/wizards/com/sun/star/wizards/ui/SortingComponent.java b/wizards/com/sun/star/wizards/ui/SortingComponent.java index aa5e0b244022..bf1576525947 100644 --- a/wizards/com/sun/star/wizards/ui/SortingComponent.java +++ b/wizards/com/sun/star/wizards/ui/SortingComponent.java @@ -99,7 +99,7 @@ public class SortingComponent bDoEnable = (i < 2); CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lblSort" + new Integer(i + 1).toString(), new String[] { - PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.ORIENTATION, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { new Boolean(bDoEnable), 8, sSortHeader[i], 0, ICompPosX, new Integer(iCurPosY), IStep, new Short(curtabindex++), ICompWidth @@ -120,7 +120,7 @@ public class SortingComponent PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tag", PropertyNames.PROPERTY_WIDTH }, new Object[] { - bDoEnable, 10, HIDString, sSortAscend[i], IOptButtonPosX, new Integer(iCurPosY + 10), new Short((short) 1), IStep, new Short(curtabindex++), "ASC", IOptButtonWidth + bDoEnable, 10, HIDString, sSortAscend[i], IOptButtonPosX, new Integer(iCurPosY + 10), new Short((short) 1), IStep, new Short(curtabindex++), PropertyNames.ASC, IOptButtonWidth }); //, new Short((short) (18+i*4)) HIDString = HelpIds.getHelpIdString(FirstHelpIndex + 2); @@ -186,8 +186,8 @@ public class SortingComponent (short) 0 }; } - CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 1).toString(), "StringItemList", ViewFieldNames); - CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 1).toString(), "SelectedItems", SelList); + CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 1).toString(), PropertyNames.STRING_ITEM_LIST, ViewFieldNames); + CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 1).toString(), PropertyNames.SELECTED_ITEMS, SelList); toggleSortListBox(i, (i <= _SortFieldNames.length)); } } @@ -211,7 +211,7 @@ public class SortingComponent */ public void setReadOnly(int _index, boolean _breadonly) { - CurUnoDialog.setControlProperty("lstSort" + new Integer(_index + 1).toString(), "ReadOnly", new Boolean(_breadonly)); + CurUnoDialog.setControlProperty("lstSort" + new Integer(_index + 1).toString(), PropertyNames.READ_ONLY, new Boolean(_breadonly)); } /** @@ -261,12 +261,12 @@ public class SortingComponent ArrayList SortDescriptions = new ArrayList(); for (int i = 0; i <= MaxSortIndex; i++) { - if (!((Boolean) CurUnoDialog.getControlProperty("lstSort" + (i + 1), "ReadOnly"))) + if (!((Boolean) CurUnoDialog.getControlProperty("lstSort" + (i + 1), PropertyNames.READ_ONLY))) { CurFieldName = xSortListBox[i].getSelectedItem(); SortDescriptions.add(CurFieldName); iCurState = ((Short) CurUnoDialog.getControlProperty("optAscend" + new Integer(i + 1).toString(), PropertyNames.PROPERTY_STATE)).shortValue(); - SortFieldNames.add(new String[]{CurFieldName,iCurState == 1 ? "ASC" :"DESC" }); + SortFieldNames.add(new String[]{CurFieldName,iCurState == 1 ? PropertyNames.ASC :"DESC" }); } } // When searching for a duplicate entry we can neglect wether the entries are to be sorted ascending or descending @@ -303,7 +303,7 @@ public class SortingComponent toggleSortListBox(i, (false)); if (i < MaxSortIndex) { - CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 2).toString(), "SelectedItems", new short[] + CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 2).toString(), PropertyNames.SELECTED_ITEMS, new short[] { 0 }); @@ -326,15 +326,15 @@ public class SortingComponent iNextItemPos = xSortListBox[i + 1].getSelectedItemPos(); if (iNextItemPos != 0) { - CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 1).toString(), "SelectedItems", new short[] + CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 1).toString(), PropertyNames.SELECTED_ITEMS, new short[] { iNextItemPos }); - CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 2).toString(), "SelectedItems", new short[] + CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 2).toString(), PropertyNames.SELECTED_ITEMS, new short[] { }); toggleSortListBox(i, true); - CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 2).toString(), "SelectedItems", new short[] + CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 2).toString(), PropertyNames.SELECTED_ITEMS, new short[] { 0 }); @@ -363,7 +363,7 @@ public class SortingComponent CurUnoDialog.setControlProperty("optDescend" + new Integer(CurIndex + 1).toString(), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); if (bDoEnable == false) { - CurUnoDialog.setControlProperty("lstSort" + new Integer(CurIndex + 1).toString(), "SelectedItems", new short[] + CurUnoDialog.setControlProperty("lstSort" + new Integer(CurIndex + 1).toString(), PropertyNames.SELECTED_ITEMS, new short[] { 0 }); diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java b/wizards/com/sun/star/wizards/ui/UnoDialog.java index e4f92d537841..1798986a563a 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java @@ -277,19 +277,19 @@ public class UnoDialog implements EventNames // This function may look ugly, but this is the only way to check the count // of values in the model,which is always right. // the control is only a view and could be right or not. - final String[] fieldnames = (String[]) Helper.getUnoPropertyValue(getModel(_xListBox), "StringItemList"); + final String[] fieldnames = (String[]) Helper.getUnoPropertyValue(getModel(_xListBox), PropertyNames.STRING_ITEM_LIST); return fieldnames.length; } public static short getSelectedItemPos(XListBox _xListBox) { - short ipos[] = (short[]) Helper.getUnoPropertyValue(getModel(_xListBox), "SelectedItems"); + short ipos[] = (short[]) Helper.getUnoPropertyValue(getModel(_xListBox), PropertyNames.SELECTED_ITEMS); return ipos[0]; } public static boolean isListBoxSelected(XListBox _xListBox) { - short ipos[] = (short[]) Helper.getUnoPropertyValue(getModel(_xListBox), "SelectedItems"); + short ipos[] = (short[]) Helper.getUnoPropertyValue(getModel(_xListBox), PropertyNames.SELECTED_ITEMS); return ipos.length > 0; } @@ -697,11 +697,11 @@ public class UnoDialog implements EventNames public static void deselectListBox(XInterface _xBasisListBox) { Object oListBoxModel = getModel(_xBasisListBox); - Object sList = Helper.getUnoPropertyValue(oListBoxModel, "StringItemList"); - Helper.setUnoPropertyValue(oListBoxModel, "StringItemList", new String[] + Object sList = Helper.getUnoPropertyValue(oListBoxModel, PropertyNames.STRING_ITEM_LIST); + Helper.setUnoPropertyValue(oListBoxModel, PropertyNames.STRING_ITEM_LIST, new String[] { }); - Helper.setUnoPropertyValue(oListBoxModel, "StringItemList", sList); + Helper.setUnoPropertyValue(oListBoxModel, PropertyNames.STRING_ITEM_LIST, sList); } public void calculateDialogPosition(Rectangle FramePosSize) @@ -811,7 +811,7 @@ public class UnoDialog implements EventNames { FontDescriptor oFontDesc = new FontDescriptor(); oFontDesc.Weight = FontWeight; - setControlProperty(ControlName, "FontDescriptor", oFontDesc); + setControlProperty(ControlName, PropertyNames.FONT_DESCRIPTOR, oFontDesc); } /** @@ -863,7 +863,7 @@ public class UnoDialog implements EventNames xListBox.removeItems((short) 0, (short) 1); if (SelPos > 0) { - setControlProperty(ListBoxName, "SelectedItems", new short[SelPos]); + setControlProperty(ListBoxName, PropertyNames.SELECTED_ITEMS, new short[SelPos]); xListBox.selectItemPos((short) (SelPos - 1), true); } } @@ -1000,7 +1000,7 @@ public class UnoDialog implements EventNames */ public static String getDisplayProperty(int itype) { - // String propertyname = ""; + // String propertyname = PropertyNames.EMPTY_STRING; switch (itype) { case UIConsts.CONTROLTYPE.FIXEDTEXT: @@ -1036,9 +1036,9 @@ public class UnoDialog implements EventNames case UIConsts.CONTROLTYPE.PATTERNFIELD: return "Text"; case UIConsts.CONTROLTYPE.LISTBOX: - return "SelectedItems"; + return PropertyNames.SELECTED_ITEMS; default: - return ""; + return PropertyNames.EMPTY_STRING; } } diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.java b/wizards/com/sun/star/wizards/ui/UnoDialog2.java index a872accecdcc..c42fd453f957 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.java @@ -369,7 +369,7 @@ public class UnoDialog2 extends UnoDialog implements EventNames public String translateURL(String relativeURL) { - return ""; + return PropertyNames.EMPTY_STRING; } public static Object getControlModel(Object unoControl) diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java b/wizards/com/sun/star/wizards/ui/WizardDialog.java index 859904e7fc6f..9af5fc560a82 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.java +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java @@ -467,7 +467,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lnNaviSep", new String[] { - PropertyNames.PROPERTY_HEIGHT, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH + PropertyNames.PROPERTY_HEIGHT, PropertyNames.ORIENTATION, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -477,7 +477,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lnRoadSep", new String[] { - PropertyNames.PROPERTY_HEIGHT, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH + PropertyNames.PROPERTY_HEIGHT, PropertyNames.ORIENTATION, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -496,30 +496,30 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL }, new Object[] { - new Boolean(true), IButtonHeight, oWizardResource.getResText(UIConsts.RID_COMMON + 15), new Integer(iHelpPosX), new Integer(iBtnPosY), new Short((short) PushButtonType.HELP_value), ICurStep, new Short(curtabindex++), IButtonWidth + true, IButtonHeight, oWizardResource.getResText(UIConsts.RID_COMMON + 15), new Integer(iHelpPosX), new Integer(iBtnPosY), new Short((short) PushButtonType.HELP_value), ICurStep, new Short(curtabindex++), IButtonWidth }); insertButton("btnWizardBack", BACK_ACTION_PERFORMED, propNames, new Object[] { - new Boolean(false), IButtonHeight, HelpIds.getHelpIdString(hid + 2), oWizardResource.getResText(UIConsts.RID_COMMON + 13), new Integer(iBackPosX), new Integer(iBtnPosY), new Short((short) PushButtonType.STANDARD_value), ICurStep, new Short(curtabindex++), IButtonWidth + false, IButtonHeight, HelpIds.getHelpIdString(hid + 2), oWizardResource.getResText(UIConsts.RID_COMMON + 13), new Integer(iBackPosX), new Integer(iBtnPosY), new Short((short) PushButtonType.STANDARD_value), ICurStep, new Short(curtabindex++), IButtonWidth }); insertButton("btnWizardNext", NEXT_ACTION_PERFORMED, propNames, new Object[] { - new Boolean(true), IButtonHeight, HelpIds.getHelpIdString(hid + 3), oWizardResource.getResText(UIConsts.RID_COMMON + 14), new Integer(iNextPosX), new Integer(iBtnPosY), new Short((short) PushButtonType.STANDARD_value), ICurStep, new Short(curtabindex++), IButtonWidth + true, IButtonHeight, HelpIds.getHelpIdString(hid + 3), oWizardResource.getResText(UIConsts.RID_COMMON + 14), new Integer(iNextPosX), new Integer(iBtnPosY), new Short((short) PushButtonType.STANDARD_value), ICurStep, new Short(curtabindex++), IButtonWidth }); insertButton("btnWizardFinish", FINISH_ACTION_PERFORMED, propNames, new Object[] { - new Boolean(true), IButtonHeight, HelpIds.getHelpIdString(hid + 4), oWizardResource.getResText(UIConsts.RID_COMMON + 12), new Integer(iFinishPosX), new Integer(iBtnPosY), new Short((short) PushButtonType.STANDARD_value), ICurStep, new Short(curtabindex++), IButtonWidth + true, IButtonHeight, HelpIds.getHelpIdString(hid + 4), oWizardResource.getResText(UIConsts.RID_COMMON + 12), new Integer(iFinishPosX), new Integer(iBtnPosY), new Short((short) PushButtonType.STANDARD_value), ICurStep, new Short(curtabindex++), IButtonWidth }); insertButton("btnWizardCancel", CANCEL_ACTION_PERFORMED, propNames, new Object[] { - new Boolean(true), IButtonHeight, HelpIds.getHelpIdString(hid + 5), oWizardResource.getResText(UIConsts.RID_COMMON + 11), new Integer(iCancelPosX), new Integer(iBtnPosY), new Short((short) PushButtonType.STANDARD_value), ICurStep, new Short(curtabindex++), IButtonWidth + true, IButtonHeight, HelpIds.getHelpIdString(hid + 5), oWizardResource.getResText(UIConsts.RID_COMMON + 11), new Integer(iCancelPosX), new Integer(iBtnPosY), new Short((short) PushButtonType.STANDARD_value), ICurStep, new Short(curtabindex++), IButtonWidth }); setControlProperty("btnWizardNext", "DefaultButton", Boolean.TRUE); @@ -747,7 +747,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL insertLabel("lblQueryTitle" + String.valueOf(i), new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.java b/wizards/com/sun/star/wizards/ui/event/DataAware.java index 4c8d009f967a..63213e444dc9 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAware.java +++ b/wizards/com/sun/star/wizards/ui/event/DataAware.java @@ -320,7 +320,7 @@ public abstract class DataAware { ex2.printStackTrace(); } catch (NullPointerException npe) { if (getMethod.getReturnType().equals(String.class)) - return ""; + return PropertyNames.EMPTY_STRING; if (getMethod.getReturnType().equals(Short.class)) return new Short((short) 0); if (getMethod.getReturnType().equals(Integer.class)) diff --git a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java index 3a5a1f6b637a..4dc917a76ad3 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java +++ b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java @@ -312,11 +312,11 @@ public class DataAwareFields if (convertTo.equals(Boolean.class)) { - return (s != null && !s.equals("") && s.equals("true")) ? Boolean.TRUE : Boolean.FALSE; + return (s != null && !s.equals(PropertyNames.EMPTY_STRING) && s.equals("true")) ? Boolean.TRUE : Boolean.FALSE; } else if (convertTo.equals(Integer.class)) { - if (s == null || s.equals("")) + if (s == null || s.equals(PropertyNames.EMPTY_STRING)) { return Any.VOID; } @@ -327,7 +327,7 @@ public class DataAwareFields } else if (convertTo.equals(Double.class)) { - if (s == null || s.equals("")) + if (s == null || s.equals(PropertyNames.EMPTY_STRING)) { return Any.VOID; } @@ -352,7 +352,7 @@ public class DataAwareFields { try { - field.set(target, value == null || (value.equals(Any.VOID)) ? "" : value.toString()); + field.set(target, value == null || (value.equals(Any.VOID)) ? PropertyNames.EMPTY_STRING : value.toString()); } catch (IllegalAccessException ex) { @@ -380,7 +380,7 @@ public class DataAwareFields { if (field.getType().equals(String.class)) { - return ""; + return PropertyNames.EMPTY_STRING; } if (field.getType().equals(Short.class)) { diff --git a/wizards/com/sun/star/wizards/ui/event/ListModelBinder.java b/wizards/com/sun/star/wizards/ui/event/ListModelBinder.java index b2dc75f22f48..b29b960d4c06 100644 --- a/wizards/com/sun/star/wizards/ui/event/ListModelBinder.java +++ b/wizards/com/sun/star/wizards/ui/event/ListModelBinder.java @@ -34,6 +34,7 @@ import com.sun.star.awt.XComboBox; import com.sun.star.awt.XListBox; import com.sun.star.uno.UnoRuntime; import com.sun.star.wizards.common.Helper; +import com.sun.star.wizards.common.PropertyNames; /** * @author rpiterman @@ -52,7 +53,7 @@ public class ListModelBinder implements ListDataListener { if (item == null) { - return ""; + return PropertyNames.EMPTY_STRING; } else { @@ -119,12 +120,12 @@ public class ListModelBinder implements ListDataListener protected short[] getSelectedItems() { - return (short[]) Helper.getUnoPropertyValue(unoListModel, "SelectedItems"); + return (short[]) Helper.getUnoPropertyValue(unoListModel, PropertyNames.SELECTED_ITEMS); } protected void setSelectedItems(short[] selected) { - Helper.setUnoPropertyValue(unoListModel, "SelectedItems", selected); + Helper.setUnoPropertyValue(unoListModel, PropertyNames.SELECTED_ITEMS, selected); } /* (non-Javadoc) @@ -180,7 +181,7 @@ public class ListModelBinder implements ListDataListener public static void fillList(Object list, Object[] items, Renderer renderer) { XListBox xlist = (XListBox) UnoRuntime.queryInterface(XListBox.class, list); - Helper.setUnoPropertyValue(UnoDataAware.getModel(list), "StringItemList", new String[] + Helper.setUnoPropertyValue(UnoDataAware.getModel(list), PropertyNames.STRING_ITEM_LIST, new String[] { }); for (short i = 0; i < items.length; i++) @@ -195,7 +196,7 @@ public class ListModelBinder implements ListDataListener public static void fillComboBox(Object list, Object[] items, Renderer renderer) { XComboBox xComboBox = (XComboBox) UnoRuntime.queryInterface(XComboBox.class, list); - Helper.setUnoPropertyValue(UnoDataAware.getModel(list), "StringItemList", new String[] + Helper.setUnoPropertyValue(UnoDataAware.getModel(list), PropertyNames.STRING_ITEM_LIST, new String[] { }); for (short i = 0; i < items.length; i++) diff --git a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java index 86c50b13ce02..c45a496c7849 100644 --- a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java +++ b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java @@ -28,7 +28,6 @@ package com.sun.star.wizards.ui.event; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import com.sun.star.wizards.common.PropertyNames; /** * Encapsulate a Method invocation. diff --git a/wizards/com/sun/star/wizards/ui/event/SimpleDataAware.java b/wizards/com/sun/star/wizards/ui/event/SimpleDataAware.java index 8a9c2200d76d..e6c23226d0e7 100644 --- a/wizards/com/sun/star/wizards/ui/event/SimpleDataAware.java +++ b/wizards/com/sun/star/wizards/ui/event/SimpleDataAware.java @@ -69,7 +69,7 @@ public class SimpleDataAware extends DataAware return (Boolean)value; else if (value.getClass().isArray()) return ((short[])value).length != 0 ? Boolean.TRUE : Boolean.FALSE; - else if (value.equals("")) return Boolean.FALSE; + else if (value.equals(PropertyNames.EMPTY_STRING)) return Boolean.FALSE; else return Boolean.TRUE; } diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java index acc0ed8787e6..5ab0a8f20743 100644 --- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java +++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java @@ -126,7 +126,7 @@ public class UnoDataAware extends DataAware { return ((short[]) value).length != 0 ? Boolean.TRUE : Boolean.FALSE; } - else if (value.equals("")) + else if (value.equals(PropertyNames.EMPTY_STRING)) { return Boolean.FALSE; } @@ -179,7 +179,7 @@ public class UnoDataAware extends DataAware public static UnoDataAware attachEditControl(Object data, String prop, Object unoControl, Listener listener, boolean field) { - return attachTextControl(data, prop, unoControl, listener, "Text", field, ""); + return attachTextControl(data, prop, unoControl, listener, "Text", field, PropertyNames.EMPTY_STRING); } public static UnoDataAware attachDateControl(Object data, String prop, Object unoControl, Listener listener, boolean field) @@ -232,7 +232,7 @@ public class UnoDataAware extends DataAware public static UnoDataAware attachLabel(Object data, String prop, Object label, final Listener listener, boolean field) { return new UnoDataAware(data, - field ? DataAwareFields.getFieldValueFor(data, prop, "") + field ? DataAwareFields.getFieldValueFor(data, prop, PropertyNames.EMPTY_STRING) : new DataAware.PropertyValue(prop, data), label, PropertyNames.PROPERTY_LABEL); } @@ -244,7 +244,7 @@ public class UnoDataAware extends DataAware field ? DataAwareFields.getFieldValueFor(data, prop, new short[0]) : new DataAware.PropertyValue(prop, data), - listBox, "SelectedItems"); + listBox, PropertyNames.SELECTED_ITEMS); xListBox.addItemListener(itemListener(uda, listener)); return uda; } diff --git a/wizards/com/sun/star/wizards/web/BackgroundsDialog.java b/wizards/com/sun/star/wizards/web/BackgroundsDialog.java index 70c40fbc6072..f31294a190b5 100644 --- a/wizards/com/sun/star/wizards/web/BackgroundsDialog.java +++ b/wizards/com/sun/star/wizards/web/BackgroundsDialog.java @@ -33,6 +33,7 @@ import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.wizards.common.ConfigSet; import com.sun.star.wizards.common.Configuration; import com.sun.star.wizards.common.FileAccess; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.SystemDialog; import com.sun.star.wizards.ui.ImageList; import com.sun.star.wizards.web.data.CGImage; @@ -127,7 +128,7 @@ public class BackgroundsDialog extends ImageListDialog { Object configView = Configuration.getConfigurationRoot(xMSF, FileAccess.connectURLs(WebWizardConst.CONFIG_PATH, "BackgroundImages"), true); int i = Configuration.getChildrenNames(configView).length + 1; - Object o = Configuration.addConfigNode(configView, "" + i); + Object o = Configuration.addConfigNode(configView, PropertyNames.EMPTY_STRING + i); Configuration.set(s, "Href", o); Configuration.commit(configView); } @@ -172,7 +173,7 @@ public class BackgroundsDialog extends ImageListDialog public String render(Object object) { - return object == null ? "" : FileAccess.getPathFilename(fileAccess.getPath((String) object, null)); + return object == null ? PropertyNames.EMPTY_STRING : FileAccess.getPathFilename(fileAccess.getPath((String) object, null)); } } diff --git a/wizards/com/sun/star/wizards/web/CallWizard.java b/wizards/com/sun/star/wizards/web/CallWizard.java index 4fab3ea43bf9..6cabc6f145d1 100644 --- a/wizards/com/sun/star/wizards/web/CallWizard.java +++ b/wizards/com/sun/star/wizards/web/CallWizard.java @@ -38,6 +38,7 @@ import com.sun.star.task.XJob; import com.sun.star.task.XJobExecutor; import com.sun.star.uno.Type; import com.sun.star.wizards.common.Desktop; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.Resource; /** @@ -107,7 +108,7 @@ public class CallWizard */ public void trigger(String str) { - if (str.equalsIgnoreCase("start")) + if (str.equalsIgnoreCase(PropertyNames.START)) { if (webWizard == null) { @@ -226,7 +227,7 @@ public class CallWizard try { - byteReturn = ("" + this.hashCode()).getBytes(); + byteReturn = (PropertyNames.EMPTY_STRING + this.hashCode()).getBytes(); } catch (Exception exception) { @@ -284,7 +285,7 @@ public class CallWizard { XMultiServiceFactory xmsf = Desktop.connect(ConnectStr); CallWizard.WizardImplementation ww = new CallWizard.WizardImplementation(xmsf); - ww.trigger("start"); + ww.trigger(PropertyNames.START); } catch (Exception exception) diff --git a/wizards/com/sun/star/wizards/web/FTPDialog.java b/wizards/com/sun/star/wizards/web/FTPDialog.java index c95a060f167f..c4101f30c92c 100644 --- a/wizards/com/sun/star/wizards/web/FTPDialog.java +++ b/wizards/com/sun/star/wizards/web/FTPDialog.java @@ -153,16 +153,16 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID //Resources Object private FTPDialogResources resources; private List dataAware = new Vector(); - public String username = ""; - public String password = ""; + public String username = PropertyNames.EMPTY_STRING; + public String password = PropertyNames.EMPTY_STRING; /** * The ftp host name */ - public String host = ""; + public String host = PropertyNames.EMPTY_STRING; /** * The ftp directory. */ - private String dir = ""; + private String dir = PropertyNames.EMPTY_STRING; /** * the ftp publish object which contains the * data for this dialog. @@ -353,7 +353,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID PROPNAMES_BUTTON2, new Object[] { - INTEGER_14, "", resources.resbtnHelp_value, "btnHelp", 57, 142, new Short((short) PushButtonType.HELP_value), new Short((short) 15), INTEGER_50 + INTEGER_14, PropertyNames.EMPTY_STRING, resources.resbtnHelp_value, "btnHelp", 57, 142, new Short((short) PushButtonType.HELP_value), new Short((short) 15), INTEGER_50 }); } @@ -379,8 +379,8 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID public short execute(UnoDialog parent) throws Exception { host = extractHost(publish.cp_URL); - username = publish.cp_Username == null ? "" : publish.cp_Username; - password = publish.password == null ? "" : publish.password; + username = publish.cp_Username == null ? PropertyNames.EMPTY_STRING : publish.cp_Username; + password = publish.password == null ? PropertyNames.EMPTY_STRING : publish.password; dir = extractDir(publish.cp_URL); setLabel(STATUS_UNKONWN); @@ -419,7 +419,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID { if (ftpUrl == null || ftpUrl.length() < 6) { - return ""; + return PropertyNames.EMPTY_STRING; } String url = ftpUrl.substring(6); int i = url.indexOf("/"); @@ -469,11 +469,11 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID /** * @param s - * @return true if the string is null or "". + * @return true if the string is null or PropertyNames.EMPTY_STRING. */ private final boolean isEmpty(String s) { - return (s == null) || (s.equals("")); + return (s == null) || (s.equals(PropertyNames.EMPTY_STRING)); } /** @@ -724,7 +724,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID public void chooseDirectory() { SystemDialog sd = SystemDialog.createOfficeFolderDialog(xMSF); - String newUrl = sd.callFolderDialog(resources.resFTPDirectory, "", getFullUrl()); + String newUrl = sd.callFolderDialog(resources.resFTPDirectory, PropertyNames.EMPTY_STRING, getFullUrl()); if (newUrl != null) { /* if the user chose a local directory, diff --git a/wizards/com/sun/star/wizards/web/IconsDialog.java b/wizards/com/sun/star/wizards/web/IconsDialog.java index 6228180a75f4..83be292e79b8 100644 --- a/wizards/com/sun/star/wizards/web/IconsDialog.java +++ b/wizards/com/sun/star/wizards/web/IconsDialog.java @@ -32,6 +32,7 @@ import com.sun.star.awt.Size; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.wizards.common.ConfigSet; import com.sun.star.wizards.common.FileAccess; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.ui.ImageList; import com.sun.star.wizards.web.data.CGIconSet; @@ -79,7 +80,7 @@ public class IconsDialog extends ImageListDialog implements ImageList.IImageRend resources.resCounter }); - htmlexpDirectory = FileAccess.getOfficePath(xmsf, "Gallery", "share", ""); + htmlexpDirectory = FileAccess.getOfficePath(xmsf, "Gallery", "share", PropertyNames.EMPTY_STRING); set = set_; objects = new Integer[set.getSize() * icons.length]; for (int i = 0; i < objects.length; i++) @@ -174,7 +175,7 @@ public class IconsDialog extends ImageListDialog implements ImageList.IImageRend { if (object == null) { - return ""; + return PropertyNames.EMPTY_STRING; } int i = ((Number) object).intValue(); int iset = getIconsetNum(i); diff --git a/wizards/com/sun/star/wizards/web/ImageListDialog.java b/wizards/com/sun/star/wizards/web/ImageListDialog.java index c726c0266df1..3943271408fe 100644 --- a/wizards/com/sun/star/wizards/web/ImageListDialog.java +++ b/wizards/com/sun/star/wizards/web/ImageListDialog.java @@ -165,7 +165,7 @@ public abstract class ImageListDialog extends UnoDialog2 implements UIConsts PROPNAMES, new Object[] { - Boolean.FALSE, INTEGER_14, "", resources[RES_HELP], "CommandButton3", iButtonsX, 71, new Short((short) com.sun.star.awt.PushButtonType.HELP_value), new Short((short) 9), INTEGER_50 + Boolean.FALSE, INTEGER_14, PropertyNames.EMPTY_STRING, resources[RES_HELP], "CommandButton3", iButtonsX, 71, new Short((short) com.sun.star.awt.PushButtonType.HELP_value), new Short((short) 9), INTEGER_50 }); if (showOtherButton) @@ -208,7 +208,7 @@ public abstract class ImageListDialog extends UnoDialog2 implements UIConsts lblTitle = insertLabel("lblTitle", new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -275,9 +275,9 @@ public abstract class ImageListDialog extends UnoDialog2 implements UIConsts public String render(Object counter) { - String s = JavaTools.replaceSubString(template, "" + ((Counter) counter).start, START); - s = JavaTools.replaceSubString(s, "" + ((Counter) counter).end, END); - s = JavaTools.replaceSubString(s, "" + ((Counter) counter).max, TOTAL); + String s = JavaTools.replaceSubString(template, PropertyNames.EMPTY_STRING + ((Counter) counter).start, START); + s = JavaTools.replaceSubString(s, PropertyNames.EMPTY_STRING + ((Counter) counter).end, END); + s = JavaTools.replaceSubString(s, PropertyNames.EMPTY_STRING + ((Counter) counter).max, TOTAL); return s; } } diff --git a/wizards/com/sun/star/wizards/web/LogTaskListener.java b/wizards/com/sun/star/wizards/web/LogTaskListener.java index f1814f9e4cb6..8666aaf9738e 100644 --- a/wizards/com/sun/star/wizards/web/LogTaskListener.java +++ b/wizards/com/sun/star/wizards/web/LogTaskListener.java @@ -33,6 +33,7 @@ */ package com.sun.star.wizards.web; +import com.sun.star.wizards.common.PropertyNames; import java.io.PrintStream; import com.sun.star.wizards.ui.event.TaskEvent; @@ -96,7 +97,7 @@ public class LogTaskListener implements TaskListener, ErrorHandler */ public boolean error(Exception ex, Object arg, int ix, int i) { - System.out.println("" + arg + "//" + ix + "//Exception: " + ex.getLocalizedMessage()); + System.out.println(PropertyNames.EMPTY_STRING + arg + "//" + ix + "//Exception: " + ex.getLocalizedMessage()); ex.printStackTrace(); return true; } diff --git a/wizards/com/sun/star/wizards/web/Process.java b/wizards/com/sun/star/wizards/web/Process.java index d1ae8e23763e..3140d3dc328c 100644 --- a/wizards/com/sun/star/wizards/web/Process.java +++ b/wizards/com/sun/star/wizards/web/Process.java @@ -43,6 +43,7 @@ import org.w3c.dom.Document; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.wizards.common.ConfigSet; import com.sun.star.wizards.common.FileAccess; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.UCB; import com.sun.star.wizards.ui.event.Task; import com.sun.star.wizards.web.data.CGContent; @@ -240,7 +241,7 @@ public class Process implements WebWizardConst, ProcessErrors { try { - String s = FileAccess.getOfficePath(xmsf, "Temp", "", ""); + String s = FileAccess.getOfficePath(xmsf, "Temp", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING); return s; } catch (Exception e) @@ -308,7 +309,7 @@ public class Process implements WebWizardConst, ProcessErrors //2. background image String background = settings.cp_DefaultSession.cp_Design.cp_BackgroundImage; - if (background != null && !background.equals("")) + if (background != null && !background.equals(PropertyNames.EMPTY_STRING)) { sourceDir = FileAccess.getParentDir(background); filename = background.substring(sourceDir.length()); @@ -354,7 +355,7 @@ public class Process implements WebWizardConst, ProcessErrors catch (Exception ex) { //error in copying media - error(ex, "", ERROR_PUBLISH_MEDIA, ErrorHandler.ERROR_PROCESS_FATAL); + error(ex, PropertyNames.EMPTY_STRING, ERROR_PUBLISH_MEDIA, ErrorHandler.ERROR_PROCESS_FATAL); return false; } @@ -435,7 +436,7 @@ public class Process implements WebWizardConst, ProcessErrors } catch (Exception ex) { - error(ex, "", ERROR_GENERATE_XSLT, ErrorHandler.ERROR_PROCESS_FATAL); + error(ex, PropertyNames.EMPTY_STRING, ERROR_GENERATE_XSLT, ErrorHandler.ERROR_PROCESS_FATAL); return false; } @@ -519,7 +520,7 @@ public class Process implements WebWizardConst, ProcessErrors for (Iterator i = templates.keySet().iterator(); i.hasNext();) { - String key = ""; + String key = PropertyNames.EMPTY_STRING; key = (String) i.next(); @@ -586,7 +587,7 @@ public class Process implements WebWizardConst, ProcessErrors * faileure here is fatal. */ contentDir = fileAccess.createNewDir(dir, content.cp_Name); - if (contentDir == null || contentDir.equals("")) + if (contentDir == null || contentDir.equals(PropertyNames.EMPTY_STRING)) { throw new IOException("Directory " + dir + " could not be created."); } @@ -697,7 +698,7 @@ public class Process implements WebWizardConst, ProcessErrors * the copyExporter does not change * the extension of the target... */ - String destExt = (exporter.cp_Extension.equals("") + String destExt = (exporter.cp_Extension.equals(PropertyNames.EMPTY_STRING) ? FileAccess.getExtension(docFilename) : exporter.cp_Extension); diff --git a/wizards/com/sun/star/wizards/web/StatusDialog.java b/wizards/com/sun/star/wizards/web/StatusDialog.java index 3e3d40f54e76..c0e6b08f6cff 100644 --- a/wizards/com/sun/star/wizards/web/StatusDialog.java +++ b/wizards/com/sun/star/wizards/web/StatusDialog.java @@ -109,7 +109,7 @@ public class StatusDialog extends UnoDialog2 implements TaskListener }, new Object[] { - 8, "", new Integer(width * 2 / 3), 6, new Short(tabstop++), new Integer(width / 3 - 4) + 8, PropertyNames.EMPTY_STRING, new Integer(width * 2 / 3), 6, new Short(tabstop++), new Integer(width / 3 - 4) }); progressBar = insertProgressBar("progress", new String[] diff --git a/wizards/com/sun/star/wizards/web/StylePreview.java b/wizards/com/sun/star/wizards/web/StylePreview.java index 93507929d84b..c6c095eb9388 100644 --- a/wizards/com/sun/star/wizards/web/StylePreview.java +++ b/wizards/com/sun/star/wizards/web/StylePreview.java @@ -28,6 +28,7 @@ package com.sun.star.wizards.web; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.wizards.common.FileAccess; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.web.data.CGStyle; /** @@ -98,7 +99,7 @@ public class StylePreview String css = FileAccess.connectURLs(wwRoot, "styles/" + style.cp_CssHref); - if (background == null || background.equals("")) + if (background == null || background.equals(PropertyNames.EMPTY_STRING)) { //delete the background image if (fileAccess.exists(backgroundFilename, false)) @@ -137,7 +138,7 @@ public class StylePreview */ private String createTempDir(XMultiServiceFactory xmsf) throws Exception { - String tempPath = FileAccess.getOfficePath(xmsf, "Temp", "", ""); + String tempPath = FileAccess.getOfficePath(xmsf, "Temp", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING); String s = fileAccess.createNewDir(tempPath, "wwiz"); fileAccess.createNewDir(s, "images"); return s; diff --git a/wizards/com/sun/star/wizards/web/TOCPreview.java b/wizards/com/sun/star/wizards/web/TOCPreview.java index 1fb70a11d4b5..bd7f84527343 100644 --- a/wizards/com/sun/star/wizards/web/TOCPreview.java +++ b/wizards/com/sun/star/wizards/web/TOCPreview.java @@ -35,6 +35,7 @@ import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.util.URL; import com.sun.star.wizards.common.Desktop; import com.sun.star.wizards.common.FileAccess; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.UCB; import com.sun.star.wizards.ui.event.Task; import com.sun.star.wizards.web.data.CGLayout; @@ -101,7 +102,7 @@ public class TOCPreview { Document doc = (Document) settings.cp_DefaultSession.createDOM(); CGLayout layout = settings.cp_DefaultSession.getLayout(); - Task task = new Task("", "", 10000); + Task task = new Task(PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING, 10000); Process.generate(xmsf, layout, doc, fileAccess, tempDir, task); Process.copyLayoutFiles(ucb, fileAccess, settings, layout, tempDir); xDispatch.dispatch(openHyperlink, loadArgs); //Dispatch.dispatch(openHyperlink, loadArgs); @@ -110,7 +111,7 @@ public class TOCPreview private PropertyValue[] loadArgs(String url) { PropertyValue pv = new PropertyValue(); - pv.Name = "URL"; + pv.Name = PropertyNames.URL; pv.Value = url; return new PropertyValue[] { diff --git a/wizards/com/sun/star/wizards/web/WWD_Events.java b/wizards/com/sun/star/wizards/web/WWD_Events.java index 26f518c4e6c8..f4b657854592 100644 --- a/wizards/com/sun/star/wizards/web/WWD_Events.java +++ b/wizards/com/sun/star/wizards/web/WWD_Events.java @@ -67,10 +67,10 @@ public abstract class WWD_Events extends WWD_Startup private static final short[] EMPTY_SHORT_ARRAY = new short[0]; /** * Tracks the current loaded session. - * If "" - it means the current session is the default one (empty) + * If PropertyNames.EMPTY_STRING - it means the current session is the default one (empty) * If a session is loaded, this will be the name of the loaded session. */ - protected String currentSession = ""; + protected String currentSession = PropertyNames.EMPTY_STRING; /** * He - my constructor ! @@ -106,11 +106,11 @@ public abstract class WWD_Events extends WWD_Startup { if ((old == 1)) { - String sessionToLoad = ""; - short[] s = (short[]) Helper.getUnoPropertyValue(getModel(lstLoadSettings), "SelectedItems"); + String sessionToLoad = PropertyNames.EMPTY_STRING; + short[] s = (short[]) Helper.getUnoPropertyValue(getModel(lstLoadSettings), PropertyNames.SELECTED_ITEMS); if (s.length == 0 || s[0] == 0) { - sessionToLoad = ""; + sessionToLoad = PropertyNames.EMPTY_STRING; } else { @@ -135,7 +135,7 @@ public abstract class WWD_Events extends WWD_Startup */ public void sessionSelected() { - short[] s = (short[]) Helper.getUnoPropertyValue(getModel(lstLoadSettings), "SelectedItems"); + short[] s = (short[]) Helper.getUnoPropertyValue(getModel(lstLoadSettings), PropertyNames.SELECTED_ITEMS); setEnabled(btnDelSession, s.length > 0 && s[0] > 0); } @@ -148,18 +148,18 @@ public abstract class WWD_Events extends WWD_Startup { final StatusDialog sd = getStatusDialog(); - final Task task = new Task("LoadDocs", "", 10); + final Task task = new Task("LoadDocs", PropertyNames.EMPTY_STRING, 10); sd.execute(this, task, resources.resLoadingSession); task.start(); setSelectedDoc(EMPTY_SHORT_ARRAY); - Helper.setUnoPropertyValue(getModel(lstDocuments), "SelectedItems", EMPTY_SHORT_ARRAY); - Helper.setUnoPropertyValue(getModel(lstDocuments), "StringItemList", EMPTY_STRING_ARRAY); + Helper.setUnoPropertyValue(getModel(lstDocuments), PropertyNames.SELECTED_ITEMS, EMPTY_SHORT_ARRAY); + Helper.setUnoPropertyValue(getModel(lstDocuments), PropertyNames.STRING_ITEM_LIST, EMPTY_STRING_ARRAY); Object view = null; - if (sessionToLoad.equals("")) + if (sessionToLoad.equals(PropertyNames.EMPTY_STRING)) { view = Configuration.getConfigurationRoot(xMSF, CONFIG_PATH + "/DefaultSession", false); } @@ -175,7 +175,7 @@ public abstract class WWD_Events extends WWD_Startup task.setMax(session.cp_Content.cp_Documents.getSize() * 5 + 7); task.advance(true); - if (sessionToLoad.equals("")) + if (sessionToLoad.equals(PropertyNames.EMPTY_STRING)) { setSaveSessionName(session); } @@ -212,7 +212,7 @@ public abstract class WWD_Events extends WWD_Startup */ public void delSession() { - short[] selected = (short[]) Helper.getUnoPropertyValue(getModel(lstLoadSettings), "SelectedItems"); + short[] selected = (short[]) Helper.getUnoPropertyValue(getModel(lstLoadSettings), PropertyNames.SELECTED_ITEMS); if (selected.length == 0) { return; @@ -254,7 +254,7 @@ public abstract class WWD_Events extends WWD_Startup { Helper.setUnoPropertyValue(getModel(btnDelSession), PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); // select... } - Helper.setUnoPropertyValue(getModel(lstLoadSettings), "SelectedItems", nextSelected); + Helper.setUnoPropertyValue(getModel(lstLoadSettings), PropertyNames.SELECTED_ITEMS, nextSelected); //ListModelBinder.fillComboBox(cbSaveSettings, settings.savedSessions.items(), null); @@ -332,7 +332,7 @@ public abstract class WWD_Events extends WWD_Startup { return; } - final Task task = new Task("", "", files.length * 5); + final Task task = new Task(PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING, files.length * 5); /* * If more than a certain number @@ -455,7 +455,7 @@ public abstract class WWD_Events extends WWD_Startup { if (background == null) { - background = ""; + background = PropertyNames.EMPTY_STRING; } settings.cp_DefaultSession.cp_Design.cp_BackgroundImage = (String) background; refreshStylePreview(); @@ -543,7 +543,7 @@ public abstract class WWD_Events extends WWD_Startup */ public void setPublishLocalDir() { - String dir = showFolderDialog("Local destination directory", "", settings.cp_DefaultSession.cp_OutDirectory); + String dir = showFolderDialog("Local destination directory", PropertyNames.EMPTY_STRING, settings.cp_DefaultSession.cp_OutDirectory); //if ok was pressed... setPublishUrl(LOCAL_PUBLISHER, dir, 0); @@ -898,7 +898,7 @@ public abstract class WWD_Events extends WWD_Startup } else { - return ""; + return PropertyNames.EMPTY_STRING; } } @@ -965,7 +965,7 @@ public abstract class WWD_Events extends WWD_Startup */ final CGPublish p = getPublisher(FTP_PUBLISHER); // if ftp is checked, and no proxies are set, and password is empty... - if (p.cp_Publish && (!proxies) && (p.password == null || p.password.equals(""))) + if (p.cp_Publish && (!proxies) && (p.password == null || p.password.equals(PropertyNames.EMPTY_STRING))) { if (showFTPDialog(p)) { @@ -1036,7 +1036,7 @@ public abstract class WWD_Events extends WWD_Startup } else { - settings.cp_LastSavedSession = ""; + settings.cp_LastSavedSession = PropertyNames.EMPTY_STRING; } try { diff --git a/wizards/com/sun/star/wizards/web/WWD_General.java b/wizards/com/sun/star/wizards/web/WWD_General.java index fd716e1b9c06..cb109fd01668 100644 --- a/wizards/com/sun/star/wizards/web/WWD_General.java +++ b/wizards/com/sun/star/wizards/web/WWD_General.java @@ -64,7 +64,7 @@ public abstract class WWD_General extends WebWizardDialog StatusDialog statusDialog = new StatusDialog(xMSF, StatusDialog.STANDARD_WIDTH, resources.resLoadingSession, false, new String[] { - resources.prodName, "", "", "", "", "" + resources.prodName, PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING }, HelpIds.getHelpIdString(HID0_STATUS_DIALOG)); try { @@ -302,7 +302,7 @@ public abstract class WWD_General extends WebWizardDialog public boolean checkSaveSession() { return (!isSaveSession() || - !getSessionSaveName().equals("")); + !getSessionSaveName().equals(PropertyNames.EMPTY_STRING)); } @@ -317,7 +317,7 @@ public abstract class WWD_General extends WebWizardDialog if (p.cp_Publish) { String url = (String) Helper.getUnoPropertyValue(getModel(text), property); - if ((url == null) || (url.equals(""))) + if ((url == null) || (url.equals(PropertyNames.EMPTY_STRING))) { throw new IllegalArgumentException(); } diff --git a/wizards/com/sun/star/wizards/web/WWD_Startup.java b/wizards/com/sun/star/wizards/web/WWD_Startup.java index 2a250c84c266..f75740363a93 100644 --- a/wizards/com/sun/star/wizards/web/WWD_Startup.java +++ b/wizards/com/sun/star/wizards/web/WWD_Startup.java @@ -265,7 +265,7 @@ public abstract class WWD_Startup extends WWD_General ilLayouts.setListModel(settings.cp_Layouts); ilLayouts.create(this); - checkContent(settings.cp_DefaultSession.cp_Content, new Task("", "", 99999), this.xControl); + checkContent(settings.cp_DefaultSession.cp_Content, new Task(PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING, 99999), this.xControl); //saved sessions, styles, combobox save session. // also set the chosen saved session... @@ -548,7 +548,7 @@ public abstract class WWD_Startup extends WWD_General protected void selectSession() { int selectedSession = 0; - if (settings.cp_LastSavedSession != null && !settings.cp_LastSavedSession.equals("")) + if (settings.cp_LastSavedSession != null && !settings.cp_LastSavedSession.equals(PropertyNames.EMPTY_STRING)) { Object ses = settings.cp_SavedSessions.getElement(settings.cp_LastSavedSession); @@ -557,7 +557,7 @@ public abstract class WWD_Startup extends WWD_General selectedSession = settings.cp_SavedSessions.getIndexOf(ses); } } - Helper.setUnoPropertyValue(getModel(lstLoadSettings), "SelectedItems", new short[] + Helper.setUnoPropertyValue(getModel(lstLoadSettings), PropertyNames.SELECTED_ITEMS, new short[] { (short) selectedSession }); @@ -682,8 +682,8 @@ public abstract class WWD_Startup extends WWD_General }); pubAware.add(uda); pubAware.add( - isLabel ? UnoDataAware.attachLabel(p, "URL", textbox, checkPublish, false) - : UnoDataAware.attachEditControl(p, "URL", textbox, checkPublish, false)); + isLabel ? UnoDataAware.attachLabel(p, PropertyNames.URL, textbox, checkPublish, false) + : UnoDataAware.attachEditControl(p, PropertyNames.URL, textbox, checkPublish, false)); } @@ -806,7 +806,7 @@ public abstract class WWD_Startup extends WWD_General catch (FileNotFoundException ex) { - int relocate = SystemDialog.showMessageBox(xMSF, xC.getPeer(), "WarningBox", VclWindowPeerAttribute.YES_NO + VclWindowPeerAttribute.DEF_NO, getFileAccess().getPath(doc.cp_URL, "") + "\n\n" + resources.resSpecifyNewFileLocation); + int relocate = SystemDialog.showMessageBox(xMSF, xC.getPeer(), "WarningBox", VclWindowPeerAttribute.YES_NO + VclWindowPeerAttribute.DEF_NO, getFileAccess().getPath(doc.cp_URL, PropertyNames.EMPTY_STRING) + "\n\n" + resources.resSpecifyNewFileLocation); if (relocate == 2) { @@ -831,7 +831,7 @@ public abstract class WWD_Startup extends WWD_General //file is a directory AbstractErrorHandler.showMessage(xMSF, xControl.getPeer(), JavaTools.replaceSubString(resources.resErrIsDirectory, - getFileAccess().getPath(doc.cp_URL, ""), + getFileAccess().getPath(doc.cp_URL, PropertyNames.EMPTY_STRING), "%FILENAME"), ErrorHandler.ERROR_PROCESS_FATAL); return false; @@ -842,7 +842,7 @@ public abstract class WWD_Startup extends WWD_General exp.printStackTrace(); AbstractErrorHandler.showMessage(xMSF, xControl.getPeer(), JavaTools.replaceSubString(resources.resErrDocValidate, - getFileAccess().getPath(doc.cp_URL, ""), + getFileAccess().getPath(doc.cp_URL, PropertyNames.EMPTY_STRING), "%FILENAME"), ErrorHandler.ERROR_PROCESS_FATAL); return false; } @@ -907,7 +907,7 @@ public abstract class WWD_Startup extends WWD_General void updateBackgroundText() { String bg = settings.cp_DefaultSession.cp_Design.cp_BackgroundImage; - if (bg == null || bg.equals("")) + if (bg == null || bg.equals(PropertyNames.EMPTY_STRING)) { bg = resources.resBackgroundNone; } @@ -922,7 +922,7 @@ public abstract class WWD_Startup extends WWD_General { String iconset = settings.cp_DefaultSession.cp_Design.cp_IconSet; String iconsetName; - if (iconset == null || iconset.equals("")) + if (iconset == null || iconset.equals(PropertyNames.EMPTY_STRING)) { iconsetName = resources.resIconsetNone; } diff --git a/wizards/com/sun/star/wizards/web/WebWizardDialog.java b/wizards/com/sun/star/wizards/web/WebWizardDialog.java index 7c782354c0dd..7191e65bedb8 100644 --- a/wizards/com/sun/star/wizards/web/WebWizardDialog.java +++ b/wizards/com/sun/star/wizards/web/WebWizardDialog.java @@ -196,11 +196,11 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC }; private static String[] PROPNAMES_TXT_2 = new String[] { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ReadOnly", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.READ_ONLY, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }; private static String[] PROPNAMES_TITLE = new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }; private static Integer INTEGER_91 = 91; private static Integer INTEGER_97 = 97; @@ -270,7 +270,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC PROPNAMES_TXT, new Object[] { - INTEGERS[2], "", "lnLoadSettings", 91, 147, INTEGERS[1], new Short(tabIndex++), 234 + INTEGERS[2], PropertyNames.EMPTY_STRING, "lnLoadSettings", 91, 147, INTEGERS[1], new Short(tabIndex++), 234 }); lblLoadSettings = insertLabel("lblLoadSettings", new String[] @@ -341,7 +341,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC btnDocUp = insertButton("btnDocUp", BTNDOCUP_ACTION_PERFORMED, new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -350,7 +350,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC btnDocDown = insertButton("btnDocDown", BTNDOCDOWN_ACTION_PERFORMED, new String[] { - "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH + PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -620,7 +620,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC }, new Object[] { - 0, Boolean.FALSE, 78, "", "imgPreview", 91, 100, Boolean.FALSE, INTEGERS[5], new Short((short) 55), 232 + 0, Boolean.FALSE, 78, PropertyNames.EMPTY_STRING, "imgPreview", 91, 100, Boolean.FALSE, INTEGERS[5], new Short((short) 55), 232 }); } @@ -853,7 +853,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC PROPNAMES_TXT, new Object[] { - INTEGERS[2], "", "lnSaveSetting", 97, 151, INTEGERS[7], new Short(tabIndex++), 228 + INTEGERS[2], PropertyNames.EMPTY_STRING, "lnSaveSetting", 97, 151, INTEGERS[7], new Short(tabIndex++), 228 }); chkSaveSettings = insertCheckBox("chkSaveSettings", CHKSAVESETTINGS_ITEM_CHANGED, PROPNAMES_CHKBOX, @@ -926,7 +926,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC public String render(Object listItem) { - return listItem == null ? "" : ((CGLayout) listItem).cp_Name; + return listItem == null ? PropertyNames.EMPTY_STRING : ((CGLayout) listItem).cp_Name; } } } diff --git a/wizards/com/sun/star/wizards/web/data/CGDocument.java b/wizards/com/sun/star/wizards/web/data/CGDocument.java index 765e49d1f6ee..76affdb36d5a 100644 --- a/wizards/com/sun/star/wizards/web/data/CGDocument.java +++ b/wizards/com/sun/star/wizards/web/data/CGDocument.java @@ -72,20 +72,20 @@ public class CGDocument extends ConfigSetItem implements XMLProvider public static final int PAGE_TYPE_UNKNOWN = 0; public static final int PAGE_TYPE_PAGE = 1; public static final int PAGE_TYPE_SLIDE = 2; - public String cp_Title = ""; - public String cp_Description = ""; + public String cp_Title = PropertyNames.EMPTY_STRING; + public String cp_Description = PropertyNames.EMPTY_STRING; public String cp_URL; - public String cp_Author = ""; + public String cp_Author = PropertyNames.EMPTY_STRING; public String cp_Exporter; /** * the destination filename to which this * document will be exported to. */ - public String localFilename = ""; - public String urlFilename = ""; - public String title = ""; - public String description = ""; - public String author = ""; + public String localFilename = PropertyNames.EMPTY_STRING; + public String urlFilename = PropertyNames.EMPTY_STRING; + public String title = PropertyNames.EMPTY_STRING; + public String description = PropertyNames.EMPTY_STRING; + public String author = PropertyNames.EMPTY_STRING; public DateTime createDate; public DateTime updateDate; public int sizeBytes = -1; @@ -124,7 +124,7 @@ public class CGDocument extends ConfigSetItem implements XMLProvider cp_URL = getSettings().getFileAccess(xmsf).getURL(url); if (task == null) { - task = new Task("", "", 5); + task = new Task(PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING, 5); } validate(xmsf, task); } @@ -159,7 +159,7 @@ public class CGDocument extends ConfigSetItem implements XMLProvider task.advance(true); //2 - String path = getSettings().getFileAccess(xmsf).getPath(cp_URL, ""); + String path = getSettings().getFileAccess(xmsf).getPath(cp_URL, PropertyNames.EMPTY_STRING); localFilename = FileAccess.getFilename(path, File.separator); /* if the type is a star office convertable document @@ -202,23 +202,23 @@ public class CGDocument extends ConfigSetItem implements XMLProvider valid = true; - if (cp_Title.equals("")) + if (cp_Title.equals(PropertyNames.EMPTY_STRING)) { cp_Title = title; } - if (cp_Title.equals("")) + if (cp_Title.equals(PropertyNames.EMPTY_STRING)) { cp_Title = localFilename; } - if (cp_Description.equals("")) + if (cp_Description.equals(PropertyNames.EMPTY_STRING)) { cp_Description = description; } - if (cp_Author.equals("")) + if (cp_Author.equals(PropertyNames.EMPTY_STRING)) { cp_Author = author; } - if (cp_Exporter == null || cp_Exporter.equals("")) + if (cp_Exporter == null || cp_Exporter.equals(PropertyNames.EMPTY_STRING)) { cp_Exporter = (String) getSettings().cp_Exporters.getKey( getSettings().getExporters(appType)[0]); @@ -237,7 +237,7 @@ public class CGDocument extends ConfigSetItem implements XMLProvider } String media = (mediaDesc == null) - ? "" : (String) Properties.getPropertyValue(mediaDescriptor, PropertyNames.PROPERTY_NAME); + ? PropertyNames.EMPTY_STRING : (String) Properties.getPropertyValue(mediaDescriptor, PropertyNames.PROPERTY_NAME); appType = getDocType(media); //System.out.println(appType); @@ -260,7 +260,7 @@ public class CGDocument extends ConfigSetItem implements XMLProvider */ private String getDocType(String media) { - if (media.equals("")) + if (media.equals(PropertyNames.EMPTY_STRING)) { return TypeDetection.NO_TYPE; } @@ -317,16 +317,16 @@ public class CGDocument extends ConfigSetItem implements XMLProvider }, new String[] { - d.cp_DisplayTitle ? cp_Title : "", - d.cp_DisplayDescription ? cp_Description : "", - d.cp_DisplayAuthor ? cp_Author : "", - d.cp_DisplayFileFormat ? getTargetTypeName(exp) : "", - d.cp_DisplayFilename ? localFilename : "", - d.cp_DisplayCreateDate ? createDate() : "", - d.cp_DisplayUpdateDate ? updateDate() : "", - d.cp_DisplayPages && (pages > -1) ? "" + pages() : "", //TODO when do i calculate pages? - d.cp_DisplaySize ? sizeKB() : "",//TODO when do i calculate size? - d.cp_DisplayFormatIcon ? getIcon(exp) : "", + d.cp_DisplayTitle ? cp_Title : PropertyNames.EMPTY_STRING, + d.cp_DisplayDescription ? cp_Description : PropertyNames.EMPTY_STRING, + d.cp_DisplayAuthor ? cp_Author : PropertyNames.EMPTY_STRING, + d.cp_DisplayFileFormat ? getTargetTypeName(exp) : PropertyNames.EMPTY_STRING, + d.cp_DisplayFilename ? localFilename : PropertyNames.EMPTY_STRING, + d.cp_DisplayCreateDate ? createDate() : PropertyNames.EMPTY_STRING, + d.cp_DisplayUpdateDate ? updateDate() : PropertyNames.EMPTY_STRING, + d.cp_DisplayPages && (pages > -1) ? PropertyNames.EMPTY_STRING + pages() : PropertyNames.EMPTY_STRING, //TODO when do i calculate pages? + d.cp_DisplaySize ? sizeKB() : PropertyNames.EMPTY_STRING,//TODO when do i calculate size? + d.cp_DisplayFormatIcon ? getIcon(exp) : PropertyNames.EMPTY_STRING, dirName, urlFilename }); } @@ -335,7 +335,7 @@ public class CGDocument extends ConfigSetItem implements XMLProvider { if (this.updateDate == null) { - return ""; + return PropertyNames.EMPTY_STRING; } return getSettings().formatter.formatCreated(this.updateDate); } @@ -344,7 +344,7 @@ public class CGDocument extends ConfigSetItem implements XMLProvider { if (this.createDate == null) { - return ""; + return PropertyNames.EMPTY_STRING; } return getSettings().formatter.formatCreated(this.createDate); } @@ -353,7 +353,7 @@ public class CGDocument extends ConfigSetItem implements XMLProvider { if (sizeBytes == -1) { - return ""; + return PropertyNames.EMPTY_STRING; } else { @@ -363,8 +363,8 @@ public class CGDocument extends ConfigSetItem implements XMLProvider private String pages() { - return pages == -1 ? "" - : JavaTools.replaceSubString(pagesTemplate(), "" + pages, "%NUMBER"); + return pages == -1 ? PropertyNames.EMPTY_STRING + : JavaTools.replaceSubString(pagesTemplate(), PropertyNames.EMPTY_STRING + pages, "%NUMBER"); } private String pagesTemplate() @@ -373,26 +373,26 @@ public class CGDocument extends ConfigSetItem implements XMLProvider switch (pagesType) { case PAGE_TYPE_UNKNOWN: - return ""; + return PropertyNames.EMPTY_STRING; case PAGE_TYPE_PAGE: return getSettings().resources[CGSettings.RESOURCE_PAGES_TEMPLATE]; case PAGE_TYPE_SLIDE: return getSettings().resources[CGSettings.RESOURCE_SLIDES_TEMPLATE]; default: - return ""; + return PropertyNames.EMPTY_STRING; } } private String getTargetTypeName(CGExporter exp) { - return (exp.targetTypeName.equals("")) + return (exp.targetTypeName.equals(PropertyNames.EMPTY_STRING)) ? (String) Properties.getPropertyValue(mediaDescriptor, "UIName") : exp.targetTypeName; } private String getIcon(CGExporter exporter) { - return exporter.cp_Icon.equals("") ? getIcon(this.appType) : exporter.cp_Icon; + return exporter.cp_Icon.equals(PropertyNames.EMPTY_STRING) ? getIcon(this.appType) : exporter.cp_Icon; } private String getIcon(String appType) diff --git a/wizards/com/sun/star/wizards/web/data/CGExporter.java b/wizards/com/sun/star/wizards/web/data/CGExporter.java index c23073fbed01..0ee8ec894dc0 100644 --- a/wizards/com/sun/star/wizards/web/data/CGExporter.java +++ b/wizards/com/sun/star/wizards/web/data/CGExporter.java @@ -27,6 +27,7 @@ package com.sun.star.wizards.web.data; import com.sun.star.wizards.common.ConfigSet; +import com.sun.star.wizards.common.PropertyNames; public class CGExporter extends ConfigSetItem { @@ -42,7 +43,7 @@ public class CGExporter extends ConfigSetItem public String cp_TargetType; public boolean cp_Binary; public int cp_PageType; - public String targetTypeName = ""; + public String targetTypeName = PropertyNames.EMPTY_STRING; public ConfigSet cp_Arguments = new ConfigSet(CGArgument.class); public String toString() @@ -52,6 +53,6 @@ public class CGExporter extends ConfigSetItem public boolean supports(String mime) { - return (cp_SupportedMimeTypes.equals("") || cp_SupportedMimeTypes.indexOf(mime) > -1); + return (cp_SupportedMimeTypes.equals(PropertyNames.EMPTY_STRING) || cp_SupportedMimeTypes.indexOf(mime) > -1); } } diff --git a/wizards/com/sun/star/wizards/web/data/CGPublish.java b/wizards/com/sun/star/wizards/web/data/CGPublish.java index 1a3746a3873d..51e53fca6da6 100644 --- a/wizards/com/sun/star/wizards/web/data/CGPublish.java +++ b/wizards/com/sun/star/wizards/web/data/CGPublish.java @@ -27,6 +27,7 @@ package com.sun.star.wizards.web.data; import com.sun.star.wizards.common.ConfigGroup; +import com.sun.star.wizards.common.PropertyNames; /** * @@ -82,13 +83,13 @@ public class CGPublish extends ConfigGroup catch (Exception e) { e.printStackTrace(); - return ""; + return PropertyNames.EMPTY_STRING; } } private String ftpURL() { return "ftp://" + cp_Username + - ((password != null && password.length() > 0) ? ":" + password : "") + "@" + cp_URL.substring(7); + ((password != null && password.length() > 0) ? ":" + password : PropertyNames.EMPTY_STRING) + "@" + cp_URL.substring(7); } } diff --git a/wizards/com/sun/star/wizards/web/data/CGSettings.java b/wizards/com/sun/star/wizards/web/data/CGSettings.java index ecc538b9fa83..4102c2f87dbf 100644 --- a/wizards/com/sun/star/wizards/web/data/CGSettings.java +++ b/wizards/com/sun/star/wizards/web/data/CGSettings.java @@ -83,8 +83,8 @@ public class CGSettings extends ConfigGroup xmsf = xmsf_; try { - soTemplateDir = FileAccess.getOfficePath(xmsf, "Config", "", ""); - soGalleryDir = FileAccess.getOfficePath(xmsf, "Gallery", "share", ""); + soTemplateDir = FileAccess.getOfficePath(xmsf, "Config", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING); + soGalleryDir = FileAccess.getOfficePath(xmsf, "Gallery", "share", PropertyNames.EMPTY_STRING); root = this; formatter = new Formatter(xmsf, document); resources = resources_; @@ -152,7 +152,7 @@ public class CGSettings extends ConfigGroup throws NoSuchElementException, WrappedTargetException { - if (!exporter.cp_TargetType.equals("")) + if (!exporter.cp_TargetType.equals(PropertyNames.EMPTY_STRING)) { exporter.targetTypeName = (String) Properties.getPropertyValue( diff --git a/wizards/com/sun/star/wizards/web/data/CGStyle.java b/wizards/com/sun/star/wizards/web/data/CGStyle.java index e6258d8c5fe1..c268e568ae03 100644 --- a/wizards/com/sun/star/wizards/web/data/CGStyle.java +++ b/wizards/com/sun/star/wizards/web/data/CGStyle.java @@ -26,6 +26,8 @@ ************************************************************************/ package com.sun.star.wizards.web.data; +import com.sun.star.wizards.common.PropertyNames; + public class CGStyle extends ConfigSetItem { @@ -42,7 +44,7 @@ public class CGStyle extends ConfigSetItem public String getBackgroundUrl() { - if (cp_BackgroundImage == null || cp_BackgroundImage.equals("")) + if (cp_BackgroundImage == null || cp_BackgroundImage.equals(PropertyNames.EMPTY_STRING)) { return null; } -- cgit v1.2.3 From f3bbbfcb2f718908560ffa1c852433c7b7293e34 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Thu, 20 Jan 2011 16:36:49 +0100 Subject: dba34d: length check corrected --- wizards/com/sun/star/wizards/report/ReportWizard.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java b/wizards/com/sun/star/wizards/report/ReportWizard.java index 647eddaea46b..597893986282 100644 --- a/wizards/com/sun/star/wizards/report/ReportWizard.java +++ b/wizards/com/sun/star/wizards/report/ReportWizard.java @@ -457,7 +457,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, // Get the path to the extension and try to add the path to the class loader String sLocation = getPathToExtension(xMSF); // TODO: Umlaut in filename! - if (sLocation.length() == 0) + if (sLocation.length() > 0) { try { -- cgit v1.2.3 From d1f40e7742499d578b2079b947042e9232fcbc38 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Fri, 21 Jan 2011 08:31:57 +0100 Subject: dba34d: #i112014# flush connection when ooo terminate --- connectivity/source/drivers/hsqldb/HDriver.cxx | 18 ++++++++++++++++++ .../source/drivers/hsqldb/HTerminateListener.cxx | 1 + connectivity/source/inc/hsqldb/HDriver.hxx | 1 + 3 files changed, 20 insertions(+) diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index a0b755c107c9..3760b914cc1d 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -43,6 +43,7 @@ #include #include #include +#include #include "HTerminateListener.hxx" #include "hsqldb/HCatalog.hxx" #include "diagnose_ex.h" @@ -70,6 +71,7 @@ namespace connectivity using namespace ::com::sun::star::embed; using namespace ::com::sun::star::io; using namespace ::com::sun::star::task; + using namespace ::com::sun::star::util; using namespace ::com::sun::star::reflection; namespace hsqldb @@ -616,6 +618,22 @@ namespace connectivity m_bInShutDownConnections = sal_True; } //------------------------------------------------------------------ + void ODriverDelegator::flushConnections() + { + TWeakPairVector::iterator aEnd = m_aConnections.end(); + for (TWeakPairVector::iterator i = m_aConnections.begin(); aEnd != i; ++i) + { + try + { + Reference xCon(i->second.second.first.get(),UNO_QUERY); + xCon->flush(); + } + catch(Exception&) + { + } + } + } + //------------------------------------------------------------------ void SAL_CALL ODriverDelegator::preCommit( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); diff --git a/connectivity/source/drivers/hsqldb/HTerminateListener.cxx b/connectivity/source/drivers/hsqldb/HTerminateListener.cxx index c386334acd70..52d53fa99227 100644 --- a/connectivity/source/drivers/hsqldb/HTerminateListener.cxx +++ b/connectivity/source/drivers/hsqldb/HTerminateListener.cxx @@ -51,6 +51,7 @@ throw( RuntimeException ) void SAL_CALL OConnectionController::queryTermination( const EventObject& /*aEvent*/ ) throw( TerminationVetoException, RuntimeException ) { + m_pDriver->flushConnections(); } void SAL_CALL OConnectionController::notifyTermination( const EventObject& /*aEvent*/ ) diff --git a/connectivity/source/inc/hsqldb/HDriver.hxx b/connectivity/source/inc/hsqldb/HDriver.hxx index 72d21d5774e1..33be38e8de48 100644 --- a/connectivity/source/inc/hsqldb/HDriver.hxx +++ b/connectivity/source/inc/hsqldb/HDriver.hxx @@ -123,6 +123,7 @@ namespace connectivity virtual void SAL_CALL reverted( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException); void shutdownConnections(); + void flushConnections(); protected: /// dtor virtual ~ODriverDelegator(); -- cgit v1.2.3 From f503a43f0e297468a322c88b6e26a4e42b5d86ca Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 24 Jan 2011 12:49:10 +0100 Subject: dba34d: fixed unintentional no-op --- dbaccess/source/core/api/query.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx index 75c56c65e0e3..2d1c12ad3f25 100644 --- a/dbaccess/source/core/api/query.cxx +++ b/dbaccess/source/core/api/query.cxx @@ -361,7 +361,7 @@ void OQuery::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _r { // the base class holds the property values itself, but we have to forward this to our CommandDefinition m_eDoingCurrently = SETTING_PROPERTIES; - OAutoActionReset(this); + OAutoActionReset aActionResetter(this); m_xCommandDefinition->setPropertyValue(sAggPropName, _rValue); if ( PROPERTY_ID_COMMAND == _nHandle ) -- cgit v1.2.3 From 5d463c719bb2881d63da68d0752e4086c265876d Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 24 Jan 2011 16:34:14 +0100 Subject: vcl2gnumake: #i116589# header cleanup: linux,solaris,macos --- vcl/aqua/inc/aqua11yfactory.h | 47 - vcl/aqua/inc/aqua11yfocustracker.hxx | 108 - vcl/aqua/inc/aqua11ylistener.hxx | 65 - vcl/aqua/inc/aqua11ywrapper.h | 119 - vcl/aqua/inc/aquaprintview.h | 67 - vcl/aqua/inc/aquavclevents.hxx | 96 - vcl/aqua/inc/aquavcltypes.h | 36 - vcl/aqua/inc/keyboardfocuslistener.hxx | 47 - vcl/aqua/inc/salatsuifontutils.hxx | 63 - vcl/aqua/inc/salbmp.h | 107 - vcl/aqua/inc/salcolorutils.hxx | 52 - vcl/aqua/inc/salconst.h | 68 - vcl/aqua/inc/saldata.hxx | 138 - vcl/aqua/inc/salfontutils.hxx | 66 - vcl/aqua/inc/salframe.h | 220 - vcl/aqua/inc/salframeview.h | 213 - vcl/aqua/inc/salgdi.h | 417 -- vcl/aqua/inc/salinst.h | 203 - vcl/aqua/inc/salmathutils.hxx | 87 - vcl/aqua/inc/salmenu.h | 121 - vcl/aqua/inc/salnativewidgets.h | 71 - vcl/aqua/inc/salnsmenu.h | 68 - vcl/aqua/inc/salnstimer.h | 40 - vcl/aqua/inc/salobj.h | 87 - vcl/aqua/inc/salprn.h | 171 - vcl/aqua/inc/salsys.h | 65 - vcl/aqua/inc/saltimer.h | 54 - vcl/aqua/inc/salvd.h | 94 - vcl/aqua/inc/svsys.h | 35 - vcl/aqua/inc/vclnsapp.h | 70 - vcl/aqua/source/a11y/aqua11yactionwrapper.h | 4 +- vcl/aqua/source/a11y/aqua11yactionwrapper.mm | 3 +- vcl/aqua/source/a11y/aqua11ycomponentwrapper.h | 4 +- vcl/aqua/source/a11y/aqua11yfactory.mm | 8 +- vcl/aqua/source/a11y/aqua11yfocuslistener.cxx | 9 +- vcl/aqua/source/a11y/aqua11yfocuslistener.hxx | 4 +- vcl/aqua/source/a11y/aqua11yfocustracker.cxx | 13 +- vcl/aqua/source/a11y/aqua11ylistener.cxx | 11 +- vcl/aqua/source/a11y/aqua11yrolehelper.h | 2 +- vcl/aqua/source/a11y/aqua11yrolehelper.mm | 4 +- vcl/aqua/source/a11y/aqua11yselectionwrapper.h | 4 +- vcl/aqua/source/a11y/aqua11yselectionwrapper.mm | 5 +- vcl/aqua/source/a11y/aqua11ytablewrapper.h | 2 +- vcl/aqua/source/a11y/aqua11ytablewrapper.mm | 3 +- .../source/a11y/aqua11ytextattributeswrapper.h | 3 +- .../source/a11y/aqua11ytextattributeswrapper.mm | 4 +- vcl/aqua/source/a11y/aqua11ytextwrapper.h | 4 +- vcl/aqua/source/a11y/aqua11ytextwrapper.mm | 4 +- vcl/aqua/source/a11y/aqua11yutil.mm | 3 +- vcl/aqua/source/a11y/aqua11yvaluewrapper.h | 6 +- vcl/aqua/source/a11y/aqua11ywrapper.mm | 15 +- vcl/aqua/source/a11y/aqua11ywrapperbutton.h | 2 +- vcl/aqua/source/a11y/aqua11ywrapperbutton.mm | 3 +- vcl/aqua/source/a11y/aqua11ywrappercheckbox.h | 2 +- vcl/aqua/source/a11y/aqua11ywrappercheckbox.mm | 3 +- vcl/aqua/source/a11y/aqua11ywrappercombobox.h | 2 +- vcl/aqua/source/a11y/aqua11ywrappercombobox.mm | 4 +- vcl/aqua/source/a11y/aqua11ywrappergroup.h | 2 +- vcl/aqua/source/a11y/aqua11ywrappergroup.mm | 2 +- vcl/aqua/source/a11y/aqua11ywrapperlist.h | 2 +- vcl/aqua/source/a11y/aqua11ywrapperlist.mm | 2 +- vcl/aqua/source/a11y/aqua11ywrapperradiobutton.h | 2 +- vcl/aqua/source/a11y/aqua11ywrapperradiobutton.mm | 2 +- vcl/aqua/source/a11y/aqua11ywrapperradiogroup.h | 2 +- vcl/aqua/source/a11y/aqua11ywrapperradiogroup.mm | 2 +- vcl/aqua/source/a11y/aqua11ywrapperrow.h | 2 +- vcl/aqua/source/a11y/aqua11ywrapperrow.mm | 3 +- vcl/aqua/source/a11y/aqua11ywrapperscrollarea.h | 2 +- vcl/aqua/source/a11y/aqua11ywrapperscrollarea.mm | 3 +- vcl/aqua/source/a11y/aqua11ywrapperscrollbar.h | 2 +- vcl/aqua/source/a11y/aqua11ywrapperscrollbar.mm | 4 +- vcl/aqua/source/a11y/aqua11ywrappersplitter.h | 2 +- vcl/aqua/source/a11y/aqua11ywrappersplitter.mm | 2 +- vcl/aqua/source/a11y/aqua11ywrapperstatictext.h | 2 +- vcl/aqua/source/a11y/aqua11ywrapperstatictext.mm | 2 +- vcl/aqua/source/a11y/aqua11ywrappertabgroup.h | 2 +- vcl/aqua/source/a11y/aqua11ywrappertabgroup.mm | 2 +- vcl/aqua/source/a11y/aqua11ywrappertextarea.h | 2 +- vcl/aqua/source/a11y/aqua11ywrappertextarea.mm | 2 +- vcl/aqua/source/a11y/aqua11ywrappertoolbar.h | 2 +- vcl/aqua/source/a11y/aqua11ywrappertoolbar.mm | 2 +- vcl/aqua/source/a11y/documentfocuslistener.hxx | 7 +- vcl/aqua/source/app/saldata.cxx | 7 +- vcl/aqua/source/app/salinst.cxx | 34 +- vcl/aqua/source/app/salnstimer.mm | 10 +- vcl/aqua/source/app/salsys.cxx | 13 +- vcl/aqua/source/app/saltimer.cxx | 10 +- vcl/aqua/source/app/vclnsapp.mm | 15 +- vcl/aqua/source/dtrans/DragSource.cxx | 9 +- vcl/aqua/source/dtrans/service_entry.cxx | 11 +- vcl/aqua/source/gdi/aquaprintaccessoryview.mm | 11 +- vcl/aqua/source/gdi/aquaprintview.mm | 5 +- vcl/aqua/source/gdi/salatslayout.cxx | 12 +- vcl/aqua/source/gdi/salatsuifontutils.cxx | 7 +- vcl/aqua/source/gdi/salbmp.cxx | 17 +- vcl/aqua/source/gdi/salcolorutils.cxx | 3 +- vcl/aqua/source/gdi/salgdi.cxx | 32 +- vcl/aqua/source/gdi/salgdiutils.cxx | 10 +- vcl/aqua/source/gdi/salmathutils.cxx | 2 +- vcl/aqua/source/gdi/salnativewidgets.cxx | 12 +- vcl/aqua/source/gdi/salprn.cxx | 18 +- vcl/aqua/source/gdi/salvd.cxx | 14 +- vcl/aqua/source/window/salframe.cxx | 29 +- vcl/aqua/source/window/salframeview.mm | 13 +- vcl/aqua/source/window/salmenu.cxx | 22 +- vcl/aqua/source/window/salnsmenu.mm | 10 +- vcl/aqua/source/window/salobj.cxx | 6 +- vcl/inc/accel.h | 59 + vcl/inc/accmgr.hxx | 64 + vcl/inc/aqua/aqua11yfactory.h | 47 + vcl/inc/aqua/aqua11yfocustracker.hxx | 108 + vcl/inc/aqua/aqua11ylistener.hxx | 65 + vcl/inc/aqua/aqua11ywrapper.h | 119 + vcl/inc/aqua/aquaprintview.h | 67 + vcl/inc/aqua/aquavclevents.hxx | 96 + vcl/inc/aqua/aquavcltypes.h | 36 + vcl/inc/aqua/keyboardfocuslistener.hxx | 47 + vcl/inc/aqua/salatsuifontutils.hxx | 63 + vcl/inc/aqua/salbmp.h | 112 + vcl/inc/aqua/salcolorutils.hxx | 52 + vcl/inc/aqua/salconst.h | 68 + vcl/inc/aqua/saldata.hxx | 138 + vcl/inc/aqua/salfontutils.hxx | 66 + vcl/inc/aqua/salframe.h | 219 + vcl/inc/aqua/salframeview.h | 213 + vcl/inc/aqua/salgdi.h | 417 ++ vcl/inc/aqua/salinst.h | 203 + vcl/inc/aqua/salmathutils.hxx | 87 + vcl/inc/aqua/salmenu.h | 120 + vcl/inc/aqua/salnativewidgets.h | 71 + vcl/inc/aqua/salnsmenu.h | 68 + vcl/inc/aqua/salnstimer.h | 40 + vcl/inc/aqua/salobj.h | 86 + vcl/inc/aqua/salprn.h | 171 + vcl/inc/aqua/salsys.h | 60 + vcl/inc/aqua/saltimer.h | 54 + vcl/inc/aqua/salvd.h | 93 + vcl/inc/aqua/svsys.h | 35 + vcl/inc/aqua/vclnsapp.h | 70 + vcl/inc/bmpfast.hxx | 51 + vcl/inc/brdwin.hxx | 352 ++ vcl/inc/canvasbitmap.hxx | 129 + vcl/inc/controldata.hxx | 62 + vcl/inc/dbggui.hxx | 74 + vcl/inc/dndevdis.hxx | 114 + vcl/inc/dndlcon.hxx | 124 + vcl/inc/fontcache.hxx | 99 + vcl/inc/fontsubset.hxx | 97 + vcl/inc/glyphcache.hxx | 380 ++ vcl/inc/graphite_adaptors.hxx | 152 + vcl/inc/graphite_cache.hxx | 289 ++ vcl/inc/graphite_features.hxx | 75 + vcl/inc/graphite_layout.hxx | 188 + vcl/inc/graphite_serverfont.hxx | 100 + vcl/inc/helpwin.hxx | 92 + vcl/inc/idlemgr.hxx | 60 + vcl/inc/ilstbox.hxx | 649 +++ vcl/inc/image.h | 182 + vcl/inc/impbmp.hxx | 108 + vcl/inc/impfont.hxx | 243 ++ vcl/inc/impgraph.hxx | 176 + vcl/inc/impimagetree.hxx | 96 + vcl/inc/impoct.hxx | 176 + vcl/inc/impprn.hxx | 140 + vcl/inc/jobset.h | 79 + vcl/inc/outdata.hxx | 49 + vcl/inc/outdev.h | 264 ++ vcl/inc/outfont.hxx | 406 ++ vcl/inc/print.h | 83 + vcl/inc/printdlg.hxx | 335 ++ vcl/inc/printergfx.hxx | 442 ++ vcl/inc/printerjob.hxx | 149 + vcl/inc/region.h | 134 + vcl/inc/salbmp.hxx | 65 + vcl/inc/saldatabasic.hxx | 59 + vcl/inc/salframe.hxx | 292 ++ vcl/inc/salgdi.hxx | 493 +++ vcl/inc/salgeom.hxx | 51 + vcl/inc/salimestatus.hxx | 45 + vcl/inc/salinst.hxx | 219 + vcl/inc/sallayout.hxx | 390 ++ vcl/inc/salmenu.hxx | 101 + vcl/inc/salobj.hxx | 92 + vcl/inc/salprn.hxx | 137 + vcl/inc/salptype.hxx | 60 + vcl/inc/salsession.hxx | 117 + vcl/inc/salsys.hxx | 146 + vcl/inc/saltimer.hxx | 69 + vcl/inc/salvd.hxx | 58 + vcl/inc/salwtype.hxx | 346 ++ vcl/inc/subedit.hxx | 48 + vcl/inc/svdata.hxx | 463 ++ vcl/inc/svids.hrc | 260 ++ vcl/inc/svsys.h | 42 + vcl/inc/textlayout.hxx | 136 + vcl/inc/toolbox.h | 182 + vcl/inc/unx/XIM.h | 137 + vcl/inc/unx/Xproto.h | 49 + vcl/inc/unx/cdeint.hxx | 44 + vcl/inc/unx/dtint.hxx | 78 + vcl/inc/unx/gtk/atkbridge.hxx | 36 + vcl/inc/unx/gtk/gtkdata.hxx | 93 + vcl/inc/unx/gtk/gtkframe.hxx | 407 ++ vcl/inc/unx/gtk/gtkgdi.hxx | 183 + vcl/inc/unx/gtk/gtkinst.hxx | 105 + vcl/inc/unx/gtk/gtkobject.hxx | 70 + vcl/inc/unx/i18n_cb.hxx | 95 + vcl/inc/unx/i18n_ic.hxx | 100 + vcl/inc/unx/i18n_im.hxx | 65 + vcl/inc/unx/i18n_keysym.hxx | 71 + vcl/inc/unx/i18n_status.hxx | 124 + vcl/inc/unx/i18n_xkb.hxx | 115 + vcl/inc/unx/kde/kdedata.hxx | 110 + vcl/inc/unx/pspgraphics.h | 194 + vcl/inc/unx/salbmp.h | 237 + vcl/inc/unx/saldata.hxx | 134 + vcl/inc/unx/saldisp.hxx | 550 +++ vcl/inc/unx/salfont.h | 180 + vcl/inc/unx/salframe.h | 293 ++ vcl/inc/unx/salgdi.h | 387 ++ vcl/inc/unx/salinst.h | 128 + vcl/inc/unx/salmenu.h | 65 + vcl/inc/unx/salobj.h | 105 + vcl/inc/unx/salprn.h | 126 + vcl/inc/unx/salstd.hxx | 77 + vcl/inc/unx/salsys.h | 67 + vcl/inc/unx/saltimer.h | 44 + vcl/inc/unx/salunx.h | 128 + vcl/inc/unx/salvd.h | 101 + vcl/inc/unx/sm.hxx | 91 + vcl/inc/unx/soicon.hxx | 37 + vcl/inc/unx/strhelper.hxx | 41 + vcl/inc/unx/svsys.h | 32 + vcl/inc/unx/svunx.h | 35 + vcl/inc/unx/wmadaptor.hxx | 354 ++ vcl/inc/unx/x11_cursors/airbrush_curs.h | 40 + vcl/inc/unx/x11_cursors/airbrush_mask.h | 40 + vcl/inc/unx/x11_cursors/ase_curs.h | 40 + vcl/inc/unx/x11_cursors/ase_mask.h | 40 + vcl/inc/unx/x11_cursors/asn_curs.h | 40 + vcl/inc/unx/x11_cursors/asn_mask.h | 40 + vcl/inc/unx/x11_cursors/asne_curs.h | 40 + vcl/inc/unx/x11_cursors/asne_mask.h | 40 + vcl/inc/unx/x11_cursors/asns_curs.h | 40 + vcl/inc/unx/x11_cursors/asns_mask.h | 40 + vcl/inc/unx/x11_cursors/asnswe_curs.h | 40 + vcl/inc/unx/x11_cursors/asnswe_mask.h | 40 + vcl/inc/unx/x11_cursors/asnw_curs.h | 40 + vcl/inc/unx/x11_cursors/asnw_mask.h | 40 + vcl/inc/unx/x11_cursors/ass_curs.h | 40 + vcl/inc/unx/x11_cursors/ass_mask.h | 40 + vcl/inc/unx/x11_cursors/asse_curs.h | 40 + vcl/inc/unx/x11_cursors/asse_mask.h | 40 + vcl/inc/unx/x11_cursors/assw_curs.h | 40 + vcl/inc/unx/x11_cursors/assw_mask.h | 40 + vcl/inc/unx/x11_cursors/asw_curs.h | 40 + vcl/inc/unx/x11_cursors/asw_mask.h | 40 + vcl/inc/unx/x11_cursors/aswe_curs.h | 40 + vcl/inc/unx/x11_cursors/aswe_mask.h | 40 + vcl/inc/unx/x11_cursors/chain_curs.h | 40 + vcl/inc/unx/x11_cursors/chain_mask.h | 38 + vcl/inc/unx/x11_cursors/chainnot_curs.h | 40 + vcl/inc/unx/x11_cursors/chainnot_mask.h | 38 + vcl/inc/unx/x11_cursors/chart_curs.h | 40 + vcl/inc/unx/x11_cursors/chart_mask.h | 40 + vcl/inc/unx/x11_cursors/copydata_curs.h | 42 + vcl/inc/unx/x11_cursors/copydata_mask.h | 42 + vcl/inc/unx/x11_cursors/copydlnk_curs.h | 42 + vcl/inc/unx/x11_cursors/copydlnk_mask.h | 42 + vcl/inc/unx/x11_cursors/copyfile_curs.h | 42 + vcl/inc/unx/x11_cursors/copyfile_mask.h | 42 + vcl/inc/unx/x11_cursors/copyfiles_curs.h | 42 + vcl/inc/unx/x11_cursors/copyfiles_mask.h | 42 + vcl/inc/unx/x11_cursors/copyflnk_curs.h | 42 + vcl/inc/unx/x11_cursors/copyflnk_mask.h | 42 + vcl/inc/unx/x11_cursors/crook_curs.h | 42 + vcl/inc/unx/x11_cursors/crook_mask.h | 40 + vcl/inc/unx/x11_cursors/crop_curs.h | 42 + vcl/inc/unx/x11_cursors/crop_mask.h | 40 + vcl/inc/unx/x11_cursors/detective_curs.h | 40 + vcl/inc/unx/x11_cursors/detective_mask.h | 40 + vcl/inc/unx/x11_cursors/drawarc_curs.h | 42 + vcl/inc/unx/x11_cursors/drawarc_mask.h | 40 + vcl/inc/unx/x11_cursors/drawbezier_curs.h | 42 + vcl/inc/unx/x11_cursors/drawbezier_mask.h | 40 + vcl/inc/unx/x11_cursors/drawcaption_curs.h | 42 + vcl/inc/unx/x11_cursors/drawcaption_mask.h | 40 + vcl/inc/unx/x11_cursors/drawcirclecut_curs.h | 42 + vcl/inc/unx/x11_cursors/drawcirclecut_mask.h | 40 + vcl/inc/unx/x11_cursors/drawconnect_curs.h | 42 + vcl/inc/unx/x11_cursors/drawconnect_mask.h | 40 + vcl/inc/unx/x11_cursors/drawcrook_curs.h | 42 + vcl/inc/unx/x11_cursors/drawcrook_mask.h | 40 + vcl/inc/unx/x11_cursors/drawcrop_curs.h | 42 + vcl/inc/unx/x11_cursors/drawcrop_mask.h | 40 + vcl/inc/unx/x11_cursors/drawellipse_curs.h | 42 + vcl/inc/unx/x11_cursors/drawellipse_mask.h | 40 + vcl/inc/unx/x11_cursors/drawfreehand_curs.h | 42 + vcl/inc/unx/x11_cursors/drawfreehand_mask.h | 40 + vcl/inc/unx/x11_cursors/drawline_curs.h | 42 + vcl/inc/unx/x11_cursors/drawline_mask.h | 40 + vcl/inc/unx/x11_cursors/drawmirror_curs.h | 42 + vcl/inc/unx/x11_cursors/drawmirror_mask.h | 40 + vcl/inc/unx/x11_cursors/drawpie_curs.h | 42 + vcl/inc/unx/x11_cursors/drawpie_mask.h | 40 + vcl/inc/unx/x11_cursors/drawpolygon_curs.h | 42 + vcl/inc/unx/x11_cursors/drawpolygon_mask.h | 40 + vcl/inc/unx/x11_cursors/drawrect_curs.h | 42 + vcl/inc/unx/x11_cursors/drawrect_mask.h | 40 + vcl/inc/unx/x11_cursors/drawtext_curs.h | 42 + vcl/inc/unx/x11_cursors/drawtext_mask.h | 40 + vcl/inc/unx/x11_cursors/fill_curs.h | 40 + vcl/inc/unx/x11_cursors/fill_mask.h | 40 + vcl/inc/unx/x11_cursors/hshear_curs.h | 42 + vcl/inc/unx/x11_cursors/hshear_mask.h | 40 + vcl/inc/unx/x11_cursors/invert50.h | 65 + vcl/inc/unx/x11_cursors/linkdata_curs.h | 42 + vcl/inc/unx/x11_cursors/linkdata_mask.h | 42 + vcl/inc/unx/x11_cursors/linkfile_curs.h | 42 + vcl/inc/unx/x11_cursors/linkfile_mask.h | 42 + vcl/inc/unx/x11_cursors/magnify_curs.h | 40 + vcl/inc/unx/x11_cursors/magnify_mask.h | 40 + vcl/inc/unx/x11_cursors/mirror_curs.h | 42 + vcl/inc/unx/x11_cursors/mirror_mask.h | 40 + vcl/inc/unx/x11_cursors/movebezierweight_curs.h | 42 + vcl/inc/unx/x11_cursors/movebezierweight_mask.h | 40 + vcl/inc/unx/x11_cursors/movedata_curs.h | 42 + vcl/inc/unx/x11_cursors/movedata_mask.h | 42 + vcl/inc/unx/x11_cursors/movedlnk_curs.h | 42 + vcl/inc/unx/x11_cursors/movedlnk_mask.h | 42 + vcl/inc/unx/x11_cursors/movefile_curs.h | 42 + vcl/inc/unx/x11_cursors/movefile_mask.h | 42 + vcl/inc/unx/x11_cursors/movefiles_curs.h | 42 + vcl/inc/unx/x11_cursors/movefiles_mask.h | 42 + vcl/inc/unx/x11_cursors/moveflnk_curs.h | 42 + vcl/inc/unx/x11_cursors/moveflnk_mask.h | 42 + vcl/inc/unx/x11_cursors/movepoint_curs.h | 42 + vcl/inc/unx/x11_cursors/movepoint_mask.h | 40 + vcl/inc/unx/x11_cursors/nodrop_curs.h | 42 + vcl/inc/unx/x11_cursors/nodrop_mask.h | 42 + vcl/inc/unx/x11_cursors/null_curs.h | 31 + vcl/inc/unx/x11_cursors/null_mask.h | 29 + vcl/inc/unx/x11_cursors/paintbrush_curs.h | 8 + vcl/inc/unx/x11_cursors/paintbrush_mask.h | 7 + vcl/inc/unx/x11_cursors/pivotcol_curs.h | 42 + vcl/inc/unx/x11_cursors/pivotcol_mask.h | 42 + vcl/inc/unx/x11_cursors/pivotdel_curs.h | 42 + vcl/inc/unx/x11_cursors/pivotdel_mask.h | 42 + vcl/inc/unx/x11_cursors/pivotfld_curs.h | 42 + vcl/inc/unx/x11_cursors/pivotfld_mask.h | 42 + vcl/inc/unx/x11_cursors/pivotrow_curs.h | 42 + vcl/inc/unx/x11_cursors/pivotrow_mask.h | 42 + vcl/inc/unx/x11_cursors/rotate_curs.h | 42 + vcl/inc/unx/x11_cursors/rotate_mask.h | 40 + vcl/inc/unx/x11_cursors/salcursors.h | 162 + vcl/inc/unx/x11_cursors/tblsele_curs.h | 8 + vcl/inc/unx/x11_cursors/tblsele_mask.h | 7 + vcl/inc/unx/x11_cursors/tblsels_curs.h | 9 + vcl/inc/unx/x11_cursors/tblsels_mask.h | 7 + vcl/inc/unx/x11_cursors/tblselse_curs.h | 8 + vcl/inc/unx/x11_cursors/tblselse_mask.h | 7 + vcl/inc/unx/x11_cursors/tblselsw_curs.h | 8 + vcl/inc/unx/x11_cursors/tblselsw_mask.h | 7 + vcl/inc/unx/x11_cursors/tblselw_curs.h | 8 + vcl/inc/unx/x11_cursors/tblselw_mask.h | 6 + vcl/inc/unx/x11_cursors/timemove_curs.h | 40 + vcl/inc/unx/x11_cursors/timemove_mask.h | 40 + vcl/inc/unx/x11_cursors/timesize_curs.h | 40 + vcl/inc/unx/x11_cursors/timesize_mask.h | 40 + vcl/inc/unx/x11_cursors/vertcurs_curs.h | 8 + vcl/inc/unx/x11_cursors/vertcurs_mask.h | 8 + vcl/inc/unx/x11_cursors/vshear_curs.h | 42 + vcl/inc/unx/x11_cursors/vshear_mask.h | 40 + vcl/inc/vcl/accel.h | 59 - vcl/inc/vcl/accmgr.hxx | 64 - vcl/inc/vcl/bmpfast.hxx | 51 - vcl/inc/vcl/brdwin.hxx | 352 -- vcl/inc/vcl/canvasbitmap.hxx | 129 - vcl/inc/vcl/controldata.hxx | 62 - vcl/inc/vcl/dbggui.hxx | 74 - vcl/inc/vcl/dndevdis.hxx | 114 - vcl/inc/vcl/dndlcon.hxx | 124 - vcl/inc/vcl/fontcache.hxx | 99 - vcl/inc/vcl/fontsubset.hxx | 97 - vcl/inc/vcl/glyphcache.hxx | 380 -- vcl/inc/vcl/graphite_adaptors.hxx | 152 - vcl/inc/vcl/graphite_cache.hxx | 289 -- vcl/inc/vcl/graphite_features.hxx | 75 - vcl/inc/vcl/graphite_layout.hxx | 188 - vcl/inc/vcl/graphite_serverfont.hxx | 100 - vcl/inc/vcl/helpwin.hxx | 92 - vcl/inc/vcl/idlemgr.hxx | 60 - vcl/inc/vcl/ilstbox.hxx | 649 --- vcl/inc/vcl/image.h | 182 - vcl/inc/vcl/impbmp.hxx | 108 - vcl/inc/vcl/impfont.hxx | 243 -- vcl/inc/vcl/impgraph.hxx | 176 - vcl/inc/vcl/impimagetree.hxx | 96 - vcl/inc/vcl/impoct.hxx | 176 - vcl/inc/vcl/impprn.hxx | 140 - vcl/inc/vcl/jobset.h | 79 - vcl/inc/vcl/outdata.hxx | 49 - vcl/inc/vcl/outdev.h | 264 -- vcl/inc/vcl/outfont.hxx | 406 -- vcl/inc/vcl/polyscan.hxx | 155 - vcl/inc/vcl/print.h | 81 - vcl/inc/vcl/printergfx.hxx | 442 -- vcl/inc/vcl/printerjob.hxx | 149 - vcl/inc/vcl/prndlg.hxx | 335 -- vcl/inc/vcl/region.h | 134 - vcl/inc/vcl/salbmp.hxx | 65 - vcl/inc/vcl/saldatabasic.hxx | 59 - vcl/inc/vcl/salframe.hxx | 292 -- vcl/inc/vcl/salgdi.hxx | 493 --- vcl/inc/vcl/salgeom.hxx | 51 - vcl/inc/vcl/salimestatus.hxx | 45 - vcl/inc/vcl/salinst.hxx | 219 - vcl/inc/vcl/sallayout.hxx | 390 -- vcl/inc/vcl/salmenu.hxx | 101 - vcl/inc/vcl/salobj.hxx | 92 - vcl/inc/vcl/salprn.hxx | 137 - vcl/inc/vcl/salptype.hxx | 60 - vcl/inc/vcl/salsession.hxx | 117 - vcl/inc/vcl/salsys.hxx | 146 - vcl/inc/vcl/saltimer.hxx | 69 - vcl/inc/vcl/salvd.hxx | 58 - vcl/inc/vcl/salwtype.hxx | 346 -- vcl/inc/vcl/subedit.hxx | 48 - vcl/inc/vcl/svcompat.hxx | 70 - vcl/inc/vcl/svdata.hxx | 463 -- vcl/inc/vcl/svids.hrc | 260 -- vcl/inc/vcl/textlayout.hxx | 136 - vcl/inc/vcl/toolbox.h | 182 - vcl/inc/vcl/unobrok.hxx | 39 - vcl/inc/vcl/wall2.hxx | 60 - vcl/inc/vcl/window.h | 385 -- vcl/inc/vcl/xconnection.hxx | 70 - vcl/inc/wall2.hxx | 60 + vcl/inc/window.h | 385 ++ vcl/inc/xconnection.hxx | 70 + vcl/prj/build.lst | 18 +- vcl/prj/d.lst | 62 +- vcl/source/app/dbggui.cxx | 26 +- vcl/source/app/help.cxx | 10 +- vcl/source/app/i18nhelp.cxx | 10 +- vcl/source/app/idlemgr.cxx | 5 +- vcl/source/app/salvtables.cxx | 20 +- vcl/source/app/session.cxx | 13 +- vcl/source/app/settings.cxx | 13 +- vcl/source/app/sound.cxx | 17 +- vcl/source/app/stdtext.cxx | 6 +- vcl/source/app/svapp.cxx | 50 +- vcl/source/app/svdata.cxx | 30 +- vcl/source/app/svmain.cxx | 78 +- vcl/source/app/timer.cxx | 12 +- vcl/source/app/unohelp.cxx | 22 +- vcl/source/app/vclevent.cxx | 3 +- vcl/source/components/dtranscomp.cxx | 15 +- vcl/source/components/fontident.cxx | 14 +- vcl/source/control/button.cxx | 22 +- vcl/source/control/combobox.cxx | 14 +- vcl/source/control/ctrl.cxx | 15 +- vcl/source/control/edit.cxx | 15 +- vcl/source/control/field.cxx | 7 +- vcl/source/control/field2.cxx | 13 +- vcl/source/control/fixed.cxx | 8 +- vcl/source/control/group.cxx | 8 +- vcl/source/control/ilstbox.cxx | 20 +- vcl/source/control/longcurr.cxx | 4 +- vcl/source/control/lstbox.cxx | 13 +- vcl/source/control/scrbar.cxx | 3 +- vcl/source/control/spinfld.cxx | 6 +- vcl/source/control/tabctrl.cxx | 9 +- vcl/source/fontsubset/cff.cxx | 3 +- vcl/source/fontsubset/fontsubset.cxx | 5 +- vcl/source/gdi/bitmap.cxx | 15 +- vcl/source/gdi/bitmap3.cxx | 6 +- vcl/source/gdi/bitmapex.cxx | 17 +- vcl/source/gdi/bmpacc.cxx | 5 +- vcl/source/gdi/bmpacc3.cxx | 7 +- vcl/source/gdi/bmpfast.cxx | 2 +- vcl/source/gdi/configsettings.cxx | 4 +- vcl/source/gdi/cvtgrf.cxx | 8 +- vcl/source/gdi/font.cxx | 11 +- vcl/source/gdi/graph.cxx | 6 +- vcl/source/gdi/image.cxx | 13 +- vcl/source/gdi/imagerepository.cxx | 6 +- vcl/source/gdi/impbmp.cxx | 13 +- vcl/source/gdi/impgraph.cxx | 13 +- vcl/source/gdi/impimage.cxx | 4 +- vcl/source/gdi/impimagetree.cxx | 11 +- vcl/source/gdi/jobset.cxx | 8 +- vcl/source/gdi/metric.cxx | 2 +- vcl/source/gdi/octree.cxx | 5 +- vcl/source/gdi/outdev.cxx | 29 +- vcl/source/gdi/outdev2.cxx | 25 +- vcl/source/gdi/outdev3.cxx | 50 +- vcl/source/gdi/outdev4.cxx | 17 +- vcl/source/gdi/outdev5.cxx | 13 +- vcl/source/gdi/outdev6.cxx | 16 +- vcl/source/gdi/outdevnative.cxx | 3 +- vcl/source/gdi/outmap.cxx | 18 +- vcl/source/gdi/pdffontcache.cxx | 6 +- vcl/source/gdi/pdffontcache.hxx | 4 +- vcl/source/gdi/pdfwriter_impl.cxx | 37 +- vcl/source/gdi/pdfwriter_impl.hxx | 4 +- vcl/source/gdi/pdfwriter_impl2.cxx | 5 +- vcl/source/gdi/polyscan.cxx | 358 -- vcl/source/gdi/print.cxx | 24 +- vcl/source/gdi/print2.cxx | 7 +- vcl/source/gdi/print3.cxx | 11 +- vcl/source/gdi/region.cxx | 13 +- vcl/source/gdi/salgdilayout.cxx | 29 +- vcl/source/gdi/sallayout.cxx | 11 +- vcl/source/gdi/salmisc.cxx | 2 +- vcl/source/gdi/salnativewidgets-none.cxx | 2 +- vcl/source/gdi/svcompat.cxx | 78 - vcl/source/gdi/textlayout.cxx | 5 +- vcl/source/gdi/virdev.cxx | 17 +- vcl/source/gdi/wall.cxx | 5 +- vcl/source/glyphs/gcach_ftyp.cxx | 7 +- vcl/source/glyphs/gcach_ftyp.hxx | 2 +- vcl/source/glyphs/gcach_layout.cxx | 4 +- vcl/source/glyphs/gcach_rbmp.cxx | 2 +- vcl/source/glyphs/glyphcache.cxx | 8 +- vcl/source/glyphs/graphite_adaptors.cxx | 8 +- vcl/source/glyphs/graphite_cache.cxx | 6 +- vcl/source/glyphs/graphite_features.cxx | 2 +- vcl/source/glyphs/graphite_layout.cxx | 10 +- vcl/source/glyphs/graphite_serverfont.cxx | 6 +- vcl/source/glyphs/graphite_textsrc.cxx | 2 +- vcl/source/glyphs/graphite_textsrc.hxx | 12 +- vcl/source/helper/canvasbitmap.cxx | 2 +- vcl/source/helper/canvastools.cxx | 2 +- vcl/source/helper/lazydelete.cxx | 2 +- vcl/source/helper/xconnection.cxx | 7 +- vcl/source/salmain/salmain.cxx | 3 +- vcl/source/src/btntext.src | 4 +- vcl/source/src/helptext.src | 4 +- vcl/source/src/images.src | 4 +- vcl/source/src/menu.src | 5 +- vcl/source/src/print.src | 2 +- vcl/source/src/stdtext.src | 4 +- vcl/source/src/units.src | 4 +- vcl/source/window/accel.cxx | 9 +- vcl/source/window/accmgr.cxx | 5 +- vcl/source/window/arrange.cxx | 3 +- vcl/source/window/brdwin.cxx | 13 +- vcl/source/window/btndlg.cxx | 9 +- vcl/source/window/cursor.cxx | 7 +- vcl/source/window/dialog.cxx | 10 +- vcl/source/window/dlgctrl.cxx | 7 +- vcl/source/window/dndevdis.cxx | 9 +- vcl/source/window/dndlcon.cxx | 2 +- vcl/source/window/dockingarea.cxx | 5 +- vcl/source/window/dockmgr.cxx | 13 +- vcl/source/window/dockwin.cxx | 15 +- vcl/source/window/floatwin.cxx | 15 +- vcl/source/window/introwin.cxx | 11 +- vcl/source/window/keycod.cxx | 15 +- vcl/source/window/menu.cxx | 19 +- vcl/source/window/msgbox.cxx | 16 +- vcl/source/window/printdlg.cxx | 9 +- vcl/source/window/scrwnd.cxx | 15 +- vcl/source/window/split.cxx | 9 +- vcl/source/window/splitwin.cxx | 8 +- vcl/source/window/status.cxx | 10 +- vcl/source/window/syschild.cxx | 16 +- vcl/source/window/syswin.cxx | 12 +- vcl/source/window/tabpage.cxx | 9 +- vcl/source/window/taskpanelist.cxx | 7 +- vcl/source/window/toolbox.cxx | 19 +- vcl/source/window/toolbox2.cxx | 16 +- vcl/source/window/window.cxx | 63 +- vcl/source/window/window2.cxx | 27 +- vcl/source/window/window4.cxx | 5 +- vcl/source/window/winproc.cxx | 33 +- vcl/source/window/wpropset.cxx | 3 +- vcl/source/window/wrkwin.cxx | 16 +- vcl/unx/generic/app/i18n_cb.cxx | 664 +++ vcl/unx/generic/app/i18n_ic.cxx | 781 ++++ vcl/unx/generic/app/i18n_im.cxx | 619 +++ vcl/unx/generic/app/i18n_keysym.cxx | 365 ++ vcl/unx/generic/app/i18n_status.cxx | 733 ++++ vcl/unx/generic/app/i18n_wrp.cxx | 260 ++ vcl/unx/generic/app/i18n_xkb.cxx | 163 + vcl/unx/generic/app/keysymnames.cxx | 688 +++ vcl/unx/generic/app/makefile.mk | 110 + vcl/unx/generic/app/randrwrapper.cxx | 360 ++ vcl/unx/generic/app/saldata.cxx | 867 ++++ vcl/unx/generic/app/saldisp.cxx | 3435 +++++++++++++++ vcl/unx/generic/app/salinst.cxx | 452 ++ vcl/unx/generic/app/salsys.cxx | 226 + vcl/unx/generic/app/saltimer.cxx | 96 + vcl/unx/generic/app/sm.cxx | 801 ++++ vcl/unx/generic/app/soicon.cxx | 116 + vcl/unx/generic/app/wmadaptor.cxx | 2548 +++++++++++ vcl/unx/generic/desktopdetect/desktopdetector.cxx | 343 ++ vcl/unx/generic/desktopdetect/makefile.mk | 57 + vcl/unx/generic/dtrans/X11_clipboard.cxx | 293 ++ vcl/unx/generic/dtrans/X11_clipboard.hxx | 151 + vcl/unx/generic/dtrans/X11_dndcontext.cxx | 138 + vcl/unx/generic/dtrans/X11_dndcontext.hxx | 104 + vcl/unx/generic/dtrans/X11_droptarget.cxx | 228 + vcl/unx/generic/dtrans/X11_selection.cxx | 4205 ++++++++++++++++++ vcl/unx/generic/dtrans/X11_selection.hxx | 531 +++ vcl/unx/generic/dtrans/X11_service.cxx | 135 + vcl/unx/generic/dtrans/X11_transferable.cxx | 134 + vcl/unx/generic/dtrans/X11_transferable.hxx | 72 + vcl/unx/generic/dtrans/bmp.cxx | 739 ++++ vcl/unx/generic/dtrans/bmp.hxx | 105 + vcl/unx/generic/dtrans/config.cxx | 148 + vcl/unx/generic/dtrans/copydata_curs.h | 42 + vcl/unx/generic/dtrans/copydata_mask.h | 42 + vcl/unx/generic/dtrans/linkdata_curs.h | 42 + vcl/unx/generic/dtrans/linkdata_mask.h | 42 + vcl/unx/generic/dtrans/makefile.mk | 68 + vcl/unx/generic/dtrans/movedata_curs.h | 42 + vcl/unx/generic/dtrans/movedata_mask.h | 42 + vcl/unx/generic/dtrans/nodrop_curs.h | 42 + vcl/unx/generic/dtrans/nodrop_mask.h | 42 + vcl/unx/generic/fontmanager/adobeenc.tab | 1087 +++++ vcl/unx/generic/fontmanager/afm_hash.cpp | 245 ++ vcl/unx/generic/fontmanager/afm_keyword_list | 58 + vcl/unx/generic/fontmanager/fontcache.cxx | 811 ++++ vcl/unx/generic/fontmanager/fontconfig.cxx | 1306 ++++++ vcl/unx/generic/fontmanager/fontmanager.cxx | 4098 ++++++++++++++++++ vcl/unx/generic/fontmanager/helper.cxx | 404 ++ vcl/unx/generic/fontmanager/makefile.mk | 72 + vcl/unx/generic/fontmanager/parseAFM.cxx | 1577 +++++++ vcl/unx/generic/fontmanager/parseAFM.hxx | 334 ++ vcl/unx/generic/gdi/cdeint.cxx | 244 ++ vcl/unx/generic/gdi/dtint.cxx | 139 + vcl/unx/generic/gdi/dtsetenum.hxx | 146 + vcl/unx/generic/gdi/gcach_xpeer.cxx | 683 +++ vcl/unx/generic/gdi/gcach_xpeer.hxx | 93 + vcl/unx/generic/gdi/makefile.mk | 101 + vcl/unx/generic/gdi/pspgraphics.cxx | 1504 +++++++ vcl/unx/generic/gdi/salbmp.cxx | 1096 +++++ vcl/unx/generic/gdi/salcvt.cxx | 341 ++ vcl/unx/generic/gdi/salcvt.hxx | 93 + vcl/unx/generic/gdi/salgdi.cxx | 1285 ++++++ vcl/unx/generic/gdi/salgdi2.cxx | 1151 +++++ vcl/unx/generic/gdi/salgdi3.cxx | 1690 ++++++++ vcl/unx/generic/gdi/salprnpsp.cxx | 1462 +++++++ vcl/unx/generic/gdi/salvd.cxx | 274 ++ vcl/unx/generic/gdi/xrender_peer.cxx | 247 ++ vcl/unx/generic/gdi/xrender_peer.hxx | 387 ++ vcl/unx/generic/plugadapt/makefile.mk | 59 + vcl/unx/generic/plugadapt/salplug.cxx | 302 ++ vcl/unx/generic/printer/cupsmgr.cxx | 1175 +++++ vcl/unx/generic/printer/jobdata.cxx | 265 ++ vcl/unx/generic/printer/makefile.mk | 70 + vcl/unx/generic/printer/ppdparser.cxx | 2166 ++++++++++ vcl/unx/generic/printer/printerinfomanager.cxx | 1429 +++++++ vcl/unx/generic/printergfx/bitmap_gfx.cxx | 732 ++++ vcl/unx/generic/printergfx/common_gfx.cxx | 1284 ++++++ vcl/unx/generic/printergfx/glyphset.cxx | 942 ++++ vcl/unx/generic/printergfx/glyphset.hxx | 135 + vcl/unx/generic/printergfx/makefile.mk | 65 + vcl/unx/generic/printergfx/printerjob.cxx | 1204 ++++++ vcl/unx/generic/printergfx/psheader.ps | 368 ++ vcl/unx/generic/printergfx/psputil.cxx | 268 ++ vcl/unx/generic/printergfx/psputil.hxx | 78 + vcl/unx/generic/printergfx/text_gfx.cxx | 862 ++++ vcl/unx/generic/window/FWS.cxx | 280 ++ vcl/unx/generic/window/FWS.hxx | 64 + vcl/unx/generic/window/makefile.mk | 59 + vcl/unx/generic/window/salframe.cxx | 4520 ++++++++++++++++++++ vcl/unx/generic/window/salobj.cxx | 567 +++ vcl/unx/gtk/a11y/atkbridge.cxx | 4 +- vcl/unx/gtk/a11y/atkfactory.cxx | 2 +- vcl/unx/gtk/a11y/atkwindow.cxx | 2 +- vcl/unx/gtk/app/gtkdata.cxx | 16 +- vcl/unx/gtk/app/gtkinst.cxx | 13 +- vcl/unx/gtk/app/gtksys.cxx | 6 +- vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 18 +- vcl/unx/gtk/window/gtkframe.cxx | 21 +- vcl/unx/gtk/window/gtkobject.cxx | 8 +- vcl/unx/headless/svpbmp.hxx | 2 +- vcl/unx/headless/svpdummies.hxx | 7 +- vcl/unx/headless/svpframe.hxx | 2 +- vcl/unx/headless/svpgdi.hxx | 5 +- vcl/unx/headless/svpinst.cxx | 12 +- vcl/unx/headless/svpinst.hxx | 7 +- vcl/unx/headless/svpprn.cxx | 15 +- vcl/unx/headless/svpprn.hxx | 7 +- vcl/unx/headless/svppspgraphics.cxx | 39 +- vcl/unx/headless/svppspgraphics.hxx | 5 +- vcl/unx/headless/svptext.cxx | 12 +- vcl/unx/headless/svpvd.hxx | 2 +- vcl/unx/inc/XIM.h | 137 - vcl/unx/inc/Xproto.h | 49 - vcl/unx/inc/cdeint.hxx | 44 - vcl/unx/inc/dtint.hxx | 78 - vcl/unx/inc/i18n_cb.hxx | 95 - vcl/unx/inc/i18n_ic.hxx | 100 - vcl/unx/inc/i18n_im.hxx | 65 - vcl/unx/inc/i18n_keysym.hxx | 71 - vcl/unx/inc/i18n_status.hxx | 125 - vcl/unx/inc/i18n_xkb.hxx | 115 - vcl/unx/inc/plugins/gtk/atkbridge.hxx | 36 - vcl/unx/inc/plugins/gtk/gtkdata.hxx | 93 - vcl/unx/inc/plugins/gtk/gtkframe.hxx | 407 -- vcl/unx/inc/plugins/gtk/gtkgdi.hxx | 183 - vcl/unx/inc/plugins/gtk/gtkinst.hxx | 105 - vcl/unx/inc/plugins/gtk/gtkobject.hxx | 70 - vcl/unx/inc/plugins/kde/kdedata.hxx | 110 - vcl/unx/inc/pspgraphics.h | 193 - vcl/unx/inc/salbmp.h | 237 - vcl/unx/inc/saldata.hxx | 134 - vcl/unx/inc/saldisp.hxx | 550 --- vcl/unx/inc/salfont.h | 180 - vcl/unx/inc/salframe.h | 292 -- vcl/unx/inc/salgdi.h | 387 -- vcl/unx/inc/salinst.h | 128 - vcl/unx/inc/salmenu.h | 65 - vcl/unx/inc/salobj.h | 104 - vcl/unx/inc/salprn.h | 126 - vcl/unx/inc/salstd.hxx | 77 - vcl/unx/inc/salsys.h | 67 - vcl/unx/inc/saltimer.h | 44 - vcl/unx/inc/salunx.h | 128 - vcl/unx/inc/salvd.h | 101 - vcl/unx/inc/sm.hxx | 91 - vcl/unx/inc/soicon.hxx | 37 - vcl/unx/inc/strhelper.hxx | 41 - vcl/unx/inc/svsys.h | 32 - vcl/unx/inc/svunx.h | 35 - vcl/unx/inc/wmadaptor.hxx | 354 -- vcl/unx/kde/kdedata.cxx | 10 +- vcl/unx/kde/salnativewidgets-kde.cxx | 19 +- vcl/unx/kde4/KDEData.cxx | 2 +- vcl/unx/kde4/KDEData.hxx | 6 +- vcl/unx/kde4/KDESalDisplay.cxx | 2 +- vcl/unx/kde4/KDESalDisplay.hxx | 3 +- vcl/unx/kde4/KDESalFrame.cxx | 11 +- vcl/unx/kde4/KDESalFrame.hxx | 6 +- vcl/unx/kde4/KDESalGraphics.cxx | 2 +- vcl/unx/kde4/KDESalGraphics.hxx | 6 +- vcl/unx/kde4/KDESalInstance.cxx | 2 +- vcl/unx/kde4/KDESalInstance.hxx | 4 +- vcl/unx/kde4/KDEXLib.cxx | 9 +- vcl/unx/kde4/KDEXLib.hxx | 3 +- vcl/unx/kde4/VCLKDEApplication.cxx | 2 +- vcl/unx/kde4/VCLKDEApplication.hxx | 2 +- vcl/unx/source/app/i18n_cb.cxx | 664 --- vcl/unx/source/app/i18n_ic.cxx | 786 ---- vcl/unx/source/app/i18n_im.cxx | 618 --- vcl/unx/source/app/i18n_keysym.cxx | 365 -- vcl/unx/source/app/i18n_status.cxx | 733 ---- vcl/unx/source/app/i18n_wrp.cxx | 259 -- vcl/unx/source/app/i18n_xkb.cxx | 163 - vcl/unx/source/app/keysymnames.cxx | 688 --- vcl/unx/source/app/makefile.mk | 110 - vcl/unx/source/app/randrwrapper.cxx | 360 -- vcl/unx/source/app/saldata.cxx | 869 ---- vcl/unx/source/app/saldisp.cxx | 3435 --------------- vcl/unx/source/app/salinst.cxx | 451 -- vcl/unx/source/app/salsys.cxx | 225 - vcl/unx/source/app/saltimer.cxx | 96 - vcl/unx/source/app/sm.cxx | 800 ---- vcl/unx/source/app/soicon.cxx | 115 - vcl/unx/source/app/wmadaptor.cxx | 2543 ----------- vcl/unx/source/desktopdetect/desktopdetector.cxx | 343 -- vcl/unx/source/desktopdetect/makefile.mk | 57 - vcl/unx/source/dtrans/X11_clipboard.cxx | 293 -- vcl/unx/source/dtrans/X11_clipboard.hxx | 151 - vcl/unx/source/dtrans/X11_dndcontext.cxx | 138 - vcl/unx/source/dtrans/X11_dndcontext.hxx | 104 - vcl/unx/source/dtrans/X11_droptarget.cxx | 228 - vcl/unx/source/dtrans/X11_selection.cxx | 4205 ------------------ vcl/unx/source/dtrans/X11_selection.hxx | 531 --- vcl/unx/source/dtrans/X11_service.cxx | 135 - vcl/unx/source/dtrans/X11_transferable.cxx | 134 - vcl/unx/source/dtrans/X11_transferable.hxx | 72 - vcl/unx/source/dtrans/bmp.cxx | 739 ---- vcl/unx/source/dtrans/bmp.hxx | 105 - vcl/unx/source/dtrans/config.cxx | 148 - vcl/unx/source/dtrans/copydata_curs.h | 42 - vcl/unx/source/dtrans/copydata_mask.h | 42 - vcl/unx/source/dtrans/linkdata_curs.h | 42 - vcl/unx/source/dtrans/linkdata_mask.h | 42 - vcl/unx/source/dtrans/makefile.mk | 68 - vcl/unx/source/dtrans/movedata_curs.h | 42 - vcl/unx/source/dtrans/movedata_mask.h | 42 - vcl/unx/source/dtrans/nodrop_curs.h | 42 - vcl/unx/source/dtrans/nodrop_mask.h | 42 - vcl/unx/source/fontmanager/adobeenc.tab | 1087 ----- vcl/unx/source/fontmanager/afm_hash.cpp | 245 -- vcl/unx/source/fontmanager/afm_keyword_list | 58 - vcl/unx/source/fontmanager/fontcache.cxx | 811 ---- vcl/unx/source/fontmanager/fontconfig.cxx | 1306 ------ vcl/unx/source/fontmanager/fontmanager.cxx | 4099 ------------------ vcl/unx/source/fontmanager/helper.cxx | 404 -- vcl/unx/source/fontmanager/makefile.mk | 72 - vcl/unx/source/fontmanager/parseAFM.cxx | 1577 ------- vcl/unx/source/fontmanager/parseAFM.hxx | 334 -- vcl/unx/source/gdi/cdeint.cxx | 241 -- vcl/unx/source/gdi/dtint.cxx | 139 - vcl/unx/source/gdi/dtsetenum.hxx | 146 - vcl/unx/source/gdi/gcach_xpeer.cxx | 682 --- vcl/unx/source/gdi/gcach_xpeer.hxx | 94 - vcl/unx/source/gdi/makefile.mk | 101 - vcl/unx/source/gdi/pspgraphics.cxx | 1502 ------- vcl/unx/source/gdi/salbmp.cxx | 1093 ----- vcl/unx/source/gdi/salcvt.cxx | 341 -- vcl/unx/source/gdi/salcvt.hxx | 92 - vcl/unx/source/gdi/salgdi.cxx | 1285 ------ vcl/unx/source/gdi/salgdi2.cxx | 1149 ----- vcl/unx/source/gdi/salgdi3.cxx | 1688 -------- vcl/unx/source/gdi/salprnpsp.cxx | 1460 ------- vcl/unx/source/gdi/salvd.cxx | 272 -- vcl/unx/source/gdi/xrender_peer.cxx | 246 -- vcl/unx/source/gdi/xrender_peer.hxx | 387 -- vcl/unx/source/inc/airbrush_curs.h | 40 - vcl/unx/source/inc/airbrush_mask.h | 40 - vcl/unx/source/inc/ase_curs.h | 40 - vcl/unx/source/inc/ase_mask.h | 40 - vcl/unx/source/inc/asn_curs.h | 40 - vcl/unx/source/inc/asn_mask.h | 40 - vcl/unx/source/inc/asne_curs.h | 40 - vcl/unx/source/inc/asne_mask.h | 40 - vcl/unx/source/inc/asns_curs.h | 40 - vcl/unx/source/inc/asns_mask.h | 40 - vcl/unx/source/inc/asnswe_curs.h | 40 - vcl/unx/source/inc/asnswe_mask.h | 40 - vcl/unx/source/inc/asnw_curs.h | 40 - vcl/unx/source/inc/asnw_mask.h | 40 - vcl/unx/source/inc/ass_curs.h | 40 - vcl/unx/source/inc/ass_mask.h | 40 - vcl/unx/source/inc/asse_curs.h | 40 - vcl/unx/source/inc/asse_mask.h | 40 - vcl/unx/source/inc/assw_curs.h | 40 - vcl/unx/source/inc/assw_mask.h | 40 - vcl/unx/source/inc/asw_curs.h | 40 - vcl/unx/source/inc/asw_mask.h | 40 - vcl/unx/source/inc/aswe_curs.h | 40 - vcl/unx/source/inc/aswe_mask.h | 40 - vcl/unx/source/inc/chain_curs.h | 40 - vcl/unx/source/inc/chain_mask.h | 38 - vcl/unx/source/inc/chainnot_curs.h | 40 - vcl/unx/source/inc/chainnot_mask.h | 38 - vcl/unx/source/inc/chart_curs.h | 40 - vcl/unx/source/inc/chart_mask.h | 40 - vcl/unx/source/inc/copydata_curs.h | 42 - vcl/unx/source/inc/copydata_mask.h | 42 - vcl/unx/source/inc/copydlnk_curs.h | 42 - vcl/unx/source/inc/copydlnk_mask.h | 42 - vcl/unx/source/inc/copyfile_curs.h | 42 - vcl/unx/source/inc/copyfile_mask.h | 42 - vcl/unx/source/inc/copyfiles_curs.h | 42 - vcl/unx/source/inc/copyfiles_mask.h | 42 - vcl/unx/source/inc/copyflnk_curs.h | 42 - vcl/unx/source/inc/copyflnk_mask.h | 42 - vcl/unx/source/inc/crook_curs.h | 42 - vcl/unx/source/inc/crook_mask.h | 40 - vcl/unx/source/inc/crop_curs.h | 42 - vcl/unx/source/inc/crop_mask.h | 40 - vcl/unx/source/inc/detective_curs.h | 40 - vcl/unx/source/inc/detective_mask.h | 40 - vcl/unx/source/inc/drawarc_curs.h | 42 - vcl/unx/source/inc/drawarc_mask.h | 40 - vcl/unx/source/inc/drawbezier_curs.h | 42 - vcl/unx/source/inc/drawbezier_mask.h | 40 - vcl/unx/source/inc/drawcaption_curs.h | 42 - vcl/unx/source/inc/drawcaption_mask.h | 40 - vcl/unx/source/inc/drawcirclecut_curs.h | 42 - vcl/unx/source/inc/drawcirclecut_mask.h | 40 - vcl/unx/source/inc/drawconnect_curs.h | 42 - vcl/unx/source/inc/drawconnect_mask.h | 40 - vcl/unx/source/inc/drawcrook_curs.h | 42 - vcl/unx/source/inc/drawcrook_mask.h | 40 - vcl/unx/source/inc/drawcrop_curs.h | 42 - vcl/unx/source/inc/drawcrop_mask.h | 40 - vcl/unx/source/inc/drawellipse_curs.h | 42 - vcl/unx/source/inc/drawellipse_mask.h | 40 - vcl/unx/source/inc/drawfreehand_curs.h | 42 - vcl/unx/source/inc/drawfreehand_mask.h | 40 - vcl/unx/source/inc/drawline_curs.h | 42 - vcl/unx/source/inc/drawline_mask.h | 40 - vcl/unx/source/inc/drawmirror_curs.h | 42 - vcl/unx/source/inc/drawmirror_mask.h | 40 - vcl/unx/source/inc/drawpie_curs.h | 42 - vcl/unx/source/inc/drawpie_mask.h | 40 - vcl/unx/source/inc/drawpolygon_curs.h | 42 - vcl/unx/source/inc/drawpolygon_mask.h | 40 - vcl/unx/source/inc/drawrect_curs.h | 42 - vcl/unx/source/inc/drawrect_mask.h | 40 - vcl/unx/source/inc/drawtext_curs.h | 42 - vcl/unx/source/inc/drawtext_mask.h | 40 - vcl/unx/source/inc/fill_curs.h | 40 - vcl/unx/source/inc/fill_mask.h | 40 - vcl/unx/source/inc/hshear_curs.h | 42 - vcl/unx/source/inc/hshear_mask.h | 40 - vcl/unx/source/inc/invert50.h | 65 - vcl/unx/source/inc/linkdata_curs.h | 42 - vcl/unx/source/inc/linkdata_mask.h | 42 - vcl/unx/source/inc/linkfile_curs.h | 42 - vcl/unx/source/inc/linkfile_mask.h | 42 - vcl/unx/source/inc/magnify_curs.h | 40 - vcl/unx/source/inc/magnify_mask.h | 40 - vcl/unx/source/inc/mirror_curs.h | 42 - vcl/unx/source/inc/mirror_mask.h | 40 - vcl/unx/source/inc/movebezierweight_curs.h | 42 - vcl/unx/source/inc/movebezierweight_mask.h | 40 - vcl/unx/source/inc/movedata_curs.h | 42 - vcl/unx/source/inc/movedata_mask.h | 42 - vcl/unx/source/inc/movedlnk_curs.h | 42 - vcl/unx/source/inc/movedlnk_mask.h | 42 - vcl/unx/source/inc/movefile_curs.h | 42 - vcl/unx/source/inc/movefile_mask.h | 42 - vcl/unx/source/inc/movefiles_curs.h | 42 - vcl/unx/source/inc/movefiles_mask.h | 42 - vcl/unx/source/inc/moveflnk_curs.h | 42 - vcl/unx/source/inc/moveflnk_mask.h | 42 - vcl/unx/source/inc/movepoint_curs.h | 42 - vcl/unx/source/inc/movepoint_mask.h | 40 - vcl/unx/source/inc/nodrop_curs.h | 42 - vcl/unx/source/inc/nodrop_mask.h | 42 - vcl/unx/source/inc/null_curs.h | 31 - vcl/unx/source/inc/null_mask.h | 29 - vcl/unx/source/inc/paintbrush_curs.h | 8 - vcl/unx/source/inc/paintbrush_mask.h | 7 - vcl/unx/source/inc/pivotcol_curs.h | 42 - vcl/unx/source/inc/pivotcol_mask.h | 42 - vcl/unx/source/inc/pivotdel_curs.h | 42 - vcl/unx/source/inc/pivotdel_mask.h | 42 - vcl/unx/source/inc/pivotfld_curs.h | 42 - vcl/unx/source/inc/pivotfld_mask.h | 42 - vcl/unx/source/inc/pivotrow_curs.h | 42 - vcl/unx/source/inc/pivotrow_mask.h | 42 - vcl/unx/source/inc/rotate_curs.h | 42 - vcl/unx/source/inc/rotate_mask.h | 40 - vcl/unx/source/inc/salcursors.h | 162 - vcl/unx/source/inc/tblsele_curs.h | 8 - vcl/unx/source/inc/tblsele_mask.h | 7 - vcl/unx/source/inc/tblsels_curs.h | 9 - vcl/unx/source/inc/tblsels_mask.h | 7 - vcl/unx/source/inc/tblselse_curs.h | 8 - vcl/unx/source/inc/tblselse_mask.h | 7 - vcl/unx/source/inc/tblselsw_curs.h | 8 - vcl/unx/source/inc/tblselsw_mask.h | 7 - vcl/unx/source/inc/tblselw_curs.h | 8 - vcl/unx/source/inc/tblselw_mask.h | 6 - vcl/unx/source/inc/timemove_curs.h | 40 - vcl/unx/source/inc/timemove_mask.h | 40 - vcl/unx/source/inc/timesize_curs.h | 40 - vcl/unx/source/inc/timesize_mask.h | 40 - vcl/unx/source/inc/vertcurs_curs.h | 8 - vcl/unx/source/inc/vertcurs_mask.h | 8 - vcl/unx/source/inc/vshear_curs.h | 42 - vcl/unx/source/inc/vshear_mask.h | 40 - vcl/unx/source/plugadapt/makefile.mk | 59 - vcl/unx/source/plugadapt/salplug.cxx | 303 -- vcl/unx/source/printer/cupsmgr.cxx | 1175 ----- vcl/unx/source/printer/jobdata.cxx | 265 -- vcl/unx/source/printer/makefile.mk | 70 - vcl/unx/source/printer/ppdparser.cxx | 2166 ---------- vcl/unx/source/printer/printerinfomanager.cxx | 1428 ------- vcl/unx/source/printergfx/bitmap_gfx.cxx | 732 ---- vcl/unx/source/printergfx/common_gfx.cxx | 1284 ------ vcl/unx/source/printergfx/glyphset.cxx | 942 ---- vcl/unx/source/printergfx/glyphset.hxx | 135 - vcl/unx/source/printergfx/makefile.mk | 65 - vcl/unx/source/printergfx/printerjob.cxx | 1204 ------ vcl/unx/source/printergfx/psheader.ps | 368 -- vcl/unx/source/printergfx/psputil.cxx | 268 -- vcl/unx/source/printergfx/psputil.hxx | 78 - vcl/unx/source/printergfx/text_gfx.cxx | 862 ---- vcl/unx/source/window/FWS.cxx | 280 -- vcl/unx/source/window/FWS.hxx | 64 - vcl/unx/source/window/makefile.mk | 59 - vcl/unx/source/window/salframe.cxx | 4518 ------------------- vcl/unx/source/window/salobj.cxx | 568 --- vcl/util/makefile.mk | 1 - 976 files changed, 84514 insertions(+), 85075 deletions(-) delete mode 100644 vcl/aqua/inc/aqua11yfactory.h delete mode 100644 vcl/aqua/inc/aqua11yfocustracker.hxx delete mode 100644 vcl/aqua/inc/aqua11ylistener.hxx delete mode 100644 vcl/aqua/inc/aqua11ywrapper.h delete mode 100755 vcl/aqua/inc/aquaprintview.h delete mode 100644 vcl/aqua/inc/aquavclevents.hxx delete mode 100644 vcl/aqua/inc/aquavcltypes.h delete mode 100644 vcl/aqua/inc/keyboardfocuslistener.hxx delete mode 100644 vcl/aqua/inc/salatsuifontutils.hxx delete mode 100644 vcl/aqua/inc/salbmp.h delete mode 100755 vcl/aqua/inc/salcolorutils.hxx delete mode 100755 vcl/aqua/inc/salconst.h delete mode 100644 vcl/aqua/inc/saldata.hxx delete mode 100644 vcl/aqua/inc/salfontutils.hxx delete mode 100644 vcl/aqua/inc/salframe.h delete mode 100755 vcl/aqua/inc/salframeview.h delete mode 100644 vcl/aqua/inc/salgdi.h delete mode 100644 vcl/aqua/inc/salinst.h delete mode 100755 vcl/aqua/inc/salmathutils.hxx delete mode 100644 vcl/aqua/inc/salmenu.h delete mode 100755 vcl/aqua/inc/salnativewidgets.h delete mode 100755 vcl/aqua/inc/salnsmenu.h delete mode 100755 vcl/aqua/inc/salnstimer.h delete mode 100644 vcl/aqua/inc/salobj.h delete mode 100644 vcl/aqua/inc/salprn.h delete mode 100644 vcl/aqua/inc/salsys.h delete mode 100644 vcl/aqua/inc/saltimer.h delete mode 100644 vcl/aqua/inc/salvd.h delete mode 100644 vcl/aqua/inc/svsys.h delete mode 100755 vcl/aqua/inc/vclnsapp.h create mode 100644 vcl/inc/accel.h create mode 100644 vcl/inc/accmgr.hxx create mode 100644 vcl/inc/aqua/aqua11yfactory.h create mode 100644 vcl/inc/aqua/aqua11yfocustracker.hxx create mode 100644 vcl/inc/aqua/aqua11ylistener.hxx create mode 100644 vcl/inc/aqua/aqua11ywrapper.h create mode 100755 vcl/inc/aqua/aquaprintview.h create mode 100644 vcl/inc/aqua/aquavclevents.hxx create mode 100644 vcl/inc/aqua/aquavcltypes.h create mode 100644 vcl/inc/aqua/keyboardfocuslistener.hxx create mode 100644 vcl/inc/aqua/salatsuifontutils.hxx create mode 100644 vcl/inc/aqua/salbmp.h create mode 100755 vcl/inc/aqua/salcolorutils.hxx create mode 100755 vcl/inc/aqua/salconst.h create mode 100644 vcl/inc/aqua/saldata.hxx create mode 100644 vcl/inc/aqua/salfontutils.hxx create mode 100644 vcl/inc/aqua/salframe.h create mode 100755 vcl/inc/aqua/salframeview.h create mode 100644 vcl/inc/aqua/salgdi.h create mode 100644 vcl/inc/aqua/salinst.h create mode 100755 vcl/inc/aqua/salmathutils.hxx create mode 100644 vcl/inc/aqua/salmenu.h create mode 100755 vcl/inc/aqua/salnativewidgets.h create mode 100755 vcl/inc/aqua/salnsmenu.h create mode 100755 vcl/inc/aqua/salnstimer.h create mode 100644 vcl/inc/aqua/salobj.h create mode 100644 vcl/inc/aqua/salprn.h create mode 100644 vcl/inc/aqua/salsys.h create mode 100644 vcl/inc/aqua/saltimer.h create mode 100644 vcl/inc/aqua/salvd.h create mode 100644 vcl/inc/aqua/svsys.h create mode 100755 vcl/inc/aqua/vclnsapp.h create mode 100644 vcl/inc/bmpfast.hxx create mode 100644 vcl/inc/brdwin.hxx create mode 100644 vcl/inc/canvasbitmap.hxx create mode 100644 vcl/inc/controldata.hxx create mode 100644 vcl/inc/dbggui.hxx create mode 100644 vcl/inc/dndevdis.hxx create mode 100644 vcl/inc/dndlcon.hxx create mode 100644 vcl/inc/fontcache.hxx create mode 100644 vcl/inc/fontsubset.hxx create mode 100644 vcl/inc/glyphcache.hxx create mode 100644 vcl/inc/graphite_adaptors.hxx create mode 100644 vcl/inc/graphite_cache.hxx create mode 100644 vcl/inc/graphite_features.hxx create mode 100644 vcl/inc/graphite_layout.hxx create mode 100644 vcl/inc/graphite_serverfont.hxx create mode 100644 vcl/inc/helpwin.hxx create mode 100644 vcl/inc/idlemgr.hxx create mode 100644 vcl/inc/ilstbox.hxx create mode 100644 vcl/inc/image.h create mode 100644 vcl/inc/impbmp.hxx create mode 100644 vcl/inc/impfont.hxx create mode 100644 vcl/inc/impgraph.hxx create mode 100644 vcl/inc/impimagetree.hxx create mode 100644 vcl/inc/impoct.hxx create mode 100644 vcl/inc/impprn.hxx create mode 100644 vcl/inc/jobset.h create mode 100644 vcl/inc/outdata.hxx create mode 100644 vcl/inc/outdev.h create mode 100644 vcl/inc/outfont.hxx create mode 100644 vcl/inc/print.h create mode 100644 vcl/inc/printdlg.hxx create mode 100644 vcl/inc/printergfx.hxx create mode 100644 vcl/inc/printerjob.hxx create mode 100644 vcl/inc/region.h create mode 100644 vcl/inc/salbmp.hxx create mode 100644 vcl/inc/saldatabasic.hxx create mode 100644 vcl/inc/salframe.hxx create mode 100644 vcl/inc/salgdi.hxx create mode 100644 vcl/inc/salgeom.hxx create mode 100644 vcl/inc/salimestatus.hxx create mode 100644 vcl/inc/salinst.hxx create mode 100755 vcl/inc/sallayout.hxx create mode 100644 vcl/inc/salmenu.hxx create mode 100644 vcl/inc/salobj.hxx create mode 100644 vcl/inc/salprn.hxx create mode 100644 vcl/inc/salptype.hxx create mode 100644 vcl/inc/salsession.hxx create mode 100644 vcl/inc/salsys.hxx create mode 100644 vcl/inc/saltimer.hxx create mode 100644 vcl/inc/salvd.hxx create mode 100644 vcl/inc/salwtype.hxx create mode 100644 vcl/inc/subedit.hxx create mode 100644 vcl/inc/svdata.hxx create mode 100644 vcl/inc/svids.hrc create mode 100644 vcl/inc/svsys.h create mode 100644 vcl/inc/textlayout.hxx create mode 100644 vcl/inc/toolbox.h create mode 100644 vcl/inc/unx/XIM.h create mode 100644 vcl/inc/unx/Xproto.h create mode 100644 vcl/inc/unx/cdeint.hxx create mode 100644 vcl/inc/unx/dtint.hxx create mode 100644 vcl/inc/unx/gtk/atkbridge.hxx create mode 100644 vcl/inc/unx/gtk/gtkdata.hxx create mode 100644 vcl/inc/unx/gtk/gtkframe.hxx create mode 100644 vcl/inc/unx/gtk/gtkgdi.hxx create mode 100644 vcl/inc/unx/gtk/gtkinst.hxx create mode 100644 vcl/inc/unx/gtk/gtkobject.hxx create mode 100644 vcl/inc/unx/i18n_cb.hxx create mode 100644 vcl/inc/unx/i18n_ic.hxx create mode 100644 vcl/inc/unx/i18n_im.hxx create mode 100644 vcl/inc/unx/i18n_keysym.hxx create mode 100644 vcl/inc/unx/i18n_status.hxx create mode 100644 vcl/inc/unx/i18n_xkb.hxx create mode 100644 vcl/inc/unx/kde/kdedata.hxx create mode 100644 vcl/inc/unx/pspgraphics.h create mode 100644 vcl/inc/unx/salbmp.h create mode 100644 vcl/inc/unx/saldata.hxx create mode 100644 vcl/inc/unx/saldisp.hxx create mode 100644 vcl/inc/unx/salfont.h create mode 100644 vcl/inc/unx/salframe.h create mode 100644 vcl/inc/unx/salgdi.h create mode 100644 vcl/inc/unx/salinst.h create mode 100644 vcl/inc/unx/salmenu.h create mode 100644 vcl/inc/unx/salobj.h create mode 100644 vcl/inc/unx/salprn.h create mode 100644 vcl/inc/unx/salstd.hxx create mode 100644 vcl/inc/unx/salsys.h create mode 100644 vcl/inc/unx/saltimer.h create mode 100644 vcl/inc/unx/salunx.h create mode 100644 vcl/inc/unx/salvd.h create mode 100644 vcl/inc/unx/sm.hxx create mode 100644 vcl/inc/unx/soicon.hxx create mode 100644 vcl/inc/unx/strhelper.hxx create mode 100644 vcl/inc/unx/svsys.h create mode 100644 vcl/inc/unx/svunx.h create mode 100644 vcl/inc/unx/wmadaptor.hxx create mode 100644 vcl/inc/unx/x11_cursors/airbrush_curs.h create mode 100644 vcl/inc/unx/x11_cursors/airbrush_mask.h create mode 100644 vcl/inc/unx/x11_cursors/ase_curs.h create mode 100644 vcl/inc/unx/x11_cursors/ase_mask.h create mode 100644 vcl/inc/unx/x11_cursors/asn_curs.h create mode 100644 vcl/inc/unx/x11_cursors/asn_mask.h create mode 100644 vcl/inc/unx/x11_cursors/asne_curs.h create mode 100644 vcl/inc/unx/x11_cursors/asne_mask.h create mode 100644 vcl/inc/unx/x11_cursors/asns_curs.h create mode 100644 vcl/inc/unx/x11_cursors/asns_mask.h create mode 100644 vcl/inc/unx/x11_cursors/asnswe_curs.h create mode 100644 vcl/inc/unx/x11_cursors/asnswe_mask.h create mode 100644 vcl/inc/unx/x11_cursors/asnw_curs.h create mode 100644 vcl/inc/unx/x11_cursors/asnw_mask.h create mode 100644 vcl/inc/unx/x11_cursors/ass_curs.h create mode 100644 vcl/inc/unx/x11_cursors/ass_mask.h create mode 100644 vcl/inc/unx/x11_cursors/asse_curs.h create mode 100644 vcl/inc/unx/x11_cursors/asse_mask.h create mode 100644 vcl/inc/unx/x11_cursors/assw_curs.h create mode 100644 vcl/inc/unx/x11_cursors/assw_mask.h create mode 100644 vcl/inc/unx/x11_cursors/asw_curs.h create mode 100644 vcl/inc/unx/x11_cursors/asw_mask.h create mode 100644 vcl/inc/unx/x11_cursors/aswe_curs.h create mode 100644 vcl/inc/unx/x11_cursors/aswe_mask.h create mode 100644 vcl/inc/unx/x11_cursors/chain_curs.h create mode 100644 vcl/inc/unx/x11_cursors/chain_mask.h create mode 100644 vcl/inc/unx/x11_cursors/chainnot_curs.h create mode 100644 vcl/inc/unx/x11_cursors/chainnot_mask.h create mode 100644 vcl/inc/unx/x11_cursors/chart_curs.h create mode 100644 vcl/inc/unx/x11_cursors/chart_mask.h create mode 100644 vcl/inc/unx/x11_cursors/copydata_curs.h create mode 100644 vcl/inc/unx/x11_cursors/copydata_mask.h create mode 100644 vcl/inc/unx/x11_cursors/copydlnk_curs.h create mode 100644 vcl/inc/unx/x11_cursors/copydlnk_mask.h create mode 100644 vcl/inc/unx/x11_cursors/copyfile_curs.h create mode 100644 vcl/inc/unx/x11_cursors/copyfile_mask.h create mode 100644 vcl/inc/unx/x11_cursors/copyfiles_curs.h create mode 100644 vcl/inc/unx/x11_cursors/copyfiles_mask.h create mode 100644 vcl/inc/unx/x11_cursors/copyflnk_curs.h create mode 100644 vcl/inc/unx/x11_cursors/copyflnk_mask.h create mode 100644 vcl/inc/unx/x11_cursors/crook_curs.h create mode 100644 vcl/inc/unx/x11_cursors/crook_mask.h create mode 100644 vcl/inc/unx/x11_cursors/crop_curs.h create mode 100644 vcl/inc/unx/x11_cursors/crop_mask.h create mode 100644 vcl/inc/unx/x11_cursors/detective_curs.h create mode 100644 vcl/inc/unx/x11_cursors/detective_mask.h create mode 100644 vcl/inc/unx/x11_cursors/drawarc_curs.h create mode 100644 vcl/inc/unx/x11_cursors/drawarc_mask.h create mode 100644 vcl/inc/unx/x11_cursors/drawbezier_curs.h create mode 100644 vcl/inc/unx/x11_cursors/drawbezier_mask.h create mode 100644 vcl/inc/unx/x11_cursors/drawcaption_curs.h create mode 100644 vcl/inc/unx/x11_cursors/drawcaption_mask.h create mode 100644 vcl/inc/unx/x11_cursors/drawcirclecut_curs.h create mode 100644 vcl/inc/unx/x11_cursors/drawcirclecut_mask.h create mode 100644 vcl/inc/unx/x11_cursors/drawconnect_curs.h create mode 100644 vcl/inc/unx/x11_cursors/drawconnect_mask.h create mode 100644 vcl/inc/unx/x11_cursors/drawcrook_curs.h create mode 100644 vcl/inc/unx/x11_cursors/drawcrook_mask.h create mode 100644 vcl/inc/unx/x11_cursors/drawcrop_curs.h create mode 100644 vcl/inc/unx/x11_cursors/drawcrop_mask.h create mode 100644 vcl/inc/unx/x11_cursors/drawellipse_curs.h create mode 100644 vcl/inc/unx/x11_cursors/drawellipse_mask.h create mode 100644 vcl/inc/unx/x11_cursors/drawfreehand_curs.h create mode 100644 vcl/inc/unx/x11_cursors/drawfreehand_mask.h create mode 100644 vcl/inc/unx/x11_cursors/drawline_curs.h create mode 100644 vcl/inc/unx/x11_cursors/drawline_mask.h create mode 100644 vcl/inc/unx/x11_cursors/drawmirror_curs.h create mode 100644 vcl/inc/unx/x11_cursors/drawmirror_mask.h create mode 100644 vcl/inc/unx/x11_cursors/drawpie_curs.h create mode 100644 vcl/inc/unx/x11_cursors/drawpie_mask.h create mode 100644 vcl/inc/unx/x11_cursors/drawpolygon_curs.h create mode 100644 vcl/inc/unx/x11_cursors/drawpolygon_mask.h create mode 100644 vcl/inc/unx/x11_cursors/drawrect_curs.h create mode 100644 vcl/inc/unx/x11_cursors/drawrect_mask.h create mode 100644 vcl/inc/unx/x11_cursors/drawtext_curs.h create mode 100644 vcl/inc/unx/x11_cursors/drawtext_mask.h create mode 100644 vcl/inc/unx/x11_cursors/fill_curs.h create mode 100644 vcl/inc/unx/x11_cursors/fill_mask.h create mode 100644 vcl/inc/unx/x11_cursors/hshear_curs.h create mode 100644 vcl/inc/unx/x11_cursors/hshear_mask.h create mode 100644 vcl/inc/unx/x11_cursors/invert50.h create mode 100644 vcl/inc/unx/x11_cursors/linkdata_curs.h create mode 100644 vcl/inc/unx/x11_cursors/linkdata_mask.h create mode 100644 vcl/inc/unx/x11_cursors/linkfile_curs.h create mode 100644 vcl/inc/unx/x11_cursors/linkfile_mask.h create mode 100644 vcl/inc/unx/x11_cursors/magnify_curs.h create mode 100644 vcl/inc/unx/x11_cursors/magnify_mask.h create mode 100644 vcl/inc/unx/x11_cursors/mirror_curs.h create mode 100644 vcl/inc/unx/x11_cursors/mirror_mask.h create mode 100644 vcl/inc/unx/x11_cursors/movebezierweight_curs.h create mode 100644 vcl/inc/unx/x11_cursors/movebezierweight_mask.h create mode 100644 vcl/inc/unx/x11_cursors/movedata_curs.h create mode 100644 vcl/inc/unx/x11_cursors/movedata_mask.h create mode 100644 vcl/inc/unx/x11_cursors/movedlnk_curs.h create mode 100644 vcl/inc/unx/x11_cursors/movedlnk_mask.h create mode 100644 vcl/inc/unx/x11_cursors/movefile_curs.h create mode 100644 vcl/inc/unx/x11_cursors/movefile_mask.h create mode 100644 vcl/inc/unx/x11_cursors/movefiles_curs.h create mode 100644 vcl/inc/unx/x11_cursors/movefiles_mask.h create mode 100644 vcl/inc/unx/x11_cursors/moveflnk_curs.h create mode 100644 vcl/inc/unx/x11_cursors/moveflnk_mask.h create mode 100644 vcl/inc/unx/x11_cursors/movepoint_curs.h create mode 100644 vcl/inc/unx/x11_cursors/movepoint_mask.h create mode 100644 vcl/inc/unx/x11_cursors/nodrop_curs.h create mode 100644 vcl/inc/unx/x11_cursors/nodrop_mask.h create mode 100644 vcl/inc/unx/x11_cursors/null_curs.h create mode 100644 vcl/inc/unx/x11_cursors/null_mask.h create mode 100644 vcl/inc/unx/x11_cursors/paintbrush_curs.h create mode 100644 vcl/inc/unx/x11_cursors/paintbrush_mask.h create mode 100644 vcl/inc/unx/x11_cursors/pivotcol_curs.h create mode 100644 vcl/inc/unx/x11_cursors/pivotcol_mask.h create mode 100644 vcl/inc/unx/x11_cursors/pivotdel_curs.h create mode 100644 vcl/inc/unx/x11_cursors/pivotdel_mask.h create mode 100644 vcl/inc/unx/x11_cursors/pivotfld_curs.h create mode 100644 vcl/inc/unx/x11_cursors/pivotfld_mask.h create mode 100644 vcl/inc/unx/x11_cursors/pivotrow_curs.h create mode 100644 vcl/inc/unx/x11_cursors/pivotrow_mask.h create mode 100644 vcl/inc/unx/x11_cursors/rotate_curs.h create mode 100644 vcl/inc/unx/x11_cursors/rotate_mask.h create mode 100644 vcl/inc/unx/x11_cursors/salcursors.h create mode 100644 vcl/inc/unx/x11_cursors/tblsele_curs.h create mode 100644 vcl/inc/unx/x11_cursors/tblsele_mask.h create mode 100644 vcl/inc/unx/x11_cursors/tblsels_curs.h create mode 100644 vcl/inc/unx/x11_cursors/tblsels_mask.h create mode 100644 vcl/inc/unx/x11_cursors/tblselse_curs.h create mode 100644 vcl/inc/unx/x11_cursors/tblselse_mask.h create mode 100644 vcl/inc/unx/x11_cursors/tblselsw_curs.h create mode 100644 vcl/inc/unx/x11_cursors/tblselsw_mask.h create mode 100644 vcl/inc/unx/x11_cursors/tblselw_curs.h create mode 100644 vcl/inc/unx/x11_cursors/tblselw_mask.h create mode 100644 vcl/inc/unx/x11_cursors/timemove_curs.h create mode 100644 vcl/inc/unx/x11_cursors/timemove_mask.h create mode 100644 vcl/inc/unx/x11_cursors/timesize_curs.h create mode 100644 vcl/inc/unx/x11_cursors/timesize_mask.h create mode 100644 vcl/inc/unx/x11_cursors/vertcurs_curs.h create mode 100644 vcl/inc/unx/x11_cursors/vertcurs_mask.h create mode 100644 vcl/inc/unx/x11_cursors/vshear_curs.h create mode 100644 vcl/inc/unx/x11_cursors/vshear_mask.h delete mode 100644 vcl/inc/vcl/accel.h delete mode 100644 vcl/inc/vcl/accmgr.hxx delete mode 100644 vcl/inc/vcl/bmpfast.hxx delete mode 100644 vcl/inc/vcl/brdwin.hxx delete mode 100644 vcl/inc/vcl/canvasbitmap.hxx delete mode 100644 vcl/inc/vcl/controldata.hxx delete mode 100644 vcl/inc/vcl/dbggui.hxx delete mode 100644 vcl/inc/vcl/dndevdis.hxx delete mode 100644 vcl/inc/vcl/dndlcon.hxx delete mode 100644 vcl/inc/vcl/fontcache.hxx delete mode 100644 vcl/inc/vcl/fontsubset.hxx delete mode 100644 vcl/inc/vcl/glyphcache.hxx delete mode 100644 vcl/inc/vcl/graphite_adaptors.hxx delete mode 100644 vcl/inc/vcl/graphite_cache.hxx delete mode 100644 vcl/inc/vcl/graphite_features.hxx delete mode 100644 vcl/inc/vcl/graphite_layout.hxx delete mode 100644 vcl/inc/vcl/graphite_serverfont.hxx delete mode 100644 vcl/inc/vcl/helpwin.hxx delete mode 100644 vcl/inc/vcl/idlemgr.hxx delete mode 100644 vcl/inc/vcl/ilstbox.hxx delete mode 100644 vcl/inc/vcl/image.h delete mode 100644 vcl/inc/vcl/impbmp.hxx delete mode 100644 vcl/inc/vcl/impfont.hxx delete mode 100644 vcl/inc/vcl/impgraph.hxx delete mode 100644 vcl/inc/vcl/impimagetree.hxx delete mode 100644 vcl/inc/vcl/impoct.hxx delete mode 100644 vcl/inc/vcl/impprn.hxx delete mode 100644 vcl/inc/vcl/jobset.h delete mode 100644 vcl/inc/vcl/outdata.hxx delete mode 100644 vcl/inc/vcl/outdev.h delete mode 100644 vcl/inc/vcl/outfont.hxx delete mode 100644 vcl/inc/vcl/polyscan.hxx delete mode 100644 vcl/inc/vcl/print.h delete mode 100644 vcl/inc/vcl/printergfx.hxx delete mode 100644 vcl/inc/vcl/printerjob.hxx delete mode 100644 vcl/inc/vcl/prndlg.hxx delete mode 100644 vcl/inc/vcl/region.h delete mode 100644 vcl/inc/vcl/salbmp.hxx delete mode 100644 vcl/inc/vcl/saldatabasic.hxx delete mode 100644 vcl/inc/vcl/salframe.hxx delete mode 100644 vcl/inc/vcl/salgdi.hxx delete mode 100644 vcl/inc/vcl/salgeom.hxx delete mode 100644 vcl/inc/vcl/salimestatus.hxx delete mode 100644 vcl/inc/vcl/salinst.hxx delete mode 100755 vcl/inc/vcl/sallayout.hxx delete mode 100644 vcl/inc/vcl/salmenu.hxx delete mode 100644 vcl/inc/vcl/salobj.hxx delete mode 100644 vcl/inc/vcl/salprn.hxx delete mode 100644 vcl/inc/vcl/salptype.hxx delete mode 100644 vcl/inc/vcl/salsession.hxx delete mode 100644 vcl/inc/vcl/salsys.hxx delete mode 100644 vcl/inc/vcl/saltimer.hxx delete mode 100644 vcl/inc/vcl/salvd.hxx delete mode 100644 vcl/inc/vcl/salwtype.hxx delete mode 100644 vcl/inc/vcl/subedit.hxx delete mode 100644 vcl/inc/vcl/svcompat.hxx delete mode 100644 vcl/inc/vcl/svdata.hxx delete mode 100644 vcl/inc/vcl/svids.hrc delete mode 100644 vcl/inc/vcl/textlayout.hxx delete mode 100644 vcl/inc/vcl/toolbox.h delete mode 100644 vcl/inc/vcl/unobrok.hxx delete mode 100644 vcl/inc/vcl/wall2.hxx delete mode 100644 vcl/inc/vcl/window.h delete mode 100644 vcl/inc/vcl/xconnection.hxx create mode 100644 vcl/inc/wall2.hxx create mode 100644 vcl/inc/window.h create mode 100644 vcl/inc/xconnection.hxx mode change 100755 => 100644 vcl/source/gdi/outdev2.cxx delete mode 100644 vcl/source/gdi/polyscan.cxx delete mode 100644 vcl/source/gdi/svcompat.cxx create mode 100644 vcl/unx/generic/app/i18n_cb.cxx create mode 100644 vcl/unx/generic/app/i18n_ic.cxx create mode 100644 vcl/unx/generic/app/i18n_im.cxx create mode 100644 vcl/unx/generic/app/i18n_keysym.cxx create mode 100644 vcl/unx/generic/app/i18n_status.cxx create mode 100644 vcl/unx/generic/app/i18n_wrp.cxx create mode 100644 vcl/unx/generic/app/i18n_xkb.cxx create mode 100644 vcl/unx/generic/app/keysymnames.cxx create mode 100644 vcl/unx/generic/app/makefile.mk create mode 100644 vcl/unx/generic/app/randrwrapper.cxx create mode 100644 vcl/unx/generic/app/saldata.cxx create mode 100644 vcl/unx/generic/app/saldisp.cxx create mode 100644 vcl/unx/generic/app/salinst.cxx create mode 100644 vcl/unx/generic/app/salsys.cxx create mode 100644 vcl/unx/generic/app/saltimer.cxx create mode 100644 vcl/unx/generic/app/sm.cxx create mode 100644 vcl/unx/generic/app/soicon.cxx create mode 100644 vcl/unx/generic/app/wmadaptor.cxx create mode 100644 vcl/unx/generic/desktopdetect/desktopdetector.cxx create mode 100644 vcl/unx/generic/desktopdetect/makefile.mk create mode 100644 vcl/unx/generic/dtrans/X11_clipboard.cxx create mode 100644 vcl/unx/generic/dtrans/X11_clipboard.hxx create mode 100644 vcl/unx/generic/dtrans/X11_dndcontext.cxx create mode 100644 vcl/unx/generic/dtrans/X11_dndcontext.hxx create mode 100644 vcl/unx/generic/dtrans/X11_droptarget.cxx create mode 100644 vcl/unx/generic/dtrans/X11_selection.cxx create mode 100644 vcl/unx/generic/dtrans/X11_selection.hxx create mode 100644 vcl/unx/generic/dtrans/X11_service.cxx create mode 100644 vcl/unx/generic/dtrans/X11_transferable.cxx create mode 100644 vcl/unx/generic/dtrans/X11_transferable.hxx create mode 100644 vcl/unx/generic/dtrans/bmp.cxx create mode 100644 vcl/unx/generic/dtrans/bmp.hxx create mode 100644 vcl/unx/generic/dtrans/config.cxx create mode 100644 vcl/unx/generic/dtrans/copydata_curs.h create mode 100644 vcl/unx/generic/dtrans/copydata_mask.h create mode 100644 vcl/unx/generic/dtrans/linkdata_curs.h create mode 100644 vcl/unx/generic/dtrans/linkdata_mask.h create mode 100644 vcl/unx/generic/dtrans/makefile.mk create mode 100644 vcl/unx/generic/dtrans/movedata_curs.h create mode 100644 vcl/unx/generic/dtrans/movedata_mask.h create mode 100644 vcl/unx/generic/dtrans/nodrop_curs.h create mode 100644 vcl/unx/generic/dtrans/nodrop_mask.h create mode 100644 vcl/unx/generic/fontmanager/adobeenc.tab create mode 100755 vcl/unx/generic/fontmanager/afm_hash.cpp create mode 100755 vcl/unx/generic/fontmanager/afm_keyword_list create mode 100644 vcl/unx/generic/fontmanager/fontcache.cxx create mode 100644 vcl/unx/generic/fontmanager/fontconfig.cxx create mode 100644 vcl/unx/generic/fontmanager/fontmanager.cxx create mode 100644 vcl/unx/generic/fontmanager/helper.cxx create mode 100644 vcl/unx/generic/fontmanager/makefile.mk create mode 100644 vcl/unx/generic/fontmanager/parseAFM.cxx create mode 100644 vcl/unx/generic/fontmanager/parseAFM.hxx create mode 100644 vcl/unx/generic/gdi/cdeint.cxx create mode 100644 vcl/unx/generic/gdi/dtint.cxx create mode 100644 vcl/unx/generic/gdi/dtsetenum.hxx create mode 100644 vcl/unx/generic/gdi/gcach_xpeer.cxx create mode 100644 vcl/unx/generic/gdi/gcach_xpeer.hxx create mode 100644 vcl/unx/generic/gdi/makefile.mk create mode 100644 vcl/unx/generic/gdi/pspgraphics.cxx create mode 100644 vcl/unx/generic/gdi/salbmp.cxx create mode 100644 vcl/unx/generic/gdi/salcvt.cxx create mode 100644 vcl/unx/generic/gdi/salcvt.hxx create mode 100644 vcl/unx/generic/gdi/salgdi.cxx create mode 100644 vcl/unx/generic/gdi/salgdi2.cxx create mode 100644 vcl/unx/generic/gdi/salgdi3.cxx create mode 100644 vcl/unx/generic/gdi/salprnpsp.cxx create mode 100644 vcl/unx/generic/gdi/salvd.cxx create mode 100644 vcl/unx/generic/gdi/xrender_peer.cxx create mode 100644 vcl/unx/generic/gdi/xrender_peer.hxx create mode 100644 vcl/unx/generic/plugadapt/makefile.mk create mode 100644 vcl/unx/generic/plugadapt/salplug.cxx create mode 100644 vcl/unx/generic/printer/cupsmgr.cxx create mode 100644 vcl/unx/generic/printer/jobdata.cxx create mode 100644 vcl/unx/generic/printer/makefile.mk create mode 100644 vcl/unx/generic/printer/ppdparser.cxx create mode 100644 vcl/unx/generic/printer/printerinfomanager.cxx create mode 100644 vcl/unx/generic/printergfx/bitmap_gfx.cxx create mode 100644 vcl/unx/generic/printergfx/common_gfx.cxx create mode 100644 vcl/unx/generic/printergfx/glyphset.cxx create mode 100644 vcl/unx/generic/printergfx/glyphset.hxx create mode 100644 vcl/unx/generic/printergfx/makefile.mk create mode 100644 vcl/unx/generic/printergfx/printerjob.cxx create mode 100644 vcl/unx/generic/printergfx/psheader.ps create mode 100644 vcl/unx/generic/printergfx/psputil.cxx create mode 100644 vcl/unx/generic/printergfx/psputil.hxx create mode 100644 vcl/unx/generic/printergfx/text_gfx.cxx create mode 100644 vcl/unx/generic/window/FWS.cxx create mode 100644 vcl/unx/generic/window/FWS.hxx create mode 100644 vcl/unx/generic/window/makefile.mk create mode 100644 vcl/unx/generic/window/salframe.cxx create mode 100644 vcl/unx/generic/window/salobj.cxx delete mode 100644 vcl/unx/inc/XIM.h delete mode 100644 vcl/unx/inc/Xproto.h delete mode 100644 vcl/unx/inc/cdeint.hxx delete mode 100644 vcl/unx/inc/dtint.hxx delete mode 100644 vcl/unx/inc/i18n_cb.hxx delete mode 100644 vcl/unx/inc/i18n_ic.hxx delete mode 100644 vcl/unx/inc/i18n_im.hxx delete mode 100644 vcl/unx/inc/i18n_keysym.hxx delete mode 100644 vcl/unx/inc/i18n_status.hxx delete mode 100644 vcl/unx/inc/i18n_xkb.hxx delete mode 100644 vcl/unx/inc/plugins/gtk/atkbridge.hxx delete mode 100644 vcl/unx/inc/plugins/gtk/gtkdata.hxx delete mode 100644 vcl/unx/inc/plugins/gtk/gtkframe.hxx delete mode 100644 vcl/unx/inc/plugins/gtk/gtkgdi.hxx delete mode 100644 vcl/unx/inc/plugins/gtk/gtkinst.hxx delete mode 100644 vcl/unx/inc/plugins/gtk/gtkobject.hxx delete mode 100644 vcl/unx/inc/plugins/kde/kdedata.hxx delete mode 100644 vcl/unx/inc/pspgraphics.h delete mode 100644 vcl/unx/inc/salbmp.h delete mode 100644 vcl/unx/inc/saldata.hxx delete mode 100644 vcl/unx/inc/saldisp.hxx delete mode 100644 vcl/unx/inc/salfont.h delete mode 100644 vcl/unx/inc/salframe.h delete mode 100644 vcl/unx/inc/salgdi.h delete mode 100644 vcl/unx/inc/salinst.h delete mode 100644 vcl/unx/inc/salmenu.h delete mode 100644 vcl/unx/inc/salobj.h delete mode 100644 vcl/unx/inc/salprn.h delete mode 100644 vcl/unx/inc/salstd.hxx delete mode 100644 vcl/unx/inc/salsys.h delete mode 100644 vcl/unx/inc/saltimer.h delete mode 100644 vcl/unx/inc/salunx.h delete mode 100644 vcl/unx/inc/salvd.h delete mode 100644 vcl/unx/inc/sm.hxx delete mode 100644 vcl/unx/inc/soicon.hxx delete mode 100644 vcl/unx/inc/strhelper.hxx delete mode 100644 vcl/unx/inc/svsys.h delete mode 100644 vcl/unx/inc/svunx.h delete mode 100644 vcl/unx/inc/wmadaptor.hxx delete mode 100644 vcl/unx/source/app/i18n_cb.cxx delete mode 100644 vcl/unx/source/app/i18n_ic.cxx delete mode 100644 vcl/unx/source/app/i18n_im.cxx delete mode 100644 vcl/unx/source/app/i18n_keysym.cxx delete mode 100644 vcl/unx/source/app/i18n_status.cxx delete mode 100644 vcl/unx/source/app/i18n_wrp.cxx delete mode 100644 vcl/unx/source/app/i18n_xkb.cxx delete mode 100644 vcl/unx/source/app/keysymnames.cxx delete mode 100644 vcl/unx/source/app/makefile.mk delete mode 100644 vcl/unx/source/app/randrwrapper.cxx delete mode 100644 vcl/unx/source/app/saldata.cxx delete mode 100644 vcl/unx/source/app/saldisp.cxx delete mode 100644 vcl/unx/source/app/salinst.cxx delete mode 100644 vcl/unx/source/app/salsys.cxx delete mode 100644 vcl/unx/source/app/saltimer.cxx delete mode 100644 vcl/unx/source/app/sm.cxx delete mode 100644 vcl/unx/source/app/soicon.cxx delete mode 100644 vcl/unx/source/app/wmadaptor.cxx delete mode 100644 vcl/unx/source/desktopdetect/desktopdetector.cxx delete mode 100644 vcl/unx/source/desktopdetect/makefile.mk delete mode 100644 vcl/unx/source/dtrans/X11_clipboard.cxx delete mode 100644 vcl/unx/source/dtrans/X11_clipboard.hxx delete mode 100644 vcl/unx/source/dtrans/X11_dndcontext.cxx delete mode 100644 vcl/unx/source/dtrans/X11_dndcontext.hxx delete mode 100644 vcl/unx/source/dtrans/X11_droptarget.cxx delete mode 100644 vcl/unx/source/dtrans/X11_selection.cxx delete mode 100644 vcl/unx/source/dtrans/X11_selection.hxx delete mode 100644 vcl/unx/source/dtrans/X11_service.cxx delete mode 100644 vcl/unx/source/dtrans/X11_transferable.cxx delete mode 100644 vcl/unx/source/dtrans/X11_transferable.hxx delete mode 100644 vcl/unx/source/dtrans/bmp.cxx delete mode 100644 vcl/unx/source/dtrans/bmp.hxx delete mode 100644 vcl/unx/source/dtrans/config.cxx delete mode 100644 vcl/unx/source/dtrans/copydata_curs.h delete mode 100644 vcl/unx/source/dtrans/copydata_mask.h delete mode 100644 vcl/unx/source/dtrans/linkdata_curs.h delete mode 100644 vcl/unx/source/dtrans/linkdata_mask.h delete mode 100644 vcl/unx/source/dtrans/makefile.mk delete mode 100644 vcl/unx/source/dtrans/movedata_curs.h delete mode 100644 vcl/unx/source/dtrans/movedata_mask.h delete mode 100644 vcl/unx/source/dtrans/nodrop_curs.h delete mode 100644 vcl/unx/source/dtrans/nodrop_mask.h delete mode 100644 vcl/unx/source/fontmanager/adobeenc.tab delete mode 100755 vcl/unx/source/fontmanager/afm_hash.cpp delete mode 100755 vcl/unx/source/fontmanager/afm_keyword_list delete mode 100644 vcl/unx/source/fontmanager/fontcache.cxx delete mode 100644 vcl/unx/source/fontmanager/fontconfig.cxx delete mode 100644 vcl/unx/source/fontmanager/fontmanager.cxx delete mode 100644 vcl/unx/source/fontmanager/helper.cxx delete mode 100644 vcl/unx/source/fontmanager/makefile.mk delete mode 100644 vcl/unx/source/fontmanager/parseAFM.cxx delete mode 100644 vcl/unx/source/fontmanager/parseAFM.hxx delete mode 100644 vcl/unx/source/gdi/cdeint.cxx delete mode 100644 vcl/unx/source/gdi/dtint.cxx delete mode 100644 vcl/unx/source/gdi/dtsetenum.hxx delete mode 100644 vcl/unx/source/gdi/gcach_xpeer.cxx delete mode 100644 vcl/unx/source/gdi/gcach_xpeer.hxx delete mode 100644 vcl/unx/source/gdi/makefile.mk delete mode 100644 vcl/unx/source/gdi/pspgraphics.cxx delete mode 100644 vcl/unx/source/gdi/salbmp.cxx delete mode 100644 vcl/unx/source/gdi/salcvt.cxx delete mode 100644 vcl/unx/source/gdi/salcvt.hxx delete mode 100644 vcl/unx/source/gdi/salgdi.cxx delete mode 100644 vcl/unx/source/gdi/salgdi2.cxx delete mode 100644 vcl/unx/source/gdi/salgdi3.cxx delete mode 100644 vcl/unx/source/gdi/salprnpsp.cxx delete mode 100644 vcl/unx/source/gdi/salvd.cxx delete mode 100644 vcl/unx/source/gdi/xrender_peer.cxx delete mode 100644 vcl/unx/source/gdi/xrender_peer.hxx delete mode 100644 vcl/unx/source/inc/airbrush_curs.h delete mode 100644 vcl/unx/source/inc/airbrush_mask.h delete mode 100644 vcl/unx/source/inc/ase_curs.h delete mode 100644 vcl/unx/source/inc/ase_mask.h delete mode 100644 vcl/unx/source/inc/asn_curs.h delete mode 100644 vcl/unx/source/inc/asn_mask.h delete mode 100644 vcl/unx/source/inc/asne_curs.h delete mode 100644 vcl/unx/source/inc/asne_mask.h delete mode 100644 vcl/unx/source/inc/asns_curs.h delete mode 100644 vcl/unx/source/inc/asns_mask.h delete mode 100644 vcl/unx/source/inc/asnswe_curs.h delete mode 100644 vcl/unx/source/inc/asnswe_mask.h delete mode 100644 vcl/unx/source/inc/asnw_curs.h delete mode 100644 vcl/unx/source/inc/asnw_mask.h delete mode 100644 vcl/unx/source/inc/ass_curs.h delete mode 100644 vcl/unx/source/inc/ass_mask.h delete mode 100644 vcl/unx/source/inc/asse_curs.h delete mode 100644 vcl/unx/source/inc/asse_mask.h delete mode 100644 vcl/unx/source/inc/assw_curs.h delete mode 100644 vcl/unx/source/inc/assw_mask.h delete mode 100644 vcl/unx/source/inc/asw_curs.h delete mode 100644 vcl/unx/source/inc/asw_mask.h delete mode 100644 vcl/unx/source/inc/aswe_curs.h delete mode 100644 vcl/unx/source/inc/aswe_mask.h delete mode 100644 vcl/unx/source/inc/chain_curs.h delete mode 100644 vcl/unx/source/inc/chain_mask.h delete mode 100644 vcl/unx/source/inc/chainnot_curs.h delete mode 100644 vcl/unx/source/inc/chainnot_mask.h delete mode 100644 vcl/unx/source/inc/chart_curs.h delete mode 100644 vcl/unx/source/inc/chart_mask.h delete mode 100644 vcl/unx/source/inc/copydata_curs.h delete mode 100644 vcl/unx/source/inc/copydata_mask.h delete mode 100644 vcl/unx/source/inc/copydlnk_curs.h delete mode 100644 vcl/unx/source/inc/copydlnk_mask.h delete mode 100644 vcl/unx/source/inc/copyfile_curs.h delete mode 100644 vcl/unx/source/inc/copyfile_mask.h delete mode 100644 vcl/unx/source/inc/copyfiles_curs.h delete mode 100644 vcl/unx/source/inc/copyfiles_mask.h delete mode 100644 vcl/unx/source/inc/copyflnk_curs.h delete mode 100644 vcl/unx/source/inc/copyflnk_mask.h delete mode 100644 vcl/unx/source/inc/crook_curs.h delete mode 100644 vcl/unx/source/inc/crook_mask.h delete mode 100644 vcl/unx/source/inc/crop_curs.h delete mode 100644 vcl/unx/source/inc/crop_mask.h delete mode 100644 vcl/unx/source/inc/detective_curs.h delete mode 100644 vcl/unx/source/inc/detective_mask.h delete mode 100644 vcl/unx/source/inc/drawarc_curs.h delete mode 100644 vcl/unx/source/inc/drawarc_mask.h delete mode 100644 vcl/unx/source/inc/drawbezier_curs.h delete mode 100644 vcl/unx/source/inc/drawbezier_mask.h delete mode 100644 vcl/unx/source/inc/drawcaption_curs.h delete mode 100644 vcl/unx/source/inc/drawcaption_mask.h delete mode 100644 vcl/unx/source/inc/drawcirclecut_curs.h delete mode 100644 vcl/unx/source/inc/drawcirclecut_mask.h delete mode 100644 vcl/unx/source/inc/drawconnect_curs.h delete mode 100644 vcl/unx/source/inc/drawconnect_mask.h delete mode 100644 vcl/unx/source/inc/drawcrook_curs.h delete mode 100644 vcl/unx/source/inc/drawcrook_mask.h delete mode 100644 vcl/unx/source/inc/drawcrop_curs.h delete mode 100644 vcl/unx/source/inc/drawcrop_mask.h delete mode 100644 vcl/unx/source/inc/drawellipse_curs.h delete mode 100644 vcl/unx/source/inc/drawellipse_mask.h delete mode 100644 vcl/unx/source/inc/drawfreehand_curs.h delete mode 100644 vcl/unx/source/inc/drawfreehand_mask.h delete mode 100644 vcl/unx/source/inc/drawline_curs.h delete mode 100644 vcl/unx/source/inc/drawline_mask.h delete mode 100644 vcl/unx/source/inc/drawmirror_curs.h delete mode 100644 vcl/unx/source/inc/drawmirror_mask.h delete mode 100644 vcl/unx/source/inc/drawpie_curs.h delete mode 100644 vcl/unx/source/inc/drawpie_mask.h delete mode 100644 vcl/unx/source/inc/drawpolygon_curs.h delete mode 100644 vcl/unx/source/inc/drawpolygon_mask.h delete mode 100644 vcl/unx/source/inc/drawrect_curs.h delete mode 100644 vcl/unx/source/inc/drawrect_mask.h delete mode 100644 vcl/unx/source/inc/drawtext_curs.h delete mode 100644 vcl/unx/source/inc/drawtext_mask.h delete mode 100644 vcl/unx/source/inc/fill_curs.h delete mode 100644 vcl/unx/source/inc/fill_mask.h delete mode 100644 vcl/unx/source/inc/hshear_curs.h delete mode 100644 vcl/unx/source/inc/hshear_mask.h delete mode 100644 vcl/unx/source/inc/invert50.h delete mode 100644 vcl/unx/source/inc/linkdata_curs.h delete mode 100644 vcl/unx/source/inc/linkdata_mask.h delete mode 100644 vcl/unx/source/inc/linkfile_curs.h delete mode 100644 vcl/unx/source/inc/linkfile_mask.h delete mode 100644 vcl/unx/source/inc/magnify_curs.h delete mode 100644 vcl/unx/source/inc/magnify_mask.h delete mode 100644 vcl/unx/source/inc/mirror_curs.h delete mode 100644 vcl/unx/source/inc/mirror_mask.h delete mode 100644 vcl/unx/source/inc/movebezierweight_curs.h delete mode 100644 vcl/unx/source/inc/movebezierweight_mask.h delete mode 100644 vcl/unx/source/inc/movedata_curs.h delete mode 100644 vcl/unx/source/inc/movedata_mask.h delete mode 100644 vcl/unx/source/inc/movedlnk_curs.h delete mode 100644 vcl/unx/source/inc/movedlnk_mask.h delete mode 100644 vcl/unx/source/inc/movefile_curs.h delete mode 100644 vcl/unx/source/inc/movefile_mask.h delete mode 100644 vcl/unx/source/inc/movefiles_curs.h delete mode 100644 vcl/unx/source/inc/movefiles_mask.h delete mode 100644 vcl/unx/source/inc/moveflnk_curs.h delete mode 100644 vcl/unx/source/inc/moveflnk_mask.h delete mode 100644 vcl/unx/source/inc/movepoint_curs.h delete mode 100644 vcl/unx/source/inc/movepoint_mask.h delete mode 100644 vcl/unx/source/inc/nodrop_curs.h delete mode 100644 vcl/unx/source/inc/nodrop_mask.h delete mode 100644 vcl/unx/source/inc/null_curs.h delete mode 100644 vcl/unx/source/inc/null_mask.h delete mode 100644 vcl/unx/source/inc/paintbrush_curs.h delete mode 100644 vcl/unx/source/inc/paintbrush_mask.h delete mode 100644 vcl/unx/source/inc/pivotcol_curs.h delete mode 100644 vcl/unx/source/inc/pivotcol_mask.h delete mode 100644 vcl/unx/source/inc/pivotdel_curs.h delete mode 100644 vcl/unx/source/inc/pivotdel_mask.h delete mode 100644 vcl/unx/source/inc/pivotfld_curs.h delete mode 100644 vcl/unx/source/inc/pivotfld_mask.h delete mode 100644 vcl/unx/source/inc/pivotrow_curs.h delete mode 100644 vcl/unx/source/inc/pivotrow_mask.h delete mode 100644 vcl/unx/source/inc/rotate_curs.h delete mode 100644 vcl/unx/source/inc/rotate_mask.h delete mode 100644 vcl/unx/source/inc/salcursors.h delete mode 100644 vcl/unx/source/inc/tblsele_curs.h delete mode 100644 vcl/unx/source/inc/tblsele_mask.h delete mode 100644 vcl/unx/source/inc/tblsels_curs.h delete mode 100644 vcl/unx/source/inc/tblsels_mask.h delete mode 100644 vcl/unx/source/inc/tblselse_curs.h delete mode 100644 vcl/unx/source/inc/tblselse_mask.h delete mode 100644 vcl/unx/source/inc/tblselsw_curs.h delete mode 100644 vcl/unx/source/inc/tblselsw_mask.h delete mode 100644 vcl/unx/source/inc/tblselw_curs.h delete mode 100644 vcl/unx/source/inc/tblselw_mask.h delete mode 100644 vcl/unx/source/inc/timemove_curs.h delete mode 100644 vcl/unx/source/inc/timemove_mask.h delete mode 100644 vcl/unx/source/inc/timesize_curs.h delete mode 100644 vcl/unx/source/inc/timesize_mask.h delete mode 100644 vcl/unx/source/inc/vertcurs_curs.h delete mode 100644 vcl/unx/source/inc/vertcurs_mask.h delete mode 100644 vcl/unx/source/inc/vshear_curs.h delete mode 100644 vcl/unx/source/inc/vshear_mask.h delete mode 100644 vcl/unx/source/plugadapt/makefile.mk delete mode 100644 vcl/unx/source/plugadapt/salplug.cxx delete mode 100644 vcl/unx/source/printer/cupsmgr.cxx delete mode 100644 vcl/unx/source/printer/jobdata.cxx delete mode 100644 vcl/unx/source/printer/makefile.mk delete mode 100644 vcl/unx/source/printer/ppdparser.cxx delete mode 100644 vcl/unx/source/printer/printerinfomanager.cxx delete mode 100644 vcl/unx/source/printergfx/bitmap_gfx.cxx delete mode 100644 vcl/unx/source/printergfx/common_gfx.cxx delete mode 100644 vcl/unx/source/printergfx/glyphset.cxx delete mode 100644 vcl/unx/source/printergfx/glyphset.hxx delete mode 100644 vcl/unx/source/printergfx/makefile.mk delete mode 100644 vcl/unx/source/printergfx/printerjob.cxx delete mode 100644 vcl/unx/source/printergfx/psheader.ps delete mode 100644 vcl/unx/source/printergfx/psputil.cxx delete mode 100644 vcl/unx/source/printergfx/psputil.hxx delete mode 100644 vcl/unx/source/printergfx/text_gfx.cxx delete mode 100644 vcl/unx/source/window/FWS.cxx delete mode 100644 vcl/unx/source/window/FWS.hxx delete mode 100644 vcl/unx/source/window/makefile.mk delete mode 100644 vcl/unx/source/window/salframe.cxx delete mode 100644 vcl/unx/source/window/salobj.cxx diff --git a/vcl/aqua/inc/aqua11yfactory.h b/vcl/aqua/inc/aqua11yfactory.h deleted file mode 100644 index 1982093f8bba..000000000000 --- a/vcl/aqua/inc/aqua11yfactory.h +++ /dev/null @@ -1,47 +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 _SV_AQUA11FACTORY_H -#define _SV_AQUA11FACTORY_H - -#include "aquavcltypes.h" -#include "aqua11ywrapper.h" -#include - -@interface AquaA11yFactory : NSObject -{ -} -+(void)insertIntoWrapperRepository: (NSView *) viewElement forAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext; -+(AquaA11yWrapper *)wrapperForAccessible: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible >) rxAccessible; -+(AquaA11yWrapper *)wrapperForAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext; -+(AquaA11yWrapper *)wrapperForAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext createIfNotExists:(MacOSBOOL) bCreate; -+(AquaA11yWrapper *)wrapperForAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext createIfNotExists:(MacOSBOOL) bCreate asRadioGroup:(MacOSBOOL) asRadioGroup; -+(void)removeFromWrapperRepositoryFor: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext; -+(void)registerView: (NSView *) theView; -+(void)revokeView: (NSView *) theViewt; -@end -#endif // _SV_AQUA11FACTORY_H diff --git a/vcl/aqua/inc/aqua11yfocustracker.hxx b/vcl/aqua/inc/aqua11yfocustracker.hxx deleted file mode 100644 index 1dbf68c4a5ef..000000000000 --- a/vcl/aqua/inc/aqua11yfocustracker.hxx +++ /dev/null @@ -1,108 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _AQUA11YFOCUSTRACKER_HXX_ -#define _AQUA11YFOCUSTRACKER_HXX_ - -#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_ -#include -#endif - -#include "keyboardfocuslistener.hxx" - -#include - -#include -#include -#include - -class Window; -class ToolBox; -class DocumentFocusListener; - -// ------------------------ -// - AquaA11yFocusTracker - -// ------------------------ - -class AquaA11yFocusTracker : public rtl::Static< AquaA11yFocusTracker, AquaA11yFocusTracker> -{ - -public: - AquaA11yFocusTracker(); - - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > getFocusedObject() { return m_xFocusedObject; }; - - // sets the currently focus object and notifies the FocusEventListener (if any) - void setFocusedObject(const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& xAccessible); - - // may evolve to add/remove later - void setFocusListener(const rtl::Reference< KeyboardFocusListener >& aFocusListener) { m_aFocusListener = aFocusListener; }; - -protected: - - // received a WINDOW_GETFOCUS event for this window - virtual void window_got_focus(Window *pWindow); - - // received a TOOLBOX_HIGHLIGHT event for this window - virtual void toolbox_highlight_on(Window *pWindow); - - // received a TOOLBOX_HIGHLIGHTOFF event for this window - virtual void toolbox_highlight_off(Window *pWindow); - - // received a TABPAGE_ACTIVATE event for this window - virtual void tabpage_activated(Window *pWindow); - - // received a MENU_HIGHLIGHT event for this window - virtual void menu_highlighted(const ::VclMenuEvent *pEvent); - - // toolbox items are widgets in gtk+ and Cocoa - virtual void notify_toolbox_item_focus(ToolBox *pToolBox); - - // toolbox item opened a floating window (e.g. color chooser) - virtual void toolbox_open_floater(Window *pWindow); - - // callback function for Application::addEventListener - static long WindowEventHandler(AquaA11yFocusTracker *pFocusTracker, ::VclSimpleEvent const *pEvent); - -private: - // the accessible object that has the keyboard focus (if any) - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xFocusedObject; - - // the listener for focus events - rtl::Reference< KeyboardFocusListener > m_aFocusListener; - - // the list of Windows that need deeper (focus) investigation - std::set< Window *> m_aDocumentWindowList; - - // the link object needed for Application::addEventListener - Link m_aWindowEventLink; - - // the UNO XAccessibilityEventListener for Documents and other non VCL objects - const ::com::sun::star::uno::Reference< DocumentFocusListener > m_xDocumentFocusListener; -}; - -#endif // _AQUA11YFOCUSTRACKER_HXX_ diff --git a/vcl/aqua/inc/aqua11ylistener.hxx b/vcl/aqua/inc/aqua11ylistener.hxx deleted file mode 100644 index 461b149e4650..000000000000 --- a/vcl/aqua/inc/aqua11ylistener.hxx +++ /dev/null @@ -1,65 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _AQUA11YLISTENER_HXX_ -#define _AQUA11YLISTENER_HXX_ - -#include -#include - -#include "aqua11yfocustracker.hxx" -#include "aquavcltypes.h" -#include -#include - -// ------------------------- -// - AquaA11yEventListener - -// ------------------------- - -class AquaA11yEventListener : - public ::cppu::WeakImplHelper1< ::com::sun::star::accessibility::XAccessibleEventListener > -{ - -public: - AquaA11yEventListener(id wrapperObject, sal_Int16 role); - virtual ~AquaA11yEventListener(); - - // XEventListener - virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) - throw (::com::sun::star::uno::RuntimeException); - - // XAccessibleEventListener - virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent ) - throw( ::com::sun::star::uno::RuntimeException ); - -private: - const id m_wrapperObject; - const sal_Int16 m_role; - ::com::sun::star::awt::Rectangle m_oldBounds; -}; - -#endif // _AQUA11YLISTENER_HXX_ \ No newline at end of file diff --git a/vcl/aqua/inc/aqua11ywrapper.h b/vcl/aqua/inc/aqua11ywrapper.h deleted file mode 100644 index 079dcfe7f112..000000000000 --- a/vcl/aqua/inc/aqua11ywrapper.h +++ /dev/null @@ -1,119 +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 _SV_AQUA11WRAPPER_H -#define _SV_AQUA11WRAPPER_H - -#include "aquavcltypes.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// rAccessibleXYZ as a field in an Objective-C-Class would not call Con-/Destructor, so use a struct instead -struct ReferenceWrapper -{ - ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleAction > rAccessibleAction; - ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext > rAccessibleContext; - ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleComponent > rAccessibleComponent; - ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleExtendedComponent > rAccessibleExtendedComponent; - ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleSelection > rAccessibleSelection; - ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleTable > rAccessibleTable; - ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleText > rAccessibleText; - ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleEditableText > rAccessibleEditableText; - ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleValue > rAccessibleValue; - ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleTextAttributes > rAccessibleTextAttributes; - ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleMultiLineText > rAccessibleMultiLineText; -}; - -@interface AquaA11yWrapper : NSView -{ - ReferenceWrapper * mpReferenceWrapper; - NSString * mpDefaultFontname; - float mDefaultFontsize; - MacOSBOOL mActsAsRadioGroup; - MacOSBOOL mIsTableCell; -} -// NSAccessibility Protocol --(id)accessibilityAttributeValue:(NSString *)attribute; --(MacOSBOOL)accessibilityIsIgnored; --(NSArray *)accessibilityAttributeNames; --(MacOSBOOL)accessibilityIsAttributeSettable:(NSString *)attribute; --(NSArray *)accessibilityParameterizedAttributeNames; --(MacOSBOOL)accessibilitySetOverrideValue:(id)value forAttribute:(NSString *)attribute; --(void)accessibilitySetValue:(id)value forAttribute:(NSString *)attribute; --(id)accessibilityAttributeValue:(NSString *)attribute forParameter:(id)parameter; --(id)accessibilityFocusedUIElement; --(NSString *)accessibilityActionDescription:(NSString *)action; --(void)accessibilityPerformAction:(NSString *)action; --(NSArray *)accessibilityActionNames; --(id)accessibilityHitTest:(NSPoint)point; -// Attribute values --(id)parentAttribute; --(id)valueAttribute; --(id)titleAttribute; --(id)helpAttribute; --(id)numberOfCharactersAttribute; --(id)selectedTextAttribute; --(id)selectedTextRangeAttribute; --(id)visibleCharacterRangeAttribute; --(id)childrenAttribute; --(id)orientationAttribute; --(id)windowAttribute; -// Wrapper-specific --(void)setActsAsRadioGroup:(MacOSBOOL)actsAsRadioGroup; --(MacOSBOOL)actsAsRadioGroup; --(NSView *)viewElementForParent; --(id)initWithAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) anAccessibleContext; --(void) setDefaults: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext; --(void) dealloc; --(void)setDefaultFontname:(NSString *)fontname; --(NSString *)defaultFontname; --(void)setDefaultFontsize:(float)fontsize; --(float)defaultFontsize; -+(void)setPopupMenuOpen:(MacOSBOOL)popupMenuOpen; --(::com::sun::star::accessibility::XAccessibleAction *)accessibleAction; --(::com::sun::star::accessibility::XAccessibleContext *)accessibleContext; --(::com::sun::star::accessibility::XAccessibleComponent *)accessibleComponent; --(::com::sun::star::accessibility::XAccessibleExtendedComponent *)accessibleExtendedComponent; --(::com::sun::star::accessibility::XAccessibleSelection *)accessibleSelection; --(::com::sun::star::accessibility::XAccessibleTable *)accessibleTable; --(::com::sun::star::accessibility::XAccessibleText *)accessibleText; --(::com::sun::star::accessibility::XAccessibleEditableText *)accessibleEditableText; --(::com::sun::star::accessibility::XAccessibleValue *)accessibleValue; --(::com::sun::star::accessibility::XAccessibleTextAttributes *)accessibleTextAttributes; --(::com::sun::star::accessibility::XAccessibleMultiLineText *)accessibleMultiLineText; -@end - -#endif // _SV_AQUA11WRAPPER_H diff --git a/vcl/aqua/inc/aquaprintview.h b/vcl/aqua/inc/aquaprintview.h deleted file mode 100755 index 84d9dd54d6aa..000000000000 --- a/vcl/aqua/inc/aquaprintview.h +++ /dev/null @@ -1,67 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _VCL_AQUAPRINTVIEW_H -#define _VCL_AQUAPRINTVIEW_H - -#include "premac.h" -#include -#include "postmac.h" - -#include "vcl/print.hxx" - -class AquaSalInfoPrinter; - -struct PrintAccessoryViewState -{ - bool bNeedRestart; - sal_Int32 nLastPage; - - PrintAccessoryViewState() - : bNeedRestart( false ), nLastPage( 0 ) {} -}; - -@interface AquaPrintView : NSView -{ - vcl::PrinterController* mpController; - AquaSalInfoPrinter* mpInfoPrinter; -} --(id)initWithController: (vcl::PrinterController*)pController withInfoPrinter: (AquaSalInfoPrinter*)pInfoPrinter; --(MacOSBOOL)knowsPageRange: (NSRangePointer)range; --(NSRect)rectForPage: (int)page; --(NSPoint)locationOfPrintRect: (NSRect)aRect; --(void)drawRect: (NSRect)rect; -@end - -@interface AquaPrintAccessoryView : NSObject -{ -} -+(NSObject*)setupPrinterPanel: (NSPrintOperation*)pOp withController: (vcl::PrinterController*)pController withState: (PrintAccessoryViewState*)pState; -@end - - -#endif diff --git a/vcl/aqua/inc/aquavclevents.hxx b/vcl/aqua/inc/aquavclevents.hxx deleted file mode 100644 index 8e03c59d0954..000000000000 --- a/vcl/aqua/inc/aquavclevents.hxx +++ /dev/null @@ -1,96 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef INCLUDED_AQUAVCLEVENTS_HXX -#define INCLUDED_AQUAVCLEVENTS_HXX - -#include -#include -#include - -/* Definition of custom OpenOffice.org events. - - Avoid conflict with Apple defined event class and type - definitions by using uppercase letters. Lowercase - letter definitions are reserved for Apple! - */ -enum { - cOOoSalUserEventClass = 'OOUE' -}; - -enum { - cOOoSalEventUser = 'UEVT', - cOOoSalEventTimer = 'EVTT', - cOOoSalEventData = 'EVTD', - cOOoSalEventParamTypePtr = 'EPPT' -}; - -/* Definition of all necessary EventTypeSpec's */ - -const EventTypeSpec cWindowBoundsChangedEvent = { kEventClassWindow, kEventWindowBoundsChanged }; -const EventTypeSpec cWindowCloseEvent = { kEventClassWindow, kEventWindowClose }; -const EventTypeSpec cOOoSalUserEvent = { cOOoSalUserEventClass, cOOoSalEventUser }; -const EventTypeSpec cOOoSalTimerEvent = { cOOoSalUserEventClass, cOOoSalEventTimer }; -const EventTypeSpec cWindowActivatedEvent[] = { { kEventClassWindow, kEventWindowActivated }, - { kEventClassWindow, kEventWindowDeactivated } }; -const EventTypeSpec cWindowPaintEvent = { kEventClassWindow, kEventWindowPaint }; -const EventTypeSpec cWindowDrawContentEvent = { kEventClassWindow, kEventWindowDrawContent }; - -const EventTypeSpec cWindowFocusEvent[] = { { kEventClassWindow, kEventWindowFocusAcquired }, - { kEventClassWindow, kEventWindowFocusRelinquish } }; - -const EventTypeSpec cMouseEnterExitEvent[] = { { kEventClassControl, kEventControlTrackingAreaEntered }, - { kEventClassControl, kEventControlTrackingAreaExited } }; - -const EventTypeSpec cMouseEvent[] = { { kEventClassMouse, kEventMouseDown }, - { kEventClassMouse, kEventMouseUp }, - { kEventClassMouse, kEventMouseMoved }, - { kEventClassMouse, kEventMouseDragged } }; -const EventTypeSpec cMouseWheelMovedEvent = { kEventClassMouse, kEventMouseWheelMoved }; -const EventTypeSpec cWindowResizeStarted = { kEventClassWindow, kEventWindowResizeStarted }; -const EventTypeSpec cWindowResizeCompleted = { kEventClassWindow, kEventWindowResizeCompleted }; - -/* Events for native menus */ -const EventTypeSpec cCommandProcessEvent = { kEventClassCommand, kEventCommandProcess }; -const EventTypeSpec cMenuPopulateEvent = { kEventClassMenu, kEventMenuPopulate }; -const EventTypeSpec cMenuClosedEvent = { kEventClassMenu, kEventMenuClosed }; -const EventTypeSpec cMenuTargetItemEvent = { kEventClassMenu, kEventMenuTargetItem }; - -/* Events for keyboard */ -const EventTypeSpec cKeyboardRawKeyEvents[] = { { kEventClassKeyboard, kEventRawKeyDown}, - { kEventClassKeyboard, kEventRawKeyUp}, - { kEventClassKeyboard, kEventRawKeyRepeat}, - { kEventClassKeyboard, kEventRawKeyModifiersChanged} }; - -const EventTypeSpec cTextInputEvents[] = { { kEventClassTextInput, kEventTextInputUpdateActiveInputArea}, - { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent}, - { kEventClassTextInput, kEventTextInputOffsetToPos} }; - -/* Events for scrollbar */ - -const EventTypeSpec cAppearanceScrollbarVariantChangedEvent = { kEventClassAppearance, kEventAppearanceScrollBarVariantChanged }; - -#endif // INCLUDED_AQUAVCLEVENTS_HXX diff --git a/vcl/aqua/inc/aquavcltypes.h b/vcl/aqua/inc/aquavcltypes.h deleted file mode 100644 index 7346282963d7..000000000000 --- a/vcl/aqua/inc/aquavcltypes.h +++ /dev/null @@ -1,36 +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 _AQUAVCLTYPES_H -#define _AQUAVCLTYPES_H - -#include "premac.h" -#import -#import -#include "postmac.h" - -#endif _AQUAVCLTYPES_H diff --git a/vcl/aqua/inc/keyboardfocuslistener.hxx b/vcl/aqua/inc/keyboardfocuslistener.hxx deleted file mode 100644 index 71eba2f46c02..000000000000 --- a/vcl/aqua/inc/keyboardfocuslistener.hxx +++ /dev/null @@ -1,47 +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 _KEYBOARDFOCUSLISTENER_HXX_ -#define _KEYBOARDFOCUSLISTENER_HXX_ - -#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_ -#include -#endif - -#include - -// ------------------------- -// - KeyboardFocusListener - -// ------------------------- - -class KeyboardFocusListener : public rtl::IReference -{ -public: - virtual void SAL_CALL focusedObjectChanged(const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& xAccessible) = 0; -}; - -#endif // _KEYBOARDFOCUSLISTENER_HXX_ \ No newline at end of file diff --git a/vcl/aqua/inc/salatsuifontutils.hxx b/vcl/aqua/inc/salatsuifontutils.hxx deleted file mode 100644 index 81e60871ae86..000000000000 --- a/vcl/aqua/inc/salatsuifontutils.hxx +++ /dev/null @@ -1,63 +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 _SV_SALATSUIFONTUTILS_HXX -#define _SV_SALATSUIFONTUTILS_HXX - -class ImplMacFontData; -class ImplDevFontList; - -#include -#include -#include - -#include - -/* This class has the responsibility of assembling a list - of atsui compatible fonts available on the system and - enabling access to that list. - */ -class SystemFontList -{ -public: - SystemFontList(); - ~SystemFontList(); - - void AnnounceFonts( ImplDevFontList& ) const; - ImplMacFontData* GetFontDataFromId( ATSUFontID ) const; - - ATSUFontFallbacks maFontFallbacks; - -private: - typedef std::hash_map MacFontContainer; - MacFontContainer maFontContainer; - - void InitGlyphFallbacks(); -}; - -#endif // _SV_SALATSUIFONTUTILS_HXX - diff --git a/vcl/aqua/inc/salbmp.h b/vcl/aqua/inc/salbmp.h deleted file mode 100644 index 1c427cce0cd5..000000000000 --- a/vcl/aqua/inc/salbmp.h +++ /dev/null @@ -1,107 +0,0 @@ -/************************************************************************* -* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * -************************************************************************/ - -#ifndef _SV_SALBMP_H -#define _SV_SALBMP_H - -#include "tools/gen.hxx" -#include "vcl/sv.h" -#include "vcl/salbtype.hxx" -#include "saldata.hxx" -#include "vcl/salinst.hxx" -#include "salconst.h" -#include "vcl/salvd.hxx" -#include "salcolorutils.hxx" -#include "vcl/salbmp.hxx" -#include "salgdi.h" -#include "basebmp/bitmapdevice.hxx" - -// -------------- -// - SalBitmap - -// -------------- - -struct BitmapBuffer; -class BitmapColor; -class BitmapPalette; -class AquaSalVirtualDevice; -class AquaSalGraphics; - -class AquaSalBitmap : public SalBitmap -{ -public: - CGContextRef mxGraphicContext; - mutable CGImageRef mxCachedImage; - BitmapPalette maPalette; - basebmp::RawMemorySharedArray maUserBuffer; - basebmp::RawMemorySharedArray maContextBuffer; - sal_uInt16 mnBits; - int mnWidth; - int mnHeight; - sal_uInt32 mnBytesPerRow; - -public: - AquaSalBitmap(); - virtual ~AquaSalBitmap(); - -public: - - // SalBitmap methods - bool Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ); - bool Create( const SalBitmap& rSalBmp ); - bool Create( const SalBitmap& rSalBmp, SalGraphics* pGraphics ); - bool Create( const SalBitmap& rSalBmp, USHORT nNewBitCount ); - - void Destroy(); - - Size GetSize() const; - USHORT GetBitCount() const; - - BitmapBuffer *AcquireBuffer( bool bReadOnly ); - void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ); - - bool GetSystemData( BitmapSystemData& rData ); - -private: - // quartz helper - bool CreateContext(); - void DestroyContext(); - bool AllocateUserData(); - - void ConvertBitmapData( sal_uInt32 nWidth, sal_uInt32 nHeight, - sal_uInt16 nDestBits, sal_uInt32 nDestBytesPerRow, const BitmapPalette& rDestPalette, sal_uInt8* pDestData, - sal_uInt16 nSrcBits, sal_uInt32 nSrcBytesPerRow, const BitmapPalette& rSrcPalette, sal_uInt8* pSrcData ); - -public: - bool Create( CGLayerRef xLayer, int nBitCount, int nX, int nY, int nWidth, int nHeight, bool bMirrorVert = true ); - -public: - CGImageRef CreateWithMask( const AquaSalBitmap& rMask, int nX, int nY, int nWidth, int nHeight ) const; - CGImageRef CreateColorMask( int nX, int nY, int nWidth, int nHeight, SalColor nMaskColor ) const; - CGImageRef CreateCroppedImage( int nX, int nY, int nWidth, int nHeight ) const; -}; - -#endif // _SV_SALBMP_HXX diff --git a/vcl/aqua/inc/salcolorutils.hxx b/vcl/aqua/inc/salcolorutils.hxx deleted file mode 100755 index 74ccb69756fd..000000000000 --- a/vcl/aqua/inc/salcolorutils.hxx +++ /dev/null @@ -1,52 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SALCOLORUTILS_HXX -#define _SV_SALCOLORUTILS_HXX - -#ifndef _LIMITS_H - #include -#endif - -#include "premac.h" -#include -#include "postmac.h" - -#include "vcl/salbtype.hxx" -#include "vcl/salgtype.hxx" -#include "salconst.h" -#include "salmathutils.hxx" - -// ------------------------------------------------------------------ - -SalColor GetSalColor( const float* pQuartzColor ); - -void SetSalColor( const SalColor& rColor, float* pQuartzColor ); - -// ------------------------------------------------------------------ - -#endif // _SV_SALCOLORUTILS_HXX diff --git a/vcl/aqua/inc/salconst.h b/vcl/aqua/inc/salconst.h deleted file mode 100755 index 2046ec20a806..000000000000 --- a/vcl/aqua/inc/salconst.h +++ /dev/null @@ -1,68 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SALCONST_H -#define _SV_SALCONST_H - -// ------------------- -// - Constants - -// ------------------- - -static const unsigned short kByteMask = 0xFF; - -static const unsigned short kOneByte = 8; -static const unsigned short kTwoBytes = 16; - -static const unsigned short kOneBit = 1; -static const unsigned short kFiveBits = 5; -static const unsigned short kEightBits = 8; -static const unsigned short kTenBits = 10; -static const unsigned short kElevenBits = 11; - -static const unsigned short kBlackAndWhite = 1; -static const unsigned short kFourBitColor = 4; -static const unsigned short kEightBitColor = 8; -static const unsigned short kThousandsColor = 16; -static const unsigned short kTrueColor = 32; - -static const unsigned long k16BitRedColorMask = 0x00007c00; -static const unsigned long k16BitGreenColorMask = 0x000003e0; -static const unsigned long k16BitBlueColorMask = 0x0000001f; - -static const unsigned long k32BitRedColorMask = 0x00ff0000; -static const unsigned long k32BitGreenColorMask = 0x0000ff00; -static const unsigned long k32BitBlueColorMask = 0x000000ff; - -static const unsigned short kPixMapCmpSizeOneBit = 1; -static const unsigned short kPixMapCmpSizeFourBits = 4; -static const unsigned short kPixMapCmpSizeFiveBits = 5; -static const unsigned short kPixMapCmpSizeEightBits = 8; - -static const long kPixMapHRes = 72; -static const long kPixMapVRes = 72; - -#endif // _SV_SALCONST_H diff --git a/vcl/aqua/inc/saldata.hxx b/vcl/aqua/inc/saldata.hxx deleted file mode 100644 index fb7c8cddd6d4..000000000000 --- a/vcl/aqua/inc/saldata.hxx +++ /dev/null @@ -1,138 +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 _SV_SALDATA_HXX -#define _SV_SALDATA_HXX - -#include "premac.h" -#include -#include "postmac.h" - -#include "com/sun/star/uno/Reference.hxx" - -#include "vcl/sv.h" -#include "vcl/svdata.hxx" -#include "vcl/salwtype.hxx" -#include "vcl/ptrstyle.hxx" - -#include -#include -#include -#include - -#include -#include - -#include "apple_remote/RemoteMainController.h" - -class AquaSalInstance; -class SalObject; -class SalFrame; -class SalVirtualDevice; -class SalPrinter; -class SystemFontList; - -// ------------------ -// - Some constants - -// ------------------ - -#define SAL_CLIPRECT_COUNT 16 - -#define VER_TIGER 0x1040 -#define VER_LEOPARD 0x1050 - -// ----------- -// - SalData - -// ----------- - -class AquaSalFrame; -struct FrameHash : public std::hash -{ - size_t operator()(const AquaSalFrame* frame) const - { return std::hash::operator()( reinterpret_cast(frame) ); } -}; - -#define INVALID_CURSOR_PTR (NSCursor*)0xdeadbeef - -struct SalData -{ - - SALTIMERPROC mpTimerProc; // timer callback proc - AquaSalInstance *mpFirstInstance; // pointer of first instance - std::list maFrames; // pointer of first frame - std::hash_set maFrameCheck; // for fast check of frame existance - SalObject *mpFirstObject; // pointer of first object window - SalVirtualDevice *mpFirstVD; // first VirDev - SalPrinter *mpFirstPrinter; // first printing printer - SystemFontList *mpFontList; - NSStatusItem* mpStatusItem; // one status item that draws all our stati - // at the moment this is only one add menu button - - CGColorSpaceRef mxRGBSpace; - CGColorSpaceRef mxGraySpace; - CGColorSpaceRef mxP50Space; - CGPatternRef mxP50Pattern; - - std::vector< NSCursor* > maCursors; - std::vector< NSMenuItem* > maFallbackMenu; - std::map< NSEvent*, bool > maKeyEventAnswer; - - static oslThreadKey s_aAutoReleaseKey; - - bool mbIsScrollbarDoubleMax; // TODO: support DoubleMin and DoubleBoth too - SInt32 mnSystemVersion; // Store System Version - MainController* mpMainController; // Apple Remote - - NSObject* mpDockIconClickHandler; - long mnDPIX; // #i100617# read DPI only once per office life - long mnDPIY; // #i100617# read DPI only once per office life - - com::sun::star::uno::Reference< com::sun::star::uno::XInterface > - mxClipboard; - - SalData(); - ~SalData(); - - NSCursor* getCursor( PointerStyle i_eStyle ); - - static void ensureThreadAutoreleasePool(); - static void drainThreadAutoreleasePool(); - - static NSStatusItem* getStatusItem(); -}; - -inline void SetSalData( SalData* pData ) { ImplGetSVData()->mpSalData = (void*)pData; } -inline SalData *GetSalData() { return (SalData*)ImplGetSVData()->mpSalData; } -inline SalData *GetAppSalData() { return (SalData*)ImplGetAppSVData()->mpSalData; } - -// --- Prototypes --- - -BOOL ImplSalYieldMutexTryToAcquire(); -void ImplSalYieldMutexAcquire(); -void ImplSalYieldMutexRelease(); - -#endif // _SV_SALDATA_HXX diff --git a/vcl/aqua/inc/salfontutils.hxx b/vcl/aqua/inc/salfontutils.hxx deleted file mode 100644 index 6f9f61efda70..000000000000 --- a/vcl/aqua/inc/salfontutils.hxx +++ /dev/null @@ -1,66 +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 _SV_SALFONTUTILS_HXX -#define _SV_SALFONTUTILS_HXX - -#include "vcl/outfont.hxx" - -static const char *kFontWeightThin1 = "Thin"; -static const char *kFontWeightThin2 = "thin"; - -static const char *kFontWeightLight1 = "Light"; -static const char *kFontWeightLight2 = "light"; - -static const char *kFontWeightBold1 = "Bold"; -static const char *kFontWeightBold2 = "bold"; - -static const char *kFontWeightUltra1 = "Ultra"; -static const char *kFontWeightUltra2 = "ultra"; - -static const char *kFontWeightSemi1 = "Semi"; -static const char *kFontWeightSemi2 = "semi"; - -static const char *kFontWeightNormal1 = "Normal"; -static const char *kFontWeightNormal2 = "normal"; - -static const char *kFontWeightMedium1 = "Medium"; -static const char *kFontWeightMedium2 = "medium"; - -static const char *kFontWeightBlack1 = "Black"; -static const char *kFontWeightBlack2 = "black"; - -static const char *kFontWeightRoman1 = "Roman"; -static const char *kFontWeightRoman2 = "roman"; - -static const char *kFontWeightRegular1 = "Regular"; -static const char *kFontWeightRegular2 = "regular"; - - -#endif // _SV_SALFONTUTILS_HXX - diff --git a/vcl/aqua/inc/salframe.h b/vcl/aqua/inc/salframe.h deleted file mode 100644 index c2ded3267f45..000000000000 --- a/vcl/aqua/inc/salframe.h +++ /dev/null @@ -1,220 +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 _SV_SALFRAME_H -#define _SV_SALFRAME_H - - -#include "vcl/sv.h" -#include "vcl/salframe.hxx" -#include "vcl/sysdata.hxx" - -#include "salmenu.h" -#include "saldata.hxx" -#include "aquavcltypes.h" - -#include -#include -#include - -#include - -class AquaSalGraphics; -class AquaSalFrame; -class AquaSalTimer; -class AquaSalInstance; -class AquaSalMenu; -class AquaBlinker; - -typedef struct SalFrame::SalPointerState SalPointerState; - -// ---------------- -// - AquaSalFrame - -// ---------------- - -class AquaSalFrame : public SalFrame -{ -public: - NSWindow* mpWindow; // Cocoa window - NSView* mpView; // Cocoa view (actually a custom view, see below - NSMenuItem* mpDockMenuEntry; // entry in the dynamic dock menu - NSRect maScreenRect; // for mirroring purposes - AquaSalGraphics* mpGraphics; // current frame graphics - AquaSalFrame* mpParent; // pointer to parent frame - SystemEnvData maSysData; // system data - int mnMinWidth; // min. client width in pixels - int mnMinHeight; // min. client height in pixels - int mnMaxWidth; // max. client width in pixels - int mnMaxHeight; // max. client height in pixels - NSRect maFullScreenRect; // old window size when in FullScreen - bool mbGraphics:1; // is Graphics used? - bool mbFullScreen:1; // is Window in FullScreen? - bool mbShown:1; - bool mbInitShow:1; - bool mbPositioned:1; - bool mbSized:1; - bool mbPresentation:1; - - ULONG mnStyle; - unsigned int mnStyleMask; // our style mask from NSWindow creation - - ULONG mnLastEventTime; - unsigned int mnLastModifierFlags; - AquaSalMenu* mpMenu; - - SalExtStyle mnExtStyle; // currently document frames are marked this way - - PointerStyle mePointerStyle; // currently active pointer style - - NSTrackingRectTag mnTrackingRectTag; // used to get enter/leave messages - - CGMutablePathRef mrClippingPath; // used for "shaping" - std::vector< CGRect > maClippingRects; - - std::list maBlinkers; - - Rectangle maInvalidRect; - - ULONG mnICOptions; - - boost::shared_ptr< Timer > mpActivityTimer; // Timer to prevent system sleep during presentation -public: - /** Constructor - - Creates a system window and connects this frame with it. - - @throws std::runtime_error in case window creation fails - */ - AquaSalFrame( SalFrame* pParent, ULONG salFrameStyle ); - - virtual ~AquaSalFrame(); - - virtual SalGraphics* GetGraphics(); - virtual void ReleaseGraphics( SalGraphics* pGraphics ); - virtual BOOL PostEvent( void* pData ); - virtual void SetTitle( const XubString& rTitle ); - virtual void SetIcon( USHORT nIcon ); - virtual void SetRepresentedURL( const rtl::OUString& ); - virtual void SetMenu( SalMenu* pSalMenu ); - virtual void DrawMenuBar(); - virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE ); - virtual void Enable( BOOL bEnable ); - virtual void SetMinClientSize( long nWidth, long nHeight ); - virtual void SetMaxClientSize( long nWidth, long nHeight ); - virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ); - virtual void GetClientSize( long& rWidth, long& rHeight ); - virtual void GetWorkArea( Rectangle& rRect ); - virtual SalFrame* GetParent() const; - virtual void SetWindowState( const SalFrameState* pState ); - virtual BOOL GetWindowState( SalFrameState* pState ); - virtual void ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay ); - virtual void StartPresentation( BOOL bStart ); - virtual void SetAlwaysOnTop( BOOL bOnTop ); - virtual void ToTop( USHORT nFlags ); - virtual void SetPointer( PointerStyle ePointerStyle ); - virtual void CaptureMouse( BOOL bMouse ); - virtual void SetPointerPos( long nX, long nY ); - virtual void Flush( void ); - virtual void Flush( const Rectangle& ); - virtual void Sync(); - virtual void SetInputContext( SalInputContext* pContext ); - virtual void EndExtTextInput( USHORT nFlags ); - virtual String GetKeyName( USHORT nKeyCode ); - virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode ); - virtual BOOL MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); - virtual LanguageType GetInputLanguage(); - virtual SalBitmap* SnapShot(); - virtual void UpdateSettings( AllSettings& rSettings ); - virtual void Beep( SoundType eSoundType ); - virtual const SystemEnvData* GetSystemData() const; - virtual SalPointerState GetPointerState(); - virtual void SetParent( SalFrame* pNewParent ); - virtual bool SetPluginParent( SystemParentData* pNewParent ); - virtual void SetExtendedFrameStyle( SalExtStyle ); - virtual void SetBackgroundBitmap( SalBitmap* ); - virtual void SetScreenNumber(unsigned int); - - // shaped system windows - // set clip region to none (-> rectangular windows, normal state) - virtual void ResetClipRegion(); - // start setting the clipregion consisting of nRects rectangles - virtual void BeginSetClipRegion( ULONG nRects ); - // add a rectangle to the clip region - virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); - // done setting up the clipregion - virtual void EndSetClipRegion(); - - virtual void SetClientSize( long nWidth, long nHeight ); - - void UpdateFrameGeometry(); - - // trigger painting of the window - void SendPaintEvent( const Rectangle* pRect = NULL ); - - static bool isAlive( const AquaSalFrame* pFrame ) - { return GetSalData()->maFrameCheck.find( pFrame ) != GetSalData()->maFrameCheck.end(); } - - static AquaSalFrame* GetCaptureFrame() { return s_pCaptureFrame; } - - NSWindow* getWindow() const { return mpWindow; } - NSView* getView() const { return mpView; } - unsigned int getStyleMask() const { return mnStyleMask; } - - void getResolution( long& o_rDPIX, long& o_rDPIY ); - - // actually the follwing methods do the same thing: flipping y coordinates - // but having two of them makes clearer what the coordinate system - // is supposed to be before and after - void VCLToCocoa( NSRect& io_rRect, bool bRelativeToScreen = true ); - void CocoaToVCL( NSRect& io_rRect, bool bRelativeToScreen = true ); - - void VCLToCocoa( NSPoint& io_rPoint, bool bRelativeToScreen = true ); - void CocoaToVCL( NSPoint& io_Point, bool bRelativeToScreen = true ); - - NSCursor* getCurrentCursor() const; - - CGMutablePathRef getClipPath() const { return mrClippingPath; } - - // called by VCL_NSApplication to indicate screen settings have changed - void screenParametersChanged(); - - private: // methods - /** do things on initial show (like centering on parent or on screen) - */ - void initShow(); - - void initWindowAndView(); - - private: // data - static AquaSalFrame* s_pCaptureFrame; - - // make AquaSalFrame non copyable - AquaSalFrame( const AquaSalFrame& ); - AquaSalFrame& operator=(const AquaSalFrame&); -}; - -#endif // _SV_SALFRAME_H diff --git a/vcl/aqua/inc/salframeview.h b/vcl/aqua/inc/salframeview.h deleted file mode 100755 index e7d9a14b52aa..000000000000 --- a/vcl/aqua/inc/salframeview.h +++ /dev/null @@ -1,213 +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 _VCL_SALFRAMEVIEW_H -#define _VCL_SALFRAMEVIEW_H - -#include "aqua11ywrapper.h" - -@interface SalFrameWindow : NSWindow -{ - AquaSalFrame* mpFrame; - id mDraggingDestinationHandler; -} --(id)initWithSalFrame: (AquaSalFrame*)pFrame; --(MacOSBOOL)canBecomeKeyWindow; --(void)displayIfNeeded; --(void)windowDidBecomeKey: (NSNotification*)pNotification; --(void)windowDidResignKey: (NSNotification*)pNotification; --(void)windowDidChangeScreen: (NSNotification*)pNotification; --(void)windowDidMove: (NSNotification*)pNotification; --(void)windowDidResize: (NSNotification*)pNotification; --(void)windowDidMiniaturize: (NSNotification*)pNotification; --(void)windowDidDeminiaturize: (NSNotification*)pNotification; --(MacOSBOOL)windowShouldClose: (NSNotification*)pNotification; --(void)dockMenuItemTriggered: (id)sender; --(AquaSalFrame*)getSalFrame; --(MacOSBOOL)containsMouse; --(::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >)accessibleContext; - -/* NSDraggingDestination protocol methods - */ --(NSDragOperation)draggingEntered:(id )sender; --(NSDragOperation)draggingUpdated:(id )sender; --(void)draggingExited:(id )sender; --(MacOSBOOL)prepareForDragOperation:(id )sender; --(MacOSBOOL)performDragOperation:(id )sender; --(void)concludeDragOperation:(id )sender; - --(void)registerDraggingDestinationHandler:(id)theHandler; --(void)unregisterDraggingDestinationHandler:(id)theHandler; -@end - -@interface SalFrameView : AquaA11yWrapper -{ - AquaSalFrame* mpFrame; - - // for NSTextInput - NSEvent* mpLastEvent; - BOOL mbNeedSpecialKeyHandle; - BOOL mbInKeyInput; - BOOL mbKeyHandled; - NSRange mMarkedRange; - NSRange mSelectedRange; - id mpMouseEventListener; - id mDraggingDestinationHandler; - NSEvent* mpLastSuperEvent; - - // #i102807# used by magnify event handler - NSTimeInterval mfLastMagnifyTime; - float mfMagnifyDeltaSum; -} -+(void)unsetMouseFrame: (AquaSalFrame*)pFrame; --(id)initWithSalFrame: (AquaSalFrame*)pFrame; --(MacOSBOOL)acceptsFirstResponder; --(MacOSBOOL)acceptsFirstMouse: (NSEvent *)pEvent; --(MacOSBOOL)isOpaque; --(void)drawRect: (NSRect)aRect; --(void)mouseDown: (NSEvent*)pEvent; --(void)mouseDragged: (NSEvent*)pEvent; --(void)mouseUp: (NSEvent*)pEvent; --(void)mouseMoved: (NSEvent*)pEvent; --(void)mouseEntered: (NSEvent*)pEvent; --(void)mouseExited: (NSEvent*)pEvent; --(void)rightMouseDown: (NSEvent*)pEvent; --(void)rightMouseDragged: (NSEvent*)pEvent; --(void)rightMouseUp: (NSEvent*)pEvent; --(void)otherMouseDown: (NSEvent*)pEvent; --(void)otherMouseDragged: (NSEvent*)pEvent; --(void)otherMouseUp: (NSEvent*)pEvent; --(void)scrollWheel: (NSEvent*)pEvent; --(void)magnifyWithEvent: (NSEvent*)pEvent; --(void)rotateWithEvent: (NSEvent*)pEvent; --(void)swipeWithEvent: (NSEvent*)pEvent; --(void)keyDown: (NSEvent*)pEvent; --(void)flagsChanged: (NSEvent*)pEvent; --(void)sendMouseEventToFrame:(NSEvent*)pEvent button:(USHORT)nButton eventtype:(USHORT)nEvent; --(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar; --(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod; --(MacOSBOOL)sendKeyToFrameDirect: (USHORT)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod; --(MacOSBOOL)sendSingleCharacter:(NSEvent*)pEvent; --(MacOSBOOL)handleKeyDownException:(NSEvent*)pEvent; --(void)clearLastEvent; -/* - text action methods -*/ --(void)insertText:(id)aString; --(void)insertTab: (id)aSender; --(void)insertBacktab: (id)aSender; --(void)moveLeft: (id)aSender; --(void)moveLeftAndModifySelection: (id)aSender; --(void)moveBackwardAndModifySelection: (id)aSender; --(void)moveRight: (id)aSender; --(void)moveRightAndModifySelection: (id)aSender; --(void)moveForwardAndModifySelection: (id)aSender; --(void)moveUp: (id)aSender; --(void)moveDown: (id)aSender; --(void)moveWordBackward: (id)aSender; --(void)moveWordBackwardAndModifySelection: (id)aSender; --(void)moveWordLeftAndModifySelection: (id)aSender; --(void)moveWordForward: (id)aSender; --(void)moveWordForwardAndModifySelection: (id)aSender; --(void)moveWordRightAndModifySelection: (id)aSender; --(void)moveToEndOfLine: (id)aSender; --(void)moveToRightEndOfLine: (id)aSender; --(void)moveToLeftEndOfLine: (id)aSender; --(void)moveToEndOfLineAndModifySelection: (id)aSender; --(void)moveToRightEndOfLineAndModifySelection: (id)aSender; --(void)moveToLeftEndOfLineAndModifySelection: (id)aSender; --(void)moveToBeginningOfLine: (id)aSender; --(void)moveToBeginningOfLineAndModifySelection: (id)aSender; --(void)moveToEndOfParagraph: (id)aSender; --(void)moveToEndOfParagraphAndModifySelection: (id)aSender; --(void)moveToBeginningOfParagraph: (id)aSender; --(void)moveToBeginningOfParagraphAndModifySelection: (id)aSender; --(void)moveParagraphForward: (id)aSender; --(void)moveParagraphForwardAndModifySelection: (id)aSender; --(void)moveParagraphBackward: (id)aSender; --(void)moveParagraphBackwardAndModifySelection: (id)aSender; --(void)moveToEndOfDocument: (id)aSender; --(void)scrollToEndOfDocument: (id)aSender; --(void)moveToEndOfDocumentAndModifySelection: (id)aSender; --(void)moveToBeginningOfDocument: (id)aSender; --(void)scrollToBeginningOfDocument: (id)aSender; --(void)moveToBeginningOfDocumentAndModifySelection: (id)aSender; --(void)insertNewline: (id)aSender; --(void)deleteBackward: (id)aSender; --(void)deleteForward: (id)aSender; --(void)cancelOperation: (id)aSender; --(void)deleteBackwardByDecomposingPreviousCharacter: (id)aSender; --(void)deleteWordBackward: (id)aSender; --(void)deleteWordForward: (id)aSender; --(void)deleteToBeginningOfLine: (id)aSender; --(void)deleteToEndOfLine: (id)aSender; --(void)deleteToBeginningOfParagraph: (id)aSender; --(void)deleteToEndOfParagraph: (id)aSender; --(void)insertLineBreak: (id)aSender; --(void)insertParagraphSeparator: (id)aSender; --(void)selectWord: (id)aSender; --(void)selectLine: (id)aSender; --(void)selectParagraph: (id)aSender; --(void)selectAll: (id)aSender; --(void)noop: (id)aSender; -/* set the correct pointer for our view */ --(void)resetCursorRects; --(::com::sun::star::accessibility::XAccessibleContext *)accessibleContext; --(id)parentAttribute; --(NSView *)viewElementForParent; -/* - Event hook for D&D service. - - A drag operation will be invoked on a NSView using - the method 'dragImage'. This method requires the - actual mouse event initiating this drag operation. - Mouse events can only be received by subclassing - NSView and overriding methods like 'mouseDown' etc. - hence we implement a event hook here so that the - D&D service can register as listener for mouse - messages and use the last 'mouseDown' or - 'mouseDragged' message to initiate the drag - operation. -*/ --(void)registerMouseEventListener: (id)theListener; --(void)unregisterMouseEventListener: (id)theListener; - -/* NSDraggingDestination protocol methods - */ --(NSDragOperation)draggingEntered:(id )sender; --(NSDragOperation)draggingUpdated:(id )sender; --(void)draggingExited:(id )sender; --(MacOSBOOL)prepareForDragOperation:(id )sender; --(MacOSBOOL)performDragOperation:(id )sender; --(void)concludeDragOperation:(id )sender; - --(void)registerDraggingDestinationHandler:(id)theHandler; --(void)unregisterDraggingDestinationHandler:(id)theHandler; - -@end - -#endif diff --git a/vcl/aqua/inc/salgdi.h b/vcl/aqua/inc/salgdi.h deleted file mode 100644 index 17c4aa7acd44..000000000000 --- a/vcl/aqua/inc/salgdi.h +++ /dev/null @@ -1,417 +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 _SV_SALGDI_H -#define _SV_SALGDI_H - -#include "premac.h" -#include -#include "postmac.h" - -#include "vcl/sv.h" -#include "vcl/outfont.hxx" -#include "vcl/salgdi.hxx" -#include "aquavcltypes.h" - -#include "basegfx/polygon/b2dpolypolygon.hxx" - -#include - -class AquaSalFrame; -class AquaSalBitmap; -class ImplDevFontAttributes; - -class CGRect; - -// mac specific physically available font face -class ImplMacFontData : public ImplFontData -{ -public: - ImplMacFontData( const ImplDevFontAttributes&, ATSUFontID ); - - virtual ~ImplMacFontData(); - - virtual ImplFontData* Clone() const; - virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const; - virtual sal_IntPtr GetFontId() const; - - const ImplFontCharMap* GetImplFontCharMap() const; - bool HasChar( sal_uInt32 cChar ) const; - - void ReadOs2Table() const; - void ReadMacCmapEncoding() const; - bool HasCJKSupport() const; - -private: - const ATSUFontID mnFontId; - mutable const ImplFontCharMap* mpCharMap; - mutable bool mbOs2Read; // true if OS2-table related info is valid - mutable bool mbHasOs2Table; - mutable bool mbCmapEncodingRead; // true if cmap encoding of Mac font is read - mutable bool mbHasCJKSupport; // #i78970# CJK fonts need extra leading -}; - -// abstracting quartz color instead of having to use an CGFloat[] array -class RGBAColor -{ -public: - RGBAColor( SalColor ); - RGBAColor( float fRed, float fGreen, float fBlue, float fAlpha ); //NOTUSEDYET - const float* AsArray() const { return &mfRed; } - bool IsVisible() const { return (mfAlpha > 0); } - void SetAlpha( float fAlpha ) { mfAlpha = fAlpha; } -private: - float mfRed, mfGreen, mfBlue, mfAlpha; -}; - -// ------------------- -// - AquaSalGraphics - -// ------------------- -class AquaSalGraphics : public SalGraphics -{ - friend class ATSLayout; -protected: - AquaSalFrame* mpFrame; - CGLayerRef mxLayer; // Quartz graphics layer - CGContextRef mrContext; // Quartz drawing context - class XorEmulation* mpXorEmulation; - int mnXorMode; // 0: off 1: on 2: invert only - int mnWidth; - int mnHeight; - int mnBitmapDepth; // zero unless bitmap - /// device resolution of this graphics - long mnRealDPIX; - long mnRealDPIY; - /// some graphics implementations (e.g. AquaSalInfoPrinter) scale - /// everything down by a factor (see SetupPrinterGraphics for details) - /// so we have to compensate for it with the inverse factor - double mfFakeDPIScale; - - /// path representing current clip region - CGMutablePathRef mxClipPath; - - /// Drawing colors - /// pen color RGBA - RGBAColor maLineColor; - /// brush color RGBA - RGBAColor maFillColor; - - // Device Font settings - const ImplMacFontData* mpMacFontData; - /// ATSU style object which carries all font attributes - ATSUStyle maATSUStyle; - /// text rotation as ATSU angle - Fixed mnATSUIRotation; - /// workaround to prevent ATSU overflows for huge font sizes - float mfFontScale; - /// <1.0: font is squeezed, >1.0 font is stretched, else 1.0 - float mfFontStretch; - /// allows text to be rendered without antialiasing - bool mbNonAntialiasedText; - - // Graphics types - - /// is this a printer graphics - bool mbPrinter; - /// is this a virtual device graphics - bool mbVirDev; - /// is this a window graphics - bool mbWindow; - -public: - AquaSalGraphics(); - virtual ~AquaSalGraphics(); - - bool IsPenVisible() const { return maLineColor.IsVisible(); } - bool IsBrushVisible() const { return maFillColor.IsVisible(); } - - void SetWindowGraphics( AquaSalFrame* pFrame ); - void SetPrinterGraphics( CGContextRef, long nRealDPIX, long nRealDPIY, double fFakeScale ); - void SetVirDevGraphics( CGLayerRef, CGContextRef, int nBitDepth = 0 ); - - void initResolution( NSWindow* ); - void copyResolution( AquaSalGraphics& ); - void updateResolution(); - - bool IsWindowGraphics() const { return mbWindow; } - bool IsPrinterGraphics() const { return mbPrinter; } - bool IsVirDevGraphics() const { return mbVirDev; } - AquaSalFrame* getGraphicsFrame() const { return mpFrame; } - void setGraphicsFrame( AquaSalFrame* pFrame ) { mpFrame = pFrame; } - - void ImplDrawPixel( long nX, long nY, const RGBAColor& ); // helper to draw single pixels - - bool CheckContext(); - void UpdateWindow( NSRect& ); // delivered in NSView coordinates - void RefreshRect( const CGRect& ); - void RefreshRect( const NSRect& ); - void RefreshRect(float lX, float lY, float lWidth, float lHeight); - - void SetState(); - void UnsetState(); - // InvalidateContext does an UnsetState and sets mrContext to 0 - void InvalidateContext(); - - virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ); - virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ); - - // draw --> LineColor and FillColor and RasterOp and ClipRegion - virtual void drawPixel( long nX, long nY ); - virtual void drawPixel( long nX, long nY, SalColor nSalColor ); - virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ); - virtual void drawRect( long nX, long nY, long nWidth, long nHeight ); - virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry ); - virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry ); - virtual void drawPolyPolygon( ULONG nPoly, const ULONG* pPoints, PCONSTSALPOINT* pPtAry ); - virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency ); - virtual sal_Bool drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ); - virtual sal_Bool drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ); - virtual sal_Bool drawPolyPolygonBezier( ULONG nPoly, const ULONG* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry ); - virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin ); - - // CopyArea --> No RasterOp, but ClipRegion - virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, - long nSrcHeight, USHORT nFlags ); - - // CopyBits and DrawBitmap --> RasterOp and ClipRegion - // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics - virtual void copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics ); - virtual void drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap ); - virtual void drawBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - SalColor nTransparentColor ); - virtual void drawBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - const SalBitmap& rTransparentBitmap ); - virtual void drawMask( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - SalColor nMaskColor ); - - virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight ); - virtual SalColor getPixel( long nX, long nY ); - - // invert --> ClipRegion (only Windows or VirDevs) - virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags); - virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags ); - - virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ); - - virtual bool drawAlphaBitmap( const SalTwoRect&, - const SalBitmap& rSourceBitmap, - const SalBitmap& rAlphaBitmap ); - - virtual bool drawAlphaRect( long nX, long nY, long nWidth, - long nHeight, sal_uInt8 nTransparency ); - - CGPoint* makeCGptArray(ULONG nPoints, const SalPoint* pPtAry); - // native widget rendering methods that require mirroring - virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, - const Point& aPos, BOOL& rIsInside ); - virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, - ControlState nState, const ImplControlValue& aValue, - const rtl::OUString& aCaption ); - virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, - ControlState nState, const ImplControlValue& aValue, - const rtl::OUString& aCaption ); - virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, - const ImplControlValue& aValue, const rtl::OUString& aCaption, - Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ); - - // get device resolution - virtual void GetResolution( long& rDPIX, long& rDPIY ); - // get the depth of the device - virtual USHORT GetBitCount(); - // get the width of the device - virtual long GetGraphicsWidth() const; - - // set the clip region to empty - virtual void ResetClipRegion(); - // begin setting the clip region, add rectangles to the - // region with the UnionClipRegion call - virtual void BeginSetClipRegion( ULONG nCount ); - // all rectangles were added and the clip region should be set now - virtual void EndSetClipRegion(); - - // set the line color to transparent (= don't draw lines) - virtual void SetLineColor(); - // set the line color to a specific color - virtual void SetLineColor( SalColor nSalColor ); - // set the fill color to transparent (= don't fill) - virtual void SetFillColor(); - // set the fill color to a specific color, shapes will be - // filled accordingly - virtual void SetFillColor( SalColor nSalColor ); - // enable/disable XOR drawing - virtual void SetXORMode( bool bSet, bool bInvertOnly ); - // set line color for raster operations - virtual void SetROPLineColor( SalROPColor nROPColor ); - // set fill color for raster operations - virtual void SetROPFillColor( SalROPColor nROPColor ); - // set the text color to a specific color - virtual void SetTextColor( SalColor nSalColor ); - // set the font - virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel ); - // get the current font's etrics - virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ); - // get kernign pairs of the current font - // return only PairCount if (pKernPairs == NULL) - virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs ); - // get the repertoire of the current font - virtual const ImplFontCharMap* GetImplFontCharMap() const; - // graphics must fill supplied font list - virtual void GetDevFontList( ImplDevFontList* ); - // graphics should call ImplAddDevFontSubstitute on supplied - // OutputDevice for all its device specific preferred font substitutions - virtual void GetDevFontSubstList( OutputDevice* ); - virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ); - // CreateFontSubset: a method to get a subset of glyhps of a font - // inside a new valid font file - // returns TRUE if creation of subset was successfull - // parameters: rToFile: contains a osl file URL to write the subset to - // pFont: describes from which font to create a subset - // pGlyphIDs: the glyph ids to be extracted - // pEncoding: the character code corresponding to each glyph - // pWidths: the advance widths of the correspoding glyphs (in PS font units) - // nGlyphs: the number of glyphs - // rInfo: additional outgoing information - // implementation note: encoding 0 with glyph id 0 should be added implicitly - // as "undefined character" - virtual BOOL CreateFontSubset( const rtl::OUString& rToFile, - const ImplFontData* pFont, - long* pGlyphIDs, - sal_uInt8* pEncoding, - sal_Int32* pWidths, - int nGlyphs, - FontSubsetInfo& rInfo // out parameter - ); - - // GetFontEncodingVector: a method to get the encoding map Unicode - // to font encoded character; this is only used for type1 fonts and - // may return NULL in case of unknown encoding vector - // if ppNonEncoded is set and non encoded characters (that is type1 - // glyphs with only a name) exist it is set to the corresponding - // map for non encoded glyphs; the encoding vector contains -1 - // as encoding for these cases - virtual const Ucs2SIntMap* GetFontEncodingVector( const ImplFontData*, const Ucs2OStrMap** ppNonEncoded ); - - // GetEmbedFontData: gets the font data for a font marked - // embeddable by GetDevFontList or NULL in case of error - // parameters: pFont: describes the font in question - // pWidths: the widths of all glyphs from char code 0 to 255 - // pWidths MUST support at least 256 members; - // rInfo: additional outgoing information - // pDataLen: out parameter, contains the byte length of the returned buffer - virtual const void* GetEmbedFontData( const ImplFontData*, - const sal_Ucs* pUnicodes, - sal_Int32* pWidths, - FontSubsetInfo& rInfo, - long* pDataLen ); - // frees the font data again - virtual void FreeEmbedFontData( const void* pData, long nDataLen ); - - virtual void GetGlyphWidths( const ImplFontData*, - bool bVertical, - Int32Vector& rWidths, - Ucs2UIntMap& rUnicodeEnc ); - - virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& ); - virtual BOOL GetGlyphOutline( long nIndex, basegfx::B2DPolyPolygon& ); - - virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ); - virtual void DrawServerFontLayout( const ServerFontLayout& ); - virtual bool supportsOperation( OutDevSupportType ) const; - - // Query the platform layer for control support - virtual BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart ); - - virtual SystemGraphicsData GetGraphicsData() const; - virtual SystemFontData GetSysFontData( int /* nFallbacklevel */ ) const; - -private: - // differences between VCL, Quartz and kHiThemeOrientation coordinate systems - // make some graphics seem to be vertically-mirrored from a VCL perspective - bool IsFlipped() const { return mbWindow; } - - void ApplyXorContext(); - void Pattern50Fill(); - UInt32 getState( ControlState nState ); - UInt32 getTrackState( ControlState nState ); -}; - -class XorEmulation -{ -public: - XorEmulation(); - /*final*/ ~XorEmulation(); - - void SetTarget( int nWidth, int nHeight, int nBitmapDepth, CGContextRef, CGLayerRef ); - bool UpdateTarget(); - void Enable() { mbIsEnabled = true; } - void Disable() { mbIsEnabled = false; } - bool IsEnabled() const { return mbIsEnabled; } - CGContextRef GetTargetContext() const { return mxTargetContext; } - CGContextRef GetMaskContext() const { return (mbIsEnabled ? mxMaskContext : NULL); } - -private: - CGLayerRef mxTargetLayer; - CGContextRef mxTargetContext; - CGContextRef mxMaskContext; - CGContextRef mxTempContext; - ULONG* mpMaskBuffer; - ULONG* mpTempBuffer; - int mnBufferLongs; - bool mbIsEnabled; -}; - - -// --- some trivial inlines - -inline void AquaSalGraphics::RefreshRect( const CGRect& rRect ) -{ - RefreshRect( rRect.origin.x, rRect.origin.y, rRect.size.width, rRect.size.height ); -} - -inline void AquaSalGraphics::RefreshRect( const NSRect& rRect ) -{ - RefreshRect( rRect.origin.x, rRect.origin.y, rRect.size.width, rRect.size.height ); -} - -inline RGBAColor::RGBAColor( SalColor nSalColor ) -: mfRed( SALCOLOR_RED(nSalColor) * (1.0/255)) -, mfGreen( SALCOLOR_GREEN(nSalColor) * (1.0/255)) -, mfBlue( SALCOLOR_BLUE(nSalColor) * (1.0/255)) -, mfAlpha( 1.0 ) // opaque -{} - -inline RGBAColor::RGBAColor( float fRed, float fGreen, float fBlue, float fAlpha ) -: mfRed( fRed ) -, mfGreen( fGreen ) -, mfBlue( fBlue ) -, mfAlpha( fAlpha ) -{} - -#endif // _SV_SALGDI_H diff --git a/vcl/aqua/inc/salinst.h b/vcl/aqua/inc/salinst.h deleted file mode 100644 index 4b0385844eed..000000000000 --- a/vcl/aqua/inc/salinst.h +++ /dev/null @@ -1,203 +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 _SV_SALINST_H -#define _SV_SALINST_H - -#include "vcl/sv.h" -#include "vos/mutex.hxx" -#include "vos/thread.hxx" -#include "vcl/salinst.hxx" -#include "osl/conditn.h" - -#include "aquavcltypes.h" - -#include - -class AquaSalFrame; -class ApplicationEvent; -class Image; - -// ----------------- -// - SalYieldMutex - -// ----------------- - -class SalYieldMutex : public vos::OMutex -{ - ULONG mnCount; - vos::OThread::TThreadIdentifier mnThreadId; - -public: - SalYieldMutex(); - virtual void acquire(); - virtual void release(); - virtual sal_Bool tryToAcquire(); - ULONG GetAcquireCount() const { return mnCount; } - vos::OThread::TThreadIdentifier GetThreadId() const { return mnThreadId; } -}; - -#define YIELD_GUARD vos::OGuard aGuard( GetSalData()->mpFirstInstance->GetYieldMutex() ) - - -// ------------------- -// - SalInstanceData - -// ------------------- - -//struct SalInstanceData -//{ -//public: -//}; - -// ------------------ -// - AquaSalInstance - -// ------------------ - -class AquaSalInstance : public SalInstance -{ - struct SalUserEvent - { - AquaSalFrame* mpFrame; - void* mpData; - USHORT mnType; - - SalUserEvent( AquaSalFrame* pFrame, void* pData, USHORT nType ) : - mpFrame( pFrame ), mpData( pData ), mnType( nType ) - {} - }; - -public: - SalYieldMutex* mpSalYieldMutex; // Sal-Yield-Mutex - rtl::OUString maDefaultPrinter; - vos::OThread::TThreadIdentifier maMainThread; - bool mbWaitingYield; - int mnActivePrintJobs; - std::list< SalUserEvent > maUserEvents; - oslMutex maUserEventListMutex; - oslCondition maWaitingYieldCond; - - typedef std::list AppEventList; - static AppEventList aAppEventList; - -public: - AquaSalInstance(); - virtual ~AquaSalInstance(); - - virtual SalSystem* CreateSystem(); - virtual void DestroySystem(SalSystem*); - virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle ); - virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle ); - virtual void DestroyFrame( SalFrame* pFrame ); - virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE ); - virtual void DestroyObject( SalObject* pObject ); - virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics, - long nDX, long nDY, - USHORT nBitCount, const SystemGraphicsData *pData ); - virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice ); - - virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo, - ImplJobSetup* pSetupData ); - virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter ); - virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter ); - virtual void DestroyPrinter( SalPrinter* pPrinter ); - virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList ); - virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo ); - virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ); - virtual String GetDefaultPrinter(); - virtual SalTimer* CreateSalTimer(); - virtual SalI18NImeStatus* CreateI18NImeStatus(); - virtual SalSystem* CreateSalSystem(); - virtual SalBitmap* CreateSalBitmap(); - virtual vos::IMutex* GetYieldMutex(); - virtual ULONG ReleaseYieldMutex(); - virtual void AcquireYieldMutex( ULONG nCount ); - virtual bool CheckYieldMutex(); - virtual void Yield( bool bWait, bool bHandleAllCurrentEvents ); - virtual bool AnyInput( USHORT nType ); - virtual SalMenu* CreateMenu( BOOL bMenuBar, Menu* pVCLMenu ); - virtual void DestroyMenu( SalMenu* ); - virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData ); - virtual void DestroyMenuItem( SalMenuItem* ); - virtual SalSession* CreateSalSession(); - virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ); - virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType); - virtual void SetEventCallback( void* pInstance, bool(*pCallback)(void*,void*,int) ); - virtual void SetErrorEventCallback( void* pInstance, bool(*pCallback)(void*,void*,int) ); - - // dtrans implementation - virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > - CreateClipboard( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& i_rArguments ); - virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDragSource(); - virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDropTarget(); - - static void handleAppDefinedEvent( NSEvent* pEvent ); - - // check whether a particular string is passed on the command line - // this is needed to avoid duplicate open events through a) command line and b) NSApp's openFile - static bool isOnCommandLine( const rtl::OUString& ); - - void wakeupYield(); - - public: - friend class AquaSalFrame; - - void PostUserEvent( AquaSalFrame* pFrame, USHORT nType, void* pData ); - void delayedSettingsChanged( bool bInvalidate ); - - bool isNSAppThread() const; - - void startedPrintJob() { mnActivePrintJobs++; } - void endedPrintJob() { mnActivePrintJobs--; } - - // event subtypes for NSApplicationDefined events - static const short AppExecuteSVMain = 0x7fff; - static const short AppEndLoopEvent = 1; - static const short AppStartTimerEvent = 10; - static const short AppleRemoteEvent = 15; - static const short YieldWakeupEvent = 20; - - static NSMenu* GetDynamicDockMenu(); -}; - -// helper class: inverted solar guard -class YieldMutexReleaser -{ - ULONG mnCount; - public: - YieldMutexReleaser(); - ~YieldMutexReleaser(); -}; - -// helper class -rtl::OUString GetOUString( CFStringRef ); -rtl::OUString GetOUString( NSString* ); -CFStringRef CreateCFString( const rtl::OUString& ); -NSString* CreateNSString( const rtl::OUString& ); - -CGImageRef CreateCGImage( const Image& ); -NSImage* CreateNSImage( const Image& ); - -#endif // _SV_SALINST_H diff --git a/vcl/aqua/inc/salmathutils.hxx b/vcl/aqua/inc/salmathutils.hxx deleted file mode 100755 index 6106dc328740..000000000000 --- a/vcl/aqua/inc/salmathutils.hxx +++ /dev/null @@ -1,87 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SALMATHUTILS_HXX -#define _SV_SALMATHUTILS_HXX - -#ifdef __cplusplus -extern "C" { -#endif - -// ------------------------------------------------------------------ -// -// Structures -// -// ------------------------------------------------------------------ - -// LRectCoor is an abreviation for rectangular coordinates -// represented as long integers - -struct LRectCoor -{ - long x; - long y; - long z; -}; - -// ------------------------------------------------------------------ -// -// Type Definitions -// -// ------------------------------------------------------------------ - -// LRectCoorVec is an abreviation for vectors in rectangular -// coordinates represented as long integers - -typedef struct LRectCoor LRectCoor; -typedef LRectCoor *LRectCoorVector; -typedef LRectCoorVector *LRectCoorTensor; - -// ------------------------------------------------------------------ -// -// Function Headers -// -// ------------------------------------------------------------------ - -void CSwap ( char &rX, char &rY ); -void UCSwap ( unsigned char &rX, unsigned char &rY ); -void SSwap ( short &rX, short &rY ); -void USSwap ( unsigned short &rX, unsigned short &rY ); -void LSwap ( long &rX, long &rY ); -void ULSwap ( unsigned long &rX, unsigned long &rY ); - -// ------------------------------------------------------------------ - -unsigned long Euclidian2Norm ( const LRectCoorVector pVec ); - -// ------------------------------------------------------------------ - -#ifdef __cplusplus -} -#endif - -#endif // _SV_SALMATHUTILS_HXX diff --git a/vcl/aqua/inc/salmenu.h b/vcl/aqua/inc/salmenu.h deleted file mode 100644 index 100e8c22972c..000000000000 --- a/vcl/aqua/inc/salmenu.h +++ /dev/null @@ -1,121 +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 _SV_SALMENU_H -#define _SV_SALMENU_H - -#include "premac.h" -#include -#include "postmac.h" - -#include "vcl/sv.h" -#include "vcl/salmenu.hxx" - -#include - -class AquaSalFrame; -class AquaSalMenuItem; - -class AquaSalMenu : public SalMenu -{ - std::vector< AquaSalMenuItem* > maItems; - -public: // for OOStatusView - struct MenuBarButtonEntry - { - SalMenuButtonItem maButton; - NSImage* mpNSImage; // cached image - NSString* mpToolTipString; - - MenuBarButtonEntry() : mpNSImage( nil ), mpToolTipString( nil ) {} - MenuBarButtonEntry( const SalMenuButtonItem& i_rItem ) - : maButton( i_rItem), mpNSImage( nil ), mpToolTipString( nil ) {} - }; -private: - std::vector< MenuBarButtonEntry > maButtons; - - MenuBarButtonEntry* findButtonItem( USHORT i_nItemId ); - void releaseButtonEntry( MenuBarButtonEntry& i_rEntry ); - static void statusLayout(); -public: - AquaSalMenu( bool bMenuBar ); - virtual ~AquaSalMenu(); - - virtual BOOL VisibleMenuBar(); // must return TRUE to actually DISPLAY native menu bars - // otherwise only menu messages are processed (eg, OLE on Windows) - - virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ); - virtual void RemoveItem( unsigned nPos ); - virtual void SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos ); - virtual void SetFrame( const SalFrame* pFrame ); - virtual void CheckItem( unsigned nPos, BOOL bCheck ); - virtual void EnableItem( unsigned nPos, BOOL bEnable ); - virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText ); - virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage); - virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName ); - virtual void GetSystemMenuData( SystemMenuData* pData ); - virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, ULONG nFlags); - virtual bool AddMenuBarButton( const SalMenuButtonItem& ); - virtual void RemoveMenuBarButton( USHORT nId ); - virtual Rectangle GetMenuBarButtonRectPixel( USHORT i_nItemId, SalFrame* i_pReferenceFrame ); - - int getItemIndexByPos( USHORT nPos ) const; - const AquaSalFrame* getFrame() const; - - void setMainMenu(); - static void unsetMainMenu(); - static void setDefaultMenu(); - static void enableMainMenu( bool bEnable ); - static void addFallbackMenuItem( NSMenuItem* NewItem ); - static void removeFallbackMenuItem( NSMenuItem* pOldItem ); - - const std::vector< MenuBarButtonEntry >& getButtons() const { return maButtons; } - - bool mbMenuBar; // true - Menubar, false - Menu - NSMenu* mpMenu; // The Carbon reference to this menu - Menu* mpVCLMenu; // the corresponding vcl Menu object - const AquaSalFrame* mpFrame; // the frame to dispatch the menu events to - AquaSalMenu* mpParentSalMenu; // the parent menu that contains us (and perhaps has a frame) - - static const AquaSalMenu* pCurrentMenuBar; - -}; - -class AquaSalMenuItem : public SalMenuItem -{ -public: - AquaSalMenuItem( const SalItemParams* ); - virtual ~AquaSalMenuItem(); - - USHORT mnId; // Item ID - Menu* mpVCLMenu; // VCL Menu into which this MenuItem is inserted - AquaSalMenu* mpParentMenu; // The menu in which this menu item is inserted - AquaSalMenu* mpSubMenu; // Sub menu of this item (if defined) - NSMenuItem* mpMenuItem; // The NSMenuItem -}; - -#endif // _SV_SALMENU_H diff --git a/vcl/aqua/inc/salnativewidgets.h b/vcl/aqua/inc/salnativewidgets.h deleted file mode 100755 index 11d4ea5c1c62..000000000000 --- a/vcl/aqua/inc/salnativewidgets.h +++ /dev/null @@ -1,71 +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 _SV_NATIVEWIDGETS_H -#define _SV_NATIVEWIDGETS_H - -// since 10.4 ... no metrics are returned, and we have to fix the values -#define BUTTON_WIDTH 16 -#define BUTTON_HEIGHT 17 - -//standard height of the AHIG -//tabs -#define TAB_HEIGHT_NORMAL 20 -#define TAB_HEIGHT_SMALL 17 -#define TAB_HEIGHT_MINI 15 - -#define TAB_TEXT_OFFSET 12 -#define VCL_TAB_TEXT_OFFSET 2 - -//listboxes, comboboxes (they have the same dimensions) -#define COMBOBOX_HEIGHT_NORMAL 20 -#define DROPDOWN_BUTTON_WIDTH 20 - -//text edit -#define TEXT_EDIT_HEIGHT_NORMAL 22 - -//spin box -#define SPIN_BUTTON_SPACE 2 -#define SPIN_BUTTON_WIDTH 13 -#define SPIN_UPPER_BUTTON_HEIGHT 11 -#define SPIN_LOWER_BUTTON_HEIGHT 10 -#define SPIN_TWO_BUTTONS_HEIGHT 21 - -// progress bar -#define INTRO_PROGRESS_HEIGHT 9 - -// for some controls, like spinbuttons + spinboxes, or listboxes -// we need it to adjust text position beside radio and check buttons - -#define TEXT_SEPARATOR 3 - -// extra border for focus ring -#define FOCUS_RING_WIDTH 4 - -#define CLIP_FUZZ 1 - -#endif // _SV_NATIVEWIDGETS_H diff --git a/vcl/aqua/inc/salnsmenu.h b/vcl/aqua/inc/salnsmenu.h deleted file mode 100755 index e9b2cbe922b8..000000000000 --- a/vcl/aqua/inc/salnsmenu.h +++ /dev/null @@ -1,68 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _VCL_SALNSMENU_H -#define _VCL_SALNSMENU_H - -class AquaSalMenu; -class AquaSalMenuItem; - -@interface OOStatusItemView : NSView -{ -} --(void)drawRect: (NSRect)aRect; --(void)layout; --(void)mouseUp: (NSEvent *)pEvent; -@end - -@interface SalNSMenu : NSMenu -{ - /* Caution: SalNSMenu instances occasionally are binary copied - in AquaSalMenu::ShowNativePopupMenu. If any members are added, - please take this into account ! - */ - AquaSalMenu* mpMenu; -} --(id)initWithMenu: (AquaSalMenu*)pMenu; --(void)menuNeedsUpdate: (NSMenu*)pMenu; --(void)setSalMenu: (AquaSalMenu*)pMenu; -@end - -@interface SalNSMenuItem : NSMenuItem -{ - /* Caution: SalNSMenuItem instances occasionally are binary copied - in AquaSalMenu::ShowNativePopupMenu. If any members are added, - please take this into account ! - */ - AquaSalMenuItem* mpMenuItem; -} --(id)initWithMenuItem: (AquaSalMenuItem*)pMenuItem; --(void)menuItemTriggered: (id)aSender; -@end - - -#endif diff --git a/vcl/aqua/inc/salnstimer.h b/vcl/aqua/inc/salnstimer.h deleted file mode 100755 index e29fef43b6b4..000000000000 --- a/vcl/aqua/inc/salnstimer.h +++ /dev/null @@ -1,40 +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 _VCL_SALNSTIMER_H -#define _VCL_SALNSTIMER_H - -#include "premac.h" -#include "Cocoa/Cocoa.h" -#include "postmac.h" - -@interface TimerCallbackCaller : NSObject -{ -} --(void)timerElapsed:(NSTimer*)pTimer; -@end - -#endif diff --git a/vcl/aqua/inc/salobj.h b/vcl/aqua/inc/salobj.h deleted file mode 100644 index 56b07cea4262..000000000000 --- a/vcl/aqua/inc/salobj.h +++ /dev/null @@ -1,87 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SALOBJ_H -#define _SV_SALOBJ_H - -#include "vcl/sv.h" -#include "vcl/sysdata.hxx" -#include "vcl/salobj.hxx" - -class AquaSalFrame; -class AquaSalObject; - - -// ----------------- -// - SalObjectData - -// ----------------- - -struct SalObjectData -{ -}; - -class AquaSalObject : public SalObject -{ -public: - AquaSalFrame* mpFrame; // parent frame - NSClipView* mpClipView; - SystemEnvData maSysData; - - long mnClipX; - long mnClipY; - long mnClipWidth; - long mnClipHeight; - bool mbClip; - - long mnX; - long mnY; - long mnWidth; - long mnHeight; - - - void setClippedPosSize(); - - - AquaSalObject( AquaSalFrame* pFrame ); - virtual ~AquaSalObject(); - - virtual void ResetClipRegion(); - virtual USHORT GetClipRegionType(); - virtual void BeginSetClipRegion( ULONG nRects ); - virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); - virtual void EndSetClipRegion(); - virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ); - virtual void Show( BOOL bVisible ); - virtual void Enable( BOOL nEnable ); - virtual void GrabFocus(); - virtual void SetBackground(); - virtual void SetBackground( SalColor nSalColor ); - virtual const SystemEnvData* GetSystemData() const; - virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ); -}; - -#endif // _SV_SALOBJ_H diff --git a/vcl/aqua/inc/salprn.h b/vcl/aqua/inc/salprn.h deleted file mode 100644 index 6bcafa2ee2e3..000000000000 --- a/vcl/aqua/inc/salprn.h +++ /dev/null @@ -1,171 +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 _SV_SALPRN_H -#define _SV_SALPRN_H - -#include "vcl/sv.h" -#include "aquavcltypes.h" -#include "vcl/salprn.hxx" - -#include - - -// --------------------- -// - AquaSalInfoPrinter - -// --------------------- - -class AquaSalGraphics; - -class AquaSalInfoPrinter : public SalInfoPrinter -{ - /// Printer graphics - AquaSalGraphics* mpGraphics; - /// is Graphics used - bool mbGraphics; - /// job active ? - bool mbJob; - - /// cocoa printer object - NSPrinter* mpPrinter; - /// cocoa print info object - NSPrintInfo* mpPrintInfo; - - /// FIXME: get real printer context for infoprinter if possible - /// fake context for info printer - /// graphics context for Quartz 2D - CGContextRef mrContext; - /// memory for graphics bitmap context for querying metrics - boost::shared_array< sal_uInt8 > maContextMemory; - - // since changes to NSPrintInfo during a job are ignored - // we have to care for some settings ourselves - // currently we do this for orientation; - // really needed however is a solution for paper formats - Orientation mePageOrientation; - - int mnStartPageOffsetX; - int mnStartPageOffsetY; - sal_Int32 mnCurPageRangeStart; - sal_Int32 mnCurPageRangeCount; - - public: - AquaSalInfoPrinter( const SalPrinterQueueInfo& pInfo ); - virtual ~AquaSalInfoPrinter(); - - void SetupPrinterGraphics( CGContextRef i_xContext ) const; - - virtual SalGraphics* GetGraphics(); - virtual void ReleaseGraphics( SalGraphics* i_pGraphics ); - virtual BOOL Setup( SalFrame* i_pFrame, ImplJobSetup* i_pSetupData ); - virtual BOOL SetPrinterData( ImplJobSetup* pSetupData ); - virtual BOOL SetData( ULONG i_nFlags, ImplJobSetup* i_pSetupData ); - virtual void GetPageInfo( const ImplJobSetup* i_pSetupData, - long& o_rOutWidth, long& o_rOutHeight, - long& o_rPageOffX, long& o_rPageOffY, - long& o_rPageWidth, long& o_rPageHeight ); - virtual ULONG GetCapabilities( const ImplJobSetup* i_pSetupData, USHORT i_nType ); - virtual ULONG GetPaperBinCount( const ImplJobSetup* i_pSetupData ); - virtual String GetPaperBinName( const ImplJobSetup* i_pSetupData, ULONG i_nPaperBin ); - virtual void InitPaperFormats( const ImplJobSetup* i_pSetupData ); - virtual int GetLandscapeAngle( const ImplJobSetup* i_pSetupData ); - - // the artificial separation between InfoPrinter and Printer - // is not really useful for us - // so let's make AquaSalPrinter just a forwarder to AquaSalInfoPrinter - // and concentrate the real work in one class - // implement pull model print system - BOOL StartJob( const String* i_pFileName, - const String& rJobName, - const String& i_rAppName, - ImplJobSetup* i_pSetupData, - vcl::PrinterController& i_rController ); - BOOL EndJob(); - BOOL AbortJob(); - SalGraphics* StartPage( ImplJobSetup* i_pSetupData, BOOL i_bNewJobData ); - BOOL EndPage(); - ULONG GetErrorCode() const; - - NSPrintInfo* getPrintInfo() const { return mpPrintInfo; } - void setStartPageOffset( int nOffsetX, int nOffsetY ) { mnStartPageOffsetX = nOffsetX; mnStartPageOffsetY = nOffsetY; } - sal_Int32 getCurPageRangeStart() const { return mnCurPageRangeStart; } - sal_Int32 getCurPageRangeCount() const { return mnCurPageRangeCount; } - - // match width/height against known paper formats, possibly switching orientation - const PaperInfo* matchPaper( long i_nWidth, long i_nHeight, Orientation& o_rOrientation ) const; - void setPaperSize( long i_nWidth, long i_nHeight, Orientation i_eSetOrientation ); - - private: - AquaSalInfoPrinter( const AquaSalInfoPrinter& ); - AquaSalInfoPrinter& operator=(const AquaSalInfoPrinter&); -}; - -// ----------------- -// - AquaSalPrinter - -// ----------------- - -class AquaSalPrinter : public SalPrinter -{ - AquaSalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter - public: - AquaSalPrinter( AquaSalInfoPrinter* i_pInfoPrinter ); - virtual ~AquaSalPrinter(); - - virtual BOOL StartJob( const XubString* i_pFileName, - const XubString& i_rJobName, - const XubString& i_rAppName, - ULONG i_nCopies, - bool i_bCollate, - bool i_bDirect, - ImplJobSetup* i_pSetupData ); - // implement pull model print system - virtual BOOL StartJob( const String* i_pFileName, - const String& rJobName, - const String& i_rAppName, - ImplJobSetup* i_pSetupData, - vcl::PrinterController& i_rListener ); - - virtual BOOL EndJob(); - virtual BOOL AbortJob(); - virtual SalGraphics* StartPage( ImplJobSetup* i_pSetupData, BOOL i_bNewJobData ); - virtual BOOL EndPage(); - virtual ULONG GetErrorCode(); - - private: - AquaSalPrinter( const AquaSalPrinter& ); - AquaSalPrinter& operator=(const AquaSalPrinter&); -}; - -const double fPtTo100thMM = 35.27777778; - -inline int PtTo10Mu( double nPoints ) { return (int)(((nPoints)*fPtTo100thMM)+0.5); } - -inline double TenMuToPt( double nUnits ) { return floor(((nUnits)/fPtTo100thMM)+0.5); } - - - -#endif // _SV_SALPRN_H diff --git a/vcl/aqua/inc/salsys.h b/vcl/aqua/inc/salsys.h deleted file mode 100644 index ae20706a1756..000000000000 --- a/vcl/aqua/inc/salsys.h +++ /dev/null @@ -1,65 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SALSYS_H -#define _SV_SALSYS_H - -#include "vcl/sv.h" -#include "vcl/salsys.hxx" - -#include - -// ----------------- -// - SalSystemData - -// ----------------- - -//struct SalSystemData -//{ -//}; - -class VCL_DLLPUBLIC AquaSalSystem : public SalSystem -{ -public: - AquaSalSystem() {} - virtual ~AquaSalSystem(); - - // get info about the display - virtual unsigned int GetDisplayScreenCount(); - virtual bool IsMultiDisplay(); - virtual unsigned int GetDefaultDisplayNumber(); - virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ); - virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen ); - - virtual rtl::OUString GetScreenName( unsigned int nScreen ); - virtual int ShowNativeMessageBox( const String& rTitle, - const String& rMessage, - int nButtonCombination, - int nDefaultButton); -}; - - -#endif // _SV_SALSYS_H diff --git a/vcl/aqua/inc/saltimer.h b/vcl/aqua/inc/saltimer.h deleted file mode 100644 index 374b9c5a45c5..000000000000 --- a/vcl/aqua/inc/saltimer.h +++ /dev/null @@ -1,54 +0,0 @@ -/************************************************************************* -* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * -************************************************************************/ - -#ifndef _SV_SALTIMER_H -#define _SV_SALTIMER_H - -#include "premac.h" -#include -#include "postmac.h" - -#include "vcl/saltimer.hxx" - -class AquaSalTimer : public SalTimer -{ - public: - - AquaSalTimer(); - virtual ~AquaSalTimer(); - - void Start( ULONG nMS ); - void Stop(); - - static void handleStartTimerEvent( NSEvent* pEvent ); - - - static NSTimer* pRunningTimer; - static bool bDispatchTimer; -}; - -#endif diff --git a/vcl/aqua/inc/salvd.h b/vcl/aqua/inc/salvd.h deleted file mode 100644 index 865cb7b5b766..000000000000 --- a/vcl/aqua/inc/salvd.h +++ /dev/null @@ -1,94 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SALVD_H -#define _SV_SALVD_H - -#include "premac.h" -#include -#include "postmac.h" - -#include "vcl/sv.h" -#include "vcl/salgdi.hxx" -#include "salconst.h" -#include "salcolorutils.hxx" -#include "vcl/salvd.hxx" -#include "salgdi.h" - -#if PRAGMA_ONCE - #pragma once -#endif - -// ======================================================================= - -// ======================================================================= - -// ----------------- -// - SalVirDevData - -// ----------------- - -struct SalVirDevData -{ -}; - -typedef struct SalVirDevData SalVirDevData; -typedef SalVirDevData *SalVirDevDataPtr; -typedef SalVirDevDataPtr *SalVirDevDataHandle; - -// ======================================================================= - -class AquaSalGraphics; - -// ----------------- -// - SalVirDevData - -// ----------------- - -class AquaSalVirtualDevice : public SalVirtualDevice -{ -private: - bool mbGraphicsUsed; // is Graphics used - bool mbForeignContext; // is mxContext from outside VCL - CGContextRef mxBitmapContext; - int mnBitmapDepth; - CGLayerRef mxLayer; // Quartz layer - AquaSalGraphics* mpGraphics; // current VirDev graphics - - void Destroy(); - -public: - AquaSalVirtualDevice( AquaSalGraphics* pGraphic, long nDX, long nDY, USHORT nBitCount, const SystemGraphicsData *pData ); - virtual ~AquaSalVirtualDevice(); - - virtual SalGraphics* GetGraphics(); - virtual void ReleaseGraphics( SalGraphics* pGraphics ); - virtual BOOL SetSize( long nNewDX, long nNewDY ); - virtual void GetSize( long& rWidth, long& rHeight ); -}; - -// ======================================================================= - -#endif // _SV_SALVD_H diff --git a/vcl/aqua/inc/svsys.h b/vcl/aqua/inc/svsys.h deleted file mode 100644 index 1edce25cea28..000000000000 --- a/vcl/aqua/inc/svsys.h +++ /dev/null @@ -1,35 +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 _SV_SVSYS_H -#define _SV_SVSYS_H - -#include "premac.h" -#include "Cocoa/Cocoa.h" -#include "postmac.h" - -#endif // _SV_SVSYS_H diff --git a/vcl/aqua/inc/vclnsapp.h b/vcl/aqua/inc/vclnsapp.h deleted file mode 100755 index 59b070b421ea..000000000000 --- a/vcl/aqua/inc/vclnsapp.h +++ /dev/null @@ -1,70 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _VCL_VCLNSAPP_H -#define _VCL_VCLNSAPP_H - -#include "premac.h" -#include "Cocoa/Cocoa.h" -#include "postmac.h" - -class AquaSalFrame; - -@interface CocoaThreadEnabler : NSObject -{ -} --(void)enableCocoaThreads:(id)param; -@end - -// our very own application -@interface VCL_NSApplication : NSApplication -{ -} --(void)sendEvent:(NSEvent*)pEvent; --(void)sendSuperEvent:(NSEvent*)pEvent; --(NSMenu*)applicationDockMenu:(NSApplication *)sender; --(MacOSBOOL)application: (NSApplication*) app openFile: (NSString*)file; --(void)application: (NSApplication*) app openFiles: (NSArray*)files; --(MacOSBOOL)application: (NSApplication*) app printFile: (NSString*)file; --(NSApplicationPrintReply)application: (NSApplication *) app printFiles:(NSArray *)files withSettings: (NSDictionary *)printSettings showPrintPanels:(MacOSBOOL)bShowPrintPanels; --(NSApplicationTerminateReply)applicationShouldTerminate: (NSApplication *) app; --(void)systemColorsChanged: (NSNotification*) pNotification; --(void)screenParametersChanged: (NSNotification*) pNotification; --(void)scrollbarVariantChanged: (NSNotification*) pNotification; --(void)scrollbarSettingsChanged: (NSNotification*) pNotification; --(void)addFallbackMenuItem: (NSMenuItem*)pNewItem; --(void)removeFallbackMenuItem: (NSMenuItem*)pOldItem; --(void)addDockMenuItem: (NSMenuItem*)pNewItem; --(void)applicationWillBecomeActive: (NSNotification *)pNotification; --(void)applicationWillResignActive: (NSNotification *)pNotification; --(MacOSBOOL)applicationShouldHandleReopen: (NSApplication*)pApp hasVisibleWindows: (MacOSBOOL)bWinVisible; --(void)setDockIconClickHandler: (NSObject*)pHandler; --(void)cycleFrameForward: (AquaSalFrame*)pCurFrame; --(void)cycleFrameBackward: (AquaSalFrame*)pCurFrame; -@end - -#endif diff --git a/vcl/aqua/source/a11y/aqua11yactionwrapper.h b/vcl/aqua/source/a11y/aqua11yactionwrapper.h index 3a7f13f8a545..94388a98e3c3 100644 --- a/vcl/aqua/source/a11y/aqua11yactionwrapper.h +++ b/vcl/aqua/source/a11y/aqua11yactionwrapper.h @@ -28,8 +28,8 @@ #ifndef _SV_AQUA11ACTIONWRAPPER_H #define _SV_AQUA11ACTIONWRAPPER_H -#include "aquavcltypes.h" -#include "aqua11ywrapper.h" +#include "aqua/aquavcltypes.h" +#include "aqua/aqua11ywrapper.h" @interface AquaA11yActionWrapper : NSObject { diff --git a/vcl/aqua/source/a11y/aqua11yactionwrapper.mm b/vcl/aqua/source/a11y/aqua11yactionwrapper.mm index fcd49fd67ff4..e49ad251faad 100644 --- a/vcl/aqua/source/a11y/aqua11yactionwrapper.mm +++ b/vcl/aqua/source/a11y/aqua11yactionwrapper.mm @@ -28,7 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" +#include "aqua/salinst.h" + #include "aqua11yactionwrapper.h" // Wrapper for XAccessibleAction diff --git a/vcl/aqua/source/a11y/aqua11ycomponentwrapper.h b/vcl/aqua/source/a11y/aqua11ycomponentwrapper.h index c1806054e253..cdb85445e0d7 100644 --- a/vcl/aqua/source/a11y/aqua11ycomponentwrapper.h +++ b/vcl/aqua/source/a11y/aqua11ycomponentwrapper.h @@ -28,8 +28,8 @@ #ifndef _SV_AQUA11COMPONENTWRAPPER_H #define _SV_AQUA11COMPONENTWRAPPER_H -#include "aquavcltypes.h" -#include "aqua11ywrapper.h" +#include "aqua/aquavcltypes.h" +#include "aqua/aqua11ywrapper.h" @interface AquaA11yComponentWrapper : NSObject { diff --git a/vcl/aqua/source/a11y/aqua11yfactory.mm b/vcl/aqua/source/a11y/aqua11yfactory.mm index 7732ce202cd2..7436403131c7 100644 --- a/vcl/aqua/source/a11y/aqua11yfactory.mm +++ b/vcl/aqua/source/a11y/aqua11yfactory.mm @@ -28,10 +28,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" -#include "aqua11yfactory.h" +#include "aqua/salinst.h" +#include "aqua/aqua11yfactory.h" +#include "aqua/aqua11yfocustracker.hxx" + #include "aqua11yfocuslistener.hxx" -#include "aqua11yfocustracker.hxx" #include "aqua11yrolehelper.h" #include "aqua11ywrapperbutton.h" #include "aqua11ywrapperstatictext.h" @@ -49,6 +50,7 @@ #include "aqua11ywrappertabgroup.h" #include "aqua11ywrappertoolbar.h" #include "aqua11ytablewrapper.h" + #include using namespace ::com::sun::star::accessibility; diff --git a/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx b/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx index 9ac9401abd62..1a7c72eac9ec 100644 --- a/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx +++ b/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx @@ -28,12 +28,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "aqua11yfocuslistener.hxx" -#include "aqua11yfocustracker.hxx" -#include "aqua11yfactory.h" - #include +#include "aqua/aqua11yfocustracker.hxx" +#include "aqua/aqua11yfactory.h" + +#include "aqua11yfocuslistener.hxx" + using namespace ::com::sun::star::accessibility; using namespace ::com::sun::star::uno; diff --git a/vcl/aqua/source/a11y/aqua11yfocuslistener.hxx b/vcl/aqua/source/a11y/aqua11yfocuslistener.hxx index 1fdd340c698e..db114be14771 100644 --- a/vcl/aqua/source/a11y/aqua11yfocuslistener.hxx +++ b/vcl/aqua/source/a11y/aqua11yfocuslistener.hxx @@ -30,8 +30,8 @@ #include -#include "keyboardfocuslistener.hxx" -#include "aquavcltypes.h" +#include "aqua/keyboardfocuslistener.hxx" +#include "aqua/aquavcltypes.h" // #include diff --git a/vcl/aqua/source/a11y/aqua11yfocustracker.cxx b/vcl/aqua/source/a11y/aqua11yfocustracker.cxx index 2a8ebb39bd80..c901eea915a6 100644 --- a/vcl/aqua/source/a11y/aqua11yfocustracker.cxx +++ b/vcl/aqua/source/a11y/aqua11yfocustracker.cxx @@ -28,7 +28,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "aqua11yfocustracker.hxx" +#include "vcl/svapp.hxx" +#include "vcl/window.hxx" +#include "vcl/toolbox.hxx" +#include "vcl/menu.hxx" + +#include "aqua/aqua11yfocustracker.hxx" + #include "documentfocuslistener.hxx" #include @@ -37,11 +43,6 @@ #include #include -#include "vcl/svapp.hxx" -#include "vcl/window.hxx" -#include "vcl/toolbox.hxx" -#include "vcl/menu.hxx" - using namespace ::com::sun::star::accessibility; using namespace ::com::sun::star::uno; diff --git a/vcl/aqua/source/a11y/aqua11ylistener.cxx b/vcl/aqua/source/a11y/aqua11ylistener.cxx index 7f680f43b3a6..4ce39da6c2bf 100644 --- a/vcl/aqua/source/a11y/aqua11ylistener.cxx +++ b/vcl/aqua/source/a11y/aqua11ylistener.cxx @@ -25,12 +25,13 @@ * ************************************************************************/ -#include "aqua11ylistener.hxx" -#include "aqua11yfactory.h" -#include "aqua11yfocustracker.hxx" +#include "aqua/salinst.h" +#include "aqua/aqua11ylistener.hxx" +#include "aqua/aqua11yfactory.h" +#include "aqua/aqua11yfocustracker.hxx" +#include "aqua/aqua11ywrapper.h" + #include "aqua11ytextwrapper.h" -#include "aqua11ywrapper.h" -#include "salinst.h" #include #include diff --git a/vcl/aqua/source/a11y/aqua11yrolehelper.h b/vcl/aqua/source/a11y/aqua11yrolehelper.h index f847eb3f41c3..c15c39903432 100644 --- a/vcl/aqua/source/a11y/aqua11yrolehelper.h +++ b/vcl/aqua/source/a11y/aqua11yrolehelper.h @@ -28,7 +28,7 @@ #ifndef _SV_AQUA11ROLEHELPER_H #define _SV_AQUA11ROLEHELPER_H -#include "salinst.h" +#include "aqua/salinst.h" #include @interface AquaA11yRoleHelper : NSObject diff --git a/vcl/aqua/source/a11y/aqua11yrolehelper.mm b/vcl/aqua/source/a11y/aqua11yrolehelper.mm index b8ebdb08c3df..cfc052e96beb 100644 --- a/vcl/aqua/source/a11y/aqua11yrolehelper.mm +++ b/vcl/aqua/source/a11y/aqua11yrolehelper.mm @@ -28,8 +28,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" +#include "aqua/aqua11yfactory.h" + #include "aqua11yrolehelper.h" -#include "aqua11yfactory.h" + #include #include diff --git a/vcl/aqua/source/a11y/aqua11yselectionwrapper.h b/vcl/aqua/source/a11y/aqua11yselectionwrapper.h index a88e6c71c04b..9be55e83ad86 100644 --- a/vcl/aqua/source/a11y/aqua11yselectionwrapper.h +++ b/vcl/aqua/source/a11y/aqua11yselectionwrapper.h @@ -28,8 +28,8 @@ #ifndef _SV_AQUA11SELECTIONWRAPPER_H #define _SV_AQUA11SELECTIONWRAPPER_H -#include "aquavcltypes.h" -#include "aqua11ywrapper.h" +#include "aqua/aquavcltypes.h" +#include "aqua/aqua11ywrapper.h" @interface AquaA11ySelectionWrapper : NSObject { diff --git a/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm b/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm index 804cf108dba8..5ba013b67380 100644 --- a/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm +++ b/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm @@ -28,8 +28,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" -#include "aqua11yfactory.h" +#include "aqua/salinst.h" +#include "aqua/aqua11yfactory.h" + #include "aqua11yselectionwrapper.h" using namespace ::com::sun::star::accessibility; diff --git a/vcl/aqua/source/a11y/aqua11ytablewrapper.h b/vcl/aqua/source/a11y/aqua11ytablewrapper.h index 7bf3e44a2945..ed70ed219b6e 100644 --- a/vcl/aqua/source/a11y/aqua11ytablewrapper.h +++ b/vcl/aqua/source/a11y/aqua11ytablewrapper.h @@ -28,7 +28,7 @@ #ifndef _SV_AQUA11TABLEWRAPPER_H #define _SV_AQUA11TABLEWRAPPER_H -#include "aqua11ywrapper.h" +#include "aqua/aqua11ywrapper.h" #define MAXIMUM_ACCESSIBLE_TABLE_CELLS 1000 diff --git a/vcl/aqua/source/a11y/aqua11ytablewrapper.mm b/vcl/aqua/source/a11y/aqua11ytablewrapper.mm index 98454ab8d57b..110cb42ffee7 100644 --- a/vcl/aqua/source/a11y/aqua11ytablewrapper.mm +++ b/vcl/aqua/source/a11y/aqua11ytablewrapper.mm @@ -28,8 +28,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" +#include "aqua/aqua11yfactory.h" + #include "aqua11ytablewrapper.h" -#include "aqua11yfactory.h" using namespace ::com::sun::star::accessibility; using namespace ::com::sun::star::awt; diff --git a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.h b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.h index fcf185ca5478..0aa271a7f1e2 100644 --- a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.h +++ b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.h @@ -28,8 +28,7 @@ #ifndef _SV_AQUA11TEXTATTRIBUTESWRAPPER_H #define _SV_AQUA11TEXTATTRIBUTESWRAPPER_H -#include -#include "aqua11ywrapper.h" +#include "aqua/aqua11ywrapper.h" @interface AquaA11yTextAttributesWrapper : NSObject { diff --git a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm index 6577cebf295e..aa938d88c8fb 100644 --- a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm +++ b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm @@ -28,8 +28,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" +#include "aqua/salinst.h" + #include "aqua11ytextattributeswrapper.h" -#include "salinst.h" + #include #include #include diff --git a/vcl/aqua/source/a11y/aqua11ytextwrapper.h b/vcl/aqua/source/a11y/aqua11ytextwrapper.h index dfdab349bafe..c872ebc097ce 100644 --- a/vcl/aqua/source/a11y/aqua11ytextwrapper.h +++ b/vcl/aqua/source/a11y/aqua11ytextwrapper.h @@ -28,8 +28,8 @@ #ifndef _SV_AQUA11TEXTWRAPPER_H #define _SV_AQUA11TEXTWRAPPER_H -#include "aquavcltypes.h" -#include "aqua11ywrapper.h" +#include "aqua/aquavcltypes.h" +#include "aqua/aqua11ywrapper.h" @interface AquaA11yTextWrapper : NSObject { diff --git a/vcl/aqua/source/a11y/aqua11ytextwrapper.mm b/vcl/aqua/source/a11y/aqua11ytextwrapper.mm index 2033135564d8..6b6e6aac004d 100644 --- a/vcl/aqua/source/a11y/aqua11ytextwrapper.mm +++ b/vcl/aqua/source/a11y/aqua11ytextwrapper.mm @@ -28,10 +28,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" +#include "aqua/salinst.h" + #include "aqua11ytextwrapper.h" #include "aqua11ytextattributeswrapper.h" #include "aqua11yutil.h" + #include #include diff --git a/vcl/aqua/source/a11y/aqua11yutil.mm b/vcl/aqua/source/a11y/aqua11yutil.mm index 4749a3b40822..74de0a19aa41 100644 --- a/vcl/aqua/source/a11y/aqua11yutil.mm +++ b/vcl/aqua/source/a11y/aqua11yutil.mm @@ -28,7 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "aquavcltypes.h" +#include "aqua/aquavcltypes.h" + #include "aqua11yutil.h" using namespace ::com::sun::star::awt; diff --git a/vcl/aqua/source/a11y/aqua11yvaluewrapper.h b/vcl/aqua/source/a11y/aqua11yvaluewrapper.h index d3afebf7f828..e65d3c4e4917 100644 --- a/vcl/aqua/source/a11y/aqua11yvaluewrapper.h +++ b/vcl/aqua/source/a11y/aqua11yvaluewrapper.h @@ -28,9 +28,9 @@ #ifndef _SV_AQUA11VALUEWRAPPER_H #define _SV_AQUA11VALUEWRAPPER_H -#include "salinst.h" -#include "aquavcltypes.h" -#include "aqua11ywrapper.h" +#include "aqua/salinst.h" +#include "aqua/aquavcltypes.h" +#include "aqua/aqua11ywrapper.h" @interface AquaA11yValueWrapper : NSObject { diff --git a/vcl/aqua/source/a11y/aqua11ywrapper.mm b/vcl/aqua/source/a11y/aqua11ywrapper.mm index e86676e725f2..1f6f2d53cf81 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapper.mm +++ b/vcl/aqua/source/a11y/aqua11ywrapper.mm @@ -28,20 +28,21 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" -#include "saldata.hxx" +#include "aqua/salinst.h" +#include "aqua/saldata.hxx" -#include "aqua11ywrapper.h" +#include "aqua/aqua11ywrapper.h" +#include "aqua/aqua11ylistener.hxx" +#include "aqua/aqua11yfactory.h" +#include "aqua/aqua11yfocustracker.hxx" + +#include "aqua11yfocuslistener.hxx" #include "aqua11yactionwrapper.h" #include "aqua11ycomponentwrapper.h" -#include "aqua11ylistener.hxx" #include "aqua11yselectionwrapper.h" #include "aqua11ytablewrapper.h" #include "aqua11ytextwrapper.h" #include "aqua11yvaluewrapper.h" -#include "aqua11yfactory.h" -#include "aqua11yfocuslistener.hxx" -#include "aqua11yfocustracker.hxx" #include "aqua11yrolehelper.h" #include diff --git a/vcl/aqua/source/a11y/aqua11ywrapperbutton.h b/vcl/aqua/source/a11y/aqua11ywrapperbutton.h index aa35062d15c4..78c54e2c35ea 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapperbutton.h +++ b/vcl/aqua/source/a11y/aqua11ywrapperbutton.h @@ -28,7 +28,7 @@ #ifndef _SV_AQUA11WRAPPERBUTTON_H #define _SV_AQUA11WRAPPERBUTTON_H -#include "aqua11ywrapper.h" +#include "aqua/aqua11ywrapper.h" @interface AquaA11yWrapperButton : AquaA11yWrapper { diff --git a/vcl/aqua/source/a11y/aqua11ywrapperbutton.mm b/vcl/aqua/source/a11y/aqua11ywrapperbutton.mm index 48f1804c58a2..e51ceff14af9 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapperbutton.mm +++ b/vcl/aqua/source/a11y/aqua11ywrapperbutton.mm @@ -28,7 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" +#include "aqua/salinst.h" + #include "aqua11ywrapperbutton.h" #include "aqua11ytextwrapper.h" diff --git a/vcl/aqua/source/a11y/aqua11ywrappercheckbox.h b/vcl/aqua/source/a11y/aqua11ywrappercheckbox.h index 95fee9a3ec4b..09f311755d57 100644 --- a/vcl/aqua/source/a11y/aqua11ywrappercheckbox.h +++ b/vcl/aqua/source/a11y/aqua11ywrappercheckbox.h @@ -28,7 +28,7 @@ #ifndef _SV_AQUA11WRAPPERCHECKBOX_H #define _SV_AQUA11WRAPPERCHECKBOX_H -#include "aqua11ywrapper.h" +#include "aqua/aqua11ywrapper.h" @interface AquaA11yWrapperCheckBox : AquaA11yWrapper { diff --git a/vcl/aqua/source/a11y/aqua11ywrappercheckbox.mm b/vcl/aqua/source/a11y/aqua11ywrappercheckbox.mm index c4ac34dc5bce..395dbb19682d 100644 --- a/vcl/aqua/source/a11y/aqua11ywrappercheckbox.mm +++ b/vcl/aqua/source/a11y/aqua11ywrappercheckbox.mm @@ -28,7 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" +#include "aqua/salinst.h" + #include "aqua11ywrappercheckbox.h" #include "aqua11yvaluewrapper.h" #include "aqua11ytextwrapper.h" diff --git a/vcl/aqua/source/a11y/aqua11ywrappercombobox.h b/vcl/aqua/source/a11y/aqua11ywrappercombobox.h index 7ed76d607176..6ad6b0e71514 100644 --- a/vcl/aqua/source/a11y/aqua11ywrappercombobox.h +++ b/vcl/aqua/source/a11y/aqua11ywrappercombobox.h @@ -28,7 +28,7 @@ #ifndef _SV_AQUA11WRAPPERCOMBOBOX_H #define _SV_AQUA11WRAPPERCOMBOBOX_H -#include "aqua11ywrapper.h" +#include "aqua/aqua11ywrapper.h" #include @interface AquaA11yWrapperComboBox : AquaA11yWrapper diff --git a/vcl/aqua/source/a11y/aqua11ywrappercombobox.mm b/vcl/aqua/source/a11y/aqua11ywrappercombobox.mm index 85aed320e470..d981f813beae 100644 --- a/vcl/aqua/source/a11y/aqua11ywrappercombobox.mm +++ b/vcl/aqua/source/a11y/aqua11ywrappercombobox.mm @@ -28,9 +28,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" +#include "aqua/salinst.h" + #include "aqua11ywrappercombobox.h" #include "aqua11yrolehelper.h" + #include using namespace ::com::sun::star::accessibility; diff --git a/vcl/aqua/source/a11y/aqua11ywrappergroup.h b/vcl/aqua/source/a11y/aqua11ywrappergroup.h index 7757e067ee22..bdbfb6e6b264 100644 --- a/vcl/aqua/source/a11y/aqua11ywrappergroup.h +++ b/vcl/aqua/source/a11y/aqua11ywrappergroup.h @@ -28,7 +28,7 @@ #ifndef _SV_AQUA11WRAPPERGROUP_H #define _SV_AQUA11WRAPPERGROUP_H -#include "aqua11ywrapper.h" +#include "aqua/aqua11ywrapper.h" @interface AquaA11yWrapperGroup : AquaA11yWrapper { diff --git a/vcl/aqua/source/a11y/aqua11ywrappergroup.mm b/vcl/aqua/source/a11y/aqua11ywrappergroup.mm index 42298f9c745b..536cc9bba8eb 100644 --- a/vcl/aqua/source/a11y/aqua11ywrappergroup.mm +++ b/vcl/aqua/source/a11y/aqua11ywrappergroup.mm @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" +#include "aqua/salinst.h" #include "aqua11ywrappergroup.h" // Wrapper for AXGroup role diff --git a/vcl/aqua/source/a11y/aqua11ywrapperlist.h b/vcl/aqua/source/a11y/aqua11ywrapperlist.h index 95df8323467b..db9bf7511af6 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapperlist.h +++ b/vcl/aqua/source/a11y/aqua11ywrapperlist.h @@ -28,7 +28,7 @@ #ifndef _SV_AQUA11WRAPPERLIST_H #define _SV_AQUA11WRAPPERLIST_H -#include "aqua11ywrapper.h" +#include "aqua/aqua11ywrapper.h" @interface AquaA11yWrapperList : AquaA11yWrapper { diff --git a/vcl/aqua/source/a11y/aqua11ywrapperlist.mm b/vcl/aqua/source/a11y/aqua11ywrapperlist.mm index eeb210d70e65..d70679ed6966 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapperlist.mm +++ b/vcl/aqua/source/a11y/aqua11ywrapperlist.mm @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" +#include "aqua/salinst.h" #include "aqua11ywrapperlist.h" using namespace ::com::sun::star::accessibility; diff --git a/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.h b/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.h index 13ceee6f826f..9969f46e398b 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.h +++ b/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.h @@ -28,7 +28,7 @@ #ifndef _SV_AQUA11WRAPPERRADIOBUTTON_H #define _SV_AQUA11WRAPPERRADIOBUTTON_H -#include "aqua11ywrapper.h" +#include "aqua/aqua11ywrapper.h" @interface AquaA11yWrapperRadioButton : AquaA11yWrapper { diff --git a/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.mm b/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.mm index 54d6edac619a..e87470317934 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.mm +++ b/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.mm @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" +#include "aqua/salinst.h" #include "aqua11ywrapperradiobutton.h" #include "aqua11ytextwrapper.h" #include "aqua11yvaluewrapper.h" diff --git a/vcl/aqua/source/a11y/aqua11ywrapperradiogroup.h b/vcl/aqua/source/a11y/aqua11ywrapperradiogroup.h index 544b709223b3..4c138372e27e 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapperradiogroup.h +++ b/vcl/aqua/source/a11y/aqua11ywrapperradiogroup.h @@ -28,7 +28,7 @@ #ifndef _SV_AQUA11WRAPPERRADIOGROUP_H #define _SV_AQUA11WRAPPERRADIOGROUP_H -#include "aqua11ywrapper.h" +#include "aqua/aqua11ywrapper.h" @interface AquaA11yWrapperRadioGroup : AquaA11yWrapper { diff --git a/vcl/aqua/source/a11y/aqua11ywrapperradiogroup.mm b/vcl/aqua/source/a11y/aqua11ywrapperradiogroup.mm index f89ac78b044c..52e71620ceed 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapperradiogroup.mm +++ b/vcl/aqua/source/a11y/aqua11ywrapperradiogroup.mm @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" +#include "aqua/salinst.h" #include "aqua11ywrapperradiogroup.h" #include "aqua11ytextwrapper.h" diff --git a/vcl/aqua/source/a11y/aqua11ywrapperrow.h b/vcl/aqua/source/a11y/aqua11ywrapperrow.h index 252af6f5987f..deaa4f07248f 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapperrow.h +++ b/vcl/aqua/source/a11y/aqua11ywrapperrow.h @@ -28,7 +28,7 @@ #ifndef _SV_AQUA11WRAPPERROW_H #define _SV_AQUA11WRAPPERROW_H -#include "aqua11ywrapper.h" +#include "aqua/aqua11ywrapper.h" @interface AquaA11yWrapperRow : AquaA11yWrapper { diff --git a/vcl/aqua/source/a11y/aqua11ywrapperrow.mm b/vcl/aqua/source/a11y/aqua11ywrapperrow.mm index d49e229218bf..0fd65fd01365 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapperrow.mm +++ b/vcl/aqua/source/a11y/aqua11ywrapperrow.mm @@ -28,7 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" +#include "aqua/salinst.h" + #include "aqua11ywrapperrow.h" #include "aqua11ytextwrapper.h" diff --git a/vcl/aqua/source/a11y/aqua11ywrapperscrollarea.h b/vcl/aqua/source/a11y/aqua11ywrapperscrollarea.h index 2c206fd0904b..e1e37a45d36e 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapperscrollarea.h +++ b/vcl/aqua/source/a11y/aqua11ywrapperscrollarea.h @@ -28,7 +28,7 @@ #ifndef _SV_AQUA11WRAPPERSCROLLAREA_H #define _SV_AQUA11WRAPPERSCROLLAREA_H -#include "aqua11ywrapper.h" +#include "aqua/aqua11ywrapper.h" @interface AquaA11yWrapperScrollArea : AquaA11yWrapper { diff --git a/vcl/aqua/source/a11y/aqua11ywrapperscrollarea.mm b/vcl/aqua/source/a11y/aqua11ywrapperscrollarea.mm index f375e5ce788d..8a481b64926d 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapperscrollarea.mm +++ b/vcl/aqua/source/a11y/aqua11ywrapperscrollarea.mm @@ -28,7 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" +#include "aqua/salinst.h" + #include "aqua11ywrapperscrollarea.h" #include "aqua11ywrapperscrollbar.h" #include "aqua11yrolehelper.h" diff --git a/vcl/aqua/source/a11y/aqua11ywrapperscrollbar.h b/vcl/aqua/source/a11y/aqua11ywrapperscrollbar.h index 1070c682cd5e..df57418803fa 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapperscrollbar.h +++ b/vcl/aqua/source/a11y/aqua11ywrapperscrollbar.h @@ -28,7 +28,7 @@ #ifndef _SV_AQUA11WRAPPERSCROLLBAR_H #define _SV_AQUA11WRAPPERSCROLLBAR_H -#include "aqua11ywrapper.h" +#include "aqua/aqua11ywrapper.h" @interface AquaA11yWrapperScrollBar : AquaA11yWrapper { diff --git a/vcl/aqua/source/a11y/aqua11ywrapperscrollbar.mm b/vcl/aqua/source/a11y/aqua11ywrapperscrollbar.mm index 826da647055b..42b67b739602 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapperscrollbar.mm +++ b/vcl/aqua/source/a11y/aqua11ywrapperscrollbar.mm @@ -28,8 +28,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" +#include "aqua/salinst.h" + #include "aqua11ywrapperscrollbar.h" + #include using namespace ::com::sun::star::accessibility; diff --git a/vcl/aqua/source/a11y/aqua11ywrappersplitter.h b/vcl/aqua/source/a11y/aqua11ywrappersplitter.h index 084a72ea7a18..a114e6fb7a74 100644 --- a/vcl/aqua/source/a11y/aqua11ywrappersplitter.h +++ b/vcl/aqua/source/a11y/aqua11ywrappersplitter.h @@ -28,7 +28,7 @@ #ifndef _SV_AQUA11WRAPPERSPLITTER_H #define _SV_AQUA11WRAPPERSPLITTER_H -#include "aqua11ywrapper.h" +#include "aqua/aqua11ywrapper.h" @interface AquaA11yWrapperSplitter : AquaA11yWrapper { diff --git a/vcl/aqua/source/a11y/aqua11ywrappersplitter.mm b/vcl/aqua/source/a11y/aqua11ywrappersplitter.mm index 4dc645c006c8..37821f25e423 100644 --- a/vcl/aqua/source/a11y/aqua11ywrappersplitter.mm +++ b/vcl/aqua/source/a11y/aqua11ywrappersplitter.mm @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" +#include "aqua/salinst.h" #include "aqua11ywrappersplitter.h" using namespace ::com::sun::star::accessibility; diff --git a/vcl/aqua/source/a11y/aqua11ywrapperstatictext.h b/vcl/aqua/source/a11y/aqua11ywrapperstatictext.h index c21e5573d125..aef2957557d4 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapperstatictext.h +++ b/vcl/aqua/source/a11y/aqua11ywrapperstatictext.h @@ -28,7 +28,7 @@ #ifndef _SV_AQUA11WRAPPERSTATICTEXT_H #define _SV_AQUA11WRAPPERSTATICTEXT_H -#include "aqua11ywrapper.h" +#include "aqua/aqua11ywrapper.h" @interface AquaA11yWrapperStaticText : AquaA11yWrapper { diff --git a/vcl/aqua/source/a11y/aqua11ywrapperstatictext.mm b/vcl/aqua/source/a11y/aqua11ywrapperstatictext.mm index 7192e64b2e7c..d5afe0962904 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapperstatictext.mm +++ b/vcl/aqua/source/a11y/aqua11ywrapperstatictext.mm @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" +#include "aqua/salinst.h" #include "aqua11ywrapperstatictext.h" // Wrapper for AXStaticText role diff --git a/vcl/aqua/source/a11y/aqua11ywrappertabgroup.h b/vcl/aqua/source/a11y/aqua11ywrappertabgroup.h index be72b9e27396..7fda77789015 100644 --- a/vcl/aqua/source/a11y/aqua11ywrappertabgroup.h +++ b/vcl/aqua/source/a11y/aqua11ywrappertabgroup.h @@ -28,7 +28,7 @@ #ifndef _SV_AQUA11WRAPPERTABGROUP_H #define _SV_AQUA11WRAPPERTABGROUP_H -#include "aqua11ywrapper.h" +#include "aqua/aqua11ywrapper.h" @interface AquaA11yWrapperTabGroup : AquaA11yWrapper { diff --git a/vcl/aqua/source/a11y/aqua11ywrappertabgroup.mm b/vcl/aqua/source/a11y/aqua11ywrappertabgroup.mm index 708ae5440c4f..fb4e66ad9b90 100644 --- a/vcl/aqua/source/a11y/aqua11ywrappertabgroup.mm +++ b/vcl/aqua/source/a11y/aqua11ywrappertabgroup.mm @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" +#include "aqua/salinst.h" #include "aqua11ywrappertabgroup.h" // Wrapper for AXTabGroup role diff --git a/vcl/aqua/source/a11y/aqua11ywrappertextarea.h b/vcl/aqua/source/a11y/aqua11ywrappertextarea.h index 724f85994053..e47795d976b3 100644 --- a/vcl/aqua/source/a11y/aqua11ywrappertextarea.h +++ b/vcl/aqua/source/a11y/aqua11ywrappertextarea.h @@ -28,7 +28,7 @@ #ifndef _SV_AQUA11WRAPPERTEXTAREA_H #define _SV_AQUA11WRAPPERTEXTAREA_H -#include "aqua11ywrapper.h" +#include "aqua/aqua11ywrapper.h" @interface AquaA11yWrapperTextArea : AquaA11yWrapper { diff --git a/vcl/aqua/source/a11y/aqua11ywrappertextarea.mm b/vcl/aqua/source/a11y/aqua11ywrappertextarea.mm index 9a425eb2b893..a90fe7ae28aa 100644 --- a/vcl/aqua/source/a11y/aqua11ywrappertextarea.mm +++ b/vcl/aqua/source/a11y/aqua11ywrappertextarea.mm @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" +#include "aqua/salinst.h" #include "aqua11ywrappertextarea.h" // Wrapper for AXTextArea role diff --git a/vcl/aqua/source/a11y/aqua11ywrappertoolbar.h b/vcl/aqua/source/a11y/aqua11ywrappertoolbar.h index e7ac0a25acec..4ab947484cc4 100644 --- a/vcl/aqua/source/a11y/aqua11ywrappertoolbar.h +++ b/vcl/aqua/source/a11y/aqua11ywrappertoolbar.h @@ -28,7 +28,7 @@ #ifndef _SV_AQUA11WRAPPERTOOLBAR_H #define _SV_AQUA11WRAPPERTOOLBAR_H -#include "aqua11ywrapper.h" +#include "aqua/aqua11ywrapper.h" @interface AquaA11yWrapperToolbar : AquaA11yWrapper { diff --git a/vcl/aqua/source/a11y/aqua11ywrappertoolbar.mm b/vcl/aqua/source/a11y/aqua11ywrappertoolbar.mm index 28990355af55..29ddaf540266 100644 --- a/vcl/aqua/source/a11y/aqua11ywrappertoolbar.mm +++ b/vcl/aqua/source/a11y/aqua11ywrappertoolbar.mm @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" +#include "aqua/salinst.h" #include "aqua11ywrappertoolbar.h" // Wrapper for AXToolbar role diff --git a/vcl/aqua/source/a11y/documentfocuslistener.hxx b/vcl/aqua/source/a11y/documentfocuslistener.hxx index 863bc59d173f..3f02d3fc0ada 100644 --- a/vcl/aqua/source/a11y/documentfocuslistener.hxx +++ b/vcl/aqua/source/a11y/documentfocuslistener.hxx @@ -28,15 +28,12 @@ #ifndef _DOCUMENTFOCUSLISTENER_HXX_ #define _DOCUMENTFOCUSLISTENER_HXX_ -#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEEVENTLISTENER_HPP_ #include -#endif -#ifndef _CPPUHELPER_IMPLBASE1_HXX_ #include -#endif -#include "aqua11yfocustracker.hxx" +#include "aqua/aqua11yfocustracker.hxx" + #include // ------------------------- diff --git a/vcl/aqua/source/app/saldata.cxx b/vcl/aqua/source/app/saldata.cxx index 3cb878636ad3..7b8174e16703 100644 --- a/vcl/aqua/source/app/saldata.cxx +++ b/vcl/aqua/source/app/saldata.cxx @@ -28,9 +28,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "saldata.hxx" -#include "salnsmenu.h" -#include "salinst.h" +#include "aqua/saldata.hxx" +#include "aqua/salnsmenu.h" +#include "aqua/salinst.h" + #import "apple_remote/RemoteMainController.h" oslThreadKey SalData::s_aAutoReleaseKey = 0; diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx index 5d2fc3f00741..cc2546ccad85 100644 --- a/vcl/aqua/source/app/salinst.cxx +++ b/vcl/aqua/source/app/salinst.cxx @@ -32,25 +32,30 @@ #include "tools/fsys.hxx" #include "tools/getprocessworkingdir.hxx" +#include + #include "osl/process.h" + #include "rtl/ustrbuf.hxx" + #include "vcl/svapp.hxx" -#include "vcl/print.h" -#include "vcl/salimestatus.hxx" #include "vcl/window.hxx" #include "vcl/timer.hxx" -#include "vcl/impbmp.hxx" - -#include "saldata.hxx" -#include "salinst.h" -#include "salframe.h" -#include "salobj.h" -#include "salsys.h" -#include "salvd.h" -#include "salbmp.h" -#include "salprn.h" -#include "saltimer.h" -#include "vclnsapp.h" + +#include "aqua/saldata.hxx" +#include "aqua/salinst.h" +#include "aqua/salframe.h" +#include "aqua/salobj.h" +#include "aqua/salsys.h" +#include "aqua/salvd.h" +#include "aqua/salbmp.h" +#include "aqua/salprn.h" +#include "aqua/saltimer.h" +#include "aqua/vclnsapp.h" + +#include "print.h" +#include "impbmp.hxx" +#include "salimestatus.hxx" #include @@ -66,7 +71,6 @@ #import "apple_remote/RemoteMainController.h" #include "apple_remote/RemoteControl.h" #include "postmac.h" -#include using namespace std; using namespace ::com::sun::star; diff --git a/vcl/aqua/source/app/salnstimer.mm b/vcl/aqua/source/app/salnstimer.mm index 73e49fd99c61..2f1f0158cc05 100755 --- a/vcl/aqua/source/app/salnstimer.mm +++ b/vcl/aqua/source/app/salnstimer.mm @@ -28,12 +28,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "saltimer.h" -#include "salnstimer.h" -#include "salinst.h" -#include "saldata.hxx" +#include "aqua/saltimer.h" +#include "aqua/salnstimer.h" +#include "aqua/salinst.h" +#include "aqua/saldata.hxx" -#include "vcl/svdata.hxx" +#include "svdata.hxx" @implementation TimerCallbackCaller -(void)timerElapsed:(NSTimer*)pTimer diff --git a/vcl/aqua/source/app/salsys.cxx b/vcl/aqua/source/app/salsys.cxx index cf5cf00b7fe4..21da319b42b7 100644 --- a/vcl/aqua/source/app/salsys.cxx +++ b/vcl/aqua/source/app/salsys.cxx @@ -29,14 +29,17 @@ #include "precompiled_vcl.hxx" #include "tools/rc.hxx" -#include "vcl/svids.hrc" -#include "vcl/button.hxx" -#include "salsys.h" -#include "saldata.hxx" -#include "salinst.h" #include "rtl/ustrbuf.hxx" +#include "vcl/button.hxx" + +#include "aqua/salsys.h" +#include "aqua/saldata.hxx" +#include "aqua/salinst.h" + +#include "svids.hrc" + using namespace rtl; // ======================================================================= diff --git a/vcl/aqua/source/app/saltimer.cxx b/vcl/aqua/source/app/saltimer.cxx index 724857e92a0c..4204519deed6 100644 --- a/vcl/aqua/source/app/saltimer.cxx +++ b/vcl/aqua/source/app/saltimer.cxx @@ -28,11 +28,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "saltimer.h" -#include "salnstimer.h" -#include "saldata.hxx" -#include "salframe.h" -#include "salinst.h" +#include "aqua/saltimer.h" +#include "aqua/salnstimer.h" +#include "aqua/saldata.hxx" +#include "aqua/salframe.h" +#include "aqua/salinst.h" // ======================================================================= diff --git a/vcl/aqua/source/app/vclnsapp.mm b/vcl/aqua/source/app/vclnsapp.mm index 5a476e0a54cc..861ab6ee0947 100755 --- a/vcl/aqua/source/app/vclnsapp.mm +++ b/vcl/aqua/source/app/vclnsapp.mm @@ -28,18 +28,19 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "vclnsapp.h" -#include "salinst.h" -#include "saldata.hxx" -#include "salframe.h" -#include "salframeview.h" +#include "rtl/ustrbuf.hxx" #include "vcl/window.hxx" #include "vcl/svapp.hxx" #include "vcl/cmdevt.hxx" -#include "rtl/ustrbuf.hxx" -#include "vcl/impimagetree.hxx" +#include "aqua/vclnsapp.h" +#include "aqua/salinst.h" +#include "aqua/saldata.hxx" +#include "aqua/salframe.h" +#include "aqua/salframeview.h" + +#include "impimagetree.hxx" #include "premac.h" #import "Carbon/Carbon.h" diff --git a/vcl/aqua/source/dtrans/DragSource.cxx b/vcl/aqua/source/dtrans/DragSource.cxx index 1a8f950e50d4..6d7fdada99ad 100644 --- a/vcl/aqua/source/dtrans/DragSource.cxx +++ b/vcl/aqua/source/dtrans/DragSource.cxx @@ -27,10 +27,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include #include #include -#include + +#include "rtl/unload.h" +#include "rtl/ustring.hxx" #include "comphelper/makesequence.hxx" @@ -38,9 +41,9 @@ #include "DragSourceContext.hxx" #include "aqua_clipboard.hxx" #include "DragActionConversion.hxx" -#include "salframe.h" -#include +#include "aqua/salframe.h" + #include diff --git a/vcl/aqua/source/dtrans/service_entry.cxx b/vcl/aqua/source/dtrans/service_entry.cxx index 222b5cf40e04..9af69045888d 100644 --- a/vcl/aqua/source/dtrans/service_entry.cxx +++ b/vcl/aqua/source/dtrans/service_entry.cxx @@ -28,13 +28,16 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "saldata.hxx" -#include "salinst.h" +#include "osl/diagnose.h" + +#include "vcl/svapp.hxx" + +#include "aqua/saldata.hxx" +#include "aqua/salinst.h" + #include "DragSource.hxx" #include "DropTarget.hxx" #include "aqua_clipboard.hxx" -#include "osl/diagnose.h" -#include "vcl/svapp.hxx" using namespace ::osl; using namespace ::rtl; diff --git a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm index 93945570dc96..1b045c20a282 100644 --- a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm +++ b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm @@ -28,18 +28,19 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "aquaprintview.h" -#include "salinst.h" +#include "tools/resary.hxx" + #include "vcl/print.hxx" #include "vcl/image.hxx" #include "vcl/virdev.hxx" -#include "vcl/svdata.hxx" #include "vcl/svapp.hxx" #include "vcl/unohelp.hxx" -#include "vcl/svids.hrc" +#include "aqua/aquaprintview.h" +#include "aqua/salinst.h" -#include "tools/resary.hxx" +#include "svdata.hxx" +#include "svids.hrc" #include "com/sun/star/i18n/XBreakIterator.hpp" #include "com/sun/star/i18n/WordType.hpp" diff --git a/vcl/aqua/source/gdi/aquaprintview.mm b/vcl/aqua/source/gdi/aquaprintview.mm index ae42c5c09e8d..de5047b7faf6 100755 --- a/vcl/aqua/source/gdi/aquaprintview.mm +++ b/vcl/aqua/source/gdi/aquaprintview.mm @@ -28,10 +28,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "aquaprintview.h" -#include "salprn.h" #include "vcl/print.hxx" +#include "aqua/aquaprintview.h" +#include "aqua/salprn.h" + @implementation AquaPrintView -(id)initWithController: (vcl::PrinterController*)pController withInfoPrinter: (AquaSalInfoPrinter*)pInfoPrinter { diff --git a/vcl/aqua/source/gdi/salatslayout.cxx b/vcl/aqua/source/gdi/salatslayout.cxx index a355ff86d00e..f0c33b550a04 100755 --- a/vcl/aqua/source/gdi/salatslayout.cxx +++ b/vcl/aqua/source/gdi/salatslayout.cxx @@ -25,13 +25,15 @@ * ************************************************************************/ -#include "vcl/salgdi.hxx" -#include "saldata.hxx" -#include "salgdi.h" -#include "vcl/sallayout.hxx" -#include "salatsuifontutils.hxx" #include "tools/debug.hxx" +#include "aqua/saldata.hxx" +#include "aqua/salgdi.h" +#include "aqua/salatsuifontutils.hxx" + +#include "sallayout.hxx" +#include "salgdi.hxx" + #include // ======================================================================= diff --git a/vcl/aqua/source/gdi/salatsuifontutils.cxx b/vcl/aqua/source/gdi/salatsuifontutils.cxx index 8281c41ceeab..61fcd78586b3 100644 --- a/vcl/aqua/source/gdi/salatsuifontutils.cxx +++ b/vcl/aqua/source/gdi/salatsuifontutils.cxx @@ -32,10 +32,11 @@ #include #include -#include "salgdi.h" -#include "saldata.hxx" #include "vcl/svapp.hxx" -#include "salatsuifontutils.hxx" + +#include "aqua/salgdi.h" +#include "aqua/saldata.hxx" +#include "aqua/salatsuifontutils.hxx" // we have to get the font attributes from the name table // since neither head's macStyle nor OS/2's panose are easily available diff --git a/vcl/aqua/source/gdi/salbmp.cxx b/vcl/aqua/source/gdi/salbmp.cxx index 0e58c35b5fad..c1e7b7145914 100644 --- a/vcl/aqua/source/gdi/salbmp.cxx +++ b/vcl/aqua/source/gdi/salbmp.cxx @@ -28,19 +28,22 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "tools/color.hxx" -#include "salbmp.h" -#include "vcl/bitmap.hxx" // for BitmapSystemData -#include "vcl/salbtype.hxx" -#include "vcl/bmpfast.hxx" +#include #include "basebmp/scanlineformats.hxx" #include "basebmp/color.hxx" + #include "basegfx/vector/b2ivector.hxx" -#include +#include "tools/color.hxx" + +#include "vcl/bitmap.hxx" // for BitmapSystemData +#include "vcl/salbtype.hxx" + +#include "aqua/salbmp.h" +#include "aqua/salinst.h" -#include "salinst.h" +#include "bmpfast.hxx" // ======================================================================= diff --git a/vcl/aqua/source/gdi/salcolorutils.cxx b/vcl/aqua/source/gdi/salcolorutils.cxx index ec33b2dd8f8d..37b6ec65a108 100755 --- a/vcl/aqua/source/gdi/salcolorutils.cxx +++ b/vcl/aqua/source/gdi/salcolorutils.cxx @@ -28,9 +28,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salcolorutils.hxx" #include "vcl/salbtype.hxx" +#include "aqua/salcolorutils.hxx" + // ======================================================================= SalColor GetSalColor( const float* pQuartzColor ) diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx index 070c0753637d..934e3d14f967 100644 --- a/vcl/aqua/source/gdi/salgdi.cxx +++ b/vcl/aqua/source/gdi/salgdi.cxx @@ -28,20 +28,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salconst.h" -#include "salgdi.h" -#include "salbmp.h" -#include "salframe.h" -#include "salcolorutils.hxx" -#include "sft.hxx" -#include "salatsuifontutils.hxx" - -#include "vcl/impfont.hxx" -#include "vcl/fontsubset.hxx" -#include "vcl/sysdata.hxx" -#include "vcl/sallayout.hxx" -#include "vcl/svapp.hxx" - #include "osl/file.hxx" #include "osl/process.h" @@ -54,7 +40,23 @@ #include "basegfx/polygon/b2dpolygon.hxx" #include "basegfx/polygon/b2dpolygontools.hxx" #include "basegfx/matrix/b2dhommatrix.hxx" -#include +#include "basegfx/matrix/b2dhommatrixtools.hxx" + +#include "vcl/sysdata.hxx" +#include "vcl/svapp.hxx" + +#include "aqua/salconst.h" +#include "aqua/salgdi.h" +#include "aqua/salbmp.h" +#include "aqua/salframe.h" +#include "aqua/salcolorutils.hxx" +#include "aqua/salatsuifontutils.hxx" + +#include "fontsubset.hxx" +#include "impfont.hxx" +#include "sallayout.hxx" +#include "sft.hxx" + using namespace vcl; diff --git a/vcl/aqua/source/gdi/salgdiutils.cxx b/vcl/aqua/source/gdi/salgdiutils.cxx index f7c234d2c4c4..bba3c795f6e3 100755 --- a/vcl/aqua/source/gdi/salgdiutils.cxx +++ b/vcl/aqua/source/gdi/salgdiutils.cxx @@ -28,20 +28,22 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salgdi.h" -#include "salframe.h" +#include #include "basebmp/scanlineformats.hxx" #include "basebmp/color.hxx" + #include "basegfx/range/b2drectangle.hxx" #include "basegfx/range/b2irange.hxx" #include "basegfx/vector/b2ivector.hxx" #include "basegfx/polygon/b2dpolygon.hxx" #include "basegfx/polygon/b2dpolygontools.hxx" -#include #include "vcl/svapp.hxx" -#include "saldata.hxx" + +#include "aqua/salgdi.h" +#include "aqua/salframe.h" +#include "aqua/saldata.hxx" // ---------------------------------------------------------------------- diff --git a/vcl/aqua/source/gdi/salmathutils.cxx b/vcl/aqua/source/gdi/salmathutils.cxx index 8df44acbf730..1a0011068194 100755 --- a/vcl/aqua/source/gdi/salmathutils.cxx +++ b/vcl/aqua/source/gdi/salmathutils.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salmathutils.hxx" +#include "aqua/salmathutils.hxx" #include diff --git a/vcl/aqua/source/gdi/salnativewidgets.cxx b/vcl/aqua/source/gdi/salnativewidgets.cxx index 9ce2b8a5a518..55a4ccc16c3e 100644 --- a/vcl/aqua/source/gdi/salnativewidgets.cxx +++ b/vcl/aqua/source/gdi/salnativewidgets.cxx @@ -25,17 +25,17 @@ * ************************************************************************/ -#include "salconst.h" -#include "salgdi.h" -#include "salnativewidgets.h" -#include "saldata.hxx" -#include "salframe.h" - #include "vcl/salnativewidgets.hxx" #include "vcl/decoview.hxx" #include "vcl/svapp.hxx" #include "vcl/timer.hxx" +#include "aqua/salconst.h" +#include "aqua/salgdi.h" +#include "aqua/salnativewidgets.h" +#include "aqua/saldata.hxx" +#include "aqua/salframe.h" + #include "premac.h" #include #include "postmac.h" diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx index c79add81d791..b40c82c77de3 100644 --- a/vcl/aqua/source/gdi/salprn.cxx +++ b/vcl/aqua/source/gdi/salprn.cxx @@ -28,17 +28,19 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" -#include "salprn.h" -#include "aquaprintview.h" -#include "salgdi.h" -#include "saldata.hxx" -#include "vcl/jobset.h" -#include "vcl/salptype.hxx" +#include + #include "vcl/print.hxx" #include "vcl/unohelp.hxx" -#include +#include "aqua/salinst.h" +#include "aqua/salprn.h" +#include "aqua/aquaprintview.h" +#include "aqua/salgdi.h" +#include "aqua/saldata.hxx" + +#include "jobset.h" +#include "salptype.hxx" #include "com/sun/star/lang/XMultiServiceFactory.hpp" #include "com/sun/star/container/XNameAccess.hpp" diff --git a/vcl/aqua/source/gdi/salvd.cxx b/vcl/aqua/source/gdi/salvd.cxx index f633dbbdcdce..9c2b3631fa3d 100644 --- a/vcl/aqua/source/gdi/salvd.cxx +++ b/vcl/aqua/source/gdi/salvd.cxx @@ -28,15 +28,15 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salvd.h" -#include "salinst.h" -#include "salgdi.h" -#include "saldata.hxx" -#include "salframe.h" -#include - +#include "vcl/svapp.hxx" #include "vcl/sysdata.hxx" +#include "aqua/salvd.h" +#include "aqua/salinst.h" +#include "aqua/salgdi.h" +#include "aqua/saldata.hxx" +#include "aqua/salframe.h" + // ----------------------------------------------------------------------- SalVirtualDevice* AquaSalInstance::CreateVirtualDevice( SalGraphics* pGraphics, diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx index 17e034bd6e3d..1e20448fad7a 100644 --- a/vcl/aqua/source/window/salframe.cxx +++ b/vcl/aqua/source/window/salframe.cxx @@ -30,28 +30,31 @@ #include -#include "saldata.hxx" -#include "salgdi.h" -#include "salframe.h" -#include "salmenu.h" -#include "saltimer.h" -#include "salinst.h" -#include "salframeview.h" -#include "aqua11yfactory.h" -#include "vcl/salwtype.hxx" +#include "rtl/ustrbuf.hxx" + +#include "osl/file.h" + +#include "vcl/svapp.hxx" #include "vcl/window.hxx" #include "vcl/timer.hxx" +#include "aqua/saldata.hxx" +#include "aqua/salgdi.h" +#include "aqua/salframe.h" +#include "aqua/salmenu.h" +#include "aqua/saltimer.h" +#include "aqua/salinst.h" +#include "aqua/salframeview.h" +#include "aqua/aqua11yfactory.h" + +#include "salwtype.hxx" + #include "premac.h" // needed for theming // FIXME: move theming code to salnativewidgets.cxx #include #include "postmac.h" -#include "boost/assert.hpp" -#include "vcl/svapp.hxx" -#include "rtl/ustrbuf.hxx" -#include "osl/file.h" using namespace std; diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm index bc87ea444710..bfcc047c812a 100755 --- a/vcl/aqua/source/window/salframeview.mm +++ b/vcl/aqua/source/window/salframeview.mm @@ -28,16 +28,17 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" -#include "salgdi.h" -#include "salframe.h" -#include "salframeview.h" -#include "aqua11yfactory.h" #include -#include "vcl/window.hxx" +#include "vcl/window.hxx" #include "vcl/svapp.hxx" +#include "aqua/salinst.h" +#include "aqua/salgdi.h" +#include "aqua/salframe.h" +#include "aqua/salframeview.h" +#include "aqua/aqua11yfactory.h" + #define WHEEL_EVENT_FACTOR 1.5 static USHORT ImplGetModifierMask( unsigned int nMask ) diff --git a/vcl/aqua/source/window/salmenu.cxx b/vcl/aqua/source/window/salmenu.cxx index 82102f2e7095..08c1f9310529 100644 --- a/vcl/aqua/source/window/salmenu.cxx +++ b/vcl/aqua/source/window/salmenu.cxx @@ -25,21 +25,23 @@ * ************************************************************************/ -#include "saldata.hxx" -#include "salinst.h" -#include "salmenu.h" -#include "salnsmenu.h" -#include "salframe.h" -#include "salbmp.h" -#include "vcl/svids.hrc" +#include "rtl/ustrbuf.hxx" + #include "vcl/cmdevt.hxx" #include "vcl/floatwin.hxx" -#include "vcl/window.h" #include "vcl/window.hxx" #include "vcl/svapp.hxx" -#include "rtl/ustrbuf.hxx" -#include "aqua11ywrapper.h" +#include "aqua/saldata.hxx" +#include "aqua/salinst.h" +#include "aqua/salmenu.h" +#include "aqua/salnsmenu.h" +#include "aqua/salframe.h" +#include "aqua/salbmp.h" +#include "aqua/aqua11ywrapper.h" + +#include "svids.hrc" +#include "window.h" const AquaSalMenu* AquaSalMenu::pCurrentMenuBar = NULL; diff --git a/vcl/aqua/source/window/salnsmenu.mm b/vcl/aqua/source/window/salnsmenu.mm index 015c43aed70f..cd6f7e1e2f28 100755 --- a/vcl/aqua/source/window/salnsmenu.mm +++ b/vcl/aqua/source/window/salnsmenu.mm @@ -28,11 +28,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "salinst.h" -#include "saldata.hxx" -#include "salframe.h" -#include "salmenu.h" -#include "salnsmenu.h" +#include "aqua/salinst.h" +#include "aqua/saldata.hxx" +#include "aqua/salframe.h" +#include "aqua/salmenu.h" +#include "aqua/salnsmenu.h" #include "vcl/window.hxx" diff --git a/vcl/aqua/source/window/salobj.cxx b/vcl/aqua/source/window/salobj.cxx index f300929f04fe..642c5e5d9637 100644 --- a/vcl/aqua/source/window/salobj.cxx +++ b/vcl/aqua/source/window/salobj.cxx @@ -30,9 +30,9 @@ #include -#include "saldata.hxx" -#include "salobj.h" -#include "salframe.h" +#include "aqua/saldata.hxx" +#include "aqua/salobj.h" +#include "aqua/salframe.h" // ======================================================================= diff --git a/vcl/inc/accel.h b/vcl/inc/accel.h new file mode 100644 index 000000000000..e726d04e7c99 --- /dev/null +++ b/vcl/inc/accel.h @@ -0,0 +1,59 @@ +/************************************************************************* + * + * 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 _SV_ACCEL_H +#define _SV_ACCEL_H + +#include +#ifndef _SV_KEYCOD_HXX +#include +#endif + +class Accelerator; + +// ------------------ +// - ImplAccelEntry - +// ------------------ + +class ImplAccelEntry +{ +public: + USHORT mnId; + KeyCode maKeyCode; + Accelerator* mpAccel; + Accelerator* mpAutoAccel; + BOOL mbEnabled; +}; + +// ----------------- +// - Hilfemethoden - +// ----------------- + +// in KEYCOD.CXX +void ImplGetKeyCode( KeyFuncType eFunc, USHORT& rCode1, USHORT& rCode2, USHORT& rCode3, USHORT& rCode4 ); + +#endif // _SV_ACCEL_H diff --git a/vcl/inc/accmgr.hxx b/vcl/inc/accmgr.hxx new file mode 100644 index 000000000000..a60322eac403 --- /dev/null +++ b/vcl/inc/accmgr.hxx @@ -0,0 +1,64 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SV_ACCMGR_HXX +#define _SV_ACCMGR_HXX + +#include + +class ImplAccelList; +class Accelerator; +class KeyCode; + +// -------------------- +// - ImplAccelManager - +// -------------------- + +class ImplAccelManager +{ +private: + ImplAccelList* mpAccelList; + ImplAccelList* mpSequenceList; + +public: + ImplAccelManager() + { + mpAccelList = NULL; + mpSequenceList = NULL; + } + ~ImplAccelManager(); + + BOOL InsertAccel( Accelerator* pAccel ); + void RemoveAccel( Accelerator* pAccel ); + + void EndSequence( BOOL bCancel = FALSE ); + void FlushAccel() { EndSequence( TRUE ); } + + BOOL IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat ); +}; + +#endif // _SV_ACCMGR_HXX diff --git a/vcl/inc/aqua/aqua11yfactory.h b/vcl/inc/aqua/aqua11yfactory.h new file mode 100644 index 000000000000..1982093f8bba --- /dev/null +++ b/vcl/inc/aqua/aqua11yfactory.h @@ -0,0 +1,47 @@ +/************************************************************************* + * + * 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 _SV_AQUA11FACTORY_H +#define _SV_AQUA11FACTORY_H + +#include "aquavcltypes.h" +#include "aqua11ywrapper.h" +#include + +@interface AquaA11yFactory : NSObject +{ +} ++(void)insertIntoWrapperRepository: (NSView *) viewElement forAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext; ++(AquaA11yWrapper *)wrapperForAccessible: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible >) rxAccessible; ++(AquaA11yWrapper *)wrapperForAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext; ++(AquaA11yWrapper *)wrapperForAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext createIfNotExists:(MacOSBOOL) bCreate; ++(AquaA11yWrapper *)wrapperForAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext createIfNotExists:(MacOSBOOL) bCreate asRadioGroup:(MacOSBOOL) asRadioGroup; ++(void)removeFromWrapperRepositoryFor: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext; ++(void)registerView: (NSView *) theView; ++(void)revokeView: (NSView *) theViewt; +@end +#endif // _SV_AQUA11FACTORY_H diff --git a/vcl/inc/aqua/aqua11yfocustracker.hxx b/vcl/inc/aqua/aqua11yfocustracker.hxx new file mode 100644 index 000000000000..1dbf68c4a5ef --- /dev/null +++ b/vcl/inc/aqua/aqua11yfocustracker.hxx @@ -0,0 +1,108 @@ +/************************************************************************* + * + * 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 _AQUA11YFOCUSTRACKER_HXX_ +#define _AQUA11YFOCUSTRACKER_HXX_ + +#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_ +#include +#endif + +#include "keyboardfocuslistener.hxx" + +#include + +#include +#include +#include + +class Window; +class ToolBox; +class DocumentFocusListener; + +// ------------------------ +// - AquaA11yFocusTracker - +// ------------------------ + +class AquaA11yFocusTracker : public rtl::Static< AquaA11yFocusTracker, AquaA11yFocusTracker> +{ + +public: + AquaA11yFocusTracker(); + + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > getFocusedObject() { return m_xFocusedObject; }; + + // sets the currently focus object and notifies the FocusEventListener (if any) + void setFocusedObject(const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& xAccessible); + + // may evolve to add/remove later + void setFocusListener(const rtl::Reference< KeyboardFocusListener >& aFocusListener) { m_aFocusListener = aFocusListener; }; + +protected: + + // received a WINDOW_GETFOCUS event for this window + virtual void window_got_focus(Window *pWindow); + + // received a TOOLBOX_HIGHLIGHT event for this window + virtual void toolbox_highlight_on(Window *pWindow); + + // received a TOOLBOX_HIGHLIGHTOFF event for this window + virtual void toolbox_highlight_off(Window *pWindow); + + // received a TABPAGE_ACTIVATE event for this window + virtual void tabpage_activated(Window *pWindow); + + // received a MENU_HIGHLIGHT event for this window + virtual void menu_highlighted(const ::VclMenuEvent *pEvent); + + // toolbox items are widgets in gtk+ and Cocoa + virtual void notify_toolbox_item_focus(ToolBox *pToolBox); + + // toolbox item opened a floating window (e.g. color chooser) + virtual void toolbox_open_floater(Window *pWindow); + + // callback function for Application::addEventListener + static long WindowEventHandler(AquaA11yFocusTracker *pFocusTracker, ::VclSimpleEvent const *pEvent); + +private: + // the accessible object that has the keyboard focus (if any) + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xFocusedObject; + + // the listener for focus events + rtl::Reference< KeyboardFocusListener > m_aFocusListener; + + // the list of Windows that need deeper (focus) investigation + std::set< Window *> m_aDocumentWindowList; + + // the link object needed for Application::addEventListener + Link m_aWindowEventLink; + + // the UNO XAccessibilityEventListener for Documents and other non VCL objects + const ::com::sun::star::uno::Reference< DocumentFocusListener > m_xDocumentFocusListener; +}; + +#endif // _AQUA11YFOCUSTRACKER_HXX_ diff --git a/vcl/inc/aqua/aqua11ylistener.hxx b/vcl/inc/aqua/aqua11ylistener.hxx new file mode 100644 index 000000000000..461b149e4650 --- /dev/null +++ b/vcl/inc/aqua/aqua11ylistener.hxx @@ -0,0 +1,65 @@ +/************************************************************************* + * + * 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 _AQUA11YLISTENER_HXX_ +#define _AQUA11YLISTENER_HXX_ + +#include +#include + +#include "aqua11yfocustracker.hxx" +#include "aquavcltypes.h" +#include +#include + +// ------------------------- +// - AquaA11yEventListener - +// ------------------------- + +class AquaA11yEventListener : + public ::cppu::WeakImplHelper1< ::com::sun::star::accessibility::XAccessibleEventListener > +{ + +public: + AquaA11yEventListener(id wrapperObject, sal_Int16 role); + virtual ~AquaA11yEventListener(); + + // XEventListener + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) + throw (::com::sun::star::uno::RuntimeException); + + // XAccessibleEventListener + virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent ) + throw( ::com::sun::star::uno::RuntimeException ); + +private: + const id m_wrapperObject; + const sal_Int16 m_role; + ::com::sun::star::awt::Rectangle m_oldBounds; +}; + +#endif // _AQUA11YLISTENER_HXX_ \ No newline at end of file diff --git a/vcl/inc/aqua/aqua11ywrapper.h b/vcl/inc/aqua/aqua11ywrapper.h new file mode 100644 index 000000000000..079dcfe7f112 --- /dev/null +++ b/vcl/inc/aqua/aqua11ywrapper.h @@ -0,0 +1,119 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SV_AQUA11WRAPPER_H +#define _SV_AQUA11WRAPPER_H + +#include "aquavcltypes.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// rAccessibleXYZ as a field in an Objective-C-Class would not call Con-/Destructor, so use a struct instead +struct ReferenceWrapper +{ + ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleAction > rAccessibleAction; + ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext > rAccessibleContext; + ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleComponent > rAccessibleComponent; + ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleExtendedComponent > rAccessibleExtendedComponent; + ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleSelection > rAccessibleSelection; + ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleTable > rAccessibleTable; + ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleText > rAccessibleText; + ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleEditableText > rAccessibleEditableText; + ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleValue > rAccessibleValue; + ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleTextAttributes > rAccessibleTextAttributes; + ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleMultiLineText > rAccessibleMultiLineText; +}; + +@interface AquaA11yWrapper : NSView +{ + ReferenceWrapper * mpReferenceWrapper; + NSString * mpDefaultFontname; + float mDefaultFontsize; + MacOSBOOL mActsAsRadioGroup; + MacOSBOOL mIsTableCell; +} +// NSAccessibility Protocol +-(id)accessibilityAttributeValue:(NSString *)attribute; +-(MacOSBOOL)accessibilityIsIgnored; +-(NSArray *)accessibilityAttributeNames; +-(MacOSBOOL)accessibilityIsAttributeSettable:(NSString *)attribute; +-(NSArray *)accessibilityParameterizedAttributeNames; +-(MacOSBOOL)accessibilitySetOverrideValue:(id)value forAttribute:(NSString *)attribute; +-(void)accessibilitySetValue:(id)value forAttribute:(NSString *)attribute; +-(id)accessibilityAttributeValue:(NSString *)attribute forParameter:(id)parameter; +-(id)accessibilityFocusedUIElement; +-(NSString *)accessibilityActionDescription:(NSString *)action; +-(void)accessibilityPerformAction:(NSString *)action; +-(NSArray *)accessibilityActionNames; +-(id)accessibilityHitTest:(NSPoint)point; +// Attribute values +-(id)parentAttribute; +-(id)valueAttribute; +-(id)titleAttribute; +-(id)helpAttribute; +-(id)numberOfCharactersAttribute; +-(id)selectedTextAttribute; +-(id)selectedTextRangeAttribute; +-(id)visibleCharacterRangeAttribute; +-(id)childrenAttribute; +-(id)orientationAttribute; +-(id)windowAttribute; +// Wrapper-specific +-(void)setActsAsRadioGroup:(MacOSBOOL)actsAsRadioGroup; +-(MacOSBOOL)actsAsRadioGroup; +-(NSView *)viewElementForParent; +-(id)initWithAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) anAccessibleContext; +-(void) setDefaults: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext; +-(void) dealloc; +-(void)setDefaultFontname:(NSString *)fontname; +-(NSString *)defaultFontname; +-(void)setDefaultFontsize:(float)fontsize; +-(float)defaultFontsize; ++(void)setPopupMenuOpen:(MacOSBOOL)popupMenuOpen; +-(::com::sun::star::accessibility::XAccessibleAction *)accessibleAction; +-(::com::sun::star::accessibility::XAccessibleContext *)accessibleContext; +-(::com::sun::star::accessibility::XAccessibleComponent *)accessibleComponent; +-(::com::sun::star::accessibility::XAccessibleExtendedComponent *)accessibleExtendedComponent; +-(::com::sun::star::accessibility::XAccessibleSelection *)accessibleSelection; +-(::com::sun::star::accessibility::XAccessibleTable *)accessibleTable; +-(::com::sun::star::accessibility::XAccessibleText *)accessibleText; +-(::com::sun::star::accessibility::XAccessibleEditableText *)accessibleEditableText; +-(::com::sun::star::accessibility::XAccessibleValue *)accessibleValue; +-(::com::sun::star::accessibility::XAccessibleTextAttributes *)accessibleTextAttributes; +-(::com::sun::star::accessibility::XAccessibleMultiLineText *)accessibleMultiLineText; +@end + +#endif // _SV_AQUA11WRAPPER_H diff --git a/vcl/inc/aqua/aquaprintview.h b/vcl/inc/aqua/aquaprintview.h new file mode 100755 index 000000000000..84d9dd54d6aa --- /dev/null +++ b/vcl/inc/aqua/aquaprintview.h @@ -0,0 +1,67 @@ +/************************************************************************* + * + * 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 _VCL_AQUAPRINTVIEW_H +#define _VCL_AQUAPRINTVIEW_H + +#include "premac.h" +#include +#include "postmac.h" + +#include "vcl/print.hxx" + +class AquaSalInfoPrinter; + +struct PrintAccessoryViewState +{ + bool bNeedRestart; + sal_Int32 nLastPage; + + PrintAccessoryViewState() + : bNeedRestart( false ), nLastPage( 0 ) {} +}; + +@interface AquaPrintView : NSView +{ + vcl::PrinterController* mpController; + AquaSalInfoPrinter* mpInfoPrinter; +} +-(id)initWithController: (vcl::PrinterController*)pController withInfoPrinter: (AquaSalInfoPrinter*)pInfoPrinter; +-(MacOSBOOL)knowsPageRange: (NSRangePointer)range; +-(NSRect)rectForPage: (int)page; +-(NSPoint)locationOfPrintRect: (NSRect)aRect; +-(void)drawRect: (NSRect)rect; +@end + +@interface AquaPrintAccessoryView : NSObject +{ +} ++(NSObject*)setupPrinterPanel: (NSPrintOperation*)pOp withController: (vcl::PrinterController*)pController withState: (PrintAccessoryViewState*)pState; +@end + + +#endif diff --git a/vcl/inc/aqua/aquavclevents.hxx b/vcl/inc/aqua/aquavclevents.hxx new file mode 100644 index 000000000000..8e03c59d0954 --- /dev/null +++ b/vcl/inc/aqua/aquavclevents.hxx @@ -0,0 +1,96 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef INCLUDED_AQUAVCLEVENTS_HXX +#define INCLUDED_AQUAVCLEVENTS_HXX + +#include +#include +#include + +/* Definition of custom OpenOffice.org events. + + Avoid conflict with Apple defined event class and type + definitions by using uppercase letters. Lowercase + letter definitions are reserved for Apple! + */ +enum { + cOOoSalUserEventClass = 'OOUE' +}; + +enum { + cOOoSalEventUser = 'UEVT', + cOOoSalEventTimer = 'EVTT', + cOOoSalEventData = 'EVTD', + cOOoSalEventParamTypePtr = 'EPPT' +}; + +/* Definition of all necessary EventTypeSpec's */ + +const EventTypeSpec cWindowBoundsChangedEvent = { kEventClassWindow, kEventWindowBoundsChanged }; +const EventTypeSpec cWindowCloseEvent = { kEventClassWindow, kEventWindowClose }; +const EventTypeSpec cOOoSalUserEvent = { cOOoSalUserEventClass, cOOoSalEventUser }; +const EventTypeSpec cOOoSalTimerEvent = { cOOoSalUserEventClass, cOOoSalEventTimer }; +const EventTypeSpec cWindowActivatedEvent[] = { { kEventClassWindow, kEventWindowActivated }, + { kEventClassWindow, kEventWindowDeactivated } }; +const EventTypeSpec cWindowPaintEvent = { kEventClassWindow, kEventWindowPaint }; +const EventTypeSpec cWindowDrawContentEvent = { kEventClassWindow, kEventWindowDrawContent }; + +const EventTypeSpec cWindowFocusEvent[] = { { kEventClassWindow, kEventWindowFocusAcquired }, + { kEventClassWindow, kEventWindowFocusRelinquish } }; + +const EventTypeSpec cMouseEnterExitEvent[] = { { kEventClassControl, kEventControlTrackingAreaEntered }, + { kEventClassControl, kEventControlTrackingAreaExited } }; + +const EventTypeSpec cMouseEvent[] = { { kEventClassMouse, kEventMouseDown }, + { kEventClassMouse, kEventMouseUp }, + { kEventClassMouse, kEventMouseMoved }, + { kEventClassMouse, kEventMouseDragged } }; +const EventTypeSpec cMouseWheelMovedEvent = { kEventClassMouse, kEventMouseWheelMoved }; +const EventTypeSpec cWindowResizeStarted = { kEventClassWindow, kEventWindowResizeStarted }; +const EventTypeSpec cWindowResizeCompleted = { kEventClassWindow, kEventWindowResizeCompleted }; + +/* Events for native menus */ +const EventTypeSpec cCommandProcessEvent = { kEventClassCommand, kEventCommandProcess }; +const EventTypeSpec cMenuPopulateEvent = { kEventClassMenu, kEventMenuPopulate }; +const EventTypeSpec cMenuClosedEvent = { kEventClassMenu, kEventMenuClosed }; +const EventTypeSpec cMenuTargetItemEvent = { kEventClassMenu, kEventMenuTargetItem }; + +/* Events for keyboard */ +const EventTypeSpec cKeyboardRawKeyEvents[] = { { kEventClassKeyboard, kEventRawKeyDown}, + { kEventClassKeyboard, kEventRawKeyUp}, + { kEventClassKeyboard, kEventRawKeyRepeat}, + { kEventClassKeyboard, kEventRawKeyModifiersChanged} }; + +const EventTypeSpec cTextInputEvents[] = { { kEventClassTextInput, kEventTextInputUpdateActiveInputArea}, + { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent}, + { kEventClassTextInput, kEventTextInputOffsetToPos} }; + +/* Events for scrollbar */ + +const EventTypeSpec cAppearanceScrollbarVariantChangedEvent = { kEventClassAppearance, kEventAppearanceScrollBarVariantChanged }; + +#endif // INCLUDED_AQUAVCLEVENTS_HXX diff --git a/vcl/inc/aqua/aquavcltypes.h b/vcl/inc/aqua/aquavcltypes.h new file mode 100644 index 000000000000..7346282963d7 --- /dev/null +++ b/vcl/inc/aqua/aquavcltypes.h @@ -0,0 +1,36 @@ +/************************************************************************* + * + * 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 _AQUAVCLTYPES_H +#define _AQUAVCLTYPES_H + +#include "premac.h" +#import +#import +#include "postmac.h" + +#endif _AQUAVCLTYPES_H diff --git a/vcl/inc/aqua/keyboardfocuslistener.hxx b/vcl/inc/aqua/keyboardfocuslistener.hxx new file mode 100644 index 000000000000..71eba2f46c02 --- /dev/null +++ b/vcl/inc/aqua/keyboardfocuslistener.hxx @@ -0,0 +1,47 @@ +/************************************************************************* + * + * 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 _KEYBOARDFOCUSLISTENER_HXX_ +#define _KEYBOARDFOCUSLISTENER_HXX_ + +#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_ +#include +#endif + +#include + +// ------------------------- +// - KeyboardFocusListener - +// ------------------------- + +class KeyboardFocusListener : public rtl::IReference +{ +public: + virtual void SAL_CALL focusedObjectChanged(const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& xAccessible) = 0; +}; + +#endif // _KEYBOARDFOCUSLISTENER_HXX_ \ No newline at end of file diff --git a/vcl/inc/aqua/salatsuifontutils.hxx b/vcl/inc/aqua/salatsuifontutils.hxx new file mode 100644 index 000000000000..81e60871ae86 --- /dev/null +++ b/vcl/inc/aqua/salatsuifontutils.hxx @@ -0,0 +1,63 @@ +/************************************************************************* + * + * 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 _SV_SALATSUIFONTUTILS_HXX +#define _SV_SALATSUIFONTUTILS_HXX + +class ImplMacFontData; +class ImplDevFontList; + +#include +#include +#include + +#include + +/* This class has the responsibility of assembling a list + of atsui compatible fonts available on the system and + enabling access to that list. + */ +class SystemFontList +{ +public: + SystemFontList(); + ~SystemFontList(); + + void AnnounceFonts( ImplDevFontList& ) const; + ImplMacFontData* GetFontDataFromId( ATSUFontID ) const; + + ATSUFontFallbacks maFontFallbacks; + +private: + typedef std::hash_map MacFontContainer; + MacFontContainer maFontContainer; + + void InitGlyphFallbacks(); +}; + +#endif // _SV_SALATSUIFONTUTILS_HXX + diff --git a/vcl/inc/aqua/salbmp.h b/vcl/inc/aqua/salbmp.h new file mode 100644 index 000000000000..f560a14a7eab --- /dev/null +++ b/vcl/inc/aqua/salbmp.h @@ -0,0 +1,112 @@ +/************************************************************************* +* + * 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 _SV_SALBMP_H +#define _SV_SALBMP_H + +#include "tools/gen.hxx" + +#include "basebmp/bitmapdevice.hxx" + +#include "vcl/salbtype.hxx" + +#include "aqua/salconst.h" +#include "aqua/salgdi.h" + +#include "saldata.hxx" +#include "salinst.hxx" +#include "salvd.hxx" +#include "salbmp.hxx" + +#include "salcolorutils.hxx" + + +// -------------- +// - SalBitmap - +// -------------- + +struct BitmapBuffer; +class BitmapColor; +class BitmapPalette; +class AquaSalVirtualDevice; +class AquaSalGraphics; + +class AquaSalBitmap : public SalBitmap +{ +public: + CGContextRef mxGraphicContext; + mutable CGImageRef mxCachedImage; + BitmapPalette maPalette; + basebmp::RawMemorySharedArray maUserBuffer; + basebmp::RawMemorySharedArray maContextBuffer; + sal_uInt16 mnBits; + int mnWidth; + int mnHeight; + sal_uInt32 mnBytesPerRow; + +public: + AquaSalBitmap(); + virtual ~AquaSalBitmap(); + +public: + + // SalBitmap methods + bool Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ); + bool Create( const SalBitmap& rSalBmp ); + bool Create( const SalBitmap& rSalBmp, SalGraphics* pGraphics ); + bool Create( const SalBitmap& rSalBmp, USHORT nNewBitCount ); + + void Destroy(); + + Size GetSize() const; + USHORT GetBitCount() const; + + BitmapBuffer *AcquireBuffer( bool bReadOnly ); + void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ); + + bool GetSystemData( BitmapSystemData& rData ); + +private: + // quartz helper + bool CreateContext(); + void DestroyContext(); + bool AllocateUserData(); + + void ConvertBitmapData( sal_uInt32 nWidth, sal_uInt32 nHeight, + sal_uInt16 nDestBits, sal_uInt32 nDestBytesPerRow, const BitmapPalette& rDestPalette, sal_uInt8* pDestData, + sal_uInt16 nSrcBits, sal_uInt32 nSrcBytesPerRow, const BitmapPalette& rSrcPalette, sal_uInt8* pSrcData ); + +public: + bool Create( CGLayerRef xLayer, int nBitCount, int nX, int nY, int nWidth, int nHeight, bool bMirrorVert = true ); + +public: + CGImageRef CreateWithMask( const AquaSalBitmap& rMask, int nX, int nY, int nWidth, int nHeight ) const; + CGImageRef CreateColorMask( int nX, int nY, int nWidth, int nHeight, SalColor nMaskColor ) const; + CGImageRef CreateCroppedImage( int nX, int nY, int nWidth, int nHeight ) const; +}; + +#endif // _SV_SALBMP_HXX diff --git a/vcl/inc/aqua/salcolorutils.hxx b/vcl/inc/aqua/salcolorutils.hxx new file mode 100755 index 000000000000..74ccb69756fd --- /dev/null +++ b/vcl/inc/aqua/salcolorutils.hxx @@ -0,0 +1,52 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SV_SALCOLORUTILS_HXX +#define _SV_SALCOLORUTILS_HXX + +#ifndef _LIMITS_H + #include +#endif + +#include "premac.h" +#include +#include "postmac.h" + +#include "vcl/salbtype.hxx" +#include "vcl/salgtype.hxx" +#include "salconst.h" +#include "salmathutils.hxx" + +// ------------------------------------------------------------------ + +SalColor GetSalColor( const float* pQuartzColor ); + +void SetSalColor( const SalColor& rColor, float* pQuartzColor ); + +// ------------------------------------------------------------------ + +#endif // _SV_SALCOLORUTILS_HXX diff --git a/vcl/inc/aqua/salconst.h b/vcl/inc/aqua/salconst.h new file mode 100755 index 000000000000..2046ec20a806 --- /dev/null +++ b/vcl/inc/aqua/salconst.h @@ -0,0 +1,68 @@ +/************************************************************************* + * + * 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 _SV_SALCONST_H +#define _SV_SALCONST_H + +// ------------------- +// - Constants - +// ------------------- + +static const unsigned short kByteMask = 0xFF; + +static const unsigned short kOneByte = 8; +static const unsigned short kTwoBytes = 16; + +static const unsigned short kOneBit = 1; +static const unsigned short kFiveBits = 5; +static const unsigned short kEightBits = 8; +static const unsigned short kTenBits = 10; +static const unsigned short kElevenBits = 11; + +static const unsigned short kBlackAndWhite = 1; +static const unsigned short kFourBitColor = 4; +static const unsigned short kEightBitColor = 8; +static const unsigned short kThousandsColor = 16; +static const unsigned short kTrueColor = 32; + +static const unsigned long k16BitRedColorMask = 0x00007c00; +static const unsigned long k16BitGreenColorMask = 0x000003e0; +static const unsigned long k16BitBlueColorMask = 0x0000001f; + +static const unsigned long k32BitRedColorMask = 0x00ff0000; +static const unsigned long k32BitGreenColorMask = 0x0000ff00; +static const unsigned long k32BitBlueColorMask = 0x000000ff; + +static const unsigned short kPixMapCmpSizeOneBit = 1; +static const unsigned short kPixMapCmpSizeFourBits = 4; +static const unsigned short kPixMapCmpSizeFiveBits = 5; +static const unsigned short kPixMapCmpSizeEightBits = 8; + +static const long kPixMapHRes = 72; +static const long kPixMapVRes = 72; + +#endif // _SV_SALCONST_H diff --git a/vcl/inc/aqua/saldata.hxx b/vcl/inc/aqua/saldata.hxx new file mode 100644 index 000000000000..9731a8ea5bda --- /dev/null +++ b/vcl/inc/aqua/saldata.hxx @@ -0,0 +1,138 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SV_SALDATA_HXX +#define _SV_SALDATA_HXX + +#include "premac.h" +#include +#include "postmac.h" + +#include "com/sun/star/uno/Reference.hxx" + +#include "vcl/ptrstyle.hxx" + +#include "svdata.hxx" +#include "salwtype.hxx" + +#include +#include +#include +#include + +#include +#include + +#include "apple_remote/RemoteMainController.h" + +class AquaSalInstance; +class SalObject; +class SalFrame; +class SalVirtualDevice; +class SalPrinter; +class SystemFontList; + +// ------------------ +// - Some constants - +// ------------------ + +#define SAL_CLIPRECT_COUNT 16 + +#define VER_TIGER 0x1040 +#define VER_LEOPARD 0x1050 + +// ----------- +// - SalData - +// ----------- + +class AquaSalFrame; +struct FrameHash : public std::hash +{ + size_t operator()(const AquaSalFrame* frame) const + { return std::hash::operator()( reinterpret_cast(frame) ); } +}; + +#define INVALID_CURSOR_PTR (NSCursor*)0xdeadbeef + +struct SalData +{ + + SALTIMERPROC mpTimerProc; // timer callback proc + AquaSalInstance *mpFirstInstance; // pointer of first instance + std::list maFrames; // pointer of first frame + std::hash_set maFrameCheck; // for fast check of frame existance + SalObject *mpFirstObject; // pointer of first object window + SalVirtualDevice *mpFirstVD; // first VirDev + SalPrinter *mpFirstPrinter; // first printing printer + SystemFontList *mpFontList; + NSStatusItem* mpStatusItem; // one status item that draws all our stati + // at the moment this is only one add menu button + + CGColorSpaceRef mxRGBSpace; + CGColorSpaceRef mxGraySpace; + CGColorSpaceRef mxP50Space; + CGPatternRef mxP50Pattern; + + std::vector< NSCursor* > maCursors; + std::vector< NSMenuItem* > maFallbackMenu; + std::map< NSEvent*, bool > maKeyEventAnswer; + + static oslThreadKey s_aAutoReleaseKey; + + bool mbIsScrollbarDoubleMax; // TODO: support DoubleMin and DoubleBoth too + SInt32 mnSystemVersion; // Store System Version + MainController* mpMainController; // Apple Remote + + NSObject* mpDockIconClickHandler; + long mnDPIX; // #i100617# read DPI only once per office life + long mnDPIY; // #i100617# read DPI only once per office life + + com::sun::star::uno::Reference< com::sun::star::uno::XInterface > + mxClipboard; + + SalData(); + ~SalData(); + + NSCursor* getCursor( PointerStyle i_eStyle ); + + static void ensureThreadAutoreleasePool(); + static void drainThreadAutoreleasePool(); + + static NSStatusItem* getStatusItem(); +}; + +inline void SetSalData( SalData* pData ) { ImplGetSVData()->mpSalData = (void*)pData; } +inline SalData *GetSalData() { return (SalData*)ImplGetSVData()->mpSalData; } +inline SalData *GetAppSalData() { return (SalData*)ImplGetAppSVData()->mpSalData; } + +// --- Prototypes --- + +BOOL ImplSalYieldMutexTryToAcquire(); +void ImplSalYieldMutexAcquire(); +void ImplSalYieldMutexRelease(); + +#endif // _SV_SALDATA_HXX diff --git a/vcl/inc/aqua/salfontutils.hxx b/vcl/inc/aqua/salfontutils.hxx new file mode 100644 index 000000000000..6f9f61efda70 --- /dev/null +++ b/vcl/inc/aqua/salfontutils.hxx @@ -0,0 +1,66 @@ +/************************************************************************* + * + * 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 _SV_SALFONTUTILS_HXX +#define _SV_SALFONTUTILS_HXX + +#include "vcl/outfont.hxx" + +static const char *kFontWeightThin1 = "Thin"; +static const char *kFontWeightThin2 = "thin"; + +static const char *kFontWeightLight1 = "Light"; +static const char *kFontWeightLight2 = "light"; + +static const char *kFontWeightBold1 = "Bold"; +static const char *kFontWeightBold2 = "bold"; + +static const char *kFontWeightUltra1 = "Ultra"; +static const char *kFontWeightUltra2 = "ultra"; + +static const char *kFontWeightSemi1 = "Semi"; +static const char *kFontWeightSemi2 = "semi"; + +static const char *kFontWeightNormal1 = "Normal"; +static const char *kFontWeightNormal2 = "normal"; + +static const char *kFontWeightMedium1 = "Medium"; +static const char *kFontWeightMedium2 = "medium"; + +static const char *kFontWeightBlack1 = "Black"; +static const char *kFontWeightBlack2 = "black"; + +static const char *kFontWeightRoman1 = "Roman"; +static const char *kFontWeightRoman2 = "roman"; + +static const char *kFontWeightRegular1 = "Regular"; +static const char *kFontWeightRegular2 = "regular"; + + +#endif // _SV_SALFONTUTILS_HXX + diff --git a/vcl/inc/aqua/salframe.h b/vcl/inc/aqua/salframe.h new file mode 100644 index 000000000000..6fa93673556e --- /dev/null +++ b/vcl/inc/aqua/salframe.h @@ -0,0 +1,219 @@ +/************************************************************************* + * + * 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 _SV_SALFRAME_H +#define _SV_SALFRAME_H + +#include "vcl/sysdata.hxx" + +#include "aqua/salmenu.h" +#include "aqua/saldata.hxx" +#include "aqua/aquavcltypes.h" + +#include "salframe.hxx" + +#include +#include +#include + +#include + +class AquaSalGraphics; +class AquaSalFrame; +class AquaSalTimer; +class AquaSalInstance; +class AquaSalMenu; +class AquaBlinker; + +typedef struct SalFrame::SalPointerState SalPointerState; + +// ---------------- +// - AquaSalFrame - +// ---------------- + +class AquaSalFrame : public SalFrame +{ +public: + NSWindow* mpWindow; // Cocoa window + NSView* mpView; // Cocoa view (actually a custom view, see below + NSMenuItem* mpDockMenuEntry; // entry in the dynamic dock menu + NSRect maScreenRect; // for mirroring purposes + AquaSalGraphics* mpGraphics; // current frame graphics + AquaSalFrame* mpParent; // pointer to parent frame + SystemEnvData maSysData; // system data + int mnMinWidth; // min. client width in pixels + int mnMinHeight; // min. client height in pixels + int mnMaxWidth; // max. client width in pixels + int mnMaxHeight; // max. client height in pixels + NSRect maFullScreenRect; // old window size when in FullScreen + bool mbGraphics:1; // is Graphics used? + bool mbFullScreen:1; // is Window in FullScreen? + bool mbShown:1; + bool mbInitShow:1; + bool mbPositioned:1; + bool mbSized:1; + bool mbPresentation:1; + + ULONG mnStyle; + unsigned int mnStyleMask; // our style mask from NSWindow creation + + ULONG mnLastEventTime; + unsigned int mnLastModifierFlags; + AquaSalMenu* mpMenu; + + SalExtStyle mnExtStyle; // currently document frames are marked this way + + PointerStyle mePointerStyle; // currently active pointer style + + NSTrackingRectTag mnTrackingRectTag; // used to get enter/leave messages + + CGMutablePathRef mrClippingPath; // used for "shaping" + std::vector< CGRect > maClippingRects; + + std::list maBlinkers; + + Rectangle maInvalidRect; + + ULONG mnICOptions; + + boost::shared_ptr< Timer > mpActivityTimer; // Timer to prevent system sleep during presentation +public: + /** Constructor + + Creates a system window and connects this frame with it. + + @throws std::runtime_error in case window creation fails + */ + AquaSalFrame( SalFrame* pParent, ULONG salFrameStyle ); + + virtual ~AquaSalFrame(); + + virtual SalGraphics* GetGraphics(); + virtual void ReleaseGraphics( SalGraphics* pGraphics ); + virtual BOOL PostEvent( void* pData ); + virtual void SetTitle( const XubString& rTitle ); + virtual void SetIcon( USHORT nIcon ); + virtual void SetRepresentedURL( const rtl::OUString& ); + virtual void SetMenu( SalMenu* pSalMenu ); + virtual void DrawMenuBar(); + virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE ); + virtual void Enable( BOOL bEnable ); + virtual void SetMinClientSize( long nWidth, long nHeight ); + virtual void SetMaxClientSize( long nWidth, long nHeight ); + virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ); + virtual void GetClientSize( long& rWidth, long& rHeight ); + virtual void GetWorkArea( Rectangle& rRect ); + virtual SalFrame* GetParent() const; + virtual void SetWindowState( const SalFrameState* pState ); + virtual BOOL GetWindowState( SalFrameState* pState ); + virtual void ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay ); + virtual void StartPresentation( BOOL bStart ); + virtual void SetAlwaysOnTop( BOOL bOnTop ); + virtual void ToTop( USHORT nFlags ); + virtual void SetPointer( PointerStyle ePointerStyle ); + virtual void CaptureMouse( BOOL bMouse ); + virtual void SetPointerPos( long nX, long nY ); + virtual void Flush( void ); + virtual void Flush( const Rectangle& ); + virtual void Sync(); + virtual void SetInputContext( SalInputContext* pContext ); + virtual void EndExtTextInput( USHORT nFlags ); + virtual String GetKeyName( USHORT nKeyCode ); + virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode ); + virtual BOOL MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); + virtual LanguageType GetInputLanguage(); + virtual SalBitmap* SnapShot(); + virtual void UpdateSettings( AllSettings& rSettings ); + virtual void Beep( SoundType eSoundType ); + virtual const SystemEnvData* GetSystemData() const; + virtual SalPointerState GetPointerState(); + virtual void SetParent( SalFrame* pNewParent ); + virtual bool SetPluginParent( SystemParentData* pNewParent ); + virtual void SetExtendedFrameStyle( SalExtStyle ); + virtual void SetBackgroundBitmap( SalBitmap* ); + virtual void SetScreenNumber(unsigned int); + + // shaped system windows + // set clip region to none (-> rectangular windows, normal state) + virtual void ResetClipRegion(); + // start setting the clipregion consisting of nRects rectangles + virtual void BeginSetClipRegion( ULONG nRects ); + // add a rectangle to the clip region + virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); + // done setting up the clipregion + virtual void EndSetClipRegion(); + + virtual void SetClientSize( long nWidth, long nHeight ); + + void UpdateFrameGeometry(); + + // trigger painting of the window + void SendPaintEvent( const Rectangle* pRect = NULL ); + + static bool isAlive( const AquaSalFrame* pFrame ) + { return GetSalData()->maFrameCheck.find( pFrame ) != GetSalData()->maFrameCheck.end(); } + + static AquaSalFrame* GetCaptureFrame() { return s_pCaptureFrame; } + + NSWindow* getWindow() const { return mpWindow; } + NSView* getView() const { return mpView; } + unsigned int getStyleMask() const { return mnStyleMask; } + + void getResolution( long& o_rDPIX, long& o_rDPIY ); + + // actually the follwing methods do the same thing: flipping y coordinates + // but having two of them makes clearer what the coordinate system + // is supposed to be before and after + void VCLToCocoa( NSRect& io_rRect, bool bRelativeToScreen = true ); + void CocoaToVCL( NSRect& io_rRect, bool bRelativeToScreen = true ); + + void VCLToCocoa( NSPoint& io_rPoint, bool bRelativeToScreen = true ); + void CocoaToVCL( NSPoint& io_Point, bool bRelativeToScreen = true ); + + NSCursor* getCurrentCursor() const; + + CGMutablePathRef getClipPath() const { return mrClippingPath; } + + // called by VCL_NSApplication to indicate screen settings have changed + void screenParametersChanged(); + + private: // methods + /** do things on initial show (like centering on parent or on screen) + */ + void initShow(); + + void initWindowAndView(); + + private: // data + static AquaSalFrame* s_pCaptureFrame; + + // make AquaSalFrame non copyable + AquaSalFrame( const AquaSalFrame& ); + AquaSalFrame& operator=(const AquaSalFrame&); +}; + +#endif // _SV_SALFRAME_H diff --git a/vcl/inc/aqua/salframeview.h b/vcl/inc/aqua/salframeview.h new file mode 100755 index 000000000000..7ead3e7aaab9 --- /dev/null +++ b/vcl/inc/aqua/salframeview.h @@ -0,0 +1,213 @@ +/************************************************************************* + * + * 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 _VCL_SALFRAMEVIEW_H +#define _VCL_SALFRAMEVIEW_H + +#include "aqua/aqua11ywrapper.h" + +@interface SalFrameWindow : NSWindow +{ + AquaSalFrame* mpFrame; + id mDraggingDestinationHandler; +} +-(id)initWithSalFrame: (AquaSalFrame*)pFrame; +-(MacOSBOOL)canBecomeKeyWindow; +-(void)displayIfNeeded; +-(void)windowDidBecomeKey: (NSNotification*)pNotification; +-(void)windowDidResignKey: (NSNotification*)pNotification; +-(void)windowDidChangeScreen: (NSNotification*)pNotification; +-(void)windowDidMove: (NSNotification*)pNotification; +-(void)windowDidResize: (NSNotification*)pNotification; +-(void)windowDidMiniaturize: (NSNotification*)pNotification; +-(void)windowDidDeminiaturize: (NSNotification*)pNotification; +-(MacOSBOOL)windowShouldClose: (NSNotification*)pNotification; +-(void)dockMenuItemTriggered: (id)sender; +-(AquaSalFrame*)getSalFrame; +-(MacOSBOOL)containsMouse; +-(::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >)accessibleContext; + +/* NSDraggingDestination protocol methods + */ +-(NSDragOperation)draggingEntered:(id )sender; +-(NSDragOperation)draggingUpdated:(id )sender; +-(void)draggingExited:(id )sender; +-(MacOSBOOL)prepareForDragOperation:(id )sender; +-(MacOSBOOL)performDragOperation:(id )sender; +-(void)concludeDragOperation:(id )sender; + +-(void)registerDraggingDestinationHandler:(id)theHandler; +-(void)unregisterDraggingDestinationHandler:(id)theHandler; +@end + +@interface SalFrameView : AquaA11yWrapper +{ + AquaSalFrame* mpFrame; + + // for NSTextInput + NSEvent* mpLastEvent; + BOOL mbNeedSpecialKeyHandle; + BOOL mbInKeyInput; + BOOL mbKeyHandled; + NSRange mMarkedRange; + NSRange mSelectedRange; + id mpMouseEventListener; + id mDraggingDestinationHandler; + NSEvent* mpLastSuperEvent; + + // #i102807# used by magnify event handler + NSTimeInterval mfLastMagnifyTime; + float mfMagnifyDeltaSum; +} ++(void)unsetMouseFrame: (AquaSalFrame*)pFrame; +-(id)initWithSalFrame: (AquaSalFrame*)pFrame; +-(MacOSBOOL)acceptsFirstResponder; +-(MacOSBOOL)acceptsFirstMouse: (NSEvent *)pEvent; +-(MacOSBOOL)isOpaque; +-(void)drawRect: (NSRect)aRect; +-(void)mouseDown: (NSEvent*)pEvent; +-(void)mouseDragged: (NSEvent*)pEvent; +-(void)mouseUp: (NSEvent*)pEvent; +-(void)mouseMoved: (NSEvent*)pEvent; +-(void)mouseEntered: (NSEvent*)pEvent; +-(void)mouseExited: (NSEvent*)pEvent; +-(void)rightMouseDown: (NSEvent*)pEvent; +-(void)rightMouseDragged: (NSEvent*)pEvent; +-(void)rightMouseUp: (NSEvent*)pEvent; +-(void)otherMouseDown: (NSEvent*)pEvent; +-(void)otherMouseDragged: (NSEvent*)pEvent; +-(void)otherMouseUp: (NSEvent*)pEvent; +-(void)scrollWheel: (NSEvent*)pEvent; +-(void)magnifyWithEvent: (NSEvent*)pEvent; +-(void)rotateWithEvent: (NSEvent*)pEvent; +-(void)swipeWithEvent: (NSEvent*)pEvent; +-(void)keyDown: (NSEvent*)pEvent; +-(void)flagsChanged: (NSEvent*)pEvent; +-(void)sendMouseEventToFrame:(NSEvent*)pEvent button:(USHORT)nButton eventtype:(USHORT)nEvent; +-(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar; +-(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod; +-(MacOSBOOL)sendKeyToFrameDirect: (USHORT)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod; +-(MacOSBOOL)sendSingleCharacter:(NSEvent*)pEvent; +-(MacOSBOOL)handleKeyDownException:(NSEvent*)pEvent; +-(void)clearLastEvent; +/* + text action methods +*/ +-(void)insertText:(id)aString; +-(void)insertTab: (id)aSender; +-(void)insertBacktab: (id)aSender; +-(void)moveLeft: (id)aSender; +-(void)moveLeftAndModifySelection: (id)aSender; +-(void)moveBackwardAndModifySelection: (id)aSender; +-(void)moveRight: (id)aSender; +-(void)moveRightAndModifySelection: (id)aSender; +-(void)moveForwardAndModifySelection: (id)aSender; +-(void)moveUp: (id)aSender; +-(void)moveDown: (id)aSender; +-(void)moveWordBackward: (id)aSender; +-(void)moveWordBackwardAndModifySelection: (id)aSender; +-(void)moveWordLeftAndModifySelection: (id)aSender; +-(void)moveWordForward: (id)aSender; +-(void)moveWordForwardAndModifySelection: (id)aSender; +-(void)moveWordRightAndModifySelection: (id)aSender; +-(void)moveToEndOfLine: (id)aSender; +-(void)moveToRightEndOfLine: (id)aSender; +-(void)moveToLeftEndOfLine: (id)aSender; +-(void)moveToEndOfLineAndModifySelection: (id)aSender; +-(void)moveToRightEndOfLineAndModifySelection: (id)aSender; +-(void)moveToLeftEndOfLineAndModifySelection: (id)aSender; +-(void)moveToBeginningOfLine: (id)aSender; +-(void)moveToBeginningOfLineAndModifySelection: (id)aSender; +-(void)moveToEndOfParagraph: (id)aSender; +-(void)moveToEndOfParagraphAndModifySelection: (id)aSender; +-(void)moveToBeginningOfParagraph: (id)aSender; +-(void)moveToBeginningOfParagraphAndModifySelection: (id)aSender; +-(void)moveParagraphForward: (id)aSender; +-(void)moveParagraphForwardAndModifySelection: (id)aSender; +-(void)moveParagraphBackward: (id)aSender; +-(void)moveParagraphBackwardAndModifySelection: (id)aSender; +-(void)moveToEndOfDocument: (id)aSender; +-(void)scrollToEndOfDocument: (id)aSender; +-(void)moveToEndOfDocumentAndModifySelection: (id)aSender; +-(void)moveToBeginningOfDocument: (id)aSender; +-(void)scrollToBeginningOfDocument: (id)aSender; +-(void)moveToBeginningOfDocumentAndModifySelection: (id)aSender; +-(void)insertNewline: (id)aSender; +-(void)deleteBackward: (id)aSender; +-(void)deleteForward: (id)aSender; +-(void)cancelOperation: (id)aSender; +-(void)deleteBackwardByDecomposingPreviousCharacter: (id)aSender; +-(void)deleteWordBackward: (id)aSender; +-(void)deleteWordForward: (id)aSender; +-(void)deleteToBeginningOfLine: (id)aSender; +-(void)deleteToEndOfLine: (id)aSender; +-(void)deleteToBeginningOfParagraph: (id)aSender; +-(void)deleteToEndOfParagraph: (id)aSender; +-(void)insertLineBreak: (id)aSender; +-(void)insertParagraphSeparator: (id)aSender; +-(void)selectWord: (id)aSender; +-(void)selectLine: (id)aSender; +-(void)selectParagraph: (id)aSender; +-(void)selectAll: (id)aSender; +-(void)noop: (id)aSender; +/* set the correct pointer for our view */ +-(void)resetCursorRects; +-(::com::sun::star::accessibility::XAccessibleContext *)accessibleContext; +-(id)parentAttribute; +-(NSView *)viewElementForParent; +/* + Event hook for D&D service. + + A drag operation will be invoked on a NSView using + the method 'dragImage'. This method requires the + actual mouse event initiating this drag operation. + Mouse events can only be received by subclassing + NSView and overriding methods like 'mouseDown' etc. + hence we implement a event hook here so that the + D&D service can register as listener for mouse + messages and use the last 'mouseDown' or + 'mouseDragged' message to initiate the drag + operation. +*/ +-(void)registerMouseEventListener: (id)theListener; +-(void)unregisterMouseEventListener: (id)theListener; + +/* NSDraggingDestination protocol methods + */ +-(NSDragOperation)draggingEntered:(id )sender; +-(NSDragOperation)draggingUpdated:(id )sender; +-(void)draggingExited:(id )sender; +-(MacOSBOOL)prepareForDragOperation:(id )sender; +-(MacOSBOOL)performDragOperation:(id )sender; +-(void)concludeDragOperation:(id )sender; + +-(void)registerDraggingDestinationHandler:(id)theHandler; +-(void)unregisterDraggingDestinationHandler:(id)theHandler; + +@end + +#endif diff --git a/vcl/inc/aqua/salgdi.h b/vcl/inc/aqua/salgdi.h new file mode 100644 index 000000000000..457ffa2acdf2 --- /dev/null +++ b/vcl/inc/aqua/salgdi.h @@ -0,0 +1,417 @@ +/************************************************************************* + * + * 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 _SV_SALGDI_H +#define _SV_SALGDI_H + +#include "basegfx/polygon/b2dpolypolygon.hxx" + +#include "premac.h" +#include +#include "postmac.h" + +#include "aqua/aquavcltypes.h" + +#include "outfont.hxx" +#include "salgdi.hxx" + +#include + +class AquaSalFrame; +class AquaSalBitmap; +class ImplDevFontAttributes; + +class CGRect; + +// mac specific physically available font face +class ImplMacFontData : public ImplFontData +{ +public: + ImplMacFontData( const ImplDevFontAttributes&, ATSUFontID ); + + virtual ~ImplMacFontData(); + + virtual ImplFontData* Clone() const; + virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const; + virtual sal_IntPtr GetFontId() const; + + const ImplFontCharMap* GetImplFontCharMap() const; + bool HasChar( sal_uInt32 cChar ) const; + + void ReadOs2Table() const; + void ReadMacCmapEncoding() const; + bool HasCJKSupport() const; + +private: + const ATSUFontID mnFontId; + mutable const ImplFontCharMap* mpCharMap; + mutable bool mbOs2Read; // true if OS2-table related info is valid + mutable bool mbHasOs2Table; + mutable bool mbCmapEncodingRead; // true if cmap encoding of Mac font is read + mutable bool mbHasCJKSupport; // #i78970# CJK fonts need extra leading +}; + +// abstracting quartz color instead of having to use an CGFloat[] array +class RGBAColor +{ +public: + RGBAColor( SalColor ); + RGBAColor( float fRed, float fGreen, float fBlue, float fAlpha ); //NOTUSEDYET + const float* AsArray() const { return &mfRed; } + bool IsVisible() const { return (mfAlpha > 0); } + void SetAlpha( float fAlpha ) { mfAlpha = fAlpha; } +private: + float mfRed, mfGreen, mfBlue, mfAlpha; +}; + +// ------------------- +// - AquaSalGraphics - +// ------------------- +class AquaSalGraphics : public SalGraphics +{ + friend class ATSLayout; +protected: + AquaSalFrame* mpFrame; + CGLayerRef mxLayer; // Quartz graphics layer + CGContextRef mrContext; // Quartz drawing context + class XorEmulation* mpXorEmulation; + int mnXorMode; // 0: off 1: on 2: invert only + int mnWidth; + int mnHeight; + int mnBitmapDepth; // zero unless bitmap + /// device resolution of this graphics + long mnRealDPIX; + long mnRealDPIY; + /// some graphics implementations (e.g. AquaSalInfoPrinter) scale + /// everything down by a factor (see SetupPrinterGraphics for details) + /// so we have to compensate for it with the inverse factor + double mfFakeDPIScale; + + /// path representing current clip region + CGMutablePathRef mxClipPath; + + /// Drawing colors + /// pen color RGBA + RGBAColor maLineColor; + /// brush color RGBA + RGBAColor maFillColor; + + // Device Font settings + const ImplMacFontData* mpMacFontData; + /// ATSU style object which carries all font attributes + ATSUStyle maATSUStyle; + /// text rotation as ATSU angle + Fixed mnATSUIRotation; + /// workaround to prevent ATSU overflows for huge font sizes + float mfFontScale; + /// <1.0: font is squeezed, >1.0 font is stretched, else 1.0 + float mfFontStretch; + /// allows text to be rendered without antialiasing + bool mbNonAntialiasedText; + + // Graphics types + + /// is this a printer graphics + bool mbPrinter; + /// is this a virtual device graphics + bool mbVirDev; + /// is this a window graphics + bool mbWindow; + +public: + AquaSalGraphics(); + virtual ~AquaSalGraphics(); + + bool IsPenVisible() const { return maLineColor.IsVisible(); } + bool IsBrushVisible() const { return maFillColor.IsVisible(); } + + void SetWindowGraphics( AquaSalFrame* pFrame ); + void SetPrinterGraphics( CGContextRef, long nRealDPIX, long nRealDPIY, double fFakeScale ); + void SetVirDevGraphics( CGLayerRef, CGContextRef, int nBitDepth = 0 ); + + void initResolution( NSWindow* ); + void copyResolution( AquaSalGraphics& ); + void updateResolution(); + + bool IsWindowGraphics() const { return mbWindow; } + bool IsPrinterGraphics() const { return mbPrinter; } + bool IsVirDevGraphics() const { return mbVirDev; } + AquaSalFrame* getGraphicsFrame() const { return mpFrame; } + void setGraphicsFrame( AquaSalFrame* pFrame ) { mpFrame = pFrame; } + + void ImplDrawPixel( long nX, long nY, const RGBAColor& ); // helper to draw single pixels + + bool CheckContext(); + void UpdateWindow( NSRect& ); // delivered in NSView coordinates + void RefreshRect( const CGRect& ); + void RefreshRect( const NSRect& ); + void RefreshRect(float lX, float lY, float lWidth, float lHeight); + + void SetState(); + void UnsetState(); + // InvalidateContext does an UnsetState and sets mrContext to 0 + void InvalidateContext(); + + virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ); + virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ); + + // draw --> LineColor and FillColor and RasterOp and ClipRegion + virtual void drawPixel( long nX, long nY ); + virtual void drawPixel( long nX, long nY, SalColor nSalColor ); + virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ); + virtual void drawRect( long nX, long nY, long nWidth, long nHeight ); + virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry ); + virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry ); + virtual void drawPolyPolygon( ULONG nPoly, const ULONG* pPoints, PCONSTSALPOINT* pPtAry ); + virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency ); + virtual sal_Bool drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ); + virtual sal_Bool drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ); + virtual sal_Bool drawPolyPolygonBezier( ULONG nPoly, const ULONG* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry ); + virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin ); + + // CopyArea --> No RasterOp, but ClipRegion + virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, + long nSrcHeight, USHORT nFlags ); + + // CopyBits and DrawBitmap --> RasterOp and ClipRegion + // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics + virtual void copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics ); + virtual void drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap ); + virtual void drawBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + SalColor nTransparentColor ); + virtual void drawBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + const SalBitmap& rTransparentBitmap ); + virtual void drawMask( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + SalColor nMaskColor ); + + virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight ); + virtual SalColor getPixel( long nX, long nY ); + + // invert --> ClipRegion (only Windows or VirDevs) + virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags); + virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags ); + + virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ); + + virtual bool drawAlphaBitmap( const SalTwoRect&, + const SalBitmap& rSourceBitmap, + const SalBitmap& rAlphaBitmap ); + + virtual bool drawAlphaRect( long nX, long nY, long nWidth, + long nHeight, sal_uInt8 nTransparency ); + + CGPoint* makeCGptArray(ULONG nPoints, const SalPoint* pPtAry); + // native widget rendering methods that require mirroring + virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + const Point& aPos, BOOL& rIsInside ); + virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + ControlState nState, const ImplControlValue& aValue, + const rtl::OUString& aCaption ); + virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + ControlState nState, const ImplControlValue& aValue, + const rtl::OUString& aCaption ); + virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, + const ImplControlValue& aValue, const rtl::OUString& aCaption, + Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ); + + // get device resolution + virtual void GetResolution( long& rDPIX, long& rDPIY ); + // get the depth of the device + virtual USHORT GetBitCount(); + // get the width of the device + virtual long GetGraphicsWidth() const; + + // set the clip region to empty + virtual void ResetClipRegion(); + // begin setting the clip region, add rectangles to the + // region with the UnionClipRegion call + virtual void BeginSetClipRegion( ULONG nCount ); + // all rectangles were added and the clip region should be set now + virtual void EndSetClipRegion(); + + // set the line color to transparent (= don't draw lines) + virtual void SetLineColor(); + // set the line color to a specific color + virtual void SetLineColor( SalColor nSalColor ); + // set the fill color to transparent (= don't fill) + virtual void SetFillColor(); + // set the fill color to a specific color, shapes will be + // filled accordingly + virtual void SetFillColor( SalColor nSalColor ); + // enable/disable XOR drawing + virtual void SetXORMode( bool bSet, bool bInvertOnly ); + // set line color for raster operations + virtual void SetROPLineColor( SalROPColor nROPColor ); + // set fill color for raster operations + virtual void SetROPFillColor( SalROPColor nROPColor ); + // set the text color to a specific color + virtual void SetTextColor( SalColor nSalColor ); + // set the font + virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel ); + // get the current font's etrics + virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ); + // get kernign pairs of the current font + // return only PairCount if (pKernPairs == NULL) + virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs ); + // get the repertoire of the current font + virtual const ImplFontCharMap* GetImplFontCharMap() const; + // graphics must fill supplied font list + virtual void GetDevFontList( ImplDevFontList* ); + // graphics should call ImplAddDevFontSubstitute on supplied + // OutputDevice for all its device specific preferred font substitutions + virtual void GetDevFontSubstList( OutputDevice* ); + virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ); + // CreateFontSubset: a method to get a subset of glyhps of a font + // inside a new valid font file + // returns TRUE if creation of subset was successfull + // parameters: rToFile: contains a osl file URL to write the subset to + // pFont: describes from which font to create a subset + // pGlyphIDs: the glyph ids to be extracted + // pEncoding: the character code corresponding to each glyph + // pWidths: the advance widths of the correspoding glyphs (in PS font units) + // nGlyphs: the number of glyphs + // rInfo: additional outgoing information + // implementation note: encoding 0 with glyph id 0 should be added implicitly + // as "undefined character" + virtual BOOL CreateFontSubset( const rtl::OUString& rToFile, + const ImplFontData* pFont, + long* pGlyphIDs, + sal_uInt8* pEncoding, + sal_Int32* pWidths, + int nGlyphs, + FontSubsetInfo& rInfo // out parameter + ); + + // GetFontEncodingVector: a method to get the encoding map Unicode + // to font encoded character; this is only used for type1 fonts and + // may return NULL in case of unknown encoding vector + // if ppNonEncoded is set and non encoded characters (that is type1 + // glyphs with only a name) exist it is set to the corresponding + // map for non encoded glyphs; the encoding vector contains -1 + // as encoding for these cases + virtual const Ucs2SIntMap* GetFontEncodingVector( const ImplFontData*, const Ucs2OStrMap** ppNonEncoded ); + + // GetEmbedFontData: gets the font data for a font marked + // embeddable by GetDevFontList or NULL in case of error + // parameters: pFont: describes the font in question + // pWidths: the widths of all glyphs from char code 0 to 255 + // pWidths MUST support at least 256 members; + // rInfo: additional outgoing information + // pDataLen: out parameter, contains the byte length of the returned buffer + virtual const void* GetEmbedFontData( const ImplFontData*, + const sal_Ucs* pUnicodes, + sal_Int32* pWidths, + FontSubsetInfo& rInfo, + long* pDataLen ); + // frees the font data again + virtual void FreeEmbedFontData( const void* pData, long nDataLen ); + + virtual void GetGlyphWidths( const ImplFontData*, + bool bVertical, + Int32Vector& rWidths, + Ucs2UIntMap& rUnicodeEnc ); + + virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& ); + virtual BOOL GetGlyphOutline( long nIndex, basegfx::B2DPolyPolygon& ); + + virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ); + virtual void DrawServerFontLayout( const ServerFontLayout& ); + virtual bool supportsOperation( OutDevSupportType ) const; + + // Query the platform layer for control support + virtual BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart ); + + virtual SystemGraphicsData GetGraphicsData() const; + virtual SystemFontData GetSysFontData( int /* nFallbacklevel */ ) const; + +private: + // differences between VCL, Quartz and kHiThemeOrientation coordinate systems + // make some graphics seem to be vertically-mirrored from a VCL perspective + bool IsFlipped() const { return mbWindow; } + + void ApplyXorContext(); + void Pattern50Fill(); + UInt32 getState( ControlState nState ); + UInt32 getTrackState( ControlState nState ); +}; + +class XorEmulation +{ +public: + XorEmulation(); + /*final*/ ~XorEmulation(); + + void SetTarget( int nWidth, int nHeight, int nBitmapDepth, CGContextRef, CGLayerRef ); + bool UpdateTarget(); + void Enable() { mbIsEnabled = true; } + void Disable() { mbIsEnabled = false; } + bool IsEnabled() const { return mbIsEnabled; } + CGContextRef GetTargetContext() const { return mxTargetContext; } + CGContextRef GetMaskContext() const { return (mbIsEnabled ? mxMaskContext : NULL); } + +private: + CGLayerRef mxTargetLayer; + CGContextRef mxTargetContext; + CGContextRef mxMaskContext; + CGContextRef mxTempContext; + ULONG* mpMaskBuffer; + ULONG* mpTempBuffer; + int mnBufferLongs; + bool mbIsEnabled; +}; + + +// --- some trivial inlines + +inline void AquaSalGraphics::RefreshRect( const CGRect& rRect ) +{ + RefreshRect( rRect.origin.x, rRect.origin.y, rRect.size.width, rRect.size.height ); +} + +inline void AquaSalGraphics::RefreshRect( const NSRect& rRect ) +{ + RefreshRect( rRect.origin.x, rRect.origin.y, rRect.size.width, rRect.size.height ); +} + +inline RGBAColor::RGBAColor( SalColor nSalColor ) +: mfRed( SALCOLOR_RED(nSalColor) * (1.0/255)) +, mfGreen( SALCOLOR_GREEN(nSalColor) * (1.0/255)) +, mfBlue( SALCOLOR_BLUE(nSalColor) * (1.0/255)) +, mfAlpha( 1.0 ) // opaque +{} + +inline RGBAColor::RGBAColor( float fRed, float fGreen, float fBlue, float fAlpha ) +: mfRed( fRed ) +, mfGreen( fGreen ) +, mfBlue( fBlue ) +, mfAlpha( fAlpha ) +{} + +#endif // _SV_SALGDI_H diff --git a/vcl/inc/aqua/salinst.h b/vcl/inc/aqua/salinst.h new file mode 100644 index 000000000000..7cd87aa6af26 --- /dev/null +++ b/vcl/inc/aqua/salinst.h @@ -0,0 +1,203 @@ +/************************************************************************* + * + * 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 _SV_SALINST_H +#define _SV_SALINST_H + +#include "vos/mutex.hxx" +#include "vos/thread.hxx" +#include "osl/conditn.h" + +#include "aqua/aquavcltypes.h" + +#include "salinst.hxx" + +#include + +class AquaSalFrame; +class ApplicationEvent; +class Image; + +// ----------------- +// - SalYieldMutex - +// ----------------- + +class SalYieldMutex : public vos::OMutex +{ + ULONG mnCount; + vos::OThread::TThreadIdentifier mnThreadId; + +public: + SalYieldMutex(); + virtual void acquire(); + virtual void release(); + virtual sal_Bool tryToAcquire(); + ULONG GetAcquireCount() const { return mnCount; } + vos::OThread::TThreadIdentifier GetThreadId() const { return mnThreadId; } +}; + +#define YIELD_GUARD vos::OGuard aGuard( GetSalData()->mpFirstInstance->GetYieldMutex() ) + + +// ------------------- +// - SalInstanceData - +// ------------------- + +//struct SalInstanceData +//{ +//public: +//}; + +// ------------------ +// - AquaSalInstance - +// ------------------ + +class AquaSalInstance : public SalInstance +{ + struct SalUserEvent + { + AquaSalFrame* mpFrame; + void* mpData; + USHORT mnType; + + SalUserEvent( AquaSalFrame* pFrame, void* pData, USHORT nType ) : + mpFrame( pFrame ), mpData( pData ), mnType( nType ) + {} + }; + +public: + SalYieldMutex* mpSalYieldMutex; // Sal-Yield-Mutex + rtl::OUString maDefaultPrinter; + vos::OThread::TThreadIdentifier maMainThread; + bool mbWaitingYield; + int mnActivePrintJobs; + std::list< SalUserEvent > maUserEvents; + oslMutex maUserEventListMutex; + oslCondition maWaitingYieldCond; + + typedef std::list AppEventList; + static AppEventList aAppEventList; + +public: + AquaSalInstance(); + virtual ~AquaSalInstance(); + + virtual SalSystem* CreateSystem(); + virtual void DestroySystem(SalSystem*); + virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle ); + virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle ); + virtual void DestroyFrame( SalFrame* pFrame ); + virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE ); + virtual void DestroyObject( SalObject* pObject ); + virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics, + long nDX, long nDY, + USHORT nBitCount, const SystemGraphicsData *pData ); + virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice ); + + virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo, + ImplJobSetup* pSetupData ); + virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter ); + virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter ); + virtual void DestroyPrinter( SalPrinter* pPrinter ); + virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList ); + virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo ); + virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ); + virtual String GetDefaultPrinter(); + virtual SalTimer* CreateSalTimer(); + virtual SalI18NImeStatus* CreateI18NImeStatus(); + virtual SalSystem* CreateSalSystem(); + virtual SalBitmap* CreateSalBitmap(); + virtual vos::IMutex* GetYieldMutex(); + virtual ULONG ReleaseYieldMutex(); + virtual void AcquireYieldMutex( ULONG nCount ); + virtual bool CheckYieldMutex(); + virtual void Yield( bool bWait, bool bHandleAllCurrentEvents ); + virtual bool AnyInput( USHORT nType ); + virtual SalMenu* CreateMenu( BOOL bMenuBar, Menu* pVCLMenu ); + virtual void DestroyMenu( SalMenu* ); + virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData ); + virtual void DestroyMenuItem( SalMenuItem* ); + virtual SalSession* CreateSalSession(); + virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ); + virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType); + virtual void SetEventCallback( void* pInstance, bool(*pCallback)(void*,void*,int) ); + virtual void SetErrorEventCallback( void* pInstance, bool(*pCallback)(void*,void*,int) ); + + // dtrans implementation + virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > + CreateClipboard( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& i_rArguments ); + virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDragSource(); + virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDropTarget(); + + static void handleAppDefinedEvent( NSEvent* pEvent ); + + // check whether a particular string is passed on the command line + // this is needed to avoid duplicate open events through a) command line and b) NSApp's openFile + static bool isOnCommandLine( const rtl::OUString& ); + + void wakeupYield(); + + public: + friend class AquaSalFrame; + + void PostUserEvent( AquaSalFrame* pFrame, USHORT nType, void* pData ); + void delayedSettingsChanged( bool bInvalidate ); + + bool isNSAppThread() const; + + void startedPrintJob() { mnActivePrintJobs++; } + void endedPrintJob() { mnActivePrintJobs--; } + + // event subtypes for NSApplicationDefined events + static const short AppExecuteSVMain = 0x7fff; + static const short AppEndLoopEvent = 1; + static const short AppStartTimerEvent = 10; + static const short AppleRemoteEvent = 15; + static const short YieldWakeupEvent = 20; + + static NSMenu* GetDynamicDockMenu(); +}; + +// helper class: inverted solar guard +class YieldMutexReleaser +{ + ULONG mnCount; + public: + YieldMutexReleaser(); + ~YieldMutexReleaser(); +}; + +// helper class +rtl::OUString GetOUString( CFStringRef ); +rtl::OUString GetOUString( NSString* ); +CFStringRef CreateCFString( const rtl::OUString& ); +NSString* CreateNSString( const rtl::OUString& ); + +CGImageRef CreateCGImage( const Image& ); +NSImage* CreateNSImage( const Image& ); + +#endif // _SV_SALINST_H diff --git a/vcl/inc/aqua/salmathutils.hxx b/vcl/inc/aqua/salmathutils.hxx new file mode 100755 index 000000000000..6106dc328740 --- /dev/null +++ b/vcl/inc/aqua/salmathutils.hxx @@ -0,0 +1,87 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SV_SALMATHUTILS_HXX +#define _SV_SALMATHUTILS_HXX + +#ifdef __cplusplus +extern "C" { +#endif + +// ------------------------------------------------------------------ +// +// Structures +// +// ------------------------------------------------------------------ + +// LRectCoor is an abreviation for rectangular coordinates +// represented as long integers + +struct LRectCoor +{ + long x; + long y; + long z; +}; + +// ------------------------------------------------------------------ +// +// Type Definitions +// +// ------------------------------------------------------------------ + +// LRectCoorVec is an abreviation for vectors in rectangular +// coordinates represented as long integers + +typedef struct LRectCoor LRectCoor; +typedef LRectCoor *LRectCoorVector; +typedef LRectCoorVector *LRectCoorTensor; + +// ------------------------------------------------------------------ +// +// Function Headers +// +// ------------------------------------------------------------------ + +void CSwap ( char &rX, char &rY ); +void UCSwap ( unsigned char &rX, unsigned char &rY ); +void SSwap ( short &rX, short &rY ); +void USSwap ( unsigned short &rX, unsigned short &rY ); +void LSwap ( long &rX, long &rY ); +void ULSwap ( unsigned long &rX, unsigned long &rY ); + +// ------------------------------------------------------------------ + +unsigned long Euclidian2Norm ( const LRectCoorVector pVec ); + +// ------------------------------------------------------------------ + +#ifdef __cplusplus +} +#endif + +#endif // _SV_SALMATHUTILS_HXX diff --git a/vcl/inc/aqua/salmenu.h b/vcl/inc/aqua/salmenu.h new file mode 100644 index 000000000000..e0fe5c679388 --- /dev/null +++ b/vcl/inc/aqua/salmenu.h @@ -0,0 +1,120 @@ +/************************************************************************* + * + * 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 _SV_SALMENU_H +#define _SV_SALMENU_H + +#include "premac.h" +#include +#include "postmac.h" + +#include "salmenu.hxx" + +#include + +class AquaSalFrame; +class AquaSalMenuItem; + +class AquaSalMenu : public SalMenu +{ + std::vector< AquaSalMenuItem* > maItems; + +public: // for OOStatusView + struct MenuBarButtonEntry + { + SalMenuButtonItem maButton; + NSImage* mpNSImage; // cached image + NSString* mpToolTipString; + + MenuBarButtonEntry() : mpNSImage( nil ), mpToolTipString( nil ) {} + MenuBarButtonEntry( const SalMenuButtonItem& i_rItem ) + : maButton( i_rItem), mpNSImage( nil ), mpToolTipString( nil ) {} + }; +private: + std::vector< MenuBarButtonEntry > maButtons; + + MenuBarButtonEntry* findButtonItem( USHORT i_nItemId ); + void releaseButtonEntry( MenuBarButtonEntry& i_rEntry ); + static void statusLayout(); +public: + AquaSalMenu( bool bMenuBar ); + virtual ~AquaSalMenu(); + + virtual BOOL VisibleMenuBar(); // must return TRUE to actually DISPLAY native menu bars + // otherwise only menu messages are processed (eg, OLE on Windows) + + virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ); + virtual void RemoveItem( unsigned nPos ); + virtual void SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos ); + virtual void SetFrame( const SalFrame* pFrame ); + virtual void CheckItem( unsigned nPos, BOOL bCheck ); + virtual void EnableItem( unsigned nPos, BOOL bEnable ); + virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText ); + virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage); + virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName ); + virtual void GetSystemMenuData( SystemMenuData* pData ); + virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, ULONG nFlags); + virtual bool AddMenuBarButton( const SalMenuButtonItem& ); + virtual void RemoveMenuBarButton( USHORT nId ); + virtual Rectangle GetMenuBarButtonRectPixel( USHORT i_nItemId, SalFrame* i_pReferenceFrame ); + + int getItemIndexByPos( USHORT nPos ) const; + const AquaSalFrame* getFrame() const; + + void setMainMenu(); + static void unsetMainMenu(); + static void setDefaultMenu(); + static void enableMainMenu( bool bEnable ); + static void addFallbackMenuItem( NSMenuItem* NewItem ); + static void removeFallbackMenuItem( NSMenuItem* pOldItem ); + + const std::vector< MenuBarButtonEntry >& getButtons() const { return maButtons; } + + bool mbMenuBar; // true - Menubar, false - Menu + NSMenu* mpMenu; // The Carbon reference to this menu + Menu* mpVCLMenu; // the corresponding vcl Menu object + const AquaSalFrame* mpFrame; // the frame to dispatch the menu events to + AquaSalMenu* mpParentSalMenu; // the parent menu that contains us (and perhaps has a frame) + + static const AquaSalMenu* pCurrentMenuBar; + +}; + +class AquaSalMenuItem : public SalMenuItem +{ +public: + AquaSalMenuItem( const SalItemParams* ); + virtual ~AquaSalMenuItem(); + + USHORT mnId; // Item ID + Menu* mpVCLMenu; // VCL Menu into which this MenuItem is inserted + AquaSalMenu* mpParentMenu; // The menu in which this menu item is inserted + AquaSalMenu* mpSubMenu; // Sub menu of this item (if defined) + NSMenuItem* mpMenuItem; // The NSMenuItem +}; + +#endif // _SV_SALMENU_H diff --git a/vcl/inc/aqua/salnativewidgets.h b/vcl/inc/aqua/salnativewidgets.h new file mode 100755 index 000000000000..11d4ea5c1c62 --- /dev/null +++ b/vcl/inc/aqua/salnativewidgets.h @@ -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. + * + ************************************************************************/ + +#ifndef _SV_NATIVEWIDGETS_H +#define _SV_NATIVEWIDGETS_H + +// since 10.4 ... no metrics are returned, and we have to fix the values +#define BUTTON_WIDTH 16 +#define BUTTON_HEIGHT 17 + +//standard height of the AHIG +//tabs +#define TAB_HEIGHT_NORMAL 20 +#define TAB_HEIGHT_SMALL 17 +#define TAB_HEIGHT_MINI 15 + +#define TAB_TEXT_OFFSET 12 +#define VCL_TAB_TEXT_OFFSET 2 + +//listboxes, comboboxes (they have the same dimensions) +#define COMBOBOX_HEIGHT_NORMAL 20 +#define DROPDOWN_BUTTON_WIDTH 20 + +//text edit +#define TEXT_EDIT_HEIGHT_NORMAL 22 + +//spin box +#define SPIN_BUTTON_SPACE 2 +#define SPIN_BUTTON_WIDTH 13 +#define SPIN_UPPER_BUTTON_HEIGHT 11 +#define SPIN_LOWER_BUTTON_HEIGHT 10 +#define SPIN_TWO_BUTTONS_HEIGHT 21 + +// progress bar +#define INTRO_PROGRESS_HEIGHT 9 + +// for some controls, like spinbuttons + spinboxes, or listboxes +// we need it to adjust text position beside radio and check buttons + +#define TEXT_SEPARATOR 3 + +// extra border for focus ring +#define FOCUS_RING_WIDTH 4 + +#define CLIP_FUZZ 1 + +#endif // _SV_NATIVEWIDGETS_H diff --git a/vcl/inc/aqua/salnsmenu.h b/vcl/inc/aqua/salnsmenu.h new file mode 100755 index 000000000000..e9b2cbe922b8 --- /dev/null +++ b/vcl/inc/aqua/salnsmenu.h @@ -0,0 +1,68 @@ +/************************************************************************* + * + * 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 _VCL_SALNSMENU_H +#define _VCL_SALNSMENU_H + +class AquaSalMenu; +class AquaSalMenuItem; + +@interface OOStatusItemView : NSView +{ +} +-(void)drawRect: (NSRect)aRect; +-(void)layout; +-(void)mouseUp: (NSEvent *)pEvent; +@end + +@interface SalNSMenu : NSMenu +{ + /* Caution: SalNSMenu instances occasionally are binary copied + in AquaSalMenu::ShowNativePopupMenu. If any members are added, + please take this into account ! + */ + AquaSalMenu* mpMenu; +} +-(id)initWithMenu: (AquaSalMenu*)pMenu; +-(void)menuNeedsUpdate: (NSMenu*)pMenu; +-(void)setSalMenu: (AquaSalMenu*)pMenu; +@end + +@interface SalNSMenuItem : NSMenuItem +{ + /* Caution: SalNSMenuItem instances occasionally are binary copied + in AquaSalMenu::ShowNativePopupMenu. If any members are added, + please take this into account ! + */ + AquaSalMenuItem* mpMenuItem; +} +-(id)initWithMenuItem: (AquaSalMenuItem*)pMenuItem; +-(void)menuItemTriggered: (id)aSender; +@end + + +#endif diff --git a/vcl/inc/aqua/salnstimer.h b/vcl/inc/aqua/salnstimer.h new file mode 100755 index 000000000000..e29fef43b6b4 --- /dev/null +++ b/vcl/inc/aqua/salnstimer.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _VCL_SALNSTIMER_H +#define _VCL_SALNSTIMER_H + +#include "premac.h" +#include "Cocoa/Cocoa.h" +#include "postmac.h" + +@interface TimerCallbackCaller : NSObject +{ +} +-(void)timerElapsed:(NSTimer*)pTimer; +@end + +#endif diff --git a/vcl/inc/aqua/salobj.h b/vcl/inc/aqua/salobj.h new file mode 100644 index 000000000000..3142c1d9d9fc --- /dev/null +++ b/vcl/inc/aqua/salobj.h @@ -0,0 +1,86 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SV_SALOBJ_H +#define _SV_SALOBJ_H + +#include "vcl/sysdata.hxx" +#include "salobj.hxx" + +class AquaSalFrame; +class AquaSalObject; + + +// ----------------- +// - SalObjectData - +// ----------------- + +struct SalObjectData +{ +}; + +class AquaSalObject : public SalObject +{ +public: + AquaSalFrame* mpFrame; // parent frame + NSClipView* mpClipView; + SystemEnvData maSysData; + + long mnClipX; + long mnClipY; + long mnClipWidth; + long mnClipHeight; + bool mbClip; + + long mnX; + long mnY; + long mnWidth; + long mnHeight; + + + void setClippedPosSize(); + + + AquaSalObject( AquaSalFrame* pFrame ); + virtual ~AquaSalObject(); + + virtual void ResetClipRegion(); + virtual USHORT GetClipRegionType(); + virtual void BeginSetClipRegion( ULONG nRects ); + virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); + virtual void EndSetClipRegion(); + virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ); + virtual void Show( BOOL bVisible ); + virtual void Enable( BOOL nEnable ); + virtual void GrabFocus(); + virtual void SetBackground(); + virtual void SetBackground( SalColor nSalColor ); + virtual const SystemEnvData* GetSystemData() const; + virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ); +}; + +#endif // _SV_SALOBJ_H diff --git a/vcl/inc/aqua/salprn.h b/vcl/inc/aqua/salprn.h new file mode 100644 index 000000000000..dfc03c806dc9 --- /dev/null +++ b/vcl/inc/aqua/salprn.h @@ -0,0 +1,171 @@ +/************************************************************************* + * + * 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 _SV_SALPRN_H +#define _SV_SALPRN_H + +#include "aqua/aquavcltypes.h" + +#include "salprn.hxx" + +#include + + +// --------------------- +// - AquaSalInfoPrinter - +// --------------------- + +class AquaSalGraphics; + +class AquaSalInfoPrinter : public SalInfoPrinter +{ + /// Printer graphics + AquaSalGraphics* mpGraphics; + /// is Graphics used + bool mbGraphics; + /// job active ? + bool mbJob; + + /// cocoa printer object + NSPrinter* mpPrinter; + /// cocoa print info object + NSPrintInfo* mpPrintInfo; + + /// FIXME: get real printer context for infoprinter if possible + /// fake context for info printer + /// graphics context for Quartz 2D + CGContextRef mrContext; + /// memory for graphics bitmap context for querying metrics + boost::shared_array< sal_uInt8 > maContextMemory; + + // since changes to NSPrintInfo during a job are ignored + // we have to care for some settings ourselves + // currently we do this for orientation; + // really needed however is a solution for paper formats + Orientation mePageOrientation; + + int mnStartPageOffsetX; + int mnStartPageOffsetY; + sal_Int32 mnCurPageRangeStart; + sal_Int32 mnCurPageRangeCount; + + public: + AquaSalInfoPrinter( const SalPrinterQueueInfo& pInfo ); + virtual ~AquaSalInfoPrinter(); + + void SetupPrinterGraphics( CGContextRef i_xContext ) const; + + virtual SalGraphics* GetGraphics(); + virtual void ReleaseGraphics( SalGraphics* i_pGraphics ); + virtual BOOL Setup( SalFrame* i_pFrame, ImplJobSetup* i_pSetupData ); + virtual BOOL SetPrinterData( ImplJobSetup* pSetupData ); + virtual BOOL SetData( ULONG i_nFlags, ImplJobSetup* i_pSetupData ); + virtual void GetPageInfo( const ImplJobSetup* i_pSetupData, + long& o_rOutWidth, long& o_rOutHeight, + long& o_rPageOffX, long& o_rPageOffY, + long& o_rPageWidth, long& o_rPageHeight ); + virtual ULONG GetCapabilities( const ImplJobSetup* i_pSetupData, USHORT i_nType ); + virtual ULONG GetPaperBinCount( const ImplJobSetup* i_pSetupData ); + virtual String GetPaperBinName( const ImplJobSetup* i_pSetupData, ULONG i_nPaperBin ); + virtual void InitPaperFormats( const ImplJobSetup* i_pSetupData ); + virtual int GetLandscapeAngle( const ImplJobSetup* i_pSetupData ); + + // the artificial separation between InfoPrinter and Printer + // is not really useful for us + // so let's make AquaSalPrinter just a forwarder to AquaSalInfoPrinter + // and concentrate the real work in one class + // implement pull model print system + BOOL StartJob( const String* i_pFileName, + const String& rJobName, + const String& i_rAppName, + ImplJobSetup* i_pSetupData, + vcl::PrinterController& i_rController ); + BOOL EndJob(); + BOOL AbortJob(); + SalGraphics* StartPage( ImplJobSetup* i_pSetupData, BOOL i_bNewJobData ); + BOOL EndPage(); + ULONG GetErrorCode() const; + + NSPrintInfo* getPrintInfo() const { return mpPrintInfo; } + void setStartPageOffset( int nOffsetX, int nOffsetY ) { mnStartPageOffsetX = nOffsetX; mnStartPageOffsetY = nOffsetY; } + sal_Int32 getCurPageRangeStart() const { return mnCurPageRangeStart; } + sal_Int32 getCurPageRangeCount() const { return mnCurPageRangeCount; } + + // match width/height against known paper formats, possibly switching orientation + const PaperInfo* matchPaper( long i_nWidth, long i_nHeight, Orientation& o_rOrientation ) const; + void setPaperSize( long i_nWidth, long i_nHeight, Orientation i_eSetOrientation ); + + private: + AquaSalInfoPrinter( const AquaSalInfoPrinter& ); + AquaSalInfoPrinter& operator=(const AquaSalInfoPrinter&); +}; + +// ----------------- +// - AquaSalPrinter - +// ----------------- + +class AquaSalPrinter : public SalPrinter +{ + AquaSalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter + public: + AquaSalPrinter( AquaSalInfoPrinter* i_pInfoPrinter ); + virtual ~AquaSalPrinter(); + + virtual BOOL StartJob( const XubString* i_pFileName, + const XubString& i_rJobName, + const XubString& i_rAppName, + ULONG i_nCopies, + bool i_bCollate, + bool i_bDirect, + ImplJobSetup* i_pSetupData ); + // implement pull model print system + virtual BOOL StartJob( const String* i_pFileName, + const String& rJobName, + const String& i_rAppName, + ImplJobSetup* i_pSetupData, + vcl::PrinterController& i_rListener ); + + virtual BOOL EndJob(); + virtual BOOL AbortJob(); + virtual SalGraphics* StartPage( ImplJobSetup* i_pSetupData, BOOL i_bNewJobData ); + virtual BOOL EndPage(); + virtual ULONG GetErrorCode(); + + private: + AquaSalPrinter( const AquaSalPrinter& ); + AquaSalPrinter& operator=(const AquaSalPrinter&); +}; + +const double fPtTo100thMM = 35.27777778; + +inline int PtTo10Mu( double nPoints ) { return (int)(((nPoints)*fPtTo100thMM)+0.5); } + +inline double TenMuToPt( double nUnits ) { return floor(((nUnits)/fPtTo100thMM)+0.5); } + + + +#endif // _SV_SALPRN_H diff --git a/vcl/inc/aqua/salsys.h b/vcl/inc/aqua/salsys.h new file mode 100644 index 000000000000..dbb2ea0b20ea --- /dev/null +++ b/vcl/inc/aqua/salsys.h @@ -0,0 +1,60 @@ +/************************************************************************* + * + * 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 _SV_SALSYS_H +#define _SV_SALSYS_H + +#include "salsys.hxx" + +#include + +// ----------------- +// - SalSystemData - +// ----------------- + +class VCL_DLLPUBLIC AquaSalSystem : public SalSystem +{ +public: + AquaSalSystem() {} + virtual ~AquaSalSystem(); + + // get info about the display + virtual unsigned int GetDisplayScreenCount(); + virtual bool IsMultiDisplay(); + virtual unsigned int GetDefaultDisplayNumber(); + virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ); + virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen ); + + virtual rtl::OUString GetScreenName( unsigned int nScreen ); + virtual int ShowNativeMessageBox( const String& rTitle, + const String& rMessage, + int nButtonCombination, + int nDefaultButton); +}; + + +#endif // _SV_SALSYS_H diff --git a/vcl/inc/aqua/saltimer.h b/vcl/inc/aqua/saltimer.h new file mode 100644 index 000000000000..ed6bafad87f1 --- /dev/null +++ b/vcl/inc/aqua/saltimer.h @@ -0,0 +1,54 @@ +/************************************************************************* +* + * 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 _SV_SALTIMER_H +#define _SV_SALTIMER_H + +#include "premac.h" +#include +#include "postmac.h" + +#include "saltimer.hxx" + +class AquaSalTimer : public SalTimer +{ + public: + + AquaSalTimer(); + virtual ~AquaSalTimer(); + + void Start( ULONG nMS ); + void Stop(); + + static void handleStartTimerEvent( NSEvent* pEvent ); + + + static NSTimer* pRunningTimer; + static bool bDispatchTimer; +}; + +#endif diff --git a/vcl/inc/aqua/salvd.h b/vcl/inc/aqua/salvd.h new file mode 100644 index 000000000000..cbf6a0275a37 --- /dev/null +++ b/vcl/inc/aqua/salvd.h @@ -0,0 +1,93 @@ +/************************************************************************* + * + * 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 _SV_SALVD_H +#define _SV_SALVD_H + +#include "premac.h" +#include +#include "postmac.h" + +#include "aqua/salconst.h" +#include "aqua/salcolorutils.hxx" +#include "aqua/salgdi.h" + +#include "salvd.hxx" + +#if PRAGMA_ONCE + #pragma once +#endif + +// ======================================================================= + +// ======================================================================= + +// ----------------- +// - SalVirDevData - +// ----------------- + +struct SalVirDevData +{ +}; + +typedef struct SalVirDevData SalVirDevData; +typedef SalVirDevData *SalVirDevDataPtr; +typedef SalVirDevDataPtr *SalVirDevDataHandle; + +// ======================================================================= + +class AquaSalGraphics; + +// ----------------- +// - SalVirDevData - +// ----------------- + +class AquaSalVirtualDevice : public SalVirtualDevice +{ +private: + bool mbGraphicsUsed; // is Graphics used + bool mbForeignContext; // is mxContext from outside VCL + CGContextRef mxBitmapContext; + int mnBitmapDepth; + CGLayerRef mxLayer; // Quartz layer + AquaSalGraphics* mpGraphics; // current VirDev graphics + + void Destroy(); + +public: + AquaSalVirtualDevice( AquaSalGraphics* pGraphic, long nDX, long nDY, USHORT nBitCount, const SystemGraphicsData *pData ); + virtual ~AquaSalVirtualDevice(); + + virtual SalGraphics* GetGraphics(); + virtual void ReleaseGraphics( SalGraphics* pGraphics ); + virtual BOOL SetSize( long nNewDX, long nNewDY ); + virtual void GetSize( long& rWidth, long& rHeight ); +}; + +// ======================================================================= + +#endif // _SV_SALVD_H diff --git a/vcl/inc/aqua/svsys.h b/vcl/inc/aqua/svsys.h new file mode 100644 index 000000000000..1edce25cea28 --- /dev/null +++ b/vcl/inc/aqua/svsys.h @@ -0,0 +1,35 @@ +/************************************************************************* + * + * 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 _SV_SVSYS_H +#define _SV_SVSYS_H + +#include "premac.h" +#include "Cocoa/Cocoa.h" +#include "postmac.h" + +#endif // _SV_SVSYS_H diff --git a/vcl/inc/aqua/vclnsapp.h b/vcl/inc/aqua/vclnsapp.h new file mode 100755 index 000000000000..59b070b421ea --- /dev/null +++ b/vcl/inc/aqua/vclnsapp.h @@ -0,0 +1,70 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _VCL_VCLNSAPP_H +#define _VCL_VCLNSAPP_H + +#include "premac.h" +#include "Cocoa/Cocoa.h" +#include "postmac.h" + +class AquaSalFrame; + +@interface CocoaThreadEnabler : NSObject +{ +} +-(void)enableCocoaThreads:(id)param; +@end + +// our very own application +@interface VCL_NSApplication : NSApplication +{ +} +-(void)sendEvent:(NSEvent*)pEvent; +-(void)sendSuperEvent:(NSEvent*)pEvent; +-(NSMenu*)applicationDockMenu:(NSApplication *)sender; +-(MacOSBOOL)application: (NSApplication*) app openFile: (NSString*)file; +-(void)application: (NSApplication*) app openFiles: (NSArray*)files; +-(MacOSBOOL)application: (NSApplication*) app printFile: (NSString*)file; +-(NSApplicationPrintReply)application: (NSApplication *) app printFiles:(NSArray *)files withSettings: (NSDictionary *)printSettings showPrintPanels:(MacOSBOOL)bShowPrintPanels; +-(NSApplicationTerminateReply)applicationShouldTerminate: (NSApplication *) app; +-(void)systemColorsChanged: (NSNotification*) pNotification; +-(void)screenParametersChanged: (NSNotification*) pNotification; +-(void)scrollbarVariantChanged: (NSNotification*) pNotification; +-(void)scrollbarSettingsChanged: (NSNotification*) pNotification; +-(void)addFallbackMenuItem: (NSMenuItem*)pNewItem; +-(void)removeFallbackMenuItem: (NSMenuItem*)pOldItem; +-(void)addDockMenuItem: (NSMenuItem*)pNewItem; +-(void)applicationWillBecomeActive: (NSNotification *)pNotification; +-(void)applicationWillResignActive: (NSNotification *)pNotification; +-(MacOSBOOL)applicationShouldHandleReopen: (NSApplication*)pApp hasVisibleWindows: (MacOSBOOL)bWinVisible; +-(void)setDockIconClickHandler: (NSObject*)pHandler; +-(void)cycleFrameForward: (AquaSalFrame*)pCurFrame; +-(void)cycleFrameBackward: (AquaSalFrame*)pCurFrame; +@end + +#endif diff --git a/vcl/inc/bmpfast.hxx b/vcl/inc/bmpfast.hxx new file mode 100644 index 000000000000..de330704b74f --- /dev/null +++ b/vcl/inc/bmpfast.hxx @@ -0,0 +1,51 @@ +/************************************************************************* + * + * 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 _SV_BMPFAST_HXX +#define _SV_BMPFAST_HXX + +class BitmapWriteAccess; +class BitmapReadAccess; +struct BitmapBuffer; +class BitmapColor; +class Size; +class Point; +struct SalTwoRect; + +// the bmpfast functions have signatures with good compatibility to +// their canonic counterparts, which employ the GetPixel/SetPixel methods + +bool ImplFastBitmapConversion( BitmapBuffer& rDst, const BitmapBuffer& rSrc, + const SalTwoRect& rTwoRect ); + +bool ImplFastBitmapBlending( BitmapWriteAccess& rDst, + const BitmapReadAccess& rSrc, const BitmapReadAccess& rMask, + const SalTwoRect& rTwoRect ); + +bool ImplFastEraseBitmap( BitmapBuffer&, const BitmapColor& ); + +#endif // _SV_BMPFAST_HXX diff --git a/vcl/inc/brdwin.hxx b/vcl/inc/brdwin.hxx new file mode 100644 index 000000000000..bf76174150e2 --- /dev/null +++ b/vcl/inc/brdwin.hxx @@ -0,0 +1,352 @@ +/************************************************************************* + * + * 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 _SV_BRDWIN_HXX +#define _SV_BRDWIN_HXX + +#include +#include + +class ImplBorderWindowView; + +// -------------------------- +// - ImplBorderWindow-Types - +// -------------------------- + +#define BORDERWINDOW_STYLE_OVERLAP ((USHORT)0x0001) +#define BORDERWINDOW_STYLE_BORDER ((USHORT)0x0002) +#define BORDERWINDOW_STYLE_FLOAT ((USHORT)0x0004) +#define BORDERWINDOW_STYLE_FRAME ((USHORT)0x0008) +#define BORDERWINDOW_STYLE_APP ((USHORT)0x0010) + +#define BORDERWINDOW_HITTEST_TITLE ((USHORT)0x0001) +#define BORDERWINDOW_HITTEST_LEFT ((USHORT)0x0002) +#define BORDERWINDOW_HITTEST_MENU ((USHORT)0x0004) +#define BORDERWINDOW_HITTEST_TOP ((USHORT)0x0008) +#define BORDERWINDOW_HITTEST_RIGHT ((USHORT)0x0010) +#define BORDERWINDOW_HITTEST_BOTTOM ((USHORT)0x0020) +#define BORDERWINDOW_HITTEST_TOPLEFT ((USHORT)0x0040) +#define BORDERWINDOW_HITTEST_TOPRIGHT ((USHORT)0x0080) +#define BORDERWINDOW_HITTEST_BOTTOMLEFT ((USHORT)0x0100) +#define BORDERWINDOW_HITTEST_BOTTOMRIGHT ((USHORT)0x0200) +#define BORDERWINDOW_HITTEST_CLOSE ((USHORT)0x0400) +#define BORDERWINDOW_HITTEST_ROLL ((USHORT)0x0800) +#define BORDERWINDOW_HITTEST_DOCK ((USHORT)0x1000) +#define BORDERWINDOW_HITTEST_HIDE ((USHORT)0x2000) +#define BORDERWINDOW_HITTEST_HELP ((USHORT)0x4000) +#define BORDERWINDOW_HITTEST_PIN ((USHORT)0x8000) + +#define BORDERWINDOW_DRAW_TITLE ((USHORT)0x0001) +#define BORDERWINDOW_DRAW_BORDER ((USHORT)0x0002) +#define BORDERWINDOW_DRAW_FRAME ((USHORT)0x0004) +#define BORDERWINDOW_DRAW_CLOSE ((USHORT)0x0008) +#define BORDERWINDOW_DRAW_ROLL ((USHORT)0x0010) +#define BORDERWINDOW_DRAW_DOCK ((USHORT)0x0020) +#define BORDERWINDOW_DRAW_HIDE ((USHORT)0x0040) +#define BORDERWINDOW_DRAW_HELP ((USHORT)0x0080) +#define BORDERWINDOW_DRAW_PIN ((USHORT)0x0100) +#define BORDERWINDOW_DRAW_MENU ((USHORT)0x0200) +#define BORDERWINDOW_DRAW_ALL (BORDERWINDOW_DRAW_TITLE | \ + BORDERWINDOW_DRAW_BORDER | \ + BORDERWINDOW_DRAW_FRAME | \ + BORDERWINDOW_DRAW_CLOSE | \ + BORDERWINDOW_DRAW_ROLL | \ + BORDERWINDOW_DRAW_DOCK | \ + BORDERWINDOW_DRAW_HIDE | \ + BORDERWINDOW_DRAW_HELP | \ + BORDERWINDOW_DRAW_PIN | \ + BORDERWINDOW_DRAW_MENU) + +#define BORDERWINDOW_TITLE_NORMAL ((USHORT)0x0001) +#define BORDERWINDOW_TITLE_SMALL ((USHORT)0x0002) +#define BORDERWINDOW_TITLE_TEAROFF ((USHORT)0x0004) +#define BORDERWINDOW_TITLE_NONE ((USHORT)0x0008) + +// -------------------- +// - ImplBorderWindow - +// -------------------- + +class ImplBorderWindow : public Window +{ + friend class Window; + friend class ImplBorderWindowView; + friend class ImplSmallBorderWindowView; + friend class ImplStdBorderWindowView; + +private: + ImplBorderWindowView* mpBorderView; + Window* mpMenuBarWindow; + long mnMinWidth; + long mnMinHeight; + long mnMaxWidth; + long mnMaxHeight; + long mnRollHeight; + long mnOrgMenuHeight; + USHORT mnTitleType; + USHORT mnBorderStyle; + BOOL mbFloatWindow; + BOOL mbSmallOutBorder; + BOOL mbFrameBorder; + BOOL mbPined; + BOOL mbRollUp; + BOOL mbMenuHide; + BOOL mbDockBtn; + BOOL mbHideBtn; + BOOL mbHelpBtn; + BOOL mbMenuBtn; + BOOL mbDisplayActive; + + using Window::ImplInit; + void ImplInit( Window* pParent, + WinBits nStyle, USHORT nTypeStyle, + SystemParentData* pParentData ); + void ImplInit( Window* pParent, + WinBits nStyle, USHORT nTypeStyle, + const ::com::sun::star::uno::Any& ); + + // Copy assignment is forbidden and not implemented. + ImplBorderWindow (const ImplBorderWindow &); + ImplBorderWindow& operator= (const ImplBorderWindow &); + +public: + ImplBorderWindow( Window* pParent, + SystemParentData* pParentData, + WinBits nStyle = 0, + USHORT nTypeStyle = 0 ); + ImplBorderWindow( Window* pParent, WinBits nStyle = 0, + USHORT nTypeStyle = 0 ); + ImplBorderWindow( Window* pParent, + WinBits nStyle, USHORT nTypeStyle, + const ::com::sun::star::uno::Any& ); + ~ImplBorderWindow(); + + virtual void MouseMove( const MouseEvent& rMEvt ); + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void Tracking( const TrackingEvent& rTEvt ); + virtual void Paint( const Rectangle& rRect ); + virtual void Activate(); + virtual void Deactivate(); + virtual void Resize(); + virtual void RequestHelp( const HelpEvent& rHEvt ); + virtual void StateChanged( StateChangedType nType ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + + void InitView(); + void UpdateView( BOOL bNewView, const Size& rNewOutSize ); + void InvalidateBorder(); + + using Window::Draw; + void Draw( const Rectangle& rRect, OutputDevice* pDev, const Point& rPos ); + + void SetDisplayActive( BOOL bActive ); + BOOL IsDisplayActive() const { return mbDisplayActive; } + void SetTitleType( USHORT nTitleType, const Size& rSize ); + void SetBorderStyle( USHORT nStyle ); + USHORT GetBorderStyle() const { return mnBorderStyle; } + void SetPin( BOOL bPin ); + void SetRollUp( BOOL bRollUp, const Size& rSize ); + void SetCloser(); + void SetDockButton( BOOL bDockButton ); + void SetHideButton( BOOL bHideButton ); + void SetHelpButton( BOOL bHelpButton ); + void SetMenuButton( BOOL bMenuButton ); + + void UpdateMenuHeight(); + void SetMenuBarWindow( Window* pWindow ); + void SetMenuBarMode( BOOL bHide ); + + void SetMinOutputSize( long nWidth, long nHeight ) + { mnMinWidth = nWidth; mnMinHeight = nHeight; } + void SetMaxOutputSize( long nWidth, long nHeight ) + { mnMaxWidth = nWidth; mnMaxHeight = nHeight; } + + void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, + sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const; + long CalcTitleWidth() const; + + Rectangle GetMenuRect() const; +}; + +// ======================================================================= + +// ----------------------- +// - ImplBorderFrameData - +// ----------------------- + +struct ImplBorderFrameData +{ + ImplBorderWindow* mpBorderWindow; + OutputDevice* mpOutDev; + Rectangle maTitleRect; + Rectangle maPinRect; + Rectangle maCloseRect; + Rectangle maRollRect; + Rectangle maDockRect; + Rectangle maMenuRect; + Rectangle maHideRect; + Rectangle maHelpRect; + Point maMouseOff; + long mnWidth; + long mnHeight; + long mnTrackX; + long mnTrackY; + long mnTrackWidth; + long mnTrackHeight; + sal_Int32 mnLeftBorder; + sal_Int32 mnTopBorder; + sal_Int32 mnRightBorder; + sal_Int32 mnBottomBorder; + long mnNoTitleTop; + long mnBorderSize; + long mnTitleHeight; + long mnTitleOff; + USHORT mnHitTest; + USHORT mnPinState; + USHORT mnCloseState; + USHORT mnRollState; + USHORT mnDockState; + USHORT mnMenuState; + USHORT mnHideState; + USHORT mnHelpState; + USHORT mnTitleType; + BOOL mbFloatWindow; + BOOL mbDragFull; + BOOL mbTitleClipped; +}; + +// ======================================================================= + +// ------------------------ +// - ImplBorderWindowView - +// ------------------------ + +class ImplBorderWindowView +{ +public: + virtual ~ImplBorderWindowView(); + + virtual BOOL MouseMove( const MouseEvent& rMEvt ); + virtual BOOL MouseButtonDown( const MouseEvent& rMEvt ); + virtual BOOL Tracking( const TrackingEvent& rTEvt ); + virtual String RequestHelp( const Point& rPos, Rectangle& rHelpRect ); + + virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ) = 0; + virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, + sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const = 0; + virtual long CalcTitleWidth() const = 0; + virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev = NULL, const Point* pOffset = NULL ) = 0; + virtual Rectangle GetMenuRect() const; + + void ImplInitTitle( ImplBorderFrameData* pData ); + USHORT ImplHitTest( ImplBorderFrameData* pData, const Point& rPos ); + BOOL ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt ); + BOOL ImplMouseButtonDown( ImplBorderFrameData* pData, const MouseEvent& rMEvt ); + BOOL ImplTracking( ImplBorderFrameData* pData, const TrackingEvent& rTEvt ); + String ImplRequestHelp( ImplBorderFrameData* pData, const Point& rPos, Rectangle& rHelpRect ); + long ImplCalcTitleWidth( const ImplBorderFrameData* pData ) const; +}; + +// ======================================================================= + +// -------------------------- +// - ImplNoBorderWindowView - +// -------------------------- + +class ImplNoBorderWindowView : public ImplBorderWindowView +{ +public: + ImplNoBorderWindowView( ImplBorderWindow* pBorderWindow ); + + virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ); + virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, + sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const; + virtual long CalcTitleWidth() const; + virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset ); +}; + + +// ======================================================================= + +// ----------------------------- +// - ImplSmallBorderWindowView - +// ----------------------------- + +class ImplSmallBorderWindowView : public ImplBorderWindowView +{ + ImplBorderWindow* mpBorderWindow; + OutputDevice* mpOutDev; + long mnWidth; + long mnHeight; + sal_Int32 mnLeftBorder; + sal_Int32 mnTopBorder; + sal_Int32 mnRightBorder; + sal_Int32 mnBottomBorder; + bool mbNWFBorder; + +public: + ImplSmallBorderWindowView( ImplBorderWindow* pBorderWindow ); + + virtual void Init( OutputDevice* pOutDev, long nWidth, long nHeight ); + virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, + sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const; + virtual long CalcTitleWidth() const; + virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset ); +}; + + +// ======================================================================= + +// --------------------------- +// - ImplStdBorderWindowView - +// --------------------------- + + +class ImplStdBorderWindowView : public ImplBorderWindowView +{ + ImplBorderFrameData maFrameData; + VirtualDevice* mpATitleVirDev; + VirtualDevice* mpDTitleVirDev; + +public: + ImplStdBorderWindowView( ImplBorderWindow* pBorderWindow ); + ~ImplStdBorderWindowView(); + + virtual BOOL MouseMove( const MouseEvent& rMEvt ); + virtual BOOL MouseButtonDown( const MouseEvent& rMEvt ); + virtual BOOL Tracking( const TrackingEvent& rTEvt ); + virtual String RequestHelp( const Point& rPos, Rectangle& rHelpRect ); + virtual Rectangle GetMenuRect() const; + + virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ); + virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, + sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const; + virtual long CalcTitleWidth() const; + virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset ); +}; + + +#endif // _SV_BRDWIN_HXX diff --git a/vcl/inc/canvasbitmap.hxx b/vcl/inc/canvasbitmap.hxx new file mode 100644 index 000000000000..85c0aa795c8c --- /dev/null +++ b/vcl/inc/canvasbitmap.hxx @@ -0,0 +1,129 @@ +/************************************************************************* + * + * 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 _VCL_CANVASBITMAP_HXX +#define _VCL_CANVASBITMAP_HXX + +#include +#include +#include +#include +#include + +#include +#include + +namespace vcl +{ +namespace unotools +{ + class VCL_DLLPUBLIC VclCanvasBitmap : + public cppu::WeakImplHelper3< com::sun::star::rendering::XIntegerReadOnlyBitmap, + com::sun::star::rendering::XBitmapPalette, + com::sun::star::rendering::XIntegerBitmapColorSpace > + { + private: + BitmapEx m_aBmpEx; + Bitmap m_aBitmap; + Bitmap m_aAlpha; + BitmapReadAccess* m_pBmpAcc; + BitmapReadAccess* m_pAlphaAcc; + com::sun::star::uno::Sequence m_aComponentTags; + com::sun::star::uno::Sequence m_aComponentBitCounts; + com::sun::star::rendering::IntegerBitmapLayout m_aLayout; + sal_Int32 m_nBitsPerInputPixel; + sal_Int32 m_nBitsPerOutputPixel; + sal_Int32 m_nRedIndex; + sal_Int32 m_nGreenIndex; + sal_Int32 m_nBlueIndex; + sal_Int32 m_nAlphaIndex; + sal_Int32 m_nIndexIndex; + sal_Int8 m_nEndianness; + bool m_bSwap; + bool m_bPalette; + + SAL_DLLPRIVATE void setComponentInfo( ULONG redShift, ULONG greenShift, ULONG blueShift ); + + virtual ~VclCanvasBitmap(); + + public: + // XBitmap + virtual com::sun::star::geometry::IntegerSize2D SAL_CALL getSize() throw (com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL hasAlpha( ) throw (::com::sun::star::uno::RuntimeException); + virtual com::sun::star::uno::Reference< com::sun::star::rendering::XBitmap > SAL_CALL getScaledBitmap( const com::sun::star::geometry::RealSize2D& newSize, sal_Bool beFast ) throw (com::sun::star::uno::RuntimeException); + + // XIntegerReadOnlyBitmap + virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL getData( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout, const ::com::sun::star::geometry::IntegerRectangle2D& rect ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::rendering::VolatileContentDestroyedException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL getPixel( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout, const ::com::sun::star::geometry::IntegerPoint2D& pos ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::rendering::VolatileContentDestroyedException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapPalette > SAL_CALL getPalette( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::rendering::IntegerBitmapLayout SAL_CALL getMemoryLayout( ) throw (::com::sun::star::uno::RuntimeException); + + // XBitmapPalette + virtual sal_Int32 SAL_CALL getNumberOfEntries() throw (com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL getIndex( ::com::sun::star::uno::Sequence< double >& entry, ::sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL setIndex( const ::com::sun::star::uno::Sequence< double >& color, ::sal_Bool transparency, ::sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XColorSpace > SAL_CALL getColorSpace( ) throw (::com::sun::star::uno::RuntimeException); + + // XIntegerBitmapColorSpace + virtual ::sal_Int8 SAL_CALL getType( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getComponentTags( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int8 SAL_CALL getRenderingIntent( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getProperties( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< double > SAL_CALL convertColorSpace( const ::com::sun::star::uno::Sequence< double >& deviceColor, const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XColorSpace >& targetColorSpace ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::RGBColor > SAL_CALL convertToRGB( const ::com::sun::star::uno::Sequence< double >& deviceColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor > SAL_CALL convertToARGB( const ::com::sun::star::uno::Sequence< double >& deviceColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor > SAL_CALL convertToPARGB( const ::com::sun::star::uno::Sequence< double >& deviceColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< double > SAL_CALL convertFromRGB( const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::RGBColor >& rgbColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< double > SAL_CALL convertFromARGB( const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor >& rgbColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< double > SAL_CALL convertFromPARGB( const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor >& rgbColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getBitsPerPixel( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::sal_Int32 > SAL_CALL getComponentBitCounts( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int8 SAL_CALL getEndianness( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence SAL_CALL convertFromIntegerColorSpace( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& deviceColor, const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XColorSpace >& targetColorSpace ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL convertToIntegerColorSpace( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& deviceColor, const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XIntegerBitmapColorSpace >& targetColorSpace ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::RGBColor > SAL_CALL convertIntegerToRGB( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& deviceColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor > SAL_CALL convertIntegerToARGB( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& deviceColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor > SAL_CALL convertIntegerToPARGB( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& deviceColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromRGB( const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::RGBColor >& rgbColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromARGB( const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor >& rgbColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromPARGB( const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor >& rgbColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + + /** Create API wrapper for given BitmapEx + + @param rBitmap + Bitmap to wrap. As usual, changes to the original bitmap + are not reflected in this object (copy on write). + */ + explicit VclCanvasBitmap( const BitmapEx& rBitmap ); + + /// Retrieve contained bitmap. Call me with locked Solar mutex! + BitmapEx getBitmapEx() const; + }; +} +} + +#endif diff --git a/vcl/inc/controldata.hxx b/vcl/inc/controldata.hxx new file mode 100644 index 000000000000..0be0f5bd402e --- /dev/null +++ b/vcl/inc/controldata.hxx @@ -0,0 +1,62 @@ +/************************************************************************* + * + * 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 VCL_CONTROLDATA_HXX +#define VCL_CONTROLDATA_HXX + +#include + +//........................................................................ +namespace vcl +{ +//........................................................................ + + //==================================================================== + //= ImplControlData + //==================================================================== + struct ImplControlData + { + mutable ControlLayoutData* mpLayoutData; + OutputDevice* mpReferenceDevice; + + ImplControlData() + :mpLayoutData( NULL ) + ,mpReferenceDevice( NULL ) + { + } + + ~ImplControlData() + { + delete mpLayoutData; + } + }; + +//........................................................................ +} // namespace vcl +//........................................................................ + +#endif // VCL_CONTROLDATA_HXX diff --git a/vcl/inc/dbggui.hxx b/vcl/inc/dbggui.hxx new file mode 100644 index 000000000000..7ed23706e6f3 --- /dev/null +++ b/vcl/inc/dbggui.hxx @@ -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. + * + ************************************************************************/ + +#ifndef _SV_DBGGUI_HXX +#define _SV_DBGGUI_HXX + +#include + +// ------------ +// - DBG_UITL - +// ------------ + +#ifdef DBG_UTIL + +class Window; +class XubString; + +void DbgGUIInit(); +void DbgGUIDeInit(); +void DbgGUIStart(); +void DbgDialogTest( Window* pWindow ); + +/** registers a named user-defined channel for emitting the diagnostic messages + @return + a unique number for this channel, which can be used for ->DbgData::nErrorOut, + ->DbgData::nWarningOut and ->DbgData::nTraceOut + @see DBG_OUT_USER_CHANNEL_0 +*/ +USHORT DbgRegisterNamedUserChannel( const XubString& _rChannelUIName, DbgPrintLine pProc ); + +#define DBGGUI_INIT() DbgGUIInit() +#define DBGGUI_DEINIT() DbgGUIDeInit() +#define DBGGUI_START() DbgGUIStart() + +#define DBG_DIALOGTEST( pWindow ) \ + if ( DbgIsDialog() ) \ + DbgDialogTest( pWindow ); + +#else + + +#define DBGGUI_INIT() +#define DBGGUI_DEINIT() +#define DBGGUI_START() + +#define DBG_DIALOGTEST( pWindow ) + +#endif + +#endif // _SV_DBGGUI_HXX diff --git a/vcl/inc/dndevdis.hxx b/vcl/inc/dndevdis.hxx new file mode 100644 index 000000000000..5b91bd0713ec --- /dev/null +++ b/vcl/inc/dndevdis.hxx @@ -0,0 +1,114 @@ +/************************************************************************* + * + * 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 _DNDEVDIS_HXX_ +#define _DNDEVDIS_HXX_ + +#include +#include + +#ifndef _COM_SUN_STAR_DATATRANSFER_DND_XDRAGESTURERECOGNIZER_HPP_ +#include +#endif +#include +#include + +class DNDEventDispatcher: public ::cppu::WeakImplHelper3< + ::com::sun::star::datatransfer::dnd::XDropTargetListener, + ::com::sun::star::datatransfer::dnd::XDropTargetDragContext, + ::com::sun::star::datatransfer::dnd::XDragGestureListener > +{ + Window * m_pTopWindow; + Window * m_pCurrentWindow; + + ::osl::Mutex m_aMutex; + ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > m_aDataFlavorList; + + /* + * fire the events on the dnd listener container of the specified window + */ + + sal_Int32 fireDragEnterEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& xContext, + const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction, + const ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor >& aFlavorList ) throw(::com::sun::star::uno::RuntimeException); + + sal_Int32 fireDragOverEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& xContext, + const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction ) throw(::com::sun::star::uno::RuntimeException); + + sal_Int32 fireDragExitEvent( Window *pWindow ) throw(::com::sun::star::uno::RuntimeException); + + sal_Int32 fireDropActionChangedEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& xContext, + const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction ) throw(::com::sun::star::uno::RuntimeException); + + sal_Int32 fireDropEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDropContext >& xContext, + const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction, + const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable ) throw(::com::sun::star::uno::RuntimeException); + + sal_Int32 fireDragGestureEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource >& xSource, + const ::com::sun::star::uno::Any event, const Point& rOrigin, const sal_Int8 nDragAction )throw(::com::sun::star::uno::RuntimeException); + +public: + + DNDEventDispatcher( Window * pTopWindow ); + virtual ~DNDEventDispatcher(); + + /* + * XDropTargetDragContext + */ + + virtual void SAL_CALL acceptDrag( sal_Int8 dropAction ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL rejectDrag() throw(::com::sun::star::uno::RuntimeException); + + /* + * XDropTargetListener + */ + + virtual void SAL_CALL drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent& dtde ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL dragEnter( const ::com::sun::star::datatransfer::dnd::DropTargetDragEnterEvent& dtdee ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL dragExit( const ::com::sun::star::datatransfer::dnd::DropTargetEvent& dte ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL dragOver( const ::com::sun::star::datatransfer::dnd::DropTargetDragEvent& dtde ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL dropActionChanged( const ::com::sun::star::datatransfer::dnd::DropTargetDragEvent& dtde ) throw(::com::sun::star::uno::RuntimeException); + + /* + * XDragGestureListener + */ + + virtual void SAL_CALL dragGestureRecognized( const ::com::sun::star::datatransfer::dnd::DragGestureEvent& dge ) throw(::com::sun::star::uno::RuntimeException); + + + /* + * XEventListener + */ + + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& eo ) throw(::com::sun::star::uno::RuntimeException); +}; + +//================================================================================================== +// +//================================================================================================== + +#endif diff --git a/vcl/inc/dndlcon.hxx b/vcl/inc/dndlcon.hxx new file mode 100644 index 000000000000..5a41a20e4271 --- /dev/null +++ b/vcl/inc/dndlcon.hxx @@ -0,0 +1,124 @@ +/************************************************************************* + * + * 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 _DNDLCON_HXX_ +#define _DNDLCON_HXX_ + +#include +#include +#include +#include +#include +#include + +#include + +class DNDListenerContainer : public ::vcl::unohelper::MutexHelper, + public ::cppu::WeakComponentImplHelper4< + ::com::sun::star::datatransfer::dnd::XDragGestureRecognizer, \ + ::com::sun::star::datatransfer::dnd::XDropTargetDragContext, + ::com::sun::star::datatransfer::dnd::XDropTargetDropContext, + ::com::sun::star::datatransfer::dnd::XDropTarget > +{ + sal_Bool m_bActive; + sal_Int8 m_nDefaultActions; + + ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext > m_xDropTargetDragContext; + ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDropContext > m_xDropTargetDropContext; + +public: + + DNDListenerContainer( sal_Int8 nDefaultActions ); + virtual ~DNDListenerContainer(); + + sal_uInt32 fireDropEvent( + const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDropContext >& context, + sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions, + const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& transferable ); + + sal_uInt32 fireDragExitEvent(); + + sal_uInt32 fireDragOverEvent( + const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& context, + sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions ); + + sal_uInt32 fireDragEnterEvent( + const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& context, + sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions, + const ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor >& dataFlavor ); + + sal_uInt32 fireDropActionChangedEvent( + const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& context, + sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions ); + + sal_uInt32 fireDragGestureEvent( + sal_Int8 dragAction, sal_Int32 dragOriginX, sal_Int32 dragOriginY, + const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource >& dragSource, + const ::com::sun::star::uno::Any& triggerEvent ); + + /* + * XDragGestureRecognizer + */ + + virtual void SAL_CALL addDragGestureListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragGestureListener >& dgl ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeDragGestureListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragGestureListener >& dgl ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL resetRecognizer( ) throw(::com::sun::star::uno::RuntimeException); + + /* + * XDropTargetDragContext + */ + + virtual void SAL_CALL acceptDrag( sal_Int8 dragOperation ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL rejectDrag( ) throw (::com::sun::star::uno::RuntimeException); + + + /* + * XDropTargetDropContext + */ + + virtual void SAL_CALL acceptDrop( sal_Int8 dropOperation ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL rejectDrop( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL dropComplete( sal_Bool success ) throw (::com::sun::star::uno::RuntimeException); + + /* + * XDropTarget + */ + + virtual void SAL_CALL addDropTargetListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& dtl ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeDropTargetListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& dtl ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL isActive( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setActive( sal_Bool active ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Int8 SAL_CALL getDefaultActions( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setDefaultActions( sal_Int8 actions ) throw(::com::sun::star::uno::RuntimeException); +}; + + +//================================================================================================== +// +//================================================================================================== + +#endif diff --git a/vcl/inc/fontcache.hxx b/vcl/inc/fontcache.hxx new file mode 100644 index 000000000000..b18748ed5791 --- /dev/null +++ b/vcl/inc/fontcache.hxx @@ -0,0 +1,99 @@ +/************************************************************************* + * + * 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 _PSPRINT_FONTCACHE_HXX +#define _PSPRINT_FONTCACHE_HXX + +#include "vcl/dllapi.h" +#include "vcl/fontmanager.hxx" + +#include "tools/string.hxx" + +#include + +namespace psp +{ + +class VCL_DLLPUBLIC FontCache +{ + struct FontDir; + friend class FontDir; + struct FontFile; + friend class FontFile; + + typedef std::list< PrintFontManager::PrintFont* > FontCacheEntry; + struct FontFile + { + FontCacheEntry m_aEntry; + }; + + typedef std::hash_map< ::rtl::OString, FontFile, ::rtl::OStringHash > FontDirMap; + struct FontDir + { + sal_Int64 m_nTimestamp; + bool m_bNoFiles; + bool m_bUserOverrideOnly; + FontDirMap m_aEntries; + + FontDir() : m_nTimestamp(0), m_bNoFiles(false), m_bUserOverrideOnly( false ) {} + }; + + typedef std::hash_map< int, FontDir > FontCacheData; + FontCacheData m_aCache; + String m_aCacheFile; + bool m_bDoFlush; + + void read(); + void clearCache(); + + void copyPrintFont( const PrintFontManager::PrintFont* pFrom, PrintFontManager::PrintFont* pTo ) const; + bool equalsPrintFont( const PrintFontManager::PrintFont* pLeft, PrintFontManager::PrintFont* pRight ) const; + PrintFontManager::PrintFont* clonePrintFont( const PrintFontManager::PrintFont* pFont ) const; + + void createCacheDir( int nDirID ); +public: + FontCache(); + ~FontCache(); + + bool getFontCacheFile( int nDirID, const rtl::OString& rFile, std::list< PrintFontManager::PrintFont* >& rNewFonts ) const; + void updateFontCacheEntry( const PrintFontManager::PrintFont*, bool bFlush ); + void markEmptyDir( int nDirID, bool bNoFiles = true ); + + // returns false for non cached directory + // a cached but empty directory will return true but not append anything + bool listDirectory( const rtl::OString& rDir, std::list< PrintFontManager::PrintFont* >& rNewFonts ) const; + // returns true for directoris that contain only user overridden fonts + bool scanAdditionalFiles( const rtl::OString& rDir ); + + void flush(); + + void updateDirTimestamp( int nDirID ); +}; + +} // namespace psp + +#endif // _PSPRINT_FONTCACHE_HXX diff --git a/vcl/inc/fontsubset.hxx b/vcl/inc/fontsubset.hxx new file mode 100644 index 000000000000..a34212128741 --- /dev/null +++ b/vcl/inc/fontsubset.hxx @@ -0,0 +1,97 @@ +/************************************************************************* + * + * 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 _SV_FONTSUBSET_HXX +#define _SV_FONTSUBSET_HXX + +#include +#include +#include + +namespace vcl { struct _TrueTypeFont; } // SFT's idea of a TTF font + +class FontSubsetInfo +{ +public: + explicit FontSubsetInfo( void ); + virtual ~FontSubsetInfo( void ); + + enum FontType { + NO_FONT = 0, + SFNT_TTF = 1<<1, // SFNT container with TrueType glyphs + SFNT_CFF = 1<<2, // SFNT container with CFF-container + TYPE1_PFA = 1<<3, // PSType1 Postscript Font Ascii + TYPE1_PFB = 1<<4, // PSType1 Postscript Font Binary + CFF_FONT = 1<<5, // CFF-container with PSType2 glyphs + TYPE3_FONT = 1<<6, // PSType3 Postscript font + TYPE42_FONT = 1<<7, // PSType42 wrapper for an SFNT_TTF + ANY_SFNT = SFNT_TTF | SFNT_CFF, + ANY_TYPE1 = TYPE1_PFA | TYPE1_PFB, + ANY_FONT = 0xFF + }; + + bool LoadFont( FontType eInFontType, + const unsigned char* pFontBytes, int nByteLength ); + bool LoadFont( vcl::_TrueTypeFont* pSftTrueTypeFont ); + + bool CreateFontSubset( int nOutFontTypeMask, + FILE* pOutFile, const char* pOutFontName, + const long* pReqGlyphIds, const sal_uInt8* pEncodedIds, + int nReqGlyphCount, sal_Int32* pOutGlyphWidths = NULL ); + +public: // TODO: make subsetter results private and provide accessor methods instead + // subsetter-provided subset details needed by e.g. Postscript or PDF + String m_aPSName; + int m_nAscent; // all metrics in PS font units + int m_nDescent; + int m_nCapHeight; + Rectangle m_aFontBBox; + FontType m_nFontType; // font-type of subset result + +private: + // input-font-specific details + unsigned const char* mpInFontBytes; + int mnInByteLength; + FontType meInFontType; // allowed mask of input font-types + vcl::_TrueTypeFont* mpSftTTFont; + + // subset-request details + int mnReqFontTypeMask; // allowed subset-target font types + FILE* mpOutFile; + const char* mpReqFontName; + const long* mpReqGlyphIds; + const sal_uInt8* mpReqEncodedIds; + int mnReqGlyphCount; + +protected: + bool CreateFontSubsetFromCff( sal_Int32* pOutGlyphWidths = NULL ); + bool CreateFontSubsetFromSfnt( sal_Int32* pOutGlyphWidths = NULL ); + bool CreateFontSubsetFromType1( sal_Int32* pOutGlyphWidths = NULL ); +}; + +#endif // _SV_FONTSUBSET_HXX + diff --git a/vcl/inc/glyphcache.hxx b/vcl/inc/glyphcache.hxx new file mode 100644 index 000000000000..676d32e5f053 --- /dev/null +++ b/vcl/inc/glyphcache.hxx @@ -0,0 +1,380 @@ +/************************************************************************* + * + * 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 _SV_GLYPHCACHE_HXX +#define _SV_GLYPHCACHE_HXX + +#include + +class GlyphCache; +class GlyphMetric; +class GlyphData; +class ServerFont; +class GlyphCachePeer; +class ServerFontLayoutEngine; +class ServerFontLayout; +class ExtraKernInfo; +struct ImplKernPairData; +class ImplFontOptions; + +#include +#include +#include + +namespace basegfx { class B2DPolyPolygon; } + +class RawBitmap; + +#include +#include + +class ServerFontLayout; +#include + +// ======================================================================= + +class VCL_DLLPUBLIC GlyphCache +{ +public: + explicit GlyphCache( GlyphCachePeer& ); + /*virtual*/ ~GlyphCache(); + + static GlyphCache& GetInstance(); + void LoadFonts(); + + void ClearFontPath(); + void AddFontPath( const String& rFontPath ); + void AddFontFile( const rtl::OString& rNormalizedName, + int nFaceNum, sal_IntPtr nFontId, const ImplDevFontAttributes&, + const ExtraKernInfo* = NULL ); + void AnnounceFonts( ImplDevFontList* ) const; + + ServerFont* CacheFont( const ImplFontSelectData& ); + void UncacheFont( ServerFont& ); + void InvalidateAllGlyphs(); + +protected: + GlyphCachePeer& mrPeer; + +private: + friend class ServerFont; + // used by ServerFont class only + void AddedGlyph( ServerFont&, GlyphData& ); + void RemovingGlyph( ServerFont&, GlyphData&, int nGlyphIndex ); + void UsingGlyph( ServerFont&, GlyphData& ); + void GrowNotify(); + +private: + ULONG CalcByteCount() const; + void GarbageCollect(); + + // the GlyphCache's FontList matches a font request to a serverfont instance + // the FontList key's mpFontData member is reinterpreted as integer font id + struct IFSD_Equal{ bool operator()( const ImplFontSelectData&, const ImplFontSelectData& ) const; }; + struct IFSD_Hash{ size_t operator()( const ImplFontSelectData& ) const; }; + typedef ::std::hash_map FontList; + FontList maFontList; + ULONG mnMaxSize; // max overall cache size in bytes + mutable ULONG mnBytesUsed; + mutable long mnLruIndex; + mutable int mnGlyphCount; + ServerFont* mpCurrentGCFont; + + class FreetypeManager* mpFtManager; +}; + +// ======================================================================= + +class GlyphMetric +{ +public: + Point GetOffset() const { return maOffset; } + Point GetDelta() const { return maDelta; } + Size GetSize() const { return maSize; } + long GetCharWidth() const { return mnAdvanceWidth; } + +protected: + friend class GlyphData; + void SetOffset( int nX, int nY ) { maOffset = Point( nX, nY); } + void SetDelta( int nX, int nY ) { maDelta = Point( nX, nY); } + void SetSize( const Size& s ) { maSize = s; } + void SetCharWidth( long nW ) { mnAdvanceWidth = nW; } + +private: + long mnAdvanceWidth; + Point maDelta; + Point maOffset; + Size maSize; +}; + +// ----------------------------------------------------------------------- + +// the glyph specific data needed by a GlyphCachePeer is usually trivial, +// not attaching it to the corresponding GlyphData would be overkill +struct ExtGlyphData +{ + int meInfo; + void* mpData; + + ExtGlyphData() : meInfo(0), mpData(NULL) {} +}; + +// ----------------------------------------------------------------------- + +class GlyphData +{ +public: + const GlyphMetric& GetMetric() const { return maMetric; } + Size GetSize() const { return maMetric.GetSize(); } + + void SetSize( const Size& s) { maMetric.SetSize( s ); } + void SetOffset( int nX, int nY ) { maMetric.SetOffset( nX, nY ); } + void SetDelta( int nX, int nY ) { maMetric.SetDelta( nX, nY ); } + void SetCharWidth( long nW ) { maMetric.SetCharWidth( nW ); } + + void SetLruValue( int n ) const { mnLruValue = n; } + long GetLruValue() const { return mnLruValue;} + + ExtGlyphData& ExtDataRef() { return maExtData; } + const ExtGlyphData& ExtDataRef() const { return maExtData; } + +private: + GlyphMetric maMetric; + ExtGlyphData maExtData; + + // used by GlyphCache for cache LRU algorithm + mutable long mnLruValue; +}; + +// ======================================================================= + +class VCL_DLLPUBLIC ServerFont +{ +public: + virtual const ::rtl::OString* GetFontFileName() const { return NULL; } + virtual int GetFontFaceNumber() const { return 0; } + virtual bool TestFont() const { return true; } + virtual void* GetFtFace() const { return 0; } + virtual int GetLoadFlags() const { return 0; } + virtual void SetFontOptions( const ImplFontOptions&) {} + virtual bool NeedsArtificialBold() const { return false; } + virtual bool NeedsArtificialItalic() const { return false; } + + const ImplFontSelectData& GetFontSelData() const { return maFontSelData; } + + virtual void FetchFontMetric( ImplFontMetricData&, long& rFactor ) const = 0; + virtual ULONG GetKernPairs( ImplKernPairData** ) const { return 0; } + virtual int GetGlyphKernValue( int, int ) const { return 0; } + virtual const ImplFontCharMap* GetImplFontCharMap() const = 0; + Point TransformPoint( const Point& ) const; + + GlyphData& GetGlyphData( int nGlyphIndex ); + const GlyphMetric& GetGlyphMetric( int nGlyphIndex ) + { return GetGlyphData( nGlyphIndex ).GetMetric(); } + + virtual int GetGlyphIndex( sal_UCS4 ) const = 0; + virtual bool GetGlyphOutline( int nGlyphIndex, ::basegfx::B2DPolyPolygon& ) const = 0; + virtual bool GetAntialiasAdvice( void ) const = 0; + bool IsGlyphInvisible( int nGlyphIndex ); + virtual bool GetGlyphBitmap1( int nGlyphIndex, RawBitmap& ) const = 0; + virtual bool GetGlyphBitmap8( int nGlyphIndex, RawBitmap& ) const = 0; + + void SetExtended( int nInfo, void* ppVoid ); + int GetExtInfo() { return mnExtInfo; } + void* GetExtPointer() { return mpExtData; } + +protected: + friend class GlyphCache; + friend class ServerFontLayout; + explicit ServerFont( const ImplFontSelectData& ); + virtual ~ServerFont(); + + void AddRef() const { ++mnRefCount; } + long GetRefCount() const { return mnRefCount; } + long Release() const; + ULONG GetByteCount() const { return mnBytesUsed; } + + virtual void InitGlyphData( int nGlyphIndex, GlyphData& ) const = 0; + virtual void GarbageCollect( long ); + void ReleaseFromGarbageCollect(); + + virtual ServerFontLayoutEngine* GetLayoutEngine() { return NULL; } + +private: + typedef ::std::hash_map GlyphList; + mutable GlyphList maGlyphList; + + const ImplFontSelectData maFontSelData; + + // info for GlyphcachePeer + int mnExtInfo; + void* mpExtData; + + // used by GlyphCache for cache LRU algorithm + mutable long mnRefCount; + mutable ULONG mnBytesUsed; + + ServerFont* mpPrevGCFont; + ServerFont* mpNextGCFont; + +protected: + // 16.16 fixed point values used for a rotated font + long mnCos; + long mnSin; +private: + int mnZWJ; + int mnZWNJ; + bool mbCollectedZW; +}; + +// ======================================================================= + +// a class for cache entries for physical font instances that are based on serverfonts +class VCL_DLLPUBLIC ImplServerFontEntry : public ImplFontEntry +{ +private: + ServerFont* mpServerFont; + ImplFontOptions maFontOptions; + bool mbGotFontOptions; + bool mbValidFontOptions; + +public: + ImplServerFontEntry( ImplFontSelectData& ); + virtual ~ImplServerFontEntry(); + void SetServerFont( ServerFont* p) { mpServerFont = p; } + void HandleFontOptions(); +}; + +// ======================================================================= + +class VCL_DLLPUBLIC ServerFontLayout : public GenericSalLayout +{ +private: + ServerFont& mrServerFont; + + // enforce proper copy semantic + SAL_DLLPRIVATE ServerFontLayout( const ServerFontLayout& ); + SAL_DLLPRIVATE ServerFontLayout& operator=( const ServerFontLayout& ); + +public: + ServerFontLayout( ServerFont& ); + virtual bool LayoutText( ImplLayoutArgs& ); + virtual void AdjustLayout( ImplLayoutArgs& ); + virtual void DrawText( SalGraphics& ) const; + ServerFont& GetServerFont() const { return mrServerFont; } +}; + +// ======================================================================= + +class ServerFontLayoutEngine +{ +public: + virtual ~ServerFontLayoutEngine() {} + virtual bool operator()( ServerFontLayout&, ImplLayoutArgs& ); +}; + +// ======================================================================= + +class GlyphCachePeer +{ +protected: + GlyphCachePeer() : mnBytesUsed(0) {} + virtual ~GlyphCachePeer() {} + +public: + sal_Int32 GetByteCount() const { return mnBytesUsed; } + virtual void RemovingFont( ServerFont& ) {} + virtual void RemovingGlyph( ServerFont&, GlyphData&, int ) {} + +protected: + sal_Int32 mnBytesUsed; +}; + +// ======================================================================= + +class VCL_DLLPUBLIC RawBitmap +{ +public: + RawBitmap(); + ~RawBitmap(); + bool Rotate( int nAngle ); + +public: + unsigned char* mpBits; + ULONG mnAllocated; + + ULONG mnWidth; + ULONG mnHeight; + + ULONG mnScanlineSize; + ULONG mnBitCount; + + int mnXOffset; + int mnYOffset; +}; + +// ======================================================================= + +inline void ServerFont::SetExtended( int nInfo, void* pVoid ) +{ + mnExtInfo = nInfo; + mpExtData = pVoid; +} + +// ======================================================================= + +// ExtraKernInfo allows an on-demand query of extra kerning info #i29881# +// The kerning values have to be scaled to match the font size before use +class VCL_DLLPUBLIC ExtraKernInfo +{ +public: + ExtraKernInfo( sal_IntPtr nFontId ); + virtual ~ExtraKernInfo() {} + + bool HasKernPairs() const; + int GetUnscaledKernPairs( ImplKernPairData** ) const; + int GetUnscaledKernValue( sal_Unicode cLeft, sal_Unicode cRight ) const; + +protected: + mutable bool mbInitialized; + virtual void Initialize() const = 0; + +protected: + sal_IntPtr mnFontId; + + // container to map a unicode pair to an unscaled kerning value + struct PairEqual{ int operator()(const ImplKernPairData& rA, const ImplKernPairData& rB) const + { return (rA.mnChar1 == rB.mnChar1) && (rA.mnChar2 == rB.mnChar2); } }; + struct PairHash{ int operator()(const ImplKernPairData& rA) const + { return (rA.mnChar1) * 256 ^ rA.mnChar2; } }; + typedef std::hash_set< ImplKernPairData, PairHash, PairEqual > UnicodeKernPairs; + mutable UnicodeKernPairs maUnicodeKernPairs; +}; + +// ======================================================================= + +#endif // _SV_GLYPHCACHE_HXX diff --git a/vcl/inc/graphite_adaptors.hxx b/vcl/inc/graphite_adaptors.hxx new file mode 100644 index 000000000000..4f78a8a0b13b --- /dev/null +++ b/vcl/inc/graphite_adaptors.hxx @@ -0,0 +1,152 @@ +/************************************************************************* + * + * 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 _SV_GRAPHITEADAPTORS_HXX +#define _SV_GRAPHITEADAPTORS_HXX + +// We need this to enable namespace support in libgrengine headers. +#define GR_NAMESPACE + +// Standard Library +#include +// Platform + +#ifndef _SVWIN_H +#include +#endif + +#ifndef _SV_SVSYS_HXX +#include +#endif + +#ifndef _SV_SALGDI_HXX +#include +#endif + +#ifndef _SV_SALLAYOUT_HXX +#include +#endif + +// Module +#include "vcl/dllapi.h" + +// Libraries +#include +#include +#include +#include +#include + +// Module type definitions and forward declarations. +// +#ifndef MSC +// SAL/VCL types +class ServerFont; +class FreetypeServerFont; + +// Graphite types + +struct FontProperties : gr::FontProps +{ + FontProperties(const FreetypeServerFont & font) throw(); +}; + +namespace grutils +{ + class GrFeatureParser; +} + +// This class adapts the Sal font and graphics services to form required by +// the Graphite engine. +// @author tse +// +class VCL_DLLPUBLIC GraphiteFontAdaptor : public gr::Font +{ + typedef std::map > GlyphMetricMap; + friend class GrFontHasher; +public: + static bool IsGraphiteEnabledFont(ServerFont &) throw(); + + GraphiteFontAdaptor(ServerFont & font, const sal_Int32 dpi_x, const sal_Int32 dpi_y); + GraphiteFontAdaptor(const GraphiteFontAdaptor &) throw(); + ~GraphiteFontAdaptor() throw(); + + gr::Font * copyThis(); + + // Basic attribute accessors. + virtual float ascent(); + virtual float descent(); + virtual bool bold(); + virtual bool italic(); + virtual float height(); + virtual unsigned int getDPIx(); + virtual unsigned int getDPIy(); + + // Font access methods. + virtual const void * getTable(gr::fontTableId32 tableID, size_t * pcbSize); + virtual void getFontMetrics(float * ascent_out, float * descent_out = 0, float * em_square_out = 0); + + // Glyph metrics. + virtual void getGlyphMetrics(gr::gid16 glyphID, gr::Rect & boundingBox, gr::Point & advances); + + // Adaptor attributes. + const FontProperties & fontProperties() const throw(); + FreetypeServerFont & font() const throw(); + const grutils::GrFeatureParser * features() const { return mpFeatures; }; + +private: + virtual void UniqueCacheInfo(ext_std::wstring &, bool &, bool &); + + FreetypeServerFont& mrFont; + FontProperties maFontProperties; + const unsigned int mnDpiX, mnDpiY; + const float mfAscent, + mfDescent, + mfEmUnits; + grutils::GrFeatureParser * mpFeatures; + GlyphMetricMap maGlyphMetricMap; +}; + +// Partial implementation of class GraphiteFontAdaptor. +// +inline const FontProperties & GraphiteFontAdaptor::fontProperties() const throw() { + return maFontProperties; +} + +inline FreetypeServerFont & GraphiteFontAdaptor::font() const throw() { + return mrFont; +} +#endif // not MFC + +// Partial implementation of class TextSourceAdaptor. +// +//inline const ImplLayoutArgs & TextSourceAdaptor::layoutArgs() const throw() { +// return _layout_args; +//} + + +#endif // _SV_GRAPHITEADAPTORS_HXX diff --git a/vcl/inc/graphite_cache.hxx b/vcl/inc/graphite_cache.hxx new file mode 100644 index 000000000000..af1392ed4d4b --- /dev/null +++ b/vcl/inc/graphite_cache.hxx @@ -0,0 +1,289 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ + +// Description: Classes to cache Graphite Segments to try to improve +// rendering performance. + +#ifndef GraphiteSegmentCache_h +#define GraphiteSegmentCache_h + +#include +#include + +#define GRCACHE_REUSE_VECTORS 1 + +//#include +#include + +class TextSourceAdaptor; +/** +* GrSegRecord stores a Graphite Segment and its associated text +*/ +class GrSegRecord { +public: + GrSegRecord(rtl::OUString * rope, TextSourceAdaptor * textSrc, gr::Segment * seg, bool bIsRtl); + + ~GrSegRecord(); + + void reuse(rtl::OUString * rope, TextSourceAdaptor * textSrc, gr::Segment * seg, bool bIsRtl); + + void clearVectors(); + void clear(); +#ifdef GRCACHE_REUSE_VECTORS + void setGlyphVectors(long nWidth, GraphiteLayout::Glyphs & vGlyphs, std::vector vCharDxs, + std::vector & vChar2Base, std::vector & vGlyph2Char, float fScale) + { + clearVectors(); + mnWidth = nWidth; + m_fontScale = fScale; + mvGlyphs.insert(mvGlyphs.begin(), vGlyphs.begin(), vGlyphs.end()); + mvCharDxs.insert(mvCharDxs.begin(),vCharDxs.begin(),vCharDxs.end()); + mvChar2BaseGlyph.insert(mvChar2BaseGlyph.begin(),vChar2Base.begin(),vChar2Base.end()); + mvGlyph2Char.insert(mvGlyph2Char.begin(),vGlyph2Char.begin(),vGlyph2Char.end()); + } +#endif + gr::Segment * getSegment() { return m_seg; } + TextSourceAdaptor * getTextSrc() { return m_text; } + void unlock() { --m_lockCount; } + bool isRtl() const { return mbIsRtl; } +#ifdef GRCACHE_REUSE_VECTORS + const long & width() const { return mnWidth; } + const GraphiteLayout::Glyphs & glyphs() const { return mvGlyphs; } + const std::vector & charDxs() const { return mvCharDxs; } + const std::vector & char2BaseGlyph() const { return mvChar2BaseGlyph; } + const std::vector & glyph2Char() const { return mvGlyph2Char; } + float & fontScale() { return m_fontScale; } +#endif +private: + rtl::OUString * m_rope; + TextSourceAdaptor * m_text; + gr::Segment * m_seg; + const xub_Unicode * m_nextKey; + const xub_Unicode* m_pStr; + size_t m_startChar; + float m_fontScale; + long mnWidth; + GraphiteLayout::Glyphs mvGlyphs; // glyphs in display order + std::vector mvCharDxs; // right hand side x offset of each glyph + std::vector mvChar2BaseGlyph; + std::vector mvGlyph2Char; + bool mbIsRtl; + int m_lockCount; + friend class GraphiteSegmentCache; +}; + +typedef std::hash_map > GraphiteSegMap; +typedef std::hash_multimap GraphiteRopeMap; +typedef std::pair GrRMEntry; + +/** +* GraphiteSegmentCache contains the cached Segments for one particular font size +*/ +class GraphiteSegmentCache +{ +public: + enum { + // not really sure what good values are here, + // bucket size should be >> cache size + SEG_BUCKET_FACTOR = 4, + SEG_DEFAULT_CACHE_SIZE = 2047 + }; + GraphiteSegmentCache(sal_uInt32 nSegCacheSize) + : m_segMap(nSegCacheSize * SEG_BUCKET_FACTOR), + m_nSegCacheSize(nSegCacheSize), + m_oldestKey(NULL) {}; + ~GraphiteSegmentCache() + { + m_ropeMap.clear(); + GraphiteSegMap::iterator i = m_segMap.begin(); + while (i != m_segMap.end()) + { + GrSegRecord *r = i->second; + delete r; + ++i; + } + m_segMap.clear(); + }; + 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 + // match for the complete buffer + GraphiteSegMap::iterator iMap = + m_segMap.find(reinterpret_cast(layoutArgs.mpStr + + layoutArgs.mnMinCharPos)); + if (iMap != m_segMap.end()) + { + found = iMap->second; + } + else + { + iMap = m_segMap.find(reinterpret_cast(layoutArgs.mpStr)); + if (iMap != m_segMap.end()) + { + found = iMap->second; + } + } + if (found) + { + if (found->m_seg->startCharacter() <= layoutArgs.mnMinCharPos && + found->m_seg->stopCharacter() >= layoutArgs.mnEndCharPos) + { + 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); + // check that characters are the same, at least in the range of + // interest + // We could use substr and ==, but substr does a copy, + // so its probably faster to do it like this + 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]) + return NULL; + } + if (found->isRtl() != bIsRtl) + { + 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++; + } + else found = NULL; + } + else + { + // the pointers aren't the same, but we might still have the same text in a segment + // 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. + rtl::OUString * rope = new rtl::OUString(layoutArgs.mpStr + layoutArgs.mnMinCharPos, + segCharLimit - layoutArgs.mnMinCharPos); + if (!rope) return NULL; + size_t nHash = (*(rope)).hashCode(); + GrRMEntry range = m_ropeMap.equal_range(nHash); + while (range.first != range.second) + { + found = range.first->second; + if (found->m_lockCount == 0) + { + if(rope->match(*(found->m_rope))) + { + // found, but the pointers are all wrong + found->m_seg->setTextSourceOffset(layoutArgs.mnMinCharPos); + // the switch is done in graphite_layout.cxx + //found->m_text->switchLayoutArgs(layoutArgs); + found->m_lockCount++; + break; + } + else + found = NULL; + } + else + found = NULL; + ++(range.first); + } + delete rope; + } + return found; + }; + GrSegRecord * cacheSegment(TextSourceAdaptor * adapter, gr::Segment * seg, bool bIsRtl); +private: + GraphiteSegMap m_segMap; + GraphiteRopeMap m_ropeMap; + sal_uInt32 m_nSegCacheSize; + const xub_Unicode * m_oldestKey; + const xub_Unicode * m_prevKey; +}; + +typedef std::hash_map > GraphiteCacheMap; + +/** +* GraphiteCacheHandler maps a particular font, style, size to a GraphiteSegmentCache +*/ +class GraphiteCacheHandler +{ +public: + GraphiteCacheHandler() : m_cacheMap(255) + { + const char * pEnvCache = getenv( "SAL_GRAPHITE_CACHE_SIZE" ); + if (pEnvCache != NULL) + { + int envCacheSize = atoi(pEnvCache); + if (envCacheSize <= 0) + m_nSegCacheSize = GraphiteSegmentCache::SEG_DEFAULT_CACHE_SIZE; + else + { + m_nSegCacheSize = envCacheSize; + } + } + else + { + m_nSegCacheSize = GraphiteSegmentCache::SEG_DEFAULT_CACHE_SIZE; + } + }; + ~GraphiteCacheHandler() + { + GraphiteCacheMap::iterator i = m_cacheMap.begin(); + while (i != m_cacheMap.end()) + { + GraphiteSegmentCache *r = i->second; + delete r; + ++i; + } + m_cacheMap.clear(); + }; + + static GraphiteCacheHandler instance; + + GraphiteSegmentCache * getCache(sal_Int32 & fontHash) + { + if (m_cacheMap.count(fontHash) > 0) + { + return m_cacheMap.find(fontHash)->second; + } + GraphiteSegmentCache *pCache = new GraphiteSegmentCache(m_nSegCacheSize); + m_cacheMap[fontHash] = pCache; + return pCache; + } +private: + GraphiteCacheMap m_cacheMap; + sal_uInt32 m_nSegCacheSize; +}; + +#endif + diff --git a/vcl/inc/graphite_features.hxx b/vcl/inc/graphite_features.hxx new file mode 100644 index 000000000000..47b8f062e299 --- /dev/null +++ b/vcl/inc/graphite_features.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ + +// Description: +// Parse a string of features specified as ; separated pairs. +// e.g. +// 1001=1&2002=2&fav1=0 +#include +#include +#include +#include +#include + +namespace grutils +{ + + class GrFeatureParser + { + public: + enum { MAX_FEATURES = 64 }; + static const char FEAT_PREFIX; + static const char FEAT_SEPARATOR; + static const char FEAT_ID_VALUE_SEPARATOR; + static const std::string ISO_LANG; + GrFeatureParser(gr::Font & font, const std::string features, const std::string lang); + GrFeatureParser(gr::Font & font, const std::string lang); + GrFeatureParser(const GrFeatureParser & copy); + ~GrFeatureParser(); + size_t getFontFeatures(gr::FeatureSetting settings[MAX_FEATURES]) const; + bool parseErrors() { return mbErrors; }; + static bool isValid(gr::Font & font, gr::FeatureSetting & setting); + gr::isocode getLanguage() const { return maLang; }; + bool hasLanguage() const { return (maLang.rgch[0] != '\0'); } + sal_Int32 hashCode() const; + private: + void setLang(gr::Font & font, const std::string & lang); + bool isCharId(const std::string & id, size_t offset, size_t length); + int getCharId(const std::string & id, size_t offset, size_t length); + int getIntValue(const std::string & id, size_t offset, size_t length); + size_t mnNumSettings; + gr::isocode maLang; + bool mbErrors; + gr::FeatureSetting maSettings[64]; + }; + + union FeatId + { + gr::featid num; + unsigned char label[5]; + }; +} diff --git a/vcl/inc/graphite_layout.hxx b/vcl/inc/graphite_layout.hxx new file mode 100644 index 000000000000..bbeaf21ecd60 --- /dev/null +++ b/vcl/inc/graphite_layout.hxx @@ -0,0 +1,188 @@ +/************************************************************************* + * + * 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 _SV_GRAPHITELAYOUT_HXX +#define _SV_GRAPHITELAYOUT_HXX +// Description: An implementation of the SalLayout interface that uses the +// Graphite engine. + +// We need this to enable namespace support in libgrengine headers. +#define GR_NAMESPACE + +#define GRCACHE 1 + +// Standard Library +#include +#include +#include +// Libraries +#include +#include +#include +#include +#include +#include +#include +// Platform +#include +#include +// Module + +// For backwards compatibility with 2.4.x +#if (SUPD == 680) +typedef sal_Int32 sal_GlyphId; +#endif + + +// Module type definitions and forward declarations. +// +class TextSourceAdaptor; +class GraphiteFontAdaptor; +class GrSegRecord; +// SAL/VCL types +class ServerFont; + +#ifdef WNT +// The GraphiteWinFont is just a wrapper to enable GrFontHasher to be a friend +// so that UniqueCacheInfo can be called. +#include +class GraphiteWinFont : public gr::WinFont +{ + friend class GrFontHasher; +public: + GraphiteWinFont(HDC hdc) : gr::WinFont(hdc) {}; + virtual ~GraphiteWinFont() {}; +}; +#endif +// Graphite types +namespace gr { class Segment; class GlyphIterator; } +namespace grutils { class GrFeatureParser; } + +// This class uses the SIL Graphite engine to provide complex text layout services to the VCL +// @author tse +// +class VCL_DLLPUBLIC GraphiteLayout : public SalLayout +{ +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: + typedef std::pair iterator_pair_t; + + void fill_from(gr::Segment & rSeg, ImplLayoutArgs & rArgs, + bool bRtl, long &rWidth, float fScaling, + std::vector & rChar2Base, std::vector & rGlyph2Char, + std::vector & rCharDxs); + void move_glyph(Glyphs::iterator, long dx); + + const_iterator cluster_base(const_iterator) const; + iterator_pair_t neighbour_clusters(const_iterator) const; + private: + std::pair appendCluster(gr::Segment & rSeg, ImplLayoutArgs & rArgs, + bool bRtl, float fSegmentAdvance, int nFirstCharInCluster, int nNextChar, + int nFirstGlyphInCluster, int nNextGlyph, float fScaling, + std::vector & rChar2Base, std::vector & rGlyph2Char, + std::vector & rCharDxs, long & rDXOffset); + void append(gr::Segment & rSeg, ImplLayoutArgs & rArgs, gr::GlyphInfo & rGi, float nextGlyphOrigin, float fScaling, std::vector & rChar2Base, std::vector & rGlyph2Char, std::vector & rCharDxs, long & rDXOffset, bool bIsBase); + }; + + mutable Glyphs mvGlyphs; + void clear(); + +private: + TextSourceAdaptor * mpTextSrc; // Text source. + gr::LayoutEnvironment maLayout; + const gr::Font &mrFont; + long mnWidth; + std::vector mvCharDxs; + std::vector mvChar2BaseGlyph; + std::vector mvGlyph2Char; + float mfScaling; + const grutils::GrFeatureParser * mpFeatures; + +public: + GraphiteLayout(const gr::Font & font, const grutils::GrFeatureParser * features = NULL) throw(); + + // used by upper layers + virtual bool LayoutText( ImplLayoutArgs& ); // first step of layout + // split into two stages to allow dc to be restored on the segment +#ifdef GRCACHE + gr::Segment * CreateSegment(ImplLayoutArgs& rArgs, GrSegRecord ** pRecord = NULL); + bool LayoutGlyphs(ImplLayoutArgs& rArgs, gr::Segment * pSegment, GrSegRecord * pSegRecord); +#else + gr::Segment * CreateSegment(ImplLayoutArgs& rArgs); + bool LayoutGlyphs(ImplLayoutArgs& rArgs, gr::Segment * pSegment); +#endif + + virtual void AdjustLayout( ImplLayoutArgs& ); // adjusting positions + + // methods using string indexing + virtual int GetTextBreak( long nMaxWidth, long nCharExtra=0, int nFactor=1 ) const; + virtual long FillDXArray( sal_Int32* pDXArray ) const; + virtual void ApplyDXArray(ImplLayoutArgs &rArgs, std::vector & rDeltaWidth); + + virtual void GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const; + + // methods using glyph indexing + virtual int GetNextGlyphs(int nLen, sal_GlyphId* pGlyphIdxAry, ::Point & rPos, int&, + sal_Int32* pGlyphAdvAry = 0, int* pCharPosAry = 0 ) const; + + // used by glyph+font+script fallback + virtual void MoveGlyph( int nStart, long nNewXPos ); + virtual void DropGlyph( int nStart ); + virtual void Simplify( bool bIsBase ); + + // Dummy implementation so layout can be shared between Linux/Windows + virtual void DrawText(SalGraphics&) const {}; + + virtual ~GraphiteLayout() throw(); + void SetFeatures(grutils::GrFeatureParser * aFeature) { mpFeatures = aFeature; } + void SetFontScale(float s) { mfScaling = s; }; + const TextSourceAdaptor * textSrc() const { return mpTextSrc; }; + virtual sal_GlyphId getKashidaGlyph(int & width) = 0; + void kashidaJustify(std::vector & rDeltaWidth, sal_GlyphId, int width); + + static const int EXTRA_CONTEXT_LENGTH; +private: + int glyph_to_char(Glyphs::iterator); + std::pair glyph_to_chars(const GlyphItem &) const; + + std::pair caret_positions(size_t) const; + void expandOrCondense(ImplLayoutArgs &rArgs); +}; + + + +#endif // _SV_GRAPHITELAYOUT_HXX diff --git a/vcl/inc/graphite_serverfont.hxx b/vcl/inc/graphite_serverfont.hxx new file mode 100644 index 000000000000..3980031cf7b6 --- /dev/null +++ b/vcl/inc/graphite_serverfont.hxx @@ -0,0 +1,100 @@ +/************************************************************************* + * + * 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 _SV_GRAPHITESERVERFONT_HXX +#define _SV_GRAPHITESERVERFONT_HXX + +// We need this to enable namespace support in libgrengine headers. +#define GR_NAMESPACE + +#ifndef MSC +#include +#include + +// Modules + +class VCL_DLLPUBLIC GraphiteLayoutImpl : public GraphiteLayout +{ +public: + GraphiteLayoutImpl(const gr::Font & font, const grutils::GrFeatureParser * features, GraphiteFontAdaptor * pFont) throw() + : GraphiteLayout(font, features), mpFont(pFont) {}; + virtual ~GraphiteLayoutImpl() throw() {}; + virtual sal_GlyphId getKashidaGlyph(int & width); +private: + GraphiteFontAdaptor * mpFont; +}; + +// This class implments the server font specific parts. +// @author tse +// +class VCL_DLLPUBLIC GraphiteServerFontLayout : public ServerFontLayout +{ +private: + mutable GraphiteFontAdaptor * mpFont; + // mutable so that the DrawOffset/DrawBase can be set + mutable GraphiteLayoutImpl maImpl; +public: + GraphiteServerFontLayout(GraphiteFontAdaptor * font) throw(); + + virtual bool LayoutText( ImplLayoutArgs& rArgs) { SalLayout::AdjustLayout(rArgs); return maImpl.LayoutText(rArgs); }; // first step of layout + virtual void AdjustLayout( ImplLayoutArgs& rArgs) + { + SalLayout::AdjustLayout(rArgs); + maImpl.DrawBase() = maDrawBase; + maImpl.DrawOffset() = maDrawOffset; + maImpl.AdjustLayout(rArgs); + }; + virtual long GetTextWidth() const { return maImpl.GetTextWidth(); } + virtual long FillDXArray( sal_Int32* dxa ) const { return maImpl.FillDXArray(dxa); } + virtual int GetTextBreak( long mw, long ce, int f ) const { return maImpl.GetTextBreak(mw, ce, f); } + virtual void GetCaretPositions( int as, sal_Int32* cxa ) const { maImpl.GetCaretPositions(as, cxa); } + + // used by display layers + virtual int GetNextGlyphs( int l, sal_GlyphId* gia, Point& p, int& s, + sal_Int32* gaa = NULL, int* cpa = NULL ) const + { + maImpl.DrawBase() = maDrawBase; + maImpl.DrawOffset() = maDrawOffset; + return maImpl.GetNextGlyphs(l, gia, p, s, gaa, cpa); + } + + virtual void MoveGlyph( int nStart, long nNewXPos ) { maImpl.MoveGlyph(nStart, nNewXPos); }; + virtual void DropGlyph( int nStart ) { maImpl.DropGlyph(nStart); }; + virtual void Simplify( bool bIsBase ) { maImpl.Simplify(bIsBase); }; + + virtual ~GraphiteServerFontLayout() throw(); + +// For use with PspGraphics + const sal_Unicode* getTextPtr() const; + int getMinCharPos() const { return mnMinCharPos; } + int getMaxCharPos() const { return mnEndCharPos; } +}; + + + +#endif +#endif //_SV_GRAPHITESERVERFONT_HXX diff --git a/vcl/inc/helpwin.hxx b/vcl/inc/helpwin.hxx new file mode 100644 index 000000000000..244ae1b7d846 --- /dev/null +++ b/vcl/inc/helpwin.hxx @@ -0,0 +1,92 @@ +/************************************************************************* + * + * 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 _SV_HELPWIN_HXX +#define _SV_HELPWIN_HXX + +#include +#include + +// ------------------ +// - HelpTextWindow - +// ------------------ + +class HelpTextWindow : public FloatingWindow +{ +private: + Point maPos; + Rectangle maHelpArea; // Wenn naechste Hilfe fuers gleiche Rectangle, gleicher Text, dann Fenster stehen lassen + + Rectangle maTextRect; // Bei umgebrochenen Text in QuickHelp + + String maHelpText; + String maStatusText; + + Timer maShowTimer; + Timer maHideTimer; + + USHORT mnHelpWinStyle; + USHORT mnStyle; + +protected: + DECL_LINK( TimerHdl, Timer* ); + virtual void Paint( const Rectangle& ); + virtual void RequestHelp( const HelpEvent& rHEvt ); + virtual String GetText() const; + void ImplShow(); + +public: + HelpTextWindow( Window* pParent, const String& rText, USHORT nHelpWinStyle, USHORT nStyle ); + ~HelpTextWindow(); + + const String& GetHelpText() const { return maHelpText; } + void SetHelpText( const String& rHelpText ); + USHORT GetWinStyle() const { return mnHelpWinStyle; } + + // Nur merken: + void SetStatusText( const String& rStatusText ) { maStatusText = rStatusText; } + void SetHelpArea( const Rectangle& rRect ) { maHelpArea = rRect; } + + void ShowHelp( USHORT nDelayMode ); + + Size CalcOutSize() const; + const Rectangle& GetHelpArea() const { return maHelpArea; } + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); + + BOOL RegisterAccessibleParent(); + void RevokeAccessibleParent(); +}; + +void ImplShowHelpWindow( Window* pParent, USHORT nHelpWinStyle, USHORT nStyle, + const String& rHelpText, const String& rStatusText, + const Point& rScreenPos, const Rectangle* pHelpArea = NULL ); +void ImplDestroyHelpWindow( bool bUpdateHideTime ); +void ImplSetHelpWindowPos( Window* pHelpWindow, USHORT nHelpWinStyle, USHORT nStyle, + const Point& rPos, const Rectangle* pHelpArea ); + +#endif // _SV_HELPWIN_HXX diff --git a/vcl/inc/idlemgr.hxx b/vcl/inc/idlemgr.hxx new file mode 100644 index 000000000000..6d7d7c8e531f --- /dev/null +++ b/vcl/inc/idlemgr.hxx @@ -0,0 +1,60 @@ +/************************************************************************* + * + * 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 _SV_IDLEMGR_HXX +#define _SV_IDLEMGR_HXX + +#include +#include + +class ImplIdleList; + +// --------------- +// - ImplIdleMgr - +// --------------- + +class ImplIdleMgr +{ +private: + ImplIdleList* mpIdleList; + AutoTimer maTimer; + +public: + ImplIdleMgr(); + ~ImplIdleMgr(); + + BOOL InsertIdleHdl( const Link& rLink, USHORT nPriority ); + void RemoveIdleHdl( const Link& rLink ); + + void RestartIdler() + { if ( maTimer.IsActive() ) maTimer.Start(); } + + // Timer* kann auch NULL sein + DECL_LINK( TimeoutHdl, Timer* ); +}; + +#endif // _SV_IDLEMGR_HXX diff --git a/vcl/inc/ilstbox.hxx b/vcl/inc/ilstbox.hxx new file mode 100644 index 000000000000..6580538f5d10 --- /dev/null +++ b/vcl/inc/ilstbox.hxx @@ -0,0 +1,649 @@ +/************************************************************************* + * + * 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 _SV_ILSTBOX_HXX +#define _SV_ILSTBOX_HXX + +#include +#include +#include +#include +#include +#include +#include + +#include "vcl/quickselectionengine.hxx" + +class ScrollBar; +class ScrollBarBox; + +// ----------------- +// - ListBox-Types - +// ----------------- + +#define HORZ_SCROLL 4 +#define IMG_TXT_DISTANCE 6 + +enum LB_EVENT_TYPE +{ + LET_MBDOWN, + LET_TRACKING, + LET_TRACKING_END, + LET_KEYMOVE, + LET_KEYSPACE +}; + +// ----------------- +// - ImplEntryType - +// ----------------- + +struct ImplEntryType +{ + XubString maStr; + Image maImage; + void* mpUserData; + BOOL mbIsSelected; + long mnFlags; + long mnHeight; + + ImplEntryType( const XubString& rStr, const Image& rImage ) : + maStr( rStr ), + maImage( rImage ), + mnFlags( 0 ), + mnHeight( 0 ) + { + mbIsSelected = FALSE; + mpUserData = NULL; + } + + ImplEntryType( const XubString& rStr ) : + maStr( rStr ), + mnFlags( 0 ), + mnHeight( 0 ) + { + mbIsSelected = FALSE; + mpUserData = NULL; + } + + ImplEntryType( const Image& rImage ) : + maImage( rImage ), + mnFlags( 0 ), + mnHeight( 0 ) + { + mbIsSelected = FALSE; + mpUserData = NULL; + } +}; + +// ----------------- +// - ImplEntryList - +// ----------------- + +class ImplEntryList : private List +{ +private: + Window* mpWindow; // For getting the current locale when matching strings + USHORT mnLastSelected; + USHORT mnSelectionAnchor; + USHORT mnImages; + + USHORT mnMRUCount; + USHORT mnMaxMRUCount; + + Link maSelectionChangedHdl; + BOOL mbCallSelectionChangedHdl; + + ImplEntryType* GetEntry( USHORT nPos ) const { return (ImplEntryType*)List::GetObject( nPos ); } + +public: + ImplEntryList( Window* pWindow ); + ~ImplEntryList(); + + USHORT InsertEntry( USHORT nPos, ImplEntryType* pNewEntry, BOOL bSort ); + void RemoveEntry( USHORT nPos ); + const ImplEntryType* GetEntryPtr( USHORT nPos ) const { return (const ImplEntryType*) GetObject( nPos ); } + ImplEntryType* GetMutableEntryPtr( USHORT nPos ) const { return (ImplEntryType*) GetObject( nPos ); } + void Clear(); + + USHORT FindMatchingEntry( const XubString& rStr, USHORT nStart = 0, BOOL bForward = TRUE, BOOL bLazy = TRUE ) const; + USHORT FindEntry( const XubString& rStr, BOOL bSearchMRUArea = FALSE ) const; + USHORT FindEntry( const void* pData ) const; + + // helper: add up heights up to index nEndIndex. + // GetAddedHeight( 0 ) returns 0 + // GetAddedHeight( LISTBOX_ENTRY_NOTFOUND ) returns 0 + // GetAddedHeight( i, k ) with k > i is equivalent -GetAddedHeight( k, i ) + long GetAddedHeight( USHORT nEndIndex, USHORT nBeginIndex = 0, long nBeginHeight = 0 ) const; + long GetEntryHeight( USHORT nPos ) const; + + USHORT GetEntryCount() const { return (USHORT)List::Count(); } + BOOL HasImages() const { return mnImages ? TRUE : FALSE; } + + XubString GetEntryText( USHORT nPos ) const; + + BOOL HasEntryImage( USHORT nPos ) const; + Image GetEntryImage( USHORT nPos ) const; + + void SetEntryData( USHORT nPos, void* pNewData ); + void* GetEntryData( USHORT nPos ) const; + + void SetEntryFlags( USHORT nPos, long nFlags ); + long GetEntryFlags( USHORT nPos ) const; + + void SelectEntry( USHORT nPos, BOOL bSelect ); + + USHORT GetSelectEntryCount() const; + XubString GetSelectEntry( USHORT nIndex ) const; + USHORT GetSelectEntryPos( USHORT nIndex ) const; + BOOL IsEntrySelected( const XubString& rStr ) const; + BOOL IsEntryPosSelected( USHORT nIndex ) const; + + void SetLastSelected( USHORT nPos ) { mnLastSelected = nPos; } + USHORT GetLastSelected() const { return mnLastSelected; } + + void SetSelectionAnchor( USHORT nPos ) { mnSelectionAnchor = nPos; } + USHORT GetSelectionAnchor() const { return mnSelectionAnchor; } + + + void SetSelectionChangedHdl( const Link& rLnk ) { maSelectionChangedHdl = rLnk; } + void SetCallSelectionChangedHdl( BOOL bCall ) { mbCallSelectionChangedHdl = bCall; } + + void SetMRUCount( USHORT n ) { mnMRUCount = n; } + USHORT GetMRUCount() const { return mnMRUCount; } + + void SetMaxMRUCount( USHORT n ) { mnMaxMRUCount = n; } + USHORT GetMaxMRUCount() const { return mnMaxMRUCount; } + + /** An Entry is selectable if its mnFlags does not have the + LISTBOX_ENTRY_FLAG_DISABLE_SELECTION flag set. */ + bool IsEntrySelectable( USHORT nPos ) const; + + /** returns the first entry found from the given position nPos that is selectable + or LISTBOX_ENTRY_NOTFOUND if non is found. If the entry at nPos is not selectable, + it returns the first selectable entry after nPos if bForward is true and the + first selectable entry after nPos is bForward is false. + */ + USHORT FindFirstSelectable( USHORT nPos, bool bForward = true ); +}; + +// --------------------- +// - ImplListBoxWindow - +// --------------------- + +class ImplListBoxWindow : public Control, public ::vcl::ISearchableStringList +{ +private: + ImplEntryList* mpEntryList; // EntryListe + Rectangle maFocusRect; + + Size maUserItemSize; + + long mnMaxTxtHeight; // Maximale Hoehe eines Text-Items + long mnMaxTxtWidth; // Maximale Breite eines Text-Items + // Entry ohne Image + long mnMaxImgTxtWidth;// Maximale Breite eines Text-Items + // Entry UND Image + long mnMaxImgWidth; // Maximale Breite eines Image-Items + long mnMaxImgHeight; // Maximale Hoehe eines Image-Items + long mnMaxWidth; // Maximale Breite eines Eintrags + long mnMaxHeight; // Maximale Hoehe eines Eintrags + + USHORT mnCurrentPos; // Position (Focus) + USHORT mnTrackingSaveSelection; // Selektion vor Tracking(); + + USHORT mnSeparatorPos; // Separator + + USHORT mnUserDrawEntry; + + USHORT mnTop; // Ausgabe ab Zeile + long mnLeft; // Ausgabe ab Spalte + long mnBorder; // Abstand Rahmen - Text + long mnTextHeight; // Texthoehe + ProminentEntry meProminentType; // where is the "prominent" entry + + USHORT mnSelectModifier; // Modifiers + + BOOL mbHasFocusRect: 1, + mbSort: 1, // ListBox sortiert + mbTrack: 1, // Tracking + mbMulti: 1, // MultiListBox + mbStackMode: 1, // StackSelection + mbSimpleMode: 1, // SimpleMode fuer MultiListBox + mbImgsDiffSz: 1, // Images haben verschiedene Groessen + mbTravelSelect: 1, // TravelSelect + mbTrackingSelect: 1, // Selektiert bei MouseMove + mbSelectionChanged: 1, // Select() nicht zu oft rufen... + mbMouseMoveSelect: 1, // Selektieren bei MouseMove + mbGrabFocus: 1, // Focus bei MBDown grabben + mbUserDrawEnabled: 1, // UserDraw possible + mbInUserDraw: 1, // In UserDraw + mbReadOnly: 1, // ReadOnly + mbMirroring: 1, // pb: #106948# explicit mirroring for calc + mbRight: 1, // right align Text output + mbCenter: 1; // center Text output + + Link maScrollHdl; + Link maSelectHdl; + Link maCancelHdl; + Link maDoubleClickHdl; + Link maUserDrawHdl; + Link maMRUChangedHdl; + + ::vcl::QuickSelectionEngine + maQuickSelectionEngine; + +protected: + virtual void KeyInput( const KeyEvent& rKEvt ); + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void MouseMove( const MouseEvent& rMEvt ); + virtual void Tracking( const TrackingEvent& rTEvt ); + virtual void Paint( const Rectangle& rRect ); + virtual void Resize(); + virtual void GetFocus(); + virtual void LoseFocus(); + + BOOL SelectEntries( USHORT nSelect, LB_EVENT_TYPE eLET, BOOL bShift = FALSE, BOOL bCtrl = FALSE ); + void ImplPaint( USHORT nPos, BOOL bErase = FALSE, bool bLayout = false ); + void ImplDoPaint( const Rectangle& rRect, bool bLayout = false ); + void ImplCalcMetrics(); + void ImplUpdateEntryMetrics( ImplEntryType& rEntry ); + void ImplCallSelect(); + + void ImplShowFocusRect(); + void ImplHideFocusRect(); + + + virtual void StateChanged( StateChangedType nType ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + +public: + virtual void FillLayoutData() const; + + ImplListBoxWindow( Window* pParent, WinBits nWinStyle ); + ~ImplListBoxWindow(); + + ImplEntryList* GetEntryList() const { return mpEntryList; } + + USHORT InsertEntry( USHORT nPos, ImplEntryType* pNewEntry ); + void RemoveEntry( USHORT nPos ); + void Clear(); + void ResetCurrentPos() { mnCurrentPos = LISTBOX_ENTRY_NOTFOUND; } + USHORT GetCurrentPos() const { return mnCurrentPos; } + USHORT GetDisplayLineCount() const; + void SetEntryFlags( USHORT nPos, long nFlags ); + + void DrawEntry( USHORT nPos, BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos = FALSE, bool bLayout = false ); + + void SelectEntry( USHORT nPos, BOOL bSelect ); + void DeselectAll(); + USHORT GetEntryPosForPoint( const Point& rPoint ) const; + USHORT GetLastVisibleEntry() const; + + BOOL ProcessKeyInput( const KeyEvent& rKEvt ); + + void SetTopEntry( USHORT nTop ); + USHORT GetTopEntry() const { return mnTop; } + // ShowProminentEntry will set the entry correspoding to nEntryPos + // either at top or in the middle depending on the chosen style + void ShowProminentEntry( USHORT nEntryPos ); + void SetProminentEntryType( ProminentEntry eType ) { meProminentType = eType; } + ProminentEntry GetProminentEntryType() const { return meProminentType; } + using Window::IsVisible; + BOOL IsVisible( USHORT nEntry ) const; + + long GetLeftIndent() const { return mnLeft; } + void SetLeftIndent( long n ); + void ScrollHorz( long nDiff ); + + void AllowGrabFocus( BOOL b ) { mbGrabFocus = b; } + BOOL IsGrabFocusAllowed() const { return mbGrabFocus; } + + void SetSeparatorPos( USHORT n ) { mnSeparatorPos = n; } + USHORT GetSeparatorPos() const { return mnSeparatorPos; } + + void SetTravelSelect( BOOL bTravelSelect ) { mbTravelSelect = bTravelSelect; } + BOOL IsTravelSelect() const { return mbTravelSelect; } + BOOL IsTrackingSelect() const { return mbTrackingSelect; } + + void SetUserItemSize( const Size& rSz ); + const Size& GetUserItemSize() const { return maUserItemSize; } + + void EnableUserDraw( BOOL bUserDraw ) { mbUserDrawEnabled = bUserDraw; } + BOOL IsUserDrawEnabled() const { return mbUserDrawEnabled; } + + void EnableMultiSelection( BOOL bMulti, BOOL bStackMode ) { mbMulti = bMulti; mbStackMode = bStackMode; } + BOOL IsMultiSelectionEnabled() const { return mbMulti; } + + void SetMultiSelectionSimpleMode( BOOL bSimple ) { mbSimpleMode = bSimple; } + BOOL IsMultiSelectionSimpleMode() const { return mbSimpleMode; } + + void EnableMouseMoveSelect( BOOL bMouseMoveSelect ) { mbMouseMoveSelect = bMouseMoveSelect; } + BOOL IsMouseMoveSelectEnabled() const { return mbMouseMoveSelect; } + BOOL IsMouseMoveSelect() const { return mbMouseMoveSelect||mbStackMode; } + + Size CalcSize( USHORT nMaxLines ) const; + Rectangle GetBoundingRectangle( USHORT nItem ) const; + + long GetEntryHeight() const { return mnMaxHeight; } + long GetMaxEntryWidth() const { return mnMaxWidth; } + + void SetScrollHdl( const Link& rLink ) { maScrollHdl = rLink; } + const Link& GetScrollHdl() const { return maScrollHdl; } + void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; } + const Link& GetSelectHdl() const { return maSelectHdl; } + void SetCancelHdl( const Link& rLink ) { maCancelHdl = rLink; } + const Link& GetCancelHdl() const { return maCancelHdl; } + void SetDoubleClickHdl( const Link& rLink ) { maDoubleClickHdl = rLink; } + const Link& GetDoubleClickHdl() const { return maDoubleClickHdl; } + void SetUserDrawHdl( const Link& rLink ) { maUserDrawHdl = rLink; } + const Link& GetUserDrawHdl() const { return maUserDrawHdl; } + void SetMRUChangedHdl( const Link& rLink ) { maMRUChangedHdl = rLink; } + const Link& GetMRUChangedHdl() const { return maMRUChangedHdl; } + + BOOL IsSelectionChanged() const { return mbSelectionChanged; } + USHORT GetSelectModifier() const { return mnSelectModifier; } + + void EnableSort( BOOL b ) { mbSort = b; } + + void SetReadOnly( BOOL bReadOnly ) { mbReadOnly = bReadOnly; } + BOOL IsReadOnly() const { return mbReadOnly; } + + using Control::ImplInitSettings; + void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); + USHORT ImplGetTextStyle() const; + + // pb: #106948# explicit mirroring for calc + inline void EnableMirroring() { mbMirroring = TRUE; } + inline BOOL IsMirroring() const { return mbMirroring; } + +protected: + // ISearchableStringList + virtual ::vcl::StringEntryIdentifier CurrentEntry( String& _out_entryText ) const; + virtual ::vcl::StringEntryIdentifier NextEntry( ::vcl::StringEntryIdentifier _currentEntry, String& _out_entryText ) const; + virtual void SelectEntry( ::vcl::StringEntryIdentifier _entry ); +}; + +// --------------- +// - ImplListBox - +// --------------- + +class ImplListBox : public Control +{ +private: + ImplListBoxWindow maLBWindow; + ScrollBar* mpHScrollBar; + ScrollBar* mpVScrollBar; + ScrollBarBox* mpScrollBarBox; + BOOL mbVScroll : 1, // VScroll an oder aus + mbHScroll : 1, // HScroll an oder aus + mbAutoHScroll : 1; // AutoHScroll an oder aus + Link maScrollHdl; // Weil der vom ImplListBoxWindow selbst benoetigt wird. + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDNDListenerContainer; + +protected: + virtual void GetFocus(); + virtual void StateChanged( StateChangedType nType ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + + long Notify( NotifyEvent& rNEvt ); + + void ImplResizeControls(); + void ImplCheckScrollBars(); + void ImplInitScrollBars(); + + DECL_LINK( ScrollBarHdl, ScrollBar* ); + DECL_LINK( LBWindowScrolled, void* ); + DECL_LINK( MRUChanged, void* ); + +public: + ImplListBox( Window* pParent, WinBits nWinStyle ); + ~ImplListBox(); + + const ImplEntryList* GetEntryList() const { return maLBWindow.GetEntryList(); } + ImplListBoxWindow* GetMainWindow() { return &maLBWindow; } + + virtual void Resize(); + virtual const Wallpaper& GetDisplayBackground() const; + virtual Window* GetPreferredKeyInputWindow(); + + USHORT InsertEntry( USHORT nPos, const XubString& rStr ); + USHORT InsertEntry( USHORT nPos, const Image& rImage ); + USHORT InsertEntry( USHORT nPos, const XubString& rStr, const Image& rImage ); + void RemoveEntry( USHORT nPos ); + void SetEntryData( USHORT nPos, void* pNewData ) { maLBWindow.GetEntryList()->SetEntryData( nPos, pNewData ); } + void Clear(); + + void SetEntryFlags( USHORT nPos, long nFlags ); + long GetEntryFlags( USHORT nPos ) const; + + void SelectEntry( USHORT nPos, BOOL bSelect ); + void SetNoSelection(); + void ResetCurrentPos() { maLBWindow.ResetCurrentPos(); } + USHORT GetCurrentPos() const { return maLBWindow.GetCurrentPos(); } + + BOOL ProcessKeyInput( const KeyEvent& rKEvt ) { return maLBWindow.ProcessKeyInput( rKEvt ); } + BOOL HandleWheelAsCursorTravel( const CommandEvent& rCEvt ); + + void SetSeparatorPos( USHORT n ) { maLBWindow.SetSeparatorPos( n ); } + USHORT GetSeparatorPos() const { return maLBWindow.GetSeparatorPos(); } + + void SetTopEntry( USHORT nTop ) { maLBWindow.SetTopEntry( nTop ); } + USHORT GetTopEntry() const { return maLBWindow.GetTopEntry(); } + void ShowProminentEntry( USHORT nPos ) { maLBWindow.ShowProminentEntry( nPos ); } + using Window::IsVisible; + BOOL IsVisible( USHORT nEntry ) const { return maLBWindow.IsVisible( nEntry ); } + + void SetProminentEntryType( ProminentEntry eType ) { maLBWindow.SetProminentEntryType( eType ); } + ProminentEntry GetProminentEntryType() const { return maLBWindow.GetProminentEntryType(); } + + long GetLeftIndent() const { return maLBWindow.GetLeftIndent(); } + void SetLeftIndent( USHORT n ) { maLBWindow.SetLeftIndent( n ); } + void ScrollHorz( short nDiff ) { maLBWindow.ScrollHorz( nDiff ); } + + void SetTravelSelect( BOOL bTravelSelect ) { maLBWindow.SetTravelSelect( bTravelSelect ); } + BOOL IsTravelSelect() const { return maLBWindow.IsTravelSelect(); } + BOOL IsTrackingSelect() const { return maLBWindow.IsTrackingSelect(); } + + void EnableMultiSelection( BOOL bMulti, BOOL bStackMode ) { maLBWindow.EnableMultiSelection( bMulti, bStackMode ); } + BOOL IsMultiSelectionEnabled() const { return maLBWindow.IsMultiSelectionEnabled(); } + + void SetMultiSelectionSimpleMode( BOOL bSimple ) { maLBWindow.SetMultiSelectionSimpleMode( bSimple ); } + BOOL IsMultiSelectionSimpleMode() const { return maLBWindow.IsMultiSelectionSimpleMode(); } + + void SetReadOnly( BOOL b ) { maLBWindow.SetReadOnly( b ); } + BOOL IsReadOnly() const { return maLBWindow.IsReadOnly(); } + + + Size CalcSize( USHORT nMaxLines ) const { return maLBWindow.CalcSize( nMaxLines ); } + long GetEntryHeight() const { return maLBWindow.GetEntryHeight(); } + long GetMaxEntryWidth() const { return maLBWindow.GetMaxEntryWidth(); } + + void SetScrollHdl( const Link& rLink ) { maScrollHdl = rLink; } + const Link& GetScrollHdl() const { return maScrollHdl; } + void SetSelectHdl( const Link& rLink ) { maLBWindow.SetSelectHdl( rLink ); } + const Link& GetSelectHdl() const { return maLBWindow.GetSelectHdl(); } + void SetCancelHdl( const Link& rLink ) { maLBWindow.SetCancelHdl( rLink ); } + const Link& GetCancelHdl() const { return maLBWindow.GetCancelHdl(); } + void SetDoubleClickHdl( const Link& rLink ) { maLBWindow.SetDoubleClickHdl( rLink ); } + const Link& GetDoubleClickHdl() const { return maLBWindow.GetDoubleClickHdl(); } + void SetUserDrawHdl( const Link& rLink ) { maLBWindow.SetUserDrawHdl( rLink ); } + const Link& GetUserDrawHdl() const { return maLBWindow.GetUserDrawHdl(); } + + void SetSelectionChangedHdl( const Link& rLnk ) { maLBWindow.GetEntryList()->SetSelectionChangedHdl( rLnk ); } + void SetCallSelectionChangedHdl( BOOL bCall ) { maLBWindow.GetEntryList()->SetCallSelectionChangedHdl( bCall ); } + BOOL IsSelectionChanged() const { return maLBWindow.IsSelectionChanged(); } + USHORT GetSelectModifier() const { return maLBWindow.GetSelectModifier(); } + + void SetMRUEntries( const XubString& rEntries, xub_Unicode cSep ); + XubString GetMRUEntries( xub_Unicode cSep ) const; + void SetMaxMRUCount( USHORT n ) { maLBWindow.GetEntryList()->SetMaxMRUCount( n ); } + USHORT GetMaxMRUCount() const { return maLBWindow.GetEntryList()->GetMaxMRUCount(); } + USHORT GetDisplayLineCount() const + { return maLBWindow.GetDisplayLineCount(); } + + // pb: #106948# explicit mirroring for calc + inline void EnableMirroring() { maLBWindow.EnableMirroring(); } + inline void SetDropTraget(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& i_xDNDListenerContainer){ mxDNDListenerContainer= i_xDNDListenerContainer; } +}; + +// ----------------------------- +// - ImplListBoxFloatingWindow - +// ----------------------------- + +class ImplListBoxFloatingWindow : public FloatingWindow +{ +private: + ImplListBox* mpImplLB; + Size maPrefSz; + USHORT mnDDLineCount; + USHORT mnPopupModeStartSaveSelection; + BOOL mbAutoWidth; + +protected: + long PreNotify( NotifyEvent& rNEvt ); + +public: + ImplListBoxFloatingWindow( Window* pParent ); + + void SetImplListBox( ImplListBox* pLB ) { mpImplLB = pLB; } + + void SetPrefSize( const Size& rSz ) { maPrefSz = rSz; } + const Size& GetPrefSize() const { return maPrefSz; } + + void SetAutoWidth( BOOL b ) { mbAutoWidth = b; } + BOOL IsAutoWidth() const { return mbAutoWidth; } + + Size CalcFloatSize(); + void StartFloat( BOOL bStartTracking ); + + virtual void SetPosSizePixel( long nX, long nY, + long nWidth, long nHeight, USHORT nFlags = WINDOW_POSSIZE_ALL ); + void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) + { FloatingWindow::SetPosSizePixel( rNewPos, rNewSize ); } + + void SetDropDownLineCount( USHORT n ) { mnDDLineCount = n; } + USHORT GetDropDownLineCount() const { return mnDDLineCount; } + + USHORT GetPopupModeStartSaveSelection() const { return mnPopupModeStartSaveSelection; } + + virtual void Resize(); +}; + +// ----------- +// - ImplWin - +// ----------- + +class ImplWin : public Control +{ +private: + + USHORT mnItemPos; // wegen UserDraw muss ich wissen, welches Item ich darstelle. + XubString maString; + Image maImage; + Image maImageHC; + + Rectangle maFocusRect; + Size maUserItemSize; + + Link maMBDownHdl; + Link maUserDrawHdl; + + BOOL mbUserDrawEnabled : 1, + mbInUserDraw : 1; + + + void ImplDraw( bool bLayout = false ); +protected: + virtual void FillLayoutData() const; +public: + + ImplWin( Window* pParent, WinBits nWinStyle = 0 ); + ~ImplWin() {}; + + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void Paint( const Rectangle& rRect ); + virtual void Resize(); + virtual void GetFocus(); + virtual void LoseFocus(); + virtual long PreNotify( NotifyEvent& rNEvt ); + + USHORT GetItemPos() const { return mnItemPos; } + void SetItemPos( USHORT n ) { mnItemPos = n; } + + const XubString& GetString() const { return maString; } + void SetString( const XubString& rStr ) { maString = rStr; } + + const Image& GetImage() const { return maImage; } + void SetImage( const Image& rImg ) { maImage = rImg; } + + BOOL SetModeImage( const Image& rImage, BmpColorMode eMode = BMP_COLOR_NORMAL ); + const Image& GetModeImage( BmpColorMode eMode = BMP_COLOR_NORMAL ) const; + + + virtual void MBDown(); + void SetMBDownHdl( const Link& rLink ) { maMBDownHdl = rLink; } + const Link& GetMBDownHdl() const { return maMBDownHdl; } + + void SetUserDrawHdl( const Link& rLink ) { maUserDrawHdl = rLink; } + const Link& GetUserDrawHdl() const { return maUserDrawHdl; } + + void SetUserItemSize( const Size& rSz ) { maUserItemSize = rSz; } + const Size& GetUserItemSize() const { return maUserItemSize; } + + void EnableUserDraw( BOOL bUserDraw ) { mbUserDrawEnabled = bUserDraw; } + BOOL IsUserDrawEnabled() const { return mbUserDrawEnabled; } + + void DrawEntry( BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos = FALSE, bool bLayout = false ); +}; + +// ----------- +// - ImplBtn - +// ----------- + +class ImplBtn : public PushButton +{ +private: + BOOL mbDown; + + Link maMBDownHdl; + +public: + ImplBtn( Window* pParent, WinBits nWinStyle = 0 ); + ~ImplBtn() {}; + + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + + virtual void MBDown(); + void SetMBDownHdl( const Link& rLink ) { maMBDownHdl = rLink; } + const Link& GetMBDownHdl() const { return maMBDownHdl; } +}; + + +void ImplInitFieldSettings( Window* pWin, BOOL bFont, BOOL bForeground, BOOL bBackground ); +void ImplInitDropDownButton( PushButton* pButton ); + +#endif // _SV_ILSTBOX_HXX diff --git a/vcl/inc/image.h b/vcl/inc/image.h new file mode 100644 index 000000000000..023b2c2d1a2c --- /dev/null +++ b/vcl/inc/image.h @@ -0,0 +1,182 @@ +/************************************************************************* + * + * 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 _SV_IMAGE_H +#define _SV_IMAGE_H + +#include + +#include + +// ---------------- +// - ImplImageBmp - +// ---------------- + +class ImplImageBmp +{ +public: + + ImplImageBmp(); + ~ImplImageBmp(); + + void Create( long nItemWidth, long nItemHeight, USHORT nInitSize ); + void Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHeight,USHORT nInitSize ); + + void Expand( USHORT nGrowSize ); + + void Replace( USHORT nPos, USHORT nSrcPos ); + void Replace( USHORT nPos, const ImplImageBmp& rImageBmp, USHORT nSrcPos ); + void Replace( USHORT nPos, const BitmapEx& rBmpEx ); + + void ReplaceColors( const Color* pSrcColors, const Color* pDstColors, ULONG nColorCount ); + void ColorTransform( BmpColorMode eColorMode ); + void Invert(); + + BitmapEx GetBitmapEx( USHORT nPosCount, USHORT* pPosAry ) const; + + void Draw( USHORT nPos, OutputDevice* pDev, const Point& rPos, USHORT nStyle, const Size* pSize = NULL ); + +private: + + BitmapEx maBmpEx; + BitmapEx maDisabledBmpEx; + BitmapEx* mpDisplayBmp; + Size maSize; + BYTE* mpInfoAry; + USHORT mnSize; + + void ImplUpdateDisplayBmp( OutputDevice* pOutDev ); + void ImplUpdateDisabledBmpEx( int nPos ); + +private: // prevent assignment and copy construction + ImplImageBmp( const ImplImageBmp& ); + void operator=( const ImplImageBmp& ); +}; + +// -------------- +// - ImageTypes - +// -------------- + +enum ImageType { IMAGETYPE_BITMAP, IMAGETYPE_IMAGE }; + +// ----------------- +// - ImplImageList - +// ----------------- + +struct ImageAryData +{ + ::rtl::OUString maName; + // Images identified by either name, or by id + USHORT mnId; + BitmapEx maBitmapEx; + + ImageAryData(); + ImageAryData( const rtl::OUString &aName, + USHORT nId, const BitmapEx &aBitmap ); + ImageAryData( const ImageAryData& rData ); + ~ImageAryData(); + + bool IsLoadable() { return maBitmapEx.IsEmpty() && maName.getLength(); } + void Load(const rtl::OUString &rPrefix); + + ImageAryData& operator=( const ImageAryData& rData ); +}; + +// ------------------------------------------------------------------------------ + +struct ImplImageList +{ + typedef std::vector ImageAryDataVec; + typedef std::hash_map< rtl::OUString, ImageAryData *, rtl::OUStringHash > + ImageAryDataNameHash; + + ImageAryDataVec maImages; + ImageAryDataNameHash maNameHash; + rtl::OUString maPrefix; + Size maImageSize; + ULONG mnRefCount; + + ImplImageList(); + ImplImageList( const ImplImageList &aSrc ); + ~ImplImageList(); + + void AddImage( const ::rtl::OUString &aName, + USHORT nId, const BitmapEx &aBitmapEx ); + void RemoveImage( USHORT nPos ); + USHORT GetImageCount() const; +}; + +// -------------------- +// - ImplImageRefData - +// -------------------- + +struct ImplImageRefData +{ + ImplImageList* mpImplData; + USHORT mnIndex; + + ImplImageRefData() {} // Um Warning zu umgehen + ~ImplImageRefData(); + + BOOL IsEqual( const ImplImageRefData& rData ); +}; + +// ---------------- +// - ImpImageData - +// ---------------- + +struct ImplImageData +{ + ImplImageBmp* mpImageBitmap; + BitmapEx maBmpEx; + + ImplImageData( const BitmapEx& rBmpEx ); + ~ImplImageData(); + + BOOL IsEqual( const ImplImageData& rData ); +}; + +// ------------- +// - ImplImage - +// ------------- + +struct ImplImage +{ + ULONG mnRefCount; + // TODO: use inheritance to get rid of meType+mpData + void* mpData; + ImageType meType; + + ImplImage(); + ~ImplImage(); + +private: // prevent assignment and copy construction + ImplImage( const ImplImage&); + void operator=( const ImplImage&); +}; + +#endif // _SV_IMAGE_H diff --git a/vcl/inc/impbmp.hxx b/vcl/inc/impbmp.hxx new file mode 100644 index 000000000000..dc40fdcd3181 --- /dev/null +++ b/vcl/inc/impbmp.hxx @@ -0,0 +1,108 @@ +/************************************************************************* + * + * 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 _SV_IMPBMP_HXX +#define _SV_IMPBMP_HXX + +#include +#include + +// --------------- +// - ImpBitmap - +// --------------- + +struct BitmapBuffer; +class SalBitmap; +class BitmapPalette; +class SalGraphics; +class ImplServerBitmap; +class Bitmap; +class OutputDevice; +class Color; +class AlphaMask; + +class ImpBitmap +{ +private: + + ULONG mnRefCount; + ULONG mnChecksum; + SalBitmap* mpSalBitmap; + Size maSourceSize; + +public: + + ImpBitmap(); + ~ImpBitmap(); + +#if _SOLAR__PRIVATE + +public: + + void ImplSetSalBitmap( SalBitmap* pSalBitmap ); + SalBitmap* ImplGetSalBitmap() const { return mpSalBitmap; } + +public: + + BOOL ImplCreate( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ); + BOOL ImplCreate( const ImpBitmap& rImpBitmap ); + BOOL ImplCreate( const ImpBitmap& rImpBitmap, SalGraphics* pGraphics ); + BOOL ImplCreate( const ImpBitmap& rImpBitmap, USHORT nNewBitCount ); + + void ImplDestroy(); + + Size ImplGetSize() const; + Size ImplGetSourceSize() const; + void ImplSetSourceSize( const Size&); + USHORT ImplGetBitCount() const; + + BitmapBuffer* ImplAcquireBuffer( BOOL bReadOnly ); + void ImplReleaseBuffer( BitmapBuffer* pBuffer, BOOL bReadOnly ); + +public: + + ULONG ImplGetRefCount() const { return mnRefCount; } + void ImplIncRefCount() { mnRefCount++; } + void ImplDecRefCount() { mnRefCount--; } + + inline void ImplSetChecksum( ULONG nChecksum ) { mnChecksum = nChecksum; } + inline ULONG ImplGetChecksum() const { return mnChecksum; } + +#endif // PRIVATE +}; + +inline Size ImpBitmap::ImplGetSourceSize() const +{ + return maSourceSize; +} + +inline void ImpBitmap::ImplSetSourceSize( const Size& rSize) +{ + maSourceSize = rSize; +} + +#endif // _SV_IMPBMP_HXX diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx new file mode 100644 index 000000000000..e38e1dea78d4 --- /dev/null +++ b/vcl/inc/impfont.hxx @@ -0,0 +1,243 @@ +/************************************************************************* + * + * 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 _SV_IMPFONT_HXX +#define _SV_IMPFONT_HXX + +#include +#include +#include +#include +#include +#include +#include + +// ------------ +// - Impl_Font - +// ------------ + +class Impl_Font +{ +public: + Impl_Font(); + Impl_Font( const Impl_Font& ); + + bool operator==( const Impl_Font& ) const; + + FontPitch GetPitch() { if(mePitch==PITCH_DONTKNOW) AskConfig(); return mePitch; } + FontFamily GetFamily() { if(meFamily==FAMILY_DONTKNOW) AskConfig(); return meFamily; } + FontItalic GetItalic() { if(meItalic==ITALIC_DONTKNOW) AskConfig(); return meItalic; } + FontWeight GetWeight() { if(meWeight==WEIGHT_DONTKNOW) AskConfig(); return meWeight; } + FontWidth GetWidthType() { if(meWidthType==WIDTH_DONTKNOW)AskConfig(); return meWidthType; } + +private: + friend class Font; + void AskConfig(); + + int mnRefCount; + String maFamilyName; + String maStyleName; + Size maSize; + Color maColor; // compatibility, now on output device + Color maFillColor; // compatibility, now on output device + rtl_TextEncoding meCharSet; + LanguageType meLanguage; + LanguageType meCJKLanguage; + FontFamily meFamily; + FontPitch mePitch; + TextAlign meAlign; + FontWeight meWeight; + FontWidth meWidthType; + FontItalic meItalic; + FontUnderline meUnderline; + FontUnderline meOverline; + FontStrikeout meStrikeout; + FontRelief meRelief; + FontEmphasisMark meEmphasisMark; + FontType meType; // used by metrics only + short mnOrientation; + FontKerning mnKerning; + BOOL mbWordLine:1, + mbOutline:1, + mbConfigLookup:1, // there was a config lookup + mbShadow:1, + mbVertical:1, + mbTransparent:1; // compatibility, now on output device + + friend SvStream& operator>>( SvStream& rIStm, Impl_Font& ); + friend SvStream& operator<<( SvStream& rOStm, const Impl_Font& ); +}; + +// ------------------ +// - ImplFontMetric - +// ------------------ + +class ImplFontMetric +{ + friend class OutputDevice; + +private: + long mnAscent; // Ascent + long mnDescent; // Descent + long mnIntLeading; // Internal Leading + long mnExtLeading; // External Leading + long mnLineHeight; // Ascent+Descent+EmphasisMark + long mnSlant; // Slant + USHORT mnMiscFlags; // Misc Flags + UINT32 mnRefCount; // Reference Counter + + enum { DEVICE_FLAG=1, SCALABLE_FLAG=2, LATIN_FLAG=4, CJK_FLAG=8, CTL_FLAG=16 }; + +public: + ImplFontMetric(); + void AddReference(); + void DeReference(); + + long GetAscent() const { return mnAscent; } + long GetDescent() const { return mnDescent; } + long GetIntLeading() const { return mnIntLeading; } + long GetExtLeading() const { return mnExtLeading; } + long GetLineHeight() const { return mnLineHeight; } + long GetSlant() const { return mnSlant; } + + bool IsDeviceFont() const { return ((mnMiscFlags & DEVICE_FLAG) != 0); } + bool IsScalable() const { return ((mnMiscFlags & SCALABLE_FLAG) != 0); } + bool SupportsLatin() const { return ((mnMiscFlags & LATIN_FLAG) != 0); } + bool SupportsCJK() const { return ((mnMiscFlags & CJK_FLAG) != 0); } + bool SupportsCTL() const { return ((mnMiscFlags & CTL_FLAG) != 0); } + + bool operator==( const ImplFontMetric& ) const; +}; + +// ------------------ +// - ImplFontHints - +// ------------------ + +class ImplFontOptions +{ +public: + FontEmbeddedBitmap meEmbeddedBitmap; // whether the embedded bitmaps should be used + FontAntiAlias meAntiAlias; // whether the font should be antialiased + FontAutoHint meAutoHint; // whether the font should be autohinted + FontHinting meHinting; // whether the font should be hinted + FontHintStyle meHintStyle; // type of font hinting to be used +public: + ImplFontOptions() : + meEmbeddedBitmap(EMBEDDEDBITMAP_DONTKNOW), + meAntiAlias(ANTIALIAS_DONTKNOW), + meAutoHint(AUTOHINT_DONTKNOW), + meHinting(HINTING_DONTKNOW), + meHintStyle(HINT_SLIGHT) + {} + ImplFontOptions( FontEmbeddedBitmap eEmbeddedBitmap, FontAntiAlias eAntiAlias, + FontAutoHint eAutoHint, FontHinting eHinting, FontHintStyle eHintStyle) : + meEmbeddedBitmap(eEmbeddedBitmap), + meAntiAlias(eAntiAlias), + meAutoHint(eAutoHint), + meHinting(eHinting), + meHintStyle(eHintStyle) + {} + FontAutoHint GetUseAutoHint() const { return meAutoHint; } + FontHintStyle GetHintStyle() const { return meHintStyle; } + bool DontUseEmbeddedBitmaps() const { return meEmbeddedBitmap == EMBEDDEDBITMAP_FALSE; } + bool DontUseAntiAlias() const { return meAntiAlias == ANTIALIAS_FALSE; } + bool DontUseHinting() const { return (meHinting == HINTING_FALSE) || (GetHintStyle() == HINT_NONE); } +}; + +// ------------------- +// - ImplFontCharMap - +// ------------------- + +class CmapResult; + +class VCL_DLLPUBLIC ImplFontCharMap +{ +public: + explicit ImplFontCharMap( const CmapResult& ); + virtual ~ImplFontCharMap(); + + static ImplFontCharMap* GetDefaultMap( bool bSymbols=false); + + bool IsDefaultMap() const; + bool HasChar( sal_uInt32 ) const; + int CountCharsInRange( sal_uInt32 cMin, sal_uInt32 cMax ) const; + int GetCharCount() const; + + sal_uInt32 GetFirstChar() const; + sal_uInt32 GetLastChar() const; + + sal_uInt32 GetNextChar( sal_uInt32 ) const; + sal_uInt32 GetPrevChar( sal_uInt32 ) const; + + int GetIndexFromChar( sal_uInt32 ) const; + sal_uInt32 GetCharFromIndex( int ) const; + + void AddReference() const; + void DeReference() const; + + int GetGlyphIndex( sal_uInt32 ) const; + +private: + int ImplFindRangeIndex( sal_uInt32 ) const; + + // prevent assignment and copy construction + explicit ImplFontCharMap( const ImplFontCharMap& ); + void operator=( const ImplFontCharMap& ); + +private: + const sal_uInt32* mpRangeCodes; // pairs of StartCode/(EndCode+1) + const int* mpStartGlyphs; // range-specific mapper to glyphs + const USHORT* mpGlyphIds; // individual glyphid mappings + int mnRangeCount; + int mnCharCount; // covered codepoints + mutable int mnRefCount; +}; + +// CmapResult is a normalized version of the many CMAP formats +class +#ifdef UNX + VCL_DLLPUBLIC // vcl-plugins need it +#endif // UNX +CmapResult +{ +public: + explicit CmapResult( bool bSymbolic = false, + const sal_uInt32* pRangeCodes = NULL, int nRangeCount = 0, + const int* pStartGlyphs = 0, const USHORT* pGlyphIds = NULL ); + + const sal_uInt32* mpRangeCodes; + const int* mpStartGlyphs; + const USHORT* mpGlyphIds; + int mnRangeCount; + bool mbSymbolic; + bool mbRecoded; +}; + +bool ParseCMAP( const unsigned char* pRawData, int nRawLength, CmapResult& ); + +#endif // _SV_IMPFONT_HXX + diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx new file mode 100644 index 000000000000..bb28d801fe12 --- /dev/null +++ b/vcl/inc/impgraph.hxx @@ -0,0 +1,176 @@ +/************************************************************************* + * + * 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 _SV_IMPGRAPH_HXX +#define _SV_IMPGRAPH_HXX + +#include +#include +#include +#include +#include +#include + +// --------------- +// - ImpSwapInfo - +// --------------- + +struct ImpSwapInfo +{ + MapMode maPrefMapMode; + Size maPrefSize; +}; + +// -------------- +// - ImpGraphic - +// -------------- + +class OutputDevice; +class GfxLink; +struct ImpSwapFile; +class GraphicConversionParameters; + +class ImpGraphic +{ + friend class Graphic; + +private: + + GDIMetaFile maMetaFile; + BitmapEx maEx; + ImpSwapInfo maSwapInfo; + Animation* mpAnimation; + GraphicReader* mpContext; + ImpSwapFile* mpSwapFile; + GfxLink* mpGfxLink; + GraphicType meType; + String maDocFileURLStr; + ULONG mnDocFilePos; + mutable ULONG mnSizeBytes; + ULONG mnRefCount; + BOOL mbSwapOut; + BOOL mbSwapUnderway; + +private: + + ImpGraphic(); + ImpGraphic( const ImpGraphic& rImpGraphic ); + ImpGraphic( const Bitmap& rBmp ); + ImpGraphic( const BitmapEx& rBmpEx ); + ImpGraphic( const Animation& rAnimation ); + ImpGraphic( const GDIMetaFile& rMtf ); + virtual ~ImpGraphic(); + + ImpGraphic& operator=( const ImpGraphic& rImpGraphic ); + BOOL operator==( const ImpGraphic& rImpGraphic ) const; + BOOL operator!=( const ImpGraphic& rImpGraphic ) const { return !( *this == rImpGraphic ); } + + void ImplClearGraphics( BOOL bCreateSwapInfo ); + void ImplClear(); + + GraphicType ImplGetType() const; + void ImplSetDefaultType(); + BOOL ImplIsSupportedGraphic() const; + + BOOL ImplIsTransparent() const; + BOOL ImplIsAlpha() const; + BOOL ImplIsAnimated() const; + + Bitmap ImplGetBitmap(const GraphicConversionParameters& rParameters) const; + BitmapEx ImplGetBitmapEx(const GraphicConversionParameters& rParameters) const; + Animation ImplGetAnimation() const; + const GDIMetaFile& ImplGetGDIMetaFile() const; + + Size ImplGetPrefSize() const; + void ImplSetPrefSize( const Size& rPrefSize ); + + MapMode ImplGetPrefMapMode() const; + void ImplSetPrefMapMode( const MapMode& rPrefMapMode ); + + ULONG ImplGetSizeBytes() const; + + void ImplDraw( OutputDevice* pOutDev, + const Point& rDestPt ) const; + void ImplDraw( OutputDevice* pOutDev, + const Point& rDestPt, + const Size& rDestSize ) const; + + void ImplStartAnimation( OutputDevice* pOutDev, + const Point& rDestPt, + long nExtraData = 0, + OutputDevice* pFirstFrameOutDev = NULL ); + void ImplStartAnimation( OutputDevice* pOutDev, + const Point& rDestPt, + const Size& rDestSize, + long nExtraData = 0, + OutputDevice* pFirstFrameOutDev = NULL ); + void ImplStopAnimation( OutputDevice* pOutputDevice = NULL, + long nExtraData = 0 ); + + void ImplSetAnimationNotifyHdl( const Link& rLink ); + Link ImplGetAnimationNotifyHdl() const; + + ULONG ImplGetAnimationLoopCount() const; + void ImplResetAnimationLoopCount(); + + List* ImplGetAnimationInfoList() const; + +private: + + GraphicReader* ImplGetContext(); + void ImplSetContext( GraphicReader* pReader ); + +private: + + void ImplSetDocFileName( const String& rName, ULONG nFilePos ); + const String& ImplGetDocFileName() const; + ULONG ImplGetDocFilePos() const; + + BOOL ImplReadEmbedded( SvStream& rIStream, BOOL bSwap = FALSE ); + BOOL ImplWriteEmbedded( SvStream& rOStream ); + + BOOL ImplSwapIn(); + BOOL ImplSwapIn( SvStream* pIStm ); + + BOOL ImplSwapOut(); + BOOL ImplSwapOut( SvStream* pOStm ); + + BOOL ImplIsSwapOut() const; + + void ImplSetLink( const GfxLink& ); + GfxLink ImplGetLink(); + BOOL ImplIsLink() const; + + ULONG ImplGetChecksum() const; + + BOOL ImplExportNative( SvStream& rOStm ) const; + + friend SvStream& operator<<( SvStream& rOStm, const ImpGraphic& rImpGraphic ); + friend SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic ); +}; + +#endif // _SV_IMPGRAPH_HXX diff --git a/vcl/inc/impimagetree.hxx b/vcl/inc/impimagetree.hxx new file mode 100644 index 000000000000..9649fe2f5ec8 --- /dev/null +++ b/vcl/inc/impimagetree.hxx @@ -0,0 +1,96 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ***********************************************************************/ + +#ifndef INCLUDED_VCL_IMPIMAGETREE_HXX +#define INCLUDED_VCL_IMPIMAGETREE_HXX + +#include "sal/config.h" + +#include +#include +#include + +#include + +#include "boost/noncopyable.hpp" +#include "com/sun/star/uno/Reference.hxx" +#include "rtl/ustring.hxx" +#include "salhelper/singletonref.hxx" + +namespace com { namespace sun { namespace star { namespace container { + class XNameAccess; +} } } } +class BitmapEx; + +class ImplImageTree: private boost::noncopyable { +public: + ImplImageTree(); + + ~ImplImageTree(); + + // check whether the icon style is installed + bool checkStyle(rtl::OUString const & style); + + bool loadImage( + rtl::OUString const & name, rtl::OUString const & style, + BitmapEx & bitmap, bool localized = false ); + + void shutDown(); + // a crude form of life cycle control (called from DeInitVCL; otherwise, + // if the ImplImageTree singleton were destroyed during exit that would + // be too late for the destructors of the bitmaps in m_iconCache) + +private: + typedef std::list< + std::pair< + rtl::OUString, + com::sun::star::uno::Reference< + com::sun::star::container::XNameAccess > > > Zips; + + typedef std::hash_map< + rtl::OUString, bool, rtl::OUStringHash > CheckStyleCache; + typedef std::hash_map< + rtl::OUString, std::pair< bool, BitmapEx >, rtl::OUStringHash > IconCache; + + rtl::OUString m_style; + Zips m_zips; + CheckStyleCache m_checkStyleCache; + IconCache m_iconCache; + + void setStyle(rtl::OUString const & style ); + + void resetZips(); + + bool checkStyleCacheLookup( rtl::OUString const & style, bool &exists ); + bool iconCacheLookup( rtl::OUString const & name, bool localized, BitmapEx & bitmap ); + + bool find(std::vector< rtl::OUString > const & paths, BitmapEx & bitmap ); +}; + +typedef salhelper::SingletonRef< ImplImageTree > ImplImageTreeSingletonRef; + +#endif diff --git a/vcl/inc/impoct.hxx b/vcl/inc/impoct.hxx new file mode 100644 index 000000000000..543ab19d6a57 --- /dev/null +++ b/vcl/inc/impoct.hxx @@ -0,0 +1,176 @@ +/************************************************************************* + * + * 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 _SV_IMPOCT_HXX +#define _SV_IMPOCT_HXX + +#include + +// ---------------- +// - ImpErrorQuad - +// ---------------- + +class ImpErrorQuad +{ + long nRed; + long nGreen; + long nBlue; + long nReserved; + +public: + + inline ImpErrorQuad() {} + inline ImpErrorQuad( const BitmapColor& rColor ) : + nRed ( (long) rColor.GetRed() << 5L ), + nGreen ( (long) rColor.GetGreen() << 5L ), + nBlue ( (long) rColor.GetBlue() << 5L ) {} + + inline void operator=( const BitmapColor& rColor ); + inline ImpErrorQuad& operator-=( const BitmapColor& rColor ); + + inline void ImplAddColorError1( const ImpErrorQuad& rErrQuad ); + inline void ImplAddColorError3( const ImpErrorQuad& rErrQuad ); + inline void ImplAddColorError5( const ImpErrorQuad& rErrQuad ); + inline void ImplAddColorError7( const ImpErrorQuad& rErrQuad ); + + inline BitmapColor ImplGetColor(); +}; + +// ------------------------------------------------------------------------ + +inline void ImpErrorQuad::operator=( const BitmapColor& rColor ) +{ + nRed = (long) rColor.GetRed() << 5L; + nGreen = (long) rColor.GetGreen() << 5L; + nBlue = (long) rColor.GetBlue() << 5L; +} + +// ------------------------------------------------------------------------ + +inline ImpErrorQuad& ImpErrorQuad::operator-=( const BitmapColor& rColor ) +{ + nRed -= ( (long) rColor.GetRed() << 5L ); + nGreen -= ( (long) rColor.GetGreen() << 5L ); + nBlue -= ( (long) rColor.GetBlue() << 5L ); + + return *this; +} + +// ------------------------------------------------------------------------ + +inline void ImpErrorQuad::ImplAddColorError1( const ImpErrorQuad& rErrQuad ) +{ + nRed += ( rErrQuad.nRed >> 4L ); + nGreen += ( rErrQuad.nGreen >> 4L ); + nBlue += ( rErrQuad.nBlue >> 4L ); +} + +// ------------------------------------------------------------------------ + +inline void ImpErrorQuad::ImplAddColorError3( const ImpErrorQuad& rErrQuad ) +{ + nRed += ( rErrQuad.nRed * 3L >> 4L ); + nGreen += ( rErrQuad.nGreen * 3L >> 4L ); + nBlue += ( rErrQuad.nBlue * 3L >> 4L ); +} + +// ------------------------------------------------------------------------ + +inline void ImpErrorQuad::ImplAddColorError5( const ImpErrorQuad& rErrQuad ) +{ + nRed += ( rErrQuad.nRed * 5L >> 4L ); + nGreen += ( rErrQuad.nGreen * 5L >> 4L ); + nBlue += ( rErrQuad.nBlue * 5L >> 4L ); +} + +// ------------------------------------------------------------------------ + +inline void ImpErrorQuad::ImplAddColorError7( const ImpErrorQuad& rErrQuad ) +{ + nRed += ( rErrQuad.nRed * 7L >> 4L ); + nGreen += ( rErrQuad.nGreen * 7L >> 4L ); + nBlue += ( rErrQuad.nBlue *7L >> 4L ); +} + +// ------------------------------------------------------------------------ + +inline BitmapColor ImpErrorQuad::ImplGetColor() +{ + return BitmapColor( (BYTE) ( ( nRed < 0L ? 0L : nRed > 8160L ? 8160L : nRed ) >> 5L ), + (BYTE) ( ( nGreen < 0L ? 0L : nGreen > 8160L ? 8160L : nGreen ) >> 5L ), + (BYTE) ( ( nBlue < 0L ? 0L : nBlue > 8160L ? 8160L : nBlue ) >> 5L ) ); +} + +// ------------- +// - NodeCache - +// ------------- + +class ImpNodeCache +{ + OctreeNode* pActNode; + ULONG nNew; + ULONG nDelete; + ULONG nGet; + ULONG nRelease; + +public: + + ImpNodeCache( const ULONG nInitSize ); + ~ImpNodeCache(); + + inline OctreeNode* ImplGetFreeNode(); + inline void ImplReleaseNode( OctreeNode* pNode ); +}; + +// ------------------------------------------------------------------------ + +inline OctreeNode* ImpNodeCache::ImplGetFreeNode() +{ + OctreeNode* pNode; + + if ( !pActNode ) + { + pActNode = new NODE; + pActNode->pNextInCache = NULL; + } + + pNode = pActNode; + pActNode = pNode->pNextInCache; + memset( pNode, 0, sizeof( NODE ) ); + + return pNode; +} + +// ------------------------------------------------------------------------ + +inline void ImpNodeCache::ImplReleaseNode( OctreeNode* pNode ) +{ + pNode->pNextInCache = pActNode; + pActNode = pNode; +} + +#endif // _SV_IMPOCT_HXX diff --git a/vcl/inc/impprn.hxx b/vcl/inc/impprn.hxx new file mode 100644 index 000000000000..954b2340d0c7 --- /dev/null +++ b/vcl/inc/impprn.hxx @@ -0,0 +1,140 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#if 0 +#define _SV_IMPPRN_HXX + +#include +#include +#ifndef _VCL_IMPDEL_HXX +#include +#endif + +#include + +struct QueuePage; + +// ---------------- +// - ImplQPrinter - +// ---------------- + +/* + ImplQPrinter is on most systems a simple buffer that allows a potential + lengthy print job to be printed in the background. For this it saves all + normal drawing operations for each printed page to a metafile, then spooling + the metafiles timer based to a normal printer. The application can act in the meantime + including changing the original document without influencing the print job. + + On some systems (currently Mac/Aqua Cocoa) ImplQPrinter has the additional + purpose of adapting to the print system: here theprint systems starts a + job and will not return from that function until it has ended; to do so + it queries for each consecutive page to be printed. Also the Cocoa print system + needs to know the number of pages BEFORE starting a print job. Since our Printer + does not know that, we need to do the completing spooling to ImplQPrinter before + we can actually print to the real print system. Let's call this the pull model + instead of the push model (because the systems pulls the pages). +*/ + +class ImplQPrinter : public Printer, public vcl::DeletionNotifier +{ +private: + Printer* mpParent; + std::vector< QueuePage* > maQueue; + AutoTimer maTimer; + bool mbAborted; + bool mbUserCopy; + bool mbDestroyAllowed; + bool mbDestroyed; + + GDIMetaFile maCurPageMetaFile; + long mnMaxBmpDPIX; + long mnMaxBmpDPIY; + ULONG mnRestoreDrawMode; + int mnCurCopyCount; + + DECL_LINK( ImplPrintHdl, Timer* ); + + ~ImplQPrinter(); + + void ImplPrintMtf( GDIMetaFile& rMtf, long nMaxBmpDPIX, long nMaxBmpDPIY ); + + ImplQPrinter( const ImplQPrinter& rPrinter ); + Printer& operator =( const ImplQPrinter& rPrinter ); + + void PrePrintPage( QueuePage* ); + void PostPrintPage(); + +public: + + ImplQPrinter( Printer* pParent ); + void Destroy(); + + void StartQueuePrint(); + void EndQueuePrint(); + void AbortQueuePrint(); + void AddQueuePage( GDIMetaFile* pPage, USHORT nPage, BOOL bNewJobSetup ); + + bool IsUserCopy() const { return mbUserCopy; } + void SetUserCopy( bool bSet ) { mbUserCopy = bSet; } + + /** + used by pull implementation to emit the next page + */ + void PrintPage( unsigned int nPage ); + /** + used by pull implementation to get the number of physical pages + (that is how often PrintNextPage should be called) + */ + ULONG GetPrintPageCount() const; + + /** + used by pull implementation to get ranges of physical pages that + are to be printed on the same paper. If bIncludeOrientationChanges is true + then orientation changes will not break a page run; the implementation has + to rotate the page contents accordingly in that case. + + The returned vector contains all pages indices beginning a new medium and additionally + the index that of the last page+1 (for convenience, so the length of a range + is always v[i+1] - v[i]) + + Example: 5 pages, all A4 + return: [0 5] + + Example: 6 pages, beginning A4, switching tol A5 on fourth page, back to A4 on fifth page + return [0 3 4 6] + + returns an false in push model (error condition) + */ + bool GetPaperRanges( std::vector< ULONG >& o_rRanges, bool i_bIncludeOrientationChanges ) const; + + /** + get the jobsetup for a page + */ + ImplJobSetup* GetPageSetup( unsigned int nPage ) const; +}; + +#endif // _SV_IMPPRN_HXX diff --git a/vcl/inc/jobset.h b/vcl/inc/jobset.h new file mode 100644 index 000000000000..2a8be4a6999e --- /dev/null +++ b/vcl/inc/jobset.h @@ -0,0 +1,79 @@ +/************************************************************************* + * + * 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 _SV_JOBSET_H +#define _SV_JOBSET_H + +#include +#include +#include +#include +#include + +// ------------------ +// - JobSetup-Types - +// ------------------ + +// see com.sun.star.portal.client.JobSetupSystem.idl: +#define JOBSETUP_SYSTEM_DONTKNOW 0 +#define JOBSETUP_SYSTEM_WINDOWS 1 +#define JOBSETUP_SYSTEM_OS2 2 +#define JOBSETUP_SYSTEM_UNIX 3 +#define JOBSETUP_SYSTEM_MAC 4 +#define JOBSETUP_SYSTEM_JAVA 5 + +// ---------------- +// - ImplJobSetup - +// ---------------- + +struct ImplJobSetup +{ + USHORT mnRefCount; // RefCount (only independ data) + USHORT mnSystem; // Sytem - JOBSETUP_SYSTEM_xxxx + String maPrinterName; // Printer-Name + String maDriver; // Driver-Name + Orientation meOrientation; // Orientation + DuplexMode meDuplexMode; // Duplex + USHORT mnPaperBin; // paper bin / in tray + Paper mePaperFormat; // paper format + long mnPaperWidth; // paper width (100th mm) + long mnPaperHeight; // paper height (100th mm) + ULONG mnDriverDataLen; // length of system specific data + BYTE* mpDriverData; // system specific data (will be streamed a byte block) + ::std::hash_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash > maValueMap; + + ImplJobSetup(); + ImplJobSetup( const ImplJobSetup& rJobSetup ); + ~ImplJobSetup(); +}; + +// Papierformat wird wenn PAPER_USER im unabhaengigen Teil automatisch aus +// Papierbreite/hoehe berechnet +// Papierbreite/hoehe wird wenn 0 im unabhaengigen Teil automatisch aus +// Papierformat berechnet, wenn dieses ungleich PAPER_USER ist + +#endif // _SV_JOBSET_H diff --git a/vcl/inc/outdata.hxx b/vcl/inc/outdata.hxx new file mode 100644 index 000000000000..5d2852444767 --- /dev/null +++ b/vcl/inc/outdata.hxx @@ -0,0 +1,49 @@ +/************************************************************************* + * + * 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 _SV_OUTDATA_HXX +#define _SV_OUTDATA_HXX + +#include +#include +#include + +// ----------------- +// - Hilfemethoden - +// ----------------- + +inline SalColor ImplColorToSal( Color aColor ) +{ + return MAKE_SALCOLOR( aColor.GetRed(), aColor.GetGreen(), aColor.GetBlue() ); +} + +inline int ImplIsColorTransparent( Color aColor ) +{ + return aColor.GetTransparency(); +} + +#endif // _SV_OUTDATA_HXX diff --git a/vcl/inc/outdev.h b/vcl/inc/outdev.h new file mode 100644 index 000000000000..72805ae60d1b --- /dev/null +++ b/vcl/inc/outdev.h @@ -0,0 +1,264 @@ +/************************************************************************* + * + * 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 _SV_OUTDEV_H +#define _SV_OUTDEV_H + +#include +#include + +#include +#include +#include + +class Size; +class Font; +class VirtualDevice; +class ImplServerGraphics; +class ImplGetDevFontList; +class GetDevSizeList; + +// ----------------------- +// - ImplDevFontListData - +// ----------------------- + +// flags for mnMatchType member +#define IMPL_DEVFONT_SCALABLE ((ULONG)0x00000001) +#define IMPL_DEVFONT_SYMBOL ((ULONG)0x00000002) +#define IMPL_DEVFONT_NONESYMBOL ((ULONG)0x00000004) +#define IMPL_DEVFONT_LIGHT ((ULONG)0x00000010) +#define IMPL_DEVFONT_BOLD ((ULONG)0x00000020) +#define IMPL_DEVFONT_NORMAL ((ULONG)0x00000040) +#define IMPL_DEVFONT_NONEITALIC ((ULONG)0x00000100) +#define IMPL_DEVFONT_ITALIC ((ULONG)0x00000200) + +// TODO: rename ImplDevFontListData to PhysicalFontFamily +class ImplDevFontListData +{ +public: + ImplDevFontListData( const String& rSearchName ); + ~ImplDevFontListData(); + + const String& GetFamilyName() const { return maName; } + const String& GetSearchName() const { return maSearchName; } + const String& GetAliasNames() const { return maMapNames; } + bool IsScalable() const { return mpFirst->IsScalable(); } + int GetMinQuality() const { return mnMinQuality; } + + bool AddFontFace( ImplFontData* ); + void InitMatchData( const utl::FontSubstConfiguration&, + const String& rSearchName ); + ImplFontData* FindBestFontFace( const ImplFontSelectData& rFSD ) const; + + void GetFontHeights( std::set& rHeights ) const; + void UpdateDevFontList( ImplGetDevFontList& ) const; + void UpdateCloneFontList( ImplDevFontList&, + bool bScalable, bool bEmbeddable ) const; + +private: +friend class ImplDevFontList; // TODO: remove soon + ImplFontData* mpFirst; // linked list of physical font faces + String maName; // Fontname (original font family name) + String maSearchName; // normalized font family name + String maMapNames; // fontname aliases + ULONG mnTypeFaces; // Typeface Flags + ULONG mnMatchType; // MATCH - Type + String maMatchFamilyName; // MATCH - FamilyName + FontWeight meMatchWeight; // MATCH - Weight + FontWidth meMatchWidth; // MATCH - Width + FontFamily meFamily; + FontPitch mePitch; + int mnMinQuality; // quality of the worst font face +}; + + +// ---------------------- +// - ImplGetDevFontList - +// ---------------------- + +// an ImplGetDevFontList is created by an ImplDevFontList +// it becomes invalid when original ImplDevFontList is modified +class ImplGetDevFontList +{ +private: + std::vector maDevFontVector; + +public: + ImplGetDevFontList() { maDevFontVector.reserve(1024); } + void Add( ImplFontData* pFace ) { maDevFontVector.push_back( pFace ); } + ImplFontData* Get( int nIndex ) const { return maDevFontVector[ nIndex ]; } + int Count() const { return maDevFontVector.size(); } +}; + +// ---------------------- +// - ImplGetDevSizeList - +// ---------------------- + +class ImplGetDevSizeList +{ +private: + String maFontName; + std::vector maSizeList; + +public: + ImplGetDevSizeList( const String& rFontName ) + : maFontName( rFontName ) { maSizeList.reserve( 32 ); } + void Add( int nHeight ) { maSizeList.push_back( nHeight ); } + int Count() const { return maSizeList.size(); } + int Get( int nIndex ) const { return maSizeList[ nIndex ]; } + const String& GetFontName() const { return maFontName; } +}; + +// ------------------------ +// - ImplFontSubstitution - +// ------------------------ +// nowadays these substitutions are needed for backward compatibility and tight platform integration: +// - substitutions from configuration entries (Tools->Options->FontReplacement and/or fontconfig) +// - device specific substitutions (e.g. for PS printer builtin fonts) +// - substitutions for missing fonts defined by configuration entries (generic and/or platform dependent fallbacks) +// - substitutions for missing fonts defined by multi-token fontnames (e.g. fontname="SpecialFont;FallbackA;FallbackB") +// - substitutions for incomplete fonts (implicit, generic, EUDC and/or platform dependent fallbacks) +// - substitutions for missing symbol fonts by translating code points into other symbol fonts + +class ImplFontSubstitution +{ + // TODO: there is more commonality between the different substitutions +protected: + virtual ~ImplFontSubstitution() {} +}; + +// ImplDirectFontSubstitution is for Tools->Options->FontReplacement and PsPrinter substitutions +// The clss is just a simple port of the unmaintainable manual-linked-list based mechanism +// TODO: get rid of this class when the Tools->Options->FontReplacement tabpage is gone for good + +struct ImplFontSubstEntry +{ + String maName; + String maReplaceName; + String maSearchName; + String maSearchReplaceName; + USHORT mnFlags; + + ImplFontSubstEntry( const String& rFontName, const String& rSubstFontName, USHORT nSubstFlags ); +}; + +class ImplDirectFontSubstitution +: public ImplFontSubstitution +{ +private: + typedef std::list FontSubstList; + FontSubstList maFontSubstList; +public: + void AddFontSubstitute( const String& rFontName, const String& rSubstName, USHORT nFlags ); + void RemoveFontSubstitute( int nIndex ); + bool GetFontSubstitute( int nIndex, String& rFontName, String& rSubstName, USHORT& rFlags ) const; + int GetFontSubstituteCount() const { return maFontSubstList.size(); }; + bool Empty() const { return maFontSubstList.empty(); } + void Clear() { maFontSubstList.clear(); } + + bool FindFontSubstitute( String& rSubstName, const String& rFontName, USHORT nFlags ) const; +}; + +// PreMatchFontSubstitution +// abstracts the concept of a configured font substitution +// before the availability of the originally selected font has been checked +class ImplPreMatchFontSubstitution +: public ImplFontSubstitution +{ +public: + virtual bool FindFontSubstitute( ImplFontSelectData& ) const = 0; +}; + +// ImplGlyphFallbackFontSubstitution +// abstracts the concept of finding the best font to support an incomplete font +class ImplGlyphFallbackFontSubstitution +: public ImplFontSubstitution +{ +public: + virtual bool FindFontSubstitute( ImplFontSelectData&, rtl::OUString& rMissingCodes ) const = 0; +}; + +// ----------------- +// - ImplFontCache - +// ----------------- +// TODO: closely couple with ImplDevFontList + +class ImplFontCache +{ +private: + ImplFontEntry* mpFirstEntry; + int mnRef0Count; // number of unreferenced ImplFontEntries + bool mbPrinter; + + // cache of recently used font instances + struct IFSD_Equal { bool operator()( const ImplFontSelectData&, const ImplFontSelectData& ) const; }; + struct IFSD_Hash { size_t operator()( const ImplFontSelectData& ) const; }; + typedef ::std::hash_map FontInstanceList; + FontInstanceList maFontInstanceList; + + // cache of recently requested font names vs. selected font names + typedef ::std::hash_map FontNameList; + FontNameList maFontNameList; + +public: + ImplFontCache( bool bPrinter ); + ~ImplFontCache(); + + ImplFontEntry* GetFontEntry( ImplDevFontList*, + const Font&, const Size& rPixelSize, float fExactHeight, + ImplDirectFontSubstitution* pDevSpecific ); + ImplFontEntry* GetFontEntry( ImplDevFontList*, + ImplFontSelectData&, ImplDirectFontSubstitution* pDevSpecific ); + ImplFontEntry* GetGlyphFallbackFont( ImplDevFontList*, ImplFontSelectData&, + int nFallbackLevel, rtl::OUString& rMissingCodes ); + void Release( ImplFontEntry* ); + void Invalidate(); +}; + +// ------------------ +// - ImplOutDevData - +// ------------------ + +namespace vcl { struct ControlLayoutData; } +// #i75163# +namespace basegfx { class B2DHomMatrix; } + +struct ImplOutDevData +{ + VirtualDevice* mpRotateDev; + vcl::ControlLayoutData* mpRecordLayout; + Rectangle maRecordRect; + ImplDirectFontSubstitution maDevFontSubst; + + // #i75163# + basegfx::B2DHomMatrix* mpViewTransform; + basegfx::B2DHomMatrix* mpInverseViewTransform; +}; + +void ImplFreeOutDevFontData(); + +#endif // _SV_OUTDEV_H diff --git a/vcl/inc/outfont.hxx b/vcl/inc/outfont.hxx new file mode 100644 index 000000000000..7ad233449d93 --- /dev/null +++ b/vcl/inc/outfont.hxx @@ -0,0 +1,406 @@ +/************************************************************************* + * + * 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 _SV_OUTFONT_HXX +#define _SV_OUTFONT_HXX + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +class ImplDevFontListData; +class ImplGetDevFontList; +class ImplGetDevSizeList; +class ImplFontEntry; +class ImplDirectFontSubstitution; +class ImplPreMatchFontSubstitution; +class ImplGlyphFallbackFontSubstitution; +class ImplFontSelectData; +class Font; +class ConvertChar; +struct FontMatchStatus; +class OutputDevice; + +namespace com { namespace sun { namespace star { namespace lang { struct Locale; }}}} + +// ---------------------- +// - ImplFontAttributes - +// ---------------------- +// device independent font properties + +class ImplFontAttributes +{ +public: // TODO: create matching interface class + const String& GetFamilyName() const { return maName; } + const String& GetStyleName() const { return maStyleName; } + FontWeight GetWeight() const { return meWeight; } + FontItalic GetSlant() const { return meItalic; } + FontFamily GetFamilyType() const { return meFamily; } + FontPitch GetPitch() const { return mePitch; } + FontWidth GetWidthType() const { return meWidthType; } + bool IsSymbolFont() const { return mbSymbolFlag; } + +public: // TODO: hide members behind accessor methods + String maName; // Font Family Name + String maStyleName; // Font Style Name + FontWeight meWeight; // Weight Type + FontItalic meItalic; // Slant Type + FontFamily meFamily; // Family Type + FontPitch mePitch; // Pitch Type + FontWidth meWidthType; // Width Type + bool mbSymbolFlag; +}; + +// ------------------------- +// - ImplDevFontAttributes - +// ------------------------- +// device dependent font properties + +class ImplDevFontAttributes : public ImplFontAttributes +{ +public: // TODO: create matching interface class + const String& GetAliasNames() const { return maMapNames; } + int GetQuality() const { return mnQuality; } + bool IsRotatable() const { return mbOrientation; } + bool IsDeviceFont() const { return mbDevice; } + bool IsEmbeddable() const { return mbEmbeddable; } + bool IsSubsettable() const { return mbSubsettable; } + +public: // TODO: hide members behind accessor methods + String maMapNames; // List of family name aliass separated with ';' + int mnQuality; // Quality (used when similar fonts compete) + bool mbOrientation; // true: physical font can be rotated + bool mbDevice; // true: built in font + bool mbSubsettable; // true: a subset of the font can be created + bool mbEmbeddable; // true: the font can be embedded +}; + +// ---------------- +// - ImplFontData - +// ---------------- +// TODO: rename ImplFontData to PhysicalFontFace +// TODO: no more direct access to members +// TODO: add reference counting +// TODO: get rid of height/width for scalable fonts +// TODO: make cloning cheaper + +// abstract base class for physical font faces +class VCL_DLLPUBLIC ImplFontData : public ImplDevFontAttributes +{ +public: + // by using an ImplFontData object as a factory for its corresponding + // ImplFontEntry an ImplFontEntry can be extended to cache device and + // font instance specific data + virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const = 0; + + virtual int GetHeight() const { return mnHeight; } + virtual int GetWidth() const { return mnWidth; } + virtual sal_IntPtr GetFontId() const = 0; + int GetFontMagic() const { return mnMagic; } + bool IsScalable() const { return (mnHeight == 0); } + bool CheckMagic( int n ) const { return (n == mnMagic); } + ImplFontData* GetNextFace() const { return mpNext; } + ImplFontData* CreateAlias() const { return Clone(); } + + bool IsBetterMatch( const ImplFontSelectData&, FontMatchStatus& ) const; + StringCompare CompareWithSize( const ImplFontData& ) const; + StringCompare CompareIgnoreSize( const ImplFontData& ) const; + virtual ~ImplFontData() {} + virtual ImplFontData* Clone() const = 0; + +protected: + explicit ImplFontData( const ImplDevFontAttributes&, int nMagic ); + void SetBitmapSize( int nW, int nH ) { mnWidth=nW; mnHeight=nH; } + + long mnWidth; // Width (in pixels) + long mnHeight; // Height (in pixels) + +private: +friend class ImplDevFontListData; + const int mnMagic; // poor man's RTTI + ImplFontData* mpNext; +}; + +// ---------------------- +// - ImplFontSelectData - +// ---------------------- + +class ImplFontSelectData : public ImplFontAttributes +{ +public: + ImplFontSelectData( const Font&, const String& rSearchName, + const Size&, float fExactHeight ); + ImplFontSelectData( const ImplFontData&, const Size&, + float fExactHeight, int nOrientation, bool bVertical ); + +public: // TODO: change to private + String maTargetName; // name of the font name token that is chosen + String maSearchName; // name of the font that matches best + int mnWidth; // width of font in pixel units + int mnHeight; // height of font in pixel units + float mfExactHeight; // requested height (in pixels with subpixel details) + int mnOrientation; // text orientation in 3600 system + LanguageType meLanguage; // text language + bool mbVertical; // vertical mode of requested font + bool mbNonAntialiased; // true if antialiasing is disabled + + const ImplFontData* mpFontData; // a matching ImplFontData object + ImplFontEntry* mpFontEntry; // pointer to the resulting FontCache entry +}; + +// ------------------- +// - ImplDevFontList - +// ------------------- +// TODO: merge with ImplFontCache +// TODO: rename to LogicalFontManager + +class VCL_DLLPUBLIC ImplDevFontList +{ +private: + friend class WinGlyphFallbackSubstititution; + mutable bool mbMatchData; // true if matching attributes are initialized + bool mbMapNames; // true if MapNames are available + + typedef std::hash_map DevFontList; + DevFontList maDevFontList; + + ImplPreMatchFontSubstitution* mpPreMatchHook; // device specific prematch substitution + ImplGlyphFallbackFontSubstitution* mpFallbackHook; // device specific glyh fallback substitution + +public: + explicit ImplDevFontList(); + virtual ~ImplDevFontList(); + + // fill the list with device fonts + void Add( ImplFontData* ); + void Clear(); + int Count() const { return maDevFontList.size(); } + + // find the device font + ImplDevFontListData* FindFontFamily( const String& rFontName ) const; + ImplDevFontListData* ImplFindByFont( ImplFontSelectData&, bool bPrinter, ImplDirectFontSubstitution* ) const; + ImplDevFontListData* ImplFindBySearchName( const String& ) const; + + // suggest fonts for glyph fallback + ImplDevFontListData* GetGlyphFallbackFont( ImplFontSelectData&, + rtl::OUString& rMissingCodes, int nFallbackLevel ) const; + + // prepare platform specific font substitutions + void SetPreMatchHook( ImplPreMatchFontSubstitution* ); + void SetFallbackHook( ImplGlyphFallbackFontSubstitution* ); + + // misc utilities + ImplDevFontList* Clone( bool bScalable, bool bEmbeddable ) const; + ImplGetDevFontList* GetDevFontList() const; + ImplGetDevSizeList* GetDevSizeList( const String& rFontName ) const; + + //used by 2-level font fallback + ImplDevFontListData* ImplFindByLocale( com::sun::star::lang::Locale& ) const; + +protected: + void InitMatchData() const; + bool AreMapNamesAvailable() const { return mbMapNames; } + + ImplDevFontListData* ImplFindByTokenNames( const String& ) const; + ImplDevFontListData* ImplFindByAliasName( const String& rSearchName, const String& rShortName ) const; + ImplDevFontListData* ImplFindBySubstFontAttr( const utl::FontNameAttr& ) const; + ImplDevFontListData* ImplFindByAttributes( ULONG nSearchType, FontWeight, FontWidth, + FontFamily, FontItalic, const String& rSearchFamily ) const; + ImplDevFontListData* FindDefaultFont() const; + +private: + void InitGenericGlyphFallback() const; + mutable ImplDevFontListData** mpFallbackList; + mutable int mnFallbackCount; +}; + +// -------------------- +// - ImplKernPairData - +// -------------------- +// TODO: get rid of ImplKernPairData and use outdev.hxx's KerningPair struct +// the problem is that outdev.hxx is too high level for the device layers +// and outdev.hxx's customers depend on KerningPair being defined there + +struct ImplKernPairData +{ + USHORT mnChar1; + USHORT mnChar2; + long mnKern; +}; + + +// ----------------------- +// - ImplFontMetricData - +// ----------------------- + +class ImplFontMetricData : public ImplFontAttributes +{ +public: + explicit ImplFontMetricData( const ImplFontSelectData& ); + void ImplInitTextLineSize( const OutputDevice* pDev ); + void ImplInitAboveTextLineSize(); + +public: // TODO: hide members behind accessor methods + // font instance attributes from the font request + long mnWidth; // Reference Width + short mnOrientation; // Rotation in 1/10 degrees + + // font metrics measured for the font instance + long mnAscent; // Ascent + long mnDescent; // Descent + long mnIntLeading; // Internal Leading + long mnExtLeading; // External Leading + int mnSlant; // Slant (Italic/Oblique) + long mnMinKashida; // Minimal width of kashida (Arabic) + + // font attributes queried from the font instance + int meFamilyType; // Font Family Type + bool mbDevice; // Flag for Device Fonts + bool mbScalableFont; + bool mbKernableFont; + + // font metrics that are usually derived from the measurements + long mnUnderlineSize; // Lineheight of Underline + long mnUnderlineOffset; // Offset from Underline to Baseline + long mnBUnderlineSize; // Hoehe von fetter Unterstreichung + long mnBUnderlineOffset; // Offset von fetter Unterstreichung zur Baseline + long mnDUnderlineSize; // Hoehe von doppelter Unterstreichung + long mnDUnderlineOffset1; // Offset von doppelter Unterstreichung zur Baseline + long mnDUnderlineOffset2; // Offset von doppelter Unterstreichung zur Baseline + long mnWUnderlineSize; // Hoehe von WaveLine-Unterstreichung + long mnWUnderlineOffset; // Offset von WaveLine-Unterstreichung zur Baseline, jedoch zentriert zur WaveLine + long mnAboveUnderlineSize; // Hoehe von einfacher Unterstreichung (for Vertical Right) + long mnAboveUnderlineOffset; // Offset von einfacher Unterstreichung zur Baseline (for Vertical Right) + long mnAboveBUnderlineSize; // Hoehe von fetter Unterstreichung (for Vertical Right) + long mnAboveBUnderlineOffset; // Offset von fetter Unterstreichung zur Baseline (for Vertical Right) + long mnAboveDUnderlineSize; // Hoehe von doppelter Unterstreichung (for Vertical Right) + long mnAboveDUnderlineOffset1; // Offset von doppelter Unterstreichung zur Baseline (for Vertical Right) + long mnAboveDUnderlineOffset2; // Offset von doppelter Unterstreichung zur Baseline (for Vertical Right) + long mnAboveWUnderlineSize; // Hoehe von WaveLine-Unterstreichung (for Vertical Right) + long mnAboveWUnderlineOffset; // Offset von WaveLine-Unterstreichung zur Baseline, jedoch zentriert zur WaveLine (for Vertical Right) + long mnStrikeoutSize; // Hoehe von einfacher Durchstreichung + long mnStrikeoutOffset; // Offset von einfacher Durchstreichung zur Baseline + long mnBStrikeoutSize; // Hoehe von fetter Durchstreichung + long mnBStrikeoutOffset; // Offset von fetter Durchstreichung zur Baseline + long mnDStrikeoutSize; // Hoehe von doppelter Durchstreichung + long mnDStrikeoutOffset1; // Offset von doppelter Durchstreichung zur Baseline + long mnDStrikeoutOffset2; // Offset von doppelter Durchstreichung zur Baseline +}; + +// ----------------- +// - ImplFontEntry - +// ------------------ +// TODO: rename ImplFontEntry to LogicalFontInstance +// TODO: allow sharing of metrics for related fonts + +class VCL_DLLPUBLIC ImplFontEntry +{ +public: + explicit ImplFontEntry( const ImplFontSelectData& ); + virtual ~ImplFontEntry(); + +public: // TODO: make data members private + ImplFontSelectData maFontSelData; // FontSelectionData + ImplFontMetricData maMetric; // Font Metric + const ConvertChar* mpConversion; // used e.g. for StarBats->StarSymbol + long mnLineHeight; + ULONG mnRefCount; + USHORT mnSetFontFlags; // Flags returned by SalGraphics::SetFont() + short mnOwnOrientation; // text angle if lower layers don't rotate text themselves + short mnOrientation; // text angle in 3600 system + bool mbInit; // true if maMetric member is valid + + void AddFallbackForUnicode( sal_UCS4, FontWeight eWeight, const String& rFontName ); + bool GetFallbackForUnicode( sal_UCS4, FontWeight eWeight, String* pFontName ) const; + void IgnoreFallbackForUnicode( sal_UCS4, FontWeight eWeight, const String& rFontName ); + +private: + // cache of Unicode characters and replacement font names + // TODO: a fallback map can be shared with many other ImplFontEntries + // TODO: at least the ones which just differ in orientation, stretching or height + typedef ::std::pair GFBCacheKey; + struct GFBCacheKey_Hash{ size_t operator()( const GFBCacheKey& ) const; }; + typedef ::std::hash_map UnicodeFallbackList; + UnicodeFallbackList* mpUnicodeFallbackList; +}; + + +class ImplTextLineInfo +{ +private: + long mnWidth; + xub_StrLen mnIndex; + xub_StrLen mnLen; + +public: + ImplTextLineInfo( long nWidth, xub_StrLen nIndex, xub_StrLen nLen ) + { + mnWidth = nWidth; + mnIndex = nIndex; + mnLen = nLen; + } + + long GetWidth() const { return mnWidth; } + xub_StrLen GetIndex() const { return mnIndex; } + xub_StrLen GetLen() const { return mnLen; } +}; + +#define MULTITEXTLINEINFO_RESIZE 16 +typedef ImplTextLineInfo* PImplTextLineInfo; + +class ImplMultiTextLineInfo +{ +private: + PImplTextLineInfo* mpLines; + xub_StrLen mnLines; + xub_StrLen mnSize; + +public: + ImplMultiTextLineInfo(); + ~ImplMultiTextLineInfo(); + + void AddLine( ImplTextLineInfo* pLine ); + void Clear(); + + ImplTextLineInfo* GetLine( USHORT nLine ) const + { return mpLines[nLine]; } + xub_StrLen Count() const { return mnLines; } + +private: + ImplMultiTextLineInfo( const ImplMultiTextLineInfo& ); + ImplMultiTextLineInfo& operator=( const ImplMultiTextLineInfo& ); +}; + +#endif // _SV_OUTFONT_HXX + diff --git a/vcl/inc/print.h b/vcl/inc/print.h new file mode 100644 index 000000000000..66ab22d65570 --- /dev/null +++ b/vcl/inc/print.h @@ -0,0 +1,83 @@ +/************************************************************************* + * + * 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 _SV_PRINT_H +#define _SV_PRINT_H + +#include "vcl/sv.h" +#include "vcl/dllapi.h" + +#include "rtl/ustring.hxx" + +#include +#include + +struct SalPrinterQueueInfo; +class QueueInfo; +class JobSetup; + +namespace vcl +{ class PrinterListener; } + +// -------------------- +// - ImplPrnQueueData - +// -------------------- + +struct ImplPrnQueueData +{ + QueueInfo* mpQueueInfo; + SalPrinterQueueInfo* mpSalQueueInfo; +}; + +// -------------------- +// - ImplPrnQueueList - +// -------------------- + +class VCL_DLLPUBLIC ImplPrnQueueList +{ +public: + std::hash_map< rtl::OUString, sal_Int32, rtl::OUStringHash > + m_aNameToIndex; + std::vector< ImplPrnQueueData > m_aQueueInfos; + std::vector< rtl::OUString > m_aPrinterList; + + ImplPrnQueueList() {} + ~ImplPrnQueueList(); + + void Add( SalPrinterQueueInfo* pData ); + ImplPrnQueueData* Get( const rtl::OUString& rPrinter ); +}; + +// -------------- +// - Prototypes - +// -------------- + +void ImplDeletePrnQueueList(); +void SAL_DLLPRIVATE ImplUpdateJobSetupPaper( JobSetup& rJobSetup ); + + +#endif // _SV_PRINT_H diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx new file mode 100644 index 000000000000..d1bbc3030c18 --- /dev/null +++ b/vcl/inc/printdlg.hxx @@ -0,0 +1,335 @@ +/************************************************************************* + * + * 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 _SV_PRNDLG_HXX +#define _SV_PRNDLG_HXX + +#include + +#include "print.h" + +#include "vcl/print.hxx" +#include "vcl/dialog.hxx" +#include "vcl/fixed.hxx" +#include "vcl/button.hxx" +#include "vcl/gdimtf.hxx" +#include "vcl/lstbox.hxx" +#include "vcl/field.hxx" +#include "vcl/tabctrl.hxx" +#include "vcl/tabpage.hxx" +#include "vcl/arrange.hxx" +#include "vcl/virdev.hxx" + +#include +#include + +namespace vcl +{ + class PrintDialog : public ModalDialog + { + class PrintPreviewWindow : public Window + { + GDIMetaFile maMtf; + Size maOrigSize; + Size maPreviewSize; + VirtualDevice maPageVDev; + rtl::OUString maReplacementString; + rtl::OUString maToolTipString; + bool mbGreyscale; + FixedLine maHorzDim; + FixedLine maVertDim; + + bool useHCColorReplacement() const; + public: + PrintPreviewWindow( Window* pParent, const ResId& ); + virtual ~PrintPreviewWindow(); + + virtual void Paint( const Rectangle& rRect ); + virtual void Command( const CommandEvent& ); + virtual void Resize(); + virtual void DataChanged( const DataChangedEvent& ); + + void setPreview( const GDIMetaFile&, const Size&, const rtl::OUString&, + sal_Int32 i_nDPIX, sal_Int32 i_nDPIY, + bool i_bGreyscale + ); + }; + + class ShowNupOrderWindow : public Window + { + int mnOrderMode; + int mnRows; + int mnColumns; + void ImplInitSettings(); + public: + ShowNupOrderWindow( Window* pParent ); + virtual ~ShowNupOrderWindow(); + + virtual void Paint( const Rectangle& ); + + void setValues( int i_nOrderMode, int i_nColumns, int i_nRows ) + { + mnOrderMode = i_nOrderMode; + mnRows = i_nRows; + mnColumns = i_nColumns; + Invalidate(); + } + }; + + class NUpTabPage : public TabPage + { + public: + FixedLine maNupLine; + RadioButton maPagesBtn; + RadioButton maBrochureBtn; + FixedText maPagesBoxTitleTxt; + ListBox maNupPagesBox; + + // controls for "Custom" page mode + FixedText maNupNumPagesTxt; + NumericField maNupColEdt; + FixedText maNupTimesTxt; + NumericField maNupRowsEdt; + FixedText maPageMarginTxt1; + MetricField maPageMarginEdt; + FixedText maPageMarginTxt2; + FixedText maSheetMarginTxt1; + MetricField maSheetMarginEdt; + FixedText maSheetMarginTxt2; + FixedText maNupOrientationTxt; + ListBox maNupOrientationBox; + + // page order ("left to right, then down") + FixedText maNupOrderTxt; + ListBox maNupOrderBox; + ShowNupOrderWindow maNupOrderWin; + // border around each page + CheckBox maBorderCB; + + boost::shared_ptr< vcl::RowOrColumn > mxBrochureDep; + boost::shared_ptr< vcl::LabeledElement >mxPagesBtnLabel; + + void setupLayout(); + + NUpTabPage( Window*, const ResId& ); + virtual ~NUpTabPage(); + + void readFromSettings(); + void storeToSettings(); + void initFromMultiPageSetup( const vcl::PrinterController::MultiPageSetup& ); + void enableNupControls( bool bEnable ); + + void showAdvancedControls( bool ); + + // virtual void Resize(); + }; + + class JobTabPage : public TabPage + { + public: + FixedLine maPrinterFL; + ListBox maPrinters; + DisclosureButton maDetailsBtn; + FixedText maStatusLabel; + FixedText maStatusTxt; + FixedText maLocationLabel; + FixedText maLocationTxt; + FixedText maCommentLabel; + FixedText maCommentTxt; + + PushButton maSetupButton; + + FixedLine maCopies; + FixedLine maCopySpacer; + FixedText maCopyCount; + NumericField maCopyCountField; + CheckBox maCollateBox; + FixedImage maCollateImage; + + Image maCollateImg; + Image maCollateHCImg; + Image maNoCollateImg; + Image maNoCollateHCImg; + + long mnCollateUIMode; + + boost::shared_ptr mxPrintRange; + boost::shared_ptr mxDetails; + + JobTabPage( Window*, const ResId& ); + virtual ~JobTabPage(); + + void readFromSettings(); + void storeToSettings(); + + // virtual void Resize(); + + void setupLayout(); + }; + + class OutputOptPage : public TabPage + { + public: + FixedLine maOptionsLine; + CheckBox maToFileBox; + CheckBox maCollateSingleJobsBox; + CheckBox maReverseOrderBox; + + boost::shared_ptr mxOptGroup; + + OutputOptPage( Window*, const ResId& ); + virtual ~OutputOptPage(); + + void readFromSettings(); + void storeToSettings(); + + // virtual void Resize(); + + void setupLayout(); + }; + + OKButton maOKButton; + CancelButton maCancelButton; + HelpButton maHelpButton; + PrintPreviewWindow maPreviewWindow; + NumericField maPageEdit; + FixedText maNumPagesText; + PushButton maBackwardBtn; + PushButton maForwardBtn; + + TabControl maTabCtrl; + NUpTabPage maNUpPage; + JobTabPage maJobPage; + OutputOptPage maOptionsPage; + + FixedLine maButtonLine; + + boost::shared_ptr< PrinterController > maPController; + + rtl::OUString maPageStr; + rtl::OUString maNoPageStr; + sal_Int32 mnCurPage; + sal_Int32 mnCachedPages; + + std::list< Window* > maControls; + std::map< Window*, rtl::OUString > maControlToPropertyMap; + std::map< rtl::OUString, std::vector< Window* > > + maPropertyToWindowMap; + std::map< Window*, sal_Int32 > maControlToNumValMap; + std::set< rtl::OUString > maReverseDependencySet; + + Size maNupPortraitSize; + Size maNupLandscapeSize; + + // internal, used for automatic Nup-Portrait/landscape + Size maFirstPageSize; + + rtl::OUString maPrintToFileText; + rtl::OUString maPrintText; + rtl::OUString maDefPrtText; + + boost::shared_ptr mxPreviewCtrls; + + Size maDetailsCollapsedSize; + Size maDetailsExpandedSize; + + sal_Bool mbShowLayoutPage; + + Size getJobPageSize(); + void updateNup(); + void updateNupFromPages(); + void preparePreview( bool i_bPrintChanged = true, bool i_bMayUseCache = false ); + void setPreviewText( sal_Int32 ); + void updatePrinterText(); + void checkControlDependencies(); + void checkOptionalControlDependencies(); + void makeEnabled( Window* ); + void updateWindowFromProperty( const rtl::OUString& ); + void setupOptionalUI(); + void readFromSettings(); + void storeToSettings(); + com::sun::star::beans::PropertyValue* getValueForWindow( Window* ) const; + + virtual void Resize(); + virtual void Command( const CommandEvent& ); + virtual void DataChanged( const DataChangedEvent& ); + + DECL_LINK( SelectHdl, ListBox* ); + DECL_LINK( ClickHdl, Button* ); + DECL_LINK( ModifyHdl, Edit* ); + DECL_LINK( UIOptionsChanged, void* ); + + DECL_LINK( UIOption_CheckHdl, CheckBox* ); + DECL_LINK( UIOption_RadioHdl, RadioButton* ); + DECL_LINK( UIOption_SelectHdl, ListBox* ); + DECL_LINK( UIOption_ModifyHdl, Edit* ); + + void setupLayout(); + public: + PrintDialog( Window*, const boost::shared_ptr< PrinterController >& ); + virtual ~PrintDialog(); + + bool isPrintToFile(); + int getCopyCount(); + bool isCollate(); + bool isSingleJobs(); + + void previewForward(); + void previewBackward(); + }; + + class PrintProgressDialog : public ModelessDialog + { + String maStr; + FixedText maText; + CancelButton maButton; + + bool mbCanceled; + sal_Int32 mnCur; + sal_Int32 mnMax; + long mnProgressHeight; + Rectangle maProgressRect; + bool mbNativeProgress; + + DECL_LINK( ClickHdl, Button* ); + + void implCalcProgressRect(); + public: + PrintProgressDialog( Window* i_pParent, int i_nMax ); + ~PrintProgressDialog(); + + bool isCanceled() const { return mbCanceled; } + void setProgress( int i_nCurrent, int i_nMax = -1 ); + void tick(); + void reset(); + + virtual void Paint( const Rectangle& ); + }; +} + + +#endif // _SV_PRNDLG_HXX diff --git a/vcl/inc/printergfx.hxx b/vcl/inc/printergfx.hxx new file mode 100644 index 000000000000..0f7b07d109b0 --- /dev/null +++ b/vcl/inc/printergfx.hxx @@ -0,0 +1,442 @@ +/************************************************************************* + * + * 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 _PSPRINT_PRINTERGFX_HXX_ +#define _PSPRINT_PRINTERGFX_HXX_ + +#include "vcl/helper.hxx" +#include "sallayout.hxx" +#include "osl/file.hxx" +#include "tools/gen.hxx" + +#include +#include + +namespace psp { + +// forwards +class JobData; + +/* + * lightweight container to handle RGB values + */ + +class PrinterColor +{ +public: + + enum ColorSpace { eInvalid, eRGB }; + +private: + + sal_uInt8 mnRed; + sal_uInt8 mnGreen; + sal_uInt8 mnBlue; + ColorSpace meColorspace; + +public: + + PrinterColor () : + meColorspace(eInvalid) + {} + PrinterColor (sal_uInt16 nRed, sal_uInt16 nGreen, + sal_uInt16 nBlue) : + mnRed (nRed), + mnGreen (nGreen), + mnBlue (nBlue), + meColorspace (eRGB) + {} + PrinterColor (sal_uInt32 nRGB) : + mnRed ((nRGB & 0x00ff0000) >> 16), + mnGreen ((nRGB & 0x0000ff00) >> 8), + mnBlue ((nRGB & 0x000000ff) ), + meColorspace (eRGB) + {} + ~PrinterColor () + {} + + sal_Bool Is () const + { return meColorspace != eInvalid; } + + ColorSpace GetColorSpace () const + { return meColorspace; } + sal_uInt16 GetRed () const + { return mnRed; } + sal_uInt16 GetGreen () const + { return mnGreen; } + sal_uInt16 GetBlue () const + { return mnBlue; } + sal_Bool operator== (const PrinterColor& aColor) const + { + return aColor.Is() && this->Is() + && mnRed == aColor.mnRed + && mnGreen == aColor.mnGreen + && mnBlue == aColor.mnBlue; + } + sal_Bool operator!= (const PrinterColor& aColor) const + { return ! (aColor==*this); } + PrinterColor& operator= (const PrinterColor& aColor) + { + meColorspace = aColor.meColorspace; + mnRed = aColor.mnRed; + mnGreen = aColor.mnGreen; + mnBlue = aColor.mnBlue; + + return *this; + } + + PrinterColor& operator= (sal_uInt32 nRGB) + { + meColorspace = eRGB; + mnBlue = (nRGB & 0x000000ff); + mnGreen = (nRGB & 0x0000ff00) >> 8; + mnRed = (nRGB & 0x00ff0000) >> 16; + + return *this; + } +}; + +/* + * forward declarations + */ + +class Font3; +class GlyphSet; +class PrinterJob; +class PrintFontManager; +class KernPair; +struct CharacterMetric; + +/* + * Bitmap Interface, this has to be filled with your actual bitmap implementation + * sample implementations can be found in: + * psprint/workben/cui/pspdem.cxx + * vcl/unx/source/gdi/salgdi2.cxx + */ + +class PrinterBmp +{ +public: + + virtual ~PrinterBmp () = 0; + virtual sal_uInt32 GetPaletteColor (sal_uInt32 nIdx) const = 0; + virtual sal_uInt32 GetPaletteEntryCount () const = 0; + virtual sal_uInt32 GetPixelRGB (sal_uInt32 nRow, sal_uInt32 nColumn) const = 0; + virtual sal_uInt8 GetPixelGray (sal_uInt32 nRow, sal_uInt32 nColumn) const = 0; + virtual sal_uInt8 GetPixelIdx (sal_uInt32 nRow, sal_uInt32 nColumn) const = 0; + virtual sal_uInt32 GetWidth () const = 0; + virtual sal_uInt32 GetHeight () const = 0; + virtual sal_uInt32 GetDepth () const = 0; +}; + +typedef enum { + InvalidType = 0, + TrueColorImage, + MonochromeImage, + PaletteImage, + GrayScaleImage +} ImageType; + +/* + * printer raster operations + */ + +struct GraphicsStatus +{ + rtl::OString maFont; + rtl_TextEncoding maEncoding; + bool mbArtItalic; + bool mbArtBold; + sal_Int32 mnTextHeight; + sal_Int32 mnTextWidth; + PrinterColor maColor; + double mfLineWidth; + + GraphicsStatus(); +}; + +class Font3; + +class PrinterGfx +{ +private: + + /* common settings */ + + double mfScaleX; + double mfScaleY; + + sal_uInt32 mnDpi; + sal_uInt16 mnDepth; + + sal_uInt16 mnPSLevel; + sal_Bool mbColor; + sal_Bool mbUploadPS42Fonts; + + osl::File* mpPageHeader; + osl::File* mpPageBody; + + void TranslateCoordinates (sal_Int32 &rXOut, sal_Int32 &rYOut, + sal_Int32 nXIn, sal_Int32 nYIn ) + { rXOut = nXIn; rYOut = nYIn; } + void TranslateCoordinates (Point& rOut, const Point& rIn) + { rOut = rIn; } + + /* text/font related data, for a type1 font it has to be checked + whether this font has already been downloaded. A TrueType font + will be converted into one or more Type3 fonts, containing glyphs + in no particular order. In addition to the existence of the + glyph in one of the subfonts, the mapping from unicode to the + glyph has to be remembered */ + + std::list< sal_Int32 > maPS1Font; + std::list< GlyphSet > maPS3Font; + + sal_Int32 mnFontID; + sal_Int32 mnFallbackID; + sal_Int32 mnTextAngle; + bool mbTextVertical; + PrintFontManager& mrFontMgr; + + /* bitmap drawing implementation */ + + sal_Bool mbCompressBmp; + + void DrawPS1GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea); + void writePS2ImageHeader (const Rectangle& rArea, psp::ImageType nType); + void writePS2Colorspace (const PrinterBmp& rBitmap, psp::ImageType nType); + void DrawPS2GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea); + void DrawPS2PaletteImage (const PrinterBmp& rBitmap, const Rectangle& rArea); + void DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const Rectangle& rArea); + void DrawPS2MonoImage (const PrinterBmp& rBitmap, const Rectangle& rArea); + + /* clip region */ + + std::list< Rectangle > maClipRegion; + sal_Bool JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it, + Point& aOldPoint, sal_Int32& nColumn ); + + /* color settings */ + PrinterColor maFillColor; + PrinterColor maTextColor; + PrinterColor maLineColor; + + /* graphics state */ + GraphicsStatus maVirtualStatus; + std::list< GraphicsStatus > maGraphicsStack; + GraphicsStatus& currentState() { return maGraphicsStack.front(); } + + /* font / font substitution */ + friend class Font3; + const ::std::hash_map< fontID, fontID >* mpFontSubstitutes; + int getCharWidth (sal_Bool b_vert, sal_Unicode n_char, + CharacterMetric *p_bbox); + fontID getCharMetric (const Font3 &rFont, sal_Unicode n_char, + CharacterMetric *p_bbox); + fontID getFontSubstitute () const; + fontID getFallbackID () const { return mnFallbackID; } + + bool mbStrictSO52Compatibility; +public: + /* grahics status update */ + void PSSetColor (); + void PSSetLineWidth (); + void PSSetFont (); + + /* graphics status functions */ + void PSSetColor (const PrinterColor& rColor) + { maVirtualStatus.maColor = rColor; } + + void PSUploadPS1Font (sal_Int32 nFontID); + void PSSetFont (const rtl::OString& rName, + rtl_TextEncoding nEncoding = RTL_TEXTENCODING_DONTKNOW) + { maVirtualStatus.maFont = rName; maVirtualStatus.maEncoding = nEncoding; } + + /* graphics status stack */ + void PSGSave (); + void PSGRestore (); + + + /* PS helpers */ + enum pspath_t { moveto = 0, lineto = 1 }; + void PSBinLineTo (const Point& rCurrent, Point& rOld, + sal_Int32& nColumn); + void PSBinMoveTo (const Point& rCurrent, Point& rOld, + sal_Int32& nColumn); + void PSBinStartPath (); + void PSBinEndPath (); + void PSBinCurrentPath (sal_uInt32 nPoints, const Point* pPath); + void PSBinPath (const Point& rCurrent, Point& rOld, + pspath_t eType, sal_Int32& nColumn); + + void PSRotate (sal_Int32 nAngle); + void PSTranslate (const Point& rPoint); + void PSMoveTo (const Point& rPoint); + void PSRMoveTo (sal_Int32 nDx, sal_Int32 nDy = 0); + void PSScale (double fScaleX, double fScaleY); + void PSLineTo(const Point& rPoint ); + void PSPointOp (const Point& rPoint, const sal_Char* pOperator); + void PSHexString (const sal_uChar* pString, sal_Int16 nLen); + void PSDeltaArray (const sal_Int32 *pArray, sal_Int16 nEntries); + void PSShowText (const sal_uChar* pString, + sal_Int16 nGlyphs, sal_Int16 nBytes, + const sal_Int32* pDeltaArray = NULL); + void PSComment (const sal_Char* pComment ); + void LicenseWarning (const Point& rPoint, const sal_Unicode* pStr, + sal_Int16 nLen, const sal_Int32* pDeltaArray); + + void OnEndPage (); + void OnEndJob (); + void writeResources( osl::File* pFile, std::list< rtl::OString >& rSuppliedFonts, std::list< rtl::OString >& rNeededFonts ); + PrintFontManager& GetFontMgr () { return mrFontMgr; } + + void drawVerticalizedText (const Point& rPoint, + const sal_Unicode* pStr, + sal_Int16 nLen, + const sal_Int32* pDeltaArray ); + void drawText (const Point& rPoint, + const sal_Unicode* pStr, sal_Int16 nLen, + const sal_Int32* pDeltaArray = NULL); + + void drawGlyphs( const Point& rPoint, + sal_GlyphId* pGlyphIds, + sal_Unicode* pUnicodes, + sal_Int16 nLen, + sal_Int32* pDeltaArray ); +public: + PrinterGfx(); + ~PrinterGfx(); + sal_Bool Init (PrinterJob &rPrinterSpec); + sal_Bool Init (const JobData& rData); + void Clear(); + + // query depth and size + void GetResolution (sal_Int32 &rDpiX, sal_Int32 &rDpiY) const; + sal_uInt16 GetBitCount (); + + // clip region + void ResetClipRegion (); + void BeginSetClipRegion (sal_uInt32); + sal_Bool UnionClipRegion (sal_Int32 nX, sal_Int32 nY, + sal_Int32 nDX, sal_Int32 nDY); + void EndSetClipRegion (); + + // set xy color + void SetLineColor (const PrinterColor& rLineColor = PrinterColor()) + { maLineColor = rLineColor; } + void SetFillColor (const PrinterColor& rFillColor = PrinterColor()) + { maFillColor = rFillColor; } + + // drawing primitives + void DrawPixel (const Point& rPoint, const PrinterColor& rPixelColor); + void DrawPixel (const Point& rPoint) + { DrawPixel (rPoint, maLineColor); } + void DrawLine (const Point& rFrom, const Point& rTo); + void DrawRect (const Rectangle& rRectangle); + void DrawPolyLine (sal_uInt32 nPoints, const Point* pPath ); + void DrawPolygon (sal_uInt32 nPoints, const Point* pPath); + void DrawPolyPolygon (sal_uInt32 nPoly, + const sal_uInt32 *pPolygonSize, + const Point** pPolygonList); + void DrawPolyLineBezier (sal_uInt32 nPoints, + const Point* pPath, + const BYTE* pFlgAry ); + void DrawPolygonBezier (sal_uInt32 nPoints, + const Point* pPath, + const BYTE* pFlgAry); + void DrawPolyPolygonBezier (sal_uInt32 nPoly, + const sal_uInt32* pPoints, + const Point* const* pPtAry, + const BYTE* const* pFlgAry); + + // eps + sal_Bool DrawEPS ( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize); + + // image drawing + void DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc, + const PrinterBmp& rBitmap); + void DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc, + const PrinterBmp& rBitmap, + const PrinterBmp& rTransBitmap); + void DrawMask (const Rectangle& rDest, const Rectangle& rSrc, + const PrinterBmp &rBitmap, PrinterColor& rMaskColor); + + // font and text handling + sal_uInt16 SetFont ( + sal_Int32 nFontID, + sal_Int32 nPointHeight, + sal_Int32 nPointWidth, + sal_Int32 nAngle, + bool bVertical, + bool bArtItalic, + bool bArtBold + ); + sal_uInt16 SetFallbackFont ( sal_Int32 nFontID ); + sal_Int32 GetFontAngle () const + { return mnTextAngle; } + sal_Int32 GetFontID () const + { return mnFontID; } + bool GetFontVertical() const + { return mbTextVertical; } + sal_Int32 GetFontHeight () const + { return maVirtualStatus.mnTextHeight; } + sal_Int32 GetFontWidth () const + { return maVirtualStatus.mnTextWidth; } + bool GetArtificialItalic() const + { return maVirtualStatus.mbArtItalic; } + bool GetArtificialBold() const + { return maVirtualStatus.mbArtBold; } + void DrawText (const Point& rPoint, + const sal_Unicode* pStr, sal_Int16 nLen, + const sal_Int32* pDeltaArray = NULL); + void SetTextColor (PrinterColor& rTextColor) + { maTextColor = rTextColor; } + sal_Int32 GetCharWidth (sal_uInt16 nFrom, sal_uInt16 nTo, + long *pWidthArray); + const ::std::list< KernPair >& getKernPairs( bool bVertical = false ) const; + // advanced font handling + sal_Bool GetGlyphBoundRect (sal_Unicode c, Rectangle& rOutRect); + sal_uInt32 GetGlyphOutline (sal_Unicode c, + sal_uInt16 **ppPolySizes, Point **ppPoints, + sal_uInt8 **ppFlags); + + // for CTL + void DrawGlyphs( const Point& rPoint, + sal_GlyphId* pGlyphIds, + sal_Unicode* pUnicodes, + sal_Int16 nLen, + sal_Int32* pDeltaArray ); + + bool getStrictSO52Compatibility() const; + void setStrictSO52Compatibility( bool ); +}; + +} /* namespace psp */ + + +#endif /* _PSPRINT_PRINTERGFX_HXX_ */ + diff --git a/vcl/inc/printerjob.hxx b/vcl/inc/printerjob.hxx new file mode 100644 index 000000000000..cdf8745febcc --- /dev/null +++ b/vcl/inc/printerjob.hxx @@ -0,0 +1,149 @@ +/************************************************************************* + * + * 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 _PSPRINT_PRINTERJOB_HXX_ +#define _PSPRINT_PRINTERJOB_HXX_ + +#include "vcl/jobdata.hxx" +#include "osl/file.hxx" +#include "rtl/string.hxx" + +#include + +namespace psp { + +// forward declarations +class PrinterGfx; + + +class PrinterJob +{ +private: // private data + + rtl::OUString maSpoolDirName; + rtl::OUString maFileName; // empty: spool to command, else spool to named file + rtl::OUString maJobTitle; + int mnFileMode; + + osl::File* mpJobHeader; + osl::File* mpJobTrailer; + + std::list< osl::File* > maPageList; + std::list< osl::File* > maHeaderList; + + JobData m_aDocumentJobData; + JobData m_aLastJobData; + PrinterGfx* m_pGraphics; + + sal_uInt32 mnResolution; + + sal_uInt32 mnWidthPt; + sal_uInt32 mnHeightPt; + sal_uInt32 mnMaxWidthPt; + sal_uInt32 mnMaxHeightPt; + + int mnLandscapes; + int mnPortraits; + + sal_uInt32 mnLMarginPt; + sal_uInt32 mnRMarginPt; + sal_uInt32 mnTMarginPt; + sal_uInt32 mnBMarginPt; + + double mfXScale; + double mfYScale; + + sal_Int32 mnErrorCode; + bool m_bQuickJob; + +private: // private methods + + osl::File* CreateSpoolFile (const rtl::OUString& rName, + const rtl::OUString& rExtension); + void InitPaperSize (const JobData& rJobSetup); + + bool writeFeatureList( osl::File* pFile, const JobData&, bool bDocumentSetup ); + bool writeSetup( osl::File* pFile, const JobData& ); + bool writePageSetup( osl::File* pFile, const JobData&, bool bWriteFeatures = true ); + void writeJobPatch( osl::File* File, const JobData& ); + bool writeProlog (osl::File* pFile, const JobData& ); + +public: // for usage in PrinterGfx + + sal_uInt32 GetResolution () const { return mnResolution; } + void GetScale (double &rXScale, double &rYScale) const; + sal_uInt16 GetDepth () const; + sal_uInt16 GetPostscriptLevel (const JobData *pJobData = NULL) const; + sal_Bool IsColorPrinter () const; + + osl::File* GetDocumentHeader (); + osl::File* GetDocumentTrailer (); + osl::File* GetCurrentPageHeader (); + osl::File* GetCurrentPageBody (); + + const ::rtl::OUString& GetPrinterName() const { return m_aLastJobData.m_aPrinterName; } + +public: + PrinterJob (); + ~PrinterJob (); + + /* rFileName: if length is greater than 0 save resulting PostScript + * to named file. + * nMode: only meaningful when saving to file: if nonzero, try + * to impose the mode on the resulting file's inode; for nonexistant + * files use open, for existant files try a chmod + * rJobName: text to appear in the %%Title comment + * rAppName: text to appear in the %%Creator comment + * rSetupData: JobData that apply to this job + * pGraphics: the graphics used to print this job; + * this graphics must live until End/AbortJob has returned + * bIsQuickJob: the job was started as "direct print" meaning + * the quick command for spooling should be used instead + * of the normal command + */ + sal_Bool StartJob (const rtl::OUString& rFileName, + int nMode, + const rtl::OUString& rJobName, + const rtl::OUString& rAppName, + const JobData& rSetupData, + PrinterGfx* pGraphics, + bool bIsQuickJob + ); + sal_Bool EndJob (); + + sal_Bool AbortJob (); + + sal_Bool StartPage (const JobData& rJobSetup); + sal_Bool EndPage (); + + sal_uInt32 GetErrorCode (); +}; + +} /* namespace psp */ + +#endif /* _PSPRINT_PRINTERJOB_HXX_ */ + diff --git a/vcl/inc/region.h b/vcl/inc/region.h new file mode 100644 index 000000000000..b10f0eaf0f0f --- /dev/null +++ b/vcl/inc/region.h @@ -0,0 +1,134 @@ +/************************************************************************* + * + * 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 _SV_REGION_H +#define _SV_REGION_H + +#include +#include +#include + +// ----------------- +// - Hilfsmethoden - +// ----------------- + +#ifdef DBG_UTIL +const char* ImplDbgTestRegion( const void* pObj ); +#endif + +// -------------------- +// - ImplRegionHandle - +// -------------------- + +struct ImplRegionHandle +{ + Region* mpRegion; + ImplRegionBand* mpCurrRectBand; + ImplRegionBandSep* mpCurrRectBandSep; + BOOL mbFirst; +}; + +// ------------------ +// - ImplRegionInfo - +// ------------------ + +struct ImplRegionInfo +{ + void* mpVoidCurrRectBand; + void* mpVoidCurrRectBandSep; +}; + +// -------------- +// - ImplRegion - +// -------------- + +struct ImplRegionBase +{ +public: + ImplRegionBase( int nCount = 1 ); // TODO: replace manual refcounting + virtual ~ImplRegionBase(); +public: + ULONG mnRefCount; + ULONG mnRectCount; + PolyPolygon* mpPolyPoly; + basegfx::B2DPolyPolygon* mpB2DPolyPoly; +}; + +class ImplRegion : public ImplRegionBase +{ + friend class Region; + +private: + ImplRegionBand* mpFirstBand; // root of the list with y-bands + ImplRegionBand* mpLastCheckedBand; + +public: + ImplRegion(); + ImplRegion( const PolyPolygon& rPolyPoly ); + ImplRegion( const basegfx::B2DPolyPolygon& ); + ImplRegion( const ImplRegion& rImplRegion ); + ~ImplRegion(); + + ImplRegionBand* ImplGetFirstRegionBand() const { return mpFirstBand; } + PolyPolygon* ImplGetPolyPoly() const { return mpPolyPoly; } + + void CreateBandRange( long nYTop, long nYBottom ); + void InsertBands( long nYTop, long nYBottom ); + BOOL InsertSingleBand( ImplRegionBand* mpImplRegionBand, + long nYBandPosition ); + BOOL InsertLine( const Point & rFirstPoint, + const Point & rSecondPoint, + long nLineID ); + BOOL InsertPoint( const Point &rPoint, + long nLineID, + BOOL bEndPoint, LineType eLineType ); + + /** Insert one band either after another band or as the first or only + band. Both the forward as well as the backward links are updated. + @param pPreviousBand + When then pBandToInsert is inserted as first band or as + only band when there are no other bands. + When not then pBandToInsert is inserted directly after + pPreviousBand. + @param pBandToInsert + The band to insert. + */ + void InsertBand (ImplRegionBand* pPreviousBand, + ImplRegionBand* pBandToInsert); + + void Union( long nLeft, long nTop, long nRight, long nBottom ); + void Exclude( long nLeft, long nTop, long nRight, long nBottom ); + void XOr( long nLeft, long nTop, long nRight, long nBottom ); + + // remove emtpy rects + BOOL OptimizeBandList(); + + friend SvStream& operator>>( SvStream& rIStm, Region& rRegion ); + friend SvStream& operator<<( SvStream& rOStm, const Region& rRegion ); +}; + +#endif // _SV_REGION_H diff --git a/vcl/inc/salbmp.hxx b/vcl/inc/salbmp.hxx new file mode 100644 index 000000000000..4aca4a9277e9 --- /dev/null +++ b/vcl/inc/salbmp.hxx @@ -0,0 +1,65 @@ +/************************************************************************* + * + * 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 _SV_SALBMP_HXX +#define _SV_SALBMP_HXX + +#ifndef _TL_GEN_HXX +#include +#endif +#include + +struct BitmapBuffer; +class SalGraphics; +class BitmapPalette; +struct BitmapSystemData; + +class VCL_DLLPUBLIC SalBitmap +{ +public: + SalBitmap() {} + virtual ~SalBitmap(); + + virtual bool Create( const Size& rSize, + USHORT nBitCount, + const BitmapPalette& rPal ) = 0; + virtual bool Create( const SalBitmap& rSalBmp ) = 0; + virtual bool Create( const SalBitmap& rSalBmp, + SalGraphics* pGraphics ) = 0; + virtual bool Create( const SalBitmap& rSalBmp, + USHORT nNewBitCount ) = 0; + virtual void Destroy() = 0; + virtual Size GetSize() const = 0; + virtual USHORT GetBitCount() const = 0; + + virtual BitmapBuffer* AcquireBuffer( bool bReadOnly ) = 0; + virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ) = 0; + virtual bool GetSystemData( BitmapSystemData& rData ) = 0; + +}; + +#endif diff --git a/vcl/inc/saldatabasic.hxx b/vcl/inc/saldatabasic.hxx new file mode 100644 index 000000000000..b9438e97c06e --- /dev/null +++ b/vcl/inc/saldatabasic.hxx @@ -0,0 +1,59 @@ +/************************************************************************* + * + * 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 _SV_SALDATABASIC_HXX +#define _SV_SALDATABASIC_HXX + +#include +#include +#include + +namespace psp +{ + class PrinterInfoManager; +} + +class VCL_DLLPUBLIC SalData +{ +public: + SalInstance* m_pInstance; // pointer to instance + oslModule m_pPlugin; // plugin library handle + psp::PrinterInfoManager* m_pPIManager; + + SalData(); + virtual ~SalData(); + +}; + +// -=-= inlines =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +inline void SetSalData( SalData* pData ) +{ ImplGetSVData()->mpSalData = (void*)pData; } + +inline SalData* GetSalData() +{ return (SalData*)ImplGetSVData()->mpSalData; } + +#endif diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx new file mode 100644 index 000000000000..838fd108ea6c --- /dev/null +++ b/vcl/inc/salframe.hxx @@ -0,0 +1,292 @@ +/************************************************************************* + * + * 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 _SV_SALFRAME_HXX +#define _SV_SALFRAME_HXX + +#include +#include + +#ifdef __cplusplus + +#ifndef _SV_PTRSTYLE_HXX +#include +#endif +#include + +#endif // __cplusplus +#include +#include +#include +#include + +#ifndef _VCL_IMPDEL_HXX +#include +#endif +#include +#include + +class AllSettings; +class SalGraphics; +class SalBitmap; +class SalMenu; +class Window; + + +struct SalFrameState; +struct SalInputContext; +struct SystemEnvData; + +// ----------------- +// - SalFrameTypes - +// ----------------- + +#define SAL_FRAME_TOTOP_RESTOREWHENMIN ((USHORT)0x0001) +#define SAL_FRAME_TOTOP_FOREGROUNDTASK ((USHORT)0x0002) +#define SAL_FRAME_TOTOP_GRABFOCUS ((USHORT)0x0004) +#define SAL_FRAME_TOTOP_GRABFOCUS_ONLY ((USHORT)0x0008) + +#define SAL_FRAME_ENDEXTTEXTINPUT_COMPLETE ((USHORT)0x0001) +#define SAL_FRAME_ENDEXTTEXTINPUT_CANCEL ((USHORT)0x0002) + + +// ----------------- +// - SalFrameStyle - +// ----------------- + +#define SAL_FRAME_STYLE_DEFAULT ((ULONG)0x00000001) +#define SAL_FRAME_STYLE_MOVEABLE ((ULONG)0x00000002) +#define SAL_FRAME_STYLE_SIZEABLE ((ULONG)0x00000004) +#define SAL_FRAME_STYLE_CLOSEABLE ((ULONG)0x00000008) + +// no shadow effect on WindowsXP +#define SAL_FRAME_STYLE_NOSHADOW ((ULONG)0x00000010) +// indicate tooltip windows, so they can always be topmost +#define SAL_FRAME_STYLE_TOOLTIP ((ULONG)0x00000020) +// windows without windowmanager decoration, this typically only applies to floating windows +#define SAL_FRAME_STYLE_OWNERDRAWDECORATION ((ULONG)0x00000040) +// dialogs +#define SAL_FRAME_STYLE_DIALOG ((ULONG)0x00000080) +// partial fullscreen: fullscreen on one monitor of a multimonitor display +#define SAL_FRAME_STYLE_PARTIAL_FULLSCREEN ((ULONG)0x00800000) +// plugged system child window +#define SAL_FRAME_STYLE_PLUG ((ULONG)0x10000000) +// system child window inside another SalFrame +#define SAL_FRAME_STYLE_SYSTEMCHILD ((ULONG)0x08000000) +// floating window +#define SAL_FRAME_STYLE_FLOAT ((ULONG)0x20000000) +// floating window that needs to be focusable +#define SAL_FRAME_STYLE_FLOAT_FOCUSABLE ((ULONG)0x04000000) +// toolwindows should be painted with a smaller decoration +#define SAL_FRAME_STYLE_TOOLWINDOW ((ULONG)0x40000000) +// the window containing the intro bitmap, aka splashscreen +#define SAL_FRAME_STYLE_INTRO ((ULONG)0x80000000) + +/* +#define SAL_FRAME_STYLE_MINABLE ((ULONG)0x00000008) +#define SAL_FRAME_STYLE_MAXABLE ((ULONG)0x00000010) +#define SAL_FRAME_STYLE_BORDER ((ULONG)0x00000040) +#define SAL_FRAME_STYLE_DOC ((ULONG)0x00004000) +#define SAL_FRAME_STYLE_DIALOG ((ULONG)0x00008000) +#define SAL_FRAME_STYLE_TOOL ((ULONG)0x00010000) +#define SAL_FRAME_STYLE_FULLSIZE ((ULONG)0x00020000) +*/ + +// ---------------------------------------- +// - extended frame style - +// - (sal equivalent to extended WinBits) - +// ---------------------------------------- +typedef sal_uInt64 SalExtStyle; +#define SAL_FRAME_EXT_STYLE_DOCUMENT SalExtStyle(0x00000001) +#define SAL_FRAME_EXT_STYLE_DOCMODIFIED SalExtStyle(0x00000002) + +// ------------------------ +// - Flags for SetPosSize - +// ------------------------ + +#define SAL_FRAME_POSSIZE_X ((USHORT)0x0001) +#define SAL_FRAME_POSSIZE_Y ((USHORT)0x0002) +#define SAL_FRAME_POSSIZE_WIDTH ((USHORT)0x0004) +#define SAL_FRAME_POSSIZE_HEIGHT ((USHORT)0x0008) + +#ifdef __cplusplus + +using namespace rtl; + +// ------------ +// - SalFrame - +// ------------ + +struct SystemParentData; + +class VCL_DLLPUBLIC SalFrame : public vcl::DeletionNotifier +{ + // the VCL window corresponding to this frame + Window* m_pWindow; + SALFRAMEPROC m_pProc; +public: // public for Sal Implementation + SalFrame() : m_pWindow( NULL ), m_pProc( NULL ) {} + virtual ~SalFrame(); + +public: // public for Sal Implementation + SalFrameGeometry maGeometry; + +public: + // SalGraphics or NULL, but two Graphics for all SalFrames + // must be returned + virtual SalGraphics* GetGraphics() = 0; + virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0; + + // Event must be destroyed, when Frame is destroyed + // When Event is called, SalInstance::Yield() must be returned + virtual BOOL PostEvent( void* pData ) = 0; + + virtual void SetTitle( const XubString& rTitle ) = 0; + virtual void SetIcon( USHORT nIcon ) = 0; + virtual void SetRepresentedURL( const rtl::OUString& ); + virtual void SetMenu( SalMenu *pSalMenu ) = 0; + virtual void DrawMenuBar() = 0; + + virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ) = 0; + + // Before the window is visible, a resize event + // must be sent with the correct size + virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE ) = 0; + virtual void Enable( BOOL bEnable ) = 0; + // Set ClientSize and Center the Window to the desktop + // and send/post a resize message + virtual void SetMinClientSize( long nWidth, long nHeight ) = 0; + virtual void SetMaxClientSize( long nWidth, long nHeight ) = 0; + virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ) = 0; + virtual void GetClientSize( long& rWidth, long& rHeight ) = 0; + virtual void GetWorkArea( Rectangle& rRect ) = 0; + virtual SalFrame* GetParent() const = 0; + // Note: x will be mirrored at parent if UI mirroring is active + SalFrameGeometry GetGeometry(); + const SalFrameGeometry& GetUnmirroredGeometry() const { return maGeometry; } + virtual void SetWindowState( const SalFrameState* pState ) = 0; + virtual BOOL GetWindowState( SalFrameState* pState ) = 0; + virtual void ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay ) = 0; + // Enable/Disable ScreenSaver, SystemAgents, ... + virtual void StartPresentation( BOOL bStart ) = 0; + // Show Window over all other Windows + virtual void SetAlwaysOnTop( BOOL bOnTop ) = 0; + + // Window to top and grab focus + virtual void ToTop( USHORT nFlags ) = 0; + + // this function can call with the same + // pointer style + virtual void SetPointer( PointerStyle ePointerStyle ) = 0; + virtual void CaptureMouse( BOOL bMouse ) = 0; + virtual void SetPointerPos( long nX, long nY ) = 0; + + // flush output buffer + virtual void Flush( void) = 0; + virtual void Flush( const Rectangle& ); + // flush output buffer, wait till outstanding operations are done + virtual void Sync() = 0; + + virtual void SetInputContext( SalInputContext* pContext ) = 0; + virtual void EndExtTextInput( USHORT nFlags ) = 0; + + virtual String GetKeyName( USHORT nKeyCode ) = 0; + virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode ) = 0; + + // returns in 'rKeyCode' the single keycode that translates to the given unicode when using a keyboard layout of language 'aLangType' + // returns FALSE if no mapping exists or function not supported + // this is required for advanced menu support + virtual BOOL MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ) = 0; + + // returns the input language used for the last key stroke + // may be LANGUAGE_DONTKNOW if not supported by the OS + virtual LanguageType GetInputLanguage() = 0; + + virtual SalBitmap* SnapShot() = 0; + + virtual void UpdateSettings( AllSettings& rSettings ) = 0; + + virtual void Beep( SoundType eSoundType ) = 0; + + // returns system data (most prominent: window handle) + virtual const SystemEnvData* GetSystemData() const = 0; + + // sets a background bitmap on the frame; the implementation + // must not make assumptions about the lifetime of the passed SalBitmap + // but should copy its contents to an own buffer + virtual void SetBackgroundBitmap( SalBitmap* ) = 0; + + + // get current modifier, button mask and mouse position + struct SalPointerState + { + ULONG mnState; + Point maPos; // in frame coordinates + }; + + virtual SalPointerState GetPointerState() = 0; + + // set new parent window + virtual void SetParent( SalFrame* pNewParent ) = 0; + // reparent window to act as a plugin; implementation + // may choose to use a new system window inetrnally + // return false to indicate failure + virtual bool SetPluginParent( SystemParentData* pNewParent ) = 0; + + // move the frame to a new screen + virtual void SetScreenNumber( unsigned int nScreen ) = 0; + + // shaped system windows + // set clip region to none (-> rectangular windows, normal state) + virtual void ResetClipRegion() = 0; + // start setting the clipregion consisting of nRects rectangles + virtual void BeginSetClipRegion( ULONG nRects ) = 0; + // add a rectangle to the clip region + virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0; + // done setting up the clipregion + virtual void EndSetClipRegion() = 0; + + // Callbacks (indepent part in vcl/source/window/winproc.cxx) + // for default message handling return 0 + void SetCallback( Window* pWindow, SALFRAMEPROC pProc ) + { m_pWindow = pWindow; m_pProc = pProc; } + + // returns the instance set + Window* GetWindow() const { return m_pWindow; } + + // Call the callback set; this sometimes necessary for implementation classes + // that should not now more than necessary about the SalFrame implementation + // (e.g. input methods, printer update handlers). + long CallCallback( USHORT nEvent, const void* pEvent ) const + { return m_pProc ? m_pProc( m_pWindow, const_cast(this), nEvent, pEvent ) : 0; } +}; + + + +#endif // __cplusplus + +#endif // _SV_SALFRAME_HXX diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx new file mode 100644 index 000000000000..b4769c045708 --- /dev/null +++ b/vcl/inc/salgdi.hxx @@ -0,0 +1,493 @@ +/************************************************************************* + * + * 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 _SV_SALGDI_HXX +#define _SV_SALGDI_HXX + +#include "tools/string.hxx" +#include "rtl/ustring.hxx" +#include "vcl/sv.h" +#include "vcl/dllapi.h" +#include "vcl/salgtype.hxx" +#include "vos/thread.hxx" +#include "vcl/outdev.hxx" +#include "vcl/salnativewidgets.hxx" + +#include + +class ImplDevFontList; +class SalBitmap; +class ImplFontSelectData; +class ImplFontMetricData; +struct ImplKernPairData; +class ImplFontData; +class ImplFontCharMap; +class SalLayout; +class ImplLayoutArgs; +class Rectangle; +class FontSubsetInfo; +class OutputDevice; +class ServerFontLayout; +struct SystemGraphicsData; +struct SystemFontData; + +namespace basegfx { + class B2DVector; + class B2DPolygon; + class B2DPolyPolygon; +} + +// --------------------- +// - SalGraphics-Codes - +// --------------------- + +#define SAL_SETFONT_REMOVEANDMATCHNEW ((USHORT)0x0001) +#define SAL_SETFONT_USEDRAWTEXT ((USHORT)0x0002) +#define SAL_SETFONT_USEDRAWTEXTARRAY ((USHORT)0x0004) +#define SAL_SETFONT_UNICODE ((USHORT)0x0008) +#define SAL_SETFONT_BADFONT ((USHORT)0x1000) + +#define SAL_COPYAREA_WINDOWINVALIDATE ((USHORT)0x0001) + +// ------------------- +// - common typedefs - +// ------------------- + +typedef sal_Unicode sal_Ucs; // TODO: use sal_UCS4 instead of sal_Unicode +typedef std::map< sal_Ucs, sal_Int32 > Ucs2SIntMap; +typedef std::map< sal_Ucs, sal_uInt32 > Ucs2UIntMap; +typedef std::map< sal_Ucs, rtl::OString > Ucs2OStrMap; +typedef std::vector< sal_Int32 > Int32Vector; + +// --------------- +// - SalGraphics - +// --------------- + +// note: if you add any new methods to class SalGraphics using coordinates +// make sure they have a corresponding protected pure virtual method +// which has to be implemented by the platform dependent part. +// Add a method that performs coordinate mirroring if required, (see +// existing methods as sample) and then calls the equivalent pure method. + +// note: all positions are in pixel and relative to +// the top/left-position of the virtual output area + +class VCL_DLLPUBLIC SalGraphics +{ + int m_nLayout; // 0: mirroring off, 1: mirror x-axis + +protected: + // flags which hold the SetAntialiasing() value from OutputDevice + bool m_bAntiAliasB2DDraw; + +public: + // get/set AA + void setAntiAliasB2DDraw(bool bNew) { m_bAntiAliasB2DDraw = bNew; } + bool getAntiAliasB2DDraw() const { return m_bAntiAliasB2DDraw; } + + SalGraphics(); + virtual ~SalGraphics(); + +protected: + virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0; + virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ) = 0; + // draw --> LineColor and FillColor and RasterOp and ClipRegion + virtual void drawPixel( long nX, long nY ) = 0; + virtual void drawPixel( long nX, long nY, SalColor nSalColor ) = 0; + virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ) = 0; + virtual void drawRect( long nX, long nY, long nWidth, long nHeight ) = 0; + virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry ) = 0; + virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry ) = 0; + virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry ) = 0; + virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency ) = 0; + virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin ) = 0; + virtual sal_Bool drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) = 0; + virtual sal_Bool drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) = 0; + virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry ) = 0; + + // CopyArea --> No RasterOp, but ClipRegion + virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, + long nSrcHeight, USHORT nFlags ) = 0; + + // CopyBits and DrawBitmap --> RasterOp and ClipRegion + // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics + virtual void copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics ) = 0; + virtual void drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap ) = 0; + virtual void drawBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + SalColor nTransparentColor ) = 0; + virtual void drawBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + const SalBitmap& rMaskBitmap ) = 0; + virtual void drawMask( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + SalColor nMaskColor ) = 0; + + virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight ) = 0; + virtual SalColor getPixel( long nX, long nY ) = 0; + + // invert --> ClipRegion (only Windows or VirDevs) + virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags) = 0; + virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags ) = 0; + + virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ) = 0; + + // native widget rendering methods that require mirroring + virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + const Point& aPos, BOOL& rIsInside ); + virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + ControlState nState, const ImplControlValue& aValue, + const rtl::OUString& aCaption ); + virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + ControlState nState, const ImplControlValue& aValue, + const rtl::OUString& aCaption ); + virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, + const ImplControlValue& aValue, const rtl::OUString& aCaption, + Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ); + + /** Render bitmap with alpha channel + + @param rSourceBitmap + Source bitmap to blit + + @param rAlphaBitmap + Alpha channel to use for blitting + + @return true, if the operation succeeded, and false + otherwise. In this case, clients should try to emulate alpha + compositing themselves + */ + virtual bool drawAlphaBitmap( const SalTwoRect&, + const SalBitmap& rSourceBitmap, + const SalBitmap& rAlphaBitmap ) = 0; + /** Render solid rectangle with given transparency + + @param nTransparency + Transparency value (0-255) to use. 0 blits and opaque, 255 a + fully transparent rectangle + */ + virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency ) = 0; + +public: + // public SalGraphics methods, the interface to the independent vcl part + + // get device resolution + virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) = 0; + // get the depth of the device + virtual USHORT GetBitCount() = 0; + // get the width of the device + virtual long GetGraphicsWidth() const = 0; + + // set the clip region to empty + virtual void ResetClipRegion() = 0; + // begin setting the clip region, add rectangles to the + // region with the UnionClipRegion call + virtual void BeginSetClipRegion( ULONG nCount ) = 0; + // all rectangles were added and the clip region should be set now + virtual void EndSetClipRegion() = 0; + + // set the line color to transparent (= don't draw lines) + virtual void SetLineColor() = 0; + // set the line color to a specific color + virtual void SetLineColor( SalColor nSalColor ) = 0; + // set the fill color to transparent (= don't fill) + virtual void SetFillColor() = 0; + // set the fill color to a specific color, shapes will be + // filled accordingly + virtual void SetFillColor( SalColor nSalColor ) = 0; + // enable/disable XOR drawing + virtual void SetXORMode( bool bSet, bool bInvertOnly ) = 0; + // set line color for raster operations + virtual void SetROPLineColor( SalROPColor nROPColor ) = 0; + // set fill color for raster operations + virtual void SetROPFillColor( SalROPColor nROPColor ) = 0; + // set the text color to a specific color + virtual void SetTextColor( SalColor nSalColor ) = 0; + // set the font + virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel ) = 0; + // release the fonts + void ReleaseFonts() { SetFont( NULL, 0 ); } + // get the current font's metrics + virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel = 0 ) = 0; + + // get kernign pairs of the current font + // return only PairCount if (pKernPairs == NULL) + virtual ULONG GetKernPairs( ULONG nMaxPairCount, ImplKernPairData* ) = 0; + // get the repertoire of the current font + virtual const ImplFontCharMap* GetImplFontCharMap() const = 0; + // graphics must fill supplied font list + virtual void GetDevFontList( ImplDevFontList* ) = 0; + // graphics should call ImplAddDevFontSubstitute on supplied + // OutputDevice for all its device specific preferred font substitutions + virtual void GetDevFontSubstList( OutputDevice* ) = 0; + virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ) = 0; + // CreateFontSubset: a method to get a subset of glyhps of a font + // inside a new valid font file + // returns TRUE if creation of subset was successfull + // parameters: rToFile: contains a osl file URL to write the subset to + // pFont: describes from which font to create a subset + // pGlyphIDs: the glyph ids to be extracted + // pEncoding: the character code corresponding to each glyph + // pWidths: the advance widths of the correspoding glyphs (in PS font units) + // nGlyphs: the number of glyphs + // rInfo: additional outgoing information + // implementation note: encoding 0 with glyph id 0 should be added implicitly + // as "undefined character" + virtual BOOL CreateFontSubset( const rtl::OUString& rToFile, + const ImplFontData* pFont, + sal_Int32* pGlyphIDs, + sal_uInt8* pEncoding, + sal_Int32* pWidths, + int nGlyphs, + FontSubsetInfo& rInfo // out parameter + ) = 0; + + // GetFontEncodingVector: a method to get the encoding map Unicode + // to font encoded character; this is only used for type1 fonts and + // may return NULL in case of unknown encoding vector + // if ppNonEncoded is set and non encoded characters (that is type1 + // glyphs with only a name) exist it is set to the corresponding + // map for non encoded glyphs; the encoding vector contains -1 + // as encoding for these cases + virtual const Ucs2SIntMap* GetFontEncodingVector( const ImplFontData*, const Ucs2OStrMap** ppNonEncoded ) = 0; + + // GetEmbedFontData: gets the font data for a font marked + // embeddable by GetDevFontList or NULL in case of error + // parameters: pFont: describes the font in question + // pUnicodes: contains the Unicodes assigned to + // code points 0 to 255; must contain at least 256 members + // pWidths: the widths of all glyphs from char code 0 to 255 + // pWidths MUST support at least 256 members; + // rInfo: additional outgoing information + // pDataLen: out parameter, contains the byte length of the returned buffer + virtual const void* GetEmbedFontData( const ImplFontData* pFont, + const sal_Ucs* pUnicodes, + sal_Int32* pWidths, + FontSubsetInfo& rInfo, + long* pDataLen ) = 0; + // frees the font data again + virtual void FreeEmbedFontData( const void* pData, long nDataLen ) = 0; + + // get the same widths as in CreateFontSubset and GetEmbedFontData + // in case of an embeddable font also fill the mapping + // between unicode and glyph id + // leave widths vector and mapping untouched in case of failure + virtual void GetGlyphWidths( const ImplFontData* pFont, + bool bVertical, + Int32Vector& rWidths, + Ucs2UIntMap& rUnicodeEnc ) = 0; + + virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& ) = 0; + virtual BOOL GetGlyphOutline( long nIndex, basegfx::B2DPolyPolygon& ) = 0; + + virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) = 0; + virtual void DrawServerFontLayout( const ServerFontLayout& ) = 0; + /** Filter text from DrawText commands in a device specific manner +

+ This function allows a device (or rather the corresponding SalGraphics + implementation) to prevent text portions from being drawn. This currently + is used only for filtering out the fax number in a document that is printed + to one of psprint's specialized "fax" printers. +

+ + @param rOrigText + The original text + + @param rNewText + A String that will be filled with the adjusted version + + @param nIndex + The index inside rOrigText that marks the first draw character + + @param rLen + in: length of text beginning at nIndex to be drawn + out: length of rNewText containing the substituted text + + @param rCutStart + out: index at which the cutout portion of rOrigText begins + + @param rCutStop + out: index at which the cutout portion of rOrigText ends + + @returns + true: a substitution has taken place and rNewText rLen, rCutStart and rCutStop have been filled accordingly + false: no substitution has taken place, rNewText, rLen, rCutStart, rCutStop remain unchanged + */ + virtual bool filterText( const String& rOrigText, String& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop ); + + virtual bool supportsOperation( OutDevSupportType ) const = 0; + + // mirroring specifica + int GetLayout() { return m_nLayout; } + void SetLayout( int aLayout ) { m_nLayout = aLayout;} + + void mirror( long& nX, const OutputDevice *pOutDev, bool bBack = false ) const; + void mirror( long& nX, long& nWidth, const OutputDevice *pOutDev, bool bBack = false ) const; + BOOL mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack = false ) const; + void mirror( Rectangle& rRect, const OutputDevice*, bool bBack = false ) const; + void mirror( Region& rRgn, const OutputDevice *pOutDev, bool bBack = false ) const; + void mirror( ControlType,const ImplControlValue&,const OutputDevice*,bool bBack = false) const; + basegfx::B2DPoint mirror( const basegfx::B2DPoint& i_rPoint, const OutputDevice *pOutDev, bool bBack = false ) const; + basegfx::B2DPolygon mirror( const basegfx::B2DPolygon& i_rPoly, const OutputDevice *pOutDev, bool bBack = false ) const; + basegfx::B2DPolyPolygon mirror( const basegfx::B2DPolyPolygon& i_rPoly, const OutputDevice *pOutDev, bool bBack = false ) const; + + // non virtual methods; these do eventual coordinate mirroring and + // then delegate to protected virtual methods + BOOL UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ); + BOOL UnionClipRegion( const ::basegfx::B2DPolyPolygon&, const OutputDevice* ); + + // draw --> LineColor and FillColor and RasterOp and ClipRegion + void DrawPixel( long nX, long nY, const OutputDevice *pOutDev ); + void DrawPixel( long nX, long nY, SalColor nSalColor, const OutputDevice *pOutDev ); + void DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice *pOutDev ); + void DrawRect( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ); + void DrawPolyLine( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev ); + void DrawPolygon( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev ); + void DrawPolyPolygon( sal_uInt32 nPoly, + const sal_uInt32* pPoints, + PCONSTSALPOINT* pPtAry, + const OutputDevice *pOutDev ); + bool DrawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency, const OutputDevice* ); + bool DrawPolyLine( const basegfx::B2DPolygon&, double fTransparency, const basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin, const OutputDevice* ); + sal_Bool DrawPolyLineBezier( ULONG nPoints, + const SalPoint* pPtAry, + const BYTE* pFlgAry, + const OutputDevice *pOutDev ); + sal_Bool DrawPolygonBezier( ULONG nPoints, + const SalPoint* pPtAry, + const BYTE* pFlgAry, + const OutputDevice *pOutDev ); + sal_Bool DrawPolyPolygonBezier( sal_uInt32 nPoly, + const sal_uInt32* pPoints, + const SalPoint* const* pPtAry, + const BYTE* const* pFlgAry, + const OutputDevice *pOutDev ); + + // CopyArea --> No RasterOp, but ClipRegion + void CopyArea( long nDestX, + long nDestY, + long nSrcX, + long nSrcY, + long nSrcWidth, + long nSrcHeight, + USHORT nFlags, + const OutputDevice *pOutDev ); + + // CopyBits and DrawBitmap --> RasterOp and ClipRegion + // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics + void CopyBits( const SalTwoRect* pPosAry, + SalGraphics* pSrcGraphics, + const OutputDevice *pOutDev, + const OutputDevice *pSrcOutDev ); + void DrawBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + const OutputDevice *pOutDev ); + void DrawBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + SalColor nTransparentColor, + const OutputDevice *pOutDev ); + void DrawBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + const SalBitmap& rTransparentBitmap, + const OutputDevice *pOutDev ); + + void DrawMask( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + SalColor nMaskColor, + const OutputDevice *pOutDev ); + + SalBitmap* GetBitmap( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ); + SalColor GetPixel( long nX, long nY, const OutputDevice *pOutDev ); + + // invert --> ClipRegion (only Windows) + void Invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags, const OutputDevice *pOutDev ); + void Invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags, const OutputDevice *pOutDev ); + + BOOL DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize, const OutputDevice *pOutDev ); + + //------------------------------------- + // Native Widget Rendering functions + //------------------------------------- + + // Query the platform layer for control support + virtual BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart ); + + // Query the native control to determine if it was acted upon + BOOL HitTestNativeControl( ControlType nType, + ControlPart nPart, + const Rectangle& rControlRegion, + const Point& aPos, + BOOL& rIsInside, + const OutputDevice *pOutDev ); + + // Request rendering of a particular control and/or part + BOOL DrawNativeControl( ControlType nType, + ControlPart nPart, + const Rectangle& rControlRegion, + ControlState nState, + const ImplControlValue& aValue, + const rtl::OUString& aCaption, + const OutputDevice *pOutDev ); + + // Request rendering of a caption string for a control + BOOL DrawNativeControlText( ControlType nType, + ControlPart nPart, + const Rectangle& rControlRegion, + ControlState nState, + const ImplControlValue& aValue, + const rtl::OUString& aCaption, + const OutputDevice *pOutDev ); + + // Query the native control's actual drawing region (including adornment) + BOOL GetNativeControlRegion( ControlType nType, + ControlPart nPart, + const Rectangle& rControlRegion, + ControlState nState, + const ImplControlValue& aValue, + const rtl::OUString& aCaption, + Rectangle &rNativeBoundingRegion, + Rectangle &rNativeContentRegion, + const OutputDevice *pOutDev ); + + static void AddDevFontSubstitute( OutputDevice* pOutDev, + const String& rFontName, + const String& rReplaceFontName, + USHORT nFlags = 0 ); + + bool DrawAlphaBitmap( const SalTwoRect&, + const SalBitmap& rSourceBitmap, + const SalBitmap& rAlphaBitmap, + const OutputDevice *pOutDev ); + + bool DrawAlphaRect( long nX, long nY, long nWidth, long nHeight, + sal_uInt8 nTransparency, const OutputDevice *pOutDev ); + + virtual SystemGraphicsData GetGraphicsData() const = 0; + virtual SystemFontData GetSysFontData( int nFallbacklevel ) const = 0; +}; + +#endif // _SV_SALGDI_HXX diff --git a/vcl/inc/salgeom.hxx b/vcl/inc/salgeom.hxx new file mode 100644 index 000000000000..3d59e6199fa7 --- /dev/null +++ b/vcl/inc/salgeom.hxx @@ -0,0 +1,51 @@ +/************************************************************************* + * + * 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 _SV_SALGEOM_HXX +#define _SV_SALGEOM_HXX + +typedef struct _SalFrameGeometry { + // screen position of upper left corner of drawable area in pixel + long nX, nY; + // dimensions of the drawable area in pixel + unsigned long nWidth, nHeight; + // thickness of the decoration in pixel + unsigned long nLeftDecoration, + nTopDecoration, + nRightDecoration, + nBottomDecoration; + unsigned int nScreenNumber; + + _SalFrameGeometry() : + nX( 0 ), nY( 0 ), nWidth( 1 ), nHeight( 1 ), + nLeftDecoration( 0 ), nTopDecoration( 0 ), + nRightDecoration( 0 ), nBottomDecoration( 0 ), + nScreenNumber( 0 ) + {} +} SalFrameGeometry; + +#endif // _SV_SALGEOM_HXX diff --git a/vcl/inc/salimestatus.hxx b/vcl/inc/salimestatus.hxx new file mode 100644 index 000000000000..779a75c9afaa --- /dev/null +++ b/vcl/inc/salimestatus.hxx @@ -0,0 +1,45 @@ +/************************************************************************* + * + * 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 _SV_SALIMESTATUS_HXX +#define _SV_SALIMESTATUS_HXX + +#include + +class VCL_DLLPUBLIC SalI18NImeStatus +{ +public: + SalI18NImeStatus() {} + virtual ~SalI18NImeStatus(); + + // asks whether there is a status window available + // to toggle into menubar + virtual bool canToggle() = 0; + virtual void toggle() = 0; +}; + +#endif diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx new file mode 100644 index 000000000000..71b820803473 --- /dev/null +++ b/vcl/inc/salinst.hxx @@ -0,0 +1,219 @@ +/************************************************************************* + * + * 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 _SV_SALINST_HXX +#define _SV_SALINST_HXX + +#include "com/sun/star/uno/Reference.hxx" + +#include "vcl/sv.h" +#include "vcl/dllapi.h" + +#include "tools/string.hxx" + +#include "rtl/string.hxx" + +#include + +struct SystemParentData; +struct SalPrinterQueueInfo; +struct SalStatus; +struct ImplJobSetup; +class SalGraphics; +class SalFrame; +class SalObject; +class SalMenu; +class SalMenuItem; +class SalVirtualDevice; +class SalInfoPrinter; +class SalPrinter; +class SalTimer; +class ImplPrnQueueList; +class SalI18NImeStatus; +class SalSystem; +class SalBitmap; +struct SalItemParams; +class SalSession; +struct SystemGraphicsData; +struct SystemWindowData; +class Menu; + +namespace vos { class IMutex; } + +// --------------- +// - SalInstance - +// --------------- + +class VCL_DLLPUBLIC SalInstance +{ +public: + typedef bool(*Callback)(void*,void*,int); +private: + void* m_pEventInst; + void* m_pErrorInst; + Callback m_pEventCallback; + Callback m_pErrorCallback; + +public: + SalInstance() : + m_pEventInst( NULL ), + m_pErrorInst( NULL ), + m_pEventCallback( NULL ), + m_pErrorCallback( NULL ) + {} + virtual ~SalInstance(); + + // Frame + // DisplayName for Unix ??? + virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle ) = 0; + virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle ) = 0; + virtual void DestroyFrame( SalFrame* pFrame ) = 0; + + // Object (System Child Window) + virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE ) = 0; + virtual void DestroyObject( SalObject* pObject ) = 0; + + // VirtualDevice + // nDX and nDY in Pixel + // nBitCount: 0 == Default(=as window) / 1 == Mono + // pData allows for using a system dependent graphics or device context + virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics, + long nDX, long nDY, + USHORT nBitCount, const SystemGraphicsData *pData = NULL ) = 0; + virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice ) = 0; + + // Printer + // pSetupData->mpDriverData can be 0 + // pSetupData must be updatet with the current + // JobSetup + virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo, + ImplJobSetup* pSetupData ) = 0; + virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter ) = 0; + virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter ) = 0; + virtual void DestroyPrinter( SalPrinter* pPrinter ) = 0; + + virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList ) = 0; + virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo ) = 0; + virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ) = 0; + virtual String GetDefaultPrinter() = 0; + + // SalTimer + virtual SalTimer* CreateSalTimer() = 0; + // SalI18NImeStatus + virtual SalI18NImeStatus* CreateI18NImeStatus() = 0; + // SalSystem + virtual SalSystem* CreateSalSystem() = 0; + // SalBitmap + virtual SalBitmap* CreateSalBitmap() = 0; + + // YieldMutex + virtual vos::IMutex* GetYieldMutex() = 0; + virtual ULONG ReleaseYieldMutex() = 0; + virtual void AcquireYieldMutex( ULONG nCount ) = 0; + // return true, if yield mutex is owned by this thread, else false + virtual bool CheckYieldMutex() = 0; + + // wait next event and dispatch + // must returned by UserEvent (SalFrame::PostEvent) + // and timer + virtual void Yield( bool bWait, bool bHandleAllCurrentEvents ) = 0; + virtual bool AnyInput( USHORT nType ) = 0; + + // Menues + virtual SalMenu* CreateMenu( BOOL bMenuBar, Menu* pMenu ); + virtual void DestroyMenu( SalMenu* pMenu); + virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData ); + virtual void DestroyMenuItem( SalMenuItem* pItem ); + + // may return NULL to disable session management + virtual SalSession* CreateSalSession() = 0; + + // methods for XDisplayConnection + + // the parameters for the callbacks are: + // void* pInst: pInstance form the SetCallback call + // void* pEvent: address of the system specific event structure + // int nBytes: length of the system specific event structure + void SetEventCallback( void* pInstance, Callback pCallback ) + { m_pEventInst = pInstance; m_pEventCallback = pCallback; } + Callback GetEventCallback() const + { return m_pEventCallback; } + bool CallEventCallback( void* pEvent, int nBytes ) + { return m_pEventCallback ? m_pEventCallback( m_pEventInst, pEvent, nBytes ) : false; } + void SetErrorEventCallback( void* pInstance, Callback pCallback ) + { m_pErrorInst = pInstance; m_pErrorCallback = pCallback; } + Callback GetErrorEventCallback() const + { return m_pErrorCallback; } + bool CallErrorCallback( void* pEvent, int nBytes ) + { return m_pErrorCallback ? m_pErrorCallback( m_pErrorInst, pEvent, nBytes ) : false; } + + enum ConnectionIdentifierType { AsciiCString, Blob }; + virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ) = 0; + + // this is a vehicle for PrintFontManager to bridge the gap between vcl and libvclplug_* + // this is only necessary because PrintFontManager is an exported vcl API and therefore + // needs to be in libvcl while libvclplug_* do not contain exported C++ API + virtual void FillFontPathList( std::list< rtl::OString >& o_rFontPaths ); + + // dtrans implementation + virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > + CreateClipboard( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& i_rArguments ); + virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDragSource(); + virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDropTarget(); + virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType) = 0; +}; + +// called from SVMain +SalInstance* CreateSalInstance(); +void DestroySalInstance( SalInstance* pInst ); + +// ------------------------- +// - SalInstance-Functions - +// ------------------------- + +void SalAbort( const XubString& rErrorText ); + +VCL_DLLPUBLIC const ::rtl::OUString& SalGetDesktopEnvironment(); + +// ----------- +// - SalData - +// ----------- + +void InitSalData(); // called from Application-Ctor +void DeInitSalData(); // called from Application-Dtor + +void InitSalMain(); +void DeInitSalMain(); + +// ---------- +// - SVMain - +// ---------- + +// Callbacks (indepen in \sv\source\app\svmain.cxx) +VCL_DLLPUBLIC BOOL SVMain(); + +#endif // _SV_SALINST_HXX diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx new file mode 100755 index 000000000000..e23090c42392 --- /dev/null +++ b/vcl/inc/sallayout.hxx @@ -0,0 +1,390 @@ +/************************************************************************* + * + * 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 _SV_SALLAYOUT_HXX +#define _SV_SALLAYOUT_HXX + +#include + +#include +namespace basegfx { + class B2DPolyPolygon; + typedef std::vector B2DPolyPolygonVector; +} + +#ifndef _TOOLS_LANG_HXX +typedef unsigned short LanguageType; +#endif + +#include +#include +#include + +// for typedef sal_UCS4 +#include + +class SalGraphics; +class ImplFontData; + +#define MAX_FALLBACK 16 + +// ---------------- +// - LayoutOption - +// ---------------- + +#define SAL_LAYOUT_BIDI_RTL 0x0001 +#define SAL_LAYOUT_BIDI_STRONG 0x0002 +#define SAL_LAYOUT_RIGHT_ALIGN 0x0004 +#define SAL_LAYOUT_KERNING_PAIRS 0x0010 +#define SAL_LAYOUT_KERNING_ASIAN 0x0020 +#define SAL_LAYOUT_VERTICAL 0x0040 +#define SAL_LAYOUT_COMPLEX_DISABLED 0x0100 +#define SAL_LAYOUT_ENABLE_LIGATURES 0x0200 +#define SAL_LAYOUT_SUBSTITUTE_DIGITS 0x0400 +#define SAL_LAYOUT_KASHIDA_JUSTIFICATON 0x0800 +#define SAL_LAYOUT_DISABLE_GLYPH_PROCESSING 0x1000 +#define SAL_LAYOUT_FOR_FALLBACK 0x2000 + +// ----------------- + +// used for managing runs e.g. for BiDi, glyph and script fallback +class VCL_DLLPUBLIC ImplLayoutRuns +{ +private: + int mnRunIndex; + std::vector maRuns; + +public: + ImplLayoutRuns() { mnRunIndex = 0; maRuns.reserve(8); } + + void Clear() { maRuns.clear(); } + bool AddPos( int nCharPos, bool bRTL ); + bool AddRun( int nMinRunPos, int nEndRunPos, bool bRTL ); + + bool IsEmpty() const { return maRuns.empty(); } + void ResetPos() { mnRunIndex = 0; } + void NextRun() { mnRunIndex += 2; } + bool GetRun( int* nMinRunPos, int* nEndRunPos, bool* bRTL ) const; + bool GetNextPos( int* nCharPos, bool* bRTL ); + bool PosIsInRun( int nCharPos ) const; + bool PosIsInAnyRun( int nCharPos ) const; +}; + +// ----------------- + +class ImplLayoutArgs +{ +public: + // string related inputs + int mnFlags; + int mnLength; + int mnMinCharPos; + int mnEndCharPos; + const xub_Unicode* mpStr; + + // positioning related inputs + const sal_Int32* mpDXArray; // in pixel units + long mnLayoutWidth; // in pixel units + int mnOrientation; // in 0-3600 system + + // data for bidi and glyph+script fallback + ImplLayoutRuns maRuns; + ImplLayoutRuns maReruns; + +public: + ImplLayoutArgs( const xub_Unicode* pStr, int nLength, + int nMinCharPos, int nEndCharPos, int nFlags ); + + void SetLayoutWidth( long nWidth ) { mnLayoutWidth = nWidth; } + void SetDXArray( const sal_Int32* pDXArray ) { mpDXArray = pDXArray; } + void SetOrientation( int nOrientation ) { mnOrientation = nOrientation; } + + void ResetPos() + { maRuns.ResetPos(); } + bool GetNextPos( int* nCharPos, bool* bRTL ) + { return maRuns.GetNextPos( nCharPos, bRTL ); } + bool GetNextRun( int* nMinRunPos, int* nEndRunPos, bool* bRTL ); + bool NeedFallback( int nCharPos, bool bRTL ) + { return maReruns.AddPos( nCharPos, bRTL ); } + bool NeedFallback( int nMinRunPos, int nEndRunPos, bool bRTL ) + { return maReruns.AddRun( nMinRunPos, nEndRunPos, bRTL ); } + // methods used by BiDi and glyph fallback + bool NeedFallback() const + { return !maReruns.IsEmpty(); } + bool PrepareFallback(); + +protected: + void AddRun( int nMinCharPos, int nEndCharPos, bool bRTL ); +}; + +// helper functions often used with ImplLayoutArgs +bool IsDiacritic( sal_UCS4 ); +int GetVerticalFlags( sal_UCS4 ); +sal_UCS4 GetVerticalChar( sal_UCS4 ); +// #i80090# GetMirroredChar also needed outside vcl, moved to svapp.hxx +// VCL_DLLPUBLIC sal_UCS4 GetMirroredChar( sal_UCS4 ); +sal_UCS4 GetLocalizedChar( sal_UCS4, LanguageType ); +VCL_DLLPUBLIC const char* GetAutofallback( sal_UCS4 ) ; + +// ------------- +// - SalLayout - +// ------------- + +typedef sal_uInt32 sal_GlyphId; + +// Glyph Flags +#define GF_NONE 0x00000000 +#define GF_FLAGMASK 0xFF800000 +#define GF_IDXMASK ~GF_FLAGMASK +#define GF_ISCHAR 0x00800000 +#define GF_ROTL 0x01000000 +// caution !!! +#define GF_VERT 0x02000000 +// GF_VERT is only for windows implementation +// (win/source/gdi/salgdi3.cxx, win/source/gdi/winlayout.cxx) +// don't use this elsewhere !!! +#define GF_ROTR 0x03000000 +#define GF_ROTMASK 0x03000000 +#define GF_UNHINTED 0x04000000 +#define GF_GSUB 0x08000000 +#define GF_FONTMASK 0xF0000000 +#define GF_FONTSHIFT 28 + +#define GF_DROPPED 0xFFFFFFFF + +// all positions/widths are in font units +// one exception: drawposition is in pixel units + +class VCL_DLLPUBLIC SalLayout +{ +public: + // used by upper layers + Point& DrawBase() { return maDrawBase; } + const Point& DrawBase() const { return maDrawBase; } + Point& DrawOffset() { return maDrawOffset; } + const Point& DrawOffset() const { return maDrawOffset; } + Point GetDrawPosition( const Point& rRelative = Point(0,0) ) const; + + virtual bool LayoutText( ImplLayoutArgs& ) = 0; // first step of layouting + virtual void AdjustLayout( ImplLayoutArgs& ); // adjusting after fallback etc. + virtual void InitFont() const {} + virtual void DrawText( SalGraphics& ) const = 0; + + int GetUnitsPerPixel() const { return mnUnitsPerPixel; } + int GetOrientation() const { return mnOrientation; } + + virtual const ImplFontData* GetFallbackFontData( sal_GlyphId ) const; + + // methods using string indexing + virtual int GetTextBreak( long nMaxWidth, long nCharExtra=0, int nFactor=1 ) const = 0; + virtual long FillDXArray( sal_Int32* pDXArray ) const = 0; + virtual long GetTextWidth() const { return FillDXArray( NULL ); } + virtual void GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const = 0; + virtual bool IsKashidaPosValid ( int /*nCharPos*/ ) const { return true; } // i60594 + + // methods using glyph indexing + virtual int GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIdAry, Point& rPos, int&, + sal_Int32* pGlyphAdvAry = NULL, int* pCharPosAry = NULL ) const = 0; + virtual bool GetOutline( SalGraphics&, ::basegfx::B2DPolyPolygonVector& ) const; + virtual bool GetBoundRect( SalGraphics&, Rectangle& ) const; + + virtual bool IsSpacingGlyph( sal_GlyphId ) const; + + // reference counting + void Reference() const; + void Release() const; + + // used by glyph+font+script fallback + virtual void MoveGlyph( int nStart, long nNewXPos ) = 0; + virtual void DropGlyph( int nStart ) = 0; + virtual void Simplify( bool bIsBase ) = 0; + virtual void DisableGlyphInjection( bool /*bDisable*/ ) {} + +protected: + // used by layout engines + SalLayout(); + virtual ~SalLayout(); + + // used by layout layers + void SetUnitsPerPixel( int n ) { mnUnitsPerPixel = n; } + void SetOrientation( int nOrientation ) // in 0-3600 system + { mnOrientation = nOrientation; } + + static int CalcAsianKerning( sal_UCS4, bool bLeft, bool bVertical ); + +private: + // enforce proper copy semantic + SAL_DLLPRIVATE SalLayout( const SalLayout& ); + SAL_DLLPRIVATE SalLayout& operator=( const SalLayout& ); + +protected: + int mnMinCharPos; + int mnEndCharPos; + int mnLayoutFlags; + + int mnUnitsPerPixel; + int mnOrientation; + + mutable int mnRefCount; + mutable Point maDrawOffset; + Point maDrawBase; +}; + +// ------------------ +// - MultiSalLayout - +// ------------------ + +class VCL_DLLPUBLIC MultiSalLayout : public SalLayout +{ +public: + virtual void DrawText( SalGraphics& ) const; + virtual int GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const; + virtual long FillDXArray( sal_Int32* pDXArray ) const; + virtual void GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const; + virtual int GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIdxAry, Point& rPos, + int&, sal_Int32* pGlyphAdvAry, int* pCharPosAry ) const; + virtual bool GetOutline( SalGraphics&, ::basegfx::B2DPolyPolygonVector& ) const; + virtual bool GetBoundRect( SalGraphics&, Rectangle& ) const; + + // used only by OutputDevice::ImplLayout, TODO: make friend + MultiSalLayout( SalLayout& rBaseLayout, + const ImplFontData* pBaseFont = NULL ); + virtual bool AddFallback( SalLayout& rFallbackLayout, + ImplLayoutRuns&, const ImplFontData* pFallbackFont ); + virtual bool LayoutText( ImplLayoutArgs& ); + virtual void AdjustLayout( ImplLayoutArgs& ); + virtual void InitFont() const; + + virtual const ImplFontData* GetFallbackFontData( sal_GlyphId ) const; + + void SetInComplete(bool bInComplete = true); + +protected: + virtual ~MultiSalLayout(); + +private: + // dummy implementations + virtual void MoveGlyph( int, long ) {} + virtual void DropGlyph( int ) {} + virtual void Simplify( bool ) {} + + // enforce proper copy semantic + SAL_DLLPRIVATE MultiSalLayout( const MultiSalLayout& ); + SAL_DLLPRIVATE MultiSalLayout& operator=( const MultiSalLayout& ); + +private: + SalLayout* mpLayouts[ MAX_FALLBACK ]; + const ImplFontData* mpFallbackFonts[ MAX_FALLBACK ]; + ImplLayoutRuns maFallbackRuns[ MAX_FALLBACK ]; + int mnLevel; + bool mbInComplete; +}; + +// -------------------- +// - GenericSalLayout - +// -------------------- + +struct GlyphItem +{ + int mnFlags; + int mnCharPos; // index in string + int mnOrigWidth; // original glyph width + int mnNewWidth; // width after adjustments + sal_GlyphId mnGlyphIndex; + Point maLinearPos; // absolute position of non rotated string + +public: + GlyphItem() {} + + GlyphItem( int nCharPos, sal_GlyphId nGlyphIndex, const Point& rLinearPos, + long nFlags, int nOrigWidth ) + : mnFlags(nFlags), mnCharPos(nCharPos), + mnOrigWidth(nOrigWidth), mnNewWidth(nOrigWidth), + mnGlyphIndex(nGlyphIndex), maLinearPos(rLinearPos) + {} + + enum{ FALLBACK_MASK=0xFF, IS_IN_CLUSTER=0x100, IS_RTL_GLYPH=0x200, IS_DIACRITIC=0x400 }; + + bool IsClusterStart() const { return ((mnFlags & IS_IN_CLUSTER) == 0); } + bool IsRTLGlyph() const { return ((mnFlags & IS_RTL_GLYPH) != 0); } + bool IsDiacritic() const { return ((mnFlags & IS_DIACRITIC) != 0); } +}; + +// --------------- + +typedef std::list GlyphList; +typedef std::vector GlyphVector; + +// --------------- + +class VCL_DLLPUBLIC GenericSalLayout : public SalLayout +{ +public: + // used by layout engines + void AppendGlyph( const GlyphItem& ); + virtual void AdjustLayout( ImplLayoutArgs& ); + virtual void ApplyDXArray( ImplLayoutArgs& ); + virtual void Justify( long nNewWidth ); + void KashidaJustify( long nIndex, int nWidth ); + void ApplyAsianKerning( const sal_Unicode*, int nLength ); + void SortGlyphItems(); + + // used by upper layers + virtual long GetTextWidth() const; + virtual long FillDXArray( sal_Int32* pDXArray ) const; + virtual int GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const; + virtual void GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const; + + // used by display layers + virtual int GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIdxAry, Point& rPos, int&, + sal_Int32* pGlyphAdvAry = NULL, int* pCharPosAry = NULL ) const; + +protected: + GenericSalLayout(); + virtual ~GenericSalLayout(); + + // for glyph+font+script fallback + virtual void MoveGlyph( int nStart, long nNewXPos ); + virtual void DropGlyph( int nStart ); + virtual void Simplify( bool bIsBase ); + + bool GetCharWidths( sal_Int32* pCharWidths ) const; + +private: + GlyphItem* mpGlyphItems; // TODO: change to GlyphList + int mnGlyphCount; + int mnGlyphCapacity; + mutable Point maBasePoint; + + // enforce proper copy semantic + SAL_DLLPRIVATE GenericSalLayout( const GenericSalLayout& ); + SAL_DLLPRIVATE GenericSalLayout& operator=( const GenericSalLayout& ); +}; + +#undef SalGraphics + +#endif // _SV_SALLAYOUT_HXX diff --git a/vcl/inc/salmenu.hxx b/vcl/inc/salmenu.hxx new file mode 100644 index 000000000000..cc0438c4e177 --- /dev/null +++ b/vcl/inc/salmenu.hxx @@ -0,0 +1,101 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SV_SALMENU_HXX +#define _SV_SALMENU_HXX + +#include +#include "vcl/dllapi.h" +#include +#include +#include + +struct SystemMenuData; +class FloatingWindow; +class SalFrame; + +struct SalItemParams +{ + USHORT nId; // item Id + MenuItemType eType; // MenuItem-Type + MenuItemBits nBits; // MenuItem-Bits + Menu* pMenu; // Pointer to Menu + XubString aText; // Menu-Text + Image aImage; // Image +}; + + +struct SalMenuButtonItem +{ + USHORT mnId; + Image maImage; + rtl::OUString maToolTipText; + + SalMenuButtonItem() : mnId( 0 ) {} + SalMenuButtonItem( USHORT i_nId, const Image& rImg, const rtl::OUString& i_rTTText = rtl::OUString() ) + : mnId( i_nId ), maImage( rImg ), maToolTipText( i_rTTText ) {} +}; + +class VCL_DLLPUBLIC SalMenuItem +{ +public: + SalMenuItem() {} + virtual ~SalMenuItem(); +}; + +class VCL_DLLPUBLIC SalMenu +{ +public: + SalMenu() {} + virtual ~SalMenu(); + + virtual BOOL VisibleMenuBar() = 0; // must return TRUE to actually DISPLAY native menu bars + // otherwise only menu messages are processed (eg, OLE on Windows) + + virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ) = 0; + virtual void RemoveItem( unsigned nPos ) = 0; + virtual void SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos ) = 0; + virtual void SetFrame( const SalFrame* pFrame ) = 0; + virtual void CheckItem( unsigned nPos, BOOL bCheck ) = 0; + virtual void EnableItem( unsigned nPos, BOOL bEnable ) = 0; + virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText )= 0; + virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage ) = 0; + virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName ) = 0; + virtual void GetSystemMenuData( SystemMenuData* pData ) = 0; + virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, ULONG nFlags); + virtual bool AddMenuBarButton( const SalMenuButtonItem& ); // return false if not implemented or failure + virtual void RemoveMenuBarButton( USHORT nId ); + + // return an empty rectangle if not implemented + // return Rectangle( Point( -1, -1 ), Size( 1, 1 ) ) if menu bar buttons implemented + // but rectangle cannot be determined + virtual Rectangle GetMenuBarButtonRectPixel( USHORT i_nItemId, SalFrame* i_pReferenceFrame ); +}; + + +#endif // _SV_SALMENU_HXX + diff --git a/vcl/inc/salobj.hxx b/vcl/inc/salobj.hxx new file mode 100644 index 000000000000..44d556b39eb0 --- /dev/null +++ b/vcl/inc/salobj.hxx @@ -0,0 +1,92 @@ +/************************************************************************* + * + * 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 _SV_SALOBJ_HXX +#define _SV_SALOBJ_HXX + +#include +#include +#include +#include + +struct SystemEnvData; + +// ------------------- +// - SalObject-Types - +// ------------------- + +#define SAL_OBJECT_CLIP_INCLUDERECTS ((USHORT)0x0001) +#define SAL_OBJECT_CLIP_EXCLUDERECTS ((USHORT)0x0002) +#define SAL_OBJECT_CLIP_ABSOLUTE ((USHORT)0x0004) + +// ------------- +// - SalObject - +// ------------- + +class VCL_DLLPUBLIC SalObject +{ + void* m_pInst; + SALOBJECTPROC m_pCallback; + BOOL m_bMouseTransparent:1, + m_bEraseBackground:1; +public: + SalObject() : m_pInst( NULL ), m_pCallback( NULL ), m_bMouseTransparent( FALSE ), m_bEraseBackground( TRUE ) {} + virtual ~SalObject(); + + virtual void ResetClipRegion() = 0; + virtual USHORT GetClipRegionType() = 0; + virtual void BeginSetClipRegion( ULONG nRects ) = 0; + virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0; + virtual void EndSetClipRegion() = 0; + + virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ) = 0; + virtual void Show( BOOL bVisible ) = 0; + virtual void Enable( BOOL nEnable ) = 0; + virtual void GrabFocus() = 0; + + virtual void SetBackground() = 0; + virtual void SetBackground( SalColor nSalColor ) = 0; + + virtual const SystemEnvData* GetSystemData() const = 0; + + virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ) = 0; + + void SetCallback( void* pInst, SALOBJECTPROC pProc ) + { m_pInst = pInst; m_pCallback = pProc; } + long CallCallback( USHORT nEvent, const void* pEvent ) + { return m_pCallback ? m_pCallback( m_pInst, this, nEvent, pEvent ) : 0; } + void SetMouseTransparent( BOOL bMouseTransparent ) + { m_bMouseTransparent = bMouseTransparent; } + BOOL IsMouseTransparent() + { return m_bMouseTransparent; } + void EnableEraseBackground( BOOL bEnable ) + { m_bEraseBackground = bEnable; } + BOOL IsEraseBackgroundEnabled() + { return m_bEraseBackground; } +}; + +#endif // _SV_SALOBJ_HXX diff --git a/vcl/inc/salprn.hxx b/vcl/inc/salprn.hxx new file mode 100644 index 000000000000..19f023108349 --- /dev/null +++ b/vcl/inc/salprn.hxx @@ -0,0 +1,137 @@ +/************************************************************************* + * + * 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 _SV_SALPRN_HXX +#define _SV_SALPRN_HXX + +#include +#include +#include +#include + +#include + +class SalGraphics; +class SalFrame; +struct ImplJobSetup; +namespace vcl { class PrinterController; } + +// ----------------------- +// - SalPrinterQueueInfo - +// ----------------------- + +struct VCL_DLLPUBLIC SalPrinterQueueInfo +{ + XubString maPrinterName; + XubString maDriver; + XubString maLocation; + XubString maComment; + ULONG mnStatus; + ULONG mnJobs; + void* mpSysData; + + SalPrinterQueueInfo(); + ~SalPrinterQueueInfo(); +}; + +// ------------------ +// - SalInfoPrinter - +// ------------------ + +class VCL_DLLPUBLIC SalInfoPrinter +{ +public: + std::vector< PaperInfo > m_aPaperFormats; // all printer supported formats + bool m_bPapersInit; // set to true after InitPaperFormats + bool m_bCompatMetrics; + + SalInfoPrinter() : m_bPapersInit( false ), m_bCompatMetrics( false ) {} + virtual ~SalInfoPrinter(); + + // SalGraphics or NULL, but two Graphics for all SalFrames + // must be returned + virtual SalGraphics* GetGraphics() = 0; + virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0; + + virtual BOOL Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ) = 0; + // This function set the driver data and + // set the new indepen data in pSetupData + virtual BOOL SetPrinterData( ImplJobSetup* pSetupData ) = 0; + // This function merged the indepen driver data + // and set the new indepen data in pSetupData + // Only the data must changed, where the bit + // in nFlags is set + virtual BOOL SetData( ULONG nFlags, ImplJobSetup* pSetupData ) = 0; + + virtual void GetPageInfo( const ImplJobSetup* pSetupData, + long& rOutWidth, long& rOutHeight, + long& rPageOffX, long& rPageOffY, + long& rPageWidth, long& rPageHeight ) = 0; + virtual ULONG GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType ) = 0; + virtual ULONG GetPaperBinCount( const ImplJobSetup* pSetupData ) = 0; + virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin ) = 0; + // fills m_aPaperFormats and sets m_bPapersInit to true + virtual void InitPaperFormats( const ImplJobSetup* pSetupData ) = 0; + // returns angle that a landscape page will be turned counterclockwise wrt to portrait + virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData ) = 0; +}; + +// -------------- +// - SalPrinter - +// -------------- + +class VCL_DLLPUBLIC SalPrinter +{ +public: // public for Sal Implementation + SalPrinter() {} + virtual ~SalPrinter(); + + virtual BOOL StartJob( const String* pFileName, + const String& rJobName, + const String& rAppName, + ULONG nCopies, + bool bCollate, + bool bDirect, + ImplJobSetup* pSetupData ) = 0; + + // implement for pull model print systems only, + // default implementations (see salvtables.cxx) just returns FALSE + virtual BOOL StartJob( const String* pFileName, + const String& rJobName, + const String& rAppName, + ImplJobSetup* pSetupData, + vcl::PrinterController& rController ); + + virtual BOOL EndJob() = 0; + virtual BOOL AbortJob() = 0; + virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData ) = 0; + virtual BOOL EndPage() = 0; + virtual ULONG GetErrorCode() = 0; + +}; + +#endif // _SV_SALPRN_HXX diff --git a/vcl/inc/salptype.hxx b/vcl/inc/salptype.hxx new file mode 100644 index 000000000000..8613ead5301a --- /dev/null +++ b/vcl/inc/salptype.hxx @@ -0,0 +1,60 @@ +/************************************************************************* + * + * 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 _SV_SALPTYPE_HXX +#define _SV_SALPTYPE_HXX + +#include + +// -------------------- +// - SalJobSetupFlags - +// -------------------- + +#define SAL_JOBSET_ORIENTATION ((ULONG)0x00000001) +#define SAL_JOBSET_PAPERBIN ((ULONG)0x00000002) +#define SAL_JOBSET_PAPERSIZE ((ULONG)0x00000004) +#define SAL_JOBSET_DUPLEXMODE ((ULONG)0x00000008) +#define SAL_JOBSET_ALL (SAL_JOBSET_ORIENTATION |\ + SAL_JOBSET_PAPERBIN |\ + SAL_JOBSET_PAPERSIZE |\ + SAL_JOBSET_DUPLEXMODE) + +// ------------------- +// - SalPrinterError - +// ------------------- + +#define SAL_PRINTER_ERROR_GENERALERROR 1 +#define SAL_PRINTER_ERROR_ABORT 2 + +// ------------------- +// - SalPrinterProcs - +// ------------------- + +class SalPrinter; +typedef long (*SALPRNABORTPROC)( void* pInst, SalPrinter* pPrinter ); + +#endif // _SV_SALPTYPE_HXX diff --git a/vcl/inc/salsession.hxx b/vcl/inc/salsession.hxx new file mode 100644 index 000000000000..2da1ae551074 --- /dev/null +++ b/vcl/inc/salsession.hxx @@ -0,0 +1,117 @@ +/************************************************************************* + * + * 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 _VCL_SALSESSION_HXX +#define _VCL_SALSESSION_HXX + +#include "vcl/dllapi.h" + +enum SalSessionEventType +{ + Interaction, + SaveRequest, + ShutdownCancel, + Quit +}; + +struct SalSessionEvent +{ + SalSessionEventType m_eType; + + SalSessionEvent( SalSessionEventType eType ) + : m_eType( eType ) + {} +}; + +struct SalSessionInteractionEvent : public SalSessionEvent +{ + bool m_bInteractionGranted; + + SalSessionInteractionEvent( bool bGranted ) + : SalSessionEvent( Interaction ), + m_bInteractionGranted( bGranted ) + {} +}; + +struct SalSessionSaveRequestEvent : public SalSessionEvent +{ + bool m_bShutdown; + bool m_bCancelable; + + SalSessionSaveRequestEvent( bool bShutdown, bool bCancelable ) + : SalSessionEvent( SaveRequest ), + m_bShutdown( bShutdown ), + m_bCancelable( bCancelable ) + {} +}; + +struct SalSessionShutdownCancelEvent : public SalSessionEvent +{ + SalSessionShutdownCancelEvent() + : SalSessionEvent( ShutdownCancel ) + {} +}; + +struct SalSessionQuitEvent : public SalSessionEvent +{ + SalSessionQuitEvent() + : SalSessionEvent( Quit ) + {} +}; + +typedef void(*SessionProc)( SalSessionEvent *pEvent); + +class VCL_DLLPUBLIC SalSession +{ + SessionProc m_aProc; +public: + SalSession() + : m_aProc( 0 ) + {} + virtual ~SalSession(); + + void SetCallback( SessionProc aCallback ) + { + m_aProc = aCallback; + } + void CallCallback( SalSessionEvent* pEvent ) + { + if( m_aProc ) + m_aProc( pEvent ); + } + + // query the session manager for a user interaction slot + virtual void queryInteraction() = 0; + // signal the session manager that we're done with user interaction + virtual void interactionDone() = 0; + // signal that we're done saving + virtual void saveDone() = 0; + // try to cancel the sutdown in progress + virtual bool cancelShutdown() = 0; +}; + +#endif diff --git a/vcl/inc/salsys.hxx b/vcl/inc/salsys.hxx new file mode 100644 index 000000000000..310b0a27e30f --- /dev/null +++ b/vcl/inc/salsys.hxx @@ -0,0 +1,146 @@ +/************************************************************************* + * + * 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 _SV_SALSYS_HXX +#define _SV_SALSYS_HXX + +#include +#include +#include + + +/* Button combinations for ShowNativeMessageBox +*/ +const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK = 0; +const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL = 1; +const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_ABORT_RETRY_IGNORE = 2; +const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO_CANCEL = 3; +const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO = 4; +const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL = 5; + +/* Button identifier for ShowNativeMessageBox +*/ +const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK = 1; +const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL = 2; +const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_ABORT = 3; +const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY = 4; +const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_IGNORE = 5; +const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_YES = 6; +const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO = 7; + + + +// ------------- +// - SalSystem - +// ------------- + +class VCL_DLLPUBLIC SalSystem +{ +public: + SalSystem() {} + virtual ~SalSystem(); + + // get info about the display + + /* Gets the number of active screens attached to the display + + @returns the number of active screens + */ + virtual unsigned int GetDisplayScreenCount() = 0; + /* Queries whether multiple screens are truly separate + + @returns true if screens are distinct and windows cannot + be moved between them or span multiple of them + false if screens form up one big display + */ + virtual bool IsMultiDisplay() = 0; + /* Queries the default screen number. The default screen is the + screen on which windows will appear if no special positioning + is made. + + @returns the default screen number + */ + virtual unsigned int GetDefaultDisplayNumber() = 0; + /* Gets relative position and size of the screens attached to the display + + @param nScreen + The screen number to be queried + + @returns position: (0,0) in case of IsMultiscreen() == true + else position relative to whole display + size: size of the screen + */ + virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) = 0; + /* Gets position and size of the work area of a screen attached to the display + + @param nScreen + The screen number to be queried + + @returns position and size relative to the scree + */ + virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen ) = 0; + /* Gets the name of a screen + + @param nScreen + The screen number to be queried + + @returns the name of the screen + */ + virtual rtl::OUString GetScreenName( unsigned int nScreen ) = 0; + + /* Shows a native message box with the specified title, message and button + combination. + + @param rTitle + The title to be shown by the dialog box. + + @param rMessage + The message to be shown by the dialog box. + + @param nButtonCombination + Specify which button combination the message box should display. + See button combinations above. + + @param nDefaultButton + Specifies which button has the focus initially. + See button identifiers above. + The effect of specifying a button that doesn't belong + to the specified button combination is undefined. + + @returns the identifier of the button that was pressed by the user. + See button identifier above. If the function fails the + return value is 0. + */ + virtual int ShowNativeMessageBox( const String& rTitle, + const String& rMessage, + int nButtonCombination, + int nDefaultButton) = 0; +}; + +SalSystem* ImplGetSalSystem(); + +#endif // _SV_SALSYS_HXX diff --git a/vcl/inc/saltimer.hxx b/vcl/inc/saltimer.hxx new file mode 100644 index 000000000000..05f2349e6b86 --- /dev/null +++ b/vcl/inc/saltimer.hxx @@ -0,0 +1,69 @@ +/************************************************************************* + * + * 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 _SV_SALTIMER_HXX +#define _SV_SALTIMER_HXX + +#include +#include +#include + +// ------------ +// - SalTimer - +// ------------ + +/* + * note: there will be only a single instance of SalTimer + * SalTimer originally had only static methods, but + * this needed to be virtualized for the sal plugin migration + */ + +class VCL_DLLPUBLIC SalTimer +{ + SALTIMERPROC m_pProc; +public: + SalTimer() : m_pProc( NULL ) {} + virtual ~SalTimer(); + + // AutoRepeat and Restart + virtual void Start( ULONG nMS ) = 0; + virtual void Stop() = 0; + + // Callbacks (indepen in \sv\source\app\timer.cxx) + void SetCallback( SALTIMERPROC pProc ) + { + m_pProc = pProc; + } + + void CallCallback() + { + if( m_pProc ) + m_pProc(); + } +}; + +#endif // _SV_SALTIMER_HXX diff --git a/vcl/inc/salvd.hxx b/vcl/inc/salvd.hxx new file mode 100644 index 000000000000..fcbe1fb35383 --- /dev/null +++ b/vcl/inc/salvd.hxx @@ -0,0 +1,58 @@ +/************************************************************************* + * + * 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 _SV_SALVD_HXX +#define _SV_SALVD_HXX + +#include +#include + +class SalGraphics; + +// -------------------- +// - SalVirtualDevice - +// -------------------- + +class VCL_DLLPUBLIC SalVirtualDevice +{ +public: // public for Sal Implementation + SalVirtualDevice() {} + virtual ~SalVirtualDevice(); + + // SalGraphics or NULL, but two Graphics for all SalVirtualDevices + // must be returned + virtual SalGraphics* GetGraphics() = 0; + virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0; + + // Set new size, without saving the old contents + virtual BOOL SetSize( long nNewDX, long nNewDY ) = 0; + + /// Get actual VDev size in pixel + virtual void GetSize( long& rWidth, long& rHeight ) = 0; +}; + +#endif // _SV_SALVD_HXX diff --git a/vcl/inc/salwtype.hxx b/vcl/inc/salwtype.hxx new file mode 100644 index 000000000000..95b3806d648b --- /dev/null +++ b/vcl/inc/salwtype.hxx @@ -0,0 +1,346 @@ +/************************************************************************* + * + * 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 _SV_SALWTYPE_HXX +#define _SV_SALWTYPE_HXX + +#include +#include +#include + +class SalGraphics; +class SalFrame; +class SalObject; +class Window; + +class ImplFontSelectData; + +// --------------- +// - SalExtInput - +// --------------- + +// Muessen mit den Defines in cmdevt.hxx uebereinstimmen, da diese +// nicht konvertiert werden +#define SAL_EXTTEXTINPUT_ATTR_GRAYWAVELINE ((USHORT)0x0100) +#define SAL_EXTTEXTINPUT_ATTR_UNDERLINE ((USHORT)0x0200) +#define SAL_EXTTEXTINPUT_ATTR_BOLDUNDERLINE ((USHORT)0x0400) +#define SAL_EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE ((USHORT)0x0800) +#define SAL_EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE ((USHORT)0x1000) +#define SAL_EXTTEXTINPUT_ATTR_HIGHLIGHT ((USHORT)0x2000) +#define SAL_EXTTEXTINPUT_ATTR_REDTEXT ((USHORT)0x4000) +#define SAL_EXTTEXTINPUT_ATTR_HALFTONETEXT ((USHORT)0x8000) + +#define SAL_EXTTEXTINPUT_CURSOR_INVISIBLE ((USHORT)0x0001) +#define SAL_EXTTEXTINPUT_CURSOR_OVERWRITE ((USHORT)0x0002) + +// ------------ +// - SalEvent - +// ------------ + +#define SALEVENT_MOUSEMOVE ((USHORT)1) +#define SALEVENT_MOUSELEAVE ((USHORT)2) +#define SALEVENT_MOUSEBUTTONDOWN ((USHORT)3) +#define SALEVENT_MOUSEBUTTONUP ((USHORT)4) +#define SALEVENT_KEYINPUT ((USHORT)5) +#define SALEVENT_KEYUP ((USHORT)6) +#define SALEVENT_KEYMODCHANGE ((USHORT)7) +#define SALEVENT_PAINT ((USHORT)8) +#define SALEVENT_RESIZE ((USHORT)9) +#define SALEVENT_GETFOCUS ((USHORT)10) +#define SALEVENT_LOSEFOCUS ((USHORT)11) +#define SALEVENT_CLOSE ((USHORT)12) +#define SALEVENT_SHUTDOWN ((USHORT)13) +#define SALEVENT_SETTINGSCHANGED ((USHORT)14) +#define SALEVENT_VOLUMECHANGED ((USHORT)15) +#define SALEVENT_PRINTERCHANGED ((USHORT)16) +#define SALEVENT_DISPLAYCHANGED ((USHORT)17) +#define SALEVENT_FONTCHANGED ((USHORT)18) +#define SALEVENT_DATETIMECHANGED ((USHORT)19) +#define SALEVENT_KEYBOARDCHANGED ((USHORT)20) +#define SALEVENT_WHEELMOUSE ((USHORT)21) +#define SALEVENT_USEREVENT ((USHORT)22) +#define SALEVENT_MOUSEACTIVATE ((USHORT)23) +#define SALEVENT_EXTTEXTINPUT ((USHORT)24) +#define SALEVENT_ENDEXTTEXTINPUT ((USHORT)25) +#define SALEVENT_EXTTEXTINPUTPOS ((USHORT)26) +#define SALEVENT_INPUTCONTEXTCHANGE ((USHORT)27) +#define SALEVENT_MOVE ((USHORT)28) +#define SALEVENT_MOVERESIZE ((USHORT)29) +#define SALEVENT_CLOSEPOPUPS ((USHORT)30) +#define SALEVENT_EXTERNALKEYINPUT ((USHORT)31) +#define SALEVENT_EXTERNALKEYUP ((USHORT)32) +#define SALEVENT_MENUCOMMAND ((USHORT)33) +#define SALEVENT_MENUHIGHLIGHT ((USHORT)34) +#define SALEVENT_MENUACTIVATE ((USHORT)35) +#define SALEVENT_MENUDEACTIVATE ((USHORT)36) +#define SALEVENT_EXTERNALMOUSEMOVE ((USHORT)37) +#define SALEVENT_EXTERNALMOUSEBUTTONDOWN ((USHORT)38) +#define SALEVENT_EXTERNALMOUSEBUTTONUP ((USHORT)39) +#define SALEVENT_INPUTLANGUAGECHANGE ((USHORT)40) +#define SALEVENT_SHOWDIALOG ((USHORT)41) +#define SALEVENT_MENUBUTTONCOMMAND ((USHORT)42) +#define SALEVENT_SURROUNDINGTEXTREQUEST ((USHORT)43) +#define SALEVENT_SURROUNDINGTEXTSELECTIONCHANGE ((USHORT)44) +#define SALEVENT_STARTRECONVERSION ((USHORT)45) +#define SALEVENT_COUNT ((USHORT)45) + +// MOUSELEAVE must send, when the pointer leave the client area and +// the mouse is not captured +// MOUSEMOVE, MOUSELEAVE, MOUSEBUTTONDOWN and MOUSEBUTTONUP +// MAC: Ctrl+Button is MOUSE_RIGHT +struct SalMouseEvent +{ + ULONG mnTime; // Time in ms, when event is created + long mnX; // X-Position (Pixel, TopLeft-Output) + long mnY; // Y-Position (Pixel, TopLeft-Output) + USHORT mnButton; // 0-MouseMove/MouseLeave, MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE + USHORT mnCode; // SV-ModifierCode (KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT) +}; + +// KEYINPUT and KEYUP +struct SalKeyEvent +{ + ULONG mnTime; // Time in ms, when event is created + USHORT mnCode; // SV-KeyCode (KEY_xxx | KEY_SHIFT | KEY_MOD1 | KEY_MOD2) + USHORT mnCharCode; // SV-CharCode + USHORT mnRepeat; // Repeat-Count (KeyInputs-1) +}; + +// MENUEVENT +struct SalMenuEvent +{ + USHORT mnId; // Menu item ID + void* mpMenu; // pointer to VCL menu (class Menu) + + SalMenuEvent() : mnId( 0 ), mpMenu( NULL ) {} + SalMenuEvent( USHORT i_nId, void* i_pMenu ) + : mnId( i_nId ), mpMenu( i_pMenu ) {} +}; + +// KEYMODCHANGE +struct SalKeyModEvent +{ + ULONG mnTime; // Time in ms, when event is created + USHORT mnCode; // SV-ModifierCode (KEY_SHIFT | KEY_MOD1 | KEY_MOD2) + USHORT mnModKeyCode; // extended Modifier (MODKEY_LEFT, MODKEY_RIGHT, MODKEY_PRESS, MODKEY_RELEASE) +}; + +// PAINT +struct SalPaintEvent +{ + long mnBoundX; // BoundRect - X + long mnBoundY; // BoundRect - Y + long mnBoundWidth; // BoundRect - Width + long mnBoundHeight; // BoundRect - Height + bool mbImmediateUpdate; // set to true to force an immediate update + + SalPaintEvent( long x, long y, long w, long h, bool bImmediate = false ) : + mnBoundX( x ), mnBoundY( y ), + mnBoundWidth( w ), mnBoundHeight( h ), + mbImmediateUpdate( bImmediate ) + {} +}; + +// USEREVENT +// pEvent == pData + +// WHEELMOUSE +#define SAL_WHEELMOUSE_EVENT_PAGESCROLL ((ULONG)0xFFFFFFFF) +struct SalWheelMouseEvent +{ + ULONG mnTime; // Time in ms, when event is created + long mnX; // X-Position (Pixel, TopLeft-Output) + long mnY; // Y-Position (Pixel, TopLeft-Output) + long mnDelta; // Anzahl Drehungen + long mnNotchDelta; // Anzahl feste Drehungen + ULONG mnScrollLines; // Aktuelle Anzahl zu scrollende Zeilen + USHORT mnCode; // SV-ModifierCode (KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT) + BOOL mbHorz; // Horizontal + BOOL mbDeltaIsPixel; // delta value is a pixel value (on mac) + + SalWheelMouseEvent() + : mnTime( 0 ), mnX( 0 ), mnY( 0 ), mnDelta( 0 ), mnNotchDelta( 0 ), mnScrollLines( 0 ), mnCode( 0 ), mbHorz( FALSE ), mbDeltaIsPixel( FALSE ) + {} +}; + +// MOUSEACTIVATE +struct SalMouseActivateEvent +{ + long mnX; // X-Position (Pixel, TopLeft-Output) + long mnY; // Y-Position (Pixel, TopLeft-Output) +}; + +#ifdef __cplusplus + +// EXTTEXTINPUT +struct SalExtTextInputEvent +{ + ULONG mnTime; // Time in ms, when event is created + UniString maText; // Text + const USHORT* mpTextAttr; // Text-Attribute + ULONG mnCursorPos; // Cursor-Position + ULONG mnDeltaStart; // Start-Position der letzten Aenderung + BYTE mnCursorFlags; // SAL_EXTTEXTINPUT_CURSOR_xxx + BOOL mbOnlyCursor; // TRUE: Nur Cursor-Position wurde geaendert +}; + +#endif // __cplusplus + +// EXTTEXTINPUTPOS +struct SalExtTextInputPosEvent +{ + long mnX; // Cursor-X-Position to upper left corner of frame + long mnY; // Cursor-Y-Position to upper left corner of frame + long mnWidth; // Cursor-Width in Pixel + long mnHeight; // Cursor-Height in Pixel + long mnExtWidth; // Width of the PreEdit area + bool mbVertical; // true if in vertical mode +}; + +#ifdef __cplusplus + +// INPUTCONTEXTCHANGE +struct SalInputContextChangeEvent +{ + LanguageType meLanguage; // Neue Sprache +}; + +#endif // __cplusplus + +#ifdef __cplusplus + +// SURROUNDINGTEXTREQUEST +struct SalSurroundingTextRequestEvent +{ + UniString maText; // Text + ULONG mnStart; // The beggining index of selected range + ULONG mnEnd; // The end index of selected range +}; + +#endif // __cplusplus + +#ifdef __cplusplus + +// SURROUNDINGTEXTSELECTIONCHANGE +struct SalSurroundingTextSelectionChangeEvent +{ + ULONG mnStart; // The beggining index of selected range + ULONG mnEnd; // The end index of selected range +}; + +#endif // __cplusplus + +// ------------------ +// - SalFrame-Types - +// ------------------ + +typedef long (*SALFRAMEPROC)( Window* pInst, SalFrame* pFrame, + USHORT nEvent, const void* pEvent ); + +// -------------------- +// - SalObject-Events - +// -------------------- + +#define SALOBJ_EVENT_GETFOCUS ((USHORT)1) +#define SALOBJ_EVENT_LOSEFOCUS ((USHORT)2) +#define SALOBJ_EVENT_TOTOP ((USHORT)3) +#define SALOBJ_EVENT_COUNT ((USHORT)4) + +// ------------------ +// - SalObject-Types - +// ------------------ + +typedef long (*SALOBJECTPROC)( void* pInst, SalObject* pObject, + USHORT nEvent, const void* pEvent ); + +// ----------------- +// - SalFrameState - +// ----------------- + +// Must be the same as in syswin.hxx +#define SAL_FRAMESTATE_MASK_X ((ULONG)0x00000001) +#define SAL_FRAMESTATE_MASK_Y ((ULONG)0x00000002) +#define SAL_FRAMESTATE_MASK_WIDTH ((ULONG)0x00000004) +#define SAL_FRAMESTATE_MASK_HEIGHT ((ULONG)0x00000008) +#define SAL_FRAMESTATE_MASK_MAXIMIZED_X ((ULONG)0x00000100) +#define SAL_FRAMESTATE_MASK_MAXIMIZED_Y ((ULONG)0x00000200) +#define SAL_FRAMESTATE_MASK_MAXIMIZED_WIDTH ((ULONG)0x00000400) +#define SAL_FRAMESTATE_MASK_MAXIMIZED_HEIGHT ((ULONG)0x00000800) +#define SAL_FRAMESTATE_MASK_STATE ((ULONG)0x00000010) + +#define SAL_FRAMESTATE_NORMAL ((ULONG)0x00000001) +#define SAL_FRAMESTATE_MINIMIZED ((ULONG)0x00000002) +#define SAL_FRAMESTATE_MAXIMIZED ((ULONG)0x00000004) +#define SAL_FRAMESTATE_ROLLUP ((ULONG)0x00000008) +#define SAL_FRAMESTATE_MAXIMIZED_HORZ ((ULONG)0x00000010) +#define SAL_FRAMESTATE_MAXIMIZED_VERT ((ULONG)0x00000020) +#define SAL_FRAMESTATE_SYSTEMMASK ((ULONG)0x0000FFFF) + +struct SalFrameState +{ + ULONG mnMask; + long mnX; + long mnY; + long mnWidth; + long mnHeight; + long mnMaximizedX; + long mnMaximizedY; + long mnMaximizedWidth; + long mnMaximizedHeight; + ULONG mnState; +}; + +// ------------------- +// - SalInputContext - +// ------------------- + +// Muessen mit den Defines in inputctx.hxx uebereinstimmen, da diese +// nicht konvertiert werden +#define SAL_INPUTCONTEXT_TEXT ((ULONG)0x00000001) +#define SAL_INPUTCONTEXT_EXTTEXTINPUT ((ULONG)0x00000002) +#define SAL_INPUTCONTEXT_EXTTEXTINPUT_ON ((ULONG)0x00000004) +#define SAL_INPUTCONTEXT_EXTTEXTINPUT_OFF ((ULONG)0x00000008) +#define SAL_INPUTCONTEXT_CHANGELANGUAGE ((ULONG)0x00000010) + +#ifdef __cplusplus + +struct SalInputContext +{ + ImplFontSelectData* mpFont; + LanguageType meLanguage; + ULONG mnOptions; +}; + +#endif // __cplusplus + +// ------------------ +// - SalTimer-Types - +// ------------------ + +typedef void (*SALTIMERPROC)(); + +#endif // _SV_SALWTYPE_HXX diff --git a/vcl/inc/subedit.hxx b/vcl/inc/subedit.hxx new file mode 100644 index 000000000000..3ea1eaffa864 --- /dev/null +++ b/vcl/inc/subedit.hxx @@ -0,0 +1,48 @@ +/************************************************************************* + * + * 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 _SV_SUBEDIT_HXX +#define _SV_SUBEDIT_HXX + +#include +#include + +// --------------- +// - ImplSubEdit - +// --------------- + +class ImplSubEdit : public Edit +{ +public: + ImplSubEdit( Edit* pParent, WinBits nStyle ); + + Edit* GetParent() const { return (Edit*)Edit::GetParent(); } + + virtual void Modify(); +}; + +#endif // _SV_SUBEDIT_HXX diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx new file mode 100644 index 000000000000..67aa6806be49 --- /dev/null +++ b/vcl/inc/svdata.hxx @@ -0,0 +1,463 @@ +/************************************************************************* + * + * 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 _SV_SVDATA_HXX +#define _SV_SVDATA_HXX + +#include "vos/thread.hxx" +#include "tools/string.hxx" +#include "tools/gen.hxx" +#include "tools/shl.hxx" +#include "tools/link.hxx" +#include "tools/fldunit.hxx" +#include "vcl/vclevent.hxx" +#include "vcl/sv.h" +#include "tools/color.hxx" +#include "tools/debug.hxx" +#include "vcl/dllapi.h" +#include "com/sun/star/uno/Reference.hxx" +#include "unotools/options.hxx" + +namespace com { +namespace sun { +namespace star { +namespace lang { + class XMultiServiceFactory; +} +namespace frame { + class XSessionManagerClient; +} +namespace awt { + class XDisplayConnection; +} +}}} + +struct ImplTimerData; +struct ImplFileImageCacheData; +struct ImplConfigData; +class ImplDirectFontSubstitution; +struct ImplHotKey; +struct ImplEventHook; +class Point; +class Rectangle; +class ImpResMgr; +class ResMgr; +class UniqueIndex; +class ImplAccelManager; +class ImplDevFontList; +class ImplFontCache; +class HelpTextWindow; +class ImplTBDragMgr; +class ImplButtonList; +class ImplIdleMgr; +class DbgWindow; +class FloatingWindow; +class AllSettings; +class KeyCode; +class NotifyEvent; +class Timer; +class AutoTimer; +class Help; +class ImageList; +class Image; +class PopupMenu; +class Application; +class OutputDevice; +class Window; +class SystemWindow; +class WorkWindow; +class Dialog; +class VirtualDevice; +class Printer; +class SalFrame; +class SalInstance; +class SalSystem; +class SalProcessWindowList; +class SalTrayList; +class UniqueIdContainer; +class List; +class ImplPrnQueueList; +class ImplVDevCache; +class UnoWrapperBase; +class GraphicConverter; +class ImplWheelWindow; +class SalTimer; +class SalI18NImeStatus; +class DockingManager; +class VclEventListeners2; + +namespace vos { class OMutex; } +namespace vos { class OCondition; } +namespace vcl { class DisplayConnection; class SettingsConfigItem; class DeleteOnDeinitBase; } +namespace utl { class DefaultFontConfiguration; class FontSubstConfiguration; } + +// ----------------- +// - ImplSVAppData - +// ----------------- +class LocaleConfigurationListener : public utl::ConfigurationListener +{ +public: + virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ); +}; + +struct ImplSVAppData +{ + enum ImeStatusWindowMode + { + ImeStatusWindowMode_UNKNOWN, + ImeStatusWindowMode_HIDE, + ImeStatusWindowMode_SHOW + }; + + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF; + String* mpMSFTempFileName; + AllSettings* mpSettings; // Application settings + LocaleConfigurationListener* mpCfgListener; + VclEventListeners* mpEventListeners; // listeners for vcl events (eg, extended toolkit) + VclEventListeners* mpKeyListeners; // listeners for key events only (eg, extended toolkit) + ImplAccelManager* mpAccelMgr; // Accelerator Manager + XubString* mpAppName; // Application name + XubString* mpAppFileName; // Abs. Application FileName + XubString* mpDisplayName; // Application Display Name + String* mpFontPath; // Additional Fontpath + Help* mpHelp; // Application help + PopupMenu* mpActivePopupMenu; // Actives Popup-Menu (in Execute) + UniqueIdContainer* mpUniqueIdCont; // Fuer Eindeutige Id's + ImplIdleMgr* mpIdleMgr; // Idle-Manager + ImplWheelWindow* mpWheelWindow; // WheelWindow + ImplHotKey* mpFirstHotKey; // HotKey-Verwaltung + ImplEventHook* mpFirstEventHook; // Event-Hooks + VclEventListeners2* mpPostYieldListeners; // post yield listeners + ULONG mnLastInputTime; // GetLastInputTime() + USHORT mnDispatchLevel; // DispatchLevel + USHORT mnModalMode; // ModalMode Count + USHORT mnModalDialog; // ModalDialog Count + USHORT mnAccessCount; // AccessHdl Count + USHORT mnSysWinMode; // Modus, wann SystemWindows erzeugt werden sollen + USHORT mnLayout; // --- RTL-Flags --- currently not used, only for testing + short mnDialogScaleX; // Scale X-Positions and sizes in Dialogs + BOOL mbInAppMain; // is Application::Main() on stack + BOOL mbInAppExecute; // is Application::Execute() on stack + BOOL mbAppQuit; // is Application::Quit() called + BOOL mbSettingsInit; // TRUE: Settings are initialized + BOOL mbDialogCancel; // TRUE: Alle Dialog::Execute()-Aufrufe werden mit return FALSE sofort beendet + BOOL mbNoYield; // Application::Yield will not wait for events if the queue is empty + // essentially that makes it the same as Application::Reschedule + long mnDefaultLayoutBorder; // default value in pixel for layout distances used + // in window arrangers + + /** Controls whether showing any IME status window is toggled on or off. + + Only meaningful if showing IME status windows can be toggled on and off + externally (see Application::CanToggleImeStatusWindow). + */ + ImeStatusWindowMode meShowImeStatusWindow; + + DECL_STATIC_LINK( ImplSVAppData, ImplQuitMsg, void* ); + +}; + + +// ----------------- +// - ImplSVGDIData - +// ----------------- + +struct ImplSVGDIData +{ + OutputDevice* mpFirstWinGraphics; // First OutputDevice with a Frame Graphics + OutputDevice* mpLastWinGraphics; // Last OutputDevice with a Frame Graphics + OutputDevice* mpFirstVirGraphics; // First OutputDevice with a VirtualDevice Graphics + OutputDevice* mpLastVirGraphics; // Last OutputDevice with a VirtualDevice Graphics + OutputDevice* mpFirstPrnGraphics; // First OutputDevice with a InfoPrinter Graphics + OutputDevice* mpLastPrnGraphics; // Last OutputDevice with a InfoPrinter Graphics + VirtualDevice* mpFirstVirDev; // First VirtualDevice + VirtualDevice* mpLastVirDev; // Last VirtualDevice + Printer* mpFirstPrinter; // First Printer + Printer* mpLastPrinter; // Last Printer + ImplPrnQueueList* mpPrinterQueueList; // List of all printer queue + ImplDevFontList* mpScreenFontList; // Screen-Font-List + ImplFontCache* mpScreenFontCache; // Screen-Font-Cache + ImplDirectFontSubstitution* mpDirectFontSubst;// Font-Substitutons defined in Tools->Options->Fonts + GraphicConverter* mpGrfConverter; // Converter for graphics + long mnRealAppFontX; // AppFont X-Numenator for 40/tel Width + long mnAppFontX; // AppFont X-Numenator for 40/tel Width + DialogScaleX + long mnAppFontY; // AppFont Y-Numenator for 80/tel Height + BOOL mbFontSubChanged; // TRUE: FontSubstitution wurde zwischen Begin/End geaendert + utl::DefaultFontConfiguration* mpDefaultFontConfiguration; + utl::FontSubstConfiguration* mpFontSubstConfiguration; + bool mbNativeFontConfig; // true: do not override UI font + bool mbNoXORClipping; // true: do not use XOR to achieve clipping effects +}; + + +// ----------------- +// - ImplSVWinData - +// ----------------- + +struct ImplSVWinData +{ + Window* mpFirstFrame; // First FrameWindow + Window* mpDefDialogParent; // Default Dialog Parent + WorkWindow* mpAppWin; // Application-Window + Window* mpFocusWin; // window, that has the focus + Window* mpActiveApplicationFrame; // the last active application frame, can be used as DefModalDialogParent if no focuswin set + Window* mpCaptureWin; // window, that has the mouse capture + Window* mpLastDeacWin; // Window, that need a deactivate (FloatingWindow-Handling) + DbgWindow* mpDbgWin; // debug window + FloatingWindow* mpFirstFloat; // First FloatingWindow in PopupMode + Dialog* mpLastExecuteDlg; // Erster Dialog, der sich in Execute befindet + Window* mpExtTextInputWin; // Window, which is in ExtTextInput + Window* mpTrackWin; // window, that is in tracking mode + AutoTimer* mpTrackTimer; // tracking timer + ImageList* mpMsgBoxImgList; // ImageList for MessageBox + ImageList* mpMsgBoxHCImgList; // ImageList for MessageBox (high contrast mode) + Window* mpAutoScrollWin; // window, that is in AutoScrollMode mode + USHORT mnTrackFlags; // tracking flags + USHORT mnAutoScrollFlags; // auto scroll flags + BOOL mbNoDeactivate; // TRUE: keine Deactivate durchfuehren + BOOL mbNoSaveFocus; // TRUE: menues must not save/restore focus + BOOL mbNoSaveBackground; // TRUE: save background is unnecessary or even less performant +}; + + +// ------------------ +// - ImplSVCtrlData - +// ------------------ + +typedef std::vector< std::pair< String, FieldUnit > > FieldUnitStringList; + +struct ImplSVCtrlData +{ + ImageList* mpCheckImgList; // ImageList for CheckBoxes + ImageList* mpRadioImgList; // ImageList for RadioButtons + ImageList* mpPinImgList; // ImageList for PIN + ImageList* mpSplitHPinImgList; // ImageList for Horizontale SplitWindows + ImageList* mpSplitVPinImgList; // ImageList for Vertikale SplitWindows (PIN's) + ImageList* mpSplitHArwImgList; // ImageList for Horizontale SplitWindows (Arrows) + ImageList* mpSplitVArwImgList; // ImageList for Vertikale SplitWindows (Arrows) + Image* mpDisclosurePlus; + Image* mpDisclosurePlusHC; + Image* mpDisclosureMinus; + Image* mpDisclosureMinusHC; + ImplTBDragMgr* mpTBDragMgr; // DragMgr for ToolBox + USHORT mnCheckStyle; // CheckBox-Style for ImageList-Update + USHORT mnRadioStyle; // Radio-Style for ImageList-Update + ULONG mnLastCheckFColor; // Letzte FaceColor fuer CheckImage + ULONG mnLastCheckWColor; // Letzte WindowColor fuer CheckImage + ULONG mnLastCheckWTextColor; // Letzte WindowTextColor fuer CheckImage + ULONG mnLastCheckLColor; // Letzte LightColor fuer CheckImage + ULONG mnLastRadioFColor; // Letzte FaceColor fuer RadioImage + ULONG mnLastRadioWColor; // Letzte WindowColor fuer RadioImage + ULONG mnLastRadioLColor; // Letzte LightColor fuer RadioImage + FieldUnitStringList* mpFieldUnitStrings; // list with field units + FieldUnitStringList* mpCleanUnitStrings; // same list but with some "fluff" like spaces removed +}; + + +// ------------------ +// - ImplSVHelpData - +// ------------------ + +struct ImplSVHelpData +{ + BOOL mbContextHelp : 1; // is ContextHelp enabled + BOOL mbExtHelp : 1; // is ExtendedHelp enabled + BOOL mbExtHelpMode : 1; // is in ExtendedHelp Mode + BOOL mbOldBalloonMode : 1; // BallonMode, befor ExtHelpMode started + BOOL mbBalloonHelp : 1; // is BalloonHelp enabled + BOOL mbQuickHelp : 1; // is QuickHelp enabled + BOOL mbSetKeyboardHelp : 1; // tiphelp was activated by keyboard + BOOL mbKeyboardHelp : 1; // tiphelp was activated by keyboard + BOOL mbAutoHelpId : 1; // generate HelpIds + BOOL mbRequestingHelp : 1; // In Window::RequestHelp + HelpTextWindow* mpHelpWin; // HelpWindow + ULONG mnLastHelpHideTime; // ticks of last show +}; + +struct ImplSVNWFData +{ + bool mbMenuBarDockingAreaCommonBG; // e.g. WinXP default theme + bool mbDockingAreaSeparateTB; // individual toolbar backgrounds + // instead of one for docking area + bool mbToolboxDropDownSeparate; // two adjacent buttons for + // toolbox dropdown buttons + int mnMenuFormatExtraBorder; // inner popup menu border + bool mbFlatMenu; // no popup 3D border + Color maMenuBarHighlightTextColor; // override higlight text color + // in menubar if not transparent + bool mbOpenMenuOnF10; // on gnome the first menu opens on F10 + bool mbNoFocusRects; // on Aqua focus rects are not used + bool mbNoBoldTabFocus; // on Aqua and Gnome the focused tab has not bold text + bool mbCenteredTabs; // on Aqua, tabs are centered + bool mbNoActiveTabTextRaise; // on Aqua the text for the selected tab + // should not "jump up" a pixel + bool mbProgressNeedsErase; // set true for platforms that should draw the + // window background before drawing the native + // progress bar + bool mbCheckBoxNeedsErase; // set true for platforms that should draw the + // window background before drawing the native + // checkbox + bool mbScrollbarJumpPage; // true for "jump to here" behavior + int mnStatusBarLowerRightOffset; // amount in pixel to avoid in the lower righthand corner + bool mbCanDrawWidgetAnySize; // set to true currently on gtk +}; + + +// -------------- +// - ImplSVData - +// -------------- + +struct ImplSVData +{ + void* mpSalData; // SalData + SalInstance* mpDefInst; // Default SalInstance + Application* mpApp; // pApp + WorkWindow* mpDefaultWin; // Default-Window + BOOL mbDeInit; // Is VCL deinitializing + ULONG mnThreadCount; // is VCL MultiThread enabled + ImplConfigData* mpFirstConfigData; // Zeiger auf ersten Config-Block + ImplTimerData* mpFirstTimerData; // list of all running timers + SalTimer* mpSalTimer; // interface to sal event loop/timers + SalI18NImeStatus* mpImeStatus; // interface to ime status window + SalSystem* mpSalSystem; // SalSystem interface + ResMgr* mpResMgr; // SV-Resource-Manager + ULONG mnTimerPeriod; // current timer period + ULONG mnTimerUpdate; // TimerCallbackProcs on stack + BOOL mbNotAllTimerCalled;// TRUE: Es muessen noch Timer abgearbeitet werden + BOOL mbNoCallTimer; // TRUE: No Timeout calls + ImplSVAppData maAppData; // indepen data for class Application + ImplSVGDIData maGDIData; // indepen data for Output classes + ImplSVWinData maWinData; // indepen data for Windows classes + ImplSVCtrlData maCtrlData; // indepen data for Control classes + ImplSVHelpData maHelpData; // indepen data for Help classes + ImplSVNWFData maNWFData; + UnoWrapperBase* mpUnoWrapper; + Window* mpIntroWindow; // the splash screen + DockingManager* mpDockingManager; + BOOL mbIsTestTool; + + vos::OThread::TThreadIdentifier mnMainThreadId; + ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XDisplayConnection > mxDisplayConnection; + + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxAccessBridge; + com::sun::star::uno::Reference< com::sun::star::frame::XSessionManagerClient > xSMClient; + ::vcl::SettingsConfigItem* mpSettingsConfigItem; + std::list< vcl::DeleteOnDeinitBase* >* mpDeinitDeleteList; +}; + +void ImplInitSVData(); +void ImplDeInitSVData(); +void ImplDestroySVData(); +Window* ImplGetDefaultWindow(); +VCL_DLLPUBLIC ResMgr* ImplGetResMgr(); +VCL_DLLPUBLIC ResId VclResId( sal_Int32 nId ); // throws std::bad_alloc if no res mgr +DockingManager* ImplGetDockingManager(); +void ImplWindowAutoMnemonic( Window* pWindow ); + +void ImplUpdateSystemProcessWindow(); +Window* ImplFindWindow( const SalFrame* pFrame, Point& rSalFramePos ); + +// SVAPP.CXX +BOOL ImplCallHotKey( const KeyCode& rKeyCode ); +void ImplFreeHotKeyData(); +void ImplFreeEventHookData(); + +// WINPROC.CXX +long ImplCallPreNotify( NotifyEvent& rEvt ); +long ImplCallEvent( NotifyEvent& rEvt ); + +extern VCL_DLLPUBLIC ImplSVData* pImplSVData; +inline VCL_DLLPUBLIC ImplSVData* ImplGetSVData() { return pImplSVData; } +inline ImplSVData* ImplGetAppSVData() { return ImplGetSVData(); } + +bool ImplInitAccessBridge( BOOL bAllowCancel, BOOL &rCancelled ); + +FieldUnitStringList* ImplGetFieldUnits(); +FieldUnitStringList* ImplGetCleanedFieldUnits(); + + +// ----------------------------------------------------------------------- + +// ----------------- +// - ImplSVEmpyStr - +// ----------------- + +// Empty-SV-String + +inline const String& ImplGetSVEmptyStr() + { return String::EmptyString(); } +inline const ByteString& ImplGetSVEmptyByteStr() + { return ByteString::EmptyString(); } + +// ----------------------------------------------------------------------- + +// ---------------------- +// - struct ImplDelData - +// ---------------------- +// ImplDelData is used as a "dog tag" by a window when it +// does something that could indirectly destroy the window +// TODO: wild destruction of a window should not be possible + +struct ImplDelData +{ + ImplDelData* mpNext; + const Window* mpWindow; + BOOL mbDel; + + ImplDelData( const Window* pWindow = NULL ) + : mpNext( NULL ), mpWindow( NULL ), mbDel( FALSE ) + { if( pWindow ) AttachToWindow( pWindow ); } + + virtual ~ImplDelData(); + + bool IsDead() const + { + DBG_ASSERT( mbDel == FALSE, "object deleted while in use !" ); + return (mbDel!=FALSE); + } + BOOL /*deprecated */IsDelete() const { return (BOOL)IsDead(); } + +private: + void AttachToWindow( const Window* ); +}; + +// --------------- +// - ImplSVEvent - +// --------------- + +struct ImplSVEvent +{ + ULONG mnEvent; + void* mpData; + Link* mpLink; + Window* mpWindow; + ImplDelData maDelData; + BOOL mbCall; +}; + +#endif // _SV_SVDATA_HXX diff --git a/vcl/inc/svids.hrc b/vcl/inc/svids.hrc new file mode 100644 index 000000000000..432a30c3a748 --- /dev/null +++ b/vcl/inc/svids.hrc @@ -0,0 +1,260 @@ +/************************************************************************* + * + * 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 _SV_SVIDS_HRC +#define _SV_SVIDS_HRC + +#include "svl/solar.hrc" + +#define SV_RESID_STDOFFSET 0 +#define SV_RESID_MONOOFFSET 1 + +// Achtung: Diese Id's muessen min. 10 Werte auseinanderliegen, da +// je nach Style noch ein Offset aufgerechnet wird +#define SV_RESID_BITMAP_CHECK 1000 +#define SV_RESID_BITMAP_RADIO 1010 + +#define SV_RESID_BITMAP_MSGBOX 1020 +#define SV_RESID_BITMAP_MSGBOX_HC 1021 + +#define SV_RESID_BITMAP_PIN 1030 + +#define SV_RESID_BITMAP_SPLITHPIN 1040 +#define SV_RESID_BITMAP_SPLITVPIN 1041 +#define SV_RESID_BITMAP_SPLITHARW 1042 +#define SV_RESID_BITMAP_SPLITVARW 1043 + +#define SV_RESID_BITMAP_SCROLLMSK 1050 +#define SV_RESID_BITMAP_SCROLLBMP 1051 +#define SV_RESID_BITMAP_CLOSEDOC 1052 +#define SV_RESID_BITMAP_CLOSEDOCHC 1053 + +#define SV_DISCLOSURE_PLUS 1060 +#define SV_DISCLOSURE_MINUS 1061 +#define SV_DISCLOSURE_PLUS_HC 1062 +#define SV_DISCLOSURE_MINUS_HC 1063 + +#define SV_RESID_MENU_EDIT 2000 +#define SV_MENU_EDIT_UNDO 1 +#define SV_MENU_EDIT_CUT 2 +#define SV_MENU_EDIT_COPY 3 +#define SV_MENU_EDIT_PASTE 4 +#define SV_MENU_EDIT_DELETE 5 +#define SV_MENU_EDIT_SELECTALL 6 +#define SV_MENU_EDIT_INSERTSYMBOL 7 +#define SV_RESID_STRING_NOSELECTIONPOSSIBLE 2001 + +#define SV_MENU_MAC_SERVICES 2002 +#define SV_MENU_MAC_HIDEAPP 2003 +#define SV_MENU_MAC_HIDEALL 2004 +#define SV_MENU_MAC_SHOWALL 2005 +#define SV_MENU_MAC_QUITAPP 2006 + +#define SV_DLG_PRINT 2048 +#define SV_PRINT_OK 1 +#define SV_PRINT_CANCEL 2 +#define SV_PRINT_HELP 3 +#define SV_PRINT_PAGE_PREVIEW 4 +#define SV_PRINT_PAGE_TXT 5 +#define SV_PRINT_PAGE_FORWARD 6 +#define SV_PRINT_PAGE_BACKWARD 7 +#define SV_PRINT_PAGE_EDIT 8 +#define SV_PRINT_TABCTRL 9 +#define SV_PRINT_PRT_TYPE 10 +#define SV_PRINT_PRT_STATUS 11 +#define SV_PRINT_PRT_LOCATION 12 +#define SV_PRINT_PRT_COMMENT 13 +#define SV_PRINT_TOFILE_TXT 14 +#define SV_PRINT_DEFPRT_TXT 15 +#define SV_PRINT_PRINTPREVIEW_TXT 16 + +#define SV_PRINT_TAB_NUP 1 +#define SV_PRINT_PRT_NUP_LAYOUT_FL 1 +#define SV_PRINT_PRT_NUP_DEFAULT_BTN 2 +#define SV_PRINT_PRT_NUP_BROCHURE_BTN 3 +#define SV_PRINT_PRT_NUP_PAGES_BTN 4 +#define SV_PRINT_PRT_NUP_PAGES_BOX 5 +#define SV_PRINT_PRT_NUP_NUM_PAGES_TXT 6 +#define SV_PRINT_PRT_NUP_COLS_EDT 7 +#define SV_PRINT_PRT_NUP_TIMES_TXT 8 +#define SV_PRINT_PRT_NUP_ROWS_EDT 9 +#define SV_PRINT_PRT_NUP_MARGINS_PAGES_1_TXT 10 +#define SV_PRINT_PRT_NUP_MARGINS_PAGES_EDT 11 +#define SV_PRINT_PRT_NUP_MARGINS_PAGES_2_TXT 12 +#define SV_PRINT_PRT_NUP_MARGINS_SHEET_1_TXT 13 +#define SV_PRINT_PRT_NUP_MARGINS_SHEET_EDT 14 +#define SV_PRINT_PRT_NUP_MARGINS_SHEET_2_TXT 15 +#define SV_PRINT_PRT_NUP_ORIENTATION_TXT 16 +#define SV_PRINT_PRT_NUP_ORIENTATION_BOX 17 +#define SV_PRINT_PRT_NUP_ORDER_TXT 18 +#define SV_PRINT_PRT_NUP_ORDER_BOX 19 +#define SV_PRINT_PRT_NUP_BORDER_CB 20 + +#define SV_PRINT_PRT_NUP_ORIENTATION_AUTOMATIC 0 +#define SV_PRINT_PRT_NUP_ORIENTATION_PORTRAIT 1 +#define SV_PRINT_PRT_NUP_ORIENTATION_LANDSCAPE 2 + +#define SV_PRINT_PRT_NUP_ORDER_LRTB 0 +#define SV_PRINT_PRT_NUP_ORDER_TBLR 1 +#define SV_PRINT_PRT_NUP_ORDER_TBRL 2 +#define SV_PRINT_PRT_NUP_ORDER_RLTB 3 + +#define SV_PRINT_TAB_JOB 2 +#define SV_PRINT_PRINTERS_FL 1 +#define SV_PRINT_PRINTERS 2 +#define SV_PRINT_PRT_SETUP 3 +#define SV_PRINT_RANGE 4 +#define SV_PRINT_ALL 5 +#define SV_PRINT_PAGERANGE 6 +#define SV_PRINT_SELECTION 7 +#define SV_PRINT_PAGERANGE_EDIT 8 +#define SV_PRINT_COPIES 9 +#define SV_PRINT_COPYCOUNT 10 +#define SV_PRINT_COPYCOUNT_FIELD 11 +#define SV_PRINT_COLLATE 12 +#define SV_PRINT_COLLATE_IMAGE 13 +#define SV_PRINT_BUTTONLINE 14 +#define SV_PRINT_COLLATE_IMG 15 +#define SV_PRINT_NOCOLLATE_IMG 16 +#define SV_PRINT_COLLATE_HC_IMG 17 +#define SV_PRINT_NOCOLLATE_HC_IMG 18 +#define SV_PRINT_NOPAGES 19 +#define SV_PRINT_STATUS_TXT 20 +#define SV_PRINT_LOCATION_TXT 21 +#define SV_PRINT_COMMENT_TXT 22 +#define SV_PRINT_DETAILS_BTN 23 + +#define SV_PRINT_TAB_OPT 3 +#define SV_PRINT_OPT_PRINT_FL 1 +#define SV_PRINT_OPT_TOFILE 2 +#define SV_PRINT_OPT_SINGLEJOBS 3 +#define SV_PRINT_OPT_REVERSE 4 + +#define SV_DLG_PRINT_PROGRESS 2049 +#define SV_PRINT_PROGRESS_CANCEL 1 +#define SV_PRINT_PROGRESS_TEXT 2 + +#define SV_PRINT_NATIVE_STRINGS 2050 +#define SV_PRINT_NOPRINTERWARNING 2051 +#define SV_PRINT_NOCONTENT 2052 + +#define SV_HELPTEXT_CLOSE 10000 +#define SV_HELPTEXT_MINIMIZE 10001 +#define SV_HELPTEXT_MAXIMIZE 10002 +#define SV_HELPTEXT_RESTORE 10003 +#define SV_HELPTEXT_ROLLDOWN 10004 +#define SV_HELPTEXT_ROLLUP 10005 +#define SV_HELPTEXT_HELP 10006 +#define SV_HELPTEXT_ALWAYSVISIBLE 10007 +#define SV_HELPTEXT_FADEIN 10008 +#define SV_HELPTEXT_FADEOUT 10009 +#define SV_HELPTEXT_SPLITFLOATING 10010 +#define SV_HELPTEXT_SPLITFIXED 10011 +#define SV_HELPTEXT_CLOSEDOCUMENT 10012 + +#define SV_BUTTONTEXT_OK 10100 +#define SV_BUTTONTEXT_CANCEL 10101 +#define SV_BUTTONTEXT_YES 10102 +#define SV_BUTTONTEXT_NO 10103 +#define SV_BUTTONTEXT_RETRY 10104 +#define SV_BUTTONTEXT_HELP 10105 +#define SV_BUTTONTEXT_CLOSE SV_HELPTEXT_CLOSE +#define SV_BUTTONTEXT_MORE 10107 +#define SV_BUTTONTEXT_IGNORE 10108 +#define SV_BUTTONTEXT_ABORT 10109 +#define SV_BUTTONTEXT_LESS 10110 + +#define SV_STDTEXT_FIRST SV_STDTEXT_SERVICENOTAVAILABLE +#define SV_STDTEXT_SERVICENOTAVAILABLE 10200 +#define SV_STDTEXT_DONTHINTAGAIN 10201 +#define SV_STDTEXT_DONTASKAGAIN 10202 +#define SV_STDTEXT_DONTWARNAGAIN 10203 +#define SV_STDTEXT_ABOUT 10204 +#define SV_STDTEXT_PREFERENCES 10205 +#define SV_MAC_SCREENNNAME 10206 +#define SV_STDTEXT_ALLFILETYPES 10207 +#define SV_STDTEXT_LAST SV_STDTEXT_ALLFILETYPES + +#define SV_ACCESSERROR_FIRST SV_ACCESSERROR_WRONG_VERSION +#define SV_ACCESSERROR_WRONG_VERSION 10500 +#define SV_ACCESSERROR_BRIDGE_MSG 10501 +#define SV_ACCESSERROR_OK_CANCEL_MSG 10502 +#define SV_ACCESSERROR_MISSING_BRIDGE 10503 +#define SV_ACCESSERROR_FAULTY_JAVA 10504 +#define SV_ACCESSERROR_JAVA_MSG 10505 +#define SV_ACCESSERROR_MISSING_JAVA 10506 +#define SV_ACCESSERROR_JAVA_NOT_CONFIGURED 10507 +#define SV_ACCESSERROR_JAVA_DISABLED 10508 +#define SV_ACCESSERROR_TURNAROUND_MSG 10509 +#define SV_ACCESSERROR_NO_FONTS 10510 +#define SV_ACCESSERROR_LAST SV_ACCESSERROR_NO_FONTS + +#define SV_SHORTCUT_HELP 10600 +#define SV_SHORTCUT_CONTEXTHELP 10601 +#define SV_SHORTCUT_ACTIVEHELP 10602 +#define SV_SHORTCUT_DOCKUNDOCK 10603 +#define SV_SHORTCUT_NEXTSUBWINDOW 10604 +#define SV_SHORTCUT_PREVSUBWINDOW 10605 +#define SV_SHORTCUT_TODOCUMENT 10606 +#define SV_SHORTCUT_MENUBAR 10607 +#define SV_SHORTCUT_SPLITTER 10608 + +#define SV_EDIT_WARNING_BOX 10650 + +#define SV_FUNIT_STRINGS 10700 + +#define SV_ICON_SIZE48_START 20000 +#define SV_ICON_SIZE32_START 21000 +#define SV_ICON_SIZE16_START 23000 + +#define SV_ICON_LARGE_START 24000 +#define SV_ICON_SMALL_START 25000 +#define SV_ICON_LARGE_HC_START 26000 +#define SV_ICON_SMALL_HC_START 27000 + +#define SV_ICON_ID_OFFICE 1 +#define SV_ICON_ID_TEXT 2 +#define SV_ICON_ID_TEXT_TEMPLATE 3 +#define SV_ICON_ID_SPREADSHEET 4 +#define SV_ICON_ID_SPREADSHEET_TEMPLATE 5 +#define SV_ICON_ID_DRAWING 6 +#define SV_ICON_ID_DRAWING_TEMPLATE 7 +#define SV_ICON_ID_PRESENTATION 8 +#define SV_ICON_ID_PRESENTATION_TEMPLATE 9 +#define SV_ICON_ID_PRESENTATION_COMPRESSED 10 +#define SV_ICON_ID_MASTER_DOCUMENT 11 +#define SV_ICON_ID_HTML_DOCUMENT 12 +#define SV_ICON_ID_CHART 13 +#define SV_ICON_ID_DATABASE 14 +#define SV_ICON_ID_FORMULA 15 +#define SV_ICON_ID_TEMPLATE 16 +#define SV_ICON_ID_MACRO 17 +#define SV_ICON_ID_PRINTERADMIN 501 + +#define HID_PRINTDLG HID_VCL_START + +#endif // _SV_SVIDS_HRC diff --git a/vcl/inc/svsys.h b/vcl/inc/svsys.h new file mode 100644 index 000000000000..df0b58c548ca --- /dev/null +++ b/vcl/inc/svsys.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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 _VCL_SVSYS_H +#define _VCL_SVSYS_H + +#ifdef WNT +#include "win/svsys.h" +#elif defined QUARTZ +#include "aqua/svsys.h" +#elif defined OS2 +#include "os2/svsys.h" +#else +#include "unx/svsys.h" +#endif + + +#endif diff --git a/vcl/inc/textlayout.hxx b/vcl/inc/textlayout.hxx new file mode 100644 index 000000000000..418e1aa8bf64 --- /dev/null +++ b/vcl/inc/textlayout.hxx @@ -0,0 +1,136 @@ +/************************************************************************* + * + * 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 VCL_TEXTLAYOUT_HXX +#define VCL_TEXTLAYOUT_HXX + +#include "vcl/outdev.hxx" + +#include +#include + +#include + +class Control; + +//........................................................................ +namespace vcl +{ +//........................................................................ + + //==================================================================== + //= ITextLayout + //==================================================================== + class SAL_NO_VTABLE ITextLayout + { + public: + virtual long GetTextWidth( const XubString& _rText, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const = 0; + virtual void DrawText( const Point& _rStartPoint, const XubString& _rText, xub_StrLen _nStartIndex, xub_StrLen _nLength, + MetricVector* _pVector, String* _pDisplayText ) = 0; + virtual bool GetCaretPositions( const XubString& _rText, sal_Int32* _pCaretXArray, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const = 0; + virtual xub_StrLen GetTextBreak( const XubString& _rText, long _nMaxTextWidth, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const = 0; + virtual bool DecomposeTextRectAction() const = 0; + }; + + //==================================================================== + //= DefaultTextLayout + //==================================================================== + /** is an implementation of the ITextLayout interface which simply delegates its calls to the respective + methods of an OutputDevice instance, without any inbetween magic. + */ + class DefaultTextLayout : public ITextLayout + { + public: + DefaultTextLayout( OutputDevice& _rTargetDevice ) + :m_rTargetDevice( _rTargetDevice ) + { + } + virtual ~DefaultTextLayout(); + + // ITextLayout overridables + virtual long GetTextWidth( + const XubString& _rText, + xub_StrLen _nStartIndex, + xub_StrLen _nLength + ) const; + virtual void DrawText( + const Point& _rStartPoint, + const XubString& _rText, + xub_StrLen _nStartIndex, + xub_StrLen _nLength, + MetricVector* _pVector, + String* _pDisplayText + ); + virtual bool GetCaretPositions( + const XubString& _rText, + sal_Int32* _pCaretXArray, + xub_StrLen _nStartIndex, + xub_StrLen _nLength + ) const; + virtual xub_StrLen GetTextBreak( + const XubString& _rText, + long _nMaxTextWidth, + xub_StrLen _nStartIndex, + xub_StrLen _nLength + ) const; + virtual bool DecomposeTextRectAction() const; + + private: + OutputDevice& m_rTargetDevice; + }; + + //==================================================================== + //= ControlTextRenderer + //==================================================================== + class ReferenceDeviceTextLayout; + /** a class which allows rendering text of a Control onto a device, by taking into account the metrics of + a reference device. + */ + class ControlTextRenderer + { + public: + ControlTextRenderer( const Control& _rControl, OutputDevice& _rTargetDevice, OutputDevice& _rReferenceDevice ); + virtual ~ControlTextRenderer(); + + Rectangle DrawText( const Rectangle& _rRect, + const XubString& _rText, USHORT _nStyle = 0, + MetricVector* _pVector = NULL, String* _pDisplayText = NULL ); + + private: + ControlTextRenderer(); // never implemented + ControlTextRenderer( const ControlTextRenderer& ); // never implemented + ControlTextRenderer& operator=( const ControlTextRenderer& ); // never implemented + + private: + ::std::auto_ptr< ReferenceDeviceTextLayout > m_pImpl; + }; + +//........................................................................ +} // namespace vcl +//........................................................................ + +#endif // VCL_TEXTLAYOUT_HXX diff --git a/vcl/inc/toolbox.h b/vcl/inc/toolbox.h new file mode 100644 index 000000000000..7cdeb0b17a5a --- /dev/null +++ b/vcl/inc/toolbox.h @@ -0,0 +1,182 @@ +/************************************************************************* + * + * 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 _SV_TOOLBOX_H +#define _SV_TOOLBOX_H + +#include +#include +#include +#include +#include +#include +#include + +#include + +#define TB_DROPDOWNARROWWIDTH 11 + +#define TB_MENUBUTTON_SIZE 12 +#define TB_MENUBUTTON_OFFSET 2 + +#define TB_SMALLIMAGESIZE 16 + +#define TB_LARGEIMAGESIZE 26 +#define TB_LARGEIMAGESIZE_INDUSTRIAL 24 +#define TB_LARGEIMAGESIZE_CRYSTAL 22 +#define TB_LARGEIMAGESIZE_OXYGEN 22 + +class Window; + +// ---------------- +// - ImplToolItem - +// ---------------- + +struct ImplToolItem +{ + Window* mpWindow; + void* mpUserData; + Image maImage; + Image maHighImage; + long mnImageAngle; + bool mbMirrorMode; + XubString maText; + XubString maQuickHelpText; + XubString maHelpText; + String maCommandStr; + rtl::OString maHelpId; + Rectangle maRect; + Rectangle maCalcRect; + // the overall horizontal item size, including one or more of [image size + textlength + dropdown arrow] + Size maItemSize; + long mnSepSize; + long mnDropDownArrowWidth; + ToolBoxItemType meType; + ToolBoxItemBits mnBits; + TriState meState; + USHORT mnId; + BOOL mbEnabled:1, + mbVisible:1, + mbEmptyBtn:1, + mbShowWindow:1, + mbBreak:1, + mbVisibleText:1; // indicates if text will definitely be drawn, influences dropdown pos + + ImplToolItem(); + ImplToolItem( USHORT nItemId, const Image& rImage, + ToolBoxItemBits nItemBits ); + ImplToolItem( USHORT nItemId, const XubString& rTxt, + ToolBoxItemBits nItemBits ); + ImplToolItem( USHORT nItemId, const Image& rImage, + const XubString& rTxt, + ToolBoxItemBits nItemBits ); + ~ImplToolItem(); + + ImplToolItem( const ImplToolItem& ); + ImplToolItem& operator=(const ImplToolItem&); + + // returns the size of a item, taking toolbox orientation into account + // the default size is the precomputed size for standard items + // ie those that are just ordinary buttons (no windows or text etc.) + // bCheckMaxWidth indicates that item windows must not exceed maxWidth in which case they will be painted as buttons + Size GetSize( BOOL bHorz, BOOL bCheckMaxWidth, long maxWidth, const Size& rDefaultSize ); + + // only useful for buttons: returns if the text or image part or both can be drawn according to current button drawing style + void DetermineButtonDrawStyle( ButtonType eButtonType, BOOL& rbImage, BOOL& rbText ) const; + + // returns the rectangle which contains the drop down arrow + // or an empty rect if there is none + // bHorz denotes the toolbox alignment + Rectangle GetDropDownRect( BOOL bHorz ) const; + + // returns TRUE if the toolbar item is currently clipped, which can happen for docked toolbars + BOOL IsClipped() const; +}; + +namespace vcl +{ + +struct ToolBoxLayoutData : public ControlLayoutData +{ + std::vector< USHORT > m_aLineItemIds; + std::vector< USHORT > m_aLineItemPositions; +}; + + +} /* namespace vcl */ + + +struct ImplToolBoxPrivateData +{ + vcl::ToolBoxLayoutData* m_pLayoutData; + std::vector< ImplToolItem > m_aItems; + + ImplToolBoxPrivateData(); + ~ImplToolBoxPrivateData(); + + void ImplClearLayoutData() { delete m_pLayoutData; m_pLayoutData = NULL; } + + // called when dropdown items are clicked + Link maDropdownClickHdl; + Timer maDropdownTimer; // for opening dropdown items on "long click" + + // large or small buttons ? + ToolBoxButtonSize meButtonSize; + + // the optional custom menu + PopupMenu* mpMenu; + USHORT maMenuType; + ULONG mnEventId; + + // called when menu button is clicked and before the popup menu is executed + Link maMenuButtonHdl; + + // a dummy item representing the custom menu button + ImplToolItem maMenubuttonItem; + long mnMenuButtonWidth; + + Wallpaper maDisplayBackground; + + // support for highcontrast + vcl::IImageListProvider* mpImageListProvider; + vcl::ImageListType meImageListType; + + BOOL mbIsLocked:1, // keeps last lock state from ImplDockingWindowWrapper + mbAssumeDocked:1, // only used during calculations to override current floating/popup mode + mbAssumeFloating:1, + mbAssumePopupMode:1, + mbKeyInputDisabled:1, // no KEY input if all items disabled, closing/docking will be allowed though + mbIsPaintLocked:1, // don't allow paints + mbMenubuttonSelected:1, // menu button is highlighted + mbPageScroll:1, // determines if we scroll a page at a time + mbNativeButtons:1, // system supports native toolbar buttons + mbWillUsePopupMode:1, // this toolbox will be opened in popup mode + mbDropDownByKeyboard:1; // tells whether a dropdown was started by key input +}; + + +#endif // _SV_TOOLBOX_H diff --git a/vcl/inc/unx/XIM.h b/vcl/inc/unx/XIM.h new file mode 100644 index 000000000000..b00634090b5d --- /dev/null +++ b/vcl/inc/unx/XIM.h @@ -0,0 +1,137 @@ +/************************************************************************* + * + * 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 _XIM_h +#define _XIM_h + +#include +#include + +#ifdef __cplusplus +extern "C" +#endif +XIM XvaOpenIM( Display*, XrmDatabase, char*, char*, ... ); + +extern Status XCloseIM(XIM); + +#ifndef XIMCallback1 +typedef int (*XIMProc1)(XIC, XPointer, XPointer); +typedef struct { + XPointer client_data; + XIMProc1 callback; +} XIMCallback1; +#endif + +typedef struct _XIMAnnotation { + int start_position; + int end_position; + XPointer data; +} XIMAnnotation; + +/* + XIMUText: XIMText extention for UTF16 + */ +typedef struct _XIMUnicodeText { + unsigned short length; + XIMFeedback *feedback; + Bool encoding_is_wchar; + union { + char *multi_byte; + wchar_t *wide_char; + unsigned short *utf16_char; + } string; + unsigned int count_annotations; + XIMAnnotation *annotations; +} XIMUnicodeText; + +/* lookup choice */ +typedef enum { + XIMDrawUpHorizontally = 0 , + XIMDrawUpVertically = 1 +} XIMDrawUpDirection ; + +typedef struct _XIMLookupStartCallbackStruct { + int choice_per_window; /* Number of choices can be display + * in the region + */ + int nrows; + int ncolumns; + XIMDrawUpDirection draw_up_direction; +} XIMLookupStartCallbackStruct; + +typedef struct _XIMUnicodeChoiceObject { + XIMUnicodeText *label; + XIMUnicodeText *value; +} XIMUnicodeChoiceObject; + +typedef struct _XIMLookupDrawCallbackStruct { + XIMUnicodeChoiceObject *choices; /* the lookup choices */ + int n_choices; /* Total number of lookup choices */ + int first_index; + int last_index; + int current_index; + XIMUnicodeText *title; +} XIMLookupDrawCallbackStruct; + +/* Unicode Subset */ +typedef enum { + XIMKatakana, XIMHanzi +} XIMUnicodeCharacterSubsetID; + +typedef struct _XIMUncodeSubset { + XIMUnicodeCharacterSubsetID index; + XIMUnicodeCharacterSubsetID subset_id; + char *name; + Bool is_active; +} XIMUnicodeCharacterSubset; + +typedef struct _XIMUncodeSubsets { + unsigned short count_subsets; + XIMUnicodeCharacterSubset *supported_subsets; +} XIMUnicodeCharacterSubsets; + +typedef struct _XIMSwitchIMNotifyCallbackStruct { + XIMUnicodeCharacterSubset *from; + XIMUnicodeCharacterSubset *to; +} XIMSwitchIMNotifyCallbackStruct; + +/* XIM attributes for multilingual IM extension */ +#define XNMultiLingualInput "multiLingualInput" +#define XNQueryUnicodeCharacterSubset "unicodeCharacterSubset" + +/* XIC attributes for multilingual IM extension */ + +#define XNUnicodeCharacterSubset "UnicodeChararcterSubset" + +#define XNSwitchIMNotifyCallback "switchIMNotifyCallback" +#define XNCommitStringCallback "commitStringCallback" +#define XNForwardEventCallback "forwardEventCallback" + +#define XNLookupStartCallback "lookupStartCallback" +#define XNLookupDrawCallback "lookupDrawCallback" +#define XNLookupDoneCallback "lookupDoneCallback" + +#endif diff --git a/vcl/inc/unx/Xproto.h b/vcl/inc/unx/Xproto.h new file mode 100644 index 000000000000..804b3ffa98cc --- /dev/null +++ b/vcl/inc/unx/Xproto.h @@ -0,0 +1,49 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_VCL_UNX_INC_XPROTO_H +#define INCLUDED_VCL_UNX_INC_XPROTO_H + +#include "sal/config.h" + +#include + +#if defined __GNUC__ +#pragma GCC system_header +#elif defined __SUNPRO_CC +#pragma disable_warn +#endif + +#include + +#if defined __SUNPRO_CC +#pragma enable_warn +#endif + +#include + +#endif diff --git a/vcl/inc/unx/cdeint.hxx b/vcl/inc/unx/cdeint.hxx new file mode 100644 index 000000000000..572f358955c1 --- /dev/null +++ b/vcl/inc/unx/cdeint.hxx @@ -0,0 +1,44 @@ +/************************************************************************* + * + * 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 _SV_CDEINT_HXX +#define _SV_CDEINT_HXX + +#include + +class CDEIntegrator : public DtIntegrator +{ + friend DtIntegrator* DtIntegrator::CreateDtIntegrator(); +private: + CDEIntegrator(); + +public: + virtual ~CDEIntegrator(); + + virtual void GetSystemLook( AllSettings& rSettings ); +}; + +#endif diff --git a/vcl/inc/unx/dtint.hxx b/vcl/inc/unx/dtint.hxx new file mode 100644 index 000000000000..75f197c81e13 --- /dev/null +++ b/vcl/inc/unx/dtint.hxx @@ -0,0 +1,78 @@ +/************************************************************************* + * + * 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 _SV_DTINT_HXX +#define _SV_DTINT_HXX + +#include +#include +#include +#include + +class SalBitmap; +class SalDisplay; +class AllSettings; + +#ifndef _XLIB_H_ +// forwards from X +struct Display; +struct XEvent; +#define Atom UINT32 +#define XLIB_Window UINT32 +#endif + +enum DtType { + DtGeneric, + DtCDE +}; + +class DtIntegrator +{ +protected: + DtType meType; + Display* mpDisplay; + SalDisplay* mpSalDisplay; + int mnSystemLookCommandProcess; + + + DtIntegrator(); + + static String aHomeDir; + +public: + static DtIntegrator* CreateDtIntegrator(); + + virtual ~DtIntegrator(); + + // SystemLook + virtual void GetSystemLook( AllSettings& rSettings ); + + DtType GetDtType() { return meType; } + SalDisplay* GetSalDisplay() { return mpSalDisplay; } + Display* GetDisplay() { return mpDisplay; } +}; + +#endif diff --git a/vcl/inc/unx/gtk/atkbridge.hxx b/vcl/inc/unx/gtk/atkbridge.hxx new file mode 100644 index 000000000000..959b3aec1fb1 --- /dev/null +++ b/vcl/inc/unx/gtk/atkbridge.hxx @@ -0,0 +1,36 @@ +/************************************************************************* + * + * 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 __ATK_BRIDGE_HXX__ +#define __ATK_BRIDGE_HXX__ + +#include + +bool VCL_DLLPUBLIC InitAtkBridge(void); +void VCL_DLLPUBLIC DeInitAtkBridge(void); + +#endif diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx new file mode 100644 index 000000000000..bba4399b76c5 --- /dev/null +++ b/vcl/inc/unx/gtk/gtkdata.hxx @@ -0,0 +1,93 @@ +/************************************************************************* + * + * 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 _VCL_GTKDATA_HXX +#define _VCL_GTKDATA_HXX + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +class GtkData : public X11SalData +{ +public: + GtkData() {} + virtual ~GtkData(); + + virtual void Init(); + + virtual void initNWF(); + virtual void deInitNWF(); +}; + +class GtkSalFrame; + +class GtkSalDisplay : public SalDisplay +{ + GdkDisplay* m_pGdkDisplay; + GdkCursor *m_aCursors[ POINTER_COUNT ]; + bool m_bStartupCompleted; + std::vector< int > m_aXineramaScreenIndexMap; + + GdkCursor* getFromXPM( const char *pBitmap, const char *pMask, + int nWidth, int nHeight, int nXHot, int nYHot ); +public: + GtkSalDisplay( GdkDisplay* pDisplay ); + virtual ~GtkSalDisplay(); + + GdkDisplay* GetGdkDisplay() const { return m_pGdkDisplay; } + + virtual void deregisterFrame( SalFrame* pFrame ); + GdkCursor *getCursor( PointerStyle ePointerStyle ); + virtual int CaptureMouse( SalFrame* pFrame ); + virtual long Dispatch( XEvent *pEvent ); + virtual void initScreen( int nScreen ) const; + + virtual int GetDefaultMonitorNumber() const; + + static GdkFilterReturn filterGdkEvent( GdkXEvent* sys_event, + GdkEvent* event, + gpointer data ); + inline bool HasMoreEvents() { return m_aUserEvents.size() > 1; } + inline void EventGuardAcquire() { osl_acquireMutex( hEventGuard_ ); } + inline void EventGuardRelease() { osl_releaseMutex( hEventGuard_ ); } + void startupNotificationCompleted() { m_bStartupCompleted = true; } + + void screenSizeChanged( GdkScreen* ); + void monitorsChanged( GdkScreen* ); +}; + + +#endif // _VCL_GTKDATA_HXX diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx new file mode 100644 index 000000000000..d6b945068bad --- /dev/null +++ b/vcl/inc/unx/gtk/gtkframe.hxx @@ -0,0 +1,407 @@ +/************************************************************************* + * + * 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 _VCL_GTKFRAME_HXX +#define _VCL_GTKFRAME_HXX + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "tools/link.hxx" + +#include +#include + +class GtkSalGraphics; +class GtkSalDisplay; + +class GtkSalFrame : public SalFrame +{ + static const int nMaxGraphics = 2; + + struct GraphicsHolder + { + GtkSalGraphics* pGraphics; + bool bInUse; + GraphicsHolder() + : pGraphics( NULL ), + bInUse( false ) + {} + ~GraphicsHolder(); + }; + + struct IMHandler + { + //-------------------------------------------------------- + // Not all GTK Input Methods swallow key release + // events. Since they swallow the key press events and we + // are left with the key release events, we need to + // manually swallow those. To do this, we keep a list of + // the previous 10 key press events in each GtkSalFrame + // and when we get a key release that matches one of the + // key press events in our list, we swallow it. + struct PreviousKeyPress + { + GdkWindow *window; + gint8 send_event; + guint32 time; + guint state; + guint keyval; + guint16 hardware_keycode; + guint8 group; + + PreviousKeyPress (GdkEventKey *event) + : window (NULL), + send_event (0), + time (0), + state (0), + keyval (0), + hardware_keycode (0), + group (0) + { + if (event) + { + window = event->window; + send_event = event->send_event; + time = event->time; + state = event->state; + keyval = event->keyval; + hardware_keycode = event->hardware_keycode; + group = event->group; + } + } + + PreviousKeyPress( const PreviousKeyPress& rPrev ) + : window( rPrev.window ), + send_event( rPrev.send_event ), + time( rPrev.time ), + state( rPrev.state ), + keyval( rPrev.keyval ), + hardware_keycode( rPrev.hardware_keycode ), + group( rPrev.group ) + {} + + bool operator== (GdkEventKey *event) const + { + return (event != NULL) + && (event->window == window) + && (event->send_event == send_event) + && (event->state == state) + && (event->keyval == keyval) + && (event->hardware_keycode == hardware_keycode) + && (event->group == group) + && (event->time - time < 3) + ; + } + }; + + + GtkSalFrame* m_pFrame; + std::list< PreviousKeyPress > m_aPrevKeyPresses; + int m_nPrevKeyPresses; // avoid using size() + GtkIMContext* m_pIMContext; + bool m_bFocused; + bool m_bPreeditJustChanged; + SalExtTextInputEvent m_aInputEvent; + std::vector< USHORT > m_aInputFlags; + + IMHandler( GtkSalFrame* ); + ~IMHandler(); + + void createIMContext(); + void deleteIMContext(); + void updateIMSpotLocation(); + void setInputContext( SalInputContext* pContext ); + void endExtTextInput( USHORT nFlags ); + bool handleKeyEvent( GdkEventKey* pEvent ); + void focusChanged( bool bFocusIn ); + + void doCallEndExtTextInput(); + void sendEmptyCommit(); + + + static void signalIMCommit( GtkIMContext*, gchar*, gpointer ); + static gboolean signalIMDeleteSurrounding( GtkIMContext*, gint, gint, gpointer ); + static void signalIMPreeditChanged( GtkIMContext*, gpointer ); + static void signalIMPreeditEnd( GtkIMContext*, gpointer ); + static void signalIMPreeditStart( GtkIMContext*, gpointer ); + static gboolean signalIMRetrieveSurrounding( GtkIMContext*, gpointer ); + }; + friend struct IMHandler; + + int m_nScreen; + GtkWidget* m_pWindow; + GdkWindow* m_pForeignParent; + GdkNativeWindow m_aForeignParentWindow; + GdkWindow* m_pForeignTopLevel; + GdkNativeWindow m_aForeignTopLevelWindow; + Pixmap m_hBackgroundPixmap; + ULONG m_nStyle; + SalExtStyle m_nExtStyle; + GtkFixed* m_pFixedContainer; + GtkSalFrame* m_pParent; + std::list< GtkSalFrame* > m_aChildren; + GdkWindowState m_nState; + SystemEnvData m_aSystemData; + GraphicsHolder m_aGraphics[ nMaxGraphics ]; + USHORT m_nKeyModifiers; + GdkCursor *m_pCurrentCursor; + GdkVisibilityState m_nVisibility; + PointerStyle m_ePointerStyle; + int m_nSavedScreenSaverTimeout; + guint m_nGSMCookie; + int m_nWorkArea; + bool m_bFullscreen; + bool m_bSingleAltPress; + bool m_bDefaultPos; + bool m_bDefaultSize; + bool m_bSendModChangeOnRelease; + bool m_bWindowIsGtkPlug; + bool m_bSetFocusOnMap; + String m_aTitle; + + IMHandler* m_pIMHandler; + + Size m_aMaxSize; + Size m_aMinSize; + Rectangle m_aRestorePosSize; + + GdkRegion* m_pRegion; + + void Init( SalFrame* pParent, ULONG nStyle ); + void Init( SystemParentData* pSysData ); + void InitCommon(); + + // signals + static gboolean signalButton( GtkWidget*, GdkEventButton*, gpointer ); + static void signalStyleSet( GtkWidget*, GtkStyle* pPrevious, gpointer ); + static gboolean signalExpose( GtkWidget*, GdkEventExpose*, gpointer ); + static gboolean signalFocus( GtkWidget*, GdkEventFocus*, gpointer ); + static gboolean signalMap( GtkWidget*, GdkEvent*, gpointer ); + static gboolean signalUnmap( GtkWidget*, GdkEvent*, gpointer ); + static gboolean signalConfigure( GtkWidget*, GdkEventConfigure*, gpointer ); + static gboolean signalMotion( GtkWidget*, GdkEventMotion*, gpointer ); + static gboolean signalKey( GtkWidget*, GdkEventKey*, gpointer ); + static gboolean signalDelete( GtkWidget*, GdkEvent*, gpointer ); + static gboolean signalState( GtkWidget*, GdkEvent*, gpointer ); + static gboolean signalScroll( GtkWidget*, GdkEvent*, gpointer ); + static gboolean signalCrossing( GtkWidget*, GdkEventCrossing*, gpointer ); + static gboolean signalVisibility( GtkWidget*, GdkEventVisibility*, gpointer ); + static void signalDestroy( GtkObject*, gpointer ); + + void Center(); + void SetDefaultSize(); + void setAutoLock( bool bLock ); + void setScreenSaverTimeout( int nTimeout ); + + void doKeyCallback( guint state, + guint keyval, + guint16 hardware_keycode, + guint8 group, + guint32 time, + sal_Unicode aOrigCode, + bool bDown, + bool bSendRelease + ); + + + GdkNativeWindow findTopLevelSystemWindow( GdkNativeWindow aWindow ); + + static int m_nFloats; + + bool isFloatGrabWindow() const + { + return + (m_nStyle & SAL_FRAME_STYLE_FLOAT) && // only a float can be floatgrab + !(m_nStyle & SAL_FRAME_STYLE_TOOLTIP) && // tool tips are not + !(m_nStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) && // toolbars are also not + !(m_nStyle & SAL_FRAME_STYLE_FLOAT_FOCUSABLE); // focusable floats are not + } + + bool isChild( bool bPlug = true, bool bSysChild = true ) + { + ULONG nMask = 0; + if( bPlug ) + nMask |= SAL_FRAME_STYLE_PLUG; + if( bSysChild ) + nMask |= SAL_FRAME_STYLE_SYSTEMCHILD; + return (m_nStyle & nMask) != 0; + } + + void resizeWindow( long nWidth, long nHeight ); + void moveWindow( long nX, long nY ); + + Size calcDefaultSize(); + + void setMinMaxSize(); + void createNewWindow( XLIB_Window aParent, bool bXEmbed, int nScreen ); + void askForXEmbedFocus( sal_Int32 nTimecode ); + + DECL_LINK( ImplDelayedFullScreenHdl, void* ); +public: + GtkSalFrame( SalFrame* pParent, ULONG nStyle ); + GtkSalFrame( SystemParentData* pSysData ); + + // dispatches an event, returns true if dispatched + // and false else; if true was returned the event should + // be swallowed + bool Dispatch( const XEvent* pEvent ); + void grabPointer( BOOL bGrab, BOOL bOwnerEvents = FALSE ); + + GtkSalDisplay* getDisplay(); + GdkDisplay* getGdkDisplay(); + GtkWidget* getWindow() const { return m_pWindow; } + GtkFixed* getFixedContainer() const { return m_pFixedContainer; } + GdkWindow* getForeignParent() const { return m_pForeignParent; } + GdkNativeWindow getForeignParentWindow() const { return m_aForeignParentWindow; } + GdkWindow* getForeignTopLevel() const { return m_pForeignTopLevel; } + GdkNativeWindow getForeignTopLevelWindow() const { return m_aForeignTopLevelWindow; } + GdkVisibilityState getVisibilityState() const + { return m_nVisibility; } + Pixmap getBackgroundPixmap() const { return m_hBackgroundPixmap; } + int getScreenNumber() const { return m_nScreen; } + void updateScreenNumber(); + + void moveToScreen( int nScreen ); + + virtual ~GtkSalFrame(); + + // SalGraphics or NULL, but two Graphics for all SalFrames + // must be returned + virtual SalGraphics* GetGraphics(); + virtual void ReleaseGraphics( SalGraphics* pGraphics ); + + // Event must be destroyed, when Frame is destroyed + // When Event is called, SalInstance::Yield() must be returned + virtual BOOL PostEvent( void* pData ); + + virtual void SetTitle( const XubString& rTitle ); + virtual void SetIcon( USHORT nIcon ); + virtual void SetMenu( SalMenu *pSalMenu ); + virtual void DrawMenuBar(); + + virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ); + // Before the window is visible, a resize event + // must be sent with the correct size + virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE ); + virtual void Enable( BOOL bEnable ); + // Set ClientSize and Center the Window to the desktop + // and send/post a resize message + virtual void SetMinClientSize( long nWidth, long nHeight ); + virtual void SetMaxClientSize( long nWidth, long nHeight ); + virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ); + virtual void GetClientSize( long& rWidth, long& rHeight ); + virtual void GetWorkArea( Rectangle& rRect ); + virtual SalFrame* GetParent() const; + virtual void SetWindowState( const SalFrameState* pState ); + virtual BOOL GetWindowState( SalFrameState* pState ); + virtual void ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay ); + // Enable/Disable ScreenSaver, SystemAgents, ... + virtual void StartPresentation( BOOL bStart ); + // Show Window over all other Windows + virtual void SetAlwaysOnTop( BOOL bOnTop ); + + // Window to top and grab focus + virtual void ToTop( USHORT nFlags ); + + // this function can call with the same + // pointer style + virtual void SetPointer( PointerStyle ePointerStyle ); + virtual void CaptureMouse( BOOL bMouse ); + virtual void SetPointerPos( long nX, long nY ); + + // flush output buffer + using SalFrame::Flush; + virtual void Flush(); + // flush output buffer, wait till outstanding operations are done + virtual void Sync(); + + virtual void SetInputContext( SalInputContext* pContext ); + virtual void EndExtTextInput( USHORT nFlags ); + + virtual String GetKeyName( USHORT nKeyCode ); + virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode ); + virtual BOOL MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); + + // returns the input language used for the last key stroke + // may be LANGUAGE_DONTKNOW if not supported by the OS + virtual LanguageType GetInputLanguage(); + + virtual SalBitmap* SnapShot(); + + virtual void UpdateSettings( AllSettings& rSettings ); + + virtual void Beep( SoundType eSoundType ); + + // returns system data (most prominent: window handle) + virtual const SystemEnvData* GetSystemData() const; + + + // get current modifier and button mask + virtual SalPointerState GetPointerState(); + + // set new parent window + virtual void SetParent( SalFrame* pNewParent ); + // reparent window to act as a plugin; implementation + // may choose to use a new system window internally + // return false to indicate failure + virtual bool SetPluginParent( SystemParentData* pNewParent ); + + virtual void SetBackgroundBitmap( SalBitmap* ); + + virtual void SetScreenNumber( unsigned int ); + + // shaped system windows + // set clip region to none (-> rectangular windows, normal state) + virtual void ResetClipRegion(); + // start setting the clipregion consisting of nRects rectangles + virtual void BeginSetClipRegion( ULONG nRects ); + // add a rectangle to the clip region + virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); + // done setting up the clipregion + virtual void EndSetClipRegion(); + + static GtkSalFrame *getFromWindow( GtkWindow *pWindow ); +}; + + +#define OOO_TYPE_FIXED ooo_fixed_get_type() + +extern "C" { + +GType ooo_fixed_get_type( void ); + +} // extern "C" + +#endif //_VCL_GTKFRAME_HXX diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx new file mode 100644 index 000000000000..c6ba3c2fcdb5 --- /dev/null +++ b/vcl/inc/unx/gtk/gtkgdi.hxx @@ -0,0 +1,183 @@ +/************************************************************************* + * + * 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 _VCL_GTKGDI_HXX +#define _VCL_GTKGDI_HXX + +#include +#include +#include +#include +#include + +#include + +class GtkSalGraphics : public X11SalGraphics +{ + GtkWidget *m_pWindow; + Region m_aClipRegion; + +public: + GtkSalGraphics( GtkWidget *window ) + : m_pWindow( window ), + m_aClipRegion( REGION_NULL ) + {} + virtual ~GtkSalGraphics(); + + inline GtkWidget* GetGtkWidget() const { return m_pWindow; } + inline GdkWindow* GetGdkWindow() const { return m_pWindow->window; } + inline GtkSalFrame* GetGtkFrame() const { return static_cast(m_pFrame); } + void SetWindow( GtkWidget* window ) { m_pWindow = window; } + + + // will be set when UI theme was changed + static BOOL bThemeChanged; + static BOOL bNeedPixmapPaint; + static BOOL bGlobalNeedPixmapPaint; + static BOOL bToolbarGripWorkaround; + static BOOL bNeedButtonStyleAsEditBackgroundWorkaround; + + // native widget methods + virtual BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart ); + virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + const Point& aPos, BOOL& rIsInside ); + virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + ControlState nState, const ImplControlValue& aValue, + const rtl::OUString& rCaption ); + virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + ControlState nState, const ImplControlValue& aValue, + const rtl::OUString& rCaption ); + virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, + const ImplControlValue& aValue, const rtl::OUString& rCaption, + Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ); + + //helper methods for frame's UpdateSettings + void updateSettings( AllSettings& rSettings ); + + virtual void ResetClipRegion(); + virtual void BeginSetClipRegion( ULONG nCount ); + virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ); + virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ); + virtual void EndSetClipRegion(); + + // some themes set the background pixmap of our window EVERY time + // a control is painted; but presentation effects need + // the background set to None; workaround: set the background + // before copyBits + virtual void copyBits( const SalTwoRect* pPosAry, + SalGraphics* pSrcGraphics ); + +protected: + typedef std::list< Rectangle > clipList; + + GdkPixmap* NWGetPixmapFromScreen( Rectangle srcRect ); + BOOL NWRenderPixmapToScreen( GdkPixmap* pPixmap, Rectangle dstRect ); + + BOOL NWPaintGTKButton( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + const Rectangle& rControlRectangle, + const clipList& rClipList, + ControlState nState, const ImplControlValue& aValue, + const OUString& rCaption ); + BOOL NWPaintGTKRadio( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + const Rectangle& rControlRectangle, + const clipList& rClipList, + ControlState nState, const ImplControlValue& aValue, + const OUString& rCaption ); + BOOL NWPaintGTKCheck( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + const Rectangle& rControlRectangle, + const clipList& rClipList, + ControlState nState, const ImplControlValue& aValue, + const OUString& rCaption ); + BOOL NWPaintGTKScrollbar( ControlType nType, ControlPart nPart, + const Rectangle& rControlRectangle, + const clipList& rClipList, + ControlState nState, const ImplControlValue& aValue, + const OUString& rCaption ); + BOOL NWPaintGTKEditBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + const Rectangle& rControlRectangle, + const clipList& rClipList, + ControlState nState, const ImplControlValue& aValue, + const OUString& rCaption ); + BOOL NWPaintGTKSpinBox( ControlType nType, ControlPart nPart, + const Rectangle& rControlRectangle, + const clipList& rClipList, + ControlState nState, const ImplControlValue& aValue, + const OUString& rCaption ); + BOOL NWPaintGTKComboBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + const Rectangle& rControlRectangle, + const clipList& rClipList, + ControlState nState, const ImplControlValue& aValue, + const OUString& rCaption ); + BOOL NWPaintGTKTabItem( ControlType nType, ControlPart nPart, + const Rectangle& rControlRectangle, + const clipList& rClipList, + ControlState nState, const ImplControlValue& aValue, + const OUString& rCaption ); + BOOL NWPaintGTKListBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + const Rectangle& rControlRectangle, + const clipList& rClipList, + ControlState nState, const ImplControlValue& aValue, + const OUString& rCaption ); + + BOOL NWPaintGTKToolbar( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + const Rectangle& rControlRectangle, + const clipList& rClipList, + ControlState nState, const ImplControlValue& aValue, + const OUString& rCaption ); + BOOL NWPaintGTKMenubar( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + const Rectangle& rControlRectangle, + const clipList& rClipList, + ControlState nState, const ImplControlValue& aValue, + const OUString& rCaption ); + BOOL NWPaintGTKPopupMenu( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + const Rectangle& rControlRectangle, + const clipList& rClipList, + ControlState nState, const ImplControlValue& aValue, + const OUString& rCaption ); + BOOL NWPaintGTKTooltip( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + const Rectangle& rControlRectangle, + const clipList& rClipList, + ControlState nState, const ImplControlValue& aValue, + const OUString& rCaption ); + BOOL NWPaintGTKProgress( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + const Rectangle& rControlRectangle, + const clipList& rClipList, + ControlState nState, const ImplControlValue& aValue, + const OUString& rCaption ); + BOOL NWPaintGTKSlider( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + const Rectangle& rControlRectangle, + const clipList& rClipList, + ControlState nState, const ImplControlValue& aValue, + const OUString& rCaption ); + BOOL NWPaintGTKListNode( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + const Rectangle& rControlRectangle, + const clipList& rClipList, + ControlState nState, const ImplControlValue& aValue, + const OUString& rCaption ); +}; + +#endif // _VCL_GTKGDI_HXX diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx new file mode 100644 index 000000000000..fc3bd1f07ce1 --- /dev/null +++ b/vcl/inc/unx/gtk/gtkinst.hxx @@ -0,0 +1,105 @@ +/************************************************************************* + * + * 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 _VCL_GTKINST_HXX +#define _VCL_GTKINST_HXX + +#include +#include + +class GtkYieldMutex : public SalYieldMutex +{ +public: + GtkYieldMutex(); + virtual void acquire(); + virtual void release(); + virtual sal_Bool tryToAcquire(); + + virtual int Grab(); + virtual void Ungrab( int ); + + class GtkYieldGuard + { + GtkYieldMutex* m_pMutex; + int m_nGrab; + public: + GtkYieldGuard( GtkYieldMutex* pMutex ) + : m_pMutex( pMutex ) + { + m_nGrab = m_pMutex->Grab(); + } + ~GtkYieldGuard() + { + m_pMutex->Ungrab( m_nGrab ); + } + }; +}; + +class GtkHookedYieldMutex : public GtkYieldMutex +{ + virtual int Grab() { return 0; }; + virtual void Ungrab(int ) {}; + std::list aYieldStack; +public: + GtkHookedYieldMutex(); + virtual void acquire(); + virtual void release(); + virtual sal_Bool tryToAcquire() { return SalYieldMutex::tryToAcquire(); } + void ThreadsEnter(); + void ThreadsLeave(); +}; + + +#define GTK_YIELD_GRAB() GtkYieldMutex::GtkYieldGuard aLocalGtkYieldGuard( static_cast(GetSalData()->m_pInstance->GetYieldMutex()) ) + +class GtkInstance : public X11SalInstance +{ +public: + GtkInstance( SalYieldMutex* pMutex ) + : X11SalInstance( pMutex ) + {} + virtual ~GtkInstance(); + + virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle ); + virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle ); + virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE ); + virtual SalSystem* CreateSalSystem(); + virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType); +}; + +class GtkSalSystem : public X11SalSystem +{ +public: + GtkSalSystem() : X11SalSystem() {} + virtual ~GtkSalSystem(); + virtual int ShowNativeDialog( const String& rTitle, + const String& rMessage, + const std::list< String >& rButtons, + int nDefButton ); +}; + +#endif // _VCL_GTKINST_HXX diff --git a/vcl/inc/unx/gtk/gtkobject.hxx b/vcl/inc/unx/gtk/gtkobject.hxx new file mode 100644 index 000000000000..fde53cfd8dcb --- /dev/null +++ b/vcl/inc/unx/gtk/gtkobject.hxx @@ -0,0 +1,70 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _VCL_GTKOBJECT_HXX +#define _VCL_GTKOBJECT_HXX + +#include +#include +#include +#include + +class GtkSalObject : public SalObject +{ + SystemChildData m_aSystemData; + GtkWidget* m_pSocket; + GdkRegion* m_pRegion; + + // signals + static gboolean signalButton( GtkWidget*, GdkEventButton*, gpointer ); + static gboolean signalFocus( GtkWidget*, GdkEventFocus*, gpointer ); + static void signalDestroy( GtkObject*, gpointer ); +public: + GtkSalObject( GtkSalFrame* pParent, BOOL bShow = TRUE ); + virtual ~GtkSalObject(); + + // overload all pure virtual methods + virtual void ResetClipRegion(); + virtual USHORT GetClipRegionType(); + virtual void BeginSetClipRegion( ULONG nRects ); + virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); + virtual void EndSetClipRegion(); + + virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ); + virtual void Show( BOOL bVisible ); + virtual void Enable( BOOL nEnable ); + virtual void GrabFocus(); + + virtual void SetBackground(); + virtual void SetBackground( SalColor nSalColor ); + + virtual const SystemEnvData* GetSystemData() const; + + virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ); +}; + +#endif // _SV_SALOBJ_H diff --git a/vcl/inc/unx/i18n_cb.hxx b/vcl/inc/unx/i18n_cb.hxx new file mode 100644 index 000000000000..72579282c40b --- /dev/null +++ b/vcl/inc/unx/i18n_cb.hxx @@ -0,0 +1,95 @@ +/************************************************************************* + * + * 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 _SAL_I18N_CALLBACK_HXX +#define _SAL_I18N_CALLBACK_HXX + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +// for iiimp / ml input +int CommitStringCallback( XIC ic, XPointer client_data, XPointer call_data); + +// xim callbacks +void PreeditDoneCallback ( XIC ic, XPointer client_data, XPointer call_data); +int PreeditStartCallback( XIC ic, XPointer client_data, XPointer call_data); +void PreeditDoneCallback ( XIC ic, XPointer client_data, XPointer call_data); +void PreeditDrawCallback ( XIC ic, XPointer client_data, + XIMPreeditDrawCallbackStruct *call_data ); +void PreeditCaretCallback( XIC ic, XPointer client_data, + XIMPreeditCaretCallbackStruct *call_data ); +void GetPreeditSpotLocation(XIC ic, XPointer client_data); + +// private hook to prevent from sending further edit events +void PreeditCancelCallback( XPointer client_data ); + +void StatusStartCallback (XIC ic, XPointer client_data, XPointer call_data); +void StatusDoneCallback (XIC ic, XPointer client_data, XPointer call_data); +void StatusDrawCallback (XIC ic, XPointer client_data, + XIMStatusDrawCallbackStruct *call_data); +void SwitchIMCallback (XIC ix, XPointer client_data, XPointer call_data ); + +// keep informed if kinput2 crashed again +void IC_IMDestroyCallback (XIM im, XPointer client_data, XPointer call_data); +void IM_IMDestroyCallback (XIM im, XPointer client_data, XPointer call_data); + +Bool IsControlCode(sal_Unicode nChar); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +typedef struct { + sal_Unicode *pUnicodeBuffer; + XIMFeedback *pCharStyle; + unsigned int nCursorPos; + unsigned int nLength; + unsigned int nSize; +} preedit_text_t; + +class SalFrame; + +typedef enum { + ePreeditStatusDontKnow = 0, + ePreeditStatusActive, + ePreeditStatusActivationRequired, + ePreeditStatusStartPending +} preedit_status_t; + +typedef struct { + SalFrame* pFrame; + Bool bIsMultilingual; + preedit_status_t eState; + preedit_text_t aText; + SalExtTextInputEvent aInputEv; + std::vector< USHORT > aInputFlags; +} preedit_data_t; + +#endif /* _SAL_I18N_CALLBACK_HXX */ diff --git a/vcl/inc/unx/i18n_ic.hxx b/vcl/inc/unx/i18n_ic.hxx new file mode 100644 index 000000000000..2fb97a00b6f2 --- /dev/null +++ b/vcl/inc/unx/i18n_ic.hxx @@ -0,0 +1,100 @@ +/************************************************************************* + * + * 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 _SAL_I18N_INPUTCONTEXT_HXX +#define _SAL_I18N_INPUTCONTEXT_HXX + +#include +#include "i18n_cb.hxx" + +class SalI18N_InputContext +{ + +private: + + Bool mbUseable; // system supports current locale ? + Bool mbMultiLingual; // system supports iiimp ? + XIC maContext; + + XIMStyle mnSupportedStatusStyle; + XIMStyle mnSupportedPreeditStyle; + XIMStyle mnStatusStyle; + XIMStyle mnPreeditStyle; + + preedit_data_t maClientData; + XIMCallback maPreeditStartCallback; + XIMCallback maPreeditDoneCallback; + XIMCallback maPreeditDrawCallback; + XIMCallback maPreeditCaretCallback; + XIMCallback maCommitStringCallback; + XIMCallback maSwitchIMCallback; + XIMCallback maDestroyCallback; + + XVaNestedList mpAttributes; + XVaNestedList mpStatusAttributes; + XVaNestedList mpPreeditAttributes; + + Bool SupportInputMethodStyle( XIMStyles *pIMStyles ); + unsigned int GetWeightingOfIMStyle( XIMStyle n_style ) const ; + Bool IsSupportedIMStyle( XIMStyle n_style ) const ; + +public: + + Bool UseContext() { return mbUseable; } + Bool IsMultiLingual() { return mbMultiLingual; } + Bool IsPreeditMode() { return maClientData.eState == ePreeditStatusActive; } + XIC GetContext() { return maContext; } + + void ExtendEventMask( XLIB_Window aFocusWindow ); + void SetICFocus( SalFrame* pFocusFrame ); + void UnsetICFocus( SalFrame* pFrame ); + void HandleDestroyIM(); + + int HandleKeyEvent( XKeyEvent *pEvent, SalFrame *pFrame ); // unused + void EndExtTextInput( USHORT nFlags ); // unused + int CommitStringCallback( sal_Unicode* pText, sal_Size nLength ); + int CommitKeyEvent( sal_Unicode* pText, sal_Size nLength ); + int UpdateSpotLocation(); + + void Map( SalFrame *pFrame ); + void Unmap( SalFrame* pFrame ); + + void SetPreeditState(Bool aPreeditState); + void SetLanguage(LanguageType aInputLanguage); + + SalI18N_InputContext( SalFrame *aFrame ); + ~SalI18N_InputContext(); + +private: + + SalI18N_InputContext(); // do not use this + +}; + +#endif // _SAL_I18N_INPUTCONTEXT_HXX + + diff --git a/vcl/inc/unx/i18n_im.hxx b/vcl/inc/unx/i18n_im.hxx new file mode 100644 index 000000000000..a22a57b976c8 --- /dev/null +++ b/vcl/inc/unx/i18n_im.hxx @@ -0,0 +1,65 @@ +/************************************************************************* + * + * 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 _SAL_I18N_INPUTMETHOD_HXX +#define _SAL_I18N_INPUTMETHOD_HXX + +#include + +extern "C" char* GetMethodName( XIMStyle nStyle, char *pBuf, int nBufSize); + +#define bUseInputMethodDefault True + +class VCL_DLLPUBLIC SalI18N_InputMethod +{ + Bool mbUseable; // system supports locale as well as status + // and preedit style ? + Bool mbMultiLingual; // system supports iiimp + XIM maMethod; + XIMCallback maDestroyCallback; + XIMStyles *mpStyles; + +public: + + Bool IsMultiLingual() { return mbMultiLingual; } + Bool PosixLocale(); + Bool UseMethod() { return mbUseable; } + XIM GetMethod() { return maMethod; } + void HandleDestroyIM(); + Bool CreateMethod( Display *pDisplay ); + XIMStyles *GetSupportedStyles() { return mpStyles; } + Bool SetLocale( const char* pLocale = "" ); + Bool FilterEvent( XEvent *pEvent, XLIB_Window window ); + Bool AddConnectionWatch (Display *pDisplay, void *pConnectionHandler); + + SalI18N_InputMethod(); + ~SalI18N_InputMethod(); +}; + +#endif // _SAL_I18N_INPUTMETHOD_HXX + + diff --git a/vcl/inc/unx/i18n_keysym.hxx b/vcl/inc/unx/i18n_keysym.hxx new file mode 100644 index 000000000000..641d00dc02c0 --- /dev/null +++ b/vcl/inc/unx/i18n_keysym.hxx @@ -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. + * + ************************************************************************/ + +#ifndef _SAL_I18N_KEYSYM_HXX +#define _SAL_I18N_KEYSYM_HXX + +/* + convert a keysym as defined in /usr/{X11R6|openwin}/include/X11/keysymdef.h + to unicode + + supported charsets: (byte1 and byte2 are always 0x0) + + Latin-1 Byte 3 = 0x00 + Latin-2 Byte 3 = 0x01 + Latin-3 Byte 3 = 0x02 + Latin-4 Byte 3 = 0x03 + Kana Byte 3 = 0x04 + Arabic Byte 3 = 0x05 + Cyrillic Byte 3 = 0x06 + Greek Byte 3 = 0x07 + Technical Byte 3 = 0x08 + Special Byte 3 = 0x09 + Publishing Byte 3 = 0x0a = 10 + APL Byte 3 = 0x0b = 11 + Hebrew Byte 3 = 0x0c = 12 + Thai Byte 3 = 0x0d = 13 + Korean Byte 3 = 0x0e = 14 + Latin-9 Byte 3 = 0x13 = 19 + Currency Byte 3 = 0x20 = 32 + Keyboard Byte 3 = 0xff = 255 + + missing charsets: + + Latin-8 Byte 3 = 0x12 = 18 + Armenian Byte 3 = 0x14 = 20 + Georgian Byte 3 = 0x15 = 21 + Azeri Byte 3 = 0x16 = 22 + Vietnamese Byte 3 = 0x1e = 30 + + of course not all keysyms can be mapped to a unicode code point +*/ + +sal_Unicode KeysymToUnicode (KeySym nKeySym); + +#endif /* _SAL_I18N_KEYSYM_HXX */ + + diff --git a/vcl/inc/unx/i18n_status.hxx b/vcl/inc/unx/i18n_status.hxx new file mode 100644 index 000000000000..46e4e48f76e1 --- /dev/null +++ b/vcl/inc/unx/i18n_status.hxx @@ -0,0 +1,124 @@ +/************************************************************************* + * + * 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 _SAL_I18N_STATUS_HXX +#define _SAL_I18N_STATUS_HXX + +#include +#include +#include + +#include + +#include + +#include + +class SalFrame; +class WorkWindow; +class ListBox; +class FixedText; +class PushButton; +class SalI18N_InputContext; + +namespace vcl +{ + +class StatusWindow; + +class X11ImeStatus : public SalI18NImeStatus +{ +public: + X11ImeStatus() {} + virtual ~X11ImeStatus(); + + virtual bool canToggle(); + virtual void toggle(); +}; + +class I18NStatus +{ +public: + struct ChoiceData + { + String aString; + void* pData; + }; +private: + SalFrame* m_pParent; + StatusWindow* m_pStatusWindow; + String m_aCurrentIM; + ::std::vector< ChoiceData > m_aChoices; + + I18NStatus(); + ~I18NStatus(); + + static I18NStatus* pInstance; + + static bool getStatusWindowMode(); + +public: + static I18NStatus& get(); + static bool exists(); + static void free(); + + void setParent( SalFrame* pParent ); + SalFrame* getParent() const { return m_pParent; } + SalFrame* getStatusFrame() const; + + void setStatusText( const String& rText ); + String getStatusText() const; + + enum ShowReason { focus, presentation, contextmap }; + void show( bool bShow, ShowReason eReason ); + + const ::std::vector< ChoiceData >& getChoices() const { return m_aChoices; } + void clearChoices(); + void addChoice( const String&, void* pData ); + + void toTop() const; + + // for SwitchIMCallback + void changeIM( const String& ); + + // External Control: + + /** Return true if the status window can be toggled on and off externally. + */ + bool canToggleStatusWindow() const; + + /** Toggle the status window on or off. + + This only works if canToggleStatusWindow returns true (otherwise, any + calls of this method are ignored). + */ + void toggleStatusWindow(); +}; + +} // namespace + +#endif // _SAL_I18N_STATUS_HXX diff --git a/vcl/inc/unx/i18n_xkb.hxx b/vcl/inc/unx/i18n_xkb.hxx new file mode 100644 index 000000000000..db6517cbea0b --- /dev/null +++ b/vcl/inc/unx/i18n_xkb.hxx @@ -0,0 +1,115 @@ +/************************************************************************* + * + * 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 _SAL_I18N_XKBDEXTENSION_HXX +#define _SAL_I18N_XKBDEXTENSION_HXX + +#include +#include + +class VCL_DLLPUBLIC SalI18N_KeyboardExtension +{ +private: + + sal_Bool mbUseExtension; + sal_uInt32 mnDefaultGroup; + sal_uInt32 mnGroup; + int mnEventBase; + int mnErrorBase; + Display* mpDisplay; + +public: + + SalI18N_KeyboardExtension( Display *pDisplay ); + inline ~SalI18N_KeyboardExtension(); + + inline sal_Bool UseExtension() const ; // server and client support the + // extension + inline void UseExtension( sal_Bool bState );// used to disable the Extension + + void Dispatch( XEvent *pEvent ); // keep track of group changes + + sal_uInt32 LookupKeysymInGroup( sal_uInt32 nKeyCode, + sal_uInt32 nShiftState, + sal_uInt32 nGroup ) const ; + + inline sal_uInt32 LookupKeysymInDefaultGroup( + sal_uInt32 nKeyCode, + sal_uInt32 nShiftState ) const ; + inline sal_uInt32 GetGroup() const ; // the current keyboard group + inline sal_uInt32 GetDefaultGroup() const ; // base group, usually group 1 + inline int GetEventBase() const ; + +protected: + + SalI18N_KeyboardExtension(); // disabled +}; + +inline +SalI18N_KeyboardExtension::~SalI18N_KeyboardExtension() +{ +} + +inline sal_Bool +SalI18N_KeyboardExtension::UseExtension() const +{ + return mbUseExtension; +} + +inline void +SalI18N_KeyboardExtension::UseExtension( sal_Bool bState ) +{ + mbUseExtension = mbUseExtension && bState; +} + +inline sal_uInt32 +SalI18N_KeyboardExtension::LookupKeysymInDefaultGroup( sal_uInt32 nKeyCode, + sal_uInt32 nShiftState ) const +{ + return LookupKeysymInGroup( nKeyCode, nShiftState, mnDefaultGroup ); +} + +inline sal_uInt32 +SalI18N_KeyboardExtension::GetGroup() const +{ + return mnGroup; +} + +inline sal_uInt32 +SalI18N_KeyboardExtension::GetDefaultGroup() const +{ + return mnDefaultGroup; +} + +inline int +SalI18N_KeyboardExtension::GetEventBase() const +{ + return mnEventBase; +} + +#endif // _SAL_I18N_XKBDEXTENSION_HXX + diff --git a/vcl/inc/unx/kde/kdedata.hxx b/vcl/inc/unx/kde/kdedata.hxx new file mode 100644 index 000000000000..45640c1a4d43 --- /dev/null +++ b/vcl/inc/unx/kde/kdedata.hxx @@ -0,0 +1,110 @@ +/************************************************************************* + * + * 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 _VCL_KDEDATA_HXX +#define _VCL_KDEDATA_HXX + +#include +#include +#include + +class KDEData : public X11SalData +{ +public: + KDEData() {} + virtual ~KDEData(); + + virtual void Init(); + virtual void initNWF(); + virtual void deInitNWF(); +}; + +class SalKDEDisplay : public SalX11Display +{ +public: + SalKDEDisplay( Display* pDisp ); + virtual ~SalKDEDisplay(); +}; + +class KDESalFrame : public X11SalFrame +{ + static const int nMaxGraphics = 2; + + struct GraphicsHolder + { + X11SalGraphics* pGraphics; + bool bInUse; + GraphicsHolder() + : pGraphics( NULL ), + bInUse( false ) + {} + ~GraphicsHolder(); + }; + GraphicsHolder m_aGraphics[ nMaxGraphics ]; + +public: + KDESalFrame( SalFrame* pParent, ULONG nStyle ); + virtual ~KDESalFrame(); + + virtual SalGraphics* GetGraphics(); + virtual void ReleaseGraphics( SalGraphics *pGraphics ); + virtual void updateGraphics( bool bClear ); + virtual void UpdateSettings( AllSettings& rSettings ); + virtual void Show( BOOL bVisible, BOOL bNoActivate ); +}; + +class KDESalInstance : public X11SalInstance +{ +public: + KDESalInstance( SalYieldMutex* pMutex ) + : X11SalInstance( pMutex ) {} + virtual ~KDESalInstance() {} + virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle ); +}; + +class KDEXLib : public SalXLib +{ + bool m_bStartupDone; + void* m_pApplication; + char** m_pFreeCmdLineArgs; + char** m_pAppCmdLineArgs; + int m_nFakeCmdLineArgs; +public: + KDEXLib() : SalXLib(), + m_bStartupDone( false ), + m_pApplication( NULL ), + m_pFreeCmdLineArgs( NULL ), + m_pAppCmdLineArgs( NULL ), + m_nFakeCmdLineArgs( 0 ) + {} + virtual ~KDEXLib(); + virtual void Init(); + + void doStartup(); +}; + +#endif // _VCL_KDEDATA_HXX diff --git a/vcl/inc/unx/pspgraphics.h b/vcl/inc/unx/pspgraphics.h new file mode 100644 index 000000000000..f0015c301229 --- /dev/null +++ b/vcl/inc/unx/pspgraphics.h @@ -0,0 +1,194 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _VCL_PSPGRAPHICS_H +#define _VCL_PSPGRAPHICS_H + + +#include "vcl/fontmanager.hxx" +#include "vcl/dllapi.h" + +#include "salgdi.hxx" +#include "sallayout.hxx" + +namespace psp { struct JobData; class PrinterGfx; } + +class ServerFont; +class ImplDevFontAttributes; +class SalInfoPrinter; + +class VCL_DLLPUBLIC PspGraphics : public SalGraphics +{ + psp::JobData* m_pJobData; + psp::PrinterGfx* m_pPrinterGfx; + String* m_pPhoneNr; + bool m_bSwallowFaxNo; + String m_aPhoneCollection; + bool m_bPhoneCollectionActive; + + ServerFont* m_pServerFont[ MAX_FALLBACK ]; + bool m_bFontVertical; + SalInfoPrinter* m_pInfoPrinter; +public: + PspGraphics( psp::JobData* pJob, psp::PrinterGfx* pGfx, String* pPhone, bool bSwallow, SalInfoPrinter* pInfoPrinter ) + : m_pJobData( pJob ), + m_pPrinterGfx( pGfx ), + m_pPhoneNr( pPhone ), + m_bSwallowFaxNo( bSwallow ), + m_bPhoneCollectionActive( false ), + m_bFontVertical( false ), + m_pInfoPrinter( pInfoPrinter ) + { for( int i = 0; i < MAX_FALLBACK; i++ ) m_pServerFont[i] = 0; } + virtual ~PspGraphics(); + + // helper methods for sharing with X11SalGraphics + static const void* DoGetEmbedFontData( psp::fontID aFont, const sal_Ucs* pUnicodes, sal_Int32* pWidths, FontSubsetInfo& rInfo, long* pDataLen ); + static void DoFreeEmbedFontData( const void* pData, long nLen ); + static const Ucs2SIntMap* DoGetFontEncodingVector( psp::fontID aFont, const Ucs2OStrMap** pNonEncoded ); + static void DoGetGlyphWidths( psp::fontID aFont, + bool bVertical, + Int32Vector& rWidths, + Ucs2UIntMap& rUnicodeEnc ); + + static ImplDevFontAttributes Info2DevFontAttributes( const psp::FastPrintFontInfo& ); + static void AnnounceFonts( ImplDevFontList*, const psp::FastPrintFontInfo& ); + static FontWidth ToFontWidth (psp::width::type eWidth); + static FontWeight ToFontWeight (psp::weight::type eWeight); + static FontPitch ToFontPitch (psp::pitch::type ePitch); + static FontItalic ToFontItalic (psp::italic::type eItalic); + static FontFamily ToFontFamily (psp::family::type eFamily); + + // overload all pure virtual methods + virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ); + virtual USHORT GetBitCount(); + virtual long GetGraphicsWidth() const; + + virtual void ResetClipRegion(); + virtual void BeginSetClipRegion( ULONG nCount ); + virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ); + virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ); + virtual void EndSetClipRegion(); + + virtual void SetLineColor(); + virtual void SetLineColor( SalColor nSalColor ); + virtual void SetFillColor(); + virtual void SetFillColor( SalColor nSalColor ); + virtual void SetXORMode( bool bSet, bool ); + virtual void SetROPLineColor( SalROPColor nROPColor ); + virtual void SetROPFillColor( SalROPColor nROPColor ); + + virtual void SetTextColor( SalColor nSalColor ); + virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel ); + virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ); + virtual ULONG GetKernPairs( ULONG nMaxPairs, ImplKernPairData* ); + virtual const ImplFontCharMap* GetImplFontCharMap() const; + virtual void GetDevFontList( ImplDevFontList* ); + virtual void GetDevFontSubstList( OutputDevice* ); + virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ); + virtual BOOL CreateFontSubset( const rtl::OUString& rToFile, + const ImplFontData*, + sal_Int32* pGlyphIDs, + sal_uInt8* pEncoding, + sal_Int32* pWidths, + int nGlyphs, + FontSubsetInfo& rInfo + ); + virtual const Ucs2SIntMap* GetFontEncodingVector( const ImplFontData*, const Ucs2OStrMap** ppNonEncoded ); + virtual const void* GetEmbedFontData( const ImplFontData*, + const sal_Ucs* pUnicodes, + sal_Int32* pWidths, + FontSubsetInfo& rInfo, + long* pDataLen ); + virtual void FreeEmbedFontData( const void* pData, long nDataLen ); + virtual void GetGlyphWidths( const ImplFontData*, + bool bVertical, + Int32Vector& rWidths, + Ucs2UIntMap& rUnicodeEnc ); + virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& ); + virtual BOOL GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& ); + virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ); + virtual void DrawServerFontLayout( const ServerFontLayout& ); + virtual bool supportsOperation( OutDevSupportType ) const; + virtual void drawPixel( long nX, long nY ); + virtual void drawPixel( long nX, long nY, SalColor nSalColor ); + virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ); + virtual void drawRect( long nX, long nY, long nWidth, long nHeight ); + virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry ); + virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry ); + virtual void drawPolyPolygon( sal_uInt32 nPoly, + const sal_uInt32* pPoints, + PCONSTSALPOINT* pPtAry ); + virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency ); + virtual bool drawPolyLine( const basegfx::B2DPolygon&, double fTransparency, const basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin); + virtual sal_Bool drawPolyLineBezier( ULONG nPoints, + const SalPoint* pPtAry, + const BYTE* pFlgAry ); + virtual sal_Bool drawPolygonBezier( ULONG nPoints, + const SalPoint* pPtAry, + const BYTE* pFlgAry ); + virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, + const sal_uInt32* pPoints, + const SalPoint* const* pPtAry, + const BYTE* const* pFlgAry ); + virtual void copyArea( long nDestX, + long nDestY, + long nSrcX, + long nSrcY, + long nSrcWidth, + long nSrcHeight, + USHORT nFlags ); + virtual void copyBits( const SalTwoRect* pPosAry, + SalGraphics* pSrcGraphics ); + virtual void drawBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap ); + virtual void drawBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + SalColor nTransparentColor ); + virtual void drawBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + const SalBitmap& rTransparentBitmap ); + virtual void drawMask( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + SalColor nMaskColor ); + virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight ); + virtual SalColor getPixel( long nX, long nY ); + virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags ); + virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags ); + + virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ); + virtual bool filterText( const String& rOrigText, String& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop ); + + virtual bool drawAlphaBitmap( const SalTwoRect&, + const SalBitmap& rSourceBitmap, + const SalBitmap& rAlphaBitmap ); + virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency ); + + virtual SystemGraphicsData GetGraphicsData() const; + virtual SystemFontData GetSysFontData( int nFallbacklevel ) const; +}; + +#endif // _VCL_PSPGRAPHICS_H diff --git a/vcl/inc/unx/salbmp.h b/vcl/inc/unx/salbmp.h new file mode 100644 index 000000000000..1da035536179 --- /dev/null +++ b/vcl/inc/unx/salbmp.h @@ -0,0 +1,237 @@ +/************************************************************************* + * + * 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 _SV_SALBMP_H +#define _SV_SALBMP_H + +#include +#ifndef _SV_SALGTYPE +#include +#endif +#include +#include +#include + +struct BitmapBuffer; +class BitmapPalette; +class SalGraphics; +class ImplSalDDB; +class ImplSalBitmapCache; + +// ------------- +// - SalBitmap - +// ------------- + +class VCL_DLLPUBLIC X11SalBitmap : public SalBitmap +{ +private: + + static BitmapBuffer* ImplCreateDIB( const Size& rSize, + USHORT nBitCount, + const BitmapPalette& rPal ); + static BitmapBuffer* ImplCreateDIB( Drawable aDrawable, + int nScreen, + long nDrawableDepth, + long nX, long nY, + long nWidth, long nHeight ); + +public: + + static ImplSalBitmapCache* mpCache; + static ULONG mnCacheInstCount; + + static void ImplCreateCache(); + static void ImplDestroyCache(); + void ImplRemovedFromCache(); + + bool SnapShot (Display* pDisplay, XLIB_Window hWindow); + bool ImplCreateFromXImage( Display* pDisplay, + XLIB_Window hWindow, + int nScreen, + XImage* pImage); +private: + + + BitmapBuffer* mpDIB; + ImplSalDDB* mpDDB; + +public: + + SAL_DLLPRIVATE bool ImplCreateFromDrawable( Drawable aDrawable, + int nScreen, + long nDrawableDepth, + long nX, long nY, + long nWidth, long nHeight ); + + SAL_DLLPRIVATE XImage* ImplCreateXImage( SalDisplay* pSalDisp, + int nScreen, long nDepth, + const SalTwoRect& rTwoRect ) const; + + SAL_DLLPRIVATE ImplSalDDB* ImplGetDDB( Drawable, int nScreen, long nDrawableDepth, + const SalTwoRect& ) const; + void ImplDraw( Drawable aDrawable, int nScreen, long nDrawableDepth, + const SalTwoRect& rTwoRect, const GC& rGC ) const; + +public: + + X11SalBitmap(); + virtual ~X11SalBitmap(); + + // overload pure virtual methods + virtual bool Create( const Size& rSize, + USHORT nBitCount, + const BitmapPalette& rPal ); + virtual bool Create( const SalBitmap& rSalBmp ); + virtual bool Create( const SalBitmap& rSalBmp, + SalGraphics* pGraphics ); + virtual bool Create( const SalBitmap& rSalBmp, + USHORT nNewBitCount ); + + virtual void Destroy(); + + virtual Size GetSize() const; + virtual USHORT GetBitCount() const; + + virtual BitmapBuffer* AcquireBuffer( bool bReadOnly ); + virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ); + virtual bool GetSystemData( BitmapSystemData& rData ); +}; + +// -------------- +// - ImplSalDDB - +// -------------- + +class ImplSalDDB +{ +private: + + Pixmap maPixmap; + SalTwoRect maTwoRect; + long mnDepth; + int mnScreen; + + ImplSalDDB() {} + + static void ImplDraw( Drawable aSrcDrawable, long nSrcDrawableDepth, + Drawable aDstDrawable, long nDstDrawableDepth, + long nSrcX, long nSrcY, + long nDestWidth, long nDestHeight, + long nDestX, long nDestY, const GC& rGC ); + +public: + + ImplSalDDB( XImage* pImage, + Drawable aDrawable, int nScreen, + const SalTwoRect& rTwoRect ); + ImplSalDDB( Drawable aDrawable, + int nScreen, + long nDrawableDepth, + long nX, long nY, long nWidth, long nHeight ); + ImplSalDDB( Display* pDisplay, + XLIB_Window hWindow, + int nScreen, + XImage* pImage); + ~ImplSalDDB(); + + Pixmap ImplGetPixmap() const { return maPixmap; } + long ImplGetWidth() const { return maTwoRect.mnDestWidth; } + long ImplGetHeight() const { return maTwoRect.mnDestHeight; } + long ImplGetDepth() const { return mnDepth; } + ULONG ImplGetMemSize() const { return( ( maTwoRect.mnDestWidth * maTwoRect.mnDestHeight * mnDepth ) >> 3 ); } + int ImplGetScreen() const { return mnScreen; } + + bool ImplMatches( int nScreen, long nDepth, const SalTwoRect& rTwoRect ) const; + void ImplDraw( Drawable aDrawable, long nDrawableDepth, + const SalTwoRect& rTwoRect, const GC& rGC ) const; +}; + +// ---------------------- +// - ImplSalBitmapCache - +// ---------------------- + +class ImplSalBitmapCache +{ +private: + + List maBmpList; + ULONG mnTotalSize; + +public: + + ImplSalBitmapCache(); + ~ImplSalBitmapCache(); + + void ImplAdd( X11SalBitmap* pBmp, ULONG nMemSize = 0UL, ULONG nFlags = 0UL ); + void ImplRemove( X11SalBitmap* pBmp ); + void ImplClear(); +}; + +#endif // _SV_SALBMP_HXX + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcl/inc/unx/saldata.hxx b/vcl/inc/unx/saldata.hxx new file mode 100644 index 000000000000..566d17e98a32 --- /dev/null +++ b/vcl/inc/unx/saldata.hxx @@ -0,0 +1,134 @@ +/************************************************************************* + * + * 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 _SV_SALDATA_HXX +#define _SV_SALDATA_HXX + +// -=-= includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +#include +#include +#include +#include +#include +#ifndef _OSL_MODULE_H +#include +#endif +#include + +// -=-= forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +class SalXLib; +class SalDisplay; +class SalPrinter; + +// -=-= typedefs -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +DECLARE_LIST( SalDisplays, SalDisplay* ) + +#if defined SCO || defined LINUX || defined NETBSD || defined AIX || defined HPUX || defined FREEBSD +#include +#else +typedef unsigned int pthread_t; +#endif + +// -=-= SalData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +class VCL_DLLPUBLIC X11SalData : public SalData +{ +protected: + BOOL bNoExceptions_; + SalXLib *pXLib_; + SalDisplay *m_pSalDisplay; + pthread_t hMainThread_; + rtl::OUString maLocalHostName; + rtl::OUString maUnicodeAccumulator; + +public: + X11SalData(); + virtual ~X11SalData(); + + virtual void Init(); + virtual void initNWF(); + virtual void deInitNWF(); + + inline void XError( Display *pDisplay, XErrorEvent *pEvent ) const; + + SalDisplay* GetDisplay() const + { return m_pSalDisplay; } + void SetSalDisplay( SalDisplay* pDisplay ) + { m_pSalDisplay = pDisplay; } + + void DeleteDisplay(); // for shutdown + + inline SalXLib* GetLib() const { return pXLib_; } + inline pthread_t GetMainThread() const { return hMainThread_; } + + void StartTimer( ULONG nMS ); + inline void StopTimer(); + void Timeout() const; + + const rtl::OUString& GetLocalHostName() const + { return maLocalHostName; } + rtl::OUString& GetUnicodeAccumulator() { return maUnicodeAccumulator; } + + static int XErrorHdl( Display*, XErrorEvent* ); + static int XIOErrorHdl( Display* ); + + // set helper functions to set class and res name in W_CLASS hint + static const char* getFrameResName(); + static const char* getFrameClassName(); + static rtl::OString getFrameResName( SalExtStyle nStyle ); + +}; + +inline X11SalData* GetX11SalData() +{ return (X11SalData*)ImplGetSVData()->mpSalData; } + + +#ifdef _SV_SALDISP_HXX +inline void X11SalData::XError( Display *pDisplay, XErrorEvent *pEvent ) const +{ pXLib_->XError( pDisplay, pEvent ); } +#endif + +class YieldMutexReleaser +{ + ULONG m_nYieldCount; +public: + inline YieldMutexReleaser(); + inline ~YieldMutexReleaser(); +}; + +inline YieldMutexReleaser::YieldMutexReleaser() +{ + m_nYieldCount = GetSalData()->m_pInstance->ReleaseYieldMutex(); +} + +inline YieldMutexReleaser::~YieldMutexReleaser() +{ + GetSalData()->m_pInstance->AcquireYieldMutex( m_nYieldCount ); +} + +#endif // _SV_SALDATA_HXX + diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx new file mode 100644 index 000000000000..c83c1c56e1c5 --- /dev/null +++ b/vcl/inc/unx/saldisp.hxx @@ -0,0 +1,550 @@ +/************************************************************************* + * + * 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 _SV_SALDISP_HXX +#define _SV_SALDISP_HXX + +// -=-= exports =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +class SalDisplay; +class SalColormap; +class SalVisual; +class SalXLib; + +// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +#include +#include +#ifndef _SV_PTRSTYLE_HXX +#include +#endif +#include +#ifndef _OSL_MUTEX_H +#include +#endif +#include +#include +#include +#include +#include +#include + +// -=-= forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +class BitmapPalette; +class SalFrame; +class ColorMask; + +namespace vcl_sal { class WMAdaptor; } +class DtIntegrator; + +// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +#define PROPERTY_SUPPORT_WM_SetPos 0x00000001 +#define PROPERTY_SUPPORT_WM_Screen 0x00000002 +#define PROPERTY_SUPPORT_WM_Parent_Pixmap_None 0x00000004 +#define PROPERTY_SUPPORT_WM_ClientPos 0x00000008 +#define PROPERTY_SUPPORT_XSetClipMask 0x00000010 // for bitmap ops. +#define PROPERTY_SUPPORT_3ButtonMouse 0x00000020 + +#define PROPERTY_BUG_XA_FAMILY_NAME_nil 0x00001000 +#define PROPERTY_BUG_XCopyArea_GXxor 0x00002000 // from window +#define PROPERTY_BUG_Stipple 0x00004000 // 0/1 inverted +#define PROPERTY_BUG_Tile 0x00008000 // Recreate the + // dither brush each time +#define PROPERTY_BUG_FillPolygon_Tile 0x00010000 // always Toggle Fillstyle +#define PROPERTY_BUG_DrawLine 0x00020000 // a DrawLine is one point to short +#define PROPERTY_BUG_CopyPlane_RevertBWPixel 0x00040000 // revert fg and bg for xcopyplane +#define PROPERTY_BUG_CopyArea_OnlySmallSlices 0x00080000 +#define PROPERTY_BUG_Bitmap_Bit_Order 0x00100000 + +#define PROPERTY_FEATURE_Maximize 0x01000000 +#define PROPERTY_FEATURE_SharedMemory 0x02000000 +#define PROPERTY_FEATURE_TrustedSolaris 0x04000000 + +#define PROPERTY_DEFAULT 0x00000FCB + +// ------------------------------------------------------------------------ +// server vendor + +typedef enum { + vendor_none = 0, + vendor_attachmate, + vendor_excursion, + vendor_hp, + vendor_hummingbird, + vendor_ibm, + vendor_sco, + vendor_sgi, + vendor_sun, + vendor_xfree, + vendor_xinside, + vendor_xprinter, + vendor_unknown +} srv_vendor_t; + +extern "C" srv_vendor_t sal_GetServerVendor( Display *p_display ); + +// -=-= SalWM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +enum SalWM { olwm, // Open Look + mwm, // Motif + kwm, // KDE Desktop Environment + FourDwm, // SGI + vuewm, // HP + dtwm, // CDE + winmgr, // Oracle NC + twm, + fvwm, // ... + pmwm, // SCO + otherwm }; + +// -=-= SalRGB -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// MSB/Bigendian Sicht (SalColor == RGB, r=0xFF0000, g=0xFF00, b=0xFF) + +enum SalRGB { RGB, RBG, + GBR, GRB, + BGR, BRG, + RGBA, RBGA, + GBRA, GRBA, + BGRA, BRGA, + other }; + +// -=-= SalVisual =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +class SalVisual : public XVisualInfo +{ + SalRGB eRGBMode_; + int nRedShift_; + int nGreenShift_; + int nBlueShift_; + int nRedBits_; + int nGreenBits_; + int nBlueBits_; +public: + SalVisual(); + ~SalVisual(); + SalVisual( const XVisualInfo* pXVI ); + + inline VisualID GetVisualId() const { return visualid; } + inline Visual *GetVisual() const { return visual; } + inline int GetClass() const { return c_class; } + inline int GetDepth() const { return depth; } + inline SalRGB GetMode() const { return eRGBMode_; } + + Pixel GetTCPixel( SalColor nColor ) const; + SalColor GetTCColor( Pixel nPixel ) const; + BOOL Convert( int &n0, int &n1, int &n2, int &n3 ); // 32bit + BOOL Convert( int &n0, int &n1, int &n2 ); // 24bit +}; + +// -=-= SalColormap =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +class SalColormap +{ + const SalDisplay* m_pDisplay; + Colormap m_hColormap; + std::vector m_aPalette; // Pseudocolor + SalVisual m_aVisual; + std::vector m_aLookupTable; // Pseudocolor: 12bit reduction + Pixel m_nWhitePixel; + Pixel m_nBlackPixel; + Pixel m_nUsed; // Pseudocolor + int m_nScreen; + + void GetPalette(); + void GetLookupTable(); +public: + SalColormap( const SalDisplay* pSalDisplay, + Colormap hColormap, + int nScreen ); + SalColormap( const BitmapPalette &rpPalette ); + SalColormap( USHORT nDepth ); + SalColormap(); + ~SalColormap(); + + inline Colormap GetXColormap() const { return m_hColormap; } + inline const SalDisplay* GetDisplay() const { return m_pDisplay; } + inline Display* GetXDisplay() const; + inline const SalVisual& GetVisual() const { return m_aVisual; } + inline Visual* GetXVisual() const { return m_aVisual.GetVisual(); } + inline Pixel GetWhitePixel() const { return m_nWhitePixel; } + inline Pixel GetBlackPixel() const { return m_nBlackPixel; } + inline Pixel GetUsed() const { return m_nUsed; } + inline int GetClass() const { return m_aVisual.GetClass(); } + inline int GetScreenNumber() const { return m_nScreen; } + + BOOL GetXPixels( XColor &rColor, + int r, + int g, + int b ) const; + inline BOOL GetXPixel( XColor &rColor, + int r, + int g, + int b ) const; + Pixel GetPixel( SalColor nColor ) const; + SalColor GetColor( Pixel nPixel ) const; + void SetPalette( const BitmapPalette &rPalette ); +}; + +// -=-= SalXLib =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +typedef int(*YieldFunc)(int fd, void* data); +struct YieldEntry; + +class VCL_DLLPUBLIC SalXLib +{ +protected: + timeval m_aTimeout; + ULONG m_nTimeoutMS; + int m_pTimeoutFDS[2]; + + bool m_bHaveSystemChildFrames; + + int nFDs_; + fd_set aReadFDS_; + fd_set aExceptionFDS_; + YieldEntry *pYieldEntries_; + + + struct XErrorStackEntry + { + bool m_bIgnore; + bool m_bWas; + unsigned int m_nLastErrorRequest; + XErrorHandler m_aHandler; + }; + std::vector< XErrorStackEntry > m_aXErrorHandlerStack; + XIOErrorHandler m_aOrigXIOErrorHandler; +public: + SalXLib(); + virtual ~SalXLib(); + virtual void Init(); + + virtual void Yield( bool bWait, bool bHandleAllCurrentEvents ); + virtual void Wakeup(); + virtual void PostUserEvent(); + + virtual void Insert( int fd, void* data, + YieldFunc pending, + YieldFunc queued, + YieldFunc handle ); + virtual void Remove( int fd ); + + void XError( Display *pDisp, XErrorEvent *pEvent ); + bool HasXErrorOccured() const { return m_aXErrorHandlerStack.back().m_bWas; } + unsigned int GetLastXErrorRequestCode() const { return m_aXErrorHandlerStack.back().m_nLastErrorRequest; } + void ResetXErrorOccured() { m_aXErrorHandlerStack.back().m_bWas = false; } + void PushXErrorLevel( bool bIgnore ); + void PopXErrorLevel(); + + virtual void StartTimer( ULONG nMS ); + virtual void StopTimer(); + + bool CheckTimeout( bool bExecuteTimers = true ); + + void setHaveSystemChildFrame() + { m_bHaveSystemChildFrames = true; } + bool getHaveSystemChildFrame() const + { return m_bHaveSystemChildFrames; } +}; + +// -=-= SalDisplay -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +class SalI18N_InputMethod; +class SalI18N_KeyboardExtension; +class AttributeProvider; +class SalUnicodeConverter; +class SalConverterCache; + +extern "C" { + struct SnDisplay; + struct SnLauncheeContext; + typedef Bool(*X_if_predicate)(Display*,XEvent*,XPointer); +} + +class VCL_DLLPUBLIC SalDisplay +{ +public: + struct RenderEntry + { + Pixmap m_aPixmap; + Picture m_aPicture; + + RenderEntry() : m_aPixmap( 0 ), m_aPicture( 0 ) {} + }; + + typedef std::hash_map RenderEntryMap; + + struct ScreenData + { + bool m_bInit; + + XLIB_Window m_aRoot; + XLIB_Window m_aRefWindow; + Size m_aSize; + SalVisual m_aVisual; + SalColormap m_aColormap; + GC m_aMonoGC; + GC m_aCopyGC; + GC m_aAndInvertedGC; + GC m_aAndGC; + GC m_aOrGC; + GC m_aStippleGC; + Pixmap m_hInvert50; + mutable RenderEntryMap m_aRenderData; + + ScreenData() : + m_bInit( false ), + m_aRoot( None ), + m_aRefWindow( None ), + m_aMonoGC( None ), + m_aCopyGC( None ), + m_aAndInvertedGC( None ), + m_aAndGC( None ), + m_aOrGC( None ), + m_aStippleGC( None ), + m_hInvert50( None ), + m_aRenderData( 1 ) + {} + }; +// -=-= UserEvent =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + struct SalUserEvent + { + SalFrame* m_pFrame; + void* m_pData; + USHORT m_nEvent; + + SalUserEvent( SalFrame* pFrame, void* pData, USHORT nEvent = SALEVENT_USEREVENT ) + : m_pFrame( pFrame ), + m_pData( pData ), + m_nEvent( nEvent ) + {} + }; + +protected: + SalXLib *pXLib_; + SalI18N_InputMethod *mpInputMethod; + SalI18N_KeyboardExtension *mpKbdExtension; + + AttributeProvider *mpFactory; + + Display *pDisp_; // X Display + int m_nDefaultScreen; // XDefaultScreen + std::vector< ScreenData > m_aScreens; + ScreenData m_aInvalidScreenData; + Pair aResolution_; // [dpi] + bool mbExactResolution; + ULONG nMaxRequestSize_; // [byte] + + srv_vendor_t meServerVendor; + SalWM eWindowManager_; + ULONG nProperties_; // PROPERTY_SUPPORT, BUG, FEATURE + BOOL bLocal_; // Server==Client? Init + // in SalDisplay::IsLocal() + BOOL mbLocalIsValid; // bLocal_ is valid ? + // until x bytes + + oslMutex hEventGuard_; + std::list< SalUserEvent > m_aUserEvents; + + XLIB_Cursor aPointerCache_[POINTER_COUNT]; + SalFrame* m_pCapture; + + // Keyboard + BOOL bNumLockFromXS_; // Num Lock handled by X Server + int nNumLockIndex_; // modifier index in modmap + int nNumLockMask_; // keyevent state mask for + KeySym nShiftKeySym_; // first shift modifier + KeySym nCtrlKeySym_; // first control modifier + KeySym nMod1KeySym_; // first mod1 modifier + ByteString m_aKeyboardName; + + vcl_sal::WMAdaptor* m_pWMAdaptor; + DtIntegrator* m_pDtIntegrator; + + bool m_bXinerama; + std::vector< Rectangle > m_aXineramaScreens; + std::list m_aFrames; + std::list m_aSalObjects; + + bool m_bUseRandRWrapper; // don't use randr on gtk, use gdk signals there + + mutable XLIB_Time m_nLastUserEventTime; // mutable because changed on first access + + virtual long Dispatch( XEvent *pEvent ) = 0; + void InitXinerama(); + void InitRandR( XLIB_Window aRoot ) const; + void DeInitRandR(); + int processRandREvent( XEvent* ); + + void doDestruct(); + int addXineramaScreenUnique( long i_nX, long i_nY, long i_nWidth, long i_nHeight ); +public: + static SalDisplay *GetSalDisplay( Display* display ); + static BOOL BestVisual( Display *pDisp, + int nScreen, + XVisualInfo &rVI ); + + SalDisplay( Display* pDisp ); + + virtual ~SalDisplay(); + + + virtual void registerFrame( SalFrame* pFrame ); + virtual void deregisterFrame( SalFrame* pFrame ); + void setHaveSystemChildFrame() const + { pXLib_->setHaveSystemChildFrame(); } + bool getHaveSystemChildFrame() const + { return pXLib_->getHaveSystemChildFrame(); } + + void Init(); + + void SendInternalEvent( SalFrame* pFrame, void* pData, USHORT nEvent = SALEVENT_USEREVENT ); + void CancelInternalEvent( SalFrame* pFrame, void* pData, USHORT nEvent ); + bool DispatchInternalEvent(); + void PrintInfo() const; + + void PrintEvent( const ByteString &rComment, + XEvent *pEvent ) const; + + void Beep() const; + + void ModifierMapping(); + String GetKeyNameFromKeySym( KeySym keysym ) const; + XubString GetKeyName( USHORT nKeyCode ) const; + USHORT GetKeyCode( KeySym keysym, char*pcPrintable ) const; + KeySym GetKeySym( XKeyEvent *pEvent, + unsigned char *pPrintable, + int *pLen, + KeySym *pUnmodifiedKeySym, + Status *pStatus, + XIC = NULL ) const; + + XLIB_Cursor GetPointer( int ePointerStyle ); + virtual int CaptureMouse( SalFrame *pCapture ); + + BOOL IsLocal(); + + void Remove( XEvent *pEvent ); + + virtual void initScreen( int nScreen ) const; + const ScreenData& getDataForScreen( int nScreen ) const + { + if( nScreen < 0 || nScreen >= static_cast(m_aScreens.size()) ) + return m_aInvalidScreenData; + if( ! m_aScreens[nScreen].m_bInit ) + initScreen( nScreen ); + return m_aScreens[nScreen]; + } + + XLIB_Window GetDrawable( int nScreen ) const { return getDataForScreen( nScreen ).m_aRefWindow; } + Display *GetDisplay() const { return pDisp_; } + int GetDefaultScreenNumber() const { return m_nDefaultScreen; } + virtual int GetDefaultMonitorNumber() const { return 0; } + const Size& GetScreenSize( int nScreen ) const { return getDataForScreen( nScreen ).m_aSize; } + srv_vendor_t GetServerVendor() const { return meServerVendor; } + void SetServerVendor() { meServerVendor = sal_GetServerVendor(pDisp_); } + BOOL IsDisplay() const { return !!pXLib_; } + GC GetMonoGC( int nScreen ) const { return getDataForScreen(nScreen).m_aMonoGC; } + GC GetCopyGC( int nScreen ) const { return getDataForScreen(nScreen).m_aCopyGC; } + GC GetAndInvertedGC( int nScreen ) const { return getDataForScreen(nScreen).m_aAndInvertedGC; } + GC GetAndGC( int nScreen ) const { return getDataForScreen(nScreen).m_aAndGC; } + GC GetOrGC( int nScreen ) const { return getDataForScreen(nScreen).m_aOrGC; } + GC GetStippleGC( int nScreen ) const { return getDataForScreen(nScreen).m_aStippleGC; } + GC GetGC( USHORT nDepth, int nScreen ) const; + Pixmap GetInvert50( int nScreen ) const { return getDataForScreen(nScreen).m_hInvert50; } + const SalColormap& GetColormap( int nScreen ) const { return getDataForScreen(nScreen).m_aColormap; } + const SalVisual& GetVisual( int nScreen ) const { return getDataForScreen(nScreen).m_aVisual; } + RenderEntryMap& GetRenderEntries( int nScreen ) const { return getDataForScreen(nScreen).m_aRenderData; } + const Pair &GetResolution() const { return aResolution_; } + bool GetExactResolution() const { return mbExactResolution; } + ULONG GetProperties() const { return nProperties_; } + ULONG GetMaxRequestSize() const { return nMaxRequestSize_; } + XLIB_Time GetLastUserEventTime( bool bAlwaysReget = false ) const; + + bool XIfEventWithTimeout( XEvent*, XPointer, X_if_predicate, long i_nTimeout = 1000 ) const; + + BOOL MouseCaptured( const SalFrame *pFrameData ) const + { return m_pCapture == pFrameData; } + SalFrame* GetCaptureFrame() const + { return m_pCapture; } + SalXLib* GetXLib() const { return pXLib_; } + + SalI18N_InputMethod* GetInputMethod() const { return mpInputMethod; } + SalI18N_KeyboardExtension* GetKbdExtension() const { return mpKbdExtension; } + void SetInputMethod( SalI18N_InputMethod *pInputMethod ) + { mpInputMethod = pInputMethod; } + void SetKbdExtension(SalI18N_KeyboardExtension *pKbdExtension) + { mpKbdExtension = pKbdExtension; } + const char* GetKeyboardName( BOOL bRefresh = FALSE ); + ::vcl_sal::WMAdaptor* getWMAdaptor() const { return m_pWMAdaptor; } + DtIntegrator* getDtIntegrator() const { return m_pDtIntegrator; } + bool IsXinerama() const { return m_bXinerama; } + const std::vector< Rectangle >& GetXineramaScreens() const { return m_aXineramaScreens; } + XLIB_Window GetRootWindow( int nScreen ) const + { return getDataForScreen( nScreen ).m_aRoot; } + const std::vector< ScreenData >& GetScreenData() + { return m_aScreens; } + int GetScreenCount() const { return static_cast(m_aScreens.size()); } + + const std::list< SalFrame* >& getFrames() const + { return m_aFrames; } + + BOOL IsNumLockFromXS() const { return bNumLockFromXS_; } + + std::list< SalObject* >& getSalObjects() { return m_aSalObjects; } +}; + +// -=-= inlines =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +inline GC SalDisplay::GetGC( USHORT nDepth, int nScreen ) const +{ return 1 == nDepth + ? GetMonoGC( nScreen ) + : getDataForScreen(nScreen).m_aVisual.GetDepth() == nDepth + ? GetCopyGC( nScreen ) + : None; } + +inline Display *SalColormap::GetXDisplay() const +{ return m_pDisplay->GetDisplay(); } + +class VCL_DLLPUBLIC SalX11Display : public SalDisplay +{ +public: + SalX11Display( Display* pDisp ); + virtual ~SalX11Display(); + + virtual long Dispatch( XEvent *pEvent ); + virtual void Yield(); + + BOOL IsEvent(); +}; + +/*---------------------------------------------------------- + keep track of correct size of the initial window + */ +// get foreign key names +namespace vcl_sal { + String getKeysymReplacementName( + const char* pKeyboard, + KeySym nSymbol ); +} + + +#endif // _SV_SALDISP_HXX diff --git a/vcl/inc/unx/salfont.h b/vcl/inc/unx/salfont.h new file mode 100644 index 000000000000..b3fbe93137f3 --- /dev/null +++ b/vcl/inc/unx/salfont.h @@ -0,0 +1,180 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SV_SALFONT_H +#define _SV_SALFONT_H + +// -=-= exports =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +class SalFontCache; +struct SalFontDimension; +class SalFontFamily; +class SalFontFamilyList; +class SalFontStruct; +class SalFontStructList; +class SalFonts; + +// -=-= includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +#include +#include + +// -=-= forwards =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +typedef ULONG XFP_FLAGS; + +class SalDisplay; +class SalFontCacheItem; + +// -=-= SalFontCache -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +DECLARE_LIST( SalFontCache, SalFontCacheItem* ) + +// -=-= SalFontDimension -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +struct SalFontDimension +{ + USHORT nHeight_; // [pixel] + USHORT nPtHeight_; // [point/10] + USHORT nAverage_; // [pixel/10] + USHORT nXRes_; // [dpi] + USHORT nYRes_; // [dpi] + USHORT nSlant_; // [pixel] +// size_t nUnderlineThickness_; // [pixel] +// size_t nUnderlinePosition_; // [pixel] +// size_t nStrikeoutAscent_; // [pixel] +// size_t nStrikeoutDescent_; // [pixel] +// Subscript, Superscript, Capital, Space ... + + inline SalFontDimension( USHORT nA = 0, USHORT nH = 0 ); + + inline BOOL IsScalable() const; + inline USHORT GetWidth() const { return (nAverage_ + 5) / 10; } + inline Size GetSize() const; + inline void SetSize( const Size & rSize ); + inline BOOL operator == ( const SalFontDimension &r ) const; + inline BOOL operator != ( const SalFontDimension &r ) const; + inline BOOL operator >= ( const SalFontDimension &r ) const; +}; + +inline SalFontDimension::SalFontDimension( USHORT nA, USHORT nH ) + : nHeight_( nH ), nAverage_( nA ) +{ nPtHeight_ = nXRes_ = nYRes_ = nSlant_ = 0; } + +inline BOOL SalFontDimension::IsScalable() const +{ return !nHeight_ && !nPtHeight_ && !nAverage_; } + +inline Size SalFontDimension::GetSize() const +{ return Size( (nAverage_ + 5) / 10, nHeight_ ); } + +inline void SalFontDimension::SetSize( const Size & rSize ) +{ nAverage_ = (USHORT)rSize.Width() * 10; nHeight_ = (USHORT)rSize.Height(); } + +inline BOOL SalFontDimension::operator == ( const SalFontDimension &r ) const +{ return nHeight_ == r.nHeight_ && (!r.nAverage_ || nAverage_ == r.nAverage_); } + +inline BOOL SalFontDimension::operator != ( const SalFontDimension &r ) const +{ return !(*this == r); } + +inline BOOL SalFontDimension::operator >= ( const SalFontDimension &r ) const +{ return nHeight_ > r.nHeight_ + || (nHeight_ == r.nHeight_ && nAverage_ >= r.nAverage_); } + +// -=-= SalFontStruct =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +class SalFontStruct : public ImplFontMetricData +{ + friend class SalDisplay; + friend class SalGraphicsData; + + SalFontCacheItem*pCache_; + +#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL + ByteString aFontName_; +#endif + USHORT nHeightCount_; // Anzahl der Hoehen-Eintraege + SalFontDimension*pDimensions_; // Hoehen-Array + USHORT nWeight_; + + USHORT nFoundry_; // properties indexies + USHORT nFamily_; + USHORT nWeightName_; + USHORT nSlant_; + USHORT nSetWidthName_; + ByteString aAddStyleName_; + USHORT nSpacing_; + USHORT nCharSet_; + USHORT nFaceName_; + BOOL mbValidFontDescription; // valid xlfd entries + + void Init(); + BOOL Init( SalDisplay* pDisp, + const char* pFontName, + SalFontDimension& rDim ); + + ByteString GetXFontName( const SalFontDimension& ); + + inline void SetFoundry( USHORT n ) + { nFoundry_ = n; } + inline void SetFamily( USHORT n ) + { meFamily = sal_FamilyToSal( nFamily_ = n ); } + inline void SetWeightName( USHORT n ) + { meWeight = sal_WeightToSal( nWeightName_ = n ); } + inline void SetSlant( USHORT n ) + { meItalic = sal_ItalicToSal( nSlant_ = n ); } + inline void SetSetWidthName( USHORT n ) + { nSetWidthName_ = n; } + inline void SetAddStyleName( const ByteString& rAddStyle ) + { aAddStyleName_ = rAddStyle; aAddStyleName_.ToLowerAscii(); } + inline void SetSpacing( USHORT n ) + { mePitch = sal_PitchToSal( nSpacing_ = n ); } + inline void SetAverage( long n ) + { mnWidth = (n + 5) / 10; } + void SetCharSet( USHORT n ); + + SalFontStruct( const SalFontStruct& rFont ); +public: + SalFontStruct( SalDisplay* pDisp, + const char* pFontName, + SalFontDimension& rDim ); + + ~SalFontStruct(); + + inline void Cache( SalFontCacheItem *p ) { pCache_ = p; } + inline SalFontCacheItem*IsCache() const { return pCache_; } + inline BOOL IsScalable() const { return TYPE_SCALABLE==meType; } + inline SalFontDimension*GetDim() const { return pDimensions_; } + inline BOOL IsValid() const { return mbValidFontDescription; } +#ifdef DBG_UTIL + const ByteString& GetName() const { return aFontName_; } +#endif + + ImplFontData *GetDevFontData(); + SalFontCacheItem*Load( SalDisplay *pDisp, const SalFontDimension &rDim ); + CharSet GetCharSet() { return meCharSet; } + +}; + +// -=-= SalFontStructList =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +DECLARE_LIST( SalFontStructList, SalFontStruct* ) + +#endif // _SV_SALFONT_H + diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h new file mode 100644 index 000000000000..9f063975173d --- /dev/null +++ b/vcl/inc/unx/salframe.h @@ -0,0 +1,293 @@ +/************************************************************************* + * + * 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 _SV_SALFRAME_H +#define _SV_SALFRAME_H + +// -=-= #includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + + +#include + +// -=-= forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +class SalDisplay; +class X11SalGraphics; +class SalGraphicsLayout; +class SalI18N_InputContext; + +namespace vcl_sal { class WMAdaptor; class NetWMAdaptor; class GnomeWMAdaptor; } + +// -=-= X11SalFrame =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +#define SHOWSTATE_UNKNOWN -1 +#define SHOWSTATE_MINIMIZED 0 +#define SHOWSTATE_NORMAL 1 +#define SHOWSTATE_HIDDEN 2 + +class VCL_DLLPUBLIC X11SalFrame : public SalFrame +{ + friend class vcl_sal::WMAdaptor; + friend class vcl_sal::NetWMAdaptor; + friend class vcl_sal::GnomeWMAdaptor; + + static X11SalFrame* s_pSaveYourselfFrame; + + X11SalFrame* mpParent; // pointer to parent frame + // which should never obscur this frame + bool mbTransientForRoot; + std::list< X11SalFrame* > maChildren; // List of child frames + + SalDisplay *pDisplay_; + int m_nScreen; + XLIB_Window mhWindow; + XLIB_Window mhShellWindow; + XLIB_Window mhForeignParent; + // window to fall back to when no longer in fullscreen mode + XLIB_Window mhStackingWindow; + // window to listen for CirculateNotify events + + Pixmap mhBackgroundPixmap; + + XLIB_Cursor hCursor_; + int nCaptured_; // is captured + + X11SalGraphics *pGraphics_; // current frame graphics + X11SalGraphics *pFreeGraphics_; // first free frame graphics + + XLIB_Time nReleaseTime_; // timestamp of last key release + USHORT nKeyCode_; // last key code + USHORT nKeyState_; // last key state + int nCompose_; // compose state + bool mbKeyMenu; + bool mbSendExtKeyModChange; + USHORT mnExtKeyMod; + + int nShowState_; // show state + int nWidth_; // client width + int nHeight_; // client height + Rectangle maRestorePosSize; + ULONG nStyle_; + SalExtStyle mnExtStyle; + BOOL bAlwaysOnTop_; + BOOL bViewable_; + BOOL bMapped_; + BOOL mbInShow; + BOOL bDefaultPosition_; // client is centered initially + bool m_bXEmbed; + int nVisibility_; + int m_nWorkArea; + bool m_bSetFocusOnMap; + + + int nScreenSaversTimeout_; + Rectangle maPaintRegion; + + Timer maAlwaysOnTopRaiseTimer; + + // data for WMAdaptor + int meWindowType; + int mnDecorationFlags; + bool mbMaximizedVert; + bool mbMaximizedHorz; + bool mbShaded; + bool mbFullScreen; + + // icon id + int mnIconID; + + String m_aTitle; + + SystemChildData maSystemChildData; + + SalI18N_InputContext *mpInputContext; + Bool mbInputFocus; + + XRectangle* m_pClipRectangles; + int m_nCurClipRect; + int m_nMaxClipRect; + + + void GetPosSize( Rectangle &rPosSize ); + void SetSize ( const Size &rSize ); + void Center(); + void SetPosSize( const Rectangle &rPosSize ); + void Minimize(); + void Maximize(); + void Restore(); + void SetWindowGravity (int nGravity ) const; + + void RestackChildren( XLIB_Window* pTopLevelWindows, int nTopLevelWindows ); + void RestackChildren(); + + long HandleKeyEvent ( XKeyEvent *pEvent ); + long HandleMouseEvent ( XEvent *pEvent ); + long HandleFocusEvent ( XFocusChangeEvent *pEvent ); + long HandleExposeEvent ( XEvent *pEvent ); + long HandleSizeEvent ( XConfigureEvent *pEvent ); + long HandleColormapEvent ( XColormapEvent *pEvent ); + long HandleMapUnmapEvent ( XEvent *pEvent ); + long HandleStateEvent ( XPropertyEvent *pEvent ); + long HandleReparentEvent ( XReparentEvent *pEvent ); + long HandleClientMessage ( XClientMessageEvent*pEvent ); + + DECL_LINK( HandleAlwaysOnTopRaise, void* ); + + void passOnSaveYourSelf(); + + void createNewWindow( XLIB_Window aParent, int nScreen = -1 ); + void updateScreenNumber(); + + void setXEmbedInfo(); + void askForXEmbedFocus( sal_Int32 i_nTimeCode ); +public: + X11SalFrame( SalFrame* pParent, ULONG nSalFrameStyle, SystemParentData* pSystemParent = NULL ); + virtual ~X11SalFrame(); + + long Dispatch( XEvent *pEvent ); + void Init( ULONG nSalFrameStyle, int nScreen = -1, + SystemParentData* pParentData = NULL, bool bUseGeometry = false ); + + SalDisplay* GetDisplay() const { return pDisplay_; } + Display* GetXDisplay() const; + XLIB_Window GetDrawable() const; + int GetScreenNumber() const { return m_nScreen; } + XLIB_Window GetWindow() const { return mhWindow; } + XLIB_Window GetShellWindow() const { return mhShellWindow; } + XLIB_Window GetForeignParent() const { return mhForeignParent; } + XLIB_Window GetStackingWindow() const { return mhStackingWindow; } + long ShutDown() const { return CallCallback( SALEVENT_SHUTDOWN, 0 ); } + long Close() const { return CallCallback( SALEVENT_CLOSE, 0 ); } + ULONG GetStyle() const { return nStyle_; } + + inline XLIB_Cursor GetCursor() const { return hCursor_; } + inline BOOL IsCaptured() const { return nCaptured_ == 1; } +#if !defined(__synchronous_extinput__) + void HandleExtTextEvent (XClientMessageEvent *pEvent); + void PostExtTextEvent (sal_uInt16 nExtTextEventType, + void *pExtTextEvent); +#endif + bool IsOverrideRedirect() const; + bool IsChildWindow() const { return (nStyle_ & (SAL_FRAME_STYLE_PLUG|SAL_FRAME_STYLE_SYSTEMCHILD)) != 0; } + bool IsSysChildWindow() const { return (nStyle_ & (SAL_FRAME_STYLE_SYSTEMCHILD)) != 0; } + bool IsFloatGrabWindow() const; + SalI18N_InputContext* getInputContext() const { return mpInputContext; } + void getPosSize( Rectangle& rRect ) { GetPosSize( rRect ); } + void setPosSize( const Rectangle& rRect ) { SetPosSize( rRect ); } + bool isMapped() const { return bMapped_; } + bool hasFocus() const { return mbInputFocus; } + + void beginUnicodeSequence(); + bool appendUnicodeSequence( sal_Unicode ); + bool endUnicodeSequence(); + + virtual SalGraphics* GetGraphics(); + virtual void ReleaseGraphics( SalGraphics* pGraphics ); + + // call with true to clear graphics (setting None as drawable) + // call with false to setup graphics with window (GetWindow()) + virtual void updateGraphics( bool bClear ); + + virtual BOOL PostEvent( void* pData ); + + virtual void SetTitle( const XubString& rTitle ); + virtual void SetIcon( USHORT nIcon ); + virtual void SetMenu( SalMenu* pMenu ); + virtual void DrawMenuBar(); + + virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ); + virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE ); + virtual void Enable( BOOL bEnable ); + virtual void SetMinClientSize( long nWidth, long nHeight ); + virtual void SetMaxClientSize( long nWidth, long nHeight ); + virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ); + virtual void GetClientSize( long& rWidth, long& rHeight ); + virtual void GetWorkArea( Rectangle& rRect ); + virtual SalFrame* GetParent() const; + virtual void SetWindowState( const SalFrameState* pState ); + virtual BOOL GetWindowState( SalFrameState* pState ); + virtual void ShowFullScreen( BOOL bFullScreen, sal_Int32 nMonitor ); + virtual void StartPresentation( BOOL bStart ); + virtual void SetAlwaysOnTop( BOOL bOnTop ); + virtual void ToTop( USHORT nFlags ); + virtual void SetPointer( PointerStyle ePointerStyle ); + virtual void CaptureMouse( BOOL bMouse ); + virtual void SetPointerPos( long nX, long nY ); + using SalFrame::Flush; + virtual void Flush(); + virtual void Sync(); + virtual void SetInputContext( SalInputContext* pContext ); + virtual void EndExtTextInput( USHORT nFlags ); + virtual String GetKeyName( USHORT nKeyCode ); + virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode ); + virtual BOOL MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); + virtual LanguageType GetInputLanguage(); + virtual SalBitmap* SnapShot(); + virtual void UpdateSettings( AllSettings& rSettings ); + virtual void Beep( SoundType eSoundType ); + virtual const SystemEnvData* GetSystemData() const; + virtual SalPointerState GetPointerState(); + virtual void SetParent( SalFrame* pNewParent ); + virtual bool SetPluginParent( SystemParentData* pNewParent ); + virtual void SetBackgroundBitmap( SalBitmap* pBitmap ); + + virtual void SetScreenNumber( unsigned int ); + + // shaped system windows + // set clip region to none (-> rectangular windows, normal state) + virtual void ResetClipRegion(); + // start setting the clipregion consisting of nRects rectangles + virtual void BeginSetClipRegion( ULONG nRects ); + // add a rectangle to the clip region + virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); + // done setting up the clipregion + virtual void EndSetClipRegion(); + + static void SaveYourselfDone( SalFrame* ); + static Bool checkKeyReleaseForRepeat( Display*, XEvent*, XPointer pX11SalFrame ); +}; + +#ifdef _SV_SALDISP_HXX + +inline Display *X11SalFrame::GetXDisplay() const +{ return pDisplay_->GetDisplay(); } + +inline XLIB_Window X11SalFrame::GetDrawable() const +{ return GetWindow(); } + +#endif + +#endif // _SV_SALFRAME_H + diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h new file mode 100644 index 000000000000..a8804f1b3778 --- /dev/null +++ b/vcl/inc/unx/salgdi.h @@ -0,0 +1,387 @@ +/************************************************************************* + * + * 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 _SV_SALGDI_H +#define _SV_SALGDI_H + +// -=-= includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +#include "salstd.hxx" +#include "salgdi.hxx" +#include "vcl/salgtype.hxx" +#include "tools/fract.hxx" +#include "vcl/dllapi.h" +#include +#include +#include + +// -=-= forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +struct ImplFontMetricData; +struct ImplFontSelectData; +class SalBitmap; +class SalColormap; +class SalDisplay; +class SalFrame; +class X11SalVirtualDevice; +class SalPolyLine; +class PspSalPrinter; +class PspSalInfoPrinter; +class ServerFont; +class ImplLayoutArgs; +class X11FontLayout; +class ServerFontLayout; + +namespace basegfx { + class B2DTrapezoid; +} + +// -=-= SalGraphicsData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +class CairoFontsCache +{ +private: + static int mnRefCount; + typedef std::deque< std::pair > LRUFonts; + static LRUFonts maLRUFonts; +public: + CairoFontsCache(); + static void CacheFont(void *pFont, void *pId); + static void* FindCachedFont(void *pId); + ~CairoFontsCache(); +}; + +class VCL_DLLPUBLIC X11SalGraphics : public SalGraphics +{ + friend class X11FontLayout; + friend class ServerFontLayout; +protected: + SalFrame* m_pFrame; // the SalFrame which created this Graphics or NULL + X11SalVirtualDevice* m_pVDev; // the SalVirtualDevice which created this Graphics or NULL + + const SalColormap* m_pColormap; + SalColormap *m_pDeleteColormap; + Drawable hDrawable_; // use + int m_nScreen; + void* m_pRenderFormat; + XID m_aRenderPicture; + CairoFontsCache m_aCairoFontsCache; + + XLIB_Region pPaintRegion_; + XLIB_Region pClipRegion_; + + GC pPenGC_; // Pen attributes + SalColor nPenColor_; + Pixel nPenPixel_; + + GC pFontGC_; // Font attributes + ServerFont* mpServerFont[ MAX_FALLBACK ]; + + SalColor nTextColor_; + Pixel nTextPixel_; + BOOL bFontVertical_; + + BOOL bDisableGraphite_; + + GC pBrushGC_; // Brush attributes + SalColor nBrushColor_; + Pixel nBrushPixel_; + Pixmap hBrush_; // Dither + + GC pMonoGC_; + GC pCopyGC_; + GC pMaskGC_; + GC pInvertGC_; + GC pInvert50GC_; + GC pStippleGC_; + GC pTrackingGC_; + + BOOL bWindow_ : 1; // is Window + BOOL bPrinter_ : 1; // is Printer + BOOL bVirDev_ : 1; // is VirDev + BOOL bPenGC_ : 1; // is Pen GC valid + BOOL bFontGC_ : 1; // is Font GC valid + BOOL bBrushGC_ : 1; // is Brush GC valid + BOOL bMonoGC_ : 1; // is Mono GC valid + BOOL bCopyGC_ : 1; // is Copy GC valid + BOOL bInvertGC_ : 1; // is Invert GC valid + BOOL bInvert50GC_ : 1; // is Invert50 GC valid + BOOL bStippleGC_ : 1; // is Stipple GC valid + BOOL bTrackingGC_ : 1; // is Tracking GC valid + bool bXORMode_ : 1; // is ROP XOR Mode set + BOOL bDitherBrush_ : 1; // is solid or tile + + void SetClipRegion( GC pGC, + XLIB_Region pXReg = NULL ) const; + + GC GetTrackingGC(); + GC GetInvertGC(); + GC GetInvert50GC(); + GC CreateGC( Drawable hDrawable, + unsigned long nMask = GCGraphicsExposures ); + GC SelectPen(); + GC SelectBrush(); + void DrawLines( ULONG nPoints, + const SalPolyLine &rPoints, + GC pGC, + bool bClose + ); + BOOL GetDitherPixmap ( SalColor nSalColor ); + + inline GC GetMonoGC( Pixmap hPixmap ); + inline GC GetCopyGC(); + inline GC GetStippleGC(); + + int Clip ( XLIB_Region pRegion, + int &nX, + int &nY, + unsigned int &nDX, + unsigned int &nDY, + int &nSrcX, + int &nSrcY ) const; + int Clip ( int &nX, + int &nY, + unsigned int &nDX, + unsigned int &nDY, + int &nSrcX, + int &nSrcY ) const; + GC SetMask ( int &nX, + int &nY, + unsigned int &nDX, + unsigned int &nDY, + int &nSrcX, + int &nSrcY, + Pixmap hClipMask ); + using SalGraphics::DrawBitmap; + void DrawBitmap( const SalTwoRect *pPosAry, + SalGraphics *pThis, + const SalBitmap &rSalBitmap, + const SalBitmap &rTransparentBitmap, + SalColor nTransparentColor ); + + GC GetFontGC(); + bool setFont( const ImplFontSelectData* pEntry, int nFallbackLevel ); + + void drawMaskedBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + const SalBitmap& rTransparentBitmap ); + +protected: + void DrawPrinterString( const SalLayout& ); + + void DrawServerFontString( const ServerFontLayout& ); + void DrawServerSimpleFontString( const ServerFontLayout& ); + void DrawServerAAFontString( const ServerFontLayout& ); + bool DrawServerAAForcedString( const ServerFontLayout& ); + void DrawCairoAAFontString( const ServerFontLayout& ); + + void freeResources(); +public: + X11SalGraphics(); + virtual ~X11SalGraphics(); + + void Init( SalFrame *pFrame, Drawable aDrawable, int nScreen ); + void Init( X11SalVirtualDevice *pVirtualDevice, SalColormap* pColormap = NULL, bool bDeleteColormap = false ); + void Init( class ImplSalPrinterData *pPrinter ); + void DeInit(); + + inline const SalDisplay* GetDisplay() const; + inline Display* GetXDisplay() const; + inline const SalVisual& GetVisual() const; + inline Drawable GetDrawable() const { return hDrawable_; } + void SetDrawable( Drawable d, int nScreen ); + XID GetXRenderPicture(); + void* GetXRenderFormat() const { return m_pRenderFormat; } + inline void SetXRenderFormat( void* pRenderFormat ) { m_pRenderFormat = pRenderFormat; } + inline const SalColormap& GetColormap() const { return *m_pColormap; } + using SalGraphics::GetPixel; + inline Pixel GetPixel( SalColor nSalColor ) const; + + int GetScreenNumber() const { return m_nScreen; } + + // overload all pure virtual methods + virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ); + virtual USHORT GetBitCount(); + virtual long GetGraphicsWidth() const; + virtual long GetGraphicsHeight() const; + + virtual void ResetClipRegion(); + virtual void BeginSetClipRegion( ULONG nCount ); + virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ); + virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ); + virtual void EndSetClipRegion(); + + virtual void SetLineColor(); + virtual void SetLineColor( SalColor nSalColor ); + virtual void SetFillColor(); + + virtual void SetFillColor( SalColor nSalColor ); + + virtual void SetXORMode( bool bSet, bool ); + + virtual void SetROPLineColor( SalROPColor nROPColor ); + virtual void SetROPFillColor( SalROPColor nROPColor ); + + virtual void SetTextColor( SalColor nSalColor ); + virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel ); + virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ); + virtual ULONG GetKernPairs( ULONG nMaxPairs, ImplKernPairData* ); + virtual const ImplFontCharMap* GetImplFontCharMap() const; + virtual void GetDevFontList( ImplDevFontList* ); + virtual void GetDevFontSubstList( OutputDevice* ); + virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ); + virtual BOOL CreateFontSubset( const rtl::OUString& rToFile, + const ImplFontData*, + sal_Int32* pGlyphIDs, + sal_uInt8* pEncoding, + sal_Int32* pWidths, + int nGlyphs, + FontSubsetInfo& rInfo + ); + virtual const Ucs2SIntMap* GetFontEncodingVector( const ImplFontData*, const Ucs2OStrMap** ppNonEncoded ); + virtual const void* GetEmbedFontData( const ImplFontData*, + const sal_Ucs* pUnicodes, + sal_Int32* pWidths, + FontSubsetInfo& rInfo, + long* pDataLen ); + virtual void FreeEmbedFontData( const void* pData, long nDataLen ); + virtual void GetGlyphWidths( const ImplFontData*, + bool bVertical, + Int32Vector& rWidths, + Ucs2UIntMap& rUnicodeEnc ); + virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& ); + virtual BOOL GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& ); + virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ); + virtual void DrawServerFontLayout( const ServerFontLayout& ); + virtual bool supportsOperation( OutDevSupportType ) const; + virtual void drawPixel( long nX, long nY ); + virtual void drawPixel( long nX, long nY, SalColor nSalColor ); + virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ); + virtual void drawRect( long nX, long nY, long nWidth, long nHeight ); + void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry, bool bClose ); + virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry ); + virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry ); + virtual void drawPolyPolygon( sal_uInt32 nPoly, + const sal_uInt32* pPoints, + PCONSTSALPOINT* pPtAry ); + virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency ); + virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin ); + virtual bool drawFilledTrapezoids( const ::basegfx::B2DTrapezoid*, int nTrapCount, double fTransparency ); + +#if 1 // TODO: remove these obselete methods + virtual sal_Bool drawPolyLineBezier( ULONG nPoints, + const SalPoint* pPtAry, + const BYTE* pFlgAry ); + virtual sal_Bool drawPolygonBezier( ULONG nPoints, + const SalPoint* pPtAry, + const BYTE* pFlgAry ); + virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, + const sal_uInt32* pPoints, + const SalPoint* const* pPtAry, + const BYTE* const* pFlgAry ); +#endif + + virtual void copyArea( long nDestX, + long nDestY, + long nSrcX, + long nSrcY, + long nSrcWidth, + long nSrcHeight, + USHORT nFlags ); + virtual void copyBits( const SalTwoRect* pPosAry, + SalGraphics* pSrcGraphics ); + virtual void drawBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap ); + virtual void drawBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + SalColor nTransparentColor ); + virtual void drawBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + const SalBitmap& rMaskBitmap ); + virtual void drawMask( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + SalColor nMaskColor ); + virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight ); + virtual SalColor getPixel( long nX, long nY ); + virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags ); + virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags ); + + virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ); + + virtual bool drawAlphaBitmap( const SalTwoRect&, + const SalBitmap& rSourceBitmap, + const SalBitmap& rAlphaBitmap ); + + virtual bool drawAlphaRect( long nX, long nY, long nWidth, + long nHeight, sal_uInt8 nTransparency ); + + virtual SystemGraphicsData GetGraphicsData() const; + virtual SystemFontData GetSysFontData( int nFallbacklevel ) const; + + /* use to handle GraphicsExpose/NoExpose after XCopyArea & friends + * if pFrame is not NULL, corresponding Paint events are generated + * and dispatched to pFrame + * + * it is imperative to eat up graphics exposes even in case you don't need + * them because the next one using XCopyArea can depend on them + */ + void YieldGraphicsExpose(); + + // do XCopyArea or XGet/PutImage depending on screen numbers + // signature is like XCopyArea with screen numbers added + static void CopyScreenArea( Display* pDisplay, + Drawable aSrc, int nScreenSrc, int nSrcDepth, + Drawable aDest, int nScreenDest, int nDestDepth, + GC aDestGC, + int src_x, int src_y, + unsigned int w, unsigned int h, + int dest_x, int dest_y ); + static void releaseGlyphPeer(); +}; + + +inline const SalDisplay *X11SalGraphics::GetDisplay() const +{ return GetColormap().GetDisplay(); } + +inline const SalVisual& X11SalGraphics::GetVisual() const +{ return GetColormap().GetVisual(); } + +inline Display *X11SalGraphics::GetXDisplay() const +{ return GetColormap().GetXDisplay(); } + +inline Pixel X11SalGraphics::GetPixel( SalColor nSalColor ) const +{ return GetColormap().GetPixel( nSalColor ); } + + +// -=-= Shortcuts =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +#ifdef DBG_UTIL +#define stderr0( s ) fprintf( stderr, s ) +#else +#define stderr0( s ) ; +#endif + +#endif // _SV_SALGDI_H + diff --git a/vcl/inc/unx/salinst.h b/vcl/inc/unx/salinst.h new file mode 100644 index 000000000000..15cb4f1c7e65 --- /dev/null +++ b/vcl/inc/unx/salinst.h @@ -0,0 +1,128 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ + +// -=-= includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +#ifndef _SV_SALINST_H +#define _SV_SALINST_H + +#include +#ifndef _VOS_MUTEX_HXX +#include +#endif +#ifndef _VOS_THREAD_HXX +#include +#endif +#include +#include + +class VCL_DLLPUBLIC SalYieldMutex : public vos::OMutex +{ +protected: + ULONG mnCount; + vos::OThread::TThreadIdentifier mnThreadId; + +public: + SalYieldMutex(); + + virtual void acquire(); + virtual void release(); + virtual sal_Bool tryToAcquire(); + + ULONG GetAcquireCount() const { return mnCount; } + vos::OThread::TThreadIdentifier GetThreadId() const { return mnThreadId; } +}; + +// -=-= SalInstanceData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +class VCL_DLLPUBLIC X11SalInstance : public SalInstance +{ +protected: + SalYieldMutex* mpSalYieldMutex; + bool mbPrinterInit; + +public: + X11SalInstance( SalYieldMutex* pMutex ) + : mpSalYieldMutex( pMutex ), + mbPrinterInit( false ) + {} + virtual ~X11SalInstance(); + + virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle ); + virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle ); + virtual void DestroyFrame( SalFrame* pFrame ); + + virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE ); + virtual void DestroyObject( SalObject* pObject ); + + virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics, + long nDX, long nDY, + USHORT nBitCount, const SystemGraphicsData *pData = NULL ); + virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice ); + + virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo, + ImplJobSetup* pSetupData ); + virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter ); + virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter ); + virtual void DestroyPrinter( SalPrinter* pPrinter ); + + virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList ); + virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo ); + virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ); + virtual String GetDefaultPrinter(); + + virtual SalTimer* CreateSalTimer(); + virtual SalI18NImeStatus* CreateI18NImeStatus(); + virtual SalSystem* CreateSalSystem(); + virtual SalBitmap* CreateSalBitmap(); + virtual SalSession* CreateSalSession(); + + virtual vos::IMutex* GetYieldMutex(); + virtual ULONG ReleaseYieldMutex(); + virtual void AcquireYieldMutex( ULONG nCount ); + virtual bool CheckYieldMutex(); + + virtual void Yield( bool bWait, bool bHandleAllCurrentEvents ); + virtual bool AnyInput( USHORT nType ); + + virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ); + void FillFontPathList( std::list< rtl::OString >& o_rFontPaths ); + + // dtrans implementation + virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > + CreateClipboard( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& i_rArguments ); + virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDragSource(); + virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDropTarget(); + virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType); + + + bool isPrinterInit() const + { + return mbPrinterInit; + } +}; + +#endif // _SV_SALINST_H + diff --git a/vcl/inc/unx/salmenu.h b/vcl/inc/unx/salmenu.h new file mode 100644 index 000000000000..09a753ff1d98 --- /dev/null +++ b/vcl/inc/unx/salmenu.h @@ -0,0 +1,65 @@ +/************************************************************************* + * + * 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 _SV_SALMENU_H +#define _SV_SALMENU_H + +#include +#include +#include + + +class X11SalMenu : public SalMenu +{ +public: + X11SalMenu() {} + virtual ~X11SalMenu(); + + virtual BOOL VisibleMenuBar(); // must return TRUE to actually DISPLAY native menu bars + // otherwise only menu messages are processed (eg, OLE on Windows) + + virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ); + virtual void RemoveItem( unsigned nPos ); + virtual void SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos ); + virtual void SetFrame( const SalFrame* pFrame ); + virtual void CheckItem( unsigned nPos, BOOL bCheck ); + virtual void EnableItem( unsigned nPos, BOOL bEnable ); + virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText ); + virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage); + virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName ); + virtual void GetSystemMenuData( SystemMenuData* pData ); +}; + +class X11SalMenuItem : public SalMenuItem +{ +public: + X11SalMenuItem() {} + virtual ~X11SalMenuItem(); +}; + +#endif // _SV_SALMENU_H + diff --git a/vcl/inc/unx/salobj.h b/vcl/inc/unx/salobj.h new file mode 100644 index 000000000000..d2f63dad99aa --- /dev/null +++ b/vcl/inc/unx/salobj.h @@ -0,0 +1,105 @@ +/************************************************************************* + * + * 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 _SV_SALOBJ_H +#define _SV_SALOBJ_H + +#include +#include +#include + +#include + +class SalClipRegion +{ + +public: + + SalClipRegion(); + ~SalClipRegion(); + + void BeginSetClipRegion( ULONG nRects ); + void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); + + XRectangle *EndSetClipRegion() { + return ClipRectangleList; } + void ResetClipRegion() { + numClipRectangles = 0; } + USHORT GetClipRegionType() { + return nClipRegionType; } + void SetClipRegionType( USHORT nType ) { + nClipRegionType = nType; } + int GetRectangleCount() { + return numClipRectangles; } + +private: + + XRectangle* ClipRectangleList; + int numClipRectangles; + int maxClipRectangles; + USHORT nClipRegionType; +}; + + +class X11SalObject : public SalObject +{ +public: + SystemChildData maSystemChildData; + SalFrame* mpParent; + XLIB_Window maPrimary; + XLIB_Window maSecondary; + Colormap maColormap; + SalClipRegion maClipRegion; + BOOL mbVisible; + + static VCL_DLLPUBLIC long Dispatch( XEvent* pEvent ); + static VCL_DLLPUBLIC X11SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE ); + + X11SalObject(); + virtual ~X11SalObject(); + + // overload all pure virtual methods + virtual void ResetClipRegion(); + virtual USHORT GetClipRegionType(); + virtual void BeginSetClipRegion( ULONG nRects ); + virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); + virtual void EndSetClipRegion(); + + virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ); + virtual void Show( BOOL bVisible ); + virtual void Enable( BOOL nEnable ); + virtual void GrabFocus(); + + virtual void SetBackground(); + virtual void SetBackground( SalColor nSalColor ); + + virtual const SystemEnvData* GetSystemData() const; + + virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ); +}; + +#endif // _SV_SALOBJ_H diff --git a/vcl/inc/unx/salprn.h b/vcl/inc/unx/salprn.h new file mode 100644 index 000000000000..b65792e1351a --- /dev/null +++ b/vcl/inc/unx/salprn.h @@ -0,0 +1,126 @@ +/************************************************************************* + * + * 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 _SV_SALPRN_H +#define _SV_SALPRN_H + +#include "vcl/jobdata.hxx" +#include "printergfx.hxx" +#include "printerjob.hxx" +#include "salprn.hxx" + +class PspGraphics; + +class PspSalInfoPrinter : public SalInfoPrinter +{ +public: + PspGraphics* m_pGraphics; + psp::JobData m_aJobData; + psp::PrinterGfx m_aPrinterGfx; + + PspSalInfoPrinter(); + virtual ~PspSalInfoPrinter(); + + // overload all pure virtual methods + virtual SalGraphics* GetGraphics(); + virtual void ReleaseGraphics( SalGraphics* pGraphics ); + virtual BOOL Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ); + virtual BOOL SetPrinterData( ImplJobSetup* pSetupData ); + virtual BOOL SetData( ULONG nFlags, ImplJobSetup* pSetupData ); + virtual void GetPageInfo( const ImplJobSetup* pSetupData, + long& rOutWidth, long& rOutHeight, + long& rPageOffX, long& rPageOffY, + long& rPageWidth, long& rPageHeight ); + virtual ULONG GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType ); + virtual ULONG GetPaperBinCount( const ImplJobSetup* pSetupData ); + virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin ); + virtual void InitPaperFormats( const ImplJobSetup* pSetupData ); + virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData ); +}; + +class PspSalPrinter : public SalPrinter +{ +public: + String m_aFileName; + String m_aTmpFile; + String m_aFaxNr; + bool m_bFax:1; + bool m_bPdf:1; + bool m_bSwallowFaxNo:1; + bool m_bIsPDFWriterJob:1; + PspGraphics* m_pGraphics; + psp::PrinterJob m_aPrintJob; + psp::JobData m_aJobData; + psp::PrinterGfx m_aPrinterGfx; + ULONG m_nCopies; + bool m_bCollate; + SalInfoPrinter* m_pInfoPrinter; + + PspSalPrinter( SalInfoPrinter* ); + virtual ~PspSalPrinter(); + + // overload all pure virtual methods + using SalPrinter::StartJob; + virtual BOOL StartJob( const XubString* pFileName, + const XubString& rJobName, + const XubString& rAppName, + ULONG nCopies, + bool bCollate, + bool bDirect, + ImplJobSetup* pSetupData ); + virtual BOOL StartJob( const String*, + const String&, + const String&, + ImplJobSetup*, + vcl::PrinterController& i_rController ); + virtual BOOL EndJob(); + virtual BOOL AbortJob(); + virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData ); + virtual BOOL EndPage(); + virtual ULONG GetErrorCode(); +}; + +class Timer; + +namespace vcl_sal { +class VCL_DLLPUBLIC PrinterUpdate +{ + static Timer* pPrinterUpdateTimer; + static int nActiveJobs; + + static void doUpdate(); + DECL_STATIC_LINK( PrinterUpdate, UpdateTimerHdl, void* ); +public: + static void update(); + static void jobStarted() { nActiveJobs++; } + static void jobEnded(); +}; +} + +#endif // _SV_SALPRN_H + + diff --git a/vcl/inc/unx/salstd.hxx b/vcl/inc/unx/salstd.hxx new file mode 100644 index 000000000000..cc03b3fb35a4 --- /dev/null +++ b/vcl/inc/unx/salstd.hxx @@ -0,0 +1,77 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SALSTD_HXX +#define _SALSTD_HXX + +// -=-= includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +#include +#include +#include +#include + +// -=-= X-Lib forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +#ifndef _SVUNX_H +typedef unsigned long Pixel; +typedef unsigned long XID; +typedef unsigned long XLIB_Time; +typedef unsigned long XtIntervalId; + +typedef XID Colormap; +typedef XID Drawable; +typedef XID Pixmap; +typedef XID XLIB_Cursor; +typedef XID XLIB_Font; +typedef XID XLIB_Window; + +typedef struct _XDisplay Display; +typedef struct _XGC *GC; +typedef struct _XImage XImage; +typedef struct _XRegion *XLIB_Region; + +typedef union _XEvent XEvent; + +typedef struct _XConfigureEvent XConfigureEvent; +typedef struct _XReparentEvent XReparentEvent; +typedef struct _XClientMessageEvent XClientMessageEvent; +typedef struct _XErrorEvent XErrorEvent; + +struct Screen; +struct Visual; +struct XColormapEvent; +struct XFocusChangeEvent; +struct XFontStruct; +struct XKeyEvent; +struct XPropertyEvent; +struct XTextItem; +struct XWindowChanges; + +#define None 0L +#endif + +#endif + diff --git a/vcl/inc/unx/salsys.h b/vcl/inc/unx/salsys.h new file mode 100644 index 000000000000..a62a3384a17e --- /dev/null +++ b/vcl/inc/unx/salsys.h @@ -0,0 +1,67 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ + +// -=-= includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +#ifndef _SV_SALSYS_H +#define _SV_SALSYS_H + +#include +#ifndef _VOS_MUTEX_HXX +#include +#endif +#ifndef _VOS_THREAD_HXX +#include +#endif +#include +#include + +#include + +class VCL_DLLPUBLIC X11SalSystem : public SalSystem +{ +public: + X11SalSystem() {} + virtual ~X11SalSystem(); + + // overload pure virtual methods + virtual unsigned int GetDisplayScreenCount(); + virtual bool IsMultiDisplay(); + virtual unsigned int GetDefaultDisplayNumber(); + virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ); + virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen ); + virtual rtl::OUString GetScreenName( unsigned int nScreen ); + virtual int ShowNativeDialog( const String& rTitle, + const String& rMessage, + const std::list< String >& rButtons, + int nDefButton ); + virtual int ShowNativeMessageBox( const String& rTitle, + const String& rMessage, + int nButtonCombination, + int nDefaultButton); +}; + +#endif // _SV_SALSYS_H diff --git a/vcl/inc/unx/saltimer.h b/vcl/inc/unx/saltimer.h new file mode 100644 index 000000000000..9edab5f15981 --- /dev/null +++ b/vcl/inc/unx/saltimer.h @@ -0,0 +1,44 @@ +/************************************************************************* + * + * 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 _SV_SALTIMER_H +#define _SV_SALTIMER_H + +#include + +class X11SalTimer : public SalTimer +{ +public: + X11SalTimer() {} + virtual ~X11SalTimer(); + + // overload all pure virtual methods + void Start( ULONG nMS ); + void Stop(); +}; + +#endif diff --git a/vcl/inc/unx/salunx.h b/vcl/inc/unx/salunx.h new file mode 100644 index 000000000000..6e55285d3586 --- /dev/null +++ b/vcl/inc/unx/salunx.h @@ -0,0 +1,128 @@ +/************************************************************************* + * + * 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 _SALUNX_H +#define _SALUNX_H + +// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +#if defined SCO || defined LINUX || defined HPUX || defined FREEBSD || defined NETBSD +#include +#elif defined AIX +#include +#include +#include +#endif +#include +#include + +// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +#define capacityof(a) (sizeof(a)/sizeof(*a)) + +// -=-= inlines =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +inline long Divide( long nDividend, long nDivisor ) +{ return (nDividend + nDivisor/2) / nDivisor; } + +inline long DPI( long pixel, long mm ) +{ return Divide( pixel*254, mm*10 ); } + +// -=-= timeval =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +inline int operator >= ( const timeval &t1, const timeval &t2 ) +{ + if( t1.tv_sec == t2.tv_sec ) + return t1.tv_usec >= t2.tv_usec; + return t1.tv_sec > t2.tv_sec; +} + +inline int operator > ( const timeval &t1, const timeval &t2 ) +{ + if( t1.tv_sec == t2.tv_sec ) + return t1.tv_usec > t2.tv_usec; + return t1.tv_sec > t2.tv_sec; +} + +inline int operator == ( const timeval &t1, const timeval &t2 ) +{ + if( t1.tv_sec == t2.tv_sec ) + return t1.tv_usec == t2.tv_usec; + return FALSE; +} + +inline timeval &operator -= ( timeval &t1, const timeval &t2 ) +{ + if( t1.tv_usec < t2.tv_usec ) + { + t1.tv_sec--; + t1.tv_usec += 1000000; + } + t1.tv_sec -= t2.tv_sec; + t1.tv_usec -= t2.tv_usec; + return t1; +} + +inline timeval &operator += ( timeval &t1, const timeval &t2 ) +{ + t1.tv_sec += t2.tv_sec; + t1.tv_usec += t2.tv_usec; + if( t1.tv_usec > 1000000 ) + { + t1.tv_sec++; + t1.tv_usec -= 1000000; + } + return t1; +} + +inline timeval &operator += ( timeval &t1, ULONG t2 ) +{ + t1.tv_sec += t2 / 1000; + t1.tv_usec += t2 ? (t2 % 1000) * 1000 : 500; + if( t1.tv_usec > 1000000 ) + { + t1.tv_sec++; + t1.tv_usec -= 1000000; + } + return t1; +} + +inline timeval operator + ( const timeval &t1, const timeval &t2 ) +{ + timeval t0 = t1; + return t0 += t2; +} + +inline timeval operator + ( const timeval &t1, ULONG t2 ) +{ + timeval t0 = t1; + return t0 += t2; +} + +inline timeval operator - ( const timeval &t1, const timeval &t2 ) +{ + timeval t0 = t1; + return t0 -= t2; +} +#endif + diff --git a/vcl/inc/unx/salvd.h b/vcl/inc/unx/salvd.h new file mode 100644 index 000000000000..aa5676fdbdeb --- /dev/null +++ b/vcl/inc/unx/salvd.h @@ -0,0 +1,101 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SV_SALVD_H +#define _SV_SALVD_H + +// -=-= #includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +#include +#include + +// -=-= forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +class SalDisplay; +class X11SalGraphics; + +// -=-= SalVirDevData -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +class X11SalVirtualDevice : public SalVirtualDevice +{ + SalDisplay *pDisplay_; + X11SalGraphics *pGraphics_; + + + Pixmap hDrawable_; + int m_nScreen; + + int nDX_; + int nDY_; + USHORT nDepth_; + BOOL bGraphics_; // is Graphics used + BOOL bExternPixmap_; + +public: + X11SalVirtualDevice(); + virtual ~X11SalVirtualDevice(); + + BOOL Init( SalDisplay *pDisplay, + long nDX, long nDY, + USHORT nBitCount, + int nScreen, + Pixmap hDrawable = None, + void* pRenderFormat = NULL ); + inline void InitGraphics( X11SalVirtualDevice *pVD ); + + inline Display *GetXDisplay() const; + inline SalDisplay *GetDisplay() const; + inline BOOL IsDisplay() const; + inline Pixmap GetDrawable() const { return hDrawable_; } + inline USHORT GetDepth() const { return nDepth_; } + int GetWidth() const { return nDX_; } + int GetHeight() const { return nDY_; } + int GetScreenNumber() const { return m_nScreen; } + + virtual SalGraphics* GetGraphics(); + virtual void ReleaseGraphics( SalGraphics* pGraphics ); + + // Set new size, without saving the old contents + virtual BOOL SetSize( long nNewDX, long nNewDY ); + virtual void GetSize( long& rWidth, long& rHeight ); +}; + +#ifdef _SV_SALDISP_HXX + +inline void X11SalVirtualDevice::InitGraphics( X11SalVirtualDevice *pVD ) +{ pGraphics_->Init( pVD ); } + +inline Display *X11SalVirtualDevice::GetXDisplay() const +{ return pDisplay_->GetDisplay(); } + +inline SalDisplay *X11SalVirtualDevice::GetDisplay() const +{ return pDisplay_; } + +inline BOOL X11SalVirtualDevice::IsDisplay() const +{ return pDisplay_->IsDisplay(); } + +#endif + +#endif // _SV_SALVD_H + diff --git a/vcl/inc/unx/sm.hxx b/vcl/inc/unx/sm.hxx new file mode 100644 index 000000000000..4c6a0c356c36 --- /dev/null +++ b/vcl/inc/unx/sm.hxx @@ -0,0 +1,91 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _VCL_SM_HXX +#define _VCL_SM_HXX + +#include +#include +#include +#include + +class SessionManagerClient +{ + static SmcConn aSmcConnection; + static ByteString aClientID; + static bool bDocSaveDone; + + static void SaveYourselfProc( SmcConn connection, + SmPointer client_data, + int save_type, + Bool shutdown, + int interact_style, + Bool fast ); + static void DieProc( SmcConn connection, + SmPointer client_data ); + static void SaveCompleteProc( SmcConn connection, + SmPointer client_data ); + static void ShutdownCanceledProc( SmcConn connection, + SmPointer client_data ); + static void InteractProc( SmcConn connection, + SmPointer clientData ); + + static const ByteString& getPreviousSessionID(); + + DECL_STATIC_LINK( SessionManagerClient, ShutDownHdl, void* ); + DECL_STATIC_LINK( SessionManagerClient, ShutDownCancelHdl, void* ); + DECL_STATIC_LINK( SessionManagerClient, SaveYourselfHdl, void* ); + DECL_STATIC_LINK( SessionManagerClient, InteractionHdl, void* ); +public: + static VCL_DLLPUBLIC void open(); // needed by other plugins, so export + static void close(); + + static bool checkDocumentsSaved(); + static bool queryInteraction(); + static void saveDone(); + static void interactionDone( bool bCancelShutdown ); + + static String getExecName(); + static VCL_DLLPUBLIC const ByteString& getSessionID(); +}; + +class SalFrame; + +class IceSalSession : public SalSession +{ +public: + IceSalSession(); + virtual ~IceSalSession(); + + virtual void queryInteraction(); + virtual void interactionDone(); + virtual void saveDone(); + virtual bool cancelShutdown(); + + static void handleOldX11SaveYourself( SalFrame* pFrame ); +}; + +#endif diff --git a/vcl/inc/unx/soicon.hxx b/vcl/inc/unx/soicon.hxx new file mode 100644 index 000000000000..419f9b2cc54a --- /dev/null +++ b/vcl/inc/unx/soicon.hxx @@ -0,0 +1,37 @@ +/************************************************************************* + * + * 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 _SV_SOICON_HXX +#define _SV_SOICON_HXX + +class SalDisplay; +class SalBitmap; +class Bitmap; + +BOOL SelectAppIconPixmap( SalDisplay *pDisplay, int nScreen, + USHORT nIcon, USHORT iconSize, + Pixmap& icon_pixmap, Pixmap& icon_mask ); +#endif diff --git a/vcl/inc/unx/strhelper.hxx b/vcl/inc/unx/strhelper.hxx new file mode 100644 index 000000000000..cd0220b77e05 --- /dev/null +++ b/vcl/inc/unx/strhelper.hxx @@ -0,0 +1,41 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SV_STRHELPER_HXX +#define _SV_STRHELPER_HXX +#include + +String GetCommandLineToken( int, const String& ); +// gets one token of a unix command line style string +// doublequote, singlequote and singleleftquote protect their respective +// contents + +int GetCommandLineTokenCount( const String& ); +// returns number of tokens (zero if empty or whitespace only) + +String WhitespaceToSpace( const String&, BOOL bProtect = TRUE ); + +#endif diff --git a/vcl/inc/unx/svsys.h b/vcl/inc/unx/svsys.h new file mode 100644 index 000000000000..a2ee16f7091d --- /dev/null +++ b/vcl/inc/unx/svsys.h @@ -0,0 +1,32 @@ +/************************************************************************* + * + * 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 _SV_SVSYS_H +#define _SV_SVSYS_H + +#include + +#endif // _SV_SVSYS_H diff --git a/vcl/inc/unx/svunx.h b/vcl/inc/unx/svunx.h new file mode 100644 index 000000000000..e7d6150b79f4 --- /dev/null +++ b/vcl/inc/unx/svunx.h @@ -0,0 +1,35 @@ +/************************************************************************* + * + * 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 _SVUNX_H +#define _SVUNX_H + +#include +#include + +#endif + diff --git a/vcl/inc/unx/wmadaptor.hxx b/vcl/inc/unx/wmadaptor.hxx new file mode 100644 index 000000000000..e8620db29c6f --- /dev/null +++ b/vcl/inc/unx/wmadaptor.hxx @@ -0,0 +1,354 @@ +/************************************************************************* + * + * 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 _VCL_WMADAPTOR_HXX_ +#define _VCL_WMADAPTOR_HXX_ + +#ifndef _TL_STRING_HXX +#include +#endif +#include +#include +#ifndef _PREX_H +#include +#include +#include +#endif +#include + +class SalDisplay; +class X11SalFrame; + +namespace vcl_sal { + +class VCL_DLLPUBLIC WMAdaptor +{ +public: + enum WMAtom { + // atoms for types + UTF8_STRING, + + // atoms for extended WM hints + NET_SUPPORTED, + NET_SUPPORTING_WM_CHECK, + NET_WM_NAME, + NET_WM_DESKTOP, + NET_WM_ICON_NAME, + NET_WM_PID, + NET_WM_PING, + NET_WM_STATE, + NET_WM_STATE_MAXIMIZED_HORZ, + NET_WM_STATE_MAXIMIZED_VERT, + NET_WM_STATE_MODAL, + NET_WM_STATE_SHADED, + NET_WM_STATE_SKIP_PAGER, + NET_WM_STATE_SKIP_TASKBAR, + NET_WM_STATE_STAYS_ON_TOP, + NET_WM_STATE_STICKY, + NET_WM_STATE_FULLSCREEN, + NET_WM_STRUT, + NET_WM_STRUT_PARTIAL, + NET_WM_USER_TIME, + NET_WM_WINDOW_TYPE, + NET_WM_WINDOW_TYPE_DESKTOP, + NET_WM_WINDOW_TYPE_DIALOG, + NET_WM_WINDOW_TYPE_DOCK, + NET_WM_WINDOW_TYPE_MENU, + NET_WM_WINDOW_TYPE_NORMAL, + NET_WM_WINDOW_TYPE_TOOLBAR, + KDE_NET_WM_WINDOW_TYPE_OVERRIDE, + NET_WM_WINDOW_TYPE_SPLASH, + NET_WM_WINDOW_TYPE_UTILITY, + NET_NUMBER_OF_DESKTOPS, + NET_CURRENT_DESKTOP, + NET_WORKAREA, + + // atoms for Gnome WM hints + WIN_SUPPORTING_WM_CHECK, + WIN_PROTOCOLS, + WIN_WORKSPACE_COUNT, + WIN_WORKSPACE, + WIN_LAYER, + WIN_STATE, + WIN_HINTS, + WIN_APP_STATE, + WIN_EXPANDED_SIZE, + WIN_ICONS, + WIN_WORKSPACE_NAMES, + WIN_CLIENT_LIST, + + // atoms for general WM hints + WM_STATE, + MOTIF_WM_HINTS, + WM_PROTOCOLS, + WM_DELETE_WINDOW, + WM_TAKE_FOCUS, + WM_SAVE_YOURSELF, + WM_CLIENT_LEADER, + WM_COMMAND, + WM_LOCALE_NAME, + WM_TRANSIENT_FOR, + + // special atoms + SAL_QUITEVENT, + SAL_USEREVENT, + SAL_EXTTEXTEVENT, + SAL_GETTIMEEVENT, + DTWM_IS_RUNNING, + VCL_SYSTEM_SETTINGS, + XSETTINGS, + XEMBED, + XEMBED_INFO, + NetAtomMax + }; + + /* + * flags for frame decoration + */ + static const int decoration_Title = 0x00000001; + static const int decoration_Border = 0x00000002; + static const int decoration_Resize = 0x00000004; + static const int decoration_MinimizeBtn = 0x00000008; + static const int decoration_MaximizeBtn = 0x00000010; + static const int decoration_CloseBtn = 0x00000020; + static const int decoration_All = 0x10000000; + + /* + * window type + */ + enum WMWindowType + { + windowType_Normal, + windowType_ModalDialogue, + windowType_ModelessDialogue, + windowType_Utility, + windowType_Splash, + windowType_Toolbar, + windowType_Dock + }; + +protected: + SalDisplay* m_pSalDisplay; // Display to use + Display* m_pDisplay; // X Display of SalDisplay + String m_aWMName; + Atom m_aWMAtoms[ NetAtomMax]; + int m_nDesktops; + bool m_bEqualWorkAreas; + ::std::vector< Rectangle > + m_aWMWorkAreas; + bool m_bTransientBehaviour; + bool m_bEnableAlwaysOnTopWorks; + bool m_bLegacyPartialFullscreen; + int m_nWinGravity; + int m_nInitWinGravity; + bool m_bWMshouldSwitchWorkspace; + bool m_bWMshouldSwitchWorkspaceInit; + + WMAdaptor( SalDisplay * ) +; + void initAtoms(); + bool getNetWmName(); + + /* + * returns whether this instance is useful + * only useful for createWMAdaptor + */ + virtual bool isValid() const; + + bool getWMshouldSwitchWorkspace() const; +public: + virtual ~WMAdaptor(); + + /* + * creates a vaild WMAdaptor instance for the SalDisplay + */ + static WMAdaptor* createWMAdaptor( SalDisplay* ); + + /* + * may return an empty string if the window manager could + * not be identified. + */ + const String& getWindowManagerName() const + { return m_aWMName; } + + /* + * gets the number of workareas + */ + int getWorkAreaCount() const + { return m_aWMWorkAreas.size(); } + + /* + * gets the current work area/desktop number: [0,m_nDesktops[ or -1 if unknown + */ + int getCurrentWorkArea() const; + /* + * gets the workarea the specified window is on (or -1) + */ + int getWindowWorkArea( XLIB_Window aWindow ) const; + /* + * gets the specified workarea + */ + const Rectangle& getWorkArea( int n ) const + { return m_aWMWorkAreas[n]; } + + /* + * attemp to switch the desktop to a certain workarea + * if bConsiderWM is true, then on some WMs the call will not result in any action + */ + void switchToWorkArea( int nWorkArea, bool bConsiderWM = true ) const; + + /* + * sets window title + */ + virtual void setWMName( X11SalFrame* pFrame, const String& rWMName ) const; + + /* + * set NET_WM_PID + */ + virtual void setPID( X11SalFrame* pFrame ) const; + + /* + * set WM_CLIENT_MACHINE + */ + virtual void setClientMachine( X11SalFrame* pFrame ) const; + + virtual void answerPing( X11SalFrame*, XClientMessageEvent* ) const; + + /* + * maximizes frame + * maximization can be toggled in either direction + * to get the original position and size + * use maximizeFrame( pFrame, false, false ) + */ + virtual void maximizeFrame( X11SalFrame* pFrame, bool bHorizontal = true, bool bVertical = true ) const; + /* + * start/stop fullscreen mode on a frame + */ + virtual void showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const; + /* + * tell whether legacy partial full screen handling is necessary + * see #i107249#: NET_WM_STATE_FULLSCREEN is not well defined, but de facto + * modern WM's interpret it the "right" way, namely they make "full screen" + * taking twin view or Xinerama into accound and honor the positioning hints + * to see which screen actually was meant to use for fullscreen. + */ + bool isLegacyPartialFullscreen() const + { return m_bLegacyPartialFullscreen; } + /* + * set window struts + */ + virtual void setFrameStruts( X11SalFrame*pFrame, + int left, int right, int top, int bottom, + int left_start_y, int left_end_y, + int right_start_y, int right_end_y, + int top_start_x, int top_end_x, + int bottom_start_x, int bottom_end_x ) const; + /* + * set _NET_WM_USER_TIME property, if NetWM + */ + virtual void setUserTime( X11SalFrame* i_pFrame, long i_nUserTime ) const; + + /* + * tells whether fullscreen mode is supported by WM + */ + bool supportsFullScreen() const { return m_aWMAtoms[ NET_WM_STATE_FULLSCREEN ] != 0; } + + /* + * shade/unshade frame + */ + virtual void shade( X11SalFrame* pFrame, bool bToShaded ) const; + + /* + * set hints what decoration is needed; + * must be called before showing the frame + */ + virtual void setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eType, int nDecorationFlags, X11SalFrame* pTransientFrame = NULL ) const; + + /* + * tells whether there is WM support for splash screens + */ + bool supportsSplash() const { return m_aWMAtoms[ NET_WM_WINDOW_TYPE_SPLASH ] != 0; } + + /* + * tells whteher there is WM support for NET_WM_WINDOW_TYPE_TOOLBAR + */ + bool supportsToolbar() const { return m_aWMAtoms[ NET_WM_WINDOW_TYPE_TOOLBAR ] != 0; } + + /* + * enables always on top or equivalent if possible + */ + virtual void enableAlwaysOnTop( X11SalFrame* pFrame, bool bEnable ) const; + + /* + * tells whether enableAlwaysOnTop actually works with this WM + */ + bool isAlwaysOnTopOK() const { return m_bEnableAlwaysOnTopWorks; } + + /* + * handle WM messages (especially WM state changes) + */ + virtual int handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEvent ) const; + + /* + * called by SalFrame::Show: time to update state properties + */ + virtual void frameIsMapping( X11SalFrame* ) const; + + /* + * gets a WM atom + */ + Atom getAtom( WMAtom eAtom ) const + { return m_aWMAtoms[ eAtom ]; } + + /* + * supports correct positioning + */ + + virtual bool supportsICCCMPos () const; + + int getPositionWinGravity () const + { return m_nWinGravity; } + int getInitWinGravity() const + { return m_nInitWinGravity; } + + /* + * expected behaviour is that the WM will not allow transient + * windows to get stacked behind the windows they are transient for + */ + bool isTransientBehaviourAsExpected() const + { return m_bTransientBehaviour; } + + /* + * changes the transient hint of a window to reference frame + * if reference frame is NULL the root window is used instead + */ + void changeReferenceFrame( X11SalFrame* pFrame, X11SalFrame* pReferenceFrame ) const; +}; + +} // namespace + +#endif diff --git a/vcl/inc/unx/x11_cursors/airbrush_curs.h b/vcl/inc/unx/x11_cursors/airbrush_curs.h new file mode 100644 index 000000000000..293c9757e77b --- /dev/null +++ b/vcl/inc/unx/x11_cursors/airbrush_curs.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define airbrush_curs_width 32 +#define airbrush_curs_height 32 +#define airbrush_curs_x_hot 5 +#define airbrush_curs_y_hot 22 +static char airbrush_curs_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x78,0x00,0x00,0x00, + 0x7c,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x1f,0x00,0x00,0x98,0x0f,0x00,0x00, + 0xcc,0x07,0x00,0x00,0xb4,0x03,0x00,0x00,0x10,0x01,0x00,0x00,0x88,0x00,0x00, + 0x00,0x44,0x00,0x00,0x00,0x62,0x60,0x00,0x00,0x91,0x10,0x00,0x80,0x88,0x10, + 0x00,0x40,0x04,0x09,0x00,0x40,0x02,0x06,0x00,0xa0,0x01,0x00,0x00,0x60,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/airbrush_mask.h b/vcl/inc/unx/x11_cursors/airbrush_mask.h new file mode 100644 index 000000000000..811ea2819669 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/airbrush_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define airbrush_mask_width 32 +#define airbrush_mask_height 32 +#define airbrush_mask_x_hot 5 +#define airbrush_mask_y_hot 22 +static char airbrush_mask_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x78,0x00,0x00,0x00, + 0x7c,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x1f,0x00,0x00,0x98,0x0f,0x00,0x00, + 0xcc,0x07,0x00,0x00,0xf4,0x03,0x00,0x00,0xf0,0x01,0x00,0x00,0xf8,0x00,0x00, + 0x00,0x7c,0x00,0x00,0x00,0x7e,0x60,0x00,0x00,0x9f,0x10,0x00,0x80,0x8f,0x10, + 0x00,0xc0,0x07,0x09,0x00,0xc0,0x03,0x06,0x00,0xe0,0x01,0x00,0x00,0x60,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/ase_curs.h b/vcl/inc/unx/x11_cursors/ase_curs.h new file mode 100644 index 000000000000..52b67f56d2ae --- /dev/null +++ b/vcl/inc/unx/x11_cursors/ase_curs.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define ase_curs_width 32 +#define ase_curs_height 32 +#define ase_curs_x_hot 19 +#define ase_curs_y_hot 16 +static char ase_curs_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x1c,0x0e, + 0x00,0x00,0x3e,0x1e,0x00,0x00,0x3e,0x7e,0x00,0x00,0x3e,0x1e,0x00,0x00,0x1c, + 0x0e,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/ase_mask.h b/vcl/inc/unx/x11_cursors/ase_mask.h new file mode 100644 index 000000000000..5dbd5c134dbf --- /dev/null +++ b/vcl/inc/unx/x11_cursors/ase_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define ase_mask_width 32 +#define ase_mask_height 32 +#define ase_mask_x_hot 19 +#define ase_mask_y_hot 16 +static char ase_mask_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x9c,0x0f,0x00,0x00,0x3e,0x1f, + 0x00,0x00,0x7f,0x7f,0x00,0x00,0x7f,0xff,0x00,0x00,0x7f,0x7f,0x00,0x00,0x3e, + 0x1f,0x00,0x00,0x9c,0x0f,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/asn_curs.h b/vcl/inc/unx/x11_cursors/asn_curs.h new file mode 100644 index 000000000000..3b5f4364b5e2 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/asn_curs.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define asn_curs_width 32 +#define asn_curs_height 32 +#define asn_curs_x_hot 16 +#define asn_curs_y_hot 12 +static char asn_curs_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x80,0x03, + 0x00,0x00,0xc0,0x07,0x00,0x00,0xc0,0x07,0x00,0x00,0xe0,0x0f,0x00,0x00,0x20, + 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x03,0x00,0x00, + 0xc0,0x07,0x00,0x00,0xc0,0x07,0x00,0x00,0xc0,0x07,0x00,0x00,0x80,0x03,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/asn_mask.h b/vcl/inc/unx/x11_cursors/asn_mask.h new file mode 100644 index 000000000000..902fe80df8a1 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/asn_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define asn_mask_width 32 +#define asn_mask_height 32 +#define asn_mask_x_hot 16 +#define asn_mask_y_hot 12 +static char asn_mask_bits[] = { + 0x00,0x00,0x01,0x00,0x00,0x80,0x03,0x00,0x00,0x80,0x03,0x00,0x00,0xc0,0x07, + 0x00,0x00,0xe0,0x0f,0x00,0x00,0xe0,0x0f,0x00,0x00,0xf0,0x1f,0x00,0x00,0xf0, + 0x1f,0x00,0x00,0x20,0x08,0x00,0x00,0x80,0x03,0x00,0x00,0xc0,0x07,0x00,0x00, + 0xe0,0x0f,0x00,0x00,0xe0,0x0f,0x00,0x00,0xe0,0x0f,0x00,0x00,0xc0,0x07,0x00, + 0x00,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/asne_curs.h b/vcl/inc/unx/x11_cursors/asne_curs.h new file mode 100644 index 000000000000..0939b1d07e4b --- /dev/null +++ b/vcl/inc/unx/x11_cursors/asne_curs.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define asne_curs_width 32 +#define asne_curs_height 32 +#define asne_curs_x_hot 21 +#define asne_curs_y_hot 10 +static char asne_curs_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x80, + 0x3f,0x00,0x00,0xc0,0x3f,0x00,0x00,0x00,0x3f,0x00,0x00,0x00,0x1c,0x00,0x00, + 0x00,0x1c,0x00,0x00,0x70,0x18,0x00,0x00,0xf8,0x08,0x00,0x00,0xf8,0x00,0x00, + 0x00,0xf8,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/asne_mask.h b/vcl/inc/unx/x11_cursors/asne_mask.h new file mode 100644 index 000000000000..9ab55c293218 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/asne_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define asne_mask_width 32 +#define asne_mask_height 32 +#define asne_mask_x_hot 21 +#define asne_mask_y_hot 10 +static char asne_mask_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x80,0x7f,0x00,0x00,0xc0, + 0x7f,0x00,0x00,0xe0,0x7f,0x00,0x00,0xc0,0x7f,0x00,0x00,0x00,0x3f,0x00,0x00, + 0x70,0x3e,0x00,0x00,0xf8,0x3c,0x00,0x00,0xfc,0x1d,0x00,0x00,0xfc,0x09,0x00, + 0x00,0xfc,0x01,0x00,0x00,0xf8,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/asns_curs.h b/vcl/inc/unx/x11_cursors/asns_curs.h new file mode 100644 index 000000000000..fef8fe2f4ab5 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/asns_curs.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define asns_curs_width 32 +#define asns_curs_height 32 +#define asns_curs_x_hot 15 +#define asns_curs_y_hot 15 +static char asns_curs_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0, + 0x03,0x00,0x00,0xe0,0x03,0x00,0x00,0xf0,0x07,0x00,0x00,0x10,0x04,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0,0x03,0x00, + 0x00,0xe0,0x03,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x04,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0, + 0x03,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00,0x80,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/asns_mask.h b/vcl/inc/unx/x11_cursors/asns_mask.h new file mode 100644 index 000000000000..f90cb95ee721 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/asns_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define asns_mask_width 32 +#define asns_mask_height 32 +#define asns_mask_x_hot 15 +#define asns_mask_y_hot 15 +static char asns_mask_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00, + 0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0,0x03,0x00,0x00,0xf0, + 0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf8,0x0f,0x00,0x00, + 0x10,0x04,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0,0x03,0x00,0x00,0xf0,0x07,0x00, + 0x00,0xf0,0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01, + 0x00,0x00,0x10,0x04,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf0, + 0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00, + 0xc0,0x01,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/asnswe_curs.h b/vcl/inc/unx/x11_cursors/asnswe_curs.h new file mode 100644 index 000000000000..fd6ddaca65cb --- /dev/null +++ b/vcl/inc/unx/x11_cursors/asnswe_curs.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define asnswe_curs_width 32 +#define asnswe_curs_height 32 +#define asnswe_curs_x_hot 15 +#define asnswe_curs_y_hot 15 +static char asnswe_curs_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0, + 0x03,0x00,0x00,0xe0,0x03,0x00,0x00,0xf0,0x07,0x00,0x00,0x10,0x04,0x00,0x00, + 0x00,0x00,0x00,0x00,0x06,0x30,0x00,0x80,0xc3,0xe1,0x00,0xc0,0xe3,0xe3,0x01, + 0xf0,0xe3,0xe3,0x07,0xc0,0xe3,0xe3,0x01,0x80,0xc3,0xe1,0x00,0x00,0x06,0x30, + 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x04,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0, + 0x03,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00,0x80,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/asnswe_mask.h b/vcl/inc/unx/x11_cursors/asnswe_mask.h new file mode 100644 index 000000000000..e48da90e3de5 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/asnswe_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define asnswe_mask_width 32 +#define asnswe_mask_height 32 +#define asnswe_mask_x_hot 15 +#define asnswe_mask_y_hot 15 +static char asnswe_mask_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00, + 0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0,0x03,0x00,0x00,0xf0, + 0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf8,0x0f,0x00,0x00, + 0x16,0x34,0x00,0x80,0xcf,0xf9,0x00,0xc0,0xe7,0xf3,0x01,0xf0,0xf7,0xf7,0x07, + 0xf8,0xf7,0xf7,0x0f,0xf0,0xf7,0xf7,0x07,0xc0,0xe7,0xf3,0x01,0x80,0xcf,0xf9, + 0x00,0x00,0x16,0x34,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf0, + 0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00, + 0xc0,0x01,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/asnw_curs.h b/vcl/inc/unx/x11_cursors/asnw_curs.h new file mode 100644 index 000000000000..cb3a35d793c7 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/asnw_curs.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define asnw_curs_width 32 +#define asnw_curs_height 32 +#define asnw_curs_x_hot 10 +#define asnw_curs_y_hot 10 +static char asnw_curs_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0xfc,0x01,0x00, + 0x00,0xfc,0x03,0x00,0x00,0xfc,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x38,0x00, + 0x00,0x00,0x18,0x0e,0x00,0x00,0x10,0x1f,0x00,0x00,0x00,0x1f,0x00,0x00,0x00, + 0x1f,0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/asnw_mask.h b/vcl/inc/unx/x11_cursors/asnw_mask.h new file mode 100644 index 000000000000..e583957c4bae --- /dev/null +++ b/vcl/inc/unx/x11_cursors/asnw_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define asnw_mask_width 32 +#define asnw_mask_height 32 +#define asnw_mask_x_hot 10 +#define asnw_mask_y_hot 10 +static char asnw_mask_bits[] = { + 0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0xfe,0x01,0x00,0x00,0xfe,0x03,0x00, + 0x00,0xfe,0x07,0x00,0x00,0xfe,0x03,0x00,0x00,0xfc,0x00,0x00,0x00,0x7c,0x0e, + 0x00,0x00,0x3c,0x1f,0x00,0x00,0xb8,0x3f,0x00,0x00,0x90,0x3f,0x00,0x00,0x80, + 0x3f,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/ass_curs.h b/vcl/inc/unx/x11_cursors/ass_curs.h new file mode 100644 index 000000000000..ea942cefe942 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/ass_curs.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define ass_curs_width 32 +#define ass_curs_height 32 +#define ass_curs_x_hot 15 +#define ass_curs_y_hot 19 +static char ass_curs_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0,0x03, + 0x00,0x00,0xe0,0x03,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x04,0x00,0x00,0xf0,0x07,0x00,0x00, + 0xe0,0x03,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00,0x80,0x00,0x00, + 0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/ass_mask.h b/vcl/inc/unx/x11_cursors/ass_mask.h new file mode 100644 index 000000000000..b35298183cb1 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/ass_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define ass_mask_width 32 +#define ass_mask_height 32 +#define ass_mask_x_hot 15 +#define ass_mask_y_hot 19 +static char ass_mask_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0,0x03,0x00,0x00,0xf0,0x07, + 0x00,0x00,0xf0,0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0, + 0x01,0x00,0x00,0x10,0x04,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf8,0x0f,0x00,0x00, + 0xf0,0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00, + 0x00,0xc0,0x01,0x00,0x00,0x80,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/asse_curs.h b/vcl/inc/unx/x11_cursors/asse_curs.h new file mode 100644 index 000000000000..4b30e81882ff --- /dev/null +++ b/vcl/inc/unx/x11_cursors/asse_curs.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define asse_curs_width 32 +#define asse_curs_height 32 +#define asse_curs_x_hot 21 +#define asse_curs_y_hot 21 +static char asse_curs_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0xf8,0x00,0x00,0x00, + 0xf8,0x08,0x00,0x00,0x70,0x18,0x00,0x00,0x00,0x1c,0x00,0x00,0x00,0x1c,0x00, + 0x00,0x00,0x3f,0x00,0x00,0xc0,0x3f,0x00,0x00,0x80,0x3f,0x00,0x00,0x00,0x3c, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/asse_mask.h b/vcl/inc/unx/x11_cursors/asse_mask.h new file mode 100644 index 000000000000..ad74b0cf724a --- /dev/null +++ b/vcl/inc/unx/x11_cursors/asse_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define asse_mask_width 32 +#define asse_mask_height 32 +#define asse_mask_x_hot 21 +#define asse_mask_y_hot 21 +static char asse_mask_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70, + 0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0xfc,0x01,0x00,0x00,0xfc,0x09,0x00,0x00, + 0xfc,0x1d,0x00,0x00,0xf8,0x3c,0x00,0x00,0x70,0x3e,0x00,0x00,0x00,0x3f,0x00, + 0x00,0xc0,0x7f,0x00,0x00,0xe0,0x7f,0x00,0x00,0xc0,0x7f,0x00,0x00,0x80,0x7f, + 0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/assw_curs.h b/vcl/inc/unx/x11_cursors/assw_curs.h new file mode 100644 index 000000000000..d26c36e79ed4 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/assw_curs.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define assw_curs_width 32 +#define assw_curs_height 32 +#define assw_curs_x_hot 21 +#define assw_curs_y_hot 21 +static char assw_curs_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x0e,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x1f,0x00,0x00,0x10,0x1f, + 0x00,0x00,0x18,0x0e,0x00,0x00,0x38,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0xfc, + 0x00,0x00,0x00,0xfc,0x03,0x00,0x00,0xfc,0x01,0x00,0x00,0x3c,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/assw_mask.h b/vcl/inc/unx/x11_cursors/assw_mask.h new file mode 100644 index 000000000000..ea47a3ee27e9 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/assw_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define assw_mask_width 32 +#define assw_mask_height 32 +#define assw_mask_x_hot 21 +#define assw_mask_y_hot 21 +static char assw_mask_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x0e,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x1f,0x00,0x00,0x10,0x1f, + 0x00,0x00,0x18,0x0e,0x00,0x00,0x38,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0xfc, + 0x00,0x00,0x00,0xfc,0x03,0x00,0x00,0xfc,0x01,0x00,0x00,0x3c,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/asw_curs.h b/vcl/inc/unx/x11_cursors/asw_curs.h new file mode 100644 index 000000000000..7b9b2199955a --- /dev/null +++ b/vcl/inc/unx/x11_cursors/asw_curs.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define asw_curs_width 32 +#define asw_curs_height 32 +#define asw_curs_x_hot 12 +#define asw_curs_y_hot 15 +static char asw_curs_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x70,0x38,0x00,0x00,0x78,0x7c,0x00,0x00, + 0x7e,0x7c,0x00,0x00,0x78,0x7c,0x00,0x00,0x70,0x38,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/asw_mask.h b/vcl/inc/unx/x11_cursors/asw_mask.h new file mode 100644 index 000000000000..df934399fe91 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/asw_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define asw_mask_width 32 +#define asw_mask_height 32 +#define asw_mask_x_hot 12 +#define asw_mask_y_hot 15 +static char asw_mask_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0xf0,0x39,0x00,0x00,0xf8,0x7c,0x00,0x00,0xfe,0xfe,0x00,0x00, + 0xff,0xfe,0x00,0x00,0xfe,0xfe,0x00,0x00,0xf8,0x7c,0x00,0x00,0xf0,0x39,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/aswe_curs.h b/vcl/inc/unx/x11_cursors/aswe_curs.h new file mode 100644 index 000000000000..f06d2140559e --- /dev/null +++ b/vcl/inc/unx/x11_cursors/aswe_curs.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define aswe_curs_width 32 +#define aswe_curs_height 32 +#define aswe_curs_x_hot 15 +#define aswe_curs_y_hot 15 +static char aswe_curs_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x06,0x30,0x00,0x80,0xc3,0xe1,0x00,0xc0,0xe3,0xe3,0x01, + 0xf0,0xe3,0xe3,0x07,0xc0,0xe3,0xe3,0x01,0x80,0xc3,0xe1,0x00,0x00,0x06,0x30, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/aswe_mask.h b/vcl/inc/unx/x11_cursors/aswe_mask.h new file mode 100644 index 000000000000..c04dbf5deafb --- /dev/null +++ b/vcl/inc/unx/x11_cursors/aswe_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define aswe_mask_width 32 +#define aswe_mask_height 32 +#define aswe_mask_x_hot 15 +#define aswe_mask_y_hot 15 +static char aswe_mask_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x06,0x30,0x00,0x80,0xcf,0xf9,0x00,0xc0,0xe7,0xf3,0x01,0xf0,0xf7,0xf7,0x07, + 0xf8,0xf7,0xf7,0x0f,0xf0,0xf7,0xf7,0x07,0xc0,0xe7,0xf3,0x01,0x80,0xcf,0xf9, + 0x00,0x00,0x06,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/chain_curs.h b/vcl/inc/unx/x11_cursors/chain_curs.h new file mode 100644 index 000000000000..95b4fbe66c2e --- /dev/null +++ b/vcl/inc/unx/x11_cursors/chain_curs.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define chain_curs_width 32 +#define chain_curs_height 32 +#define chain_curs_x_hot 0 +#define chain_curs_y_hot 2 +static char chain_curs_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00, + 0x00,0x05,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x21,0x00, + 0x00,0x00,0x41,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x01, + 0x02,0x00,0x00,0x01,0x04,0x00,0x00,0x81,0x0f,0x00,0x00,0x91,0x00,0x00,0x00, + 0x99,0x00,0x00,0x00,0x25,0x01,0x00,0x00,0x23,0x01,0x00,0x00,0x41,0x3e,0xbf, + 0x0f,0x40,0x82,0x40,0x10,0x80,0x5c,0xae,0x23,0x80,0x24,0x91,0x24,0x00,0x23, + 0x91,0x28,0x80,0x24,0x91,0x28,0x80,0x24,0x91,0x24,0x80,0x98,0x4f,0x23,0x00, + 0x41,0x20,0x10,0x00,0x3e,0xde,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/chain_mask.h b/vcl/inc/unx/x11_cursors/chain_mask.h new file mode 100644 index 000000000000..91d89bbed3c6 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/chain_mask.h @@ -0,0 +1,38 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define chain_mask_width 32 +#define chain_mask_height 32 +static char chain_mask_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00, + 0x00,0x07,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x3f,0x00, + 0x00,0x00,0x7f,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0xff, + 0x03,0x00,0x00,0xff,0x07,0x00,0x00,0xff,0x0f,0x00,0x00,0xff,0x00,0x00,0x00, + 0xff,0x00,0x00,0x00,0xe7,0x01,0x00,0x00,0xe3,0x01,0x00,0x00,0xc1,0x3f,0xbf, + 0x0f,0xc0,0xbf,0xff,0x1f,0x80,0xdf,0xff,0x3f,0x80,0xe7,0xf1,0x3c,0x00,0xe3, + 0xf1,0x38,0x80,0xe7,0xf1,0x38,0x80,0xe7,0xf1,0x3c,0x80,0xff,0xff,0x3f,0x00, + 0x7f,0xff,0x1f,0x00,0x3e,0xde,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/chainnot_curs.h b/vcl/inc/unx/x11_cursors/chainnot_curs.h new file mode 100644 index 000000000000..841e2efdec63 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/chainnot_curs.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define chainnot_curs_width 32 +#define chainnot_curs_height 32 +#define chainnot_curs_x_hot 2 +#define chainnot_curs_y_hot 2 +static char chainnot_curs_bits[] = { + 0x00,0x00,0x00,0x00,0x80,0x1f,0x00,0x00,0xe0,0x7f,0x00,0x00,0xf0,0xf0,0x00, + 0x00,0x38,0xc0,0x01,0x00,0x7c,0x80,0x03,0x00,0xec,0x00,0x03,0x00,0xce,0x01, + 0x07,0x00,0x86,0x03,0x06,0x00,0x06,0x07,0x06,0x00,0x06,0x0e,0x06,0x00,0x06, + 0x1c,0x06,0x00,0x0e,0x38,0x07,0x00,0x0c,0x70,0x03,0x00,0x1c,0xe0,0x03,0x00, + 0x38,0xc0,0x01,0x00,0xf0,0xe0,0x00,0x00,0xe0,0x7f,0x00,0x00,0x80,0x9f,0xfc, + 0x3e,0x00,0x00,0x02,0x41,0x00,0x72,0xb9,0x8e,0x00,0x92,0x44,0x92,0x00,0x8c, + 0x44,0xa2,0x00,0x92,0x44,0xa2,0x00,0x92,0x44,0x92,0x00,0x62,0x3e,0x8d,0x00, + 0x04,0x81,0x40,0x00,0xf8,0x78,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/chainnot_mask.h b/vcl/inc/unx/x11_cursors/chainnot_mask.h new file mode 100644 index 000000000000..9fbed6408c54 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/chainnot_mask.h @@ -0,0 +1,38 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define chainnot_mask_width 32 +#define chainnot_mask_height 32 +static char chainnot_mask_bits[] = { + 0x80,0x1f,0x00,0x00,0xe0,0x7f,0x00,0x00,0xf0,0xff,0x00,0x00,0xf8,0xff,0x01, + 0x00,0xfc,0xf0,0x03,0x00,0xfe,0xc0,0x07,0x00,0xfe,0x81,0x07,0x00,0xff,0x83, + 0x0f,0x00,0xcf,0x07,0x0f,0x00,0x8f,0x0f,0x0f,0x00,0x0f,0x1f,0x0f,0x00,0x0f, + 0x3e,0x0f,0x00,0x1f,0xfc,0x0f,0x00,0x1e,0xf8,0x07,0x00,0x3e,0xf0,0x07,0x00, + 0xfc,0xe0,0x03,0x00,0xf8,0xff,0x01,0x00,0xf0,0xff,0x00,0x00,0xe0,0xff,0xfc, + 0x3e,0x80,0xff,0xfe,0x7f,0x00,0x7e,0xff,0xff,0x00,0x9e,0xc7,0xf3,0x00,0x8c, + 0xc7,0xe3,0x00,0x9e,0xc7,0xe3,0x00,0x9e,0xc7,0xf3,0x00,0xfe,0xff,0xff,0x00, + 0xfc,0xfd,0x7f,0x00,0xf8,0x78,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/chart_curs.h b/vcl/inc/unx/x11_cursors/chart_curs.h new file mode 100644 index 000000000000..9346fbd8f2c0 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/chart_curs.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define chart_curs_width 32 +#define chart_curs_height 32 +#define chart_curs_x_hot 15 +#define chart_curs_y_hot 16 +static char chart_curs_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xbf,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00, + 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80, + 0x10,0x00,0x00,0x80,0x00,0x06,0x00,0x00,0x10,0x06,0x00,0x00,0x00,0x06,0x00, + 0x00,0x10,0x36,0x00,0x00,0xc0,0x36,0x00,0x00,0xd0,0x36,0x00,0x00,0xc0,0x36, + 0x00,0x00,0xf0,0x7f,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/chart_mask.h b/vcl/inc/unx/x11_cursors/chart_mask.h new file mode 100644 index 000000000000..d4804fb6c85b --- /dev/null +++ b/vcl/inc/unx/x11_cursors/chart_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define chart_mask_width 32 +#define chart_mask_height 32 +#define chart_mask_x_hot 15 +#define chart_mask_y_hot 16 +static char chart_mask_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00, + 0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00, + 0x80,0xff,0xff,0x00,0x80,0xff,0xff,0x00,0x80,0xff,0xff,0x00,0x00,0xc0,0x01, + 0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x39,0x00,0x00,0xc0, + 0x39,0x0f,0x00,0xc0,0x39,0x0f,0x00,0xc0,0x39,0x0f,0x00,0x00,0x38,0x7f,0x00, + 0x00,0xf8,0x7f,0x00,0x00,0xf8,0x7f,0x00,0x00,0xf8,0x7f,0x00,0x00,0xf8,0xff, + 0x00,0x00,0xf8,0xff,0x00,0x00,0xf8,0xff}; diff --git a/vcl/inc/unx/x11_cursors/copydata_curs.h b/vcl/inc/unx/x11_cursors/copydata_curs.h new file mode 100644 index 000000000000..e3d0e3e76530 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/copydata_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define copydata_curs_width 32 +#define copydata_curs_height 32 +#define copydata_curs_x_hot 1 +#define copydata_curs_y_hot 1 +static char copydata_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, + 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, + 0xfe, 0x03, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, + 0x66, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x53, 0x00, 0x00, + 0x28, 0xa3, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x10, 0xf0, 0x1f, 0x00, 0x08, 0xf0, 0x1f, 0x00, 0x10, 0xf0, 0x1e, 0x00, + 0xa8, 0xf2, 0x1e, 0x00, 0x50, 0x35, 0x18, 0x00, 0x00, 0xf0, 0x1e, 0x00, + 0x00, 0xf0, 0x1e, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/copydata_mask.h b/vcl/inc/unx/x11_cursors/copydata_mask.h new file mode 100644 index 000000000000..f25b0863d807 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/copydata_mask.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define copydata_mask_width 32 +#define copydata_mask_height 32 +#define copydata_mask_x_hot 1 +#define copydata_mask_y_hot 1 +static char copydata_mask_bits[] = { + 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, + 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, + 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, + 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, + 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, + 0xe0, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, + 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0x3c, 0xf8, 0x3f, 0x00, + 0x3c, 0xf8, 0x3f, 0x00, 0x3c, 0xf8, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00, + 0xfc, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00, + 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, + 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/copydlnk_curs.h b/vcl/inc/unx/x11_cursors/copydlnk_curs.h new file mode 100644 index 000000000000..8e22a5bee37b --- /dev/null +++ b/vcl/inc/unx/x11_cursors/copydlnk_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define copydlnk_curs_width 32 +#define copydlnk_curs_height 32 +#define copydlnk_curs_x_hot 1 +#define copydlnk_curs_y_hot 1 +static char copydlnk_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, + 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, + 0xfe, 0x03, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, + 0x66, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x53, 0x00, 0x00, + 0x28, 0xa3, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, + 0x30, 0xf1, 0x1f, 0x00, 0x10, 0xf1, 0x1f, 0x00, 0xd0, 0xf1, 0x1e, 0x00, + 0xf0, 0xf1, 0x1e, 0x00, 0x00, 0x34, 0x18, 0x00, 0x00, 0xf0, 0x1e, 0x00, + 0x00, 0xf0, 0x1e, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/copydlnk_mask.h b/vcl/inc/unx/x11_cursors/copydlnk_mask.h new file mode 100644 index 000000000000..02ee5db5fbc1 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/copydlnk_mask.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define copydlnk_mask_width 32 +#define copydlnk_mask_height 32 +#define copydlnk_mask_x_hot 1 +#define copydlnk_mask_y_hot 1 +static char copydlnk_mask_bits[] = { + 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, + 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, + 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, + 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, + 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, + 0xe0, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, + 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0xf8, 0xff, 0x3f, 0x00, + 0xf8, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00, + 0xf8, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00, 0x00, 0xfe, 0x3f, 0x00, + 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, + 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/copyfile_curs.h b/vcl/inc/unx/x11_cursors/copyfile_curs.h new file mode 100644 index 000000000000..c74a1da26b66 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/copyfile_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define copyfile_curs_width 32 +#define copyfile_curs_height 32 +#define copyfile_curs_x_hot 9 +#define copyfile_curs_y_hot 9 +static char copyfile_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00, + 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, + 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, + 0xfe, 0x02, 0x00, 0x00, 0xfe, 0x06, 0x00, 0x00, 0xfe, 0x0e, 0x00, 0x00, + 0xfe, 0x1e, 0x00, 0x00, 0xfe, 0x3e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, + 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x03, 0x00, + 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, + 0x00, 0xc2, 0xe0, 0x3f, 0x00, 0xc0, 0xe0, 0x3f, 0x00, 0x80, 0xe1, 0x3d, + 0x00, 0x80, 0xe1, 0x3d, 0x00, 0x00, 0x63, 0x30, 0x00, 0x00, 0xe3, 0x3d, + 0x00, 0x00, 0xe0, 0x3d, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x3f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/copyfile_mask.h b/vcl/inc/unx/x11_cursors/copyfile_mask.h new file mode 100644 index 000000000000..c13089abaea5 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/copyfile_mask.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define copyfile_mask_width 32 +#define copyfile_mask_height 32 +#define copyfile_mask_x_hot 9 +#define copyfile_mask_y_hot 9 +static char copyfile_mask_bits[] = { + 0xff, 0x01, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, + 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, + 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, + 0xff, 0x0f, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, + 0xff, 0x7f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, + 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, + 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0xf1, 0x7f, + 0x00, 0xff, 0xf1, 0x7f, 0x00, 0xe7, 0xf3, 0x7f, 0x00, 0xe0, 0xf3, 0x7f, + 0x00, 0xc0, 0xf7, 0x7f, 0x00, 0xc0, 0xf7, 0x7f, 0x00, 0x80, 0xf7, 0x7f, + 0x00, 0x80, 0xf7, 0x7f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf0, 0x7f, + 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/copyfiles_curs.h b/vcl/inc/unx/x11_cursors/copyfiles_curs.h new file mode 100644 index 000000000000..e6a9b7a668af --- /dev/null +++ b/vcl/inc/unx/x11_cursors/copyfiles_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define copyfiles_curs_width 32 +#define copyfiles_curs_height 32 +#define copyfiles_curs_x_hot 8 +#define copyfiles_curs_y_hot 9 +static char copyfiles_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0xe0, 0x2f, 0x00, 0x00, + 0xe8, 0x0f, 0x00, 0x00, 0xe8, 0x7f, 0x00, 0x00, 0xea, 0x7f, 0x00, 0x00, + 0xea, 0x7f, 0x00, 0x00, 0xea, 0x7f, 0x00, 0x00, 0x6a, 0x7e, 0x00, 0x00, + 0x6a, 0x7d, 0x00, 0x00, 0x6a, 0x7b, 0x00, 0x00, 0x6a, 0x77, 0x00, 0x00, + 0x6a, 0x6f, 0x00, 0x00, 0x6a, 0x5f, 0x00, 0x00, 0x0a, 0x3f, 0x00, 0x00, + 0x7a, 0x7f, 0x00, 0x00, 0x02, 0xff, 0x00, 0x00, 0x7e, 0xff, 0x01, 0x00, + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, + 0x00, 0x61, 0xe0, 0x3f, 0x00, 0x60, 0xe0, 0x3f, 0x00, 0xc0, 0xe0, 0x3d, + 0x00, 0xc0, 0xe0, 0x3d, 0x00, 0x80, 0x61, 0x30, 0x00, 0x80, 0xe1, 0x3d, + 0x00, 0x00, 0xe0, 0x3d, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x3f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/copyfiles_mask.h b/vcl/inc/unx/x11_cursors/copyfiles_mask.h new file mode 100644 index 000000000000..f904b7848f64 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/copyfiles_mask.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define copyfiles_mask_width 32 +#define copyfiles_mask_height 32 +#define copyfiles_mask_x_hot 8 +#define copyfiles_mask_y_hot 9 +static char copyfiles_mask_bits[] = { + 0xf0, 0x1f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, + 0xfc, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x03, 0x00, 0xff, 0xff, 0x03, 0x00, + 0xff, 0xff, 0x03, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x80, 0xff, 0xf0, 0x7f, + 0x80, 0xff, 0xf0, 0x7f, 0x80, 0xf3, 0xf1, 0x7f, 0x00, 0xf0, 0xf1, 0x7f, + 0x00, 0xe0, 0xf3, 0x7f, 0x00, 0xe0, 0xf3, 0x7f, 0x00, 0xc0, 0xf3, 0x7f, + 0x00, 0xc0, 0xf3, 0x7f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf0, 0x7f, + 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/copyflnk_curs.h b/vcl/inc/unx/x11_cursors/copyflnk_curs.h new file mode 100644 index 000000000000..b76368923f31 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/copyflnk_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define copyflnk_curs_width 32 +#define copyflnk_curs_height 32 +#define copyflnk_curs_x_hot 9 +#define copyflnk_curs_y_hot 9 +static char copyflnk_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00, + 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, + 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, + 0xbe, 0x02, 0x00, 0x00, 0xa6, 0x06, 0x00, 0x00, 0xa2, 0x0e, 0x00, 0x00, + 0xba, 0x1e, 0x00, 0x00, 0xbe, 0x3e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, + 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x03, 0x00, + 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, + 0x00, 0xc2, 0xe0, 0x3f, 0x00, 0xc0, 0xe0, 0x3f, 0x00, 0x80, 0xe1, 0x3d, + 0x00, 0x80, 0xe1, 0x3d, 0x00, 0x00, 0x63, 0x30, 0x00, 0x00, 0xe3, 0x3d, + 0x00, 0x00, 0xe0, 0x3d, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x3f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/copyflnk_mask.h b/vcl/inc/unx/x11_cursors/copyflnk_mask.h new file mode 100644 index 000000000000..b8fac92fdd75 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/copyflnk_mask.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define copyflnk_mask_width 32 +#define copyflnk_mask_height 32 +#define copyflnk_mask_x_hot 9 +#define copyflnk_mask_y_hot 9 +static char copyflnk_mask_bits[] = { + 0xff, 0x01, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, + 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, + 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, + 0xff, 0x0f, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, + 0xff, 0x7f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, + 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, + 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0xf1, 0x7f, + 0x00, 0xff, 0xf1, 0x7f, 0x00, 0xe7, 0xf3, 0x7f, 0x00, 0xe0, 0xf3, 0x7f, + 0x00, 0xc0, 0xf7, 0x7f, 0x00, 0xc0, 0xf7, 0x7f, 0x00, 0x80, 0xf7, 0x7f, + 0x00, 0x80, 0xf7, 0x7f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf0, 0x7f, + 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/crook_curs.h b/vcl/inc/unx/x11_cursors/crook_curs.h new file mode 100644 index 000000000000..6e4d5f613959 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/crook_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define crook_curs_width 32 +#define crook_curs_height 32 +#define crook_curs_x_hot 15 +#define crook_curs_y_hot 14 +static char crook_curs_bits[] = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x7c, 0x3e, 0xff, 0x7f, 0xbb, 0xdd, 0xfe, + 0x7f, 0xbb, 0xdd, 0xfe, 0xf3, 0xb6, 0x6d, 0xcf, 0xed, 0xb6, 0x6d, 0xb7, + 0xdd, 0x75, 0xae, 0xbb, 0xbb, 0x0b, 0xd0, 0xdd, 0xb7, 0xf1, 0x8f, 0xed, + 0x4f, 0x0e, 0x70, 0xf2, 0xbf, 0xf1, 0x8f, 0xfd, 0x5f, 0xfe, 0x7f, 0xfa, + 0xaf, 0xff, 0xff, 0xf5, 0xd7, 0xff, 0xff, 0xeb, 0xef, 0xff, 0xff, 0xf7, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/vcl/inc/unx/x11_cursors/crook_mask.h b/vcl/inc/unx/x11_cursors/crook_mask.h new file mode 100644 index 000000000000..7493f3a501dc --- /dev/null +++ b/vcl/inc/unx/x11_cursors/crook_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define crook_mask_width 32 +#define crook_mask_height 32 +static char crook_mask_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x83, 0xc1, 0x00, 0x80, 0xc7, 0xe3, 0x01, 0xc0, 0xef, 0xf7, 0x03, + 0xcc, 0xef, 0xf7, 0x33, 0x9e, 0xff, 0xff, 0x79, 0xbf, 0xff, 0xff, 0xfd, + 0x77, 0xff, 0xff, 0xee, 0xee, 0xf6, 0x6f, 0x77, 0xfc, 0xff, 0xff, 0x3f, + 0xb8, 0xff, 0xff, 0x1d, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, + 0xf8, 0x01, 0x80, 0x1f, 0x7c, 0x00, 0x00, 0x3e, 0x38, 0x00, 0x00, 0x1c, + 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/crop_curs.h b/vcl/inc/unx/x11_cursors/crop_curs.h new file mode 100644 index 000000000000..a546ce6c1ba8 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/crop_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define crop_curs_width 32 +#define crop_curs_height 32 +#define crop_curs_x_hot 9 +#define crop_curs_y_hot 9 +static char crop_curs_bits[] = { + 0xff, 0x0f, 0xff, 0xff, 0xff, 0x6f, 0xff, 0xff, 0xff, 0x6f, 0xff, 0xff, + 0x07, 0x60, 0xf8, 0xff, 0xf7, 0x6f, 0xfb, 0xff, 0xf7, 0x6f, 0xfb, 0xff, + 0x37, 0x60, 0xf8, 0xff, 0xb7, 0x6f, 0xff, 0xff, 0xb7, 0x6f, 0xff, 0xff, + 0xb7, 0x6f, 0xff, 0xff, 0xb7, 0x6f, 0xff, 0xff, 0xb7, 0x6f, 0xff, 0xff, + 0x30, 0x60, 0xff, 0xff, 0xb6, 0x7f, 0xff, 0xff, 0xb6, 0x7f, 0xff, 0xff, + 0x30, 0x00, 0xff, 0xff, 0xb7, 0xff, 0xff, 0xff, 0xb7, 0xff, 0xff, 0xff, + 0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/vcl/inc/unx/x11_cursors/crop_mask.h b/vcl/inc/unx/x11_cursors/crop_mask.h new file mode 100644 index 000000000000..5a10726cf36c --- /dev/null +++ b/vcl/inc/unx/x11_cursors/crop_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define crop_mask_width 32 +#define crop_mask_height 32 +static char crop_mask_bits[] = { + 0x00, 0xf8, 0x01, 0x00, 0x00, 0xf8, 0x01, 0x00, 0xfc, 0xff, 0x0f, 0x00, + 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x0f, 0x00, + 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xf8, 0x01, 0x00, + 0xfc, 0xf8, 0x01, 0x00, 0xfc, 0xf8, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, + 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, + 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/detective_curs.h b/vcl/inc/unx/x11_cursors/detective_curs.h new file mode 100644 index 000000000000..9d8a0d6a1c47 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/detective_curs.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define detective_curs_width 32 +#define detective_curs_height 32 +#define detective_curs_x_hot 12 +#define detective_curs_y_hot 13 +static char detective_curs_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x38,0x00, + 0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c, + 0x00,0x00,0x00,0x83,0x01,0x00,0x80,0x00,0x02,0x00,0x80,0x10,0x02,0x00,0x40, + 0x38,0x04,0x00,0x40,0x7c,0x04,0x00,0x40,0xfe,0x04,0x00,0x40,0x38,0x04,0x00, + 0x40,0x38,0x04,0x00,0x80,0x38,0x02,0x00,0x80,0x00,0x02,0x00,0x00,0x83,0x07, + 0x00,0x00,0x7c,0x0e,0x00,0x00,0x00,0x1c,0x00,0x00,0x10,0x38,0x00,0x00,0x38, + 0x70,0x00,0x00,0x10,0x60,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/detective_mask.h b/vcl/inc/unx/x11_cursors/detective_mask.h new file mode 100644 index 000000000000..14402a37b641 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/detective_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define detective_mask_width 32 +#define detective_mask_height 32 +#define detective_mask_x_hot 12 +#define detective_mask_y_hot 13 +static char detective_mask_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x38,0x00, + 0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c, + 0x00,0x00,0x00,0xff,0x01,0x00,0x80,0xff,0x03,0x00,0x80,0xff,0x03,0x00,0xc0, + 0xff,0x07,0x00,0xc0,0xff,0x07,0x00,0xc0,0xff,0x07,0x00,0xc0,0xff,0x07,0x00, + 0xc0,0xff,0x07,0x00,0x80,0xff,0x03,0x00,0x80,0xff,0x03,0x00,0x00,0xff,0x07, + 0x00,0x00,0x7c,0x0e,0x00,0x00,0x00,0x1c,0x00,0x00,0x10,0x38,0x00,0x00,0x38, + 0x70,0x00,0x00,0x10,0x60,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawarc_curs.h b/vcl/inc/unx/x11_cursors/drawarc_curs.h new file mode 100644 index 000000000000..daea116e186e --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawarc_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define drawarc_curs_width 32 +#define drawarc_curs_height 32 +#define drawarc_curs_x_hot 7 +#define drawarc_curs_y_hot 7 +static char drawarc_curs_bits[] = { + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x42, 0x00, + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawarc_mask.h b/vcl/inc/unx/x11_cursors/drawarc_mask.h new file mode 100644 index 000000000000..c9e2b6dd8737 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawarc_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define drawarc_mask_width 32 +#define drawarc_mask_height 32 +static char drawarc_mask_bits[] = { + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0xff, 0x00, + 0x00, 0x80, 0xe7, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, + 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawbezier_curs.h b/vcl/inc/unx/x11_cursors/drawbezier_curs.h new file mode 100644 index 000000000000..ea677d4734aa --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawbezier_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define drawbezier_curs_width 32 +#define drawbezier_curs_height 32 +#define drawbezier_curs_x_hot 7 +#define drawbezier_curs_y_hot 7 +static char drawbezier_curs_bits[] = { + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, 0x88, 0x00, + 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x0e, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawbezier_mask.h b/vcl/inc/unx/x11_cursors/drawbezier_mask.h new file mode 100644 index 000000000000..17c1075d07a7 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawbezier_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define drawbezier_mask_width 32 +#define drawbezier_mask_height 32 +static char drawbezier_mask_bits[] = { + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x0e, 0x0f, 0x00, 0x00, 0x8e, 0x0f, 0x00, 0x00, 0xdc, 0x0f, + 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xe0, 0x00, + 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0xbf, 0x03, 0x00, 0x00, 0x1f, 0x07, + 0x00, 0x00, 0x0f, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawcaption_curs.h b/vcl/inc/unx/x11_cursors/drawcaption_curs.h new file mode 100644 index 000000000000..3fe104f3673e --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawcaption_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define drawcaption_curs_width 32 +#define drawcaption_curs_height 32 +#define drawcaption_curs_x_hot 8 +#define drawcaption_curs_y_hot 8 +static char drawcaption_curs_bits[] = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, + 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, + 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x81, 0x02, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, + 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xbe, 0xff, 0xff, + 0xff, 0x7e, 0x1f, 0xe0, 0xff, 0xff, 0xde, 0xef, 0xff, 0xff, 0xc1, 0xef, + 0xff, 0xff, 0xdf, 0xef, 0xff, 0xff, 0x1f, 0xe0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/vcl/inc/unx/x11_cursors/drawcaption_mask.h b/vcl/inc/unx/x11_cursors/drawcaption_mask.h new file mode 100644 index 000000000000..70b39e37b65e --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawcaption_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define drawcaption_mask_width 32 +#define drawcaption_mask_height 32 +static char drawcaption_mask_bits[] = { + 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, + 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, + 0x80, 0x03, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, + 0xff, 0xff, 0x01, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, + 0x80, 0x03, 0x00, 0x00, 0x80, 0x43, 0x00, 0x00, 0x80, 0xe3, 0xf0, 0x3f, + 0x80, 0xc3, 0xf1, 0x3f, 0x80, 0x83, 0xff, 0x3f, 0x00, 0x00, 0x7f, 0x38, + 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0xf0, 0x3f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawcirclecut_curs.h b/vcl/inc/unx/x11_cursors/drawcirclecut_curs.h new file mode 100644 index 000000000000..dc632873dd3b --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawcirclecut_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define drawcirclecut_curs_width 32 +#define drawcirclecut_curs_height 32 +#define drawcirclecut_curs_x_hot 7 +#define drawcirclecut_curs_y_hot 7 +static char drawcirclecut_curs_bits[] = { + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0a, 0x00, + 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x41, 0x00, + 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x3c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawcirclecut_mask.h b/vcl/inc/unx/x11_cursors/drawcirclecut_mask.h new file mode 100644 index 000000000000..1f96be33b86a --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawcirclecut_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define drawcirclecut_mask_width 32 +#define drawcirclecut_mask_height 32 +static char drawcirclecut_mask_bits[] = { + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x1f, 0x00, + 0x00, 0x80, 0x3b, 0x00, 0x00, 0x80, 0x73, 0x00, 0x00, 0x80, 0xe3, 0x00, + 0x00, 0x80, 0xc3, 0x01, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x7e, 0x00, + 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawconnect_curs.h b/vcl/inc/unx/x11_cursors/drawconnect_curs.h new file mode 100644 index 000000000000..994f34b96e0e --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawconnect_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define drawconnect_curs_width 32 +#define drawconnect_curs_height 32 +#define drawconnect_curs_x_hot 7 +#define drawconnect_curs_y_hot 7 +static char drawconnect_curs_bits[] = { + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x80, 0x5f, 0x00, 0x00, 0x80, 0x70, + 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0xfd, 0x00, + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawconnect_mask.h b/vcl/inc/unx/x11_cursors/drawconnect_mask.h new file mode 100644 index 000000000000..187cf31cfd1a --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawconnect_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define drawconnect_mask_width 32 +#define drawconnect_mask_height 32 +static char drawconnect_mask_bits[] = { + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, + 0x00, 0x00, 0xc0, 0xff, 0x00, 0x00, 0xc0, 0xdf, 0x00, 0x00, 0xc0, 0xff, + 0x00, 0x80, 0xcf, 0xf9, 0x00, 0x80, 0xff, 0x01, 0x00, 0x80, 0xfd, 0x01, + 0x00, 0x80, 0xff, 0x01, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawcrook_curs.h b/vcl/inc/unx/x11_cursors/drawcrook_curs.h new file mode 100644 index 000000000000..4fdba0e8442a --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawcrook_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define drawcrook_curs_width 32 +#define drawcrook_curs_height 32 +#define drawcrook_curs_x_hot 15 +#define drawcrook_curs_y_hot 14 +static char drawcrook_curs_bits[] = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x7c, 0x3e, 0xff, 0x7f, 0xbb, 0xdd, 0xfe, + 0x7f, 0xbb, 0xdd, 0xfe, 0xf3, 0xb6, 0x6d, 0xcf, 0xed, 0xb6, 0x6d, 0xb7, + 0xdd, 0x75, 0xae, 0xbb, 0xbb, 0x0b, 0xd0, 0xdd, 0xb7, 0xf1, 0x8f, 0xed, + 0x4f, 0x0e, 0x70, 0xf2, 0xbf, 0xf1, 0x8f, 0xfd, 0x5f, 0xfe, 0x7f, 0xfa, + 0xaf, 0xff, 0xff, 0xf5, 0xd7, 0xff, 0xff, 0xeb, 0xef, 0xff, 0xff, 0xf7, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/vcl/inc/unx/x11_cursors/drawcrook_mask.h b/vcl/inc/unx/x11_cursors/drawcrook_mask.h new file mode 100644 index 000000000000..657fcff2b4fd --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawcrook_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define drawcrook_mask_width 32 +#define drawcrook_mask_height 32 +static char drawcrook_mask_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x83, 0xc1, 0x00, 0x80, 0xc7, 0xe3, 0x01, 0xc0, 0xef, 0xf7, 0x03, + 0xcc, 0xef, 0xf7, 0x33, 0x9e, 0xff, 0xff, 0x79, 0xbf, 0xff, 0xff, 0xfd, + 0x77, 0xff, 0xff, 0xee, 0xee, 0xf6, 0x6f, 0x77, 0xfc, 0xff, 0xff, 0x3f, + 0xb8, 0xff, 0xff, 0x1d, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, + 0xf8, 0x01, 0x80, 0x1f, 0x7c, 0x00, 0x00, 0x3e, 0x38, 0x00, 0x00, 0x1c, + 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawcrop_curs.h b/vcl/inc/unx/x11_cursors/drawcrop_curs.h new file mode 100644 index 000000000000..7f574e1ab351 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawcrop_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define drawcrop_curs_width 32 +#define drawcrop_curs_height 32 +#define drawcrop_curs_x_hot 9 +#define drawcrop_curs_y_hot 9 +static char drawcrop_curs_bits[] = { + 0xff, 0x0f, 0xff, 0xff, 0xff, 0x6f, 0xff, 0xff, 0xff, 0x6f, 0xff, 0xff, + 0x07, 0x60, 0xf8, 0xff, 0xf7, 0x6f, 0xfb, 0xff, 0xf7, 0x6f, 0xfb, 0xff, + 0x37, 0x60, 0xf8, 0xff, 0xb7, 0x6f, 0xff, 0xff, 0xb7, 0x6f, 0xff, 0xff, + 0xb7, 0x6f, 0xff, 0xff, 0xb7, 0x6f, 0xff, 0xff, 0xb7, 0x6f, 0xff, 0xff, + 0x30, 0x60, 0xff, 0xff, 0xb6, 0x7f, 0xff, 0xff, 0xb6, 0x7f, 0xff, 0xff, + 0x30, 0x00, 0xff, 0xff, 0xb7, 0xff, 0xff, 0xff, 0xb7, 0xff, 0xff, 0xff, + 0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/vcl/inc/unx/x11_cursors/drawcrop_mask.h b/vcl/inc/unx/x11_cursors/drawcrop_mask.h new file mode 100644 index 000000000000..ac2e8885bdbb --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawcrop_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define drawcrop_mask_width 32 +#define drawcrop_mask_height 32 +static char drawcrop_mask_bits[] = { + 0x00, 0xf8, 0x01, 0x00, 0x00, 0xf8, 0x01, 0x00, 0xfc, 0xff, 0x0f, 0x00, + 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x0f, 0x00, + 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xf8, 0x01, 0x00, + 0xfc, 0xf8, 0x01, 0x00, 0xfc, 0xf8, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, + 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, + 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawellipse_curs.h b/vcl/inc/unx/x11_cursors/drawellipse_curs.h new file mode 100644 index 000000000000..bddc330d71d2 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawellipse_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define drawellipse_curs_width 32 +#define drawellipse_curs_height 32 +#define drawellipse_curs_x_hot 7 +#define drawellipse_curs_y_hot 7 +static char drawellipse_curs_bits[] = { + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x42, 0x00, + 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x81, 0x00, + 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x3c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawellipse_mask.h b/vcl/inc/unx/x11_cursors/drawellipse_mask.h new file mode 100644 index 000000000000..0ac5f200eab1 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawellipse_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define drawellipse_mask_width 32 +#define drawellipse_mask_height 32 +static char drawellipse_mask_bits[] = { + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0xff, 0x00, + 0x00, 0x80, 0xe7, 0x01, 0x00, 0x80, 0xc3, 0x01, 0x00, 0x80, 0xc3, 0x01, + 0x00, 0x80, 0xe7, 0x01, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x7e, 0x00, + 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawfreehand_curs.h b/vcl/inc/unx/x11_cursors/drawfreehand_curs.h new file mode 100644 index 000000000000..75795c088c8e --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawfreehand_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define drawfreehand_curs_width 32 +#define drawfreehand_curs_height 32 +#define drawfreehand_curs_x_hot 8 +#define drawfreehand_curs_y_hot 8 +static char drawfreehand_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xfd, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x70, 0x00, 0x02, + 0x00, 0x88, 0x00, 0x02, 0x00, 0x84, 0x00, 0x01, 0x00, 0x84, 0xc0, 0x00, + 0x00, 0x04, 0x3f, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawfreehand_mask.h b/vcl/inc/unx/x11_cursors/drawfreehand_mask.h new file mode 100644 index 000000000000..29edf44a9999 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawfreehand_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define drawfreehand_mask_width 32 +#define drawfreehand_mask_height 32 +static char drawfreehand_mask_bits[] = { + 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, + 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, + 0x80, 0x03, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, + 0xff, 0xff, 0x01, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, + 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x08, + 0x80, 0x03, 0x00, 0x1c, 0x80, 0x73, 0x00, 0x0e, 0x00, 0xf8, 0x00, 0x07, + 0x00, 0xfc, 0x01, 0x07, 0x00, 0xce, 0xc1, 0x03, 0x00, 0xce, 0xff, 0x01, + 0x00, 0x8e, 0xff, 0x00, 0x00, 0x0e, 0x3f, 0x00, 0x00, 0x0e, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawline_curs.h b/vcl/inc/unx/x11_cursors/drawline_curs.h new file mode 100644 index 000000000000..2d2aa162fac6 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawline_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define drawline_curs_width 32 +#define drawline_curs_height 32 +#define drawline_curs_x_hot 7 +#define drawline_curs_y_hot 7 +static char drawline_curs_bits[] = { + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x0c, 0x00, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawline_mask.h b/vcl/inc/unx/x11_cursors/drawline_mask.h new file mode 100644 index 000000000000..d66b0fd09aaa --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawline_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define drawline_mask_width 32 +#define drawline_mask_height 32 +static char drawline_mask_bits[] = { + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0x3f, 0xfe, 0x00, 0x00, 0xbf, 0xfe, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x70, + 0xc0, 0x01, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0xc0, 0x0f, + 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x3f, 0x00, + 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawmirror_curs.h b/vcl/inc/unx/x11_cursors/drawmirror_curs.h new file mode 100644 index 000000000000..3f61e751befb --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawmirror_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define drawmirror_curs_width 32 +#define drawmirror_curs_height 32 +#define drawmirror_curs_x_hot 14 +#define drawmirror_curs_y_hot 12 +static char drawmirror_curs_bits[] = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0x03, 0xf8, 0xf5, 0xff, + 0xfb, 0xfb, 0xee, 0xff, 0x0b, 0xfa, 0xf5, 0xff, 0xeb, 0xfa, 0xfa, 0xff, + 0xeb, 0xfa, 0xfa, 0xff, 0xeb, 0x7a, 0xfd, 0xff, 0xeb, 0x7a, 0xfd, 0xff, + 0xeb, 0xba, 0x7e, 0xff, 0xeb, 0xba, 0xbe, 0xfe, 0xeb, 0x5a, 0x5f, 0xfd, + 0x0b, 0x5a, 0xaf, 0xfa, 0xfb, 0xab, 0xd7, 0xf5, 0x03, 0xa8, 0xeb, 0xeb, + 0xff, 0xd7, 0xf5, 0xf5, 0xff, 0xd7, 0xfa, 0xfa, 0xff, 0x6b, 0x7d, 0xfd, + 0xff, 0xeb, 0xba, 0xfe, 0xff, 0xf5, 0x55, 0xff, 0xff, 0xf5, 0xab, 0xff, + 0xff, 0xfa, 0xd7, 0xff, 0x7f, 0xf7, 0xef, 0xff, 0xff, 0xfa, 0xff, 0xff, + 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/vcl/inc/unx/x11_cursors/drawmirror_mask.h b/vcl/inc/unx/x11_cursors/drawmirror_mask.h new file mode 100644 index 000000000000..5394dd74576a --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawmirror_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define drawmirror_mask_width 32 +#define drawmirror_mask_height 32 +static char drawmirror_mask_bits[] = { + 0x00, 0x00, 0x04, 0x00, 0xfe, 0x0f, 0x0e, 0x00, 0xfe, 0x0f, 0x1f, 0x00, + 0xfe, 0x8f, 0x3f, 0x00, 0xfe, 0x0f, 0x1f, 0x00, 0xfe, 0x8f, 0x0f, 0x00, + 0xbe, 0x8f, 0x0f, 0x00, 0xbe, 0xcf, 0x07, 0x00, 0xbe, 0xcf, 0x87, 0x00, + 0xbe, 0xef, 0xc3, 0x01, 0xbe, 0xef, 0xe3, 0x03, 0xfe, 0xff, 0xf1, 0x07, + 0xfe, 0xff, 0x79, 0x0f, 0xfe, 0xff, 0x3c, 0x1e, 0xfe, 0xff, 0x1e, 0x3c, + 0xfe, 0x7f, 0x0f, 0x1e, 0x00, 0xfc, 0x07, 0x0f, 0x00, 0xfe, 0x83, 0x07, + 0x00, 0xbe, 0xc7, 0x03, 0x00, 0x1f, 0xef, 0x01, 0x00, 0x1f, 0xfe, 0x00, + 0x80, 0x0f, 0x7c, 0x00, 0xc0, 0x1d, 0x38, 0x00, 0x80, 0x0f, 0x10, 0x00, + 0x00, 0x07, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawpie_curs.h b/vcl/inc/unx/x11_cursors/drawpie_curs.h new file mode 100644 index 000000000000..327b15258d3d --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawpie_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define drawpie_curs_width 32 +#define drawpie_curs_height 32 +#define drawpie_curs_x_hot 7 +#define drawpie_curs_y_hot 7 +static char drawpie_curs_bits[] = { + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0a, 0x00, + 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xf9, 0x00, + 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x3c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawpie_mask.h b/vcl/inc/unx/x11_cursors/drawpie_mask.h new file mode 100644 index 000000000000..6b5e5ac4ff0d --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawpie_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define drawpie_mask_width 32 +#define drawpie_mask_height 32 +static char drawpie_mask_bits[] = { + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1f, 0x00, + 0x00, 0x80, 0x1f, 0x00, 0x00, 0x80, 0xff, 0x01, 0x00, 0x80, 0xff, 0x01, + 0x00, 0x80, 0xfb, 0x01, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x7e, 0x00, + 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawpolygon_curs.h b/vcl/inc/unx/x11_cursors/drawpolygon_curs.h new file mode 100644 index 000000000000..ee68c707444c --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawpolygon_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define drawpolygon_curs_width 32 +#define drawpolygon_curs_height 32 +#define drawpolygon_curs_x_hot 7 +#define drawpolygon_curs_y_hot 7 +static char drawpolygon_curs_bits[] = { + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x83, 0x00, + 0x00, 0x00, 0xc5, 0x00, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x99, 0x00, + 0x00, 0x00, 0x89, 0x03, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawpolygon_mask.h b/vcl/inc/unx/x11_cursors/drawpolygon_mask.h new file mode 100644 index 000000000000..8b82e237233c --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawpolygon_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define drawpolygon_mask_width 32 +#define drawpolygon_mask_height 32 +static char drawpolygon_mask_bits[] = { + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x06, + 0x00, 0x00, 0x1e, 0x07, 0x00, 0x00, 0xbe, 0x07, 0x00, 0x00, 0xfe, 0x07, + 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x7e, 0x1f, 0x00, 0x00, 0x3e, 0x1f, + 0x00, 0x00, 0x0e, 0x0e, 0x00, 0x00, 0x0e, 0x07, 0x00, 0x00, 0x0e, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawrect_curs.h b/vcl/inc/unx/x11_cursors/drawrect_curs.h new file mode 100644 index 000000000000..c2508d37fad5 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawrect_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define drawrect_curs_width 32 +#define drawrect_curs_height 32 +#define drawrect_curs_x_hot 7 +#define drawrect_curs_y_hot 7 +static char drawrect_curs_bits[] = { + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x81, 0x00, + 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x81, 0x00, + 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawrect_mask.h b/vcl/inc/unx/x11_cursors/drawrect_mask.h new file mode 100644 index 000000000000..955152f312c9 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawrect_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define drawrect_mask_width 32 +#define drawrect_mask_height 32 +static char drawrect_mask_bits[] = { + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0x00, 0x80, 0xff, 0x01, 0x00, 0x80, 0xff, 0x01, 0x00, 0x80, 0xff, 0x01, + 0x00, 0x80, 0xc3, 0x01, 0x00, 0x80, 0xc3, 0x01, 0x00, 0x80, 0xff, 0x01, + 0x00, 0x80, 0xff, 0x01, 0x00, 0x80, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawtext_curs.h b/vcl/inc/unx/x11_cursors/drawtext_curs.h new file mode 100644 index 000000000000..c5049670b9ec --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawtext_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define drawtext_curs_width 32 +#define drawtext_curs_height 32 +#define drawtext_curs_x_hot 8 +#define drawtext_curs_y_hot 8 +static char drawtext_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xfd, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x81, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, + 0x00, 0x80, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/drawtext_mask.h b/vcl/inc/unx/x11_cursors/drawtext_mask.h new file mode 100644 index 000000000000..e27ce2514306 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/drawtext_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define drawtext_mask_width 32 +#define drawtext_mask_height 32 +static char drawtext_mask_bits[] = { + 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, + 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, + 0x80, 0x03, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, + 0xff, 0xff, 0x01, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, + 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0xc3, 0x1f, 0x00, + 0x80, 0xc3, 0x1f, 0x00, 0x80, 0xc3, 0x1f, 0x00, 0x00, 0x00, 0x07, 0x00, + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xc0, 0x1f, 0x00, + 0x00, 0xc0, 0x1f, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/fill_curs.h b/vcl/inc/unx/x11_cursors/fill_curs.h new file mode 100644 index 000000000000..792ea50e4f00 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/fill_curs.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define fill_curs_width 32 +#define fill_curs_height 32 +#define fill_curs_x_hot 10 +#define fill_curs_y_hot 22 +static char fill_curs_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x80,0x02,0x00,0x00,0x5c,0x0c,0x00,0x00, + 0x2e,0x12,0x00,0x00,0x17,0x38,0x00,0x00,0x0b,0x7c,0x00,0x00,0x5b,0xbe,0x00, + 0x00,0x27,0x9f,0x00,0x00,0xa7,0x4f,0x00,0x00,0xc7,0x27,0x00,0x00,0x87,0x13, + 0x00,0x00,0x06,0x09,0x00,0x00,0x06,0x06,0x00,0x00,0x04,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/fill_mask.h b/vcl/inc/unx/x11_cursors/fill_mask.h new file mode 100644 index 000000000000..67681f243f7b --- /dev/null +++ b/vcl/inc/unx/x11_cursors/fill_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define fill_mask_width 32 +#define fill_mask_height 32 +#define fill_mask_x_hot 10 +#define fill_mask_y_hot 22 +static char fill_mask_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x80,0x03,0x00,0x00,0xdc,0x0f,0x00,0x00, + 0xfe,0x1f,0x00,0x00,0xff,0x3f,0x00,0x00,0xff,0x7f,0x00,0x00,0xff,0xff,0x00, + 0x00,0xe7,0xff,0x00,0x00,0xe7,0x7f,0x00,0x00,0xc7,0x3f,0x00,0x00,0x87,0x1f, + 0x00,0x00,0x06,0x0f,0x00,0x00,0x06,0x06,0x00,0x00,0x04,0x00,0x00,0x00,0x04, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/hshear_curs.h b/vcl/inc/unx/x11_cursors/hshear_curs.h new file mode 100644 index 000000000000..7f6092b648de --- /dev/null +++ b/vcl/inc/unx/x11_cursors/hshear_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define hshear_curs_width 32 +#define hshear_curs_height 32 +#define hshear_curs_x_hot 15 +#define hshear_curs_y_hot 15 +static char hshear_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x3c, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x0c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/hshear_mask.h b/vcl/inc/unx/x11_cursors/hshear_mask.h new file mode 100644 index 000000000000..6d09b3b0af01 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/hshear_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define hshear_mask_width 32 +#define hshear_mask_height 32 +static char hshear_mask_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, + 0x80, 0xff, 0xff, 0x01, 0x80, 0xff, 0xff, 0x01, 0x80, 0xff, 0xff, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x01, + 0x80, 0xff, 0xff, 0x01, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, 0x3e, 0x00, + 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/invert50.h b/vcl/inc/unx/x11_cursors/invert50.h new file mode 100644 index 000000000000..7c0d00ce8fa4 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/invert50.h @@ -0,0 +1,65 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define invert50_width 32 +#define invert50_height 32 +static char invert50_bits[] = { +#if 1 + 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, + 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, + 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, + 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, + 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, + 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, + 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, + 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, + 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, + 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, + 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, + 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, + 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, + 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, + 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, + 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, +#else + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, +#endif +}; diff --git a/vcl/inc/unx/x11_cursors/linkdata_curs.h b/vcl/inc/unx/x11_cursors/linkdata_curs.h new file mode 100644 index 000000000000..c60edc3b99d0 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/linkdata_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define linkdata_curs_width 32 +#define linkdata_curs_height 32 +#define linkdata_curs_x_hot 1 +#define linkdata_curs_y_hot 1 +static char linkdata_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, + 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, + 0xfe, 0x03, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, + 0x66, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x53, 0x00, 0x00, + 0x28, 0xa3, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x10, 0xf0, 0x1f, 0x00, 0x08, 0x70, 0x18, 0x00, 0x10, 0xf0, 0x18, 0x00, + 0xa8, 0x72, 0x18, 0x00, 0x50, 0x35, 0x1a, 0x00, 0x00, 0x30, 0x1f, 0x00, + 0x00, 0xb0, 0x1f, 0x00, 0x00, 0x70, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/linkdata_mask.h b/vcl/inc/unx/x11_cursors/linkdata_mask.h new file mode 100644 index 000000000000..cf0f89f63b1b --- /dev/null +++ b/vcl/inc/unx/x11_cursors/linkdata_mask.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define linkdata_mask_width 32 +#define linkdata_mask_height 32 +#define linkdata_mask_x_hot 1 +#define linkdata_mask_y_hot 1 +static char linkdata_mask_bits[] = { + 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, + 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, + 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, + 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, + 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, + 0xe0, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, + 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0x3c, 0xf8, 0x3f, 0x00, + 0x3c, 0xf8, 0x3f, 0x00, 0x3c, 0xf8, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00, + 0xfc, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00, + 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, + 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/linkfile_curs.h b/vcl/inc/unx/x11_cursors/linkfile_curs.h new file mode 100644 index 000000000000..fb676ae2a04b --- /dev/null +++ b/vcl/inc/unx/x11_cursors/linkfile_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define linkfile_curs_width 32 +#define linkfile_curs_height 32 +#define linkfile_curs_x_hot 9 +#define linkfile_curs_y_hot 9 +static char linkfile_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00, + 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, + 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, + 0xfe, 0x02, 0x00, 0x00, 0xfe, 0x06, 0x00, 0x00, 0xfe, 0x0e, 0x00, 0x00, + 0xfe, 0x1e, 0x00, 0x00, 0xfe, 0x3e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, + 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x03, 0x00, + 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, + 0x00, 0xc2, 0xe0, 0x3f, 0x00, 0xc0, 0xe0, 0x30, 0x00, 0x80, 0xe1, 0x31, + 0x00, 0x80, 0xe1, 0x30, 0x00, 0x00, 0x63, 0x34, 0x00, 0x00, 0x63, 0x3e, + 0x00, 0x00, 0x60, 0x3f, 0x00, 0x00, 0xe0, 0x3e, 0x00, 0x00, 0xe0, 0x3f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/linkfile_mask.h b/vcl/inc/unx/x11_cursors/linkfile_mask.h new file mode 100644 index 000000000000..28ff46c4fae4 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/linkfile_mask.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define linkfile_mask_width 32 +#define linkfile_mask_height 32 +#define linkfile_mask_x_hot 9 +#define linkfile_mask_y_hot 9 +static char linkfile_mask_bits[] = { + 0xff, 0x01, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, + 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, + 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, + 0xff, 0x0f, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, + 0xff, 0x7f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, + 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, + 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0xf1, 0x7f, + 0x00, 0xff, 0xf1, 0x7f, 0x00, 0xe7, 0xf3, 0x7f, 0x00, 0xe0, 0xf3, 0x7f, + 0x00, 0xc0, 0xf7, 0x7f, 0x00, 0xc0, 0xf7, 0x7f, 0x00, 0x80, 0xf7, 0x7f, + 0x00, 0x80, 0xf7, 0x7f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf0, 0x7f, + 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/magnify_curs.h b/vcl/inc/unx/x11_cursors/magnify_curs.h new file mode 100644 index 000000000000..76114ca410d5 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/magnify_curs.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define magnify_curs_width 32 +#define magnify_curs_height 32 +#define magnify_curs_x_hot 12 +#define magnify_curs_y_hot 13 +static char magnify_curs_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x83, + 0x01,0x00,0x80,0x00,0x02,0x00,0x40,0x00,0x04,0x00,0x40,0x00,0x04,0x00,0x20, + 0x00,0x08,0x00,0x20,0x00,0x08,0x00,0x20,0x00,0x08,0x00,0x20,0x00,0x08,0x00, + 0x20,0x00,0x08,0x00,0x40,0x00,0x04,0x00,0x40,0x00,0x04,0x00,0x80,0x00,0x06, + 0x00,0x00,0x83,0x0f,0x00,0x00,0x7c,0x1c,0x00,0x00,0x00,0x38,0x00,0x00,0x00, + 0x70,0x00,0x00,0x00,0xe0,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/magnify_mask.h b/vcl/inc/unx/x11_cursors/magnify_mask.h new file mode 100644 index 000000000000..db4213943b6e --- /dev/null +++ b/vcl/inc/unx/x11_cursors/magnify_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define magnify_mask_width 32 +#define magnify_mask_height 32 +static char magnify_mask_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, + 0x00, 0xff, 0x01, 0x00, 0x80, 0xff, 0x03, 0x00, 0xc0, 0x83, 0x07, 0x00, + 0xe0, 0x00, 0x0e, 0x00, 0xe0, 0x00, 0x0e, 0x00, 0x70, 0x00, 0x1c, 0x00, + 0x70, 0x00, 0x1c, 0x00, 0x70, 0x00, 0x1c, 0x00, 0x70, 0x00, 0x1c, 0x00, + 0x70, 0x00, 0x1c, 0x00, 0xe0, 0x00, 0x0e, 0x00, 0xe0, 0x00, 0x0e, 0x00, + 0xc0, 0x83, 0x0f, 0x00, 0x80, 0xff, 0x1f, 0x00, 0x00, 0xff, 0x3f, 0x00, + 0x00, 0x7c, 0x7c, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0x01, + 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/mirror_curs.h b/vcl/inc/unx/x11_cursors/mirror_curs.h new file mode 100644 index 000000000000..0f0f1b360224 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/mirror_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define mirror_curs_width 32 +#define mirror_curs_height 32 +#define mirror_curs_x_hot 14 +#define mirror_curs_y_hot 12 +static char mirror_curs_bits[] = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0x03, 0xf8, 0xf5, 0xff, + 0xfb, 0xfb, 0xee, 0xff, 0x0b, 0xfa, 0xf5, 0xff, 0xeb, 0xfa, 0xfa, 0xff, + 0xeb, 0xfa, 0xfa, 0xff, 0xeb, 0x7a, 0xfd, 0xff, 0xeb, 0x7a, 0xfd, 0xff, + 0xeb, 0xba, 0x7e, 0xff, 0xeb, 0xba, 0xbe, 0xfe, 0xeb, 0x5a, 0x5f, 0xfd, + 0x0b, 0x5a, 0xaf, 0xfa, 0xfb, 0xab, 0xd7, 0xf5, 0x03, 0xa8, 0xeb, 0xeb, + 0xff, 0xd7, 0xf5, 0xf5, 0xff, 0xd7, 0xfa, 0xfa, 0xff, 0x6b, 0x7d, 0xfd, + 0xff, 0xeb, 0xba, 0xfe, 0xff, 0xf5, 0x55, 0xff, 0xff, 0xf5, 0xab, 0xff, + 0xff, 0xfa, 0xd7, 0xff, 0x7f, 0xf7, 0xef, 0xff, 0xff, 0xfa, 0xff, 0xff, + 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/vcl/inc/unx/x11_cursors/mirror_mask.h b/vcl/inc/unx/x11_cursors/mirror_mask.h new file mode 100644 index 000000000000..da9c00435162 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/mirror_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define mirror_mask_width 32 +#define mirror_mask_height 32 +static char mirror_mask_bits[] = { + 0x00, 0x00, 0x04, 0x00, 0xfe, 0x0f, 0x0e, 0x00, 0xfe, 0x0f, 0x1f, 0x00, + 0xfe, 0x8f, 0x3f, 0x00, 0xfe, 0x0f, 0x1f, 0x00, 0xfe, 0x8f, 0x0f, 0x00, + 0xbe, 0x8f, 0x0f, 0x00, 0xbe, 0xcf, 0x07, 0x00, 0xbe, 0xcf, 0x87, 0x00, + 0xbe, 0xef, 0xc3, 0x01, 0xbe, 0xef, 0xe3, 0x03, 0xfe, 0xff, 0xf1, 0x07, + 0xfe, 0xff, 0x79, 0x0f, 0xfe, 0xff, 0x3c, 0x1e, 0xfe, 0xff, 0x1e, 0x3c, + 0xfe, 0x7f, 0x0f, 0x1e, 0x00, 0xfc, 0x07, 0x0f, 0x00, 0xfe, 0x83, 0x07, + 0x00, 0xbe, 0xc7, 0x03, 0x00, 0x1f, 0xef, 0x01, 0x00, 0x1f, 0xfe, 0x00, + 0x80, 0x0f, 0x7c, 0x00, 0xc0, 0x1d, 0x38, 0x00, 0x80, 0x0f, 0x10, 0x00, + 0x00, 0x07, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/movebezierweight_curs.h b/vcl/inc/unx/x11_cursors/movebezierweight_curs.h new file mode 100644 index 000000000000..a1ece2d925e9 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/movebezierweight_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define movebezierweight_curs_width 32 +#define movebezierweight_curs_height 32 +#define movebezierweight_curs_x_hot 0 +#define movebezierweight_curs_y_hot 0 +static char movebezierweight_curs_bits[] = { + 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, + 0xf1, 0xff, 0xff, 0xff, 0xe1, 0xff, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xff, + 0x81, 0xff, 0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, + 0x01, 0xfc, 0xff, 0xff, 0x81, 0xff, 0xff, 0xff, 0x91, 0xff, 0xff, 0xff, + 0x99, 0xff, 0xff, 0xef, 0x3d, 0xff, 0xff, 0xef, 0x3f, 0xff, 0xff, 0xef, + 0x7f, 0xfe, 0xff, 0xf7, 0x7f, 0xfe, 0xff, 0xf7, 0xff, 0xfc, 0xff, 0xfb, + 0xff, 0x7c, 0xff, 0xec, 0xff, 0xbf, 0x0e, 0xd7, 0xff, 0x7f, 0xf3, 0xef, + 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, + 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/vcl/inc/unx/x11_cursors/movebezierweight_mask.h b/vcl/inc/unx/x11_cursors/movebezierweight_mask.h new file mode 100644 index 000000000000..27e0d8c703db --- /dev/null +++ b/vcl/inc/unx/x11_cursors/movebezierweight_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define movebezierweight_mask_width 32 +#define movebezierweight_mask_height 32 +static char movebezierweight_mask_bits[] = { + 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, + 0x1f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, + 0xff, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, + 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x10, + 0xff, 0x00, 0x00, 0x38, 0xe7, 0x01, 0x00, 0x38, 0xe3, 0x01, 0x00, 0x38, + 0xc0, 0x03, 0x00, 0x1c, 0xc0, 0x03, 0x00, 0x1c, 0x80, 0x87, 0x00, 0x1f, + 0x80, 0xc7, 0xf1, 0x3f, 0x80, 0xe7, 0xff, 0x7f, 0x00, 0xc0, 0xff, 0x38, + 0x00, 0x80, 0x0f, 0x10, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, + 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, + 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/movedata_curs.h b/vcl/inc/unx/x11_cursors/movedata_curs.h new file mode 100644 index 000000000000..b79412bc3f41 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/movedata_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define movedata_curs_width 32 +#define movedata_curs_height 32 +#define movedata_curs_x_hot 1 +#define movedata_curs_y_hot 1 +static char movedata_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, + 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, + 0xfe, 0x03, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, + 0x66, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x53, 0x00, 0x00, + 0x28, 0xa3, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, + 0x10, 0x40, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, + 0xa8, 0xaa, 0x00, 0x00, 0x50, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/movedata_mask.h b/vcl/inc/unx/x11_cursors/movedata_mask.h new file mode 100644 index 000000000000..e25d0837d8dc --- /dev/null +++ b/vcl/inc/unx/x11_cursors/movedata_mask.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define movedata_mask_width 32 +#define movedata_mask_height 32 +#define movedata_mask_x_hot 1 +#define movedata_mask_y_hot 1 +static char movedata_mask_bits[] = { + 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, + 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, + 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, + 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, + 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, + 0xe0, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, + 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0x3c, 0xe0, 0x01, 0x00, + 0x3c, 0xe0, 0x01, 0x00, 0x3c, 0xe0, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, + 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0xf8, 0xff, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/movedlnk_curs.h b/vcl/inc/unx/x11_cursors/movedlnk_curs.h new file mode 100644 index 000000000000..56608b8153a6 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/movedlnk_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define movedlnk_curs_width 32 +#define movedlnk_curs_height 32 +#define movedlnk_curs_x_hot 1 +#define movedlnk_curs_y_hot 1 +static char movedlnk_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, + 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, + 0xfe, 0x03, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, + 0x66, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x53, 0x00, 0x00, + 0x28, 0xa3, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0xf0, 0x81, 0x00, 0x00, + 0x30, 0x41, 0x00, 0x00, 0x10, 0x81, 0x00, 0x00, 0xd0, 0x41, 0x00, 0x00, + 0xf0, 0xa9, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/movedlnk_mask.h b/vcl/inc/unx/x11_cursors/movedlnk_mask.h new file mode 100644 index 000000000000..2aa3eb4b277d --- /dev/null +++ b/vcl/inc/unx/x11_cursors/movedlnk_mask.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define movedlnk_mask_width 32 +#define movedlnk_mask_height 32 +#define movedlnk_mask_x_hot 1 +#define movedlnk_mask_y_hot 1 +static char movedlnk_mask_bits[] = { + 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, + 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, + 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, + 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, + 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, + 0xe0, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, + 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0xf8, 0xe3, 0x01, 0x00, + 0xf8, 0xe3, 0x01, 0x00, 0xf8, 0xe3, 0x01, 0x00, 0xf8, 0xff, 0x01, 0x00, + 0xf8, 0xff, 0x01, 0x00, 0xf8, 0xff, 0x01, 0x00, 0x00, 0xfe, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/movefile_curs.h b/vcl/inc/unx/x11_cursors/movefile_curs.h new file mode 100644 index 000000000000..ed3a11e7f49d --- /dev/null +++ b/vcl/inc/unx/x11_cursors/movefile_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define movefile_curs_width 32 +#define movefile_curs_height 32 +#define movefile_curs_x_hot 9 +#define movefile_curs_y_hot 9 +static char movefile_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00, + 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, + 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, + 0xfe, 0x02, 0x00, 0x00, 0xfe, 0x06, 0x00, 0x00, 0xfe, 0x0e, 0x00, 0x00, + 0xfe, 0x1e, 0x00, 0x00, 0xfe, 0x3e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, + 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x03, 0x00, + 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, + 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, + 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/movefile_mask.h b/vcl/inc/unx/x11_cursors/movefile_mask.h new file mode 100644 index 000000000000..668d8d7e8015 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/movefile_mask.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define movefile_mask_width 32 +#define movefile_mask_height 32 +#define movefile_mask_x_hot 9 +#define movefile_mask_y_hot 9 +static char movefile_mask_bits[] = { + 0xff, 0x01, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, + 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, + 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, + 0xff, 0x0f, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, + 0xff, 0x7f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, + 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, + 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, + 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, 0xe0, 0x03, 0x00, + 0x00, 0xc0, 0x07, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x80, 0x07, 0x00, + 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/movefiles_curs.h b/vcl/inc/unx/x11_cursors/movefiles_curs.h new file mode 100644 index 000000000000..148fe2e72a5e --- /dev/null +++ b/vcl/inc/unx/x11_cursors/movefiles_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define movefiles_curs_width 32 +#define movefiles_curs_height 32 +#define movefiles_curs_x_hot 8 +#define movefiles_curs_y_hot 9 +static char movefiles_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0xe0, 0x2f, 0x00, 0x00, + 0xe8, 0x0f, 0x00, 0x00, 0xe8, 0x7f, 0x00, 0x00, 0xea, 0x7f, 0x00, 0x00, + 0xea, 0x7f, 0x00, 0x00, 0xea, 0x7f, 0x00, 0x00, 0x6a, 0x7e, 0x00, 0x00, + 0x6a, 0x7d, 0x00, 0x00, 0x6a, 0x7b, 0x00, 0x00, 0x6a, 0x77, 0x00, 0x00, + 0x6a, 0x6f, 0x00, 0x00, 0x6a, 0x5f, 0x00, 0x00, 0x0a, 0x3f, 0x00, 0x00, + 0x7a, 0x7f, 0x00, 0x00, 0x02, 0xff, 0x00, 0x00, 0x7e, 0xff, 0x01, 0x00, + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, + 0x00, 0x61, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, + 0x00, 0xc0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/movefiles_mask.h b/vcl/inc/unx/x11_cursors/movefiles_mask.h new file mode 100644 index 000000000000..dc990dc5cb61 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/movefiles_mask.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define movefiles_mask_width 32 +#define movefiles_mask_height 32 +#define movefiles_mask_x_hot 8 +#define movefiles_mask_y_hot 9 +static char movefiles_mask_bits[] = { + 0xf0, 0x1f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, + 0xfc, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x03, 0x00, 0xff, 0xff, 0x03, 0x00, + 0xff, 0xff, 0x03, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, + 0x80, 0xff, 0x00, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0xf0, 0x01, 0x00, + 0x00, 0xe0, 0x03, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, + 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/moveflnk_curs.h b/vcl/inc/unx/x11_cursors/moveflnk_curs.h new file mode 100644 index 000000000000..7f48bc4506fc --- /dev/null +++ b/vcl/inc/unx/x11_cursors/moveflnk_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define moveflnk_curs_width 32 +#define moveflnk_curs_height 32 +#define moveflnk_curs_x_hot 9 +#define moveflnk_curs_y_hot 9 +static char moveflnk_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00, + 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, + 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, + 0xbe, 0x02, 0x00, 0x00, 0xa6, 0x06, 0x00, 0x00, 0xa2, 0x0e, 0x00, 0x00, + 0xba, 0x1e, 0x00, 0x00, 0xbe, 0x3e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, + 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x03, 0x00, + 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, + 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, + 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/moveflnk_mask.h b/vcl/inc/unx/x11_cursors/moveflnk_mask.h new file mode 100644 index 000000000000..a25b7ee18960 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/moveflnk_mask.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define moveflnk_mask_width 32 +#define moveflnk_mask_height 32 +#define moveflnk_mask_x_hot 9 +#define moveflnk_mask_y_hot 9 +static char moveflnk_mask_bits[] = { + 0xff, 0x01, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, + 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, + 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, + 0xff, 0x0f, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, + 0xff, 0x7f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, + 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, + 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, + 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, 0xe0, 0x03, 0x00, + 0x00, 0xc0, 0x07, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x80, 0x07, 0x00, + 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/movepoint_curs.h b/vcl/inc/unx/x11_cursors/movepoint_curs.h new file mode 100644 index 000000000000..e3b20bd8edf9 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/movepoint_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define movepoint_curs_width 32 +#define movepoint_curs_height 32 +#define movepoint_curs_x_hot 0 +#define movepoint_curs_y_hot 0 +static char movepoint_curs_bits[] = { + 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, + 0xf1, 0xff, 0xff, 0xff, 0xe1, 0xff, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xff, + 0x81, 0xff, 0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, + 0x01, 0xfc, 0xff, 0xff, 0x81, 0xff, 0xff, 0xff, 0x91, 0xff, 0xff, 0xff, + 0x39, 0xff, 0xff, 0xff, 0x3d, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, + 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xfc, 0x83, 0xff, 0xff, 0xfc, 0x83, 0xff, + 0xff, 0xff, 0x83, 0xff, 0xff, 0xff, 0x83, 0xff, 0xff, 0xff, 0x83, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/vcl/inc/unx/x11_cursors/movepoint_mask.h b/vcl/inc/unx/x11_cursors/movepoint_mask.h new file mode 100644 index 000000000000..e4fae36c023c --- /dev/null +++ b/vcl/inc/unx/x11_cursors/movepoint_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define movepoint_mask_width 32 +#define movepoint_mask_height 32 +static char movepoint_mask_bits[] = { + 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, + 0x1f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, + 0xff, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, + 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, + 0xef, 0x01, 0x00, 0x00, 0xe7, 0x01, 0x00, 0x00, 0xc3, 0x03, 0x00, 0x00, + 0xc0, 0x03, 0xfe, 0x00, 0x80, 0x07, 0xfe, 0x00, 0x80, 0x07, 0xfe, 0x00, + 0x80, 0x07, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x00, + 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/nodrop_curs.h b/vcl/inc/unx/x11_cursors/nodrop_curs.h new file mode 100644 index 000000000000..8e208e32f293 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/nodrop_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define nodrop_curs_width 32 +#define nodrop_curs_height 32 +#define nodrop_curs_x_hot 9 +#define nodrop_curs_y_hot 9 +static char nodrop_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, + 0xf8, 0x7f, 0x00, 0x00, 0x7c, 0xf8, 0x00, 0x00, 0x1c, 0xfc, 0x00, 0x00, + 0x1e, 0xfe, 0x01, 0x00, 0x0e, 0xdf, 0x01, 0x00, 0x8e, 0xcf, 0x01, 0x00, + 0xce, 0xc7, 0x01, 0x00, 0xee, 0xc3, 0x01, 0x00, 0xfe, 0xe1, 0x01, 0x00, + 0xfc, 0xe0, 0x00, 0x00, 0x7c, 0xf8, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, + 0xf0, 0x3f, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/nodrop_mask.h b/vcl/inc/unx/x11_cursors/nodrop_mask.h new file mode 100644 index 000000000000..7cbecef2c60f --- /dev/null +++ b/vcl/inc/unx/x11_cursors/nodrop_mask.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define nodrop_mask_width 32 +#define nodrop_mask_height 32 +#define nodrop_mask_x_hot 9 +#define nodrop_mask_y_hot 9 +static char nodrop_mask_bits[] = { + 0xc0, 0x0f, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, + 0xfc, 0xff, 0x00, 0x00, 0xfe, 0xff, 0x01, 0x00, 0x7e, 0xfe, 0x01, 0x00, + 0x3f, 0xff, 0x03, 0x00, 0x9f, 0xff, 0x03, 0x00, 0xdf, 0xff, 0x03, 0x00, + 0xff, 0xef, 0x03, 0x00, 0xff, 0xe7, 0x03, 0x00, 0xff, 0xf3, 0x03, 0x00, + 0xfe, 0xf9, 0x01, 0x00, 0xfe, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x00, 0x00, + 0xf8, 0x7f, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/null_curs.h b/vcl/inc/unx/x11_cursors/null_curs.h new file mode 100644 index 000000000000..19d4130d4b5d --- /dev/null +++ b/vcl/inc/unx/x11_cursors/null_curs.h @@ -0,0 +1,31 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define nullcurs_width 4 +#define nullcurs_height 4 +#define nullcurs_x_hot 2 +#define nullcurs_y_hot 2 +static char nullcurs_bits[] = { 0x00, 0x00 }; diff --git a/vcl/inc/unx/x11_cursors/null_mask.h b/vcl/inc/unx/x11_cursors/null_mask.h new file mode 100644 index 000000000000..a657cfa54af4 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/null_mask.h @@ -0,0 +1,29 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define nullmask_width 4 +#define nullmask_height 4 +static char nullmask_bits[] = { 0x00, 0x00 }; diff --git a/vcl/inc/unx/x11_cursors/paintbrush_curs.h b/vcl/inc/unx/x11_cursors/paintbrush_curs.h new file mode 100644 index 000000000000..5dfd18a539a6 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/paintbrush_curs.h @@ -0,0 +1,8 @@ +#define paintbrush_curs_width 16 +#define paintbrush_curs_height 16 +#define paintbrush_curs_x_hot 0 +#define paintbrush_curs_y_hot 10 +static char paintbrush_curs_bits[] = { + 0x00, 0x80, 0x00, 0x40, 0x00, 0x20, 0x00, 0x90, 0x80, 0xcb, 0x60, 0x64, + 0x90, 0x34, 0x08, 0x19, 0x06, 0x22, 0x11, 0x24, 0x09, 0x18, 0x46, 0x14, + 0x24, 0x0a, 0x18, 0x05, 0x90, 0x02, 0xe0, 0x01 }; diff --git a/vcl/inc/unx/x11_cursors/paintbrush_mask.h b/vcl/inc/unx/x11_cursors/paintbrush_mask.h new file mode 100644 index 000000000000..a5b5617b820f --- /dev/null +++ b/vcl/inc/unx/x11_cursors/paintbrush_mask.h @@ -0,0 +1,7 @@ +#define paintbrush_mask_width 16 +#define paintbrush_mask_height 16 +static char paintbrush_mask_bits[] = { + 0x00, 0x80, 0x00, 0xc0, 0x00, 0xe0, 0x00, 0xf0, 0x80, 0xfb, 0xe0, 0x7f, + 0xf0, 0x3f, 0xf8, 0x1f, 0xfe, 0x3f, 0xff, 0x3f, 0xff, 0x1f, 0xfe, 0x1f, + 0xfc, 0x0f, 0xf8, 0x07, 0xf0, 0x03, 0xe0, 0x01 }; + diff --git a/vcl/inc/unx/x11_cursors/pivotcol_curs.h b/vcl/inc/unx/x11_cursors/pivotcol_curs.h new file mode 100644 index 000000000000..22873985daf0 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/pivotcol_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define pivotcol_curs_width 32 +#define pivotcol_curs_height 32 +#define pivotcol_curs_x_hot 7 +#define pivotcol_curs_y_hot 5 +static char pivotcol_curs_bits[] = { + 0xff, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x55, 0x01, 0x00, 0x00, + 0x29, 0x01, 0x00, 0x00, 0x15, 0x01, 0x00, 0x00, 0xa9, 0x00, 0x00, 0x00, + 0x95, 0x01, 0x00, 0x00, 0xa9, 0x02, 0x00, 0x00, 0x95, 0x04, 0x00, 0x00, + 0xa9, 0x08, 0x00, 0x00, 0x95, 0x10, 0x00, 0x00, 0xa9, 0x20, 0x00, 0x00, + 0x95, 0x40, 0x00, 0x00, 0xa9, 0x80, 0x00, 0x00, 0x95, 0x00, 0x01, 0x00, + 0xa9, 0xe0, 0x03, 0x00, 0x95, 0x2c, 0x00, 0x00, 0xbd, 0x4a, 0x00, 0x00, + 0xbf, 0x51, 0x00, 0x00, 0x80, 0x90, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, + 0x00, 0x20, 0x01, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/inc/unx/x11_cursors/pivotcol_mask.h b/vcl/inc/unx/x11_cursors/pivotcol_mask.h new file mode 100644 index 000000000000..911eede87ed4 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/pivotcol_mask.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define pivotcol_mask_width 32 +#define pivotcol_mask_height 32 +#define pivotcol_mask_x_hot 7 +#define pivotcol_mask_y_hot 5 +static char pivotcol_mask_bits[] = { + 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, + 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, + 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, + 0xff, 0x0f, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, + 0xff, 0x7f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, + 0xff, 0xff, 0x03, 0x00, 0xff, 0x3f, 0x00, 0x00, 0xff, 0x7b, 0x00, 0x00, + 0xff, 0x71, 0x00, 0x00, 0x80, 0xf0, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, + 0x00, 0xe0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/inc/unx/x11_cursors/pivotdel_curs.h b/vcl/inc/unx/x11_cursors/pivotdel_curs.h new file mode 100644 index 000000000000..e0dcbc14a6d6 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/pivotdel_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define pivotdel_curs_width 32 +#define pivotdel_curs_height 32 +#define pivotdel_curs_x_hot 9 +#define pivotdel_curs_y_hot 8 +static char pivotdel_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x80, 0x01, 0x00, + 0x3c, 0xc0, 0x00, 0x00, 0x73, 0x6f, 0x07, 0x00, 0xe1, 0x30, 0x04, 0x00, + 0xc1, 0x1d, 0x04, 0x00, 0x81, 0x0f, 0x04, 0x00, 0x01, 0x07, 0x04, 0x00, + 0x81, 0x0f, 0x04, 0x00, 0xc1, 0x1d, 0x04, 0x00, 0xe1, 0x38, 0x04, 0x00, + 0x77, 0xaf, 0x07, 0x00, 0x78, 0x40, 0x00, 0x00, 0x3c, 0x80, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/inc/unx/x11_cursors/pivotdel_mask.h b/vcl/inc/unx/x11_cursors/pivotdel_mask.h new file mode 100644 index 000000000000..147bc2da410d --- /dev/null +++ b/vcl/inc/unx/x11_cursors/pivotdel_mask.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define pivotdel_mask_width 32 +#define pivotdel_mask_height 32 +#define pivotdel_mask_x_hot 9 +#define pivotdel_mask_y_hot 8 +static char pivotdel_mask_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x80, 0x01, 0x00, + 0x3c, 0xc0, 0x00, 0x00, 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, + 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, + 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, + 0xff, 0xff, 0x07, 0x00, 0x78, 0x40, 0x00, 0x00, 0x3c, 0x80, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/inc/unx/x11_cursors/pivotfld_curs.h b/vcl/inc/unx/x11_cursors/pivotfld_curs.h new file mode 100644 index 000000000000..1daf4f553275 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/pivotfld_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define pivotfld_curs_width 32 +#define pivotfld_curs_height 32 +#define pivotfld_curs_x_hot 8 +#define pivotfld_curs_y_hot 7 +static char pivotfld_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0x00, + 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x04, 0x00, + 0x01, 0x00, 0x04, 0x00, 0x01, 0x01, 0x04, 0x00, 0x01, 0x03, 0x04, 0x00, + 0x01, 0x05, 0x04, 0x00, 0x7f, 0xc9, 0x07, 0x00, 0x00, 0x11, 0x00, 0x00, + 0x00, 0x21, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0xc1, 0x07, 0x00, + 0x00, 0x59, 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0xa3, 0x00, 0x00, + 0x00, 0x21, 0x01, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x40, 0x02, 0x00, + 0x00, 0x80, 0x02, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/inc/unx/x11_cursors/pivotfld_mask.h b/vcl/inc/unx/x11_cursors/pivotfld_mask.h new file mode 100644 index 000000000000..6d62d8bbda46 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/pivotfld_mask.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define pivotfld_mask_width 32 +#define pivotfld_mask_height 32 +#define pivotfld_mask_x_hot 8 +#define pivotfld_mask_y_hot 7 +static char pivotfld_mask_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0x00, + 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, + 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, + 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, 0x00, 0x1f, 0x00, 0x00, + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, + 0x00, 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, + 0x00, 0x7f, 0x00, 0x00, 0x00, 0xf7, 0x00, 0x00, 0x00, 0xe3, 0x00, 0x00, + 0x00, 0xe1, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00, + 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/inc/unx/x11_cursors/pivotrow_curs.h b/vcl/inc/unx/x11_cursors/pivotrow_curs.h new file mode 100644 index 000000000000..75f4965f2582 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/pivotrow_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define pivotrow_curs_width 32 +#define pivotrow_curs_height 32 +#define pivotrow_curs_x_hot 8 +#define pivotrow_curs_y_hot 7 +static char pivotrow_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0x00, + 0x01, 0x00, 0x04, 0x00, 0x55, 0x55, 0x07, 0x00, 0xa9, 0xaa, 0x06, 0x00, + 0x55, 0x54, 0x07, 0x00, 0x29, 0xa9, 0x06, 0x00, 0x55, 0x53, 0x07, 0x00, + 0x29, 0xa5, 0x06, 0x00, 0x7f, 0xc9, 0x07, 0x00, 0x00, 0x11, 0x00, 0x00, + 0x00, 0x21, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0xc1, 0x07, 0x00, + 0x00, 0x59, 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0xa3, 0x00, 0x00, + 0x00, 0x21, 0x01, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x40, 0x02, 0x00, + 0x00, 0x80, 0x02, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/inc/unx/x11_cursors/pivotrow_mask.h b/vcl/inc/unx/x11_cursors/pivotrow_mask.h new file mode 100644 index 000000000000..a8896d0975f9 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/pivotrow_mask.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define pivotrow_mask_width 32 +#define pivotrow_mask_height 32 +#define pivotrow_curs_x_hot 8 +#define pivotrow_curs_y_hot 7 +static char pivotrow_mask_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0x00, + 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, + 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, + 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, 0x00, 0x1f, 0x00, 0x00, + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, + 0x00, 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, + 0x00, 0x7f, 0x00, 0x00, 0x00, 0xf7, 0x00, 0x00, 0x00, 0xe3, 0x00, 0x00, + 0x00, 0xe1, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00, + 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/inc/unx/x11_cursors/rotate_curs.h b/vcl/inc/unx/x11_cursors/rotate_curs.h new file mode 100644 index 000000000000..f9c57674dfb2 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/rotate_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define rotate_curs_width 32 +#define rotate_curs_height 32 +#define rotate_curs_x_hot 15 +#define rotate_curs_y_hot 15 +static char rotate_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, + 0x00, 0xc0, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0xd8, 0x00, 0x00, + 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, + 0x80, 0x00, 0xc0, 0x01, 0x80, 0x00, 0xe0, 0x03, 0x80, 0x00, 0x80, 0x00, + 0x00, 0x01, 0x40, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x02, 0x20, 0x00, + 0x00, 0x04, 0x10, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0xe0, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/rotate_mask.h b/vcl/inc/unx/x11_cursors/rotate_mask.h new file mode 100644 index 000000000000..9fcff18925f0 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/rotate_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define rotate_mask_width 32 +#define rotate_mask_height 32 +static char rotate_mask_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, + 0x00, 0xe0, 0x01, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0xfc, 0x01, 0x00, + 0x00, 0xfe, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, + 0x80, 0x03, 0x00, 0x00, 0xc0, 0x01, 0x80, 0x00, 0xc0, 0x01, 0xc0, 0x01, + 0xc0, 0x01, 0xe0, 0x03, 0xc0, 0x01, 0xf0, 0x07, 0xc0, 0x01, 0xf0, 0x07, + 0x80, 0x03, 0xe0, 0x00, 0x80, 0x03, 0xe0, 0x00, 0x00, 0x07, 0x70, 0x00, + 0x00, 0x1e, 0x3c, 0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0xf8, 0x0f, 0x00, + 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/salcursors.h b/vcl/inc/unx/x11_cursors/salcursors.h new file mode 100644 index 000000000000..e0d34e122336 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/salcursors.h @@ -0,0 +1,162 @@ +/************************************************************************* + * + * 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 "unx/x11_cursors/nodrop_curs.h" +#include "unx/x11_cursors/nodrop_mask.h" +#include "unx/x11_cursors/magnify_curs.h" +#include "unx/x11_cursors/magnify_mask.h" +#include "unx/x11_cursors/rotate_curs.h" +#include "unx/x11_cursors/rotate_mask.h" +#include "unx/x11_cursors/hshear_curs.h" +#include "unx/x11_cursors/hshear_mask.h" +#include "unx/x11_cursors/vshear_curs.h" +#include "unx/x11_cursors/vshear_mask.h" +#include "unx/x11_cursors/drawline_curs.h" +#include "unx/x11_cursors/drawline_mask.h" +#include "unx/x11_cursors/drawrect_curs.h" +#include "unx/x11_cursors/drawrect_mask.h" +#include "unx/x11_cursors/drawpolygon_curs.h" +#include "unx/x11_cursors/drawpolygon_mask.h" +#include "unx/x11_cursors/drawbezier_curs.h" +#include "unx/x11_cursors/drawbezier_mask.h" +#include "unx/x11_cursors/drawarc_curs.h" +#include "unx/x11_cursors/drawarc_mask.h" +#include "unx/x11_cursors/drawpie_curs.h" +#include "unx/x11_cursors/drawpie_mask.h" +#include "unx/x11_cursors/drawcirclecut_curs.h" +#include "unx/x11_cursors/drawcirclecut_mask.h" +#include "unx/x11_cursors/drawellipse_curs.h" +#include "unx/x11_cursors/drawellipse_mask.h" +#include "unx/x11_cursors/drawconnect_curs.h" +#include "unx/x11_cursors/drawconnect_mask.h" +#include "unx/x11_cursors/drawtext_curs.h" +#include "unx/x11_cursors/drawtext_mask.h" +#include "unx/x11_cursors/mirror_curs.h" +#include "unx/x11_cursors/mirror_mask.h" +#include "unx/x11_cursors/crook_curs.h" +#include "unx/x11_cursors/crook_mask.h" +#include "unx/x11_cursors/crop_curs.h" +#include "unx/x11_cursors/crop_mask.h" +#include "unx/x11_cursors/movepoint_curs.h" +#include "unx/x11_cursors/movepoint_mask.h" +#include "unx/x11_cursors/movebezierweight_curs.h" +#include "unx/x11_cursors/movebezierweight_mask.h" +#include "unx/x11_cursors/drawfreehand_curs.h" +#include "unx/x11_cursors/drawfreehand_mask.h" +#include "unx/x11_cursors/drawcaption_curs.h" +#include "unx/x11_cursors/drawcaption_mask.h" +#include "unx/x11_cursors/movedata_curs.h" +#include "unx/x11_cursors/movedata_mask.h" +#include "unx/x11_cursors/copydata_curs.h" +#include "unx/x11_cursors/copydata_mask.h" +#include "unx/x11_cursors/linkdata_curs.h" +#include "unx/x11_cursors/linkdata_mask.h" +#include "unx/x11_cursors/movedlnk_curs.h" +#include "unx/x11_cursors/movedlnk_mask.h" +#include "unx/x11_cursors/copydlnk_curs.h" +#include "unx/x11_cursors/copydlnk_mask.h" +#include "unx/x11_cursors/movefile_curs.h" +#include "unx/x11_cursors/movefile_mask.h" +#include "unx/x11_cursors/copyfile_curs.h" +#include "unx/x11_cursors/copyfile_mask.h" +#include "unx/x11_cursors/linkfile_curs.h" +#include "unx/x11_cursors/linkfile_mask.h" +#include "unx/x11_cursors/moveflnk_curs.h" +#include "unx/x11_cursors/moveflnk_mask.h" +#include "unx/x11_cursors/copyflnk_curs.h" +#include "unx/x11_cursors/copyflnk_mask.h" +#include "unx/x11_cursors/movefiles_curs.h" +#include "unx/x11_cursors/movefiles_mask.h" +#include "unx/x11_cursors/copyfiles_curs.h" +#include "unx/x11_cursors/copyfiles_mask.h" + +#include "unx/x11_cursors/chart_curs.h" +#include "unx/x11_cursors/chart_mask.h" +#include "unx/x11_cursors/detective_curs.h" +#include "unx/x11_cursors/detective_mask.h" +#include "unx/x11_cursors/pivotcol_curs.h" +#include "unx/x11_cursors/pivotcol_mask.h" +#include "unx/x11_cursors/pivotfld_curs.h" +#include "unx/x11_cursors/pivotfld_mask.h" +#include "unx/x11_cursors/pivotrow_curs.h" +#include "unx/x11_cursors/pivotrow_mask.h" +#include "unx/x11_cursors/pivotdel_curs.h" +#include "unx/x11_cursors/pivotdel_mask.h" + +#include "unx/x11_cursors/chain_curs.h" +#include "unx/x11_cursors/chain_mask.h" +#include "unx/x11_cursors/chainnot_curs.h" +#include "unx/x11_cursors/chainnot_mask.h" + +#include "unx/x11_cursors/timemove_curs.h" +#include "unx/x11_cursors/timemove_mask.h" +#include "unx/x11_cursors/timesize_curs.h" +#include "unx/x11_cursors/timesize_mask.h" + +#include "unx/x11_cursors/ase_curs.h" +#include "unx/x11_cursors/ase_mask.h" +#include "unx/x11_cursors/asn_curs.h" +#include "unx/x11_cursors/asn_mask.h" +#include "unx/x11_cursors/asne_curs.h" +#include "unx/x11_cursors/asne_mask.h" +#include "unx/x11_cursors/asns_curs.h" +#include "unx/x11_cursors/asns_mask.h" +#include "unx/x11_cursors/asnswe_curs.h" +#include "unx/x11_cursors/asnswe_mask.h" +#include "unx/x11_cursors/asnw_curs.h" +#include "unx/x11_cursors/asnw_mask.h" +#include "unx/x11_cursors/ass_curs.h" +#include "unx/x11_cursors/ass_mask.h" +#include "unx/x11_cursors/asse_curs.h" +#include "unx/x11_cursors/asse_mask.h" +#include "unx/x11_cursors/assw_curs.h" +#include "unx/x11_cursors/assw_mask.h" +#include "unx/x11_cursors/asw_curs.h" +#include "unx/x11_cursors/asw_mask.h" +#include "unx/x11_cursors/aswe_curs.h" +#include "unx/x11_cursors/aswe_mask.h" +#include "unx/x11_cursors/null_curs.h" +#include "unx/x11_cursors/null_mask.h" + +#include "unx/x11_cursors/airbrush_curs.h" +#include "unx/x11_cursors/airbrush_mask.h" +#include "unx/x11_cursors/fill_curs.h" +#include "unx/x11_cursors/fill_mask.h" +#include "unx/x11_cursors/vertcurs_curs.h" +#include "unx/x11_cursors/vertcurs_mask.h" +#include "unx/x11_cursors/tblsele_curs.h" +#include "unx/x11_cursors/tblsele_mask.h" +#include "unx/x11_cursors/tblsels_curs.h" +#include "unx/x11_cursors/tblsels_mask.h" +#include "unx/x11_cursors/tblselse_curs.h" +#include "unx/x11_cursors/tblselse_mask.h" +#include "unx/x11_cursors/tblselw_curs.h" +#include "unx/x11_cursors/tblselw_mask.h" +#include "unx/x11_cursors/tblselsw_curs.h" +#include "unx/x11_cursors/tblselsw_mask.h" +#include "unx/x11_cursors/paintbrush_curs.h" +#include "unx/x11_cursors/paintbrush_mask.h" diff --git a/vcl/inc/unx/x11_cursors/tblsele_curs.h b/vcl/inc/unx/x11_cursors/tblsele_curs.h new file mode 100644 index 000000000000..7ad1314d1957 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/tblsele_curs.h @@ -0,0 +1,8 @@ +#define tblsele_curs_width 16 +#define tblsele_curs_height 16 +#define tblsele_curs_x_hot 14 +#define tblsele_curs_y_hot 8 +static char tblsele_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0c, + 0x00, 0x1c, 0xfc, 0x3f, 0xfc, 0x7f, 0xfc, 0x3f, 0x00, 0x1c, 0x00, 0x0c, + 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/inc/unx/x11_cursors/tblsele_mask.h b/vcl/inc/unx/x11_cursors/tblsele_mask.h new file mode 100644 index 000000000000..bb35c22c97cb --- /dev/null +++ b/vcl/inc/unx/x11_cursors/tblsele_mask.h @@ -0,0 +1,7 @@ +#define tblsele_mask_width 16 +#define tblsele_mask_height 16 +static char tblsele_mask_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0e, 0x00, 0x1e, + 0xfe, 0x3f, 0xfe, 0x7f, 0xfe, 0xff, 0xfe, 0x7f, 0xfe, 0x3f, 0x00, 0x1e, + 0x00, 0x0e, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00 }; + diff --git a/vcl/inc/unx/x11_cursors/tblsels_curs.h b/vcl/inc/unx/x11_cursors/tblsels_curs.h new file mode 100644 index 000000000000..0bf38d4b3fdb --- /dev/null +++ b/vcl/inc/unx/x11_cursors/tblsels_curs.h @@ -0,0 +1,9 @@ +#define tblsels_curs_width 16 +#define tblsels_curs_height 16 +#define tblsels_curs_x_hot 7 +#define tblsels_curs_y_hot 14 +static char tblsels_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, + 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xf8, 0x0f, 0xf0, 0x07, + 0xe0, 0x03, 0xc0, 0x01, 0x80, 0x00, 0x00, 0x00 }; + diff --git a/vcl/inc/unx/x11_cursors/tblsels_mask.h b/vcl/inc/unx/x11_cursors/tblsels_mask.h new file mode 100644 index 000000000000..9ba3b51d8d76 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/tblsels_mask.h @@ -0,0 +1,7 @@ +#define tblsels_mask_width 16 +#define tblsels_mask_height 16 +static char tblsels_mask_bits[] = { + 0x00, 0x00, 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, + 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xfc, 0x1f, 0xfc, 0x1f, 0xf8, 0x0f, + 0xf0, 0x07, 0xe0, 0x03, 0xc0, 0x01, 0x80, 0x00 }; + diff --git a/vcl/inc/unx/x11_cursors/tblselse_curs.h b/vcl/inc/unx/x11_cursors/tblselse_curs.h new file mode 100644 index 000000000000..208c7c59dc2d --- /dev/null +++ b/vcl/inc/unx/x11_cursors/tblselse_curs.h @@ -0,0 +1,8 @@ +#define tblselse_curs_width 16 +#define tblselse_curs_height 16 +#define tblselse_curs_x_hot 14 +#define tblselse_curs_y_hot 14 +static char tblselse_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0xf0, 0x00, + 0xf0, 0x01, 0xe0, 0x03, 0xc0, 0x47, 0x80, 0x6f, 0x00, 0x7f, 0x00, 0x7e, + 0x00, 0x7c, 0x00, 0x7e, 0x00, 0x7f, 0x00, 0x00 }; diff --git a/vcl/inc/unx/x11_cursors/tblselse_mask.h b/vcl/inc/unx/x11_cursors/tblselse_mask.h new file mode 100644 index 000000000000..4c4c97ad4ccf --- /dev/null +++ b/vcl/inc/unx/x11_cursors/tblselse_mask.h @@ -0,0 +1,7 @@ +#define tblselse_mask_width 16 +#define tblselse_mask_height 16 +static char tblselse_mask_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0xf0, 0x00, 0xf8, 0x01, + 0xf8, 0x03, 0xf0, 0xc7, 0xe0, 0xef, 0xc0, 0xff, 0x80, 0xff, 0x00, 0xff, + 0x00, 0xfe, 0x00, 0xff, 0x80, 0xff, 0x80, 0xff }; + diff --git a/vcl/inc/unx/x11_cursors/tblselsw_curs.h b/vcl/inc/unx/x11_cursors/tblselsw_curs.h new file mode 100644 index 000000000000..a3166a27ca52 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/tblselsw_curs.h @@ -0,0 +1,8 @@ +#define tblselsw_curs_width 16 +#define tblselsw_curs_height 16 +#define tblselsw_curs_x_hot 1 +#define tblselsw_curs_y_hot 14 +static char tblselsw_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0f, + 0x80, 0x0f, 0xc0, 0x07, 0xe2, 0x03, 0xf6, 0x01, 0xfe, 0x00, 0x7e, 0x00, + 0x3e, 0x00, 0x7e, 0x00, 0xfe, 0x00, 0x00, 0x00 }; diff --git a/vcl/inc/unx/x11_cursors/tblselsw_mask.h b/vcl/inc/unx/x11_cursors/tblselsw_mask.h new file mode 100644 index 000000000000..3981cbaa884d --- /dev/null +++ b/vcl/inc/unx/x11_cursors/tblselsw_mask.h @@ -0,0 +1,7 @@ +#define tblselsw_mask_width 16 +#define tblselsw_mask_height 16 +static char tblselsw_mask_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0f, 0x80, 0x1f, + 0xc0, 0x1f, 0xe3, 0x0f, 0xf7, 0x07, 0xff, 0x03, 0xff, 0x01, 0xff, 0x00, + 0x7f, 0x00, 0xff, 0x00, 0xff, 0x01, 0xff, 0x01 }; + diff --git a/vcl/inc/unx/x11_cursors/tblselw_curs.h b/vcl/inc/unx/x11_cursors/tblselw_curs.h new file mode 100644 index 000000000000..9d802d094ef8 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/tblselw_curs.h @@ -0,0 +1,8 @@ +#define tblselw_curs_width 16 +#define tblselw_curs_height 16 +#define tblselw_curs_x_hot 1 +#define tblselw_curs_y_hot 8 +static char tblselw_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x30, 0x00, + 0x38, 0x00, 0xfc, 0x3f, 0xfe, 0x3f, 0xfc, 0x3f, 0x38, 0x00, 0x30, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/inc/unx/x11_cursors/tblselw_mask.h b/vcl/inc/unx/x11_cursors/tblselw_mask.h new file mode 100644 index 000000000000..940668e3db7f --- /dev/null +++ b/vcl/inc/unx/x11_cursors/tblselw_mask.h @@ -0,0 +1,6 @@ +#define tblselw_mask_width 16 +#define tblselw_mask_height 16 +static char tblselw_mask_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x70, 0x00, 0x78, 0x00, + 0xfc, 0x7f, 0xfe, 0x7f, 0xff, 0x7f, 0xfe, 0x7f, 0xfc, 0x7f, 0x78, 0x00, + 0x70, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/inc/unx/x11_cursors/timemove_curs.h b/vcl/inc/unx/x11_cursors/timemove_curs.h new file mode 100644 index 000000000000..252a702caf77 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/timemove_curs.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define timemove_curs_width 32 +#define timemove_curs_height 32 +#define timemove_curs_x_hot 16 +#define timemove_curs_y_hot 16 +static char timemove_curs_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x80,0x03,0x00,0x00,0xc0,0x07,0x00,0x00, + 0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0xff,0xff,0x01, + 0x00,0x01,0x01,0x01,0x00,0x01,0x01,0x01,0x00,0x01,0x01,0x01,0x00,0xff,0xff, + 0x01,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0xc0, + 0x07,0x00,0x00,0x80,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/timemove_mask.h b/vcl/inc/unx/x11_cursors/timemove_mask.h new file mode 100644 index 000000000000..b7a9542a64c6 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/timemove_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define timemove_mask_width 32 +#define timemove_mask_height 32 +#define timemove_mask_x_hot 16 +#define timemove_mask_y_hot 16 +static char timemove_mask_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x01,0x00,0x00,0x80,0x03,0x00,0x00,0xc0,0x07,0x00,0x00,0xe0,0x0f,0x00,0x00, + 0xc0,0x07,0x00,0x00,0x80,0x03,0x00,0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03, + 0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff, + 0x03,0x80,0xff,0xff,0x03,0x00,0x80,0x03,0x00,0x00,0xc0,0x07,0x00,0x00,0xe0, + 0x0f,0x00,0x00,0xc0,0x07,0x00,0x00,0x80,0x03,0x00,0x00,0x00,0x01,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/timesize_curs.h b/vcl/inc/unx/x11_cursors/timesize_curs.h new file mode 100644 index 000000000000..61e53971290e --- /dev/null +++ b/vcl/inc/unx/x11_cursors/timesize_curs.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define timesize_curs_width 32 +#define timesize_curs_height 32 +#define timesize_curs_x_hot 16 +#define timesize_curs_y_hot 16 +static char timesize_curs_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xff,0xff,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00, + 0x01,0x01,0x01,0x00,0x81,0x03,0x01,0x00,0xc1,0x07,0x01,0x00,0x01,0x01,0x01, + 0x00,0x01,0x01,0x01,0x00,0x01,0x01,0x01,0x00,0xff,0xff,0x01,0x00,0x00,0x01, + 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0xc0,0x07,0x00,0x00,0x80, + 0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/timesize_mask.h b/vcl/inc/unx/x11_cursors/timesize_mask.h new file mode 100644 index 000000000000..3c4333c5e7b8 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/timesize_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define timesize_mask_width 32 +#define timesize_mask_height 32 +#define timesize_mask_x_hot 16 +#define timesize_mask_y_hot 16 +static char timesize_mask_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff, + 0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80, + 0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03, + 0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff, + 0x03,0x00,0x80,0x03,0x00,0x00,0xc0,0x07,0x00,0x00,0xe0,0x0f,0x00,0x00,0xc0, + 0x07,0x00,0x00,0x80,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/inc/unx/x11_cursors/vertcurs_curs.h b/vcl/inc/unx/x11_cursors/vertcurs_curs.h new file mode 100644 index 000000000000..d67251a1743d --- /dev/null +++ b/vcl/inc/unx/x11_cursors/vertcurs_curs.h @@ -0,0 +1,8 @@ +#define vertcurs_curs_width 16 +#define vertcurs_curs_height 16 +#define vertcurs_curs_x_hot 8 +#define vertcurs_curs_y_hot 8 +static char vertcurs_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x02, 0x40, + 0x06, 0x60, 0xfc, 0x3f, 0x06, 0x60, 0x02, 0x40, 0x02, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/vertcurs_mask.h b/vcl/inc/unx/x11_cursors/vertcurs_mask.h new file mode 100644 index 000000000000..769d6966571f --- /dev/null +++ b/vcl/inc/unx/x11_cursors/vertcurs_mask.h @@ -0,0 +1,8 @@ +#define vertcurs_mask_width 16 +#define vertcurs_mask_height 16 +#define vertcurs_mask_x_hot 8 +#define vertcurs_mask_y_hot 8 +static char vertcurs_mask_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0, 0x07, 0xe0, 0x0f, 0xf0, + 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0x0f, 0xf0, 0x07, 0xe0, 0x07, 0xe0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/vshear_curs.h b/vcl/inc/unx/x11_cursors/vshear_curs.h new file mode 100644 index 000000000000..87357c0a5027 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/vshear_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define vshear_curs_width 32 +#define vshear_curs_height 32 +#define vshear_curs_x_hot 15 +#define vshear_curs_y_hot 15 +static char vshear_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, + 0x00, 0x20, 0x04, 0x00, 0x00, 0x30, 0x04, 0x00, 0x00, 0x30, 0x04, 0x00, + 0x00, 0x38, 0x04, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, 0x20, 0x04, 0x00, + 0x00, 0x20, 0x04, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x20, 0x04, 0x00, + 0x00, 0x20, 0x1c, 0x00, 0x00, 0x20, 0x1c, 0x00, 0x00, 0x20, 0x0c, 0x00, + 0x00, 0x20, 0x0c, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x20, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/unx/x11_cursors/vshear_mask.h b/vcl/inc/unx/x11_cursors/vshear_mask.h new file mode 100644 index 000000000000..be77728c13f9 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/vshear_mask.h @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define vshear_mask_width 32 +#define vshear_mask_height 32 +static char vshear_mask_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 0x70, 0x0e, 0x00, + 0x00, 0x70, 0x0e, 0x00, 0x00, 0x78, 0x0e, 0x00, 0x00, 0x78, 0x0e, 0x00, + 0x00, 0x7c, 0x0e, 0x00, 0x00, 0x7c, 0x0e, 0x00, 0x00, 0x7c, 0x0e, 0x00, + 0x00, 0x70, 0x0e, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 0x70, 0x3e, 0x00, + 0x00, 0x70, 0x3e, 0x00, 0x00, 0x70, 0x3e, 0x00, 0x00, 0x70, 0x1e, 0x00, + 0x00, 0x70, 0x1e, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 0x70, 0x0e, 0x00, + 0x00, 0x70, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/inc/vcl/accel.h b/vcl/inc/vcl/accel.h deleted file mode 100644 index e726d04e7c99..000000000000 --- a/vcl/inc/vcl/accel.h +++ /dev/null @@ -1,59 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_ACCEL_H -#define _SV_ACCEL_H - -#include -#ifndef _SV_KEYCOD_HXX -#include -#endif - -class Accelerator; - -// ------------------ -// - ImplAccelEntry - -// ------------------ - -class ImplAccelEntry -{ -public: - USHORT mnId; - KeyCode maKeyCode; - Accelerator* mpAccel; - Accelerator* mpAutoAccel; - BOOL mbEnabled; -}; - -// ----------------- -// - Hilfemethoden - -// ----------------- - -// in KEYCOD.CXX -void ImplGetKeyCode( KeyFuncType eFunc, USHORT& rCode1, USHORT& rCode2, USHORT& rCode3, USHORT& rCode4 ); - -#endif // _SV_ACCEL_H diff --git a/vcl/inc/vcl/accmgr.hxx b/vcl/inc/vcl/accmgr.hxx deleted file mode 100644 index a60322eac403..000000000000 --- a/vcl/inc/vcl/accmgr.hxx +++ /dev/null @@ -1,64 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_ACCMGR_HXX -#define _SV_ACCMGR_HXX - -#include - -class ImplAccelList; -class Accelerator; -class KeyCode; - -// -------------------- -// - ImplAccelManager - -// -------------------- - -class ImplAccelManager -{ -private: - ImplAccelList* mpAccelList; - ImplAccelList* mpSequenceList; - -public: - ImplAccelManager() - { - mpAccelList = NULL; - mpSequenceList = NULL; - } - ~ImplAccelManager(); - - BOOL InsertAccel( Accelerator* pAccel ); - void RemoveAccel( Accelerator* pAccel ); - - void EndSequence( BOOL bCancel = FALSE ); - void FlushAccel() { EndSequence( TRUE ); } - - BOOL IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat ); -}; - -#endif // _SV_ACCMGR_HXX diff --git a/vcl/inc/vcl/bmpfast.hxx b/vcl/inc/vcl/bmpfast.hxx deleted file mode 100644 index de330704b74f..000000000000 --- a/vcl/inc/vcl/bmpfast.hxx +++ /dev/null @@ -1,51 +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 _SV_BMPFAST_HXX -#define _SV_BMPFAST_HXX - -class BitmapWriteAccess; -class BitmapReadAccess; -struct BitmapBuffer; -class BitmapColor; -class Size; -class Point; -struct SalTwoRect; - -// the bmpfast functions have signatures with good compatibility to -// their canonic counterparts, which employ the GetPixel/SetPixel methods - -bool ImplFastBitmapConversion( BitmapBuffer& rDst, const BitmapBuffer& rSrc, - const SalTwoRect& rTwoRect ); - -bool ImplFastBitmapBlending( BitmapWriteAccess& rDst, - const BitmapReadAccess& rSrc, const BitmapReadAccess& rMask, - const SalTwoRect& rTwoRect ); - -bool ImplFastEraseBitmap( BitmapBuffer&, const BitmapColor& ); - -#endif // _SV_BMPFAST_HXX diff --git a/vcl/inc/vcl/brdwin.hxx b/vcl/inc/vcl/brdwin.hxx deleted file mode 100644 index bf76174150e2..000000000000 --- a/vcl/inc/vcl/brdwin.hxx +++ /dev/null @@ -1,352 +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 _SV_BRDWIN_HXX -#define _SV_BRDWIN_HXX - -#include -#include - -class ImplBorderWindowView; - -// -------------------------- -// - ImplBorderWindow-Types - -// -------------------------- - -#define BORDERWINDOW_STYLE_OVERLAP ((USHORT)0x0001) -#define BORDERWINDOW_STYLE_BORDER ((USHORT)0x0002) -#define BORDERWINDOW_STYLE_FLOAT ((USHORT)0x0004) -#define BORDERWINDOW_STYLE_FRAME ((USHORT)0x0008) -#define BORDERWINDOW_STYLE_APP ((USHORT)0x0010) - -#define BORDERWINDOW_HITTEST_TITLE ((USHORT)0x0001) -#define BORDERWINDOW_HITTEST_LEFT ((USHORT)0x0002) -#define BORDERWINDOW_HITTEST_MENU ((USHORT)0x0004) -#define BORDERWINDOW_HITTEST_TOP ((USHORT)0x0008) -#define BORDERWINDOW_HITTEST_RIGHT ((USHORT)0x0010) -#define BORDERWINDOW_HITTEST_BOTTOM ((USHORT)0x0020) -#define BORDERWINDOW_HITTEST_TOPLEFT ((USHORT)0x0040) -#define BORDERWINDOW_HITTEST_TOPRIGHT ((USHORT)0x0080) -#define BORDERWINDOW_HITTEST_BOTTOMLEFT ((USHORT)0x0100) -#define BORDERWINDOW_HITTEST_BOTTOMRIGHT ((USHORT)0x0200) -#define BORDERWINDOW_HITTEST_CLOSE ((USHORT)0x0400) -#define BORDERWINDOW_HITTEST_ROLL ((USHORT)0x0800) -#define BORDERWINDOW_HITTEST_DOCK ((USHORT)0x1000) -#define BORDERWINDOW_HITTEST_HIDE ((USHORT)0x2000) -#define BORDERWINDOW_HITTEST_HELP ((USHORT)0x4000) -#define BORDERWINDOW_HITTEST_PIN ((USHORT)0x8000) - -#define BORDERWINDOW_DRAW_TITLE ((USHORT)0x0001) -#define BORDERWINDOW_DRAW_BORDER ((USHORT)0x0002) -#define BORDERWINDOW_DRAW_FRAME ((USHORT)0x0004) -#define BORDERWINDOW_DRAW_CLOSE ((USHORT)0x0008) -#define BORDERWINDOW_DRAW_ROLL ((USHORT)0x0010) -#define BORDERWINDOW_DRAW_DOCK ((USHORT)0x0020) -#define BORDERWINDOW_DRAW_HIDE ((USHORT)0x0040) -#define BORDERWINDOW_DRAW_HELP ((USHORT)0x0080) -#define BORDERWINDOW_DRAW_PIN ((USHORT)0x0100) -#define BORDERWINDOW_DRAW_MENU ((USHORT)0x0200) -#define BORDERWINDOW_DRAW_ALL (BORDERWINDOW_DRAW_TITLE | \ - BORDERWINDOW_DRAW_BORDER | \ - BORDERWINDOW_DRAW_FRAME | \ - BORDERWINDOW_DRAW_CLOSE | \ - BORDERWINDOW_DRAW_ROLL | \ - BORDERWINDOW_DRAW_DOCK | \ - BORDERWINDOW_DRAW_HIDE | \ - BORDERWINDOW_DRAW_HELP | \ - BORDERWINDOW_DRAW_PIN | \ - BORDERWINDOW_DRAW_MENU) - -#define BORDERWINDOW_TITLE_NORMAL ((USHORT)0x0001) -#define BORDERWINDOW_TITLE_SMALL ((USHORT)0x0002) -#define BORDERWINDOW_TITLE_TEAROFF ((USHORT)0x0004) -#define BORDERWINDOW_TITLE_NONE ((USHORT)0x0008) - -// -------------------- -// - ImplBorderWindow - -// -------------------- - -class ImplBorderWindow : public Window -{ - friend class Window; - friend class ImplBorderWindowView; - friend class ImplSmallBorderWindowView; - friend class ImplStdBorderWindowView; - -private: - ImplBorderWindowView* mpBorderView; - Window* mpMenuBarWindow; - long mnMinWidth; - long mnMinHeight; - long mnMaxWidth; - long mnMaxHeight; - long mnRollHeight; - long mnOrgMenuHeight; - USHORT mnTitleType; - USHORT mnBorderStyle; - BOOL mbFloatWindow; - BOOL mbSmallOutBorder; - BOOL mbFrameBorder; - BOOL mbPined; - BOOL mbRollUp; - BOOL mbMenuHide; - BOOL mbDockBtn; - BOOL mbHideBtn; - BOOL mbHelpBtn; - BOOL mbMenuBtn; - BOOL mbDisplayActive; - - using Window::ImplInit; - void ImplInit( Window* pParent, - WinBits nStyle, USHORT nTypeStyle, - SystemParentData* pParentData ); - void ImplInit( Window* pParent, - WinBits nStyle, USHORT nTypeStyle, - const ::com::sun::star::uno::Any& ); - - // Copy assignment is forbidden and not implemented. - ImplBorderWindow (const ImplBorderWindow &); - ImplBorderWindow& operator= (const ImplBorderWindow &); - -public: - ImplBorderWindow( Window* pParent, - SystemParentData* pParentData, - WinBits nStyle = 0, - USHORT nTypeStyle = 0 ); - ImplBorderWindow( Window* pParent, WinBits nStyle = 0, - USHORT nTypeStyle = 0 ); - ImplBorderWindow( Window* pParent, - WinBits nStyle, USHORT nTypeStyle, - const ::com::sun::star::uno::Any& ); - ~ImplBorderWindow(); - - virtual void MouseMove( const MouseEvent& rMEvt ); - virtual void MouseButtonDown( const MouseEvent& rMEvt ); - virtual void Tracking( const TrackingEvent& rTEvt ); - virtual void Paint( const Rectangle& rRect ); - virtual void Activate(); - virtual void Deactivate(); - virtual void Resize(); - virtual void RequestHelp( const HelpEvent& rHEvt ); - virtual void StateChanged( StateChangedType nType ); - virtual void DataChanged( const DataChangedEvent& rDCEvt ); - - void InitView(); - void UpdateView( BOOL bNewView, const Size& rNewOutSize ); - void InvalidateBorder(); - - using Window::Draw; - void Draw( const Rectangle& rRect, OutputDevice* pDev, const Point& rPos ); - - void SetDisplayActive( BOOL bActive ); - BOOL IsDisplayActive() const { return mbDisplayActive; } - void SetTitleType( USHORT nTitleType, const Size& rSize ); - void SetBorderStyle( USHORT nStyle ); - USHORT GetBorderStyle() const { return mnBorderStyle; } - void SetPin( BOOL bPin ); - void SetRollUp( BOOL bRollUp, const Size& rSize ); - void SetCloser(); - void SetDockButton( BOOL bDockButton ); - void SetHideButton( BOOL bHideButton ); - void SetHelpButton( BOOL bHelpButton ); - void SetMenuButton( BOOL bMenuButton ); - - void UpdateMenuHeight(); - void SetMenuBarWindow( Window* pWindow ); - void SetMenuBarMode( BOOL bHide ); - - void SetMinOutputSize( long nWidth, long nHeight ) - { mnMinWidth = nWidth; mnMinHeight = nHeight; } - void SetMaxOutputSize( long nWidth, long nHeight ) - { mnMaxWidth = nWidth; mnMaxHeight = nHeight; } - - void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, - sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const; - long CalcTitleWidth() const; - - Rectangle GetMenuRect() const; -}; - -// ======================================================================= - -// ----------------------- -// - ImplBorderFrameData - -// ----------------------- - -struct ImplBorderFrameData -{ - ImplBorderWindow* mpBorderWindow; - OutputDevice* mpOutDev; - Rectangle maTitleRect; - Rectangle maPinRect; - Rectangle maCloseRect; - Rectangle maRollRect; - Rectangle maDockRect; - Rectangle maMenuRect; - Rectangle maHideRect; - Rectangle maHelpRect; - Point maMouseOff; - long mnWidth; - long mnHeight; - long mnTrackX; - long mnTrackY; - long mnTrackWidth; - long mnTrackHeight; - sal_Int32 mnLeftBorder; - sal_Int32 mnTopBorder; - sal_Int32 mnRightBorder; - sal_Int32 mnBottomBorder; - long mnNoTitleTop; - long mnBorderSize; - long mnTitleHeight; - long mnTitleOff; - USHORT mnHitTest; - USHORT mnPinState; - USHORT mnCloseState; - USHORT mnRollState; - USHORT mnDockState; - USHORT mnMenuState; - USHORT mnHideState; - USHORT mnHelpState; - USHORT mnTitleType; - BOOL mbFloatWindow; - BOOL mbDragFull; - BOOL mbTitleClipped; -}; - -// ======================================================================= - -// ------------------------ -// - ImplBorderWindowView - -// ------------------------ - -class ImplBorderWindowView -{ -public: - virtual ~ImplBorderWindowView(); - - virtual BOOL MouseMove( const MouseEvent& rMEvt ); - virtual BOOL MouseButtonDown( const MouseEvent& rMEvt ); - virtual BOOL Tracking( const TrackingEvent& rTEvt ); - virtual String RequestHelp( const Point& rPos, Rectangle& rHelpRect ); - - virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ) = 0; - virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, - sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const = 0; - virtual long CalcTitleWidth() const = 0; - virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev = NULL, const Point* pOffset = NULL ) = 0; - virtual Rectangle GetMenuRect() const; - - void ImplInitTitle( ImplBorderFrameData* pData ); - USHORT ImplHitTest( ImplBorderFrameData* pData, const Point& rPos ); - BOOL ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt ); - BOOL ImplMouseButtonDown( ImplBorderFrameData* pData, const MouseEvent& rMEvt ); - BOOL ImplTracking( ImplBorderFrameData* pData, const TrackingEvent& rTEvt ); - String ImplRequestHelp( ImplBorderFrameData* pData, const Point& rPos, Rectangle& rHelpRect ); - long ImplCalcTitleWidth( const ImplBorderFrameData* pData ) const; -}; - -// ======================================================================= - -// -------------------------- -// - ImplNoBorderWindowView - -// -------------------------- - -class ImplNoBorderWindowView : public ImplBorderWindowView -{ -public: - ImplNoBorderWindowView( ImplBorderWindow* pBorderWindow ); - - virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ); - virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, - sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const; - virtual long CalcTitleWidth() const; - virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset ); -}; - - -// ======================================================================= - -// ----------------------------- -// - ImplSmallBorderWindowView - -// ----------------------------- - -class ImplSmallBorderWindowView : public ImplBorderWindowView -{ - ImplBorderWindow* mpBorderWindow; - OutputDevice* mpOutDev; - long mnWidth; - long mnHeight; - sal_Int32 mnLeftBorder; - sal_Int32 mnTopBorder; - sal_Int32 mnRightBorder; - sal_Int32 mnBottomBorder; - bool mbNWFBorder; - -public: - ImplSmallBorderWindowView( ImplBorderWindow* pBorderWindow ); - - virtual void Init( OutputDevice* pOutDev, long nWidth, long nHeight ); - virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, - sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const; - virtual long CalcTitleWidth() const; - virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset ); -}; - - -// ======================================================================= - -// --------------------------- -// - ImplStdBorderWindowView - -// --------------------------- - - -class ImplStdBorderWindowView : public ImplBorderWindowView -{ - ImplBorderFrameData maFrameData; - VirtualDevice* mpATitleVirDev; - VirtualDevice* mpDTitleVirDev; - -public: - ImplStdBorderWindowView( ImplBorderWindow* pBorderWindow ); - ~ImplStdBorderWindowView(); - - virtual BOOL MouseMove( const MouseEvent& rMEvt ); - virtual BOOL MouseButtonDown( const MouseEvent& rMEvt ); - virtual BOOL Tracking( const TrackingEvent& rTEvt ); - virtual String RequestHelp( const Point& rPos, Rectangle& rHelpRect ); - virtual Rectangle GetMenuRect() const; - - virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ); - virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, - sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const; - virtual long CalcTitleWidth() const; - virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset ); -}; - - -#endif // _SV_BRDWIN_HXX diff --git a/vcl/inc/vcl/canvasbitmap.hxx b/vcl/inc/vcl/canvasbitmap.hxx deleted file mode 100644 index 85c0aa795c8c..000000000000 --- a/vcl/inc/vcl/canvasbitmap.hxx +++ /dev/null @@ -1,129 +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 _VCL_CANVASBITMAP_HXX -#define _VCL_CANVASBITMAP_HXX - -#include -#include -#include -#include -#include - -#include -#include - -namespace vcl -{ -namespace unotools -{ - class VCL_DLLPUBLIC VclCanvasBitmap : - public cppu::WeakImplHelper3< com::sun::star::rendering::XIntegerReadOnlyBitmap, - com::sun::star::rendering::XBitmapPalette, - com::sun::star::rendering::XIntegerBitmapColorSpace > - { - private: - BitmapEx m_aBmpEx; - Bitmap m_aBitmap; - Bitmap m_aAlpha; - BitmapReadAccess* m_pBmpAcc; - BitmapReadAccess* m_pAlphaAcc; - com::sun::star::uno::Sequence m_aComponentTags; - com::sun::star::uno::Sequence m_aComponentBitCounts; - com::sun::star::rendering::IntegerBitmapLayout m_aLayout; - sal_Int32 m_nBitsPerInputPixel; - sal_Int32 m_nBitsPerOutputPixel; - sal_Int32 m_nRedIndex; - sal_Int32 m_nGreenIndex; - sal_Int32 m_nBlueIndex; - sal_Int32 m_nAlphaIndex; - sal_Int32 m_nIndexIndex; - sal_Int8 m_nEndianness; - bool m_bSwap; - bool m_bPalette; - - SAL_DLLPRIVATE void setComponentInfo( ULONG redShift, ULONG greenShift, ULONG blueShift ); - - virtual ~VclCanvasBitmap(); - - public: - // XBitmap - virtual com::sun::star::geometry::IntegerSize2D SAL_CALL getSize() throw (com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL hasAlpha( ) throw (::com::sun::star::uno::RuntimeException); - virtual com::sun::star::uno::Reference< com::sun::star::rendering::XBitmap > SAL_CALL getScaledBitmap( const com::sun::star::geometry::RealSize2D& newSize, sal_Bool beFast ) throw (com::sun::star::uno::RuntimeException); - - // XIntegerReadOnlyBitmap - virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL getData( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout, const ::com::sun::star::geometry::IntegerRectangle2D& rect ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::rendering::VolatileContentDestroyedException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL getPixel( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout, const ::com::sun::star::geometry::IntegerPoint2D& pos ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::rendering::VolatileContentDestroyedException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapPalette > SAL_CALL getPalette( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::rendering::IntegerBitmapLayout SAL_CALL getMemoryLayout( ) throw (::com::sun::star::uno::RuntimeException); - - // XBitmapPalette - virtual sal_Int32 SAL_CALL getNumberOfEntries() throw (com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL getIndex( ::com::sun::star::uno::Sequence< double >& entry, ::sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL setIndex( const ::com::sun::star::uno::Sequence< double >& color, ::sal_Bool transparency, ::sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XColorSpace > SAL_CALL getColorSpace( ) throw (::com::sun::star::uno::RuntimeException); - - // XIntegerBitmapColorSpace - virtual ::sal_Int8 SAL_CALL getType( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getComponentTags( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Int8 SAL_CALL getRenderingIntent( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getProperties( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< double > SAL_CALL convertColorSpace( const ::com::sun::star::uno::Sequence< double >& deviceColor, const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XColorSpace >& targetColorSpace ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::RGBColor > SAL_CALL convertToRGB( const ::com::sun::star::uno::Sequence< double >& deviceColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor > SAL_CALL convertToARGB( const ::com::sun::star::uno::Sequence< double >& deviceColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor > SAL_CALL convertToPARGB( const ::com::sun::star::uno::Sequence< double >& deviceColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< double > SAL_CALL convertFromRGB( const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::RGBColor >& rgbColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< double > SAL_CALL convertFromARGB( const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor >& rgbColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< double > SAL_CALL convertFromPARGB( const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor >& rgbColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::sal_Int32 SAL_CALL getBitsPerPixel( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::sal_Int32 > SAL_CALL getComponentBitCounts( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Int8 SAL_CALL getEndianness( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence SAL_CALL convertFromIntegerColorSpace( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& deviceColor, const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XColorSpace >& targetColorSpace ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL convertToIntegerColorSpace( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& deviceColor, const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XIntegerBitmapColorSpace >& targetColorSpace ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::RGBColor > SAL_CALL convertIntegerToRGB( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& deviceColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor > SAL_CALL convertIntegerToARGB( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& deviceColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor > SAL_CALL convertIntegerToPARGB( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& deviceColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromRGB( const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::RGBColor >& rgbColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromARGB( const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor >& rgbColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromPARGB( const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor >& rgbColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - - /** Create API wrapper for given BitmapEx - - @param rBitmap - Bitmap to wrap. As usual, changes to the original bitmap - are not reflected in this object (copy on write). - */ - explicit VclCanvasBitmap( const BitmapEx& rBitmap ); - - /// Retrieve contained bitmap. Call me with locked Solar mutex! - BitmapEx getBitmapEx() const; - }; -} -} - -#endif diff --git a/vcl/inc/vcl/controldata.hxx b/vcl/inc/vcl/controldata.hxx deleted file mode 100644 index 0be0f5bd402e..000000000000 --- a/vcl/inc/vcl/controldata.hxx +++ /dev/null @@ -1,62 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ***********************************************************************/ - -#ifndef VCL_CONTROLDATA_HXX -#define VCL_CONTROLDATA_HXX - -#include - -//........................................................................ -namespace vcl -{ -//........................................................................ - - //==================================================================== - //= ImplControlData - //==================================================================== - struct ImplControlData - { - mutable ControlLayoutData* mpLayoutData; - OutputDevice* mpReferenceDevice; - - ImplControlData() - :mpLayoutData( NULL ) - ,mpReferenceDevice( NULL ) - { - } - - ~ImplControlData() - { - delete mpLayoutData; - } - }; - -//........................................................................ -} // namespace vcl -//........................................................................ - -#endif // VCL_CONTROLDATA_HXX diff --git a/vcl/inc/vcl/dbggui.hxx b/vcl/inc/vcl/dbggui.hxx deleted file mode 100644 index 7ed23706e6f3..000000000000 --- a/vcl/inc/vcl/dbggui.hxx +++ /dev/null @@ -1,74 +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 _SV_DBGGUI_HXX -#define _SV_DBGGUI_HXX - -#include - -// ------------ -// - DBG_UITL - -// ------------ - -#ifdef DBG_UTIL - -class Window; -class XubString; - -void DbgGUIInit(); -void DbgGUIDeInit(); -void DbgGUIStart(); -void DbgDialogTest( Window* pWindow ); - -/** registers a named user-defined channel for emitting the diagnostic messages - @return - a unique number for this channel, which can be used for ->DbgData::nErrorOut, - ->DbgData::nWarningOut and ->DbgData::nTraceOut - @see DBG_OUT_USER_CHANNEL_0 -*/ -USHORT DbgRegisterNamedUserChannel( const XubString& _rChannelUIName, DbgPrintLine pProc ); - -#define DBGGUI_INIT() DbgGUIInit() -#define DBGGUI_DEINIT() DbgGUIDeInit() -#define DBGGUI_START() DbgGUIStart() - -#define DBG_DIALOGTEST( pWindow ) \ - if ( DbgIsDialog() ) \ - DbgDialogTest( pWindow ); - -#else - - -#define DBGGUI_INIT() -#define DBGGUI_DEINIT() -#define DBGGUI_START() - -#define DBG_DIALOGTEST( pWindow ) - -#endif - -#endif // _SV_DBGGUI_HXX diff --git a/vcl/inc/vcl/dndevdis.hxx b/vcl/inc/vcl/dndevdis.hxx deleted file mode 100644 index 5b91bd0713ec..000000000000 --- a/vcl/inc/vcl/dndevdis.hxx +++ /dev/null @@ -1,114 +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 _DNDEVDIS_HXX_ -#define _DNDEVDIS_HXX_ - -#include -#include - -#ifndef _COM_SUN_STAR_DATATRANSFER_DND_XDRAGESTURERECOGNIZER_HPP_ -#include -#endif -#include -#include - -class DNDEventDispatcher: public ::cppu::WeakImplHelper3< - ::com::sun::star::datatransfer::dnd::XDropTargetListener, - ::com::sun::star::datatransfer::dnd::XDropTargetDragContext, - ::com::sun::star::datatransfer::dnd::XDragGestureListener > -{ - Window * m_pTopWindow; - Window * m_pCurrentWindow; - - ::osl::Mutex m_aMutex; - ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > m_aDataFlavorList; - - /* - * fire the events on the dnd listener container of the specified window - */ - - sal_Int32 fireDragEnterEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& xContext, - const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction, - const ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor >& aFlavorList ) throw(::com::sun::star::uno::RuntimeException); - - sal_Int32 fireDragOverEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& xContext, - const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction ) throw(::com::sun::star::uno::RuntimeException); - - sal_Int32 fireDragExitEvent( Window *pWindow ) throw(::com::sun::star::uno::RuntimeException); - - sal_Int32 fireDropActionChangedEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& xContext, - const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction ) throw(::com::sun::star::uno::RuntimeException); - - sal_Int32 fireDropEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDropContext >& xContext, - const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction, - const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable ) throw(::com::sun::star::uno::RuntimeException); - - sal_Int32 fireDragGestureEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource >& xSource, - const ::com::sun::star::uno::Any event, const Point& rOrigin, const sal_Int8 nDragAction )throw(::com::sun::star::uno::RuntimeException); - -public: - - DNDEventDispatcher( Window * pTopWindow ); - virtual ~DNDEventDispatcher(); - - /* - * XDropTargetDragContext - */ - - virtual void SAL_CALL acceptDrag( sal_Int8 dropAction ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL rejectDrag() throw(::com::sun::star::uno::RuntimeException); - - /* - * XDropTargetListener - */ - - virtual void SAL_CALL drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent& dtde ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL dragEnter( const ::com::sun::star::datatransfer::dnd::DropTargetDragEnterEvent& dtdee ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL dragExit( const ::com::sun::star::datatransfer::dnd::DropTargetEvent& dte ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL dragOver( const ::com::sun::star::datatransfer::dnd::DropTargetDragEvent& dtde ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL dropActionChanged( const ::com::sun::star::datatransfer::dnd::DropTargetDragEvent& dtde ) throw(::com::sun::star::uno::RuntimeException); - - /* - * XDragGestureListener - */ - - virtual void SAL_CALL dragGestureRecognized( const ::com::sun::star::datatransfer::dnd::DragGestureEvent& dge ) throw(::com::sun::star::uno::RuntimeException); - - - /* - * XEventListener - */ - - virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& eo ) throw(::com::sun::star::uno::RuntimeException); -}; - -//================================================================================================== -// -//================================================================================================== - -#endif diff --git a/vcl/inc/vcl/dndlcon.hxx b/vcl/inc/vcl/dndlcon.hxx deleted file mode 100644 index 5a41a20e4271..000000000000 --- a/vcl/inc/vcl/dndlcon.hxx +++ /dev/null @@ -1,124 +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 _DNDLCON_HXX_ -#define _DNDLCON_HXX_ - -#include -#include -#include -#include -#include -#include - -#include - -class DNDListenerContainer : public ::vcl::unohelper::MutexHelper, - public ::cppu::WeakComponentImplHelper4< - ::com::sun::star::datatransfer::dnd::XDragGestureRecognizer, \ - ::com::sun::star::datatransfer::dnd::XDropTargetDragContext, - ::com::sun::star::datatransfer::dnd::XDropTargetDropContext, - ::com::sun::star::datatransfer::dnd::XDropTarget > -{ - sal_Bool m_bActive; - sal_Int8 m_nDefaultActions; - - ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext > m_xDropTargetDragContext; - ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDropContext > m_xDropTargetDropContext; - -public: - - DNDListenerContainer( sal_Int8 nDefaultActions ); - virtual ~DNDListenerContainer(); - - sal_uInt32 fireDropEvent( - const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDropContext >& context, - sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions, - const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& transferable ); - - sal_uInt32 fireDragExitEvent(); - - sal_uInt32 fireDragOverEvent( - const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& context, - sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions ); - - sal_uInt32 fireDragEnterEvent( - const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& context, - sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions, - const ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor >& dataFlavor ); - - sal_uInt32 fireDropActionChangedEvent( - const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& context, - sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions ); - - sal_uInt32 fireDragGestureEvent( - sal_Int8 dragAction, sal_Int32 dragOriginX, sal_Int32 dragOriginY, - const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource >& dragSource, - const ::com::sun::star::uno::Any& triggerEvent ); - - /* - * XDragGestureRecognizer - */ - - virtual void SAL_CALL addDragGestureListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragGestureListener >& dgl ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeDragGestureListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragGestureListener >& dgl ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL resetRecognizer( ) throw(::com::sun::star::uno::RuntimeException); - - /* - * XDropTargetDragContext - */ - - virtual void SAL_CALL acceptDrag( sal_Int8 dragOperation ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL rejectDrag( ) throw (::com::sun::star::uno::RuntimeException); - - - /* - * XDropTargetDropContext - */ - - virtual void SAL_CALL acceptDrop( sal_Int8 dropOperation ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL rejectDrop( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL dropComplete( sal_Bool success ) throw (::com::sun::star::uno::RuntimeException); - - /* - * XDropTarget - */ - - virtual void SAL_CALL addDropTargetListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& dtl ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeDropTargetListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& dtl ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL isActive( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setActive( sal_Bool active ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Int8 SAL_CALL getDefaultActions( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setDefaultActions( sal_Int8 actions ) throw(::com::sun::star::uno::RuntimeException); -}; - - -//================================================================================================== -// -//================================================================================================== - -#endif diff --git a/vcl/inc/vcl/fontcache.hxx b/vcl/inc/vcl/fontcache.hxx deleted file mode 100644 index b18748ed5791..000000000000 --- a/vcl/inc/vcl/fontcache.hxx +++ /dev/null @@ -1,99 +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 _PSPRINT_FONTCACHE_HXX -#define _PSPRINT_FONTCACHE_HXX - -#include "vcl/dllapi.h" -#include "vcl/fontmanager.hxx" - -#include "tools/string.hxx" - -#include - -namespace psp -{ - -class VCL_DLLPUBLIC FontCache -{ - struct FontDir; - friend class FontDir; - struct FontFile; - friend class FontFile; - - typedef std::list< PrintFontManager::PrintFont* > FontCacheEntry; - struct FontFile - { - FontCacheEntry m_aEntry; - }; - - typedef std::hash_map< ::rtl::OString, FontFile, ::rtl::OStringHash > FontDirMap; - struct FontDir - { - sal_Int64 m_nTimestamp; - bool m_bNoFiles; - bool m_bUserOverrideOnly; - FontDirMap m_aEntries; - - FontDir() : m_nTimestamp(0), m_bNoFiles(false), m_bUserOverrideOnly( false ) {} - }; - - typedef std::hash_map< int, FontDir > FontCacheData; - FontCacheData m_aCache; - String m_aCacheFile; - bool m_bDoFlush; - - void read(); - void clearCache(); - - void copyPrintFont( const PrintFontManager::PrintFont* pFrom, PrintFontManager::PrintFont* pTo ) const; - bool equalsPrintFont( const PrintFontManager::PrintFont* pLeft, PrintFontManager::PrintFont* pRight ) const; - PrintFontManager::PrintFont* clonePrintFont( const PrintFontManager::PrintFont* pFont ) const; - - void createCacheDir( int nDirID ); -public: - FontCache(); - ~FontCache(); - - bool getFontCacheFile( int nDirID, const rtl::OString& rFile, std::list< PrintFontManager::PrintFont* >& rNewFonts ) const; - void updateFontCacheEntry( const PrintFontManager::PrintFont*, bool bFlush ); - void markEmptyDir( int nDirID, bool bNoFiles = true ); - - // returns false for non cached directory - // a cached but empty directory will return true but not append anything - bool listDirectory( const rtl::OString& rDir, std::list< PrintFontManager::PrintFont* >& rNewFonts ) const; - // returns true for directoris that contain only user overridden fonts - bool scanAdditionalFiles( const rtl::OString& rDir ); - - void flush(); - - void updateDirTimestamp( int nDirID ); -}; - -} // namespace psp - -#endif // _PSPRINT_FONTCACHE_HXX diff --git a/vcl/inc/vcl/fontsubset.hxx b/vcl/inc/vcl/fontsubset.hxx deleted file mode 100644 index a34212128741..000000000000 --- a/vcl/inc/vcl/fontsubset.hxx +++ /dev/null @@ -1,97 +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 _SV_FONTSUBSET_HXX -#define _SV_FONTSUBSET_HXX - -#include -#include -#include - -namespace vcl { struct _TrueTypeFont; } // SFT's idea of a TTF font - -class FontSubsetInfo -{ -public: - explicit FontSubsetInfo( void ); - virtual ~FontSubsetInfo( void ); - - enum FontType { - NO_FONT = 0, - SFNT_TTF = 1<<1, // SFNT container with TrueType glyphs - SFNT_CFF = 1<<2, // SFNT container with CFF-container - TYPE1_PFA = 1<<3, // PSType1 Postscript Font Ascii - TYPE1_PFB = 1<<4, // PSType1 Postscript Font Binary - CFF_FONT = 1<<5, // CFF-container with PSType2 glyphs - TYPE3_FONT = 1<<6, // PSType3 Postscript font - TYPE42_FONT = 1<<7, // PSType42 wrapper for an SFNT_TTF - ANY_SFNT = SFNT_TTF | SFNT_CFF, - ANY_TYPE1 = TYPE1_PFA | TYPE1_PFB, - ANY_FONT = 0xFF - }; - - bool LoadFont( FontType eInFontType, - const unsigned char* pFontBytes, int nByteLength ); - bool LoadFont( vcl::_TrueTypeFont* pSftTrueTypeFont ); - - bool CreateFontSubset( int nOutFontTypeMask, - FILE* pOutFile, const char* pOutFontName, - const long* pReqGlyphIds, const sal_uInt8* pEncodedIds, - int nReqGlyphCount, sal_Int32* pOutGlyphWidths = NULL ); - -public: // TODO: make subsetter results private and provide accessor methods instead - // subsetter-provided subset details needed by e.g. Postscript or PDF - String m_aPSName; - int m_nAscent; // all metrics in PS font units - int m_nDescent; - int m_nCapHeight; - Rectangle m_aFontBBox; - FontType m_nFontType; // font-type of subset result - -private: - // input-font-specific details - unsigned const char* mpInFontBytes; - int mnInByteLength; - FontType meInFontType; // allowed mask of input font-types - vcl::_TrueTypeFont* mpSftTTFont; - - // subset-request details - int mnReqFontTypeMask; // allowed subset-target font types - FILE* mpOutFile; - const char* mpReqFontName; - const long* mpReqGlyphIds; - const sal_uInt8* mpReqEncodedIds; - int mnReqGlyphCount; - -protected: - bool CreateFontSubsetFromCff( sal_Int32* pOutGlyphWidths = NULL ); - bool CreateFontSubsetFromSfnt( sal_Int32* pOutGlyphWidths = NULL ); - bool CreateFontSubsetFromType1( sal_Int32* pOutGlyphWidths = NULL ); -}; - -#endif // _SV_FONTSUBSET_HXX - diff --git a/vcl/inc/vcl/glyphcache.hxx b/vcl/inc/vcl/glyphcache.hxx deleted file mode 100644 index 0e77d5dd6bc4..000000000000 --- a/vcl/inc/vcl/glyphcache.hxx +++ /dev/null @@ -1,380 +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 _SV_GLYPHCACHE_HXX -#define _SV_GLYPHCACHE_HXX - -#include - -class GlyphCache; -class GlyphMetric; -class GlyphData; -class ServerFont; -class GlyphCachePeer; -class ServerFontLayoutEngine; -class ServerFontLayout; -class ExtraKernInfo; -struct ImplKernPairData; -class ImplFontOptions; - -#include -#include -#include - -namespace basegfx { class B2DPolyPolygon; } - -class RawBitmap; - -#include -#include - -class ServerFontLayout; -#include - -// ======================================================================= - -class VCL_DLLPUBLIC GlyphCache -{ -public: - explicit GlyphCache( GlyphCachePeer& ); - /*virtual*/ ~GlyphCache(); - - static GlyphCache& GetInstance(); - void LoadFonts(); - - void ClearFontPath(); - void AddFontPath( const String& rFontPath ); - void AddFontFile( const rtl::OString& rNormalizedName, - int nFaceNum, sal_IntPtr nFontId, const ImplDevFontAttributes&, - const ExtraKernInfo* = NULL ); - void AnnounceFonts( ImplDevFontList* ) const; - - ServerFont* CacheFont( const ImplFontSelectData& ); - void UncacheFont( ServerFont& ); - void InvalidateAllGlyphs(); - -protected: - GlyphCachePeer& mrPeer; - -private: - friend class ServerFont; - // used by ServerFont class only - void AddedGlyph( ServerFont&, GlyphData& ); - void RemovingGlyph( ServerFont&, GlyphData&, int nGlyphIndex ); - void UsingGlyph( ServerFont&, GlyphData& ); - void GrowNotify(); - -private: - ULONG CalcByteCount() const; - void GarbageCollect(); - - // the GlyphCache's FontList matches a font request to a serverfont instance - // the FontList key's mpFontData member is reinterpreted as integer font id - struct IFSD_Equal{ bool operator()( const ImplFontSelectData&, const ImplFontSelectData& ) const; }; - struct IFSD_Hash{ size_t operator()( const ImplFontSelectData& ) const; }; - typedef ::std::hash_map FontList; - FontList maFontList; - ULONG mnMaxSize; // max overall cache size in bytes - mutable ULONG mnBytesUsed; - mutable long mnLruIndex; - mutable int mnGlyphCount; - ServerFont* mpCurrentGCFont; - - class FreetypeManager* mpFtManager; -}; - -// ======================================================================= - -class GlyphMetric -{ -public: - Point GetOffset() const { return maOffset; } - Point GetDelta() const { return maDelta; } - Size GetSize() const { return maSize; } - long GetCharWidth() const { return mnAdvanceWidth; } - -protected: - friend class GlyphData; - void SetOffset( int nX, int nY ) { maOffset = Point( nX, nY); } - void SetDelta( int nX, int nY ) { maDelta = Point( nX, nY); } - void SetSize( const Size& s ) { maSize = s; } - void SetCharWidth( long nW ) { mnAdvanceWidth = nW; } - -private: - long mnAdvanceWidth; - Point maDelta; - Point maOffset; - Size maSize; -}; - -// ----------------------------------------------------------------------- - -// the glyph specific data needed by a GlyphCachePeer is usually trivial, -// not attaching it to the corresponding GlyphData would be overkill -struct ExtGlyphData -{ - int meInfo; - void* mpData; - - ExtGlyphData() : meInfo(0), mpData(NULL) {} -}; - -// ----------------------------------------------------------------------- - -class GlyphData -{ -public: - const GlyphMetric& GetMetric() const { return maMetric; } - Size GetSize() const { return maMetric.GetSize(); } - - void SetSize( const Size& s) { maMetric.SetSize( s ); } - void SetOffset( int nX, int nY ) { maMetric.SetOffset( nX, nY ); } - void SetDelta( int nX, int nY ) { maMetric.SetDelta( nX, nY ); } - void SetCharWidth( long nW ) { maMetric.SetCharWidth( nW ); } - - void SetLruValue( int n ) const { mnLruValue = n; } - long GetLruValue() const { return mnLruValue;} - - ExtGlyphData& ExtDataRef() { return maExtData; } - const ExtGlyphData& ExtDataRef() const { return maExtData; } - -private: - GlyphMetric maMetric; - ExtGlyphData maExtData; - - // used by GlyphCache for cache LRU algorithm - mutable long mnLruValue; -}; - -// ======================================================================= - -class VCL_DLLPUBLIC ServerFont -{ -public: - virtual const ::rtl::OString* GetFontFileName() const { return NULL; } - virtual int GetFontFaceNumber() const { return 0; } - virtual bool TestFont() const { return true; } - virtual void* GetFtFace() const { return 0; } - virtual int GetLoadFlags() const { return 0; } - virtual void SetFontOptions( const ImplFontOptions&) {} - virtual bool NeedsArtificialBold() const { return false; } - virtual bool NeedsArtificialItalic() const { return false; } - - const ImplFontSelectData& GetFontSelData() const { return maFontSelData; } - - virtual void FetchFontMetric( ImplFontMetricData&, long& rFactor ) const = 0; - virtual ULONG GetKernPairs( ImplKernPairData** ) const { return 0; } - virtual int GetGlyphKernValue( int, int ) const { return 0; } - virtual const ImplFontCharMap* GetImplFontCharMap() const = 0; - Point TransformPoint( const Point& ) const; - - GlyphData& GetGlyphData( int nGlyphIndex ); - const GlyphMetric& GetGlyphMetric( int nGlyphIndex ) - { return GetGlyphData( nGlyphIndex ).GetMetric(); } - - virtual int GetGlyphIndex( sal_UCS4 ) const = 0; - virtual bool GetGlyphOutline( int nGlyphIndex, ::basegfx::B2DPolyPolygon& ) const = 0; - virtual bool GetAntialiasAdvice( void ) const = 0; - bool IsGlyphInvisible( int nGlyphIndex ); - virtual bool GetGlyphBitmap1( int nGlyphIndex, RawBitmap& ) const = 0; - virtual bool GetGlyphBitmap8( int nGlyphIndex, RawBitmap& ) const = 0; - - void SetExtended( int nInfo, void* ppVoid ); - int GetExtInfo() { return mnExtInfo; } - void* GetExtPointer() { return mpExtData; } - -protected: - friend class GlyphCache; - friend class ServerFontLayout; - explicit ServerFont( const ImplFontSelectData& ); - virtual ~ServerFont(); - - void AddRef() const { ++mnRefCount; } - long GetRefCount() const { return mnRefCount; } - long Release() const; - ULONG GetByteCount() const { return mnBytesUsed; } - - virtual void InitGlyphData( int nGlyphIndex, GlyphData& ) const = 0; - virtual void GarbageCollect( long ); - void ReleaseFromGarbageCollect(); - - virtual ServerFontLayoutEngine* GetLayoutEngine() { return NULL; } - -private: - typedef ::std::hash_map GlyphList; - mutable GlyphList maGlyphList; - - const ImplFontSelectData maFontSelData; - - // info for GlyphcachePeer - int mnExtInfo; - void* mpExtData; - - // used by GlyphCache for cache LRU algorithm - mutable long mnRefCount; - mutable ULONG mnBytesUsed; - - ServerFont* mpPrevGCFont; - ServerFont* mpNextGCFont; - -protected: - // 16.16 fixed point values used for a rotated font - long mnCos; - long mnSin; -private: - int mnZWJ; - int mnZWNJ; - bool mbCollectedZW; -}; - -// ======================================================================= - -// a class for cache entries for physical font instances that are based on serverfonts -class VCL_DLLPUBLIC ImplServerFontEntry : public ImplFontEntry -{ -private: - ServerFont* mpServerFont; - ImplFontOptions maFontOptions; - bool mbGotFontOptions; - bool mbValidFontOptions; - -public: - ImplServerFontEntry( ImplFontSelectData& ); - virtual ~ImplServerFontEntry(); - void SetServerFont( ServerFont* p) { mpServerFont = p; } - void HandleFontOptions(); -}; - -// ======================================================================= - -class VCL_DLLPUBLIC ServerFontLayout : public GenericSalLayout -{ -private: - ServerFont& mrServerFont; - - // enforce proper copy semantic - SAL_DLLPRIVATE ServerFontLayout( const ServerFontLayout& ); - SAL_DLLPRIVATE ServerFontLayout& operator=( const ServerFontLayout& ); - -public: - ServerFontLayout( ServerFont& ); - virtual bool LayoutText( ImplLayoutArgs& ); - virtual void AdjustLayout( ImplLayoutArgs& ); - virtual void DrawText( SalGraphics& ) const; - ServerFont& GetServerFont() const { return mrServerFont; } -}; - -// ======================================================================= - -class ServerFontLayoutEngine -{ -public: - virtual ~ServerFontLayoutEngine() {} - virtual bool operator()( ServerFontLayout&, ImplLayoutArgs& ); -}; - -// ======================================================================= - -class GlyphCachePeer -{ -protected: - GlyphCachePeer() : mnBytesUsed(0) {} - virtual ~GlyphCachePeer() {} - -public: - sal_Int32 GetByteCount() const { return mnBytesUsed; } - virtual void RemovingFont( ServerFont& ) {} - virtual void RemovingGlyph( ServerFont&, GlyphData&, int ) {} - -protected: - sal_Int32 mnBytesUsed; -}; - -// ======================================================================= - -class VCL_DLLPUBLIC RawBitmap -{ -public: - RawBitmap(); - ~RawBitmap(); - bool Rotate( int nAngle ); - -public: - unsigned char* mpBits; - ULONG mnAllocated; - - ULONG mnWidth; - ULONG mnHeight; - - ULONG mnScanlineSize; - ULONG mnBitCount; - - int mnXOffset; - int mnYOffset; -}; - -// ======================================================================= - -inline void ServerFont::SetExtended( int nInfo, void* pVoid ) -{ - mnExtInfo = nInfo; - mpExtData = pVoid; -} - -// ======================================================================= - -// ExtraKernInfo allows an on-demand query of extra kerning info #i29881# -// The kerning values have to be scaled to match the font size before use -class VCL_DLLPUBLIC ExtraKernInfo -{ -public: - ExtraKernInfo( sal_IntPtr nFontId ); - virtual ~ExtraKernInfo() {} - - bool HasKernPairs() const; - int GetUnscaledKernPairs( ImplKernPairData** ) const; - int GetUnscaledKernValue( sal_Unicode cLeft, sal_Unicode cRight ) const; - -protected: - mutable bool mbInitialized; - virtual void Initialize() const = 0; - -protected: - sal_IntPtr mnFontId; - - // container to map a unicode pair to an unscaled kerning value - struct PairEqual{ int operator()(const ImplKernPairData& rA, const ImplKernPairData& rB) const - { return (rA.mnChar1 == rB.mnChar1) && (rA.mnChar2 == rB.mnChar2); } }; - struct PairHash{ int operator()(const ImplKernPairData& rA) const - { return (rA.mnChar1) * 256 ^ rA.mnChar2; } }; - typedef std::hash_set< ImplKernPairData, PairHash, PairEqual > UnicodeKernPairs; - mutable UnicodeKernPairs maUnicodeKernPairs; -}; - -// ======================================================================= - -#endif // _SV_GLYPHCACHE_HXX diff --git a/vcl/inc/vcl/graphite_adaptors.hxx b/vcl/inc/vcl/graphite_adaptors.hxx deleted file mode 100644 index ae2ff2962adb..000000000000 --- a/vcl/inc/vcl/graphite_adaptors.hxx +++ /dev/null @@ -1,152 +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 _SV_GRAPHITEADAPTORS_HXX -#define _SV_GRAPHITEADAPTORS_HXX - -// We need this to enable namespace support in libgrengine headers. -#define GR_NAMESPACE - -// Standard Library -#include -// Platform - -#ifndef _SVWIN_H -#include -#endif - -#ifndef _SV_SVSYS_HXX -#include -#endif - -#ifndef _SV_SALGDI_HXX -#include -#endif - -#ifndef _SV_SALLAYOUT_HXX -#include -#endif - -// Module -#include "vcl/dllapi.h" - -// Libraries -#include -#include -#include -#include -#include - -// Module type definitions and forward declarations. -// -#ifndef MSC -// SAL/VCL types -class ServerFont; -class FreetypeServerFont; - -// Graphite types - -struct FontProperties : gr::FontProps -{ - FontProperties(const FreetypeServerFont & font) throw(); -}; - -namespace grutils -{ - class GrFeatureParser; -} - -// This class adapts the Sal font and graphics services to form required by -// the Graphite engine. -// @author tse -// -class VCL_DLLPUBLIC GraphiteFontAdaptor : public gr::Font -{ - typedef std::map > GlyphMetricMap; - friend class GrFontHasher; -public: - static bool IsGraphiteEnabledFont(ServerFont &) throw(); - - GraphiteFontAdaptor(ServerFont & font, const sal_Int32 dpi_x, const sal_Int32 dpi_y); - GraphiteFontAdaptor(const GraphiteFontAdaptor &) throw(); - ~GraphiteFontAdaptor() throw(); - - gr::Font * copyThis(); - - // Basic attribute accessors. - virtual float ascent(); - virtual float descent(); - virtual bool bold(); - virtual bool italic(); - virtual float height(); - virtual unsigned int getDPIx(); - virtual unsigned int getDPIy(); - - // Font access methods. - virtual const void * getTable(gr::fontTableId32 tableID, size_t * pcbSize); - virtual void getFontMetrics(float * ascent_out, float * descent_out = 0, float * em_square_out = 0); - - // Glyph metrics. - virtual void getGlyphMetrics(gr::gid16 glyphID, gr::Rect & boundingBox, gr::Point & advances); - - // Adaptor attributes. - const FontProperties & fontProperties() const throw(); - FreetypeServerFont & font() const throw(); - const grutils::GrFeatureParser * features() const { return mpFeatures; }; - -private: - virtual void UniqueCacheInfo(ext_std::wstring &, bool &, bool &); - - FreetypeServerFont& mrFont; - FontProperties maFontProperties; - const unsigned int mnDpiX, mnDpiY; - const float mfAscent, - mfDescent, - mfEmUnits; - grutils::GrFeatureParser * mpFeatures; - GlyphMetricMap maGlyphMetricMap; -}; - -// Partial implementation of class GraphiteFontAdaptor. -// -inline const FontProperties & GraphiteFontAdaptor::fontProperties() const throw() { - return maFontProperties; -} - -inline FreetypeServerFont & GraphiteFontAdaptor::font() const throw() { - return mrFont; -} -#endif // not MFC - -// Partial implementation of class TextSourceAdaptor. -// -//inline const ImplLayoutArgs & TextSourceAdaptor::layoutArgs() const throw() { -// return _layout_args; -//} - - -#endif // _SV_GRAPHITEADAPTORS_HXX diff --git a/vcl/inc/vcl/graphite_cache.hxx b/vcl/inc/vcl/graphite_cache.hxx deleted file mode 100644 index af1392ed4d4b..000000000000 --- a/vcl/inc/vcl/graphite_cache.hxx +++ /dev/null @@ -1,289 +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. - * - ************************************************************************/ - -// Description: Classes to cache Graphite Segments to try to improve -// rendering performance. - -#ifndef GraphiteSegmentCache_h -#define GraphiteSegmentCache_h - -#include -#include - -#define GRCACHE_REUSE_VECTORS 1 - -//#include -#include - -class TextSourceAdaptor; -/** -* GrSegRecord stores a Graphite Segment and its associated text -*/ -class GrSegRecord { -public: - GrSegRecord(rtl::OUString * rope, TextSourceAdaptor * textSrc, gr::Segment * seg, bool bIsRtl); - - ~GrSegRecord(); - - void reuse(rtl::OUString * rope, TextSourceAdaptor * textSrc, gr::Segment * seg, bool bIsRtl); - - void clearVectors(); - void clear(); -#ifdef GRCACHE_REUSE_VECTORS - void setGlyphVectors(long nWidth, GraphiteLayout::Glyphs & vGlyphs, std::vector vCharDxs, - std::vector & vChar2Base, std::vector & vGlyph2Char, float fScale) - { - clearVectors(); - mnWidth = nWidth; - m_fontScale = fScale; - mvGlyphs.insert(mvGlyphs.begin(), vGlyphs.begin(), vGlyphs.end()); - mvCharDxs.insert(mvCharDxs.begin(),vCharDxs.begin(),vCharDxs.end()); - mvChar2BaseGlyph.insert(mvChar2BaseGlyph.begin(),vChar2Base.begin(),vChar2Base.end()); - mvGlyph2Char.insert(mvGlyph2Char.begin(),vGlyph2Char.begin(),vGlyph2Char.end()); - } -#endif - gr::Segment * getSegment() { return m_seg; } - TextSourceAdaptor * getTextSrc() { return m_text; } - void unlock() { --m_lockCount; } - bool isRtl() const { return mbIsRtl; } -#ifdef GRCACHE_REUSE_VECTORS - const long & width() const { return mnWidth; } - const GraphiteLayout::Glyphs & glyphs() const { return mvGlyphs; } - const std::vector & charDxs() const { return mvCharDxs; } - const std::vector & char2BaseGlyph() const { return mvChar2BaseGlyph; } - const std::vector & glyph2Char() const { return mvGlyph2Char; } - float & fontScale() { return m_fontScale; } -#endif -private: - rtl::OUString * m_rope; - TextSourceAdaptor * m_text; - gr::Segment * m_seg; - const xub_Unicode * m_nextKey; - const xub_Unicode* m_pStr; - size_t m_startChar; - float m_fontScale; - long mnWidth; - GraphiteLayout::Glyphs mvGlyphs; // glyphs in display order - std::vector mvCharDxs; // right hand side x offset of each glyph - std::vector mvChar2BaseGlyph; - std::vector mvGlyph2Char; - bool mbIsRtl; - int m_lockCount; - friend class GraphiteSegmentCache; -}; - -typedef std::hash_map > GraphiteSegMap; -typedef std::hash_multimap GraphiteRopeMap; -typedef std::pair GrRMEntry; - -/** -* GraphiteSegmentCache contains the cached Segments for one particular font size -*/ -class GraphiteSegmentCache -{ -public: - enum { - // not really sure what good values are here, - // bucket size should be >> cache size - SEG_BUCKET_FACTOR = 4, - SEG_DEFAULT_CACHE_SIZE = 2047 - }; - GraphiteSegmentCache(sal_uInt32 nSegCacheSize) - : m_segMap(nSegCacheSize * SEG_BUCKET_FACTOR), - m_nSegCacheSize(nSegCacheSize), - m_oldestKey(NULL) {}; - ~GraphiteSegmentCache() - { - m_ropeMap.clear(); - GraphiteSegMap::iterator i = m_segMap.begin(); - while (i != m_segMap.end()) - { - GrSegRecord *r = i->second; - delete r; - ++i; - } - m_segMap.clear(); - }; - 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 - // match for the complete buffer - GraphiteSegMap::iterator iMap = - m_segMap.find(reinterpret_cast(layoutArgs.mpStr + - layoutArgs.mnMinCharPos)); - if (iMap != m_segMap.end()) - { - found = iMap->second; - } - else - { - iMap = m_segMap.find(reinterpret_cast(layoutArgs.mpStr)); - if (iMap != m_segMap.end()) - { - found = iMap->second; - } - } - if (found) - { - if (found->m_seg->startCharacter() <= layoutArgs.mnMinCharPos && - found->m_seg->stopCharacter() >= layoutArgs.mnEndCharPos) - { - 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); - // check that characters are the same, at least in the range of - // interest - // We could use substr and ==, but substr does a copy, - // so its probably faster to do it like this - 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]) - return NULL; - } - if (found->isRtl() != bIsRtl) - { - 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++; - } - else found = NULL; - } - else - { - // the pointers aren't the same, but we might still have the same text in a segment - // 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. - rtl::OUString * rope = new rtl::OUString(layoutArgs.mpStr + layoutArgs.mnMinCharPos, - segCharLimit - layoutArgs.mnMinCharPos); - if (!rope) return NULL; - size_t nHash = (*(rope)).hashCode(); - GrRMEntry range = m_ropeMap.equal_range(nHash); - while (range.first != range.second) - { - found = range.first->second; - if (found->m_lockCount == 0) - { - if(rope->match(*(found->m_rope))) - { - // found, but the pointers are all wrong - found->m_seg->setTextSourceOffset(layoutArgs.mnMinCharPos); - // the switch is done in graphite_layout.cxx - //found->m_text->switchLayoutArgs(layoutArgs); - found->m_lockCount++; - break; - } - else - found = NULL; - } - else - found = NULL; - ++(range.first); - } - delete rope; - } - return found; - }; - GrSegRecord * cacheSegment(TextSourceAdaptor * adapter, gr::Segment * seg, bool bIsRtl); -private: - GraphiteSegMap m_segMap; - GraphiteRopeMap m_ropeMap; - sal_uInt32 m_nSegCacheSize; - const xub_Unicode * m_oldestKey; - const xub_Unicode * m_prevKey; -}; - -typedef std::hash_map > GraphiteCacheMap; - -/** -* GraphiteCacheHandler maps a particular font, style, size to a GraphiteSegmentCache -*/ -class GraphiteCacheHandler -{ -public: - GraphiteCacheHandler() : m_cacheMap(255) - { - const char * pEnvCache = getenv( "SAL_GRAPHITE_CACHE_SIZE" ); - if (pEnvCache != NULL) - { - int envCacheSize = atoi(pEnvCache); - if (envCacheSize <= 0) - m_nSegCacheSize = GraphiteSegmentCache::SEG_DEFAULT_CACHE_SIZE; - else - { - m_nSegCacheSize = envCacheSize; - } - } - else - { - m_nSegCacheSize = GraphiteSegmentCache::SEG_DEFAULT_CACHE_SIZE; - } - }; - ~GraphiteCacheHandler() - { - GraphiteCacheMap::iterator i = m_cacheMap.begin(); - while (i != m_cacheMap.end()) - { - GraphiteSegmentCache *r = i->second; - delete r; - ++i; - } - m_cacheMap.clear(); - }; - - static GraphiteCacheHandler instance; - - GraphiteSegmentCache * getCache(sal_Int32 & fontHash) - { - if (m_cacheMap.count(fontHash) > 0) - { - return m_cacheMap.find(fontHash)->second; - } - GraphiteSegmentCache *pCache = new GraphiteSegmentCache(m_nSegCacheSize); - m_cacheMap[fontHash] = pCache; - return pCache; - } -private: - GraphiteCacheMap m_cacheMap; - sal_uInt32 m_nSegCacheSize; -}; - -#endif - diff --git a/vcl/inc/vcl/graphite_features.hxx b/vcl/inc/vcl/graphite_features.hxx deleted file mode 100644 index 47b8f062e299..000000000000 --- a/vcl/inc/vcl/graphite_features.hxx +++ /dev/null @@ -1,75 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// Description: -// Parse a string of features specified as ; separated pairs. -// e.g. -// 1001=1&2002=2&fav1=0 -#include -#include -#include -#include -#include - -namespace grutils -{ - - class GrFeatureParser - { - public: - enum { MAX_FEATURES = 64 }; - static const char FEAT_PREFIX; - static const char FEAT_SEPARATOR; - static const char FEAT_ID_VALUE_SEPARATOR; - static const std::string ISO_LANG; - GrFeatureParser(gr::Font & font, const std::string features, const std::string lang); - GrFeatureParser(gr::Font & font, const std::string lang); - GrFeatureParser(const GrFeatureParser & copy); - ~GrFeatureParser(); - size_t getFontFeatures(gr::FeatureSetting settings[MAX_FEATURES]) const; - bool parseErrors() { return mbErrors; }; - static bool isValid(gr::Font & font, gr::FeatureSetting & setting); - gr::isocode getLanguage() const { return maLang; }; - bool hasLanguage() const { return (maLang.rgch[0] != '\0'); } - sal_Int32 hashCode() const; - private: - void setLang(gr::Font & font, const std::string & lang); - bool isCharId(const std::string & id, size_t offset, size_t length); - int getCharId(const std::string & id, size_t offset, size_t length); - int getIntValue(const std::string & id, size_t offset, size_t length); - size_t mnNumSettings; - gr::isocode maLang; - bool mbErrors; - gr::FeatureSetting maSettings[64]; - }; - - union FeatId - { - gr::featid num; - unsigned char label[5]; - }; -} diff --git a/vcl/inc/vcl/graphite_layout.hxx b/vcl/inc/vcl/graphite_layout.hxx deleted file mode 100644 index cd22abdcdb26..000000000000 --- a/vcl/inc/vcl/graphite_layout.hxx +++ /dev/null @@ -1,188 +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 _SV_GRAPHITELAYOUT_HXX -#define _SV_GRAPHITELAYOUT_HXX -// Description: An implementation of the SalLayout interface that uses the -// Graphite engine. - -// We need this to enable namespace support in libgrengine headers. -#define GR_NAMESPACE - -#define GRCACHE 1 - -// Standard Library -#include -#include -#include -// Libraries -#include -#include -#include -#include -#include -#include -#include -// Platform -#include -#include -// Module - -// For backwards compatibility with 2.4.x -#if (SUPD == 680) -typedef sal_Int32 sal_GlyphId; -#endif - - -// Module type definitions and forward declarations. -// -class TextSourceAdaptor; -class GraphiteFontAdaptor; -class GrSegRecord; -// SAL/VCL types -class ServerFont; - -#ifdef WNT -// The GraphiteWinFont is just a wrapper to enable GrFontHasher to be a friend -// so that UniqueCacheInfo can be called. -#include -class GraphiteWinFont : public gr::WinFont -{ - friend class GrFontHasher; -public: - GraphiteWinFont(HDC hdc) : gr::WinFont(hdc) {}; - virtual ~GraphiteWinFont() {}; -}; -#endif -// Graphite types -namespace gr { class Segment; class GlyphIterator; } -namespace grutils { class GrFeatureParser; } - -// This class uses the SIL Graphite engine to provide complex text layout services to the VCL -// @author tse -// -class VCL_DLLPUBLIC GraphiteLayout : public SalLayout -{ -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: - typedef std::pair iterator_pair_t; - - void fill_from(gr::Segment & rSeg, ImplLayoutArgs & rArgs, - bool bRtl, long &rWidth, float fScaling, - std::vector & rChar2Base, std::vector & rGlyph2Char, - std::vector & rCharDxs); - void move_glyph(Glyphs::iterator, long dx); - - const_iterator cluster_base(const_iterator) const; - iterator_pair_t neighbour_clusters(const_iterator) const; - private: - std::pair appendCluster(gr::Segment & rSeg, ImplLayoutArgs & rArgs, - bool bRtl, float fSegmentAdvance, int nFirstCharInCluster, int nNextChar, - int nFirstGlyphInCluster, int nNextGlyph, float fScaling, - std::vector & rChar2Base, std::vector & rGlyph2Char, - std::vector & rCharDxs, long & rDXOffset); - void append(gr::Segment & rSeg, ImplLayoutArgs & rArgs, gr::GlyphInfo & rGi, float nextGlyphOrigin, float fScaling, std::vector & rChar2Base, std::vector & rGlyph2Char, std::vector & rCharDxs, long & rDXOffset, bool bIsBase); - }; - - mutable Glyphs mvGlyphs; - void clear(); - -private: - TextSourceAdaptor * mpTextSrc; // Text source. - gr::LayoutEnvironment maLayout; - const gr::Font &mrFont; - long mnWidth; - std::vector mvCharDxs; - std::vector mvChar2BaseGlyph; - std::vector mvGlyph2Char; - float mfScaling; - const grutils::GrFeatureParser * mpFeatures; - -public: - GraphiteLayout(const gr::Font & font, const grutils::GrFeatureParser * features = NULL) throw(); - - // used by upper layers - virtual bool LayoutText( ImplLayoutArgs& ); // first step of layout - // split into two stages to allow dc to be restored on the segment -#ifdef GRCACHE - gr::Segment * CreateSegment(ImplLayoutArgs& rArgs, GrSegRecord ** pRecord = NULL); - bool LayoutGlyphs(ImplLayoutArgs& rArgs, gr::Segment * pSegment, GrSegRecord * pSegRecord); -#else - gr::Segment * CreateSegment(ImplLayoutArgs& rArgs); - bool LayoutGlyphs(ImplLayoutArgs& rArgs, gr::Segment * pSegment); -#endif - - virtual void AdjustLayout( ImplLayoutArgs& ); // adjusting positions - - // methods using string indexing - virtual int GetTextBreak( long nMaxWidth, long nCharExtra=0, int nFactor=1 ) const; - virtual long FillDXArray( sal_Int32* pDXArray ) const; - virtual void ApplyDXArray(ImplLayoutArgs &rArgs, std::vector & rDeltaWidth); - - virtual void GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const; - - // methods using glyph indexing - virtual int GetNextGlyphs(int nLen, sal_GlyphId* pGlyphIdxAry, ::Point & rPos, int&, - sal_Int32* pGlyphAdvAry = 0, int* pCharPosAry = 0 ) const; - - // used by glyph+font+script fallback - virtual void MoveGlyph( int nStart, long nNewXPos ); - virtual void DropGlyph( int nStart ); - virtual void Simplify( bool bIsBase ); - - // Dummy implementation so layout can be shared between Linux/Windows - virtual void DrawText(SalGraphics&) const {}; - - virtual ~GraphiteLayout() throw(); - void SetFeatures(grutils::GrFeatureParser * aFeature) { mpFeatures = aFeature; } - void SetFontScale(float s) { mfScaling = s; }; - const TextSourceAdaptor * textSrc() const { return mpTextSrc; }; - virtual sal_GlyphId getKashidaGlyph(int & width) = 0; - void kashidaJustify(std::vector & rDeltaWidth, sal_GlyphId, int width); - - static const int EXTRA_CONTEXT_LENGTH; -private: - int glyph_to_char(Glyphs::iterator); - std::pair glyph_to_chars(const GlyphItem &) const; - - std::pair caret_positions(size_t) const; - void expandOrCondense(ImplLayoutArgs &rArgs); -}; - - - -#endif // _SV_GRAPHITELAYOUT_HXX diff --git a/vcl/inc/vcl/graphite_serverfont.hxx b/vcl/inc/vcl/graphite_serverfont.hxx deleted file mode 100644 index 19eb70b11908..000000000000 --- a/vcl/inc/vcl/graphite_serverfont.hxx +++ /dev/null @@ -1,100 +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 _SV_GRAPHITESERVERFONT_HXX -#define _SV_GRAPHITESERVERFONT_HXX - -// We need this to enable namespace support in libgrengine headers. -#define GR_NAMESPACE - -#ifndef MSC -#include -#include - -// Modules - -class VCL_DLLPUBLIC GraphiteLayoutImpl : public GraphiteLayout -{ -public: - GraphiteLayoutImpl(const gr::Font & font, const grutils::GrFeatureParser * features, GraphiteFontAdaptor * pFont) throw() - : GraphiteLayout(font, features), mpFont(pFont) {}; - virtual ~GraphiteLayoutImpl() throw() {}; - virtual sal_GlyphId getKashidaGlyph(int & width); -private: - GraphiteFontAdaptor * mpFont; -}; - -// This class implments the server font specific parts. -// @author tse -// -class VCL_DLLPUBLIC GraphiteServerFontLayout : public ServerFontLayout -{ -private: - mutable GraphiteFontAdaptor * mpFont; - // mutable so that the DrawOffset/DrawBase can be set - mutable GraphiteLayoutImpl maImpl; -public: - GraphiteServerFontLayout(GraphiteFontAdaptor * font) throw(); - - virtual bool LayoutText( ImplLayoutArgs& rArgs) { SalLayout::AdjustLayout(rArgs); return maImpl.LayoutText(rArgs); }; // first step of layout - virtual void AdjustLayout( ImplLayoutArgs& rArgs) - { - SalLayout::AdjustLayout(rArgs); - maImpl.DrawBase() = maDrawBase; - maImpl.DrawOffset() = maDrawOffset; - maImpl.AdjustLayout(rArgs); - }; - virtual long GetTextWidth() const { return maImpl.GetTextWidth(); } - virtual long FillDXArray( sal_Int32* dxa ) const { return maImpl.FillDXArray(dxa); } - virtual int GetTextBreak( long mw, long ce, int f ) const { return maImpl.GetTextBreak(mw, ce, f); } - virtual void GetCaretPositions( int as, sal_Int32* cxa ) const { maImpl.GetCaretPositions(as, cxa); } - - // used by display layers - virtual int GetNextGlyphs( int l, sal_GlyphId* gia, Point& p, int& s, - sal_Int32* gaa = NULL, int* cpa = NULL ) const - { - maImpl.DrawBase() = maDrawBase; - maImpl.DrawOffset() = maDrawOffset; - return maImpl.GetNextGlyphs(l, gia, p, s, gaa, cpa); - } - - virtual void MoveGlyph( int nStart, long nNewXPos ) { maImpl.MoveGlyph(nStart, nNewXPos); }; - virtual void DropGlyph( int nStart ) { maImpl.DropGlyph(nStart); }; - virtual void Simplify( bool bIsBase ) { maImpl.Simplify(bIsBase); }; - - virtual ~GraphiteServerFontLayout() throw(); - -// For use with PspGraphics - const sal_Unicode* getTextPtr() const; - int getMinCharPos() const { return mnMinCharPos; } - int getMaxCharPos() const { return mnEndCharPos; } -}; - - - -#endif -#endif //_SV_GRAPHITESERVERFONT_HXX diff --git a/vcl/inc/vcl/helpwin.hxx b/vcl/inc/vcl/helpwin.hxx deleted file mode 100644 index 244ae1b7d846..000000000000 --- a/vcl/inc/vcl/helpwin.hxx +++ /dev/null @@ -1,92 +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 _SV_HELPWIN_HXX -#define _SV_HELPWIN_HXX - -#include -#include - -// ------------------ -// - HelpTextWindow - -// ------------------ - -class HelpTextWindow : public FloatingWindow -{ -private: - Point maPos; - Rectangle maHelpArea; // Wenn naechste Hilfe fuers gleiche Rectangle, gleicher Text, dann Fenster stehen lassen - - Rectangle maTextRect; // Bei umgebrochenen Text in QuickHelp - - String maHelpText; - String maStatusText; - - Timer maShowTimer; - Timer maHideTimer; - - USHORT mnHelpWinStyle; - USHORT mnStyle; - -protected: - DECL_LINK( TimerHdl, Timer* ); - virtual void Paint( const Rectangle& ); - virtual void RequestHelp( const HelpEvent& rHEvt ); - virtual String GetText() const; - void ImplShow(); - -public: - HelpTextWindow( Window* pParent, const String& rText, USHORT nHelpWinStyle, USHORT nStyle ); - ~HelpTextWindow(); - - const String& GetHelpText() const { return maHelpText; } - void SetHelpText( const String& rHelpText ); - USHORT GetWinStyle() const { return mnHelpWinStyle; } - - // Nur merken: - void SetStatusText( const String& rStatusText ) { maStatusText = rStatusText; } - void SetHelpArea( const Rectangle& rRect ) { maHelpArea = rRect; } - - void ShowHelp( USHORT nDelayMode ); - - Size CalcOutSize() const; - const Rectangle& GetHelpArea() const { return maHelpArea; } - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); - - BOOL RegisterAccessibleParent(); - void RevokeAccessibleParent(); -}; - -void ImplShowHelpWindow( Window* pParent, USHORT nHelpWinStyle, USHORT nStyle, - const String& rHelpText, const String& rStatusText, - const Point& rScreenPos, const Rectangle* pHelpArea = NULL ); -void ImplDestroyHelpWindow( bool bUpdateHideTime ); -void ImplSetHelpWindowPos( Window* pHelpWindow, USHORT nHelpWinStyle, USHORT nStyle, - const Point& rPos, const Rectangle* pHelpArea ); - -#endif // _SV_HELPWIN_HXX diff --git a/vcl/inc/vcl/idlemgr.hxx b/vcl/inc/vcl/idlemgr.hxx deleted file mode 100644 index 6d7d7c8e531f..000000000000 --- a/vcl/inc/vcl/idlemgr.hxx +++ /dev/null @@ -1,60 +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 _SV_IDLEMGR_HXX -#define _SV_IDLEMGR_HXX - -#include -#include - -class ImplIdleList; - -// --------------- -// - ImplIdleMgr - -// --------------- - -class ImplIdleMgr -{ -private: - ImplIdleList* mpIdleList; - AutoTimer maTimer; - -public: - ImplIdleMgr(); - ~ImplIdleMgr(); - - BOOL InsertIdleHdl( const Link& rLink, USHORT nPriority ); - void RemoveIdleHdl( const Link& rLink ); - - void RestartIdler() - { if ( maTimer.IsActive() ) maTimer.Start(); } - - // Timer* kann auch NULL sein - DECL_LINK( TimeoutHdl, Timer* ); -}; - -#endif // _SV_IDLEMGR_HXX diff --git a/vcl/inc/vcl/ilstbox.hxx b/vcl/inc/vcl/ilstbox.hxx deleted file mode 100644 index 6580538f5d10..000000000000 --- a/vcl/inc/vcl/ilstbox.hxx +++ /dev/null @@ -1,649 +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 _SV_ILSTBOX_HXX -#define _SV_ILSTBOX_HXX - -#include -#include -#include -#include -#include -#include -#include - -#include "vcl/quickselectionengine.hxx" - -class ScrollBar; -class ScrollBarBox; - -// ----------------- -// - ListBox-Types - -// ----------------- - -#define HORZ_SCROLL 4 -#define IMG_TXT_DISTANCE 6 - -enum LB_EVENT_TYPE -{ - LET_MBDOWN, - LET_TRACKING, - LET_TRACKING_END, - LET_KEYMOVE, - LET_KEYSPACE -}; - -// ----------------- -// - ImplEntryType - -// ----------------- - -struct ImplEntryType -{ - XubString maStr; - Image maImage; - void* mpUserData; - BOOL mbIsSelected; - long mnFlags; - long mnHeight; - - ImplEntryType( const XubString& rStr, const Image& rImage ) : - maStr( rStr ), - maImage( rImage ), - mnFlags( 0 ), - mnHeight( 0 ) - { - mbIsSelected = FALSE; - mpUserData = NULL; - } - - ImplEntryType( const XubString& rStr ) : - maStr( rStr ), - mnFlags( 0 ), - mnHeight( 0 ) - { - mbIsSelected = FALSE; - mpUserData = NULL; - } - - ImplEntryType( const Image& rImage ) : - maImage( rImage ), - mnFlags( 0 ), - mnHeight( 0 ) - { - mbIsSelected = FALSE; - mpUserData = NULL; - } -}; - -// ----------------- -// - ImplEntryList - -// ----------------- - -class ImplEntryList : private List -{ -private: - Window* mpWindow; // For getting the current locale when matching strings - USHORT mnLastSelected; - USHORT mnSelectionAnchor; - USHORT mnImages; - - USHORT mnMRUCount; - USHORT mnMaxMRUCount; - - Link maSelectionChangedHdl; - BOOL mbCallSelectionChangedHdl; - - ImplEntryType* GetEntry( USHORT nPos ) const { return (ImplEntryType*)List::GetObject( nPos ); } - -public: - ImplEntryList( Window* pWindow ); - ~ImplEntryList(); - - USHORT InsertEntry( USHORT nPos, ImplEntryType* pNewEntry, BOOL bSort ); - void RemoveEntry( USHORT nPos ); - const ImplEntryType* GetEntryPtr( USHORT nPos ) const { return (const ImplEntryType*) GetObject( nPos ); } - ImplEntryType* GetMutableEntryPtr( USHORT nPos ) const { return (ImplEntryType*) GetObject( nPos ); } - void Clear(); - - USHORT FindMatchingEntry( const XubString& rStr, USHORT nStart = 0, BOOL bForward = TRUE, BOOL bLazy = TRUE ) const; - USHORT FindEntry( const XubString& rStr, BOOL bSearchMRUArea = FALSE ) const; - USHORT FindEntry( const void* pData ) const; - - // helper: add up heights up to index nEndIndex. - // GetAddedHeight( 0 ) returns 0 - // GetAddedHeight( LISTBOX_ENTRY_NOTFOUND ) returns 0 - // GetAddedHeight( i, k ) with k > i is equivalent -GetAddedHeight( k, i ) - long GetAddedHeight( USHORT nEndIndex, USHORT nBeginIndex = 0, long nBeginHeight = 0 ) const; - long GetEntryHeight( USHORT nPos ) const; - - USHORT GetEntryCount() const { return (USHORT)List::Count(); } - BOOL HasImages() const { return mnImages ? TRUE : FALSE; } - - XubString GetEntryText( USHORT nPos ) const; - - BOOL HasEntryImage( USHORT nPos ) const; - Image GetEntryImage( USHORT nPos ) const; - - void SetEntryData( USHORT nPos, void* pNewData ); - void* GetEntryData( USHORT nPos ) const; - - void SetEntryFlags( USHORT nPos, long nFlags ); - long GetEntryFlags( USHORT nPos ) const; - - void SelectEntry( USHORT nPos, BOOL bSelect ); - - USHORT GetSelectEntryCount() const; - XubString GetSelectEntry( USHORT nIndex ) const; - USHORT GetSelectEntryPos( USHORT nIndex ) const; - BOOL IsEntrySelected( const XubString& rStr ) const; - BOOL IsEntryPosSelected( USHORT nIndex ) const; - - void SetLastSelected( USHORT nPos ) { mnLastSelected = nPos; } - USHORT GetLastSelected() const { return mnLastSelected; } - - void SetSelectionAnchor( USHORT nPos ) { mnSelectionAnchor = nPos; } - USHORT GetSelectionAnchor() const { return mnSelectionAnchor; } - - - void SetSelectionChangedHdl( const Link& rLnk ) { maSelectionChangedHdl = rLnk; } - void SetCallSelectionChangedHdl( BOOL bCall ) { mbCallSelectionChangedHdl = bCall; } - - void SetMRUCount( USHORT n ) { mnMRUCount = n; } - USHORT GetMRUCount() const { return mnMRUCount; } - - void SetMaxMRUCount( USHORT n ) { mnMaxMRUCount = n; } - USHORT GetMaxMRUCount() const { return mnMaxMRUCount; } - - /** An Entry is selectable if its mnFlags does not have the - LISTBOX_ENTRY_FLAG_DISABLE_SELECTION flag set. */ - bool IsEntrySelectable( USHORT nPos ) const; - - /** returns the first entry found from the given position nPos that is selectable - or LISTBOX_ENTRY_NOTFOUND if non is found. If the entry at nPos is not selectable, - it returns the first selectable entry after nPos if bForward is true and the - first selectable entry after nPos is bForward is false. - */ - USHORT FindFirstSelectable( USHORT nPos, bool bForward = true ); -}; - -// --------------------- -// - ImplListBoxWindow - -// --------------------- - -class ImplListBoxWindow : public Control, public ::vcl::ISearchableStringList -{ -private: - ImplEntryList* mpEntryList; // EntryListe - Rectangle maFocusRect; - - Size maUserItemSize; - - long mnMaxTxtHeight; // Maximale Hoehe eines Text-Items - long mnMaxTxtWidth; // Maximale Breite eines Text-Items - // Entry ohne Image - long mnMaxImgTxtWidth;// Maximale Breite eines Text-Items - // Entry UND Image - long mnMaxImgWidth; // Maximale Breite eines Image-Items - long mnMaxImgHeight; // Maximale Hoehe eines Image-Items - long mnMaxWidth; // Maximale Breite eines Eintrags - long mnMaxHeight; // Maximale Hoehe eines Eintrags - - USHORT mnCurrentPos; // Position (Focus) - USHORT mnTrackingSaveSelection; // Selektion vor Tracking(); - - USHORT mnSeparatorPos; // Separator - - USHORT mnUserDrawEntry; - - USHORT mnTop; // Ausgabe ab Zeile - long mnLeft; // Ausgabe ab Spalte - long mnBorder; // Abstand Rahmen - Text - long mnTextHeight; // Texthoehe - ProminentEntry meProminentType; // where is the "prominent" entry - - USHORT mnSelectModifier; // Modifiers - - BOOL mbHasFocusRect: 1, - mbSort: 1, // ListBox sortiert - mbTrack: 1, // Tracking - mbMulti: 1, // MultiListBox - mbStackMode: 1, // StackSelection - mbSimpleMode: 1, // SimpleMode fuer MultiListBox - mbImgsDiffSz: 1, // Images haben verschiedene Groessen - mbTravelSelect: 1, // TravelSelect - mbTrackingSelect: 1, // Selektiert bei MouseMove - mbSelectionChanged: 1, // Select() nicht zu oft rufen... - mbMouseMoveSelect: 1, // Selektieren bei MouseMove - mbGrabFocus: 1, // Focus bei MBDown grabben - mbUserDrawEnabled: 1, // UserDraw possible - mbInUserDraw: 1, // In UserDraw - mbReadOnly: 1, // ReadOnly - mbMirroring: 1, // pb: #106948# explicit mirroring for calc - mbRight: 1, // right align Text output - mbCenter: 1; // center Text output - - Link maScrollHdl; - Link maSelectHdl; - Link maCancelHdl; - Link maDoubleClickHdl; - Link maUserDrawHdl; - Link maMRUChangedHdl; - - ::vcl::QuickSelectionEngine - maQuickSelectionEngine; - -protected: - virtual void KeyInput( const KeyEvent& rKEvt ); - virtual void MouseButtonDown( const MouseEvent& rMEvt ); - virtual void MouseMove( const MouseEvent& rMEvt ); - virtual void Tracking( const TrackingEvent& rTEvt ); - virtual void Paint( const Rectangle& rRect ); - virtual void Resize(); - virtual void GetFocus(); - virtual void LoseFocus(); - - BOOL SelectEntries( USHORT nSelect, LB_EVENT_TYPE eLET, BOOL bShift = FALSE, BOOL bCtrl = FALSE ); - void ImplPaint( USHORT nPos, BOOL bErase = FALSE, bool bLayout = false ); - void ImplDoPaint( const Rectangle& rRect, bool bLayout = false ); - void ImplCalcMetrics(); - void ImplUpdateEntryMetrics( ImplEntryType& rEntry ); - void ImplCallSelect(); - - void ImplShowFocusRect(); - void ImplHideFocusRect(); - - - virtual void StateChanged( StateChangedType nType ); - virtual void DataChanged( const DataChangedEvent& rDCEvt ); - -public: - virtual void FillLayoutData() const; - - ImplListBoxWindow( Window* pParent, WinBits nWinStyle ); - ~ImplListBoxWindow(); - - ImplEntryList* GetEntryList() const { return mpEntryList; } - - USHORT InsertEntry( USHORT nPos, ImplEntryType* pNewEntry ); - void RemoveEntry( USHORT nPos ); - void Clear(); - void ResetCurrentPos() { mnCurrentPos = LISTBOX_ENTRY_NOTFOUND; } - USHORT GetCurrentPos() const { return mnCurrentPos; } - USHORT GetDisplayLineCount() const; - void SetEntryFlags( USHORT nPos, long nFlags ); - - void DrawEntry( USHORT nPos, BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos = FALSE, bool bLayout = false ); - - void SelectEntry( USHORT nPos, BOOL bSelect ); - void DeselectAll(); - USHORT GetEntryPosForPoint( const Point& rPoint ) const; - USHORT GetLastVisibleEntry() const; - - BOOL ProcessKeyInput( const KeyEvent& rKEvt ); - - void SetTopEntry( USHORT nTop ); - USHORT GetTopEntry() const { return mnTop; } - // ShowProminentEntry will set the entry correspoding to nEntryPos - // either at top or in the middle depending on the chosen style - void ShowProminentEntry( USHORT nEntryPos ); - void SetProminentEntryType( ProminentEntry eType ) { meProminentType = eType; } - ProminentEntry GetProminentEntryType() const { return meProminentType; } - using Window::IsVisible; - BOOL IsVisible( USHORT nEntry ) const; - - long GetLeftIndent() const { return mnLeft; } - void SetLeftIndent( long n ); - void ScrollHorz( long nDiff ); - - void AllowGrabFocus( BOOL b ) { mbGrabFocus = b; } - BOOL IsGrabFocusAllowed() const { return mbGrabFocus; } - - void SetSeparatorPos( USHORT n ) { mnSeparatorPos = n; } - USHORT GetSeparatorPos() const { return mnSeparatorPos; } - - void SetTravelSelect( BOOL bTravelSelect ) { mbTravelSelect = bTravelSelect; } - BOOL IsTravelSelect() const { return mbTravelSelect; } - BOOL IsTrackingSelect() const { return mbTrackingSelect; } - - void SetUserItemSize( const Size& rSz ); - const Size& GetUserItemSize() const { return maUserItemSize; } - - void EnableUserDraw( BOOL bUserDraw ) { mbUserDrawEnabled = bUserDraw; } - BOOL IsUserDrawEnabled() const { return mbUserDrawEnabled; } - - void EnableMultiSelection( BOOL bMulti, BOOL bStackMode ) { mbMulti = bMulti; mbStackMode = bStackMode; } - BOOL IsMultiSelectionEnabled() const { return mbMulti; } - - void SetMultiSelectionSimpleMode( BOOL bSimple ) { mbSimpleMode = bSimple; } - BOOL IsMultiSelectionSimpleMode() const { return mbSimpleMode; } - - void EnableMouseMoveSelect( BOOL bMouseMoveSelect ) { mbMouseMoveSelect = bMouseMoveSelect; } - BOOL IsMouseMoveSelectEnabled() const { return mbMouseMoveSelect; } - BOOL IsMouseMoveSelect() const { return mbMouseMoveSelect||mbStackMode; } - - Size CalcSize( USHORT nMaxLines ) const; - Rectangle GetBoundingRectangle( USHORT nItem ) const; - - long GetEntryHeight() const { return mnMaxHeight; } - long GetMaxEntryWidth() const { return mnMaxWidth; } - - void SetScrollHdl( const Link& rLink ) { maScrollHdl = rLink; } - const Link& GetScrollHdl() const { return maScrollHdl; } - void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; } - const Link& GetSelectHdl() const { return maSelectHdl; } - void SetCancelHdl( const Link& rLink ) { maCancelHdl = rLink; } - const Link& GetCancelHdl() const { return maCancelHdl; } - void SetDoubleClickHdl( const Link& rLink ) { maDoubleClickHdl = rLink; } - const Link& GetDoubleClickHdl() const { return maDoubleClickHdl; } - void SetUserDrawHdl( const Link& rLink ) { maUserDrawHdl = rLink; } - const Link& GetUserDrawHdl() const { return maUserDrawHdl; } - void SetMRUChangedHdl( const Link& rLink ) { maMRUChangedHdl = rLink; } - const Link& GetMRUChangedHdl() const { return maMRUChangedHdl; } - - BOOL IsSelectionChanged() const { return mbSelectionChanged; } - USHORT GetSelectModifier() const { return mnSelectModifier; } - - void EnableSort( BOOL b ) { mbSort = b; } - - void SetReadOnly( BOOL bReadOnly ) { mbReadOnly = bReadOnly; } - BOOL IsReadOnly() const { return mbReadOnly; } - - using Control::ImplInitSettings; - void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); - USHORT ImplGetTextStyle() const; - - // pb: #106948# explicit mirroring for calc - inline void EnableMirroring() { mbMirroring = TRUE; } - inline BOOL IsMirroring() const { return mbMirroring; } - -protected: - // ISearchableStringList - virtual ::vcl::StringEntryIdentifier CurrentEntry( String& _out_entryText ) const; - virtual ::vcl::StringEntryIdentifier NextEntry( ::vcl::StringEntryIdentifier _currentEntry, String& _out_entryText ) const; - virtual void SelectEntry( ::vcl::StringEntryIdentifier _entry ); -}; - -// --------------- -// - ImplListBox - -// --------------- - -class ImplListBox : public Control -{ -private: - ImplListBoxWindow maLBWindow; - ScrollBar* mpHScrollBar; - ScrollBar* mpVScrollBar; - ScrollBarBox* mpScrollBarBox; - BOOL mbVScroll : 1, // VScroll an oder aus - mbHScroll : 1, // HScroll an oder aus - mbAutoHScroll : 1; // AutoHScroll an oder aus - Link maScrollHdl; // Weil der vom ImplListBoxWindow selbst benoetigt wird. - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDNDListenerContainer; - -protected: - virtual void GetFocus(); - virtual void StateChanged( StateChangedType nType ); - virtual void DataChanged( const DataChangedEvent& rDCEvt ); - - long Notify( NotifyEvent& rNEvt ); - - void ImplResizeControls(); - void ImplCheckScrollBars(); - void ImplInitScrollBars(); - - DECL_LINK( ScrollBarHdl, ScrollBar* ); - DECL_LINK( LBWindowScrolled, void* ); - DECL_LINK( MRUChanged, void* ); - -public: - ImplListBox( Window* pParent, WinBits nWinStyle ); - ~ImplListBox(); - - const ImplEntryList* GetEntryList() const { return maLBWindow.GetEntryList(); } - ImplListBoxWindow* GetMainWindow() { return &maLBWindow; } - - virtual void Resize(); - virtual const Wallpaper& GetDisplayBackground() const; - virtual Window* GetPreferredKeyInputWindow(); - - USHORT InsertEntry( USHORT nPos, const XubString& rStr ); - USHORT InsertEntry( USHORT nPos, const Image& rImage ); - USHORT InsertEntry( USHORT nPos, const XubString& rStr, const Image& rImage ); - void RemoveEntry( USHORT nPos ); - void SetEntryData( USHORT nPos, void* pNewData ) { maLBWindow.GetEntryList()->SetEntryData( nPos, pNewData ); } - void Clear(); - - void SetEntryFlags( USHORT nPos, long nFlags ); - long GetEntryFlags( USHORT nPos ) const; - - void SelectEntry( USHORT nPos, BOOL bSelect ); - void SetNoSelection(); - void ResetCurrentPos() { maLBWindow.ResetCurrentPos(); } - USHORT GetCurrentPos() const { return maLBWindow.GetCurrentPos(); } - - BOOL ProcessKeyInput( const KeyEvent& rKEvt ) { return maLBWindow.ProcessKeyInput( rKEvt ); } - BOOL HandleWheelAsCursorTravel( const CommandEvent& rCEvt ); - - void SetSeparatorPos( USHORT n ) { maLBWindow.SetSeparatorPos( n ); } - USHORT GetSeparatorPos() const { return maLBWindow.GetSeparatorPos(); } - - void SetTopEntry( USHORT nTop ) { maLBWindow.SetTopEntry( nTop ); } - USHORT GetTopEntry() const { return maLBWindow.GetTopEntry(); } - void ShowProminentEntry( USHORT nPos ) { maLBWindow.ShowProminentEntry( nPos ); } - using Window::IsVisible; - BOOL IsVisible( USHORT nEntry ) const { return maLBWindow.IsVisible( nEntry ); } - - void SetProminentEntryType( ProminentEntry eType ) { maLBWindow.SetProminentEntryType( eType ); } - ProminentEntry GetProminentEntryType() const { return maLBWindow.GetProminentEntryType(); } - - long GetLeftIndent() const { return maLBWindow.GetLeftIndent(); } - void SetLeftIndent( USHORT n ) { maLBWindow.SetLeftIndent( n ); } - void ScrollHorz( short nDiff ) { maLBWindow.ScrollHorz( nDiff ); } - - void SetTravelSelect( BOOL bTravelSelect ) { maLBWindow.SetTravelSelect( bTravelSelect ); } - BOOL IsTravelSelect() const { return maLBWindow.IsTravelSelect(); } - BOOL IsTrackingSelect() const { return maLBWindow.IsTrackingSelect(); } - - void EnableMultiSelection( BOOL bMulti, BOOL bStackMode ) { maLBWindow.EnableMultiSelection( bMulti, bStackMode ); } - BOOL IsMultiSelectionEnabled() const { return maLBWindow.IsMultiSelectionEnabled(); } - - void SetMultiSelectionSimpleMode( BOOL bSimple ) { maLBWindow.SetMultiSelectionSimpleMode( bSimple ); } - BOOL IsMultiSelectionSimpleMode() const { return maLBWindow.IsMultiSelectionSimpleMode(); } - - void SetReadOnly( BOOL b ) { maLBWindow.SetReadOnly( b ); } - BOOL IsReadOnly() const { return maLBWindow.IsReadOnly(); } - - - Size CalcSize( USHORT nMaxLines ) const { return maLBWindow.CalcSize( nMaxLines ); } - long GetEntryHeight() const { return maLBWindow.GetEntryHeight(); } - long GetMaxEntryWidth() const { return maLBWindow.GetMaxEntryWidth(); } - - void SetScrollHdl( const Link& rLink ) { maScrollHdl = rLink; } - const Link& GetScrollHdl() const { return maScrollHdl; } - void SetSelectHdl( const Link& rLink ) { maLBWindow.SetSelectHdl( rLink ); } - const Link& GetSelectHdl() const { return maLBWindow.GetSelectHdl(); } - void SetCancelHdl( const Link& rLink ) { maLBWindow.SetCancelHdl( rLink ); } - const Link& GetCancelHdl() const { return maLBWindow.GetCancelHdl(); } - void SetDoubleClickHdl( const Link& rLink ) { maLBWindow.SetDoubleClickHdl( rLink ); } - const Link& GetDoubleClickHdl() const { return maLBWindow.GetDoubleClickHdl(); } - void SetUserDrawHdl( const Link& rLink ) { maLBWindow.SetUserDrawHdl( rLink ); } - const Link& GetUserDrawHdl() const { return maLBWindow.GetUserDrawHdl(); } - - void SetSelectionChangedHdl( const Link& rLnk ) { maLBWindow.GetEntryList()->SetSelectionChangedHdl( rLnk ); } - void SetCallSelectionChangedHdl( BOOL bCall ) { maLBWindow.GetEntryList()->SetCallSelectionChangedHdl( bCall ); } - BOOL IsSelectionChanged() const { return maLBWindow.IsSelectionChanged(); } - USHORT GetSelectModifier() const { return maLBWindow.GetSelectModifier(); } - - void SetMRUEntries( const XubString& rEntries, xub_Unicode cSep ); - XubString GetMRUEntries( xub_Unicode cSep ) const; - void SetMaxMRUCount( USHORT n ) { maLBWindow.GetEntryList()->SetMaxMRUCount( n ); } - USHORT GetMaxMRUCount() const { return maLBWindow.GetEntryList()->GetMaxMRUCount(); } - USHORT GetDisplayLineCount() const - { return maLBWindow.GetDisplayLineCount(); } - - // pb: #106948# explicit mirroring for calc - inline void EnableMirroring() { maLBWindow.EnableMirroring(); } - inline void SetDropTraget(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& i_xDNDListenerContainer){ mxDNDListenerContainer= i_xDNDListenerContainer; } -}; - -// ----------------------------- -// - ImplListBoxFloatingWindow - -// ----------------------------- - -class ImplListBoxFloatingWindow : public FloatingWindow -{ -private: - ImplListBox* mpImplLB; - Size maPrefSz; - USHORT mnDDLineCount; - USHORT mnPopupModeStartSaveSelection; - BOOL mbAutoWidth; - -protected: - long PreNotify( NotifyEvent& rNEvt ); - -public: - ImplListBoxFloatingWindow( Window* pParent ); - - void SetImplListBox( ImplListBox* pLB ) { mpImplLB = pLB; } - - void SetPrefSize( const Size& rSz ) { maPrefSz = rSz; } - const Size& GetPrefSize() const { return maPrefSz; } - - void SetAutoWidth( BOOL b ) { mbAutoWidth = b; } - BOOL IsAutoWidth() const { return mbAutoWidth; } - - Size CalcFloatSize(); - void StartFloat( BOOL bStartTracking ); - - virtual void SetPosSizePixel( long nX, long nY, - long nWidth, long nHeight, USHORT nFlags = WINDOW_POSSIZE_ALL ); - void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) - { FloatingWindow::SetPosSizePixel( rNewPos, rNewSize ); } - - void SetDropDownLineCount( USHORT n ) { mnDDLineCount = n; } - USHORT GetDropDownLineCount() const { return mnDDLineCount; } - - USHORT GetPopupModeStartSaveSelection() const { return mnPopupModeStartSaveSelection; } - - virtual void Resize(); -}; - -// ----------- -// - ImplWin - -// ----------- - -class ImplWin : public Control -{ -private: - - USHORT mnItemPos; // wegen UserDraw muss ich wissen, welches Item ich darstelle. - XubString maString; - Image maImage; - Image maImageHC; - - Rectangle maFocusRect; - Size maUserItemSize; - - Link maMBDownHdl; - Link maUserDrawHdl; - - BOOL mbUserDrawEnabled : 1, - mbInUserDraw : 1; - - - void ImplDraw( bool bLayout = false ); -protected: - virtual void FillLayoutData() const; -public: - - ImplWin( Window* pParent, WinBits nWinStyle = 0 ); - ~ImplWin() {}; - - virtual void MouseButtonDown( const MouseEvent& rMEvt ); - virtual void Paint( const Rectangle& rRect ); - virtual void Resize(); - virtual void GetFocus(); - virtual void LoseFocus(); - virtual long PreNotify( NotifyEvent& rNEvt ); - - USHORT GetItemPos() const { return mnItemPos; } - void SetItemPos( USHORT n ) { mnItemPos = n; } - - const XubString& GetString() const { return maString; } - void SetString( const XubString& rStr ) { maString = rStr; } - - const Image& GetImage() const { return maImage; } - void SetImage( const Image& rImg ) { maImage = rImg; } - - BOOL SetModeImage( const Image& rImage, BmpColorMode eMode = BMP_COLOR_NORMAL ); - const Image& GetModeImage( BmpColorMode eMode = BMP_COLOR_NORMAL ) const; - - - virtual void MBDown(); - void SetMBDownHdl( const Link& rLink ) { maMBDownHdl = rLink; } - const Link& GetMBDownHdl() const { return maMBDownHdl; } - - void SetUserDrawHdl( const Link& rLink ) { maUserDrawHdl = rLink; } - const Link& GetUserDrawHdl() const { return maUserDrawHdl; } - - void SetUserItemSize( const Size& rSz ) { maUserItemSize = rSz; } - const Size& GetUserItemSize() const { return maUserItemSize; } - - void EnableUserDraw( BOOL bUserDraw ) { mbUserDrawEnabled = bUserDraw; } - BOOL IsUserDrawEnabled() const { return mbUserDrawEnabled; } - - void DrawEntry( BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos = FALSE, bool bLayout = false ); -}; - -// ----------- -// - ImplBtn - -// ----------- - -class ImplBtn : public PushButton -{ -private: - BOOL mbDown; - - Link maMBDownHdl; - -public: - ImplBtn( Window* pParent, WinBits nWinStyle = 0 ); - ~ImplBtn() {}; - - virtual void MouseButtonDown( const MouseEvent& rMEvt ); - - virtual void MBDown(); - void SetMBDownHdl( const Link& rLink ) { maMBDownHdl = rLink; } - const Link& GetMBDownHdl() const { return maMBDownHdl; } -}; - - -void ImplInitFieldSettings( Window* pWin, BOOL bFont, BOOL bForeground, BOOL bBackground ); -void ImplInitDropDownButton( PushButton* pButton ); - -#endif // _SV_ILSTBOX_HXX diff --git a/vcl/inc/vcl/image.h b/vcl/inc/vcl/image.h deleted file mode 100644 index 023b2c2d1a2c..000000000000 --- a/vcl/inc/vcl/image.h +++ /dev/null @@ -1,182 +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 _SV_IMAGE_H -#define _SV_IMAGE_H - -#include - -#include - -// ---------------- -// - ImplImageBmp - -// ---------------- - -class ImplImageBmp -{ -public: - - ImplImageBmp(); - ~ImplImageBmp(); - - void Create( long nItemWidth, long nItemHeight, USHORT nInitSize ); - void Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHeight,USHORT nInitSize ); - - void Expand( USHORT nGrowSize ); - - void Replace( USHORT nPos, USHORT nSrcPos ); - void Replace( USHORT nPos, const ImplImageBmp& rImageBmp, USHORT nSrcPos ); - void Replace( USHORT nPos, const BitmapEx& rBmpEx ); - - void ReplaceColors( const Color* pSrcColors, const Color* pDstColors, ULONG nColorCount ); - void ColorTransform( BmpColorMode eColorMode ); - void Invert(); - - BitmapEx GetBitmapEx( USHORT nPosCount, USHORT* pPosAry ) const; - - void Draw( USHORT nPos, OutputDevice* pDev, const Point& rPos, USHORT nStyle, const Size* pSize = NULL ); - -private: - - BitmapEx maBmpEx; - BitmapEx maDisabledBmpEx; - BitmapEx* mpDisplayBmp; - Size maSize; - BYTE* mpInfoAry; - USHORT mnSize; - - void ImplUpdateDisplayBmp( OutputDevice* pOutDev ); - void ImplUpdateDisabledBmpEx( int nPos ); - -private: // prevent assignment and copy construction - ImplImageBmp( const ImplImageBmp& ); - void operator=( const ImplImageBmp& ); -}; - -// -------------- -// - ImageTypes - -// -------------- - -enum ImageType { IMAGETYPE_BITMAP, IMAGETYPE_IMAGE }; - -// ----------------- -// - ImplImageList - -// ----------------- - -struct ImageAryData -{ - ::rtl::OUString maName; - // Images identified by either name, or by id - USHORT mnId; - BitmapEx maBitmapEx; - - ImageAryData(); - ImageAryData( const rtl::OUString &aName, - USHORT nId, const BitmapEx &aBitmap ); - ImageAryData( const ImageAryData& rData ); - ~ImageAryData(); - - bool IsLoadable() { return maBitmapEx.IsEmpty() && maName.getLength(); } - void Load(const rtl::OUString &rPrefix); - - ImageAryData& operator=( const ImageAryData& rData ); -}; - -// ------------------------------------------------------------------------------ - -struct ImplImageList -{ - typedef std::vector ImageAryDataVec; - typedef std::hash_map< rtl::OUString, ImageAryData *, rtl::OUStringHash > - ImageAryDataNameHash; - - ImageAryDataVec maImages; - ImageAryDataNameHash maNameHash; - rtl::OUString maPrefix; - Size maImageSize; - ULONG mnRefCount; - - ImplImageList(); - ImplImageList( const ImplImageList &aSrc ); - ~ImplImageList(); - - void AddImage( const ::rtl::OUString &aName, - USHORT nId, const BitmapEx &aBitmapEx ); - void RemoveImage( USHORT nPos ); - USHORT GetImageCount() const; -}; - -// -------------------- -// - ImplImageRefData - -// -------------------- - -struct ImplImageRefData -{ - ImplImageList* mpImplData; - USHORT mnIndex; - - ImplImageRefData() {} // Um Warning zu umgehen - ~ImplImageRefData(); - - BOOL IsEqual( const ImplImageRefData& rData ); -}; - -// ---------------- -// - ImpImageData - -// ---------------- - -struct ImplImageData -{ - ImplImageBmp* mpImageBitmap; - BitmapEx maBmpEx; - - ImplImageData( const BitmapEx& rBmpEx ); - ~ImplImageData(); - - BOOL IsEqual( const ImplImageData& rData ); -}; - -// ------------- -// - ImplImage - -// ------------- - -struct ImplImage -{ - ULONG mnRefCount; - // TODO: use inheritance to get rid of meType+mpData - void* mpData; - ImageType meType; - - ImplImage(); - ~ImplImage(); - -private: // prevent assignment and copy construction - ImplImage( const ImplImage&); - void operator=( const ImplImage&); -}; - -#endif // _SV_IMAGE_H diff --git a/vcl/inc/vcl/impbmp.hxx b/vcl/inc/vcl/impbmp.hxx deleted file mode 100644 index dc40fdcd3181..000000000000 --- a/vcl/inc/vcl/impbmp.hxx +++ /dev/null @@ -1,108 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_IMPBMP_HXX -#define _SV_IMPBMP_HXX - -#include -#include - -// --------------- -// - ImpBitmap - -// --------------- - -struct BitmapBuffer; -class SalBitmap; -class BitmapPalette; -class SalGraphics; -class ImplServerBitmap; -class Bitmap; -class OutputDevice; -class Color; -class AlphaMask; - -class ImpBitmap -{ -private: - - ULONG mnRefCount; - ULONG mnChecksum; - SalBitmap* mpSalBitmap; - Size maSourceSize; - -public: - - ImpBitmap(); - ~ImpBitmap(); - -#if _SOLAR__PRIVATE - -public: - - void ImplSetSalBitmap( SalBitmap* pSalBitmap ); - SalBitmap* ImplGetSalBitmap() const { return mpSalBitmap; } - -public: - - BOOL ImplCreate( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ); - BOOL ImplCreate( const ImpBitmap& rImpBitmap ); - BOOL ImplCreate( const ImpBitmap& rImpBitmap, SalGraphics* pGraphics ); - BOOL ImplCreate( const ImpBitmap& rImpBitmap, USHORT nNewBitCount ); - - void ImplDestroy(); - - Size ImplGetSize() const; - Size ImplGetSourceSize() const; - void ImplSetSourceSize( const Size&); - USHORT ImplGetBitCount() const; - - BitmapBuffer* ImplAcquireBuffer( BOOL bReadOnly ); - void ImplReleaseBuffer( BitmapBuffer* pBuffer, BOOL bReadOnly ); - -public: - - ULONG ImplGetRefCount() const { return mnRefCount; } - void ImplIncRefCount() { mnRefCount++; } - void ImplDecRefCount() { mnRefCount--; } - - inline void ImplSetChecksum( ULONG nChecksum ) { mnChecksum = nChecksum; } - inline ULONG ImplGetChecksum() const { return mnChecksum; } - -#endif // PRIVATE -}; - -inline Size ImpBitmap::ImplGetSourceSize() const -{ - return maSourceSize; -} - -inline void ImpBitmap::ImplSetSourceSize( const Size& rSize) -{ - maSourceSize = rSize; -} - -#endif // _SV_IMPBMP_HXX diff --git a/vcl/inc/vcl/impfont.hxx b/vcl/inc/vcl/impfont.hxx deleted file mode 100644 index e38e1dea78d4..000000000000 --- a/vcl/inc/vcl/impfont.hxx +++ /dev/null @@ -1,243 +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 _SV_IMPFONT_HXX -#define _SV_IMPFONT_HXX - -#include -#include -#include -#include -#include -#include -#include - -// ------------ -// - Impl_Font - -// ------------ - -class Impl_Font -{ -public: - Impl_Font(); - Impl_Font( const Impl_Font& ); - - bool operator==( const Impl_Font& ) const; - - FontPitch GetPitch() { if(mePitch==PITCH_DONTKNOW) AskConfig(); return mePitch; } - FontFamily GetFamily() { if(meFamily==FAMILY_DONTKNOW) AskConfig(); return meFamily; } - FontItalic GetItalic() { if(meItalic==ITALIC_DONTKNOW) AskConfig(); return meItalic; } - FontWeight GetWeight() { if(meWeight==WEIGHT_DONTKNOW) AskConfig(); return meWeight; } - FontWidth GetWidthType() { if(meWidthType==WIDTH_DONTKNOW)AskConfig(); return meWidthType; } - -private: - friend class Font; - void AskConfig(); - - int mnRefCount; - String maFamilyName; - String maStyleName; - Size maSize; - Color maColor; // compatibility, now on output device - Color maFillColor; // compatibility, now on output device - rtl_TextEncoding meCharSet; - LanguageType meLanguage; - LanguageType meCJKLanguage; - FontFamily meFamily; - FontPitch mePitch; - TextAlign meAlign; - FontWeight meWeight; - FontWidth meWidthType; - FontItalic meItalic; - FontUnderline meUnderline; - FontUnderline meOverline; - FontStrikeout meStrikeout; - FontRelief meRelief; - FontEmphasisMark meEmphasisMark; - FontType meType; // used by metrics only - short mnOrientation; - FontKerning mnKerning; - BOOL mbWordLine:1, - mbOutline:1, - mbConfigLookup:1, // there was a config lookup - mbShadow:1, - mbVertical:1, - mbTransparent:1; // compatibility, now on output device - - friend SvStream& operator>>( SvStream& rIStm, Impl_Font& ); - friend SvStream& operator<<( SvStream& rOStm, const Impl_Font& ); -}; - -// ------------------ -// - ImplFontMetric - -// ------------------ - -class ImplFontMetric -{ - friend class OutputDevice; - -private: - long mnAscent; // Ascent - long mnDescent; // Descent - long mnIntLeading; // Internal Leading - long mnExtLeading; // External Leading - long mnLineHeight; // Ascent+Descent+EmphasisMark - long mnSlant; // Slant - USHORT mnMiscFlags; // Misc Flags - UINT32 mnRefCount; // Reference Counter - - enum { DEVICE_FLAG=1, SCALABLE_FLAG=2, LATIN_FLAG=4, CJK_FLAG=8, CTL_FLAG=16 }; - -public: - ImplFontMetric(); - void AddReference(); - void DeReference(); - - long GetAscent() const { return mnAscent; } - long GetDescent() const { return mnDescent; } - long GetIntLeading() const { return mnIntLeading; } - long GetExtLeading() const { return mnExtLeading; } - long GetLineHeight() const { return mnLineHeight; } - long GetSlant() const { return mnSlant; } - - bool IsDeviceFont() const { return ((mnMiscFlags & DEVICE_FLAG) != 0); } - bool IsScalable() const { return ((mnMiscFlags & SCALABLE_FLAG) != 0); } - bool SupportsLatin() const { return ((mnMiscFlags & LATIN_FLAG) != 0); } - bool SupportsCJK() const { return ((mnMiscFlags & CJK_FLAG) != 0); } - bool SupportsCTL() const { return ((mnMiscFlags & CTL_FLAG) != 0); } - - bool operator==( const ImplFontMetric& ) const; -}; - -// ------------------ -// - ImplFontHints - -// ------------------ - -class ImplFontOptions -{ -public: - FontEmbeddedBitmap meEmbeddedBitmap; // whether the embedded bitmaps should be used - FontAntiAlias meAntiAlias; // whether the font should be antialiased - FontAutoHint meAutoHint; // whether the font should be autohinted - FontHinting meHinting; // whether the font should be hinted - FontHintStyle meHintStyle; // type of font hinting to be used -public: - ImplFontOptions() : - meEmbeddedBitmap(EMBEDDEDBITMAP_DONTKNOW), - meAntiAlias(ANTIALIAS_DONTKNOW), - meAutoHint(AUTOHINT_DONTKNOW), - meHinting(HINTING_DONTKNOW), - meHintStyle(HINT_SLIGHT) - {} - ImplFontOptions( FontEmbeddedBitmap eEmbeddedBitmap, FontAntiAlias eAntiAlias, - FontAutoHint eAutoHint, FontHinting eHinting, FontHintStyle eHintStyle) : - meEmbeddedBitmap(eEmbeddedBitmap), - meAntiAlias(eAntiAlias), - meAutoHint(eAutoHint), - meHinting(eHinting), - meHintStyle(eHintStyle) - {} - FontAutoHint GetUseAutoHint() const { return meAutoHint; } - FontHintStyle GetHintStyle() const { return meHintStyle; } - bool DontUseEmbeddedBitmaps() const { return meEmbeddedBitmap == EMBEDDEDBITMAP_FALSE; } - bool DontUseAntiAlias() const { return meAntiAlias == ANTIALIAS_FALSE; } - bool DontUseHinting() const { return (meHinting == HINTING_FALSE) || (GetHintStyle() == HINT_NONE); } -}; - -// ------------------- -// - ImplFontCharMap - -// ------------------- - -class CmapResult; - -class VCL_DLLPUBLIC ImplFontCharMap -{ -public: - explicit ImplFontCharMap( const CmapResult& ); - virtual ~ImplFontCharMap(); - - static ImplFontCharMap* GetDefaultMap( bool bSymbols=false); - - bool IsDefaultMap() const; - bool HasChar( sal_uInt32 ) const; - int CountCharsInRange( sal_uInt32 cMin, sal_uInt32 cMax ) const; - int GetCharCount() const; - - sal_uInt32 GetFirstChar() const; - sal_uInt32 GetLastChar() const; - - sal_uInt32 GetNextChar( sal_uInt32 ) const; - sal_uInt32 GetPrevChar( sal_uInt32 ) const; - - int GetIndexFromChar( sal_uInt32 ) const; - sal_uInt32 GetCharFromIndex( int ) const; - - void AddReference() const; - void DeReference() const; - - int GetGlyphIndex( sal_uInt32 ) const; - -private: - int ImplFindRangeIndex( sal_uInt32 ) const; - - // prevent assignment and copy construction - explicit ImplFontCharMap( const ImplFontCharMap& ); - void operator=( const ImplFontCharMap& ); - -private: - const sal_uInt32* mpRangeCodes; // pairs of StartCode/(EndCode+1) - const int* mpStartGlyphs; // range-specific mapper to glyphs - const USHORT* mpGlyphIds; // individual glyphid mappings - int mnRangeCount; - int mnCharCount; // covered codepoints - mutable int mnRefCount; -}; - -// CmapResult is a normalized version of the many CMAP formats -class -#ifdef UNX - VCL_DLLPUBLIC // vcl-plugins need it -#endif // UNX -CmapResult -{ -public: - explicit CmapResult( bool bSymbolic = false, - const sal_uInt32* pRangeCodes = NULL, int nRangeCount = 0, - const int* pStartGlyphs = 0, const USHORT* pGlyphIds = NULL ); - - const sal_uInt32* mpRangeCodes; - const int* mpStartGlyphs; - const USHORT* mpGlyphIds; - int mnRangeCount; - bool mbSymbolic; - bool mbRecoded; -}; - -bool ParseCMAP( const unsigned char* pRawData, int nRawLength, CmapResult& ); - -#endif // _SV_IMPFONT_HXX - diff --git a/vcl/inc/vcl/impgraph.hxx b/vcl/inc/vcl/impgraph.hxx deleted file mode 100644 index bb28d801fe12..000000000000 --- a/vcl/inc/vcl/impgraph.hxx +++ /dev/null @@ -1,176 +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 _SV_IMPGRAPH_HXX -#define _SV_IMPGRAPH_HXX - -#include -#include -#include -#include -#include -#include - -// --------------- -// - ImpSwapInfo - -// --------------- - -struct ImpSwapInfo -{ - MapMode maPrefMapMode; - Size maPrefSize; -}; - -// -------------- -// - ImpGraphic - -// -------------- - -class OutputDevice; -class GfxLink; -struct ImpSwapFile; -class GraphicConversionParameters; - -class ImpGraphic -{ - friend class Graphic; - -private: - - GDIMetaFile maMetaFile; - BitmapEx maEx; - ImpSwapInfo maSwapInfo; - Animation* mpAnimation; - GraphicReader* mpContext; - ImpSwapFile* mpSwapFile; - GfxLink* mpGfxLink; - GraphicType meType; - String maDocFileURLStr; - ULONG mnDocFilePos; - mutable ULONG mnSizeBytes; - ULONG mnRefCount; - BOOL mbSwapOut; - BOOL mbSwapUnderway; - -private: - - ImpGraphic(); - ImpGraphic( const ImpGraphic& rImpGraphic ); - ImpGraphic( const Bitmap& rBmp ); - ImpGraphic( const BitmapEx& rBmpEx ); - ImpGraphic( const Animation& rAnimation ); - ImpGraphic( const GDIMetaFile& rMtf ); - virtual ~ImpGraphic(); - - ImpGraphic& operator=( const ImpGraphic& rImpGraphic ); - BOOL operator==( const ImpGraphic& rImpGraphic ) const; - BOOL operator!=( const ImpGraphic& rImpGraphic ) const { return !( *this == rImpGraphic ); } - - void ImplClearGraphics( BOOL bCreateSwapInfo ); - void ImplClear(); - - GraphicType ImplGetType() const; - void ImplSetDefaultType(); - BOOL ImplIsSupportedGraphic() const; - - BOOL ImplIsTransparent() const; - BOOL ImplIsAlpha() const; - BOOL ImplIsAnimated() const; - - Bitmap ImplGetBitmap(const GraphicConversionParameters& rParameters) const; - BitmapEx ImplGetBitmapEx(const GraphicConversionParameters& rParameters) const; - Animation ImplGetAnimation() const; - const GDIMetaFile& ImplGetGDIMetaFile() const; - - Size ImplGetPrefSize() const; - void ImplSetPrefSize( const Size& rPrefSize ); - - MapMode ImplGetPrefMapMode() const; - void ImplSetPrefMapMode( const MapMode& rPrefMapMode ); - - ULONG ImplGetSizeBytes() const; - - void ImplDraw( OutputDevice* pOutDev, - const Point& rDestPt ) const; - void ImplDraw( OutputDevice* pOutDev, - const Point& rDestPt, - const Size& rDestSize ) const; - - void ImplStartAnimation( OutputDevice* pOutDev, - const Point& rDestPt, - long nExtraData = 0, - OutputDevice* pFirstFrameOutDev = NULL ); - void ImplStartAnimation( OutputDevice* pOutDev, - const Point& rDestPt, - const Size& rDestSize, - long nExtraData = 0, - OutputDevice* pFirstFrameOutDev = NULL ); - void ImplStopAnimation( OutputDevice* pOutputDevice = NULL, - long nExtraData = 0 ); - - void ImplSetAnimationNotifyHdl( const Link& rLink ); - Link ImplGetAnimationNotifyHdl() const; - - ULONG ImplGetAnimationLoopCount() const; - void ImplResetAnimationLoopCount(); - - List* ImplGetAnimationInfoList() const; - -private: - - GraphicReader* ImplGetContext(); - void ImplSetContext( GraphicReader* pReader ); - -private: - - void ImplSetDocFileName( const String& rName, ULONG nFilePos ); - const String& ImplGetDocFileName() const; - ULONG ImplGetDocFilePos() const; - - BOOL ImplReadEmbedded( SvStream& rIStream, BOOL bSwap = FALSE ); - BOOL ImplWriteEmbedded( SvStream& rOStream ); - - BOOL ImplSwapIn(); - BOOL ImplSwapIn( SvStream* pIStm ); - - BOOL ImplSwapOut(); - BOOL ImplSwapOut( SvStream* pOStm ); - - BOOL ImplIsSwapOut() const; - - void ImplSetLink( const GfxLink& ); - GfxLink ImplGetLink(); - BOOL ImplIsLink() const; - - ULONG ImplGetChecksum() const; - - BOOL ImplExportNative( SvStream& rOStm ) const; - - friend SvStream& operator<<( SvStream& rOStm, const ImpGraphic& rImpGraphic ); - friend SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic ); -}; - -#endif // _SV_IMPGRAPH_HXX diff --git a/vcl/inc/vcl/impimagetree.hxx b/vcl/inc/vcl/impimagetree.hxx deleted file mode 100644 index 9649fe2f5ec8..000000000000 --- a/vcl/inc/vcl/impimagetree.hxx +++ /dev/null @@ -1,96 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ***********************************************************************/ - -#ifndef INCLUDED_VCL_IMPIMAGETREE_HXX -#define INCLUDED_VCL_IMPIMAGETREE_HXX - -#include "sal/config.h" - -#include -#include -#include - -#include - -#include "boost/noncopyable.hpp" -#include "com/sun/star/uno/Reference.hxx" -#include "rtl/ustring.hxx" -#include "salhelper/singletonref.hxx" - -namespace com { namespace sun { namespace star { namespace container { - class XNameAccess; -} } } } -class BitmapEx; - -class ImplImageTree: private boost::noncopyable { -public: - ImplImageTree(); - - ~ImplImageTree(); - - // check whether the icon style is installed - bool checkStyle(rtl::OUString const & style); - - bool loadImage( - rtl::OUString const & name, rtl::OUString const & style, - BitmapEx & bitmap, bool localized = false ); - - void shutDown(); - // a crude form of life cycle control (called from DeInitVCL; otherwise, - // if the ImplImageTree singleton were destroyed during exit that would - // be too late for the destructors of the bitmaps in m_iconCache) - -private: - typedef std::list< - std::pair< - rtl::OUString, - com::sun::star::uno::Reference< - com::sun::star::container::XNameAccess > > > Zips; - - typedef std::hash_map< - rtl::OUString, bool, rtl::OUStringHash > CheckStyleCache; - typedef std::hash_map< - rtl::OUString, std::pair< bool, BitmapEx >, rtl::OUStringHash > IconCache; - - rtl::OUString m_style; - Zips m_zips; - CheckStyleCache m_checkStyleCache; - IconCache m_iconCache; - - void setStyle(rtl::OUString const & style ); - - void resetZips(); - - bool checkStyleCacheLookup( rtl::OUString const & style, bool &exists ); - bool iconCacheLookup( rtl::OUString const & name, bool localized, BitmapEx & bitmap ); - - bool find(std::vector< rtl::OUString > const & paths, BitmapEx & bitmap ); -}; - -typedef salhelper::SingletonRef< ImplImageTree > ImplImageTreeSingletonRef; - -#endif diff --git a/vcl/inc/vcl/impoct.hxx b/vcl/inc/vcl/impoct.hxx deleted file mode 100644 index 543ab19d6a57..000000000000 --- a/vcl/inc/vcl/impoct.hxx +++ /dev/null @@ -1,176 +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 _SV_IMPOCT_HXX -#define _SV_IMPOCT_HXX - -#include - -// ---------------- -// - ImpErrorQuad - -// ---------------- - -class ImpErrorQuad -{ - long nRed; - long nGreen; - long nBlue; - long nReserved; - -public: - - inline ImpErrorQuad() {} - inline ImpErrorQuad( const BitmapColor& rColor ) : - nRed ( (long) rColor.GetRed() << 5L ), - nGreen ( (long) rColor.GetGreen() << 5L ), - nBlue ( (long) rColor.GetBlue() << 5L ) {} - - inline void operator=( const BitmapColor& rColor ); - inline ImpErrorQuad& operator-=( const BitmapColor& rColor ); - - inline void ImplAddColorError1( const ImpErrorQuad& rErrQuad ); - inline void ImplAddColorError3( const ImpErrorQuad& rErrQuad ); - inline void ImplAddColorError5( const ImpErrorQuad& rErrQuad ); - inline void ImplAddColorError7( const ImpErrorQuad& rErrQuad ); - - inline BitmapColor ImplGetColor(); -}; - -// ------------------------------------------------------------------------ - -inline void ImpErrorQuad::operator=( const BitmapColor& rColor ) -{ - nRed = (long) rColor.GetRed() << 5L; - nGreen = (long) rColor.GetGreen() << 5L; - nBlue = (long) rColor.GetBlue() << 5L; -} - -// ------------------------------------------------------------------------ - -inline ImpErrorQuad& ImpErrorQuad::operator-=( const BitmapColor& rColor ) -{ - nRed -= ( (long) rColor.GetRed() << 5L ); - nGreen -= ( (long) rColor.GetGreen() << 5L ); - nBlue -= ( (long) rColor.GetBlue() << 5L ); - - return *this; -} - -// ------------------------------------------------------------------------ - -inline void ImpErrorQuad::ImplAddColorError1( const ImpErrorQuad& rErrQuad ) -{ - nRed += ( rErrQuad.nRed >> 4L ); - nGreen += ( rErrQuad.nGreen >> 4L ); - nBlue += ( rErrQuad.nBlue >> 4L ); -} - -// ------------------------------------------------------------------------ - -inline void ImpErrorQuad::ImplAddColorError3( const ImpErrorQuad& rErrQuad ) -{ - nRed += ( rErrQuad.nRed * 3L >> 4L ); - nGreen += ( rErrQuad.nGreen * 3L >> 4L ); - nBlue += ( rErrQuad.nBlue * 3L >> 4L ); -} - -// ------------------------------------------------------------------------ - -inline void ImpErrorQuad::ImplAddColorError5( const ImpErrorQuad& rErrQuad ) -{ - nRed += ( rErrQuad.nRed * 5L >> 4L ); - nGreen += ( rErrQuad.nGreen * 5L >> 4L ); - nBlue += ( rErrQuad.nBlue * 5L >> 4L ); -} - -// ------------------------------------------------------------------------ - -inline void ImpErrorQuad::ImplAddColorError7( const ImpErrorQuad& rErrQuad ) -{ - nRed += ( rErrQuad.nRed * 7L >> 4L ); - nGreen += ( rErrQuad.nGreen * 7L >> 4L ); - nBlue += ( rErrQuad.nBlue *7L >> 4L ); -} - -// ------------------------------------------------------------------------ - -inline BitmapColor ImpErrorQuad::ImplGetColor() -{ - return BitmapColor( (BYTE) ( ( nRed < 0L ? 0L : nRed > 8160L ? 8160L : nRed ) >> 5L ), - (BYTE) ( ( nGreen < 0L ? 0L : nGreen > 8160L ? 8160L : nGreen ) >> 5L ), - (BYTE) ( ( nBlue < 0L ? 0L : nBlue > 8160L ? 8160L : nBlue ) >> 5L ) ); -} - -// ------------- -// - NodeCache - -// ------------- - -class ImpNodeCache -{ - OctreeNode* pActNode; - ULONG nNew; - ULONG nDelete; - ULONG nGet; - ULONG nRelease; - -public: - - ImpNodeCache( const ULONG nInitSize ); - ~ImpNodeCache(); - - inline OctreeNode* ImplGetFreeNode(); - inline void ImplReleaseNode( OctreeNode* pNode ); -}; - -// ------------------------------------------------------------------------ - -inline OctreeNode* ImpNodeCache::ImplGetFreeNode() -{ - OctreeNode* pNode; - - if ( !pActNode ) - { - pActNode = new NODE; - pActNode->pNextInCache = NULL; - } - - pNode = pActNode; - pActNode = pNode->pNextInCache; - memset( pNode, 0, sizeof( NODE ) ); - - return pNode; -} - -// ------------------------------------------------------------------------ - -inline void ImpNodeCache::ImplReleaseNode( OctreeNode* pNode ) -{ - pNode->pNextInCache = pActNode; - pActNode = pNode; -} - -#endif // _SV_IMPOCT_HXX diff --git a/vcl/inc/vcl/impprn.hxx b/vcl/inc/vcl/impprn.hxx deleted file mode 100644 index 954b2340d0c7..000000000000 --- a/vcl/inc/vcl/impprn.hxx +++ /dev/null @@ -1,140 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#if 0 -#define _SV_IMPPRN_HXX - -#include -#include -#ifndef _VCL_IMPDEL_HXX -#include -#endif - -#include - -struct QueuePage; - -// ---------------- -// - ImplQPrinter - -// ---------------- - -/* - ImplQPrinter is on most systems a simple buffer that allows a potential - lengthy print job to be printed in the background. For this it saves all - normal drawing operations for each printed page to a metafile, then spooling - the metafiles timer based to a normal printer. The application can act in the meantime - including changing the original document without influencing the print job. - - On some systems (currently Mac/Aqua Cocoa) ImplQPrinter has the additional - purpose of adapting to the print system: here theprint systems starts a - job and will not return from that function until it has ended; to do so - it queries for each consecutive page to be printed. Also the Cocoa print system - needs to know the number of pages BEFORE starting a print job. Since our Printer - does not know that, we need to do the completing spooling to ImplQPrinter before - we can actually print to the real print system. Let's call this the pull model - instead of the push model (because the systems pulls the pages). -*/ - -class ImplQPrinter : public Printer, public vcl::DeletionNotifier -{ -private: - Printer* mpParent; - std::vector< QueuePage* > maQueue; - AutoTimer maTimer; - bool mbAborted; - bool mbUserCopy; - bool mbDestroyAllowed; - bool mbDestroyed; - - GDIMetaFile maCurPageMetaFile; - long mnMaxBmpDPIX; - long mnMaxBmpDPIY; - ULONG mnRestoreDrawMode; - int mnCurCopyCount; - - DECL_LINK( ImplPrintHdl, Timer* ); - - ~ImplQPrinter(); - - void ImplPrintMtf( GDIMetaFile& rMtf, long nMaxBmpDPIX, long nMaxBmpDPIY ); - - ImplQPrinter( const ImplQPrinter& rPrinter ); - Printer& operator =( const ImplQPrinter& rPrinter ); - - void PrePrintPage( QueuePage* ); - void PostPrintPage(); - -public: - - ImplQPrinter( Printer* pParent ); - void Destroy(); - - void StartQueuePrint(); - void EndQueuePrint(); - void AbortQueuePrint(); - void AddQueuePage( GDIMetaFile* pPage, USHORT nPage, BOOL bNewJobSetup ); - - bool IsUserCopy() const { return mbUserCopy; } - void SetUserCopy( bool bSet ) { mbUserCopy = bSet; } - - /** - used by pull implementation to emit the next page - */ - void PrintPage( unsigned int nPage ); - /** - used by pull implementation to get the number of physical pages - (that is how often PrintNextPage should be called) - */ - ULONG GetPrintPageCount() const; - - /** - used by pull implementation to get ranges of physical pages that - are to be printed on the same paper. If bIncludeOrientationChanges is true - then orientation changes will not break a page run; the implementation has - to rotate the page contents accordingly in that case. - - The returned vector contains all pages indices beginning a new medium and additionally - the index that of the last page+1 (for convenience, so the length of a range - is always v[i+1] - v[i]) - - Example: 5 pages, all A4 - return: [0 5] - - Example: 6 pages, beginning A4, switching tol A5 on fourth page, back to A4 on fifth page - return [0 3 4 6] - - returns an false in push model (error condition) - */ - bool GetPaperRanges( std::vector< ULONG >& o_rRanges, bool i_bIncludeOrientationChanges ) const; - - /** - get the jobsetup for a page - */ - ImplJobSetup* GetPageSetup( unsigned int nPage ) const; -}; - -#endif // _SV_IMPPRN_HXX diff --git a/vcl/inc/vcl/jobset.h b/vcl/inc/vcl/jobset.h deleted file mode 100644 index 2a8be4a6999e..000000000000 --- a/vcl/inc/vcl/jobset.h +++ /dev/null @@ -1,79 +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 _SV_JOBSET_H -#define _SV_JOBSET_H - -#include -#include -#include -#include -#include - -// ------------------ -// - JobSetup-Types - -// ------------------ - -// see com.sun.star.portal.client.JobSetupSystem.idl: -#define JOBSETUP_SYSTEM_DONTKNOW 0 -#define JOBSETUP_SYSTEM_WINDOWS 1 -#define JOBSETUP_SYSTEM_OS2 2 -#define JOBSETUP_SYSTEM_UNIX 3 -#define JOBSETUP_SYSTEM_MAC 4 -#define JOBSETUP_SYSTEM_JAVA 5 - -// ---------------- -// - ImplJobSetup - -// ---------------- - -struct ImplJobSetup -{ - USHORT mnRefCount; // RefCount (only independ data) - USHORT mnSystem; // Sytem - JOBSETUP_SYSTEM_xxxx - String maPrinterName; // Printer-Name - String maDriver; // Driver-Name - Orientation meOrientation; // Orientation - DuplexMode meDuplexMode; // Duplex - USHORT mnPaperBin; // paper bin / in tray - Paper mePaperFormat; // paper format - long mnPaperWidth; // paper width (100th mm) - long mnPaperHeight; // paper height (100th mm) - ULONG mnDriverDataLen; // length of system specific data - BYTE* mpDriverData; // system specific data (will be streamed a byte block) - ::std::hash_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash > maValueMap; - - ImplJobSetup(); - ImplJobSetup( const ImplJobSetup& rJobSetup ); - ~ImplJobSetup(); -}; - -// Papierformat wird wenn PAPER_USER im unabhaengigen Teil automatisch aus -// Papierbreite/hoehe berechnet -// Papierbreite/hoehe wird wenn 0 im unabhaengigen Teil automatisch aus -// Papierformat berechnet, wenn dieses ungleich PAPER_USER ist - -#endif // _SV_JOBSET_H diff --git a/vcl/inc/vcl/outdata.hxx b/vcl/inc/vcl/outdata.hxx deleted file mode 100644 index 5d2852444767..000000000000 --- a/vcl/inc/vcl/outdata.hxx +++ /dev/null @@ -1,49 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_OUTDATA_HXX -#define _SV_OUTDATA_HXX - -#include -#include -#include - -// ----------------- -// - Hilfemethoden - -// ----------------- - -inline SalColor ImplColorToSal( Color aColor ) -{ - return MAKE_SALCOLOR( aColor.GetRed(), aColor.GetGreen(), aColor.GetBlue() ); -} - -inline int ImplIsColorTransparent( Color aColor ) -{ - return aColor.GetTransparency(); -} - -#endif // _SV_OUTDATA_HXX diff --git a/vcl/inc/vcl/outdev.h b/vcl/inc/vcl/outdev.h deleted file mode 100644 index 43a1e9cf2cea..000000000000 --- a/vcl/inc/vcl/outdev.h +++ /dev/null @@ -1,264 +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 _SV_OUTDEV_H -#define _SV_OUTDEV_H - -#include -#include - -#include -#include -#include - -class Size; -class Font; -class VirtualDevice; -class ImplServerGraphics; -class ImplGetDevFontList; -class GetDevSizeList; - -// ----------------------- -// - ImplDevFontListData - -// ----------------------- - -// flags for mnMatchType member -#define IMPL_DEVFONT_SCALABLE ((ULONG)0x00000001) -#define IMPL_DEVFONT_SYMBOL ((ULONG)0x00000002) -#define IMPL_DEVFONT_NONESYMBOL ((ULONG)0x00000004) -#define IMPL_DEVFONT_LIGHT ((ULONG)0x00000010) -#define IMPL_DEVFONT_BOLD ((ULONG)0x00000020) -#define IMPL_DEVFONT_NORMAL ((ULONG)0x00000040) -#define IMPL_DEVFONT_NONEITALIC ((ULONG)0x00000100) -#define IMPL_DEVFONT_ITALIC ((ULONG)0x00000200) - -// TODO: rename ImplDevFontListData to PhysicalFontFamily -class ImplDevFontListData -{ -public: - ImplDevFontListData( const String& rSearchName ); - ~ImplDevFontListData(); - - const String& GetFamilyName() const { return maName; } - const String& GetSearchName() const { return maSearchName; } - const String& GetAliasNames() const { return maMapNames; } - bool IsScalable() const { return mpFirst->IsScalable(); } - int GetMinQuality() const { return mnMinQuality; } - - bool AddFontFace( ImplFontData* ); - void InitMatchData( const utl::FontSubstConfiguration&, - const String& rSearchName ); - ImplFontData* FindBestFontFace( const ImplFontSelectData& rFSD ) const; - - void GetFontHeights( std::set& rHeights ) const; - void UpdateDevFontList( ImplGetDevFontList& ) const; - void UpdateCloneFontList( ImplDevFontList&, - bool bScalable, bool bEmbeddable ) const; - -private: -friend class ImplDevFontList; // TODO: remove soon - ImplFontData* mpFirst; // linked list of physical font faces - String maName; // Fontname (original font family name) - String maSearchName; // normalized font family name - String maMapNames; // fontname aliases - ULONG mnTypeFaces; // Typeface Flags - ULONG mnMatchType; // MATCH - Type - String maMatchFamilyName; // MATCH - FamilyName - FontWeight meMatchWeight; // MATCH - Weight - FontWidth meMatchWidth; // MATCH - Width - FontFamily meFamily; - FontPitch mePitch; - int mnMinQuality; // quality of the worst font face -}; - - -// ---------------------- -// - ImplGetDevFontList - -// ---------------------- - -// an ImplGetDevFontList is created by an ImplDevFontList -// it becomes invalid when original ImplDevFontList is modified -class ImplGetDevFontList -{ -private: - std::vector maDevFontVector; - -public: - ImplGetDevFontList() { maDevFontVector.reserve(1024); } - void Add( ImplFontData* pFace ) { maDevFontVector.push_back( pFace ); } - ImplFontData* Get( int nIndex ) const { return maDevFontVector[ nIndex ]; } - int Count() const { return maDevFontVector.size(); } -}; - -// ---------------------- -// - ImplGetDevSizeList - -// ---------------------- - -class ImplGetDevSizeList -{ -private: - String maFontName; - std::vector maSizeList; - -public: - ImplGetDevSizeList( const String& rFontName ) - : maFontName( rFontName ) { maSizeList.reserve( 32 ); } - void Add( int nHeight ) { maSizeList.push_back( nHeight ); } - int Count() const { return maSizeList.size(); } - int Get( int nIndex ) const { return maSizeList[ nIndex ]; } - const String& GetFontName() const { return maFontName; } -}; - -// ------------------------ -// - ImplFontSubstitution - -// ------------------------ -// nowadays these substitutions are needed for backward compatibility and tight platform integration: -// - substitutions from configuration entries (Tools->Options->FontReplacement and/or fontconfig) -// - device specific substitutions (e.g. for PS printer builtin fonts) -// - substitutions for missing fonts defined by configuration entries (generic and/or platform dependent fallbacks) -// - substitutions for missing fonts defined by multi-token fontnames (e.g. fontname="SpecialFont;FallbackA;FallbackB") -// - substitutions for incomplete fonts (implicit, generic, EUDC and/or platform dependent fallbacks) -// - substitutions for missing symbol fonts by translating code points into other symbol fonts - -class ImplFontSubstitution -{ - // TODO: there is more commonality between the different substitutions -protected: - virtual ~ImplFontSubstitution() {} -}; - -// ImplDirectFontSubstitution is for Tools->Options->FontReplacement and PsPrinter substitutions -// The clss is just a simple port of the unmaintainable manual-linked-list based mechanism -// TODO: get rid of this class when the Tools->Options->FontReplacement tabpage is gone for good - -struct ImplFontSubstEntry -{ - String maName; - String maReplaceName; - String maSearchName; - String maSearchReplaceName; - USHORT mnFlags; - - ImplFontSubstEntry( const String& rFontName, const String& rSubstFontName, USHORT nSubstFlags ); -}; - -class ImplDirectFontSubstitution -: public ImplFontSubstitution -{ -private: - typedef std::list FontSubstList; - FontSubstList maFontSubstList; -public: - void AddFontSubstitute( const String& rFontName, const String& rSubstName, USHORT nFlags ); - void RemoveFontSubstitute( int nIndex ); - bool GetFontSubstitute( int nIndex, String& rFontName, String& rSubstName, USHORT& rFlags ) const; - int GetFontSubstituteCount() const { return maFontSubstList.size(); }; - bool Empty() const { return maFontSubstList.empty(); } - void Clear() { maFontSubstList.clear(); } - - bool FindFontSubstitute( String& rSubstName, const String& rFontName, USHORT nFlags ) const; -}; - -// PreMatchFontSubstitution -// abstracts the concept of a configured font substitution -// before the availability of the originally selected font has been checked -class ImplPreMatchFontSubstitution -: public ImplFontSubstitution -{ -public: - virtual bool FindFontSubstitute( ImplFontSelectData& ) const = 0; -}; - -// ImplGlyphFallbackFontSubstitution -// abstracts the concept of finding the best font to support an incomplete font -class ImplGlyphFallbackFontSubstitution -: public ImplFontSubstitution -{ -public: - virtual bool FindFontSubstitute( ImplFontSelectData&, rtl::OUString& rMissingCodes ) const = 0; -}; - -// ----------------- -// - ImplFontCache - -// ----------------- -// TODO: closely couple with ImplDevFontList - -class ImplFontCache -{ -private: - ImplFontEntry* mpFirstEntry; - int mnRef0Count; // number of unreferenced ImplFontEntries - bool mbPrinter; - - // cache of recently used font instances - struct IFSD_Equal { bool operator()( const ImplFontSelectData&, const ImplFontSelectData& ) const; }; - struct IFSD_Hash { size_t operator()( const ImplFontSelectData& ) const; }; - typedef ::std::hash_map FontInstanceList; - FontInstanceList maFontInstanceList; - - // cache of recently requested font names vs. selected font names - typedef ::std::hash_map FontNameList; - FontNameList maFontNameList; - -public: - ImplFontCache( bool bPrinter ); - ~ImplFontCache(); - - ImplFontEntry* GetFontEntry( ImplDevFontList*, - const Font&, const Size& rPixelSize, float fExactHeight, - ImplDirectFontSubstitution* pDevSpecific ); - ImplFontEntry* GetFontEntry( ImplDevFontList*, - ImplFontSelectData&, ImplDirectFontSubstitution* pDevSpecific ); - ImplFontEntry* GetGlyphFallbackFont( ImplDevFontList*, ImplFontSelectData&, - int nFallbackLevel, rtl::OUString& rMissingCodes ); - void Release( ImplFontEntry* ); - void Invalidate(); -}; - -// ------------------ -// - ImplOutDevData - -// ------------------ - -namespace vcl { struct ControlLayoutData; } -// #i75163# -namespace basegfx { class B2DHomMatrix; } - -struct ImplOutDevData -{ - VirtualDevice* mpRotateDev; - vcl::ControlLayoutData* mpRecordLayout; - Rectangle maRecordRect; - ImplDirectFontSubstitution maDevFontSubst; - - // #i75163# - basegfx::B2DHomMatrix* mpViewTransform; - basegfx::B2DHomMatrix* mpInverseViewTransform; -}; - -void ImplFreeOutDevFontData(); - -#endif // _SV_OUTDEV_H diff --git a/vcl/inc/vcl/outfont.hxx b/vcl/inc/vcl/outfont.hxx deleted file mode 100644 index 7ad233449d93..000000000000 --- a/vcl/inc/vcl/outfont.hxx +++ /dev/null @@ -1,406 +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 _SV_OUTFONT_HXX -#define _SV_OUTFONT_HXX - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -class ImplDevFontListData; -class ImplGetDevFontList; -class ImplGetDevSizeList; -class ImplFontEntry; -class ImplDirectFontSubstitution; -class ImplPreMatchFontSubstitution; -class ImplGlyphFallbackFontSubstitution; -class ImplFontSelectData; -class Font; -class ConvertChar; -struct FontMatchStatus; -class OutputDevice; - -namespace com { namespace sun { namespace star { namespace lang { struct Locale; }}}} - -// ---------------------- -// - ImplFontAttributes - -// ---------------------- -// device independent font properties - -class ImplFontAttributes -{ -public: // TODO: create matching interface class - const String& GetFamilyName() const { return maName; } - const String& GetStyleName() const { return maStyleName; } - FontWeight GetWeight() const { return meWeight; } - FontItalic GetSlant() const { return meItalic; } - FontFamily GetFamilyType() const { return meFamily; } - FontPitch GetPitch() const { return mePitch; } - FontWidth GetWidthType() const { return meWidthType; } - bool IsSymbolFont() const { return mbSymbolFlag; } - -public: // TODO: hide members behind accessor methods - String maName; // Font Family Name - String maStyleName; // Font Style Name - FontWeight meWeight; // Weight Type - FontItalic meItalic; // Slant Type - FontFamily meFamily; // Family Type - FontPitch mePitch; // Pitch Type - FontWidth meWidthType; // Width Type - bool mbSymbolFlag; -}; - -// ------------------------- -// - ImplDevFontAttributes - -// ------------------------- -// device dependent font properties - -class ImplDevFontAttributes : public ImplFontAttributes -{ -public: // TODO: create matching interface class - const String& GetAliasNames() const { return maMapNames; } - int GetQuality() const { return mnQuality; } - bool IsRotatable() const { return mbOrientation; } - bool IsDeviceFont() const { return mbDevice; } - bool IsEmbeddable() const { return mbEmbeddable; } - bool IsSubsettable() const { return mbSubsettable; } - -public: // TODO: hide members behind accessor methods - String maMapNames; // List of family name aliass separated with ';' - int mnQuality; // Quality (used when similar fonts compete) - bool mbOrientation; // true: physical font can be rotated - bool mbDevice; // true: built in font - bool mbSubsettable; // true: a subset of the font can be created - bool mbEmbeddable; // true: the font can be embedded -}; - -// ---------------- -// - ImplFontData - -// ---------------- -// TODO: rename ImplFontData to PhysicalFontFace -// TODO: no more direct access to members -// TODO: add reference counting -// TODO: get rid of height/width for scalable fonts -// TODO: make cloning cheaper - -// abstract base class for physical font faces -class VCL_DLLPUBLIC ImplFontData : public ImplDevFontAttributes -{ -public: - // by using an ImplFontData object as a factory for its corresponding - // ImplFontEntry an ImplFontEntry can be extended to cache device and - // font instance specific data - virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const = 0; - - virtual int GetHeight() const { return mnHeight; } - virtual int GetWidth() const { return mnWidth; } - virtual sal_IntPtr GetFontId() const = 0; - int GetFontMagic() const { return mnMagic; } - bool IsScalable() const { return (mnHeight == 0); } - bool CheckMagic( int n ) const { return (n == mnMagic); } - ImplFontData* GetNextFace() const { return mpNext; } - ImplFontData* CreateAlias() const { return Clone(); } - - bool IsBetterMatch( const ImplFontSelectData&, FontMatchStatus& ) const; - StringCompare CompareWithSize( const ImplFontData& ) const; - StringCompare CompareIgnoreSize( const ImplFontData& ) const; - virtual ~ImplFontData() {} - virtual ImplFontData* Clone() const = 0; - -protected: - explicit ImplFontData( const ImplDevFontAttributes&, int nMagic ); - void SetBitmapSize( int nW, int nH ) { mnWidth=nW; mnHeight=nH; } - - long mnWidth; // Width (in pixels) - long mnHeight; // Height (in pixels) - -private: -friend class ImplDevFontListData; - const int mnMagic; // poor man's RTTI - ImplFontData* mpNext; -}; - -// ---------------------- -// - ImplFontSelectData - -// ---------------------- - -class ImplFontSelectData : public ImplFontAttributes -{ -public: - ImplFontSelectData( const Font&, const String& rSearchName, - const Size&, float fExactHeight ); - ImplFontSelectData( const ImplFontData&, const Size&, - float fExactHeight, int nOrientation, bool bVertical ); - -public: // TODO: change to private - String maTargetName; // name of the font name token that is chosen - String maSearchName; // name of the font that matches best - int mnWidth; // width of font in pixel units - int mnHeight; // height of font in pixel units - float mfExactHeight; // requested height (in pixels with subpixel details) - int mnOrientation; // text orientation in 3600 system - LanguageType meLanguage; // text language - bool mbVertical; // vertical mode of requested font - bool mbNonAntialiased; // true if antialiasing is disabled - - const ImplFontData* mpFontData; // a matching ImplFontData object - ImplFontEntry* mpFontEntry; // pointer to the resulting FontCache entry -}; - -// ------------------- -// - ImplDevFontList - -// ------------------- -// TODO: merge with ImplFontCache -// TODO: rename to LogicalFontManager - -class VCL_DLLPUBLIC ImplDevFontList -{ -private: - friend class WinGlyphFallbackSubstititution; - mutable bool mbMatchData; // true if matching attributes are initialized - bool mbMapNames; // true if MapNames are available - - typedef std::hash_map DevFontList; - DevFontList maDevFontList; - - ImplPreMatchFontSubstitution* mpPreMatchHook; // device specific prematch substitution - ImplGlyphFallbackFontSubstitution* mpFallbackHook; // device specific glyh fallback substitution - -public: - explicit ImplDevFontList(); - virtual ~ImplDevFontList(); - - // fill the list with device fonts - void Add( ImplFontData* ); - void Clear(); - int Count() const { return maDevFontList.size(); } - - // find the device font - ImplDevFontListData* FindFontFamily( const String& rFontName ) const; - ImplDevFontListData* ImplFindByFont( ImplFontSelectData&, bool bPrinter, ImplDirectFontSubstitution* ) const; - ImplDevFontListData* ImplFindBySearchName( const String& ) const; - - // suggest fonts for glyph fallback - ImplDevFontListData* GetGlyphFallbackFont( ImplFontSelectData&, - rtl::OUString& rMissingCodes, int nFallbackLevel ) const; - - // prepare platform specific font substitutions - void SetPreMatchHook( ImplPreMatchFontSubstitution* ); - void SetFallbackHook( ImplGlyphFallbackFontSubstitution* ); - - // misc utilities - ImplDevFontList* Clone( bool bScalable, bool bEmbeddable ) const; - ImplGetDevFontList* GetDevFontList() const; - ImplGetDevSizeList* GetDevSizeList( const String& rFontName ) const; - - //used by 2-level font fallback - ImplDevFontListData* ImplFindByLocale( com::sun::star::lang::Locale& ) const; - -protected: - void InitMatchData() const; - bool AreMapNamesAvailable() const { return mbMapNames; } - - ImplDevFontListData* ImplFindByTokenNames( const String& ) const; - ImplDevFontListData* ImplFindByAliasName( const String& rSearchName, const String& rShortName ) const; - ImplDevFontListData* ImplFindBySubstFontAttr( const utl::FontNameAttr& ) const; - ImplDevFontListData* ImplFindByAttributes( ULONG nSearchType, FontWeight, FontWidth, - FontFamily, FontItalic, const String& rSearchFamily ) const; - ImplDevFontListData* FindDefaultFont() const; - -private: - void InitGenericGlyphFallback() const; - mutable ImplDevFontListData** mpFallbackList; - mutable int mnFallbackCount; -}; - -// -------------------- -// - ImplKernPairData - -// -------------------- -// TODO: get rid of ImplKernPairData and use outdev.hxx's KerningPair struct -// the problem is that outdev.hxx is too high level for the device layers -// and outdev.hxx's customers depend on KerningPair being defined there - -struct ImplKernPairData -{ - USHORT mnChar1; - USHORT mnChar2; - long mnKern; -}; - - -// ----------------------- -// - ImplFontMetricData - -// ----------------------- - -class ImplFontMetricData : public ImplFontAttributes -{ -public: - explicit ImplFontMetricData( const ImplFontSelectData& ); - void ImplInitTextLineSize( const OutputDevice* pDev ); - void ImplInitAboveTextLineSize(); - -public: // TODO: hide members behind accessor methods - // font instance attributes from the font request - long mnWidth; // Reference Width - short mnOrientation; // Rotation in 1/10 degrees - - // font metrics measured for the font instance - long mnAscent; // Ascent - long mnDescent; // Descent - long mnIntLeading; // Internal Leading - long mnExtLeading; // External Leading - int mnSlant; // Slant (Italic/Oblique) - long mnMinKashida; // Minimal width of kashida (Arabic) - - // font attributes queried from the font instance - int meFamilyType; // Font Family Type - bool mbDevice; // Flag for Device Fonts - bool mbScalableFont; - bool mbKernableFont; - - // font metrics that are usually derived from the measurements - long mnUnderlineSize; // Lineheight of Underline - long mnUnderlineOffset; // Offset from Underline to Baseline - long mnBUnderlineSize; // Hoehe von fetter Unterstreichung - long mnBUnderlineOffset; // Offset von fetter Unterstreichung zur Baseline - long mnDUnderlineSize; // Hoehe von doppelter Unterstreichung - long mnDUnderlineOffset1; // Offset von doppelter Unterstreichung zur Baseline - long mnDUnderlineOffset2; // Offset von doppelter Unterstreichung zur Baseline - long mnWUnderlineSize; // Hoehe von WaveLine-Unterstreichung - long mnWUnderlineOffset; // Offset von WaveLine-Unterstreichung zur Baseline, jedoch zentriert zur WaveLine - long mnAboveUnderlineSize; // Hoehe von einfacher Unterstreichung (for Vertical Right) - long mnAboveUnderlineOffset; // Offset von einfacher Unterstreichung zur Baseline (for Vertical Right) - long mnAboveBUnderlineSize; // Hoehe von fetter Unterstreichung (for Vertical Right) - long mnAboveBUnderlineOffset; // Offset von fetter Unterstreichung zur Baseline (for Vertical Right) - long mnAboveDUnderlineSize; // Hoehe von doppelter Unterstreichung (for Vertical Right) - long mnAboveDUnderlineOffset1; // Offset von doppelter Unterstreichung zur Baseline (for Vertical Right) - long mnAboveDUnderlineOffset2; // Offset von doppelter Unterstreichung zur Baseline (for Vertical Right) - long mnAboveWUnderlineSize; // Hoehe von WaveLine-Unterstreichung (for Vertical Right) - long mnAboveWUnderlineOffset; // Offset von WaveLine-Unterstreichung zur Baseline, jedoch zentriert zur WaveLine (for Vertical Right) - long mnStrikeoutSize; // Hoehe von einfacher Durchstreichung - long mnStrikeoutOffset; // Offset von einfacher Durchstreichung zur Baseline - long mnBStrikeoutSize; // Hoehe von fetter Durchstreichung - long mnBStrikeoutOffset; // Offset von fetter Durchstreichung zur Baseline - long mnDStrikeoutSize; // Hoehe von doppelter Durchstreichung - long mnDStrikeoutOffset1; // Offset von doppelter Durchstreichung zur Baseline - long mnDStrikeoutOffset2; // Offset von doppelter Durchstreichung zur Baseline -}; - -// ----------------- -// - ImplFontEntry - -// ------------------ -// TODO: rename ImplFontEntry to LogicalFontInstance -// TODO: allow sharing of metrics for related fonts - -class VCL_DLLPUBLIC ImplFontEntry -{ -public: - explicit ImplFontEntry( const ImplFontSelectData& ); - virtual ~ImplFontEntry(); - -public: // TODO: make data members private - ImplFontSelectData maFontSelData; // FontSelectionData - ImplFontMetricData maMetric; // Font Metric - const ConvertChar* mpConversion; // used e.g. for StarBats->StarSymbol - long mnLineHeight; - ULONG mnRefCount; - USHORT mnSetFontFlags; // Flags returned by SalGraphics::SetFont() - short mnOwnOrientation; // text angle if lower layers don't rotate text themselves - short mnOrientation; // text angle in 3600 system - bool mbInit; // true if maMetric member is valid - - void AddFallbackForUnicode( sal_UCS4, FontWeight eWeight, const String& rFontName ); - bool GetFallbackForUnicode( sal_UCS4, FontWeight eWeight, String* pFontName ) const; - void IgnoreFallbackForUnicode( sal_UCS4, FontWeight eWeight, const String& rFontName ); - -private: - // cache of Unicode characters and replacement font names - // TODO: a fallback map can be shared with many other ImplFontEntries - // TODO: at least the ones which just differ in orientation, stretching or height - typedef ::std::pair GFBCacheKey; - struct GFBCacheKey_Hash{ size_t operator()( const GFBCacheKey& ) const; }; - typedef ::std::hash_map UnicodeFallbackList; - UnicodeFallbackList* mpUnicodeFallbackList; -}; - - -class ImplTextLineInfo -{ -private: - long mnWidth; - xub_StrLen mnIndex; - xub_StrLen mnLen; - -public: - ImplTextLineInfo( long nWidth, xub_StrLen nIndex, xub_StrLen nLen ) - { - mnWidth = nWidth; - mnIndex = nIndex; - mnLen = nLen; - } - - long GetWidth() const { return mnWidth; } - xub_StrLen GetIndex() const { return mnIndex; } - xub_StrLen GetLen() const { return mnLen; } -}; - -#define MULTITEXTLINEINFO_RESIZE 16 -typedef ImplTextLineInfo* PImplTextLineInfo; - -class ImplMultiTextLineInfo -{ -private: - PImplTextLineInfo* mpLines; - xub_StrLen mnLines; - xub_StrLen mnSize; - -public: - ImplMultiTextLineInfo(); - ~ImplMultiTextLineInfo(); - - void AddLine( ImplTextLineInfo* pLine ); - void Clear(); - - ImplTextLineInfo* GetLine( USHORT nLine ) const - { return mpLines[nLine]; } - xub_StrLen Count() const { return mnLines; } - -private: - ImplMultiTextLineInfo( const ImplMultiTextLineInfo& ); - ImplMultiTextLineInfo& operator=( const ImplMultiTextLineInfo& ); -}; - -#endif // _SV_OUTFONT_HXX - diff --git a/vcl/inc/vcl/polyscan.hxx b/vcl/inc/vcl/polyscan.hxx deleted file mode 100644 index 1c699e36623d..000000000000 --- a/vcl/inc/vcl/polyscan.hxx +++ /dev/null @@ -1,155 +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 _SV_POLYSCAN_HXX -#define _SV_POLYSCAN_HXX - -#include - -// ----------------- -// - ScanlinePoint - -// ----------------- - -struct ScanlinePoint -{ - long mnX; - ScanlinePoint* mpNext; - - ScanlinePoint() : mnX( 0L ), mpNext( NULL ) {}; - ScanlinePoint( long nX, ScanlinePoint* pNext ) : mnX( nX ), mpNext( pNext ) {}; - ~ScanlinePoint() {}; - - void Set( long nX, ScanlinePoint* pNext ) { mnX = nX, mpNext = pNext; } -}; - -// ------------------- -// - PolyScanSegment - -// ------------------- - -struct PolyScanSegment -{ - long mnStart; - long mnEnd; - - PolyScanSegment() : mnStart( 0L ), mnEnd( 0L ) {}; - PolyScanSegment( long nStart, long nEnd ) : mnStart( nStart ), mnEnd( nEnd ) {}; - ~PolyScanSegment() {}; -}; - -// ---------------- -// - PolyScanline - -// ---------------- - -struct ScanlinePoint; -class Polygon; -class PolyPolygon; - -class PolyScanline -{ -private: - - ScanlinePoint* mpFirst; - ScanlinePoint* mpLast; - ScanlinePoint* mpAct; - long mnLeft; - long mnRight; - - void ImplDelete(); - -public: - - PolyScanline(); - ~PolyScanline(); - - void Insert( long nX ); - void Set( long nStart, long nEnd ); - void Set( const PolyScanSegment& rSegment ) { Set( rSegment.mnStart, rSegment.mnEnd ); } - - inline BOOL GetFirstX( long& rX ); - inline BOOL GetNextX( long& rX ); - - BOOL GetFirstSegment( PolyScanSegment& rSegment ); - BOOL GetNextSegment( PolyScanSegment& rSegment ); -}; - -// ------------------------------------------------------------------------ - -inline BOOL PolyScanline::GetFirstX( long& rX ) -{ - mpAct = mpFirst; - return( mpAct ? ( rX = mpAct->mnX, mpAct = mpAct->mpNext, TRUE ) : FALSE ); -} - -// ------------------------------------------------------------------------ - -inline BOOL PolyScanline::GetNextX( long& rX ) -{ - return( mpAct ? ( rX = mpAct->mnX, mpAct = mpAct->mpNext, TRUE ) : FALSE ); -} - -// --------------- -// - PolyScanner - -// --------------- - -class PolyScanner -{ -private: - - PolyScanline* mpArray; - long mnLeft; - long mnTop; - long mnRight; - long mnBottom; - - PolyScanner() {}; - -protected: - - void InsertLine( const Point& rStart, const Point& rEnd ); - -public: - - PolyScanner( const Rectangle& rRect ); - PolyScanner( const Polygon& rPoly ); - PolyScanner( const PolyPolygon& rPolyPoly ); - ~PolyScanner(); - - long Left() const { return mnLeft; } - long Top() const { return mnTop; } - long Right() const { return mnRight; } - long Bottom() const { return mnBottom; } - - long Width() const { return( mnRight - mnLeft + 1L ); } - long Height() const { return( mnBottom - mnTop + 1L ); } - - Rectangle GetBoundRect() const { return Rectangle( mnLeft, mnTop, mnRight, mnBottom ); } - - ULONG Count() const { return Height(); } - PolyScanline* operator[]( ULONG nPos ) const; -}; - -#endif // _SV_POLYSCAN_HXX diff --git a/vcl/inc/vcl/print.h b/vcl/inc/vcl/print.h deleted file mode 100644 index 78c1bb647575..000000000000 --- a/vcl/inc/vcl/print.h +++ /dev/null @@ -1,81 +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 _SV_PRINT_H -#define _SV_PRINT_H - -#include "vcl/sv.h" -#include "vcl/dllapi.h" - -#include -#include - -struct SalPrinterQueueInfo; -class QueueInfo; -class JobSetup; - -namespace vcl -{ class PrinterListener; } - -// -------------------- -// - ImplPrnQueueData - -// -------------------- - -struct ImplPrnQueueData -{ - QueueInfo* mpQueueInfo; - SalPrinterQueueInfo* mpSalQueueInfo; -}; - -// -------------------- -// - ImplPrnQueueList - -// -------------------- - -class VCL_DLLPUBLIC ImplPrnQueueList -{ -public: - std::hash_map< rtl::OUString, sal_Int32, rtl::OUStringHash > - m_aNameToIndex; - std::vector< ImplPrnQueueData > m_aQueueInfos; - std::vector< rtl::OUString > m_aPrinterList; - - ImplPrnQueueList() {} - ~ImplPrnQueueList(); - - void Add( SalPrinterQueueInfo* pData ); - ImplPrnQueueData* Get( const rtl::OUString& rPrinter ); -}; - -// -------------- -// - Prototypes - -// -------------- - -void ImplDeletePrnQueueList(); -void SAL_DLLPRIVATE ImplUpdateJobSetupPaper( JobSetup& rJobSetup ); - - -#endif // _SV_PRINT_H diff --git a/vcl/inc/vcl/printergfx.hxx b/vcl/inc/vcl/printergfx.hxx deleted file mode 100644 index 790021ae3adc..000000000000 --- a/vcl/inc/vcl/printergfx.hxx +++ /dev/null @@ -1,442 +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 _PSPRINT_PRINTERGFX_HXX_ -#define _PSPRINT_PRINTERGFX_HXX_ - -#include "vcl/helper.hxx" -#include "vcl/sallayout.hxx" -#include "osl/file.hxx" -#include "tools/gen.hxx" - -#include -#include - -namespace psp { - -// forwards -class JobData; - -/* - * lightweight container to handle RGB values - */ - -class PrinterColor -{ -public: - - enum ColorSpace { eInvalid, eRGB }; - -private: - - sal_uInt8 mnRed; - sal_uInt8 mnGreen; - sal_uInt8 mnBlue; - ColorSpace meColorspace; - -public: - - PrinterColor () : - meColorspace(eInvalid) - {} - PrinterColor (sal_uInt16 nRed, sal_uInt16 nGreen, - sal_uInt16 nBlue) : - mnRed (nRed), - mnGreen (nGreen), - mnBlue (nBlue), - meColorspace (eRGB) - {} - PrinterColor (sal_uInt32 nRGB) : - mnRed ((nRGB & 0x00ff0000) >> 16), - mnGreen ((nRGB & 0x0000ff00) >> 8), - mnBlue ((nRGB & 0x000000ff) ), - meColorspace (eRGB) - {} - ~PrinterColor () - {} - - sal_Bool Is () const - { return meColorspace != eInvalid; } - - ColorSpace GetColorSpace () const - { return meColorspace; } - sal_uInt16 GetRed () const - { return mnRed; } - sal_uInt16 GetGreen () const - { return mnGreen; } - sal_uInt16 GetBlue () const - { return mnBlue; } - sal_Bool operator== (const PrinterColor& aColor) const - { - return aColor.Is() && this->Is() - && mnRed == aColor.mnRed - && mnGreen == aColor.mnGreen - && mnBlue == aColor.mnBlue; - } - sal_Bool operator!= (const PrinterColor& aColor) const - { return ! (aColor==*this); } - PrinterColor& operator= (const PrinterColor& aColor) - { - meColorspace = aColor.meColorspace; - mnRed = aColor.mnRed; - mnGreen = aColor.mnGreen; - mnBlue = aColor.mnBlue; - - return *this; - } - - PrinterColor& operator= (sal_uInt32 nRGB) - { - meColorspace = eRGB; - mnBlue = (nRGB & 0x000000ff); - mnGreen = (nRGB & 0x0000ff00) >> 8; - mnRed = (nRGB & 0x00ff0000) >> 16; - - return *this; - } -}; - -/* - * forward declarations - */ - -class Font3; -class GlyphSet; -class PrinterJob; -class PrintFontManager; -class KernPair; -struct CharacterMetric; - -/* - * Bitmap Interface, this has to be filled with your actual bitmap implementation - * sample implementations can be found in: - * psprint/workben/cui/pspdem.cxx - * vcl/unx/source/gdi/salgdi2.cxx - */ - -class PrinterBmp -{ -public: - - virtual ~PrinterBmp () = 0; - virtual sal_uInt32 GetPaletteColor (sal_uInt32 nIdx) const = 0; - virtual sal_uInt32 GetPaletteEntryCount () const = 0; - virtual sal_uInt32 GetPixelRGB (sal_uInt32 nRow, sal_uInt32 nColumn) const = 0; - virtual sal_uInt8 GetPixelGray (sal_uInt32 nRow, sal_uInt32 nColumn) const = 0; - virtual sal_uInt8 GetPixelIdx (sal_uInt32 nRow, sal_uInt32 nColumn) const = 0; - virtual sal_uInt32 GetWidth () const = 0; - virtual sal_uInt32 GetHeight () const = 0; - virtual sal_uInt32 GetDepth () const = 0; -}; - -typedef enum { - InvalidType = 0, - TrueColorImage, - MonochromeImage, - PaletteImage, - GrayScaleImage -} ImageType; - -/* - * printer raster operations - */ - -struct GraphicsStatus -{ - rtl::OString maFont; - rtl_TextEncoding maEncoding; - bool mbArtItalic; - bool mbArtBold; - sal_Int32 mnTextHeight; - sal_Int32 mnTextWidth; - PrinterColor maColor; - double mfLineWidth; - - GraphicsStatus(); -}; - -class Font3; - -class PrinterGfx -{ -private: - - /* common settings */ - - double mfScaleX; - double mfScaleY; - - sal_uInt32 mnDpi; - sal_uInt16 mnDepth; - - sal_uInt16 mnPSLevel; - sal_Bool mbColor; - sal_Bool mbUploadPS42Fonts; - - osl::File* mpPageHeader; - osl::File* mpPageBody; - - void TranslateCoordinates (sal_Int32 &rXOut, sal_Int32 &rYOut, - sal_Int32 nXIn, sal_Int32 nYIn ) - { rXOut = nXIn; rYOut = nYIn; } - void TranslateCoordinates (Point& rOut, const Point& rIn) - { rOut = rIn; } - - /* text/font related data, for a type1 font it has to be checked - whether this font has already been downloaded. A TrueType font - will be converted into one or more Type3 fonts, containing glyphs - in no particular order. In addition to the existence of the - glyph in one of the subfonts, the mapping from unicode to the - glyph has to be remembered */ - - std::list< sal_Int32 > maPS1Font; - std::list< GlyphSet > maPS3Font; - - sal_Int32 mnFontID; - sal_Int32 mnFallbackID; - sal_Int32 mnTextAngle; - bool mbTextVertical; - PrintFontManager& mrFontMgr; - - /* bitmap drawing implementation */ - - sal_Bool mbCompressBmp; - - void DrawPS1GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea); - void writePS2ImageHeader (const Rectangle& rArea, psp::ImageType nType); - void writePS2Colorspace (const PrinterBmp& rBitmap, psp::ImageType nType); - void DrawPS2GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea); - void DrawPS2PaletteImage (const PrinterBmp& rBitmap, const Rectangle& rArea); - void DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const Rectangle& rArea); - void DrawPS2MonoImage (const PrinterBmp& rBitmap, const Rectangle& rArea); - - /* clip region */ - - std::list< Rectangle > maClipRegion; - sal_Bool JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it, - Point& aOldPoint, sal_Int32& nColumn ); - - /* color settings */ - PrinterColor maFillColor; - PrinterColor maTextColor; - PrinterColor maLineColor; - - /* graphics state */ - GraphicsStatus maVirtualStatus; - std::list< GraphicsStatus > maGraphicsStack; - GraphicsStatus& currentState() { return maGraphicsStack.front(); } - - /* font / font substitution */ - friend class Font3; - const ::std::hash_map< fontID, fontID >* mpFontSubstitutes; - int getCharWidth (sal_Bool b_vert, sal_Unicode n_char, - CharacterMetric *p_bbox); - fontID getCharMetric (const Font3 &rFont, sal_Unicode n_char, - CharacterMetric *p_bbox); - fontID getFontSubstitute () const; - fontID getFallbackID () const { return mnFallbackID; } - - bool mbStrictSO52Compatibility; -public: - /* grahics status update */ - void PSSetColor (); - void PSSetLineWidth (); - void PSSetFont (); - - /* graphics status functions */ - void PSSetColor (const PrinterColor& rColor) - { maVirtualStatus.maColor = rColor; } - - void PSUploadPS1Font (sal_Int32 nFontID); - void PSSetFont (const rtl::OString& rName, - rtl_TextEncoding nEncoding = RTL_TEXTENCODING_DONTKNOW) - { maVirtualStatus.maFont = rName; maVirtualStatus.maEncoding = nEncoding; } - - /* graphics status stack */ - void PSGSave (); - void PSGRestore (); - - - /* PS helpers */ - enum pspath_t { moveto = 0, lineto = 1 }; - void PSBinLineTo (const Point& rCurrent, Point& rOld, - sal_Int32& nColumn); - void PSBinMoveTo (const Point& rCurrent, Point& rOld, - sal_Int32& nColumn); - void PSBinStartPath (); - void PSBinEndPath (); - void PSBinCurrentPath (sal_uInt32 nPoints, const Point* pPath); - void PSBinPath (const Point& rCurrent, Point& rOld, - pspath_t eType, sal_Int32& nColumn); - - void PSRotate (sal_Int32 nAngle); - void PSTranslate (const Point& rPoint); - void PSMoveTo (const Point& rPoint); - void PSRMoveTo (sal_Int32 nDx, sal_Int32 nDy = 0); - void PSScale (double fScaleX, double fScaleY); - void PSLineTo(const Point& rPoint ); - void PSPointOp (const Point& rPoint, const sal_Char* pOperator); - void PSHexString (const sal_uChar* pString, sal_Int16 nLen); - void PSDeltaArray (const sal_Int32 *pArray, sal_Int16 nEntries); - void PSShowText (const sal_uChar* pString, - sal_Int16 nGlyphs, sal_Int16 nBytes, - const sal_Int32* pDeltaArray = NULL); - void PSComment (const sal_Char* pComment ); - void LicenseWarning (const Point& rPoint, const sal_Unicode* pStr, - sal_Int16 nLen, const sal_Int32* pDeltaArray); - - void OnEndPage (); - void OnEndJob (); - void writeResources( osl::File* pFile, std::list< rtl::OString >& rSuppliedFonts, std::list< rtl::OString >& rNeededFonts ); - PrintFontManager& GetFontMgr () { return mrFontMgr; } - - void drawVerticalizedText (const Point& rPoint, - const sal_Unicode* pStr, - sal_Int16 nLen, - const sal_Int32* pDeltaArray ); - void drawText (const Point& rPoint, - const sal_Unicode* pStr, sal_Int16 nLen, - const sal_Int32* pDeltaArray = NULL); - - void drawGlyphs( const Point& rPoint, - sal_GlyphId* pGlyphIds, - sal_Unicode* pUnicodes, - sal_Int16 nLen, - sal_Int32* pDeltaArray ); -public: - PrinterGfx(); - ~PrinterGfx(); - sal_Bool Init (PrinterJob &rPrinterSpec); - sal_Bool Init (const JobData& rData); - void Clear(); - - // query depth and size - void GetResolution (sal_Int32 &rDpiX, sal_Int32 &rDpiY) const; - sal_uInt16 GetBitCount (); - - // clip region - void ResetClipRegion (); - void BeginSetClipRegion (sal_uInt32); - sal_Bool UnionClipRegion (sal_Int32 nX, sal_Int32 nY, - sal_Int32 nDX, sal_Int32 nDY); - void EndSetClipRegion (); - - // set xy color - void SetLineColor (const PrinterColor& rLineColor = PrinterColor()) - { maLineColor = rLineColor; } - void SetFillColor (const PrinterColor& rFillColor = PrinterColor()) - { maFillColor = rFillColor; } - - // drawing primitives - void DrawPixel (const Point& rPoint, const PrinterColor& rPixelColor); - void DrawPixel (const Point& rPoint) - { DrawPixel (rPoint, maLineColor); } - void DrawLine (const Point& rFrom, const Point& rTo); - void DrawRect (const Rectangle& rRectangle); - void DrawPolyLine (sal_uInt32 nPoints, const Point* pPath ); - void DrawPolygon (sal_uInt32 nPoints, const Point* pPath); - void DrawPolyPolygon (sal_uInt32 nPoly, - const sal_uInt32 *pPolygonSize, - const Point** pPolygonList); - void DrawPolyLineBezier (sal_uInt32 nPoints, - const Point* pPath, - const BYTE* pFlgAry ); - void DrawPolygonBezier (sal_uInt32 nPoints, - const Point* pPath, - const BYTE* pFlgAry); - void DrawPolyPolygonBezier (sal_uInt32 nPoly, - const sal_uInt32* pPoints, - const Point* const* pPtAry, - const BYTE* const* pFlgAry); - - // eps - sal_Bool DrawEPS ( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize); - - // image drawing - void DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc, - const PrinterBmp& rBitmap); - void DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc, - const PrinterBmp& rBitmap, - const PrinterBmp& rTransBitmap); - void DrawMask (const Rectangle& rDest, const Rectangle& rSrc, - const PrinterBmp &rBitmap, PrinterColor& rMaskColor); - - // font and text handling - sal_uInt16 SetFont ( - sal_Int32 nFontID, - sal_Int32 nPointHeight, - sal_Int32 nPointWidth, - sal_Int32 nAngle, - bool bVertical, - bool bArtItalic, - bool bArtBold - ); - sal_uInt16 SetFallbackFont ( sal_Int32 nFontID ); - sal_Int32 GetFontAngle () const - { return mnTextAngle; } - sal_Int32 GetFontID () const - { return mnFontID; } - bool GetFontVertical() const - { return mbTextVertical; } - sal_Int32 GetFontHeight () const - { return maVirtualStatus.mnTextHeight; } - sal_Int32 GetFontWidth () const - { return maVirtualStatus.mnTextWidth; } - bool GetArtificialItalic() const - { return maVirtualStatus.mbArtItalic; } - bool GetArtificialBold() const - { return maVirtualStatus.mbArtBold; } - void DrawText (const Point& rPoint, - const sal_Unicode* pStr, sal_Int16 nLen, - const sal_Int32* pDeltaArray = NULL); - void SetTextColor (PrinterColor& rTextColor) - { maTextColor = rTextColor; } - sal_Int32 GetCharWidth (sal_uInt16 nFrom, sal_uInt16 nTo, - long *pWidthArray); - const ::std::list< KernPair >& getKernPairs( bool bVertical = false ) const; - // advanced font handling - sal_Bool GetGlyphBoundRect (sal_Unicode c, Rectangle& rOutRect); - sal_uInt32 GetGlyphOutline (sal_Unicode c, - sal_uInt16 **ppPolySizes, Point **ppPoints, - sal_uInt8 **ppFlags); - - // for CTL - void DrawGlyphs( const Point& rPoint, - sal_GlyphId* pGlyphIds, - sal_Unicode* pUnicodes, - sal_Int16 nLen, - sal_Int32* pDeltaArray ); - - bool getStrictSO52Compatibility() const; - void setStrictSO52Compatibility( bool ); -}; - -} /* namespace psp */ - - -#endif /* _PSPRINT_PRINTERGFX_HXX_ */ - diff --git a/vcl/inc/vcl/printerjob.hxx b/vcl/inc/vcl/printerjob.hxx deleted file mode 100644 index cdf8745febcc..000000000000 --- a/vcl/inc/vcl/printerjob.hxx +++ /dev/null @@ -1,149 +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 _PSPRINT_PRINTERJOB_HXX_ -#define _PSPRINT_PRINTERJOB_HXX_ - -#include "vcl/jobdata.hxx" -#include "osl/file.hxx" -#include "rtl/string.hxx" - -#include - -namespace psp { - -// forward declarations -class PrinterGfx; - - -class PrinterJob -{ -private: // private data - - rtl::OUString maSpoolDirName; - rtl::OUString maFileName; // empty: spool to command, else spool to named file - rtl::OUString maJobTitle; - int mnFileMode; - - osl::File* mpJobHeader; - osl::File* mpJobTrailer; - - std::list< osl::File* > maPageList; - std::list< osl::File* > maHeaderList; - - JobData m_aDocumentJobData; - JobData m_aLastJobData; - PrinterGfx* m_pGraphics; - - sal_uInt32 mnResolution; - - sal_uInt32 mnWidthPt; - sal_uInt32 mnHeightPt; - sal_uInt32 mnMaxWidthPt; - sal_uInt32 mnMaxHeightPt; - - int mnLandscapes; - int mnPortraits; - - sal_uInt32 mnLMarginPt; - sal_uInt32 mnRMarginPt; - sal_uInt32 mnTMarginPt; - sal_uInt32 mnBMarginPt; - - double mfXScale; - double mfYScale; - - sal_Int32 mnErrorCode; - bool m_bQuickJob; - -private: // private methods - - osl::File* CreateSpoolFile (const rtl::OUString& rName, - const rtl::OUString& rExtension); - void InitPaperSize (const JobData& rJobSetup); - - bool writeFeatureList( osl::File* pFile, const JobData&, bool bDocumentSetup ); - bool writeSetup( osl::File* pFile, const JobData& ); - bool writePageSetup( osl::File* pFile, const JobData&, bool bWriteFeatures = true ); - void writeJobPatch( osl::File* File, const JobData& ); - bool writeProlog (osl::File* pFile, const JobData& ); - -public: // for usage in PrinterGfx - - sal_uInt32 GetResolution () const { return mnResolution; } - void GetScale (double &rXScale, double &rYScale) const; - sal_uInt16 GetDepth () const; - sal_uInt16 GetPostscriptLevel (const JobData *pJobData = NULL) const; - sal_Bool IsColorPrinter () const; - - osl::File* GetDocumentHeader (); - osl::File* GetDocumentTrailer (); - osl::File* GetCurrentPageHeader (); - osl::File* GetCurrentPageBody (); - - const ::rtl::OUString& GetPrinterName() const { return m_aLastJobData.m_aPrinterName; } - -public: - PrinterJob (); - ~PrinterJob (); - - /* rFileName: if length is greater than 0 save resulting PostScript - * to named file. - * nMode: only meaningful when saving to file: if nonzero, try - * to impose the mode on the resulting file's inode; for nonexistant - * files use open, for existant files try a chmod - * rJobName: text to appear in the %%Title comment - * rAppName: text to appear in the %%Creator comment - * rSetupData: JobData that apply to this job - * pGraphics: the graphics used to print this job; - * this graphics must live until End/AbortJob has returned - * bIsQuickJob: the job was started as "direct print" meaning - * the quick command for spooling should be used instead - * of the normal command - */ - sal_Bool StartJob (const rtl::OUString& rFileName, - int nMode, - const rtl::OUString& rJobName, - const rtl::OUString& rAppName, - const JobData& rSetupData, - PrinterGfx* pGraphics, - bool bIsQuickJob - ); - sal_Bool EndJob (); - - sal_Bool AbortJob (); - - sal_Bool StartPage (const JobData& rJobSetup); - sal_Bool EndPage (); - - sal_uInt32 GetErrorCode (); -}; - -} /* namespace psp */ - -#endif /* _PSPRINT_PRINTERJOB_HXX_ */ - diff --git a/vcl/inc/vcl/prndlg.hxx b/vcl/inc/vcl/prndlg.hxx deleted file mode 100644 index d21e517d12f7..000000000000 --- a/vcl/inc/vcl/prndlg.hxx +++ /dev/null @@ -1,335 +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 _SV_PRNDLG_HXX -#define _SV_PRNDLG_HXX - -#include - -#include "vcl/print.hxx" -#include "vcl/print.h" - -#include "vcl/dialog.hxx" -#include "vcl/fixed.hxx" -#include "vcl/button.hxx" -#include "vcl/gdimtf.hxx" -#include "vcl/lstbox.hxx" -#include "vcl/field.hxx" -#include "vcl/tabctrl.hxx" -#include "vcl/tabpage.hxx" -#include "vcl/arrange.hxx" -#include "vcl/virdev.hxx" - -#include -#include - -namespace vcl -{ - class PrintDialog : public ModalDialog - { - class PrintPreviewWindow : public Window - { - GDIMetaFile maMtf; - Size maOrigSize; - Size maPreviewSize; - VirtualDevice maPageVDev; - rtl::OUString maReplacementString; - rtl::OUString maToolTipString; - bool mbGreyscale; - FixedLine maHorzDim; - FixedLine maVertDim; - - bool useHCColorReplacement() const; - public: - PrintPreviewWindow( Window* pParent, const ResId& ); - virtual ~PrintPreviewWindow(); - - virtual void Paint( const Rectangle& rRect ); - virtual void Command( const CommandEvent& ); - virtual void Resize(); - virtual void DataChanged( const DataChangedEvent& ); - - void setPreview( const GDIMetaFile&, const Size&, const rtl::OUString&, - sal_Int32 i_nDPIX, sal_Int32 i_nDPIY, - bool i_bGreyscale - ); - }; - - class ShowNupOrderWindow : public Window - { - int mnOrderMode; - int mnRows; - int mnColumns; - void ImplInitSettings(); - public: - ShowNupOrderWindow( Window* pParent ); - virtual ~ShowNupOrderWindow(); - - virtual void Paint( const Rectangle& ); - - void setValues( int i_nOrderMode, int i_nColumns, int i_nRows ) - { - mnOrderMode = i_nOrderMode; - mnRows = i_nRows; - mnColumns = i_nColumns; - Invalidate(); - } - }; - - class NUpTabPage : public TabPage - { - public: - FixedLine maNupLine; - RadioButton maPagesBtn; - RadioButton maBrochureBtn; - FixedText maPagesBoxTitleTxt; - ListBox maNupPagesBox; - - // controls for "Custom" page mode - FixedText maNupNumPagesTxt; - NumericField maNupColEdt; - FixedText maNupTimesTxt; - NumericField maNupRowsEdt; - FixedText maPageMarginTxt1; - MetricField maPageMarginEdt; - FixedText maPageMarginTxt2; - FixedText maSheetMarginTxt1; - MetricField maSheetMarginEdt; - FixedText maSheetMarginTxt2; - FixedText maNupOrientationTxt; - ListBox maNupOrientationBox; - - // page order ("left to right, then down") - FixedText maNupOrderTxt; - ListBox maNupOrderBox; - ShowNupOrderWindow maNupOrderWin; - // border around each page - CheckBox maBorderCB; - - boost::shared_ptr< vcl::RowOrColumn > mxBrochureDep; - boost::shared_ptr< vcl::LabeledElement >mxPagesBtnLabel; - - void setupLayout(); - - NUpTabPage( Window*, const ResId& ); - virtual ~NUpTabPage(); - - void readFromSettings(); - void storeToSettings(); - void initFromMultiPageSetup( const vcl::PrinterController::MultiPageSetup& ); - void enableNupControls( bool bEnable ); - - void showAdvancedControls( bool ); - - // virtual void Resize(); - }; - - class JobTabPage : public TabPage - { - public: - FixedLine maPrinterFL; - ListBox maPrinters; - DisclosureButton maDetailsBtn; - FixedText maStatusLabel; - FixedText maStatusTxt; - FixedText maLocationLabel; - FixedText maLocationTxt; - FixedText maCommentLabel; - FixedText maCommentTxt; - - PushButton maSetupButton; - - FixedLine maCopies; - FixedLine maCopySpacer; - FixedText maCopyCount; - NumericField maCopyCountField; - CheckBox maCollateBox; - FixedImage maCollateImage; - - Image maCollateImg; - Image maCollateHCImg; - Image maNoCollateImg; - Image maNoCollateHCImg; - - long mnCollateUIMode; - - boost::shared_ptr mxPrintRange; - boost::shared_ptr mxDetails; - - JobTabPage( Window*, const ResId& ); - virtual ~JobTabPage(); - - void readFromSettings(); - void storeToSettings(); - - // virtual void Resize(); - - void setupLayout(); - }; - - class OutputOptPage : public TabPage - { - public: - FixedLine maOptionsLine; - CheckBox maToFileBox; - CheckBox maCollateSingleJobsBox; - CheckBox maReverseOrderBox; - - boost::shared_ptr mxOptGroup; - - OutputOptPage( Window*, const ResId& ); - virtual ~OutputOptPage(); - - void readFromSettings(); - void storeToSettings(); - - // virtual void Resize(); - - void setupLayout(); - }; - - OKButton maOKButton; - CancelButton maCancelButton; - HelpButton maHelpButton; - PrintPreviewWindow maPreviewWindow; - NumericField maPageEdit; - FixedText maNumPagesText; - PushButton maBackwardBtn; - PushButton maForwardBtn; - - TabControl maTabCtrl; - NUpTabPage maNUpPage; - JobTabPage maJobPage; - OutputOptPage maOptionsPage; - - FixedLine maButtonLine; - - boost::shared_ptr< PrinterController > maPController; - - rtl::OUString maPageStr; - rtl::OUString maNoPageStr; - sal_Int32 mnCurPage; - sal_Int32 mnCachedPages; - - std::list< Window* > maControls; - std::map< Window*, rtl::OUString > maControlToPropertyMap; - std::map< rtl::OUString, std::vector< Window* > > - maPropertyToWindowMap; - std::map< Window*, sal_Int32 > maControlToNumValMap; - std::set< rtl::OUString > maReverseDependencySet; - - Size maNupPortraitSize; - Size maNupLandscapeSize; - - // internal, used for automatic Nup-Portrait/landscape - Size maFirstPageSize; - - rtl::OUString maPrintToFileText; - rtl::OUString maPrintText; - rtl::OUString maDefPrtText; - - boost::shared_ptr mxPreviewCtrls; - - Size maDetailsCollapsedSize; - Size maDetailsExpandedSize; - - sal_Bool mbShowLayoutPage; - - Size getJobPageSize(); - void updateNup(); - void updateNupFromPages(); - void preparePreview( bool i_bPrintChanged = true, bool i_bMayUseCache = false ); - void setPreviewText( sal_Int32 ); - void updatePrinterText(); - void checkControlDependencies(); - void checkOptionalControlDependencies(); - void makeEnabled( Window* ); - void updateWindowFromProperty( const rtl::OUString& ); - void setupOptionalUI(); - void readFromSettings(); - void storeToSettings(); - com::sun::star::beans::PropertyValue* getValueForWindow( Window* ) const; - - virtual void Resize(); - virtual void Command( const CommandEvent& ); - virtual void DataChanged( const DataChangedEvent& ); - - DECL_LINK( SelectHdl, ListBox* ); - DECL_LINK( ClickHdl, Button* ); - DECL_LINK( ModifyHdl, Edit* ); - DECL_LINK( UIOptionsChanged, void* ); - - DECL_LINK( UIOption_CheckHdl, CheckBox* ); - DECL_LINK( UIOption_RadioHdl, RadioButton* ); - DECL_LINK( UIOption_SelectHdl, ListBox* ); - DECL_LINK( UIOption_ModifyHdl, Edit* ); - - void setupLayout(); - public: - PrintDialog( Window*, const boost::shared_ptr< PrinterController >& ); - virtual ~PrintDialog(); - - bool isPrintToFile(); - int getCopyCount(); - bool isCollate(); - bool isSingleJobs(); - - void previewForward(); - void previewBackward(); - }; - - class PrintProgressDialog : public ModelessDialog - { - String maStr; - FixedText maText; - CancelButton maButton; - - bool mbCanceled; - sal_Int32 mnCur; - sal_Int32 mnMax; - long mnProgressHeight; - Rectangle maProgressRect; - bool mbNativeProgress; - - DECL_LINK( ClickHdl, Button* ); - - void implCalcProgressRect(); - public: - PrintProgressDialog( Window* i_pParent, int i_nMax ); - ~PrintProgressDialog(); - - bool isCanceled() const { return mbCanceled; } - void setProgress( int i_nCurrent, int i_nMax = -1 ); - void tick(); - void reset(); - - virtual void Paint( const Rectangle& ); - }; -} - - -#endif // _SV_PRNDLG_HXX diff --git a/vcl/inc/vcl/region.h b/vcl/inc/vcl/region.h deleted file mode 100644 index b10f0eaf0f0f..000000000000 --- a/vcl/inc/vcl/region.h +++ /dev/null @@ -1,134 +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 _SV_REGION_H -#define _SV_REGION_H - -#include -#include -#include - -// ----------------- -// - Hilfsmethoden - -// ----------------- - -#ifdef DBG_UTIL -const char* ImplDbgTestRegion( const void* pObj ); -#endif - -// -------------------- -// - ImplRegionHandle - -// -------------------- - -struct ImplRegionHandle -{ - Region* mpRegion; - ImplRegionBand* mpCurrRectBand; - ImplRegionBandSep* mpCurrRectBandSep; - BOOL mbFirst; -}; - -// ------------------ -// - ImplRegionInfo - -// ------------------ - -struct ImplRegionInfo -{ - void* mpVoidCurrRectBand; - void* mpVoidCurrRectBandSep; -}; - -// -------------- -// - ImplRegion - -// -------------- - -struct ImplRegionBase -{ -public: - ImplRegionBase( int nCount = 1 ); // TODO: replace manual refcounting - virtual ~ImplRegionBase(); -public: - ULONG mnRefCount; - ULONG mnRectCount; - PolyPolygon* mpPolyPoly; - basegfx::B2DPolyPolygon* mpB2DPolyPoly; -}; - -class ImplRegion : public ImplRegionBase -{ - friend class Region; - -private: - ImplRegionBand* mpFirstBand; // root of the list with y-bands - ImplRegionBand* mpLastCheckedBand; - -public: - ImplRegion(); - ImplRegion( const PolyPolygon& rPolyPoly ); - ImplRegion( const basegfx::B2DPolyPolygon& ); - ImplRegion( const ImplRegion& rImplRegion ); - ~ImplRegion(); - - ImplRegionBand* ImplGetFirstRegionBand() const { return mpFirstBand; } - PolyPolygon* ImplGetPolyPoly() const { return mpPolyPoly; } - - void CreateBandRange( long nYTop, long nYBottom ); - void InsertBands( long nYTop, long nYBottom ); - BOOL InsertSingleBand( ImplRegionBand* mpImplRegionBand, - long nYBandPosition ); - BOOL InsertLine( const Point & rFirstPoint, - const Point & rSecondPoint, - long nLineID ); - BOOL InsertPoint( const Point &rPoint, - long nLineID, - BOOL bEndPoint, LineType eLineType ); - - /** Insert one band either after another band or as the first or only - band. Both the forward as well as the backward links are updated. - @param pPreviousBand - When then pBandToInsert is inserted as first band or as - only band when there are no other bands. - When not then pBandToInsert is inserted directly after - pPreviousBand. - @param pBandToInsert - The band to insert. - */ - void InsertBand (ImplRegionBand* pPreviousBand, - ImplRegionBand* pBandToInsert); - - void Union( long nLeft, long nTop, long nRight, long nBottom ); - void Exclude( long nLeft, long nTop, long nRight, long nBottom ); - void XOr( long nLeft, long nTop, long nRight, long nBottom ); - - // remove emtpy rects - BOOL OptimizeBandList(); - - friend SvStream& operator>>( SvStream& rIStm, Region& rRegion ); - friend SvStream& operator<<( SvStream& rOStm, const Region& rRegion ); -}; - -#endif // _SV_REGION_H diff --git a/vcl/inc/vcl/salbmp.hxx b/vcl/inc/vcl/salbmp.hxx deleted file mode 100644 index 4aca4a9277e9..000000000000 --- a/vcl/inc/vcl/salbmp.hxx +++ /dev/null @@ -1,65 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SALBMP_HXX -#define _SV_SALBMP_HXX - -#ifndef _TL_GEN_HXX -#include -#endif -#include - -struct BitmapBuffer; -class SalGraphics; -class BitmapPalette; -struct BitmapSystemData; - -class VCL_DLLPUBLIC SalBitmap -{ -public: - SalBitmap() {} - virtual ~SalBitmap(); - - virtual bool Create( const Size& rSize, - USHORT nBitCount, - const BitmapPalette& rPal ) = 0; - virtual bool Create( const SalBitmap& rSalBmp ) = 0; - virtual bool Create( const SalBitmap& rSalBmp, - SalGraphics* pGraphics ) = 0; - virtual bool Create( const SalBitmap& rSalBmp, - USHORT nNewBitCount ) = 0; - virtual void Destroy() = 0; - virtual Size GetSize() const = 0; - virtual USHORT GetBitCount() const = 0; - - virtual BitmapBuffer* AcquireBuffer( bool bReadOnly ) = 0; - virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ) = 0; - virtual bool GetSystemData( BitmapSystemData& rData ) = 0; - -}; - -#endif diff --git a/vcl/inc/vcl/saldatabasic.hxx b/vcl/inc/vcl/saldatabasic.hxx deleted file mode 100644 index a40cd045611c..000000000000 --- a/vcl/inc/vcl/saldatabasic.hxx +++ /dev/null @@ -1,59 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SALDATABASIC_HXX -#define _SV_SALDATABASIC_HXX - -#include -#include -#include - -namespace psp -{ - class PrinterInfoManager; -} - -class VCL_DLLPUBLIC SalData -{ -public: - SalInstance* m_pInstance; // pointer to instance - oslModule m_pPlugin; // plugin library handle - psp::PrinterInfoManager* m_pPIManager; - - SalData(); - virtual ~SalData(); - -}; - -// -=-= inlines =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -inline void SetSalData( SalData* pData ) -{ ImplGetSVData()->mpSalData = (void*)pData; } - -inline SalData* GetSalData() -{ return (SalData*)ImplGetSVData()->mpSalData; } - -#endif diff --git a/vcl/inc/vcl/salframe.hxx b/vcl/inc/vcl/salframe.hxx deleted file mode 100644 index d82a2099f315..000000000000 --- a/vcl/inc/vcl/salframe.hxx +++ /dev/null @@ -1,292 +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 _SV_SALFRAME_HXX -#define _SV_SALFRAME_HXX - -#include -#include - -#ifdef __cplusplus - -#ifndef _SV_PTRSTYLE_HXX -#include -#endif -#include - -#endif // __cplusplus -#include -#include -#include -#include - -#ifndef _VCL_IMPDEL_HXX -#include -#endif -#include -#include - -class AllSettings; -class SalGraphics; -class SalBitmap; -class SalMenu; -class Window; - - -struct SalFrameState; -struct SalInputContext; -struct SystemEnvData; - -// ----------------- -// - SalFrameTypes - -// ----------------- - -#define SAL_FRAME_TOTOP_RESTOREWHENMIN ((USHORT)0x0001) -#define SAL_FRAME_TOTOP_FOREGROUNDTASK ((USHORT)0x0002) -#define SAL_FRAME_TOTOP_GRABFOCUS ((USHORT)0x0004) -#define SAL_FRAME_TOTOP_GRABFOCUS_ONLY ((USHORT)0x0008) - -#define SAL_FRAME_ENDEXTTEXTINPUT_COMPLETE ((USHORT)0x0001) -#define SAL_FRAME_ENDEXTTEXTINPUT_CANCEL ((USHORT)0x0002) - - -// ----------------- -// - SalFrameStyle - -// ----------------- - -#define SAL_FRAME_STYLE_DEFAULT ((ULONG)0x00000001) -#define SAL_FRAME_STYLE_MOVEABLE ((ULONG)0x00000002) -#define SAL_FRAME_STYLE_SIZEABLE ((ULONG)0x00000004) -#define SAL_FRAME_STYLE_CLOSEABLE ((ULONG)0x00000008) - -// no shadow effect on WindowsXP -#define SAL_FRAME_STYLE_NOSHADOW ((ULONG)0x00000010) -// indicate tooltip windows, so they can always be topmost -#define SAL_FRAME_STYLE_TOOLTIP ((ULONG)0x00000020) -// windows without windowmanager decoration, this typically only applies to floating windows -#define SAL_FRAME_STYLE_OWNERDRAWDECORATION ((ULONG)0x00000040) -// dialogs -#define SAL_FRAME_STYLE_DIALOG ((ULONG)0x00000080) -// partial fullscreen: fullscreen on one monitor of a multimonitor display -#define SAL_FRAME_STYLE_PARTIAL_FULLSCREEN ((ULONG)0x00800000) -// plugged system child window -#define SAL_FRAME_STYLE_PLUG ((ULONG)0x10000000) -// system child window inside another SalFrame -#define SAL_FRAME_STYLE_SYSTEMCHILD ((ULONG)0x08000000) -// floating window -#define SAL_FRAME_STYLE_FLOAT ((ULONG)0x20000000) -// floating window that needs to be focusable -#define SAL_FRAME_STYLE_FLOAT_FOCUSABLE ((ULONG)0x04000000) -// toolwindows should be painted with a smaller decoration -#define SAL_FRAME_STYLE_TOOLWINDOW ((ULONG)0x40000000) -// the window containing the intro bitmap, aka splashscreen -#define SAL_FRAME_STYLE_INTRO ((ULONG)0x80000000) - -/* -#define SAL_FRAME_STYLE_MINABLE ((ULONG)0x00000008) -#define SAL_FRAME_STYLE_MAXABLE ((ULONG)0x00000010) -#define SAL_FRAME_STYLE_BORDER ((ULONG)0x00000040) -#define SAL_FRAME_STYLE_DOC ((ULONG)0x00004000) -#define SAL_FRAME_STYLE_DIALOG ((ULONG)0x00008000) -#define SAL_FRAME_STYLE_TOOL ((ULONG)0x00010000) -#define SAL_FRAME_STYLE_FULLSIZE ((ULONG)0x00020000) -*/ - -// ---------------------------------------- -// - extended frame style - -// - (sal equivalent to extended WinBits) - -// ---------------------------------------- -typedef sal_uInt64 SalExtStyle; -#define SAL_FRAME_EXT_STYLE_DOCUMENT SalExtStyle(0x00000001) -#define SAL_FRAME_EXT_STYLE_DOCMODIFIED SalExtStyle(0x00000002) - -// ------------------------ -// - Flags for SetPosSize - -// ------------------------ - -#define SAL_FRAME_POSSIZE_X ((USHORT)0x0001) -#define SAL_FRAME_POSSIZE_Y ((USHORT)0x0002) -#define SAL_FRAME_POSSIZE_WIDTH ((USHORT)0x0004) -#define SAL_FRAME_POSSIZE_HEIGHT ((USHORT)0x0008) - -#ifdef __cplusplus - -using namespace rtl; - -// ------------ -// - SalFrame - -// ------------ - -struct SystemParentData; - -class VCL_DLLPUBLIC SalFrame : public vcl::DeletionNotifier -{ - // the VCL window corresponding to this frame - Window* m_pWindow; - SALFRAMEPROC m_pProc; -public: // public for Sal Implementation - SalFrame() : m_pWindow( NULL ), m_pProc( NULL ) {} - virtual ~SalFrame(); - -public: // public for Sal Implementation - SalFrameGeometry maGeometry; - -public: - // SalGraphics or NULL, but two Graphics for all SalFrames - // must be returned - virtual SalGraphics* GetGraphics() = 0; - virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0; - - // Event must be destroyed, when Frame is destroyed - // When Event is called, SalInstance::Yield() must be returned - virtual BOOL PostEvent( void* pData ) = 0; - - virtual void SetTitle( const XubString& rTitle ) = 0; - virtual void SetIcon( USHORT nIcon ) = 0; - virtual void SetRepresentedURL( const rtl::OUString& ); - virtual void SetMenu( SalMenu *pSalMenu ) = 0; - virtual void DrawMenuBar() = 0; - - virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ) = 0; - - // Before the window is visible, a resize event - // must be sent with the correct size - virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE ) = 0; - virtual void Enable( BOOL bEnable ) = 0; - // Set ClientSize and Center the Window to the desktop - // and send/post a resize message - virtual void SetMinClientSize( long nWidth, long nHeight ) = 0; - virtual void SetMaxClientSize( long nWidth, long nHeight ) = 0; - virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ) = 0; - virtual void GetClientSize( long& rWidth, long& rHeight ) = 0; - virtual void GetWorkArea( Rectangle& rRect ) = 0; - virtual SalFrame* GetParent() const = 0; - // Note: x will be mirrored at parent if UI mirroring is active - SalFrameGeometry GetGeometry(); - const SalFrameGeometry& GetUnmirroredGeometry() const { return maGeometry; } - virtual void SetWindowState( const SalFrameState* pState ) = 0; - virtual BOOL GetWindowState( SalFrameState* pState ) = 0; - virtual void ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay ) = 0; - // Enable/Disable ScreenSaver, SystemAgents, ... - virtual void StartPresentation( BOOL bStart ) = 0; - // Show Window over all other Windows - virtual void SetAlwaysOnTop( BOOL bOnTop ) = 0; - - // Window to top and grab focus - virtual void ToTop( USHORT nFlags ) = 0; - - // this function can call with the same - // pointer style - virtual void SetPointer( PointerStyle ePointerStyle ) = 0; - virtual void CaptureMouse( BOOL bMouse ) = 0; - virtual void SetPointerPos( long nX, long nY ) = 0; - - // flush output buffer - virtual void Flush( void) = 0; - virtual void Flush( const Rectangle& ); - // flush output buffer, wait till outstanding operations are done - virtual void Sync() = 0; - - virtual void SetInputContext( SalInputContext* pContext ) = 0; - virtual void EndExtTextInput( USHORT nFlags ) = 0; - - virtual String GetKeyName( USHORT nKeyCode ) = 0; - virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode ) = 0; - - // returns in 'rKeyCode' the single keycode that translates to the given unicode when using a keyboard layout of language 'aLangType' - // returns FALSE if no mapping exists or function not supported - // this is required for advanced menu support - virtual BOOL MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ) = 0; - - // returns the input language used for the last key stroke - // may be LANGUAGE_DONTKNOW if not supported by the OS - virtual LanguageType GetInputLanguage() = 0; - - virtual SalBitmap* SnapShot() = 0; - - virtual void UpdateSettings( AllSettings& rSettings ) = 0; - - virtual void Beep( SoundType eSoundType ) = 0; - - // returns system data (most prominent: window handle) - virtual const SystemEnvData* GetSystemData() const = 0; - - // sets a background bitmap on the frame; the implementation - // must not make assumptions about the lifetime of the passed SalBitmap - // but should copy its contents to an own buffer - virtual void SetBackgroundBitmap( SalBitmap* ) = 0; - - - // get current modifier, button mask and mouse position - struct SalPointerState - { - ULONG mnState; - Point maPos; // in frame coordinates - }; - - virtual SalPointerState GetPointerState() = 0; - - // set new parent window - virtual void SetParent( SalFrame* pNewParent ) = 0; - // reparent window to act as a plugin; implementation - // may choose to use a new system window inetrnally - // return false to indicate failure - virtual bool SetPluginParent( SystemParentData* pNewParent ) = 0; - - // move the frame to a new screen - virtual void SetScreenNumber( unsigned int nScreen ) = 0; - - // shaped system windows - // set clip region to none (-> rectangular windows, normal state) - virtual void ResetClipRegion() = 0; - // start setting the clipregion consisting of nRects rectangles - virtual void BeginSetClipRegion( ULONG nRects ) = 0; - // add a rectangle to the clip region - virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0; - // done setting up the clipregion - virtual void EndSetClipRegion() = 0; - - // Callbacks (indepent part in vcl/source/window/winproc.cxx) - // for default message handling return 0 - void SetCallback( Window* pWindow, SALFRAMEPROC pProc ) - { m_pWindow = pWindow; m_pProc = pProc; } - - // returns the instance set - Window* GetWindow() const { return m_pWindow; } - - // Call the callback set; this sometimes necessary for implementation classes - // that should not now more than necessary about the SalFrame implementation - // (e.g. input methods, printer update handlers). - long CallCallback( USHORT nEvent, const void* pEvent ) const - { return m_pProc ? m_pProc( m_pWindow, const_cast(this), nEvent, pEvent ) : 0; } -}; - - - -#endif // __cplusplus - -#endif // _SV_SALFRAME_HXX diff --git a/vcl/inc/vcl/salgdi.hxx b/vcl/inc/vcl/salgdi.hxx deleted file mode 100644 index b4769c045708..000000000000 --- a/vcl/inc/vcl/salgdi.hxx +++ /dev/null @@ -1,493 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SALGDI_HXX -#define _SV_SALGDI_HXX - -#include "tools/string.hxx" -#include "rtl/ustring.hxx" -#include "vcl/sv.h" -#include "vcl/dllapi.h" -#include "vcl/salgtype.hxx" -#include "vos/thread.hxx" -#include "vcl/outdev.hxx" -#include "vcl/salnativewidgets.hxx" - -#include - -class ImplDevFontList; -class SalBitmap; -class ImplFontSelectData; -class ImplFontMetricData; -struct ImplKernPairData; -class ImplFontData; -class ImplFontCharMap; -class SalLayout; -class ImplLayoutArgs; -class Rectangle; -class FontSubsetInfo; -class OutputDevice; -class ServerFontLayout; -struct SystemGraphicsData; -struct SystemFontData; - -namespace basegfx { - class B2DVector; - class B2DPolygon; - class B2DPolyPolygon; -} - -// --------------------- -// - SalGraphics-Codes - -// --------------------- - -#define SAL_SETFONT_REMOVEANDMATCHNEW ((USHORT)0x0001) -#define SAL_SETFONT_USEDRAWTEXT ((USHORT)0x0002) -#define SAL_SETFONT_USEDRAWTEXTARRAY ((USHORT)0x0004) -#define SAL_SETFONT_UNICODE ((USHORT)0x0008) -#define SAL_SETFONT_BADFONT ((USHORT)0x1000) - -#define SAL_COPYAREA_WINDOWINVALIDATE ((USHORT)0x0001) - -// ------------------- -// - common typedefs - -// ------------------- - -typedef sal_Unicode sal_Ucs; // TODO: use sal_UCS4 instead of sal_Unicode -typedef std::map< sal_Ucs, sal_Int32 > Ucs2SIntMap; -typedef std::map< sal_Ucs, sal_uInt32 > Ucs2UIntMap; -typedef std::map< sal_Ucs, rtl::OString > Ucs2OStrMap; -typedef std::vector< sal_Int32 > Int32Vector; - -// --------------- -// - SalGraphics - -// --------------- - -// note: if you add any new methods to class SalGraphics using coordinates -// make sure they have a corresponding protected pure virtual method -// which has to be implemented by the platform dependent part. -// Add a method that performs coordinate mirroring if required, (see -// existing methods as sample) and then calls the equivalent pure method. - -// note: all positions are in pixel and relative to -// the top/left-position of the virtual output area - -class VCL_DLLPUBLIC SalGraphics -{ - int m_nLayout; // 0: mirroring off, 1: mirror x-axis - -protected: - // flags which hold the SetAntialiasing() value from OutputDevice - bool m_bAntiAliasB2DDraw; - -public: - // get/set AA - void setAntiAliasB2DDraw(bool bNew) { m_bAntiAliasB2DDraw = bNew; } - bool getAntiAliasB2DDraw() const { return m_bAntiAliasB2DDraw; } - - SalGraphics(); - virtual ~SalGraphics(); - -protected: - virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0; - virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ) = 0; - // draw --> LineColor and FillColor and RasterOp and ClipRegion - virtual void drawPixel( long nX, long nY ) = 0; - virtual void drawPixel( long nX, long nY, SalColor nSalColor ) = 0; - virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ) = 0; - virtual void drawRect( long nX, long nY, long nWidth, long nHeight ) = 0; - virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry ) = 0; - virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry ) = 0; - virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry ) = 0; - virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency ) = 0; - virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin ) = 0; - virtual sal_Bool drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) = 0; - virtual sal_Bool drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) = 0; - virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry ) = 0; - - // CopyArea --> No RasterOp, but ClipRegion - virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, - long nSrcHeight, USHORT nFlags ) = 0; - - // CopyBits and DrawBitmap --> RasterOp and ClipRegion - // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics - virtual void copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics ) = 0; - virtual void drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap ) = 0; - virtual void drawBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - SalColor nTransparentColor ) = 0; - virtual void drawBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - const SalBitmap& rMaskBitmap ) = 0; - virtual void drawMask( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - SalColor nMaskColor ) = 0; - - virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight ) = 0; - virtual SalColor getPixel( long nX, long nY ) = 0; - - // invert --> ClipRegion (only Windows or VirDevs) - virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags) = 0; - virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags ) = 0; - - virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ) = 0; - - // native widget rendering methods that require mirroring - virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, - const Point& aPos, BOOL& rIsInside ); - virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, - ControlState nState, const ImplControlValue& aValue, - const rtl::OUString& aCaption ); - virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, - ControlState nState, const ImplControlValue& aValue, - const rtl::OUString& aCaption ); - virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, - const ImplControlValue& aValue, const rtl::OUString& aCaption, - Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ); - - /** Render bitmap with alpha channel - - @param rSourceBitmap - Source bitmap to blit - - @param rAlphaBitmap - Alpha channel to use for blitting - - @return true, if the operation succeeded, and false - otherwise. In this case, clients should try to emulate alpha - compositing themselves - */ - virtual bool drawAlphaBitmap( const SalTwoRect&, - const SalBitmap& rSourceBitmap, - const SalBitmap& rAlphaBitmap ) = 0; - /** Render solid rectangle with given transparency - - @param nTransparency - Transparency value (0-255) to use. 0 blits and opaque, 255 a - fully transparent rectangle - */ - virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency ) = 0; - -public: - // public SalGraphics methods, the interface to the independent vcl part - - // get device resolution - virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) = 0; - // get the depth of the device - virtual USHORT GetBitCount() = 0; - // get the width of the device - virtual long GetGraphicsWidth() const = 0; - - // set the clip region to empty - virtual void ResetClipRegion() = 0; - // begin setting the clip region, add rectangles to the - // region with the UnionClipRegion call - virtual void BeginSetClipRegion( ULONG nCount ) = 0; - // all rectangles were added and the clip region should be set now - virtual void EndSetClipRegion() = 0; - - // set the line color to transparent (= don't draw lines) - virtual void SetLineColor() = 0; - // set the line color to a specific color - virtual void SetLineColor( SalColor nSalColor ) = 0; - // set the fill color to transparent (= don't fill) - virtual void SetFillColor() = 0; - // set the fill color to a specific color, shapes will be - // filled accordingly - virtual void SetFillColor( SalColor nSalColor ) = 0; - // enable/disable XOR drawing - virtual void SetXORMode( bool bSet, bool bInvertOnly ) = 0; - // set line color for raster operations - virtual void SetROPLineColor( SalROPColor nROPColor ) = 0; - // set fill color for raster operations - virtual void SetROPFillColor( SalROPColor nROPColor ) = 0; - // set the text color to a specific color - virtual void SetTextColor( SalColor nSalColor ) = 0; - // set the font - virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel ) = 0; - // release the fonts - void ReleaseFonts() { SetFont( NULL, 0 ); } - // get the current font's metrics - virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel = 0 ) = 0; - - // get kernign pairs of the current font - // return only PairCount if (pKernPairs == NULL) - virtual ULONG GetKernPairs( ULONG nMaxPairCount, ImplKernPairData* ) = 0; - // get the repertoire of the current font - virtual const ImplFontCharMap* GetImplFontCharMap() const = 0; - // graphics must fill supplied font list - virtual void GetDevFontList( ImplDevFontList* ) = 0; - // graphics should call ImplAddDevFontSubstitute on supplied - // OutputDevice for all its device specific preferred font substitutions - virtual void GetDevFontSubstList( OutputDevice* ) = 0; - virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ) = 0; - // CreateFontSubset: a method to get a subset of glyhps of a font - // inside a new valid font file - // returns TRUE if creation of subset was successfull - // parameters: rToFile: contains a osl file URL to write the subset to - // pFont: describes from which font to create a subset - // pGlyphIDs: the glyph ids to be extracted - // pEncoding: the character code corresponding to each glyph - // pWidths: the advance widths of the correspoding glyphs (in PS font units) - // nGlyphs: the number of glyphs - // rInfo: additional outgoing information - // implementation note: encoding 0 with glyph id 0 should be added implicitly - // as "undefined character" - virtual BOOL CreateFontSubset( const rtl::OUString& rToFile, - const ImplFontData* pFont, - sal_Int32* pGlyphIDs, - sal_uInt8* pEncoding, - sal_Int32* pWidths, - int nGlyphs, - FontSubsetInfo& rInfo // out parameter - ) = 0; - - // GetFontEncodingVector: a method to get the encoding map Unicode - // to font encoded character; this is only used for type1 fonts and - // may return NULL in case of unknown encoding vector - // if ppNonEncoded is set and non encoded characters (that is type1 - // glyphs with only a name) exist it is set to the corresponding - // map for non encoded glyphs; the encoding vector contains -1 - // as encoding for these cases - virtual const Ucs2SIntMap* GetFontEncodingVector( const ImplFontData*, const Ucs2OStrMap** ppNonEncoded ) = 0; - - // GetEmbedFontData: gets the font data for a font marked - // embeddable by GetDevFontList or NULL in case of error - // parameters: pFont: describes the font in question - // pUnicodes: contains the Unicodes assigned to - // code points 0 to 255; must contain at least 256 members - // pWidths: the widths of all glyphs from char code 0 to 255 - // pWidths MUST support at least 256 members; - // rInfo: additional outgoing information - // pDataLen: out parameter, contains the byte length of the returned buffer - virtual const void* GetEmbedFontData( const ImplFontData* pFont, - const sal_Ucs* pUnicodes, - sal_Int32* pWidths, - FontSubsetInfo& rInfo, - long* pDataLen ) = 0; - // frees the font data again - virtual void FreeEmbedFontData( const void* pData, long nDataLen ) = 0; - - // get the same widths as in CreateFontSubset and GetEmbedFontData - // in case of an embeddable font also fill the mapping - // between unicode and glyph id - // leave widths vector and mapping untouched in case of failure - virtual void GetGlyphWidths( const ImplFontData* pFont, - bool bVertical, - Int32Vector& rWidths, - Ucs2UIntMap& rUnicodeEnc ) = 0; - - virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& ) = 0; - virtual BOOL GetGlyphOutline( long nIndex, basegfx::B2DPolyPolygon& ) = 0; - - virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) = 0; - virtual void DrawServerFontLayout( const ServerFontLayout& ) = 0; - /** Filter text from DrawText commands in a device specific manner -

- This function allows a device (or rather the corresponding SalGraphics - implementation) to prevent text portions from being drawn. This currently - is used only for filtering out the fax number in a document that is printed - to one of psprint's specialized "fax" printers. -

- - @param rOrigText - The original text - - @param rNewText - A String that will be filled with the adjusted version - - @param nIndex - The index inside rOrigText that marks the first draw character - - @param rLen - in: length of text beginning at nIndex to be drawn - out: length of rNewText containing the substituted text - - @param rCutStart - out: index at which the cutout portion of rOrigText begins - - @param rCutStop - out: index at which the cutout portion of rOrigText ends - - @returns - true: a substitution has taken place and rNewText rLen, rCutStart and rCutStop have been filled accordingly - false: no substitution has taken place, rNewText, rLen, rCutStart, rCutStop remain unchanged - */ - virtual bool filterText( const String& rOrigText, String& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop ); - - virtual bool supportsOperation( OutDevSupportType ) const = 0; - - // mirroring specifica - int GetLayout() { return m_nLayout; } - void SetLayout( int aLayout ) { m_nLayout = aLayout;} - - void mirror( long& nX, const OutputDevice *pOutDev, bool bBack = false ) const; - void mirror( long& nX, long& nWidth, const OutputDevice *pOutDev, bool bBack = false ) const; - BOOL mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack = false ) const; - void mirror( Rectangle& rRect, const OutputDevice*, bool bBack = false ) const; - void mirror( Region& rRgn, const OutputDevice *pOutDev, bool bBack = false ) const; - void mirror( ControlType,const ImplControlValue&,const OutputDevice*,bool bBack = false) const; - basegfx::B2DPoint mirror( const basegfx::B2DPoint& i_rPoint, const OutputDevice *pOutDev, bool bBack = false ) const; - basegfx::B2DPolygon mirror( const basegfx::B2DPolygon& i_rPoly, const OutputDevice *pOutDev, bool bBack = false ) const; - basegfx::B2DPolyPolygon mirror( const basegfx::B2DPolyPolygon& i_rPoly, const OutputDevice *pOutDev, bool bBack = false ) const; - - // non virtual methods; these do eventual coordinate mirroring and - // then delegate to protected virtual methods - BOOL UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ); - BOOL UnionClipRegion( const ::basegfx::B2DPolyPolygon&, const OutputDevice* ); - - // draw --> LineColor and FillColor and RasterOp and ClipRegion - void DrawPixel( long nX, long nY, const OutputDevice *pOutDev ); - void DrawPixel( long nX, long nY, SalColor nSalColor, const OutputDevice *pOutDev ); - void DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice *pOutDev ); - void DrawRect( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ); - void DrawPolyLine( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev ); - void DrawPolygon( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev ); - void DrawPolyPolygon( sal_uInt32 nPoly, - const sal_uInt32* pPoints, - PCONSTSALPOINT* pPtAry, - const OutputDevice *pOutDev ); - bool DrawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency, const OutputDevice* ); - bool DrawPolyLine( const basegfx::B2DPolygon&, double fTransparency, const basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin, const OutputDevice* ); - sal_Bool DrawPolyLineBezier( ULONG nPoints, - const SalPoint* pPtAry, - const BYTE* pFlgAry, - const OutputDevice *pOutDev ); - sal_Bool DrawPolygonBezier( ULONG nPoints, - const SalPoint* pPtAry, - const BYTE* pFlgAry, - const OutputDevice *pOutDev ); - sal_Bool DrawPolyPolygonBezier( sal_uInt32 nPoly, - const sal_uInt32* pPoints, - const SalPoint* const* pPtAry, - const BYTE* const* pFlgAry, - const OutputDevice *pOutDev ); - - // CopyArea --> No RasterOp, but ClipRegion - void CopyArea( long nDestX, - long nDestY, - long nSrcX, - long nSrcY, - long nSrcWidth, - long nSrcHeight, - USHORT nFlags, - const OutputDevice *pOutDev ); - - // CopyBits and DrawBitmap --> RasterOp and ClipRegion - // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics - void CopyBits( const SalTwoRect* pPosAry, - SalGraphics* pSrcGraphics, - const OutputDevice *pOutDev, - const OutputDevice *pSrcOutDev ); - void DrawBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - const OutputDevice *pOutDev ); - void DrawBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - SalColor nTransparentColor, - const OutputDevice *pOutDev ); - void DrawBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - const SalBitmap& rTransparentBitmap, - const OutputDevice *pOutDev ); - - void DrawMask( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - SalColor nMaskColor, - const OutputDevice *pOutDev ); - - SalBitmap* GetBitmap( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ); - SalColor GetPixel( long nX, long nY, const OutputDevice *pOutDev ); - - // invert --> ClipRegion (only Windows) - void Invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags, const OutputDevice *pOutDev ); - void Invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags, const OutputDevice *pOutDev ); - - BOOL DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize, const OutputDevice *pOutDev ); - - //------------------------------------- - // Native Widget Rendering functions - //------------------------------------- - - // Query the platform layer for control support - virtual BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart ); - - // Query the native control to determine if it was acted upon - BOOL HitTestNativeControl( ControlType nType, - ControlPart nPart, - const Rectangle& rControlRegion, - const Point& aPos, - BOOL& rIsInside, - const OutputDevice *pOutDev ); - - // Request rendering of a particular control and/or part - BOOL DrawNativeControl( ControlType nType, - ControlPart nPart, - const Rectangle& rControlRegion, - ControlState nState, - const ImplControlValue& aValue, - const rtl::OUString& aCaption, - const OutputDevice *pOutDev ); - - // Request rendering of a caption string for a control - BOOL DrawNativeControlText( ControlType nType, - ControlPart nPart, - const Rectangle& rControlRegion, - ControlState nState, - const ImplControlValue& aValue, - const rtl::OUString& aCaption, - const OutputDevice *pOutDev ); - - // Query the native control's actual drawing region (including adornment) - BOOL GetNativeControlRegion( ControlType nType, - ControlPart nPart, - const Rectangle& rControlRegion, - ControlState nState, - const ImplControlValue& aValue, - const rtl::OUString& aCaption, - Rectangle &rNativeBoundingRegion, - Rectangle &rNativeContentRegion, - const OutputDevice *pOutDev ); - - static void AddDevFontSubstitute( OutputDevice* pOutDev, - const String& rFontName, - const String& rReplaceFontName, - USHORT nFlags = 0 ); - - bool DrawAlphaBitmap( const SalTwoRect&, - const SalBitmap& rSourceBitmap, - const SalBitmap& rAlphaBitmap, - const OutputDevice *pOutDev ); - - bool DrawAlphaRect( long nX, long nY, long nWidth, long nHeight, - sal_uInt8 nTransparency, const OutputDevice *pOutDev ); - - virtual SystemGraphicsData GetGraphicsData() const = 0; - virtual SystemFontData GetSysFontData( int nFallbacklevel ) const = 0; -}; - -#endif // _SV_SALGDI_HXX diff --git a/vcl/inc/vcl/salgeom.hxx b/vcl/inc/vcl/salgeom.hxx deleted file mode 100644 index 3d59e6199fa7..000000000000 --- a/vcl/inc/vcl/salgeom.hxx +++ /dev/null @@ -1,51 +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 _SV_SALGEOM_HXX -#define _SV_SALGEOM_HXX - -typedef struct _SalFrameGeometry { - // screen position of upper left corner of drawable area in pixel - long nX, nY; - // dimensions of the drawable area in pixel - unsigned long nWidth, nHeight; - // thickness of the decoration in pixel - unsigned long nLeftDecoration, - nTopDecoration, - nRightDecoration, - nBottomDecoration; - unsigned int nScreenNumber; - - _SalFrameGeometry() : - nX( 0 ), nY( 0 ), nWidth( 1 ), nHeight( 1 ), - nLeftDecoration( 0 ), nTopDecoration( 0 ), - nRightDecoration( 0 ), nBottomDecoration( 0 ), - nScreenNumber( 0 ) - {} -} SalFrameGeometry; - -#endif // _SV_SALGEOM_HXX diff --git a/vcl/inc/vcl/salimestatus.hxx b/vcl/inc/vcl/salimestatus.hxx deleted file mode 100644 index 779a75c9afaa..000000000000 --- a/vcl/inc/vcl/salimestatus.hxx +++ /dev/null @@ -1,45 +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 _SV_SALIMESTATUS_HXX -#define _SV_SALIMESTATUS_HXX - -#include - -class VCL_DLLPUBLIC SalI18NImeStatus -{ -public: - SalI18NImeStatus() {} - virtual ~SalI18NImeStatus(); - - // asks whether there is a status window available - // to toggle into menubar - virtual bool canToggle() = 0; - virtual void toggle() = 0; -}; - -#endif diff --git a/vcl/inc/vcl/salinst.hxx b/vcl/inc/vcl/salinst.hxx deleted file mode 100644 index 71b820803473..000000000000 --- a/vcl/inc/vcl/salinst.hxx +++ /dev/null @@ -1,219 +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 _SV_SALINST_HXX -#define _SV_SALINST_HXX - -#include "com/sun/star/uno/Reference.hxx" - -#include "vcl/sv.h" -#include "vcl/dllapi.h" - -#include "tools/string.hxx" - -#include "rtl/string.hxx" - -#include - -struct SystemParentData; -struct SalPrinterQueueInfo; -struct SalStatus; -struct ImplJobSetup; -class SalGraphics; -class SalFrame; -class SalObject; -class SalMenu; -class SalMenuItem; -class SalVirtualDevice; -class SalInfoPrinter; -class SalPrinter; -class SalTimer; -class ImplPrnQueueList; -class SalI18NImeStatus; -class SalSystem; -class SalBitmap; -struct SalItemParams; -class SalSession; -struct SystemGraphicsData; -struct SystemWindowData; -class Menu; - -namespace vos { class IMutex; } - -// --------------- -// - SalInstance - -// --------------- - -class VCL_DLLPUBLIC SalInstance -{ -public: - typedef bool(*Callback)(void*,void*,int); -private: - void* m_pEventInst; - void* m_pErrorInst; - Callback m_pEventCallback; - Callback m_pErrorCallback; - -public: - SalInstance() : - m_pEventInst( NULL ), - m_pErrorInst( NULL ), - m_pEventCallback( NULL ), - m_pErrorCallback( NULL ) - {} - virtual ~SalInstance(); - - // Frame - // DisplayName for Unix ??? - virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle ) = 0; - virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle ) = 0; - virtual void DestroyFrame( SalFrame* pFrame ) = 0; - - // Object (System Child Window) - virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE ) = 0; - virtual void DestroyObject( SalObject* pObject ) = 0; - - // VirtualDevice - // nDX and nDY in Pixel - // nBitCount: 0 == Default(=as window) / 1 == Mono - // pData allows for using a system dependent graphics or device context - virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics, - long nDX, long nDY, - USHORT nBitCount, const SystemGraphicsData *pData = NULL ) = 0; - virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice ) = 0; - - // Printer - // pSetupData->mpDriverData can be 0 - // pSetupData must be updatet with the current - // JobSetup - virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo, - ImplJobSetup* pSetupData ) = 0; - virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter ) = 0; - virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter ) = 0; - virtual void DestroyPrinter( SalPrinter* pPrinter ) = 0; - - virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList ) = 0; - virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo ) = 0; - virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ) = 0; - virtual String GetDefaultPrinter() = 0; - - // SalTimer - virtual SalTimer* CreateSalTimer() = 0; - // SalI18NImeStatus - virtual SalI18NImeStatus* CreateI18NImeStatus() = 0; - // SalSystem - virtual SalSystem* CreateSalSystem() = 0; - // SalBitmap - virtual SalBitmap* CreateSalBitmap() = 0; - - // YieldMutex - virtual vos::IMutex* GetYieldMutex() = 0; - virtual ULONG ReleaseYieldMutex() = 0; - virtual void AcquireYieldMutex( ULONG nCount ) = 0; - // return true, if yield mutex is owned by this thread, else false - virtual bool CheckYieldMutex() = 0; - - // wait next event and dispatch - // must returned by UserEvent (SalFrame::PostEvent) - // and timer - virtual void Yield( bool bWait, bool bHandleAllCurrentEvents ) = 0; - virtual bool AnyInput( USHORT nType ) = 0; - - // Menues - virtual SalMenu* CreateMenu( BOOL bMenuBar, Menu* pMenu ); - virtual void DestroyMenu( SalMenu* pMenu); - virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData ); - virtual void DestroyMenuItem( SalMenuItem* pItem ); - - // may return NULL to disable session management - virtual SalSession* CreateSalSession() = 0; - - // methods for XDisplayConnection - - // the parameters for the callbacks are: - // void* pInst: pInstance form the SetCallback call - // void* pEvent: address of the system specific event structure - // int nBytes: length of the system specific event structure - void SetEventCallback( void* pInstance, Callback pCallback ) - { m_pEventInst = pInstance; m_pEventCallback = pCallback; } - Callback GetEventCallback() const - { return m_pEventCallback; } - bool CallEventCallback( void* pEvent, int nBytes ) - { return m_pEventCallback ? m_pEventCallback( m_pEventInst, pEvent, nBytes ) : false; } - void SetErrorEventCallback( void* pInstance, Callback pCallback ) - { m_pErrorInst = pInstance; m_pErrorCallback = pCallback; } - Callback GetErrorEventCallback() const - { return m_pErrorCallback; } - bool CallErrorCallback( void* pEvent, int nBytes ) - { return m_pErrorCallback ? m_pErrorCallback( m_pErrorInst, pEvent, nBytes ) : false; } - - enum ConnectionIdentifierType { AsciiCString, Blob }; - virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ) = 0; - - // this is a vehicle for PrintFontManager to bridge the gap between vcl and libvclplug_* - // this is only necessary because PrintFontManager is an exported vcl API and therefore - // needs to be in libvcl while libvclplug_* do not contain exported C++ API - virtual void FillFontPathList( std::list< rtl::OString >& o_rFontPaths ); - - // dtrans implementation - virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > - CreateClipboard( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& i_rArguments ); - virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDragSource(); - virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDropTarget(); - virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType) = 0; -}; - -// called from SVMain -SalInstance* CreateSalInstance(); -void DestroySalInstance( SalInstance* pInst ); - -// ------------------------- -// - SalInstance-Functions - -// ------------------------- - -void SalAbort( const XubString& rErrorText ); - -VCL_DLLPUBLIC const ::rtl::OUString& SalGetDesktopEnvironment(); - -// ----------- -// - SalData - -// ----------- - -void InitSalData(); // called from Application-Ctor -void DeInitSalData(); // called from Application-Dtor - -void InitSalMain(); -void DeInitSalMain(); - -// ---------- -// - SVMain - -// ---------- - -// Callbacks (indepen in \sv\source\app\svmain.cxx) -VCL_DLLPUBLIC BOOL SVMain(); - -#endif // _SV_SALINST_HXX diff --git a/vcl/inc/vcl/sallayout.hxx b/vcl/inc/vcl/sallayout.hxx deleted file mode 100755 index e23090c42392..000000000000 --- a/vcl/inc/vcl/sallayout.hxx +++ /dev/null @@ -1,390 +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 _SV_SALLAYOUT_HXX -#define _SV_SALLAYOUT_HXX - -#include - -#include -namespace basegfx { - class B2DPolyPolygon; - typedef std::vector B2DPolyPolygonVector; -} - -#ifndef _TOOLS_LANG_HXX -typedef unsigned short LanguageType; -#endif - -#include -#include -#include - -// for typedef sal_UCS4 -#include - -class SalGraphics; -class ImplFontData; - -#define MAX_FALLBACK 16 - -// ---------------- -// - LayoutOption - -// ---------------- - -#define SAL_LAYOUT_BIDI_RTL 0x0001 -#define SAL_LAYOUT_BIDI_STRONG 0x0002 -#define SAL_LAYOUT_RIGHT_ALIGN 0x0004 -#define SAL_LAYOUT_KERNING_PAIRS 0x0010 -#define SAL_LAYOUT_KERNING_ASIAN 0x0020 -#define SAL_LAYOUT_VERTICAL 0x0040 -#define SAL_LAYOUT_COMPLEX_DISABLED 0x0100 -#define SAL_LAYOUT_ENABLE_LIGATURES 0x0200 -#define SAL_LAYOUT_SUBSTITUTE_DIGITS 0x0400 -#define SAL_LAYOUT_KASHIDA_JUSTIFICATON 0x0800 -#define SAL_LAYOUT_DISABLE_GLYPH_PROCESSING 0x1000 -#define SAL_LAYOUT_FOR_FALLBACK 0x2000 - -// ----------------- - -// used for managing runs e.g. for BiDi, glyph and script fallback -class VCL_DLLPUBLIC ImplLayoutRuns -{ -private: - int mnRunIndex; - std::vector maRuns; - -public: - ImplLayoutRuns() { mnRunIndex = 0; maRuns.reserve(8); } - - void Clear() { maRuns.clear(); } - bool AddPos( int nCharPos, bool bRTL ); - bool AddRun( int nMinRunPos, int nEndRunPos, bool bRTL ); - - bool IsEmpty() const { return maRuns.empty(); } - void ResetPos() { mnRunIndex = 0; } - void NextRun() { mnRunIndex += 2; } - bool GetRun( int* nMinRunPos, int* nEndRunPos, bool* bRTL ) const; - bool GetNextPos( int* nCharPos, bool* bRTL ); - bool PosIsInRun( int nCharPos ) const; - bool PosIsInAnyRun( int nCharPos ) const; -}; - -// ----------------- - -class ImplLayoutArgs -{ -public: - // string related inputs - int mnFlags; - int mnLength; - int mnMinCharPos; - int mnEndCharPos; - const xub_Unicode* mpStr; - - // positioning related inputs - const sal_Int32* mpDXArray; // in pixel units - long mnLayoutWidth; // in pixel units - int mnOrientation; // in 0-3600 system - - // data for bidi and glyph+script fallback - ImplLayoutRuns maRuns; - ImplLayoutRuns maReruns; - -public: - ImplLayoutArgs( const xub_Unicode* pStr, int nLength, - int nMinCharPos, int nEndCharPos, int nFlags ); - - void SetLayoutWidth( long nWidth ) { mnLayoutWidth = nWidth; } - void SetDXArray( const sal_Int32* pDXArray ) { mpDXArray = pDXArray; } - void SetOrientation( int nOrientation ) { mnOrientation = nOrientation; } - - void ResetPos() - { maRuns.ResetPos(); } - bool GetNextPos( int* nCharPos, bool* bRTL ) - { return maRuns.GetNextPos( nCharPos, bRTL ); } - bool GetNextRun( int* nMinRunPos, int* nEndRunPos, bool* bRTL ); - bool NeedFallback( int nCharPos, bool bRTL ) - { return maReruns.AddPos( nCharPos, bRTL ); } - bool NeedFallback( int nMinRunPos, int nEndRunPos, bool bRTL ) - { return maReruns.AddRun( nMinRunPos, nEndRunPos, bRTL ); } - // methods used by BiDi and glyph fallback - bool NeedFallback() const - { return !maReruns.IsEmpty(); } - bool PrepareFallback(); - -protected: - void AddRun( int nMinCharPos, int nEndCharPos, bool bRTL ); -}; - -// helper functions often used with ImplLayoutArgs -bool IsDiacritic( sal_UCS4 ); -int GetVerticalFlags( sal_UCS4 ); -sal_UCS4 GetVerticalChar( sal_UCS4 ); -// #i80090# GetMirroredChar also needed outside vcl, moved to svapp.hxx -// VCL_DLLPUBLIC sal_UCS4 GetMirroredChar( sal_UCS4 ); -sal_UCS4 GetLocalizedChar( sal_UCS4, LanguageType ); -VCL_DLLPUBLIC const char* GetAutofallback( sal_UCS4 ) ; - -// ------------- -// - SalLayout - -// ------------- - -typedef sal_uInt32 sal_GlyphId; - -// Glyph Flags -#define GF_NONE 0x00000000 -#define GF_FLAGMASK 0xFF800000 -#define GF_IDXMASK ~GF_FLAGMASK -#define GF_ISCHAR 0x00800000 -#define GF_ROTL 0x01000000 -// caution !!! -#define GF_VERT 0x02000000 -// GF_VERT is only for windows implementation -// (win/source/gdi/salgdi3.cxx, win/source/gdi/winlayout.cxx) -// don't use this elsewhere !!! -#define GF_ROTR 0x03000000 -#define GF_ROTMASK 0x03000000 -#define GF_UNHINTED 0x04000000 -#define GF_GSUB 0x08000000 -#define GF_FONTMASK 0xF0000000 -#define GF_FONTSHIFT 28 - -#define GF_DROPPED 0xFFFFFFFF - -// all positions/widths are in font units -// one exception: drawposition is in pixel units - -class VCL_DLLPUBLIC SalLayout -{ -public: - // used by upper layers - Point& DrawBase() { return maDrawBase; } - const Point& DrawBase() const { return maDrawBase; } - Point& DrawOffset() { return maDrawOffset; } - const Point& DrawOffset() const { return maDrawOffset; } - Point GetDrawPosition( const Point& rRelative = Point(0,0) ) const; - - virtual bool LayoutText( ImplLayoutArgs& ) = 0; // first step of layouting - virtual void AdjustLayout( ImplLayoutArgs& ); // adjusting after fallback etc. - virtual void InitFont() const {} - virtual void DrawText( SalGraphics& ) const = 0; - - int GetUnitsPerPixel() const { return mnUnitsPerPixel; } - int GetOrientation() const { return mnOrientation; } - - virtual const ImplFontData* GetFallbackFontData( sal_GlyphId ) const; - - // methods using string indexing - virtual int GetTextBreak( long nMaxWidth, long nCharExtra=0, int nFactor=1 ) const = 0; - virtual long FillDXArray( sal_Int32* pDXArray ) const = 0; - virtual long GetTextWidth() const { return FillDXArray( NULL ); } - virtual void GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const = 0; - virtual bool IsKashidaPosValid ( int /*nCharPos*/ ) const { return true; } // i60594 - - // methods using glyph indexing - virtual int GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIdAry, Point& rPos, int&, - sal_Int32* pGlyphAdvAry = NULL, int* pCharPosAry = NULL ) const = 0; - virtual bool GetOutline( SalGraphics&, ::basegfx::B2DPolyPolygonVector& ) const; - virtual bool GetBoundRect( SalGraphics&, Rectangle& ) const; - - virtual bool IsSpacingGlyph( sal_GlyphId ) const; - - // reference counting - void Reference() const; - void Release() const; - - // used by glyph+font+script fallback - virtual void MoveGlyph( int nStart, long nNewXPos ) = 0; - virtual void DropGlyph( int nStart ) = 0; - virtual void Simplify( bool bIsBase ) = 0; - virtual void DisableGlyphInjection( bool /*bDisable*/ ) {} - -protected: - // used by layout engines - SalLayout(); - virtual ~SalLayout(); - - // used by layout layers - void SetUnitsPerPixel( int n ) { mnUnitsPerPixel = n; } - void SetOrientation( int nOrientation ) // in 0-3600 system - { mnOrientation = nOrientation; } - - static int CalcAsianKerning( sal_UCS4, bool bLeft, bool bVertical ); - -private: - // enforce proper copy semantic - SAL_DLLPRIVATE SalLayout( const SalLayout& ); - SAL_DLLPRIVATE SalLayout& operator=( const SalLayout& ); - -protected: - int mnMinCharPos; - int mnEndCharPos; - int mnLayoutFlags; - - int mnUnitsPerPixel; - int mnOrientation; - - mutable int mnRefCount; - mutable Point maDrawOffset; - Point maDrawBase; -}; - -// ------------------ -// - MultiSalLayout - -// ------------------ - -class VCL_DLLPUBLIC MultiSalLayout : public SalLayout -{ -public: - virtual void DrawText( SalGraphics& ) const; - virtual int GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const; - virtual long FillDXArray( sal_Int32* pDXArray ) const; - virtual void GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const; - virtual int GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIdxAry, Point& rPos, - int&, sal_Int32* pGlyphAdvAry, int* pCharPosAry ) const; - virtual bool GetOutline( SalGraphics&, ::basegfx::B2DPolyPolygonVector& ) const; - virtual bool GetBoundRect( SalGraphics&, Rectangle& ) const; - - // used only by OutputDevice::ImplLayout, TODO: make friend - MultiSalLayout( SalLayout& rBaseLayout, - const ImplFontData* pBaseFont = NULL ); - virtual bool AddFallback( SalLayout& rFallbackLayout, - ImplLayoutRuns&, const ImplFontData* pFallbackFont ); - virtual bool LayoutText( ImplLayoutArgs& ); - virtual void AdjustLayout( ImplLayoutArgs& ); - virtual void InitFont() const; - - virtual const ImplFontData* GetFallbackFontData( sal_GlyphId ) const; - - void SetInComplete(bool bInComplete = true); - -protected: - virtual ~MultiSalLayout(); - -private: - // dummy implementations - virtual void MoveGlyph( int, long ) {} - virtual void DropGlyph( int ) {} - virtual void Simplify( bool ) {} - - // enforce proper copy semantic - SAL_DLLPRIVATE MultiSalLayout( const MultiSalLayout& ); - SAL_DLLPRIVATE MultiSalLayout& operator=( const MultiSalLayout& ); - -private: - SalLayout* mpLayouts[ MAX_FALLBACK ]; - const ImplFontData* mpFallbackFonts[ MAX_FALLBACK ]; - ImplLayoutRuns maFallbackRuns[ MAX_FALLBACK ]; - int mnLevel; - bool mbInComplete; -}; - -// -------------------- -// - GenericSalLayout - -// -------------------- - -struct GlyphItem -{ - int mnFlags; - int mnCharPos; // index in string - int mnOrigWidth; // original glyph width - int mnNewWidth; // width after adjustments - sal_GlyphId mnGlyphIndex; - Point maLinearPos; // absolute position of non rotated string - -public: - GlyphItem() {} - - GlyphItem( int nCharPos, sal_GlyphId nGlyphIndex, const Point& rLinearPos, - long nFlags, int nOrigWidth ) - : mnFlags(nFlags), mnCharPos(nCharPos), - mnOrigWidth(nOrigWidth), mnNewWidth(nOrigWidth), - mnGlyphIndex(nGlyphIndex), maLinearPos(rLinearPos) - {} - - enum{ FALLBACK_MASK=0xFF, IS_IN_CLUSTER=0x100, IS_RTL_GLYPH=0x200, IS_DIACRITIC=0x400 }; - - bool IsClusterStart() const { return ((mnFlags & IS_IN_CLUSTER) == 0); } - bool IsRTLGlyph() const { return ((mnFlags & IS_RTL_GLYPH) != 0); } - bool IsDiacritic() const { return ((mnFlags & IS_DIACRITIC) != 0); } -}; - -// --------------- - -typedef std::list GlyphList; -typedef std::vector GlyphVector; - -// --------------- - -class VCL_DLLPUBLIC GenericSalLayout : public SalLayout -{ -public: - // used by layout engines - void AppendGlyph( const GlyphItem& ); - virtual void AdjustLayout( ImplLayoutArgs& ); - virtual void ApplyDXArray( ImplLayoutArgs& ); - virtual void Justify( long nNewWidth ); - void KashidaJustify( long nIndex, int nWidth ); - void ApplyAsianKerning( const sal_Unicode*, int nLength ); - void SortGlyphItems(); - - // used by upper layers - virtual long GetTextWidth() const; - virtual long FillDXArray( sal_Int32* pDXArray ) const; - virtual int GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const; - virtual void GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const; - - // used by display layers - virtual int GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIdxAry, Point& rPos, int&, - sal_Int32* pGlyphAdvAry = NULL, int* pCharPosAry = NULL ) const; - -protected: - GenericSalLayout(); - virtual ~GenericSalLayout(); - - // for glyph+font+script fallback - virtual void MoveGlyph( int nStart, long nNewXPos ); - virtual void DropGlyph( int nStart ); - virtual void Simplify( bool bIsBase ); - - bool GetCharWidths( sal_Int32* pCharWidths ) const; - -private: - GlyphItem* mpGlyphItems; // TODO: change to GlyphList - int mnGlyphCount; - int mnGlyphCapacity; - mutable Point maBasePoint; - - // enforce proper copy semantic - SAL_DLLPRIVATE GenericSalLayout( const GenericSalLayout& ); - SAL_DLLPRIVATE GenericSalLayout& operator=( const GenericSalLayout& ); -}; - -#undef SalGraphics - -#endif // _SV_SALLAYOUT_HXX diff --git a/vcl/inc/vcl/salmenu.hxx b/vcl/inc/vcl/salmenu.hxx deleted file mode 100644 index cc0438c4e177..000000000000 --- a/vcl/inc/vcl/salmenu.hxx +++ /dev/null @@ -1,101 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SALMENU_HXX -#define _SV_SALMENU_HXX - -#include -#include "vcl/dllapi.h" -#include -#include -#include - -struct SystemMenuData; -class FloatingWindow; -class SalFrame; - -struct SalItemParams -{ - USHORT nId; // item Id - MenuItemType eType; // MenuItem-Type - MenuItemBits nBits; // MenuItem-Bits - Menu* pMenu; // Pointer to Menu - XubString aText; // Menu-Text - Image aImage; // Image -}; - - -struct SalMenuButtonItem -{ - USHORT mnId; - Image maImage; - rtl::OUString maToolTipText; - - SalMenuButtonItem() : mnId( 0 ) {} - SalMenuButtonItem( USHORT i_nId, const Image& rImg, const rtl::OUString& i_rTTText = rtl::OUString() ) - : mnId( i_nId ), maImage( rImg ), maToolTipText( i_rTTText ) {} -}; - -class VCL_DLLPUBLIC SalMenuItem -{ -public: - SalMenuItem() {} - virtual ~SalMenuItem(); -}; - -class VCL_DLLPUBLIC SalMenu -{ -public: - SalMenu() {} - virtual ~SalMenu(); - - virtual BOOL VisibleMenuBar() = 0; // must return TRUE to actually DISPLAY native menu bars - // otherwise only menu messages are processed (eg, OLE on Windows) - - virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ) = 0; - virtual void RemoveItem( unsigned nPos ) = 0; - virtual void SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos ) = 0; - virtual void SetFrame( const SalFrame* pFrame ) = 0; - virtual void CheckItem( unsigned nPos, BOOL bCheck ) = 0; - virtual void EnableItem( unsigned nPos, BOOL bEnable ) = 0; - virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText )= 0; - virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage ) = 0; - virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName ) = 0; - virtual void GetSystemMenuData( SystemMenuData* pData ) = 0; - virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, ULONG nFlags); - virtual bool AddMenuBarButton( const SalMenuButtonItem& ); // return false if not implemented or failure - virtual void RemoveMenuBarButton( USHORT nId ); - - // return an empty rectangle if not implemented - // return Rectangle( Point( -1, -1 ), Size( 1, 1 ) ) if menu bar buttons implemented - // but rectangle cannot be determined - virtual Rectangle GetMenuBarButtonRectPixel( USHORT i_nItemId, SalFrame* i_pReferenceFrame ); -}; - - -#endif // _SV_SALMENU_HXX - diff --git a/vcl/inc/vcl/salobj.hxx b/vcl/inc/vcl/salobj.hxx deleted file mode 100644 index adf0e0a3d45d..000000000000 --- a/vcl/inc/vcl/salobj.hxx +++ /dev/null @@ -1,92 +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 _SV_SALOBJ_HXX -#define _SV_SALOBJ_HXX - -#include -#include -#include -#include - -struct SystemEnvData; - -// ------------------- -// - SalObject-Types - -// ------------------- - -#define SAL_OBJECT_CLIP_INCLUDERECTS ((USHORT)0x0001) -#define SAL_OBJECT_CLIP_EXCLUDERECTS ((USHORT)0x0002) -#define SAL_OBJECT_CLIP_ABSOLUTE ((USHORT)0x0004) - -// ------------- -// - SalObject - -// ------------- - -class VCL_DLLPUBLIC SalObject -{ - void* m_pInst; - SALOBJECTPROC m_pCallback; - BOOL m_bMouseTransparent:1, - m_bEraseBackground:1; -public: - SalObject() : m_pInst( NULL ), m_pCallback( NULL ), m_bMouseTransparent( FALSE ), m_bEraseBackground( TRUE ) {} - virtual ~SalObject(); - - virtual void ResetClipRegion() = 0; - virtual USHORT GetClipRegionType() = 0; - virtual void BeginSetClipRegion( ULONG nRects ) = 0; - virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0; - virtual void EndSetClipRegion() = 0; - - virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ) = 0; - virtual void Show( BOOL bVisible ) = 0; - virtual void Enable( BOOL nEnable ) = 0; - virtual void GrabFocus() = 0; - - virtual void SetBackground() = 0; - virtual void SetBackground( SalColor nSalColor ) = 0; - - virtual const SystemEnvData* GetSystemData() const = 0; - - virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ) = 0; - - void SetCallback( void* pInst, SALOBJECTPROC pProc ) - { m_pInst = pInst; m_pCallback = pProc; } - long CallCallback( USHORT nEvent, const void* pEvent ) - { return m_pCallback ? m_pCallback( m_pInst, this, nEvent, pEvent ) : 0; } - void SetMouseTransparent( BOOL bMouseTransparent ) - { m_bMouseTransparent = bMouseTransparent; } - BOOL IsMouseTransparent() - { return m_bMouseTransparent; } - void EnableEraseBackground( BOOL bEnable ) - { m_bEraseBackground = bEnable; } - BOOL IsEraseBackgroundEnabled() - { return m_bEraseBackground; } -}; - -#endif // _SV_SALOBJ_HXX diff --git a/vcl/inc/vcl/salprn.hxx b/vcl/inc/vcl/salprn.hxx deleted file mode 100644 index 19f023108349..000000000000 --- a/vcl/inc/vcl/salprn.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 _SV_SALPRN_HXX -#define _SV_SALPRN_HXX - -#include -#include -#include -#include - -#include - -class SalGraphics; -class SalFrame; -struct ImplJobSetup; -namespace vcl { class PrinterController; } - -// ----------------------- -// - SalPrinterQueueInfo - -// ----------------------- - -struct VCL_DLLPUBLIC SalPrinterQueueInfo -{ - XubString maPrinterName; - XubString maDriver; - XubString maLocation; - XubString maComment; - ULONG mnStatus; - ULONG mnJobs; - void* mpSysData; - - SalPrinterQueueInfo(); - ~SalPrinterQueueInfo(); -}; - -// ------------------ -// - SalInfoPrinter - -// ------------------ - -class VCL_DLLPUBLIC SalInfoPrinter -{ -public: - std::vector< PaperInfo > m_aPaperFormats; // all printer supported formats - bool m_bPapersInit; // set to true after InitPaperFormats - bool m_bCompatMetrics; - - SalInfoPrinter() : m_bPapersInit( false ), m_bCompatMetrics( false ) {} - virtual ~SalInfoPrinter(); - - // SalGraphics or NULL, but two Graphics for all SalFrames - // must be returned - virtual SalGraphics* GetGraphics() = 0; - virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0; - - virtual BOOL Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ) = 0; - // This function set the driver data and - // set the new indepen data in pSetupData - virtual BOOL SetPrinterData( ImplJobSetup* pSetupData ) = 0; - // This function merged the indepen driver data - // and set the new indepen data in pSetupData - // Only the data must changed, where the bit - // in nFlags is set - virtual BOOL SetData( ULONG nFlags, ImplJobSetup* pSetupData ) = 0; - - virtual void GetPageInfo( const ImplJobSetup* pSetupData, - long& rOutWidth, long& rOutHeight, - long& rPageOffX, long& rPageOffY, - long& rPageWidth, long& rPageHeight ) = 0; - virtual ULONG GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType ) = 0; - virtual ULONG GetPaperBinCount( const ImplJobSetup* pSetupData ) = 0; - virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin ) = 0; - // fills m_aPaperFormats and sets m_bPapersInit to true - virtual void InitPaperFormats( const ImplJobSetup* pSetupData ) = 0; - // returns angle that a landscape page will be turned counterclockwise wrt to portrait - virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData ) = 0; -}; - -// -------------- -// - SalPrinter - -// -------------- - -class VCL_DLLPUBLIC SalPrinter -{ -public: // public for Sal Implementation - SalPrinter() {} - virtual ~SalPrinter(); - - virtual BOOL StartJob( const String* pFileName, - const String& rJobName, - const String& rAppName, - ULONG nCopies, - bool bCollate, - bool bDirect, - ImplJobSetup* pSetupData ) = 0; - - // implement for pull model print systems only, - // default implementations (see salvtables.cxx) just returns FALSE - virtual BOOL StartJob( const String* pFileName, - const String& rJobName, - const String& rAppName, - ImplJobSetup* pSetupData, - vcl::PrinterController& rController ); - - virtual BOOL EndJob() = 0; - virtual BOOL AbortJob() = 0; - virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData ) = 0; - virtual BOOL EndPage() = 0; - virtual ULONG GetErrorCode() = 0; - -}; - -#endif // _SV_SALPRN_HXX diff --git a/vcl/inc/vcl/salptype.hxx b/vcl/inc/vcl/salptype.hxx deleted file mode 100644 index 8613ead5301a..000000000000 --- a/vcl/inc/vcl/salptype.hxx +++ /dev/null @@ -1,60 +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 _SV_SALPTYPE_HXX -#define _SV_SALPTYPE_HXX - -#include - -// -------------------- -// - SalJobSetupFlags - -// -------------------- - -#define SAL_JOBSET_ORIENTATION ((ULONG)0x00000001) -#define SAL_JOBSET_PAPERBIN ((ULONG)0x00000002) -#define SAL_JOBSET_PAPERSIZE ((ULONG)0x00000004) -#define SAL_JOBSET_DUPLEXMODE ((ULONG)0x00000008) -#define SAL_JOBSET_ALL (SAL_JOBSET_ORIENTATION |\ - SAL_JOBSET_PAPERBIN |\ - SAL_JOBSET_PAPERSIZE |\ - SAL_JOBSET_DUPLEXMODE) - -// ------------------- -// - SalPrinterError - -// ------------------- - -#define SAL_PRINTER_ERROR_GENERALERROR 1 -#define SAL_PRINTER_ERROR_ABORT 2 - -// ------------------- -// - SalPrinterProcs - -// ------------------- - -class SalPrinter; -typedef long (*SALPRNABORTPROC)( void* pInst, SalPrinter* pPrinter ); - -#endif // _SV_SALPTYPE_HXX diff --git a/vcl/inc/vcl/salsession.hxx b/vcl/inc/vcl/salsession.hxx deleted file mode 100644 index 2da1ae551074..000000000000 --- a/vcl/inc/vcl/salsession.hxx +++ /dev/null @@ -1,117 +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 _VCL_SALSESSION_HXX -#define _VCL_SALSESSION_HXX - -#include "vcl/dllapi.h" - -enum SalSessionEventType -{ - Interaction, - SaveRequest, - ShutdownCancel, - Quit -}; - -struct SalSessionEvent -{ - SalSessionEventType m_eType; - - SalSessionEvent( SalSessionEventType eType ) - : m_eType( eType ) - {} -}; - -struct SalSessionInteractionEvent : public SalSessionEvent -{ - bool m_bInteractionGranted; - - SalSessionInteractionEvent( bool bGranted ) - : SalSessionEvent( Interaction ), - m_bInteractionGranted( bGranted ) - {} -}; - -struct SalSessionSaveRequestEvent : public SalSessionEvent -{ - bool m_bShutdown; - bool m_bCancelable; - - SalSessionSaveRequestEvent( bool bShutdown, bool bCancelable ) - : SalSessionEvent( SaveRequest ), - m_bShutdown( bShutdown ), - m_bCancelable( bCancelable ) - {} -}; - -struct SalSessionShutdownCancelEvent : public SalSessionEvent -{ - SalSessionShutdownCancelEvent() - : SalSessionEvent( ShutdownCancel ) - {} -}; - -struct SalSessionQuitEvent : public SalSessionEvent -{ - SalSessionQuitEvent() - : SalSessionEvent( Quit ) - {} -}; - -typedef void(*SessionProc)( SalSessionEvent *pEvent); - -class VCL_DLLPUBLIC SalSession -{ - SessionProc m_aProc; -public: - SalSession() - : m_aProc( 0 ) - {} - virtual ~SalSession(); - - void SetCallback( SessionProc aCallback ) - { - m_aProc = aCallback; - } - void CallCallback( SalSessionEvent* pEvent ) - { - if( m_aProc ) - m_aProc( pEvent ); - } - - // query the session manager for a user interaction slot - virtual void queryInteraction() = 0; - // signal the session manager that we're done with user interaction - virtual void interactionDone() = 0; - // signal that we're done saving - virtual void saveDone() = 0; - // try to cancel the sutdown in progress - virtual bool cancelShutdown() = 0; -}; - -#endif diff --git a/vcl/inc/vcl/salsys.hxx b/vcl/inc/vcl/salsys.hxx deleted file mode 100644 index 310b0a27e30f..000000000000 --- a/vcl/inc/vcl/salsys.hxx +++ /dev/null @@ -1,146 +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 _SV_SALSYS_HXX -#define _SV_SALSYS_HXX - -#include -#include -#include - - -/* Button combinations for ShowNativeMessageBox -*/ -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK = 0; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL = 1; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_ABORT_RETRY_IGNORE = 2; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO_CANCEL = 3; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO = 4; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL = 5; - -/* Button identifier for ShowNativeMessageBox -*/ -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK = 1; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL = 2; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_ABORT = 3; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY = 4; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_IGNORE = 5; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_YES = 6; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO = 7; - - - -// ------------- -// - SalSystem - -// ------------- - -class VCL_DLLPUBLIC SalSystem -{ -public: - SalSystem() {} - virtual ~SalSystem(); - - // get info about the display - - /* Gets the number of active screens attached to the display - - @returns the number of active screens - */ - virtual unsigned int GetDisplayScreenCount() = 0; - /* Queries whether multiple screens are truly separate - - @returns true if screens are distinct and windows cannot - be moved between them or span multiple of them - false if screens form up one big display - */ - virtual bool IsMultiDisplay() = 0; - /* Queries the default screen number. The default screen is the - screen on which windows will appear if no special positioning - is made. - - @returns the default screen number - */ - virtual unsigned int GetDefaultDisplayNumber() = 0; - /* Gets relative position and size of the screens attached to the display - - @param nScreen - The screen number to be queried - - @returns position: (0,0) in case of IsMultiscreen() == true - else position relative to whole display - size: size of the screen - */ - virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) = 0; - /* Gets position and size of the work area of a screen attached to the display - - @param nScreen - The screen number to be queried - - @returns position and size relative to the scree - */ - virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen ) = 0; - /* Gets the name of a screen - - @param nScreen - The screen number to be queried - - @returns the name of the screen - */ - virtual rtl::OUString GetScreenName( unsigned int nScreen ) = 0; - - /* Shows a native message box with the specified title, message and button - combination. - - @param rTitle - The title to be shown by the dialog box. - - @param rMessage - The message to be shown by the dialog box. - - @param nButtonCombination - Specify which button combination the message box should display. - See button combinations above. - - @param nDefaultButton - Specifies which button has the focus initially. - See button identifiers above. - The effect of specifying a button that doesn't belong - to the specified button combination is undefined. - - @returns the identifier of the button that was pressed by the user. - See button identifier above. If the function fails the - return value is 0. - */ - virtual int ShowNativeMessageBox( const String& rTitle, - const String& rMessage, - int nButtonCombination, - int nDefaultButton) = 0; -}; - -SalSystem* ImplGetSalSystem(); - -#endif // _SV_SALSYS_HXX diff --git a/vcl/inc/vcl/saltimer.hxx b/vcl/inc/vcl/saltimer.hxx deleted file mode 100644 index d693070138d2..000000000000 --- a/vcl/inc/vcl/saltimer.hxx +++ /dev/null @@ -1,69 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SALTIMER_HXX -#define _SV_SALTIMER_HXX - -#include -#include -#include - -// ------------ -// - SalTimer - -// ------------ - -/* - * note: there will be only a single instance of SalTimer - * SalTimer originally had only static methods, but - * this needed to be virtualized for the sal plugin migration - */ - -class VCL_DLLPUBLIC SalTimer -{ - SALTIMERPROC m_pProc; -public: - SalTimer() : m_pProc( NULL ) {} - virtual ~SalTimer(); - - // AutoRepeat and Restart - virtual void Start( ULONG nMS ) = 0; - virtual void Stop() = 0; - - // Callbacks (indepen in \sv\source\app\timer.cxx) - void SetCallback( SALTIMERPROC pProc ) - { - m_pProc = pProc; - } - - void CallCallback() - { - if( m_pProc ) - m_pProc(); - } -}; - -#endif // _SV_SALTIMER_HXX diff --git a/vcl/inc/vcl/salvd.hxx b/vcl/inc/vcl/salvd.hxx deleted file mode 100644 index fcbe1fb35383..000000000000 --- a/vcl/inc/vcl/salvd.hxx +++ /dev/null @@ -1,58 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SALVD_HXX -#define _SV_SALVD_HXX - -#include -#include - -class SalGraphics; - -// -------------------- -// - SalVirtualDevice - -// -------------------- - -class VCL_DLLPUBLIC SalVirtualDevice -{ -public: // public for Sal Implementation - SalVirtualDevice() {} - virtual ~SalVirtualDevice(); - - // SalGraphics or NULL, but two Graphics for all SalVirtualDevices - // must be returned - virtual SalGraphics* GetGraphics() = 0; - virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0; - - // Set new size, without saving the old contents - virtual BOOL SetSize( long nNewDX, long nNewDY ) = 0; - - /// Get actual VDev size in pixel - virtual void GetSize( long& rWidth, long& rHeight ) = 0; -}; - -#endif // _SV_SALVD_HXX diff --git a/vcl/inc/vcl/salwtype.hxx b/vcl/inc/vcl/salwtype.hxx deleted file mode 100644 index 95b3806d648b..000000000000 --- a/vcl/inc/vcl/salwtype.hxx +++ /dev/null @@ -1,346 +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 _SV_SALWTYPE_HXX -#define _SV_SALWTYPE_HXX - -#include -#include -#include - -class SalGraphics; -class SalFrame; -class SalObject; -class Window; - -class ImplFontSelectData; - -// --------------- -// - SalExtInput - -// --------------- - -// Muessen mit den Defines in cmdevt.hxx uebereinstimmen, da diese -// nicht konvertiert werden -#define SAL_EXTTEXTINPUT_ATTR_GRAYWAVELINE ((USHORT)0x0100) -#define SAL_EXTTEXTINPUT_ATTR_UNDERLINE ((USHORT)0x0200) -#define SAL_EXTTEXTINPUT_ATTR_BOLDUNDERLINE ((USHORT)0x0400) -#define SAL_EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE ((USHORT)0x0800) -#define SAL_EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE ((USHORT)0x1000) -#define SAL_EXTTEXTINPUT_ATTR_HIGHLIGHT ((USHORT)0x2000) -#define SAL_EXTTEXTINPUT_ATTR_REDTEXT ((USHORT)0x4000) -#define SAL_EXTTEXTINPUT_ATTR_HALFTONETEXT ((USHORT)0x8000) - -#define SAL_EXTTEXTINPUT_CURSOR_INVISIBLE ((USHORT)0x0001) -#define SAL_EXTTEXTINPUT_CURSOR_OVERWRITE ((USHORT)0x0002) - -// ------------ -// - SalEvent - -// ------------ - -#define SALEVENT_MOUSEMOVE ((USHORT)1) -#define SALEVENT_MOUSELEAVE ((USHORT)2) -#define SALEVENT_MOUSEBUTTONDOWN ((USHORT)3) -#define SALEVENT_MOUSEBUTTONUP ((USHORT)4) -#define SALEVENT_KEYINPUT ((USHORT)5) -#define SALEVENT_KEYUP ((USHORT)6) -#define SALEVENT_KEYMODCHANGE ((USHORT)7) -#define SALEVENT_PAINT ((USHORT)8) -#define SALEVENT_RESIZE ((USHORT)9) -#define SALEVENT_GETFOCUS ((USHORT)10) -#define SALEVENT_LOSEFOCUS ((USHORT)11) -#define SALEVENT_CLOSE ((USHORT)12) -#define SALEVENT_SHUTDOWN ((USHORT)13) -#define SALEVENT_SETTINGSCHANGED ((USHORT)14) -#define SALEVENT_VOLUMECHANGED ((USHORT)15) -#define SALEVENT_PRINTERCHANGED ((USHORT)16) -#define SALEVENT_DISPLAYCHANGED ((USHORT)17) -#define SALEVENT_FONTCHANGED ((USHORT)18) -#define SALEVENT_DATETIMECHANGED ((USHORT)19) -#define SALEVENT_KEYBOARDCHANGED ((USHORT)20) -#define SALEVENT_WHEELMOUSE ((USHORT)21) -#define SALEVENT_USEREVENT ((USHORT)22) -#define SALEVENT_MOUSEACTIVATE ((USHORT)23) -#define SALEVENT_EXTTEXTINPUT ((USHORT)24) -#define SALEVENT_ENDEXTTEXTINPUT ((USHORT)25) -#define SALEVENT_EXTTEXTINPUTPOS ((USHORT)26) -#define SALEVENT_INPUTCONTEXTCHANGE ((USHORT)27) -#define SALEVENT_MOVE ((USHORT)28) -#define SALEVENT_MOVERESIZE ((USHORT)29) -#define SALEVENT_CLOSEPOPUPS ((USHORT)30) -#define SALEVENT_EXTERNALKEYINPUT ((USHORT)31) -#define SALEVENT_EXTERNALKEYUP ((USHORT)32) -#define SALEVENT_MENUCOMMAND ((USHORT)33) -#define SALEVENT_MENUHIGHLIGHT ((USHORT)34) -#define SALEVENT_MENUACTIVATE ((USHORT)35) -#define SALEVENT_MENUDEACTIVATE ((USHORT)36) -#define SALEVENT_EXTERNALMOUSEMOVE ((USHORT)37) -#define SALEVENT_EXTERNALMOUSEBUTTONDOWN ((USHORT)38) -#define SALEVENT_EXTERNALMOUSEBUTTONUP ((USHORT)39) -#define SALEVENT_INPUTLANGUAGECHANGE ((USHORT)40) -#define SALEVENT_SHOWDIALOG ((USHORT)41) -#define SALEVENT_MENUBUTTONCOMMAND ((USHORT)42) -#define SALEVENT_SURROUNDINGTEXTREQUEST ((USHORT)43) -#define SALEVENT_SURROUNDINGTEXTSELECTIONCHANGE ((USHORT)44) -#define SALEVENT_STARTRECONVERSION ((USHORT)45) -#define SALEVENT_COUNT ((USHORT)45) - -// MOUSELEAVE must send, when the pointer leave the client area and -// the mouse is not captured -// MOUSEMOVE, MOUSELEAVE, MOUSEBUTTONDOWN and MOUSEBUTTONUP -// MAC: Ctrl+Button is MOUSE_RIGHT -struct SalMouseEvent -{ - ULONG mnTime; // Time in ms, when event is created - long mnX; // X-Position (Pixel, TopLeft-Output) - long mnY; // Y-Position (Pixel, TopLeft-Output) - USHORT mnButton; // 0-MouseMove/MouseLeave, MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE - USHORT mnCode; // SV-ModifierCode (KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT) -}; - -// KEYINPUT and KEYUP -struct SalKeyEvent -{ - ULONG mnTime; // Time in ms, when event is created - USHORT mnCode; // SV-KeyCode (KEY_xxx | KEY_SHIFT | KEY_MOD1 | KEY_MOD2) - USHORT mnCharCode; // SV-CharCode - USHORT mnRepeat; // Repeat-Count (KeyInputs-1) -}; - -// MENUEVENT -struct SalMenuEvent -{ - USHORT mnId; // Menu item ID - void* mpMenu; // pointer to VCL menu (class Menu) - - SalMenuEvent() : mnId( 0 ), mpMenu( NULL ) {} - SalMenuEvent( USHORT i_nId, void* i_pMenu ) - : mnId( i_nId ), mpMenu( i_pMenu ) {} -}; - -// KEYMODCHANGE -struct SalKeyModEvent -{ - ULONG mnTime; // Time in ms, when event is created - USHORT mnCode; // SV-ModifierCode (KEY_SHIFT | KEY_MOD1 | KEY_MOD2) - USHORT mnModKeyCode; // extended Modifier (MODKEY_LEFT, MODKEY_RIGHT, MODKEY_PRESS, MODKEY_RELEASE) -}; - -// PAINT -struct SalPaintEvent -{ - long mnBoundX; // BoundRect - X - long mnBoundY; // BoundRect - Y - long mnBoundWidth; // BoundRect - Width - long mnBoundHeight; // BoundRect - Height - bool mbImmediateUpdate; // set to true to force an immediate update - - SalPaintEvent( long x, long y, long w, long h, bool bImmediate = false ) : - mnBoundX( x ), mnBoundY( y ), - mnBoundWidth( w ), mnBoundHeight( h ), - mbImmediateUpdate( bImmediate ) - {} -}; - -// USEREVENT -// pEvent == pData - -// WHEELMOUSE -#define SAL_WHEELMOUSE_EVENT_PAGESCROLL ((ULONG)0xFFFFFFFF) -struct SalWheelMouseEvent -{ - ULONG mnTime; // Time in ms, when event is created - long mnX; // X-Position (Pixel, TopLeft-Output) - long mnY; // Y-Position (Pixel, TopLeft-Output) - long mnDelta; // Anzahl Drehungen - long mnNotchDelta; // Anzahl feste Drehungen - ULONG mnScrollLines; // Aktuelle Anzahl zu scrollende Zeilen - USHORT mnCode; // SV-ModifierCode (KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT) - BOOL mbHorz; // Horizontal - BOOL mbDeltaIsPixel; // delta value is a pixel value (on mac) - - SalWheelMouseEvent() - : mnTime( 0 ), mnX( 0 ), mnY( 0 ), mnDelta( 0 ), mnNotchDelta( 0 ), mnScrollLines( 0 ), mnCode( 0 ), mbHorz( FALSE ), mbDeltaIsPixel( FALSE ) - {} -}; - -// MOUSEACTIVATE -struct SalMouseActivateEvent -{ - long mnX; // X-Position (Pixel, TopLeft-Output) - long mnY; // Y-Position (Pixel, TopLeft-Output) -}; - -#ifdef __cplusplus - -// EXTTEXTINPUT -struct SalExtTextInputEvent -{ - ULONG mnTime; // Time in ms, when event is created - UniString maText; // Text - const USHORT* mpTextAttr; // Text-Attribute - ULONG mnCursorPos; // Cursor-Position - ULONG mnDeltaStart; // Start-Position der letzten Aenderung - BYTE mnCursorFlags; // SAL_EXTTEXTINPUT_CURSOR_xxx - BOOL mbOnlyCursor; // TRUE: Nur Cursor-Position wurde geaendert -}; - -#endif // __cplusplus - -// EXTTEXTINPUTPOS -struct SalExtTextInputPosEvent -{ - long mnX; // Cursor-X-Position to upper left corner of frame - long mnY; // Cursor-Y-Position to upper left corner of frame - long mnWidth; // Cursor-Width in Pixel - long mnHeight; // Cursor-Height in Pixel - long mnExtWidth; // Width of the PreEdit area - bool mbVertical; // true if in vertical mode -}; - -#ifdef __cplusplus - -// INPUTCONTEXTCHANGE -struct SalInputContextChangeEvent -{ - LanguageType meLanguage; // Neue Sprache -}; - -#endif // __cplusplus - -#ifdef __cplusplus - -// SURROUNDINGTEXTREQUEST -struct SalSurroundingTextRequestEvent -{ - UniString maText; // Text - ULONG mnStart; // The beggining index of selected range - ULONG mnEnd; // The end index of selected range -}; - -#endif // __cplusplus - -#ifdef __cplusplus - -// SURROUNDINGTEXTSELECTIONCHANGE -struct SalSurroundingTextSelectionChangeEvent -{ - ULONG mnStart; // The beggining index of selected range - ULONG mnEnd; // The end index of selected range -}; - -#endif // __cplusplus - -// ------------------ -// - SalFrame-Types - -// ------------------ - -typedef long (*SALFRAMEPROC)( Window* pInst, SalFrame* pFrame, - USHORT nEvent, const void* pEvent ); - -// -------------------- -// - SalObject-Events - -// -------------------- - -#define SALOBJ_EVENT_GETFOCUS ((USHORT)1) -#define SALOBJ_EVENT_LOSEFOCUS ((USHORT)2) -#define SALOBJ_EVENT_TOTOP ((USHORT)3) -#define SALOBJ_EVENT_COUNT ((USHORT)4) - -// ------------------ -// - SalObject-Types - -// ------------------ - -typedef long (*SALOBJECTPROC)( void* pInst, SalObject* pObject, - USHORT nEvent, const void* pEvent ); - -// ----------------- -// - SalFrameState - -// ----------------- - -// Must be the same as in syswin.hxx -#define SAL_FRAMESTATE_MASK_X ((ULONG)0x00000001) -#define SAL_FRAMESTATE_MASK_Y ((ULONG)0x00000002) -#define SAL_FRAMESTATE_MASK_WIDTH ((ULONG)0x00000004) -#define SAL_FRAMESTATE_MASK_HEIGHT ((ULONG)0x00000008) -#define SAL_FRAMESTATE_MASK_MAXIMIZED_X ((ULONG)0x00000100) -#define SAL_FRAMESTATE_MASK_MAXIMIZED_Y ((ULONG)0x00000200) -#define SAL_FRAMESTATE_MASK_MAXIMIZED_WIDTH ((ULONG)0x00000400) -#define SAL_FRAMESTATE_MASK_MAXIMIZED_HEIGHT ((ULONG)0x00000800) -#define SAL_FRAMESTATE_MASK_STATE ((ULONG)0x00000010) - -#define SAL_FRAMESTATE_NORMAL ((ULONG)0x00000001) -#define SAL_FRAMESTATE_MINIMIZED ((ULONG)0x00000002) -#define SAL_FRAMESTATE_MAXIMIZED ((ULONG)0x00000004) -#define SAL_FRAMESTATE_ROLLUP ((ULONG)0x00000008) -#define SAL_FRAMESTATE_MAXIMIZED_HORZ ((ULONG)0x00000010) -#define SAL_FRAMESTATE_MAXIMIZED_VERT ((ULONG)0x00000020) -#define SAL_FRAMESTATE_SYSTEMMASK ((ULONG)0x0000FFFF) - -struct SalFrameState -{ - ULONG mnMask; - long mnX; - long mnY; - long mnWidth; - long mnHeight; - long mnMaximizedX; - long mnMaximizedY; - long mnMaximizedWidth; - long mnMaximizedHeight; - ULONG mnState; -}; - -// ------------------- -// - SalInputContext - -// ------------------- - -// Muessen mit den Defines in inputctx.hxx uebereinstimmen, da diese -// nicht konvertiert werden -#define SAL_INPUTCONTEXT_TEXT ((ULONG)0x00000001) -#define SAL_INPUTCONTEXT_EXTTEXTINPUT ((ULONG)0x00000002) -#define SAL_INPUTCONTEXT_EXTTEXTINPUT_ON ((ULONG)0x00000004) -#define SAL_INPUTCONTEXT_EXTTEXTINPUT_OFF ((ULONG)0x00000008) -#define SAL_INPUTCONTEXT_CHANGELANGUAGE ((ULONG)0x00000010) - -#ifdef __cplusplus - -struct SalInputContext -{ - ImplFontSelectData* mpFont; - LanguageType meLanguage; - ULONG mnOptions; -}; - -#endif // __cplusplus - -// ------------------ -// - SalTimer-Types - -// ------------------ - -typedef void (*SALTIMERPROC)(); - -#endif // _SV_SALWTYPE_HXX diff --git a/vcl/inc/vcl/subedit.hxx b/vcl/inc/vcl/subedit.hxx deleted file mode 100644 index 3ea1eaffa864..000000000000 --- a/vcl/inc/vcl/subedit.hxx +++ /dev/null @@ -1,48 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SUBEDIT_HXX -#define _SV_SUBEDIT_HXX - -#include -#include - -// --------------- -// - ImplSubEdit - -// --------------- - -class ImplSubEdit : public Edit -{ -public: - ImplSubEdit( Edit* pParent, WinBits nStyle ); - - Edit* GetParent() const { return (Edit*)Edit::GetParent(); } - - virtual void Modify(); -}; - -#endif // _SV_SUBEDIT_HXX diff --git a/vcl/inc/vcl/svcompat.hxx b/vcl/inc/vcl/svcompat.hxx deleted file mode 100644 index 9e461da4e54b..000000000000 --- a/vcl/inc/vcl/svcompat.hxx +++ /dev/null @@ -1,70 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SVCOMPAT_HXX -#define _SV_SVCOMPAT_HXX - -#include - -// ----------- -// - Defines - -// ----------- - -#define COMPAT_FORMAT( char1, char2, char3, char4 ) \ - ((ULONG)((((ULONG)(char)(char1)))| \ - (((ULONG)(char)(char2))<<8UL)| \ - (((ULONG)(char)(char3))<<16UL)| \ - ((ULONG)(char)(char4))<<24UL)) - - -class SvStream; - -// -------------- -// - ImplCompat - -// -------------- - -class ImplCompat -{ - SvStream* mpRWStm; - UINT32 mnCompatPos; - UINT32 mnTotalSize; - UINT16 mnStmMode; - UINT16 mnVersion; - - ImplCompat() {} - ImplCompat( const ImplCompat& rCompat ) {} - ImplCompat& operator=( const ImplCompat& rCompat ) { return *this; } - BOOL operator==( const ImplCompat& rCompat ) { return FALSE; } - -public: - ImplCompat( SvStream& rStm, USHORT nStreamMode, UINT16 nVersion = 1 ); - ~ImplCompat(); - - UINT16 GetVersion() const { return mnVersion; } -}; - -#endif // _SV_SVCOMPAT_HXX diff --git a/vcl/inc/vcl/svdata.hxx b/vcl/inc/vcl/svdata.hxx deleted file mode 100644 index 67aa6806be49..000000000000 --- a/vcl/inc/vcl/svdata.hxx +++ /dev/null @@ -1,463 +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 _SV_SVDATA_HXX -#define _SV_SVDATA_HXX - -#include "vos/thread.hxx" -#include "tools/string.hxx" -#include "tools/gen.hxx" -#include "tools/shl.hxx" -#include "tools/link.hxx" -#include "tools/fldunit.hxx" -#include "vcl/vclevent.hxx" -#include "vcl/sv.h" -#include "tools/color.hxx" -#include "tools/debug.hxx" -#include "vcl/dllapi.h" -#include "com/sun/star/uno/Reference.hxx" -#include "unotools/options.hxx" - -namespace com { -namespace sun { -namespace star { -namespace lang { - class XMultiServiceFactory; -} -namespace frame { - class XSessionManagerClient; -} -namespace awt { - class XDisplayConnection; -} -}}} - -struct ImplTimerData; -struct ImplFileImageCacheData; -struct ImplConfigData; -class ImplDirectFontSubstitution; -struct ImplHotKey; -struct ImplEventHook; -class Point; -class Rectangle; -class ImpResMgr; -class ResMgr; -class UniqueIndex; -class ImplAccelManager; -class ImplDevFontList; -class ImplFontCache; -class HelpTextWindow; -class ImplTBDragMgr; -class ImplButtonList; -class ImplIdleMgr; -class DbgWindow; -class FloatingWindow; -class AllSettings; -class KeyCode; -class NotifyEvent; -class Timer; -class AutoTimer; -class Help; -class ImageList; -class Image; -class PopupMenu; -class Application; -class OutputDevice; -class Window; -class SystemWindow; -class WorkWindow; -class Dialog; -class VirtualDevice; -class Printer; -class SalFrame; -class SalInstance; -class SalSystem; -class SalProcessWindowList; -class SalTrayList; -class UniqueIdContainer; -class List; -class ImplPrnQueueList; -class ImplVDevCache; -class UnoWrapperBase; -class GraphicConverter; -class ImplWheelWindow; -class SalTimer; -class SalI18NImeStatus; -class DockingManager; -class VclEventListeners2; - -namespace vos { class OMutex; } -namespace vos { class OCondition; } -namespace vcl { class DisplayConnection; class SettingsConfigItem; class DeleteOnDeinitBase; } -namespace utl { class DefaultFontConfiguration; class FontSubstConfiguration; } - -// ----------------- -// - ImplSVAppData - -// ----------------- -class LocaleConfigurationListener : public utl::ConfigurationListener -{ -public: - virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ); -}; - -struct ImplSVAppData -{ - enum ImeStatusWindowMode - { - ImeStatusWindowMode_UNKNOWN, - ImeStatusWindowMode_HIDE, - ImeStatusWindowMode_SHOW - }; - - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF; - String* mpMSFTempFileName; - AllSettings* mpSettings; // Application settings - LocaleConfigurationListener* mpCfgListener; - VclEventListeners* mpEventListeners; // listeners for vcl events (eg, extended toolkit) - VclEventListeners* mpKeyListeners; // listeners for key events only (eg, extended toolkit) - ImplAccelManager* mpAccelMgr; // Accelerator Manager - XubString* mpAppName; // Application name - XubString* mpAppFileName; // Abs. Application FileName - XubString* mpDisplayName; // Application Display Name - String* mpFontPath; // Additional Fontpath - Help* mpHelp; // Application help - PopupMenu* mpActivePopupMenu; // Actives Popup-Menu (in Execute) - UniqueIdContainer* mpUniqueIdCont; // Fuer Eindeutige Id's - ImplIdleMgr* mpIdleMgr; // Idle-Manager - ImplWheelWindow* mpWheelWindow; // WheelWindow - ImplHotKey* mpFirstHotKey; // HotKey-Verwaltung - ImplEventHook* mpFirstEventHook; // Event-Hooks - VclEventListeners2* mpPostYieldListeners; // post yield listeners - ULONG mnLastInputTime; // GetLastInputTime() - USHORT mnDispatchLevel; // DispatchLevel - USHORT mnModalMode; // ModalMode Count - USHORT mnModalDialog; // ModalDialog Count - USHORT mnAccessCount; // AccessHdl Count - USHORT mnSysWinMode; // Modus, wann SystemWindows erzeugt werden sollen - USHORT mnLayout; // --- RTL-Flags --- currently not used, only for testing - short mnDialogScaleX; // Scale X-Positions and sizes in Dialogs - BOOL mbInAppMain; // is Application::Main() on stack - BOOL mbInAppExecute; // is Application::Execute() on stack - BOOL mbAppQuit; // is Application::Quit() called - BOOL mbSettingsInit; // TRUE: Settings are initialized - BOOL mbDialogCancel; // TRUE: Alle Dialog::Execute()-Aufrufe werden mit return FALSE sofort beendet - BOOL mbNoYield; // Application::Yield will not wait for events if the queue is empty - // essentially that makes it the same as Application::Reschedule - long mnDefaultLayoutBorder; // default value in pixel for layout distances used - // in window arrangers - - /** Controls whether showing any IME status window is toggled on or off. - - Only meaningful if showing IME status windows can be toggled on and off - externally (see Application::CanToggleImeStatusWindow). - */ - ImeStatusWindowMode meShowImeStatusWindow; - - DECL_STATIC_LINK( ImplSVAppData, ImplQuitMsg, void* ); - -}; - - -// ----------------- -// - ImplSVGDIData - -// ----------------- - -struct ImplSVGDIData -{ - OutputDevice* mpFirstWinGraphics; // First OutputDevice with a Frame Graphics - OutputDevice* mpLastWinGraphics; // Last OutputDevice with a Frame Graphics - OutputDevice* mpFirstVirGraphics; // First OutputDevice with a VirtualDevice Graphics - OutputDevice* mpLastVirGraphics; // Last OutputDevice with a VirtualDevice Graphics - OutputDevice* mpFirstPrnGraphics; // First OutputDevice with a InfoPrinter Graphics - OutputDevice* mpLastPrnGraphics; // Last OutputDevice with a InfoPrinter Graphics - VirtualDevice* mpFirstVirDev; // First VirtualDevice - VirtualDevice* mpLastVirDev; // Last VirtualDevice - Printer* mpFirstPrinter; // First Printer - Printer* mpLastPrinter; // Last Printer - ImplPrnQueueList* mpPrinterQueueList; // List of all printer queue - ImplDevFontList* mpScreenFontList; // Screen-Font-List - ImplFontCache* mpScreenFontCache; // Screen-Font-Cache - ImplDirectFontSubstitution* mpDirectFontSubst;// Font-Substitutons defined in Tools->Options->Fonts - GraphicConverter* mpGrfConverter; // Converter for graphics - long mnRealAppFontX; // AppFont X-Numenator for 40/tel Width - long mnAppFontX; // AppFont X-Numenator for 40/tel Width + DialogScaleX - long mnAppFontY; // AppFont Y-Numenator for 80/tel Height - BOOL mbFontSubChanged; // TRUE: FontSubstitution wurde zwischen Begin/End geaendert - utl::DefaultFontConfiguration* mpDefaultFontConfiguration; - utl::FontSubstConfiguration* mpFontSubstConfiguration; - bool mbNativeFontConfig; // true: do not override UI font - bool mbNoXORClipping; // true: do not use XOR to achieve clipping effects -}; - - -// ----------------- -// - ImplSVWinData - -// ----------------- - -struct ImplSVWinData -{ - Window* mpFirstFrame; // First FrameWindow - Window* mpDefDialogParent; // Default Dialog Parent - WorkWindow* mpAppWin; // Application-Window - Window* mpFocusWin; // window, that has the focus - Window* mpActiveApplicationFrame; // the last active application frame, can be used as DefModalDialogParent if no focuswin set - Window* mpCaptureWin; // window, that has the mouse capture - Window* mpLastDeacWin; // Window, that need a deactivate (FloatingWindow-Handling) - DbgWindow* mpDbgWin; // debug window - FloatingWindow* mpFirstFloat; // First FloatingWindow in PopupMode - Dialog* mpLastExecuteDlg; // Erster Dialog, der sich in Execute befindet - Window* mpExtTextInputWin; // Window, which is in ExtTextInput - Window* mpTrackWin; // window, that is in tracking mode - AutoTimer* mpTrackTimer; // tracking timer - ImageList* mpMsgBoxImgList; // ImageList for MessageBox - ImageList* mpMsgBoxHCImgList; // ImageList for MessageBox (high contrast mode) - Window* mpAutoScrollWin; // window, that is in AutoScrollMode mode - USHORT mnTrackFlags; // tracking flags - USHORT mnAutoScrollFlags; // auto scroll flags - BOOL mbNoDeactivate; // TRUE: keine Deactivate durchfuehren - BOOL mbNoSaveFocus; // TRUE: menues must not save/restore focus - BOOL mbNoSaveBackground; // TRUE: save background is unnecessary or even less performant -}; - - -// ------------------ -// - ImplSVCtrlData - -// ------------------ - -typedef std::vector< std::pair< String, FieldUnit > > FieldUnitStringList; - -struct ImplSVCtrlData -{ - ImageList* mpCheckImgList; // ImageList for CheckBoxes - ImageList* mpRadioImgList; // ImageList for RadioButtons - ImageList* mpPinImgList; // ImageList for PIN - ImageList* mpSplitHPinImgList; // ImageList for Horizontale SplitWindows - ImageList* mpSplitVPinImgList; // ImageList for Vertikale SplitWindows (PIN's) - ImageList* mpSplitHArwImgList; // ImageList for Horizontale SplitWindows (Arrows) - ImageList* mpSplitVArwImgList; // ImageList for Vertikale SplitWindows (Arrows) - Image* mpDisclosurePlus; - Image* mpDisclosurePlusHC; - Image* mpDisclosureMinus; - Image* mpDisclosureMinusHC; - ImplTBDragMgr* mpTBDragMgr; // DragMgr for ToolBox - USHORT mnCheckStyle; // CheckBox-Style for ImageList-Update - USHORT mnRadioStyle; // Radio-Style for ImageList-Update - ULONG mnLastCheckFColor; // Letzte FaceColor fuer CheckImage - ULONG mnLastCheckWColor; // Letzte WindowColor fuer CheckImage - ULONG mnLastCheckWTextColor; // Letzte WindowTextColor fuer CheckImage - ULONG mnLastCheckLColor; // Letzte LightColor fuer CheckImage - ULONG mnLastRadioFColor; // Letzte FaceColor fuer RadioImage - ULONG mnLastRadioWColor; // Letzte WindowColor fuer RadioImage - ULONG mnLastRadioLColor; // Letzte LightColor fuer RadioImage - FieldUnitStringList* mpFieldUnitStrings; // list with field units - FieldUnitStringList* mpCleanUnitStrings; // same list but with some "fluff" like spaces removed -}; - - -// ------------------ -// - ImplSVHelpData - -// ------------------ - -struct ImplSVHelpData -{ - BOOL mbContextHelp : 1; // is ContextHelp enabled - BOOL mbExtHelp : 1; // is ExtendedHelp enabled - BOOL mbExtHelpMode : 1; // is in ExtendedHelp Mode - BOOL mbOldBalloonMode : 1; // BallonMode, befor ExtHelpMode started - BOOL mbBalloonHelp : 1; // is BalloonHelp enabled - BOOL mbQuickHelp : 1; // is QuickHelp enabled - BOOL mbSetKeyboardHelp : 1; // tiphelp was activated by keyboard - BOOL mbKeyboardHelp : 1; // tiphelp was activated by keyboard - BOOL mbAutoHelpId : 1; // generate HelpIds - BOOL mbRequestingHelp : 1; // In Window::RequestHelp - HelpTextWindow* mpHelpWin; // HelpWindow - ULONG mnLastHelpHideTime; // ticks of last show -}; - -struct ImplSVNWFData -{ - bool mbMenuBarDockingAreaCommonBG; // e.g. WinXP default theme - bool mbDockingAreaSeparateTB; // individual toolbar backgrounds - // instead of one for docking area - bool mbToolboxDropDownSeparate; // two adjacent buttons for - // toolbox dropdown buttons - int mnMenuFormatExtraBorder; // inner popup menu border - bool mbFlatMenu; // no popup 3D border - Color maMenuBarHighlightTextColor; // override higlight text color - // in menubar if not transparent - bool mbOpenMenuOnF10; // on gnome the first menu opens on F10 - bool mbNoFocusRects; // on Aqua focus rects are not used - bool mbNoBoldTabFocus; // on Aqua and Gnome the focused tab has not bold text - bool mbCenteredTabs; // on Aqua, tabs are centered - bool mbNoActiveTabTextRaise; // on Aqua the text for the selected tab - // should not "jump up" a pixel - bool mbProgressNeedsErase; // set true for platforms that should draw the - // window background before drawing the native - // progress bar - bool mbCheckBoxNeedsErase; // set true for platforms that should draw the - // window background before drawing the native - // checkbox - bool mbScrollbarJumpPage; // true for "jump to here" behavior - int mnStatusBarLowerRightOffset; // amount in pixel to avoid in the lower righthand corner - bool mbCanDrawWidgetAnySize; // set to true currently on gtk -}; - - -// -------------- -// - ImplSVData - -// -------------- - -struct ImplSVData -{ - void* mpSalData; // SalData - SalInstance* mpDefInst; // Default SalInstance - Application* mpApp; // pApp - WorkWindow* mpDefaultWin; // Default-Window - BOOL mbDeInit; // Is VCL deinitializing - ULONG mnThreadCount; // is VCL MultiThread enabled - ImplConfigData* mpFirstConfigData; // Zeiger auf ersten Config-Block - ImplTimerData* mpFirstTimerData; // list of all running timers - SalTimer* mpSalTimer; // interface to sal event loop/timers - SalI18NImeStatus* mpImeStatus; // interface to ime status window - SalSystem* mpSalSystem; // SalSystem interface - ResMgr* mpResMgr; // SV-Resource-Manager - ULONG mnTimerPeriod; // current timer period - ULONG mnTimerUpdate; // TimerCallbackProcs on stack - BOOL mbNotAllTimerCalled;// TRUE: Es muessen noch Timer abgearbeitet werden - BOOL mbNoCallTimer; // TRUE: No Timeout calls - ImplSVAppData maAppData; // indepen data for class Application - ImplSVGDIData maGDIData; // indepen data for Output classes - ImplSVWinData maWinData; // indepen data for Windows classes - ImplSVCtrlData maCtrlData; // indepen data for Control classes - ImplSVHelpData maHelpData; // indepen data for Help classes - ImplSVNWFData maNWFData; - UnoWrapperBase* mpUnoWrapper; - Window* mpIntroWindow; // the splash screen - DockingManager* mpDockingManager; - BOOL mbIsTestTool; - - vos::OThread::TThreadIdentifier mnMainThreadId; - ::com::sun::star::uno::Reference< - ::com::sun::star::awt::XDisplayConnection > mxDisplayConnection; - - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxAccessBridge; - com::sun::star::uno::Reference< com::sun::star::frame::XSessionManagerClient > xSMClient; - ::vcl::SettingsConfigItem* mpSettingsConfigItem; - std::list< vcl::DeleteOnDeinitBase* >* mpDeinitDeleteList; -}; - -void ImplInitSVData(); -void ImplDeInitSVData(); -void ImplDestroySVData(); -Window* ImplGetDefaultWindow(); -VCL_DLLPUBLIC ResMgr* ImplGetResMgr(); -VCL_DLLPUBLIC ResId VclResId( sal_Int32 nId ); // throws std::bad_alloc if no res mgr -DockingManager* ImplGetDockingManager(); -void ImplWindowAutoMnemonic( Window* pWindow ); - -void ImplUpdateSystemProcessWindow(); -Window* ImplFindWindow( const SalFrame* pFrame, Point& rSalFramePos ); - -// SVAPP.CXX -BOOL ImplCallHotKey( const KeyCode& rKeyCode ); -void ImplFreeHotKeyData(); -void ImplFreeEventHookData(); - -// WINPROC.CXX -long ImplCallPreNotify( NotifyEvent& rEvt ); -long ImplCallEvent( NotifyEvent& rEvt ); - -extern VCL_DLLPUBLIC ImplSVData* pImplSVData; -inline VCL_DLLPUBLIC ImplSVData* ImplGetSVData() { return pImplSVData; } -inline ImplSVData* ImplGetAppSVData() { return ImplGetSVData(); } - -bool ImplInitAccessBridge( BOOL bAllowCancel, BOOL &rCancelled ); - -FieldUnitStringList* ImplGetFieldUnits(); -FieldUnitStringList* ImplGetCleanedFieldUnits(); - - -// ----------------------------------------------------------------------- - -// ----------------- -// - ImplSVEmpyStr - -// ----------------- - -// Empty-SV-String - -inline const String& ImplGetSVEmptyStr() - { return String::EmptyString(); } -inline const ByteString& ImplGetSVEmptyByteStr() - { return ByteString::EmptyString(); } - -// ----------------------------------------------------------------------- - -// ---------------------- -// - struct ImplDelData - -// ---------------------- -// ImplDelData is used as a "dog tag" by a window when it -// does something that could indirectly destroy the window -// TODO: wild destruction of a window should not be possible - -struct ImplDelData -{ - ImplDelData* mpNext; - const Window* mpWindow; - BOOL mbDel; - - ImplDelData( const Window* pWindow = NULL ) - : mpNext( NULL ), mpWindow( NULL ), mbDel( FALSE ) - { if( pWindow ) AttachToWindow( pWindow ); } - - virtual ~ImplDelData(); - - bool IsDead() const - { - DBG_ASSERT( mbDel == FALSE, "object deleted while in use !" ); - return (mbDel!=FALSE); - } - BOOL /*deprecated */IsDelete() const { return (BOOL)IsDead(); } - -private: - void AttachToWindow( const Window* ); -}; - -// --------------- -// - ImplSVEvent - -// --------------- - -struct ImplSVEvent -{ - ULONG mnEvent; - void* mpData; - Link* mpLink; - Window* mpWindow; - ImplDelData maDelData; - BOOL mbCall; -}; - -#endif // _SV_SVDATA_HXX diff --git a/vcl/inc/vcl/svids.hrc b/vcl/inc/vcl/svids.hrc deleted file mode 100644 index 432a30c3a748..000000000000 --- a/vcl/inc/vcl/svids.hrc +++ /dev/null @@ -1,260 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SVIDS_HRC -#define _SV_SVIDS_HRC - -#include "svl/solar.hrc" - -#define SV_RESID_STDOFFSET 0 -#define SV_RESID_MONOOFFSET 1 - -// Achtung: Diese Id's muessen min. 10 Werte auseinanderliegen, da -// je nach Style noch ein Offset aufgerechnet wird -#define SV_RESID_BITMAP_CHECK 1000 -#define SV_RESID_BITMAP_RADIO 1010 - -#define SV_RESID_BITMAP_MSGBOX 1020 -#define SV_RESID_BITMAP_MSGBOX_HC 1021 - -#define SV_RESID_BITMAP_PIN 1030 - -#define SV_RESID_BITMAP_SPLITHPIN 1040 -#define SV_RESID_BITMAP_SPLITVPIN 1041 -#define SV_RESID_BITMAP_SPLITHARW 1042 -#define SV_RESID_BITMAP_SPLITVARW 1043 - -#define SV_RESID_BITMAP_SCROLLMSK 1050 -#define SV_RESID_BITMAP_SCROLLBMP 1051 -#define SV_RESID_BITMAP_CLOSEDOC 1052 -#define SV_RESID_BITMAP_CLOSEDOCHC 1053 - -#define SV_DISCLOSURE_PLUS 1060 -#define SV_DISCLOSURE_MINUS 1061 -#define SV_DISCLOSURE_PLUS_HC 1062 -#define SV_DISCLOSURE_MINUS_HC 1063 - -#define SV_RESID_MENU_EDIT 2000 -#define SV_MENU_EDIT_UNDO 1 -#define SV_MENU_EDIT_CUT 2 -#define SV_MENU_EDIT_COPY 3 -#define SV_MENU_EDIT_PASTE 4 -#define SV_MENU_EDIT_DELETE 5 -#define SV_MENU_EDIT_SELECTALL 6 -#define SV_MENU_EDIT_INSERTSYMBOL 7 -#define SV_RESID_STRING_NOSELECTIONPOSSIBLE 2001 - -#define SV_MENU_MAC_SERVICES 2002 -#define SV_MENU_MAC_HIDEAPP 2003 -#define SV_MENU_MAC_HIDEALL 2004 -#define SV_MENU_MAC_SHOWALL 2005 -#define SV_MENU_MAC_QUITAPP 2006 - -#define SV_DLG_PRINT 2048 -#define SV_PRINT_OK 1 -#define SV_PRINT_CANCEL 2 -#define SV_PRINT_HELP 3 -#define SV_PRINT_PAGE_PREVIEW 4 -#define SV_PRINT_PAGE_TXT 5 -#define SV_PRINT_PAGE_FORWARD 6 -#define SV_PRINT_PAGE_BACKWARD 7 -#define SV_PRINT_PAGE_EDIT 8 -#define SV_PRINT_TABCTRL 9 -#define SV_PRINT_PRT_TYPE 10 -#define SV_PRINT_PRT_STATUS 11 -#define SV_PRINT_PRT_LOCATION 12 -#define SV_PRINT_PRT_COMMENT 13 -#define SV_PRINT_TOFILE_TXT 14 -#define SV_PRINT_DEFPRT_TXT 15 -#define SV_PRINT_PRINTPREVIEW_TXT 16 - -#define SV_PRINT_TAB_NUP 1 -#define SV_PRINT_PRT_NUP_LAYOUT_FL 1 -#define SV_PRINT_PRT_NUP_DEFAULT_BTN 2 -#define SV_PRINT_PRT_NUP_BROCHURE_BTN 3 -#define SV_PRINT_PRT_NUP_PAGES_BTN 4 -#define SV_PRINT_PRT_NUP_PAGES_BOX 5 -#define SV_PRINT_PRT_NUP_NUM_PAGES_TXT 6 -#define SV_PRINT_PRT_NUP_COLS_EDT 7 -#define SV_PRINT_PRT_NUP_TIMES_TXT 8 -#define SV_PRINT_PRT_NUP_ROWS_EDT 9 -#define SV_PRINT_PRT_NUP_MARGINS_PAGES_1_TXT 10 -#define SV_PRINT_PRT_NUP_MARGINS_PAGES_EDT 11 -#define SV_PRINT_PRT_NUP_MARGINS_PAGES_2_TXT 12 -#define SV_PRINT_PRT_NUP_MARGINS_SHEET_1_TXT 13 -#define SV_PRINT_PRT_NUP_MARGINS_SHEET_EDT 14 -#define SV_PRINT_PRT_NUP_MARGINS_SHEET_2_TXT 15 -#define SV_PRINT_PRT_NUP_ORIENTATION_TXT 16 -#define SV_PRINT_PRT_NUP_ORIENTATION_BOX 17 -#define SV_PRINT_PRT_NUP_ORDER_TXT 18 -#define SV_PRINT_PRT_NUP_ORDER_BOX 19 -#define SV_PRINT_PRT_NUP_BORDER_CB 20 - -#define SV_PRINT_PRT_NUP_ORIENTATION_AUTOMATIC 0 -#define SV_PRINT_PRT_NUP_ORIENTATION_PORTRAIT 1 -#define SV_PRINT_PRT_NUP_ORIENTATION_LANDSCAPE 2 - -#define SV_PRINT_PRT_NUP_ORDER_LRTB 0 -#define SV_PRINT_PRT_NUP_ORDER_TBLR 1 -#define SV_PRINT_PRT_NUP_ORDER_TBRL 2 -#define SV_PRINT_PRT_NUP_ORDER_RLTB 3 - -#define SV_PRINT_TAB_JOB 2 -#define SV_PRINT_PRINTERS_FL 1 -#define SV_PRINT_PRINTERS 2 -#define SV_PRINT_PRT_SETUP 3 -#define SV_PRINT_RANGE 4 -#define SV_PRINT_ALL 5 -#define SV_PRINT_PAGERANGE 6 -#define SV_PRINT_SELECTION 7 -#define SV_PRINT_PAGERANGE_EDIT 8 -#define SV_PRINT_COPIES 9 -#define SV_PRINT_COPYCOUNT 10 -#define SV_PRINT_COPYCOUNT_FIELD 11 -#define SV_PRINT_COLLATE 12 -#define SV_PRINT_COLLATE_IMAGE 13 -#define SV_PRINT_BUTTONLINE 14 -#define SV_PRINT_COLLATE_IMG 15 -#define SV_PRINT_NOCOLLATE_IMG 16 -#define SV_PRINT_COLLATE_HC_IMG 17 -#define SV_PRINT_NOCOLLATE_HC_IMG 18 -#define SV_PRINT_NOPAGES 19 -#define SV_PRINT_STATUS_TXT 20 -#define SV_PRINT_LOCATION_TXT 21 -#define SV_PRINT_COMMENT_TXT 22 -#define SV_PRINT_DETAILS_BTN 23 - -#define SV_PRINT_TAB_OPT 3 -#define SV_PRINT_OPT_PRINT_FL 1 -#define SV_PRINT_OPT_TOFILE 2 -#define SV_PRINT_OPT_SINGLEJOBS 3 -#define SV_PRINT_OPT_REVERSE 4 - -#define SV_DLG_PRINT_PROGRESS 2049 -#define SV_PRINT_PROGRESS_CANCEL 1 -#define SV_PRINT_PROGRESS_TEXT 2 - -#define SV_PRINT_NATIVE_STRINGS 2050 -#define SV_PRINT_NOPRINTERWARNING 2051 -#define SV_PRINT_NOCONTENT 2052 - -#define SV_HELPTEXT_CLOSE 10000 -#define SV_HELPTEXT_MINIMIZE 10001 -#define SV_HELPTEXT_MAXIMIZE 10002 -#define SV_HELPTEXT_RESTORE 10003 -#define SV_HELPTEXT_ROLLDOWN 10004 -#define SV_HELPTEXT_ROLLUP 10005 -#define SV_HELPTEXT_HELP 10006 -#define SV_HELPTEXT_ALWAYSVISIBLE 10007 -#define SV_HELPTEXT_FADEIN 10008 -#define SV_HELPTEXT_FADEOUT 10009 -#define SV_HELPTEXT_SPLITFLOATING 10010 -#define SV_HELPTEXT_SPLITFIXED 10011 -#define SV_HELPTEXT_CLOSEDOCUMENT 10012 - -#define SV_BUTTONTEXT_OK 10100 -#define SV_BUTTONTEXT_CANCEL 10101 -#define SV_BUTTONTEXT_YES 10102 -#define SV_BUTTONTEXT_NO 10103 -#define SV_BUTTONTEXT_RETRY 10104 -#define SV_BUTTONTEXT_HELP 10105 -#define SV_BUTTONTEXT_CLOSE SV_HELPTEXT_CLOSE -#define SV_BUTTONTEXT_MORE 10107 -#define SV_BUTTONTEXT_IGNORE 10108 -#define SV_BUTTONTEXT_ABORT 10109 -#define SV_BUTTONTEXT_LESS 10110 - -#define SV_STDTEXT_FIRST SV_STDTEXT_SERVICENOTAVAILABLE -#define SV_STDTEXT_SERVICENOTAVAILABLE 10200 -#define SV_STDTEXT_DONTHINTAGAIN 10201 -#define SV_STDTEXT_DONTASKAGAIN 10202 -#define SV_STDTEXT_DONTWARNAGAIN 10203 -#define SV_STDTEXT_ABOUT 10204 -#define SV_STDTEXT_PREFERENCES 10205 -#define SV_MAC_SCREENNNAME 10206 -#define SV_STDTEXT_ALLFILETYPES 10207 -#define SV_STDTEXT_LAST SV_STDTEXT_ALLFILETYPES - -#define SV_ACCESSERROR_FIRST SV_ACCESSERROR_WRONG_VERSION -#define SV_ACCESSERROR_WRONG_VERSION 10500 -#define SV_ACCESSERROR_BRIDGE_MSG 10501 -#define SV_ACCESSERROR_OK_CANCEL_MSG 10502 -#define SV_ACCESSERROR_MISSING_BRIDGE 10503 -#define SV_ACCESSERROR_FAULTY_JAVA 10504 -#define SV_ACCESSERROR_JAVA_MSG 10505 -#define SV_ACCESSERROR_MISSING_JAVA 10506 -#define SV_ACCESSERROR_JAVA_NOT_CONFIGURED 10507 -#define SV_ACCESSERROR_JAVA_DISABLED 10508 -#define SV_ACCESSERROR_TURNAROUND_MSG 10509 -#define SV_ACCESSERROR_NO_FONTS 10510 -#define SV_ACCESSERROR_LAST SV_ACCESSERROR_NO_FONTS - -#define SV_SHORTCUT_HELP 10600 -#define SV_SHORTCUT_CONTEXTHELP 10601 -#define SV_SHORTCUT_ACTIVEHELP 10602 -#define SV_SHORTCUT_DOCKUNDOCK 10603 -#define SV_SHORTCUT_NEXTSUBWINDOW 10604 -#define SV_SHORTCUT_PREVSUBWINDOW 10605 -#define SV_SHORTCUT_TODOCUMENT 10606 -#define SV_SHORTCUT_MENUBAR 10607 -#define SV_SHORTCUT_SPLITTER 10608 - -#define SV_EDIT_WARNING_BOX 10650 - -#define SV_FUNIT_STRINGS 10700 - -#define SV_ICON_SIZE48_START 20000 -#define SV_ICON_SIZE32_START 21000 -#define SV_ICON_SIZE16_START 23000 - -#define SV_ICON_LARGE_START 24000 -#define SV_ICON_SMALL_START 25000 -#define SV_ICON_LARGE_HC_START 26000 -#define SV_ICON_SMALL_HC_START 27000 - -#define SV_ICON_ID_OFFICE 1 -#define SV_ICON_ID_TEXT 2 -#define SV_ICON_ID_TEXT_TEMPLATE 3 -#define SV_ICON_ID_SPREADSHEET 4 -#define SV_ICON_ID_SPREADSHEET_TEMPLATE 5 -#define SV_ICON_ID_DRAWING 6 -#define SV_ICON_ID_DRAWING_TEMPLATE 7 -#define SV_ICON_ID_PRESENTATION 8 -#define SV_ICON_ID_PRESENTATION_TEMPLATE 9 -#define SV_ICON_ID_PRESENTATION_COMPRESSED 10 -#define SV_ICON_ID_MASTER_DOCUMENT 11 -#define SV_ICON_ID_HTML_DOCUMENT 12 -#define SV_ICON_ID_CHART 13 -#define SV_ICON_ID_DATABASE 14 -#define SV_ICON_ID_FORMULA 15 -#define SV_ICON_ID_TEMPLATE 16 -#define SV_ICON_ID_MACRO 17 -#define SV_ICON_ID_PRINTERADMIN 501 - -#define HID_PRINTDLG HID_VCL_START - -#endif // _SV_SVIDS_HRC diff --git a/vcl/inc/vcl/textlayout.hxx b/vcl/inc/vcl/textlayout.hxx deleted file mode 100644 index 418e1aa8bf64..000000000000 --- a/vcl/inc/vcl/textlayout.hxx +++ /dev/null @@ -1,136 +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 VCL_TEXTLAYOUT_HXX -#define VCL_TEXTLAYOUT_HXX - -#include "vcl/outdev.hxx" - -#include -#include - -#include - -class Control; - -//........................................................................ -namespace vcl -{ -//........................................................................ - - //==================================================================== - //= ITextLayout - //==================================================================== - class SAL_NO_VTABLE ITextLayout - { - public: - virtual long GetTextWidth( const XubString& _rText, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const = 0; - virtual void DrawText( const Point& _rStartPoint, const XubString& _rText, xub_StrLen _nStartIndex, xub_StrLen _nLength, - MetricVector* _pVector, String* _pDisplayText ) = 0; - virtual bool GetCaretPositions( const XubString& _rText, sal_Int32* _pCaretXArray, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const = 0; - virtual xub_StrLen GetTextBreak( const XubString& _rText, long _nMaxTextWidth, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const = 0; - virtual bool DecomposeTextRectAction() const = 0; - }; - - //==================================================================== - //= DefaultTextLayout - //==================================================================== - /** is an implementation of the ITextLayout interface which simply delegates its calls to the respective - methods of an OutputDevice instance, without any inbetween magic. - */ - class DefaultTextLayout : public ITextLayout - { - public: - DefaultTextLayout( OutputDevice& _rTargetDevice ) - :m_rTargetDevice( _rTargetDevice ) - { - } - virtual ~DefaultTextLayout(); - - // ITextLayout overridables - virtual long GetTextWidth( - const XubString& _rText, - xub_StrLen _nStartIndex, - xub_StrLen _nLength - ) const; - virtual void DrawText( - const Point& _rStartPoint, - const XubString& _rText, - xub_StrLen _nStartIndex, - xub_StrLen _nLength, - MetricVector* _pVector, - String* _pDisplayText - ); - virtual bool GetCaretPositions( - const XubString& _rText, - sal_Int32* _pCaretXArray, - xub_StrLen _nStartIndex, - xub_StrLen _nLength - ) const; - virtual xub_StrLen GetTextBreak( - const XubString& _rText, - long _nMaxTextWidth, - xub_StrLen _nStartIndex, - xub_StrLen _nLength - ) const; - virtual bool DecomposeTextRectAction() const; - - private: - OutputDevice& m_rTargetDevice; - }; - - //==================================================================== - //= ControlTextRenderer - //==================================================================== - class ReferenceDeviceTextLayout; - /** a class which allows rendering text of a Control onto a device, by taking into account the metrics of - a reference device. - */ - class ControlTextRenderer - { - public: - ControlTextRenderer( const Control& _rControl, OutputDevice& _rTargetDevice, OutputDevice& _rReferenceDevice ); - virtual ~ControlTextRenderer(); - - Rectangle DrawText( const Rectangle& _rRect, - const XubString& _rText, USHORT _nStyle = 0, - MetricVector* _pVector = NULL, String* _pDisplayText = NULL ); - - private: - ControlTextRenderer(); // never implemented - ControlTextRenderer( const ControlTextRenderer& ); // never implemented - ControlTextRenderer& operator=( const ControlTextRenderer& ); // never implemented - - private: - ::std::auto_ptr< ReferenceDeviceTextLayout > m_pImpl; - }; - -//........................................................................ -} // namespace vcl -//........................................................................ - -#endif // VCL_TEXTLAYOUT_HXX diff --git a/vcl/inc/vcl/toolbox.h b/vcl/inc/vcl/toolbox.h deleted file mode 100644 index 7cdeb0b17a5a..000000000000 --- a/vcl/inc/vcl/toolbox.h +++ /dev/null @@ -1,182 +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 _SV_TOOLBOX_H -#define _SV_TOOLBOX_H - -#include -#include -#include -#include -#include -#include -#include - -#include - -#define TB_DROPDOWNARROWWIDTH 11 - -#define TB_MENUBUTTON_SIZE 12 -#define TB_MENUBUTTON_OFFSET 2 - -#define TB_SMALLIMAGESIZE 16 - -#define TB_LARGEIMAGESIZE 26 -#define TB_LARGEIMAGESIZE_INDUSTRIAL 24 -#define TB_LARGEIMAGESIZE_CRYSTAL 22 -#define TB_LARGEIMAGESIZE_OXYGEN 22 - -class Window; - -// ---------------- -// - ImplToolItem - -// ---------------- - -struct ImplToolItem -{ - Window* mpWindow; - void* mpUserData; - Image maImage; - Image maHighImage; - long mnImageAngle; - bool mbMirrorMode; - XubString maText; - XubString maQuickHelpText; - XubString maHelpText; - String maCommandStr; - rtl::OString maHelpId; - Rectangle maRect; - Rectangle maCalcRect; - // the overall horizontal item size, including one or more of [image size + textlength + dropdown arrow] - Size maItemSize; - long mnSepSize; - long mnDropDownArrowWidth; - ToolBoxItemType meType; - ToolBoxItemBits mnBits; - TriState meState; - USHORT mnId; - BOOL mbEnabled:1, - mbVisible:1, - mbEmptyBtn:1, - mbShowWindow:1, - mbBreak:1, - mbVisibleText:1; // indicates if text will definitely be drawn, influences dropdown pos - - ImplToolItem(); - ImplToolItem( USHORT nItemId, const Image& rImage, - ToolBoxItemBits nItemBits ); - ImplToolItem( USHORT nItemId, const XubString& rTxt, - ToolBoxItemBits nItemBits ); - ImplToolItem( USHORT nItemId, const Image& rImage, - const XubString& rTxt, - ToolBoxItemBits nItemBits ); - ~ImplToolItem(); - - ImplToolItem( const ImplToolItem& ); - ImplToolItem& operator=(const ImplToolItem&); - - // returns the size of a item, taking toolbox orientation into account - // the default size is the precomputed size for standard items - // ie those that are just ordinary buttons (no windows or text etc.) - // bCheckMaxWidth indicates that item windows must not exceed maxWidth in which case they will be painted as buttons - Size GetSize( BOOL bHorz, BOOL bCheckMaxWidth, long maxWidth, const Size& rDefaultSize ); - - // only useful for buttons: returns if the text or image part or both can be drawn according to current button drawing style - void DetermineButtonDrawStyle( ButtonType eButtonType, BOOL& rbImage, BOOL& rbText ) const; - - // returns the rectangle which contains the drop down arrow - // or an empty rect if there is none - // bHorz denotes the toolbox alignment - Rectangle GetDropDownRect( BOOL bHorz ) const; - - // returns TRUE if the toolbar item is currently clipped, which can happen for docked toolbars - BOOL IsClipped() const; -}; - -namespace vcl -{ - -struct ToolBoxLayoutData : public ControlLayoutData -{ - std::vector< USHORT > m_aLineItemIds; - std::vector< USHORT > m_aLineItemPositions; -}; - - -} /* namespace vcl */ - - -struct ImplToolBoxPrivateData -{ - vcl::ToolBoxLayoutData* m_pLayoutData; - std::vector< ImplToolItem > m_aItems; - - ImplToolBoxPrivateData(); - ~ImplToolBoxPrivateData(); - - void ImplClearLayoutData() { delete m_pLayoutData; m_pLayoutData = NULL; } - - // called when dropdown items are clicked - Link maDropdownClickHdl; - Timer maDropdownTimer; // for opening dropdown items on "long click" - - // large or small buttons ? - ToolBoxButtonSize meButtonSize; - - // the optional custom menu - PopupMenu* mpMenu; - USHORT maMenuType; - ULONG mnEventId; - - // called when menu button is clicked and before the popup menu is executed - Link maMenuButtonHdl; - - // a dummy item representing the custom menu button - ImplToolItem maMenubuttonItem; - long mnMenuButtonWidth; - - Wallpaper maDisplayBackground; - - // support for highcontrast - vcl::IImageListProvider* mpImageListProvider; - vcl::ImageListType meImageListType; - - BOOL mbIsLocked:1, // keeps last lock state from ImplDockingWindowWrapper - mbAssumeDocked:1, // only used during calculations to override current floating/popup mode - mbAssumeFloating:1, - mbAssumePopupMode:1, - mbKeyInputDisabled:1, // no KEY input if all items disabled, closing/docking will be allowed though - mbIsPaintLocked:1, // don't allow paints - mbMenubuttonSelected:1, // menu button is highlighted - mbPageScroll:1, // determines if we scroll a page at a time - mbNativeButtons:1, // system supports native toolbar buttons - mbWillUsePopupMode:1, // this toolbox will be opened in popup mode - mbDropDownByKeyboard:1; // tells whether a dropdown was started by key input -}; - - -#endif // _SV_TOOLBOX_H diff --git a/vcl/inc/vcl/unobrok.hxx b/vcl/inc/vcl/unobrok.hxx deleted file mode 100644 index af616e80351a..000000000000 --- a/vcl/inc/vcl/unobrok.hxx +++ /dev/null @@ -1,39 +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 _UNOBROK_HXX -#define _UNOBROK_HXX - -#include -#include - -namespace vcl_accept -{ - sal_Bool accept(const ::rtl::OUString & accDcp, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> & rSMgr); -} - -#endif // _UNOBROK_HXX diff --git a/vcl/inc/vcl/wall2.hxx b/vcl/inc/vcl/wall2.hxx deleted file mode 100644 index e93a8370ee7d..000000000000 --- a/vcl/inc/vcl/wall2.hxx +++ /dev/null @@ -1,60 +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 _SV_WALL2_HXX -#define _SV_WALL2_HXX - -#include - -class ImplWallpaper -{ - friend class Wallpaper; - -private: - Color maColor; - BitmapEx* mpBitmap; - Gradient* mpGradient; - Rectangle* mpRect; - WallpaperStyle meStyle; - ULONG mnRefCount; - BitmapEx* mpCache; - - friend SvStream& operator>>( SvStream& rIStm, ImplWallpaper& rImplWallpaper ); - friend SvStream& operator<<( SvStream& rOStm, const ImplWallpaper& rImplWallpaper ); - -public: - ImplWallpaper(); - ImplWallpaper( const ImplWallpaper& rImplWallpaper ); - ~ImplWallpaper(); - - void ImplSetCachedBitmap( BitmapEx& rBmp ); - const BitmapEx* ImplGetCachedBitmap() { return mpCache; } - void ImplReleaseCachedBitmap(); -}; - - -#endif // _SV_WALL2_HXX diff --git a/vcl/inc/vcl/window.h b/vcl/inc/vcl/window.h deleted file mode 100644 index c710156422bf..000000000000 --- a/vcl/inc/vcl/window.h +++ /dev/null @@ -1,385 +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 _SV_WINDOW_H -#define _SV_WINDOW_H - -#include -#include -#include -#include -#ifndef _SV_INPUTCTX_HXX -#include -#endif -#ifndef _SV_POINTR_HXX -#include -#endif -#include -#include -#include -#include - -#include - -#include - -struct SalPaintEvent; -struct ImplDelData; -struct ImplAccessibleInfos; - -class Window; -class VirtualDevice; -class Cursor; -class ImplDevFontList; -class ImplFontCache; -class VCLXWindow; -class SalFrame; -class SalObject; - - -namespace com { -namespace sun { -namespace star { -namespace accessibility { - class XAccessible; -}}}} - -namespace com { -namespace sun { -namespace star { -namespace rendering { - class XCanvas; -}}}} - -namespace com { -namespace sun { -namespace star { -namespace awt { - class XWindowPeer; - class XWindow; -} -namespace uno { - class Any; - class XInterface; -} -namespace datatransfer { -namespace clipboard { - class XClipboard; -} - -namespace dnd { - class XDropTargetListener; - class XDragGestureRecognizer; - class XDragSource; - class XDropTarget; -} } } } } - -namespace vcl { - struct ControlLayoutData; - struct ExtWindowImpl; -} - - -// -------------- -// - Prototypes - -// -------------- - -long ImplWindowFrameProc( Window* pInst, SalFrame* pFrame, USHORT nEvent, const void* pEvent ); - -// ----------- -// - HitTest - -// ----------- - -#define WINDOW_HITTEST_INSIDE ((USHORT)0x0001) -#define WINDOW_HITTEST_TRANSPARENT ((USHORT)0x0002) - -// --------------- -// - ImplWinData - -// --------------- - -struct ImplWinData -{ - UniString* mpExtOldText; - USHORT* mpExtOldAttrAry; - Rectangle* mpCursorRect; - long mnCursorExtWidth; - Rectangle* mpFocusRect; - Rectangle* mpTrackRect; - USHORT mnTrackFlags; - USHORT mnIsTopWindow; - BOOL mbMouseOver; // tracks mouse over for native widget paint effect - BOOL mbEnableNativeWidget; // toggle native widget rendering - ::std::list< Window* > - maTopWindowChildren; -}; - -// ------------------- -// - ImplOverlapData - -// ------------------- - -struct ImplOverlapData -{ - VirtualDevice* mpSaveBackDev; // Gesicherte Hintergrund-Bitmap - Region* mpSaveBackRgn; // Gesicherte Region, was invalidiert werden muss - Window* mpNextBackWin; // Naechstes Fenster mit Hintergrund-Sicherung - ULONG mnSaveBackSize; // Groesse Bitmap fuer Hintergrund-Sicherung - BOOL mbSaveBack; // TRUE: Background sichern - BYTE mnTopLevel; // Level for Overlap-Window -}; - -// ----------------- -// - ImplFrameData - -// ----------------- - -struct ImplFrameData -{ - Timer maPaintTimer; // paint timer - Timer maResizeTimer; // resize timer - InputContext maOldInputContext; // Last set Input Context - Window* mpNextFrame; // next frame window - Window* mpFirstOverlap; // first overlap window - Window* mpFocusWin; // focus window (is also set, when frame doesn't have the focous) - Window* mpMouseMoveWin; // last window, where MouseMove() called - Window* mpMouseDownWin; // last window, where MouseButtonDown() called - Window* mpFirstBackWin; // Erstes Overlap-Window mit Hintergrund-Sicherung - ::std::vector maOwnerDrawList; // List of system windows with owner draw decoration - ImplDevFontList* mpFontList; // Font-List for this frame - ImplFontCache* mpFontCache; // Font-Cache for this frame - sal_Int32 mnDPIX; // Original Screen Resolution - sal_Int32 mnDPIY; // Original Screen Resolution - ImplMapRes maMapUnitRes; // for LogicUnitToPixel - ULONG mnAllSaveBackSize; // Groesse aller Bitmaps fuer Hintergrund-Sicherung - ULONG mnFocusId; // FocusId for PostUserLink - ULONG mnMouseMoveId; // MoveId for PostUserLink - long mnLastMouseX; // last x mouse position - long mnLastMouseY; // last y mouse position - long mnBeforeLastMouseX; // last but one x mouse position - long mnBeforeLastMouseY; // last but one y mouse position - long mnFirstMouseX; // first x mouse position by mousebuttondown - long mnFirstMouseY; // first y mouse position by mousebuttondown - long mnLastMouseWinX; // last x mouse position, rel. to pMouseMoveWin - long mnLastMouseWinY; // last y mouse position, rel. to pMouseMoveWin - USHORT mnModalMode; // frame based modal count (app based makes no sense anymore) - ULONG mnMouseDownTime; // mouse button down time for double click - USHORT mnClickCount; // mouse click count - USHORT mnFirstMouseCode; // mouse code by mousebuttondown - USHORT mnMouseCode; // mouse code - USHORT mnMouseMode; // mouse mode - MapUnit meMapUnit; // last MapUnit for LogicUnitToPixel - BOOL mbHasFocus; // focus - BOOL mbInMouseMove; // is MouseMove on stack - BOOL mbMouseIn; // is Mouse inside the frame - BOOL mbStartDragCalled; // is command startdrag called - BOOL mbNeedSysWindow; // set, when FrameSize <= IMPL_MIN_NEEDSYSWIN - BOOL mbMinimized; // set, when FrameSize <= 0 - BOOL mbStartFocusState; // FocusState, beim abschicken des Events - BOOL mbInSysObjFocusHdl; // Innerhalb vom GetFocus-Handler eines SysChilds - BOOL mbInSysObjToTopHdl; // Innerhalb vom ToTop-Handler eines SysChilds - BOOL mbSysObjFocus; // Hat ein SysChild den Focus - - ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource > mxDragSource; - ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTarget > mxDropTarget; - ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener > mxDropTargetListener; - ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > mxClipboard; - ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > mxSelection; - - BOOL mbInternalDragGestureRecognizer; -}; - -// --------------- -// - WindowImpl - -// --------------- - -enum AlwaysInputMode { AlwaysInputNone = 0, AlwaysInputEnabled = 1, AlwaysInputDisabled =2 }; - -class WindowImpl -{ -public: - WindowImpl(); - ~WindowImpl(); - - ImplWinData* mpWinData; - ImplOverlapData* mpOverlapData; - ImplFrameData* mpFrameData; - SalFrame* mpFrame; - SalObject* mpSysObj; - Window* mpFrameWindow; - Window* mpOverlapWindow; - Window* mpBorderWindow; - Window* mpClientWindow; - Window* mpParent; - Window* mpRealParent; - Window* mpFirstChild; - Window* mpLastChild; - Window* mpFirstOverlap; - Window* mpLastOverlap; - Window* mpPrev; - Window* mpNext; - Window* mpNextOverlap; - Window* mpLastFocusWindow; - Window* mpDlgCtrlDownWindow; - VclEventListeners maEventListeners; - VclEventListeners maChildEventListeners; - - // The canvas interface for this VCL window. Is persistent after the first GetCanvas() call - ::com::sun::star::uno::WeakReference< ::com::sun::star::rendering::XCanvas > mxCanvas; - - ImplDelData* mpFirstDel; - void* mpUserData; - vcl::ExtWindowImpl* mpExtImpl; - Cursor* mpCursor; - Pointer maPointer; - Fraction maZoom; - XubString maText; - Font* mpControlFont; - Color maControlForeground; - Color maControlBackground; - sal_Int32 mnLeftBorder; - sal_Int32 mnTopBorder; - sal_Int32 mnRightBorder; - sal_Int32 mnBottomBorder; - long mnX; - long mnY; - long mnAbsScreenX; - Point maPos; - rtl::OString maHelpId; - rtl::OString maUniqId; - XubString maHelpText; - XubString maQuickHelpText; - InputContext maInputContext; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > mxWindowPeer; - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > mxAccessible; - ImplAccessibleInfos* mpAccessibleInfos; - VCLXWindow* mpVCLXWindow; - Region maWinRegion; // region to 'shape' the VCL window (frame coordinates) - Region maWinClipRegion; // the (clipping) region that finally corresponds to the VCL window (frame coordinates) - Region maInvalidateRegion; // region that has to be redrawn (frame coordinates) - Region* mpChildClipRegion; // child clip region if CLIPCHILDREN is set (frame coordinates) - Region* mpPaintRegion; // only set during Paint() method call (window coordinates) - WinBits mnStyle; - WinBits mnPrevStyle; - WinBits mnExtendedStyle; - WinBits mnPrevExtendedStyle; - WindowType mnType; - ControlPart mnNativeBackground; - USHORT mnWaitCount; - USHORT mnPaintFlags; - USHORT mnGetFocusFlags; - USHORT mnParentClipMode; - USHORT mnActivateMode; - USHORT mnDlgCtrlFlags; - USHORT mnLockCount; - AlwaysInputMode meAlwaysInputMode; - BOOL mbFrame:1, - mbBorderWin:1, - mbOverlapWin:1, - mbSysWin:1, - mbDialog:1, - mbDockWin:1, - mbFloatWin:1, - mbPushButton:1, - mbVisible:1, - mbDisabled:1, - mbInputDisabled:1, - mbDropDisabled:1, - mbNoUpdate:1, - mbNoParentUpdate:1, - mbActive:1, - mbParentActive:1, - mbReallyVisible:1, - mbReallyShown:1, - mbInInitShow:1, - mbChildNotify:1, - mbChildPtrOverwrite:1, - mbNoPtrVisible:1, - mbPaintFrame:1, - mbInPaint:1, - mbMouseMove:1, - mbMouseButtonDown:1, - mbMouseButtonUp:1, - mbKeyInput:1, - mbKeyUp:1, - mbCommand:1, - mbDefPos:1, - mbDefSize:1, - mbCallMove:1, - mbCallResize:1, - mbWaitSystemResize:1, - mbInitWinClipRegion:1, - mbInitChildRegion:1, - mbWinRegion:1, - mbClipChildren:1, - mbClipSiblings:1, - mbChildTransparent:1, - mbPaintTransparent:1, - mbMouseTransparent:1, - mbDlgCtrlStart:1, - mbFocusVisible:1, - mbTrackVisible:1, - mbUseNativeFocus:1, - mbNativeFocusVisible:1, - mbInShowFocus:1, - mbInHideFocus:1, - mbControlForeground:1, - mbControlBackground:1, - mbAlwaysOnTop:1, - mbCompoundControl:1, - mbCompoundControlHasFocus:1, - mbPaintDisabled:1, - mbAllResize:1, - mbInDtor:1, - mbExtTextInput:1, - mbInFocusHdl:1, - mbOverlapVisible:1, - mbCreatedWithToolkit:1, - mbToolBox:1, - mbSplitter:1, - mbSuppressAccessibilityEvents:1, - mbMenuFloatingWindow:1, - mbDrawSelectionBackground:1, - mbIsInTaskPaneList:1, - mbToolbarFloatingWindow:1, - mbCallHandlersDuringInputDisabled:1, - mbDisableAccessibleLabelForRelation:1, - mbDisableAccessibleLabeledByRelation:1, - mbHelpTextDynamic:1, - mbFakeFocusSet:1, - mbInterceptChildWindowKeyDown:1; - - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDNDListenerContainer; -}; - -// ----------------- -// - Hilfsmethoden - -// ----------------- - -long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, - long nX, long nY, ULONG nMsgTime, - USHORT nCode, USHORT nMode ); -void ImplHandleResize( Window* pWindow, long nNewWidth, long nNewHeight ); - -#endif // _SV_WINDOW_H diff --git a/vcl/inc/vcl/xconnection.hxx b/vcl/inc/vcl/xconnection.hxx deleted file mode 100644 index aa9d37430ea6..000000000000 --- a/vcl/inc/vcl/xconnection.hxx +++ /dev/null @@ -1,70 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _VCL_XCONNECTION_HXX -#define _VCL_XCONNECTION_HXX - -#include -#include -#include -#include - -#ifndef _STLP_LIST -#include -#endif - -namespace vcl { - - class DisplayConnection : - public ::cppu::WeakImplHelper1< ::com::sun::star::awt::XDisplayConnection > - { - ::osl::Mutex m_aMutex; - ::std::list< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler > > - m_aHandlers; - ::std::list< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler > > - m_aErrorHandlers; - ::com::sun::star::uno::Any m_aAny; - public: - DisplayConnection(); - virtual ~DisplayConnection(); - - static bool dispatchEvent( void* pThis, void* pData, int nBytes ); - static bool dispatchErrorEvent( void* pThis, void* pData, int nBytes ); - void dispatchDowningEvent(); - - // XDisplayConnection - virtual void SAL_CALL addEventHandler( const ::com::sun::star::uno::Any& window, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler >& handler, sal_Int32 eventMask ) throw(); - virtual void SAL_CALL removeEventHandler( const ::com::sun::star::uno::Any& window, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler >& handler ) throw(); - virtual void SAL_CALL addErrorHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler >& handler ) throw(); - virtual void SAL_CALL removeErrorHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler >& handler ) throw(); - virtual ::com::sun::star::uno::Any SAL_CALL getIdentifier() throw(); - - }; - -} - -#endif // _VCL_XCONNECTION_HXX diff --git a/vcl/inc/wall2.hxx b/vcl/inc/wall2.hxx new file mode 100644 index 000000000000..e93a8370ee7d --- /dev/null +++ b/vcl/inc/wall2.hxx @@ -0,0 +1,60 @@ +/************************************************************************* + * + * 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 _SV_WALL2_HXX +#define _SV_WALL2_HXX + +#include + +class ImplWallpaper +{ + friend class Wallpaper; + +private: + Color maColor; + BitmapEx* mpBitmap; + Gradient* mpGradient; + Rectangle* mpRect; + WallpaperStyle meStyle; + ULONG mnRefCount; + BitmapEx* mpCache; + + friend SvStream& operator>>( SvStream& rIStm, ImplWallpaper& rImplWallpaper ); + friend SvStream& operator<<( SvStream& rOStm, const ImplWallpaper& rImplWallpaper ); + +public: + ImplWallpaper(); + ImplWallpaper( const ImplWallpaper& rImplWallpaper ); + ~ImplWallpaper(); + + void ImplSetCachedBitmap( BitmapEx& rBmp ); + const BitmapEx* ImplGetCachedBitmap() { return mpCache; } + void ImplReleaseCachedBitmap(); +}; + + +#endif // _SV_WALL2_HXX diff --git a/vcl/inc/window.h b/vcl/inc/window.h new file mode 100644 index 000000000000..c710156422bf --- /dev/null +++ b/vcl/inc/window.h @@ -0,0 +1,385 @@ +/************************************************************************* + * + * 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 _SV_WINDOW_H +#define _SV_WINDOW_H + +#include +#include +#include +#include +#ifndef _SV_INPUTCTX_HXX +#include +#endif +#ifndef _SV_POINTR_HXX +#include +#endif +#include +#include +#include +#include + +#include + +#include + +struct SalPaintEvent; +struct ImplDelData; +struct ImplAccessibleInfos; + +class Window; +class VirtualDevice; +class Cursor; +class ImplDevFontList; +class ImplFontCache; +class VCLXWindow; +class SalFrame; +class SalObject; + + +namespace com { +namespace sun { +namespace star { +namespace accessibility { + class XAccessible; +}}}} + +namespace com { +namespace sun { +namespace star { +namespace rendering { + class XCanvas; +}}}} + +namespace com { +namespace sun { +namespace star { +namespace awt { + class XWindowPeer; + class XWindow; +} +namespace uno { + class Any; + class XInterface; +} +namespace datatransfer { +namespace clipboard { + class XClipboard; +} + +namespace dnd { + class XDropTargetListener; + class XDragGestureRecognizer; + class XDragSource; + class XDropTarget; +} } } } } + +namespace vcl { + struct ControlLayoutData; + struct ExtWindowImpl; +} + + +// -------------- +// - Prototypes - +// -------------- + +long ImplWindowFrameProc( Window* pInst, SalFrame* pFrame, USHORT nEvent, const void* pEvent ); + +// ----------- +// - HitTest - +// ----------- + +#define WINDOW_HITTEST_INSIDE ((USHORT)0x0001) +#define WINDOW_HITTEST_TRANSPARENT ((USHORT)0x0002) + +// --------------- +// - ImplWinData - +// --------------- + +struct ImplWinData +{ + UniString* mpExtOldText; + USHORT* mpExtOldAttrAry; + Rectangle* mpCursorRect; + long mnCursorExtWidth; + Rectangle* mpFocusRect; + Rectangle* mpTrackRect; + USHORT mnTrackFlags; + USHORT mnIsTopWindow; + BOOL mbMouseOver; // tracks mouse over for native widget paint effect + BOOL mbEnableNativeWidget; // toggle native widget rendering + ::std::list< Window* > + maTopWindowChildren; +}; + +// ------------------- +// - ImplOverlapData - +// ------------------- + +struct ImplOverlapData +{ + VirtualDevice* mpSaveBackDev; // Gesicherte Hintergrund-Bitmap + Region* mpSaveBackRgn; // Gesicherte Region, was invalidiert werden muss + Window* mpNextBackWin; // Naechstes Fenster mit Hintergrund-Sicherung + ULONG mnSaveBackSize; // Groesse Bitmap fuer Hintergrund-Sicherung + BOOL mbSaveBack; // TRUE: Background sichern + BYTE mnTopLevel; // Level for Overlap-Window +}; + +// ----------------- +// - ImplFrameData - +// ----------------- + +struct ImplFrameData +{ + Timer maPaintTimer; // paint timer + Timer maResizeTimer; // resize timer + InputContext maOldInputContext; // Last set Input Context + Window* mpNextFrame; // next frame window + Window* mpFirstOverlap; // first overlap window + Window* mpFocusWin; // focus window (is also set, when frame doesn't have the focous) + Window* mpMouseMoveWin; // last window, where MouseMove() called + Window* mpMouseDownWin; // last window, where MouseButtonDown() called + Window* mpFirstBackWin; // Erstes Overlap-Window mit Hintergrund-Sicherung + ::std::vector maOwnerDrawList; // List of system windows with owner draw decoration + ImplDevFontList* mpFontList; // Font-List for this frame + ImplFontCache* mpFontCache; // Font-Cache for this frame + sal_Int32 mnDPIX; // Original Screen Resolution + sal_Int32 mnDPIY; // Original Screen Resolution + ImplMapRes maMapUnitRes; // for LogicUnitToPixel + ULONG mnAllSaveBackSize; // Groesse aller Bitmaps fuer Hintergrund-Sicherung + ULONG mnFocusId; // FocusId for PostUserLink + ULONG mnMouseMoveId; // MoveId for PostUserLink + long mnLastMouseX; // last x mouse position + long mnLastMouseY; // last y mouse position + long mnBeforeLastMouseX; // last but one x mouse position + long mnBeforeLastMouseY; // last but one y mouse position + long mnFirstMouseX; // first x mouse position by mousebuttondown + long mnFirstMouseY; // first y mouse position by mousebuttondown + long mnLastMouseWinX; // last x mouse position, rel. to pMouseMoveWin + long mnLastMouseWinY; // last y mouse position, rel. to pMouseMoveWin + USHORT mnModalMode; // frame based modal count (app based makes no sense anymore) + ULONG mnMouseDownTime; // mouse button down time for double click + USHORT mnClickCount; // mouse click count + USHORT mnFirstMouseCode; // mouse code by mousebuttondown + USHORT mnMouseCode; // mouse code + USHORT mnMouseMode; // mouse mode + MapUnit meMapUnit; // last MapUnit for LogicUnitToPixel + BOOL mbHasFocus; // focus + BOOL mbInMouseMove; // is MouseMove on stack + BOOL mbMouseIn; // is Mouse inside the frame + BOOL mbStartDragCalled; // is command startdrag called + BOOL mbNeedSysWindow; // set, when FrameSize <= IMPL_MIN_NEEDSYSWIN + BOOL mbMinimized; // set, when FrameSize <= 0 + BOOL mbStartFocusState; // FocusState, beim abschicken des Events + BOOL mbInSysObjFocusHdl; // Innerhalb vom GetFocus-Handler eines SysChilds + BOOL mbInSysObjToTopHdl; // Innerhalb vom ToTop-Handler eines SysChilds + BOOL mbSysObjFocus; // Hat ein SysChild den Focus + + ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource > mxDragSource; + ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTarget > mxDropTarget; + ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener > mxDropTargetListener; + ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > mxClipboard; + ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > mxSelection; + + BOOL mbInternalDragGestureRecognizer; +}; + +// --------------- +// - WindowImpl - +// --------------- + +enum AlwaysInputMode { AlwaysInputNone = 0, AlwaysInputEnabled = 1, AlwaysInputDisabled =2 }; + +class WindowImpl +{ +public: + WindowImpl(); + ~WindowImpl(); + + ImplWinData* mpWinData; + ImplOverlapData* mpOverlapData; + ImplFrameData* mpFrameData; + SalFrame* mpFrame; + SalObject* mpSysObj; + Window* mpFrameWindow; + Window* mpOverlapWindow; + Window* mpBorderWindow; + Window* mpClientWindow; + Window* mpParent; + Window* mpRealParent; + Window* mpFirstChild; + Window* mpLastChild; + Window* mpFirstOverlap; + Window* mpLastOverlap; + Window* mpPrev; + Window* mpNext; + Window* mpNextOverlap; + Window* mpLastFocusWindow; + Window* mpDlgCtrlDownWindow; + VclEventListeners maEventListeners; + VclEventListeners maChildEventListeners; + + // The canvas interface for this VCL window. Is persistent after the first GetCanvas() call + ::com::sun::star::uno::WeakReference< ::com::sun::star::rendering::XCanvas > mxCanvas; + + ImplDelData* mpFirstDel; + void* mpUserData; + vcl::ExtWindowImpl* mpExtImpl; + Cursor* mpCursor; + Pointer maPointer; + Fraction maZoom; + XubString maText; + Font* mpControlFont; + Color maControlForeground; + Color maControlBackground; + sal_Int32 mnLeftBorder; + sal_Int32 mnTopBorder; + sal_Int32 mnRightBorder; + sal_Int32 mnBottomBorder; + long mnX; + long mnY; + long mnAbsScreenX; + Point maPos; + rtl::OString maHelpId; + rtl::OString maUniqId; + XubString maHelpText; + XubString maQuickHelpText; + InputContext maInputContext; + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > mxWindowPeer; + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > mxAccessible; + ImplAccessibleInfos* mpAccessibleInfos; + VCLXWindow* mpVCLXWindow; + Region maWinRegion; // region to 'shape' the VCL window (frame coordinates) + Region maWinClipRegion; // the (clipping) region that finally corresponds to the VCL window (frame coordinates) + Region maInvalidateRegion; // region that has to be redrawn (frame coordinates) + Region* mpChildClipRegion; // child clip region if CLIPCHILDREN is set (frame coordinates) + Region* mpPaintRegion; // only set during Paint() method call (window coordinates) + WinBits mnStyle; + WinBits mnPrevStyle; + WinBits mnExtendedStyle; + WinBits mnPrevExtendedStyle; + WindowType mnType; + ControlPart mnNativeBackground; + USHORT mnWaitCount; + USHORT mnPaintFlags; + USHORT mnGetFocusFlags; + USHORT mnParentClipMode; + USHORT mnActivateMode; + USHORT mnDlgCtrlFlags; + USHORT mnLockCount; + AlwaysInputMode meAlwaysInputMode; + BOOL mbFrame:1, + mbBorderWin:1, + mbOverlapWin:1, + mbSysWin:1, + mbDialog:1, + mbDockWin:1, + mbFloatWin:1, + mbPushButton:1, + mbVisible:1, + mbDisabled:1, + mbInputDisabled:1, + mbDropDisabled:1, + mbNoUpdate:1, + mbNoParentUpdate:1, + mbActive:1, + mbParentActive:1, + mbReallyVisible:1, + mbReallyShown:1, + mbInInitShow:1, + mbChildNotify:1, + mbChildPtrOverwrite:1, + mbNoPtrVisible:1, + mbPaintFrame:1, + mbInPaint:1, + mbMouseMove:1, + mbMouseButtonDown:1, + mbMouseButtonUp:1, + mbKeyInput:1, + mbKeyUp:1, + mbCommand:1, + mbDefPos:1, + mbDefSize:1, + mbCallMove:1, + mbCallResize:1, + mbWaitSystemResize:1, + mbInitWinClipRegion:1, + mbInitChildRegion:1, + mbWinRegion:1, + mbClipChildren:1, + mbClipSiblings:1, + mbChildTransparent:1, + mbPaintTransparent:1, + mbMouseTransparent:1, + mbDlgCtrlStart:1, + mbFocusVisible:1, + mbTrackVisible:1, + mbUseNativeFocus:1, + mbNativeFocusVisible:1, + mbInShowFocus:1, + mbInHideFocus:1, + mbControlForeground:1, + mbControlBackground:1, + mbAlwaysOnTop:1, + mbCompoundControl:1, + mbCompoundControlHasFocus:1, + mbPaintDisabled:1, + mbAllResize:1, + mbInDtor:1, + mbExtTextInput:1, + mbInFocusHdl:1, + mbOverlapVisible:1, + mbCreatedWithToolkit:1, + mbToolBox:1, + mbSplitter:1, + mbSuppressAccessibilityEvents:1, + mbMenuFloatingWindow:1, + mbDrawSelectionBackground:1, + mbIsInTaskPaneList:1, + mbToolbarFloatingWindow:1, + mbCallHandlersDuringInputDisabled:1, + mbDisableAccessibleLabelForRelation:1, + mbDisableAccessibleLabeledByRelation:1, + mbHelpTextDynamic:1, + mbFakeFocusSet:1, + mbInterceptChildWindowKeyDown:1; + + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDNDListenerContainer; +}; + +// ----------------- +// - Hilfsmethoden - +// ----------------- + +long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave, + long nX, long nY, ULONG nMsgTime, + USHORT nCode, USHORT nMode ); +void ImplHandleResize( Window* pWindow, long nNewWidth, long nNewHeight ); + +#endif // _SV_WINDOW_H diff --git a/vcl/inc/xconnection.hxx b/vcl/inc/xconnection.hxx new file mode 100644 index 000000000000..aa9d37430ea6 --- /dev/null +++ b/vcl/inc/xconnection.hxx @@ -0,0 +1,70 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _VCL_XCONNECTION_HXX +#define _VCL_XCONNECTION_HXX + +#include +#include +#include +#include + +#ifndef _STLP_LIST +#include +#endif + +namespace vcl { + + class DisplayConnection : + public ::cppu::WeakImplHelper1< ::com::sun::star::awt::XDisplayConnection > + { + ::osl::Mutex m_aMutex; + ::std::list< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler > > + m_aHandlers; + ::std::list< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler > > + m_aErrorHandlers; + ::com::sun::star::uno::Any m_aAny; + public: + DisplayConnection(); + virtual ~DisplayConnection(); + + static bool dispatchEvent( void* pThis, void* pData, int nBytes ); + static bool dispatchErrorEvent( void* pThis, void* pData, int nBytes ); + void dispatchDowningEvent(); + + // XDisplayConnection + virtual void SAL_CALL addEventHandler( const ::com::sun::star::uno::Any& window, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler >& handler, sal_Int32 eventMask ) throw(); + virtual void SAL_CALL removeEventHandler( const ::com::sun::star::uno::Any& window, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler >& handler ) throw(); + virtual void SAL_CALL addErrorHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler >& handler ) throw(); + virtual void SAL_CALL removeErrorHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler >& handler ) throw(); + virtual ::com::sun::star::uno::Any SAL_CALL getIdentifier() throw(); + + }; + +} + +#endif // _VCL_XCONNECTION_HXX diff --git a/vcl/prj/build.lst b/vcl/prj/build.lst index af15ad73e19d..6707cf5f4c47 100644 --- a/vcl/prj/build.lst +++ b/vcl/prj/build.lst @@ -19,15 +19,15 @@ vc vcl\win\source\app nmake - w vc__appw vc_inc NULL vc vcl\win\source\gdi nmake - w vc__gdiw vc_inc NULL vc vcl\win\source\window nmake - w vc__winw vc_inc NULL vc vcl\win\source\src nmake - w vc__srcw vc_inc NULL -vc vcl\unx\source\plugadapt nmake - u vc__plug vc_inc NULL -vc vcl\unx\source\desktopdetect nmake - u vc__desk vc_inc NULL -vc vcl\unx\source\app nmake - u vc__appu vc_inc NULL -vc vcl\unx\source\dtrans nmake - u vc__dtru vc_inc NULL -vc vcl\unx\source\fontmanager nmake - u vc__ftmu vc_inc NULL -vc vcl\unx\source\gdi nmake - u vc__gdiu vc_inc NULL -vc vcl\unx\source\printer nmake - u vc__prnu vc_inc NULL -vc vcl\unx\source\printergfx nmake - u vc__prgu vc_inc NULL -vc vcl\unx\source\window nmake - u vc__winu vc_inc NULL +vc vcl\unx\generic\plugadapt nmake - u vc__plug vc_inc NULL +vc vcl\unx\generic\desktopdetect nmake - u vc__desk vc_inc NULL +vc vcl\unx\generic\app nmake - u vc__appu vc_inc NULL +vc vcl\unx\generic\dtrans nmake - u vc__dtru vc_inc NULL +vc vcl\unx\generic\fontmanager nmake - u vc__ftmu vc_inc NULL +vc vcl\unx\generic\gdi nmake - u vc__gdiu vc_inc NULL +vc vcl\unx\generic\printer nmake - u vc__prnu vc_inc NULL +vc vcl\unx\generic\printergfx nmake - u vc__prgu vc_inc NULL +vc vcl\unx\generic\window nmake - u vc__winu vc_inc NULL vc vcl\unx\gtk\a11y nmake - u vc__gtky vc_inc NULL vc vcl\unx\gtk\app nmake - u vc__gtka vc_inc NULL vc vcl\unx\gtk\window nmake - u vc__gtkw vc_inc NULL diff --git a/vcl/prj/d.lst b/vcl/prj/d.lst index 307064f7555d..ba5949b00fad 100644 --- a/vcl/prj/d.lst +++ b/vcl/prj/d.lst @@ -10,34 +10,44 @@ mkdir: %_DEST%\inc%_EXT%\vcl ..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib ..\%__SRC%\lib\ivcl.lib %_DEST%\lib%_EXT%\ivcl.lib ..\%__SRC%\misc\vcl?????.map %_DEST%\bin%_EXT%\vcl?????.map +..\%__SRC%\misc\vcl.component %_DEST%\xml%_EXT%\vcl.component ..\%__SRC%\obj\salmain.obj %_DEST%\lib%_EXT%\salmain.obj ..\%__SRC%\obj\salmain.o %_DEST%\lib%_EXT%\salmain.o +..\inc\vcl\ImageListProvider.hxx %_DEST%\inc%_EXT%\vcl\ImageListProvider.hxx +..\inc\vcl\abstdlg.hxx %_DEST%\inc%_EXT%\vcl\abstdlg.hxx ..\inc\vcl\accel.hxx %_DEST%\inc%_EXT%\vcl\accel.hxx ..\inc\vcl\alpha.hxx %_DEST%\inc%_EXT%\vcl\alpha.hxx ..\inc\vcl\animate.hxx %_DEST%\inc%_EXT%\vcl\animate.hxx ..\inc\vcl\apptypes.hxx %_DEST%\inc%_EXT%\vcl\apptypes.hxx ..\inc\vcl\arrange.hxx %_DEST%\inc%_EXT%\vcl\arrange.hxx +..\inc\vcl\arrange.hxx %_DEST%\inc%_EXT%\vcl\arrange.hxx ..\inc\vcl\bitmap.hxx %_DEST%\inc%_EXT%\vcl\bitmap.hxx ..\inc\vcl\bitmapex.hxx %_DEST%\inc%_EXT%\vcl\bitmapex.hxx ..\inc\vcl\bmpacc.hxx %_DEST%\inc%_EXT%\vcl\bmpacc.hxx ..\inc\vcl\btndlg.hxx %_DEST%\inc%_EXT%\vcl\btndlg.hxx ..\inc\vcl\button.hxx %_DEST%\inc%_EXT%\vcl\button.hxx +..\inc\vcl\canvastools.hxx %_DEST%\inc%_EXT%\vcl\canvastools.hxx ..\inc\vcl\cmdevt.h %_DEST%\inc%_EXT%\vcl\cmdevt.h ..\inc\vcl\cmdevt.hxx %_DEST%\inc%_EXT%\vcl\cmdevt.hxx ..\inc\vcl\combobox.h %_DEST%\inc%_EXT%\vcl\combobox.h ..\inc\vcl\combobox.hxx %_DEST%\inc%_EXT%\vcl\combobox.hxx +..\inc\vcl\configsettings.hxx %_DEST%\inc%_EXT%\vcl\configsettings.hxx +..\inc\vcl\controllayout.hxx %_DEST%\inc%_EXT%\vcl\controllayout.hxx ..\inc\vcl\ctrl.hxx %_DEST%\inc%_EXT%\vcl\ctrl.hxx ..\inc\vcl\cursor.hxx %_DEST%\inc%_EXT%\vcl\cursor.hxx ..\inc\vcl\cvtgrf.hxx %_DEST%\inc%_EXT%\vcl\cvtgrf.hxx ..\inc\vcl\cvtsvm.hxx %_DEST%\inc%_EXT%\vcl\cvtsvm.hxx ..\inc\vcl\decoview.hxx %_DEST%\inc%_EXT%\vcl\decoview.hxx ..\inc\vcl\dialog.hxx %_DEST%\inc%_EXT%\vcl\dialog.hxx +..\inc\vcl\dllapi.h %_DEST%\inc%_EXT%\vcl\dllapi.h +..\inc\vcl\dndhelp.hxx %_DEST%\inc%_EXT%\vcl\dndhelp.hxx ..\inc\vcl\dockingarea.hxx %_DEST%\inc%_EXT%\vcl\dockingarea.hxx ..\inc\vcl\dockwin.hxx %_DEST%\inc%_EXT%\vcl\dockwin.hxx -..\inc\vcl\dllapi.h %_DEST%\inc%_EXT%\vcl\dllapi.h ..\inc\vcl\edit.hxx %_DEST%\inc%_EXT%\vcl\edit.hxx ..\inc\vcl\event.hxx %_DEST%\inc%_EXT%\vcl\event.hxx +..\inc\vcl\evntpost.hxx %_DEST%\inc%_EXT%\vcl\evntpost.hxx +..\inc\vcl\extoutdevdata.hxx %_DEST%\inc%_EXT%\vcl\extoutdevdata.hxx ..\inc\vcl\field.hxx %_DEST%\inc%_EXT%\vcl\field.hxx ..\inc\vcl\fixbrd.hxx %_DEST%\inc%_EXT%\vcl\fixbrd.hxx ..\inc\vcl\fixed.hxx %_DEST%\inc%_EXT%\vcl\fixed.hxx @@ -45,24 +55,30 @@ mkdir: %_DEST%\inc%_EXT%\vcl ..\inc\vcl\fntstyle.hxx %_DEST%\inc%_EXT%\vcl\fntstyle.hxx ..\inc\vcl\font.hxx %_DEST%\inc%_EXT%\vcl\font.hxx ..\inc\vcl\fontcvt.hxx %_DEST%\inc%_EXT%\vcl\fontcvt.hxx +..\inc\vcl\fontmanager.hxx %_DEST%\inc%_EXT%\vcl\fontmanager.hxx ..\inc\vcl\gdimtf.hxx %_DEST%\inc%_EXT%\vcl\gdimtf.hxx ..\inc\vcl\gfxlink.hxx %_DEST%\inc%_EXT%\vcl\gfxlink.hxx ..\inc\vcl\gradient.hxx %_DEST%\inc%_EXT%\vcl\gradient.hxx ..\inc\vcl\graph.h %_DEST%\inc%_EXT%\vcl\graph.h ..\inc\vcl\graph.hxx %_DEST%\inc%_EXT%\vcl\graph.hxx +..\inc\vcl\graphictools.hxx %_DEST%\inc%_EXT%\vcl\graphictools.hxx ..\inc\vcl\group.hxx %_DEST%\inc%_EXT%\vcl\group.hxx ..\inc\vcl\hatch.hxx %_DEST%\inc%_EXT%\vcl\hatch.hxx ..\inc\vcl\help.hxx %_DEST%\inc%_EXT%\vcl\help.hxx +..\inc\vcl\helper.hxx %_DEST%\inc%_EXT%\vcl\helper.hxx +..\inc\vcl\i18nhelp.hxx %_DEST%\inc%_EXT%\vcl\i18nhelp.hxx ..\inc\vcl\image.hxx %_DEST%\inc%_EXT%\vcl\image.hxx ..\inc\vcl\imagerepository.hxx %_DEST%\inc%_EXT%\vcl\imagerepository.hxx ..\inc\vcl\imgctrl.hxx %_DEST%\inc%_EXT%\vcl\imgctrl.hxx ..\inc\vcl\impdel.hxx %_DEST%\inc%_EXT%\vcl\impdel.hxx ..\inc\vcl\inputctx.hxx %_DEST%\inc%_EXT%\vcl\inputctx.hxx +..\inc\vcl\introwin.hxx %_DEST%\inc%_EXT%\vcl\introwin.hxx ..\inc\vcl\javachild.hxx %_DEST%\inc%_EXT%\vcl\javachild.hxx +..\inc\vcl\jobdata.hxx %_DEST%\inc%_EXT%\vcl\jobdata.hxx ..\inc\vcl\jobset.hxx %_DEST%\inc%_EXT%\vcl\jobset.hxx -..\unx\inc\kde_headers.h %_DEST%\inc%_EXT%\vcl\kde_headers.h ..\inc\vcl\keycod.hxx %_DEST%\inc%_EXT%\vcl\keycod.hxx ..\inc\vcl\keycodes.hxx %_DEST%\inc%_EXT%\vcl\keycodes.hxx +..\inc\vcl\lazydelete.hxx %_DEST%\inc%_EXT%\vcl\lazydelete.hxx ..\inc\vcl\lineinfo.hxx %_DEST%\inc%_EXT%\vcl\lineinfo.hxx ..\inc\vcl\longcurr.hxx %_DEST%\inc%_EXT%\vcl\longcurr.hxx ..\inc\vcl\lstbox.h %_DEST%\inc%_EXT%\vcl\lstbox.h @@ -71,27 +87,31 @@ mkdir: %_DEST%\inc%_EXT%\vcl ..\inc\vcl\menu.hxx %_DEST%\inc%_EXT%\vcl\menu.hxx ..\inc\vcl\menubtn.hxx %_DEST%\inc%_EXT%\vcl\menubtn.hxx ..\inc\vcl\metaact.hxx %_DEST%\inc%_EXT%\vcl\metaact.hxx -..\inc\vcl\graphictools.hxx %_DEST%\inc%_EXT%\vcl\graphictools.hxx ..\inc\vcl\metric.hxx %_DEST%\inc%_EXT%\vcl\metric.hxx ..\inc\vcl\mnemonic.hxx %_DEST%\inc%_EXT%\vcl\mnemonic.hxx ..\inc\vcl\mnemonicengine.hxx %_DEST%\inc%_EXT%\vcl\mnemonicengine.hxx -..\inc\vcl\quickselectionengine.hxx %_DEST%\inc%_EXT%\vcl\quickselectionengine.hxx ..\inc\vcl\morebtn.hxx %_DEST%\inc%_EXT%\vcl\morebtn.hxx ..\inc\vcl\msgbox.hxx %_DEST%\inc%_EXT%\vcl\msgbox.hxx ..\inc\vcl\octree.hxx %_DEST%\inc%_EXT%\vcl\octree.hxx ..\inc\vcl\oldprintadaptor.hxx %_DEST%\inc%_EXT%\vcl\oldprintadaptor.hxx ..\inc\vcl\outdev.hxx %_DEST%\inc%_EXT%\vcl\outdev.hxx +..\inc\vcl\pdfextoutdevdata.hxx %_DEST%\inc%_EXT%\vcl\pdfextoutdevdata.hxx +..\inc\vcl\pdfwriter.hxx %_DEST%\inc%_EXT%\vcl\pdfwriter.hxx +..\inc\vcl\pngread.hxx %_DEST%\inc%_EXT%\vcl\pngread.hxx +..\inc\vcl\pngwrite.hxx %_DEST%\inc%_EXT%\vcl\pngwrite.hxx ..\inc\vcl\pointr.hxx %_DEST%\inc%_EXT%\vcl\pointr.hxx ..\inc\vcl\popupmenuwindow.hxx %_DEST%\inc%_EXT%\vcl\popupmenuwindow.hxx +..\inc\vcl\ppdparser.hxx %_DEST%\inc%_EXT%\vcl\ppdparser.hxx ..\inc\vcl\print.hxx %_DEST%\inc%_EXT%\vcl\print.hxx +..\inc\vcl\printerinfomanager.hxx %_DEST%\inc%_EXT%\vcl\printerinfomanager.hxx ..\inc\vcl\prntypes.hxx %_DEST%\inc%_EXT%\vcl\prntypes.hxx ..\inc\vcl\ptrstyle.hxx %_DEST%\inc%_EXT%\vcl\ptrstyle.hxx +..\inc\vcl\quickselectionengine.hxx %_DEST%\inc%_EXT%\vcl\quickselectionengine.hxx ..\inc\vcl\regband.hxx %_DEST%\inc%_EXT%\vcl\regband.hxx ..\inc\vcl\region.hxx %_DEST%\inc%_EXT%\vcl\region.hxx ..\inc\vcl\salbtype.hxx %_DEST%\inc%_EXT%\vcl\salbtype.hxx ..\inc\vcl\salctype.hxx %_DEST%\inc%_EXT%\vcl\salctype.hxx ..\inc\vcl\salgtype.hxx %_DEST%\inc%_EXT%\vcl\salgtype.hxx -..\inc\vcl\salstype.hxx %_DEST%\inc%_EXT%\vcl\salstype.hxx ..\inc\vcl\salnativewidgets.hxx %_DEST%\inc%_EXT%\vcl\salnativewidgets.hxx ..\inc\vcl\scrbar.hxx %_DEST%\inc%_EXT%\vcl\scrbar.hxx ..\inc\vcl\seleng.hxx %_DEST%\inc%_EXT%\vcl\seleng.hxx @@ -106,6 +126,7 @@ mkdir: %_DEST%\inc%_EXT%\vcl ..\inc\vcl\splitwin.hxx %_DEST%\inc%_EXT%\vcl\splitwin.hxx ..\inc\vcl\status.hxx %_DEST%\inc%_EXT%\vcl\status.hxx ..\inc\vcl\stdtext.hxx %_DEST%\inc%_EXT%\vcl\stdtext.hxx +..\inc\vcl\strhelper.hxx %_DEST%\inc%_EXT%\vcl\strhelper.hxx ..\inc\vcl\sv.h %_DEST%\inc%_EXT%\vcl\sv.h ..\inc\vcl\svapp.hxx %_DEST%\inc%_EXT%\vcl\svapp.hxx ..\inc\vcl\symbol.hxx %_DEST%\inc%_EXT%\vcl\symbol.hxx @@ -116,41 +137,18 @@ mkdir: %_DEST%\inc%_EXT%\vcl ..\inc\vcl\tabdlg.hxx %_DEST%\inc%_EXT%\vcl\tabdlg.hxx ..\inc\vcl\tabpage.hxx %_DEST%\inc%_EXT%\vcl\tabpage.hxx ..\inc\vcl\taskpanelist.hxx %_DEST%\inc%_EXT%\vcl\taskpanelist.hxx +..\inc\vcl\threadex.hxx %_DEST%\inc%_EXT%\vcl\threadex.hxx ..\inc\vcl\timer.hxx %_DEST%\inc%_EXT%\vcl\timer.hxx ..\inc\vcl\toolbox.hxx %_DEST%\inc%_EXT%\vcl\toolbox.hxx +..\inc\vcl\unohelp.hxx %_DEST%\inc%_EXT%\vcl\unohelp.hxx +..\inc\vcl\unohelp2.hxx %_DEST%\inc%_EXT%\vcl\unohelp2.hxx ..\inc\vcl\unowrap.hxx %_DEST%\inc%_EXT%\vcl\unowrap.hxx -..\inc\vcl\canvastools.hxx %_DEST%\inc%_EXT%\vcl\canvastools.hxx ..\inc\vcl\vclenum.hxx %_DEST%\inc%_EXT%\vcl\vclenum.hxx ..\inc\vcl\vclevent.hxx %_DEST%\inc%_EXT%\vcl\vclevent.hxx ..\inc\vcl\virdev.hxx %_DEST%\inc%_EXT%\vcl\virdev.hxx ..\inc\vcl\waitobj.hxx %_DEST%\inc%_EXT%\vcl\waitobj.hxx ..\inc\vcl\wall.hxx %_DEST%\inc%_EXT%\vcl\wall.hxx ..\inc\vcl\window.hxx %_DEST%\inc%_EXT%\vcl\window.hxx -..\inc\vcl\wrkwin.hxx %_DEST%\inc%_EXT%\vcl\wrkwin.hxx -..\inc\vcl\threadex.hxx %_DEST%\inc%_EXT%\vcl\threadex.hxx -..\inc\vcl\evntpost.hxx %_DEST%\inc%_EXT%\vcl\evntpost.hxx -..\inc\vcl\unohelp.hxx %_DEST%\inc%_EXT%\vcl\unohelp.hxx -..\inc\vcl\unohelp2.hxx %_DEST%\inc%_EXT%\vcl\unohelp2.hxx -..\inc\vcl\i18nhelp.hxx %_DEST%\inc%_EXT%\vcl\i18nhelp.hxx -..\inc\vcl\dndhelp.hxx %_DEST%\inc%_EXT%\vcl\dndhelp.hxx -..\inc\vcl\pdfwriter.hxx %_DEST%\inc%_EXT%\vcl\pdfwriter.hxx -..\inc\vcl\controllayout.hxx %_DEST%\inc%_EXT%\vcl\controllayout.hxx -..\inc\vcl\introwin.hxx %_DEST%\inc%_EXT%\vcl\introwin.hxx -..\inc\vcl\abstdlg.hxx %_DEST%\inc%_EXT%\vcl\abstdlg.hxx -..\inc\vcl\extoutdevdata.hxx %_DEST%\inc%_EXT%\vcl\extoutdevdata.hxx -..\inc\vcl\pdfextoutdevdata.hxx %_DEST%\inc%_EXT%\vcl\pdfextoutdevdata.hxx -..\inc\vcl\pngread.hxx %_DEST%\inc%_EXT%\vcl\pngread.hxx -..\inc\vcl\pngwrite.hxx %_DEST%\inc%_EXT%\vcl\pngwrite.hxx -..\inc\vcl\configsettings.hxx %_DEST%\inc%_EXT%\vcl\configsettings.hxx -..\inc\vcl\ImageListProvider.hxx %_DEST%\inc%_EXT%\vcl\ImageListProvider.hxx -..\inc\vcl\fontmanager.hxx %_DEST%\inc%_EXT%\vcl\fontmanager.hxx -..\inc\vcl\printerinfomanager.hxx %_DEST%\inc%_EXT%\vcl\printerinfomanager.hxx -..\inc\vcl\jobdata.hxx %_DEST%\inc%_EXT%\vcl\jobdata.hxx -..\inc\vcl\ppdparser.hxx %_DEST%\inc%_EXT%\vcl\ppdparser.hxx -..\inc\vcl\helper.hxx %_DEST%\inc%_EXT%\vcl\helper.hxx -..\inc\vcl\strhelper.hxx %_DEST%\inc%_EXT%\vcl\strhelper.hxx -..\inc\vcl\lazydelete.hxx %_DEST%\inc%_EXT%\vcl\lazydelete.hxx -..\inc\vcl\arrange.hxx %_DEST%\inc%_EXT%\vcl\arrange.hxx ..\inc\vcl\wpropset.hxx %_DEST%\inc%_EXT%\vcl\wpropset.hxx -..\%__SRC%\misc\vcl.component %_DEST%\xml%_EXT%\vcl.component +..\inc\vcl\wrkwin.hxx %_DEST%\inc%_EXT%\vcl\wrkwin.hxx diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx index b48db1d6ee97..f5fa628b3c28 100644 --- a/vcl/source/app/dbggui.cxx +++ b/vcl/source/app/dbggui.cxx @@ -37,14 +37,10 @@ #include #include -#include "vcl/svdata.hxx" -#include "svsys.h" - -#ifdef WNT -#undef min -#endif #include "tools/debug.hxx" -#include "vcl/svdata.hxx" + +#include "vos/mutex.hxx" + #include "vcl/svapp.hxx" #include "vcl/event.hxx" #include "vcl/lstbox.hxx" @@ -57,13 +53,21 @@ #include "vcl/wrkwin.hxx" #include "vcl/sound.hxx" #include "vcl/threadex.hxx" -#include "vcl/dbggui.hxx" -#include "com/sun/star/i18n/XCharacterClassification.hpp" + +#ifdef WNT +#undef min +#endif +#include "svdata.hxx" +#include "dbggui.hxx" #include "vcl/unohelp.hxx" #include "vcl/unohelp2.hxx" -#include "vos/mutex.hxx" -#include "vcl/salinst.hxx" + +#include "salinst.hxx" +#include "svdata.hxx" +// #include "svsys.h" + +#include "com/sun/star/i18n/XCharacterClassification.hpp" #include #include diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index 2c7ad2fa9c3e..a952ad798655 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -28,15 +28,17 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "vcl/svdata.hxx" +#include "tools/debug.hxx" +#include "tools/time.hxx" + #include "vcl/window.hxx" #include "vcl/event.hxx" #include "vcl/svapp.hxx" #include "vcl/wrkwin.hxx" #include "vcl/help.hxx" -#include "vcl/helpwin.hxx" -#include "tools/debug.hxx" -#include "tools/time.hxx" + +#include "helpwin.hxx" +#include "svdata.hxx" // ======================================================================= diff --git a/vcl/source/app/i18nhelp.cxx b/vcl/source/app/i18nhelp.cxx index 17bc760ff5fc..1083b3e26899 100644 --- a/vcl/source/app/i18nhelp.cxx +++ b/vcl/source/app/i18nhelp.cxx @@ -28,16 +28,18 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "vcl/i18nhelp.hxx" - -#include "com/sun/star/lang/XMultiServiceFactory.hpp" -#include "com/sun/star/i18n/TransliterationModules.hpp" #include "unotools/localedatawrapper.hxx" #include "unotools/transliterationwrapper.hxx" + #include "i18npool/mslangid.hxx" #include "rtl/ustrbuf.hxx" +#include "vcl/i18nhelp.hxx" + +#include "com/sun/star/lang/XMultiServiceFactory.hpp" +#include "com/sun/star/i18n/TransliterationModules.hpp" + using namespace ::com::sun::star; vcl::I18nHelper::I18nHelper( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMSF, const ::com::sun::star::lang::Locale& rLocale ) diff --git a/vcl/source/app/idlemgr.cxx b/vcl/source/app/idlemgr.cxx index 0318bc5d6f2d..0507f2174476 100644 --- a/vcl/source/app/idlemgr.cxx +++ b/vcl/source/app/idlemgr.cxx @@ -27,10 +27,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include -#include + #include +#include + // ======================================================================= struct ImplIdleData diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 73eaa8f965d2..cd92eb146fd7 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -28,16 +28,16 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // this file contains the virtual destructors of the sal interface // compilers ususally put their vtables where the destructor is diff --git a/vcl/source/app/session.cxx b/vcl/source/app/session.cxx index c65eb13224e1..b7c952b6eff9 100644 --- a/vcl/source/app/session.cxx +++ b/vcl/source/app/session.cxx @@ -27,12 +27,17 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include -#include -#include -#include + #include + #include + +#include + +#include +#include +#include + #include #include #include diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index dbc792039f80..81865de12e14 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -27,24 +27,26 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include "tools/debug.hxx" + #include "i18npool/mslangid.hxx" + #include "vcl/svapp.hxx" -#include "vcl/svdata.hxx" #include "vcl/event.hxx" #include "vcl/settings.hxx" #include "vcl/i18nhelp.hxx" -#include "unotools/fontcfg.hxx" #include "vcl/configsettings.hxx" #include "vcl/gradient.hxx" #include "vcl/unohelp.hxx" #include "vcl/bitmapex.hxx" -#include "vcl/impimagetree.hxx" + +#include "unotools/fontcfg.hxx" #include "unotools/localedatawrapper.hxx" #include "unotools/collatorwrapper.hxx" #include "unotools/configmgr.hxx" #include "unotools/confignode.hxx" -#include +#include "unotools/syslocaleoptions.hxx" #ifdef WNT #include "tools/prewin.h" @@ -52,6 +54,9 @@ #include "tools/postwin.h" #endif +#include "svdata.hxx" +#include "impimagetree.hxx" + using namespace rtl; // ======================================================================= diff --git a/vcl/source/app/sound.cxx b/vcl/source/app/sound.cxx index d180f2647135..9c9caa81da49 100644 --- a/vcl/source/app/sound.cxx +++ b/vcl/source/app/sound.cxx @@ -27,22 +27,21 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include +#include + #include -#ifndef _UNOTOOLS_UCBSTREAMHELPER_HXX #include -#endif -#ifndef _SV_SVSYS_HXX -#include -#endif -#include -#include -#include + #include #include #include #include -#include + +#include +#include +#include void Sound::Beep( SoundType eType, Window* pWindow ) { diff --git a/vcl/source/app/stdtext.cxx b/vcl/source/app/stdtext.cxx index 176ec5a1b4c6..a34da349da17 100644 --- a/vcl/source/app/stdtext.cxx +++ b/vcl/source/app/stdtext.cxx @@ -28,13 +28,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_SVIDS_HRC -#include -#endif -#include #include #include +#include +#include // ======================================================================= diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index dd1ea7c0469e..6f810c3cc470 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -28,52 +28,58 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "svsys.h" -#include "vcl/salinst.hxx" -#include "vcl/salframe.hxx" -#include "vcl/salsys.hxx" +//#include "svsys.h" + +#include "comphelper/processfactory.hxx" + +#include "osl/module.h" +#include "osl/file.hxx" +#include "osl/thread.h" + +#include "rtl/tencinfo.h" +#include "rtl/instance.hxx" + #include "vos/process.hxx" #include "vos/mutex.hxx" + #include "tools/tools.h" #include "tools/debug.hxx" #include "tools/time.hxx" + #include "i18npool/mslangid.hxx" -#include "vcl/svdata.hxx" + +#include "unotools/syslocaleoptions.hxx" + #include "vcl/settings.hxx" -#include "vcl/accmgr.hxx" #include "vcl/keycod.hxx" #include "vcl/event.hxx" #include "vcl/vclevent.hxx" #include "vcl/virdev.hxx" -#include "vcl/window.h" #include "vcl/wrkwin.hxx" -#include "vcl/idlemgr.hxx" #include "vcl/svapp.hxx" #include "vcl/cvtgrf.hxx" #include "vcl/unowrap.hxx" -#include "vcl/xconnection.hxx" -#include "vcl/svids.hrc" #include "vcl/timer.hxx" - #include "vcl/unohelp.hxx" +#include "vcl/lazydelete.hxx" + +#include "salinst.hxx" +#include "salframe.hxx" +#include "salsys.hxx" +#include "svdata.hxx" +#include "salimestatus.hxx" +#include "xconnection.hxx" +#include "window.h" +#include "accmgr.hxx" +#include "idlemgr.hxx" +#include "svids.hrc" #include "com/sun/star/uno/Reference.h" #include "com/sun/star/awt/XToolkit.hpp" #include "com/sun/star/uno/XNamingService.hpp" #include "com/sun/star/lang/XMultiServiceFactory.hpp" -#include "comphelper/processfactory.hxx" - -#include "osl/module.h" -#include "osl/file.hxx" - -#include "osl/thread.h" -#include "rtl/tencinfo.h" -#include "rtl/instance.hxx" -#include "vcl/salimestatus.hxx" #include -#include -#include using namespace ::com::sun::star::uno; diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index 935d2c1894ea..023bd332d0a1 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -31,35 +31,37 @@ #include #include "rtl/instance.hxx" + #include "osl/process.h" #include "osl/file.hxx" -#include "svsys.h" - #include "tools/debug.hxx" #include "tools/resary.hxx" -#include "vcl/salinst.hxx" -#include "vcl/salframe.hxx" +#include "unotools/fontcfg.hxx" + +#include "vos/mutex.hxx" + +#include "cppuhelper/implbase1.hxx" + +#include "uno/current_context.hxx" + #include "vcl/configsettings.hxx" -#include "vcl/svdata.hxx" -#include "vcl/window.h" #include "vcl/svapp.hxx" #include "vcl/wrkwin.hxx" #include "vcl/msgbox.hxx" #include "vcl/unohelp.hxx" #include "vcl/button.hxx" // for Button::GetStandardText #include "vcl/dockwin.hxx" // for DockingManager -#include "vcl/salimestatus.hxx" -#include "vcl/salsys.hxx" -#include "vcl/svids.hrc" -#include "unotools/fontcfg.hxx" +#include "salinst.hxx" +#include "salframe.hxx" +#include "svdata.hxx" +#include "window.h" +#include "salimestatus.hxx" +#include "salsys.hxx" +#include "svids.hrc" -#include "vos/mutex.hxx" - -#include "cppuhelper/implbase1.hxx" -#include "uno/current_context.hxx" #include "com/sun/star/lang/XMultiServiceFactory.hpp" #include "com/sun/star/lang/XComponent.hpp" diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 4efa2b659e7c..1fc6b4952802 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -28,6 +28,32 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" +#include "rtl/logfile.hxx" + +#include "osl/file.hxx" + +#include "vos/signal.hxx" +#include "vos/process.hxx" + +#include "tools/tools.h" +#include "tools/debug.hxx" +#include "tools/unqid.hxx" +#include "tools/resmgr.hxx" + +#include "comphelper/processfactory.hxx" + +#include "unotools/syslocaleoptions.hxx" +#include "unotools/fontcfg.hxx" + +#include "vcl/svapp.hxx" +#include "vcl/wrkwin.hxx" +#include "vcl/cvtgrf.hxx" +#include "vcl/image.hxx" +#include "vcl/settings.hxx" +#include "vcl/unowrap.hxx" +#include "vcl/configsettings.hxx" +#include "vcl/lazydelete.hxx" + #ifdef WNT #include #include // for _beginthreadex @@ -40,46 +66,28 @@ // building X11 graphics layers. #if defined UNX && ! defined QUARTZ -#include "svunx.h" +//#include "svunx.h" #endif -#include "svsys.h" -#include "vcl/salinst.hxx" -#include "vcl/salwtype.hxx" -#include "vos/signal.hxx" -#include "tools/tools.h" -#include "tools/debug.hxx" -#include "tools/unqid.hxx" -#include "vcl/svdata.hxx" -#include "vcl/dbggui.hxx" -#include "vcl/svapp.hxx" -#include "vcl/wrkwin.hxx" -#include "vcl/cvtgrf.hxx" -#include "vcl/image.hxx" -#include "tools/resmgr.hxx" -#include "vcl/accmgr.hxx" -#include "vcl/idlemgr.hxx" -#include "vcl/outdev.h" -#include "vcl/outfont.hxx" -#include "vcl/print.h" -#include "vcl/settings.hxx" -#include "vcl/unowrap.hxx" -#include "vcl/salsys.hxx" -#include "vcl/saltimer.hxx" -#include "vcl/salimestatus.hxx" -#include "vcl/impimagetree.hxx" -#include "vcl/xconnection.hxx" +//#include "svsys.h" + +#include "salinst.hxx" +#include "salwtype.hxx" +#include "svdata.hxx" +#include "dbggui.hxx" +#include "accmgr.hxx" +#include "idlemgr.hxx" +#include "outdev.h" +#include "outfont.hxx" +#include "print.h" +#include "salsys.hxx" +#include "saltimer.hxx" +#include "salimestatus.hxx" +#include "impimagetree.hxx" +#include "xconnection.hxx" -#include "vos/process.hxx" -#include "osl/file.hxx" -#include "comphelper/processfactory.hxx" #include "com/sun/star/lang/XMultiServiceFactory.hpp" #include "com/sun/star/lang/XComponent.hpp" -#include "rtl/logfile.hxx" -#include -#include "unotools/fontcfg.hxx" -#include "vcl/configsettings.hxx" -#include "vcl/lazydelete.hxx" #include "cppuhelper/implbase1.hxx" #include "uno/current_context.hxx" diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx index 356608e7fbfc..903380036ebb 100644 --- a/vcl/source/app/timer.cxx +++ b/vcl/source/app/timer.cxx @@ -28,17 +28,15 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_SVSYS_HXX -#include -#endif -#include #include -#include -#include -#include #include + +#include #include +#include +#include +#include // ======================================================================= diff --git a/vcl/source/app/unohelp.cxx b/vcl/source/app/unohelp.cxx index 237156a5f9f7..907a32ea700f 100644 --- a/vcl/source/app/unohelp.cxx +++ b/vcl/source/app/unohelp.cxx @@ -28,35 +28,29 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" +#include +#include +#include + +#include #include + +#include + #include #include #include -#ifndef _COM_SUN_STAR_TEXT_XBREAKITERATOR_HPP_ #include -#endif #include - -#ifndef _COM_SUN_STAR_UTIL_XCOLLATOR_HPP_ #include -#endif #include #include #include - - #include -#include - -#include -#include - -#include -#include using namespace ::com::sun::star; using namespace ::rtl; diff --git a/vcl/source/app/vclevent.cxx b/vcl/source/app/vclevent.cxx index 0c98da48e6d0..40b1491b44c9 100644 --- a/vcl/source/app/vclevent.cxx +++ b/vcl/source/app/vclevent.cxx @@ -29,7 +29,8 @@ #include "precompiled_vcl.hxx" #include "vcl/vclevent.hxx" -#include "vcl/svdata.hxx" + +#include "svdata.hxx" #include diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx index 9c88deccec23..f988c58f953e 100644 --- a/vcl/source/components/dtranscomp.cxx +++ b/vcl/source/components/dtranscomp.cxx @@ -28,6 +28,15 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" +#include "vos/mutex.hxx" + +#include "osl/mutex.hxx" + +#include "vcl/svapp.hxx" + +#include "svdata.hxx" +#include "salinst.hxx" + #include "com/sun/star/lang/XServiceInfo.hpp" #include "com/sun/star/lang/XSingleServiceFactory.hpp" #include "com/sun/star/lang/XInitialization.hpp" @@ -41,12 +50,6 @@ #include "com/sun/star/datatransfer/dnd/XDropTarget.hpp" #include "com/sun/star/datatransfer/dnd/DNDConstants.hpp" -#include "vcl/svapp.hxx" -#include "vcl/svdata.hxx" -#include "vcl/salinst.hxx" -#include "vos/mutex.hxx" -#include "osl/mutex.hxx" - #include "cppuhelper/compbase1.hxx" #include "cppuhelper/compbase2.hxx" #include "cppuhelper/compbase3.hxx" diff --git a/vcl/source/components/fontident.cxx b/vcl/source/components/fontident.cxx index ad309e4f2560..2cbea1628f4e 100644 --- a/vcl/source/components/fontident.cxx +++ b/vcl/source/components/fontident.cxx @@ -28,6 +28,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" +#include + +#include "vcl/svapp.hxx" +#include "vcl/font.hxx" + +#include "svdata.hxx" + #include #include #include @@ -38,15 +45,8 @@ #include #include -#include "vcl/svapp.hxx" -#include "vcl/svdata.hxx" -#include "vcl/font.hxx" - #include -#include - - using ::rtl::OUString; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 82bec2214dff..f75a659b5872 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -29,14 +29,10 @@ #include "precompiled_vcl.hxx" #include +#include +#include -#ifndef _SV_SVIDS_HRC -#include -#endif -#include -#ifndef _SV_IAMGE_HXX #include -#endif #include #include #include @@ -44,20 +40,14 @@ #include #include #include -#include #include -#include -#include -#ifndef _SV_NATIVEWIDGET_HXX #include -#endif #include -#ifndef _SV_RC_H -#include -#endif - - +#include +#include +#include +#include // ======================================================================= diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 5b2e8755e5c8..b045f9e29341 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -27,23 +27,21 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include #include - -#ifndef _SV_RC_H #include -#endif -#include + #include -#include #include #include -#include #include #include -#include - +#include +#include +#include +#include // ======================================================================= diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index 918675cc0783..ea63b9eefdfd 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -28,20 +28,21 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_RC_H +#include + +#include #include -#endif -#include + #include #include #include #include -#include #include -#include -#include -#include +#include +#include +#include + using namespace vcl; diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 5091a4722845..6acd34e70607 100755 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -28,25 +28,22 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_RC_H #include -#endif -#include #include #include #include #include -#ifndef _SV_SVIDS_HRC -#include -#endif #include #include -#include #include #include -#include #include -#include + +#include +#include +#include +#include +#include #include diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 4c4e3c870429..c66a844979ac 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -37,12 +37,15 @@ #include "tools/rc.h" #include "tools/resary.hxx" -#include "vcl/svids.hrc" + #include "vcl/field.hxx" #include "vcl/event.hxx" #include "vcl/svapp.hxx" -#include "vcl/svdata.hxx" #include "vcl/unohelp.hxx" + +#include "svids.hrc" +#include "svdata.hxx" + #include "i18nutil/unicode.hxx" #include "rtl/math.hxx" diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index 8ae2ecff41b9..f9bce6fa8fa1 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -29,21 +29,18 @@ #include "precompiled_vcl.hxx" #include -#ifndef _SV_RC_H #include -#endif -#include -#ifndef _SV_EVENT_HXX -#include -#endif + #include #include #include #include -#include - #include +#include + +#include + #include #include #include diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index f73cf008a5e5..24f495402c10 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -27,13 +27,15 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + +#include "tools/rc.h" + #include "vcl/decoview.hxx" #include "vcl/event.hxx" #include "vcl/fixed.hxx" -#include "vcl/controldata.hxx" -#include "vcl/window.h" -#include "tools/rc.h" +#include "controldata.hxx" +#include "window.h" // ======================================================================= diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx index ecf00568e11f..bbec6f2997d9 100644 --- a/vcl/source/control/group.cxx +++ b/vcl/source/control/group.cxx @@ -27,15 +27,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include -#include -#include -#ifndef _SV_RC_H #include -#endif +#include +#include +#include // ======================================================================= diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index bd0179ffe454..5f253a2971c4 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -27,29 +27,25 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include -#include + #include #include #include #include #include #include -#include -#include -#include #include -#ifndef _COM_SUN_STAR_UTIL_XCOLLATOR_HPP_ -#include -#endif +#include -#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HDL_ -#include -#endif +#include +#include +#include -#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_ +#include +#include #include -#endif #define MULTILINE_ENTRY_DRAW_FLAGS ( TEXT_DRAW_WORDBREAK | TEXT_DRAW_MULTILINE | TEXT_DRAW_VCENTER ) diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx index 65fe11929d1e..8e19a265d0cc 100644 --- a/vcl/source/control/longcurr.cxx +++ b/vcl/source/control/longcurr.cxx @@ -34,15 +34,13 @@ #include #include -#ifndef _SV_RC_H #include -#endif #include #include -#include #include +#include #include diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index 03527bf083a7..68bd53469983 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -29,22 +29,23 @@ #include "precompiled_vcl.hxx" #include "tools/rc.h" +#include "tools/debug.hxx" + -#include "vcl/svdata.hxx" #include "vcl/decoview.hxx" #include "vcl/event.hxx" #include "vcl/scrbar.hxx" #include "vcl/button.hxx" #include "vcl/edit.hxx" -#include "vcl/subedit.hxx" -#include "vcl/ilstbox.hxx" #include "vcl/lstbox.hxx" #include "vcl/combobox.hxx" -#include "vcl/controldata.hxx" -#include "tools/debug.hxx" +#include "svdata.hxx" +#include "controldata.hxx" +#include "subedit.hxx" +#include "ilstbox.hxx" +#include "dndevdis.hxx" -#include #include // ======================================================================= diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index 4261965995fa..4af77177b4b8 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -33,7 +33,8 @@ #include "vcl/decoview.hxx" #include "vcl/scrbar.hxx" #include "vcl/timer.hxx" -#include "vcl/svdata.hxx" + +#include "svdata.hxx" #include "rtl/string.hxx" #include "tools/rc.h" diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index c51ac834f1b4..b42f77375737 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -29,12 +29,14 @@ #include "precompiled_vcl.hxx" #include "tools/rc.h" + #include "vcl/event.hxx" #include "vcl/decoview.hxx" #include "vcl/spin.h" #include "vcl/spinfld.hxx" -#include "vcl/controldata.hxx" -#include "vcl/svdata.hxx" + +#include "controldata.hxx" +#include "svdata.hxx" // ======================================================================= diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 2c81b6af241b..b61842ebe363 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -27,10 +27,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "tools/debug.hxx" +#include "tools/debug.hxx" #include "tools/rc.h" -#include "vcl/svdata.hxx" + #include "vcl/svapp.hxx" #include "vcl/help.hxx" #include "vcl/event.hxx" @@ -39,11 +39,12 @@ #include "vcl/tabpage.hxx" #include "vcl/tabctrl.hxx" #include "vcl/controllayout.hxx" -#include "vcl/controldata.hxx" #include "vcl/sound.hxx" #include "vcl/lstbox.hxx" -#include "vcl/window.h" +#include "controldata.hxx" +#include "svdata.hxx" +#include "window.h" #include #include diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx index cb565122ea63..45172002bff6 100644 --- a/vcl/source/fontsubset/cff.cxx +++ b/vcl/source/fontsubset/cff.cxx @@ -32,7 +32,8 @@ #include #include -#include +#include + #include //#define IGNORE_HINTS diff --git a/vcl/source/fontsubset/fontsubset.cxx b/vcl/source/fontsubset/fontsubset.cxx index 64cf243c6a9d..26382e245996 100644 --- a/vcl/source/fontsubset/fontsubset.cxx +++ b/vcl/source/fontsubset/fontsubset.cxx @@ -28,10 +28,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include -#include #include +#include +#include + // ==================================================================== FontSubsetInfo::FontSubsetInfo() diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx index 074935086b0b..91785fae5641 100644 --- a/vcl/source/gdi/bitmap.cxx +++ b/vcl/source/gdi/bitmap.cxx @@ -27,22 +27,23 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include -#include #include -#include #include -#include -#include -#include -#ifndef _SV_RC_H #include -#endif + +#include +#include +#include #include #include #include #include +#include +#include + // ---------- // - Bitmap - // ---------- diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index ec476157fbeb..8c6c2f10bd7c 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -29,13 +29,15 @@ #include "precompiled_vcl.hxx" #include + #include -#include #include -#include #include #include +#include +#include + // ----------- // - Defines - // ----------- diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx index 38402af626c2..5e3145a541ee 100644 --- a/vcl/source/gdi/bitmapex.cxx +++ b/vcl/source/gdi/bitmapex.cxx @@ -27,25 +27,26 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include + #include -#include + #include #include +#include + +#include #include #include -#include #include #include -#ifndef _SV_IMPIMAGETREE_H -#include -#endif -#ifndef _SV_RC_H -#include -#endif #include #include +#include +#include + // ------------ // - BitmapEx - // ------------ diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx index c963ea32542e..50fdca07605d 100644 --- a/vcl/source/gdi/bmpacc.cxx +++ b/vcl/source/gdi/bmpacc.cxx @@ -27,10 +27,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include -#include #include #include + +#include + #include // -------------------- diff --git a/vcl/source/gdi/bmpacc3.cxx b/vcl/source/gdi/bmpacc3.cxx index a89015d12351..3aef42dfeb02 100644 --- a/vcl/source/gdi/bmpacc3.cxx +++ b/vcl/source/gdi/bmpacc3.cxx @@ -27,12 +27,15 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + +#include + #include #include -#include #include #include -#include + +#include // --------------------- // - BitmapWriteAccess - diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx index e6c94ba0475e..4901491e2ed1 100644 --- a/vcl/source/gdi/bmpfast.cxx +++ b/vcl/source/gdi/bmpfast.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include +#include #ifndef NO_OPTIMIZED_BITMAP_ACCESS diff --git a/vcl/source/gdi/configsettings.cxx b/vcl/source/gdi/configsettings.cxx index b11b9ab822f4..ce39c70e243f 100644 --- a/vcl/source/gdi/configsettings.cxx +++ b/vcl/source/gdi/configsettings.cxx @@ -29,7 +29,9 @@ #include "precompiled_vcl.hxx" #include -#include + +#include + #include #include #include diff --git a/vcl/source/gdi/cvtgrf.cxx b/vcl/source/gdi/cvtgrf.cxx index 8ba963bc4718..dd0173f17423 100644 --- a/vcl/source/gdi/cvtgrf.cxx +++ b/vcl/source/gdi/cvtgrf.cxx @@ -28,14 +28,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_SVSYS_HXX -#include -#endif #include -#include -#include #include +#include +#include + // -------------- // - Callback - // -------------- diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx index e26c15309c54..d7f0aac5bdeb 100644 --- a/vcl/source/gdi/font.cxx +++ b/vcl/source/gdi/font.cxx @@ -28,15 +28,18 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "sft.hxx" +#include "unotools/fontcfg.hxx" #include "tools/stream.hxx" #include "tools/vcompat.hxx" #include "tools/debug.hxx" + #include "vcl/font.hxx" -#include "vcl/impfont.hxx" -#include "vcl/outfont.hxx" -#include "unotools/fontcfg.hxx" + +#include "impfont.hxx" +#include "outfont.hxx" +#include "sft.hxx" + #include diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index 790c3d43bb85..51a01db868c1 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -27,11 +27,15 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include + #include #include #include + +#include + #include + #include #include #include diff --git a/vcl/source/gdi/image.cxx b/vcl/source/gdi/image.cxx index e79308b2664e..3a6e81e8d48a 100644 --- a/vcl/source/gdi/image.cxx +++ b/vcl/source/gdi/image.cxx @@ -31,25 +31,22 @@ #include #include + #include #include -#ifndef _SV_RC_H #include -#endif #include -#ifndef _SV_RESMGR_HXX #include -#endif + #include #include #include #include -#ifndef _SV_IMPIMAGETREE_H -#include -#endif -#include #include +#include +#include + #if OSL_DEBUG_LEVEL > 0 #include #endif diff --git a/vcl/source/gdi/imagerepository.cxx b/vcl/source/gdi/imagerepository.cxx index d97999311751..0118acc13146 100644 --- a/vcl/source/gdi/imagerepository.cxx +++ b/vcl/source/gdi/imagerepository.cxx @@ -27,12 +27,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include #include #include -#ifndef _SV_IMPIMAGETREE_H -#include "vcl/impimagetree.hxx" -#endif + +#include "impimagetree.hxx" //........................................................................ namespace vcl diff --git a/vcl/source/gdi/impbmp.cxx b/vcl/source/gdi/impbmp.cxx index 3e328b7db7a4..244e688601a5 100644 --- a/vcl/source/gdi/impbmp.cxx +++ b/vcl/source/gdi/impbmp.cxx @@ -28,15 +28,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_SVSYS_HXX -#include -#endif -#include #include -#include + #include -#include -#include + +#include +#include +#include +#include // -------------- // - ImpBitmap - diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 397a5d6b704a..14326371c89e 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -27,24 +27,27 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include #include #include +#include + #include + #include -#ifndef _UNTOOLS_TEMPFILE_HXX #include -#endif + #include #include -#include -#include -#include #include #include #include #include #include + +#include + #include // ----------- diff --git a/vcl/source/gdi/impimage.cxx b/vcl/source/gdi/impimage.cxx index 3105850c4fbf..f68c844c73f9 100644 --- a/vcl/source/gdi/impimage.cxx +++ b/vcl/source/gdi/impimage.cxx @@ -27,15 +27,17 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include #include #include #include #include #include -#include #include +#include + // ----------- // - Defines - // ----------- diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx index 03e4c1dbbb2a..19947679567c 100644 --- a/vcl/source/gdi/impimagetree.cxx +++ b/vcl/source/gdi/impimagetree.cxx @@ -26,13 +26,13 @@ ***********************************************************************/ #include "precompiled_vcl.hxx" + #include "sal/config.h" #include #include #include #include - #include #include "com/sun/star/container/XNameAccess.hpp" @@ -43,24 +43,31 @@ #include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/RuntimeException.hpp" #include "com/sun/star/uno/Sequence.hxx" + #include "comphelper/processfactory.hxx" + #include "osl/file.hxx" #include "osl/diagnose.h" + #include "rtl/bootstrap.hxx" #include "rtl/string.h" #include "rtl/textenc.h" #include "rtl/ustrbuf.hxx" #include "rtl/ustring.h" #include "rtl/ustring.hxx" + #include "sal/types.h" + #include "tools/stream.hxx" #include "tools/urlobj.hxx" + #include "vcl/bitmapex.hxx" -#include "vcl/impimagetree.hxx" #include "vcl/pngread.hxx" #include "vcl/settings.hxx" #include "vcl/svapp.hxx" +#include "impimagetree.hxx" + namespace { namespace css = com::sun::star; diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx index 2bc0addaa93c..d813629668d7 100644 --- a/vcl/source/gdi/jobset.cxx +++ b/vcl/source/gdi/jobset.cxx @@ -27,13 +27,15 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include #include -#ifndef _RTL_ALLOC_H + #include -#endif + #include -#include + +#include // ======================================================================= diff --git a/vcl/source/gdi/metric.cxx b/vcl/source/gdi/metric.cxx index 6d225ad7e0dc..1f0d89e6926c 100644 --- a/vcl/source/gdi/metric.cxx +++ b/vcl/source/gdi/metric.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include +#include #include #include diff --git a/vcl/source/gdi/octree.cxx b/vcl/source/gdi/octree.cxx index 0660728fc8a5..26860097d1ee 100644 --- a/vcl/source/gdi/octree.cxx +++ b/vcl/source/gdi/octree.cxx @@ -27,11 +27,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include + #include -#include #include +#include + // --------- // - pMask - // --------- diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx index 847a8d7a299a..195f3cf6dc42 100644 --- a/vcl/source/gdi/outdev.cxx +++ b/vcl/source/gdi/outdev.cxx @@ -29,35 +29,32 @@ #include "precompiled_vcl.hxx" #include -#ifndef _SV_SVSYS_HXX -#include -#endif -#include -#include -#include -#include -#include #include -#include +#include + #include #include -#ifndef _POLY_HXX -#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 diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx old mode 100755 new mode 100644 index 06dcd73cc3d4..fb14751fa9e9 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -28,30 +28,29 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_SVSYS_HXX -#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 #define BAND_MAX_SIZE 512000 diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index ca50e4bf6c82..cfee741657e1 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -30,49 +30,55 @@ #include "i18npool/mslangid.hxx" -#include "svsys.h" -#include "vcl/salgdi.hxx" -#include "vcl/sallayout.hxx" #include "rtl/tencinfo.h" +#include "rtl/logfile.hxx" + #include "tools/debug.hxx" -#include "vcl/svdata.hxx" -#include "vcl/metric.hxx" -#include "vcl/impfont.hxx" -#include "vcl/metaact.hxx" -#include "vcl/gdimtf.hxx" -#include "vcl/outdata.hxx" -#include "vcl/outfont.hxx" +#include "tools/poly.hxx" + #include "basegfx/polygon/b2dpolygon.hxx" #include "basegfx/polygon/b2dpolypolygon.hxx" #include "basegfx/matrix/b2dhommatrix.hxx" -#include "tools/poly.hxx" -#include "vcl/outdev.h" + +#include "vcl/metric.hxx" +#include "vcl/metaact.hxx" +#include "vcl/gdimtf.hxx" #include "vcl/virdev.hxx" #include "vcl/print.hxx" #include "vcl/event.hxx" -#include "vcl/window.h" #include "vcl/window.hxx" #include "vcl/svapp.hxx" #include "vcl/bmpacc.hxx" -#include "unotools/fontcvt.hxx" #include "vcl/outdev.hxx" #include "vcl/edit.hxx" -#include "unotools/fontcfg.hxx" #include "vcl/sysdata.hxx" -#include "vcl/textlayout.hxx" -#include "vcl/svids.hrc" +#include "vcl/unohelp.hxx" +#include "vcl/controllayout.hxx" + +#include "salgdi.hxx" +#include "sallayout.hxx" +#include "svdata.hxx" +#include "impfont.hxx" +#include "outdata.hxx" +#include "outfont.hxx" +#include "outdev.h" +#include "textlayout.hxx" +#include "svids.hrc" +#include "window.h" + +#include "unotools/fontcvt.hxx" +#include "unotools/fontcfg.hxx" + #include "osl/file.h" + #ifdef ENABLE_GRAPHITE -#include "vcl/graphite_features.hxx" +#include "graphite_features.hxx" #endif #ifdef USE_BUILTIN_RASTERIZER -#include "vcl/glyphcache.hxx" +#include "glyphcache.hxx" #endif -#include "vcl/unohelp.hxx" #include "pdfwriter_impl.hxx" -#include "vcl/controllayout.hxx" -#include "rtl/logfile.hxx" #include "com/sun/star/beans/PropertyValues.hpp" #include "com/sun/star/i18n/XBreakIterator.hpp" diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx index 8ad02ed2d818..e1b20a1b7aff 100644 --- a/vcl/source/gdi/outdev4.cxx +++ b/vcl/source/gdi/outdev4.cxx @@ -28,25 +28,26 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include -#include #include -#include +#include +#include + #include #include #include -#include -#include #include -#include #include #include #include #include #include "pdfwriter_impl.hxx" -#include "vcl/window.h" -#include "vcl/salframe.hxx" + +#include "window.h" +#include "salframe.hxx" +#include "salgdi.hxx" +#include "svdata.hxx" +#include "outdata.hxx" #include #include diff --git a/vcl/source/gdi/outdev5.cxx b/vcl/source/gdi/outdev5.cxx index d42723215c55..e509ce716d7a 100644 --- a/vcl/source/gdi/outdev5.cxx +++ b/vcl/source/gdi/outdev5.cxx @@ -29,20 +29,19 @@ #include "precompiled_vcl.hxx" #include -#ifndef _SV_SVSYS_HXX -#include -#endif -#include #include -#include #include + #include #include -#include -#include #include #include +#include +#include +#include +#include + // ======================================================================= DBG_NAMEEX( OutputDevice ) diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx index 5b8d228bb141..a597ccc1d5bf 100644 --- a/vcl/source/gdi/outdev6.cxx +++ b/vcl/source/gdi/outdev6.cxx @@ -28,12 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_SVSYS_HXX -#include -#endif -#include #include -#include #include #include #include @@ -42,16 +37,21 @@ #include #include #include -#include + +#include +#include +#include +#include +#include + #include #include #include #include #include + #include -#include -#include // ======================================================================== diff --git a/vcl/source/gdi/outdevnative.cxx b/vcl/source/gdi/outdevnative.cxx index b5b745b708fa..c3427cf9bb0f 100755 --- a/vcl/source/gdi/outdevnative.cxx +++ b/vcl/source/gdi/outdevnative.cxx @@ -30,10 +30,11 @@ #include "vcl/outdev.hxx" #include "vcl/window.hxx" -#include "vcl/salgdi.hxx" #include "vcl/salnativewidgets.hxx" #include "vcl/pdfextoutdevdata.hxx" +#include "salgdi.hxx" + // ----------------------------------------------------------------------- static bool lcl_enableNativeWidget( const OutputDevice& i_rDevice ) diff --git a/vcl/source/gdi/outmap.cxx b/vcl/source/gdi/outmap.cxx index 189ba4c29e59..d93c27c06211 100644 --- a/vcl/source/gdi/outmap.cxx +++ b/vcl/source/gdi/outmap.cxx @@ -30,25 +30,25 @@ #include -#ifndef _SV_SVSYS_HXX -#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 diff --git a/vcl/source/gdi/pdffontcache.cxx b/vcl/source/gdi/pdffontcache.cxx index 507ede81ef24..f0842c6bc1ba 100644 --- a/vcl/source/gdi/pdffontcache.cxx +++ b/vcl/source/gdi/pdffontcache.cxx @@ -28,9 +28,9 @@ #include "precompiled_vcl.hxx" #include "pdffontcache.hxx" -#include -#include -#include +#include +#include +#include using namespace vcl; diff --git a/vcl/source/gdi/pdffontcache.hxx b/vcl/source/gdi/pdffontcache.hxx index 06ffff86b070..b9997c1e6fc9 100644 --- a/vcl/source/gdi/pdffontcache.hxx +++ b/vcl/source/gdi/pdffontcache.hxx @@ -30,8 +30,8 @@ #include -#include -#include +#include +#include namespace vcl { diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 325ccef1c3a6..30f51af0c401 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -33,41 +33,52 @@ #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 "vcl/strhelper.hxx" + +#include +#include +#include +#include +#include + +#include + #include + #include #include + #include "cppuhelper/implbase1.hxx" -#include -#include -#include "vcl/strhelper.hxx" using namespace vcl; using namespace rtl; diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index 5702bee23ea5..bd7d6973004d 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -37,14 +37,14 @@ #include "vcl/gradient.hxx" #include "vcl/hatch.hxx" #include "vcl/wall.hxx" -#include "vcl/outdata.hxx" +#include "outdata.hxx" #include "rtl/strbuf.hxx" #include "rtl/cipher.h" #include "rtl/digest.h" #include "com/sun/star/util/XURLTransformer.hpp" #include "com/sun/star/lang/Locale.hpp" -#include +#include #include "pdffontcache.hxx" #include diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index ee1fe1cc6bc5..d43d210db7a1 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -34,9 +34,12 @@ #include "vcl/gdimtf.hxx" #include "vcl/metaact.hxx" #include "vcl/graph.hxx" -#include "vcl/svdata.hxx" + +#include "svdata.hxx" + #include "unotools/streamwrap.hxx" #include "unotools/processfactory.hxx" + #include "comphelper/processfactory.hxx" #include "com/sun/star/beans/PropertyValue.hpp" diff --git a/vcl/source/gdi/polyscan.cxx b/vcl/source/gdi/polyscan.cxx deleted file mode 100644 index eb329f8c6869..000000000000 --- a/vcl/source/gdi/polyscan.cxx +++ /dev/null @@ -1,358 +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_vcl.hxx" - -#include -#include -#include -#include "polyscan.hxx" -#include - -// ---------------- -// - PolyScanline - -// ---------------- - -PolyScanline::PolyScanline() : - mpFirst ( NULL ), - mpLast ( NULL ), - mpAct ( NULL ), - mnLeft ( 0L ), - mnRight ( 0L ) -{ -} - -// ------------------------------------------------------------------------ - -PolyScanline::~PolyScanline() -{ - ImplDelete(); -} - -// ------------------------------------------------------------------------ - -void PolyScanline::ImplDelete() -{ - ScanlinePoint* pAct = mpFirst; - - while( pAct ) - { - ScanlinePoint* pNext = pAct->mpNext; - delete pAct; - pAct = pNext; - } - - mnLeft = mnRight = 0L; - mpFirst = mpAct = mpLast = NULL; -} - -// ------------------------------------------------------------------------ - -void PolyScanline::Insert( long nX ) -{ - // first point to insert? - if( !mpFirst ) - mpLast = mpFirst = new ScanlinePoint( mnLeft = mnRight = nX, NULL ); - else - { - // insert at the beginning of the scanline - if( nX <= mpFirst->mnX ) - mpFirst = new ScanlinePoint( mnLeft = nX, mpFirst ); - else if( nX >= mnRight ) - mpLast = mpLast->mpNext = new ScanlinePoint( mnRight = nX, NULL ); - else - { - ScanlinePoint* pLast = mpFirst; - ScanlinePoint* pAct = mpFirst->mpNext; - - while( pAct ) - { - // insert in the midlle of the scanline? - if( nX <= pAct->mnX ) - { - pLast->mpNext = new ScanlinePoint( nX, pAct ); - break; - } - - pLast = pAct; - pAct = pAct->mpNext; - } - } - } -} - -// ------------------------------------------------------------------------ - -void PolyScanline::Set( long nStart, long nEnd ) -{ - if( mpFirst ) - ImplDelete(); - - if( nStart <= nEnd ) - mpFirst = new ScanlinePoint( mnLeft = nStart, mpLast = new ScanlinePoint( mnRight = nEnd, NULL ) ); - else - mpFirst = new ScanlinePoint( mnLeft = nEnd, mpLast = new ScanlinePoint( mnRight = nStart, NULL ) ); -} - -// ------------------------------------------------------------------------ - -BOOL PolyScanline::GetFirstSegment( PolyScanSegment& rSegment ) -{ - BOOL bRet = GetFirstX( rSegment.mnStart ); - - if( bRet && !GetNextX( rSegment.mnEnd ) ) - rSegment.mnEnd = rSegment.mnStart; - - return bRet; -} - -// ------------------------------------------------------------------------ - -BOOL PolyScanline::GetNextSegment( PolyScanSegment& rSegment ) -{ - BOOL bRet = GetNextX( rSegment.mnStart ); - - if( bRet && !GetNextX( rSegment.mnEnd ) ) - rSegment.mnEnd = rSegment.mnStart; - - return bRet; -} - -// --------------- -// - PolyScanner - -// --------------- - -PolyScanner::PolyScanner( const Rectangle& rRect ) -{ - if( !rRect.IsEmpty() ) - { - Rectangle aRect( rRect ); - ULONG nHeight; - - aRect.Justify(); - mnLeft = aRect.Left(); - mnTop = aRect.Top(); - mnRight = aRect.Right(); - mnBottom = aRect.Bottom(); - mpArray = new PolyScanline[ nHeight = Height() ]; - - for( ULONG i = 0UL; i < nHeight; i++ ) - mpArray[ i ].Set( mnLeft, mnRight ); - } - else - { - mnLeft = mnTop = mnRight = mnBottom = 0L; - mpArray = NULL; - } -} - -// ------------------------------------------------------------------------ - -PolyScanner::PolyScanner( const Polygon& rPoly ) -{ - const long nCount = rPoly.GetSize(); - - if( nCount ) - { - long nLast = nCount - 1; - Point aFirst( rPoly[ 0 ] ); - Point aLast( rPoly[ (USHORT) nLast ] ); - - while( nLast && ( aLast == aFirst ) ) - aLast = rPoly[ (USHORT) --nLast ]; - - if( !nLast ) - { - aLast = rPoly[ 0 ]; - mnLeft = mnRight = aLast.X(); - mnTop = mnBottom = aLast.Y(); - mpArray = new PolyScanline[ 1UL ]; - mpArray[ 0 ].Set( mnLeft, mnRight ); - } - else - { - const Rectangle aRect( rPoly.GetBoundRect() ); - ULONG nHeight; - - mnLeft = aRect.Left(); - mnTop = aRect.Top(); - mnRight = aRect.Right(); - mnBottom = aRect.Bottom(); - aLast = aFirst; - mpArray = new PolyScanline[ nHeight = Height() ]; - - for( long i = 1L; i <= nLast; i++ ) - { - const Point& rPt = rPoly[ (USHORT) i ]; - - if( rPt != aLast ) - { - InsertLine( aLast, rPt ); - aLast = rPt; - } - } - - InsertLine( aLast, aFirst ); - } - } - else - mpArray = NULL; -} - -// ------------------------------------------------------------------------ - -PolyScanner::PolyScanner( const PolyPolygon& rPolyPoly ) -{ - mpArray = NULL; -} - -// ------------------------------------------------------------------------ - -PolyScanner::~PolyScanner() -{ - delete[] mpArray; -} - -// ------------------------------------------------------------------------ - -PolyScanline* PolyScanner::operator[]( ULONG nPos ) const -{ - DBG_ASSERT( nPos < Count(), "nPos out of range!" ); - return( mpArray ? ( mpArray + nPos ) : NULL ); -} - -// ------------------------------------------------------------------------ - -void PolyScanner::InsertLine( const Point& rStart, const Point& rEnd ) -{ - long nX, nY; - - if( rStart.Y() == rEnd.Y() ) - mpArray[ rStart.Y() - mnTop ].Insert( rStart.X() ); - else if( rStart.X() == rEnd.X() ) - { - // vertical line - const long nEndY = rEnd.Y(); - - nX = rStart.X(); - nY = rStart.Y(); - - if( nEndY > nY ) - while( nY < nEndY ) - mpArray[ nY++ - mnTop ].Insert( nX ); - else - while( nY > nEndY ) - mpArray[ nY-- - mnTop ].Insert( nX ); - } - else - { - const long nDX = labs( rEnd.X() - rStart.X() ); - const long nDY = labs( rEnd.Y() - rStart.Y() ); - const long nStartX = rStart.X(); - const long nStartY = rStart.Y(); - const long nEndX = rEnd.X(); - const long nEndY = rEnd.Y(); - const long nXInc = ( nStartX < nEndX ) ? 1L : -1L; - const long nYInc = ( nStartY < nEndY ) ? 1L : -1L; - long nLastX = nStartX; - long nLastY = nStartY; - BOOL bLast = FALSE; - - mpArray[ nStartY - mnTop ].Insert( nStartX ); - - if( nDX >= nDY ) - { - const long nDYX = ( nDY - nDX ) << 1; - const long nDY2 = nDY << 1; - long nD = nDY2 - nDX; - - for( nX = nStartX, nY = nLastY = nStartY; nX != nEndX; ) - { - if( nY != nLastY ) - { - if( bLast ) - mpArray[ nLastY - mnTop ].Insert( nLastX ); - - mpArray[ nY - mnTop ].Insert( nX ); - bLast = FALSE; - } - else - bLast = TRUE; - - nLastX = nX; - nLastY = nY; - - if( nD < 0L ) - nD += nDY2; - else - { - nD += nDYX; - nY += nYInc; - } - - nX += nXInc; - } - } - else - { - const long nDYX = ( nDX - nDY ) << 1; - const long nDY2 = nDX << 1; - long nD = nDY2 - nDY; - - for( nX = nStartX, nY = nStartY; nY != nEndY; ) - { - if( nY != nLastY ) - { - if( bLast ) - mpArray[ nLastY - mnTop ].Insert( nLastX ); - - mpArray[ nY - mnTop ].Insert( nX ); - bLast = FALSE; - } - else - bLast = TRUE; - - nLastX = nX; - nLastY = nY; - - if( nD < 0L ) - nD += nDY2; - else - { - nD += nDYX; - nX += nXInc; - } - - nY += nYInc; - } - } - - if( bLast ) - mpArray[ nLastY - mnTop ].Insert( nLastX ); - } -} diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 78456992340f..3dd9b37c5b10 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -31,30 +31,28 @@ #define ENABLE_BYTESTRING_STREAM_OPERATORS #include -#ifndef _SV_SVSYS_HXX -#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 "com/sun/star/beans/XPropertySet.hpp" diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx index 5c2a742a10ba..a87dbad5276f 100644 --- a/vcl/source/gdi/print2.cxx +++ b/vcl/source/gdi/print2.cxx @@ -33,19 +33,22 @@ #include #include #include + #include #include + #include + #include #include #include -#include #include #include #include -#include #include +#include + #include "pdfwriter_impl.hxx" // ----------- diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 8207282add99..11f5e187c61d 100755 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -28,16 +28,17 @@ #include "precompiled_vcl.hxx" #include "vcl/print.hxx" -#include "vcl/prndlg.hxx" #include "vcl/svapp.hxx" -#include "vcl/svdata.hxx" -#include "vcl/salinst.hxx" -#include "vcl/salprn.hxx" -#include "vcl/svids.hrc" #include "vcl/metaact.hxx" #include "vcl/msgbox.hxx" #include "vcl/configsettings.hxx" +#include "printdlg.hxx" +#include "svdata.hxx" +#include "salinst.hxx" +#include "salprn.hxx" +#include "svids.hrc" + #include "tools/urlobj.hxx" #include "com/sun/star/ui/dialogs/XFilePicker.hpp" diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index 4931ee66e93f..087497549cc3 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -29,19 +29,16 @@ #include "precompiled_vcl.hxx" #include + #include -#include #include #include -#ifndef _REGION_H -#include -#endif -#ifndef _REGION_HXX + #include -#endif -#ifndef _REGBAND_HXX #include -#endif +#include + +#include #include #include diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 97e11c5a6aa4..0a616a84eddb 100755 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -29,30 +29,31 @@ #include "precompiled_vcl.hxx" #include -#ifndef _SV_SVSYS_HXX -#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 "basegfx/polygon/b2dpolygon.hxx" // ---------------------------------------------------------------------------- diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index 5e187944c706..3a2251da5d84 100755 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -34,19 +34,16 @@ #include #include -#ifndef _SV_SVSYS_HXX -#include -#endif -#include -#include +#include +#include + #include #include #include + #include -#ifndef _TL_DEBUG_HXX #include -#endif #include diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx index 31df581f50a2..6fdafe04e88b 100644 --- a/vcl/source/gdi/salmisc.cxx +++ b/vcl/source/gdi/salmisc.cxx @@ -30,7 +30,7 @@ #include #include #include -#include +#include // ----------- // - Defines - diff --git a/vcl/source/gdi/salnativewidgets-none.cxx b/vcl/source/gdi/salnativewidgets-none.cxx index 8aa0e47f1a35..d2a0b1aebf0c 100644 --- a/vcl/source/gdi/salnativewidgets-none.cxx +++ b/vcl/source/gdi/salnativewidgets-none.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include +#include using namespace rtl; diff --git a/vcl/source/gdi/svcompat.cxx b/vcl/source/gdi/svcompat.cxx deleted file mode 100644 index 415cad128a49..000000000000 --- a/vcl/source/gdi/svcompat.cxx +++ /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. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_vcl.hxx" -#include -#include - -// -------------- -// - ImplCompat - -// -------------- - -ImplCompat::ImplCompat( SvStream& rStm, USHORT nStreamMode, USHORT nVersion ) : - mpRWStm ( &rStm ), - mnStmMode ( nStreamMode ), - mnVersion ( nVersion ) -{ - if( !mpRWStm->GetError() ) - { - if( STREAM_WRITE == mnStmMode ) - { - *mpRWStm << mnVersion; - mnTotalSize = ( mnCompatPos = mpRWStm->Tell() ) + 4UL; - mpRWStm->SeekRel( 4L ); - } - else - { - *mpRWStm >> mnVersion; - *mpRWStm >> mnTotalSize; - mnCompatPos = mpRWStm->Tell(); - } - } -} - -// ------------------------------------------------------------------------ - -ImplCompat::~ImplCompat() -{ - if( STREAM_WRITE == mnStmMode ) - { - const UINT32 nEndPos = mpRWStm->Tell(); - - mpRWStm->Seek( mnCompatPos ); - *mpRWStm << ( nEndPos - mnTotalSize ); - mpRWStm->Seek( nEndPos ); - } - else - { - const UINT32 nReadSize = mpRWStm->Tell() - mnCompatPos; - - if( mnTotalSize > nReadSize ) - mpRWStm->SeekRel( mnTotalSize - nReadSize ); - } -} diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx index 78ce197525ec..33bdf6b05bcc 100644 --- a/vcl/source/gdi/textlayout.cxx +++ b/vcl/source/gdi/textlayout.cxx @@ -30,8 +30,9 @@ #include "vcl/ctrl.hxx" #include "vcl/outdev.hxx" -#include "vcl/outfont.hxx" -#include "vcl/textlayout.hxx" + +#include "outfont.hxx" +#include "textlayout.hxx" #include diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index 4c1439ffe6f4..9088ce51de6a 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -28,21 +28,20 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_SVSYS_HXX -#include -#endif -#include -#include -#include -#include #include -#include + #include #include #include -#include #include +#include +#include +#include +#include +#include +#include + using namespace ::com::sun::star::uno; // ======================================================================= diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx index 10aa4431f69d..3eb7e654a829 100644 --- a/vcl/source/gdi/wall.cxx +++ b/vcl/source/gdi/wall.cxx @@ -27,15 +27,18 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include #include #include + #include #include #include -#include #include +#include + DBG_NAME( Wallpaper ); diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx index 601e46411cd8..57e948b55843 100644 --- a/vcl/source/glyphs/gcach_ftyp.cxx +++ b/vcl/source/glyphs/gcach_ftyp.cxx @@ -36,12 +36,13 @@ #include "gcach_ftyp.hxx" #include "vcl/svapp.hxx" -#include "vcl/outfont.hxx" -#include "vcl/impfont.hxx" + +#include "outfont.hxx" +#include "impfont.hxx" #include "tools/poly.hxx" #include "basegfx/matrix/b2dhommatrix.hxx" -#include +#include "basegfx/matrix/b2dhommatrixtools.hxx" #include "basegfx/polygon/b2dpolypolygon.hxx" #include "osl/file.hxx" diff --git a/vcl/source/glyphs/gcach_ftyp.hxx b/vcl/source/glyphs/gcach_ftyp.hxx index d760ce1d1fed..5ee155db3008 100644 --- a/vcl/source/glyphs/gcach_ftyp.hxx +++ b/vcl/source/glyphs/gcach_ftyp.hxx @@ -28,7 +28,7 @@ #ifndef _SV_GCACHFTYP_HXX #define _SV_GCACHFTYP_HXX -#include +#include #include #include diff --git a/vcl/source/glyphs/gcach_layout.cxx b/vcl/source/glyphs/gcach_layout.cxx index a9f9167062ba..b212b036425a 100644 --- a/vcl/source/glyphs/gcach_layout.cxx +++ b/vcl/source/glyphs/gcach_layout.cxx @@ -30,8 +30,8 @@ #define ENABLE_ICU_LAYOUT #include -#include -#include +#include +#include #include diff --git a/vcl/source/glyphs/gcach_rbmp.cxx b/vcl/source/glyphs/gcach_rbmp.cxx index 5ea80da77794..8e3fe158b1f5 100644 --- a/vcl/source/glyphs/gcach_rbmp.cxx +++ b/vcl/source/glyphs/gcach_rbmp.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include +#include #include //------------------------------------------------------------------------ diff --git a/vcl/source/glyphs/glyphcache.cxx b/vcl/source/glyphs/glyphcache.cxx index 7181db56dd4d..29b5ec8bac2d 100644 --- a/vcl/source/glyphs/glyphcache.cxx +++ b/vcl/source/glyphs/glyphcache.cxx @@ -31,15 +31,17 @@ #include #include #include -#include + #include #include #include -#include +#include + +#include #ifdef ENABLE_GRAPHITE -#include +#include #endif #include // used only for string=>hashvalue diff --git a/vcl/source/glyphs/graphite_adaptors.cxx b/vcl/source/glyphs/graphite_adaptors.cxx index f82e3afe39c8..46bce54f6298 100644 --- a/vcl/source/glyphs/graphite_adaptors.cxx +++ b/vcl/source/glyphs/graphite_adaptors.cxx @@ -45,17 +45,17 @@ #include // Platform #ifndef WNT -#include +#include -#include +#include #include // Module #include "gcach_ftyp.hxx" -#include -#include +#include +#include // Module private type definitions and forward declarations. // diff --git a/vcl/source/glyphs/graphite_cache.cxx b/vcl/source/glyphs/graphite_cache.cxx index 7682cdb6c8ba..a19f5c5a2c9d 100644 --- a/vcl/source/glyphs/graphite_cache.cxx +++ b/vcl/source/glyphs/graphite_cache.cxx @@ -34,7 +34,7 @@ #endif #include -#include +#include #include #include @@ -42,8 +42,8 @@ #include #include -#include -#include +#include +#include #include "graphite_textsrc.hxx" diff --git a/vcl/source/glyphs/graphite_features.cxx b/vcl/source/glyphs/graphite_features.cxx index 1cb25306c4ee..4aba41c4b6d3 100644 --- a/vcl/source/glyphs/graphite_features.cxx +++ b/vcl/source/glyphs/graphite_features.cxx @@ -40,7 +40,7 @@ #include #endif -#include +#include using namespace grutils; // These mustn't conflict with font name lists which use ; and , diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index 8a011606ab41..267454d825c5 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -57,10 +57,10 @@ #endif #ifdef UNX -#include +#include #endif -#include +#include #include #include @@ -75,8 +75,8 @@ #include #include -#include -#include +#include +#include #include "graphite_textsrc.hxx" @@ -102,7 +102,7 @@ FILE * grLog() #endif #ifdef GRCACHE -#include +#include #endif diff --git a/vcl/source/glyphs/graphite_serverfont.cxx b/vcl/source/glyphs/graphite_serverfont.cxx index eda97f509f03..ceba4dd4f6c8 100644 --- a/vcl/source/glyphs/graphite_serverfont.cxx +++ b/vcl/source/glyphs/graphite_serverfont.cxx @@ -35,12 +35,12 @@ // // Platform -#include +#include // Module #include "gcach_ftyp.hxx" -#include +#include #include "graphite_textsrc.hxx" -#include +#include #ifndef WNT diff --git a/vcl/source/glyphs/graphite_textsrc.cxx b/vcl/source/glyphs/graphite_textsrc.cxx index 5764ba9454c9..ac5fd0c558af 100644 --- a/vcl/source/glyphs/graphite_textsrc.cxx +++ b/vcl/source/glyphs/graphite_textsrc.cxx @@ -37,7 +37,7 @@ #include #include #include "graphite_textsrc.hxx" -#include +#include // class TextSourceAdaptor implementation. // diff --git a/vcl/source/glyphs/graphite_textsrc.hxx b/vcl/source/glyphs/graphite_textsrc.hxx index 388f8a631b49..ece01cc1a532 100644 --- a/vcl/source/glyphs/graphite_textsrc.hxx +++ b/vcl/source/glyphs/graphite_textsrc.hxx @@ -43,17 +43,9 @@ #include #endif -#ifndef _SV_SVSYS_HXX #include -#endif - -#ifndef _SV_SALGDI_HXX -#include -#endif - -#ifndef _SV_SALLAYOUT_HXX -#include -#endif +#include +#include // Module #include "vcl/dllapi.h" diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx index 2bc0ab94d272..2caddb0ced7a 100644 --- a/vcl/source/helper/canvasbitmap.cxx +++ b/vcl/source/helper/canvasbitmap.cxx @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include #include diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx index 71c306ff9bbb..03956568e057 100644 --- a/vcl/source/helper/canvastools.cxx +++ b/vcl/source/helper/canvastools.cxx @@ -69,7 +69,7 @@ #include #include -#include +#include #include #include diff --git a/vcl/source/helper/lazydelete.cxx b/vcl/source/helper/lazydelete.cxx index 7b244781c3c7..5ef79f92d401 100644 --- a/vcl/source/helper/lazydelete.cxx +++ b/vcl/source/helper/lazydelete.cxx @@ -33,7 +33,7 @@ #include "vcl/window.hxx" #include "vcl/menu.hxx" #include "vcl/lazydelete.hxx" -#include "vcl/svdata.hxx" +#include "svdata.hxx" namespace vcl { diff --git a/vcl/source/helper/xconnection.cxx b/vcl/source/helper/xconnection.cxx index caf7ee237d67..0e19478bcfbc 100644 --- a/vcl/source/helper/xconnection.cxx +++ b/vcl/source/helper/xconnection.cxx @@ -28,10 +28,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "svsys.h" -#include "vcl/xconnection.hxx" -#include "vcl/svdata.hxx" -#include "vcl/salinst.hxx" +#include "xconnection.hxx" +#include "svdata.hxx" +#include "salinst.hxx" #include "vcl/svapp.hxx" namespace vcl diff --git a/vcl/source/salmain/salmain.cxx b/vcl/source/salmain/salmain.cxx index c2e3af01635a..56f197966276 100644 --- a/vcl/source/salmain/salmain.cxx +++ b/vcl/source/salmain/salmain.cxx @@ -32,7 +32,8 @@ #include "sal/main.h" #include "tools/extendapplicationenvironment.hxx" -#include "vcl/salinst.hxx" + +#include "salinst.hxx" SAL_IMPLEMENT_MAIN() { tools::extendApplicationEnvironment(); diff --git a/vcl/source/src/btntext.src b/vcl/source/src/btntext.src index b786184fa2f3..a8962044b47d 100644 --- a/vcl/source/src/btntext.src +++ b/vcl/source/src/btntext.src @@ -27,9 +27,7 @@ #define _SV_BTNTEXT_SRC -#ifndef _SV_SVIDS_HRC -#include -#endif +#include String SV_BUTTONTEXT_OK { diff --git a/vcl/source/src/helptext.src b/vcl/source/src/helptext.src index a42a9531d9ee..f66683bfd5dc 100644 --- a/vcl/source/src/helptext.src +++ b/vcl/source/src/helptext.src @@ -27,9 +27,7 @@ #define _SV_HELPTEXT_SRC -#ifndef _SV_SVIDS_HRC -#include -#endif +#include String SV_HELPTEXT_CLOSE { diff --git a/vcl/source/src/images.src b/vcl/source/src/images.src index 000d7215d80d..987ee29277c7 100644 --- a/vcl/source/src/images.src +++ b/vcl/source/src/images.src @@ -27,9 +27,7 @@ #define _SV_IMAGES_SRC -#ifndef _SV_SVIDS_HRC -#include -#endif +#include // ======================================================================= diff --git a/vcl/source/src/menu.src b/vcl/source/src/menu.src index 1833093adfac..cead04b9f6ec 100644 --- a/vcl/source/src/menu.src +++ b/vcl/source/src/menu.src @@ -25,9 +25,8 @@ * ************************************************************************/ #define _SV_MENU_SRC -#ifndef _SV_SVIDS_HRC -#include -#endif + +#include String SV_RESID_STRING_NOSELECTIONPOSSIBLE { diff --git a/vcl/source/src/print.src b/vcl/source/src/print.src index 04ab77f09288..6b0c378939f6 100644 --- a/vcl/source/src/print.src +++ b/vcl/source/src/print.src @@ -25,7 +25,7 @@ * ************************************************************************/ -#include "vcl/svids.hrc" +#include "svids.hrc" ModalDialog SV_DLG_PRINT { diff --git a/vcl/source/src/stdtext.src b/vcl/source/src/stdtext.src index 1b95f7bb1d72..9fd1487ce522 100644 --- a/vcl/source/src/stdtext.src +++ b/vcl/source/src/stdtext.src @@ -27,9 +27,7 @@ #define _SV_STDTEXT_SRC -#ifndef _SV_SVIDS_HRC -#include -#endif +#include String SV_STDTEXT_SERVICENOTAVAILABLE { diff --git a/vcl/source/src/units.src b/vcl/source/src/units.src index 16b40b3f41a3..ea5f6ecad2ce 100644 --- a/vcl/source/src/units.src +++ b/vcl/source/src/units.src @@ -26,9 +26,7 @@ ************************************************************************/ #define _SV_UNITS_SRC -#ifndef _SV_SVIDS_HRC -#include -#endif +#include StringArray SV_FUNIT_STRINGS { diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx index 3018236fff1a..ccb6360a25fe 100644 --- a/vcl/source/window/accel.cxx +++ b/vcl/source/window/accel.cxx @@ -28,16 +28,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" #include -#ifndef _TABLE_HXX #include -#endif #include +#include + #include -#include +#include #include -#ifndef _RC_H -#include -#endif diff --git a/vcl/source/window/accmgr.cxx b/vcl/source/window/accmgr.cxx index 81699bcaabb0..6078ab77404d 100644 --- a/vcl/source/window/accmgr.cxx +++ b/vcl/source/window/accmgr.cxx @@ -29,9 +29,10 @@ #include "precompiled_vcl.hxx" #include #include -#include + +#include #include -#include +#include diff --git a/vcl/source/window/arrange.cxx b/vcl/source/window/arrange.cxx index f016ef2c053b..90f8bc9a4c1e 100644 --- a/vcl/source/window/arrange.cxx +++ b/vcl/source/window/arrange.cxx @@ -27,9 +27,10 @@ #include "precompiled_vcl.hxx" +#include "svdata.hxx" + #include "vcl/arrange.hxx" #include "vcl/edit.hxx" -#include "vcl/svdata.hxx" #include "vcl/svapp.hxx" #include "com/sun/star/beans/PropertyValue.hpp" diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 2ff7d0a687e7..855b2e827952 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -27,10 +27,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_SVIDS_HRC -#include -#endif -#include + +#include +#include +#include +#include + #include #include #include @@ -42,9 +44,8 @@ #include #include #include -#include -#include #include + #include using namespace ::com::sun::star::uno; diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx index 9a0452027737..070a4324a54e 100644 --- a/vcl/source/window/btndlg.cxx +++ b/vcl/source/window/btndlg.cxx @@ -30,14 +30,13 @@ #include #include -#include +#include + +#include + #include #include -#ifndef _SV_RC_H -#include -#endif - // ======================================================================= diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx index 5725189e10c3..10bf2b40ae15 100644 --- a/vcl/source/window/cursor.cxx +++ b/vcl/source/window/cursor.cxx @@ -27,14 +27,17 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include #include #include #include -#include -#include #include +#include + +#include + // ======================================================================= diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 3b5585d3bc63..c963b96197ea 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -29,14 +29,14 @@ #include "precompiled_vcl.hxx" #include -#ifndef _SV_RC_H #include -#endif -#include + +#include +#include +#include + #include -#include #include -#include #include #include #include diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index 055b7e9fe80b..4116248f892f 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -27,15 +27,18 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include -#include + +#include +#include + #include #include #include #include #include #include -#include #include #include diff --git a/vcl/source/window/dndevdis.cxx b/vcl/source/window/dndevdis.cxx index e4d5a8c4c0eb..70453d6c4f9a 100644 --- a/vcl/source/window/dndevdis.cxx +++ b/vcl/source/window/dndevdis.cxx @@ -28,13 +28,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include -#include -#include +#include +#include +#include +#include #include #include -#include + using namespace ::osl; using namespace ::vos; using namespace ::cppu; diff --git a/vcl/source/window/dndlcon.cxx b/vcl/source/window/dndlcon.cxx index 07819e76f957..9d768ad49ac9 100644 --- a/vcl/source/window/dndlcon.cxx +++ b/vcl/source/window/dndlcon.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include +#include using namespace ::cppu; using namespace ::com::sun::star::uno; diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx index 9ea407e52ee3..aaacf074a802 100644 --- a/vcl/source/window/dockingarea.cxx +++ b/vcl/source/window/dockingarea.cxx @@ -27,11 +27,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include + #include #include #include -#include + +#include #include diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index e67c2d9ecfd5..91a6cfabb754 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -28,25 +28,24 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_SVSYS_HXX -#include -#endif #include #ifndef _SV_RC_H #include #endif + +#include +#include +#include +#include + #include -#include #include #include #include #include -#include #include #include -#include #include -#include // ======================================================================= diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index c8e382bad982..77dc10771acd 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -28,23 +28,20 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_SVSYS_HXX -#include -#endif #include -#ifndef _SV_RC_H #include -#endif + #include -#include #include #include #include -#include #include -#include #include -#include + +#include +#include +#include +#include diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 323bbe3b0d74..c5e57da71e75 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -28,21 +28,18 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_SVSYS_HXX -#include -#endif -#include +#include +#include +#include +#include + #include #include -#include #include #include #include -#include -#ifndef _SV_RC_H + #include -#endif -#include #include diff --git a/vcl/source/window/introwin.cxx b/vcl/source/window/introwin.cxx index 03f88adc3566..4ed808852336 100644 --- a/vcl/source/window/introwin.cxx +++ b/vcl/source/window/introwin.cxx @@ -28,18 +28,15 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_SVSYS_HXX -#include -#endif -#include #include -#include -#include +#include #include -#include #include +#include +#include +#include diff --git a/vcl/source/window/keycod.cxx b/vcl/source/window/keycod.cxx index bcc5536fd028..c8da4e5c1d8a 100644 --- a/vcl/source/window/keycod.cxx +++ b/vcl/source/window/keycod.cxx @@ -28,21 +28,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_SVSYS_HXX -#include -#endif -#include -#include -#include +#include +#include +#include + #include -#ifndef _SV_KEYCOD_HXX #include -#endif -#ifndef _RC_H #include -#endif - // ======================================================================= diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 5909ab9f8489..f20eb67cca69 100755 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -28,38 +28,39 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "svsys.h" -#include "vcl/salinst.hxx" #include "tools/list.hxx" #include "tools/debug.hxx" #include "tools/diagnose_ex.h" -#include "vcl/svdata.hxx" +#include "tools/rc.h" +#include "tools/stream.hxx" + #include "vcl/svapp.hxx" #include "vcl/mnemonic.hxx" #include "vcl/image.hxx" #include "vcl/event.hxx" #include "vcl/help.hxx" -#include "vcl/svids.hrc" #include "vcl/floatwin.hxx" #include "vcl/wrkwin.hxx" #include "vcl/timer.hxx" #include "vcl/sound.hxx" #include "vcl/decoview.hxx" #include "vcl/bitmap.hxx" -#include "tools/rc.h" #include "vcl/menu.hxx" #include "vcl/button.hxx" #include "vcl/gradient.hxx" #include "vcl/i18nhelp.hxx" #include "vcl/taskpanelist.hxx" -#include "vcl/window.h" #include "vcl/controllayout.hxx" #include "vcl/toolbox.hxx" -#include "tools/stream.hxx" -#include "vcl/salmenu.hxx" -#include "vcl/salframe.hxx" #include "vcl/dockingarea.hxx" +#include "salinst.hxx" +#include "svdata.hxx" +#include "svids.hrc" +#include "window.h" +#include "salmenu.hxx" +#include "salframe.hxx" + #include #include diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx index d00d569883d5..132703758e5c 100644 --- a/vcl/source/window/msgbox.cxx +++ b/vcl/source/window/msgbox.cxx @@ -28,23 +28,21 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_SVIDS_HRC -#include -#endif -#include +#include + +#include +#include +#include +#include + #include #include #include #include #include -#include #include #include -#ifndef _SV_RC_H -#include -#endif #include -#include diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 574cef4e5a07..efa6a693d6dd 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -27,14 +27,15 @@ #include "precompiled_vcl.hxx" +#include "printdlg.hxx" +#include "svdata.hxx" +#include "svids.hrc" +#include "jobset.h" + #include "vcl/print.hxx" -#include "vcl/prndlg.hxx" #include "vcl/dialog.hxx" #include "vcl/button.hxx" -#include "vcl/svdata.hxx" -#include "vcl/svids.hrc" #include "vcl/wall.hxx" -#include "vcl/jobset.h" #include "vcl/status.hxx" #include "vcl/decoview.hxx" #include "vcl/arrange.hxx" diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx index 735add842518..a5103fa663e1 100644 --- a/vcl/source/window/scrwnd.cxx +++ b/vcl/source/window/scrwnd.cxx @@ -33,19 +33,12 @@ #include #include -#ifndef _SV_SVIDS_HRC -#include -#endif -#include -#ifndef _VCL_TIMER_HXX +#include +#include +#include + #include -#endif -#ifndef _VCL_EVENT_HXX #include -#endif -#ifndef _VCL_SCRWND_HXX -#include -#endif #include #include diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx index b4553a4cf8a7..2c0d584f8ba4 100644 --- a/vcl/source/window/split.cxx +++ b/vcl/source/window/split.cxx @@ -28,19 +28,20 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_RC_H #include -#endif +#include + #include #include #include #include #include #include -#include #include + #include -#include + +#include namespace { diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index 62fbe2e507f3..51da3077518c 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -29,22 +29,22 @@ #include "precompiled_vcl.hxx" #include + #include #include #include + #include #include #include #include #include -#ifndef _SV_SVIDS_HRC -#include -#endif #include -#include #include #include +#include +#include // ======================================================================= diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index 36f27b1ceee7..e7a82ae1ef0a 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -27,20 +27,20 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include #include - -#ifndef _SV_RC_H #include -#endif -#include + #include #include #include #include #include #include -#include + +#include +#include // ======================================================================= diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx index 4e897eef4a8b..513f0a39dff7 100644 --- a/vcl/source/window/syschild.cxx +++ b/vcl/source/window/syschild.cxx @@ -28,21 +28,23 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include #include #include + #include -#include -#include -#include + #include -#include -#include #include #include #include #include +#include +#include +#include +#include +#include + #ifdef SOLAR_JAVA #include #endif @@ -53,8 +55,6 @@ #include #include -#include - using namespace ::com::sun::star; // ======================================================================= diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index f6a37658b79f..5621ed5b6516 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -29,16 +29,8 @@ #include "precompiled_vcl.hxx" #include -#ifndef _SV_SVSYS_HXX -#include -#endif -#include -#include #include -#include #include -#include -#include #include #include #include @@ -46,6 +38,10 @@ #include #include +#include +#include +#include +#include using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx index 0589d57009f4..552807ab9235 100644 --- a/vcl/source/window/tabpage.cxx +++ b/vcl/source/window/tabpage.cxx @@ -29,20 +29,17 @@ #include "precompiled_vcl.hxx" #include - -#ifndef _SV_RC_H #include -#endif -#include + #include #include #include #include #include -#include - +#include +#include // ======================================================================= diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx index 1adabe487492..3db85093582e 100644 --- a/vcl/source/window/taskpanelist.cxx +++ b/vcl/source/window/taskpanelist.cxx @@ -27,11 +27,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include + #include -#include +#include #include + +#include + #include #include diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index b71cf1c13c8d..021b7e53402c 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -28,17 +28,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_SVSYS_HXX -#include -#endif #include + #include #include - -#ifndef _SV_RC_H #include -#endif -#include +#include + #include #include #include @@ -48,14 +44,15 @@ #include #include #include -#include #include -#include -#include #include #include #include -#include + +#include +#include +#include +#include #include #include diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 35a39676353a..3394da1153aa 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -27,26 +27,26 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include #include - -#ifndef _SV_RC_H #include -#endif -#include + #include #include #include #include -#include #include #include -#include - #include +#include + +#include +#include +#include + #include -#include #include using namespace vcl; diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 0762a07476e2..9b4af1f01503 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -27,48 +27,55 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_SVSYS_HXX -#include "svsys.h" -#endif -#include "vcl/salframe.hxx" -#include "vcl/salobj.hxx" -#include "vcl/salinst.hxx" -#include "vcl/salgtype.hxx" -#include "vcl/salgdi.hxx" -#include "vcl/unohelp.hxx" #include "tools/time.hxx" #include "tools/debug.hxx" -#ifndef _SV_RC_H #include "tools/rc.h" -#endif -#include "vcl/svdata.hxx" -#include "vcl/dbggui.hxx" -#include "vcl/outfont.hxx" -#include "vcl/outdev.h" -#include "vcl/region.h" + +#include "unotools/fontcfg.hxx" +#include "unotools/confignode.hxx" + +#include "vcl/unohelp.hxx" +#include "vcl/salgtype.hxx" #include "vcl/event.hxx" #include "vcl/help.hxx" #include "vcl/cursor.hxx" #include "vcl/svapp.hxx" -#include "vcl/window.h" #include "vcl/window.hxx" #include "vcl/syswin.hxx" #include "vcl/syschild.hxx" -#include "vcl/brdwin.hxx" -#include "vcl/helpwin.hxx" #include "vcl/dockwin.hxx" #include "vcl/menu.hxx" #include "vcl/wrkwin.hxx" #include "vcl/wall.hxx" #include "vcl/gradient.hxx" -#include "vcl/toolbox.h" -#include "unotools/fontcfg.hxx" #include "vcl/sysdata.hxx" -#include "vcl/sallayout.hxx" #include "vcl/salctype.hxx" -#include "vcl/button.hxx" // Button::GetStandardText +#include "vcl/button.hxx" #include "vcl/taskpanelist.hxx" +#include "vcl/dialog.hxx" +#include "vcl/unowrap.hxx" +#include "vcl/gdimtf.hxx" +#include "vcl/pdfextoutdevdata.hxx" +#include "vcl/lazydelete.hxx" + +#include "salframe.hxx" +#include "salobj.hxx" +#include "salinst.hxx" +#include "salgdi.hxx" +#include "svdata.hxx" +#include "dbggui.hxx" +#include "outfont.hxx" +#include "window.h" +#include "toolbox.h" +#include "outdev.h" +#include "region.h" +#include "brdwin.hxx" +#include "helpwin.hxx" +#include "sallayout.hxx" +#include "dndlcon.hxx" +#include "dndevdis.hxx" + #include "com/sun/star/awt/XWindowPeer.hpp" #include "com/sun/star/rendering/XCanvas.hpp" #include "com/sun/star/rendering/XSpriteCanvas.hpp" @@ -85,16 +92,6 @@ #include "com/sun/star/accessibility/XAccessible.hpp" #include "com/sun/star/accessibility/AccessibleRole.hpp" -#include "vcl/dialog.hxx" -#include "vcl/unowrap.hxx" -#include "vcl/dndlcon.hxx" -#include "vcl/dndevdis.hxx" -#include "unotools/confignode.hxx" -#include "vcl/gdimtf.hxx" - -#include "vcl/pdfextoutdevdata.hxx" -#include "vcl/lazydelete.hxx" - #include #include diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index e5b58a8b6f3c..00391b2814bb 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -29,31 +29,28 @@ #include "precompiled_vcl.hxx" #include -#ifndef _SV_SVSYS_HXX -#include -#endif -#include -#include -#include + #include -#include -#include +#include + #include #include #include #include -#include -#include -#include #include -#include #include #include -#ifndef _SV_SCRWND_HXX -#include -#endif #include +#include +#include +#include +#include +#include +#include +#include +#include +#include // ======================================================================= diff --git a/vcl/source/window/window4.cxx b/vcl/source/window/window4.cxx index 577a573c2015..775249c450ee 100644 --- a/vcl/source/window/window4.cxx +++ b/vcl/source/window/window4.cxx @@ -28,10 +28,11 @@ #include "precompiled_vcl.hxx" #include "vcl/window.hxx" -#include "vcl/window.h" -#include "vcl/svdata.hxx" #include "vcl/arrange.hxx" +#include "window.h" +#include "svdata.hxx" + #include "com/sun/star/beans/PropertyValue.hpp" #include diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 2fce7e52f24c..72e9b581526a 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -28,40 +28,37 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_SVSYS_HXX -#include -#endif -#include -#include #include -#ifndef _INTN_HXX -//#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 diff --git a/vcl/source/window/wpropset.cxx b/vcl/source/window/wpropset.cxx index 4aaa3f987b77..e10715922572 100644 --- a/vcl/source/window/wpropset.cxx +++ b/vcl/source/window/wpropset.cxx @@ -30,7 +30,8 @@ #include "vcl/wpropset.hxx" #include "vcl/window.hxx" #include "vcl/vclevent.hxx" -#include "vcl/svdata.hxx" + +#include "svdata.hxx" #include "com/sun/star/lang/XMultiServiceFactory.hpp" #include "com/sun/star/beans/PropertyValue.hpp" diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx index 8fb2f2f8346a..cd3522d431f4 100644 --- a/vcl/source/window/wrkwin.cxx +++ b/vcl/source/window/wrkwin.cxx @@ -28,22 +28,18 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_SVSYS_HXX -#include -#endif -#include #include - -#ifndef _SV_RC_H #include -#endif -#include + #include -#include -#include #include #include +#include +#include +#include +#include + // ======================================================================= #define WORKWIN_WINDOWSTATE_FULLSCREEN ((ULONG)0x00010000) diff --git a/vcl/unx/generic/app/i18n_cb.cxx b/vcl/unx/generic/app/i18n_cb.cxx new file mode 100644 index 000000000000..5a314c19d3e5 --- /dev/null +++ b/vcl/unx/generic/app/i18n_cb.cxx @@ -0,0 +1,664 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include "unx/salunx.h" +#include "unx/XIM.h" +#include "unx/i18n_cb.hxx" +#include "unx/i18n_status.hxx" +#include "unx/i18n_ic.hxx" +#include "unx/i18n_im.hxx" +#include "salframe.hxx" + +// ------------------------------------------------------------------------- +// +// i. preedit start callback +// +// ------------------------------------------------------------------------- + +int +PreeditStartCallback ( XIC, XPointer client_data, XPointer ) +{ + preedit_data_t* pPreeditData = (preedit_data_t*)client_data; + if ( pPreeditData->eState == ePreeditStatusActivationRequired ) + { + pPreeditData->eState = ePreeditStatusActive; + pPreeditData->aText.nCursorPos = 0; + pPreeditData->aText.nLength = 0; + } + + return -1; +} + +// ------------------------------------------------------------------------- +// +// ii. preedit done callback +// +// ------------------------------------------------------------------------- + +void +PreeditDoneCallback ( XIC, XPointer client_data, XPointer ) +{ + preedit_data_t* pPreeditData = (preedit_data_t*)client_data; + if (pPreeditData->eState == ePreeditStatusActive ) + { + if( pPreeditData->pFrame ) + pPreeditData->pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, (void*)NULL ); + } + pPreeditData->eState = ePreeditStatusStartPending; +} + +// ------------------------------------------------------------------------- +// +// iii. preedit draw callback +// +// ------------------------------------------------------------------------- + +// +// Handle deletion of text in a preedit_draw_callback +// from and howmuch are guaranteed to be nonnegative +// + +void +Preedit_DeleteText(preedit_text_t *ptext, int from, int howmuch) +{ + // If we've been asked to delete no text then just set + // nLength correctly and return + if (ptext->nLength == 0) + { + ptext->nLength = from; + return; + } + + int to = from + howmuch; + + if (to == (int)ptext->nLength) + { + // delete from the end of the text + ptext->nLength = from; + } + else + if (to < (int)ptext->nLength) + { + // cut out of the middle of the text + memmove( (void*)(ptext->pUnicodeBuffer + from), + (void*)(ptext->pUnicodeBuffer + to), + (ptext->nLength - to) * sizeof(sal_Unicode)); + memmove( (void*)(ptext->pCharStyle + from), + (void*)(ptext->pCharStyle + to), + (ptext->nLength - to) * sizeof(XIMFeedback)); + ptext->nLength -= howmuch; + } + else + // if ( to > pText->nLength ) + { + // XXX this indicates an error, are we out of sync ? + fprintf(stderr, "Preedit_DeleteText( from=%i to=%i length=%i )\n", + from, to, ptext->nLength ); + fprintf (stderr, "\t XXX internal error, out of sync XXX\n"); + + ptext->nLength = from; + } + + // NULL-terminate the string + ptext->pUnicodeBuffer[ptext->nLength] = (sal_Unicode)0; +} + +// reallocate the textbuffer with sufficiently large size 2^x +// nnewlimit is presupposed to be larger than ptext->size +void +enlarge_buffer ( preedit_text_t *ptext, int nnewlimit ) +{ + size_t nnewsize = ptext->nSize; + + while ( nnewsize <= (size_t)nnewlimit ) + nnewsize *= 2; + + ptext->nSize = nnewsize; + ptext->pUnicodeBuffer = (sal_Unicode*)realloc((void*)ptext->pUnicodeBuffer, + nnewsize * sizeof(sal_Unicode)); + ptext->pCharStyle = (XIMFeedback*)realloc((void*)ptext->pCharStyle, + nnewsize * sizeof(XIMFeedback)); +} + +// +// Handle insertion of text in a preedit_draw_callback +// string field of XIMText struct is guaranteed to be != NULL +// + +void +Preedit_InsertText(preedit_text_t *pText, XIMText *pInsertText, int where, + Bool isMultilingual) +{ + sal_Unicode *pInsertTextString; + int nInsertTextLength = 0; + XIMFeedback *pInsertTextCharStyle = pInsertText->feedback; + + nInsertTextLength = pInsertText->length; + + if (isMultilingual) + { + XIMUnicodeText *pUniText = (XIMUnicodeText*)pInsertText; + pInsertTextString = pUniText->string.utf16_char; + } + else + { + // can't handle wchar_t strings, so convert to multibyte chars first + char *pMBString; + size_t nMBLength; + if (pInsertText->encoding_is_wchar) + { + wchar_t *pWCString = pInsertText->string.wide_char; + size_t nBytes = wcstombs ( NULL, pWCString, 1024 /* dont care */); + pMBString = (char*)alloca( nBytes + 1 ); + nMBLength = wcstombs ( pMBString, pWCString, nBytes + 1); + } + else + { + pMBString = pInsertText->string.multi_byte; + nMBLength = strlen(pMBString); // xxx + } + + // convert multibyte chars to unicode + rtl_TextEncoding nEncoding = osl_getThreadTextEncoding(); + + if (nEncoding != RTL_TEXTENCODING_UNICODE) + { + rtl_TextToUnicodeConverter aConverter = + rtl_createTextToUnicodeConverter( nEncoding ); + rtl_TextToUnicodeContext aContext = + rtl_createTextToUnicodeContext(aConverter); + + sal_Size nBufferSize = nInsertTextLength * 2; + + pInsertTextString = (sal_Unicode*)alloca(nBufferSize); + + sal_uInt32 nConversionInfo; + sal_Size nConvertedChars; + + rtl_convertTextToUnicode( aConverter, aContext, + pMBString, nMBLength, + pInsertTextString, nBufferSize, + RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_IGNORE + | RTL_TEXTTOUNICODE_FLAGS_INVALID_IGNORE, + &nConversionInfo, &nConvertedChars ); + + rtl_destroyTextToUnicodeContext(aConverter, aContext); + rtl_destroyTextToUnicodeConverter(aConverter); + + } + else + { + pInsertTextString = (sal_Unicode*)pMBString; + } + } + + // enlarge target text-buffer if necessary + if (pText->nSize <= (pText->nLength + nInsertTextLength)) + enlarge_buffer(pText, pText->nLength + nInsertTextLength); + + // insert text: displace old mem and put new bytes in + int from = where; + int to = where + nInsertTextLength; + int howmany = pText->nLength - where; + + memmove((void*)(pText->pUnicodeBuffer + to), + (void*)(pText->pUnicodeBuffer + from), + howmany * sizeof(sal_Unicode)); + memmove((void*)(pText->pCharStyle + to), + (void*)(pText->pCharStyle + from), + howmany * sizeof(XIMFeedback)); + + to = from; + howmany = nInsertTextLength; + + memcpy((void*)(pText->pUnicodeBuffer + to), (void*)pInsertTextString, + howmany * sizeof(sal_Unicode)); + memcpy((void*)(pText->pCharStyle + to), (void*)pInsertTextCharStyle, + howmany * sizeof(XIMFeedback)); + + pText->nLength += howmany; + + // NULL-terminate the string + pText->pUnicodeBuffer[pText->nLength] = (sal_Unicode)0; +} + +// +// Handle the change of attributes in a preedit_draw_callback +// +void +Preedit_UpdateAttributes ( preedit_text_t* ptext, XIMFeedback* feedback, + int from, int amount ) +{ + if ( (from + amount) > (int)ptext->nLength ) + { + // XXX this indicates an error, are we out of sync ? + fprintf (stderr, "Preedit_UpdateAttributes( %i + %i > %i )\n", + from, amount, ptext->nLength ); + fprintf (stderr, "\t XXX internal error, out of sync XXX\n"); + + return; + } + + memcpy ( ptext->pCharStyle + from, + feedback, amount * sizeof(XIMFeedback) ); +} + +// Convert the XIM feedback values into appropriate VCL +// SAL_EXTTEXTINPUT_ATTR values +// returns an allocate list of attributes, which must be freed by caller +USHORT* +Preedit_FeedbackToSAL ( XIMFeedback* pfeedback, int nlength, std::vector& rSalAttr ) +{ + USHORT *psalattr; + USHORT nval; + USHORT noldval = 0; + XIMFeedback nfeedback; + + // only work with reasonable length + if (nlength > 0 && nlength > sal::static_int_cast(rSalAttr.size()) ) + { + rSalAttr.reserve( nlength ); + psalattr = &rSalAttr[0]; + } + else + return (USHORT*)NULL; + + for (int npos = 0; npos < nlength; npos++) + { + nval = 0; + nfeedback = pfeedback[npos]; + + // means to use the feedback of the previous char + if (nfeedback == 0) + { + nval = noldval; + } + // convert feedback to attributes + else + { + if (nfeedback & XIMReverse) + nval |= SAL_EXTTEXTINPUT_ATTR_HIGHLIGHT; + if (nfeedback & XIMUnderline) + nval |= SAL_EXTTEXTINPUT_ATTR_UNDERLINE; + if (nfeedback & XIMHighlight) + nval |= SAL_EXTTEXTINPUT_ATTR_HIGHLIGHT; + if (nfeedback & XIMPrimary) + nval |= SAL_EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE; + if (nfeedback & XIMSecondary) + nval |= SAL_EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE; + if (nfeedback & XIMTertiary) // same as 2ery + nval |= SAL_EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE; + + /* + // visibility feedback not supported now + if ( (nfeedback & XIMVisibleToForward) + || (nfeedback & XIMVisibleToBackward) + || (nfeedback & XIMVisibleCenter) ) + { } + */ + } + // copy in list + psalattr[npos] = nval; + noldval = nval; + } + // return list of sal attributes + return psalattr; +} + +void +PreeditDrawCallback(XIC ic, XPointer client_data, + XIMPreeditDrawCallbackStruct *call_data) +{ + preedit_data_t* pPreeditData = (preedit_data_t*)client_data; + + // if there's nothing to change then change nothing + if ( ( (call_data->text == NULL) && (call_data->chg_length == 0) ) + || pPreeditData->pFrame == NULL ) + return; + + // #88564# Solaris 7 deletes the preedit buffer after commit + // since the next call to preeditstart will have the same effect just skip this. + // if (pPreeditData->eState == ePreeditStatusStartPending && call_data->text == NULL) + // return; + + if ( pPreeditData->eState == ePreeditStatusStartPending ) + pPreeditData->eState = ePreeditStatusActivationRequired; + PreeditStartCallback( ic, client_data, NULL ); + + // Edit the internal textbuffer as indicated by the call_data, + // chg_first and chg_length are guaranteed to be nonnegative + + // handle text deletion + if (call_data->text == NULL) + { + Preedit_DeleteText(&(pPreeditData->aText), + call_data->chg_first, call_data->chg_length ); + } + else + { + // handle text insertion + if ( (call_data->chg_length == 0) + && (call_data->text->string.wide_char != NULL)) + { + Preedit_InsertText(&(pPreeditData->aText), call_data->text, + call_data->chg_first, pPreeditData->bIsMultilingual); + } + else + // handle text replacement by deletion and insertion of text, + // not smart, just good enough + if ( (call_data->chg_length != 0) + && (call_data->text->string.wide_char != NULL)) + { + Preedit_DeleteText(&(pPreeditData->aText), + call_data->chg_first, call_data->chg_length); + Preedit_InsertText(&(pPreeditData->aText), call_data->text, + call_data->chg_first, pPreeditData->bIsMultilingual); + } + else + // not really a text update, only attributes are concerned + if ( (call_data->chg_length != 0) + && (call_data->text->string.wide_char == NULL)) + { + Preedit_UpdateAttributes(&(pPreeditData->aText), + call_data->text->feedback, + call_data->chg_first, call_data->chg_length); + } + } + + // + // build the SalExtTextInputEvent and send it up + // + pPreeditData->aInputEv.mnTime = 0; + pPreeditData->aInputEv.mpTextAttr = Preedit_FeedbackToSAL( + pPreeditData->aText.pCharStyle, pPreeditData->aText.nLength, pPreeditData->aInputFlags); + pPreeditData->aInputEv.mnCursorPos = call_data->caret; + pPreeditData->aInputEv.maText = String (pPreeditData->aText.pUnicodeBuffer, + pPreeditData->aText.nLength); + pPreeditData->aInputEv.mnCursorFlags = 0; // default: make cursor visible + pPreeditData->aInputEv.mnDeltaStart = 0; // call_data->chg_first; + pPreeditData->aInputEv.mbOnlyCursor = False; + + if ( pPreeditData->eState == ePreeditStatusActive && pPreeditData->pFrame ) + pPreeditData->pFrame->CallCallback(SALEVENT_EXTTEXTINPUT, (void*)&pPreeditData->aInputEv); + if (pPreeditData->aText.nLength == 0 && pPreeditData->pFrame ) + pPreeditData->pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, (void*)NULL ); + + if (pPreeditData->aText.nLength == 0) + pPreeditData->eState = ePreeditStatusStartPending; + + GetPreeditSpotLocation(ic, (XPointer)pPreeditData); +} + +void +GetPreeditSpotLocation(XIC ic, XPointer client_data) +{ + // + // Send SalEventExtTextInputPos event to get spotlocation + // + SalExtTextInputPosEvent mPosEvent; + preedit_data_t* pPreeditData = (preedit_data_t*)client_data; + + if( pPreeditData->pFrame ) + pPreeditData->pFrame->CallCallback(SALEVENT_EXTTEXTINPUTPOS, (void*)&mPosEvent); + + XPoint point; + point.x = mPosEvent.mnX + mPosEvent.mnWidth; + point.y = mPosEvent.mnY + mPosEvent.mnHeight; + + XVaNestedList preedit_attr; + preedit_attr = XVaCreateNestedList(0, XNSpotLocation, &point, NULL); + XSetICValues(ic, XNPreeditAttributes, preedit_attr, NULL); + XFree(preedit_attr); + + return; +} + +// ------------------------------------------------------------------------- +// +// iv. preedit caret callback +// +// ------------------------------------------------------------------------- + +#if OSL_DEBUG_LEVEL > 1 +void +PreeditCaretCallback ( XIC ic, XPointer client_data, + XIMPreeditCaretCallbackStruct *call_data ) +#else +void +PreeditCaretCallback ( XIC, XPointer,XIMPreeditCaretCallbackStruct* ) +#endif +{ + #if OSL_DEBUG_LEVEL > 1 + // XXX PreeditCaretCallback is pure debug code for now + const char *direction = "?"; + const char *style = "?"; + + switch ( call_data->style ) + { + case XIMIsInvisible: style = "Invisible"; break; + case XIMIsPrimary: style = "Primary"; break; + case XIMIsSecondary: style = "Secondary"; break; + } + switch ( call_data->direction ) + { + case XIMForwardChar: direction = "Forward char"; break; + case XIMBackwardChar: direction = "Backward char"; break; + case XIMForwardWord: direction = "Forward word"; break; + case XIMBackwardWord: direction = "Backward word"; break; + case XIMCaretUp: direction = "Caret up"; break; + case XIMCaretDown: direction = "Caret down"; break; + case XIMNextLine: direction = "Next line"; break; + case XIMPreviousLine: direction = "Previous line"; break; + case XIMLineStart: direction = "Line start"; break; + case XIMLineEnd: direction = "Line end"; break; + case XIMAbsolutePosition: direction = "Absolute"; break; + case XIMDontChange: direction = "Dont change"; break; + } + + fprintf (stderr, "PreeditCaretCallback( ic=%p, client=%p,\n", + ic, client_data ); + fprintf (stderr, "\t position=%i, direction=\"%s\", style=\"%s\" )\n", + call_data->position, direction, style ); + #endif +} + +// ----------------------------------------------------------------------- +// +// v. commit string callback: convert an extended text input (iiimp ... ) +// into an ordinary key-event +// +// ----------------------------------------------------------------------- + +Bool +IsControlCode(sal_Unicode nChar) +{ + if ( nChar <= 0x1F // C0 controls + /* || (0x80 <= nChar && nChar <= 0x9F) C1 controls */ ) + return True; + else + return False; +} + +int +CommitStringCallback( XIC ic, XPointer client_data, XPointer call_data ) +{ + preedit_data_t* pPreeditData = (preedit_data_t*)client_data; + + XIMUnicodeText *cbtext = (XIMUnicodeText *)call_data; + sal_Unicode *p_unicode_data = (sal_Unicode*)cbtext->string.utf16_char; + + // #86964# filter unexpected pure control events + if (cbtext->length == 1 && IsControlCode(p_unicode_data[0]) ) + { + if( pPreeditData->pFrame ) + { + pPreeditData->pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, (void*)NULL ); + } + } + else + { + if( pPreeditData->pFrame ) + { + pPreeditData->aInputEv.mnTime = 0; + pPreeditData->aInputEv.mpTextAttr = 0; + pPreeditData->aInputEv.mnCursorPos = cbtext->length; + pPreeditData->aInputEv.maText = UniString(p_unicode_data, cbtext->length); + pPreeditData->aInputEv.mnCursorFlags = 0; // default: make cursor visible + pPreeditData->aInputEv.mnDeltaStart = 0; + pPreeditData->aInputEv.mbOnlyCursor = False; + + pPreeditData->pFrame->CallCallback( SALEVENT_EXTTEXTINPUT, (void*)&pPreeditData->aInputEv); + pPreeditData->pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, (void*)NULL ); + } + } + pPreeditData->eState = ePreeditStatusStartPending; + + GetPreeditSpotLocation(ic, (XPointer)pPreeditData); + + return 0; +} + +// ---------------------------------------------------------------------------------- +// +// vi. status callbacks: for now these are empty, they are just needed for turbo linux +// +// ---------------------------------------------------------------------------------- + +void +StatusStartCallback (XIC, XPointer, XPointer) +{ + return; +} + +void +StatusDoneCallback (XIC, XPointer, XPointer) +{ + return; +} + +void +StatusDrawCallback (XIC ic, XPointer client_data, XIMStatusDrawCallbackStruct *call_data) +{ + preedit_data_t* pPreeditData = (preedit_data_t*)client_data; + if( pPreeditData->bIsMultilingual ) + { + // IIIMP + XIMUnicodeText *cbtext = (XIMUnicodeText *)call_data->data.text; + ::vcl::I18NStatus::get().setStatusText( String( cbtext->string.utf16_char, call_data->data.text->length ) ); + XIMUnicodeCharacterSubset* pSubset = NULL; + if( ! XGetICValues( ic, + XNUnicodeCharacterSubset, & pSubset, + NULL ) + && pSubset ) + { + ::vcl::I18NStatus::get().changeIM( String( ByteString( pSubset->name ), RTL_TEXTENCODING_UTF8 ) ); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "got XNUnicodeCharacterSubset\n %d\n %d\n %s\n %d\n", pSubset->index, pSubset->subset_id, pSubset->name, pSubset->is_active ); +#endif + } + } + else if( call_data->type == XIMTextType ) + { + String aText; + if( call_data->data.text ) + { + // XIM with text + sal_Char* pMBString = NULL; + size_t nLength = 0; + if( call_data->data.text->encoding_is_wchar ) + { + if( call_data->data.text->string.wide_char ) + { + wchar_t* pWString = call_data->data.text->string.wide_char; + size_t nBytes = wcstombs( NULL, pWString, 1024 ); + pMBString = (sal_Char*)alloca( nBytes+1 ); + nLength = wcstombs( pMBString, pWString, nBytes+1 ); + } + } + else + { + if( call_data->data.text->string.multi_byte ) + { + pMBString = call_data->data.text->string.multi_byte; + nLength = strlen( pMBString ); + } + } + if( nLength ) + aText = String( pMBString, nLength, gsl_getSystemTextEncoding() ); + } + ::vcl::I18NStatus::get().setStatusText( aText ); + } +#if OSL_DEBUG_LEVEL > 1 + else + fprintf( stderr, "XIMStatusDataType %s not supported\n", + call_data->type == XIMBitmapType ? "XIMBitmapType" : ByteString::CreateFromInt32( call_data->type ).GetBuffer() ); +#endif + return; +} + +void +SwitchIMCallback (XIC, XPointer, XPointer call_data) +{ + XIMSwitchIMNotifyCallbackStruct* pCallData = (XIMSwitchIMNotifyCallbackStruct*)call_data; + ::vcl::I18NStatus::get().changeIM( String( ByteString( pCallData->to->name ), RTL_TEXTENCODING_UTF8 ) ); +} + +// ---------------------------------------------------------------------------------- +// +// vii. destroy callbacks: internally disable all IC/IM calls +// +// ---------------------------------------------------------------------------------- + +void +IC_IMDestroyCallback (XIM, XPointer client_data, XPointer) +{ + SalI18N_InputContext *pContext = (SalI18N_InputContext*)client_data; + if (pContext != NULL) + pContext->HandleDestroyIM(); +} + +void +IM_IMDestroyCallback (XIM, XPointer client_data, XPointer) +{ + SalI18N_InputMethod *pMethod = (SalI18N_InputMethod*)client_data; + if (pMethod != NULL) + pMethod->HandleDestroyIM(); +} diff --git a/vcl/unx/generic/app/i18n_ic.cxx b/vcl/unx/generic/app/i18n_ic.cxx new file mode 100644 index 000000000000..517eb37a1b2e --- /dev/null +++ b/vcl/unx/generic/app/i18n_ic.cxx @@ -0,0 +1,781 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +using namespace vcl; + +static void sendEmptyCommit( SalFrame* pFrame ) +{ + vcl::DeletionListener aDel( pFrame ); + + SalExtTextInputEvent aEmptyEv; + aEmptyEv.mnTime = 0; + aEmptyEv.mpTextAttr = 0; + aEmptyEv.maText = String(); + aEmptyEv.mnCursorPos = 0; + aEmptyEv.mnCursorFlags = 0; + aEmptyEv.mnDeltaStart = 0; + aEmptyEv.mbOnlyCursor = False; + pFrame->CallCallback( SALEVENT_EXTTEXTINPUT, (void*)&aEmptyEv ); + if( ! aDel.isDeleted() ) + pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, NULL ); +} + +// --------------------------------------------------------------------------- +// +// Constructor / Destructor, the InputContext is bound to the SalFrame, as it +// needs the shell window as a focus window +// +// ---------------------------------------------------------------------------- + +SalI18N_InputContext::~SalI18N_InputContext() +{ + if ( maContext != NULL ) + XDestroyIC( maContext ); + if ( mpAttributes != NULL ) + XFree( mpAttributes ); + if ( mpStatusAttributes != NULL ) + XFree( mpStatusAttributes ); + if ( mpPreeditAttributes != NULL ) + XFree( mpPreeditAttributes ); + + if (maClientData.aText.pUnicodeBuffer != NULL) + free(maClientData.aText.pUnicodeBuffer); + if (maClientData.aText.pCharStyle != NULL) + free(maClientData.aText.pCharStyle); +} + +// ---------------------------------------------------------------------------- +// convenience routine to add items to a XVaNestedList +// ---------------------------------------------------------------------------- + +static XVaNestedList +XVaAddToNestedList( XVaNestedList a_srclist, char* name, XPointer value ) +{ + XVaNestedList a_dstlist; + + // if ( value == NULL ) + // return a_srclist; + + if ( a_srclist == NULL ) + { + a_dstlist = XVaCreateNestedList( + 0, + name, value, + NULL ); + } + else + { + a_dstlist = XVaCreateNestedList( + 0, + XNVaNestedList, a_srclist, + name, value, + NULL ); + } + + return a_dstlist != NULL ? a_dstlist : a_srclist ; +} + +// ---------------------------------------------------------------------------- +// convenience routine to create a fontset +// ---------------------------------------------------------------------------- + +static XFontSet +get_font_set( Display *p_display ) +{ + static XFontSet p_font_set = NULL; + + if (p_font_set == NULL) + { + char **pp_missing_list; + int n_missing_count; + char *p_default_string; + + p_font_set = XCreateFontSet(p_display, "-*", + &pp_missing_list, &n_missing_count, &p_default_string); + } + + return p_font_set; +} + +// --------------------------------------------------------------------------- +// +// Constructor for a InputContext (IC) +// +// ---------------------------------------------------------------------------- + +SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) : + mbUseable( True ), + maContext( (XIC)NULL ), + mnSupportedStatusStyle( + XIMStatusCallbacks | + XIMStatusNothing | + XIMStatusNone + ), + mnSupportedPreeditStyle( + XIMPreeditCallbacks | + XIMPreeditNothing | + XIMPreeditNone + ), + mnStatusStyle( 0 ), + mnPreeditStyle( 0 ), + mpAttributes( NULL ), + mpStatusAttributes( NULL ), + mpPreeditAttributes( NULL ) +{ +#ifdef SOLARIS + static const char* pIIIMPEnable = getenv( "SAL_DISABLE_OWN_IM_STATUS" ); + if( pIIIMPEnable && *pIIIMPEnable ) + mnSupportedStatusStyle &= ~XIMStatusCallbacks; +#endif + + maClientData.aText.pUnicodeBuffer = NULL; + maClientData.aText.pCharStyle = NULL; + maClientData.aInputEv.mnTime = 0; + maClientData.aInputEv.mpTextAttr = NULL; + maClientData.aInputEv.mnCursorPos = 0; + maClientData.aInputEv.mnDeltaStart = 0; + maClientData.aInputEv.mnCursorFlags = 0; + maClientData.aInputEv.mbOnlyCursor = FALSE; + + SalI18N_InputMethod *pInputMethod; + pInputMethod = GetX11SalData()->GetDisplay()->GetInputMethod(); + mbMultiLingual = pInputMethod->IsMultiLingual(); + + mnSupportedPreeditStyle = XIMPreeditCallbacks | XIMPreeditPosition + | XIMPreeditNothing | XIMPreeditNone; + if (pInputMethod->UseMethod() + && SupportInputMethodStyle( pInputMethod->GetSupportedStyles() ) ) + { + const SystemEnvData* pEnv = pFrame->GetSystemData(); + XLIB_Window aClientWindow = pEnv->aShellWindow; + XLIB_Window aFocusWindow = pEnv->aWindow; + + // for status callbacks and commit string callbacks +#define PREEDIT_BUFSZ 16 + maClientData.bIsMultilingual = mbMultiLingual; + maClientData.eState = ePreeditStatusStartPending; + maClientData.pFrame = pFrame; + maClientData.aText.pUnicodeBuffer = + (sal_Unicode*)malloc(PREEDIT_BUFSZ * sizeof(sal_Unicode)); + maClientData.aText.pCharStyle = + (XIMFeedback*)malloc(PREEDIT_BUFSZ * sizeof(XIMFeedback));; + maClientData.aText.nSize = PREEDIT_BUFSZ; + maClientData.aText.nCursorPos = 0; + maClientData.aText.nLength = 0; + + // + // Status attributes + // + + switch ( mnStatusStyle ) + { + case XIMStatusCallbacks: + { + static XIMCallback aStatusStartCallback; + static XIMCallback aStatusDoneCallback; + static XIMCallback aStatusDrawCallback; + + aStatusStartCallback.callback = (XIMProc)StatusStartCallback; + aStatusStartCallback.client_data = (XPointer)&maClientData; + aStatusDoneCallback.callback = (XIMProc)StatusDoneCallback; + aStatusDoneCallback.client_data = (XPointer)&maClientData; + aStatusDrawCallback.callback = (XIMProc)StatusDrawCallback; + aStatusDrawCallback.client_data = (XPointer)&maClientData; + + mpStatusAttributes = XVaCreateNestedList ( + 0, + XNStatusStartCallback, &aStatusStartCallback, + XNStatusDoneCallback, &aStatusDoneCallback, + XNStatusDrawCallback, &aStatusDrawCallback, + NULL ); + + break; + } + + case XIMStatusArea: + /* not supported */ + break; + + case XIMStatusNone: + case XIMStatusNothing: + default: + /* no arguments needed */ + break; + } + + // + // set preedit attributes + // + + switch ( mnPreeditStyle ) + { + case XIMPreeditCallbacks: + + maPreeditCaretCallback.callback = (XIMProc)PreeditCaretCallback; + maPreeditStartCallback.callback = (XIMProc)PreeditStartCallback; + maPreeditDoneCallback.callback = (XIMProc)PreeditDoneCallback; + maPreeditDrawCallback.callback = (XIMProc)PreeditDrawCallback; + maPreeditCaretCallback.client_data = (XPointer)&maClientData; + maPreeditStartCallback.client_data = (XPointer)&maClientData; + maPreeditDoneCallback.client_data = (XPointer)&maClientData; + maPreeditDrawCallback.client_data = (XPointer)&maClientData; + + mpPreeditAttributes = XVaCreateNestedList ( + 0, + XNPreeditStartCallback, &maPreeditStartCallback, + XNPreeditDoneCallback, &maPreeditDoneCallback, + XNPreeditDrawCallback, &maPreeditDrawCallback, + XNPreeditCaretCallback, &maPreeditCaretCallback, + NULL ); + + break; + + case XIMPreeditArea: + /* not supported */ + break; + + case XIMPreeditPosition: + { + // spot location + SalExtTextInputPosEvent aPosEvent; + pFrame->CallCallback(SALEVENT_EXTTEXTINPUTPOS, (void*)&aPosEvent); + + static XPoint aSpot; + aSpot.x = aPosEvent.mnX + aPosEvent.mnWidth; + aSpot.y = aPosEvent.mnY + aPosEvent.mnHeight; + + // create attributes for preedit position style + mpPreeditAttributes = XVaCreateNestedList ( + 0, + XNSpotLocation, &aSpot, + NULL ); + + // XCreateIC() fails on Redflag Linux 2.0 if there is no + // fontset though the data itself is not evaluated nor is + // it required according to the X specs. + Display* pDisplay = GetX11SalData()->GetDisplay()->GetDisplay(); + XFontSet pFontSet = get_font_set(pDisplay); + + if (pFontSet != NULL) + { + mpPreeditAttributes = XVaAddToNestedList( mpPreeditAttributes, + const_cast(XNFontSet), (XPointer)pFontSet); + } + + break; + } + + case XIMPreeditNone: + case XIMPreeditNothing: + default: + /* no arguments needed */ + break; + } + + // Create the InputContext by giving it exactly the information it + // deserves, because inappropriate attributes + // let XCreateIC fail on Solaris (eg. for C locale) + + mpAttributes = XVaCreateNestedList( + 0, + XNFocusWindow, aFocusWindow, + XNClientWindow, aClientWindow, + XNInputStyle, mnPreeditStyle | mnStatusStyle, + NULL ); + + if ( mnPreeditStyle != XIMPreeditNone ) + { +#if defined LINUX || defined FREEBSD || defined NETBSD + if ( mpPreeditAttributes != NULL ) +#endif + mpAttributes = XVaAddToNestedList( mpAttributes, + const_cast(XNPreeditAttributes), (XPointer)mpPreeditAttributes ); + } + if ( mnStatusStyle != XIMStatusNone ) + { +#if defined LINUX || defined FREEBSD || defined NETBSD + if ( mpStatusAttributes != NULL ) +#endif + mpAttributes = XVaAddToNestedList( mpAttributes, + const_cast(XNStatusAttributes), (XPointer)mpStatusAttributes ); + } + maContext = XCreateIC( pInputMethod->GetMethod(), + XNVaNestedList, mpAttributes, + NULL ); + } + + if ( maContext == NULL ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf(stderr, "input context creation failed\n"); +#endif + + mbUseable = False; + mbMultiLingual = False; + + if ( mpAttributes != NULL ) + XFree( mpAttributes ); + if ( mpStatusAttributes != NULL ) + XFree( mpStatusAttributes ); + if ( mpPreeditAttributes != NULL ) + XFree( mpPreeditAttributes ); + if ( maClientData.aText.pUnicodeBuffer != NULL ) + free ( maClientData.aText.pUnicodeBuffer ); + if ( maClientData.aText.pCharStyle != NULL ) + free ( maClientData.aText.pCharStyle ); + + mpAttributes = NULL; + mpStatusAttributes = NULL; + mpPreeditAttributes = NULL; + maClientData.aText.pUnicodeBuffer = NULL; + maClientData.aText.pCharStyle = NULL; + } + + if ( maContext != NULL && mbMultiLingual ) + { + maCommitStringCallback.callback = (XIMProc)::CommitStringCallback; + maCommitStringCallback.client_data = (XPointer)&maClientData; + maSwitchIMCallback.callback = (XIMProc)::SwitchIMCallback; + maSwitchIMCallback.client_data = (XPointer)&maClientData; + XSetICValues( maContext, + XNCommitStringCallback, &maCommitStringCallback, + XNSwitchIMNotifyCallback, &maSwitchIMCallback, + NULL ); + } + if ( maContext != NULL) + { + maDestroyCallback.callback = (XIMProc)IC_IMDestroyCallback; + maDestroyCallback.client_data = (XPointer)this; + XSetICValues( maContext, + XNDestroyCallback, &maDestroyCallback, + NULL ); + } + + if( mbMultiLingual ) + { + // set initial IM status + XIMUnicodeCharacterSubset* pSubset = NULL; + if( ! XGetICValues( maContext, + XNUnicodeCharacterSubset, & pSubset, + NULL ) + && pSubset ) + { + String aCurrent( ByteString( pSubset->name ), RTL_TEXTENCODING_UTF8 ); + ::vcl::I18NStatus::get().changeIM( aCurrent ); + ::vcl::I18NStatus::get().setStatusText( aCurrent ); + } + } +} + +// --------------------------------------------------------------------------- +// +// In Solaris 8 the status window does not unmap if the frame unmapps, so +// unmap it the hard way +// +// --------------------------------------------------------------------------- + +void +SalI18N_InputContext::Unmap( SalFrame* pFrame ) +{ + if ( maContext != NULL ) + { + I18NStatus& rStatus( I18NStatus::get() ); + if( rStatus.getParent() == pFrame ) + rStatus.show( false, I18NStatus::contextmap ); + + } + UnsetICFocus( pFrame ); + maClientData.pFrame = NULL; +} + +void +SalI18N_InputContext::Map( SalFrame *pFrame ) +{ + if( mbUseable ) + { + I18NStatus& rStatus(I18NStatus::get() ); + rStatus.setParent( pFrame ); + if( pFrame ) + { + rStatus.show( true, I18NStatus::contextmap ); + if ( maContext == NULL ) + { + SalI18N_InputMethod *pInputMethod; + pInputMethod = GetX11SalData()->GetDisplay()->GetInputMethod(); + + maContext = XCreateIC( pInputMethod->GetMethod(), + XNVaNestedList, mpAttributes, + NULL ); + if ( maContext != NULL && mbMultiLingual ) + XSetICValues( maContext, + XNCommitStringCallback, &maCommitStringCallback, + XNSwitchIMNotifyCallback, &maSwitchIMCallback, + NULL ); + } + if( maClientData.pFrame != pFrame ) + SetICFocus( pFrame ); + } + } +} + +// -------------------------------------------------------------------------- +// +// Handle DestroyCallbacks +// in fact this is a callback called from the XNDestroyCallback +// +// -------------------------------------------------------------------------- + +void +SalI18N_InputContext::HandleDestroyIM() +{ + maContext = 0; // noli me tangere + mbUseable = False; +} + +// --------------------------------------------------------------------------- +// +// make sure, the input method gets all the X-Events it needs, this is only +// called once on each frame, it relys on a valid maContext +// +// --------------------------------------------------------------------------- + +void +SalI18N_InputContext::ExtendEventMask( XLIB_Window aFocusWindow ) +{ + unsigned long nIMEventMask; + XWindowAttributes aWindowAttributes; + + if ( mbUseable ) + { + Display *pDisplay = XDisplayOfIM( XIMOfIC(maContext) ); + + XGetWindowAttributes( pDisplay, aFocusWindow, + &aWindowAttributes ); + XGetICValues ( maContext, + XNFilterEvents, &nIMEventMask, + NULL); + nIMEventMask |= aWindowAttributes.your_event_mask; + XSelectInput ( pDisplay, aFocusWindow, nIMEventMask ); + } +} + +// --------------------------------------------------------------------------- +// +// tune the styles provided by the input method with the supported one +// +// --------------------------------------------------------------------------- + +unsigned int +SalI18N_InputContext::GetWeightingOfIMStyle( XIMStyle nStyle ) const +{ + struct StyleWeightingT { + const XIMStyle nStyle; + const unsigned int nWeight; + }; + + StyleWeightingT const *pWeightPtr; + const StyleWeightingT pWeight[] = { + { XIMPreeditCallbacks, 0x10000000 }, + { XIMPreeditPosition, 0x02000000 }, + { XIMPreeditArea, 0x01000000 }, + { XIMPreeditNothing, 0x00100000 }, + { XIMPreeditNone, 0x00010000 }, + { XIMStatusCallbacks, 0x1000 }, + { XIMStatusArea, 0x0100 }, + { XIMStatusNothing, 0x0010 }, + { XIMStatusNone, 0x0001 }, + { 0, 0x0 } + }; + + int nWeight = 0; + for ( pWeightPtr = pWeight; pWeightPtr->nStyle != 0; pWeightPtr++ ) + { + if ( (pWeightPtr->nStyle & nStyle) != 0 ) + nWeight += pWeightPtr->nWeight; + } + return nWeight; +} + +Bool +SalI18N_InputContext::IsSupportedIMStyle( XIMStyle nStyle ) const +{ + if ( (nStyle & mnSupportedPreeditStyle) + && (nStyle & mnSupportedStatusStyle) ) + { + return True; + } + return False; +} + +Bool +SalI18N_InputContext::SupportInputMethodStyle( XIMStyles *pIMStyles ) +{ + int nBestScore = 0; + int nActualScore = 0; + + mnPreeditStyle = 0; + mnStatusStyle = 0; + + if ( pIMStyles != NULL ) + { + // check whether the XIM supports one of the desired styles + // only a single preedit and a single status style must occure + // in a inpuut method style. Hideki said so, so i trust him + for ( int nStyle = 0; nStyle < pIMStyles->count_styles; nStyle++ ) + { + XIMStyle nProvidedStyle = pIMStyles->supported_styles[ nStyle ]; + if ( IsSupportedIMStyle(nProvidedStyle) ) + { + nActualScore = GetWeightingOfIMStyle( nProvidedStyle ); + if ( nActualScore >= nBestScore ) + { + nBestScore = nActualScore; + mnPreeditStyle = nProvidedStyle & mnSupportedPreeditStyle; + mnStatusStyle = nProvidedStyle & mnSupportedStatusStyle; + } + } + } + } + +#if OSL_DEBUG_LEVEL > 1 + char pBuf[ 128 ]; + fprintf( stderr, "selected inputmethod style = %s\n", + GetMethodName(mnPreeditStyle | mnStatusStyle, pBuf, sizeof(pBuf)) ); +#endif + + return (mnPreeditStyle != 0) && (mnStatusStyle != 0) ; +} + +// --------------------------------------------------------------------------- +// +// handle extended and normal key input +// +// --------------------------------------------------------------------------- + +int +SalI18N_InputContext::CommitStringCallback (sal_Unicode* pText, sal_Size nLength) +{ + XIMUnicodeText call_data; + + call_data.string.utf16_char = pText; + call_data.length = nLength; + call_data.annotations = NULL; + call_data.count_annotations = 0; + call_data.feedback = NULL; + + return ::CommitStringCallback( maContext, + (XPointer)&maClientData, (XPointer)&call_data ); +} + +int +SalI18N_InputContext::CommitKeyEvent(sal_Unicode* pText, sal_Size nLength) +{ + if (nLength == 1 && IsControlCode(pText[0])) + return 0; + + if( maClientData.pFrame ) + { + SalExtTextInputEvent aTextEvent; + + aTextEvent.mnTime = 0; + aTextEvent.mpTextAttr = 0; + aTextEvent.mnCursorPos = nLength; + aTextEvent.maText = UniString(pText, nLength); + aTextEvent.mnCursorFlags = 0; + aTextEvent.mnDeltaStart = 0; + aTextEvent.mbOnlyCursor = False; + + maClientData.pFrame->CallCallback(SALEVENT_EXTTEXTINPUT, (void*)&aTextEvent); + maClientData.pFrame->CallCallback(SALEVENT_ENDEXTTEXTINPUT, (void*)NULL); + } +#if OSL_DEBUG_LEVEL > 1 + else + fprintf(stderr, "CommitKeyEvent without frame\n" ); +#endif + + return 0; +} + +int +SalI18N_InputContext::UpdateSpotLocation() +{ + if (maContext == 0 || maClientData.pFrame == NULL) + return -1; + + SalExtTextInputPosEvent aPosEvent; + maClientData.pFrame->CallCallback(SALEVENT_EXTTEXTINPUTPOS, (void*)&aPosEvent); + + XPoint aSpot; + aSpot.x = aPosEvent.mnX + aPosEvent.mnWidth; + aSpot.y = aPosEvent.mnY + aPosEvent.mnHeight; + + XVaNestedList preedit_attr = XVaCreateNestedList(0, XNSpotLocation, &aSpot, NULL); + XSetICValues(maContext, XNPreeditAttributes, preedit_attr, NULL); + XFree(preedit_attr); + + I18NStatus::get().show( true, I18NStatus::contextmap ); + + return 0; +} + +// --------------------------------------------------------------------------- +// +// set and unset the focus for the Input Context +// the context may be NULL despite it is useable if the framewindow is +// in unmapped state +// +// --------------------------------------------------------------------------- + +void +SalI18N_InputContext::SetICFocus( SalFrame* pFocusFrame ) +{ + I18NStatus::get().setParent( pFocusFrame ); + if ( mbUseable && (maContext != NULL) ) + { + maClientData.pFrame = pFocusFrame; + + const SystemEnvData* pEnv = pFocusFrame->GetSystemData(); + XLIB_Window aClientWindow = pEnv->aShellWindow; + XLIB_Window aFocusWindow = pEnv->aWindow; + + XSetICValues( maContext, + XNFocusWindow, aFocusWindow, + XNClientWindow, aClientWindow, + NULL ); + + if( maClientData.aInputEv.mpTextAttr ) + { + sendEmptyCommit(pFocusFrame); + // begin preedit again + GetX11SalData()->GetDisplay()->SendInternalEvent( pFocusFrame, &maClientData.aInputEv, SALEVENT_EXTTEXTINPUT ); + } + + XSetICFocus( maContext ); + } +} + +void +SalI18N_InputContext::UnsetICFocus( SalFrame* pFrame ) +{ + I18NStatus& rStatus( I18NStatus::get() ); + if( rStatus.getParent() == pFrame ) + rStatus.setParent( NULL ); + + if ( mbUseable && (maContext != NULL) ) + { + // cancel an eventual event posted to begin preedit again + GetX11SalData()->GetDisplay()->CancelInternalEvent( maClientData.pFrame, &maClientData.aInputEv, SALEVENT_EXTTEXTINPUT ); + maClientData.pFrame = NULL; + XUnsetICFocus( maContext ); + } +} + +// --------------------------------------------------------------------------- +// +// multi byte input method only +// +// --------------------------------------------------------------------------- + +void +SalI18N_InputContext::SetPreeditState(Bool aPreeditState) +{ + XIMPreeditState preedit_state = XIMPreeditUnKnown; + XVaNestedList preedit_attr; + + preedit_attr = XVaCreateNestedList( + 0, + XNPreeditState, &preedit_state, + NULL); + if (!XGetICValues(maContext, XNPreeditAttributes, preedit_attr, NULL)) + { + XFree(preedit_attr); + + preedit_state = aPreeditState? XIMPreeditEnable : XIMPreeditDisable; + preedit_attr = XVaCreateNestedList( + 0, + XNPreeditState, preedit_state, + NULL); + XSetICValues(maContext, XNPreeditAttributes, preedit_attr, NULL); + } + + XFree(preedit_attr); + + return; +} + +void +SalI18N_InputContext::SetLanguage(LanguageType) +{ + // not yet implemented + return; +} + +void +SalI18N_InputContext::EndExtTextInput( USHORT /*nFlags*/ ) +{ + if ( mbUseable && (maContext != NULL) && maClientData.pFrame ) + { + vcl::DeletionListener aDel( maClientData.pFrame ); + // delete preedit in sal (commit an empty string) + sendEmptyCommit( maClientData.pFrame ); + if( ! aDel.isDeleted() ) + { + // mark previous preedit state again (will e.g. be sent at focus gain) + maClientData.aInputEv.mpTextAttr = &maClientData.aInputFlags[0]; + if( static_cast(maClientData.pFrame)->hasFocus() ) + { + // begin preedit again + GetX11SalData()->GetDisplay()->SendInternalEvent( maClientData.pFrame, &maClientData.aInputEv, SALEVENT_EXTTEXTINPUT ); + } + } + } +} + + diff --git a/vcl/unx/generic/app/i18n_im.cxx b/vcl/unx/generic/app/i18n_im.cxx new file mode 100644 index 000000000000..176212f681d5 --- /dev/null +++ b/vcl/unx/generic/app/i18n_im.cxx @@ -0,0 +1,619 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include + +#ifdef LINUX +# ifndef __USE_XOPEN +# define __USE_XOPEN +# endif +#endif +#include + +#include +#include +#include +#include +#include + +#include "unx/salunx.h" +#include "unx/saldisp.hxx" +#include "unx/i18n_im.hxx" +#include "unx/i18n_status.hxx" + +#include +#include + +using namespace vcl; +#include "unx/i18n_cb.hxx" +#if defined(SOLARIS) || defined(LINUX) +extern "C" char * XSetIMValues(XIM im, ...); +#endif + +// ------------------------------------------------------------------------------------ +// +// kinput2 IME needs special key handling since key release events are filtered in +// preeditmode and XmbResetIC does not work +// +// ------------------------------------------------------------------------------------ + +Bool +IMServerKinput2 () +{ + const static char* p_xmodifiers = getenv ("XMODIFIERS"); + const static Bool b_kinput2 = (p_xmodifiers != NULL) + && (strcmp(p_xmodifiers, "@im=kinput2") == 0); + + return b_kinput2; +} + +class XKeyEventOp : XKeyEvent +{ + private: + void init(); + + public: + XKeyEventOp(); + ~XKeyEventOp(); + + XKeyEventOp& operator= (const XKeyEvent &rEvent); + void erase (); + Bool match (const XKeyEvent &rEvent) const; +}; + +void +XKeyEventOp::init() +{ + type = 0; /* serial = 0; */ + send_event = 0; display = 0; + window = 0; root = 0; + subwindow = 0; /* time = 0; */ + /* x = 0; y = 0; */ + /* x_root = 0; y_root = 0; */ + state = 0; keycode = 0; + same_screen = 0; +} + +XKeyEventOp::XKeyEventOp() +{ + init(); +} + +XKeyEventOp::~XKeyEventOp() +{ +} + +XKeyEventOp& +XKeyEventOp::operator= (const XKeyEvent &rEvent) +{ + type = rEvent.type; /* serial = rEvent.serial; */ + send_event = rEvent.send_event; display = rEvent.display; + window = rEvent.window; root = rEvent.root; + subwindow = rEvent.subwindow;/* time = rEvent.time; */ + /* x = rEvent.x, y = rEvent.y; */ + /* x_root = rEvent.x_root, y_root = rEvent.y_root; */ + state = rEvent.state; keycode = rEvent.keycode; + same_screen = rEvent.same_screen; + + return *this; +} + +void +XKeyEventOp::erase () +{ + init(); +} + +Bool +XKeyEventOp::match (const XKeyEvent &rEvent) const +{ + return ( (type == XLIB_KeyPress && rEvent.type == KeyRelease) + || (type == KeyRelease && rEvent.type == XLIB_KeyPress )) + /* && serial == rEvent.serial */ + && send_event == rEvent.send_event + && display == rEvent.display + && window == rEvent.window + && root == rEvent.root + && subwindow == rEvent.subwindow + /* && time == rEvent.time + && x == rEvent.x + && y == rEvent.y + && x_root == rEvent.x_root + && y_root == rEvent.y_root */ + && state == rEvent.state + && keycode == rEvent.keycode + && same_screen == rEvent.same_screen; +} + +// ------------------------------------------------------------------------- +// +// locale handling +// +// ------------------------------------------------------------------------- + +// Locale handling of the operating system layer + +static char* +SetSystemLocale( const char* p_inlocale ) +{ + char *p_outlocale; + + if ( (p_outlocale = setlocale(LC_ALL, p_inlocale)) == NULL ) + { + fprintf( stderr, "I18N: Operating system doesn't support locale \"%s\"\n", + p_inlocale ); + } + + return p_outlocale; +} + +#ifdef SOLARIS +static void +SetSystemEnvironment( const rtl::OUString& rLocale ) +{ + rtl::OUString LC_ALL_Var(RTL_CONSTASCII_USTRINGPARAM("LC_ALL")); + osl_setEnvironment(LC_ALL_Var.pData, rLocale.pData); + + rtl::OUString LANG_Var(RTL_CONSTASCII_USTRINGPARAM("LANG")); + osl_setEnvironment(LANG_Var.pData, rLocale.pData); +} +#endif + +static Bool +IsPosixLocale( const char* p_locale ) +{ + if ( p_locale == NULL ) + return False; + if ( (p_locale[ 0 ] == 'C') && (p_locale[ 1 ] == '\0') ) + return True; + if ( strncmp(p_locale, "POSIX", sizeof("POSIX")) == 0 ) + return True; + + return False; +} + +// Locale handling of the X Window System layer + +static Bool +IsXWindowCompatibleLocale( const char* p_locale ) +{ + if ( p_locale == NULL ) + return False; + + if ( !XSupportsLocale() ) + { + fprintf (stderr, "I18N: X Window System doesn't support locale \"%s\"\n", + p_locale ); + return False; + } + return True; +} + +// Set the operating system locale prior to trying to open an +// XIM InputMethod. +// Handle the cases where the current locale is either not supported by the +// operating system (LANG=gaga) or by the XWindow system (LANG=aa_ER@saaho) +// by providing a fallback. +// Upgrade "C" or "POSIX" to "en_US" locale to allow umlauts and accents +// see i8988, i9188, i8930, i16318 +// on Solaris the environment needs to be set equivalent to the locale (#i37047#) + +Bool +SalI18N_InputMethod::SetLocale( const char* pLocale ) +{ + // check whether we want an Input Method engine, if we don't we + // do not need to set the locale + if ( mbUseable ) + { + char *locale = SetSystemLocale( pLocale ); + if ( (!IsXWindowCompatibleLocale(locale)) || IsPosixLocale(locale) ) + { + osl_setThreadTextEncoding (RTL_TEXTENCODING_ISO_8859_1); + locale = SetSystemLocale( "en_US" ); + #ifdef SOLARIS + SetSystemEnvironment( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en_US")) ); + #endif + if (! IsXWindowCompatibleLocale(locale)) + { + locale = SetSystemLocale( "C" ); + #ifdef SOLARIS + SetSystemEnvironment( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("C")) ); + #endif + if (! IsXWindowCompatibleLocale(locale)) + mbUseable = False; + } + } + + // must not fail if mbUseable since XSupportsLocale() asserts success + if ( mbUseable && XSetLocaleModifiers("") == NULL ) + { + fprintf (stderr, "I18N: Can't set X modifiers for locale \"%s\"\n", + locale); + mbUseable = False; + } + } + + return mbUseable; +} + +Bool +SalI18N_InputMethod::PosixLocale() +{ + if (mbMultiLingual) + return False; + if (maMethod) + return IsPosixLocale (XLocaleOfIM (maMethod)); + return False; +} + +// ------------------------------------------------------------------------ +// +// Constructor / Destructor / Initialisation +// +// ------------------------------------------------------------------------ + +SalI18N_InputMethod::SalI18N_InputMethod( ) : mbUseable( bUseInputMethodDefault ), + mbMultiLingual( False ), + maMethod( (XIM)NULL ), + mpStyles( (XIMStyles*)NULL ) +{ + const char *pUseInputMethod = getenv( "SAL_USEINPUTMETHOD" ); + if ( pUseInputMethod != NULL ) + mbUseable = pUseInputMethod[0] != '\0' ; +} + +SalI18N_InputMethod::~SalI18N_InputMethod() +{ + ::vcl::I18NStatus::free(); + if ( mpStyles != NULL ) + XFree( mpStyles ); + if ( maMethod != NULL ) + XCloseIM ( maMethod ); +} + +// +// XXX +// debug routine: lets have a look at the provided method styles +// + +#if OSL_DEBUG_LEVEL > 1 + +extern "C" char* +GetMethodName( XIMStyle nStyle, char *pBuf, int nBufSize) +{ + struct StyleName { + const XIMStyle nStyle; + const char *pName; + const int nNameLen; + }; + + StyleName *pDescPtr; + static const StyleName pDescription[] = { + { XIMPreeditArea, "PreeditArea ", sizeof("PreeditArea ") }, + { XIMPreeditCallbacks, "PreeditCallbacks ",sizeof("PreeditCallbacks ")}, + { XIMPreeditPosition, "PreeditPosition ", sizeof("PreeditPosition ") }, + { XIMPreeditNothing, "PreeditNothing ", sizeof("PreeditNothing ") }, + { XIMPreeditNone, "PreeditNone ", sizeof("PreeditNone ") }, + { XIMStatusArea, "StatusArea ", sizeof("StatusArea ") }, + { XIMStatusCallbacks, "StatusCallbacks ", sizeof("StatusCallbacks ") }, + { XIMStatusNothing, "StatusNothing ", sizeof("StatusNothing ") }, + { XIMStatusNone, "StatusNone ", sizeof("StatusNone ") }, + { 0, "NULL", 0 } + }; + + if ( nBufSize > 0 ) + pBuf[0] = '\0'; + + char *pBufPtr = pBuf; + for ( pDescPtr = const_cast(pDescription); pDescPtr->nStyle != 0; pDescPtr++ ) + { + int nSize = pDescPtr->nNameLen - 1; + if ( (nStyle & pDescPtr->nStyle) && (nBufSize > nSize) ) + { + strncpy( pBufPtr, pDescPtr->pName, nSize + 1); + pBufPtr += nSize; + nBufSize -= nSize; + } + } + + return pBuf; +} + +extern "C" void +PrintInputStyle( XIMStyles *pStyle ) +{ + char pBuf[ 128 ]; + int nBuf = sizeof( pBuf ); + + if ( pStyle == NULL ) + fprintf( stderr, "no input method styles\n"); + else + for ( int nStyle = 0; nStyle < pStyle->count_styles; nStyle++ ) + { + fprintf( stderr, "style #%i = %s\n", nStyle, + GetMethodName(pStyle->supported_styles[nStyle], pBuf, nBuf) ); + } +} + +#endif + +// +// this is the real constructing routine, since locale setting has to be done +// prior to xopendisplay, the xopenim call has to be delayed +// + +Bool +SalI18N_InputMethod::CreateMethod ( Display *pDisplay ) +{ + if ( mbUseable ) + { + const bool bTryMultiLingual = + #ifdef LINUX + false; + #else + true; + #endif + if ( bTryMultiLingual && getenv("USE_XOPENIM") == NULL ) + { + mbMultiLingual = True; // set ml-input flag to create input-method + maMethod = XvaOpenIM(pDisplay, NULL, NULL, NULL, + XNMultiLingualInput, mbMultiLingual, /* dummy */ + (void *)0); + // get ml-input flag from input-method + if ( maMethod == (XIM)NULL ) + mbMultiLingual = False; + else + if ( XGetIMValues(maMethod, + XNMultiLingualInput, &mbMultiLingual, NULL ) != NULL ) + mbMultiLingual = False; + if( mbMultiLingual ) + { + XIMUnicodeCharacterSubsets* subsets; + if( XGetIMValues( maMethod, + XNQueryUnicodeCharacterSubset, &subsets, NULL ) == NULL ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "IM reports %d subsets: ", subsets->count_subsets ); +#endif + I18NStatus& rStatus( I18NStatus::get() ); + rStatus.clearChoices(); + for( int i = 0; i < subsets->count_subsets; i++ ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr,"\"%s\" ", subsets->supported_subsets[i].name ); +#endif + rStatus.addChoice( String( subsets->supported_subsets[i].name, RTL_TEXTENCODING_UTF8 ), &subsets->supported_subsets[i] ); + } +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "\n" ); +#endif + } +#if OSL_DEBUG_LEVEL > 1 + else + fprintf( stderr, "query subsets failed\n" ); +#endif + } + } + else + { + maMethod = XOpenIM(pDisplay, NULL, NULL, NULL); + mbMultiLingual = False; + } + + if ((maMethod == (XIM)NULL) && (getenv("XMODIFIERS") != NULL)) + { + rtl::OUString envVar(RTL_CONSTASCII_USTRINGPARAM("XMODIFIERS")); + osl_clearEnvironment(envVar.pData); + XSetLocaleModifiers(""); + maMethod = XOpenIM(pDisplay, NULL, NULL, NULL); + mbMultiLingual = False; + } + + if ( maMethod != (XIM)NULL ) + { + if ( XGetIMValues(maMethod, XNQueryInputStyle, &mpStyles, NULL) + != NULL) + mbUseable = False; + #if OSL_DEBUG_LEVEL > 1 + fprintf(stderr, "Creating %s-Lingual InputMethod\n", + mbMultiLingual ? "Multi" : "Mono" ); + PrintInputStyle( mpStyles ); + #endif + } + else + { + mbUseable = False; + } + } + + #if OSL_DEBUG_LEVEL > 1 + if ( !mbUseable ) + fprintf(stderr, "input method creation failed\n"); + #endif + + maDestroyCallback.callback = (XIMProc)IM_IMDestroyCallback; + maDestroyCallback.client_data = (XPointer)this; + if (mbUseable && maMethod != NULL) + XSetIMValues(maMethod, XNDestroyCallback, &maDestroyCallback, NULL); + + return mbUseable; +} + +// +// give IM the opportunity to look at the event, and possibly hide it +// + +Bool +SalI18N_InputMethod::FilterEvent( XEvent *pEvent, XLIB_Window window ) +{ + if (!mbUseable) + return False; + + Bool bFilterEvent = XFilterEvent (pEvent, window); + + if (pEvent->type != XLIB_KeyPress && pEvent->type != KeyRelease) + return bFilterEvent; + + /* + * fix broken key release handling of some IMs + */ + XKeyEvent* pKeyEvent = &(pEvent->xkey); + static XKeyEventOp maLastKeyPress; + + if (bFilterEvent) + { + if (pKeyEvent->type == KeyRelease) + bFilterEvent = !maLastKeyPress.match (*pKeyEvent); + maLastKeyPress.erase(); + } + else /* (!bFilterEvent) */ + { + if (pKeyEvent->type == XLIB_KeyPress) + maLastKeyPress = *pKeyEvent; + else + maLastKeyPress.erase(); + } + + return bFilterEvent; +} + +void +SalI18N_InputMethod::HandleDestroyIM() +{ + mbUseable = False; + mbMultiLingual = False; + maMethod = NULL; +} + +// ------------------------------------------------------------------------ +// +// add a connection watch into the SalXLib yieldTable to allow iiimp +// connection processing: soffice waits in select() not in XNextEvent(), so +// there may be requests pending on the iiimp internal connection that will +// not be processed until XNextEvent is called the next time. If we do not +// have the focus because the atok12 lookup choice aux window has it we stay +// deaf and dump otherwise. +// +// ------------------------------------------------------------------------ + +int +InputMethod_HasPendingEvent(int nFileDescriptor, void *pData) +{ + if (pData == NULL) + return 0; + + struct pollfd aFileDescriptor; + #ifdef SOLARIS + nfds_t nNumDescriptor = 1; + #else + unsigned int nNumDescriptor = 1; + #endif + aFileDescriptor.fd = nFileDescriptor; + aFileDescriptor.events = POLLRDNORM; + aFileDescriptor.revents = 0; + + int nPoll = poll (&aFileDescriptor, nNumDescriptor, 0 /* timeout */ ); + + if (nPoll > 0) + { + /* at least some conditions in revent are set */ + if ( (aFileDescriptor.revents & POLLHUP) + || (aFileDescriptor.revents & POLLERR) + || (aFileDescriptor.revents & POLLNVAL)) + return 0; /* oops error condition set */ + + if (aFileDescriptor.revents & POLLRDNORM) + return 1; /* success */ + } + + /* nPoll == 0 means timeout, nPoll < 0 means error */ + return 0; +} + +int +InputMethod_IsEventQueued(int nFileDescriptor, void *pData) +{ + return InputMethod_HasPendingEvent (nFileDescriptor, pData); +} + +int +InputMethod_HandleNextEvent(int nFileDescriptor, void *pData) +{ + if (pData != NULL) + XProcessInternalConnection((Display*)pData, nFileDescriptor); + + return 0; +} + +extern "C" void +InputMethod_ConnectionWatchProc (Display *pDisplay, XPointer pClientData, + int nFileDescriptor, Bool bOpening, XPointer*) +{ + SalXLib *pConnectionHandler = (SalXLib*)pClientData; + + if (pConnectionHandler == NULL) + return; + + if (bOpening) + { + pConnectionHandler->Insert (nFileDescriptor, pDisplay, + InputMethod_HasPendingEvent, + InputMethod_IsEventQueued, + InputMethod_HandleNextEvent); + } + else + { + pConnectionHandler->Remove (nFileDescriptor); + } +} + +Bool +SalI18N_InputMethod::AddConnectionWatch(Display *pDisplay, void *pConnectionHandler) +{ + // sanity check + if (pDisplay == NULL || pConnectionHandler == NULL) + return False; + + // if we are not ml all the extended text input comes on the stock X queue, + // so there is no need to monitor additional file descriptors. +#ifndef SOLARIS + if (!mbMultiLingual || !mbUseable) + return False; +#endif + + // pConnectionHandler must be really a pointer to a SalXLib + Status nStatus = XAddConnectionWatch (pDisplay, InputMethod_ConnectionWatchProc, + (XPointer)pConnectionHandler); + return (Bool)nStatus; +} + + + diff --git a/vcl/unx/generic/app/i18n_keysym.cxx b/vcl/unx/generic/app/i18n_keysym.cxx new file mode 100644 index 000000000000..122a88517baf --- /dev/null +++ b/vcl/unx/generic/app/i18n_keysym.cxx @@ -0,0 +1,365 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include + +#include + +// convert keysyms to unicode +// for all keysyms with byte1 and byte2 equal zero, and of course only for +// keysyms that have a unicode counterpart + +typedef const sal_Unicode unicode_t; +typedef struct { + const int first; const int last; + unicode_t *map; +} keymap_t; + +// Latin-1 Byte 3 = 0x00 +unicode_t keymap00_map[] = { + 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, + 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, + 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, + 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, + 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, + 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, + 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, + 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, + 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, + 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, + 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, + 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, + 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, + 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, + 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, + 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, + 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, + 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, + 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, + 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, + 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, + 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, + 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff }; +const keymap_t keymap00 = { 32, 255, keymap00_map }; + +// Latin-2 Byte 3 = 0x01 +unicode_t keymap01_map[] = { + 0x0104, 0x02d8, 0x0141, 0x0000, 0x013d, 0x015a, 0x0000, 0x0000, + 0x0160, 0x015e, 0x0164, 0x0179, 0x0000, 0x017d, 0x017b, 0x0000, + 0x0105, 0x02db, 0x0142, 0x0000, 0x013e, 0x015b, 0x02c7, 0x0000, + 0x0161, 0x015f, 0x0165, 0x017a, 0x02dd, 0x017e, 0x017c, 0x0154, + 0x0000, 0x0000, 0x0102, 0x0000, 0x0139, 0x0106, 0x0000, 0x010c, + 0x0000, 0x0118, 0x0000, 0x011a, 0x0000, 0x0000, 0x010e, 0x0110, + 0x0143, 0x0147, 0x0000, 0x0000, 0x0150, 0x0000, 0x0000, 0x0158, + 0x016e, 0x0000, 0x0170, 0x0000, 0x0000, 0x0162, 0x0000, 0x0155, + 0x0000, 0x0000, 0x0103, 0x0000, 0x013a, 0x0107, 0x0000, 0x010d, + 0x0000, 0x0119, 0x0000, 0x011b, 0x0000, 0x0000, 0x010f, 0x0111, + 0x0144, 0x0148, 0x0000, 0x0000, 0x0151, 0x0000, 0x0000, 0x0159, + 0x016f, 0x0000, 0x0171, 0x0000, 0x0000, 0x0163, 0x02d9 }; +const keymap_t keymap01 = { 161, 255, keymap01_map }; + +// Latin-3 Byte 3 = 0x02 +unicode_t keymap02_map[] = { + 0x0126, 0x0000, 0x0000, 0x0000, 0x0000, 0x0124, 0x0000, 0x0000, + 0x0130, 0x0000, 0x011e, 0x0134, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0127, 0x0000, 0x0000, 0x0000, 0x0000, 0x0125, 0x0000, 0x0000, + 0x0131, 0x0000, 0x011f, 0x0135, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x010a, 0x0108, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0120, 0x0000, 0x0000, 0x011c, + 0x0000, 0x0000, 0x0000, 0x0000, 0x016c, 0x015c, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x010b, 0x0109, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0121, 0x0000, 0x0000, 0x011d, + 0x0000, 0x0000, 0x0000, 0x0000, 0x016d, 0x015d }; +const keymap_t keymap02 = { 161, 254, keymap02_map }; + +// Latin-4 Byte 3 = 0x03 +unicode_t keymap03_map[] = { + 0x0138, 0x0156, 0x0000, 0x0128, 0x013b, 0x0000, 0x0000, 0x0000, + 0x0112, 0x0122, 0x0166, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0157, 0x0000, 0x0129, 0x013c, 0x0000, 0x0000, 0x0000, + 0x0113, 0x0123, 0x0167, 0x014a, 0x0000, 0x014b, 0x0100, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x012e, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0116, 0x0000, 0x0000, 0x012a, 0x0000, 0x0145, + 0x014c, 0x0136, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0172, + 0x0000, 0x0000, 0x0000, 0x0168, 0x016a, 0x0000, 0x0101, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x012f, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0117, 0x0000, 0x0000, 0x012b, 0x0000, 0x0146, + 0x014d, 0x0137, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0173, + 0x0000, 0x0000, 0x0000, 0x0169, 0x016b }; +const keymap_t keymap03 = { 162, 254, keymap03_map }; + +// Kana Byte 3 = 0x04 +unicode_t keymap04_map[] = { + 0x203e, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x3002, 0x300c, 0x300d, 0x3001, 0x30fb, + 0x30f2, 0x30a1, 0x30a3, 0x30a5, 0x30a7, 0x30a9, 0x30e3, 0x30e5, + 0x30e7, 0x30c3, 0x30fc, 0x30a2, 0x30a4, 0x30a6, 0x30a8, 0x30aa, + 0x30ab, 0x30ad, 0x30af, 0x30b1, 0x30b3, 0x30b5, 0x30b7, 0x30b9, + 0x30bb, 0x30bd, 0x30bf, 0x30c1, 0x30c4, 0x30c6, 0x30c8, 0x30ca, + 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, 0x30d2, 0x30d5, 0x30d8, + 0x30db, 0x30de, 0x30df, 0x30e0, 0x30e1, 0x30e2, 0x30e4, 0x30e6, + 0x30e8, 0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ef, 0x30f3, + 0x309b, 0x309c }; +const keymap_t keymap04 = { 126, 223, keymap04_map }; + +// Arabic Byte 3 = 0x05 +unicode_t keymap05_map[] = { + 0x060c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x061b, + 0x0000, 0x0000, 0x0000, 0x061f, 0x0000, 0x0621, 0x0622, 0x0623, + 0x0624, 0x0625, 0x0626, 0x0627, 0x0628, 0x0629, 0x062a, 0x062b, + 0x062c, 0x062d, 0x062e, 0x062f, 0x0630, 0x0631, 0x0632, 0x0633, + 0x0634, 0x0635, 0x0636, 0x0637, 0x0638, 0x0639, 0x063a, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0640, 0x0641, 0x0642, 0x0643, + 0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649, 0x064a, 0x064b, + 0x064c, 0x064d, 0x064e, 0x064f, 0x0650, 0x0651, 0x0652 }; +const keymap_t keymap05 = { 172, 242, keymap05_map }; + +// Cyrillic Byte 3 = 0x06 +unicode_t keymap06_map[] = { + 0x0452, 0x0453, 0x0451, 0x0454, 0x0455, 0x0456, 0x0457, 0x0458, + 0x0459, 0x045a, 0x045b, 0x045c, 0x0000, 0x045e, 0x045f, 0x2116, + 0x0402, 0x0403, 0x0401, 0x0404, 0x0405, 0x0406, 0x0407, 0x0408, + 0x0409, 0x040a, 0x040b, 0x040c, 0x0000, 0x040e, 0x040f, 0x044e, + 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, 0x0445, + 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, + 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, 0x044c, + 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a, 0x042e, + 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, 0x0425, + 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, + 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, 0x042c, + 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a }; +const keymap_t keymap06 = { 161, 255, keymap06_map }; + +// Greek Byte 3 = 0x07 +unicode_t keymap07_map[] = { + 0x0386, 0x0388, 0x0389, 0x038a, 0x03aa, 0x0000, 0x038c, 0x038e, + 0x03ab, 0x0000, 0x038f, 0x0000, 0x0000, 0x0385, 0x2015, 0x0000, + 0x03ac, 0x03ad, 0x03ae, 0x03af, 0x03ca, 0x0390, 0x03cc, 0x03cd, + 0x03cb, 0x03b0, 0x03ce, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, + 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0, + 0x03a1, 0x03a3, 0x0000, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, + 0x03a9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8, + 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0, + 0x03c1, 0x03c3, 0x03c2, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, + 0x03c9 }; +const keymap_t keymap07 = { 161, 249, keymap07_map }; + +// Technical Byte 3 = 0x08 +unicode_t keymap08_map[] = { + 0x23b7, 0x250c, 0x2500, 0x2320, 0x2321, 0x2502, 0x23a1, 0x23a3, + 0x23a4, 0x23a6, 0x239b, 0x239d, 0x239e, 0x23a0, 0x23a8, 0x23ac, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x2264, 0x2260, 0x2265, 0x222b, 0x2234, + 0x221d, 0x221e, 0x0000, 0x0000, 0x2207, 0x0000, 0x0000, 0x223c, + 0x2243, 0x0000, 0x0000, 0x0000, 0x21d4, 0x21d2, 0x2261, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x221a, 0x0000, 0x0000, + 0x0000, 0x2282, 0x2283, 0x2229, 0x222a, 0x2227, 0x2228, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2202, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0192, 0x0000, 0x0000, + 0x0000, 0x0000, 0x2190, 0x2191, 0x2192, 0x2193 }; +const keymap_t keymap08 = { 161, 254, keymap08_map }; + +// Special Byte 3 = 0x09 +unicode_t keymap09_map[] = { + 0x25c6, 0x2592, 0x2409, 0x240c, 0x240d, 0x240a, 0x0000, 0x0000, + 0x2424, 0x240b, 0x2518, 0x2510, 0x250c, 0x2514, 0x253c, 0x23ba, + 0x23bb, 0x2500, 0x23bc, 0x23bd, 0x251c, 0x2524, 0x2534, 0x252c, + 0x2502 }; +const keymap_t keymap09 = { 224, 248, keymap09_map }; + +// Publishing Byte 3 = 0x0a = 10 +unicode_t keymap10_map[] = { + 0x2003, 0x2002, 0x2004, 0x2005, 0x2007, 0x2008, 0x2009, 0x200a, + 0x2014, 0x2013, 0x0000, 0x0000, 0x0000, 0x2026, 0x2025, 0x2153, + 0x2154, 0x2155, 0x2156, 0x2157, 0x2158, 0x2159, 0x215a, 0x2105, + 0x0000, 0x0000, 0x2012, 0x2329, 0x0000, 0x232a, 0x0000, 0x0000, + 0x0000, 0x0000, 0x215b, 0x215c, 0x215d, 0x215e, 0x0000, 0x0000, + 0x2122, 0x2613, 0x0000, 0x25c1, 0x25b7, 0x25cb, 0x25af, 0x2018, + 0x2019, 0x201c, 0x201d, 0x211e, 0x0000, 0x2032, 0x2033, 0x0000, + 0x271d, 0x0000, 0x25ac, 0x25c0, 0x25b6, 0x25cf, 0x25ae, 0x25e6, + 0x25ab, 0x25ad, 0x25b3, 0x25bd, 0x2606, 0x2022, 0x25aa, 0x25b2, + 0x25bc, 0x261c, 0x261e, 0x2663, 0x2666, 0x2665, 0x0000, 0x2720, + 0x2020, 0x2021, 0x2713, 0x2717, 0x266f, 0x266d, 0x2642, 0x2640, + 0x260e, 0x2315, 0x2117, 0x2038, 0x201a, 0x201e }; +const keymap_t keymap10 = { 161, 254, keymap10_map }; + +// APL Byte 3 = 0x0b = 11 +unicode_t keymap11_map[] = { + 0x003c, 0x0000, 0x0000, 0x003e, 0x0000, 0x2228, 0x2227, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00af, 0x0000, 0x22a5, + 0x2229, 0x230a, 0x0000, 0x005f, 0x0000, 0x0000, 0x0000, 0x2218, + 0x0000, 0x2395, 0x0000, 0x22a4, 0x25cb, 0x0000, 0x0000, 0x0000, + 0x2308, 0x0000, 0x0000, 0x222a, 0x0000, 0x2283, 0x0000, 0x2282, + 0x0000, 0x22a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x22a3 }; +const keymap_t keymap11 = { 163, 252, keymap11_map }; + +// Hebrew Byte 3 = 0x0c = 12 +unicode_t keymap12_map[] = { + 0x2017, 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, + 0x05d7, 0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, + 0x05df, 0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, + 0x05e7, 0x05e8, 0x05e9, 0x05ea }; +const keymap_t keymap12 = { 223, 250, keymap12_map }; + +// Thai Byte 3 = 0x0d = 13 +unicode_t keymap13_map[] = { + 0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07, 0x0e08, + 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f, 0x0e10, + 0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17, 0x0e18, + 0x0e19, 0x0e1a, 0x0e1b, 0x0e1c, 0x0e1d, 0x0e1e, 0x0e1f, 0x0e20, + 0x0e21, 0x0e22, 0x0e23, 0x0e24, 0x0e25, 0x0e26, 0x0e27, 0x0e28, + 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f, 0x0e30, + 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e35, 0x0e36, 0x0e37, 0x0e38, + 0x0e39, 0x0e3a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0e3f, 0x0e40, + 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47, 0x0e48, + 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0000, 0x0000, 0x0e50, + 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57, 0x0e58, + 0x0e59 }; +const keymap_t keymap13 = { 161, 249, keymap13_map }; + +// Korean Byte 3 = 0x0e = 14 +unicode_t keymap14_map[] = { + 0x3131, 0x3132, 0x3133, 0x3134, 0x3135, 0x3136, 0x3137, 0x3138, + 0x3139, 0x313a, 0x313b, 0x313c, 0x313d, 0x313e, 0x313f, 0x3140, + 0x3141, 0x3142, 0x3143, 0x3144, 0x3145, 0x3146, 0x3147, 0x3148, + 0x3149, 0x314a, 0x314b, 0x314c, 0x314d, 0x314e, 0x314f, 0x3150, + 0x3151, 0x3152, 0x3153, 0x3154, 0x3155, 0x3156, 0x3157, 0x3158, + 0x3159, 0x315a, 0x315b, 0x315c, 0x315d, 0x315e, 0x315f, 0x3160, + 0x3161, 0x3162, 0x3163, 0x11a8, 0x11a9, 0x11aa, 0x11ab, 0x11ac, + 0x11ad, 0x11ae, 0x11af, 0x11b0, 0x11b1, 0x11b2, 0x11b3, 0x11b4, + 0x11b5, 0x11b6, 0x11b7, 0x11b8, 0x11b9, 0x11ba, 0x11bb, 0x11bc, + 0x11bd, 0x11be, 0x11bf, 0x11c0, 0x11c1, 0x11c2, 0x316d, 0x3171, + 0x3178, 0x317f, 0x3181, 0x3184, 0x3186, 0x318d, 0x318e, 0x11eb, + 0x11f0, 0x11f9, 0x0000, 0x0000, 0x0000, 0x0000, 0x20a9 }; +const keymap_t keymap14 = { 161, 255, keymap14_map }; + +// missing: +// Latin-8 Byte 3 = 0x12 = 18 + +// Latin-9 Byte 3 = 0x13 = 19 +unicode_t keymap19_map[] = { + 0x0152, 0x0153, 0x0178 }; +const keymap_t keymap19 = { 188, 190, keymap19_map }; + +// missing: +// Armenian Byte 3 = 0x14 = 20 +// Georgian Byte 3 = 0x15 = 21 +// Azeri Byte 3 = 0x16 = 22 +// Vietnamese Byte 3 = 0x1e = 30 + +// Currency Byte 3 = 0x20 = 32 +unicode_t keymap32_map[] = { + 0x20a0, 0x20a1, 0x20a2, 0x20a3, 0x20a4, 0x20a5, 0x20a6, 0x20a7, + 0x20a8, 0x0000, 0x20aa, 0x20ab, 0x20ac }; +const keymap_t keymap32 = { 160, 172, keymap32_map }; + +// Keyboard (Keypad mappings) Byte 3 = 0xff = 255 +unicode_t keymap255_map[] = { + 0x0020, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, + 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, + 0x0038, 0x0039, 0x0000, 0x0000, 0x0000, 0x003d }; +const keymap_t keymap255 = { 128, 189, keymap255_map }; + +#define INITIAL_KEYMAPS 33 +const keymap_t* p_keymap[INITIAL_KEYMAPS] = { + &keymap00, &keymap01, &keymap02, &keymap03, /* 00 -- 03 */ + &keymap04, &keymap05, &keymap06, &keymap07, /* 04 -- 07 */ + &keymap08, &keymap09, &keymap10, &keymap11, /* 08 -- 11 */ + &keymap12, &keymap13, &keymap14, (keymap_t*)NULL, /* 12 -- 15 */ + (keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, &keymap19, /* 16 -- 19 */ + (keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, /* 20 -- 23 */ + (keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, /* 24 -- 27 */ + (keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, /* 28 -- 31 */ + &keymap32 /* 32 */ +}; + +sal_Unicode +KeysymToUnicode (KeySym nKeySym) +{ + // keysym is already unicode + if ((nKeySym & 0xff000000) == 0x01000000) + { + // strip off group indicator and iso10646 plane + // FIXME can't handle chars from surrogate area. + if (! (nKeySym & 0x00ff0000) ) + return (sal_Unicode)(nKeySym & 0x0000ffff); + } + // legacy keysyms, switch to appropriate codeset + else + { + unsigned char n_byte1 = (nKeySym & 0xff000000) >> 24; + unsigned char n_byte2 = (nKeySym & 0x00ff0000) >> 16; + unsigned char n_byte3 = (nKeySym & 0x0000ff00) >> 8; + unsigned char n_byte4 = (nKeySym & 0x000000ff); + + if (n_byte1 != 0) + return 0; + if (n_byte2 != 0) + return 0; + + keymap_t const* p_map = NULL; + if (n_byte3 < INITIAL_KEYMAPS) + p_map = p_keymap[n_byte3]; + else + if (n_byte3 == 255) + p_map = &keymap255; + + if ((p_map != NULL) && (n_byte4 >= p_map->first) && (n_byte4 <= p_map->last) ) + return p_map->map[n_byte4 - p_map->first]; + } + + return 0; +} diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx new file mode 100644 index 000000000000..76193f0ef842 --- /dev/null +++ b/vcl/unx/generic/app/i18n_status.cxx @@ -0,0 +1,733 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#if OSL_DEBUG_LEVEL > 1 +#include +#endif +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +using namespace vcl; +using namespace rtl; + +namespace vcl { + +class StatusWindow : public WorkWindow +{ +protected: + StatusWindow( WinBits nWinBits ); +public: + virtual ~StatusWindow(); + + virtual void setPosition( SalFrame* ); + virtual void setText( const String & ) = 0; + virtual String getText() const = 0; + virtual void show( bool bShow, I18NStatus::ShowReason eReason ) = 0; + virtual void toggle( bool bOn ) = 0; +}; + +} + +StatusWindow::StatusWindow( WinBits nWinBits ) : + WorkWindow( NULL, nWinBits ) +{ +} + +StatusWindow::~StatusWindow() {} + +void StatusWindow::setPosition( SalFrame* ) +{ +} + +// -------------------------------------------------------------------------- + +namespace vcl { + +class XIMStatusWindow : public StatusWindow +{ + FixedText m_aStatusText; + SalFrame* m_pLastParent; + Size m_aWindowSize; + bool m_bAnchoredAtRight; + // true if the right edge (instead of the left edge) should stay at a + // fixed position when re-sizing the window + + // for delayed showing + bool m_bDelayedShow; + I18NStatus::ShowReason m_eDelayedReason; + ULONG m_nDelayedEvent; + // for toggling + bool m_bOn; + + Point updatePosition(); + void layout(); + bool checkLastParent() const; + + DECL_LINK( DelayedShowHdl, void* ); +public: + XIMStatusWindow( bool bOn ); + virtual ~XIMStatusWindow(); + + virtual void setPosition( SalFrame* ); + virtual void setText( const String & ); + virtual String getText() const; + virtual void show( bool bShow, I18NStatus::ShowReason eReason ); + virtual void toggle( bool bOn ); + + // overload WorkWindow::DataChanged + virtual void DataChanged( const DataChangedEvent& rEvt ); +}; + +} + +XIMStatusWindow::XIMStatusWindow( bool bOn ) : + StatusWindow( WB_BORDER | WB_SYSTEMFLOATWIN | WB_TOOLTIPWIN ), + m_aStatusText( this, 0 ), + m_pLastParent( NULL ), + m_bAnchoredAtRight( false ), + m_bDelayedShow( false ), + m_eDelayedReason( I18NStatus::contextmap ), + m_nDelayedEvent( 0 ), + m_bOn( bOn ) +{ + layout(); +} + +XIMStatusWindow::~XIMStatusWindow() +{ + if( m_nDelayedEvent ) + Application::RemoveUserEvent( m_nDelayedEvent ); +} + +void XIMStatusWindow::toggle( bool bOn ) +{ + m_bOn = bOn; + show( bOn, I18NStatus::contextmap ); +} + +void XIMStatusWindow::layout() +{ + m_aWindowSize.Width() = m_aStatusText.GetTextWidth( m_aStatusText.GetText() )+8; + Font aFont( m_aStatusText.GetFont() ); + m_aWindowSize.Height() = aFont.GetHeight()+10; + m_aWindowSize = LogicToPixel( m_aWindowSize ); + + Size aControlSize( m_aWindowSize ); + aControlSize.Width() -= 4; + aControlSize.Height() -= 4; + + m_aStatusText.SetPosSizePixel( Point( 1, 1 ), aControlSize ); + m_aStatusText.SetFont( aFont ); + m_aStatusText.Show( TRUE ); + + if (m_bAnchoredAtRight && IsVisible()) + { + SalFrame* pFrame = (SalFrame*)GetSystemData()->pSalFrame; + long nDelta = pFrame->maGeometry.nWidth - m_aWindowSize.Width(); + pFrame->SetPosSize( pFrame->maGeometry.nX + nDelta, + pFrame->maGeometry.nY, + m_aWindowSize.Width(), + m_aWindowSize.Height(), + SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y | SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT ); + } + else + SetOutputSizePixel( m_aWindowSize ); +} + +bool XIMStatusWindow::checkLastParent() const +{ + if( m_pLastParent ) + { + const std::list< SalFrame* >& rFrames = GetX11SalData()->GetDisplay()->getFrames(); + for( std::list< SalFrame* >::const_iterator it = rFrames.begin(); it != rFrames.end(); ++it ) + { + if( *it == m_pLastParent ) + return true; + } + } + return false; +} + +void XIMStatusWindow::DataChanged( const DataChangedEvent& ) +{ + m_aStatusText.SetSettings( GetSettings() ); + layout(); +} + +Point XIMStatusWindow::updatePosition() +{ + Point aRet; + if( checkLastParent() ) + { + const SystemEnvData* pParentEnvData = m_pLastParent->GetSystemData(); + + SalExtTextInputPosEvent aPosEvent; + m_pLastParent->CallCallback( SALEVENT_EXTTEXTINPUTPOS, (void*)&aPosEvent ); + int x, y; + XLIB_Window aChild; + XTranslateCoordinates( (Display*)pParentEnvData->pDisplay, + (XLIB_Window)pParentEnvData->aShellWindow, + GetX11SalData()->GetDisplay()->GetRootWindow( GetX11SalData()->GetDisplay()->GetDefaultScreenNumber() ), + 0, 0, + &x, &y, + &aChild ); + + // TODO: Currently, place the status window to the (physical) left of + // the cursor iff in vertical mode (assuming that the columns in + // vertical mode are always written from right to left, this causes the + // status window to keep out of the text already written). This + // heuristic would break if there is ever a vertical mode in which the + // columns are written from left to right. Also, more elaborate + // positioning for (both horizontal and vertical) left-to-right and + // right-to-left text would be possible. + bool bLeft = aPosEvent.mbVertical; + // true if status window is to the left of the cursor + + int const nGap = 4; // between cursor and status window + if (aPosEvent.mbVertical) + { + aRet.X() = x + aPosEvent.mnX + (bLeft + ? -m_aWindowSize.Width() - nGap + : aPosEvent.mnHeight + nGap); + aRet.Y() = y + aPosEvent.mnY; + } + else + { + aRet.X() = x + aPosEvent.mnX + (bLeft ? -m_aWindowSize.Width() : 0); + aRet.Y() = y + aPosEvent.mnY+aPosEvent.mnHeight + nGap; + } + + m_bAnchoredAtRight = bLeft; + } + return aRet; +} + +void XIMStatusWindow::setPosition( SalFrame* pParent ) +{ + if( pParent ) + { + if( pParent != m_pLastParent ) + { + setText( String() ); + m_pLastParent = pParent; + Show( FALSE, SHOW_NOACTIVATE ); + } + if( IsVisible() ) + { + const SystemEnvData* pEnvData = GetSystemData(); + SalFrame* pStatusFrame = (SalFrame*)pEnvData->pSalFrame; + Point aPoint = updatePosition(); + pStatusFrame->SetPosSize( aPoint.X(), aPoint.Y(), m_aWindowSize.Width(), m_aWindowSize.Height(), SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y | SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT ); + } + } +} + +IMPL_LINK( XIMStatusWindow, DelayedShowHdl, void*, EMPTYARG ) +{ + m_nDelayedEvent = 0; + const SystemEnvData* pData = GetSystemData(); + SalFrame* pStatusFrame = (SalFrame*)pData->pSalFrame; + if( m_bDelayedShow ) + { + Size aControlSize( m_aWindowSize.Width()-4, m_aWindowSize.Height()-4 ); + m_aStatusText.SetPosSizePixel( Point( 1, 1 ), aControlSize ); + Point aPoint = updatePosition(); + pStatusFrame->SetPosSize( aPoint.X(), aPoint.Y(), m_aWindowSize.Width(), m_aWindowSize.Height(), SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y | SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT ); + } + Show( m_bDelayedShow && m_bOn, SHOW_NOACTIVATE ); + if( m_bDelayedShow ) + { + XRaiseWindow( (Display*)pData->pDisplay, + (XLIB_Window)pData->aShellWindow ); + } + return 0; +} + +void XIMStatusWindow::show( bool bShow, I18NStatus::ShowReason eReason ) +{ + if( bShow && ! m_aStatusText.GetText().Len() ) + bShow = false; + + m_bDelayedShow = bShow; + m_eDelayedReason = eReason; + if( ! m_nDelayedEvent ) + m_nDelayedEvent = Application::PostUserEvent( LINK( this, XIMStatusWindow, DelayedShowHdl ) ); +} + +void XIMStatusWindow::setText( const String& rText ) +{ + m_aStatusText.SetText( rText ); + m_aWindowSize.Width() = m_aStatusText.GetTextWidth( rText )+8; +} + +String XIMStatusWindow::getText() const +{ + return m_aStatusText.GetText(); +} + +// -------------------------------------------------------------------------- + +namespace vcl { + +class IIIMPStatusWindow : public StatusWindow +{ + MenuButton m_aStatusBtn; + PopupMenu m_aMenu; + SalFrame* m_pResetFocus; + bool m_bShow; + bool m_bOn; + + DECL_LINK( SelectHdl, MenuButton* ); + + void show(); + +public: + IIIMPStatusWindow( SalFrame* pParent, bool bOn ); // for initial position + virtual ~IIIMPStatusWindow(); + + virtual void setText( const String & ); + virtual String getText() const; + virtual void show( bool bShow, I18NStatus::ShowReason eReason ); + virtual void toggle( bool bOn ); + void layout(); + + // overload Window focus handler + virtual void GetFocus(); + // overload WorkWindow::DataChanged + virtual void DataChanged( const DataChangedEvent& rEvt ); +}; + +} + +IIIMPStatusWindow::IIIMPStatusWindow( SalFrame* pParent, bool bOn ) : + StatusWindow( WB_MOVEABLE ), + m_aStatusBtn( this, WB_BORDER ), + m_pResetFocus( pParent ), + m_bShow( true ), + m_bOn( bOn ) +{ + SetText( String( RTL_CONSTASCII_USTRINGPARAM( "IME Status" ) ) ); + + layout(); + + m_aStatusBtn.SetSelectHdl( LINK( this, IIIMPStatusWindow, SelectHdl ) ); + m_aStatusBtn.SetPopupMenu( &m_aMenu ); + m_aStatusBtn.Show( TRUE ); + + const ::std::vector< I18NStatus::ChoiceData >& rChoices( I18NStatus::get().getChoices() ); + int i = 1; + for( ::std::vector< I18NStatus::ChoiceData >::const_iterator it = rChoices.begin(); it != rChoices.end(); ++it, i++ ) + m_aMenu.InsertItem( i, it->aString ); + + if( pParent ) + { + const SystemEnvData* pEnvData = GetSystemData(); + + const SalFrameGeometry& rGeom( pParent->GetUnmirroredGeometry() ); + int nDistance = rGeom.nTopDecoration; + if( nDistance < 20 ) + nDistance = 20; + XMoveWindow( (Display*)pEnvData->pDisplay, + (XLIB_Window)pEnvData->aShellWindow, + rGeom.nX, + rGeom.nY + rGeom.nHeight + nDistance + ); + } +#if OSL_DEBUG_LEVEL > 1 + else + fprintf( stderr, "Warning: could not reposition status window since no frame\n" ); +#endif + EnableAlwaysOnTop( TRUE ); +} + +IIIMPStatusWindow::~IIIMPStatusWindow() +{ +} + +void IIIMPStatusWindow::layout() +{ + Font aFont( m_aStatusBtn.GetFont() ); + Size aSize( 15*aFont.GetHeight(), aFont.GetHeight()+14 ); + aSize = m_aStatusBtn.LogicToPixel( aSize ); + + m_aStatusBtn.SetPosSizePixel( Point( 0, 0 ), aSize ); + SetOutputSizePixel( aSize ); + if( IsVisible() ) + Invalidate(); +} + +void IIIMPStatusWindow::DataChanged( const DataChangedEvent& ) +{ + m_aStatusBtn.SetSettings( GetSettings() ); + layout(); +} + +void IIIMPStatusWindow::setText( const String& rText ) +{ + m_aStatusBtn.SetText( rText ); +} + +String IIIMPStatusWindow::getText() const +{ + return m_aStatusBtn.GetText(); +} + +void IIIMPStatusWindow::show( bool bShow, I18NStatus::ShowReason eReason ) +{ + // hide IIIMPStatusWindow only in presentations + if( ! bShow + && eReason != I18NStatus::presentation + ) + return; + + m_bShow = bShow; + show(); +} + +void IIIMPStatusWindow::toggle( bool bOn ) +{ + if (bOn != m_bOn) + { + m_bOn = bOn; + show(); + } +} + +void IIIMPStatusWindow::show() +{ + if (m_bOn && m_bShow && !IsVisible()) + m_pResetFocus = I18NStatus::get().getParent(); + Show(m_bOn && m_bShow); +} + +void IIIMPStatusWindow::GetFocus() +{ + /* + * this is here just to put the focus back to the application + * window at startup on clickToFocus WMs + */ + WorkWindow::GetFocus(); + if( m_pResetFocus ) + { + /* + * look if reset focus still exists + * since reset focus really is an internal hack there should + * not be a method to be called in SalFrame destructor + */ + const std::list< SalFrame* >& rFrames = GetX11SalData()->GetDisplay()->getFrames(); + std::list< SalFrame* >::const_iterator it; + for( it = rFrames.begin(); it != rFrames.end() && *it != m_pResetFocus; ++it ) + ; + if( it != rFrames.end() ) + { + const SystemEnvData* pParentEnvData = m_pResetFocus->GetSystemData(); + SalXLib* pXLib = GetX11SalData()->GetDisplay()->GetXLib(); + pXLib->PushXErrorLevel( true ); + XSetInputFocus( (Display*)pParentEnvData->pDisplay, + (XLIB_Window)pParentEnvData->aShellWindow, + RevertToNone, + CurrentTime + ); + XSync( (Display*)pParentEnvData->pDisplay, False ); + pXLib->PopXErrorLevel(); + } + m_pResetFocus = NULL; + } +} + +// -------------------------------------------------------------------------- + +IMPL_LINK( IIIMPStatusWindow, SelectHdl, MenuButton*, pBtn ) +{ + if( pBtn == & m_aStatusBtn ) + { + const ::std::vector< I18NStatus::ChoiceData >& rChoices( I18NStatus::get().getChoices() ); + unsigned int nIndex = m_aStatusBtn.GetCurItemId()-1; + if( nIndex < rChoices.size() ) + { + XSetICValues( static_cast(I18NStatus::get().getParent())->getInputContext()->GetContext(), + XNUnicodeCharacterSubset, + rChoices[nIndex].pData, + NULL); + // FIXME: get rid of X11SalFrame + X11SalFrame* pParent = static_cast(I18NStatus::get().getParent()); + if( pParent && pParent->isMapped() ) + { + const SystemEnvData* pEnv = pParent->GetSystemData(); + SalXLib* pXLib = GetX11SalData()->GetDisplay()->GetXLib(); + pXLib->PushXErrorLevel( true ); + XSetInputFocus( (Display*)pEnv->pDisplay, + (XLIB_Window)pEnv->aShellWindow, + RevertToNone, + CurrentTime + ); + XSync( (Display*)pEnv->pDisplay, False ); + pXLib->PopXErrorLevel(); + } + } + } + return 0; +} + +/* + * I18NStatus + */ + +I18NStatus* I18NStatus::pInstance = NULL; + +I18NStatus& I18NStatus::get() +{ + if( ! pInstance ) + pInstance = new I18NStatus(); + return *pInstance; +} + +// -------------------------------------------------------------------------- + +bool I18NStatus::exists() +{ + return pInstance != NULL; +} + +// -------------------------------------------------------------------------- + +void I18NStatus::free() +{ + if( pInstance ) + delete pInstance, pInstance = NULL; +} + +// -------------------------------------------------------------------------- + +I18NStatus::I18NStatus() : + m_pParent( NULL ), + m_pStatusWindow( NULL ) +{ +} + +// -------------------------------------------------------------------------- + +I18NStatus::~I18NStatus() +{ + if( m_pStatusWindow ) + delete m_pStatusWindow, m_pStatusWindow = NULL; + if( pInstance == this ) + pInstance = NULL; +} + +// -------------------------------------------------------------------------- + +void I18NStatus::setParent( SalFrame* pParent ) +{ + m_pParent = pParent; + if( ! m_pStatusWindow ) + { + bool bIIIMPmode = m_aChoices.begin() != m_aChoices.end(); + if( bIIIMPmode ) + m_pStatusWindow = new IIIMPStatusWindow( pParent, + getStatusWindowMode() ); + else + m_pStatusWindow = new XIMStatusWindow( getStatusWindowMode() ); + setStatusText( m_aCurrentIM ); + } + m_pStatusWindow->setPosition( m_pParent ); +} + +// -------------------------------------------------------------------------- + +void I18NStatus::show( bool bShow, ShowReason eReason ) +{ + if( m_pStatusWindow ) + { + m_pStatusWindow->setPosition( m_pParent ); + m_pStatusWindow->show( bShow, eReason ); + } +} + +// -------------------------------------------------------------------------- + +void I18NStatus::setStatusText( const String& rText ) +{ + if( m_pStatusWindow ) + { + /* + * #93614# convert fullwidth ASCII forms to ascii + */ + int nChars = rText.Len()+1; + sal_Unicode* pBuffer = (sal_Unicode*)alloca( nChars*sizeof( sal_Unicode ) ); + const sal_Unicode* pCopy = rText.GetBuffer(); + for( int i = 0; i < nChars; i++ ) + { + if( pCopy[i] >=0xff00 && pCopy[i] <= 0xff5f ) + pBuffer[i] = (pCopy[i] & 0xff) + 0x20; + else + pBuffer[i] = pCopy[i]; + } + String aText( pBuffer ); + m_pStatusWindow->setText( aText ); + m_pStatusWindow->setPosition( m_pParent ); + + bool bVisible = true; + if( m_pParent ) + { + long w, h; + m_pParent->GetClientSize( w, h ); + if( w == 0 || h == 0 ) + { + bVisible = false; + } + } + + m_pStatusWindow->show( bVisible, contextmap ); + } +} + +// -------------------------------------------------------------------------- + +void I18NStatus::changeIM( const String& rIM ) +{ + m_aCurrentIM = rIM; +} + +// -------------------------------------------------------------------------- + +String I18NStatus::getStatusText() const +{ + return m_pStatusWindow ? m_pStatusWindow->getText() : String(); +} + +// -------------------------------------------------------------------------- + +void I18NStatus::clearChoices() +{ + m_aChoices.clear(); +} + +// -------------------------------------------------------------------------- + +void I18NStatus::addChoice( const String& rChoice, void* pData ) +{ + ChoiceData aData; + aData.pData = pData; + aData.aString = rChoice; + m_aChoices.push_back( aData ); +} + +// -------------------------------------------------------------------------- + +void I18NStatus::toTop() const +{ + if( m_pStatusWindow ) + { + const SystemEnvData* pData = m_pStatusWindow->GetSystemData(); + XRaiseWindow( (Display*)pData->pDisplay, + (XLIB_Window)pData->aShellWindow ); + } +} + +// -------------------------------------------------------------------------- + +SalFrame* I18NStatus::getStatusFrame() const +{ + SalFrame* pRet = NULL; + if( m_pStatusWindow ) + { + const SystemEnvData* pData = m_pStatusWindow->GetSystemData(); + pRet = (SalFrame*)pData->pSalFrame; + } + return pRet; +} + +bool I18NStatus::canToggleStatusWindow() const +{ + return true; +} + +void I18NStatus::toggleStatusWindow() +{ + if (m_pStatusWindow != 0) + m_pStatusWindow->toggle(getStatusWindowMode()); +} + +bool I18NStatus::getStatusWindowMode() +{ + switch (ImplGetSVData()->maAppData.meShowImeStatusWindow) + { + default: // ImplSVAppData::ImeStatusWindowMode_UNKNOWN + return Application::GetShowImeStatusWindowDefault(); + case ImplSVAppData::ImeStatusWindowMode_HIDE: + return false; + case ImplSVAppData::ImeStatusWindowMode_SHOW: + return true; + } +} + +/* + * X11ImeStatus + */ +X11ImeStatus::~X11ImeStatus() +{ + vcl::I18NStatus::free(); +} + +bool X11ImeStatus::canToggle() +{ + return vcl::I18NStatus::get().canToggleStatusWindow(); +} + +void X11ImeStatus::toggle() +{ + vcl::I18NStatus::get().toggleStatusWindow(); +} + +SalI18NImeStatus* X11SalInstance::CreateI18NImeStatus() +{ + return new X11ImeStatus(); +} diff --git a/vcl/unx/generic/app/i18n_wrp.cxx b/vcl/unx/generic/app/i18n_wrp.cxx new file mode 100644 index 000000000000..ff56f0ed0647 --- /dev/null +++ b/vcl/unx/generic/app/i18n_wrp.cxx @@ -0,0 +1,260 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +struct XIMArg +{ + char *name; + char *value; +}; + +#if defined(SOLARIS) && !defined(__GNUC__) +#include +#else +#include +#endif +#include + +#include +#include + +#include +#include +#include "unx/XIM.h" + +#define XIIIMP_LIB "xiiimp.so.2" + +#ifdef SOLARIS +#define XIIIMP_PATH "/usr/openwin/lib/locale/common/" XIIIMP_LIB +#else /* Linux */ +#define XIIIMP_PATH "/usr/lib/im/" XIIIMP_LIB +#endif + +extern "C" { +typedef XIM (*OpenFunction)(Display*, XrmDatabase, char*, char*, XIMArg*); +} + +/* global variables */ +static void *g_dlmodule = 0; +static OpenFunction g_open_im = (OpenFunction)NULL; + +/* utility function to transform vararg list into an array of XIMArg */ + +int +XvaCountArgs( XIMArg *pInArgs ) +{ + int nArgs = 0; + char *pName, *pValue; + + while ( (pName = pInArgs->name) != NULL ) + { + pValue = pInArgs->value; + + if ( strcmp(pName, XNVaNestedList) == 0 ) + { + nArgs += XvaCountArgs( (XIMArg*)pValue ); + } + else + { + nArgs += 1; + } + pInArgs++; + } + + return nArgs; +} + +int +XvaCountArgs( va_list pInArgs ) +{ + int nArgs = 0; + char *pName, *pValue; + + while ( (pName = va_arg(pInArgs, char*)) != NULL) + { + pValue = va_arg(pInArgs, char*); + + if ( strcmp(pName, XNVaNestedList) == 0 ) + { + nArgs += XvaCountArgs( (XIMArg*)pValue ); + } + else + { + nArgs += 1; + } + } + + return nArgs; +} + +XIMArg* +XvaGetArgs( XIMArg *pInArgs, XIMArg *pOutArgs ) +{ + char *pName, *pValue; + + while ( (pName = pInArgs->name) != NULL ) + { + pValue = pInArgs->value; + + if ( strcmp(pName, XNVaNestedList) == 0 ) + { + pOutArgs = XvaGetArgs( (XIMArg*)pValue, pOutArgs ); + } + else + { + pOutArgs->name = pName; + pOutArgs->value = pValue; + pOutArgs++; + } + pInArgs++; + } + + return pOutArgs; +} + +void +XvaGetArgs( va_list pInArgs, XIMArg *pOutArgs ) +{ + char *pName, *pValue; + + while ((pName = va_arg(pInArgs, char*)) != NULL) + { + pValue = va_arg(pInArgs, char*); + + if ( strcmp(pName, XNVaNestedList) == 0 ) + { + pOutArgs = XvaGetArgs( (XIMArg*)pValue, pOutArgs ); + } + else + { + pOutArgs->name = pName; + pOutArgs->value = pValue; + pOutArgs++; + } + } + + pOutArgs->name = NULL; + pOutArgs->value = NULL; +} + + +/* Puplic functions */ + +#ifdef __cplusplus +extern "C" +#endif +XIM +XvaOpenIM(Display *display, XrmDatabase rdb, + char *res_name, char *res_class, ...) +{ + XIM xim = (XIM)0; + va_list variable; + int total_count = 0; + + /* + * so count the stuff dangling here + */ + +#if defined(SOLARIS) && !defined(__GNUC__) + va_start(variable); +#else + va_start(variable, res_class); +#endif + total_count = XvaCountArgs(variable); + va_end(variable); + + if (total_count > 0) + { + /* call a new open IM method */ + + XIMArg* args = (XIMArg*)alloca( (total_count + 1) * sizeof(XIMArg) ); + + /* + * now package it up so we can set it along + */ +#if defined(SOLARIS) && !defined(__GNUC__) + va_start(variable); +#else + va_start(variable, res_class); +#endif + XvaGetArgs( variable, args ); + va_end(variable); + + if (!g_dlmodule) + { + g_dlmodule = dlopen(XIIIMP_LIB, RTLD_LAZY); + if(!g_dlmodule) + { + g_dlmodule = dlopen(XIIIMP_PATH, RTLD_LAZY); + if (!g_dlmodule) + goto legacy_XIM; + } + g_open_im = (OpenFunction)(long)dlsym(g_dlmodule, "__XOpenIM"); + if (!g_open_im) + goto legacy_XIM; + + xim = (*g_open_im)(display, (XrmDatabase)rdb, + (char*)res_name, (char *)res_class, (XIMArg*)args); + } + else + { + goto legacy_XIM; + } + } + +// in #if to prevent warning "warning: label 'legacy_XIM' defined but not used" + legacy_XIM: + + if (!xim) + xim = XOpenIM(display, rdb, res_name, res_class); + + return xim; +} + +/* + * Close the connection to the input manager, and free the XIM structure + */ + +Status XvaCloseIM(XIM) +{ + Status s = False; + + if (!g_dlmodule) + { + /* assuming one XvaOpenIM call */ + dlclose(g_dlmodule); + g_dlmodule = (void*)0; + g_open_im = (OpenFunction)NULL; + s = True; + } + return (s); +} + + + diff --git a/vcl/unx/generic/app/i18n_xkb.cxx b/vcl/unx/generic/app/i18n_xkb.cxx new file mode 100644 index 000000000000..5587bbf02339 --- /dev/null +++ b/vcl/unx/generic/app/i18n_xkb.cxx @@ -0,0 +1,163 @@ +/************************************************************************* + * + * 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_vcl.hxx" + + +#include + +#include "unx/saldisp.hxx" +#include "unx/saldata.hxx" +#include "unx/i18n_xkb.hxx" + +SalI18N_KeyboardExtension::SalI18N_KeyboardExtension( Display* +#if __XKeyboardExtension__ +pDisplay +#endif +) + : mbUseExtension( (sal_Bool)__XKeyboardExtension__ ), + mnDefaultGroup( 0 ) +{ + #if __XKeyboardExtension__ + + mpDisplay = pDisplay; + + // allow user to set the default keyboard group idx or to disable the usage + // of x keyboard extension at all: + // setenv SAL_XKEYBOARDGROUP disables keyboard extension + // setenv SAL_XKEYBOARDGROUP 2 sets the keyboard group index to 2 + // keyboard group index must be in [1,4], may be specified in hex or decimal + static char *pUseKeyboardExtension = getenv( "SAL_XKEYBOARDGROUP" ); + if ( pUseKeyboardExtension != NULL ) + { + mbUseExtension = pUseKeyboardExtension[0] != '\0' ; + if ( mbUseExtension ) + mnDefaultGroup = strtol( pUseKeyboardExtension, NULL, 0 ); + if ( mnDefaultGroup > XkbMaxKbdGroup ) + mnDefaultGroup = 0; + } + + // query XServer support for XKB Extension, + // do not call XQueryExtension() / XInitExtension() due to possible version + // clashes ! + if ( mbUseExtension ) + { + int nMajorExtOpcode; + int nExtMajorVersion = XkbMajorVersion; + int nExtMinorVersion = XkbMinorVersion; + + mbUseExtension = (sal_Bool)XkbQueryExtension( mpDisplay, + &nMajorExtOpcode, (int*)&mnEventBase, (int*)&mnErrorBase, + &nExtMajorVersion, &nExtMinorVersion ); + } + + // query notification for changes of the keyboard group + if ( mbUseExtension ) + { + #define XkbGroupMask ( XkbGroupStateMask | XkbGroupBaseMask \ + | XkbGroupLatchMask | XkbGroupLockMask ) + + mbUseExtension = XkbSelectEventDetails( mpDisplay, + XkbUseCoreKbd, XkbStateNotify, XkbGroupMask, XkbGroupMask ); + } + + // query initial keyboard group + if ( mbUseExtension ) + { + XkbStateRec aStateRecord; + XkbGetState( mpDisplay, XkbUseCoreKbd, &aStateRecord ); + mnGroup = aStateRecord.group; + } + + #endif // __XKeyboardExtension__ +} + +void +SalI18N_KeyboardExtension::Dispatch( XEvent* +#if __XKeyboardExtension__ +pEvent +#endif +) +{ + #if __XKeyboardExtension__ + + // must the event be handled? + if ( !mbUseExtension + || (pEvent->type != mnEventBase) ) + return; + + // only handle state notify events for now, and only interested + // in group details + sal_uInt32 nXKBType = ((XkbAnyEvent*)pEvent)->xkb_type; + switch ( nXKBType ) + { + case XkbStateNotify: + + mnGroup = ((XkbStateNotifyEvent*)pEvent)->group; + break; + + default: + + #if OSL_DEBUG_LEVEL > 1 + fprintf(stderr, "Got unrequested XkbAnyEvent %#x/%i\n", + static_cast(nXKBType), static_cast(nXKBType) ); + #endif + break; + } + #endif // __XKeyboardExtension__ +} + +#if __XKeyboardExtension__ +sal_uInt32 +SalI18N_KeyboardExtension::LookupKeysymInGroup( sal_uInt32 nKeyCode, + sal_uInt32 nShiftState, + sal_uInt32 nGroup ) const +#else +sal_uInt32 +SalI18N_KeyboardExtension::LookupKeysymInGroup( sal_uInt32,sal_uInt32,sal_uInt32 ) const +#endif +{ + #if __XKeyboardExtension__ + + if ( !mbUseExtension ) + return NoSymbol; + + nShiftState &= ShiftMask; + + KeySym nKeySymbol; + nKeySymbol = XkbKeycodeToKeysym( mpDisplay, nKeyCode, nGroup, nShiftState ); + return nKeySymbol; + + #else + + return NoSymbol; + + #endif // __XKeyboardExtension__ +} + + diff --git a/vcl/unx/generic/app/keysymnames.cxx b/vcl/unx/generic/app/keysymnames.cxx new file mode 100644 index 000000000000..45a07ac66987 --- /dev/null +++ b/vcl/unx/generic/app/keysymnames.cxx @@ -0,0 +1,688 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#ifndef SOLARIS +#include +#include +#include +#endif + +#include +#include + +#if !defined (SunXK_Undo) +#define SunXK_Undo 0x0000FF65 // XK_Undo +#define SunXK_Again 0x0000FF66 // XK_Redo +#define SunXK_Find 0x0000FF68 // XK_Find +#define SunXK_Stop 0x0000FF69 // XK_Cancel +#define SunXK_Props 0x1005FF70 +#define SunXK_Front 0x1005FF71 +#define SunXK_Copy 0x1005FF72 +#define SunXK_Open 0x1005FF73 +#define SunXK_Paste 0x1005FF74 +#define SunXK_Cut 0x1005FF75 +#endif + +#ifdef SOLARIS +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif + +#include + +namespace vcl_sal { + + struct KeysymNameReplacement + { + KeySym aSymbol; + const char* pName; + }; + + struct KeyboardReplacements + { + const char* pKeyboardName; + const KeysymNameReplacement* pReplacements; + int nReplacements; + }; + + // ==================================================================== + // + // CAUTION CAUTION CAUTION + // every string value in the replacements tables must be in UTF8 + // be careful with your editor ! + // + // ==================================================================== + + static const struct KeysymNameReplacement aImplReplacements_English[] = + { + { XK_Control_L, "Ctrl" }, + { XK_Control_R, "Ctrl" }, + { XK_Escape, "Esc" }, + { XK_space, "Space" }, + { XK_minus, "-" }, + { XK_plus, "+" } + }; + + static const struct KeysymNameReplacement aImplReplacements_Turkish[] = + { + { XK_Control_L, "Ctrl" }, + { XK_Control_R, "Ctrl" }, + { XK_Right, "Sağ" }, + { XK_Left, "Sol" }, + { XK_Up, "Yukarı" }, + { XK_Down, "Aşağı" }, + { XK_space, "Boşluk" } + }; + + static const struct KeysymNameReplacement aImplReplacements_Russian[] = + { + { XK_Right, "Вправо" }, + { XK_Left, "Влево" }, + { XK_Up, "Вверх" }, + { XK_Down, "Вниз" }, + { XK_space, "Пробел" } + }; + + static const struct KeysymNameReplacement aImplReplacements_German[] = + { + { XK_Control_L, "Strg" }, + { XK_Control_R, "Strg" }, + { XK_Shift_L, "Umschalt" }, + { XK_Shift_R, "Umschalt" }, + { XK_Alt_L, "Alt" }, + { XK_Alt_R, "Alt Gr" }, + { XK_Page_Up, "Bild auf" }, + { XK_Page_Down, "Bild ab" }, + { XK_End, "Ende" }, + { XK_Home, "Pos 1" }, + { XK_Insert, "Einfg" }, + { XK_Delete, "Entf" }, + { XK_Escape, "Esc" }, + { XK_Right, "Rechts" }, + { XK_Left, "Links" }, + { XK_Up, "Oben" }, + { XK_Down, "Unten" }, + { XK_BackSpace, "Rückschritt" }, + { XK_Return, "Eingabe" }, + { XK_slash, "Schrägstrich" }, + { XK_space, "Leertaste" }, + { SunXK_Stop, "Stop" }, + { SunXK_Again, "Wiederholen" }, + { SunXK_Props, "Eigenschaften" }, + { SunXK_Undo, "Zurücknehmen" }, + { SunXK_Front, "Vordergrund" }, + { SunXK_Copy, "Kopieren" }, + { SunXK_Open, "Öffnen" }, + { SunXK_Paste, "Einsetzen" }, + { SunXK_Find, "Suchen" }, + { SunXK_Cut, "Ausschneiden" }, + { XK_minus, "-" }, + { XK_plus, "+" } + }; + + static const struct KeysymNameReplacement aImplReplacements_French[] = + { + { XK_Shift_L, "Maj" }, + { XK_Shift_R, "Maj" }, + { XK_Page_Up, "Pg. Préc" }, + { XK_Page_Down, "Pg. Suiv" }, + { XK_End, "Fin" }, + { XK_Home, "Origine" }, + { XK_Insert, "Insérer" }, + { XK_Delete, "Suppr" }, + { XK_Escape, "Esc" }, + { XK_Right, "Droite" }, + { XK_Left, "Gauche" }, + { XK_Up, "Haut" }, + { XK_Down, "Bas" }, + { XK_BackSpace, "Ret. Arr" }, + { XK_Return, "Retour" }, + { XK_KP_Enter, "Entrée" }, + { SunXK_Stop, "Stop" }, + { SunXK_Again, "Encore" }, + { SunXK_Props, "Props" }, + { SunXK_Undo, "Annuler" }, + { SunXK_Front, "Devant" }, + { SunXK_Copy, "Copy" }, + { SunXK_Open, "Ouvrir" }, + { SunXK_Paste, "Coller" }, + { SunXK_Find, "Cher." }, + { SunXK_Cut, "Couper" }, + { XK_minus, "-" }, + { XK_plus, "+" } + }; + + static const struct KeysymNameReplacement aImplReplacements_Italian[] = + { + { XK_Shift_L, "Maiusc" }, + { XK_Shift_R, "Maiusc" }, + { XK_Page_Up, "PgSu" }, + { XK_Page_Down, "PgGiu" }, + { XK_End, "Fine" }, + { XK_Insert, "Ins" }, + { XK_Delete, "Canc" }, + { XK_Escape, "Esc" }, + { XK_Right, "A destra" }, + { XK_Left, "A sinistra" }, + { XK_Up, "Sposta verso l'alto" }, + { XK_Down, "Sposta verso il basso" }, + { XK_BackSpace, "Backspace" }, + { XK_Return, "Invio" }, + { XK_space, "Spazio" }, + { SunXK_Stop, "Stop" }, + { SunXK_Again, "Ancora" }, + { SunXK_Props, "Proprietà" }, + { SunXK_Undo, "Annulla" }, + { SunXK_Front, "Davanti" }, + { SunXK_Copy, "Copia" }, + { SunXK_Open, "Apri" }, + { SunXK_Paste, "Incolla" }, + { SunXK_Find, "Trova" }, + { SunXK_Cut, "Taglia" }, + { XK_minus, "-" }, + { XK_plus, "+" } + }; + + static const struct KeysymNameReplacement aImplReplacements_Dutch[] = + { + { XK_Page_Up, "PageUp" }, + { XK_Page_Down, "PageDown" }, + { XK_Escape, "Esc" }, + { XK_Right, "Rechts" }, + { XK_Left, "Links" }, + { XK_Up, "Boven" }, + { XK_Down, "Onder" }, + { XK_BackSpace, "Backspace" }, + { XK_Return, "Return" }, + { XK_space, "Spatiebalk" }, + { SunXK_Stop, "Stop" }, + { SunXK_Again, "Again" }, + { SunXK_Props, "Props" }, + { SunXK_Undo, "Undo" }, + { SunXK_Front, "Front" }, + { SunXK_Copy, "Copy" }, + { SunXK_Open, "Open" }, + { SunXK_Paste, "Paste" }, + { SunXK_Find, "Find" }, + { SunXK_Cut, "Cut" }, + { XK_minus, "-" }, + { XK_plus, "+" } + }; + + static const struct KeysymNameReplacement aImplReplacements_Norwegian[] = + { + { XK_Shift_L, "Skift" }, + { XK_Shift_R, "Skift" }, + { XK_Page_Up, "PageUp" }, + { XK_Page_Down, "PageDown" }, + { XK_Escape, "Esc" }, + { XK_Right, "Hyre" }, + { XK_Left, "Venstre" }, + { XK_Up, "Opp" }, + { XK_Down, "Ned" }, + { XK_BackSpace, "Tilbake" }, + { XK_Return, "Enter" }, + { SunXK_Stop, "Avbryt" }, + { SunXK_Again, "Gjenta" }, + { SunXK_Props, "Egenskaper" }, + { SunXK_Undo, "Angre" }, + { SunXK_Front, "Front" }, + { SunXK_Copy, "Kopi" }, + { SunXK_Open, "Åpne" }, + { SunXK_Paste, "Lim" }, + { SunXK_Find, "Søk" }, + { SunXK_Cut, "Klipp" }, + { XK_minus, "-" }, + { XK_plus, "+" } + }; + + static const struct KeysymNameReplacement aImplReplacements_Swedish[] = + { + { XK_Shift_L, "Skift" }, + { XK_Shift_R, "Skift" }, + { XK_Page_Up, "PageUp" }, + { XK_Page_Down, "PageDown" }, + { XK_Escape, "Esc" }, + { XK_Right, "Höger" }, + { XK_Left, "Vänster" }, + { XK_Up, "Up" }, + { XK_Down, "Ned" }, + { XK_BackSpace, "Backsteg" }, + { XK_Return, "Retur" }, + { XK_space, "Blank" }, + { SunXK_Stop, "Avbryt" }, + { SunXK_Again, "Upprepa" }, + { SunXK_Props, "Egenskaper" }, + { SunXK_Undo, "Ångra" }, + { SunXK_Front, "Fram" }, + { SunXK_Copy, "Kopiera" }, + { SunXK_Open, "Öppna" }, + { SunXK_Paste, "Klistra in" }, + { SunXK_Find, "Sök" }, + { SunXK_Cut, "Klipp ut" }, + { XK_minus, "-" }, + { XK_plus, "+" } + }; + + static const struct KeysymNameReplacement aImplReplacements_Portuguese[] = + { + { XK_Page_Up, "PageUp" }, + { XK_Page_Down, "PageDown" }, + { XK_Escape, "Esc" }, + { XK_Right, "Direita" }, + { XK_Left, "Esquerda" }, + { XK_Up, "Acima" }, + { XK_Down, "Abaixo" }, + { XK_BackSpace, "Backspace" }, + { XK_Return, "Enter" }, + { XK_slash, "Barra" }, + { SunXK_Stop, "Stop" }, + { SunXK_Again, "Again" }, + { SunXK_Props, "Props" }, + { SunXK_Undo, "Undo" }, + { SunXK_Front, "Front" }, + { SunXK_Copy, "Copy" }, + { SunXK_Open, "Open" }, + { SunXK_Paste, "Paste" }, + { SunXK_Find, "Find" }, + { SunXK_Cut, "Cut" }, + { XK_minus, "-" }, + { XK_plus, "+" } + }; + + static const struct KeysymNameReplacement aImplReplacements_Spanish[] = + { + { XK_Shift_L, "Mayús" }, + { XK_Shift_R, "Mayús" }, + { XK_Page_Up, "RePág" }, + { XK_Page_Down, "AvPág" }, + { XK_End, "Fin" }, + { XK_Home, "Inicio" }, + { XK_Delete, "Supr" }, + { XK_Escape, "Esc" }, + { XK_Right, "Hacia la derecha" }, + { XK_Left, "Hacia la izquierda" }, + { XK_Up, "Hacia arriba" }, + { XK_Down, "Hacia abajo" }, + { XK_BackSpace, "Ret" }, + { XK_Return, "Entrada" }, + { XK_space, "Espacio" }, + { XK_KP_Enter, "Intro" }, + { SunXK_Stop, "Stop" }, + { SunXK_Again, "Repetir" }, + { SunXK_Props, "Props" }, + { SunXK_Undo, "Anular" }, + { SunXK_Front, "Delante" }, + { SunXK_Copy, "Copiar" }, + { SunXK_Open, "Abrir" }, + { SunXK_Paste, "Pegar" }, + { SunXK_Find, "Buscar" }, + { SunXK_Cut, "Cortar" }, + { XK_minus, "-" }, + { XK_plus, "+" } + }; + + static const struct KeyboardReplacements aKeyboards[] = + { +#ifdef SOLARIS + { "Germany5", aImplReplacements_German, sizeof(aImplReplacements_German)/sizeof(aImplReplacements_German[0]) }, + { "Germany4", aImplReplacements_German, sizeof(aImplReplacements_German)/sizeof(aImplReplacements_German[0]) }, + { "France5", aImplReplacements_French, sizeof(aImplReplacements_French)/sizeof(aImplReplacements_French[0]) }, + { "France6", aImplReplacements_French, sizeof(aImplReplacements_French)/sizeof(aImplReplacements_French[0]) }, + { "France_x86", aImplReplacements_French, sizeof(aImplReplacements_French)/sizeof(aImplReplacements_French[0]) }, + { "Italy5", aImplReplacements_Italian, sizeof(aImplReplacements_Italian)/sizeof(aImplReplacements_Italian[0]) }, + { "Italy5-Hobo", aImplReplacements_Italian, sizeof(aImplReplacements_Italian)/sizeof(aImplReplacements_Italian[0]) }, + { "Italy4", aImplReplacements_Italian, sizeof(aImplReplacements_Italian)/sizeof(aImplReplacements_Italian[0]) }, + { "Italy6", aImplReplacements_Italian, sizeof(aImplReplacements_Italian)/sizeof(aImplReplacements_Italian[0]) }, + { "Italy_x86", aImplReplacements_Italian, sizeof(aImplReplacements_Italian)/sizeof(aImplReplacements_Italian[0]) }, + { "Netherland4", aImplReplacements_Dutch, sizeof(aImplReplacements_Dutch)/sizeof(aImplReplacements_Dutch[0]) }, + { "Netherland5", aImplReplacements_Dutch, sizeof(aImplReplacements_Dutch)/sizeof(aImplReplacements_Dutch[0]) }, + { "Netherland5-Hobo", aImplReplacements_Dutch, sizeof(aImplReplacements_Dutch)/sizeof(aImplReplacements_Dutch[0]) }, + { "Netherland6", aImplReplacements_Dutch, sizeof(aImplReplacements_Dutch)/sizeof(aImplReplacements_Dutch[0]) }, + { "Netherland_x86", aImplReplacements_Dutch, sizeof(aImplReplacements_Dutch)/sizeof(aImplReplacements_Dutch[0]) }, + { "Norway5", aImplReplacements_Norwegian, sizeof(aImplReplacements_Norwegian)/sizeof(aImplReplacements_Norwegian[0]) }, + { "Norway5-Hobo", aImplReplacements_Norwegian, sizeof(aImplReplacements_Norwegian)/sizeof(aImplReplacements_Norwegian[0]) }, + { "Norway4", aImplReplacements_Norwegian, sizeof(aImplReplacements_Norwegian)/sizeof(aImplReplacements_Norwegian[0]) }, + { "Norway6", aImplReplacements_Norwegian, sizeof(aImplReplacements_Norwegian)/sizeof(aImplReplacements_Norwegian[0]) }, + { "Norway_x86", aImplReplacements_Norwegian, sizeof(aImplReplacements_Norwegian)/sizeof(aImplReplacements_Norwegian[0]) }, + { "Portugal5", aImplReplacements_Portuguese, sizeof(aImplReplacements_Portuguese)/sizeof(aImplReplacements_Portuguese[0]) }, + { "Portugal5-Hobo", aImplReplacements_Portuguese, sizeof(aImplReplacements_Portuguese)/sizeof(aImplReplacements_Portuguese[0]) }, + { "Portugal4", aImplReplacements_Portuguese, sizeof(aImplReplacements_Portuguese)/sizeof(aImplReplacements_Portuguese[0]) }, + { "Portugal6", aImplReplacements_Portuguese, sizeof(aImplReplacements_Portuguese)/sizeof(aImplReplacements_Portuguese[0]) }, + { "Portugal_x86", aImplReplacements_Portuguese, sizeof(aImplReplacements_Portuguese)/sizeof(aImplReplacements_Portuguese[0]) }, + { "Spain5", aImplReplacements_Spanish, sizeof(aImplReplacements_Spanish)/sizeof(aImplReplacements_Spanish[0]) }, + { "Spain5-Hobo", aImplReplacements_Spanish, sizeof(aImplReplacements_Spanish)/sizeof(aImplReplacements_Spanish[0]) }, + { "Spain4", aImplReplacements_Spanish, sizeof(aImplReplacements_Spanish)/sizeof(aImplReplacements_Spanish[0]) }, + { "Spain6", aImplReplacements_Spanish, sizeof(aImplReplacements_Spanish)/sizeof(aImplReplacements_Spanish[0]) }, + { "Spain_x86", aImplReplacements_Spanish, sizeof(aImplReplacements_Spanish)/sizeof(aImplReplacements_Spanish[0]) }, + { "Sweden5", aImplReplacements_Swedish, sizeof(aImplReplacements_Swedish)/sizeof(aImplReplacements_Swedish[0]) }, + { "Sweden5-Hobo", aImplReplacements_Swedish, sizeof(aImplReplacements_Swedish)/sizeof(aImplReplacements_Swedish[0]) }, + { "Sweden4", aImplReplacements_Swedish, sizeof(aImplReplacements_Swedish)/sizeof(aImplReplacements_Swedish[0]) }, + { "Sweden6", aImplReplacements_Swedish, sizeof(aImplReplacements_Swedish)/sizeof(aImplReplacements_Swedish[0]) }, + { "Sweden_x86", aImplReplacements_Swedish, sizeof(aImplReplacements_Swedish)/sizeof(aImplReplacements_Swedish[0]) }, +#endif + { "U.S. English", aImplReplacements_English, sizeof(aImplReplacements_English)/sizeof(aImplReplacements_English[0]) }, + { "United Kingdom", aImplReplacements_English, sizeof(aImplReplacements_English)/sizeof(aImplReplacements_English[0]) }, + // Germany, German + { "German", aImplReplacements_German, sizeof(aImplReplacements_German)/sizeof(aImplReplacements_German[0]) }, + { "France", aImplReplacements_French, sizeof(aImplReplacements_French)/sizeof(aImplReplacements_French[0]) }, + { "French", aImplReplacements_French, sizeof(aImplReplacements_French)/sizeof(aImplReplacements_French[0]) }, + // Italy, Italian + { "Ital", aImplReplacements_Italian, sizeof(aImplReplacements_Italian)/sizeof(aImplReplacements_Italian[0]) }, + // Norway, Norwegian + { "Norw", aImplReplacements_Norwegian, sizeof(aImplReplacements_Norwegian)/sizeof(aImplReplacements_Norwegian[0]) }, + // Portugal, Portuguese + { "Portu", aImplReplacements_Portuguese, sizeof(aImplReplacements_Portuguese)/sizeof(aImplReplacements_Portuguese[0]) }, + { "Spain", aImplReplacements_Spanish, sizeof(aImplReplacements_Spanish)/sizeof(aImplReplacements_Spanish[0]) }, + { "Spanish", aImplReplacements_Spanish, sizeof(aImplReplacements_Spanish)/sizeof(aImplReplacements_Spanish[0]) }, + // Sweden, Swedish + { "Swed", aImplReplacements_Swedish, sizeof(aImplReplacements_Swedish)/sizeof(aImplReplacements_Swedish[0]) }, + { "Netherland", aImplReplacements_Dutch, sizeof(aImplReplacements_Dutch)/sizeof(aImplReplacements_Dutch[0]) }, + { "Dutch", aImplReplacements_Dutch, sizeof(aImplReplacements_Dutch)/sizeof(aImplReplacements_Dutch[0]) }, + // Turkish, Turkey + { "Turk", aImplReplacements_Turkish, sizeof(aImplReplacements_Turkish)/sizeof(aImplReplacements_Turkish[0]) }, + // Russian, Russia + { "Russia", aImplReplacements_Russian, sizeof(aImplReplacements_Russian)/sizeof(aImplReplacements_Russian[0]) }, + { "English", aImplReplacements_English, sizeof(aImplReplacements_English)/sizeof(aImplReplacements_English[0]) } + }; + + String getKeysymReplacementName( const char* pKeyboard, KeySym nSymbol ) + { + for( unsigned int n = 0; n < sizeof(aKeyboards)/sizeof(aKeyboards[0]); n++ ) + { + if( ! strncasecmp( pKeyboard, aKeyboards[n].pKeyboardName, strlen( aKeyboards[n].pKeyboardName ) ) ) + { + const struct KeysymNameReplacement* pRepl = aKeyboards[n].pReplacements; + for( int m = aKeyboards[n].nReplacements ; m ; ) + { + if( nSymbol == pRepl[--m].aSymbol ) + return String( pRepl[m].pName, RTL_TEXTENCODING_UTF8 ); + } + } + } + // try english fallbacks + const struct KeysymNameReplacement* pRepl = aImplReplacements_English; + for( int m = sizeof(aImplReplacements_English)/sizeof(aImplReplacements_English[0]) ; m ; ) + { + if( nSymbol == pRepl[--m].aSymbol ) + return String( pRepl[m].pName, RTL_TEXTENCODING_UTF8 ); + } + return String(); + } + +} + +#ifdef SOLARIS +typedef struct { + int n_layout; + const char* p_description; +} keyboard_layout; + +static const keyboard_layout type0_layout[] = +{ + { 0, "US4" }, + { -1, NULL } +}; + +static const keyboard_layout type3_layout[] = +{ + { 0, "US3" }, + { -1, NULL } +}; + +static const keyboard_layout type4_layout[] = +{ + { 0, "US4" }, + { 1, "US4" }, + { 2, "FranceBelg4" }, + { 3, "Canada4" }, + { 4, "Denmark4" }, + { 5, "Germany4" }, + { 6, "Italy4" }, + { 7, "Netherland4" }, + { 8, "Norway4" }, + { 9, "Portugal4" }, + { 10, "SpainLatAm4" }, + { 11, "SwedenFin4" }, + { 12, "Switzer_Fr4" }, + { 13, "Switzer_Ge4" }, + { 14, "UK4" }, + { 16, "Korea4" }, + { 17, "Taiwan4" }, + { 19, "US101A_PC" }, + { 19, "US101A_Sun" }, + { 32, "Japan4" }, + { 33, "US5" }, + { 34, "US_UNIX5" }, + { 35, "France5" }, + { 36, "Denmark5" }, + { 37, "Germany5" }, + { 38, "Italy5" }, + { 39, "Netherland5" }, + { 40, "Norway5" }, + { 41, "Portugal5" }, + { 42, "Spain5" }, + { 43, "Sweden5" }, + { 44, "Switzer_Fr5" }, + { 45, "Switzer_Ge5" }, + { 46, "UK5" }, + { 47, "Korea5" }, + { 48, "Taiwan5" }, + { 49, "Japan5" }, + { 50, "Canada_Fr5" }, + { 51, "Hungary5" }, + { 52, "Poland5" }, + { 53, "Czech5" }, + { 54, "Russia5" }, + { 55, "Latvia5" }, + { 56, "Turkey5" }, + { 57, "Greece5" }, + { 58, "Estonia5" }, + { 59, "Lithuania5" }, + { 63, "Canada_Fr5_TBITS5" }, + { 80, "US5_Hobo" }, + { 81, "US_UNIX5_Hobo" }, + { 82, "France5_Hobo" }, + { 83, "Denmark5_Hobo" }, + { 84, "Germany5_Hobo" }, + { 85, "Italy5_Hobo" }, + { 86, "Netherland5_Hobo" }, + { 87, "Norway5_Hobo" }, + { 88, "Portugal5_Hobo" }, + { 89, "Spain5_Hobo" }, + { 90, "Sweden5_Hobo" }, + { 91, "Switzer_Fr5_Hobo" }, + { 92, "Switzer_Ge5_Hobo" }, + { 93, "UK5_Hobo" }, + { 94, "Korea5_Hobo" }, + { 95, "Taiwan5_Hobo" }, + { 96, "Japan5_Hobo" }, + { 97, "Canada_Fr5_Hobo" }, + { -1, NULL } +}; + +static const keyboard_layout type101_layout[] = +{ + { 0, "US101A_x86" }, + { 1, "US101A_x86" }, + { 34, "J3100_x86" }, + { 35, "France_x86" }, + { 36, "Denmark_x86" }, + { 37, "Germany_x86" }, + { 38, "Italy_x86" }, + { 39, "Netherland_x86" }, + { 40, "Norway_x86" }, + { 41, "Portugal_x86" }, + { 42, "Spain_x86" }, + { 43, "Sweden_x86" }, + { 44, "Switzer_Fr_x86" }, + { 45, "Switzer_Ge_x86" }, + { 46, "UK_x86" }, + { 47, "Korea_x86" }, + { 48, "Taiwan_x86" }, + { 49, "Japan_x86" }, + { 50, "Canada_Fr2_x86" }, + { 51, "Hungary_x86" }, + { 52, "Poland_x86" }, + { 53, "Czech_x86" }, + { 54, "Russia_x86" }, + { 55, "Latvia_x86" }, + { 56, "Turkey_x86" }, + { 57, "Greece_x86" }, + { 59, "Lithuania_x86" }, + { 1001, "MS_US101A_x86" }, + { -1, NULL } +}; + +static const keyboard_layout type6_layout[] = +{ + { 0, "US6" }, + { 6, "Denmark6" }, + { 7, "Finnish6" }, + { 8, "France6" }, + { 9, "Germany6" }, + { 14, "Italy6" }, + { 15, "Japan6" }, + { 16, "Korea6" }, + { 18, "Netherland6" }, + { 19, "Norway6" }, + { 22, "Portugal6" }, + { 25, "Spain6" }, + { 26, "Sweden6" }, + { 27, "Switzer_Fr6" }, + { 28, "Switzer_Ge6" }, + { 30, "Taiwan6" }, + { 32, "UK6" }, + { 33, "US6" }, + { -1, NULL } +}; +#endif + + +#if OSL_DEBUG_LEVEL > 1 +#include +#endif + +const char* SalDisplay::GetKeyboardName( BOOL bRefresh ) +{ + if( bRefresh || ! m_aKeyboardName.Len() ) + { +#ifdef SOLARIS + if( IsLocal() ) + { + int kbd = open( "/dev/kbd", O_RDONLY ); + if( kbd >= 0 ) + { + int kbd_type = 0; + if( ! ioctl( kbd, KIOCTYPE, &kbd_type ) ) + { + int kbd_layout = 0; + if( ! ioctl( kbd, KIOCLAYOUT, &kbd_layout ) ) + { + const keyboard_layout *p_layout = NULL; + switch( kbd_type ) + { + case KB_KLUNK: p_layout = type0_layout; break; + case KB_SUN3: p_layout = type3_layout; break; + case KB_SUN4: p_layout = type4_layout; break; + case KB_USB: p_layout = type6_layout; break; + case KB_PC: p_layout = type101_layout; break; + } + + if( p_layout ) + { + while( p_layout->n_layout != -1 ) + { + if ( p_layout->n_layout == kbd_layout ) + { + m_aKeyboardName = p_layout->p_description; + break; + } + p_layout++; + } + } + } + } + close(kbd); + } + } +#else + int opcode, event, error; + int major = XkbMajorVersion, minor = XkbMinorVersion; + if( XkbQueryExtension( GetDisplay(), &opcode, &event,&error, &major, &minor ) ) + { + XkbDescPtr pXkbDesc = NULL; + // try X keyboard extension + if( (pXkbDesc = XkbGetKeyboard( GetDisplay(), XkbAllComponentsMask, XkbUseCoreKbd )) ) + { + const char* pAtom = NULL; + if( pXkbDesc->names->groups[0] ) + { + pAtom = XGetAtomName( GetDisplay(), pXkbDesc->names->groups[0] ); + m_aKeyboardName = pAtom; + XFree( (void*)pAtom ); + } + else + m_aKeyboardName = ""; +#if OSL_DEBUG_LEVEL > 1 +#define PRINT_ATOM( x ) { if( pXkbDesc->names->x ) { pAtom = XGetAtomName( GetDisplay(), pXkbDesc->names->x ); fprintf( stderr, "%s: %s\n", #x, pAtom ); XFree( (void*)pAtom ); } else fprintf( stderr, "%s: \n", #x ); } + + PRINT_ATOM( keycodes ); + PRINT_ATOM( geometry ); + PRINT_ATOM( symbols ); + PRINT_ATOM( types ); + PRINT_ATOM( compat ); + PRINT_ATOM( phys_symbols ); + +#define PRINT_ATOM_2( x ) { if( pXkbDesc->names->x[i] ) { pAtom = XGetAtomName( GetDisplay(), pXkbDesc->names->x[i] ); fprintf( stderr, "%s[%d]: %s\n", #x, i, pAtom ); XFree( (void*)pAtom ); } else fprintf( stderr, "%s[%d]: \n", #x, i ); } + int i; + for( i = 0; i < XkbNumVirtualMods; i++ ) + PRINT_ATOM_2( vmods ); + for( i = 0; i < XkbNumIndicators; i++ ) + PRINT_ATOM_2( indicators ); + for( i = 0; i < XkbNumKbdGroups; i++ ) + PRINT_ATOM_2( groups ); +#endif + XkbFreeKeyboard( pXkbDesc, XkbAllComponentsMask, True ); + } + } +#endif + if( ! m_aKeyboardName.Len() ) + m_aKeyboardName = ""; + } + return m_aKeyboardName.GetBuffer(); +} diff --git a/vcl/unx/generic/app/makefile.mk b/vcl/unx/generic/app/makefile.mk new file mode 100644 index 000000000000..bd7549945c7c --- /dev/null +++ b/vcl/unx/generic/app/makefile.mk @@ -0,0 +1,110 @@ +#************************************************************************* +# +# 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=vcl +TARGET=salapp +.INCLUDE : $(PRJ)$/util$/makefile.pmk + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk +.INCLUDE : $(PRJ)$/util$/makefile2.pmk + +# --- Files -------------------------------------------------------- + +.IF "$(GUIBASE)"!="unx" + +dummy: + @echo "Nothing to build for GUIBASE $(GUIBASE)" + +.ELSE # "$(GUIBASE)"!="unx" + +SLOFILES=\ + $(SLO)$/i18n_cb.obj \ + $(SLO)$/i18n_ic.obj \ + $(SLO)$/i18n_im.obj \ + $(SLO)$/i18n_xkb.obj \ + $(SLO)$/i18n_wrp.obj \ + $(SLO)$/i18n_status.obj \ + $(SLO)$/i18n_keysym.obj \ + $(SLO)$/saldata.obj \ + $(SLO)$/saltimer.obj \ + $(SLO)$/saldisp.obj \ + $(SLO)$/randrwrapper.obj \ + $(SLO)$/salinst.obj \ + $(SLO)$/salsys.obj \ + $(SLO)$/soicon.obj \ + $(SLO)$/sm.obj \ + $(SLO)$/keysymnames.obj \ + $(SLO)$/wmadaptor.obj + +EXCEPTIONSFILES=\ + $(SLO)$/wmadaptor.obj \ + $(SLO)$/saldata.obj \ + $(SLO)$/salinst.obj \ + $(SLO)$/saldisp.obj \ + $(SLO)$/i18n_status.obj \ + $(SLO)$/i18n_cb.obj \ + $(SLO)$/i18n_ic.obj \ + $(SLO)$/salsys.obj + + +.IF "$(ENABLE_RANDR)" != "" +CDEFS+=-DUSE_RANDR +.IF "$(XRANDR_DLOPEN)" == "FALSE" +CDEFS+=$(XRANDR_CFLAGS) +.ELSE +CDEFS+=-DXRANDR_DLOPEN +.ENDIF +.ENDIF + +.IF "$(USE_XINERAMA)" != "NO" +CDEFS+=-DUSE_XINERAMA +.IF "$(USE_XINERAMA_VERSION)" == "Xorg" +CDEFS+=-DUSE_XINERAMA_XORG +.ELIF "$(USE_XINERAMA_VERSION)" == "Xsun" +CDEFS+=-DUSE_XINERAMA_XSUN +.ELSE +# provide sensible default +.IF "$(OS)" != "SOLARIS" +CDEFS+=-DUSE_XINERAMA_XORG +.ELSE +CDEFS+=-DUSE_XINERAMA_XSUN +.ENDIF +.ENDIF +.ENDIF + +.ENDIF # "$(GUIBASE)"!="unx" + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk + +.INCLUDE : $(PRJ)$/util$/target.pmk + diff --git a/vcl/unx/generic/app/randrwrapper.cxx b/vcl/unx/generic/app/randrwrapper.cxx new file mode 100644 index 000000000000..e7f37c00e2ca --- /dev/null +++ b/vcl/unx/generic/app/randrwrapper.cxx @@ -0,0 +1,360 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ + +#ifdef USE_RANDR + +#include +#include +#include + +#include "osl/module.h" +#include "rtl/ustring.hxx" + +namespace +{ + +# ifdef XRANDR_DLOPEN + +class RandRWrapper +{ + oslModule m_pRandRLib; + + // function pointers + Bool(*m_pXRRQueryExtension)(Display*,int*,int*); + Status(*m_pXRRQueryVersion)(Display*,int*,int*); + XRRScreenConfiguration*(*m_pXRRGetScreenInfo)(Display*,Drawable); + void(*m_pXRRFreeScreenConfigInfo)(XRRScreenConfiguration*); + void(*m_pXRRSelectInput)(Display*,XLIB_Window,int); + int(*m_pXRRUpdateConfiguration)(XEvent*); + XRRScreenSize*(*m_pXRRSizes)(Display*,int,int*); + XRRScreenSize*(*m_pXRRConfigSizes)(XRRScreenConfiguration*,int*); + SizeID(*m_pXRRConfigCurrentConfiguration)(XRRScreenConfiguration*,Rotation*); + int(*m_pXRRRootToScreen)(Display*, XLIB_Window); + + bool m_bValid; + + void initFromModule(); + + RandRWrapper(Display*); + ~RandRWrapper(); +public: + static RandRWrapper& get(Display*); + static void releaseWrapper(); + + Bool XRRQueryExtension(Display* i_pDisp, int* o_event_base, int* o_error_base ) + { + Bool bRet = False; + if( m_bValid ) + bRet = m_pXRRQueryExtension( i_pDisp, o_event_base, o_error_base ); + return bRet; + } + Status XRRQueryVersion( Display* i_pDisp, int* o_major, int* o_minor ) + { + return m_bValid ? m_pXRRQueryVersion( i_pDisp, o_major, o_minor ) : 0; + } + XRRScreenConfiguration* XRRGetScreenInfo( Display* i_pDisp, Drawable i_aDrawable ) + { + return m_bValid ? m_pXRRGetScreenInfo( i_pDisp, i_aDrawable ) : NULL; + } + void XRRFreeScreenConfigInfo( XRRScreenConfiguration* i_pConfig ) + { + if( m_bValid ) + m_pXRRFreeScreenConfigInfo( i_pConfig ); + } + void XRRSelectInput( Display* i_pDisp, XLIB_Window i_window, int i_nMask ) + { + if( m_bValid ) + m_pXRRSelectInput( i_pDisp, i_window, i_nMask ); + } + int XRRUpdateConfiguration( XEvent* i_pEvent ) + { + return m_bValid ? m_pXRRUpdateConfiguration( i_pEvent ) : 0; + } + XRRScreenSize* XRRSizes( Display* i_pDisp, int i_screen, int* o_nscreens ) + { + return m_bValid ? m_pXRRSizes( i_pDisp, i_screen, o_nscreens ) : NULL; + } + XRRScreenSize* XRRConfigSizes( XRRScreenConfiguration* i_pConfig, int* o_nSizes ) + { + return m_bValid ? m_pXRRConfigSizes( i_pConfig, o_nSizes ) : NULL; + } + SizeID XRRConfigCurrentConfiguration( XRRScreenConfiguration* i_pConfig, Rotation* o_pRot ) + { + return m_bValid ? m_pXRRConfigCurrentConfiguration( i_pConfig, o_pRot ) : 0; + } + int XRRRootToScreen( Display *dpy, XLIB_Window root ) + { + return m_bValid ? m_pXRRRootToScreen( dpy, root ) : -1; + } +}; + +void RandRWrapper::initFromModule() +{ + m_pXRRQueryExtension = (Bool(*)(Display*,int*,int*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRQueryExtension" ); + m_pXRRQueryVersion = (Status(*)(Display*,int*,int*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRQueryVersion" ); + m_pXRRGetScreenInfo = (XRRScreenConfiguration*(*)(Display*,Drawable))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRGetScreenInfo" ); + m_pXRRFreeScreenConfigInfo = (void(*)(XRRScreenConfiguration*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRFreeScreenConfigInfo" ); + m_pXRRSelectInput = (void(*)(Display*,XLIB_Window,int))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRSelectInput" ); + m_pXRRUpdateConfiguration = (int(*)(XEvent*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRUpdateConfiguration" ); + m_pXRRSizes = (XRRScreenSize*(*)(Display*,int,int*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRSizes" ); + m_pXRRConfigSizes = (XRRScreenSize*(*)(XRRScreenConfiguration*,int*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRConfigSizes" ); + m_pXRRConfigCurrentConfiguration = (SizeID(*)(XRRScreenConfiguration*,Rotation*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRConfigCurrentConfiguration" ); + m_pXRRRootToScreen = (int(*)(Display*,XLIB_Window))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRRootToScreen" ); + + m_bValid = m_pXRRQueryExtension && + m_pXRRQueryVersion && + m_pXRRGetScreenInfo && + m_pXRRFreeScreenConfigInfo && + m_pXRRSelectInput && + m_pXRRUpdateConfiguration && + m_pXRRSizes && + m_pXRRConfigSizes && + m_pXRRConfigCurrentConfiguration && + m_pXRRRootToScreen + ; +} + +RandRWrapper::RandRWrapper( Display* pDisplay ) : + m_pRandRLib( NULL ), + m_pXRRQueryExtension( NULL ), + m_pXRRQueryVersion( NULL ), + m_pXRRGetScreenInfo( NULL ), + m_pXRRFreeScreenConfigInfo( NULL ), + m_pXRRSelectInput( NULL ), + m_pXRRUpdateConfiguration( NULL ), + m_pXRRSizes( NULL ), + m_pXRRConfigSizes( NULL ), + m_pXRRConfigCurrentConfiguration( NULL ), + m_pXRRRootToScreen( NULL ), + m_bValid( false ) +{ + // first try in process space (e.g. gtk links that ?) + initFromModule(); + if( ! m_bValid ) + { + rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libXrandr.so.2" ) ); + // load and resolve dependencies immediately + // rationale: there are older distributions where libXrandr.so.2 is not linked + // with libXext.so, resulting in a missing symbol and terminating the office + // obviously they expected libXext to be linked in global symbolspace (that is + // linked by the application), which is not the case with us (because we want + // to be able to run in headless mode even without an installed X11 library) + m_pRandRLib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_DEFAULT | SAL_LOADMODULE_NOW ); + initFromModule(); + } + if( m_bValid ) + { + int nEventBase = 0, nErrorBase = 0; + if( ! m_pXRRQueryExtension( pDisplay, &nEventBase, &nErrorBase ) ) + m_bValid = false; + } +} + +RandRWrapper::~RandRWrapper() +{ + if( m_pRandRLib ) + osl_unloadModule( m_pRandRLib ); +} + +static RandRWrapper* pWrapper = NULL; + +RandRWrapper& RandRWrapper::get( Display* i_pDisplay ) +{ + if( ! pWrapper ) + pWrapper = new RandRWrapper( i_pDisplay ); + return *pWrapper; +} + +void RandRWrapper::releaseWrapper() +{ + delete pWrapper; + pWrapper = NULL; +} + +# else + +class RandRWrapper +{ + bool m_bValid; + + RandRWrapper(Display*); +public: + static RandRWrapper& get(Display*); + static void releaseWrapper(); + + Bool XRRQueryExtension(Display* i_pDisp, int* o_event_base, int* o_error_base ) + { + Bool bRet = False; + if( m_bValid ) + bRet = ::XRRQueryExtension( i_pDisp, o_event_base, o_error_base ); + return bRet; + } + Status XRRQueryVersion( Display* i_pDisp, int* o_major, int* o_minor ) + { + return m_bValid ? ::XRRQueryVersion( i_pDisp, o_major, o_minor ) : 0; + } + XRRScreenConfiguration* XRRGetScreenInfo( Display* i_pDisp, Drawable i_aDrawable ) + { + return m_bValid ? ::XRRGetScreenInfo( i_pDisp, i_aDrawable ) : NULL; + } + void XRRFreeScreenConfigInfo( XRRScreenConfiguration* i_pConfig ) + { + if( m_bValid ) + ::XRRFreeScreenConfigInfo( i_pConfig ); + } + void XRRSelectInput( Display* i_pDisp, XLIB_Window i_window, int i_nMask ) + { + if( m_bValid ) + ::XRRSelectInput( i_pDisp, i_window, i_nMask ); + } + int XRRUpdateConfiguration( XEvent* i_pEvent ) + { + return m_bValid ? ::XRRUpdateConfiguration( i_pEvent ) : 0; + } + XRRScreenSize* XRRSizes( Display* i_pDisp, int i_screen, int* o_nscreens ) + { + return m_bValid ? ::XRRSizes( i_pDisp, i_screen, o_nscreens ) : NULL; + } + XRRScreenSize* XRRConfigSizes( XRRScreenConfiguration* i_pConfig, int* o_nSizes ) + { + return m_bValid ? ::XRRConfigSizes( i_pConfig, o_nSizes ) : NULL; + } + SizeID XRRConfigCurrentConfiguration( XRRScreenConfiguration* i_pConfig, Rotation* o_pRot ) + { + return m_bValid ? ::XRRConfigCurrentConfiguration( i_pConfig, o_pRot ) : 0; + } + int XRRRootToScreen( Display *dpy, XLIB_Window root ) + { + return m_bValid ? ::XRRRootToScreen( dpy, root ) : -1; + } +}; + +RandRWrapper::RandRWrapper( Display* pDisplay ) : + m_bValid( true ) +{ + int nEventBase = 0, nErrorBase = 0; + if( !XRRQueryExtension( pDisplay, &nEventBase, &nErrorBase ) ) + m_bValid = false; +} + +static RandRWrapper* pWrapper = NULL; + +RandRWrapper& RandRWrapper::get( Display* i_pDisplay ) +{ + if( ! pWrapper ) + pWrapper = new RandRWrapper( i_pDisplay ); + return *pWrapper; +} + +void RandRWrapper::releaseWrapper() +{ + delete pWrapper; + pWrapper = NULL; +} + +#endif + +} // namespace + +#endif + +#include "unx/saldisp.hxx" +#include "unx/salframe.h" +#if OSL_DEBUG_LEVEL > 1 +#include +#endif + +void SalDisplay::InitRandR( XLIB_Window aRoot ) const +{ + #ifdef USE_RANDR + if( m_bUseRandRWrapper ) + RandRWrapper::get( GetDisplay() ).XRRSelectInput( GetDisplay(), aRoot, RRScreenChangeNotifyMask ); + #else + (void)aRoot; + #endif +} + +void SalDisplay::DeInitRandR() +{ + #ifdef USE_RANDR + if( m_bUseRandRWrapper ) + RandRWrapper::releaseWrapper(); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "SalDisplay::DeInitRandR()\n" ); +#endif + #endif +} + +int SalDisplay::processRandREvent( XEvent* pEvent ) +{ + int nRet = 0; + #ifdef USE_RANDR + XConfigureEvent* pCnfEvent=(XConfigureEvent*)pEvent; + if( m_bUseRandRWrapper && pWrapper && pWrapper->XRRRootToScreen(GetDisplay(),pCnfEvent->window) != -1 ) + { + nRet = pWrapper->XRRUpdateConfiguration( pEvent ); + if( nRet == 1 && pEvent->type != ConfigureNotify) // this should then be a XRRScreenChangeNotifyEvent + { + // update screens + bool bNotify = false; + for( size_t i = 0; i < m_aScreens.size(); i++ ) + { + if( m_aScreens[i].m_bInit ) + { + XRRScreenConfiguration *pConfig = NULL; + XRRScreenSize *pSizes = NULL; + int nSizes = 0; + Rotation nRot = 0; + SizeID nId = 0; + + pConfig = pWrapper->XRRGetScreenInfo( GetDisplay(), m_aScreens[i].m_aRoot ); + nId = pWrapper->XRRConfigCurrentConfiguration( pConfig, &nRot ); + pSizes = pWrapper->XRRConfigSizes( pConfig, &nSizes ); + XRRScreenSize *pTargetSize = pSizes + nId; + + bNotify = bNotify || + m_aScreens[i].m_aSize.Width() != pTargetSize->width || + m_aScreens[i].m_aSize.Height() != pTargetSize->height; + + m_aScreens[i].m_aSize = Size( pTargetSize->width, pTargetSize->height ); + + pWrapper->XRRFreeScreenConfigInfo( pConfig ); + + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "screen %d changed to size %dx%d\n", (int)i, (int)pTargetSize->width, (int)pTargetSize->height ); + #endif + } + } + if( bNotify && ! m_aFrames.empty() ) + m_aFrames.front()->CallCallback( SALEVENT_DISPLAYCHANGED, 0 ); + } + } + #else + (void)pEvent; + #endif + return nRet; +} diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx new file mode 100644 index 000000000000..1b72d55e21c5 --- /dev/null +++ b/vcl/unx/generic/app/saldata.cxx @@ -0,0 +1,867 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#ifdef USE_XTOOLKIT +# define SAL_XT +#endif + +// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +#include +#include + +#include +#include +#include +#include // snprintf, seems not to be in namespace std on every platform +#include +#include +#include +#include +#ifdef SUN +#include +#endif +#ifdef AIX +#include +#endif +#ifdef FREEBSD +#include +#include +#include +#endif + +#include +#include + +#include "unx/Xproto.h" +#include "unx/saldisp.hxx" +#include "unx/saldata.hxx" +#include "unx/salframe.h" +#include "unx/sm.hxx" +#include "unx/i18n_im.hxx" +#include "unx/i18n_xkb.hxx" +#include "salinst.hxx" + +#include +#include +#include +#include +#include + +#include +#include + +// -=-= -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +#ifndef UNX +#ifndef SIGBUS +#define SIGBUS 10 +#endif +#ifndef SIGSEGV +#define SIGSEGV 11 +#endif +#ifndef SIGIOT +#define SIGIOT SIGABRT +#endif +#endif + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +static const struct timeval noyield__ = { 0, 0 }; +static const struct timeval yield__ = { 0, 10000 }; + +static const char* XRequest[] = { + // see /usr/lib/X11/XErrorDB, /usr/openwin/lib/XErrorDB ... + NULL, + "X_CreateWindow", + "X_ChangeWindowAttributes", + "X_GetWindowAttributes", + "X_DestroyWindow", + "X_DestroySubwindows", + "X_ChangeSaveSet", + "X_ReparentWindow", + "X_MapWindow", + "X_MapSubwindows", + "X_UnmapWindow", + "X_UnmapSubwindows", + "X_ConfigureWindow", + "X_CirculateWindow", + "X_GetGeometry", + "X_QueryTree", + "X_InternAtom", + "X_GetAtomName", + "X_ChangeProperty", + "X_DeleteProperty", + "X_GetProperty", + "X_ListProperties", + "X_SetSelectionOwner", + "X_GetSelectionOwner", + "X_ConvertSelection", + "X_SendEvent", + "X_GrabPointer", + "X_UngrabPointer", + "X_GrabButton", + "X_UngrabButton", + "X_ChangeActivePointerGrab", + "X_GrabKeyboard", + "X_UngrabKeyboard", + "X_GrabKey", + "X_UngrabKey", + "X_AllowEvents", + "X_GrabServer", + "X_UngrabServer", + "X_QueryPointer", + "X_GetMotionEvents", + "X_TranslateCoords", + "X_WarpPointer", + "X_SetInputFocus", + "X_GetInputFocus", + "X_QueryKeymap", + "X_OpenFont", + "X_CloseFont", + "X_QueryFont", + "X_QueryTextExtents", + "X_ListFonts", + "X_ListFontsWithInfo", + "X_SetFontPath", + "X_GetFontPath", + "X_CreatePixmap", + "X_FreePixmap", + "X_CreateGC", + "X_ChangeGC", + "X_CopyGC", + "X_SetDashes", + "X_SetClipRectangles", + "X_FreeGC", + "X_ClearArea", + "X_CopyArea", + "X_CopyPlane", + "X_PolyPoint", + "X_PolyLine", + "X_PolySegment", + "X_PolyRectangle", + "X_PolyArc", + "X_FillPoly", + "X_PolyFillRectangle", + "X_PolyFillArc", + "X_PutImage", + "X_GetImage", + "X_PolyText8", + "X_PolyText16", + "X_ImageText8", + "X_ImageText16", + "X_CreateColormap", + "X_FreeColormap", + "X_CopyColormapAndFree", + "X_InstallColormap", + "X_UninstallColormap", + "X_ListInstalledColormaps", + "X_AllocColor", + "X_AllocNamedColor", + "X_AllocColorCells", + "X_AllocColorPlanes", + "X_FreeColors", + "X_StoreColors", + "X_StoreNamedColor", + "X_QueryColors", + "X_LookupColor", + "X_CreateCursor", + "X_CreateGlyphCursor", + "X_FreeCursor", + "X_RecolorCursor", + "X_QueryBestSize", + "X_QueryExtension", + "X_ListExtensions", + "X_ChangeKeyboardMapping", + "X_GetKeyboardMapping", + "X_ChangeKeyboardControl", + "X_GetKeyboardControl", + "X_Bell", + "X_ChangePointerControl", + "X_GetPointerControl", + "X_SetScreenSaver", + "X_GetScreenSaver", + "X_ChangeHosts", + "X_ListHosts", + "X_SetAccessControl", + "X_SetCloseDownMode", + "X_KillClient", + "X_RotateProperties", + "X_ForceScreenSaver", + "X_SetPointerMapping", + "X_GetPointerMapping", + "X_SetModifierMapping", + "X_GetModifierMapping", + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + "X_NoOperation" +}; + +// -=-= C statics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +int X11SalData::XErrorHdl( Display *pDisplay, XErrorEvent *pEvent ) +{ + GetX11SalData()->XError( pDisplay, pEvent ); + return 0; +} + +int X11SalData::XIOErrorHdl( Display * ) +{ + /* #106197# hack: until a real shutdown procedure exists + * _exit ASAP + */ + if( ImplGetSVData()->maAppData.mbAppQuit ) + _exit(1); + + // really bad hack + if( ! SessionManagerClient::checkDocumentsSaved() ) + /* oslSignalAction eToDo = */ osl_raiseSignal (OSL_SIGNAL_USER_X11SUBSYSTEMERROR, NULL); + + std::fprintf( stderr, "X IO Error\n" ); + std::fflush( stdout ); + std::fflush( stderr ); + + /* #106197# the same reasons to use _exit instead of exit in salmain + * do apply here. Since there is nothing to be done after an XIO + * error we have to _exit immediately. + */ + _exit(0); + return 0; +} + +// -=-= SalData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +#include + +X11SalData::X11SalData() +{ + bNoExceptions_ = !!getenv( "SAL_NOSEGV" ); + + pXLib_ = NULL; + m_pSalDisplay = NULL; + m_pInstance = NULL; + m_pPlugin = NULL; + + hMainThread_ = pthread_self(); + osl_getLocalHostname( &maLocalHostName.pData ); +} + +X11SalData::~X11SalData() +{ + DeleteDisplay(); +} + +void X11SalData::DeleteDisplay() +{ + delete m_pSalDisplay; + m_pSalDisplay = NULL; + delete pXLib_; + pXLib_ = NULL; +} + +void X11SalData::Init() +{ + pXLib_ = new SalXLib(); + pXLib_->Init(); +} + +void X11SalData::initNWF( void ) +{ +} + +void X11SalData::deInitNWF( void ) +{ +} + +// -=-= SalXLib =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +SalXLib::SalXLib() +{ + m_aTimeout.tv_sec = 0; + m_aTimeout.tv_usec = 0; + m_nTimeoutMS = 0; + + nFDs_ = 0; + FD_ZERO( &aReadFDS_ ); + FD_ZERO( &aExceptionFDS_ ); + + m_pTimeoutFDS[0] = m_pTimeoutFDS[1] = -1; + if (pipe (m_pTimeoutFDS) != -1) + { + // initialize 'wakeup' pipe. + int flags; + + // set close-on-exec descriptor flag. + if ((flags = fcntl (m_pTimeoutFDS[0], F_GETFD)) != -1) + { + flags |= FD_CLOEXEC; + fcntl (m_pTimeoutFDS[0], F_SETFD, flags); + } + if ((flags = fcntl (m_pTimeoutFDS[1], F_GETFD)) != -1) + { + flags |= FD_CLOEXEC; + fcntl (m_pTimeoutFDS[1], F_SETFD, flags); + } + + // set non-blocking I/O flag. + if ((flags = fcntl (m_pTimeoutFDS[0], F_GETFL)) != -1) + { + flags |= O_NONBLOCK; + fcntl (m_pTimeoutFDS[0], F_SETFL, flags); + } + if ((flags = fcntl (m_pTimeoutFDS[1], F_GETFL)) != -1) + { + flags |= O_NONBLOCK; + fcntl (m_pTimeoutFDS[1], F_SETFL, flags); + } + + // insert [0] into read descriptor set. + FD_SET( m_pTimeoutFDS[0], &aReadFDS_ ); + nFDs_ = m_pTimeoutFDS[0] + 1; + } + + m_bHaveSystemChildFrames = false; + m_aOrigXIOErrorHandler = XSetIOErrorHandler ( (XIOErrorHandler)X11SalData::XIOErrorHdl ); + PushXErrorLevel( !!getenv( "SAL_IGNOREXERRORS" ) ); +} + +SalXLib::~SalXLib() +{ + // close 'wakeup' pipe. + close (m_pTimeoutFDS[0]); + close (m_pTimeoutFDS[1]); + + PopXErrorLevel(); + XSetIOErrorHandler (m_aOrigXIOErrorHandler); +} + +void SalXLib::PushXErrorLevel( bool bIgnore ) +{ + m_aXErrorHandlerStack.push_back( XErrorStackEntry() ); + XErrorStackEntry& rEnt = m_aXErrorHandlerStack.back(); + rEnt.m_bWas = false; + rEnt.m_bIgnore = bIgnore; + rEnt.m_nLastErrorRequest = 0; + rEnt.m_aHandler = XSetErrorHandler( (XErrorHandler)X11SalData::XErrorHdl ); +} + +void SalXLib::PopXErrorLevel() +{ + if( m_aXErrorHandlerStack.size() ) + { + XSetErrorHandler( m_aXErrorHandlerStack.back().m_aHandler ); + m_aXErrorHandlerStack.pop_back(); + } +} + +void SalXLib::Init() +{ + SalI18N_InputMethod* pInputMethod = new SalI18N_InputMethod; + pInputMethod->SetLocale(); + XrmInitialize(); + + /* + * open connection to X11 Display + * try in this order: + * o -display command line parameter, + * o $DISPLAY environment variable + * o default display + */ + + Display *pDisp = NULL; + + // is there a -display command line parameter? + vos::OExtCommandLine aCommandLine; + sal_uInt32 nParams = aCommandLine.getCommandArgCount(); + rtl::OUString aParam; + rtl::OString aDisplay; + for (USHORT i=0; iCreateMethod( pDisp ); + pInputMethod->AddConnectionWatch( pDisp, (void*)this ); + pSalDisplay->SetInputMethod( pInputMethod ); + + PushXErrorLevel( true ); + SalI18N_KeyboardExtension *pKbdExtension = new SalI18N_KeyboardExtension( pDisp ); + XSync( pDisp, False ); + + pKbdExtension->UseExtension( ! HasXErrorOccured() ); + PopXErrorLevel(); + + pSalDisplay->SetKbdExtension( pKbdExtension ); +} + +extern "C" { +void EmitFontpathWarning( void ) +{ + static Bool bOnce = False; + if ( !bOnce ) + { + bOnce = True; + std::fprintf( stderr, "Please verify your fontpath settings\n" + "\t(See \"man xset\" for details" + " or ask your system administrator)\n" ); + } +} + +} /* extern "C" */ + +static void PrintXError( Display *pDisplay, XErrorEvent *pEvent ) +{ + char msg[ 120 ] = ""; +#if ! ( defined LINUX && defined PPC ) + XGetErrorText( pDisplay, pEvent->error_code, msg, sizeof( msg ) ); +#endif + std::fprintf( stderr, "X-Error: %s\n", msg ); + if( pEvent->request_code < capacityof( XRequest ) ) + { + const char* pName = XRequest[pEvent->request_code]; + if( !pName ) + pName = "BadRequest?"; + std::fprintf( stderr, "\tMajor opcode: %d (%s)\n", pEvent->request_code, pName ); + } + else + { + std::fprintf( stderr, "\tMajor opcode: %d\n", pEvent->request_code ); + // TODO: also display extension name? + std::fprintf( stderr, "\tMinor opcode: %d\n", pEvent->minor_code ); + } + + std::fprintf( stderr, "\tResource ID: 0x%lx\n", + pEvent->resourceid ); + std::fprintf( stderr, "\tSerial No: %ld (%ld)\n", + pEvent->serial, LastKnownRequestProcessed(pDisplay) ); + + if( !getenv( "SAL_SYNCHRONIZE" ) ) + { + std::fprintf( stderr, "These errors are reported asynchronously,\n"); + std::fprintf( stderr, "set environment variable SAL_SYNCHRONIZE to 1 to help debugging\n"); + } + + std::fflush( stdout ); + std::fflush( stderr ); +} + +void SalXLib::XError( Display *pDisplay, XErrorEvent *pEvent ) +{ + if( m_bHaveSystemChildFrames ) + return; + + if( ! m_aXErrorHandlerStack.back().m_bIgnore ) + { + if ( (pEvent->error_code == BadAlloc) + && (pEvent->request_code == X_OpenFont) ) + { + static Bool bOnce = False; + if ( !bOnce ) + { + std::fprintf(stderr, "X-Error occured in a request for X_OpenFont\n"); + EmitFontpathWarning(); + + bOnce = True ; + } + return; + } + /* ignore + * X_SetInputFocus: it's a hint only anyway + * X_GetProperty: this is part of the XGetWindowProperty call and will + * be handled by the return value of that function + */ + else if( pEvent->request_code == X_SetInputFocus || + pEvent->request_code == X_GetProperty + ) + return; + + + if( pDisplay != GetX11SalData()->GetDisplay()->GetDisplay() ) + return; + + PrintXError( pDisplay, pEvent ); + + oslSignalAction eToDo = osl_raiseSignal (OSL_SIGNAL_USER_X11SUBSYSTEMERROR, NULL); + switch (eToDo) + { + case osl_Signal_ActIgnore : + return; + case osl_Signal_ActAbortApp : + abort(); + case osl_Signal_ActKillApp : + exit(0); + case osl_Signal_ActCallNextHdl : + break; + default : + break; + } + + } + + m_aXErrorHandlerStack.back().m_bWas = true; +} + +struct YieldEntry +{ + YieldEntry* next; // pointer to next entry + int fd; // file descriptor for reading + void* data; // data for predicate and callback + YieldFunc pending; // predicate (determins pending events) + YieldFunc queued; // read and queue up events + YieldFunc handle; // handle pending events + + inline int HasPendingEvent() const { return pending( fd, data ); } + inline int IsEventQueued() const { return queued( fd, data ); } + inline void HandleNextEvent() const { handle( fd, data ); } +}; + +#define MAX_NUM_DESCRIPTORS 128 + +static YieldEntry yieldTable[ MAX_NUM_DESCRIPTORS ]; + +void SalXLib::Insert( int nFD, void* data, + YieldFunc pending, + YieldFunc queued, + YieldFunc handle ) +{ + DBG_ASSERT( nFD, "can not insert stdin descriptor" ); + DBG_ASSERT( !yieldTable[nFD].fd, "SalXLib::Insert fd twice" ); + + yieldTable[nFD].fd = nFD; + yieldTable[nFD].data = data; + yieldTable[nFD].pending = pending; + yieldTable[nFD].queued = queued; + yieldTable[nFD].handle = handle; + + FD_SET( nFD, &aReadFDS_ ); + FD_SET( nFD, &aExceptionFDS_ ); + + if( nFD >= nFDs_ ) + nFDs_ = nFD + 1; +} + +void SalXLib::Remove( int nFD ) +{ + FD_CLR( nFD, &aReadFDS_ ); + FD_CLR( nFD, &aExceptionFDS_ ); + + yieldTable[nFD].fd = 0; + + if ( nFD == nFDs_ ) + { + for ( nFD = nFDs_ - 1; + nFD >= 0 && !yieldTable[nFD].fd; + nFD-- ) ; + + nFDs_ = nFD + 1; + } +} + +bool SalXLib::CheckTimeout( bool bExecuteTimers ) +{ + bool bRet = false; + if( m_aTimeout.tv_sec ) // timer is started + { + timeval aTimeOfDay; + gettimeofday( &aTimeOfDay, 0 ); + if( aTimeOfDay >= m_aTimeout ) + { + bRet = true; + if( bExecuteTimers ) + { + // timed out, update timeout + m_aTimeout = aTimeOfDay; + /* + * #107827# autorestart immediately, will be stopped (or set + * to different value in notify hdl if necessary; + * CheckTimeout should return false while + * timers are being dispatched. + */ + m_aTimeout += m_nTimeoutMS; + // notify + GetX11SalData()->Timeout(); + } + } + } + return bRet; +} + +void SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents ) +{ + // check for timeouts here if you want to make screenshots + static char* p_prioritize_timer = getenv ("SAL_HIGHPRIORITY_REPAINT"); + if (p_prioritize_timer != NULL) + CheckTimeout(); + + // first, check for already queued events. + for ( int nFD = 0; nFD < nFDs_; nFD++ ) + { + YieldEntry* pEntry = &(yieldTable[nFD]); + if ( pEntry->fd ) + { + DBG_ASSERT( nFD == pEntry->fd, "wrong fd in Yield()" ); + if ( pEntry->HasPendingEvent() ) + { + pEntry->HandleNextEvent(); + // #63862# da jetzt alle user-events ueber die interne + // queue kommen, wird die Kontrolle analog zum select + // gesteuerten Zweig einmal bei bWait abgegeben + + /* #i9277# do not reschedule since performance gets down the + the drain under heavy load + YieldMutexReleaser aReleaser; + if ( bWait ) osl_yieldThread(); + */ + + return; + } + } + } + + // next, select with or without timeout according to bWait. + int nFDs = nFDs_; + fd_set ReadFDS = aReadFDS_; + fd_set ExceptionFDS = aExceptionFDS_; + int nFound = 0; + + timeval Timeout = noyield__; + timeval *pTimeout = &Timeout; + + if (bWait) + { + pTimeout = 0; + if (m_aTimeout.tv_sec) // Timer is started. + { + // determine remaining timeout. + gettimeofday (&Timeout, 0); + Timeout = m_aTimeout - Timeout; + if (yield__ >= Timeout) + { + // guard against micro timeout. + Timeout = yield__; + } + pTimeout = &Timeout; + } + } + + { + // release YieldMutex (and re-acquire at block end) + YieldMutexReleaser aReleaser; + nFound = select( nFDs, &ReadFDS, NULL, &ExceptionFDS, pTimeout ); + } + if( nFound < 0 ) // error + { +#ifdef DBG_UTIL + std::fprintf( stderr, "SalXLib::Yield e=%d f=%d\n", errno, nFound ); +#endif + if( EINTR == errno ) + { + errno = 0; + } + } + + // usually handle timeouts here (as in 5.2) + if (p_prioritize_timer == NULL) + CheckTimeout(); + + // handle wakeup events. + if ((nFound > 0) && (FD_ISSET(m_pTimeoutFDS[0], &ReadFDS))) + { + int buffer; + while (read (m_pTimeoutFDS[0], &buffer, sizeof(buffer)) > 0) + continue; + nFound -= 1; + } + + // handle other events. + if( nFound > 0 ) + { + // now we are in the protected section ! + // recall select if we have acquired fd's, ready for reading, + + struct timeval noTimeout = { 0, 0 }; + nFound = select( nFDs_, &ReadFDS, NULL, + &ExceptionFDS, &noTimeout ); + + // someone-else has done the job for us + if (nFound == 0) + return; + + for ( int nFD = 0; nFD < nFDs_; nFD++ ) + { + YieldEntry* pEntry = &(yieldTable[nFD]); + if ( pEntry->fd ) + { + if ( FD_ISSET( nFD, &ExceptionFDS ) ) { +#if OSL_DEBUG_LEVEL > 1 + std::fprintf( stderr, "SalXLib::Yield exception\n" ); +#endif + nFound--; + } + if ( FD_ISSET( nFD, &ReadFDS ) ) + { + int nMaxEvents = bHandleAllCurrentEvents ? 100 : 1; + for( int i = 0; pEntry->IsEventQueued() && i < nMaxEvents; i++ ) + { + pEntry->HandleNextEvent(); + // if a recursive call has done the job + // so abort here + } + nFound--; + } + } + } + } +} + +void SalXLib::Wakeup() +{ + write (m_pTimeoutFDS[1], "", 1); +} + +void SalXLib::PostUserEvent() +{ + Wakeup(); +} + +const char* X11SalData::getFrameResName() +{ + /* according to ICCCM: + * first search command line for -name parameter + * then try RESOURCE_NAME environment variable + * then use argv[0] stripped by directories + */ + static rtl::OStringBuffer aResName; + if( !aResName.getLength() ) + { + int nArgs = osl_getCommandArgCount(); + for( int n = 0; n < nArgs-1; n++ ) + { + rtl::OUString aArg; + if( ! osl_getCommandArg( n, &aArg.pData ) && + aArg.equalsIgnoreAsciiCaseAscii( "-name" ) && + ! osl_getCommandArg( n+1, &aArg.pData ) ) + { + aResName.append( rtl::OUStringToOString( aArg, osl_getThreadTextEncoding() ) ); + break; + } + } + if( !aResName.getLength() ) + { + const char* pEnv = getenv( "RESOURCE_NAME" ); + if( pEnv && *pEnv ) + aResName.append( pEnv ); + } + if( !aResName.getLength() ) + aResName.append( "VCLSalFrame" ); + } + return aResName.getStr(); +} + +const char* X11SalData::getFrameClassName() +{ + static rtl::OStringBuffer aClassName; + if( !aClassName.getLength() ) + { + rtl::OUString aIni, aProduct; + rtl::Bootstrap::get( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BRAND_BASE_DIR" ) ), aIni ); + aIni += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/program/" SAL_CONFIGFILE( "bootstrap" ) ) ); + rtl::Bootstrap aBootstrap( aIni ); + aBootstrap.getFrom( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ProductKey" ) ), aProduct ); + + if( aProduct.getLength() ) + aClassName.append( rtl::OUStringToOString( aProduct, osl_getThreadTextEncoding() ) ); + else + aClassName.append( "VCLSalFrame" ); + } + return aClassName.getStr(); +} + +rtl::OString X11SalData::getFrameResName( SalExtStyle nStyle ) +{ + rtl::OStringBuffer aBuf( 64 ); + aBuf.append( getFrameResName() ); + if( (nStyle & SAL_FRAME_EXT_STYLE_DOCUMENT) ) + aBuf.append( ".DocumentWindow" ); + + return aBuf.makeStringAndClear(); +} diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx new file mode 100644 index 000000000000..923d3d3e9ac4 --- /dev/null +++ b/vcl/unx/generic/app/saldisp.cxx @@ -0,0 +1,3435 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#define SAL_XT + +// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(SOLARIS) +#include +#include +#endif + +#include +#include +#include "unx/x11_cursors/salcursors.h" +#include "unx/x11_cursors/invert50.h" +#ifdef SOLARIS +#define XK_KOREAN +#endif +#include + +#include + +#ifdef USE_XINERAMA +#ifdef USE_XINERAMA_XORG +#include +#elif defined USE_XINERAMA_XSUN +#if defined(SOLARIS) && defined(INTEL) // missing extension header in standard installation +#define MAXFRAMEBUFFERS 16 +Bool XineramaGetState(Display*, int); +Status XineramaGetInfo(Display*, int, XRectangle*, unsigned char*, int*); +#else +#include +#endif +#else +#error USE_XINERAMA but no xinerama version +#endif +#endif + +#include + +#include +#include +#include "unx/i18n_im.hxx" +#include "unx/i18n_xkb.hxx" +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef _OSL_THREADMUTEX_H_ +#include +#endif +#include +#include +#include +#include + +#include +#include + +using namespace rtl; +using namespace vcl_sal; + +// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +#define PSEUDOCOLOR12 +#define PSEUDOCOLOR8 +#define TRUECOLOR24 +#define TRUECOLOR16 +#define TRUECOLOR15 +#define TRUECOLOR12 +#define TRUECOLOR8 + +#define SALCOLOR_WHITE MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF ) +#define SALCOLOR_BLACK MAKE_SALCOLOR( 0x00, 0x00, 0x00 ) + +// -=-= Prototyps =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-= static variables -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +static const char* const VisualClassName[] = { + "StaticGray", + "GrayScale", + "StaticColor", + "PseudoColor", + "TrueColor", + "DirectColor" +}; + +static const char* const EventNames[] = +{ + NULL, + NULL, + "KeyPress", + "KeyRelease", + "ButtonPress", + "ButtonRelease", + "MotionNotify", + "EnterNotify", + "LeaveNotify", + "FocusIn", + "FocusOut", + "KeymapNotify", + "Expose", + "GraphicsExpose", + "NoExpose", + "VisibilityNotify", + "CreateNotify", + "DestroyNotify", + "UnmapNotify", + "MapNotify", + "MapRequest", + "ReparentNotify", + "ConfigureNotify", + "ConfigureRequest", + "GravityNotify", + "ResizeRequest", + "CirculateNotify", + "CirculateRequest", + "PropertyNotify", + "SelectionClear", + "SelectionRequest", + "SelectionNotify", + "ColormapNotify", + "ClientMessage", + "MappingNotify" +}; + +// -=-= global inline =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +inline const char *Null( const char *p ) { return p ? p : ""; } +inline const char *GetEnv( const char *p ) { return Null( getenv( p ) ); } +inline const char *KeyStr( KeySym n ) { return Null( XKeysymToString( n ) ); } + +inline const char *GetAtomName( Display *d, Atom a ) +{ return Null( XGetAtomName( d, a ) ); } + +inline double Hypothenuse( long w, long h ) +{ return sqrt( (double)((w*w)+(h*h)) ); } + +inline int ColorDiff( int r, int g, int b ) +{ return (r*r)+(g*g)+(b*b); } + +inline int ColorDiff( SalColor c1, int r, int g, int b ) +{ return ColorDiff( (int)SALCOLOR_RED (c1)-r, + (int)SALCOLOR_GREEN(c1)-g, + (int)SALCOLOR_BLUE (c1)-b ); } + +// -=-= global functions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +static int sal_Shift( Pixel nMask ) +{ + int i = 24; + if( nMask < 0x00010000 ) { nMask <<= 16; i -= 16; } + if( nMask < 0x01000000 ) { nMask <<= 8; i -= 8; } + if( nMask < 0x10000000 ) { nMask <<= 4; i -= 4; } + if( nMask < 0x40000000 ) { nMask <<= 2; i -= 2; } + if( nMask < 0x80000000 ) { nMask <<= 1; i -= 1; } + return i; +} + +static int sal_significantBits( Pixel nMask ) +{ + int nRotate = sizeof(Pixel)*4; + int nBits = 0; + while( nRotate-- ) + { + if( nMask & 1 ) + nBits++; + nMask >>= 1; + } + return nBits; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +static BOOL sal_GetVisualInfo( Display *pDisplay, XID nVID, XVisualInfo &rVI ) +{ + int nInfos; + XVisualInfo aTemplate; + XVisualInfo*pInfos; + + aTemplate.visualid = nVID; + + pInfos = XGetVisualInfo( pDisplay, VisualIDMask, &aTemplate, &nInfos ); + if( !pInfos ) + return FALSE; + + rVI = *pInfos; + XFree( pInfos ); + + DBG_ASSERT( rVI.visualid == nVID, + "sal_GetVisualInfo: could not get correct visual by visualId" ); + return TRUE; +} + +// --------------------------------------------------------------------------- + +// check wether displaystring is in format N.M or N. or just N +// with N and M beeing natural numbers +static BOOL +sal_IsDisplayNumber( const char *pDisplayString ) +{ + if ( ! isdigit(*pDisplayString) ) + return FALSE; + while ( isdigit(*(++pDisplayString)) ) + ; /* do nothing */ + + if ( *pDisplayString == '.' ) + { + while ( isdigit(*(++pDisplayString)) ) + ; /* do nothing */ + } + + return (*pDisplayString == '\0'); +} + +// check whether host1 and host2 point to the same ip address +static BOOL +sal_EqualHosts( const OUString& Host1, const OUString& Host2) +{ + oslSocketAddr pHostAddr1; + oslSocketAddr pHostAddr2; + BOOL bEqualAddress = FALSE; + + if ( Host1.toChar() >= '0' && Host1.toChar() <= '9' ) + pHostAddr1 = osl_createInetSocketAddr( Host1.pData, 0 ); + else + pHostAddr1 = osl_resolveHostname( Host1.pData ); + + if ( Host2.toChar() >= '0' && Host2.toChar() <= '9' ) + pHostAddr2 = osl_createInetSocketAddr( Host2.pData, 0 ); + else + pHostAddr2 = osl_resolveHostname( Host2.pData ); + + if( pHostAddr1 && pHostAddr2 ) + bEqualAddress = osl_isEqualSocketAddr( pHostAddr1, pHostAddr2 ) ? TRUE : FALSE; + + if( pHostAddr1 ) + osl_destroySocketAddr( pHostAddr1 ); + if( pHostAddr2 ) + osl_destroySocketAddr( pHostAddr2 ); + + return bEqualAddress; +} + +static BOOL +sal_IsLocalDisplay( Display *pDisplay ) +{ + const char *pDisplayString = DisplayString( pDisplay ); + + // no string, no idea + if ( pDisplayString == NULL || pDisplayString[ 0 ] == '\0') + return FALSE; + + // check for ":x.y" + if ( pDisplayString[ 0 ] == ':' ) + return sal_IsDisplayNumber( pDisplayString + 1 ); + + // check for fixed token which all mean localhost:x.y + const char pLocal[] = "localhost:"; + const int nLocalLen = sizeof(pLocal) - 1; + if ( strncmp(pDisplayString, pLocal, nLocalLen) == 0 ) + return sal_IsDisplayNumber( pDisplayString + nLocalLen ); + + const char pUnix[] = "unix:"; + const int nUnixLen = sizeof(pUnix) - 1; + if ( strncmp(pDisplayString, pUnix, nUnixLen) == 0 ) + return sal_IsDisplayNumber( pDisplayString + nUnixLen ); + + const char pLoopback[] = "127.0.0.1:"; + const int nLoopbackLen= sizeof(pLoopback) - 1; + if ( strncmp(pDisplayString, pLoopback, nLoopbackLen) == 0 ) + return sal_IsDisplayNumber( pDisplayString + nLoopbackLen ); + + // compare local hostname to displaystring, both may be ip address or + // hostname + BOOL bEqual = FALSE; + char *pDisplayHost = strdup( pDisplayString ); + char *pPtr = strrchr( pDisplayHost, ':' ); + + if( pPtr != NULL ) + { + const OUString& rLocalHostname( GetX11SalData()->GetLocalHostName() ); + if( rLocalHostname.getLength() ) + { + *pPtr = '\0'; + OUString aDisplayHostname( pDisplayHost, strlen( pDisplayHost ), osl_getThreadTextEncoding() ); + bEqual = sal_EqualHosts( rLocalHostname, aDisplayHostname ); + bEqual = bEqual && sal_IsDisplayNumber( pPtr + 1 ); + } + } + free( pDisplayHost ); + + return bEqual; +} + +// --------------------------------------------------------------------------- +// IsLocal means soffice is running on the same host as the xserver +// since it is not called very often and sal_IsLocalDisplay() is relative +// expensive bLocal_ is initialized on first call + +BOOL SalDisplay::IsLocal() +{ + if ( ! mbLocalIsValid ) + { + bLocal_ = sal_IsLocalDisplay( pDisp_ ); + mbLocalIsValid = TRUE; + } + return (BOOL)bLocal_; +} + +// --------------------------------------------------------------------------- +extern "C" srv_vendor_t +sal_GetServerVendor( Display *p_display ) +{ + typedef struct { + srv_vendor_t e_vendor; // vendor as enum + const char *p_name; // vendor name as returned by VendorString() + unsigned int n_len; // number of chars to compare + } vendor_t; + + const vendor_t p_vendorlist[] = { + { vendor_xfree, "The XFree86 Project, Inc", 13 }, + { vendor_sun, "Sun Microsystems, Inc.", 10 }, + { vendor_attachmate, "Attachmate Corporation", 10 }, + { vendor_excursion, + "DECWINDOWS DigitalEquipmentCorporation, eXcursion", 42 }, + { vendor_hp, "Hewlett-Packard Company", 17 }, + { vendor_hummingbird, "Hummingbird Communications Ltd.", 11 }, + { vendor_ibm, "International Business Machines", 24 }, + { vendor_sgi, "Silicon Graphics", 9 }, + { vendor_sco, "The Santa Cruz Operation", 16 }, + { vendor_xinside, "X Inside Inc.", 10 }, + // allways the last entry: vendor_none to indicate eol + { vendor_none, NULL, 0 }, + }; + + // handle regular server vendors + char *p_name = ServerVendor( p_display ); + vendor_t *p_vendor; + for (p_vendor = const_cast(p_vendorlist); p_vendor->e_vendor != vendor_none; p_vendor++) + { + if ( strncmp (p_name, p_vendor->p_name, p_vendor->n_len) == 0 ) + return p_vendor->e_vendor; + } + + // vendor not found in list + return vendor_unknown; +} + +static sal_Bool sal_IsTrustedSolaris (Display *p_display) +{ + int n_numextensions = 0; + char **p_extensions = XListExtensions (p_display, &n_numextensions); + sal_Bool b_is = sal_False; + + if (p_extensions != NULL) + { + for (int i = 0; !b_is && i < n_numextensions; i++) + b_is = (strcmp (p_extensions[i], "SUN_TSOL") == 0); + XFreeExtensionList (p_extensions); + } + + return b_is; +} + +// -=-= SalDisplay -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +BOOL SalDisplay::BestVisual( Display *pDisplay, + int nScreen, + XVisualInfo &rVI ) +{ + VisualID nDefVID = XVisualIDFromVisual( DefaultVisual( pDisplay, nScreen ) ); + VisualID nVID = 0; + char *pVID = getenv( "SAL_VISUAL" ); + if( pVID ) + sscanf( pVID, "%li", &nVID ); + + if( nVID && sal_GetVisualInfo( pDisplay, nVID, rVI ) ) + return rVI.visualid == nDefVID; + + XVisualInfo aVI; + aVI.screen = nScreen; + // get all visuals + int nVisuals; + XVisualInfo* pVInfos = XGetVisualInfo( pDisplay, VisualScreenMask, + &aVI, &nVisuals ); + // pVInfos should contain at least one visual, otherwise + // we're in trouble + int* pWeight = (int*)alloca( sizeof(int)*nVisuals ); + int i; + for( i = 0; i < nVisuals; i++ ) + { + BOOL bUsable = FALSE; + int nTrueColor = 1; + + if ( pVInfos[i].screen != nScreen ) + { + bUsable = FALSE; + } + else + if( pVInfos[i].c_class == TrueColor ) + { + nTrueColor = 2048; + if( pVInfos[i].depth == 24 ) + bUsable = TRUE; +#ifdef TRUECOLOR8 + else if( pVInfos[i].depth == 8 ) + { + nTrueColor = -1; // strongly discourage 8 bit true color + bUsable = TRUE; + } +#endif +#ifdef TRUECOLOR15 + else if( pVInfos[i].depth == 15 ) + bUsable = TRUE; +#endif +#ifdef TRUECOLOR16 + else if( pVInfos[i].depth == 16 ) + bUsable = TRUE; +#endif +#ifdef TRUECOLOR32 + else if( pVInfos[i].depth == 32 ) + { + nTrueColor = 256; + // we do not have use for an alpha channel + // better use a 24 or 16 bit truecolor visual if possible + bUsable = TRUE; + } +#endif + } + else if( pVInfos[i].c_class == PseudoColor ) + { + if( pVInfos[i].depth <= 8 ) + bUsable = TRUE; +#ifdef PSEUDOCOLOR12 + else if( pVInfos[i].depth == 12 ) + bUsable = TRUE; +#endif + } + pWeight[ i ] = bUsable ? nTrueColor*pVInfos[i].depth : -1024; + pWeight[ i ] -= pVInfos[ i ].visualid; + } + + int nBestVisual = 0; + int nBestWeight = -1024; + for( i = 0; i < nVisuals; i++ ) + { + if( pWeight[ i ] > nBestWeight ) + { + nBestWeight = pWeight[ i ]; + nBestVisual = i; + } + } + + rVI = pVInfos[ nBestVisual ]; + + XFree( pVInfos ); + return rVI.visualid == nDefVID; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +SalDisplay::SalDisplay( Display *display ) : + mpInputMethod( NULL ), + pDisp_( display ), + m_pWMAdaptor( NULL ), + m_pDtIntegrator( NULL ), + m_bUseRandRWrapper( true ), + m_nLastUserEventTime( CurrentTime ) +{ +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "SalDisplay::SalDisplay()\n" ); +#endif + X11SalData *pSalData = GetX11SalData(); + + DBG_ASSERT( ! pSalData->GetDisplay(), "Second SalDisplay created !!!\n" ); + pSalData->SetSalDisplay( this ); + + pXLib_ = pSalData->GetLib(); + m_nDefaultScreen = DefaultScreen( pDisp_ ); + +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +SalDisplay::~SalDisplay( ) +{ +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "SalDisplay::~SalDisplay()\n" ); +#endif + if( pDisp_ ) + { + doDestruct(); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "display %p closed\n", pDisp_ ); +#endif + pDisp_ = NULL; + } + // don't do this in doDestruct since RandR extension adds hooks into Display + // that is XCloseDisplay still needs the RandR library if it was used + DeInitRandR(); +} + +void SalDisplay::doDestruct() +{ + X11SalData *pSalData = GetX11SalData(); + + delete m_pWMAdaptor; + m_pWMAdaptor = NULL; + delete m_pDtIntegrator; + m_pDtIntegrator = NULL; + X11SalBitmap::ImplDestroyCache(); + X11SalGraphics::releaseGlyphPeer(); + + if( IsDisplay() ) + { + delete mpInputMethod, mpInputMethod = (SalI18N_InputMethod*)ILLEGAL_POINTER; + delete mpKbdExtension, mpKbdExtension = (SalI18N_KeyboardExtension*)ILLEGAL_POINTER; + + // do not call anything that could implicitly call back into + // this object after this point + osl_destroyMutex( hEventGuard_ ); + + for( unsigned int i = 0; i < m_aScreens.size(); i++ ) + { + ScreenData& rData = m_aScreens[i]; + if( rData.m_bInit ) + { + if( rData.m_aMonoGC != rData.m_aCopyGC ) + XFreeGC( pDisp_, rData.m_aMonoGC ); + XFreeGC( pDisp_, rData.m_aCopyGC ); + XFreeGC( pDisp_, rData.m_aAndInvertedGC ); + XFreeGC( pDisp_, rData.m_aAndGC ); + XFreeGC( pDisp_, rData.m_aOrGC ); + XFreeGC( pDisp_, rData.m_aStippleGC ); + XFreePixmap( pDisp_, rData.m_hInvert50 ); + XDestroyWindow( pDisp_, rData.m_aRefWindow ); + Colormap aColMap = rData.m_aColormap.GetXColormap(); + if( aColMap != None && aColMap != DefaultColormap( pDisp_, i ) ) + XFreeColormap( pDisp_, aColMap ); + } + } + + hEventGuard_ = (oslMutex)ILLEGAL_POINTER; + + for( size_t i = 0; i < POINTER_COUNT; i++ ) + { + if( aPointerCache_[i] ) + XFreeCursor( pDisp_, aPointerCache_[i] ); + } + + pXLib_->Remove( ConnectionNumber( pDisp_ ) ); + } + + if( pSalData->GetDisplay() == this ) + pSalData->SetSalDisplay( NULL ); +} + +static int DisplayHasEvent( int +#ifdef DBG_UTIL +fd +#endif +, SalX11Display *pDisplay ) +{ + DBG_ASSERT( ConnectionNumber( pDisplay->GetDisplay() ) == fd, + "wrong fd in DisplayHasEvent" ); + if( ! pDisplay->IsDisplay() ) + return 0; + + vos::IMutex* pSalInstYieldMutex = + GetSalData()->m_pInstance->GetYieldMutex(); + ::vos::OGuard aGuard( *pSalInstYieldMutex ); + return pDisplay->IsEvent(); +} +static int DisplayQueue( int +#ifdef DBG_UTIL +fd +#endif +, SalX11Display *pDisplay ) +{ + DBG_ASSERT( ConnectionNumber( pDisplay->GetDisplay() ) == fd, + "wrong fd in DisplayHasEvent" ); + vos::IMutex* pSalInstYieldMutex = + GetSalData()->m_pInstance->GetYieldMutex(); + ::vos::OGuard aGuard( *pSalInstYieldMutex ); + return XEventsQueued( pDisplay->GetDisplay(), + QueuedAfterReading ); +} +static int DisplayYield( int +#ifdef DBG_UTIL +fd +#endif +, SalX11Display *pDisplay ) +{ + DBG_ASSERT( ConnectionNumber( pDisplay->GetDisplay() ) == fd, + "wrong fd in DisplayHasEvent" ); + vos::IMutex* pSalInstYieldMutex = + GetSalData()->m_pInstance->GetYieldMutex(); + ::vos::OGuard aGuard( *pSalInstYieldMutex ); + pDisplay->Yield(); + return TRUE; +} + +SalX11Display::SalX11Display( Display *display ) + : SalDisplay( display ) +{ + Init(); + + pXLib_->Insert( ConnectionNumber( pDisp_ ), + this, + (YieldFunc) DisplayHasEvent, + (YieldFunc) DisplayQueue, + (YieldFunc) DisplayYield ); +} + +SalX11Display::~SalX11Display() +{ +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "SalX11Display::~SalX11Display()\n" ); +#endif + if( pDisp_ ) + { + doDestruct(); + XCloseDisplay( pDisp_ ); + pDisp_ = NULL; + } +} + +void SalDisplay::initScreen( int nScreen ) const +{ + if( nScreen < 0 || nScreen >= static_cast(m_aScreens.size()) ) + nScreen = m_nDefaultScreen; + ScreenData& rSD = const_cast(m_aScreens[nScreen]); + if( rSD.m_bInit ) + return; + rSD.m_bInit = true; + + XVisualInfo aVI; + Colormap aColMap; + + if( SalDisplay::BestVisual( pDisp_, nScreen, aVI ) ) // DefaultVisual + aColMap = DefaultColormap( pDisp_, nScreen ); + else + aColMap = XCreateColormap( pDisp_, + RootWindow( pDisp_, nScreen ), + aVI.visual, + AllocNone ); + + Screen* pScreen = ScreenOfDisplay( pDisp_, nScreen ); + + rSD.m_aSize = Size( WidthOfScreen( pScreen ), HeightOfScreen( pScreen ) ); + rSD.m_aRoot = RootWindow( pDisp_, nScreen ); + rSD.m_aVisual = SalVisual( &aVI ); + rSD.m_aColormap = SalColormap( this, aColMap, nScreen ); + + // we're interested in configure notification of root windows + InitRandR( rSD.m_aRoot ); + + // - - - - - - - - - - Reference Window/Default Drawable - - + XSetWindowAttributes aXWAttributes; + aXWAttributes.border_pixel = 0; + aXWAttributes.background_pixel = 0; + aXWAttributes.colormap = aColMap; + rSD.m_aRefWindow = XCreateWindow( pDisp_, + rSD.m_aRoot, + 0,0, 16,16, 0, + rSD.m_aVisual.GetDepth(), + InputOutput, + rSD.m_aVisual.GetVisual(), + CWBorderPixel|CWBackPixel|CWColormap, + &aXWAttributes ); + + // set client leader (session id gets set when session is started) + if( rSD.m_aRefWindow ) + { + // client leader must have WM_CLIENT_LEADER pointing to itself + XChangeProperty( pDisp_, + rSD.m_aRefWindow, + XInternAtom( pDisp_, "WM_CLIENT_LEADER", False ), + XA_WINDOW, + 32, + PropModeReplace, + (unsigned char*)&rSD.m_aRefWindow, + 1 + ); + + ByteString aExec( SessionManagerClient::getExecName(), osl_getThreadTextEncoding() ); + const char* argv[2]; + argv[0] = "/bin/sh"; + argv[1] = aExec.GetBuffer(); + XSetCommand( pDisp_, rSD.m_aRefWindow, const_cast(argv), 2 ); + XSelectInput( pDisp_, rSD.m_aRefWindow, PropertyChangeMask ); + + // - - - - - - - - - - GCs - - - - - - - - - - - - - - - - - + XGCValues values; + values.graphics_exposures = False; + values.fill_style = FillOpaqueStippled; + values.background = (1<(nDisplayScreens); + + mbExactResolution = false; + /* #i15507# + * Xft resolution should take precedence since + * it is what modern desktops use. + */ + const char* pValStr = XGetDefault( pDisp_, "Xft", "dpi" ); + if( pValStr != NULL ) + { + const rtl::OString aValStr( pValStr ); + const long nDPI = (long) aValStr.toDouble(); + // guard against insane resolution + if( (nDPI >= 50) && (nDPI <= 500) ) + { + aResolution_ = Pair( nDPI, nDPI ); + mbExactResolution = true; + } + } + if( mbExactResolution == false ) + { + aResolution_ = + Pair( DPI( WidthOfScreen( DefaultScreenOfDisplay( pDisp_ ) ), DisplayWidthMM ( pDisp_, m_nDefaultScreen ) ), + DPI( HeightOfScreen( DefaultScreenOfDisplay( pDisp_ ) ), DisplayHeightMM( pDisp_, m_nDefaultScreen ) ) ); + } + + nMaxRequestSize_ = XExtendedMaxRequestSize( pDisp_ ) * 4; + if( !nMaxRequestSize_ ) + nMaxRequestSize_ = XMaxRequestSize( pDisp_ ) * 4; + + SetServerVendor(); + X11SalBitmap::ImplCreateCache(); + + hEventGuard_ = osl_createMutex(); + bLocal_ = FALSE; /* dont care, initialize later by + calling SalDisplay::IsLocal() */ + mbLocalIsValid = FALSE; /* bLocal_ is not yet initialized */ + + // - - - - - - - - - - Synchronize - - - - - - - - - - - - - + if( getenv( "SAL_SYNCHRONIZE" ) ) + XSynchronize( pDisp_, True ); + + // - - - - - - - - - - Keyboardmapping - - - - - - - - - - - + ModifierMapping(); + + // - - - - - - - - - - Window Manager - - - - - - - - - - - + m_pWMAdaptor = ::vcl_sal::WMAdaptor::createWMAdaptor( this ); + const char *pWM = getenv( "SAL_WM" ); + if( pWM ) + { + long int nWM = 0; + sscanf( pWM, "%li", &nWM ); + eWindowManager_ = SalWM(nWM); + } + else if( XInternAtom( pDisp_, "_SGI_TELL_WM", True ) ) + eWindowManager_ = FourDwm; + else if( XInternAtom( pDisp_, "KWM_RUNNING", True ) ) + eWindowManager_ = mwm; // naja, eigentlich kwm ... + else if( XInternAtom( pDisp_, "_OL_WIN_ATTR", True ) ) + eWindowManager_ = olwm; + else if( m_pWMAdaptor->getWindowManagerName().EqualsAscii( "Dtwm" ) ) + eWindowManager_ = dtwm; + + // - - - - - - - - - - Properties - - - - - - - - - - - - - + const char *pProperties = getenv( "SAL_PROPERTIES" ); + if( pProperties ) + sscanf( pProperties, "%li", &nProperties_ ); + else + { +#if defined DBG_UTIL || defined SUN || defined LINUX || defined FREEBSD + nProperties_ |= PROPERTY_FEATURE_Maximize; +#endif + // Server Bugs & Properties + if( GetServerVendor() == vendor_excursion ) + { + nProperties_ |= PROPERTY_BUG_Stipple; + nProperties_ |= PROPERTY_BUG_DrawLine; + nProperties_ &= ~PROPERTY_SUPPORT_XSetClipMask; + } + else + if( GetServerVendor() == vendor_attachmate ) + { + nProperties_ |= PROPERTY_BUG_CopyPlane_RevertBWPixel; + } + else + if( GetServerVendor() == vendor_ibm ) + { + nProperties_ |= PROPERTY_BUG_XA_FAMILY_NAME_nil; + + if( otherwm == eWindowManager_ ) eWindowManager_ = mwm; + } + else + if( GetServerVendor() == vendor_xfree ) + { + nProperties_ |= PROPERTY_BUG_XCopyArea_GXxor; +#if defined LINUX || defined FREEBSD + // otherwm and olwm are a kind of default, which are not detected + // carefully. if we are running linux (i.e. not netbsd) on an xfree + // display, fvwm is most probable the wm to choose, confusing with mwm + // doesn't harm. #57791# start maximized if possible + if( (otherwm == eWindowManager_) + || (olwm == eWindowManager_ )) + { + eWindowManager_ = fvwm; // ??? + nProperties_ |= PROPERTY_FEATURE_Maximize; + } +#else + if( otherwm == eWindowManager_ ) eWindowManager_ = winmgr; +#endif +#if defined SOLARIS && defined SPARC + nProperties_ |= PROPERTY_BUG_Bitmap_Bit_Order; + // solaris xlib seems to have problems with putting images + // in correct bit order to xfree 8 bit displays +#endif + } + else + if( GetServerVendor() == vendor_sun ) + { + // nicht alle! (bekannt: nur Sparc II CG3, CG6?) + nProperties_ &= ~PROPERTY_SUPPORT_XSetClipMask; + + // trusted solaris doesn't allow to change properties on the + // wm decoration window + if (sal_IsTrustedSolaris (pDisp_)) + nProperties_ |= PROPERTY_FEATURE_TrustedSolaris; + + // Fehler im Sun-Solaris X86 Server ! + if (ImageByteOrder(GetDisplay()) == LSBFirst) + { + nProperties_ |= PROPERTY_BUG_Tile; + nProperties_ |= PROPERTY_SUPPORT_3ButtonMouse; + } + else // MSBFirst Sun-Solaris Sparc Server + { + // XCopyPlane reverts black and white for 1bit bitmaps + // only sun, only 8bit pseudocolor target + if ( (GetVisual(m_nDefaultScreen).GetDepth() == 8) + && (GetVisual(m_nDefaultScreen).GetClass() == PseudoColor)) + nProperties_ |= PROPERTY_BUG_CopyPlane_RevertBWPixel; + // Fehler in Solaris 2.5.1 + if (VendorRelease ( GetDisplay() ) < 3600) + nProperties_ |= PROPERTY_BUG_FillPolygon_Tile; + } + + if( otherwm == eWindowManager_ ) + eWindowManager_ = olwm; + } + else + if( GetServerVendor() == vendor_sco ) + { + if( otherwm == eWindowManager_ ) eWindowManager_ = pmwm; + } + else + if( GetServerVendor() == vendor_sgi ) + { + if( GetVisual( m_nDefaultScreen ).GetDepth() > 8 && GetVisual( m_nDefaultScreen ).GetDepth() <= 16 ) + nProperties_ |= PROPERTY_BUG_XCopyArea_GXxor; + nProperties_ |= PROPERTY_SUPPORT_XSetClipMask; + + if( otherwm == eWindowManager_ ) + eWindowManager_ = FourDwm; + } + else + if( GetServerVendor() == vendor_hp ) + { + if( otherwm == eWindowManager_ ) eWindowManager_ = dtwm; + } + else + if( GetServerVendor() == vendor_hummingbird ) + { + if (GetVisual(m_nDefaultScreen).GetDepth() == 24) + nProperties_ |= PROPERTY_BUG_CopyArea_OnlySmallSlices; + } + + if( otherwm == eWindowManager_ ) + { + if( !XInternAtom( pDisp_, "_MOTIF_WM_INFO", True ) ) + eWindowManager_ = olwm; + // ??? + } + + if( winmgr == eWindowManager_ ) + { + nProperties_ &= ~PROPERTY_SUPPORT_WM_SetPos; + nProperties_ &= ~PROPERTY_SUPPORT_WM_Screen; + nProperties_ |= PROPERTY_FEATURE_Maximize; + } + else if( dtwm == eWindowManager_ ) + { + nProperties_ &= ~PROPERTY_SUPPORT_WM_ClientPos; + } + else if( pmwm == eWindowManager_ ) + { + nProperties_ &= ~PROPERTY_SUPPORT_WM_ClientPos; + } + } + + InitXinerama(); + + // initialize system settings update + m_pDtIntegrator = DtIntegrator::CreateDtIntegrator(); + +#ifdef DBG_UTIL + PrintInfo(); +#endif +} + +// Sound +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void SalDisplay::Beep() const +{ + XBell( pDisp_, 0 ); +} + +// Keyboard +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +String SalDisplay::GetKeyNameFromKeySym( KeySym nKeySym ) const +{ + String aRet; + + // return an empty string for keysyms that are not bound to + // any key code + XLIB_KeyCode aKeyCode = XKeysymToKeycode( GetDisplay(), nKeySym ); + if( aKeyCode != 0 && aKeyCode != NoSymbol ) + { + if( !nKeySym ) + aRet = String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "???" ) ); + else + { + aRet = ::vcl_sal::getKeysymReplacementName( const_cast(this)->GetKeyboardName(), nKeySym ); + if( ! aRet.Len() ) + { + const char *pString = XKeysymToString( nKeySym ); + int n = strlen( pString ); + if( n > 2 && pString[n-2] == '_' ) + aRet = String( pString, n-2, RTL_TEXTENCODING_ISO_8859_1 ); + else + aRet = String( pString, n, RTL_TEXTENCODING_ISO_8859_1 ); + } + } + } + return aRet; +} + +inline KeySym sal_XModifier2Keysym( Display *pDisplay, + XModifierKeymap *pXModMap, + int n ) +{ + return XKeycodeToKeysym( pDisplay, + pXModMap->modifiermap[n*pXModMap->max_keypermod], + 0 ); +} + +void SalDisplay::ModifierMapping() +{ + XModifierKeymap *pXModMap = XGetModifierMapping( pDisp_ ); + + bNumLockFromXS_ = True; + nShiftKeySym_ = sal_XModifier2Keysym( pDisp_, pXModMap, ShiftMapIndex ); + nCtrlKeySym_ = sal_XModifier2Keysym( pDisp_, pXModMap, ControlMapIndex ); + nMod1KeySym_ = sal_XModifier2Keysym( pDisp_, pXModMap, Mod1MapIndex ); + // Auf Sun-Servern und SCO-Severn beruecksichtigt XLookupString + // nicht den NumLock Modifier. + if( (GetServerVendor() == vendor_sun) + || (GetServerVendor() == vendor_sco) ) + { + XLIB_KeyCode aNumLock = XKeysymToKeycode( pDisp_, XK_Num_Lock ); + + if( aNumLock ) for( int i = ShiftMapIndex; i <= Mod5MapIndex; i++ ) + { + if( pXModMap->modifiermap[i*pXModMap->max_keypermod] == aNumLock ) + { + bNumLockFromXS_ = False; + nNumLockIndex_ = i; + nNumLockMask_ = 1<= keysym ) + nKey = (USHORT)(KEY_A + (keysym - XK_a)); + else if( XK_A <= keysym && XK_Z >= keysym ) + nKey = (USHORT)(KEY_A + (keysym - XK_A)); + else if( XK_0 <= keysym && XK_9 >= keysym ) + nKey = (USHORT)(KEY_0 + (keysym - XK_0)); + else if( IsModifierKey( keysym ) ) + ; + else if( IsKeypadKey( keysym ) ) + { + if( (keysym >= XK_KP_0) && (keysym <= XK_KP_9) ) + { + nKey = (USHORT)(KEY_0 + (keysym - XK_KP_0)); + *pcPrintable = '0' + nKey - KEY_0; + } + else if( IsPFKey( keysym ) ) + nKey = (USHORT)(KEY_F1 + (keysym - XK_KP_F1)); + else switch( keysym ) + { + case XK_KP_Space: + nKey = KEY_SPACE; + *pcPrintable = ' '; + break; + case XK_KP_Tab: + nKey = KEY_TAB; + break; + case XK_KP_Enter: + nKey = KEY_RETURN; + break; + case XK_KP_Begin: + case XK_KP_Home: + nKey = KEY_HOME; + break; + case XK_KP_Left: + nKey = KEY_LEFT; + break; + case XK_KP_Up: + nKey = KEY_UP; + break; + case XK_KP_Right: + nKey = KEY_RIGHT; + break; + case XK_KP_Down: + nKey = KEY_DOWN; + break; + case XK_KP_Prior: // XK_KP_Page_Up + nKey = KEY_PAGEUP; + break; + case XK_KP_Next: // XK_KP_Page_Down + nKey = KEY_PAGEDOWN; + break; + case XK_KP_End: + nKey = KEY_END; + break; + case XK_KP_Insert: + nKey = KEY_INSERT; + break; + case XK_KP_Delete: + nKey = KEY_DELETE; + break; + case XK_KP_Equal: + nKey = KEY_EQUAL; + *pcPrintable = '='; + break; + case XK_KP_Multiply: + nKey = KEY_MULTIPLY; + *pcPrintable = '*'; + break; + case XK_KP_Add: + nKey = KEY_ADD; + *pcPrintable = '+'; + break; + case XK_KP_Separator: + nKey = KEY_DECIMAL; + *pcPrintable = ','; + break; + case XK_KP_Subtract: + nKey = KEY_SUBTRACT; + *pcPrintable = '-'; + break; + case XK_KP_Decimal: + nKey = KEY_DECIMAL; + *pcPrintable = '.'; + break; + case XK_KP_Divide: + nKey = KEY_DIVIDE; + *pcPrintable = '/'; + break; + } + } + else if( IsFunctionKey( keysym ) ) + { + if( bNumLockFromXS_ ) + { + if( keysym >= XK_F1 && keysym <= XK_F26 ) + nKey = (USHORT)(KEY_F1 + keysym - XK_F1); + } + else switch( keysym ) + { + // - - - - - Sun X-Server Tastatur ohne Cursorblock ??? - - - + case XK_R7: // XK_F27: + nKey = KEY_HOME; + break; + case XK_R8: // XK_F28: + nKey = KEY_UP; + break; + case XK_R9: // XK_F29: + nKey = KEY_PAGEUP; + break; + case XK_R10: // XK_F30: + nKey = KEY_LEFT; + break; + case XK_R11: // XK_F31: + nKey = 0; // KEY_F31 + break; + case XK_R12: // XK_F32: + nKey = KEY_RIGHT; + break; + case XK_R13: // XK_F33: + nKey = KEY_END; + break; + case XK_R14: // XK_F34: + nKey = KEY_DOWN; + break; + case XK_R15: // XK_F35: + nKey = KEY_PAGEDOWN; + break; + // - - - - - Sun X-Server Tastatur ??? - - - - - - - - - - - - + case XK_L1: // XK_F11: + nKey = KEY_F11; // on a sun keyboard this actually is usally SunXK_Stop, + // but VCL doesn't have a key defintion for that + break; + case XK_L2: // XK_F12: + if ( GetServerVendor() == vendor_sun ) + nKey = KEY_REPEAT; + else + nKey = KEY_F12; + break; + case XK_L3: // XK_F13: + nKey = KEY_PROPERTIES; // KEY_F13 + break; + case XK_L4: // XK_F14: + nKey = KEY_UNDO; // KEY_F14 + break; + case XK_L5: // XK_F15: + nKey = KEY_F15; // KEY_FRONT + break; + case XK_L6: // XK_F16: + nKey = KEY_COPY; // KEY_F16 + break; + case XK_L7: // XK_F17: + nKey = KEY_F17; // KEY_OPEN + break; + case XK_L8: // XK_F18: + nKey = KEY_PASTE; // KEY_F18 + break; + case XK_L9: // XK_F19: + nKey = KEY_F19; // KEY_FIND + break; + case XK_L10: // XK_F20: + nKey = KEY_CUT; // KEY_F20 + break; + default: + if( keysym >= XK_F1 && keysym <= XK_F26 ) + nKey = (USHORT)(KEY_F1 + keysym - XK_F1); + break; + } + } + else if( IsCursorKey( keysym ) ) + { + switch( keysym ) + { + case XK_Begin: + case XK_Home: + nKey = KEY_HOME; + break; + case XK_Left: + nKey = KEY_LEFT; + break; + case XK_Up: + nKey = KEY_UP; + break; + case XK_Right: + nKey = KEY_RIGHT; + break; + case XK_Down: + nKey = KEY_DOWN; + break; + case XK_Prior: // XK_Page_Up + nKey = KEY_PAGEUP; + break; + case XK_Next: // XK_Page_Down + nKey = KEY_PAGEDOWN; + break; + case XK_End: + nKey = KEY_END; + break; + } + } + else if( IsMiscFunctionKey( keysym ) ) + { + switch( keysym ) + { + case XK_Insert: + nKey = KEY_INSERT; + break; + case XK_Redo: + nKey = KEY_REPEAT; + break; + case XK_Undo: + nKey = KEY_UNDO; + break; + case XK_Find: + nKey = KEY_FIND; + break; + case XK_Help: + nKey = KEY_HELP; + break; + case XK_Menu: + nKey = KEY_CONTEXTMENU; + break; +/* + case XK_Break: + case XK_Select: + case XK_Execute: + case XK_Print: + case XK_Cancel: +*/ + } + } + else if( IsISOKey( keysym ) ) // XK_ISO_ + { + switch( keysym ) + { + case 0xFE20: // XK_ISO_Left_Tab: + nKey = KEY_TAB; + break; + } + } + else switch( keysym ) + { + case XK_Return: + nKey = KEY_RETURN; + break; + case XK_BackSpace: + nKey = KEY_BACKSPACE; + break; + case XK_Delete: + nKey = KEY_DELETE; + break; + case XK_space: + nKey = KEY_SPACE; + break; + case XK_Tab: + nKey = KEY_TAB; + break; + case XK_Escape: + nKey = KEY_ESCAPE; + break; + case XK_plus: + nKey = KEY_ADD; + break; + case XK_minus: + nKey = KEY_SUBTRACT; + break; + case XK_asterisk: + nKey = KEY_MULTIPLY; + break; + case XK_slash: + nKey = KEY_DIVIDE; + break; + case XK_period: + nKey = KEY_POINT; + break; + case XK_comma: + nKey = KEY_COMMA; + break; + case XK_less: + nKey = KEY_LESS; + break; + case XK_greater: + nKey = KEY_GREATER; + break; + case XK_equal: + nKey = KEY_EQUAL; + break; + case XK_Hangul_Hanja: + nKey = KEY_HANGUL_HANJA; + break; + case XK_asciitilde: + nKey = KEY_TILDE; + *pcPrintable = '~'; + break; + case XK_grave: + nKey = KEY_QUOTELEFT; + *pcPrintable = '`'; + break; +// case XK_Linefeed: +// *pcPrintable = '\n'; +// break; + // - - - - - - - - - - - - - Apollo - - - - - - - - - - - - - 0x1000 + case 0x1000FF02: // apXK_Copy + nKey = KEY_COPY; + break; + case 0x1000FF03: // apXK_Cut + nKey = KEY_CUT; + break; + case 0x1000FF04: // apXK_Paste + nKey = KEY_PASTE; + break; + case 0x1000FF14: // apXK_Repeat + nKey = KEY_REPEAT; + break; + // Exit, Save + // - - - - - - - - - - - - - - D E C - - - - - - - - - - - - - 0x1000 + case 0x1000FF00: + nKey = KEY_DELETE; + break; + // - - - - - - - - - - - - - - H P - - - - - - - - - - - - - 0x1000 + case 0x1000FF73: // hpXK_DeleteChar + nKey = KEY_DELETE; + break; + case 0x1000FF74: // hpXK_BackTab + case 0x1000FF75: // hpXK_KP_BackTab + nKey = KEY_TAB; + break; + // - - - - - - - - - - - - - - I B M - - - - - - - - - - - - - + // - - - - - - - - - - - - - - O S F - - - - - - - - - - - - - 0x1004 + case 0x1004FF02: // osfXK_Copy + nKey = KEY_COPY; + break; + case 0x1004FF03: // osfXK_Cut + nKey = KEY_CUT; + break; + case 0x1004FF04: // osfXK_Paste + nKey = KEY_PASTE; + break; + case 0x1004FF07: // osfXK_BackTab + nKey = KEY_TAB; + break; + case 0x1004FF08: // osfXK_BackSpace + nKey = KEY_BACKSPACE; + break; + case 0x1004FF1B: // osfXK_Escape + nKey = KEY_ESCAPE; + break; + // Up, Down, Left, Right, PageUp, PageDown + // - - - - - - - - - - - - - - S C O - - - - - - - - - - - - - + // - - - - - - - - - - - - - - S G I - - - - - - - - - - - - - 0x1007 + // - - - - - - - - - - - - - - S N I - - - - - - - - - - - - - + // - - - - - - - - - - - - - - S U N - - - - - - - - - - - - - 0x1005 + case 0x1005FF10: // SunXK_F36 + nKey = KEY_F11; + break; + case 0x1005FF11: // SunXK_F37 + nKey = KEY_F12; + break; + case 0x1005FF70: // SunXK_Props + nKey = KEY_PROPERTIES; + break; + case 0x1005FF71: // SunXK_Front + nKey = KEY_FRONT; + break; + case 0x1005FF72: // SunXK_Copy + nKey = KEY_COPY; + break; + case 0x1005FF73: // SunXK_Open + nKey = KEY_OPEN; + break; + case 0x1005FF74: // SunXK_Paste + nKey = KEY_PASTE; + break; + case 0x1005FF75: // SunXK_Cut + nKey = KEY_CUT; + break; + } + return nKey; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +KeySym SalDisplay::GetKeySym( XKeyEvent *pEvent, + unsigned char *pPrintable, + int *pLen, + KeySym *pUnmodifiedKeySym, + Status *pStatusReturn, + XIC aInputContext ) const +{ + KeySym nKeySym = 0; + memset( pPrintable, 0, *pLen ); + *pStatusReturn = 0; + + // first get the printable of the possibly modified KeySym + if ( (aInputContext == 0) + || (pEvent->type == KeyRelease) + || (mpInputMethod != NULL && mpInputMethod->PosixLocale()) ) + { + // XmbLookupString must not be called for KeyRelease events + // Cannot enter space in c locale problem #89616# #88978# btraq #4478197 + *pLen = XLookupString( pEvent, (char*)pPrintable, 1, &nKeySym, NULL ); + } + else + { + *pLen = XmbLookupString( aInputContext, + pEvent, (char*)pPrintable, *pLen - 1, &nKeySym, pStatusReturn ); + + // Lookup the string again, now with appropriate size + if ( *pStatusReturn == XBufferOverflow ) + { + pPrintable[ 0 ] = (char)0; + return 0; + } + + switch ( *pStatusReturn ) + { + case XBufferOverflow: + /* unhandled error */ + break; + case XLookupNone: + /* unhandled error */ + break; + case XLookupKeySym: + /* #72223# this is a strange one: on exceed sometimes + * no printable is returned for the first char entered, + * just to retry lookup solves the problem. The problem + * is not yet fully understood, so restrict 2nd lookup + * to 7bit ascii chars */ + if ( (XK_space <= nKeySym) && (XK_asciitilde >= nKeySym) ) + { + *pLen = 1; + pPrintable[ 0 ] = (char)nKeySym; + } + break; + case XLookupBoth: + case XLookupChars: + + /* nothing to, char allready in pPrintable */ + break; + } + } + + if( !bNumLockFromXS_ + && (IsCursorKey(nKeySym) + || IsFunctionKey(nKeySym) + || IsKeypadKey(nKeySym) + || XK_Delete == nKeySym ) ) + { + // Bei einigen X-Servern muss man bei den Keypadtasten + // schon sehr genau hinschauen. ZB. Solaris XServer: + // 2, 4, 6, 8 werden als Cursorkeys klassifiziert (Up, Down, Left, Right + // 1, 3, 5, 9 werden als Functionkeys klassifiziert (F27,F29,F33,F35) + // 0 als Keypadkey und der Dezimalpunkt gar nicht (KP_Insert) + KeySym nNewKeySym = XLookupKeysym( pEvent, nNumLockIndex_ ); + if( nNewKeySym != NoSymbol ) + nKeySym = nNewKeySym; + } + + // Now get the unmodified KeySym for KeyCode retrieval + // try to strip off modifiers, e.g. Ctrl-$ becomes Ctrl-Shift-4 + *pUnmodifiedKeySym = XKeycodeToKeysym( GetDisplay(), pEvent->keycode, 0); + + return nKeySym; +} + +// Pointer +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +#define MAKE_BITMAP( name ) \ + XCreateBitmapFromData( pDisp_, \ + DefaultRootWindow( pDisp_ ), \ + name##_bits, \ + name##_width, \ + name##_height ) + +#define MAKE_CURSOR( name ) \ + aCursBitmap = MAKE_BITMAP( name##curs ); \ + aMaskBitmap = MAKE_BITMAP( name##mask ); \ + nXHot = name##curs_x_hot; \ + nYHot = name##curs_y_hot + +XLIB_Cursor SalDisplay::GetPointer( int ePointerStyle ) +{ + if( ePointerStyle >= POINTER_COUNT ) + return 0; + + XLIB_Cursor &aCur = aPointerCache_[ePointerStyle]; + + if( aCur != None ) + return aCur; + + Pixmap aCursBitmap = None, aMaskBitmap = None; + unsigned int nXHot = 0, nYHot = 0; + + switch( ePointerStyle ) + { + case POINTER_NULL: + MAKE_CURSOR( null ); + break; + case POINTER_ARROW: + aCur = XCreateFontCursor( pDisp_, XC_left_ptr ); + DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); + break; + case POINTER_WAIT: + aCur = XCreateFontCursor( pDisp_, XC_watch ); + break; + case POINTER_TEXT: // Mouse Pointer ist ein "I" Beam + aCur = XCreateFontCursor( pDisp_, XC_xterm ); + DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); + break; + case POINTER_HELP: + aCur = XCreateFontCursor( pDisp_, XC_question_arrow ); + DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); + break; + case POINTER_CROSS: // Mouse Pointer ist ein Kreuz + aCur = XCreateFontCursor( pDisp_, XC_crosshair ); + DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); + break; + case POINTER_NSIZE: + aCur = XCreateFontCursor( pDisp_, XC_sb_v_double_arrow ); + DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); + break; + case POINTER_SSIZE: + aCur = XCreateFontCursor( pDisp_, XC_sb_v_double_arrow ); + DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); + break; + case POINTER_WSIZE: + aCur = XCreateFontCursor( pDisp_, XC_sb_h_double_arrow ); + DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); + break; + case POINTER_ESIZE: + aCur = XCreateFontCursor( pDisp_, XC_sb_h_double_arrow ); + DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); + break; + case POINTER_WINDOW_NSIZE: + aCur = XCreateFontCursor( pDisp_, XC_top_side ); + DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); + break; + case POINTER_WINDOW_SSIZE: + aCur = XCreateFontCursor( pDisp_, XC_bottom_side ); + DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); + break; + case POINTER_WINDOW_WSIZE: + aCur = XCreateFontCursor( pDisp_, XC_left_side ); + DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); + break; + case POINTER_WINDOW_ESIZE: + aCur = XCreateFontCursor( pDisp_, XC_right_side ); + DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); + break; + case POINTER_NWSIZE: + aCur = XCreateFontCursor( pDisp_, XC_top_left_corner ); + break; + case POINTER_NESIZE: + aCur = XCreateFontCursor( pDisp_, XC_top_right_corner ); + break; + case POINTER_SWSIZE: + aCur = XCreateFontCursor( pDisp_, XC_bottom_left_corner ); + break; + case POINTER_SESIZE: + aCur = XCreateFontCursor( pDisp_, XC_bottom_right_corner ); + break; + case POINTER_WINDOW_NWSIZE: + aCur = XCreateFontCursor( pDisp_, XC_top_left_corner ); + DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); + break; + case POINTER_WINDOW_NESIZE: + aCur = XCreateFontCursor( pDisp_, XC_top_right_corner ); + DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); + break; + case POINTER_WINDOW_SWSIZE: + aCur = XCreateFontCursor( pDisp_, XC_bottom_left_corner ); + DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); + break; + case POINTER_WINDOW_SESIZE: + aCur = XCreateFontCursor( pDisp_, XC_bottom_right_corner ); + DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); + break; + case POINTER_HSPLIT: + aCur = XCreateFontCursor( pDisp_, XC_sb_h_double_arrow ); + break; + case POINTER_VSPLIT: + aCur = XCreateFontCursor( pDisp_, XC_sb_v_double_arrow ); + break; + case POINTER_HSIZEBAR: + aCur = XCreateFontCursor( pDisp_, XC_sb_h_double_arrow ); // ??? + DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); + break; + case POINTER_VSIZEBAR: + aCur = XCreateFontCursor( pDisp_, XC_sb_v_double_arrow ); // ??? + DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); + break; + case POINTER_REFHAND: + aCur = XCreateFontCursor( pDisp_, XC_hand1 ); + DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); + break; + case POINTER_HAND: + aCur = XCreateFontCursor( pDisp_, XC_hand2 ); + break; + case POINTER_MAGNIFY: + MAKE_CURSOR( magnify_ ); + break; + case POINTER_FILL: + MAKE_CURSOR( fill_ ); + break; + case POINTER_MOVE: + aCur = XCreateFontCursor( pDisp_, XC_fleur ); + break; + case POINTER_MOVEDATA: + MAKE_CURSOR( movedata_ ); + break; + case POINTER_COPYDATA: + MAKE_CURSOR( copydata_ ); + break; + case POINTER_MOVEFILE: + MAKE_CURSOR( movefile_ ); + break; + case POINTER_COPYFILE: + MAKE_CURSOR( copyfile_ ); + break; + case POINTER_MOVEFILES: + MAKE_CURSOR( movefiles_ ); + break; + case POINTER_COPYFILES: + MAKE_CURSOR( copyfiles_ ); + break; + case POINTER_NOTALLOWED: + MAKE_CURSOR( nodrop_ ); + break; + case POINTER_ROTATE: + MAKE_CURSOR( rotate_ ); + break; + case POINTER_HSHEAR: + MAKE_CURSOR( hshear_ ); + break; + case POINTER_VSHEAR: + MAKE_CURSOR( vshear_ ); + break; + case POINTER_DRAW_LINE: + MAKE_CURSOR( drawline_ ); + break; + case POINTER_DRAW_RECT: + MAKE_CURSOR( drawrect_ ); + break; + case POINTER_DRAW_POLYGON: + MAKE_CURSOR( drawpolygon_ ); + break; + case POINTER_DRAW_BEZIER: + MAKE_CURSOR( drawbezier_ ); + break; + case POINTER_DRAW_ARC: + MAKE_CURSOR( drawarc_ ); + break; + case POINTER_DRAW_PIE: + MAKE_CURSOR( drawpie_ ); + break; + case POINTER_DRAW_CIRCLECUT: + MAKE_CURSOR( drawcirclecut_ ); + break; + case POINTER_DRAW_ELLIPSE: + MAKE_CURSOR( drawellipse_ ); + break; + case POINTER_DRAW_CONNECT: + MAKE_CURSOR( drawconnect_ ); + break; + case POINTER_DRAW_TEXT: + MAKE_CURSOR( drawtext_ ); + break; + case POINTER_MIRROR: + MAKE_CURSOR( mirror_ ); + break; + case POINTER_CROOK: + MAKE_CURSOR( crook_ ); + break; + case POINTER_CROP: + MAKE_CURSOR( crop_ ); + break; + case POINTER_MOVEPOINT: + MAKE_CURSOR( movepoint_ ); + break; + case POINTER_MOVEBEZIERWEIGHT: + MAKE_CURSOR( movebezierweight_ ); + break; + case POINTER_DRAW_FREEHAND: + MAKE_CURSOR( drawfreehand_ ); + break; + case POINTER_DRAW_CAPTION: + MAKE_CURSOR( drawcaption_ ); + break; + case POINTER_PEN: // Mouse Pointer ist ein Stift + aCur = XCreateFontCursor( pDisp_, XC_pencil ); + DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); + break; + case POINTER_LINKDATA: + MAKE_CURSOR( linkdata_ ); + break; + case POINTER_MOVEDATALINK: + MAKE_CURSOR( movedlnk_ ); + break; + case POINTER_COPYDATALINK: + MAKE_CURSOR( copydlnk_ ); + break; + case POINTER_LINKFILE: + MAKE_CURSOR( linkfile_ ); + break; + case POINTER_MOVEFILELINK: + MAKE_CURSOR( moveflnk_ ); + break; + case POINTER_COPYFILELINK: + MAKE_CURSOR( copyflnk_ ); + break; + case POINTER_CHART: + MAKE_CURSOR( chart_ ); + break; + case POINTER_DETECTIVE: + MAKE_CURSOR( detective_ ); + break; + case POINTER_PIVOT_COL: + MAKE_CURSOR( pivotcol_ ); + break; + case POINTER_PIVOT_ROW: + MAKE_CURSOR( pivotrow_ ); + break; + case POINTER_PIVOT_FIELD: + MAKE_CURSOR( pivotfld_ ); + break; + case POINTER_PIVOT_DELETE: + MAKE_CURSOR( pivotdel_ ); + break; + case POINTER_CHAIN: + MAKE_CURSOR( chain_ ); + break; + case POINTER_CHAIN_NOTALLOWED: + MAKE_CURSOR( chainnot_ ); + break; + case POINTER_TIMEEVENT_MOVE: + MAKE_CURSOR( timemove_ ); + break; + case POINTER_TIMEEVENT_SIZE: + MAKE_CURSOR( timesize_ ); + break; + case POINTER_AUTOSCROLL_N: + MAKE_CURSOR(asn_ ); + break; + case POINTER_AUTOSCROLL_S: + MAKE_CURSOR( ass_ ); + break; + case POINTER_AUTOSCROLL_W: + MAKE_CURSOR( asw_ ); + break; + case POINTER_AUTOSCROLL_E: + MAKE_CURSOR( ase_ ); + break; + case POINTER_AUTOSCROLL_NW: + MAKE_CURSOR( asnw_ ); + break; + case POINTER_AUTOSCROLL_NE: + MAKE_CURSOR( asne_ ); + break; + case POINTER_AUTOSCROLL_SW: + MAKE_CURSOR( assw_ ); + break; + case POINTER_AUTOSCROLL_SE: + MAKE_CURSOR( asse_ ); + break; + case POINTER_AUTOSCROLL_NS: + MAKE_CURSOR( asns_ ); + break; + case POINTER_AUTOSCROLL_WE: + MAKE_CURSOR( aswe_ ); + break; + case POINTER_AUTOSCROLL_NSWE: + MAKE_CURSOR( asnswe_ ); + break; + case POINTER_AIRBRUSH: + MAKE_CURSOR( airbrush_ ); + break; + case POINTER_TEXT_VERTICAL: + MAKE_CURSOR( vertcurs_ ); + break; + + // --> FME 2004-07-30 #i32329# Enhanced table selection + case POINTER_TAB_SELECT_S: + MAKE_CURSOR( tblsels_ ); + break; + case POINTER_TAB_SELECT_E: + MAKE_CURSOR( tblsele_ ); + break; + case POINTER_TAB_SELECT_SE: + MAKE_CURSOR( tblselse_ ); + break; + case POINTER_TAB_SELECT_W: + MAKE_CURSOR( tblselw_ ); + break; + case POINTER_TAB_SELECT_SW: + MAKE_CURSOR( tblselsw_ ); + break; + // <-- + + // --> FME 2004-08-16 #i20119# Paintbrush tool + case POINTER_PAINTBRUSH : + MAKE_CURSOR( paintbrush_ ); + break; + // <-- + + default: + DBG_ERROR("pointer not implemented"); + aCur = XCreateFontCursor( pDisp_, XC_arrow ); + break; + } + + if( None == aCur ) + { + XColor aBlack, aWhite, aDummy; + Colormap hColormap = GetColormap(m_nDefaultScreen).GetXColormap(); + + XAllocNamedColor( pDisp_, hColormap, "black", &aBlack, &aDummy ); + XAllocNamedColor( pDisp_, hColormap, "white", &aWhite, &aDummy ); + + aCur = XCreatePixmapCursor( pDisp_, + aCursBitmap, aMaskBitmap, + &aBlack, &aWhite, + nXHot, nYHot ); + + XFreePixmap( pDisp_, aCursBitmap ); + XFreePixmap( pDisp_, aMaskBitmap ); + } + + return aCur; +} + +int SalDisplay::CaptureMouse( SalFrame *pCapture ) +{ + if( !pCapture ) + { + m_pCapture = NULL; + XUngrabPointer( GetDisplay(), CurrentTime ); + XFlush( GetDisplay() ); + return 0; + } + + m_pCapture = NULL; + + // FIXME: get rid of X11SalFrame + const SystemEnvData* pEnvData = pCapture->GetSystemData(); + int ret = XGrabPointer( GetDisplay(), + (XLIB_Window)pEnvData->aWindow, + False, + PointerMotionMask| ButtonPressMask|ButtonReleaseMask, + GrabModeAsync, + GrabModeAsync, + None, + static_cast(pCapture)->GetCursor(), + CurrentTime ); + + if( ret != GrabSuccess ) + { + DBG_ASSERT( 1, "SalDisplay::CaptureMouse could not grab pointer\n"); + return -1; + } + + m_pCapture = pCapture; + return 1; +} + +// Events +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +void SalDisplay::SendInternalEvent( SalFrame* pFrame, void* pData, USHORT nEvent ) +{ + if( osl_acquireMutex( hEventGuard_ ) ) + { + m_aUserEvents.push_back( SalUserEvent( pFrame, pData, nEvent ) ); + + // Notify SalXLib::Yield() of a pending event. + pXLib_->PostUserEvent(); + + osl_releaseMutex( hEventGuard_ ); + } + else { + DBG_ASSERT( 1, "SalDisplay::SendInternalEvent !acquireMutex\n" ); + } +} + +void SalDisplay::CancelInternalEvent( SalFrame* pFrame, void* pData, USHORT nEvent ) +{ + if( osl_acquireMutex( hEventGuard_ ) ) + { + if( ! m_aUserEvents.empty() ) + { + std::list< SalUserEvent >::iterator it, next; + next = m_aUserEvents.begin(); + do + { + it = next++; + if( it->m_pFrame == pFrame && + it->m_pData == pData && + it->m_nEvent == nEvent ) + { + m_aUserEvents.erase( it ); + } + } while( next != m_aUserEvents.end() ); + } + + osl_releaseMutex( hEventGuard_ ); + } + else { + DBG_ASSERT( 1, "SalDisplay::CancelInternalEvent !acquireMutex\n" ); + } +} + +BOOL SalX11Display::IsEvent() +{ + BOOL bRet = FALSE; + + if( osl_acquireMutex( hEventGuard_ ) ) + { + if( m_aUserEvents.begin() != m_aUserEvents.end() ) + bRet = TRUE; + osl_releaseMutex( hEventGuard_ ); + } + + if( bRet || XEventsQueued( pDisp_, QueuedAlready ) ) + return TRUE; + + XFlush( pDisp_ ); + return FALSE; +} + +bool SalDisplay::DispatchInternalEvent() +{ + SalFrame* pFrame = NULL; + void* pData = NULL; + USHORT nEvent = 0; + + if( osl_acquireMutex( hEventGuard_ ) ) + { + if( m_aUserEvents.begin() != m_aUserEvents.end() ) + { + pFrame = m_aUserEvents.front().m_pFrame; + pData = m_aUserEvents.front().m_pData; + nEvent = m_aUserEvents.front().m_nEvent; + + m_aUserEvents.pop_front(); + } + osl_releaseMutex( hEventGuard_ ); + } + else { + DBG_ASSERT( 1, "SalDisplay::Yield !acquireMutex\n" ); + } + + if( pFrame ) + pFrame->CallCallback( nEvent, pData ); + + return pFrame != NULL; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +void SalX11Display::Yield() +{ + if( DispatchInternalEvent() ) + return; + + XEvent aEvent; + DBG_ASSERT( static_cast(GetSalData()->m_pInstance->GetYieldMutex())->GetThreadId() == + vos::OThread::getCurrentIdentifier(), + "will crash soon since solar mutex not locked in SalDisplay::Yield" ); + + XNextEvent( pDisp_, &aEvent ); + + Dispatch( &aEvent ); + +#ifdef DBG_UTIL + if( pXLib_->HasXErrorOccured() ) + { + XFlush( pDisp_ ); + PrintEvent( "SalDisplay::Yield (WasXError)", &aEvent ); + } +#endif + pXLib_->ResetXErrorOccured(); +} + +long SalX11Display::Dispatch( XEvent *pEvent ) +{ + if( pEvent->type == XLIB_KeyPress || pEvent->type == KeyRelease ) + { + XLIB_Window aWindow = pEvent->xkey.window; + + std::list< SalFrame* >::const_iterator it; + for( it = m_aFrames.begin(); it != m_aFrames.end(); ++it ) + { + const X11SalFrame* pFrame = static_cast< const X11SalFrame* >(*it); + if( pFrame->GetWindow() == aWindow || pFrame->GetShellWindow() == aWindow ) + { + aWindow = pFrame->GetWindow(); + break; + } + } + if( it != m_aFrames.end() ) + { + if ( mpInputMethod->FilterEvent( pEvent , aWindow ) ) + return 0; + } + } + else + if ( mpInputMethod->FilterEvent( pEvent, None ) ) + return 0; + + SalInstance* pInstance = GetSalData()->m_pInstance; + pInstance->CallEventCallback( pEvent, sizeof( XEvent ) ); + + switch( pEvent->type ) + { + case MotionNotify: + while( XCheckWindowEvent( pEvent->xany.display, + pEvent->xany.window, + ButtonMotionMask, + pEvent ) ) + ; + m_nLastUserEventTime = pEvent->xmotion.time; + break; + case PropertyNotify: + if( pEvent->xproperty.atom == getWMAdaptor()->getAtom( WMAdaptor::VCL_SYSTEM_SETTINGS ) ) + { + for( unsigned int i = 0; i < m_aScreens.size(); i++ ) + { + if( pEvent->xproperty.window == m_aScreens[i].m_aRefWindow ) + { + std::list< SalFrame* >::const_iterator it; + for( it = m_aFrames.begin(); it != m_aFrames.end(); ++it ) + (*it)->CallCallback( SALEVENT_SETTINGSCHANGED, NULL ); + return 0; + } + } + } + break; + case MappingNotify: + if( MappingKeyboard == pEvent->xmapping.request || + MappingModifier == pEvent->xmapping.request ) + { + XRefreshKeyboardMapping( &pEvent->xmapping ); + if( MappingModifier == pEvent->xmapping.request ) + ModifierMapping(); + if( MappingKeyboard == pEvent->xmapping.request ) // refresh mapping + GetKeyboardName( TRUE ); + } + break; + case ButtonPress: + case ButtonRelease: + m_nLastUserEventTime = pEvent->xbutton.time; + break; + case XLIB_KeyPress: + case KeyRelease: + m_nLastUserEventTime = pEvent->xkey.time; + break; + default: + + if ( GetKbdExtension()->UseExtension() + && GetKbdExtension()->GetEventBase() == pEvent->type ) + { + GetKbdExtension()->Dispatch( pEvent ); + return 1; + } + break; + } + + std::list< SalFrame* >::iterator it; + for( it = m_aFrames.begin(); it != m_aFrames.end(); ++it ) + { + X11SalFrame* pFrame = static_cast< X11SalFrame* >(*it); + XLIB_Window aDispatchWindow = pEvent->xany.window; + if( pFrame->GetWindow() == aDispatchWindow + || pFrame->GetShellWindow() == aDispatchWindow + || pFrame->GetForeignParent() == aDispatchWindow + ) + { + return pFrame->Dispatch( pEvent ); + } + if( pEvent->type == ConfigureNotify && pEvent->xconfigure.window == pFrame->GetStackingWindow() ) + { + return pFrame->Dispatch( pEvent ); + } + } + + // dispatch to salobjects + X11SalObject::Dispatch( pEvent ); + + // is this perhaps a root window that changed size ? + processRandREvent( pEvent ); + + return 0; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void SalDisplay::PrintEvent( const ByteString &rComment, + XEvent *pEvent ) const +{ + if( pEvent->type <= MappingNotify ) + { + fprintf( stderr, "[%s] %s s=%d w=%ld\n", + rComment.GetBuffer(), + EventNames[pEvent->type], + pEvent->xany.send_event, + pEvent->xany.window ); + + switch( pEvent->type ) + { + case XLIB_KeyPress: + case KeyRelease: + fprintf( stderr, "\t\ts=%d c=%d\n", + pEvent->xkey.state, + pEvent->xkey.keycode ); + break; + + case ButtonPress: + case ButtonRelease: + fprintf( stderr, "\t\ts=%d b=%d x=%d y=%d rx=%d ry=%d\n", + pEvent->xbutton.state, + pEvent->xbutton.button, + pEvent->xbutton.x, + pEvent->xbutton.y, + pEvent->xbutton.x_root, + pEvent->xbutton.y_root ); + break; + + case MotionNotify: + fprintf( stderr, "\t\ts=%d x=%d y=%d\n", + pEvent->xmotion.state, + pEvent->xmotion.x, + pEvent->xmotion.y ); + break; + + case EnterNotify: + case LeaveNotify: + fprintf( stderr, "\t\tm=%d f=%d x=%d y=%d\n", + pEvent->xcrossing.mode, + pEvent->xcrossing.focus, + pEvent->xcrossing.x, + pEvent->xcrossing.y ); + break; + + case FocusIn: + case FocusOut: + fprintf( stderr, "\t\tm=%d d=%d\n", + pEvent->xfocus.mode, + pEvent->xfocus.detail ); + break; + + case Expose: + case GraphicsExpose: + fprintf( stderr, "\t\tc=%d %d*%d %d+%d\n", + pEvent->xexpose.count, + pEvent->xexpose.width, + pEvent->xexpose.height, + pEvent->xexpose.x, + pEvent->xexpose.y ); + break; + + case VisibilityNotify: + fprintf( stderr, "\t\ts=%d\n", + pEvent->xvisibility.state ); + break; + + case CreateNotify: + case DestroyNotify: + break; + + case MapNotify: + case UnmapNotify: + break; + + case ReparentNotify: + fprintf( stderr, "\t\tp=%d x=%d y=%d\n", + sal::static_int_cast< int >(pEvent->xreparent.parent), + pEvent->xreparent.x, + pEvent->xreparent.y ); + break; + + case ConfigureNotify: + fprintf( stderr, "\t\tb=%d %d*%d %d+%d\n", + pEvent->xconfigure.border_width, + pEvent->xconfigure.width, + pEvent->xconfigure.height, + pEvent->xconfigure.x, + pEvent->xconfigure.y ); + break; + + case PropertyNotify: + fprintf( stderr, "\t\ta=%s (0x%X)\n", + GetAtomName( pDisp_, pEvent->xproperty.atom ), + sal::static_int_cast< unsigned int >( + pEvent->xproperty.atom) ); + break; + + case ColormapNotify: + fprintf( stderr, "\t\tc=%ld n=%d s=%d\n", + pEvent->xcolormap.colormap, + pEvent->xcolormap.c_new, + pEvent->xcolormap.state ); + break; + + case ClientMessage: + fprintf( stderr, "\t\ta=%s (0x%X) f=%i [0x%lX,0x%lX,0x%lX,0x%lX,0x%lX])\n", + GetAtomName( pDisp_, pEvent->xclient.message_type ), + sal::static_int_cast< unsigned int >( + pEvent->xclient.message_type), + pEvent->xclient.format, + pEvent->xclient.data.l[0], + pEvent->xclient.data.l[1], + pEvent->xclient.data.l[2], + pEvent->xclient.data.l[3], + pEvent->xclient.data.l[4] ); + break; + + case MappingNotify: + fprintf( stderr, "\t\tr=%sd\n", + MappingModifier == pEvent->xmapping.request + ? "MappingModifier" + : MappingKeyboard == pEvent->xmapping.request + ? "MappingKeyboard" + : "MappingPointer" ); + + break; + } + } + else + fprintf( stderr, "[%s] %d s=%d w=%ld\n", + rComment.GetBuffer(), + pEvent->type, + pEvent->xany.send_event, + pEvent->xany.window ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void SalDisplay::PrintInfo() const +{ + if( IsDisplay() ) + { + fprintf( stderr, "\n" ); + fprintf( stderr, "Environment\n" ); + fprintf( stderr, "\t$XENVIRONMENT \t\"%s\"\n", + GetEnv( "XENVIRONMENT" ) ); + fprintf( stderr, "\t$DISPLAY \t\"%s\"\n", + GetEnv( "DISPLAY" ) ); + fprintf( stderr, "\t$SAL_VISUAL \t\"%s\"\n", + GetEnv( "SAL_VISUAL" ) ); + fprintf( stderr, "\t$SAL_FONTPATH \t\"%s\"\n", + GetEnv( "SAL_FONTPATH" ) ); + fprintf( stderr, "\t$SAL_NOSEGV \t\"%s\"\n", + GetEnv( "SAL_NOSEGV" ) ); + fprintf( stderr, "\t$SAL_IGNOREXERRORS\t\"%s\"\n", + GetEnv( "SAL_IGNOREXERRORS" ) ); + fprintf( stderr, "\t$SAL_PROPERTIES \t\"%s\"\n", + GetEnv( "SAL_PROPERTIES" ) ); + fprintf( stderr, "\t$SAL_WM \t\"%s\"\n", + GetEnv( "SAL_WM" ) ); + fprintf( stderr, "\t$SAL_SYNCHRONIZE \t\"%s\"\n", + GetEnv( "SAL_SYNCHRONIZE" ) ); + + char sHostname[ 120 ]; + gethostname (sHostname, 120 ); + fprintf( stderr, "Client\n" ); + fprintf( stderr, "\tHost \t\"%s\"\n", + sHostname ); + + fprintf( stderr, "Display\n" ); + fprintf( stderr, "\tHost \t\"%s\"\n", + DisplayString(pDisp_) ); + fprintf( stderr, "\tVendor (Release) \t\"%s (%d)\"\n", + ServerVendor(pDisp_), VendorRelease(pDisp_) ); + fprintf( stderr, "\tProtocol \t%d.%d\n", + ProtocolVersion(pDisp_), ProtocolRevision(pDisp_) ); + fprintf( stderr, "\tScreen (count,def)\t%d (%d,%d)\n", + m_nDefaultScreen, ScreenCount(pDisp_), DefaultScreen(pDisp_) ); + fprintf( stderr, "\tshift ctrl alt \t%s (0x%X) %s (0x%X) %s (0x%X)\n", + KeyStr( nShiftKeySym_ ), sal::static_int_cast< unsigned int >(nShiftKeySym_), + KeyStr( nCtrlKeySym_ ), sal::static_int_cast< unsigned int >(nCtrlKeySym_), + KeyStr( nMod1KeySym_ ), sal::static_int_cast< unsigned int >(nMod1KeySym_) ); + if( XExtendedMaxRequestSize(pDisp_) * 4 ) + fprintf( stderr, "\tXMaxRequestSize \t%ld %ld [bytes]\n", + XMaxRequestSize(pDisp_) * 4, XExtendedMaxRequestSize(pDisp_) * 4 ); + if( GetProperties() != PROPERTY_DEFAULT ) + fprintf( stderr, "\tProperties \t0x%lX\n", GetProperties() ); + if( eWindowManager_ != otherwm ) + fprintf( stderr, "\tWindowmanager \t%d\n", eWindowManager_ ); + fprintf( stderr, "\tWMName \t%s\n", rtl::OUStringToOString( getWMAdaptor()->getWindowManagerName(), osl_getThreadTextEncoding() ).getStr() ); + } + fprintf( stderr, "Screen\n" ); + fprintf( stderr, "\tResolution/Size \t%ld*%ld %ld*%ld %.1lf\"\n", + aResolution_.A(), aResolution_.B(), + m_aScreens[m_nDefaultScreen].m_aSize.Width(), m_aScreens[m_nDefaultScreen].m_aSize.Height(), + Hypothenuse( DisplayWidthMM ( pDisp_, m_nDefaultScreen ), + DisplayHeightMM( pDisp_, m_nDefaultScreen ) ) / 25.4 ); + fprintf( stderr, "\tBlack&White \t%lu %lu\n", + GetColormap(m_nDefaultScreen).GetBlackPixel(), GetColormap(m_nDefaultScreen).GetWhitePixel() ); + fprintf( stderr, "\tRGB \t0x%lx 0x%lx 0x%lx\n", + GetVisual(m_nDefaultScreen).red_mask, GetVisual(m_nDefaultScreen).green_mask, GetVisual(m_nDefaultScreen).blue_mask ); + fprintf( stderr, "\tVisual \t%d-bit %s ID=0x%x\n", + GetVisual(m_nDefaultScreen).GetDepth(), + VisualClassName[ GetVisual(m_nDefaultScreen).GetClass() ], + sal::static_int_cast< unsigned int >(GetVisual(m_nDefaultScreen).GetVisualId()) ); +} + +int SalDisplay::addXineramaScreenUnique( long i_nX, long i_nY, long i_nWidth, long i_nHeight ) +{ + // see if any frame buffers are at the same coordinates + // this can happen with weird configuration e.g. on + // XFree86 and Clone displays + const size_t nScreens = m_aXineramaScreens.size(); + for( size_t n = 0; n < nScreens; n++ ) + { + if( m_aXineramaScreens[n].Left() == i_nX && + m_aXineramaScreens[n].Top() == i_nY ) + { + if( m_aXineramaScreens[n].GetWidth() < i_nWidth || + m_aXineramaScreens[n].GetHeight() < i_nHeight ) + { + m_aXineramaScreens[n].SetSize( Size( i_nWidth, i_nHeight ) ); + } + return (int)n; + } + } + m_aXineramaScreens.push_back( Rectangle( Point( i_nX, i_nY ), Size( i_nWidth, i_nHeight ) ) ); + return (int)m_aXineramaScreens.size()-1; +} + +void SalDisplay::InitXinerama() +{ + if( m_aScreens.size() > 1 ) + { + m_bXinerama = false; + return; // multiple screens mean no xinerama + } +#ifdef USE_XINERAMA +#if defined(USE_XINERAMA_XSUN) + int nFramebuffers = 1; + if( XineramaGetState( pDisp_, m_nDefaultScreen ) ) + { + XRectangle pFramebuffers[MAXFRAMEBUFFERS]; + unsigned char hints[MAXFRAMEBUFFERS]; + int result = XineramaGetInfo( pDisp_, + m_nDefaultScreen, + pFramebuffers, + hints, + &nFramebuffers ); + if( result > 0 && nFramebuffers > 1 ) + { + m_bXinerama = true; + m_aXineramaScreens = std::vector(); + for( int i = 0; i < nFramebuffers; i++ ) + addXineramaScreenUnique( pFramebuffers[i].x, + pFramebuffers[i].y, + pFramebuffers[i].width, + pFramebuffers[i].height ); + } + } +#elif defined(USE_XINERAMA_XORG) +if( XineramaIsActive( pDisp_ ) ) +{ + int nFramebuffers = 1; + XineramaScreenInfo* pScreens = XineramaQueryScreens( pDisp_, &nFramebuffers ); + if( pScreens ) + { + if( nFramebuffers > 1 ) + { + m_aXineramaScreens = std::vector(); + for( int i = 0; i < nFramebuffers; i++ ) + { + addXineramaScreenUnique( pScreens[i].x_org, + pScreens[i].y_org, + pScreens[i].width, + pScreens[i].height ); + } + m_bXinerama = m_aXineramaScreens.size() > 1; + } + XFree( pScreens ); + } +} +#endif +#if OSL_DEBUG_LEVEL > 1 + if( m_bXinerama ) + { + for( std::vector< Rectangle >::const_iterator it = m_aXineramaScreens.begin(); it != m_aXineramaScreens.end(); ++it ) + fprintf( stderr, "Xinerama screen: %ldx%ld+%ld+%ld\n", it->GetWidth(), it->GetHeight(), it->Left(), it->Top() ); + } +#endif +#endif // USE_XINERAMA +} + +void SalDisplay::registerFrame( SalFrame* pFrame ) +{ + m_aFrames.push_front( pFrame ); +} + +void SalDisplay::deregisterFrame( SalFrame* pFrame ) +{ + if( osl_acquireMutex( hEventGuard_ ) ) + { + std::list< SalUserEvent >::iterator it = m_aUserEvents.begin(); + while ( it != m_aUserEvents.end() ) + { + if( it->m_pFrame == pFrame ) + it = m_aUserEvents.erase( it ); + else + ++it; + } + osl_releaseMutex( hEventGuard_ ); + } + else { + DBG_ERROR( "SalDisplay::deregisterFrame !acquireMutex\n" ); + } + + m_aFrames.remove( pFrame ); +} + + +extern "C" +{ + static Bool timestamp_predicate( Display*, XEvent* i_pEvent, XPointer i_pArg ) + { + SalDisplay* pSalDisplay = reinterpret_cast(i_pArg); + if( i_pEvent->type == PropertyNotify && + i_pEvent->xproperty.window == pSalDisplay->GetDrawable( pSalDisplay->GetDefaultScreenNumber() ) && + i_pEvent->xproperty.atom == pSalDisplay->getWMAdaptor()->getAtom( WMAdaptor::SAL_GETTIMEEVENT ) + ) + return True; + + return False; + } +} + +XLIB_Time SalDisplay::GetLastUserEventTime( bool i_bAlwaysReget ) const +{ + if( m_nLastUserEventTime == CurrentTime || i_bAlwaysReget ) + { + // get current server time + unsigned char c = 0; + XEvent aEvent; + Atom nAtom = getWMAdaptor()->getAtom( WMAdaptor::SAL_GETTIMEEVENT ); + XChangeProperty( GetDisplay(), GetDrawable( GetDefaultScreenNumber() ), + nAtom, nAtom, 8, PropModeReplace, &c, 1 ); + XFlush( GetDisplay() ); + + if( ! XIfEventWithTimeout( &aEvent, (XPointer)this, timestamp_predicate ) ) + { + // this should not happen at all; still sometimes it happens + aEvent.xproperty.time = CurrentTime; + } + + m_nLastUserEventTime = aEvent.xproperty.time; + } + return m_nLastUserEventTime; +} + +bool SalDisplay::XIfEventWithTimeout( XEvent* o_pEvent, XPointer i_pPredicateData, + X_if_predicate i_pPredicate, long i_nTimeout ) const +{ + /* #i99360# ugly workaround an X11 library bug + this replaces the following call: + XIfEvent( GetDisplay(), o_pEvent, i_pPredicate, i_pPredicateData ); + */ + bool bRet = true; + + if( ! XCheckIfEvent( GetDisplay(), o_pEvent, i_pPredicate, i_pPredicateData ) ) + { + // wait for some event to arrive + struct pollfd aFD; + aFD.fd = ConnectionNumber(GetDisplay()); + aFD.events = POLLIN; + aFD.revents = 0; + poll( &aFD, 1, i_nTimeout ); + if( ! XCheckIfEvent( GetDisplay(), o_pEvent, i_pPredicate, i_pPredicateData ) ) + { + poll( &aFD, 1, i_nTimeout ); // try once more for a packet of events from the Xserver + if( ! XCheckIfEvent( GetDisplay(), o_pEvent, i_pPredicate, i_pPredicateData ) ) + { + bRet = false; + } + } + } + return bRet; +} + +// -=-= SalVisual -=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +SalVisual::SalVisual() +{ + rtl_zeroMemory( this, sizeof( SalVisual ) ); +} + +SalVisual::SalVisual( const XVisualInfo* pXVI ) +{ + *(XVisualInfo*)this = *pXVI; + if( GetClass() == TrueColor ) + { + nRedShift_ = sal_Shift( red_mask ); + nGreenShift_ = sal_Shift( green_mask ); + nBlueShift_ = sal_Shift( blue_mask ); + + nRedBits_ = sal_significantBits( red_mask ); + nGreenBits_ = sal_significantBits( green_mask ); + nBlueBits_ = sal_significantBits( blue_mask ); + + if( GetDepth() == 24 ) + if( red_mask == 0xFF0000 ) + if( green_mask == 0xFF00 ) + if( blue_mask == 0xFF ) + eRGBMode_ = RGB; + else + eRGBMode_ = other; + else if( blue_mask == 0xFF00 ) + if( green_mask == 0xFF ) + eRGBMode_ = RBG; + else + eRGBMode_ = other; + else + eRGBMode_ = other; + else if( green_mask == 0xFF0000 ) + if( red_mask == 0xFF00 ) + if( blue_mask == 0xFF ) + eRGBMode_ = GRB; + else + eRGBMode_ = other; + else if( blue_mask == 0xFF00 ) + if( red_mask == 0xFF ) + eRGBMode_ = GBR; + else + eRGBMode_ = other; + else + eRGBMode_ = other; + else if( blue_mask == 0xFF0000 ) + if( red_mask == 0xFF00 ) + if( green_mask == 0xFF ) + eRGBMode_ = BRG; + else + eRGBMode_ = other; + else if( green_mask == 0xFF00 ) + if( red_mask == 0xFF ) + eRGBMode_ = BGR; + else + eRGBMode_ = other; + else + eRGBMode_ = other; + else + eRGBMode_ = other; + else + eRGBMode_ = other; + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +SalVisual::~SalVisual() +{ + if( -1 == screen && VisualID(-1) == visualid ) delete visual; +} + +// Konvertiert die Reihenfolge der Bytes eines Pixel in Bytes eines SalColors +// fuer die 6 XXXA ist das nicht reversibel +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// SalColor is RGB (ABGR) a=0xFF000000, r=0xFF0000, g=0xFF00, b=0xFF + +#define SALCOLOR RGB +#define SALCOLORREVERSE BGR + +BOOL SalVisual::Convert( int &n0, int &n1, int &n2, int &n3 ) +{ + int n; + + switch( GetMode() ) + { + case other: + return FALSE; + case SALCOLOR: + break; + case SALCOLORREVERSE: + case RBG: + case BRG: + case GBR: + case GRB: + return Convert( n0, n1, n2 ); + case RGBA: + n = n0; + n0 = n1; + n1 = n2; + n2 = n3; + n3 = n; + break; + case BGRA: + case RBGA: + case BRGA: + case GBRA: + case GRBA: + default: + fprintf( stderr, "SalVisual::Convert %d\n", GetMode() ); + abort(); + } + return TRUE; +} + +BOOL SalVisual::Convert( int &n0, int &n1, int &n2 ) +{ + int n; + + switch( GetMode() ) + { + case other: + return FALSE; + case SALCOLOR: + break; + case RBG: + n = n0; + n0 = n1; + n1 = n; + break; + case GRB: + n = n1; + n1 = n2; + n2 = n; + break; + case SALCOLORREVERSE: + n = n0; + n0 = n2; + n2 = n; + break; + case BRG: + n = n0; + n0 = n1; + n1 = n2; + n2 = n; + break; + case GBR: + n = n2; + n2 = n1; + n1 = n0; + n0 = n; + break; + default: + fprintf( stderr, "SalVisual::Convert %d\n", GetMode() ); + abort(); + } + return TRUE; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +SalColor SalVisual::GetTCColor( Pixel nPixel ) const +{ + if( SALCOLOR == eRGBMode_ ) + return (SalColor)nPixel; + + if( SALCOLORREVERSE == eRGBMode_ ) + return MAKE_SALCOLOR( (nPixel & 0x0000FF), + (nPixel & 0x00FF00) >> 8, + (nPixel & 0xFF0000) >> 16); + + Pixel r = nPixel & red_mask; + Pixel g = nPixel & green_mask; + Pixel b = nPixel & blue_mask; + + if( other != eRGBMode_ ) // 8+8+8=24 + return MAKE_SALCOLOR( r >> nRedShift_, + g >> nGreenShift_, + b >> nBlueShift_ ); + + if( nRedShift_ > 0 ) r >>= nRedShift_; else r <<= -nRedShift_; + if( nGreenShift_ > 0 ) g >>= nGreenShift_; else g <<= -nGreenShift_; + if( nBlueShift_ > 0 ) b >>= nBlueShift_; else b <<= -nBlueShift_; + + if( nRedBits_ != 8 ) + r |= (r & 0xff) >> (8-nRedBits_); + if( nGreenBits_ != 8 ) + g |= (g & 0xff) >> (8-nGreenBits_); + if( nBlueBits_ != 8 ) + b |= (b & 0xff) >> (8-nBlueBits_); + + return MAKE_SALCOLOR( r, g, b ); +} + +Pixel SalVisual::GetTCPixel( SalColor nSalColor ) const +{ + if( SALCOLOR == eRGBMode_ ) + return (Pixel)nSalColor; + + Pixel r = (Pixel)SALCOLOR_RED( nSalColor ); + Pixel g = (Pixel)SALCOLOR_GREEN( nSalColor ); + Pixel b = (Pixel)SALCOLOR_BLUE( nSalColor ); + + if( SALCOLORREVERSE == eRGBMode_ ) + return (b << 16) | (g << 8) | (r); + + if( other != eRGBMode_ ) // 8+8+8=24 + return (r << nRedShift_) | (g << nGreenShift_) | (b << nBlueShift_); + + if( nRedShift_ > 0 ) r <<= nRedShift_; else r >>= -nRedShift_; + if( nGreenShift_ > 0 ) g <<= nGreenShift_; else g >>= -nGreenShift_; + if( nBlueShift_ > 0 ) b <<= nBlueShift_; else b >>= -nBlueShift_; + + return (r&red_mask) | (g&green_mask) | (b&blue_mask); +} + +// -=-= SalColormap -=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +SalColormap::SalColormap( const SalDisplay *pDisplay, Colormap hColormap, int nScreen ) + : m_pDisplay( pDisplay ), + m_hColormap( hColormap ), + m_nScreen( nScreen ) +{ + m_aVisual = m_pDisplay->GetVisual( m_nScreen ); + + XColor aColor; + + GetXPixel( aColor, 0x00, 0x00, 0x00 ); + m_nBlackPixel = aColor.pixel; + + GetXPixel( aColor, 0xFF, 0xFF, 0xFF ); + m_nWhitePixel = aColor.pixel; + + m_nUsed = 1 << m_aVisual.GetDepth(); + + if( m_aVisual.GetClass() == PseudoColor ) + { + int r, g, b; + + // black, white, gray, ~gray = 4 + GetXPixels( aColor, 0xC0, 0xC0, 0xC0 ); + + // light colors: 3 * 2 = 6 +// GetXPixels( aColor, 0x00, 0x00, 0x00 ); + GetXPixels( aColor, 0x00, 0x00, 0xFF ); + GetXPixels( aColor, 0x00, 0xFF, 0x00 ); + GetXPixels( aColor, 0x00, 0xFF, 0xFF ); +// GetXPixels( aColor, 0xFF, 0x00, 0x00 ); +// GetXPixels( aColor, 0xFF, 0x00, 0xFF ); +// GetXPixels( aColor, 0xFF, 0xFF, 0x00 ); +// GetXPixels( aColor, 0xFF, 0xFF, 0xFF ); + + // standard colors: 7 * 2 = 14 +// GetXPixels( aColor, 0x00, 0x00, 0x00 ); + GetXPixels( aColor, 0x00, 0x00, 0x80 ); + GetXPixels( aColor, 0x00, 0x80, 0x00 ); + GetXPixels( aColor, 0x00, 0x80, 0x80 ); + GetXPixels( aColor, 0x80, 0x00, 0x00 ); + GetXPixels( aColor, 0x80, 0x00, 0x80 ); + GetXPixels( aColor, 0x80, 0x80, 0x00 ); + GetXPixels( aColor, 0x80, 0x80, 0x80 ); + GetXPixels( aColor, 0x00, 0xB8, 0xFF ); // Blau 7 + + // cube: 6*6*6 - 8 = 208 + for( r = 0; r < 0x100; r += 0x33 ) // 0x33, 0x66, 0x99, 0xCC, 0xFF + for( g = 0; g < 0x100; g += 0x33 ) + for( b = 0; b < 0x100; b += 0x33 ) + GetXPixels( aColor, r, g, b ); + + // gray: 16 - 6 = 10 + for( g = 0x11; g < 0xFF; g += 0x11 ) + GetXPixels( aColor, g, g, g ); + + // green: 16 - 6 = 10 + for( g = 0x11; g < 0xFF; g += 0x11 ) + GetXPixels( aColor, 0, g, 0 ); + + // red: 16 - 6 = 10 + for( r = 0x11; r < 0xFF; r += 0x11 ) + GetXPixels( aColor, r, 0, 0 ); + + // blue: 16 - 6 = 10 + for( b = 0x11; b < 0xFF; b += 0x11 ) + GetXPixels( aColor, 0, 0, b ); + } +} + +// PseudoColor +SalColormap::SalColormap( const BitmapPalette &rPalette ) + : m_pDisplay( GetX11SalData()->GetDisplay() ), + m_hColormap( None ), + m_nWhitePixel( SALCOLOR_NONE ), + m_nBlackPixel( SALCOLOR_NONE ), + m_nUsed( rPalette.GetEntryCount() ), + m_nScreen( GetX11SalData()->GetDisplay()->GetDefaultScreenNumber() ) +{ + m_aPalette = std::vector(m_nUsed); + + for( unsigned int i = 0; i < m_nUsed; i++ ) + { + const BitmapColor &rColor = rPalette[i]; + m_aPalette[i] = MAKE_SALCOLOR( rColor.GetRed(), + rColor.GetGreen(), + rColor.GetBlue() ); + if( (m_nBlackPixel == SALCOLOR_NONE) && (SALCOLOR_BLACK == m_aPalette[i]) ) + m_nBlackPixel = i; + else if( (m_nWhitePixel == SALCOLOR_NONE) && (SALCOLOR_WHITE == m_aPalette[i]) ) + m_nWhitePixel = i; + } +} + +// MonoChrome +SalColormap::SalColormap() + : m_pDisplay( GetX11SalData()->GetDisplay() ), + m_hColormap( None ), + m_nWhitePixel( 1 ), + m_nBlackPixel( 0 ), + m_nUsed( 2 ), + m_nScreen( 0 ) +{ + if( m_pDisplay ) + m_nScreen = m_pDisplay->GetDefaultScreenNumber(); + m_aPalette = std::vector(m_nUsed); + + m_aPalette[m_nBlackPixel] = SALCOLOR_BLACK; + m_aPalette[m_nWhitePixel] = SALCOLOR_WHITE; +} + +// TrueColor +SalColormap::SalColormap( USHORT nDepth ) + : m_pDisplay( GetX11SalData()->GetDisplay() ), + m_hColormap( None ), + m_nWhitePixel( (1 << nDepth) - 1 ), + m_nBlackPixel( 0x00000000 ), + m_nUsed( 1 << nDepth ), + m_nScreen( GetX11SalData()->GetDisplay()->GetDefaultScreenNumber() ) +{ + const SalVisual *pVisual = &m_pDisplay->GetVisual( m_nScreen ); + + if( pVisual->GetClass() == TrueColor && pVisual->GetDepth() == nDepth ) + m_aVisual = *pVisual; + else + { + XVisualInfo aVI; + + if( !XMatchVisualInfo( m_pDisplay->GetDisplay(), + m_pDisplay->GetDefaultScreenNumber(), + nDepth, + TrueColor, + &aVI ) ) + { + aVI.visual = new Visual(); + aVI.visualid = (VisualID)0; // beware of temporary destructor below + aVI.screen = 0; + aVI.depth = nDepth; + aVI.c_class = TrueColor; + if( 24 == nDepth ) // 888 + { + aVI.red_mask = 0xFF0000; + aVI.green_mask = 0x00FF00; + aVI.blue_mask = 0x0000FF; + } + else if( 16 == nDepth ) // 565 + { + aVI.red_mask = 0x00F800; + aVI.green_mask = 0x0007E0; + aVI.blue_mask = 0x00001F; + } + else if( 15 == nDepth ) // 555 + { + aVI.red_mask = 0x007C00; + aVI.green_mask = 0x0003E0; + aVI.blue_mask = 0x00001F; + } + else if( 12 == nDepth ) // 444 + { + aVI.red_mask = 0x000F00; + aVI.green_mask = 0x0000F0; + aVI.blue_mask = 0x00000F; + } + else if( 8 == nDepth ) // 332 + { + aVI.red_mask = 0x0000E0; + aVI.green_mask = 0x00001C; + aVI.blue_mask = 0x000003; + } + else + { + aVI.red_mask = 0x000000; + aVI.green_mask = 0x000000; + aVI.blue_mask = 0x000000; + } + aVI.colormap_size = 0; + aVI.bits_per_rgb = 8; + + aVI.visual->ext_data = NULL; + aVI.visual->visualid = aVI.visualid; + aVI.visual->c_class = aVI.c_class; + aVI.visual->red_mask = aVI.red_mask; + aVI.visual->green_mask = aVI.green_mask; + aVI.visual->blue_mask = aVI.blue_mask; + aVI.visual->bits_per_rgb = aVI.bits_per_rgb; + aVI.visual->map_entries = aVI.colormap_size; + + m_aVisual = SalVisual( &aVI ); + // give ownership of constructed Visual() to m_aVisual + // see SalVisual destructor + m_aVisual.visualid = (VisualID)-1; + m_aVisual.screen = -1; + } + else + m_aVisual = SalVisual( &aVI ); + } +} + +SalColormap::~SalColormap() +{ +#ifdef DBG_UTIL + m_hColormap = (Colormap)ILLEGAL_POINTER; + m_pDisplay = (SalDisplay*)ILLEGAL_POINTER; +#endif +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void SalColormap::SetPalette( const BitmapPalette &rPalette ) +{ + if( this != &GetX11SalData()->GetDisplay()->GetColormap(m_nScreen) ) + { + m_nBlackPixel = SALCOLOR_NONE; + m_nWhitePixel = SALCOLOR_NONE; + } + + if( rPalette.GetEntryCount() > m_nUsed ) + { + m_nBlackPixel = SALCOLOR_NONE; + m_nWhitePixel = SALCOLOR_NONE; + m_nUsed = rPalette.GetEntryCount(); + m_aPalette = std::vector(m_nUsed); + } + + for( int i = 0; i < rPalette.GetEntryCount(); i++ ) + { + const BitmapColor &rColor = rPalette[i]; + m_aPalette[i] = MAKE_SALCOLOR( rColor.GetRed(), + rColor.GetGreen(), + rColor.GetBlue() ); + if( (m_nBlackPixel == SALCOLOR_NONE) && (SALCOLOR_BLACK == m_aPalette[i]) ) + m_nBlackPixel = i; + else if( (m_nWhitePixel == SALCOLOR_NONE) && (SALCOLOR_WHITE == m_aPalette[i]) ) + m_nWhitePixel = i; + } +} + +void SalColormap::GetPalette() +{ + Pixel i; + m_aPalette = std::vector(m_nUsed); + + XColor *aColor = new XColor[m_nUsed]; + + for( i = 0; i < m_nUsed; i++ ) + { + aColor[i].red = aColor[i].green = aColor[i].blue = 0; + aColor[i].pixel = i; + } + + XQueryColors( m_pDisplay->GetDisplay(), m_hColormap, aColor, m_nUsed ); + + for( i = 0; i < m_nUsed; i++ ) + { + m_aPalette[i] = MAKE_SALCOLOR( aColor[i].red >> 8, + aColor[i].green >> 8, + aColor[i].blue >> 8 ); + } + + delete [] aColor; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +static USHORT sal_Lookup( const std::vector& rPalette, + int r, int g, int b, + Pixel nUsed ) +{ + USHORT nPixel = 0; + int nBest = ColorDiff( rPalette[0], r, g, b ); + + for( USHORT i = 1; i < nUsed; i++ ) + { + int n = ColorDiff( rPalette[i], r, g, b ); + + if( n < nBest ) + { + if( !n ) + return i; + + nPixel = i; + nBest = n; + } + } + return nPixel; +} + +void SalColormap::GetLookupTable() +{ + m_aLookupTable = std::vector(16*16*16); + + int i = 0; + for( int r = 0; r < 256; r += 17 ) + for( int g = 0; g < 256; g += 17 ) + for( int b = 0; b < 256; b += 17 ) + m_aLookupTable[i++] = sal_Lookup( m_aPalette, r, g, b, m_nUsed ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +SalColor SalColormap::GetColor( Pixel nPixel ) const +{ + if( m_nBlackPixel == nPixel ) return SALCOLOR_BLACK; + if( m_nWhitePixel == nPixel ) return SALCOLOR_WHITE; + + if( m_aVisual.GetVisual() ) + { + if( m_aVisual.GetClass() == TrueColor ) + return m_aVisual.GetTCColor( nPixel ); + + if( m_aPalette.empty() + && m_hColormap +#ifdef PSEUDOCOLOR12 + && m_aVisual.GetDepth() <= 12 +#else + && m_aVisual.GetDepth() <= 8 +#endif + && m_aVisual.GetClass() == PseudoColor ) + ((SalColormap*)this)->GetPalette(); + } + + if( !m_aPalette.empty() && nPixel < m_nUsed ) + return m_aPalette[nPixel]; + + if( m_hColormap ) + { + DBG_ASSERT( 1, "SalColormap::GetColor() !hColormap_\n" ); + return nPixel; + } + + // DirectColor, StaticColor, StaticGray, GrayScale + XColor aColor; + + aColor.pixel = nPixel; + + XQueryColor( m_pDisplay->GetDisplay(), m_hColormap, &aColor ); + + return MAKE_SALCOLOR( aColor.red>>8, aColor.green>>8, aColor.blue>>8 ); +} + +inline BOOL SalColormap::GetXPixel( XColor &rColor, + int r, + int g, + int b ) const +{ + rColor.red = r * 257; + rColor.green = g * 257; + rColor.blue = b * 257; + return XAllocColor( GetXDisplay(), m_hColormap, &rColor ); +} + +BOOL SalColormap::GetXPixels( XColor &rColor, + int r, + int g, + int b ) const +{ + if( !GetXPixel( rColor, r, g, b ) ) + return FALSE; + if( rColor.pixel & 1 ) + return TRUE; + return GetXPixel( rColor, r^0xFF, g^0xFF, b^0xFF ); +} + +Pixel SalColormap::GetPixel( SalColor nSalColor ) const +{ + if( SALCOLOR_NONE == nSalColor ) return 0; + if( SALCOLOR_BLACK == nSalColor ) return m_nBlackPixel; + if( SALCOLOR_WHITE == nSalColor ) return m_nWhitePixel; + + if( m_aVisual.GetClass() == TrueColor ) + return m_aVisual.GetTCPixel( nSalColor ); + + if( m_aLookupTable.empty() ) + { + if( m_aPalette.empty() + && m_hColormap +#ifdef PSEUDOCOLOR12 + && m_aVisual.GetDepth() <= 12 +#else + && m_aVisual.GetDepth() <= 8 +#endif + && m_aVisual.GetClass() == PseudoColor ) // what else ??? + ((SalColormap*)this)->GetPalette(); + + if( !m_aPalette.empty() ) + for( Pixel i = 0; i < m_nUsed; i++ ) + if( m_aPalette[i] == nSalColor ) + return i; + + if( m_hColormap ) + { + // DirectColor, StaticColor, StaticGray, GrayScale (PseudoColor) + XColor aColor; + + if( GetXPixel( aColor, + SALCOLOR_RED ( nSalColor ), + SALCOLOR_GREEN( nSalColor ), + SALCOLOR_BLUE ( nSalColor ) ) ) + { + if( !m_aPalette.empty() && !m_aPalette[aColor.pixel] ) + { + const_cast(this)->m_aPalette[aColor.pixel] = nSalColor; + + if( !(aColor.pixel & 1) && !m_aPalette[aColor.pixel+1] ) + { + XColor aInversColor; + + SalColor nInversColor = nSalColor ^ 0xFFFFFF; + + GetXPixel( aInversColor, + SALCOLOR_RED ( nInversColor ), + SALCOLOR_GREEN( nInversColor ), + SALCOLOR_BLUE ( nInversColor ) ); + + if( !m_aPalette[aInversColor.pixel] ) + const_cast(this)->m_aPalette[aInversColor.pixel] = nInversColor; +#ifdef DBG_UTIL + else + fprintf( stderr, "SalColormap::GetPixel() 0x%06lx=%lu 0x%06lx=%lu\n", + static_cast< unsigned long >(nSalColor), aColor.pixel, + static_cast< unsigned long >(nInversColor), aInversColor.pixel); +#endif + } + } + + return aColor.pixel; + } + +#ifdef DBG_UTIL + fprintf( stderr, "SalColormap::GetPixel() !XAllocColor %lx\n", + static_cast< unsigned long >(nSalColor) ); +#endif + } + + if( m_aPalette.empty() ) + { +#ifdef DBG_UTIL + fprintf( stderr, "SalColormap::GetPixel() Palette empty %lx\n", + static_cast< unsigned long >(nSalColor)); +#endif + return nSalColor; + } + + ((SalColormap*)this)->GetLookupTable(); + } + + // Colormatching ueber Palette + USHORT r = SALCOLOR_RED ( nSalColor ); + USHORT g = SALCOLOR_GREEN( nSalColor ); + USHORT b = SALCOLOR_BLUE ( nSalColor ); + return m_aLookupTable[ (((r+8)/17) << 8) + + (((g+8)/17) << 4) + + ((b+8)/17) ]; +} + diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx new file mode 100644 index 000000000000..98bce72d6bce --- /dev/null +++ b/vcl/unx/generic/app/salinst.cxx @@ -0,0 +1,452 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include +#include + +#include "osl/module.hxx" +#include "tools/solarmutex.hxx" +#include "vos/mutex.hxx" + + +#include "unx/salunx.h" +#include "unx/saldata.hxx" +#include "unx/saldisp.hxx" +#include "unx/salinst.h" +#include "unx/salframe.h" +#include "unx/dtint.hxx" +#include "unx/salprn.h" +#include "unx/sm.hxx" + +#include "vcl/apptypes.hxx" +#include "vcl/helper.hxx" + +#include "salwtype.hxx" + +// ------------------------------------------------------------------------- +// +// SalYieldMutex +// +// ------------------------------------------------------------------------- + +SalYieldMutex::SalYieldMutex() +{ + mnCount = 0; + mnThreadId = 0; + ::tools::SolarMutex::SetSolarMutex( this ); +} + +void SalYieldMutex::acquire() +{ + OMutex::acquire(); + mnThreadId = vos::OThread::getCurrentIdentifier(); + mnCount++; +} + +void SalYieldMutex::release() +{ + if ( mnThreadId == vos::OThread::getCurrentIdentifier() ) + { + if ( mnCount == 1 ) + mnThreadId = 0; + mnCount--; + } + OMutex::release(); +} + +sal_Bool SalYieldMutex::tryToAcquire() +{ + if ( OMutex::tryToAcquire() ) + { + mnThreadId = vos::OThread::getCurrentIdentifier(); + mnCount++; + return True; + } + else + return False; +} + +//---------------------------------------------------------------------------- + +// -=-= SalInstance =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +// plugin factory function +extern "C" +{ + VCL_DLLPUBLIC SalInstance* create_SalInstance() + { + /* #i92121# workaround deadlocks in the X11 implementation + */ + static const char* pNoXInitThreads = getenv( "SAL_NO_XINITTHREADS" ); + /* #i90094# + from now on we know that an X connection will be + established, so protect X against itself + */ + if( ! ( pNoXInitThreads && *pNoXInitThreads ) ) + XInitThreads(); + + X11SalInstance* pInstance = new X11SalInstance( new SalYieldMutex() ); + + // initialize SalData + X11SalData *pSalData = new X11SalData; + SetSalData( pSalData ); + pSalData->m_pInstance = pInstance; + pSalData->Init(); + + return pInstance; + } +} + +X11SalInstance::~X11SalInstance() +{ + // close session management + SessionManagerClient::close(); + + // dispose SalDisplay list from SalData + // would be done in a static destructor else which is + // a little late + + X11SalData *pSalData = GetX11SalData(); + pSalData->deInitNWF(); + delete pSalData; + SetSalData( NULL ); + + ::tools::SolarMutex::SetSolarMutex( 0 ); + delete mpSalYieldMutex; +} + + +// -------------------------------------------------------- +// AnyInput from sv/mow/source/app/svapp.cxx + +struct PredicateReturn +{ + USHORT nType; + BOOL bRet; +}; + +extern "C" { +Bool ImplPredicateEvent( Display *, XEvent *pEvent, char *pData ) +{ + PredicateReturn *pPre = (PredicateReturn *)pData; + + if ( pPre->bRet ) + return False; + + USHORT nType; + + switch( pEvent->type ) + { + case ButtonPress: + case ButtonRelease: + case MotionNotify: + case EnterNotify: + case LeaveNotify: + nType = INPUT_MOUSE; + break; + + case XLIB_KeyPress: + //case KeyRelease: + nType = INPUT_KEYBOARD; + break; + case Expose: + case GraphicsExpose: + case NoExpose: + nType = INPUT_PAINT; + break; + default: + nType = 0; + } + + if ( (nType & pPre->nType) || ( ! nType && (pPre->nType & INPUT_OTHER) ) ) + pPre->bRet = TRUE; + + return False; +} +} + +bool X11SalInstance::AnyInput(USHORT nType) +{ + X11SalData *pSalData = GetX11SalData(); + Display *pDisplay = pSalData->GetDisplay()->GetDisplay(); + BOOL bRet = FALSE; + + if( (nType & INPUT_TIMER) && + pSalData->GetDisplay()->GetXLib()->CheckTimeout( false ) ) + { + bRet = TRUE; + } + else if (XPending(pDisplay) ) + { + PredicateReturn aInput; + XEvent aEvent; + + aInput.bRet = FALSE; + aInput.nType = nType; + + XCheckIfEvent(pDisplay, &aEvent, ImplPredicateEvent, + (char *)&aInput ); + + bRet = aInput.bRet; + } + return bRet; +} + +vos::IMutex* X11SalInstance::GetYieldMutex() +{ + return mpSalYieldMutex; +} + +// ----------------------------------------------------------------------- + +ULONG X11SalInstance::ReleaseYieldMutex() +{ + SalYieldMutex* pYieldMutex = mpSalYieldMutex; + if ( pYieldMutex->GetThreadId() == + vos::OThread::getCurrentIdentifier() ) + { + ULONG nCount = pYieldMutex->GetAcquireCount(); + ULONG n = nCount; + while ( n ) + { + pYieldMutex->release(); + n--; + } + + return nCount; + } + else + return 0; +} + +// ----------------------------------------------------------------------- + +void X11SalInstance::AcquireYieldMutex( ULONG nCount ) +{ + SalYieldMutex* pYieldMutex = mpSalYieldMutex; + while ( nCount ) + { + pYieldMutex->acquire(); + nCount--; + } +} + +// ----------------------------------------------------------------------- + +bool X11SalInstance::CheckYieldMutex() +{ + bool bRet = true; + + SalYieldMutex* pYieldMutex = mpSalYieldMutex; + if ( pYieldMutex->GetThreadId() != + vos::OThread::getCurrentIdentifier() ) + { + bRet = false; + } + + return bRet; +} + +// ----------------------------------------------------------------------- + +void X11SalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents ) +{ GetX11SalData()->GetLib()->Yield( bWait, bHandleAllCurrentEvents ); } + +void* X11SalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ) +{ + static const char* pDisplay = getenv( "DISPLAY" ); + rReturnedType = AsciiCString; + rReturnedBytes = pDisplay ? strlen( pDisplay )+1 : 1; + return pDisplay ? (void*)pDisplay : (void*)""; +} + +SalFrame *X11SalInstance::CreateFrame( SalFrame *pParent, ULONG nSalFrameStyle ) +{ + SalFrame *pFrame = new X11SalFrame( pParent, nSalFrameStyle ); + + return pFrame; +} + +SalFrame* X11SalInstance::CreateChildFrame( SystemParentData* pParentData, ULONG nStyle ) +{ + SalFrame* pFrame = new X11SalFrame( NULL, nStyle, pParentData ); + + return pFrame; +} + +void X11SalInstance::DestroyFrame( SalFrame* pFrame ) +{ + delete pFrame; +} + +static void getServerDirectories( std::list< rtl::OString >& o_rFontPaths ) +{ +#ifdef LINUX + /* + * chkfontpath exists on some (RH derived) Linux distributions + */ + static const char* pCommands[] = { + "/usr/sbin/chkfontpath 2>/dev/null", "chkfontpath 2>/dev/null" + }; + ::std::list< ByteString > aLines; + + for( unsigned int i = 0; i < sizeof(pCommands)/sizeof(pCommands[0]); i++ ) + { + FILE* pPipe = popen( pCommands[i], "r" ); + aLines.clear(); + if( pPipe ) + { + char line[1024]; + char* pSearch; + while( fgets( line, sizeof(line), pPipe ) ) + { + int nLen = strlen( line ); + if( line[nLen-1] == '\n' ) + line[nLen-1] = 0; + pSearch = strstr( line, ": " ); + if( pSearch ) + aLines.push_back( pSearch+2 ); + } + if( ! pclose( pPipe ) ) + break; + } + } + + for( ::std::list< ByteString >::iterator it = aLines.begin(); it != aLines.end(); ++it ) + { + if( ! access( it->GetBuffer(), F_OK ) ) + { + o_rFontPaths.push_back( *it ); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "adding fs dir %s\n", it->GetBuffer() ); +#endif + } + } +#else + (void)o_rFontPaths; +#endif +} + + + +void X11SalInstance::FillFontPathList( std::list< rtl::OString >& o_rFontPaths ) +{ + Display *pDisplay = GetX11SalData()->GetDisplay()->GetDisplay(); + + DBG_ASSERT( pDisplay, "No Display !" ); + if( pDisplay ) + { + // get font paths to look for fonts + int nPaths = 0, i; + char** pPaths = XGetFontPath( pDisplay, &nPaths ); + + bool bServerDirs = false; + for( i = 0; i < nPaths; i++ ) + { + OString aPath( pPaths[i] ); + sal_Int32 nPos = 0; + if( ! bServerDirs + && ( nPos = aPath.indexOf( ':' ) ) > 0 + && ( !aPath.copy(nPos).equals( ":unscaled" ) ) ) + { + bServerDirs = true; + getServerDirectories( o_rFontPaths ); + } + else + { + psp::normPath( aPath ); + o_rFontPaths.push_back( aPath ); + } + } + + if( nPaths ) + XFreeFontPath( pPaths ); + } + + // insert some standard directories + o_rFontPaths.push_back( "/usr/openwin/lib/X11/fonts/TrueType" ); + o_rFontPaths.push_back( "/usr/openwin/lib/X11/fonts/Type1" ); + o_rFontPaths.push_back( "/usr/openwin/lib/X11/fonts/Type1/sun" ); + o_rFontPaths.push_back( "/usr/X11R6/lib/X11/fonts/truetype" ); + o_rFontPaths.push_back( "/usr/X11R6/lib/X11/fonts/Type1" ); + + #ifdef SOLARIS + /* cde specials, from /usr/dt/bin/Xsession: here are the good fonts, + the OWfontpath file may contain as well multiple lines as a comma + separated list of fonts in each line. to make it even more weird + environment variables are allowed as well */ + + const char* lang = getenv("LANG"); + if ( lang != NULL ) + { + String aOpenWinDir( String::CreateFromAscii( "/usr/openwin/lib/locale/" ) ); + aOpenWinDir.AppendAscii( lang ); + aOpenWinDir.AppendAscii( "/OWfontpath" ); + + SvFileStream aStream( aOpenWinDir, STREAM_READ ); + + // TODO: replace environment variables + while( aStream.IsOpen() && ! aStream.IsEof() ) + { + ByteString aLine; + aStream.ReadLine( aLine ); + // need an OString for normpath + OString aNLine( aLine ); + psp::normPath( aNLine ); + aLine = aNLine; + // try to avoid bad fonts in some cases + static bool bAvoid = (strncasecmp( lang, "ar", 2 ) == 0) || (strncasecmp( lang, "he", 2 ) == 0) || strncasecmp( lang, "iw", 2 ) == 0 || (strncasecmp( lang, "hi", 2 ) == 0); + if( bAvoid && aLine.Search( "iso_8859" ) != STRING_NOTFOUND ) + continue; + o_rFontPaths.push_back( aLine ); + } + } + #endif /* SOLARIS */ +} + +extern "C" { static void SAL_CALL thisModule() {} } + +void X11SalInstance::AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType) +{ + const rtl::OUString SYM_ADD_TO_RECENTLY_USED_FILE_LIST(RTL_CONSTASCII_USTRINGPARAM("add_to_recently_used_file_list")); + const rtl::OUString LIB_RECENT_FILE(RTL_CONSTASCII_USTRINGPARAM("librecentfile.so")); + typedef void (*PFUNC_ADD_TO_RECENTLY_USED_LIST)(const rtl::OUString&, const rtl::OUString&); + + PFUNC_ADD_TO_RECENTLY_USED_LIST add_to_recently_used_file_list = 0; + + osl::Module module; + module.loadRelative( &thisModule, LIB_RECENT_FILE ); + if (module.is()) + add_to_recently_used_file_list = (PFUNC_ADD_TO_RECENTLY_USED_LIST)module.getFunctionSymbol(SYM_ADD_TO_RECENTLY_USED_FILE_LIST); + if (add_to_recently_used_file_list) + add_to_recently_used_file_list(rFileUrl, rMimeType); +} diff --git a/vcl/unx/generic/app/salsys.cxx b/vcl/unx/generic/app/salsys.cxx new file mode 100644 index 000000000000..92f0748b6460 --- /dev/null +++ b/vcl/unx/generic/app/salsys.cxx @@ -0,0 +1,226 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include +#include + + +SalSystem* X11SalInstance::CreateSalSystem() +{ + return new X11SalSystem(); +} + +// ----------------------------------------------------------------------- + +X11SalSystem::~X11SalSystem() +{ +} + +// for the moment only handle xinerama case +unsigned int X11SalSystem::GetDisplayScreenCount() +{ + SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); + return pSalDisp->IsXinerama() ? pSalDisp->GetXineramaScreens().size() : pSalDisp->GetScreenCount(); +} + +bool X11SalSystem::IsMultiDisplay() +{ + SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); + unsigned int nScreenCount = pSalDisp->GetScreenCount(); + return pSalDisp->IsXinerama() ? false : (nScreenCount > 1); +} + +unsigned int X11SalSystem::GetDefaultDisplayNumber() +{ + SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); + return pSalDisp->IsXinerama() ? pSalDisp->GetDefaultMonitorNumber() : pSalDisp->GetDefaultScreenNumber(); +} + +Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) +{ + Rectangle aRet; + SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); + if( pSalDisp->IsXinerama() ) + { + const std::vector< Rectangle >& rScreens = pSalDisp->GetXineramaScreens(); + if( nScreen < rScreens.size() ) + aRet = rScreens[nScreen]; + } + else + { + const SalDisplay::ScreenData& rScreen = pSalDisp->getDataForScreen( nScreen ); + aRet = Rectangle( Point( 0, 0 ), rScreen.m_aSize ); + } + + return aRet; +} + +Rectangle X11SalSystem::GetDisplayWorkAreaPosSizePixel( unsigned int nScreen ) +{ + // FIXME: workareas + return GetDisplayScreenPosSizePixel( nScreen ); +} + +rtl::OUString X11SalSystem::GetScreenName( unsigned int nScreen ) +{ + rtl::OUString aScreenName; + SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); + if( pSalDisp->IsXinerama() ) + { + const std::vector< Rectangle >& rScreens = pSalDisp->GetXineramaScreens(); + if( nScreen >= rScreens.size() ) + nScreen = 0; + rtl::OUStringBuffer aBuf( 256 ); + aBuf.append( rtl::OStringToOUString( rtl::OString( DisplayString( pSalDisp->GetDisplay() ) ), osl_getThreadTextEncoding() ) ); + aBuf.appendAscii( " [" ); + aBuf.append( static_cast(nScreen) ); + aBuf.append( sal_Unicode(']') ); + aScreenName = aBuf.makeStringAndClear(); + } + else + { + if( nScreen >= static_cast(pSalDisp->GetScreenCount()) ) + nScreen = 0; + rtl::OUStringBuffer aBuf( 256 ); + aBuf.append( rtl::OStringToOUString( rtl::OString( DisplayString( pSalDisp->GetDisplay() ) ), osl_getThreadTextEncoding() ) ); + // search backwards for ':' + int nPos = aBuf.getLength(); + if( nPos > 0 ) + nPos--; + while( nPos > 0 && aBuf.charAt( nPos ) != ':' ) + nPos--; + // search forward to '.' + while( nPos < aBuf.getLength() && aBuf.charAt( nPos ) != '.' ) + nPos++; + if( nPos < aBuf.getLength() ) + aBuf.setLength( nPos+1 ); + else + aBuf.append( sal_Unicode('.') ); + aBuf.append( static_cast(nScreen) ); + aScreenName = aBuf.makeStringAndClear(); + } + return aScreenName; +} + +int X11SalSystem::ShowNativeDialog( const String& rTitle, const String& rMessage, const std::list< String >& rButtons, int nDefButton ) +{ + int nRet = -1; + + ImplSVData* pSVData = ImplGetSVData(); + if( pSVData->mpIntroWindow ) + pSVData->mpIntroWindow->Hide(); + + WarningBox aWarn( NULL, WB_STDWORK, rMessage ); + aWarn.SetText( rTitle ); + aWarn.Clear(); + + USHORT nButton = 0; + for( std::list< String >::const_iterator it = rButtons.begin(); it != rButtons.end(); ++it ) + { + aWarn.AddButton( *it, nButton+1, nButton == (USHORT)nDefButton ? BUTTONDIALOG_DEFBUTTON : 0 ); + nButton++; + } + aWarn.SetFocusButton( (USHORT)nDefButton+1 ); + + nRet = ((int)aWarn.Execute()) - 1; + + // normalize behaviour, actually this should never happen + if( nRet < -1 || nRet >= int(rButtons.size()) ) + nRet = -1; + + return nRet; +} + +int X11SalSystem::ShowNativeMessageBox(const String& rTitle, const String& rMessage, int nButtonCombination, int nDefaultButton) +{ + int nDefButton = 0; + std::list< String > aButtons; + int nButtonIds[5], nBut = 0; + + if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK || + nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL ) + { + aButtons.push_back( Button::GetStandardText( BUTTON_OK ) ); + nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK; + } + if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO_CANCEL || + nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO ) + { + aButtons.push_back( Button::GetStandardText( BUTTON_YES ) ); + nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_YES; + aButtons.push_back( Button::GetStandardText( BUTTON_NO ) ); + nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO; + if( nDefaultButton == SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO ) + nDefButton = 1; + } + if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL || + nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO_CANCEL || + nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL ) + { + if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL ) + { + aButtons.push_back( Button::GetStandardText( BUTTON_RETRY ) ); + nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY; + } + aButtons.push_back( Button::GetStandardText( BUTTON_CANCEL ) ); + nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL; + if( nDefaultButton == SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL ) + nDefButton = aButtons.size()-1; + } + if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_ABORT_RETRY_IGNORE ) + { + aButtons.push_back( Button::GetStandardText( BUTTON_ABORT ) ); + nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_ABORT; + aButtons.push_back( Button::GetStandardText( BUTTON_RETRY ) ); + nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY; + aButtons.push_back( Button::GetStandardText( BUTTON_IGNORE ) ); + nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_IGNORE; + switch( nDefaultButton ) + { + case SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY: nDefButton = 1;break; + case SALSYSTEM_SHOWNATIVEMSGBOX_BTN_IGNORE: nDefButton = 2;break; + } + } + int nResult = ShowNativeDialog( rTitle, rMessage, aButtons, nDefButton ); + + return nResult != -1 ? nButtonIds[ nResult ] : 0; +} diff --git a/vcl/unx/generic/app/saltimer.cxx b/vcl/unx/generic/app/saltimer.cxx new file mode 100644 index 000000000000..d68ec388448e --- /dev/null +++ b/vcl/unx/generic/app/saltimer.cxx @@ -0,0 +1,96 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +// -=-= SalData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalData::Timeout() const +{ + ImplSVData* pSVData = ImplGetSVData(); + if( pSVData->mpSalTimer ) + pSVData->mpSalTimer->CallCallback(); +} + +// -=-= SalXLib =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void SalXLib::StopTimer() +{ + m_aTimeout.tv_sec = 0; + m_aTimeout.tv_usec = 0; + m_nTimeoutMS = 0; +} + +void SalXLib::StartTimer( ULONG nMS ) +{ + timeval Timeout (m_aTimeout); // previous timeout. + gettimeofday (&m_aTimeout, 0); + + m_nTimeoutMS = nMS; + m_aTimeout += m_nTimeoutMS; + + if ((Timeout > m_aTimeout) || (Timeout.tv_sec == 0)) + { + // Wakeup from previous timeout (or stopped timer). + Wakeup(); + } +} + +// -=-= SalTimer -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +SalTimer* X11SalInstance::CreateSalTimer() +{ + return new X11SalTimer(); +} + +X11SalTimer::~X11SalTimer() +{ +} + +void X11SalTimer::Stop() +{ + GetX11SalData()->GetLib()->StopTimer(); +} + +void X11SalTimer::Start( ULONG nMS ) +{ + GetX11SalData()->GetLib()->StartTimer( nMS ); +} + diff --git a/vcl/unx/generic/app/sm.cxx b/vcl/unx/generic/app/sm.cxx new file mode 100644 index 000000000000..c421ceeaf0e3 --- /dev/null +++ b/vcl/unx/generic/app/sm.cxx @@ -0,0 +1,801 @@ +/************************************************************************* + * + * 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_vcl.hxx" +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#define USE_SM_EXTENSION + +#if OSL_DEBUG_LEVEL > 1 +#include +static bool bFirstAssert = true; +#endif + +#if OSL_DEBUG_LEVEL > 1 +inline void SMprintf( const char* pFormat, ... ) +#else +inline void SMprintf( const char*, ... ) +#endif +{ +#if OSL_DEBUG_LEVEL > 1 + FILE* fp = fopen( "/tmp/sessionlog.txt", bFirstAssert ? "w" : "a" ); + if(!fp) return; + bFirstAssert = false; + std::va_list ap; + va_start( ap, pFormat ); + vfprintf( fp, pFormat, ap ); + fclose( fp ); + va_end( ap ); +#endif +}; + +static IceSalSession* pOneInstance = NULL; + +SalSession* X11SalInstance::CreateSalSession() +{ + if( ! pOneInstance ) + pOneInstance = new IceSalSession(); + return pOneInstance; +} + +/* + * class IceSalSession + */ + +static X11SalFrame* pOldStyleSaveFrame = NULL; + +IceSalSession::IceSalSession() +{ +} + +IceSalSession::~IceSalSession() +{ + if( pOneInstance == this ) + pOneInstance = NULL; +} + +void IceSalSession::queryInteraction() +{ + if( ! SessionManagerClient::queryInteraction() ) + { + SalSessionInteractionEvent aEvent( false ); + CallCallback( &aEvent ); + } +} + +void IceSalSession::interactionDone() +{ + SessionManagerClient::interactionDone( false ); +} + +void IceSalSession::saveDone() +{ + SessionManagerClient::saveDone(); + if( pOldStyleSaveFrame ) + { + // note: does nothing if not running in generic plugin + X11SalFrame::SaveYourselfDone( pOldStyleSaveFrame ); + } +} + +bool IceSalSession::cancelShutdown() +{ + SessionManagerClient::interactionDone( true ); + return false; +} + +void IceSalSession::handleOldX11SaveYourself( SalFrame* pFrame ) +{ + // do this only once + if( ! pOldStyleSaveFrame ) + { + pOldStyleSaveFrame = static_cast(pFrame); + if( pOneInstance ) + { + SalSessionSaveRequestEvent aEvent( true, false ); + pOneInstance->CallCallback( &aEvent ); + } + } +} + +extern "C" void SAL_CALL ICEConnectionWorker( void* ); + +class ICEConnectionObserver +{ + friend void SAL_CALL ICEConnectionWorker(void*); + static BOOL bIsWatching; + static void ICEWatchProc( IceConn connection, IcePointer client_data, + Bool opening, IcePointer* watch_data ); + + static struct pollfd* pFilehandles; + static IceConn* pConnections; + static int nConnections; + static int nWakeupFiles[2]; + static oslMutex ICEMutex; + static oslThread ICEThread; +#ifdef USE_SM_EXTENSION + static IceIOErrorHandler origIOErrorHandler; + static IceErrorHandler origErrorHandler; +#endif +public: + + static void activate(); + static void deactivate(); + static void lock(); + static void unlock(); + static void wakeup(); +}; + + +SmcConn SessionManagerClient::aSmcConnection = NULL; +ByteString SessionManagerClient::aClientID; +BOOL ICEConnectionObserver::bIsWatching = FALSE; +struct pollfd* ICEConnectionObserver::pFilehandles = NULL; +IceConn* ICEConnectionObserver::pConnections = NULL; +int ICEConnectionObserver::nConnections = 0; +oslMutex ICEConnectionObserver::ICEMutex = NULL; +oslThread ICEConnectionObserver::ICEThread = NULL; +int ICEConnectionObserver::nWakeupFiles[2] = { 0, 0 }; + +#ifdef USE_SM_EXTENSION +IceIOErrorHandler ICEConnectionObserver::origIOErrorHandler = NULL; +IceErrorHandler ICEConnectionObserver::origErrorHandler = NULL; + +static void IgnoreIceErrors(IceConn, Bool, int, unsigned long, int, int, IcePointer) +{ +} + +static void IgnoreIceIOErrors(IceConn) +{ +} +#endif + +// HACK +bool SessionManagerClient::bDocSaveDone = false; + + +static SmProp* pSmProps = NULL; +static SmProp** ppSmProps = NULL; +static int nSmProps = 0; +static unsigned char *pSmRestartHint = NULL; + + +static void BuildSmPropertyList() +{ + if( ! pSmProps ) + { + ByteString aExec( SessionManagerClient::getExecName(), osl_getThreadTextEncoding() ); + + nSmProps = 5; + pSmProps = new SmProp[ nSmProps ]; + + pSmProps[ 0 ].name = const_cast(SmCloneCommand); + pSmProps[ 0 ].type = const_cast(SmLISTofARRAY8); + pSmProps[ 0 ].num_vals = 1; + pSmProps[ 0 ].vals = new SmPropValue; + pSmProps[ 0 ].vals->length = aExec.Len()+1; + pSmProps[ 0 ].vals->value = strdup( aExec.GetBuffer() ); + + pSmProps[ 1 ].name = const_cast(SmProgram); + pSmProps[ 1 ].type = const_cast(SmARRAY8); + pSmProps[ 1 ].num_vals = 1; + pSmProps[ 1 ].vals = new SmPropValue; + pSmProps[ 1 ].vals->length = aExec.Len()+1; + pSmProps[ 1 ].vals->value = strdup( aExec.GetBuffer() ); + + pSmProps[ 2 ].name = const_cast(SmRestartCommand); + pSmProps[ 2 ].type = const_cast(SmLISTofARRAY8); + pSmProps[ 2 ].num_vals = 3; + pSmProps[ 2 ].vals = new SmPropValue[3]; + pSmProps[ 2 ].vals[0].length = aExec.Len()+1; + pSmProps[ 2 ].vals[0].value = strdup( aExec.GetBuffer() ); + ByteString aRestartOption( "-session=" ); + aRestartOption.Append( SessionManagerClient::getSessionID() ); + pSmProps[ 2 ].vals[1].length = aRestartOption.Len()+1; + pSmProps[ 2 ].vals[1].value = strdup( aRestartOption.GetBuffer() ); + ByteString aRestartOptionNoLogo( "-nologo" ); + pSmProps[ 2 ].vals[2].length = aRestartOptionNoLogo.Len()+1; + pSmProps[ 2 ].vals[2].value = strdup( aRestartOptionNoLogo.GetBuffer() ); + + rtl::OUString aUserName; + rtl::OString aUser; + oslSecurity aSec = osl_getCurrentSecurity(); + if( aSec ) + { + osl_getUserName( aSec, &aUserName.pData ); + aUser = rtl::OUStringToOString( aUserName, osl_getThreadTextEncoding() ); + osl_freeSecurityHandle( aSec ); + } + + pSmProps[ 3 ].name = const_cast(SmUserID); + pSmProps[ 3 ].type = const_cast(SmARRAY8); + pSmProps[ 3 ].num_vals = 1; + pSmProps[ 3 ].vals = new SmPropValue; + pSmProps[ 3 ].vals->value = strdup( aUser.getStr() ); + pSmProps[ 3 ].vals->length = strlen( (char *)pSmProps[ 3 ].vals->value )+1; + + pSmProps[ 4 ].name = const_cast(SmRestartStyleHint); + pSmProps[ 4 ].type = const_cast(SmCARD8); + pSmProps[ 4 ].num_vals = 1; + pSmProps[ 4 ].vals = new SmPropValue; + pSmProps[ 4 ].vals->value = malloc(1); + pSmRestartHint = (unsigned char *)pSmProps[ 4 ].vals->value; + *pSmRestartHint = SmRestartIfRunning; + pSmProps[ 4 ].vals->length = 1; + + ppSmProps = new SmProp*[ nSmProps ]; + for( int i = 0; i < nSmProps; i++ ) + ppSmProps[ i ] = &pSmProps[i]; + } +} + +bool SessionManagerClient::checkDocumentsSaved() +{ + return bDocSaveDone; +} + +IMPL_STATIC_LINK( SessionManagerClient, SaveYourselfHdl, void*, EMPTYARG ) +{ + SMprintf( "posting save documents event shutdown = %s\n", (pThis!=0) ? "true" : "false" ); + + static bool bFirstShutdown=true; + if (pThis != 0 && bFirstShutdown) //first shutdown request + { + bFirstShutdown = false; + /* + If we have no actual frames open, e.g. we launched a quickstarter, + and then shutdown all our frames leaving just a quickstarter running, + then we don't want to launch an empty toplevel frame on the next + start. (The job of scheduling the restart of the quick-starter is a + task of the quick-starter) + */ + *pSmRestartHint = SmRestartNever; + const std::list< SalFrame* >& rFrames = GetX11SalData()->GetDisplay()->getFrames(); + for( std::list< SalFrame* >::const_iterator it = rFrames.begin(); it != rFrames.end(); ++it ) + { + Window *pWindow = (*it)->GetWindow(); + if (pWindow && pWindow->IsVisible()) + { + *pSmRestartHint = SmRestartIfRunning; + break; + } + } + } + + if( pOneInstance ) + { + SalSessionSaveRequestEvent aEvent( pThis != 0, false ); + pOneInstance->CallCallback( &aEvent ); + } + else + saveDone(); + + return 0; +} + +IMPL_STATIC_LINK_NOINSTANCE( SessionManagerClient, InteractionHdl, void*, EMPTYARG ) +{ + SMprintf( "interaction link\n" ); + if( pOneInstance ) + { + SalSessionInteractionEvent aEvent( true ); + pOneInstance->CallCallback( &aEvent ); + } + + return 0; +} + +IMPL_STATIC_LINK_NOINSTANCE( SessionManagerClient, ShutDownCancelHdl, void*, EMPTYARG ) +{ + SMprintf( "shutdown cancel\n" ); + if( pOneInstance ) + { + SalSessionShutdownCancelEvent aEvent; + pOneInstance->CallCallback( &aEvent ); + } + + return 0; +} + +void SessionManagerClient::SaveYourselfProc( + SmcConn, + SmPointer, + int save_type, + Bool shutdown, + int interact_style, + Bool + ) +{ + SMprintf( "Session: save yourself, save_type = %s, shutdown = %s, interact_style = %s, fast = %s\n", + save_type == SmSaveLocal ? "SmcSaveLocal" : + ( save_type == SmSaveGlobal ? "SmcSaveGlobal" : + ( save_type == SmSaveBoth ? "SmcSaveBoth" : "" ) ), + shutdown ? "true" : "false", + interact_style == SmInteractStyleNone ? "SmInteractStyleNone" : + ( interact_style == SmInteractStyleErrors ? "SmInteractStyleErrors" : + ( interact_style == SmInteractStyleAny ? "SmInteractStyleAny" : "" ) ), + false ? "true" : "false" + ); + BuildSmPropertyList(); +#ifdef USE_SM_EXTENSION + bDocSaveDone = false; + /* #i49875# some session managers send a "die" message if the + * saveDone does not come early enough for their convenience + * this can occasionally happen on startup, especially the first + * startup. So shortcut the "not shutting down" case since the + * upper layers are currently not interested in that event anyway. + */ + if( ! shutdown ) + { + SessionManagerClient::saveDone(); + return; + } + Application::PostUserEvent( STATIC_LINK( (void*)(shutdown ? 0xffffffff : 0x0), SessionManagerClient, SaveYourselfHdl ) ); + SMprintf( "waiting for save yourself event to be processed\n" ); +#endif +} + +IMPL_STATIC_LINK_NOINSTANCE( SessionManagerClient, ShutDownHdl, void*, EMPTYARG ) +{ + if( pOneInstance ) + { + SalSessionQuitEvent aEvent; + pOneInstance->CallCallback( &aEvent ); + } + + const std::list< SalFrame* >& rFrames = GetX11SalData()->GetDisplay()->getFrames(); + SMprintf( rFrames.begin() != rFrames.end() ? "shutdown on first frame\n" : "shutdown event but no frame\n" ); + if( rFrames.begin() != rFrames.end() ) + rFrames.front()->CallCallback( SALEVENT_SHUTDOWN, 0 ); + return 0; +} + +void SessionManagerClient::DieProc( + SmcConn connection, + SmPointer + ) +{ + SMprintf( "Session: die\n" ); + if( connection == aSmcConnection ) + { + Application::PostUserEvent( STATIC_LINK( NULL, SessionManagerClient, ShutDownHdl ) ); + SMprintf( "waiting for shutdown event to be processed\n" ); + } +} + +void SessionManagerClient::SaveCompleteProc( + SmcConn, + SmPointer + ) +{ + SMprintf( "Session: save complete\n" ); +} + +void SessionManagerClient::ShutdownCanceledProc( + SmcConn connection, + SmPointer ) +{ + SMprintf( "Session: shutdown canceled\n" ); + if( connection == aSmcConnection ) + Application::PostUserEvent( STATIC_LINK( NULL, SessionManagerClient, ShutDownCancelHdl ) ); +} + +void SessionManagerClient::InteractProc( + SmcConn connection, + SmPointer ) +{ + SMprintf( "Session: interaction request completed\n" ); + if( connection == aSmcConnection ) + Application::PostUserEvent( STATIC_LINK( NULL, SessionManagerClient, InteractionHdl ) ); +} + +void SessionManagerClient::saveDone() +{ + if( aSmcConnection ) + { + ICEConnectionObserver::lock(); + SmcSetProperties( aSmcConnection, nSmProps, ppSmProps ); + SmcSaveYourselfDone( aSmcConnection, True ); + SMprintf( "sent SaveYourselfDone SmRestartHint of %d\n", *pSmRestartHint ); + bDocSaveDone = true; + ICEConnectionObserver::unlock(); + } +} + + +void SessionManagerClient::open() +{ + static SmcCallbacks aCallbacks; + +#ifdef USE_SM_EXTENSION + // this is the way Xt does it, so we can too + if( ! aSmcConnection && getenv( "SESSION_MANAGER" ) ) + { + char aErrBuf[1024]; + ICEConnectionObserver::activate(); + ICEConnectionObserver::lock(); + + char* pClientID = NULL; + const ByteString& rPrevId( getPreviousSessionID() ); + + aCallbacks.save_yourself.callback = SaveYourselfProc; + aCallbacks.save_yourself.client_data = NULL; + aCallbacks.die.callback = DieProc; + aCallbacks.die.client_data = NULL; + aCallbacks.save_complete.callback = SaveCompleteProc; + aCallbacks.save_complete.client_data = NULL; + aCallbacks.shutdown_cancelled.callback = ShutdownCanceledProc; + aCallbacks.shutdown_cancelled.client_data = NULL; + aSmcConnection = SmcOpenConnection( NULL, + NULL, + SmProtoMajor, + SmProtoMinor, + SmcSaveYourselfProcMask | + SmcDieProcMask | + SmcSaveCompleteProcMask | + SmcShutdownCancelledProcMask , + &aCallbacks, + rPrevId.Len() ? const_cast(rPrevId.GetBuffer()) : NULL, + &pClientID, + sizeof( aErrBuf ), + aErrBuf ); + if( ! aSmcConnection ) + SMprintf( "SmcOpenConnection failed: %s\n", aErrBuf ); + else + SMprintf( "SmcOpenConnection succeeded, client ID is \"%s\"\n", pClientID ); + aClientID = ByteString( pClientID ); + free( pClientID ); + pClientID = NULL; + ICEConnectionObserver::unlock(); + + SalDisplay* pDisp = GetX11SalData()->GetDisplay(); + if( pDisp->GetDrawable( pDisp->GetDefaultScreenNumber() ) && aClientID.Len() ) + { + XChangeProperty( pDisp->GetDisplay(), + pDisp->GetDrawable( pDisp->GetDefaultScreenNumber() ), + XInternAtom( pDisp->GetDisplay(), "SM_CLIENT_ID", False ), + XA_STRING, + 8, + PropModeReplace, + (unsigned char*)aClientID.GetBuffer(), + aClientID.Len() + ); + } + } + else if( ! aSmcConnection ) + SMprintf( "no SESSION_MANAGER\n" ); +#endif +} + +const ByteString& SessionManagerClient::getSessionID() +{ + return aClientID; +} + +void SessionManagerClient::close() +{ + if( aSmcConnection ) + { +#ifdef USE_SM_EXTENSION + ICEConnectionObserver::lock(); + SMprintf( "attempting SmcCloseConnection\n" ); + SmcCloseConnection( aSmcConnection, 0, NULL ); + SMprintf( "SmcConnection closed\n" ); + ICEConnectionObserver::unlock(); + ICEConnectionObserver::deactivate(); +#endif + aSmcConnection = NULL; + } +} + +bool SessionManagerClient::queryInteraction() +{ + bool bRet = false; + if( aSmcConnection ) + { + ICEConnectionObserver::lock(); + if( SmcInteractRequest( aSmcConnection, SmDialogNormal, InteractProc, NULL ) ) + bRet = true; + ICEConnectionObserver::unlock(); + } + return bRet; +} + +void SessionManagerClient::interactionDone( bool bCancelShutdown ) +{ + if( aSmcConnection ) + { + ICEConnectionObserver::lock(); + SmcInteractDone( aSmcConnection, bCancelShutdown ? True : False ); + ICEConnectionObserver::unlock(); + } +} + + +String SessionManagerClient::getExecName() +{ + rtl::OUString aExec, aSysExec; + osl_getExecutableFile( &aExec.pData ); + osl_getSystemPathFromFileURL( aExec.pData, &aSysExec.pData ); + + int nPos = aSysExec.indexOf( rtl::OUString::createFromAscii( ".bin" ) ); + if( nPos != -1 ) + aSysExec = aSysExec.copy( 0, nPos ); + return aSysExec; +} + + +const ByteString& SessionManagerClient::getPreviousSessionID() +{ + static ByteString aPrevId; + + int nCommands = osl_getCommandArgCount(); + for( int i = 0; i < nCommands; i++ ) + { + ::rtl::OUString aArg; + osl_getCommandArg( i, &aArg.pData ); + if( aArg.compareToAscii( "-session=", 9 ) == 0 ) + { + aPrevId = ByteString( ::rtl::OUStringToOString( aArg.copy( 9 ), osl_getThreadTextEncoding() ) ); + break; + } + } + SMprintf( "previous ID = \"%s\"\n", aPrevId.GetBuffer() ); + return aPrevId; +} + +void ICEConnectionObserver::lock() +{ + osl_acquireMutex( ICEMutex ); +} + +void ICEConnectionObserver::unlock() +{ + osl_releaseMutex( ICEMutex ); +} + +void ICEConnectionObserver::activate() +{ + if( ! bIsWatching ) + { + nWakeupFiles[0] = nWakeupFiles[1] = 0; + ICEMutex = osl_createMutex(); + bIsWatching = TRUE; +#ifdef USE_SM_EXTENSION + /* + * Default handlers call exit, we don't care that strongly if something + * happens to fail + */ + origIOErrorHandler = IceSetIOErrorHandler( IgnoreIceIOErrors ); + origErrorHandler = IceSetErrorHandler( IgnoreIceErrors ); + IceAddConnectionWatch( ICEWatchProc, NULL ); +#endif + } +} + +void ICEConnectionObserver::deactivate() +{ + if( bIsWatching ) + { + lock(); + bIsWatching = FALSE; +#ifdef USE_SM_EXTENSION + IceRemoveConnectionWatch( ICEWatchProc, NULL ); + IceSetErrorHandler( origErrorHandler ); + IceSetIOErrorHandler( origIOErrorHandler ); +#endif + nConnections = 0; + if( ICEThread ) + { + osl_terminateThread( ICEThread ); + wakeup(); + } + unlock(); + if( ICEThread ) + { + osl_joinWithThread( ICEThread ); + osl_destroyThread( ICEThread ); + close( nWakeupFiles[1] ); + close( nWakeupFiles[0] ); + ICEThread = NULL; + } + osl_destroyMutex( ICEMutex ); + ICEMutex = NULL; + } +} + +void ICEConnectionObserver::wakeup() +{ + char cChar = 'w'; + write( nWakeupFiles[1], &cChar, 1 ); +} + +void ICEConnectionWorker( void* ) +{ +#ifdef USE_SM_EXTENSION + while( osl_scheduleThread(ICEConnectionObserver::ICEThread) && ICEConnectionObserver::nConnections ) + { + ICEConnectionObserver::lock(); + int nConnectionsBefore = ICEConnectionObserver::nConnections; + int nBytes = sizeof( struct pollfd )*(nConnectionsBefore+1); + struct pollfd* pLocalFD = (struct pollfd*)rtl_allocateMemory( nBytes ); + rtl_copyMemory( pLocalFD, ICEConnectionObserver::pFilehandles, nBytes ); + ICEConnectionObserver::unlock(); + + int nRet = poll( pLocalFD,nConnectionsBefore+1,-1 ); + bool bWakeup = (pLocalFD[0].revents & POLLIN); + rtl_freeMemory( pLocalFD ); + + if( nRet < 1 ) + continue; + + // clear wakeup pipe + if( bWakeup ) + { + char buf[4]; + while( read( ICEConnectionObserver::nWakeupFiles[0], buf, sizeof( buf ) ) > 0 ) + ; + SMprintf( "file handles active in wakeup: %d\n", nRet ); + if( nRet == 1 ) + continue; + } + + // check fd's after we obtained the lock + ICEConnectionObserver::lock(); + if( ICEConnectionObserver::nConnections > 0 && ICEConnectionObserver::nConnections == nConnectionsBefore ) + { + nRet = poll( ICEConnectionObserver::pFilehandles+1, ICEConnectionObserver::nConnections, 0 ); + if( nRet > 0 ) + { + SMprintf( "IceProcessMessages\n" ); + Bool bReply; + for( int i = 0; i < ICEConnectionObserver::nConnections; i++ ) + if( ICEConnectionObserver::pFilehandles[i+1].revents & POLLIN ) + IceProcessMessages( ICEConnectionObserver::pConnections[i], NULL, &bReply ); + } + } + ICEConnectionObserver::unlock(); + } +#endif + SMprintf( "shutting donw ICE dispatch thread\n" ); +} + +void ICEConnectionObserver::ICEWatchProc( + IceConn connection, + IcePointer, + Bool opening, + IcePointer* + ) +{ + // note: this is a callback function for ICE + // this implicitly means that a call into ICE lib is calling this + // so the ICEMutex MUST already be locked by the caller + +#ifdef USE_SM_EXTENSION + if( opening ) + { + int fd = IceConnectionNumber( connection ); + nConnections++; + pConnections = (IceConn*)rtl_reallocateMemory( pConnections, sizeof( IceConn )*nConnections ); + pFilehandles = (struct pollfd*)rtl_reallocateMemory( pFilehandles, sizeof( struct pollfd )*(nConnections+1) ); + pConnections[ nConnections-1 ] = connection; + pFilehandles[ nConnections ].fd = fd; + pFilehandles[ nConnections ].events = POLLIN; + if( nConnections == 1 ) + { + if( ! pipe( nWakeupFiles ) ) + { + int flags; + pFilehandles[0].fd = nWakeupFiles[0]; + pFilehandles[0].events = POLLIN; + // set close-on-exec and nonblock descriptor flag. + if ((flags = fcntl (nWakeupFiles[0], F_GETFD)) != -1) + { + flags |= FD_CLOEXEC; + fcntl (nWakeupFiles[0], F_SETFD, flags); + } + if ((flags = fcntl (nWakeupFiles[0], F_GETFL)) != -1) + { + flags |= O_NONBLOCK; + fcntl (nWakeupFiles[0], F_SETFL, flags); + } + // set close-on-exec and nonblock descriptor flag. + if ((flags = fcntl (nWakeupFiles[1], F_GETFD)) != -1) + { + flags |= FD_CLOEXEC; + fcntl (nWakeupFiles[1], F_SETFD, flags); + } + if ((flags = fcntl (nWakeupFiles[1], F_GETFL)) != -1) + { + flags |= O_NONBLOCK; + fcntl (nWakeupFiles[1], F_SETFL, flags); + } + ICEThread = osl_createSuspendedThread( ICEConnectionWorker, NULL ); + osl_resumeThread( ICEThread ); + } + } + } + else + { + for( int i = 0; i < nConnections; i++ ) + { + if( pConnections[i] == connection ) + { + if( i < nConnections-1 ) + { + rtl_moveMemory( pConnections+i, pConnections+i+1, sizeof( IceConn )*(nConnections-i-1) ); + rtl_moveMemory( pFilehandles+i+1, pFilehandles+i+2, sizeof( struct pollfd )*(nConnections-i-1) ); + } + nConnections--; + pConnections = (IceConn*)rtl_reallocateMemory( pConnections, sizeof( IceConn )*nConnections ); + pFilehandles = (struct pollfd*)rtl_reallocateMemory( pFilehandles, sizeof( struct pollfd )*(nConnections+1) ); + break; + } + } + if( nConnections == 0 && ICEThread ) + { + SMprintf( "terminating ICEThread\n" ); + osl_terminateThread( ICEThread ); + wakeup(); + // must release the mutex here + osl_releaseMutex( ICEMutex ); + osl_joinWithThread( ICEThread ); + osl_destroyThread( ICEThread ); + close( nWakeupFiles[1] ); + close( nWakeupFiles[0] ); + ICEThread = NULL; + } + } + SMprintf( "ICE connection on %d %s\n", + IceConnectionNumber( connection ), + opening ? "inserted" : "removed" ); + SMprintf( "Display connection is %d\n", ConnectionNumber( GetX11SalData()->GetDisplay()->GetDisplay() ) ); +#endif +} diff --git a/vcl/unx/generic/app/soicon.cxx b/vcl/unx/generic/app/soicon.cxx new file mode 100644 index 000000000000..663dc9371caf --- /dev/null +++ b/vcl/unx/generic/app/soicon.cxx @@ -0,0 +1,116 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + + +BOOL SelectAppIconPixmap( SalDisplay *pDisplay, int nScreen,USHORT nIcon, USHORT iconSize, + Pixmap& icon_pixmap, Pixmap& icon_mask) +{ + if( ! ImplGetResMgr() ) + return FALSE; + + USHORT nIconSizeOffset; + + if( iconSize >= 48 ) + nIconSizeOffset = SV_ICON_SIZE48_START; + else if( iconSize >= 32 ) + nIconSizeOffset = SV_ICON_SIZE32_START; + else if( iconSize >= 16 ) + nIconSizeOffset = SV_ICON_SIZE16_START; + else + return FALSE; + + BitmapEx aIcon( ResId(nIconSizeOffset + nIcon, *ImplGetResMgr())); + if( TRUE == aIcon.IsEmpty() ) + return FALSE; + + SalTwoRect aRect; + aRect.mnSrcX = 0; aRect.mnSrcY = 0; + aRect.mnSrcWidth = iconSize; aRect.mnSrcHeight = iconSize; + aRect.mnDestX = 0; aRect.mnDestY = 0; + aRect.mnDestWidth = iconSize; aRect.mnDestHeight = iconSize; + + X11SalBitmap *pBitmap = static_cast < X11SalBitmap * > + (aIcon.ImplGetBitmapImpBitmap()->ImplGetSalBitmap()); + + icon_pixmap = XCreatePixmap( pDisplay->GetDisplay(), + pDisplay->GetRootWindow( nScreen ), + iconSize, iconSize, + DefaultDepth( pDisplay->GetDisplay(), nScreen ) + ); + + pBitmap->ImplDraw( icon_pixmap, + nScreen, + DefaultDepth( pDisplay->GetDisplay(), nScreen ), + aRect, + DefaultGC(pDisplay->GetDisplay(), nScreen ) ); + + icon_mask = None; + + if( TRANSPARENT_BITMAP == aIcon.GetTransparentType() ) + { + icon_mask = XCreatePixmap( pDisplay->GetDisplay(), + pDisplay->GetRootWindow( pDisplay->GetDefaultScreenNumber() ), + iconSize, iconSize, 1); + + XGCValues aValues; + aValues.foreground = 0xffffffff; + aValues.background = 0; + aValues.function = GXcopy; + GC aMonoGC = XCreateGC( pDisplay->GetDisplay(), icon_mask, + GCFunction|GCForeground|GCBackground, &aValues ); + + Bitmap aMask = aIcon.GetMask(); + aMask.Invert(); + + X11SalBitmap *pMask = static_cast < X11SalBitmap * > + (aMask.ImplGetImpBitmap()->ImplGetSalBitmap()); + + pMask->ImplDraw(icon_mask, nScreen, 1, aRect, aMonoGC); + XFreeGC( pDisplay->GetDisplay(), aMonoGC ); + } + + return TRUE; +} + diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx new file mode 100644 index 000000000000..90b2e5426bdf --- /dev/null +++ b/vcl/unx/generic/app/wmadaptor.cxx @@ -0,0 +1,2548 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include +#include + +#include "sal/alloca.h" +#include "rtl/locale.h" + +#include "osl/thread.h" +#include "osl/process.h" + +#include "vcl/configsettings.hxx" + +#include "unx/wmadaptor.hxx" +#include "unx/saldisp.hxx" +#include "unx/saldata.hxx" +#include "unx/salframe.h" + +#include "salgdi.hxx" + +#include "tools/prex.h" +#include +#include +#include +#include "tools/postx.h" + +#if OSL_DEBUG_LEVEL > 1 +#include +#endif + +namespace vcl_sal { + +class NetWMAdaptor : public WMAdaptor +{ + void setNetWMState( X11SalFrame* pFrame ) const; + void initAtoms(); + virtual bool isValid() const; +public: + NetWMAdaptor( SalDisplay* ); + virtual ~NetWMAdaptor(); + + virtual void setWMName( X11SalFrame* pFrame, const String& rWMName ) const; + virtual void maximizeFrame( X11SalFrame* pFrame, bool bHorizontal = true, bool bVertical = true ) const; + virtual void shade( X11SalFrame* pFrame, bool bToShaded ) const; + virtual void setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eType, int nDecorationFlags, X11SalFrame* pTransientFrame = NULL ) const; + virtual bool supportsICCCMPos() const; + virtual void enableAlwaysOnTop( X11SalFrame* pFrame, bool bEnable ) const; + virtual int handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEvent ) const; + virtual void showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const; + virtual void frameIsMapping( X11SalFrame* pFrame ) const; + virtual void setFrameStruts( X11SalFrame* pFrame, + int left, int right, int top, int bottom, + int left_start_y, int left_end_y, + int right_start_y, int right_end_y, + int top_start_x, int top_end_x, + int bottom_start_x, int bottom_end_x ) const; + virtual void setUserTime( X11SalFrame* i_pFrame, long i_nUserTime ) const; +}; + +class GnomeWMAdaptor : public WMAdaptor +{ + bool m_bValid; + + void setGnomeWMState( X11SalFrame* pFrame ) const; + void initAtoms(); + virtual bool isValid() const; +public: + GnomeWMAdaptor( SalDisplay * ); + virtual ~GnomeWMAdaptor(); + + virtual void maximizeFrame( X11SalFrame* pFrame, bool bHorizontal = true, bool bVertical = true ) const; + virtual void shade( X11SalFrame* pFrame, bool bToShaded ) const; + virtual void enableAlwaysOnTop( X11SalFrame* pFrame, bool bEnable ) const; + virtual int handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEvent ) const; +}; + +} + +using namespace vcl_sal; + +struct WMAdaptorProtocol +{ + const char* pProtocol; + int nProtocol; +}; + + +/* + * table must be sorted ascending in strings + * since it is use with bsearch + */ +static const WMAdaptorProtocol aProtocolTab[] = +{ + { "_KDE_NET_WM_WINDOW_TYPE_OVERRIDE", WMAdaptor::KDE_NET_WM_WINDOW_TYPE_OVERRIDE }, + { "_NET_CURRENT_DESKTOP", WMAdaptor::NET_CURRENT_DESKTOP }, + { "_NET_NUMBER_OF_DESKTOPS", WMAdaptor::NET_NUMBER_OF_DESKTOPS }, + { "_NET_WM_DESKTOP", WMAdaptor::NET_WM_DESKTOP }, + { "_NET_WM_ICON_NAME", WMAdaptor::NET_WM_ICON_NAME }, + { "_NET_WM_PING", WMAdaptor::NET_WM_PING }, + { "_NET_WM_STATE", WMAdaptor::NET_WM_STATE }, + { "_NET_WM_STATE_ABOVE", WMAdaptor::NET_WM_STATE_STAYS_ON_TOP }, + { "_NET_WM_STATE_FULLSCREEN", WMAdaptor::NET_WM_STATE_FULLSCREEN }, + { "_NET_WM_STATE_MAXIMIZED_HORIZ", WMAdaptor::NET_WM_STATE_MAXIMIZED_HORZ }, // common bug in e.g. older kwin and sawfish implementations + { "_NET_WM_STATE_MAXIMIZED_HORZ", WMAdaptor::NET_WM_STATE_MAXIMIZED_HORZ }, + { "_NET_WM_STATE_MAXIMIZED_VERT", WMAdaptor::NET_WM_STATE_MAXIMIZED_VERT }, + { "_NET_WM_STATE_MODAL", WMAdaptor::NET_WM_STATE_MODAL }, + { "_NET_WM_STATE_SHADED", WMAdaptor::NET_WM_STATE_SHADED }, + { "_NET_WM_STATE_SKIP_PAGER", WMAdaptor::NET_WM_STATE_SKIP_PAGER }, + { "_NET_WM_STATE_SKIP_TASKBAR", WMAdaptor::NET_WM_STATE_SKIP_TASKBAR }, + { "_NET_WM_STATE_STAYS_ON_TOP", WMAdaptor::NET_WM_STATE_STAYS_ON_TOP }, + { "_NET_WM_STATE_STICKY", WMAdaptor::NET_WM_STATE_STICKY }, + { "_NET_WM_STRUT", WMAdaptor::NET_WM_STRUT }, + { "_NET_WM_STRUT_PARTIAL", WMAdaptor::NET_WM_STRUT_PARTIAL }, + { "_NET_WM_WINDOW_TYPE", WMAdaptor::NET_WM_WINDOW_TYPE }, + { "_NET_WM_WINDOW_TYPE_DESKTOP", WMAdaptor::NET_WM_WINDOW_TYPE_DESKTOP }, + { "_NET_WM_WINDOW_TYPE_DIALOG", WMAdaptor::NET_WM_WINDOW_TYPE_DIALOG }, + { "_NET_WM_WINDOW_TYPE_DOCK", WMAdaptor::NET_WM_WINDOW_TYPE_DOCK }, + { "_NET_WM_WINDOW_TYPE_MENU", WMAdaptor::NET_WM_WINDOW_TYPE_MENU }, + { "_NET_WM_WINDOW_TYPE_NORMAL", WMAdaptor::NET_WM_WINDOW_TYPE_NORMAL }, + { "_NET_WM_WINDOW_TYPE_SPLASH", WMAdaptor::NET_WM_WINDOW_TYPE_SPLASH }, + { "_NET_WM_WINDOW_TYPE_SPLASHSCREEN", WMAdaptor::NET_WM_WINDOW_TYPE_SPLASH }, // bug in Metacity 2.4.1 + { "_NET_WM_WINDOW_TYPE_TOOLBAR", WMAdaptor::NET_WM_WINDOW_TYPE_TOOLBAR }, + { "_NET_WM_WINDOW_TYPE_UTILITY", WMAdaptor::NET_WM_WINDOW_TYPE_UTILITY }, + { "_NET_WORKAREA", WMAdaptor::NET_WORKAREA }, + { "_WIN_APP_STATE", WMAdaptor::WIN_APP_STATE }, + { "_WIN_CLIENT_LIST", WMAdaptor::WIN_CLIENT_LIST }, + { "_WIN_EXPANDED_SIZE", WMAdaptor::WIN_EXPANDED_SIZE }, + { "_WIN_HINTS", WMAdaptor::WIN_HINTS }, + { "_WIN_ICONS", WMAdaptor::WIN_ICONS }, + { "_WIN_LAYER", WMAdaptor::WIN_LAYER }, + { "_WIN_STATE", WMAdaptor::WIN_STATE }, + { "_WIN_WORKSPACE", WMAdaptor::WIN_WORKSPACE }, + { "_WIN_WORKSPACE_COUNT", WMAdaptor::WIN_WORKSPACE_COUNT } +}; + +/* + * table containing atoms to get anyway + */ + +static const WMAdaptorProtocol aAtomTab[] = +{ + { "WM_STATE", WMAdaptor::WM_STATE }, + { "_MOTIF_WM_HINTS", WMAdaptor::MOTIF_WM_HINTS }, + { "WM_PROTOCOLS", WMAdaptor::WM_PROTOCOLS }, + { "WM_DELETE_WINDOW", WMAdaptor::WM_DELETE_WINDOW }, + { "WM_TAKE_FOCUS", WMAdaptor::WM_TAKE_FOCUS }, + { "WM_SAVE_YOURSELF", WMAdaptor::WM_SAVE_YOURSELF }, + { "WM_COMMAND", WMAdaptor::WM_COMMAND }, + { "WM_CLIENT_LEADER", WMAdaptor::WM_CLIENT_LEADER }, + { "WM_LOCALE_NAME", WMAdaptor::WM_LOCALE_NAME }, + { "WM_TRANSIENT_FOR", WMAdaptor::WM_TRANSIENT_FOR }, + { "SAL_QUITEVENT", WMAdaptor::SAL_QUITEVENT }, + { "SAL_USEREVENT", WMAdaptor::SAL_USEREVENT }, + { "SAL_EXTTEXTEVENT", WMAdaptor::SAL_EXTTEXTEVENT }, + { "SAL_GETTIMEEVENT", WMAdaptor::SAL_GETTIMEEVENT }, + { "VCL_SYSTEM_SETTINGS", WMAdaptor::VCL_SYSTEM_SETTINGS }, + { "DTWM_IS_RUNNING", WMAdaptor::DTWM_IS_RUNNING }, + { "_XSETTINGS_SETTINGS", WMAdaptor::XSETTINGS }, + { "_XEMBED", WMAdaptor::XEMBED }, + { "_XEMBED_INFO", WMAdaptor::XEMBED_INFO }, + { "_NET_WM_USER_TIME", WMAdaptor::NET_WM_USER_TIME }, + { "_NET_WM_PID", WMAdaptor::NET_WM_PID } +}; + +extern "C" { +static int compareProtocol( const void* pLeft, const void* pRight ) +{ + return strcmp( ((const WMAdaptorProtocol*)pLeft)->pProtocol, ((const WMAdaptorProtocol*)pRight)->pProtocol ); +} +} + +WMAdaptor* WMAdaptor::createWMAdaptor( SalDisplay* pSalDisplay ) +{ + WMAdaptor* pAdaptor = NULL; + + // try a NetWM + pAdaptor = new NetWMAdaptor( pSalDisplay ); + if( ! pAdaptor->isValid() ) + delete pAdaptor, pAdaptor = NULL; +#if OSL_DEBUG_LEVEL > 1 + else + fprintf( stderr, "WM supports extended WM hints\n" ); +#endif + + // try a GnomeWM + if( ! pAdaptor ) + { + pAdaptor = new GnomeWMAdaptor( pSalDisplay ); + if( ! pAdaptor->isValid() ) + delete pAdaptor, pAdaptor = NULL; +#if OSL_DEBUG_LEVEL > 1 + else + fprintf( stderr, "WM supports GNOME WM hints\n" ); +#endif + } + + if( ! pAdaptor ) + pAdaptor = new WMAdaptor( pSalDisplay ); + +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "Window Manager's name is \"%s\"\n", + ByteString( pAdaptor->getWindowManagerName(), RTL_TEXTENCODING_ISO_8859_1 ).GetBuffer() ); +#endif + return pAdaptor; +} + + +/* + * WMAdaptor constructor + */ + +WMAdaptor::WMAdaptor( SalDisplay* pDisplay ) : + m_pSalDisplay( pDisplay ), + m_bTransientBehaviour( true ), + m_bEnableAlwaysOnTopWorks( false ), + m_bLegacyPartialFullscreen( false ), + m_nWinGravity( StaticGravity ), + m_nInitWinGravity( StaticGravity ), + m_bWMshouldSwitchWorkspace( true ), + m_bWMshouldSwitchWorkspaceInit( false ) +{ + Atom aRealType = None; + int nFormat = 8; + unsigned long nItems = 0; + unsigned long nBytesLeft = 0; + unsigned char* pProperty = NULL; + + // default desktops + m_nDesktops = 1; + m_aWMWorkAreas = ::std::vector< Rectangle > + ( 1, Rectangle( Point(), m_pSalDisplay->GetScreenSize( m_pSalDisplay->GetDefaultScreenNumber() ) ) ); + m_bEqualWorkAreas = true; + + memset( m_aWMAtoms, 0, sizeof( m_aWMAtoms ) ); + m_pDisplay = m_pSalDisplay->GetDisplay(); + + initAtoms(); + getNetWmName(); // try to discover e.g. Sawfish + + // check for dtwm running + if( m_aWMAtoms[ DTWM_IS_RUNNING ] ) + { + if ( (XGetWindowProperty( m_pDisplay, + m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), + m_aWMAtoms[ DTWM_IS_RUNNING ], + 0, 1, + False, + XA_INTEGER, + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty) == 0 + && nItems) + || (XGetWindowProperty( m_pDisplay, + m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), + m_aWMAtoms[ DTWM_IS_RUNNING ], + 0, 1, + False, + m_aWMAtoms[ DTWM_IS_RUNNING ], + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty) == 0 + && nItems)) + { + if (*pProperty) + { + m_aWMName = String(RTL_CONSTASCII_USTRINGPARAM("Dtwm")); + m_bTransientBehaviour = false; + m_nWinGravity = CenterGravity; + } + XFree (pProperty); + } + else if( pProperty ) + { + XFree( pProperty ); + pProperty = NULL; + } + } + if( m_aWMName.Len() == 0 ) + { + // check for window maker - needs different gravity + Atom aWMakerRunning = XInternAtom( m_pDisplay, "_WINDOWMAKER_WM_PROTOCOLS", True ); + if( aWMakerRunning != None && + XGetWindowProperty( m_pDisplay, + m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), + aWMakerRunning, + 0, 32, + False, + XA_ATOM, + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty ) == 0 ) + { + if( aRealType == XA_ATOM ) + m_aWMName = String( RTL_CONSTASCII_USTRINGPARAM("Windowmaker" ) ); + XFree( pProperty ); + m_nInitWinGravity = NorthWestGravity; + } + else if( pProperty ) + { + XFree( pProperty ); + pProperty = NULL; + } + } + if( m_aWMName.Len() == 0 ) + { + if( XInternAtom( m_pDisplay, "_OL_WIN_ATTR", True ) ) + { + m_aWMName = String( RTL_CONSTASCII_USTRINGPARAM( "Olwm" ) ); + m_nInitWinGravity = NorthWestGravity; + } + } + if( m_aWMName.Len() == 0 ) + { + // check for ReflectionX wm (as it needs a workaround in Windows mode + Atom aRwmRunning = XInternAtom( m_pDisplay, "RWM_RUNNING", True ); + if( aRwmRunning != None && + XGetWindowProperty( m_pDisplay, + m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), + aRwmRunning, + 0, 32, + False, + aRwmRunning, + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty ) == 0 ) + { + if( aRealType == aRwmRunning ) + m_aWMName = String( RTL_CONSTASCII_USTRINGPARAM("ReflectionX" ) ); + XFree( pProperty ); + } + else if( (aRwmRunning = XInternAtom( m_pDisplay, "_WRQ_WM_RUNNING", True )) != None && + XGetWindowProperty( m_pDisplay, + m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), + aRwmRunning, + 0, 32, + False, + XA_STRING, + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty ) == 0 ) + { + if( aRealType == XA_STRING ) + m_aWMName = String( RTL_CONSTASCII_USTRINGPARAM( "ReflectionX Windows" ) ); + XFree( pProperty ); + } + } + if( m_aWMName.Len() == 0 ) + { + Atom aTTAPlatform = XInternAtom( m_pDisplay, "TTA_CLIENT_PLATFORM", True ); + if( aTTAPlatform != None && + XGetWindowProperty( m_pDisplay, + m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), + aTTAPlatform, + 0, 32, + False, + XA_STRING, + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty ) == 0 ) + { + if( aRealType == XA_STRING ) + { + m_aWMName = String( RTL_CONSTASCII_USTRINGPARAM("Tarantella" ) ); + // #i62319# pretend that AlwaysOnTop works since + // the alwaysontop workaround in salframe.cxx results + // in a raise/lower loop on a Windows tarantella client + // FIXME: this property contains an identification string that + // in theory should be good enough to recognize running on a + // Windows client; however this string does not seem to be + // documented as well as the property itself. + m_bEnableAlwaysOnTopWorks = true; + } + XFree( pProperty ); + } + } +} + +/* + * WMAdaptor destructor + */ + +WMAdaptor::~WMAdaptor() +{ +} + +/* + * NetWMAdaptor constructor + */ + +NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) : + WMAdaptor( pSalDisplay ) +{ + // currently all _NET WMs do transient like expected + m_bTransientBehaviour = true; + + Atom aRealType = None; + int nFormat = 8; + unsigned long nItems = 0; + unsigned long nBytesLeft = 0; + unsigned char* pProperty = NULL; + bool bNetWM = false; + + initAtoms(); + + // check for NetWM + bNetWM = getNetWmName(); + if( bNetWM + && XGetWindowProperty( m_pDisplay, + m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), + m_aWMAtoms[ NET_SUPPORTED ], + 0, 0, + False, + XA_ATOM, + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty ) == 0 + && aRealType == XA_ATOM + && nFormat == 32 + ) + { + if( pProperty ) + { + XFree( pProperty ); + pProperty = NULL; + } + // collect supported protocols + if( XGetWindowProperty( m_pDisplay, + m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), + m_aWMAtoms[ NET_SUPPORTED ], + 0, nBytesLeft/4, + False, + XA_ATOM, + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty ) == 0 + && nItems + ) + { + Atom* pAtoms = (Atom*)pProperty; + char** pAtomNames = (char**)alloca( sizeof(char*)*nItems ); + if( XGetAtomNames( m_pDisplay, pAtoms, nItems, pAtomNames ) ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "supported protocols:\n" ); +#endif + for( unsigned int i = 0; i < nItems; i++ ) + { + // #i80971# protect against invalid atoms + if( pAtomNames[i] == NULL ) + continue; + + int nProtocol = -1; + WMAdaptorProtocol aSearch; + aSearch.pProtocol = pAtomNames[i]; + WMAdaptorProtocol* pMatch = (WMAdaptorProtocol*) + bsearch( &aSearch, + aProtocolTab, + sizeof( aProtocolTab )/sizeof( aProtocolTab[0] ), + sizeof( struct WMAdaptorProtocol ), + compareProtocol ); + if( pMatch ) + { + nProtocol = pMatch->nProtocol; + m_aWMAtoms[ nProtocol ] = pAtoms[ i ]; + if( pMatch->nProtocol == NET_WM_STATE_STAYS_ON_TOP ) + m_bEnableAlwaysOnTopWorks = true; + } +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, " %s%s\n", pAtomNames[i], nProtocol != -1 ? "" : " (unsupported)" ); +#endif + + XFree( pAtomNames[i] ); + } + } + XFree( pProperty ); + pProperty = NULL; + } + else if( pProperty ) + { + XFree( pProperty ); + pProperty = NULL; + } + + // get number of desktops + if( m_aWMAtoms[ NET_NUMBER_OF_DESKTOPS ] + && XGetWindowProperty( m_pDisplay, + m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), + m_aWMAtoms[ NET_NUMBER_OF_DESKTOPS ], + 0, 1, + False, + XA_CARDINAL, + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty ) == 0 + && pProperty + ) + { + m_nDesktops = *(long*)pProperty; + XFree( pProperty ); + pProperty = NULL; + // get work areas + if( m_aWMAtoms[ NET_WORKAREA ] + && XGetWindowProperty( m_pDisplay, + m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), + m_aWMAtoms[ NET_WORKAREA ], + 0, 4*m_nDesktops, + False, + XA_CARDINAL, + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty + ) == 0 + && nItems == 4*(unsigned)m_nDesktops + ) + { + m_aWMWorkAreas = ::std::vector< Rectangle > ( m_nDesktops ); + long* pValues = (long*)pProperty; + for( int i = 0; i < m_nDesktops; i++ ) + { + Point aPoint( pValues[4*i], + pValues[4*i+1] ); + Size aSize( pValues[4*i+2], + pValues[4*i+3] ); + Rectangle aWorkArea( aPoint, aSize ); + m_aWMWorkAreas[i] = aWorkArea; + if( aWorkArea != m_aWMWorkAreas[0] ) + m_bEqualWorkAreas = false; +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "workarea %d: %ldx%ld+%ld+%ld\n", + i, + m_aWMWorkAreas[i].GetWidth(), + m_aWMWorkAreas[i].GetHeight(), + m_aWMWorkAreas[i].Left(), + m_aWMWorkAreas[i].Top() ); +#endif + } + XFree( pProperty ); + } + else + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "%ld workareas for %d desktops !\n", nItems/4, m_nDesktops ); +#endif + if( pProperty ) + { + XFree(pProperty); + pProperty = NULL; + } + } + } + else if( pProperty ) + { + XFree( pProperty ); + pProperty = NULL; + } + } + else if( pProperty ) + { + XFree( pProperty ); + pProperty = NULL; + } +} + +/* + * NetWMAdaptor destructor + */ +NetWMAdaptor::~NetWMAdaptor() +{ +} + +/* + * GnomeWMAdaptor constructor + */ + +GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) : + WMAdaptor( pSalDisplay ), + m_bValid( false ) +{ + // currently all Gnome WMs do transient like expected + m_bTransientBehaviour = true; + + Atom aRealType = None; + int nFormat = 8; + unsigned long nItems = 0; + unsigned long nBytesLeft = 0; + unsigned char* pProperty = NULL; + + initAtoms(); + + // check for GnomeWM + if( m_aWMAtoms[ WIN_SUPPORTING_WM_CHECK ] && m_aWMAtoms[ WIN_PROTOCOLS ] ) + { + XLIB_Window aWMChild = None; + if( XGetWindowProperty( m_pDisplay, + m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), + m_aWMAtoms[ WIN_SUPPORTING_WM_CHECK ], + 0, 1, + False, + XA_CARDINAL, + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty ) == 0 + && aRealType == XA_CARDINAL + && nFormat == 32 + && nItems != 0 + ) + { + aWMChild = *(XLIB_Window*)pProperty; + XFree( pProperty ); + pProperty = NULL; + XLIB_Window aCheckWindow = None; + m_pSalDisplay->GetXLib()->PushXErrorLevel( true ); + if( XGetWindowProperty( m_pDisplay, + aWMChild, + m_aWMAtoms[ WIN_SUPPORTING_WM_CHECK ], + 0, 1, + False, + XA_CARDINAL, + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty ) == 0 + && aRealType == XA_CARDINAL + && nFormat == 32 + && nItems != 0 + && ! m_pSalDisplay->GetXLib()->HasXErrorOccured() + ) + { + aCheckWindow = *(XLIB_Window*)pProperty; + XFree( pProperty ); + pProperty = NULL; + if( aCheckWindow == aWMChild ) + { + m_bValid = true; + /* + * get name of WM + * this is NOT part of the GNOME WM hints, but e.g. Sawfish + * already supports this part of the extended WM hints + */ + m_aWMAtoms[ UTF8_STRING ] = XInternAtom( m_pDisplay, "UTF8_STRING", False ); + getNetWmName(); + } + } + m_pSalDisplay->GetXLib()->PopXErrorLevel(); + } + else if( pProperty ) + { + XFree( pProperty ); + pProperty = NULL; + } + } + if( m_bValid + && XGetWindowProperty( m_pDisplay, + m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), + m_aWMAtoms[ WIN_PROTOCOLS ], + 0, 0, + False, + XA_ATOM, + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty ) == 0 + && aRealType == XA_ATOM + && nFormat == 32 + ) + { + if( pProperty ) + { + XFree( pProperty ); + pProperty = NULL; + } + // collect supported protocols + if( XGetWindowProperty( m_pDisplay, + m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), + m_aWMAtoms[ WIN_PROTOCOLS ], + 0, nBytesLeft/4, + False, + XA_ATOM, + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty ) == 0 + && pProperty + ) + { + Atom* pAtoms = (Atom*)pProperty; + char** pAtomNames = (char**)alloca( sizeof(char*)*nItems ); + if( XGetAtomNames( m_pDisplay, pAtoms, nItems, pAtomNames ) ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "supported protocols:\n" ); +#endif + for( unsigned int i = 0; i < nItems; i++ ) + { + // #i80971# protect against invalid atoms + if( pAtomNames[i] == NULL ) + continue; + + int nProtocol = -1; + WMAdaptorProtocol aSearch; + aSearch.pProtocol = pAtomNames[i]; + WMAdaptorProtocol* pMatch = (WMAdaptorProtocol*) + bsearch( &aSearch, + aProtocolTab, + sizeof( aProtocolTab )/sizeof( aProtocolTab[0] ), + sizeof( struct WMAdaptorProtocol ), + compareProtocol ); + if( pMatch ) + { + nProtocol = pMatch->nProtocol; + m_aWMAtoms[ nProtocol ] = pAtoms[ i ]; + if( pMatch->nProtocol == WIN_LAYER ) + m_bEnableAlwaysOnTopWorks = true; + } + if( strncmp( "_ICEWM_TRAY", pAtomNames[i], 11 ) == 0 ) + { + m_aWMName = String(RTL_CONSTASCII_USTRINGPARAM("IceWM" )); + m_nWinGravity = NorthWestGravity; + m_nInitWinGravity = NorthWestGravity; + } +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, " %s%s\n", pAtomNames[i], nProtocol != -1 ? "" : " (unsupported)" ); +#endif + + XFree( pAtomNames[i] ); + } + } + XFree( pProperty ); + pProperty = NULL; + } + else if( pProperty ) + { + XFree( pProperty ); + pProperty = NULL; + } + + // get number of desktops + if( m_aWMAtoms[ WIN_WORKSPACE_COUNT ] + && XGetWindowProperty( m_pDisplay, + m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), + m_aWMAtoms[ WIN_WORKSPACE_COUNT ], + 0, 1, + False, + XA_CARDINAL, + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty ) == 0 + && pProperty + ) + { + m_nDesktops = *(long*)pProperty; + XFree( pProperty ); + pProperty = NULL; + } + else if( pProperty ) + { + XFree( pProperty ); + pProperty = NULL; + } + } + else if( pProperty ) + { + XFree( pProperty ); + pProperty = NULL; + } +} + +/* + * GnomeWMAdaptor destructor + */ +GnomeWMAdaptor::~GnomeWMAdaptor() +{ +} + +/* + * getNetWmName() + */ +bool WMAdaptor::getNetWmName() +{ + Atom aRealType = None; + int nFormat = 8; + unsigned long nItems = 0; + unsigned long nBytesLeft = 0; + unsigned char* pProperty = NULL; + bool bNetWM = false; + + if( m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ] && m_aWMAtoms[ NET_WM_NAME ] ) + { + XLIB_Window aWMChild = None; + if( XGetWindowProperty( m_pDisplay, + m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), + m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ], + 0, 1, + False, + XA_WINDOW, + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty ) == 0 + && aRealType == XA_WINDOW + && nFormat == 32 + && nItems != 0 + ) + { + aWMChild = *(XLIB_Window*)pProperty; + XFree( pProperty ); + pProperty = NULL; + XLIB_Window aCheckWindow = None; + m_pSalDisplay->GetXLib()->PushXErrorLevel( true ); + if( XGetWindowProperty( m_pDisplay, + aWMChild, + m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ], + 0, 1, + False, + XA_WINDOW, + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty ) == 0 + && aRealType == XA_WINDOW + && nFormat == 32 + && nItems != 0 + && ! m_pSalDisplay->GetXLib()->HasXErrorOccured() + ) + { + aCheckWindow = *(XLIB_Window*)pProperty; + XFree( pProperty ); + pProperty = NULL; + if( aCheckWindow == aWMChild ) + { + bNetWM = true; + // get name of WM + m_aWMAtoms[ UTF8_STRING ] = XInternAtom( m_pDisplay, "UTF8_STRING", False ); + if( XGetWindowProperty( m_pDisplay, + aWMChild, + m_aWMAtoms[ NET_WM_NAME ], + 0, 256, + False, + AnyPropertyType, /* m_aWMAtoms[ UTF8_STRING ],*/ + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty ) == 0 + && nItems != 0 + ) + { + if (aRealType == m_aWMAtoms[ UTF8_STRING ]) + { + m_aWMName = String( (sal_Char*)pProperty, nItems, RTL_TEXTENCODING_UTF8 ); + } + else + if (aRealType == XA_STRING) + { + m_aWMName = String( (sal_Char*)pProperty, nItems, RTL_TEXTENCODING_ISO_8859_1 ); + } + + XFree( pProperty ); + pProperty = NULL; + } + else if( pProperty ) + { + XFree( pProperty ); + pProperty = NULL; + } + // if this is metacity, check for version to enable a legacy workaround + if( m_aWMName.EqualsAscii( "Metacity" ) ) + { + int nVersionMajor = 0, nVersionMinor = 0; + Atom nVersionAtom = XInternAtom( m_pDisplay, "_METACITY_VERSION", True ); + if( nVersionAtom ) + { + if( XGetWindowProperty( m_pDisplay, + aWMChild, + nVersionAtom, + 0, 256, + False, + m_aWMAtoms[ UTF8_STRING ], + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty ) == 0 + && nItems != 0 + ) + { + String aMetaVersion( (sal_Char*)pProperty, nItems, RTL_TEXTENCODING_UTF8 ); + nVersionMajor = aMetaVersion.GetToken( 0, '.' ).ToInt32(); + nVersionMinor = aMetaVersion.GetToken( 1, '.' ).ToInt32(); + } + if( pProperty ) + { + XFree( pProperty ); + pProperty = NULL; + } + } + if( nVersionMajor < 2 || (nVersionMajor == 2 && nVersionMinor < 12) ) + m_bLegacyPartialFullscreen = true; + } + } + } + else if( pProperty ) + { + XFree( pProperty ); + pProperty = NULL; + } + m_pSalDisplay->GetXLib()->PopXErrorLevel(); + } + else if( pProperty ) + { + XFree( pProperty ); + pProperty = NULL; + } + } + return bNetWM; +} + +bool WMAdaptor::getWMshouldSwitchWorkspace() const +{ + if( ! m_bWMshouldSwitchWorkspaceInit ) + { + WMAdaptor * pWMA = const_cast(this); + + pWMA->m_bWMshouldSwitchWorkspace = true; + vcl::SettingsConfigItem* pItem = vcl::SettingsConfigItem::get(); + rtl::OUString aSetting( pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "WM" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ShouldSwitchWorkspace" ) ) ) ); + if( aSetting.getLength() == 0 ) + { + if( m_aWMName.EqualsAscii( "awesome" ) ) + { + pWMA->m_bWMshouldSwitchWorkspace = false; + } + } + else + pWMA->m_bWMshouldSwitchWorkspace = aSetting.toBoolean(); + pWMA->m_bWMshouldSwitchWorkspaceInit = true; + } + return m_bWMshouldSwitchWorkspace; +} + +/* + * WMAdaptor::isValid() + */ +bool WMAdaptor::isValid() const +{ + return true; +} + +/* + * NetWMAdaptor::isValid() + */ +bool NetWMAdaptor::isValid() const +{ + // some necessary sanity checks; there are WMs out there + // which implement some of the WM hints spec without + // real functionality + return + m_aWMAtoms[ NET_SUPPORTED ] + && m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ] + && m_aWMAtoms[ NET_WM_NAME ] + && m_aWMAtoms[ NET_WM_WINDOW_TYPE_NORMAL ] + && m_aWMAtoms[ NET_WM_WINDOW_TYPE_DIALOG ] + ; +} + +/* + * GnomeWMAdaptor::isValid() + */ +bool GnomeWMAdaptor::isValid() const +{ + return m_bValid; +} + +/* + * WMAdaptor::initAtoms + */ + +void WMAdaptor::initAtoms() +{ + // get basic atoms + for( unsigned int i = 0; i < sizeof( aAtomTab )/sizeof( aAtomTab[0] ); i++ ) + m_aWMAtoms[ aAtomTab[i].nProtocol ] = XInternAtom( m_pDisplay, aAtomTab[i].pProtocol, False ); + m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ] = XInternAtom( m_pDisplay, "_NET_SUPPORTING_WM_CHECK", True ); + m_aWMAtoms[ NET_WM_NAME ] = XInternAtom( m_pDisplay, "_NET_WM_NAME", True ); +} + +/* + * NetWMAdaptor::initAtoms + */ + +void NetWMAdaptor::initAtoms() +{ + WMAdaptor::initAtoms(); + + m_aWMAtoms[ NET_SUPPORTED ] = XInternAtom( m_pDisplay, "_NET_SUPPORTED", True ); +} + +/* + * GnomeWMAdaptor::initAtoms + */ + +void GnomeWMAdaptor::initAtoms() +{ + WMAdaptor::initAtoms(); + + m_aWMAtoms[ WIN_PROTOCOLS ] = XInternAtom( m_pDisplay, "_WIN_PROTOCOLS", True ); + m_aWMAtoms[ WIN_SUPPORTING_WM_CHECK ] = XInternAtom( m_pDisplay, "_WIN_SUPPORTING_WM_CHECK", True ); +} + +/* + * WMAdaptor::setWMName + * sets WM_NAME + * WM_ICON_NAME + */ + +void WMAdaptor::setWMName( X11SalFrame* pFrame, const String& rWMName ) const +{ + ByteString aTitle( rWMName, osl_getThreadTextEncoding() ); + + if( ! rWMName.Len() && m_aWMName.EqualsAscii( "Dtwm" ) ) + aTitle = " "; + + ::rtl::OString aWMLocale; + rtl_Locale* pLocale = NULL; + osl_getProcessLocale( &pLocale ); + if( pLocale ) + { + ::rtl::OUString aLocaleString( pLocale->Language ); + ::rtl::OUString aCountry( pLocale->Country ); + ::rtl::OUString aVariant( pLocale->Variant ); + + if( aCountry.getLength() ) + { + aLocaleString += ::rtl::OUString::createFromAscii( "_" ); + aLocaleString += aCountry; + } + if( aVariant.getLength() ) + aLocaleString += aVariant; + aWMLocale = ::rtl::OUStringToOString( aLocaleString, RTL_TEXTENCODING_ISO_8859_1 ); + } + else + { + static const char* pLang = getenv( "LANG" ); + aWMLocale = pLang ? pLang : "C"; + } + + static bool bTrustXmb = true; + #ifdef SOLARIS + /* #i64273# there are some weird cases when using IIIMP on Solaris + * where for unknown reasons XmbTextListToTextProperty results in + * garbage. Test one string once to ensure safety. + * + * FIXME: This must be a bug in xiiimp.so.2 somewhere. However + * it was not possible to recreate this in a small sample program. + * This reeks of memory corruption somehow. + */ + static bool bOnce = true; + if( bOnce ) + { + bOnce = false; + XTextProperty aTestProp = { NULL, None, 0, 0 }; + const char *pText = "trustme"; + XmbTextListToTextProperty( m_pDisplay, + &const_cast(pText), + 1, + XStdICCTextStyle, + &aTestProp ); + bTrustXmb = (aTestProp.nitems == 7) && + (aTestProp.value != NULL ) && + (strncmp( (char*)aTestProp.value, pText, 7 ) == 0) && + (aTestProp.encoding == XA_STRING); + if( aTestProp.value ) + XFree( aTestProp.value ); + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "%s\n", + bTrustXmb ? + "XmbTextListToTextProperty seems to work" : + "XmbTextListToTextProperty does not seem to work" ); + #endif + } + #endif + + char* pT = const_cast(aTitle.GetBuffer()); + XTextProperty aProp = { NULL, None, 0, 0 }; + if( bTrustXmb ) + { + XmbTextListToTextProperty( m_pDisplay, + &pT, + 1, + XStdICCTextStyle, + &aProp ); + } + + unsigned char* pData = aProp.nitems ? aProp.value : (unsigned char*)aTitle.GetBuffer(); + Atom nType = aProp.nitems ? aProp.encoding : XA_STRING; + int nFormat = aProp.nitems ? aProp.format : 8; + int nBytes = aProp.nitems ? aProp.nitems : aTitle.Len(); + const SystemEnvData* pEnv = pFrame->GetSystemData(); + XChangeProperty( m_pDisplay, + (XLIB_Window)pEnv->aShellWindow, + XA_WM_NAME, + nType, + nFormat, + PropModeReplace, + pData, + nBytes ); + XChangeProperty( m_pDisplay, + (XLIB_Window)pEnv->aShellWindow, + XA_WM_ICON_NAME, + nType, + nFormat, + PropModeReplace, + pData, + nBytes ); + XChangeProperty( m_pDisplay, + (XLIB_Window)pEnv->aShellWindow, + m_aWMAtoms[ WM_LOCALE_NAME ], + XA_STRING, + 8, + PropModeReplace, + (unsigned char*)aWMLocale.getStr(), + aWMLocale.getLength() ); + if (aProp.value != NULL) + XFree( aProp.value ); +} + +/* + * NetWMAdaptor::setWMName + * sets WM_NAME + * _NET_WM_NAME + * WM_ICON_NAME + * _NET_WM_ICON_NAME + */ +void NetWMAdaptor::setWMName( X11SalFrame* pFrame, const String& rWMName ) const +{ + WMAdaptor::setWMName( pFrame, rWMName ); + + ByteString aTitle( rWMName, RTL_TEXTENCODING_UTF8 ); + const SystemEnvData* pEnv = pFrame->GetSystemData(); + if( m_aWMAtoms[ NET_WM_NAME ] ) + XChangeProperty( m_pDisplay, + (XLIB_Window)pEnv->aShellWindow, + m_aWMAtoms[ NET_WM_NAME ], + m_aWMAtoms[ UTF8_STRING ], + 8, + PropModeReplace, + (unsigned char*)aTitle.GetBuffer(), + aTitle.Len()+1 ); + if( m_aWMAtoms[ NET_WM_ICON_NAME ] ) + XChangeProperty( m_pDisplay, + (XLIB_Window)pEnv->aShellWindow, + m_aWMAtoms[ NET_WM_ICON_NAME ], + m_aWMAtoms[ UTF8_STRING ], + 8, + PropModeReplace, + (unsigned char*)aTitle.GetBuffer(), + aTitle.Len()+1 ); + // The +1 copies the terminating null byte. Although + // the spec says, this should not be necessary + // at least the kwin implementation seems to depend + // on the null byte +} + +/* + * NetWMAdaptor::setNetWMState + * sets _NET_WM_STATE + */ +void NetWMAdaptor::setNetWMState( X11SalFrame* pFrame ) const +{ + if( m_aWMAtoms[ NET_WM_STATE ] ) + { + Atom aStateAtoms[ 10 ]; + int nStateAtoms = 0; + + // set NET_WM_STATE_MODAL + if( m_aWMAtoms[ NET_WM_STATE_MODAL ] + && pFrame->meWindowType == windowType_ModalDialogue ) + { + aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_MODAL ]; + /* + * #90998# NET_WM_STATE_SKIP_TASKBAR set on a frame will + * cause kwin not to give it the focus on map request + * this seems to be a bug in kwin + * aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_SKIP_TASKBAR ]; + */ + } + if( pFrame->mbMaximizedVert + && m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_VERT ] ) + aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_VERT ]; + if( pFrame->mbMaximizedHorz + && m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_HORZ ] ) + aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_HORZ ]; + if( pFrame->bAlwaysOnTop_ && m_aWMAtoms[ NET_WM_STATE_STAYS_ON_TOP ] ) + aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_STAYS_ON_TOP ]; + if( pFrame->mbShaded && m_aWMAtoms[ NET_WM_STATE_SHADED ] ) + aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_SHADED ]; + if( pFrame->mbFullScreen && m_aWMAtoms[ NET_WM_STATE_FULLSCREEN ] ) + aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_FULLSCREEN ]; + if( pFrame->meWindowType == windowType_Utility && m_aWMAtoms[ NET_WM_STATE_SKIP_TASKBAR ] ) + aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_SKIP_TASKBAR ]; + + if( nStateAtoms ) + { + XChangeProperty( m_pDisplay, + pFrame->GetShellWindow(), + m_aWMAtoms[ NET_WM_STATE ], + XA_ATOM, + 32, + PropModeReplace, + (unsigned char*)aStateAtoms, + nStateAtoms + ); + } + else + XDeleteProperty( m_pDisplay, + pFrame->GetShellWindow(), + m_aWMAtoms[ NET_WM_STATE ] ); + if( pFrame->mbMaximizedHorz + && pFrame->mbMaximizedVert + && ! ( pFrame->nStyle_ & SAL_FRAME_STYLE_SIZEABLE ) ) + { + /* + * for maximizing use NorthWestGravity (including decoration) + */ + XSizeHints hints; + long supplied; + bool bHint = false; + if( XGetWMNormalHints( m_pDisplay, + pFrame->GetShellWindow(), + &hints, + &supplied ) ) + { + bHint = true; + hints.flags |= PWinGravity; + hints.win_gravity = NorthWestGravity; + XSetWMNormalHints( m_pDisplay, + pFrame->GetShellWindow(), + &hints ); + XSync( m_pDisplay, False ); + } + + // SetPosSize necessary to set width/height, min/max w/h + sal_Int32 nCurrent = 0; + /* + * get current desktop here if work areas have different size + * (does this happen on any platform ?) + */ + if( ! m_bEqualWorkAreas ) + { + nCurrent = getCurrentWorkArea(); + if( nCurrent < 0 ) + nCurrent = 0; + } + Rectangle aPosSize = m_aWMWorkAreas[nCurrent]; + const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() ); + aPosSize = Rectangle( Point( aPosSize.Left() + rGeom.nLeftDecoration, + aPosSize.Top() + rGeom.nTopDecoration ), + Size( aPosSize.GetWidth() + - rGeom.nLeftDecoration + - rGeom.nRightDecoration, + aPosSize.GetHeight() + - rGeom.nTopDecoration + - rGeom.nBottomDecoration ) + ); + pFrame->SetPosSize( aPosSize ); + + /* + * reset gravity hint to static gravity + * (this should not move window according to ICCCM) + */ + if( bHint && pFrame->nShowState_ != SHOWSTATE_UNKNOWN ) + { + hints.win_gravity = StaticGravity; + XSetWMNormalHints( m_pDisplay, + pFrame->GetShellWindow(), + &hints ); + } + } + } +} + +/* + * GnomeWMAdaptor::setNetWMState + * sets _WIN_STATE + */ +void GnomeWMAdaptor::setGnomeWMState( X11SalFrame* pFrame ) const +{ + if( m_aWMAtoms[ WIN_STATE ] ) + { + sal_uInt32 nWinWMState = 0; + + if( pFrame->mbMaximizedVert ) + nWinWMState |= 1 << 2; + if( pFrame->mbMaximizedHorz ) + nWinWMState |= 1 << 3; + if( pFrame->mbShaded ) + nWinWMState |= 1 << 5; + + XChangeProperty( m_pDisplay, + pFrame->GetShellWindow(), + m_aWMAtoms[ WIN_STATE ], + XA_CARDINAL, + 32, + PropModeReplace, + (unsigned char*)&nWinWMState, + 1 + ); + if( pFrame->mbMaximizedHorz + && pFrame->mbMaximizedVert + && ! ( pFrame->nStyle_ & SAL_FRAME_STYLE_SIZEABLE ) ) + { + /* + * for maximizing use NorthWestGravity (including decoration) + */ + XSizeHints hints; + long supplied; + bool bHint = false; + if( XGetWMNormalHints( m_pDisplay, + pFrame->GetShellWindow(), + &hints, + &supplied ) ) + { + bHint = true; + hints.flags |= PWinGravity; + hints.win_gravity = NorthWestGravity; + XSetWMNormalHints( m_pDisplay, + pFrame->GetShellWindow(), + &hints ); + XSync( m_pDisplay, False ); + } + + // SetPosSize necessary to set width/height, min/max w/h + sal_Int32 nCurrent = 0; + /* + * get current desktop here if work areas have different size + * (does this happen on any platform ?) + */ + if( ! m_bEqualWorkAreas ) + { + nCurrent = getCurrentWorkArea(); + if( nCurrent < 0 ) + nCurrent = 0; + } + Rectangle aPosSize = m_aWMWorkAreas[nCurrent]; + const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() ); + aPosSize = Rectangle( Point( aPosSize.Left() + rGeom.nLeftDecoration, + aPosSize.Top() + rGeom.nTopDecoration ), + Size( aPosSize.GetWidth() + - rGeom.nLeftDecoration + - rGeom.nRightDecoration, + aPosSize.GetHeight() + - rGeom.nTopDecoration + - rGeom.nBottomDecoration ) + ); + pFrame->SetPosSize( aPosSize ); + + /* + * reset gravity hint to static gravity + * (this should not move window according to ICCCM) + */ + if( bHint && pFrame->nShowState_ != SHOWSTATE_UNKNOWN ) + { + hints.win_gravity = StaticGravity; + XSetWMNormalHints( m_pDisplay, + pFrame->GetShellWindow(), + &hints ); + } + } + } +} + +/* + * WMAdaptor::setFrameDecoration + * sets _MOTIF_WM_HINTS + * WM_TRANSIENT_FOR + */ + +void WMAdaptor::setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eType, int nDecorationFlags, X11SalFrame* pReferenceFrame ) const +{ + pFrame->meWindowType = eType; + pFrame->mnDecorationFlags = nDecorationFlags; + + if( ! pFrame->mbFullScreen ) + { + // set mwm hints + struct _mwmhints { + unsigned long flags, func, deco; + long input_mode; + unsigned long status; + } aHint; + + aHint.flags = 15; /* flags for functions, decoration, input mode and status */ + aHint.deco = 0; + aHint.func = 1L << 2; + aHint.status = 0; + aHint.input_mode = 0; + + // evaluate decoration flags + if( nDecorationFlags & decoration_All ) + aHint.deco = 1, aHint.func = 1; + else + { + if( nDecorationFlags & decoration_Title ) + aHint.deco |= 1L << 3; + if( nDecorationFlags & decoration_Border ) + aHint.deco |= 1L << 1; + if( nDecorationFlags & decoration_Resize ) + aHint.deco |= 1L << 2, aHint.func |= 1L << 1; + if( nDecorationFlags & decoration_MinimizeBtn ) + aHint.deco |= 1L << 5, aHint.func |= 1L << 3; + if( nDecorationFlags & decoration_MaximizeBtn ) + aHint.deco |= 1L << 6, aHint.func |= 1L << 4; + if( nDecorationFlags & decoration_CloseBtn ) + aHint.deco |= 1L << 4, aHint.func |= 1L << 5; + } + // evaluate window type + switch( eType ) + { + case windowType_ModalDialogue: + aHint.input_mode = 1; + break; + default: + break; + } + + // set the hint + XChangeProperty( m_pDisplay, + pFrame->GetShellWindow(), + m_aWMAtoms[ MOTIF_WM_HINTS ], + m_aWMAtoms[ MOTIF_WM_HINTS ], + 32, + PropModeReplace, + (unsigned char*)&aHint, + 5 ); + } + + // set transientFor hint + /* #91030# dtwm will not map a dialogue if the transient + * window is iconified. This is deemed undesireable because + * message boxes do not get mapped, so use the root as transient + * instead. + */ + if( pReferenceFrame ) + { + XSetTransientForHint( m_pDisplay, + pFrame->GetShellWindow(), + pReferenceFrame->bMapped_ ? + pReferenceFrame->GetShellWindow() : + m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ) + ); + if( ! pReferenceFrame->bMapped_ ) + pFrame->mbTransientForRoot = true; + } + // #110333# in case no one ever sets a title prevent + // the Dtwm taking the class instead + if( m_aWMName.EqualsAscii( "Dtwm" ) ) + setWMName( pFrame, String() ); +} + +/* + * NetWMAdaptor::setFrameDecoration + * sets _MOTIF_WM_HINTS + * _NET_WM_WINDOW_TYPE + * _NET_WM_STATE + * WM_TRANSIENT_FOR + */ + +void NetWMAdaptor::setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eType, int nDecorationFlags, X11SalFrame* pReferenceFrame ) const +{ + WMAdaptor::setFrameTypeAndDecoration( pFrame, eType, nDecorationFlags, pReferenceFrame ); + + setNetWMState( pFrame ); + + // set NET_WM_WINDOW_TYPE + if( m_aWMAtoms[ NET_WM_WINDOW_TYPE ] ) + { + Atom aWindowTypes[4]; + int nWindowTypes = 0; + switch( eType ) + { + case windowType_Utility: + aWindowTypes[nWindowTypes++] = + m_aWMAtoms[ NET_WM_WINDOW_TYPE_UTILITY ] ? + m_aWMAtoms[ NET_WM_WINDOW_TYPE_UTILITY ] : + m_aWMAtoms[ NET_WM_WINDOW_TYPE_DIALOG ]; + break; + case windowType_ModelessDialogue: + case windowType_ModalDialogue: + aWindowTypes[nWindowTypes++] = + m_aWMAtoms[ NET_WM_WINDOW_TYPE_DIALOG ]; + break; + case windowType_Splash: + aWindowTypes[nWindowTypes++] = + m_aWMAtoms[ NET_WM_WINDOW_TYPE_SPLASH ] ? + m_aWMAtoms[ NET_WM_WINDOW_TYPE_SPLASH ] : + m_aWMAtoms[ NET_WM_WINDOW_TYPE_NORMAL ]; + break; + case windowType_Toolbar: + if( m_aWMAtoms[ KDE_NET_WM_WINDOW_TYPE_OVERRIDE ] ) + aWindowTypes[nWindowTypes++] = m_aWMAtoms[ KDE_NET_WM_WINDOW_TYPE_OVERRIDE ]; + aWindowTypes[nWindowTypes++] = + m_aWMAtoms[ NET_WM_WINDOW_TYPE_TOOLBAR ] ? + m_aWMAtoms[ NET_WM_WINDOW_TYPE_TOOLBAR ] : + m_aWMAtoms[ NET_WM_WINDOW_TYPE_NORMAL]; + break; + case windowType_Dock: + aWindowTypes[nWindowTypes++] = + m_aWMAtoms[ NET_WM_WINDOW_TYPE_DOCK ] ? + m_aWMAtoms[ NET_WM_WINDOW_TYPE_DOCK ] : + m_aWMAtoms[ NET_WM_WINDOW_TYPE_NORMAL]; + break; + default: + aWindowTypes[nWindowTypes++] = m_aWMAtoms[ NET_WM_WINDOW_TYPE_NORMAL ]; + break; + } + XChangeProperty( m_pDisplay, + pFrame->GetShellWindow(), + m_aWMAtoms[ NET_WM_WINDOW_TYPE ], + XA_ATOM, + 32, + PropModeReplace, + (unsigned char*)aWindowTypes, + nWindowTypes ); + } + if( ( eType == windowType_ModalDialogue || + eType == windowType_ModelessDialogue ) + && ! pReferenceFrame ) + { + XSetTransientForHint( m_pDisplay, + pFrame->GetShellWindow(), + m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ) ); + pFrame->mbTransientForRoot = true; + } +} + +/* + * WMAdaptor::maximizeFrame + */ + +void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVertical ) const +{ + pFrame->mbMaximizedVert = bVertical; + pFrame->mbMaximizedHorz = bHorizontal; + + const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() ); + + // discard pending configure notifies for this frame + XSync( m_pDisplay, False ); + XEvent aDiscard; + while( XCheckTypedWindowEvent( m_pDisplay, + pFrame->GetShellWindow(), + ConfigureNotify, + &aDiscard ) ) + ; + while( XCheckTypedWindowEvent( m_pDisplay, + pFrame->GetWindow(), + ConfigureNotify, + &aDiscard ) ) + ; + + if( bHorizontal || bVertical ) + { + Size aScreenSize( m_pSalDisplay->GetScreenSize( pFrame->GetScreenNumber() ) ); + Point aTL( rGeom.nLeftDecoration, rGeom.nTopDecoration ); + if( m_pSalDisplay->IsXinerama() ) + { + Point aMed( aTL.X() + rGeom.nWidth/2, aTL.Y() + rGeom.nHeight/2 ); + const std::vector< Rectangle >& rScreens = m_pSalDisplay->GetXineramaScreens(); + for( unsigned int i = 0; i < rScreens.size(); i++ ) + if( rScreens[i].IsInside( aMed ) ) + { + aTL += rScreens[i].TopLeft(); + aScreenSize = rScreens[i].GetSize(); + break; + } + } + Rectangle aTarget( aTL, + Size( aScreenSize.Width() - rGeom.nLeftDecoration - rGeom.nTopDecoration, + aScreenSize.Height() - rGeom.nTopDecoration - rGeom.nBottomDecoration ) + ); + if( ! bHorizontal ) + { + aTarget.SetSize( + Size( + pFrame->maRestorePosSize.IsEmpty() ? + rGeom.nWidth : pFrame->maRestorePosSize.GetWidth(), + aTarget.GetHeight() + ) + ); + aTarget.Left() = + pFrame->maRestorePosSize.IsEmpty() ? + rGeom.nX : pFrame->maRestorePosSize.Left(); + } + else if( ! bVertical ) + { + aTarget.SetSize( + Size( + aTarget.GetWidth(), + pFrame->maRestorePosSize.IsEmpty() ? + rGeom.nHeight : pFrame->maRestorePosSize.GetHeight() + ) + ); + aTarget.Top() = + pFrame->maRestorePosSize.IsEmpty() ? + rGeom.nY : pFrame->maRestorePosSize.Top(); + } + + Rectangle aRestore( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); + if( pFrame->bMapped_ ) + { + XSetInputFocus( m_pDisplay, + pFrame->GetShellWindow(), + RevertToNone, + CurrentTime + ); + if( m_aWMName.EqualsAscii( "Dtwm" ) ) + { + /* + * Dtwm will only position correctly with center gravity + * and in this case the request actually changes the frame + * not the shell window + */ + aTarget = Rectangle( Point( 0, 0 ), aScreenSize ); + aRestore.Move( -rGeom.nLeftDecoration, -rGeom.nTopDecoration ); + } + } + + if( pFrame->maRestorePosSize.IsEmpty() ) + pFrame->maRestorePosSize = aRestore; + + pFrame->SetPosSize( aTarget ); + pFrame->nWidth_ = aTarget.GetWidth(); + pFrame->nHeight_ = aTarget.GetHeight(); + XRaiseWindow( m_pDisplay, + pFrame->GetShellWindow() + ); + if( pFrame->GetStackingWindow() ) + XRaiseWindow( m_pDisplay, + pFrame->GetStackingWindow() + ); + + } + else + { + pFrame->SetPosSize( pFrame->maRestorePosSize ); + pFrame->maRestorePosSize = Rectangle(); + pFrame->nWidth_ = rGeom.nWidth; + pFrame->nHeight_ = rGeom.nHeight; + if( m_aWMName.EqualsAscii( "Dtwm" ) && pFrame->bMapped_ ) + { + pFrame->maGeometry.nX += rGeom.nLeftDecoration; + pFrame->maGeometry.nY += rGeom.nTopDecoration; + } + } +} + +/* + * NetWMAdaptor::maximizeFrame + * changes _NET_WM_STATE by sending a client message + */ + +void NetWMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVertical ) const +{ + pFrame->mbMaximizedVert = bVertical; + pFrame->mbMaximizedHorz = bHorizontal; + + if( m_aWMAtoms[ NET_WM_STATE ] + && m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_VERT ] + && m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_HORZ ] + && ( pFrame->nStyle_ & ~SAL_FRAME_STYLE_DEFAULT ) + ) + { + if( pFrame->bMapped_ ) + { + // window already mapped, send WM a message + XEvent aEvent; + aEvent.type = ClientMessage; + aEvent.xclient.display = m_pDisplay; + aEvent.xclient.window = pFrame->GetShellWindow(); + aEvent.xclient.message_type = m_aWMAtoms[ NET_WM_STATE ]; + aEvent.xclient.format = 32; + aEvent.xclient.data.l[0] = bHorizontal ? 1 : 0; + aEvent.xclient.data.l[1] = m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_HORZ ]; + aEvent.xclient.data.l[2] = bHorizontal == bVertical ? m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_VERT ] : 0; + aEvent.xclient.data.l[3] = 0; + aEvent.xclient.data.l[4] = 0; + XSendEvent( m_pDisplay, + m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), + False, + SubstructureNotifyMask | SubstructureRedirectMask, + &aEvent + ); + if( bHorizontal != bVertical ) + { + aEvent.xclient.data.l[0]= bVertical ? 1 : 0; + aEvent.xclient.data.l[1]= m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_VERT ]; + aEvent.xclient.data.l[2]= 0; + XSendEvent( m_pDisplay, + m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), + False, + SubstructureNotifyMask | SubstructureRedirectMask, + &aEvent + ); + } + } + else + { + // window not mapped yet, set _NET_WM_STATE directly + setNetWMState( pFrame ); + } + if( !bHorizontal && !bVertical ) + pFrame->maRestorePosSize = Rectangle(); + else if( pFrame->maRestorePosSize.IsEmpty() ) + { + const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() ); + pFrame->maRestorePosSize = + Rectangle( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); + } + } + else + WMAdaptor::maximizeFrame( pFrame, bHorizontal, bVertical ); +} + +/* + * GnomeWMAdaptor::maximizeFrame + * changes _WIN_STATE by sending a client message + */ + +void GnomeWMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVertical ) const +{ + pFrame->mbMaximizedVert = bVertical; + pFrame->mbMaximizedHorz = bHorizontal; + + if( m_aWMAtoms[ WIN_STATE ] + && ( pFrame->nStyle_ & ~SAL_FRAME_STYLE_DEFAULT ) + ) + { + if( pFrame->bMapped_ ) + { + // window already mapped, send WM a message + XEvent aEvent; + aEvent.type = ClientMessage; + aEvent.xclient.display = m_pDisplay; + aEvent.xclient.window = pFrame->GetShellWindow(); + aEvent.xclient.message_type = m_aWMAtoms[ WIN_STATE ]; + aEvent.xclient.format = 32; + aEvent.xclient.data.l[0] = (1<<2)|(1<<3); + aEvent.xclient.data.l[1] = + (bVertical ? (1<<2) : 0) + | (bHorizontal ? (1<<3) : 0); + aEvent.xclient.data.l[2] = 0; + aEvent.xclient.data.l[3] = 0; + aEvent.xclient.data.l[4] = 0; + XSendEvent( m_pDisplay, + m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), + False, + SubstructureNotifyMask, + &aEvent + ); + } + else + // window not mapped yet, set _WIN_STATE directly + setGnomeWMState( pFrame ); + + if( !bHorizontal && !bVertical ) + pFrame->maRestorePosSize = Rectangle(); + else if( pFrame->maRestorePosSize.IsEmpty() ) + { + const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() ); + pFrame->maRestorePosSize = + Rectangle( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); + } + } + else + WMAdaptor::maximizeFrame( pFrame, bHorizontal, bVertical ); +} + +/* + * WMAdaptor::supportsICCCMPos + */ + +bool WMAdaptor::supportsICCCMPos() const +{ + return + m_aWMName.EqualsAscii( "Sawfish" ) + || m_aWMName.EqualsAscii( "Dtwm" ); +} + +/* + * NetWMAdaptor::supportsICCCMPos + */ + +bool NetWMAdaptor::supportsICCCMPos() const +{ + return true; +} + + +/* + * WMAdaptor::enableAlwaysOnTop + */ +void WMAdaptor::enableAlwaysOnTop( X11SalFrame*, bool /*bEnable*/ ) const +{ +} + +/* + * NetWMAdaptor::enableAlwaysOnTop + */ +void NetWMAdaptor::enableAlwaysOnTop( X11SalFrame* pFrame, bool bEnable ) const +{ + pFrame->bAlwaysOnTop_ = bEnable; + if( m_aWMAtoms[ NET_WM_STATE_STAYS_ON_TOP ] ) + { + if( pFrame->bMapped_ ) + { + // window already mapped, send WM a message + XEvent aEvent; + aEvent.type = ClientMessage; + aEvent.xclient.display = m_pDisplay; + aEvent.xclient.window = pFrame->GetShellWindow(); + aEvent.xclient.message_type = m_aWMAtoms[ NET_WM_STATE ]; + aEvent.xclient.format = 32; + aEvent.xclient.data.l[0] = bEnable ? 1 : 0; + aEvent.xclient.data.l[1] = m_aWMAtoms[ NET_WM_STATE_STAYS_ON_TOP ]; + aEvent.xclient.data.l[2] = 0; + aEvent.xclient.data.l[3] = 0; + aEvent.xclient.data.l[4] = 0; + XSendEvent( m_pDisplay, + m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), + False, + SubstructureNotifyMask | SubstructureRedirectMask, + &aEvent + ); + } + else + setNetWMState( pFrame ); + } +} + +/* + * GnomeWMAdaptor::enableAlwaysOnTop + */ +void GnomeWMAdaptor::enableAlwaysOnTop( X11SalFrame* pFrame, bool bEnable ) const +{ + pFrame->bAlwaysOnTop_ = bEnable; + if( m_aWMAtoms[ WIN_LAYER ] ) + { + if( pFrame->bMapped_ ) + { + // window already mapped, send WM a message + XEvent aEvent; + aEvent.type = ClientMessage; + aEvent.xclient.display = m_pDisplay; + aEvent.xclient.window = pFrame->GetShellWindow(); + aEvent.xclient.message_type = m_aWMAtoms[ WIN_LAYER ]; + aEvent.xclient.format = 32; + aEvent.xclient.data.l[0] = bEnable ? 6 : 4; + aEvent.xclient.data.l[1] = 0; + aEvent.xclient.data.l[2] = 0; + aEvent.xclient.data.l[3] = 0; + aEvent.xclient.data.l[4] = 0; + XSendEvent( m_pDisplay, + m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), + False, + SubstructureNotifyMask | SubstructureRedirectMask, + &aEvent + ); + } + else + { + sal_uInt32 nNewLayer = bEnable ? 6 : 4; + XChangeProperty( m_pDisplay, + pFrame->GetShellWindow(), + m_aWMAtoms[ WIN_LAYER ], + XA_CARDINAL, + 32, + PropModeReplace, + (unsigned char*)&nNewLayer, + 1 + ); + } + } +} + +/* + * WMAdaptor::changeReferenceFrame + */ +void WMAdaptor::changeReferenceFrame( X11SalFrame* pFrame, X11SalFrame* pReferenceFrame ) const +{ + if( ! ( pFrame->nStyle_ & SAL_FRAME_STYLE_PLUG ) + && ! pFrame->IsOverrideRedirect() + && ! pFrame->IsFloatGrabWindow() + ) + { + XLIB_Window aTransient = pFrame->pDisplay_->GetRootWindow( pFrame->GetScreenNumber() ); + pFrame->mbTransientForRoot = true; + if( pReferenceFrame ) + { + aTransient = pReferenceFrame->GetShellWindow(); + pFrame->mbTransientForRoot = false; + } + XSetTransientForHint( m_pDisplay, + pFrame->GetShellWindow(), + aTransient ); + } +} + +/* + * WMAdaptor::handlePropertyNotify + */ +int WMAdaptor::handlePropertyNotify( X11SalFrame*, XPropertyEvent* ) const +{ + return 0; +} + +/* + * NetWMAdaptor::handlePropertyNotify + */ +int NetWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEvent ) const +{ + int nHandled = 1; + if( pEvent->atom == m_aWMAtoms[ NET_WM_STATE ] ) + { + pFrame->mbMaximizedHorz = pFrame->mbMaximizedVert = false; + pFrame->mbShaded = false; + + if( pEvent->state == PropertyNewValue ) + { + Atom nType, *pStates; + int nFormat; + unsigned long nItems, nBytesLeft; + unsigned char* pData = NULL; + long nOffset = 0; + do + { + XGetWindowProperty( m_pDisplay, + pEvent->window, + m_aWMAtoms[ NET_WM_STATE ], + nOffset, 64, + False, + XA_ATOM, + &nType, + &nFormat, + &nItems, &nBytesLeft, + &pData ); + if( pData ) + { + if( nType == XA_ATOM && nFormat == 32 && nItems > 0 ) + { + pStates = (Atom*)pData; + for( unsigned long i = 0; i < nItems; i++ ) + { + if( pStates[i] == m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_VERT ] && m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_VERT ] ) + pFrame->mbMaximizedVert = true; + else if( pStates[i] == m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_HORZ ] && m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_HORZ ] ) + pFrame->mbMaximizedHorz = true; + else if( pStates[i] == m_aWMAtoms[ NET_WM_STATE_SHADED ] && m_aWMAtoms[ NET_WM_STATE_SHADED ] ) + pFrame->mbShaded = true; + } + } + XFree( pData ); + pData = NULL; + nOffset += nItems * nFormat / 32; + } + else + break; + } while( nBytesLeft > 0 ); + } + + if( ! (pFrame->mbMaximizedHorz || pFrame->mbMaximizedVert ) ) + pFrame->maRestorePosSize = Rectangle(); + else + { + const SalFrameGeometry& rGeom = pFrame->GetUnmirroredGeometry(); + // the current geometry may already be changed by the corresponding + // ConfigureNotify, but this cannot be helped + pFrame->maRestorePosSize = + Rectangle( Point( rGeom.nX, rGeom.nY ), + Size( rGeom.nWidth, rGeom.nHeight ) ); + } + } + else if( pEvent->atom == m_aWMAtoms[ NET_WM_DESKTOP ] ) + { + pFrame->m_nWorkArea = getWindowWorkArea( pFrame->GetShellWindow() ); + } + else + nHandled = 0; + + return nHandled; +} + +/* + * GnomeWMAdaptor::handlePropertyNotify + */ +int GnomeWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEvent ) const +{ + int nHandled = 1; + if( pEvent->atom == m_aWMAtoms[ WIN_STATE ] ) + { + pFrame->mbMaximizedHorz = pFrame->mbMaximizedVert = false; + pFrame->mbShaded = false; + + if( pEvent->state == PropertyNewValue ) + { + Atom nType; + int nFormat = 0; + unsigned long nItems = 0; + unsigned long nBytesLeft = 0; + unsigned char* pData = 0; + XGetWindowProperty( m_pDisplay, + pEvent->window, + m_aWMAtoms[ WIN_STATE ], + 0, 1, + False, + XA_CARDINAL, + &nType, + &nFormat, + &nItems, &nBytesLeft, + &pData ); + if( pData ) + { + if( nType == XA_CARDINAL && nFormat == 32 && nItems == 1 ) + { + sal_uInt32 nWinState = *(sal_uInt32*)pData; + if( nWinState & (1<<2) ) + pFrame->mbMaximizedVert = true; + if( nWinState & (1<<3) ) + pFrame->mbMaximizedHorz = true; + if( nWinState & (1<<5) ) + pFrame->mbShaded = true; + } + XFree( pData ); + } + } + + if( ! (pFrame->mbMaximizedHorz || pFrame->mbMaximizedVert ) ) + pFrame->maRestorePosSize = Rectangle(); + else + { + const SalFrameGeometry& rGeom = pFrame->GetUnmirroredGeometry(); + // the current geometry may already be changed by the corresponding + // ConfigureNotify, but this cannot be helped + pFrame->maRestorePosSize = + Rectangle( Point( rGeom.nX, rGeom.nY ), + Size( rGeom.nWidth, rGeom.nHeight ) ); + } + } + else if( pEvent->atom == m_aWMAtoms[ NET_WM_DESKTOP ] ) + { + pFrame->m_nWorkArea = getWindowWorkArea( pFrame->GetShellWindow() ); + } + else + nHandled = 0; + + return nHandled; +} + +/* + * WMAdaptor::shade + */ +void WMAdaptor::shade( X11SalFrame*, bool /*bToShaded*/ ) const +{ +} + +/* + * NetWMAdaptor::shade + */ +void NetWMAdaptor::shade( X11SalFrame* pFrame, bool bToShaded ) const +{ + if( m_aWMAtoms[ NET_WM_STATE ] + && m_aWMAtoms[ NET_WM_STATE_SHADED ] + && ( pFrame->nStyle_ & ~SAL_FRAME_STYLE_DEFAULT ) + ) + { + pFrame->mbShaded = bToShaded; + if( pFrame->bMapped_ ) + { + // window already mapped, send WM a message + XEvent aEvent; + aEvent.type = ClientMessage; + aEvent.xclient.display = m_pDisplay; + aEvent.xclient.window = pFrame->GetShellWindow(); + aEvent.xclient.message_type = m_aWMAtoms[ NET_WM_STATE ]; + aEvent.xclient.format = 32; + aEvent.xclient.data.l[0] = bToShaded ? 1 : 0; + aEvent.xclient.data.l[1] = m_aWMAtoms[ NET_WM_STATE_SHADED ]; + aEvent.xclient.data.l[2] = 0; + aEvent.xclient.data.l[3] = 0; + aEvent.xclient.data.l[4] = 0; + XSendEvent( m_pDisplay, + m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), + False, + SubstructureNotifyMask | SubstructureRedirectMask, + &aEvent + ); + } + else + { + // window not mapped yet, set _NET_WM_STATE directly + setNetWMState( pFrame ); + } + } +} + +/* + * GnomeWMAdaptor::shade + */ +void GnomeWMAdaptor::shade( X11SalFrame* pFrame, bool bToShaded ) const +{ + if( m_aWMAtoms[ WIN_STATE ] ) + { + pFrame->mbShaded = bToShaded; + if( pFrame->bMapped_ ) + { + // window already mapped, send WM a message + XEvent aEvent; + aEvent.type = ClientMessage; + aEvent.xclient.display = m_pDisplay; + aEvent.xclient.window = pFrame->GetShellWindow(); + aEvent.xclient.message_type = m_aWMAtoms[ WIN_STATE ]; + aEvent.xclient.format = 32; + aEvent.xclient.data.l[0] = (1<<5); + aEvent.xclient.data.l[1] = bToShaded ? (1<<5) : 0; + aEvent.xclient.data.l[2] = 0; + aEvent.xclient.data.l[3] = 0; + aEvent.xclient.data.l[4] = 0; + XSendEvent( m_pDisplay, + m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), + False, + SubstructureNotifyMask | SubstructureRedirectMask, + &aEvent + ); + } + else + setGnomeWMState( pFrame ); + } +} + +/* + * WMAdaptor::showFullScreen + */ +void WMAdaptor::showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const +{ + pFrame->mbFullScreen = bFullScreen; + maximizeFrame( pFrame, bFullScreen, bFullScreen ); +} + +/* + * NetWMAdaptor::showFullScreen + */ +void NetWMAdaptor::showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const +{ + if( m_aWMAtoms[ NET_WM_STATE_FULLSCREEN ] ) + { + pFrame->mbFullScreen = bFullScreen; + if( bFullScreen ) + { + if( m_aWMAtoms[ MOTIF_WM_HINTS ] ) + { + XDeleteProperty( m_pDisplay, + pFrame->GetShellWindow(), + m_aWMAtoms[ MOTIF_WM_HINTS ] ); + } + } + if( pFrame->bMapped_ ) + { + // window already mapped, send WM a message + XEvent aEvent; + aEvent.type = ClientMessage; + aEvent.xclient.display = m_pDisplay; + aEvent.xclient.window = pFrame->GetShellWindow(); + aEvent.xclient.message_type = m_aWMAtoms[ NET_WM_STATE ]; + aEvent.xclient.format = 32; + aEvent.xclient.data.l[0] = bFullScreen ? 1 : 0; + aEvent.xclient.data.l[1] = m_aWMAtoms[ NET_WM_STATE_FULLSCREEN ]; + aEvent.xclient.data.l[2] = 0; + aEvent.xclient.data.l[3] = 0; + aEvent.xclient.data.l[4] = 0; + XSendEvent( m_pDisplay, + m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), + False, + SubstructureNotifyMask | SubstructureRedirectMask, + &aEvent + ); + } + else + { + // window not mapped yet, set _NET_WM_STATE directly + setNetWMState( pFrame ); + } + // #i42750# guess size before resize event shows up + if( bFullScreen ) + { + if( m_pSalDisplay->IsXinerama() ) + { + XLIB_Window aRoot, aChild; + int root_x = 0, root_y = 0, lx, ly; + unsigned int mask; + XQueryPointer( m_pDisplay, + m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), + &aRoot, &aChild, + &root_x, &root_y, &lx, &ly, &mask ); + const std::vector< Rectangle >& rScreens = m_pSalDisplay->GetXineramaScreens(); + Point aMousePoint( root_x, root_y ); + for( unsigned int i = 0; i < rScreens.size(); i++ ) + { + if( rScreens[i].IsInside( aMousePoint ) ) + { + pFrame->maGeometry.nX = rScreens[i].Left(); + pFrame->maGeometry.nY = rScreens[i].Top(); + pFrame->maGeometry.nWidth = rScreens[i].GetWidth(); + pFrame->maGeometry.nHeight = rScreens[i].GetHeight(); + break; + } + } + } + else + { + Size aSize = m_pSalDisplay->GetScreenSize( pFrame->GetScreenNumber() ); + pFrame->maGeometry.nX = 0; + pFrame->maGeometry.nY = 0; + pFrame->maGeometry.nWidth = aSize.Width(); + pFrame->maGeometry.nHeight = aSize.Height(); + } + pFrame->CallCallback( SALEVENT_MOVERESIZE, NULL ); + } + } + else WMAdaptor::showFullScreen( pFrame, bFullScreen ); +} + +/* + * WMAdaptor::getCurrentWorkArea + */ +// FIXME: multiscreen case +int WMAdaptor::getCurrentWorkArea() const +{ + int nCurrent = -1; + if( m_aWMAtoms[ NET_CURRENT_DESKTOP ] ) + { + Atom aRealType = None; + int nFormat = 8; + unsigned long nItems = 0; + unsigned long nBytesLeft = 0; + unsigned char* pProperty = NULL; + if( XGetWindowProperty( m_pDisplay, + m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), + m_aWMAtoms[ NET_CURRENT_DESKTOP ], + 0, 1, + False, + XA_CARDINAL, + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty ) == 0 + && pProperty + ) + { + nCurrent = int(*(sal_Int32*)pProperty); + XFree( pProperty ); + } + else if( pProperty ) + { + XFree( pProperty ); + pProperty = NULL; + } + } + return nCurrent; +} + +/* + * WMAdaptor::getWindowWorkArea + */ +int WMAdaptor::getWindowWorkArea( XLIB_Window aWindow ) const +{ + int nCurrent = -1; + if( m_aWMAtoms[ NET_WM_DESKTOP ] ) + { + Atom aRealType = None; + int nFormat = 8; + unsigned long nItems = 0; + unsigned long nBytesLeft = 0; + unsigned char* pProperty = NULL; + if( XGetWindowProperty( m_pDisplay, + aWindow, + m_aWMAtoms[ NET_WM_DESKTOP ], + 0, 1, + False, + XA_CARDINAL, + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty ) == 0 + && pProperty + ) + { + nCurrent = int(*(sal_Int32*)pProperty); + XFree( pProperty ); + } + else if( pProperty ) + { + XFree( pProperty ); + pProperty = NULL; + } + } + return nCurrent; +} + +/* + * WMAdaptor::getCurrentWorkArea + */ +// fixme: multi screen case +void WMAdaptor::switchToWorkArea( int nWorkArea, bool bConsiderWM ) const +{ + if( bConsiderWM && ! getWMshouldSwitchWorkspace() ) + return; + + if( m_aWMAtoms[ NET_CURRENT_DESKTOP ] ) + { + XEvent aEvent; + aEvent.type = ClientMessage; + aEvent.xclient.display = m_pDisplay; + aEvent.xclient.window = m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ); + aEvent.xclient.message_type = m_aWMAtoms[ NET_CURRENT_DESKTOP ]; + aEvent.xclient.format = 32; + aEvent.xclient.data.l[0] = nWorkArea; + aEvent.xclient.data.l[1] = 0; + aEvent.xclient.data.l[2] = 0; + aEvent.xclient.data.l[3] = 0; + aEvent.xclient.data.l[4] = 0; + XSendEvent( m_pDisplay, + m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), + False, + SubstructureNotifyMask | SubstructureRedirectMask, + &aEvent + ); + } +} + +/* + * WMAdaptor::frameIsMapping + */ +void WMAdaptor::frameIsMapping( X11SalFrame* ) const +{ +} + +/* + * NetWMAdaptor::frameIsMapping + */ +void NetWMAdaptor::frameIsMapping( X11SalFrame* pFrame ) const +{ + setNetWMState( pFrame ); +} + +/* + * WMAdaptor::setFrameStruts + */ +void WMAdaptor::setFrameStruts( X11SalFrame*, + int, int, int, int, + int, int, int, int, + int, int, int, int ) const +{ +} + +/* + * NetWMAdaptor::setFrameStruts + */ +void NetWMAdaptor::setFrameStruts( X11SalFrame* pFrame, + int left, int right, int top, int bottom, + int left_start_y, int left_end_y, + int right_start_y, int right_end_y, + int top_start_x, int top_end_x, + int bottom_start_x, int bottom_end_x ) const +{ + long nData[12]; + nData[0] = left; + nData[1] = right; + nData[2] = top; + nData[3] = bottom; + nData[4] = left_start_y; + nData[5] = left_end_y; + nData[6] = right_start_y; + nData[7] = right_end_y; + nData[8] = top_start_x; + nData[9] = top_end_x; + nData[10]= bottom_start_x; + nData[11]= bottom_end_x; + Atom aProperty = None; + int nSetData = 0; + + if( m_aWMAtoms[NET_WM_STRUT_PARTIAL] ) + { + aProperty = m_aWMAtoms[NET_WM_STRUT_PARTIAL]; + nSetData = 12; + } + else if( m_aWMAtoms[NET_WM_STRUT] ) + { + aProperty = m_aWMAtoms[NET_WM_STRUT]; + nSetData = 4; + } + if( nSetData ) + { + XChangeProperty( m_pDisplay, + pFrame->GetShellWindow(), + aProperty, + XA_CARDINAL, + 32, + PropModeReplace, + (unsigned char*)&nData, + nSetData + ); + } +} + +/* + * WMAdaptor::setUserTime + */ +void WMAdaptor::setUserTime( X11SalFrame*, long ) const +{ +} + +/* + * NetWMAdaptor::setUserTime + */ +void NetWMAdaptor::setUserTime( X11SalFrame* i_pFrame, long i_nUserTime ) const +{ + if( m_aWMAtoms[NET_WM_USER_TIME] ) + { + XChangeProperty( m_pDisplay, + i_pFrame->GetShellWindow(), + m_aWMAtoms[NET_WM_USER_TIME], + XA_CARDINAL, + 32, + PropModeReplace, + (unsigned char*)&i_nUserTime, + 1 + ); + } +} + +/* + * WMAdaptor::setPID + */ +void WMAdaptor::setPID( X11SalFrame* i_pFrame ) const +{ + if( m_aWMAtoms[NET_WM_PID] ) + { + long nPID = (long)getpid(); + XChangeProperty( m_pDisplay, + i_pFrame->GetShellWindow(), + m_aWMAtoms[NET_WM_PID], + XA_CARDINAL, + 32, + PropModeReplace, + (unsigned char*)&nPID, + 1 + ); + } +} + +/* +* WMAdaptor::setClientMachine +*/ +void WMAdaptor::setClientMachine( X11SalFrame* i_pFrame ) const +{ + rtl::OString aWmClient( rtl::OUStringToOString( GetX11SalData()->GetLocalHostName(), RTL_TEXTENCODING_ASCII_US ) ); + XTextProperty aClientProp = { (unsigned char*)aWmClient.getStr(), XA_STRING, 8, aWmClient.getLength() }; + XSetWMClientMachine( m_pDisplay, i_pFrame->GetShellWindow(), &aClientProp ); +} + +void WMAdaptor::answerPing( X11SalFrame* i_pFrame, XClientMessageEvent* i_pEvent ) const +{ + if( m_aWMAtoms[NET_WM_PING] && + i_pEvent->message_type == m_aWMAtoms[ WM_PROTOCOLS ] && + (Atom)i_pEvent->data.l[0] == m_aWMAtoms[ NET_WM_PING ] ) + { + XEvent aEvent; + aEvent.xclient = *i_pEvent; + aEvent.xclient.window = m_pSalDisplay->GetRootWindow( i_pFrame->GetScreenNumber() ); + XSendEvent( m_pDisplay, + m_pSalDisplay->GetRootWindow( i_pFrame->GetScreenNumber() ), + False, + SubstructureNotifyMask | SubstructureRedirectMask, + &aEvent + ); + XFlush( m_pDisplay ); + } +} diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx new file mode 100644 index 000000000000..03429982c2d1 --- /dev/null +++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx @@ -0,0 +1,343 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include +#include +#include + +#include "vcl/dllapi.h" + +#include "rtl/ustrbuf.hxx" +#include "osl/module.h" +#include "osl/process.h" +#include "osl/thread.h" + +#include + +using namespace rtl; + +enum { + DESKTOP_NONE = 0, + DESKTOP_UNKNOWN, + DESKTOP_GNOME, + DESKTOP_KDE, + DESKTOP_KDE4, + DESKTOP_CDE +}; + +static const char * desktop_strings[] = { "none", "unknown", "GNOME", "KDE", "KDE4", "CDE" }; + +static bool is_gnome_desktop( Display* pDisplay ) +{ + bool ret = false; + + // warning: these checks are coincidental, GNOME does not + // explicitly advertise itself + + if ( NULL != getenv( "GNOME_DESKTOP_SESSION_ID" ) ) + ret = true; + + if( ! ret ) + { + Atom nAtom1 = XInternAtom( pDisplay, "GNOME_SM_PROXY", True ); + Atom nAtom2 = XInternAtom( pDisplay, "NAUTILUS_DESKTOP_WINDOW_ID", True ); + if( nAtom1 || nAtom2 ) + { + int nProperties = 0; + Atom* pProperties = XListProperties( pDisplay, DefaultRootWindow( pDisplay ), &nProperties ); + if( pProperties && nProperties ) + { + for( int i = 0; i < nProperties; i++ ) + if( pProperties[ i ] == nAtom1 || + pProperties[ i ] == nAtom2 ) + { + ret = true; + } + XFree( pProperties ); + } + } + } + + if( ! ret ) + { + Atom nUTFAtom = XInternAtom( pDisplay, "UTF8_STRING", True ); + Atom nNetWMNameAtom = XInternAtom( pDisplay, "_NET_WM_NAME", True ); + if( nUTFAtom && nNetWMNameAtom ) + { + // another, more expensive check: search for a gnome-panel + XLIB_Window aRoot, aParent, *pChildren = NULL; + unsigned int nChildren = 0; + XQueryTree( pDisplay, DefaultRootWindow( pDisplay ), + &aRoot, &aParent, &pChildren, &nChildren ); + if( pChildren && nChildren ) + { + for( unsigned int i = 0; i < nChildren && ! ret; i++ ) + { + Atom nType = None; + int nFormat = 0; + unsigned long nItems = 0, nBytes = 0; + unsigned char* pProp = NULL; + XGetWindowProperty( pDisplay, + pChildren[i], + nNetWMNameAtom, + 0, 8, + False, + nUTFAtom, + &nType, + &nFormat, + &nItems, + &nBytes, + &pProp ); + if( pProp && nType == nUTFAtom ) + { + OString aWMName( (sal_Char*)pProp ); + if( aWMName.equalsIgnoreAsciiCase( "gnome-panel" ) ) + ret = true; + } + if( pProp ) + XFree( pProp ); + } + XFree( pChildren ); + } + } + } + + return ret; +} + +static bool bWasXError = false; + +static inline bool WasXError() +{ + bool bRet = bWasXError; + bWasXError = false; + return bRet; +} + +extern "C" +{ + static int autodect_error_handler( Display*, XErrorEvent* ) + { + bWasXError = true; + return 0; + } + + typedef int(* XErrorHandler)(Display*,XErrorEvent*); +} + +static int KDEVersion( Display* pDisplay ) +{ + int nRet = 0; + + Atom nFullSession = XInternAtom( pDisplay, "KDE_FULL_SESSION", True ); + Atom nKDEVersion = XInternAtom( pDisplay, "KDE_SESSION_VERSION", True ); + + if( nFullSession ) + { + if( !nKDEVersion ) + return 3; + + Atom aRealType = None; + int nFormat = 8; + unsigned long nItems = 0; + unsigned long nBytesLeft = 0; + unsigned char* pProperty = NULL; + XGetWindowProperty( pDisplay, + DefaultRootWindow( pDisplay ), + nKDEVersion, + 0, 1, + False, + AnyPropertyType, + &aRealType, + &nFormat, + &nItems, + &nBytesLeft, + &pProperty ); + if( !WasXError() && nItems != 0 && pProperty ) + { + nRet = *reinterpret_cast< sal_Int32* >( pProperty ); + } + if( pProperty ) + { + XFree( pProperty ); + pProperty = NULL; + } + } + return nRet; +} + +static bool is_kde_desktop( Display* pDisplay ) +{ + if ( NULL != getenv( "KDE_FULL_SESSION" ) ) + { + const char *pVer = getenv( "KDE_SESSION_VERSION" ); + if ( !pVer || pVer[0] == '0' ) + { + return true; // does not exist => KDE3 + } + + rtl::OUString aVer( RTL_CONSTASCII_USTRINGPARAM( "3" ) ); + if ( aVer.equalsIgnoreAsciiCaseAscii( pVer ) ) + { + return true; + } + } + + if ( KDEVersion( pDisplay ) == 3 ) + return true; + + return false; +} + +static bool is_kde4_desktop( Display* pDisplay ) +{ + if ( NULL != getenv( "KDE_FULL_SESSION" ) ) + { + rtl::OUString aVer( RTL_CONSTASCII_USTRINGPARAM( "4" ) ); + + const char *pVer = getenv( "KDE_SESSION_VERSION" ); + if ( pVer && aVer.equalsIgnoreAsciiCaseAscii( pVer ) ) + return true; + } + + if ( KDEVersion( pDisplay ) == 4 ) + return true; + + return false; +} + +static bool is_cde_desktop( Display* pDisplay ) +{ + void* pLibrary = NULL; + + Atom nDtAtom = XInternAtom( pDisplay, "_DT_WM_READY", True ); + OUString aPathName( RTL_CONSTASCII_USTRINGPARAM( "file:///usr/dt/lib/libDtSvc.so" ) ); + if( nDtAtom && ( pLibrary = osl_loadModule( aPathName.pData, SAL_LOADMODULE_DEFAULT ) ) ) + { + osl_unloadModule( (oslModule)pLibrary ); + return true; + } + + return false; +} + + +extern "C" +{ + +VCL_DLLPUBLIC rtl::OUString get_desktop_environment() +{ + rtl::OUStringBuffer aRet( 8 ); + static const char *pOverride = getenv( "OOO_FORCE_DESKTOP" ); + + if ( pOverride && *pOverride ) + { + OString aOver( pOverride ); + + if ( aOver.equalsIgnoreAsciiCase( "cde" ) ) + aRet.appendAscii( desktop_strings[DESKTOP_CDE] ); + if ( aOver.equalsIgnoreAsciiCase( "kde4" ) ) + aRet.appendAscii( desktop_strings[DESKTOP_KDE4] ); + if ( aOver.equalsIgnoreAsciiCase( "gnome" ) ) + aRet.appendAscii( desktop_strings[DESKTOP_GNOME] ); + if ( aOver.equalsIgnoreAsciiCase( "kde" ) ) + aRet.appendAscii( desktop_strings[DESKTOP_KDE] ); + if ( aOver.equalsIgnoreAsciiCase( "none" ) ) + aRet.appendAscii( desktop_strings[DESKTOP_UNKNOWN] ); + } + + if( aRet.getLength() == 0 ) + { + // get display to connect to + const char* pDisplayStr = getenv( "DISPLAY" ); + int nParams = osl_getCommandArgCount(); + OUString aParam; + OString aBParm; + for( int i = 0; i < nParams; i++ ) + { + osl_getCommandArg( i, &aParam.pData ); + if( aParam.equalsAscii( "-headless" ) ) + { + pDisplayStr = NULL; + break; + } + if( i < nParams-1 && (aParam.equalsAscii( "-display" ) || aParam.equalsAscii( "--display" )) ) + { + osl_getCommandArg( i+1, &aParam.pData ); + aBParm = OUStringToOString( aParam, osl_getThreadTextEncoding() ); + pDisplayStr = aBParm.getStr(); + break; + } + } + + // no server at all + if( ! pDisplayStr || !*pDisplayStr ) + aRet.appendAscii( desktop_strings[DESKTOP_NONE] ); + else + { + /* #i92121# workaround deadlocks in the X11 implementation + */ + static const char* pNoXInitThreads = getenv( "SAL_NO_XINITTHREADS" ); + /* #i90094# + from now on we know that an X connection will be + established, so protect X against itself + */ + if( ! ( pNoXInitThreads && *pNoXInitThreads ) ) + XInitThreads(); + + Display* pDisplay = XOpenDisplay( pDisplayStr ); + if( pDisplay ) + { + XErrorHandler pOldHdl = XSetErrorHandler( autodect_error_handler ); + + if ( is_kde4_desktop( pDisplay ) ) + aRet.appendAscii( desktop_strings[DESKTOP_KDE4] ); + else if ( is_gnome_desktop( pDisplay ) ) + aRet.appendAscii( desktop_strings[DESKTOP_GNOME] ); + else if ( is_cde_desktop( pDisplay ) ) + aRet.appendAscii( desktop_strings[DESKTOP_CDE] ); + else if ( is_kde_desktop( pDisplay ) ) + aRet.appendAscii( desktop_strings[DESKTOP_KDE] ); + else + aRet.appendAscii( desktop_strings[DESKTOP_UNKNOWN] ); + + // set the default handler again + XSetErrorHandler( pOldHdl ); + + XCloseDisplay( pDisplay ); + } + } + } + + return aRet.makeStringAndClear(); +} + +} diff --git a/vcl/unx/generic/desktopdetect/makefile.mk b/vcl/unx/generic/desktopdetect/makefile.mk new file mode 100644 index 000000000000..83d5d29f4b71 --- /dev/null +++ b/vcl/unx/generic/desktopdetect/makefile.mk @@ -0,0 +1,57 @@ +#************************************************************************* +# +# 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=vcl +TARGET=dtdetect + +.INCLUDE : $(PRJ)$/util$/makefile.pmk + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk +.INCLUDE : $(PRJ)$/util$/makefile2.pmk + +# --- Files -------------------------------------------------------- + +.IF "$(GUIBASE)"!="unx" + +dummy: + @echo "Nothing to build for GUIBASE $(GUIBASE)" + +.ELSE # "$(GUIBASE)"!="unx" + +SLOFILES=$(SLO)$/desktopdetector.obj + +.ENDIF # "$(GUIBASE)"!="unx" + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk + +.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/vcl/unx/generic/dtrans/X11_clipboard.cxx b/vcl/unx/generic/dtrans/X11_clipboard.cxx new file mode 100644 index 000000000000..a08a9481b8e8 --- /dev/null +++ b/vcl/unx/generic/dtrans/X11_clipboard.cxx @@ -0,0 +1,293 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include +#include // declaration of generic uno interface +#include // mapping stuff +#include +#include + +#if OSL_DEBUG_LEVEL > 1 +#include +#endif + +using namespace com::sun::star::datatransfer; +using namespace com::sun::star::datatransfer::clipboard; +using namespace com::sun::star::lang; +using namespace com::sun::star::uno; +using namespace com::sun::star::awt; +using namespace cppu; +using namespace osl; +using namespace rtl; +using namespace x11; + +X11Clipboard::X11Clipboard( SelectionManager& rManager, Atom aSelection ) : + ::cppu::WeakComponentImplHelper4< + ::com::sun::star::datatransfer::clipboard::XClipboardEx, + ::com::sun::star::datatransfer::clipboard::XClipboardNotifier, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::lang::XInitialization + >( rManager.getMutex() ), + + m_rSelectionManager( rManager ), + m_xSelectionManager( & rManager ), + m_aSelection( aSelection ) +{ +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "creating instance of X11Clipboard (this=%p)\n", this ); +#endif + + if( m_aSelection != None ) + { + m_rSelectionManager.registerHandler( m_aSelection, *this ); + } + else + { + m_rSelectionManager.registerHandler( XA_PRIMARY, *this ); + m_rSelectionManager.registerHandler( m_rSelectionManager.getAtom( OUString::createFromAscii( "CLIPBOARD" ) ), *this ); + } +} + +// ------------------------------------------------------------------------ + +X11Clipboard::~X11Clipboard() +{ + MutexGuard aGuard( *Mutex::getGlobalMutex() ); + +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "shutting down instance of X11Clipboard (this=%p, Selecttion=\"%s\")\n", this, OUStringToOString( m_rSelectionManager.getString( m_aSelection ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); +#endif + if( m_aSelection != None ) + m_rSelectionManager.deregisterHandler( m_aSelection ); + else + { + m_rSelectionManager.deregisterHandler( XA_PRIMARY ); + m_rSelectionManager.deregisterHandler( m_rSelectionManager.getAtom( OUString::createFromAscii( "CLIPBOARD" ) ) ); + } +} + + +// ------------------------------------------------------------------------ + +void X11Clipboard::fireChangedContentsEvent() +{ + ClearableMutexGuard aGuard( m_rSelectionManager.getMutex() ); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "X11Clipboard::fireChangedContentsEvent for %s (%d listeners)\n", + OUStringToOString( m_rSelectionManager.getString( m_aSelection ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), m_aListeners.size() ); +#endif + ::std::list< Reference< XClipboardListener > > listeners( m_aListeners ); + aGuard.clear(); + + ClipboardEvent aEvent( static_cast(this), m_aContents); + while( listeners.begin() != listeners.end() ) + { + if( listeners.front().is() ) + listeners.front()->changedContents(aEvent); + listeners.pop_front(); + } +} + +// ------------------------------------------------------------------------ + +void X11Clipboard::clearContents() +{ + ClearableMutexGuard aGuard(m_rSelectionManager.getMutex()); + // protect against deletion during outside call + Reference< XClipboard > xThis( static_cast(this)); + // copy member references on stack so they can be called + // without having the mutex + Reference< XClipboardOwner > xOwner( m_aOwner ); + Reference< XTransferable > xTrans( m_aContents ); + // clear members + m_aOwner.clear(); + m_aContents.clear(); + + // release the mutex + aGuard.clear(); + + // inform previous owner of lost ownership + if ( xOwner.is() ) + xOwner->lostOwnership(xThis, m_aContents); +} + +// ------------------------------------------------------------------------ + +Reference< XTransferable > SAL_CALL X11Clipboard::getContents() + throw(RuntimeException) +{ + MutexGuard aGuard(m_rSelectionManager.getMutex()); + + if( ! m_aContents.is() ) + m_aContents = new X11Transferable( SelectionManager::get(), static_cast< OWeakObject* >(this), m_aSelection ); + return m_aContents; +} + +// ------------------------------------------------------------------------ + +void SAL_CALL X11Clipboard::setContents( + const Reference< XTransferable >& xTrans, + const Reference< XClipboardOwner >& xClipboardOwner ) + throw(RuntimeException) +{ + // remember old values for callbacks before setting the new ones. + ClearableMutexGuard aGuard(m_rSelectionManager.getMutex()); + + Reference< XClipboardOwner > oldOwner( m_aOwner ); + m_aOwner = xClipboardOwner; + + Reference< XTransferable > oldContents( m_aContents ); + m_aContents = xTrans; + + aGuard.clear(); + + // for now request ownership for both selections + if( m_aSelection != None ) + m_rSelectionManager.requestOwnership( m_aSelection ); + else + { + m_rSelectionManager.requestOwnership( XA_PRIMARY ); + m_rSelectionManager.requestOwnership( m_rSelectionManager.getAtom( OUString::createFromAscii( "CLIPBOARD" ) ) ); + } + + // notify old owner on loss of ownership + if( oldOwner.is() ) + oldOwner->lostOwnership(static_cast < XClipboard * > (this), oldContents); + + // notify all listeners on content changes + fireChangedContentsEvent(); +} + +// ------------------------------------------------------------------------ + +OUString SAL_CALL X11Clipboard::getName() + throw(RuntimeException) +{ + return m_rSelectionManager.getString( m_aSelection ); +} + +// ------------------------------------------------------------------------ + +sal_Int8 SAL_CALL X11Clipboard::getRenderingCapabilities() + throw(RuntimeException) +{ + return RenderingCapabilities::Delayed; +} + + +// ------------------------------------------------------------------------ +void SAL_CALL X11Clipboard::addClipboardListener( const Reference< XClipboardListener >& listener ) + throw(RuntimeException) +{ + MutexGuard aGuard( m_rSelectionManager.getMutex() ); + m_aListeners.push_back( listener ); +} + +// ------------------------------------------------------------------------ + +void SAL_CALL X11Clipboard::removeClipboardListener( const Reference< XClipboardListener >& listener ) + throw(RuntimeException) +{ + MutexGuard aGuard( m_rSelectionManager.getMutex() ); + m_aListeners.remove( listener ); +} + + +// ------------------------------------------------------------------------ + +Reference< XTransferable > X11Clipboard::getTransferable() +{ + return getContents(); +} + +// ------------------------------------------------------------------------ + +void X11Clipboard::clearTransferable() +{ + clearContents(); +} + +// ------------------------------------------------------------------------ + +void X11Clipboard::fireContentsChanged() +{ + fireChangedContentsEvent(); +} + +// ------------------------------------------------------------------------ + +Reference< XInterface > X11Clipboard::getReference() throw() +{ + return Reference< XInterface >( static_cast< OWeakObject* >(this) ); +} + +// ------------------------------------------------------------------------ + +OUString SAL_CALL X11Clipboard::getImplementationName( ) + throw(RuntimeException) +{ + return OUString::createFromAscii(X11_CLIPBOARD_IMPLEMENTATION_NAME); +} + +// ------------------------------------------------------------------------ + +sal_Bool SAL_CALL X11Clipboard::supportsService( const OUString& ServiceName ) + throw(RuntimeException) +{ + Sequence < OUString > SupportedServicesNames = X11Clipboard_getSupportedServiceNames(); + + for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; ) + if (SupportedServicesNames[n].compareTo(ServiceName) == 0) + return sal_True; + + return sal_False; +} + +// ------------------------------------------------------------------------ + +void SAL_CALL X11Clipboard::initialize( const Sequence< Any >& ) throw( ::com::sun::star::uno::Exception ) +{ +} + +// ------------------------------------------------------------------------ + +Sequence< OUString > SAL_CALL X11Clipboard::getSupportedServiceNames( ) + throw(RuntimeException) +{ + return X11Clipboard_getSupportedServiceNames(); +} + diff --git a/vcl/unx/generic/dtrans/X11_clipboard.hxx b/vcl/unx/generic/dtrans/X11_clipboard.hxx new file mode 100644 index 000000000000..21bf547a9cb7 --- /dev/null +++ b/vcl/unx/generic/dtrans/X11_clipboard.hxx @@ -0,0 +1,151 @@ +/************************************************************************* + * + * 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 _DTRANS_X11_CLIPBOARD_HXX_ +#define _DTRANS_X11_CLIPBOARD_HXX_ + +#include + +#ifndef _COM_SUN_STAR_DATATRANSFER_CLIPBAORD_XCLIPBOARDEX_HPP_ +#include +#endif + +#ifndef _COM_SUN_STAR_DATATRANSFER_CLIPBAORD_XCLIPBOARDNOTIFIER_HPP_ +#include +#endif +#include + +// ------------------------------------------------------------------------ + +#define X11_CLIPBOARD_IMPLEMENTATION_NAME "com.sun.star.datatransfer.X11ClipboardSupport" + +namespace x11 { + + class X11Clipboard : + public ::cppu::WeakComponentImplHelper4 < + ::com::sun::star::datatransfer::clipboard::XClipboardEx, + ::com::sun::star::datatransfer::clipboard::XClipboardNotifier, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::lang::XInitialization + >, + public SelectionAdaptor + { + Reference< ::com::sun::star::datatransfer::XTransferable > m_aContents; + Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner > m_aOwner; + + SelectionManager& m_rSelectionManager; + Reference< ::com::sun::star::lang::XInitialization > m_xSelectionManager; + ::std::list< Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener > > m_aListeners; + Atom m_aSelection; + + protected: + + + friend class SelectionManager; + friend class X11_Transferable; + + void fireChangedContentsEvent(); + void clearContents(); + + public: + + X11Clipboard( SelectionManager& rManager, Atom aSelection ); + virtual ~X11Clipboard(); + + static X11Clipboard* get( const ::rtl::OUString& rDisplayName, Atom aSelection ); + + /* + * XInitialization + */ + virtual void SAL_CALL initialize( const Sequence< Any >& arguments ) throw( ::com::sun::star::uno::Exception ); + + /* + * XServiceInfo + */ + + virtual ::rtl::OUString SAL_CALL getImplementationName( ) + throw(RuntimeException); + + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) + throw(RuntimeException); + + virtual Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) + throw(RuntimeException); + + /* + * XClipboard + */ + + virtual Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getContents() + throw(RuntimeException); + + virtual void SAL_CALL setContents( + const Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans, + const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner ) + throw(RuntimeException); + + virtual ::rtl::OUString SAL_CALL getName() + throw(RuntimeException); + + /* + * XClipboardEx + */ + + virtual sal_Int8 SAL_CALL getRenderingCapabilities() + throw(RuntimeException); + + /* + * XClipboardNotifier + */ + virtual void SAL_CALL addClipboardListener( + const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener ) + throw(RuntimeException); + + virtual void SAL_CALL removeClipboardListener( + const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener ) + throw(RuntimeException); + + /* + * SelectionAdaptor + */ + virtual Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable(); + virtual void clearTransferable(); + virtual void fireContentsChanged(); + virtual Reference< XInterface > getReference() throw(); + }; + +// ------------------------------------------------------------------------ + + Sequence< ::rtl::OUString > SAL_CALL X11Clipboard_getSupportedServiceNames(); + Reference< XInterface > SAL_CALL X11Clipboard_createInstance( + const Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory); + +// ------------------------------------------------------------------------ + +} // namepspace + +#endif diff --git a/vcl/unx/generic/dtrans/X11_dndcontext.cxx b/vcl/unx/generic/dtrans/X11_dndcontext.cxx new file mode 100644 index 000000000000..e6fc3dd8a532 --- /dev/null +++ b/vcl/unx/generic/dtrans/X11_dndcontext.cxx @@ -0,0 +1,138 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_vcl.hxx" + +#include +#include + +using namespace cppu; +using namespace x11; + +/* + * DropTargetDropContext + */ + +DropTargetDropContext::DropTargetDropContext( + XLIB_Window aDropWindow, + XLIB_Time aTimestamp, + SelectionManager& rManager ) : + m_aDropWindow( aDropWindow ), + m_nTimestamp( aTimestamp ), + m_rManager( rManager ), + m_xManagerRef( static_cast< OWeakObject* >(&rManager) ) +{ +} + +DropTargetDropContext::~DropTargetDropContext() +{ +} + +void DropTargetDropContext::acceptDrop( sal_Int8 dragOperation ) throw() +{ + m_rManager.accept( dragOperation, m_aDropWindow, m_nTimestamp ); +} + +void DropTargetDropContext::rejectDrop() throw() +{ + m_rManager.reject( m_aDropWindow, m_nTimestamp ); +} + +void DropTargetDropContext::dropComplete( sal_Bool success ) throw() +{ + m_rManager.dropComplete( success, m_aDropWindow, m_nTimestamp ); +} + + +/* + * DropTargetDragContext + */ + +DropTargetDragContext::DropTargetDragContext( + XLIB_Window aDropWindow, + XLIB_Time aTimestamp, + SelectionManager& rManager ) : + m_aDropWindow( aDropWindow ), + m_nTimestamp( aTimestamp ), + m_rManager( rManager ), + m_xManagerRef( static_cast< OWeakObject* >(&rManager) ) +{ +} + +DropTargetDragContext::~DropTargetDragContext() +{ +} + +void DropTargetDragContext::acceptDrag( sal_Int8 dragOperation ) throw() +{ + m_rManager.accept( dragOperation, m_aDropWindow, m_nTimestamp ); +} + +void DropTargetDragContext::rejectDrag() throw() +{ + m_rManager.reject( m_aDropWindow, m_nTimestamp ); +} + +/* + * DragSourceContext + */ + +DragSourceContext::DragSourceContext( + XLIB_Window aDropWindow, + XLIB_Time aTimestamp, + SelectionManager& rManager ) : + m_aDropWindow( aDropWindow ), + m_nTimestamp( aTimestamp ), + m_rManager( rManager ), + m_xManagerRef( static_cast< OWeakObject* >(&rManager) ) +{ +} + +DragSourceContext::~DragSourceContext() +{ +} + +sal_Int32 DragSourceContext::getCurrentCursor() throw() +{ + return m_rManager.getCurrentCursor(); +} + +void DragSourceContext::setCursor( sal_Int32 cursorId ) throw() +{ + m_rManager.setCursor( cursorId, m_aDropWindow, m_nTimestamp ); +} + +void DragSourceContext::setImage( sal_Int32 imageId ) throw() +{ + m_rManager.setImage( imageId, m_aDropWindow, m_nTimestamp ); +} + +void DragSourceContext::transferablesFlavorsChanged() throw() +{ + m_rManager.transferablesFlavorsChanged(); +} diff --git a/vcl/unx/generic/dtrans/X11_dndcontext.hxx b/vcl/unx/generic/dtrans/X11_dndcontext.hxx new file mode 100644 index 000000000000..9b48d346f03b --- /dev/null +++ b/vcl/unx/generic/dtrans/X11_dndcontext.hxx @@ -0,0 +1,104 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _DTRANS_X11_DNDCONTEXT_HXX +#define _DTRANS_X11_DNDCONTEXT_HXX + +#include +#include +#include +#include + +#include "tools/prex.h" +#include +#include "tools/postx.h" + +using namespace com::sun::star::uno; + +namespace x11 { + + class SelectionManager; + + class DropTargetDropContext : + public ::cppu::WeakImplHelper1< + ::com::sun::star::datatransfer::dnd::XDropTargetDropContext + > + { + XLIB_Window m_aDropWindow; + XLIB_Time m_nTimestamp; + SelectionManager& m_rManager; + Reference< XInterface > m_xManagerRef; + public: + DropTargetDropContext( XLIB_Window, XLIB_Time, SelectionManager& ); + virtual ~DropTargetDropContext(); + + // XDropTargetDropContext + virtual void SAL_CALL acceptDrop( sal_Int8 dragOperation ) throw(); + virtual void SAL_CALL rejectDrop() throw(); + virtual void SAL_CALL dropComplete( sal_Bool success ) throw(); + }; + + class DropTargetDragContext : + public ::cppu::WeakImplHelper1< + ::com::sun::star::datatransfer::dnd::XDropTargetDragContext + > + { + XLIB_Window m_aDropWindow; + XLIB_Time m_nTimestamp; + SelectionManager& m_rManager; + Reference< XInterface > m_xManagerRef; + public: + DropTargetDragContext( XLIB_Window, XLIB_Time, SelectionManager& ); + virtual ~DropTargetDragContext(); + + // XDropTargetDragContext + virtual void SAL_CALL acceptDrag( sal_Int8 dragOperation ) throw(); + virtual void SAL_CALL rejectDrag() throw(); + }; + + class DragSourceContext : + public ::cppu::WeakImplHelper1< + ::com::sun::star::datatransfer::dnd::XDragSourceContext + > + { + XLIB_Window m_aDropWindow; + XLIB_Time m_nTimestamp; + SelectionManager& m_rManager; + Reference< XInterface > m_xManagerRef; + public: + DragSourceContext( XLIB_Window, XLIB_Time, SelectionManager& ); + virtual ~DragSourceContext(); + + // XDragSourceContext + virtual sal_Int32 SAL_CALL getCurrentCursor() throw(); + virtual void SAL_CALL setCursor( sal_Int32 cursorId ) throw(); + virtual void SAL_CALL setImage( sal_Int32 imageId ) throw(); + virtual void SAL_CALL transferablesFlavorsChanged() throw(); + }; +} // namespace + +#endif // _DTRANS_X11_DNDCONTEXT_HXX diff --git a/vcl/unx/generic/dtrans/X11_droptarget.cxx b/vcl/unx/generic/dtrans/X11_droptarget.cxx new file mode 100644 index 000000000000..5db23329abd8 --- /dev/null +++ b/vcl/unx/generic/dtrans/X11_droptarget.cxx @@ -0,0 +1,228 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include + +using namespace x11; +using namespace rtl; +using namespace com::sun::star::lang; +using namespace com::sun::star::awt; +using namespace com::sun::star::datatransfer; +using namespace com::sun::star::datatransfer::dnd; + +DropTarget::DropTarget() : + ::cppu::WeakComponentImplHelper3< + XDropTarget, + XInitialization, + XServiceInfo + >( m_aMutex ), + m_bActive( false ), + m_nDefaultActions( 0 ), + m_aTargetWindow( None ), + m_pSelectionManager( NULL ) +{ +} + +DropTarget::~DropTarget() +{ + if( m_pSelectionManager ) + m_pSelectionManager->deregisterDropTarget( m_aTargetWindow ); +} + +// -------------------------------------------------------------------------- + +void DropTarget::initialize( const Sequence< Any >& arguments ) throw( ::com::sun::star::uno::Exception ) +{ + if( arguments.getLength() > 1 ) + { + OUString aDisplayName; + Reference< XDisplayConnection > xConn; + arguments.getConstArray()[0] >>= xConn; + if( xConn.is() ) + { + Any aIdentifier; + aIdentifier >>= aDisplayName; + } + + m_pSelectionManager = &SelectionManager::get( aDisplayName ); + m_xSelectionManager = static_cast< XDragSource* >(m_pSelectionManager); + m_pSelectionManager->initialize( arguments ); + + if( m_pSelectionManager->getDisplay() ) // #136582# sanity check + { + sal_Size aWindow = None; + arguments.getConstArray()[1] >>= aWindow; + m_pSelectionManager->registerDropTarget( aWindow, this ); + m_aTargetWindow = aWindow; + m_bActive = true; + } + } +} + +// -------------------------------------------------------------------------- + +void DropTarget::addDropTargetListener( const Reference< XDropTargetListener >& xListener ) throw() +{ + ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); + + m_aListeners.push_back( xListener ); +} + +// -------------------------------------------------------------------------- + +void DropTarget::removeDropTargetListener( const Reference< XDropTargetListener >& xListener ) throw() +{ + ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); + + m_aListeners.remove( xListener ); +} + +// -------------------------------------------------------------------------- + +sal_Bool DropTarget::isActive() throw() +{ + return m_bActive; +} + +// -------------------------------------------------------------------------- + +void DropTarget::setActive( sal_Bool active ) throw() +{ + ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); + + m_bActive = active; +} + +// -------------------------------------------------------------------------- + +sal_Int8 DropTarget::getDefaultActions() throw() +{ + return m_nDefaultActions; +} + +// -------------------------------------------------------------------------- + +void DropTarget::setDefaultActions( sal_Int8 actions ) throw() +{ + ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); + + m_nDefaultActions = actions; +} + +// -------------------------------------------------------------------------- + +void DropTarget::drop( const DropTargetDropEvent& dtde ) throw() +{ + osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex ); + std::list< Reference< XDropTargetListener > > aListeners( m_aListeners ); + aGuard.clear(); + + for( std::list< Reference< XDropTargetListener > >::iterator it = aListeners.begin(); it!= aListeners.end(); ++it ) + { + (*it)->drop( dtde ); + } +} + +// -------------------------------------------------------------------------- + +void DropTarget::dragEnter( const DropTargetDragEnterEvent& dtde ) throw() +{ + osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex ); + std::list< Reference< XDropTargetListener > > aListeners( m_aListeners ); + aGuard.clear(); + + for( std::list< Reference< XDropTargetListener > >::iterator it = aListeners.begin(); it!= aListeners.end(); ++it ) + { + (*it)->dragEnter( dtde ); + } +} + +// -------------------------------------------------------------------------- + +void DropTarget::dragExit( const DropTargetEvent& dte ) throw() +{ + osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex ); + std::list< Reference< XDropTargetListener > > aListeners( m_aListeners ); + aGuard.clear(); + + for( std::list< Reference< XDropTargetListener > >::iterator it = aListeners.begin(); it!= aListeners.end(); ++it ) + { + (*it)->dragExit( dte ); + } +} + +// -------------------------------------------------------------------------- + +void DropTarget::dragOver( const DropTargetDragEvent& dtde ) throw() +{ + osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex ); + std::list< Reference< XDropTargetListener > > aListeners( m_aListeners ); + aGuard.clear(); + + for( std::list< Reference< XDropTargetListener > >::iterator it = aListeners.begin(); it!= aListeners.end(); ++it ) + { + (*it)->dragOver( dtde ); + } +} + +// -------------------------------------------------------------------------- + +/* + * XServiceInfo + */ + +// ------------------------------------------------------------------------ + +OUString DropTarget::getImplementationName() throw() +{ + return OUString::createFromAscii(XDND_DROPTARGET_IMPLEMENTATION_NAME); +} + +// ------------------------------------------------------------------------ + +sal_Bool DropTarget::supportsService( const OUString& ServiceName ) throw() +{ + Sequence < OUString > SupportedServicesNames = Xdnd_dropTarget_getSupportedServiceNames(); + + for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; ) + if (SupportedServicesNames[n].compareTo(ServiceName) == 0) + return sal_True; + + return sal_False; +} + +// ------------------------------------------------------------------------ + +Sequence< OUString > DropTarget::getSupportedServiceNames() throw() +{ + return Xdnd_dropTarget_getSupportedServiceNames(); +} + + diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx new file mode 100644 index 000000000000..2561df0ec591 --- /dev/null +++ b/vcl/unx/generic/dtrans/X11_selection.cxx @@ -0,0 +1,4205 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include "unx/saldisp.hxx" +#include "unx/saldata.hxx" + +#include +#include +#include +#include + +#include "tools/prex.h" +#include +#include +#include +#include "tools/postx.h" +#if defined(LINUX) || defined(NETBSD) || defined (FREEBSD) +#include +#else +#include +#endif +#include + +#include +#include +#include +#include +#include + +#include "vcl/svapp.hxx" + +// pointer bitmaps +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#define DRAG_EVENT_MASK ButtonPressMask |\ + ButtonReleaseMask |\ + PointerMotionMask |\ + EnterWindowMask |\ + LeaveWindowMask + +using namespace com::sun::star::datatransfer; +using namespace com::sun::star::datatransfer::dnd; +using namespace com::sun::star::lang; +using namespace com::sun::star::awt; +using namespace com::sun::star::uno; +using namespace com::sun::star::frame; +using namespace cppu; +using namespace osl; +using namespace rtl; + +using namespace x11; + +// stubs to satisfy solaris compiler's rather rigid linking warning +extern "C" +{ + static void call_SelectionManager_run( void * pMgr ) + { + SelectionManager::run( pMgr ); + } + + static void call_SelectionManager_runDragExecute( void * pMgr ) + { + SelectionManager::runDragExecute( pMgr ); + } +} + + +static const long nXdndProtocolRevision = 5; + +// mapping between mime types (or what the office thinks of mime types) +// and X convention types +struct NativeTypeEntry +{ + Atom nAtom; + const char* pType; // Mime encoding on our side + const char* pNativeType; // string corresponding to nAtom for the case of nAtom being uninitialized + int nFormat; // the corresponding format +}; + +// the convention for Xdnd is mime types as specified by the corresponding +// RFC's with the addition that text/plain without charset tag contains iso8859-1 +// sadly some applications (e.g. gtk) do not honor the mimetype only rule, +// so for compatibility add UTF8_STRING +static NativeTypeEntry aXdndConversionTab[] = +{ + { 0, "text/plain;charset=iso8859-1", "text/plain", 8 }, + { 0, "text/plain;charset=utf-8", "UTF8_STRING", 8 } +}; + +// for clipboard and primary selections there is only a convention for text +// that the encoding name of the text is taken as type in all capitalized letters +static NativeTypeEntry aNativeConversionTab[] = +{ + { 0, "text/plain;charset=utf-16", "ISO10646-1", 16 }, + { 0, "text/plain;charset=utf-8", "UTF8_STRING", 8 }, + { 0, "text/plain;charset=utf-8", "UTF-8", 8 }, + { 0, "text/plain;charset=utf-8", "text/plain;charset=UTF-8", 8 }, + // ISO encodings + { 0, "text/plain;charset=iso8859-2", "ISO8859-2", 8 }, + { 0, "text/plain;charset=iso8859-3", "ISO8859-3", 8 }, + { 0, "text/plain;charset=iso8859-4", "ISO8859-4", 8 }, + { 0, "text/plain;charset=iso8859-5", "ISO8859-5", 8 }, + { 0, "text/plain;charset=iso8859-6", "ISO8859-6", 8 }, + { 0, "text/plain;charset=iso8859-7", "ISO8859-7", 8 }, + { 0, "text/plain;charset=iso8859-8", "ISO8859-8", 8 }, + { 0, "text/plain;charset=iso8859-9", "ISO8859-9", 8 }, + { 0, "text/plain;charset=iso8859-10", "ISO8859-10", 8 }, + { 0, "text/plain;charset=iso8859-13", "ISO8859-13", 8 }, + { 0, "text/plain;charset=iso8859-14", "ISO8859-14", 8 }, + { 0, "text/plain;charset=iso8859-15", "ISO8859-15", 8 }, + // asian encodings + { 0, "text/plain;charset=jisx0201.1976-0", "JISX0201.1976-0", 8 }, + { 0, "text/plain;charset=jisx0208.1983-0", "JISX0208.1983-0", 8 }, + { 0, "text/plain;charset=jisx0208.1990-0", "JISX0208.1990-0", 8 }, + { 0, "text/plain;charset=jisx0212.1990-0", "JISX0212.1990-0", 8 }, + { 0, "text/plain;charset=gb2312.1980-0", "GB2312.1980-0", 8 }, + { 0, "text/plain;charset=ksc5601.1992-0", "KSC5601.1992-0", 8 }, + // eastern european encodings + { 0, "text/plain;charset=koi8-r", "KOI8-R", 8 }, + { 0, "text/plain;charset=koi8-u", "KOI8-U", 8 }, + // String (== iso8859-1) + { XA_STRING, "text/plain;charset=iso8859-1", "STRING", 8 }, + // special for compound text + { 0, "text/plain;charset=compound_text", "COMPOUND_TEXT", 8 }, + + // PIXMAP + { XA_PIXMAP, "image/bmp", "PIXMAP", 32 } +}; + +rtl_TextEncoding x11::getTextPlainEncoding( const OUString& rMimeType ) +{ + rtl_TextEncoding aEncoding = RTL_TEXTENCODING_DONTKNOW; + OUString aMimeType( rMimeType.toAsciiLowerCase() ); + sal_Int32 nIndex = 0; + if( aMimeType.getToken( 0, ';', nIndex ).equalsAsciiL( "text/plain" , 10 ) ) + { + if( aMimeType.getLength() == 10 ) // only "text/plain" + aEncoding = RTL_TEXTENCODING_ISO_8859_1; + else + { + while( nIndex != -1 ) + { + OUString aToken = aMimeType.getToken( 0, ';', nIndex ); + sal_Int32 nPos = 0; + if( aToken.getToken( 0, '=', nPos ).equalsAsciiL( "charset", 7 ) ) + { + OString aEncToken = OUStringToOString( aToken.getToken( 0, '=', nPos ), RTL_TEXTENCODING_ISO_8859_1 ); + aEncoding = rtl_getTextEncodingFromUnixCharset( aEncToken.getStr() ); + if( aEncoding == RTL_TEXTENCODING_DONTKNOW ) + { + if( aEncToken.equalsIgnoreAsciiCase( "utf-8" ) ) + aEncoding = RTL_TEXTENCODING_UTF8; + } + if( aEncoding != RTL_TEXTENCODING_DONTKNOW ) + break; + } + } + } + } +#if OSL_DEBUG_LEVEL > 1 + if( aEncoding == RTL_TEXTENCODING_DONTKNOW ) + fprintf( stderr, "getTextPlainEncoding( %s ) failed\n", OUStringToOString( rMimeType, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); +#endif + return aEncoding; +} + +// ------------------------------------------------------------------------ + +::std::hash_map< OUString, SelectionManager*, OUStringHash >& SelectionManager::getInstances() +{ + static ::std::hash_map< OUString, SelectionManager*, OUStringHash > aInstances; + return aInstances; +} + +// ------------------------------------------------------------------------ + +SelectionManager::SelectionManager() : + m_nIncrementalThreshold( 15*1024 ), + m_pDisplay( NULL ), + m_aThread( NULL ), + m_aDragExecuteThread( NULL ), + m_aWindow( None ), + m_nSelectionTimeout( 0 ), + m_nSelectionTimestamp( CurrentTime ), + m_bDropEnterSent( true ), + m_aCurrentDropWindow( None ), + m_nDropTime( None ), + m_nLastDropAction( 0 ), + m_nLastX( 0 ), + m_nLastY( 0 ), + m_nDropTimestamp( 0 ), + m_bDropWaitingForCompletion( false ), + m_aDropWindow( None ), + m_aDropProxy( None ), + m_aDragSourceWindow( None ), + m_nLastDragX( 0 ), + m_nLastDragY( 0 ), + m_nNoPosX( 0 ), + m_nNoPosY( 0 ), + m_nNoPosWidth( 0 ), + m_nNoPosHeight( 0 ), + m_nDragButton( 0 ), + m_nUserDragAction( 0 ), + m_nTargetAcceptAction( 0 ), + m_nSourceActions( 0 ), + m_bLastDropAccepted( false ), + m_bDropSuccess( false ), + m_bDropSent( false ), + m_bWaitingForPrimaryConversion( false ), + m_nDragTimestamp( None ), + m_aMoveCursor( None ), + m_aCopyCursor( None ), + m_aLinkCursor( None ), + m_aNoneCursor( None ), + m_aCurrentCursor( None ), + m_nCurrentProtocolVersion( nXdndProtocolRevision ), + m_nCLIPBOARDAtom( None ), + m_nTARGETSAtom( None ), + m_nTIMESTAMPAtom( None ), + m_nTEXTAtom( None ), + m_nINCRAtom( None ), + m_nCOMPOUNDAtom( None ), + m_nMULTIPLEAtom( None ), + m_nUTF16Atom( None ), + m_nImageBmpAtom( None ), + m_nXdndAware( None ), + m_nXdndEnter( None ), + m_nXdndLeave( None ), + m_nXdndPosition( None ), + m_nXdndStatus( None ), + m_nXdndDrop( None ), + m_nXdndFinished( None ), + m_nXdndSelection( None ), + m_nXdndTypeList( None ), + m_nXdndProxy( None ), + m_nXdndActionCopy( None ), + m_nXdndActionMove( None ), + m_nXdndActionLink( None ), + m_nXdndActionAsk( None ), + m_nXdndActionPrivate( None ) +{ + m_aDropEnterEvent.data.l[0] = None; + m_aDragRunning.reset(); +} + +XLIB_Cursor SelectionManager::createCursor( const char* pPointerData, const char* pMaskData, int width, int height, int hotX, int hotY ) +{ + Pixmap aPointer; + Pixmap aMask; + XColor aBlack, aWhite; + + aBlack.pixel = BlackPixel( m_pDisplay, 0 ); + aBlack.red = aBlack.green = aBlack.blue = 0; + aBlack.flags = DoRed | DoGreen | DoBlue; + + aWhite.pixel = WhitePixel( m_pDisplay, 0 ); + aWhite.red = aWhite.green = aWhite.blue = 0xffff; + aWhite.flags = DoRed | DoGreen | DoBlue; + + aPointer = + XCreateBitmapFromData( m_pDisplay, + m_aWindow, + pPointerData, + width, + height ); + aMask + = XCreateBitmapFromData( m_pDisplay, + m_aWindow, + pMaskData, + width, + height ); + XLIB_Cursor aCursor = + XCreatePixmapCursor( m_pDisplay, aPointer, aMask, + &aBlack, &aWhite, + hotX, + hotY ); + XFreePixmap( m_pDisplay, aPointer ); + XFreePixmap( m_pDisplay, aMask ); + + return aCursor; +} + +void SelectionManager::initialize( const Sequence< Any >& arguments ) throw (::com::sun::star::uno::Exception) +{ + MutexGuard aGuard(m_aMutex); + + if( ! m_xDisplayConnection.is() ) + { + /* + * first argument must be a ::com::sun::star::awt::XDisplayConnection + * from this we will get the XEvents of the vcl event loop by + * registering us as XEventHandler on it. + * + * implementor's note: + * FIXME: + * finally the clipboard and XDND service is back in the module it belongs + * now cleanup and sharing of resources with the normal vcl event loop + * needs to be added. The display used whould be that of the normal event loop + * and synchronization should be done via the SolarMutex. + */ + if( arguments.getLength() > 0 ) + arguments.getConstArray()[0] >>= m_xDisplayConnection; + if( ! m_xDisplayConnection.is() ) + { +#if 0 + // for the time being try to live without XDisplayConnection + // for the sake of clipboard service + // clipboard service should be initialized with a XDisplayConnection + // in the future + Exception aExc; + aExc.Message = OUString::createFromAscii( "initialize me with a valid XDisplayConnection" ); + aExc.Context = static_cast< OWeakObject* >(this); + throw aExc; +#endif + } + else + m_xDisplayConnection->addEventHandler( Any(), this, ~0 ); + } + + if( !m_xBitmapConverter.is() ) + { + if( arguments.getLength() > 2 ) + arguments.getConstArray()[2] >>= m_xBitmapConverter; + } + + OUString aParam; + if( ! m_pDisplay ) + { + OUString aUDisplay; + if( m_xDisplayConnection.is() ) + { + Any aIdentifier; + aIdentifier = m_xDisplayConnection->getIdentifier(); + aIdentifier >>= aUDisplay; + } + + OString aDisplayName( OUStringToOString( aUDisplay, RTL_TEXTENCODING_ISO_8859_1 ) ); + + m_pDisplay = XOpenDisplay( aDisplayName.getLength() ? aDisplayName.getStr() : NULL ); + + if( m_pDisplay ) + { +#ifdef SYNCHRONIZE + XSynchronize( m_pDisplay, True ); +#endif + // clipboard selection + m_nCLIPBOARDAtom = getAtom( OUString::createFromAscii( "CLIPBOARD" ) ); + + // special targets + m_nTARGETSAtom = getAtom( OUString::createFromAscii( "TARGETS" ) ); + m_nTIMESTAMPAtom = getAtom( OUString::createFromAscii( "TIMESTAMP" ) ); + m_nTEXTAtom = getAtom( OUString::createFromAscii( "TEXT" ) ); + m_nINCRAtom = getAtom( OUString::createFromAscii( "INCR" ) ); + m_nCOMPOUNDAtom = getAtom( OUString::createFromAscii( "COMPOUND_TEXT" ) ); + m_nMULTIPLEAtom = getAtom( OUString::createFromAscii( "MULTIPLE" ) ); + m_nUTF16Atom = getAtom( OUString::createFromAscii( "ISO10646-1" ) ); +// m_nUTF16Atom = getAtom( OUString::createFromAscii( "text/plain;charset=ISO-10646-UCS-2" ) ); + m_nImageBmpAtom = getAtom( OUString::createFromAscii( "image/bmp" ) ); + + // Atoms for Xdnd protocol + m_nXdndAware = getAtom( OUString::createFromAscii( "XdndAware" ) ); + m_nXdndEnter = getAtom( OUString::createFromAscii( "XdndEnter" ) ); + m_nXdndLeave = getAtom( OUString::createFromAscii( "XdndLeave" ) ); + m_nXdndPosition = getAtom( OUString::createFromAscii( "XdndPosition" ) ); + m_nXdndStatus = getAtom( OUString::createFromAscii( "XdndStatus" ) ); + m_nXdndDrop = getAtom( OUString::createFromAscii( "XdndDrop" ) ); + m_nXdndFinished = getAtom( OUString::createFromAscii( "XdndFinished" ) ); + m_nXdndSelection = getAtom( OUString::createFromAscii( "XdndSelection" ) ); + m_nXdndTypeList = getAtom( OUString::createFromAscii( "XdndTypeList" ) ); + m_nXdndProxy = getAtom( OUString::createFromAscii( "XdndProxy" ) ); + m_nXdndActionCopy = getAtom( OUString::createFromAscii( "XdndActionCopy" ) ); + m_nXdndActionMove = getAtom( OUString::createFromAscii( "XdndActionMove" ) ); + m_nXdndActionLink = getAtom( OUString::createFromAscii( "XdndActionLink" ) ); + m_nXdndActionAsk = getAtom( OUString::createFromAscii( "XdndActionAsk" ) ); + m_nXdndActionPrivate= getAtom( OUString::createFromAscii( "XdndActionPrivate" ) ); + + // initialize map with member none + m_aAtomToString[ 0 ]= OUString::createFromAscii( "None" ); + m_aAtomToString[ XA_PRIMARY ] = OUString::createFromAscii( "PRIMARY" ); + + // create a (invisible) message window + m_aWindow = XCreateSimpleWindow( m_pDisplay, DefaultRootWindow( m_pDisplay ), + 10, 10, 10, 10, 0, 0, 1 ); + + // initialize threshold for incremetal transfers + // ICCCM says it should be smaller that the max request size + // which in turn is guaranteed to be at least 16k bytes + m_nIncrementalThreshold = XMaxRequestSize( m_pDisplay ) - 1024; + + if( m_aWindow ) + { + // initialize default cursors + m_aMoveCursor = createCursor( movedata_curs_bits, + movedata_mask_bits, + movedata_curs_width, + movedata_curs_height, + movedata_curs_x_hot, + movedata_curs_y_hot ); + m_aCopyCursor = createCursor( copydata_curs_bits, + copydata_mask_bits, + copydata_curs_width, + copydata_curs_height, + copydata_curs_x_hot, + copydata_curs_y_hot ); + m_aLinkCursor = createCursor( linkdata_curs_bits, + linkdata_mask_bits, + linkdata_curs_width, + linkdata_curs_height, + linkdata_curs_x_hot, + linkdata_curs_y_hot ); + m_aNoneCursor = createCursor( nodrop_curs_bits, + nodrop_mask_bits, + nodrop_curs_width, + nodrop_curs_height, + nodrop_curs_x_hot, + nodrop_curs_y_hot ); + + + + + // just interested in SelectionClear/Notify/Request and PropertyChange + XSelectInput( m_pDisplay, m_aWindow, PropertyChangeMask ); + // create the transferable for Drag operations + m_xDropTransferable = new X11Transferable( *this, static_cast< OWeakObject* >(this), m_nXdndSelection ); + registerHandler( m_nXdndSelection, *this ); + + m_aThread = osl_createSuspendedThread( call_SelectionManager_run, this ); + if( m_aThread ) + osl_resumeThread( m_aThread ); +#if OSL_DEBUG_LEVEL > 1 + else + fprintf( stderr, "SelectionManager::initialize: creation of dispatch thread failed !\n" ); +#endif + } + } + } +} + +// ------------------------------------------------------------------------ + +SelectionManager::~SelectionManager() +{ +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "SelectionManager::~SelectionManager (%s)\n", m_pDisplay ? DisplayString(m_pDisplay) : "no display" ); +#endif + { + MutexGuard aGuard( *Mutex::getGlobalMutex() ); + + ::std::hash_map< OUString, SelectionManager*, OUStringHash >::iterator it; + for( it = getInstances().begin(); it != getInstances().end(); ++it ) + if( it->second == this ) + { + getInstances().erase( it ); + break; + } + } + + if( m_aThread ) + { + osl_terminateThread( m_aThread ); + osl_joinWithThread( m_aThread ); + osl_destroyThread( m_aThread ); + } + + if( m_aDragExecuteThread ) + { + osl_terminateThread( m_aDragExecuteThread ); + osl_joinWithThread( m_aDragExecuteThread ); + m_aDragExecuteThread = NULL; + // thread handle is freed in dragDoDispatch() + } + + MutexGuard aGuard(m_aMutex); + +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "shutting down SelectionManager\n" ); +#endif + + if( m_xDisplayConnection.is() ) + { + m_xDisplayConnection->removeEventHandler( Any(), this ); + m_xDisplayConnection.clear(); + } + + if( m_pDisplay ) + { + deregisterHandler( m_nXdndSelection ); + // destroy message window + if( m_aWindow ) + XDestroyWindow( m_pDisplay, m_aWindow ); + // release cursors + if (m_aMoveCursor != None) + XFreeCursor(m_pDisplay, m_aMoveCursor); + if (m_aCopyCursor != None) + XFreeCursor(m_pDisplay, m_aCopyCursor); + if (m_aLinkCursor != None) + XFreeCursor(m_pDisplay, m_aLinkCursor); + if (m_aNoneCursor != None) + XFreeCursor(m_pDisplay, m_aNoneCursor); + + // paranoia setting, the drag thread should have + // done that already + XUngrabPointer( m_pDisplay, CurrentTime ); + XUngrabKeyboard( m_pDisplay, CurrentTime ); + + XCloseDisplay( m_pDisplay ); + } +} + +// ------------------------------------------------------------------------ + +SelectionAdaptor* SelectionManager::getAdaptor( Atom selection ) +{ + ::std::hash_map< Atom, Selection* >::iterator it = + m_aSelections.find( selection ); + return it != m_aSelections.end() ? it->second->m_pAdaptor : NULL; +} + +// ------------------------------------------------------------------------ + +OUString SelectionManager::convertFromCompound( const char* pText, int nLen ) +{ + MutexGuard aGuard( m_aMutex ); + OUString aRet; + if( nLen < 0 ) + nLen = strlen( pText ); + + char** pTextList = NULL; + int nTexts = 0; + + XTextProperty aProp; + aProp.value = (unsigned char*)pText; + aProp.encoding = m_nCOMPOUNDAtom; + aProp.format = 8; + aProp.nitems = nLen; + XmbTextPropertyToTextList( m_pDisplay, + &aProp, + &pTextList, + &nTexts ); + rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); + for( int i = 0; i < nTexts; i++ ) + aRet += OStringToOUString( pTextList[i], aEncoding ); + + if( pTextList ) + XFreeStringList( pTextList ); + + return aRet; +} + +// ------------------------------------------------------------------------ + +OString SelectionManager::convertToCompound( const OUString& rText ) +{ + MutexGuard aGuard( m_aMutex ); + XTextProperty aProp; + aProp.value = NULL; + aProp.encoding = XA_STRING; + aProp.format = 8; + aProp.nitems = 0; + + OString aRet( rText.getStr(), rText.getLength(), osl_getThreadTextEncoding() ); + char* pT = const_cast(aRet.getStr()); + + XmbTextListToTextProperty( m_pDisplay, + &pT, + 1, + XCompoundTextStyle, + &aProp ); + if( aProp.value ) + { + aRet = (char*)aProp.value; + XFree( aProp.value ); +#ifdef SOLARIS + /* #97070# + * for currently unknown reasons XmbTextListToTextProperty on Solaris returns + * no data in ISO8859-n encodings (at least for n = 1, 15) + * in these encodings the directly converted text does the + * trick, also. + */ + if( ! aRet.getLength() && rText.getLength() ) + aRet = OUStringToOString( rText, osl_getThreadTextEncoding() ); +#endif + } + else + aRet = OString(); + + return aRet; +} + +// ------------------------------------------------------------------------ + +bool SelectionManager::convertData( + const Reference< XTransferable >& xTransferable, + Atom nType, + Atom nSelection, + int& rFormat, + Sequence< sal_Int8 >& rData ) +{ + bool bSuccess = false; + + if( ! xTransferable.is() ) + return bSuccess; + + try + { + + DataFlavor aFlavor; + aFlavor.MimeType = convertTypeFromNative( nType, nSelection, rFormat ); + + sal_Int32 nIndex = 0; + if( aFlavor.MimeType.getToken( 0, ';', nIndex ).compareToAscii( "text/plain" ) == 0 ) + { + if( aFlavor.MimeType.getToken( 0, ';', nIndex ).compareToAscii( "charset=utf-16" ) == 0 ) + aFlavor.DataType = getCppuType( (OUString *) 0 ); + else + aFlavor.DataType = getCppuType( (Sequence< sal_Int8 >*)0 ); + } + else + aFlavor.DataType = getCppuType( (Sequence< sal_Int8 >*)0 ); + + if( xTransferable->isDataFlavorSupported( aFlavor ) ) + { + Any aValue( xTransferable->getTransferData( aFlavor ) ); + if( aValue.getValueTypeClass() == TypeClass_STRING ) + { + OUString aString; + aValue >>= aString; + rData = Sequence< sal_Int8 >( (sal_Int8*)aString.getStr(), aString.getLength() * sizeof( sal_Unicode ) ); + bSuccess = true; + } + else if( aValue.getValueType() == getCppuType( (Sequence< sal_Int8 >*)0 ) ) + { + aValue >>= rData; + bSuccess = true; + } + } + else if( aFlavor.MimeType.compareToAscii( "text/plain", 10 ) == 0 ) + { + rtl_TextEncoding aEncoding = RTL_TEXTENCODING_DONTKNOW; + bool bCompoundText = false; + if( nType == m_nCOMPOUNDAtom ) + bCompoundText = true; + else + aEncoding = getTextPlainEncoding( aFlavor.MimeType ); + if( aEncoding != RTL_TEXTENCODING_DONTKNOW || bCompoundText ) + { + aFlavor.MimeType = OUString::createFromAscii( "text/plain;charset=utf-16" ); + aFlavor.DataType = getCppuType( (OUString *) 0 ); + if( xTransferable->isDataFlavorSupported( aFlavor ) ) + { + Any aValue( xTransferable->getTransferData( aFlavor ) ); + OUString aString; + aValue >>= aString; + OString aByteString( bCompoundText ? convertToCompound( aString ) : OUStringToOString( aString, aEncoding ) ); + rData = Sequence< sal_Int8 >( (sal_Int8*)aByteString.getStr(), aByteString.getLength() * sizeof( sal_Char ) ); + bSuccess = true; + } + } + } + } + // various exceptions possible ... which all lead to a failed conversion + // so simplify here to a catch all + catch(...) + { + } + + return bSuccess; +} + +// ------------------------------------------------------------------------ + +SelectionManager& SelectionManager::get( const OUString& rDisplayName ) +{ + MutexGuard aGuard( *Mutex::getGlobalMutex() ); + + OUString aDisplayName( rDisplayName ); + if( ! aDisplayName.getLength() ) + aDisplayName = OStringToOUString( getenv( "DISPLAY" ), RTL_TEXTENCODING_ISO_8859_1 ); + SelectionManager* pInstance = NULL; + + ::std::hash_map< OUString, SelectionManager*, OUStringHash >::iterator it = getInstances().find( aDisplayName ); + if( it != getInstances().end() ) + pInstance = it->second; + else pInstance = getInstances()[ aDisplayName ] = new SelectionManager(); + + return *pInstance; +} + +// ------------------------------------------------------------------------ + +const OUString& SelectionManager::getString( Atom aAtom ) +{ + MutexGuard aGuard(m_aMutex); + + ::std::hash_map< Atom, OUString >::const_iterator it; + if( ( it = m_aAtomToString.find( aAtom ) ) == m_aAtomToString.end() ) + { + static OUString aEmpty; + char* pAtom = m_pDisplay ? XGetAtomName( m_pDisplay, aAtom ) : NULL; + if( ! pAtom ) + return aEmpty; + OUString aString( OStringToOUString( pAtom, RTL_TEXTENCODING_ISO_8859_1 ) ); + XFree( pAtom ); + m_aStringToAtom[ aString ] = aAtom; + m_aAtomToString[ aAtom ] = aString; + } + return m_aAtomToString[ aAtom ]; +} + +// ------------------------------------------------------------------------ + +Atom SelectionManager::getAtom( const OUString& rString ) +{ + MutexGuard aGuard(m_aMutex); + + ::std::hash_map< OUString, Atom, OUStringHash >::const_iterator it; + if( ( it = m_aStringToAtom.find( rString ) ) == m_aStringToAtom.end() ) + { + static Atom nNoDisplayAtoms = 1; + Atom aAtom = m_pDisplay ? XInternAtom( m_pDisplay, OUStringToOString( rString, RTL_TEXTENCODING_ISO_8859_1 ), False ) : nNoDisplayAtoms++; + m_aStringToAtom[ rString ] = aAtom; + m_aAtomToString[ aAtom ] = rString; + } + return m_aStringToAtom[ rString ]; +} + +// ------------------------------------------------------------------------ + +bool SelectionManager::requestOwnership( Atom selection ) +{ + bool bSuccess = false; + if( m_pDisplay && m_aWindow ) + { + MutexGuard aGuard(m_aMutex); + + SelectionAdaptor* pAdaptor = getAdaptor( selection ); + if( pAdaptor ) + { + XSetSelectionOwner( m_pDisplay, selection, m_aWindow, CurrentTime ); + if( XGetSelectionOwner( m_pDisplay, selection ) == m_aWindow ) + bSuccess = true; +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "%s ownership for selection %s\n", + bSuccess ? "acquired" : "failed to acquire", + OUStringToOString( getString( selection ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); +#endif + Selection* pSel = m_aSelections[ selection ]; + pSel->m_bOwner = bSuccess; + delete pSel->m_pPixmap; + pSel->m_pPixmap = NULL; + pSel->m_nOrigTimestamp = m_nSelectionTimestamp; + } +#if OSL_DEBUG_LEVEL > 1 + else + fprintf( stderr, "no adaptor for selection %s\n", + OUStringToOString( getString( selection ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); + + if( pAdaptor->getTransferable().is() ) + { + Sequence< DataFlavor > aTypes = pAdaptor->getTransferable()->getTransferDataFlavors(); + for( int i = 0; i < aTypes.getLength(); i++ ) + { + fprintf( stderr, " %s\n", OUStringToOString( aTypes.getConstArray()[i].MimeType, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); + } + } +#endif + } + return bSuccess; +} + +// ------------------------------------------------------------------------ + +void SelectionManager::convertTypeToNative( const OUString& rType, Atom selection, int& rFormat, ::std::list< Atom >& rConversions, bool bPushFront ) +{ + NativeTypeEntry* pTab = selection == m_nXdndSelection ? aXdndConversionTab : aNativeConversionTab; + int nTabEntries = selection == m_nXdndSelection + ? sizeof(aXdndConversionTab)/sizeof(aXdndConversionTab[0]) : + sizeof(aNativeConversionTab)/sizeof(aNativeConversionTab[0]); + + OString aType( OUStringToOString( rType, RTL_TEXTENCODING_ISO_8859_1 ) ); + rFormat = 0; + for( int i = 0; i < nTabEntries; i++ ) + { + if( aType.equalsIgnoreAsciiCase( pTab[i].pType ) ) + { + if( ! pTab[i].nAtom ) + pTab[i].nAtom = getAtom( OStringToOUString( pTab[i].pNativeType, RTL_TEXTENCODING_ISO_8859_1 ) ); + rFormat = pTab[i].nFormat; + if( bPushFront ) + rConversions.push_front( pTab[i].nAtom ); + else + rConversions.push_back( pTab[i].nAtom ); + if( pTab[i].nFormat == XA_PIXMAP ) + { + if( bPushFront ) + { + rConversions.push_front( XA_VISUALID ); + rConversions.push_front( XA_COLORMAP ); + } + else + { + rConversions.push_back( XA_VISUALID ); + rConversions.push_back( XA_COLORMAP ); + } + } + } + } + if( ! rFormat ) + rFormat = 8; // byte buffer + if( bPushFront ) + rConversions.push_front( getAtom( rType ) ); + else + rConversions.push_back( getAtom( rType ) ); +}; + +// ------------------------------------------------------------------------ + +void SelectionManager::getNativeTypeList( const Sequence< DataFlavor >& rTypes, std::list< Atom >& rOutTypeList, Atom targetselection ) +{ + rOutTypeList.clear(); + + int nFormat; + int nFlavors = rTypes.getLength(); + const DataFlavor* pFlavors = rTypes.getConstArray(); + bool bHaveText = false; + for( int i = 0; i < nFlavors; i++ ) + { + if( pFlavors[i].MimeType.compareToAscii( "text/plain", 10 ) == 0) + bHaveText = true; + else + convertTypeToNative( pFlavors[i].MimeType, targetselection, nFormat, rOutTypeList ); + } + if( bHaveText ) + { + if( targetselection != m_nXdndSelection ) + { + // only mimetypes should go into Xdnd type list + rOutTypeList.push_front( XA_STRING ); + rOutTypeList.push_front( m_nCOMPOUNDAtom ); + } + convertTypeToNative( OUString::createFromAscii( "text/plain;charset=utf-8" ), targetselection, nFormat, rOutTypeList, true ); + } + if( targetselection != m_nXdndSelection ) + rOutTypeList.push_back( m_nMULTIPLEAtom ); +} + +// ------------------------------------------------------------------------ + +OUString SelectionManager::convertTypeFromNative( Atom nType, Atom selection, int& rFormat ) +{ + NativeTypeEntry* pTab = selection == m_nXdndSelection ? aXdndConversionTab : aNativeConversionTab; + int nTabEntries = selection == m_nXdndSelection + ? sizeof(aXdndConversionTab)/sizeof(aXdndConversionTab[0]) : + sizeof(aNativeConversionTab)/sizeof(aNativeConversionTab[0]); + + for( int i = 0; i < nTabEntries; i++ ) + { + if( ! pTab[i].nAtom ) + pTab[i].nAtom = getAtom( OStringToOUString( pTab[i].pNativeType, RTL_TEXTENCODING_ISO_8859_1 ) ); + if( nType == pTab[i].nAtom ) + { + rFormat = pTab[i].nFormat; + return OStringToOUString( pTab[i].pType, RTL_TEXTENCODING_ISO_8859_1 ); + } + } + rFormat = 8; + return getString( nType ); +} + +// ------------------------------------------------------------------------ + +bool SelectionManager::getPasteData( Atom selection, Atom type, Sequence< sal_Int8 >& rData ) +{ + ResettableMutexGuard aGuard(m_aMutex); + ::std::hash_map< Atom, Selection* >::iterator it; + bool bSuccess = false; + +#if OSL_DEBUG_LEVEL > 1 + OUString aSelection( getString( selection ) ); + OUString aType( getString( type ) ); + fprintf( stderr, "getPasteData( %s, native: %s )\n", + OUStringToOString( aSelection, RTL_TEXTENCODING_ISO_8859_1 ).getStr(), + OUStringToOString( aType, RTL_TEXTENCODING_ISO_8859_1 ).getStr() + ); +#endif + + if( ! m_pDisplay ) + return false; + + it = m_aSelections.find( selection ); + if( it == m_aSelections.end() ) + return false; + + XLIB_Window aSelectionOwner = XGetSelectionOwner( m_pDisplay, selection ); + if( aSelectionOwner == None ) + return false; + if( aSelectionOwner == m_aWindow ) + { + // probably bad timing led us here +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "Innere Nabelschau\n" ); +#endif + return false; + } + + // ICCCM recommends to destroy property before convert request unless + // parameters are transported; we do only in case of MULTIPLE, + // so destroy property unless target is MULTIPLE + if( type != m_nMULTIPLEAtom ) + XDeleteProperty( m_pDisplay, m_aWindow, selection ); + + XConvertSelection( m_pDisplay, selection, type, selection, m_aWindow, selection == m_nXdndSelection ? m_nDropTime : CurrentTime ); + it->second->m_eState = Selection::WaitingForResponse; + it->second->m_aRequestedType = type; + it->second->m_aData = Sequence< sal_Int8 >(); + it->second->m_aDataArrived.reset(); + // really start the request; if we don't flush the + // queue the request won't leave it because there are no more + // X calls after this until the data arrived or timeout + XFlush( m_pDisplay ); + + // do a reschedule + struct timeval tv_last, tv_current; + gettimeofday( &tv_last, NULL ); + tv_current = tv_last; + + XEvent aEvent; + do + { + bool bAdjustTime = false; + { + bool bHandle = false; + + if( XCheckTypedEvent( m_pDisplay, + PropertyNotify, + &aEvent + ) ) + { + bHandle = true; + if( aEvent.xproperty.window == m_aWindow + && aEvent.xproperty.atom == selection ) + bAdjustTime = true; + } + else + if( XCheckTypedEvent( m_pDisplay, + SelectionClear, + &aEvent + ) ) + { + bHandle = true; + } + else + if( XCheckTypedEvent( m_pDisplay, + SelectionRequest, + &aEvent + ) ) + bHandle = true; + else + if( XCheckTypedEvent( m_pDisplay, + SelectionNotify, + &aEvent + ) ) + { + bHandle = true; + if( aEvent.xselection.selection == selection + && ( aEvent.xselection.requestor == m_aWindow || + aEvent.xselection.requestor == m_aCurrentDropWindow ) + ) + bAdjustTime = true; + } + else + { + TimeValue aTVal; + aTVal.Seconds = 0; + aTVal.Nanosec = 100000000; + aGuard.clear(); + osl_waitThread( &aTVal ); + aGuard.reset(); + } + if( bHandle ) + { + aGuard.clear(); + handleXEvent( aEvent ); + aGuard.reset(); + } + } + gettimeofday( &tv_current, NULL ); + if( bAdjustTime ) + tv_last = tv_current; + } while( ! it->second->m_aDataArrived.check() && (tv_current.tv_sec - tv_last.tv_sec) < getSelectionTimeout() ); + +#if OSL_DEBUG_LEVEL > 1 + if( (tv_current.tv_sec - tv_last.tv_sec) > getSelectionTimeout() ) + fprintf( stderr, "timed out\n" ); +#endif + if( it->second->m_aDataArrived.check() && + it->second->m_aData.getLength() ) + { + rData = it->second->m_aData; + bSuccess = true; + } +#if OSL_DEBUG_LEVEL > 1 + else + fprintf( stderr, "conversion unsuccessfull\n" ); +#endif + return bSuccess; +} + +// ------------------------------------------------------------------------ + +bool SelectionManager::getPasteData( Atom selection, const ::rtl::OUString& rType, Sequence< sal_Int8 >& rData ) +{ + int nFormat; + bool bSuccess = false; + + ::std::hash_map< Atom, Selection* >::iterator it; + { + MutexGuard aGuard(m_aMutex); + + it = m_aSelections.find( selection ); + if( it == m_aSelections.end() ) + return false; + } + + if( it->second->m_aTypes.getLength() == 0 ) + { + Sequence< DataFlavor > aFlavors; + getPasteDataTypes( selection, aFlavors ); + if( it->second->m_aTypes.getLength() == 0 ) + return false; + } + + const Sequence< DataFlavor >& rTypes( it->second->m_aTypes ); + const std::vector< Atom >& rNativeTypes( it->second->m_aNativeTypes ); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "getPasteData( \"%s\", \"%s\" )\n", + OUStringToOString( getString( selection ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), + OUStringToOString( rType, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); +#endif + + if( rType.equalsAsciiL( "text/plain;charset=utf-16", 25 ) ) + { + // lets see if we have UTF16 else try to find something convertible + if( it->second->m_aTypes.getLength() && ! it->second->m_bHaveUTF16 ) + { + Sequence< sal_Int8 > aData; + if( it->second->m_aUTF8Type != None && + getPasteData( selection, + it->second->m_aUTF8Type, + aData ) + ) + { + OUString aRet( (const sal_Char*)aData.getConstArray(), aData.getLength(), RTL_TEXTENCODING_UTF8 ); + rData = Sequence< sal_Int8 >( (sal_Int8*)aRet.getStr(), (aRet.getLength()+1)*sizeof( sal_Unicode ) ); + bSuccess = true; + } + else if( it->second->m_bHaveCompound && + getPasteData( selection, + m_nCOMPOUNDAtom, + aData ) + ) + { + OUString aRet( convertFromCompound( (const char*)aData.getConstArray(), aData.getLength() ) ); + rData = Sequence< sal_Int8 >( (sal_Int8*)aRet.getStr(), (aRet.getLength()+1)*sizeof( sal_Unicode ) ); + bSuccess = true; + } + else + { + for( int i = 0; i < rTypes.getLength(); i++ ) + { + rtl_TextEncoding aEncoding = getTextPlainEncoding( rTypes.getConstArray()[i].MimeType ); + if( aEncoding != RTL_TEXTENCODING_DONTKNOW && + aEncoding != RTL_TEXTENCODING_UNICODE && + getPasteData( selection, + rNativeTypes[i], + aData ) + ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "using \"%s\" instead of \"%s\"\n", + OUStringToOString( rTypes.getConstArray()[i].MimeType, RTL_TEXTENCODING_ISO_8859_1 ).getStr(), + OUStringToOString( rType, RTL_TEXTENCODING_ISO_8859_1 ).getStr() + ); +#endif + OString aConvert( (sal_Char*)aData.getConstArray(), aData.getLength() ); + OUString aUTF( OStringToOUString( aConvert, aEncoding ) ); + rData = Sequence< sal_Int8 >( (sal_Int8*)aUTF.getStr(), (aUTF.getLength()+1)*sizeof( sal_Unicode ) ); + bSuccess = true; + break; + } + } + } + } + } + else if( rType.equalsAsciiL( "image/bmp", 9 ) ) + { + // #i83376# try if someone has the data in image/bmp already before + // doing the PIXMAP stuff (e.g. the gimp has this) + bSuccess = getPasteData( selection, m_nImageBmpAtom, rData ); + #if OSL_DEBUG_LEVEL > 1 + if( bSuccess ) + fprintf( stderr, "got %d bytes of image/bmp\n", (int)rData.getLength() ); + #endif + if( ! bSuccess ) + { + Pixmap aPixmap = None; + Colormap aColormap = None; + + // prepare property for MULTIPLE request + Sequence< sal_Int8 > aData; + Atom pTypes[4] = { XA_PIXMAP, XA_PIXMAP, + XA_COLORMAP, XA_COLORMAP }; + { + MutexGuard aGuard(m_aMutex); + + XChangeProperty( m_pDisplay, + m_aWindow, + selection, + XA_ATOM, + 32, + PropModeReplace, + (unsigned char*)pTypes, + 4 ); + } + + // try MULTIPLE request + if( getPasteData( selection, m_nMULTIPLEAtom, aData ) ) + { + Atom* pReturnedTypes = (Atom*)aData.getArray(); + if( pReturnedTypes[0] == XA_PIXMAP && pReturnedTypes[1] == XA_PIXMAP ) + { + MutexGuard aGuard(m_aMutex); + + Atom type = None; + int format = 0; + unsigned long nItems = 0; + unsigned long nBytes = 0; + unsigned char* pReturn = NULL; + XGetWindowProperty( m_pDisplay, m_aWindow, XA_PIXMAP, 0, 1, True, XA_PIXMAP, &type, &format, &nItems, &nBytes, &pReturn ); + if( pReturn ) + { + if( type == XA_PIXMAP ) + aPixmap = *(Pixmap*)pReturn; + XFree( pReturn ); + pReturn = NULL; + if( pReturnedTypes[2] == XA_COLORMAP && pReturnedTypes[3] == XA_COLORMAP ) + { + XGetWindowProperty( m_pDisplay, m_aWindow, XA_COLORMAP, 0, 1, True, XA_COLORMAP, &type, &format, &nItems, &nBytes, &pReturn ); + if( pReturn ) + { + if( type == XA_COLORMAP ) + aColormap = *(Colormap*)pReturn; + XFree( pReturn ); + } + } + } + #if OSL_DEBUG_LEVEL > 1 + else + { + fprintf( stderr, "could not get PIXMAP property: type=%s, format=%d, items=%ld, bytes=%ld, ret=0x%p\n", OUStringToOString( getString( type ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), format, nItems, nBytes, pReturn ); + } + #endif + } + } + + if( aPixmap == None ) + { + // perhaps two normal requests will work + if( getPasteData( selection, XA_PIXMAP, aData ) ) + { + aPixmap = *(Pixmap*)aData.getArray(); + if( aColormap == None && getPasteData( selection, XA_COLORMAP, aData ) ) + aColormap = *(Colormap*)aData.getArray(); + } + } + + // convert data if possible + if( aPixmap != None ) + { + MutexGuard aGuard(m_aMutex); + + sal_Int32 nOutSize = 0; + sal_uInt8* pBytes = X11_getBmpFromPixmap( m_pDisplay, aPixmap, aColormap, nOutSize ); + if( pBytes && nOutSize ) + { + rData = Sequence< sal_Int8 >( nOutSize ); + memcpy( rData.getArray(), pBytes, nOutSize ); + X11_freeBmp( pBytes ); + bSuccess = true; + } + } + } + } + + if( ! bSuccess ) + { + ::std::list< Atom > aTypes; + convertTypeToNative( rType, selection, nFormat, aTypes ); + ::std::list< Atom >::const_iterator type_it; + Atom nSelectedType = None; + for( type_it = aTypes.begin(); type_it != aTypes.end() && nSelectedType == None; ++type_it ) + { + for( unsigned int i = 0; i < rNativeTypes.size() && nSelectedType == None; i++ ) + if( rNativeTypes[i] == *type_it ) + nSelectedType = *type_it; + } + if( nSelectedType != None ) + bSuccess = getPasteData( selection, nSelectedType, rData ); + } +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "getPasteData for selection %s and data type %s returns %s, returned sequence has length %ld\n", + OUStringToOString( getString( selection ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), + OUStringToOString( rType, RTL_TEXTENCODING_ISO_8859_1 ).getStr(), + bSuccess ? "true" : "false", + rData.getLength() + ); +#endif + return bSuccess; +} + +// ------------------------------------------------------------------------ + +bool SelectionManager::getPasteDataTypes( Atom selection, Sequence< DataFlavor >& rTypes ) +{ + ::std::hash_map< Atom, Selection* >::iterator it; + { + MutexGuard aGuard(m_aMutex); + + it = m_aSelections.find( selection ); + if( it != m_aSelections.end() && + it->second->m_aTypes.getLength() && + abs( it->second->m_nLastTimestamp - time( NULL ) ) < 2 + ) + { + rTypes = it->second->m_aTypes; + return true; + } + } + + bool bSuccess = false; + bool bHaveUTF16 = false; + Atom aUTF8Type = None; + bool bHaveCompound = false; + bool bHaveText = false; + Sequence< sal_Int8 > aAtoms; + + if( selection == m_nXdndSelection ) + { + // xdnd sends first three types with XdndEnter + // if more than three types are supported then the XDndTypeList + // property on the source window is used + if( m_aDropEnterEvent.data.l[0] && m_aCurrentDropWindow ) + { + if( m_aDropEnterEvent.data.l[1] & 1 ) + { + const unsigned int atomcount = 256; + // more than three types; look in property + MutexGuard aGuard(m_aMutex); + + Atom nType; + int nFormat; + unsigned long nItems, nBytes; + unsigned char* pBytes = NULL; + + XGetWindowProperty( m_pDisplay, m_aDropEnterEvent.data.l[0], + m_nXdndTypeList, 0, atomcount, False, + XA_ATOM, + &nType, &nFormat, &nItems, &nBytes, &pBytes ); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "have %ld data types in XdndTypeList\n", nItems ); +#endif + if( nItems == atomcount && nBytes > 0 ) + { + // wow ... more than 256 types ! + aAtoms.realloc( sizeof( Atom )*atomcount+nBytes ); + memcpy( aAtoms.getArray(), pBytes, sizeof( Atom )*atomcount ); + XFree( pBytes ); + pBytes = NULL; + XGetWindowProperty( m_pDisplay, m_aDropEnterEvent.data.l[0], + m_nXdndTypeList, atomcount, nBytes/sizeof(Atom), + False, XA_ATOM, + &nType, &nFormat, &nItems, &nBytes, &pBytes ); + { + memcpy( aAtoms.getArray()+atomcount*sizeof(Atom), pBytes, nItems*sizeof(Atom) ); + XFree( pBytes ); + } + } + else + { + aAtoms.realloc( sizeof(Atom)*nItems ); + memcpy( aAtoms.getArray(), pBytes, nItems*sizeof(Atom) ); + XFree( pBytes ); + } + } + else + { + // one to three types + int n = 0, i; + for( i = 0; i < 3; i++ ) + if( m_aDropEnterEvent.data.l[2+i] ) + n++; +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "have %d data types in XdndEnter\n", n ); +#endif + aAtoms.realloc( sizeof(Atom)*n ); + for( i = 0, n = 0; i < 3; i++ ) + if( m_aDropEnterEvent.data.l[2+i] ) + ((Atom*)aAtoms.getArray())[n++] = m_aDropEnterEvent.data.l[2+i]; + } + } + } + // get data of type TARGETS + else if( ! getPasteData( selection, m_nTARGETSAtom, aAtoms ) ) + aAtoms = Sequence< sal_Int8 >(); + + std::vector< Atom > aNativeTypes; + if( aAtoms.getLength() ) + { + sal_Int32 nAtoms = aAtoms.getLength() / sizeof(Atom); + Atom* pAtoms = (Atom*)aAtoms.getArray(); + rTypes.realloc( nAtoms ); + aNativeTypes.resize( nAtoms ); + DataFlavor* pFlavors = rTypes.getArray(); + sal_Int32 nNativeTypesIndex = 0; + while( nAtoms-- ) + { +#if OSL_DEBUG_LEVEL > 1 + if( *pAtoms && *pAtoms < 0x01000000 ) + fprintf( stderr, "native type: %s\n", OUStringToOString( getString( *pAtoms ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); +#endif + if( *pAtoms == m_nCOMPOUNDAtom ) + bHaveText = bHaveCompound = true; + else if( *pAtoms && *pAtoms < 0x01000000 ) + { + int nFormat; + pFlavors->MimeType = convertTypeFromNative( *pAtoms, selection, nFormat ); + pFlavors->DataType = getCppuType( (Sequence< sal_Int8 >*)0 ); + sal_Int32 nIndex = 0; + if( pFlavors->MimeType.getToken( 0, ';', nIndex ).equalsAsciiL( "text/plain", 10 ) ) + { + OUString aToken(pFlavors->MimeType.getToken( 0, ';', nIndex )); + // omit text/plain;charset=unicode since it is not well defined + if( aToken.compareToAscii( "charset=unicode" ) == 0 ) + { + pAtoms++; + continue; + } + bHaveText = true; + if( aToken.compareToAscii( "charset=utf-16" ) == 0 ) + { + bHaveUTF16 = true; + pFlavors->DataType = getCppuType( (OUString*)0 ); + } + else if( aToken.compareToAscii( "charset=utf-8" ) == 0 ) + { + aUTF8Type = *pAtoms; + } + } + pFlavors++; + aNativeTypes[ nNativeTypesIndex ] = *pAtoms; + nNativeTypesIndex++; + } + pAtoms++; + } + if( (pFlavors - rTypes.getArray()) < rTypes.getLength() ) + rTypes.realloc(pFlavors - rTypes.getArray()); + bSuccess = rTypes.getLength() ? true : false; + if( bHaveText && ! bHaveUTF16 ) + { + int i = 0; + + int nNewFlavors = rTypes.getLength()+1; + Sequence< DataFlavor > aTemp( nNewFlavors ); + for( i = 0; i < nNewFlavors-1; i++ ) + aTemp.getArray()[i+1] = rTypes.getConstArray()[i]; + aTemp.getArray()[0].MimeType = OUString::createFromAscii( "text/plain;charset=utf-16" ); + aTemp.getArray()[0].DataType = getCppuType( (OUString*)0 ); + rTypes = aTemp; + + std::vector< Atom > aNativeTemp( nNewFlavors ); + for( i = 0; i < nNewFlavors-1; i++ ) + aNativeTemp[ i + 1 ] = aNativeTypes[ i ]; + aNativeTemp[0] = None; + aNativeTypes = aNativeTemp; + } + } + + { + MutexGuard aGuard(m_aMutex); + + it = m_aSelections.find( selection ); + if( it != m_aSelections.end() ) + { + if( bSuccess ) + { + it->second->m_aTypes = rTypes; + it->second->m_aNativeTypes = aNativeTypes; + it->second->m_nLastTimestamp = time( NULL ); + it->second->m_bHaveUTF16 = bHaveUTF16; + it->second->m_aUTF8Type = aUTF8Type; + it->second->m_bHaveCompound = bHaveCompound; + } + else + { + it->second->m_aTypes = Sequence< DataFlavor >(); + it->second->m_aNativeTypes = std::vector< Atom >(); + it->second->m_nLastTimestamp = 0; + it->second->m_bHaveUTF16 = false; + it->second->m_aUTF8Type = None; + it->second->m_bHaveCompound = false; + } + } + } + +#if OSL_DEBUG_LEVEL > 1 +// if( selection != m_nCLIPBOARDAtom ) + { + fprintf( stderr, "SelectionManager::getPasteDataTypes( %s ) = %s\n", OUStringToOString( getString( selection ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), bSuccess ? "true" : "false" ); + for( int i = 0; i < rTypes.getLength(); i++ ) + fprintf( stderr, "type: %s\n", OUStringToOString( rTypes.getConstArray()[i].MimeType, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); + } +#endif + + return bSuccess; +} + +// ------------------------------------------------------------------------ + +PixmapHolder* SelectionManager::getPixmapHolder( Atom selection ) +{ + std::hash_map< Atom, Selection* >::const_iterator it = m_aSelections.find( selection ); + if( it == m_aSelections.end() ) + return NULL; + if( ! it->second->m_pPixmap ) + it->second->m_pPixmap = new PixmapHolder( m_pDisplay ); + return it->second->m_pPixmap; +} + +static sal_Size GetTrueFormatSize(int nFormat) +{ + // http://mail.gnome.org/archives/wm-spec-list/2003-March/msg00067.html + return nFormat == 32 ? sizeof(long) : nFormat/8; +} + +bool SelectionManager::sendData( SelectionAdaptor* pAdaptor, + XLIB_Window requestor, + Atom target, + Atom property, + Atom selection ) +{ + ResettableMutexGuard aGuard( m_aMutex ); + + // handle targets related to image/bmp + if( target == XA_COLORMAP || target == XA_PIXMAP || target == XA_BITMAP || target == XA_VISUALID ) + { + PixmapHolder* pPixmap = getPixmapHolder( selection ); + if( ! pPixmap ) return false; + XID nValue = None; + + // handle colormap request + if( target == XA_COLORMAP ) + nValue = (XID)pPixmap->getColormap(); + else if( target == XA_VISUALID ) + nValue = (XID)pPixmap->getVisualID(); + else if( target == XA_PIXMAP || target == XA_BITMAP ) + { + nValue = (XID)pPixmap->getPixmap(); + if( nValue == None ) + { + // first conversion + Sequence< sal_Int8 > aData; + int nFormat; + aGuard.clear(); + bool bConverted = convertData( pAdaptor->getTransferable(), target, selection, nFormat, aData ); + aGuard.reset(); + if( bConverted ) + { + // get pixmap again since clearing the guard could have invalidated + // the pixmap in another thread + pPixmap = getPixmapHolder( selection ); + // conversion succeeded, so aData contains image/bmp now + if( pPixmap->needsConversion( (const sal_uInt8*)aData.getConstArray() ) + && m_xBitmapConverter.is() ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "trying bitmap conversion\n" ); +#endif + Reference xBM( new BmpTransporter( aData ) ); + Sequence aArgs(2), aOutArgs; + Sequence aOutIndex; + aArgs.getArray()[0] = makeAny( xBM ); + aArgs.getArray()[1] = makeAny( (sal_uInt16)pPixmap->getDepth() ); + aGuard.clear(); + try + { + Any aResult = + m_xBitmapConverter->invoke( OUString::createFromAscii( "convert-bitmap-depth" ), + aArgs, aOutIndex, aOutArgs ); + if( aResult >>= xBM ) + aData = xBM->getDIB(); + } + catch(...) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "exception in bitmap converter\n" ); +#endif + } + aGuard.reset(); + } + // get pixmap again since clearing the guard could have invalidated + // the pixmap in another thread + pPixmap = getPixmapHolder( selection ); + nValue = (XID)pPixmap->setBitmapData( (const sal_uInt8*)aData.getConstArray() ); + } + if( nValue == None ) + return false; + } + if( target == XA_BITMAP ) + nValue = (XID)pPixmap->getBitmap(); + } + + XChangeProperty( m_pDisplay, + requestor, + property, + target, + 32, + PropModeReplace, + (const unsigned char*)&nValue, + 1); + return true; + } + + /* + * special target TEXT allows us to transfer + * the data in an encoding of our choice + * COMPOUND_TEXT will work with most applications + */ + if( target == m_nTEXTAtom ) + target = m_nCOMPOUNDAtom; + + Sequence< sal_Int8 > aData; + int nFormat; + aGuard.clear(); + bool bConverted = convertData( pAdaptor->getTransferable(), target, selection, nFormat, aData ); + aGuard.reset(); + if( bConverted ) + { + // conversion succeeded + if( aData.getLength() > m_nIncrementalThreshold ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "using INCR protocol\n" ); + std::hash_map< XLIB_Window, std::hash_map< Atom, IncrementalTransfer > >::const_iterator win_it = m_aIncrementals.find( requestor ); + if( win_it != m_aIncrementals.end() ) + { + std::hash_map< Atom, IncrementalTransfer >::const_iterator inc_it = win_it->second.find( property ); + if( inc_it != win_it->second.end() ) + { + const IncrementalTransfer& rInc = inc_it->second; + fprintf( stderr, "premature end and new start for INCR transfer for window 0x%lx, property %s, type %s\n", + rInc.m_aRequestor, + OUStringToOString( getString( rInc.m_aProperty ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), + OUStringToOString( getString( rInc.m_aTarget ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() + ); + } + } +#endif + + // insert IncrementalTransfer + IncrementalTransfer& rInc = m_aIncrementals[ requestor ][ property ]; + rInc.m_aData = aData; + rInc.m_nBufferPos = 0; + rInc.m_aRequestor = requestor; + rInc.m_aProperty = property; + rInc.m_aTarget = target; + rInc.m_nFormat = nFormat; + rInc.m_nTransferStartTime = time( NULL ); + + // use incr protocol, signal start to requestor + long nMinSize = m_nIncrementalThreshold; + XSelectInput( m_pDisplay, requestor, PropertyChangeMask ); + XChangeProperty( m_pDisplay, requestor, property, + m_nINCRAtom, 32, PropModeReplace, (unsigned char*)&nMinSize, 1 ); + XFlush( m_pDisplay ); + } + else + { + sal_Size nUnitSize = GetTrueFormatSize(nFormat); + XChangeProperty( m_pDisplay, + requestor, + property, + target, + nFormat, + PropModeReplace, + (const unsigned char*)aData.getConstArray(), + aData.getLength()/nUnitSize ); + } + } +#if OSL_DEBUG_LEVEL > 1 + else + fprintf( stderr, "convertData failed for type: %s \n", + OUStringToOString( convertTypeFromNative( target, selection, nFormat ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); +#endif + return bConverted; +} + +// ------------------------------------------------------------------------ + +bool SelectionManager::handleSelectionRequest( XSelectionRequestEvent& rRequest ) +{ + ResettableMutexGuard aGuard( m_aMutex ); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "handleSelectionRequest for selection %s and target %s\n", + OUStringToOString( getString( rRequest.selection ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), + OUStringToOString( getString( rRequest.target ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() + ); +#endif + + XEvent aNotify; + + aNotify.type = SelectionNotify; + aNotify.xselection.display = rRequest.display; + aNotify.xselection.send_event = True; + aNotify.xselection.requestor = rRequest.requestor; + aNotify.xselection.selection = rRequest.selection; + aNotify.xselection.time = rRequest.time; + aNotify.xselection.target = rRequest.target; + aNotify.xselection.property = None; + + SelectionAdaptor* pAdaptor = getAdaptor( rRequest.selection ); + // ensure that we still own that selection + if( pAdaptor && + XGetSelectionOwner( m_pDisplay, rRequest.selection ) == m_aWindow ) + { + Reference< XTransferable > xTrans( pAdaptor->getTransferable() ); + if( rRequest.target == m_nTARGETSAtom ) + { + // someone requests our types + if( xTrans.is() ) + { + aGuard.clear(); + Sequence< DataFlavor > aFlavors = xTrans->getTransferDataFlavors(); + aGuard.reset(); + + ::std::list< Atom > aConversions; + getNativeTypeList( aFlavors, aConversions, rRequest.selection ); + + int i, nTypes = aConversions.size(); + Atom* pTypes = (Atom*)alloca( nTypes * sizeof( Atom ) ); + std::list< Atom >::const_iterator it; + for( i = 0, it = aConversions.begin(); i < nTypes; i++, ++it ) + pTypes[i] = *it; + XChangeProperty( m_pDisplay, rRequest.requestor, rRequest.property, + XA_ATOM, 32, PropModeReplace, (const unsigned char*)pTypes, nTypes ); + aNotify.xselection.property = rRequest.property; +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "sending type list:\n" ); + for( int k = 0; k < nTypes; k++ ) + fprintf( stderr, " %s\n", pTypes[k] ? XGetAtomName( m_pDisplay, pTypes[k] ) : "" ); +#endif + } + } + else if( rRequest.target == m_nTIMESTAMPAtom ) + { + long nTimeStamp = (long)m_aSelections[rRequest.selection]->m_nOrigTimestamp; + XChangeProperty( m_pDisplay, rRequest.requestor, rRequest.property, + XA_INTEGER, 32, PropModeReplace, (const unsigned char*)&nTimeStamp, 1 ); + aNotify.xselection.property = rRequest.property; +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "sending timestamp: %d\n", (int)nTimeStamp ); +#endif + } + else + { + bool bEventSuccess = false; + if( rRequest.target == m_nMULTIPLEAtom ) + { + // get all targets + Atom nType = None; + int nFormat = 0; + unsigned long nItems = 0, nBytes = 0; + unsigned char* pData = NULL; + + // get number of atoms + XGetWindowProperty( m_pDisplay, + rRequest.requestor, + rRequest.property, + 0, 0, + False, + AnyPropertyType, + &nType, &nFormat, + &nItems, &nBytes, + &pData ); + if( nFormat == 32 && nBytes/4 ) + { + if( pData ) // ?? should not happen + { + XFree( pData ); + pData = NULL; + } + XGetWindowProperty( m_pDisplay, + rRequest.requestor, + rRequest.property, + 0, nBytes/4, + False, + nType, + &nType, &nFormat, + &nItems, &nBytes, + &pData ); + if( pData && nItems ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "found %ld atoms in MULTIPLE request\n", nItems ); +#endif + bEventSuccess = true; + bool bResetAtoms = false; + Atom* pAtoms = (Atom*)pData; + aGuard.clear(); + for( unsigned int i = 0; i < nItems; i += 2 ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, " %s => %s: ", + OUStringToOString( getString( pAtoms[i] ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), + OUStringToOString( getString( pAtoms[i+1] ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); +#endif + bool bSuccess = sendData( pAdaptor, rRequest.requestor, pAtoms[i], pAtoms[i+1], rRequest.selection ); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "%s\n", bSuccess ? "succeeded" : "failed" ); +#endif + if( ! bSuccess ) + { + pAtoms[i] = None; + bResetAtoms = true; + } + } + aGuard.reset(); + if( bResetAtoms ) + XChangeProperty( m_pDisplay, + rRequest.requestor, + rRequest.property, + XA_ATOM, + 32, + PropModeReplace, + pData, + nBytes/4 ); + } + if( pData ) + XFree( pData ); + } +#if OSL_DEBUG_LEVEL > 1 + else + { + fprintf( stderr, "could not get type list from \"%s\" of type \"%s\" on requestor 0x%lx, requestor has properties:", + OUStringToOString( getString( rRequest.property ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), + OUStringToOString( getString( nType ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), + rRequest.requestor ); + int nProps = 0; + Atom* pProps = XListProperties( m_pDisplay, rRequest.requestor, &nProps ); + if( pProps ) + { + for( int i = 0; i < nProps; i++ ) + fprintf( stderr, " \"%s\"", OUStringToOString( getString( pProps[i]), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); + XFree( pProps ); + } + } +#endif + } + else + { + aGuard.clear(); + bEventSuccess = sendData( pAdaptor, rRequest.requestor, rRequest.target, rRequest.property, rRequest.selection ); + aGuard.reset(); + } + if( bEventSuccess ) + { + aNotify.xselection.target = rRequest.target; + aNotify.xselection.property = rRequest.property; + } + } + aGuard.clear(); + xTrans.clear(); + aGuard.reset(); + } + XSendEvent( m_pDisplay, rRequest.requestor, False, 0, &aNotify ); + + if( rRequest.selection == XA_PRIMARY && + m_bWaitingForPrimaryConversion && + m_xDragSourceListener.is() ) + { + DragSourceDropEvent dsde; + dsde.Source = static_cast< OWeakObject* >(this); + dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, rRequest.time, *this ); + dsde.DragSource = static_cast< XDragSource* >(this); + if( aNotify.xselection.property != None ) + { + dsde.DropAction = DNDConstants::ACTION_COPY; + dsde.DropSuccess = sal_True; + } + else + { + dsde.DropAction = DNDConstants::ACTION_NONE; + dsde.DropSuccess = sal_False; + } + Reference< XDragSourceListener > xListener( m_xDragSourceListener ); + m_xDragSourceListener.clear(); + aGuard.clear(); + if( xListener.is() ) + xListener->dragDropEnd( dsde ); + } + + // we handled the event in any case by answering + return true; +} + +// ------------------------------------------------------------------------ + +bool SelectionManager::handleReceivePropertyNotify( XPropertyEvent& rNotify ) +{ + MutexGuard aGuard( m_aMutex ); + // data we requested arrived +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "handleReceivePropertyNotify for property %s\n", + OUStringToOString( getString( rNotify.atom ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); +#endif + bool bHandled = false; + + ::std::hash_map< Atom, Selection* >::iterator it = + m_aSelections.find( rNotify.atom ); + if( it != m_aSelections.end() && + rNotify.state == PropertyNewValue && + ( it->second->m_eState == Selection::WaitingForResponse || + it->second->m_eState == Selection::WaitingForData || + it->second->m_eState == Selection::IncrementalTransfer + ) + ) + { + // MULTIPLE requests are only complete after selection notify + if( it->second->m_aRequestedType == m_nMULTIPLEAtom && + ( it->second->m_eState == Selection::WaitingForResponse || + it->second->m_eState == Selection::WaitingForData ) ) + return false; + + bHandled = true; + + Atom nType = None; + int nFormat = 0; + unsigned long nItems = 0, nBytes = 0; + unsigned char* pData = NULL; + + // get type and length + XGetWindowProperty( m_pDisplay, + rNotify.window, + rNotify.atom, + 0, 0, + False, + AnyPropertyType, + &nType, &nFormat, + &nItems, &nBytes, + &pData ); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "found %ld bytes data of type %s and format %d, items = %ld\n", + nBytes, + OUStringToOString( getString( nType ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), + nFormat, nItems ); +#endif + if( pData ) + { + XFree( pData ); + pData = NULL; + } + + if( nType == m_nINCRAtom ) + { + // start data transfer + XDeleteProperty( m_pDisplay, rNotify.window, rNotify.atom ); + it->second->m_eState = Selection::IncrementalTransfer; + } + else if( nType != None ) + { + XGetWindowProperty( m_pDisplay, + rNotify.window, + rNotify.atom, + 0, nBytes/4 +1, + True, + nType, + &nType, &nFormat, + &nItems, &nBytes, + &pData ); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "read %ld items data of type %s and format %d, %ld bytes left in property\n", + nItems, + OUStringToOString( getString( nType ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), + nFormat, nBytes ); +#endif + + sal_Size nUnitSize = GetTrueFormatSize(nFormat); + + if( it->second->m_eState == Selection::WaitingForData || + it->second->m_eState == Selection::WaitingForResponse ) + { + // copy data + it->second->m_aData = Sequence< sal_Int8 >( (sal_Int8*)pData, nItems*nUnitSize ); + it->second->m_eState = Selection::Inactive; + it->second->m_aDataArrived.set(); + } + else if( it->second->m_eState == Selection::IncrementalTransfer ) + { + if( nItems ) + { + // append data + Sequence< sal_Int8 > aData( it->second->m_aData.getLength() + nItems*nUnitSize ); + memcpy( aData.getArray(), it->second->m_aData.getArray(), it->second->m_aData.getLength() ); + memcpy( aData.getArray() + it->second->m_aData.getLength(), pData, nItems*nUnitSize ); + it->second->m_aData = aData; + } + else + { + it->second->m_eState = Selection::Inactive; + it->second->m_aDataArrived.set(); + } + } + if( pData ) + XFree( pData ); + } + else if( it->second->m_eState == Selection::IncrementalTransfer ) + { + it->second->m_eState = Selection::Inactive; + it->second->m_aDataArrived.set(); + } + } + return bHandled; +} + +// ------------------------------------------------------------------------ + +bool SelectionManager::handleSendPropertyNotify( XPropertyEvent& rNotify ) +{ + MutexGuard aGuard( m_aMutex ); + + // ready for next part of a IncrementalTransfer +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "handleSendPropertyNotify for property %s (%s)\n", + OUStringToOString( getString( rNotify.atom ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), + rNotify.state == PropertyNewValue ? "new value" : ( rNotify.state == PropertyDelete ? "deleted" : "unknown") + ); +#endif + + bool bHandled = false; + // feed incrementals + if( rNotify.state == PropertyDelete ) + { + std::hash_map< XLIB_Window, std::hash_map< Atom, IncrementalTransfer > >::iterator it; + it = m_aIncrementals.find( rNotify.window ); + if( it != m_aIncrementals.end() ) + { + bHandled = true; + int nCurrentTime = time( NULL ); + std::hash_map< Atom, IncrementalTransfer >::iterator inc_it; + // throw out aborted transfers + std::list< Atom > aTimeouts; + for( inc_it = it->second.begin(); inc_it != it->second.end(); ++inc_it ) + { + if( (nCurrentTime - inc_it->second.m_nTransferStartTime) > (getSelectionTimeout()+2) ) + { + aTimeouts.push_back( inc_it->first ); +#if OSL_DEBUG_LEVEL > 1 + const IncrementalTransfer& rInc = inc_it->second; + fprintf( stderr, "timeout on INCR transfer for window 0x%lx, property %s, type %s\n", + rInc.m_aRequestor, + OUStringToOString( getString( rInc.m_aProperty ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), + OUStringToOString( getString( rInc.m_aTarget ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() + ); +#endif + } + } + + while( aTimeouts.begin() != aTimeouts.end() ) + { + // transfer broken, might even be a new client with the + // same window id + it->second.erase( aTimeouts.front() ); + aTimeouts.pop_front(); + } + + inc_it = it->second.find( rNotify.atom ); + if( inc_it != it->second.end() ) + { + IncrementalTransfer& rInc = inc_it->second; + + int nBytes = rInc.m_aData.getLength() - rInc.m_nBufferPos; + nBytes = (nBytes > m_nIncrementalThreshold) ? m_nIncrementalThreshold : nBytes; + if( nBytes < 0 ) // sanity check + nBytes = 0; +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "pushing %d bytes: \"%.*s\"...\n", + nBytes, nBytes > 32 ? 32 : nBytes, + (const unsigned char*)rInc.m_aData.getConstArray()+rInc.m_nBufferPos ); +#endif + + sal_Size nUnitSize = GetTrueFormatSize(rInc.m_nFormat); + + XChangeProperty( m_pDisplay, + rInc.m_aRequestor, + rInc.m_aProperty, + rInc.m_aTarget, + rInc.m_nFormat, + PropModeReplace, + (const unsigned char*)rInc.m_aData.getConstArray()+rInc.m_nBufferPos, + nBytes/nUnitSize ); + rInc.m_nBufferPos += nBytes; + rInc.m_nTransferStartTime = nCurrentTime; + + if( nBytes == 0 ) // transfer finished + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "finished INCR transfer for window 0x%lx, property %s, type %s\n", + rInc.m_aRequestor, + OUStringToOString( getString( rInc.m_aProperty ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), + OUStringToOString( getString( rInc.m_aTarget ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() + ); +#endif + it->second.erase( inc_it ); + } + + } + // eventually clean up the hash map + if( it->second.begin() == it->second.end() ) + m_aIncrementals.erase( it ); + } + } + return bHandled; +} + +// ------------------------------------------------------------------------ + +bool SelectionManager::handleSelectionNotify( XSelectionEvent& rNotify ) +{ + MutexGuard aGuard( m_aMutex ); + + bool bHandled = false; + + // notification about success/failure of one of our conversion requests +#if OSL_DEBUG_LEVEL > 1 + OUString aSelection( getString( rNotify.selection ) ); + OUString aProperty( OUString::createFromAscii( "None" ) ); + if( rNotify.property ) + aProperty = getString( rNotify.property ); + fprintf( stderr, "handleSelectionNotify for selection %s and property %s (0x%lx)\n", + OUStringToOString( aSelection, RTL_TEXTENCODING_ISO_8859_1 ).getStr(), + OUStringToOString( aProperty, RTL_TEXTENCODING_ISO_8859_1 ).getStr(), + rNotify.property + ); + if( rNotify.requestor != m_aWindow && rNotify.requestor != m_aCurrentDropWindow ) + fprintf( stderr, "Warning: selection notify for unknown window 0x%lx\n", rNotify.requestor ); +#endif + ::std::hash_map< Atom, Selection* >::iterator it = + m_aSelections.find( rNotify.selection ); + if ( + (rNotify.requestor == m_aWindow || rNotify.requestor == m_aCurrentDropWindow) && + it != m_aSelections.end() && + ( + (it->second->m_eState == Selection::WaitingForResponse) || + (it->second->m_eState == Selection::WaitingForData) + ) + ) + { + bHandled = true; + if( it->second->m_aRequestedType == m_nMULTIPLEAtom ) + { + Atom nType = None; + int nFormat = 0; + unsigned long nItems = 0, nBytes = 0; + unsigned char* pData = NULL; + + // get type and length + XGetWindowProperty( m_pDisplay, + rNotify.requestor, + rNotify.property, + 0, 256, + False, + AnyPropertyType, + &nType, &nFormat, + &nItems, &nBytes, + &pData ); + if( nBytes ) // HUGE request !!! + { + if( pData ) + XFree( pData ); + XGetWindowProperty( m_pDisplay, + rNotify.requestor, + rNotify.property, + 0, 256+(nBytes+3)/4, + False, + AnyPropertyType, + &nType, &nFormat, + &nItems, &nBytes, + &pData ); + } + it->second->m_eState = Selection::Inactive; + sal_Size nUnitSize = GetTrueFormatSize(nFormat); + it->second->m_aData = Sequence< sal_Int8 >((sal_Int8*)pData, nItems * nUnitSize); + it->second->m_aDataArrived.set(); + if( pData ) + XFree( pData ); + } + // WaitingForData can actually happen; some + // applications (e.g. cmdtool on Solaris) first send + // a success and then cancel it. Weird ! + else if( rNotify.property == None ) + { + // conversion failed, stop transfer + it->second->m_eState = Selection::Inactive; + it->second->m_aData = Sequence< sal_Int8 >(); + it->second->m_aDataArrived.set(); + } + // get the bytes, by INCR if necessary + else + it->second->m_eState = Selection::WaitingForData; + } +#if OSL_DEBUG_LEVEL > 1 + else if( it != m_aSelections.end() ) + fprintf( stderr, "Warning: selection in state %d\n", it->second->m_eState ); +#endif + return bHandled; +} + +// ------------------------------------------------------------------------ + +bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage ) +{ + ResettableMutexGuard aGuard(m_aMutex); + + // handle drop related events + XLIB_Window aSource = rMessage.data.l[0]; + XLIB_Window aTarget = rMessage.window; + + bool bHandled = false; + + ::std::hash_map< XLIB_Window, DropTargetEntry >::iterator it = + m_aDropTargets.find( aTarget ); + +#if OSL_DEBUG_LEVEL > 1 + if( rMessage.message_type == m_nXdndEnter || + rMessage.message_type == m_nXdndLeave || + rMessage.message_type == m_nXdndDrop || + rMessage.message_type == m_nXdndPosition ) + { + fprintf( stderr, "got drop event %s, ", OUStringToOString( getString( rMessage.message_type ), RTL_TEXTENCODING_ASCII_US).getStr() ); + if( it == m_aDropTargets.end() ) + fprintf( stderr, "but no target found\n" ); + else if( ! it->second.m_pTarget->m_bActive ) + fprintf( stderr, "but target is inactive\n" ); + else if( m_aDropEnterEvent.data.l[0] != None && (XLIB_Window)m_aDropEnterEvent.data.l[0] != aSource ) + fprintf( stderr, "but source 0x%lx is unknown (expected 0x%lx or 0)\n", aSource, m_aDropEnterEvent.data.l[0] ); + else + fprintf( stderr, "processing.\n" ); + } +#endif + + if( it != m_aDropTargets.end() && it->second.m_pTarget->m_bActive && + m_bDropWaitingForCompletion && m_aDropEnterEvent.data.l[0] ) + { + bHandled = true; + OSL_ENSURE( 0, "someone forgot to call dropComplete ?" ); + // some listener forgot to call dropComplete in the last operation + // let us end it now and accept the new enter event + aGuard.clear(); + dropComplete( sal_False, m_aCurrentDropWindow, m_nDropTime ); + aGuard.reset(); + } + + if( it != m_aDropTargets.end() && + it->second.m_pTarget->m_bActive && + ( m_aDropEnterEvent.data.l[0] == None || XLIB_Window(m_aDropEnterEvent.data.l[0]) == aSource ) + ) + { + if( rMessage.message_type == m_nXdndEnter ) + { + bHandled = true; + m_aDropEnterEvent = rMessage; + m_bDropEnterSent = false; + m_aCurrentDropWindow = aTarget; + m_nCurrentProtocolVersion = m_aDropEnterEvent.data.l[1] >> 24; +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "received XdndEnter on 0x%lx\n", aTarget ); +#endif + } + else if( + rMessage.message_type == m_nXdndPosition && + aSource == XLIB_Window(m_aDropEnterEvent.data.l[0]) + ) + { + bHandled = true; + m_nDropTime = m_nCurrentProtocolVersion > 0 ? rMessage.data.l[3] : CurrentTime; + if( ! m_bDropEnterSent ) + m_nDropTimestamp = m_nDropTime; + + XLIB_Window aChild; + XTranslateCoordinates( m_pDisplay, + it->second.m_aRootWindow, + it->first, + rMessage.data.l[2] >> 16, + rMessage.data.l[2] & 0xffff, + &m_nLastX, &m_nLastY, + &aChild ); + +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "received XdndPosition on 0x%lx (%d, %d)\n", aTarget, m_nLastX, m_nLastY ); +#endif + DropTargetDragEnterEvent aEvent; + aEvent.Source = static_cast< XDropTarget* >(it->second.m_pTarget); + aEvent.Context = new DropTargetDragContext( m_aCurrentDropWindow, m_nDropTimestamp, *this ); + aEvent.LocationX = m_nLastX; + aEvent.LocationY = m_nLastY; + aEvent.SourceActions = m_nSourceActions; + if( m_nCurrentProtocolVersion < 2 ) + aEvent.DropAction = DNDConstants::ACTION_COPY; + else if( Atom(rMessage.data.l[4]) == m_nXdndActionCopy ) + aEvent.DropAction = DNDConstants::ACTION_COPY; + else if( Atom(rMessage.data.l[4]) == m_nXdndActionMove ) + aEvent.DropAction = DNDConstants::ACTION_MOVE; + else if( Atom(rMessage.data.l[4]) == m_nXdndActionLink ) + aEvent.DropAction = DNDConstants::ACTION_LINK; + else if( Atom(rMessage.data.l[4]) == m_nXdndActionAsk ) + // currently no interface to implement ask + aEvent.DropAction = ~0; + else + aEvent.DropAction = DNDConstants::ACTION_NONE; + + m_nLastDropAction = aEvent.DropAction; + if( ! m_bDropEnterSent ) + { + m_bDropEnterSent = true; + aEvent.SupportedDataFlavors = m_xDropTransferable->getTransferDataFlavors(); + aGuard.clear(); + it->second->dragEnter( aEvent ); + } + else + { + aGuard.clear(); + it->second->dragOver( aEvent ); + } + } + else if( + rMessage.message_type == m_nXdndLeave && + aSource == XLIB_Window(m_aDropEnterEvent.data.l[0]) + ) + { + bHandled = true; +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "received XdndLeave on 0x%lx\n", aTarget ); +#endif + DropTargetEvent aEvent; + aEvent.Source = static_cast< XDropTarget* >(it->second.m_pTarget); + m_aDropEnterEvent.data.l[0] = None; + if( m_aCurrentDropWindow == aTarget ) + m_aCurrentDropWindow = None; + m_nCurrentProtocolVersion = nXdndProtocolRevision; + aGuard.clear(); + it->second->dragExit( aEvent ); + } + else if( + rMessage.message_type == m_nXdndDrop && + aSource == XLIB_Window(m_aDropEnterEvent.data.l[0]) + ) + { + bHandled = true; + m_nDropTime = m_nCurrentProtocolVersion > 0 ? rMessage.data.l[2] : CurrentTime; + +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "received XdndDrop on 0x%lx (%d, %d)\n", aTarget, m_nLastX, m_nLastY ); +#endif + if( m_bLastDropAccepted ) + { + DropTargetDropEvent aEvent; + aEvent.Source = static_cast< XDropTarget* >(it->second.m_pTarget); + aEvent.Context = new DropTargetDropContext( m_aCurrentDropWindow, m_nDropTimestamp, *this ); + aEvent.LocationX = m_nLastX; + aEvent.LocationY = m_nLastY; + aEvent.DropAction = m_nLastDropAction; + // there is nothing corresponding to source supported actions + // every source can do link, copy and move + aEvent.SourceActions= m_nLastDropAction; + aEvent.Transferable = m_xDropTransferable; + + m_bDropWaitingForCompletion = true; + aGuard.clear(); + it->second->drop( aEvent ); + } + else + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "XdndDrop canceled due to m_bLastDropAccepted = fale\n" ); +#endif + DropTargetEvent aEvent; + aEvent.Source = static_cast< XDropTarget* >(it->second.m_pTarget); + aGuard.clear(); + it->second->dragExit( aEvent ); + // reset the drop status, notify source + dropComplete( sal_False, m_aCurrentDropWindow, m_nDropTime ); + } + } + } + return bHandled; +} + +/* + * methods for XDropTargetDropContext + */ + +void SelectionManager::dropComplete( sal_Bool bSuccess, XLIB_Window aDropWindow, XLIB_Time ) +{ + ClearableMutexGuard aGuard(m_aMutex); + + if( aDropWindow == m_aCurrentDropWindow ) + { + if( m_xDragSourceListener.is() ) + { + DragSourceDropEvent dsde; + dsde.Source = static_cast< OWeakObject* >(this); + dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); + dsde.DragSource = static_cast< XDragSource* >(this); + dsde.DropAction = getUserDragAction(); + dsde.DropSuccess = bSuccess; + Reference< XDragSourceListener > xListener = m_xDragSourceListener; + m_xDragSourceListener.clear(); + + aGuard.clear(); + xListener->dragDropEnd( dsde ); + } + else if( m_aDropEnterEvent.data.l[0] && m_aCurrentDropWindow ) + { + XEvent aEvent; + aEvent.xclient.type = ClientMessage; + aEvent.xclient.display = m_pDisplay; + aEvent.xclient.window = m_aDropEnterEvent.data.l[0]; + aEvent.xclient.message_type = m_nXdndFinished; + aEvent.xclient.format = 32; + aEvent.xclient.data.l[0] = m_aCurrentDropWindow; + aEvent.xclient.data.l[1] = bSuccess ? 1 : 0; + aEvent.xclient.data.l[2] = 0; + aEvent.xclient.data.l[3] = 0; + aEvent.xclient.data.l[4] = 0; + if( bSuccess ) + { + if( m_nLastDropAction & DNDConstants::ACTION_MOVE ) + aEvent.xclient.data.l[2] = m_nXdndActionMove; + else if( m_nLastDropAction & DNDConstants::ACTION_COPY ) + aEvent.xclient.data.l[2] = m_nXdndActionCopy; + else if( m_nLastDropAction & DNDConstants::ACTION_LINK ) + aEvent.xclient.data.l[2] = m_nXdndActionLink; + } + +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "Sending XdndFinished to 0x%lx\n", + m_aDropEnterEvent.data.l[0] + ); +#endif + + XSendEvent( m_pDisplay, m_aDropEnterEvent.data.l[0], + False, NoEventMask, & aEvent ); + + m_aDropEnterEvent.data.l[0] = None; + m_aCurrentDropWindow = None; + m_nCurrentProtocolVersion = nXdndProtocolRevision; + } + m_bDropWaitingForCompletion = false; + } + else + OSL_ASSERT( "dropComplete from invalid DropTargetDropContext" ); +} + +/* + * methods for XDropTargetDragContext + */ + +// ------------------------------------------------------------------------ + +void SelectionManager::sendDragStatus( Atom nDropAction ) +{ + ClearableMutexGuard aGuard(m_aMutex); + + if( m_xDragSourceListener.is() ) + { + sal_Int8 nNewDragAction; + if( nDropAction == m_nXdndActionMove ) + nNewDragAction = DNDConstants::ACTION_MOVE; + else if( nDropAction == m_nXdndActionCopy ) + nNewDragAction = DNDConstants::ACTION_COPY; + else if( nDropAction == m_nXdndActionLink ) + nNewDragAction = DNDConstants::ACTION_LINK; + else + nNewDragAction = DNDConstants::ACTION_NONE; + nNewDragAction &= m_nSourceActions; + + if( nNewDragAction != m_nTargetAcceptAction ) + { + setCursor( getDefaultCursor( nNewDragAction ), m_aDropWindow, m_nDragTimestamp ); + m_nTargetAcceptAction = nNewDragAction; + } + + DragSourceDragEvent dsde; + dsde.Source = static_cast< OWeakObject* >(this); + dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); + dsde.DragSource = static_cast< XDragSource* >(this); + dsde.DropAction = m_nSourceActions; + dsde.UserAction = getUserDragAction(); + + Reference< XDragSourceListener > xListener( m_xDragSourceListener ); + // caution: do not change anything after this + aGuard.clear(); + if( xListener.is() ) + xListener->dragOver( dsde ); + } + else if( m_aDropEnterEvent.data.l[0] && m_aCurrentDropWindow ) + { + XEvent aEvent; + aEvent.xclient.type = ClientMessage; + aEvent.xclient.display = m_pDisplay; + aEvent.xclient.window = m_aDropEnterEvent.data.l[0]; + aEvent.xclient.message_type = m_nXdndStatus; + aEvent.xclient.format = 32; + aEvent.xclient.data.l[0] = m_aCurrentDropWindow; + aEvent.xclient.data.l[1] = 2; + if( nDropAction == m_nXdndActionMove || + nDropAction == m_nXdndActionLink || + nDropAction == m_nXdndActionCopy ) + aEvent.xclient.data.l[1] |= 1; + aEvent.xclient.data.l[2] = 0; + aEvent.xclient.data.l[3] = 0; + aEvent.xclient.data.l[4] = m_nCurrentProtocolVersion > 1 ? nDropAction : 0; + +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "Sending XdndStatus to 0x%lx with action %s\n", + m_aDropEnterEvent.data.l[0], + OUStringToOString( getString( nDropAction ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() + ); +#endif + + XSendEvent( m_pDisplay, m_aDropEnterEvent.data.l[0], + False, NoEventMask, & aEvent ); + XFlush( m_pDisplay ); + } +} + +// ------------------------------------------------------------------------ + +sal_Int8 SelectionManager::getUserDragAction() const +{ + return (m_nTargetAcceptAction != DNDConstants::ACTION_DEFAULT) ? m_nTargetAcceptAction : m_nUserDragAction; +} + +// ------------------------------------------------------------------------ + +bool SelectionManager::updateDragAction( int modifierState ) +{ + bool bRet = false; + + sal_Int8 nNewDropAction = DNDConstants::ACTION_MOVE; + if( ( modifierState & ShiftMask ) && ! ( modifierState & ControlMask ) ) + nNewDropAction = DNDConstants::ACTION_MOVE; + else if( ( modifierState & ControlMask ) && ! ( modifierState & ShiftMask ) ) + nNewDropAction = DNDConstants::ACTION_COPY; + else if( ( modifierState & ShiftMask ) && ( modifierState & ControlMask ) ) + nNewDropAction = DNDConstants::ACTION_LINK; + if( m_nCurrentProtocolVersion < 0 && m_aDropWindow != None ) + nNewDropAction = DNDConstants::ACTION_COPY; + nNewDropAction &= m_nSourceActions; + + if( ! ( modifierState & ( ControlMask | ShiftMask ) ) ) + { + if( ! nNewDropAction ) + { + // default to an action so the user does not have to press + // keys explicitly + if( m_nSourceActions & DNDConstants::ACTION_MOVE ) + nNewDropAction = DNDConstants::ACTION_MOVE; + else if( m_nSourceActions & DNDConstants::ACTION_COPY ) + nNewDropAction = DNDConstants::ACTION_COPY; + else if( m_nSourceActions & DNDConstants::ACTION_LINK ) + nNewDropAction = DNDConstants::ACTION_LINK; + } + nNewDropAction |= DNDConstants::ACTION_DEFAULT; + } + + if( nNewDropAction != m_nUserDragAction || m_nTargetAcceptAction != DNDConstants::ACTION_DEFAULT ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "updateDragAction: %x -> %x\n", (int)m_nUserDragAction, (int)nNewDropAction ); +#endif + bRet = true; + m_nUserDragAction = nNewDropAction; + + DragSourceDragEvent dsde; + dsde.Source = static_cast< OWeakObject* >(this); + dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); + dsde.DragSource = static_cast< XDragSource* >(this); + dsde.DropAction = m_nUserDragAction; + dsde.UserAction = m_nUserDragAction; + m_nTargetAcceptAction = DNDConstants::ACTION_DEFAULT; // invalidate last accept + m_xDragSourceListener->dropActionChanged( dsde ); + } + return bRet; +} + +// ------------------------------------------------------------------------ + +void SelectionManager::sendDropPosition( bool bForce, XLIB_Time eventTime ) +{ + ClearableMutexGuard aGuard(m_aMutex); + + if( m_bDropSent ) + return; + + ::std::hash_map< XLIB_Window, DropTargetEntry >::const_iterator it = + m_aDropTargets.find( m_aDropWindow ); + if( it != m_aDropTargets.end() ) + { + if( it->second.m_pTarget->m_bActive ) + { + int x, y; + XLIB_Window aChild; + XTranslateCoordinates( m_pDisplay, it->second.m_aRootWindow, m_aDropWindow, m_nLastDragX, m_nLastDragY, &x, &y, &aChild ); + DropTargetDragEvent dtde; + dtde.Source = static_cast< OWeakObject* >(it->second.m_pTarget ); + dtde.Context = new DropTargetDragContext( m_aCurrentDropWindow, m_nDropTimestamp, *this ); + dtde.LocationX = x; + dtde.LocationY = y; + dtde.DropAction = getUserDragAction(); + dtde.SourceActions = m_nSourceActions; + aGuard.clear(); + it->second->dragOver( dtde ); + } + } + else if( bForce || + + m_nLastDragX < m_nNoPosX || m_nLastDragX >= m_nNoPosX+m_nNoPosWidth || + m_nLastDragY < m_nNoPosY || m_nLastDragY >= m_nNoPosY+m_nNoPosHeight + ) + { + // send XdndPosition + XEvent aEvent; + aEvent.type = ClientMessage; + aEvent.xclient.display = m_pDisplay; + aEvent.xclient.format = 32; + aEvent.xclient.message_type = m_nXdndPosition; + aEvent.xclient.window = m_aDropWindow; + aEvent.xclient.data.l[0] = m_aWindow; + aEvent.xclient.data.l[1] = 0; + aEvent.xclient.data.l[2] = m_nLastDragX << 16 | (m_nLastDragY&0xffff); + aEvent.xclient.data.l[3] = eventTime; + + if( m_nUserDragAction & DNDConstants::ACTION_COPY ) + aEvent.xclient.data.l[4]=m_nXdndActionCopy; + else if( m_nUserDragAction & DNDConstants::ACTION_MOVE ) + aEvent.xclient.data.l[4]=m_nXdndActionMove; + else if( m_nUserDragAction & DNDConstants::ACTION_LINK ) + aEvent.xclient.data.l[4]=m_nXdndActionLink; + else + aEvent.xclient.data.l[4]=m_nXdndActionCopy; + XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent ); + m_nNoPosX = m_nNoPosY = m_nNoPosWidth = m_nNoPosHeight = 0; + } +} + +// ------------------------------------------------------------------------ + +bool SelectionManager::handleDragEvent( XEvent& rMessage ) +{ + if( ! m_xDragSourceListener.is() ) + return false; + + ResettableMutexGuard aGuard(m_aMutex); + + bool bHandled = false; + + // for shortcut + ::std::hash_map< XLIB_Window, DropTargetEntry >::const_iterator it = + m_aDropTargets.find( m_aDropWindow ); +#if OSL_DEBUG_LEVEL > 1 + switch( rMessage.type ) + { + case ClientMessage: + fprintf( stderr, "handleDragEvent: %s\n", OUStringToOString( getString( rMessage.xclient.message_type ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); + break; + case MotionNotify: +// fprintf( stderr, "handleDragEvent: MotionNotify\n" ); + break; + case EnterNotify: + fprintf( stderr, "handleDragEvent: EnterNotify\n" ); + break; + case LeaveNotify: + fprintf( stderr, "handleDragEvent: LeaveNotify\n" ); + break; + case ButtonPress: + fprintf( stderr, "handleDragEvent: ButtonPress %d (m_nDragButton = %d)\n", rMessage.xbutton.button, m_nDragButton ); + break; + case ButtonRelease: + fprintf( stderr, "handleDragEvent: ButtonRelease %d (m_nDragButton = %d)\n", rMessage.xbutton.button, m_nDragButton ); + break; + case XLIB_KeyPress: + fprintf( stderr, "handleDragEvent: KeyPress\n" ); + break; + case KeyRelease: + fprintf( stderr, "handleDragEvent: KeyRelease\n" ); + break; + default: + fprintf( stderr, "handleDragEvent: \n", rMessage.type ); + break; + } +#endif + + // handle drag related events + if( rMessage.type == ClientMessage ) + { + if( Atom(rMessage.xclient.message_type) == m_nXdndStatus && Atom(rMessage.xclient.data.l[0]) == m_aDropWindow ) + { + bHandled = true; + DragSourceDragEvent dsde; + dsde.Source = static_cast< OWeakObject* >(this); + dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); + dsde.DragSource = static_cast< XDragSource* >( this ); + dsde.UserAction = getUserDragAction(); + dsde.DropAction = DNDConstants::ACTION_NONE; + m_bDropSuccess = rMessage.xclient.data.l[1] & 1 ? true : false; +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "status drop action: accept = %s, %s\n", + m_bDropSuccess ? "true" : "false", + OUStringToOString( getString( rMessage.xclient.data.l[4] ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); +#endif + if( rMessage.xclient.data.l[1] & 1 ) + { + if( m_nCurrentProtocolVersion > 1 ) + { + if( Atom(rMessage.xclient.data.l[4]) == m_nXdndActionCopy ) + dsde.DropAction = DNDConstants::ACTION_COPY; + else if( Atom(rMessage.xclient.data.l[4]) == m_nXdndActionMove ) + dsde.DropAction = DNDConstants::ACTION_MOVE; + else if( Atom(rMessage.xclient.data.l[4]) == m_nXdndActionLink ) + dsde.DropAction = DNDConstants::ACTION_LINK; + } + else + dsde.DropAction = DNDConstants::ACTION_COPY; + } + m_nTargetAcceptAction = dsde.DropAction; + + if( ! ( rMessage.xclient.data.l[1] & 2 ) ) + { + m_nNoPosX = rMessage.xclient.data.l[2] >> 16; + m_nNoPosY = rMessage.xclient.data.l[2] & 0xffff; + m_nNoPosWidth = rMessage.xclient.data.l[3] >> 16; + m_nNoPosHeight = rMessage.xclient.data.l[3] & 0xffff; + } + else + m_nNoPosX = m_nNoPosY = m_nNoPosWidth = m_nNoPosHeight = 0; + + setCursor( getDefaultCursor( dsde.DropAction ), m_aDropWindow, m_nDragTimestamp ); + aGuard.clear(); + m_xDragSourceListener->dragOver( dsde ); + } + else if( Atom(rMessage.xclient.message_type) == m_nXdndFinished && m_aDropWindow == Atom(rMessage.xclient.data.l[0]) ) + { + bHandled = true; + // notify the listener + DragSourceDropEvent dsde; + dsde.Source = static_cast< OWeakObject* >(this); + dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); + dsde.DragSource = static_cast< XDragSource* >(this); + dsde.DropAction = m_nTargetAcceptAction; + dsde.DropSuccess = m_bDropSuccess; + Reference< XDragSourceListener > xListener( m_xDragSourceListener ); + m_xDragSourceListener.clear(); + aGuard.clear(); + xListener->dragDropEnd( dsde ); + } + } + else if( rMessage.type == MotionNotify || + rMessage.type == EnterNotify || rMessage.type == LeaveNotify + ) + { + bHandled = true; + bool bForce = false; + int root_x = rMessage.type == MotionNotify ? rMessage.xmotion.x_root : rMessage.xcrossing.x_root; + int root_y = rMessage.type == MotionNotify ? rMessage.xmotion.y_root : rMessage.xcrossing.y_root; + XLIB_Window root = rMessage.type == MotionNotify ? rMessage.xmotion.root : rMessage.xcrossing.root; + m_nDragTimestamp = rMessage.type == MotionNotify ? rMessage.xmotion.time : rMessage.xcrossing.time; + + aGuard.clear(); + if( rMessage.type == MotionNotify ) + { + bForce = updateDragAction( rMessage.xmotion.state ); + } + updateDragWindow( root_x, root_y, root ); + aGuard.reset(); + + if( m_nCurrentProtocolVersion >= 0 && m_aDropProxy != None ) + { + aGuard.clear(); + sendDropPosition( bForce, rMessage.type == MotionNotify ? rMessage.xmotion.time : rMessage.xcrossing.time ); + } + } + else if( rMessage.type == XLIB_KeyPress || rMessage.type == KeyRelease ) + { + bHandled = true; + KeySym aKey = XKeycodeToKeysym( m_pDisplay, rMessage.xkey.keycode, 0 ); + if( aKey == XK_Escape ) + { + // abort drag + if( it != m_aDropTargets.end() ) + { + DropTargetEvent dte; + dte.Source = static_cast< OWeakObject* >( it->second.m_pTarget ); + aGuard.clear(); + it->second.m_pTarget->dragExit( dte ); + } + else if( m_aDropProxy != None && m_nCurrentProtocolVersion >= 0 ) + { + // send XdndLeave + XEvent aEvent; + aEvent.type = ClientMessage; + aEvent.xclient.display = m_pDisplay; + aEvent.xclient.format = 32; + aEvent.xclient.message_type = m_nXdndLeave; + aEvent.xclient.window = m_aDropWindow; + aEvent.xclient.data.l[0] = m_aWindow; + memset( aEvent.xclient.data.l+1, 0, sizeof(long)*4); + m_aDropWindow = m_aDropProxy = None; + XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent ); + } + // notify the listener + DragSourceDropEvent dsde; + dsde.Source = static_cast< OWeakObject* >(this); + dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); + dsde.DragSource = static_cast< XDragSource* >(this); + dsde.DropAction = DNDConstants::ACTION_NONE; + dsde.DropSuccess = sal_False; + Reference< XDragSourceListener > xListener( m_xDragSourceListener ); + m_xDragSourceListener.clear(); + aGuard.clear(); + xListener->dragDropEnd( dsde ); + } + else + { + /* + * man page says: state is state immediate PRIOR to the + * event. It would seem that this is a somewhat arguable + * design decision. + */ + int nState = rMessage.xkey.state; + int nNewState = 0; + switch( aKey ) + { + case XK_Shift_R: + case XK_Shift_L: nNewState = ShiftMask;break; + case XK_Control_R: + case XK_Control_L: nNewState = ControlMask;break; + // just interested in shift and ctrl for dnd + } + if( rMessage.type == XLIB_KeyPress ) + nState |= nNewState; + else + nState &= ~nNewState; + aGuard.clear(); + if( updateDragAction( nState ) ) + sendDropPosition( true, rMessage.xkey.time ); + } + } + else if( + ( rMessage.type == ButtonPress || rMessage.type == ButtonRelease ) && + rMessage.xbutton.button == m_nDragButton ) + { + bool bCancel = true; + if( m_aDropWindow != None ) + { + if( it != m_aDropTargets.end() ) + { + if( it->second.m_pTarget->m_bActive && m_nUserDragAction != DNDConstants::ACTION_NONE && m_bLastDropAccepted ) + { + bHandled = true; + int x, y; + XLIB_Window aChild; + XTranslateCoordinates( m_pDisplay, rMessage.xbutton.root, m_aDropWindow, rMessage.xbutton.x_root, rMessage.xbutton.y_root, &x, &y, &aChild ); + DropTargetDropEvent dtde; + dtde.Source = static_cast< OWeakObject* >(it->second.m_pTarget ); + dtde.Context = new DropTargetDropContext( m_aCurrentDropWindow, m_nDropTimestamp, *this ); + dtde.LocationX = x; + dtde.LocationY = y; + dtde.DropAction = m_nUserDragAction; + dtde.SourceActions = m_nSourceActions; + dtde.Transferable = m_xDragSourceTransferable; + m_bDropSent = true; + m_nDropTimeout = time( NULL ); + m_bDropWaitingForCompletion = true; + aGuard.clear(); + it->second->drop( dtde ); + bCancel = false; + } + else bCancel = true; + } + else if( m_nCurrentProtocolVersion >= 0 ) + { + bHandled = true; + + XEvent aEvent; + aEvent.type = ClientMessage; + aEvent.xclient.display = m_pDisplay; + aEvent.xclient.format = 32; + aEvent.xclient.message_type = m_nXdndDrop; + aEvent.xclient.window = m_aDropWindow; + aEvent.xclient.data.l[0] = m_aWindow; + aEvent.xclient.data.l[1] = 0; + aEvent.xclient.data.l[2] = rMessage.xbutton.time; + aEvent.xclient.data.l[3] = 0; + aEvent.xclient.data.l[4] = 0; + + m_bDropSent = true; + m_nDropTimeout = time( NULL ); + XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent ); + bCancel = false; + } + else + { + // dropping on non XdndWindows: acquire ownership of + // PRIMARY and send a middle mouse button click down/up to + // target window + SelectionAdaptor* pAdaptor = getAdaptor( XA_PRIMARY ); + if( pAdaptor ) + { + bHandled = true; + + XLIB_Window aDummy; + XEvent aEvent; + aEvent.type = ButtonPress; + aEvent.xbutton.display = m_pDisplay; + aEvent.xbutton.window = m_aDropWindow; + aEvent.xbutton.root = rMessage.xbutton.root; + aEvent.xbutton.subwindow = m_aDropWindow; + aEvent.xbutton.time = rMessage.xbutton.time+1; + aEvent.xbutton.x_root = rMessage.xbutton.x_root; + aEvent.xbutton.y_root = rMessage.xbutton.y_root; + aEvent.xbutton.state = rMessage.xbutton.state; + aEvent.xbutton.button = Button2; + aEvent.xbutton.same_screen = True; + XTranslateCoordinates( m_pDisplay, + rMessage.xbutton.root, m_aDropWindow, + rMessage.xbutton.x_root, rMessage.xbutton.y_root, + &aEvent.xbutton.x, &aEvent.xbutton.y, + &aDummy ); + XSendEvent( m_pDisplay, m_aDropWindow, False, ButtonPressMask, &aEvent ); + aEvent.xbutton.type = ButtonRelease; + aEvent.xbutton.time++; + aEvent.xbutton.state |= Button2Mask; + XSendEvent( m_pDisplay, m_aDropWindow, False, ButtonReleaseMask, &aEvent ); + + m_bDropSent = true; + m_nDropTimeout = time( NULL ); + XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent ); + m_bWaitingForPrimaryConversion = true; + m_bDropSent = true; + m_nDropTimeout = time( NULL ); + // HACK :-) + aGuard.clear(); + static_cast< X11Clipboard* >( pAdaptor )->setContents( m_xDragSourceTransferable, Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >() ); + aGuard.reset(); + bCancel = false; + } + } + } + if( bCancel ) + { + // cancel drag + DragSourceDropEvent dsde; + dsde.Source = static_cast< OWeakObject* >(this); + dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); + dsde.DragSource = static_cast< XDragSource* >(this); + dsde.DropAction = DNDConstants::ACTION_NONE; + dsde.DropSuccess = sal_False; + Reference< XDragSourceListener > xListener( m_xDragSourceListener ); + m_xDragSourceListener.clear(); + aGuard.clear(); + xListener->dragDropEnd( dsde ); + bHandled = true; + } + } + return bHandled; +} + +// ------------------------------------------------------------------------ + +void SelectionManager::accept( sal_Int8 dragOperation, XLIB_Window aDropWindow, XLIB_Time ) +{ + if( aDropWindow == m_aCurrentDropWindow ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "accept: %x\n", dragOperation ); +#endif + Atom nAction = None; + dragOperation &= (DNDConstants::ACTION_MOVE | DNDConstants::ACTION_COPY | DNDConstants::ACTION_LINK); + if( dragOperation & DNDConstants::ACTION_MOVE ) + nAction = m_nXdndActionMove; + else if( dragOperation & DNDConstants::ACTION_COPY ) + nAction = m_nXdndActionCopy; + else if( dragOperation & DNDConstants::ACTION_LINK ) + nAction = m_nXdndActionLink; + m_bLastDropAccepted = true; + sendDragStatus( nAction ); + } +} + +// ------------------------------------------------------------------------ + +void SelectionManager::reject( XLIB_Window aDropWindow, XLIB_Time ) +{ + if( aDropWindow == m_aCurrentDropWindow ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "reject\n" ); +#endif + m_bLastDropAccepted = false; + sendDragStatus( None ); + if( m_bDropSent && m_xDragSourceListener.is() ) + { + DragSourceDropEvent dsde; + dsde.Source = static_cast< OWeakObject* >(this); + dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); + dsde.DragSource = static_cast< XDragSource* >(this); + dsde.DropAction = DNDConstants::ACTION_NONE; + dsde.DropSuccess = sal_False; + m_xDragSourceListener->dragDropEnd( dsde ); + m_xDragSourceListener.clear(); + } + } +} + +/* + * XDragSource + */ + +sal_Bool SelectionManager::isDragImageSupported() throw() +{ + return sal_False; +} + +// ------------------------------------------------------------------------ + +sal_Int32 SelectionManager::getDefaultCursor( sal_Int8 dragAction ) throw() +{ + XLIB_Cursor aCursor = m_aNoneCursor; + if( dragAction & DNDConstants::ACTION_MOVE ) + aCursor = m_aMoveCursor; + else if( dragAction & DNDConstants::ACTION_COPY ) + aCursor = m_aCopyCursor; + else if( dragAction & DNDConstants::ACTION_LINK ) + aCursor = m_aLinkCursor; + return aCursor; +} + +// ------------------------------------------------------------------------ + +int SelectionManager::getXdndVersion( XLIB_Window aWindow, XLIB_Window& rProxy ) +{ + Atom* pProperties = NULL; + int nProperties = 0; + Atom nType; + int nFormat; + unsigned long nItems, nBytes; + unsigned char* pBytes = NULL; + + int nVersion = -1; + rProxy = None; + + /* + * XListProperties is used here to avoid unnecessary XGetWindowProperty calls + * and therefore reducing latency penalty + */ + pProperties = XListProperties( m_pDisplay, aWindow, &nProperties ); + // first look for proxy + int i; + for( i = 0; i < nProperties; i++ ) + { + if( pProperties[i] == m_nXdndProxy ) + { + XGetWindowProperty( m_pDisplay, aWindow, m_nXdndProxy, 0, 1, False, XA_WINDOW, + &nType, &nFormat, &nItems, &nBytes, &pBytes ); + if( pBytes ) + { + if( nType == XA_WINDOW ) + rProxy = *(XLIB_Window*)pBytes; + XFree( pBytes ); + pBytes = NULL; + if( rProxy != None ) + { + // now check proxy wether it points to itself + XGetWindowProperty( m_pDisplay, rProxy, m_nXdndProxy, 0, 1, False, XA_WINDOW, + &nType, &nFormat, &nItems, &nBytes, &pBytes ); + if( pBytes ) + { + if( nType == XA_WINDOW && *(XLIB_Window*)pBytes != rProxy ) + rProxy = None; + XFree( pBytes ); + pBytes = NULL; + } + else + rProxy = None; + } + } + break; + } + } + XLIB_Window aAwareWindow = rProxy != None ? rProxy : aWindow; + + XGetWindowProperty( m_pDisplay, aAwareWindow, m_nXdndAware, 0, 1, False, XA_ATOM, + &nType, &nFormat, &nItems, &nBytes, &pBytes ); + if( pBytes ) + { + if( nType == XA_ATOM ) + nVersion = *(Atom*)pBytes; + XFree( pBytes ); + } + + nVersion = nVersion > nXdndProtocolRevision ? nXdndProtocolRevision : nVersion; + + return nVersion; +} + +// ------------------------------------------------------------------------ + +void SelectionManager::updateDragWindow( int nX, int nY, XLIB_Window aRoot ) +{ + ResettableMutexGuard aGuard( m_aMutex ); + + Reference< XDragSourceListener > xListener( m_xDragSourceListener ); + + m_nLastDragX = nX; + m_nLastDragY = nY; + + XLIB_Window aParent = aRoot; + XLIB_Window aChild; + XLIB_Window aNewProxy = None, aNewCurrentWindow = None; + int nNewProtocolVersion = -1; + int nWinX, nWinY; + + // find the first XdndAware window or check if root window is + // XdndAware or has XdndProxy + do + { + XTranslateCoordinates( m_pDisplay, aRoot, aParent, nX, nY, &nWinX, &nWinY, &aChild ); + if( aChild != None ) + { + if( aChild == m_aCurrentDropWindow && aChild != aRoot && m_nCurrentProtocolVersion >= 0 ) + { + aParent = aChild; + break; + } + nNewProtocolVersion = getXdndVersion( aChild, aNewProxy ); + aParent = aChild; + } + } while( aChild != None && nNewProtocolVersion < 0 ); + + aNewCurrentWindow = aParent; + if( aNewCurrentWindow == aRoot ) + { + // no children, try root drop + nNewProtocolVersion = getXdndVersion( aNewCurrentWindow, aNewProxy ); + if( nNewProtocolVersion < 3 ) + { + aNewCurrentWindow = aNewProxy = None; + nNewProtocolVersion = nXdndProtocolRevision; + } + } + + + DragSourceDragEvent dsde; + dsde.Source = static_cast< OWeakObject* >(this); + dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); + dsde.DragSource = static_cast< XDragSource* >(this); + dsde.DropAction = nNewProtocolVersion >= 0 ? m_nUserDragAction : DNDConstants::ACTION_COPY; + dsde.UserAction = nNewProtocolVersion >= 0 ? m_nUserDragAction : DNDConstants::ACTION_COPY; + + ::std::hash_map< XLIB_Window, DropTargetEntry >::const_iterator it; + if( aNewCurrentWindow != m_aDropWindow ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "drag left window 0x%lx (rev. %d), entered window 0x%lx (rev %d)\n", m_aDropWindow, m_nCurrentProtocolVersion, aNewCurrentWindow, nNewProtocolVersion ); +#endif + + if( m_aDropWindow != None ) + { + it = m_aDropTargets.find( m_aDropWindow ); + if( it != m_aDropTargets.end() ) + // shortcut for own drop targets + { + DropTargetEvent dte; + dte.Source = static_cast< OWeakObject* >( it->second.m_pTarget ); + aGuard.clear(); + it->second.m_pTarget->dragExit( dte ); + aGuard.reset(); + } + else + { + // send old drop target a XdndLeave + XEvent aEvent; + aEvent.type = ClientMessage; + aEvent.xclient.display = m_pDisplay; + aEvent.xclient.format = 32; + aEvent.xclient.message_type = m_nXdndLeave; + aEvent.xclient.window = m_aDropWindow; + aEvent.xclient.data.l[0] = m_aWindow; + aEvent.xclient.data.l[1] = 0; + XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent ); + } + if( xListener.is() ) + { + aGuard.clear(); + xListener->dragExit( dsde ); + aGuard.reset(); + } + } + + m_nCurrentProtocolVersion = nNewProtocolVersion; + m_aDropWindow = aNewCurrentWindow; + m_aDropProxy = aNewProxy != None ? aNewProxy : m_aDropWindow; + + it = m_aDropTargets.find( m_aDropWindow ); + if( it != m_aDropTargets.end() && ! it->second.m_pTarget->m_bActive ) + m_aDropProxy = None; + + if( m_aDropProxy != None && xListener.is() ) + { + aGuard.clear(); + xListener->dragEnter( dsde ); + aGuard.reset(); + } + // send XdndEnter + if( m_aDropProxy != None && m_nCurrentProtocolVersion >= 0 ) + { + it = m_aDropTargets.find( m_aDropWindow ); + if( it != m_aDropTargets.end() ) + { + XTranslateCoordinates( m_pDisplay, aRoot, m_aDropWindow, nX, nY, &nWinX, &nWinY, &aChild ); + DropTargetDragEnterEvent dtde; + dtde.Source = static_cast< OWeakObject* >( it->second.m_pTarget ); + dtde.Context = new DropTargetDragContext( m_aCurrentDropWindow, m_nDropTimestamp, *this ); + dtde.LocationX = nWinX; + dtde.LocationY = nWinY; + dtde.DropAction = m_nUserDragAction; + dtde.SourceActions = m_nSourceActions; + dtde.SupportedDataFlavors = m_xDragSourceTransferable->getTransferDataFlavors(); + aGuard.clear(); + it->second.m_pTarget->dragEnter( dtde ); + aGuard.reset(); + } + else + { + XEvent aEvent; + aEvent.type = ClientMessage; + aEvent.xclient.display = m_pDisplay; + aEvent.xclient.format = 32; + aEvent.xclient.message_type = m_nXdndEnter; + aEvent.xclient.window = m_aDropWindow; + aEvent.xclient.data.l[0] = m_aWindow; + aEvent.xclient.data.l[1] = m_nCurrentProtocolVersion << 24; + memset( aEvent.xclient.data.l + 2, 0, sizeof( long )*3 ); + // fill in data types + ::std::list< Atom > aConversions; + getNativeTypeList( m_aDragFlavors, aConversions, m_nXdndSelection ); + if( aConversions.size() > 3 ) + aEvent.xclient.data.l[1] |= 1; + ::std::list< Atom >::const_iterator type_it = aConversions.begin(); + for( int i = 0; type_it != aConversions.end() && i < 3; i++, ++type_it ) + aEvent.xclient.data.l[i+2] = *type_it; + XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent ); + } + } + m_nNoPosX = m_nNoPosY = m_nNoPosWidth = m_nNoPosHeight = 0; + } + else if( m_aDropProxy != None && xListener.is() ) + { + aGuard.clear(); + // drag over for XdndAware windows comes when receiving XdndStatus + xListener->dragOver( dsde ); + } +} + +// ------------------------------------------------------------------------ + +void SelectionManager::startDrag( + const DragGestureEvent& trigger, + sal_Int8 sourceActions, + sal_Int32, + sal_Int32, + const Reference< XTransferable >& transferable, + const Reference< XDragSourceListener >& listener + ) throw() +{ +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "startDrag( sourceActions = %x )\n", (int)sourceActions ); +#endif + + DragSourceDropEvent aDragFailedEvent; + aDragFailedEvent.Source = static_cast< OWeakObject* >(this); + aDragFailedEvent.DragSource = static_cast< XDragSource* >(this); + aDragFailedEvent.DragSourceContext = new DragSourceContext( None, CurrentTime, *this ); + aDragFailedEvent.DropAction = DNDConstants::ACTION_NONE; + aDragFailedEvent.DropSuccess = sal_False; + + if( m_aDragRunning.check() ) + { + if( listener.is() ) + listener->dragDropEnd( aDragFailedEvent ); + +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "*** ERROR *** second drag and drop started.\n" ); + if( m_xDragSourceListener.is() ) + fprintf( stderr, "*** ERROR *** drag source listener already set.\n" ); + else + fprintf( stderr, "*** ERROR *** drag thread already running.\n" ); +#endif + return; + } + + SalFrame* pCaptureFrame = NULL; + + { + ClearableMutexGuard aGuard(m_aMutex); + + // first get the current pointer position and the window that + // the pointer is located in. since said window should be one + // of our DropTargets at the time of executeDrag we can use + // them for a start + XLIB_Window aRoot, aParent, aChild; + int root_x, root_y, win_x, win_y; + unsigned int mask; + + ::std::hash_map< XLIB_Window, DropTargetEntry >::const_iterator it; + it = m_aDropTargets.begin(); + while( it != m_aDropTargets.end() ) + { + if( XQueryPointer( m_pDisplay, it->second.m_aRootWindow, + &aRoot, &aParent, + &root_x, &root_y, + &win_x, &win_y, + &mask ) ) + { + aParent = it->second.m_aRootWindow; + break; + } + ++it; + } + + // don't start DnD if there is none of our windows on the same screen as + // the pointer or if no mouse button is pressed + if( it == m_aDropTargets.end() || (mask & (Button1Mask|Button2Mask|Button3Mask)) == 0 ) + { + aGuard.clear(); + if( listener.is() ) + listener->dragDropEnd( aDragFailedEvent ); + return; + } + + // try to find which of our drop targets is the drag source + // if that drop target is deregistered we should stop executing + // the drag (actually this is a poor substitute for an "endDrag" + // method ). + m_aDragSourceWindow = None; + aParent = aRoot = it->second.m_aRootWindow; + do + { + XTranslateCoordinates( m_pDisplay, aRoot, aParent, root_x, root_y, &win_x, &win_y, &aChild ); + if( aChild != None && m_aDropTargets.find( aChild ) != m_aDropTargets.end() ) + { + m_aDragSourceWindow = aChild; +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "found drag source window 0x%lx\n", m_aDragSourceWindow ); +#endif + break; + } + aParent = aChild; + } while( aChild != None ); + + +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "try to grab pointer ... " ); +#endif + int nPointerGrabSuccess = + XGrabPointer( m_pDisplay, it->second.m_aRootWindow, True, + DRAG_EVENT_MASK, + GrabModeAsync, GrabModeAsync, + None, + None, + CurrentTime ); + /* if we could not grab the pointer here, there is a chance + that the pointer is grabbed by the other vcl display (the main loop) + so let's break that grab an reset it later + + remark: this whole code should really be molten into normal vcl so only + one display is used .... + */ + if( nPointerGrabSuccess != GrabSuccess ) + { + vos::IMutex& rSolarMutex( Application::GetSolarMutex() ); + if( rSolarMutex.tryToAcquire() ) + { + pCaptureFrame = GetX11SalData()->GetDisplay()->GetCaptureFrame(); + if( pCaptureFrame ) + { + GetX11SalData()->GetDisplay()->CaptureMouse( NULL ); + nPointerGrabSuccess = + XGrabPointer( m_pDisplay, it->second.m_aRootWindow, True, + DRAG_EVENT_MASK, + GrabModeAsync, GrabModeAsync, + None, + None, + CurrentTime ); + } + } + } +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "%d\n", nPointerGrabSuccess ); +#endif +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "try to grab keyboard ... " ); +#endif + int nKeyboardGrabSuccess = + XGrabKeyboard( m_pDisplay, it->second.m_aRootWindow, True, + GrabModeAsync, GrabModeAsync, CurrentTime ); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "%d\n", nKeyboardGrabSuccess ); +#endif + if( nPointerGrabSuccess != GrabSuccess || nKeyboardGrabSuccess != GrabSuccess ) + { + if( nPointerGrabSuccess == GrabSuccess ) + XUngrabPointer( m_pDisplay, CurrentTime ); + if( nKeyboardGrabSuccess == GrabSuccess ) + XUngrabKeyboard( m_pDisplay, CurrentTime ); + XFlush( m_pDisplay ); + aGuard.clear(); + if( listener.is() ) + listener->dragDropEnd( aDragFailedEvent ); + if( pCaptureFrame ) + { + vos::IMutex& rSolarMutex( Application::GetSolarMutex() ); + if( rSolarMutex.tryToAcquire() ) + GetX11SalData()->GetDisplay()->CaptureMouse( pCaptureFrame ); +#if OSL_DEBUG_LEVEL > 0 + else + OSL_ENSURE( 0, "failed to acquire SolarMutex to reset capture frame" ); +#endif + } + return; + } + + m_xDragSourceTransferable = transferable; + m_xDragSourceListener = listener; + m_aDragFlavors = transferable->getTransferDataFlavors(); + m_aCurrentCursor = None; + + requestOwnership( m_nXdndSelection ); + + ::std::list< Atom > aConversions; + ::std::list< Atom >::const_iterator type_it; + getNativeTypeList( m_aDragFlavors, aConversions, m_nXdndSelection ); + + int nTypes = aConversions.size(); + Atom* pTypes = (Atom*)alloca( sizeof(Atom)*nTypes ); + type_it = aConversions.begin(); + for( int n = 0; n < nTypes; n++, ++type_it ) + pTypes[n] = *type_it; + + XChangeProperty( m_pDisplay, m_aWindow, m_nXdndTypeList, XA_ATOM, 32, PropModeReplace, (unsigned char*)pTypes, nTypes ); + + m_nSourceActions = sourceActions | DNDConstants::ACTION_DEFAULT; + m_nUserDragAction = DNDConstants::ACTION_MOVE & m_nSourceActions; + if( ! m_nUserDragAction ) + m_nUserDragAction = DNDConstants::ACTION_COPY & m_nSourceActions; + if( ! m_nUserDragAction ) + m_nUserDragAction = DNDConstants::ACTION_LINK & m_nSourceActions; + m_nTargetAcceptAction = DNDConstants::ACTION_DEFAULT; + m_bDropSent = false; + m_bDropSuccess = false; + m_bWaitingForPrimaryConversion = false; + m_nDragButton = Button1; // default to left button + com::sun::star::awt::MouseEvent aEvent; + if( trigger.Event >>= aEvent ) + { + if( aEvent.Buttons & MouseButton::LEFT ) + m_nDragButton = Button1; + else if( aEvent.Buttons & MouseButton::RIGHT ) + m_nDragButton = Button3; + else if( aEvent.Buttons & MouseButton::MIDDLE ) + m_nDragButton = Button2; + } +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "m_nUserDragAction = %x\n", (int)m_nUserDragAction ); +#endif + updateDragWindow( root_x, root_y, aRoot ); + m_nUserDragAction = ~0; + updateDragAction( mask ); + } + + m_aDragRunning.set(); + m_aDragExecuteThread = osl_createSuspendedThread( call_SelectionManager_runDragExecute, this ); + if( m_aDragExecuteThread ) + osl_resumeThread( m_aDragExecuteThread ); + else + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "osl_createSuspendedThread failed for drag execute\n" ); +#endif + m_xDragSourceListener.clear(); + m_xDragSourceTransferable.clear(); + + m_bDropSent = false; + m_bDropSuccess = false; + m_bWaitingForPrimaryConversion = false; + m_aDropWindow = None; + m_aDropProxy = None; + m_nCurrentProtocolVersion = nXdndProtocolRevision; + m_nNoPosX = 0; + m_nNoPosY = 0; + m_nNoPosWidth = 0; + m_nNoPosHeight = 0; + m_aCurrentCursor = None; + + XUngrabPointer( m_pDisplay, CurrentTime ); + XUngrabKeyboard( m_pDisplay, CurrentTime ); + XFlush( m_pDisplay ); + + if( pCaptureFrame ) + { + vos::IMutex& rSolarMutex( Application::GetSolarMutex() ); + if( rSolarMutex.tryToAcquire() ) + GetX11SalData()->GetDisplay()->CaptureMouse( pCaptureFrame ); +#if OSL_DEBUG_LEVEL > 0 + else + OSL_ENSURE( 0, "failed to acquire SolarMutex to reset capture frame" ); +#endif + } + + m_aDragRunning.reset(); + + if( listener.is() ) + listener->dragDropEnd( aDragFailedEvent ); + } +} + +void SelectionManager::runDragExecute( void* pThis ) +{ + SelectionManager* This = (SelectionManager*)pThis; + This->dragDoDispatch(); +} + +void SelectionManager::dragDoDispatch() +{ + + // do drag + // m_xDragSourceListener will be cleared on finished drop +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "begin executeDrag dispatching\n" ); +#endif + TimeValue aTVal; + aTVal.Seconds = 0; + aTVal.Nanosec = 200000000; + oslThread aThread = m_aDragExecuteThread; + while( m_xDragSourceListener.is() && ( ! m_bDropSent || time(NULL)-m_nDropTimeout < 5 ) && osl_scheduleThread( aThread ) ) + { + // let the thread in the run method do the dispatching + // just look occasionally here whether drop timed out or is completed + osl_waitThread( &aTVal ); + } +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "end executeDrag dispatching\n" ); +#endif + { + ClearableMutexGuard aGuard(m_aMutex); + + Reference< XDragSourceListener > xListener( m_xDragSourceListener ); + Reference< XTransferable > xTransferable( m_xDragSourceTransferable ); + m_xDragSourceListener.clear(); + m_xDragSourceTransferable.clear(); + + DragSourceDropEvent dsde; + dsde.Source = static_cast< OWeakObject* >(this); + dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); + dsde.DragSource = static_cast< XDragSource* >(this); + dsde.DropAction = DNDConstants::ACTION_NONE; + dsde.DropSuccess = sal_False; + + // cleanup after drag + if( m_bWaitingForPrimaryConversion ) + getAdaptor( XA_PRIMARY )->clearTransferable(); + + m_bDropSent = false; + m_bDropSuccess = false; + m_bWaitingForPrimaryConversion = false; + m_aDropWindow = None; + m_aDropProxy = None; + m_nCurrentProtocolVersion = nXdndProtocolRevision; + m_nNoPosX = 0; + m_nNoPosY = 0; + m_nNoPosWidth = 0; + m_nNoPosHeight = 0; + m_aCurrentCursor = None; + + XUngrabPointer( m_pDisplay, CurrentTime ); + XUngrabKeyboard( m_pDisplay, CurrentTime ); + XFlush( m_pDisplay ); + + m_aDragExecuteThread = NULL; + m_aDragRunning.reset(); + + aGuard.clear(); + if( xListener.is() ) + { + xTransferable.clear(); + xListener->dragDropEnd( dsde ); + } + } + osl_destroyThread( aThread ); +} + +/* + * XDragSourceContext + */ + +sal_Int32 SelectionManager::getCurrentCursor() +{ + return m_aCurrentCursor; +} + +// ------------------------------------------------------------------------ + +void SelectionManager::setCursor( sal_Int32 cursor, XLIB_Window aDropWindow, XLIB_Time ) +{ + MutexGuard aGuard( m_aMutex ); + if( aDropWindow == m_aDropWindow && XLIB_Cursor(cursor) != m_aCurrentCursor ) + { + if( m_xDragSourceListener.is() && ! m_bDropSent ) + { + m_aCurrentCursor = cursor; + XChangeActivePointerGrab( m_pDisplay, DRAG_EVENT_MASK, cursor, CurrentTime ); + XFlush( m_pDisplay ); + } + } +} + +// ------------------------------------------------------------------------ + +void SelectionManager::setImage( sal_Int32, XLIB_Window, XLIB_Time ) +{ +} + +// ------------------------------------------------------------------------ + +void SelectionManager::transferablesFlavorsChanged() +{ + MutexGuard aGuard(m_aMutex); + + m_aDragFlavors = m_xDragSourceTransferable->getTransferDataFlavors(); + int i; + + std::list< Atom > aConversions; + std::list< Atom >::const_iterator type_it; + + getNativeTypeList( m_aDragFlavors, aConversions, m_nXdndSelection ); + + int nTypes = aConversions.size(); + Atom* pTypes = (Atom*)alloca( sizeof(Atom)*aConversions.size() ); + for( i = 0, type_it = aConversions.begin(); type_it != aConversions.end(); ++type_it, i++ ) + pTypes[i] = *type_it; + XChangeProperty( m_pDisplay, m_aWindow, m_nXdndTypeList, XA_ATOM, 32, PropModeReplace, (unsigned char*)pTypes, nTypes ); + + if( m_aCurrentDropWindow != None && m_nCurrentProtocolVersion >= 0 ) + { + // send synthetic leave and enter events + + XEvent aEvent; + + aEvent.type = ClientMessage; + aEvent.xclient.display = m_pDisplay; + aEvent.xclient.format = 32; + aEvent.xclient.window = m_aDropWindow; + aEvent.xclient.data.l[0] = m_aWindow; + + aEvent.xclient.message_type = m_nXdndLeave; + aEvent.xclient.data.l[1] = 0; + XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent ); + + aEvent.xclient.message_type = m_nXdndEnter; + aEvent.xclient.data.l[1] = m_nCurrentProtocolVersion << 24; + memset( aEvent.xclient.data.l + 2, 0, sizeof( long )*3 ); + // fill in data types + if( nTypes > 3 ) + aEvent.xclient.data.l[1] |= 1; + for( int j = 0; j < nTypes && j < 3; j++ ) + aEvent.xclient.data.l[j+2] = pTypes[j]; + + XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent ); + } +} + +/* + * dispatch loop + */ + +// ------------------------------------------------------------------------ + +bool SelectionManager::handleXEvent( XEvent& rEvent ) +{ + /* + * since we are XConnectionListener to a second X display + * to get client messages it is essential not to dispatch + * events twice that we get on both connections + * + * #95201# between dispatching ButtonPress and startDrag + * the user can already have released the mouse. The ButtonRelease + * will then be dispatched in VCLs queue and never turn up here. + * Which is not so good, since startDrag will XGrabPointer and + * XGrabKeyboard -> solid lock. + */ + if( rEvent.xany.display != m_pDisplay + && rEvent.type != ClientMessage + && rEvent.type != ButtonPress + && rEvent.type != ButtonRelease + ) + return false; + + bool bHandled = false; + switch (rEvent.type) + { + case SelectionClear: + { + ClearableMutexGuard aGuard(m_aMutex); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "SelectionClear for selection %s\n", + OUStringToOString( getString( rEvent.xselectionclear.selection ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() + ); +#endif + SelectionAdaptor* pAdaptor = getAdaptor( rEvent.xselectionclear.selection ); + std::hash_map< Atom, Selection* >::iterator it( m_aSelections.find( rEvent.xselectionclear.selection ) ); + if( it != m_aSelections.end() ) + it->second->m_bOwner = false; + aGuard.clear(); + if ( pAdaptor ) + pAdaptor->clearTransferable(); + } + break; + + case SelectionRequest: + bHandled = handleSelectionRequest( rEvent.xselectionrequest ); + break; + case PropertyNotify: + if( rEvent.xproperty.window == m_aWindow || + rEvent.xproperty.window == m_aCurrentDropWindow + ) + bHandled = handleReceivePropertyNotify( rEvent.xproperty ); + else + bHandled = handleSendPropertyNotify( rEvent.xproperty ); + break; + case SelectionNotify: + bHandled = handleSelectionNotify( rEvent.xselection ); + break; + case ClientMessage: + // messages from drag target + if( rEvent.xclient.message_type == m_nXdndStatus || + rEvent.xclient.message_type == m_nXdndFinished ) + bHandled = handleDragEvent( rEvent ); + // messages from drag source + else if( + rEvent.xclient.message_type == m_nXdndEnter || + rEvent.xclient.message_type == m_nXdndLeave || + rEvent.xclient.message_type == m_nXdndPosition || + rEvent.xclient.message_type == m_nXdndDrop + ) + bHandled = handleDropEvent( rEvent.xclient ); + break; + case EnterNotify: + case LeaveNotify: + case MotionNotify: + case ButtonPress: + case ButtonRelease: + case XLIB_KeyPress: + case KeyRelease: + bHandled = handleDragEvent( rEvent ); + break; + default: + ; + } + return bHandled; +} + +// ------------------------------------------------------------------------ + +void SelectionManager::dispatchEvent( int millisec ) +{ + pollfd aPollFD; + XEvent event; + + // query socket handle to poll on + aPollFD.fd = ConnectionNumber( m_pDisplay ); + aPollFD.events = POLLIN; + aPollFD.revents = 0; + + // wait for activity (outside the xlib) + if( poll( &aPollFD, 1, millisec ) > 0 ) + { + // now acquire the mutex to prevent other threads + // from using the same X connection + ResettableMutexGuard aGuard(m_aMutex); + + // prevent that another thread already ate the input + // this can happen if e.g. another thread does + // an X request getting a response. the response + // would be removed from the queue and we would end up + // with an empty socket here + if( poll( &aPollFD, 1, 0 ) > 0 ) + { + int nPending = 1; + while( nPending ) + { + nPending = XPending( m_pDisplay ); + if( nPending ) + { + XNextEvent( m_pDisplay, &event ); + aGuard.clear(); + handleXEvent( event ); + aGuard.reset(); + } + } + } + } +} + +// ------------------------------------------------------------------------ + +void SelectionManager::run( void* pThis ) +{ +#if OSL_DEBUG_LEVEL > 1 + fprintf(stderr, "SelectionManager::run\n" ); +#endif + // dispatch until the cows come home + + SelectionManager* This = (SelectionManager*)pThis; + + timeval aLast; + gettimeofday( &aLast, 0 ); + + Reference< XMultiServiceFactory > xFact( ::comphelper::getProcessServiceFactory() ); + if( xFact.is() ) + { + Reference< XDesktop > xDesktop( xFact->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ), UNO_QUERY ); + if( xDesktop.is() ) + xDesktop->addTerminateListener(This); + } + + while( osl_scheduleThread(This->m_aThread) ) + { + This->dispatchEvent( 1000 ); + + timeval aNow; + gettimeofday( &aNow, 0 ); + + if( (aNow.tv_sec - aLast.tv_sec) > 0 ) + { + ClearableMutexGuard aGuard(This->m_aMutex); + std::list< std::pair< SelectionAdaptor*, Reference< XInterface > > > aChangeList; + + for( std::hash_map< Atom, Selection* >::iterator it = This->m_aSelections.begin(); it != This->m_aSelections.end(); ++it ) + { + if( it->first != This->m_nXdndSelection && ! it->second->m_bOwner ) + { + XLIB_Window aOwner = XGetSelectionOwner( This->m_pDisplay, it->first ); + if( aOwner != it->second->m_aLastOwner ) + { + it->second->m_aLastOwner = aOwner; + std::pair< SelectionAdaptor*, Reference< XInterface > > + aKeep( it->second->m_pAdaptor, it->second->m_pAdaptor->getReference() ); + aChangeList.push_back( aKeep ); + } + } + } + aGuard.clear(); + while( aChangeList.begin() != aChangeList.end() ) + { + aChangeList.front().first->fireContentsChanged(); + aChangeList.pop_front(); + } + aLast = aNow; + } + } +#if OSL_DEBUG_LEVEL > 1 + fprintf(stderr, "SelectionManager::run end\n" ); +#endif +} + +void SelectionManager::shutdown() throw() +{ + ResettableMutexGuard aGuard(m_aMutex); + // stop dispatching + if( m_aThread ) + { + osl_terminateThread( m_aThread ); + /* + * Allow thread to finish before app exits to avoid pulling the carpet + * out from under it if pasting is occuring during shutdown + * + * a) allow it to have the Mutex and + * b) reschedule to allow it to complete callbacks to any + * Application::GetSolarMutex protected regions, etc. e.g. + * TransferableHelper::getTransferDataFlavors (via + * SelectionManager::handleSelectionRequest) which it might + * currently be trying to enter. + * + * Otherwise the thread may be left still waiting on a GlobalMutex + * when that gets destroyed, letting the thread blow up and die + * when enters the section in a now dead OOo instance. + */ + aGuard.clear(); + while (osl_isThreadRunning(m_aThread)) + { + vos::OGuard guard2(Application::GetSolarMutex()); + Application::Reschedule(); + } + osl_joinWithThread( m_aThread ); + osl_destroyThread( m_aThread ); + m_aThread = NULL; + aGuard.reset(); + } + m_xDisplayConnection->removeEventHandler( Any(), this ); + m_xDisplayConnection.clear(); +} + +// ------------------------------------------------------------------------ + +sal_Bool SelectionManager::handleEvent( const Any& event ) throw() +{ + Sequence< sal_Int8 > aSeq; + if( (event >>= aSeq) ) + { + XEvent* pEvent = (XEvent*)aSeq.getArray(); + XLIB_Time nTimestamp = CurrentTime; + if( pEvent->type == ButtonPress || pEvent->type == ButtonRelease ) + nTimestamp = pEvent->xbutton.time; + else if( pEvent->type == XLIB_KeyPress || pEvent->type == KeyRelease ) + nTimestamp = pEvent->xkey.time; + else if( pEvent->type == MotionNotify ) + nTimestamp = pEvent->xmotion.time; + else if( pEvent->type == PropertyNotify ) + nTimestamp = pEvent->xproperty.time; + + if( nTimestamp != CurrentTime ) + { + MutexGuard aGuard(m_aMutex); + + m_nSelectionTimestamp = nTimestamp; + } + + return sal_Bool( handleXEvent( *pEvent ) ); + } + else + { + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "SelectionManager got downing event\n" ); + #endif + shutdown(); + } + return sal_True; +} + +void SAL_CALL SelectionManager::disposing( const ::com::sun::star::lang::EventObject& ) + throw( ::com::sun::star::uno::RuntimeException ) +{ +} + +void SAL_CALL SelectionManager::queryTermination( const ::com::sun::star::lang::EventObject& ) + throw( ::com::sun::star::frame::TerminationVetoException, ::com::sun::star::uno::RuntimeException ) +{ +} + +/* + * To be safe, shutdown needs to be called before the ~SfxApplication is called, waiting until + * the downing event can be too late if paste are requested during shutdown and ~SfxApplication + * has been called before vcl is shutdown + */ +void SAL_CALL SelectionManager::notifyTermination( const ::com::sun::star::lang::EventObject& rEvent ) + throw( ::com::sun::star::uno::RuntimeException ) +{ + Reference< XDesktop > xDesktop( rEvent.Source, UNO_QUERY ); + if( xDesktop.is() == sal_True ) + xDesktop->removeTerminateListener( this ); + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "SelectionManager got app termination event\n" ); + #endif + shutdown(); +} + +// ------------------------------------------------------------------------ + +void SelectionManager::registerHandler( Atom selection, SelectionAdaptor& rAdaptor ) +{ + MutexGuard aGuard(m_aMutex); + + Selection* pNewSelection = new Selection(); + pNewSelection->m_pAdaptor = &rAdaptor; + pNewSelection->m_aAtom = selection; + m_aSelections[ selection ] = pNewSelection; +} + +// ------------------------------------------------------------------------ + +void SelectionManager::deregisterHandler( Atom selection ) +{ + MutexGuard aGuard(m_aMutex); + + ::std::hash_map< Atom, Selection* >::iterator it = + m_aSelections.find( selection ); + if( it != m_aSelections.end() ) + { + delete it->second->m_pPixmap; + delete it->second; + m_aSelections.erase( it ); + } +} + +// ------------------------------------------------------------------------ + +static bool bWasError = false; + +extern "C" +{ + int local_xerror_handler(Display* , XErrorEvent*) + { + bWasError = true; + return 0; + } + typedef int(*xerror_hdl_t)(Display*,XErrorEvent*); +} + +void SelectionManager::registerDropTarget( XLIB_Window aWindow, DropTarget* pTarget ) +{ + MutexGuard aGuard(m_aMutex); + + // sanity check + ::std::hash_map< XLIB_Window, DropTargetEntry >::const_iterator it = + m_aDropTargets.find( aWindow ); + if( it != m_aDropTargets.end() ) + OSL_ASSERT( "attempt to register window as drop target twice" ); + else if( aWindow && m_pDisplay ) + { + DropTargetEntry aEntry( pTarget ); + bWasError=false; + /* #i100000# ugly workaround: gtk sets its own XErrorHandler which is not suitable for us + unfortunately XErrorHandler is not per display, so this is just and ugly hack + Need to remove separate display and integrate clipboard/dnd into vcl's unx code ASAP + */ + xerror_hdl_t pOldHandler = XSetErrorHandler( local_xerror_handler ); + XSelectInput( m_pDisplay, aWindow, PropertyChangeMask ); + if( ! bWasError ) + { + // set XdndAware + XChangeProperty( m_pDisplay, aWindow, m_nXdndAware, XA_ATOM, 32, PropModeReplace, (unsigned char*)&nXdndProtocolRevision, 1 ); + if( ! bWasError ) + { + // get root window of window (in 99.999% of all cases this will be + // DefaultRootWindow( m_pDisplay ) + int x, y; + unsigned int w, h, bw, d; + XGetGeometry( m_pDisplay, aWindow, &aEntry.m_aRootWindow, + &x, &y, &w, &h, &bw, &d ); + } + } + XSetErrorHandler( pOldHandler ); + if(bWasError) + return; + m_aDropTargets[ aWindow ] = aEntry; + } + else + OSL_ASSERT( "attempt to register None as drop target" ); +} + +// ------------------------------------------------------------------------ + +void SelectionManager::deregisterDropTarget( XLIB_Window aWindow ) +{ + ClearableMutexGuard aGuard(m_aMutex); + + m_aDropTargets.erase( aWindow ); + if( aWindow == m_aDragSourceWindow && m_aDragRunning.check() ) + { + // abort drag + std::hash_map< XLIB_Window, DropTargetEntry >::const_iterator it = + m_aDropTargets.find( m_aDropWindow ); + if( it != m_aDropTargets.end() ) + { + DropTargetEvent dte; + dte.Source = static_cast< OWeakObject* >( it->second.m_pTarget ); + aGuard.clear(); + it->second.m_pTarget->dragExit( dte ); + } + else if( m_aDropProxy != None && m_nCurrentProtocolVersion >= 0 ) + { + // send XdndLeave + XEvent aEvent; + aEvent.type = ClientMessage; + aEvent.xclient.display = m_pDisplay; + aEvent.xclient.format = 32; + aEvent.xclient.message_type = m_nXdndLeave; + aEvent.xclient.window = m_aDropWindow; + aEvent.xclient.data.l[0] = m_aWindow; + memset( aEvent.xclient.data.l+1, 0, sizeof(long)*4); + m_aDropWindow = m_aDropProxy = None; + XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent ); + } + // notify the listener + DragSourceDropEvent dsde; + dsde.Source = static_cast< OWeakObject* >(this); + dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); + dsde.DragSource = static_cast< XDragSource* >(this); + dsde.DropAction = DNDConstants::ACTION_NONE; + dsde.DropSuccess = sal_False; + Reference< XDragSourceListener > xListener( m_xDragSourceListener ); + m_xDragSourceListener.clear(); + aGuard.clear(); + xListener->dragDropEnd( dsde ); + } +} + +/* + * SelectionAdaptor + */ + +Reference< XTransferable > SelectionManager::getTransferable() throw() +{ + return m_xDragSourceTransferable; +} + +// ------------------------------------------------------------------------ + +void SelectionManager::clearTransferable() throw() +{ + m_xDragSourceTransferable.clear(); +} + +// ------------------------------------------------------------------------ + +void SelectionManager::fireContentsChanged() throw() +{ +} + +// ------------------------------------------------------------------------ + +Reference< XInterface > SelectionManager::getReference() throw() +{ + return Reference< XInterface >( static_cast(this) ); +} + +// ------------------------------------------------------------------------ + +/* + * SelectionManagerHolder + */ + +SelectionManagerHolder::SelectionManagerHolder() : + ::cppu::WeakComponentImplHelper3< + XDragSource, + XInitialization, + XServiceInfo > (m_aMutex) +{ +} + +// ------------------------------------------------------------------------ + +SelectionManagerHolder::~SelectionManagerHolder() +{ +} + +// ------------------------------------------------------------------------ + +void SelectionManagerHolder::initialize( const Sequence< Any >& arguments ) throw( ::com::sun::star::uno::Exception ) +{ + OUString aDisplayName; + + if( arguments.getLength() > 0 ) + { + Reference< XDisplayConnection > xConn; + arguments.getConstArray()[0] >>= xConn; + if( xConn.is() ) + { + Any aIdentifier; + aIdentifier >>= aDisplayName; + } + } + + SelectionManager& rManager = SelectionManager::get( aDisplayName ); + rManager.initialize( arguments ); + m_xRealDragSource = static_cast< XDragSource* >(&rManager); +} + +/* + * XDragSource + */ + +sal_Bool SelectionManagerHolder::isDragImageSupported() throw() +{ + return m_xRealDragSource.is() ? m_xRealDragSource->isDragImageSupported() : sal_False; +} + +// ------------------------------------------------------------------------ + +sal_Int32 SelectionManagerHolder::getDefaultCursor( sal_Int8 dragAction ) throw() +{ + return m_xRealDragSource.is() ? m_xRealDragSource->getDefaultCursor( dragAction ) : 0; +} + +// ------------------------------------------------------------------------ + +void SelectionManagerHolder::startDrag( + const ::com::sun::star::datatransfer::dnd::DragGestureEvent& trigger, + sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image, + const Reference< ::com::sun::star::datatransfer::XTransferable >& transferable, + const Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener + ) throw() +{ + if( m_xRealDragSource.is() ) + m_xRealDragSource->startDrag( trigger, sourceActions, cursor, image, transferable, listener ); +} + +// ------------------------------------------------------------------------ + +/* + * XServiceInfo + */ + +// ------------------------------------------------------------------------ + +OUString SelectionManagerHolder::getImplementationName() throw() +{ + return OUString::createFromAscii(XDND_IMPLEMENTATION_NAME); +} + +// ------------------------------------------------------------------------ + +sal_Bool SelectionManagerHolder::supportsService( const OUString& ServiceName ) throw() +{ + Sequence < OUString > SupportedServicesNames = Xdnd_getSupportedServiceNames(); + + for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; ) + if (SupportedServicesNames[n].compareTo(ServiceName) == 0) + return sal_True; + + return sal_False; +} + +// ------------------------------------------------------------------------ + +Sequence< OUString > SelectionManagerHolder::getSupportedServiceNames() throw() +{ + return Xdnd_getSupportedServiceNames(); +} + + +// ------------------------------------------------------------------------ + diff --git a/vcl/unx/generic/dtrans/X11_selection.hxx b/vcl/unx/generic/dtrans/X11_selection.hxx new file mode 100644 index 000000000000..47baa1776d1a --- /dev/null +++ b/vcl/unx/generic/dtrans/X11_selection.hxx @@ -0,0 +1,531 @@ +/************************************************************************* + * + * 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 _DTRANS_X11_SELECTION_HXX_ +#define _DTRANS_X11_SELECTION_HXX_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef _OSL_CONDITION_HXX_ +#include +#endif + +#include +#include + +#include "tools/prex.h" +#include +#include "tools/postx.h" + +#define XDND_IMPLEMENTATION_NAME "com.sun.star.datatransfer.dnd.XdndSupport" +#define XDND_DROPTARGET_IMPLEMENTATION_NAME "com.sun.star.datatransfer.dnd.XdndDropTarget" + +using namespace ::com::sun::star::uno; + +namespace x11 { + + class PixmapHolder; // in bmp.hxx + +// ------------------------------------------------------------------------ + rtl_TextEncoding getTextPlainEncoding( const ::rtl::OUString& rMimeType ); + + class SelectionAdaptor + { + public: + virtual Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable() = 0; + virtual void clearTransferable() = 0; + virtual void fireContentsChanged() = 0; + virtual Reference< XInterface > getReference() = 0; + // returns a reference that will keep the SelectionAdaptor alive until the + // refernce is released + }; + + class DropTarget : + public ::cppu::WeakComponentImplHelper3< + ::com::sun::star::datatransfer::dnd::XDropTarget, + ::com::sun::star::lang::XInitialization, + ::com::sun::star::lang::XServiceInfo + > + { + public: + ::osl::Mutex m_aMutex; + bool m_bActive; + sal_Int8 m_nDefaultActions; + XLIB_Window m_aTargetWindow; + class SelectionManager* m_pSelectionManager; + Reference< ::com::sun::star::datatransfer::dnd::XDragSource > + m_xSelectionManager; + ::std::list< Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener > > + m_aListeners; + + DropTarget(); + virtual ~DropTarget(); + + // convenience functions that loop over listeners + void dragEnter( const ::com::sun::star::datatransfer::dnd::DropTargetDragEnterEvent& dtde ) throw(); + void dragExit( const ::com::sun::star::datatransfer::dnd::DropTargetEvent& dte ) throw(); + void dragOver( const ::com::sun::star::datatransfer::dnd::DropTargetDragEvent& dtde ) throw(); + void drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent& dtde ) throw(); + + // XInitialization + virtual void SAL_CALL initialize( const Sequence< Any >& args ) throw ( ::com::sun::star::uno::Exception ); + + // XDropTarget + virtual void SAL_CALL addDropTargetListener( const Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw(); + virtual void SAL_CALL removeDropTargetListener( const Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw(); + virtual sal_Bool SAL_CALL isActive() throw(); + virtual void SAL_CALL setActive( sal_Bool active ) throw(); + virtual sal_Int8 SAL_CALL getDefaultActions() throw(); + virtual void SAL_CALL setDefaultActions( sal_Int8 actions ) throw(); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw(); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > + SAL_CALL getSupportedServiceNames() throw(); + }; + + class SelectionManagerHolder : + public ::cppu::WeakComponentImplHelper3< + ::com::sun::star::datatransfer::dnd::XDragSource, + ::com::sun::star::lang::XInitialization, + ::com::sun::star::lang::XServiceInfo + > + { + ::osl::Mutex m_aMutex; + Reference< ::com::sun::star::datatransfer::dnd::XDragSource > + m_xRealDragSource; + public: + SelectionManagerHolder(); + virtual ~SelectionManagerHolder(); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw(); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > + SAL_CALL getSupportedServiceNames() throw(); + + // XInitialization + virtual void SAL_CALL initialize( const Sequence< Any >& arguments ) throw( ::com::sun::star::uno::Exception ); + + // XDragSource + virtual sal_Bool SAL_CALL isDragImageSupported() throw(); + virtual sal_Int32 SAL_CALL getDefaultCursor( sal_Int8 dragAction ) throw(); + virtual void SAL_CALL startDrag( + const ::com::sun::star::datatransfer::dnd::DragGestureEvent& trigger, + sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image, + const Reference< ::com::sun::star::datatransfer::XTransferable >& transferable, + const Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener + ) throw(); + + }; + + + class SelectionManager : + public ::cppu::WeakImplHelper4< + ::com::sun::star::datatransfer::dnd::XDragSource, + ::com::sun::star::lang::XInitialization, + ::com::sun::star::awt::XEventHandler, + ::com::sun::star::frame::XTerminateListener + >, + public SelectionAdaptor + { + static ::std::hash_map< ::rtl::OUString, SelectionManager*, ::rtl::OUStringHash >& getInstances(); + + // for INCR type selection transfer + // INCR protocol is used if the data cannot + // be transported at once but in parts + // IncrementalTransfer holds the bytes to be transmitted + // as well a the current position + // INCR triggers the delivery of the next part by deleting the + // property used to transfer the data + struct IncrementalTransfer + { + Sequence< sal_Int8 > m_aData; + int m_nBufferPos; + XLIB_Window m_aRequestor; + Atom m_aProperty; + Atom m_aTarget; + int m_nFormat; + int m_nTransferStartTime; + }; + int m_nIncrementalThreshold; + + // a struct to hold the data associated with a selection + struct Selection + { + enum State + { + Inactive, WaitingForResponse, WaitingForData, IncrementalTransfer + }; + + State m_eState; + SelectionAdaptor* m_pAdaptor; + Atom m_aAtom; + ::osl::Condition m_aDataArrived; + Sequence< sal_Int8 > m_aData; + Sequence< ::com::sun::star::datatransfer::DataFlavor > + m_aTypes; + std::vector< Atom > m_aNativeTypes; + // this is used for caching + // m_aTypes is invalid after 2 seconds + // m_aNativeTypes contains the corresponding original atom + Atom m_aRequestedType; + // m_aRequestedType is only valid while WaitingForResponse and WaitingFotData + int m_nLastTimestamp; + bool m_bHaveUTF16; + Atom m_aUTF8Type; + bool m_bHaveCompound; + bool m_bOwner; + XLIB_Window m_aLastOwner; + PixmapHolder* m_pPixmap; + // m_nOrigXLIB_Timestamp contains the XLIB_Timestamp at which the seclection + // was acquired; needed for XLIB_TimeSTAMP target + XLIB_Time m_nOrigTimestamp; + + Selection() : m_eState( Inactive ), + m_pAdaptor( NULL ), + m_aAtom( None ), + m_aRequestedType( None ), + m_nLastTimestamp( 0 ), + m_bHaveUTF16( false ), + m_aUTF8Type( None ), + m_bHaveCompound( false ), + m_bOwner( false ), + m_aLastOwner( None ), + m_pPixmap( NULL ), + m_nOrigTimestamp( CurrentTime ) + {} + }; + + // a struct to hold data associated with a XDropTarget + struct DropTargetEntry + { + DropTarget* m_pTarget; + XLIB_Window m_aRootWindow; + + DropTargetEntry() : m_pTarget( NULL ), m_aRootWindow( None ) {} + DropTargetEntry( DropTarget* pTarget ) : + m_pTarget( pTarget ), + m_aRootWindow( None ) + {} + DropTargetEntry( const DropTargetEntry& rEntry ) : + m_pTarget( rEntry.m_pTarget ), + m_aRootWindow( rEntry.m_aRootWindow ) + {} + ~DropTargetEntry() {} + + DropTarget* operator->() const { return m_pTarget; } + DropTargetEntry& operator=(const DropTargetEntry& rEntry) + { m_pTarget = rEntry.m_pTarget; m_aRootWindow = rEntry.m_aRootWindow; return *this; } + }; + + // internal data + Display* m_pDisplay; + oslThread m_aThread; + oslThread m_aDragExecuteThread; + ::osl::Condition m_aDragRunning; + XLIB_Window m_aWindow; + Reference< ::com::sun::star::awt::XDisplayConnection > + m_xDisplayConnection; + Reference< com::sun::star::script::XInvocation > + m_xBitmapConverter; + sal_Int32 m_nSelectionTimeout; + XLIB_Time m_nSelectionTimestamp; + + + // members used for Xdnd + + // drop only + + // contains the XdndEnterEvent of a drop action running + // with one of our targets. The data.l[0] member + // (conatining the drag source XLIB_Window) is set + // to None while that is not the case + XClientMessageEvent m_aDropEnterEvent; + // set to false on XdndEnter + // set to true on first XdndPosition or XdndLeave + bool m_bDropEnterSent; + XLIB_Window m_aCurrentDropWindow; + // XLIB_Time code of XdndDrop + XLIB_Time m_nDropTime; + sal_Int8 m_nLastDropAction; + // XTransferable for Xdnd with foreign drag source + Reference< ::com::sun::star::datatransfer::XTransferable > + m_xDropTransferable; + int m_nLastX, m_nLastY; + XLIB_Time m_nDropTimestamp; + // set to true when calling drop() + // if another XdndEnter is received this shows that + // someone forgot to call dropComplete - we should reset + // and react to the new drop + bool m_bDropWaitingForCompletion; + + // drag only + + // None if no Dnd action is running with us as source + XLIB_Window m_aDropWindow; + // either m_aDropXLIB_Window or its XdndProxy + XLIB_Window m_aDropProxy; + XLIB_Window m_aDragSourceWindow; + // XTransferable for Xdnd when we are drag source + Reference< ::com::sun::star::datatransfer::XTransferable > + m_xDragSourceTransferable; + Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener > + m_xDragSourceListener; + // root coordinates + int m_nLastDragX, m_nLastDragY; + Sequence< ::com::sun::star::datatransfer::DataFlavor > + m_aDragFlavors; + // the rectangle the pointer must leave until a new XdndPosition should + // be sent. empty unless the drop target told to fill + int m_nNoPosX, m_nNoPosY, m_nNoPosWidth, m_nNoPosHeight; + unsigned int m_nDragButton; + sal_Int8 m_nUserDragAction; + sal_Int8 m_nTargetAcceptAction; + sal_Int8 m_nSourceActions; + bool m_bLastDropAccepted; + bool m_bDropSuccess; + bool m_bDropSent; + time_t m_nDropTimeout; + bool m_bWaitingForPrimaryConversion; + XLIB_Time m_nDragTimestamp; + + // drag cursors + XLIB_Cursor m_aMoveCursor; + XLIB_Cursor m_aCopyCursor; + XLIB_Cursor m_aLinkCursor; + XLIB_Cursor m_aNoneCursor; + XLIB_Cursor m_aCurrentCursor; + + + // drag and drop + + int m_nCurrentProtocolVersion; + ::std::hash_map< XLIB_Window, DropTargetEntry > + m_aDropTargets; + + + // some special atoms that are needed often + Atom m_nCLIPBOARDAtom; + Atom m_nTARGETSAtom; + Atom m_nTIMESTAMPAtom; + Atom m_nTEXTAtom; + Atom m_nINCRAtom; + Atom m_nCOMPOUNDAtom; + Atom m_nMULTIPLEAtom; + Atom m_nUTF16Atom; + Atom m_nImageBmpAtom; + Atom m_nXdndAware; + Atom m_nXdndEnter; + Atom m_nXdndLeave; + Atom m_nXdndPosition; + Atom m_nXdndStatus; + Atom m_nXdndDrop; + Atom m_nXdndFinished; + Atom m_nXdndSelection; + Atom m_nXdndTypeList; + Atom m_nXdndProxy; + Atom m_nXdndActionCopy; + Atom m_nXdndActionMove; + Atom m_nXdndActionLink; + Atom m_nXdndActionAsk; + Atom m_nXdndActionPrivate; + + // caching for atoms + ::std::hash_map< Atom, ::rtl::OUString > + m_aAtomToString; + ::std::hash_map< ::rtl::OUString, Atom, ::rtl::OUStringHash > + m_aStringToAtom; + + // the registered selections + ::std::hash_map< Atom, Selection* > + m_aSelections; + // IncrementalTransfers in progress + std::hash_map< XLIB_Window, std::hash_map< Atom, IncrementalTransfer > > + m_aIncrementals; + + // do not use X11 multithreading capabilities + // since this leads to deadlocks in different Xlib implentations + // (XFree as well as Xsun) use an own mutex instead + ::osl::Mutex m_aMutex; + + SelectionManager(); + ~SelectionManager(); + + SelectionAdaptor* getAdaptor( Atom selection ); + PixmapHolder* getPixmapHolder( Atom selection ); + + // handle various events + bool handleSelectionRequest( XSelectionRequestEvent& rRequest ); + bool handleSendPropertyNotify( XPropertyEvent& rNotify ); + bool handleReceivePropertyNotify( XPropertyEvent& rNotify ); + bool handleSelectionNotify( XSelectionEvent& rNotify ); + bool handleDragEvent( XEvent& rMessage ); + bool handleDropEvent( XClientMessageEvent& rMessage ); + + // dnd helpers + void sendDragStatus( Atom nDropAction ); + void sendDropPosition( bool bForce, XLIB_Time eventXLIB_Time ); + bool updateDragAction( int modifierState ); + int getXdndVersion( XLIB_Window aXLIB_Window, XLIB_Window& rProxy ); + XLIB_Cursor createCursor( const char* pPointerData, const char* pMaskData, int width, int height, int hotX, int hotY ); + // coordinates on root XLIB_Window + void updateDragWindow( int nX, int nY, XLIB_Window aRoot ); + + bool getPasteData( Atom selection, Atom type, Sequence< sal_Int8 >& rData ); + // returns true if conversion was successful + bool convertData( const Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable, + Atom nType, + Atom nSelection, + int & rFormat, + Sequence< sal_Int8 >& rData ); + bool sendData( SelectionAdaptor* pAdaptor, XLIB_Window requestor, Atom target, Atom property, Atom selection ); + + // thread dispatch loop + public: + // public for extern "C" stub + static void run( void* ); + private: + void dispatchEvent( int millisec ); + // drag thread dispatch + public: + // public for extern "C" stub + static void runDragExecute( void* ); + private: + void dragDoDispatch(); + bool handleXEvent( XEvent& rEvent ); + + // compound text conversion + ::rtl::OString convertToCompound( const ::rtl::OUString& rText ); + ::rtl::OUString convertFromCompound( const char* pText, int nLen = -1 ); + + sal_Int8 getUserDragAction() const; + sal_Int32 getSelectionTimeout(); + public: + static SelectionManager& get( const ::rtl::OUString& rDisplayName = ::rtl::OUString() ); + + Display * getDisplay() { return m_pDisplay; }; + XLIB_Window getWindow() { return m_aWindow; }; + + + void registerHandler( Atom selection, SelectionAdaptor& rAdaptor ); + void deregisterHandler( Atom selection ); + bool requestOwnership( Atom selection ); + + // allow for synchronization over one mutex for XClipboard + osl::Mutex& getMutex() { return m_aMutex; } + + + Atom getAtom( const ::rtl::OUString& rString ); + const ::rtl::OUString& getString( Atom nAtom ); + + // type conversion + // note: convertTypeToNative does NOT clear the list, so you can append + // multiple types to the same list + void convertTypeToNative( const ::rtl::OUString& rType, Atom selection, int& rFormat, ::std::list< Atom >& rConversions, bool bPushFront = false ); + ::rtl::OUString convertTypeFromNative( Atom nType, Atom selection, int& rFormat ); + void getNativeTypeList( const Sequence< com::sun::star::datatransfer::DataFlavor >& rTypes, std::list< Atom >& rOutTypeList, Atom targetselection ); + + // methods for transferable + bool getPasteDataTypes( Atom selection, Sequence< ::com::sun::star::datatransfer::DataFlavor >& rTypes ); + bool getPasteData( Atom selection, const ::rtl::OUString& rType, Sequence< sal_Int8 >& rData ); + + // for XDropTarget to register/deregister itself + void registerDropTarget( XLIB_Window aXLIB_Window, DropTarget* pTarget ); + void deregisterDropTarget( XLIB_Window aXLIB_Window ); + + // for XDropTarget{Drag|Drop}Context + void accept( sal_Int8 dragOperation, XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); + void reject( XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); + void dropComplete( sal_Bool success, XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); + + // for XDragSourceContext + sal_Int32 getCurrentCursor(); + void setCursor( sal_Int32 cursor, XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); + void setImage( sal_Int32 image, XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); + void transferablesFlavorsChanged(); + + void shutdown() throw(); + + // XInitialization + virtual void SAL_CALL initialize( const Sequence< Any >& arguments ) throw( ::com::sun::star::uno::Exception ); + + // XEventHandler + virtual sal_Bool SAL_CALL handleEvent( const Any& event ) throw(); + + // XDragSource + virtual sal_Bool SAL_CALL isDragImageSupported() throw(); + virtual sal_Int32 SAL_CALL getDefaultCursor( sal_Int8 dragAction ) throw(); + virtual void SAL_CALL startDrag( + const ::com::sun::star::datatransfer::dnd::DragGestureEvent& trigger, + sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image, + const Reference< ::com::sun::star::datatransfer::XTransferable >& transferable, + const Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener + ) throw(); + + // SelectionAdaptor for XdndSelection Drag (we are drag source) + virtual Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable() throw(); + virtual void clearTransferable() throw(); + virtual void fireContentsChanged() throw(); + virtual Reference< XInterface > getReference() throw(); + + // XEventListener + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw( ::com::sun::star::uno::RuntimeException ); + + // XTerminateListener + virtual void SAL_CALL queryTermination( const ::com::sun::star::lang::EventObject& aEvent ) + throw( ::com::sun::star::frame::TerminationVetoException, ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL notifyTermination( const ::com::sun::star::lang::EventObject& aEvent ) + throw( ::com::sun::star::uno::RuntimeException ); + }; + +// ------------------------------------------------------------------------ + + ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL Xdnd_getSupportedServiceNames(); + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Xdnd_createInstance( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory); + + ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL Xdnd_dropTarget_getSupportedServiceNames(); + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Xdnd_dropTarget_createInstance( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory); + +// ------------------------------------------------------------------------ + +} + +#endif diff --git a/vcl/unx/generic/dtrans/X11_service.cxx b/vcl/unx/generic/dtrans/X11_service.cxx new file mode 100644 index 000000000000..fcd99535eb61 --- /dev/null +++ b/vcl/unx/generic/dtrans/X11_service.cxx @@ -0,0 +1,135 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include "unx/salinst.h" + +#include +#include +#include +#include +#include // declaration of generic uno interface +#include // mapping stuff +#include +#include + +using namespace rtl; +using namespace cppu; +using namespace com::sun::star::lang; +using namespace com::sun::star::datatransfer::clipboard; +using namespace com::sun::star::awt; +using namespace x11; + +Sequence< OUString > SAL_CALL x11::X11Clipboard_getSupportedServiceNames() +{ + Sequence< OUString > aRet(1); + aRet[0] = OUString::createFromAscii("com.sun.star.datatransfer.clipboard.SystemClipboard"); + return aRet; +} + +Sequence< OUString > SAL_CALL x11::Xdnd_getSupportedServiceNames() +{ + Sequence< OUString > aRet(1); + aRet[0] = OUString::createFromAscii("com.sun.star.datatransfer.dnd.X11DragSource"); + return aRet; +} + +Sequence< OUString > SAL_CALL x11::Xdnd_dropTarget_getSupportedServiceNames() +{ + Sequence< OUString > aRet(1); + aRet[0] = OUString::createFromAscii("com.sun.star.datatransfer.dnd.X11DropTarget"); + return aRet; +} + +// ------------------------------------------------------------------------ + +Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >& arguments ) +{ + static std::hash_map< OUString, ::std::hash_map< Atom, Reference< XClipboard > >, ::rtl::OUStringHash > m_aInstances; + + OUString aDisplayName; + Atom nSelection; + + // extract display name from connection argument. An exception is thrown + // by SelectionManager.initialize() if no display connection is given. + if( arguments.getLength() > 0 ) + { + Reference< XDisplayConnection > xConn; + arguments.getConstArray()[0] >>= xConn; + + if( xConn.is() ) + { + Any aIdentifier = xConn->getIdentifier(); + aIdentifier >>= aDisplayName; + } + } + + SelectionManager& rManager = SelectionManager::get( aDisplayName ); + rManager.initialize( arguments ); + + // check if any other selection than clipboard selection is specified + if( arguments.getLength() > 1 ) + { + OUString aSelectionName; + + arguments.getConstArray()[1] >>= aSelectionName; + nSelection = rManager.getAtom( aSelectionName ); + } + else + { + // default atom is clipboard selection + nSelection = rManager.getAtom( OUString::createFromAscii( "CLIPBOARD" ) ); + } + + ::std::hash_map< Atom, Reference< XClipboard > >& rMap( m_aInstances[ aDisplayName ] ); + ::std::hash_map< Atom, Reference< XClipboard > >::iterator it = rMap.find( nSelection ); + if( it != rMap.end() ) + return it->second; + + X11Clipboard* pClipboard = new X11Clipboard( rManager, nSelection ); + rMap[ nSelection ] = pClipboard; + + return static_cast(pClipboard); +} + +// ------------------------------------------------------------------------ + +Reference< XInterface > X11SalInstance::CreateDragSource() +{ + return Reference < XInterface >( ( OWeakObject * ) new SelectionManagerHolder() ); +} + +// ------------------------------------------------------------------------ + +Reference< XInterface > X11SalInstance::CreateDropTarget() +{ + return Reference < XInterface >( ( OWeakObject * ) new DropTarget() ); +} + + diff --git a/vcl/unx/generic/dtrans/X11_transferable.cxx b/vcl/unx/generic/dtrans/X11_transferable.cxx new file mode 100644 index 000000000000..16518f0b2864 --- /dev/null +++ b/vcl/unx/generic/dtrans/X11_transferable.cxx @@ -0,0 +1,134 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#if OSL_DEBUG_LEVEL > 1 +#include +#endif + +#include +#include +#include + +using namespace com::sun::star::datatransfer; +using namespace com::sun::star::lang; +using namespace com::sun::star::io; +using namespace com::sun::star::uno; +using namespace cppu; +using namespace osl; +using namespace rtl; + + +using namespace x11; + + +X11Transferable::X11Transferable( + SelectionManager& rManager, + const Reference< XInterface >& xCreator, + Atom selection + ) : + m_rManager( rManager ), + m_xCreator( xCreator ), + m_aSelection( selection ) +{ +} + +//================================================================================================== + +X11Transferable::~X11Transferable() +{ +} + +//================================================================================================== + +Any SAL_CALL X11Transferable::getTransferData( const DataFlavor& rFlavor ) + throw(UnsupportedFlavorException, IOException, RuntimeException) +{ + Any aRet; + Sequence< sal_Int8 > aData; + bool bSuccess = m_rManager.getPasteData( m_aSelection ? m_aSelection : XA_PRIMARY, rFlavor.MimeType, aData ); + if( ! bSuccess && m_aSelection == 0 ) + bSuccess = m_rManager.getPasteData( m_rManager.getAtom( OUString::createFromAscii( "CLIPBOARD" ) ), rFlavor.MimeType, aData ); + + if( ! bSuccess ) + { + throw UnsupportedFlavorException( rFlavor.MimeType, static_cast < XTransferable * > ( this ) ); + } + if( rFlavor.MimeType.equalsIgnoreAsciiCase( OUString::createFromAscii( "text/plain;charset=utf-16" ) ) ) + { + int nLen = aData.getLength()/2; + if( ((sal_Unicode*)aData.getConstArray())[nLen-1] == 0 ) + nLen--; + OUString aString( (sal_Unicode*)aData.getConstArray(), nLen ); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "X11Transferable::getTransferData( \"%s\" )\n -> \"%s\"\n", + OUStringToOString( rFlavor.MimeType, RTL_TEXTENCODING_ISO_8859_1 ).getStr(), + OUStringToOString( aString, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); +#endif + aRet <<= aString; + } + else + aRet <<= aData; + return aRet; +} + +//================================================================================================== + +Sequence< DataFlavor > SAL_CALL X11Transferable::getTransferDataFlavors() + throw(RuntimeException) +{ + Sequence< DataFlavor > aFlavorList; + bool bSuccess = m_rManager.getPasteDataTypes( m_aSelection ? m_aSelection : XA_PRIMARY, aFlavorList ); + if( ! bSuccess && m_aSelection == 0 ) + bSuccess = m_rManager.getPasteDataTypes( m_rManager.getAtom( OUString::createFromAscii( "CLIPBOARD" ) ), aFlavorList ); + + return aFlavorList; +} + +//================================================================================================== + +sal_Bool SAL_CALL X11Transferable::isDataFlavorSupported( const DataFlavor& aFlavor ) + throw(RuntimeException) +{ + if( aFlavor.DataType != getCppuType( (Sequence< sal_Int8 >*)0 ) ) + { + if( ! aFlavor.MimeType.equalsIgnoreAsciiCase( OUString::createFromAscii( "text/plain;charset=utf-16" ) ) && + aFlavor.DataType == getCppuType( (OUString*)0 ) ) + return false; + } + + Sequence< DataFlavor > aFlavors( getTransferDataFlavors() ); + for( int i = 0; i < aFlavors.getLength(); i++ ) + if( aFlavor.MimeType.equalsIgnoreAsciiCase( aFlavors.getConstArray()[i].MimeType ) && + aFlavor.DataType == aFlavors.getConstArray()[i].DataType ) + return sal_True; + + return sal_False; +} + diff --git a/vcl/unx/generic/dtrans/X11_transferable.hxx b/vcl/unx/generic/dtrans/X11_transferable.hxx new file mode 100644 index 000000000000..57f0d6682cab --- /dev/null +++ b/vcl/unx/generic/dtrans/X11_transferable.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * 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 _DTRANS_X11_TRANSFERABLE_HXX_ +#define _DTRANS_X11_TRANSFERABLE_HXX_ + +#include +#include + +#ifndef _COM_SUN_STAR_LANG_XEVENTLISTENER_HDL_ +#include +#endif +#include + +namespace x11 { + + class X11Transferable : public ::cppu::WeakImplHelper1 < + ::com::sun::star::datatransfer::XTransferable > + { + ::osl::Mutex m_aMutex; + + SelectionManager& m_rManager; + Reference< XInterface > m_xCreator; + Atom m_aSelection; + public: + X11Transferable( SelectionManager& rManager, const Reference< XInterface >& xCreator, Atom selection = None ); + virtual ~X11Transferable(); + + /* + * XTransferable + */ + + virtual ::com::sun::star::uno::Any SAL_CALL getTransferData( const ::com::sun::star::datatransfer::DataFlavor& aFlavor ) + throw(::com::sun::star::datatransfer::UnsupportedFlavorException, + ::com::sun::star::io::IOException, + ::com::sun::star::uno::RuntimeException + ); + + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors( ) + throw(::com::sun::star::uno::RuntimeException); + + virtual sal_Bool SAL_CALL isDataFlavorSupported( const ::com::sun::star::datatransfer::DataFlavor& aFlavor ) + throw(::com::sun::star::uno::RuntimeException); + }; + +} // namespace + +#endif diff --git a/vcl/unx/generic/dtrans/bmp.cxx b/vcl/unx/generic/dtrans/bmp.cxx new file mode 100644 index 000000000000..1ccd04eba725 --- /dev/null +++ b/vcl/unx/generic/dtrans/bmp.cxx @@ -0,0 +1,739 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include +#include + +#include + +#include + +using namespace x11; +using namespace com::sun::star::uno; +using namespace com::sun::star::script; +using namespace com::sun::star::awt; +using namespace rtl; + +/* + * helper functions + */ + +inline void writeLE( sal_uInt16 nNumber, sal_uInt8* pBuffer ) +{ + pBuffer[ 0 ] = (nNumber & 0xff); + pBuffer[ 1 ] = ((nNumber>>8)&0xff); +} + +inline void writeLE( sal_uInt32 nNumber, sal_uInt8* pBuffer ) +{ + pBuffer[ 0 ] = (nNumber & 0xff); + pBuffer[ 1 ] = ((nNumber>>8)&0xff); + pBuffer[ 2 ] = ((nNumber>>16)&0xff); + pBuffer[ 3 ] = ((nNumber>>24)&0xff); +} + +inline sal_uInt16 readLE16( const sal_uInt8* pBuffer ) +{ + return (((sal_uInt16)pBuffer[1]) << 8 ) | pBuffer[0]; +} + +inline sal_uInt16 readLE32( const sal_uInt8* pBuffer ) +{ + return + (((sal_uInt32)pBuffer[3]) << 24 ) | + (((sal_uInt32)pBuffer[2]) << 16 ) | + (((sal_uInt32)pBuffer[1]) << 8 ) | + pBuffer[0]; +} + + +/* + * BmpTransporter + */ + +BmpTransporter::BmpTransporter( const Sequence& rBmp ) : + m_aBM( rBmp ) +{ + const sal_uInt8* pData = (const sal_uInt8*)rBmp.getConstArray(); + + if( pData[0] == 'B' || pData[1] == 'M' ) + { + pData = pData+14; + m_aSize.Width = readLE32( pData+4 ); + m_aSize.Height = readLE32( pData+8 ); + } + else + m_aSize.Width = m_aSize.Height = 0; +} + +BmpTransporter::~BmpTransporter() +{ +} + +com::sun::star::awt::Size SAL_CALL BmpTransporter::getSize() throw() +{ + return m_aSize; +} + +Sequence< sal_Int8 > SAL_CALL BmpTransporter::getDIB() throw() +{ + return m_aBM; +} + +Sequence< sal_Int8 > SAL_CALL BmpTransporter::getMaskDIB() throw() +{ + return Sequence< sal_Int8 >(); +} + +/* + * scanline helpers + */ + +inline void X11_writeScanlinePixel( unsigned long nColor, sal_uInt8* pScanline, int depth, int x ) +{ + switch( depth ) + { + case 1: + pScanline[ x/8 ] &= ~(1 << (x&7)); + pScanline[ x/8 ] |= ((nColor & 1) << (x&7)); + break; + case 4: + pScanline[ x/2 ] &= ((x&1) ? 0x0f : 0xf0); + pScanline[ x/2 ] |= ((x&1) ? (nColor & 0x0f) : ((nColor & 0x0f) << 4)); + break; + default: + case 8: + pScanline[ x ] = (nColor & 0xff); + break; + } +} + +static sal_uInt8* X11_getPaletteBmpFromImage( + Display* pDisplay, + XImage* pImage, + Colormap aColormap, + sal_Int32& rOutSize + ) +{ + sal_uInt32 nColors = 0; + + rOutSize = 0; + + sal_uInt8* pBuffer = 0; + sal_uInt32 nHeaderSize, nScanlineSize; + sal_uInt16 nBitCount; + // determine header and scanline size + switch( pImage->depth ) + { + case 1: + nHeaderSize = 64; + nScanlineSize = (pImage->width+31)/32; + nBitCount = 1; + break; + case 4: + nHeaderSize = 72; + nScanlineSize = (pImage->width+1)/2; + nBitCount = 4; + break; + default: + case 8: + nHeaderSize = 1084; + nScanlineSize = pImage->width; + nBitCount = 8; + break; + } + // adjust scan lines to begin on %4 boundaries + if( nScanlineSize & 3 ) + { + nScanlineSize &= 0xfffffffc; + nScanlineSize += 4; + } + + // allocate buffer to hold header and scanlines, initialize to zero + rOutSize = nHeaderSize + nScanlineSize*pImage->height; + pBuffer = (sal_uInt8*)rtl_allocateZeroMemory( rOutSize ); + for( int y = 0; y < pImage->height; y++ ) + { + sal_uInt8* pScanline = pBuffer + nHeaderSize + (pImage->height-1-y)*nScanlineSize; + for( int x = 0; x < pImage->width; x++ ) + { + unsigned long nPixel = XGetPixel( pImage, x, y ); + if( nPixel >= nColors ) + nColors = nPixel+1; + X11_writeScanlinePixel( nPixel, pScanline, pImage->depth, x ); + } + } + + // fill in header fields + pBuffer[ 0 ] = 'B'; + pBuffer[ 1 ] = 'M'; + + writeLE( nHeaderSize, pBuffer+10 ); + writeLE( (sal_uInt32)40, pBuffer+14 ); + writeLE( (sal_uInt32)pImage->width, pBuffer+18 ); + writeLE( (sal_uInt32)pImage->height, pBuffer+22 ); + writeLE( (sal_uInt16)1, pBuffer+26 ); + writeLE( nBitCount, pBuffer+28 ); + writeLE( (sal_uInt32)(DisplayWidth(pDisplay,DefaultScreen(pDisplay))*1000/DisplayWidthMM(pDisplay,DefaultScreen(pDisplay))), pBuffer+38); + writeLE( (sal_uInt32)(DisplayHeight(pDisplay,DefaultScreen(pDisplay))*1000/DisplayHeightMM(pDisplay,DefaultScreen(pDisplay))), pBuffer+42); + writeLE( nColors, pBuffer+46 ); + writeLE( nColors, pBuffer+50 ); + + XColor aColors[256]; + if( nColors > (1U << nBitCount) ) // paranoia + nColors = (1U << nBitCount); + for( unsigned long nPixel = 0; nPixel < nColors; nPixel++ ) + { + aColors[nPixel].flags = DoRed | DoGreen | DoBlue; + aColors[nPixel].pixel = nPixel; + } + XQueryColors( pDisplay, aColormap, aColors, nColors ); + for( sal_uInt32 i = 0; i < nColors; i++ ) + { + pBuffer[ 54 + i*4 ] = (sal_uInt8)(aColors[i].blue >> 8); + pBuffer[ 55 + i*4 ] = (sal_uInt8)(aColors[i].green >> 8); + pBuffer[ 56 + i*4 ] = (sal_uInt8)(aColors[i].red >> 8); + } + + // done + + return pBuffer; +} + +inline unsigned long doRightShift( unsigned long nValue, int nShift ) +{ + return (nShift > 0) ? (nValue >> nShift) : (nValue << (-nShift)); +} + +inline unsigned long doLeftShift( unsigned long nValue, int nShift ) +{ + return (nShift > 0) ? (nValue << nShift) : (nValue >> (-nShift)); +} + +static void getShift( unsigned long nMask, int& rShift, int& rSigBits, int& rShift2 ) +{ + unsigned long nUseMask = nMask; + rShift = 0; + while( nMask & 0xffffff00 ) + { + rShift++; + nMask >>= 1; + } + if( rShift == 0 ) + while( ! (nMask & 0x00000080) ) + { + rShift--; + nMask <<= 1; + } + + int nRotate = sizeof(unsigned long)*8 - rShift; + rSigBits = 0; + nMask = doRightShift( nUseMask, rShift) ; + while( nRotate-- ) + { + if( nMask & 1 ) + rSigBits++; + nMask >>= 1; + } + + rShift2 = 0; + if( rSigBits < 8 ) + rShift2 = 8-rSigBits; +} + +static sal_uInt8* X11_getTCBmpFromImage( + Display* pDisplay, + XImage* pImage, + sal_Int32& rOutSize, + int nScreenNo + ) +{ + // get masks from visual info (guesswork) + XVisualInfo aVInfo; + if( ! XMatchVisualInfo( pDisplay, nScreenNo, pImage->depth, TrueColor, &aVInfo ) ) + return NULL; + + rOutSize = 0; + + sal_uInt8* pBuffer = 0; + sal_uInt32 nHeaderSize = 60; + sal_uInt32 nScanlineSize = pImage->width*3; + + // adjust scan lines to begin on %4 boundaries + if( nScanlineSize & 3 ) + { + nScanlineSize &= 0xfffffffc; + nScanlineSize += 4; + } + int nRedShift, nRedSig, nRedShift2 = 0; + getShift( aVInfo.red_mask, nRedShift, nRedSig, nRedShift2 ); + int nGreenShift, nGreenSig, nGreenShift2 = 0; + getShift( aVInfo.green_mask, nGreenShift, nGreenSig, nGreenShift2 ); + int nBlueShift, nBlueSig, nBlueShift2 = 0; + getShift( aVInfo.blue_mask, nBlueShift, nBlueSig, nBlueShift2 ); + + // allocate buffer to hold header and scanlines, initialize to zero + rOutSize = nHeaderSize + nScanlineSize*pImage->height; + pBuffer = (sal_uInt8*)rtl_allocateZeroMemory( rOutSize ); + for( int y = 0; y < pImage->height; y++ ) + { + sal_uInt8* pScanline = pBuffer + nHeaderSize + (pImage->height-1-y)*nScanlineSize; + for( int x = 0; x < pImage->width; x++ ) + { + unsigned long nPixel = XGetPixel( pImage, x, y ); + + sal_uInt8 nValue = (sal_uInt8)doRightShift( nPixel&aVInfo.blue_mask, nBlueShift); + if( nBlueShift2 ) + nValue |= (nValue >> nBlueShift2 ); + *pScanline++ = nValue; + + nValue = (sal_uInt8)doRightShift( nPixel&aVInfo.green_mask, nGreenShift); + if( nGreenShift2 ) + nValue |= (nValue >> nGreenShift2 ); + *pScanline++ = nValue; + + nValue = (sal_uInt8)doRightShift( nPixel&aVInfo.red_mask, nRedShift); + if( nRedShift2 ) + nValue |= (nValue >> nRedShift2 ); + *pScanline++ = nValue; + } + } + + // fill in header fields + pBuffer[ 0 ] = 'B'; + pBuffer[ 1 ] = 'M'; + + writeLE( nHeaderSize, pBuffer+10 ); + writeLE( (sal_uInt32)40, pBuffer+14 ); + writeLE( (sal_uInt32)pImage->width, pBuffer+18 ); + writeLE( (sal_uInt32)pImage->height, pBuffer+22 ); + writeLE( (sal_uInt16)1, pBuffer+26 ); + writeLE( (sal_uInt16)24, pBuffer+28 ); + writeLE( (sal_uInt32)(DisplayWidth(pDisplay,DefaultScreen(pDisplay))*1000/DisplayWidthMM(pDisplay,DefaultScreen(pDisplay))), pBuffer+38); + writeLE( (sal_uInt32)(DisplayHeight(pDisplay,DefaultScreen(pDisplay))*1000/DisplayHeightMM(pDisplay,DefaultScreen(pDisplay))), pBuffer+42); + + // done + + return pBuffer; +} + +sal_uInt8* x11::X11_getBmpFromPixmap( + Display* pDisplay, + Drawable aDrawable, + Colormap aColormap, + sal_Int32& rOutSize + ) +{ + // get geometry of drawable + XLIB_Window aRoot; + int x,y; + unsigned int w, h, bw, d; + XGetGeometry( pDisplay, aDrawable, &aRoot, &x, &y, &w, &h, &bw, &d ); + + // find which screen we are on + int nScreenNo = ScreenCount( pDisplay ); + while( nScreenNo-- ) + { + if( RootWindow( pDisplay, nScreenNo ) == aRoot ) + break; + } + if( nScreenNo < 0 ) + return NULL; + + if( aColormap == None ) + aColormap = DefaultColormap( pDisplay, nScreenNo ); + + // get the image + XImage* pImage = XGetImage( pDisplay, aDrawable, 0, 0, w, h, AllPlanes, ZPixmap ); + if( ! pImage ) + return NULL; + + sal_uInt8* pBmp = d <= 8 ? + X11_getPaletteBmpFromImage( pDisplay, pImage, aColormap, rOutSize ) : + X11_getTCBmpFromImage( pDisplay, pImage, rOutSize, nScreenNo ); + XDestroyImage( pImage ); + + return pBmp; +} + +void x11::X11_freeBmp( sal_uInt8* pBmp ) +{ + rtl_freeMemory( pBmp ); +} + +/* + * PixmapHolder + */ + +PixmapHolder::PixmapHolder( Display* pDisplay ) : + m_pDisplay( pDisplay ), + m_aColormap( None ), + m_aPixmap( None ), + m_aBitmap( None ) +{ + /* try to get a 24 bit true color visual, if that fails, + * revert to default visual + */ + if( ! XMatchVisualInfo( m_pDisplay, DefaultScreen( m_pDisplay ), 24, TrueColor, &m_aInfo ) ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "PixmapHolder reverting to default visual\n" ); +#endif + Visual* pVisual = DefaultVisual( m_pDisplay, DefaultScreen( m_pDisplay ) ); + m_aInfo.screen = DefaultScreen( m_pDisplay ); + m_aInfo.visual = pVisual; + m_aInfo.visualid = pVisual->visualid; + m_aInfo.c_class = pVisual->c_class; + m_aInfo.red_mask = pVisual->red_mask; + m_aInfo.green_mask = pVisual->green_mask; + m_aInfo.blue_mask = pVisual->blue_mask; + m_aInfo.depth = DefaultDepth( m_pDisplay, m_aInfo.screen ); + } + m_aColormap = DefaultColormap( m_pDisplay, m_aInfo.screen ); +#if OSL_DEBUG_LEVEL > 1 + static const char* pClasses[] = + { "StaticGray", "GrayScale", "StaticColor", "PseudoColor", "TrueColor", "DirectColor" }; + fprintf( stderr, "PixmapHolder visual: id = 0x%lx, class = %s (%d), depth=%d; color map = 0x%lx\n", + m_aInfo.visualid, + (m_aInfo.c_class >= 0 && unsigned(m_aInfo.c_class) < sizeof(pClasses)/sizeof(pClasses[0])) ? pClasses[m_aInfo.c_class] : "", + m_aInfo.c_class, + m_aInfo.depth, + m_aColormap ); +#endif + if( m_aInfo.c_class == TrueColor ) + { + int nRedSig, nGreenSig, nBlueSig; + m_nRedShift = m_nRedShift2 = 0; + getShift( m_aInfo.red_mask, m_nRedShift, nRedSig, m_nRedShift2 ); + m_nGreenShift = m_nGreenShift2 = 0; + getShift( m_aInfo.green_mask, m_nGreenShift, nGreenSig, m_nGreenShift2 ); + m_nBlueShift = m_nBlueShift2 = 0; + getShift( m_aInfo.blue_mask, m_nBlueShift, nBlueSig, m_nBlueShift2 ); + + m_nBlueShift2Mask = m_nBlueShift2 ? ~((unsigned long)((1<> (x&7))) != 0 ? 0 : 1; break; + case 4: + if( x & 1 ) + nCol = (int)(pScanline[ x/2 ] >> 4); + else + nCol = (int)(pScanline[ x/2 ] & 0x0f); + break; + case 8: nCol = (int)pScanline[x]; + } + XPutPixel( pImage, x, y, aPalette[nCol].pixel ); + } + } +} + +void PixmapHolder::setBitmapDataTCDither( const sal_uInt8* pData, XImage* pImage ) +{ + XColor aPalette[216]; + + int nNonAllocs = 0; + + for( int r = 0; r < 6; r++ ) + { + for( int g = 0; g < 6; g++ ) + { + for( int b = 0; b < 6; b++ ) + { + int i = r*36+g*6+b; + aPalette[i].red = r == 5 ? 0xffff : r*10922; + aPalette[i].green = g == 5 ? 0xffff : g*10922; + aPalette[i].blue = b == 5 ? 0xffff : b*10922; + aPalette[i].pixel = 0; + if( ! XAllocColor( m_pDisplay, m_aColormap, aPalette+i ) ) + nNonAllocs++; + } + } + } + + if( nNonAllocs ) + { + XColor aRealPalette[256]; + int nColors = 1 << m_aInfo.depth; + int i; + for( i = 0; i < nColors; i++ ) + aRealPalette[i].pixel = (unsigned long)i; + XQueryColors( m_pDisplay, m_aColormap, aRealPalette, nColors ); + for( i = 0; i < nColors; i++ ) + { + sal_uInt8 nIndex = + 36*(sal_uInt8)(aRealPalette[i].red/10923) + + 6*(sal_uInt8)(aRealPalette[i].green/10923) + + (sal_uInt8)(aRealPalette[i].blue/10923); + if( aPalette[nIndex].pixel == 0 ) + aPalette[nIndex] = aRealPalette[i]; + } + } + + sal_uInt32 nWidth = readLE32( pData+4 ); + sal_uInt32 nHeight = readLE32( pData+8 ); + + const sal_uInt8* pBMData = pData + readLE32( pData ); + sal_uInt32 nScanlineSize = nWidth*3; + // adjust scan lines to begin on %4 boundaries + if( nScanlineSize & 3 ) + { + nScanlineSize &= 0xfffffffc; + nScanlineSize += 4; + } + + for( int y = 0; y < (int)nHeight; y++ ) + { + const sal_uInt8* pScanline = pBMData + (nHeight-1-(sal_uInt32)y)*nScanlineSize; + for( int x = 0; x < (int)nWidth; x++ ) + { + sal_uInt8 b = pScanline[3*x]; + sal_uInt8 g = pScanline[3*x+1]; + sal_uInt8 r = pScanline[3*x+2]; + sal_uInt8 i = 36*(r/43) + 6*(g/43) + (b/43); + + XPutPixel( pImage, x, y, aPalette[ i ].pixel ); + } + } +} + +void PixmapHolder::setBitmapDataTC( const sal_uInt8* pData, XImage* pImage ) +{ + sal_uInt32 nWidth = readLE32( pData+4 ); + sal_uInt32 nHeight = readLE32( pData+8 ); + + const sal_uInt8* pBMData = pData + readLE32( pData ); + sal_uInt32 nScanlineSize = nWidth*3; + // adjust scan lines to begin on %4 boundaries + if( nScanlineSize & 3 ) + { + nScanlineSize &= 0xfffffffc; + nScanlineSize += 4; + } + + for( int y = 0; y < (int)nHeight; y++ ) + { + const sal_uInt8* pScanline = pBMData + (nHeight-1-(sal_uInt32)y)*nScanlineSize; + for( int x = 0; x < (int)nWidth; x++ ) + { + unsigned long nPixel = getTCPixel( pScanline[3*x+2], pScanline[3*x+1], pScanline[3*x] ); + XPutPixel( pImage, x, y, nPixel ); + } + } +} + +bool PixmapHolder::needsConversion( const sal_uInt8* pData ) +{ + if( pData[0] != 'B' || pData[1] != 'M' ) + return true; + + pData = pData+14; + sal_uInt32 nDepth = readLE32( pData+14 ); + if( nDepth == 24 ) + { + if( m_aInfo.c_class != TrueColor ) + return true; + } + else if( nDepth != (sal_uInt32)m_aInfo.depth ) + { + if( m_aInfo.c_class != TrueColor ) + return true; + } + + return false; +} + +Pixmap PixmapHolder::setBitmapData( const sal_uInt8* pData ) +{ + if( pData[0] != 'B' || pData[1] != 'M' ) + return None; + + pData = pData+14; + + // reject compressed data + if( readLE32( pData + 16 ) != 0 ) + return None; + + sal_uInt32 nWidth = readLE32( pData+4 ); + sal_uInt32 nHeight = readLE32( pData+8 ); + + if( m_aPixmap != None ) + XFreePixmap( m_pDisplay, m_aPixmap ), m_aPixmap = None; + if( m_aBitmap != None ) + XFreePixmap( m_pDisplay, m_aBitmap ), m_aBitmap = None; + + m_aPixmap = XCreatePixmap( m_pDisplay, + RootWindow( m_pDisplay, m_aInfo.screen ), + nWidth, nHeight, m_aInfo.depth ); + + if( m_aPixmap != None ) + { + XImage aImage; + aImage.width = (int)nWidth; + aImage.height = (int)nHeight; + aImage.xoffset = 0; + aImage.format = ZPixmap; + aImage.data = NULL; + aImage.byte_order = ImageByteOrder( m_pDisplay ); + aImage.bitmap_unit = BitmapUnit( m_pDisplay ); + aImage.bitmap_bit_order = BitmapBitOrder( m_pDisplay ); + aImage.bitmap_pad = BitmapPad( m_pDisplay ); + aImage.depth = m_aInfo.depth; + aImage.red_mask = m_aInfo.red_mask; + aImage.green_mask = m_aInfo.green_mask; + aImage.blue_mask = m_aInfo.blue_mask; + aImage.bytes_per_line = 0; // filled in by XInitImage + if( m_aInfo.depth <= 8 ) + aImage.bits_per_pixel = m_aInfo.depth; + else + aImage.bits_per_pixel = 8*((m_aInfo.depth+7)/8); + aImage.obdata = NULL; + + XInitImage( &aImage ); + aImage.data = (char*)rtl_allocateMemory( nHeight*aImage.bytes_per_line ); + + if( readLE32( pData+14 ) == 24 ) + { + if( m_aInfo.c_class == TrueColor ) + setBitmapDataTC( pData, &aImage ); + else + setBitmapDataTCDither( pData, &aImage ); + } + else + setBitmapDataPalette( pData, &aImage ); + + // put the image + XPutImage( m_pDisplay, + m_aPixmap, + DefaultGC( m_pDisplay, m_aInfo.screen ), + &aImage, + 0, 0, + 0, 0, + nWidth, nHeight ); + + // clean up + rtl_freeMemory( aImage.data ); + + // prepare bitmap (mask) + m_aBitmap = XCreatePixmap( m_pDisplay, + RootWindow( m_pDisplay, m_aInfo.screen ), + nWidth, nHeight, 1 ); + XGCValues aVal; + aVal.function = GXcopy; + aVal.foreground = 0xffffffff; + GC aGC = XCreateGC( m_pDisplay, m_aBitmap, GCFunction | GCForeground, &aVal ); + XFillRectangle( m_pDisplay, m_aBitmap, aGC, 0, 0, nWidth, nHeight ); + XFreeGC( m_pDisplay, aGC ); + } + + return m_aPixmap; +} diff --git a/vcl/unx/generic/dtrans/bmp.hxx b/vcl/unx/generic/dtrans/bmp.hxx new file mode 100644 index 000000000000..b59b4417ca69 --- /dev/null +++ b/vcl/unx/generic/dtrans/bmp.hxx @@ -0,0 +1,105 @@ +/************************************************************************* + * + * 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 _DTRANS_BMP_HXX_ +#define _DTRANS_BMP_HXX_ + +#include "tools/prex.h" +#include +#include +#include +#include +#include "tools/postx.h" + +#include +#include +#include + + + +namespace x11 { + +// helper methods +sal_uInt8* X11_getBmpFromPixmap( Display* pDisplay, + Drawable aDrawable, + Colormap aColormap, + sal_Int32& rOutSize ); + +void X11_freeBmp( sal_uInt8* pBmp ); + +class PixmapHolder +{ + Display* m_pDisplay; + Colormap m_aColormap; + Pixmap m_aPixmap; + Pixmap m_aBitmap; + XVisualInfo m_aInfo; + + int m_nRedShift, m_nRedShift2; + int m_nGreenShift, m_nGreenShift2; + int m_nBlueShift, m_nBlueShift2; + unsigned long m_nBlueShift2Mask, m_nRedShift2Mask, m_nGreenShift2Mask; + + // these expect data pointers to bitmapinfo header + void setBitmapDataTC( const sal_uInt8* pData, XImage* pImage ); + void setBitmapDataTCDither( const sal_uInt8* pData, XImage* pImage ); + void setBitmapDataPalette( const sal_uInt8* pData, XImage* pImage ); + + unsigned long getTCPixel( sal_uInt8 r, sal_uInt8 g, sal_uInt8 b ) const; +public: + PixmapHolder( Display* pDisplay ); + ~PixmapHolder(); + + // accepts bitmap file (including bitmap file header) + Pixmap setBitmapData( const sal_uInt8* pData ); + bool needsConversion( const sal_uInt8* pData ); + + Colormap getColormap() const { return m_aColormap; } + Pixmap getPixmap() const { return m_aPixmap; } + Pixmap getBitmap() const { return m_aBitmap; } + VisualID getVisualID() const { return m_aInfo.visualid; } + int getClass() const { return m_aInfo.c_class; } + int getDepth() const { return m_aInfo.depth; } +}; + +class BmpTransporter : + public cppu::WeakImplHelper1< com::sun::star::awt::XBitmap > +{ + com::sun::star::uno::Sequence m_aBM; + com::sun::star::awt::Size m_aSize; +public: + BmpTransporter( const com::sun::star::uno::Sequence& rBmp ); + virtual ~BmpTransporter(); + + virtual com::sun::star::awt::Size SAL_CALL getSize() throw(); + virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getDIB() throw(); + virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getMaskDIB() throw(); +}; + +} + +#endif diff --git a/vcl/unx/generic/dtrans/config.cxx b/vcl/unx/generic/dtrans/config.cxx new file mode 100644 index 000000000000..001da3900bb7 --- /dev/null +++ b/vcl/unx/generic/dtrans/config.cxx @@ -0,0 +1,148 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include + +#include "X11_selection.hxx" + +#define SETTINGS_CONFIGNODE "VCL/Settings/Transfer" +#define SELECTION_PROPERTY "SelectionTimeout" + +namespace x11 +{ + +class DtransX11ConfigItem : public ::utl::ConfigItem +{ + sal_Int32 m_nSelectionTimeout; + + virtual void Notify( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rPropertyNames ); + virtual void Commit(); +public: + DtransX11ConfigItem(); + virtual ~DtransX11ConfigItem(); + + sal_Int32 getSelectionTimeout() const { return m_nSelectionTimeout; } +}; + +} + +using namespace com::sun::star::lang; +using namespace com::sun::star::uno; +using namespace rtl; +using namespace x11; + +sal_Int32 SelectionManager::getSelectionTimeout() +{ + if( m_nSelectionTimeout < 1 ) + { + DtransX11ConfigItem aCfg; + m_nSelectionTimeout = aCfg.getSelectionTimeout(); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "initialized selection timeout to %ld seconds\n", m_nSelectionTimeout ); +#endif + } + return m_nSelectionTimeout; +} + +/* + * DtransX11ConfigItem constructor + */ + +DtransX11ConfigItem::DtransX11ConfigItem() : + ConfigItem( OUString( RTL_CONSTASCII_USTRINGPARAM( SETTINGS_CONFIGNODE ) ), + CONFIG_MODE_DELAYED_UPDATE ), + m_nSelectionTimeout( 3 ) +{ + if( IsValidConfigMgr() ) + { + Sequence< OUString > aKeys( 1 ); + aKeys.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( SELECTION_PROPERTY ) ); + Sequence< Any > aValues = GetProperties( aKeys ); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "found %ld properties for %s\n", aValues.getLength(), SELECTION_PROPERTY ); +#endif + Any* pValue = aValues.getArray(); + for( int i = 0; i < aValues.getLength(); i++, pValue++ ) + { + if( pValue->getValueTypeClass() == TypeClass_STRING ) + { + const OUString* pLine = (const OUString*)pValue->getValue(); + if( pLine->getLength() ) + { + m_nSelectionTimeout = pLine->toInt32(); + if( m_nSelectionTimeout < 1 ) + m_nSelectionTimeout = 1; + } +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "found SelectionTimeout \"%s\"\n", + OUStringToOString( *pLine, osl_getThreadTextEncoding() ).getStr() ); +#endif + } +#if OSL_DEBUG_LEVEL > 1 + else + fprintf( stderr, "found SelectionTimeout of type \"%s\"\n", + OUStringToOString( pValue->getValueType().getTypeName(), osl_getThreadTextEncoding() ).getStr() ); +#endif + } + } +#if OSL_DEBUG_LEVEL > 1 + else + fprintf( stderr, "no valid configmanager, could not read timeout setting\n" ); +#endif +} + +/* + * DtransX11ConfigItem destructor + */ + +DtransX11ConfigItem::~DtransX11ConfigItem() +{ +} + +/* + * DtransX11ConfigItem::Commit + */ + +void DtransX11ConfigItem::Commit() +{ + // for the clipboard service this is readonly, so + // there is nothing to commit +} + +/* + * DtransX11ConfigItem::Notify + */ + +void DtransX11ConfigItem::Notify( const Sequence< OUString >& /*rPropertyNames*/ ) +{ +} + + diff --git a/vcl/unx/generic/dtrans/copydata_curs.h b/vcl/unx/generic/dtrans/copydata_curs.h new file mode 100644 index 000000000000..e3d0e3e76530 --- /dev/null +++ b/vcl/unx/generic/dtrans/copydata_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define copydata_curs_width 32 +#define copydata_curs_height 32 +#define copydata_curs_x_hot 1 +#define copydata_curs_y_hot 1 +static char copydata_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, + 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, + 0xfe, 0x03, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, + 0x66, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x53, 0x00, 0x00, + 0x28, 0xa3, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x10, 0xf0, 0x1f, 0x00, 0x08, 0xf0, 0x1f, 0x00, 0x10, 0xf0, 0x1e, 0x00, + 0xa8, 0xf2, 0x1e, 0x00, 0x50, 0x35, 0x18, 0x00, 0x00, 0xf0, 0x1e, 0x00, + 0x00, 0xf0, 0x1e, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/generic/dtrans/copydata_mask.h b/vcl/unx/generic/dtrans/copydata_mask.h new file mode 100644 index 000000000000..f25b0863d807 --- /dev/null +++ b/vcl/unx/generic/dtrans/copydata_mask.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define copydata_mask_width 32 +#define copydata_mask_height 32 +#define copydata_mask_x_hot 1 +#define copydata_mask_y_hot 1 +static char copydata_mask_bits[] = { + 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, + 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, + 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, + 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, + 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, + 0xe0, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, + 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0x3c, 0xf8, 0x3f, 0x00, + 0x3c, 0xf8, 0x3f, 0x00, 0x3c, 0xf8, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00, + 0xfc, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00, + 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, + 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/generic/dtrans/linkdata_curs.h b/vcl/unx/generic/dtrans/linkdata_curs.h new file mode 100644 index 000000000000..c60edc3b99d0 --- /dev/null +++ b/vcl/unx/generic/dtrans/linkdata_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define linkdata_curs_width 32 +#define linkdata_curs_height 32 +#define linkdata_curs_x_hot 1 +#define linkdata_curs_y_hot 1 +static char linkdata_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, + 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, + 0xfe, 0x03, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, + 0x66, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x53, 0x00, 0x00, + 0x28, 0xa3, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x10, 0xf0, 0x1f, 0x00, 0x08, 0x70, 0x18, 0x00, 0x10, 0xf0, 0x18, 0x00, + 0xa8, 0x72, 0x18, 0x00, 0x50, 0x35, 0x1a, 0x00, 0x00, 0x30, 0x1f, 0x00, + 0x00, 0xb0, 0x1f, 0x00, 0x00, 0x70, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/generic/dtrans/linkdata_mask.h b/vcl/unx/generic/dtrans/linkdata_mask.h new file mode 100644 index 000000000000..cf0f89f63b1b --- /dev/null +++ b/vcl/unx/generic/dtrans/linkdata_mask.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define linkdata_mask_width 32 +#define linkdata_mask_height 32 +#define linkdata_mask_x_hot 1 +#define linkdata_mask_y_hot 1 +static char linkdata_mask_bits[] = { + 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, + 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, + 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, + 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, + 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, + 0xe0, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, + 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0x3c, 0xf8, 0x3f, 0x00, + 0x3c, 0xf8, 0x3f, 0x00, 0x3c, 0xf8, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00, + 0xfc, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00, + 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, + 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/generic/dtrans/makefile.mk b/vcl/unx/generic/dtrans/makefile.mk new file mode 100644 index 000000000000..6f5caccfd734 --- /dev/null +++ b/vcl/unx/generic/dtrans/makefile.mk @@ -0,0 +1,68 @@ +#************************************************************************* +# +# 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=vcl +TARGET=dtransX11 +TARGETTYPE=GUI + +ENABLE_EXCEPTIONS=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +# ------------------------------------------------------------------ + +.IF "$(GUIBASE)"=="aqua" + +dummy: + @echo "Nothing to build for Mac OS X" + +.ELSE # "$(GUIBASE)"=="aqua" + +.IF "$(COM)$(CPU)" == "C50I" || "$(COM)$(CPU)" == "C52I" +NOOPTFILES=\ + $(SLO)$/X11_selection.obj +.ENDIF + +SLOFILES=\ + $(SLO)$/X11_dndcontext.obj \ + $(SLO)$/X11_transferable.obj \ + $(SLO)$/X11_clipboard.obj \ + $(SLO)$/X11_selection.obj \ + $(SLO)$/X11_droptarget.obj \ + $(SLO)$/X11_service.obj \ + $(SLO)$/bmp.obj \ + $(SLO)$/config.obj + +.ENDIF # "$(OS)"=="MACOSX" + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk diff --git a/vcl/unx/generic/dtrans/movedata_curs.h b/vcl/unx/generic/dtrans/movedata_curs.h new file mode 100644 index 000000000000..b79412bc3f41 --- /dev/null +++ b/vcl/unx/generic/dtrans/movedata_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define movedata_curs_width 32 +#define movedata_curs_height 32 +#define movedata_curs_x_hot 1 +#define movedata_curs_y_hot 1 +static char movedata_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, + 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, + 0xfe, 0x03, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, + 0x66, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x53, 0x00, 0x00, + 0x28, 0xa3, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, + 0x10, 0x40, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, + 0xa8, 0xaa, 0x00, 0x00, 0x50, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/generic/dtrans/movedata_mask.h b/vcl/unx/generic/dtrans/movedata_mask.h new file mode 100644 index 000000000000..e25d0837d8dc --- /dev/null +++ b/vcl/unx/generic/dtrans/movedata_mask.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define movedata_mask_width 32 +#define movedata_mask_height 32 +#define movedata_mask_x_hot 1 +#define movedata_mask_y_hot 1 +static char movedata_mask_bits[] = { + 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, + 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, + 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, + 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, + 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, + 0xe0, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, + 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0x3c, 0xe0, 0x01, 0x00, + 0x3c, 0xe0, 0x01, 0x00, 0x3c, 0xe0, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, + 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0xf8, 0xff, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/generic/dtrans/nodrop_curs.h b/vcl/unx/generic/dtrans/nodrop_curs.h new file mode 100644 index 000000000000..8e208e32f293 --- /dev/null +++ b/vcl/unx/generic/dtrans/nodrop_curs.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define nodrop_curs_width 32 +#define nodrop_curs_height 32 +#define nodrop_curs_x_hot 9 +#define nodrop_curs_y_hot 9 +static char nodrop_curs_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, + 0xf8, 0x7f, 0x00, 0x00, 0x7c, 0xf8, 0x00, 0x00, 0x1c, 0xfc, 0x00, 0x00, + 0x1e, 0xfe, 0x01, 0x00, 0x0e, 0xdf, 0x01, 0x00, 0x8e, 0xcf, 0x01, 0x00, + 0xce, 0xc7, 0x01, 0x00, 0xee, 0xc3, 0x01, 0x00, 0xfe, 0xe1, 0x01, 0x00, + 0xfc, 0xe0, 0x00, 0x00, 0x7c, 0xf8, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, + 0xf0, 0x3f, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/generic/dtrans/nodrop_mask.h b/vcl/unx/generic/dtrans/nodrop_mask.h new file mode 100644 index 000000000000..7cbecef2c60f --- /dev/null +++ b/vcl/unx/generic/dtrans/nodrop_mask.h @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#define nodrop_mask_width 32 +#define nodrop_mask_height 32 +#define nodrop_mask_x_hot 9 +#define nodrop_mask_y_hot 9 +static char nodrop_mask_bits[] = { + 0xc0, 0x0f, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, + 0xfc, 0xff, 0x00, 0x00, 0xfe, 0xff, 0x01, 0x00, 0x7e, 0xfe, 0x01, 0x00, + 0x3f, 0xff, 0x03, 0x00, 0x9f, 0xff, 0x03, 0x00, 0xdf, 0xff, 0x03, 0x00, + 0xff, 0xef, 0x03, 0x00, 0xff, 0xe7, 0x03, 0x00, 0xff, 0xf3, 0x03, 0x00, + 0xfe, 0xf9, 0x01, 0x00, 0xfe, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x00, 0x00, + 0xf8, 0x7f, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/generic/fontmanager/adobeenc.tab b/vcl/unx/generic/fontmanager/adobeenc.tab new file mode 100644 index 000000000000..492e92f3fcf2 --- /dev/null +++ b/vcl/unx/generic/fontmanager/adobeenc.tab @@ -0,0 +1,1087 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ + +struct AdobeEncEntry { + sal_Unicode aUnicode; + sal_uInt8 aAdobeStandardCode; + const char* const pAdobename; +}; + +static const AdobeEncEntry aAdobeCodes[]= +{ + { 0x0041, 0101, "A" }, + { 0x00C6, 0341, "AE" }, + { 0x01FC, 0, "AEacute" }, + { 0xF7E6, 0, "AEsmall" }, + { 0x00C1, 0, "Aacute" }, + { 0xF7E1, 0, "Aacutesmall" }, + { 0x0102, 0, "Abreve" }, + { 0x00C2, 0, "Acircumflex" }, + { 0xF7E2, 0, "Acircumflexsmall" }, + { 0xF6C9, 0, "Acute" }, + { 0xF7B4, 0, "Acutesmall" }, + { 0x00C4, 0, "Adieresis" }, + { 0xF7E4, 0, "Adieresissmall" }, + { 0x00C0, 0, "Agrave" }, + { 0xF7E0, 0, "Agravesmall" }, + { 0x0391, 0, "Alpha" }, + { 0x0386, 0, "Alphatonos" }, + { 0x0100, 0, "Amacron" }, + { 0x0104, 0, "Aogonek" }, + { 0x00C5, 0, "Aring" }, + { 0x01FA, 0, "Aringacute" }, + { 0xF7E5, 0, "Aringsmall" }, + { 0xF761, 0, "Asmall" }, + { 0x00C3, 0, "Atilde" }, + { 0xF7E3, 0, "Atildesmall" }, + { 0x0042, 0102, "B" }, + { 0x0392, 0, "Beta" }, + { 0xF6F4, 0, "Brevesmall" }, + { 0xF762, 0, "Bsmall" }, + { 0x0043, 0103, "C" }, + { 0x0106, 0, "Cacute" }, + { 0xF6CA, 0, "Caron" }, + { 0xF6F5, 0, "Caronsmall" }, + { 0x010C, 0, "Ccaron" }, + { 0x00C7, 0, "Ccedilla" }, + { 0xF7E7, 0, "Ccedillasmall" }, + { 0x0108, 0, "Ccircumflex" }, + { 0x010A, 0, "Cdotaccent" }, + { 0xF7B8, 0, "Cedillasmall" }, + { 0x03A7, 0, "Chi" }, + { 0xF6F6, 0, "Circumflexsmall" }, + { 0xF763, 0, "Csmall" }, + { 0x0044, 0104, "D" }, + { 0x010E, 0, "Dcaron" }, + { 0x0110, 0, "Dcroat" }, + { 0x2206, 0, "Delta" }, + { 0x0394, 0, "Delta" }, + { 0xF6CB, 0, "Dieresis" }, + { 0xF6CC, 0, "DieresisAcute" }, + { 0xF6CD, 0, "DieresisGrave" }, + { 0xF7A8, 0, "Dieresissmall" }, + { 0xF6F7, 0, "Dotaccentsmall" }, + { 0xF764, 0, "Dsmall" }, + { 0x0045, 0105, "E" }, + { 0x00C9, 0, "Eacute" }, + { 0xF7E9, 0, "Eacutesmall" }, + { 0x0114, 0, "Ebreve" }, + { 0x011A, 0, "Ecaron" }, + { 0x00CA, 0, "Ecircumflex" }, + { 0xF7EA, 0, "Ecircumflexsmall" }, + { 0x00CB, 0, "Edieresis" }, + { 0xF7EB, 0, "Edieresissmall" }, + { 0x0116, 0, "Edotaccent" }, + { 0x00C8, 0, "Egrave" }, + { 0xF7E8, 0, "Egravesmall" }, + { 0x0112, 0, "Emacron" }, + { 0x014A, 0, "Eng" }, + { 0x0118, 0, "Eogonek" }, + { 0x0395, 0, "Epsilon" }, + { 0x0388, 0, "Epsilontonos" }, + { 0xF765, 0, "Esmall" }, + { 0x0397, 0, "Eta" }, + { 0x0389, 0, "Etatonos" }, + { 0x00D0, 0, "Eth" }, + { 0xF7F0, 0, "Ethsmall" }, + { 0x20AC, 0, "Euro" }, + { 0x0046, 0106, "F" }, + { 0xF766, 0, "Fsmall" }, + { 0x0047, 0107, "G" }, + { 0x0393, 0, "Gamma" }, + { 0x011E, 0, "Gbreve" }, + { 0x01E6, 0, "Gcaron" }, + { 0x011C, 0, "Gcircumflex" }, + { 0x0122, 0, "Gcommaaccent" }, + { 0x0120, 0, "Gdotaccent" }, + { 0xF6CE, 0, "Grave" }, + { 0xF760, 0, "Gravesmall" }, + { 0xF767, 0, "Gsmall" }, + { 0x0048, 0110, "H" }, + { 0x25CF, 0, "H18533" }, + { 0x25AA, 0, "H18543" }, + { 0x25AB, 0, "H18551" }, + { 0x25A1, 0, "H22073" }, + { 0x0126, 0, "Hbar" }, + { 0x0124, 0, "Hcircumflex" }, + { 0xF768, 0, "Hsmall" }, + { 0xF6CF, 0, "Hungarumlaut" }, + { 0xF6F8, 0, "Hungarumlautsmall" }, + { 0x0049, 0111, "I" }, + { 0x0132, 0, "IJ" }, + { 0x00CD, 0, "Iacute" }, + { 0xF7ED, 0, "Iacutesmall" }, + { 0x012C, 0, "Ibreve" }, + { 0x00CE, 0, "Icircumflex" }, + { 0xF7EE, 0, "Icircumflexsmall" }, + { 0x00CF, 0, "Idieresis" }, + { 0xF7EF, 0, "Idieresissmall" }, + { 0x0130, 0, "Idotaccent" }, + { 0x2111, 0, "Ifraktur" }, + { 0x00CC, 0, "Igrave" }, + { 0xF7EC, 0, "Igravesmall" }, + { 0x012A, 0, "Imacron" }, + { 0x012E, 0, "Iogonek" }, + { 0x0399, 0, "Iota" }, + { 0x03AA, 0, "Iotadieresis" }, + { 0x038A, 0, "Iotatonos" }, + { 0xF769, 0, "Ismall" }, + { 0x0128, 0, "Itilde" }, + { 0x004A, 0112, "J" }, + { 0x0134, 0, "Jcircumflex" }, + { 0xF76A, 0, "Jsmall" }, + { 0x004B, 0113, "K" }, + { 0x039A, 0, "Kappa" }, + { 0x0136, 0, "Kcommaaccent" }, + { 0xF76B, 0, "Ksmall" }, + { 0x004C, 0114, "L" }, + { 0xF6BF, 0, "LL" }, + { 0x0139, 0, "Lacute" }, + { 0x039B, 0, "Lambda" }, + { 0x013D, 0, "Lcaron" }, + { 0x013B, 0, "Lcommaaccent" }, + { 0x013F, 0, "Ldot" }, + { 0x0141, 0350, "Lslash" }, + { 0xF6F9, 0, "Lslashsmall" }, + { 0xF76C, 0, "Lsmall" }, + { 0x004D, 0115, "M" }, + { 0xF6D0, 0, "Macron" }, + { 0xF7AF, 0, "Macronsmall" }, + { 0xF76D, 0, "Msmall" }, + { 0x039C, 0, "Mu" }, + { 0x004E, 0116, "N" }, + { 0x0143, 0, "Nacute" }, + { 0x0147, 0, "Ncaron" }, + { 0x0145, 0, "Ncommaaccent" }, + { 0xF76E, 0, "Nsmall" }, + { 0x00D1, 0, "Ntilde" }, + { 0xF7F1, 0, "Ntildesmall" }, + { 0x039D, 0, "Nu" }, + { 0x004F, 0117, "O" }, + { 0x0152, 0, "OE" }, + { 0xF6FA, 0, "OEsmall" }, + { 0x00D3, 0, "Oacute" }, + { 0xF7F3, 0, "Oacutesmall" }, + { 0x014E, 0, "Obreve" }, + { 0x00D4, 0, "Ocircumflex" }, + { 0xF7F4, 0, "Ocircumflexsmall" }, + { 0x00D6, 0, "Odieresis" }, + { 0xF7F6, 0, "Odieresissmall" }, + { 0xF6FB, 0, "Ogoneksmall" }, + { 0x00D2, 0, "Ograve" }, + { 0xF7F2, 0, "Ogravesmall" }, + { 0x01A0, 0, "Ohorn" }, + { 0x0150, 0, "Ohungarumlaut" }, + { 0x014C, 0, "Omacron" }, + { 0x2126, 0, "Omega" }, + { 0x03A9, 0, "Omega" }, + { 0x038F, 0, "Omegatonos" }, + { 0x039F, 0, "Omicron" }, + { 0x038C, 0, "Omicrontonos" }, + { 0x00D8, 0351, "Oslash" }, + { 0x01FE, 0, "Oslashacute" }, + { 0xF7F8, 0, "Oslashsmall" }, + { 0xF76F, 0, "Osmall" }, + { 0x00D5, 0, "Otilde" }, + { 0xF7F5, 0, "Otildesmall" }, + { 0x0050, 0120, "P" }, + { 0x03A6, 0, "Phi" }, + { 0x03A0, 0, "Pi" }, + { 0x03A8, 0, "Psi" }, + { 0xF770, 0, "Psmall" }, + { 0x0051, 0121, "Q" }, + { 0xF771, 0, "Qsmall" }, + { 0x0052, 0122, "R" }, + { 0x0154, 0, "Racute" }, + { 0x0158, 0, "Rcaron" }, + { 0x0156, 0, "Rcommaaccent" }, + { 0x211C, 0, "Rfraktur" }, + { 0x03A1, 0, "Rho" }, + { 0xF6FC, 0, "Ringsmall" }, + { 0xF772, 0, "Rsmall" }, + { 0x0053, 0123, "S" }, + { 0x250C, 0, "SF010000" }, + { 0x2514, 0, "SF020000" }, + { 0x2510, 0, "SF030000" }, + { 0x2518, 0, "SF040000" }, + { 0x253C, 0, "SF050000" }, + { 0x252C, 0, "SF060000" }, + { 0x2534, 0, "SF070000" }, + { 0x251C, 0, "SF080000" }, + { 0x2524, 0, "SF090000" }, + { 0x2500, 0, "SF100000" }, + { 0x2502, 0, "SF110000" }, + { 0x2561, 0, "SF190000" }, + { 0x2562, 0, "SF200000" }, + { 0x2556, 0, "SF210000" }, + { 0x2555, 0, "SF220000" }, + { 0x2563, 0, "SF230000" }, + { 0x2551, 0, "SF240000" }, + { 0x2557, 0, "SF250000" }, + { 0x255D, 0, "SF260000" }, + { 0x255C, 0, "SF270000" }, + { 0x255B, 0, "SF280000" }, + { 0x255E, 0, "SF360000" }, + { 0x255F, 0, "SF370000" }, + { 0x255A, 0, "SF380000" }, + { 0x2554, 0, "SF390000" }, + { 0x2569, 0, "SF400000" }, + { 0x2566, 0, "SF410000" }, + { 0x2560, 0, "SF420000" }, + { 0x2550, 0, "SF430000" }, + { 0x256C, 0, "SF440000" }, + { 0x2567, 0, "SF450000" }, + { 0x2568, 0, "SF460000" }, + { 0x2564, 0, "SF470000" }, + { 0x2565, 0, "SF480000" }, + { 0x2559, 0, "SF490000" }, + { 0x2558, 0, "SF500000" }, + { 0x2552, 0, "SF510000" }, + { 0x2553, 0, "SF520000" }, + { 0x256B, 0, "SF530000" }, + { 0x256A, 0, "SF540000" }, + { 0x015A, 0, "Sacute" }, + { 0x0160, 0, "Scaron" }, + { 0xF6FD, 0, "Scaronsmall" }, + { 0x015E, 0, "Scedilla" }, + { 0xF6C1, 0, "Scedilla" }, + { 0x015C, 0, "Scircumflex" }, + { 0x0218, 0, "Scommaaccent" }, + { 0x03A3, 0, "Sigma" }, + { 0xF773, 0, "Ssmall" }, + { 0x0054, 0124, "T" }, + { 0x03A4, 0, "Tau" }, + { 0x0166, 0, "Tbar" }, + { 0x0164, 0, "Tcaron" }, + { 0x0162, 0, "Tcommaaccent" }, + { 0x021A, 0, "Tcommaaccent" }, + { 0x0398, 0, "Theta" }, + { 0x00DE, 0, "Thorn" }, + { 0xF7FE, 0, "Thornsmall" }, + { 0xF6FE, 0, "Tildesmall" }, + { 0xF774, 0, "Tsmall" }, + { 0x0055, 0125, "U" }, + { 0x00DA, 0, "Uacute" }, + { 0xF7FA, 0, "Uacutesmall" }, + { 0x016C, 0, "Ubreve" }, + { 0x00DB, 0, "Ucircumflex" }, + { 0xF7FB, 0, "Ucircumflexsmall" }, + { 0x00DC, 0, "Udieresis" }, + { 0xF7FC, 0, "Udieresissmall" }, + { 0x00D9, 0, "Ugrave" }, + { 0xF7F9, 0, "Ugravesmall" }, + { 0x01AF, 0, "Uhorn" }, + { 0x0170, 0, "Uhungarumlaut" }, + { 0x016A, 0, "Umacron" }, + { 0x0172, 0, "Uogonek" }, + { 0x03A5, 0, "Upsilon" }, + { 0x03D2, 0, "Upsilon1" }, + { 0x03AB, 0, "Upsilondieresis" }, + { 0x038E, 0, "Upsilontonos" }, + { 0x016E, 0, "Uring" }, + { 0xF775, 0, "Usmall" }, + { 0x0168, 0, "Utilde" }, + { 0x0056, 0126, "V" }, + { 0xF776, 0, "Vsmall" }, + { 0x0057, 0127, "W" }, + { 0x1E82, 0, "Wacute" }, + { 0x0174, 0, "Wcircumflex" }, + { 0x1E84, 0, "Wdieresis" }, + { 0x1E80, 0, "Wgrave" }, + { 0xF777, 0, "Wsmall" }, + { 0x0058, 0130, "X" }, + { 0x039E, 0, "Xi" }, + { 0xF778, 0, "Xsmall" }, + { 0x0059, 0131, "Y" }, + { 0x00DD, 0, "Yacute" }, + { 0xF7FD, 0, "Yacutesmall" }, + { 0x0176, 0, "Ycircumflex" }, + { 0x0178, 0, "Ydieresis" }, + { 0xF7FF, 0, "Ydieresissmall" }, + { 0x1EF2, 0, "Ygrave" }, + { 0xF779, 0, "Ysmall" }, + { 0x005A, 0132, "Z" }, + { 0x0179, 0, "Zacute" }, + { 0x017D, 0, "Zcaron" }, + { 0xF6FF, 0, "Zcaronsmall" }, + { 0x017B, 0, "Zdotaccent" }, + { 0x0396, 0, "Zeta" }, + { 0xF77A, 0, "Zsmall" }, + { 0x0061, 0141, "a" }, + { 0x00E1, 0, "aacute" }, + { 0x0103, 0, "abreve" }, + { 0x00E2, 0, "acircumflex" }, + { 0x00B4, 0302, "acute" }, + { 0x0301, 0, "acutecomb" }, + { 0x00E4, 0, "adieresis" }, + { 0x00E6, 0361, "ae" }, + { 0x01FD, 0, "aeacute" }, + { 0x2015, 0, "afii00208" }, + { 0x0410, 0, "afii10017" }, + { 0x0411, 0, "afii10018" }, + { 0x0412, 0, "afii10019" }, + { 0x0413, 0, "afii10020" }, + { 0x0414, 0, "afii10021" }, + { 0x0415, 0, "afii10022" }, + { 0x0401, 0, "afii10023" }, + { 0x0416, 0, "afii10024" }, + { 0x0417, 0, "afii10025" }, + { 0x0418, 0, "afii10026" }, + { 0x0419, 0, "afii10027" }, + { 0x041A, 0, "afii10028" }, + { 0x041B, 0, "afii10029" }, + { 0x041C, 0, "afii10030" }, + { 0x041D, 0, "afii10031" }, + { 0x041E, 0, "afii10032" }, + { 0x041F, 0, "afii10033" }, + { 0x0420, 0, "afii10034" }, + { 0x0421, 0, "afii10035" }, + { 0x0422, 0, "afii10036" }, + { 0x0423, 0, "afii10037" }, + { 0x0424, 0, "afii10038" }, + { 0x0425, 0, "afii10039" }, + { 0x0426, 0, "afii10040" }, + { 0x0427, 0, "afii10041" }, + { 0x0428, 0, "afii10042" }, + { 0x0429, 0, "afii10043" }, + { 0x042A, 0, "afii10044" }, + { 0x042B, 0, "afii10045" }, + { 0x042C, 0, "afii10046" }, + { 0x042D, 0, "afii10047" }, + { 0x042E, 0, "afii10048" }, + { 0x042F, 0, "afii10049" }, + { 0x0490, 0, "afii10050" }, + { 0x0402, 0, "afii10051" }, + { 0x0403, 0, "afii10052" }, + { 0x0404, 0, "afii10053" }, + { 0x0405, 0, "afii10054" }, + { 0x0406, 0, "afii10055" }, + { 0x0407, 0, "afii10056" }, + { 0x0408, 0, "afii10057" }, + { 0x0409, 0, "afii10058" }, + { 0x040A, 0, "afii10059" }, + { 0x040B, 0, "afii10060" }, + { 0x040C, 0, "afii10061" }, + { 0x040E, 0, "afii10062" }, + { 0xF6C4, 0, "afii10063" }, + { 0xF6C5, 0, "afii10064" }, + { 0x0430, 0, "afii10065" }, + { 0x0431, 0, "afii10066" }, + { 0x0432, 0, "afii10067" }, + { 0x0433, 0, "afii10068" }, + { 0x0434, 0, "afii10069" }, + { 0x0435, 0, "afii10070" }, + { 0x0451, 0, "afii10071" }, + { 0x0436, 0, "afii10072" }, + { 0x0437, 0, "afii10073" }, + { 0x0438, 0, "afii10074" }, + { 0x0439, 0, "afii10075" }, + { 0x043A, 0, "afii10076" }, + { 0x043B, 0, "afii10077" }, + { 0x043C, 0, "afii10078" }, + { 0x043D, 0, "afii10079" }, + { 0x043E, 0, "afii10080" }, + { 0x043F, 0, "afii10081" }, + { 0x0440, 0, "afii10082" }, + { 0x0441, 0, "afii10083" }, + { 0x0442, 0, "afii10084" }, + { 0x0443, 0, "afii10085" }, + { 0x0444, 0, "afii10086" }, + { 0x0445, 0, "afii10087" }, + { 0x0446, 0, "afii10088" }, + { 0x0447, 0, "afii10089" }, + { 0x0448, 0, "afii10090" }, + { 0x0449, 0, "afii10091" }, + { 0x044A, 0, "afii10092" }, + { 0x044B, 0, "afii10093" }, + { 0x044C, 0, "afii10094" }, + { 0x044D, 0, "afii10095" }, + { 0x044E, 0, "afii10096" }, + { 0x044F, 0, "afii10097" }, + { 0x0491, 0, "afii10098" }, + { 0x0452, 0, "afii10099" }, + { 0x0453, 0, "afii10100" }, + { 0x0454, 0, "afii10101" }, + { 0x0455, 0, "afii10102" }, + { 0x0456, 0, "afii10103" }, + { 0x0457, 0, "afii10104" }, + { 0x0458, 0, "afii10105" }, + { 0x0459, 0, "afii10106" }, + { 0x045A, 0, "afii10107" }, + { 0x045B, 0, "afii10108" }, + { 0x045C, 0, "afii10109" }, + { 0x045E, 0, "afii10110" }, + { 0x040F, 0, "afii10145" }, + { 0x0462, 0, "afii10146" }, + { 0x0472, 0, "afii10147" }, + { 0x0474, 0, "afii10148" }, + { 0xF6C6, 0, "afii10192" }, + { 0x045F, 0, "afii10193" }, + { 0x0463, 0, "afii10194" }, + { 0x0473, 0, "afii10195" }, + { 0x0475, 0, "afii10196" }, + { 0xF6C7, 0, "afii10831" }, + { 0xF6C8, 0, "afii10832" }, + { 0x04D9, 0, "afii10846" }, + { 0x200E, 0, "afii299" }, + { 0x200F, 0, "afii300" }, + { 0x200D, 0, "afii301" }, + { 0x066A, 0, "afii57381" }, + { 0x060C, 0, "afii57388" }, + { 0x0660, 0, "afii57392" }, + { 0x0661, 0, "afii57393" }, + { 0x0662, 0, "afii57394" }, + { 0x0663, 0, "afii57395" }, + { 0x0664, 0, "afii57396" }, + { 0x0665, 0, "afii57397" }, + { 0x0666, 0, "afii57398" }, + { 0x0667, 0, "afii57399" }, + { 0x0668, 0, "afii57400" }, + { 0x0669, 0, "afii57401" }, + { 0x061B, 0, "afii57403" }, + { 0x061F, 0, "afii57407" }, + { 0x0621, 0, "afii57409" }, + { 0x0622, 0, "afii57410" }, + { 0x0623, 0, "afii57411" }, + { 0x0624, 0, "afii57412" }, + { 0x0625, 0, "afii57413" }, + { 0x0626, 0, "afii57414" }, + { 0x0627, 0, "afii57415" }, + { 0x0628, 0, "afii57416" }, + { 0x0629, 0, "afii57417" }, + { 0x062A, 0, "afii57418" }, + { 0x062B, 0, "afii57419" }, + { 0x062C, 0, "afii57420" }, + { 0x062D, 0, "afii57421" }, + { 0x062E, 0, "afii57422" }, + { 0x062F, 0, "afii57423" }, + { 0x0630, 0, "afii57424" }, + { 0x0631, 0, "afii57425" }, + { 0x0632, 0, "afii57426" }, + { 0x0633, 0, "afii57427" }, + { 0x0634, 0, "afii57428" }, + { 0x0635, 0, "afii57429" }, + { 0x0636, 0, "afii57430" }, + { 0x0637, 0, "afii57431" }, + { 0x0638, 0, "afii57432" }, + { 0x0639, 0, "afii57433" }, + { 0x063A, 0, "afii57434" }, + { 0x0640, 0, "afii57440" }, + { 0x0641, 0, "afii57441" }, + { 0x0642, 0, "afii57442" }, + { 0x0643, 0, "afii57443" }, + { 0x0644, 0, "afii57444" }, + { 0x0645, 0, "afii57445" }, + { 0x0646, 0, "afii57446" }, + { 0x0648, 0, "afii57448" }, + { 0x0649, 0, "afii57449" }, + { 0x064A, 0, "afii57450" }, + { 0x064B, 0, "afii57451" }, + { 0x064C, 0, "afii57452" }, + { 0x064D, 0, "afii57453" }, + { 0x064E, 0, "afii57454" }, + { 0x064F, 0, "afii57455" }, + { 0x0650, 0, "afii57456" }, + { 0x0651, 0, "afii57457" }, + { 0x0652, 0, "afii57458" }, + { 0x0647, 0, "afii57470" }, + { 0x06A4, 0, "afii57505" }, + { 0x067E, 0, "afii57506" }, + { 0x0686, 0, "afii57507" }, + { 0x0698, 0, "afii57508" }, + { 0x06AF, 0, "afii57509" }, + { 0x0679, 0, "afii57511" }, + { 0x0688, 0, "afii57512" }, + { 0x0691, 0, "afii57513" }, + { 0x06BA, 0, "afii57514" }, + { 0x06D2, 0, "afii57519" }, + { 0x06D5, 0, "afii57534" }, + { 0x20AA, 0, "afii57636" }, + { 0x05BE, 0, "afii57645" }, + { 0x05C3, 0, "afii57658" }, + { 0x05D0, 0, "afii57664" }, + { 0x05D1, 0, "afii57665" }, + { 0x05D2, 0, "afii57666" }, + { 0x05D3, 0, "afii57667" }, + { 0x05D4, 0, "afii57668" }, + { 0x05D5, 0, "afii57669" }, + { 0x05D6, 0, "afii57670" }, + { 0x05D7, 0, "afii57671" }, + { 0x05D8, 0, "afii57672" }, + { 0x05D9, 0, "afii57673" }, + { 0x05DA, 0, "afii57674" }, + { 0x05DB, 0, "afii57675" }, + { 0x05DC, 0, "afii57676" }, + { 0x05DD, 0, "afii57677" }, + { 0x05DE, 0, "afii57678" }, + { 0x05DF, 0, "afii57679" }, + { 0x05E0, 0, "afii57680" }, + { 0x05E1, 0, "afii57681" }, + { 0x05E2, 0, "afii57682" }, + { 0x05E3, 0, "afii57683" }, + { 0x05E4, 0, "afii57684" }, + { 0x05E5, 0, "afii57685" }, + { 0x05E6, 0, "afii57686" }, + { 0x05E7, 0, "afii57687" }, + { 0x05E8, 0, "afii57688" }, + { 0x05E9, 0, "afii57689" }, + { 0x05EA, 0, "afii57690" }, + { 0xFB2A, 0, "afii57694" }, + { 0xFB2B, 0, "afii57695" }, + { 0xFB4B, 0, "afii57700" }, + { 0xFB1F, 0, "afii57705" }, + { 0x05F0, 0, "afii57716" }, + { 0x05F1, 0, "afii57717" }, + { 0x05F2, 0, "afii57718" }, + { 0xFB35, 0, "afii57723" }, + { 0x05B4, 0, "afii57793" }, + { 0x05B5, 0, "afii57794" }, + { 0x05B6, 0, "afii57795" }, + { 0x05BB, 0, "afii57796" }, + { 0x05B8, 0, "afii57797" }, + { 0x05B7, 0, "afii57798" }, + { 0x05B0, 0, "afii57799" }, + { 0x05B2, 0, "afii57800" }, + { 0x05B1, 0, "afii57801" }, + { 0x05B3, 0, "afii57802" }, + { 0x05C2, 0, "afii57803" }, + { 0x05C1, 0, "afii57804" }, + { 0x05B9, 0, "afii57806" }, + { 0x05BC, 0, "afii57807" }, + { 0x05BD, 0, "afii57839" }, + { 0x05BF, 0, "afii57841" }, + { 0x05C0, 0, "afii57842" }, + { 0x02BC, 0, "afii57929" }, + { 0x2105, 0, "afii61248" }, + { 0x2113, 0, "afii61289" }, + { 0x2116, 0, "afii61352" }, + { 0x202C, 0, "afii61573" }, + { 0x202D, 0, "afii61574" }, + { 0x202E, 0, "afii61575" }, + { 0x200C, 0, "afii61664" }, + { 0x066D, 0, "afii63167" }, + { 0x02BD, 0, "afii64937" }, + { 0x00E0, 0, "agrave" }, + { 0x2135, 0, "aleph" }, + { 0x03B1, 0, "alpha" }, + { 0x03AC, 0, "alphatonos" }, + { 0x0101, 0, "amacron" }, + { 0x0026, 046, "ampersand" }, + { 0xF726, 0, "ampersandsmall" }, + { 0x2220, 0, "angle" }, + { 0x2329, 0, "angleleft" }, + { 0x232A, 0, "angleright" }, + { 0x0387, 0, "anoteleia" }, + { 0x0105, 0, "aogonek" }, + { 0x2248, 0, "approxequal" }, + { 0x00E5, 0, "aring" }, + { 0x01FB, 0, "aringacute" }, + { 0x2194, 0, "arrowboth" }, + { 0x21D4, 0, "arrowdblboth" }, + { 0x21D3, 0, "arrowdbldown" }, + { 0x21D0, 0, "arrowdblleft" }, + { 0x21D2, 0, "arrowdblright" }, + { 0x21D1, 0, "arrowdblup" }, + { 0x2193, 0, "arrowdown" }, + { 0xF8E7, 0, "arrowhorizex" }, + { 0x2190, 0, "arrowleft" }, + { 0x2192, 0, "arrowright" }, + { 0x2191, 0, "arrowup" }, + { 0x2195, 0, "arrowupdn" }, + { 0x21A8, 0, "arrowupdnbse" }, + { 0xF8E6, 0, "arrowvertex" }, + { 0x005E, 0136, "asciicircum" }, + { 0x007E, 0176, "asciitilde" }, + { 0x002A, 052, "asterisk" }, + { 0x2217, 0, "asteriskmath" }, + { 0xF6E9, 0, "asuperior" }, + { 0x0040, 0100, "at" }, + { 0x00E3, 0, "atilde" }, + { 0x0062, 0142, "b" }, + { 0x005C, 0134, "backslash" }, + { 0x007C, 0174, "bar" }, + { 0x03B2, 0, "beta" }, + { 0x2588, 0, "block" }, + { 0xF8F4, 0, "braceex" }, + { 0x007B, 0173, "braceleft" }, + { 0xF8F3, 0, "braceleftbt" }, + { 0xF8F2, 0, "braceleftmid" }, + { 0xF8F1, 0, "bracelefttp" }, + { 0x007D, 0175, "braceright" }, + { 0xF8FE, 0, "bracerightbt" }, + { 0xF8FD, 0, "bracerightmid" }, + { 0xF8FC, 0, "bracerighttp" }, + { 0x005B, 0133, "bracketleft" }, + { 0xF8F0, 0, "bracketleftbt" }, + { 0xF8EF, 0, "bracketleftex" }, + { 0xF8EE, 0, "bracketlefttp" }, + { 0x005D, 0135, "bracketright" }, + { 0xF8FB, 0, "bracketrightbt" }, + { 0xF8FA, 0, "bracketrightex" }, + { 0xF8F9, 0, "bracketrighttp" }, + { 0x02D8, 0306, "breve" }, + { 0x00A6, 0, "brokenbar" }, + { 0xF6EA, 0, "bsuperior" }, + { 0x2022, 0267, "bullet" }, + { 0x0063, 0143, "c" }, + { 0x0107, 0, "cacute" }, + { 0x02C7, 0317, "caron" }, + { 0x21B5, 0, "carriagereturn" }, + { 0x010D, 0, "ccaron" }, + { 0x00E7, 0, "ccedilla" }, + { 0x0109, 0, "ccircumflex" }, + { 0x010B, 0, "cdotaccent" }, + { 0x00B8, 0313, "cedilla" }, + { 0x00A2, 0242, "cent" }, + { 0xF6DF, 0, "centinferior" }, + { 0xF7A2, 0, "centoldstyle" }, + { 0xF6E0, 0, "centsuperior" }, + { 0x03C7, 0, "chi" }, + { 0x25CB, 0, "circle" }, + { 0x2297, 0, "circlemultiply" }, + { 0x2295, 0, "circleplus" }, + { 0x02C6, 0303, "circumflex" }, + { 0x2663, 0, "club" }, + { 0x003A, 072, "colon" }, + { 0x20A1, 0, "colonmonetary" }, + { 0x002C, 054, "comma" }, + { 0xF6C3, 0, "commaaccent" }, + { 0xF6E1, 0, "commainferior" }, + { 0xF6E2, 0, "commasuperior" }, + { 0x2245, 0, "congruent" }, + { 0x00A9, 0, "copyright" }, + { 0xF8E9, 0, "copyrightsans" }, + { 0xF6D9, 0, "copyrightserif" }, + { 0x00A4, 0250, "currency" }, + { 0xF6D1, 0, "cyrBreve" }, + { 0xF6D2, 0, "cyrFlex" }, + { 0xF6D4, 0, "cyrbreve" }, + { 0xF6D5, 0, "cyrflex" }, + { 0x0064, 0144, "d" }, + { 0x2020, 0262, "dagger" }, + { 0x2021, 0263, "daggerdbl" }, + { 0xF6D3, 0, "dblGrave" }, + { 0xF6D6, 0, "dblgrave" }, + { 0x010F, 0, "dcaron" }, + { 0x0111, 0, "dcroat" }, + { 0x00B0, 0, "degree" }, + { 0x03B4, 0, "delta" }, + { 0x2666, 0, "diamond" }, + { 0x00A8, 0310, "dieresis" }, + { 0xF6D7, 0, "dieresisacute" }, + { 0xF6D8, 0, "dieresisgrave" }, + { 0x0385, 0, "dieresistonos" }, + { 0x00F7, 0, "divide" }, + { 0x2593, 0, "dkshade" }, + { 0x2584, 0, "dnblock" }, + { 0x0024, 044, "dollar" }, + { 0xF6E3, 0, "dollarinferior" }, + { 0xF724, 0, "dollaroldstyle" }, + { 0xF6E4, 0, "dollarsuperior" }, + { 0x20AB, 0, "dong" }, + { 0x02D9, 0307, "dotaccent" }, + { 0x0323, 0, "dotbelowcomb" }, + { 0x0131, 0365, "dotlessi" }, + { 0xF6BE, 0, "dotlessj" }, + { 0x22C5, 0, "dotmath" }, + { 0xF6EB, 0, "dsuperior" }, + { 0x0065, 0145, "e" }, + { 0x00E9, 0, "eacute" }, + { 0x0115, 0, "ebreve" }, + { 0x011B, 0, "ecaron" }, + { 0x00EA, 0, "ecircumflex" }, + { 0x00EB, 0, "edieresis" }, + { 0x0117, 0, "edotaccent" }, + { 0x00E8, 0, "egrave" }, + { 0x0038, 070, "eight" }, + { 0x2088, 0, "eightinferior" }, + { 0xF738, 0, "eightoldstyle" }, + { 0x2078, 0, "eightsuperior" }, + { 0x2208, 0, "element" }, + { 0x2026, 0274, "ellipsis" }, + { 0x0113, 0, "emacron" }, + { 0x2014, 0320, "emdash" }, + { 0x2205, 0, "emptyset" }, + { 0x2013, 0261, "endash" }, + { 0x014B, 0, "eng" }, + { 0x0119, 0, "eogonek" }, + { 0x03B5, 0, "epsilon" }, + { 0x03AD, 0, "epsilontonos" }, + { 0x003D, 075, "equal" }, + { 0x2261, 0, "equivalence" }, + { 0x212E, 0, "estimated" }, + { 0xF6EC, 0, "esuperior" }, + { 0x03B7, 0, "eta" }, + { 0x03AE, 0, "etatonos" }, + { 0x00F0, 0, "eth" }, + { 0x0021, 041, "exclam" }, + { 0x203C, 0, "exclamdbl" }, + { 0x00A1, 0241, "exclamdown" }, + { 0xF7A1, 0, "exclamdownsmall" }, + { 0xF721, 0, "exclamsmall" }, + { 0x2203, 0, "existential" }, + { 0x0066, 0146, "f" }, + { 0x2640, 0, "female" }, + { 0xFB00, 0, "ff" }, + { 0xFB03, 0, "ffi" }, + { 0xFB04, 0, "ffl" }, + { 0xFB01, 0256, "fi" }, + { 0x2012, 0, "figuredash" }, + { 0x25A0, 0, "filledbox" }, + { 0x25AC, 0, "filledrect" }, + { 0x0035, 065, "five" }, + { 0x215D, 0, "fiveeighths" }, + { 0x2085, 0, "fiveinferior" }, + { 0xF735, 0, "fiveoldstyle" }, + { 0x2075, 0, "fivesuperior" }, + { 0xFB02, 0257, "fl" }, + { 0x0192, 0246, "florin" }, + { 0x0034, 064, "four" }, + { 0x2084, 0, "fourinferior" }, + { 0xF734, 0, "fouroldstyle" }, + { 0x2074, 0, "foursuperior" }, + { 0x2044, 0244, "fraction" }, + { 0x2215, 0244, "fraction" }, + { 0x20A3, 0, "franc" }, + { 0x0067, 0147, "g" }, + { 0x03B3, 0, "gamma" }, + { 0x011F, 0, "gbreve" }, + { 0x01E7, 0, "gcaron" }, + { 0x011D, 0, "gcircumflex" }, + { 0x0123, 0, "gcommaaccent" }, + { 0x0121, 0, "gdotaccent" }, + { 0x00DF, 0373, "germandbls" }, + { 0x2207, 0, "gradient" }, + { 0x0060, 0301, "grave" }, + { 0x0300, 0, "gravecomb" }, + { 0x003E, 076, "greater" }, + { 0x2265, 0, "greaterequal" }, + { 0x00AB, 0253, "guillemotleft" }, + { 0x00BB, 0273, "guillemotright" }, + { 0x2039, 0254, "guilsinglleft" }, + { 0x203A, 0255, "guilsinglright" }, + { 0x0068, 0150, "h" }, + { 0x0127, 0, "hbar" }, + { 0x0125, 0, "hcircumflex" }, + { 0x2665, 0, "heart" }, + { 0x0309, 0, "hookabovecomb" }, + { 0x2302, 0, "house" }, + { 0x02DD, 0315, "hungarumlaut" }, + { 0x002D, 055, "hyphen" }, + { 0x00AD, 0, "hyphen" }, + { 0xF6E5, 0, "hypheninferior" }, + { 0xF6E6, 0, "hyphensuperior" }, + { 0x0069, 0151, "i" }, + { 0x00ED, 0, "iacute" }, + { 0x012D, 0, "ibreve" }, + { 0x00EE, 0, "icircumflex" }, + { 0x00EF, 0, "idieresis" }, + { 0x00EC, 0, "igrave" }, + { 0x0133, 0, "ij" }, + { 0x012B, 0, "imacron" }, + { 0x221E, 0, "infinity" }, + { 0x222B, 0, "integral" }, + { 0x2321, 0, "integralbt" }, + { 0xF8F5, 0, "integralex" }, + { 0x2320, 0, "integraltp" }, + { 0x2229, 0, "intersection" }, + { 0x25D8, 0, "invbullet" }, + { 0x25D9, 0, "invcircle" }, + { 0x263B, 0, "invsmileface" }, + { 0x012F, 0, "iogonek" }, + { 0x03B9, 0, "iota" }, + { 0x03CA, 0, "iotadieresis" }, + { 0x0390, 0, "iotadieresistonos" }, + { 0x03AF, 0, "iotatonos" }, + { 0xF6ED, 0, "isuperior" }, + { 0x0129, 0, "itilde" }, + { 0x006A, 0152, "j" }, + { 0x0135, 0, "jcircumflex" }, + { 0x006B, 0153, "k" }, + { 0x03BA, 0, "kappa" }, + { 0x0137, 0, "kcommaaccent" }, + { 0x0138, 0, "kgreenlandic" }, + { 0x006C, 0154, "l" }, + { 0x013A, 0, "lacute" }, + { 0x03BB, 0, "lambda" }, + { 0x013E, 0, "lcaron" }, + { 0x013C, 0, "lcommaaccent" }, + { 0x0140, 0, "ldot" }, + { 0x003C, 074, "less" }, + { 0x2264, 0, "lessequal" }, + { 0x258C, 0, "lfblock" }, + { 0x20A4, 0, "lira" }, + { 0xF6C0, 0, "ll" }, + { 0x2227, 0, "logicaland" }, + { 0x00AC, 0, "logicalnot" }, + { 0x2228, 0, "logicalor" }, + { 0x017F, 0, "longs" }, + { 0x25CA, 0, "lozenge" }, + { 0x0142, 0370, "lslash" }, + { 0xF6EE, 0, "lsuperior" }, + { 0x2591, 0, "ltshade" }, + { 0x006D, 0155, "m" }, + { 0x00AF, 0305, "macron" }, + { 0x02C9, 0305, "macron" }, + { 0x2642, 0, "male" }, + { 0x2212, 0, "minus" }, + { 0x2032, 0, "minute" }, + { 0xF6EF, 0, "msuperior" }, + { 0x00B5, 0, "mu" }, + { 0x03BC, 0, "mu" }, + { 0x00D7, 0, "multiply" }, + { 0x266A, 0, "musicalnote" }, + { 0x266B, 0, "musicalnotedbl" }, + { 0x006E, 0156, "n" }, + { 0x0144, 0, "nacute" }, + { 0x0149, 0, "napostrophe" }, + { 0x0148, 0, "ncaron" }, + { 0x0146, 0, "ncommaaccent" }, + { 0x0039, 071, "nine" }, + { 0x2089, 0, "nineinferior" }, + { 0xF739, 0, "nineoldstyle" }, + { 0x2079, 0, "ninesuperior" }, + { 0x2209, 0, "notelement" }, + { 0x2260, 0, "notequal" }, + { 0x2284, 0, "notsubset" }, + { 0x207F, 0, "nsuperior" }, + { 0x00F1, 0, "ntilde" }, + { 0x03BD, 0, "nu" }, + { 0x0023, 043, "numbersign" }, + { 0x006F, 0157, "o" }, + { 0x00F3, 0, "oacute" }, + { 0x014F, 0, "obreve" }, + { 0x00F4, 0, "ocircumflex" }, + { 0x00F6, 0, "odieresis" }, + { 0x0153, 0372, "oe" }, + { 0x02DB, 0316, "ogonek" }, + { 0x00F2, 0, "ograve" }, + { 0x01A1, 0, "ohorn" }, + { 0x0151, 0, "ohungarumlaut" }, + { 0x014D, 0, "omacron" }, + { 0x03C9, 0, "omega" }, + { 0x03D6, 0, "omega1" }, + { 0x03CE, 0, "omegatonos" }, + { 0x03BF, 0, "omicron" }, + { 0x03CC, 0, "omicrontonos" }, + { 0x0031, 061, "one" }, + { 0x2024, 0, "onedotenleader" }, + { 0x215B, 0, "oneeighth" }, + { 0xF6DC, 0, "onefitted" }, + { 0x00BD, 0, "onehalf" }, + { 0x2081, 0, "oneinferior" }, + { 0xF731, 0, "oneoldstyle" }, + { 0x00BC, 0, "onequarter" }, + { 0x00B9, 0, "onesuperior" }, + { 0x2153, 0, "onethird" }, + { 0x25E6, 0, "openbullet" }, + { 0x00AA, 0343, "ordfeminine" }, + { 0x00BA, 0353, "ordmasculine" }, + { 0x221F, 0, "orthogonal" }, + { 0x00F8, 0371, "oslash" }, + { 0x01FF, 0, "oslashacute" }, + { 0xF6F0, 0, "osuperior" }, + { 0x00F5, 0, "otilde" }, + { 0x0070, 0160, "p" }, + { 0x00B6, 0266, "paragraph" }, + { 0x0028, 050, "parenleft" }, + { 0xF8ED, 0, "parenleftbt" }, + { 0xF8EC, 0, "parenleftex" }, + { 0x208D, 0, "parenleftinferior" }, + { 0x207D, 0, "parenleftsuperior" }, + { 0xF8EB, 0, "parenlefttp" }, + { 0x0029, 051, "parenright" }, + { 0xF8F8, 0, "parenrightbt" }, + { 0xF8F7, 0, "parenrightex" }, + { 0x208E, 0, "parenrightinferior" }, + { 0x207E, 0, "parenrightsuperior" }, + { 0xF8F6, 0, "parenrighttp" }, + { 0x2202, 0, "partialdiff" }, + { 0x0025, 045, "percent" }, + { 0x002E, 056, "period" }, + { 0x00B7, 0264, "periodcentered" }, + { 0x2219, 0, "periodcentered" }, + { 0xF6E7, 0, "periodinferior" }, + { 0xF6E8, 0, "periodsuperior" }, + { 0x22A5, 0, "perpendicular" }, + { 0x2030, 0275, "perthousand" }, + { 0x20A7, 0, "peseta" }, + { 0x03C6, 0, "phi" }, + { 0x03D5, 0, "phi1" }, + { 0x03C0, 0, "pi" }, + { 0x002B, 053, "plus" }, + { 0x00B1, 0, "plusminus" }, + { 0x211E, 0, "prescription" }, + { 0x220F, 0, "product" }, + { 0x2282, 0, "propersubset" }, + { 0x2283, 0, "propersuperset" }, + { 0x221D, 0, "proportional" }, + { 0x03C8, 0, "psi" }, + { 0x0071, 0161, "q" }, + { 0x003F, 077, "question" }, + { 0x00BF, 0277, "questiondown" }, + { 0xF7BF, 0, "questiondownsmall" }, + { 0xF73F, 0, "questionsmall" }, + { 0x0022, 042, "quotedbl" }, + { 0x201E, 0271, "quotedblbase" }, + { 0x201C, 0252, "quotedblleft" }, + { 0x201D, 0272, "quotedblright" }, + { 0x2018, 0140, "quoteleft" }, + { 0x201B, 0, "quotereversed" }, + { 0x2019, 047, "quoteright" }, + { 0x201A, 0270, "quotesinglbase" }, + { 0x0027, 0251, "quotesingle" }, + { 0x0072, 0162, "r" }, + { 0x0155, 0, "racute" }, + { 0x221A, 0, "radical" }, + { 0xF8E5, 0, "radicalex" }, + { 0x0159, 0, "rcaron" }, + { 0x0157, 0, "rcommaaccent" }, + { 0x2286, 0, "reflexsubset" }, + { 0x2287, 0, "reflexsuperset" }, + { 0x00AE, 0, "registered" }, + { 0xF8E8, 0, "registersans" }, + { 0xF6DA, 0, "registerserif" }, + { 0x2310, 0, "revlogicalnot" }, + { 0x03C1, 0, "rho" }, + { 0x02DA, 0312, "ring" }, + { 0xF6F1, 0, "rsuperior" }, + { 0x2590, 0, "rtblock" }, + { 0xF6DD, 0, "rupiah" }, + { 0x0073, 0163, "s" }, + { 0x015B, 0, "sacute" }, + { 0x0161, 0, "scaron" }, + { 0x015F, 0, "scedilla" }, + { 0xF6C2, 0, "scedilla" }, + { 0x015D, 0, "scircumflex" }, + { 0x0219, 0, "scommaaccent" }, + { 0x2033, 0, "second" }, + { 0x00A7, 0247, "section" }, + { 0x003B, 073, "semicolon" }, + { 0x0037, 067, "seven" }, + { 0x215E, 0, "seveneighths" }, + { 0x2087, 0, "seveninferior" }, + { 0xF737, 0, "sevenoldstyle" }, + { 0x2077, 0, "sevensuperior" }, + { 0x2592, 0, "shade" }, + { 0x03C3, 0, "sigma" }, + { 0x03C2, 0, "sigma1" }, + { 0x223C, 0, "similar" }, + { 0x0036, 066, "six" }, + { 0x2086, 0, "sixinferior" }, + { 0xF736, 0, "sixoldstyle" }, + { 0x2076, 0, "sixsuperior" }, + { 0x002F, 057, "slash" }, + { 0x263A, 0, "smileface" }, + { 0x0020, 040, "space" }, + { 0x00A0, 040, "space" }, + { 0x2660, 0, "spade" }, + { 0xF6F2, 0, "ssuperior" }, + { 0x00A3, 0243, "sterling" }, + { 0x220B, 0, "suchthat" }, + { 0x2211, 0, "summation" }, + { 0x263C, 0, "sun" }, + { 0x0074, 0164, "t" }, + { 0x03C4, 0, "tau" }, + { 0x0167, 0, "tbar" }, + { 0x0165, 0, "tcaron" }, + { 0x0163, 0, "tcommaaccent" }, + { 0x021B, 0, "tcommaaccent" }, + { 0x2234, 0, "therefore" }, + { 0x03B8, 0, "theta" }, + { 0x03D1, 0, "theta1" }, + { 0x00FE, 0, "thorn" }, + { 0x0033, 063, "three" }, + { 0x215C, 0, "threeeighths" }, + { 0x2083, 0, "threeinferior" }, + { 0xF733, 0, "threeoldstyle" }, + { 0x00BE, 0, "threequarters" }, + { 0xF6DE, 0, "threequartersemdash" }, + { 0x00B3, 0, "threesuperior" }, + { 0x02DC, 0304, "tilde" }, + { 0x0303, 0, "tildecomb" }, + { 0x0384, 0, "tonos" }, + { 0x2122, 0, "trademark" }, + { 0xF8EA, 0, "trademarksans" }, + { 0xF6DB, 0, "trademarkserif" }, + { 0x25BC, 0, "triagdn" }, + { 0x25C4, 0, "triaglf" }, + { 0x25BA, 0, "triagrt" }, + { 0x25B2, 0, "triagup" }, + { 0xF6F3, 0, "tsuperior" }, + { 0x0032, 062, "two" }, + { 0x2025, 0, "twodotenleader" }, + { 0x2082, 0, "twoinferior" }, + { 0xF732, 0, "twooldstyle" }, + { 0x00B2, 0, "twosuperior" }, + { 0x2154, 0, "twothirds" }, + { 0x0075, 0165, "u" }, + { 0x00FA, 0, "uacute" }, + { 0x016D, 0, "ubreve" }, + { 0x00FB, 0, "ucircumflex" }, + { 0x00FC, 0, "udieresis" }, + { 0x00F9, 0, "ugrave" }, + { 0x01B0, 0, "uhorn" }, + { 0x0171, 0, "uhungarumlaut" }, + { 0x016B, 0, "umacron" }, + { 0x005F, 0137, "underscore" }, + { 0x2017, 0, "underscoredbl" }, + { 0x222A, 0, "union" }, + { 0x2200, 0, "universal" }, + { 0x0173, 0, "uogonek" }, + { 0x2580, 0, "upblock" }, + { 0x03C5, 0, "upsilon" }, + { 0x03CB, 0, "upsilondieresis" }, + { 0x03B0, 0, "upsilondieresistonos" }, + { 0x03CD, 0, "upsilontonos" }, + { 0x016F, 0, "uring" }, + { 0x0169, 0, "utilde" }, + { 0x0076, 0166, "v" }, + { 0x0077, 0167, "w" }, + { 0x1E83, 0, "wacute" }, + { 0x0175, 0, "wcircumflex" }, + { 0x1E85, 0, "wdieresis" }, + { 0x2118, 0, "weierstrass" }, + { 0x1E81, 0, "wgrave" }, + { 0x0078, 0170, "x" }, + { 0x03BE, 0, "xi" }, + { 0x0079, 0171, "y" }, + { 0x00FD, 0, "yacute" }, + { 0x0177, 0, "ycircumflex" }, + { 0x00FF, 0, "ydieresis" }, + { 0x00A5, 0245, "yen" }, + { 0x1EF3, 0, "ygrave" }, + { 0x007A, 0172, "z" }, + { 0x017A, 0, "zacute" }, + { 0x017E, 0, "zcaron" }, + { 0x017C, 0, "zdotaccent" }, + { 0x0030, 060, "zero" }, + { 0x2080, 0, "zeroinferior" }, + { 0xF730, 0, "zerooldstyle" }, + { 0x2070, 0, "zerosuperior" }, + { 0x03B6, 0, "zeta" } +}; diff --git a/vcl/unx/generic/fontmanager/afm_hash.cpp b/vcl/unx/generic/fontmanager/afm_hash.cpp new file mode 100755 index 000000000000..de01d8cd0434 --- /dev/null +++ b/vcl/unx/generic/fontmanager/afm_hash.cpp @@ -0,0 +1,245 @@ +/* C++ code produced by gperf version 3.0.1 */ +/* Command-line: gperf -C -t -l -L C++ -m 20 -Z AfmKeywordHash afm_keyword_list */ +/* Computed positions: -k'1,4,6,$' */ + +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +#error "gperf generated tables don't work with this execution character set. Please report a bug to ." +#endif + +#line 1 "afm_keyword_list" +struct hash_entry { const char* name; enum parseKey eKey; }; + +#define TOTAL_KEYWORDS 56 +#define MIN_WORD_LENGTH 1 +#define MAX_WORD_LENGTH 18 +#define MIN_HASH_VALUE 1 +#define MAX_HASH_VALUE 57 +/* maximum key range = 57, duplicates = 0 */ + +class AfmKeywordHash +{ +private: + static inline unsigned int hash (const char *str, unsigned int len); +public: + static const struct hash_entry *in_word_set (const char *str, unsigned int len); +}; + +inline unsigned int +AfmKeywordHash::hash (register const char *str, register unsigned int len) +{ + static const unsigned char asso_values[] = + { + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 28, 1, 0, 9, 0, + 19, 58, 2, 10, 58, 0, 28, 0, 20, 58, + 44, 58, 58, 0, 16, 10, 24, 2, 3, 58, + 58, 58, 58, 58, 58, 58, 58, 6, 58, 0, + 19, 0, 58, 25, 14, 6, 58, 58, 17, 11, + 0, 17, 39, 58, 0, 0, 10, 58, 58, 58, + 13, 4, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58 + }; + register int hval = len; + + switch (hval) + { + default: + hval += asso_values[(unsigned char)str[5]]; + /*FALLTHROUGH*/ + case 5: + case 4: + hval += asso_values[(unsigned char)str[3]]; + /*FALLTHROUGH*/ + case 3: + case 2: + case 1: + hval += asso_values[(unsigned char)str[0]]; + break; + } + return hval + asso_values[(unsigned char)str[len - 1]]; +} + +const struct hash_entry * +AfmKeywordHash::in_word_set (register const char *str, register unsigned int len) +{ + static const unsigned char lengthtable[] = + { + 0, 1, 2, 1, 2, 1, 3, 2, 3, 5, 10, 11, 12, 2, + 14, 15, 16, 11, 9, 13, 14, 12, 12, 14, 13, 9, 7, 9, + 7, 9, 14, 5, 6, 14, 12, 16, 10, 14, 11, 10, 7, 1, + 12, 8, 17, 18, 2, 3, 7, 1, 8, 8, 13, 6, 6, 8, + 0, 1 + }; + static const struct hash_entry wordlist[] = + { + {"",NOPE}, +#line 6 "afm_keyword_list" + {"C",CODE}, +#line 7 "afm_keyword_list" + {"CC",COMPCHAR}, +#line 5 "afm_keyword_list" + {"B",CHARBBOX}, +#line 8 "afm_keyword_list" + {"CH",CODEHEX}, +#line 54 "afm_keyword_list" + {"W",XYWIDTH}, +#line 33 "afm_keyword_list" + {"KPX",KERNPAIRXAMT}, +#line 56 "afm_keyword_list" + {"WX",XWIDTH}, +#line 55 "afm_keyword_list" + {"W0X",X0WIDTH}, +#line 47 "afm_keyword_list" + {"StdHW",STDHW}, +#line 12 "afm_keyword_list" + {"Characters",CHARACTERS}, +#line 36 "afm_keyword_list" + {"MetricsSets",METRICSSETS}, +#line 23 "afm_keyword_list" + {"EndKernPairs",ENDKERNPAIRS}, +#line 16 "afm_keyword_list" + {"Em",EM}, +#line 45 "afm_keyword_list" + {"StartKernPairs",STARTKERNPAIRS}, +#line 41 "afm_keyword_list" + {"StartComposites",STARTCOMPOSITES}, +#line 40 "afm_keyword_list" + {"StartCharMetrics",STARTCHARMETRICS}, +#line 22 "afm_keyword_list" + {"EndKernData",ENDKERNDATA}, +#line 14 "afm_keyword_list" + {"Descender",DESCENDER}, +#line 44 "afm_keyword_list" + {"StartKernData",STARTKERNDATA}, +#line 18 "afm_keyword_list" + {"EndCharMetrics",ENDCHARMETRICS}, +#line 20 "afm_keyword_list" + {"EndDirection",ENDDIRECTION}, +#line 11 "afm_keyword_list" + {"CharacterSet",CHARACTERSET}, +#line 42 "afm_keyword_list" + {"StartDirection",STARTDIRECTION}, +#line 19 "afm_keyword_list" + {"EndComposites",ENDCOMPOSITES}, +#line 49 "afm_keyword_list" + {"TrackKern",TRACKKERN}, +#line 15 "afm_keyword_list" + {"Descent",DESCENT}, +#line 9 "afm_keyword_list" + {"CapHeight",CAPHEIGHT}, +#line 13 "afm_keyword_list" + {"Comment",COMMENT}, +#line 10 "afm_keyword_list" + {"CharWidth",CHARWIDTH}, +#line 46 "afm_keyword_list" + {"StartTrackKern",STARTTRACKKERN}, +#line 48 "afm_keyword_list" + {"StdVW",STDVW}, +#line 38 "afm_keyword_list" + {"Notice",NOTICE}, +#line 21 "afm_keyword_list" + {"EndFontMetrics",ENDFONTMETRICS}, +#line 24 "afm_keyword_list" + {"EndTrackKern",ENDTRACKKERN}, +#line 43 "afm_keyword_list" + {"StartFontMetrics",STARTFONTMETRICS}, +#line 29 "afm_keyword_list" + {"IsBaseFont",ISBASEFONT}, +#line 17 "afm_keyword_list" + {"EncodingScheme",ENCODINGSCHEME}, +#line 31 "afm_keyword_list" + {"ItalicAngle",ITALICANGLE}, +#line 25 "afm_keyword_list" + {"FamilyName",FAMILYNAME}, +#line 58 "afm_keyword_list" + {"XHeight",XHEIGHT}, +#line 37 "afm_keyword_list" + {"N",CHARNAME}, +#line 30 "afm_keyword_list" + {"IsFixedPitch",ISFIXEDPITCH}, +#line 27 "afm_keyword_list" + {"FontName",FONTNAME}, +#line 50 "afm_keyword_list" + {"UnderlinePosition",UNDERLINEPOSITION}, +#line 51 "afm_keyword_list" + {"UnderlineThickness",UNDERLINETHICKNESS}, +#line 32 "afm_keyword_list" + {"KP",KERNPAIR}, +#line 39 "afm_keyword_list" + {"PCC",COMPCHARPIECE}, +#line 53 "afm_keyword_list" + {"Version",VERSION}, +#line 52 "afm_keyword_list" + {"V",VVECTOR}, +#line 28 "afm_keyword_list" + {"FullName",FULLNAME}, +#line 26 "afm_keyword_list" + {"FontBBox",FONTBBOX}, +#line 35 "afm_keyword_list" + {"MappingScheme",MAPPINGSCHEME}, +#line 57 "afm_keyword_list" + {"Weight",WEIGHT}, +#line 4 "afm_keyword_list" + {"Ascent",ASCENT}, +#line 3 "afm_keyword_list" + {"Ascender",ASCENDER}, + {"",NOPE}, +#line 34 "afm_keyword_list" + {"L",LIGATURE} + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + register int key = hash (str, len); + + if (key <= MAX_HASH_VALUE && key >= 0) + if (len == lengthtable[key]) + { + register const char *s = wordlist[key].name; + + if (*str == *s && !memcmp (str + 1, s + 1, len - 1)) + return &wordlist[key]; + } + } + return 0; +} diff --git a/vcl/unx/generic/fontmanager/afm_keyword_list b/vcl/unx/generic/fontmanager/afm_keyword_list new file mode 100755 index 000000000000..263d76bca4d3 --- /dev/null +++ b/vcl/unx/generic/fontmanager/afm_keyword_list @@ -0,0 +1,58 @@ +struct hash_entry { char* name; enum parseKey eKey; }; +%% +Ascender,ASCENDER +Ascent,ASCENT +B,CHARBBOX +C,CODE +CC,COMPCHAR +CH,CODEHEX +CapHeight,CAPHEIGHT +CharWidth,CHARWIDTH +CharacterSet,CHARACTERSET +Characters,CHARACTERS +Comment,COMMENT +Descender,DESCENDER +Descent,DESCENT +Em,EM +EncodingScheme,ENCODINGSCHEME +EndCharMetrics,ENDCHARMETRICS +EndComposites,ENDCOMPOSITES +EndDirection,ENDDIRECTION +EndFontMetrics,ENDFONTMETRICS +EndKernData,ENDKERNDATA +EndKernPairs,ENDKERNPAIRS +EndTrackKern,ENDTRACKKERN +FamilyName,FAMILYNAME +FontBBox,FONTBBOX +FontName,FONTNAME +FullName,FULLNAME +IsBaseFont,ISBASEFONT +IsFixedPitch,ISFIXEDPITCH +ItalicAngle,ITALICANGLE +KP,KERNPAIR +KPX,KERNPAIRXAMT +L,LIGATURE +MappingScheme,MAPPINGSCHEME +MetricsSets,METRICSSETS +N,CHARNAME +Notice,NOTICE +PCC,COMPCHARPIECE +StartCharMetrics,STARTCHARMETRICS +StartComposites,STARTCOMPOSITES +StartDirection,STARTDIRECTION +StartFontMetrics,STARTFONTMETRICS +StartKernData,STARTKERNDATA +StartKernPairs,STARTKERNPAIRS +StartTrackKern,STARTTRACKKERN +StdHW,STDHW +StdVW,STDVW +TrackKern,TRACKKERN +UnderlinePosition,UNDERLINEPOSITION +UnderlineThickness,UNDERLINETHICKNESS +V,VVECTOR +Version,VERSION +W,XYWIDTH +W0X,X0WIDTH +WX,XWIDTH +Weight,WEIGHT +XHeight,XHEIGHT diff --git a/vcl/unx/generic/fontmanager/fontcache.cxx b/vcl/unx/generic/fontmanager/fontcache.cxx new file mode 100644 index 000000000000..639e394f0edd --- /dev/null +++ b/vcl/unx/generic/fontmanager/fontcache.cxx @@ -0,0 +1,811 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include + +#include "fontcache.hxx" + +#include "osl/thread.h" + +#include "unotools/atom.hxx" + +#include "tools/stream.hxx" + +#include +#include + +#if OSL_DEBUG_LEVEL >1 +#include +#endif + +#define FONTCACHEFILE "/user/psprint/pspfontcache" +#define CACHE_MAGIC "PspFontCacheFile format 4" + +using namespace std; +using namespace rtl; +using namespace psp; +using namespace utl; + +/* + * static helpers + */ + +/* + * FontCache constructor + */ + +FontCache::FontCache() +{ + m_bDoFlush = false; + m_aCacheFile = getOfficePath( UserPath ); + if( m_aCacheFile.Len() ) + { + m_aCacheFile.AppendAscii( FONTCACHEFILE ); + read(); + } +} + +/* + * FontCache destructor + */ + +FontCache::~FontCache() +{ + clearCache(); +} + +/* + * FontCache::clearCache + */ +void FontCache::clearCache() +{ + for( FontCacheData::iterator dir_it = m_aCache.begin(); dir_it != m_aCache.end(); ++dir_it ) + { + for( FontDirMap::iterator entry_it = dir_it->second.m_aEntries.begin(); entry_it != dir_it->second.m_aEntries.end(); ++entry_it ) + { + for( FontCacheEntry::iterator font_it = entry_it->second.m_aEntry.begin(); font_it != entry_it->second.m_aEntry.end(); ++font_it ) + delete *font_it; + } + } + m_aCache.clear(); +} + +/* + * FontCache::Commit + */ + +void FontCache::flush() +{ + if( ! m_bDoFlush || ! m_aCacheFile.Len() ) + return; + + SvFileStream aStream; + aStream.Open( m_aCacheFile, STREAM_WRITE | STREAM_TRUNC ); + if( ! (aStream.IsOpen() && aStream.IsWritable()) ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "FontCache::flush: opening cache file %s failed\n", ByteString( m_aCacheFile, osl_getThreadTextEncoding() ).GetBuffer() ); +#endif + return; + } + + aStream.SetLineDelimiter( LINEEND_LF ); + aStream.WriteLine( ByteString( CACHE_MAGIC ) ); + + PrintFontManager& rManager( PrintFontManager::get() ); + MultiAtomProvider* pAtoms = rManager.m_pAtoms; + + for( FontCacheData::const_iterator dir_it = m_aCache.begin(); dir_it != m_aCache.end(); ++ dir_it ) + { + const FontDirMap& rDir( dir_it->second.m_aEntries ); + + ByteString aDirectory( rManager.getDirectory( dir_it->first ) ); + ByteString aLine( "FontCacheDirectory:" ); + aLine.Append( ByteString::CreateFromInt64( dir_it->second.m_nTimestamp ) ); + aLine.Append( ':' ); + aLine.Append( aDirectory ); + if( rDir.empty() && dir_it->second.m_bNoFiles ) + aLine.Insert( "Empty", 0 ); + aStream.WriteLine( aLine ); + + for( FontDirMap::const_iterator entry_it = rDir.begin(); entry_it != rDir.end(); ++entry_it ) + { + // insert cache entries + const FontCacheEntry& rEntry( entry_it->second.m_aEntry ); + if( rEntry.begin() == rEntry.end() ) + continue; + + aLine = "File:"; + aLine.Append( ByteString( entry_it->first ) ); + aStream.WriteLine( aLine ); + + int nEntrySize = entry_it->second.m_aEntry.size(); + // write: type;nfonts + aLine = ByteString::CreateFromInt32( rEntry.front()->m_eType ); + aLine.Append( ';' ); + aLine.Append( ByteString::CreateFromInt32( nEntrySize ) ); + aStream.WriteLine( aLine ); + + sal_Int32 nSubEntry = 0; + for( FontCacheEntry::const_iterator it = rEntry.begin(); it != rEntry.end(); ++it, nSubEntry++ ) + { + /* + * for each font entry write: + * name[;name[;name]] + * fontnr;PSName;italic;weight;width;pitch;encoding;ascend;descend;leading;vsubst;gxw;gxh;gyw;gyh;useroverrride;embed;antialias[;{metricfile,typeflags}][;stylename] + */ + if( nEntrySize > 1 ) + nSubEntry = static_cast(*it)->m_nCollectionEntry; + else + nSubEntry = -1; + + aLine = OUStringToOString( pAtoms->getString( ATOM_FAMILYNAME, (*it)->m_nFamilyName ), RTL_TEXTENCODING_UTF8 ); + for( ::std::list< int >::const_iterator name_it = (*it)->m_aAliases.begin(); name_it != (*it)->m_aAliases.end(); ++name_it ) + { + const OUString& rAdd( pAtoms->getString( ATOM_FAMILYNAME, *name_it ) ); + if( rAdd.getLength() ) + { + aLine.Append( ';' ); + aLine.Append( ByteString( String( rAdd ), RTL_TEXTENCODING_UTF8 ) ); + } + } + aStream.WriteLine( aLine ); + + const OUString& rPSName( pAtoms->getString( ATOM_PSNAME, (*it)->m_nPSName ) ); + aLine = ByteString::CreateFromInt32( nSubEntry ); + aLine.Append( ';' ); + aLine.Append( ByteString( String( rPSName ), RTL_TEXTENCODING_UTF8 ) ); + aLine.Append( ';' ); + aLine.Append( ByteString::CreateFromInt32( (*it)->m_eItalic ) ); + aLine.Append( ';' ); + aLine.Append( ByteString::CreateFromInt32( (*it)->m_eWeight ) ); + aLine.Append( ';' ); + aLine.Append( ByteString::CreateFromInt32( (*it)->m_eWidth ) ); + aLine.Append( ';' ); + aLine.Append( ByteString::CreateFromInt32( (*it)->m_ePitch ) ); + aLine.Append( ';' ); + aLine.Append( ByteString::CreateFromInt32( (*it)->m_aEncoding ) ); + aLine.Append( ';' ); + aLine.Append( ByteString::CreateFromInt32( (*it)->m_nAscend ) ); + aLine.Append( ';' ); + aLine.Append( ByteString::CreateFromInt32( (*it)->m_nDescend ) ); + aLine.Append( ';' ); + aLine.Append( ByteString::CreateFromInt32( (*it)->m_nLeading ) ); + aLine.Append( ';' ); + aLine.Append( (*it)->m_bHaveVerticalSubstitutedGlyphs ? "1" : "0" ); + aLine.Append( ';' ); + aLine.Append( ByteString::CreateFromInt32( (*it)->m_aGlobalMetricX.width ) ); + aLine.Append( ';' ); + aLine.Append( ByteString::CreateFromInt32( (*it)->m_aGlobalMetricX.height ) ); + aLine.Append( ';' ); + aLine.Append( ByteString::CreateFromInt32( (*it)->m_aGlobalMetricY.width ) ); + aLine.Append( ';' ); + aLine.Append( ByteString::CreateFromInt32( (*it)->m_aGlobalMetricY.height ) ); + aLine.Append( ';' ); + aLine.Append( (*it)->m_bUserOverride ? "1" : "0" ); + aLine.Append( ';' ); + aLine.Append( ByteString::CreateFromInt32( 0 ) ); + aLine.Append( ';' ); + aLine.Append( ByteString::CreateFromInt32( 0 ) ); + + switch( (*it)->m_eType ) + { + case fonttype::Type1: + aLine.Append( ';' ); + aLine.Append( ByteString( static_cast(*it)->m_aMetricFile ) ); + break; + case fonttype::TrueType: + aLine.Append( ';' ); + aLine.Append( ByteString::CreateFromInt32( static_cast(*it)->m_nTypeFlags ) ); + break; + default: break; + } + if( (*it)->m_aStyleName.getLength() ) + { + aLine.Append( ';' ); + aLine.Append( ByteString( String( (*it)->m_aStyleName ), RTL_TEXTENCODING_UTF8 ) ); + } + aStream.WriteLine( aLine ); + } + aStream.WriteLine( ByteString() ); + } + } + m_bDoFlush = false; +} + +/* + * FontCache::read + */ + +void FontCache::read() +{ + PrintFontManager& rManager( PrintFontManager::get() ); + MultiAtomProvider* pAtoms = rManager.m_pAtoms; + + SvFileStream aStream( m_aCacheFile, STREAM_READ ); + if( ! aStream.IsOpen() ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "FontCache::read: opening cache file %s failed\n", ByteString( m_aCacheFile, osl_getThreadTextEncoding() ).GetBuffer() ); +#endif + return; + } + + + ByteString aLine; + aStream.ReadLine( aLine ); + if( !aLine.Equals( CACHE_MAGIC ) ) + { + #if OSL_DEBUG_LEVEL >1 + fprintf( stderr, "FontCache::read: cache file %s fails magic test\n", ByteString( m_aCacheFile, osl_getThreadTextEncoding() ).GetBuffer() ); + #endif + return; + } + + int nDir = 0; + FontDirMap* pDir = NULL; + xub_StrLen nIndex; + bool bKeepOnlyUserOverridden = false; + do + { + aStream.ReadLine( aLine ); + if( aLine.CompareTo( "FontCacheDirectory:", 19 ) == COMPARE_EQUAL || + aLine.CompareTo( "EmptyFontCacheDirectory:", 24 ) == COMPARE_EQUAL ) + { + bool bEmpty = (aLine.CompareTo( "Empty", 5 ) == COMPARE_EQUAL); + xub_StrLen nSearchIndex = bEmpty ? 24 : 19; + + OString aDir; + sal_Int64 nTimestamp = 0; + xub_StrLen nTEnd = aLine.Search( ':', nSearchIndex ); + if( nTEnd != STRING_NOTFOUND ) + { + nTimestamp = aLine.Copy( nSearchIndex, nTEnd - nSearchIndex ).ToInt64(); + aDir = aLine.Copy( nTEnd+1 ); + } + else + { + // invalid format, remove + pDir = NULL; + nDir = 0; + m_bDoFlush = true; + continue; + } + + // is the directory modified ? + struct stat aStat; + if( stat( aDir.getStr(), &aStat ) || + ! S_ISDIR(aStat.st_mode) ) + { + // remove outdated cache data + pDir = NULL; + nDir = 0; + m_bDoFlush = true; + continue; + } + else + { + nDir = rManager.getDirectoryAtom( aDir, true ); + m_aCache[ nDir ].m_nTimestamp = (sal_Int64)aStat.st_mtime; + m_aCache[ nDir ].m_bNoFiles = bEmpty; + pDir = bEmpty ? NULL : &m_aCache[ nDir ].m_aEntries; + bKeepOnlyUserOverridden = ((sal_Int64)aStat.st_mtime != nTimestamp); + m_aCache[ nDir ].m_bUserOverrideOnly = bKeepOnlyUserOverridden; + } + } + else if( pDir && aLine.CompareTo( "File:", 5 ) == COMPARE_EQUAL ) + { + OString aFile( aLine.Copy( 5 ) ); + aStream.ReadLine( aLine ); + + const char* pLine = aLine.GetBuffer(); + + fonttype::type eType = (fonttype::type)atoi( pLine ); + if( eType != fonttype::TrueType && + eType != fonttype::Type1 && + eType != fonttype::Builtin + ) + continue; + while( *pLine && *pLine != ';' ) + pLine++; + if( *pLine != ';' ) + continue; + + pLine++; + sal_Int32 nFonts = atoi( pLine ); + for( int n = 0; n < nFonts; n++ ) + { + aStream.ReadLine( aLine ); + pLine = aLine.GetBuffer(); + int nLen = aLine.Len(); + + PrintFontManager::PrintFont* pFont = NULL; + switch( eType ) + { + case fonttype::TrueType: + pFont = new PrintFontManager::TrueTypeFontFile(); + break; + case fonttype::Type1: + pFont = new PrintFontManager::Type1FontFile(); + break; + case fonttype::Builtin: + pFont = new PrintFontManager::BuiltinFont(); + break; + default: break; + } + + for( nIndex = 0; nIndex < nLen && pLine[nIndex] != ';'; nIndex++ ) + ; + + pFont->m_nFamilyName = pAtoms->getAtom( ATOM_FAMILYNAME, + OUString( pLine, nIndex, RTL_TEXTENCODING_UTF8 ), + sal_True ); + while( nIndex < nLen ) + { + xub_StrLen nLastIndex = nIndex+1; + for( nIndex = nLastIndex ; nIndex < nLen && pLine[nIndex] != ';'; nIndex++ ) + ; + if( nIndex - nLastIndex ) + { + OUString aAlias( pLine+nLastIndex, nIndex-nLastIndex, RTL_TEXTENCODING_UTF8 ); + pFont->m_aAliases.push_back( pAtoms->getAtom( ATOM_FAMILYNAME, aAlias, sal_True ) ); + } + } + aStream.ReadLine( aLine ); + pLine = aLine.GetBuffer(); + nLen = aLine.Len(); + + // get up to 20 token positions + const int nMaxTokens = 20; + int nTokenPos[nMaxTokens]; + nTokenPos[0] = 0; + int nTokens = 1; + for( int i = 0; i < nLen; i++ ) + { + if( pLine[i] == ';' ) + { + nTokenPos[nTokens++] = i+1; + if( nTokens == nMaxTokens ) + break; + } + } + if( nTokens < 18 ) + { + delete pFont; + continue; + } + int nCollEntry = atoi( pLine ); + pFont->m_nPSName = pAtoms->getAtom( ATOM_PSNAME, OUString( pLine + nTokenPos[1], nTokenPos[2]-nTokenPos[1]-1, RTL_TEXTENCODING_UTF8 ), sal_True ); + pFont->m_eItalic = (italic::type)atoi( pLine+nTokenPos[2] ); + pFont->m_eWeight = (weight::type)atoi( pLine+nTokenPos[3] ); + pFont->m_eWidth = (width::type)atoi( pLine+nTokenPos[4] ); + pFont->m_ePitch = (pitch::type)atoi( pLine+nTokenPos[5] ); + pFont->m_aEncoding = (rtl_TextEncoding)atoi( pLine+nTokenPos[6] ); + pFont->m_nAscend = atoi( pLine + nTokenPos[7] ); + pFont->m_nDescend = atoi( pLine + nTokenPos[8] ); + pFont->m_nLeading = atoi( pLine + nTokenPos[9] ); + pFont->m_bHaveVerticalSubstitutedGlyphs + = (atoi( pLine + nTokenPos[10] ) != 0); + pFont->m_aGlobalMetricX.width + = atoi( pLine + nTokenPos[11] ); + pFont->m_aGlobalMetricX.height + = atoi( pLine + nTokenPos[12] ); + pFont->m_aGlobalMetricY.width + = atoi( pLine + nTokenPos[13] ); + pFont->m_aGlobalMetricY.height + = atoi( pLine + nTokenPos[14] ); + pFont->m_bUserOverride + = (atoi( pLine + nTokenPos[15] ) != 0); + int nStyleTokenNr = 18; + switch( eType ) + { + case fonttype::TrueType: + static_cast(pFont)->m_nTypeFlags = atoi( pLine + nTokenPos[18] ); + static_cast(pFont)->m_nCollectionEntry = nCollEntry; + static_cast(pFont)->m_nDirectory = nDir; + static_cast(pFont)->m_aFontFile = aFile; + nStyleTokenNr++; + break; + case fonttype::Type1: + { + int nTokLen = (nTokens > 19 ) ? nTokenPos[19]-nTokenPos[18]-1 : nLen - nTokenPos[18]; + static_cast(pFont)->m_aMetricFile = OString( pLine + nTokenPos[18], nTokLen ); + static_cast(pFont)->m_nDirectory = nDir; + static_cast(pFont)->m_aFontFile = aFile; + nStyleTokenNr++; + } + break; + case fonttype::Builtin: + static_cast(pFont)->m_nDirectory = nDir; + static_cast(pFont)->m_aMetricFile = aFile; + break; + default: break; + } + if( nTokens > nStyleTokenNr ) + pFont->m_aStyleName = OUString::intern( pLine + nTokenPos[nStyleTokenNr], + nLen - nTokenPos[nStyleTokenNr], + RTL_TEXTENCODING_UTF8 ); + + bool bObsolete = false; + if( bKeepOnlyUserOverridden ) + { + if( pFont->m_bUserOverride ) + { + ByteString aFilePath = rManager.getDirectory( nDir ); + aFilePath.Append( '/' ); + aFilePath.Append( ByteString(aFile) ); + struct stat aStat; + if( stat( aFilePath.GetBuffer(), &aStat ) || + ! S_ISREG( aStat.st_mode ) || + aStat.st_size < 16 ) + { + bObsolete = true; + } + #if OSL_DEBUG_LEVEL > 2 + else + fprintf( stderr, "keeping file %s in outdated cache entry due to user override\n", + aFilePath.GetBuffer() ); + #endif + } + else + bObsolete = true; + } + if( bObsolete ) + { + m_bDoFlush = true; +#if OSL_DEBUG_LEVEL > 2 + fprintf( stderr, "removing obsolete font %s\n", aFile.getStr() ); +#endif + delete pFont; + continue; + } + + FontCacheEntry& rEntry = (*pDir)[aFile].m_aEntry; + rEntry.push_back( pFont ); + } + } + } while( ! aStream.IsEof() ); +} + +/* + * FontCache::updateDirTimestamp + */ +void FontCache::updateDirTimestamp( int nDirID ) +{ + PrintFontManager& rManager( PrintFontManager::get() ); + const OString& rDir = rManager.getDirectory( nDirID ); + + struct stat aStat; + if( ! stat( rDir.getStr(), &aStat ) ) + m_aCache[ nDirID ].m_nTimestamp = (sal_Int64)aStat.st_mtime; +} + + +/* + * FontCache::copyPrintFont + */ +void FontCache::copyPrintFont( const PrintFontManager::PrintFont* pFrom, PrintFontManager::PrintFont* pTo ) const +{ + if( pFrom->m_eType != pTo->m_eType ) + return; + switch( pFrom->m_eType ) + { + case fonttype::TrueType: + static_cast(pTo)->m_nDirectory = static_cast(pFrom)->m_nDirectory; + static_cast(pTo)->m_aFontFile = static_cast(pFrom)->m_aFontFile; + static_cast(pTo)->m_nCollectionEntry = static_cast(pFrom)->m_nCollectionEntry; + static_cast(pTo)->m_nTypeFlags = static_cast(pFrom)->m_nTypeFlags; + break; + case fonttype::Type1: + static_cast(pTo)->m_nDirectory = static_cast(pFrom)->m_nDirectory; + static_cast(pTo)->m_aFontFile = static_cast(pFrom)->m_aFontFile; + static_cast(pTo)->m_aMetricFile = static_cast(pFrom)->m_aMetricFile; + break; + case fonttype::Builtin: + static_cast(pTo)->m_nDirectory = static_cast(pFrom)->m_nDirectory; + static_cast(pTo)->m_aMetricFile = static_cast(pFrom)->m_aMetricFile; + break; + default: break; + } + pTo->m_nFamilyName = pFrom->m_nFamilyName; + pTo->m_aStyleName = pFrom->m_aStyleName; + pTo->m_aAliases = pFrom->m_aAliases; + pTo->m_nPSName = pFrom->m_nPSName; + pTo->m_eItalic = pFrom->m_eItalic; + pTo->m_eWeight = pFrom->m_eWeight; + pTo->m_eWidth = pFrom->m_eWidth; + pTo->m_ePitch = pFrom->m_ePitch; + pTo->m_aEncoding = pFrom->m_aEncoding; + pTo->m_aGlobalMetricX = pFrom->m_aGlobalMetricX; + pTo->m_aGlobalMetricY = pFrom->m_aGlobalMetricY; + pTo->m_nAscend = pFrom->m_nAscend; + pTo->m_nDescend = pFrom->m_nDescend; + pTo->m_nLeading = pFrom->m_nLeading; + pTo->m_nXMin = pFrom->m_nXMin; + pTo->m_nYMin = pFrom->m_nYMin; + pTo->m_nXMax = pFrom->m_nXMax; + pTo->m_nYMax = pFrom->m_nYMax; + pTo->m_bHaveVerticalSubstitutedGlyphs = pFrom->m_bHaveVerticalSubstitutedGlyphs; + pTo->m_bUserOverride = pFrom->m_bUserOverride; +} + +/* + * FontCache::equalsPrintFont + */ +bool FontCache::equalsPrintFont( const PrintFontManager::PrintFont* pLeft, PrintFontManager::PrintFont* pRight ) const +{ + if( pLeft->m_eType != pRight->m_eType ) + return false; + switch( pLeft->m_eType ) + { + case fonttype::TrueType: + { + const PrintFontManager::TrueTypeFontFile* pLT = static_cast(pLeft); + const PrintFontManager::TrueTypeFontFile* pRT = static_cast(pRight); + if( pRT->m_nDirectory != pLT->m_nDirectory || + pRT->m_aFontFile != pLT->m_aFontFile || + pRT->m_nCollectionEntry != pLT->m_nCollectionEntry || + pRT->m_nTypeFlags != pLT->m_nTypeFlags ) + return false; + } + break; + case fonttype::Type1: + { + const PrintFontManager::Type1FontFile* pLT = static_cast(pLeft); + const PrintFontManager::Type1FontFile* pRT = static_cast(pRight); + if( pRT->m_nDirectory != pLT->m_nDirectory || + pRT->m_aFontFile != pLT->m_aFontFile || + pRT->m_aMetricFile != pLT->m_aMetricFile ) + return false; + } + break; + case fonttype::Builtin: + { + const PrintFontManager::BuiltinFont* pLT = static_cast(pLeft); + const PrintFontManager::BuiltinFont* pRT = static_cast(pRight); + if( pRT->m_nDirectory != pLT->m_nDirectory || + pRT->m_aMetricFile != pLT->m_aMetricFile ) + return false; + } + break; + default: break; + } + if( pRight->m_nFamilyName != pLeft->m_nFamilyName || + pRight->m_aStyleName != pLeft->m_aStyleName || + pRight->m_nPSName != pLeft->m_nPSName || + pRight->m_eItalic != pLeft->m_eItalic || + pRight->m_eWeight != pLeft->m_eWeight || + pRight->m_eWidth != pLeft->m_eWidth || + pRight->m_ePitch != pLeft->m_ePitch || + pRight->m_aEncoding != pLeft->m_aEncoding || + pRight->m_aGlobalMetricX != pLeft->m_aGlobalMetricX || + pRight->m_aGlobalMetricY != pLeft->m_aGlobalMetricY || + pRight->m_nAscend != pLeft->m_nAscend || + pRight->m_nDescend != pLeft->m_nDescend || + pRight->m_nLeading != pLeft->m_nLeading || + pRight->m_nXMin != pLeft->m_nXMin || + pRight->m_nYMin != pLeft->m_nYMin || + pRight->m_nXMax != pLeft->m_nXMax || + pRight->m_nYMax != pLeft->m_nYMax || + pRight->m_bHaveVerticalSubstitutedGlyphs != pLeft->m_bHaveVerticalSubstitutedGlyphs || + pRight->m_bUserOverride != pLeft->m_bUserOverride + ) + return false; + std::list< int >::const_iterator lit, rit; + for( lit = pLeft->m_aAliases.begin(), rit = pRight->m_aAliases.begin(); + lit != pLeft->m_aAliases.end() && rit != pRight->m_aAliases.end() && (*lit) == (*rit); + ++lit, ++rit ) + ; + return lit == pLeft->m_aAliases.end() && rit == pRight->m_aAliases.end(); +} + +/* + * FontCache::clonePrintFont + */ +PrintFontManager::PrintFont* FontCache::clonePrintFont( const PrintFontManager::PrintFont* pOldFont ) const +{ + PrintFontManager::PrintFont* pFont = NULL; + switch( pOldFont->m_eType ) + { + case fonttype::TrueType: + pFont = new PrintFontManager::TrueTypeFontFile(); + break; + case fonttype::Type1: + pFont = new PrintFontManager::Type1FontFile(); + break; + case fonttype::Builtin: + pFont = new PrintFontManager::BuiltinFont(); + break; + default: break; + } + if( pFont ) + { + copyPrintFont( pOldFont, pFont ); + } + return pFont; + } + +/* + * FontCache::getFontCacheFile + */ +bool FontCache::getFontCacheFile( int nDirID, const OString& rFile, list< PrintFontManager::PrintFont* >& rNewFonts ) const +{ + bool bSuccess = false; + + FontCacheData::const_iterator dir = m_aCache.find( nDirID ); + if( dir != m_aCache.end() ) + { + FontDirMap::const_iterator entry = dir->second.m_aEntries.find( rFile ); + if( entry != dir->second.m_aEntries.end() ) + { + for( FontCacheEntry::const_iterator font = entry->second.m_aEntry.begin(); font != entry->second.m_aEntry.end(); ++font ) + { + bSuccess = true; + PrintFontManager::PrintFont* pFont = clonePrintFont( *font ); + rNewFonts.push_back( pFont ); + } + } + } + return bSuccess; +} + +/* + * FontCache::updateFontCacheEntry + */ +void FontCache::updateFontCacheEntry( const PrintFontManager::PrintFont* pFont, bool bFlush ) +{ + PrintFontManager& rManager( PrintFontManager::get() ); + + OString aFile; + int nDirID = 0; + switch( pFont->m_eType ) + { + case fonttype::TrueType: + nDirID = static_cast(pFont)->m_nDirectory; + aFile = static_cast(pFont)->m_aFontFile; + break; + case fonttype::Type1: + nDirID = static_cast(pFont)->m_nDirectory; + aFile = static_cast(pFont)->m_aFontFile; + break; + case fonttype::Builtin: + nDirID = static_cast(pFont)->m_nDirectory; + aFile = static_cast(pFont)->m_aMetricFile; + break; + default: + return; + } + FontCacheData::const_iterator dir = m_aCache.find( nDirID ); + FontDirMap::const_iterator entry; + FontCacheEntry::const_iterator font; + PrintFontManager::PrintFont* pCacheFont = NULL; + + if( dir != m_aCache.end() ) + { + entry = dir->second.m_aEntries.find( aFile ); + if( entry != dir->second.m_aEntries.end() ) + { + for( font = entry->second.m_aEntry.begin(); font != entry->second.m_aEntry.end(); ++font ) + { + if( (*font)->m_eType == pFont->m_eType && + ( (*font)->m_eType != fonttype::TrueType || + static_cast(*font)->m_nCollectionEntry == static_cast(pFont)->m_nCollectionEntry + ) ) + break; + } + if( font != entry->second.m_aEntry.end() ) + pCacheFont = *font; + } + } + else + createCacheDir( nDirID ); + + if( pCacheFont ) + { + if( ! equalsPrintFont( pFont, pCacheFont ) ) + { + copyPrintFont( pFont, pCacheFont ); + m_bDoFlush = true; + } + } + else + { + pCacheFont = clonePrintFont( pFont ); + m_aCache[nDirID].m_aEntries[aFile].m_aEntry.push_back( pCacheFont ); + + ByteString aPath = rManager.getDirectory( nDirID ); + aPath.Append( '/' ); + aPath.Append( ByteString( aFile ) ); + m_bDoFlush = true; + } + if( bFlush ) + flush(); +} + +/* + * FontCache::listDirectory + */ +bool FontCache::listDirectory( const OString& rDir, std::list< PrintFontManager::PrintFont* >& rNewFonts ) const +{ + PrintFontManager& rManager( PrintFontManager::get() ); + int nDirID = rManager.getDirectoryAtom( rDir ); + FontCacheData::const_iterator dir = m_aCache.find( nDirID ); + bool bFound = (dir != m_aCache.end()); + + if( bFound && !dir->second.m_bNoFiles ) + { + for( FontDirMap::const_iterator file = dir->second.m_aEntries.begin(); file != dir->second.m_aEntries.end(); ++file ) + { + for( FontCacheEntry::const_iterator font = file->second.m_aEntry.begin(); font != file->second.m_aEntry.end(); ++font ) + { + PrintFontManager::PrintFont* pFont = clonePrintFont( *font ); + rNewFonts.push_back( pFont ); + } + } + } + return bFound; +} + +/* + * FontCache::listDirectory + */ +bool FontCache::scanAdditionalFiles( const OString& rDir ) +{ + PrintFontManager& rManager( PrintFontManager::get() ); + int nDirID = rManager.getDirectoryAtom( rDir ); + FontCacheData::const_iterator dir = m_aCache.find( nDirID ); + bool bFound = (dir != m_aCache.end()); + + return (bFound && dir->second.m_bUserOverrideOnly); +} + +/* + * FontCache::createCacheDir + */ +void FontCache::createCacheDir( int nDirID ) +{ + PrintFontManager& rManager( PrintFontManager::get() ); + + const OString& rDir = rManager.getDirectory( nDirID ); + struct stat aStat; + if( ! stat( rDir.getStr(), &aStat ) ) + m_aCache[nDirID].m_nTimestamp = (sal_Int64)aStat.st_mtime; +} + +/* + * FontCache::markEmptyDir + */ +void FontCache::markEmptyDir( int nDirID, bool bNoFiles ) +{ + createCacheDir( nDirID ); + m_aCache[nDirID].m_bNoFiles = bNoFiles; + m_bDoFlush = true; +} diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx new file mode 100644 index 000000000000..be7904c55959 --- /dev/null +++ b/vcl/unx/generic/fontmanager/fontconfig.cxx @@ -0,0 +1,1306 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include "fontcache.hxx" +#include "impfont.hxx" +#include "vcl/fontmanager.hxx" + +using namespace psp; + +#ifdef ENABLE_FONTCONFIG + #include + #include + #include + // allow compile on baseline (currently with fontconfig 2.2.0) + #ifndef FC_WEIGHT_BOOK // TODO: remove when baseline moves to fc>=2.2.1 + #define FC_WEIGHT_BOOK 75 + #endif + #ifndef FC_EMBEDDED_BITMAP // TODO: remove when baseline moves to fc>=2.3.92 + #define FC_EMBEDDED_BITMAP "embeddedbitmap" + #endif + #ifndef FC_FAMILYLANG // TODO: remove when baseline moves to fc>=2.2.97 + #define FC_FAMILYLANG "familylang" + #endif + #ifndef FC_HINT_STYLE // TODO: remove when baseline moves to fc>=2.2.91 + #define FC_HINT_STYLE "hintstyle" + #define FC_HINT_NONE 0 + #define FC_HINT_SLIGHT 1 + #define FC_HINT_MEDIUM 2 + #define FC_HINT_FULL 3 + #endif +#else + typedef void FcConfig; + typedef void FcObjectSet; + typedef void FcPattern; + typedef void FcFontSet; + typedef void FcCharSet; + typedef int FcResult; + typedef int FcBool; + typedef int FcMatchKind; + typedef char FcChar8; + typedef int FcChar32; + typedef unsigned int FT_UInt; + typedef void* FT_Face; + typedef int FcSetName; +#endif + +#include +#include + +#include "unotools/atom.hxx" + +#include "osl/module.h" +#include "osl/thread.h" +#include "osl/process.h" + +#include "rtl/ustrbuf.hxx" +#include "rtl/locale.hxx" + +#include "sal/alloca.h" + +#include +#include + +using namespace osl; +using namespace rtl; + +class FontCfgWrapper +{ + oslModule m_pLib; + FcFontSet* m_pOutlineSet; + + int m_nFcVersion; + FcBool (*m_pFcInit)(); + int (*m_pFcGetVersion)(); + FcConfig* (*m_pFcConfigGetCurrent)(); + FcObjectSet* (*m_pFcObjectSetVaBuild)(const char*,va_list); + void (*m_pFcObjectSetDestroy)(FcObjectSet* pSet); + FcPattern* (*m_pFcPatternCreate)(); + void (*m_pFcPatternDestroy)(FcPattern*); + FcFontSet* (*m_pFcFontList)(FcConfig*,FcPattern*,FcObjectSet*); + FcFontSet* (*m_pFcConfigGetFonts)(FcConfig*,FcSetName); + FcFontSet* (*m_pFcFontSetCreate)(); + FcCharSet* (*m_pFcCharSetCreate)(); + FcBool (*m_pFcCharSetAddChar)(FcCharSet *, FcChar32); + FcBool (*m_pFcCharSetHasChar)(FcCharSet *, FcChar32); + void (*m_pFcCharSetDestroy)(FcCharSet*); + void (*m_pFcFontSetDestroy)(FcFontSet*); + FcBool (*m_pFcFontSetAdd)(FcFontSet*,FcPattern*); + void (*m_pFcPatternReference)(FcPattern*); + FcResult (*m_pFcPatternGetCharSet)(const FcPattern*,const char*,int,FcCharSet**); + FcResult (*m_pFcPatternGetString)(const FcPattern*,const char*,int,FcChar8**); + FcResult (*m_pFcPatternGetInteger)(const FcPattern*,const char*,int,int*); + FcResult (*m_pFcPatternGetDouble)(const FcPattern*,const char*,int,double*); + FcResult (*m_pFcPatternGetBool)(const FcPattern*,const char*,int,FcBool*); + void (*m_pFcDefaultSubstitute)(FcPattern *); + FcPattern* (*m_pFcFontSetMatch)(FcConfig*,FcFontSet**, int, FcPattern*,FcResult*); + FcPattern* (*m_pFcFontMatch)(FcConfig*,FcPattern*,FcResult*); + FcBool (*m_pFcConfigAppFontAddFile)(FcConfig*, const FcChar8*); + FcBool (*m_pFcConfigAppFontAddDir)(FcConfig*, const FcChar8*); + FcBool (*m_pFcConfigParseAndLoad)(FcConfig*,const FcChar8*,FcBool); + FcBool (*m_pFcConfigSubstitute)(FcConfig*,FcPattern*,FcMatchKind); + + FcPattern* (*m_pFcPatternDuplicate)(const FcPattern*); + FcBool (*m_pFcPatternAddInteger)(FcPattern*,const char*,int); + FcBool (*m_pFcPatternAddDouble)(FcPattern*,const char*,double); + FcBool (*m_pFcPatternAddBool)(FcPattern*,const char*,FcBool); + FcBool (*m_pFcPatternAddCharSet)(FcPattern*,const char*,const FcCharSet*); + FcBool (*m_pFcPatternAddString)(FcPattern*,const char*,const FcChar8*); + FcBool (*m_pFcPatternDel)(FcPattern*,const char*); + + FT_UInt (*m_pFcFreeTypeCharIndex)(FT_Face,FcChar32); + + oslGenericFunction loadSymbol( const char* ); + void addFontSet( FcSetName ); + + FontCfgWrapper(); + ~FontCfgWrapper(); + +public: + static FontCfgWrapper& get(); + static void release(); + + bool isValid() const + { return m_pLib != NULL;} + + FcFontSet* getFontSet(); + + FcBool FcInit() + { return m_pFcInit(); } + + int FcGetVersion() + { return m_pFcGetVersion(); } + + FcConfig* FcConfigGetCurrent() + { return m_pFcConfigGetCurrent(); } + + FcObjectSet* FcObjectSetBuild( const char* first, ... ) + { + va_list ap; + va_start( ap, first ); + FcObjectSet* pSet = m_pFcObjectSetVaBuild( first, ap ); + va_end( ap ); + return pSet; + } + + void FcObjectSetDestroy( FcObjectSet* pSet ) + { m_pFcObjectSetDestroy( pSet ); } + + FcPattern* FcPatternCreate() + { return m_pFcPatternCreate(); } + + void FcPatternDestroy( FcPattern* pPattern ) + { m_pFcPatternDestroy( pPattern ); } + + FcFontSet* FcFontList( FcConfig* pConfig, FcPattern* pPattern, FcObjectSet* pSet ) + { return m_pFcFontList( pConfig, pPattern, pSet ); } + + FcFontSet* FcConfigGetFonts( FcConfig* pConfig, FcSetName eSet) + { return m_pFcConfigGetFonts( pConfig, eSet ); } + + FcFontSet* FcFontSetCreate() + { return m_pFcFontSetCreate(); } + + FcCharSet* FcCharSetCreate() + { return m_pFcCharSetCreate(); } + + FcBool FcCharSetAddChar(FcCharSet *fcs, FcChar32 ucs4) + { return m_pFcCharSetAddChar(fcs, ucs4); } + + FcBool FcCharSetHasChar(FcCharSet *fcs, FcChar32 ucs4) + { return m_pFcCharSetHasChar(fcs, ucs4); } + + void FcCharSetDestroy( FcCharSet* pSet ) + { m_pFcCharSetDestroy( pSet );} + + void FcFontSetDestroy( FcFontSet* pSet ) + { m_pFcFontSetDestroy( pSet );} + + FcBool FcFontSetAdd( FcFontSet* pSet, FcPattern* pPattern ) + { return m_pFcFontSetAdd( pSet, pPattern ); } + + void FcPatternReference( FcPattern* pPattern ) + { m_pFcPatternReference( pPattern ); } + + FcResult FcPatternGetCharSet( const FcPattern* pPattern, const char* object, int n, FcCharSet** s ) + { return m_pFcPatternGetCharSet( pPattern, object, n, s ); } + + FcResult FcPatternGetString( const FcPattern* pPattern, const char* object, int n, FcChar8** s ) + { return m_pFcPatternGetString( pPattern, object, n, s ); } + + FcResult FcPatternGetInteger( const FcPattern* pPattern, const char* object, int n, int* s ) + { return m_pFcPatternGetInteger( pPattern, object, n, s ); } + + FcResult FcPatternGetDouble( const FcPattern* pPattern, const char* object, int n, double* s ) + { return m_pFcPatternGetDouble( pPattern, object, n, s ); } + + FcResult FcPatternGetBool( const FcPattern* pPattern, const char* object, int n, FcBool* s ) + { return m_pFcPatternGetBool( pPattern, object, n, s ); } + FcBool FcConfigAppFontAddFile( FcConfig* pConfig, const FcChar8* pFileName ) + { return m_pFcConfigAppFontAddFile( pConfig, pFileName ); } + FcBool FcConfigAppFontAddDir(FcConfig* pConfig, const FcChar8* pDirName ) + { return m_pFcConfigAppFontAddDir( pConfig, pDirName ); } + FcBool FcConfigParseAndLoad( FcConfig* pConfig, const FcChar8* pFileName, FcBool bComplain ) + { return m_pFcConfigParseAndLoad( pConfig, pFileName, bComplain ); } + + void FcDefaultSubstitute( FcPattern* pPattern ) + { m_pFcDefaultSubstitute( pPattern ); } + FcPattern* FcFontSetMatch( FcConfig* pConfig, FcFontSet **ppFontSet, int nset, FcPattern* pPattern, FcResult* pResult ) + { return m_pFcFontSetMatch ? m_pFcFontSetMatch( pConfig, ppFontSet, nset, pPattern, pResult ) : 0; } + FcPattern* FcFontMatch( FcConfig* pConfig, FcPattern* pPattern, FcResult* pResult ) + { return m_pFcFontMatch( pConfig, pPattern, pResult ); } + FcBool FcConfigSubstitute( FcConfig* pConfig, FcPattern* pPattern, FcMatchKind eKind ) + { return m_pFcConfigSubstitute( pConfig, pPattern, eKind ); } + + FcPattern* FcPatternDuplicate( const FcPattern* pPattern ) const + { return m_pFcPatternDuplicate( pPattern ); } + FcBool FcPatternAddInteger( FcPattern* pPattern, const char* pObject, int nValue ) + { return m_pFcPatternAddInteger( pPattern, pObject, nValue ); } + FcBool FcPatternAddDouble( FcPattern* pPattern, const char* pObject, double nValue ) + { return m_pFcPatternAddDouble( pPattern, pObject, nValue ); } + FcBool FcPatternAddString( FcPattern* pPattern, const char* pObject, const FcChar8* pString ) + { return m_pFcPatternAddString( pPattern, pObject, pString ); } + FcBool FcPatternAddBool( FcPattern* pPattern, const char* pObject, bool nValue ) + { return m_pFcPatternAddBool( pPattern, pObject, nValue ); } + FcBool FcPatternAddCharSet(FcPattern* pPattern,const char* pObject,const FcCharSet*pCharSet) + { return m_pFcPatternAddCharSet(pPattern,pObject,pCharSet); } + FcBool FcPatternDel(FcPattern* pPattern, const char* object) + { return m_pFcPatternDel( pPattern, object); } + + FT_UInt FcFreeTypeCharIndex( FT_Face face, FcChar32 ucs4 ) + { return m_pFcFreeTypeCharIndex ? m_pFcFreeTypeCharIndex( face, ucs4 ) : 0; } + +public: // TODO: cleanup + FcResult FamilyFromPattern(FcPattern* pPattern, FcChar8 **family); + std::hash_map< rtl::OString, rtl::OString, rtl::OStringHash > m_aFontNameToLocalized; + std::hash_map< rtl::OString, rtl::OString, rtl::OStringHash > m_aLocalizedToCanonical; +}; + +oslGenericFunction FontCfgWrapper::loadSymbol( const char* pSymbol ) +{ + OUString aSym( OUString::createFromAscii( pSymbol ) ); + oslGenericFunction pSym = osl_getFunctionSymbol( m_pLib, aSym.pData ); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "%s %s\n", pSymbol, pSym ? "found" : "not found" ); +#endif + return pSym; +} + +FontCfgWrapper::FontCfgWrapper() + : m_pLib( NULL ), + m_pOutlineSet( NULL ), + m_nFcVersion( 0 ) +{ + OUString aLib( RTL_CONSTASCII_USTRINGPARAM( "libfontconfig.so.1" ) ); + m_pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY ); + if( !m_pLib ) + { + aLib = OUString( RTL_CONSTASCII_USTRINGPARAM( "libfontconfig.so" ) ); + m_pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY ); + } + + if( ! m_pLib ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "no libfontconfig\n" ); +#endif + return; + } + + m_pFcInit = (FcBool(*)()) + loadSymbol( "FcInit" ); + m_pFcGetVersion = (int(*)()) + loadSymbol( "FcGetVersion" ); + m_pFcConfigGetCurrent = (FcConfig *(*)()) + loadSymbol( "FcConfigGetCurrent" ); + m_pFcObjectSetVaBuild = (FcObjectSet*(*)(const char*,va_list)) + loadSymbol( "FcObjectSetVaBuild" ); + m_pFcObjectSetDestroy = (void(*)(FcObjectSet*)) + loadSymbol( "FcObjectSetDestroy" ); + m_pFcPatternCreate = (FcPattern*(*)()) + loadSymbol( "FcPatternCreate" ); + m_pFcPatternDestroy = (void(*)(FcPattern*)) + loadSymbol( "FcPatternDestroy" ); + m_pFcFontList = (FcFontSet*(*)(FcConfig*,FcPattern*,FcObjectSet*)) + loadSymbol( "FcFontList" ); + m_pFcConfigGetFonts = (FcFontSet*(*)(FcConfig*,FcSetName)) + loadSymbol( "FcConfigGetFonts" ); + m_pFcFontSetCreate = (FcFontSet*(*)()) + loadSymbol( "FcFontSetCreate" ); + m_pFcCharSetCreate = (FcCharSet*(*)()) + loadSymbol( "FcCharSetCreate" ); + m_pFcCharSetAddChar = (FcBool(*)(FcCharSet*, FcChar32)) + loadSymbol( "FcCharSetAddChar" ); + m_pFcCharSetHasChar = (FcBool(*)(FcCharSet*, FcChar32)) + loadSymbol( "FcCharSetHasChar" ); + m_pFcCharSetDestroy = (void(*)(FcCharSet*)) + loadSymbol( "FcCharSetDestroy" ); + m_pFcFontSetDestroy = (void(*)(FcFontSet*)) + loadSymbol( "FcFontSetDestroy" ); + m_pFcFontSetAdd = (FcBool(*)(FcFontSet*,FcPattern*)) + loadSymbol( "FcFontSetAdd" ); + m_pFcPatternReference = (void(*)(FcPattern*)) + loadSymbol( "FcPatternReference" ); + m_pFcPatternGetCharSet = (FcResult(*)(const FcPattern*,const char*,int,FcCharSet**)) + loadSymbol( "FcPatternGetCharSet" ); + m_pFcPatternGetString = (FcResult(*)(const FcPattern*,const char*,int,FcChar8**)) + loadSymbol( "FcPatternGetString" ); + m_pFcPatternGetInteger = (FcResult(*)(const FcPattern*,const char*,int,int*)) + loadSymbol( "FcPatternGetInteger" ); + m_pFcPatternGetDouble = (FcResult(*)(const FcPattern*,const char*,int,double*)) + loadSymbol( "FcPatternGetDouble" ); + m_pFcPatternGetBool = (FcResult(*)(const FcPattern*,const char*,int,FcBool*)) + loadSymbol( "FcPatternGetBool" ); + m_pFcConfigAppFontAddFile = (FcBool(*)(FcConfig*, const FcChar8*)) + loadSymbol( "FcConfigAppFontAddFile" ); + m_pFcConfigAppFontAddDir = (FcBool(*)(FcConfig*, const FcChar8*)) + loadSymbol( "FcConfigAppFontAddDir" ); + m_pFcConfigParseAndLoad = (FcBool(*)(FcConfig*, const FcChar8*, FcBool)) + loadSymbol( "FcConfigParseAndLoad" ); + m_pFcDefaultSubstitute = (void(*)(FcPattern *)) + loadSymbol( "FcDefaultSubstitute" ); + m_pFcFontSetMatch = (FcPattern*(*)(FcConfig*,FcFontSet**,int,FcPattern*,FcResult*)) + loadSymbol( "FcFontSetMatch" ); + m_pFcFontMatch = (FcPattern*(*)(FcConfig*,FcPattern*,FcResult*)) + loadSymbol( "FcFontMatch" ); + m_pFcConfigSubstitute = (FcBool(*)(FcConfig*,FcPattern*,FcMatchKind)) + loadSymbol( "FcConfigSubstitute" ); + + m_pFcPatternDuplicate = (FcPattern*(*)(const FcPattern*)) + loadSymbol( "FcPatternDuplicate" ); + m_pFcPatternAddInteger = (FcBool(*)(FcPattern*,const char*,int)) + loadSymbol( "FcPatternAddInteger" ); + m_pFcPatternAddDouble = (FcBool(*)(FcPattern*,const char*,double)) + loadSymbol( "FcPatternAddDouble" ); + m_pFcPatternAddBool = (FcBool(*)(FcPattern*,const char*,FcBool)) + loadSymbol( "FcPatternAddBool" ); + m_pFcPatternAddCharSet = (FcBool(*)(FcPattern*,const char*,const FcCharSet *)) + loadSymbol( "FcPatternAddCharSet" ); + m_pFcPatternAddString = (FcBool(*)(FcPattern*,const char*,const FcChar8*)) + loadSymbol( "FcPatternAddString" ); + m_pFcPatternDel = (FcBool(*)(FcPattern*,const char*)) + loadSymbol( "FcPatternDel" ); + + m_pFcFreeTypeCharIndex = (FT_UInt(*)(FT_Face,FcChar32)) + loadSymbol( "FcFreeTypeCharIndex" ); + + m_nFcVersion = FcGetVersion(); +#if (OSL_DEBUG_LEVEL > 1) + fprintf( stderr,"FC_VERSION = %05d\n", m_nFcVersion ); +#endif + // make minimum version configurable + const char* pMinFcVersion = getenv( "SAL_MIN_FC_VERSION"); + if( pMinFcVersion ) + { + const int nMinFcVersion = atoi( pMinFcVersion ); + if( m_nFcVersion < nMinFcVersion ) + m_pFcInit = NULL; + } + + if( ! ( + m_pFcInit && + m_pFcGetVersion && + m_pFcConfigGetCurrent && + m_pFcObjectSetVaBuild && + m_pFcObjectSetDestroy && + m_pFcPatternCreate && + m_pFcPatternDestroy && + m_pFcFontList && + m_pFcConfigGetFonts && + m_pFcFontSetCreate && + m_pFcCharSetCreate && + m_pFcCharSetAddChar && + m_pFcCharSetHasChar && + m_pFcCharSetDestroy && + m_pFcFontSetDestroy && + m_pFcFontSetAdd && + m_pFcPatternReference && + m_pFcPatternGetCharSet && + m_pFcPatternGetString && + m_pFcPatternGetInteger && + m_pFcPatternGetDouble && + m_pFcPatternGetBool && + m_pFcConfigAppFontAddFile && + m_pFcConfigAppFontAddDir && + m_pFcConfigParseAndLoad && + m_pFcFontMatch && + m_pFcDefaultSubstitute && + m_pFcConfigSubstitute && + m_pFcPatternDuplicate && + m_pFcPatternAddInteger && + m_pFcPatternAddDouble && + m_pFcPatternAddCharSet && + m_pFcPatternAddBool && + m_pFcPatternAddString && + m_pFcPatternDel + ) ) + { + osl_unloadModule( (oslModule)m_pLib ); + m_pLib = NULL; +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "not all needed symbols were found in libfontconfig\n" ); +#endif + return; + } + + + FcInit(); + if( ! FcConfigGetCurrent() ) + { + osl_unloadModule( (oslModule)m_pLib ); + m_pLib = NULL; + } +} + +void FontCfgWrapper::addFontSet( FcSetName eSetName ) +{ + #ifdef ENABLE_FONTCONFIG + /* + add only acceptable outlined fonts to our config, + for future fontconfig use + */ + FcFontSet* pOrig = FcConfigGetFonts( FcConfigGetCurrent(), eSetName ); + if( !pOrig ) + return; + + // filter the font sets to remove obsolete or duplicate faces + for( int i = 0; i < pOrig->nfont; ++i ) + { + FcPattern* pOrigPattern = pOrig->fonts[i]; + // #i115131# ignore non-outline fonts + FcBool bOutline = FcFalse; + FcResult eOutRes = FcPatternGetBool( pOrigPattern, FC_OUTLINE, 0, &bOutline ); + if( (eOutRes != FcResultMatch) || (bOutline == FcFalse) ) + continue; + // create a pattern to find eventually better alternatives + FcPattern* pBetterPattern = pOrigPattern; + if( m_nFcVersion > 20400 ) // #i115204# avoid trouble with old FC versions + { + FcPattern* pTestPattern = FcPatternDuplicate( pOrigPattern ); + FcPatternAddBool( pTestPattern, FC_OUTLINE, FcTrue ); + // TODO: ignore all attributes that are not interesting for finding dupes + // e.g. by using pattern->ImplFontAttr->pattern conversion + FcPatternDel( pTestPattern, FC_FONTVERSION ); + FcPatternDel( pTestPattern, FC_CHARSET ); + FcPatternDel( pTestPattern, FC_FILE ); + // find the font face for the dupe-search pattern + FcResult eFcResult = FcResultMatch; + pBetterPattern = FcFontMatch( FcConfigGetCurrent(), pTestPattern, &eFcResult ); + FcPatternDestroy( pTestPattern ); + if( eFcResult != FcResultMatch ) + continue; + // #i115131# double check results and eventually ignore them + eOutRes = FcPatternGetBool( pBetterPattern, FC_OUTLINE, 0, &bOutline ); + if( (eOutRes != FcResultMatch) || (bOutline == FcFalse) ) + continue; + } + // insert best found pattern for the dupe-search pattern + // TODO: skip inserting patterns that are already known in the target fontset + FcPatternReference( pBetterPattern ); + FcFontSetAdd( m_pOutlineSet, pBetterPattern ); + } + + // TODO?: FcFontSetDestroy( pOrig ); + #else + (void)eSetName; // prevent compiler warning about unused parameter + #endif +} + +FcFontSet* FontCfgWrapper::getFontSet() +{ + #ifdef ENABLE_FONTCONFIG + if( !m_pOutlineSet ) + { + m_pOutlineSet = FcFontSetCreate(); + addFontSet( FcSetSystem ); + if( m_nFcVersion > 20400 ) // #i85462# prevent crashes + addFontSet( FcSetApplication ); + } + #endif + + return m_pOutlineSet; +} + +FontCfgWrapper::~FontCfgWrapper() +{ + if( m_pOutlineSet ) + FcFontSetDestroy( m_pOutlineSet ); + if( m_pLib ) + osl_unloadModule( (oslModule)m_pLib ); +} + +static FontCfgWrapper* pOneInstance = NULL; + +FontCfgWrapper& FontCfgWrapper::get() +{ + if( ! pOneInstance ) + pOneInstance = new FontCfgWrapper(); + return *pOneInstance; +} + +void FontCfgWrapper::release() +{ + if( pOneInstance ) + { + delete pOneInstance; + pOneInstance = NULL; + } +} + +#ifdef ENABLE_FONTCONFIG +namespace +{ + typedef std::pair lang_and_family; + + class localizedsorter + { + rtl::OLocale maLoc; + public: + localizedsorter(rtl_Locale* pLoc) : maLoc(pLoc) {} + FcChar8* bestname(const std::vector &families); + }; + + FcChar8* localizedsorter::bestname(const std::vector &families) + { + FcChar8* candidate = families.begin()->second; + rtl::OString sLangMatch(rtl::OUStringToOString(maLoc.getLanguage().toAsciiLowerCase(), RTL_TEXTENCODING_UTF8)); + rtl::OString sFullMatch = sLangMatch; + sFullMatch += OString('-'); + sFullMatch += rtl::OUStringToOString(maLoc.getCountry().toAsciiLowerCase(), RTL_TEXTENCODING_UTF8); + + std::vector::const_iterator aEnd = families.end(); + bool alreadyclosematch = false; + for( std::vector::const_iterator aIter = families.begin(); aIter != aEnd; ++aIter ) + { + const char *pLang = (const char*)aIter->first; + if( rtl_str_compare( pLang, sFullMatch.getStr() ) == 0) + { + // both language and country match + candidate = aIter->second; + break; + } + else if( alreadyclosematch ) + continue; + else if( rtl_str_compare( pLang, sLangMatch.getStr()) == 0) + { + // just the language matches + candidate = aIter->second; + alreadyclosematch = true; + } + else if( rtl_str_compare( pLang, "en") == 0) + { + // fallback to the english family name + candidate = aIter->second; + } + } + return candidate; + } +} + +FcResult FontCfgWrapper::FamilyFromPattern(FcPattern* pPattern, FcChar8 **family) +{ + FcChar8 *origfamily; + FcResult eFamilyRes = FcPatternGetString( pPattern, FC_FAMILY, 0, &origfamily ); + *family = origfamily; + + if( eFamilyRes == FcResultMatch) + { + FcChar8* familylang = NULL; + if (FcPatternGetString( pPattern, FC_FAMILYLANG, 0, &familylang ) == FcResultMatch) + { + std::vector< lang_and_family > lang_and_families; + lang_and_families.push_back(lang_and_family(familylang, *family)); + int k = 1; + while (1) + { + if (FcPatternGetString( pPattern, FC_FAMILYLANG, k, &familylang ) != FcResultMatch) + break; + if (FcPatternGetString( pPattern, FC_FAMILY, k, family ) != FcResultMatch) + break; + lang_and_families.push_back(lang_and_family(familylang, *family)); + ++k; + } + + //possible to-do, sort by UILocale instead of process locale + rtl_Locale* pLoc; + osl_getProcessLocale(&pLoc); + localizedsorter aSorter(pLoc); + *family = aSorter.bestname(lang_and_families); + + std::vector::const_iterator aEnd = lang_and_families.end(); + for (std::vector::const_iterator aIter = lang_and_families.begin(); aIter != aEnd; ++aIter) + { + const char *candidate = (const char*)(aIter->second); + if (rtl_str_compare(candidate, (const char*)(*family)) != 0) + m_aFontNameToLocalized[OString(candidate)] = OString((const char*)(*family)); + } + if (rtl_str_compare((const char*)origfamily, (const char*)(*family)) != 0) + m_aLocalizedToCanonical[OString((const char*)(*family))] = OString((const char*)origfamily); + } + } + + return eFamilyRes; +} + +/* + * PrintFontManager::initFontconfig + */ +bool PrintFontManager::initFontconfig() +{ + FontCfgWrapper& rWrapper = FontCfgWrapper::get(); + if( ! rWrapper.isValid() ) + return false; + return true; +} + +namespace +{ + weight::type convertWeight(int weight) + { + // set weight + if( weight <= FC_WEIGHT_THIN ) + return weight::Thin; + else if( weight <= FC_WEIGHT_ULTRALIGHT ) + return weight::UltraLight; + else if( weight <= FC_WEIGHT_LIGHT ) + return weight::Light; + else if( weight <= FC_WEIGHT_BOOK ) + return weight::SemiLight; + else if( weight <= FC_WEIGHT_NORMAL ) + return weight::Normal; + else if( weight <= FC_WEIGHT_MEDIUM ) + return weight::Medium; + else if( weight <= FC_WEIGHT_SEMIBOLD ) + return weight::SemiBold; + else if( weight <= FC_WEIGHT_BOLD ) + return weight::Bold; + else if( weight <= FC_WEIGHT_ULTRABOLD ) + return weight::UltraBold; + return weight::Black; + } + + italic::type convertSlant(int slant) + { + // set italic + if( slant == FC_SLANT_ITALIC ) + return italic::Italic; + else if( slant == FC_SLANT_OBLIQUE ) + return italic::Oblique; + return italic::Upright; + } + + pitch::type convertSpacing(int spacing) + { + // set pitch + if( spacing == FC_MONO || spacing == FC_CHARCELL ) + return pitch::Fixed; + return pitch::Variable; + } + + width::type convertWidth(int width) + { + if (width == FC_WIDTH_ULTRACONDENSED) + return width::UltraCondensed; + else if (width == FC_WIDTH_EXTRACONDENSED) + return width::ExtraCondensed; + else if (width == FC_WIDTH_CONDENSED) + return width::Condensed; + else if (width == FC_WIDTH_SEMICONDENSED) + return width::SemiCondensed; + else if (width == FC_WIDTH_SEMIEXPANDED) + return width::SemiExpanded; + else if (width == FC_WIDTH_EXPANDED) + return width::Expanded; + else if (width == FC_WIDTH_EXTRAEXPANDED) + return width::ExtraExpanded; + else if (width == FC_WIDTH_ULTRAEXPANDED) + return width::UltraExpanded; + return width::Normal; + } +} + +int PrintFontManager::countFontconfigFonts( std::hash_map& o_rVisitedPaths ) +{ + int nFonts = 0; + + FontCfgWrapper& rWrapper = FontCfgWrapper::get(); + if( !rWrapper.isValid() ) + return 0; + + FcFontSet* pFSet = rWrapper.getFontSet(); + if( pFSet ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "found %d entries in fontconfig fontset\n", pFSet->nfont ); +#endif + for( int i = 0; i < pFSet->nfont; i++ ) + { + FcChar8* file = NULL; + FcChar8* family = NULL; + FcChar8* style = NULL; + int slant = 0; + int weight = 0; + int spacing = 0; + int nCollectionEntry = -1; + FcBool outline = false; + + FcResult eFileRes = rWrapper.FcPatternGetString( pFSet->fonts[i], FC_FILE, 0, &file ); + FcResult eFamilyRes = rWrapper.FamilyFromPattern( pFSet->fonts[i], &family ); + FcResult eStyleRes = rWrapper.FcPatternGetString( pFSet->fonts[i], FC_STYLE, 0, &style ); + FcResult eSlantRes = rWrapper.FcPatternGetInteger( pFSet->fonts[i], FC_SLANT, 0, &slant ); + FcResult eWeightRes = rWrapper.FcPatternGetInteger( pFSet->fonts[i], FC_WEIGHT, 0, &weight ); + FcResult eSpacRes = rWrapper.FcPatternGetInteger( pFSet->fonts[i], FC_SPACING, 0, &spacing ); + FcResult eOutRes = rWrapper.FcPatternGetBool( pFSet->fonts[i], FC_OUTLINE, 0, &outline ); + FcResult eIndexRes = rWrapper.FcPatternGetInteger( pFSet->fonts[i], FC_INDEX, 0, &nCollectionEntry ); + + if( eFileRes != FcResultMatch || eFamilyRes != FcResultMatch || eOutRes != FcResultMatch ) + continue; + +#if (OSL_DEBUG_LEVEL > 2) + fprintf( stderr, "found font \"%s\" in file %s\n" + " weight = %d, slant = %d, style = \"%s\"\n" + " spacing = %d, outline = %d\n" + , family, file + , eWeightRes == FcResultMatch ? weight : -1 + , eSpacRes == FcResultMatch ? slant : -1 + , eStyleRes == FcResultMatch ? (const char*) style : "" + , eSpacRes == FcResultMatch ? spacing : -1 + , eOutRes == FcResultMatch ? outline : -1 + ); +#endif + +// OSL_ASSERT(eOutRes != FcResultMatch || outline); + + // only outline fonts are usable to psprint anyway + if( eOutRes == FcResultMatch && ! outline ) + continue; + + // see if this font is already cached + // update attributes + std::list< PrintFont* > aFonts; + OString aDir, aBase, aOrgPath( (sal_Char*)file ); + splitPath( aOrgPath, aDir, aBase ); + + o_rVisitedPaths[aDir] = 1; + + int nDirID = getDirectoryAtom( aDir, true ); + if( ! m_pFontCache->getFontCacheFile( nDirID, aBase, aFonts ) ) + { +#if OSL_DEBUG_LEVEL > 2 + fprintf( stderr, "file %s not cached\n", aBase.getStr() ); +#endif + // not known, analyze font file to get attributes + // not described by fontconfig (e.g. alias names, PSName) + std::list< OString > aDummy; + analyzeFontFile( nDirID, aBase, aDummy, aFonts ); +#if OSL_DEBUG_LEVEL > 1 + if( aFonts.empty() ) + fprintf( stderr, "Warning: file \"%s\" is unusable to psprint\n", aOrgPath.getStr() ); +#endif + } + if( aFonts.empty() ) + { + // TODO: remove fonts unusable to psprint from fontset + continue; + } + + int nFamilyName = m_pAtoms->getAtom( ATOM_FAMILYNAME, OStringToOUString( OString( (sal_Char*)family ), RTL_TEXTENCODING_UTF8 ), sal_True ); + PrintFont* pUpdate = aFonts.front(); + std::list::const_iterator second_font = aFonts.begin(); + ++second_font; + if( second_font != aFonts.end() ) // more than one font + { + // a collection entry, get the correct index + if( eIndexRes == FcResultMatch && nCollectionEntry != -1 ) + { + for( std::list< PrintFont* >::iterator it = aFonts.begin(); it != aFonts.end(); ++it ) + { + if( (*it)->m_eType == fonttype::TrueType && + static_cast(*it)->m_nCollectionEntry == nCollectionEntry ) + { + pUpdate = *it; + break; + } + } + // update collection entry + // additional entries will be created in the cache + // if this is a new index (that is if the loop above + // ran to the end of the list) + if( pUpdate->m_eType == fonttype::TrueType ) // sanity check, this should always be the case here + static_cast(pUpdate)->m_nCollectionEntry = nCollectionEntry; + } + else + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "multiple fonts for file, but no index in fontconfig pattern ! (index res = %d collection entry = %d\nfile will not be used\n", eIndexRes, nCollectionEntry ); +#endif + // we have found more than one font in this file + // but fontconfig will not tell us which index is meant + // -> something is in disorder, do not use this font + pUpdate = NULL; + } + } + + if( pUpdate ) + { + // set family name + if( pUpdate->m_nFamilyName != nFamilyName ) + { +#if 0 // fontconfig prefers nameid=16 for the family name which is all fine + // but Writer suffers from #i79878# + // the only reasonable workaround for now is to use the classic nameid=1 + pUpdate->m_aAliases.remove( pUpdate->m_nFamilyName ); + pUpdate->m_aAliases.push_back( pUpdate->m_nFamilyName ); + pUpdate->m_aAliases.remove( nFamilyName ); + pUpdate->m_nFamilyName = nFamilyName; +#endif + } + if( eWeightRes == FcResultMatch ) + pUpdate->m_eWeight = convertWeight(weight); + if( eSpacRes == FcResultMatch ) + pUpdate->m_ePitch = convertSpacing(spacing); + if( eSlantRes == FcResultMatch ) + pUpdate->m_eItalic = convertSlant(slant); + if( eStyleRes == FcResultMatch ) + { + pUpdate->m_aStyleName = OStringToOUString( OString( (sal_Char*)style ), RTL_TEXTENCODING_UTF8 ); + } + + // update font cache + m_pFontCache->updateFontCacheEntry( pUpdate, false ); + // sort into known fonts + fontID aFont = m_nNextFontID++; + m_aFonts[ aFont ] = pUpdate; + m_aFontFileToFontID[ aBase ].insert( aFont ); + nFonts++; +#if OSL_DEBUG_LEVEL > 2 + fprintf( stderr, "inserted font %s as fontID %d\n", family, aFont ); +#endif + } + // clean up the fonts we did not put into the list + for( std::list< PrintFont* >::iterator it = aFonts.begin(); it != aFonts.end(); ++it ) + { + if( *it != pUpdate ) + { + m_pFontCache->updateFontCacheEntry( *it, false ); // prepare a cache entry for a collection item + delete *it; + } + } + } + } + + // how does one get rid of the config ? +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "inserted %d fonts from fontconfig\n", nFonts ); +#endif + return nFonts; +} + +void PrintFontManager::deinitFontconfig() +{ + FontCfgWrapper::release(); +} + +int PrintFontManager::FreeTypeCharIndex( void *pFace, sal_uInt32 aChar ) +{ + FontCfgWrapper& rWrapper = FontCfgWrapper::get(); + return rWrapper.isValid() ? rWrapper.FcFreeTypeCharIndex( (FT_Face)pFace, aChar ) : 0; +} + +bool PrintFontManager::addFontconfigDir( const rtl::OString& rDirName ) +{ + FontCfgWrapper& rWrapper = FontCfgWrapper::get(); + if( ! rWrapper.isValid() ) + return false; + + // workaround for a stability problems in older FC versions + // when handling application specifc fonts + const int nVersion = rWrapper.FcGetVersion(); + if( nVersion <= 20400 ) + return false; + const char* pDirName = (const char*)rDirName.getStr(); + bool bDirOk = (rWrapper.FcConfigAppFontAddDir( rWrapper.FcConfigGetCurrent(), (FcChar8*)pDirName ) == FcTrue); + +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "FcConfigAppFontAddDir( \"%s\") => %d\n", pDirName, bDirOk ); +#endif + + if( !bDirOk ) + return false; + + // load dir-specific fc-config file too if available + const rtl::OString aConfFileName = rDirName + "/fc_local.conf"; + FILE* pCfgFile = fopen( aConfFileName.getStr(), "rb" ); + if( pCfgFile ) + { + fclose( pCfgFile); + bool bCfgOk = rWrapper.FcConfigParseAndLoad( rWrapper.FcConfigGetCurrent(), + (FcChar8*)aConfFileName.getStr(), FcTrue ); + if( !bCfgOk ) + fprintf( stderr, "FcConfigParseAndLoad( \"%s\") => %d\n", aConfFileName.getStr(), bCfgOk ); + } + + return true; +} + +static void addtopattern(FontCfgWrapper& rWrapper, FcPattern *pPattern, + italic::type eItalic, weight::type eWeight, width::type eWidth, pitch::type ePitch) +{ + if( eItalic != italic::Unknown ) + { + int nSlant = FC_SLANT_ROMAN; + switch( eItalic ) + { + case italic::Italic: nSlant = FC_SLANT_ITALIC;break; + case italic::Oblique: nSlant = FC_SLANT_OBLIQUE;break; + default: + break; + } + rWrapper.FcPatternAddInteger( pPattern, FC_SLANT, nSlant ); + } + if( eWeight != weight::Unknown ) + { + int nWeight = FC_WEIGHT_NORMAL; + switch( eWeight ) + { + case weight::Thin: nWeight = FC_WEIGHT_THIN;break; + case weight::UltraLight: nWeight = FC_WEIGHT_ULTRALIGHT;break; + case weight::Light: nWeight = FC_WEIGHT_LIGHT;break; + case weight::SemiLight: nWeight = FC_WEIGHT_BOOK;break; + case weight::Normal: nWeight = FC_WEIGHT_NORMAL;break; + case weight::Medium: nWeight = FC_WEIGHT_MEDIUM;break; + case weight::SemiBold: nWeight = FC_WEIGHT_SEMIBOLD;break; + case weight::Bold: nWeight = FC_WEIGHT_BOLD;break; + case weight::UltraBold: nWeight = FC_WEIGHT_ULTRABOLD;break; + case weight::Black: nWeight = FC_WEIGHT_BLACK;break; + default: + break; + } + rWrapper.FcPatternAddInteger( pPattern, FC_WEIGHT, nWeight ); + } + if( eWidth != width::Unknown ) + { + int nWidth = FC_WIDTH_NORMAL; + switch( eWidth ) + { + case width::UltraCondensed: nWidth = FC_WIDTH_ULTRACONDENSED;break; + case width::ExtraCondensed: nWidth = FC_WIDTH_EXTRACONDENSED;break; + case width::Condensed: nWidth = FC_WIDTH_CONDENSED;break; + case width::SemiCondensed: nWidth = FC_WIDTH_SEMICONDENSED;break; + case width::Normal: nWidth = FC_WIDTH_NORMAL;break; + case width::SemiExpanded: nWidth = FC_WIDTH_SEMIEXPANDED;break; + case width::Expanded: nWidth = FC_WIDTH_EXPANDED;break; + case width::ExtraExpanded: nWidth = FC_WIDTH_EXTRAEXPANDED;break; + case width::UltraExpanded: nWidth = FC_WIDTH_ULTRACONDENSED;break; + default: + break; + } + rWrapper.FcPatternAddInteger( pPattern, FC_WIDTH, nWidth ); + } + if( ePitch != pitch::Unknown ) + { + int nSpacing = FC_PROPORTIONAL; + switch( ePitch ) + { + case pitch::Fixed: nSpacing = FC_MONO;break; + case pitch::Variable: nSpacing = FC_PROPORTIONAL;break; + default: + break; + } + rWrapper.FcPatternAddInteger( pPattern, FC_SPACING, nSpacing ); + if (nSpacing == FC_MONO) + rWrapper.FcPatternAddString( pPattern, FC_FAMILY, (FcChar8*)"monospace"); + } +} + +rtl::OUString PrintFontManager::Substitute(const rtl::OUString& rFontName, + rtl::OUString& rMissingCodes, const rtl::OString &rLangAttrib, + italic::type &rItalic, weight::type &rWeight, + width::type &rWidth, pitch::type &rPitch) const +{ + rtl::OUString aName; + FontCfgWrapper& rWrapper = FontCfgWrapper::get(); + if( ! rWrapper.isValid() ) + return aName; + + // build pattern argument for fontconfig query + FcPattern* pPattern = rWrapper.FcPatternCreate(); + + // Prefer scalable fonts + rWrapper.FcPatternAddBool( pPattern, FC_SCALABLE, FcTrue ); + + const rtl::OString aTargetName = rtl::OUStringToOString( rFontName, RTL_TEXTENCODING_UTF8 ); + const FcChar8* pTargetNameUtf8 = (FcChar8*)aTargetName.getStr(); + rWrapper.FcPatternAddString( pPattern, FC_FAMILY, pTargetNameUtf8 ); + + const FcChar8* pLangAttribUtf8 = (FcChar8*)rLangAttrib.getStr(); + if( rLangAttrib.getLength() ) + rWrapper.FcPatternAddString( pPattern, FC_LANG, pLangAttribUtf8 ); + + // Add required Unicode characters, if any + if ( rMissingCodes.getLength() ) + { + FcCharSet *unicodes = rWrapper.FcCharSetCreate(); + for( sal_Int32 nStrIndex = 0; nStrIndex < rMissingCodes.getLength(); ) + { + // also handle unicode surrogates + const sal_uInt32 nCode = rMissingCodes.iterateCodePoints( &nStrIndex ); + rWrapper.FcCharSetAddChar( unicodes, nCode ); + } + rWrapper.FcPatternAddCharSet( pPattern, FC_CHARSET, unicodes); + rWrapper.FcCharSetDestroy( unicodes ); + } + + addtopattern(rWrapper, pPattern, rItalic, rWeight, rWidth, rPitch); + + // query fontconfig for a substitute + rWrapper.FcConfigSubstitute( rWrapper.FcConfigGetCurrent(), pPattern, FcMatchPattern ); + rWrapper.FcDefaultSubstitute( pPattern ); + + // process the result of the fontconfig query + FcResult eResult = FcResultNoMatch; + FcFontSet* pFontSet = rWrapper.getFontSet(); + FcPattern* pResult = rWrapper.FcFontSetMatch( rWrapper.FcConfigGetCurrent(), &pFontSet, 1, pPattern, &eResult ); + rWrapper.FcPatternDestroy( pPattern ); + + FcFontSet* pSet = NULL; + if( pResult ) + { + pSet = rWrapper.FcFontSetCreate(); + // info: destroying the pSet destroys pResult implicitly + // since pResult was "added" to pSet + rWrapper.FcFontSetAdd( pSet, pResult ); + } + + if( pSet ) + { + if( pSet->nfont > 0 ) + { + //extract the closest match + FcChar8* family = NULL; + FcResult eFileRes = rWrapper.FcPatternGetString( pSet->fonts[0], FC_FAMILY, 0, &family ); + + // get the family name + if( eFileRes == FcResultMatch ) + { + OString sFamily((sal_Char*)family); + std::hash_map< rtl::OString, rtl::OString, rtl::OStringHash >::const_iterator aI = rWrapper.m_aFontNameToLocalized.find(sFamily); + if (aI != rWrapper.m_aFontNameToLocalized.end()) + sFamily = aI->second; + aName = rtl::OStringToOUString( sFamily, RTL_TEXTENCODING_UTF8 ); + + + int val = 0; + if ( FcResultMatch == rWrapper.FcPatternGetInteger( pSet->fonts[0], FC_WEIGHT, 0, &val)) + rWeight = convertWeight(val); + if ( FcResultMatch == rWrapper.FcPatternGetInteger( pSet->fonts[0], FC_SLANT, 0, &val)) + rItalic = convertSlant(val); + if ( FcResultMatch == rWrapper.FcPatternGetInteger( pSet->fonts[0], FC_SPACING, 0, &val)) + rPitch = convertSpacing(val); + if ( FcResultMatch == rWrapper.FcPatternGetInteger( pSet->fonts[0], FC_WIDTH, 0, &val)) + rWidth = convertWidth(val); + } + + // update rMissingCodes by removing resolved unicodes + if( rMissingCodes.getLength() > 0 ) + { + sal_uInt32* pRemainingCodes = (sal_uInt32*)alloca( rMissingCodes.getLength() * sizeof(sal_uInt32) ); + int nRemainingLen = 0; + FcCharSet* unicodes; + if( !rWrapper.FcPatternGetCharSet( pSet->fonts[0], FC_CHARSET, 0, &unicodes ) ) + { + for( sal_Int32 nStrIndex = 0; nStrIndex < rMissingCodes.getLength(); ) + { + // also handle unicode surrogates + const sal_uInt32 nCode = rMissingCodes.iterateCodePoints( &nStrIndex ); + if( rWrapper.FcCharSetHasChar( unicodes, nCode ) != FcTrue ) + pRemainingCodes[ nRemainingLen++ ] = nCode; + } + } + rMissingCodes = OUString( pRemainingCodes, nRemainingLen ); + } + } + + rWrapper.FcFontSetDestroy( pSet ); + } + + return aName; +} + +bool PrintFontManager::getFontOptions( + const FastPrintFontInfo& rInfo, int nSize, void (*subcallback)(void*), + ImplFontOptions& rOptions) const +{ +#ifndef ENABLE_FONTCONFIG + (void)rInfo;(void)nSize;(void)subcallback;(void)rOptions; + return false; +#else // ENABLE_FONTCONFIG + FontCfgWrapper& rWrapper = FontCfgWrapper::get(); + if( ! rWrapper.isValid() ) + return false; + + FcConfig* pConfig = rWrapper.FcConfigGetCurrent(); + FcPattern* pPattern = rWrapper.FcPatternCreate(); + + OString sFamily = OUStringToOString( rInfo.m_aFamilyName, RTL_TEXTENCODING_UTF8 ); + + std::hash_map< rtl::OString, rtl::OString, rtl::OStringHash >::const_iterator aI = rWrapper.m_aLocalizedToCanonical.find(sFamily); + if (aI != rWrapper.m_aLocalizedToCanonical.end()) + sFamily = aI->second; + if( sFamily.getLength() ) + rWrapper.FcPatternAddString( pPattern, FC_FAMILY, (FcChar8*)sFamily.getStr() ); + + addtopattern(rWrapper, pPattern, rInfo.m_eItalic, rInfo.m_eWeight, rInfo.m_eWidth, rInfo.m_ePitch); + rWrapper.FcPatternAddDouble( pPattern, FC_PIXEL_SIZE, nSize); + + FcBool embitmap = true, antialias = true, autohint = true, hinting = true; + int hintstyle = FC_HINT_FULL; + + rWrapper.FcConfigSubstitute( pConfig, pPattern, FcMatchPattern ); + if (subcallback) subcallback(pPattern); + rWrapper.FcDefaultSubstitute( pPattern ); + + FcResult eResult = FcResultNoMatch; + FcFontSet* pFontSet = rWrapper.getFontSet(); + FcPattern* pResult = rWrapper.FcFontSetMatch( pConfig, &pFontSet, 1, pPattern, &eResult ); + if( pResult ) + { + FcFontSet* pSet = rWrapper.FcFontSetCreate(); + rWrapper.FcFontSetAdd( pSet, pResult ); + if( pSet->nfont > 0 ) + { + FcResult eEmbeddedBitmap = rWrapper.FcPatternGetBool(pSet->fonts[0], + FC_EMBEDDED_BITMAP, 0, &embitmap); + FcResult eAntialias = rWrapper.FcPatternGetBool(pSet->fonts[0], + FC_ANTIALIAS, 0, &antialias); + FcResult eAutoHint = rWrapper.FcPatternGetBool(pSet->fonts[0], + FC_AUTOHINT, 0, &autohint); + FcResult eHinting = rWrapper.FcPatternGetBool(pSet->fonts[0], + FC_HINTING, 0, &hinting); + /*FcResult eHintStyle =*/ rWrapper.FcPatternGetInteger( pSet->fonts[0], + FC_HINT_STYLE, 0, &hintstyle); + + if( eEmbeddedBitmap == FcResultMatch ) + rOptions.meEmbeddedBitmap = embitmap ? EMBEDDEDBITMAP_TRUE : EMBEDDEDBITMAP_FALSE; + if( eAntialias == FcResultMatch ) + rOptions.meAntiAlias = antialias ? ANTIALIAS_TRUE : ANTIALIAS_FALSE; + if( eAutoHint == FcResultMatch ) + rOptions.meAutoHint = autohint ? AUTOHINT_TRUE : AUTOHINT_FALSE; + if( eHinting == FcResultMatch ) + rOptions.meHinting = hinting ? HINTING_TRUE : HINTING_FALSE; + switch (hintstyle) + { + case FC_HINT_NONE: rOptions.meHintStyle = HINT_NONE; break; + case FC_HINT_SLIGHT: rOptions.meHintStyle = HINT_SLIGHT; break; + case FC_HINT_MEDIUM: rOptions.meHintStyle = HINT_MEDIUM; break; + default: // fall through + case FC_HINT_FULL: rOptions.meHintStyle = HINT_FULL; break; + } + } + // info: destroying the pSet destroys pResult implicitly + // since pResult was "added" to pSet + rWrapper.FcFontSetDestroy( pSet ); + } + + // cleanup + rWrapper.FcPatternDestroy( pPattern ); + + // TODO: return true only if non-default font options are set + const bool bOK = (pResult != NULL); + return bOK; +#endif +} + +bool PrintFontManager::matchFont( FastPrintFontInfo& rInfo, const com::sun::star::lang::Locale& rLocale ) +{ + FontCfgWrapper& rWrapper = FontCfgWrapper::get(); + if( ! rWrapper.isValid() ) + return false; + + FcConfig* pConfig = rWrapper.FcConfigGetCurrent(); + FcPattern* pPattern = rWrapper.FcPatternCreate(); + + OString aLangAttrib; + // populate pattern with font characteristics + if( rLocale.Language.getLength() ) + { + OUStringBuffer aLang(6); + aLang.append( rLocale.Language ); + if( rLocale.Country.getLength() ) + { + aLang.append( sal_Unicode('-') ); + aLang.append( rLocale.Country ); + } + aLangAttrib = OUStringToOString( aLang.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ); + } + if( aLangAttrib.getLength() ) + rWrapper.FcPatternAddString( pPattern, FC_LANG, (FcChar8*)aLangAttrib.getStr() ); + + OString aFamily = OUStringToOString( rInfo.m_aFamilyName, RTL_TEXTENCODING_UTF8 ); + if( aFamily.getLength() ) + rWrapper.FcPatternAddString( pPattern, FC_FAMILY, (FcChar8*)aFamily.getStr() ); + + addtopattern(rWrapper, pPattern, rInfo.m_eItalic, rInfo.m_eWeight, rInfo.m_eWidth, rInfo.m_ePitch); + + rWrapper.FcConfigSubstitute( pConfig, pPattern, FcMatchPattern ); + rWrapper.FcDefaultSubstitute( pPattern ); + FcResult eResult = FcResultNoMatch; + FcFontSet *pFontSet = rWrapper.getFontSet(); + FcPattern* pResult = rWrapper.FcFontSetMatch( pConfig, &pFontSet, 1, pPattern, &eResult ); + bool bSuccess = false; + if( pResult ) + { + FcFontSet* pSet = rWrapper.FcFontSetCreate(); + rWrapper.FcFontSetAdd( pSet, pResult ); + if( pSet->nfont > 0 ) + { + //extract the closest match + FcChar8* file = NULL; + FcResult eFileRes = rWrapper.FcPatternGetString( pSet->fonts[0], FC_FILE, 0, &file ); + if( eFileRes == FcResultMatch ) + { + OString aDir, aBase, aOrgPath( (sal_Char*)file ); + splitPath( aOrgPath, aDir, aBase ); + int nDirID = getDirectoryAtom( aDir, true ); + fontID aFont = findFontFileID( nDirID, aBase ); + if( aFont > 0 ) + bSuccess = getFontFastInfo( aFont, rInfo ); + } + } + // info: destroying the pSet destroys pResult implicitly + // since pResult was "added" to pSet + rWrapper.FcFontSetDestroy( pSet ); + } + + // cleanup + rWrapper.FcPatternDestroy( pPattern ); + + return bSuccess; +} + +#else // ENABLE_FONTCONFIG not defined + +bool PrintFontManager::initFontconfig() +{ + return false; +} + +int PrintFontManager::countFontconfigFonts( std::hash_map& ) +{ + return 0; +} + +void PrintFontManager::deinitFontconfig() +{} + +bool PrintFontManager::addFontconfigDir( const rtl::OString& ) +{ + return false; +} + +bool PrintFontManager::matchFont( FastPrintFontInfo&, const com::sun::star::lang::Locale& ) +{ + return false; +} + +int PrintFontManager::FreeTypeCharIndex( void*, sal_uInt32 ) +{ + return 0; +} + +rtl::OUString PrintFontManager::Substitute( const rtl::OUString&, + rtl::OUString&, const rtl::OString&, italic::type, weight::type, width::type, pitch::type) const +{ + rtl::OUString aName; + return aName; +} + +#endif // ENABLE_FONTCONFIG + diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx new file mode 100644 index 000000000000..f5431026fb02 --- /dev/null +++ b/vcl/unx/generic/fontmanager/fontmanager.cxx @@ -0,0 +1,4098 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include +#include +#include +#include + +#include "unotools/atom.hxx" + +#include "fontcache.hxx" +#include "fontsubset.hxx" +#include "impfont.hxx" +#include "svdata.hxx" +#include "salinst.hxx" +#include "vcl/fontmanager.hxx" +#include "vcl/strhelper.hxx" +#include "vcl/ppdparser.hxx" + +#include "tools/urlobj.hxx" +#include "tools/stream.hxx" +#include "tools/debug.hxx" +#include "tools/config.hxx" + +#include "osl/file.hxx" +#include "osl/process.h" + +#include "rtl/tencinfo.h" +#include "rtl/ustrbuf.hxx" +#include "rtl/strbuf.hxx" + +#include "i18npool/mslangid.hxx" + + +#include "parseAFM.hxx" +#include "sft.hxx" + +#if OSL_DEBUG_LEVEL > 1 +#include +#include +#endif + +#include "sal/alloca.h" + +#include +#include +#include + +#include "adobeenc.tab" // get encoding table for AFM metrics + +#ifdef CALLGRIND_COMPILE +#include +#endif + +#include "comphelper/processfactory.hxx" +#include "com/sun/star/beans/XMaterialHolder.hpp" +#include "com/sun/star/beans/NamedValue.hpp" + +#define PRINTER_METRICDIR "fontmetric" + +using namespace vcl; +using namespace utl; +using namespace psp; +using namespace osl; +using namespace rtl; +using namespace com::sun::star::uno; +using namespace com::sun::star::beans; +using namespace com::sun::star::lang; + +/* + * static helpers + */ + +inline sal_uInt16 getUInt16BE( const sal_uInt8*& pBuffer ) +{ + sal_uInt16 nRet = (sal_uInt16)pBuffer[1] | + (((sal_uInt16)pBuffer[0]) << 8); + pBuffer+=2; + return nRet; +} + +inline sal_uInt32 getUInt32BE( const sal_uInt8*& pBuffer ) +{ + sal_uInt32 nRet = (((sal_uInt32)pBuffer[0]) << 24) | + (((sal_uInt32)pBuffer[1]) << 16) | + (((sal_uInt32)pBuffer[2]) << 8) | + (((sal_uInt32)pBuffer[3]) ); + pBuffer += 4; + return nRet; +} + +static italic::type parseItalic( const ByteString& rItalic ) +{ + italic::type eItalic = italic::Unknown; + if( rItalic.EqualsIgnoreCaseAscii( "i" ) ) + eItalic = italic::Italic; + else if( rItalic.EqualsIgnoreCaseAscii( "o" ) ) + eItalic = italic::Oblique; + else + eItalic = italic::Upright; + return eItalic; +} + +// ------------------------------------------------------------------------- + +static weight::type parseWeight( const ByteString& rWeight ) +{ + weight::type eWeight = weight::Unknown; + if( rWeight.Search( "bold" ) != STRING_NOTFOUND ) + { + if( rWeight.Search( "emi" ) != STRING_NOTFOUND ) // semi, demi + eWeight = weight::SemiBold; + else if( rWeight.Search( "ultra" ) != STRING_NOTFOUND ) + eWeight = weight::UltraBold; + else + eWeight = weight::Bold; + } + else if( rWeight.Search( "heavy" ) != STRING_NOTFOUND ) + eWeight = weight::Bold; + else if( rWeight.Search( "light" ) != STRING_NOTFOUND ) + { + if( rWeight.Search( "emi" ) != STRING_NOTFOUND ) // semi, demi + eWeight = weight::SemiLight; + else if( rWeight.Search( "ultra" ) != STRING_NOTFOUND ) + eWeight = weight::UltraLight; + else + eWeight = weight::Light; + } + else if( rWeight.Search( "black" ) != STRING_NOTFOUND ) + eWeight = weight::Black; + else if( rWeight.Equals( "demi" ) ) + eWeight = weight::SemiBold; + else if( rWeight.Equals( "book" ) || + rWeight.Equals( "semicondensed" ) ) + eWeight = weight::Light; + else if( rWeight.Equals( "medium" ) || rWeight.Equals( "roman" ) ) + eWeight = weight::Medium; + else + eWeight = weight::Normal; + return eWeight; +} + +// ------------------------------------------------------------------------- + +static width::type parseWidth( const ByteString& rWidth ) +{ + width::type eWidth = width::Unknown; + if( rWidth.Equals( "bold" ) || + rWidth.Equals( "semiexpanded" ) ) + eWidth = width::SemiExpanded; + else if( rWidth.Equals( "condensed" ) || + rWidth.Equals( "narrow" ) ) + eWidth = width::Condensed; + else if( rWidth.Equals( "double wide" ) || + rWidth.Equals( "extraexpanded" ) || + rWidth.Equals( "ultraexpanded" ) ) + eWidth = width::UltraExpanded; + else if( rWidth.Equals( "expanded" ) || + rWidth.Equals( "wide" ) ) + eWidth = width::Expanded; + else if( rWidth.Equals( "extracondensed" ) ) + eWidth = width::ExtraCondensed; + else if( rWidth.Equals( "semicondensed" ) ) + eWidth = width::SemiCondensed; + else if( rWidth.Equals( "ultracondensed" ) ) + eWidth = width::UltraCondensed; + else + eWidth = width::Normal; + + return eWidth; +} + +// ------------------------------------------------------------------------- +bool PrintFontManager::XLFDEntry::operator<(const PrintFontManager::XLFDEntry& rRight) const +{ + sal_Int32 nCmp = 0; + if( (nMask & MaskFamily) && (rRight.nMask & MaskFamily) ) + { + nCmp = rtl_str_compareIgnoreAsciiCase_WithLength( aFamily.pData->buffer, + aFamily.pData->length, + rRight.aFamily.pData->buffer, + rRight.aFamily.pData->length ); + if( nCmp != 0 ) + return nCmp < 0; + } + + if( (nMask & MaskFoundry) && (rRight.nMask & MaskFoundry) ) + { + nCmp = rtl_str_compareIgnoreAsciiCase_WithLength( aFoundry.pData->buffer, + aFoundry.pData->length, + rRight.aFoundry.pData->buffer, + rRight.aFoundry.pData->length ); + if( nCmp != 0 ) + return nCmp < 0; + } + + if( (nMask & MaskItalic) && (rRight.nMask & MaskItalic) ) + { + if( eItalic != rRight.eItalic ) + return (int)eItalic < (int)rRight.eItalic; + } + + if( (nMask & MaskWeight) && (rRight.nMask & MaskWeight) ) + { + if( eWeight != rRight.eWeight ) + return (int)eWeight < (int)rRight.eWeight; + } + + if( (nMask & MaskWidth) && (rRight.nMask & MaskWidth) ) + { + if( eWidth != rRight.eWidth ) + return (int)eWidth < (int)rRight.eWidth; + } + + if( (nMask & MaskPitch) && (rRight.nMask & MaskPitch) ) + { + if( ePitch != rRight.ePitch ) + return (int)ePitch < (int)rRight.ePitch; + } + + if( (nMask & MaskAddStyle) && (rRight.nMask & MaskAddStyle) ) + { + nCmp = rtl_str_compareIgnoreAsciiCase_WithLength( aAddStyle.pData->buffer, + aAddStyle.pData->length, + rRight.aAddStyle.pData->buffer, + rRight.aAddStyle.pData->length ); + if( nCmp != 0 ) + return nCmp < 0; + } + + if( (nMask & MaskEncoding) && (rRight.nMask & MaskEncoding) ) + { + if( aEncoding != rRight.aEncoding ) + return aEncoding < rRight.aEncoding; + } + + return false; +} + +bool PrintFontManager::XLFDEntry::operator==(const PrintFontManager::XLFDEntry& rRight) const +{ + sal_Int32 nCmp = 0; + if( (nMask & MaskFamily) && (rRight.nMask & MaskFamily) ) + { + nCmp = rtl_str_compareIgnoreAsciiCase_WithLength( aFamily.pData->buffer, + aFamily.pData->length, + rRight.aFamily.pData->buffer, + rRight.aFamily.pData->length ); + if( nCmp != 0 ) + return false; + } + + if( (nMask & MaskFoundry) && (rRight.nMask & MaskFoundry) ) + { + nCmp = rtl_str_compareIgnoreAsciiCase_WithLength( aFoundry.pData->buffer, + aFoundry.pData->length, + rRight.aFoundry.pData->buffer, + rRight.aFoundry.pData->length ); + if( nCmp != 0 ) + return false; + } + + if( (nMask & MaskItalic) && (rRight.nMask & MaskItalic) ) + { + if( eItalic != rRight.eItalic ) + return false; + } + + if( (nMask & MaskWeight) && (rRight.nMask & MaskWeight) ) + { + if( eWeight != rRight.eWeight ) + return false; + } + + if( (nMask & MaskWidth) && (rRight.nMask & MaskWidth) ) + { + if( eWidth != rRight.eWidth ) + return false; + } + + if( (nMask & MaskPitch) && (rRight.nMask & MaskPitch) ) + { + if( ePitch != rRight.ePitch ) + return false; + } + + if( (nMask & MaskAddStyle) && (rRight.nMask & MaskAddStyle) ) + { + nCmp = rtl_str_compareIgnoreAsciiCase_WithLength( aAddStyle.pData->buffer, + aAddStyle.pData->length, + rRight.aAddStyle.pData->buffer, + rRight.aAddStyle.pData->length ); + if( nCmp != 0 ) + return false; + } + + if( (nMask & MaskEncoding) && (rRight.nMask & MaskEncoding) ) + { + if( aEncoding != rRight.aEncoding ) + return false; + } + + return true; +} + +/* + * PrintFont implementations + */ +PrintFontManager::PrintFont::PrintFont( fonttype::type eType ) : + m_eType( eType ), + m_nFamilyName( 0 ), + m_nPSName( 0 ), + m_eItalic( italic::Unknown ), + m_eWidth( width::Unknown ), + m_eWeight( weight::Unknown ), + m_ePitch( pitch::Unknown ), + m_aEncoding( RTL_TEXTENCODING_DONTKNOW ), + m_bFontEncodingOnly( false ), + m_pMetrics( NULL ), + m_nAscend( 0 ), + m_nDescend( 0 ), + m_nLeading( 0 ), + m_nXMin( 0 ), + m_nYMin( 0 ), + m_nXMax( 0 ), + m_nYMax( 0 ), + m_bHaveVerticalSubstitutedGlyphs( false ), + m_bUserOverride( false ) +{ +} + +// ------------------------------------------------------------------------- + +PrintFontManager::PrintFont::~PrintFont() +{ + if( m_pMetrics ) + delete m_pMetrics; +} + +// ------------------------------------------------------------------------- + +PrintFontManager::Type1FontFile::~Type1FontFile() +{ +} + +// ------------------------------------------------------------------------- + +PrintFontManager::TrueTypeFontFile::TrueTypeFontFile() +: PrintFont( fonttype::TrueType ) +, m_nDirectory( 0 ) +, m_nCollectionEntry(-1) +, m_nTypeFlags( TYPEFLAG_INVALID ) +{} + +// ------------------------------------------------------------------------- + +PrintFontManager::TrueTypeFontFile::~TrueTypeFontFile() +{ +} + +// ------------------------------------------------------------------------- + +PrintFontManager::BuiltinFont::~BuiltinFont() +{ +} + +// ------------------------------------------------------------------------- + +bool PrintFontManager::Type1FontFile::queryMetricPage( int /*nPage*/, MultiAtomProvider* pProvider ) +{ + return readAfmMetrics( PrintFontManager::get().getAfmFile( this ), pProvider, false, false ); +} + +// ------------------------------------------------------------------------- + +bool PrintFontManager::BuiltinFont::queryMetricPage( int /*nPage*/, MultiAtomProvider* pProvider ) +{ + return readAfmMetrics( PrintFontManager::get().getAfmFile( this ), pProvider, false, false ); +} + +// ------------------------------------------------------------------------- + +bool PrintFontManager::TrueTypeFontFile::queryMetricPage( int nPage, MultiAtomProvider* pProvider ) +{ + bool bSuccess = false; + + ByteString aFile( PrintFontManager::get().getFontFile( this ) ); + + TrueTypeFont* pTTFont = NULL; + + if( OpenTTFontFile( aFile.GetBuffer(), m_nCollectionEntry < 0 ? 0 : m_nCollectionEntry, &pTTFont ) == SF_OK ) + { + if( ! m_pMetrics ) + { + m_pMetrics = new PrintFontMetrics; + memset (m_pMetrics->m_aPages, 0, sizeof(m_pMetrics->m_aPages)); + } + m_pMetrics->m_aPages[ nPage/8 ] |= (1 << ( nPage & 7 )); + int i; + sal_uInt16 table[256], table_vert[256]; + + for( i = 0; i < 256; i++ ) + table[ i ] = 256*nPage + i; + + int nCharacters = nPage < 255 ? 256 : 254; + MapString( pTTFont, table, nCharacters, NULL, 0 ); + TTSimpleGlyphMetrics* pMetrics = GetTTSimpleCharMetrics( pTTFont, nPage*256, nCharacters, 0 ); + if( pMetrics ) + { + for( i = 0; i < nCharacters; i++ ) + { + if( table[i] ) + { + CharacterMetric& rChar = m_pMetrics->m_aMetrics[ nPage*256 + i ]; + rChar.width = pMetrics[ i ].adv; + rChar.height = m_aGlobalMetricX.height; + } + } + + free( pMetrics ); + } + + for( i = 0; i < 256; i++ ) + table_vert[ i ] = 256*nPage + i; + MapString( pTTFont, table_vert, nCharacters, NULL, 1 ); + pMetrics = GetTTSimpleCharMetrics( pTTFont, nPage*256, nCharacters, 1 ); + if( pMetrics ) + { + for( i = 0; i < nCharacters; i++ ) + { + if( table_vert[i] ) + { + CharacterMetric& rChar = m_pMetrics->m_aMetrics[ nPage*256 + i + ( 1 << 16 ) ]; + rChar.width = m_aGlobalMetricY.width; + rChar.height = pMetrics[ i ].adv; + if( table_vert[i] != table[i] ) + m_pMetrics->m_bVerticalSubstitutions[ nPage*256 + i ] = 1; + } + } + free( pMetrics ); + } + + if( ! m_pMetrics->m_bKernPairsQueried ) + { + m_pMetrics->m_bKernPairsQueried = true; + // this is really a hack + // in future MapString/KernGlyphs should be used + // but vcl is not in a state where that could be used + // so currently we get kernpairs by accessing the raw data + struct _TrueTypeFont* pImplTTFont = (struct _TrueTypeFont*)pTTFont; + + //----------------------------------------------------------------- + // Kerning: KT_MICROSOFT + //----------------------------------------------------------------- + if( pImplTTFont->nkern && pImplTTFont->kerntype == KT_MICROSOFT ) + { + // create a glyph -> character mapping + ::std::hash_map< sal_uInt16, sal_Unicode > aGlyphMap; + ::std::hash_map< sal_uInt16, sal_Unicode >::iterator left, right; + for( i = 21; i < 0xfffd; i++ ) + { + sal_uInt16 nGlyph = MapChar( pTTFont, (sal_Unicode)i, 0 ); // kerning for horz only + if( nGlyph != 0 ) + aGlyphMap[ nGlyph ] = (sal_Unicode)i; + } + + + KernPair aPair; + for( i = 0; i < (int)pImplTTFont->nkern; i++ ) + { + const sal_uInt8* pTable = pImplTTFont->kerntables[i]; + + /*sal_uInt16 nVersion =*/ getUInt16BE( pTable ); + /*sal_uInt16 nLength =*/ getUInt16BE( pTable ); + sal_uInt16 nCoverage = getUInt16BE( pTable ); + + aPair.kern_x = 0; + aPair.kern_y = 0; + switch( nCoverage >> 8 ) + { + case 0: + { + sal_uInt16 nPairs = getUInt16BE( pTable ); + pTable += 6; + for( int n = 0; n < nPairs; n++ ) + { + sal_uInt16 nLeftGlyph = getUInt16BE( pTable ); + sal_uInt16 nRightGlyph = getUInt16BE( pTable ); + sal_Int16 nKern = (sal_Int16)getUInt16BE( pTable ); + + left = aGlyphMap.find( nLeftGlyph ); + right = aGlyphMap.find( nRightGlyph ); + if( left != aGlyphMap.end() && right != aGlyphMap.end() ) + { + aPair.first = left->second; + aPair.second = right->second; + switch( nCoverage & 1 ) + { + case 1: + aPair.kern_x = (int)nKern * 1000 / pImplTTFont->unitsPerEm; + m_pMetrics->m_aXKernPairs.push_back( aPair ); + break; + case 0: + aPair.kern_y = (int)nKern * 1000 / pImplTTFont->unitsPerEm; + m_pMetrics->m_aYKernPairs.push_back( aPair ); + break; + } + } + } + } + break; + + case 2: + { + const sal_uInt8* pSubTable = pTable; + /*sal_uInt16 nRowWidth =*/ getUInt16BE( pTable ); + sal_uInt16 nOfLeft = getUInt16BE( pTable ); + sal_uInt16 nOfRight = getUInt16BE( pTable ); + /*sal_uInt16 nOfArray =*/ getUInt16BE( pTable ); + const sal_uInt8* pTmp = pSubTable + nOfLeft; + sal_uInt16 nFirstLeft = getUInt16BE( pTmp ); + sal_uInt16 nLastLeft = getUInt16BE( pTmp ) + nFirstLeft - 1; + pTmp = pSubTable + nOfRight; + sal_uInt16 nFirstRight = getUInt16BE( pTmp ); + sal_uInt16 nLastRight = getUInt16BE( pTmp ) + nFirstRight -1; + + // int nPairs = (int)(nLastLeft-nFirstLeft+1)*(int)(nLastRight-nFirstRight+1); + for( aPair.first = nFirstLeft; aPair.first < nLastLeft; aPair.first++ ) + { + for( aPair.second = 0; aPair.second < nLastRight; aPair.second++ ) + { + sal_Int16 nKern = (sal_Int16)getUInt16BE( pTmp ); + switch( nCoverage & 1 ) + { + case 1: + aPair.kern_x = (int)nKern * 1000 / pImplTTFont->unitsPerEm; + m_pMetrics->m_aXKernPairs.push_back( aPair ); + break; + case 0: + aPair.kern_y = (int)nKern * 1000 / pImplTTFont->unitsPerEm; + m_pMetrics->m_aYKernPairs.push_back( aPair ); + break; + } + } + } + } + break; + } + } + } + + //----------------------------------------------------------------- + // Kerning: KT_APPLE_NEW + //----------------------------------------------------------------- + if( pImplTTFont->nkern && pImplTTFont->kerntype == KT_APPLE_NEW ) + { + // create a glyph -> character mapping + ::std::hash_map< sal_uInt16, sal_Unicode > aGlyphMap; + ::std::hash_map< sal_uInt16, sal_Unicode >::iterator left, right; + for( i = 21; i < 0xfffd; i++ ) + { + sal_uInt16 nGlyph = MapChar( pTTFont, (sal_Unicode)i, 0 ); // kerning for horz only + if( nGlyph != 0 ) + aGlyphMap[ nGlyph ] = (sal_Unicode)i; + } + + // Loop through each of the 'kern' subtables + KernPair aPair; + for( i = 0; (unsigned int)i < pImplTTFont->nkern; i++ ) + { + const sal_uInt8* pTable = pImplTTFont->kerntables[i]; + + /*sal_uInt32 nLength =*/ getUInt32BE( pTable ); + sal_uInt16 nCoverage = getUInt16BE( pTable ); + /*sal_uInt16 nTupleIndex =*/ getUInt16BE( pTable ); + + // Get kerning type + // sal_Bool bKernVertical = nCoverage & 0x8000; + // sal_Bool bKernCrossStream = nCoverage & 0x4000; + // sal_Bool bKernVariation = nCoverage & 0x2000; + + // Kerning sub-table format, 0 through 3 + sal_uInt8 nSubTableFormat = nCoverage & 0x00FF; + + aPair.kern_x = 0; + aPair.kern_y = 0; + switch( nSubTableFormat ) + { + case 0: + { + // Grab the # of kern pairs but skip over the: + // searchRange + // entrySelector + // rangeShift + sal_uInt16 nPairs = getUInt16BE( pTable ); + pTable += 6; + + for( int n = 0; n < nPairs; n++ ) + { + sal_uInt16 nLeftGlyph = getUInt16BE( pTable ); + sal_uInt16 nRightGlyph = getUInt16BE( pTable ); + sal_Int16 nKern = (sal_Int16)getUInt16BE( pTable ); + + left = aGlyphMap.find( nLeftGlyph ); + right = aGlyphMap.find( nRightGlyph ); + if( left != aGlyphMap.end() && right != aGlyphMap.end() ) + { + aPair.first = left->second; + aPair.second = right->second; + + // Only support horizontal kerning for now + aPair.kern_x = (int)nKern * 1000 / pImplTTFont->unitsPerEm; + aPair.kern_y = 0; + m_pMetrics->m_aXKernPairs.push_back( aPair ); + +/* switch( nCoverage & 1 ) + { + case 1: + aPair.kern_x = (int)nKern * 1000 / pImplTTFont->unitsPerEm; + m_pMetrics->m_aXKernPairs.push_back( aPair ); + break; + case 0: + aPair.kern_y = (int)nKern * 1000 / pImplTTFont->unitsPerEm; + m_pMetrics->m_aYKernPairs.push_back( aPair ); + break; + } +*/ + } + } + } + break; + + case 2: + { + const sal_uInt8* pSubTable = pTable; + /*sal_uInt16 nRowWidth =*/ getUInt16BE( pTable ); + sal_uInt16 nOfLeft = getUInt16BE( pTable ); + sal_uInt16 nOfRight = getUInt16BE( pTable ); + /*sal_uInt16 nOfArray =*/ getUInt16BE( pTable ); + const sal_uInt8* pTmp = pSubTable + nOfLeft; + sal_uInt16 nFirstLeft = getUInt16BE( pTmp ); + sal_uInt16 nLastLeft = getUInt16BE( pTmp ) + nFirstLeft - 1; + pTmp = pSubTable + nOfRight; + sal_uInt16 nFirstRight = getUInt16BE( pTmp ); + sal_uInt16 nLastRight = getUInt16BE( pTmp ) + nFirstRight -1; + + for( aPair.first = nFirstLeft; aPair.first < nLastLeft; aPair.first++ ) + { + for( aPair.second = 0; aPair.second < nLastRight; aPair.second++ ) + { + sal_Int16 nKern = (sal_Int16)getUInt16BE( pTmp ); + switch( nCoverage & 1 ) + { + case 1: + aPair.kern_x = (int)nKern * 1000 / pImplTTFont->unitsPerEm; + m_pMetrics->m_aXKernPairs.push_back( aPair ); + break; + case 0: + aPair.kern_y = (int)nKern * 1000 / pImplTTFont->unitsPerEm; + m_pMetrics->m_aYKernPairs.push_back( aPair ); + break; + } + } + } + } + break; + + default: + fprintf( stderr, "Found unsupported Apple-style kern subtable type %d.\n", nSubTableFormat ); + break; + } + } + } + +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "found %d/%d kern pairs for %s\n", + m_pMetrics->m_aXKernPairs.size(), + m_pMetrics->m_aYKernPairs.size(), + OUStringToOString( pProvider->getString( ATOM_FAMILYNAME, m_nFamilyName ), RTL_TEXTENCODING_MS_1252 ).getStr() ); +#else + (void) pProvider; /* avoid warnings */ +#endif + } + + CloseTTFont( pTTFont ); + bSuccess = true; + } + return bSuccess; +} + +// ------------------------------------------------------------------------- + +/* #i73387# There seem to be fonts with a rather unwell chosen family name +* consider e.g. "Helvetica Narrow" which defines its family as "Helvetica" +* It can really only be distinguished by its PSName and FullName. Both of +* which are not user presentable in OOo. So replace it by something sensible. +* +* If other fonts feature this behaviour, insert them to the map. +*/ +static bool familyNameOverride( const OUString& i_rPSname, OUString& o_rFamilyName ) +{ + static std::hash_map< OUString, OUString, OUStringHash > aPSNameToFamily( 16 ); + if( aPSNameToFamily.empty() ) // initialization + { + aPSNameToFamily[ OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica-Narrow" ) ) ] = + OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica Narrow" ) ); + aPSNameToFamily[ OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica-Narrow-Bold" ) ) ] = + OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica Narrow" ) ); + aPSNameToFamily[ OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica-Narrow-BoldOblique" ) ) ] = + OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica Narrow" ) ); + aPSNameToFamily[ OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica-Narrow-Oblique" ) ) ] = + OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica Narrow" ) ); + } + std::hash_map::const_iterator it = + aPSNameToFamily.find( i_rPSname ); + bool bReplaced = (it != aPSNameToFamily.end() ); + if( bReplaced ) + o_rFamilyName = it->second; + return bReplaced; +}; + +bool PrintFontManager::PrintFont::readAfmMetrics( const OString& rFileName, MultiAtomProvider* pProvider, bool bFillEncodingvector, bool bOnlyGlobalAttributes ) +{ + PrintFontManager& rManager( PrintFontManager::get() ); + + int i; + FontInfo* pInfo = NULL; + parseFile( rFileName.getStr(), &pInfo, P_ALL ); + if( ! pInfo || ! pInfo->numOfChars ) + { + if( pInfo ) + freeFontInfo( pInfo ); + return false; + } + + m_aEncodingVector.clear(); + // fill in global info + + // PSName + OUString aPSName( OStringToOUString( pInfo->gfi->fontName, RTL_TEXTENCODING_ISO_8859_1 ) ); + m_nPSName = pProvider->getAtom( ATOM_PSNAME, aPSName, sal_True ); + + // family name (if not already set) + OUString aFamily; + if( ! m_nFamilyName ) + { + aFamily = OStringToOUString( pInfo->gfi->familyName, RTL_TEXTENCODING_ISO_8859_1 ); + if( ! aFamily.getLength() ) + { + aFamily = OStringToOUString( pInfo->gfi->fontName, RTL_TEXTENCODING_ISO_8859_1 ); + sal_Int32 nIndex = 0; + aFamily = aFamily.getToken( 0, '-', nIndex ); + } + familyNameOverride( aPSName, aFamily ); + m_nFamilyName = pProvider->getAtom( ATOM_FAMILYNAME, aFamily, sal_True ); + } + else + aFamily = pProvider->getString( ATOM_FAMILYNAME, m_nFamilyName ); + + // style name: if fullname begins with family name + // interpret the rest of fullname as style + if( ! m_aStyleName.getLength() && pInfo->gfi->fullName && *pInfo->gfi->fullName ) + { + OUString aFullName( OStringToOUString( pInfo->gfi->fullName, RTL_TEXTENCODING_ISO_8859_1 ) ); + if( aFullName.indexOf( aFamily ) == 0 ) + m_aStyleName = WhitespaceToSpace( aFullName.copy( aFamily.getLength() ) ); + } + + // italic + if( pInfo->gfi->italicAngle > 0 ) + m_eItalic = italic::Oblique; + else if( pInfo->gfi->italicAngle < 0 ) + m_eItalic = italic::Italic; + else + m_eItalic = italic::Upright; + + // weight + ByteString aLowerWeight( pInfo->gfi->weight ); + aLowerWeight.ToLowerAscii(); + m_eWeight = parseWeight( aLowerWeight ); + + // pitch + m_ePitch = pInfo->gfi->isFixedPitch ? pitch::Fixed : pitch::Variable; + + // encoding - only set if unknown + int nAdobeEncoding = 0; + if( pInfo->gfi->encodingScheme ) + { + if( !strcmp( pInfo->gfi->encodingScheme, "AdobeStandardEncoding" ) ) + nAdobeEncoding = 1; + else if( !strcmp( pInfo->gfi->encodingScheme, "ISO10646-1" ) ) + { + nAdobeEncoding = 1; + m_aEncoding = RTL_TEXTENCODING_UNICODE; + } + else if( !strcmp( pInfo->gfi->encodingScheme, "Symbol") ) + nAdobeEncoding = 2; + else if( !strcmp( pInfo->gfi->encodingScheme, "FontSpecific") ) + nAdobeEncoding = 3; + + if( m_aEncoding == RTL_TEXTENCODING_DONTKNOW ) + m_aEncoding = nAdobeEncoding == 1 ? + RTL_TEXTENCODING_ADOBE_STANDARD : RTL_TEXTENCODING_SYMBOL; + } + else if( m_aEncoding == RTL_TEXTENCODING_DONTKNOW ) + m_aEncoding = RTL_TEXTENCODING_ADOBE_STANDARD; + + // try to parse the font name and decide wether it might be a + // japanese font. Who invented this PITA ? + OUString aPSNameLastToken( aPSName.copy( aPSName.lastIndexOf( '-' )+1 ) ); + if( ! aPSNameLastToken.compareToAscii( "H" ) || + ! aPSNameLastToken.compareToAscii( "V" ) ) + { + static const char* pEncs[] = + { + "EUC", + "RKSJ", + "SJ" + }; + static const rtl_TextEncoding aEncs[] = + { + RTL_TEXTENCODING_EUC_JP, + RTL_TEXTENCODING_SHIFT_JIS, + RTL_TEXTENCODING_JIS_X_0208 + }; + + for( unsigned int enc = 0; enc < sizeof( aEncs )/sizeof(aEncs[0]) && m_aEncoding == RTL_TEXTENCODING_DONTKNOW; enc++ ) + { + sal_Int32 nIndex = 0, nOffset = 1; + do + { + OUString aToken( aPSName.getToken( nOffset, '-', nIndex ) ); + if( nIndex == -1 ) + break; + nOffset = 0; + if( ! aToken.compareToAscii( pEncs[enc] ) ) + { + m_aEncoding = aEncs[ enc ]; + m_bFontEncodingOnly = true; + } + } while( nIndex != -1 ); + } + + // default is jis + if( m_aEncoding == RTL_TEXTENCODING_DONTKNOW ) + m_aEncoding = RTL_TEXTENCODING_JIS_X_0208; +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "Encoding %d for %s\n", m_aEncoding, pInfo->gfi->fontName ); +#endif + } + + // hack for GB encoded builtin fonts posing as FontSpecific + if( m_eType == fonttype::Builtin && ( nAdobeEncoding == 3 || nAdobeEncoding == 0 ) ) + { + int nLen = aFamily.getLength(); + if( nLen > 2 && + aFamily.getStr()[ nLen-2 ] == 'G' && + aFamily.getStr()[ nLen-1 ] == 'B' && + pInfo->numOfChars > 255 ) + { + m_aEncoding = RTL_TEXTENCODING_GBK; + m_bFontEncodingOnly = true; +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "found builtin font %s with GBK encoding\n", pInfo->gfi->fontName ); +#endif + } + } + + // #i37313# check if Fontspecific is not rather some character encoding + if( nAdobeEncoding == 3 && m_aEncoding == RTL_TEXTENCODING_SYMBOL ) + { + bool bYFound = false; + bool bQFound = false; + CharMetricInfo* pChar = pInfo->cmi; + for( int j = 0; j < pInfo->numOfChars && ! (bYFound && bQFound); j++ ) + { + if( pChar[j].name ) + { + if( pChar[j].name[0] == 'Y' && pChar[j].name[1] == 0 ) + bYFound = true; + else if( pChar[j].name[0] == 'Q' && pChar[j].name[1] == 0 ) + bQFound = true; + } + } + if( bQFound && bYFound ) + { + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "setting FontSpecific font %s (file %s) to unicode\n", + pInfo->gfi->fontName, + rFileName.getStr() + ); + #endif + nAdobeEncoding = 4; + m_aEncoding = RTL_TEXTENCODING_UNICODE; + bFillEncodingvector = false; // will be filled anyway, don't do the work twice + } + } + + // ascend + m_nAscend = pInfo->gfi->fontBBox.ury; + + // descend + // descends have opposite sign of our definition + m_nDescend = -pInfo->gfi->fontBBox.lly; + + // fallback to ascender, descender + // interesting: the BBox seems to describe Ascender and Descender better + // as we understand it + if( m_nAscend == 0 ) + m_nAscend = pInfo->gfi->ascender; + if( m_nDescend == 0) + m_nDescend = -pInfo->gfi->descender; + + m_nLeading = m_nAscend + m_nDescend - 1000; + + if( m_pMetrics ) + delete m_pMetrics; + m_pMetrics = new PrintFontMetrics; + // mark all pages as queried (or clear if only global font info queiried) + memset( m_pMetrics->m_aPages, bOnlyGlobalAttributes ? 0 : 0xff, sizeof( m_pMetrics->m_aPages ) ); + + m_aGlobalMetricX.width = m_aGlobalMetricY.width = + pInfo->gfi->charwidth ? pInfo->gfi->charwidth : pInfo->gfi->fontBBox.urx; + m_aGlobalMetricX.height = m_aGlobalMetricY.height = + pInfo->gfi->capHeight ? pInfo->gfi->capHeight : pInfo->gfi->fontBBox.ury; + + m_nXMin = pInfo->gfi->fontBBox.llx; + m_nYMin = pInfo->gfi->fontBBox.lly; + m_nXMax = pInfo->gfi->fontBBox.urx; + m_nYMax = pInfo->gfi->fontBBox.ury; + + if( bFillEncodingvector || !bOnlyGlobalAttributes ) + { + // fill in character metrics + + // first transform the character codes to unicode + // note: this only works with single byte encodings + sal_Unicode* pUnicodes = (sal_Unicode*)alloca( pInfo->numOfChars * sizeof(sal_Unicode)); + CharMetricInfo* pChar = pInfo->cmi; + + for( i = 0; i < pInfo->numOfChars; i++, pChar++ ) + { + if( nAdobeEncoding == 4 ) + { + if( pChar->name ) + { + pUnicodes[i] = 0; + std::list< sal_Unicode > aCodes = rManager.getUnicodeFromAdobeName( pChar->name ); + for( std::list< sal_Unicode >::const_iterator it = aCodes.begin(); it != aCodes.end(); ++it ) + { + if( *it != 0 ) + { + m_aEncodingVector[ *it ] = pChar->code; + if( pChar->code == -1 ) + m_aNonEncoded[ *it ] = pChar->name; + if( ! pUnicodes[i] ) // map the first + pUnicodes[i] = *it; + } + } + } + } + else if( pChar->code != -1 ) + { + if( nAdobeEncoding == 3 && m_aEncoding == RTL_TEXTENCODING_SYMBOL ) + { + pUnicodes[i] = pChar->code + 0xf000; + if( bFillEncodingvector ) + m_aEncodingVector[ pUnicodes[i] ] = pChar->code; + continue; + } + + if( m_aEncoding == RTL_TEXTENCODING_UNICODE ) + { + pUnicodes[i] = (sal_Unicode)pChar->code; + continue; + } + + ByteString aTranslate; + if( pChar->code & 0xff000000 ) + aTranslate += (char)(pChar->code >> 24 ); + if( pChar->code & 0xffff0000 ) + aTranslate += (char)((pChar->code & 0x00ff0000) >> 16 ); + if( pChar->code & 0xffffff00 ) + aTranslate += (char)((pChar->code & 0x0000ff00) >> 8 ); + aTranslate += (char)(pChar->code & 0xff); + String aUni( aTranslate, m_aEncoding ); + pUnicodes[i] = *aUni.GetBuffer(); + } + else + pUnicodes[i] = 0; + } + + // now fill in the character metrics + // parseAFM.cxx effectively only supports direction 0 (horizontal) + pChar = pInfo->cmi; + CharacterMetric aMetric; + for( i = 0; i < pInfo->numOfChars; i++, pChar++ ) + { + if( pChar->code == -1 && ! pChar->name ) + continue; + + if( bFillEncodingvector && pChar->name ) + { + std::list< sal_Unicode > aCodes = rManager.getUnicodeFromAdobeName( pChar->name ); + for( std::list< sal_Unicode >::const_iterator it = aCodes.begin(); it != aCodes.end(); ++it ) + { + if( *it != 0 ) + { + m_aEncodingVector[ *it ] = pChar->code; + if( pChar->code == -1 ) + m_aNonEncoded[ *it ] = pChar->name; + } + } + } + + aMetric.width = pChar->wx ? pChar->wx : pChar->charBBox.urx; + aMetric.height = pChar->wy ? pChar->wy : pChar->charBBox.ury - pChar->charBBox.lly; + if( aMetric.width == 0 && aMetric.height == 0 ) + // guess something for e.g. space + aMetric.width = m_aGlobalMetricX.width/4; + + if( ( nAdobeEncoding == 0 ) || + ( ( nAdobeEncoding == 3 ) && ( m_aEncoding != RTL_TEXTENCODING_SYMBOL ) ) ) + { + if( pChar->code != -1 ) + { + m_pMetrics->m_aMetrics[ pUnicodes[i] ] = aMetric; + if( bFillEncodingvector ) + m_aEncodingVector[ pUnicodes[i] ] = pChar->code; + } + else if( pChar->name ) + { + std::list< sal_Unicode > aCodes = rManager.getUnicodeFromAdobeName( pChar->name ); + for( std::list< sal_Unicode >::const_iterator it = aCodes.begin(); it != aCodes.end(); ++it ) + { + if( *it != 0 ) + m_pMetrics->m_aMetrics[ *it ] = aMetric; + } + } + } + else if( nAdobeEncoding == 1 || nAdobeEncoding == 2 || nAdobeEncoding == 4) + { + if( pChar->name ) + { + std::list< sal_Unicode > aCodes = rManager.getUnicodeFromAdobeName( pChar->name ); + for( std::list< sal_Unicode >::const_iterator it = aCodes.begin(); it != aCodes.end(); ++it ) + { + if( *it != 0 ) + m_pMetrics->m_aMetrics[ *it ] = aMetric; + } + } + else if( pChar->code != -1 ) + { + ::std::pair< ::std::hash_multimap< sal_uInt8, sal_Unicode >::const_iterator, + ::std::hash_multimap< sal_uInt8, sal_Unicode >::const_iterator > + aCodes = rManager.getUnicodeFromAdobeCode( pChar->code ); + while( aCodes.first != aCodes.second ) + { + if( (*aCodes.first).second != 0 ) + { + m_pMetrics->m_aMetrics[ (*aCodes.first).second ] = aMetric; + if( bFillEncodingvector ) + m_aEncodingVector[ (*aCodes.first).second ] = pChar->code; + } + ++aCodes.first; + } + } + } + else if( nAdobeEncoding == 3 ) + { + if( pChar->code != -1 ) + { + sal_Unicode code = 0xf000 + pChar->code; + m_pMetrics->m_aMetrics[ code ] = aMetric; + // maybe should try to find the name in the convtabs ? + if( bFillEncodingvector ) + m_aEncodingVector[ code ] = pChar->code; + } + } + } + + m_pMetrics->m_aXKernPairs.clear(); + m_pMetrics->m_aYKernPairs.clear(); + + // now fill in the kern pairs + // parseAFM.cxx effectively only supports direction 0 (horizontal) + PairKernData* pKern = pInfo->pkd; + KernPair aPair; + for( i = 0; i < pInfo->numOfPairs; i++, pKern++ ) + { + // #i37703# broken kern table + if( ! pKern->name1 || ! pKern->name2 ) + continue; + + aPair.first = 0; + aPair.second = 0; + // currently we have to find the adobe character names + // in the already parsed character metrics to find + // the corresponding UCS2 code which is a bit dangerous + // since the character names are not required + // in the metric descriptions + pChar = pInfo->cmi; + for( int j = 0; + j < pInfo->numOfChars && ( aPair.first == 0 || aPair.second == 0 ); + j++, pChar++ ) + { + if( pChar->code != -1 ) + { + if( ! strcmp( pKern->name1, pChar->name ? pChar->name : "" ) ) + aPair.first = pUnicodes[ j ]; + if( ! strcmp( pKern->name2, pChar->name ? pChar->name : "" ) ) + aPair.second = pUnicodes[ j ]; + } + } + if( aPair.first && aPair.second ) + { + aPair.kern_x = pKern->xamt; + aPair.kern_y = pKern->yamt; + m_pMetrics->m_aXKernPairs.push_back( aPair ); + } + } + m_pMetrics->m_bKernPairsQueried = true; + } + + freeFontInfo( pInfo ); + return true; +} + +// ------------------------------------------------------------------------- + +OString PrintFontManager::s_aEmptyOString; + +/* + * one instance only + */ +PrintFontManager& PrintFontManager::get() +{ + static PrintFontManager* theManager = NULL; + if( ! theManager ) + { + theManager = new PrintFontManager(); + theManager->initialize(); + } + return *theManager; +} + +// ------------------------------------------------------------------------- + +/* + * the PrintFontManager + */ + +PrintFontManager::PrintFontManager() : + m_nNextFontID( 1 ), + m_pAtoms( new MultiAtomProvider() ), + m_nNextDirAtom( 1 ), + m_pFontCache( NULL ), + m_bFontconfigSuccess( false ) +{ + for( unsigned int i = 0; i < sizeof( aAdobeCodes )/sizeof( aAdobeCodes[0] ); i++ ) + { + m_aUnicodeToAdobename.insert( ::std::hash_multimap< sal_Unicode, ::rtl::OString >::value_type( aAdobeCodes[i].aUnicode, aAdobeCodes[i].pAdobename ) ); + m_aAdobenameToUnicode.insert( ::std::hash_multimap< ::rtl::OString, sal_Unicode, ::rtl::OStringHash >::value_type( aAdobeCodes[i].pAdobename, aAdobeCodes[i].aUnicode ) ); + if( aAdobeCodes[i].aAdobeStandardCode ) + { + m_aUnicodeToAdobecode.insert( ::std::hash_multimap< sal_Unicode, sal_uInt8 >::value_type( aAdobeCodes[i].aUnicode, aAdobeCodes[i].aAdobeStandardCode ) ); + m_aAdobecodeToUnicode.insert( ::std::hash_multimap< sal_uInt8, sal_Unicode >::value_type( aAdobeCodes[i].aAdobeStandardCode, aAdobeCodes[i].aUnicode ) ); + } +#if 0 + m_aUnicodeToAdobename[ aAdobeCodes[i].aUnicode ] = aAdobeCodes[i].pAdobename; + m_aAdobenameToUnicode[ aAdobeCodes[i].pAdobename ] = aAdobeCodes[i].aUnicode; + if( aAdobeCodes[i].aAdobeStandardCode ) + { + m_aUnicodeToAdobecode[ aAdobeCodes[i].aUnicode ] = aAdobeCodes[i].aAdobeStandardCode; + m_aAdobecodeToUnicode[ aAdobeCodes[i].aAdobeStandardCode ] = aAdobeCodes[i].aUnicode; + } +#endif + } +} + +// ------------------------------------------------------------------------- + +PrintFontManager::~PrintFontManager() +{ + deinitFontconfig(); + for( ::std::hash_map< fontID, PrintFont* >::const_iterator it = m_aFonts.begin(); it != m_aFonts.end(); ++it ) + delete (*it).second; + delete m_pAtoms; + if( m_pFontCache ) + delete m_pFontCache; +} + +// ------------------------------------------------------------------------- + +const OString& PrintFontManager::getDirectory( int nAtom ) const +{ + ::std::hash_map< int, OString >::const_iterator it( m_aAtomToDir.find( nAtom ) ); + return it != m_aAtomToDir.end() ? it->second : s_aEmptyOString; +} + +// ------------------------------------------------------------------------- + +int PrintFontManager::getDirectoryAtom( const OString& rDirectory, bool bCreate ) +{ + int nAtom = 0; + ::std::hash_map< OString, int, OStringHash >::const_iterator it + ( m_aDirToAtom.find( rDirectory ) ); + if( it != m_aDirToAtom.end() ) + nAtom = it->second; + else if( bCreate ) + { + nAtom = m_nNextDirAtom++; + m_aDirToAtom[ rDirectory ] = nAtom; + m_aAtomToDir[ nAtom ] = rDirectory; + } + return nAtom; +} + +// ------------------------------------------------------------------------- + +int PrintFontManager::addFontFile( const ::rtl::OString& rFileName, int /*nFaceNum*/ ) +{ + rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); + INetURLObject aPath( OStringToOUString( rFileName, aEncoding ), INET_PROT_FILE, INetURLObject::ENCODE_ALL ); + OString aName( OUStringToOString( aPath.GetName(), aEncoding ) ); + OString aDir( OUStringToOString( aPath.GetPath(), aEncoding ) ); + + int nDirID = getDirectoryAtom( aDir, true ); + fontID nFontId = findFontFileID( nDirID, aName ); + if( !nFontId ) + { + ::std::list< PrintFont* > aNewFonts; + if( analyzeFontFile( nDirID, aName, ::std::list(), aNewFonts ) ) + { + for( ::std::list< PrintFont* >::iterator it = aNewFonts.begin(); + it != aNewFonts.end(); ++it ) + { + m_aFonts[ nFontId = m_nNextFontID++ ] = *it; + m_aFontFileToFontID[ aName ].insert( nFontId ); + m_pFontCache->updateFontCacheEntry( *it, true ); + } + } + } + return nFontId; +} + +// ------------------------------------------------------------------------- + +bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, const ::std::list& rXLFDs, ::std::list< PrintFontManager::PrintFont* >& rNewFonts ) const +{ + rNewFonts.clear(); + + OString aDir( getDirectory( nDirID ) ); + + OString aFullPath( aDir ); + aFullPath += "/"; + aFullPath += rFontFile; + + // #i1872# reject unreadable files + if( access( aFullPath.getStr(), R_OK ) ) + return false; + + ByteString aExt( rFontFile.copy( rFontFile.lastIndexOf( '.' )+1 ) ); + if( aExt.EqualsIgnoreCaseAscii( "pfb" ) || aExt.EqualsIgnoreCaseAscii( "pfa" ) ) + { + // check for corresponding afm metric + // first look for an adjacent file + static const char* pSuffix[] = { ".afm", ".AFM" }; + + for( unsigned int i = 0; i < sizeof(pSuffix)/sizeof(pSuffix[0]); i++ ) + { + ByteString aName( rFontFile ); + aName.Erase( aName.Len()-4 ); + aName.Append( pSuffix[i] ); + + ByteString aFilePath( aDir ); + aFilePath.Append( '/' ); + aFilePath.Append( aName ); + + ByteString aAfmFile; + if( access( aFilePath.GetBuffer(), R_OK ) ) + { + // try in subdirectory afm instead + aFilePath = aDir; + aFilePath.Append( "/afm/" ); + aFilePath.Append( aName ); + + if( ! access( aFilePath.GetBuffer(), R_OK ) ) + { + aAfmFile = "afm/"; + aAfmFile += aName; + } + } + else + aAfmFile = aName; + + if( aAfmFile.Len() ) + { + Type1FontFile* pFont = new Type1FontFile(); + pFont->m_nDirectory = nDirID; + + pFont->m_aFontFile = rFontFile; + pFont->m_aMetricFile = aAfmFile; + + if( ! pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, true ) ) + { + delete pFont; + pFont = NULL; + } + if( pFont && rXLFDs.size() ) + getFontAttributesFromXLFD( pFont, rXLFDs ); + if( pFont ) + rNewFonts.push_back( pFont ); + break; + } + } + } + else if( aExt.EqualsIgnoreCaseAscii( "afm" ) ) + { + ByteString aFilePath( aDir ); + aFilePath.Append( '/' ); + aFilePath.Append( ByteString( rFontFile ) ); + BuiltinFont* pFont = new BuiltinFont(); + pFont->m_nDirectory = nDirID; + pFont->m_aMetricFile = rFontFile; + if( pFont->readAfmMetrics( aFilePath, m_pAtoms, false, true ) ) + rNewFonts.push_back( pFont ); + else + delete pFont; + } + else if( aExt.EqualsIgnoreCaseAscii( "ttf" ) + || aExt.EqualsIgnoreCaseAscii( "tte" ) // #i33947# for Gaiji support + || aExt.EqualsIgnoreCaseAscii( "otf" ) ) // check for TTF- and PS-OpenType too + { + TrueTypeFontFile* pFont = new TrueTypeFontFile(); + pFont->m_nDirectory = nDirID; + pFont->m_aFontFile = rFontFile; + pFont->m_nCollectionEntry = -1; + + if( rXLFDs.size() ) + getFontAttributesFromXLFD( pFont, rXLFDs ); + // need to read the font anyway to get aliases inside the font file + if( ! analyzeTrueTypeFile( pFont ) ) + { + delete pFont; + pFont = NULL; + } + else + rNewFonts.push_back( pFont ); + } + else if( aExt.EqualsIgnoreCaseAscii( "ttc" ) ) + { + // get number of ttc entries + int nLength = CountTTCFonts( aFullPath.getStr() ); + if( nLength ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "%s contains %d fonts\n", aFullPath.getStr(), nLength ); +#endif + for( int i = 0; i < nLength; i++ ) + { + TrueTypeFontFile* pFont = new TrueTypeFontFile(); + pFont->m_nDirectory = nDirID; + pFont->m_aFontFile = rFontFile; + pFont->m_nCollectionEntry = i; + if( nLength == 1 ) + getFontAttributesFromXLFD( pFont, rXLFDs ); + if( ! analyzeTrueTypeFile( pFont ) ) + { + delete pFont; + pFont = NULL; + } + else + rNewFonts.push_back( pFont ); + } + } +#if OSL_DEBUG_LEVEL > 1 + else + fprintf( stderr, "CountTTCFonts( \"%s/%s\" ) failed\n", getDirectory(nDirID).getStr(), rFontFile.getStr() ); +#endif + } + return ! rNewFonts.empty(); +} + +// ------------------------------------------------------------------------- + +fontID PrintFontManager::findFontBuiltinID( int nPSNameAtom ) const +{ + fontID nID = 0; + ::std::hash_map< fontID, PrintFont* >::const_iterator it; + for( it = m_aFonts.begin(); nID == 0 && it != m_aFonts.end(); ++it ) + { + if( it->second->m_eType == fonttype::Builtin && + it->second->m_nPSName == nPSNameAtom ) + nID = it->first; + } + return nID; +} + +// ------------------------------------------------------------------------- + +fontID PrintFontManager::findFontFileID( int nDirID, const OString& rFontFile ) const +{ + fontID nID = 0; + + ::std::hash_map< OString, ::std::set< fontID >, OStringHash >::const_iterator set_it = m_aFontFileToFontID.find( rFontFile ); + if( set_it != m_aFontFileToFontID.end() ) + { + for( ::std::set< fontID >::const_iterator font_it = set_it->second.begin(); font_it != set_it->second.end() && ! nID; ++font_it ) + { + ::std::hash_map< fontID, PrintFont* >::const_iterator it = m_aFonts.find( *font_it ); + if( it != m_aFonts.end() ) + { + switch( it->second->m_eType ) + { + case fonttype::Type1: + { + Type1FontFile* const pFont = static_cast< Type1FontFile* const >((*it).second); + if( pFont->m_nDirectory == nDirID && + pFont->m_aFontFile == rFontFile ) + nID = it->first; + } + break; + case fonttype::TrueType: + { + TrueTypeFontFile* const pFont = static_cast< TrueTypeFontFile* const >((*it).second); + if( pFont->m_nDirectory == nDirID && + pFont->m_aFontFile == rFontFile ) + nID = it->first; + } + break; + case fonttype::Builtin: + if( static_cast((*it).second)->m_nDirectory == nDirID && + static_cast((*it).second)->m_aMetricFile == rFontFile ) + nID = it->first; + break; + default: + break; + } + } + } + } + return nID; +} + +// ------------------------------------------------------------------------- + +bool PrintFontManager::parseXLFD( const OString& rXLFD, XLFDEntry& rEntry ) +{ + sal_Int32 nIndex = 0; + OString aFoundry = WhitespaceToSpace( rXLFD.getToken( 1, '-', nIndex ) ); + if( nIndex < 0 ) return false; + OString aFamilyXLFD = WhitespaceToSpace( rXLFD.getToken( 0, '-', nIndex ) ); + if( nIndex < 0 ) return false; + OString aWeight = rXLFD.getToken( 0, '-', nIndex ).toAsciiLowerCase(); + if( nIndex < 0 ) return false; + OString aSlant = rXLFD.getToken( 0, '-', nIndex ).toAsciiLowerCase(); + if( nIndex < 0 ) return false; + OString aWidth = rXLFD.getToken( 0, '-', nIndex ).toAsciiLowerCase(); + if( nIndex < 0 ) return false; + OString aAddStyle = rXLFD.getToken( 0, '-', nIndex ).toAsciiLowerCase(); + if( nIndex < 0 ) return false; + OString aPitch = rXLFD.getToken( 4, '-', nIndex ).toAsciiLowerCase(); + if( nIndex < 0 ) return false; + OString aRegEnc = WhitespaceToSpace( rXLFD.getToken( 1, '-', nIndex ).toAsciiLowerCase() ); + if( nIndex < 0 ) return false; + OString aEnc = WhitespaceToSpace( rXLFD.getToken( 0, '-', nIndex ).toAsciiLowerCase() ); + + // capitalize words + sal_Int32 nFamIndex = 0; + OStringBuffer aFamilyName; + while( nFamIndex >= 0 ) + { + OString aToken = aFamilyXLFD.getToken( 0, ' ', nFamIndex ); + sal_Char aFirst = aToken.toChar(); + if( aFirst >= 'a' && aFirst <= 'z' ) + aFirst = aFirst - 'a' + 'A'; + OStringBuffer aNewToken( aToken.getLength() ); + aNewToken.append( aToken ); + aNewToken.setCharAt( 0, aFirst ); + if( aFamilyName.getLength() > 0 ) + aFamilyName.append( ' ' ); + aFamilyName.append( aNewToken.makeStringAndClear() ); + } + + rEntry.aFoundry = aFoundry; + rEntry.aFamily = aFamilyName.makeStringAndClear(); + rEntry.aAddStyle = aAddStyle; + // evaluate weight + rEntry.eWeight = parseWeight( aWeight ); + // evaluate slant + rEntry.eItalic = parseItalic( aSlant ); + // evaluate width + rEntry.eWidth = parseWidth( aWidth ); + + // evaluate pitch + if( aPitch.toChar() == 'c' || aPitch.toChar() == 'm' ) + rEntry.ePitch = pitch::Fixed; + else + rEntry.ePitch = pitch::Variable; + + OString aToken = aEnc.toAsciiLowerCase(); + // get encoding + if( aAddStyle.indexOf( "symbol" ) != -1 ) + rEntry.aEncoding = RTL_TEXTENCODING_SYMBOL; + else + { + if( aToken.equals( "symbol" ) ) + rEntry.aEncoding = RTL_TEXTENCODING_SYMBOL; + else + { + OStringBuffer aCharset( aRegEnc.getLength() + aEnc.getLength() + 1 ); + aCharset.append( aRegEnc ); + aCharset.append( '-' ); + aCharset.append( aEnc ); + rEntry.aEncoding = rtl_getTextEncodingFromUnixCharset( aCharset.getStr() ); + } + } + + // set correct mask flags + rEntry.nMask = 0; + if( rEntry.aFoundry != "*" ) rEntry.nMask |= XLFDEntry::MaskFoundry; + if( rEntry.aFamily != "*" ) rEntry.nMask |= XLFDEntry::MaskFamily; + if( rEntry.aAddStyle != "*" ) rEntry.nMask |= XLFDEntry::MaskAddStyle; + if( aWeight != "*" ) rEntry.nMask |= XLFDEntry::MaskWeight; + if( aSlant != "*" ) rEntry.nMask |= XLFDEntry::MaskItalic; + if( aWidth != "*" ) rEntry.nMask |= XLFDEntry::MaskWidth; + if( aPitch != "*" ) rEntry.nMask |= XLFDEntry::MaskPitch; + if( aRegEnc != "*" && aEnc != "*" ) rEntry.nMask |= XLFDEntry::MaskEncoding; + + return true; +} + +// ------------------------------------------------------------------------- + +void PrintFontManager::parseXLFD_appendAliases( const std::list< OString >& rXLFDs, std::list< XLFDEntry >& rEntries ) const +{ + for( std::list< OString >::const_iterator it = rXLFDs.begin(); it != rXLFDs.end(); ++it ) + { + XLFDEntry aEntry; + if( ! parseXLFD(*it, aEntry) ) + continue; + rEntries.push_back( aEntry ); + std::map< XLFDEntry, std::list< XLFDEntry > >::const_iterator alias_it = + m_aXLFD_Aliases.find( aEntry ); + if( alias_it != m_aXLFD_Aliases.end() ) + { + rEntries.insert( rEntries.end(), alias_it->second.begin(), alias_it->second.end() ); + } + } +} + +// ------------------------------------------------------------------------- + +void PrintFontManager::getFontAttributesFromXLFD( PrintFont* pFont, const std::list< OString >& rXLFDs ) const +{ + bool bFamilyName = false; + + std::list< XLFDEntry > aXLFDs; + + parseXLFD_appendAliases( rXLFDs, aXLFDs ); + + for( std::list< XLFDEntry >::const_iterator it = aXLFDs.begin(); + it != aXLFDs.end(); ++it ) + { + // set family name or alias + int nFam = + m_pAtoms->getAtom( ATOM_FAMILYNAME, + OStringToOUString( it->aFamily, it->aAddStyle.indexOf( "utf8" ) != -1 ? RTL_TEXTENCODING_UTF8 : RTL_TEXTENCODING_ISO_8859_1 ), + sal_True ); + if( ! bFamilyName ) + { + bFamilyName = true; + pFont->m_nFamilyName = nFam; + switch( pFont->m_eType ) + { + case fonttype::Type1: + static_cast(pFont)->m_aXLFD = rXLFDs.front(); + break; + case fonttype::TrueType: + static_cast(pFont)->m_aXLFD = rXLFDs.front(); + break; + default: + break; + } + } + else + { + // make sure that aliases are unique + if( nFam != pFont->m_nFamilyName ) + { + std::list< int >::const_iterator al_it; + for( al_it = pFont->m_aAliases.begin(); al_it != pFont->m_aAliases.end() && *al_it != nFam; ++al_it ) + ; + if( al_it == pFont->m_aAliases.end() ) + pFont->m_aAliases.push_back( nFam ); + + } + // for the rest of the attributes there can only be one value; + // we'll trust the first one + continue; + } + + // fill in weight + pFont->m_eWeight = it->eWeight; + // fill in slant + pFont->m_eItalic = it->eItalic; + // fill in width + pFont->m_eWidth = it->eWidth; + // fill in pitch + pFont->m_ePitch = it->ePitch; + // fill in encoding + pFont->m_aEncoding = it->aEncoding; + } + + // handle iso8859-1 as ms1252 to fill the "gap" starting at 0x80 + if( pFont->m_aEncoding == RTL_TEXTENCODING_ISO_8859_1 ) + pFont->m_aEncoding = RTL_TEXTENCODING_MS_1252; + if( rXLFDs.begin() != rXLFDs.end() ) + { + switch( pFont->m_eType ) + { + case fonttype::Type1: + static_cast(pFont)->m_aXLFD = rXLFDs.front(); + break; + case fonttype::TrueType: + static_cast(pFont)->m_aXLFD = rXLFDs.front(); + break; + default: break; + } + } +} + +// ------------------------------------------------------------------------- + +OString PrintFontManager::getXLFD( PrintFont* pFont ) const +{ + if( pFont->m_eType == fonttype::Type1 ) + { + if( static_cast(pFont)->m_aXLFD.getLength() ) + return static_cast(pFont)->m_aXLFD; + } + if( pFont->m_eType == fonttype::TrueType ) + { + if( static_cast(pFont)->m_aXLFD.getLength() ) + return static_cast(pFont)->m_aXLFD; + } + + OStringBuffer aXLFD( 128 ); + + aXLFD.append( "-misc-" ); + ByteString aFamily( String( m_pAtoms->getString( ATOM_FAMILYNAME, pFont->m_nFamilyName ) ), RTL_TEXTENCODING_UTF8 ); + aFamily.SearchAndReplaceAll( '-',' ' ); + aFamily.SearchAndReplaceAll( '?',' ' ); + aFamily.SearchAndReplaceAll( '*',' ' ); + aXLFD.append( OString( aFamily ) ); + aXLFD.append( '-' ); + switch( pFont->m_eWeight ) + { + case weight::Thin: aXLFD.append("thin");break; + case weight::UltraLight: aXLFD.append("ultralight");break; + case weight::Light: aXLFD.append("light");break; + case weight::SemiLight: aXLFD.append("semilight");break; + case weight::Normal: aXLFD.append("normal");break; + case weight::Medium: aXLFD.append("medium");break; + case weight::SemiBold: aXLFD.append("semibold");break; + case weight::Bold: aXLFD.append("bold");break; + case weight::UltraBold: aXLFD.append("ultrabold");break; + case weight::Black: aXLFD.append("black");break; + default: break; + } + aXLFD.append('-'); + switch( pFont->m_eItalic ) + { + case italic::Upright: aXLFD.append('r');break; + case italic::Oblique: aXLFD.append('o');break; + case italic::Italic: aXLFD.append('i');break; + default: break; + } + aXLFD.append('-'); + switch( pFont->m_eWidth ) + { + case width::UltraCondensed: aXLFD.append("ultracondensed");break; + case width::ExtraCondensed: aXLFD.append("extracondensed");break; + case width::Condensed: aXLFD.append("condensed");break; + case width::SemiCondensed: aXLFD.append("semicondensed");break; + case width::Normal: aXLFD.append("normal");break; + case width::SemiExpanded: aXLFD.append("semiexpanded");break; + case width::Expanded: aXLFD.append("expanded");break; + case width::ExtraExpanded: aXLFD.append("extraexpanded");break; + case width::UltraExpanded: aXLFD.append("ultraexpanded");break; + default: break; + } + aXLFD.append("-utf8-0-0-0-0-"); + aXLFD.append( pFont->m_ePitch == pitch::Fixed ? "m" : "p" ); + aXLFD.append("-0-"); + const char* pEnc = rtl_getBestUnixCharsetFromTextEncoding( pFont->m_aEncoding ); + if( ! pEnc ) + { + if( pFont->m_aEncoding == RTL_TEXTENCODING_ADOBE_STANDARD ) + pEnc = "adobe-standard"; + else + pEnc = "iso8859-1"; + } + aXLFD .append( pEnc ); + + return aXLFD.makeStringAndClear(); +} + +// ------------------------------------------------------------------------- + +OUString PrintFontManager::convertTrueTypeName( void* pRecord ) const +{ + NameRecord* pNameRecord = (NameRecord*)pRecord; + OUString aValue; + if( + ( pNameRecord->platformID == 3 && ( pNameRecord->encodingID == 0 || pNameRecord->encodingID == 1 ) ) // MS, Unicode + || + ( pNameRecord->platformID == 0 ) // Apple, Unicode + ) + { + OUStringBuffer aName( pNameRecord->slen/2 ); + const sal_uInt8* pNameBuffer = pNameRecord->sptr; + for(int n = 0; n < pNameRecord->slen/2; n++ ) + aName.append( (sal_Unicode)getUInt16BE( pNameBuffer ) ); + aValue = aName.makeStringAndClear(); + } + else if( pNameRecord->platformID == 3 ) + { + if( pNameRecord->encodingID >= 2 && pNameRecord->encodingID <= 6 ) + { + /* + * and now for a special kind of madness: + * some fonts encode their byte value string as BE uint16 + * (leading to stray zero bytes in the string) + * while others code two bytes as a uint16 and swap to BE + */ + OStringBuffer aName; + const sal_uInt8* pNameBuffer = pNameRecord->sptr; + for(int n = 0; n < pNameRecord->slen/2; n++ ) + { + sal_Unicode aCode = (sal_Unicode)getUInt16BE( pNameBuffer ); + sal_Char aChar = aCode >> 8; + if( aChar ) + aName.append( aChar ); + aChar = aCode & 0x00ff; + if( aChar ) + aName.append( aChar ); + } + switch( pNameRecord->encodingID ) + { + case 2: + aValue = OStringToOUString( aName.makeStringAndClear(), RTL_TEXTENCODING_MS_932 ); + break; + case 3: + aValue = OStringToOUString( aName.makeStringAndClear(), RTL_TEXTENCODING_MS_936 ); + break; + case 4: + aValue = OStringToOUString( aName.makeStringAndClear(), RTL_TEXTENCODING_MS_950 ); + break; + case 5: + aValue = OStringToOUString( aName.makeStringAndClear(), RTL_TEXTENCODING_MS_949 ); + break; + case 6: + aValue = OStringToOUString( aName.makeStringAndClear(), RTL_TEXTENCODING_MS_1361 ); + break; + } + } + } + return aValue; +} + +// ------------------------------------------------------------------------- + +void PrintFontManager::analyzeTrueTypeFamilyName( void* pTTFont, ::std::list< OUString >& rNames ) const +{ + OUString aFamily; + + rNames.clear(); + ::std::set< OUString > aSet; + + NameRecord* pNameRecords = NULL; + int nNameRecords = GetTTNameRecords( (TrueTypeFont*)pTTFont, &pNameRecords ); + if( nNameRecords && pNameRecords ) + { + LanguageType aLang = MsLangId::getSystemLanguage(); + int nLastMatch = -1; + for( int i = 0; i < nNameRecords; i++ ) + { + if( pNameRecords[i].nameID != 1 || pNameRecords[i].sptr == NULL ) + continue; + int nMatch = -1; + if( pNameRecords[i].platformID == 0 ) // Unicode + nMatch = 4000; + else if( pNameRecords[i].platformID == 3 ) + { + // this bases on the LanguageType actually being a Win LCID + if( pNameRecords[i].languageID == aLang ) + nMatch = 8000; + else if( pNameRecords[i].languageID == LANGUAGE_ENGLISH_US ) + nMatch = 2000; + else if( pNameRecords[i].languageID == LANGUAGE_ENGLISH || + pNameRecords[i].languageID == LANGUAGE_ENGLISH_UK ) + nMatch = 1500; + else + nMatch = 1000; + } + OUString aName = convertTrueTypeName( pNameRecords + i ); + aSet.insert( aName ); + if( nMatch > nLastMatch ) + { + nLastMatch = nMatch; + aFamily = aName; + } + } + DisposeNameRecords( pNameRecords, nNameRecords ); + } + if( aFamily.getLength() ) + { + rNames.push_front( aFamily ); + for( ::std::set< OUString >::const_iterator it = aSet.begin(); it != aSet.end(); ++it ) + if( *it != aFamily ) + rNames.push_back( *it ); + } + return; +} + +// ------------------------------------------------------------------------- + +bool PrintFontManager::analyzeTrueTypeFile( PrintFont* pFont ) const +{ + bool bSuccess = false; + rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); + ByteString aFile = getFontFile( pFont ); + TrueTypeFont* pTTFont = NULL; + + TrueTypeFontFile* pTTFontFile = static_cast< TrueTypeFontFile* >(pFont); + if( OpenTTFontFile( aFile.GetBuffer(), pTTFontFile->m_nCollectionEntry < 0 ? 0 : pTTFontFile->m_nCollectionEntry, &pTTFont ) == SF_OK ) + { + TTGlobalFontInfo aInfo; + GetTTGlobalFontInfo( pTTFont, & aInfo ); + + ::std::list< OUString > aNames; + analyzeTrueTypeFamilyName( pTTFont, aNames ); + + // set family name from XLFD if possible + if( ! pFont->m_nFamilyName ) + { + if( aNames.begin() != aNames.end() ) + { + pFont->m_nFamilyName = m_pAtoms->getAtom( ATOM_FAMILYNAME, aNames.front(), sal_True ); + aNames.pop_front(); + } + else + { + sal_Int32 dotIndex; + + // poor font does not have a family name + // name it to file name minus the extension + dotIndex = pTTFontFile->m_aFontFile.lastIndexOf( '.' ); + if ( dotIndex == -1 ) + dotIndex = pTTFontFile->m_aFontFile.getLength(); + + pFont->m_nFamilyName = m_pAtoms->getAtom( ATOM_FAMILYNAME, OStringToOUString( pTTFontFile->m_aFontFile.copy( 0, dotIndex ), aEncoding ), sal_True ); + } + } + for( ::std::list< OUString >::iterator it = aNames.begin(); it != aNames.end(); ++it ) + { + if( it->getLength() ) + { + int nAlias = m_pAtoms->getAtom( ATOM_FAMILYNAME, *it, sal_True ); + if( nAlias != pFont->m_nFamilyName ) + { + std::list< int >::const_iterator al_it; + for( al_it = pFont->m_aAliases.begin(); al_it != pFont->m_aAliases.end() && *al_it != nAlias; ++al_it ) + ; + if( al_it == pFont->m_aAliases.end() ) + pFont->m_aAliases.push_back( nAlias ); + } + } + } + + if( aInfo.usubfamily ) + pFont->m_aStyleName = OUString( aInfo.usubfamily ); + + pFont->m_nPSName = m_pAtoms->getAtom( ATOM_PSNAME, String( ByteString( aInfo.psname ), aEncoding ), sal_True ); + switch( aInfo.weight ) + { + case FW_THIN: pFont->m_eWeight = weight::Thin; break; + case FW_EXTRALIGHT: pFont->m_eWeight = weight::UltraLight; break; + case FW_LIGHT: pFont->m_eWeight = weight::Light; break; + case FW_MEDIUM: pFont->m_eWeight = weight::Medium; break; + case FW_SEMIBOLD: pFont->m_eWeight = weight::SemiBold; break; + case FW_BOLD: pFont->m_eWeight = weight::Bold; break; + case FW_EXTRABOLD: pFont->m_eWeight = weight::UltraBold; break; + case FW_BLACK: pFont->m_eWeight = weight::Black; break; + + case FW_NORMAL: + default: pFont->m_eWeight = weight::Normal; break; + } + + switch( aInfo.width ) + { + case FWIDTH_ULTRA_CONDENSED: pFont->m_eWidth = width::UltraCondensed; break; + case FWIDTH_EXTRA_CONDENSED: pFont->m_eWidth = width::ExtraCondensed; break; + case FWIDTH_CONDENSED: pFont->m_eWidth = width::Condensed; break; + case FWIDTH_SEMI_CONDENSED: pFont->m_eWidth = width::SemiCondensed; break; + case FWIDTH_SEMI_EXPANDED: pFont->m_eWidth = width::SemiExpanded; break; + case FWIDTH_EXPANDED: pFont->m_eWidth = width::Expanded; break; + case FWIDTH_EXTRA_EXPANDED: pFont->m_eWidth = width::ExtraExpanded; break; + case FWIDTH_ULTRA_EXPANDED: pFont->m_eWidth = width::UltraExpanded; break; + + case FWIDTH_NORMAL: + default: pFont->m_eWidth = width::Normal; break; + } + + pFont->m_ePitch = aInfo.pitch ? pitch::Fixed : pitch::Variable; + pFont->m_eItalic = aInfo.italicAngle == 0 ? italic::Upright : ( aInfo.italicAngle < 0 ? italic::Italic : italic::Oblique ); + // #104264# there are fonts that set italic angle 0 although they are + // italic; use macstyle bit here + if( aInfo.italicAngle == 0 && (aInfo.macStyle & 2) ) + pFont->m_eItalic = italic::Italic; + + pFont->m_aEncoding = aInfo.symbolEncoded ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UCS2; + + pFont->m_aGlobalMetricY.width = pFont->m_aGlobalMetricX.width = aInfo.xMax - aInfo.xMin; + pFont->m_aGlobalMetricY.height = pFont->m_aGlobalMetricX.height = aInfo.yMax - aInfo.yMin; + + if( aInfo.winAscent && aInfo.winDescent ) + { + pFont->m_nAscend = aInfo.winAscent; + pFont->m_nDescend = aInfo.winDescent; + pFont->m_nLeading = pFont->m_nAscend + pFont->m_nDescend - 1000; + } + else if( aInfo.typoAscender && aInfo.typoDescender ) + { + pFont->m_nLeading = aInfo.typoLineGap; + pFont->m_nAscend = aInfo.typoAscender; + pFont->m_nDescend = -aInfo.typoDescender; + } + else + { + pFont->m_nLeading = aInfo.linegap; + pFont->m_nAscend = aInfo.ascender; + pFont->m_nDescend = -aInfo.descender; + } + + // last try: font bounding box + if( pFont->m_nAscend == 0 ) + pFont->m_nAscend = aInfo.yMax; + if( pFont->m_nDescend == 0 ) + pFont->m_nDescend = -aInfo.yMin; + if( pFont->m_nLeading == 0 ) + pFont->m_nLeading = 15 * (pFont->m_nAscend+pFont->m_nDescend) / 100; + + if( pFont->m_nAscend ) + pFont->m_aGlobalMetricX.height = pFont->m_aGlobalMetricY.height = pFont->m_nAscend + pFont->m_nDescend; + + // get bounding box + pFont->m_nXMin = aInfo.xMin; + pFont->m_nYMin = aInfo.yMin; + pFont->m_nXMax = aInfo.xMax; + pFont->m_nYMax = aInfo.yMax; + + // get type flags + pTTFontFile->m_nTypeFlags = (unsigned int)aInfo.typeFlags; + + // get vertical substitutions flag + pFont->m_bHaveVerticalSubstitutedGlyphs = DoesVerticalSubstitution( pTTFont, 1 ); + + CloseTTFont( pTTFont ); + bSuccess = true; + } +#if OSL_DEBUG_LEVEL > 1 + else + fprintf( stderr, "could not OpenTTFont \"%s\"\n", aFile.GetBuffer() ); +#endif + + return bSuccess; +} + +// ------------------------------------------------------------------------- + +void PrintFontManager::initFontsAlias() +{ + m_aXLFD_Aliases.clear(); + rtl_TextEncoding aEnc = osl_getThreadTextEncoding(); + for( std::list< OString >::const_iterator dir_it = m_aFontDirectories.begin(); + dir_it != m_aFontDirectories.end(); ++dir_it ) + { + OStringBuffer aDirName(512); + aDirName.append( *dir_it ); + aDirName.append( "/fonts.alias" ); + SvFileStream aStream( OStringToOUString( aDirName.makeStringAndClear(), aEnc ), STREAM_READ ); + if( ! aStream.IsOpen() ) + continue; + + do + { + ByteString aLine; + aStream.ReadLine( aLine ); + + // get the alias and the pattern it gets translated to + ByteString aAlias = GetCommandLineToken( 0, aLine ); + ByteString aMap = GetCommandLineToken( 1, aLine ); + + // remove eventual quotes + aAlias.EraseLeadingChars( '"' ); + aAlias.EraseTrailingChars( '"' ); + aMap.EraseLeadingChars( '"' ); + aMap.EraseTrailingChars( '"' ); + + XLFDEntry aAliasEntry, aMapEntry; + parseXLFD( aAlias, aAliasEntry ); + parseXLFD( aMap, aMapEntry ); + + if( aAliasEntry.nMask && aMapEntry.nMask ) + m_aXLFD_Aliases[ aMapEntry ].push_back( aAliasEntry ); + } while( ! aStream.IsEof() ); + } +} + +// code stolen from vcl's RegisterFontSubstitutors() +// TODO: use that method once psprint gets merged into vcl +static bool AreFCSubstitutionsEnabled() +{ + // init font substitution defaults + int nDisableBits = 0; +#ifdef SOLARIS + // TODO: check the OS version and fc-data maintenance level + nDisableBits = 1; // disable "font fallback" here on default +#endif + // apply the environment variable if any + const char* pEnvStr = ::getenv( "SAL_DISABLE_FC_SUBST" ); + if( pEnvStr ) + { + // + if( (*pEnvStr >= '0') && (*pEnvStr <= '9') ) + nDisableBits = (*pEnvStr - '0'); + else + nDisableBits = ~0U; // no specific bits set: disable all + } + + return ((nDisableBits & 3) == 0); +} + +void PrintFontManager::initialize() +{ + #ifdef CALLGRIND_COMPILE + CALLGRIND_TOGGLE_COLLECT(); + CALLGRIND_ZERO_STATS(); + #endif + + long aDirEntBuffer[ (sizeof(struct dirent)+_PC_NAME_MAX)+1 ]; + + if( ! m_pFontCache ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "creating font cache ... " ); + clock_t aStart; + struct tms tms; + aStart = times( &tms ); +#endif + m_pFontCache = new FontCache(); +#if OSL_DEBUG_LEVEL > 1 + clock_t aStop = times( &tms ); + fprintf( stderr, "done in %lf s\n", (double)(aStop - aStart)/(double)sysconf( _SC_CLK_TCK ) ); +#endif + } + + // initialize may be called twice in the future + { + for( ::std::hash_map< fontID, PrintFont* >::const_iterator it = m_aFonts.begin(); it != m_aFonts.end(); ++it ) + delete (*it).second; + m_nNextFontID = 1; + m_aFonts.clear(); + m_aFontDirectories.clear(); + m_aPrivateFontDirectories.clear(); + m_aOverrideFonts.clear(); + } + +#if OSL_DEBUG_LEVEL > 1 + clock_t aStart; + clock_t aStep1; + clock_t aStep2; + clock_t aStep3; + int nBuiltinFonts = 0; + int nCached = 0; + + struct tms tms; + + aStart = times( &tms ); +#endif + + // first try fontconfig + m_bFontconfigSuccess = initFontconfig(); + + // part one - look for downloadable fonts + rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); + const ::rtl::OUString &rSalPrivatePath = psp::getFontPath(); + + // search for the fonts in SAL_PRIVATE_FONTPATH first; those are + // the fonts installed with the office + if( rSalPrivatePath.getLength() ) + { + OString aPath = rtl::OUStringToOString( rSalPrivatePath, aEncoding ); + const bool bAreFCSubstitutionsEnabled = AreFCSubstitutionsEnabled(); + sal_Int32 nIndex = 0; + do + { + OString aToken = aPath.getToken( 0, ';', nIndex ); + normPath( aToken ); + // if registering an app-specific fontdir with fontconfig fails + // and fontconfig-based substitutions are enabled + // then trying to use these app-specific fonts doesn't make sense + if( m_bFontconfigSuccess && !addFontconfigDir( aToken ) ) + if( bAreFCSubstitutionsEnabled ) + continue; + m_aFontDirectories.push_back( aToken ); + m_aPrivateFontDirectories.push_back( getDirectoryAtom( aToken, true ) ); + } while( nIndex >= 0 ); + } + + // protect against duplicate paths + std::hash_map< OString, int, OStringHash > visited_dirs; + + // now that all global and local font dirs are known to fontconfig + // check that there are fonts actually managed by fontconfig + // also don't search directories that fontconfig already did + if( m_bFontconfigSuccess ) + m_bFontconfigSuccess = (countFontconfigFonts( visited_dirs ) > 0); + + // don't search through many directories fontconfig already told us about + if( ! m_bFontconfigSuccess ) + ImplGetSVData()->mpDefInst->FillFontPathList( m_aFontDirectories ); + + // fill XLFD aliases from fonts.alias files + initFontsAlias(); + + // search for font files in each path + std::list< OString >::iterator dir_it; + for( dir_it = m_aFontDirectories.begin(); dir_it != m_aFontDirectories.end(); ++dir_it ) + { + OString aPath( *dir_it ); + // see if we were here already + if( visited_dirs.find( aPath ) != visited_dirs.end() ) + continue; + visited_dirs[ aPath ] = 1; + + // there may be ":unscaled" directories (see XFree86) + // it should be safe to ignore them since they should not + // contain any of our recognizeable fonts + + // ask the font cache whether it handles this directory + std::list< PrintFont* > aCacheFonts; + if( m_pFontCache->listDirectory( aPath, aCacheFonts ) ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "adding cache directory: %s\n", aPath.getStr() ); +#endif + for( ::std::list< PrintFont* >::iterator it = aCacheFonts.begin(); it != aCacheFonts.end(); ++it ) + { + fontID aFont = m_nNextFontID++; + m_aFonts[ aFont ] = *it; + if( (*it)->m_eType == fonttype::Type1 ) + m_aFontFileToFontID[ static_cast(*it)->m_aFontFile ].insert( aFont ); + else if( (*it)->m_eType == fonttype::TrueType ) + m_aFontFileToFontID[ static_cast(*it)->m_aFontFile ].insert( aFont ); + else if( (*it)->m_eType == fonttype::Builtin ) + m_aFontFileToFontID[ static_cast(*it)->m_aMetricFile ].insert( aFont ); +#if OSL_DEBUG_LEVEL > 1 + if( (*it)->m_eType == fonttype::Builtin ) + nBuiltinFonts++; + nCached++; +#if OSL_DEBUG_LEVEL > 2 + fprintf( stderr, "adding cached font %d: \"%s\" from %s\n", aFont, + OUStringToOString( getFontFamily( aFont ), RTL_TEXTENCODING_MS_1252 ).getStr(), + getFontFileSysPath( aFont ).getStr() ); +#endif +#endif + } + if( ! m_pFontCache->scanAdditionalFiles( aPath ) ) + continue; + } + + DIR* pDIR = opendir( aPath.getStr() ); + struct dirent* pEntry = (struct dirent*)aDirEntBuffer; + if( pDIR ) + { + // read fonts.dir if possible + ::std::hash_map< OString, ::std::list, OStringHash > aFontsDir; + int nDirID = getDirectoryAtom( aPath, true ); + // #i38367# no fonts.dir in our own directories anymore + std::list< int >::const_iterator priv_dir; + for( priv_dir = m_aPrivateFontDirectories.begin(); + priv_dir != m_aPrivateFontDirectories.end() && *priv_dir != nDirID; + ++priv_dir ) + ; + + if( priv_dir == m_aPrivateFontDirectories.end() ) + { + ByteString aGccDummy( aPath ); + String aFontsDirPath( aGccDummy, aEncoding ); + aFontsDirPath.AppendAscii( "/fonts.dir" ); + SvFileStream aStream( aFontsDirPath, STREAM_READ ); + if( aStream.IsOpen() ) + { + ByteString aLine; + while( ! aStream.IsEof() ) + { + aStream.ReadLine( aLine ); + ByteString aFileName( GetCommandLineToken( 0, aLine ) ); + ByteString aXLFD( aLine.Copy( aFileName.Len() ) ); + if( aFileName.Len() && aXLFD.Len() ) + aFontsDir[ aFileName ].push_back(aXLFD); + } + } + } + + int nDirFonts = 0; + while( ! readdir_r( pDIR, (struct dirent*)aDirEntBuffer, &pEntry ) && pEntry ) + { + OString aFileName( pEntry->d_name ); + // ignore .afm files here + if( aFileName.getLength() > 3 && + aFileName.lastIndexOf( ".afm" ) == aFileName.getLength()-4 ) + continue; + + struct stat aStat; + ByteString aFilePath( aPath ); + aFilePath.Append( '/' ); + aFilePath.Append( ByteString( aFileName ) ); + if( ! stat( aFilePath.GetBuffer(), &aStat ) && + S_ISREG( aStat.st_mode ) ) + { + if( findFontFileID( nDirID, aFileName ) == 0 ) + { + ::std::list aXLFDs; + ::std::hash_map< OString, ::std::list, OStringHash >::const_iterator it = + aFontsDir.find( aFileName ); + if( it != aFontsDir.end() ) + aXLFDs = (*it).second; + + // fill in font attributes from XLFD rather + // than reading every file + ::std::list< PrintFont* > aNewFonts; + if( analyzeFontFile( nDirID, aFileName, aXLFDs, aNewFonts ) ) + { + for( ::std::list< PrintFont* >::iterator font_it = aNewFonts.begin(); font_it != aNewFonts.end(); ++font_it ) + { + fontID aFont = m_nNextFontID++; + m_aFonts[ aFont ] = *font_it; + m_aFontFileToFontID[ aFileName ].insert( aFont ); + m_pFontCache->updateFontCacheEntry( *font_it, false ); + nDirFonts++; +#if OSL_DEBUG_LEVEL > 2 + fprintf( stderr, "adding font %d: \"%s\" from %s\n", aFont, + OUStringToOString( getFontFamily( aFont ), RTL_TEXTENCODING_MS_1252 ).getStr(), + getFontFileSysPath( aFont ).getStr() ); +#endif + } + } + } + } + } + closedir( pDIR ); + m_pFontCache->updateDirTimestamp( nDirID ); + if( ! nDirFonts ) + m_pFontCache->markEmptyDir( nDirID ); + } + } + +#if OSL_DEBUG_LEVEL > 1 + aStep1 = times( &tms ); +#endif + + // part two - look for metrics for builtin printer fonts + std::list< OUString > aMetricDirs; + psp::getPrinterPathList( aMetricDirs, PRINTER_METRICDIR ); + + std::list< OString > aEmptyFontsDir; + for( std::list< OUString >::const_iterator met_dir_it = aMetricDirs.begin(); met_dir_it != aMetricDirs.end(); ++met_dir_it ) + { + OString aDir = OUStringToOString( *met_dir_it, aEncoding ); + + // ask the font cache whether it handles this directory + std::list< PrintFont* > aCacheFonts; + + if( m_pFontCache->listDirectory( aDir, aCacheFonts ) ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "adding cache directory: %s\n", aDir.getStr() ); +#endif + for( ::std::list< PrintFont* >::iterator it = aCacheFonts.begin(); it != aCacheFonts.end(); ++it ) + { + fontID aFont = m_nNextFontID++; + m_aFonts[ aFont ] = *it; + if( (*it)->m_eType == fonttype::Type1 ) + m_aFontFileToFontID[ static_cast(*it)->m_aFontFile ].insert( aFont ); + else if( (*it)->m_eType == fonttype::TrueType ) + m_aFontFileToFontID[ static_cast(*it)->m_aFontFile ].insert( aFont ); + else if( (*it)->m_eType == fonttype::Builtin ) + m_aFontFileToFontID[ static_cast(*it)->m_aMetricFile ].insert( aFont ); +#if OSL_DEBUG_LEVEL > 1 + if( (*it)->m_eType == fonttype::Builtin ) + nBuiltinFonts++; + nCached++; +#if OSL_DEBUG_LEVEL > 2 + fprintf( stderr, "adding cached font %d: \"%s\" from %s\n", aFont, + OUStringToOString( getFontFamily( aFont ), RTL_TEXTENCODING_MS_1252 ).getStr(), + getFontFileSysPath( aFont ).getStr() ); +#endif +#endif + } + continue; + } + + DIR* pDIR = opendir( aDir.getStr() ); + if( pDIR ) + { + struct dirent* pDirEntry = (struct dirent*)aDirEntBuffer; + int nDirID = getDirectoryAtom( aDir, true ); + int nDirFonts = 0; + + while( ! readdir_r( pDIR, (struct dirent*)aDirEntBuffer, &pDirEntry ) && pDirEntry ) + { + ByteString aFile( aDir ); + aFile += '/'; + aFile += pDirEntry->d_name; + struct stat aStat; + if( ! stat( aFile.GetBuffer(), &aStat ) + && S_ISREG( aStat.st_mode ) + ) + { + OString aFileName( pDirEntry->d_name, strlen( pDirEntry->d_name ) ); + OString aExt( aFileName.copy( aFileName.lastIndexOf( '.' )+1 ) ); + if( aExt.equalsIgnoreAsciiCase( "afm" ) ) + { + ::std::list< PrintFont* > aNewFonts; + + analyzeFontFile( nDirID, aFileName, aEmptyFontsDir, aNewFonts ); + for( ::std::list< PrintFont* >::iterator it = aNewFonts.begin(); it != aNewFonts.end(); ++it ) + { + if( findFontBuiltinID( (*it)->m_nPSName ) == 0 ) + { + m_aFontFileToFontID[ aFileName ].insert( m_nNextFontID ); + m_aFonts[ m_nNextFontID++ ] = *it; + m_pFontCache->updateFontCacheEntry( *it, false ); +#if OSL_DEBUG_LEVEL > 2 + nBuiltinFonts++; +#endif + } + else + delete *it; + } + } + } + } + closedir( pDIR ); + if( ! nDirFonts ) + m_pFontCache->markEmptyDir( nDirID ); + } + } + +#if OSL_DEBUG_LEVEL > 1 + aStep2 = times( &tms ); +#endif + + // part three - fill in family styles + ::std::hash_map< fontID, PrintFont* >::iterator font_it; + for (font_it = m_aFonts.begin(); font_it != m_aFonts.end(); ++font_it) + { + ::std::hash_map< int, family::type >::const_iterator it = + m_aFamilyTypes.find( font_it->second->m_nFamilyName ); + if (it != m_aFamilyTypes.end()) + continue; + const ::rtl::OUString& rFamily = + m_pAtoms->getString( ATOM_FAMILYNAME, font_it->second->m_nFamilyName); + family::type eType = matchFamilyName( rFamily ); + m_aFamilyTypes[ font_it->second->m_nFamilyName ] = eType; + } + +#if OSL_DEBUG_LEVEL > 1 + aStep3 = times( &tms ); + fprintf( stderr, "PrintFontManager::initialize: collected %d fonts (%d builtin, %d cached)\n", m_aFonts.size(), nBuiltinFonts, nCached ); + double fTick = (double)sysconf( _SC_CLK_TCK ); + fprintf( stderr, "Step 1 took %lf seconds\n", (double)(aStep1 - aStart)/fTick ); + fprintf( stderr, "Step 2 took %lf seconds\n", (double)(aStep2 - aStep1)/fTick ); + fprintf( stderr, "Step 3 took %lf seconds\n", (double)(aStep3 - aStep2)/fTick ); +#endif + + m_pFontCache->flush(); + + #ifdef CALLGRIND_COMPILE + CALLGRIND_DUMP_STATS(); + CALLGRIND_TOGGLE_COLLECT(); + #endif +} + +// ------------------------------------------------------------------------- +inline bool +equalPitch (psp::pitch::type from, psp::pitch::type to) +{ + return from == to; +} + +inline bool +equalWeight (psp::weight::type from, psp::weight::type to) +{ + return from > to ? (from - to) <= 3 : (to - from) <= 3; +} + +inline bool +equalItalic (psp::italic::type from, psp::italic::type to) +{ + if ( (from == psp::italic::Italic) || (from == psp::italic::Oblique) ) + return (to == psp::italic::Italic) || (to == psp::italic::Oblique); + return to == from; +} +inline bool +equalEncoding (rtl_TextEncoding from, rtl_TextEncoding to) +{ + if ((from == RTL_TEXTENCODING_ISO_8859_1) || (from == RTL_TEXTENCODING_MS_1252)) + return (to == RTL_TEXTENCODING_ISO_8859_1) || (to == RTL_TEXTENCODING_MS_1252); + return from == to; +} + +namespace { + struct BuiltinFontIdentifier + { + OUString aFamily; + italic::type eItalic; + weight::type eWeight; + pitch::type ePitch; + rtl_TextEncoding aEncoding; + + BuiltinFontIdentifier( const OUString& rFam, + italic::type eIt, + weight::type eWg, + pitch::type ePt, + rtl_TextEncoding enc ) : + aFamily( rFam ), + eItalic( eIt ), + eWeight( eWg ), + ePitch( ePt ), + aEncoding( enc ) + {} + + bool operator==( const BuiltinFontIdentifier& rRight ) const + { + return equalItalic( eItalic, rRight.eItalic ) && + equalWeight( eWeight, rRight.eWeight ) && + equalPitch( ePitch, rRight.ePitch ) && + equalEncoding( aEncoding, rRight.aEncoding ) && + aFamily.equalsIgnoreAsciiCase( rRight.aFamily ); + } + }; + + struct BuiltinFontIdentifierHash + { + size_t operator()( const BuiltinFontIdentifier& rFont ) const + { + return rFont.aFamily.hashCode() ^ rFont.eItalic ^ rFont.eWeight ^ rFont.ePitch ^ rFont.aEncoding; + } + }; +} + +void PrintFontManager::getFontList( ::std::list< fontID >& rFontIDs, const PPDParser* pParser, bool bUseOverrideMetrics ) +{ + rFontIDs.clear(); + std::hash_map< fontID, PrintFont* >::const_iterator it; + + /* + * Note: there are two easy steps making this faster: + * first: insert the printer builtins first, then the not builtins, + * if they do not match. + * drawback: this would change the sequence of fonts; this could have + * subtle, unknown consequences in vcl font matching + * second: instead of comparing attributes to see whether a softfont + * is duplicate to a builtin one could simply compare the PSName (which is + * supposed to be unique), which at this point is just an int. + * drawback: this could change which fonts are listed; especially TrueType + * fonts often have a rather dubious PSName, so this could change the + * font list not so subtle. + * Until getFontList for a printer becomes a performance issue (which is + * currently not the case), best stay with the current algorithm. + */ + + // fill sets of printer supported fonts + if( pParser ) + { + std::set aBuiltinPSNames; + std::hash_set< BuiltinFontIdentifier, + BuiltinFontIdentifierHash + > aBuiltinFonts; + + std::map aOverridePSNames; + if( bUseOverrideMetrics ) + { + readOverrideMetrics(); + for( std::vector::const_iterator over = m_aOverrideFonts.begin(); + over != m_aOverrideFonts.end(); ++over ) + { + std::hash_map::const_iterator font_it = m_aFonts.find( *over ); + DBG_ASSERT( font_it != m_aFonts.end(), "override to nonexistant font" ); + if( font_it != m_aFonts.end() ) + aOverridePSNames[ font_it->second->m_nPSName ] = *over; + } + } + + int nFonts = pParser->getFonts(); + for( int i = 0; i < nFonts; i++ ) + aBuiltinPSNames.insert( m_pAtoms->getAtom( ATOM_PSNAME, pParser->getFont( i ) ) ); + for( it = m_aFonts.begin(); it != m_aFonts.end(); ++it ) + { + PrintFont* pFont = it->second; + if( it->second->m_eType == fonttype::Builtin && + aBuiltinPSNames.find( pFont->m_nPSName ) != aBuiltinPSNames.end() ) + { + bool bInsert = true; + if( bUseOverrideMetrics ) + { + // in override case only use the override fonts, not their counterparts + std::map::const_iterator over = aOverridePSNames.find( pFont->m_nPSName ); + if( over != aOverridePSNames.end() && over->second != it->first ) + bInsert = false; + } + else + { + // do not insert override fonts in non override case + if( std::find( m_aOverrideFonts.begin(), m_aOverrideFonts.end(), it->first ) != m_aOverrideFonts.end() ) + bInsert = false; + } + if( bInsert ) + { + aBuiltinFonts.insert( BuiltinFontIdentifier( + m_pAtoms->getString( ATOM_FAMILYNAME, pFont->m_nFamilyName ), + pFont->m_eItalic, + pFont->m_eWeight, + pFont->m_ePitch, + pFont->m_aEncoding + ) ); + } + } + } + for( it = m_aFonts.begin(); it != m_aFonts.end(); ++it ) + { + PrintFont* pFont = it->second; + if( it->second->m_eType == fonttype::Builtin ) + { + if( aBuiltinPSNames.find( pFont->m_nPSName ) != aBuiltinPSNames.end() ) + { + bool bInsert = true; + if( bUseOverrideMetrics ) + { + // in override case only use the override fonts, not their counterparts + std::map::const_iterator over = aOverridePSNames.find( pFont->m_nPSName ); + if( over != aOverridePSNames.end() && over->second != it->first ) + bInsert = false; + } + else + { + // do not insert override fonts in non override case + if( std::find( m_aOverrideFonts.begin(), m_aOverrideFonts.end(), it->first ) != m_aOverrideFonts.end() ) + bInsert = false; + } + if( bInsert ) + rFontIDs.push_back( it->first ); + } + } + else if( aBuiltinFonts.find( BuiltinFontIdentifier( + m_pAtoms->getString( ATOM_FAMILYNAME, pFont->m_nFamilyName ), + pFont->m_eItalic, + pFont->m_eWeight, + pFont->m_ePitch, + pFont->m_aEncoding + ) ) == aBuiltinFonts.end() ) + { + rFontIDs.push_back( it->first ); + } + } + } + else // no specific printer + { + for( it = m_aFonts.begin(); it != m_aFonts.end(); ++it ) + rFontIDs.push_back( it->first ); + } +} + +// ------------------------------------------------------------------------- + +void PrintFontManager::fillPrintFontInfo( PrintFont* pFont, FastPrintFontInfo& rInfo ) const +{ + ::std::hash_map< int, family::type >::const_iterator style_it = + m_aFamilyTypes.find( pFont->m_nFamilyName ); + rInfo.m_eType = pFont->m_eType; + rInfo.m_aFamilyName = m_pAtoms->getString( ATOM_FAMILYNAME, pFont->m_nFamilyName ); + rInfo.m_aStyleName = pFont->m_aStyleName; + rInfo.m_eFamilyStyle = style_it != m_aFamilyTypes.end() ? style_it->second : family::Unknown; + rInfo.m_eItalic = pFont->m_eItalic; + rInfo.m_eWidth = pFont->m_eWidth; + rInfo.m_eWeight = pFont->m_eWeight; + rInfo.m_ePitch = pFont->m_ePitch; + rInfo.m_aEncoding = pFont->m_aEncoding; + + rInfo.m_bEmbeddable = (pFont->m_eType == fonttype::Type1); + rInfo.m_bSubsettable = (pFont->m_eType == fonttype::TrueType); // TODO: rename to SfntType + + rInfo.m_aAliases.clear(); + for( ::std::list< int >::iterator it = pFont->m_aAliases.begin(); it != pFont->m_aAliases.end(); ++it ) + rInfo.m_aAliases.push_back( m_pAtoms->getString( ATOM_FAMILYNAME, *it ) ); +} + +// ------------------------------------------------------------------------- + +void PrintFontManager::fillPrintFontInfo( PrintFont* pFont, PrintFontInfo& rInfo ) const +{ + if( ( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) || + ! pFont->m_pMetrics || pFont->m_pMetrics->isEmpty() + ) + { + // might be a truetype font not analyzed or type1 without metrics read + if( pFont->m_eType == fonttype::Type1 ) + pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, false ); + else if( pFont->m_eType == fonttype::TrueType ) + analyzeTrueTypeFile( pFont ); + } + + fillPrintFontInfo( pFont, static_cast< FastPrintFontInfo& >( rInfo ) ); + + rInfo.m_nAscend = pFont->m_nAscend; + rInfo.m_nDescend = pFont->m_nDescend; + rInfo.m_nLeading = pFont->m_nLeading; + rInfo.m_nWidth = pFont->m_aGlobalMetricX.width < pFont->m_aGlobalMetricY.width ? pFont->m_aGlobalMetricY.width : pFont->m_aGlobalMetricX.width; +} + +// ------------------------------------------------------------------------- + +void PrintFontManager::getFontListWithInfo( ::std::list< PrintFontInfo >& rFonts, const PPDParser* pParser, bool bUseOverrideMetrics ) +{ + rFonts.clear(); + ::std::list< fontID > aFontList; + getFontList( aFontList, pParser, bUseOverrideMetrics ); + + ::std::list< fontID >::iterator it; + for( it = aFontList.begin(); it != aFontList.end(); ++it ) + { + PrintFontInfo aInfo; + aInfo.m_nID = *it; + fillPrintFontInfo( getFont( *it ), aInfo ); + rFonts.push_back( aInfo ); + } +} + +// ------------------------------------------------------------------------- + +void PrintFontManager::getFontListWithFastInfo( ::std::list< FastPrintFontInfo >& rFonts, const PPDParser* pParser, bool bUseOverrideMetrics ) +{ + rFonts.clear(); + ::std::list< fontID > aFontList; + getFontList( aFontList, pParser, bUseOverrideMetrics ); + + ::std::list< fontID >::iterator it; + for( it = aFontList.begin(); it != aFontList.end(); ++it ) + { + FastPrintFontInfo aInfo; + aInfo.m_nID = *it; + fillPrintFontInfo( getFont( *it ), aInfo ); + rFonts.push_back( aInfo ); + } +} + +// ------------------------------------------------------------------------- + +bool PrintFontManager::getFontInfo( fontID nFontID, PrintFontInfo& rInfo ) const +{ + PrintFont* pFont = getFont( nFontID ); + if( pFont ) + { + rInfo.m_nID = nFontID; + fillPrintFontInfo( pFont, rInfo ); + } + return pFont ? true : false; +} + +// ------------------------------------------------------------------------- + +bool PrintFontManager::getFontFastInfo( fontID nFontID, FastPrintFontInfo& rInfo ) const +{ + PrintFont* pFont = getFont( nFontID ); + if( pFont ) + { + rInfo.m_nID = nFontID; + fillPrintFontInfo( pFont, rInfo ); + } + return pFont ? true : false; +} + +// ------------------------------------------------------------------------- + +bool PrintFontManager::getFontBoundingBox( fontID nFontID, int& xMin, int& yMin, int& xMax, int& yMax ) +{ + bool bSuccess = false; + PrintFont* pFont = getFont( nFontID ); + if( pFont ) + { + if( pFont->m_nXMin == 0 && pFont->m_nYMin == 0 && pFont->m_nXMax == 0 && pFont->m_nYMax == 0 ) + { + // might be a truetype font not analyzed or type1 without metrics read + if( pFont->m_eType == fonttype::Type1 || pFont->m_eType == fonttype::Builtin ) + pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, true ); + else if( pFont->m_eType == fonttype::TrueType ) + analyzeTrueTypeFile( pFont ); + } + bSuccess = true; + xMin = pFont->m_nXMin; + yMin = pFont->m_nYMin; + xMax = pFont->m_nXMax; + yMax = pFont->m_nYMax; + } + return bSuccess; +} + +// ------------------------------------------------------------------------- + +int PrintFontManager::getFontFaceNumber( fontID nFontID ) const +{ + int nRet = -1; + PrintFont* pFont = getFont( nFontID ); + if( pFont && pFont->m_eType == fonttype::TrueType ) + nRet = static_cast< TrueTypeFontFile* >(pFont)->m_nCollectionEntry; + return nRet; +} + +// ------------------------------------------------------------------------- + + +family::type PrintFontManager::matchFamilyName( const ::rtl::OUString& rFamily ) const +{ + typedef struct { + const char* mpName; + sal_uInt16 mnLength; + family::type meType; + } family_t; + +#define InitializeClass( p, a ) p, sizeof(p) - 1, a + const family_t pFamilyMatch[] = { + { InitializeClass( "arial", family::Swiss ) }, + { InitializeClass( "arioso", family::Script ) }, + { InitializeClass( "avant garde", family::Swiss ) }, + { InitializeClass( "avantgarde", family::Swiss ) }, + { InitializeClass( "bembo", family::Roman ) }, + { InitializeClass( "bookman", family::Roman ) }, + { InitializeClass( "conga", family::Roman ) }, + { InitializeClass( "courier", family::Modern ) }, + { InitializeClass( "curl", family::Script ) }, + { InitializeClass( "fixed", family::Modern ) }, + { InitializeClass( "gill", family::Swiss ) }, + { InitializeClass( "helmet", family::Modern ) }, + { InitializeClass( "helvetica", family::Swiss ) }, + { InitializeClass( "international", family::Modern ) }, + { InitializeClass( "lucida", family::Swiss ) }, + { InitializeClass( "new century schoolbook", family::Roman ) }, + { InitializeClass( "palatino", family::Roman ) }, + { InitializeClass( "roman", family::Roman ) }, + { InitializeClass( "sans serif", family::Swiss ) }, + { InitializeClass( "sansserif", family::Swiss ) }, + { InitializeClass( "serf", family::Roman ) }, + { InitializeClass( "serif", family::Roman ) }, + { InitializeClass( "times", family::Roman ) }, + { InitializeClass( "utopia", family::Roman ) }, + { InitializeClass( "zapf chancery", family::Script ) }, + { InitializeClass( "zapfchancery", family::Script ) } + }; + + rtl::OString aFamily = rtl::OUStringToOString( rFamily, RTL_TEXTENCODING_ASCII_US ); + sal_uInt32 nLower = 0; + sal_uInt32 nUpper = sizeof(pFamilyMatch) / sizeof(pFamilyMatch[0]); + + while( nLower < nUpper ) + { + sal_uInt32 nCurrent = (nLower + nUpper) / 2; + const family_t* pHaystack = pFamilyMatch + nCurrent; + sal_Int32 nComparison = + rtl_str_compareIgnoreAsciiCase_WithLength + ( + aFamily.getStr(), aFamily.getLength(), + pHaystack->mpName, pHaystack->mnLength + ); + + if( nComparison < 0 ) + nUpper = nCurrent; + else + if( nComparison > 0 ) + nLower = nCurrent + 1; + else + return pHaystack->meType; + } + + return family::Unknown; +} + +// ------------------------------------------------------------------------- + +family::type PrintFontManager::getFontFamilyType( fontID nFontID ) const +{ + PrintFont* pFont = getFont( nFontID ); + if( !pFont ) + return family::Unknown; + + ::std::hash_map< int, family::type >::const_iterator it = + m_aFamilyTypes.find( pFont->m_nFamilyName ); + return (it != m_aFamilyTypes.end()) ? it->second : family::Unknown; +} + + +// ------------------------------------------------------------------------- + +const ::rtl::OUString& PrintFontManager::getFontFamily( fontID nFontID ) const +{ + PrintFont* pFont = getFont( nFontID ); + return m_pAtoms->getString( ATOM_FAMILYNAME, pFont ? pFont->m_nFamilyName : INVALID_ATOM ); +} + +// ------------------------------------------------------------------------- + +OString PrintFontManager::getAfmFile( PrintFont* pFont ) const +{ + OString aMetricPath; + if( pFont ) + { + switch( pFont->m_eType ) + { + case fonttype::Type1: + { + Type1FontFile* pPSFont = static_cast< Type1FontFile* >(pFont); + aMetricPath = getDirectory( pPSFont->m_nDirectory ); + aMetricPath += "/"; + aMetricPath += pPSFont->m_aMetricFile; + } + break; + case fonttype::Builtin: + { + BuiltinFont* pBuiltinFont = static_cast< BuiltinFont* >(pFont); + aMetricPath = getDirectory( pBuiltinFont->m_nDirectory ); + aMetricPath += "/"; + aMetricPath += pBuiltinFont->m_aMetricFile; + } + break; + default: break; + } + } + return aMetricPath; +} + +// ------------------------------------------------------------------------- + +OString PrintFontManager::getFontFile( PrintFont* pFont ) const +{ + OString aPath; + + if( pFont && pFont->m_eType == fonttype::Type1 ) + { + Type1FontFile* pPSFont = static_cast< Type1FontFile* >(pFont); + ::std::hash_map< int, OString >::const_iterator it = m_aAtomToDir.find( pPSFont->m_nDirectory ); + aPath = it->second; + aPath += "/"; + aPath += pPSFont->m_aFontFile; + } + else if( pFont && pFont->m_eType == fonttype::TrueType ) + { + TrueTypeFontFile* pTTFont = static_cast< TrueTypeFontFile* >(pFont); + ::std::hash_map< int, OString >::const_iterator it = m_aAtomToDir.find( pTTFont->m_nDirectory ); + aPath = it->second; + aPath += "/"; + aPath += pTTFont->m_aFontFile; + } + return aPath; +} + +// ------------------------------------------------------------------------- + +const ::rtl::OUString& PrintFontManager::getPSName( fontID nFontID ) const +{ + PrintFont* pFont = getFont( nFontID ); + if( pFont && pFont->m_nPSName == 0 ) + { + if( pFont->m_eType == fonttype::TrueType ) + analyzeTrueTypeFile( pFont ); + } + + return m_pAtoms->getString( ATOM_PSNAME, pFont ? pFont->m_nPSName : INVALID_ATOM ); +} + +// ------------------------------------------------------------------------- + +const CharacterMetric& PrintFontManager::getGlobalFontMetric( fontID nFontID, bool bHorizontal ) const +{ + static CharacterMetric aMetric; + PrintFont* pFont = getFont( nFontID ); + return pFont ? ( bHorizontal ? pFont->m_aGlobalMetricX : pFont->m_aGlobalMetricY ) : aMetric; +} + +// ------------------------------------------------------------------------- + +int PrintFontManager::getFontAscend( fontID nFontID ) const +{ + PrintFont* pFont = getFont( nFontID ); + if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) + { + // might be a truetype font not yet analyzed + if( pFont->m_eType == fonttype::TrueType ) + analyzeTrueTypeFile( pFont ); + else if( pFont->m_eType == fonttype::Type1 || pFont->m_eType == fonttype::Builtin ) + pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, true ); + } + return pFont->m_nAscend; +} + +// ------------------------------------------------------------------------- + +int PrintFontManager::getFontDescend( fontID nFontID ) const +{ + PrintFont* pFont = getFont( nFontID ); + if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) + { + // might be a truetype font not yet analyzed + if( pFont->m_eType == fonttype::TrueType ) + analyzeTrueTypeFile( pFont ); + else if( pFont->m_eType == fonttype::Type1 || pFont->m_eType == fonttype::Builtin ) + pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, true ); + } + return pFont->m_nDescend; +} + +// ------------------------------------------------------------------------- + +int PrintFontManager::getFontLeading( fontID nFontID ) const +{ + PrintFont* pFont = getFont( nFontID ); + if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) + { + // might be a truetype font not yet analyzed + if( pFont->m_eType == fonttype::TrueType ) + analyzeTrueTypeFile( pFont ); + } + return pFont->m_nLeading; +} + +// ------------------------------------------------------------------------- + +bool PrintFontManager::hasVerticalSubstitutions( fontID nFontID ) const +{ + PrintFont* pFont = getFont( nFontID ); + if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) + { + // might be a truetype font not yet analyzed + if( pFont->m_eType == fonttype::TrueType ) + analyzeTrueTypeFile( pFont ); + } + return pFont->m_bHaveVerticalSubstitutedGlyphs; +} + +// ------------------------------------------------------------------------- + +void PrintFontManager::hasVerticalSubstitutions( fontID nFontID, + const sal_Unicode* pCharacters, int nCharacters, bool* pHasSubst ) const +{ + PrintFont* pFont = getFont( nFontID ); + if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) + { + // might be a truetype font not yet analyzed + if( pFont->m_eType == fonttype::TrueType ) + analyzeTrueTypeFile( pFont ); + } + + if( ! pFont->m_bHaveVerticalSubstitutedGlyphs ) + memset( pHasSubst, 0, sizeof(bool)*nCharacters ); + else + { + for( int i = 0; i < nCharacters; i++ ) + { + sal_Unicode code = pCharacters[i]; + if( ! pFont->m_pMetrics || + ! ( pFont->m_pMetrics->m_aPages[ code >> 11 ] & ( 1 << ( ( code >> 8 ) & 7 ) ) ) ) + pFont->queryMetricPage( code >> 8, m_pAtoms ); + ::std::hash_map< sal_Unicode, bool >::const_iterator it = pFont->m_pMetrics->m_bVerticalSubstitutions.find( code ); + pHasSubst[i] = it != pFont->m_pMetrics->m_bVerticalSubstitutions.end(); + } + } +} + +// ------------------------------------------------------------------------- + +OUString PrintFontManager::getFontXLFD( fontID nFontID ) const +{ + PrintFont* pFont = getFont( nFontID ); + OUString aRet; + if( pFont ) + { + ByteString aXLFD( getXLFD( pFont ) ); + rtl_TextEncoding aEncoding = aXLFD.GetToken( 6, '-' ).Search( "utf8" ) != STRING_NOTFOUND ? RTL_TEXTENCODING_UTF8 : RTL_TEXTENCODING_ISO_8859_1; + aRet = OStringToOUString( aXLFD, aEncoding ); + } + return aRet; +} + +// ------------------------------------------------------------------------- + +const ::std::list< KernPair >& PrintFontManager::getKernPairs( fontID nFontID, bool bVertical ) const +{ + static ::std::list< KernPair > aEmpty; + + PrintFont* pFont = getFont( nFontID ); + if( ! pFont ) + return aEmpty; + + if( ! pFont->m_pMetrics || ! pFont->m_pMetrics->m_bKernPairsQueried ) + pFont->queryMetricPage( 0, m_pAtoms ); + if( ! pFont->m_pMetrics || ! pFont->m_pMetrics->m_bKernPairsQueried ) + return aEmpty; + return bVertical ? pFont->m_pMetrics->m_aYKernPairs : pFont->m_pMetrics->m_aXKernPairs; +} + +// ------------------------------------------------------------------------- + +bool PrintFontManager::isFontDownloadingAllowed( fontID nFont ) const +{ + static const char* pEnable = getenv( "PSPRINT_ENABLE_TTF_COPYRIGHTAWARENESS" ); + bool bRet = true; + + if( pEnable && *pEnable ) + { + PrintFont* pFont = getFont( nFont ); + if( pFont && pFont->m_eType == fonttype::TrueType ) + { + TrueTypeFontFile* pTTFontFile = static_cast(pFont); + if( pTTFontFile->m_nTypeFlags & TYPEFLAG_INVALID ) + { + TrueTypeFont* pTTFont = NULL; + ByteString aFile = getFontFile( pFont ); + if( OpenTTFontFile( aFile.GetBuffer(), pTTFontFile->m_nCollectionEntry < 0 ? 0 : pTTFontFile->m_nCollectionEntry, &pTTFont ) == SF_OK ) + { + // get type flags + TTGlobalFontInfo aInfo; + GetTTGlobalFontInfo( pTTFont, & aInfo ); + pTTFontFile->m_nTypeFlags = (unsigned int)aInfo.typeFlags; + CloseTTFont( pTTFont ); + } + } + + unsigned int nCopyrightFlags = pTTFontFile->m_nTypeFlags & TYPEFLAG_COPYRIGHT_MASK; + + // font embedding is allowed if either + // no restriction at all (bit 1 clear) + // printing allowed (bit 1 set, bit 2 set ) + bRet = ! ( nCopyrightFlags & 0x02 ) || ( nCopyrightFlags & 0x04 ); + } + } + return bRet; +} + +// ------------------------------------------------------------------------- + +bool PrintFontManager::getMetrics( fontID nFontID, const sal_Unicode* pString, int nLen, CharacterMetric* pArray, bool bVertical ) const +{ + PrintFont* pFont = getFont( nFontID ); + if( ! pFont ) + return false; + + if( ( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) + || ! pFont->m_pMetrics || pFont->m_pMetrics->isEmpty() + ) + { + // might be a font not yet analyzed + if( pFont->m_eType == fonttype::Type1 || pFont->m_eType == fonttype::Builtin ) + pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, false ); + else if( pFont->m_eType == fonttype::TrueType ) + analyzeTrueTypeFile( pFont ); + } + + for( int i = 0; i < nLen; i++ ) + { + if( ! pFont->m_pMetrics || + ! ( pFont->m_pMetrics->m_aPages[ pString[i] >> 11 ] & ( 1 << ( ( pString[i] >> 8 ) & 7 ) ) ) ) + pFont->queryMetricPage( pString[i] >> 8, m_pAtoms ); + pArray[i].width = pArray[i].height = -1; + if( pFont->m_pMetrics ) + { + int effectiveCode = pString[i]; + effectiveCode |= bVertical ? 1 << 16 : 0; + ::std::hash_map< int, CharacterMetric >::const_iterator it = + pFont->m_pMetrics->m_aMetrics.find( effectiveCode ); + // if no vertical metrics are available assume rotated horizontal metrics + if( bVertical && (it == pFont->m_pMetrics->m_aMetrics.end()) ) + it = pFont->m_pMetrics->m_aMetrics.find( pString[i] ); + // the character metrics are in it->second + if( it != pFont->m_pMetrics->m_aMetrics.end() ) + pArray[ i ] = it->second; + } + } + + return true; +} + +// ------------------------------------------------------------------------- + +bool PrintFontManager::getMetrics( fontID nFontID, sal_Unicode minCharacter, sal_Unicode maxCharacter, CharacterMetric* pArray, bool bVertical ) const +{ + PrintFont* pFont = getFont( nFontID ); + if( ! pFont ) + return false; + + if( ( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) + || ! pFont->m_pMetrics || pFont->m_pMetrics->isEmpty() + ) + { + // might be a font not yet analyzed + if( pFont->m_eType == fonttype::Type1 || pFont->m_eType == fonttype::Builtin ) + pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, false ); + else if( pFont->m_eType == fonttype::TrueType ) + analyzeTrueTypeFile( pFont ); + } + + sal_Unicode code = minCharacter; + do + { + if( ! pFont->m_pMetrics || + ! ( pFont->m_pMetrics->m_aPages[ code >> 11 ] & ( 1 << ( ( code >> 8 ) & 7 ) ) ) ) + pFont->queryMetricPage( code >> 8, m_pAtoms ); + pArray[ code - minCharacter ].width = -1; + pArray[ code - minCharacter ].height = -1; + if( pFont->m_pMetrics ) + { + int effectiveCode = code; + effectiveCode |= bVertical ? 1 << 16 : 0; + ::std::hash_map< int, CharacterMetric >::const_iterator it = + pFont->m_pMetrics->m_aMetrics.find( effectiveCode ); + // if no vertical metrics are available assume rotated horizontal metrics + if( bVertical && (it == pFont->m_pMetrics->m_aMetrics.end()) ) + it = pFont->m_pMetrics->m_aMetrics.find( code ); + // the character metrics are in it->second + if( it != pFont->m_pMetrics->m_aMetrics.end() ) + pArray[ code - minCharacter ] = it->second; + } + } while( code++ != maxCharacter ); + + return true; +} + +// ------------------------------------------------------------------------- + +static bool createWriteablePath( const ByteString& rPath ) +{ + bool bSuccess = false; + + if( access( rPath.GetBuffer(), W_OK ) ) + { + int nPos = rPath.SearchBackward( '/' ); + if( nPos != STRING_NOTFOUND ) + while( nPos > 0 && rPath.GetChar( nPos ) == '/' ) + nPos--; + + if( nPos != STRING_NOTFOUND && nPos != 0 && createWriteablePath( rPath.Copy( 0, nPos+1 ) ) ) + { + bSuccess = mkdir( rPath.GetBuffer(), 0777 ) ? false : true; + } + } + else + bSuccess = true; + + return bSuccess; +} + + +// ------------------------------------------------------------------------- + +int PrintFontManager::importFonts( const ::std::list< OString >& rFiles, bool bLinkOnly, ImportFontCallback* pCallback ) +{ + int nSuccess = 0; + + // find a directory with write access + rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); + bool bCanWrite = false; + int nDirID = 0; + INetURLObject aDir; + for( ::std::list< int >::const_iterator dir_it = m_aPrivateFontDirectories.begin(); + ! bCanWrite && dir_it != m_aPrivateFontDirectories.end(); ++dir_it ) + { + // check if we can create files in that directory + ByteString aDirPath = getDirectory( *dir_it ); + if( createWriteablePath( aDirPath ) ) + { + aDir = INetURLObject( OStringToOUString( aDirPath, aEncoding ), INET_PROT_FILE, INetURLObject::ENCODE_ALL ); + nDirID = *dir_it; + bCanWrite = true; + } + } + if( bCanWrite ) + { + for( ::std::list< OString >::const_iterator font_it = rFiles.begin(); + font_it != rFiles.end(); ++font_it ) + { + INetURLObject aFrom( OStringToOUString( *font_it, aEncoding ), INET_PROT_FILE, INetURLObject::ENCODE_ALL ); + INetURLObject aTo( aDir ); + aTo.Append( aFrom.GetName() ); + + if( pCallback ) + pCallback->progress( aTo.PathToFileName() ); + + if( pCallback && pCallback->isCanceled() ) + break; + + if( ! access( ByteString( String(aTo.PathToFileName()), aEncoding ).GetBuffer(), F_OK ) ) + { + if( ! ( pCallback ? pCallback->queryOverwriteFile( aTo.PathToFileName() ) : false ) ) + continue; + } + // look for afm if necessary + OUString aAfmCopied; + FileBase::RC nError; + if( aFrom.getExtension().equalsIgnoreAsciiCaseAscii( "pfa" ) || + aFrom.getExtension().equalsIgnoreAsciiCaseAscii( "pfb" ) ) + { + INetURLObject aFromAfm( aFrom ); + aFromAfm.setExtension( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "afm" ) ) ); + if( access( ByteString( String(aFromAfm.PathToFileName()), aEncoding ).GetBuffer(), F_OK ) ) + { + aFromAfm.setExtension( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AFM" ) ) ); + if( access( ByteString( String(aFromAfm.PathToFileName()), aEncoding ).GetBuffer(), F_OK ) ) + { + aFromAfm.removeSegment(); + aFromAfm.Append( String( RTL_CONSTASCII_USTRINGPARAM( "afm" ) ) ); + aFromAfm.Append( aTo.GetName() ); + aFromAfm.setExtension( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "afm" ) ) ); + if( access( ByteString( String(aFromAfm.PathToFileName()), aEncoding ).GetBuffer(), F_OK ) ) + { + aFromAfm.setExtension( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AFM" ) ) ); + if( access( ByteString( String(aFromAfm.PathToFileName()), aEncoding ).GetBuffer(), F_OK ) ) + { + // give up + if( pCallback ) + pCallback->importFontFailed( aTo.PathToFileName(), ImportFontCallback::NoAfmMetric ); + continue; + } + } + } + } + INetURLObject aToAfm( aTo ); + aToAfm.setExtension( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "afm" ) ) ); + OUString aFromPath, aToPath; + if( bLinkOnly ) + { + ByteString aLinkFromPath( String(aFromAfm.PathToFileName()), + aEncoding ); + ByteString aLinkToPath( String(aToAfm.PathToFileName()), + aEncoding ); + nError = (FileBase::RC)symlink( aLinkFromPath.GetBuffer(), aLinkToPath.GetBuffer() ); + } + else + nError = File::copy( aFromAfm.GetMainURL(INetURLObject::DECODE_TO_IURI), aToAfm.GetMainURL(INetURLObject::DECODE_TO_IURI) ); + if( nError ) + { + if( pCallback ) + pCallback->importFontFailed( aTo.PathToFileName(), ImportFontCallback::AfmCopyFailed ); + continue; + } + aAfmCopied = aToPath; + } + if( bLinkOnly ) + { + ByteString aFromPath( String(aFrom.PathToFileName()), + aEncoding ); + ByteString aToPath( String(aTo.PathToFileName()), aEncoding ); + nError = (FileBase::RC)symlink( aFromPath.GetBuffer(), + aToPath.GetBuffer() ); + } + else + nError = File::copy( aFrom.GetMainURL(INetURLObject::DECODE_TO_IURI), aTo.GetMainURL(INetURLObject::DECODE_TO_IURI) ); + // copy font file + if( nError ) + { + if( aAfmCopied.getLength() ) + File::remove( aAfmCopied ); + if( pCallback ) + pCallback->importFontFailed( aTo.PathToFileName(), ImportFontCallback::FontCopyFailed ); + continue; + } + + ::std::list< PrintFont* > aNewFonts; + ::std::list< PrintFont* >::iterator it; + if( analyzeFontFile( nDirID, OUStringToOString( aTo.GetName(), aEncoding ), ::std::list(), aNewFonts ) ) + { + // remove all fonts for the same file + // discarding their font ids + ::std::hash_map< fontID, PrintFont* >::iterator current, next; + current = m_aFonts.begin(); + OString aFileName( OUStringToOString( aTo.GetName(), aEncoding ) ); + while( current != m_aFonts.end() ) + { + bool bRemove = false; + switch( current->second->m_eType ) + { + case fonttype::Type1: + if( static_cast(current->second)->m_aFontFile == aFileName ) + bRemove = true; + break; + case fonttype::TrueType: + if( static_cast(current->second)->m_aFontFile == aFileName ) + bRemove = true; + break; + default: break; + } + if( bRemove ) + { + next = current; + ++next; + m_aFontFileToFontID[ aFileName ].erase( current->first ); + delete current->second; + m_aFonts.erase( current ); + current = next; + } + else + ++current; + } + + DBG_ASSERT( !findFontFileID( nDirID, aFileName ), "not all fonts removed for file" ); + + nSuccess++; + for( it = aNewFonts.begin(); it != aNewFonts.end(); ++it ) + { + m_aFontFileToFontID[ aFileName ].insert( m_nNextFontID ); + m_aFonts[ m_nNextFontID++ ] = *it; + m_pFontCache->updateFontCacheEntry( *it, false ); + } + } + } + + m_pFontCache->updateDirTimestamp( nDirID ); + m_pFontCache->flush(); + } + else if( pCallback ) + pCallback->importFontsFailed( ImportFontCallback::NoWritableDirectory ); + + return nSuccess; +} + +// ------------------------------------------------------------------------- + +bool PrintFontManager::checkImportPossible() const +{ + bool bSuccess = false; + + // find a directory with write access + ByteString aDir; + for( std::list< int >::const_iterator dir_it = m_aPrivateFontDirectories.begin(); + dir_it != m_aPrivateFontDirectories.end(); ++dir_it ) + { + aDir = getDirectory( *dir_it ); + if( createWriteablePath( aDir ) ) + { + bSuccess = true; + break; + } + } + +#if OSL_DEBUG_LEVEL > 1 + if( bSuccess ) + fprintf( stderr, "found writable %s\n", aDir.GetBuffer() ); +#endif + + return bSuccess; +} + +// ------------------------------------------------------------------------- + +bool PrintFontManager::checkChangeFontPropertiesPossible( fontID /*nFontID*/ ) const +{ + // since font properties are changed in the font cache file only nowadays + // they can always be changed + return true; +} + +// ------------------------------------------------------------------------- + +bool PrintFontManager::changeFontProperties( fontID nFontID, const ::rtl::OUString& rXLFD ) +{ + ByteString aXLFD( OUStringToOString( rXLFD, RTL_TEXTENCODING_UTF8 ) ); + ByteString aAddStyle = aXLFD.GetToken( '-', 6 ); + if( aAddStyle.Search( "utf8" ) == STRING_NOTFOUND ) + { + aAddStyle.Append( aAddStyle.Len() ? ";utf8" : "utf8" ); + aXLFD.SetToken( 6, ';', aAddStyle ); + } + PrintFont* pFont = getFont( nFontID ); + std::list< OString > aDummyList; + aDummyList.push_back( aXLFD ); + getFontAttributesFromXLFD( pFont, aDummyList ); + pFont->m_bUserOverride = true; + m_pFontCache->updateFontCacheEntry( pFont, true ); + + return true; +} + +// ------------------------------------------------------------------------- + +bool PrintFontManager:: +getImportableFontProperties( + const OString& rFile, + ::std::list< FastPrintFontInfo >& rFontProps + ) +{ + rFontProps.clear(); + int nIndex = rFile.lastIndexOf( '/' ); + OString aDir, aFile( rFile.copy( nIndex+1 ) ); + if( nIndex != -1 ) + aDir = rFile.copy( 0, nIndex ); + int nDirID = getDirectoryAtom( aDir, true ); + ::std::list< PrintFont* > aFonts; + bool bRet = analyzeFontFile( nDirID, aFile, ::std::list(), aFonts ); + while( aFonts.begin() != aFonts.end() ) + { + PrintFont* pFont = aFonts.front(); + aFonts.pop_front(); + FastPrintFontInfo aInfo; + fillPrintFontInfo( pFont, aInfo ); + rFontProps.push_back( aInfo ); + delete pFont; + } + return bRet; +} + +// ------------------------------------------------------------------------- + +bool PrintFontManager::getFileDuplicates( fontID nFont, ::std::list< fontID >& rFonts ) const +{ + bool bRet = false; + + rFonts.clear(); + + PrintFont* pSearchFont = getFont( nFont ); + if( ! pSearchFont || + pSearchFont->m_eType != fonttype::TrueType || + static_cast(pSearchFont)->m_nCollectionEntry == -1 + ) + return false; + + OString aFile( getFontFileSysPath( nFont ) ); + if( ! aFile.getLength() ) + return false; + + for( ::std::hash_map< fontID, PrintFont* >::const_iterator it = m_aFonts.begin(); it != m_aFonts.end(); ++it ) + { + if( nFont != it->first ) + { + OString aCompFile( getFontFile( it->second ) ); + if( aCompFile == aFile ) + { + rFonts.push_back( it->first ); + bRet = true; + } + } + } + return bRet; +} + +// ------------------------------------------------------------------------- + +bool PrintFontManager::removeFonts( const ::std::list< fontID >& rFonts ) +{ + bool bRet = true; + ::std::list< fontID > aDuplicates; + for( ::std::list< fontID >::const_iterator it = rFonts.begin(); it != rFonts.end(); ++it ) + { + ::std::hash_map< fontID, PrintFont* >::const_iterator haveFont = m_aFonts.find( *it ); + if( haveFont == m_aFonts.end() ) + continue; + + PrintFont* pFont = haveFont->second; + bool bRemoveDuplicates = getFileDuplicates( *it, aDuplicates ); + ByteString aFile( getFontFile( pFont ) ); + if( aFile.Len() ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "try unlink( \"%s\" ) ... ", aFile.GetBuffer() ); +#endif + if( unlink( aFile.GetBuffer() ) ) + { + bRet = false; +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "failed\n" ); +#endif + continue; + } +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "succeeded\n" ); +#endif + OString aAfm( getAfmFile( pFont ) ); + if( aAfm.getLength() ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "unlink( \"%s\" )\n", aAfm.getStr() ); +#endif + unlink( aAfm.getStr() ); + } + m_aFonts.erase( *it ); + delete pFont; + if( bRemoveDuplicates ) + { + for( ::std::list< fontID >::iterator dup = aDuplicates.begin(); dup != aDuplicates.end(); ++dup ) + { + m_aFontFileToFontID[ aFile ].erase( *dup ); + PrintFont* pDup = m_aFonts[ *dup ]; + m_aFonts.erase( *dup ); + delete pDup; + } + } + } + } + return bRet; +} + +// ------------------------------------------------------------------------- + +bool PrintFontManager::isPrivateFontFile( fontID nFont ) const +{ + bool bRet = false; + int nDirID = -1; + PrintFont* pFont = getFont( nFont ); + if( pFont ) + { + switch( pFont->m_eType ) + { + case fonttype::Type1: nDirID = static_cast< Type1FontFile* >(pFont)->m_nDirectory;break; + case fonttype::TrueType: nDirID = static_cast< TrueTypeFontFile* >(pFont)->m_nDirectory;break; + default: break; + } + } + if( nDirID != -1 ) + { + for( ::std::list< int >::const_iterator it = m_aPrivateFontDirectories.begin(); it != m_aPrivateFontDirectories.end(); ++it ) + { + if( nDirID == *it ) + { + bRet = true; + break; + } + } + } + return bRet; +} + +// ------------------------------------------------------------------------- + +bool PrintFontManager::getAlternativeFamilyNames( fontID nFont, ::std::list< OUString >& rNames ) const +{ + rNames.clear(); + + PrintFont* pFont = getFont( nFont ); + if( pFont && pFont->m_eType == fonttype::TrueType ) + { + TrueTypeFontFile* pTTFontFile = static_cast< TrueTypeFontFile* >(pFont); + ByteString aFile( getFontFile( pFont ) ); + TrueTypeFont* pTTFont; + if( OpenTTFontFile( aFile.GetBuffer(), pTTFontFile->m_nCollectionEntry < 0 ? 0 : pTTFontFile->m_nCollectionEntry, &pTTFont ) == SF_OK ) + { + NameRecord* pNameRecords = NULL; + int nNameRecords = GetTTNameRecords( pTTFont, &pNameRecords ); + for( int i = 0; i < nNameRecords; i++ ) + { + if( pNameRecords[i].nameID != 1 ) // family name + continue; + + OUString aFamily( convertTrueTypeName( pNameRecords+i ) ); + if( aFamily.getLength() + && + m_pAtoms->getAtom( ATOM_FAMILYNAME, aFamily, sal_True ) != pFont->m_nFamilyName + ) + { + rNames.push_back( aFamily ); + } + } + + if( nNameRecords ) + DisposeNameRecords( pNameRecords, nNameRecords ); + CloseTTFont( pTTFont ); + } + } + return rNames.begin() != rNames.end(); +} + +// ------------------------------------------------------------------------- + +// TODO: move most of this stuff into the central font-subsetting code +bool PrintFontManager::createFontSubset( + FontSubsetInfo& rInfo, + fontID nFont, + const OUString& rOutFile, + sal_Int32* pGlyphIDs, + sal_uInt8* pNewEncoding, + sal_Int32* pWidths, + int nGlyphs, + bool bVertical + ) +{ + PrintFont* pFont = getFont( nFont ); + if( !pFont ) + return false; + + switch( pFont->m_eType ) + { + case psp::fonttype::TrueType: rInfo.m_nFontType = FontSubsetInfo::SFNT_TTF; break; + case psp::fonttype::Type1: rInfo.m_nFontType = FontSubsetInfo::ANY_TYPE1; break; + default: + return false; + } + // TODO: remove when Type1 subsetting gets implemented + if( pFont->m_eType != fonttype::TrueType ) + return false; + + // reshuffle array of requested glyphs to make sure glyph0==notdef + sal_uInt8 pEnc[256]; + sal_uInt16 pGID[256]; + sal_uInt8 pOldIndex[256]; + memset( pEnc, 0, sizeof( pEnc ) ); + memset( pGID, 0, sizeof( pGID ) ); + memset( pOldIndex, 0, sizeof( pOldIndex ) ); + if( nGlyphs > 256 ) + return false; + int nChar = 1; + for( int i = 0; i < nGlyphs; i++ ) + { + if( pNewEncoding[i] == 0 ) + { + pOldIndex[ 0 ] = i; + } + else + { + DBG_ASSERT( !(pGlyphIDs[i] & 0x007f0000), "overlong glyph id" ); + DBG_ASSERT( (int)pNewEncoding[i] < nGlyphs, "encoding wrong" ); + DBG_ASSERT( pEnc[pNewEncoding[i]] == 0 && pGID[pNewEncoding[i]] == 0, "duplicate encoded glyph" ); + pEnc[ pNewEncoding[i] ] = pNewEncoding[i]; + pGID[ pNewEncoding[i] ] = (sal_uInt16)pGlyphIDs[ i ]; + pOldIndex[ pNewEncoding[i] ] = i; + nChar++; + } + } + nGlyphs = nChar; // either input value or increased by one + + // prepare system name for read access for subset source file + // TODO: since this file is usually already mmapped there is no need to open it again + const ByteString aFromFile = getFontFile( pFont ); + + TrueTypeFont* pTTFont = NULL; // TODO: rename to SfntFont + TrueTypeFontFile* pTTFontFile = static_cast< TrueTypeFontFile* >(pFont); + if( OpenTTFontFile( aFromFile.GetBuffer(), pTTFontFile->m_nCollectionEntry < 0 ? 0 : pTTFontFile->m_nCollectionEntry, &pTTFont ) != SF_OK ) + return false; + + // prepare system name for write access for subset file target + OUString aSysPath; + if( osl_File_E_None != osl_getSystemPathFromFileURL( rOutFile.pData, &aSysPath.pData ) ) + return false; + const rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); + const ByteString aToFile( OUStringToOString( aSysPath, aEncoding ) ); + + // do CFF subsetting if possible + int nCffLength = 0; + const sal_uInt8* pCffBytes = NULL; + if( GetSfntTable( pTTFont, O_CFF, &pCffBytes, &nCffLength ) ) + { + rInfo.LoadFont( FontSubsetInfo::CFF_FONT, pCffBytes, nCffLength ); +#if 1 // TODO: remove 16bit->long conversion when related methods handle non-16bit glyphids + long aRequestedGlyphs[256]; + for( int i = 0; i < nGlyphs; ++i ) + aRequestedGlyphs[i] = pGID[i]; +#endif + // create subset file at requested path + FILE* pOutFile = fopen( aToFile.GetBuffer(), "wb" ); + // create font subset + const char* pGlyphSetName = NULL; // TODO: better name? + const bool bOK = rInfo.CreateFontSubset( + FontSubsetInfo::TYPE1_PFB, + pOutFile, pGlyphSetName, + aRequestedGlyphs, pEnc, nGlyphs, pWidths ); + fclose( pOutFile ); + // cleanup before early return + CloseTTFont( pTTFont ); + return bOK; + } + + // do TTF->Type42 or Type3 subsetting + // fill in font info + psp::PrintFontInfo aFontInfo; + if( ! getFontInfo( nFont, aFontInfo ) ) + return false; + + rInfo.m_nAscent = aFontInfo.m_nAscend; + rInfo.m_nDescent = aFontInfo.m_nDescend; + rInfo.m_aPSName = getPSName( nFont ); + + int xMin, yMin, xMax, yMax; + getFontBoundingBox( nFont, xMin, yMin, xMax, yMax ); + rInfo.m_aFontBBox = Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) ); + rInfo.m_nCapHeight = yMax; // Well ... + + // fill in glyph advance widths + TTSimpleGlyphMetrics* pMetrics = GetTTSimpleGlyphMetrics( pTTFont, + pGID, + nGlyphs, + bVertical ? 1 : 0 ); + if( pMetrics ) + { + for( int i = 0; i < nGlyphs; i++ ) + pWidths[pOldIndex[i]] = pMetrics[i].adv; + free( pMetrics ); + } + else + { + CloseTTFont( pTTFont ); + return false; + } + + bool bSuccess = ( SF_OK == CreateTTFromTTGlyphs( pTTFont, + aToFile.GetBuffer(), + pGID, + pEnc, + nGlyphs, + 0, + NULL, + 0 ) ); + CloseTTFont( pTTFont ); + + return bSuccess; +} + +void PrintFontManager::getGlyphWidths( fontID nFont, + bool bVertical, + std::vector< sal_Int32 >& rWidths, + std::map< sal_Unicode, sal_uInt32 >& rUnicodeEnc ) +{ + PrintFont* pFont = getFont( nFont ); + if( !pFont || + (pFont->m_eType != fonttype::TrueType && pFont->m_eType != fonttype::Type1) ) + return; + if( pFont->m_eType == fonttype::TrueType ) + { + TrueTypeFont* pTTFont = NULL; + TrueTypeFontFile* pTTFontFile = static_cast< TrueTypeFontFile* >(pFont); + ByteString aFromFile = getFontFile( pFont ); + if( OpenTTFontFile( aFromFile.GetBuffer(), pTTFontFile->m_nCollectionEntry < 0 ? 0 : pTTFontFile->m_nCollectionEntry, &pTTFont ) != SF_OK ) + return; + int nGlyphs = GetTTGlyphCount( pTTFont ); + if( nGlyphs > 0 ) + { + rWidths.resize(nGlyphs); + std::vector aGlyphIds(nGlyphs); + for( int i = 0; i < nGlyphs; i++ ) + aGlyphIds[i] = sal_uInt16(i); + TTSimpleGlyphMetrics* pMetrics = GetTTSimpleGlyphMetrics( pTTFont, + &aGlyphIds[0], + nGlyphs, + bVertical ? 1 : 0 ); + if( pMetrics ) + { + for( int i = 0; i< nGlyphs; i++ ) + rWidths[i] = pMetrics[i].adv; + free( pMetrics ); + rUnicodeEnc.clear(); + } + + // fill the unicode map + // TODO: isn't this map already available elsewhere in the fontmanager? + const sal_uInt8* pCmapData = NULL; + int nCmapSize = 0; + if( GetSfntTable( pTTFont, O_cmap, &pCmapData, &nCmapSize ) ) + { + CmapResult aCmapResult; + if( ParseCMAP( pCmapData, nCmapSize, aCmapResult ) ) + { + const ImplFontCharMap aCharMap( aCmapResult ); + for( sal_uInt32 cOld = 0;;) + { + // get next unicode covered by font + const sal_uInt32 c = aCharMap.GetNextChar( cOld ); + if( c == cOld ) + break; + cOld = c; +#if 1 // TODO: remove when sal_Unicode covers all of unicode + if( c > (sal_Unicode)~0 ) + break; +#endif + // get the matching glyph index + const sal_uInt32 nGlyphId = aCharMap.GetGlyphIndex( c ); + // update the requested map + rUnicodeEnc[ (sal_Unicode)c ] = nGlyphId; + } + } + } + } + CloseTTFont( pTTFont ); + } + else if( pFont->m_eType == fonttype::Type1 ) + { + if( ! pFont->m_aEncodingVector.size() ) + pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, true, true ); + if( pFont->m_pMetrics ) + { + rUnicodeEnc.clear(); + rWidths.clear(); + rWidths.reserve( pFont->m_pMetrics->m_aMetrics.size() ); + for( std::hash_map< int, CharacterMetric >::const_iterator it = + pFont->m_pMetrics->m_aMetrics.begin(); + it != pFont->m_pMetrics->m_aMetrics.end(); ++it ) + { + if( (it->first & 0x00010000) == 0 || bVertical ) + { + rUnicodeEnc[ sal_Unicode(it->first & 0x0000ffff) ] = sal_uInt32(rWidths.size()); + rWidths.push_back( it->second.width ); + } + } + } + } +} + +// ------------------------------------------------------------------------- + +const std::map< sal_Unicode, sal_Int32 >* PrintFontManager::getEncodingMap( fontID nFont, const std::map< sal_Unicode, rtl::OString >** pNonEncoded ) const +{ + PrintFont* pFont = getFont( nFont ); + if( !pFont || + (pFont->m_eType != fonttype::Type1 && pFont->m_eType != fonttype::Builtin) + ) + return NULL; + + if( ! pFont->m_aEncodingVector.size() ) + pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, true, true ); + + if( pNonEncoded ) + *pNonEncoded = pFont->m_aNonEncoded.size() ? &pFont->m_aNonEncoded : NULL; + + return pFont->m_aEncodingVector.size() ? &pFont->m_aEncodingVector : NULL; +} + +// ------------------------------------------------------------------------- + +std::list< OString > PrintFontManager::getAdobeNameFromUnicode( sal_Unicode aChar ) const +{ + std::pair< std::hash_multimap< sal_Unicode, rtl::OString >::const_iterator, + std::hash_multimap< sal_Unicode, rtl::OString >::const_iterator > range + = m_aUnicodeToAdobename.equal_range( aChar ); + + std::list< OString > aRet; + for( ; range.first != range.second; ++range.first ) + aRet.push_back( range.first->second ); + + if( aRet.begin() == aRet.end() && aChar != 0 ) + { + sal_Char aBuf[8]; + sal_Int32 nChars = snprintf( (char*)aBuf, sizeof( aBuf ), "uni%.4hX", aChar ); + aRet.push_back( OString( aBuf, nChars ) ); + } + + return aRet; +} + +// ------------------------------------------------------------------------- +std::list< sal_Unicode > PrintFontManager::getUnicodeFromAdobeName( const rtl::OString& rName ) const +{ + std::pair< std::hash_multimap< rtl::OString, sal_Unicode, rtl::OStringHash >::const_iterator, + std::hash_multimap< rtl::OString, sal_Unicode, rtl::OStringHash >::const_iterator > range + = m_aAdobenameToUnicode.equal_range( rName ); + + std::list< sal_Unicode > aRet; + for( ; range.first != range.second; ++range.first ) + aRet.push_back( range.first->second ); + + if( aRet.begin() == aRet.end() ) + { + if( rName.getLength() == 7 && rName.indexOf( "uni" ) == 0 ) + { + sal_Unicode aCode = (sal_Unicode)rName.copy( 3 ).toInt32( 16 ); + aRet.push_back( aCode ); + } + } + + return aRet; +} + +// ------------------------------------------------------------------------- +namespace +{ + OUString getString( const Any& rAny ) + { + OUString aStr; + rAny >>= aStr; + return aStr; + } + bool getBool( const Any& rAny ) + { + sal_Bool bBool = sal_False; + rAny >>= bBool; + return static_cast(bBool); + } + sal_Int32 getInt( const Any& rAny ) + { + sal_Int32 n = 0; + rAny >>= n; + return n; + } +} +bool PrintFontManager::readOverrideMetrics() +{ + if( ! m_aOverrideFonts.empty() ) + return false; + + Reference< XMultiServiceFactory > xFact( comphelper::getProcessServiceFactory() ); + if( !xFact.is() ) + return false; + Reference< XMaterialHolder > xMat( + xFact->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.psprint.CompatMetricOverride" ) ) ), + UNO_QUERY ); + if( !xMat.is() ) + return false; + + Any aAny( xMat->getMaterial() ); + Sequence< Any > aOverrideFonts; + if( ! (aAny >>= aOverrideFonts ) ) + return false; + sal_Int32 nFonts = aOverrideFonts.getLength(); + for( sal_Int32 i = 0; i < nFonts; i++ ) + { + Sequence< NamedValue > aMetrics; + if( ! (aOverrideFonts.getConstArray()[i] >>= aMetrics) ) + continue; + BuiltinFont* pFont = new BuiltinFont(); + pFont->m_nDirectory = 0; + pFont->m_bUserOverride = false; + pFont->m_pMetrics = new PrintFontMetrics; + memset( pFont->m_pMetrics->m_aPages, 0xff, sizeof( pFont->m_pMetrics->m_aPages ) ); + pFont->m_pMetrics->m_bKernPairsQueried = true; + sal_Int32 nProps = aMetrics.getLength(); + const NamedValue* pProps = aMetrics.getConstArray(); + for( sal_Int32 n = 0; n < nProps; n++ ) + { + if( pProps[n].Name.equalsAscii( "FamilyName" ) ) + pFont->m_nFamilyName = m_pAtoms->getAtom( ATOM_FAMILYNAME, + getString(pProps[n].Value), + sal_True ); + else if( pProps[n].Name.equalsAscii( "PSName" ) ) + pFont->m_nPSName = m_pAtoms->getAtom( ATOM_PSNAME, + getString(pProps[n].Value), + sal_True ); + else if( pProps[n].Name.equalsAscii( "StyleName" ) ) + pFont->m_aStyleName = getString(pProps[n].Value); + else if( pProps[n].Name.equalsAscii( "Italic" ) ) + pFont->m_eItalic = static_cast(getInt(pProps[n].Value)); + else if( pProps[n].Name.equalsAscii( "Width" ) ) + pFont->m_eWidth = static_cast(getInt(pProps[n].Value)); + else if( pProps[n].Name.equalsAscii( "Weight" ) ) + pFont->m_eWeight = static_cast(getInt(pProps[n].Value)); + else if( pProps[n].Name.equalsAscii( "Pitch" ) ) + pFont->m_ePitch = static_cast(getInt(pProps[n].Value)); + else if( pProps[n].Name.equalsAscii( "Encoding" ) ) + pFont->m_aEncoding = static_cast(getInt(pProps[n].Value)); + else if( pProps[n].Name.equalsAscii( "FontEncodingOnly" ) ) + pFont->m_bFontEncodingOnly = getBool(pProps[n].Value); + else if( pProps[n].Name.equalsAscii( "GlobalMetricXWidth" ) ) + pFont->m_aGlobalMetricX.width = getInt(pProps[n].Value); + else if( pProps[n].Name.equalsAscii( "GlobalMetricXHeight" ) ) + pFont->m_aGlobalMetricX.height = getInt(pProps[n].Value); + else if( pProps[n].Name.equalsAscii( "GlobalMetricYWidth" ) ) + pFont->m_aGlobalMetricY.width = getInt(pProps[n].Value); + else if( pProps[n].Name.equalsAscii( "GlobalMetricYHeight" ) ) + pFont->m_aGlobalMetricY.height = getInt(pProps[n].Value); + else if( pProps[n].Name.equalsAscii( "Ascend" ) ) + pFont->m_nAscend = getInt(pProps[n].Value); + else if( pProps[n].Name.equalsAscii( "Descend" ) ) + pFont->m_nDescend = getInt(pProps[n].Value); + else if( pProps[n].Name.equalsAscii( "Leading" ) ) + pFont->m_nLeading = getInt(pProps[n].Value); + else if( pProps[n].Name.equalsAscii( "XMin" ) ) + pFont->m_nXMin = getInt(pProps[n].Value); + else if( pProps[n].Name.equalsAscii( "YMin" ) ) + pFont->m_nYMin = getInt(pProps[n].Value); + else if( pProps[n].Name.equalsAscii( "XMax" ) ) + pFont->m_nXMax = getInt(pProps[n].Value); + else if( pProps[n].Name.equalsAscii( "YMax" ) ) + pFont->m_nYMax = getInt(pProps[n].Value); + else if( pProps[n].Name.equalsAscii( "VerticalSubstitutes" ) ) + pFont->m_bHaveVerticalSubstitutedGlyphs = getBool(pProps[n].Value); + else if( pProps[n].Name.equalsAscii( "EncodingVector" ) ) + { + Sequence< NamedValue > aEncoding; + pProps[n].Value >>= aEncoding; + sal_Int32 nEnc = aEncoding.getLength(); + const NamedValue* pEnc = aEncoding.getConstArray(); + for( sal_Int32 m = 0; m < nEnc; m++ ) + { + sal_Unicode cCode = *pEnc[m].Name.getStr(); + sal_Int32 nGlyph = getInt(pEnc[m].Value); + pFont->m_aEncodingVector[ cCode ] = nGlyph; + } + } + else if( pProps[n].Name.equalsAscii( "NonEncoded" ) ) + { + Sequence< NamedValue > aEncoding; + pProps[n].Value >>= aEncoding; + sal_Int32 nEnc = aEncoding.getLength(); + const NamedValue* pEnc = aEncoding.getConstArray(); + for( sal_Int32 m = 0; m < nEnc; m++ ) + { + sal_Unicode cCode = *pEnc[m].Name.getStr(); + OUString aGlyphName( getString(pEnc[m].Value) ); + pFont->m_aNonEncoded[ cCode ] = OUStringToOString(aGlyphName,RTL_TEXTENCODING_ASCII_US); + } + } + else if( pProps[n].Name.equalsAscii( "CharacterMetrics" ) ) + { + // fill pFont->m_pMetrics->m_aMetrics + // expect triples of int: int -> CharacterMetric.{ width, height } + Sequence< sal_Int32 > aSeq; + pProps[n].Value >>= aSeq; + sal_Int32 nInts = aSeq.getLength(); + const sal_Int32* pInts = aSeq.getConstArray(); + for( sal_Int32 m = 0; m < nInts; m+=3 ) + { + pFont->m_pMetrics->m_aMetrics[ pInts[m] ].width = static_cast(pInts[m+1]); + pFont->m_pMetrics->m_aMetrics[ pInts[m] ].height = static_cast(pInts[m+2]); + } + } + else if( pProps[n].Name.equalsAscii( "XKernPairs" ) ) + { + // fill pFont->m_pMetrics->m_aXKernPairs + // expection name: value: ((height << 16)| width) + Sequence< NamedValue > aKern; + pProps[n].Value >>= aKern; + KernPair aPair; + const NamedValue* pVals = aKern.getConstArray(); + int nPairs = aKern.getLength(); + for( int m = 0; m < nPairs; m++ ) + { + if( pVals[m].Name.getLength() == 2 ) + { + aPair.first = pVals[m].Name.getStr()[0]; + aPair.second = pVals[m].Name.getStr()[1]; + sal_Int32 nKern = getInt( pVals[m].Value ); + aPair.kern_x = static_cast(nKern & 0xffff); + aPair.kern_y = static_cast((sal_uInt32(nKern) >> 16) & 0xffff); + pFont->m_pMetrics->m_aXKernPairs.push_back( aPair ); + } + } + } + } + // sanity check + if( pFont->m_nPSName && + pFont->m_nFamilyName && + ! pFont->m_pMetrics->m_aMetrics.empty() ) + { + m_aOverrideFonts.push_back( m_nNextFontID ); + m_aFonts[ m_nNextFontID++ ] = pFont; + } + else + { + DBG_ASSERT( 0, "override font failed" ); + delete pFont; + } + } + + return true; +} diff --git a/vcl/unx/generic/fontmanager/helper.cxx b/vcl/unx/generic/fontmanager/helper.cxx new file mode 100644 index 000000000000..05213a52597c --- /dev/null +++ b/vcl/unx/generic/fontmanager/helper.cxx @@ -0,0 +1,404 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include +#include +#include + +#include "vcl/helper.hxx" +#include "vcl/ppdparser.hxx" +#include "tools/string.hxx" +#include "tools/urlobj.hxx" +#include "osl/file.hxx" +#include "osl/process.h" +#include "rtl/bootstrap.hxx" + +using namespace rtl; + +namespace psp { + +OUString getOfficePath( enum whichOfficePath ePath ) +{ + static OUString aNetPath; + static OUString aUserPath; + static OUString aConfigPath; + static OUString aEmpty; + static bool bOnce = false; + + if( ! bOnce ) + { + bOnce = true; + OUString aIni; + Bootstrap::get( OUString( RTL_CONSTASCII_USTRINGPARAM( "BRAND_BASE_DIR" ) ), aIni ); + aIni += OUString( RTL_CONSTASCII_USTRINGPARAM( "/program/" SAL_CONFIGFILE( "bootstrap" ) ) ); + Bootstrap aBootstrap( aIni ); + aBootstrap.getFrom( OUString( RTL_CONSTASCII_USTRINGPARAM( "CustomDataUrl" ) ), aConfigPath ); + aBootstrap.getFrom( OUString( RTL_CONSTASCII_USTRINGPARAM( "BaseInstallation" ) ), aNetPath ); + aBootstrap.getFrom( OUString( RTL_CONSTASCII_USTRINGPARAM( "UserInstallation" ) ), aUserPath ); + OUString aUPath = aUserPath; + + if( ! aConfigPath.compareToAscii( "file://", 7 ) ) + { + OUString aSysPath; + if( osl_getSystemPathFromFileURL( aConfigPath.pData, &aSysPath.pData ) == osl_File_E_None ) + aConfigPath = aSysPath; + } + if( ! aNetPath.compareToAscii( "file://", 7 ) ) + { + OUString aSysPath; + if( osl_getSystemPathFromFileURL( aNetPath.pData, &aSysPath.pData ) == osl_File_E_None ) + aNetPath = aSysPath; + } + if( ! aUserPath.compareToAscii( "file://", 7 ) ) + { + OUString aSysPath; + if( osl_getSystemPathFromFileURL( aUserPath.pData, &aSysPath.pData ) == osl_File_E_None ) + aUserPath = aSysPath; + } + // ensure user path exists + aUPath += OUString( RTL_CONSTASCII_USTRINGPARAM( "/user/psprint" ) ); + #if OSL_DEBUG_LEVEL > 1 + oslFileError eErr = + #endif + osl_createDirectoryPath( aUPath.pData, NULL, NULL ); + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "try to create \"%s\" = %d\n", OUStringToOString( aUPath, RTL_TEXTENCODING_UTF8 ).getStr(), eErr ); + #endif + } + + switch( ePath ) + { + case ConfigPath: return aConfigPath; + case NetPath: return aNetPath; + case UserPath: return aUserPath; + } + return aEmpty; +} + +static OString getEnvironmentPath( const char* pKey ) +{ + OString aPath; + + const char* pValue = getenv( pKey ); + if( pValue && *pValue ) + { + aPath = OString( pValue ); + } + return aPath; +} + +} // namespace psp + +void psp::getPrinterPathList( std::list< OUString >& rPathList, const char* pSubDir ) +{ + rPathList.clear(); + rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); + + OUStringBuffer aPathBuffer( 256 ); + + // append net path + aPathBuffer.append( getOfficePath( psp::NetPath ) ); + if( aPathBuffer.getLength() ) + { + aPathBuffer.appendAscii( "/share/psprint" ); + if( pSubDir ) + { + aPathBuffer.append( sal_Unicode('/') ); + aPathBuffer.appendAscii( pSubDir ); + } + rPathList.push_back( aPathBuffer.makeStringAndClear() ); + } + // append user path + aPathBuffer.append( getOfficePath( psp::UserPath ) ); + if( aPathBuffer.getLength() ) + { + aPathBuffer.appendAscii( "/user/psprint" ); + if( pSubDir ) + { + aPathBuffer.append( sal_Unicode('/') ); + aPathBuffer.appendAscii( pSubDir ); + } + rPathList.push_back( aPathBuffer.makeStringAndClear() ); + } + + OString aPath( getEnvironmentPath("SAL_PSPRINT") ); + sal_Int32 nIndex = 0; + do + { + OString aDir( aPath.getToken( 0, ':', nIndex ) ); + if( ! aDir.getLength() ) + continue; + + if( pSubDir ) + { + aDir += "/"; + aDir += pSubDir; + } + struct stat aStat; + if( stat( aDir.getStr(), &aStat ) || ! S_ISDIR( aStat.st_mode ) ) + continue; + + rPathList.push_back( OStringToOUString( aDir, aEncoding ) ); + } while( nIndex != -1 ); + + #ifdef SYSTEM_PPD_DIR + if( pSubDir && rtl_str_compare( pSubDir, PRINTER_PPDDIR ) == 0 ) + { + rPathList.push_back( rtl::OStringToOUString( rtl::OString( SYSTEM_PPD_DIR ), RTL_TEXTENCODING_UTF8 ) ); + } + #endif + + if( rPathList.empty() ) + { + // last resort: next to program file (mainly for setup) + OUString aExe; + if( osl_getExecutableFile( &aExe.pData ) == osl_Process_E_None ) + { + INetURLObject aDir( aExe ); + aDir.removeSegment(); + aExe = aDir.GetMainURL( INetURLObject::NO_DECODE ); + OUString aSysPath; + if( osl_getSystemPathFromFileURL( aExe.pData, &aSysPath.pData ) == osl_File_E_None ) + { + rPathList.push_back( aSysPath ); + } + } + } +} + +OUString psp::getFontPath() +{ + static OUString aPath; + + if( ! aPath.getLength() ) + { + OUStringBuffer aPathBuffer( 512 ); + + OUString aConfigPath( getOfficePath( psp::ConfigPath ) ); + OUString aNetPath( getOfficePath( psp::NetPath ) ); + OUString aUserPath( getOfficePath( psp::UserPath ) ); + if( aConfigPath.getLength() ) + { + // #i53530# Path from CustomDataUrl will completely + // replace net and user paths if the path exists + aPathBuffer.append(aConfigPath); + aPathBuffer.appendAscii("/share/fonts"); + // check existance of config path + struct stat aStat; + if( 0 != stat( OUStringToOString( aPathBuffer.makeStringAndClear(), osl_getThreadTextEncoding() ).getStr(), &aStat ) + || ! S_ISDIR( aStat.st_mode ) ) + aConfigPath = OUString(); + else + { + aPathBuffer.append(aConfigPath); + aPathBuffer.appendAscii("/share/fonts"); + } + } + if( aConfigPath.getLength() == 0 ) + { + if( aNetPath.getLength() ) + { + aPathBuffer.append( aNetPath ); + aPathBuffer.appendAscii( "/share/fonts/truetype;"); + aPathBuffer.append( aNetPath ); + aPathBuffer.appendAscii( "/share/fonts/type1;" ); + } + if( aUserPath.getLength() ) + { + aPathBuffer.append( aUserPath ); + aPathBuffer.appendAscii( "/user/fonts" ); + } + } + OString aEnvPath( getEnvironmentPath( "SAL_FONTPATH_PRIVATE" ) ); + if( aEnvPath.getLength() ) + { + aPathBuffer.append( sal_Unicode(';') ); + aPathBuffer.append( OStringToOUString( aEnvPath, osl_getThreadTextEncoding() ) ); + } + + aPath = aPathBuffer.makeStringAndClear(); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "initializing font path to \"%s\"\n", OUStringToOString( aPath, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); +#endif + } + return aPath; +} + +bool psp::convertPfbToPfa( ::osl::File& rInFile, ::osl::File& rOutFile ) +{ + static unsigned char hexDigits[] = + { + '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' + }; + + bool bSuccess = true; + bool bEof = false; + unsigned char buffer[256]; + sal_uInt64 nRead; + sal_uInt64 nOrgPos = 0; + rInFile.getPos( nOrgPos ); + + while( bSuccess && ! bEof ) + { + // read leading bytes + bEof = ! rInFile.read( buffer, 6, nRead ) && nRead == 6 ? false : true; + unsigned int nType = buffer[ 1 ]; + unsigned int nBytesToRead = buffer[2] | buffer[3] << 8 | buffer[4] << 16 | buffer[5] << 24; + if( buffer[0] != 0x80 ) // test for pfb m_agic number + { + // this migt be a pfa font already + sal_uInt64 nWrite = 0; + if( ! rInFile.read( buffer+6, 9, nRead ) && nRead == 9 && + ( ! std::strncmp( (char*)buffer, "%!FontType1-", 12 ) || + ! std::strncmp( (char*)buffer, "%!PS-AdobeFont-", 15 ) ) ) + { + if( rOutFile.write( buffer, 15, nWrite ) || nWrite != 15 ) + bSuccess = false; + while( bSuccess && + ! rInFile.read( buffer, sizeof( buffer ), nRead ) && + nRead != 0 ) + { + if( rOutFile.write( buffer, nRead, nWrite ) || + nWrite != nRead ) + bSuccess = false; + } + bEof = true; + } + else + bSuccess = false; + } + else if( nType == 1 || nType == 2 ) + { + unsigned char* pBuffer = new unsigned char[ nBytesToRead+1 ]; + + if( ! rInFile.read( pBuffer, nBytesToRead, nRead ) && nRead == nBytesToRead ) + { + if( nType == 1 ) + { + // ascii data, convert dos lineends( \r\n ) and + // m_ac lineends( \r ) to \n + unsigned char * pWriteBuffer = new unsigned char[ nBytesToRead ]; + unsigned int nBytesToWrite = 0; + for( unsigned int i = 0; i < nBytesToRead; i++ ) + { + if( pBuffer[i] != '\r' ) + pWriteBuffer[ nBytesToWrite++ ] = pBuffer[i]; + else if( pBuffer[ i+1 ] == '\n' ) + { + i++; + pWriteBuffer[ nBytesToWrite++ ] = '\n'; + } + else + pWriteBuffer[ nBytesToWrite++ ] = '\n'; + } + if( rOutFile.write( pWriteBuffer, nBytesToWrite, nRead ) || nRead != nBytesToWrite ) + bSuccess = false; + + delete [] pWriteBuffer; + } + else + { + // binary data + unsigned int nBuffer = 0; + for( unsigned int i = 0; i < nBytesToRead && bSuccess; i++ ) + { + buffer[ nBuffer++ ] = hexDigits[ pBuffer[ i ] >> 4 ]; + buffer[ nBuffer++ ] = hexDigits[ pBuffer[ i ] & 15 ]; + if( nBuffer >= 80 ) + { + buffer[ nBuffer++ ] = '\n'; + if( rOutFile.write( buffer, nBuffer, nRead ) || nRead != nBuffer ) + bSuccess = false; + nBuffer = 0; + } + } + if( nBuffer > 0 && bSuccess ) + { + buffer[ nBuffer++ ] = '\n'; + if( rOutFile.write( buffer, nBuffer, nRead ) || nRead != nBuffer ) + bSuccess = false; + } + } + } + else + bSuccess = false; + + delete [] pBuffer; + } + else if( nType == 3 ) + bEof = true; + else + bSuccess = false; + } + + return bSuccess; +} + +void psp::normPath( OString& rPath ) +{ + char buf[PATH_MAX]; + + ByteString aPath( rPath ); + + // double slashes and slash at end are probably + // removed by realpath anyway, but since this runs + // on many different platforms let's play it safe + while( aPath.SearchAndReplace( "//", "/" ) != STRING_NOTFOUND ) + ; + if( aPath.Len() > 0 && aPath.GetChar( aPath.Len()-1 ) == '/' ) + aPath.Erase( aPath.Len()-1 ); + + if( ( aPath.Search( "./" ) != STRING_NOTFOUND || + aPath.Search( "~" ) != STRING_NOTFOUND ) + && realpath( aPath.GetBuffer(), buf ) ) + { + rPath = buf; + } + else + { + rPath = aPath; + } +} + +void psp::splitPath( OString& rPath, OString& rDir, OString& rBase ) +{ + normPath( rPath ); + sal_Int32 nIndex = rPath.lastIndexOf( '/' ); + if( nIndex > 0 ) + rDir = rPath.copy( 0, nIndex ); + else if( nIndex == 0 ) // root dir + rDir = rPath.copy( 0, 1 ); + if( rPath.getLength() > nIndex+1 ) + rBase = rPath.copy( nIndex+1 ); +} + + diff --git a/vcl/unx/generic/fontmanager/makefile.mk b/vcl/unx/generic/fontmanager/makefile.mk new file mode 100644 index 000000000000..c6a23b88f35b --- /dev/null +++ b/vcl/unx/generic/fontmanager/makefile.mk @@ -0,0 +1,72 @@ +#************************************************************************* +# +# 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=..$/..$/.. + +ENABLE_EXCEPTIONS=TRUE +PRJNAME=vcl +TARGET=fontman + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +CFLAGS+= -I..$/fontsubset +INCDEPN+= -I..$/fontsubset + +.IF "$(ENABLE_FONTCONFIG)" != "" +CDEFS += -DENABLE_FONTCONFIG +.ENDIF + +CFLAGS+=$(FREETYPE_CFLAGS) + + +# --- Files -------------------------------------------------------- + +.IF "$(GUIBASE)"=="aqua" + +dummy: + @echo "Nothing to build for GUIBASE $(GUIBASE)" + +.ELSE # "$(GUIBASE)"=="aqua" + +SLOFILES=\ + $(SLO)$/fontmanager.obj \ + $(SLO)$/fontcache.obj \ + $(SLO)$/fontconfig.obj \ + $(SLO)$/helper.obj \ + $(SLO)$/parseAFM.obj + +.IF "$(OS)$(CPU)"=="SOLARISI" +NOOPTFILES=$(SLO)$/fontmanager.obj +.ENDIF + +.ENDIF + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk diff --git a/vcl/unx/generic/fontmanager/parseAFM.cxx b/vcl/unx/generic/fontmanager/parseAFM.cxx new file mode 100644 index 000000000000..e1a33b4d1b5d --- /dev/null +++ b/vcl/unx/generic/fontmanager/parseAFM.cxx @@ -0,0 +1,1577 @@ +/* + * (C) 1988, 1989, 1990 by Adobe Systems Incorporated. All rights reserved. + * + * This file may be freely copied and redistributed as long as: + * 1) This entire notice continues to be included in the file, + * 2) If the file has been modified in any way, a notice of such + * modification is conspicuously indicated. + * + * PostScript, Display PostScript, and Adobe are registered trademarks of + * Adobe Systems Incorporated. + * + * ************************************************************************ + * THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO CHANGE WITHOUT + * NOTICE, AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY ADOBE SYSTEMS + * INCORPORATED. ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY OR + * LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO WARRANTY OF ANY + * KIND (EXPRESS, IMPLIED OR STATUTORY) WITH RESPECT TO THIS INFORMATION, + * AND EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. + * ************************************************************************ + */ + +/* + * Changes made for OpenOffice.org + * + * 10/24/2000 pl - changed code to compile with c++-compilers + * - added namespace to avoid symbol clashes + * - replaced BOOL by bool + * - added function to free space allocated by parseFile + * 10/26/2000 pl - added additional keys + * - added ability to parse slightly broken files + * - added charwidth member to GlobalFontInfo + * 04/26/2001 pl - added OpenOffice header + * 10/19/2005 pl - performance increase: + * - fread file in one pass + * - replace file io by buffer access + * 10/20/2005 pl - performance increase: + * - use one table lookup in token() routine + * instead of many conditions + * - return token length in toke() routine + * - use hash lookup instead of binary search + * in recognize() routine + */ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_vcl.hxx" + +/* parseAFM.c + * + * This file is used in conjuction with the parseAFM.h header file. + * This file contains several procedures that are used to parse AFM + * files. It is intended to work with an application program that needs + * font metric information. The program can be used as is by making a + * procedure call to "parseFile" (passing in the expected parameters) + * and having it fill in a data structure with the data from the + * AFM file, or an application developer may wish to customize this + * code. + * + * There is also a file, parseAFMclient.c, that is a sample application + * showing how to call the "parseFile" procedure and how to use the data + * after "parseFile" has returned. + * + * Please read the comments in parseAFM.h and parseAFMclient.c. + * + * History: + * original: DSM Thu Oct 20 17:39:59 PDT 1988 + * modified: DSM Mon Jul 3 14:17:50 PDT 1989 + * - added 'storageProblem' return code + * - fixed bug of not allocating extra byte for string duplication + * - fixed typos + * modified: DSM Tue Apr 3 11:18:34 PDT 1990 + * - added free(ident) at end of parseFile routine + * modified: DSM Tue Jun 19 10:16:29 PDT 1990 + * - changed (width == 250) to (width = 250) in initializeArray + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "parseAFM.hxx" +#include "vcl/strhelper.hxx" + +#include "rtl/alloc.h" + +#define lineterm EOL /* line terminating character */ +#define normalEOF 1 /* return code from parsing routines used only */ +/* in this module */ +#define Space "space" /* used in string comparison to look for the width */ +/* of the space character to init the widths array */ +#define False "false" /* used in string comparison to check the value of */ +/* boolean keys (e.g. IsFixedPitch) */ + +#define MATCH(A,B) (strncmp((A),(B), MAX_NAME) == 0) + +namespace psp { + +class FileInputStream +{ + char* m_pMemory; + unsigned int m_nPos; + unsigned int m_nLen; + public: + FileInputStream( const char* pFilename ); + ~FileInputStream(); + + int getChar() { return (m_nPos < m_nLen) ? int(m_pMemory[m_nPos++]) : -1; } + void ungetChar() + { + if( m_nPos > 0 ) + m_nPos--; + } + unsigned int tell() const { return m_nPos; } + void seek( unsigned int nPos ) + // NOTE: do not check input data since only results of tell() + // get seek()ed in this file + { m_nPos = nPos; } +}; + +FileInputStream::FileInputStream( const char* pFilename ) : + m_pMemory( NULL ), + m_nPos( 0 ), + m_nLen( 0 ) +{ + struct stat aStat; + if( ! stat( pFilename, &aStat ) && + S_ISREG( aStat.st_mode ) && + aStat.st_size > 0 + ) + { + FILE* fp = fopen( pFilename, "r" ); + if( fp ) + { + m_pMemory = (char*)rtl_allocateMemory( aStat.st_size ); + m_nLen = (unsigned int)fread( m_pMemory, 1, aStat.st_size, fp ); + fclose( fp ); + } + } +} + +FileInputStream::~FileInputStream() +{ + rtl_freeMemory( m_pMemory ); +} + +/*************************** GLOBALS ***********************/ +/* "shorts" for fast case statement + * The values of each of these enumerated items correspond to an entry in the + * table of strings defined below. Therefore, if you add a new string as + * new keyword into the keyStrings table, you must also add a corresponding + * parseKey AND it MUST be in the same position! + * + * IMPORTANT: since the sorting algorithm is a binary search, the strings of + * keywords must be placed in lexicographical order, below. [Therefore, the + * enumerated items are not necessarily in lexicographical order, depending + * on the name chosen. BUT, they must be placed in the same position as the + * corresponding key string.] The NOPE shall remain in the last position, + * since it does not correspond to any key string, and it is used in the + * "recognize" procedure to calculate how many possible keys there are. + */ + +// some metrics have Ascent, Descent instead Ascender, Descender or Em +// which is not allowed per afm spcification, but let us handle +// this gently +enum parseKey { + ASCENDER, ASCENT, CHARBBOX, CODE, COMPCHAR, CODEHEX, CAPHEIGHT, CHARWIDTH, CHARACTERSET, CHARACTERS, COMMENT, + DESCENDER, DESCENT, EM, ENCODINGSCHEME, ENDCHARMETRICS, ENDCOMPOSITES, ENDDIRECTION, + ENDFONTMETRICS, ENDKERNDATA, ENDKERNPAIRS, ENDTRACKKERN, + FAMILYNAME, FONTBBOX, FONTNAME, FULLNAME, ISBASEFONT, ISFIXEDPITCH, + ITALICANGLE, KERNPAIR, KERNPAIRXAMT, LIGATURE, MAPPINGSCHEME, METRICSSETS, CHARNAME, + NOTICE, COMPCHARPIECE, STARTCHARMETRICS, STARTCOMPOSITES, STARTDIRECTION, + STARTFONTMETRICS, STARTKERNDATA, STARTKERNPAIRS, + STARTTRACKKERN, STDHW, STDVW, TRACKKERN, UNDERLINEPOSITION, + UNDERLINETHICKNESS, VVECTOR, VERSION, XYWIDTH, X0WIDTH, XWIDTH, WEIGHT, XHEIGHT, + NOPE +}; + +/*************************** PARSING ROUTINES **************/ + +/*************************** token *************************/ + +/* A "AFM file Conventions" tokenizer. That means that it will + * return the next token delimited by white space. See also + * the `linetoken' routine, which does a similar thing but + * reads all tokens until the next end-of-line. + */ + +// token white space is ' ', '\n', '\r', ',', '\t', ';' +static const bool is_white_Array[ 256 ] = +{ false, false, false, false, false, false, false, false, // 0-7 + false, true, true, false, false, true, false, false, // 8-15 + false, false, false, false, false, false, false, false, // 16-23 + false, false, false, false, false, false, false, false, // 24-31 + true, false, false, false, false, false, false, false, // 32-39 + false, false, false, false, true, false, false, false, // 40-47 + false, false, false, false, false, false, false, false, // 48-55 + false, false, false, true, false, false, false, false, // 56-63 + + false, false, false, false, false, false, false, false, // 64 - + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, // 127 + + false, false, false, false, false, false, false, false, // 128 - + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, // 191 + + false, false, false, false, false, false, false, false, // 192 - + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, // 255 +}; +// token delimiters are ' ', '\n', '\r', '\t', ':', ';' +static const bool is_delimiter_Array[ 256 ] = +{ false, false, false, false, false, false, false, false, // 0-7 + false, true, true, false, false, true, false, false, // 8-15 + false, false, false, false, false, false, false, false, // 16-23 + false, false, false, false, false, false, false, false, // 24-31 + true, false, false, false, false, false, false, false, // 32-39 + false, false, false, false, false, false, false, false, // 40-47 + false, false, false, false, false, false, false, false, // 48-55 + false, false, true, true, false, false, false, false, // 56-63 + + false, false, false, false, false, false, false, false, // 64 - + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, // 127 + + false, false, false, false, false, false, false, false, // 128 - + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, // 191 + + false, false, false, false, false, false, false, false, // 192 - + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, // 255 +}; +static char *token( FileInputStream* stream, int& rLen ) +{ + static char ident[MAX_NAME]; /* storage buffer for keywords */ + + int ch, idx; + + /* skip over white space */ + // relies on EOF = -1 + while( is_white_Array[ (ch = stream->getChar()) & 255 ] ) + ; + + idx = 0; + while( ch != -1 && ! is_delimiter_Array[ ch & 255 ] && idx < MAX_NAME-1 ) + { + ident[idx++] = ch; + ch = stream->getChar(); + } + + if (ch == -1 && idx < 1) return ((char *)NULL); + if (idx >= 1 && ch != ':' && ch != -1) stream->ungetChar(); + if (idx < 1 ) ident[idx++] = ch; /* single-character token */ + ident[idx] = 0; + rLen = idx; + + return(ident); /* returns pointer to the token */ + +} /* token */ + + +/*************************** linetoken *************************/ + +/* "linetoken" will get read all tokens until the EOL character from + * the given stream. This is used to get any arguments that can be + * more than one word (like Comment lines and FullName). + */ + +static char *linetoken( FileInputStream* stream ) +{ + static char ident[MAX_NAME]; /* storage buffer for keywords */ + int ch, idx; + + while ((ch = stream->getChar()) == ' ' || ch == '\t' ) ; + + idx = 0; + while (ch != -1 && ch != lineterm && ch != '\r' && idx < MAX_NAME-1 ) + { + ident[idx++] = ch; + ch = stream->getChar(); + } /* while */ + + stream->ungetChar(); + ident[idx] = 0; + + return(ident); /* returns pointer to the token */ + +} /* linetoken */ + + +/*************************** recognize *************************/ + +/* This function tries to match a string to a known list of + * valid AFM entries (check the keyStrings array above). + * "ident" contains everything from white space through the + * next space, tab, or ":" character. + * + * The algorithm is a standard Knuth binary search. + */ +#include "afm_hash.cpp" + +static inline enum parseKey recognize( register char* ident, int len) +{ + const hash_entry* pEntry = AfmKeywordHash::in_word_set( ident, len ); + return pEntry ? pEntry->eKey : NOPE; + +} /* recognize */ + + +/************************* parseGlobals *****************************/ + +/* This function is called by "parseFile". It will parse the AFM file + * up to the "StartCharMetrics" keyword, which essentially marks the + * end of the Global Font Information and the beginning of the character + * metrics information. + * + * If the caller of "parseFile" specified that it wanted the Global + * Font Information (as defined by the "AFM file Specification" + * document), then that information will be stored in the returned + * data structure. + * + * Any Global Font Information entries that are not found in a + * given file, will have the usual default initialization value + * for its type (i.e. entries of type int will be 0, etc). + * + * This function returns an error code specifying whether there was + * a premature EOF or a parsing error. This return value is used by + * parseFile to determine if there is more file to parse. + */ + +static int parseGlobals( FileInputStream* fp, register GlobalFontInfo* gfi ) +{ + bool cont = true, save = (gfi != NULL); + int error = ok; + register char *keyword; + int direction = -1; + int tokenlen; + + while (cont) + { + keyword = token(fp, tokenlen); + + if (keyword == NULL) + /* Have reached an early and unexpected EOF. */ + /* Set flag and stop parsing */ + { + error = earlyEOF; + break; /* get out of loop */ + } + if (!save) + /* get tokens until the end of the Global Font info section */ + /* without saving any of the data */ + switch (recognize(keyword, tokenlen)) + { + case STARTCHARMETRICS: + cont = false; + break; + case ENDFONTMETRICS: + cont = false; + error = normalEOF; + break; + default: + break; + } /* switch */ + else + /* otherwise parse entire global font info section, */ + /* saving the data */ + switch(recognize(keyword, tokenlen)) + { + case STARTFONTMETRICS: + if ((keyword = token(fp,tokenlen)) != NULL) + gfi->afmVersion = strdup( keyword ); + break; + case COMMENT: + keyword = linetoken(fp); + break; + case FONTNAME: + if ((keyword = token(fp,tokenlen)) != NULL) + gfi->fontName = strdup( keyword ); + break; + case ENCODINGSCHEME: + if ((keyword = token(fp,tokenlen)) != NULL) + gfi->encodingScheme = strdup( keyword ); + break; + case FULLNAME: + if ((keyword = linetoken(fp)) != NULL) + gfi->fullName = strdup( keyword ); + break; + case FAMILYNAME: + if ((keyword = linetoken(fp)) != NULL) + gfi->familyName = strdup( keyword ); + break; + case WEIGHT: + if ((keyword = token(fp,tokenlen)) != NULL) + gfi->weight = strdup( keyword ); + break; + case ITALICANGLE: + if ((keyword = token(fp,tokenlen)) != NULL) + gfi->italicAngle = StringToDouble( keyword ); + break; + case ISFIXEDPITCH: + if ((keyword = token(fp,tokenlen)) != NULL) + { + if (MATCH(keyword, False)) + gfi->isFixedPitch = 0; + else + gfi->isFixedPitch = 1; + } + break; + case UNDERLINEPOSITION: + if ((keyword = token(fp,tokenlen)) != NULL) + gfi->underlinePosition = atoi(keyword); + break; + case UNDERLINETHICKNESS: + if ((keyword = token(fp,tokenlen)) != NULL) + gfi->underlineThickness = atoi(keyword); + break; + case VERSION: + if ((keyword = token(fp,tokenlen)) != NULL) + gfi->version = strdup( keyword ); + break; + case NOTICE: + if ((keyword = linetoken(fp)) != NULL) + gfi->notice = strdup( keyword ); + break; + case FONTBBOX: + if ((keyword = token(fp,tokenlen)) != NULL) + gfi->fontBBox.llx = atoi(keyword); + if ((keyword = token(fp,tokenlen)) != NULL) + gfi->fontBBox.lly = atoi(keyword); + if ((keyword = token(fp,tokenlen)) != NULL) + gfi->fontBBox.urx = atoi(keyword); + if ((keyword = token(fp,tokenlen)) != NULL) + gfi->fontBBox.ury = atoi(keyword); + break; + case CAPHEIGHT: + if ((keyword = token(fp,tokenlen)) != NULL) + gfi->capHeight = atoi(keyword); + break; + case XHEIGHT: + if ((keyword = token(fp,tokenlen)) != NULL) + gfi->xHeight = atoi(keyword); + break; + case DESCENT: + if ((keyword = token(fp,tokenlen)) != NULL) + gfi->descender = -atoi(keyword); + break; + case DESCENDER: + if ((keyword = token(fp,tokenlen)) != NULL) + gfi->descender = atoi(keyword); + break; + case ASCENT: + case ASCENDER: + if ((keyword = token(fp,tokenlen)) != NULL) + gfi->ascender = atoi(keyword); + break; + case STARTCHARMETRICS: + cont = false; + break; + case ENDFONTMETRICS: + cont = false; + error = normalEOF; + break; + case EM: + // skip one token + keyword = token(fp,tokenlen); + break; + case STARTDIRECTION: + if ((keyword = token(fp,tokenlen)) != NULL) + direction = atoi(keyword); + break; /* ignore this for now */ + case ENDDIRECTION: + break; /* ignore this for now */ + case MAPPINGSCHEME: + keyword = token(fp,tokenlen); + break; /* ignore this for now */ + case CHARACTERS: + keyword = token(fp,tokenlen); + break; /* ignore this for now */ + case ISBASEFONT: + keyword = token(fp,tokenlen); + break; /* ignore this for now */ + case CHARACTERSET: + keyword=token(fp,tokenlen); //ignore + break; + case STDHW: + keyword=token(fp,tokenlen); //ignore + break; + case STDVW: + keyword=token(fp,tokenlen); //ignore + break; + case CHARWIDTH: + if ((keyword = token(fp,tokenlen)) != NULL) + { + if (direction == 0) + gfi->charwidth = atoi(keyword); + } + keyword = token(fp,tokenlen); + /* ignore y-width for now */ + break; + case METRICSSETS: + keyword = token(fp,tokenlen); + break; /* ignore this for now */ + case NOPE: + default: + error = parseError; + break; + } /* switch */ + } /* while */ + + return(error); + +} /* parseGlobals */ + + +#if 0 +/************************* initializeArray ************************/ + +/* Unmapped character codes are (at Adobe Systems) assigned the + * width of the space character (if one exists) else they get the + * value of 250 ems. This function initializes all entries in the + * char widths array to have this value. Then any mapped character + * codes will be replaced with the width of the appropriate character + * when parsing the character metric section. + + * This function parses the Character Metrics Section looking + * for a space character (by comparing character names). If found, + * the width of the space character will be used to initialize the + * values in the array of character widths. + * + * Before returning, the position of the read/write pointer of the + * FileInputStream is reset to be where it was upon entering this function. + */ + +static int initializeArray( FileInputStream* fp, register int* cwi) +{ + bool cont = true, found = false; + unsigned int opos = fp->tell(); + int code = 0, width = 0, i = 0, error = 0, tokenlen; + register char *keyword; + + while (cont) + { + keyword = token(fp,tokenlen); + if (keyword == NULL) + { + error = earlyEOF; + break; /* get out of loop */ + } + switch(recognize(keyword,tokenlen)) + { + case COMMENT: + keyword = linetoken(fp); + break; + case CODE: + if ((keyword = token(fp,tokenlen)) != NULL) + code = atoi(keyword); + break; + case CODEHEX: + if ((keyword = token(fp,tokenlen)) != NULL) + sscanf(keyword,"<%x>", &code); + break; + case XWIDTH: + if ((keyword = token(fp,tokenlen)) != NULL) + width = atoi(keyword); + break; + case X0WIDTH: + (void) token(fp,tokenlen); + break; + case CHARNAME: + if ((keyword = token(fp,tokenlen)) != NULL) + if (MATCH(keyword, Space)) + { + cont = false; + found = true; + } + break; + case ENDCHARMETRICS: + cont = false; + break; + case ENDFONTMETRICS: + cont = false; + error = normalEOF; + break; + case NOPE: + default: + error = parseError; + break; + } /* switch */ + } /* while */ + + if (!found) + width = 250; + + for (i = 0; i < 256; ++i) + cwi[i] = width; + + fp->seek(opos); + + return(error); + +} /* initializeArray */ +#endif + +/************************* parseCharWidths **************************/ + +/* This function is called by "parseFile". It will parse the AFM file + * up to the "EndCharMetrics" keyword. It will save the character + * width info (as opposed to all of the character metric information) + * if requested by the caller of parseFile. Otherwise, it will just + * parse through the section without saving any information. + * + * If data is to be saved, parseCharWidths is passed in a pointer + * to an array of widths that has already been initialized by the + * standard value for unmapped character codes. This function parses + * the Character Metrics section only storing the width information + * for the encoded characters into the array using the character code + * as the index into that array. + * + * This function returns an error code specifying whether there was + * a premature EOF or a parsing error. This return value is used by + * parseFile to determine if there is more file to parse. + */ + +static int parseCharWidths( FileInputStream* fp, register int* cwi) +{ + bool cont = true, save = (cwi != NULL); + int pos = 0, error = ok, tokenlen; + register char *keyword; + + while (cont) + { + keyword = token(fp,tokenlen); + /* Have reached an early and unexpected EOF. */ + /* Set flag and stop parsing */ + if (keyword == NULL) + { + error = earlyEOF; + break; /* get out of loop */ + } + if (!save) + /* get tokens until the end of the Char Metrics section without */ + /* saving any of the data*/ + switch (recognize(keyword,tokenlen)) + { + case ENDCHARMETRICS: + cont = false; + break; + case ENDFONTMETRICS: + cont = false; + error = normalEOF; + break; + default: + break; + } /* switch */ + else + /* otherwise parse entire char metrics section, saving */ + /* only the char x-width info */ + switch(recognize(keyword,tokenlen)) + { + case COMMENT: + keyword = linetoken(fp); + break; + case CODE: + if ((keyword = token(fp,tokenlen)) != NULL) + pos = atoi(keyword); + break; + case XYWIDTH: + /* PROBLEM: Should be no Y-WIDTH when doing "quick & dirty" */ + keyword = token(fp,tokenlen); keyword = token(fp,tokenlen); /* eat values */ + error = parseError; + break; + case CODEHEX: + if ((keyword = token(fp,tokenlen)) != NULL) + sscanf(keyword, "<%x>", &pos); + break; + case X0WIDTH: + (void) token(fp,tokenlen); + break; + case XWIDTH: + if ((keyword = token(fp,tokenlen)) != NULL) + if (pos >= 0) /* ignore unmapped chars */ + cwi[pos] = atoi(keyword); + break; + case ENDCHARMETRICS: + cont = false; + break; + case ENDFONTMETRICS: + cont = false; + error = normalEOF; + break; + case CHARNAME: /* eat values (so doesn't cause parseError) */ + keyword = token(fp,tokenlen); + break; + case CHARBBOX: + keyword = token(fp,tokenlen); keyword = token(fp,tokenlen); + keyword = token(fp,tokenlen); keyword = token(fp,tokenlen); + break; + case LIGATURE: + keyword = token(fp,tokenlen); keyword = token(fp,tokenlen); + break; + case VVECTOR: + keyword = token(fp,tokenlen); + keyword = token(fp,tokenlen); + break; + case NOPE: + default: + error = parseError; + break; + } /* switch */ + } /* while */ + + return(error); + +} /* parseCharWidths */ + + +/* + * number of char metrics is almost allways inaccurate, so be gentle and try to + * adapt our internal storage by adjusting the allocated list + */ + +static int +reallocFontMetrics( void **pp_fontmetrics, int *p_oldcount, int n_newcount, unsigned int n_size ) +{ + char *p_tmpmetrics = NULL; + + if ((pp_fontmetrics == NULL) || (*pp_fontmetrics == NULL)) + return storageProblem; + + if (*p_oldcount == n_newcount) + return ok; + + p_tmpmetrics = (char*)realloc(*pp_fontmetrics, n_newcount * n_size); + if (p_tmpmetrics == NULL) + return storageProblem; + + if ( n_newcount > *p_oldcount ) + { + char *p_inimetrics = p_tmpmetrics + n_size * *p_oldcount; + int n_inimetrics = n_size * (n_newcount - *p_oldcount); + memset( p_inimetrics, 0, n_inimetrics ); + } + + *pp_fontmetrics = p_tmpmetrics; + *p_oldcount = n_newcount; + + return ok; +} + +static unsigned int +enlargeCount( unsigned int n_oldcount ) +{ + unsigned int n_newcount = n_oldcount + n_oldcount / 5; + if (n_oldcount == n_newcount ) + n_newcount = n_oldcount + 5; + + return n_newcount; +} + +/************************* parseCharMetrics ************************/ + +/* This function is called by parseFile if the caller of parseFile + * requested that all character metric information be saved + * (as opposed to only the character width information). + * + * parseCharMetrics is passed in a pointer to an array of records + * to hold information on a per character basis. This function + * parses the Character Metrics section storing all character + * metric information for the ALL characters (mapped and unmapped) + * into the array. + * + * This function returns an error code specifying whether there was + * a premature EOF or a parsing error. This return value is used by + * parseFile to determine if there is more file to parse. + */ + +static int parseCharMetrics( FileInputStream* fp, register FontInfo* fi) +{ + bool cont = true, firstTime = true; + int error = ok, count = 0, tokenlen; + register CharMetricInfo *temp = fi->cmi; + register char *keyword; + + while (cont) + { + keyword = token(fp,tokenlen); + if (keyword == NULL) + { + error = earlyEOF; + break; /* get out of loop */ + } + switch(recognize(keyword,tokenlen)) + { + case COMMENT: + keyword = linetoken(fp); + break; + case CODE: + if (!(count < fi->numOfChars)) + { + reallocFontMetrics( (void**)&(fi->cmi), + &(fi->numOfChars), enlargeCount(fi->numOfChars), + sizeof(CharMetricInfo) ); + temp = &(fi->cmi[ count - 1 ]); + } + if (count < fi->numOfChars) + { + if (firstTime) firstTime = false; + else temp++; + if ((keyword = token(fp,tokenlen)) != NULL) + temp->code = atoi(keyword); + if (fi->gfi && fi->gfi->charwidth) + temp->wx = fi->gfi->charwidth; + count++; + } + else + { + error = parseError; + cont = false; + } + break; + case CODEHEX: + if (!(count < fi->numOfChars )) + { + reallocFontMetrics( (void**)&(fi->cmi), + &(fi->numOfChars), enlargeCount(fi->numOfChars), + sizeof(CharMetricInfo) ); + temp = &(fi->cmi[ count - 1 ]); + } + if (count < fi->numOfChars) { + if (firstTime) + firstTime = false; + else + temp++; + if ((keyword = token(fp,tokenlen)) != NULL) + sscanf(keyword,"<%x>", &temp->code); + if (fi->gfi && fi->gfi->charwidth) + temp->wx = fi->gfi->charwidth; + count++; + } + else { + error = parseError; + cont = false; + } + break; + case XYWIDTH: + if ((keyword = token(fp,tokenlen)) != NULL) + temp->wx = atoi(keyword); + if ((keyword = token(fp,tokenlen)) != NULL) + temp->wy = atoi(keyword); + break; + case X0WIDTH: + if ((keyword = token(fp,tokenlen)) != NULL) + temp->wx = atoi(keyword); + break; + case XWIDTH: + if ((keyword = token(fp,tokenlen)) != NULL) + temp->wx = atoi(keyword); + break; + case CHARNAME: + if ((keyword = token(fp,tokenlen)) != NULL) + temp->name = (char *)strdup(keyword); + break; + case CHARBBOX: + if ((keyword = token(fp,tokenlen)) != NULL) + temp->charBBox.llx = atoi(keyword); + if ((keyword = token(fp,tokenlen)) != NULL) + temp->charBBox.lly = atoi(keyword); + if ((keyword = token(fp,tokenlen)) != NULL) + temp->charBBox.urx = atoi(keyword); + if ((keyword = token(fp,tokenlen)) != NULL) + temp->charBBox.ury = atoi(keyword); + break; + case LIGATURE: { + Ligature **tail = &(temp->ligs); + Ligature *node = *tail; + + if (*tail != NULL) + { + while (node->next != NULL) + node = node->next; + tail = &(node->next); + } + + *tail = (Ligature *) calloc(1, sizeof(Ligature)); + if ((keyword = token(fp,tokenlen)) != NULL) + (*tail)->succ = (char *)strdup(keyword); + if ((keyword = token(fp,tokenlen)) != NULL) + (*tail)->lig = (char *)strdup(keyword); + break; } + case ENDCHARMETRICS: + cont = false;; + break; + case ENDFONTMETRICS: + cont = false; + error = normalEOF; + break; + case VVECTOR: + keyword = token(fp,tokenlen); + keyword = token(fp,tokenlen); + break; + case NOPE: + default: + error = parseError; + break; + } /* switch */ + } /* while */ + + if ((error == ok) && (count != fi->numOfChars)) + error = reallocFontMetrics( (void**)&(fi->cmi), &(fi->numOfChars), + count, sizeof(CharMetricInfo) ); + + if ((error == ok) && (count != fi->numOfChars)) + error = parseError; + + return(error); + +} /* parseCharMetrics */ + + + +/************************* parseTrackKernData ***********************/ + +/* This function is called by "parseFile". It will parse the AFM file + * up to the "EndTrackKern" or "EndKernData" keywords. It will save the + * track kerning data if requested by the caller of parseFile. + * + * parseTrackKernData is passed in a pointer to the FontInfo record. + * If data is to be saved, the FontInfo record will already contain + * a valid pointer to storage for the track kerning data. + * + * This function returns an error code specifying whether there was + * a premature EOF or a parsing error. This return value is used by + * parseFile to determine if there is more file to parse. + */ + +static int parseTrackKernData( FileInputStream* fp, register FontInfo* fi) +{ + bool cont = true, save = (fi->tkd != NULL); + int pos = 0, error = ok, tcount = 0, tokenlen; + register char *keyword; + + while (cont) + { + keyword = token(fp,tokenlen); + + if (keyword == NULL) + { + error = earlyEOF; + break; /* get out of loop */ + } + if (!save) + /* get tokens until the end of the Track Kerning Data */ + /* section without saving any of the data */ + switch(recognize(keyword,tokenlen)) + { + case ENDTRACKKERN: + case ENDKERNDATA: + cont = false; + break; + case ENDFONTMETRICS: + cont = false; + error = normalEOF; + break; + default: + break; + } /* switch */ + else + /* otherwise parse entire Track Kerning Data section, */ + /* saving the data */ + switch(recognize(keyword,tokenlen)) + { + case COMMENT: + keyword = linetoken(fp); + break; + case TRACKKERN: + if (!(tcount < fi->numOfTracks)) + { + reallocFontMetrics( (void**)&(fi->tkd), &(fi->numOfTracks), + enlargeCount(fi->numOfTracks), sizeof(TrackKernData) ); + } + + if (tcount < fi->numOfTracks) + { + if ((keyword = token(fp,tokenlen)) != NULL) + fi->tkd[pos].degree = atoi(keyword); + if ((keyword = token(fp,tokenlen)) != NULL) + fi->tkd[pos].minPtSize = StringToDouble(keyword); + if ((keyword = token(fp,tokenlen)) != NULL) + fi->tkd[pos].minKernAmt = StringToDouble(keyword); + if ((keyword = token(fp,tokenlen)) != NULL) + fi->tkd[pos].maxPtSize = StringToDouble(keyword); + if ((keyword = token(fp,tokenlen)) != NULL) + fi->tkd[pos++].maxKernAmt = StringToDouble(keyword); + tcount++; + } + else + { + error = parseError; + cont = false; + } + break; + case ENDTRACKKERN: + case ENDKERNDATA: + cont = false; + break; + case ENDFONTMETRICS: + cont = false; + error = normalEOF; + break; + case NOPE: + default: + error = parseError; + break; + } /* switch */ + } /* while */ + + if (error == ok && tcount != fi->numOfTracks) + error = reallocFontMetrics( (void**)&(fi->tkd), &(fi->numOfTracks), + tcount, sizeof(TrackKernData) ); + + if (error == ok && tcount != fi->numOfTracks) + error = parseError; + + return(error); + +} /* parseTrackKernData */ + + +/************************* parsePairKernData ************************/ + +/* This function is called by "parseFile". It will parse the AFM file + * up to the "EndKernPairs" or "EndKernData" keywords. It will save + * the pair kerning data if requested by the caller of parseFile. + * + * parsePairKernData is passed in a pointer to the FontInfo record. + * If data is to be saved, the FontInfo record will already contain + * a valid pointer to storage for the pair kerning data. + * + * This function returns an error code specifying whether there was + * a premature EOF or a parsing error. This return value is used by + * parseFile to determine if there is more file to parse. + */ + +static int parsePairKernData( FileInputStream* fp, register FontInfo* fi) +{ + bool cont = true, save = (fi->pkd != NULL); + int pos = 0, error = ok, pcount = 0, tokenlen; + register char *keyword; + + while (cont) + { + keyword = token(fp,tokenlen); + + if (keyword == NULL) + { + error = earlyEOF; + break; /* get out of loop */ + } + if (!save) + /* get tokens until the end of the Pair Kerning Data */ + /* section without saving any of the data */ + switch(recognize(keyword,tokenlen)) + { + case ENDKERNPAIRS: + case ENDKERNDATA: + cont = false; + break; + case ENDFONTMETRICS: + cont = false; + error = normalEOF; + break; + default: + break; + } /* switch */ + else + /* otherwise parse entire Pair Kerning Data section, */ + /* saving the data */ + switch(recognize(keyword,tokenlen)) + { + case COMMENT: + keyword = linetoken(fp); + break; + case KERNPAIR: + if (!(pcount < fi->numOfPairs)) + { + reallocFontMetrics( (void**)&(fi->pkd), &(fi->numOfPairs), + enlargeCount(fi->numOfPairs), sizeof(PairKernData) ); + } + if (pcount < fi->numOfPairs) + { + if ((keyword = token(fp,tokenlen)) != NULL) + fi->pkd[pos].name1 = strdup( keyword ); + if ((keyword = token(fp,tokenlen)) != NULL) + fi->pkd[pos].name2 = strdup( keyword ); + if ((keyword = token(fp,tokenlen)) != NULL) + fi->pkd[pos].xamt = atoi(keyword); + if ((keyword = token(fp,tokenlen)) != NULL) + fi->pkd[pos++].yamt = atoi(keyword); + pcount++; + } + else + { + error = parseError; + cont = false; + } + break; + case KERNPAIRXAMT: + if (!(pcount < fi->numOfPairs)) + { + reallocFontMetrics( (void**)&(fi->pkd), &(fi->numOfPairs), + enlargeCount(fi->numOfPairs), sizeof(PairKernData) ); + } + if (pcount < fi->numOfPairs) + { + if ((keyword = token(fp,tokenlen)) != NULL) + fi->pkd[pos].name1 = strdup( keyword ); + if ((keyword = token(fp,tokenlen)) != NULL) + fi->pkd[pos].name2 = strdup( keyword ); + if ((keyword = token(fp,tokenlen)) != NULL) + fi->pkd[pos++].xamt = atoi(keyword); + pcount++; + } + else + { + error = parseError; + cont = false; + } + break; + case ENDKERNPAIRS: + case ENDKERNDATA: + cont = false; + break; + case ENDFONTMETRICS: + cont = false; + error = normalEOF; + break; + case NOPE: + default: + error = parseError; + break; + } /* switch */ + } /* while */ + + if ((error == ok) && (pcount != fi->numOfPairs)) + error = reallocFontMetrics( (void**)&(fi->pkd), &(fi->numOfPairs), + pcount, sizeof(PairKernData) ); + + if (error == ok && pcount != fi->numOfPairs) + error = parseError; + + return(error); + +} /* parsePairKernData */ + + +/************************* parseCompCharData **************************/ + +/* This function is called by "parseFile". It will parse the AFM file + * up to the "EndComposites" keyword. It will save the composite + * character data if requested by the caller of parseFile. + * + * parseCompCharData is passed in a pointer to the FontInfo record, and + * a boolean representing if the data should be saved. + * + * This function will create the appropriate amount of storage for + * the composite character data and store a pointer to the storage + * in the FontInfo record. + * + * This function returns an error code specifying whether there was + * a premature EOF or a parsing error. This return value is used by + * parseFile to determine if there is more file to parse. + */ + +static int parseCompCharData( FileInputStream* fp, register FontInfo* fi) +{ + bool cont = true, firstTime = true, save = (fi->ccd != NULL); + int pos = 0, j = 0, error = ok, ccount = 0, pcount = 0, tokenlen; + register char *keyword; + + while (cont) + { + keyword = token(fp,tokenlen); + if (keyword == NULL) + /* Have reached an early and unexpected EOF. */ + /* Set flag and stop parsing */ + { + error = earlyEOF; + break; /* get out of loop */ + } + if (ccount > fi->numOfComps) + { + reallocFontMetrics( (void**)&(fi->ccd), &(fi->numOfComps), + enlargeCount(fi->numOfComps), sizeof(CompCharData) ); + } + if (ccount > fi->numOfComps) + { + error = parseError; + break; /* get out of loop */ + } + if (!save) + /* get tokens until the end of the Composite Character info */ + /* section without saving any of the data */ + switch(recognize(keyword,tokenlen)) + { + case ENDCOMPOSITES: + cont = false; + break; + case ENDFONTMETRICS: + cont = false; + error = normalEOF; + break; + case COMMENT: + case COMPCHAR: + keyword = linetoken(fp); + break; + default: + break; + } /* switch */ + else + /* otherwise parse entire Composite Character info section, */ + /* saving the data */ + switch(recognize(keyword,tokenlen)) + { + case COMMENT: + keyword = linetoken(fp); + break; + case COMPCHAR: + if (!(ccount < fi->numOfComps)) + { + reallocFontMetrics( (void**)&(fi->ccd), &(fi->numOfComps), + enlargeCount(fi->numOfComps), sizeof(CompCharData) ); + } + if (ccount < fi->numOfComps) + { + keyword = token(fp,tokenlen); + if (pcount != fi->ccd[pos].numOfPieces) + error = parseError; + pcount = 0; + if (firstTime) firstTime = false; + else pos++; + fi->ccd[pos].ccName = strdup( keyword ); + if ((keyword = token(fp,tokenlen)) != NULL) + fi->ccd[pos].numOfPieces = atoi(keyword); + fi->ccd[pos].pieces = (Pcc *) + calloc(fi->ccd[pos].numOfPieces, sizeof(Pcc)); + j = 0; + ccount++; + } + else + { + error = parseError; + cont = false; + } + break; + case COMPCHARPIECE: + if (pcount < fi->ccd[pos].numOfPieces) + { + if ((keyword = token(fp,tokenlen)) != NULL) + fi->ccd[pos].pieces[j].pccName = strdup( keyword ); + if ((keyword = token(fp,tokenlen)) != NULL) + fi->ccd[pos].pieces[j].deltax = atoi(keyword); + if ((keyword = token(fp,tokenlen)) != NULL) + fi->ccd[pos].pieces[j++].deltay = atoi(keyword); + pcount++; + } + else + error = parseError; + break; + case ENDCOMPOSITES: + cont = false; + break; + case ENDFONTMETRICS: + cont = false; + error = normalEOF; + break; + case NOPE: + default: + error = parseError; + break; + } /* switch */ + } /* while */ + + if (error == ok && ccount != fi->numOfComps) + reallocFontMetrics( (void**)&(fi->ccd), &(fi->numOfComps), + ccount, sizeof(CompCharData) ); + + if (error == ok && ccount != fi->numOfComps) + error = parseError; + + return(error); + +} /* parseCompCharData */ + + + + +/*************************** 'PUBLIC' FUNCTION ********************/ + + +/*************************** parseFile *****************************/ + +/* parseFile is the only 'public' procedure available. It is called + * from an application wishing to get information from an AFM file. + * The caller of this function is responsible for locating and opening + * an AFM file and handling all errors associated with that task. + * + * parseFile expects 3 parameters: a filename pointer, a pointer + * to a (FontInfo *) variable (for which storage will be allocated and + * the data requested filled in), and a mask specifying which + * data from the AFM file should be saved in the FontInfo structure. + * + * The file will be parsed and the requested data will be stored in + * a record of type FontInfo (refer to ParseAFM.h). + * + * parseFile returns an error code as defined in parseAFM.h. + * + * The position of the read/write pointer associated with the file + * pointer upon return of this function is undefined. + */ + +int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags) +{ + FileInputStream aFile( pFilename ); + + int code = ok; /* return code from each of the parsing routines */ + int error = ok; /* used as the return code from this function */ + int tokenlen; + + register char *keyword; /* used to store a token */ + + + (*fi) = (FontInfo *) calloc(1, sizeof(FontInfo)); + if ((*fi) == NULL) {error = storageProblem; return(error);} + + if (flags & P_G) + { + (*fi)->gfi = (GlobalFontInfo *) calloc(1, sizeof(GlobalFontInfo)); + if ((*fi)->gfi == NULL) {error = storageProblem; return(error);} + } + + /* The AFM file begins with Global Font Information. This section */ + /* will be parsed whether or not information should be saved. */ + code = parseGlobals(&aFile, (*fi)->gfi); + + if (code < 0) error = code; + + /* The Global Font Information is followed by the Character Metrics */ + /* section. Which procedure is used to parse this section depends on */ + /* how much information should be saved. If all of the metrics info */ + /* is wanted, parseCharMetrics is called. If only the character widths */ + /* is wanted, parseCharWidths is called. parseCharWidths will also */ + /* be called in the case that no character data is to be saved, just */ + /* to parse through the section. */ + + if ((code != normalEOF) && (code != earlyEOF)) + { + if ((keyword = token(&aFile,tokenlen)) != NULL) + (*fi)->numOfChars = atoi(keyword); + if (flags & (P_M ^ P_W)) + { + (*fi)->cmi = (CharMetricInfo *) + calloc((*fi)->numOfChars, sizeof(CharMetricInfo)); + if ((*fi)->cmi == NULL) {error = storageProblem; return(error);} + code = parseCharMetrics(&aFile, *fi); + } + else + { + if (flags & P_W) + { + (*fi)->cwi = (int *) calloc(256, sizeof(int)); + if ((*fi)->cwi == NULL) + { + error = storageProblem; + return(error); + } + } + /* parse section regardless */ + code = parseCharWidths(&aFile, (*fi)->cwi); + } /* else */ + } /* if */ + + if ((error != earlyEOF) && (code < 0)) error = code; + + /* The remaining sections of the AFM are optional. This code will */ + /* look at the next keyword in the file to determine what section */ + /* is next, and then allocate the appropriate amount of storage */ + /* for the data (if the data is to be saved) and call the */ + /* appropriate parsing routine to parse the section. */ + + while ((code != normalEOF) && (code != earlyEOF)) + { + keyword = token(&aFile,tokenlen); + if (keyword == NULL) + /* Have reached an early and unexpected EOF. */ + /* Set flag and stop parsing */ + { + code = earlyEOF; + break; /* get out of loop */ + } + switch(recognize(keyword,tokenlen)) + { + case STARTKERNDATA: + break; + case ENDKERNDATA: + break; + case STARTTRACKKERN: + keyword = token(&aFile,tokenlen); + if ((flags & P_T) && keyword) + { + (*fi)->numOfTracks = atoi(keyword); + (*fi)->tkd = (TrackKernData *) + calloc((*fi)->numOfTracks, sizeof(TrackKernData)); + if ((*fi)->tkd == NULL) + { + error = storageProblem; + return(error); + } + } /* if */ + code = parseTrackKernData(&aFile, *fi); + break; + case STARTKERNPAIRS: + keyword = token(&aFile,tokenlen); + if ((flags & P_P) && keyword) + { + (*fi)->numOfPairs = atoi(keyword); + (*fi)->pkd = (PairKernData *) + calloc((*fi)->numOfPairs, sizeof(PairKernData)); + if ((*fi)->pkd == NULL) + { + error = storageProblem; + return(error); + } + } /* if */ + code = parsePairKernData(&aFile, *fi); + break; + case STARTCOMPOSITES: + keyword = token(&aFile,tokenlen); + if ((flags & P_C) && keyword) + { + (*fi)->numOfComps = atoi(keyword); + (*fi)->ccd = (CompCharData *) + calloc((*fi)->numOfComps, sizeof(CompCharData)); + if ((*fi)->ccd == NULL) + { + error = storageProblem; + return(error); + } + } /* if */ + code = parseCompCharData(&aFile, *fi); + break; + case ENDFONTMETRICS: + code = normalEOF; + break; + case COMMENT: + linetoken(&aFile); + break; + case NOPE: + default: + code = parseError; + break; + } /* switch */ + + if ((error != earlyEOF) && (code < 0)) error = code; + + } /* while */ + + if ((error != earlyEOF) && (code < 0)) error = code; + + return(error); + +} /* parseFile */ + +void +freeFontInfo (FontInfo *fi) +{ + int i, j; + + if (fi->gfi) + { + free (fi->gfi->afmVersion); + free (fi->gfi->fontName); + free (fi->gfi->fullName); + free (fi->gfi->familyName); + free (fi->gfi->weight); + free (fi->gfi->version); + free (fi->gfi->notice); + free (fi->gfi->encodingScheme); + free (fi->gfi); + } + + free (fi->cwi); + + if (fi->cmi) + { + for (i = 0; i < fi->numOfChars; i++) + { + Ligature *ligs; + free (fi->cmi[i].name); + ligs = fi->cmi[i].ligs; + while (ligs) + { + Ligature *tmp; + tmp = ligs; + ligs = ligs->next; + free (tmp->succ); + free (tmp->lig); + free (tmp); + } + } + free (fi->cmi); + } + + free (fi->tkd); + + if (fi->pkd) + { + for ( i = 0; i < fi->numOfPairs; i++) + { + free (fi->pkd[i].name1); + free (fi->pkd[i].name2); + } + free (fi->pkd); + } + + if (fi->ccd) + { + for (i = 0; i < fi->numOfComps; i++) + { + free (fi->ccd[i].ccName); + for (j = 0; j < fi->ccd[i].numOfPieces; j++) + free (fi->ccd[i].pieces[j].pccName); + + free (fi->ccd[i].pieces); + } + free (fi->ccd); + } + + free (fi); +} + +} // namspace diff --git a/vcl/unx/generic/fontmanager/parseAFM.hxx b/vcl/unx/generic/fontmanager/parseAFM.hxx new file mode 100644 index 000000000000..cfebde696c14 --- /dev/null +++ b/vcl/unx/generic/fontmanager/parseAFM.hxx @@ -0,0 +1,334 @@ +/* + * (C) 1988, 1989 by Adobe Systems Incorporated. All rights reserved. + * + * This file may be freely copied and redistributed as long as: + * 1) This entire notice continues to be included in the file, + * 2) If the file has been modified in any way, a notice of such + * modification is conspicuously indicated. + * + * PostScript, Display PostScript, and Adobe are registered trademarks of + * Adobe Systems Incorporated. + * + * ************************************************************************ + * THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO CHANGE WITHOUT + * NOTICE, AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY ADOBE SYSTEMS + * INCORPORATED. ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY OR + * LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO WARRANTY OF ANY + * KIND (EXPRESS, IMPLIED OR STATUTORY) WITH RESPECT TO THIS INFORMATION, + * AND EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. + * ************************************************************************ + */ + +/* + * Changes made for OpenOffice.org + * + * 10/24/2000 pl - changed code to compile with c++-compilers + * - added namespace to avoid symbol clashes + * - replaced BOOL by bool + * - added function to free space allocated by parseFile + * 10/26/2000 pl - added additional keys + * - added ability to parse slightly broken files + * - added charwidth member to GlobalFontInfo + * 04/26/2001 pl - added OpenOffice header + * 10/19/2005 pl - changed parseFile to accept a file name instead of a stream + */ + +/* ParseAFM.h + * + * This header file is used in conjuction with the parseAFM.c file. + * Together these files provide the functionality to parse Adobe Font + * Metrics files and store the information in predefined data structures. + * It is intended to work with an application program that needs font metric + * information. The program can be used as is by making a procedure call to + * parse an AFM file and have the data stored, or an application developer + * may wish to customize the code. + * + * This header file defines the data structures used as well as the key + * strings that are currently recognized by this version of the AFM parser. + * This program is based on the document "Adobe Font Metrics Files, + * Specification Version 2.0". + * + * AFM files are separated into distinct sections of different data. Because + * of this, the parseAFM program can parse a specified file to only save + * certain sections of information based on the application's needs. A record + * containing the requested information will be returned to the application. + * + * AFM files are divided into five sections of data: + * 1) The Global Font Information + * 2) The Character Metrics Information + * 3) The Track Kerning Data + * 4) The Pair-Wise Kerning Data + * 5) The Composite Character Data + * + * Basically, the application can request any of these sections independent + * of what other sections are requested. In addition, in recognizing that + * many applications will want ONLY the x-width of characters and not all + * of the other character metrics information, there is a way to receive + * only the width information so as not to pay the storage cost for the + * unwanted data. An application should never request both the + * "quick and dirty" char metrics (widths only) and the Character Metrics + * Information since the Character Metrics Information will contain all + * of the character widths as well. + * + * There is a procedure in parseAFM.c, called parseFile, that can be + * called from any application wishing to get information from the AFM File. + * This procedure expects 3 parameters: a vaild file descriptor, a pointer + * to a (FontInfo *) variable (for which space will be allocated and then + * will be filled in with the data requested), and a mask specifying + * which data from the AFM File should be saved in the FontInfo structure. + * + * The flags that can be used to set the appropriate mask are defined below. + * In addition, several commonly used masks have already been defined. + * + * History: + * original: DSM Thu Oct 20 17:39:59 PDT 1988 + * modified: DSM Mon Jul 3 14:17:50 PDT 1989 + * - added 'storageProblem' return code + * - fixed typos + */ + +#include + +namespace psp { + +/* your basic constants */ +#define EOL '\n' /* end-of-line indicator */ +#define MAX_NAME 4096 /* max length for identifiers */ +#define FLAGS int + + + +/* Flags that can be AND'ed together to specify exactly what + * information from the AFM file should be saved. + */ +#define P_G 0x01 /* 0000 0001 */ /* Global Font Info */ +#define P_W 0x02 /* 0000 0010 */ /* Character Widths ONLY */ +#define P_M 0x06 /* 0000 0110 */ /* All Char Metric Info */ +#define P_P 0x08 /* 0000 1000 */ /* Pair Kerning Info */ +#define P_T 0x10 /* 0001 0000 */ /* Track Kerning Info */ +#define P_C 0x20 /* 0010 0000 */ /* Composite Char Info */ + + +/* Commonly used flags + */ +#define P_GW (P_G | P_W) +#define P_GM (P_G | P_M) +#define P_GMP (P_G | P_M | P_P) +#define P_GMK (P_G | P_M | P_P | P_T) +#define P_ALL (P_G | P_M | P_P | P_T | P_C) + + + +/* Possible return codes from the parseFile procedure. + * + * ok means there were no problems parsing the file. + * + * parseError means that there was some kind of parsing error, but the + * parser went on. This could include problems like the count for any given + * section does not add up to how many entries there actually were, or + * there was a key that was not recognized. The return record may contain + * vaild data or it may not. + * + * earlyEOF means that an End of File was encountered before expected. This + * may mean that the AFM file had been truncated, or improperly formed. + * + * storageProblem means that there were problems allocating storage for + * the data structures that would have contained the AFM data. + */ + +enum afmError { ok = 0, parseError = -1, earlyEOF = -2, storageProblem = -3 }; + + +/************************* TYPES *********************************/ +/* Below are all of the data structure definitions. These structures + * try to map as closely as possible to grouping and naming of data + * in the AFM Files. + */ + + +/* Bounding box definition. Used for the Font BBox as well as the + * Character BBox. + */ +typedef struct +{ + int llx; /* lower left x-position */ + int lly; /* lower left y-position */ + int urx; /* upper right x-position */ + int ury; /* upper right y-position */ +} BBox; + + +/* Global Font information. + * The key that each field is associated with is in comments. For an + * explanation about each key and its value please refer to the AFM + * documentation (full title & version given above). + */ +typedef struct +{ + char *afmVersion; /* key: StartFontMetrics */ + char *fontName; /* key: FontName */ + char *fullName; /* key: FullName */ + char *familyName; /* key: FamilyName */ + char *weight; /* key: Weight */ + float italicAngle; /* key: ItalicAngle */ + bool isFixedPitch; /* key: IsFixedPitch */ + BBox fontBBox; /* key: FontBBox */ + int underlinePosition; /* key: UnderlinePosition */ + int underlineThickness; /* key: UnderlineThickness */ + char *version; /* key: Version */ + char *notice; /* key: Notice */ + char *encodingScheme; /* key: EncodingScheme */ + int capHeight; /* key: CapHeight */ + int xHeight; /* key: XHeight */ + int ascender; /* key: Ascender */ + int descender; /* key: Descender */ + int charwidth; /* key: CharWidth */ +} GlobalFontInfo; + + +/* Ligature definition is a linked list since any character can have + * any number of ligatures. + */ +typedef struct _t_ligature +{ + char *succ, *lig; + struct _t_ligature *next; +} Ligature; + + +/* Character Metric Information. This structure is used only if ALL + * character metric information is requested. If only the character + * widths is requested, then only an array of the character x-widths + * is returned. + * + * The key that each field is associated with is in comments. For an + * explanation about each key and its value please refer to the + * Character Metrics section of the AFM documentation (full title + * & version given above). + */ +typedef struct +{ + int code, /* key: C */ + wx, /* key: WX */ + w0x, /* key: W0X */ + wy; /* together wx and wy are associated with key: W */ + char *name; /* key: N */ + BBox charBBox; /* key: B */ + Ligature *ligs; /* key: L (linked list; not a fixed number of Ls */ +} CharMetricInfo; + + +/* Track kerning data structure. + * The fields of this record are the five values associated with every + * TrackKern entry. + * + * For an explanation about each value please refer to the + * Track Kerning section of the AFM documentation (full title + * & version given above). + */ +typedef struct +{ + int degree; + float minPtSize, + minKernAmt, + maxPtSize, + maxKernAmt; +} TrackKernData; + + +/* Pair Kerning data structure. + * The fields of this record are the four values associated with every + * KP entry. For KPX entries, the yamt will be zero. + * + * For an explanation about each value please refer to the + * Pair Kerning section of the AFM documentation (full title + * & version given above). + */ +typedef struct +{ + char *name1; + char *name2; + int xamt, + yamt; +} PairKernData; + + +/* PCC is a piece of a composite character. This is a sub structure of a + * compCharData described below. + * These fields will be filled in with the values from the key PCC. + * + * For an explanation about each key and its value please refer to the + * Composite Character section of the AFM documentation (full title + * & version given above). + */ +typedef struct +{ + char *pccName; + int deltax, + deltay; +} Pcc; + + +/* Composite Character Information data structure. + * The fields ccName and numOfPieces are filled with the values associated + * with the key CC. The field pieces points to an array (size = numOfPieces) + * of information about each of the parts of the composite character. That + * array is filled in with the values from the key PCC. + * + * For an explanation about each key and its value please refer to the + * Composite Character section of the AFM documentation (full title + * & version given above). + */ +typedef struct +{ + char *ccName; + int numOfPieces; + Pcc *pieces; +} CompCharData; + + +/* FontInfo + * Record type containing pointers to all of the other data + * structures containing information about a font. + * A a record of this type is filled with data by the + * parseFile function. + */ +typedef struct +{ + GlobalFontInfo *gfi; /* ptr to a GlobalFontInfo record */ + int *cwi; /* ptr to 256 element array of just char widths */ + int numOfChars; /* number of entries in char metrics array */ + CharMetricInfo *cmi; /* ptr to char metrics array */ + int numOfTracks; /* number to entries in track kerning array */ + TrackKernData *tkd; /* ptr to track kerning array */ + int numOfPairs; /* number to entries in pair kerning array */ + PairKernData *pkd; /* ptr to pair kerning array */ + int numOfComps; /* number to entries in comp char array */ + CompCharData *ccd; /* ptr to comp char array */ +} FontInfo; + + + +/************************* PROCEDURES ****************************/ + +/* Call this procedure to do the grunt work of parsing an AFM file. + * + * "fp" should be a valid file pointer to an AFM file. + * + * "fi" is a pointer to a pointer to a FontInfo record sturcture + * (defined above). Storage for the FontInfo structure will be + * allocated in parseFile and the structure will be filled in + * with the requested data from the AFM File. + * + * "flags" is a mask with bits set representing what data should + * be saved. Defined above are valid flags that can be used to set + * the mask, as well as a few commonly used masks. + * + * The possible return codes from parseFile are defined above. + */ + +int parseFile( const char* pFilename, FontInfo **fi, FLAGS flags ); +void freeFontInfo(FontInfo *fi); + +} // namespace diff --git a/vcl/unx/generic/gdi/cdeint.cxx b/vcl/unx/generic/gdi/cdeint.cxx new file mode 100644 index 000000000000..553338b37194 --- /dev/null +++ b/vcl/unx/generic/gdi/cdeint.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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_vcl.hxx" + +#include +#include +#include + +#include +#include + +#include + +#include +#include +#include + +CDEIntegrator::CDEIntegrator() +{ + meType = DtCDE; +} + +CDEIntegrator::~CDEIntegrator() +{ +} + +static int getHexDigit( const char c ) +{ + if( c >= '0' && c <= '9' ) + return (int)(c-'0'); + else if( c >= 'a' && c <= 'f' ) + return (int)(c-'a'+10); + else if( c >= 'A' && c <= 'F' ) + return (int)(c-'A'+10); + return -1; +} + + +void CDEIntegrator::GetSystemLook( AllSettings& rSettings ) +{ + static Color aColors[ 8 ]; + static sal_Bool bRead = sal_False; + static sal_Bool bValid = sal_False; + + if( ! bRead ) + { + // get used palette from xrdb + char **ppStringList = 0; + int nStringCount; + XTextProperty aTextProperty; + aTextProperty.value = 0; + int i; + + static Atom nResMgrAtom = XInternAtom( mpDisplay, "RESOURCE_MANAGER", False ); + + if( XGetTextProperty( mpDisplay, + RootWindow( mpDisplay, 0 ), + &aTextProperty, + nResMgrAtom ) + && aTextProperty.value + && XTextPropertyToStringList( &aTextProperty, &ppStringList, &nStringCount ) + ) + { + // format of ColorPalette resource: + // *n*ColorPalette: palettefile + + ByteString aLines; + for( i=0; i < nStringCount; i++ ) + aLines += ppStringList[i]; + for( i = aLines.GetTokenCount( '\n' )-1; i >= 0; i-- ) + { + ByteString aLine = aLines.GetToken( i, '\n' ); + int nIndex = aLine.Search( "ColorPalette" ); + if( nIndex != STRING_NOTFOUND ) + { + int nPos = nIndex; + + nIndex+=12; + const char* pStr = aLine.GetBuffer() +nIndex; + while( *pStr && isspace( *pStr ) && *pStr != ':' ) + { + pStr++; + nIndex++; + } + if( *pStr != ':' ) + continue; + pStr++, nIndex++; + for( ; *pStr && isspace( *pStr ); pStr++, nIndex++ ) + ; + if( ! *pStr ) + continue; + int nIndex2 = nIndex; + for( ; *pStr && ! isspace( *pStr ); pStr++, nIndex2++ ) + ; + ByteString aPaletteFile( aLine.Copy( nIndex, nIndex2 - nIndex ) ); + // extract number before ColorPalette; + for( ; nPos >= 0 && aLine.GetChar( nPos ) != '*'; nPos-- ) + ; + nPos--; + for( ; nPos >= 0 && aLine.GetChar( nPos ) != '*'; nPos-- ) + ; + int nNumber = aLine.Copy( ++nPos ).ToInt32(); + + DBG_TRACE2( "found palette %d in resource \"%s\"", nNumber, aLine.GetBuffer() ); + + // found no documentation what this number actually means; + // might be the screen number. 0 seems to be the right one + // in most cases. + if( nNumber ) + continue; + + DBG_TRACE1( "Palette file is \"%s\".\n", aPaletteFile.GetBuffer() ); + + String aPath( aHomeDir ); + aPath.AppendAscii( "/.dt/palettes/" ); + aPath += String( aPaletteFile, gsl_getSystemTextEncoding() ); + + SvFileStream aStream( aPath, STREAM_READ ); + if( ! aStream.IsOpen() ) + { + aPath = String::CreateFromAscii( "/usr/dt/palettes/" ); + aPath += String( aPaletteFile, gsl_getSystemTextEncoding() ); + aStream.Open( aPath, STREAM_READ ); + if( ! aStream.IsOpen() ) + continue; + } + + ByteString aBuffer; + for( nIndex = 0; nIndex < 8; nIndex++ ) + { + aStream.ReadLine( aBuffer ); + // format is "#RRRRGGGGBBBB" + + DBG_TRACE1( "\t\"%s\".\n", aBuffer.GetBuffer() ); + + if( aBuffer.Len() ) + { + const char* pArr = (const char*)aBuffer.GetBuffer()+1; + aColors[nIndex] = Color( + getHexDigit( pArr[1] ) + | ( getHexDigit( pArr[0] ) << 4 ), + getHexDigit( pArr[5] ) + | ( getHexDigit( pArr[4] ) << 4 ), + getHexDigit( pArr[9] ) + | ( getHexDigit( pArr[8] ) << 4 ) + ); + + DBG_TRACE1( "\t\t%lx\n", aColors[nIndex].GetColor() ); + } + } + + bValid = sal_True; + break; + } + } + } + + if( ppStringList ) + XFreeStringList( ppStringList ); + if( aTextProperty.value ) + XFree( aTextProperty.value ); + } + + + StyleSettings aStyleSettings = rSettings.GetStyleSettings(); + // #i48001# set a default blink rate + aStyleSettings.SetCursorBlinkTime( 500 ); + if (bValid) + { + aStyleSettings.SetActiveColor( aColors[0] ); + aStyleSettings.SetActiveColor2( aColors[0] ); + aStyleSettings.SetActiveBorderColor( aColors[0] ); + + aStyleSettings.SetDeactiveColor( aColors[0] ); + aStyleSettings.SetDeactiveColor2( aColors[0] ); + aStyleSettings.SetDeactiveBorderColor( aColors[0] ); + + Color aActive = + aColors[ 0 ].GetBlue() < 128 || + aColors[ 0 ].GetGreen() < 128 || + aColors[ 0 ].GetRed() < 128 + ? Color( COL_WHITE ) : Color( COL_BLACK ); + Color aDeactive = + aColors[ 1 ].GetBlue() < 128 || + aColors[ 1 ].GetGreen() < 128 || + aColors[ 1 ].GetRed() < 128 + ? Color( COL_WHITE ) : Color( COL_BLACK ); + aStyleSettings.SetActiveTextColor( aActive ); + aStyleSettings.SetDeactiveTextColor( aDeactive ); + + aStyleSettings.SetDialogTextColor( aDeactive ); + aStyleSettings.SetMenuTextColor( aDeactive ); + aStyleSettings.SetMenuBarTextColor( aDeactive ); + aStyleSettings.SetButtonTextColor( aDeactive ); + aStyleSettings.SetRadioCheckTextColor( aDeactive ); + aStyleSettings.SetGroupTextColor( aDeactive ); + aStyleSettings.SetLabelTextColor( aDeactive ); + aStyleSettings.SetInfoTextColor( aDeactive ); + + aStyleSettings.Set3DColors( aColors[1] ); + aStyleSettings.SetFaceColor( aColors[1] ); + aStyleSettings.SetDialogColor( aColors[1] ); + aStyleSettings.SetMenuColor( aColors[1] ); + aStyleSettings.SetMenuBarColor( aColors[1] ); + if ( aStyleSettings.GetFaceColor() == COL_LIGHTGRAY ) + aStyleSettings.SetCheckedColor( Color( 0xCC, 0xCC, 0xCC ) ); + else + { + // calculate Checked color + Color aColor2 = aStyleSettings.GetLightColor(); + BYTE nRed = (BYTE)(((USHORT)aColors[1].GetRed() + (USHORT)aColor2.GetRed())/2); + BYTE nGreen = (BYTE)(((USHORT)aColors[1].GetGreen() + (USHORT)aColor2.GetGreen())/2); + BYTE nBlue = (BYTE)(((USHORT)aColors[1].GetBlue() + (USHORT)aColor2.GetBlue())/2); + aStyleSettings.SetCheckedColor( Color( nRed, nGreen, nBlue ) ); + } + } + rSettings.SetStyleSettings( aStyleSettings ); +} diff --git a/vcl/unx/generic/gdi/dtint.cxx b/vcl/unx/generic/gdi/dtint.cxx new file mode 100644 index 000000000000..d14389cd0438 --- /dev/null +++ b/vcl/unx/generic/gdi/dtint.cxx @@ -0,0 +1,139 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include +#include +#include +#include + +#include "osl/file.h" +#include "osl/process.h" +#include "osl/security.h" + +#include "vcl/svapp.hxx" + +#include "unx/salunx.h" +#include +#ifdef USE_CDE +#include "unx/cdeint.hxx" +#endif +#include "unx/dtint.hxx" +#include "unx/saldisp.hxx" +#include "unx/saldata.hxx" +#include "unx/wmadaptor.hxx" + +#include "dtsetenum.hxx" + +#include +#include + +// NETBSD has no RTLD_GLOBAL +#ifndef RTLD_GLOBAL +#define DLOPEN_MODE (RTLD_LAZY) +#else +#define DLOPEN_MODE (RTLD_GLOBAL | RTLD_LAZY) +#endif + + +using namespace rtl; +using namespace vcl_sal; + +String DtIntegrator::aHomeDir; + +DtIntegrator::DtIntegrator() : + meType( DtGeneric ), + mnSystemLookCommandProcess( -1 ) +{ + mpSalDisplay = GetX11SalData()->GetDisplay(); + mpDisplay = mpSalDisplay->GetDisplay(); + OUString aDir; + oslSecurity aCur = osl_getCurrentSecurity(); + if( aCur ) + { + osl_getHomeDir( aCur, &aDir.pData ); + osl_freeSecurityHandle( aCur ); + OUString aSysDir; + osl_getSystemPathFromFileURL( aDir.pData, &aSysDir.pData ); + aHomeDir = aSysDir; + } +} + +DtIntegrator::~DtIntegrator() +{ +} + +DtIntegrator* DtIntegrator::CreateDtIntegrator() +{ + /* + * #i22061# override desktop detection + * if environment variable OOO_FORCE_DESKTOP is set + * to one of "cde" "kde" "gnome" then autodetection + * is overridden. + */ + static const char* pOverride = getenv( "OOO_FORCE_DESKTOP" ); + if( pOverride && *pOverride ) + { + OString aOver( pOverride ); + +#if USE_CDE + if( aOver.equalsIgnoreAsciiCase( "cde" ) ) + return new CDEIntegrator(); +#endif + if( aOver.equalsIgnoreAsciiCase( "none" ) ) + return new DtIntegrator(); + } + +#ifdef USE_CDE + void* pLibrary = NULL; + + // check dt type + // CDE + SalDisplay* pSalDisplay = GetX11SalData()->GetDisplay(); + Display* pDisplay = pSalDisplay->GetDisplay(); + Atom nDtAtom = XInternAtom( pDisplay, "_DT_WM_READY", True ); + if( nDtAtom && ( pLibrary = dlopen( "/usr/dt/lib/libDtSvc.so", DLOPEN_MODE ) ) ) + { + dlclose( pLibrary ); + return new CDEIntegrator(); + } +#endif + + // default: generic implementation + return new DtIntegrator(); +} + +void DtIntegrator::GetSystemLook( AllSettings& rSettings ) +{ + // #i48001# set a default blink rate + StyleSettings aStyleSettings = rSettings.GetStyleSettings(); + aStyleSettings.SetCursorBlinkTime( 500 ); + rSettings.SetStyleSettings( aStyleSettings ); +} diff --git a/vcl/unx/generic/gdi/dtsetenum.hxx b/vcl/unx/generic/gdi/dtsetenum.hxx new file mode 100644 index 000000000000..5406ac870a43 --- /dev/null +++ b/vcl/unx/generic/gdi/dtsetenum.hxx @@ -0,0 +1,146 @@ +/************************************************************************* + * + * 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 _VCL_DTSETENUM_HXX +#define _VCL_DTSETENUM_HXX + +enum DtSetEnum +{ + /* settings for mouse */ + MouseOptions = 1, + DoubleClickTime, + DoubleClickWidth, + DoubleClickHeight, + StartDragWidth, + StartDragHeight, + DragMoveCode, + DragCopyCode, + DragLinkCode, + ContextMenuCode, + ContextMenuClicks, + ContextMenuDown, + ScrollRepeat, + ButtonStartRepeat, + ButtonRepeat, + ActionDelay, + MenuDelay, + Follow, + MiddleButtonAction, + /* settings for keyboard */ + KeyboardOptions=64, + /* style settings */ + StyleOptions = 128, + BorderSize, + TitleHeight, + FloatTitleHeight, + TearOffTitleHeight, + MenuBarHeight, + ScrollBarSize, + SpinSize, + SplitSize, + IconHorzSpace, + IconVertSpace, + CursorSize, + CursorBlinkTime, + ScreenZoom, + ScreenFontZoom, + LogoDisplayTime, + DragFullOptions, + AnimationOptions, + SelectionOptions, + DisplayOptions, + AntialiasingMinPixelHeight, + /* style colors */ + AllTextColors, /* convenience, sets all control text colors */ + AllBackColors, /* convenience, sets all control background colors */ + ThreeDColor, + FaceColor, + CheckedColor, + LightColor, + LightBorderColor, + ShadowColor, + DarkShadowColor, + ButtonTextColor, + RadioCheckTextColor, + GroupTextColor, + LabelTextColor, + InfoTextColor, + WindowColor, + WindowTextColor, + DialogColor, + DialogTextColor, + WorkspaceColor, + FieldColor, + FieldTextColor, + ActiveColor, + ActiveColor2, + ActiveTextColor, + ActiveBorderColor, + DeactiveColor, + DeactiveColor2, + DeactiveTextColor, + DeactiveBorderColor, + HighlightColor, + HighlightTextColor, + DisableColor, + HelpColor, + HelpTextColor, + MenuColor, + MenuBarColor, + MenuTextColor, + MenuHighlightColor, + MenuHighlightTextColor, + LinkColor, + VisitedLinkColor, + HighlightLinkColor, + HighContrastMode, + /* style fonts */ + UIFont, /* convenience, sets all fonts but TitleFont and FloatTitleFont */ + AppFont, + HelpFont, + TitleFont, + FloatTitleFont, + MenuFont, + ToolFont, + GroupFont, + LabelFont, + InfoFont, + RadioCheckFont, + PushButtonFont, + FieldFont, + IconFont, + /* style numeric styles */ + RadioButtonStyle, + CheckBoxStyle, + PushButtonStyle, + TabControlStyle, + /* toolbar style */ + ToolbarIconSize + +}; + +#endif // _VCL_DTSETENUM_HXX diff --git a/vcl/unx/generic/gdi/gcach_xpeer.cxx b/vcl/unx/generic/gdi/gcach_xpeer.cxx new file mode 100644 index 000000000000..bdaec4f6c05d --- /dev/null +++ b/vcl/unx/generic/gdi/gcach_xpeer.cxx @@ -0,0 +1,683 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include "rtl/ustring.hxx" +#include "osl/module.h" +#include "osl/thread.h" + +#include "unx/saldisp.hxx" +#include "unx/saldata.hxx" +#include "unx/salgdi.h" + +#include "gcach_xpeer.hxx" +#include "xrender_peer.hxx" + +// =========================================================================== + +// all glyph specific data needed by the XGlyphPeer is quite trivial +// with one exception: if multiple screens are involved and non-antialiased +// glyph rendering is active, then we need screen specific pixmaps +struct MultiScreenGlyph +{ + const RawBitmap* mpRawBitmap; + Glyph maXRGlyphId; + Pixmap maPixmaps[1]; // [mnMaxScreens] +}; + +// =========================================================================== + +X11GlyphPeer::X11GlyphPeer() +: mpDisplay( GetX11SalData()->GetDisplay()->GetDisplay() ) +, mnMaxScreens(0) +, mnDefaultScreen(0) +, mnExtByteCount(0) +, mnForcedAA(0) +, mnUsingXRender(0) +{ + maRawBitmap.mnAllocated = 0; + maRawBitmap.mpBits = NULL; + if( !mpDisplay ) + return; + + SalDisplay& rSalDisplay = *GetX11SalData()->GetDisplay(); + mpDisplay = rSalDisplay.GetDisplay(); + mnMaxScreens = rSalDisplay.GetScreenCount(); + if( mnMaxScreens > MAX_GCACH_SCREENS ) + mnMaxScreens = MAX_GCACH_SCREENS; + // if specific glyph data has to be kept for many screens + // then prepare the allocation of MultiScreenGlyph objects + if( mnMaxScreens > 1 ) + mnExtByteCount = sizeof(MultiScreenGlyph) + sizeof(Pixmap) * (mnMaxScreens - 1); + mnDefaultScreen = rSalDisplay.GetDefaultScreenNumber(); + + InitAntialiasing(); +} + +// --------------------------------------------------------------------------- + +X11GlyphPeer::~X11GlyphPeer() +{ + SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); + Display* const pX11Disp = pSalDisp->GetDisplay(); + XRenderPeer& rRenderPeer = XRenderPeer::GetInstance(); + for( int i = 0; i < mnMaxScreens; i++ ) + { + SalDisplay::RenderEntryMap& rMap = pSalDisp->GetRenderEntries( i ); + for( SalDisplay::RenderEntryMap::iterator it = rMap.begin(); it != rMap.end(); ++it ) + { + if( it->second.m_aPixmap ) + ::XFreePixmap( pX11Disp, it->second.m_aPixmap ); + if( it->second.m_aPicture ) + rRenderPeer.FreePicture( it->second.m_aPicture ); + } + rMap.clear(); + } +} + +// --------------------------------------------------------------------------- + +void X11GlyphPeer::InitAntialiasing() +{ + int nEnvAntiAlias = 0; + const char* pEnvAntiAlias = getenv( "SAL_ANTIALIAS_DISABLE" ); + if( pEnvAntiAlias ) + { + nEnvAntiAlias = atoi( pEnvAntiAlias ); + if( nEnvAntiAlias == 0 ) + return; + } + + mnUsingXRender = 0; + mnForcedAA = 0; + + // enable XRENDER accelerated aliasing on screens that support it + // unless it explicitly disabled by an environment variable + if( (nEnvAntiAlias & 2) == 0 ) + mnUsingXRender = XRenderPeer::GetInstance().InitRenderText(); + + // else enable client side antialiasing for these screens + // unless it is explicitly disabled by an environment variable + if( (nEnvAntiAlias & 1) != 0 ) + return; + + // enable client side antialiasing for screen visuals that are suitable + // mnForcedAA is a bitmask of screens enabled for client side antialiasing + mnForcedAA = (~(~0U << mnMaxScreens)) ^ mnUsingXRender; + SalDisplay& rSalDisplay = *GetX11SalData()->GetDisplay(); + for( int nScreen = 0; nScreen < mnMaxScreens; ++nScreen) + { + Visual* pVisual = rSalDisplay.GetVisual( nScreen ).GetVisual(); + XVisualInfo aXVisualInfo; + aXVisualInfo.visualid = pVisual->visualid; + int nVisuals = 0; + XVisualInfo* pXVisualInfo = XGetVisualInfo( mpDisplay, VisualIDMask, &aXVisualInfo, &nVisuals ); + for( int i = nVisuals; --i >= 0; ) + { + if( ((pXVisualInfo[i].c_class==PseudoColor) || (pXVisualInfo[i].depth<24)) + && ((pXVisualInfo[i].c_class>GrayScale) || (pXVisualInfo[i].depth!=8) ) ) + mnForcedAA &= ~(1U << nScreen); + } + if( pXVisualInfo != NULL ) + XFree( pXVisualInfo ); + } +} + +// =========================================================================== + +enum { INFO_EMPTY=0, INFO_PIXMAP, INFO_XRENDER, INFO_RAWBMP, INFO_MULTISCREEN }; +static const Glyph NO_GLYPHID = 0; +static RawBitmap* const NO_RAWBMP = NULL; +static const Pixmap NO_PIXMAP = ~0; + +// --------------------------------------------------------------------------- + +MultiScreenGlyph* X11GlyphPeer::PrepareForMultiscreen( ExtGlyphData& rEGD ) const +{ + // prepare to store screen specific pixmaps + MultiScreenGlyph* pMSGlyph = (MultiScreenGlyph*)new char[ mnExtByteCount ]; + + // init the glyph formats + pMSGlyph->mpRawBitmap = NO_RAWBMP; + pMSGlyph->maXRGlyphId = NO_GLYPHID; + for( int i = 0; i < mnMaxScreens; ++i ) + pMSGlyph->maPixmaps[i] = NO_PIXMAP; + // reuse already available glyph formats + if( rEGD.meInfo == INFO_XRENDER ) + pMSGlyph->maXRGlyphId = reinterpret_cast(rEGD.mpData); + else if( rEGD.meInfo == INFO_RAWBMP ) + pMSGlyph->mpRawBitmap = reinterpret_cast(rEGD.mpData); + else if( rEGD.meInfo == INFO_PIXMAP ) + { + Pixmap aPixmap = reinterpret_cast(rEGD.mpData); + if( aPixmap != None ) + // pixmap for the default screen is available + pMSGlyph->maPixmaps[ mnDefaultScreen ] = aPixmap; + else // empty pixmap for all screens is available + for( int i = 0; i < mnMaxScreens; ++i ) + pMSGlyph->maPixmaps[ i ] = None; + } + // enable use of multiscreen glyph + rEGD.mpData = (void*)pMSGlyph; + rEGD.meInfo = INFO_MULTISCREEN; + + return pMSGlyph; + } + +// --------------------------------------------------------------------------- + +Glyph X11GlyphPeer::GetRenderGlyph( const GlyphData& rGD ) const +{ + Glyph aGlyphId = NO_GLYPHID; + const ExtGlyphData& rEGD = rGD.ExtDataRef(); + if( rEGD.meInfo == INFO_XRENDER ) + aGlyphId = reinterpret_cast(rEGD.mpData); + else if( rEGD.meInfo == INFO_MULTISCREEN ) + aGlyphId = reinterpret_cast(rEGD.mpData)->maXRGlyphId; + return aGlyphId; +} + +// --------------------------------------------------------------------------- + +void X11GlyphPeer::SetRenderGlyph( GlyphData& rGD, Glyph aGlyphId ) const +{ + ExtGlyphData& rEGD = rGD.ExtDataRef(); + switch( rEGD.meInfo ) + { + case INFO_EMPTY: + rEGD.meInfo = INFO_XRENDER; + // fall through + case INFO_XRENDER: + rEGD.mpData = reinterpret_cast(aGlyphId); + break; + case INFO_PIXMAP: + case INFO_RAWBMP: + PrepareForMultiscreen( rEGD ); + // fall through + case INFO_MULTISCREEN: + reinterpret_cast(rEGD.mpData)->maXRGlyphId = aGlyphId; + break; + default: + break; // cannot happen... + } +} + +// --------------------------------------------------------------------------- + +const RawBitmap* X11GlyphPeer::GetRawBitmap( const GlyphData& rGD ) const +{ + const RawBitmap* pRawBitmap = NO_RAWBMP; + const ExtGlyphData& rEGD = rGD.ExtDataRef(); + if( rEGD.meInfo == INFO_RAWBMP ) + pRawBitmap = reinterpret_cast(rEGD.mpData); + else if( rEGD.meInfo == INFO_MULTISCREEN ) + pRawBitmap = reinterpret_cast(rEGD.mpData)->mpRawBitmap; + return pRawBitmap; +} + +// --------------------------------------------------------------------------- + +void X11GlyphPeer::SetRawBitmap( GlyphData& rGD, const RawBitmap* pRawBitmap ) const +{ + ExtGlyphData& rEGD = rGD.ExtDataRef(); + switch( rEGD.meInfo ) + { + case INFO_EMPTY: + rEGD.meInfo = INFO_RAWBMP; + // fall through + case INFO_RAWBMP: + rEGD.mpData = (void*)pRawBitmap; + break; + case INFO_PIXMAP: + case INFO_XRENDER: + PrepareForMultiscreen( rEGD ); + // fall through + case INFO_MULTISCREEN: + reinterpret_cast(rEGD.mpData)->mpRawBitmap = pRawBitmap; + break; + default: + // cannot happen... + break; + } +} + +// --------------------------------------------------------------------------- + +Pixmap X11GlyphPeer::GetPixmap( const GlyphData& rGD, int nScreen ) const +{ + Pixmap aPixmap = NO_PIXMAP; + const ExtGlyphData& rEGD = rGD.ExtDataRef(); + if( (rEGD.meInfo == INFO_PIXMAP) && (nScreen == mnDefaultScreen) ) + aPixmap = (Pixmap)rEGD.mpData; + else if( rEGD.meInfo == INFO_MULTISCREEN ) + aPixmap = (Pixmap)(reinterpret_cast(rEGD.mpData)->maPixmaps[nScreen]); + return aPixmap; +} + +// --------------------------------------------------------------------------- + +void X11GlyphPeer::SetPixmap( GlyphData& rGD, Pixmap aPixmap, int nScreen ) const +{ + if( aPixmap == NO_PIXMAP ) + aPixmap = None; + + ExtGlyphData& rEGD = rGD.ExtDataRef(); + if( (rEGD.meInfo == INFO_EMPTY) && (nScreen == mnDefaultScreen) ) + { + rEGD.meInfo = INFO_PIXMAP; + rEGD.mpData = (void*)aPixmap; + } + else + { + MultiScreenGlyph* pMSGlyph; + if( rEGD.meInfo == INFO_MULTISCREEN ) + pMSGlyph = reinterpret_cast(rEGD.mpData); + else + pMSGlyph = PrepareForMultiscreen( rEGD ); + + pMSGlyph->maPixmaps[ nScreen ] = aPixmap; + } +} + +// --------------------------------------------------------------------------- + +void X11GlyphPeer::RemovingFont( ServerFont& rServerFont ) +{ + void* pFontExt = rServerFont.GetExtPointer(); + switch( rServerFont.GetExtInfo() ) + { + case INFO_PIXMAP: + case INFO_RAWBMP: + // nothing to do + break; + case INFO_MULTISCREEN: + // cannot happen... + break; + + case INFO_XRENDER: + XRenderPeer::GetInstance().FreeGlyphSet( (GlyphSet)pFontExt ); + break; + } + + rServerFont.SetExtended( INFO_EMPTY, NULL ); +} + +// --------------------------------------------------------------------------- + +// notification to clean up GlyphPeer resources for this glyph +void X11GlyphPeer::RemovingGlyph( ServerFont& /*rServerFont*/, GlyphData& rGlyphData, int /*nGlyphIndex*/ ) +{ + // nothing to do if the GlyphPeer hasn't allocated resources for the glyph + if( rGlyphData.ExtDataRef().meInfo == INFO_EMPTY ) + return; + + const GlyphMetric& rGM = rGlyphData.GetMetric(); + const int nWidth = rGM.GetSize().Width(); + const int nHeight = rGM.GetSize().Height(); + + void* pGlyphExt = rGlyphData.ExtDataRef().mpData; + switch( rGlyphData.ExtDataRef().meInfo ) + { + case INFO_PIXMAP: + { + Pixmap aPixmap = (Pixmap)pGlyphExt; + if( aPixmap != None ) + { + XFreePixmap( mpDisplay, aPixmap ); + mnBytesUsed -= nHeight * ((nWidth + 7) >> 3); + } + } + break; + + case INFO_MULTISCREEN: + { + MultiScreenGlyph* pMSGlyph = reinterpret_cast(pGlyphExt); + for( int i = 0; i < mnMaxScreens; ++i) + { + if( pMSGlyph->maPixmaps[i] == NO_PIXMAP ) + continue; + if( pMSGlyph->maPixmaps[i] == None ) + continue; + XFreePixmap( mpDisplay, pMSGlyph->maPixmaps[i] ); + mnBytesUsed -= nHeight * ((nWidth + 7) >> 3); + } + delete pMSGlyph->mpRawBitmap; + // Glyph nGlyphId = (Glyph)rGlyphData.GetExtPointer(); + // XRenderPeer::GetInstance().FreeGlyph( aGlyphSet, &nGlyphId ); + delete[] pMSGlyph; // it was allocated with new char[] + } + break; + + case INFO_RAWBMP: + { + RawBitmap* pRawBitmap = (RawBitmap*)pGlyphExt; + if( pRawBitmap != NULL ) + { + mnBytesUsed -= pRawBitmap->mnScanlineSize * pRawBitmap->mnHeight; + mnBytesUsed -= sizeof(RawBitmap); + delete pRawBitmap; + } + } + break; + + case INFO_XRENDER: + { + // Glyph nGlyphId = (Glyph)rGlyphData.GetExtPointer(); + // XRenderPeer::GetInstance().FreeGlyph( aGlyphSet, &nGlyphId ); + mnBytesUsed -= nHeight * ((nWidth + 3) & ~3); + } + break; + } + + if( mnBytesUsed < 0 ) // TODO: eliminate nBytesUsed calc mismatch + mnBytesUsed = 0; + + rGlyphData.ExtDataRef() = ExtGlyphData(); +} + +// --------------------------------------------------------------------------- + +bool X11GlyphPeer::ForcedAntialiasing( const ServerFont& rServerFont, int nScreen ) const +{ + bool bForceOk = rServerFont.GetAntialiasAdvice(); + // maximum size for antialiasing is 250 pixels + bForceOk &= (rServerFont.GetFontSelData().mnHeight < 250); + return (bForceOk && ((mnForcedAA >> nScreen) & 1)); +} + +// --------------------------------------------------------------------------- + +GlyphSet X11GlyphPeer::GetGlyphSet( ServerFont& rServerFont, int nScreen ) +{ + if( (nScreen >= 0) && ((mnUsingXRender >> nScreen) & 1) == 0 ) + return 0; + + GlyphSet aGlyphSet; + + switch( rServerFont.GetExtInfo() ) + { + case INFO_XRENDER: + aGlyphSet = (GlyphSet)rServerFont.GetExtPointer(); + break; + + case INFO_EMPTY: + { + // antialiasing for reasonable font heights only + // => prevents crashes caused by X11 requests >= 256k + // => prefer readablity of hinted glyphs at small sizes + // => prefer "grey clouds" to "black clouds" at very small sizes + int nHeight = rServerFont.GetFontSelData().mnHeight; + if( nHeight<250 && rServerFont.GetAntialiasAdvice() ) + { + aGlyphSet = XRenderPeer::GetInstance().CreateGlyphSet(); + rServerFont.SetExtended( INFO_XRENDER, (void*)aGlyphSet ); + } + else + aGlyphSet = 0; + } + break; + + default: + aGlyphSet = 0; + break; + } + + return aGlyphSet; +} + +// --------------------------------------------------------------------------- + +Pixmap X11GlyphPeer::GetPixmap( ServerFont& rServerFont, int nGlyphIndex, int nReqScreen ) +{ + if( rServerFont.IsGlyphInvisible( nGlyphIndex ) ) + return None; + + GlyphData& rGlyphData = rServerFont.GetGlyphData( nGlyphIndex ); + Pixmap aPixmap = GetPixmap( rGlyphData, nReqScreen ); + if( aPixmap == NO_PIXMAP ) + { + aPixmap = None; + if( rServerFont.GetGlyphBitmap1( nGlyphIndex, maRawBitmap ) ) + { + // #94666# circumvent bug in some X11 systems, e.g. XF410.LynxEM.v163 + ULONG nPixmapWidth = 8 * maRawBitmap.mnScanlineSize - 1; + nPixmapWidth = Max( nPixmapWidth, maRawBitmap.mnWidth ); + + rGlyphData.SetSize( Size( nPixmapWidth, maRawBitmap.mnHeight ) ); + rGlyphData.SetOffset( +maRawBitmap.mnXOffset, +maRawBitmap.mnYOffset ); + + const ULONG nBytes = maRawBitmap.mnHeight * maRawBitmap.mnScanlineSize; + if( nBytes > 0 ) + { + // conversion table LSB<->MSB (for XCreatePixmapFromData) + static const unsigned char lsb2msb[256] = + { + 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, + 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0, + 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, + 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, + 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4, + 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4, + 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, + 0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC, + 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, + 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2, + 0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA, + 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA, + 0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6, + 0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6, + 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE, + 0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE, + 0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1, + 0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1, + 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, + 0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9, + 0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5, + 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5, + 0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED, + 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD, + 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3, + 0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3, + 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, + 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB, + 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, + 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7, + 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, + 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF + }; + + unsigned char* pTemp = maRawBitmap.mpBits; + for( int i = nBytes; --i >= 0; ++pTemp ) + *pTemp = lsb2msb[ *pTemp ]; + + // often a glyph pixmap is only needed on the default screen + // => optimize for this common case + int nMinScreen = 0; + int nEndScreen = mnMaxScreens; + if( nReqScreen == mnDefaultScreen ) { + nMinScreen = mnDefaultScreen; + nEndScreen = mnDefaultScreen + 1; + } + // prepare glyph pixmaps for the different screens + for( int i = nMinScreen; i < nEndScreen; ++i ) + { + // don't bother if the pixmap is already there + if( GetPixmap( rGlyphData, i ) != NO_PIXMAP ) + continue; + // create the glyph pixmap + Pixmap aScreenPixmap = XCreatePixmapFromBitmapData( mpDisplay, + RootWindow( mpDisplay, i ), (char*)maRawBitmap.mpBits, + nPixmapWidth, maRawBitmap.mnHeight, 1, 0, 1 ); + // and cache it as glyph specific data + SetPixmap( rGlyphData, aScreenPixmap, i ); + mnBytesUsed += nBytes; + if( i == nReqScreen ) + aPixmap = aScreenPixmap; + } + } + } + else + { + // fall back to .notdef glyph + if( nGlyphIndex != 0 ) // recurse only once + aPixmap = GetPixmap( rServerFont, 0, nReqScreen ); + + if( aPixmap == NO_PIXMAP ) + aPixmap = None; + } + } + + return aPixmap; +} + +// --------------------------------------------------------------------------- + +const RawBitmap* X11GlyphPeer::GetRawBitmap( ServerFont& rServerFont, + int nGlyphIndex ) +{ + if( rServerFont.IsGlyphInvisible( nGlyphIndex ) ) + return NO_RAWBMP; + + GlyphData& rGlyphData = rServerFont.GetGlyphData( nGlyphIndex ); + + const RawBitmap* pRawBitmap = GetRawBitmap( rGlyphData ); + if( pRawBitmap == NO_RAWBMP ) + { + RawBitmap* pNewBitmap = new RawBitmap; + if( rServerFont.GetGlyphBitmap8( nGlyphIndex, *pNewBitmap ) ) + { + pRawBitmap = pNewBitmap; + mnBytesUsed += pNewBitmap->mnScanlineSize * pNewBitmap->mnHeight; + mnBytesUsed += sizeof(pNewBitmap); + } + else + { + delete pNewBitmap; + // fall back to .notdef glyph + if( nGlyphIndex != 0 ) // recurse only once + pRawBitmap = GetRawBitmap( rServerFont, 0 ); + } + + SetRawBitmap( rGlyphData, pRawBitmap ); + } + + return pRawBitmap; +} + +// --------------------------------------------------------------------------- + +Glyph X11GlyphPeer::GetGlyphId( ServerFont& rServerFont, int nGlyphIndex ) +{ + if( rServerFont.IsGlyphInvisible( nGlyphIndex ) ) + return NO_GLYPHID; + + GlyphData& rGlyphData = rServerFont.GetGlyphData( nGlyphIndex ); + + Glyph aGlyphId = GetRenderGlyph( rGlyphData ); + if( aGlyphId == NO_GLYPHID ) + { + // prepare GlyphInfo and Bitmap + if( rServerFont.GetGlyphBitmap8( nGlyphIndex, maRawBitmap ) ) + { + XGlyphInfo aGlyphInfo; + aGlyphInfo.width = maRawBitmap.mnWidth; + aGlyphInfo.height = maRawBitmap.mnHeight; + aGlyphInfo.x = -maRawBitmap.mnXOffset; + aGlyphInfo.y = -maRawBitmap.mnYOffset; + + rGlyphData.SetSize( Size( maRawBitmap.mnWidth, maRawBitmap.mnHeight ) ); + rGlyphData.SetOffset( +maRawBitmap.mnXOffset, +maRawBitmap.mnYOffset ); + + const GlyphMetric& rGM = rGlyphData.GetMetric(); + aGlyphInfo.xOff = +rGM.GetDelta().X(); + aGlyphInfo.yOff = +rGM.GetDelta().Y(); + + // upload glyph bitmap to server + GlyphSet aGlyphSet = GetGlyphSet( rServerFont, -1 ); + + aGlyphId = nGlyphIndex & 0x00FFFFFF; + const ULONG nBytes = maRawBitmap.mnScanlineSize * maRawBitmap.mnHeight; + XRenderPeer::GetInstance().AddGlyph( aGlyphSet, aGlyphId, + aGlyphInfo, (char*)maRawBitmap.mpBits, nBytes ); + mnBytesUsed += nBytes; + } + else + { + // fall back to .notdef glyph + if( nGlyphIndex != 0 ) // recurse only once + aGlyphId = GetGlyphId( rServerFont, 0 ); + } + + SetRenderGlyph( rGlyphData, aGlyphId ); + } + + return aGlyphId; +} + +// =========================================================================== + +X11GlyphCache::X11GlyphCache( X11GlyphPeer& rPeer ) +: GlyphCache( rPeer ) +{ +} + +// --------------------------------------------------------------------------- + +static X11GlyphPeer* pX11GlyphPeer = NULL; +static X11GlyphCache* pX11GlyphCache = NULL; + +X11GlyphCache& X11GlyphCache::GetInstance() +{ + if( !pX11GlyphCache ) + { + pX11GlyphPeer = new X11GlyphPeer(); + pX11GlyphCache = new X11GlyphCache( *pX11GlyphPeer ); + } + return *pX11GlyphCache; +} + +// --------------------------------------------------------------------------- + +void X11GlyphCache::KillInstance() +{ + delete pX11GlyphCache; + delete pX11GlyphPeer; + pX11GlyphCache = NULL; + pX11GlyphPeer = NULL; +} + +// =========================================================================== + +void X11SalGraphics::releaseGlyphPeer() +{ + X11GlyphCache::KillInstance(); +} + +// =========================================================================== + diff --git a/vcl/unx/generic/gdi/gcach_xpeer.hxx b/vcl/unx/generic/gdi/gcach_xpeer.hxx new file mode 100644 index 000000000000..4e041e51aec2 --- /dev/null +++ b/vcl/unx/generic/gdi/gcach_xpeer.hxx @@ -0,0 +1,93 @@ +/************************************************************************* + * + * 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 _SV_GCACH_XPEER_HXX +#define _SV_GCACH_XPEER_HXX + +#include +#include +#include +#include + +#include + +class SalDisplay; +struct MultiScreenGlyph; + +class X11GlyphPeer +: public GlyphCachePeer +{ +public: + X11GlyphPeer(); + virtual ~X11GlyphPeer(); + + Pixmap GetPixmap( ServerFont&, int nGlyphIndex, int nScreen ); + const RawBitmap* GetRawBitmap( ServerFont&, int nGlyphIndex ); + bool ForcedAntialiasing( const ServerFont&, int nScreen ) const; + + GlyphSet GetGlyphSet( ServerFont&, int nScreen ); + Glyph GetGlyphId( ServerFont&, int nGlyphIndex ); + +protected: + void InitAntialiasing(); + + virtual void RemovingFont( ServerFont& ); + virtual void RemovingGlyph( ServerFont&, GlyphData&, int nGlyphIndex ); + + MultiScreenGlyph* PrepareForMultiscreen( ExtGlyphData& ) const; + void SetRenderGlyph( GlyphData&, Glyph ) const; + void SetRawBitmap( GlyphData&, const RawBitmap* ) const; + void SetPixmap( GlyphData&, Pixmap, int nScreen ) const; + Glyph GetRenderGlyph( const GlyphData& ) const; + const RawBitmap* GetRawBitmap( const GlyphData& ) const; + Pixmap GetPixmap( const GlyphData&, int nScreen ) const; + +private: + Display* mpDisplay; + + // thirty-two screens should be enough for everyone... + static const int MAX_GCACH_SCREENS = 32; + int mnMaxScreens; + int mnDefaultScreen; + int mnExtByteCount; + RawBitmap maRawBitmap; + sal_uInt32 mnForcedAA; + sal_uInt32 mnUsingXRender; +}; + +class X11GlyphCache : public GlyphCache +{ +public: + X11GlyphPeer& GetPeer() { return reinterpret_cast( mrPeer ); } +static X11GlyphCache& GetInstance(); +static void KillInstance(); + +private: + X11GlyphCache( X11GlyphPeer& ); +}; + +#endif // _SV_GCACH_XPEER_HXX diff --git a/vcl/unx/generic/gdi/makefile.mk b/vcl/unx/generic/gdi/makefile.mk new file mode 100644 index 000000000000..123fcbcf9131 --- /dev/null +++ b/vcl/unx/generic/gdi/makefile.mk @@ -0,0 +1,101 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=vcl +TARGET=salgdi + +.INCLUDE : $(PRJ)$/util$/makefile.pmk + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk +.INCLUDE : $(PRJ)$/util$/makefile2.pmk + +# --- Files -------------------------------------------------------- + +.IF "$(GUIBASE)"!="unx" + +dummy: + @echo "Nothing to build for GUIBASE $(GUIBASE)" + +.ELSE # "$(GUIBASE)"!="unx" + +SLOFILES= \ + $(SLO)$/salgdi2.obj \ + $(SLO)$/salbmp.obj \ + $(SLO)$/salgdi.obj \ + $(SLO)$/salvd.obj \ + $(SLO)$/dtint.obj \ + $(SLO)$/salcvt.obj \ + $(SLO)$/salgdi3.obj \ + $(SLO)$/gcach_xpeer.obj \ + $(SLO)$/xrender_peer.obj \ + $(SLO)$/pspgraphics.obj + +EXCEPTIONSFILES=\ + $(SLO)$/salgdi.obj \ + $(SLO)$/salbmp.obj \ + $(SLO)$/salgdi3.obj \ + $(SLO)$/salcvt.obj + +SLOFILES+=$(SLO)$/salprnpsp.obj +EXCEPTIONSFILES+=$(SLO)$/salprnpsp.obj + +.IF "$(OS)"=="SOLARIS" +SLOFILES+=$(SLO)$/cdeint.obj +ENVCFLAGS+=-DUSE_CDE +.ENDIF + +.IF "$(XRENDER_LINK)" == "YES" +CFLAGS+=-DXRENDER_LINK +.ENDIF + +.IF "$(ENABLE_GRAPHITE)" == "TRUE" +CFLAGS+=-DENABLE_GRAPHITE +.ENDIF + +.ENDIF # "$(GUIBASE)"!="unx" + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk + +.INCLUDE : $(PRJ)$/util$/target.pmk + +ALLTAR : $(MACOSXRC) + +XSALSETLIBNAME=$(DLLPRE)spa$(DLLPOSTFIX)$(DLLPOST) + +$(INCCOM)$/rtsname.hxx: + @rm -f $(INCCOM)$/rtsname.hxx ; \ + echo "#define _XSALSET_LIBNAME "\"$(XSALSETLIBNAME)\" > $(INCCOM)$/rtsname.hxx + +$(SLO)$/salpimpl.obj : $(INCCOM)$/rtsname.hxx +$(SLO)$/salprnpsp.obj : $(INCCOM)$/rtsname.hxx + diff --git a/vcl/unx/generic/gdi/pspgraphics.cxx b/vcl/unx/generic/gdi/pspgraphics.cxx new file mode 100644 index 000000000000..f18bb7e561b8 --- /dev/null +++ b/vcl/unx/generic/gdi/pspgraphics.cxx @@ -0,0 +1,1504 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include +#include +#include +#include +#include + +#include "unx/pspgraphics.h" + +#include "vcl/jobdata.hxx" +#include "vcl/printerinfomanager.hxx" +#include "vcl/bmpacc.hxx" +#include "vcl/svapp.hxx" +#include "vcl/sysdata.hxx" + +#include "printergfx.hxx" +#include "salbmp.hxx" +#include "glyphcache.hxx" +#include "impfont.hxx" +#include "outfont.hxx" +#include "fontsubset.hxx" +#include "salprn.hxx" + +#ifdef ENABLE_GRAPHITE +#include +#include +#endif + +using namespace psp; +using namespace rtl; + +// ----- Implementation of PrinterBmp by means of SalBitmap/BitmapBuffer --------------- + +class SalPrinterBmp : public psp::PrinterBmp +{ + private: + BitmapBuffer* mpBmpBuffer; + + FncGetPixel mpFncGetPixel; + Scanline mpScanAccess; + sal_PtrDiff mnScanOffset; + + sal_uInt32 ColorOf (BitmapColor& rColor) const; + sal_uInt8 GrayOf (BitmapColor& rColor) const; + + SalPrinterBmp (); + + public: + + SalPrinterBmp (BitmapBuffer* pBitmap); + virtual ~SalPrinterBmp (); + virtual sal_uInt32 GetPaletteColor (sal_uInt32 nIdx) const; + virtual sal_uInt32 GetPaletteEntryCount () const; + virtual sal_uInt32 GetPixelRGB (sal_uInt32 nRow, sal_uInt32 nColumn) const; + virtual sal_uInt8 GetPixelGray (sal_uInt32 nRow, sal_uInt32 nColumn) const; + virtual sal_uInt8 GetPixelIdx (sal_uInt32 nRow, sal_uInt32 nColumn) const; + virtual sal_uInt32 GetWidth () const; + virtual sal_uInt32 GetHeight() const; + virtual sal_uInt32 GetDepth () const; +}; + +SalPrinterBmp::SalPrinterBmp (BitmapBuffer* pBuffer) : + mpBmpBuffer (pBuffer) +{ + DBG_ASSERT (mpBmpBuffer, "SalPrinterBmp::SalPrinterBmp () can't acquire Bitmap"); + + // calibrate scanline buffer + if( BMP_SCANLINE_ADJUSTMENT( mpBmpBuffer->mnFormat ) == BMP_FORMAT_TOP_DOWN ) + { + mpScanAccess = mpBmpBuffer->mpBits; + mnScanOffset = mpBmpBuffer->mnScanlineSize; + } + else + { + mpScanAccess = mpBmpBuffer->mpBits + + (mpBmpBuffer->mnHeight - 1) * mpBmpBuffer->mnScanlineSize; + mnScanOffset = - mpBmpBuffer->mnScanlineSize; + } + + // request read access to the pixels + switch( BMP_SCANLINE_FORMAT( mpBmpBuffer->mnFormat ) ) + { + case BMP_FORMAT_1BIT_MSB_PAL: + mpFncGetPixel = BitmapReadAccess::GetPixelFor_1BIT_MSB_PAL; break; + case BMP_FORMAT_1BIT_LSB_PAL: + mpFncGetPixel = BitmapReadAccess::GetPixelFor_1BIT_LSB_PAL; break; + case BMP_FORMAT_4BIT_MSN_PAL: + mpFncGetPixel = BitmapReadAccess::GetPixelFor_4BIT_MSN_PAL; break; + case BMP_FORMAT_4BIT_LSN_PAL: + mpFncGetPixel = BitmapReadAccess::GetPixelFor_4BIT_LSN_PAL; break; + case BMP_FORMAT_8BIT_PAL: + mpFncGetPixel = BitmapReadAccess::GetPixelFor_8BIT_PAL; break; + case BMP_FORMAT_8BIT_TC_MASK: + mpFncGetPixel = BitmapReadAccess::GetPixelFor_8BIT_TC_MASK; break; + case BMP_FORMAT_16BIT_TC_MSB_MASK: + mpFncGetPixel = BitmapReadAccess::GetPixelFor_16BIT_TC_MSB_MASK; break; + case BMP_FORMAT_16BIT_TC_LSB_MASK: + mpFncGetPixel = BitmapReadAccess::GetPixelFor_16BIT_TC_LSB_MASK; break; + case BMP_FORMAT_24BIT_TC_BGR: + mpFncGetPixel = BitmapReadAccess::GetPixelFor_24BIT_TC_BGR; break; + case BMP_FORMAT_24BIT_TC_RGB: + mpFncGetPixel = BitmapReadAccess::GetPixelFor_24BIT_TC_RGB; break; + case BMP_FORMAT_24BIT_TC_MASK: + mpFncGetPixel = BitmapReadAccess::GetPixelFor_24BIT_TC_MASK; break; + case BMP_FORMAT_32BIT_TC_ABGR: + mpFncGetPixel = BitmapReadAccess::GetPixelFor_32BIT_TC_ABGR; break; + case BMP_FORMAT_32BIT_TC_ARGB: + mpFncGetPixel = BitmapReadAccess::GetPixelFor_32BIT_TC_ARGB; break; + case BMP_FORMAT_32BIT_TC_BGRA: + mpFncGetPixel = BitmapReadAccess::GetPixelFor_32BIT_TC_BGRA; break; + case BMP_FORMAT_32BIT_TC_RGBA: + mpFncGetPixel = BitmapReadAccess::GetPixelFor_32BIT_TC_RGBA; break; + case BMP_FORMAT_32BIT_TC_MASK: + mpFncGetPixel = BitmapReadAccess::GetPixelFor_32BIT_TC_MASK; break; + + default: + DBG_ERROR("Error: SalPrinterBmp::SalPrinterBmp() unknown bitmap format"); + break; + } +} + +SalPrinterBmp::~SalPrinterBmp () +{ +} + +sal_uInt32 +SalPrinterBmp::GetWidth () const +{ + return mpBmpBuffer->mnWidth; +} + +sal_uInt32 +SalPrinterBmp::GetHeight () const +{ + return mpBmpBuffer->mnHeight; +} + +sal_uInt32 +SalPrinterBmp::GetDepth () const +{ + sal_uInt32 nDepth; + + switch (mpBmpBuffer->mnBitCount) + { + case 1: + nDepth = 1; + break; + + case 4: + case 8: + nDepth = 8; + break; + + case 16: + case 24: + case 32: + nDepth = 24; + break; + + default: + nDepth = 1; + DBG_ERROR ("Error: unsupported bitmap depth in SalPrinterBmp::GetDepth()"); + break; + } + + return nDepth; +} + +sal_uInt32 +SalPrinterBmp::ColorOf (BitmapColor& rColor) const +{ + if (rColor.IsIndex()) + return ColorOf (mpBmpBuffer->maPalette[rColor.GetIndex()]); + else + return ((rColor.GetBlue()) & 0x000000ff) + | ((rColor.GetGreen() << 8) & 0x0000ff00) + | ((rColor.GetRed() << 16) & 0x00ff0000); +} + +sal_uInt8 +SalPrinterBmp::GrayOf (BitmapColor& rColor) const +{ + if (rColor.IsIndex()) + return GrayOf (mpBmpBuffer->maPalette[rColor.GetIndex()]); + else + return ( rColor.GetBlue() * 28UL + + rColor.GetGreen() * 151UL + + rColor.GetRed() * 77UL ) >> 8; +} + +sal_uInt32 +SalPrinterBmp::GetPaletteEntryCount () const +{ + return mpBmpBuffer->maPalette.GetEntryCount (); +} + +sal_uInt32 +SalPrinterBmp::GetPaletteColor (sal_uInt32 nIdx) const +{ + return ColorOf (mpBmpBuffer->maPalette[nIdx]); +} + +sal_uInt32 +SalPrinterBmp::GetPixelRGB (sal_uInt32 nRow, sal_uInt32 nColumn) const +{ + Scanline pScan = mpScanAccess + nRow * mnScanOffset; + BitmapColor aColor = mpFncGetPixel (pScan, nColumn, mpBmpBuffer->maColorMask); + + return ColorOf (aColor); +} + +sal_uInt8 +SalPrinterBmp::GetPixelGray (sal_uInt32 nRow, sal_uInt32 nColumn) const +{ + Scanline pScan = mpScanAccess + nRow * mnScanOffset; + BitmapColor aColor = mpFncGetPixel (pScan, nColumn, mpBmpBuffer->maColorMask); + + return GrayOf (aColor); +} + +sal_uInt8 +SalPrinterBmp::GetPixelIdx (sal_uInt32 nRow, sal_uInt32 nColumn) const +{ + Scanline pScan = mpScanAccess + nRow * mnScanOffset; + BitmapColor aColor = mpFncGetPixel (pScan, nColumn, mpBmpBuffer->maColorMask); + + if (aColor.IsIndex()) + return aColor.GetIndex(); + else + return 0; +} + +/******************************************************* + * PspGraphics * + *******************************************************/ + +PspGraphics::~PspGraphics() +{ + ReleaseFonts(); +} + +void PspGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) +{ + if (m_pJobData != NULL) + { + int x = m_pJobData->m_aContext.getRenderResolution(); + + rDPIX = x; + rDPIY = x; + } +} + +USHORT PspGraphics::GetBitCount() +{ + return m_pPrinterGfx->GetBitCount(); +} + +long PspGraphics::GetGraphicsWidth() const +{ + return 0; +} + +void PspGraphics::ResetClipRegion() +{ + m_pPrinterGfx->ResetClipRegion (); +} + +void PspGraphics::BeginSetClipRegion( ULONG n ) +{ + m_pPrinterGfx->BeginSetClipRegion(n); +} + +BOOL PspGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY ) +{ + return (BOOL)m_pPrinterGfx->UnionClipRegion (nX, nY, nDX, nDY); +} + +bool PspGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& ) +{ + // TODO: implement and advertise OutDevSupport_B2DClip support + return false; +} + +void PspGraphics::EndSetClipRegion() +{ + m_pPrinterGfx->EndSetClipRegion (); +} + +void PspGraphics::SetLineColor() +{ + m_pPrinterGfx->SetLineColor (); +} + +void PspGraphics::SetLineColor( SalColor nSalColor ) +{ + psp::PrinterColor aColor (SALCOLOR_RED (nSalColor), + SALCOLOR_GREEN (nSalColor), + SALCOLOR_BLUE (nSalColor)); + m_pPrinterGfx->SetLineColor (aColor); +} + +void PspGraphics::SetFillColor() +{ + m_pPrinterGfx->SetFillColor (); +} + +void PspGraphics::SetFillColor( SalColor nSalColor ) +{ + psp::PrinterColor aColor (SALCOLOR_RED (nSalColor), + SALCOLOR_GREEN (nSalColor), + SALCOLOR_BLUE (nSalColor)); + m_pPrinterGfx->SetFillColor (aColor); +} + +void PspGraphics::SetROPLineColor( SalROPColor ) +{ + DBG_ASSERT( 0, "Error: PrinterGfx::SetROPLineColor() not implemented" ); +} + +void PspGraphics::SetROPFillColor( SalROPColor ) +{ + DBG_ASSERT( 0, "Error: PrinterGfx::SetROPFillColor() not implemented" ); +} + +void PspGraphics::SetXORMode( bool bSet, bool ) +{ + (void)bSet; + DBG_ASSERT( !bSet, "Error: PrinterGfx::SetXORMode() not implemented" ); +} + +void PspGraphics::drawPixel( long nX, long nY ) +{ + m_pPrinterGfx->DrawPixel (Point(nX, nY)); +} + +void PspGraphics::drawPixel( long nX, long nY, SalColor nSalColor ) +{ + psp::PrinterColor aColor (SALCOLOR_RED (nSalColor), + SALCOLOR_GREEN (nSalColor), + SALCOLOR_BLUE (nSalColor)); + m_pPrinterGfx->DrawPixel (Point(nX, nY), aColor); +} + +void PspGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 ) +{ + m_pPrinterGfx->DrawLine (Point(nX1, nY1), Point(nX2, nY2)); +} + +void PspGraphics::drawRect( long nX, long nY, long nDX, long nDY ) +{ + m_pPrinterGfx->DrawRect (Rectangle(Point(nX, nY), Size(nDX, nDY))); +} + +void PspGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry ) +{ + m_pPrinterGfx->DrawPolyLine (nPoints, (Point*)pPtAry); +} + +void PspGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry ) +{ + // Point must be equal to SalPoint! see vcl/inc/salgtype.hxx + m_pPrinterGfx->DrawPolygon (nPoints, (Point*)pPtAry); +} + +void PspGraphics::drawPolyPolygon( sal_uInt32 nPoly, + const sal_uInt32 *pPoints, + PCONSTSALPOINT *pPtAry ) +{ + m_pPrinterGfx->DrawPolyPolygon (nPoly, pPoints, (const Point**)pPtAry); +} + +bool PspGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double /*fTransparency*/ ) +{ + // TODO: implement and advertise OutDevSupport_B2DDraw support + return false; +} + +bool PspGraphics::drawPolyLine( const basegfx::B2DPolygon&, double /*fTranspareny*/, const basegfx::B2DVector& /*rLineWidths*/, basegfx::B2DLineJoin /*eJoin*/) +{ + // TODO: a PS printer can draw B2DPolyLines almost directly + return false; +} + +sal_Bool PspGraphics::drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) +{ + m_pPrinterGfx->DrawPolyLineBezier (nPoints, (Point*)pPtAry, pFlgAry); + return sal_True; +} + +sal_Bool PspGraphics::drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) +{ + m_pPrinterGfx->DrawPolygonBezier (nPoints, (Point*)pPtAry, pFlgAry); + return sal_True; +} + +sal_Bool PspGraphics::drawPolyPolygonBezier( sal_uInt32 nPoly, + const sal_uInt32* pPoints, + const SalPoint* const* pPtAry, + const BYTE* const* pFlgAry ) +{ + // Point must be equal to SalPoint! see vcl/inc/salgtype.hxx + m_pPrinterGfx->DrawPolyPolygonBezier (nPoly, pPoints, (Point**)pPtAry, (BYTE**)pFlgAry); + return sal_True; +} + +void PspGraphics::invert( ULONG, + const SalPoint*, + SalInvert ) +{ + DBG_ASSERT( 0, "Error: PrinterGfx::Invert() not implemented" ); +} +BOOL PspGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ) +{ + return m_pPrinterGfx->DrawEPS( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ), pPtr, nSize ); +} + +void PspGraphics::copyBits( const SalTwoRect*, + SalGraphics* ) +{ + DBG_ERROR( "Error: PrinterGfx::CopyBits() not implemented" ); +} + +void PspGraphics::copyArea ( long,long,long,long,long,long,USHORT ) +{ + DBG_ERROR( "Error: PrinterGfx::CopyArea() not implemented" ); +} + +void PspGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap ) +{ + Rectangle aSrc (Point(pPosAry->mnSrcX, pPosAry->mnSrcY), + Size(pPosAry->mnSrcWidth, pPosAry->mnSrcHeight)); + Rectangle aDst (Point(pPosAry->mnDestX, pPosAry->mnDestY), + Size(pPosAry->mnDestWidth, pPosAry->mnDestHeight)); + + BitmapBuffer* pBuffer= const_cast(rSalBitmap).AcquireBuffer(sal_True); + + SalPrinterBmp aBmp (pBuffer); + m_pPrinterGfx->DrawBitmap (aDst, aSrc, aBmp); + + const_cast(rSalBitmap).ReleaseBuffer (pBuffer, sal_True); +} + +void PspGraphics::drawBitmap( const SalTwoRect*, + const SalBitmap&, + const SalBitmap& ) +{ + DBG_ERROR("Error: no PrinterGfx::DrawBitmap() for transparent bitmap"); +} + +void PspGraphics::drawBitmap( const SalTwoRect*, + const SalBitmap&, + SalColor ) +{ + DBG_ERROR("Error: no PrinterGfx::DrawBitmap() for transparent color"); +} + +void PspGraphics::drawMask( const SalTwoRect*, + const SalBitmap &, + SalColor ) +{ + DBG_ERROR("Error: PrinterGfx::DrawMask() not implemented"); +} + +SalBitmap* PspGraphics::getBitmap( long, long, long, long ) +{ + DBG_WARNING ("Warning: PrinterGfx::GetBitmap() not implemented"); + return NULL; +} + +SalColor PspGraphics::getPixel( long, long ) +{ + DBG_ERROR ("Warning: PrinterGfx::GetPixel() not implemented"); + return 0; +} + +void PspGraphics::invert(long,long,long,long,SalInvert) +{ + DBG_ERROR ("Warning: PrinterGfx::Invert() not implemented"); +} + +//========================================================================== + +class ImplPspFontData : public ImplFontData +{ +private: + enum { PSPFD_MAGIC = 0xb5bf01f0 }; + sal_IntPtr mnFontId; + +public: + ImplPspFontData( const psp::FastPrintFontInfo& ); + virtual sal_IntPtr GetFontId() const { return mnFontId; } + virtual ImplFontData* Clone() const { return new ImplPspFontData( *this ); } + virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const; + static bool CheckFontData( const ImplFontData& r ) { return r.CheckMagic( PSPFD_MAGIC ); } +}; + +//-------------------------------------------------------------------------- + +ImplPspFontData::ImplPspFontData( const psp::FastPrintFontInfo& rInfo ) +: ImplFontData( PspGraphics::Info2DevFontAttributes(rInfo), PSPFD_MAGIC ), + mnFontId( rInfo.m_nID ) +{} + +//-------------------------------------------------------------------------- + +ImplFontEntry* ImplPspFontData::CreateFontInstance( ImplFontSelectData& rFSD ) const +{ + ImplServerFontEntry* pEntry = new ImplServerFontEntry( rFSD ); + return pEntry; +} + +//========================================================================== + +class PspFontLayout : public GenericSalLayout +{ +public: + PspFontLayout( ::psp::PrinterGfx& ); + virtual bool LayoutText( ImplLayoutArgs& ); + virtual void InitFont() const; + virtual void DrawText( SalGraphics& ) const; +private: + ::psp::PrinterGfx& mrPrinterGfx; + sal_IntPtr mnFontID; + int mnFontHeight; + int mnFontWidth; + bool mbVertical; + bool mbArtItalic; + bool mbArtBold; +}; + +//-------------------------------------------------------------------------- + +PspFontLayout::PspFontLayout( ::psp::PrinterGfx& rGfx ) +: mrPrinterGfx( rGfx ) +{ + mnFontID = mrPrinterGfx.GetFontID(); + mnFontHeight = mrPrinterGfx.GetFontHeight(); + mnFontWidth = mrPrinterGfx.GetFontWidth(); + mbVertical = mrPrinterGfx.GetFontVertical(); + mbArtItalic = mrPrinterGfx.GetArtificialItalic(); + mbArtBold = mrPrinterGfx.GetArtificialBold(); +} + +//-------------------------------------------------------------------------- + +bool PspFontLayout::LayoutText( ImplLayoutArgs& rArgs ) +{ + mbVertical = ((rArgs.mnFlags & SAL_LAYOUT_VERTICAL) != 0); + + long nUnitsPerPixel = 1; + int nOldGlyphId = -1; + long nGlyphWidth = 0; + int nCharPos = -1; + Point aNewPos( 0, 0 ); + GlyphItem aPrevItem; + rtl_TextEncoding aFontEnc = mrPrinterGfx.GetFontMgr().getFontEncoding( mnFontID ); + for(;;) + { + bool bRightToLeft; + if( !rArgs.GetNextPos( &nCharPos, &bRightToLeft ) ) + break; + + sal_Unicode cChar = rArgs.mpStr[ nCharPos ]; + if( bRightToLeft ) + cChar = GetMirroredChar( cChar ); + // symbol font aliasing: 0x0020-0x00ff -> 0xf020 -> 0xf0ff + if( aFontEnc == RTL_TEXTENCODING_SYMBOL ) + if( cChar < 256 ) + cChar += 0xf000; + int nGlyphIndex = cChar; // printer glyphs = unicode + + // update fallback_runs if needed + psp::CharacterMetric aMetric; + mrPrinterGfx.GetFontMgr().getMetrics( mnFontID, cChar, cChar, &aMetric, mbVertical ); + if( aMetric.width == -1 && aMetric.height == -1 ) + rArgs.NeedFallback( nCharPos, bRightToLeft ); + + // apply pair kerning to prev glyph if requested + if( SAL_LAYOUT_KERNING_PAIRS & rArgs.mnFlags ) + { + if( nOldGlyphId > 0 ) + { + const std::list< KernPair >& rKernPairs = mrPrinterGfx.getKernPairs(mbVertical); + for( std::list< KernPair >::const_iterator it = rKernPairs.begin(); + it != rKernPairs.end(); ++it ) + { + if( it->first == nOldGlyphId && it->second == nGlyphIndex ) + { + int nTextScale = mrPrinterGfx.GetFontWidth(); + if( ! nTextScale ) + nTextScale = mrPrinterGfx.GetFontHeight(); + int nKern = (mbVertical ? it->kern_y : it->kern_x) * nTextScale; + nGlyphWidth += nKern; + aPrevItem.mnNewWidth = nGlyphWidth; + break; + } + } + } + } + + // finish previous glyph + if( nOldGlyphId >= 0 ) + AppendGlyph( aPrevItem ); + nOldGlyphId = nGlyphIndex; + aNewPos.X() += nGlyphWidth; + + // prepare GlyphItem for appending it in next round + nUnitsPerPixel = mrPrinterGfx.GetCharWidth( cChar, cChar, &nGlyphWidth ); + int nGlyphFlags = bRightToLeft ? GlyphItem::IS_RTL_GLYPH : 0; + nGlyphIndex |= GF_ISCHAR; + aPrevItem = GlyphItem( nCharPos, nGlyphIndex, aNewPos, nGlyphFlags, nGlyphWidth ); + } + + // append last glyph item if any + if( nOldGlyphId >= 0 ) + AppendGlyph( aPrevItem ); + + SetOrientation( mrPrinterGfx.GetFontAngle() ); + SetUnitsPerPixel( nUnitsPerPixel ); + return (nOldGlyphId >= 0); +} + +class PspServerFontLayout : public ServerFontLayout +{ +public: + PspServerFontLayout( psp::PrinterGfx&, ServerFont& rFont, const ImplLayoutArgs& rArgs ); + + virtual void InitFont() const; + const sal_Unicode* getTextPtr() const { return maText.getStr() - mnMinCharPos; } + int getMinCharPos() const { return mnMinCharPos; } + int getMaxCharPos() const { return mnMinCharPos+maText.getLength()-1; } +private: + ::psp::PrinterGfx& mrPrinterGfx; + sal_IntPtr mnFontID; + int mnFontHeight; + int mnFontWidth; + bool mbVertical; + bool mbArtItalic; + bool mbArtBold; + rtl::OUString maText; + int mnMinCharPos; +}; + +PspServerFontLayout::PspServerFontLayout( ::psp::PrinterGfx& rGfx, ServerFont& rFont, const ImplLayoutArgs& rArgs ) + : ServerFontLayout( rFont ), + mrPrinterGfx( rGfx ) +{ + mnFontID = mrPrinterGfx.GetFontID(); + mnFontHeight = mrPrinterGfx.GetFontHeight(); + mnFontWidth = mrPrinterGfx.GetFontWidth(); + mbVertical = mrPrinterGfx.GetFontVertical(); + mbArtItalic = mrPrinterGfx.GetArtificialItalic(); + mbArtBold = mrPrinterGfx.GetArtificialBold(); + maText = OUString( rArgs.mpStr + rArgs.mnMinCharPos, rArgs.mnEndCharPos - rArgs.mnMinCharPos+1 ); + mnMinCharPos = rArgs.mnMinCharPos; +} + +void PspServerFontLayout::InitFont() const +{ + mrPrinterGfx.SetFont( mnFontID, mnFontHeight, mnFontWidth, + mnOrientation, mbVertical, mbArtItalic, mbArtBold ); +} + +//-------------------------------------------------------------------------- + +static void DrawPrinterLayout( const SalLayout& rLayout, ::psp::PrinterGfx& rGfx, bool bIsPspServerFontLayout ) +{ + const int nMaxGlyphs = 200; + sal_uInt32 aGlyphAry[ nMaxGlyphs ]; // TODO: use sal_GlyphId + sal_Int32 aWidthAry[ nMaxGlyphs ]; + sal_Int32 aIdxAry [ nMaxGlyphs ]; + sal_Unicode aUnicodes[ nMaxGlyphs ]; + int aCharPosAry [ nMaxGlyphs ]; + + Point aPos; + long nUnitsPerPixel = rLayout.GetUnitsPerPixel(); + const sal_Unicode* pText = NULL; + int nMinCharPos = 0; + int nMaxCharPos = 0; + if (bIsPspServerFontLayout) + { + const PspServerFontLayout * pPspLayout = dynamic_cast(&rLayout); +#ifdef ENABLE_GRAPHITE + const GraphiteServerFontLayout * pGrLayout = dynamic_cast(&rLayout); +#endif + if (pPspLayout) + { + pText = pPspLayout->getTextPtr(); + nMinCharPos = pPspLayout->getMinCharPos(); + nMaxCharPos = pPspLayout->getMaxCharPos(); + } +#ifdef ENABLE_GRAPHITE + else if (pGrLayout) + { + #if 0 // HACK: disabled for now due to #i114460#, see #desc12 there + // TODO: get rid of glyph->string mapping altogether for printing + // TODO: fix GraphiteServerFontLayout's returned aCharPosAry + // TODO: fix PrinterGfx's caching? + pText = pGrLayout->getTextPtr(); + nMinCharPos = pGrLayout->getMinCharPos(); + nMaxCharPos = pGrLayout->getMaxCharPos(); + #endif + } +#endif + } + for( int nStart = 0;; ) + { + int nGlyphCount = rLayout.GetNextGlyphs( nMaxGlyphs, aGlyphAry, aPos, nStart, aWidthAry, pText ? aCharPosAry : NULL ); + if( !nGlyphCount ) + break; + + sal_Int32 nXOffset = 0; + for( int i = 0; i < nGlyphCount; ++i ) + { + nXOffset += aWidthAry[ i ]; + aIdxAry[ i ] = nXOffset / nUnitsPerPixel; + sal_Int32 nGlyphIdx = aGlyphAry[i] & (GF_IDXMASK | GF_ROTMASK); + if( pText ) + aUnicodes[i] = (aCharPosAry[i] >= nMinCharPos && aCharPosAry[i] <= nMaxCharPos) ? pText[ aCharPosAry[i] ] : 0; + else + aUnicodes[i] = (aGlyphAry[i] & GF_ISCHAR) ? nGlyphIdx : 0; + aGlyphAry[i] = nGlyphIdx; + } + + rGfx.DrawGlyphs( aPos, (sal_uInt32 *)aGlyphAry, aUnicodes, nGlyphCount, aIdxAry ); + } +} + +//-------------------------------------------------------------------------- + +void PspFontLayout::InitFont() const +{ + mrPrinterGfx.SetFont( mnFontID, mnFontHeight, mnFontWidth, + mnOrientation, mbVertical, mbArtItalic, mbArtBold ); +} + +//-------------------------------------------------------------------------- + +void PspFontLayout::DrawText( SalGraphics& ) const +{ + DrawPrinterLayout( *this, mrPrinterGfx, false ); +} + +void PspGraphics::DrawServerFontLayout( const ServerFontLayout& rLayout ) +{ + // print complex text + DrawPrinterLayout( rLayout, *m_pPrinterGfx, true ); +} + +const ImplFontCharMap* PspGraphics::GetImplFontCharMap() const +{ + if( !m_pServerFont[0] ) + return NULL; + + const ImplFontCharMap* pIFCMap = m_pServerFont[0]->GetImplFontCharMap(); + return pIFCMap; +} + +USHORT PspGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel ) +{ + // release all fonts that are to be overridden + for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i ) + { + if( m_pServerFont[i] != NULL ) + { + // old server side font is no longer referenced + GlyphCache::GetInstance().UncacheFont( *m_pServerFont[i] ); + m_pServerFont[i] = NULL; + } + } + + // return early if there is no new font + if( !pEntry ) + return 0; + + sal_IntPtr nID = pEntry->mpFontData ? pEntry->mpFontData->GetFontId() : 0; + + // determine which font attributes need to be emulated + bool bArtItalic = false; + bool bArtBold = false; + if( pEntry->meItalic == ITALIC_OBLIQUE || pEntry->meItalic == ITALIC_NORMAL ) + { + psp::italic::type eItalic = m_pPrinterGfx->GetFontMgr().getFontItalic( nID ); + if( eItalic != psp::italic::Italic && eItalic != psp::italic::Oblique ) + bArtItalic = true; + } + int nWeight = (int)pEntry->meWeight; + int nRealWeight = (int)m_pPrinterGfx->GetFontMgr().getFontWeight( nID ); + if( nRealWeight <= (int)psp::weight::Medium && nWeight > (int)WEIGHT_MEDIUM ) + { + bArtBold = true; + } + + // also set the serverside font for layouting + m_bFontVertical = pEntry->mbVertical; + if( pEntry->mpFontData ) + { + // requesting a font provided by builtin rasterizer + ServerFont* pServerFont = GlyphCache::GetInstance().CacheFont( *pEntry ); + if( pServerFont != NULL ) + { + if( pServerFont->TestFont() ) + m_pServerFont[ nFallbackLevel ] = pServerFont; + else + GlyphCache::GetInstance().UncacheFont( *pServerFont ); + } + } + + // set the printer font + return m_pPrinterGfx->SetFont( nID, + pEntry->mnHeight, + pEntry->mnWidth, + pEntry->mnOrientation, + pEntry->mbVertical, + bArtItalic, + bArtBold + ); +} + +void PspGraphics::SetTextColor( SalColor nSalColor ) +{ + psp::PrinterColor aColor (SALCOLOR_RED (nSalColor), + SALCOLOR_GREEN (nSalColor), + SALCOLOR_BLUE (nSalColor)); + m_pPrinterGfx->SetTextColor (aColor); +} + +bool PspGraphics::AddTempDevFont( ImplDevFontList*, const String&,const String& ) +{ + return false; +} + +void RegisterFontSubstitutors( ImplDevFontList* ); + +void PspGraphics::GetDevFontList( ImplDevFontList *pList ) +{ + ::std::list< psp::fontID > aList; + psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); + rMgr.getFontList( aList, m_pJobData->m_pParser, m_pInfoPrinter->m_bCompatMetrics ); + + ::std::list< psp::fontID >::iterator it; + psp::FastPrintFontInfo aInfo; + for (it = aList.begin(); it != aList.end(); ++it) + if (rMgr.getFontFastInfo (*it, aInfo)) + AnnounceFonts( pList, aInfo ); + + // register platform specific font substitutions if available + if( rMgr.hasFontconfig() ) + RegisterFontSubstitutors( pList ); +} + +void PspGraphics::GetDevFontSubstList( OutputDevice* pOutDev ) +{ + const psp::PrinterInfo& rInfo = psp::PrinterInfoManager::get().getPrinterInfo( m_pJobData->m_aPrinterName ); + if( rInfo.m_bPerformFontSubstitution ) + { + for( std::hash_map< rtl::OUString, rtl::OUString, rtl::OUStringHash >::const_iterator it = rInfo.m_aFontSubstitutes.begin(); it != rInfo.m_aFontSubstitutes.end(); ++it ) + pOutDev->ImplAddDevFontSubstitute( it->first, it->second, FONT_SUBSTITUTE_ALWAYS ); + } +} + +void PspGraphics::GetFontMetric( ImplFontMetricData *pMetric, int ) +{ + const psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); + psp::PrintFontInfo aInfo; + + if (rMgr.getFontInfo (m_pPrinterGfx->GetFontID(), aInfo)) + { + ImplDevFontAttributes aDFA = Info2DevFontAttributes( aInfo ); + static_cast(*pMetric) = aDFA; + pMetric->mbDevice = aDFA.mbDevice; + pMetric->mbScalableFont = true; + + pMetric->mnOrientation = m_pPrinterGfx->GetFontAngle(); + pMetric->mnSlant = 0; + + sal_Int32 nTextHeight = m_pPrinterGfx->GetFontHeight(); + sal_Int32 nTextWidth = m_pPrinterGfx->GetFontWidth(); + if( ! nTextWidth ) + nTextWidth = nTextHeight; + + pMetric->mnWidth = nTextWidth; + pMetric->mnAscent = ( aInfo.m_nAscend * nTextHeight + 500 ) / 1000; + pMetric->mnDescent = ( aInfo.m_nDescend * nTextHeight + 500 ) / 1000; + pMetric->mnIntLeading = ( aInfo.m_nLeading * nTextHeight + 500 ) / 1000; + pMetric->mnExtLeading = 0; + } +} + +ULONG PspGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs ) +{ + const ::std::list< ::psp::KernPair >& rPairs( m_pPrinterGfx->getKernPairs() ); + ULONG nHavePairs = rPairs.size(); + if( pKernPairs && nPairs ) + { + ::std::list< ::psp::KernPair >::const_iterator it; + unsigned int i; + int nTextScale = m_pPrinterGfx->GetFontWidth(); + if( ! nTextScale ) + nTextScale = m_pPrinterGfx->GetFontHeight(); + for( i = 0, it = rPairs.begin(); i < nPairs && i < nHavePairs; i++, ++it ) + { + pKernPairs[i].mnChar1 = it->first; + pKernPairs[i].mnChar2 = it->second; + pKernPairs[i].mnKern = it->kern_x * nTextScale / 1000; + } + + } + return nHavePairs; +} + +BOOL PspGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect ) +{ + int nLevel = nGlyphIndex >> GF_FONTSHIFT; + if( nLevel >= MAX_FALLBACK ) + return FALSE; + + ServerFont* pSF = m_pServerFont[ nLevel ]; + if( !pSF ) + return FALSE; + + nGlyphIndex &= ~GF_FONTMASK; + const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex ); + rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() ); + return TRUE; +} + +BOOL PspGraphics::GetGlyphOutline( long nGlyphIndex, + ::basegfx::B2DPolyPolygon& rB2DPolyPoly ) +{ + int nLevel = nGlyphIndex >> GF_FONTSHIFT; + if( nLevel >= MAX_FALLBACK ) + return FALSE; + + ServerFont* pSF = m_pServerFont[ nLevel ]; + if( !pSF ) + return FALSE; + + nGlyphIndex &= ~GF_FONTMASK; + if( pSF->GetGlyphOutline( nGlyphIndex, rB2DPolyPoly ) ) + return TRUE; + + return FALSE; +} + +SalLayout* PspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel ) +{ + // workaround for printers not handling glyph indexing for non-TT fonts + int nFontId = m_pPrinterGfx->GetFontID(); + if( psp::fonttype::TrueType != psp::PrintFontManager::get().getFontType( nFontId ) ) + rArgs.mnFlags |= SAL_LAYOUT_DISABLE_GLYPH_PROCESSING; + else if( nFallbackLevel > 0 ) + rArgs.mnFlags &= ~SAL_LAYOUT_DISABLE_GLYPH_PROCESSING; + + GenericSalLayout* pLayout = NULL; + + if( m_pServerFont[ nFallbackLevel ] + && !(rArgs.mnFlags & SAL_LAYOUT_DISABLE_GLYPH_PROCESSING) ) + { +#ifdef ENABLE_GRAPHITE + // Is this a Graphite font? + if (GraphiteFontAdaptor::IsGraphiteEnabledFont(*m_pServerFont[nFallbackLevel])) + { + sal_Int32 xdpi, ydpi; + GetResolution(xdpi, ydpi); + GraphiteFontAdaptor * pGrfont = new GraphiteFontAdaptor( *m_pServerFont[nFallbackLevel], xdpi, ydpi); + if (!pGrfont) return NULL; + pLayout = new GraphiteServerFontLayout(pGrfont); + } + else +#endif + pLayout = new PspServerFontLayout( *m_pPrinterGfx, *m_pServerFont[nFallbackLevel], rArgs ); + } + else + pLayout = new PspFontLayout( *m_pPrinterGfx ); + + return pLayout; +} + +//-------------------------------------------------------------------------- + +BOOL PspGraphics::CreateFontSubset( + const rtl::OUString& rToFile, + const ImplFontData* pFont, + sal_Int32* pGlyphIDs, + sal_uInt8* pEncoding, + sal_Int32* pWidths, + int nGlyphCount, + FontSubsetInfo& rInfo + ) +{ + // in this context the pFont->GetFontId() is a valid PSP + // font since they are the only ones left after the PDF + // export has filtered its list of subsettable fonts (for + // which this method was created). The correct way would + // be to have the GlyphCache search for the ImplFontData pFont + psp::fontID aFont = pFont->GetFontId(); + + psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); + bool bSuccess = rMgr.createFontSubset( rInfo, + aFont, + rToFile, + pGlyphIDs, + pEncoding, + pWidths, + nGlyphCount ); + return bSuccess; +} + +//-------------------------------------------------------------------------- + +const void* PspGraphics::GetEmbedFontData( const ImplFontData* pFont, const sal_Ucs* pUnicodes, sal_Int32* pWidths, FontSubsetInfo& rInfo, long* pDataLen ) +{ + // in this context the pFont->GetFontId() is a valid PSP + // font since they are the only ones left after the PDF + // export has filtered its list of subsettable fonts (for + // which this method was created). The correct way would + // be to have the GlyphCache search for the ImplFontData pFont + psp::fontID aFont = pFont->GetFontId(); + return PspGraphics::DoGetEmbedFontData( aFont, pUnicodes, pWidths, rInfo, pDataLen ); +} + +//-------------------------------------------------------------------------- + +void PspGraphics::FreeEmbedFontData( const void* pData, long nLen ) +{ + PspGraphics::DoFreeEmbedFontData( pData, nLen ); +} + +//-------------------------------------------------------------------------- + +const Ucs2SIntMap* PspGraphics::GetFontEncodingVector( const ImplFontData* pFont, const Ucs2OStrMap** pNonEncoded ) +{ + // in this context the pFont->GetFontId() is a valid PSP + // font since they are the only ones left after the PDF + // export has filtered its list of subsettable fonts (for + // which this method was created). The correct way would + // be to have the GlyphCache search for the ImplFontData pFont + psp::fontID aFont = pFont->GetFontId(); + return PspGraphics::DoGetFontEncodingVector( aFont, pNonEncoded ); +} + +//-------------------------------------------------------------------------- + +void PspGraphics::GetGlyphWidths( const ImplFontData* pFont, + bool bVertical, + Int32Vector& rWidths, + Ucs2UIntMap& rUnicodeEnc ) +{ + // in this context the pFont->GetFontId() is a valid PSP + // font since they are the only ones left after the PDF + // export has filtered its list of subsettable fonts (for + // which this method was created). The correct way would + // be to have the GlyphCache search for the ImplFontData pFont + psp::fontID aFont = pFont->GetFontId(); + PspGraphics::DoGetGlyphWidths( aFont, bVertical, rWidths, rUnicodeEnc ); +} + + +// static helpers of PspGraphics + +const void* PspGraphics::DoGetEmbedFontData( fontID aFont, const sal_Ucs* pUnicodes, sal_Int32* pWidths, FontSubsetInfo& rInfo, long* pDataLen ) +{ + psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); + + psp::PrintFontInfo aFontInfo; + if( ! rMgr.getFontInfo( aFont, aFontInfo ) ) + return NULL; + + // fill in font info + rInfo.m_nAscent = aFontInfo.m_nAscend; + rInfo.m_nDescent = aFontInfo.m_nDescend; + rInfo.m_aPSName = rMgr.getPSName( aFont ); + + int xMin, yMin, xMax, yMax; + rMgr.getFontBoundingBox( aFont, xMin, yMin, xMax, yMax ); + + psp::CharacterMetric aMetrics[256]; + sal_Ucs aUnicodes[256]; + if( aFontInfo.m_aEncoding == RTL_TEXTENCODING_SYMBOL && aFontInfo.m_eType == psp::fonttype::Type1 ) + { + for( int i = 0; i < 256; i++ ) + aUnicodes[i] = pUnicodes[i] < 0x0100 ? pUnicodes[i] + 0xf000 : pUnicodes[i]; + pUnicodes = aUnicodes; + } + if( ! rMgr.getMetrics( aFont, pUnicodes, 256, aMetrics ) ) + return NULL; + + OString aSysPath = rMgr.getFontFileSysPath( aFont ); + struct stat aStat; + if( stat( aSysPath.getStr(), &aStat ) ) + return NULL; + int fd = open( aSysPath.getStr(), O_RDONLY ); + if( fd < 0 ) + return NULL; + void* pFile = mmap( NULL, aStat.st_size, PROT_READ, MAP_SHARED, fd, 0 ); + close( fd ); + if( pFile == MAP_FAILED ) + return NULL; + + *pDataLen = aStat.st_size; + + rInfo.m_aFontBBox = Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) ); + rInfo.m_nCapHeight = yMax; // Well ... + + for( int i = 0; i < 256; i++ ) + pWidths[i] = (aMetrics[i].width > 0 ? aMetrics[i].width : 0); + + switch( aFontInfo.m_eType ) + { + case psp::fonttype::TrueType: + rInfo.m_nFontType = FontSubsetInfo::SFNT_TTF; + break; + case psp::fonttype::Type1: { + const bool bPFA = ((*(unsigned char*)pFile) < 0x80); + rInfo.m_nFontType = bPFA ? FontSubsetInfo::TYPE1_PFA : FontSubsetInfo::TYPE1_PFB; + } + break; + default: + return NULL; + } + + return pFile; +} + +void PspGraphics::DoFreeEmbedFontData( const void* pData, long nLen ) +{ + if( pData ) + munmap( (char*)pData, nLen ); +} + +const Ucs2SIntMap* PspGraphics::DoGetFontEncodingVector( fontID aFont, const Ucs2OStrMap** pNonEncoded ) +{ + psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); + + psp::PrintFontInfo aFontInfo; + if( ! rMgr.getFontInfo( aFont, aFontInfo ) ) + { + if( pNonEncoded ) + *pNonEncoded = NULL; + return NULL; + } + + return rMgr.getEncodingMap( aFont, pNonEncoded ); +} + +void PspGraphics::DoGetGlyphWidths( psp::fontID aFont, + bool bVertical, + Int32Vector& rWidths, + Ucs2UIntMap& rUnicodeEnc ) +{ + psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); + rMgr.getGlyphWidths( aFont, bVertical, rWidths, rUnicodeEnc ); +} +// ---------------------------------------------------------------------------- + +FontWidth PspGraphics::ToFontWidth (psp::width::type eWidth) +{ + switch (eWidth) + { + case psp::width::UltraCondensed: return WIDTH_ULTRA_CONDENSED; + case psp::width::ExtraCondensed: return WIDTH_EXTRA_CONDENSED; + case psp::width::Condensed: return WIDTH_CONDENSED; + case psp::width::SemiCondensed: return WIDTH_SEMI_CONDENSED; + case psp::width::Normal: return WIDTH_NORMAL; + case psp::width::SemiExpanded: return WIDTH_SEMI_EXPANDED; + case psp::width::Expanded: return WIDTH_EXPANDED; + case psp::width::ExtraExpanded: return WIDTH_EXTRA_EXPANDED; + case psp::width::UltraExpanded: return WIDTH_ULTRA_EXPANDED; + case psp::width::Unknown: return WIDTH_DONTKNOW; + default: + DBG_ERROR( "unknown width mapping" ); + break; + } + return WIDTH_DONTKNOW; +} + +FontWeight PspGraphics::ToFontWeight (psp::weight::type eWeight) +{ + switch (eWeight) + { + case psp::weight::Thin: return WEIGHT_THIN; + case psp::weight::UltraLight: return WEIGHT_ULTRALIGHT; + case psp::weight::Light: return WEIGHT_LIGHT; + case psp::weight::SemiLight: return WEIGHT_SEMILIGHT; + case psp::weight::Normal: return WEIGHT_NORMAL; + case psp::weight::Medium: return WEIGHT_MEDIUM; + case psp::weight::SemiBold: return WEIGHT_SEMIBOLD; + case psp::weight::Bold: return WEIGHT_BOLD; + case psp::weight::UltraBold: return WEIGHT_ULTRABOLD; + case psp::weight::Black: return WEIGHT_BLACK; + case psp::weight::Unknown: return WEIGHT_DONTKNOW; + default: + DBG_ERROR( "unknown weight mapping" ); + break; + } + return WEIGHT_DONTKNOW; +} + +FontPitch PspGraphics::ToFontPitch (psp::pitch::type ePitch) +{ + switch (ePitch) + { + case psp::pitch::Fixed: return PITCH_FIXED; + case psp::pitch::Variable: return PITCH_VARIABLE; + case psp::pitch::Unknown: return PITCH_DONTKNOW; + default: + DBG_ERROR( "unknown pitch mapping" ); + break; + } + return PITCH_DONTKNOW; +} + +FontItalic PspGraphics::ToFontItalic (psp::italic::type eItalic) +{ + switch (eItalic) + { + case psp::italic::Upright: return ITALIC_NONE; + case psp::italic::Oblique: return ITALIC_OBLIQUE; + case psp::italic::Italic: return ITALIC_NORMAL; + case psp::italic::Unknown: return ITALIC_DONTKNOW; + default: + DBG_ERROR( "unknown italic mapping" ); + break; + } + return ITALIC_DONTKNOW; +} + +FontFamily PspGraphics::ToFontFamily (psp::family::type eFamily) +{ + switch (eFamily) + { + case psp::family::Decorative: return FAMILY_DECORATIVE; + case psp::family::Modern: return FAMILY_MODERN; + case psp::family::Roman: return FAMILY_ROMAN; + case psp::family::Script: return FAMILY_SCRIPT; + case psp::family::Swiss: return FAMILY_SWISS; + case psp::family::System: return FAMILY_SYSTEM; + case psp::family::Unknown: return FAMILY_DONTKNOW; + default: + DBG_ERROR( "unknown family mapping" ); + break; + } + return FAMILY_DONTKNOW; +} + +ImplDevFontAttributes PspGraphics::Info2DevFontAttributes( const psp::FastPrintFontInfo& rInfo ) +{ + ImplDevFontAttributes aDFA; + aDFA.maName = rInfo.m_aFamilyName; + aDFA.maStyleName = rInfo.m_aStyleName; + aDFA.meFamily = ToFontFamily (rInfo.m_eFamilyStyle); + aDFA.meWeight = ToFontWeight (rInfo.m_eWeight); + aDFA.meItalic = ToFontItalic (rInfo.m_eItalic); + aDFA.meWidthType = ToFontWidth (rInfo.m_eWidth); + aDFA.mePitch = ToFontPitch (rInfo.m_ePitch); + aDFA.mbSymbolFlag = (rInfo.m_aEncoding == RTL_TEXTENCODING_SYMBOL); + aDFA.mbSubsettable = rInfo.m_bSubsettable; + aDFA.mbEmbeddable = rInfo.m_bEmbeddable; + + switch( rInfo.m_eType ) + { + case psp::fonttype::Builtin: + aDFA.mnQuality = 1024; + aDFA.mbDevice = true; + break; + case psp::fonttype::TrueType: + aDFA.mnQuality = 512; + aDFA.mbDevice = false; + break; + case psp::fonttype::Type1: + aDFA.mnQuality = 0; + aDFA.mbDevice = false; + break; + default: + aDFA.mnQuality = 0; + aDFA.mbDevice = false; + break; + } + + aDFA.mbOrientation = true; + + // add font family name aliases + ::std::list< OUString >::const_iterator it = rInfo.m_aAliases.begin(); + bool bHasMapNames = false; + for(; it != rInfo.m_aAliases.end(); ++it ) + { + if( bHasMapNames ) + aDFA.maMapNames.Append( ';' ); + aDFA.maMapNames.Append( (*it).getStr() ); + bHasMapNames = true; + } + +#if OSL_DEBUG_LEVEL > 2 + if( bHasMapNames ) + { + ByteString aOrigName( aDFA.maName, osl_getThreadTextEncoding() ); + ByteString aAliasNames( aDFA.maMapNames, osl_getThreadTextEncoding() ); + fprintf( stderr, "using alias names \"%s\" for font family \"%s\"\n", + aAliasNames.GetBuffer(), aOrigName.GetBuffer() ); + } +#endif + + return aDFA; +} + +// ----------------------------------------------------------------------- + +void PspGraphics::AnnounceFonts( ImplDevFontList* pFontList, const psp::FastPrintFontInfo& aInfo ) +{ + int nQuality = 0; + + if( aInfo.m_eType == psp::fonttype::TrueType ) + { + // asian type 1 fonts are not known + psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); + ByteString aFileName( rMgr.getFontFileSysPath( aInfo.m_nID ) ); + int nPos = aFileName.SearchBackward( '_' ); + if( nPos == STRING_NOTFOUND || aFileName.GetChar( nPos+1 ) == '.' ) + nQuality += 5; + else + { + static const char* pLangBoost = NULL; + static bool bOnce = true; + if( bOnce ) + { + bOnce = false; + const LanguageType aLang = Application::GetSettings().GetUILanguage(); + switch( aLang ) + { + case LANGUAGE_JAPANESE: + pLangBoost = "jan"; + break; + case LANGUAGE_CHINESE: + case LANGUAGE_CHINESE_SIMPLIFIED: + case LANGUAGE_CHINESE_SINGAPORE: + pLangBoost = "zhs"; + break; + case LANGUAGE_CHINESE_TRADITIONAL: + case LANGUAGE_CHINESE_HONGKONG: + case LANGUAGE_CHINESE_MACAU: + pLangBoost = "zht"; + break; + case LANGUAGE_KOREAN: + case LANGUAGE_KOREAN_JOHAB: + pLangBoost = "kor"; + break; + } + } + + if( pLangBoost ) + if( aFileName.Copy( nPos+1, 3 ).EqualsIgnoreCaseAscii( pLangBoost ) ) + nQuality += 10; + } + } + + ImplPspFontData* pFD = new ImplPspFontData( aInfo ); + pFD->mnQuality += nQuality; + pFontList->Add( pFD ); +} + +bool PspGraphics::filterText( const String& rOrig, String& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop ) +{ + if( ! m_pPhoneNr ) + return false; + + rCutStop = rCutStart = STRING_NOTFOUND; + +#define FAX_PHONE_TOKEN "@@#" +#define FAX_PHONE_TOKEN_LENGTH 3 +#define FAX_END_TOKEN "@@" +#define FAX_END_TOKEN_LENGTH 2 + + bool bRet = false; + bool bStarted = false; + bool bStopped = false; + USHORT nPos; + USHORT nStart = 0; + USHORT nStop = rLen; + String aPhone = rOrig.Copy( nIndex, rLen ); + + if( ! m_bPhoneCollectionActive ) + { + if( ( nPos = aPhone.SearchAscii( FAX_PHONE_TOKEN ) ) != STRING_NOTFOUND ) + { + nStart = nPos; + m_bPhoneCollectionActive = true; + m_aPhoneCollection.Erase(); + bRet = true; + bStarted = true; + } + } + if( m_bPhoneCollectionActive ) + { + bRet = true; + nPos = bStarted ? nStart + FAX_PHONE_TOKEN_LENGTH : 0; + if( ( nPos = aPhone.SearchAscii( FAX_END_TOKEN, nPos ) ) != STRING_NOTFOUND ) + { + m_bPhoneCollectionActive = false; + nStop = nPos + FAX_END_TOKEN_LENGTH; + bStopped = true; + } + int nTokenStart = nStart + (bStarted ? FAX_PHONE_TOKEN_LENGTH : 0); + int nTokenStop = nStop - (bStopped ? FAX_END_TOKEN_LENGTH : 0); + m_aPhoneCollection += aPhone.Copy( nTokenStart, nTokenStop - nTokenStart ); + if( ! m_bPhoneCollectionActive ) + { + m_pPhoneNr->AppendAscii( "" ); + m_pPhoneNr->Append( m_aPhoneCollection ); + m_pPhoneNr->AppendAscii( "" ); + m_aPhoneCollection.Erase(); + } + } + if( m_aPhoneCollection.Len() > 1024 ) + { + m_bPhoneCollectionActive = false; + m_aPhoneCollection.Erase(); + bRet = false; + } + + if( bRet && m_bSwallowFaxNo ) + { + rLen -= nStop - nStart; + rCutStart = nStart+nIndex; + rCutStop = nStop+nIndex; + if( rCutStart ) + rNewText = rOrig.Copy( 0, rCutStart ); + rNewText += rOrig.Copy( rCutStop ); + } + + return bRet && m_bSwallowFaxNo; +} + +bool PspGraphics::drawAlphaBitmap( const SalTwoRect&, + const SalBitmap&, + const SalBitmap& ) +{ + return false; +} + +bool PspGraphics::drawAlphaRect( long, long, long, long, sal_uInt8 ) +{ + return false; +} + +SystemGraphicsData PspGraphics::GetGraphicsData() const +{ + SystemGraphicsData aRes; + aRes.nSize = sizeof(aRes); + aRes.hDrawable = 0; + aRes.pRenderFormat = 0; + return aRes; +} + +SystemFontData PspGraphics::GetSysFontData( int nFallbacklevel ) const +{ + SystemFontData aSysFontData; + + if (nFallbacklevel >= MAX_FALLBACK) nFallbacklevel = MAX_FALLBACK - 1; + if (nFallbacklevel < 0 ) nFallbacklevel = 0; + + aSysFontData.nSize = sizeof( SystemFontData ); + aSysFontData.nFontId = 0; + aSysFontData.nFontFlags = 0; + aSysFontData.bFakeBold = false; + aSysFontData.bFakeItalic = false; + aSysFontData.bAntialias = true; + return aSysFontData; +} + +bool PspGraphics::supportsOperation( OutDevSupportType ) const +{ + return false; +} diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx new file mode 100644 index 000000000000..88a22e6537bf --- /dev/null +++ b/vcl/unx/generic/gdi/salbmp.cxx @@ -0,0 +1,1096 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include +#include +#ifdef FREEBSD +#include +#endif + +#include +#include + +#include +#include + +#include +#include "unx/Xproto.h" +#include +#include +#include +#include +#include +#include +#include + +// ----------- +// - Defines - +// ----------- + +#define SAL_DRAWPIXMAP_MAX_EXT 4096 + +// ------------- +// - SalBitmap - +// ------------- + +SalBitmap* X11SalInstance::CreateSalBitmap() +{ + return new X11SalBitmap(); +} + +ImplSalBitmapCache* X11SalBitmap::mpCache = NULL; +ULONG X11SalBitmap::mnCacheInstCount = 0; + +// ----------------------------------------------------------------------------- + +X11SalBitmap::X11SalBitmap() : + mpDIB( NULL ), + mpDDB( NULL ) +{ +} + +// ----------------------------------------------------------------------------- + +X11SalBitmap::~X11SalBitmap() +{ + Destroy(); +} + +// ----------------------------------------------------------------------------- + +void X11SalBitmap::ImplCreateCache() +{ + if( !mnCacheInstCount++ ) + mpCache = new ImplSalBitmapCache; +} + +// ----------------------------------------------------------------------------- + +void X11SalBitmap::ImplDestroyCache() +{ + DBG_ASSERT( mnCacheInstCount, "X11SalBitmap::ImplDestroyCache(): underflow" ); + + if( mnCacheInstCount && !--mnCacheInstCount ) + delete mpCache, mpCache = NULL; +} + +// ----------------------------------------------------------------------------- + +void X11SalBitmap::ImplRemovedFromCache() +{ + if( mpDDB ) + delete mpDDB, mpDDB = NULL; +} + +// ----------------------------------------------------------------------------- + +BitmapBuffer* X11SalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ) +{ + DBG_ASSERT( nBitCount == 1 || nBitCount == 4 || nBitCount == 8 || nBitCount == 16 || nBitCount == 24, "Unsupported BitCount!" ); + + BitmapBuffer* pDIB = NULL; + + if( rSize.Width() && rSize.Height() ) + { + try + { + pDIB = new BitmapBuffer; + } + catch( std::bad_alloc& ) + { + pDIB = NULL; + } + + if( pDIB ) + { + const USHORT nColors = ( nBitCount <= 8 ) ? ( 1 << nBitCount ) : 0; + + pDIB->mnFormat = BMP_FORMAT_BOTTOM_UP; + + switch( nBitCount ) + { + case( 1 ): pDIB->mnFormat |= BMP_FORMAT_1BIT_MSB_PAL; break; + case( 4 ): pDIB->mnFormat |= BMP_FORMAT_4BIT_MSN_PAL; break; + case( 8 ): pDIB->mnFormat |= BMP_FORMAT_8BIT_PAL; break; +#ifdef OSL_BIGENDIAN + case(16 ): + pDIB->mnFormat|= BMP_FORMAT_16BIT_TC_MSB_MASK; + pDIB->maColorMask = ColorMask( 0xf800, 0x07e0, 0x001f ); + break; +#else + case(16 ): + pDIB->mnFormat|= BMP_FORMAT_16BIT_TC_LSB_MASK; + pDIB->maColorMask = ColorMask( 0xf800, 0x07e0, 0x001f ); + break; +#endif + default: + nBitCount = 24; + //fall through + case 24: + pDIB->mnFormat |= BMP_FORMAT_24BIT_TC_BGR; + break; + } + + pDIB->mnWidth = rSize.Width(); + pDIB->mnHeight = rSize.Height(); + pDIB->mnScanlineSize = AlignedWidth4Bytes( pDIB->mnWidth * nBitCount ); + pDIB->mnBitCount = nBitCount; + + if( nColors ) + { + pDIB->maPalette = rPal; + pDIB->maPalette.SetEntryCount( nColors ); + } + + try + { + pDIB->mpBits = new BYTE[ pDIB->mnScanlineSize * pDIB->mnHeight ]; + } + catch(std::bad_alloc&) + { + delete pDIB; + pDIB = NULL; + } + } + } + else + pDIB = NULL; + + return pDIB; +} + +// ----------------------------------------------------------------------------- + +BitmapBuffer* X11SalBitmap::ImplCreateDIB( Drawable aDrawable, + int nScreen, + long nDrawableDepth, + long nX, long nY, + long nWidth, long nHeight ) +{ + BitmapBuffer* pDIB = NULL; + + if( aDrawable && nWidth && nHeight && nDrawableDepth ) + { + SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); + SalXLib* pXLib = pSalDisp->GetXLib(); + Display* pXDisp = pSalDisp->GetDisplay(); + + // do not die on XError here + // alternatively one could check the coordinates for being offscreen + // but this call can actually work on servers with backing store + // defaults even if the rectangle is offscreen + // so better catch the XError + pXLib->PushXErrorLevel( true ); + XImage* pImage = XGetImage( pXDisp, aDrawable, nX, nY, nWidth, nHeight, AllPlanes, ZPixmap ); + bool bWasError = pXLib->HasXErrorOccured() && pXLib->GetLastXErrorRequestCode() == X_GetImage; + pXLib->PopXErrorLevel(); + + if( ! bWasError && pImage && pImage->data ) + { + const SalTwoRect aTwoRect = { 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight }; + BitmapBuffer aSrcBuf; + ULONG nDstFormat = BMP_FORMAT_BOTTOM_UP; + const BitmapPalette* pDstPal = NULL; + + aSrcBuf.mnFormat = BMP_FORMAT_TOP_DOWN; + aSrcBuf.mnWidth = nWidth; + aSrcBuf.mnHeight = nHeight; + aSrcBuf.mnBitCount = pImage->bits_per_pixel; + aSrcBuf.mnScanlineSize = pImage->bytes_per_line; + aSrcBuf.mpBits = (BYTE*) pImage->data; + + pImage->red_mask = pSalDisp->GetVisual( nScreen ).red_mask; + pImage->green_mask = pSalDisp->GetVisual( nScreen ).green_mask; + pImage->blue_mask = pSalDisp->GetVisual( nScreen ).blue_mask; + + switch( aSrcBuf.mnBitCount ) + { + case( 1 ): + { + aSrcBuf.mnFormat |= ( LSBFirst == pImage->bitmap_bit_order ? BMP_FORMAT_1BIT_LSB_PAL : BMP_FORMAT_1BIT_MSB_PAL ); + nDstFormat |= BMP_FORMAT_1BIT_MSB_PAL; + } + break; + + case( 4 ): + { + aSrcBuf.mnFormat |= ( LSBFirst == pImage->bitmap_bit_order ? BMP_FORMAT_4BIT_LSN_PAL : BMP_FORMAT_4BIT_MSN_PAL ); + nDstFormat |= BMP_FORMAT_4BIT_MSN_PAL; + } + break; + + case( 8 ): + { + aSrcBuf.mnFormat |= BMP_FORMAT_8BIT_PAL; + nDstFormat |= BMP_FORMAT_8BIT_PAL; + } + break; + + case( 16 ): + { + nDstFormat |= BMP_FORMAT_24BIT_TC_BGR; + aSrcBuf.maColorMask = ColorMask( pImage->red_mask, pImage->green_mask, pImage->blue_mask ); + + if( LSBFirst == pImage->byte_order ) + { + aSrcBuf.mnFormat |= BMP_FORMAT_16BIT_TC_LSB_MASK; + } + else + { + aSrcBuf.mnFormat |= BMP_FORMAT_16BIT_TC_MSB_MASK; + // aSrcBuf.maColorMask = ColorMask( pImage->red_mask ), SWAPSHORT( pImage->green_mask ), SWAPSHORT( pImage->blue_mask ) ); + } + } + break; + + case( 24 ): + { + if( ( LSBFirst == pImage->byte_order ) && ( pImage->red_mask == 0xFF ) ) + aSrcBuf.mnFormat |= BMP_FORMAT_24BIT_TC_RGB; + else + aSrcBuf.mnFormat |= BMP_FORMAT_24BIT_TC_BGR; + + nDstFormat |= BMP_FORMAT_24BIT_TC_BGR; + } + break; + + case( 32 ): + { + if( LSBFirst == pImage->byte_order ) + aSrcBuf.mnFormat |= ( pSalDisp->GetVisual(nScreen).red_mask == 0xFF ? BMP_FORMAT_32BIT_TC_RGBA : BMP_FORMAT_32BIT_TC_BGRA ); + else + aSrcBuf.mnFormat |= ( pSalDisp->GetVisual(nScreen).red_mask == 0xFF ? BMP_FORMAT_32BIT_TC_ABGR : BMP_FORMAT_32BIT_TC_ARGB ); + + nDstFormat |= BMP_FORMAT_24BIT_TC_BGR; + } + break; + } + + BitmapPalette& rPal = aSrcBuf.maPalette; + + if( aSrcBuf.mnBitCount == 1 ) + { + rPal.SetEntryCount( 2 ); + pDstPal = &rPal; + + rPal[ 0 ] = Color( COL_BLACK ); + rPal[ 1 ] = Color( COL_WHITE ); + } + else if( aSrcBuf.mnBitCount <= 8 ) + { + const SalColormap& rColMap = pSalDisp->GetColormap( nScreen ); + const USHORT nCols = Min( (ULONG)rColMap.GetUsed(), (ULONG)(1 << nDrawableDepth) ); + + rPal.SetEntryCount( nCols ); + pDstPal = &rPal; + + for( USHORT i = 0; i < nCols; i++ ) + { + const SalColor nColor( rColMap.GetColor( i ) ); + BitmapColor& rBmpCol = rPal[ i ]; + + rBmpCol.SetRed( SALCOLOR_RED( nColor ) ); + rBmpCol.SetGreen( SALCOLOR_GREEN( nColor ) ); + rBmpCol.SetBlue( SALCOLOR_BLUE( nColor ) ); + } + } + + nDstFormat = aSrcBuf.mnFormat; + pDIB = StretchAndConvert( aSrcBuf, aTwoRect, nDstFormat, + const_cast(pDstPal), &aSrcBuf.maColorMask ); + XDestroyImage( pImage ); + } + } + + return pDIB; +} + +// ----------------------------------------------------------------------------- + +XImage* X11SalBitmap::ImplCreateXImage( SalDisplay *pSalDisp, int nScreen, long nDepth, const SalTwoRect& rTwoRect ) const +{ + XImage* pImage = NULL; + + if( !mpDIB && mpDDB ) + { + const_cast(this)->mpDIB = + ImplCreateDIB( mpDDB->ImplGetPixmap(), + mpDDB->ImplGetScreen(), + mpDDB->ImplGetDepth(), + 0, 0, + mpDDB->ImplGetWidth(), + mpDDB->ImplGetHeight() ); + } + + if( mpDIB && mpDIB->mnWidth && mpDIB->mnHeight ) + { + Display* pXDisp = pSalDisp->GetDisplay(); + long nWidth = rTwoRect.mnDestWidth; + long nHeight = rTwoRect.mnDestHeight; + + if( 1 == GetBitCount() ) + nDepth = 1; + + pImage = XCreateImage( pXDisp, pSalDisp->GetVisual( nScreen ).GetVisual(), + nDepth, ( 1 == nDepth ) ? XYBitmap :ZPixmap, 0, NULL, + nWidth, nHeight, 32, 0 ); + + if( pImage ) + { + BitmapBuffer* pDstBuf; + ULONG nDstFormat = BMP_FORMAT_TOP_DOWN; + BitmapPalette* pPal = NULL; + ColorMask* pMask = NULL; + + switch( pImage->bits_per_pixel ) + { + case( 1 ): + nDstFormat |= ( LSBFirst == pImage->bitmap_bit_order ? BMP_FORMAT_1BIT_LSB_PAL : BMP_FORMAT_1BIT_MSB_PAL ); + break; + + case( 4 ): + nDstFormat |= ( LSBFirst == pImage->bitmap_bit_order ? BMP_FORMAT_4BIT_LSN_PAL : BMP_FORMAT_4BIT_MSN_PAL ); + break; + + case( 8 ): + nDstFormat |= BMP_FORMAT_8BIT_PAL; + break; + + case( 16 ): + { + #ifdef OSL_BIGENDIAN + + if( MSBFirst == pImage->byte_order ) + nDstFormat |= BMP_FORMAT_16BIT_TC_MSB_MASK; + else + nDstFormat |= BMP_FORMAT_16BIT_TC_LSB_MASK; + + #else /* OSL_LITENDIAN */ + + nDstFormat |= BMP_FORMAT_16BIT_TC_LSB_MASK; + if( MSBFirst == pImage->byte_order ) + pImage->byte_order = LSBFirst; + + #endif + + pMask = new ColorMask( pImage->red_mask, pImage->green_mask, pImage->blue_mask ); + } + break; + + case( 24 ): + { + if( ( LSBFirst == pImage->byte_order ) && ( pImage->red_mask == 0xFF ) ) + nDstFormat |= BMP_FORMAT_24BIT_TC_RGB; + else + nDstFormat |= BMP_FORMAT_24BIT_TC_BGR; + } + break; + + case( 32 ): + { + if( LSBFirst == pImage->byte_order ) + nDstFormat |= ( pImage->red_mask == 0xFF ? BMP_FORMAT_32BIT_TC_RGBA : BMP_FORMAT_32BIT_TC_BGRA ); + else + nDstFormat |= ( pImage->red_mask == 0xFF ? BMP_FORMAT_32BIT_TC_ABGR : BMP_FORMAT_32BIT_TC_ARGB ); + } + break; + } + + if( pImage->depth == 1 ) + { + pPal = new BitmapPalette( 2 ); + (*pPal)[ 0 ] = Color( COL_BLACK ); + (*pPal)[ 1 ] = Color( COL_WHITE ); + } + else if( pImage->depth <= 8 ) + { + const SalColormap& rColMap = pSalDisp->GetColormap( nScreen ); + const USHORT nCols = Min( (ULONG)rColMap.GetUsed(), (ULONG)(1 << pImage->depth) ); + + pPal = new BitmapPalette( nCols ); + + for( USHORT i = 0; i < nCols; i++ ) + { + const SalColor nColor( rColMap.GetColor( i ) ); + BitmapColor& rBmpCol = (*pPal)[ i ]; + + rBmpCol.SetRed( SALCOLOR_RED( nColor ) ); + rBmpCol.SetGreen( SALCOLOR_GREEN( nColor ) ); + rBmpCol.SetBlue( SALCOLOR_BLUE( nColor ) ); + } + } + + pDstBuf = StretchAndConvert( *mpDIB, rTwoRect, nDstFormat, pPal, pMask ); + delete pPal; + delete pMask; + + if( pDstBuf && pDstBuf->mpBits ) + { + // set data in buffer as data member in pImage + pImage->data = (char*) pDstBuf->mpBits; + + // destroy buffer; don't destroy allocated data in buffer + delete pDstBuf; + } + else + { + XDestroyImage( pImage ); + pImage = NULL; + } + } + } + + return pImage; +} + +// ----------------------------------------------------------------------------- +bool X11SalBitmap::ImplCreateFromDrawable( Drawable aDrawable, + int nScreen, long nDrawableDepth, + long nX, long nY, long nWidth, long nHeight ) +{ + Destroy(); + + if( aDrawable && nWidth && nHeight && nDrawableDepth ) + mpDDB = new ImplSalDDB( aDrawable, nScreen, nDrawableDepth, nX, nY, nWidth, nHeight ); + + return( mpDDB != NULL ); +} +// ----------------------------------------------------------------------------- + +bool +X11SalBitmap::SnapShot (Display* pDisplay, XLIB_Window hWindow) +{ + if (hWindow != None) + { + XWindowAttributes aAttribute; + XGetWindowAttributes (pDisplay, hWindow, &aAttribute); + if (aAttribute.map_state == IsViewable) + { + // get coordinates relative to root window + XLIB_Window hPetitFleur; + int nRootX, nRootY; + + if (XTranslateCoordinates (pDisplay, hWindow, aAttribute.root, + 0, 0, &nRootX, &nRootY, &hPetitFleur)) + { + XWindowAttributes aRootAttribute; + XGetWindowAttributes (pDisplay, aAttribute.root, &aRootAttribute); + + int width = aAttribute.width; + int height = aAttribute.height; + int x = nRootX; + int y = nRootY; + + // horizontal range check + if (x < 0) + { + width = width + x; + x = 0; + } + else + if (x > aRootAttribute.width) + { + width = 0; + x = aRootAttribute.width; + } + else + if (x + width > aRootAttribute.width) + { + width = aRootAttribute.width - x; + } + + // vertical range check + if (y < 0) + { + height = height + y; + y = 0; + } + else + if (y > aRootAttribute.height) + { + height = 0; + y = aRootAttribute.height; + } + else + if (y + height > aRootAttribute.height) + { + height = aRootAttribute.height - y; + } + + if ((width > 0) && (height > 0)) + { + XImage* pImage = XGetImage( pDisplay, aAttribute.root, + x, y, width, height, AllPlanes, ZPixmap ); + bool bSnapShot = ImplCreateFromXImage( pDisplay, + aAttribute.root, + XScreenNumberOfScreen( aAttribute.screen ), + pImage ); + XDestroyImage (pImage); + + return bSnapShot; + } + } + } + } + + return False; +} + +bool +X11SalBitmap::ImplCreateFromXImage (Display* pDisplay, XLIB_Window hWindow, int nScreen, XImage* pImage) +{ + Destroy(); + + if (pImage != NULL && pImage->width != 0 && pImage->height != 0 && pImage->depth != 0) + { + mpDDB = new ImplSalDDB (pDisplay, hWindow, nScreen, pImage); + return True; + } + return False; +} + +ImplSalDDB* X11SalBitmap::ImplGetDDB( Drawable aDrawable, + int nScreen, + long nDrawableDepth, + const SalTwoRect& rTwoRect ) const +{ + if( !mpDDB || !mpDDB->ImplMatches( nScreen, nDrawableDepth, rTwoRect ) ) + { + if( mpDDB ) + { + // do we already have a DIB? if not, create aDIB from current DDB first + if( !mpDIB ) + { + const_cast(this)->mpDIB = ImplCreateDIB( mpDDB->ImplGetPixmap(), + mpDDB->ImplGetScreen(), + mpDDB->ImplGetDepth(), + 0, 0, + mpDDB->ImplGetWidth(), + mpDDB->ImplGetHeight() ); + } + + delete mpDDB, const_cast(this)->mpDDB = NULL; + } + + if( mpCache ) + mpCache->ImplRemove( const_cast(this) ); + + SalTwoRect aTwoRect( rTwoRect ); + if( aTwoRect.mnSrcX < 0 ) + { + aTwoRect.mnSrcWidth += aTwoRect.mnSrcX; + aTwoRect.mnSrcX = 0; + } + if( aTwoRect.mnSrcY < 0 ) + { + aTwoRect.mnSrcHeight += aTwoRect.mnSrcY; + aTwoRect.mnSrcY = 0; + } + + // create new DDB from DIB + const Size aSize( GetSize() ); + if( aTwoRect.mnSrcWidth == aTwoRect.mnDestWidth && + aTwoRect.mnSrcHeight == aTwoRect.mnDestHeight ) + { + aTwoRect.mnSrcX = aTwoRect.mnSrcY = aTwoRect.mnDestX = aTwoRect.mnDestY = 0; + aTwoRect.mnSrcWidth = aTwoRect.mnDestWidth = aSize.Width(); + aTwoRect.mnSrcHeight = aTwoRect.mnDestHeight = aSize.Height(); + } + else if( aTwoRect.mnSrcWidth+aTwoRect.mnSrcX > aSize.Width() || + aTwoRect.mnSrcHeight+aTwoRect.mnSrcY > aSize.Height() ) + { + // #i47823# this should not happen at all, but does nonetheless + // because BitmapEx allows for mask bitmaps of different size + // than image bitmap (broken) + if( aTwoRect.mnSrcX >= aSize.Width() || + aTwoRect.mnSrcY >= aSize.Height() ) + return NULL; // this would be a really mad case + + if( aTwoRect.mnSrcWidth+aTwoRect.mnSrcX > aSize.Width() ) + { + aTwoRect.mnSrcWidth = aSize.Width()-aTwoRect.mnSrcX; + if( aTwoRect.mnSrcWidth < 1 ) + { + aTwoRect.mnSrcX = 0; + aTwoRect.mnSrcWidth = aSize.Width(); + } + } + if( aTwoRect.mnSrcHeight+aTwoRect.mnSrcY > aSize.Height() ) + { + aTwoRect.mnSrcHeight = aSize.Height() - aTwoRect.mnSrcY; + if( aTwoRect.mnSrcHeight < 1 ) + { + aTwoRect.mnSrcY = 0; + aTwoRect.mnSrcHeight = aSize.Height(); + } + } + } + + XImage* pImage = ImplCreateXImage( GetX11SalData()->GetDisplay(), nScreen, + nDrawableDepth, aTwoRect ); + + if( pImage ) + { + const_cast(this)->mpDDB = new ImplSalDDB( pImage, aDrawable, nScreen, aTwoRect ); + delete[] pImage->data, pImage->data = NULL; + XDestroyImage( pImage ); + + if( mpCache ) + mpCache->ImplAdd( const_cast(this), mpDDB->ImplGetMemSize() ); + } + } + + return mpDDB; +} + +// ----------------------------------------------------------------------------- + +void X11SalBitmap::ImplDraw( Drawable aDrawable, + int nScreen, + long nDrawableDepth, + const SalTwoRect& rTwoRect, + const GC& rGC ) const +{ + ImplGetDDB( aDrawable, nScreen, nDrawableDepth, rTwoRect ); + if( mpDDB ) + mpDDB->ImplDraw( aDrawable, nDrawableDepth, rTwoRect, rGC ); +} + +// ----------------------------------------------------------------------------- + +bool X11SalBitmap::Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ) +{ + Destroy(); + mpDIB = ImplCreateDIB( rSize, nBitCount, rPal ); + + return( mpDIB != NULL ); +} + +// ----------------------------------------------------------------------------- + +bool X11SalBitmap::Create( const SalBitmap& rSSalBmp ) +{ + Destroy(); + + const X11SalBitmap& rSalBmp = static_cast( rSSalBmp ); + + if( rSalBmp.mpDIB ) + { + // TODO: reference counting... + mpDIB = new BitmapBuffer( *rSalBmp.mpDIB ); + // TODO: get rid of this when BitmapBuffer gets copy constructor + try + { + mpDIB->mpBits = new BYTE[ mpDIB->mnScanlineSize * mpDIB->mnHeight ]; + } + catch( std::bad_alloc& ) + { + delete mpDIB; + mpDIB = NULL; + } + + if( mpDIB ) + memcpy( mpDIB->mpBits, rSalBmp.mpDIB->mpBits, mpDIB->mnScanlineSize * mpDIB->mnHeight ); + } + else if( rSalBmp.mpDDB ) + ImplCreateFromDrawable( rSalBmp.mpDDB->ImplGetPixmap(), + rSalBmp.mpDDB->ImplGetScreen(), + rSalBmp.mpDDB->ImplGetDepth(), + 0, 0, rSalBmp.mpDDB->ImplGetWidth(), rSalBmp.mpDDB->ImplGetHeight() ); + + return( ( !rSalBmp.mpDIB && !rSalBmp.mpDDB ) || + ( rSalBmp.mpDIB && ( mpDIB != NULL ) ) || + ( rSalBmp.mpDDB && ( mpDDB != NULL ) ) ); +} + +// ----------------------------------------------------------------------------- + +bool X11SalBitmap::Create( const SalBitmap&, SalGraphics* ) +{ + return FALSE; +} + +// ----------------------------------------------------------------------------- + +bool X11SalBitmap::Create( const SalBitmap&, USHORT ) +{ + return FALSE; +} + +// ----------------------------------------------------------------------------- + +void X11SalBitmap::Destroy() +{ + if( mpDIB ) + { + delete[] mpDIB->mpBits; + delete mpDIB, mpDIB = NULL; + } + + if( mpDDB ) + delete mpDDB, mpDDB = NULL; + + if( mpCache ) + mpCache->ImplRemove( this ); +} + +// ----------------------------------------------------------------------------- + +Size X11SalBitmap::GetSize() const +{ + Size aSize; + + if( mpDIB ) + aSize.Width() = mpDIB->mnWidth, aSize.Height() = mpDIB->mnHeight; + else if( mpDDB ) + aSize.Width() = mpDDB->ImplGetWidth(), aSize.Height() = mpDDB->ImplGetHeight(); + + return aSize; +} + +// ----------------------------------------------------------------------------- + +USHORT X11SalBitmap::GetBitCount() const +{ + USHORT nBitCount; + + if( mpDIB ) + nBitCount = mpDIB->mnBitCount; + else if( mpDDB ) + nBitCount = mpDDB->ImplGetDepth(); + else + nBitCount = 0; + + return nBitCount; +} + +// ----------------------------------------------------------------------------- + +BitmapBuffer* X11SalBitmap::AcquireBuffer( bool ) +{ + if( !mpDIB && mpDDB ) + { + mpDIB = ImplCreateDIB( mpDDB->ImplGetPixmap(), + mpDDB->ImplGetScreen(), + mpDDB->ImplGetDepth(), + 0, 0, mpDDB->ImplGetWidth(), mpDDB->ImplGetHeight() ); + } + + return mpDIB; +} + +// ----------------------------------------------------------------------------- + +void X11SalBitmap::ReleaseBuffer( BitmapBuffer*, bool bReadOnly ) +{ + if( !bReadOnly ) + { + if( mpDDB ) + delete mpDDB, mpDDB = NULL; + + if( mpCache ) + mpCache->ImplRemove( this ); + } +} + +// ----------------------------------------------------------------------------- + +bool X11SalBitmap::GetSystemData( BitmapSystemData& rData ) +{ + if( mpDDB ) + { + // Rename/retype pDummy to your likings (though X11 Pixmap is + // prolly not a good idea, since it's accessed from + // non-platform aware code in vcl/bitmap.hxx) + rData.aPixmap = (void*)mpDDB->ImplGetPixmap(); + rData.mnWidth = mpDDB->ImplGetWidth (); + rData.mnHeight = mpDDB->ImplGetHeight (); + return true; + } + + return false; +} + +// -------------- +// - ImplSalDDB - +// -------------- + +ImplSalDDB::ImplSalDDB( XImage* pImage, Drawable aDrawable, int nScreen, const SalTwoRect& rTwoRect ) : + maPixmap ( 0 ), + maTwoRect ( rTwoRect ), + mnDepth ( pImage->depth ), + mnScreen ( nScreen ) +{ + SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); + Display* pXDisp = pSalDisp->GetDisplay(); + + if( (maPixmap = XCreatePixmap( pXDisp, aDrawable, ImplGetWidth(), ImplGetHeight(), ImplGetDepth() )) ) + { + XGCValues aValues; + GC aGC; + int nValues = GCFunction; + + aValues.function = GXcopy; + + if( 1 == mnDepth ) + { + nValues |= ( GCForeground | GCBackground ); + aValues.foreground = 1, aValues.background = 0; + } + + aGC = XCreateGC( pXDisp, maPixmap, nValues, &aValues ); + XPutImage( pXDisp, maPixmap, aGC, pImage, 0, 0, 0, 0, maTwoRect.mnDestWidth, maTwoRect.mnDestHeight ); + XFreeGC( pXDisp, aGC ); + } +} + +// ----------------------------------------------------------------------------------------- +// create from XImage + +ImplSalDDB::ImplSalDDB (Display* pDisplay, XLIB_Window hWindow, int nScreen, XImage* pImage) : + mnScreen( nScreen ) +{ + maPixmap = XCreatePixmap (pDisplay, hWindow, pImage->width, pImage->height, pImage->depth); + if (maPixmap != 0) + { + XGCValues aValues; + GC aGC; + int nValues = GCFunction; + + aValues.function = GXcopy; + + if (pImage->depth == 1) + { + nValues |= ( GCForeground | GCBackground ); + aValues.foreground = 1; + aValues.background = 0; + } + + aGC = XCreateGC (pDisplay, maPixmap, nValues, &aValues); + XPutImage (pDisplay, maPixmap, aGC, pImage, 0, 0, 0, 0, pImage->width, pImage->height); + XFreeGC (pDisplay, aGC); + + maTwoRect.mnSrcX = 0; + maTwoRect.mnSrcY = 0; + maTwoRect.mnDestX = 0; + maTwoRect.mnDestY = 0; + maTwoRect.mnSrcWidth = pImage->width; + maTwoRect.mnDestWidth = pImage->width; + maTwoRect.mnSrcHeight = pImage->height; + maTwoRect.mnDestHeight = pImage->height; + + mnDepth = pImage->depth; + } +} + +// ----------------------------------------------------------------------------- + +ImplSalDDB::ImplSalDDB( Drawable aDrawable, int nScreen, long nDrawableDepth, long nX, long nY, long nWidth, long nHeight ) : + mnDepth( nDrawableDepth ), + mnScreen( nScreen ) +{ + SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); + Display* pXDisp = pSalDisp->GetDisplay(); + + if( (maPixmap = XCreatePixmap( pXDisp, aDrawable, nWidth, nHeight, nDrawableDepth )) ) + { + XGCValues aValues; + GC aGC; + int nValues = GCFunction; + + aValues.function = GXcopy; + + if( 1 == mnDepth ) + { + nValues |= ( GCForeground | GCBackground ); + aValues.foreground = 1, aValues.background = 0; + } + + aGC = XCreateGC( pXDisp, maPixmap, nValues, &aValues ); + ImplDraw( aDrawable, nDrawableDepth, maPixmap, mnDepth, + nX, nY, nWidth, nHeight, 0, 0, aGC ); + XFreeGC( pXDisp, aGC ); + + maTwoRect.mnSrcX = maTwoRect.mnSrcY = maTwoRect.mnDestX = maTwoRect.mnDestY = 0; + maTwoRect.mnSrcWidth = maTwoRect.mnDestWidth = nWidth; + maTwoRect.mnSrcHeight = maTwoRect.mnDestHeight = nHeight; + } +} + +// ----------------------------------------------------------------------------- + +ImplSalDDB::~ImplSalDDB() +{ + if( maPixmap && ImplGetSVData() ) + XFreePixmap( GetX11SalData()->GetDisplay()->GetDisplay(), maPixmap ); +} + +// ----------------------------------------------------------------------------- + +bool ImplSalDDB::ImplMatches( int nScreen, long nDepth, const SalTwoRect& rTwoRect ) const +{ + bool bRet = FALSE; + + if( ( maPixmap != 0 ) && ( ( mnDepth == nDepth ) || ( 1 == mnDepth ) ) && nScreen == mnScreen) + { + if( rTwoRect.mnSrcX == maTwoRect.mnSrcX && rTwoRect.mnSrcY == maTwoRect.mnSrcY && + rTwoRect.mnSrcWidth == maTwoRect.mnSrcWidth && rTwoRect.mnSrcHeight == maTwoRect.mnSrcHeight && + rTwoRect.mnDestWidth == maTwoRect.mnDestWidth && rTwoRect.mnDestHeight == maTwoRect.mnDestHeight ) + { + // absolutely indentically + bRet = TRUE; + } + else if( rTwoRect.mnSrcWidth == rTwoRect.mnDestWidth && rTwoRect.mnSrcHeight == rTwoRect.mnDestHeight && + maTwoRect.mnSrcWidth == maTwoRect.mnDestWidth && maTwoRect.mnSrcHeight == maTwoRect.mnDestHeight && + rTwoRect.mnSrcX >= maTwoRect.mnSrcX && rTwoRect.mnSrcY >= maTwoRect.mnSrcY && + ( rTwoRect.mnSrcX + rTwoRect.mnSrcWidth ) <= ( maTwoRect.mnSrcX + maTwoRect.mnSrcWidth ) && + ( rTwoRect.mnSrcY + rTwoRect.mnSrcHeight ) <= ( maTwoRect.mnSrcY + maTwoRect.mnSrcHeight ) ) + { + bRet = TRUE; + } + } + + return bRet; +} + +// ----------------------------------------------------------------------------- + +void ImplSalDDB::ImplDraw( Drawable aDrawable, long nDrawableDepth, const SalTwoRect& rTwoRect, const GC& rGC ) const +{ + ImplDraw( maPixmap, mnDepth, aDrawable, nDrawableDepth, + rTwoRect.mnSrcX - maTwoRect.mnSrcX, rTwoRect.mnSrcY - maTwoRect.mnSrcY, + rTwoRect.mnDestWidth, rTwoRect.mnDestHeight, + rTwoRect.mnDestX, rTwoRect.mnDestY, rGC ); +} + +// ----------------------------------------------------------------------------- + +void ImplSalDDB::ImplDraw( Drawable aSrcDrawable, long nSrcDrawableDepth, + Drawable aDstDrawable, long, + long nSrcX, long nSrcY, + long nDestWidth, long nDestHeight, + long nDestX, long nDestY, const GC& rGC ) +{ + SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); + Display* pXDisp = pSalDisp->GetDisplay(); + + if( 1 == nSrcDrawableDepth ) + { + XCopyPlane( pXDisp, aSrcDrawable, aDstDrawable, rGC, + nSrcX, nSrcY, nDestWidth, nDestHeight, nDestX, nDestY, 1 ); + } + else + { + XCopyArea( pXDisp, aSrcDrawable, aDstDrawable, rGC, + nSrcX, nSrcY, nDestWidth, nDestHeight, nDestX, nDestY ); + } +} + +// ---------------------- +// - ImplSalBitmapCache - +// ---------------------- + +struct ImplBmpObj +{ + X11SalBitmap* mpBmp; + ULONG mnMemSize; + ULONG mnFlags; + + ImplBmpObj( X11SalBitmap* pBmp, ULONG nMemSize, ULONG nFlags ) : + mpBmp( pBmp ), mnMemSize( nMemSize ), mnFlags( nFlags ) {} +}; + +// ----------------------------------------------------------------------------- + +ImplSalBitmapCache::ImplSalBitmapCache() : + mnTotalSize( 0UL ) +{ +} + +// ----------------------------------------------------------------------------- + +ImplSalBitmapCache::~ImplSalBitmapCache() +{ + ImplClear(); +} + +// ----------------------------------------------------------------------------- + +void ImplSalBitmapCache::ImplAdd( X11SalBitmap* pBmp, ULONG nMemSize, ULONG nFlags ) +{ + ImplBmpObj* pObj; + bool bFound = FALSE; + + for( pObj = (ImplBmpObj*) maBmpList.Last(); pObj && !bFound; pObj = (ImplBmpObj*) maBmpList.Prev() ) + if( pObj->mpBmp == pBmp ) + bFound = TRUE; + + mnTotalSize += nMemSize; + + if( bFound ) + { + mnTotalSize -= pObj->mnMemSize; + pObj->mnMemSize = nMemSize, pObj->mnFlags = nFlags; + } + else + maBmpList.Insert( new ImplBmpObj( pBmp, nMemSize, nFlags ), LIST_APPEND ); +} + +// ----------------------------------------------------------------------------- + +void ImplSalBitmapCache::ImplRemove( X11SalBitmap* pBmp ) +{ + for( ImplBmpObj* pObj = (ImplBmpObj*) maBmpList.Last(); pObj; pObj = (ImplBmpObj*) maBmpList.Prev() ) + { + if( pObj->mpBmp == pBmp ) + { + maBmpList.Remove( pObj ); + pObj->mpBmp->ImplRemovedFromCache(); + mnTotalSize -= pObj->mnMemSize; + delete pObj; + break; + } + } +} + +// ----------------------------------------------------------------------------- + +void ImplSalBitmapCache::ImplClear() +{ + for( ImplBmpObj* pObj = (ImplBmpObj*) maBmpList.First(); pObj; pObj = (ImplBmpObj*) maBmpList.Next() ) + { + pObj->mpBmp->ImplRemovedFromCache(); + delete pObj; + } + + maBmpList.Clear(); + mnTotalSize = 0; +} diff --git a/vcl/unx/generic/gdi/salcvt.cxx b/vcl/unx/generic/gdi/salcvt.cxx new file mode 100644 index 000000000000..c699cdb12335 --- /dev/null +++ b/vcl/unx/generic/gdi/salcvt.cxx @@ -0,0 +1,341 @@ +/************************************************************************* + * + * 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_vcl.hxx" +#include "salcvt.hxx" + + +SalConverterCache::SalConverterCache() +{ +} + +SalConverterCache* +SalConverterCache::GetInstance () +{ + static SalConverterCache* pCvt = NULL; + if (pCvt == NULL) + pCvt = new SalConverterCache; + + return pCvt; +} + +SalConverterCache::~SalConverterCache() +{ +} + +// ---> FIXME +#include +// <--- + +rtl_UnicodeToTextConverter +SalConverterCache::GetU2TConverter( rtl_TextEncoding nEncoding ) +{ + if( rtl_isOctetTextEncoding( nEncoding ) ) + { + ConverterT& rConverter( m_aConverters[ nEncoding ] ); + if ( rConverter.mpU2T == NULL ) + { + rConverter.mpU2T = + rtl_createUnicodeToTextConverter( nEncoding ); +// ---> FIXME +if ( rConverter.mpU2T == NULL ) + fprintf( stderr, "failed to create Unicode -> %i converter\n", nEncoding); +// <--- + } + return rConverter.mpU2T; + } + return NULL; +} + +rtl_TextToUnicodeConverter +SalConverterCache::GetT2UConverter( rtl_TextEncoding nEncoding ) +{ + if( rtl_isOctetTextEncoding( nEncoding ) ) + { + ConverterT& rConverter( m_aConverters[ nEncoding ] ); + if ( rConverter.mpT2U == NULL ) + { + rConverter.mpT2U = + rtl_createTextToUnicodeConverter( nEncoding ); +// ---> FIXME +if ( rConverter.mpT2U == NULL ) + fprintf( stderr, "failed to create %i -> Unicode converter\n", nEncoding ); +// <--- + } + return rConverter.mpT2U; + } + return NULL; +} + +Bool +SalConverterCache::IsSingleByteEncoding( rtl_TextEncoding nEncoding ) +{ + if( rtl_isOctetTextEncoding( nEncoding ) ) + { + ConverterT& rConverter( m_aConverters[ nEncoding ] ); + if ( ! rConverter.mbValid ) + { + rConverter.mbValid = True; + + rtl_TextEncodingInfo aTextEncInfo; + aTextEncInfo.StructSize = sizeof( aTextEncInfo ); + rtl_getTextEncodingInfo( nEncoding, &aTextEncInfo ); + + if ( aTextEncInfo.MinimumCharSize == aTextEncInfo.MaximumCharSize + && aTextEncInfo.MinimumCharSize == 1) + rConverter.mbSingleByteEncoding = True; + else + rConverter.mbSingleByteEncoding = False; + } + + return rConverter.mbSingleByteEncoding; + } + return False; +} + +// check whether the character set nEncoding contains the unicode +// code point nChar. This list has been compiled from the according +// ttmap files in /usr/openwin/lib/X11/fonts/TrueType/ttmap/ +Bool +SalConverterCache::EncodingHasChar( rtl_TextEncoding nEncoding, + sal_Unicode nChar ) +{ + Bool bMatch = False; + + switch ( nEncoding ) + { + case RTL_TEXTENCODING_DONTKNOW: + bMatch = False; + break; + + case RTL_TEXTENCODING_MS_1252: + case RTL_TEXTENCODING_ISO_8859_1: + case RTL_TEXTENCODING_ISO_8859_15: + // handle iso8859-15 and iso8859-1 the same (and both with euro) + // handle them also like ms1252 + // this is due to the fact that so many X fonts say they are iso8859-1 + // but have the other glyphs anyway because they are really ms1252 + bMatch = ( /*nChar >= 0x0000 &&*/ nChar <= 0x00ff ) + || ( nChar == 0x20ac ) + || ( nChar == 0x201a ) + || ( nChar == 0x0192 ) + || ( nChar == 0x201e ) + || ( nChar == 0x2026 ) + || ( nChar == 0x2020 ) + || ( nChar == 0x2021 ) + || ( nChar == 0x02c6 ) + || ( nChar == 0x2030 ) + || ( nChar == 0x0160 ) + || ( nChar == 0x2039 ) + || ( nChar == 0x0152 ) + || ( nChar == 0x017d ) + || ( nChar == 0x2018 ) + || ( nChar == 0x2019 ) + || ( nChar == 0x201c ) + || ( nChar == 0x201d ) + || ( nChar == 0x2022 ) + || ( nChar == 0x2013 ) + || ( nChar == 0x2014 ) + || ( nChar == 0x02dc ) + || ( nChar == 0x2122 ) + || ( nChar == 0x0161 ) + || ( nChar == 0x203a ) + || ( nChar == 0x0153 ) + || ( nChar == 0x017e ) + || ( nChar == 0x0178 ) + ; + break; + + case RTL_TEXTENCODING_ISO_8859_2: + bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) + || ( nChar >= 0x00a0 && nChar <= 0x017e ) + || ( nChar >= 0x02c7 && nChar <= 0x02dd ); + break; + + case RTL_TEXTENCODING_ISO_8859_4: + bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) + || ( nChar >= 0x00a0 && nChar <= 0x017e ) + || ( nChar >= 0x02c7 && nChar <= 0x02db ); + break; + + case RTL_TEXTENCODING_ISO_8859_5: + bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) + || ( nChar >= 0x00a0 && nChar <= 0x00ad ) + || ( nChar >= 0x0401 && nChar <= 0x045f ) + || ( nChar == 0x2116 ); + break; + + case RTL_TEXTENCODING_ISO_8859_6: + bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) + || ( nChar >= 0x0600 && nChar <= 0x06ff ) + || ( nChar >= 0xfb50 && nChar <= 0xfffe ); + break; + + case RTL_TEXTENCODING_ISO_8859_7: + bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) + || ( nChar >= 0x00a0 && nChar <= 0x00bd ) + || ( nChar == 0x02bd ) + || ( nChar >= 0x0384 && nChar <= 0x03ce ) + || ( nChar >= 0x2014 && nChar <= 0x2019 ); + break; + + case RTL_TEXTENCODING_ISO_8859_8: + bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) + || ( nChar >= 0x00a0 && nChar <= 0x00f7 ) + || ( nChar >= 0x05d0 && nChar <= 0x05ea ) + || ( nChar == 0x2017 ); + break; + + case RTL_TEXTENCODING_ISO_8859_9: + bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) + || ( nChar >= 0x00a0 && nChar <= 0x015f ); + break; + + case RTL_TEXTENCODING_ISO_8859_13: + bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) + || ( nChar >= 0x00a0 && nChar <= 0x017e ) + || ( nChar >= 0x2019 && nChar <= 0x201e ); + break; + + /* real case for RTL_TEXTENCODING_ISO_8859_15 + case RTL_TEXTENCODING_ISO_8859_15: + bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) + || ( nChar >= 0x00a0 && nChar <= 0x00ff ) + || ( nChar >= 0x0152 && nChar <= 0x017e ) + || ( nChar == 0x20ac ); + break; + */ + + case RTL_TEXTENCODING_JIS_X_0201: + bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) + || ( nChar >= 0xff61 && nChar <= 0xff9f ); + break; + + case RTL_TEXTENCODING_MS_1251: + bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) + || ( nChar >= 0x00a0 && nChar <= 0x00bb ) + || ( nChar >= 0x0401 && nChar <= 0x045f ) + || ( nChar >= 0x0490 && nChar <= 0x0491 ) + || ( nChar >= 0x2013 && nChar <= 0x203a ) + || ( nChar >= 0x2116 && nChar <= 0x2122 ); + break; + + case RTL_TEXTENCODING_KOI8_R: + bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) + || ( nChar >= 0x00a0 && nChar <= 0x00b7 ) + || ( nChar == 0x00f7 ) + || ( nChar >= 0x0401 && nChar <= 0x0451 ) + || ( nChar >= 0x2219 && nChar <= 0x221a ) + || ( nChar >= 0x2248 && nChar <= 0x2265 ) + || ( nChar >= 0x2320 && nChar <= 0x2321 ) + || ( nChar >= 0x2500 && nChar <= 0x25a0 ); + break; + + case RTL_TEXTENCODING_UNICODE: + bMatch = True; + break; + + case RTL_TEXTENCODING_EUC_KR: + case RTL_TEXTENCODING_BIG5: + case RTL_TEXTENCODING_GBK: + case RTL_TEXTENCODING_GB_2312: + case RTL_TEXTENCODING_MS_1361: + case RTL_TEXTENCODING_JIS_X_0208: + + // XXX Big5 and Korean EUC contain Ascii chars, but Solaris + // *-big5-1 and *-ksc5601.1992-3 fonts dont, in general CJK fonts + // are monospaced, so dont trust them for latin chars + if (nChar <= 0xFF) + { + bMatch = False; + break; + } + + default: + // XXX really convert the unicode char into the encoding + // and check for conversion errors, this is expensive ! + rtl_UnicodeToTextConverter aConverter; + rtl_UnicodeToTextContext aContext; + + aConverter = GetU2TConverter(nEncoding); + aContext = rtl_createUnicodeToTextContext( aConverter ); + + // ---> FIXME + if ( aConverter == NULL ) + return False; + // <--- + + sal_Char pConversionBuffer[ 32 ]; + sal_uInt32 nConversionInfo; + sal_Size nConvertedChars; + sal_Size nSize; + + nSize = rtl_convertUnicodeToText( aConverter, aContext, + &nChar, 1, pConversionBuffer, sizeof(pConversionBuffer), + RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR + | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR, + &nConversionInfo, &nConvertedChars ); + + rtl_destroyUnicodeToTextContext( aConverter, aContext ); + + bMatch = (nConvertedChars == 1) + && (nSize == 1 || nSize == 2) // XXX Fix me this is a hack + && ((nConversionInfo & RTL_UNICODETOTEXT_INFO_ERROR) == 0); + break; + } + + return bMatch; +} + +// wrapper for rtl_convertUnicodeToText that handles the usual cases for +// textconversion in drawtext and gettextwidth routines +sal_Size +SalConverterCache::ConvertStringUTF16( const sal_Unicode *pText, int nTextLen, + sal_Char *pBuffer, sal_Size nBufferSize, rtl_TextEncoding nEncoding ) +{ + rtl_UnicodeToTextConverter aConverter = GetU2TConverter(nEncoding); + + const sal_uInt32 nCvtFlags = + RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACE + | RTL_UNICODETOTEXT_FLAGS_UNDEFINED_QUESTIONMARK + | RTL_UNICODETOTEXT_FLAGS_INVALID_QUESTIONMARK ; + sal_uInt32 nCvtInfo; + sal_Size nCvtChars; + + rtl_UnicodeToTextContext aContext = + rtl_createUnicodeToTextContext( aConverter ); + + sal_Size nSize = rtl_convertUnicodeToText( aConverter, aContext, + pText, nTextLen, pBuffer, nBufferSize, + nCvtFlags, &nCvtInfo, &nCvtChars ); + + rtl_destroyUnicodeToTextContext( aConverter, aContext ); + + return nSize; +} + diff --git a/vcl/unx/generic/gdi/salcvt.hxx b/vcl/unx/generic/gdi/salcvt.hxx new file mode 100644 index 000000000000..6d0e3bf9650c --- /dev/null +++ b/vcl/unx/generic/gdi/salcvt.hxx @@ -0,0 +1,93 @@ +/************************************************************************* + * + * 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 SAL_CONVERTER_CACHE_HXX_ +#define SAL_CONVERTER_CACHE_HXX_ + +#include +#include + +#include + +#include + +extern "C" const char* +pGetEncodingName( rtl_TextEncoding nEncoding ); + +// +// Cache TextToUnicode and UnicodeToText converter and conversion info which is +// used in DrawXYZ routines and in the Event loop +// + +class SalConverterCache { + + public: + SalConverterCache(); + ~SalConverterCache(); + Bool EncodingHasChar( + rtl_TextEncoding nEncoding, sal_Unicode nChar ); + rtl_UnicodeToTextConverter + GetU2TConverter( rtl_TextEncoding nEncoding ); + rtl_TextToUnicodeConverter + GetT2UConverter( rtl_TextEncoding nEncoding ); + Bool IsSingleByteEncoding( rtl_TextEncoding nEncoding ); + sal_Size ConvertStringUTF16( const sal_Unicode *pText, int nTextLen, + sal_Char *pBuffer, sal_Size nBufferSize, + rtl_TextEncoding nEncoding); + + static SalConverterCache* + GetInstance (); + + private: + + struct ConverterT { + rtl_UnicodeToTextConverter mpU2T; + rtl_TextToUnicodeConverter mpT2U; + Bool mbSingleByteEncoding; + Bool mbValid; + ConverterT() : + mpU2T( NULL ), + mpT2U( NULL ), + mbSingleByteEncoding( False ), + mbValid( False ) + { + } + ~ConverterT() + { + if( mpU2T ) + rtl_destroyUnicodeToTextConverter( mpU2T ); + if( mpT2U ) + rtl_destroyTextToUnicodeConverter( mpT2U ); + } + }; + + std::map< rtl_TextEncoding, ConverterT > m_aConverters; +}; + + + +#endif /* SAL_CONVERTER_CACHE_HXX_ */ + diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx new file mode 100644 index 000000000000..c6d834294bd7 --- /dev/null +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -0,0 +1,1285 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include "tools/debug.hxx" + +#include "basegfx/polygon/b2dpolygon.hxx" +#include "basegfx/polygon/b2dpolypolygon.hxx" +#include "basegfx/polygon/b2dpolypolygontools.hxx" +#include "basegfx/polygon/b2dpolygontools.hxx" +#include "basegfx/polygon/b2dpolygonclipper.hxx" +#include "basegfx/polygon/b2dlinegeometry.hxx" +#include "basegfx/matrix/b2dhommatrix.hxx" +#include "basegfx/matrix/b2dhommatrixtools.hxx" +#include "basegfx/polygon/b2dpolypolygoncutter.hxx" +#include "basegfx/polygon/b2dtrapezoid.hxx" + +#include "vcl/jobdata.hxx" + +#include "unx/Xproto.h" +#include "unx/salunx.h" +#include "unx/saldata.hxx" +#include "unx/saldisp.hxx" +#include "unx/salgdi.h" +#include "unx/salframe.h" +#include "unx/salvd.h" + +#include "printergfx.hxx" +#include "xrender_peer.hxx" + +#include +#include +#include + +// -=-= SalPolyLine =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +#define STATIC_POINTS 64 + +class SalPolyLine +{ + XPoint Points_[STATIC_POINTS]; + XPoint *pFirst_; +public: + inline SalPolyLine( ULONG nPoints ); + inline SalPolyLine( ULONG nPoints, const SalPoint *p ); + inline ~SalPolyLine(); + inline XPoint &operator [] ( ULONG n ) const + { return pFirst_[n]; } +}; + +inline SalPolyLine::SalPolyLine( ULONG nPoints ) + : pFirst_( nPoints+1 > STATIC_POINTS ? new XPoint[nPoints+1] : Points_ ) +{} + +inline SalPolyLine::SalPolyLine( ULONG nPoints, const SalPoint *p ) + : pFirst_( nPoints+1 > STATIC_POINTS ? new XPoint[nPoints+1] : Points_ ) +{ + for( ULONG i = 0; i < nPoints; i++ ) + { + pFirst_[i].x = (short)p[i].mnX; + pFirst_[i].y = (short)p[i].mnY; + } + pFirst_[nPoints] = pFirst_[0]; // close polyline +} + +inline SalPolyLine::~SalPolyLine() +{ if( pFirst_ != Points_ ) delete [] pFirst_; } + +#undef STATIC_POINTS +// -=-= X11SalGraphics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +X11SalGraphics::X11SalGraphics() +{ + m_pFrame = NULL; + m_pVDev = NULL; + m_pDeleteColormap = NULL; + hDrawable_ = None; + m_aRenderPicture = 0; + m_pRenderFormat = NULL; + + pClipRegion_ = NULL; + pPaintRegion_ = NULL; + + pPenGC_ = NULL; + nPenPixel_ = 0; + nPenColor_ = MAKE_SALCOLOR( 0x00, 0x00, 0x00 ); // Black + + pFontGC_ = NULL; + for( int i = 0; i < MAX_FALLBACK; ++i ) + mpServerFont[i] = NULL; + + nTextPixel_ = 0; + nTextColor_ = MAKE_SALCOLOR( 0x00, 0x00, 0x00 ); // Black + +#ifdef ENABLE_GRAPHITE + // check if graphite fonts have been disabled + static const char* pDisableGraphiteStr = getenv( "SAL_DISABLE_GRAPHITE" ); + bDisableGraphite_ = pDisableGraphiteStr ? (pDisableGraphiteStr[0]!='0') : FALSE; +#endif + + pBrushGC_ = NULL; + nBrushPixel_ = 0; + nBrushColor_ = MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF ); // White + hBrush_ = None; + + pMonoGC_ = NULL; + pCopyGC_ = NULL; + pMaskGC_ = NULL; + pInvertGC_ = NULL; + pInvert50GC_ = NULL; + pStippleGC_ = NULL; + pTrackingGC_ = NULL; + + bWindow_ = FALSE; + bPrinter_ = FALSE; + bVirDev_ = FALSE; + bPenGC_ = FALSE; + bFontGC_ = FALSE; + bBrushGC_ = FALSE; + bMonoGC_ = FALSE; + bCopyGC_ = FALSE; + bInvertGC_ = FALSE; + bInvert50GC_ = FALSE; + bStippleGC_ = FALSE; + bTrackingGC_ = FALSE; + bXORMode_ = FALSE; + bDitherBrush_ = FALSE; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +X11SalGraphics::~X11SalGraphics() +{ + ReleaseFonts(); + freeResources(); +} + +// -=-= SalGraphics / X11SalGraphics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +void X11SalGraphics::freeResources() +{ + Display *pDisplay = GetXDisplay(); + + DBG_ASSERT( !pPaintRegion_, "pPaintRegion_" ); + if( pClipRegion_ ) XDestroyRegion( pClipRegion_ ), pClipRegion_ = None; + + if( hBrush_ ) XFreePixmap( pDisplay, hBrush_ ), hBrush_ = None; + if( pPenGC_ ) XFreeGC( pDisplay, pPenGC_ ), pPenGC_ = None; + if( pFontGC_ ) XFreeGC( pDisplay, pFontGC_ ), pFontGC_ = None; + if( pBrushGC_ ) XFreeGC( pDisplay, pBrushGC_ ), pBrushGC_ = None; + if( pMonoGC_ ) XFreeGC( pDisplay, pMonoGC_ ), pMonoGC_ = None; + if( pCopyGC_ ) XFreeGC( pDisplay, pCopyGC_ ), pCopyGC_ = None; + if( pMaskGC_ ) XFreeGC( pDisplay, pMaskGC_ ), pMaskGC_ = None; + if( pInvertGC_ ) XFreeGC( pDisplay, pInvertGC_ ), pInvertGC_ = None; + if( pInvert50GC_ ) XFreeGC( pDisplay, pInvert50GC_ ), pInvert50GC_ = None; + if( pStippleGC_ ) XFreeGC( pDisplay, pStippleGC_ ), pStippleGC_ = None; + if( pTrackingGC_ ) XFreeGC( pDisplay, pTrackingGC_ ), pTrackingGC_ = None; + if( m_pDeleteColormap ) + delete m_pDeleteColormap, m_pColormap = m_pDeleteColormap = NULL; + + if( m_aRenderPicture ) + XRenderPeer::GetInstance().FreePicture( m_aRenderPicture ), m_aRenderPicture = 0; + + bPenGC_ = bFontGC_ = bBrushGC_ = bMonoGC_ = bCopyGC_ = bInvertGC_ = bInvert50GC_ = bStippleGC_ = bTrackingGC_ = false; +} + +void X11SalGraphics::SetDrawable( Drawable aDrawable, int nScreen ) +{ + // shortcut if nothing changed + if( hDrawable_ == aDrawable ) + return; + + // free screen specific resources if needed + if( nScreen != m_nScreen ) + { + freeResources(); + m_pColormap = &GetX11SalData()->GetDisplay()->GetColormap( nScreen ); + m_nScreen = nScreen; + } + + hDrawable_ = aDrawable; + SetXRenderFormat( NULL ); + if( m_aRenderPicture ) + { + XRenderPeer::GetInstance().FreePicture( m_aRenderPicture ); + m_aRenderPicture = 0; + } + + if( hDrawable_ ) + { + nPenPixel_ = GetPixel( nPenColor_ ); + nTextPixel_ = GetPixel( nTextColor_ ); + nBrushPixel_ = GetPixel( nBrushColor_ ); + } +} + +void X11SalGraphics::Init( SalFrame *pFrame, Drawable aTarget, int nScreen ) +{ +#if 0 // TODO: use SetDrawable() instead + m_pColormap = &GetX11SalData()->GetDisplay()->GetColormap(nScreen); + hDrawable_ = aTarget; + m_nScreen = nScreen; + SetXRenderFormat( NULL ); + if( m_aRenderPicture ) + XRenderPeer::GetInstance().FreePicture( m_aRenderPicture ), m_aRenderPicture = 0; + + nPenPixel_ = GetPixel( nPenColor_ ); + nTextPixel_ = GetPixel( nTextColor_ ); + nBrushPixel_ = GetPixel( nBrushColor_ ); +#else + m_pColormap = &GetX11SalData()->GetDisplay()->GetColormap(nScreen); + m_nScreen = nScreen; + SetDrawable( aTarget, nScreen ); +#endif + + bWindow_ = TRUE; + m_pFrame = pFrame; + m_pVDev = NULL; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::DeInit() +{ + SetDrawable( None, m_nScreen ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::SetClipRegion( GC pGC, XLIB_Region pXReg ) const +{ + Display *pDisplay = GetXDisplay(); + + int n = 0; + XLIB_Region Regions[3]; + + if( pClipRegion_ /* && !XEmptyRegion( pClipRegion_ ) */ ) + Regions[n++] = pClipRegion_; +// if( pPaintRegion_ /* && !XEmptyRegion( pPaintRegion_ ) */ ) +// Regions[n++] = pPaintRegion_; + + if( pXReg && !XEmptyRegion( pXReg ) ) + Regions[n++] = pXReg; + + if( 0 == n ) + XSetClipMask( pDisplay, pGC, None ); + else if( 1 == n ) + XSetRegion( pDisplay, pGC, Regions[0] ); + else + { + XLIB_Region pTmpRegion = XCreateRegion(); + XIntersectRegion( Regions[0], Regions[1], pTmpRegion ); +// if( 3 == n ) +// XIntersectRegion( Regions[2], pTmpRegion, pTmpRegion ); + XSetRegion( pDisplay, pGC, pTmpRegion ); + XDestroyRegion( pTmpRegion ); + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +GC X11SalGraphics::SelectPen() +{ + Display *pDisplay = GetXDisplay(); + + if( !pPenGC_ ) + { + XGCValues values; + values.subwindow_mode = ClipByChildren; + values.fill_rule = EvenOddRule; // Pict import/ Gradient + values.graphics_exposures = False; + + pPenGC_ = XCreateGC( pDisplay, hDrawable_, + GCSubwindowMode | GCFillRule | GCGraphicsExposures, + &values ); + } + + if( !bPenGC_ ) + { + if( nPenColor_ != SALCOLOR_NONE ) + XSetForeground( pDisplay, pPenGC_, nPenPixel_ ); + XSetFunction ( pDisplay, pPenGC_, bXORMode_ ? GXxor : GXcopy ); + SetClipRegion( pPenGC_ ); + bPenGC_ = TRUE; + } + + return pPenGC_; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +GC X11SalGraphics::SelectBrush() +{ + Display *pDisplay = GetXDisplay(); + + DBG_ASSERT( nBrushColor_ != SALCOLOR_NONE, "Brush Transparent" ); + + if( !pBrushGC_ ) + { + XGCValues values; + // values.subwindow_mode = IncludeInferiors; + values.subwindow_mode = ClipByChildren; + values.fill_rule = EvenOddRule; // Pict import/ Gradient + values.graphics_exposures = False; + + pBrushGC_ = XCreateGC( pDisplay, hDrawable_, + GCSubwindowMode | GCFillRule | GCGraphicsExposures, + &values ); + } + + if( !bBrushGC_ ) + { + if( !bDitherBrush_ ) + { + XSetFillStyle ( pDisplay, pBrushGC_, FillSolid ); + XSetForeground( pDisplay, pBrushGC_, nBrushPixel_ ); + if( bPrinter_ ) + XSetTile( pDisplay, pBrushGC_, None ); + } + else + { + // Bug in Sun Solaris 2.5.1, XFillPolygon doesn't allways reflect + // changes of the tile. PROPERTY_BUG_Tile doesn't fix this ! + if (GetDisplay()->GetProperties() & PROPERTY_BUG_FillPolygon_Tile) + XSetFillStyle ( pDisplay, pBrushGC_, FillSolid ); + + XSetFillStyle ( pDisplay, pBrushGC_, FillTiled ); + XSetTile ( pDisplay, pBrushGC_, hBrush_ ); + } + XSetFunction ( pDisplay, pBrushGC_, bXORMode_ ? GXxor : GXcopy ); + SetClipRegion( pBrushGC_ ); + + bBrushGC_ = TRUE; + } + + return pBrushGC_; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +GC X11SalGraphics::GetTrackingGC() +{ + const char dash_list[2] = {2, 2}; + + if( !pTrackingGC_ ) + { + XGCValues values; + + values.graphics_exposures = False; + values.foreground = m_pColormap->GetBlackPixel() + ^ m_pColormap->GetWhitePixel(); + values.function = GXxor; + values.line_width = 1; + values.line_style = LineOnOffDash; + + pTrackingGC_ = XCreateGC( GetXDisplay(), GetDrawable(), + GCGraphicsExposures | GCForeground | GCFunction + | GCLineWidth | GCLineStyle, + &values ); + XSetDashes( GetXDisplay(), pTrackingGC_, 0, dash_list, 2 ); + } + + if( !bTrackingGC_ ) + { + SetClipRegion( pTrackingGC_ ); + bTrackingGC_ = TRUE; + } + + return pTrackingGC_; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::DrawLines( ULONG nPoints, + const SalPolyLine &rPoints, + GC pGC, + bool bClose + ) +{ + // errechne wie viele Linien XWindow auf einmal zeichnen kann + ULONG nMaxLines = (GetDisplay()->GetMaxRequestSize() - sizeof(xPolyPointReq)) + / sizeof(xPoint); + if( nMaxLines > nPoints ) nMaxLines = nPoints; + + // gebe alle Linien aus, die XWindows zeichnen kann. + ULONG n; + for( n = 0; nPoints - n > nMaxLines; n += nMaxLines - 1 ) + XDrawLines( GetXDisplay(), + GetDrawable(), + pGC, + &rPoints[n], + nMaxLines, + CoordModeOrigin ); + + if( n < nPoints ) + XDrawLines( GetXDisplay(), + GetDrawable(), + pGC, + &rPoints[n], + nPoints - n, + CoordModeOrigin ); + if( bClose ) + { + if( rPoints[nPoints-1].x != rPoints[0].x || rPoints[nPoints-1].y != rPoints[0].y ) + drawLine( rPoints[nPoints-1].x, rPoints[nPoints-1].y, rPoints[0].x, rPoints[0].y ); + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// Dithern: Calculate a dither-pixmap and make a brush of it +#define P_DELTA 51 +#define DMAP( v, m ) ((v % P_DELTA) > m ? (v / P_DELTA) + 1 : (v / P_DELTA)) + +BOOL X11SalGraphics::GetDitherPixmap( SalColor nSalColor ) +{ + static const short nOrdDither8Bit[ 8 ][ 8 ] = + { + { 0, 38, 9, 48, 2, 40, 12, 50}, + {25, 12, 35, 22, 28, 15, 37, 24}, + { 6, 44, 3, 41, 8, 47, 5, 44}, + {32, 19, 28, 16, 34, 21, 31, 18}, + { 1, 40, 11, 49, 0, 39, 10, 48}, + {27, 14, 36, 24, 26, 13, 36, 23}, + { 8, 46, 4, 43, 7, 45, 4, 42}, + {33, 20, 30, 17, 32, 20, 29, 16} + }; + + // test for correct depth (8bit) + if( GetColormap().GetVisual().GetDepth() != 8 ) + return FALSE; + + char pBits[64]; + char *pBitsPtr = pBits; + + // Set the pallette-entries for the dithering tile + UINT8 nSalColorRed = SALCOLOR_RED ( nSalColor ); + UINT8 nSalColorGreen = SALCOLOR_GREEN ( nSalColor ); + UINT8 nSalColorBlue = SALCOLOR_BLUE ( nSalColor ); + + for( int nY = 0; nY < 8; nY++ ) + { + for( int nX = 0; nX < 8; nX++ ) + { + short nMagic = nOrdDither8Bit[nY][nX]; + UINT8 nR = P_DELTA * DMAP( nSalColorRed, nMagic ); + UINT8 nG = P_DELTA * DMAP( nSalColorGreen, nMagic ); + UINT8 nB = P_DELTA * DMAP( nSalColorBlue, nMagic ); + + *pBitsPtr++ = GetColormap().GetPixel( MAKE_SALCOLOR( nR, nG, nB ) ); + } + } + + // create the tile as ximage and an according pixmap -> caching + XImage *pImage = XCreateImage( GetXDisplay(), + GetColormap().GetXVisual(), + 8, + ZPixmap, + 0, // offset + pBits, // data + 8, 8, // width & height + 8, // bitmap_pad + 0 ); // (default) bytes_per_line + + if ( GetDisplay()->GetProperties() & PROPERTY_BUG_Tile ) + { + if (hBrush_) + XFreePixmap (GetXDisplay(), hBrush_); + hBrush_ = XCreatePixmap( GetXDisplay(), GetDrawable(), 8, 8, 8 ); + } + else + if( !hBrush_ ) + hBrush_ = XCreatePixmap( GetXDisplay(), GetDrawable(), 8, 8, 8 ); + + // put the ximage to the pixmap + XPutImage( GetXDisplay(), + hBrush_, + GetDisplay()->GetCopyGC( m_nScreen ), + pImage, + 0, 0, // Source + 0, 0, // Destination + 8, 8 ); // width & height + + // destroy image-frame but not palette-data + pImage->data = NULL; + XDestroyImage( pImage ); + + return TRUE; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) // const +{ + const SalDisplay *pDisplay = GetDisplay(); + + rDPIX = pDisplay->GetResolution().A(); + rDPIY = pDisplay->GetResolution().B(); + if( !pDisplay->GetExactResolution() && rDPIY < 96 ) + { + rDPIX = Divide( rDPIX * 96, rDPIY ); + rDPIY = 96; + } + else if ( rDPIY > 200 ) + { + rDPIX = Divide( rDPIX * 200, rDPIY ); + rDPIY = 200; + } + + // #i12705# equalize x- and y-resolution if they are close enough + if( rDPIX != rDPIY ) + { + // different x- and y- resolutions are usually artifacts of + // a wrongly calculated screen size. + //if( (13*rDPIX >= 10*rDPIY) && (13*rDPIY >= 10*rDPIX) ) //+-30% + { +#ifdef DEBUG + printf("Forcing Resolution from %" SAL_PRIdINT32 "x%" SAL_PRIdINT32 " to %" SAL_PRIdINT32 "x%" SAL_PRIdINT32 "\n", + rDPIX,rDPIY,rDPIY,rDPIY); +#endif + rDPIX = rDPIY; // y-resolution is more trustworthy + } + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +USHORT X11SalGraphics::GetBitCount() // const +{ + return GetVisual().GetDepth(); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +long X11SalGraphics::GetGraphicsWidth() const +{ + if( m_pFrame ) + return m_pFrame->maGeometry.nWidth; + else if( m_pVDev ) + return m_pVDev->GetWidth(); + else + return 0; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +long X11SalGraphics::GetGraphicsHeight() const +{ + if( m_pFrame ) + return m_pFrame->maGeometry.nHeight; + else if( m_pVDev ) + return m_pVDev->GetHeight(); + else + return 0; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::ResetClipRegion() +{ + if( pClipRegion_ ) + { + bPenGC_ = FALSE; + bFontGC_ = FALSE; + bBrushGC_ = FALSE; + bMonoGC_ = FALSE; + bCopyGC_ = FALSE; + bInvertGC_ = FALSE; + bInvert50GC_ = FALSE; + bStippleGC_ = FALSE; + bTrackingGC_ = FALSE; + + XDestroyRegion( pClipRegion_ ); + pClipRegion_ = NULL; + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::BeginSetClipRegion( ULONG ) +{ + if( pClipRegion_ ) + XDestroyRegion( pClipRegion_ ); + pClipRegion_ = XCreateRegion(); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +BOOL X11SalGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY ) +{ + if (!nDX || !nDY) + return TRUE; + + XRectangle aRect; + aRect.x = (short)nX; + aRect.y = (short)nY; + aRect.width = (unsigned short)nDX; + aRect.height = (unsigned short)nDY; + + XUnionRectWithRegion( &aRect, pClipRegion_, pClipRegion_ ); + + return TRUE; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +bool X11SalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& ) +{ + // TODO: implement and advertise OutDevSupport_B2DClip support + return false; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::EndSetClipRegion() +{ + bPenGC_ = FALSE; + bFontGC_ = FALSE; + bBrushGC_ = FALSE; + bMonoGC_ = FALSE; + bCopyGC_ = FALSE; + bInvertGC_ = FALSE; + bInvert50GC_ = FALSE; + bStippleGC_ = FALSE; + bTrackingGC_ = FALSE; + + if( XEmptyRegion( pClipRegion_ ) ) + { + XDestroyRegion( pClipRegion_ ); + pClipRegion_= NULL; + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::SetLineColor() +{ + if( nPenColor_ != SALCOLOR_NONE ) + { + nPenColor_ = SALCOLOR_NONE; + bPenGC_ = FALSE; + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::SetLineColor( SalColor nSalColor ) +{ + if( nPenColor_ != nSalColor ) + { + nPenColor_ = nSalColor; + nPenPixel_ = GetPixel( nSalColor ); + bPenGC_ = FALSE; + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::SetFillColor() +{ + if( nBrushColor_ != SALCOLOR_NONE ) + { + bDitherBrush_ = FALSE; + nBrushColor_ = SALCOLOR_NONE; + bBrushGC_ = FALSE; + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::SetFillColor( SalColor nSalColor ) +{ + if( nBrushColor_ != nSalColor ) + { + bDitherBrush_ = FALSE; + nBrushColor_ = nSalColor; + nBrushPixel_ = GetPixel( nSalColor ); + if( TrueColor != GetColormap().GetVisual().GetClass() + && GetColormap().GetColor( nBrushPixel_ ) != nBrushColor_ + && nSalColor != MAKE_SALCOLOR( 0x00, 0x00, 0x00 ) // black + && nSalColor != MAKE_SALCOLOR( 0x00, 0x00, 0x80 ) // blue + && nSalColor != MAKE_SALCOLOR( 0x00, 0x80, 0x00 ) // green + && nSalColor != MAKE_SALCOLOR( 0x00, 0x80, 0x80 ) // cyan + && nSalColor != MAKE_SALCOLOR( 0x80, 0x00, 0x00 ) // red + && nSalColor != MAKE_SALCOLOR( 0x80, 0x00, 0x80 ) // magenta + && nSalColor != MAKE_SALCOLOR( 0x80, 0x80, 0x00 ) // brown + && nSalColor != MAKE_SALCOLOR( 0x80, 0x80, 0x80 ) // gray + && nSalColor != MAKE_SALCOLOR( 0xC0, 0xC0, 0xC0 ) // light gray + && nSalColor != MAKE_SALCOLOR( 0x00, 0x00, 0xFF ) // light blue + && nSalColor != MAKE_SALCOLOR( 0x00, 0xFF, 0x00 ) // light green + && nSalColor != MAKE_SALCOLOR( 0x00, 0xFF, 0xFF ) // light cyan + && nSalColor != MAKE_SALCOLOR( 0xFF, 0x00, 0x00 ) // light red + && nSalColor != MAKE_SALCOLOR( 0xFF, 0x00, 0xFF ) // light magenta + && nSalColor != MAKE_SALCOLOR( 0xFF, 0xFF, 0x00 ) // light brown + && nSalColor != MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF ) ) + bDitherBrush_ = GetDitherPixmap(nSalColor); + bBrushGC_ = FALSE; + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::SetROPLineColor( SalROPColor nROPColor ) +{ + switch( nROPColor ) + { + case SAL_ROP_0 : // 0 + nPenPixel_ = (Pixel)0; + break; + case SAL_ROP_1 : // 1 + nPenPixel_ = (Pixel)(1 << GetVisual().GetDepth()) - 1; + break; + case SAL_ROP_INVERT : // 2 + nPenPixel_ = (Pixel)(1 << GetVisual().GetDepth()) - 1; + break; + } + nPenColor_ = GetColormap().GetColor( nPenPixel_ ); + bPenGC_ = FALSE; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::SetROPFillColor( SalROPColor nROPColor ) +{ + switch( nROPColor ) + { + case SAL_ROP_0 : // 0 + nBrushPixel_ = (Pixel)0; + break; + case SAL_ROP_1 : // 1 + nBrushPixel_ = (Pixel)(1 << GetVisual().GetDepth()) - 1; + break; + case SAL_ROP_INVERT : // 2 + nBrushPixel_ = (Pixel)(1 << GetVisual().GetDepth()) - 1; + break; + } + bDitherBrush_ = FALSE; + nBrushColor_ = GetColormap().GetColor( nBrushPixel_ ); + bBrushGC_ = FALSE; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::SetXORMode( bool bSet, bool ) +{ + if( !bXORMode_ == bSet ) + { + bXORMode_ = bSet; + bPenGC_ = FALSE; + bFontGC_ = FALSE; + bBrushGC_ = FALSE; + bMonoGC_ = FALSE; + bCopyGC_ = FALSE; + bInvertGC_ = FALSE; + bInvert50GC_ = FALSE; + bStippleGC_ = FALSE; + bTrackingGC_ = FALSE; + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::drawPixel( long nX, long nY ) +{ + if( nPenColor_ != SALCOLOR_NONE ) + XDrawPoint( GetXDisplay(), GetDrawable(), SelectPen(), nX, nY ); +} + +void X11SalGraphics::drawPixel( long nX, long nY, SalColor nSalColor ) +{ + if( nSalColor != SALCOLOR_NONE ) + { + Display *pDisplay = GetXDisplay(); + + if( (nPenColor_ == SALCOLOR_NONE) && !bPenGC_ ) + { + SetLineColor( nSalColor ); + XDrawPoint( pDisplay, GetDrawable(), SelectPen(), nX, nY ); + nPenColor_ = SALCOLOR_NONE; + bPenGC_ = False; + } + else + { + GC pGC = SelectPen(); + + if( nSalColor != nPenColor_ ) + XSetForeground( pDisplay, pGC, GetPixel( nSalColor ) ); + + XDrawPoint( pDisplay, GetDrawable(), pGC, nX, nY ); + + if( nSalColor != nPenColor_ ) + XSetForeground( pDisplay, pGC, nPenPixel_ ); + } + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 ) +{ + if( nPenColor_ != SALCOLOR_NONE ) + { + if ( GetDisplay()->GetProperties() & PROPERTY_BUG_DrawLine ) + { + GC aGC = SelectPen(); + XDrawPoint (GetXDisplay(), GetDrawable(), aGC, (int)nX1, (int)nY1); + XDrawPoint (GetXDisplay(), GetDrawable(), aGC, (int)nX2, (int)nY2); + XDrawLine (GetXDisplay(), GetDrawable(), aGC, nX1, nY1, nX2, nY2 ); + } + else + XDrawLine( GetXDisplay(), GetDrawable(),SelectPen(), + nX1, nY1, nX2, nY2 ); + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::drawRect( long nX, long nY, long nDX, long nDY ) +{ + if( nBrushColor_ != SALCOLOR_NONE ) + { + XFillRectangle( GetXDisplay(), + GetDrawable(), + SelectBrush(), + nX, nY, nDX, nDY ); + } + // Beschreibung DrawRect verkehrt, deshalb -1 + if( nPenColor_ != SALCOLOR_NONE ) + XDrawRectangle( GetXDisplay(), + GetDrawable(), + SelectPen(), + nX, nY, nDX-1, nDY-1 ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry ) +{ + drawPolyLine( nPoints, pPtAry, false ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry, bool bClose ) +{ + if( nPenColor_ != 0xFFFFFFFF ) + { + SalPolyLine Points( nPoints, pPtAry ); + + DrawLines( nPoints, Points, SelectPen(), bClose ); + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry ) +{ + if( nPoints == 0 ) + return; + + if( nPoints < 3 ) + { + if( !bXORMode_ ) + { + if( 1 == nPoints ) + drawPixel( pPtAry[0].mnX, pPtAry[0].mnY ); + else + drawLine( pPtAry[0].mnX, pPtAry[0].mnY, + pPtAry[1].mnX, pPtAry[1].mnY ); + } + return; + } + + SalPolyLine Points( nPoints, pPtAry ); + + nPoints++; + + /* WORKAROUND: some Xservers (Xorg, VIA chipset in this case) + * do not draw the visible part of a polygon + * if it overlaps to the left of screen 0,y. + * This happens to be the case in the gradient drawn in the + * menubar background. workaround for the special case of + * of a rectangle overlapping to the left. + */ + if( nPoints == 5 && + Points[ 0 ].x == Points[ 1 ].x && + Points[ 1 ].y == Points[ 2 ].y && + Points[ 2 ].x == Points[ 3 ].x && + Points[ 0 ].x == Points[ 4 ].x && Points[ 0 ].y == Points[ 4 ].y + ) + { + bool bLeft = false; + bool bRight = false; + for(unsigned int i = 0; i < nPoints; i++ ) + { + if( Points[i].x < 0 ) + bLeft = true; + else + bRight= true; + } + if( bLeft && ! bRight ) + return; + if( bLeft && bRight ) + { + for( unsigned int i = 0; i < nPoints; i++ ) + if( Points[i].x < 0 ) + Points[i].x = 0; + } + } + + if( nBrushColor_ != SALCOLOR_NONE ) + XFillPolygon( GetXDisplay(), + GetDrawable(), + SelectBrush(), + &Points[0], nPoints, + Complex, CoordModeOrigin ); + + if( nPenColor_ != 0xFFFFFFFF ) + DrawLines( nPoints, Points, SelectPen(), true ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::drawPolyPolygon( sal_uInt32 nPoly, + const sal_uInt32 *pPoints, + PCONSTSALPOINT *pPtAry ) +{ + if( nBrushColor_ != SALCOLOR_NONE ) + { + ULONG i, n; + XLIB_Region pXRegA = NULL; + + for( i = 0; i < nPoly; i++ ) { + n = pPoints[i]; + SalPolyLine Points( n, pPtAry[i] ); + if( n > 2 ) + { + XLIB_Region pXRegB = XPolygonRegion( &Points[0], n+1, WindingRule ); + if( !pXRegA ) + pXRegA = pXRegB; + else + { + XXorRegion( pXRegA, pXRegB, pXRegA ); + XDestroyRegion( pXRegB ); + } + } + } + + if( pXRegA ) + { + XRectangle aXRect; + XClipBox( pXRegA, &aXRect ); + + GC pGC = SelectBrush(); + SetClipRegion( pGC, pXRegA ); // ??? doppelt + XDestroyRegion( pXRegA ); + bBrushGC_ = FALSE; + + XFillRectangle( GetXDisplay(), + GetDrawable(), + pGC, + aXRect.x, aXRect.y, aXRect.width, aXRect.height ); + } + } + + if( nPenColor_ != SALCOLOR_NONE ) + for( ULONG i = 0; i < nPoly; i++ ) + drawPolyLine( pPoints[i], pPtAry[i], true ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +sal_Bool X11SalGraphics::drawPolyLineBezier( ULONG, const SalPoint*, const BYTE* ) +{ + return sal_False; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +sal_Bool X11SalGraphics::drawPolygonBezier( ULONG, const SalPoint*, const BYTE* ) +{ + return sal_False; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +sal_Bool X11SalGraphics::drawPolyPolygonBezier( sal_uInt32, const sal_uInt32*, + const SalPoint* const*, const BYTE* const* ) +{ + return sal_False; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +void X11SalGraphics::invert( ULONG nPoints, + const SalPoint* pPtAry, + SalInvert nFlags ) +{ + SalPolyLine Points ( nPoints, pPtAry ); + + GC pGC; + if( SAL_INVERT_50 & nFlags ) + pGC = GetInvert50GC(); + else + if ( SAL_INVERT_TRACKFRAME & nFlags ) + pGC = GetTrackingGC(); + else + pGC = GetInvertGC(); + + if( SAL_INVERT_TRACKFRAME & nFlags ) + DrawLines ( nPoints, Points, pGC, true ); + else + XFillPolygon( GetXDisplay(), + GetDrawable(), + pGC, + &Points[0], nPoints, + Complex, CoordModeOrigin ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +BOOL X11SalGraphics::drawEPS( long,long,long,long,void*,ULONG ) +{ + return FALSE; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +XID X11SalGraphics::GetXRenderPicture() +{ + XRenderPeer& rRenderPeer = XRenderPeer::GetInstance(); + + if( !m_aRenderPicture ) + { + // check xrender support for matching visual + // find a XRenderPictFormat compatible with the Drawable + XRenderPictFormat* pVisualFormat = static_cast(GetXRenderFormat()); + if( !pVisualFormat ) + { + Visual* pVisual = GetDisplay()->GetVisual( m_nScreen ).GetVisual(); + pVisualFormat = rRenderPeer.FindVisualFormat( pVisual ); + if( !pVisualFormat ) + return 0; + // cache the XRenderPictFormat + SetXRenderFormat( static_cast(pVisualFormat) ); + } + + // get the matching xrender target for drawable + m_aRenderPicture = rRenderPeer.CreatePicture( hDrawable_, pVisualFormat, 0, NULL ); + } + +#if 0 + // setup clipping so the callers don't have to do it themselves + // TODO: avoid clipping if already set correctly + if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) ) + rRenderPeer.SetPictureClipRegion( aDstPic, pClipRegion_ ); + else +#endif + { + // reset clip region + // TODO: avoid clip reset if already done + XRenderPictureAttributes aAttr; + aAttr.clip_mask = None; + rRenderPeer.ChangePicture( m_aRenderPicture, CPClipMask, &aAttr ); + } + + return m_aRenderPicture; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +SystemGraphicsData X11SalGraphics::GetGraphicsData() const +{ + SystemGraphicsData aRes; + + aRes.nSize = sizeof(aRes); + aRes.pDisplay = GetXDisplay(); + aRes.hDrawable = hDrawable_; + aRes.pVisual = GetDisplay()->GetVisual( m_nScreen ).GetVisual(); + aRes.nScreen = m_nScreen; + aRes.nDepth = GetDisplay()->GetVisual( m_nScreen ).GetDepth(); + aRes.aColormap = GetDisplay()->GetColormap( m_nScreen ).GetXColormap(); + aRes.pRenderFormat = m_pRenderFormat; + return aRes; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +// draw a poly-polygon +bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rOrigPolyPoly, double fTransparency ) +{ + // nothing to do for empty polypolygons + const int nOrigPolyCount = rOrigPolyPoly.count(); + if( nOrigPolyCount <= 0 ) + return TRUE; + + // nothing to do if everything is transparent + if( (nBrushColor_ == SALCOLOR_NONE) + && (nPenColor_ == SALCOLOR_NONE) ) + return TRUE; + + // cannot handle pencolor!=brushcolor yet + if( (nPenColor_ != SALCOLOR_NONE) + && (nPenColor_ != nBrushColor_) ) + return FALSE; + + // TODO: remove the env-variable when no longer needed + static const char* pRenderEnv = getenv( "SAL_DISABLE_RENDER_POLY" ); + if( pRenderEnv ) + return FALSE; + + // snap to raster if requested + basegfx::B2DPolyPolygon aPolyPoly = rOrigPolyPoly; + const bool bSnapToRaster = !getAntiAliasB2DDraw(); + if( bSnapToRaster ) + aPolyPoly = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges( aPolyPoly ); + + // don't bother with polygons outside of visible area + const basegfx::B2DRange aViewRange( 0, 0, GetGraphicsWidth(), GetGraphicsHeight() ); + aPolyPoly = basegfx::tools::clipPolyPolygonOnRange( aPolyPoly, aViewRange, true, false ); + if( !aPolyPoly.count() ) + return true; + + // tesselate the polypolygon into trapezoids + basegfx::B2DTrapezoidVector aB2DTrapVector; + basegfx::tools::trapezoidSubdivide( aB2DTrapVector, aPolyPoly ); + const int nTrapCount = aB2DTrapVector.size(); + if( !nTrapCount ) + return true; + const bool bDrawn = drawFilledTrapezoids( &aB2DTrapVector[0], nTrapCount, fTransparency ); + return bDrawn; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +bool X11SalGraphics::drawFilledTrapezoids( const ::basegfx::B2DTrapezoid* pB2DTraps, int nTrapCount, double fTransparency ) +{ + if( nTrapCount <= 0 ) + return true; + + Picture aDstPic = GetXRenderPicture(); + // check xrender support for this drawable + if( !aDstPic ) + return false; + + // convert the B2DTrapezoids into XRender-Trapezoids + typedef std::vector TrapezoidVector; + TrapezoidVector aTrapVector( nTrapCount ); + const basegfx::B2DTrapezoid* pB2DTrap = pB2DTraps; + for( int i = 0; i < nTrapCount; ++pB2DTrap, ++i ) + { + XTrapezoid& rTrap = aTrapVector[ i ] ; + + // set y-coordinates + const double fY1 = pB2DTrap->getTopY(); + rTrap.left.p1.y = rTrap.right.p1.y = rTrap.top = XDoubleToFixed( fY1 ); + const double fY2 = pB2DTrap->getBottomY(); + rTrap.left.p2.y = rTrap.right.p2.y = rTrap.bottom = XDoubleToFixed( fY2 ); + + // set x-coordinates + const double fXL1 = pB2DTrap->getTopXLeft(); + rTrap.left.p1.x = XDoubleToFixed( fXL1 ); + const double fXR1 = pB2DTrap->getTopXRight(); + rTrap.right.p1.x = XDoubleToFixed( fXR1 ); + const double fXL2 = pB2DTrap->getBottomXLeft(); + rTrap.left.p2.x = XDoubleToFixed( fXL2 ); + const double fXR2 = pB2DTrap->getBottomXRight(); + rTrap.right.p2.x = XDoubleToFixed( fXR2 ); + } + + // get xrender Picture for polygon foreground + // TODO: cache it like the target picture which uses GetXRenderPicture() + XRenderPeer& rRenderPeer = XRenderPeer::GetInstance(); + SalDisplay::RenderEntry& rEntry = GetDisplay()->GetRenderEntries( m_nScreen )[ 32 ]; + if( !rEntry.m_aPicture ) + { + Display* pXDisplay = GetXDisplay(); + + rEntry.m_aPixmap = ::XCreatePixmap( pXDisplay, hDrawable_, 1, 1, 32 ); + XRenderPictureAttributes aAttr; + aAttr.repeat = true; + + XRenderPictFormat* pXRPF = rRenderPeer.FindStandardFormat( PictStandardARGB32 ); + rEntry.m_aPicture = rRenderPeer.CreatePicture( rEntry.m_aPixmap, pXRPF, CPRepeat, &aAttr ); + } + + // set polygon foreground color and opacity + XRenderColor aRenderColor = GetXRenderColor( nBrushColor_ , fTransparency ); + rRenderPeer.FillRectangle( PictOpSrc, rEntry.m_aPicture, &aRenderColor, 0, 0, 1, 1 ); + + // set clipping + // TODO: move into GetXRenderPicture? + if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) ) + rRenderPeer.SetPictureClipRegion( aDstPic, pClipRegion_ ); + + // render the trapezoids + const XRenderPictFormat* pMaskFormat = rRenderPeer.GetStandardFormatA8(); + rRenderPeer.CompositeTrapezoids( PictOpOver, + rEntry.m_aPicture, aDstPic, pMaskFormat, 0, 0, &aTrapVector[0], aTrapVector.size() ); + + return true; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, double fTransparency, const ::basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin eLineJoin) +{ + const bool bIsHairline = (rLineWidth.getX() == rLineWidth.getY()) && (rLineWidth.getX() <= 1.2); + + // #i101491# + if( !bIsHairline && (rPolygon.count() > 1000) ) + { + // the used basegfx::tools::createAreaGeometry is simply too + // expensive with very big polygons; fallback to caller (who + // should use ImplLineConverter normally) + // AW: ImplLineConverter had to be removed since it does not even + // know LineJoins, so the fallback will now prepare the line geometry + // the same way. + return false; + } + + // temporarily adjust brush color to pen color + // since the line is drawn as an area-polygon + const SalColor aKeepBrushColor = nBrushColor_; + nBrushColor_ = nPenColor_; + + // #i11575#desc5#b adjust B2D tesselation result to raster positions + basegfx::B2DPolygon aPolygon = rPolygon; + const double fHalfWidth = 0.5 * rLineWidth.getX(); + aPolygon.transform( basegfx::tools::createTranslateB2DHomMatrix(+fHalfWidth,+fHalfWidth) ); + + // shortcut for hairline drawing to improve performance + if( bIsHairline ) + { + // hairlines can benefit from a simplified tesselation + // e.g. for hairlines the linejoin style can be ignored + basegfx::B2DTrapezoidVector aB2DTrapVector; + basegfx::tools::createLineTrapezoidFromB2DPolygon( aB2DTrapVector, aPolygon, rLineWidth.getX() ); + + // draw tesselation result + if( ! aB2DTrapVector.empty() ) + { + const int nTrapCount = aB2DTrapVector.size(); + const bool bDrawOk = drawFilledTrapezoids( &aB2DTrapVector[0], nTrapCount, fTransparency ); + + // restore the original brush GC + nBrushColor_ = aKeepBrushColor; + return bDrawOk; + } + else + return true; + } + + // get the area polygon for the line polygon + if( (rLineWidth.getX() != rLineWidth.getY()) + && !basegfx::fTools::equalZero( rLineWidth.getY() ) ) + { + // prepare for createAreaGeometry() with anisotropic linewidth + aPolygon.transform( basegfx::tools::createScaleB2DHomMatrix(1.0, rLineWidth.getX() / rLineWidth.getY())); + } + + // create the area-polygon for the line + const basegfx::B2DPolyPolygon aAreaPolyPoly( basegfx::tools::createAreaGeometry(aPolygon, fHalfWidth, eLineJoin) ); + + if( (rLineWidth.getX() != rLineWidth.getY()) + && !basegfx::fTools::equalZero( rLineWidth.getX() ) ) + { + // postprocess createAreaGeometry() for anisotropic linewidth + aPolygon.transform(basegfx::tools::createScaleB2DHomMatrix(1.0, rLineWidth.getY() / rLineWidth.getX())); + } + + // draw each area polypolygon component individually + // to emulate the polypolygon winding rule "non-zero" + bool bDrawOk = true; + const int nPolyCount = aAreaPolyPoly.count(); + for( int nPolyIdx = 0; nPolyIdx < nPolyCount; ++nPolyIdx ) + { + const ::basegfx::B2DPolyPolygon aOnePoly( aAreaPolyPoly.getB2DPolygon( nPolyIdx ) ); + bDrawOk = drawPolyPolygon( aOnePoly, fTransparency ); + if( !bDrawOk ) + break; + } + + // restore the original brush GC + nBrushColor_ = aKeepBrushColor; + return bDrawOk; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + diff --git a/vcl/unx/generic/gdi/salgdi2.cxx b/vcl/unx/generic/gdi/salgdi2.cxx new file mode 100644 index 000000000000..54c978b47794 --- /dev/null +++ b/vcl/unx/generic/gdi/salgdi2.cxx @@ -0,0 +1,1151 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include + +#include "vcl/salbtype.hxx" + +#include "unx/salunx.h" +#include "unx/saldata.hxx" +#include "unx/saldisp.hxx" +#include "unx/salbmp.h" +#include "unx/salgdi.h" +#include "unx/salframe.h" +#include "unx/salvd.h" +#include "xrender_peer.hxx" + +#include "printergfx.hxx" + +#include "vcl/bmpacc.hxx" + +#undef SALGDI2_TESTTRANS + +// -=-= debugging =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +#if 0 + +static void sal_PrintImage( char *s, XImage*p ) +{ + fprintf( stderr, "%s %d %d %d\n", s, p->depth, p->width, p->height ); + int nW = Min( 64, p->width*p->bits_per_pixel >> 3 ); + for( int i = 0; i < Min( 16, p->height ); i++ ) + { + for( int j = 0; j < nW; j++ ) + fprintf( stderr, "%02X", (UINT8)p->data[i*p->bytes_per_line+j] ); + fprintf( stderr, "\n" ); + } +} + +#endif // DBG_UTIL + +// ----------------------------------------------------------------------------- + +#if (OSL_DEBUG_LEVEL > 1) && defined SALGDI2_TESTTRANS +#define DBG_TESTTRANS( _def_drawable ) \ +{ \ + XCopyArea( pXDisp, _def_drawable, aDrawable, GetCopyGC(), \ + 0, 0, \ + pPosAry->mnDestWidth, pPosAry->mnDestHeight, \ + 0, 0 ); \ +} +#else // (OSL_DEBUG_LEVEL > 1) && defined SALGDI2_TESTTRANS +#define DBG_TESTTRANS( _def_drawable ) +#endif // (OSL_DEBUG_LEVEL > 1) && defined SALGDI2_TESTTRANS + +// -=-= X11SalGraphics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::CopyScreenArea( Display* pDisplay, + Drawable aSrc, int nScreenSrc, int nSrcDepth, + Drawable aDest, int nScreenDest, int nDestDepth, + GC aDestGC, + int src_x, int src_y, + unsigned int w, unsigned int h, + int dest_x, int dest_y ) +{ + if( nSrcDepth == nDestDepth ) + { + if( nScreenSrc == nScreenDest ) + XCopyArea( pDisplay, aSrc, aDest, aDestGC, + src_x, src_y, w, h, dest_x, dest_y ); + else + { + SalXLib* pLib = GetX11SalData()->GetDisplay()->GetXLib(); + pLib->PushXErrorLevel( true ); + XImage* pImage = XGetImage( pDisplay, aSrc, src_x, src_y, w, h, + AllPlanes, ZPixmap ); + if( pImage ) + { + if( pImage->data ) + { + XPutImage( pDisplay, aDest, aDestGC, pImage, + 0, 0, dest_x, dest_y, w, h ); + } + XDestroyImage( pImage ); + } + pLib->PopXErrorLevel(); + } + } + else + { + X11SalBitmap aBM; + aBM.ImplCreateFromDrawable( aSrc, nScreenSrc, nSrcDepth, src_x, src_y, w, h ); + SalTwoRect aTwoRect; + aTwoRect.mnSrcX = aTwoRect.mnSrcY = 0; + aTwoRect.mnSrcWidth = aTwoRect.mnDestWidth = w; + aTwoRect.mnSrcHeight = aTwoRect.mnDestHeight = h; + aTwoRect.mnDestX = dest_x; + aTwoRect.mnDestY = dest_y; + aBM.ImplDraw( aDest, nScreenDest, nDestDepth, aTwoRect,aDestGC ); + } +} + +GC X11SalGraphics::CreateGC( Drawable hDrawable, unsigned long nMask ) +{ + XGCValues values; + + values.graphics_exposures = False; + values.foreground = m_pColormap->GetBlackPixel() + ^ m_pColormap->GetWhitePixel(); + values.function = GXxor; + values.line_width = 1; + values.fill_style = FillStippled; + values.stipple = GetDisplay()->GetInvert50( m_nScreen ); + values.subwindow_mode = ClipByChildren; + + return XCreateGC( GetXDisplay(), hDrawable, nMask | GCSubwindowMode, &values ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +inline GC X11SalGraphics::GetMonoGC( Pixmap hPixmap ) +{ + if( !pMonoGC_ ) + pMonoGC_ = CreateGC( hPixmap ); + + if( !bMonoGC_ ) + { + SetClipRegion( pMonoGC_ ); + bMonoGC_ = TRUE; + } + + return pMonoGC_; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +inline GC X11SalGraphics::GetCopyGC() +{ + if( bXORMode_ ) return GetInvertGC(); + + if( !pCopyGC_ ) + pCopyGC_ = CreateGC( GetDrawable() ); + + if( !bCopyGC_ ) + { + SetClipRegion( pCopyGC_ ); + bCopyGC_ = TRUE; + } + return pCopyGC_; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +GC X11SalGraphics::GetInvertGC() +{ + if( !pInvertGC_ ) + pInvertGC_ = CreateGC( GetDrawable(), + GCGraphicsExposures + | GCForeground + | GCFunction + | GCLineWidth ); + + if( !bInvertGC_ ) + { + SetClipRegion( pInvertGC_ ); + bInvertGC_ = TRUE; + } + return pInvertGC_; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +GC X11SalGraphics::GetInvert50GC() +{ + if( !pInvert50GC_ ) + { + XGCValues values; + + values.graphics_exposures = False; + values.foreground = m_pColormap->GetWhitePixel(); + values.background = m_pColormap->GetBlackPixel(); + values.function = GXinvert; + values.line_width = 1; + values.line_style = LineSolid; + unsigned long nValueMask = + GCGraphicsExposures + | GCForeground + | GCBackground + | GCFunction + | GCLineWidth + | GCLineStyle + | GCFillStyle + | GCStipple; + + char* pEnv = getenv( "SAL_DO_NOT_USE_INVERT50" ); + if( pEnv && ! strcasecmp( pEnv, "true" ) ) + { + values.fill_style = FillSolid; + nValueMask &= ~ GCStipple; + } + else + { + values.fill_style = FillStippled; + values.stipple = GetDisplay()->GetInvert50( m_nScreen ); + } + + pInvert50GC_ = XCreateGC( GetXDisplay(), GetDrawable(), + nValueMask, + &values ); + } + + if( !bInvert50GC_ ) + { + SetClipRegion( pInvert50GC_ ); + bInvert50GC_ = TRUE; + } + return pInvert50GC_; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +inline GC X11SalGraphics::GetStippleGC() +{ + if( !pStippleGC_ ) + pStippleGC_ = CreateGC( GetDrawable(), + GCGraphicsExposures + | GCFillStyle + | GCLineWidth ); + + if( !bStippleGC_ ) + { + XSetFunction( GetXDisplay(), pStippleGC_, bXORMode_ ? GXxor : GXcopy ); + SetClipRegion( pStippleGC_ ); + bStippleGC_ = TRUE; + } + + return pStippleGC_; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +int X11SalGraphics::Clip( XLIB_Region pRegion, + int &nX, + int &nY, + unsigned int &nDX, + unsigned int &nDY, + int &nSrcX, + int &nSrcY ) const +{ + XRectangle aRect; + XClipBox( pRegion, &aRect ); + + if( int(nX + nDX) <= int(aRect.x) || nX >= int(aRect.x + aRect.width) ) + return RectangleOut; + if( int(nY + nDY) <= int(aRect.y) || nY >= int(aRect.y + aRect.height) ) + return RectangleOut; + + if( nX < aRect.x ) + { + nSrcX += aRect.x - nX; + nDX -= aRect.x - nX; + nX = aRect.x; + } + else if( int(nX + nDX) > int(aRect.x + aRect.width) ) + nDX = aRect.x + aRect.width - nX; + + if( nY < aRect.y ) + { + nSrcY += aRect.y - nY; + nDY -= aRect.y - nY; + nY = aRect.y; + } + else if( int(nY + nDY) > int(aRect.y + aRect.height) ) + nDY = aRect.y + aRect.height - nY; + + return RectangleIn; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +int X11SalGraphics::Clip( int &nX, + int &nY, + unsigned int &nDX, + unsigned int &nDY, + int &nSrcX, + int &nSrcY ) const + +{ + if( pPaintRegion_ + && RectangleOut == Clip( pPaintRegion_, nX, nY, nDX, nDY, nSrcX, nSrcY ) ) + return RectangleOut; + + if( pClipRegion_ + && RectangleOut == Clip( pClipRegion_, nX, nY, nDX, nDY, nSrcX, nSrcY ) ) + return RectangleOut; + + int nPaint; + if( pPaintRegion_ ) + { + nPaint = XRectInRegion( pPaintRegion_, nX, nY, nDX, nDY ); + if( RectangleOut == nPaint ) + return RectangleOut; + } + else + nPaint = RectangleIn; + + int nClip; + if( pClipRegion_ ) + { + nClip = XRectInRegion( pClipRegion_, nX, nY, nDX, nDY ); + if( RectangleOut == nClip ) + return RectangleOut; + } + else + nClip = RectangleIn; + + return RectangleIn == nClip && RectangleIn == nPaint + ? RectangleIn + : RectanglePart; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +GC X11SalGraphics::SetMask( int &nX, + int &nY, + unsigned int &nDX, + unsigned int &nDY, + int &nSrcX, + int &nSrcY, + Pixmap hClipMask ) +{ + int n = Clip( nX, nY, nDX, nDY, nSrcX, nSrcY ); + if( RectangleOut == n ) + return NULL; + + Display *pDisplay = GetXDisplay(); + + if( !pMaskGC_ ) + pMaskGC_ = CreateGC( GetDrawable() ); + + if( RectangleIn == n ) + { + XSetClipMask( pDisplay, pMaskGC_, hClipMask ); + XSetClipOrigin( pDisplay, pMaskGC_, nX - nSrcX, nY - nSrcY ); + return pMaskGC_; + } + + // - - - - create alternate clip pixmap for region clipping - - - - + Pixmap hPixmap = XCreatePixmap( pDisplay, hClipMask, nDX, nDY, 1 ); + + if( !hPixmap ) + { +#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL + fprintf( stderr, "X11SalGraphics::SetMask !hPixmap\n" ); +#endif + return NULL; + } + + // - - - - reset pixmap; all 0 - - - - - - - - - - - - - - - - - - - + XFillRectangle( pDisplay, + hPixmap, + GetDisplay()->GetMonoGC( m_nScreen ), + 0, 0, + nDX, nDY ); + + // - - - - copy pixmap only within region - - - - - - - - - - - - - + GC pMonoGC = GetMonoGC( hPixmap ); + XSetClipOrigin( pDisplay, pMonoGC, -nX, -nY ); + XCopyArea( pDisplay, + hClipMask, // Source + hPixmap, // Destination + pMonoGC, + nSrcX, nSrcY, // Source + nDX, nDY, // Width & Height + 0, 0 ); // Destination + + XSetClipMask( pDisplay, pMaskGC_, hPixmap ); + XSetClipOrigin( pDisplay, pMaskGC_, nX, nY ); + + XFreePixmap( pDisplay, hPixmap ); + return pMaskGC_; +} + +// -=-= SalGraphics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +extern "C" +{ + static Bool GraphicsExposePredicate( Display*, XEvent* pEvent, XPointer pFrameWindow ) + { + Bool bRet = False; + if( (pEvent->type == GraphicsExpose || pEvent->type == NoExpose) && + pEvent->xnoexpose.drawable == (Drawable)pFrameWindow ) + { + bRet = True; + } + return bRet; + } +} + + +void X11SalGraphics::YieldGraphicsExpose() +{ + // get frame if necessary + SalFrame* pFrame = m_pFrame; + Display* pDisplay = GetXDisplay(); + XLIB_Window aWindow = GetDrawable(); + if( ! pFrame ) + { + const std::list< SalFrame* >& rFrames = GetX11SalData()->GetDisplay()->getFrames(); + for( std::list< SalFrame* >::const_iterator it = rFrames.begin(); it != rFrames.end() && ! pFrame; ++it ) + { + const SystemEnvData* pEnvData = (*it)->GetSystemData(); + if( Drawable(pEnvData->aWindow) == aWindow ) + pFrame = *it; + } + if( ! pFrame ) + return; + } + + XEvent aEvent; + while( XCheckTypedWindowEvent( pDisplay, aWindow, Expose, &aEvent ) ) + { + SalPaintEvent aPEvt( aEvent.xexpose.x, aEvent.xexpose.y, aEvent.xexpose.width+1, aEvent.xexpose.height+1 ); + pFrame->CallCallback( SALEVENT_PAINT, &aPEvt ); + } + + do + { + if( ! GetDisplay()->XIfEventWithTimeout( &aEvent, (XPointer)aWindow, GraphicsExposePredicate ) ) + // this should not happen at all; still sometimes it happens + break; + + if( aEvent.type == NoExpose ) + break; + + if( pFrame ) + { + SalPaintEvent aPEvt( aEvent.xgraphicsexpose.x, aEvent.xgraphicsexpose.y, aEvent.xgraphicsexpose.width+1, aEvent.xgraphicsexpose.height+1 ); + pFrame->CallCallback( SALEVENT_PAINT, &aPEvt ); + } + } while( aEvent.xgraphicsexpose.count != 0 ); +} + +void X11SalGraphics::copyBits( const SalTwoRect *pPosAry, + SalGraphics *pSSrcGraphics ) +{ + X11SalGraphics* pSrcGraphics = pSSrcGraphics + ? static_cast(pSSrcGraphics) + : this; + + if( pPosAry->mnSrcWidth <= 0 + || pPosAry->mnSrcHeight <= 0 + || pPosAry->mnDestWidth <= 0 + || pPosAry->mnDestHeight <= 0 ) + { + return; + } + + int n; + if( pSrcGraphics == this ) + { + n = 2; + } + else if( pSrcGraphics->bWindow_ ) + { + // window or compatible virtual device + if( pSrcGraphics->GetDisplay() == GetDisplay() && + pSrcGraphics->m_nScreen == m_nScreen && + pSrcGraphics->GetVisual().GetDepth() == GetVisual().GetDepth() + ) + n = 2; // same Display + else + n = 1; // printer or other display + } + else if( pSrcGraphics->bVirDev_ ) + { + // printer compatible virtual device + if( bPrinter_ ) + n = 2; // printer or compatible virtual device == same display + else + n = 1; // window or compatible virtual device + } + else + n = 0; + + if( n == 2 + && pPosAry->mnSrcWidth == pPosAry->mnDestWidth + && pPosAry->mnSrcHeight == pPosAry->mnDestHeight + ) + { + // #i60699# Need to generate graphics exposures (to repaint + // obscured areas beneath overlapping windows), src and dest + // are the same window. + const bool bNeedGraphicsExposures( pSrcGraphics == this && + !bVirDev_ && + pSrcGraphics->bWindow_ ); + + GC pCopyGC; + + if( bXORMode_ + && !pSrcGraphics->bVirDev_ + && (GetDisplay()->GetProperties() & PROPERTY_BUG_XCopyArea_GXxor) ) + { + Pixmap hPixmap = XCreatePixmap( GetXDisplay(), + pSrcGraphics->GetDrawable(), // source + pPosAry->mnSrcWidth, pPosAry->mnSrcHeight, + pSrcGraphics->GetBitCount() ); + + pCopyGC = GetDisplay()->GetCopyGC( m_nScreen ); + + if( bNeedGraphicsExposures ) + XSetGraphicsExposures( GetXDisplay(), + pCopyGC, + True ); + + XCopyArea( GetXDisplay(), + pSrcGraphics->GetDrawable(), // source + hPixmap, // destination + pCopyGC, // no clipping + pPosAry->mnSrcX, pPosAry->mnSrcY, + pPosAry->mnSrcWidth, pPosAry->mnSrcHeight, + 0, 0 ); // destination + XCopyArea( GetXDisplay(), + hPixmap, // source + GetDrawable(), // destination + GetInvertGC(), // destination clipping + 0, 0, // source + pPosAry->mnSrcWidth, pPosAry->mnSrcHeight, + pPosAry->mnDestX, pPosAry->mnDestY ); + XFreePixmap( GetXDisplay(), hPixmap ); + } + else + { + pCopyGC = GetCopyGC(); + + if( bNeedGraphicsExposures ) + XSetGraphicsExposures( GetXDisplay(), + pCopyGC, + True ); + + XCopyArea( GetXDisplay(), + pSrcGraphics->GetDrawable(), // source + GetDrawable(), // destination + pCopyGC, // destination clipping + pPosAry->mnSrcX, pPosAry->mnSrcY, + pPosAry->mnSrcWidth, pPosAry->mnSrcHeight, + pPosAry->mnDestX, pPosAry->mnDestY ); + } + + if( bNeedGraphicsExposures ) + { + YieldGraphicsExpose(); + + if( pCopyGC ) + XSetGraphicsExposures( GetXDisplay(), + pCopyGC, + False ); + } + } + else if( n ) + { + // #i60699# No chance to handle graphics exposures - we copy + // to a temp bitmap first, into which no repaints are + // technically possible. + SalBitmap *pDDB = pSrcGraphics->getBitmap( pPosAry->mnSrcX, + pPosAry->mnSrcY, + pPosAry->mnSrcWidth, + pPosAry->mnSrcHeight ); + + if( !pDDB ) + { + stderr0( "SalGraphics::CopyBits !pSrcGraphics->GetBitmap()\n" ); + return; + } + + SalTwoRect aPosAry( *pPosAry ); + + aPosAry.mnSrcX = 0, aPosAry.mnSrcY = 0; + drawBitmap( &aPosAry, *pDDB ); + + delete pDDB; + } + else { + stderr0( "X11SalGraphics::CopyBits from Printer not yet implemented\n" ); + } +} + +// -------------------------------------------------------------------------- + +void X11SalGraphics::copyArea ( long nDestX, long nDestY, + long nSrcX, long nSrcY, + long nSrcWidth, long nSrcHeight, + USHORT ) +{ + SalTwoRect aPosAry; + + aPosAry.mnDestX = nDestX; + aPosAry.mnDestY = nDestY; + aPosAry.mnDestWidth = nSrcWidth; + aPosAry.mnDestHeight = nSrcHeight; + + aPosAry.mnSrcX = nSrcX; + aPosAry.mnSrcY = nSrcY; + aPosAry.mnSrcWidth = nSrcWidth; + aPosAry.mnSrcHeight = nSrcHeight; + + copyBits ( &aPosAry, 0 ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap ) +{ + const SalDisplay* pSalDisp = GetDisplay(); + Display* pXDisp = pSalDisp->GetDisplay(); + const Drawable aDrawable( GetDrawable() ); + const SalColormap& rColMap = pSalDisp->GetColormap( m_nScreen ); + const long nDepth = GetDisplay()->GetVisual( m_nScreen ).GetDepth(); + GC aGC( GetCopyGC() ); + XGCValues aOldVal, aNewVal; + int nValues = GCForeground | GCBackground; + + if( rSalBitmap.GetBitCount() == 1 ) + { + // set foreground/background values for 1Bit bitmaps + XGetGCValues( pXDisp, aGC, nValues, &aOldVal ); + aNewVal.foreground = rColMap.GetWhitePixel(), aNewVal.background = rColMap.GetBlackPixel(); + XChangeGC( pXDisp, aGC, nValues, &aNewVal ); + } + + static_cast(rSalBitmap).ImplDraw( aDrawable, m_nScreen, nDepth, *pPosAry, aGC ); + + if( rSalBitmap.GetBitCount() == 1 ) + XChangeGC( pXDisp, aGC, nValues, &aOldVal ); + XFlush( pXDisp ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +void X11SalGraphics::drawBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSrcBitmap, + const SalBitmap& rMaskBitmap ) +{ + DBG_ASSERT( !bPrinter_, "Drawing of transparent bitmaps on printer devices is strictly forbidden" ); + + // decide if alpha masking or transparency masking is needed + BitmapBuffer* pAlphaBuffer = const_cast(rMaskBitmap).AcquireBuffer( TRUE ); + if( pAlphaBuffer != NULL ) + { + int nMaskFormat = pAlphaBuffer->mnFormat; + const_cast(rMaskBitmap).ReleaseBuffer( pAlphaBuffer, TRUE ); + if( nMaskFormat == BMP_FORMAT_8BIT_PAL ) + drawAlphaBitmap( *pPosAry, rSrcBitmap, rMaskBitmap ); + } + + drawMaskedBitmap( pPosAry, rSrcBitmap, rMaskBitmap ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +void X11SalGraphics::drawMaskedBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + const SalBitmap& rTransBitmap ) +{ + const SalDisplay* pSalDisp = GetDisplay(); + Display* pXDisp = pSalDisp->GetDisplay(); + Drawable aDrawable( GetDrawable() ); + + // figure work mode depth. If this is a VDev Drawable, use its + // bitdepth to create pixmaps for, otherwise, XCopyArea will + // refuse to work. + const USHORT nDepth( m_pVDev ? + m_pVDev->GetDepth() : + pSalDisp->GetVisual( m_nScreen ).GetDepth() ); + Pixmap aFG( XCreatePixmap( pXDisp, aDrawable, pPosAry->mnDestWidth, + pPosAry->mnDestHeight, nDepth ) ); + Pixmap aBG( XCreatePixmap( pXDisp, aDrawable, pPosAry->mnDestWidth, + pPosAry->mnDestHeight, nDepth ) ); + + if( aFG && aBG ) + { + GC aTmpGC; + XGCValues aValues; + const SalColormap& rColMap = pSalDisp->GetColormap( m_nScreen ); + const int nBlack = rColMap.GetBlackPixel(), nWhite = rColMap.GetWhitePixel(); + const int nValues = GCFunction | GCForeground | GCBackground; + SalTwoRect aTmpRect( *pPosAry ); aTmpRect.mnDestX = aTmpRect.mnDestY = 0; + + // draw paint bitmap in pixmap #1 + aValues.function = GXcopy, aValues.foreground = nWhite, aValues.background = nBlack; + aTmpGC = XCreateGC( pXDisp, aFG, nValues, &aValues ); + static_cast(rSalBitmap).ImplDraw( aFG, m_nScreen, nDepth, aTmpRect, aTmpGC ); + DBG_TESTTRANS( aFG ); + + // draw background in pixmap #2 + XCopyArea( pXDisp, aDrawable, aBG, aTmpGC, + pPosAry->mnDestX, pPosAry->mnDestY, + pPosAry->mnDestWidth, pPosAry->mnDestHeight, + 0, 0 ); + + DBG_TESTTRANS( aBG ); + + // mask out paint bitmap in pixmap #1 (transparent areas 0) + aValues.function = GXand, aValues.foreground = 0x00000000, aValues.background = 0xffffffff; + XChangeGC( pXDisp, aTmpGC, nValues, &aValues ); + static_cast(rTransBitmap).ImplDraw( aFG, m_nScreen, 1, aTmpRect, aTmpGC ); + + DBG_TESTTRANS( aFG ); + + // #105055# For XOR mode, keep background behind bitmap intact + if( !bXORMode_ ) + { + // mask out background in pixmap #2 (nontransparent areas 0) + aValues.function = GXand, aValues.foreground = 0xffffffff, aValues.background = 0x00000000; + XChangeGC( pXDisp, aTmpGC, nValues, &aValues ); + static_cast(rTransBitmap).ImplDraw( aBG, m_nScreen, 1, aTmpRect, aTmpGC ); + + DBG_TESTTRANS( aBG ); + } + + // merge pixmap #1 and pixmap #2 in pixmap #2 + aValues.function = GXxor, aValues.foreground = 0xffffffff, aValues.background = 0x00000000; + XChangeGC( pXDisp, aTmpGC, nValues, &aValues ); + XCopyArea( pXDisp, aFG, aBG, aTmpGC, + 0, 0, + pPosAry->mnDestWidth, pPosAry->mnDestHeight, + 0, 0 ); + DBG_TESTTRANS( aBG ); + + // #105055# Disable XOR temporarily + BOOL bOldXORMode( bXORMode_ ); + bXORMode_ = FALSE; + + // copy pixmap #2 (result) to background + XCopyArea( pXDisp, aBG, aDrawable, GetCopyGC(), + 0, 0, + pPosAry->mnDestWidth, pPosAry->mnDestHeight, + pPosAry->mnDestX, pPosAry->mnDestY ); + + DBG_TESTTRANS( aBG ); + + bXORMode_ = bOldXORMode; + + XFreeGC( pXDisp, aTmpGC ); + XFlush( pXDisp ); + } + else + drawBitmap( pPosAry, rSalBitmap ); + + if( aFG ) + XFreePixmap( pXDisp, aFG ); + + if( aBG ) + XFreePixmap( pXDisp, aBG ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +bool X11SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR, + const SalBitmap& rSrcBitmap, const SalBitmap& rAlphaBmp ) +{ + // non 8-bit alpha not implemented yet + if( rAlphaBmp.GetBitCount() != 8 ) + return false; + + // horizontal mirroring not implemented yet + if( rTR.mnDestWidth < 0 ) + return false; + + // stretched conversion is not implemented yet + if( rTR.mnDestWidth != rTR.mnSrcWidth ) + return false; + if( rTR.mnDestHeight!= rTR.mnSrcHeight ) + return false; + + XRenderPeer& rPeer = XRenderPeer::GetInstance(); + if( rPeer.GetVersion() < 0x02 ) + return false; + + // create destination picture + Picture aDstPic = GetXRenderPicture(); + if( !aDstPic ) + return false; + + const SalDisplay* pSalDisp = GetDisplay(); + const SalVisual& rSalVis = pSalDisp->GetVisual( m_nScreen ); + Display* pXDisplay = pSalDisp->GetDisplay(); + + // create source Picture + int nDepth = m_pVDev ? m_pVDev->GetDepth() : rSalVis.GetDepth(); + const X11SalBitmap& rSrcX11Bmp = static_cast( rSrcBitmap ); + ImplSalDDB* pSrcDDB = rSrcX11Bmp.ImplGetDDB( hDrawable_, m_nScreen, nDepth, rTR ); + if( !pSrcDDB ) + return false; + + //#i75249# workaround for ImplGetDDB() giving us back a different depth than + // we requested. E.g. mask pixmaps are always compatible with the drawable + // TODO: find an appropriate picture format for these cases + // then remove the workaround below and the one for #i75531# + if( nDepth != pSrcDDB->ImplGetDepth() ) + return false; + + Pixmap aSrcPM = pSrcDDB->ImplGetPixmap(); + if( !aSrcPM ) + return false; + + // create source picture + // TODO: use scoped picture + Visual* pSrcXVisual = rSalVis.GetVisual(); + XRenderPictFormat* pSrcVisFmt = rPeer.FindVisualFormat( pSrcXVisual ); + if( !pSrcVisFmt ) + return false; + Picture aSrcPic = rPeer.CreatePicture( aSrcPM, pSrcVisFmt, 0, NULL ); + if( !aSrcPic ) + return false; + + // create alpha Picture + + // TODO: use SalX11Bitmap functionality and caching for the Alpha Pixmap + // problem is that they don't provide an 8bit Pixmap on a non-8bit display + BitmapBuffer* pAlphaBuffer = const_cast(rAlphaBmp).AcquireBuffer( TRUE ); + + // an XImage needs its data top_down + // TODO: avoid wrongly oriented images in upper layers! + const int nImageSize = pAlphaBuffer->mnHeight * pAlphaBuffer->mnScanlineSize; + const char* pSrcBits = (char*)pAlphaBuffer->mpBits; + char* pAlphaBits = new char[ nImageSize ]; + if( BMP_SCANLINE_ADJUSTMENT( pAlphaBuffer->mnFormat ) == BMP_FORMAT_TOP_DOWN ) + memcpy( pAlphaBits, pSrcBits, nImageSize ); + else + { + char* pDstBits = pAlphaBits + nImageSize; + const int nLineSize = pAlphaBuffer->mnScanlineSize; + for(; (pDstBits -= nLineSize) >= pAlphaBits; pSrcBits += nLineSize ) + memcpy( pDstBits, pSrcBits, nLineSize ); + } + + // the alpha values need to be inverted for XRender + // TODO: make upper layers use standard alpha + long* pLDst = (long*)pAlphaBits; + for( int i = nImageSize/sizeof(long); --i >= 0; ++pLDst ) + *pLDst = ~*pLDst; + + char* pCDst = (char*)pLDst; + for( int i = nImageSize & (sizeof(long)-1); --i >= 0; ++pCDst ) + *pCDst = ~*pCDst; + + const XRenderPictFormat* pAlphaFormat = rPeer.GetStandardFormatA8(); + XImage* pAlphaImg = XCreateImage( pXDisplay, pSrcXVisual, 8, ZPixmap, 0, + pAlphaBits, pAlphaBuffer->mnWidth, pAlphaBuffer->mnHeight, + pAlphaFormat->depth, pAlphaBuffer->mnScanlineSize ); + + Pixmap aAlphaPM = XCreatePixmap( pXDisplay, hDrawable_, + rTR.mnDestWidth, rTR.mnDestHeight, 8 ); + + XGCValues aAlphaGCV; + aAlphaGCV.function = GXcopy; + GC aAlphaGC = XCreateGC( pXDisplay, aAlphaPM, GCFunction, &aAlphaGCV ); + XPutImage( pXDisplay, aAlphaPM, aAlphaGC, pAlphaImg, + rTR.mnSrcX, rTR.mnSrcY, 0, 0, rTR.mnDestWidth, rTR.mnDestHeight ); + XFreeGC( pXDisplay, aAlphaGC ); + XFree( pAlphaImg ); + if( pAlphaBits != (char*)pAlphaBuffer->mpBits ) + delete[] pAlphaBits; + + const_cast(rAlphaBmp).ReleaseBuffer( pAlphaBuffer, TRUE ); + + XRenderPictureAttributes aAttr; + aAttr.repeat = true; + Picture aAlphaPic = rPeer.CreatePicture( aAlphaPM, pAlphaFormat, CPRepeat, &aAttr ); + if( !aAlphaPic ) + return false; + + // set clipping + if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) ) + rPeer.SetPictureClipRegion( aDstPic, pClipRegion_ ); + + // paint source * mask over destination picture + rPeer.CompositePicture( PictOpOver, aSrcPic, aAlphaPic, aDstPic, + rTR.mnSrcX, rTR.mnSrcY, 0, 0, + rTR.mnDestX, rTR.mnDestY, rTR.mnDestWidth, rTR.mnDestHeight ); + + // TODO: used ScopedPic + rPeer.FreePicture( aAlphaPic ); + XFreePixmap(pXDisplay, aAlphaPM); + rPeer.FreePicture( aSrcPic ); + return true; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +bool X11SalGraphics::drawAlphaRect( long nX, long nY, long nWidth, + long nHeight, sal_uInt8 nTransparency ) +{ + if( ! m_pFrame && ! m_pVDev ) + return false; + + if( bPenGC_ || !bBrushGC_ || bXORMode_ ) + return false; // can only perform solid fills without XOR. + + if( m_pVDev && m_pVDev->GetDepth() < 8 ) + return false; + + XRenderPeer& rPeer = XRenderPeer::GetInstance(); + if( rPeer.GetVersion() < 0x02 ) // TODO: replace with better test + return false; + + Picture aDstPic = GetXRenderPicture(); + if( !aDstPic ) + return false; + + const double fTransparency = (100 - nTransparency) * (1.0/100); + const XRenderColor aRenderColor = GetXRenderColor( nBrushColor_ , fTransparency); + + rPeer.FillRectangle( PictOpOver, + aDstPic, + &aRenderColor, + nX, nY, + nWidth, nHeight ); + + return true; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::drawBitmap( const SalTwoRect*, + const SalBitmap&, + SalColor ) +{ + DBG_ERROR( "::DrawBitmap with transparent color not supported" ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::drawMask( const SalTwoRect* pPosAry, + const SalBitmap &rSalBitmap, + SalColor nMaskColor ) +{ + const SalDisplay* pSalDisp = GetDisplay(); + Display* pXDisp = pSalDisp->GetDisplay(); + Drawable aDrawable( GetDrawable() ); + Pixmap aStipple( XCreatePixmap( pXDisp, aDrawable, + pPosAry->mnDestWidth, + pPosAry->mnDestHeight, 1 ) ); + + if( aStipple ) + { + SalTwoRect aTwoRect( *pPosAry ); aTwoRect.mnDestX = aTwoRect.mnDestY = 0; + GC aTmpGC; + XGCValues aValues; + + // create a stipple bitmap first (set bits are changed to unset bits and vice versa) + aValues.function = GXcopyInverted; + aValues.foreground = 1, aValues.background = 0; + aTmpGC = XCreateGC( pXDisp, aStipple, GCFunction | GCForeground | GCBackground, &aValues ); + static_cast(rSalBitmap).ImplDraw( aStipple, m_nScreen, 1, aTwoRect, aTmpGC ); + + XFreeGC( pXDisp, aTmpGC ); + + // Set stipple and draw rectangle + GC aStippleGC( GetStippleGC() ); + int nX = pPosAry->mnDestX, nY = pPosAry->mnDestY; + + XSetStipple( pXDisp, aStippleGC, aStipple ); + XSetTSOrigin( pXDisp, aStippleGC, nX, nY ); + XSetForeground( pXDisp, aStippleGC, GetPixel( nMaskColor ) ); + XFillRectangle( pXDisp, aDrawable, aStippleGC, + nX, nY, + pPosAry->mnDestWidth, pPosAry->mnDestHeight ); + XFreePixmap( pXDisp, aStipple ); + XFlush( pXDisp ); + } + else + drawBitmap( pPosAry, rSalBitmap ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +SalBitmap *X11SalGraphics::getBitmap( long nX, long nY, long nDX, long nDY ) +{ + if( bPrinter_ && !bVirDev_ ) + return NULL; + + bool bFakeWindowBG = false; + + // normalize + if( nDX < 0 ) + { + nX += nDX; + nDX = -nDX; + } + if ( nDY < 0 ) + { + nY += nDY; + nDY = -nDY; + } + + if( bWindow_ && !bVirDev_ ) + { + XWindowAttributes aAttrib; + + XGetWindowAttributes( GetXDisplay(), GetDrawable(), &aAttrib ); + if( aAttrib.map_state != IsViewable ) + bFakeWindowBG = true; + else + { + long nOrgDX = nDX, nOrgDY = nDY; + + // clip to window size + if ( nX < 0 ) + { + nDX += nX; + nX = 0; + } + if ( nY < 0 ) + { + nDY += nY; + nY = 0; + } + if( nX + nDX > aAttrib.width ) + nDX = aAttrib.width - nX; + if( nY + nDY > aAttrib.height ) + nDY = aAttrib.height - nY; + + // inside ? + if( nDX <= 0 || nDY <= 0 ) + { + bFakeWindowBG = true; + nDX = nOrgDX; + nDY = nOrgDY; + } + } + } + + X11SalBitmap* pSalBitmap = new X11SalBitmap; + USHORT nBitCount = GetBitCount(); + + if( &GetDisplay()->GetColormap( m_nScreen ) != &GetColormap() ) + nBitCount = 1; + + if( ! bFakeWindowBG ) + pSalBitmap->ImplCreateFromDrawable( GetDrawable(), m_nScreen, nBitCount, nX, nY, nDX, nDY ); + else + pSalBitmap->Create( Size( nDX, nDY ), (nBitCount > 8) ? 24 : nBitCount, BitmapPalette( nBitCount > 8 ? nBitCount : 0 ) ); + + return pSalBitmap; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +SalColor X11SalGraphics::getPixel( long nX, long nY ) +{ + if( bWindow_ && !bVirDev_ ) + { + XWindowAttributes aAttrib; + + XGetWindowAttributes( GetXDisplay(), GetDrawable(), &aAttrib ); + if( aAttrib.map_state != IsViewable ) + { + stderr0( "X11SalGraphics::GetPixel drawable not viewable\n" ); + return 0; + } + } + + XImage *pXImage = XGetImage( GetXDisplay(), + GetDrawable(), + nX, nY, + 1, 1, + AllPlanes, + ZPixmap ); + if( !pXImage ) + { + stderr0( "X11SalGraphics::GetPixel !XGetImage()\n" ); + return 0; + } + + XColor aXColor; + + aXColor.pixel = XGetPixel( pXImage, 0, 0 ); + XDestroyImage( pXImage ); + + return GetColormap().GetColor( aXColor.pixel ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::invert( long nX, + long nY, + long nDX, + long nDY, + SalInvert nFlags ) +{ + GC pGC; + if( SAL_INVERT_50 & nFlags ) + { + pGC = GetInvert50GC(); + XFillRectangle( GetXDisplay(), GetDrawable(), pGC, nX, nY, nDX, nDY ); + } + else + { + if ( SAL_INVERT_TRACKFRAME & nFlags ) + { + pGC = GetTrackingGC(); + XDrawRectangle( GetXDisplay(), GetDrawable(), pGC, nX, nY, nDX, nDY ); + } + else + { + pGC = GetInvertGC(); + XFillRectangle( GetXDisplay(), GetDrawable(), pGC, nX, nY, nDX, nDY ); + } + } +} + +bool X11SalGraphics::supportsOperation( OutDevSupportType eType ) const +{ + bool bRet = false; + switch( eType ) + { + case OutDevSupport_TransparentRect: + case OutDevSupport_B2DDraw: + { + XRenderPeer& rPeer = XRenderPeer::GetInstance(); + if( rPeer.GetVersion() >= 0x02 ) + { + const SalDisplay* pSalDisp = GetDisplay(); + const SalVisual& rSalVis = pSalDisp->GetVisual( m_nScreen ); + + Visual* pDstXVisual = rSalVis.GetVisual(); + XRenderPictFormat* pDstVisFmt = rPeer.FindVisualFormat( pDstXVisual ); + if( pDstVisFmt ) + bRet = true; + } + } + break; + default: break; + } + return bRet; +} + diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx new file mode 100644 index 000000000000..1e9acf96f9f8 --- /dev/null +++ b/vcl/unx/generic/gdi/salgdi3.cxx @@ -0,0 +1,1690 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "sal/alloca.h" +#include "sal/types.h" + +#include "rtl/tencinfo.h" + +#include "osl/file.hxx" + +#include "tools/string.hxx" +#include "tools/debug.hxx" +#include "tools/stream.hxx" + +#include "basegfx/polygon/b2dpolypolygon.hxx" + +#include "i18npool/mslangid.hxx" + +#include +#include "printergfx.hxx" +#include "vcl/fontmanager.hxx" +#include "vcl/jobdata.hxx" +#include "vcl/printerinfomanager.hxx" +#include "vcl/svapp.hxx" + +#include "unx/salunx.h" +#include "unx/saldata.hxx" +#include "unx/saldisp.hxx" +#include "unx/salgdi.h" +#include "unx/pspgraphics.h" +#include "unx/salvd.h" + +#include "salcvt.hxx" +#include "gcach_xpeer.hxx" +#include "xrender_peer.hxx" +#include "impfont.hxx" +#include "salframe.hxx" +#include "outdev.h" + + +#include + +#ifdef ENABLE_GRAPHITE +#include +#include +#endif + +struct cairo_surface_t; +struct cairo_t; +struct cairo_font_face_t; +typedef void* FT_Face; +struct cairo_matrix_t { + double xx; double yx; + double xy; double yy; + double x0; double y0; +}; +struct cairo_glyph_t +{ + unsigned long index; + double x; + double y; +}; +struct BOX +{ + short x1, x2, y1, y2; +}; +struct _XRegion +{ + long size; + long numRects; + BOX *rects; + BOX extents; +}; +using namespace rtl; + +// =========================================================================== + +// PspKernInfo allows on-demand-querying of psprint provided kerning info (#i29881#) +class PspKernInfo : public ExtraKernInfo +{ +public: + PspKernInfo( int nFontId ) : ExtraKernInfo(nFontId) {} +protected: + virtual void Initialize() const; +}; + +//-------------------------------------------------------------------------- + +void PspKernInfo::Initialize() const +{ + mbInitialized = true; + + // get the kerning pairs from psprint + const psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); + typedef std::list< psp::KernPair > PspKernPairs; + const PspKernPairs& rKernPairs = rMgr.getKernPairs( mnFontId ); + if( rKernPairs.empty() ) + return; + + // feed psprint's kerning list into a lookup-friendly container + maUnicodeKernPairs.resize( rKernPairs.size() ); + PspKernPairs::const_iterator it = rKernPairs.begin(); + for(; it != rKernPairs.end(); ++it ) + { + ImplKernPairData aKernPair = { it->first, it->second, it->kern_x }; + maUnicodeKernPairs.insert( aKernPair ); + } +} + +// ---------------------------------------------------------------------------- +// +// X11SalGraphics +// +// ---------------------------------------------------------------------------- + +GC +X11SalGraphics::GetFontGC() +{ + Display *pDisplay = GetXDisplay(); + + if( !pFontGC_ ) + { + XGCValues values; + values.subwindow_mode = ClipByChildren; + values.fill_rule = EvenOddRule; // Pict import/ Gradient + values.graphics_exposures = False; + values.foreground = nTextPixel_; + pFontGC_ = XCreateGC( pDisplay, hDrawable_, + GCSubwindowMode | GCFillRule + | GCGraphicsExposures | GCForeground, + &values ); + } + if( !bFontGC_ ) + { + XSetForeground( pDisplay, pFontGC_, nTextPixel_ ); + SetClipRegion( pFontGC_ ); + bFontGC_ = TRUE; + } + + return pFontGC_; +} + +//-------------------------------------------------------------------------- + +bool X11SalGraphics::setFont( const ImplFontSelectData *pEntry, int nFallbackLevel ) +{ +#ifdef HDU_DEBUG + ByteString aReqName( "NULL" ); + if( pEntry ) + aReqName = ByteString( pEntry->maName, RTL_TEXTENCODING_UTF8 ); + ByteString aUseName( "NULL" ); + if( pEntry && pEntry->mpFontData ) + aUseName = ByteString( pEntry->mpFontData->GetFamilyName(), RTL_TEXTENCODING_UTF8 ); + fprintf( stderr, "SetFont(lvl=%d,\"%s\", %d*%d, naa=%d,b=%d,i=%d) => \"%s\"\n", + nFallbackLevel, aReqName.GetBuffer(), + !pEntry?-1:pEntry->mnWidth, !pEntry?-1:pEntry->mnHeight, + !pEntry?-1:pEntry->mbNonAntialiased, + !pEntry?-1:pEntry->meWeight, !pEntry?-1:pEntry->meItalic, + aUseName.GetBuffer() ); +#endif + + // release all no longer needed font resources + for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i ) + { + if( mpServerFont[i] != NULL ) + { + // old server side font is no longer referenced + GlyphCache::GetInstance().UncacheFont( *mpServerFont[i] ); + mpServerFont[i] = NULL; + } + } + + // return early if there is no new font + if( !pEntry ) + return false; + + bFontVertical_ = pEntry->mbVertical; + + // return early if this is not a valid font for this graphics + if( !pEntry->mpFontData ) + return false; + + // handle the request for a non-native X11-font => use the GlyphCache + ServerFont* pServerFont = GlyphCache::GetInstance().CacheFont( *pEntry ); + if( pServerFont != NULL ) + { + // ignore fonts with e.g. corrupted font files + if( !pServerFont->TestFont() ) + { + GlyphCache::GetInstance().UncacheFont( *pServerFont ); + return false; + } + + // register to use the font + mpServerFont[ nFallbackLevel ] = pServerFont; + + // apply font specific-hint settings if needed + // TODO: also disable it for reference devices + if( !bPrinter_ ) + { + ImplServerFontEntry* pSFE = static_cast( pEntry->mpFontEntry ); + pSFE->HandleFontOptions(); + } + + return true; + } + + return false; +} + +void ImplServerFontEntry::HandleFontOptions( void ) +{ + bool GetFCFontOptions( const ImplFontAttributes&, int nSize, ImplFontOptions& ); + + if( !mpServerFont ) + return; + if( !mbGotFontOptions ) + { + // get and cache the font options + mbGotFontOptions = true; + mbValidFontOptions = GetFCFontOptions( *maFontSelData.mpFontData, + maFontSelData.mnHeight, maFontOptions ); + } + // apply the font options + if( mbValidFontOptions ) + mpServerFont->SetFontOptions( maFontOptions ); +} + +//-------------------------------------------------------------------------- + +namespace { + +class CairoWrapper +{ +private: + oslModule mpCairoLib; + + cairo_surface_t* (*mp_xlib_surface_create_with_xrender_format)(Display *, Drawable , Screen *, XRenderPictFormat *, int , int ); + void (*mp_surface_destroy)(cairo_surface_t *); + cairo_t* (*mp_create)(cairo_surface_t *); + void (*mp_destroy)(cairo_t*); + void (*mp_clip)(cairo_t*); + void (*mp_rectangle)(cairo_t*, double, double, double, double); + cairo_font_face_t * (*mp_ft_font_face_create_for_ft_face)(FT_Face, int); + void (*mp_set_font_face)(cairo_t *, cairo_font_face_t *); + void (*mp_font_face_destroy)(cairo_font_face_t *); + void (*mp_matrix_init_identity)(cairo_matrix_t *); + void (*mp_matrix_scale)(cairo_matrix_t *, double, double); + void (*mp_matrix_rotate)(cairo_matrix_t *, double); + void (*mp_set_font_matrix)(cairo_t *, const cairo_matrix_t *); + void (*mp_show_glyphs)(cairo_t *, const cairo_glyph_t *, int ); + void (*mp_set_source_rgb)(cairo_t *, double , double , double ); + void (*mp_set_font_options)(cairo_t *, const void *); + void (*mp_ft_font_options_substitute)(const void*, void*); + + bool canEmbolden() const { return false; } + + CairoWrapper(); +public: + static CairoWrapper& get(); + bool isValid() const { return (mpCairoLib != NULL); } + bool isCairoRenderable(const ServerFont& rFont); + + cairo_surface_t* xlib_surface_create_with_xrender_format(Display *pDisplay, Drawable drawable, Screen *pScreen, XRenderPictFormat *pFormat, int width, int height) + { return (*mp_xlib_surface_create_with_xrender_format)(pDisplay, drawable, pScreen, pFormat, width, height); } + void surface_destroy(cairo_surface_t *surface) { (*mp_surface_destroy)(surface); } + cairo_t* create(cairo_surface_t *surface) { return (*mp_create)(surface); } + void destroy(cairo_t *cr) { (*mp_destroy)(cr); } + void clip(cairo_t *cr) { (*mp_clip)(cr); } + void rectangle(cairo_t *cr, double x, double y, double width, double height) + { (*mp_rectangle)(cr, x, y, width, height); } + cairo_font_face_t* ft_font_face_create_for_ft_face(FT_Face face, int load_flags) + { return (*mp_ft_font_face_create_for_ft_face)(face, load_flags); } + void set_font_face(cairo_t *cr, cairo_font_face_t *font_face) + { (*mp_set_font_face)(cr, font_face); } + void font_face_destroy(cairo_font_face_t *font_face) + { (*mp_font_face_destroy)(font_face); } + void matrix_init_identity(cairo_matrix_t *matrix) + { (*mp_matrix_init_identity)(matrix); } + void matrix_scale(cairo_matrix_t *matrix, double sx, double sy) + { (*mp_matrix_scale)(matrix, sx, sy); } + void matrix_rotate(cairo_matrix_t *matrix, double radians) + { (*mp_matrix_rotate)(matrix, radians); } + void set_font_matrix(cairo_t *cr, const cairo_matrix_t *matrix) + { (*mp_set_font_matrix)(cr, matrix); } + void show_glyphs(cairo_t *cr, const cairo_glyph_t *glyphs, int no_glyphs) + { (*mp_show_glyphs)(cr, glyphs, no_glyphs); } + void set_source_rgb(cairo_t *cr, double red, double green, double blue) + { (*mp_set_source_rgb)(cr, red, green, blue); } + void set_font_options(cairo_t *cr, const void *options) + { (*mp_set_font_options)(cr, options); } + void ft_font_options_substitute(const void *options, void *pattern) + { (*mp_ft_font_options_substitute)(options, pattern); } +}; + +static CairoWrapper* pCairoInstance = NULL; + +CairoWrapper& CairoWrapper::get() +{ + if( ! pCairoInstance ) + pCairoInstance = new CairoWrapper(); + return *pCairoInstance; +} + +CairoWrapper::CairoWrapper() +: mpCairoLib( NULL ) +{ + static const char* pDisableCairoText = getenv( "SAL_DISABLE_CAIROTEXT" ); + if( pDisableCairoText && (pDisableCairoText[0] != '0') ) + return; + + int nDummy; + if( !XQueryExtension( GetX11SalData()->GetDisplay()->GetDisplay(), "RENDER", &nDummy, &nDummy, &nDummy ) ) + return; + +#ifdef MACOSX + OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libcairo.2.dylib" )); +#else + OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libcairo.so.2" )); +#endif + mpCairoLib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_DEFAULT ); + if( !mpCairoLib ) + return; + +#ifdef DEBUG + // check cairo version + int (*p_version)(); + p_version = (int(*)()) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_version" ); + const int nVersion = p_version ? (*p_version)() : 0; + fprintf( stderr, "CAIRO version=%d\n", nVersion ); +#endif + + mp_xlib_surface_create_with_xrender_format = (cairo_surface_t* (*)(Display *, Drawable , Screen *, XRenderPictFormat *, int , int )) + osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_xlib_surface_create_with_xrender_format" ); + mp_surface_destroy = (void(*)(cairo_surface_t*)) + osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_surface_destroy" ); + mp_create = (cairo_t*(*)(cairo_surface_t*)) + osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_create" ); + mp_destroy = (void(*)(cairo_t*)) + osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_destroy" ); + mp_clip = (void(*)(cairo_t*)) + osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_clip" ); + mp_rectangle = (void(*)(cairo_t*, double, double, double, double)) + osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_rectangle" ); + mp_ft_font_face_create_for_ft_face = (cairo_font_face_t * (*)(FT_Face, int)) + osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_ft_font_face_create_for_ft_face" ); + mp_set_font_face = (void (*)(cairo_t *, cairo_font_face_t *)) + osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_set_font_face" ); + mp_font_face_destroy = (void (*)(cairo_font_face_t *)) + osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_font_face_destroy" ); + mp_matrix_init_identity = (void (*)(cairo_matrix_t *)) + osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_matrix_init_identity" ); + mp_matrix_scale = (void (*)(cairo_matrix_t *, double, double)) + osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_matrix_scale" ); + mp_matrix_rotate = (void (*)(cairo_matrix_t *, double)) + osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_matrix_rotate" ); + mp_set_font_matrix = (void (*)(cairo_t *, const cairo_matrix_t *)) + osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_set_font_matrix" ); + mp_show_glyphs = (void (*)(cairo_t *, const cairo_glyph_t *, int )) + osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_show_glyphs" ); + mp_set_source_rgb = (void (*)(cairo_t *, double , double , double )) + osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_set_source_rgb" ); + mp_set_font_options = (void (*)(cairo_t *, const void *options )) + osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_set_font_options" ); + mp_ft_font_options_substitute = (void (*)(const void *, void *)) + osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_ft_font_options_substitute" ); + + if( !( + mp_xlib_surface_create_with_xrender_format && + mp_surface_destroy && + mp_create && + mp_destroy && + mp_clip && + mp_rectangle && + mp_ft_font_face_create_for_ft_face && + mp_set_font_face && + mp_font_face_destroy && + mp_matrix_init_identity && + mp_matrix_scale && + mp_matrix_rotate && + mp_set_font_matrix && + mp_show_glyphs && + mp_set_source_rgb && + mp_set_font_options && + mp_ft_font_options_substitute + ) ) + { + osl_unloadModule( mpCairoLib ); + mpCairoLib = NULL; +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "not all needed symbols were found\n" ); +#endif + } +} + +bool CairoWrapper::isCairoRenderable(const ServerFont& rFont) +{ + return rFont.GetFtFace() && isValid() && rFont.GetAntialiasAdvice() && + (rFont.NeedsArtificialBold() ? canEmbolden() : true); +} + +} //namespace + +CairoFontsCache::LRUFonts CairoFontsCache::maLRUFonts; +int CairoFontsCache::mnRefCount = 0; + +CairoFontsCache::CairoFontsCache() +{ + ++mnRefCount; +} + +CairoFontsCache::~CairoFontsCache() +{ + --mnRefCount; + if (!mnRefCount && !maLRUFonts.empty()) + { + CairoWrapper &rCairo = CairoWrapper::get(); + LRUFonts::iterator aEnd = maLRUFonts.end(); + for (LRUFonts::iterator aI = maLRUFonts.begin(); aI != aEnd; ++aI) + rCairo.font_face_destroy((cairo_font_face_t*)aI->first); + } +} + +void CairoFontsCache::CacheFont(void *pFont, void* pId) +{ + maLRUFonts.push_front( std::pair(pFont, pId) ); + if (maLRUFonts.size() > 8) + { + CairoWrapper &rCairo = CairoWrapper::get(); + rCairo.font_face_destroy((cairo_font_face_t*)maLRUFonts.back().first); + maLRUFonts.pop_back(); + } +} + +void* CairoFontsCache::FindCachedFont(void *pId) +{ + LRUFonts::iterator aEnd = maLRUFonts.end(); + for (LRUFonts::iterator aI = maLRUFonts.begin(); aI != aEnd; ++aI) + if (aI->second == pId) + return aI->first; + return NULL; +} + +void X11SalGraphics::DrawCairoAAFontString( const ServerFontLayout& rLayout ) +{ + std::vector cairo_glyphs; + cairo_glyphs.reserve( 256 ); + + Point aPos; + sal_GlyphId aGlyphId; + for( int nStart = 0; rLayout.GetNextGlyphs( 1, &aGlyphId, aPos, nStart ); ) + { + cairo_glyph_t aGlyph; + aGlyph.index = aGlyphId & GF_IDXMASK; + aGlyph.x = aPos.X(); + aGlyph.y = aPos.Y(); + cairo_glyphs.push_back(aGlyph); + } + + if (cairo_glyphs.empty()) + return; + + // find a XRenderPictFormat compatible with the Drawable + XRenderPictFormat* pVisualFormat = static_cast(GetXRenderFormat()); + if( !pVisualFormat ) + { + Visual* pVisual = GetDisplay()->GetVisual( m_nScreen ).GetVisual(); + pVisualFormat = XRenderPeer::GetInstance().FindVisualFormat( pVisual ); + // cache the XRenderPictFormat + SetXRenderFormat( static_cast(pVisualFormat) ); + } + + DBG_ASSERT( pVisualFormat!=NULL, "no matching XRenderPictFormat for text" ); + if( !pVisualFormat ) + return; + + CairoWrapper &rCairo = CairoWrapper::get(); + + Display* pDisplay = GetXDisplay(); + + cairo_surface_t *surface = rCairo.xlib_surface_create_with_xrender_format (pDisplay, + hDrawable_, ScreenOfDisplay(pDisplay, m_nScreen), pVisualFormat, SAL_MAX_INT16, SAL_MAX_INT16); + + /* + * It might be ideal to cache surface and cairo context between calls and + * only destroy it when the drawable changes, but to do that we need to at + * least change the SalFrame etc impls to dtor the SalGraphics *before* the + * destruction of the windows they reference + */ + cairo_t *cr = rCairo.create(surface); + rCairo.surface_destroy(surface); + + if (const void *pOptions = Application::GetSettings().GetStyleSettings().GetCairoFontOptions()) + rCairo.set_font_options( cr, pOptions); + + if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) ) + { + for (long i = 0; i < pClipRegion_->numRects; ++i) + { + rCairo.rectangle(cr, + pClipRegion_->rects[i].x1, + pClipRegion_->rects[i].y1, + pClipRegion_->rects[i].x2 - pClipRegion_->rects[i].x1, + pClipRegion_->rects[i].y2 - pClipRegion_->rects[i].y1); + } + rCairo.clip(cr); + } + + rCairo.set_source_rgb(cr, + SALCOLOR_RED(nTextColor_)/255.0, + SALCOLOR_GREEN(nTextColor_)/255.0, + SALCOLOR_BLUE(nTextColor_)/255.0); + + ServerFont& rFont = rLayout.GetServerFont(); + + cairo_font_face_t* font_face = NULL; + + void *pId = rFont.GetFtFace(); + font_face = (cairo_font_face_t*)m_aCairoFontsCache.FindCachedFont(pId); + if (!font_face) + { + font_face = rCairo.ft_font_face_create_for_ft_face(pId, rFont.GetLoadFlags()); + m_aCairoFontsCache.CacheFont(font_face, pId); + } + + rCairo.set_font_face(cr, font_face); + + cairo_matrix_t m; + const ImplFontSelectData& rFSD = rFont.GetFontSelData(); + int nWidth = rFSD.mnWidth ? rFSD.mnWidth : rFSD.mnHeight; + + rCairo.matrix_init_identity(&m); + + if (rLayout.GetOrientation()) + rCairo.matrix_rotate(&m, (3600 - rLayout.GetOrientation()) * M_PI / 1800.0); + + rCairo.matrix_scale(&m, nWidth, rFSD.mnHeight); + if (rFont.NeedsArtificialItalic()) + m.xy = -m.xx * 0x6000L / 0x10000L; + + rCairo.set_font_matrix(cr, &m); + rCairo.show_glyphs(cr, &cairo_glyphs[0], cairo_glyphs.size()); + rCairo.destroy(cr); +} + +//-------------------------------------------------------------------------- + +void X11SalGraphics::DrawServerAAFontString( const ServerFontLayout& rLayout ) +{ + // get xrender target for this drawable + Picture aDstPic = GetXRenderPicture(); + if( !aDstPic ) + return; + + // get a XRenderPicture for the font foreground + // TODO: move into own method + XRenderPeer& rRenderPeer = XRenderPeer::GetInstance(); + XRenderPictFormat* pVisualFormat = (XRenderPictFormat*)GetXRenderFormat(); + DBG_ASSERT( pVisualFormat, "we already have a render picture, but XRenderPictFormat==NULL???"); + const int nVisualDepth = pVisualFormat->depth; + SalDisplay::RenderEntry& rEntry = GetDisplay()->GetRenderEntries( m_nScreen )[ nVisualDepth ]; + if( !rEntry.m_aPicture ) + { + // create and cache XRenderPicture for the font foreground + Display* pDisplay = GetXDisplay(); +#ifdef DEBUG + int iDummy; + unsigned uDummy; + XLIB_Window wDummy; + unsigned int nDrawDepth; + ::XGetGeometry( pDisplay, hDrawable_, &wDummy, &iDummy, &iDummy, + &uDummy, &uDummy, &uDummy, &nDrawDepth ); + DBG_ASSERT( static_cast(nVisualDepth) == nDrawDepth, "depth messed up for XRender" ); +#endif + + rEntry.m_aPixmap = ::XCreatePixmap( pDisplay, hDrawable_, 1, 1, nVisualDepth ); + + XRenderPictureAttributes aAttr; + aAttr.repeat = true; + rEntry.m_aPicture = rRenderPeer.CreatePicture ( rEntry.m_aPixmap, pVisualFormat, CPRepeat, &aAttr ); + } + + // set font foreground color and opacity + XRenderColor aRenderColor = GetXRenderColor( nTextColor_ ); + rRenderPeer.FillRectangle( PictOpSrc, rEntry.m_aPicture, &aRenderColor, 0, 0, 1, 1 ); + + // set clipping + // TODO: move into GetXRenderPicture()? + if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) ) + rRenderPeer.SetPictureClipRegion( aDstPic, pClipRegion_ ); + + ServerFont& rFont = rLayout.GetServerFont(); + X11GlyphPeer& rGlyphPeer = X11GlyphCache::GetInstance().GetPeer(); + GlyphSet aGlyphSet = rGlyphPeer.GetGlyphSet( rFont, m_nScreen ); + + Point aPos; + static const int MAXGLYPHS = 160; + sal_GlyphId aGlyphAry[ MAXGLYPHS ]; + int nMaxGlyphs = rLayout.GetOrientation() ? 1 : MAXGLYPHS; + for( int nStart = 0;;) + { + int nGlyphs = rLayout.GetNextGlyphs( nMaxGlyphs, aGlyphAry, aPos, nStart ); + if( !nGlyphs ) + break; + + // #i51924# avoid 32->16bit coordinate truncation problem in X11 + // TODO: reevaluate once displays with >30000 pixels are available + if( aPos.X() >= 30000 || aPos.Y() >= 30000 ) + continue; + + unsigned int aRenderAry[ MAXGLYPHS ]; + for( int i = 0; i < nGlyphs; ++i ) + aRenderAry[ i ] = rGlyphPeer.GetGlyphId( rFont, aGlyphAry[i] ); + rRenderPeer.CompositeString32( rEntry.m_aPicture, aDstPic, + aGlyphSet, aPos.X(), aPos.Y(), aRenderAry, nGlyphs ); + } +} + +//-------------------------------------------------------------------------- + +bool X11SalGraphics::DrawServerAAForcedString( const ServerFontLayout& rLayout ) +{ + ServerFont& rFont = rLayout.GetServerFont(); + + // prepare glyphs and get extent of operation + X11GlyphPeer& rGlyphPeer = X11GlyphCache::GetInstance().GetPeer(); + int nXmin = 0; + int nXmax = 0; + int nYmin = 0; + int nYmax = 0; + int nStart = 0; + Point aPos; + sal_GlyphId nGlyph; + for( bool bFirst=true; rLayout.GetNextGlyphs( 1, &nGlyph, aPos, nStart ); ) + { + const RawBitmap* const pRawBitmap = rGlyphPeer.GetRawBitmap( rFont, nGlyph ); + if( !pRawBitmap ) + continue; + + const int nX1 = aPos.X() + pRawBitmap->mnXOffset; + const int nY1 = aPos.Y() + pRawBitmap->mnYOffset; + const int nX2 = nX1 + pRawBitmap->mnWidth; + const int nY2 = nY1 + pRawBitmap->mnHeight; + + if( bFirst ) + { + bFirst = false; + nXmin = nX1; + nXmax = nX2; + nYmin = nY1; + nYmax = nY2; + } + else + { + if( nXmin > nX1 ) nXmin = nX1; + if( nXmax < nX2 ) nXmax = nX2; + if( nYmin > nY1 ) nYmin = nY1; + if( nYmax < nY2 ) nYmax = nY2; + } + } + + // get XImage + GetDisplay()->GetXLib()->PushXErrorLevel( true ); + Display* pDisplay = GetXDisplay(); + + XRectangle aXRect; + long nWidth = 1, nHeight = 1; + if( m_pFrame ) + nWidth = m_pFrame->maGeometry.nWidth, nHeight = m_pFrame->maGeometry.nHeight; + else if( m_pVDev ) + nWidth = m_pVDev->GetWidth(), nHeight = m_pVDev->GetHeight(); + + if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) ) + { + // get bounding box + XClipBox( pClipRegion_, &aXRect ); + // clip with window + if( aXRect.x < 0 ) aXRect.x = 0; + + if( aXRect.y < 0 ) aXRect.y = 0; + if( aXRect.width+aXRect.x > nWidth ) aXRect.width = nWidth-aXRect.x; + if( aXRect.height+aXRect.y > nHeight ) aXRect.height = nHeight-aXRect.y; + } + else + { + aXRect.x = 0; + aXRect.y = 0; + aXRect.width = nWidth; + aXRect.height = nHeight; + } + if( m_pFrame ) + { + // clip with screen + int nScreenX = m_pFrame->maGeometry.nX+aXRect.x; + int nScreenY = m_pFrame->maGeometry.nY+aXRect.y; + const Size& rScreenSize = GetDisplay()->getDataForScreen( m_nScreen ).m_aSize; + int nScreenW = rScreenSize.Width(); + int nScreenH = rScreenSize.Height(); + if( nScreenX < 0 ) + aXRect.x -= nScreenX, aXRect.width += nScreenX; + if( nScreenX+aXRect.width > nScreenW ) + aXRect.width = nScreenW-nScreenX; + if( nScreenY < 0 ) + aXRect.y -= nScreenY, aXRect.height += nScreenY; + if( nScreenY+aXRect.height > nScreenH ) + aXRect.height = nScreenH-nScreenY; + } + + + if( nXmin < aXRect.x ) nXmin = aXRect.x; + if( nYmin < aXRect.y ) nYmin = aXRect.y; + if( nXmax >= aXRect.x+aXRect.width ) nXmax = aXRect.x + aXRect.width - 1; + if( nYmax >= aXRect.y+aXRect.height ) nYmax = aXRect.y + aXRect.height - 1; + + if( nXmin > nXmax ) + return false; + if( nYmin > nYmax ) + return false; + + XImage* pImg = XGetImage( pDisplay, hDrawable_, + nXmin, nYmin, + (nXmax-nXmin+1), (nYmax-nYmin+1), + ~0, ZPixmap ); + if( pImg == NULL ) + { + if( m_pFrame ) + { + // the reason we did not get an image could be that the frame + // geometry changed in the meantime; lets get the current geometry + // and clip against the current window size as well as the screen + // with the current frame position + const Size& rScreenSize = GetDisplay()->getDataForScreen(m_nScreen).m_aSize; + int nScreenW = rScreenSize.Width(); + int nScreenH = rScreenSize.Height(); + XLIB_Window aRoot = None; + int x = 0, y = 0; + unsigned int w = 0, h = 0, bw = 0, d; + XGetGeometry( pDisplay, hDrawable_, &aRoot, &x, &y, &w, &h, &bw, &d ); + XTranslateCoordinates( pDisplay, hDrawable_, aRoot, 0, 0, &x, &y, &aRoot ); + if( nXmin + x < 0 ) // clip on left screen edge + nXmin += x-nXmin; + if( nYmin + y < 0 ) // clip on top screen edge + nYmin += y-nYmin; + if( nXmax >= int(w) ) // clip on right window egde + nXmax = w-1; + if( nYmax >= int(h) ) // clip on bottom window edge + nYmax = h-1; + if( nXmax + x >= nScreenW ) // clip on right screen edge + nXmax -= (nXmax + x - nScreenW)+1; + if( nYmax + y >= nScreenH ) // clip on bottom screen edge + nYmax -= (nYmax + y - nScreenH)+1; + if( nXmax >= nXmin && nYmax >= nYmin ) + { + // try again to get the image + pImg = XGetImage( pDisplay, hDrawable_, + nXmin, nYmin, + (nXmax-nXmin+1), (nYmax-nYmin+1), + ~0, ZPixmap ); + } + } + if( pImg == NULL ) + { + GetDisplay()->GetXLib()->PopXErrorLevel(); + return false; + } + } + + // prepare context + GC nGC = GetFontGC(); + XGCValues aGCVal; + XGetGCValues( pDisplay, nGC, GCForeground, &aGCVal ); + + unsigned long nOrigColor = XGetPixel( pImg, 0, 0 ); + XPutPixel( pImg, 0, 0, aGCVal.foreground ); + unsigned char aColor[4]; + aColor[0] = pImg->data[0]; + aColor[1] = pImg->data[1]; + aColor[2] = pImg->data[2]; + aColor[3] = pImg->data[3]; + XPutPixel( pImg, 0, 0, nOrigColor ); + + // work on XImage + const int bpp = pImg->bits_per_pixel >> 3; + for( nStart = 0; rLayout.GetNextGlyphs( 1, &nGlyph, aPos, nStart ); ) + { + const RawBitmap* const pRawBitmap = rGlyphPeer.GetRawBitmap( rFont, nGlyph ); + if( !pRawBitmap ) + continue; + + const int nX1 = aPos.X() + pRawBitmap->mnXOffset; + const int nY1 = aPos.Y() + pRawBitmap->mnYOffset; + + if( (nX1 <= nXmax) && (int(nX1 + pRawBitmap->mnWidth) > nXmin) + && (nY1 <= nYmax) && (int(nY1 + pRawBitmap->mnHeight) > nYmin) ) + { + const unsigned char* p10 = pRawBitmap->mpBits; + unsigned char* p20 = (unsigned char*)pImg->data; // dest left limit + p20 += (nY1 - nYmin) * pImg->bytes_per_line; + unsigned char* p21 = p20 + (nX1 - nXmin + pImg->xoffset) * bpp; + int y = pRawBitmap->mnHeight; + if( y > nYmax - nY1 ) + y = nYmax - nY1 + 1; + while( --y >= 0 ) + { + if( p20 >= (unsigned char*)pImg->data ) + { + unsigned char* const p22 = p20 + pImg->width * bpp; // dest right limit + unsigned char* pDst = p21; + const unsigned char* pSrc = p10; + for( int x = pRawBitmap->mnWidth; (--x >= 0) && (p22 > pDst); ++pSrc ) + { + if( (*pSrc == 0) || (p20 > pDst) ) // keep background + pDst += bpp; + else if( *pSrc == 0xFF ) // paint foreground + { + const unsigned char* pColor = aColor; + for( int z = bpp; --z >= 0; ++pColor, ++pDst ) + *pDst = *pColor; + } + else // blend fg into bg + { + const unsigned char* pColor = aColor; + for( int z = bpp; --z >= 0; ++pColor, ++pDst ) + // theoretically it should be *257) >> 16 + // but the error is <0.4% worst case and we are in + // the innermost loop of very perf-sensitive code + + *pDst += (*pSrc * ((int)*pColor - *pDst)) >> 8; + } + } + } + p10 += pRawBitmap->mnScanlineSize; + p20 += pImg->bytes_per_line; + p21 += pImg->bytes_per_line; + } + } + } + + // put XImage + XPutImage( pDisplay, hDrawable_, nGC, pImg, + 0, 0, nXmin, nYmin, (nXmax - nXmin + 1), (nYmax - nYmin + 1) ); + XDestroyImage( pImg ); + + GetDisplay()->GetXLib()->PopXErrorLevel(); + return true; +} + +//-------------------------------------------------------------------------- + +void X11SalGraphics::DrawServerSimpleFontString( const ServerFontLayout& rSalLayout ) +{ + ServerFont& rFont = rSalLayout.GetServerFont(); + X11GlyphPeer& rGlyphPeer = X11GlyphCache::GetInstance().GetPeer(); + + Display* pDisplay = GetXDisplay(); + GC nGC = GetFontGC(); + + XGCValues aGCVal; + aGCVal.fill_style = FillStippled; + aGCVal.line_width = 0; + GC tmpGC = XCreateGC( pDisplay, hDrawable_, GCFillStyle|GCLineWidth, &aGCVal ); + XCopyGC( pDisplay, nGC, (1<16bit coordinate truncation problem in X11 + // TODO: reevaluate once displays with >30000 pixels are available + if( aPos.X() >= 30000 || aPos.Y() >= 30000 ) + continue; + + Pixmap aStipple = rGlyphPeer.GetPixmap( rFont, nGlyph, m_nScreen ); + const GlyphMetric& rGM = rFont.GetGlyphMetric( nGlyph ); + + if( aStipple != None ) + { + const int nDestX = aPos.X() + rGM.GetOffset().X(); + const int nDestY = aPos.Y() + rGM.GetOffset().Y(); + + aGCVal.stipple = aStipple; + aGCVal.ts_x_origin = nDestX; + aGCVal.ts_y_origin = nDestY; + XChangeGC( pDisplay, tmpGC, GCStipple|GCTileStipXOrigin|GCTileStipYOrigin, &aGCVal ); + + const int nWidth = rGM.GetSize().Width(); + const int nHeight = rGM.GetSize().Height(); + XFillRectangle( pDisplay, hDrawable_, tmpGC, nDestX, nDestY, nWidth, nHeight ); + } + } + + XFreeGC( pDisplay, tmpGC ); +} + +//-------------------------------------------------------------------------- + +void X11SalGraphics::DrawServerFontLayout( const ServerFontLayout& rLayout ) +{ + // draw complex text + ServerFont& rFont = rLayout.GetServerFont(); + const bool bVertical = rFont.GetFontSelData().mbVertical; + + if( !bVertical && CairoWrapper::get().isCairoRenderable(rFont) ) + DrawCairoAAFontString( rLayout ); + else + { + X11GlyphPeer& rGlyphPeer = X11GlyphCache::GetInstance().GetPeer(); + if( rGlyphPeer.GetGlyphSet( rFont, m_nScreen ) ) + DrawServerAAFontString( rLayout ); + else if( !rGlyphPeer.ForcedAntialiasing( rFont, m_nScreen ) ) + DrawServerSimpleFontString( rLayout ); + else + DrawServerAAForcedString( rLayout ); + } +} + +//-------------------------------------------------------------------------- + +const ImplFontCharMap* X11SalGraphics::GetImplFontCharMap() const +{ + if( !mpServerFont[0] ) + return NULL; + + const ImplFontCharMap* pIFCMap = mpServerFont[0]->GetImplFontCharMap(); + return pIFCMap; +} + +// ---------------------------------------------------------------------------- +// +// SalGraphics +// +// ---------------------------------------------------------------------------- + +USHORT X11SalGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel ) +{ + USHORT nRetVal = 0; + if( !setFont( pEntry, nFallbackLevel ) ) + nRetVal |= SAL_SETFONT_BADFONT; + if( bPrinter_ || (mpServerFont[ nFallbackLevel ] != NULL) ) + nRetVal |= SAL_SETFONT_USEDRAWTEXTARRAY; + return nRetVal; +} + +// ---------------------------------------------------------------------------- + +void +X11SalGraphics::SetTextColor( SalColor nSalColor ) +{ + if( nTextColor_ != nSalColor ) + { + nTextColor_ = nSalColor; + nTextPixel_ = GetPixel( nSalColor ); + bFontGC_ = FALSE; + } +} + +// ---------------------------------------------------------------------------- + +bool X11SalGraphics::AddTempDevFont( ImplDevFontList* pFontList, + const String& rFileURL, const String& rFontName ) +{ + // inform PSP font manager + rtl::OUString aUSystemPath; + OSL_VERIFY( !osl::FileBase::getSystemPathFromFileURL( rFileURL, aUSystemPath ) ); + rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); + OString aOFileName( OUStringToOString( aUSystemPath, aEncoding ) ); + psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); + int nFontId = rMgr.addFontFile( aOFileName, 0 ); + if( !nFontId ) + return false; + + // prepare font data + psp::FastPrintFontInfo aInfo; + rMgr.getFontFastInfo( nFontId, aInfo ); + aInfo.m_aFamilyName = rFontName; + + // inform glyph cache of new font + ImplDevFontAttributes aDFA = PspGraphics::Info2DevFontAttributes( aInfo ); + aDFA.mnQuality += 5800; + + int nFaceNum = rMgr.getFontFaceNumber( aInfo.m_nID ); + if( nFaceNum < 0 ) + nFaceNum = 0; + + GlyphCache& rGC = X11GlyphCache::GetInstance(); + const rtl::OString& rFileName = rMgr.getFontFileSysPath( aInfo.m_nID ); + rGC.AddFontFile( rFileName, nFaceNum, aInfo.m_nID, aDFA ); + + // announce new font to device's font list + rGC.AnnounceFonts( pFontList ); + return true; +} + +// ---------------------------------------------------------------------------- + +void RegisterFontSubstitutors( ImplDevFontList* ); + +void X11SalGraphics::GetDevFontList( ImplDevFontList *pList ) +{ + // prepare the GlyphCache using psprint's font infos + X11GlyphCache& rGC = X11GlyphCache::GetInstance(); + + psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); + ::std::list< psp::fontID > aList; + ::std::list< psp::fontID >::iterator it; + psp::FastPrintFontInfo aInfo; + rMgr.getFontList( aList ); + for( it = aList.begin(); it != aList.end(); ++it ) + { + if( !rMgr.getFontFastInfo( *it, aInfo ) ) + continue; + + // the GlyphCache must not bother with builtin fonts because + // it cannot access or use them anyway + if( aInfo.m_eType == psp::fonttype::Builtin ) + continue; + + // normalize face number to the GlyphCache + int nFaceNum = rMgr.getFontFaceNumber( aInfo.m_nID ); + if( nFaceNum < 0 ) + nFaceNum = 0; + + // for fonts where extra kerning info can be provided on demand + // an ExtraKernInfo object is supplied + const ExtraKernInfo* pExtraKernInfo = NULL; + if( aInfo.m_eType == psp::fonttype::Type1 ) + pExtraKernInfo = new PspKernInfo( *it ); + + // inform GlyphCache about this font provided by the PsPrint subsystem + ImplDevFontAttributes aDFA = PspGraphics::Info2DevFontAttributes( aInfo ); + aDFA.mnQuality += 4096; + const rtl::OString& rFileName = rMgr.getFontFileSysPath( aInfo.m_nID ); + rGC.AddFontFile( rFileName, nFaceNum, aInfo.m_nID, aDFA, pExtraKernInfo ); + } + + // announce glyphcache fonts + rGC.AnnounceFonts( pList ); + + // register platform specific font substitutions if available + if( rMgr.hasFontconfig() ) + RegisterFontSubstitutors( pList ); + + ImplGetSVData()->maGDIData.mbNativeFontConfig = rMgr.hasFontconfig(); +} + +// ---------------------------------------------------------------------------- + +void X11SalGraphics::GetDevFontSubstList( OutputDevice* ) +{ + // no device specific font substitutions on X11 needed +} + +// ---------------------------------------------------------------------------- + +void cairosubcallback( void* pPattern ) +{ + CairoWrapper& rCairo = CairoWrapper::get(); + if( !rCairo.isValid() ) + return; + const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); + const void* pFontOptions = rStyleSettings.GetCairoFontOptions(); + if( !pFontOptions ) + return; + rCairo.ft_font_options_substitute( pFontOptions, pPattern ); +} + +bool GetFCFontOptions( const ImplFontAttributes& rFontAttributes, int nSize, + ImplFontOptions& rFontOptions) +{ + // TODO: get rid of these insane enum-conversions + // e.g. by using the classic vclenum values inside VCL + + psp::FastPrintFontInfo aInfo; + // set family name + aInfo.m_aFamilyName = rFontAttributes.GetFamilyName(); + // set italic + switch( rFontAttributes.GetSlant() ) + { + case ITALIC_NONE: + aInfo.m_eItalic = psp::italic::Upright; + break; + case ITALIC_NORMAL: + aInfo.m_eItalic = psp::italic::Italic; + break; + case ITALIC_OBLIQUE: + aInfo.m_eItalic = psp::italic::Oblique; + break; + default: + aInfo.m_eItalic = psp::italic::Unknown; + break; + } + // set weight + switch( rFontAttributes.GetWeight() ) + { + case WEIGHT_THIN: + aInfo.m_eWeight = psp::weight::Thin; + break; + case WEIGHT_ULTRALIGHT: + aInfo.m_eWeight = psp::weight::UltraLight; + break; + case WEIGHT_LIGHT: + aInfo.m_eWeight = psp::weight::Light; + break; + case WEIGHT_SEMILIGHT: + aInfo.m_eWeight = psp::weight::SemiLight; + break; + case WEIGHT_NORMAL: + aInfo.m_eWeight = psp::weight::Normal; + break; + case WEIGHT_MEDIUM: + aInfo.m_eWeight = psp::weight::Medium; + break; + case WEIGHT_SEMIBOLD: + aInfo.m_eWeight = psp::weight::SemiBold; + break; + case WEIGHT_BOLD: + aInfo.m_eWeight = psp::weight::Bold; + break; + case WEIGHT_ULTRABOLD: + aInfo.m_eWeight = psp::weight::UltraBold; + break; + case WEIGHT_BLACK: + aInfo.m_eWeight = psp::weight::Black; + break; + default: + aInfo.m_eWeight = psp::weight::Unknown; + break; + } + // set width + switch( rFontAttributes.GetWidthType() ) + { + case WIDTH_ULTRA_CONDENSED: + aInfo.m_eWidth = psp::width::UltraCondensed; + break; + case WIDTH_EXTRA_CONDENSED: + aInfo.m_eWidth = psp::width::ExtraCondensed; + break; + case WIDTH_CONDENSED: + aInfo.m_eWidth = psp::width::Condensed; + break; + case WIDTH_SEMI_CONDENSED: + aInfo.m_eWidth = psp::width::SemiCondensed; + break; + case WIDTH_NORMAL: + aInfo.m_eWidth = psp::width::Normal; + break; + case WIDTH_SEMI_EXPANDED: + aInfo.m_eWidth = psp::width::SemiExpanded; + break; + case WIDTH_EXPANDED: + aInfo.m_eWidth = psp::width::Expanded; + break; + case WIDTH_EXTRA_EXPANDED: + aInfo.m_eWidth = psp::width::ExtraExpanded; + break; + case WIDTH_ULTRA_EXPANDED: + aInfo.m_eWidth = psp::width::UltraExpanded; + break; + default: + aInfo.m_eWidth = psp::width::Unknown; + break; + } + + const psp::PrintFontManager& rPFM = psp::PrintFontManager::get(); + bool bOK = rPFM.getFontOptions( aInfo, nSize, cairosubcallback, rFontOptions); + return bOK; +} + +// ---------------------------------------------------------------------------- + +void +X11SalGraphics::GetFontMetric( ImplFontMetricData *pMetric, int nFallbackLevel ) +{ + if( nFallbackLevel >= MAX_FALLBACK ) + return; + + if( mpServerFont[nFallbackLevel] != NULL ) + { + long rDummyFactor; + mpServerFont[nFallbackLevel]->FetchFontMetric( *pMetric, rDummyFactor ); + } +} + +// --------------------------------------------------------------------------- + +ULONG +X11SalGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs ) +{ + if( ! bPrinter_ ) + { + if( mpServerFont[0] != NULL ) + { + ImplKernPairData* pTmpKernPairs; + ULONG nGotPairs = mpServerFont[0]->GetKernPairs( &pTmpKernPairs ); + for( unsigned int i = 0; i < nPairs && i < nGotPairs; ++i ) + pKernPairs[ i ] = pTmpKernPairs[ i ]; + delete[] pTmpKernPairs; + return nGotPairs; + } + } + return 0; +} + +// --------------------------------------------------------------------------- + +BOOL X11SalGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect ) +{ + int nLevel = nGlyphIndex >> GF_FONTSHIFT; + if( nLevel >= MAX_FALLBACK ) + return FALSE; + + ServerFont* pSF = mpServerFont[ nLevel ]; + if( !pSF ) + return FALSE; + + nGlyphIndex &= ~GF_FONTMASK; + const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex ); + rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() ); + return TRUE; +} + +// --------------------------------------------------------------------------- + +BOOL X11SalGraphics::GetGlyphOutline( long nGlyphIndex, + ::basegfx::B2DPolyPolygon& rPolyPoly ) +{ + int nLevel = nGlyphIndex >> GF_FONTSHIFT; + if( nLevel >= MAX_FALLBACK ) + return FALSE; + + ServerFont* pSF = mpServerFont[ nLevel ]; + if( !pSF ) + return FALSE; + + nGlyphIndex &= ~GF_FONTMASK; + if( pSF->GetGlyphOutline( nGlyphIndex, rPolyPoly ) ) + return TRUE; + + return FALSE; +} + +//-------------------------------------------------------------------------- + +SalLayout* X11SalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel ) +{ + SalLayout* pLayout = NULL; + + if( mpServerFont[ nFallbackLevel ] + && !(rArgs.mnFlags & SAL_LAYOUT_DISABLE_GLYPH_PROCESSING) ) + { +#ifdef ENABLE_GRAPHITE + // Is this a Graphite font? + if (!bDisableGraphite_ && + GraphiteFontAdaptor::IsGraphiteEnabledFont(*mpServerFont[nFallbackLevel])) + { + sal_Int32 xdpi, ydpi; + + xdpi = GetDisplay()->GetResolution().A(); + ydpi = GetDisplay()->GetResolution().B(); + + GraphiteFontAdaptor * pGrfont = new GraphiteFontAdaptor( *mpServerFont[nFallbackLevel], xdpi, ydpi); + if (!pGrfont) return NULL; + pLayout = new GraphiteServerFontLayout(pGrfont); + } + else +#endif + pLayout = new ServerFontLayout( *mpServerFont[ nFallbackLevel ] ); + } + + return pLayout; +} + +//-------------------------------------------------------------------------- + +SystemFontData X11SalGraphics::GetSysFontData( int nFallbacklevel ) const +{ + SystemFontData aSysFontData; + aSysFontData.nSize = sizeof( SystemFontData ); + aSysFontData.nFontId = 0; + + if (nFallbacklevel >= MAX_FALLBACK) nFallbacklevel = MAX_FALLBACK - 1; + if (nFallbacklevel < 0 ) nFallbacklevel = 0; + + if (mpServerFont[nFallbacklevel] != NULL) + { + ServerFont* rFont = mpServerFont[nFallbacklevel]; + aSysFontData.nFontId = rFont->GetFtFace(); + aSysFontData.nFontFlags = rFont->GetLoadFlags(); + aSysFontData.bFakeBold = rFont->NeedsArtificialBold(); + aSysFontData.bFakeItalic = rFont->NeedsArtificialItalic(); + aSysFontData.bAntialias = rFont->GetAntialiasAdvice(); + aSysFontData.bVerticalCharacterType = rFont->GetFontSelData().mbVertical; + } + + return aSysFontData; +} + +//-------------------------------------------------------------------------- + +BOOL X11SalGraphics::CreateFontSubset( + const rtl::OUString& rToFile, + const ImplFontData* pFont, + sal_Int32* pGlyphIDs, + sal_uInt8* pEncoding, + sal_Int32* pWidths, + int nGlyphCount, + FontSubsetInfo& rInfo + ) +{ + // in this context the pFont->GetFontId() is a valid PSP + // font since they are the only ones left after the PDF + // export has filtered its list of subsettable fonts (for + // which this method was created). The correct way would + // be to have the GlyphCache search for the ImplFontData pFont + psp::fontID aFont = pFont->GetFontId(); + + psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); + bool bSuccess = rMgr.createFontSubset( rInfo, + aFont, + rToFile, + pGlyphIDs, + pEncoding, + pWidths, + nGlyphCount ); + return bSuccess; +} + +//-------------------------------------------------------------------------- + +const void* X11SalGraphics::GetEmbedFontData( const ImplFontData* pFont, const sal_Ucs* pUnicodes, sal_Int32* pWidths, FontSubsetInfo& rInfo, long* pDataLen ) +{ + // in this context the pFont->GetFontId() is a valid PSP + // font since they are the only ones left after the PDF + // export has filtered its list of subsettable fonts (for + // which this method was created). The correct way would + // be to have the GlyphCache search for the ImplFontData pFont + psp::fontID aFont = pFont->GetFontId(); + return PspGraphics::DoGetEmbedFontData( aFont, pUnicodes, pWidths, rInfo, pDataLen ); +} + +//-------------------------------------------------------------------------- + +void X11SalGraphics::FreeEmbedFontData( const void* pData, long nLen ) +{ + PspGraphics::DoFreeEmbedFontData( pData, nLen ); +} + +//-------------------------------------------------------------------------- + +const Ucs2SIntMap* X11SalGraphics::GetFontEncodingVector( const ImplFontData* pFont, const Ucs2OStrMap** pNonEncoded ) +{ + // in this context the pFont->GetFontId() is a valid PSP + // font since they are the only ones left after the PDF + // export has filtered its list of subsettable fonts (for + // which this method was created). The correct way would + // be to have the GlyphCache search for the ImplFontData pFont + psp::fontID aFont = pFont->GetFontId(); + return PspGraphics::DoGetFontEncodingVector( aFont, pNonEncoded ); +} + +//-------------------------------------------------------------------------- + +void X11SalGraphics::GetGlyphWidths( const ImplFontData* pFont, + bool bVertical, + Int32Vector& rWidths, + Ucs2UIntMap& rUnicodeEnc ) +{ + // in this context the pFont->GetFontId() is a valid PSP + // font since they are the only ones left after the PDF + // export has filtered its list of subsettable fonts (for + // which this method was created). The correct way would + // be to have the GlyphCache search for the ImplFontData pFont + psp::fontID aFont = pFont->GetFontId(); + PspGraphics::DoGetGlyphWidths( aFont, bVertical, rWidths, rUnicodeEnc ); +} + +// =========================================================================== +// platform specific font substitution hooks + +class FcPreMatchSubstititution +: public ImplPreMatchFontSubstitution +{ +public: + bool FindFontSubstitute( ImplFontSelectData& ) const; +}; + +class FcGlyphFallbackSubstititution +: public ImplGlyphFallbackFontSubstitution +{ + // TODO: add a cache +public: + bool FindFontSubstitute( ImplFontSelectData&, OUString& rMissingCodes ) const; +}; + +void RegisterFontSubstitutors( ImplDevFontList* pList ) +{ + // init font substitution defaults + int nDisableBits = 0; +#ifdef SOLARIS + nDisableBits = 1; // disable "font fallback" here on default +#endif + // apply the environment variable if any + const char* pEnvStr = ::getenv( "SAL_DISABLE_FC_SUBST" ); + if( pEnvStr ) + { + if( (*pEnvStr >= '0') && (*pEnvStr <= '9') ) + nDisableBits = (*pEnvStr - '0'); + else + nDisableBits = ~0U; // no specific bits set: disable all + } + + // register font fallback substitutions (unless disabled by bit0) + if( (nDisableBits & 1) == 0 ) + { + static FcPreMatchSubstititution aSubstPreMatch; + pList->SetPreMatchHook( &aSubstPreMatch ); + } + + // register glyph fallback substitutions (unless disabled by bit1) + if( (nDisableBits & 2) == 0 ) + { + static FcGlyphFallbackSubstititution aSubstFallback; + pList->SetFallbackHook( &aSubstFallback ); + } +} + +// ----------------------------------------------------------------------- + +static ImplFontSelectData GetFcSubstitute(const ImplFontSelectData &rFontSelData, OUString& rMissingCodes ) +{ + ImplFontSelectData aRet(rFontSelData); + + const rtl::OString aLangAttrib = MsLangId::convertLanguageToIsoByteString( rFontSelData.meLanguage ); + + psp::italic::type eItalic = psp::italic::Unknown; + if( rFontSelData.GetSlant() != ITALIC_DONTKNOW ) + { + switch( rFontSelData.GetSlant() ) + { + case ITALIC_NONE: eItalic = psp::italic::Upright; break; + case ITALIC_NORMAL: eItalic = psp::italic::Italic; break; + case ITALIC_OBLIQUE: eItalic = psp::italic::Oblique; break; + default: + break; + } + } + + psp::weight::type eWeight = psp::weight::Unknown; + if( rFontSelData.GetWeight() != WEIGHT_DONTKNOW ) + { + switch( rFontSelData.GetWeight() ) + { + case WEIGHT_THIN: eWeight = psp::weight::Thin; break; + case WEIGHT_ULTRALIGHT: eWeight = psp::weight::UltraLight; break; + case WEIGHT_LIGHT: eWeight = psp::weight::Light; break; + case WEIGHT_SEMILIGHT: eWeight = psp::weight::SemiLight; break; + case WEIGHT_NORMAL: eWeight = psp::weight::Normal; break; + case WEIGHT_MEDIUM: eWeight = psp::weight::Medium; break; + case WEIGHT_SEMIBOLD: eWeight = psp::weight::SemiBold; break; + case WEIGHT_BOLD: eWeight = psp::weight::Bold; break; + case WEIGHT_ULTRABOLD: eWeight = psp::weight::UltraBold; break; + case WEIGHT_BLACK: eWeight = psp::weight::Black; break; + default: + break; + } + } + + psp::width::type eWidth = psp::width::Unknown; + if( rFontSelData.GetWidthType() != WIDTH_DONTKNOW ) + { + switch( rFontSelData.GetWidthType() ) + { + case WIDTH_ULTRA_CONDENSED: eWidth = psp::width::UltraCondensed; break; + case WIDTH_EXTRA_CONDENSED: eWidth = psp::width::ExtraCondensed; break; + case WIDTH_CONDENSED: eWidth = psp::width::Condensed; break; + case WIDTH_SEMI_CONDENSED: eWidth = psp::width::SemiCondensed; break; + case WIDTH_NORMAL: eWidth = psp::width::Normal; break; + case WIDTH_SEMI_EXPANDED: eWidth = psp::width::SemiExpanded; break; + case WIDTH_EXPANDED: eWidth = psp::width::Expanded; break; + case WIDTH_EXTRA_EXPANDED: eWidth = psp::width::ExtraExpanded; break; + case WIDTH_ULTRA_EXPANDED: eWidth = psp::width::UltraExpanded; break; + default: + break; + } + } + + psp::pitch::type ePitch = psp::pitch::Unknown; + if( rFontSelData.GetPitch() != PITCH_DONTKNOW ) + { + switch( rFontSelData.GetPitch() ) + { + case PITCH_FIXED: ePitch=psp::pitch::Fixed; break; + case PITCH_VARIABLE: ePitch=psp::pitch::Variable; break; + default: + break; + } + } + + const psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); + aRet.maSearchName = rMgr.Substitute( rFontSelData.maTargetName, rMissingCodes, aLangAttrib, eItalic, eWeight, eWidth, ePitch); + + switch (eItalic) + { + case psp::italic::Upright: aRet.meItalic = ITALIC_NONE; break; + case psp::italic::Italic: aRet.meItalic = ITALIC_NORMAL; break; + case psp::italic::Oblique: aRet.meItalic = ITALIC_OBLIQUE; break; + default: + break; + } + + switch (eWeight) + { + case psp::weight::Thin: aRet.meWeight = WEIGHT_THIN; break; + case psp::weight::UltraLight: aRet.meWeight = WEIGHT_ULTRALIGHT; break; + case psp::weight::Light: aRet.meWeight = WEIGHT_LIGHT; break; + case psp::weight::SemiLight: aRet.meWeight = WEIGHT_SEMILIGHT; break; + case psp::weight::Normal: aRet.meWeight = WEIGHT_NORMAL; break; + case psp::weight::Medium: aRet.meWeight = WEIGHT_MEDIUM; break; + case psp::weight::SemiBold: aRet.meWeight = WEIGHT_SEMIBOLD; break; + case psp::weight::Bold: aRet.meWeight = WEIGHT_BOLD; break; + case psp::weight::UltraBold: aRet.meWeight = WEIGHT_ULTRABOLD; break; + case psp::weight::Black: aRet.meWeight = WEIGHT_BLACK; break; + default: + break; + } + + switch (eWidth) + { + case psp::width::UltraCondensed: aRet.meWidthType = WIDTH_ULTRA_CONDENSED; break; + case psp::width::ExtraCondensed: aRet.meWidthType = WIDTH_EXTRA_CONDENSED; break; + case psp::width::Condensed: aRet.meWidthType = WIDTH_CONDENSED; break; + case psp::width::SemiCondensed: aRet.meWidthType = WIDTH_SEMI_CONDENSED; break; + case psp::width::Normal: aRet.meWidthType = WIDTH_NORMAL; break; + case psp::width::SemiExpanded: aRet.meWidthType = WIDTH_SEMI_EXPANDED; break; + case psp::width::Expanded: aRet.meWidthType = WIDTH_EXPANDED; break; + case psp::width::ExtraExpanded: aRet.meWidthType = WIDTH_EXTRA_EXPANDED; break; + case psp::width::UltraExpanded: aRet.meWidthType = WIDTH_ULTRA_EXPANDED; break; + default: + break; + } + + switch (ePitch) + { + case psp::pitch::Fixed: aRet.mePitch = PITCH_FIXED; break; + case psp::pitch::Variable: aRet.mePitch = PITCH_VARIABLE; break; + default: + break; + } + + return aRet; +} + +namespace +{ + bool uselessmatch(const ImplFontSelectData &rOrig, const ImplFontSelectData &rNew) + { + return + ( + rOrig.maTargetName == rNew.maSearchName && + rOrig.meWeight == rNew.meWeight && + rOrig.meItalic == rNew.meItalic && + rOrig.mePitch == rNew.mePitch && + rOrig.meWidthType == rNew.meWidthType + ); + } +} + +//-------------------------------------------------------------------------- + +bool FcPreMatchSubstititution::FindFontSubstitute( ImplFontSelectData &rFontSelData ) const +{ + // We dont' actually want to talk to Fontconfig at all for symbol fonts + if( rFontSelData.IsSymbolFont() ) + return false; + // StarSymbol is a unicode font, but it still deserves the symbol flag + if( 0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "starsymbol", 10) + || 0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "opensymbol", 10) ) + return false; + + rtl::OUString aDummy; + const ImplFontSelectData aOut = GetFcSubstitute( rFontSelData, aDummy ); + // TODO: cache the font substitution suggestion + // FC doing it would be preferable because it knows the invariables + // e.g. FC knows the FC rule that all Arial gets replaced by LiberationSans + // whereas we would have to check for every size or attribute + if( !aOut.maSearchName.Len() ) + return false; + + const bool bHaveSubstitute = !uselessmatch( rFontSelData, aOut ); + +#ifdef DEBUG + const ByteString aOrigName( rFontSelData.maTargetName, RTL_TEXTENCODING_UTF8 ); + const ByteString aSubstName( aOut.maSearchName, RTL_TEXTENCODING_UTF8 ); + printf( "FcPreMatchSubstititution \"%s\" bipw=%d%d%d%d -> ", + aOrigName.GetBuffer(), rFontSelData.meWeight, rFontSelData.meItalic, + rFontSelData.mePitch, rFontSelData.meWidthType ); + if( !bHaveSubstitute ) + printf( "no substitute available\n" ); + else + printf( "\"%s\" bipw=%d%d%d%d\n", aSubstName.GetBuffer(), + aOut.meWeight, aOut.meItalic, aOut.mePitch, aOut.meWidthType ); +#endif + + if( bHaveSubstitute ) + rFontSelData = aOut; + + return bHaveSubstitute; +} + +// ----------------------------------------------------------------------- + +bool FcGlyphFallbackSubstititution::FindFontSubstitute( ImplFontSelectData& rFontSelData, + rtl::OUString& rMissingCodes ) const +{ + // We dont' actually want to talk to Fontconfig at all for symbol fonts + if( rFontSelData.IsSymbolFont() ) + return false; + // StarSymbol is a unicode font, but it still deserves the symbol flag + if( 0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "starsymbol", 10) + || 0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "opensymbol", 10) ) + return false; + + const ImplFontSelectData aOut = GetFcSubstitute( rFontSelData, rMissingCodes ); + // TODO: cache the unicode + srcfont specific result + // FC doing it would be preferable because it knows the invariables + // e.g. FC knows the FC rule that all Arial gets replaced by LiberationSans + // whereas we would have to check for every size or attribute + if( !aOut.maSearchName.Len() ) + return false; + + const bool bHaveSubstitute = !uselessmatch( rFontSelData, aOut ); + +#ifdef DEBUG + const ByteString aOrigName( rFontSelData.maTargetName, RTL_TEXTENCODING_UTF8 ); + const ByteString aSubstName( aOut.maSearchName, RTL_TEXTENCODING_UTF8 ); + printf( "FcGFSubstititution \"%s\" bipw=%d%d%d%d ->", + aOrigName.GetBuffer(), rFontSelData.meWeight, rFontSelData.meItalic, + rFontSelData.mePitch, rFontSelData.meWidthType ); + if( !bHaveSubstitute ) + printf( "no substitute available\n" ); + else + printf( "\"%s\" bipw=%d%d%d%d\n", aSubstName.GetBuffer(), + aOut.meWeight, aOut.meItalic, aOut.mePitch, aOut.meWidthType ); +#endif + + if( bHaveSubstitute ) + rFontSelData = aOut; + + return bHaveSubstitute; +} + +// =========================================================================== + diff --git a/vcl/unx/generic/gdi/salprnpsp.cxx b/vcl/unx/generic/gdi/salprnpsp.cxx new file mode 100644 index 000000000000..c961c321a2d3 --- /dev/null +++ b/vcl/unx/generic/gdi/salprnpsp.cxx @@ -0,0 +1,1462 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +/** + this file implements the sal printer interface ( SalPrinter, SalInfoPrinter + and some printer relevant methods of SalInstance and SalGraphicsData ) + + as aunderlying library the printer features of psprint are used. + + The query methods of a SalInfoPrinter are implemented by querying psprint + + The job methods of a SalPrinter are implemented by calling psprint + printer job functions. + */ + +#include +#include +#include + +#include "rtl/ustring.hxx" + +#include "osl/module.h" + +#include "vcl/svapp.hxx" +#include "vcl/print.hxx" +#include "vcl/pdfwriter.hxx" +#include "vcl/printerinfomanager.hxx" + +#include +#include "unx/saldisp.hxx" +#include "unx/salinst.h" +#include "unx/salprn.h" +#include "unx/salframe.h" +#include "unx/pspgraphics.h" +#include "unx/saldata.hxx" + +#include "jobset.h" +#include "print.h" +#include "salptype.hxx" + +using namespace psp; +using namespace rtl; +using namespace com::sun::star; + +/* + * static helpers + */ + +#include "rtsname.hxx" + +static oslModule driverLib = NULL; +extern "C" +{ +typedef int(*setupFunction)(PrinterInfo&); +static setupFunction pSetupFunction = NULL; +typedef int(*faxFunction)(String&); +static faxFunction pFaxNrFunction = NULL; +} + +static String getPdfDir( const PrinterInfo& rInfo ) +{ + String aDir; + sal_Int32 nIndex = 0; + while( nIndex != -1 ) + { + OUString aToken( rInfo.m_aFeatures.getToken( 0, ',', nIndex ) ); + if( ! aToken.compareToAscii( "pdf=", 4 ) ) + { + sal_Int32 nPos = 0; + aDir = aToken.getToken( 1, '=', nPos ); + if( ! aDir.Len() ) + aDir = String( ByteString( getenv( "HOME" ) ), osl_getThreadTextEncoding() ); + break; + } + } + return aDir; +} + +static void getPaLib() +{ + if( ! driverLib ) + { + OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( _XSALSET_LIBNAME ) ); + driverLib = osl_loadModuleRelative( (oslGenericFunction)getPaLib, aLibName.pData, SAL_LOADMODULE_DEFAULT ); + if ( !driverLib ) + { + return; + } + + pSetupFunction = (setupFunction)osl_getAsciiFunctionSymbol( driverLib, "Sal_SetupPrinterDriver" ); + if ( !pSetupFunction ) + fprintf( stderr, "could not resolve Sal_SetupPrinterDriver\n" ); + + pFaxNrFunction = (faxFunction)osl_getAsciiFunctionSymbol( driverLib, "Sal_queryFaxNumber" ); + if ( !pFaxNrFunction ) + fprintf( stderr, "could not resolve Sal_queryFaxNumber\n" ); + } +} + +inline int PtTo10Mu( int nPoints ) { return (int)((((double)nPoints)*35.27777778)+0.5); } + +inline int TenMuToPt( int nUnits ) { return (int)((((double)nUnits)/35.27777778)+0.5); } + +static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData ) +{ + pJobSetup->meOrientation = (Orientation)(rData.m_eOrientation == orientation::Landscape ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT); + + // copy page size + String aPaper; + int width, height; + + rData.m_aContext.getPageSize( aPaper, width, height ); + pJobSetup->mePaperFormat = PaperInfo::fromPSName(OUStringToOString( aPaper, RTL_TEXTENCODING_ISO_8859_1 )); + + pJobSetup->mnPaperWidth = 0; + pJobSetup->mnPaperHeight = 0; + if( pJobSetup->mePaperFormat == PAPER_USER ) + { + // transform to 100dth mm + width = PtTo10Mu( width ); + height = PtTo10Mu( height ); + + if( rData.m_eOrientation == psp::orientation::Portrait ) + { + pJobSetup->mnPaperWidth = width; + pJobSetup->mnPaperHeight= height; + } + else + { + pJobSetup->mnPaperWidth = height; + pJobSetup->mnPaperHeight= width; + } + } + + // copy input slot + const PPDKey* pKey = NULL; + const PPDValue* pValue = NULL; + + pJobSetup->mnPaperBin = 0; + if( rData.m_pParser ) + pKey = rData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) ); + if( pKey ) + pValue = rData.m_aContext.getValue( pKey ); + if( pKey && pValue ) + { + for( pJobSetup->mnPaperBin = 0; + pValue != pKey->getValue( pJobSetup->mnPaperBin ) && + pJobSetup->mnPaperBin < pKey->countValues(); + pJobSetup->mnPaperBin++ ) + ; + if( pJobSetup->mnPaperBin >= pKey->countValues() ) + pJobSetup->mnPaperBin = 0; + } + + // copy duplex + pKey = NULL; + pValue = NULL; + + pJobSetup->meDuplexMode = DUPLEX_UNKNOWN; + if( rData.m_pParser ) + pKey = rData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) ); + if( pKey ) + pValue = rData.m_aContext.getValue( pKey ); + if( pKey && pValue ) + { + if( pValue->m_aOption.EqualsIgnoreCaseAscii( "None" ) || + pValue->m_aOption.EqualsIgnoreCaseAscii( "Simplex", 0, 7 ) + ) + { + pJobSetup->meDuplexMode = DUPLEX_OFF; + } + else if( pValue->m_aOption.EqualsIgnoreCaseAscii( "DuplexNoTumble" ) ) + { + pJobSetup->meDuplexMode = DUPLEX_LONGEDGE; + } + else if( pValue->m_aOption.EqualsIgnoreCaseAscii( "DuplexTumble" ) ) + { + pJobSetup->meDuplexMode = DUPLEX_SHORTEDGE; + } + } + + // copy the whole context + if( pJobSetup->mpDriverData ) + rtl_freeMemory( pJobSetup->mpDriverData ); + + int nBytes; + void* pBuffer = NULL; + if( rData.getStreamBuffer( pBuffer, nBytes ) ) + { + pJobSetup->mnDriverDataLen = nBytes; + pJobSetup->mpDriverData = (BYTE*)pBuffer; + } + else + { + pJobSetup->mnDriverDataLen = 0; + pJobSetup->mpDriverData = NULL; + } +} + +static bool passFileToCommandLine( const String& rFilename, const String& rCommandLine, bool bRemoveFile = true ) +{ + bool bSuccess = false; + + rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); + ByteString aCmdLine( rCommandLine, aEncoding ); + ByteString aFilename( rFilename, aEncoding ); + + bool bPipe = aCmdLine.Search( "(TMP)" ) != STRING_NOTFOUND ? false : true; + + // setup command line for exec + if( ! bPipe ) + while( aCmdLine.SearchAndReplace( "(TMP)", aFilename ) != STRING_NOTFOUND ) + ; + +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "%s commandline: \"%s\"\n", + bPipe ? "piping to" : "executing", + aCmdLine.GetBuffer() ); + struct stat aStat; + if( stat( aFilename.GetBuffer(), &aStat ) ) + fprintf( stderr, "stat( %s ) failed\n", aFilename.GetBuffer() ); + fprintf( stderr, "Tmp file %s has modes: 0%03lo\n", aFilename.GetBuffer(), (long)aStat.st_mode ); +#endif + const char* argv[4]; + if( ! ( argv[ 0 ] = getenv( "SHELL" ) ) ) + argv[ 0 ] = "/bin/sh"; + argv[ 1 ] = "-c"; + argv[ 2 ] = aCmdLine.GetBuffer(); + argv[ 3 ] = 0; + + bool bHavePipes = false; + int pid, fd[2]; + + if( bPipe ) + bHavePipes = pipe( fd ) ? false : true; + if( ( pid = fork() ) > 0 ) + { + if( bPipe && bHavePipes ) + { + close( fd[0] ); + char aBuffer[ 2048 ]; + FILE* fp = fopen( aFilename.GetBuffer(), "r" ); + while( fp && ! feof( fp ) ) + { + int nBytes = fread( aBuffer, 1, sizeof( aBuffer ), fp ); + if( nBytes ) + write( fd[ 1 ], aBuffer, nBytes ); + } + fclose( fp ); + close( fd[ 1 ] ); + } + int status = 0; + waitpid( pid, &status, 0 ); + if( ! status ) + bSuccess = true; + } + else if( ! pid ) + { + if( bPipe && bHavePipes ) + { + close( fd[1] ); + if( fd[0] != STDIN_FILENO ) // not probable, but who knows :) + dup2( fd[0], STDIN_FILENO ); + } + execv( argv[0], const_cast(argv) ); + fprintf( stderr, "failed to execute \"%s\"\n", aCmdLine.GetBuffer() ); + _exit( 1 ); + } + else + fprintf( stderr, "failed to fork\n" ); + + // clean up the mess + if( bRemoveFile ) + unlink( aFilename.GetBuffer() ); + + return bSuccess; +} + +static bool sendAFax( const String& rFaxNumber, const String& rFileName, const String& rCommand ) +{ + std::list< OUString > aFaxNumbers; + + if( ! rFaxNumber.Len() ) + { + getPaLib(); + if( pFaxNrFunction ) + { + String aNewNr; + if( pFaxNrFunction( aNewNr ) ) + aFaxNumbers.push_back( OUString( aNewNr ) ); + } + } + else + { + sal_Int32 nIndex = 0; + OUString aFaxes( rFaxNumber ); + OUString aBeginToken( RTL_CONSTASCII_USTRINGPARAM("") ); + OUString aEndToken( RTL_CONSTASCII_USTRINGPARAM("") ); + while( nIndex != -1 ) + { + nIndex = aFaxes.indexOf( aBeginToken, nIndex ); + if( nIndex != -1 ) + { + sal_Int32 nBegin = nIndex + aBeginToken.getLength(); + nIndex = aFaxes.indexOf( aEndToken, nIndex ); + if( nIndex != -1 ) + { + aFaxNumbers.push_back( aFaxes.copy( nBegin, nIndex-nBegin ) ); + nIndex += aEndToken.getLength(); + } + } + } + } + + bool bSuccess = true; + if( aFaxNumbers.begin() != aFaxNumbers.end() ) + { + while( aFaxNumbers.begin() != aFaxNumbers.end() && bSuccess ) + { + String aCmdLine( rCommand ); + String aFaxNumber( aFaxNumbers.front() ); + aFaxNumbers.pop_front(); + while( aCmdLine.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "(PHONE)" ) ), aFaxNumber ) != STRING_NOTFOUND ) + ; +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "sending fax to \"%s\"\n", OUStringToOString( aFaxNumber, osl_getThreadTextEncoding() ).getStr() ); +#endif + bSuccess = passFileToCommandLine( rFileName, aCmdLine, false ); + } + } + else + bSuccess = false; + + // clean up temp file + unlink( ByteString( rFileName, osl_getThreadTextEncoding() ).GetBuffer() ); + + return bSuccess; +} + +static bool createPdf( const String& rToFile, const String& rFromFile, const String& rCommandLine ) +{ + String aCommandLine( rCommandLine ); + while( aCommandLine.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "(OUTFILE)" ) ), rToFile ) != STRING_NOTFOUND ) + ; + return passFileToCommandLine( rFromFile, aCommandLine ); +} + +/* + * SalInstance + */ + +// ----------------------------------------------------------------------- + +SalInfoPrinter* X11SalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo, + ImplJobSetup* pJobSetup ) +{ + mbPrinterInit = true; + // create and initialize SalInfoPrinter + PspSalInfoPrinter* pPrinter = new PspSalInfoPrinter; + + if( pJobSetup ) + { + PrinterInfoManager& rManager( PrinterInfoManager::get() ); + PrinterInfo aInfo( rManager.getPrinterInfo( pQueueInfo->maPrinterName ) ); + pPrinter->m_aJobData = aInfo; + pPrinter->m_aPrinterGfx.Init( pPrinter->m_aJobData ); + + if( pJobSetup->mpDriverData ) + JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aInfo ); + + pJobSetup->mnSystem = JOBSETUP_SYSTEM_UNIX; + pJobSetup->maPrinterName = pQueueInfo->maPrinterName; + pJobSetup->maDriver = aInfo.m_aDriverName; + copyJobDataToJobSetup( pJobSetup, aInfo ); + + // set/clear backwards compatibility flag + bool bStrictSO52Compatibility = false; + std::hash_map::const_iterator compat_it = + pJobSetup->maValueMap.find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StrictSO52Compatibility" ) ) ); + + if( compat_it != pJobSetup->maValueMap.end() ) + { + if( compat_it->second.equalsIgnoreAsciiCaseAscii( "true" ) ) + bStrictSO52Compatibility = true; + } + pPrinter->m_aPrinterGfx.setStrictSO52Compatibility( bStrictSO52Compatibility ); + } + + + return pPrinter; +} + +// ----------------------------------------------------------------------- + +void X11SalInstance::DestroyInfoPrinter( SalInfoPrinter* pPrinter ) +{ + delete pPrinter; +} + +// ----------------------------------------------------------------------- + +SalPrinter* X11SalInstance::CreatePrinter( SalInfoPrinter* pInfoPrinter ) +{ + mbPrinterInit = true; + // create and initialize SalPrinter + PspSalPrinter* pPrinter = new PspSalPrinter( pInfoPrinter ); + pPrinter->m_aJobData = static_cast(pInfoPrinter)->m_aJobData; + + return pPrinter; +} + +// ----------------------------------------------------------------------- + +void X11SalInstance::DestroyPrinter( SalPrinter* pPrinter ) +{ + delete pPrinter; +} + +// ----------------------------------------------------------------------- + +void X11SalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList ) +{ + mbPrinterInit = true; + PrinterInfoManager& rManager( PrinterInfoManager::get() ); + static const char* pNoSyncDetection = getenv( "SAL_DISABLE_SYNCHRONOUS_PRINTER_DETECTION" ); + if( ! pNoSyncDetection || ! *pNoSyncDetection ) + { + // #i62663# synchronize possible asynchronouse printer detection now + rManager.checkPrintersChanged( true ); + } + ::std::list< OUString > aPrinters; + rManager.listPrinters( aPrinters ); + + for( ::std::list< OUString >::iterator it = aPrinters.begin(); it != aPrinters.end(); ++it ) + { + const PrinterInfo& rInfo( rManager.getPrinterInfo( *it ) ); + // Neuen Eintrag anlegen + SalPrinterQueueInfo* pInfo = new SalPrinterQueueInfo; + pInfo->maPrinterName = *it; + pInfo->maDriver = rInfo.m_aDriverName; + pInfo->maLocation = rInfo.m_aLocation; + pInfo->maComment = rInfo.m_aComment; + pInfo->mpSysData = NULL; + + sal_Int32 nIndex = 0; + while( nIndex != -1 ) + { + String aToken( rInfo.m_aFeatures.getToken( 0, ',', nIndex ) ); + if( aToken.CompareToAscii( "pdf=", 4 ) == COMPARE_EQUAL ) + { + pInfo->maLocation = getPdfDir( rInfo ); + break; + } + } + + pList->Add( pInfo ); + } +} + +// ----------------------------------------------------------------------- + +void X11SalInstance::DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ) +{ + delete pInfo; +} + +// ----------------------------------------------------------------------- + +void X11SalInstance::GetPrinterQueueState( SalPrinterQueueInfo* ) +{ + mbPrinterInit = true; +} + +// ----------------------------------------------------------------------- + +String X11SalInstance::GetDefaultPrinter() +{ + mbPrinterInit = true; + PrinterInfoManager& rManager( PrinterInfoManager::get() ); + return rManager.getDefaultPrinter(); +} + +// ======================================================================= + +PspSalInfoPrinter::PspSalInfoPrinter() +{ + m_pGraphics = NULL; + m_bPapersInit = false; +} + +// ----------------------------------------------------------------------- + +PspSalInfoPrinter::~PspSalInfoPrinter() +{ + if( m_pGraphics ) + { + delete m_pGraphics; + m_pGraphics = NULL; + } +} + +// ----------------------------------------------------------------------- + +void PspSalInfoPrinter::InitPaperFormats( const ImplJobSetup* ) +{ + m_aPaperFormats.clear(); + m_bPapersInit = true; + + if( m_aJobData.m_pParser ) + { + const PPDKey* pKey = m_aJobData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) ); + if( pKey ) + { + int nValues = pKey->countValues(); + for( int i = 0; i < nValues; i++ ) + { + const PPDValue* pValue = pKey->getValue( i ); + int nWidth = 0, nHeight = 0; + m_aJobData.m_pParser->getPaperDimension( pValue->m_aOption, nWidth, nHeight ); + PaperInfo aInfo(PtTo10Mu( nWidth ), PtTo10Mu( nHeight )); + m_aPaperFormats.push_back( aInfo ); + } + } + } +} + +// ----------------------------------------------------------------------- + +int PspSalInfoPrinter::GetLandscapeAngle( const ImplJobSetup* ) +{ + return 900; +} + +// ----------------------------------------------------------------------- + +SalGraphics* PspSalInfoPrinter::GetGraphics() +{ + // return a valid pointer only once + // the reasoning behind this is that we could have different + // SalGraphics that can run in multiple threads + // (future plans) + SalGraphics* pRet = NULL; + if( ! m_pGraphics ) + { + m_pGraphics = new PspGraphics( &m_aJobData, &m_aPrinterGfx, NULL, false, this ); + m_pGraphics->SetLayout( 0 ); + pRet = m_pGraphics; + } + return pRet; +} + +// ----------------------------------------------------------------------- + +void PspSalInfoPrinter::ReleaseGraphics( SalGraphics* pGraphics ) +{ + if( pGraphics == m_pGraphics ) + { + delete pGraphics; + m_pGraphics = NULL; + } + return; +} + +// ----------------------------------------------------------------------- + +BOOL PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup ) +{ + if( ! pFrame || ! pJobSetup ) + return FALSE; + + getPaLib(); + + if( ! pSetupFunction ) + return FALSE; + + PrinterInfoManager& rManager = PrinterInfoManager::get(); + + PrinterInfo aInfo( rManager.getPrinterInfo( pJobSetup->maPrinterName ) ); + if ( pJobSetup->mpDriverData ) + { + SetData( ~0, pJobSetup ); + JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aInfo ); + } + + if( pSetupFunction( aInfo ) ) + { + rtl_freeMemory( pJobSetup->mpDriverData ); + pJobSetup->mpDriverData = NULL; + + int nBytes; + void* pBuffer = NULL; + aInfo.getStreamBuffer( pBuffer, nBytes ); + pJobSetup->mnDriverDataLen = nBytes; + pJobSetup->mpDriverData = (BYTE*)pBuffer; + + // copy everything to job setup + copyJobDataToJobSetup( pJobSetup, aInfo ); + JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, m_aJobData ); + return TRUE; + } + return FALSE; +} + +// ----------------------------------------------------------------------- + +// This function gets the driver data and puts it into pJobSetup +// If pJobSetup->mpDriverData is NOT NULL, then the independend +// data should be merged into the driver data +// If pJobSetup->mpDriverData IS NULL, then the driver defaults +// should be merged into the independent data +BOOL PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup ) +{ + // set/clear backwards compatibility flag + bool bStrictSO52Compatibility = false; + std::hash_map::const_iterator compat_it = + pJobSetup->maValueMap.find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StrictSO52Compatibility" ) ) ); + + if( compat_it != pJobSetup->maValueMap.end() ) + { + if( compat_it->second.equalsIgnoreAsciiCaseAscii( "true" ) ) + bStrictSO52Compatibility = true; + } + m_aPrinterGfx.setStrictSO52Compatibility( bStrictSO52Compatibility ); + + if( pJobSetup->mpDriverData ) + return SetData( ~0, pJobSetup ); + + copyJobDataToJobSetup( pJobSetup, m_aJobData ); + + return TRUE; +} + +// ----------------------------------------------------------------------- + +// This function merges the independ driver data +// and sets the new independ data in pJobSetup +// Only the data must be changed, where the bit +// in nGetDataFlags is set +BOOL PspSalInfoPrinter::SetData( + ULONG nSetDataFlags, + ImplJobSetup* pJobSetup ) +{ + JobData aData; + JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData ); + + if( aData.m_pParser ) + { + const PPDKey* pKey; + const PPDValue* pValue; + + // merge papersize if necessary + if( nSetDataFlags & SAL_JOBSET_PAPERSIZE ) + { + int nWidth, nHeight; + if( pJobSetup->meOrientation == ORIENTATION_PORTRAIT ) + { + nWidth = pJobSetup->mnPaperWidth; + nHeight = pJobSetup->mnPaperHeight; + } + else + { + nWidth = pJobSetup->mnPaperHeight; + nHeight = pJobSetup->mnPaperWidth; + } + String aPaper; + + if( pJobSetup->mePaperFormat == PAPER_USER ) + aPaper = aData.m_pParser->matchPaper( + TenMuToPt( pJobSetup->mnPaperWidth ), + TenMuToPt( pJobSetup->mnPaperHeight ) ); + else + aPaper = rtl::OStringToOUString(PaperInfo::toPSName(pJobSetup->mePaperFormat), RTL_TEXTENCODING_ISO_8859_1); + + pKey = aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) ); + pValue = pKey ? pKey->getValueCaseInsensitive( aPaper ) : NULL; + + // some PPD files do not specify the standard paper names (e.g. C5 instead of EnvC5) + // try to find the correct paper anyway using the size + if( pKey && ! pValue && pJobSetup->mePaperFormat != PAPER_USER ) + { + PaperInfo aInfo( pJobSetup->mePaperFormat ); + aPaper = aData.m_pParser->matchPaper( + TenMuToPt( aInfo.getWidth() ), + TenMuToPt( aInfo.getHeight() ) ); + pValue = pKey->getValueCaseInsensitive( aPaper ); + } + + if( ! ( pKey && pValue && aData.m_aContext.setValue( pKey, pValue, false ) == pValue ) ) + return FALSE; + } + + // merge paperbin if necessary + if( nSetDataFlags & SAL_JOBSET_PAPERBIN ) + { + pKey = aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) ); + if( pKey ) + { + int nPaperBin = pJobSetup->mnPaperBin; + if( nPaperBin >= pKey->countValues() ) + pValue = pKey->getDefaultValue(); + else + pValue = pKey->getValue( pJobSetup->mnPaperBin ); + + // may fail due to constraints; + // real paper bin is copied back to jobsetup in that case + aData.m_aContext.setValue( pKey, pValue ); + } + // if printer has no InputSlot key simply ignore this setting + // (e.g. SGENPRT has no InputSlot) + } + + // merge orientation if necessary + if( nSetDataFlags & SAL_JOBSET_ORIENTATION ) + aData.m_eOrientation = pJobSetup->meOrientation == ORIENTATION_LANDSCAPE ? orientation::Landscape : orientation::Portrait; + + // merge duplex if necessary + if( nSetDataFlags & SAL_JOBSET_DUPLEXMODE ) + { + pKey = aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) ); + if( pKey ) + { + pValue = NULL; + switch( pJobSetup->meDuplexMode ) + { + case DUPLEX_OFF: + pValue = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "None" ) ) ); + if( pValue == NULL ) + pValue = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "SimplexNoTumble" ) ) ); + break; + case DUPLEX_SHORTEDGE: + pValue = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "DuplexTumble" ) ) ); + break; + case DUPLEX_LONGEDGE: + pValue = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "DuplexNoTumble" ) ) ); + break; + case DUPLEX_UNKNOWN: + default: + pValue = 0; + break; + } + if( ! pValue ) + pValue = pKey->getDefaultValue(); + aData.m_aContext.setValue( pKey, pValue ); + } + } + + m_aJobData = aData; + copyJobDataToJobSetup( pJobSetup, aData ); + return TRUE; + } + + return FALSE; +} + +// ----------------------------------------------------------------------- + +void PspSalInfoPrinter::GetPageInfo( + const ImplJobSetup* pJobSetup, + long& rOutWidth, long& rOutHeight, + long& rPageOffX, long& rPageOffY, + long& rPageWidth, long& rPageHeight ) +{ + if( ! pJobSetup ) + return; + + JobData aData; + JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData ); + + // get the selected page size + if( aData.m_pParser ) + { + + String aPaper; + int width, height; + int left = 0, top = 0, right = 0, bottom = 0; + int nDPI = aData.m_aContext.getRenderResolution(); + + + if( aData.m_eOrientation == psp::orientation::Portrait ) + { + aData.m_aContext.getPageSize( aPaper, width, height ); + aData.m_pParser->getMargins( aPaper, left, right, top, bottom ); + } + else + { + aData.m_aContext.getPageSize( aPaper, height, width ); + aData.m_pParser->getMargins( aPaper, top, bottom, right, left ); + } + + rPageWidth = width * nDPI / 72; + rPageHeight = height * nDPI / 72; + rPageOffX = left * nDPI / 72; + rPageOffY = top * nDPI / 72; + rOutWidth = ( width - left - right ) * nDPI / 72; + rOutHeight = ( height - top - bottom ) * nDPI / 72; + } +} + +// ----------------------------------------------------------------------- + +ULONG PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup ) +{ + if( ! pJobSetup ) + return 0; + + JobData aData; + JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData ); + + const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) ): NULL; + return pKey ? pKey->countValues() : 0; +} + +// ----------------------------------------------------------------------- + +String PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, ULONG nPaperBin ) +{ + JobData aData; + JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData ); + + String aRet; + if( aData.m_pParser ) + { + const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) ): NULL; + if( ! pKey || nPaperBin >= (ULONG)pKey->countValues() ) + aRet = aData.m_pParser->getDefaultInputSlot(); + else + { + const PPDValue* pValue = pKey->getValue( nPaperBin ); + if( pValue ) + aRet = aData.m_pParser->translateOption( pKey->getKey(), pValue->m_aOption ); + } + } + + return aRet; +} + +// ----------------------------------------------------------------------- + +ULONG PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, USHORT nType ) +{ + switch( nType ) + { + case PRINTER_CAPABILITIES_SUPPORTDIALOG: + return 1; + case PRINTER_CAPABILITIES_COPIES: + return 0xffff; + case PRINTER_CAPABILITIES_COLLATECOPIES: + { + // see if the PPD contains a value to set Collate to True + JobData aData; + JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData ); + + const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Collate" ) ) ) : NULL; + const PPDValue* pVal = pKey ? pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "True" ) ) ) : NULL; + + // PPDs don't mention the number of possible collated copies. + // so let's guess as many as we want ? + return pVal ? 0xffff : 0; + } + case PRINTER_CAPABILITIES_SETORIENTATION: + return 1; + case PRINTER_CAPABILITIES_SETDUPLEX: + return 1; + case PRINTER_CAPABILITIES_SETPAPERBIN: + return 1; + case PRINTER_CAPABILITIES_SETPAPERSIZE: + return 1; + case PRINTER_CAPABILITIES_SETPAPER: + return 0; + case PRINTER_CAPABILITIES_FAX: + return PrinterInfoManager::get().checkFeatureToken( pJobSetup->maPrinterName, "fax" ) ? 1 : 0; + case PRINTER_CAPABILITIES_PDF: + if( PrinterInfoManager::get().checkFeatureToken( pJobSetup->maPrinterName, "pdf" ) ) + return 1; + else + { + // see if the PPD contains a value to set Collate to True + JobData aData = PrinterInfoManager::get().getPrinterInfo( pJobSetup->maPrinterName ); + if( pJobSetup->mpDriverData ) + JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData ); + return aData.m_nPDFDevice > 0 ? 1 : 0; + } + case PRINTER_CAPABILITIES_EXTERNALDIALOG: + return PrinterInfoManager::get().checkFeatureToken( pJobSetup->maPrinterName, "external_dialog" ) ? 1 : 0; + case PRINTER_CAPABILITIES_USEPULLMODEL: + { + // see if the PPD contains a value to set Collate to True + JobData aData = PrinterInfoManager::get().getPrinterInfo( pJobSetup->maPrinterName ); + if( pJobSetup->mpDriverData ) + JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData ); + return aData.m_nPDFDevice > 0 ? 1 : 0; + } + default: break; + }; + return 0; +} + +// ======================================================================= + +/* + * SalPrinter + */ + + PspSalPrinter::PspSalPrinter( SalInfoPrinter* pInfoPrinter ) + : m_bFax( false ), + m_bPdf( false ), + m_bSwallowFaxNo( false ), + m_bIsPDFWriterJob( false ), + m_pGraphics( NULL ), + m_nCopies( 1 ), + m_bCollate( false ), + m_pInfoPrinter( pInfoPrinter ) +{ +} + +// ----------------------------------------------------------------------- + +PspSalPrinter::~PspSalPrinter() +{ +} + +// ----------------------------------------------------------------------- + +static String getTmpName() +{ + rtl::OUString aTmp, aSys; + osl_createTempFile( NULL, NULL, &aTmp.pData ); + osl_getSystemPathFromFileURL( aTmp.pData, &aSys.pData ); + + return aSys; +} + +BOOL PspSalPrinter::StartJob( + const XubString* pFileName, + const XubString& rJobName, + const XubString& rAppName, + ULONG nCopies, + bool bCollate, + bool bDirect, + ImplJobSetup* pJobSetup ) +{ + vcl_sal::PrinterUpdate::jobStarted(); + + m_bFax = false; + m_bPdf = false; + m_aFileName = pFileName ? *pFileName : String(); + m_aTmpFile = String(); + m_nCopies = nCopies; + m_bCollate = bCollate; + + JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, m_aJobData ); + if( m_nCopies > 1 ) + { + // in case user did not do anything (m_nCopies=1) + // take the default from jobsetup + m_aJobData.m_nCopies = m_nCopies; + m_aJobData.setCollate( bCollate ); + } + + // check wether this printer is configured as fax + int nMode = 0; + const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( m_aJobData.m_aPrinterName ) ); + sal_Int32 nIndex = 0; + while( nIndex != -1 ) + { + OUString aToken( rInfo.m_aFeatures.getToken( 0, ',', nIndex ) ); + if( ! aToken.compareToAscii( "fax", 3 ) ) + { + m_bFax = true; + m_aTmpFile = getTmpName(); + nMode = S_IRUSR | S_IWUSR; + + ::std::hash_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash >::const_iterator it; + it = pJobSetup->maValueMap.find( ::rtl::OUString::createFromAscii( "FAX#" ) ); + if( it != pJobSetup->maValueMap.end() ) + m_aFaxNr = it->second; + + sal_Int32 nPos = 0; + m_bSwallowFaxNo = ! aToken.getToken( 1, '=', nPos ).compareToAscii( "swallow", 7 ) ? true : false; + + break; + } + if( ! aToken.compareToAscii( "pdf=", 4 ) ) + { + m_bPdf = true; + m_aTmpFile = getTmpName(); + nMode = S_IRUSR | S_IWUSR; + + if( ! m_aFileName.Len() ) + { + m_aFileName = getPdfDir( rInfo ); + m_aFileName.Append( '/' ); + m_aFileName.Append( rJobName ); + m_aFileName.AppendAscii( ".pdf" ); + } + break; + } + } + m_aPrinterGfx.Init( m_aJobData ); + + // set/clear backwards compatibility flag + bool bStrictSO52Compatibility = false; + std::hash_map::const_iterator compat_it = + pJobSetup->maValueMap.find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StrictSO52Compatibility" ) ) ); + + if( compat_it != pJobSetup->maValueMap.end() ) + { + if( compat_it->second.equalsIgnoreAsciiCaseAscii( "true" ) ) + bStrictSO52Compatibility = true; + } + m_aPrinterGfx.setStrictSO52Compatibility( bStrictSO52Compatibility ); + + return m_aPrintJob.StartJob( m_aTmpFile.Len() ? m_aTmpFile : m_aFileName, nMode, rJobName, rAppName, m_aJobData, &m_aPrinterGfx, bDirect ) ? TRUE : FALSE; +} + +// ----------------------------------------------------------------------- + +BOOL PspSalPrinter::EndJob() +{ + BOOL bSuccess = FALSE; + if( m_bIsPDFWriterJob ) + bSuccess = TRUE; + else + { + bSuccess = m_aPrintJob.EndJob(); + + if( bSuccess ) + { + // check for fax + if( m_bFax ) + { + + const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( m_aJobData.m_aPrinterName ) ); + // sendAFax removes the file after use + bSuccess = sendAFax( m_aFaxNr, m_aTmpFile, rInfo.m_aCommand ); + } + else if( m_bPdf ) + { + const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( m_aJobData.m_aPrinterName ) ); + bSuccess = createPdf( m_aFileName, m_aTmpFile, rInfo.m_aCommand ); + } + } + } + vcl_sal::PrinterUpdate::jobEnded(); + return bSuccess; +} + +// ----------------------------------------------------------------------- + +BOOL PspSalPrinter::AbortJob() +{ + BOOL bAbort = m_aPrintJob.AbortJob() ? TRUE : FALSE; + vcl_sal::PrinterUpdate::jobEnded(); + return bAbort; +} + +// ----------------------------------------------------------------------- + +SalGraphics* PspSalPrinter::StartPage( ImplJobSetup* pJobSetup, BOOL ) +{ + JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, m_aJobData ); + m_pGraphics = new PspGraphics( &m_aJobData, &m_aPrinterGfx, m_bFax ? &m_aFaxNr : NULL, m_bSwallowFaxNo, m_pInfoPrinter ); + m_pGraphics->SetLayout( 0 ); + if( m_nCopies > 1 ) + { + // in case user did not do anything (m_nCopies=1) + // take the default from jobsetup + m_aJobData.m_nCopies = m_nCopies; + m_aJobData.setCollate( m_nCopies > 1 && m_bCollate ); + } + + m_aPrintJob.StartPage( m_aJobData ); + m_aPrinterGfx.Init( m_aPrintJob ); + + return m_pGraphics; +} + +// ----------------------------------------------------------------------- + +BOOL PspSalPrinter::EndPage() +{ + sal_Bool bResult = m_aPrintJob.EndPage(); + m_aPrinterGfx.Clear(); + return bResult ? TRUE : FALSE; +} + +// ----------------------------------------------------------------------- + +ULONG PspSalPrinter::GetErrorCode() +{ + return 0; +} + +// ----------------------------------------------------------------------- + +struct PDFNewJobParameters +{ + Size maPageSize; + USHORT mnPaperBin; + + PDFNewJobParameters( const Size& i_rSize = Size(), + USHORT i_nPaperBin = 0xffff ) + : maPageSize( i_rSize ), mnPaperBin( i_nPaperBin ) {} + + bool operator!=(const PDFNewJobParameters& rComp ) const + { + Size aCompLSSize( rComp.maPageSize.Height(), rComp.maPageSize.Width() ); + return + (maPageSize != rComp.maPageSize && maPageSize != aCompLSSize) + || mnPaperBin != rComp.mnPaperBin + ; + } + + bool operator==(const PDFNewJobParameters& rComp) const + { + return ! this->operator!=(rComp); + } +}; + +struct PDFPrintFile +{ + rtl::OUString maTmpURL; + PDFNewJobParameters maParameters; + + PDFPrintFile( const rtl::OUString& i_rURL, const PDFNewJobParameters& i_rNewParameters ) + : maTmpURL( i_rURL ) + , maParameters( i_rNewParameters ) {} +}; + +BOOL PspSalPrinter::StartJob( const String* i_pFileName, const String& i_rJobName, const String& i_rAppName, + ImplJobSetup* i_pSetupData, vcl::PrinterController& i_rController ) +{ + OSL_TRACE( "StartJob with controller: pFilename = %s", i_pFileName ? rtl::OUStringToOString( *i_pFileName, RTL_TEXTENCODING_UTF8 ).getStr() : "" ); + // mark for endjob + m_bIsPDFWriterJob = true; + // reset IsLastPage + i_rController.setLastPage( sal_False ); + + // update job data + if( i_pSetupData ) + JobData::constructFromStreamBuffer( i_pSetupData->mpDriverData, i_pSetupData->mnDriverDataLen, m_aJobData ); + + OSL_ASSERT( m_aJobData.m_nPDFDevice > 0 ); + m_aJobData.m_nPDFDevice = 1; + + // possibly create one job for collated output + sal_Bool bSinglePrintJobs = sal_False; + beans::PropertyValue* pSingleValue = i_rController.getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintCollateAsSingleJobs" ) ) ); + if( pSingleValue ) + { + pSingleValue->Value >>= bSinglePrintJobs; + } + + int nCopies = i_rController.getPrinter()->GetCopyCount(); + bool bCollate = i_rController.getPrinter()->IsCollateCopy(); + + // notify start of real print job + i_rController.jobStarted(); + + // setup PDFWriter context + vcl::PDFWriter::PDFWriterContext aContext; + aContext.Version = vcl::PDFWriter::PDF_1_4; + aContext.Tagged = false; + aContext.EmbedStandardFonts = true; + aContext.DocumentLocale = Application::GetSettings().GetLocale(); + + // prepare doc info + aContext.DocumentInfo.Title = i_rJobName; + aContext.DocumentInfo.Creator = i_rAppName; + aContext.DocumentInfo.Producer = i_rAppName; + + // define how we handle metafiles in PDFWriter + vcl::PDFWriter::PlayMetafileContext aMtfContext; + aMtfContext.m_bOnlyLosslessCompression = true; + + boost::shared_ptr pWriter; + std::vector< PDFPrintFile > aPDFFiles; + boost::shared_ptr pPrinter( i_rController.getPrinter() ); + int nAllPages = i_rController.getFilteredPageCount(); + i_rController.createProgressDialog(); + bool bAborted = false; + PDFNewJobParameters aLastParm; + + aContext.DPIx = pPrinter->ImplGetDPIX(); + aContext.DPIy = pPrinter->ImplGetDPIY(); + for( int nPage = 0; nPage < nAllPages && ! bAborted; nPage++ ) + { + if( nPage == nAllPages-1 ) + i_rController.setLastPage( sal_True ); + + // get the page's metafile + GDIMetaFile aPageFile; + vcl::PrinterController::PageSize aPageSize = i_rController.getFilteredPageFile( nPage, aPageFile ); + if( i_rController.isProgressCanceled() ) + { + bAborted = true; + if( nPage != nAllPages-1 ) + { + i_rController.createProgressDialog(); + i_rController.setLastPage( sal_True ); + i_rController.getFilteredPageFile( nPage, aPageFile ); + } + } + else + { + pPrinter->SetMapMode( MapMode( MAP_100TH_MM ) ); + pPrinter->SetPaperSizeUser( aPageSize.aSize, true ); + PDFNewJobParameters aNewParm( pPrinter->GetPaperSize(), pPrinter->GetPaperBin() ); + + // create PDF writer on demand + // either on first page + // or on paper format change - cups does not support multiple paper formats per job (yet?) + // so we need to start a new job to get a new paper format from the printer + // orientation switches (that is switch of height and width) is handled transparently by CUPS + if( ! pWriter || + (aNewParm != aLastParm && ! i_pFileName ) ) + { + if( pWriter ) + { + pWriter->Emit(); + } + // produce PDF file + OUString aPDFUrl; + if( i_pFileName ) + aPDFUrl = *i_pFileName; + else + osl_createTempFile( NULL, NULL, &aPDFUrl.pData ); + // normalize to file URL + if( aPDFUrl.compareToAscii( "file:", 5 ) != 0 ) + { + // this is not a file URL, but it should + // form it into a osl friendly file URL + rtl::OUString aTmp; + osl_getFileURLFromSystemPath( aPDFUrl.pData, &aTmp.pData ); + aPDFUrl = aTmp; + } + // save current file and paper format + aLastParm = aNewParm; + aPDFFiles.push_back( PDFPrintFile( aPDFUrl, aNewParm ) ); + // update context + aContext.URL = aPDFUrl; + + // create and initialize PDFWriter + #if defined __SUNPRO_CC + #pragma disable_warn + #endif + pWriter.reset( new vcl::PDFWriter( aContext, uno::Reference< beans::XMaterialHolder >() ) ); + #if defined __SUNPRO_CC + #pragma enable_warn + #endif + } + + pWriter->NewPage( TenMuToPt( aNewParm.maPageSize.Width() ), + TenMuToPt( aNewParm.maPageSize.Height() ), + vcl::PDFWriter::Portrait ); + + pWriter->PlayMetafile( aPageFile, aMtfContext, NULL ); + } + } + + // emit the last file + if( pWriter ) + pWriter->Emit(); + + // handle collate, copy count and multiple jobs correctly + int nOuterJobs = 1; + if( bSinglePrintJobs ) + { + nOuterJobs = nCopies; + m_aJobData.m_nCopies = 1; + } + else + { + if( bCollate ) + { + if( aPDFFiles.size() == 1 && pPrinter->HasSupport( SUPPORT_COLLATECOPY ) ) + { + m_aJobData.setCollate( true ); + m_aJobData.m_nCopies = nCopies; + } + else + { + nOuterJobs = nCopies; + m_aJobData.m_nCopies = 1; + } + } + else + { + m_aJobData.setCollate( false ); + m_aJobData.m_nCopies = nCopies; + } + } + + // spool files + if( ! i_pFileName && ! bAborted ) + { + bool bFirstJob = true; + for( int nCurJob = 0; nCurJob < nOuterJobs; nCurJob++ ) + { + for( size_t i = 0; i < aPDFFiles.size(); i++ ) + { + oslFileHandle pFile = NULL; + osl_openFile( aPDFFiles[i].maTmpURL.pData, &pFile, osl_File_OpenFlag_Read ); + if( pFile ) + { + osl_setFilePos( pFile, osl_Pos_Absolut, 0 ); + std::vector< char > buffer( 0x10000, 0 ); + // update job data with current page size + Size aPageSize( aPDFFiles[i].maParameters.maPageSize ); + m_aJobData.setPaper( TenMuToPt( aPageSize.Width() ), TenMuToPt( aPageSize.Height() ) ); + // update job data with current paperbin + m_aJobData.setPaperBin( aPDFFiles[i].maParameters.mnPaperBin ); + + // spool current file + FILE* fp = PrinterInfoManager::get().startSpool( pPrinter->GetName(), i_rController.isDirectPrint() ); + if( fp ) + { + sal_uInt64 nBytesRead = 0; + do + { + osl_readFile( pFile, &buffer[0], buffer.size(), &nBytesRead ); + if( nBytesRead > 0 ) + fwrite( &buffer[0], 1, nBytesRead, fp ); + } while( nBytesRead == buffer.size() ); + rtl::OUStringBuffer aBuf( i_rJobName.Len() + 8 ); + aBuf.append( i_rJobName ); + if( i > 0 || nCurJob > 0 ) + { + aBuf.append( sal_Unicode(' ') ); + aBuf.append( sal_Int32( i + nCurJob * aPDFFiles.size() ) ); + } + PrinterInfoManager::get().endSpool( pPrinter->GetName(), aBuf.makeStringAndClear(), fp, m_aJobData, bFirstJob ); + bFirstJob = false; + } + } + osl_closeFile( pFile ); + } + } + } + + // job has been spooled + i_rController.setJobState( bAborted ? view::PrintableState_JOB_ABORTED : view::PrintableState_JOB_SPOOLED ); + + // clean up the temporary PDF files + if( ! i_pFileName || bAborted ) + { + for( size_t i = 0; i < aPDFFiles.size(); i++ ) + { + osl_removeFile( aPDFFiles[i].maTmpURL.pData ); + OSL_TRACE( "removed print PDF file %s\n", rtl::OUStringToOString( aPDFFiles[i].maTmpURL, RTL_TEXTENCODING_UTF8 ).getStr() ); + } + } + + return TRUE; +} + + + +/* + * vcl::PrinterUpdate + */ + +Timer* vcl_sal::PrinterUpdate::pPrinterUpdateTimer = NULL; +int vcl_sal::PrinterUpdate::nActiveJobs = 0; + +void vcl_sal::PrinterUpdate::doUpdate() +{ + ::psp::PrinterInfoManager& rManager( ::psp::PrinterInfoManager::get() ); + if( rManager.checkPrintersChanged( false ) ) + { + SalDisplay* pDisp = GetX11SalData()->GetDisplay(); + const std::list< SalFrame* >& rList = pDisp->getFrames(); + for( std::list< SalFrame* >::const_iterator it = rList.begin(); + it != rList.end(); ++it ) + pDisp->SendInternalEvent( *it, NULL, SALEVENT_PRINTERCHANGED ); + } +} + +// ----------------------------------------------------------------------- + +IMPL_STATIC_LINK_NOINSTANCE( vcl_sal::PrinterUpdate, UpdateTimerHdl, void*, EMPTYARG ) +{ + if( nActiveJobs < 1 ) + { + doUpdate(); + delete pPrinterUpdateTimer; + pPrinterUpdateTimer = NULL; + } + else + pPrinterUpdateTimer->Start(); + + return 0; +} + +// ----------------------------------------------------------------------- + +void vcl_sal::PrinterUpdate::update() +{ + if( Application::GetSettings().GetMiscSettings().GetDisablePrinting() ) + return; + + if( ! static_cast< X11SalInstance* >(GetSalData()->m_pInstance)->isPrinterInit() ) + { + // #i45389# start background printer detection + psp::PrinterInfoManager::get(); + return; + } + + if( nActiveJobs < 1 ) + doUpdate(); + else if( ! pPrinterUpdateTimer ) + { + pPrinterUpdateTimer = new Timer(); + pPrinterUpdateTimer->SetTimeout( 500 ); + pPrinterUpdateTimer->SetTimeoutHdl( STATIC_LINK( NULL, vcl_sal::PrinterUpdate, UpdateTimerHdl ) ); + pPrinterUpdateTimer->Start(); + } +} + +// ----------------------------------------------------------------------- + +void vcl_sal::PrinterUpdate::jobEnded() +{ + nActiveJobs--; + if( nActiveJobs < 1 ) + { + if( pPrinterUpdateTimer ) + { + pPrinterUpdateTimer->Stop(); + delete pPrinterUpdateTimer; + pPrinterUpdateTimer = NULL; + doUpdate(); + } + } +} diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx new file mode 100644 index 000000000000..79b8f9d6f04b --- /dev/null +++ b/vcl/unx/generic/gdi/salvd.cxx @@ -0,0 +1,274 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +// -=-= SalInstance =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +SalVirtualDevice* X11SalInstance::CreateVirtualDevice( SalGraphics* pGraphics, + long nDX, long nDY, + USHORT nBitCount, const SystemGraphicsData *pData ) +{ + X11SalVirtualDevice *pVDev = new X11SalVirtualDevice(); + if( !nBitCount && pGraphics ) + nBitCount = pGraphics->GetBitCount(); + + if( pData && pData->hDrawable != None ) + { + XLIB_Window aRoot; + int x, y; + unsigned int w = 0, h = 0, bw, d; + Display* pDisp = GetX11SalData()->GetDisplay()->GetDisplay(); + XGetGeometry( pDisp, pData->hDrawable, + &aRoot, &x, &y, &w, &h, &bw, &d ); + int nScreen = 0; + while( nScreen < ScreenCount( pDisp ) ) + { + if( RootWindow( pDisp, nScreen ) == aRoot ) + break; + nScreen++; + } + nDX = (long)w; + nDY = (long)h; + if( !pVDev->Init( GetX11SalData()->GetDisplay(), nDX, nDY, nBitCount, nScreen, pData->hDrawable, pData->pRenderFormat ) ) + { + delete pVDev; + return NULL; + } + } + else if( !pVDev->Init( GetX11SalData()->GetDisplay(), nDX, nDY, nBitCount, + pGraphics ? static_cast(pGraphics)->GetScreenNumber() : + GetX11SalData()->GetDisplay()->GetDefaultScreenNumber() ) ) + { + delete pVDev; + return NULL; + } + + pVDev->InitGraphics( pVDev ); + return pVDev; +} + +void X11SalInstance::DestroyVirtualDevice( SalVirtualDevice* pDevice ) +{ + delete pDevice; +} + +// -=-= SalGraphicsData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalGraphics::Init( X11SalVirtualDevice *pDevice, SalColormap* pColormap, bool bDeleteColormap ) +{ + SalColormap *pOrigDeleteColormap = m_pDeleteColormap; + + SalDisplay *pDisplay = pDevice->GetDisplay(); + m_nScreen = pDevice->GetScreenNumber(); + + int nVisualDepth = pDisplay->GetColormap( m_nScreen ).GetVisual().GetDepth(); + int nDeviceDepth = pDevice->GetDepth(); + + if( pColormap ) + { + m_pColormap = pColormap; + if( bDeleteColormap ) + m_pDeleteColormap = pColormap; + } + else + if( nDeviceDepth == nVisualDepth ) + m_pColormap = &pDisplay->GetColormap( m_nScreen ); + else + if( nDeviceDepth == 1 ) + m_pColormap = m_pDeleteColormap = new SalColormap(); + + if (m_pDeleteColormap != pOrigDeleteColormap) + delete pOrigDeleteColormap; + + const Drawable aVdevDrawable = pDevice->GetDrawable(); + SetDrawable( aVdevDrawable, m_nScreen ); + + m_pVDev = pDevice; + m_pFrame = NULL; + + bWindow_ = pDisplay->IsDisplay(); + bVirDev_ = TRUE; +} + +// -=-= SalVirDevData / SalVirtualDevice -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +BOOL X11SalVirtualDevice::Init( SalDisplay *pDisplay, + long nDX, long nDY, + USHORT nBitCount, + int nScreen, + Pixmap hDrawable, + void* pRenderFormatVoid ) +{ + SalColormap* pColormap = NULL; + bool bDeleteColormap = false; + + pDisplay_ = pDisplay; + pGraphics_ = new X11SalGraphics(); + m_nScreen = nScreen; + if( pRenderFormatVoid ) { + XRenderPictFormat *pRenderFormat = ( XRenderPictFormat* )pRenderFormatVoid; + pGraphics_->SetXRenderFormat( pRenderFormat ); + if( pRenderFormat->colormap ) + pColormap = new SalColormap( pDisplay, pRenderFormat->colormap, m_nScreen ); + else + pColormap = new SalColormap( nBitCount ); + bDeleteColormap = true; + } + else if( nBitCount != pDisplay->GetVisual( m_nScreen ).GetDepth() ) + { + pColormap = new SalColormap( nBitCount ); + bDeleteColormap = true; + } + pGraphics_->SetLayout( 0 ); // by default no! mirroring for VirtualDevices, can be enabled with EnableRTL() + nDX_ = nDX; + nDY_ = nDY; + nDepth_ = nBitCount; + + if( hDrawable == None ) + hDrawable_ = XCreatePixmap( GetXDisplay(), + pDisplay_->GetDrawable( m_nScreen ), + nDX_, nDY_, + GetDepth() ); + else + { + hDrawable_ = hDrawable; + bExternPixmap_ = TRUE; + } + + pGraphics_->Init( this, pColormap, bDeleteColormap ); + + return hDrawable_ != None ? TRUE : FALSE; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +X11SalVirtualDevice::X11SalVirtualDevice() +{ + pDisplay_ = (SalDisplay*)ILLEGAL_POINTER; + pGraphics_ = NULL; + hDrawable_ = None; + nDX_ = 0; + nDY_ = 0; + nDepth_ = 0; + bGraphics_ = FALSE; + bExternPixmap_ = FALSE; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +X11SalVirtualDevice::~X11SalVirtualDevice() +{ + if( pGraphics_ ) + delete pGraphics_; + pGraphics_ = NULL; + + if( GetDrawable() && !bExternPixmap_ ) + XFreePixmap( GetXDisplay(), GetDrawable() ); +} + +SalGraphics* X11SalVirtualDevice::GetGraphics() +{ + if( bGraphics_ ) + return NULL; + + if( pGraphics_ ) + bGraphics_ = TRUE; + + return pGraphics_; +} + +void X11SalVirtualDevice::ReleaseGraphics( SalGraphics* ) +{ bGraphics_ = FALSE; } + +BOOL X11SalVirtualDevice::SetSize( long nDX, long nDY ) +{ + if( bExternPixmap_ ) + return FALSE; + + // #144688# + // the X protocol request CreatePixmap puts an upper bound + // of 16 bit to the size. Beyond that there may be implementation + // limits of the Xserver; which we should catch by a failed XCreatePixmap + // call. However extra large values should be caught here since we'd run into + // 16 bit truncation here without noticing. + if( nDX < 0 || nDX > 65535 || + nDY < 0 || nDY > 65535 ) + return FALSE; + + if( !nDX ) nDX = 1; + if( !nDY ) nDY = 1; + + Pixmap h = XCreatePixmap( GetXDisplay(), + pDisplay_->GetDrawable( m_nScreen ), + nDX, nDY, nDepth_ ); + + if( !h ) + { + if( !GetDrawable() ) + { + hDrawable_ = XCreatePixmap( GetXDisplay(), + pDisplay_->GetDrawable( m_nScreen ), + 1, 1, nDepth_ ); + nDX_ = 1; + nDY_ = 1; + } + return FALSE; + } + + if( GetDrawable() ) + XFreePixmap( GetXDisplay(), GetDrawable() ); + hDrawable_ = h; + + nDX_ = nDX; + nDY_ = nDY; + + if( pGraphics_ ) + InitGraphics( this ); + + return TRUE; +} + +void X11SalVirtualDevice::GetSize( long& rWidth, long& rHeight ) +{ + rWidth = GetWidth(); + rHeight = GetHeight(); +} + diff --git a/vcl/unx/generic/gdi/xrender_peer.cxx b/vcl/unx/generic/gdi/xrender_peer.cxx new file mode 100644 index 000000000000..32e656bcbf5f --- /dev/null +++ b/vcl/unx/generic/gdi/xrender_peer.cxx @@ -0,0 +1,247 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include + +#include +#include + +#include +#include +#include + +#include + +using namespace rtl; + +// --------------------------------------------------------------------------- + +XRenderPeer::XRenderPeer() +: mpDisplay( GetX11SalData()->GetDisplay()->GetDisplay() ), + mpStandardFormatA8( NULL ), + mnRenderVersion( 0 ), + mpRenderLib( NULL ) +#ifndef XRENDER_LINK +, mpXRenderCompositeTrapezoids( NULL ) +, mpXRenderAddTraps( NULL ) +#endif // XRENDER_LINK +{ + InitRenderLib(); +} + +// --------------------------------------------------------------------------- + +XRenderPeer::~XRenderPeer() +{ + osl_unloadModule( mpRenderLib ); +} + +// --------------------------------------------------------------------------- + +XRenderPeer& XRenderPeer::GetInstance() +{ + static XRenderPeer aPeer; + return aPeer; +} + +// --------------------------------------------------------------------------- + +void XRenderPeer::InitRenderLib() +{ + int nDummy; + if( !XQueryExtension( mpDisplay, "RENDER", &nDummy, &nDummy, &nDummy ) ) + return; + +#ifndef XRENDER_LINK + // we don't know if we are running on a system with xrender library + // we don't want to install system libraries ourselves + // => load them dynamically when they are there + const OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libXrender.so.1" )); + mpRenderLib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_DEFAULT ); + if( !mpRenderLib ) { +#ifdef DEBUG + fprintf( stderr, "Display can do XRender, but no %s installed.\n" + "Please install for improved display performance\n", OUStringToOString( aLibName.getStr(), + osl_getThreadTextEncoding() ).getStr() ); +#endif + return; + } + + oslGenericFunction pFunc; + pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderQueryExtension" ); + if( !pFunc ) return; + mpXRenderQueryExtension = (Bool(*)(Display*,int*,int*))pFunc; + + pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderQueryVersion" ); + if( !pFunc ) return; + mpXRenderQueryVersion = (void(*)(Display*,int*,int*))pFunc; + + pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderFindVisualFormat" ); + if( !pFunc ) return; + mpXRenderFindVisualFormat = (XRenderPictFormat*(*)(Display*,Visual*))pFunc; + + pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderFindStandardFormat" ); + if( !pFunc ) return; + mpXRenderFindStandardFormat = (XRenderPictFormat*(*)(Display*,int))pFunc; + + pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderFindFormat" ); + if( !pFunc ) return; + mpXRenderFindFormat = (XRenderPictFormat*(*)(Display*,unsigned long, + const XRenderPictFormat*,int))pFunc; + + pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderCreateGlyphSet" ); + if( !pFunc ) return; + mpXRenderCreateGlyphSet = (GlyphSet(*)(Display*,const XRenderPictFormat*))pFunc; + + pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderFreeGlyphSet" ); + if( !pFunc ) return; + mpXRenderFreeGlyphSet = (void(*)(Display*,GlyphSet))pFunc; + + pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderAddGlyphs" ); + if( !pFunc ) return; + mpXRenderAddGlyphs = (void(*)(Display*,GlyphSet,Glyph*,const XGlyphInfo*, + int,const char*,int))pFunc; + + pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderFreeGlyphs" ); + if( !pFunc ) return; + mpXRenderFreeGlyphs = (void(*)(Display*,GlyphSet,Glyph*,int))pFunc; + + pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderCompositeString32" ); + if( !pFunc ) return; + mpXRenderCompositeString32 = (void(*)(Display*,int,Picture,Picture, + const XRenderPictFormat*,GlyphSet,int,int,int,int,const unsigned*,int))pFunc; + + pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderCreatePicture" ); + if( !pFunc ) return; + mpXRenderCreatePicture = (Picture(*)(Display*,Drawable,const XRenderPictFormat*, + unsigned long,const XRenderPictureAttributes*))pFunc; + + pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderChangePicture" ); + if( !pFunc ) return; + mpXRenderChangePicture = (void(*)(Display*,Picture,unsigned long,const XRenderPictureAttributes*))pFunc; + + pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderSetPictureClipRegion" ); + if( !pFunc ) return; + mpXRenderSetPictureClipRegion = (void(*)(Display*,Picture,XLIB_Region))pFunc; + + pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderFreePicture" ); + if( !pFunc ) return; + mpXRenderFreePicture = (void(*)(Display*,Picture))pFunc; + + pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderComposite" ); + if( !pFunc ) return; + mpXRenderComposite = (void(*)(Display*,int,Picture,Picture,Picture, + int,int,int,int,int,int,unsigned,unsigned))pFunc; + + pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderFillRectangle" ); + if( !pFunc ) return; + mpXRenderFillRectangle = (void(*)(Display*,int,Picture,const XRenderColor*, + int,int,unsigned int,unsigned int))pFunc; + + pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderCompositeTrapezoids" ); +#if 0 // not having trapezoid support is supported + if( !pFunc ) return; +#endif + mpXRenderCompositeTrapezoids = (void(*)(Display*,int,Picture,Picture, + const XRenderPictFormat*,int,int,const XTrapezoid*,int))pFunc; + + pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderAddTraps" ); +#if 0 // not having trapezoid support is supported + if( !pFunc ) return; +#endif + mpXRenderAddTraps = (void(*)(Display*,Picture,int,int,const _XTrap*,int))pFunc; + +#endif // XRENDER_LINK + + // needed to initialize libXrender internals, we already know its there +#ifdef XRENDER_LINK + XRenderQueryExtension( mpDisplay, &nDummy, &nDummy ); +#else + (*mpXRenderQueryExtension)( mpDisplay, &nDummy, &nDummy ); +#endif + + int nMajor, nMinor; +#ifdef XRENDER_LINK + XRenderQueryVersion( mpDisplay, &nMajor, &nMinor ); +#else + (*mpXRenderQueryVersion)( mpDisplay, &nMajor, &nMinor ); +#endif + mnRenderVersion = 16*nMajor + nMinor; + + // the 8bit alpha mask format must be there + XRenderPictFormat aPictFormat={0,0,8,{0,0,0,0,0,0,0,0xFF},0}; + mpStandardFormatA8 = FindPictureFormat( PictFormatAlphaMask|PictFormatDepth, aPictFormat ); +} + +// --------------------------------------------------------------------------- + +// return mask of screens capable of XRENDER text +sal_uInt32 XRenderPeer::InitRenderText() +{ + if( mnRenderVersion < 0x01 ) + return 0; + + // #93033# disable XRENDER for old RENDER versions if XINERAMA is present + int nDummy; + if( XQueryExtension( mpDisplay, "XINERAMA", &nDummy, &nDummy, &nDummy ) ) + if( mnRenderVersion < 0x02 ) + return 0; + + if( !mpStandardFormatA8 ) + return 0; + + // and the visual must be supported too on at least one screen + sal_uInt32 nRetMask = 0; + SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); + const int nScreenCount = pSalDisp->GetScreenCount(); + XRenderPictFormat* pVisualFormat = NULL; + int nMaxDepth = 0; + for( int nScreen = 0; nScreen < nScreenCount; ++nScreen ) + { + Visual* pXVisual = pSalDisp->GetVisual( nScreen ).GetVisual(); + pVisualFormat = FindVisualFormat( pXVisual ); + if( pVisualFormat != NULL ) + { + int nVDepth = pSalDisp->GetVisual( nScreen ).GetDepth(); + if( nVDepth > nMaxDepth ) + nMaxDepth = nVDepth; + nRetMask |= 1U << nScreen; + } + } + + // #97763# disable XRENDER on <15bit displays for XFree<=4.2.0 + if( mnRenderVersion <= 0x02 ) + if( nMaxDepth < 15 ) + nRetMask = 0; + + return nRetMask; +} + +// --------------------------------------------------------------------------- diff --git a/vcl/unx/generic/gdi/xrender_peer.hxx b/vcl/unx/generic/gdi/xrender_peer.hxx new file mode 100644 index 000000000000..89dccfcef40b --- /dev/null +++ b/vcl/unx/generic/gdi/xrender_peer.hxx @@ -0,0 +1,387 @@ +/************************************************************************* + * + * 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 _SV_XRENDER_PEER_HXX +#define _SV_XRENDER_PEER_HXX + +#include +struct _XTrap; // on some older systems this is not declared within Xrender.h +#include +#include + +#include +#include + +class XRenderPeer +{ +public: + static XRenderPeer& GetInstance(); + int GetVersion() const; + + sal_uInt32 InitRenderText(); + +protected: + XRenderPeer(); + ~XRenderPeer(); + void InitRenderLib(); + + Display* mpDisplay; + XRenderPictFormat* mpStandardFormatA8; + int mnRenderVersion; + oslModule mpRenderLib; + +public: + XRenderPictFormat* GetStandardFormatA8() const; + XRenderPictFormat* FindStandardFormat(int nFormat) const; + + // the methods below are thin wrappers for the XRENDER API + XRenderPictFormat* FindVisualFormat( Visual* ) const; + XRenderPictFormat* FindPictureFormat( unsigned long nMask, + const XRenderPictFormat& ) const; + Picture CreatePicture( Drawable, const XRenderPictFormat*, + unsigned long nDrawable, const XRenderPictureAttributes* ) const; + void ChangePicture( Picture, unsigned long nValueMask, + const XRenderPictureAttributes* ) const; + void SetPictureClipRegion( Picture, XLIB_Region ) const; + void CompositePicture( int nOp, Picture aSrc, Picture aMask, Picture aDst, + int nXSrc, int nYSrc, int nXMask, int nYMask, + int nXDst, int nYDst, unsigned nWidth, unsigned nHeight ) const; + void FreePicture( Picture ) const; + + GlyphSet CreateGlyphSet() const; + void FreeGlyphSet( GlyphSet ) const; + void AddGlyph( GlyphSet, Glyph nGlyphId, const XGlyphInfo&, + const char* pBuffer, int nBufSize ) const; + void FreeGlyph( GlyphSet, Glyph nGlyphId ) const; + void CompositeString32( Picture aSrc, Picture aDst, GlyphSet, + int nDstX, int nDstY, const unsigned* pText, int nTextLen ) const; + void FillRectangle( int nOp, Picture aDst, const XRenderColor*, + int nX, int nY, unsigned nW, unsigned nH ) const; + void CompositeTrapezoids( int nOp, Picture aSrc, Picture aDst, + const XRenderPictFormat*, int nXSrc, int nYSrc, + const XTrapezoid*, int nCount ) const; + bool AddTraps( Picture aDst, int nXOfs, int nYOfs, + const _XTrap*, int nCount ) const; + + bool AreTrapezoidsSupported() const +#ifdef XRENDER_LINK + { return true; } +#else + { return mpXRenderCompositeTrapezoids!=NULL; } + +private: + XRenderPictFormat* (*mpXRenderFindFormat)(Display*,unsigned long, + const XRenderPictFormat*,int); + XRenderPictFormat* (*mpXRenderFindVisualFormat)(Display*,Visual*); + XRenderPictFormat* (*mpXRenderFindStandardFormat)(Display*,int); + Bool (*mpXRenderQueryExtension)(Display*,int*,int*); + void (*mpXRenderQueryVersion)(Display*,int*,int*); + + Picture (*mpXRenderCreatePicture)(Display*,Drawable, const XRenderPictFormat*, + unsigned long,const XRenderPictureAttributes*); + void (*mpXRenderChangePicture)(Display*,Picture, + unsigned long,const XRenderPictureAttributes*); + void (*mpXRenderSetPictureClipRegion)(Display*,Picture,XLIB_Region); + void (*mpXRenderFreePicture)(Display*,Picture); + void (*mpXRenderComposite)(Display*,int,Picture,Picture,Picture, + int,int,int,int,int,int,unsigned,unsigned); + + GlyphSet (*mpXRenderCreateGlyphSet)(Display*, const XRenderPictFormat*); + void (*mpXRenderFreeGlyphSet)(Display*,GlyphSet); + void (*mpXRenderAddGlyphs)(Display*,GlyphSet,Glyph*, + const XGlyphInfo*,int,const char*,int); + void (*mpXRenderFreeGlyphs)(Display*,GlyphSet,Glyph*,int); + void (*mpXRenderCompositeString32)(Display*,int,Picture,Picture, + const XRenderPictFormat*,GlyphSet,int,int,int,int,const unsigned*,int); + void (*mpXRenderFillRectangle)(Display*,int,Picture, + const XRenderColor*,int,int,unsigned int,unsigned int); + void (*mpXRenderCompositeTrapezoids)(Display*,int,Picture,Picture, + const XRenderPictFormat*,int,int,const XTrapezoid*,int); + void (*mpXRenderAddTraps)(Display*,Picture,int,int,const _XTrap*,int); +#endif // XRENDER_LINK +}; + +//===================================================================== + +class ScopedPic +{ +public: + ScopedPic( XRenderPeer& rPeer, Picture& rPic ); + ~ScopedPic(); + Picture& Get(); + +private: + XRenderPeer& mrRenderPeer; + Picture maPicture; + +private: // prevent copy and assignmet + ScopedPic( const ScopedPic& ); + void operator=( const ScopedPic& ); +}; + +//===================================================================== + +inline int XRenderPeer::GetVersion() const +{ + return mnRenderVersion; +} + +inline XRenderPictFormat* XRenderPeer::GetStandardFormatA8() const +{ + return mpStandardFormatA8; +} + +inline XRenderPictFormat* XRenderPeer::FindStandardFormat(int nFormat) const +{ +#ifdef XRENDER_LINK + return XRenderFindStandardFormat(mpDisplay, nFormat); +#else + return (*mpXRenderFindStandardFormat)(mpDisplay, nFormat); +#endif +} + +inline XRenderPictFormat* XRenderPeer::FindVisualFormat( Visual* pVisual ) const +{ +#ifdef XRENDER_LINK + return XRenderFindVisualFormat ( mpDisplay, pVisual ); +#else + return (*mpXRenderFindVisualFormat)( mpDisplay, pVisual ); +#endif +} + +inline XRenderPictFormat* XRenderPeer::FindPictureFormat( unsigned long nFormatMask, + const XRenderPictFormat& rFormatAttr ) const +{ +#ifdef XRENDER_LINK + return XRenderFindFormat( mpDisplay, nFormatMask, &rFormatAttr, 0 ); +#else + return (*mpXRenderFindFormat)( mpDisplay, nFormatMask, &rFormatAttr, 0 ); +#endif +} + +inline Picture XRenderPeer::CreatePicture( Drawable aDrawable, + const XRenderPictFormat* pVisFormat, unsigned long nValueMask, + const XRenderPictureAttributes* pRenderAttr ) const +{ +#ifdef XRENDER_LINK + return XRenderCreatePicture( mpDisplay, aDrawable, pVisFormat, + nValueMask, pRenderAttr ); +#else + return (*mpXRenderCreatePicture)( mpDisplay, aDrawable, pVisFormat, + nValueMask, pRenderAttr ); +#endif +} + +inline void XRenderPeer::ChangePicture( Picture aPicture, + unsigned long nValueMask, const XRenderPictureAttributes* pRenderAttr ) const +{ +#ifdef XRENDER_LINK + XRenderChangePicture( mpDisplay, aPicture, nValueMask, pRenderAttr ); +#else + (*mpXRenderChangePicture)( mpDisplay, aPicture, nValueMask, pRenderAttr ); +#endif +} + +inline void XRenderPeer::SetPictureClipRegion( Picture aPicture, + XLIB_Region aXlibRegion ) const +{ +#ifdef XRENDER_LINK + XRenderSetPictureClipRegion( mpDisplay, aPicture, aXlibRegion ); +#else + (*mpXRenderSetPictureClipRegion)( mpDisplay, aPicture, aXlibRegion ); +#endif +} + +inline void XRenderPeer::CompositePicture( int nXRenderOp, + Picture aSrcPic, Picture aMaskPic, Picture aDstPic, + int nSrcX, int nSrcY, int nMaskX, int nMaskY, int nDstX, int nDstY, + unsigned nWidth, unsigned nHeight ) const +{ +#ifdef XRENDER_LINK + XRenderComposite( mpDisplay, nXRenderOp, aSrcPic, aMaskPic, aDstPic, + nSrcX, nSrcY, nMaskX, nMaskY, nDstX, nDstY, nWidth, nHeight ); +#else + (*mpXRenderComposite)( mpDisplay, nXRenderOp, aSrcPic, aMaskPic, aDstPic, + nSrcX, nSrcY, nMaskX, nMaskY, nDstX, nDstY, nWidth, nHeight ); +#endif +} + +inline void XRenderPeer::FreePicture( Picture aPicture ) const +{ +#ifdef XRENDER_LINK + XRenderFreePicture( mpDisplay, aPicture ); +#else + (*mpXRenderFreePicture)( mpDisplay, aPicture ); +#endif +} + +inline GlyphSet XRenderPeer::CreateGlyphSet() const +{ +#ifdef XRENDER_LINK + return XRenderCreateGlyphSet( mpDisplay, mpStandardFormatA8 ); +#else + return (*mpXRenderCreateGlyphSet)( mpDisplay, mpStandardFormatA8 ); +#endif +} + +inline void XRenderPeer::FreeGlyphSet( GlyphSet aGS ) const +{ +#ifdef XRENDER_LINK + XRenderFreeGlyphSet( mpDisplay, aGS ); +#else + (*mpXRenderFreeGlyphSet)( mpDisplay, aGS ); +#endif +} + +inline void XRenderPeer::AddGlyph( GlyphSet aGS, Glyph nGlyphId, + const XGlyphInfo& rGI, const char* pBuffer, int nBufSize ) const +{ +#ifdef XRENDER_LINK + XRenderAddGlyphs( mpDisplay, aGS, &nGlyphId, &rGI, 1, + const_cast(pBuffer), nBufSize ); +#else + (*mpXRenderAddGlyphs)( mpDisplay, aGS, &nGlyphId, &rGI, 1, + const_cast(pBuffer), nBufSize ); +#endif +} + +inline void XRenderPeer::FreeGlyph( GlyphSet aGS, Glyph nGlyphId ) const +{ + (void)aGS; (void)nGlyphId; + + // XRenderFreeGlyphs not implemented yet for version<=0.2 + // #108209# disabled because of crash potential, + // the glyph leak is not too bad because they will + // be cleaned up when the glyphset is released +#if 0 // TODO: reenable when it works without problems + if( mnRenderVersion >= 0x05 ) + { +#ifdef XRENDER_LINK + XRenderFreeGlyphs( mpDisplay, aGS, &nGlyphId, 1 ); +#else + (*mpXRenderFreeGlyphs)( mpDisplay, aGS, &nGlyphId, 1 ); +#endif + } +#endif +} + +inline void XRenderPeer::CompositeString32( Picture aSrc, Picture aDst, + GlyphSet aGlyphSet, int nDstX, int nDstY, + const unsigned* pText, int nTextLen ) const +{ +#ifdef XRENDER_LINK + XRenderCompositeString32( mpDisplay, PictOpOver, aSrc, aDst, NULL, + aGlyphSet, 0, 0, nDstX, nDstY, pText, nTextLen ); +#else + (*mpXRenderCompositeString32)( mpDisplay, PictOpOver, aSrc, aDst, NULL, + aGlyphSet, 0, 0, nDstX, nDstY, pText, nTextLen ); +#endif +} + +inline void XRenderPeer::FillRectangle( int a, Picture b, const XRenderColor* c, + int d, int e, unsigned int f, unsigned int g) const +{ +#ifdef XRENDER_LINK + XRenderFillRectangle( mpDisplay, a, b, c, d, e, f, g ); +#else + (*mpXRenderFillRectangle)( mpDisplay, a, b, c, d, e, f, g ); +#endif +} + + +inline void XRenderPeer::CompositeTrapezoids( int nOp, + Picture aSrc, Picture aDst, const XRenderPictFormat* pXRPF, + int nXSrc, int nYSrc, const XTrapezoid* pXT, int nCount ) const +{ +#ifdef XRENDER_LINK + XRenderCompositeTrapezoids( mpDisplay, nOp, aSrc, aDst, pXRPF, + nXSrc, nYSrc, pXT, nCount ); +#else + (*mpXRenderCompositeTrapezoids)( mpDisplay, nOp, aSrc, aDst, pXRPF, + nXSrc, nYSrc, pXT, nCount ); +#endif +} + +inline bool XRenderPeer::AddTraps( Picture aDst, int nXOfs, int nYOfs, + const _XTrap* pTraps, int nCount ) const +{ +#ifdef XRENDER_LINK + XRenderAddTraps( mpDisplay, aDst, nXOfs, nYOfs, pTraps, nCount ); +#else + if( !mpXRenderAddTraps ) + return false; + (*mpXRenderAddTraps)( mpDisplay, aDst, nXOfs, nYOfs, pTraps, nCount ); +#endif + return true; +} + +//===================================================================== + +inline ScopedPic::ScopedPic( XRenderPeer& rPeer, Picture& rPic ) +: mrRenderPeer( rPeer) +, maPicture( rPic ) +{} + +inline ScopedPic::~ScopedPic() +{ + if( maPicture ) + mrRenderPeer.FreePicture( maPicture ); +} + +inline Picture& ScopedPic::Get() +{ + return maPicture; +} + +//===================================================================== + +inline XRenderColor GetXRenderColor( const SalColor& rSalColor, double fTransparency = 0.0 ) +{ + XRenderColor aRetVal; + // convert the SalColor + aRetVal.red = SALCOLOR_RED( rSalColor ); aRetVal.red |= (aRetVal.red << 8); + aRetVal.green = SALCOLOR_GREEN( rSalColor ); aRetVal.green |= (aRetVal.green << 8); + aRetVal.blue = SALCOLOR_BLUE( rSalColor ); aRetVal.blue |= (aRetVal.blue << 8); + + // handle transparency + aRetVal.alpha = 0xFFFF; // default to opaque + if( fTransparency != 0 ) + { + const double fAlpha = 1.0 - fTransparency; + aRetVal.alpha = static_cast(fAlpha * 0xFFFF + 0.5); + // xrender wants pre-multiplied colors + aRetVal.red = static_cast(fAlpha * aRetVal.red + 0.5); + aRetVal.green = static_cast(fAlpha * aRetVal.green + 0.5); + aRetVal.blue = static_cast(fAlpha * aRetVal.blue + 0.5); + } + + return aRetVal; +} + +//===================================================================== + +#endif // _SV_XRENDER_PEER_HXX diff --git a/vcl/unx/generic/plugadapt/makefile.mk b/vcl/unx/generic/plugadapt/makefile.mk new file mode 100644 index 000000000000..af409c04af35 --- /dev/null +++ b/vcl/unx/generic/plugadapt/makefile.mk @@ -0,0 +1,59 @@ +#************************************************************************* +# +# 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=vcl +TARGET=salplug + +.INCLUDE : $(PRJ)$/util$/makefile.pmk + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk +.INCLUDE : $(PRJ)$/util$/makefile2.pmk + +# --- Files -------------------------------------------------------- + +.IF "$(GUIBASE)"!="unx" + +dummy: + @echo "Nothing to build for GUIBASE $(GUIBASE)" + +.ELSE # "$(GUIBASE)"!="unx" + +CFLAGS+=-DSAL_DLLPOSTFIX=\"$(DLLPOSTFIX)\" + +SLOFILES=$(SLO)$/salplug.obj + +.ENDIF # "$(GUIBASE)"!="unx" + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk + +.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx new file mode 100644 index 000000000000..29970e1299e6 --- /dev/null +++ b/vcl/unx/generic/plugadapt/salplug.cxx @@ -0,0 +1,302 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include "osl/module.h" +#include "osl/process.h" + +#include "rtl/ustrbuf.hxx" + +#include "salinst.hxx" +#include "unx/saldata.hxx" +#include "vcl/printerinfomanager.hxx" + +#include +#include + +using namespace rtl; + +extern "C" { +typedef SalInstance*(*salFactoryProc)( oslModule pModule); +} + +static oslModule pCloseModule = NULL; + +enum { + DESKTOP_NONE = 0, + DESKTOP_UNKNOWN, + DESKTOP_GNOME, + DESKTOP_KDE, + DESKTOP_KDE4, + DESKTOP_CDE +}; + +static const char * desktop_strings[] = { "none", "unknown", "GNOME", "KDE", "KDE4", "CDE" }; + +static SalInstance* tryInstance( const OUString& rModuleBase ) +{ + SalInstance* pInst = NULL; + + OUStringBuffer aModName( 128 ); + aModName.appendAscii( SAL_DLLPREFIX"vclplug_" ); + aModName.append( rModuleBase ); + aModName.appendAscii( SAL_DLLPOSTFIX ); + aModName.appendAscii( SAL_DLLEXTENSION ); + OUString aModule = aModName.makeStringAndClear(); + + oslModule aMod = osl_loadModuleRelative( + reinterpret_cast< oslGenericFunction >( &tryInstance ), aModule.pData, + SAL_LOADMODULE_DEFAULT ); + if( aMod ) + { + salFactoryProc aProc = (salFactoryProc)osl_getAsciiFunctionSymbol( aMod, "create_SalInstance" ); + if( aProc ) + { + pInst = aProc( aMod ); +#if OSL_DEBUG_LEVEL > 1 + std::fprintf( stderr, "sal plugin %s produced instance %p\n", + OUStringToOString( aModule, RTL_TEXTENCODING_ASCII_US ).getStr(), + pInst ); +#endif + if( pInst ) + { + pCloseModule = aMod; + + /* + * Recent GTK+ versions load their modules with RTLD_LOCAL, so we can + * not access the 'gnome_accessibility_module_shutdown' anymore. + * So make sure libgtk+ & co are still mapped into memory when + * atk-bridge's atexit handler gets called. + */ + if( rModuleBase.equalsAscii("gtk") ) + { + pCloseModule = NULL; + } + /* + * #i109007# KDE3 seems to have the same problem; an atexit cleanup + * handler, which cannot be resolved anymore if the plugin is already unloaded. + */ + else if( rModuleBase.equalsAscii("kde") ) + { + pCloseModule = NULL; + } + + GetSalData()->m_pPlugin = aMod; + } + else + osl_unloadModule( aMod ); + } + else + { +#if OSL_DEBUG_LEVEL > 1 + std::fprintf( stderr, "could not load symbol %s from shared object %s\n", + "create_SalInstance", + OUStringToOString( aModule, RTL_TEXTENCODING_ASCII_US ).getStr() ); +#endif + osl_unloadModule( aMod ); + } + } +#if OSL_DEBUG_LEVEL > 1 + else + std::fprintf( stderr, "could not load shared object %s\n", + OUStringToOString( aModule, RTL_TEXTENCODING_ASCII_US ).getStr() ); +#endif + + return pInst; +} + +static const rtl::OUString& get_desktop_environment() +{ + static rtl::OUString aRet; + if( ! aRet.getLength() ) + { + OUStringBuffer aModName( 128 ); + aModName.appendAscii( SAL_DLLPREFIX"desktop_detector" ); + aModName.appendAscii( SAL_DLLPOSTFIX ); + aModName.appendAscii( SAL_DLLEXTENSION ); + OUString aModule = aModName.makeStringAndClear(); + + oslModule aMod = osl_loadModuleRelative( + reinterpret_cast< oslGenericFunction >( &tryInstance ), aModule.pData, + SAL_LOADMODULE_DEFAULT ); + if( aMod ) + { + rtl::OUString (*pSym)() = (rtl::OUString(*)()) + osl_getAsciiFunctionSymbol( aMod, "get_desktop_environment" ); + if( pSym ) + aRet = pSym(); + } + osl_unloadModule( aMod ); + } + return aRet; +} + +static SalInstance* autodetect_plugin() +{ + static const char* pKDEFallbackList[] = + { + "kde4", "kde", "gtk", "gen", 0 + }; + + static const char* pStandardFallbackList[] = + { + "gtk", "gen", 0 + }; + + static const char* pHeadlessFallbackList[] = + { + "svp", 0 + }; + + const rtl::OUString& desktop( get_desktop_environment() ); + const char ** pList = pStandardFallbackList; + int nListEntry = 0; + + // no server at all: dummy plugin + if ( desktop.equalsAscii( desktop_strings[DESKTOP_NONE] ) ) + pList = pHeadlessFallbackList; + else if ( desktop.equalsAscii( desktop_strings[DESKTOP_GNOME] ) ) + pList = pStandardFallbackList; + else if( desktop.equalsAscii( desktop_strings[DESKTOP_KDE] ) ) + { + pList = pKDEFallbackList; + nListEntry = 1; + } + else if( desktop.equalsAscii( desktop_strings[DESKTOP_KDE4] ) ) + pList = pKDEFallbackList; + + SalInstance* pInst = NULL; + while( pList[nListEntry] && pInst == NULL ) + { + rtl::OUString aTry( rtl::OUString::createFromAscii( pList[nListEntry] ) ); + pInst = tryInstance( aTry ); + #if OSL_DEBUG_LEVEL > 1 + if( pInst ) + std::fprintf( stderr, "plugin autodetection: %s\n", pList[nListEntry] ); + #endif + nListEntry++; + } + + return pInst; +} + +static SalInstance* check_headless_plugin() +{ + int nParams = osl_getCommandArgCount(); + OUString aParam; + for( int i = 0; i < nParams; i++ ) + { + osl_getCommandArg( i, &aParam.pData ); + if( aParam.equalsAscii( "-headless" ) ) + return tryInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "svp" ) ) ); + } + return NULL; +} + +SalInstance *CreateSalInstance() +{ + SalInstance* pInst = NULL; + + static const char* pUsePlugin = getenv( "SAL_USE_VCLPLUGIN" ); + + if( !(pUsePlugin && *pUsePlugin) ) + pInst = check_headless_plugin(); + else + pInst = tryInstance( OUString::createFromAscii( pUsePlugin ) ); + + if( ! pInst ) + pInst = autodetect_plugin(); + + // fallback to gen + if( ! pInst ) + pInst = tryInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "gen" ) ) ); + + if( ! pInst ) + { + std::fprintf( stderr, "no suitable windowing system found, exiting.\n" ); + _exit( 1 ); + } + + // acquire SolarMutex + pInst->AcquireYieldMutex( 1 ); + + return pInst; +} + +void DestroySalInstance( SalInstance *pInst ) +{ + // release SolarMutex + pInst->ReleaseYieldMutex(); + + delete pInst; + if( pCloseModule ) + osl_unloadModule( pCloseModule ); +} + +void InitSalData() +{ +} + +void DeInitSalData() +{ +} + +void InitSalMain() +{ +} + +void DeInitSalMain() +{ +} + +void SalAbort( const XubString& rErrorText ) +{ + if( !rErrorText.Len() ) + std::fprintf( stderr, "Application Error" ); + else + std::fprintf( stderr, ByteString( rErrorText, gsl_getSystemTextEncoding() ).GetBuffer() ); + abort(); +} + +const OUString& SalGetDesktopEnvironment() +{ + return get_desktop_environment(); +} + +SalData::SalData() : + m_pInstance(NULL), + m_pPlugin(NULL), + m_pPIManager(NULL) +{ +} + +SalData::~SalData() +{ + psp::PrinterInfoManager::release(); +} diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx new file mode 100644 index 000000000000..caf3249b5f46 --- /dev/null +++ b/vcl/unx/generic/printer/cupsmgr.cxx @@ -0,0 +1,1175 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#ifdef ENABLE_CUPS +#include +#include + +#else // !ENABLE_CUPS +typedef void ppd_file_t; +typedef void cups_dest_t; +typedef void cups_option_t; +#endif + +#include + +#include "cupsmgr.hxx" + +#include "osl/thread.h" +#include "osl/diagnose.h" +#include "osl/conditn.hxx" + +#include "rtl/ustrbuf.hxx" + +#include +#include +#include + +#define CUPS_LIB_NAME "libcups.so.2" + +namespace psp +{ +class CUPSWrapper +{ + oslModule m_pLib; + osl::Mutex m_aGetPPDMutex; + bool m_bPPDThreadRunning; + + int (*m_pcupsPrintFile)(const char*, const char*, const char*, int, cups_option_t*); + int (*m_pcupsGetDests)(cups_dest_t**); + void (*m_pcupsSetDests)(int,cups_dest_t*); + void (*m_pcupsFreeDests)(int,cups_dest_t*); + const char* (*m_pcupsGetPPD)(const char*); + int (*m_pcupsMarkOptions)(ppd_file_t*,int,cups_option_t*); + int (*m_pcupsAddOption)(const char*,const char*,int,cups_option_t**); + void (*m_pcupsFreeOptions)(int,cups_option_t*); + ppd_file_t* (*m_pppdOpenFile)(const char* pFile); + void (*m_pppdClose)(ppd_file_t*); + const char* (*m_pcupsServer)(); + void (*m_pcupsSetPasswordCB)(const char*(cb)(const char*)); + const char* (*m_pcupsUser)(); + void (*m_pcupsSetUser)(const char*); + const char* (*m_pcupsGetOption)(const char*,int,cups_option_t*); + + oslGenericFunction loadSymbol( const char* ); +public: + CUPSWrapper(); + ~CUPSWrapper(); + + bool isValid(); + + int cupsGetDests(cups_dest_t** pDests) + { return m_pcupsGetDests(pDests); } + + void cupsSetDests( int nDests, cups_dest_t* pDests ) + { m_pcupsSetDests( nDests, pDests ); } + + void cupsFreeDests(int nDests, cups_dest_t* pDests) + { m_pcupsFreeDests(nDests, pDests); } + + int cupsPrintFile( const char* pPrinter, + const char* pFileName, + const char* pTitle, + int nOptions, + cups_option_t* pOptions ) + { return m_pcupsPrintFile( pPrinter, pFileName, pTitle, nOptions, pOptions ); } + + rtl::OString cupsGetPPD( const char* pPrinter ); + + int cupsMarkOptions(ppd_file_t* pPPD, int nOptions, cups_option_t* pOptions ) + { return m_pcupsMarkOptions(pPPD, nOptions, pOptions); } + + int cupsAddOption( const char* pName, const char* pValue, int nOptions, cups_option_t** pOptions ) + { return m_pcupsAddOption( pName, pValue, nOptions, pOptions ); } + + void cupsFreeOptions( int nOptions, cups_option_t* pOptions ) + { m_pcupsFreeOptions( nOptions, pOptions ); } + + ppd_file_t* ppdOpenFile( const char* pFileName ) + { return m_pppdOpenFile( pFileName ); } + + void ppdClose( ppd_file_t* pPPD ) + { m_pppdClose( pPPD ); } + + const char *cupsServer(void) + { return m_pcupsServer(); } + + const char *cupsUser(void) + { return m_pcupsUser(); } + + void cupsSetPasswordCB(const char *(*cb)(const char *)) + { m_pcupsSetPasswordCB( cb ); } + + void cupsSetUser(const char *user) + { m_pcupsSetUser( user ); } + + const char* cupsGetOption(const char* name, int num_options, cups_option_t* options) + { return m_pcupsGetOption( name, num_options, options ); } + +}; +} + +using namespace psp; +using namespace osl; +using namespace rtl; + +/* + * CUPSWrapper class + */ + +oslGenericFunction CUPSWrapper::loadSymbol( const char* pSymbol ) +{ + OUString aSym( OUString::createFromAscii( pSymbol ) ); + oslGenericFunction pSym = osl_getFunctionSymbol( m_pLib, aSym.pData ); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "%s %s\n", pSymbol, pSym ? "found" : "not found" ); +#endif + return pSym; +} + +CUPSWrapper::CUPSWrapper() + : m_pLib( NULL ), + m_bPPDThreadRunning( false ) +{ +#ifdef ENABLE_CUPS + OUString aLib( RTL_CONSTASCII_USTRINGPARAM( CUPS_LIB_NAME ) ); + m_pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY ); + if( ! m_pLib ) + { + aLib = OUString( RTL_CONSTASCII_USTRINGPARAM( SAL_MODULENAME( "cups" ) ) ); + m_pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY ); + } +#endif + + if( ! m_pLib ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "no cups library found\n" ); +#endif + return; + } + + m_pcupsPrintFile = (int(*)(const char*,const char*,const char*,int,cups_option_t*)) + loadSymbol( "cupsPrintFile" ); + m_pcupsGetDests = (int(*)(cups_dest_t**)) + loadSymbol( "cupsGetDests" ); + m_pcupsSetDests = (void(*)(int,cups_dest_t*)) + loadSymbol( "cupsSetDests" ); + m_pcupsFreeDests = (void(*)(int,cups_dest_t*)) + loadSymbol( "cupsFreeDests" ); + m_pcupsGetPPD = (const char*(*)(const char*)) + loadSymbol( "cupsGetPPD" ); + m_pcupsMarkOptions = (int(*)(ppd_file_t*,int,cups_option_t*)) + loadSymbol( "cupsMarkOptions" ); + m_pcupsAddOption = (int(*)(const char*,const char*,int,cups_option_t**)) + loadSymbol( "cupsAddOption" ); + m_pcupsFreeOptions = (void(*)(int,cups_option_t*)) + loadSymbol( "cupsFreeOptions" ); + m_pppdOpenFile = (ppd_file_t*(*)(const char*)) + loadSymbol( "ppdOpenFile" ); + m_pppdClose = (void(*)(ppd_file_t*)) + loadSymbol( "ppdClose" ); + m_pcupsServer = (const char*(*)()) + loadSymbol( "cupsServer" ); + m_pcupsUser = (const char*(*)()) + loadSymbol( "cupsUser" ); + m_pcupsSetPasswordCB = (void(*)(const char*(*)(const char*))) + loadSymbol( "cupsSetPasswordCB" ); + m_pcupsSetUser = (void(*)(const char*)) + loadSymbol( "cupsSetUser" ); + m_pcupsGetOption = (const char*(*)(const char*,int,cups_option_t*)) + loadSymbol( "cupsGetOption" ); + + if( ! ( + m_pcupsPrintFile && + m_pcupsGetDests && + m_pcupsSetDests && + m_pcupsFreeDests && + m_pcupsGetPPD && + m_pcupsMarkOptions && + m_pcupsAddOption && + m_pcupsServer && + m_pcupsUser && + m_pcupsSetPasswordCB && + m_pcupsSetUser && + m_pcupsFreeOptions && + m_pppdOpenFile && + m_pppdClose && + m_pcupsGetOption + ) ) + { + osl_unloadModule( m_pLib ); + m_pLib = NULL; + } +} + +CUPSWrapper::~CUPSWrapper() +{ + if( m_pLib ) + osl_unloadModule( m_pLib ); +} + +bool CUPSWrapper::isValid() +{ + return m_pLib != NULL; +} + +typedef const char*(*PPDFunction)(const char*); +struct GetPPDAttribs +{ + PPDFunction m_pFunction; + osl::Condition m_aCondition; + OString m_aParameter; + OString m_aResult; + oslThread m_aThread; + int m_nRefs; + bool* m_pResetRunning; + osl::Mutex* m_pSyncMutex; + + GetPPDAttribs( PPDFunction pFn, const char * m_pParameter, + bool* pResetRunning, osl::Mutex* pSyncMutex ) + : m_pFunction( pFn ), + m_aParameter( m_pParameter ), + m_pResetRunning( pResetRunning ), + m_pSyncMutex( pSyncMutex ) + { + m_nRefs = 2; + m_aCondition.reset(); + } + + ~GetPPDAttribs() + { + if( m_aResult.getLength() ) + unlink( m_aResult.getStr() ); + } + + void unref() + { + if( --m_nRefs == 0 ) + { + *m_pResetRunning = false; + delete this; + } + } + + void executeCall() + { + // This CUPS method is not at all thread-safe we need + // to dup the pointer to a static buffer it returns ASAP + OString aResult = m_pFunction( m_aParameter ); + MutexGuard aGuard( *m_pSyncMutex ); + m_aResult = aResult; + m_aCondition.set(); + unref(); + } + + OString waitResult( TimeValue *pDelay ) + { + m_pSyncMutex->release(); + + if (m_aCondition.wait( pDelay ) != Condition::result_ok + ) + { + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "cupsGetPPD %s timed out\n", + (const sal_Char *) m_aParameter + ); + #endif + } + m_pSyncMutex->acquire(); + + OString aRetval = m_aResult; + m_aResult = OString(); + unref(); + + return aRetval; + } +}; + +extern "C" { + static void getPPDWorker(void* pData) + { + GetPPDAttribs* pAttribs = (GetPPDAttribs*)pData; + pAttribs->executeCall(); + } +} + +OString CUPSWrapper::cupsGetPPD( const char* pPrinter ) +{ + OString aResult; + + m_aGetPPDMutex.acquire(); + // if one thread hangs in cupsGetPPD already, don't start another + if( ! m_bPPDThreadRunning ) + { + m_bPPDThreadRunning = true; + GetPPDAttribs* pAttribs = new GetPPDAttribs( m_pcupsGetPPD, + pPrinter, + &m_bPPDThreadRunning, + &m_aGetPPDMutex ); + + oslThread aThread = osl_createThread( getPPDWorker, pAttribs ); + + TimeValue aValue; + aValue.Seconds = 5; + aValue.Nanosec = 0; + + // NOTE: waitResult release and acquires the GetPPD mutex + aResult = pAttribs->waitResult( &aValue ); + osl_destroyThread( aThread ); + } + m_aGetPPDMutex.release(); + + return aResult; +} + +#ifdef ENABLE_CUPS +static const char* setPasswordCallback( const char* pIn ) +{ + const char* pRet = NULL; + + PrinterInfoManager& rMgr = PrinterInfoManager::get(); + if( rMgr.getType() == PrinterInfoManager::CUPS ) // sanity check + pRet = static_cast(rMgr).authenticateUser( pIn ); + return pRet; +} +#endif + +/* + * CUPSManager class + */ + +CUPSManager* CUPSManager::tryLoadCUPS() +{ + CUPSManager* pManager = NULL; +#ifdef ENABLE_CUPS + static const char* pEnv = getenv( "SAL_DISABLE_CUPS" ); + + if( ! pEnv || ! *pEnv ) + { + // try to load CUPS + CUPSWrapper* pWrapper = new CUPSWrapper(); + if( pWrapper->isValid() ) + pManager = new CUPSManager( pWrapper ); + else + delete pWrapper; + } +#endif + return pManager; +} + +extern "C" +{ +static void run_dest_thread_stub( void* pThis ) +{ + CUPSManager::runDestThread( pThis ); +} +} + +CUPSManager::CUPSManager( CUPSWrapper* pWrapper ) : + PrinterInfoManager( CUPS ), + m_pCUPSWrapper( pWrapper ), + m_nDests( 0 ), + m_pDests( NULL ), + m_bNewDests( false ) +{ + m_aDestThread = osl_createThread( run_dest_thread_stub, this ); +} + +CUPSManager::~CUPSManager() +{ + if( m_aDestThread ) + { + // if the thread is still running here, then + // cupsGetDests is hung; terminate the thread instead of joining + osl_terminateThread( m_aDestThread ); + osl_destroyThread( m_aDestThread ); + } + + if( m_nDests && m_pDests ) + m_pCUPSWrapper->cupsFreeDests( m_nDests, (cups_dest_t*)m_pDests ); + delete m_pCUPSWrapper; +} + +void CUPSManager::runDestThread( void* pThis ) +{ + ((CUPSManager*)pThis)->runDests(); +} + +static sigjmp_buf aViolationBuffer; + +extern "C" +{ + static void lcl_signal_action(int nSignal) + { + fprintf( stderr, "Signal %d during fontconfig initialization called, ignoring fontconfig\n", nSignal ); + siglongjmp( aViolationBuffer, 1 ); + } +} + +void CUPSManager::runDests() +{ +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "starting cupsGetDests\n" ); +#endif + int nDests = 0; + cups_dest_t* pDests = NULL; + + // #i86306# prepare against really broken CUPS installations / missing servers + + // install signal handler for SEGV, BUS and ABRT + struct sigaction act; + struct sigaction oact[3]; + + act.sa_handler = lcl_signal_action; + act.sa_flags = 0; + sigemptyset(&(act.sa_mask)); + + int nSegvSignalInstalled = sigaction(SIGSEGV, &act, &oact[0]); + int nBusSignalInstalled = sigaction(SIGBUS, &act, &oact[1]); + int nAbortSignalInstalled = sigaction(SIGABRT, &act, &oact[2]); + + // prepare against a signal during FcInit or FcConfigGetCurrent + if( sigsetjmp( aViolationBuffer, ~0 ) == 0 ) + { + nDests = m_pCUPSWrapper->cupsGetDests( &pDests ); + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "came out of cupsGetDests\n" ); + #endif + + osl::MutexGuard aGuard( m_aCUPSMutex ); + m_nDests = nDests; + m_pDests = pDests; + m_bNewDests = true; + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "finished cupsGetDests\n" ); + #endif + } + else + { + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "cupsGetDests crashed, not using CUPS\n" ); + #endif + } + + // restore old signal handlers + if( nSegvSignalInstalled == 0 ) + sigaction( SIGSEGV, &oact[0], NULL ); + if( nBusSignalInstalled == 0 ) + sigaction( SIGBUS, &oact[1], NULL ); + if( nAbortSignalInstalled == 0 ) + sigaction( SIGABRT, &oact[2], NULL ); +} + +void CUPSManager::initialize() +{ + // get normal printers, clear printer list + PrinterInfoManager::initialize(); + +#ifdef ENABLE_CUPS + // check whether thread has completed + // if not behave like old printing system + osl::MutexGuard aGuard( m_aCUPSMutex ); + + if( ! m_bNewDests ) + return; + + // dest thread has run, clean up + if( m_aDestThread ) + { + osl_joinWithThread( m_aDestThread ); + osl_destroyThread( m_aDestThread ); + m_aDestThread = NULL; + } + m_bNewDests = false; + + // clear old stuff + m_aCUPSDestMap.clear(); + + if( ! (m_nDests && m_pDests ) ) + return; + + if( isCUPSDisabled() ) + return; + + // check for CUPS server(?) > 1.2 + // since there is no API to query, check for options that were + // introduced in dests with 1.2 + // this is needed to check for %%IncludeFeature support + // (#i65684#, #i65491#) + bool bUsePDF = false; + cups_dest_t* pDest = ((cups_dest_t*)m_pDests); + const char* pOpt = m_pCUPSWrapper->cupsGetOption( "printer-info", + pDest->num_options, + pDest->options ); + if( pOpt ) + { + m_bUseIncludeFeature = true; + bUsePDF = true; + if( m_aGlobalDefaults.m_nPSLevel == 0 && m_aGlobalDefaults.m_nPDFDevice == 0 ) + m_aGlobalDefaults.m_nPDFDevice = 1; + } + // do not send include JobPatch; CUPS will insert that itself + // TODO: currently unknwon which versions of CUPS insert JobPatches + // so currently it is assumed CUPS = don't insert JobPatch files + m_bUseJobPatch = false; + + rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); + int nPrinter = m_nDests; + + // reset global default PPD options; these are queried on demand from CUPS + m_aGlobalDefaults.m_pParser = NULL; + m_aGlobalDefaults.m_aContext = PPDContext(); + + // add CUPS printers, should there be a printer + // with the same name as a CUPS printer, overwrite it + while( nPrinter-- ) + { + pDest = ((cups_dest_t*)m_pDests)+nPrinter; + OUString aPrinterName = OStringToOUString( pDest->name, aEncoding ); + if( pDest->instance && *pDest->instance ) + { + OUStringBuffer aBuf( 256 ); + aBuf.append( aPrinterName ); + aBuf.append( sal_Unicode( '/' ) ); + aBuf.append( OStringToOUString( pDest->instance, aEncoding ) ); + aPrinterName = aBuf.makeStringAndClear(); + } + + // initialize printer with possible configuration from psprint.conf + bool bSetToGlobalDefaults = m_aPrinters.find( aPrinterName ) == m_aPrinters.end(); + Printer aPrinter = m_aPrinters[ aPrinterName ]; + if( bSetToGlobalDefaults ) + aPrinter.m_aInfo = m_aGlobalDefaults; + aPrinter.m_aInfo.m_aPrinterName = aPrinterName; + if( pDest->is_default ) + m_aDefaultPrinter = aPrinterName; + + for( int k = 0; k < pDest->num_options; k++ ) + { + if(!strcmp(pDest->options[k].name, "printer-info")) + aPrinter.m_aInfo.m_aComment=OStringToOUString(pDest->options[k].value, aEncoding); + if(!strcmp(pDest->options[k].name, "printer-location")) + aPrinter.m_aInfo.m_aLocation=OStringToOUString(pDest->options[k].value, aEncoding); + } + + + OUStringBuffer aBuf( 256 ); + aBuf.appendAscii( "CUPS:" ); + aBuf.append( aPrinterName ); + // note: the parser that goes with the PrinterInfo + // is created implicitly by the JobData::operator=() + // when it detects the NULL ptr m_pParser. + // if we wanted to fill in the parser here this + // would mean we'd have to download PPDs for each and + // every printer - which would be really bad runtime + // behaviour + aPrinter.m_aInfo.m_pParser = NULL; + aPrinter.m_aInfo.m_aContext.setParser( NULL ); + std::hash_map< OUString, PPDContext, OUStringHash >::const_iterator c_it = m_aDefaultContexts.find( aPrinterName ); + if( c_it != m_aDefaultContexts.end() ) + { + aPrinter.m_aInfo.m_pParser = c_it->second.getParser(); + aPrinter.m_aInfo.m_aContext = c_it->second; + } + if( bUsePDF && aPrinter.m_aInfo.m_nPSLevel == 0 && aPrinter.m_aInfo.m_nPDFDevice == 0 ) + aPrinter.m_aInfo.m_nPDFDevice = 1; + aPrinter.m_aInfo.m_aDriverName = aBuf.makeStringAndClear(); + aPrinter.m_bModified = false; + + m_aPrinters[ aPrinter.m_aInfo.m_aPrinterName ] = aPrinter; + m_aCUPSDestMap[ aPrinter.m_aInfo.m_aPrinterName ] = nPrinter; + } + + // remove everything that is not a CUPS printer and not + // a special purpose printer (PDF, Fax) + std::list< OUString > aRemovePrinters; + for( std::hash_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.begin(); + it != m_aPrinters.end(); ++it ) + { + if( m_aCUPSDestMap.find( it->first ) != m_aCUPSDestMap.end() ) + continue; + + if( it->second.m_aInfo.m_aFeatures.getLength() > 0 ) + continue; + aRemovePrinters.push_back( it->first ); + } + while( aRemovePrinters.begin() != aRemovePrinters.end() ) + { + m_aPrinters.erase( aRemovePrinters.front() ); + aRemovePrinters.pop_front(); + } + + m_pCUPSWrapper->cupsSetPasswordCB( setPasswordCallback ); +#endif // ENABLE_CUPS +} + +#ifdef ENABLE_CUPS +static void updatePrinterContextInfo( ppd_group_t* pPPDGroup, PPDContext& rContext ) +{ + rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); + for( int i = 0; i < pPPDGroup->num_options; i++ ) + { + ppd_option_t* pOption = pPPDGroup->options + i; + for( int n = 0; n < pOption->num_choices; n++ ) + { + ppd_choice_t* pChoice = pOption->choices + n; + if( pChoice->marked ) + { + const PPDKey* pKey = rContext.getParser()->getKey( OStringToOUString( pOption->keyword, aEncoding ) ); + if( pKey ) + { + const PPDValue* pValue = pKey->getValue( OStringToOUString( pChoice->choice, aEncoding ) ); + if( pValue ) + { + if( pValue != pKey->getDefaultValue() ) + { + rContext.setValue( pKey, pValue, true ); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "key %s is set to %s\n", pOption->keyword, pChoice->choice ); +#endif + + } +#if OSL_DEBUG_LEVEL > 1 + else + fprintf( stderr, "key %s is defaulted to %s\n", pOption->keyword, pChoice->choice ); +#endif + } +#if OSL_DEBUG_LEVEL > 1 + else + fprintf( stderr, "caution: value %s not found in key %s\n", pChoice->choice, pOption->keyword ); +#endif + } +#if OSL_DEBUG_LEVEL > 1 + else + fprintf( stderr, "caution: key %s not found in parser\n", pOption->keyword ); +#endif + } + } + } + + // recurse through subgroups + for( int g = 0; g < pPPDGroup->num_subgroups; g++ ) + { + updatePrinterContextInfo( pPPDGroup->subgroups + g, rContext ); + } +} +#endif // ENABLE_CUPS + +const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter ) +{ + const PPDParser* pNewParser = NULL; + OUString aPrinter; + + if( rPrinter.compareToAscii( "CUPS:", 5 ) == 0 ) + aPrinter = rPrinter.copy( 5 ); + else + aPrinter = rPrinter; + +#ifdef ENABLE_CUPS + if( m_aCUPSMutex.tryToAcquire() ) + { + if( m_nDests && m_pDests && ! isCUPSDisabled() ) + { + std::hash_map< OUString, int, OUStringHash >::iterator dest_it = + m_aCUPSDestMap.find( aPrinter ); + if( dest_it != m_aCUPSDestMap.end() ) + { + cups_dest_t* pDest = ((cups_dest_t*)m_pDests) + dest_it->second; + OString aPPDFile = m_pCUPSWrapper->cupsGetPPD( pDest->name ); + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "PPD for %s is %s\n", OUStringToOString( aPrinter, osl_getThreadTextEncoding() ).getStr(), aPPDFile.getStr() ); + #endif + if( aPPDFile.getLength() ) + { + rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); + OUString aFileName( OStringToOUString( aPPDFile, aEncoding ) ); + // update the printer info with context information + ppd_file_t* pPPD = m_pCUPSWrapper->ppdOpenFile( aPPDFile.getStr() ); + if( pPPD ) + { + // create the new parser + PPDParser* pCUPSParser = new PPDParser( aFileName ); + pCUPSParser->m_aFile = rPrinter; + pNewParser = pCUPSParser; + + /*int nConflicts =*/ m_pCUPSWrapper->cupsMarkOptions( pPPD, pDest->num_options, pDest->options ); + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "processing the following options for printer %s (instance %s):\n", + pDest->name, pDest->instance ); + for( int k = 0; k < pDest->num_options; k++ ) + fprintf( stderr, " \"%s\" = \"%s\"\n", + pDest->options[k].name, + pDest->options[k].value ); + #endif + PrinterInfo& rInfo = m_aPrinters[ aPrinter ].m_aInfo; + + // remember the default context for later use + PPDContext& rContext = m_aDefaultContexts[ aPrinter ]; + rContext.setParser( pNewParser ); + // set system default paper; printer CUPS PPD options + // may overwrite it + setDefaultPaper( rContext ); + for( int i = 0; i < pPPD->num_groups; i++ ) + updatePrinterContextInfo( pPPD->groups + i, rContext ); + + rInfo.m_pParser = pNewParser; + rInfo.m_aContext = rContext; + + // clean up the mess + m_pCUPSWrapper->ppdClose( pPPD ); + } + #if OSL_DEBUG_LEVEL > 1 + else + fprintf( stderr, "ppdOpenFile failed, falling back to generic driver\n" ); + #endif + + // remove temporary PPD file + unlink( aPPDFile.getStr() ); + } + #if OSL_DEBUG_LEVEL > 1 + else + fprintf( stderr, "cupsGetPPD failed, falling back to generic driver\n" ); + #endif + } + #if OSL_DEBUG_LEVEL > 1 + else + fprintf( stderr, "no dest found for printer %s\n", OUStringToOString( aPrinter, osl_getThreadTextEncoding() ).getStr() ); + #endif + } + m_aCUPSMutex.release(); + } + #if OSL_DEBUG_LEVEL >1 + else + fprintf( stderr, "could not acquire CUPS mutex !!!\n" ); + #endif + #endif // ENABLE_CUPS + + if( ! pNewParser ) + { + // get the default PPD + pNewParser = PPDParser::getParser( String( RTL_CONSTASCII_USTRINGPARAM( "SGENPRT" ) ) ); + + PrinterInfo& rInfo = m_aPrinters[ aPrinter ].m_aInfo; + + rInfo.m_pParser = pNewParser; + rInfo.m_aContext.setParser( pNewParser ); + } + + return pNewParser; +} + +void CUPSManager::setupJobContextData( + JobData& +#ifdef ENABLE_CUPS + rData +#endif +) +{ +#ifdef ENABLE_CUPS + std::hash_map< OUString, int, OUStringHash >::iterator dest_it = + m_aCUPSDestMap.find( rData.m_aPrinterName ); + + if( dest_it == m_aCUPSDestMap.end() ) + return PrinterInfoManager::setupJobContextData( rData ); + + std::hash_map< OUString, Printer, OUStringHash >::iterator p_it = + m_aPrinters.find( rData.m_aPrinterName ); + if( p_it == m_aPrinters.end() ) // huh ? + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "CUPS printer list in disorder, no dest for printer %s !\n", OUStringToOString( rData.m_aPrinterName, osl_getThreadTextEncoding() ).getStr() ); +#endif + return; + } + + if( p_it->second.m_aInfo.m_pParser == NULL ) + { + // in turn calls createCUPSParser + // which updates the printer info + p_it->second.m_aInfo.m_pParser = PPDParser::getParser( p_it->second.m_aInfo.m_aDriverName ); + } + if( p_it->second.m_aInfo.m_aContext.getParser() == NULL ) + { + OUString aPrinter; + if( p_it->second.m_aInfo.m_aDriverName.compareToAscii( "CUPS:", 5 ) == 0 ) + aPrinter = p_it->second.m_aInfo.m_aDriverName.copy( 5 ); + else + aPrinter = p_it->second.m_aInfo.m_aDriverName; + + p_it->second.m_aInfo.m_aContext = m_aDefaultContexts[ aPrinter ]; + } + + rData.m_pParser = p_it->second.m_aInfo.m_pParser; + rData.m_aContext = p_it->second.m_aInfo.m_aContext; +#endif +} + +FILE* CUPSManager::startSpool( const OUString& rPrintername, bool bQuickCommand ) +{ + OSL_TRACE( "endSpool: %s, %s", + rtl::OUStringToOString( rPrintername, RTL_TEXTENCODING_UTF8 ).getStr(), + bQuickCommand ? "true" : "false" ); + + if( m_aCUPSDestMap.find( rPrintername ) == m_aCUPSDestMap.end() ) + { + OSL_TRACE( "defer to PrinterInfoManager::startSpool" ); + return PrinterInfoManager::startSpool( rPrintername, bQuickCommand ); + } + +#ifdef ENABLE_CUPS + OUString aTmpURL, aTmpFile; + osl_createTempFile( NULL, NULL, &aTmpURL.pData ); + osl_getSystemPathFromFileURL( aTmpURL.pData, &aTmpFile.pData ); + OString aSysFile = OUStringToOString( aTmpFile, osl_getThreadTextEncoding() ); + FILE* fp = fopen( aSysFile.getStr(), "w" ); + if( fp ) + m_aSpoolFiles[fp] = aSysFile; + + return fp; +#else + return NULL; +#endif +} + +struct less_ppd_key : public ::std::binary_function +{ + bool operator()(const PPDKey* left, const PPDKey* right) + { return left->getOrderDependency() < right->getOrderDependency(); } +}; + +void CUPSManager::getOptionsFromDocumentSetup( const JobData& rJob, bool bBanner, int& rNumOptions, void** rOptions ) const +{ + rNumOptions = 0; + *rOptions = NULL; + int i; + + // emit features ordered to OrderDependency + // ignore features that are set to default + + // sanity check + if( rJob.m_pParser == rJob.m_aContext.getParser() && rJob.m_pParser ) + { + int nKeys = rJob.m_aContext.countValuesModified(); + ::std::vector< const PPDKey* > aKeys( nKeys ); + for( i = 0; i < nKeys; i++ ) + aKeys[i] = rJob.m_aContext.getModifiedKey( i ); + ::std::sort( aKeys.begin(), aKeys.end(), less_ppd_key() ); + + for( i = 0; i < nKeys; i++ ) + { + const PPDKey* pKey = aKeys[i]; + const PPDValue* pValue = rJob.m_aContext.getValue( pKey ); + if(pValue && pValue->m_eType == eInvocation && pValue->m_aValue.Len() ) + { + OString aKey = OUStringToOString( pKey->getKey(), RTL_TEXTENCODING_ASCII_US ); + OString aValue = OUStringToOString( pValue->m_aOption, RTL_TEXTENCODING_ASCII_US ); + rNumOptions = m_pCUPSWrapper->cupsAddOption( aKey.getStr(), aValue.getStr(), rNumOptions, (cups_option_t**)rOptions ); + } + } + } + + if( rJob.m_nPDFDevice > 0 && rJob.m_nCopies > 1 ) + { + rtl::OString aVal( rtl::OString::valueOf( sal_Int32( rJob.m_nCopies ) ) ); + rNumOptions = m_pCUPSWrapper->cupsAddOption( "copies", aVal.getStr(), rNumOptions, (cups_option_t**)rOptions ); + } + if( ! bBanner ) + { + rNumOptions = m_pCUPSWrapper->cupsAddOption( "job-sheets", "none", rNumOptions, (cups_option_t**)rOptions ); + } +} + +int CUPSManager::endSpool( const OUString& rPrintername, const OUString& rJobTitle, FILE* pFile, const JobData& rDocumentJobData, bool bBanner ) +{ + OSL_TRACE( "endSpool: %s, %s, copy count = %d", + rtl::OUStringToOString( rPrintername, RTL_TEXTENCODING_UTF8 ).getStr(), + rtl::OUStringToOString( rJobTitle, RTL_TEXTENCODING_UTF8 ).getStr(), + rDocumentJobData.m_nCopies + ); + + int nJobID = 0; + + osl::MutexGuard aGuard( m_aCUPSMutex ); + + std::hash_map< OUString, int, OUStringHash >::iterator dest_it = + m_aCUPSDestMap.find( rPrintername ); + if( dest_it == m_aCUPSDestMap.end() ) + { + OSL_TRACE( "defer to PrinterInfoManager::endSpool" ); + return PrinterInfoManager::endSpool( rPrintername, rJobTitle, pFile, rDocumentJobData, bBanner ); + } + + #ifdef ENABLE_CUPS + std::hash_map< FILE*, OString, FPtrHash >::const_iterator it = m_aSpoolFiles.find( pFile ); + if( it != m_aSpoolFiles.end() ) + { + fclose( pFile ); + rtl_TextEncoding aEnc = osl_getThreadTextEncoding(); + + // setup cups options + int nNumOptions = 0; + cups_option_t* pOptions = NULL; + getOptionsFromDocumentSetup( rDocumentJobData, bBanner, nNumOptions, (void**)&pOptions ); + + cups_dest_t* pDest = ((cups_dest_t*)m_pDests) + dest_it->second; + nJobID = m_pCUPSWrapper->cupsPrintFile( pDest->name, + it->second.getStr(), + OUStringToOString( rJobTitle, aEnc ).getStr(), + nNumOptions, pOptions ); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "cupsPrintFile( %s, %s, %s, %d, %p ) returns %d\n", + pDest->name, + it->second.getStr(), + OUStringToOString( rJobTitle, aEnc ).getStr(), + nNumOptions, + pOptions, + nJobID + ); + for( int n = 0; n < nNumOptions; n++ ) + fprintf( stderr, " option %s=%s\n", pOptions[n].name, pOptions[n].value ); + OString aCmd( "cp " ); + aCmd = aCmd + it->second; + aCmd = aCmd + OString( " $HOME/cupsprint.ps" ); + system( aCmd.getStr() ); +#endif + + unlink( it->second.getStr() ); + m_aSpoolFiles.erase( pFile ); + if( pOptions ) + m_pCUPSWrapper->cupsFreeOptions( nNumOptions, pOptions ); + } +#endif // ENABLE_CUPS + + return nJobID; +} + + +void CUPSManager::changePrinterInfo( const OUString& rPrinter, const PrinterInfo& rNewInfo ) +{ + PrinterInfoManager::changePrinterInfo( rPrinter, rNewInfo ); +} + +bool CUPSManager::checkPrintersChanged( bool bWait ) +{ + bool bChanged = false; + if( bWait ) + { + if( m_aDestThread ) + { + // initial asynchronous detection still running + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "syncing cups discovery thread\n" ); + #endif + osl_joinWithThread( m_aDestThread ); + osl_destroyThread( m_aDestThread ); + m_aDestThread = NULL; + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "done: syncing cups discovery thread\n" ); + #endif + } + else + { + // #i82321# check for cups printer updates + // with this change the whole asynchronous detection in a thread is + // almost useless. The only relevance left is for some stalled systems + // where the user can set SAL_DISABLE_SYNCHRONOUS_PRINTER_DETECTION + // (see vcl/unx/source/gdi/salprnpsp.cxx) + // so that checkPrintersChanged( true ) will never be called + + // there is no way to query CUPS whether the printer list has changed + // so get the dest list anew + if( m_nDests && m_pDests ) + m_pCUPSWrapper->cupsFreeDests( m_nDests, (cups_dest_t*)m_pDests ); + m_nDests = 0; + m_pDests = NULL; + runDests(); + } + } + if( m_aCUPSMutex.tryToAcquire() ) + { + bChanged = m_bNewDests; + m_aCUPSMutex.release(); + } + + if( ! bChanged ) + { + bChanged = PrinterInfoManager::checkPrintersChanged( bWait ); + // #i54375# ensure new merging with CUPS list in :initialize + if( bChanged ) + m_bNewDests = true; + } + + if( bChanged ) + initialize(); + + return bChanged; +} + +bool CUPSManager::addPrinter( const OUString& rName, const OUString& rDriver ) +{ + // don't touch the CUPS printers + if( m_aCUPSDestMap.find( rName ) != m_aCUPSDestMap.end() || + rDriver.compareToAscii( "CUPS:", 5 ) == 0 + ) + return false; + return PrinterInfoManager::addPrinter( rName, rDriver ); +} + +bool CUPSManager::removePrinter( const OUString& rName, bool bCheck ) +{ + // don't touch the CUPS printers + if( m_aCUPSDestMap.find( rName ) != m_aCUPSDestMap.end() ) + return false; + return PrinterInfoManager::removePrinter( rName, bCheck ); +} + +bool CUPSManager::setDefaultPrinter( const OUString& rName ) +{ + bool bSuccess = false; +#ifdef ENABLE_CUPS + std::hash_map< OUString, int, OUStringHash >::iterator nit = + m_aCUPSDestMap.find( rName ); + if( nit != m_aCUPSDestMap.end() && m_aCUPSMutex.tryToAcquire() ) + { + cups_dest_t* pDests = (cups_dest_t*)m_pDests; + for( int i = 0; i < m_nDests; i++ ) + pDests[i].is_default = 0; + pDests[ nit->second ].is_default = 1; + m_pCUPSWrapper->cupsSetDests( m_nDests, (cups_dest_t*)m_pDests ); + m_aDefaultPrinter = rName; + m_aCUPSMutex.release(); + bSuccess = true; + } + else +#endif + bSuccess = PrinterInfoManager::setDefaultPrinter( rName ); + + return bSuccess; +} + +bool CUPSManager::writePrinterConfig() +{ +#ifdef ENABLE_CUPS + bool bDestModified = false; + rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); + + for( std::hash_map< OUString, Printer, OUStringHash >::iterator prt = + m_aPrinters.begin(); prt != m_aPrinters.end(); ++prt ) + { + std::hash_map< OUString, int, OUStringHash >::iterator nit = + m_aCUPSDestMap.find( prt->first ); + if( nit == m_aCUPSDestMap.end() ) + continue; + + if( ! prt->second.m_bModified ) + continue; + + if( m_aCUPSMutex.tryToAcquire() ) + { + bDestModified = true; + cups_dest_t* pDest = ((cups_dest_t*)m_pDests) + nit->second; + PrinterInfo& rInfo = prt->second.m_aInfo; + + // create new option list + int nNewOptions = 0; + cups_option_t* pNewOptions = NULL; + int nValues = rInfo.m_aContext.countValuesModified(); + for( int i = 0; i < nValues; i++ ) + { + const PPDKey* pKey = rInfo.m_aContext.getModifiedKey( i ); + const PPDValue* pValue = rInfo.m_aContext.getValue( pKey ); + if( pKey && pValue ) // sanity check + { + OString aName = OUStringToOString( pKey->getKey(), aEncoding ); + OString aValue = OUStringToOString( pValue->m_aOption, aEncoding ); + nNewOptions = m_pCUPSWrapper->cupsAddOption( aName.getStr(), aValue.getStr(), nNewOptions, &pNewOptions ); + } + } + // set PPD options on CUPS dest + m_pCUPSWrapper->cupsFreeOptions( pDest->num_options, pDest->options ); + pDest->num_options = nNewOptions; + pDest->options = pNewOptions; + m_aCUPSMutex.release(); + } + } + if( bDestModified && m_aCUPSMutex.tryToAcquire() ) + { + m_pCUPSWrapper->cupsSetDests( m_nDests, (cups_dest_t*)m_pDests ); + m_aCUPSMutex.release(); + } +#endif // ENABLE_CUPS + + return PrinterInfoManager::writePrinterConfig(); +} + +bool CUPSManager::addOrRemovePossible() const +{ + return (m_nDests && m_pDests && ! isCUPSDisabled())? false : PrinterInfoManager::addOrRemovePossible(); +} + +#include + +const char* CUPSManager::authenticateUser( const char* /*pIn*/ ) +{ + const char* pRet = NULL; + +#ifdef ENABLE_CUPS + OUString aLib = OUString::createFromAscii( _XSALSET_LIBNAME ); + oslModule pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY ); + if( pLib ) + { + OUString aSym( RTL_CONSTASCII_USTRINGPARAM( "Sal_authenticateQuery" ) ); + bool (*getpw)( const OString& rServer, OString& rUser, OString& rPw) = + (bool(*)(const OString&,OString&,OString&))osl_getFunctionSymbol( pLib, aSym.pData ); + if( getpw ) + { + osl::MutexGuard aGuard( m_aCUPSMutex ); + + OString aUser = m_pCUPSWrapper->cupsUser(); + OString aServer = m_pCUPSWrapper->cupsServer(); + OString aPassword; + if( getpw( aServer, aUser, aPassword ) ) + { + m_aPassword = aPassword; + m_aUser = aUser; + m_pCUPSWrapper->cupsSetUser( m_aUser.getStr() ); + pRet = m_aPassword.getStr(); + } + } + osl_unloadModule( pLib ); + } +#if OSL_DEBUG_LEVEL > 1 + else fprintf( stderr, "loading of module %s failed\n", OUStringToOString( aLib, osl_getThreadTextEncoding() ).getStr() ); +#endif +#endif // ENABLE_CUPS + + return pRet; +} diff --git a/vcl/unx/generic/printer/jobdata.cxx b/vcl/unx/generic/printer/jobdata.cxx new file mode 100644 index 000000000000..d4211eae31df --- /dev/null +++ b/vcl/unx/generic/printer/jobdata.cxx @@ -0,0 +1,265 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include "vcl/jobdata.hxx" +#include "vcl/printerinfomanager.hxx" + +#include "tools/stream.hxx" + +#include "sal/alloca.h" + +using namespace psp; +using namespace rtl; + +JobData& JobData::operator=(const JobData& rRight) +{ + m_nCopies = rRight.m_nCopies; + m_nLeftMarginAdjust = rRight.m_nLeftMarginAdjust; + m_nRightMarginAdjust = rRight.m_nRightMarginAdjust; + m_nTopMarginAdjust = rRight.m_nTopMarginAdjust; + m_nBottomMarginAdjust = rRight.m_nBottomMarginAdjust; + m_nColorDepth = rRight.m_nColorDepth; + m_eOrientation = rRight.m_eOrientation; + m_aPrinterName = rRight.m_aPrinterName; + m_pParser = rRight.m_pParser; + m_aContext = rRight.m_aContext; + m_nPSLevel = rRight.m_nPSLevel; + m_nPDFDevice = rRight.m_nPDFDevice; + m_nColorDevice = rRight.m_nColorDevice; + + if( ! m_pParser && m_aPrinterName.getLength() ) + { + PrinterInfoManager& rMgr = PrinterInfoManager::get(); + rMgr.setupJobContextData( *this ); + } + return *this; +} + +void JobData::setCollate( bool bCollate ) +{ + const PPDParser* pParser = m_aContext.getParser(); + if( pParser ) + { + const PPDKey* pKey = pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Collate" ) ) ); + if( pKey ) + { + const PPDValue* pVal = NULL; + if( bCollate ) + pVal = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "True" ) ) ); + else + { + pVal = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "False" ) ) ); + if( ! pVal ) + pVal = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "None" ) ) ); + } + m_aContext.setValue( pKey, pVal ); + } + } +} + +bool JobData::setPaper( int i_nWidth, int i_nHeight ) +{ + bool bSuccess = false; + if( m_pParser ) + { + rtl::OUString aPaper( m_pParser->matchPaper( i_nWidth, i_nHeight ) ); + + const PPDKey* pKey = m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) ); + const PPDValue* pValue = pKey ? pKey->getValueCaseInsensitive( aPaper ) : NULL; + + bSuccess = pKey && pValue && m_aContext.setValue( pKey, pValue, false ); + } + return bSuccess; +} + +bool JobData::setPaperBin( int i_nPaperBin ) +{ + bool bSuccess = false; + if( m_pParser ) + { + const PPDKey* pKey = m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) ); + const PPDValue* pValue = pKey ? pKey->getValue( i_nPaperBin ) : NULL; + + bSuccess = pKey && pValue && m_aContext.setValue( pKey, pValue, false ); + } + return bSuccess; +} + +bool JobData::getStreamBuffer( void*& pData, int& bytes ) +{ + // consistency checks + if( ! m_pParser ) + m_pParser = m_aContext.getParser(); + if( m_pParser != m_aContext.getParser() || + ! m_pParser ) + return false; + + SvMemoryStream aStream; + ByteString aLine; + + // write header job data + aStream.WriteLine( "JobData 1" ); + + aLine = "printer="; + aLine += ByteString( String( m_aPrinterName ), RTL_TEXTENCODING_UTF8 ); + aStream.WriteLine( aLine ); + + aLine = "orientation="; + aLine += m_eOrientation == orientation::Landscape ? "Landscape" : "Portrait"; + aStream.WriteLine( aLine ); + + aLine = "copies="; + aLine += ByteString::CreateFromInt32( m_nCopies ); + aStream.WriteLine( aLine ); + + aLine = "margindajustment="; + aLine += ByteString::CreateFromInt32( m_nLeftMarginAdjust ); + aLine += ','; + aLine += ByteString::CreateFromInt32( m_nRightMarginAdjust ); + aLine += ','; + aLine += ByteString::CreateFromInt32( m_nTopMarginAdjust ); + aLine += ','; + aLine += ByteString::CreateFromInt32( m_nBottomMarginAdjust ); + aStream.WriteLine( aLine ); + + aLine = "colordepth="; + aLine += ByteString::CreateFromInt32( m_nColorDepth ); + aStream.WriteLine( aLine ); + + aLine = "pslevel="; + aLine += ByteString::CreateFromInt32( m_nPSLevel ); + aStream.WriteLine( aLine ); + + aLine = "pdfdevice="; + aLine += ByteString::CreateFromInt32( m_nPDFDevice ); + aStream.WriteLine( aLine ); + + aLine = "colordevice="; + aLine += ByteString::CreateFromInt32( m_nColorDevice ); + aStream.WriteLine( aLine ); + + // now append the PPDContext stream buffer + aStream.WriteLine( "PPDContexData" ); + ULONG nBytes; + void* pContextBuffer = m_aContext.getStreamableBuffer( nBytes ); + if( nBytes ) + aStream.Write( pContextBuffer, nBytes ); + + // success + pData = rtl_allocateMemory( bytes = aStream.Tell() ); + memcpy( pData, aStream.GetData(), bytes ); + return true; +} + +bool JobData::constructFromStreamBuffer( void* pData, int bytes, JobData& rJobData ) +{ + SvMemoryStream aStream( pData, bytes, STREAM_READ ); + ByteString aLine; + bool bVersion = false; + bool bPrinter = false; + bool bOrientation = false; + bool bCopies = false; + bool bContext = false; + bool bMargin = false; + bool bColorDepth = false; + bool bColorDevice = false; + bool bPSLevel = false; + bool bPDFDevice = false; + while( ! aStream.IsEof() ) + { + aStream.ReadLine( aLine ); + if( aLine.CompareTo( "JobData", 7 ) == COMPARE_EQUAL ) + bVersion = true; + else if( aLine.CompareTo( "printer=", 8 ) == COMPARE_EQUAL ) + { + bPrinter = true; + rJobData.m_aPrinterName = String( aLine.Copy( 8 ), RTL_TEXTENCODING_UTF8 ); + } + else if( aLine.CompareTo( "orientation=", 12 ) == COMPARE_EQUAL ) + { + bOrientation = true; + rJobData.m_eOrientation = aLine.Copy( 12 ).EqualsIgnoreCaseAscii( "landscape" ) ? orientation::Landscape : orientation::Portrait; + } + else if( aLine.CompareTo( "copies=", 7 ) == COMPARE_EQUAL ) + { + bCopies = true; + rJobData.m_nCopies = aLine.Copy( 7 ).ToInt32(); + } + else if( aLine.CompareTo( "margindajustment=",17 ) == COMPARE_EQUAL ) + { + bMargin = true; + ByteString aValues( aLine.Copy( 17 ) ); + rJobData.m_nLeftMarginAdjust = aValues.GetToken( 0, ',' ).ToInt32(); + rJobData.m_nRightMarginAdjust = aValues.GetToken( 1, ',' ).ToInt32(); + rJobData.m_nTopMarginAdjust = aValues.GetToken( 2, ',' ).ToInt32(); + rJobData.m_nBottomMarginAdjust = aValues.GetToken( 3, ',' ).ToInt32(); + } + else if( aLine.CompareTo( "colordepth=", 11 ) == COMPARE_EQUAL ) + { + bColorDepth = true; + rJobData.m_nColorDepth = aLine.Copy( 11 ).ToInt32(); + } + else if( aLine.CompareTo( "colordevice=", 12 ) == COMPARE_EQUAL ) + { + bColorDevice = true; + rJobData.m_nColorDevice = aLine.Copy( 12 ).ToInt32(); + } + else if( aLine.CompareTo( "pslevel=", 8 ) == COMPARE_EQUAL ) + { + bPSLevel = true; + rJobData.m_nPSLevel = aLine.Copy( 8 ).ToInt32(); + } + else if( aLine.CompareTo( "pdfdevice=", 10 ) == COMPARE_EQUAL ) + { + bPDFDevice = true; + rJobData.m_nPDFDevice = aLine.Copy( 10 ).ToInt32(); + } + else if( aLine.Equals( "PPDContexData" ) ) + { + if( bPrinter ) + { + PrinterInfoManager& rManager = PrinterInfoManager::get(); + const PrinterInfo& rInfo = rManager.getPrinterInfo( rJobData.m_aPrinterName ); + rJobData.m_pParser = PPDParser::getParser( rInfo.m_aDriverName ); + if( rJobData.m_pParser ) + { + rJobData.m_aContext.setParser( rJobData.m_pParser ); + int nBytes = bytes - aStream.Tell(); + void* pRemain = alloca( bytes - aStream.Tell() ); + aStream.Read( pRemain, nBytes ); + rJobData.m_aContext.rebuildFromStreamBuffer( pRemain, nBytes ); + bContext = true; + } + } + } + } + + return bVersion && bPrinter && bOrientation && bCopies && bContext && bMargin && bPSLevel && bPDFDevice && bColorDevice && bColorDepth; +} diff --git a/vcl/unx/generic/printer/makefile.mk b/vcl/unx/generic/printer/makefile.mk new file mode 100644 index 000000000000..5cd35088acd9 --- /dev/null +++ b/vcl/unx/generic/printer/makefile.mk @@ -0,0 +1,70 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ=..$/..$/.. + +ENABLE_EXCEPTIONS=TRUE +PRJNAME=vcl +TARGET=printer + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +.IF "$(ENABLE_CUPS)" != "" +CDEFS += -DENABLE_CUPS +.ENDIF + +# --- Files -------------------------------------------------------- + +.IF "$(GUIBASE)"=="aqua" + +dummy: + @echo "Nothing to build for GUIBASE $(GUIBASE)" + +.ELSE # "$(GUIBASE)"=="aqua" + +SLOFILES=\ + $(SLO)$/ppdparser.obj \ + $(SLO)$/printerinfomanager.obj \ + $(SLO)$/jobdata.obj \ + $(SLO)$/cupsmgr.obj + +.ENDIF # GUIBASE = aqua + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk + +XSALSETLIBNAME=$(DLLPRE)spa$(DLLPOSTFIX)$(DLLPOST) + +$(INCCOM)$/rtsname.hxx: + rm -f $(INCCOM)$/rtsname.hxx ; \ + echo "#define _XSALSET_LIBNAME "\"$(XSALSETLIBNAME)\" > $(INCCOM)$/rtsname.hxx + +$(SLO)$/cupsmgr.obj : $(INCCOM)$/rtsname.hxx + diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx new file mode 100644 index 000000000000..587e58be5bc7 --- /dev/null +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -0,0 +1,2166 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include + +#include + +#include "vcl/ppdparser.hxx" +#include "vcl/strhelper.hxx" +#include "vcl/helper.hxx" +#include "vcl/svapp.hxx" +#include "cupsmgr.hxx" +#include "tools/debug.hxx" +#include "tools/urlobj.hxx" +#include "tools/stream.hxx" +#include "tools/zcodec.hxx" +#include "osl/mutex.hxx" +#include "osl/file.hxx" +#include "osl/process.h" +#include "osl/thread.h" +#include "rtl/strbuf.hxx" +#include "rtl/ustrbuf.hxx" + +#include "com/sun/star/lang/Locale.hpp" + +namespace psp +{ + class PPDTranslator + { + struct LocaleEqual + { + bool operator()(const com::sun::star::lang::Locale& i_rLeft, + const com::sun::star::lang::Locale& i_rRight) const + { + return i_rLeft.Language.equals( i_rRight.Language ) && + i_rLeft.Country.equals( i_rRight.Country ) && + i_rLeft.Variant.equals( i_rRight.Variant ); + } + }; + + struct LocaleHash + { + size_t operator()(const com::sun::star::lang::Locale& rLocale) const + { return + (size_t)rLocale.Language.hashCode() + ^ (size_t)rLocale.Country.hashCode() + ^ (size_t)rLocale.Variant.hashCode() + ; + } + }; + + typedef std::hash_map< com::sun::star::lang::Locale, rtl::OUString, LocaleHash, LocaleEqual > translation_map; + typedef std::hash_map< rtl::OUString, translation_map, rtl::OUStringHash > key_translation_map; + + key_translation_map m_aTranslations; + public: + PPDTranslator() {} + ~PPDTranslator() {} + + + void insertValue( + const rtl::OUString& i_rKey, + const rtl::OUString& i_rOption, + const rtl::OUString& i_rValue, + const rtl::OUString& i_rTranslation, + const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale() + ); + + void insertOption( const rtl::OUString& i_rKey, + const rtl::OUString& i_rOption, + const rtl::OUString& i_rTranslation, + const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale() ) + { + insertValue( i_rKey, i_rOption, rtl::OUString(), i_rTranslation, i_rLocale ); + } + + void insertKey( const rtl::OUString& i_rKey, + const rtl::OUString& i_rTranslation, + const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale() ) + { + insertValue( i_rKey, rtl::OUString(), rtl::OUString(), i_rTranslation, i_rLocale ); + } + + rtl::OUString translateValue( + const rtl::OUString& i_rKey, + const rtl::OUString& i_rOption, + const rtl::OUString& i_rValue, + const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale() + ) const; + + rtl::OUString translateOption( const rtl::OUString& i_rKey, + const rtl::OUString& i_rOption, + const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale() ) const + { + return translateValue( i_rKey, i_rOption, rtl::OUString(), i_rLocale ); + } + + rtl::OUString translateKey( const rtl::OUString& i_rKey, + const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale() ) const + { + return translateValue( i_rKey, rtl::OUString(), rtl::OUString(), i_rLocale ); + } + }; + + static com::sun::star::lang::Locale normalizeInputLocale( + const com::sun::star::lang::Locale& i_rLocale, + bool bInsertDefault = false + ) + { + com::sun::star::lang::Locale aLoc( i_rLocale ); + if( bInsertDefault && aLoc.Language.getLength() == 0 ) + { + // empty locale requested, fill in application UI locale + aLoc = Application::GetSettings().GetUILocale(); + + #if OSL_DEBUG_LEVEL > 1 + static const char* pEnvLocale = getenv( "SAL_PPDPARSER_LOCALE" ); + if( pEnvLocale && *pEnvLocale ) + { + rtl::OString aStr( pEnvLocale ); + sal_Int32 nLen = aStr.getLength(); + aLoc.Language = rtl::OStringToOUString( aStr.copy( 0, nLen > 2 ? 2 : nLen ), RTL_TEXTENCODING_MS_1252 ); + if( nLen >=5 && aStr.getStr()[2] == '_' ) + aLoc.Country = rtl::OStringToOUString( aStr.copy( 3, 2 ), RTL_TEXTENCODING_MS_1252 ); + else + aLoc.Country = rtl::OUString(); + aLoc.Variant = rtl::OUString(); + } + #endif + } + aLoc.Language = aLoc.Language.toAsciiLowerCase(); + aLoc.Country = aLoc.Country.toAsciiUpperCase(); + aLoc.Variant = aLoc.Variant.toAsciiUpperCase(); + + return aLoc; + } + + void PPDTranslator::insertValue( + const rtl::OUString& i_rKey, + const rtl::OUString& i_rOption, + const rtl::OUString& i_rValue, + const rtl::OUString& i_rTranslation, + const com::sun::star::lang::Locale& i_rLocale + ) + { + rtl::OUStringBuffer aKey( i_rKey.getLength() + i_rOption.getLength() + i_rValue.getLength() + 2 ); + aKey.append( i_rKey ); + if( i_rOption.getLength() || i_rValue.getLength() ) + { + aKey.append( sal_Unicode( ':' ) ); + aKey.append( i_rOption ); + } + if( i_rValue.getLength() ) + { + aKey.append( sal_Unicode( ':' ) ); + aKey.append( i_rValue ); + } + if( aKey.getLength() && i_rTranslation.getLength() ) + { + rtl::OUString aK( aKey.makeStringAndClear() ); + com::sun::star::lang::Locale aLoc; + aLoc.Language = i_rLocale.Language.toAsciiLowerCase(); + aLoc.Country = i_rLocale.Country.toAsciiUpperCase(); + aLoc.Variant = i_rLocale.Variant.toAsciiUpperCase(); + m_aTranslations[ aK ][ aLoc ] = i_rTranslation; + } + } + + rtl::OUString PPDTranslator::translateValue( + const rtl::OUString& i_rKey, + const rtl::OUString& i_rOption, + const rtl::OUString& i_rValue, + const com::sun::star::lang::Locale& i_rLocale + ) const + { + rtl::OUString aResult; + + rtl::OUStringBuffer aKey( i_rKey.getLength() + i_rOption.getLength() + i_rValue.getLength() + 2 ); + aKey.append( i_rKey ); + if( i_rOption.getLength() || i_rValue.getLength() ) + { + aKey.append( sal_Unicode( ':' ) ); + aKey.append( i_rOption ); + } + if( i_rValue.getLength() ) + { + aKey.append( sal_Unicode( ':' ) ); + aKey.append( i_rValue ); + } + if( aKey.getLength() ) + { + rtl::OUString aK( aKey.makeStringAndClear() ); + key_translation_map::const_iterator it = m_aTranslations.find( aK ); + if( it != m_aTranslations.end() ) + { + const translation_map& rMap( it->second ); + + com::sun::star::lang::Locale aLoc( normalizeInputLocale( i_rLocale, true ) ); + for( int nTry = 0; nTry < 4; nTry++ ) + { + translation_map::const_iterator tr = rMap.find( aLoc ); + if( tr != rMap.end() ) + { + aResult = tr->second; + break; + } + switch( nTry ) + { + case 0: aLoc.Variant = rtl::OUString();break; + case 1: aLoc.Country = rtl::OUString();break; + case 2: aLoc.Language = rtl::OUString();break; + } + } + } + } + return aResult; + } +} + +using namespace psp; +using namespace rtl; + +#undef DBG_ASSERT +#if defined DBG_UTIL || (OSL_DEBUG_LEVEL > 1) +#define BSTRING(x) ByteString( x, osl_getThreadTextEncoding() ) +#define DBG_ASSERT( x, y ) { if( ! (x) ) fprintf( stderr, (y) ); } +#else +#define DBG_ASSERT( x, y ) +#endif + +std::list< PPDParser* > PPDParser::aAllParsers; +std::hash_map< OUString, OUString, OUStringHash >* PPDParser::pAllPPDFiles = NULL; + +class PPDDecompressStream +{ + SvFileStream* mpFileStream; + SvMemoryStream* mpMemStream; + rtl::OUString maFileName; + + // forbid copying + PPDDecompressStream( const PPDDecompressStream& ); + PPDDecompressStream& operator=(const PPDDecompressStream& ); + + public: + PPDDecompressStream( const rtl::OUString& rFile ); + ~PPDDecompressStream(); + + bool IsOpen() const; + bool IsEof() const; + void ReadLine( ByteString& o_rLine); + void Open( const rtl::OUString& i_rFile ); + void Close(); + const rtl::OUString& GetFileName() const { return maFileName; } +}; + +PPDDecompressStream::PPDDecompressStream( const rtl::OUString& i_rFile ) : + mpFileStream( NULL ), + mpMemStream( NULL ) +{ + Open( i_rFile ); +} + +PPDDecompressStream::~PPDDecompressStream() +{ + Close(); +} + +void PPDDecompressStream::Open( const rtl::OUString& i_rFile ) +{ + Close(); + + mpFileStream = new SvFileStream( i_rFile, STREAM_READ ); + maFileName = mpFileStream->GetFileName(); + + if( ! mpFileStream->IsOpen() ) + { + Close(); + return; + } + + ByteString aLine; + mpFileStream->ReadLine( aLine ); + mpFileStream->Seek( 0 ); + + // check for compress'ed or gzip'ed file + ULONG nCompressMethod = 0; + if( aLine.Len() > 1 && static_cast(aLine.GetChar( 0 )) == 0x1f ) + { + if( static_cast(aLine.GetChar( 1 )) == 0x8b ) // check for gzip + nCompressMethod = ZCODEC_DEFAULT | ZCODEC_GZ_LIB; + } + + if( nCompressMethod != 0 ) + { + // so let's try to decompress the stream + mpMemStream = new SvMemoryStream( 4096, 4096 ); + ZCodec aCodec; + aCodec.BeginCompression( nCompressMethod ); + long nComp = aCodec.Decompress( *mpFileStream, *mpMemStream ); + aCodec.EndCompression(); + if( nComp < 0 ) + { + // decompression failed, must be an uncompressed stream after all + delete mpMemStream, mpMemStream = NULL; + mpFileStream->Seek( 0 ); + } + else + { + // compression successfull, can get rid of file stream + delete mpFileStream, mpFileStream = NULL; + mpMemStream->Seek( 0 ); + } + } +} + +void PPDDecompressStream::Close() +{ + delete mpMemStream, mpMemStream = NULL; + delete mpFileStream, mpFileStream = NULL; +} + +bool PPDDecompressStream::IsOpen() const +{ + return (mpMemStream || (mpFileStream && mpFileStream->IsOpen())); +} + +bool PPDDecompressStream::IsEof() const +{ + return ( mpMemStream ? mpMemStream->IsEof() : ( mpFileStream ? mpFileStream->IsEof() : true ) ); +} + +void PPDDecompressStream::ReadLine( ByteString& o_rLine ) +{ + if( mpMemStream ) + mpMemStream->ReadLine( o_rLine ); + else if( mpFileStream ) + mpFileStream->ReadLine( o_rLine ); +} + +static osl::FileBase::RC resolveLink( const rtl::OUString& i_rURL, rtl::OUString& o_rResolvedURL, rtl::OUString& o_rBaseName, osl::FileStatus::Type& o_rType, int nLinkLevel = 10 ) +{ + osl::DirectoryItem aLinkItem; + osl::FileBase::RC aRet = osl::FileBase::E_None; + + if( ( aRet = osl::DirectoryItem::get( i_rURL, aLinkItem ) ) == osl::FileBase::E_None ) + { + osl::FileStatus aStatus( FileStatusMask_FileName | FileStatusMask_Type | FileStatusMask_LinkTargetURL ); + if( ( aRet = aLinkItem.getFileStatus( aStatus ) ) == osl::FileBase::E_None ) + { + if( aStatus.getFileType() == osl::FileStatus::Link ) + { + if( nLinkLevel > 0 ) + aRet = resolveLink( aStatus.getLinkTargetURL(), o_rResolvedURL, o_rBaseName, o_rType, nLinkLevel-1 ); + else + aRet = osl::FileBase::E_MULTIHOP; + } + else + { + o_rResolvedURL = i_rURL; + o_rBaseName = aStatus.getFileName(); + o_rType = aStatus.getFileType(); + } + } + } + return aRet; +} + +void PPDParser::scanPPDDir( const String& rDir ) +{ + static struct suffix_t + { + const sal_Char* pSuffix; + const sal_Int32 nSuffixLen; + } const pSuffixes[] = + { { ".PS", 3 }, { ".PPD", 4 }, { ".PS.GZ", 6 }, { ".PPD.GZ", 7 } }; + + const int nSuffixes = sizeof(pSuffixes)/sizeof(pSuffixes[0]); + + osl::Directory aDir( rDir ); + if ( aDir.open() == osl::FileBase::E_None ) + { + osl::DirectoryItem aItem; + + INetURLObject aPPDDir(rDir); + while( aDir.getNextItem( aItem ) == osl::FileBase::E_None ) + { + osl::FileStatus aStatus( FileStatusMask_FileName ); + if( aItem.getFileStatus( aStatus ) == osl::FileBase::E_None ) + { + rtl::OUStringBuffer aURLBuf( rDir.Len() + 64 ); + aURLBuf.append( rDir ); + aURLBuf.append( sal_Unicode( '/' ) ); + aURLBuf.append( aStatus.getFileName() ); + + rtl::OUString aFileURL, aFileName; + osl::FileStatus::Type eType = osl::FileStatus::Unknown; + + if( resolveLink( aURLBuf.makeStringAndClear(), aFileURL, aFileName, eType ) == osl::FileBase::E_None ) + { + if( eType == osl::FileStatus::Regular ) + { + INetURLObject aPPDFile = aPPDDir; + aPPDFile.Append( aFileName ); + + // match extension + for( int nSuffix = 0; nSuffix < nSuffixes; nSuffix++ ) + { + if( aFileName.getLength() > pSuffixes[nSuffix].nSuffixLen ) + { + if( aFileName.endsWithIgnoreAsciiCaseAsciiL( pSuffixes[nSuffix].pSuffix, pSuffixes[nSuffix].nSuffixLen ) ) + { + (*pAllPPDFiles)[ aFileName.copy( 0, aFileName.getLength() - pSuffixes[nSuffix].nSuffixLen ) ] = aPPDFile.PathToFileName(); + break; + } + } + } + } + else if( eType == osl::FileStatus::Directory ) + { + scanPPDDir( aFileURL ); + } + } + } + } + aDir.close(); + } +} + +void PPDParser::initPPDFiles() +{ + if( pAllPPDFiles ) + return; + + pAllPPDFiles = new std::hash_map< OUString, OUString, OUStringHash >(); + + // check installation directories + std::list< OUString > aPathList; + psp::getPrinterPathList( aPathList, PRINTER_PPDDIR ); + for( std::list< OUString >::const_iterator ppd_it = aPathList.begin(); ppd_it != aPathList.end(); ++ppd_it ) + { + INetURLObject aPPDDir( *ppd_it, INET_PROT_FILE, INetURLObject::ENCODE_ALL ); + scanPPDDir( aPPDDir.GetMainURL( INetURLObject::NO_DECODE ) ); + } + if( pAllPPDFiles->find( OUString( RTL_CONSTASCII_USTRINGPARAM( "SGENPRT" ) ) ) == pAllPPDFiles->end() ) + { + // last try: search in directory of executable (mainly for setup) + OUString aExe; + if( osl_getExecutableFile( &aExe.pData ) == osl_Process_E_None ) + { + INetURLObject aDir( aExe ); + aDir.removeSegment(); +#ifdef DEBUG + fprintf( stderr, "scanning last chance dir: %s\n", OUStringToOString( aDir.GetMainURL( INetURLObject::NO_DECODE ), osl_getThreadTextEncoding() ).getStr() ); +#endif + scanPPDDir( aDir.GetMainURL( INetURLObject::NO_DECODE ) ); +#ifdef DEBUG + fprintf( stderr, "SGENPRT %s\n", pAllPPDFiles->find( OUString( RTL_CONSTASCII_USTRINGPARAM( "SGENPRT" ) ) ) == pAllPPDFiles->end() ? "not found" : "found" ); +#endif + } + } +} + +void PPDParser::getKnownPPDDrivers( std::list< rtl::OUString >& o_rDrivers, bool bRefresh ) +{ + if( bRefresh ) + { + delete pAllPPDFiles; + pAllPPDFiles = NULL; + } + + initPPDFiles(); + o_rDrivers.clear(); + + std::hash_map< OUString, OUString, OUStringHash >::const_iterator it; + for( it = pAllPPDFiles->begin(); it != pAllPPDFiles->end(); ++it ) + o_rDrivers.push_back( it->first ); +} + +String PPDParser::getPPDFile( const String& rFile ) +{ + INetURLObject aPPD( rFile, INET_PROT_FILE, INetURLObject::ENCODE_ALL ); + // someone might enter a full qualified name here + PPDDecompressStream aStream( aPPD.PathToFileName() ); + if( ! aStream.IsOpen() ) + { + std::hash_map< OUString, OUString, OUStringHash >::const_iterator it; + + bool bRetry = true; + do + { + initPPDFiles(); + // some PPD files contain dots beside the extension, so try name first + // and cut of points after that + rtl::OUString aBase( rFile ); + sal_Int32 nLastIndex = aBase.lastIndexOf( sal_Unicode( '/' ) ); + if( nLastIndex >= 0 ) + aBase = aBase.copy( nLastIndex+1 ); + do + { + it = pAllPPDFiles->find( aBase ); + nLastIndex = aBase.lastIndexOf( sal_Unicode( '.' ) ); + if( nLastIndex > 0 ) + aBase = aBase.copy( 0, nLastIndex ); + } while( it == pAllPPDFiles->end() && nLastIndex > 0 ); + + if( it == pAllPPDFiles->end() && bRetry ) + { + // a new file ? rehash + delete pAllPPDFiles; pAllPPDFiles = NULL; + bRetry = false; + // note this is optimized for office start where + // no new files occur and initPPDFiles is called only once + } + } while( ! pAllPPDFiles ); + + if( it != pAllPPDFiles->end() ) + aStream.Open( it->second ); + } + + String aRet; + if( aStream.IsOpen() ) + { + ByteString aLine; + aStream.ReadLine( aLine ); + if( aLine.Search( "*PPD-Adobe" ) == 0 ) + aRet = aStream.GetFileName(); + else + { + // our *Include hack does usually not begin + // with *PPD-Adobe, so try some lines for *Include + int nLines = 10; + while( aLine.Search( "*Include" ) != 0 && --nLines ) + aStream.ReadLine( aLine ); + if( nLines ) + aRet = aStream.GetFileName(); + } + } + + return aRet; +} + +String PPDParser::getPPDPrinterName( const String& rFile ) +{ + String aPath = getPPDFile( rFile ); + String aName; + + // read in the file + PPDDecompressStream aStream( aPath ); + if( aStream.IsOpen() ) + { + String aCurLine; + while( ! aStream.IsEof() && aStream.IsOpen() ) + { + ByteString aByteLine; + aStream.ReadLine( aByteLine ); + aCurLine = String( aByteLine, RTL_TEXTENCODING_MS_1252 ); + if( aCurLine.CompareIgnoreCaseToAscii( "*include:", 9 ) == COMPARE_EQUAL ) + { + aCurLine.Erase( 0, 9 ); + aCurLine.EraseLeadingChars( ' ' ); + aCurLine.EraseTrailingChars( ' ' ); + aCurLine.EraseLeadingChars( '\t' ); + aCurLine.EraseTrailingChars( '\t' ); + aCurLine.EraseTrailingChars( '\r' ); + aCurLine.EraseTrailingChars( '\n' ); + aCurLine.EraseLeadingChars( '"' ); + aCurLine.EraseTrailingChars( '"' ); + aStream.Close(); + aStream.Open( getPPDFile( aCurLine ) ); + continue; + } + if( aCurLine.CompareToAscii( "*ModelName:", 11 ) == COMPARE_EQUAL ) + { + aName = aCurLine.GetToken( 1, '"' ); + break; + } + else if( aCurLine.CompareToAscii( "*NickName:", 10 ) == COMPARE_EQUAL ) + aName = aCurLine.GetToken( 1, '"' ); + } + } + return aName; +} + +const PPDParser* PPDParser::getParser( const String& rFile ) +{ + static ::osl::Mutex aMutex; + ::osl::Guard< ::osl::Mutex > aGuard( aMutex ); + + String aFile = rFile; + if( rFile.CompareToAscii( "CUPS:", 5 ) != COMPARE_EQUAL ) + aFile = getPPDFile( rFile ); + if( ! aFile.Len() ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "Could not get printer PPD file \"%s\" !\n", OUStringToOString( rFile, osl_getThreadTextEncoding() ).getStr() ); +#endif + return NULL; + } + + for( ::std::list< PPDParser* >::const_iterator it = aAllParsers.begin(); it != aAllParsers.end(); ++it ) + if( (*it)->m_aFile == aFile ) + return *it; + + PPDParser* pNewParser = NULL; + if( aFile.CompareToAscii( "CUPS:", 5 ) != COMPARE_EQUAL ) + pNewParser = new PPDParser( aFile ); + else + { + PrinterInfoManager& rMgr = PrinterInfoManager::get(); + if( rMgr.getType() == PrinterInfoManager::CUPS ) + { + pNewParser = const_cast(static_cast(rMgr).createCUPSParser( aFile )); + } + } + if( pNewParser ) + { + // this may actually be the SGENPRT parser, + // so ensure uniquness here + aAllParsers.remove( pNewParser ); + // insert new parser to list + aAllParsers.push_front( pNewParser ); + } + return pNewParser; +} + +void PPDParser::freeAll() +{ + while( aAllParsers.begin() != aAllParsers.end() ) + { + delete aAllParsers.front(); + aAllParsers.pop_front(); + } + delete pAllPPDFiles; + pAllPPDFiles = NULL; +} + +PPDParser::PPDParser( const String& rFile ) : + m_aFile( rFile ), + m_bType42Capable( false ), + m_aFileEncoding( RTL_TEXTENCODING_MS_1252 ), + m_pDefaultImageableArea( NULL ), + m_pImageableAreas( NULL ), + m_pDefaultPaperDimension( NULL ), + m_pPaperDimensions( NULL ), + m_pDefaultInputSlot( NULL ), + m_pInputSlots( NULL ), + m_pDefaultResolution( NULL ), + m_pResolutions( NULL ), + m_pDefaultDuplexType( NULL ), + m_pDuplexTypes( NULL ), + m_pFontList( NULL ), + m_pTranslator( new PPDTranslator() ) +{ + // read in the file + std::list< ByteString > aLines; + PPDDecompressStream aStream( m_aFile ); + bool bLanguageEncoding = false; + if( aStream.IsOpen() ) + { + ByteString aCurLine; + while( ! aStream.IsEof() ) + { + aStream.ReadLine( aCurLine ); + if( aCurLine.GetChar( 0 ) == '*' ) + { + if( aCurLine.CompareIgnoreCaseToAscii( "*include:", 9 ) == COMPARE_EQUAL ) + { + aCurLine.Erase( 0, 9 ); + aCurLine.EraseLeadingChars( ' ' ); + aCurLine.EraseTrailingChars( ' ' ); + aCurLine.EraseLeadingChars( '\t' ); + aCurLine.EraseTrailingChars( '\t' ); + aCurLine.EraseTrailingChars( '\r' ); + aCurLine.EraseTrailingChars( '\n' ); + aCurLine.EraseLeadingChars( '"' ); + aCurLine.EraseTrailingChars( '"' ); + aStream.Close(); + aStream.Open( getPPDFile( String( aCurLine, m_aFileEncoding ) ) ); + continue; + } + else if( ! bLanguageEncoding && + aCurLine.CompareIgnoreCaseToAscii( "*languageencoding", 17 ) == COMPARE_EQUAL ) + { + bLanguageEncoding = true; // generally only the first one counts + ByteString aLower = aCurLine; + aLower.ToLowerAscii(); + if( aLower.Search( "isolatin1", 17 ) != STRING_NOTFOUND || + aLower.Search( "windowsansi", 17 ) != STRING_NOTFOUND ) + m_aFileEncoding = RTL_TEXTENCODING_MS_1252; + else if( aLower.Search( "isolatin2", 17 ) != STRING_NOTFOUND ) + m_aFileEncoding = RTL_TEXTENCODING_ISO_8859_2; + else if( aLower.Search( "isolatin5", 17 ) != STRING_NOTFOUND ) + m_aFileEncoding = RTL_TEXTENCODING_ISO_8859_5; + else if( aLower.Search( "jis83-rksj", 17 ) != STRING_NOTFOUND ) + m_aFileEncoding = RTL_TEXTENCODING_SHIFT_JIS; + else if( aLower.Search( "macstandard", 17 ) != STRING_NOTFOUND ) + m_aFileEncoding = RTL_TEXTENCODING_APPLE_ROMAN; + else if( aLower.Search( "utf-8", 17 ) != STRING_NOTFOUND ) + m_aFileEncoding = RTL_TEXTENCODING_UTF8; + } + } + aLines.push_back( aCurLine ); + } + } + aStream.Close(); + + // now get the Values + parse( aLines ); +#if OSL_DEBUG_LEVEL > 2 + fprintf( stderr, "acquired %d Keys from PPD %s:\n", m_aKeys.size(), BSTRING( m_aFile ).GetBuffer() ); + for( PPDParser::hash_type::const_iterator it = m_aKeys.begin(); it != m_aKeys.end(); ++it ) + { + const PPDKey* pKey = it->second; + char* pSetupType = ""; + switch( pKey->m_eSetupType ) + { + case PPDKey::ExitServer: pSetupType = "ExitServer";break; + case PPDKey::Prolog: pSetupType = "Prolog";break; + case PPDKey::DocumentSetup: pSetupType = "DocumentSetup";break; + case PPDKey::PageSetup: pSetupType = "PageSetup";break; + case PPDKey::JCLSetup: pSetupType = "JCLSetup";break; + case PPDKey::AnySetup: pSetupType = "AnySetup";break; + default: break; + }; + fprintf( stderr, "\t\"%s\" (\"%s\") (%d values) OrderDependency: %d %s\n", + BSTRING( pKey->getKey() ).GetBuffer(), + BSTRING( pKey->m_aUITranslation ).GetBuffer(), + pKey->countValues(), + pKey->m_nOrderDependency, + pSetupType ); + for( int j = 0; j < pKey->countValues(); j++ ) + { + fprintf( stderr, "\t\t" ); + const PPDValue* pValue = pKey->getValue( j ); + if( pValue == pKey->m_pDefaultValue ) + fprintf( stderr, "(Default:) " ); + char* pVType = ""; + switch( pValue->m_eType ) + { + case eInvocation: pVType = "invocation";break; + case eQuoted: pVType = "quoted";break; + case eString: pVType = "string";break; + case eSymbol: pVType = "symbol";break; + case eNo: pVType = "no";break; + default: break; + }; + fprintf( stderr, "option: \"%s\" (\"%s\"), value: type %s \"%s\" (\"%s\")\n", + BSTRING( pValue->m_aOption ).GetBuffer(), + BSTRING( pValue->m_aOptionTranslation ).GetBuffer(), + pVType, + BSTRING( pValue->m_aValue ).GetBuffer(), + BSTRING( pValue->m_aValueTranslation ).GetBuffer() ); + } + } + fprintf( stderr, "constraints: (%d found)\n", m_aConstraints.size() ); + for( std::list< PPDConstraint >::const_iterator cit = m_aConstraints.begin(); cit != m_aConstraints.end(); ++cit ) + { + fprintf( stderr, "*\"%s\" \"%s\" *\"%s\" \"%s\"\n", + BSTRING( cit->m_pKey1->getKey() ).GetBuffer(), + cit->m_pOption1 ? BSTRING( cit->m_pOption1->m_aOption ).GetBuffer() : "", + BSTRING( cit->m_pKey2->getKey() ).GetBuffer(), + cit->m_pOption2 ? BSTRING( cit->m_pOption2->m_aOption ).GetBuffer() : "" + ); + } +#endif + + // fill in shortcuts + const PPDKey* pKey; + + m_pImageableAreas = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "ImageableArea" ) ) ); + if( m_pImageableAreas ) + m_pDefaultImageableArea = m_pImageableAreas->getDefaultValue(); + DBG_ASSERT( m_pImageableAreas, "Warning: no ImageableArea in PPD\n" ); + DBG_ASSERT( m_pDefaultImageableArea, "Warning: no DefaultImageableArea in PPD\n" ); + + m_pPaperDimensions = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PaperDimension" ) ) ); + if( m_pPaperDimensions ) + m_pDefaultPaperDimension = m_pPaperDimensions->getDefaultValue(); + DBG_ASSERT( m_pPaperDimensions, "Warning: no PaperDimension in PPD\n" ); + DBG_ASSERT( m_pDefaultPaperDimension, "Warning: no DefaultPaperDimension in PPD\n" ); + + m_pResolutions = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Resolution" ) ) ); + if( m_pResolutions ) + m_pDefaultResolution = m_pResolutions->getDefaultValue(); + DBG_ASSERT( m_pResolutions, "Warning: no Resolution in PPD\n" ); + DBG_ASSERT( m_pDefaultResolution, "Warning: no DefaultResolution in PPD\n" ); + + m_pInputSlots = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) ); + if( m_pInputSlots ) + m_pDefaultInputSlot = m_pInputSlots->getDefaultValue(); + DBG_ASSERT( m_pPaperDimensions, "Warning: no InputSlot in PPD\n" ); + DBG_ASSERT( m_pDefaultPaperDimension, "Warning: no DefaultInputSlot in PPD\n" ); + + m_pDuplexTypes = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) ); + if( m_pDuplexTypes ) + m_pDefaultDuplexType = m_pDuplexTypes->getDefaultValue(); + + m_pFontList = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Font" ) ) ); + DBG_ASSERT( m_pFontList, "Warning: no Font in PPD\n" ); + + // fill in direct values + if( (pKey = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "ModelName" ) ) )) ) + m_aPrinterName = pKey->getValue( 0 )->m_aValue; + if( (pKey = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "NickName" ) ) )) ) + m_aNickName = pKey->getValue( 0 )->m_aValue; + if( (pKey = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "ColorDevice" ) ) )) ) + m_bColorDevice = pKey->getValue( 0 )->m_aValue.CompareIgnoreCaseToAscii( "true", 4 ) == COMPARE_EQUAL ? true : false; + + if( (pKey = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "LanguageLevel" ) ) )) ) + m_nLanguageLevel = pKey->getValue( 0 )->m_aValue.ToInt32(); + if( (pKey = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "TTRasterizer" ) ) )) ) + m_bType42Capable = pKey->getValue( 0 )->m_aValue.EqualsIgnoreCaseAscii( "Type42" ) ? true : false; +} + +PPDParser::~PPDParser() +{ + for( PPDParser::hash_type::iterator it = m_aKeys.begin(); it != m_aKeys.end(); ++it ) + delete it->second; + delete m_pTranslator; +} + +void PPDParser::insertKey( const String& rKey, PPDKey* pKey ) +{ + m_aKeys[ rKey ] = pKey; + m_aOrderedKeys.push_back( pKey ); +} + +const PPDKey* PPDParser::getKey( int n ) const +{ + return ((unsigned int)n < m_aOrderedKeys.size() && n >= 0) ? m_aOrderedKeys[n] : NULL; +} + +const PPDKey* PPDParser::getKey( const String& rKey ) const +{ + PPDParser::hash_type::const_iterator it = m_aKeys.find( rKey ); + return it != m_aKeys.end() ? it->second : NULL; +} + +bool PPDParser::hasKey( const PPDKey* pKey ) const +{ + return + pKey ? + ( m_aKeys.find( pKey->getKey() ) != m_aKeys.end() ? true : false ) : + false; +} + +static sal_uInt8 getNibble( sal_Char cChar ) +{ + sal_uInt8 nRet = 0; + if( cChar >= '0' && cChar <= '9' ) + nRet = sal_uInt8( cChar - '0' ); + else if( cChar >= 'A' && cChar <= 'F' ) + nRet = 10 + sal_uInt8( cChar - 'A' ); + else if( cChar >= 'a' && cChar <= 'f' ) + nRet = 10 + sal_uInt8( cChar - 'a' ); + return nRet; +} + +String PPDParser::handleTranslation( const ByteString& i_rString, bool bIsGlobalized ) +{ + int nOrigLen = i_rString.Len(); + OStringBuffer aTrans( nOrigLen ); + const sal_Char* pStr = i_rString.GetBuffer(); + const sal_Char* pEnd = pStr + nOrigLen; + while( pStr < pEnd ) + { + if( *pStr == '<' ) + { + pStr++; + sal_Char cChar; + while( *pStr != '>' && pStr < pEnd-1 ) + { + cChar = getNibble( *pStr++ ) << 4; + cChar |= getNibble( *pStr++ ); + aTrans.append( cChar ); + } + pStr++; + } + else + aTrans.append( *pStr++ ); + } + return OStringToOUString( aTrans.makeStringAndClear(), bIsGlobalized ? RTL_TEXTENCODING_UTF8 : m_aFileEncoding ); +} + +void PPDParser::parse( ::std::list< ByteString >& rLines ) +{ + std::list< ByteString >::iterator line = rLines.begin(); + PPDParser::hash_type::const_iterator keyit; + while( line != rLines.end() ) + { + ByteString aCurrentLine( *line ); + ++line; + if( aCurrentLine.GetChar(0) != '*' ) + continue; + if( aCurrentLine.GetChar(1) == '%' ) + continue; + + ByteString aKey = GetCommandLineToken( 0, aCurrentLine.GetToken( 0, ':' ) ); + int nPos = aKey.Search( '/' ); + if( nPos != STRING_NOTFOUND ) + aKey.Erase( nPos ); + aKey.Erase( 0, 1 ); // remove the '*' + + if( aKey.Equals( "CloseUI" ) || aKey.Equals( "OpenGroup" ) || aKey.Equals( "CloseGroup" ) || aKey.Equals( "End" ) || aKey.Equals( "OpenSubGroup" ) || aKey.Equals( "CloseSubGroup" ) ) + continue; + + if( aKey.Equals( "OpenUI" ) ) + { + parseOpenUI( aCurrentLine ); + continue; + } + else if( aKey.Equals( "OrderDependency" ) ) + { + parseOrderDependency( aCurrentLine ); + continue; + } + else if( aKey.Equals( "UIConstraints" ) || aKey.Equals( "NonUIConstraints" ) ) + continue; // parsed in pass 2 + else if( aKey.Equals( "CustomPageSize" ) ) // currently not handled + continue; + + // default values are parsed in pass 2 + if( aKey.CompareTo( "Default", 7 ) == COMPARE_EQUAL ) + continue; + + bool bQuery = false; + if( aKey.GetChar( 0 ) == '?' ) + { + aKey.Erase( 0, 1 ); + bQuery = true; + } + + String aUniKey( aKey, RTL_TEXTENCODING_MS_1252 ); + // handle CUPS extension for globalized PPDs + bool bIsGlobalizedLine = false; + com::sun::star::lang::Locale aTransLocale; + if( ( aUniKey.Len() > 3 && aUniKey.GetChar( 2 ) == '.' ) || + ( aUniKey.Len() > 5 && aUniKey.GetChar( 2 ) == '_' && aUniKey.GetChar( 5 ) == '.' ) ) + { + if( aUniKey.GetChar( 2 ) == '.' ) + { + aTransLocale.Language = aUniKey.Copy( 0, 2 ); + aUniKey = aUniKey.Copy( 3 ); + } + else + { + aTransLocale.Language = aUniKey.Copy( 0, 2 ); + aTransLocale.Country = aUniKey.Copy( 3, 2 ); + aUniKey = aUniKey.Copy( 6 ); + } + bIsGlobalizedLine = true; + } + + String aOption; + nPos = aCurrentLine.Search( ':' ); + if( nPos != STRING_NOTFOUND ) + { + aOption = String( aCurrentLine.Copy( 1, nPos-1 ), RTL_TEXTENCODING_MS_1252 ); + aOption = GetCommandLineToken( 1, aOption ); + int nTransPos = aOption.Search( '/' ); + if( nTransPos != STRING_NOTFOUND ) + aOption.Erase( nTransPos ); + } + + PPDValueType eType = eNo; + String aValue; + rtl::OUString aOptionTranslation; + rtl::OUString aValueTranslation; + if( nPos != STRING_NOTFOUND ) + { + // found a colon, there may be an option + ByteString aLine = aCurrentLine.Copy( 1, nPos-1 ); + aLine = WhitespaceToSpace( aLine ); + int nTransPos = aLine.Search( '/' ); + if( nTransPos != STRING_NOTFOUND ) + aOptionTranslation = handleTranslation( aLine.Copy( nTransPos+1 ), bIsGlobalizedLine ); + + // read in more lines if necessary for multiline values + aLine = aCurrentLine.Copy( nPos+1 ); + if( aLine.Len() ) + { + while( ! ( aLine.GetTokenCount( '"' ) & 1 ) && + line != rLines.end() ) + // while there is an even number of tokens; that means + // an odd number of doubleqoutes + { + // copy the newlines also + aLine += '\n'; + aLine += *line; + ++line; + } + } + aLine = WhitespaceToSpace( aLine ); + + // #i100644# handle a missing value (actually a broken PPD) + if( ! aLine.Len() ) + { + if( aOption.Len() && + aUniKey.CompareToAscii( "JCL", 3 ) != COMPARE_EQUAL ) + eType = eInvocation; + else + eType = eQuoted; + } + // check for invocation or quoted value + else if( aLine.GetChar(0) == '"' ) + { + aLine.Erase( 0, 1 ); + nTransPos = aLine.Search( '"' ); + aValue = String( aLine.Copy( 0, nTransPos ), RTL_TEXTENCODING_MS_1252 ); + // after the second doublequote can follow a / and a translation + aValueTranslation = handleTranslation( aLine.Copy( nTransPos+2 ), bIsGlobalizedLine ); + // check for quoted value + if( aOption.Len() && + aUniKey.CompareToAscii( "JCL", 3 ) != COMPARE_EQUAL ) + eType = eInvocation; + else + eType = eQuoted; + } + // check for symbol value + else if( aLine.GetChar(0) == '^' ) + { + aLine.Erase( 0, 1 ); + aValue = String( aLine, RTL_TEXTENCODING_MS_1252 ); + eType = eSymbol; + } + else + { + // must be a string value then + // strictly this is false because string values + // can contain any whitespace which is reduced + // to one space by now + // who cares ... + nTransPos = aLine.Search( '/' ); + if( nTransPos == STRING_NOTFOUND ) + nTransPos = aLine.Len(); + aValue = String( aLine.Copy( 0, nTransPos ), RTL_TEXTENCODING_MS_1252 ); + aValueTranslation = handleTranslation( aLine.Copy( nTransPos+1 ), bIsGlobalizedLine ); + eType = eString; + } + } + + // handle globalized PPD entries + if( bIsGlobalizedLine ) + { + // handle main key translations of form: + // *ll_CC.Translation MainKeyword/translated text: "" + if( aUniKey.EqualsAscii( "Translation" ) ) + { + m_pTranslator->insertKey( aOption, aOptionTranslation, aTransLocale ); + } + // handle options translations of for: + // *ll_CC.MainKeyword OptionKeyword/translated text: "" + else + { + m_pTranslator->insertOption( aUniKey, aOption, aOptionTranslation, aTransLocale ); + } + continue; + } + + PPDKey* pKey = NULL; + keyit = m_aKeys.find( aUniKey ); + if( keyit == m_aKeys.end() ) + { + pKey = new PPDKey( aUniKey ); + insertKey( aUniKey, pKey ); + } + else + pKey = keyit->second; + + if( eType == eNo && bQuery ) + continue; + + PPDValue* pValue = pKey->insertValue( aOption ); + if( ! pValue ) + continue; + pValue->m_eType = eType; + pValue->m_aValue = aValue; + + if( aOptionTranslation.getLength() ) + m_pTranslator->insertOption( aUniKey, aOption, aOptionTranslation, aTransLocale ); + if( aValueTranslation.getLength() ) + m_pTranslator->insertValue( aUniKey, aOption, aValue, aValueTranslation, aTransLocale ); + + // eventually update query and remove from option list + if( bQuery && pKey->m_bQueryValue == FALSE ) + { + pKey->m_aQueryValue = *pValue; + pKey->m_bQueryValue = true; + pKey->eraseValue( pValue->m_aOption ); + } + } + + // second pass: fill in defaults + for( line = rLines.begin(); line != rLines.end(); ++line ) + { + ByteString aLine( *line ); + if( aLine.CompareTo( "*Default", 8 ) == COMPARE_EQUAL ) + { + String aKey( aLine.Copy( 8 ), RTL_TEXTENCODING_MS_1252 ); + USHORT nPos = aKey.Search( ':' ); + if( nPos != STRING_NOTFOUND ) + { + aKey.Erase( nPos ); + String aOption( WhitespaceToSpace( aLine.Copy( nPos+9 ) ), RTL_TEXTENCODING_MS_1252 ); + keyit = m_aKeys.find( aKey ); + if( keyit != m_aKeys.end() ) + { + PPDKey* pKey = keyit->second; + const PPDValue* pDefValue = pKey->getValue( aOption ); + if( pKey->m_pDefaultValue == NULL ) + pKey->m_pDefaultValue = pDefValue; + } + else + { + // some PPDs contain defaults for keys that + // do not exist otherwise + // (example: DefaultResolution) + // so invent that key here and have a default value + PPDKey* pKey = new PPDKey( aKey ); + PPDValue* pNewValue = pKey->insertValue( aOption ); + pNewValue->m_eType = eInvocation; // or what ? + insertKey( aKey, pKey ); + } + } + } + else if( aLine.CompareTo( "*UIConstraints", 14 ) == COMPARE_EQUAL || + aLine.CompareTo( "*NonUIConstraints", 17 ) == COMPARE_EQUAL ) + parseConstraint( aLine ); + + } +} + +void PPDParser::parseOpenUI( const ByteString& rLine ) +{ + String aTranslation; + ByteString aKey = rLine; + + int nPos = aKey.Search( ':' ); + if( nPos != STRING_NOTFOUND ) + aKey.Erase( nPos ); + nPos = aKey.Search( '/' ); + if( nPos != STRING_NOTFOUND ) + { + aTranslation = handleTranslation( aKey.Copy( nPos + 1 ), false ); + aKey.Erase( nPos ); + } + aKey = GetCommandLineToken( 1, aKey ); + aKey.Erase( 0, 1 ); + + String aUniKey( aKey, RTL_TEXTENCODING_MS_1252 ); + PPDParser::hash_type::const_iterator keyit = m_aKeys.find( aUniKey ); + PPDKey* pKey; + if( keyit == m_aKeys.end() ) + { + pKey = new PPDKey( aUniKey ); + insertKey( aUniKey, pKey ); + } + else + pKey = keyit->second; + + pKey->m_bUIOption = true; + m_pTranslator->insertKey( pKey->getKey(), aTranslation ); + + ByteString aValue = WhitespaceToSpace( rLine.GetToken( 1, ':' ) ); + if( aValue.CompareIgnoreCaseToAscii( "boolean" ) == COMPARE_EQUAL ) + pKey->m_eUIType = PPDKey::Boolean; + else if( aValue.CompareIgnoreCaseToAscii( "pickmany" ) == COMPARE_EQUAL ) + pKey->m_eUIType = PPDKey::PickMany; + else + pKey->m_eUIType = PPDKey::PickOne; +} + +void PPDParser::parseOrderDependency( const ByteString& rLine ) +{ + ByteString aLine( rLine ); + int nPos = aLine.Search( ':' ); + if( nPos != STRING_NOTFOUND ) + aLine.Erase( 0, nPos+1 ); + + int nOrder = GetCommandLineToken( 0, aLine ).ToInt32(); + ByteString aSetup = GetCommandLineToken( 1, aLine ); + String aKey( GetCommandLineToken( 2, aLine ), RTL_TEXTENCODING_MS_1252 ); + if( aKey.GetChar( 0 ) != '*' ) + return; // invalid order depency + aKey.Erase( 0, 1 ); + + PPDKey* pKey; + PPDParser::hash_type::const_iterator keyit = m_aKeys.find( aKey ); + if( keyit == m_aKeys.end() ) + { + pKey = new PPDKey( aKey ); + insertKey( aKey, pKey ); + } + else + pKey = keyit->second; + + pKey->m_nOrderDependency = nOrder; + if( aSetup.Equals( "ExitServer" ) ) + pKey->m_eSetupType = PPDKey::ExitServer; + else if( aSetup.Equals( "Prolog" ) ) + pKey->m_eSetupType = PPDKey::Prolog; + else if( aSetup.Equals( "DocumentSetup" ) ) + pKey->m_eSetupType = PPDKey::DocumentSetup; + else if( aSetup.Equals( "PageSetup" ) ) + pKey->m_eSetupType = PPDKey::PageSetup; + else if( aSetup.Equals( "JCLSetup" ) ) + pKey->m_eSetupType = PPDKey::JCLSetup; + else + pKey->m_eSetupType = PPDKey::AnySetup; +} + +void PPDParser::parseConstraint( const ByteString& rLine ) +{ + bool bFailed = false; + + String aLine( rLine, RTL_TEXTENCODING_MS_1252 ); + aLine.Erase( 0, rLine.Search( ':' )+1 ); + PPDConstraint aConstraint; + int nTokens = GetCommandLineTokenCount( aLine ); + for( int i = 0; i < nTokens; i++ ) + { + String aToken = GetCommandLineToken( i, aLine ); + if( aToken.GetChar( 0 ) == '*' ) + { + aToken.Erase( 0, 1 ); + if( aConstraint.m_pKey1 ) + aConstraint.m_pKey2 = getKey( aToken ); + else + aConstraint.m_pKey1 = getKey( aToken ); + } + else + { + if( aConstraint.m_pKey2 ) + { + if( ! ( aConstraint.m_pOption2 = aConstraint.m_pKey2->getValue( aToken ) ) ) + bFailed = true; + } + else if( aConstraint.m_pKey1 ) + { + if( ! ( aConstraint.m_pOption1 = aConstraint.m_pKey1->getValue( aToken ) ) ) + bFailed = true; + } + else + // constraint for nonexistent keys; this happens + // e.g. in HP4PLUS3 (#75636#) + bFailed = true; + } + } + // there must be two keywords + if( ! aConstraint.m_pKey1 || ! aConstraint.m_pKey2 || bFailed ) + { +#ifdef __DEBUG + fprintf( stderr, "Warning: constraint \"%s\" is invalid\n", rLine.GetStr() ); +#endif + } + else + m_aConstraints.push_back( aConstraint ); +} + +String PPDParser::getDefaultPaperDimension() const +{ + if( m_pDefaultPaperDimension ) + return m_pDefaultPaperDimension->m_aOption; + + return String(); +} + +bool PPDParser::getMargins( + const String& rPaperName, + int& rLeft, int& rRight, + int& rUpper, int& rLower ) const +{ + if( ! m_pImageableAreas || ! m_pPaperDimensions ) + return false; + + int nPDim=-1, nImArea=-1, i; + for( i = 0; i < m_pImageableAreas->countValues(); i++ ) + if( rPaperName == m_pImageableAreas->getValue( i )->m_aOption ) + nImArea = i; + for( i = 0; i < m_pPaperDimensions->countValues(); i++ ) + if( rPaperName == m_pPaperDimensions->getValue( i )->m_aOption ) + nPDim = i; + if( nPDim == -1 || nImArea == -1 ) + return false; + + double ImLLx, ImLLy, ImURx, ImURy; + double PDWidth, PDHeight; + String aArea = m_pImageableAreas->getValue( nImArea )->m_aValue; + ImLLx = StringToDouble( GetCommandLineToken( 0, aArea ) ); + ImLLy = StringToDouble( GetCommandLineToken( 1, aArea ) ); + ImURx = StringToDouble( GetCommandLineToken( 2, aArea ) ); + ImURy = StringToDouble( GetCommandLineToken( 3, aArea ) ); +// sscanf( m_pImageableAreas->getValue( nImArea )->m_aValue.GetStr(), +// "%lg%lg%lg%lg", &ImLLx, &ImLLy, &ImURx, &ImURy ); + aArea = m_pPaperDimensions->getValue( nPDim )->m_aValue; + PDWidth = StringToDouble( GetCommandLineToken( 0, aArea ) ); + PDHeight = StringToDouble( GetCommandLineToken( 1, aArea ) ); +// sscanf( m_pPaperDimensions->getValue( nPDim )->m_aValue.GetStr(), +// "%lg%lg", &PDWidth, &PDHeight ); + rLeft = (int)(ImLLx + 0.5); + rLower = (int)(ImLLy + 0.5); + rUpper = (int)(PDHeight - ImURy + 0.5); + rRight = (int)(PDWidth - ImURx + 0.5); + + return true; +} + +bool PPDParser::getPaperDimension( + const String& rPaperName, + int& rWidth, int& rHeight ) const +{ + if( ! m_pPaperDimensions ) + return false; + + int nPDim=-1; + for( int i = 0; i < m_pPaperDimensions->countValues(); i++ ) + if( rPaperName == m_pPaperDimensions->getValue( i )->m_aOption ) + nPDim = i; + if( nPDim == -1 ) + return false; + + double PDWidth, PDHeight; + String aArea = m_pPaperDimensions->getValue( nPDim )->m_aValue; + PDWidth = StringToDouble( GetCommandLineToken( 0, aArea ) ); + PDHeight = StringToDouble( GetCommandLineToken( 1, aArea ) ); + rHeight = (int)(PDHeight + 0.5); + rWidth = (int)(PDWidth + 0.5); + + return true; +} + +String PPDParser::matchPaper( int nWidth, int nHeight ) const +{ + if( ! m_pPaperDimensions ) + return String(); + + int nPDim = -1; + double PDWidth, PDHeight; + double fSort = 2e36, fNewSort; + + for( int i = 0; i < m_pPaperDimensions->countValues(); i++ ) + { + String aArea = m_pPaperDimensions->getValue( i )->m_aValue; + PDWidth = StringToDouble( GetCommandLineToken( 0, aArea ) ); + PDHeight = StringToDouble( GetCommandLineToken( 1, aArea ) ); + PDWidth /= (double)nWidth; + PDHeight /= (double)nHeight; + if( PDWidth >= 0.9 && PDWidth <= 1.1 && + PDHeight >= 0.9 && PDHeight <= 1.1 ) + { + fNewSort = + (1.0-PDWidth)*(1.0-PDWidth) + (1.0-PDHeight)*(1.0-PDHeight); + if( fNewSort == 0.0 ) // perfect match + return m_pPaperDimensions->getValue( i )->m_aOption; + + if( fNewSort < fSort ) + { + fSort = fNewSort; + nPDim = i; + } + } + } + + static bool bDontSwap = false; + if( nPDim == -1 && ! bDontSwap ) + { + // swap portrait/landscape and try again + bDontSwap = true; + String rRet = matchPaper( nHeight, nWidth ); + bDontSwap = false; + return rRet; + } + + return nPDim != -1 ? m_pPaperDimensions->getValue( nPDim )->m_aOption : String(); +} + +String PPDParser::getDefaultInputSlot() const +{ + if( m_pDefaultInputSlot ) + return m_pDefaultInputSlot->m_aValue; + return String(); +} + +String PPDParser::getSlot( int nSlot ) const +{ + if( ! m_pInputSlots ) + return String(); + + if( nSlot > 0 && nSlot < m_pInputSlots->countValues() ) + return m_pInputSlots->getValue( nSlot )->m_aOption; + else if( m_pInputSlots->countValues() > 0 ) + return m_pInputSlots->getValue( (ULONG)0 )->m_aOption; + + return String(); +} + +String PPDParser::getSlotCommand( int nSlot ) const +{ + if( ! m_pInputSlots ) + return String(); + + if( nSlot > 0 && nSlot < m_pInputSlots->countValues() ) + return m_pInputSlots->getValue( nSlot )->m_aValue; + else if( m_pInputSlots->countValues() > 0 ) + return m_pInputSlots->getValue( (ULONG)0 )->m_aValue; + + return String(); +} + +String PPDParser::getSlotCommand( const String& rSlot ) const +{ + if( ! m_pInputSlots ) + return String(); + + for( int i=0; i < m_pInputSlots->countValues(); i++ ) + { + const PPDValue* pValue = m_pInputSlots->getValue( i ); + if( pValue->m_aOption == rSlot ) + return pValue->m_aValue; + } + return String(); +} + +String PPDParser::getPaperDimension( int nPaperDimension ) const +{ + if( ! m_pPaperDimensions ) + return String(); + + if( nPaperDimension > 0 && nPaperDimension < m_pPaperDimensions->countValues() ) + return m_pPaperDimensions->getValue( nPaperDimension )->m_aOption; + else if( m_pPaperDimensions->countValues() > 0 ) + return m_pPaperDimensions->getValue( (ULONG)0 )->m_aOption; + + return String(); +} + +String PPDParser::getPaperDimensionCommand( int nPaperDimension ) const +{ + if( ! m_pPaperDimensions ) + return String(); + + if( nPaperDimension > 0 && nPaperDimension < m_pPaperDimensions->countValues() ) + return m_pPaperDimensions->getValue( nPaperDimension )->m_aValue; + else if( m_pPaperDimensions->countValues() > 0 ) + return m_pPaperDimensions->getValue( (ULONG)0 )->m_aValue; + + return String(); +} + +String PPDParser::getPaperDimensionCommand( const String& rPaperDimension ) const +{ + if( ! m_pPaperDimensions ) + return String(); + + for( int i=0; i < m_pPaperDimensions->countValues(); i++ ) + { + const PPDValue* pValue = m_pPaperDimensions->getValue( i ); + if( pValue->m_aOption == rPaperDimension ) + return pValue->m_aValue; + } + return String(); +} + +void PPDParser::getResolutionFromString( + const String& rString, + int& rXRes, int& rYRes ) const +{ + int nPos = 0, nDPIPos; + + rXRes = rYRes = 300; + + nDPIPos = rString.SearchAscii( "dpi" ); + if( nDPIPos != STRING_NOTFOUND ) + { + if( ( nPos = rString.Search( 'x' ) ) != STRING_NOTFOUND ) + { + rXRes = rString.Copy( 0, nPos ).ToInt32(); + rYRes = rString.GetToken( 1, 'x' ).Erase( nDPIPos - nPos - 1 ).ToInt32(); + } + else + rXRes = rYRes = rString.Copy( 0, nDPIPos ).ToInt32(); + } +} + +void PPDParser::getDefaultResolution( int& rXRes, int& rYRes ) const +{ + if( m_pDefaultResolution ) + { + getResolutionFromString( m_pDefaultResolution->m_aValue, rXRes, rYRes ); + return; + } + + rXRes = 300; + rYRes = 300; +} + +int PPDParser::getResolutions() const +{ + if( ( ! m_pResolutions || m_pResolutions->countValues() == 0 ) && + m_pDefaultResolution ) + return 1; + return m_pResolutions ? m_pResolutions->countValues() : 0; +} + +void PPDParser::getResolution( int nNr, int& rXRes, int& rYRes ) const +{ + if( ( ! m_pResolutions || m_pResolutions->countValues() == 0 ) && m_pDefaultResolution && nNr == 0 ) + { + getDefaultResolution( rXRes, rYRes ); + return; + } + if( ! m_pResolutions ) + return; + + getResolutionFromString( m_pResolutions->getValue( nNr )->m_aOption, + rXRes, rYRes ); +} + +String PPDParser::getResolutionCommand( int nXRes, int nYRes ) const +{ + if( ( ! m_pResolutions || m_pResolutions->countValues() == 0 ) && m_pDefaultResolution ) + return m_pDefaultResolution->m_aValue; + + if( ! m_pResolutions ) + return String(); + + int nX, nY; + for( int i = 0; i < m_pResolutions->countValues(); i++ ) + { + getResolutionFromString( m_pResolutions->getValue( i )->m_aOption, + nX, nY ); + if( nX == nXRes && nY == nYRes ) + return m_pResolutions->getValue( i )->m_aValue; + } + return String(); +} + +String PPDParser::getDefaultDuplexType() const +{ + if( m_pDefaultDuplexType ) + return m_pDefaultDuplexType->m_aValue; + return String(); +} + +String PPDParser::getDuplex( int nDuplex ) const +{ + if( ! m_pDuplexTypes ) + return String(); + + if( nDuplex > 0 && nDuplex < m_pDuplexTypes->countValues() ) + return m_pDuplexTypes->getValue( nDuplex )->m_aOption; + else if( m_pDuplexTypes->countValues() > 0 ) + return m_pDuplexTypes->getValue( (ULONG)0 )->m_aOption; + + return String(); +} + +String PPDParser::getDuplexCommand( int nDuplex ) const +{ + if( ! m_pDuplexTypes ) + return String(); + + if( nDuplex > 0 && nDuplex < m_pDuplexTypes->countValues() ) + return m_pDuplexTypes->getValue( nDuplex )->m_aValue; + else if( m_pDuplexTypes->countValues() > 0 ) + return m_pDuplexTypes->getValue( (ULONG)0 )->m_aValue; + + return String(); +} + +String PPDParser::getDuplexCommand( const String& rDuplex ) const +{ + if( ! m_pDuplexTypes ) + return String(); + + for( int i=0; i < m_pDuplexTypes->countValues(); i++ ) + { + const PPDValue* pValue = m_pDuplexTypes->getValue( i ); + if( pValue->m_aOption == rDuplex ) + return pValue->m_aValue; + } + return String(); +} + +void PPDParser::getFontAttributes( + int nFont, + String& rEncoding, + String& rCharset ) const +{ + if( m_pFontList && nFont >= 0 && nFont < m_pFontList->countValues() ) + { + String aAttribs = + WhitespaceToSpace( m_pFontList->getValue( nFont )->m_aValue ); + rEncoding = GetCommandLineToken( 0, aAttribs ); + rCharset = GetCommandLineToken( 2, aAttribs ); + } +} + +void PPDParser::getFontAttributes( + const String& rFont, + String& rEncoding, + String& rCharset ) const +{ + if( m_pFontList ) + { + for( int i = 0; i < m_pFontList->countValues(); i++ ) + if( m_pFontList->getValue( i )->m_aOption == rFont ) + getFontAttributes( i, rEncoding, rCharset ); + } +} + +String PPDParser::getFont( int nFont ) const +{ + if( ! m_pFontList ) + return String(); + + if( nFont >=0 && nFont < m_pFontList->countValues() ) + return m_pFontList->getValue( nFont )->m_aOption; + return String(); +} + +rtl::OUString PPDParser::translateKey( const rtl::OUString& i_rKey, + const com::sun::star::lang::Locale& i_rLocale ) const +{ + rtl::OUString aResult( m_pTranslator->translateKey( i_rKey, i_rLocale ) ); + if( aResult.getLength() == 0 ) + aResult = i_rKey; + return aResult; +} + +rtl::OUString PPDParser::translateOption( const rtl::OUString& i_rKey, + const rtl::OUString& i_rOption, + const com::sun::star::lang::Locale& i_rLocale ) const +{ + rtl::OUString aResult( m_pTranslator->translateOption( i_rKey, i_rOption, i_rLocale ) ); + if( aResult.getLength() == 0 ) + aResult = i_rOption; + return aResult; +} + +rtl::OUString PPDParser::translateValue( const rtl::OUString& i_rKey, + const rtl::OUString& i_rOption, + const rtl::OUString& i_rValue, + const com::sun::star::lang::Locale& i_rLocale ) const +{ + rtl::OUString aResult( m_pTranslator->translateValue( i_rKey, i_rOption, i_rValue, i_rLocale ) ); + if( aResult.getLength() == 0 ) + aResult = i_rValue; + return aResult; +} + +/* + * PPDKey + */ + +PPDKey::PPDKey( const String& rKey ) : + m_aKey( rKey ), + m_pDefaultValue( NULL ), + m_bQueryValue( false ), + m_bUIOption( false ), + m_eUIType( PickOne ), + m_nOrderDependency( 100 ), + m_eSetupType( AnySetup ) +{ +} + +// ------------------------------------------------------------------- + +PPDKey::~PPDKey() +{ +} + +// ------------------------------------------------------------------- + +const PPDValue* PPDKey::getValue( int n ) const +{ + return ((unsigned int)n < m_aOrderedValues.size() && n >= 0) ? m_aOrderedValues[n] : NULL; +} + +// ------------------------------------------------------------------- + +const PPDValue* PPDKey::getValue( const String& rOption ) const +{ + PPDKey::hash_type::const_iterator it = m_aValues.find( rOption ); + return it != m_aValues.end() ? &it->second : NULL; +} + +// ------------------------------------------------------------------- + +const PPDValue* PPDKey::getValueCaseInsensitive( const String& rOption ) const +{ + const PPDValue* pValue = getValue( rOption ); + if( ! pValue ) + { + for( size_t n = 0; n < m_aOrderedValues.size() && ! pValue; n++ ) + if( m_aOrderedValues[n]->m_aOption.EqualsIgnoreCaseAscii( rOption ) ) + pValue = m_aOrderedValues[n]; + } + + return pValue; +} + +// ------------------------------------------------------------------- + +void PPDKey::eraseValue( const String& rOption ) +{ + PPDKey::hash_type::iterator it = m_aValues.find( rOption ); + if( it == m_aValues.end() ) + return; + + for( PPDKey::value_type::iterator vit = m_aOrderedValues.begin(); vit != m_aOrderedValues.end(); ++vit ) + { + if( *vit == &(it->second ) ) + { + m_aOrderedValues.erase( vit ); + break; + } + } + m_aValues.erase( it ); +} + +// ------------------------------------------------------------------- + +PPDValue* PPDKey::insertValue( const String& rOption ) +{ + if( m_aValues.find( rOption ) != m_aValues.end() ) + return NULL; + + PPDValue aValue; + aValue.m_aOption = rOption; + m_aValues[ rOption ] = aValue; + PPDValue* pValue = &m_aValues[rOption]; + m_aOrderedValues.push_back( pValue ); + return pValue; +} + +// ------------------------------------------------------------------- + +/* + * PPDContext + */ + +PPDContext::PPDContext( const PPDParser* pParser ) : + m_pParser( pParser ) +{ +} + +// ------------------------------------------------------------------- + +PPDContext& PPDContext::operator=( const PPDContext& rCopy ) +{ + m_pParser = rCopy.m_pParser; + m_aCurrentValues = rCopy.m_aCurrentValues; + return *this; +} + +// ------------------------------------------------------------------- + +PPDContext::~PPDContext() +{ +} + +// ------------------------------------------------------------------- + +const PPDKey* PPDContext::getModifiedKey( int n ) const +{ + hash_type::const_iterator it; + for( it = m_aCurrentValues.begin(); it != m_aCurrentValues.end() && n--; ++it ) + ; + return it != m_aCurrentValues.end() ? it->first : NULL; +} + +// ------------------------------------------------------------------- + +void PPDContext::setParser( const PPDParser* pParser ) +{ + if( pParser != m_pParser ) + { + m_aCurrentValues.clear(); + m_pParser = pParser; + } +} + +// ------------------------------------------------------------------- + +const PPDValue* PPDContext::getValue( const PPDKey* pKey ) const +{ + if( ! m_pParser ) + return NULL; + + hash_type::const_iterator it; + it = m_aCurrentValues.find( pKey ); + if( it != m_aCurrentValues.end() ) + return it->second; + + if( ! m_pParser->hasKey( pKey ) ) + return NULL; + + const PPDValue* pValue = pKey->getDefaultValue(); + if( ! pValue ) + pValue = pKey->getValue( 0 ); + + return pValue; +} + +// ------------------------------------------------------------------- + +const PPDValue* PPDContext::setValue( const PPDKey* pKey, const PPDValue* pValue, bool bDontCareForConstraints ) +{ + if( ! m_pParser || ! pKey ) + return NULL; + + // pValue can be NULL - it means ignore this option + + if( ! m_pParser->hasKey( pKey ) ) + return NULL; + + // check constraints + if( pValue ) + { + if( bDontCareForConstraints ) + { + m_aCurrentValues[ pKey ] = pValue; + } + else if( checkConstraints( pKey, pValue, true ) ) + { + m_aCurrentValues[ pKey ] = pValue; + + // after setting this value, check all constraints ! + hash_type::iterator it = m_aCurrentValues.begin(); + while( it != m_aCurrentValues.end() ) + { + if( it->first != pKey && + ! checkConstraints( it->first, it->second, false ) ) + { +#ifdef __DEBUG + fprintf( stderr, "PPDContext::setValue: option %s (%s) is constrained after setting %s to %s\n", + it->first->getKey().GetStr(), + it->second->m_aOption.GetStr(), + pKey->getKey().GetStr(), + pValue->m_aOption.GetStr() ); +#endif + resetValue( it->first, true ); + it = m_aCurrentValues.begin(); + } + else + ++it; + } + } + } + else + m_aCurrentValues[ pKey ] = NULL; + + return pValue; +} + +// ------------------------------------------------------------------- + +bool PPDContext::checkConstraints( const PPDKey* pKey, const PPDValue* pValue ) +{ + if( ! m_pParser || ! pKey || ! pValue ) + return false; + + // ensure that this key is already in the list if it exists at all + if( m_aCurrentValues.find( pKey ) != m_aCurrentValues.end() ) + return checkConstraints( pKey, pValue, false ); + + // it is not in the list, insert it temporarily + bool bRet = false; + if( m_pParser->hasKey( pKey ) ) + { + const PPDValue* pDefValue = pKey->getDefaultValue(); + m_aCurrentValues[ pKey ] = pDefValue; + bRet = checkConstraints( pKey, pValue, false ); + m_aCurrentValues.erase( pKey ); + } + + return bRet; +} + +// ------------------------------------------------------------------- + +bool PPDContext::resetValue( const PPDKey* pKey, bool bDefaultable ) +{ + if( ! pKey || ! m_pParser || ! m_pParser->hasKey( pKey ) ) + return false; + + const PPDValue* pResetValue = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "None" ) ) ); + if( ! pResetValue ) + pResetValue = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "False" ) ) ); + if( ! pResetValue && bDefaultable ) + pResetValue = pKey->getDefaultValue(); + + bool bRet = pResetValue ? ( setValue( pKey, pResetValue ) == pResetValue ? true : false ) : false; + + return bRet; +} + +// ------------------------------------------------------------------- + +bool PPDContext::checkConstraints( const PPDKey* pKey, const PPDValue* pNewValue, bool bDoReset ) +{ + if( ! pNewValue ) + return true; + + // sanity checks + if( ! m_pParser ) + return false; + + if( pKey->getValue( pNewValue->m_aOption ) != pNewValue ) + return false; + + // None / False and the default can always be set, but be careful ! + // setting them might influence constrained values + if( pNewValue->m_aOption.EqualsAscii( "None" ) || pNewValue->m_aOption.EqualsAscii( "False" ) || + pNewValue == pKey->getDefaultValue() ) + return true; + + const ::std::list< PPDParser::PPDConstraint >& rConstraints( m_pParser->getConstraints() ); + for( ::std::list< PPDParser::PPDConstraint >::const_iterator it = rConstraints.begin(); it != rConstraints.end(); ++it ) + { + const PPDKey* pLeft = it->m_pKey1; + const PPDKey* pRight = it->m_pKey2; + if( ! pLeft || ! pRight || ( pKey != pLeft && pKey != pRight ) ) + continue; + + const PPDKey* pOtherKey = pKey == pLeft ? pRight : pLeft; + const PPDValue* pOtherKeyOption = pKey == pLeft ? it->m_pOption2 : it->m_pOption1; + const PPDValue* pKeyOption = pKey == pLeft ? it->m_pOption1 : it->m_pOption2; + + // syntax *Key1 option1 *Key2 option2 + if( pKeyOption && pOtherKeyOption ) + { + if( pNewValue != pKeyOption ) + continue; + if( pOtherKeyOption == getValue( pOtherKey ) ) + { + return false; + } + } + // syntax *Key1 option *Key2 or *Key1 *Key2 option + else if( pOtherKeyOption || pKeyOption ) + { + if( pKeyOption ) + { + if( ! ( pOtherKeyOption = getValue( pOtherKey ) ) ) + continue; // this should not happen, PPD broken + + if( pKeyOption == pNewValue && + ! pOtherKeyOption->m_aOption.EqualsAscii( "None" ) && + ! pOtherKeyOption->m_aOption.EqualsAscii( "False" ) ) + { + // check if the other value can be reset and + // do so if possible + if( bDoReset && resetValue( pOtherKey ) ) + continue; + + return false; + } + } + else if( pOtherKeyOption ) + { + if( getValue( pOtherKey ) == pOtherKeyOption && + ! pNewValue->m_aOption.EqualsAscii( "None" ) && + ! pNewValue->m_aOption.EqualsAscii( "False" ) ) + return false; + } + else + { + // this should not happen, PPD is broken + } + } + // syntax *Key1 *Key2 + else + { + const PPDValue* pOtherValue = getValue( pOtherKey ); + if( ! pOtherValue->m_aOption.EqualsAscii( "None" ) && + ! pOtherValue->m_aOption.EqualsAscii( "False" ) && + ! pNewValue->m_aOption.EqualsAscii( "None" ) && + ! pNewValue->m_aOption.EqualsAscii( "False" ) ) + return false; + } + } + return true; +} + +// ------------------------------------------------------------------- + +void PPDContext::getUnconstrainedValues( const PPDKey* pKey, ::std::list< const PPDValue* >& rValues ) +{ + rValues.clear(); + + if( ! m_pParser || ! pKey || ! m_pParser->hasKey( pKey ) ) + return; + + int nValues = pKey->countValues(); + for( int i = 0; i < nValues; i++ ) + { + const PPDValue* pValue = pKey->getValue( i ); + if( checkConstraints( pKey, pValue ) ) + rValues.push_back( pValue ); + } +} + + +// ------------------------------------------------------------------- + +void* PPDContext::getStreamableBuffer( ULONG& rBytes ) const +{ + rBytes = 0; + if( ! m_aCurrentValues.size() ) + return NULL; + hash_type::const_iterator it; + for( it = m_aCurrentValues.begin(); it != m_aCurrentValues.end(); ++it ) + { + ByteString aCopy( it->first->getKey(), RTL_TEXTENCODING_MS_1252 ); + rBytes += aCopy.Len(); + rBytes += 1; // for ':' + if( it->second ) + { + aCopy = ByteString( it->second->m_aOption, RTL_TEXTENCODING_MS_1252 ); + rBytes += aCopy.Len(); + } + else + rBytes += 4; + rBytes += 1; // for '\0' + } + rBytes += 1; + void* pBuffer = new char[ rBytes ]; + memset( pBuffer, 0, rBytes ); + char* pRun = (char*)pBuffer; + for( it = m_aCurrentValues.begin(); it != m_aCurrentValues.end(); ++it ) + { + ByteString aCopy( it->first->getKey(), RTL_TEXTENCODING_MS_1252 ); + int nBytes = aCopy.Len(); + memcpy( pRun, aCopy.GetBuffer(), nBytes ); + pRun += nBytes; + *pRun++ = ':'; + if( it->second ) + aCopy = ByteString( it->second->m_aOption, RTL_TEXTENCODING_MS_1252 ); + else + aCopy = "*nil"; + nBytes = aCopy.Len(); + memcpy( pRun, aCopy.GetBuffer(), nBytes ); + pRun += nBytes; + + *pRun++ = 0; + } + return pBuffer; +} + +// ------------------------------------------------------------------- + +void PPDContext::rebuildFromStreamBuffer( void* pBuffer, ULONG nBytes ) +{ + if( ! m_pParser ) + return; + + m_aCurrentValues.clear(); + + char* pRun = (char*)pBuffer; + while( nBytes && *pRun ) + { + ByteString aLine( pRun ); + int nPos = aLine.Search( ':' ); + if( nPos != STRING_NOTFOUND ) + { + const PPDKey* pKey = m_pParser->getKey( String( aLine.Copy( 0, nPos ), RTL_TEXTENCODING_MS_1252 ) ); + if( pKey ) + { + const PPDValue* pValue = NULL; + String aOption( aLine.Copy( nPos+1 ), RTL_TEXTENCODING_MS_1252 ); + if( ! aOption.EqualsAscii( "*nil" ) ) + pValue = pKey->getValue( aOption ); + m_aCurrentValues[ pKey ] = pValue; +#ifdef __DEBUG + fprintf( stderr, "PPDContext::rebuildFromStreamBuffer: read PPDKeyValue { %s, %s }\n", pKV->m_pKey->getKey().GetStr(), pKV->m_pCurrentValue ? pKV->m_pCurrentValue->m_aOption.GetStr() : "" ); +#endif + } + } + nBytes -= aLine.Len()+1; + pRun += aLine.Len()+1; + } +} + +// ------------------------------------------------------------------- + +int PPDContext::getRenderResolution() const +{ + // initialize to reasonable default, if parser is not set + int nDPI = 300; + if( m_pParser ) + { + int nDPIx = 300, nDPIy = 300; + const PPDKey* pKey = m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Resolution" ) ) ); + if( pKey ) + { + const PPDValue* pValue = getValue( pKey ); + if( pValue ) + m_pParser->getResolutionFromString( pValue->m_aOption, nDPIx, nDPIy ); + else + m_pParser->getDefaultResolution( nDPIx, nDPIy ); + } + else + m_pParser->getDefaultResolution( nDPIx, nDPIy ); + + nDPI = (nDPIx > nDPIy) ? nDPIx : nDPIy; + } + return nDPI; +} + +// ------------------------------------------------------------------- + +void PPDContext::getPageSize( String& rPaper, int& rWidth, int& rHeight ) const +{ + // initialize to reasonable default, if parser is not set + rPaper = String( RTL_CONSTASCII_USTRINGPARAM( "A4" ) ); + rWidth = 595; + rHeight = 842; + if( m_pParser ) + { + const PPDKey* pKey = m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) ); + if( pKey ) + { + const PPDValue* pValue = getValue( pKey ); + if( pValue ) + { + rPaper = pValue->m_aOption; + m_pParser->getPaperDimension( rPaper, rWidth, rHeight ); + } + else + { + rPaper = m_pParser->getDefaultPaperDimension(); + m_pParser->getDefaultPaperDimension( rWidth, rHeight ); + } + } + } +} diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx new file mode 100644 index 000000000000..cbd96611661f --- /dev/null +++ b/vcl/unx/generic/printer/printerinfomanager.cxx @@ -0,0 +1,1429 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include +#include + +#include "cupsmgr.hxx" +#include "vcl/fontmanager.hxx" +#include "vcl/strhelper.hxx" + +#include "unx/saldata.hxx" + +#include "tools/urlobj.hxx" +#include "tools/stream.hxx" +#include "tools/debug.hxx" +#include "tools/config.hxx" + +#include "i18npool/paper.hxx" + +#include "rtl/strbuf.hxx" + +#include "osl/thread.hxx" +#include "osl/mutex.hxx" +#include "osl/process.h" + +// filename of configuration files +#define PRINT_FILENAME "psprint.conf" +// the group of the global defaults +#define GLOBAL_DEFAULTS_GROUP "__Global_Printer_Defaults__" + +#include + +using namespace psp; +using namespace rtl; +using namespace osl; + +namespace psp +{ + class SystemQueueInfo : public Thread + { + mutable Mutex m_aMutex; + bool m_bChanged; + std::list< PrinterInfoManager::SystemPrintQueue > + m_aQueues; + OUString m_aCommand; + + virtual void run(); + + public: + SystemQueueInfo(); + ~SystemQueueInfo(); + + bool hasChanged() const; + OUString getCommand() const; + + // sets changed status to false; therefore not const + void getSystemQueues( std::list< PrinterInfoManager::SystemPrintQueue >& rQueues ); + }; +} // namespace + +/* +* class PrinterInfoManager +*/ + +// ----------------------------------------------------------------- + +PrinterInfoManager& PrinterInfoManager::get() +{ + SalData* pSalData = GetSalData(); + + if( ! pSalData->m_pPIManager ) + { + pSalData->m_pPIManager = CUPSManager::tryLoadCUPS(); + if( ! pSalData->m_pPIManager ) + pSalData->m_pPIManager = new PrinterInfoManager(); + + pSalData->m_pPIManager->initialize(); + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "PrinterInfoManager::get create Manager of type %d\n", pSalData->m_pPIManager->getType() ); + #endif + } + + return *pSalData->m_pPIManager; +} + +void PrinterInfoManager::release() +{ + SalData* pSalData = GetSalData(); + delete pSalData->m_pPIManager; + pSalData->m_pPIManager = NULL; +} + +// ----------------------------------------------------------------- + +PrinterInfoManager::PrinterInfoManager( Type eType ) : + m_pQueueInfo( NULL ), + m_eType( eType ), + m_bUseIncludeFeature( false ), + m_bUseJobPatch( true ), + m_aSystemDefaultPaper( RTL_CONSTASCII_USTRINGPARAM( "A4" ) ), + m_bDisableCUPS( false ) +{ + if( eType == Default ) + m_pQueueInfo = new SystemQueueInfo(); + initSystemDefaultPaper(); +} + +// ----------------------------------------------------------------- + +PrinterInfoManager::~PrinterInfoManager() +{ + delete m_pQueueInfo; + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "PrinterInfoManager: destroyed Manager of type %d\n", getType() ); + #endif +} + +// ----------------------------------------------------------------- + +bool PrinterInfoManager::isCUPSDisabled() const +{ + return m_bDisableCUPS; +} + +// ----------------------------------------------------------------- + +void PrinterInfoManager::setCUPSDisabled( bool bDisable ) +{ + m_bDisableCUPS = bDisable; + writePrinterConfig(); + // actually we know the printers changed + // however this triggers reinitialization the right way + checkPrintersChanged( true ); +} + +// ----------------------------------------------------------------- + +void PrinterInfoManager::initSystemDefaultPaper() +{ + m_aSystemDefaultPaper = rtl::OStringToOUString( + PaperInfo::toPSName(PaperInfo::getSystemDefaultPaper().getPaper()), + RTL_TEXTENCODING_UTF8); +} + +// ----------------------------------------------------------------- + +bool PrinterInfoManager::checkPrintersChanged( bool bWait ) +{ + // check if files were created, deleted or modified since initialize() + ::std::list< WatchFile >::const_iterator it; + bool bChanged = false; + for( it = m_aWatchFiles.begin(); it != m_aWatchFiles.end() && ! bChanged; ++it ) + { + DirectoryItem aItem; + if( DirectoryItem::get( it->m_aFilePath, aItem ) ) + { + if( it->m_aModified.Seconds != 0 ) + bChanged = true; // file probably has vanished + } + else + { + FileStatus aStatus( FileStatusMask_ModifyTime ); + if( aItem.getFileStatus( aStatus ) ) + bChanged = true; // unlikely but not impossible + else + { + TimeValue aModified = aStatus.getModifyTime(); + if( aModified.Seconds != it->m_aModified.Seconds ) + bChanged = true; + } + } + } + + if( bWait && m_pQueueInfo ) + { + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "syncing printer discovery thread\n" ); + #endif + m_pQueueInfo->join(); + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "done: syncing printer discovery thread\n" ); + #endif + } + + if( ! bChanged && m_pQueueInfo ) + bChanged = m_pQueueInfo->hasChanged(); + if( bChanged ) + { + initialize(); + } + + return bChanged; +} + +// ----------------------------------------------------------------- + +void PrinterInfoManager::initialize() +{ + m_bUseIncludeFeature = false; + rtl_TextEncoding aEncoding = gsl_getSystemTextEncoding(); + m_aPrinters.clear(); + m_aWatchFiles.clear(); + OUString aDefaultPrinter; + + // first initialize the global defaults + // have to iterate over all possible files + // there should be only one global setup section in all + // available config files + m_aGlobalDefaults = PrinterInfo(); + + // need a parser for the PPDContext. generic printer should do. + m_aGlobalDefaults.m_pParser = PPDParser::getParser( String( RTL_CONSTASCII_USTRINGPARAM( "SGENPRT" ) ) ); + m_aGlobalDefaults.m_aContext.setParser( m_aGlobalDefaults.m_pParser ); + m_aGlobalDefaults.m_bPerformFontSubstitution = true; + m_bDisableCUPS = false; + + if( ! m_aGlobalDefaults.m_pParser ) + { + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "Error: no default PPD file SGENPRT available, shutting down psprint...\n" ); + #endif + return; + } + + std::list< OUString > aDirList; + psp::getPrinterPathList( aDirList, NULL ); + std::list< OUString >::const_iterator print_dir_it; + for( print_dir_it = aDirList.begin(); print_dir_it != aDirList.end(); ++print_dir_it ) + { + INetURLObject aFile( *print_dir_it, INET_PROT_FILE, INetURLObject::ENCODE_ALL ); + aFile.Append( String( RTL_CONSTASCII_USTRINGPARAM( PRINT_FILENAME ) ) ); + Config aConfig( aFile.PathToFileName() ); + if( aConfig.HasGroup( GLOBAL_DEFAULTS_GROUP ) ) + { + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "found global defaults in %s\n", OUStringToOString( aFile.PathToFileName(), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); + #endif + aConfig.SetGroup( GLOBAL_DEFAULTS_GROUP ); + + ByteString aValue( aConfig.ReadKey( "Copies" ) ); + if( aValue.Len() ) + m_aGlobalDefaults.m_nCopies = aValue.ToInt32(); + + aValue = aConfig.ReadKey( "Orientation" ); + if( aValue.Len() ) + m_aGlobalDefaults.m_eOrientation = aValue.EqualsIgnoreCaseAscii( "Landscape" ) ? orientation::Landscape : orientation::Portrait; + + aValue = aConfig.ReadKey( "MarginAdjust" ); + if( aValue.Len() ) + { + m_aGlobalDefaults.m_nLeftMarginAdjust = aValue.GetToken( 0, ',' ).ToInt32(); + m_aGlobalDefaults.m_nRightMarginAdjust = aValue.GetToken( 1, ',' ).ToInt32(); + m_aGlobalDefaults.m_nTopMarginAdjust = aValue.GetToken( 2, ',' ).ToInt32(); + m_aGlobalDefaults.m_nBottomMarginAdjust = aValue.GetToken( 3, ',' ).ToInt32(); + } + + aValue = aConfig.ReadKey( "ColorDepth", "24" ); + if( aValue.Len() ) + m_aGlobalDefaults.m_nColorDepth = aValue.ToInt32(); + + aValue = aConfig.ReadKey( "ColorDevice" ); + if( aValue.Len() ) + m_aGlobalDefaults.m_nColorDevice = aValue.ToInt32(); + + aValue = aConfig.ReadKey( "PSLevel" ); + if( aValue.Len() ) + m_aGlobalDefaults.m_nPSLevel = aValue.ToInt32(); + + aValue = aConfig.ReadKey( "PDFDevice" ); + if( aValue.Len() ) + m_aGlobalDefaults.m_nPDFDevice = aValue.ToInt32(); + + aValue = aConfig.ReadKey( "PerformFontSubstitution" ); + if( aValue.Len() ) + { + if( ! aValue.Equals( "0" ) && ! aValue.EqualsIgnoreCaseAscii( "false" ) ) + m_aGlobalDefaults.m_bPerformFontSubstitution = true; + else + m_aGlobalDefaults.m_bPerformFontSubstitution = false; + } + + aValue = aConfig.ReadKey( "DisableCUPS" ); + if( aValue.Len() ) + { + if( aValue.Equals( "1" ) || aValue.EqualsIgnoreCaseAscii( "true" ) ) + m_bDisableCUPS = true; + else + m_bDisableCUPS = false; + } + + // get the PPDContext of global JobData + for( int nKey = 0; nKey < aConfig.GetKeyCount(); nKey++ ) + { + ByteString aKey( aConfig.GetKeyName( nKey ) ); + if( aKey.CompareTo( "PPD_", 4 ) == COMPARE_EQUAL ) + { + aValue = aConfig.ReadKey( aKey ); + const PPDKey* pKey = m_aGlobalDefaults.m_pParser->getKey( String( aKey.Copy( 4 ), RTL_TEXTENCODING_ISO_8859_1 ) ); + if( pKey ) + { + m_aGlobalDefaults.m_aContext. + setValue( pKey, + aValue.Equals( "*nil" ) ? NULL : pKey->getValue( String( aValue, RTL_TEXTENCODING_ISO_8859_1 ) ), + TRUE ); + } + } + else if( aKey.Len() > 10 && aKey.CompareTo("SubstFont_", 10 ) == COMPARE_EQUAL ) + { + aValue = aConfig.ReadKey( aKey ); + m_aGlobalDefaults.m_aFontSubstitutes[ OStringToOUString( aKey.Copy( 10 ), RTL_TEXTENCODING_ISO_8859_1 ) ] = OStringToOUString( aValue, RTL_TEXTENCODING_ISO_8859_1 ); + } + } + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "global settings: fontsubst = %s, %d substitutes\n", m_aGlobalDefaults.m_bPerformFontSubstitution ? "true" : "false", (int)m_aGlobalDefaults.m_aFontSubstitutes.size() ); + #endif + } + } + setDefaultPaper( m_aGlobalDefaults.m_aContext ); + fillFontSubstitutions( m_aGlobalDefaults ); + + // now collect all available printers + for( print_dir_it = aDirList.begin(); print_dir_it != aDirList.end(); ++print_dir_it ) + { + INetURLObject aDir( *print_dir_it, INET_PROT_FILE, INetURLObject::ENCODE_ALL ); + INetURLObject aFile( aDir ); + aFile.Append( String( RTL_CONSTASCII_USTRINGPARAM( PRINT_FILENAME ) ) ); + + // check directory validity + OUString aUniPath; + FileBase::getFileURLFromSystemPath( aDir.PathToFileName(), aUniPath ); + Directory aDirectory( aUniPath ); + if( aDirectory.open() ) + continue; + aDirectory.close(); + + + FileBase::getFileURLFromSystemPath( aFile.PathToFileName(), aUniPath ); + FileStatus aStatus( FileStatusMask_ModifyTime ); + DirectoryItem aItem; + + // setup WatchFile list + WatchFile aWatchFile; + aWatchFile.m_aFilePath = aUniPath; + if( ! DirectoryItem::get( aUniPath, aItem ) && + ! aItem.getFileStatus( aStatus ) ) + { + aWatchFile.m_aModified = aStatus.getModifyTime(); + } + else + { + aWatchFile.m_aModified.Seconds = 0; + aWatchFile.m_aModified.Nanosec = 0; + } + m_aWatchFiles.push_back( aWatchFile ); + + Config aConfig( aFile.PathToFileName() ); + for( int nGroup = 0; nGroup < aConfig.GetGroupCount(); nGroup++ ) + { + aConfig.SetGroup( aConfig.GetGroupName( nGroup ) ); + ByteString aValue = aConfig.ReadKey( "Printer" ); + if( aValue.Len() ) + { + OUString aPrinterName; + + int nNamePos = aValue.Search( '/' ); + // check for valid value of "Printer" + if( nNamePos == STRING_NOTFOUND ) + continue; + + Printer aPrinter; + // initialize to global defaults + aPrinter.m_aInfo = m_aGlobalDefaults; + // global settings do not default the printer substitution + // list ! the substitution list in there is only used for + // newly created printers + aPrinter.m_aInfo.m_aFontSubstitutes.clear(); + aPrinter.m_aInfo.m_aFontSubstitutions.clear(); + + aPrinterName = String( aValue.Copy( nNamePos+1 ), RTL_TEXTENCODING_UTF8 ); + aPrinter.m_aInfo.m_aPrinterName = aPrinterName; + aPrinter.m_aInfo.m_aDriverName = String( aValue.Copy( 0, nNamePos ), RTL_TEXTENCODING_UTF8 ); + + // set parser, merge settings + // don't do this for CUPS printers as this is done + // by the CUPS system itself + if( aPrinter.m_aInfo.m_aDriverName.compareToAscii( "CUPS:", 5 ) != 0 ) + { + aPrinter.m_aInfo.m_pParser = PPDParser::getParser( aPrinter.m_aInfo.m_aDriverName ); + aPrinter.m_aInfo.m_aContext.setParser( aPrinter.m_aInfo.m_pParser ); + // note: setParser also purges the context + + // ignore this printer if its driver is not found + if( ! aPrinter.m_aInfo.m_pParser ) + continue; + + // merge the ppd context keys if the printer has the same keys and values + // this is a bit tricky, since it involves mixing two PPDs + // without constraints which might end up badly + // this feature should be use with caution + // it is mainly to select default paper sizes for new printers + for( int nPPDValueModified = 0; nPPDValueModified < m_aGlobalDefaults.m_aContext.countValuesModified(); nPPDValueModified++ ) + { + const PPDKey* pDefKey = m_aGlobalDefaults.m_aContext.getModifiedKey( nPPDValueModified ); + const PPDValue* pDefValue = m_aGlobalDefaults.m_aContext.getValue( pDefKey ); + const PPDKey* pPrinterKey = pDefKey ? aPrinter.m_aInfo.m_pParser->getKey( pDefKey->getKey() ) : NULL; + if( pDefKey && pPrinterKey ) + // at least the options exist in both PPDs + { + if( pDefValue ) + { + const PPDValue* pPrinterValue = pPrinterKey->getValue( pDefValue->m_aOption ); + if( pPrinterValue ) + // the printer has a corresponding option for the key + aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, pPrinterValue ); + } + else + aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, NULL ); + } + } + + aValue = aConfig.ReadKey( "Command" ); + // no printer without a command + if( ! aValue.Len() ) + { + /* TODO: + * porters: please append your platform to the Solaris + * case if your platform has SystemV printing per default. + */ + #if defined SOLARIS + aValue = "lp"; + #else + aValue = "lpr"; + #endif + } + aPrinter.m_aInfo.m_aCommand = String( aValue, RTL_TEXTENCODING_UTF8 ); + } + + aValue = aConfig.ReadKey( "QuickCommand" ); + aPrinter.m_aInfo.m_aQuickCommand = String( aValue, RTL_TEXTENCODING_UTF8 ); + + aValue = aConfig.ReadKey( "Features" ); + aPrinter.m_aInfo.m_aFeatures = String( aValue, RTL_TEXTENCODING_UTF8 ); + + // override the settings in m_aGlobalDefaults if keys exist + aValue = aConfig.ReadKey( "DefaultPrinter" ); + if( ! aValue.Equals( "0" ) && ! aValue.EqualsIgnoreCaseAscii( "false" ) ) + aDefaultPrinter = aPrinterName; + + aValue = aConfig.ReadKey( "Location" ); + aPrinter.m_aInfo.m_aLocation = String( aValue, RTL_TEXTENCODING_UTF8 ); + + aValue = aConfig.ReadKey( "Comment" ); + aPrinter.m_aInfo.m_aComment = String( aValue, RTL_TEXTENCODING_UTF8 ); + + aValue = aConfig.ReadKey( "Copies" ); + if( aValue.Len() ) + aPrinter.m_aInfo.m_nCopies = aValue.ToInt32(); + + aValue = aConfig.ReadKey( "Orientation" ); + if( aValue.Len() ) + aPrinter.m_aInfo.m_eOrientation = aValue.EqualsIgnoreCaseAscii( "Landscape" ) ? orientation::Landscape : orientation::Portrait; + + aValue = aConfig.ReadKey( "MarginAdjust" ); + if( aValue.Len() ) + { + aPrinter.m_aInfo.m_nLeftMarginAdjust = aValue.GetToken( 0, ',' ).ToInt32(); + aPrinter.m_aInfo.m_nRightMarginAdjust = aValue.GetToken( 1, ',' ).ToInt32(); + aPrinter.m_aInfo.m_nTopMarginAdjust = aValue.GetToken( 2, ',' ).ToInt32(); + aPrinter.m_aInfo.m_nBottomMarginAdjust = aValue.GetToken( 3, ',' ).ToInt32(); + } + + aValue = aConfig.ReadKey( "ColorDepth" ); + if( aValue.Len() ) + aPrinter.m_aInfo.m_nColorDepth = aValue.ToInt32(); + + aValue = aConfig.ReadKey( "ColorDevice" ); + if( aValue.Len() ) + aPrinter.m_aInfo.m_nColorDevice = aValue.ToInt32(); + + aValue = aConfig.ReadKey( "PSLevel" ); + if( aValue.Len() ) + aPrinter.m_aInfo.m_nPSLevel = aValue.ToInt32(); + + aValue = aConfig.ReadKey( "PDFDevice" ); + if( aValue.Len() ) + aPrinter.m_aInfo.m_nPDFDevice = aValue.ToInt32(); + + aValue = aConfig.ReadKey( "PerformFontSubstitution" ); + if( ! aValue.Equals( "0" ) && ! aValue.EqualsIgnoreCaseAscii( "false" ) ) + aPrinter.m_aInfo.m_bPerformFontSubstitution = true; + else + aPrinter.m_aInfo.m_bPerformFontSubstitution = false; + + // now iterate over all keys to extract multi key information: + // 1. PPDContext information + // 2. Font substitution table + for( int nKey = 0; nKey < aConfig.GetKeyCount(); nKey++ ) + { + ByteString aKey( aConfig.GetKeyName( nKey ) ); + if( aKey.CompareTo( "PPD_", 4 ) == COMPARE_EQUAL && aPrinter.m_aInfo.m_pParser ) + { + aValue = aConfig.ReadKey( aKey ); + const PPDKey* pKey = aPrinter.m_aInfo.m_pParser->getKey( String( aKey.Copy( 4 ), RTL_TEXTENCODING_ISO_8859_1 ) ); + if( pKey ) + { + aPrinter.m_aInfo.m_aContext. + setValue( pKey, + aValue.Equals( "*nil" ) ? NULL : pKey->getValue( String( aValue, RTL_TEXTENCODING_ISO_8859_1 ) ), + TRUE ); + } + } + else if( aKey.Len() > 10 && aKey.CompareTo("SubstFont_", 10 ) == COMPARE_EQUAL ) + { + aValue = aConfig.ReadKey( aKey ); + aPrinter.m_aInfo.m_aFontSubstitutes[ OStringToOUString( aKey.Copy( 10 ), RTL_TEXTENCODING_ISO_8859_1 ) ] = OStringToOUString( aValue, RTL_TEXTENCODING_ISO_8859_1 ); + } + } + + setDefaultPaper( aPrinter.m_aInfo.m_aContext ); + fillFontSubstitutions( aPrinter.m_aInfo ); + + // finally insert printer + FileBase::getFileURLFromSystemPath( aFile.PathToFileName(), aPrinter.m_aFile ); + aPrinter.m_bModified = false; + aPrinter.m_aGroup = aConfig.GetGroupName( nGroup ); + std::hash_map< OUString, Printer, OUStringHash >::const_iterator find_it = + m_aPrinters.find( aPrinterName ); + if( find_it != m_aPrinters.end() ) + { + aPrinter.m_aAlternateFiles = find_it->second.m_aAlternateFiles; + aPrinter.m_aAlternateFiles.push_front( find_it->second.m_aFile ); + } + m_aPrinters[ aPrinterName ] = aPrinter; + } + } + } + + // set default printer + if( m_aPrinters.size() ) + { + if( m_aPrinters.find( aDefaultPrinter ) == m_aPrinters.end() ) + aDefaultPrinter = m_aPrinters.begin()->first; + } + else + aDefaultPrinter = OUString(); + m_aDefaultPrinter = aDefaultPrinter; + + if( m_eType != Default ) + return; + + // add a default printer for every available print queue + // merge paper and font substitution from default printer, + // all else from global defaults + PrinterInfo aMergeInfo( m_aGlobalDefaults ); + aMergeInfo.m_aDriverName = String( RTL_CONSTASCII_USTRINGPARAM( "SGENPRT" ) ); + aMergeInfo.m_aFeatures = String( RTL_CONSTASCII_USTRINGPARAM( "autoqueue" ) ); + + if( m_aDefaultPrinter.getLength() ) + { + PrinterInfo aDefaultInfo( getPrinterInfo( m_aDefaultPrinter ) ); + aMergeInfo.m_bPerformFontSubstitution = aDefaultInfo.m_bPerformFontSubstitution; + fillFontSubstitutions( aMergeInfo ); + + const PPDKey* pDefKey = aDefaultInfo.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) ); + const PPDKey* pMergeKey = aMergeInfo.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) ); + const PPDValue* pDefValue = aDefaultInfo.m_aContext.getValue( pDefKey ); + const PPDValue* pMergeValue = pMergeKey ? pMergeKey->getValue( pDefValue->m_aOption ) : NULL; + if( pMergeKey && pMergeValue ) + aMergeInfo.m_aContext.setValue( pMergeKey, pMergeValue ); + } + + getSystemPrintQueues(); + for( ::std::list< SystemPrintQueue >::iterator it = m_aSystemPrintQueues.begin(); it != m_aSystemPrintQueues.end(); ++it ) + { + String aPrinterName( RTL_CONSTASCII_USTRINGPARAM( "<" ) ); + aPrinterName += String( it->m_aQueue ); + aPrinterName.Append( '>' ); + + if( m_aPrinters.find( aPrinterName ) != m_aPrinters.end() ) + // probably user made this one permanent in padmin + continue; + + String aCmd( m_aSystemPrintCommand ); + aCmd.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "(PRINTER)" ) ), it->m_aQueue ); + + Printer aPrinter; + + // initialize to merged defaults + aPrinter.m_aInfo = aMergeInfo; + aPrinter.m_aInfo.m_aPrinterName = aPrinterName; + aPrinter.m_aInfo.m_aCommand = aCmd; + aPrinter.m_aInfo.m_aComment = it->m_aComment; + aPrinter.m_aInfo.m_aLocation = it->m_aLocation; + aPrinter.m_bModified = false; + aPrinter.m_aGroup = ByteString( aPrinterName, aEncoding ); //provide group name in case user makes this one permanent in padmin + + m_aPrinters[ aPrinterName ] = aPrinter; + } +} + +// ----------------------------------------------------------------- + +void PrinterInfoManager::listPrinters( ::std::list< OUString >& rList ) const +{ + ::std::hash_map< OUString, Printer, OUStringHash >::const_iterator it; + rList.clear(); + for( it = m_aPrinters.begin(); it != m_aPrinters.end(); ++it ) + rList.push_back( it->first ); +} + +// ----------------------------------------------------------------- + +const PrinterInfo& PrinterInfoManager::getPrinterInfo( const OUString& rPrinter ) const +{ + static PrinterInfo aEmptyInfo; + ::std::hash_map< OUString, Printer, OUStringHash >::const_iterator it = m_aPrinters.find( rPrinter ); + + DBG_ASSERT( it != m_aPrinters.end(), "Do not ask for info about nonexistent printers" ); + + return it != m_aPrinters.end() ? it->second.m_aInfo : aEmptyInfo; +} + +// ----------------------------------------------------------------- + +void PrinterInfoManager::changePrinterInfo( const OUString& rPrinter, const PrinterInfo& rNewInfo ) +{ + ::std::hash_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.find( rPrinter ); + + DBG_ASSERT( it != m_aPrinters.end(), "Do not change nonexistant printers" ); + + if( it != m_aPrinters.end() ) + { + it->second.m_aInfo = rNewInfo; + // recalculate font substitutions + fillFontSubstitutions( it->second.m_aInfo ); + it->second.m_bModified = true; + writePrinterConfig(); + } +} + +// ----------------------------------------------------------------- + +// need to check writeability / creatability of config files +static bool checkWriteability( const OUString& rUniPath ) +{ + bool bRet = false; + OUString aSysPath; + FileBase::getSystemPathFromFileURL( rUniPath, aSysPath ); + SvFileStream aStream( aSysPath, STREAM_READ | STREAM_WRITE ); + if( aStream.IsOpen() && aStream.IsWritable() ) + bRet = true; + return bRet; +} + +bool PrinterInfoManager::writePrinterConfig() +{ + // find at least one writeable config + ::std::hash_map< OUString, Config*, OUStringHash > files; + ::std::hash_map< OUString, int, OUStringHash > rofiles; + ::std::hash_map< OUString, Config*, OUStringHash >::iterator file_it; + + for( ::std::list< WatchFile >::const_iterator wit = m_aWatchFiles.begin(); wit != m_aWatchFiles.end(); ++wit ) + { + if( checkWriteability( wit->m_aFilePath ) ) + { + files[ wit->m_aFilePath ] = new Config( wit->m_aFilePath ); + break; + } + } + + if( files.empty() ) + return false; + + Config* pGlobal = files.begin()->second; + pGlobal->SetGroup( GLOBAL_DEFAULTS_GROUP ); + pGlobal->WriteKey( "DisableCUPS", m_bDisableCUPS ? "true" : "false" ); + + ::std::hash_map< OUString, Printer, OUStringHash >::iterator it; + for( it = m_aPrinters.begin(); it != m_aPrinters.end(); ++it ) + { + if( ! it->second.m_bModified ) + // printer was not changed, do nothing + continue; + + // don't save autoqueue printers + sal_Int32 nIndex = 0; + bool bAutoQueue = false; + while( nIndex != -1 && ! bAutoQueue ) + { + OUString aToken( it->second.m_aInfo.m_aFeatures.getToken( 0, ',', nIndex ) ); + if( aToken.getLength() && aToken.compareToAscii( "autoqueue" ) == 0 ) + bAutoQueue = true; + } + if( bAutoQueue ) + continue; + + if( it->second.m_aFile.getLength() ) + { + // check if file is writable + if( files.find( it->second.m_aFile ) == files.end() ) + { + bool bInsertToNewFile = false; + // maybe it is simply not inserted yet + if( rofiles.find( it->second.m_aFile ) == rofiles.end() ) + { + if( checkWriteability( it->second.m_aFile ) ) + files[ it->second.m_aFile ] = new Config( it->second.m_aFile ); + else + bInsertToNewFile = true; + } + else + bInsertToNewFile = true; + // original file is read only, insert printer in a new writeable file + if( bInsertToNewFile ) + { + rofiles[ it->second.m_aFile ] = 1; + // update alternate file list + // the remove operation ensures uniqueness of each alternate + it->second.m_aAlternateFiles.remove( it->second.m_aFile ); + it->second.m_aAlternateFiles.remove( files.begin()->first ); + it->second.m_aAlternateFiles.push_front( it->second.m_aFile ); + // update file + it->second.m_aFile = files.begin()->first; + } + } + } + else // a new printer, write it to the first file available + it->second.m_aFile = files.begin()->first; + + if( ! it->second.m_aGroup.getLength() ) // probably a new printer + it->second.m_aGroup = OString( it->first.getStr(), it->first.getLength(), RTL_TEXTENCODING_UTF8 ); + + if( files.find( it->second.m_aFile ) != files.end() ) + { + Config* pConfig = files[ it->second.m_aFile ]; + pConfig->DeleteGroup( it->second.m_aGroup ); // else some old keys may remain + pConfig->SetGroup( it->second.m_aGroup ); + + ByteString aValue( String( it->second.m_aInfo.m_aDriverName ), RTL_TEXTENCODING_UTF8 ); + aValue += '/'; + aValue += ByteString( String( it->first ), RTL_TEXTENCODING_UTF8 ); + pConfig->WriteKey( "Printer", aValue ); + pConfig->WriteKey( "DefaultPrinter", it->first == m_aDefaultPrinter ? "1" : "0" ); + pConfig->WriteKey( "Location", ByteString( String( it->second.m_aInfo.m_aLocation ), RTL_TEXTENCODING_UTF8 ) ); + pConfig->WriteKey( "Comment", ByteString( String( it->second.m_aInfo.m_aComment ), RTL_TEXTENCODING_UTF8 ) ); + pConfig->WriteKey( "Command", ByteString( String( it->second.m_aInfo.m_aCommand ), RTL_TEXTENCODING_UTF8 ) ); + pConfig->WriteKey( "QuickCommand", ByteString( String( it->second.m_aInfo.m_aQuickCommand ), RTL_TEXTENCODING_UTF8 ) ); + pConfig->WriteKey( "Features", ByteString( String( it->second.m_aInfo.m_aFeatures ), RTL_TEXTENCODING_UTF8 ) ); + pConfig->WriteKey( "Copies", ByteString::CreateFromInt32( it->second.m_aInfo.m_nCopies ) ); + pConfig->WriteKey( "Orientation", it->second.m_aInfo.m_eOrientation == orientation::Landscape ? "Landscape" : "Portrait" ); + pConfig->WriteKey( "PSLevel", ByteString::CreateFromInt32( it->second.m_aInfo.m_nPSLevel ) ); + pConfig->WriteKey( "PDFDevice", ByteString::CreateFromInt32( it->second.m_aInfo.m_nPDFDevice ) ); + pConfig->WriteKey( "ColorDevice", ByteString::CreateFromInt32( it->second.m_aInfo.m_nColorDevice ) ); + pConfig->WriteKey( "ColorDepth", ByteString::CreateFromInt32( it->second.m_aInfo.m_nColorDepth ) ); + aValue = ByteString::CreateFromInt32( it->second.m_aInfo.m_nLeftMarginAdjust ); + aValue += ','; + aValue += ByteString::CreateFromInt32( it->second.m_aInfo.m_nRightMarginAdjust ); + aValue += ','; + aValue += ByteString::CreateFromInt32( it->second.m_aInfo.m_nTopMarginAdjust ); + aValue += ','; + aValue += ByteString::CreateFromInt32( it->second.m_aInfo.m_nBottomMarginAdjust ); + pConfig->WriteKey( "MarginAdjust", aValue ); + + if( it->second.m_aInfo.m_aDriverName.compareToAscii( "CUPS:", 5 ) != 0 ) + { + // write PPDContext (not for CUPS) + for( int i = 0; i < it->second.m_aInfo.m_aContext.countValuesModified(); i++ ) + { + const PPDKey* pKey = it->second.m_aInfo.m_aContext.getModifiedKey( i ); + ByteString aKey( "PPD_" ); + aKey += ByteString( pKey->getKey(), RTL_TEXTENCODING_ISO_8859_1 ); + + const PPDValue* pValue = it->second.m_aInfo.m_aContext.getValue( pKey ); + aValue = pValue ? ByteString( pValue->m_aOption, RTL_TEXTENCODING_ISO_8859_1 ) : ByteString( "*nil" ); + pConfig->WriteKey( aKey, aValue ); + } + } + + // write font substitution table + pConfig->WriteKey( "PerformFontSubstitution", it->second.m_aInfo.m_bPerformFontSubstitution ? "true" : "false" ); + for( ::std::hash_map< OUString, OUString, OUStringHash >::const_iterator subst = it->second.m_aInfo.m_aFontSubstitutes.begin(); + subst != it->second.m_aInfo.m_aFontSubstitutes.end(); ++subst ) + { + ByteString aKey( "SubstFont_" ); + aKey.Append( OUStringToOString( subst->first, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); + pConfig->WriteKey( aKey, OUStringToOString( subst->second, RTL_TEXTENCODING_ISO_8859_1 ) ); + } + } + } + + // get rid of Config objects. this also writes any changes + for( file_it = files.begin(); file_it != files.end(); ++file_it ) + delete file_it->second; + + return true; +} + +// ----------------------------------------------------------------- + +bool PrinterInfoManager::addPrinter( const OUString& rPrinterName, const OUString& rDriverName ) +{ + bool bSuccess = false; + + const PPDParser* pParser = NULL; + if( m_aPrinters.find( rPrinterName ) == m_aPrinters.end() && ( pParser = PPDParser::getParser( rDriverName ) ) ) + { + Printer aPrinter; + aPrinter.m_bModified = true; + aPrinter.m_aInfo = m_aGlobalDefaults; + aPrinter.m_aInfo.m_aDriverName = rDriverName; + aPrinter.m_aInfo.m_pParser = pParser; + aPrinter.m_aInfo.m_aContext.setParser( pParser ); + aPrinter.m_aInfo.m_aPrinterName = rPrinterName; + + fillFontSubstitutions( aPrinter.m_aInfo ); + // merge PPD values with global defaults + for( int nPPDValueModified = 0; nPPDValueModified < m_aGlobalDefaults.m_aContext.countValuesModified(); nPPDValueModified++ ) + { + const PPDKey* pDefKey = m_aGlobalDefaults.m_aContext.getModifiedKey( nPPDValueModified ); + const PPDValue* pDefValue = m_aGlobalDefaults.m_aContext.getValue( pDefKey ); + const PPDKey* pPrinterKey = pDefKey ? aPrinter.m_aInfo.m_pParser->getKey( pDefKey->getKey() ) : NULL; + if( pDefKey && pPrinterKey ) + // at least the options exist in both PPDs + { + if( pDefValue ) + { + const PPDValue* pPrinterValue = pPrinterKey->getValue( pDefValue->m_aOption ); + if( pPrinterValue ) + // the printer has a corresponding option for the key + aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, pPrinterValue ); + } + else + aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, NULL ); + } + } + + m_aPrinters[ rPrinterName ] = aPrinter; + bSuccess = true; + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "new printer %s, level = %d, pdfdevice = %d, colordevice = %d, depth = %d\n", + OUStringToOString( rPrinterName, osl_getThreadTextEncoding() ).getStr(), + m_aPrinters[rPrinterName].m_aInfo.m_nPSLevel, + m_aPrinters[rPrinterName].m_aInfo.m_nPDFDevice, + m_aPrinters[rPrinterName].m_aInfo.m_nColorDevice, + m_aPrinters[rPrinterName].m_aInfo.m_nColorDepth ); + #endif + // comment: logically one should writePrinterConfig() here + // but immediately after addPrinter() a changePrinterInfo() + // will follow (see padmin code), which writes it again, + // so we can currently save some performance here + } + return bSuccess; +} + +// ----------------------------------------------------------------- + +bool PrinterInfoManager::removePrinter( const OUString& rPrinterName, bool bCheckOnly ) +{ + bool bSuccess = true; + + ::std::hash_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.find( rPrinterName ); + if( it != m_aPrinters.end() ) + { + if( it->second.m_aFile.getLength() ) + { + // this printer already exists in a config file + + + // check writeability of config file(s) + if( ! checkWriteability( it->second.m_aFile ) ) + bSuccess = false; + else + { + for( std::list< OUString >::const_iterator file_it = it->second.m_aAlternateFiles.begin(); + file_it != it->second.m_aAlternateFiles.end() && bSuccess; ++file_it ) + { + if( ! checkWriteability( *file_it ) ) + bSuccess = false; + } + } + if( bSuccess && ! bCheckOnly ) + { + + Config aConfig( it->second.m_aFile ); + aConfig.DeleteGroup( it->second.m_aGroup ); + aConfig.Flush(); + for( std::list< OUString >::const_iterator file_it = it->second.m_aAlternateFiles.begin(); + file_it != it->second.m_aAlternateFiles.end() && bSuccess; ++file_it ) + { + Config aAltConfig( *file_it ); + aAltConfig.DeleteGroup( it->second.m_aGroup ); + aAltConfig.Flush(); + } + } + } + if( bSuccess && ! bCheckOnly ) + { + m_aPrinters.erase( it ); + // need this here because someone may call + // checkPrintersChanged after the removal + // but then other added printers were not flushed + // to disk, so they are discarded + writePrinterConfig(); + } + } + return bSuccess; +} + +// ----------------------------------------------------------------- + +bool PrinterInfoManager::setDefaultPrinter( const OUString& rPrinterName ) +{ + bool bSuccess = false; + + ::std::hash_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.find( rPrinterName ); + if( it != m_aPrinters.end() ) + { + bSuccess = true; + it->second.m_bModified = true; + if( ( it = m_aPrinters.find( m_aDefaultPrinter ) ) != m_aPrinters.end() ) + it->second.m_bModified = true; + m_aDefaultPrinter = rPrinterName; + writePrinterConfig(); + } + return bSuccess; +} + +// ----------------------------------------------------------------- +bool PrinterInfoManager::addOrRemovePossible() const +{ + return true; +} + +// ----------------------------------------------------------------- + +void PrinterInfoManager::fillFontSubstitutions( PrinterInfo& rInfo ) const +{ + PrintFontManager& rFontManager( PrintFontManager::get() ); + rInfo.m_aFontSubstitutions.clear(); + + if( ! rInfo.m_bPerformFontSubstitution || + ! rInfo.m_aFontSubstitutes.size() ) + return; + + ::std::list< FastPrintFontInfo > aFonts; + ::std::hash_map< OUString, ::std::list< FastPrintFontInfo >, OUStringHash > aPrinterFonts; + rFontManager.getFontListWithFastInfo( aFonts, rInfo.m_pParser ); + + // get builtin fonts + ::std::list< FastPrintFontInfo >::const_iterator it; + for( it = aFonts.begin(); it != aFonts.end(); ++it ) + if( it->m_eType == fonttype::Builtin ) + aPrinterFonts[ it->m_aFamilyName.toAsciiLowerCase() ].push_back( *it ); + + // map lower case, so build a local copy of the font substitutions + ::std::hash_map< OUString, OUString, OUStringHash > aSubstitutions; + ::std::hash_map< OUString, OUString, OUStringHash >::const_iterator subst; + for( subst = rInfo.m_aFontSubstitutes.begin(); subst != rInfo.m_aFontSubstitutes.end(); ++subst ) + { + OUString aFamily( subst->first.toAsciiLowerCase() ); + // first look if there is a builtin of this family + // in this case override the substitution table + if( aPrinterFonts.find( aFamily ) != aPrinterFonts.end() ) + aSubstitutions[ aFamily ] = aFamily; + else + aSubstitutions[ aFamily ] = subst->second.toAsciiLowerCase(); + } + + + // now find substitutions + for( it = aFonts.begin(); it != aFonts.end(); ++it ) + { + if( it->m_eType != fonttype::Builtin ) + { + OUString aFamily( it->m_aFamilyName.toAsciiLowerCase() ); + subst = aSubstitutions.find( aFamily ); + if( subst != aSubstitutions.end() ) + { + // search a substitution + const ::std::list< FastPrintFontInfo >& rBuiltins( aPrinterFonts[ aSubstitutions[ aFamily ] ] ); + ::std::list< FastPrintFontInfo >::const_iterator builtin; + int nLastMatch = -10000; + fontID nSubstitute = -1; + for( builtin = rBuiltins.begin(); builtin != rBuiltins.end(); ++builtin ) + { + int nMatch = 0; + int nDiff; + if( builtin->m_eItalic == it->m_eItalic ) + nMatch += 8000; + + nDiff = builtin->m_eWeight - it->m_eWeight; + nDiff = nDiff < 0 ? -nDiff : nDiff; + nMatch += 4000 - 1000*nDiff; + + nDiff = builtin->m_eWidth - it->m_eWidth; + nDiff = nDiff < 0 ? -nDiff : nDiff; + nMatch += 2000 - 500*nDiff; + + if( nMatch > nLastMatch ) + { + nLastMatch = nMatch; + nSubstitute = builtin->m_nID; + } + } + if( nSubstitute != -1 ) + { + rInfo.m_aFontSubstitutions[ it->m_nID ] = nSubstitute; + #if OSL_DEBUG_LEVEL > 2 + FastPrintFontInfo aInfo; + rFontManager.getFontFastInfo( nSubstitute, aInfo ); + fprintf( stderr, + "substitute %s %s %d %d\n" + " -> %s %s %d %d\n", + OUStringToOString( it->m_aFamilyName, RTL_TEXTENCODING_ISO_8859_1 ).getStr(), + it->m_eItalic == italic::Upright ? "r" : it->m_eItalic == italic::Oblique ? "o" : it->m_eItalic == italic::Italic ? "i" : "u", + it->m_eWeight, + it->m_eWidth, + + OUStringToOString( aInfo.m_aFamilyName, RTL_TEXTENCODING_ISO_8859_1 ).getStr(), + aInfo.m_eItalic == italic::Upright ? "r" : aInfo.m_eItalic == italic::Oblique ? "o" : aInfo.m_eItalic == italic::Italic ? "i" : "u", + aInfo.m_eWeight, + aInfo.m_eWidth + ); + #endif + } + } + } + } +} + +// ----------------------------------------------------------------- + +void PrinterInfoManager::getSystemPrintCommands( std::list< OUString >& rCommands ) +{ + if( m_pQueueInfo && m_pQueueInfo->hasChanged() ) + { + m_aSystemPrintCommand = m_pQueueInfo->getCommand(); + m_pQueueInfo->getSystemQueues( m_aSystemPrintQueues ); + delete m_pQueueInfo, m_pQueueInfo = NULL; + } + + std::list< SystemPrintQueue >::const_iterator it; + rCommands.clear(); + String aPrinterConst( RTL_CONSTASCII_USTRINGPARAM( "(PRINTER)" ) ); + for( it = m_aSystemPrintQueues.begin(); it != m_aSystemPrintQueues.end(); ++it ) + { + String aCmd( m_aSystemPrintCommand ); + aCmd.SearchAndReplace( aPrinterConst, it->m_aQueue ); + rCommands.push_back( aCmd ); + } +} + +const std::list< PrinterInfoManager::SystemPrintQueue >& PrinterInfoManager::getSystemPrintQueues() +{ + if( m_pQueueInfo && m_pQueueInfo->hasChanged() ) + { + m_aSystemPrintCommand = m_pQueueInfo->getCommand(); + m_pQueueInfo->getSystemQueues( m_aSystemPrintQueues ); + delete m_pQueueInfo, m_pQueueInfo = NULL; + } + + return m_aSystemPrintQueues; +} + +bool PrinterInfoManager::checkFeatureToken( const rtl::OUString& rPrinterName, const char* pToken ) const +{ + const PrinterInfo& rPrinterInfo( getPrinterInfo( rPrinterName ) ); + sal_Int32 nIndex = 0; + while( nIndex != -1 ) + { + OUString aOuterToken = rPrinterInfo.m_aFeatures.getToken( 0, ',', nIndex ); + sal_Int32 nInnerIndex = 0; + OUString aInnerToken = aOuterToken.getToken( 0, '=', nInnerIndex ); + if( aInnerToken.equalsIgnoreAsciiCaseAscii( pToken ) ) + return true; + } + return false; +} + +FILE* PrinterInfoManager::startSpool( const OUString& rPrintername, bool bQuickCommand ) +{ + const PrinterInfo& rPrinterInfo = getPrinterInfo (rPrintername); + const rtl::OUString& rCommand = (bQuickCommand && rPrinterInfo.m_aQuickCommand.getLength() ) ? + rPrinterInfo.m_aQuickCommand : rPrinterInfo.m_aCommand; + rtl::OString aShellCommand = OUStringToOString (rCommand, RTL_TEXTENCODING_ISO_8859_1); + aShellCommand += rtl::OString( " 2>/dev/null" ); + + return popen (aShellCommand.getStr(), "w"); +} + +int PrinterInfoManager::endSpool( const OUString& /*rPrintername*/, const OUString& /*rJobTitle*/, FILE* pFile, const JobData& /*rDocumentJobData*/, bool /*bBanner*/ ) +{ + return (0 == pclose( pFile )); +} + +void PrinterInfoManager::setupJobContextData( JobData& rData ) +{ + std::hash_map< OUString, Printer, OUStringHash >::iterator it = + m_aPrinters.find( rData.m_aPrinterName ); + if( it != m_aPrinters.end() ) + { + rData.m_pParser = it->second.m_aInfo.m_pParser; + rData.m_aContext = it->second.m_aInfo.m_aContext; + } +} + +void PrinterInfoManager::setDefaultPaper( PPDContext& rContext ) const +{ + if( ! rContext.getParser() ) + return; + + const PPDKey* pPageSizeKey = rContext.getParser()->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) ); + if( ! pPageSizeKey ) + return; + + int nModified = rContext.countValuesModified(); + while( nModified-- && + rContext.getModifiedKey( nModified ) != pPageSizeKey ) + ; + + if( nModified >= 0 ) // paper was set already, do not modify + { + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "not setting default paper, already set %s\n", + OUStringToOString( rContext.getValue( pPageSizeKey )->m_aOption, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); + #endif + return; + } + + // paper not set, fill in default value + const PPDValue* pPaperVal = NULL; + int nValues = pPageSizeKey->countValues(); + for( int i = 0; i < nValues && ! pPaperVal; i++ ) + { + const PPDValue* pVal = pPageSizeKey->getValue( i ); + if( pVal->m_aOption.EqualsIgnoreCaseAscii( m_aSystemDefaultPaper.getStr() ) ) + pPaperVal = pVal; + } + if( pPaperVal ) + { + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "setting default paper %s\n", OUStringToOString( pPaperVal->m_aOption, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); + #endif + rContext.setValue( pPageSizeKey, pPaperVal ); + #if OSL_DEBUG_LEVEL > 1 + pPaperVal = rContext.getValue( pPageSizeKey ); + fprintf( stderr, "-> got paper %s\n", OUStringToOString( pPaperVal->m_aOption, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); + #endif + } +} + +// ----------------------------------------------------------------- + +SystemQueueInfo::SystemQueueInfo() : + m_bChanged( false ) +{ + create(); +} + +SystemQueueInfo::~SystemQueueInfo() +{ + static const char* pNoSyncDetection = getenv( "SAL_DISABLE_SYNCHRONOUS_PRINTER_DETECTION" ); + if( ! pNoSyncDetection || !*pNoSyncDetection ) + join(); + else + terminate(); +} + +bool SystemQueueInfo::hasChanged() const +{ + MutexGuard aGuard( m_aMutex ); + bool bChanged = m_bChanged; + return bChanged; +} + +void SystemQueueInfo::getSystemQueues( std::list< PrinterInfoManager::SystemPrintQueue >& rQueues ) +{ + MutexGuard aGuard( m_aMutex ); + rQueues = m_aQueues; + m_bChanged = false; +} + +OUString SystemQueueInfo::getCommand() const +{ + MutexGuard aGuard( m_aMutex ); + OUString aRet = m_aCommand; + return aRet; +} + +struct SystemCommandParameters; +typedef void(* tokenHandler)(const std::list< rtl::OString >&, + std::list< PrinterInfoManager::SystemPrintQueue >&, + const SystemCommandParameters*); + +struct SystemCommandParameters +{ + const char* pQueueCommand; + const char* pPrintCommand; + const char* pForeToken; + const char* pAftToken; + unsigned int nForeTokenCount; + tokenHandler pHandler; +}; + +#if ! (defined(LINUX) || defined(NETBSD) || defined(FREEBSD)) +static void lpgetSysQueueTokenHandler( + const std::list< rtl::OString >& i_rLines, + std::list< PrinterInfoManager::SystemPrintQueue >& o_rQueues, + const SystemCommandParameters* ) +{ + rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); + std::hash_set< OUString, OUStringHash > aUniqueSet; + std::hash_set< OUString, OUStringHash > aOnlySet; + aUniqueSet.insert( OUString( RTL_CONSTASCII_USTRINGPARAM( "_all" ) ) ); + aUniqueSet.insert( OUString( RTL_CONSTASCII_USTRINGPARAM( "_default" ) ) ); + + // the eventual "all" attribute of the "_all" queue tells us, which + // printers are to be used for this user at all + + // find _all: line + rtl::OString aAllLine( "_all:" ); + rtl::OString aAllAttr( "all=" ); + for( std::list< rtl::OString >::const_iterator it = i_rLines.begin(); + it != i_rLines.end(); ++it ) + { + if( it->indexOf( aAllLine, 0 ) == 0 ) + { + // now find the "all" attribute + ++it; + while( it != i_rLines.end() ) + { + rtl::OString aClean( WhitespaceToSpace( *it ) ); + if( aClean.indexOf( aAllAttr, 0 ) == 0 ) + { + // insert the comma separated entries into the set of printers to use + sal_Int32 nPos = aAllAttr.getLength(); + while( nPos != -1 ) + { + OString aTok( aClean.getToken( 0, ',', nPos ) ); + if( aTok.getLength() > 0 ) + aOnlySet.insert( rtl::OStringToOUString( aTok, aEncoding ) ); + } + break; + } + } + break; + } + } + + bool bInsertAttribute = false; + rtl::OString aDescrStr( "description=" ); + rtl::OString aLocStr( "location=" ); + for( std::list< rtl::OString >::const_iterator it = i_rLines.begin(); + it != i_rLines.end(); ++it ) + { + sal_Int32 nPos = 0; + // find the begin of a new printer section + nPos = it->indexOf( ':', 0 ); + if( nPos != -1 ) + { + OUString aSysQueue( rtl::OStringToOUString( it->copy( 0, nPos ), aEncoding ) ); + // do not insert duplicates (e.g. lpstat tends to produce such lines) + // in case there was a "_all" section, insert only those printer explicitly + // set in the "all" attribute + if( aUniqueSet.find( aSysQueue ) == aUniqueSet.end() && + ( aOnlySet.empty() || aOnlySet.find( aSysQueue ) != aOnlySet.end() ) + ) + { + o_rQueues.push_back( PrinterInfoManager::SystemPrintQueue() ); + o_rQueues.back().m_aQueue = aSysQueue; + o_rQueues.back().m_aLocation = aSysQueue; + aUniqueSet.insert( aSysQueue ); + bInsertAttribute = true; + } + else + bInsertAttribute = false; + continue; + } + if( bInsertAttribute && ! o_rQueues.empty() ) + { + // look for "description" attribute, insert as comment + nPos = it->indexOf( aDescrStr, 0 ); + if( nPos != -1 ) + { + ByteString aComment( WhitespaceToSpace( it->copy(nPos+12) ) ); + if( aComment.Len() > 0 ) + o_rQueues.back().m_aComment = String( aComment, aEncoding ); + continue; + } + // look for "location" attribute, inser as location + nPos = it->indexOf( aLocStr, 0 ); + if( nPos != -1 ) + { + ByteString aLoc( WhitespaceToSpace( it->copy(nPos+9) ) ); + if( aLoc.Len() > 0 ) + o_rQueues.back().m_aLocation = String( aLoc, aEncoding ); + continue; + } + } + } +} +#endif +static void standardSysQueueTokenHandler( + const std::list< rtl::OString >& i_rLines, + std::list< PrinterInfoManager::SystemPrintQueue >& o_rQueues, + const SystemCommandParameters* i_pParms) +{ + rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); + std::hash_set< OUString, OUStringHash > aUniqueSet; + rtl::OString aForeToken( i_pParms->pForeToken ); + rtl::OString aAftToken( i_pParms->pAftToken ); + /* Normal Unix print queue discovery, also used for Darwin 5 LPR printing + */ + for( std::list< rtl::OString >::const_iterator it = i_rLines.begin(); + it != i_rLines.end(); ++it ) + { + sal_Int32 nPos = 0; + + // search for a line describing a printer: + // find if there are enough tokens before the name + for( unsigned int i = 0; i < i_pParms->nForeTokenCount && nPos != -1; i++ ) + { + nPos = it->indexOf( aForeToken, nPos ); + if( nPos != -1 && it->getLength() >= nPos+aForeToken.getLength() ) + nPos += aForeToken.getLength(); + } + if( nPos != -1 ) + { + // find if there is the token after the queue + sal_Int32 nAftPos = it->indexOf( aAftToken, nPos ); + if( nAftPos != -1 ) + { + // get the queue name between fore and aft tokens + OUString aSysQueue( rtl::OStringToOUString( it->copy( nPos, nAftPos - nPos ), aEncoding ) ); + // do not insert duplicates (e.g. lpstat tends to produce such lines) + if( aUniqueSet.find( aSysQueue ) == aUniqueSet.end() ) + { + o_rQueues.push_back( PrinterInfoManager::SystemPrintQueue() ); + o_rQueues.back().m_aQueue = aSysQueue; + o_rQueues.back().m_aLocation = aSysQueue; + aUniqueSet.insert( aSysQueue ); + } + } + } + } +} + +static const struct SystemCommandParameters aParms[] = +{ + #if defined(LINUX) || defined(NETBSD) || defined(FREEBSD) + { "/usr/sbin/lpc status", "lpr -P \"(PRINTER)\"", "", ":", 0, standardSysQueueTokenHandler }, + { "lpc status", "lpr -P \"(PRINTER)\"", "", ":", 0, standardSysQueueTokenHandler }, + { "LANG=C;LC_ALL=C;export LANG LC_ALL;lpstat -s", "lp -d \"(PRINTER)\"", "system for ", ": ", 1, standardSysQueueTokenHandler } + #else + { "LANG=C;LC_ALL=C;export LANG LC_ALL;lpget list", "lp -d \"(PRINTER)\"", "", ":", 0, lpgetSysQueueTokenHandler }, + { "LANG=C;LC_ALL=C;export LANG LC_ALL;lpstat -s", "lp -d \"(PRINTER)\"", "system for ", ": ", 1, standardSysQueueTokenHandler }, + { "/usr/sbin/lpc status", "lpr -P \"(PRINTER)\"", "", ":", 0, standardSysQueueTokenHandler }, + { "lpc status", "lpr -P \"(PRINTER)\"", "", ":", 0, standardSysQueueTokenHandler } + #endif +}; + +void SystemQueueInfo::run() +{ + char pBuffer[1024]; + FILE *pPipe; + std::list< rtl::OString > aLines; + + /* Discover which command we can use to get a list of all printer queues */ + for( unsigned int i = 0; i < sizeof(aParms)/sizeof(aParms[0]); i++ ) + { + aLines.clear(); + rtl::OStringBuffer aCmdLine( 128 ); + aCmdLine.append( aParms[i].pQueueCommand ); + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "trying print queue command \"%s\" ... ", aParms[i].pQueueCommand ); + #endif + aCmdLine.append( " 2>/dev/null" ); + if( (pPipe = popen( aCmdLine.getStr(), "r" )) ) + { + while( fgets( pBuffer, 1024, pPipe ) ) + aLines.push_back( rtl::OString( pBuffer ) ); + if( ! pclose( pPipe ) ) + { + std::list< PrinterInfoManager::SystemPrintQueue > aSysPrintQueues; + aParms[i].pHandler( aLines, aSysPrintQueues, &(aParms[i]) ); + MutexGuard aGuard( m_aMutex ); + m_bChanged = true; + m_aQueues = aSysPrintQueues; + m_aCommand = rtl::OUString::createFromAscii( aParms[i].pPrintCommand ); + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "success\n" ); + #endif + break; + } + } + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "failed\n" ); + #endif + } +} + diff --git a/vcl/unx/generic/printergfx/bitmap_gfx.cxx b/vcl/unx/generic/printergfx/bitmap_gfx.cxx new file mode 100644 index 000000000000..9275db1e469f --- /dev/null +++ b/vcl/unx/generic/printergfx/bitmap_gfx.cxx @@ -0,0 +1,732 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include "psputil.hxx" + +#include "printergfx.hxx" +#include "vcl/strhelper.hxx" + +namespace psp { + +const sal_uInt32 nLineLength = 80; +const sal_uInt32 nBufferSize = 16384; + +/* + * + * Bitmap compression / Hex encoding / Ascii85 Encoding + * + */ + +PrinterBmp::~PrinterBmp () +{ /* dont need this, but C50 does */ } + +/* virtual base class */ + +class ByteEncoder +{ +private: + +public: + + virtual void EncodeByte (sal_uInt8 nByte) = 0; + virtual ~ByteEncoder () = 0; +}; + +ByteEncoder::~ByteEncoder () +{ /* dont need this, but the C50 does */ } + +/* HexEncoder */ + +class HexEncoder : public ByteEncoder +{ +private: + + osl::File* mpFile; + sal_uInt32 mnColumn; + sal_uInt32 mnOffset; + sal_Char mpFileBuffer[nBufferSize + 16]; + + HexEncoder (); /* dont use */ + +public: + + HexEncoder (osl::File* pFile); + virtual ~HexEncoder (); + void WriteAscii (sal_uInt8 nByte); + virtual void EncodeByte (sal_uInt8 nByte); + void FlushLine (); +}; + +HexEncoder::HexEncoder (osl::File* pFile) : + mpFile (pFile), + mnColumn (0), + mnOffset (0) +{} + +HexEncoder::~HexEncoder () +{ + FlushLine (); + if (mnColumn > 0) + WritePS (mpFile, "\n"); +} + +void +HexEncoder::WriteAscii (sal_uInt8 nByte) +{ + sal_uInt32 nOff = psp::getHexValueOf (nByte, mpFileBuffer + mnOffset); + mnColumn += nOff; + mnOffset += nOff; + + if (mnColumn >= nLineLength) + { + mnOffset += psp::appendStr ("\n", mpFileBuffer + mnOffset); + mnColumn = 0; + } + if (mnOffset >= nBufferSize) + FlushLine (); +} + +void +HexEncoder::EncodeByte (sal_uInt8 nByte) +{ + WriteAscii (nByte); +} + +void +HexEncoder::FlushLine () +{ + if (mnOffset > 0) + { + WritePS (mpFile, mpFileBuffer, mnOffset); + mnOffset = 0; + } +} + +/* Ascii85 encoder, is abi compatible with HexEncoder but writes a ~> to + indicate end of data EOD */ + +class Ascii85Encoder : public ByteEncoder +{ +private: + + osl::File* mpFile; + sal_uInt32 mnByte; + sal_uInt8 mpByteBuffer[4]; + + sal_uInt32 mnColumn; + sal_uInt32 mnOffset; + sal_Char mpFileBuffer[nBufferSize + 16]; + + Ascii85Encoder (); /* dont use */ + + inline void PutByte (sal_uInt8 nByte); + inline void PutEOD (); + void ConvertToAscii85 (); + void FlushLine (); + +public: + + Ascii85Encoder (osl::File* pFile); + virtual ~Ascii85Encoder (); + virtual void EncodeByte (sal_uInt8 nByte); + void WriteAscii (sal_uInt8 nByte); +}; + +Ascii85Encoder::Ascii85Encoder (osl::File* pFile) : + mpFile (pFile), + mnByte (0), + mnColumn (0), + mnOffset (0) +{} + +inline void +Ascii85Encoder::PutByte (sal_uInt8 nByte) +{ + mpByteBuffer [mnByte++] = nByte; +} + +inline void +Ascii85Encoder::PutEOD () +{ + WritePS (mpFile, "~>\n"); +} + +void +Ascii85Encoder::ConvertToAscii85 () +{ + if (mnByte < 4) + std::memset (mpByteBuffer + mnByte, 0, (4 - mnByte) * sizeof(sal_uInt8)); + + sal_uInt32 nByteValue = mpByteBuffer[0] * 256 * 256 * 256 + + mpByteBuffer[1] * 256 * 256 + + mpByteBuffer[2] * 256 + + mpByteBuffer[3]; + + if (nByteValue == 0 && mnByte == 4) + { + /* special case of 4 Bytes in row */ + mpFileBuffer [mnOffset] = 'z'; + + mnOffset += 1; + mnColumn += 1; + } + else + { + /* real ascii85 encoding */ + mpFileBuffer [mnOffset + 4] = (nByteValue % 85) + 33; + nByteValue /= 85; + mpFileBuffer [mnOffset + 3] = (nByteValue % 85) + 33; + nByteValue /= 85; + mpFileBuffer [mnOffset + 2] = (nByteValue % 85) + 33; + nByteValue /= 85; + mpFileBuffer [mnOffset + 1] = (nByteValue % 85) + 33; + nByteValue /= 85; + mpFileBuffer [mnOffset + 0] = (nByteValue % 85) + 33; + + mnColumn += (mnByte + 1); + mnOffset += (mnByte + 1); + + /* insert a newline if necessary */ + if (mnColumn > nLineLength) + { + sal_uInt32 nEolOff = mnColumn - nLineLength; + sal_uInt32 nBufOff = mnOffset - nEolOff; + + std::memmove (mpFileBuffer + nBufOff + 1, mpFileBuffer + nBufOff, nEolOff); + mpFileBuffer[ nBufOff ] = '\n'; + + mnOffset++; + mnColumn = nEolOff; + } + } + + mnByte = 0; +} + +void +Ascii85Encoder::WriteAscii (sal_uInt8 nByte) +{ + PutByte (nByte); + if (mnByte == 4) + ConvertToAscii85 (); + + if (mnColumn >= nLineLength) + { + mnOffset += psp::appendStr ("\n", mpFileBuffer + mnOffset); + mnColumn = 0; + } + if (mnOffset >= nBufferSize) + FlushLine (); +} + +void +Ascii85Encoder::EncodeByte (sal_uInt8 nByte) +{ + WriteAscii (nByte); +} + +void +Ascii85Encoder::FlushLine () +{ + if (mnOffset > 0) + { + WritePS (mpFile, mpFileBuffer, mnOffset); + mnOffset = 0; + } +} + +Ascii85Encoder::~Ascii85Encoder () +{ + if (mnByte > 0) + ConvertToAscii85 (); + if (mnOffset > 0) + FlushLine (); + PutEOD (); +} + +/* LZW encoder */ + +class LZWEncoder : public Ascii85Encoder +{ +private: + + struct LZWCTreeNode + { + LZWCTreeNode* mpBrother; // next node with same parent + LZWCTreeNode* mpFirstChild; // first son + sal_uInt16 mnCode; // code for the string + sal_uInt16 mnValue; // pixelvalue + }; + + LZWCTreeNode* mpTable; // LZW compression data + LZWCTreeNode* mpPrefix; // the compression is as same as the TIFF compression + sal_uInt16 mnDataSize; + sal_uInt16 mnClearCode; + sal_uInt16 mnEOICode; + sal_uInt16 mnTableSize; + sal_uInt16 mnCodeSize; + sal_uInt32 mnOffset; + sal_uInt32 mdwShift; + + LZWEncoder (); + void WriteBits (sal_uInt16 nCode, sal_uInt16 nCodeLen); + +public: + + LZWEncoder (osl::File* pOutputFile); + ~LZWEncoder (); + + virtual void EncodeByte (sal_uInt8 nByte); +}; + +LZWEncoder::LZWEncoder(osl::File* pOutputFile) : + Ascii85Encoder (pOutputFile) +{ + mnDataSize = 8; + + mnClearCode = 1 << mnDataSize; + mnEOICode = mnClearCode + 1; + mnTableSize = mnEOICode + 1; + mnCodeSize = mnDataSize + 1; + + mnOffset = 32; // free bits in dwShift + mdwShift = 0; + + mpTable = new LZWCTreeNode[ 4096 ]; + + for (sal_uInt32 i = 0; i < 4096; i++) + { + mpTable[i].mpBrother = NULL; + mpTable[i].mpFirstChild = NULL; + mpTable[i].mnCode = i; + mpTable[i].mnValue = (sal_uInt8)mpTable[i].mnCode; + } + + mpPrefix = NULL; + + WriteBits( mnClearCode, mnCodeSize ); +} + +LZWEncoder::~LZWEncoder() +{ + if (mpPrefix) + WriteBits (mpPrefix->mnCode, mnCodeSize); + + WriteBits (mnEOICode, mnCodeSize); + + delete[] mpTable; +} + +void +LZWEncoder::WriteBits (sal_uInt16 nCode, sal_uInt16 nCodeLen) +{ + mdwShift |= (nCode << (mnOffset - nCodeLen)); + mnOffset -= nCodeLen; + while (mnOffset < 24) + { + WriteAscii ((sal_uInt8)(mdwShift >> 24)); + mdwShift <<= 8; + mnOffset += 8; + } + if (nCode == 257 && mnOffset != 32) + WriteAscii ((sal_uInt8)(mdwShift >> 24)); +} + +void +LZWEncoder::EncodeByte (sal_uInt8 nByte ) +{ + LZWCTreeNode* p; + sal_uInt16 i; + sal_uInt8 nV; + + if (!mpPrefix) + { + mpPrefix = mpTable + nByte; + } + else + { + nV = nByte; + for (p = mpPrefix->mpFirstChild; p != NULL; p = p->mpBrother) + { + if (p->mnValue == nV) + break; + } + + if (p != NULL) + { + mpPrefix = p; + } + else + { + WriteBits (mpPrefix->mnCode, mnCodeSize); + + if (mnTableSize == 409) + { + WriteBits (mnClearCode, mnCodeSize); + + for (i = 0; i < mnClearCode; i++) + mpTable[i].mpFirstChild = NULL; + + mnCodeSize = mnDataSize + 1; + mnTableSize = mnEOICode + 1; + } + else + { + if(mnTableSize == (sal_uInt16)((1 << mnCodeSize) - 1)) + mnCodeSize++; + + p = mpTable + (mnTableSize++); + p->mpBrother = mpPrefix->mpFirstChild; + mpPrefix->mpFirstChild = p; + p->mnValue = nV; + p->mpFirstChild = NULL; + } + + mpPrefix = mpTable + nV; + } + } +} + +/* + * + * bitmap handling routines + * + */ + +void +PrinterGfx::DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc, + const PrinterBmp& rBitmap) +{ + double fScaleX = (double)rDest.GetWidth() / (double)rSrc.GetWidth(); + double fScaleY = (double)rDest.GetHeight() / (double)rSrc.GetHeight(); + + PSGSave (); + PSTranslate (rDest.BottomLeft()); + PSScale (fScaleX, fScaleY); + + if (mnPSLevel >= 2) + { + if (rBitmap.GetDepth() == 1) + { + DrawPS2MonoImage (rBitmap, rSrc); + } + else + if (rBitmap.GetDepth() == 8 && mbColor) + { + // if the palette is larger than the image itself print it as a truecolor + // image to save diskspace. This is important for printing transparent + // bitmaps that are disassembled into small pieces + sal_Int32 nImageSz = rSrc.GetWidth() * rSrc.GetHeight(); + sal_Int32 nPaletteSz = rBitmap.GetPaletteEntryCount(); + if ((nImageSz < nPaletteSz) || (nImageSz < 24) ) + DrawPS2TrueColorImage (rBitmap, rSrc); + else + DrawPS2PaletteImage (rBitmap, rSrc); + } + else + if (rBitmap.GetDepth() == 24 && mbColor) + { + DrawPS2TrueColorImage (rBitmap, rSrc); + } + else + { + DrawPS2GrayImage (rBitmap, rSrc); + } + } + else + { + DrawPS1GrayImage (rBitmap, rSrc); + } + + PSGRestore (); +} + +/* XXX does not work XXX */ +void +PrinterGfx::DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc, + const PrinterBmp& /*rBitmap*/, const PrinterBmp& /*rTransBitmap*/) +{ + double fScaleX = (double)rDest.GetWidth() / (double)rSrc.GetWidth(); + double fScaleY = (double)rDest.GetHeight() / (double)rSrc.GetHeight(); + + PSGSave (); + PSTranslate (rDest.BottomLeft()); + PSScale (fScaleX, fScaleY); + PSGRestore (); +} + +/* XXX does not work XXX */ +void +PrinterGfx::DrawMask (const Rectangle& rDest, const Rectangle& rSrc, + const PrinterBmp &/*rBitmap*/, PrinterColor& /*rMaskColor*/) +{ + double fScaleX = (double)rDest.GetWidth() / (double)rSrc.GetWidth(); + double fScaleY = (double)rDest.GetHeight() / (double)rSrc.GetHeight(); + + PSGSave (); + PSTranslate (rDest.BottomLeft()); + PSScale (fScaleX, fScaleY); + PSGRestore (); +} + +/* + * + * Implementation: PS Level 1 + * + */ + +void +PrinterGfx::DrawPS1GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea) +{ + sal_uInt32 nWidth = rArea.GetWidth(); + sal_uInt32 nHeight = rArea.GetHeight(); + + sal_Char pGrayImage [512]; + sal_Int32 nChar = 0; + + // image header + nChar += psp::getValueOf (nWidth, pGrayImage + nChar); + nChar += psp::appendStr (" ", pGrayImage + nChar); + nChar += psp::getValueOf (nHeight, pGrayImage + nChar); + nChar += psp::appendStr (" 8 ", pGrayImage + nChar); + nChar += psp::appendStr ("[ 1 0 0 1 0 ", pGrayImage + nChar); + nChar += psp::getValueOf (nHeight, pGrayImage + nChar); + nChar += psp::appendStr ("]", pGrayImage + nChar); + nChar += psp::appendStr (" {currentfile ", pGrayImage + nChar); + nChar += psp::getValueOf (nWidth, pGrayImage + nChar); + nChar += psp::appendStr (" string readhexstring pop}\n", pGrayImage + nChar); + nChar += psp::appendStr ("image\n", pGrayImage + nChar); + + WritePS (mpPageBody, pGrayImage); + + // image body + HexEncoder* pEncoder = new HexEncoder (mpPageBody); + + for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) + { + for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) + { + sal_uChar nByte = rBitmap.GetPixelGray (nRow, nColumn); + pEncoder->EncodeByte (nByte); + } + } + + delete pEncoder; + + WritePS (mpPageBody, "\n"); +} + +/* + * + * Implementation: PS Level 2 + * + */ + +void +PrinterGfx::writePS2ImageHeader (const Rectangle& rArea, psp::ImageType nType) +{ + sal_Int32 nChar = 0; + sal_Char pImage [512]; + + sal_Int32 nDictType = 0; + switch (nType) + { + case psp::TrueColorImage: nDictType = 0; break; + case psp::PaletteImage: nDictType = 1; break; + case psp::GrayScaleImage: nDictType = 2; break; + case psp::MonochromeImage: nDictType = 3; break; + default: break; + } + sal_Int32 nCompressType = mbCompressBmp ? 1 : 0; + + nChar += psp::getValueOf (rArea.GetWidth(), pImage + nChar); + nChar += psp::appendStr (" ", pImage + nChar); + nChar += psp::getValueOf (rArea.GetHeight(), pImage + nChar); + nChar += psp::appendStr (" ", pImage + nChar); + nChar += psp::getValueOf (nDictType, pImage + nChar); + nChar += psp::appendStr (" ", pImage + nChar); + nChar += psp::getValueOf (nCompressType, pImage + nChar); + nChar += psp::appendStr (" psp_imagedict image\n", pImage + nChar); + + WritePS (mpPageBody, pImage); +} + +void +PrinterGfx::writePS2Colorspace(const PrinterBmp& rBitmap, psp::ImageType nType) +{ + switch (nType) + { + case psp::GrayScaleImage: + + WritePS (mpPageBody, "/DeviceGray setcolorspace\n"); + break; + + case psp::TrueColorImage: + + WritePS (mpPageBody, "/DeviceRGB setcolorspace\n"); + break; + + case psp::MonochromeImage: + case psp::PaletteImage: + { + + sal_Int32 nChar = 0; + sal_Char pImage [4096]; + + const sal_uInt32 nSize = rBitmap.GetPaletteEntryCount(); + + nChar += psp::appendStr ("[/Indexed /DeviceRGB ", pImage + nChar); + nChar += psp::getValueOf (nSize - 1, pImage + nChar); + if (mbCompressBmp) + nChar += psp::appendStr ("\npsp_lzwstring\n", pImage + nChar); + else + nChar += psp::appendStr ("\npsp_ascii85string\n", pImage + nChar); + WritePS (mpPageBody, pImage); + + ByteEncoder* pEncoder = mbCompressBmp ? new LZWEncoder(mpPageBody) + : new Ascii85Encoder(mpPageBody); + for (sal_uInt32 i = 0; i < nSize; i++) + { + PrinterColor aColor = rBitmap.GetPaletteColor(i); + + pEncoder->EncodeByte (aColor.GetRed()); + pEncoder->EncodeByte (aColor.GetGreen()); + pEncoder->EncodeByte (aColor.GetBlue()); + } + delete pEncoder; + + WritePS (mpPageBody, "pop ] setcolorspace\n"); + } + break; + default: break; + } +} + +void +PrinterGfx::DrawPS2GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea) +{ + writePS2Colorspace(rBitmap, psp::GrayScaleImage); + writePS2ImageHeader(rArea, psp::GrayScaleImage); + + ByteEncoder* pEncoder = mbCompressBmp ? new LZWEncoder(mpPageBody) + : new Ascii85Encoder(mpPageBody); + + for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) + { + for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) + { + sal_uChar nByte = rBitmap.GetPixelGray (nRow, nColumn); + pEncoder->EncodeByte (nByte); + } + } + + delete pEncoder; +} + +void +PrinterGfx::DrawPS2MonoImage (const PrinterBmp& rBitmap, const Rectangle& rArea) +{ + writePS2Colorspace(rBitmap, psp::MonochromeImage); + writePS2ImageHeader(rArea, psp::MonochromeImage); + + ByteEncoder* pEncoder = mbCompressBmp ? new LZWEncoder(mpPageBody) + : new Ascii85Encoder(mpPageBody); + + for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) + { + long nBitPos = 0; + sal_uChar nBit = 0; + sal_uChar nByte = 0; + + for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) + { + nBit = rBitmap.GetPixelIdx (nRow, nColumn); + nByte |= nBit << (7 - nBitPos); + + if (++nBitPos == 8) + { + pEncoder->EncodeByte (nByte); + nBitPos = 0; + nByte = 0; + } + } + // keep the row byte aligned + if (nBitPos != 0) + pEncoder->EncodeByte (nByte); + } + + delete pEncoder; +} + +void +PrinterGfx::DrawPS2PaletteImage (const PrinterBmp& rBitmap, const Rectangle& rArea) +{ + writePS2Colorspace(rBitmap, psp::PaletteImage); + writePS2ImageHeader(rArea, psp::PaletteImage); + + ByteEncoder* pEncoder = mbCompressBmp ? new LZWEncoder(mpPageBody) + : new Ascii85Encoder(mpPageBody); + + for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) + { + for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) + { + sal_uChar nByte = rBitmap.GetPixelIdx (nRow, nColumn); + pEncoder->EncodeByte (nByte); + } + } + + delete pEncoder; +} + +void +PrinterGfx::DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const Rectangle& rArea) +{ + writePS2Colorspace(rBitmap, psp::TrueColorImage); + writePS2ImageHeader(rArea, psp::TrueColorImage); + + ByteEncoder* pEncoder = mbCompressBmp ? new LZWEncoder(mpPageBody) + : new Ascii85Encoder(mpPageBody); + + for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) + { + for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) + { + PrinterColor aColor = rBitmap.GetPixelRGB (nRow, nColumn); + pEncoder->EncodeByte (aColor.GetRed()); + pEncoder->EncodeByte (aColor.GetGreen()); + pEncoder->EncodeByte (aColor.GetBlue()); + } + } + + delete pEncoder; +} + +} /* namespace psp */ diff --git a/vcl/unx/generic/printergfx/common_gfx.cxx b/vcl/unx/generic/printergfx/common_gfx.cxx new file mode 100644 index 000000000000..620386e267d0 --- /dev/null +++ b/vcl/unx/generic/printergfx/common_gfx.cxx @@ -0,0 +1,1284 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include "psputil.hxx" +#include "glyphset.hxx" + +#include "printergfx.hxx" +#include "printerjob.hxx" +#include "vcl/fontmanager.hxx" +#include "vcl/strhelper.hxx" +#include "vcl/printerinfomanager.hxx" + +#include "tools/debug.hxx" +#include "tools/color.hxx" +#include "tools/poly.hxx" + +using namespace psp ; + +static const sal_Int32 nMaxTextColumn = 80; + +GraphicsStatus::GraphicsStatus() : + mbArtItalic( false ), + mbArtBold( false ), + mnTextHeight( 0 ), + mnTextWidth( 0 ), + mfLineWidth( -1 ) +{ +} + +/* + * non graphics graphics routines + */ + +sal_Bool +PrinterGfx::Init (PrinterJob &rPrinterJob) +{ + mpPageHeader = rPrinterJob.GetCurrentPageHeader (); + mpPageBody = rPrinterJob.GetCurrentPageBody (); + mnDepth = rPrinterJob.GetDepth (); + mnPSLevel = rPrinterJob.GetPostscriptLevel (); + mbColor = rPrinterJob.IsColorPrinter (); + + mnDpi = rPrinterJob.GetResolution(); + rPrinterJob.GetScale (mfScaleX, mfScaleY); + const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( rPrinterJob.GetPrinterName() ) ); + if( mpFontSubstitutes ) + delete const_cast< ::std::hash_map* >(mpFontSubstitutes); + if( rInfo.m_bPerformFontSubstitution ) + mpFontSubstitutes = new ::std::hash_map< fontID, fontID >( rInfo.m_aFontSubstitutions ); + else + mpFontSubstitutes = NULL; + mbUploadPS42Fonts = rInfo.m_pParser ? ( rInfo.m_pParser->isType42Capable() ? sal_True : sal_False ) : sal_False; + + return sal_True; +} + +sal_Bool +PrinterGfx::Init (const JobData& rData) +{ + mpPageHeader = NULL; + mpPageBody = NULL; + mnDepth = rData.m_nColorDepth; + mnPSLevel = rData.m_nPSLevel ? rData.m_nPSLevel : (rData.m_pParser ? rData.m_pParser->getLanguageLevel() : 2 ); + mbColor = rData.m_nColorDevice ? ( rData.m_nColorDevice == -1 ? sal_False : sal_True ) : (( rData.m_pParser ? (rData.m_pParser->isColorDevice() ? sal_True : sal_False ) : sal_True ) ); + int nRes = rData.m_aContext.getRenderResolution(); + mnDpi = nRes; + mfScaleX = (double)72.0 / (double)mnDpi; + mfScaleY = (double)72.0 / (double)mnDpi; + const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( rData.m_aPrinterName ) ); + if( mpFontSubstitutes ) + delete const_cast< ::std::hash_map* >(mpFontSubstitutes); + if( rInfo.m_bPerformFontSubstitution ) + mpFontSubstitutes = new ::std::hash_map< fontID, fontID >( rInfo.m_aFontSubstitutions ); + else + mpFontSubstitutes = NULL; + mbUploadPS42Fonts = rInfo.m_pParser ? ( rInfo.m_pParser->isType42Capable() ? sal_True : sal_False ) : sal_False; + + return sal_True; +} + +void +PrinterGfx::GetResolution (sal_Int32 &rDpiX, sal_Int32 &rDpiY) const +{ + rDpiX = mnDpi; + rDpiY = mnDpi; +} + +sal_uInt16 +PrinterGfx::GetBitCount () +{ + return mnDepth; +} + +PrinterGfx::PrinterGfx() : + mpPageHeader (NULL), + mpPageBody (NULL), + mnFontID (0), + mnFallbackID (0), + mnTextAngle (0), + mbTextVertical (false), + mrFontMgr (PrintFontManager::get()), + mbCompressBmp (sal_True), + maFillColor (0xff,0,0), + maTextColor (0,0,0), + maLineColor (0, 0xff, 0), + mpFontSubstitutes( NULL ), + mbStrictSO52Compatibility( false ) +{ + maVirtualStatus.mfLineWidth = 1.0; + maVirtualStatus.mnTextHeight = 12; + maVirtualStatus.mnTextWidth = 0; + + maGraphicsStack.push_back( GraphicsStatus() ); +} + +PrinterGfx::~PrinterGfx() +{ + /* + * #95810# the original reasoning why mpFontSubstitutes is a pointer was + * that applications should release all PrinterGfx when printers change + * because they are really invalid; the corresponding printers may have + * changed their settings or even not exist anymore. + * + * Alas, this is not always done real time. So we keep a local copy of + * the font substitutes now in case of bad timing. + */ + delete const_cast< ::std::hash_map* >(mpFontSubstitutes); +} + +void +PrinterGfx::Clear() +{ + mpPageHeader = NULL; + mpPageBody = NULL; + mnFontID = 0; + maVirtualStatus = GraphicsStatus(); + maVirtualStatus.mnTextHeight = 12; + maVirtualStatus.mnTextWidth = 0; + maVirtualStatus.mfLineWidth = 1.0; + mbTextVertical = false; + maLineColor = PrinterColor(); + maFillColor = PrinterColor(); + maTextColor = PrinterColor(); + mbCompressBmp = sal_True; + mnDpi = 300; + mnDepth = 24; + mnPSLevel = 2; + mbColor = sal_True; + mnTextAngle = 0; + + maClipRegion.clear(); + maGraphicsStack.clear(); + maGraphicsStack.push_back( GraphicsStatus() ); +} + +/* + * clip region handling + */ + +void +PrinterGfx::ResetClipRegion() +{ + maClipRegion.clear(); + PSGRestore (); + PSGSave (); // get "clean" clippath +} + +void +PrinterGfx::BeginSetClipRegion( sal_uInt32 ) +{ + maClipRegion.clear(); +} + +sal_Bool +PrinterGfx::UnionClipRegion (sal_Int32 nX,sal_Int32 nY,sal_Int32 nDX,sal_Int32 nDY) +{ + if( nDX && nDY ) + maClipRegion.push_back (Rectangle(Point(nX,nY ), Size(nDX,nDY))); + return sal_True; +} + +sal_Bool +PrinterGfx::JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it, + Point& rOldPoint, sal_Int32& rColumn ) +{ + sal_Bool bSuccess = sal_False; + + std::list< Rectangle >::iterator tempit, nextit; + nextit = it; + ++nextit; + std::list< Point > leftside, rightside; + + Rectangle aLastRect( *it ); + leftside.push_back( Point( it->Left(), it->Top() ) ); + rightside.push_back( Point( it->Right()+1, it->Top() ) ); + while( nextit != maClipRegion.end() ) + { + tempit = nextit; + ++tempit; + if( nextit->Top() == aLastRect.Bottom()+1 ) + { + if( + ( nextit->Left() >= aLastRect.Left() && nextit->Left() <= aLastRect.Right() ) // left endpoint touches last rectangle + || + ( nextit->Right() >= aLastRect.Left() && nextit->Right() <= aLastRect.Right() ) // right endpoint touches last rectangle + || + ( nextit->Left() <= aLastRect.Left() && nextit->Right() >= aLastRect.Right() ) // whole line touches last rectangle + ) + { + if( aLastRect.GetHeight() > 1 || + abs( aLastRect.Left() - nextit->Left() ) > 2 || + abs( aLastRect.Right() - nextit->Right() ) > 2 + ) + { + leftside.push_back( Point( aLastRect.Left(), aLastRect.Bottom()+1 ) ); + rightside.push_back( Point( aLastRect.Right()+1, aLastRect.Bottom()+1 ) ); + } + aLastRect = *nextit; + leftside.push_back( aLastRect.TopLeft() ); + rightside.push_back( aLastRect.TopRight() ); + maClipRegion.erase( nextit ); + } + } + nextit = tempit; + } + if( leftside.size() > 1 ) + { + // push the last coordinates + leftside.push_back( Point( aLastRect.Left(), aLastRect.Bottom()+1 ) ); + rightside.push_back( Point( aLastRect.Right()+1, aLastRect.Bottom()+1 ) ); + + // cool, we can concatenate rectangles + int nDX = -65536, nDY = 65536; + int nNewDX = 0, nNewDY = 0; + + Point aLastPoint = leftside.front(); + PSBinMoveTo (aLastPoint, rOldPoint, rColumn); + leftside.pop_front(); + while( leftside.begin() != leftside.end() ) + { + Point aPoint (leftside.front()); + leftside.pop_front(); + // may have been the last one + if( leftside.begin() != leftside.end() ) + { + nNewDX = aPoint.X() - aLastPoint.X(); + nNewDY = aPoint.Y() - aLastPoint.Y(); + if( nNewDX == 0 && nDX == 0 ) + continue; + if( nDX != 0 && nNewDX != 0 && + (double)nNewDY/(double)nNewDX == (double)nDY/(double)nDX ) + continue; + } + PSBinLineTo (aPoint, rOldPoint, rColumn); + aLastPoint = aPoint; + } + + aLastPoint = rightside.back(); + nDX = -65536; + nDY = 65536; + PSBinLineTo (aLastPoint, rOldPoint, rColumn); + rightside.pop_back(); + while( rightside.begin() != rightside.end() ) + { + Point aPoint (rightside.back()); + rightside.pop_back(); + if( rightside.begin() != rightside.end() ) + { + nNewDX = aPoint.X() - aLastPoint.X(); + nNewDY = aPoint.Y() - aLastPoint.Y(); + if( nNewDX == 0 && nDX == 0 ) + continue; + if( nDX != 0 && nNewDX != 0 && + (double)nNewDY/(double)nNewDX == (double)nDY/(double)nDX ) + continue; + } + PSBinLineTo (aPoint, rOldPoint, rColumn); + } + + tempit = it; + ++tempit; + maClipRegion.erase( it ); + it = tempit; + bSuccess = sal_True; + } + return bSuccess; +} + +void +PrinterGfx::EndSetClipRegion() +{ + PSGRestore (); + PSGSave (); // get "clean" clippath + + PSBinStartPath (); + Point aOldPoint (0, 0); + sal_Int32 nColumn = 0; + + std::list< Rectangle >::iterator it = maClipRegion.begin(); + while( it != maClipRegion.end() ) + { + // try to concatenate adjacent rectangles + // first try in y direction, then in x direction + if( ! JoinVerticalClipRectangles( it, aOldPoint, nColumn ) ) + { + // failed, so it is a single rectangle + PSBinMoveTo (it->TopLeft(), aOldPoint, nColumn ); + PSBinLineTo (Point( it->Left(), it->Bottom()+1 ), aOldPoint, nColumn ); + PSBinLineTo (Point( it->Right()+1, it->Bottom()+1 ), aOldPoint, nColumn ); + PSBinLineTo (Point( it->Right()+1, it->Top() ), aOldPoint, nColumn ); + ++it; + } + } + + PSBinEndPath (); + + WritePS (mpPageBody, "closepath clip newpath\n"); + maClipRegion.clear(); +} + +/* + * draw graphic primitives + */ + +void +PrinterGfx::DrawRect (const Rectangle& rRectangle ) +{ + char pRect [128]; + sal_Int32 nChar = 0; + + nChar = psp::getValueOf (rRectangle.TopLeft().X(), pRect); + nChar += psp::appendStr (" ", pRect + nChar); + nChar += psp::getValueOf (rRectangle.TopLeft().Y(), pRect + nChar); + nChar += psp::appendStr (" ", pRect + nChar); + nChar += psp::getValueOf (rRectangle.GetWidth(), pRect + nChar); + nChar += psp::appendStr (" ", pRect + nChar); + nChar += psp::getValueOf (rRectangle.GetHeight(), pRect + nChar); + nChar += psp::appendStr (" ", pRect + nChar); + + if( maFillColor.Is() ) + { + PSSetColor (maFillColor); + PSSetColor (); + WritePS (mpPageBody, pRect, nChar); + WritePS (mpPageBody, "rectfill\n"); + } + if( maLineColor.Is() ) + { + PSSetColor (maLineColor); + PSSetColor (); + PSSetLineWidth (); + WritePS (mpPageBody, pRect, nChar); + WritePS (mpPageBody, "rectstroke\n"); + } +} + +void +PrinterGfx::DrawLine (const Point& rFrom, const Point& rTo) +{ + if( maLineColor.Is() ) + { + PSSetColor (maLineColor); + PSSetColor (); + PSSetLineWidth (); + + PSMoveTo (rFrom); + PSLineTo (rTo); + WritePS (mpPageBody, "stroke\n" ); + } +} + +void +PrinterGfx::DrawPixel (const Point& rPoint, const PrinterColor& rPixelColor) +{ + if( rPixelColor.Is() ) + { + PSSetColor (rPixelColor); + PSSetColor (); + + PSMoveTo (rPoint); + PSLineTo (Point (rPoint.X ()+1, rPoint.Y ())); + PSLineTo (Point (rPoint.X ()+1, rPoint.Y ()+1)); + PSLineTo (Point (rPoint.X (), rPoint.Y ()+1)); + WritePS (mpPageBody, "fill\n" ); + } +} + +void +PrinterGfx::DrawPolyLine (sal_uInt32 nPoints, const Point* pPath) +{ + if( maLineColor.Is() && nPoints && pPath ) + { + PSSetColor (maLineColor); + PSSetColor (); + PSSetLineWidth (); + + PSBinCurrentPath (nPoints, pPath); + + WritePS (mpPageBody, "stroke\n" ); + } +} + +void +PrinterGfx::DrawPolygon (sal_uInt32 nPoints, const Point* pPath) +{ + // premature end of operation + if (!(nPoints > 1) || (pPath == NULL) || !(maFillColor.Is() || maLineColor.Is())) + return; + + // setup closed path + Point aPoint( 0, 0 ); + sal_Int32 nColumn( 0 ); + + PSBinStartPath(); + PSBinMoveTo( pPath[0], aPoint, nColumn ); + for( unsigned int n = 1; n < nPoints; n++ ) + PSBinLineTo( pPath[n], aPoint, nColumn ); + if( pPath[0] != pPath[nPoints-1] ) + PSBinLineTo( pPath[0], aPoint, nColumn ); + PSBinEndPath(); + + // fill the polygon first, then draw the border, note that fill and + // stroke reset the currentpath + + // if fill and stroke, save the current path + if( maFillColor.Is() && maLineColor.Is()) + PSGSave(); + + if (maFillColor.Is ()) + { + PSSetColor (maFillColor); + PSSetColor (); + WritePS (mpPageBody, "eofill\n"); + } + + // restore the current path + if( maFillColor.Is() && maLineColor.Is()) + PSGRestore(); + + if (maLineColor.Is ()) + { + PSSetColor (maLineColor); + PSSetColor (); + PSSetLineWidth (); + WritePS (mpPageBody, "stroke\n"); + } +} + +void +PrinterGfx::DrawPolyPolygon (sal_uInt32 nPoly, const sal_uInt32* pSizes, const Point** pPaths ) +{ + // sanity check + if ( !nPoly || !pPaths || !(maFillColor.Is() || maLineColor.Is())) + return; + + + // setup closed path + for( unsigned int i = 0; i < nPoly; i++ ) + { + Point aPoint( 0, 0 ); + sal_Int32 nColumn( 0 ); + + PSBinStartPath(); + PSBinMoveTo( pPaths[i][0], aPoint, nColumn ); + for( unsigned int n = 1; n < pSizes[i]; n++ ) + PSBinLineTo( pPaths[i][n], aPoint, nColumn ); + if( pPaths[i][0] != pPaths[i][pSizes[i]-1] ) + PSBinLineTo( pPaths[i][0], aPoint, nColumn ); + PSBinEndPath(); + } + + // if eofill and stroke, save the current path + if( maFillColor.Is() && maLineColor.Is()) + PSGSave(); + + // first draw area + if( maFillColor.Is() ) + { + PSSetColor (maFillColor); + PSSetColor (); + WritePS (mpPageBody, "eofill\n"); + } + + // restore the current path + if( maFillColor.Is() && maLineColor.Is()) + PSGRestore(); + + // now draw outlines + if( maLineColor.Is() ) + { + PSSetColor (maLineColor); + PSSetColor (); + PSSetLineWidth (); + WritePS (mpPageBody, "stroke\n"); + } +} + +/* + * Bezier Polygon Drawing methods. + */ + +void +PrinterGfx::DrawPolyLineBezier (sal_uInt32 nPoints, const Point* pPath, const BYTE* pFlgAry) +{ + const sal_uInt32 nBezString = 1024; + sal_Char pString[nBezString]; + + if ( nPoints > 1 && maLineColor.Is() && pPath ) + { + PSSetColor (maLineColor); + PSSetColor (); + PSSetLineWidth (); + + snprintf(pString, nBezString, "%li %li moveto\n", pPath[0].X(), pPath[0].Y()); + WritePS(mpPageBody, pString); + + // Handle the drawing of mixed lines mixed with curves + // - a normal point followed by a normal point is a line + // - a normal point followed by 2 control points and a normal point is a curve + for (unsigned int i=1; i= nPoints) + return; //Error: wrong sequence of contol/normal points somehow + if ((pFlgAry[i] == POLY_CONTROL) && (pFlgAry[i+1] == POLY_CONTROL) && + (pFlgAry[i+2] != POLY_CONTROL)) + { + snprintf(pString, nBezString, "%li %li %li %li %li %li curveto\n", + pPath[i].X(), pPath[i].Y(), + pPath[i+1].X(), pPath[i+1].Y(), + pPath[i+2].X(), pPath[i+2].Y()); + } + else + { + DBG_ERROR( "PrinterGfx::DrawPolyLineBezier: Strange output" ); + } + i+=3; + } + WritePS(mpPageBody, pString); + } + + // now draw outlines + WritePS (mpPageBody, "stroke\n"); + } +} + +void +PrinterGfx::DrawPolygonBezier (sal_uInt32 nPoints, const Point* pPath, const BYTE* pFlgAry) +{ + const sal_uInt32 nBezString = 1024; + sal_Char pString[nBezString]; + // premature end of operation + if (!(nPoints > 1) || (pPath == NULL) || !(maFillColor.Is() || maLineColor.Is())) + return; + + snprintf(pString, nBezString, "%li %li moveto\n", pPath[0].X(), pPath[0].Y()); + WritePS(mpPageBody, pString); //Move to the starting point for the PolyPoygon + for (unsigned int i=1; i < nPoints;) + { + if (pFlgAry[i] != POLY_CONTROL) + { + snprintf(pString, nBezString, "%li %li lineto\n", pPath[i].X(), pPath[i].Y()); + WritePS(mpPageBody, pString); + i++; + } + else + { + if (i+2 >= nPoints) + return; //Error: wrong sequence of contol/normal points somehow + if ((pFlgAry[i] == POLY_CONTROL) && (pFlgAry[i+1] == POLY_CONTROL) && + (pFlgAry[i+2] != POLY_CONTROL)) + { + snprintf(pString, nBezString, "%li %li %li %li %li %li curveto\n", + pPath[i].X(), pPath[i].Y(), + pPath[i+1].X(), pPath[i+1].Y(), + pPath[i+2].X(), pPath[i+2].Y()); + WritePS(mpPageBody, pString); + } + else + { + DBG_ERROR( "PrinterGfx::DrawPolygonBezier: Strange output" ); + } + i+=3; + } + } + + // if fill and stroke, save the current path + if( maFillColor.Is() && maLineColor.Is()) + PSGSave(); + + if (maFillColor.Is ()) + { + PSSetColor (maFillColor); + PSSetColor (); + WritePS (mpPageBody, "eofill\n"); + } + + // restore the current path + if( maFillColor.Is() && maLineColor.Is()) + PSGRestore(); +} + +void +PrinterGfx::DrawPolyPolygonBezier (sal_uInt32 nPoly, const sal_uInt32 * pPoints, const Point* const * pPtAry, const BYTE* const* pFlgAry) +{ + const sal_uInt32 nBezString = 1024; + sal_Char pString[nBezString]; + if ( !nPoly || !pPtAry || !pPoints || !(maFillColor.Is() || maLineColor.Is())) + return; + + + for (unsigned int i=0; i= nPoints) + break; //Error: wrong sequence of contol/normal points somehow + if ((pFlgAry[i][j] == POLY_CONTROL) && (pFlgAry[i][j+1] == POLY_CONTROL) && (pFlgAry[i][j+2] != POLY_CONTROL)) + { + snprintf(pString, nBezString, "%li %li %li %li %li %li curveto\n", + pPtAry[i][j].X(), pPtAry[i][j].Y(), + pPtAry[i][j+1].X(), pPtAry[i][j+1].Y(), + pPtAry[i][j+2].X(), pPtAry[i][j+2].Y()); + WritePS(mpPageBody, pString); + } + else + { + DBG_ERROR( "PrinterGfx::DrawPolyPolygonBezier: Strange output" ); + } + j+=3; + } + } + } + + // if fill and stroke, save the current path + if( maFillColor.Is() && maLineColor.Is()) + PSGSave(); + + if (maFillColor.Is ()) + { + PSSetColor (maFillColor); + PSSetColor (); + WritePS (mpPageBody, "eofill\n"); + } + + // restore the current path + if( maFillColor.Is() && maLineColor.Is()) + PSGRestore(); +} + + +/* + * postscript generating routines + */ +void +PrinterGfx::PSGSave () +{ + WritePS (mpPageBody, "gsave\n" ); + GraphicsStatus aNewState; + if( maGraphicsStack.begin() != maGraphicsStack.end() ) + aNewState = maGraphicsStack.front(); + maGraphicsStack.push_front( aNewState ); +} + +void +PrinterGfx::PSGRestore () +{ + WritePS (mpPageBody, "grestore\n" ); + if( maGraphicsStack.begin() == maGraphicsStack.end() ) + WritePS (mpPageBody, "Error: too many grestores\n" ); + else + maGraphicsStack.pop_front(); +} + +void +PrinterGfx::PSSetLineWidth () +{ + if( currentState().mfLineWidth != maVirtualStatus.mfLineWidth ) + { + char pBuffer[128]; + sal_Int32 nChar = 0; + + currentState().mfLineWidth = maVirtualStatus.mfLineWidth; + nChar = psp::getValueOfDouble (pBuffer, maVirtualStatus.mfLineWidth, 5); + nChar += psp::appendStr (" setlinewidth\n", pBuffer + nChar); + WritePS (mpPageBody, pBuffer, nChar); + } +} + +void +PrinterGfx::PSSetColor () +{ + PrinterColor& rColor( maVirtualStatus.maColor ); + + if( currentState().maColor != rColor ) + { + currentState().maColor = rColor; + + char pBuffer[128]; + sal_Int32 nChar = 0; + + if( mbColor ) + { + nChar = psp::getValueOfDouble (pBuffer, + (double)rColor.GetRed() / 255.0, 5); + nChar += psp::appendStr (" ", pBuffer + nChar); + nChar += psp::getValueOfDouble (pBuffer + nChar, + (double)rColor.GetGreen() / 255.0, 5); + nChar += psp::appendStr (" ", pBuffer + nChar); + nChar += psp::getValueOfDouble (pBuffer + nChar, + (double)rColor.GetBlue() / 255.0, 5); + nChar += psp::appendStr (" setrgbcolor\n", pBuffer + nChar ); + } + else + { + Color aColor( rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue() ); + sal_uInt8 nCol = aColor.GetLuminance(); + nChar = psp::getValueOfDouble( pBuffer, (double)nCol / 255.0, 5 ); + nChar += psp::appendStr( " setgray\n", pBuffer + nChar ); + } + + WritePS (mpPageBody, pBuffer, nChar); + } +} + +void +PrinterGfx::PSSetFont () +{ + GraphicsStatus& rCurrent( currentState() ); + if( maVirtualStatus.maFont != rCurrent.maFont || + maVirtualStatus.mnTextHeight != rCurrent.mnTextHeight || + maVirtualStatus.maEncoding != rCurrent.maEncoding || + maVirtualStatus.mnTextWidth != rCurrent.mnTextWidth || + maVirtualStatus.mbArtBold != rCurrent.mbArtBold || + maVirtualStatus.mbArtItalic != rCurrent.mbArtItalic + ) + { + rCurrent.maFont = maVirtualStatus.maFont; + rCurrent.maEncoding = maVirtualStatus.maEncoding; + rCurrent.mnTextWidth = maVirtualStatus.mnTextWidth; + rCurrent.mnTextHeight = maVirtualStatus.mnTextHeight; + rCurrent.mbArtItalic = maVirtualStatus.mbArtItalic; + rCurrent.mbArtBold = maVirtualStatus.mbArtBold; + + sal_Int32 nTextHeight = rCurrent.mnTextHeight; + sal_Int32 nTextWidth = rCurrent.mnTextWidth ? rCurrent.mnTextWidth + : rCurrent.mnTextHeight; + + sal_Char pSetFont [256]; + sal_Int32 nChar = 0; + + // postscript based fonts need reencoding + if ( ( rCurrent.maEncoding == RTL_TEXTENCODING_MS_1252) + || ( rCurrent.maEncoding == RTL_TEXTENCODING_ISO_8859_1) + || ( rCurrent.maEncoding >= RTL_TEXTENCODING_USER_START + && rCurrent.maEncoding <= RTL_TEXTENCODING_USER_END) + ) + { + rtl::OString aReencodedFont = + psp::GlyphSet::GetReencodedFontName (rCurrent.maEncoding, + rCurrent.maFont); + + nChar += psp::appendStr ("(", pSetFont + nChar); + nChar += psp::appendStr (aReencodedFont.getStr(), + pSetFont + nChar); + nChar += psp::appendStr (") cvn findfont ", + pSetFont + nChar); + } + else + // tt based fonts mustn't reencode, the encoding is implied by the fontname + // same for symbol type1 fonts, dont try to touch them + { + nChar += psp::appendStr ("(", pSetFont + nChar); + nChar += psp::appendStr (rCurrent.maFont.getStr(), + pSetFont + nChar); + nChar += psp::appendStr (") cvn findfont ", + pSetFont + nChar); + } + + if( ! rCurrent.mbArtItalic ) + { + nChar += psp::getValueOf (nTextWidth, pSetFont + nChar); + nChar += psp::appendStr (" ", pSetFont + nChar); + nChar += psp::getValueOf (-nTextHeight, pSetFont + nChar); + nChar += psp::appendStr (" matrix scale makefont setfont\n", pSetFont + nChar); + } + else // skew 15 degrees to right + { + nChar += psp::appendStr ( " [", pSetFont + nChar); + nChar += psp::getValueOf (nTextWidth, pSetFont + nChar); + nChar += psp::appendStr (" 0 ", pSetFont + nChar); + nChar += psp::getValueOfDouble (pSetFont + nChar, 0.27*(double)nTextWidth, 3 ); + nChar += psp::appendStr ( " ", pSetFont + nChar); + nChar += psp::getValueOf (-nTextHeight, pSetFont + nChar); + + nChar += psp::appendStr (" 0 0] makefont setfont\n", pSetFont + nChar); + } + + WritePS (mpPageBody, pSetFont); + } +} + +void +PrinterGfx::PSRotate (sal_Int32 nAngle) +{ + sal_Int32 nPostScriptAngle = -nAngle; + while( nPostScriptAngle < 0 ) + nPostScriptAngle += 3600; + + if (nPostScriptAngle == 0) + return; + + sal_Int32 nFullAngle = nPostScriptAngle / 10; + sal_Int32 nTenthAngle = nPostScriptAngle % 10; + + sal_Char pRotate [48]; + sal_Int32 nChar = 0; + + nChar = psp::getValueOf (nFullAngle, pRotate); + nChar += psp::appendStr (".", pRotate + nChar); + nChar += psp::getValueOf (nTenthAngle, pRotate + nChar); + nChar += psp::appendStr (" rotate\n", pRotate + nChar); + + WritePS (mpPageBody, pRotate); +} + +void +PrinterGfx::PSPointOp (const Point& rPoint, const sal_Char* pOperator) +{ + sal_Char pPSCommand [48]; + sal_Int32 nChar = 0; + + nChar = psp::getValueOf (rPoint.X(), pPSCommand); + nChar += psp::appendStr (" ", pPSCommand + nChar); + nChar += psp::getValueOf (rPoint.Y(), pPSCommand + nChar); + nChar += psp::appendStr (" ", pPSCommand + nChar); + nChar += psp::appendStr (pOperator, pPSCommand + nChar); + nChar += psp::appendStr ("\n", pPSCommand + nChar); + + DBG_ASSERT (nChar < 48, "Buffer overflow in PSPointOp"); + + WritePS (mpPageBody, pPSCommand); +} + +void +PrinterGfx::PSTranslate (const Point& rPoint) +{ + PSPointOp (rPoint, "translate"); +} + +void +PrinterGfx::PSMoveTo (const Point& rPoint) +{ + PSPointOp (rPoint, "moveto"); +} + +void +PrinterGfx::PSLineTo (const Point& rPoint) +{ + PSPointOp (rPoint, "lineto"); +} + +void +PrinterGfx::PSRMoveTo (sal_Int32 nDx, sal_Int32 nDy) +{ + Point aPoint(nDx, nDy); + PSPointOp (aPoint, "rmoveto"); +} + +/* get a compressed representation of the path information */ + +#define DEBUG_BINPATH 0 + +void +PrinterGfx::PSBinLineTo (const Point& rCurrent, Point& rOld, sal_Int32& nColumn) +{ +#if (DEBUG_BINPATH == 1) + PSLineTo (rCurrent); +#else + PSBinPath (rCurrent, rOld, lineto, nColumn); +#endif +} + +void +PrinterGfx::PSBinMoveTo (const Point& rCurrent, Point& rOld, sal_Int32& nColumn) +{ +#if (DEBUG_BINPATH == 1) + PSMoveTo (rCurrent); +#else + PSBinPath (rCurrent, rOld, moveto, nColumn); +#endif +} + +void +PrinterGfx::PSBinStartPath () +{ +#if (DEBUG_BINPATH == 1) + WritePS (mpPageBody, "% PSBinStartPath\n"); +#else + WritePS (mpPageBody, "readpath\n" ); +#endif +} + +void +PrinterGfx::PSBinEndPath () +{ +#if (DEBUG_BINPATH == 1) + WritePS (mpPageBody, "% PSBinEndPath\n"); +#else + WritePS (mpPageBody, "~\n"); +#endif +} + +void +PrinterGfx::PSBinCurrentPath (sal_uInt32 nPoints, const Point* pPath) +{ + // create the path + Point aPoint (0, 0); + sal_Int32 nColumn = 0; + + PSBinStartPath (); + PSBinMoveTo (*pPath, aPoint, nColumn); + for (unsigned int i = 1; i < nPoints; i++) + PSBinLineTo (pPath[i], aPoint, nColumn); + PSBinEndPath (); +} + +void +PrinterGfx::PSBinPath (const Point& rCurrent, Point& rOld, + pspath_t eType, sal_Int32& nColumn) +{ + sal_Char pPath[48]; + sal_Int32 nChar; + + // create the hex representation of the dx and dy path shift, store the field + // width as it is needed for the building the command + sal_Int32 nXPrec = getAlignedHexValueOf (rCurrent.X() - rOld.X(), pPath + 1); + sal_Int32 nYPrec = getAlignedHexValueOf (rCurrent.Y() - rOld.Y(), pPath + 1 + nXPrec); + pPath [ 1 + nXPrec + nYPrec ] = 0; + + // build the command, it is a char with bit represention 000cxxyy + // c represents the char, xx and yy repr. the field width of the dx and dy shift, + // dx and dy represent the number of bytes to read after the opcode + sal_Char cCmd = (eType == lineto ? (sal_Char)0x00 : (sal_Char)0x10); + switch (nYPrec) + { + case 2: break; + case 4: cCmd |= 0x01; break; + case 6: cCmd |= 0x02; break; + case 8: cCmd |= 0x03; break; + default: DBG_ERROR ("invalid x precision in binary path"); + } + switch (nXPrec) + { + case 2: break; + case 4: cCmd |= 0x04; break; + case 6: cCmd |= 0x08; break; + case 8: cCmd |= 0x0c; break; + default: DBG_ERROR ("invalid y precision in binary path"); + } + cCmd += 'A'; + pPath[0] = cCmd; + + // write the command to file, + // line breaking at column nMaxTextColumn (80) + nChar = 1 + nXPrec + nYPrec; + if ((nColumn + nChar) > nMaxTextColumn) + { + sal_Int32 nSegment = nMaxTextColumn - nColumn; + + WritePS (mpPageBody, pPath, nSegment); + WritePS (mpPageBody, "\n", 1); + WritePS (mpPageBody, pPath + nSegment, nChar - nSegment); + + nColumn = nChar - nSegment; + } + else + { + WritePS (mpPageBody, pPath, nChar); + + nColumn += nChar; + } + + rOld = rCurrent; +} + +void +PrinterGfx::PSScale (double fScaleX, double fScaleY) +{ + sal_Char pScale [48]; + sal_Int32 nChar = 0; + + nChar = psp::getValueOfDouble (pScale, fScaleX, 5); + nChar += psp::appendStr (" ", pScale + nChar); + nChar += psp::getValueOfDouble (pScale + nChar, fScaleY, 5); + nChar += psp::appendStr (" scale\n", pScale + nChar); + + WritePS (mpPageBody, pScale); +} + +/* psshowtext helper routines: draw an hex string for show/xshow */ +void +PrinterGfx::PSHexString (const sal_uChar* pString, sal_Int16 nLen) +{ + sal_Char pHexString [128]; + sal_Int32 nChar = 0; + + nChar = psp::appendStr ("<", pHexString); + for (int i = 0; i < nLen; i++) + { + if (nChar >= (nMaxTextColumn - 1)) + { + nChar += psp::appendStr ("\n", pHexString + nChar); + WritePS (mpPageBody, pHexString, nChar); + nChar = 0; + } + nChar += psp::getHexValueOf ((sal_Int32)pString[i], pHexString + nChar); + } + + nChar += psp::appendStr (">\n", pHexString + nChar); + WritePS (mpPageBody, pHexString, nChar); +} + +/* psshowtext helper routines: draw an array for xshow ps operator */ +void +PrinterGfx::PSDeltaArray (const sal_Int32 *pArray, sal_Int16 nEntries) +{ + sal_Char pPSArray [128]; + sal_Int32 nChar = 0; + + nChar = psp::appendStr ("[", pPSArray + nChar); + nChar += psp::getValueOf (pArray[0], pPSArray + nChar); + + for (int i = 1; i < nEntries; i++) + { + if (nChar >= (nMaxTextColumn - 1)) + { + nChar += psp::appendStr ("\n", pPSArray + nChar); + WritePS (mpPageBody, pPSArray, nChar); + nChar = 0; + } + + nChar += psp::appendStr (" ", pPSArray + nChar); + nChar += psp::getValueOf (pArray[i] - pArray[i-1], pPSArray + nChar); + } + + nChar += psp::appendStr (" 0]\n", pPSArray + nChar); + WritePS (mpPageBody, pPSArray); +} + +/* the DrawText equivalent, pDeltaArray may be NULL. For Type1 fonts or single byte + * fonts in general nBytes and nGlyphs is the same. For printer resident Composite + * fonts it may be different (these fonts may be SJIS encoded for example) */ +void +PrinterGfx::PSShowText (const sal_uChar* pStr, sal_Int16 nGlyphs, sal_Int16 nBytes, + const sal_Int32* pDeltaArray) +{ + PSSetColor (maTextColor); + PSSetColor (); + PSSetFont (); + // rotate the user coordinate system + if (mnTextAngle != 0) + { + PSGSave (); + PSRotate (mnTextAngle); + } + + sal_Char pBuffer[256]; + if( maVirtualStatus.mbArtBold ) + { + sal_Int32 nLW = maVirtualStatus.mnTextWidth; + if( nLW == 0 ) + nLW = maVirtualStatus.mnTextHeight; + else + nLW = nLW < maVirtualStatus.mnTextHeight ? nLW : maVirtualStatus.mnTextHeight; + psp::getValueOfDouble( pBuffer, (double)nLW / 30.0 ); + } + // dispatch to the drawing method + if (pDeltaArray == NULL) + { + PSHexString (pStr, nBytes); + + if( maVirtualStatus.mbArtBold ) + { + WritePS( mpPageBody, pBuffer ); + WritePS( mpPageBody, " bshow\n" ); + } + else + WritePS (mpPageBody, "show\n"); + } + else + { + PSHexString (pStr, nBytes); + PSDeltaArray (pDeltaArray, nGlyphs - 1); + if( maVirtualStatus.mbArtBold ) + { + WritePS( mpPageBody, pBuffer ); + WritePS( mpPageBody, " bxshow\n" ); + } + else + WritePS (mpPageBody, "xshow\n"); + } + + // restore the user coordinate system + if (mnTextAngle != 0) + PSGRestore (); +} + +void +PrinterGfx::PSComment( const sal_Char* pComment ) +{ + const sal_Char* pLast = pComment; + while( pComment && *pComment ) + { + while( *pComment && *pComment != '\n' && *pComment != '\r' ) + pComment++; + if( pComment - pLast > 1 ) + { + WritePS( mpPageBody, "% ", 2 ); + WritePS( mpPageBody, pLast, pComment - pLast ); + WritePS( mpPageBody, "\n", 1 ); + } + if( *pComment ) + pLast = ++pComment; + } +} + +sal_Bool +PrinterGfx::DrawEPS( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize ) +{ + if( nSize == 0 ) + return sal_True; + if( ! mpPageBody ) + return sal_False; + + sal_Bool bSuccess = sal_False; + + // first search the BoundingBox of the EPS data + SvMemoryStream aStream( pPtr, nSize, STREAM_READ ); + aStream.Seek( STREAM_SEEK_TO_BEGIN ); + ByteString aLine; + + ByteString aDocTitle; + double fLeft = 0, fRight = 0, fTop = 0, fBottom = 0; + bool bEndComments = false; + while( ! aStream.IsEof() + && ( ( fLeft == 0 && fRight == 0 && fTop == 0 && fBottom == 0 ) || + ( aDocTitle.Len() == 0 && bEndComments == false ) ) + ) + { + aStream.ReadLine( aLine ); + if( aLine.Len() > 1 && aLine.GetChar( 0 ) == '%' ) + { + char cChar = aLine.GetChar(1); + if( cChar == '%' ) + { + if( aLine.CompareIgnoreCaseToAscii( "%%BoundingBox:", 14 ) == COMPARE_EQUAL ) + { + aLine = WhitespaceToSpace( aLine.GetToken( 1, ':' ) ); + if( aLine.Len() && aLine.Search( "atend" ) == STRING_NOTFOUND ) + { + fLeft = StringToDouble( GetCommandLineToken( 0, aLine ) ); + fBottom = StringToDouble( GetCommandLineToken( 1, aLine ) ); + fRight = StringToDouble( GetCommandLineToken( 2, aLine ) ); + fTop = StringToDouble( GetCommandLineToken( 3, aLine ) ); + } + } + else if( aLine.CompareIgnoreCaseToAscii( "%%Title:", 8 ) == COMPARE_EQUAL ) + aDocTitle = WhitespaceToSpace( aLine.Copy( 8 ) ); + else if( aLine.CompareIgnoreCaseToAscii( "%%EndComments", 13 ) == COMPARE_EQUAL ) + bEndComments = true; + } + else if( cChar == ' ' || cChar == '\t' || cChar == '\r' || cChar == '\n' ) + bEndComments = true; + } + else + bEndComments = true; + } + + static sal_uInt16 nEps = 0; + if( ! aDocTitle.Len() ) + aDocTitle = ByteString::CreateFromInt32( (sal_Int32)(nEps++) ); + + if( fLeft != fRight && fTop != fBottom ) + { + double fScaleX = (double)rBoundingBox.GetWidth()/(fRight-fLeft); + double fScaleY = -(double)rBoundingBox.GetHeight()/(fTop-fBottom); + Point aTranslatePoint( (int)(rBoundingBox.Left()-fLeft*fScaleX), + (int)(rBoundingBox.Bottom()+1-fBottom*fScaleY) ); + // prepare EPS + WritePS( mpPageBody, + "/b4_Inc_state save def\n" + "/dict_count countdictstack def\n" + "/op_count count 1 sub def\n" + "userdict begin\n" + "/showpage {} def\n" + "0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin\n" + "10 setmiterlimit [] 0 setdash newpath\n" + "/languagelevel where\n" + "{pop languagelevel\n" + "1 ne\n" + " {false setstrokeadjust false setoverprint\n" + " } if\n" + "}if\n" ); + // set up clip path and scale + BeginSetClipRegion( 1 ); + UnionClipRegion( rBoundingBox.Left(), rBoundingBox.Top(), rBoundingBox.GetWidth(), rBoundingBox.GetHeight() ); + EndSetClipRegion(); + PSTranslate( aTranslatePoint ); + PSScale( fScaleX, fScaleY ); + + // DSC requires BeginDocument + WritePS( mpPageBody, "%%BeginDocument: " ); + WritePS( mpPageBody, aDocTitle ); + WritePS( mpPageBody, "\n" ); + + // write the EPS data + sal_uInt64 nOutLength; + mpPageBody->write( pPtr, nSize, nOutLength ); + bSuccess = nOutLength == nSize; + + // corresponding EndDocument + if( ((char*)pPtr)[ nSize-1 ] != '\n' ) + WritePS( mpPageBody, "\n" ); + WritePS( mpPageBody, "%%EndDocument\n" ); + + // clean up EPS + WritePS( mpPageBody, + "count op_count sub {pop} repeat\n" + "countdictstack dict_count sub {end} repeat\n" + "b4_Inc_state restore\n" ); + } + return bSuccess; +} diff --git a/vcl/unx/generic/printergfx/glyphset.cxx b/vcl/unx/generic/printergfx/glyphset.cxx new file mode 100644 index 000000000000..9b0f5fb99c43 --- /dev/null +++ b/vcl/unx/generic/printergfx/glyphset.cxx @@ -0,0 +1,942 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include "glyphset.hxx" +#include "psputil.hxx" + +#include "sft.hxx" + +#include "printergfx.hxx" +#include "fontsubset.hxx" +#include "vcl/fontmanager.hxx" + +#include "osl/thread.h" + +#include "sal/alloca.h" + +#include "rtl/ustring.hxx" +#include "rtl/strbuf.hxx" + +#include +#include +#include + +using namespace vcl; +using namespace psp; +using namespace rtl; + +GlyphSet::GlyphSet () + : mnFontID (-1), + mbVertical (0), + mbUseFontEncoding (false) +{} + +GlyphSet::GlyphSet (sal_Int32 nFontID, sal_Bool bVertical) + : mnFontID (nFontID), + mbVertical (bVertical) +{ + PrintFontManager &rMgr = PrintFontManager::get(); + meBaseType = rMgr.getFontType (mnFontID); + maBaseName = OUStringToOString (rMgr.getPSName(mnFontID), + RTL_TEXTENCODING_ASCII_US); + mnBaseEncoding = rMgr.getFontEncoding(mnFontID); + mbUseFontEncoding = rMgr.getUseOnlyFontEncoding(mnFontID); +} + +GlyphSet::~GlyphSet () +{ + /* FIXME delete the glyphlist ??? */ +} + +sal_Int32 +GlyphSet::GetFontID () +{ + return mnFontID; +} + +fonttype::type +GlyphSet::GetFontType () +{ + return meBaseType; +} + +sal_Bool +GlyphSet::IsVertical () +{ + return mbVertical; +} + +sal_Bool +GlyphSet::SetFont (sal_Int32 nFontID, sal_Bool bVertical) +{ + if (mnFontID != -1) + return sal_False; + + mnFontID = nFontID; + mbVertical = bVertical; + + PrintFontManager &rMgr = PrintFontManager::get(); + meBaseType = rMgr.getFontType (mnFontID); + maBaseName = OUStringToOString (rMgr.getPSName(mnFontID), + RTL_TEXTENCODING_ASCII_US); + mnBaseEncoding = rMgr.getFontEncoding(mnFontID); + mbUseFontEncoding = rMgr.getUseOnlyFontEncoding(mnFontID); + + return sal_True; +} + +sal_Bool +GlyphSet::GetCharID ( + sal_Unicode nChar, + sal_uChar* nOutGlyphID, + sal_Int32* nOutGlyphSetID + ) +{ + return LookupCharID (nChar, nOutGlyphID, nOutGlyphSetID) + || AddCharID (nChar, nOutGlyphID, nOutGlyphSetID); +} + +sal_Bool +GlyphSet::GetGlyphID ( + sal_uInt32 nGlyph, + sal_Unicode nUnicode, + sal_uChar* nOutGlyphID, + sal_Int32* nOutGlyphSetID + ) +{ + return LookupGlyphID (nGlyph, nOutGlyphID, nOutGlyphSetID) + || AddGlyphID (nGlyph, nUnicode, nOutGlyphID, nOutGlyphSetID); +} + +sal_Bool +GlyphSet::LookupCharID ( + sal_Unicode nChar, + sal_uChar* nOutGlyphID, + sal_Int32* nOutGlyphSetID + ) +{ + char_list_t::iterator aGlyphSet; + sal_Int32 nGlyphSetID; + + // loop thru all the font subsets + for (aGlyphSet = maCharList.begin(), nGlyphSetID = 1; + aGlyphSet != maCharList.end(); + ++aGlyphSet, nGlyphSetID++) + { + // check every subset if it contains the queried unicode char + char_map_t::const_iterator aGlyph = (*aGlyphSet).find (nChar); + if (aGlyph != (*aGlyphSet).end()) + { + // success: found the unicode char, return the glyphid and the glyphsetid + *nOutGlyphSetID = nGlyphSetID; + *nOutGlyphID = (*aGlyph).second; + return sal_True; + } + } + + *nOutGlyphSetID = -1; + *nOutGlyphID = 0; + return sal_False; +} + +sal_Bool +GlyphSet::LookupGlyphID ( + sal_uInt32 nGlyph, + sal_uChar* nOutGlyphID, + sal_Int32* nOutGlyphSetID + ) +{ + glyph_list_t::iterator aGlyphSet; + sal_Int32 nGlyphSetID; + + // loop thru all the font subsets + for (aGlyphSet = maGlyphList.begin(), nGlyphSetID = 1; + aGlyphSet != maGlyphList.end(); + ++aGlyphSet, nGlyphSetID++) + { + // check every subset if it contains the queried unicode char + glyph_map_t::const_iterator aGlyph = (*aGlyphSet).find (nGlyph); + if (aGlyph != (*aGlyphSet).end()) + { + // success: found the glyph id, return the mapped glyphid and the glyphsetid + *nOutGlyphSetID = nGlyphSetID; + *nOutGlyphID = (*aGlyph).second; + return sal_True; + } + } + + *nOutGlyphSetID = -1; + *nOutGlyphID = 0; + return sal_False; +} + +sal_uChar +GlyphSet::GetAnsiMapping (sal_Unicode nUnicodeChar) +{ + static rtl_UnicodeToTextConverter aConverter = + rtl_createUnicodeToTextConverter(RTL_TEXTENCODING_MS_1252); + static rtl_UnicodeToTextContext aContext = + rtl_createUnicodeToTextContext( aConverter ); + + sal_Char nAnsiChar; + sal_uInt32 nCvtInfo; + sal_Size nCvtChars; + const sal_uInt32 nCvtFlags = RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR + | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR; + + sal_Size nSize = rtl_convertUnicodeToText( aConverter, aContext, + &nUnicodeChar, 1, &nAnsiChar, 1, + nCvtFlags, &nCvtInfo, &nCvtChars ); + + return nSize == 1 ? (sal_uChar)nAnsiChar : (sal_uChar)0; +} + +sal_uChar +GlyphSet::GetSymbolMapping (sal_Unicode nUnicodeChar) +{ + if (0x0000 < nUnicodeChar && nUnicodeChar < 0x0100) + return (sal_uChar)nUnicodeChar; + if (0xf000 < nUnicodeChar && nUnicodeChar < 0xf100) + return (sal_uChar)nUnicodeChar; + + return 0; +} + +void +GlyphSet::AddNotdef (char_map_t &rCharMap) +{ + if (rCharMap.size() == 0) + rCharMap[0] = 0; +} + +void +GlyphSet::AddNotdef (glyph_map_t &rGlyphMap) +{ + if (rGlyphMap.size() == 0) + rGlyphMap[0] = 0; +} +sal_Bool +GlyphSet::AddCharID ( + sal_Unicode nChar, + sal_uChar* nOutGlyphID, + sal_Int32* nOutGlyphSetID + ) +{ + sal_uChar nMappedChar; + + // XXX important: avoid to reencode type1 symbol fonts + if (mnBaseEncoding == RTL_TEXTENCODING_SYMBOL) + nMappedChar = GetSymbolMapping (nChar); + else + nMappedChar = GetAnsiMapping (nChar); + + // create an empty glyphmap that is reserved for iso1252 encoded glyphs + // (or -- unencoded -- symbol glyphs) and a second map that takes any other + if (maCharList.empty()) + { + char_map_t aMap, aMapp; + + maCharList.push_back (aMap); + maCharList.push_back (aMapp); + } + // if the last map is full, create a new one + if ((!nMappedChar) && (maCharList.back().size() == 255)) + { + char_map_t aMap; + maCharList.push_back (aMap); + } + + // insert a new glyph in the font subset + if (nMappedChar) + { + // always put iso1252 chars into the first map, map them on itself + char_map_t& aGlyphSet = maCharList.front(); + AddNotdef (aGlyphSet); + + aGlyphSet [nChar] = nMappedChar; + *nOutGlyphSetID = 1; + *nOutGlyphID = nMappedChar; + } + else + { + // other chars are just appended to the list + char_map_t& aGlyphSet = maCharList.back(); + AddNotdef (aGlyphSet); + + int nSize = aGlyphSet.size(); + + aGlyphSet [nChar] = nSize; + *nOutGlyphSetID = maCharList.size(); + *nOutGlyphID = aGlyphSet [nChar]; + } + + return sal_True; +} + +sal_Bool +GlyphSet::AddGlyphID ( + sal_uInt32 nGlyph, + sal_Unicode nUnicode, + sal_uChar* nOutGlyphID, + sal_Int32* nOutGlyphSetID + ) +{ + sal_uChar nMappedChar; + + // XXX important: avoid to reencode type1 symbol fonts + if (mnBaseEncoding == RTL_TEXTENCODING_SYMBOL) + nMappedChar = GetSymbolMapping (nUnicode); + else + nMappedChar = GetAnsiMapping (nUnicode); + + // create an empty glyphmap that is reserved for iso1252 encoded glyphs + // (or -- unencoded -- symbol glyphs) and a second map that takes any other + if (maGlyphList.empty()) + { + glyph_map_t aMap, aMapp; + + maGlyphList.push_back (aMap); + maGlyphList.push_back (aMapp); + } + // if the last map is full, create a new one + if ((!nMappedChar) && (maGlyphList.back().size() == 255)) + { + glyph_map_t aMap; + maGlyphList.push_back (aMap); + } + + // insert a new glyph in the font subset + if (nMappedChar) + { + // always put iso1252 chars into the first map, map them on itself + glyph_map_t& aGlyphSet = maGlyphList.front(); + AddNotdef (aGlyphSet); + + aGlyphSet [nGlyph] = nMappedChar; + *nOutGlyphSetID = 1; + *nOutGlyphID = nMappedChar; + } + else + { + // other chars are just appended to the list + glyph_map_t& aGlyphSet = maGlyphList.back(); + AddNotdef (aGlyphSet); + + int nSize = aGlyphSet.size(); + + aGlyphSet [nGlyph] = nSize; + *nOutGlyphSetID = maGlyphList.size(); + *nOutGlyphID = aGlyphSet [nGlyph]; + } + + return sal_True; +} + +OString +GlyphSet::GetCharSetName (sal_Int32 nGlyphSetID) +{ + if (meBaseType == fonttype::TrueType) + { + OStringBuffer aSetName( maBaseName.getLength() + 32 ); + aSetName.append( maBaseName ); + aSetName.append( "FID" ); + aSetName.append( mnFontID ); + aSetName.append( mbVertical ? "VCSet" : "HCSet" ); + aSetName.append( nGlyphSetID ); + return aSetName.makeStringAndClear(); + } + else + /* (meBaseType == fonttype::Type1 || meBaseType == fonttype::Builtin) */ + { + return maBaseName; + } +} + +OString +GlyphSet::GetGlyphSetName (sal_Int32 nGlyphSetID) +{ + if (meBaseType == fonttype::TrueType) + { + OStringBuffer aSetName( maBaseName.getLength() + 32 ); + aSetName.append( maBaseName ); + aSetName.append( "FID" ); + aSetName.append( mnFontID ); + aSetName.append( mbVertical ? "VGSet" : "HGSet" ); + aSetName.append( nGlyphSetID ); + return aSetName.makeStringAndClear(); + } + else + /* (meBaseType == fonttype::Type1 || meBaseType == fonttype::Builtin) */ + { + return maBaseName; + } +} + +sal_Int32 +GlyphSet::GetGlyphSetEncoding (sal_Int32 nGlyphSetID) +{ + if (meBaseType == fonttype::TrueType) + return RTL_TEXTENCODING_DONTKNOW; + else + { + /* (meBaseType == fonttype::Type1 || meBaseType == fonttype::Builtin) */ + if (mnBaseEncoding == RTL_TEXTENCODING_SYMBOL) + return RTL_TEXTENCODING_SYMBOL; + else + return nGlyphSetID == 1 ? RTL_TEXTENCODING_MS_1252 + : RTL_TEXTENCODING_USER_START + nGlyphSetID; + } +} + +OString +GlyphSet::GetGlyphSetEncodingName (rtl_TextEncoding nEnc, const OString &rFontName) +{ + if ( nEnc == RTL_TEXTENCODING_MS_1252 + || nEnc == RTL_TEXTENCODING_ISO_8859_1) + { + return OString("ISO1252Encoding"); + } + else + if (nEnc >= RTL_TEXTENCODING_USER_START && nEnc <= RTL_TEXTENCODING_USER_END) + { + return rFontName + + OString("Enc") + + OString::valueOf ((sal_Int32)(nEnc - RTL_TEXTENCODING_USER_START)); + } + else + { + return OString(); + } +} + +OString +GlyphSet::GetGlyphSetEncodingName (sal_Int32 nGlyphSetID) +{ + return GetGlyphSetEncodingName (GetGlyphSetEncoding(nGlyphSetID), maBaseName); +} + +void +GlyphSet::PSDefineReencodedFont (osl::File* pOutFile, sal_Int32 nGlyphSetID) +{ + // only for ps fonts + if ((meBaseType != fonttype::Builtin) && (meBaseType != fonttype::Type1)) + return; + + sal_Char pEncodingVector [256]; + sal_Int32 nSize = 0; + + nSize += psp::appendStr ("(", pEncodingVector + nSize); + nSize += psp::appendStr (GetReencodedFontName(nGlyphSetID), + pEncodingVector + nSize); + nSize += psp::appendStr (") cvn (", pEncodingVector + nSize); + nSize += psp::appendStr (maBaseName.getStr(), + pEncodingVector + nSize); + nSize += psp::appendStr (") cvn ", pEncodingVector + nSize); + nSize += psp::appendStr (GetGlyphSetEncodingName(nGlyphSetID), + pEncodingVector + nSize); + nSize += psp::appendStr (" psp_definefont\n", + pEncodingVector + nSize); + + psp::WritePS (pOutFile, pEncodingVector); +} + +OString +GlyphSet::GetReencodedFontName (rtl_TextEncoding nEnc, const OString &rFontName) +{ + if ( nEnc == RTL_TEXTENCODING_MS_1252 + || nEnc == RTL_TEXTENCODING_ISO_8859_1) + { + return rFontName + + OString("-iso1252"); + } + else + if (nEnc >= RTL_TEXTENCODING_USER_START && nEnc <= RTL_TEXTENCODING_USER_END) + { + return rFontName + + OString("-enc") + + OString::valueOf ((sal_Int32)(nEnc - RTL_TEXTENCODING_USER_START)); + } + else + { + return OString(); + } +} + +OString +GlyphSet::GetReencodedFontName (sal_Int32 nGlyphSetID) +{ + return GetReencodedFontName (GetGlyphSetEncoding(nGlyphSetID), maBaseName); +} + +void GlyphSet::DrawGlyphs( + PrinterGfx& rGfx, + const Point& rPoint, + const sal_uInt32* pGlyphIds, + const sal_Unicode* pUnicodes, + sal_Int16 nLen, + const sal_Int32* pDeltaArray ) +{ + sal_uChar *pGlyphID = (sal_uChar*)alloca (nLen * sizeof(sal_uChar)); + sal_Int32 *pGlyphSetID = (sal_Int32*)alloca (nLen * sizeof(sal_Int32)); + std::set< sal_Int32 > aGlyphSet; + + // convert unicode to font glyph id and font subset + for (int nChar = 0; nChar < nLen; nChar++) + { + GetGlyphID (pGlyphIds[nChar], pUnicodes[nChar], pGlyphID + nChar, pGlyphSetID + nChar); + aGlyphSet.insert (pGlyphSetID[nChar]); + } + + // loop over all glyph sets to detect substrings that can be xshown together + // without changing the postscript font + sal_Int32 *pDeltaSubset = (sal_Int32*)alloca (nLen * sizeof(sal_Int32)); + sal_uChar *pGlyphSubset = (sal_uChar*)alloca (nLen * sizeof(sal_uChar)); + + std::set< sal_Int32 >::iterator aSet; + for (aSet = aGlyphSet.begin(); aSet != aGlyphSet.end(); ++aSet) + { + Point aPoint = rPoint; + sal_Int32 nOffset = 0; + sal_Int32 nGlyphs = 0; + sal_Int32 nChar; + + // get offset to first glyph + for (nChar = 0; (nChar < nLen) && (pGlyphSetID[nChar] != *aSet); nChar++) + { + nOffset = pDeltaArray [nChar]; + } + + // loop over all chars to extract those that share the current glyph set + for (nChar = 0; nChar < nLen; nChar++) + { + if (pGlyphSetID[nChar] == *aSet) + { + pGlyphSubset [nGlyphs] = pGlyphID [nChar]; + // the offset to the next glyph is determined by the glyph in + // front of the next glyph with the same glyphset id + // most often, this will be the current glyph + while ((nChar + 1) < nLen) + { + if (pGlyphSetID[nChar + 1] == *aSet) + break; + else + nChar += 1; + } + pDeltaSubset [nGlyphs] = pDeltaArray[nChar] - nOffset; + + nGlyphs += 1; + } + } + + // show the text using the PrinterGfx text api + aPoint.Move (nOffset, 0); + + OString aGlyphSetName(GetGlyphSetName(*aSet)); + rGfx.PSSetFont (aGlyphSetName, GetGlyphSetEncoding(*aSet)); + rGfx.PSMoveTo (aPoint); + rGfx.PSShowText (pGlyphSubset, nGlyphs, nGlyphs, nGlyphs > 1 ? pDeltaSubset : NULL); + } +} + +void +GlyphSet::DrawText (PrinterGfx &rGfx, const Point& rPoint, + const sal_Unicode* pStr, sal_Int16 nLen, const sal_Int32* pDeltaArray) +{ + // dispatch to the impl method + if (pDeltaArray == NULL) + ImplDrawText (rGfx, rPoint, pStr, nLen); + else + ImplDrawText (rGfx, rPoint, pStr, nLen, pDeltaArray); +} + +void +GlyphSet::ImplDrawText (PrinterGfx &rGfx, const Point& rPoint, + const sal_Unicode* pStr, sal_Int16 nLen) +{ + rGfx.PSMoveTo (rPoint); + + if( mbUseFontEncoding ) + { + OString aPSName( OUStringToOString( rGfx.GetFontMgr().getPSName( mnFontID ), RTL_TEXTENCODING_ISO_8859_1 ) ); + OString aBytes( OUStringToOString( OUString( pStr, nLen ), mnBaseEncoding ) ); + rGfx.PSSetFont( aPSName, mnBaseEncoding ); + rGfx.PSShowText( (const unsigned char*)aBytes.getStr(), nLen, aBytes.getLength() ); + return; + } + + int nChar; + sal_uChar *pGlyphID = (sal_uChar*)alloca (nLen * sizeof(sal_uChar)); + sal_Int32 *pGlyphSetID = (sal_Int32*)alloca (nLen * sizeof(sal_Int32)); + + // convert unicode to glyph id and char set (font subset) + for (nChar = 0; nChar < nLen; nChar++) + GetCharID (pStr[nChar], pGlyphID + nChar, pGlyphSetID + nChar); + + // loop over the string to draw subsequent pieces of chars + // with the same postscript font + for (nChar = 0; nChar < nLen; /* atend */) + { + sal_Int32 nGlyphSetID = pGlyphSetID [nChar]; + sal_Int32 nGlyphs = 1; + for (int nNextChar = nChar + 1; nNextChar < nLen; nNextChar++) + { + if (pGlyphSetID[nNextChar] == nGlyphSetID) + nGlyphs++; + else + break; + } + + // show the text using the PrinterGfx text api + OString aGlyphSetName(GetCharSetName(nGlyphSetID)); + rGfx.PSSetFont (aGlyphSetName, GetGlyphSetEncoding(nGlyphSetID)); + rGfx.PSShowText (pGlyphID + nChar, nGlyphs, nGlyphs); + + nChar += nGlyphs; + } +} + +void +GlyphSet::ImplDrawText (PrinterGfx &rGfx, const Point& rPoint, + const sal_Unicode* pStr, sal_Int16 nLen, const sal_Int32* pDeltaArray) +{ + if( mbUseFontEncoding ) + { + OString aPSName( OUStringToOString( rGfx.GetFontMgr().getPSName( mnFontID ), RTL_TEXTENCODING_ISO_8859_1 ) ); + OString aBytes( OUStringToOString( OUString( pStr, nLen ), mnBaseEncoding ) ); + rGfx.PSMoveTo( rPoint ); + rGfx.PSSetFont( aPSName, mnBaseEncoding ); + rGfx.PSShowText( (const unsigned char*)aBytes.getStr(), nLen, aBytes.getLength(), pDeltaArray ); + return; + } + + sal_uChar *pGlyphID = (sal_uChar*)alloca (nLen * sizeof(sal_uChar)); + sal_Int32 *pGlyphSetID = (sal_Int32*)alloca (nLen * sizeof(sal_Int32)); + std::set< sal_Int32 > aGlyphSet; + + // convert unicode to font glyph id and font subset + for (int nChar = 0; nChar < nLen; nChar++) + { + GetCharID (pStr[nChar], pGlyphID + nChar, pGlyphSetID + nChar); + aGlyphSet.insert (pGlyphSetID[nChar]); + } + + // loop over all glyph sets to detect substrings that can be xshown together + // without changing the postscript font + sal_Int32 *pDeltaSubset = (sal_Int32*)alloca (nLen * sizeof(sal_Int32)); + sal_uChar *pGlyphSubset = (sal_uChar*)alloca (nLen * sizeof(sal_uChar)); + + std::set< sal_Int32 >::iterator aSet; + for (aSet = aGlyphSet.begin(); aSet != aGlyphSet.end(); ++aSet) + { + Point aPoint = rPoint; + sal_Int32 nOffset = 0; + sal_Int32 nGlyphs = 0; + sal_Int32 nChar; + + // get offset to first glyph + for (nChar = 0; (nChar < nLen) && (pGlyphSetID[nChar] != *aSet); nChar++) + { + nOffset = pDeltaArray [nChar]; + } + + // loop over all chars to extract those that share the current glyph set + for (nChar = 0; nChar < nLen; nChar++) + { + if (pGlyphSetID[nChar] == *aSet) + { + pGlyphSubset [nGlyphs] = pGlyphID [nChar]; + // the offset to the next glyph is determined by the glyph in + // front of the next glyph with the same glyphset id + // most often, this will be the current glyph + while ((nChar + 1) < nLen) + { + if (pGlyphSetID[nChar + 1] == *aSet) + break; + else + nChar += 1; + } + pDeltaSubset [nGlyphs] = pDeltaArray[nChar] - nOffset; + + nGlyphs += 1; + } + } + + // show the text using the PrinterGfx text api + aPoint.Move (nOffset, 0); + + OString aGlyphSetName(GetCharSetName(*aSet)); + rGfx.PSSetFont (aGlyphSetName, GetGlyphSetEncoding(*aSet)); + rGfx.PSMoveTo (aPoint); + rGfx.PSShowText (pGlyphSubset, nGlyphs, nGlyphs, nGlyphs > 1 ? pDeltaSubset : NULL); + } +} + +sal_Bool +GlyphSet::PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx) +{ + // only for ps fonts + if ((meBaseType != fonttype::Builtin) && (meBaseType != fonttype::Type1)) + return sal_False; + if (mnBaseEncoding == RTL_TEXTENCODING_SYMBOL) + return sal_False; + + PrintFontManager &rMgr = rGfx.GetFontMgr(); + + // loop thru all the font subsets + sal_Int32 nGlyphSetID = 0; + char_list_t::iterator aGlyphSet; + for (aGlyphSet = maCharList.begin(); aGlyphSet != maCharList.end(); aGlyphSet++) + { + ++nGlyphSetID; + + if (nGlyphSetID == 1) // latin1 page uses global reencoding table + { + PSDefineReencodedFont (pOutFile, nGlyphSetID); + continue; + } + if ((*aGlyphSet).size() == 0) // empty set, doesn't need reencoding + { + continue; + } + + // create reencoding table + + sal_Char pEncodingVector [256]; + sal_Int32 nSize = 0; + + nSize += psp::appendStr ("/", + pEncodingVector + nSize); + nSize += psp::appendStr (GetGlyphSetEncodingName(nGlyphSetID), + pEncodingVector + nSize); + nSize += psp::appendStr (" [ ", + pEncodingVector + nSize); + + // need a list of glyphs, sorted by glyphid + typedef std::map< sal_uInt8, sal_Unicode > ps_mapping_t; + typedef ps_mapping_t::value_type ps_value_t; + ps_mapping_t aSortedGlyphSet; + + char_map_t::const_iterator aUnsortedGlyph; + for (aUnsortedGlyph = (*aGlyphSet).begin(); + aUnsortedGlyph != (*aGlyphSet).end(); + ++aUnsortedGlyph) + { + aSortedGlyphSet.insert(ps_value_t((*aUnsortedGlyph).second, + (*aUnsortedGlyph).first)); + } + + ps_mapping_t::const_iterator aSortedGlyph; + // loop thru all the glyphs in the subset + for (aSortedGlyph = (aSortedGlyphSet).begin(); + aSortedGlyph != (aSortedGlyphSet).end(); + ++aSortedGlyph) + { + nSize += psp::appendStr ("/", + pEncodingVector + nSize); + + std::list< OString > aName( rMgr.getAdobeNameFromUnicode((*aSortedGlyph).second) ); + + if( aName.begin() != aName.end() ) + nSize += psp::appendStr ( aName.front(), pEncodingVector + nSize); + else + nSize += psp::appendStr (".notdef", pEncodingVector + nSize ); + nSize += psp::appendStr (" ", pEncodingVector + nSize); + // flush line + if (nSize >= 70) + { + nSize += psp::appendStr ("\n", pEncodingVector + nSize); + psp::WritePS (pOutFile, pEncodingVector); + nSize = 0; + } + } + + nSize += psp::appendStr ("] def\n", pEncodingVector + nSize); + psp::WritePS (pOutFile, pEncodingVector); + + PSDefineReencodedFont (pOutFile, nGlyphSetID); + } + + return sal_True; +} + +struct EncEntry +{ + sal_uChar aEnc; + long aGID; + + EncEntry() : aEnc( 0 ), aGID( 0 ) {} + + bool operator<( const EncEntry& rRight ) const + { return aEnc < rRight.aEnc; } +}; + +static void CreatePSUploadableFont( TrueTypeFont* pSrcFont, FILE* pTmpFile, + const char* pGlyphSetName, int nGlyphCount, + /*const*/ sal_uInt16* pRequestedGlyphs, /*const*/ sal_uChar* pEncoding, + bool bAllowType42, bool /*bAllowCID*/ ) +{ + // match the font-subset to the printer capabilities + // TODO: allow CFF for capable printers + int nTargetMask = FontSubsetInfo::TYPE1_PFA | FontSubsetInfo::TYPE3_FONT; + if( bAllowType42 ) + nTargetMask |= FontSubsetInfo::TYPE42_FONT; + + std::vector< EncEntry > aSorted( nGlyphCount, EncEntry() ); + for( int i = 0; i < nGlyphCount; i++ ) + { + aSorted[i].aEnc = pEncoding[i]; + aSorted[i].aGID = pRequestedGlyphs[i]; + } + + std::stable_sort( aSorted.begin(), aSorted.end() ); + + std::vector< sal_uChar > aEncoding( nGlyphCount ); + std::vector< long > aRequestedGlyphs( nGlyphCount ); + + for( int i = 0; i < nGlyphCount; i++ ) + { + aEncoding[i] = aSorted[i].aEnc; + aRequestedGlyphs[i] = aSorted[i].aGID; + } + + FontSubsetInfo aInfo; + aInfo.LoadFont( pSrcFont ); + + aInfo.CreateFontSubset( nTargetMask, pTmpFile, pGlyphSetName, + &aRequestedGlyphs[0], &aEncoding[0], nGlyphCount, NULL ); +} + +sal_Bool +GlyphSet::PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAllowType42, std::list< OString >& rSuppliedFonts ) +{ + // only for truetype fonts + if (meBaseType != fonttype::TrueType) + return sal_False; + + TrueTypeFont *pTTFont; + OString aTTFileName (rGfx.GetFontMgr().getFontFileSysPath(mnFontID)); + int nFace = rGfx.GetFontMgr().getFontFaceNumber(mnFontID); + sal_Int32 nSuccess = OpenTTFontFile(aTTFileName.getStr(), nFace < 0 ? 0 : nFace, &pTTFont); + if (nSuccess != SF_OK) + return sal_False; + FILE* pTmpFile = tmpfile(); + if (pTmpFile == NULL) + return sal_False; + + // array of unicode source characters + sal_Unicode pUChars[256]; + + // encoding vector maps character encoding to the ordinal number + // of the glyph in the output file + sal_uChar pEncoding[256]; + sal_uInt16 pTTGlyphMapping[256]; + const bool bAllowCID = false; // TODO: nPSLanguageLevel>=3 + + // loop thru all the font subsets + sal_Int32 nCharSetID; + char_list_t::iterator aCharSet; + for (aCharSet = maCharList.begin(), nCharSetID = 1; + aCharSet != maCharList.end(); + ++aCharSet, nCharSetID++) + { + if ((*aCharSet).size() == 0) + continue; + + // loop thru all the chars in the subset + char_map_t::const_iterator aChar; + sal_Int32 n = 0; + for (aChar = (*aCharSet).begin(); aChar != (*aCharSet).end(); aChar++) + { + pUChars [n] = (*aChar).first; + pEncoding [n] = (*aChar).second; + n++; + } + // create a mapping from the unicode chars to the char encoding in + // source TrueType font + MapString (pTTFont, pUChars, (*aCharSet).size(), pTTGlyphMapping, mbVertical); + + // create the current subset + OString aCharSetName = GetCharSetName(nCharSetID); + fprintf( pTmpFile, "%%%%BeginResource: font %s\n", aCharSetName.getStr() ); + CreatePSUploadableFont( pTTFont, pTmpFile, aCharSetName.getStr(), (*aCharSet).size(), + pTTGlyphMapping, pEncoding, bAllowType42, bAllowCID ); + fprintf( pTmpFile, "%%%%EndResource\n" ); + rSuppliedFonts.push_back( aCharSetName ); + } + + // loop thru all the font glyph subsets + sal_Int32 nGlyphSetID; + glyph_list_t::iterator aGlyphSet; + for (aGlyphSet = maGlyphList.begin(), nGlyphSetID = 1; + aGlyphSet != maGlyphList.end(); + ++aGlyphSet, nGlyphSetID++) + { + if ((*aGlyphSet).size() == 0) + continue; + + // loop thru all the glyphs in the subset + glyph_map_t::const_iterator aGlyph; + sal_Int32 n = 0; + for (aGlyph = (*aGlyphSet).begin(); aGlyph != (*aGlyphSet).end(); aGlyph++) + { + pTTGlyphMapping [n] = (*aGlyph).first; + pEncoding [n] = (*aGlyph).second; + n++; + } + + // create the current subset + OString aGlyphSetName = GetGlyphSetName(nGlyphSetID); + fprintf( pTmpFile, "%%%%BeginResource: font %s\n", aGlyphSetName.getStr() ); + CreatePSUploadableFont( pTTFont, pTmpFile, aGlyphSetName.getStr(), (*aGlyphSet).size(), + pTTGlyphMapping, pEncoding, bAllowType42, bAllowCID ); + fprintf( pTmpFile, "%%%%EndResource\n" ); + rSuppliedFonts.push_back( aGlyphSetName ); + } + + // copy the file into the page header + rewind(pTmpFile); + fflush(pTmpFile); + + sal_uChar pBuffer[0x2000]; + sal_uInt64 nIn; + sal_uInt64 nOut; + do + { + nIn = fread(pBuffer, 1, sizeof(pBuffer), pTmpFile); + rOutFile.write (pBuffer, nIn, nOut); + } + while ((nIn == nOut) && !feof(pTmpFile)); + + // cleanup + CloseTTFont (pTTFont); + fclose (pTmpFile); + + return sal_True; +} diff --git a/vcl/unx/generic/printergfx/glyphset.hxx b/vcl/unx/generic/printergfx/glyphset.hxx new file mode 100644 index 000000000000..320e8e071955 --- /dev/null +++ b/vcl/unx/generic/printergfx/glyphset.hxx @@ -0,0 +1,135 @@ +/************************************************************************* + * + * 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 _PSPRINT_GLYPHSET_HXX_ +#define _PSPRINT_GLYPHSET_HXX_ + +#include "vcl/fontmanager.hxx" + +#include "osl/file.hxx" + +#include "rtl/string.hxx" + +#include "tools/gen.hxx" + +#include +#include + +namespace psp { + +class PrinterGfx; +class PrintFontManager; + +class GlyphSet +{ +private: + + sal_Int32 mnFontID; + sal_Bool mbVertical; + rtl::OString maBaseName; + fonttype::type meBaseType; + rtl_TextEncoding mnBaseEncoding; + bool mbUseFontEncoding; + + typedef std::hash_map< sal_Unicode, sal_uInt8 > char_map_t; + typedef std::list< char_map_t > char_list_t; + typedef std::hash_map< sal_uInt32, sal_uInt8 > glyph_map_t; + typedef std::list< glyph_map_t > glyph_list_t; + + char_list_t maCharList; + glyph_list_t maGlyphList; + + rtl::OString GetGlyphSetName (sal_Int32 nGlyphSetID); + rtl::OString GetCharSetName (sal_Int32 nGlyphSetID); + sal_Int32 GetGlyphSetEncoding (sal_Int32 nGlyphSetID); + rtl::OString GetGlyphSetEncodingName (sal_Int32 nGlyphSetID); + + rtl::OString GetReencodedFontName (sal_Int32 nGlyphSetID); + void PSDefineReencodedFont (osl::File* pOutFile, + sal_Int32 nGlyphSetID); + + sal_Bool GetCharID (sal_Unicode nChar, + sal_uChar* nOutGlyphID, sal_Int32* nOutGlyphSetID); + sal_Bool LookupCharID (sal_Unicode nChar, + sal_uChar* nOutGlyphID, sal_Int32* nOutGlyphSetID); + sal_Bool AddCharID (sal_Unicode nChar, + sal_uChar* nOutGlyphID, + sal_Int32* nOutGlyphSetID); + sal_Bool GetGlyphID (sal_uInt32 nGlyph, sal_Unicode nUnicode, + sal_uChar* nOutGlyphID, sal_Int32* nOutGlyphSetID); + sal_Bool LookupGlyphID (sal_uInt32 nGlyph, + sal_uChar* nOutGlyphID, sal_Int32* nOutGlyphSetID); + sal_Bool AddGlyphID (sal_uInt32 nGlyph, sal_Unicode nUnicode, + sal_uChar* nOutGlyphID, + sal_Int32* nOutGlyphSetID); + void AddNotdef (char_map_t &rCharMap); + void AddNotdef (glyph_map_t &rGlyphMap); + sal_uChar GetAnsiMapping (sal_Unicode nUnicodeChar); + sal_uChar GetSymbolMapping (sal_Unicode nUnicodeChar); + + void ImplDrawText (PrinterGfx &rGfx, const Point& rPoint, + const sal_Unicode* pStr, sal_Int16 nLen); + void ImplDrawText (PrinterGfx &rGfx, const Point& rPoint, + const sal_Unicode* pStr, sal_Int16 nLen, + const sal_Int32* pDeltaArray); + +public: + + GlyphSet (); + GlyphSet (sal_Int32 nFontID, sal_Bool bVertical); + ~GlyphSet (); + + sal_Int32 GetFontID (); + fonttype::type GetFontType (); + static rtl::OString + GetReencodedFontName (rtl_TextEncoding nEnc, + const rtl::OString &rFontName); + static rtl::OString + GetGlyphSetEncodingName (rtl_TextEncoding nEnc, + const rtl::OString &rFontName); + sal_Bool IsVertical (); + + sal_Bool SetFont (sal_Int32 nFontID, sal_Bool bVertical); + + void DrawText (PrinterGfx &rGfx, const Point& rPoint, + const sal_Unicode* pStr, sal_Int16 nLen, + const sal_Int32* pDeltaArray = NULL); + void DrawGlyphs (PrinterGfx& rGfx, + const Point& rPoint, + const sal_uInt32* pGlyphIds, + const sal_Unicode* pUnicodes, + sal_Int16 nLen, + const sal_Int32* pDeltaArray ); + sal_Bool PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx); + sal_Bool PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAsType42, std::list< rtl::OString >& rSuppliedFonts ); +}; + + +} /* namespace psp */ + +#endif + diff --git a/vcl/unx/generic/printergfx/makefile.mk b/vcl/unx/generic/printergfx/makefile.mk new file mode 100644 index 000000000000..cc5692e951f5 --- /dev/null +++ b/vcl/unx/generic/printergfx/makefile.mk @@ -0,0 +1,65 @@ +#************************************************************************* +# +# 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=vcl +TARGET=printergfx + +# --- Settings ----------------------------------------------------- + +ENABLE_EXCEPTIONS=true + +.INCLUDE : settings.mk + +.IF "$(ENABLE_CUPS)" != "" +CDEFS += -DENABLE_CUPS +.ENDIF + +# --- Files -------------------------------------------------------- + +.IF "$(GUIBASE)"=="aqua" + +dummy: + @echo "Nothing to build for GUIBASE $(GUIBASE)" + +.ELSE # "$(GUIBASE)"=="aqua" + +SLOFILES=\ + $(SLO)$/printerjob.obj \ + $(SLO)$/text_gfx.obj \ + $(SLO)$/psputil.obj \ + $(SLO)$/common_gfx.obj \ + $(SLO)$/glyphset.obj \ + $(SLO)$/bitmap_gfx.obj + +.ENDIF + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk + diff --git a/vcl/unx/generic/printergfx/printerjob.cxx b/vcl/unx/generic/printergfx/printerjob.cxx new file mode 100644 index 000000000000..bda06b96e1bd --- /dev/null +++ b/vcl/unx/generic/printergfx/printerjob.cxx @@ -0,0 +1,1204 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include +#include +#include +#include +#include + +#include "psputil.hxx" +#include "glyphset.hxx" + +#include "printerjob.hxx" +#include "printergfx.hxx" +#include "vcl/ppdparser.hxx" +#include "vcl/strhelper.hxx" +#include "vcl/printerinfomanager.hxx" + +#include "rtl/ustring.hxx" +#include "rtl/strbuf.hxx" +#include "rtl/ustrbuf.hxx" + +#include "osl/thread.h" +#include "sal/alloca.h" + +#include +#include + +using namespace psp; +using namespace rtl; + +// forward declaration + +#define nBLOCKSIZE 0x2000 + +namespace psp +{ + +sal_Bool +AppendPS (FILE* pDst, osl::File* pSrc, sal_uChar* pBuffer, + sal_uInt32 nBlockSize = nBLOCKSIZE) +{ + if ((pDst == NULL) || (pSrc == NULL)) + return sal_False; + + if (nBlockSize == 0) + nBlockSize = nBLOCKSIZE; + if (pBuffer == NULL) + pBuffer = (sal_uChar*)alloca (nBlockSize); + + pSrc->setPos (osl_Pos_Absolut, 0); + + sal_uInt64 nIn = 0; + sal_uInt64 nOut = 0; + do + { + pSrc->read (pBuffer, nBlockSize, nIn); + if (nIn > 0) + nOut = fwrite (pBuffer, 1, sal::static_int_cast(nIn), pDst); + } + while ((nIn > 0) && (nIn == nOut)); + + return sal_True; +} + +} // namespace psp + +/* + * private convenience routines for file handling + */ + +osl::File* +PrinterJob::CreateSpoolFile (const rtl::OUString& rName, const rtl::OUString& rExtension) +{ + osl::File::RC nError = osl::File::E_None; + osl::File* pFile = NULL; + + rtl::OUString aFile = rName + rExtension; + rtl::OUString aFileURL; + nError = osl::File::getFileURLFromSystemPath( aFile, aFileURL ); + if (nError != osl::File::E_None) + return NULL; + aFileURL = maSpoolDirName + rtl::OUString::createFromAscii ("/") + aFileURL; + + pFile = new osl::File (aFileURL); + nError = pFile->open (OpenFlag_Read | OpenFlag_Write | OpenFlag_Create); + if (nError != osl::File::E_None) + { + delete pFile; + return NULL; + } + + pFile->setAttributes (aFileURL, + osl_File_Attribute_OwnWrite | osl_File_Attribute_OwnRead); + return pFile; +} + +/* + * public methods of PrinterJob: for use in PrinterGfx + */ + +void +PrinterJob::GetScale (double &rXScale, double &rYScale) const +{ + rXScale = mfXScale; + rYScale = mfYScale; +} + +sal_uInt16 +PrinterJob::GetDepth () const +{ + sal_Int32 nLevel = GetPostscriptLevel(); + sal_Bool bColor = IsColorPrinter (); + + return nLevel > 1 && bColor ? 24 : 8; +} + +sal_uInt16 +PrinterJob::GetPostscriptLevel (const JobData *pJobData) const +{ + sal_uInt16 nPSLevel = 2; + + if( pJobData == NULL ) + pJobData = &m_aLastJobData; + + if( pJobData->m_nPSLevel ) + nPSLevel = pJobData->m_nPSLevel; + else + if( pJobData->m_pParser ) + nPSLevel = pJobData->m_pParser->getLanguageLevel(); + + return nPSLevel; +} + +sal_Bool +PrinterJob::IsColorPrinter () const +{ + sal_Bool bColor = sal_False; + + if( m_aLastJobData.m_nColorDevice ) + bColor = m_aLastJobData.m_nColorDevice == -1 ? sal_False : sal_True; + else if( m_aLastJobData.m_pParser ) + bColor = m_aLastJobData.m_pParser->isColorDevice() ? sal_True : sal_False; + + return bColor; +} + +osl::File* +PrinterJob::GetDocumentHeader () +{ + return mpJobHeader; +} + +osl::File* +PrinterJob::GetDocumentTrailer () +{ + return mpJobTrailer; +} + +osl::File* +PrinterJob::GetCurrentPageHeader () +{ + return maHeaderList.back(); +} + +osl::File* +PrinterJob::GetCurrentPageBody () +{ + return maPageList.back(); +} + +/* + * public methods of PrinterJob: the actual job / spool handling + */ + +PrinterJob::PrinterJob () : + mpJobHeader( NULL ), + mpJobTrailer( NULL ), + m_bQuickJob( false ) +{ +} + +namespace psp +{ + +/* check whether the given name points to a directory which is + usable for the user */ +sal_Bool +existsTmpDir (const char* pName) +{ + struct stat aFileStatus; + + if (pName == NULL) + return sal_False; + if (stat(pName, &aFileStatus) != 0) + return sal_False; + if (! S_ISDIR(aFileStatus.st_mode)) + return sal_False; + + return access(pName, W_OK | R_OK) == 0 ? sal_True : sal_False; +} + +/* return the username in the given buffer */ +sal_Bool +getUserName (char* pName, int nSize) +{ + struct passwd *pPWEntry; + struct passwd aPWEntry; + sal_Char pPWBuffer[256]; + + sal_Bool bSuccess = sal_False; + +#ifdef FREEBSD + pPWEntry = getpwuid( getuid()); +#else + if (getpwuid_r(getuid(), &aPWEntry, pPWBuffer, sizeof(pPWBuffer), &pPWEntry) != 0) + pPWEntry = NULL; +#endif + + if (pPWEntry != NULL && pPWEntry->pw_name != NULL) + { + sal_Int32 nLen = strlen(pPWEntry->pw_name); + if (nLen > 0 && nLen < nSize) + { + memcpy (pName, pPWEntry->pw_name, nLen); + pName[nLen] = '\0'; + + bSuccess = sal_True; + } + } + + // wipe the passwd off the stack + memset (pPWBuffer, 0, sizeof(pPWBuffer)); + + return bSuccess; +} + +/* remove all our temporary files, uses external program "rm", since + osl functionality is inadequate */ +void +removeSpoolDir (const rtl::OUString& rSpoolDir) +{ + rtl::OUString aSysPath; + if( osl::File::E_None != osl::File::getSystemPathFromFileURL( rSpoolDir, aSysPath ) ) + { + // Conversion did not work, as this is quite a dangerous action, + // we should abort here .... + OSL_ENSURE( 0, "psprint: couldn't remove spool directory" ); + return; + } + rtl::OString aSysPathByte = + rtl::OUStringToOString (aSysPath, osl_getThreadTextEncoding()); + sal_Char pSystem [128]; + sal_Int32 nChar = 0; + + nChar = psp::appendStr ("rm -rf ", pSystem); + nChar += psp::appendStr (aSysPathByte.getStr(), pSystem + nChar); + + if (system (pSystem) == -1) + OSL_ENSURE( 0, "psprint: couldn't remove spool directory" ); +} + +/* creates a spool directory with a "pidgin random" value based on + current system time */ +rtl::OUString +createSpoolDir () +{ + TimeValue aCur; + osl_getSystemTime( &aCur ); + sal_Int32 nRand = aCur.Seconds ^ (aCur.Nanosec/1000); + + rtl::OUString aTmpDir; + osl_getTempDirURL( &aTmpDir.pData ); + + do + { + rtl::OUStringBuffer aDir( aTmpDir.getLength() + 16 ); + aDir.append( aTmpDir ); + aDir.appendAscii( "/psp" ); + aDir.append(nRand); + rtl::OUString aResult = aDir.makeStringAndClear(); + if( osl::Directory::create( aResult ) == osl::FileBase::E_None ) + { + osl::File::setAttributes( aResult, + osl_File_Attribute_OwnWrite + | osl_File_Attribute_OwnRead + | osl_File_Attribute_OwnExe ); + return aResult; + } + nRand++; + } while( nRand ); + return rtl::OUString(); +} + +} // namespace psp + +PrinterJob::~PrinterJob () +{ + std::list< osl::File* >::iterator pPage; + for (pPage = maPageList.begin(); pPage != maPageList.end(); pPage++) + { + //(*pPage)->remove(); + delete *pPage; + } + for (pPage = maHeaderList.begin(); pPage != maHeaderList.end(); pPage++) + { + //(*pPage)->remove(); + delete *pPage; + } + // mpJobHeader->remove(); + delete mpJobHeader; + // mpJobTrailer->remove(); + delete mpJobTrailer; + + // XXX should really call osl::remove routines + if( maSpoolDirName.getLength() ) + removeSpoolDir (maSpoolDirName); + + // osl::Directory::remove (maSpoolDirName); +} + +namespace psp +{ + +// get locale invariant, 7bit clean current local time string +sal_Char* +getLocalTime(sal_Char* pBuffer) +{ + time_t nTime = time (NULL); + struct tm aTime; + struct tm *pLocalTime = localtime_r (&nTime, &aTime); + + return asctime_r(pLocalTime, pBuffer); +} + +} + +static bool isAscii( const rtl::OUString& rStr ) +{ + const sal_Unicode* pStr = rStr; + sal_Int32 nLen = rStr.getLength(); + for( sal_Int32 i = 0; i < nLen; i++ ) + if( pStr[i] > 127 ) + return false; + return true; +} + +sal_Bool +PrinterJob::StartJob ( + const rtl::OUString& rFileName, + int nMode, + const rtl::OUString& rJobName, + const rtl::OUString& rAppName, + const JobData& rSetupData, + PrinterGfx* pGraphics, + bool bIsQuickJob + ) +{ + m_bQuickJob = bIsQuickJob; + mnMaxWidthPt = mnMaxHeightPt = 0; + mnLandscapes = mnPortraits = 0; + m_pGraphics = pGraphics; + InitPaperSize (rSetupData); + + // create file container for document header and trailer + maFileName = rFileName; + mnFileMode = nMode; + maSpoolDirName = createSpoolDir (); + maJobTitle = rJobName; + + rtl::OUString aExt = rtl::OUString::createFromAscii (".ps"); + mpJobHeader = CreateSpoolFile (rtl::OUString::createFromAscii("psp_head"), aExt); + mpJobTrailer = CreateSpoolFile (rtl::OUString::createFromAscii("psp_tail"), aExt); + if( ! (mpJobHeader && mpJobTrailer) ) // existing files are removed in destructor + return sal_False; + + // write document header according to Document Structuring Conventions (DSC) + WritePS (mpJobHeader, + "%!PS-Adobe-3.0\n" + "%%BoundingBox: (atend)\n" ); + + rtl::OUString aFilterWS; + + // Creator (this application) + aFilterWS = WhitespaceToSpace( rAppName, FALSE ); + WritePS (mpJobHeader, "%%Creator: ("); + WritePS (mpJobHeader, aFilterWS); + WritePS (mpJobHeader, ")\n"); + + // For (user name) + sal_Char pUserName[64]; + if (getUserName(pUserName, sizeof(pUserName))) + { + WritePS (mpJobHeader, "%%For: ("); + WritePS (mpJobHeader, pUserName); + WritePS (mpJobHeader, ")\n"); + } + + // Creation Date (locale independent local time) + sal_Char pCreationDate [256]; + WritePS (mpJobHeader, "%%CreationDate: ("); + getLocalTime(pCreationDate); + for( unsigned int i = 0; i < sizeof(pCreationDate)/sizeof(pCreationDate[0]); i++ ) + { + if( pCreationDate[i] == '\n' ) + { + pCreationDate[i] = 0; + break; + } + } + WritePS (mpJobHeader, pCreationDate ); + WritePS (mpJobHeader, ")\n"); + + // Document Title + /* #i74335# + * The title should be clean ascii; rJobName however may + * contain any Unicode character. So implement the following + * algorithm: + * use rJobName, if it contains only ascii + * use the filename, if it contains only ascii + * else omit %%Title + */ + aFilterWS = WhitespaceToSpace( rJobName, FALSE ); + rtl::OUString aTitle( aFilterWS ); + if( ! isAscii( aTitle ) ) + { + sal_Int32 nIndex = 0; + while( nIndex != -1 ) + aTitle = rFileName.getToken( 0, '/', nIndex ); + aTitle = WhitespaceToSpace( aTitle, FALSE ); + if( ! isAscii( aTitle ) ) + aTitle = rtl::OUString(); + } + + maJobTitle = aFilterWS; + if( aTitle.getLength() ) + { + WritePS (mpJobHeader, "%%Title: ("); + WritePS (mpJobHeader, aTitle); + WritePS (mpJobHeader, ")\n"); + } + + // Language Level + sal_Char pLevel[16]; + sal_Int32 nSz = getValueOf(GetPostscriptLevel(&rSetupData), pLevel); + pLevel[nSz++] = '\n'; + pLevel[nSz ] = '\0'; + WritePS (mpJobHeader, "%%LanguageLevel: "); + WritePS (mpJobHeader, pLevel); + + // Other + WritePS (mpJobHeader, "%%DocumentData: Clean7Bit\n"); + WritePS (mpJobHeader, "%%Pages: (atend)\n"); + WritePS (mpJobHeader, "%%Orientation: (atend)\n"); + WritePS (mpJobHeader, "%%PageOrder: Ascend\n"); + WritePS (mpJobHeader, "%%EndComments\n"); + + // write Prolog + writeProlog (mpJobHeader, rSetupData); + + // mark last job setup as not set + m_aLastJobData.m_pParser = NULL; + m_aLastJobData.m_aContext.setParser( NULL ); + + return sal_True; +} + +sal_Bool +PrinterJob::EndJob () +{ + // no pages ? that really means no print job + if( maPageList.empty() ) + return sal_False; + + // write document setup (done here because it + // includes the accumulated fonts + if( mpJobHeader ) + writeSetup( mpJobHeader, m_aDocumentJobData ); + m_pGraphics->OnEndJob(); + if( ! (mpJobHeader && mpJobTrailer) ) + return sal_False; + + // write document trailer according to Document Structuring Conventions (DSC) + rtl::OStringBuffer aTrailer(512); + aTrailer.append( "%%Trailer\n" ); + aTrailer.append( "%%BoundingBox: 0 0 " ); + aTrailer.append( (sal_Int32)mnMaxWidthPt ); + aTrailer.append( " " ); + aTrailer.append( (sal_Int32)mnMaxHeightPt ); + if( mnLandscapes > mnPortraits ) + aTrailer.append("\n%%Orientation: Landscape"); + else + aTrailer.append("\n%%Orientation: Portrait"); + aTrailer.append( "\n%%Pages: " ); + aTrailer.append( (sal_Int32)maPageList.size() ); + aTrailer.append( "\n%%EOF\n" ); + WritePS (mpJobTrailer, aTrailer.getStr()); + + /* + * spool the set of files to their final destination, this is U**X dependent + */ + + FILE* pDestFILE = NULL; + + /* create a destination either as file or as a pipe */ + sal_Bool bSpoolToFile = maFileName.getLength() > 0 ? sal_True : sal_False; + if (bSpoolToFile) + { + const rtl::OString aFileName = rtl::OUStringToOString (maFileName, + osl_getThreadTextEncoding()); + if( mnFileMode ) + { + int nFile = open( aFileName.getStr(), O_CREAT | O_EXCL | O_RDWR, mnFileMode ); + if( nFile != -1 ) + { + pDestFILE = fdopen( nFile, "w" ); + if( pDestFILE == NULL ) + { + close( nFile ); + unlink( aFileName.getStr() ); + return sal_False; + } + } + else + chmod( aFileName.getStr(), mnFileMode ); + } + if (pDestFILE == NULL) + pDestFILE = fopen (aFileName.getStr(), "w"); + + if (pDestFILE == NULL) + return sal_False; + } + else + { + PrinterInfoManager& rPrinterInfoManager = PrinterInfoManager::get (); + pDestFILE = rPrinterInfoManager.startSpool( m_aLastJobData.m_aPrinterName, m_bQuickJob ); + if (pDestFILE == NULL) + return sal_False; + } + + /* spool the document parts to the destination */ + + sal_uChar pBuffer[ nBLOCKSIZE ]; + + AppendPS (pDestFILE, mpJobHeader, pBuffer); + mpJobHeader->close(); + + sal_Bool bSuccess = sal_True; + std::list< osl::File* >::iterator pPageBody; + std::list< osl::File* >::iterator pPageHead; + for (pPageBody = maPageList.begin(), pPageHead = maHeaderList.begin(); + pPageBody != maPageList.end() && pPageHead != maHeaderList.end(); + pPageBody++, pPageHead++) + { + if( *pPageHead ) + { + osl::File::RC nError = (*pPageHead)->open(OpenFlag_Read); + if (nError == osl::File::E_None) + { + AppendPS (pDestFILE, *pPageHead, pBuffer); + (*pPageHead)->close(); + } + } + else + bSuccess = sal_False; + if( *pPageBody ) + { + osl::File::RC nError = (*pPageBody)->open(OpenFlag_Read); + if (nError == osl::File::E_None) + { + AppendPS (pDestFILE, *pPageBody, pBuffer); + (*pPageBody)->close(); + } + } + else + bSuccess = sal_False; + } + + AppendPS (pDestFILE, mpJobTrailer, pBuffer); + mpJobTrailer->close(); + + /* well done */ + + if (bSpoolToFile) + fclose (pDestFILE); + else + { + PrinterInfoManager& rPrinterInfoManager = PrinterInfoManager::get(); + if (0 == rPrinterInfoManager.endSpool( m_aLastJobData.m_aPrinterName, + maJobTitle, pDestFILE, m_aDocumentJobData, true )) + { + bSuccess = sal_False; + } + } + + return bSuccess; +} + +sal_Bool +PrinterJob::AbortJob () +{ + m_pGraphics->OnEndJob(); + return sal_False; +} + +void +PrinterJob::InitPaperSize (const JobData& rJobSetup) +{ + int nRes = rJobSetup.m_aContext.getRenderResolution (); + + String aPaper; + int nWidth, nHeight; + rJobSetup.m_aContext.getPageSize (aPaper, nWidth, nHeight); + + int nLeft = 0, nRight = 0, nUpper = 0, nLower = 0; + const PPDParser* pParser = rJobSetup.m_aContext.getParser(); + if (pParser != NULL) + pParser->getMargins (aPaper, nLeft, nRight, nUpper, nLower); + + mnResolution = nRes; + + mnWidthPt = nWidth; + mnHeightPt = nHeight; + + if( mnWidthPt > mnMaxWidthPt ) + mnMaxWidthPt = mnWidthPt; + if( mnHeightPt > mnMaxHeightPt ) + mnMaxHeightPt = mnHeightPt; + + mnLMarginPt = nLeft; + mnRMarginPt = nRight; + mnTMarginPt = nUpper; + mnBMarginPt = nLower; + + mfXScale = (double)72.0 / (double)mnResolution; + mfYScale = -1.0 * (double)72.0 / (double)mnResolution; +} + + +sal_Bool +PrinterJob::StartPage (const JobData& rJobSetup) +{ + InitPaperSize (rJobSetup); + + rtl::OUString aPageNo = rtl::OUString::valueOf ((sal_Int32)maPageList.size()+1); // sequential page number must start with 1 + rtl::OUString aExt = aPageNo + rtl::OUString::createFromAscii (".ps"); + + osl::File* pPageHeader = CreateSpoolFile ( + rtl::OUString::createFromAscii("psp_pghead"), aExt); + osl::File* pPageBody = CreateSpoolFile ( + rtl::OUString::createFromAscii("psp_pgbody"), aExt); + + maHeaderList.push_back (pPageHeader); + maPageList.push_back (pPageBody); + + if( ! (pPageHeader && pPageBody) ) + return sal_False; + + // write page header according to Document Structuring Conventions (DSC) + WritePS (pPageHeader, "%%Page: "); + WritePS (pPageHeader, aPageNo); + WritePS (pPageHeader, " "); + WritePS (pPageHeader, aPageNo); + WritePS (pPageHeader, "\n"); + + if( rJobSetup.m_eOrientation == orientation::Landscape ) + { + WritePS (pPageHeader, "%%PageOrientation: Landscape\n"); + mnLandscapes++; + } + else + { + WritePS (pPageHeader, "%%PageOrientation: Portrait\n"); + mnPortraits++; + } + + sal_Char pBBox [256]; + sal_Int32 nChar = 0; + + nChar = psp::appendStr ("%%PageBoundingBox: ", pBBox); + nChar += psp::getValueOf (mnLMarginPt, pBBox + nChar); + nChar += psp::appendStr (" ", pBBox + nChar); + nChar += psp::getValueOf (mnBMarginPt, pBBox + nChar); + nChar += psp::appendStr (" ", pBBox + nChar); + nChar += psp::getValueOf (mnWidthPt - mnRMarginPt, pBBox + nChar); + nChar += psp::appendStr (" ", pBBox + nChar); + nChar += psp::getValueOf (mnHeightPt - mnTMarginPt, pBBox + nChar); + nChar += psp::appendStr ("\n", pBBox + nChar); + + WritePS (pPageHeader, pBBox); + + /* #i7262# #i65491# write setup only before first page + * (to %%Begin(End)Setup, instead of %%Begin(End)PageSetup) + * don't do this in StartJob since the jobsetup there may be + * different. + */ + bool bWriteFeatures = true; + if( 1 == maPageList.size() ) + { + m_aDocumentJobData = rJobSetup; + bWriteFeatures = false; + } + + if ( writePageSetup( pPageHeader, rJobSetup, bWriteFeatures ) ) + { + m_aLastJobData = rJobSetup; + return true; + } + + return false; +} + +sal_Bool +PrinterJob::EndPage () +{ + m_pGraphics->OnEndPage(); + + osl::File* pPageHeader = maHeaderList.back(); + osl::File* pPageBody = maPageList.back(); + + if( ! (pPageBody && pPageHeader) ) + return sal_False; + + // copy page to paper and write page trailer according to DSC + + sal_Char pTrailer[256]; + sal_Int32 nChar = 0; + nChar = psp::appendStr ("grestore grestore\n", pTrailer); + nChar += psp::appendStr ("showpage\n", pTrailer + nChar); + nChar += psp::appendStr ("%%PageTrailer\n\n", pTrailer + nChar); + WritePS (pPageBody, pTrailer); + + // this page is done for now, close it to avoid having too many open fd's + + pPageHeader->close(); + pPageBody->close(); + + return sal_True; +} + +sal_uInt32 +PrinterJob::GetErrorCode () +{ + /* TODO */ + return 0; +} + +struct less_ppd_key : public ::std::binary_function +{ + bool operator()(const PPDKey* left, const PPDKey* right) + { return left->getOrderDependency() < right->getOrderDependency(); } +}; + +static bool writeFeature( osl::File* pFile, const PPDKey* pKey, const PPDValue* pValue, bool bUseIncluseFeature ) +{ + if( ! pKey || ! pValue ) + return true; + + OStringBuffer aFeature(256); + aFeature.append( "[{\n" ); + if( bUseIncluseFeature ) + aFeature.append( "%%IncludeFeature:" ); + else + aFeature.append( "%%BeginFeature:" ); + aFeature.append( " *" ); + aFeature.append( OUStringToOString( pKey->getKey(), RTL_TEXTENCODING_ASCII_US ) ); + aFeature.append( ' ' ); + aFeature.append( OUStringToOString( pValue->m_aOption, RTL_TEXTENCODING_ASCII_US ) ); + if( !bUseIncluseFeature ) + { + aFeature.append( '\n' ); + aFeature.append( OUStringToOString( pValue->m_aValue, RTL_TEXTENCODING_ASCII_US ) ); + aFeature.append( "\n%%EndFeature" ); + } + aFeature.append( "\n} stopped cleartomark\n" ); + sal_uInt64 nWritten = 0; + return pFile->write( aFeature.getStr(), aFeature.getLength(), nWritten ) + || nWritten != (sal_uInt64)aFeature.getLength() ? false : true; +} + +bool PrinterJob::writeFeatureList( osl::File* pFile, const JobData& rJob, bool bDocumentSetup ) +{ + bool bSuccess = true; + int i; + + // emit features ordered to OrderDependency + // ignore features that are set to default + + // sanity check + if( rJob.m_pParser == rJob.m_aContext.getParser() && + rJob.m_pParser && + ( m_aLastJobData.m_pParser == rJob.m_pParser || m_aLastJobData.m_pParser == NULL ) + ) + { + int nKeys = rJob.m_aContext.countValuesModified(); + ::std::vector< const PPDKey* > aKeys( nKeys ); + for( i = 0; i < nKeys; i++ ) + aKeys[i] = rJob.m_aContext.getModifiedKey( i ); + ::std::sort( aKeys.begin(), aKeys.end(), less_ppd_key() ); + + for( i = 0; i < nKeys && bSuccess; i++ ) + { + const PPDKey* pKey = aKeys[i]; + bool bEmit = false; + if( bDocumentSetup ) + { + if( pKey->getSetupType() == PPDKey::DocumentSetup ) + bEmit = true; + } + if( pKey->getSetupType() == PPDKey::PageSetup || + pKey->getSetupType() == PPDKey::AnySetup ) + bEmit = true; + if( bEmit ) + { + const PPDValue* pValue = rJob.m_aContext.getValue( pKey ); + if( pValue + && pValue->m_eType == eInvocation + && ( m_aLastJobData.m_pParser == NULL + || m_aLastJobData.m_aContext.getValue( pKey ) != pValue + || bDocumentSetup + ) + ) + { + // try to avoid PS level 2 feature commands if level is set to 1 + if( GetPostscriptLevel( &rJob ) == 1 ) + { + bool bHavePS2 = + ( pValue->m_aValue.SearchAscii( "<<" ) != STRING_NOTFOUND ) + || + ( pValue->m_aValue.SearchAscii( ">>" ) != STRING_NOTFOUND ); + if( bHavePS2 ) + continue; + } + bSuccess = writeFeature( pFile, pKey, pValue, PrinterInfoManager::get().getUseIncludeFeature() ); + } + } + } + } + else + bSuccess = false; + + return bSuccess; +} + +bool PrinterJob::writePageSetup( osl::File* pFile, const JobData& rJob, bool bWriteFeatures ) +{ + bool bSuccess = true; + + WritePS (pFile, "%%BeginPageSetup\n%\n"); + if ( bWriteFeatures ) + bSuccess = writeFeatureList( pFile, rJob, false ); + WritePS (pFile, "%%EndPageSetup\n"); + + sal_Char pTranslate [128]; + sal_Int32 nChar = 0; + + if( rJob.m_eOrientation == orientation::Portrait ) + { + nChar = psp::appendStr ("gsave\n[", pTranslate); + nChar += psp::getValueOfDouble ( pTranslate + nChar, mfXScale, 5); + nChar += psp::appendStr (" 0 0 ", pTranslate + nChar); + nChar += psp::getValueOfDouble ( pTranslate + nChar, mfYScale, 5); + nChar += psp::appendStr (" ", pTranslate + nChar); + nChar += psp::getValueOf (mnRMarginPt, pTranslate + nChar); + nChar += psp::appendStr (" ", pTranslate + nChar); + nChar += psp::getValueOf (mnHeightPt-mnTMarginPt, + pTranslate + nChar); + nChar += psp::appendStr ("] concat\ngsave\n", + pTranslate + nChar); + } + else + { + nChar = psp::appendStr ("gsave\n", pTranslate); + nChar += psp::appendStr ("[ 0 ", pTranslate + nChar); + nChar += psp::getValueOfDouble ( pTranslate + nChar, -mfYScale, 5); + nChar += psp::appendStr (" ", pTranslate + nChar); + nChar += psp::getValueOfDouble ( pTranslate + nChar, mfXScale, 5); + nChar += psp::appendStr (" 0 ", pTranslate + nChar ); + nChar += psp::getValueOfDouble ( pTranslate + nChar, mnLMarginPt, 5 ); + nChar += psp::appendStr (" ", pTranslate + nChar); + nChar += psp::getValueOf (mnBMarginPt, pTranslate + nChar ); + nChar += psp::appendStr ("] concat\ngsave\n", + pTranslate + nChar); + } + + WritePS (pFile, pTranslate); + + return bSuccess; +} + +void PrinterJob::writeJobPatch( osl::File* pFile, const JobData& rJobData ) +{ + if( ! PrinterInfoManager::get().getUseJobPatch() ) + return; + + const PPDKey* pKey = NULL; + + if( rJobData.m_pParser ) + pKey = rJobData.m_pParser->getKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "JobPatchFile" ) ) ); + if( ! pKey ) + return; + + // order the patch files + // according to PPD spec the JobPatchFile options must be int + // and should be emitted in order + std::list< sal_Int32 > patch_order; + int nValueCount = pKey->countValues(); + for( int i = 0; i < nValueCount; i++ ) + { + const PPDValue* pVal = pKey->getValue( i ); + patch_order.push_back( pVal->m_aOption.ToInt32() ); + if( patch_order.back() == 0 && ! pVal->m_aOption.EqualsAscii( "0" ) ) + { + WritePS( pFile, "% Warning: left out JobPatchFile option \"" ); + OString aOption = OUStringToOString( pVal->m_aOption, RTL_TEXTENCODING_ASCII_US ); + WritePS( pFile, aOption.getStr() ); + WritePS( pFile, + "\"\n% as it violates the PPD spec;\n" + "% JobPatchFile options need to be numbered for ordering.\n" ); + } + } + + patch_order.sort(); + patch_order.unique(); + + while( patch_order.begin() != patch_order.end() ) + { + // note: this discards patch files not adhering to the "int" scheme + // as there won't be a value for them + writeFeature( pFile, pKey, pKey->getValue( OUString::valueOf( patch_order.front() ) ), false ); + patch_order.pop_front(); + } +} + +bool PrinterJob::writeProlog (osl::File* pFile, const JobData& rJobData ) +{ + WritePS( pFile, "%%BeginProlog\n" ); + + // JobPatchFile feature needs to be emitted at begin of prolog + writeJobPatch( pFile, rJobData ); + + static const sal_Char pProlog[] = { + "%%BeginResource: procset PSPrint-Prolog 1.0 0\n" + "/ISO1252Encoding [\n" + "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" + "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" + "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" + "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" + "/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle\n" + "/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash\n" + "/zero /one /two /three /four /five /six /seven\n" + "/eight /nine /colon /semicolon /less /equal /greater /question\n" + "/at /A /B /C /D /E /F /G\n" + "/H /I /J /K /L /M /N /O\n" + "/P /Q /R /S /T /U /V /W\n" + "/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore\n" + "/grave /a /b /c /d /e /f /g\n" + "/h /i /j /k /l /m /n /o\n" + "/p /q /r /s /t /u /v /w\n" + "/x /y /z /braceleft /bar /braceright /asciitilde /unused\n" + "/Euro /unused /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl\n" + "/circumflex /perthousand /Scaron /guilsinglleft /OE /unused /Zcaron /unused\n" + "/unused /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash\n" + "/tilde /trademark /scaron /guilsinglright /oe /unused /zcaron /Ydieresis\n" + "/space /exclamdown /cent /sterling /currency /yen /brokenbar /section\n" + "/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron\n" + "/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered\n" + "/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown\n" + "/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla\n" + "/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis\n" + "/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply\n" + "/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls\n" + "/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla\n" + "/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis\n" + "/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide\n" + "/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] def\n" + "\n" + "/psp_definefont { exch dup findfont dup length dict begin { 1 index /FID ne\n" + "{ def } { pop pop } ifelse } forall /Encoding 3 -1 roll def\n" + "currentdict end exch pop definefont pop } def\n" + "\n" + "/pathdict dup 8 dict def load begin\n" + "/rcmd { { currentfile 1 string readstring pop 0 get dup 32 gt { exit }\n" + "{ pop } ifelse } loop dup 126 eq { pop exit } if 65 sub dup 16#3 and 1\n" + "add exch dup 16#C and -2 bitshift 16#3 and 1 add exch 16#10 and 16#10\n" + "eq 3 1 roll exch } def\n" + "/rhex { dup 1 sub exch currentfile exch string readhexstring pop dup 0\n" + "get dup 16#80 and 16#80 eq dup 3 1 roll { 16#7f and } if 2 index 0 3\n" + "-1 roll put 3 1 roll 0 0 1 5 -1 roll { 2 index exch get add 256 mul }\n" + "for 256 div exch pop exch { neg } if } def\n" + "/xcmd { rcmd exch rhex exch rhex exch 5 -1 roll add exch 4 -1 roll add\n" + "1 index 1 index 5 -1 roll { moveto } { lineto } ifelse } def end\n" + "/readpath { 0 0 pathdict begin { xcmd } loop end pop pop } def\n" + "\n" + "systemdict /languagelevel known not {\n" + "/xshow { exch dup length 0 1 3 -1 roll 1 sub { dup 3 index exch get\n" + "exch 2 index exch get 1 string dup 0 4 -1 roll put currentpoint 3 -1\n" + "roll show moveto 0 rmoveto } for pop pop } def\n" + "/rectangle { 4 -2 roll moveto 1 index 0 rlineto 0 exch rlineto neg 0\n" + "rlineto closepath } def\n" + "/rectfill { rectangle fill } def\n" + "/rectstroke { rectangle stroke } def } if\n" + "/bshow { currentlinewidth 3 1 roll currentpoint 3 index show moveto\n" + "setlinewidth false charpath stroke setlinewidth } def\n" + "/bxshow { currentlinewidth 4 1 roll setlinewidth exch dup length 1 sub\n" + "0 1 3 -1 roll { 1 string 2 index 2 index get 1 index exch 0 exch put dup\n" + "currentpoint 3 -1 roll show moveto currentpoint 3 -1 roll false charpath\n" + "stroke moveto 2 index exch get 0 rmoveto } for pop pop setlinewidth } def\n" + "\n" + "/psp_lzwfilter { currentfile /ASCII85Decode filter /LZWDecode filter } def\n" + "/psp_ascii85filter { currentfile /ASCII85Decode filter } def\n" + "/psp_lzwstring { psp_lzwfilter 1024 string readstring } def\n" + "/psp_ascii85string { psp_ascii85filter 1024 string readstring } def\n" + "/psp_imagedict {\n" + "/psp_bitspercomponent { 3 eq { 1 }{ 8 } ifelse } def\n" + "/psp_decodearray { [ [0 1 0 1 0 1] [0 255] [0 1] [0 255] ] exch get }\n" + "def 7 dict dup\n" + "/ImageType 1 put dup\n" + "/Width 7 -1 roll put dup\n" + "/Height 5 index put dup\n" + "/BitsPerComponent 4 index psp_bitspercomponent put dup\n" + "/Decode 5 -1 roll psp_decodearray put dup\n" + "/ImageMatrix [1 0 0 1 0 0] dup 5 8 -1 roll put put dup\n" + "/DataSource 4 -1 roll 1 eq { psp_lzwfilter } { psp_ascii85filter } ifelse put\n" + "} def\n" + "%%EndResource\n" + "%%EndProlog\n" + }; + static const sal_Char pSO52CompatProlog[] = { + "%%BeginResource: procset PSPrint-Prolog 1.0 0\n" + "/ISO1252Encoding [\n" + "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" + "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" + "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" + "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" + "/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright\n" + "/parenleft /parenright /asterisk /plus /comma /minus /period /slash\n" + "/zero /one /two /three /four /five /six /seven\n" + "/eight /nine /colon /semicolon /less /equal /greater /question\n" + "/at /A /B /C /D /E /F /G\n" + "/H /I /J /K /L /M /N /O\n" + "/P /Q /R /S /T /U /V /W\n" + "/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore\n" + "/grave /a /b /c /d /e /f /g\n" + "/h /i /j /k /l /m /n /o\n" + "/p /q /r /s /t /u /v /w\n" + "/x /y /z /braceleft /bar /braceright /asciitilde /unused\n" + "/Euro /unused /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl\n" + "/circumflex /perthousand /Scaron /guilsinglleft /OE /unused /Zcaron /unused\n" + "/unused /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash\n" + "/tilde /trademark /scaron /guilsinglright /oe /unused /zcaron /Ydieresis\n" + "/space /exclamdown /cent /sterling /currency /yen /brokenbar /section\n" + "/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron\n" + "/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered\n" + "/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown\n" + "/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla\n" + "/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis\n" + "/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply\n" + "/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls\n" + "/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla\n" + "/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis\n" + "/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide\n" + "/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] def\n" + "\n" + "/psp_definefont { exch dup findfont dup length dict begin { 1 index /FID ne\n" + "{ def } { pop pop } ifelse } forall /Encoding 3 -1 roll def\n" + "currentdict end exch pop definefont pop } def\n" + "\n" + "/pathdict dup 8 dict def load begin\n" + "/rcmd { { currentfile 1 string readstring pop 0 get dup 32 gt { exit }\n" + "{ pop } ifelse } loop dup 126 eq { pop exit } if 65 sub dup 16#3 and 1\n" + "add exch dup 16#C and -2 bitshift 16#3 and 1 add exch 16#10 and 16#10\n" + "eq 3 1 roll exch } def\n" + "/rhex { dup 1 sub exch currentfile exch string readhexstring pop dup 0\n" + "get dup 16#80 and 16#80 eq dup 3 1 roll { 16#7f and } if 2 index 0 3\n" + "-1 roll put 3 1 roll 0 0 1 5 -1 roll { 2 index exch get add 256 mul }\n" + "for 256 div exch pop exch { neg } if } def\n" + "/xcmd { rcmd exch rhex exch rhex exch 5 -1 roll add exch 4 -1 roll add\n" + "1 index 1 index 5 -1 roll { moveto } { lineto } ifelse } def end\n" + "/readpath { 0 0 pathdict begin { xcmd } loop end pop pop } def\n" + "\n" + "systemdict /languagelevel known not {\n" + "/xshow { exch dup length 0 1 3 -1 roll 1 sub { dup 3 index exch get\n" + "exch 2 index exch get 1 string dup 0 4 -1 roll put currentpoint 3 -1\n" + "roll show moveto 0 rmoveto } for pop pop } def\n" + "/rectangle { 4 -2 roll moveto 1 index 0 rlineto 0 exch rlineto neg 0\n" + "rlineto closepath } def\n" + "/rectfill { rectangle fill } def\n" + "/rectstroke { rectangle stroke } def } if\n" + "/bshow { currentlinewidth 3 1 roll currentpoint 3 index show moveto\n" + "setlinewidth false charpath stroke setlinewidth } def\n" + "/bxshow { currentlinewidth 4 1 roll setlinewidth exch dup length 1 sub\n" + "0 1 3 -1 roll { 1 string 2 index 2 index get 1 index exch 0 exch put dup\n" + "currentpoint 3 -1 roll show moveto currentpoint 3 -1 roll false charpath\n" + "stroke moveto 2 index exch get 0 rmoveto } for pop pop setlinewidth } def\n" + "\n" + "/psp_lzwfilter { currentfile /ASCII85Decode filter /LZWDecode filter } def\n" + "/psp_ascii85filter { currentfile /ASCII85Decode filter } def\n" + "/psp_lzwstring { psp_lzwfilter 1024 string readstring } def\n" + "/psp_ascii85string { psp_ascii85filter 1024 string readstring } def\n" + "/psp_imagedict {\n" + "/psp_bitspercomponent { 3 eq { 1 }{ 8 } ifelse } def\n" + "/psp_decodearray { [ [0 1 0 1 0 1] [0 255] [0 1] [0 255] ] exch get }\n" + "def 7 dict dup\n" + "/ImageType 1 put dup\n" + "/Width 7 -1 roll put dup\n" + "/Height 5 index put dup\n" + "/BitsPerComponent 4 index psp_bitspercomponent put dup\n" + "/Decode 5 -1 roll psp_decodearray put dup\n" + "/ImageMatrix [1 0 0 1 0 0] dup 5 8 -1 roll put put dup\n" + "/DataSource 4 -1 roll 1 eq { psp_lzwfilter } { psp_ascii85filter } ifelse put\n" + "} def\n" + "%%EndResource\n" + "%%EndProlog\n" + }; + WritePS (pFile, m_pGraphics && m_pGraphics->getStrictSO52Compatibility() ? pSO52CompatProlog : pProlog); + + return true; +} + +bool PrinterJob::writeSetup( osl::File* pFile, const JobData& rJob ) +{ + WritePS (pFile, "%%BeginSetup\n%\n"); + + // download fonts + std::list< rtl::OString > aFonts[2]; + m_pGraphics->writeResources( pFile, aFonts[0], aFonts[1] ); + + for( int i = 0; i < 2; i++ ) + { + if( !aFonts[i].empty() ) + { + std::list< rtl::OString >::const_iterator it = aFonts[i].begin(); + rtl::OStringBuffer aLine( 256 ); + if( i == 0 ) + aLine.append( "%%DocumentSuppliedResources: font " ); + else + aLine.append( "%%DocumentNeededResources: font " ); + aLine.append( *it ); + aLine.append( "\n" ); + WritePS ( pFile, aLine.getStr() ); + while( (++it) != aFonts[i].end() ) + { + aLine.setLength(0); + aLine.append( "%%+ font " ); + aLine.append( *it ); + aLine.append( "\n" ); + WritePS ( pFile, aLine.getStr() ); + } + } + } + + bool bSuccess = true; + // in case of external print dialog the number of copies is prepended + // to the job, let us not complicate things by emitting our own copy count + bool bExternalDialog = PrinterInfoManager::get().checkFeatureToken( GetPrinterName(), "external_dialog" ); + if( ! bExternalDialog && rJob.m_nCopies > 1 ) + { + // setup code + ByteString aLine( "/#copies " ); + aLine += ByteString::CreateFromInt32( rJob.m_nCopies ); + aLine += " def\n"; + sal_uInt64 nWritten = 0; + bSuccess = pFile->write( aLine.GetBuffer(), aLine.Len(), nWritten ) + || nWritten != aLine.Len() ? false : true; + + if( bSuccess && GetPostscriptLevel( &rJob ) >= 2 ) + WritePS (pFile, "<< /NumCopies null /Policies << /NumCopies 1 >> >> setpagedevice\n" ); + } + + bool bFeatureSuccess = writeFeatureList( pFile, rJob, true ); + + WritePS (pFile, "%%EndSetup\n"); + + return bSuccess && bFeatureSuccess; +} diff --git a/vcl/unx/generic/printergfx/psheader.ps b/vcl/unx/generic/printergfx/psheader.ps new file mode 100644 index 000000000000..6a0e350d9ddc --- /dev/null +++ b/vcl/unx/generic/printergfx/psheader.ps @@ -0,0 +1,368 @@ +%************************************************************************* +% +% 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. +% +%************************************************************************* + +% +% +% readpath +% +% The intention of readpath is to save disk space since the vcl clip region routines +% produce a huge amount of lineto/moveto commands +% +% The principal idea is to maintain the current point on stack and to provide only deltas +% in the command. These deltas are added to the current point. The new point is used for +% the lineto and moveto command and saved on stack for the next command. +% +% pathdict implements binary/hex representation of lineto and moveto commands. +% The command consists of a 1byte opcode to switch between lineto and moveto and the size +% of the following delta-x and delta-y values. The opcode is read with /rcmd, the two +% coordinates are read with /rhex. The whole command is executed with /xcmd +% +% + +/pathdict dup 8 dict def load +begin + + % the command is of the bit format cxxyy + % with c=0 meaning lineto + % c=1 meaning moveto + % xx is a 2bit value for the number of bytes for x position + % yy is the same for y, values are off by one: 00 means 1; 11 means 4 ! + % the command has been added to 'A' to be always in the ascii character + % range. the command is followed by 2*xx + 2*yy hexchars. + % '~' denotes the special case of EOD + /rcmd { + { + currentfile 1 string readstring % s bool + pop % s + 0 get % s[0] + % --- check wether s[0] is CR, LF ... + dup 32 gt % s > ' ' ? then read on + { exit } + { pop } + ifelse + } + loop + + dup 126 eq { pop exit } if % -- Exit loop if cmd is '~' + 65 sub % cmd=s[0]-'A' + % -- Separate yy bits + dup 16#3 and 1 add % cmd yy + % -- Separate xx bits + exch % yy cmd + dup 16#C and -2 bitshift + 16#3 and 1 add exch % yy xx cmd + % -- Separate command bit + 16#10 and 16#10 eq % yy xx bool + 3 1 roll exch % bool xx yy + } def + + % length rhex -- reads a signed hex value of given length + % the left most bit of char 0 is considered as the sign (0 means '+', 1 means '-') + % the rest of the bits is considered to be the abs value. Please note that this + % does not match the C binary representation of integers + /rhex { + dup 1 sub exch % l-1 l + currentfile exch string readhexstring % l-1 substring[l] bool + pop + dup 0 get dup % l-1 s s[0] s[0] + % -- Extract the sign + 16#80 and 16#80 eq dup % l-1 s s[0] sign=- sign=- + % -- Mask out the sign bit and put value back + 3 1 roll % l-1 s sign=- s[0] sign=- + { 16#7f and } if % l-1 s sign=- +s[0] + 2 index 0 % l-1 s sign=- +s[0] s 0 + 3 -1 roll put % l-1 s sign=- s 0 +s[0] + % -- Read loop: add to prev sum, mul with 256 + 3 1 roll 0 % sign=- l-1 s Sum=0 + 0 1 5 -1 roll % sign=- s Sum=0 0 1 l-1 + { % sign=- s Sum idx + 2 index exch % sign=- s Sum s idx + get % sign=- s Sum s[idx] + add 256 mul % sign=- s Sum=(s[idx]+Sum)*256 + } + for + % -- mul was once too often, weave in the sign + 256 div % sign=- s Sum/256 + exch pop % sign=- Sum/256 + exch { neg } if % (sign=- ? -Sum : Sum) + } def + + % execute a single command, the former x and y position is already on stack + % only offsets are read from cmdstring + /xcmd { % x y + rcmd % x y bool wx wy + exch rhex % x y bool wy Dx + exch rhex % x y bool Dx Dy + exch 5 -1 roll % y bool Dy Dx x + add exch % y bool X Dy + 4 -1 roll add % bool X Y + 1 index 1 index % bool X Y X Y + 5 -1 roll % X Y X Y bool + { moveto } + { lineto } + ifelse % X Y + } def +end + +/readpath +{ + 0 0 % push initial-x initial-y + pathdict begin + { xcmd } loop + end + pop pop % pop final-x final-y +} def + +% +% +% if languagelevel is not in the systemdict then its level 1 interpreter: +% provide compatibility routines +% +% + +systemdict /languagelevel known not +{ + % string numarray xxshow - + % does only work for single byte fonts + /xshow { + exch dup % a s s + length 0 1 % a s l(s) 1 1 + 3 -1 roll 1 sub % a s 0 1 l(s)-1 + { % a s idx + dup % a s idx idx + % -- extract the delta offset + 3 index exch get % a s idx a[idx] + % -- extract the character + exch % a s a[idx] idx + 2 index exch get % a s a[idx] s[idx] + % -- create a tmp string for show + 1 string dup 0 % a s a[idx] s[idx] s1 s1 0 + 4 -1 roll % a s a[idx] s1 s1 0 s[idx] + put % a s a[idx] s1 + % -- store the current point + currentpoint 3 -1 roll % a s a[idx] x y s1 + % -- draw the character + show % a s a[idx] x y + % -- move to the offset + moveto 0 rmoveto % a s + } + for + pop pop % - + } def + + % x y width height rectfill + % x y width height rectshow + % in contrast to the languagelevel 2 operator + % they use and change the currentpath + /rectangle { + 4 -2 roll % width height x y + moveto % width height + 1 index 0 rlineto % width height % rmoveto(width, 0) + 0 exch rlineto % width % rmoveto(0, height) + neg 0 rlineto % - % rmoveto(-width, 0) + closepath + } def + + /rectfill { rectangle fill } def + /rectstroke { rectangle stroke } def +} +if + +% -- small test program +% 75 75 moveto /Times-Roman findfont 12 scalefont setfont +% <292a2b2c2d2e2f30313233343536373839> +% [5 5 6 6 6 6 6 6 6 6 6 6 7 7 7 7 5] xshow <21>[0] xshow +% showpage + +% +% +% shortcuts for image header with compression +% +% + +/psp_lzwfilter { + currentfile /ASCII85Decode filter /LZWDecode filter +} def +/psp_ascii85filter { + currentfile /ASCII85Decode filter +} def +/psp_lzwstring { + psp_lzwfilter 1024 string readstring +} def +/psp_ascii85string { + psp_ascii85filter 1024 string readstring +} def +/psp_imagedict { + /psp_bitspercomponent { + 3 eq + { 1 } + { 8 } + ifelse + } def + /psp_decodearray { + [ [0 1 0 1 0 1] [0 255] [0 1] [0 255] ] exch get + } def + + 7 dict dup + /ImageType 1 put dup + /Width 7 -1 roll put dup + /Height 5 index put dup + /BitsPerComponent 4 index + psp_bitspercomponent put dup + /Decode 5 -1 roll + psp_decodearray put dup + /ImageMatrix [1 0 0 1 0 0] dup + 5 8 -1 roll put put dup + /DataSource 4 -1 roll + 1 eq + { psp_lzwfilter } + { psp_ascii85filter } + ifelse put +} def + + +% +% +% font encoding and reencoding +% +% + +/ISO1252Encoding [ + /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef + /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef + /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef + /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef + /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle + /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash + /zero /one /two /three /four /five /six /seven + /eight /nine /colon /semicolon /less /equal /greater /question + /at /A /B /C /D /E /F /G + /H /I /J /K /L /M /N /O + /P /Q /R /S /T /U /V /W + /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore + /grave /a /b /c /d /e /f /g + /h /i /j /k /l /m /n /o + /p /q /r /s /t /u /v /w + /x /y /z /braceleft /bar /braceright /asciitilde /unused + /Euro /unused /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl + /circumflex /perthousand /Scaron /guilsinglleft /OE /unused /Zcaron /unused + /unused /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash + /tilde /trademark /scaron /guilsinglright /oe /unused /zcaron /Ydieresis + /space /exclamdown /cent /sterling /currency /yen /brokenbar /section + /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron + /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered + /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown + /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla + /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis + /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply + /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls + /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla + /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis + /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide + /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def + +% /fontname /encoding psp_findfont +/psp_findfont { + exch dup % encoding fontname fontname + findfont % encoding fontname + dup length dict + begin + { + 1 index /FID ne + { def } + { pop pop } + ifelse + } forall + /Encoding 3 -1 roll def + currentdict + end + /psp_reencodedfont exch definefont +} def + +% bshow shows a text in artificial bold +% this is achieved by first showing the text +% then stroking its outline over it with +% the linewidth set to the second parameter +% usage: (string) num bshow + +/bshow { + currentlinewidth % save current linewidth + 3 1 roll % move it to the last stack position + currentpoint % save the current point + 3 index % copy the string to show + show % show it + moveto % move to the original coordinates again + setlinewidth % set the linewidth + false charpath % create the outline path of the shown string + stroke % and stroke it + setlinewidth % reset the stored linewidth +} def + +% bxshow shows a text with a delta array in artificial bold +% that is it does what bshow does for show +% usage: (string) [deltaarray] num bxshow + +/bxshow { + currentlinewidth % save linewidth + 4 1 roll % move it to the last stack position + setlinewidth % set the new linewidth + exch % exchange string and delta array + dup + length % get length of string + 1 sub % prepare parameters for {} for + 0 1 + 3 -1 roll + { + 1 string % create a string object length 1 + 2 index % get the text + 2 index % get charpos (for index variable) + get % have char value at charpos + 1 index % prepare string for put + exch + 0 + exch + put % put into string of length 1 + dup % duplicate the it + currentpoint % save current position + 3 -1 roll % prepare show + show % show the character + moveto % move back to beginning + currentpoint % save current position + 3 -1 roll % prepare outline path of character + false charpath + stroke % stroke it + moveto % move back + % now move to next point + 2 index % get advance array + exch % get charpos + get % get advance element + 0 rmoveto % advance current position + } for + pop pop % remove string and delta array + setlinewidth % restore linewidth +} def diff --git a/vcl/unx/generic/printergfx/psputil.cxx b/vcl/unx/generic/printergfx/psputil.cxx new file mode 100644 index 000000000000..370114be47cb --- /dev/null +++ b/vcl/unx/generic/printergfx/psputil.cxx @@ -0,0 +1,268 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include + +#include "psputil.hxx" + +#include "tools/debug.hxx" + +namespace psp { + +/* + * string convenience routines + */ + +sal_Int32 +getHexValueOf (sal_Int32 nValue, sal_Char* pBuffer) +{ + const static sal_Char pHex [0x10] = { + '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; + + pBuffer[0] = pHex [(nValue & 0xF0) >> 4]; + pBuffer[1] = pHex [(nValue & 0x0F) ]; + + return 2; +} + +sal_Int32 +getAlignedHexValueOf (sal_Int32 nValue, sal_Char* pBuffer) +{ + // get sign + sal_Bool bNegative = nValue < 0; + nValue = bNegative ? -nValue : nValue; + + // get required buffer size, must be a multiple of two + sal_Int32 nPrecision; + if (nValue < 0x80) + nPrecision = 2; + else + if (nValue < 0x8000) + nPrecision = 4; + else + if (nValue < 0x800000) + nPrecision = 6; + else + nPrecision = 8; + + // convert the int into its hex representation, write it into the buffer + sal_Int32 nRet = nPrecision; + while (nPrecision) + { + nPrecision -= getHexValueOf (nValue % 256, pBuffer + nPrecision - 2 ); + nValue /= 256; + } + + // set sign bit + if (bNegative) + { + switch (pBuffer[0]) + { + case '0' : pBuffer[0] = '8'; break; + case '1' : pBuffer[0] = '9'; break; + case '2' : pBuffer[0] = 'A'; break; + case '3' : pBuffer[0] = 'B'; break; + case '4' : pBuffer[0] = 'C'; break; + case '5' : pBuffer[0] = 'D'; break; + case '6' : pBuffer[0] = 'E'; break; + case '7' : pBuffer[0] = 'F'; break; + default: DBG_ERROR("Already a signed value"); + } + } + + // report precision + return nRet; +} + + +sal_Int32 +getValueOf (sal_Int32 nValue, sal_Char* pBuffer) +{ + sal_Int32 nChar = 0; + if (nValue < 0) + { + pBuffer [nChar++] = '-'; + nValue *= -1; + } + else + if (nValue == 0) + { + pBuffer [nChar++] = '0'; + return nChar; + } + + sal_Char pInvBuffer [32]; + sal_Int32 nInvChar = 0; + while (nValue > 0) + { + pInvBuffer [nInvChar++] = '0' + nValue % 10; + nValue /= 10; + } + while (nInvChar > 0) + { + pBuffer [nChar++] = pInvBuffer [--nInvChar]; + } + + return nChar; +} + +sal_Int32 +appendStr (const sal_Char* pSrc, sal_Char* pDst) +{ + sal_Int32 nBytes = strlen (pSrc); + strncpy (pDst, pSrc, nBytes + 1); + + return nBytes; +} + +sal_Int32 +appendStr (const sal_Char* pSrc, sal_Char* pDst, sal_Int32 nBytes) +{ + strncpy (pDst, pSrc, nBytes); + pDst [nBytes] = '\0'; + return nBytes; +} + +/* + * copy strings to file + */ + +sal_Bool +WritePS (osl::File* pFile, const sal_Char* pString) +{ + sal_uInt64 nInLength = rtl_str_getLength (pString); + sal_uInt64 nOutLength = 0; + + if (nInLength > 0 && pFile) + pFile->write (pString, nInLength, nOutLength); + + return nInLength == nOutLength; +} + +sal_Bool +WritePS (osl::File* pFile, const sal_Char* pString, sal_uInt64 nInLength) +{ + sal_uInt64 nOutLength = 0; + + if (nInLength > 0 && pFile) + pFile->write (pString, nInLength, nOutLength); + + return nInLength == nOutLength; +} + +sal_Bool +WritePS (osl::File* pFile, const rtl::OString &rString) +{ + sal_uInt64 nInLength = rString.getLength(); + sal_uInt64 nOutLength = 0; + + if (nInLength > 0 && pFile) + pFile->write (rString, nInLength, nOutLength); + + return nInLength == nOutLength; +} + +sal_Bool +WritePS (osl::File* pFile, const rtl::OUString &rString) +{ + return WritePS (pFile, rtl::OUStringToOString(rString, RTL_TEXTENCODING_ASCII_US)); +} + +/* + * cache converter for use in postscript drawing routines + */ + +ConverterFactory::ConverterFactory() +{ +} + +ConverterFactory::~ConverterFactory () +{ + for( std::map< rtl_TextEncoding, rtl_UnicodeToTextConverter >::const_iterator it = m_aConverters.begin(); it != m_aConverters.end(); ++it ) + rtl_destroyUnicodeToTextConverter (it->second); +} + +rtl_UnicodeToTextConverter +ConverterFactory::Get (rtl_TextEncoding nEncoding) +{ + if (rtl_isOctetTextEncoding( nEncoding )) + { + std::map< rtl_TextEncoding, rtl_UnicodeToTextConverter >::const_iterator it = + m_aConverters.find( nEncoding ); + rtl_UnicodeToTextConverter aConverter; + if (it == m_aConverters.end()) + { + aConverter = rtl_createUnicodeToTextConverter (nEncoding); + m_aConverters[nEncoding] = aConverter; + } + else + aConverter = it->second; + return aConverter; + } + return NULL; +} + +// wrapper for rtl_convertUnicodeToText that handles the usual cases for +// textconversion in drawtext +sal_Size +ConverterFactory::Convert (const sal_Unicode *pText, int nTextLen, + sal_uChar *pBuffer, sal_Size nBufferSize, rtl_TextEncoding nEncoding) +{ + const sal_uInt32 nCvtFlags = RTL_UNICODETOTEXT_FLAGS_UNDEFINED_QUESTIONMARK + | RTL_UNICODETOTEXT_FLAGS_INVALID_QUESTIONMARK ; + sal_uInt32 nCvtInfo; + sal_Size nCvtChars; + + rtl_UnicodeToTextConverter aConverter = Get (nEncoding); + rtl_UnicodeToTextContext aContext = rtl_createUnicodeToTextContext (aConverter); + + sal_Size nSize = rtl_convertUnicodeToText (aConverter, aContext, + pText, nTextLen, (sal_Char*)pBuffer, nBufferSize, + nCvtFlags, &nCvtInfo, &nCvtChars); + + rtl_destroyUnicodeToTextContext (aConverter, aContext); + + return nSize; +} + +ConverterFactory* +GetConverterFactory () +{ + static ConverterFactory* pCvt = NULL; + + if (pCvt == NULL) + pCvt = new ConverterFactory; + + return pCvt; +} + + +} /* namespace psp */ diff --git a/vcl/unx/generic/printergfx/psputil.hxx b/vcl/unx/generic/printergfx/psputil.hxx new file mode 100644 index 000000000000..d4af41bb95ed --- /dev/null +++ b/vcl/unx/generic/printergfx/psputil.hxx @@ -0,0 +1,78 @@ +/************************************************************************* + * + * 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 _PSPRINT_PRINTERUTIL_HXX_ +#define _PSPRINT_PRINTERUTIL_HXX_ + +#include "osl/file.hxx" + +#include "rtl/ustring.hxx" +#include "rtl/string.hxx" +#include "rtl/tencinfo.h" +#include "rtl/textcvt.h" + +#include + +namespace psp { + +/* + * string convenience routines + * sizeof(pBuffer) must be at least 2 Bytes, 0x00 <= nValue <= 0xFF, + * effective buffer of get*ValueOf() is NOT NULL-terminated + */ +sal_Int32 getHexValueOf (sal_Int32 nValue, sal_Char* pBuffer); +sal_Int32 getAlignedHexValueOf (sal_Int32 nValue, sal_Char* pBuffer); +sal_Int32 getValueOf (sal_Int32 nValue, sal_Char* pBuffer); +sal_Int32 appendStr (const sal_Char* pSrc, sal_Char* pDst); +sal_Int32 appendStr (const sal_Char* pSrc, sal_Char* pDst, sal_Int32 nBytes); + +sal_Bool WritePS (osl::File* pFile, const sal_Char* pString); +sal_Bool WritePS (osl::File* pFile, const sal_Char* pString, sal_uInt64 nInLength); +sal_Bool WritePS (osl::File* pFile, const rtl::OString &rString); +sal_Bool WritePS (osl::File* pFile, const rtl::OUString &rString); + +class ConverterFactory +{ + +public: + ConverterFactory(); + ~ConverterFactory(); + rtl_UnicodeToTextConverter Get (rtl_TextEncoding nEncoding); + sal_Size Convert (const sal_Unicode *pText, int nTextLen, + sal_uChar *pBuffer, sal_Size nBufferSize, + rtl_TextEncoding nEncoding); +private: + + std::map< rtl_TextEncoding, rtl_UnicodeToTextConverter > m_aConverters; +}; + +ConverterFactory* GetConverterFactory (); + +} /* namespace psp */ + +#endif /* _PSPRINT_PRINTERUTIL_HXX_ */ + diff --git a/vcl/unx/generic/printergfx/text_gfx.cxx b/vcl/unx/generic/printergfx/text_gfx.cxx new file mode 100644 index 000000000000..7934821d4d70 --- /dev/null +++ b/vcl/unx/generic/printergfx/text_gfx.cxx @@ -0,0 +1,862 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include + +#include "psputil.hxx" +#include "glyphset.hxx" + +#include "printergfx.hxx" +#include "vcl/fontmanager.hxx" +#include "vcl/helper.hxx" + +#include "osl/thread.h" + +#include "sal/alloca.h" + +using namespace psp ; + +namespace psp { +/* + container for a font and its helper fonts: + 1st font is the font substitute e.g. helvetica substitutes arial on the printer + 2nd is the font itself + 3rd is a fallback font, usually a font with unicode glyph repertoir (e.g. andale) + symbol fonts (adobe-fontspecific) may need special glyphmapping + (symbol page vc. latin page) +*/ +class Font3 +{ + private: + + #define Font3Size 3 + + fontID mpFont [Font3Size]; + bool mbSymbol; + + public: + + fontID GetFont (int nIdx) const + { return nIdx < Font3Size ? mpFont[nIdx] : -1 ; } + bool IsSymbolFont () const + { return mbSymbol; } + + Font3 (const PrinterGfx &rGfx); + ~Font3 () {} +}; + +Font3::Font3(const PrinterGfx &rGfx) +{ + mpFont[0] = rGfx.getFontSubstitute(); + mpFont[1] = rGfx.GetFontID(); + mpFont[2] = rGfx.getFallbackID(); + // mpFont[2] = rGfx.GetFontID(); + + PrintFontManager &rMgr = PrintFontManager::get(); + mbSymbol = mpFont[1] != -1 ? + rMgr.getFontEncoding(mpFont[1]) == RTL_TEXTENCODING_SYMBOL : false; +} + +} // namespace psp + +static int getVerticalDeltaAngle( sal_Unicode nChar ) +{ + int nAngle = 0; + if( ( nChar >= 0x1100 && nChar < 0x11fa ) || + ( nChar >= 0x3000 && nChar < 0xfb00 ) || + ( nChar >= 0xfe20 && nChar < 0xfe70 ) || + ( nChar >= 0xff00 && nChar < 0xff64 ) + ) + { + /* #i52932# remember: + nChar == 0x2010 || nChar == 0x2015 + nChar == 0x2016 || nChar == 0x2026 + + are nAngle = 0 also, but already handled in the first if + */ + if( ( nChar >= 0x3008 && nChar < 0x3019 && nChar != 0x3012 ) || + nChar == 0xff3b || nChar == 0xff3d || + (nChar >= 0xff6b && nChar < 0xff64 ) || + nChar == 0xffe3 + ) + nAngle = 0; + else if( nChar == 0x30fc ) + nAngle = -900; + else + nAngle = 900; + } + return nAngle; +} + +void +PrinterGfx::PSUploadPS1Font (sal_Int32 nFontID) +{ + std::list< sal_Int32 >::iterator aFont; + // already in the document header ? + for (aFont = maPS1Font.begin(); aFont != maPS1Font.end(); ++aFont ) + if( nFontID == *aFont ) + return; + + // no occurrenc yet, mark for download + // add the fontid to the list + maPS1Font.push_back (nFontID); +} + +/* + * implement text handling printer routines, + */ + +sal_uInt16 +PrinterGfx::SetFont( + sal_Int32 nFontID, + sal_Int32 nHeight, + sal_Int32 nWidth, + sal_Int32 nAngle, + bool bVertical, + bool bArtItalic, + bool bArtBold + ) +{ + // font and encoding will be set by drawText again immediately + // before PSShowText + mnFontID = nFontID; + maVirtualStatus.maFont = rtl::OString(); + maVirtualStatus.maEncoding = RTL_TEXTENCODING_DONTKNOW; + maVirtualStatus.mnTextHeight = nHeight; + maVirtualStatus.mnTextWidth = nWidth; + maVirtualStatus.mbArtItalic = bArtItalic; + maVirtualStatus.mbArtBold = bArtBold; + mnTextAngle = nAngle; + mbTextVertical = bVertical; + + return 0; +} + +sal_uInt16 +PrinterGfx::SetFallbackFont ( sal_Int32 nFontID ) +{ + mnFallbackID = nFontID; + return 0; +} + +void PrinterGfx::drawGlyphs( + const Point& rPoint, + sal_uInt32* pGlyphIds, + sal_Unicode* pUnicodes, + sal_Int16 nLen, + sal_Int32* pDeltaArray + ) +{ + + // draw the string + // search for a glyph set matching the set font + std::list< GlyphSet >::iterator aIter; + for (aIter = maPS3Font.begin(); aIter != maPS3Font.end(); aIter++) + if ( ((*aIter).GetFontID() == mnFontID) + && ((*aIter).IsVertical() == mbTextVertical)) + { + (*aIter).DrawGlyphs (*this, rPoint, pGlyphIds, pUnicodes, nLen, pDeltaArray); + break; + } + + // not found ? create a new one + if (aIter == maPS3Font.end()) + { + maPS3Font.push_back (GlyphSet(mnFontID, mbTextVertical)); + maPS3Font.back().DrawGlyphs (*this, rPoint, pGlyphIds, pUnicodes, nLen, pDeltaArray); + } +} + +void PrinterGfx::DrawGlyphs( + const Point& rPoint, + sal_GlyphId* pGlyphIds, + sal_Unicode* pUnicodes, + sal_Int16 nLen, + sal_Int32* pDeltaArray + ) +{ + if( nLen <= 0 ) + return; + + if ( !mrFontMgr.isFontDownloadingAllowed( mnFontID ) ) + { + LicenseWarning(rPoint, pUnicodes, nLen, pDeltaArray); + return; + } + + if( mrFontMgr.getFontType( mnFontID ) != fonttype::TrueType ) + { + DrawText( rPoint, pUnicodes, nLen, pDeltaArray ); + return; + } + + // move and rotate the user coordinate system + // avoid the gsave/grestore for the simple cases since it allows + // reuse of the current font if it hasn't changed + sal_Int32 nCurrentTextAngle = mnTextAngle; + Point aPoint( rPoint ); + + if (nCurrentTextAngle != 0) + { + PSGSave (); + PSTranslate (rPoint); + PSRotate (nCurrentTextAngle); + mnTextAngle = 0; + aPoint = Point( 0, 0 ); + } + + if( mbTextVertical ) + { + // vertical glyphs can have an additional rotation ... sigh. + // so break up text in chunks of normal glyphs and print out + // specially rotated glyphs extra + sal_uInt32* pTempGlyphIds = (sal_uInt32*)alloca(sizeof(sal_Int32)*nLen); + sal_Int32* pTempDelta = (sal_Int32*)alloca(sizeof(sal_Int32)*nLen); + sal_Unicode* pTempUnicodes = (sal_Unicode*)alloca(sizeof(sal_Unicode)*nLen); + sal_Int16 nTempLen = 0; + sal_Int32 nTempFirstDelta = 0; + Point aRotPoint; + sal_Int32 nTextHeight = maVirtualStatus.mnTextHeight; + sal_Int32 nTextWidth = maVirtualStatus.mnTextWidth ? maVirtualStatus.mnTextWidth : maVirtualStatus.mnTextHeight; + sal_Int32 nAscend = mrFontMgr.getFontAscend( mnFontID ); + sal_Int32 nDescend = mrFontMgr.getFontDescend( mnFontID ); + + nDescend = nDescend * nTextHeight / 1000; + nAscend = nAscend * nTextHeight / 1000; + + for( sal_Int16 i = 0; i < nLen; i++ ) + { + const sal_GlyphId nRot = pGlyphIds[i] & GF_ROTMASK; + if( nRot == GF_NONE ) + { + pTempUnicodes[nTempLen] = pUnicodes[i]; + pTempGlyphIds[nTempLen] = pGlyphIds[i]; + if( nTempLen > 0 ) + pTempDelta[nTempLen-1] = pDeltaArray[i-1]-nTempFirstDelta; + else + { + // the first element in pDeltaArray shows + // the offset of the second character + // so if the first glyph is normal + // then we do not need to move the delta indices + // else we have to move them down by one and + // recalculate aPoint and all deltas + if( i != 0 ) + nTempFirstDelta = pDeltaArray[ i-1 ]; + } + nTempLen++; + } + else + { + sal_Int32 nOffset = i > 0 ? pDeltaArray[i-1] : 0; + sal_Int32 nRotAngle = 0; + switch( nRot ) + { + case GF_ROTR: + nRotAngle = 2700; + aRotPoint = Point( -nAscend*nTextWidth/nTextHeight, -nDescend*nTextWidth/nTextHeight - nOffset ); + break; + case GF_VERT: + nRotAngle = 1800; + aRotPoint = Point( -nOffset, (nAscend+nDescend) ); + break; + case GF_ROTL: + nRotAngle = 900; + aRotPoint = Point( -nDescend*nTextWidth/nTextHeight, nOffset + nAscend*nTextWidth/nTextHeight ); + break; + } + sal_GlyphId nRotGlyphId = pGlyphIds[i]; + sal_Unicode nRotUnicode = pUnicodes[i]; + sal_Int32 nRotDelta = 0; + + // transform matrix to new individual direction + PSGSave (); + GraphicsStatus aSaveStatus = maVirtualStatus; + if( nRot != 2 ) // switch font aspect + { + maVirtualStatus.mnTextWidth = nTextHeight; + maVirtualStatus.mnTextHeight = nTextWidth; + } + if( aPoint.X() || aPoint.Y() ) + PSTranslate( aPoint ); + PSRotate (nRotAngle); + // draw the rotated glyph + drawGlyphs( aRotPoint, &nRotGlyphId, &nRotUnicode, 1, &nRotDelta ); + + // restore previous state + maVirtualStatus = aSaveStatus; + PSGRestore(); + } + } + + pGlyphIds = pTempGlyphIds; + pUnicodes = pTempUnicodes; + pDeltaArray = pTempDelta; + nLen = nTempLen; + + aPoint.X() += nTempFirstDelta; + } + + if( nLen > 0 ) + drawGlyphs( aPoint, pGlyphIds, pUnicodes, nLen, pDeltaArray ); + + // restore the user coordinate system + if (nCurrentTextAngle != 0) + { + PSGRestore (); + mnTextAngle = nCurrentTextAngle; + } +} + +void +PrinterGfx::DrawText ( + const Point& rPoint, + const sal_Unicode* pStr, + sal_Int16 nLen, + const sal_Int32* pDeltaArray + ) +{ + fontID nRestoreFont = mnFontID; + + // setup font[substitutes] and map the string into the symbol area in case of + // symbol font + Font3 aFont(*this); + sal_Unicode *pEffectiveStr; + if ( aFont.IsSymbolFont() ) + { + pEffectiveStr = (sal_Unicode*)alloca(nLen * sizeof(pStr[0])); + for (int i = 0; i < nLen; i++) + pEffectiveStr[i] = pStr[i] < 256 ? pStr[i] + 0xF000 : pStr[i]; + } + else + { + pEffectiveStr = const_cast(pStr); + } + + fontID *pFontMap = (fontID*) alloca(nLen * sizeof(fontID)); + sal_Int32 *pCharWidth = (sal_Int32*) alloca(nLen * sizeof(sal_Int32)); + + for( int n = 0; n < nLen; n++ ) + { + CharacterMetric aBBox; + pFontMap[n] = getCharMetric (aFont, pEffectiveStr[n], &aBBox); + pCharWidth[n] = getCharWidth (mbTextVertical, pEffectiveStr[n], &aBBox); + } + + // setup a new delta array, use virtual resolution of 1000 + sal_Int32* pNewDeltaArray = (sal_Int32*)alloca( sizeof( sal_Int32 )*nLen ); + if ( pDeltaArray != 0) + { + for (int i = 0; i < nLen - 1; i++) + pNewDeltaArray[i] = 1000 * pDeltaArray[i]; + pNewDeltaArray[nLen - 1] = 0; + } + else + { + pNewDeltaArray[0] = pCharWidth[0]; + for (int i = 1; i < nLen; i++) + pNewDeltaArray[i] = pNewDeltaArray[i-1] + pCharWidth[i]; + } + + // move and rotate the user coordinate system + // avoid the gsave/grestore for the simple cases since it allows + // reuse of the current font if it hasn't changed + sal_Int32 nCurrentTextAngle = mnTextAngle; + sal_Int32 nCurrentPointX; + sal_Int32 nCurrentPointY; + + if (nCurrentTextAngle != 0) + { + PSGSave (); + PSTranslate (rPoint); + PSRotate (nCurrentTextAngle); + mnTextAngle = 0; + + nCurrentPointX = 0; + nCurrentPointY = 0; + } + else + { + nCurrentPointX = rPoint.X(); + nCurrentPointY = rPoint.Y(); + } + + // draw the string + sal_Int32 nDelta = 0; + for (int nTo = 0; nTo < nLen; ) + { + int nFrom = nTo; + fontID nFont = pFontMap[ nFrom ]; + + while ((nTo < nLen) && (nFont == pFontMap[nTo])) + { + pNewDeltaArray[ nTo ] = (sal_Int32)(((0.5 + pNewDeltaArray[ nTo ]) / 1000.0) - nDelta); + nTo++ ; + } + + SetFont( nFont, + maVirtualStatus.mnTextHeight, maVirtualStatus.mnTextWidth, + mnTextAngle, + mbTextVertical, + maVirtualStatus.mbArtItalic, + maVirtualStatus.mbArtBold + ); + + if (mbTextVertical) + { + drawVerticalizedText( + Point(nCurrentPointX + nDelta, nCurrentPointY), + pEffectiveStr + nFrom, nTo - nFrom, + pNewDeltaArray + nFrom ); + } + else + { + drawText( + Point(nCurrentPointX + nDelta, nCurrentPointY), + pEffectiveStr + nFrom, nTo - nFrom, + pDeltaArray == NULL ? NULL : pNewDeltaArray + nFrom ); + } + nDelta += pNewDeltaArray[ nTo - 1 ]; + } + + // restore the user coordinate system + if (nCurrentTextAngle != 0) + { + PSGRestore (); + mnTextAngle = nCurrentTextAngle; + } + + // restore the original font settings + SetFont( nRestoreFont, + maVirtualStatus.mnTextHeight, maVirtualStatus.mnTextWidth, + mnTextAngle, mbTextVertical, + maVirtualStatus.mbArtItalic, + maVirtualStatus.mbArtBold + ); +} + +void PrinterGfx::drawVerticalizedText( + const Point& rPoint, + const sal_Unicode* pStr, + sal_Int16 nLen, + const sal_Int32* pDeltaArray + ) +{ + sal_Int32* pDelta = (sal_Int32*)alloca( nLen * sizeof(sal_Int32) ); + + int nTextScale = maVirtualStatus.mnTextWidth ? maVirtualStatus.mnTextWidth : maVirtualStatus.mnTextHeight; + int nNormalAngle = mnTextAngle; + int nDeltaAngle, nLastPos = 0; + + double fSin = sin( -2.0*M_PI*nNormalAngle/3600 ); + double fCos = cos( -2.0*M_PI*nNormalAngle/3600 ); + + PrintFontManager &rMgr = PrintFontManager::get(); + PrintFontInfo aInfo; + rMgr.getFontInfo( mnFontID, aInfo ); + + bool* pGsubFlags = (bool*)alloca( nLen * sizeof(bool) ); + rMgr.hasVerticalSubstitutions( mnFontID, pStr, nLen, pGsubFlags ); + + Point aPoint( rPoint ); + for( int i = 0; i < nLen; ) + { + while( ( nDeltaAngle = getVerticalDeltaAngle( pStr[i] ) ) == 0 && i < nLen ) + i++; + if( i <= nLen && i > nLastPos ) + { + for( int n = nLastPos; n < i; n++ ) + pDelta[n] = pDeltaArray[n] - (aPoint.X() - rPoint.X() ); + + SetFont( mnFontID, + maVirtualStatus.mnTextHeight, maVirtualStatus.mnTextWidth, + nNormalAngle, mbTextVertical, + maVirtualStatus.mbArtItalic, + maVirtualStatus.mbArtBold ); + drawText( aPoint, pStr + nLastPos, i - nLastPos, pDelta + nLastPos ); + + aPoint.X() = (sal_Int32)(rPoint.X() + ((double)pDeltaArray[i-1] * fCos)); + aPoint.Y() = (sal_Int32)(rPoint.Y() + ((double)pDeltaArray[i-1] * fSin)); + } + if( i < nLen ) + { + int nOldWidth = maVirtualStatus.mnTextWidth; + int nOldHeight = maVirtualStatus.mnTextHeight; + SetFont( mnFontID, + nTextScale, + maVirtualStatus.mnTextHeight, + nNormalAngle + nDeltaAngle, + mbTextVertical, + maVirtualStatus.mbArtItalic, + maVirtualStatus.mbArtBold ); + + double nA = nTextScale * aInfo.m_nAscend / 1000.0; + double nD = nTextScale * aInfo.m_nDescend / 1000.0; + double fStretch = (double)maVirtualStatus.mnTextWidth / maVirtualStatus.mnTextHeight; + if( !pGsubFlags[i] ) + nD *= fStretch; + + Point aPos( aPoint ); + switch( nDeltaAngle ) + { + case +900: + aPos.X() += (sal_Int32)(+nA * fCos + nD * fSin); + aPos.Y() += (sal_Int32)(-nA * fSin + nD * fCos); + break; + case -900: + aPos.X() += (sal_Int32)(+nA * fSin + nD * fCos); + aPos.Y() += (sal_Int32)(-(nTextScale*fStretch - nD) * fCos); + break; + } + drawText( aPos, pStr+i, 1, NULL ); + if( i < nLen-1 && pDeltaArray ) + { + aPoint.X() = (sal_Int32)(rPoint.X() + ((double)pDeltaArray[i] * fCos)); + aPoint.Y() = (sal_Int32)(rPoint.Y() + ((double)pDeltaArray[i] * fSin)); + } + + // swap text width/height again + SetFont( mnFontID, + nOldHeight, + nOldWidth, + nNormalAngle, + mbTextVertical, + maVirtualStatus.mbArtItalic, + maVirtualStatus.mbArtBold ); + } + i++; + nLastPos = i; + } + mnTextAngle = nNormalAngle; +} + +void +PrinterGfx::LicenseWarning(const Point& rPoint, const sal_Unicode* pStr, + sal_Int16 nLen, const sal_Int32* pDeltaArray) +{ + // treat it like a builtin font in case a user has that font also in the + // printer. This is not so unlikely as it may seem; no print embedding + // licensed fonts are often used (or so they say) in companies: + // they are installed on displays and printers, but get not embedded in + // they are installed on displays and printers, but get not embedded in + // print files or documents because they are not licensed for use outside + // the company. + rtl::OString aMessage( "The font " ); + aMessage += rtl::OUStringToOString( mrFontMgr.getPSName(mnFontID), + RTL_TEXTENCODING_ASCII_US ); + aMessage += " could not be downloaded\nbecause its license does not allow for that"; + PSComment( aMessage.getStr() ); + + rtl::OString aFontName = rtl::OUStringToOString( + mrFontMgr.getPSName(mnFontID), + RTL_TEXTENCODING_ASCII_US); + PSSetFont (aFontName, RTL_TEXTENCODING_ISO_8859_1); + + sal_Size nSize = 4 * nLen; + sal_uChar* pBuffer = (sal_uChar*)alloca (nSize* sizeof(sal_uChar)); + + ConverterFactory* pCvt = GetConverterFactory (); + nSize = pCvt->Convert (pStr, nLen, pBuffer, nSize, RTL_TEXTENCODING_ISO_8859_1); + + PSMoveTo (rPoint); + PSShowText (pBuffer, nLen, nSize, pDeltaArray); +} + +void +PrinterGfx::drawText( + const Point& rPoint, + const sal_Unicode* pStr, + sal_Int16 nLen, + const sal_Int32* pDeltaArray + ) +{ + if (!(nLen > 0)) + return; + + fonttype::type eType = mrFontMgr.getFontType (mnFontID); + + if (eType == fonttype::Type1) + PSUploadPS1Font (mnFontID); + + if ( eType == fonttype::TrueType + && !mrFontMgr.isFontDownloadingAllowed(mnFontID)) + { + LicenseWarning(rPoint, pStr, nLen, pDeltaArray); + return; + } + + if( mrFontMgr.getUseOnlyFontEncoding( mnFontID ) ) + { + GlyphSet aGSet( mnFontID, mbTextVertical ); + aGSet.DrawText( *this, rPoint, pStr, nLen, pDeltaArray ); + return; + } + + // search for a glyph set matching the set font + std::list< GlyphSet >::iterator aIter; + for (aIter = maPS3Font.begin(); aIter != maPS3Font.end(); aIter++) + if ( ((*aIter).GetFontID() == mnFontID) + && ((*aIter).IsVertical() == mbTextVertical)) + { + (*aIter).DrawText (*this, rPoint, pStr, nLen, pDeltaArray); + break; + } + + // not found ? create a new one + if (aIter == maPS3Font.end()) + { + maPS3Font.push_back (GlyphSet(mnFontID, mbTextVertical)); + maPS3Font.back().DrawText (*this, rPoint, pStr, nLen, pDeltaArray); + } +} + +int +PrinterGfx::getCharWidth (sal_Bool b_vert, sal_Unicode n_char, CharacterMetric *p_bbox) +{ + b_vert = b_vert && (getVerticalDeltaAngle(n_char) != 0); + int w = b_vert ? p_bbox->height : p_bbox->width; + w *= maVirtualStatus.mnTextWidth ? maVirtualStatus.mnTextWidth : maVirtualStatus.mnTextHeight; + return w; +} + +fontID +PrinterGfx::getCharMetric (const Font3 &rFont, sal_Unicode n_char, CharacterMetric *p_bbox) +{ + p_bbox->width = -1; + p_bbox->height = -1; + + for (fontID n = 0; n < 3; n++) + { + fontID n_font = rFont.GetFont(n); + if (n_font != -1) + { + if( mbStrictSO52Compatibility ) + { + fonttype::type eType = mrFontMgr.getFontType( n_font ); + if( (eType == fonttype::Builtin || eType == fonttype::Type1) ) + { + // note: any character exchanged here MUST also be changed + // in the compatibility ISO encoding vector in the prolog + // in printerjob.cxx + sal_Unicode aRepl = 0; + if( n_char == 0x2d ) + aRepl = 0x2212; + else if( n_char == 0x27 ) + aRepl = 0x2019; + /* + additional characters that may need backwards compatibility: + ISO5589 StdEnc Unicode suggested n_char -> aRepl + 0264 0302 0x00B4 0x00B4 (acute) -> 0x2019 (quiteright) + 0246 - 0x00A6 0x00A6 (brokenbar) -> 0x007C (bar) + 0225 0267 0x0095 0x0095 () -> 0x2022 (bullet) + 0140 0301 0x0060 0x0060 (grave) -> ? + */ + if( aRepl ) + { + mrFontMgr.getMetrics( n_font, aRepl, aRepl, p_bbox ); + if (p_bbox->width >= 0 && p_bbox->height >= 0) + return n_font; + } + } + } + mrFontMgr.getMetrics( n_font, n_char, n_char, p_bbox ); + } + if (p_bbox->width >= 0 && p_bbox->height >= 0) + return n_font; + } + if (n_char != '?') + return getCharMetric (rFont, '?', p_bbox); + + return rFont.GetFont(0) != -1 ? rFont.GetFont(0) : rFont.GetFont(1); +} + +fontID +PrinterGfx::getFontSubstitute () const +{ + if( mpFontSubstitutes ) + { + ::std::hash_map< fontID, fontID >::const_iterator it = + mpFontSubstitutes->find( mnFontID ); + if( it != mpFontSubstitutes->end() ) + return it->second; + } + + return -1; +} + +sal_Int32 +PrinterGfx::GetCharWidth (sal_Unicode nFrom, sal_Unicode nTo, long *pWidthArray) +{ + Font3 aFont(*this); + if (aFont.IsSymbolFont() && (nFrom < 256) && (nTo < 256)) + { + nFrom += 0xF000; + nTo += 0xF000; + } + + for( int n = 0; n < (nTo - nFrom + 1); n++ ) + { + CharacterMetric aBBox; + getCharMetric (aFont, n + nFrom, &aBBox); + pWidthArray[n] = getCharWidth (mbTextVertical, n + nFrom, &aBBox); + } + + // returned metrics have postscript precision + return 1000; +} + +const ::std::list< KernPair >& PrinterGfx::getKernPairs( bool bVertical ) const +{ + /* + * Note: this is only a 80% solution: if a font is only + * partially substituted in a string due to missing glyphs + * the results may not be perfect; the more so the more the + * substitution differs from the original metricwise. But + * vcl only asks for KernPairs for each font once and NOT + * in a string context this is the best we can do. + * In future the kerning should be done on a per string basis. + */ + fontID nFont = mnFontID; + if( mpFontSubstitutes ) + { + ::std::hash_map< fontID, fontID >::const_iterator it = + mpFontSubstitutes->find( mnFontID ); + if( it != mpFontSubstitutes->end() ) + nFont = it->second; + } + return mrFontMgr.getKernPairs( nFont, bVertical ); +} + +/* + * advanced glyph handling + */ + +sal_Bool +PrinterGfx::GetGlyphBoundRect (sal_Unicode /*c*/, Rectangle& /*rOutRect*/) +{ + return 0; +} + +sal_uInt32 +PrinterGfx::GetGlyphOutline (sal_Unicode /*c*/, + sal_uInt16 **/*ppPolySizes*/, Point **/*ppPoints*/, sal_uInt8 **/*ppFlags*/) +{ + return 0; +} + +/* + * spool the converted truetype fonts to the page header after the page body is + * complete + * for Type1 fonts spool additional reencoding vectors that are necessary to access the + * whole font + */ + +void +PrinterGfx::OnEndPage () +{ +} + +void +PrinterGfx::OnEndJob () +{ + maPS3Font.clear(); + maPS1Font.clear(); +} + +void +PrinterGfx::writeResources( osl::File* pFile, std::list< rtl::OString >& rSuppliedFonts, std::list< rtl::OString >& rNeededFonts ) +{ + // write all type 1 fonts + std::list< sal_Int32 >::iterator aFont; + // already in the document header ? + for (aFont = maPS1Font.begin(); aFont != maPS1Font.end(); ++aFont) + { + const rtl::OString& rSysPath (mrFontMgr.getFontFileSysPath(*aFont) ); + rtl::OUString aUNCPath; + osl::File::getFileURLFromSystemPath (OStringToOUString (rSysPath, osl_getThreadTextEncoding()), aUNCPath); + osl::File aFontFile (aUNCPath); + + // provide the pfb or pfa font as a (pfa-)font resource + rtl::OString aPostScriptName = + rtl::OUStringToOString ( mrFontMgr.getPSName(*aFont), + RTL_TEXTENCODING_ASCII_US ); + + WritePS (pFile, "%%BeginResource: font "); + WritePS (pFile, aPostScriptName.getStr()); + WritePS (pFile, "\n"); + + osl::File::RC nError = aFontFile.open (OpenFlag_Read); + if (nError == osl::File::E_None) + { + convertPfbToPfa (aFontFile, *pFile); + aFontFile.close (); + + pFile->setPos(osl_Pos_Current, -1); + char lastchar = '\n'; + sal_uInt64 uBytes(1); + pFile->read((void *)(&lastchar), uBytes, uBytes); + if (lastchar != '\n') + WritePS (pFile, "\n"); + } + WritePS (pFile, "%%EndResource\n"); + rSuppliedFonts.push_back( aPostScriptName ); + } + + // write glyphsets and reencodings + std::list< GlyphSet >::iterator aIter; + for (aIter = maPS3Font.begin(); aIter != maPS3Font.end(); ++aIter) + { + if (aIter->GetFontType() == fonttype::TrueType) + { + aIter->PSUploadFont (*pFile, *this, mbUploadPS42Fonts ? true : false, rSuppliedFonts ); + } + else + // ( aIter->GetFontType() == fonttype::Type1 + // || aIter->GetFontType() == fonttype::Builtin ) + { + aIter->PSUploadEncoding (pFile, *this); + if( aIter->GetFontType() == fonttype::Builtin ) + rNeededFonts.push_back( + rtl::OUStringToOString( + mrFontMgr.getPSName( aIter->GetFontID() ), + RTL_TEXTENCODING_ASCII_US ) ); + } + } +} + +bool PrinterGfx::getStrictSO52Compatibility() const +{ + return mbStrictSO52Compatibility; +} + +void PrinterGfx::setStrictSO52Compatibility( bool bCompat) +{ + mbStrictSO52Compatibility = bCompat; +} diff --git a/vcl/unx/generic/window/FWS.cxx b/vcl/unx/generic/window/FWS.cxx new file mode 100644 index 000000000000..4683864fd116 --- /dev/null +++ b/vcl/unx/generic/window/FWS.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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_vcl.hxx" + +#include +#include +#include +#include + +#include +#include +#include +#include "FWS.hxx" + +static Atom fwsIconAtom; + +static Atom FWS_CLIENT; +static Atom FWS_COMM_WINDOW; +static Atom FWS_PROTOCOLS; +static Atom FWS_STACK_UNDER; +static Atom FWS_PARK_ICONS; +static Atom FWS_PASS_ALL_INPUT; +static Atom FWS_PASSES_INPUT; +static Atom FWS_HANDLES_FOCUS; + +static Atom FWS_REGISTER_WINDOW; +static Atom FWS_STATE_CHANGE; +static Atom FWS_UNSEEN_STATE; +static Atom FWS_NORMAL_STATE; +static Atom WM_PROTOCOLS; +static Atom WM_CHANGE_STATE; + +static Bool fwsStackUnder; +static Bool fwsParkIcons; +static Bool fwsPassesInput; +static Bool fwsHandlesFocus; + +static Window fwsCommWindow; + +/*************************************<->*********************************** + * + * WMSupportsFWS() - + * + * Initialize our atoms and determine if the current window manager is + * providing FWS extension support. + * + *************************************<->***********************************/ + +Bool +WMSupportsFWS (Display *display, int screen) +{ + unsigned int i; + Atom protocol; + Atom propType; + int propFormat; + unsigned long propItems; + unsigned long propBytesAfter; + unsigned char *propData; + char propName[64]; + + FWS_CLIENT = XInternAtom(display, "_SUN_FWS_CLIENT", False); + FWS_COMM_WINDOW = XInternAtom(display, "_SUN_FWS_COMM_WINDOW", False); + FWS_PROTOCOLS = XInternAtom(display, "_SUN_FWS_PROTOCOLS", False); + FWS_STACK_UNDER = XInternAtom(display, "_SUN_FWS_STACK_UNDER", False); + FWS_PARK_ICONS = XInternAtom(display, "_SUN_FWS_PARK_ICONS", False); + FWS_PASS_ALL_INPUT = XInternAtom(display, "_SUN_FWS_PASS_ALL_INPUT", False); + FWS_PASSES_INPUT = XInternAtom(display, "_SUN_FWS_PASSES_INPUT", False); + FWS_HANDLES_FOCUS = XInternAtom(display, "_SUN_FWS_HANDLES_FOCUS", False); + FWS_REGISTER_WINDOW= XInternAtom(display, "_SUN_FWS_REGISTER_WINDOW",False); + FWS_STATE_CHANGE = XInternAtom(display, "_SUN_FWS_STATE_CHANGE", False); + FWS_UNSEEN_STATE = XInternAtom(display, "_SUN_FWS_UNSEEN_STATE", False); + FWS_NORMAL_STATE = XInternAtom(display, "_SUN_FWS_NORMAL_STATE", False); + WM_PROTOCOLS = XInternAtom(display, "WM_PROTOCOLS", False); + WM_CHANGE_STATE = XInternAtom(display, "WM_CHANGE_STATE", False); + + snprintf (propName, sizeof(propName), "_SUN_FWS_NEXT_ICON_%d", screen); + fwsIconAtom = XInternAtom(display, propName, False); + + if (XGetWindowProperty (display, DefaultRootWindow (display), + FWS_COMM_WINDOW, 0, 1, + False, AnyPropertyType, &propType, + &propFormat, &propItems, + &propBytesAfter, &propData) != Success) + return False; + + if (propFormat != 32 || + propItems != 1 || + propBytesAfter != 0) + { + #if OSL_DEBUG_LEVEL > 1 + fprintf (stderr, "Bad FWS_COMM_WINDOW property on root window.\n"); + #endif + XFree (propData); + return False; + } + + fwsCommWindow = *(Window *) propData; + #if OSL_DEBUG_LEVEL > 1 + fprintf (stderr, "Using fwsCommWindow = 0x%lx.\n", fwsCommWindow); + #endif + XFree (propData); + + + if (XGetWindowProperty (display, DefaultRootWindow (display), + FWS_PROTOCOLS, 0, 10, + False, AnyPropertyType, &propType, + &propFormat, &propItems, + &propBytesAfter, &propData) != Success) + { + return False; + } + + if (propFormat != 32 || + propBytesAfter != 0) + { + #if OSL_DEBUG_LEVEL > 1 + fprintf (stderr, "Bad FWS_PROTOCOLS property on root window.\n"); + #endif + XFree (propData); + return False; + } + + for (i = 0; i < propItems; ++i) + { + protocol = ((Atom *) propData)[i]; + if (protocol == FWS_STACK_UNDER) + { + fwsStackUnder = True; + #if OSL_DEBUG_LEVEL > 1 + fprintf (stderr, "Using fwsStackUnder.\n"); + #endif + } + else + if (protocol == FWS_PARK_ICONS) + { + fwsParkIcons = True; + #if OSL_DEBUG_LEVEL > 1 + fprintf (stderr, "Using fwsParkIcons.\n"); + #endif + } + else + if (protocol == FWS_PASSES_INPUT) + { + fwsPassesInput = True; + #if OSL_DEBUG_LEVEL > 1 + fprintf (stderr, "Using fwsPassesInput.\n"); + #endif + } + else + if (protocol == FWS_HANDLES_FOCUS) + { + fwsHandlesFocus = True; + #if OSL_DEBUG_LEVEL > 1 + fprintf (stderr, "Using fwsHandlesFocus.\n"); + #endif + } + } + + XFree (propData); + return True; +} + +/*************************************<->*********************************** + * + * newHandler() - + * + * Handle X errors (temporarily) to record the occurance of BadWindow + * errors without crashing. Used to detect the FWS_COMM_WINDOW root window + * property containing an old or obsolete window id. + * + *************************************<->***********************************/ + +extern "C" { + +static Bool badWindowFound; +static int (* oldHandler) (Display *, XErrorEvent *); + +static int +newHandler (Display *display, XErrorEvent *xerror) +{ + if (xerror->error_code != BadWindow) + (*oldHandler)(display, xerror); + else + badWindowFound = True; + + return 0; +} + +} + +/*************************************<->*********************************** + * + * RegisterFwsWindow() - + * + * Send a client message to the FWS_COMM_WINDOW indicating the existance + * of a new FWS client window. Be careful to avoid BadWindow errors on + * the XSendEvent in case the FWS_COMM_WINDOW root window property had + * old/obsolete junk in it. + * + *************************************<->***********************************/ + +Bool +RegisterFwsWindow (Display *display, Window window) +{ + XClientMessageEvent msg; + + msg.type = ClientMessage; + msg.window = fwsCommWindow; + msg.message_type = FWS_REGISTER_WINDOW; + msg.format = 32; + msg.data.l[0] = window; + + XSync (display, False); + badWindowFound = False; + oldHandler = XSetErrorHandler (newHandler); + + XSendEvent (display, fwsCommWindow, False, NoEventMask, + (XEvent *) &msg); + XSync (display, False); + + XSetErrorHandler (oldHandler); + #if OSL_DEBUG_LEVEL > 1 + if (badWindowFound) + fprintf (stderr, "No FWS client window to register with.\n"); + #endif + + return !badWindowFound; +} + +/*************************************<->*********************************** + * + * AddFwsProtocols - + * + * Add the FWS protocol atoms to the WMProtocols property for the window. + * + *************************************<->***********************************/ + +void +AddFwsProtocols (Display *display, Window window) +{ + #define MAX_FWS_PROTOS 10 + + Atom fwsProtocols[ MAX_FWS_PROTOS ]; + int nProtos = 0; + + fwsProtocols[ nProtos++ ] = FWS_CLIENT; + fwsProtocols[ nProtos++ ] = FWS_STACK_UNDER; + fwsProtocols[ nProtos++ ] = FWS_STATE_CHANGE; + fwsProtocols[ nProtos++ ] = FWS_PASS_ALL_INPUT; + XChangeProperty (display, window, WM_PROTOCOLS, + XA_ATOM, 32, PropModeAppend, + (unsigned char *) fwsProtocols, nProtos); +} + diff --git a/vcl/unx/generic/window/FWS.hxx b/vcl/unx/generic/window/FWS.hxx new file mode 100644 index 000000000000..a687870ede4a --- /dev/null +++ b/vcl/unx/generic/window/FWS.hxx @@ -0,0 +1,64 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _FOREIGN_WINDOW_SYSTEM_HXX +#define _FOREIGN_WINDOW_SYSTEM_HXX + +#include + +#if defined(__cplusplus) +extern "C" { +#endif + +/* Initialize our atoms and determine if the current window manager is + * providing FWS extension support. + */ + +Bool +WMSupportsFWS (Display *display, int screen); + +/* Send a client message to the FWS_COMM_WINDOW indicating the existance + * of a new FWS client window. Be careful to avoid BadWindow errors on + * the XSendEvent in case the FWS_COMM_WINDOW root window property had + * old/obsolete junk in it. + */ + +Bool +RegisterFwsWindow (Display *display, Window window); + +/* Add the FWS protocol atoms to the WMProtocols property for the window. + */ + +void +AddFwsProtocols (Display *display, Window window); + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +#endif // _FOREIGN_WINDOW_SYSTEM_HXX + diff --git a/vcl/unx/generic/window/makefile.mk b/vcl/unx/generic/window/makefile.mk new file mode 100644 index 000000000000..c5cd95ba6b1c --- /dev/null +++ b/vcl/unx/generic/window/makefile.mk @@ -0,0 +1,59 @@ +#************************************************************************* +# +# 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=vcl +TARGET=salwin +.INCLUDE : $(PRJ)$/util$/makefile.pmk + +ENABLE_EXCEPTIONS=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk +.INCLUDE : $(PRJ)$/util$/makefile2.pmk + +# --- Files -------------------------------------------------------- + +.IF "$(GUIBASE)"!="unx" + +dummy: + @echo "Nothing to build for GUIBASE $(GUIBASE)" + +.ELSE # "$(GUIBASE)"!="unx" + +SLOFILES= \ + $(SLO)/FWS.obj $(SLO)/salframe.obj $(SLO)/salobj.obj + +.ENDIF # "$(GUIBASE)"!="unx" + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk + +.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx new file mode 100644 index 000000000000..7be7d9bff6c5 --- /dev/null +++ b/vcl/unx/generic/window/salframe.cxx @@ -0,0 +1,4520 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include +#include +#include + +#include "tools/debug.hxx" + +#include "sal/alloca.h" + +#include "vcl/floatwin.hxx" +#include "vcl/svapp.hxx" +#include "vcl/keycodes.hxx" +#include "vcl/printerinfomanager.hxx" +#include "vcl/settings.hxx" + +#include +#include +#include +#include "FWS.hxx" +#include +#ifndef SOLARIS +#include +#endif +#include + +#include "unx/salunx.h" +#include "unx/saldata.hxx" +#include "unx/saldisp.hxx" +#include "unx/salgdi.h" +#include "unx/salframe.h" +#include "unx/soicon.hxx" +#include "unx/dtint.hxx" +#include "unx/sm.hxx" +#include "unx/wmadaptor.hxx" +#include "unx/salprn.h" +#include "unx/salbmp.h" +#include "unx/i18n_ic.hxx" +#include "unx/i18n_keysym.hxx" +#include "unx/i18n_status.hxx" + +#include "salinst.hxx" +#include "sallayout.hxx" + +#include + +#include + +#ifndef Button6 +# define Button6 6 +#endif +#ifndef Button7 +# define Button7 7 +#endif + +using namespace vcl_sal; +using namespace vcl; + +// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +#define CLIENT_EVENTS StructureNotifyMask \ + | SubstructureNotifyMask \ + | KeyPressMask \ + | KeyReleaseMask \ + | ButtonPressMask \ + | ButtonReleaseMask \ + | PointerMotionMask \ + | EnterWindowMask \ + | LeaveWindowMask \ + | FocusChangeMask \ + | ExposureMask \ + | VisibilityChangeMask \ + | PropertyChangeMask \ + | ColormapChangeMask + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +static XLIB_Window hPresentationWindow = None, hPresFocusWindow = None; +static ::std::list< XLIB_Window > aPresentationReparentList; +static int nVisibleFloats = 0; + +X11SalFrame* X11SalFrame::s_pSaveYourselfFrame = NULL; + +// -=-= C++ statics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +static void doReparentPresentationDialogues( SalDisplay* pDisplay ) +{ + pDisplay->GetXLib()->PushXErrorLevel( true ); + while( aPresentationReparentList.begin() != aPresentationReparentList.end() ) + { + int x, y; + XLIB_Window aRoot, aChild; + unsigned int w, h, bw, d; + XGetGeometry( pDisplay->GetDisplay(), + aPresentationReparentList.front(), + &aRoot, + &x, &y, &w, &h, &bw, &d ); + XTranslateCoordinates( pDisplay->GetDisplay(), + hPresentationWindow, + aRoot, + x, y, + &x, &y, + &aChild ); + XReparentWindow( pDisplay->GetDisplay(), + aPresentationReparentList.front(), + aRoot, + x, y ); + aPresentationReparentList.pop_front(); + } + if( hPresFocusWindow ) + XSetInputFocus( pDisplay->GetDisplay(), hPresFocusWindow, PointerRoot, CurrentTime ); + XSync( pDisplay->GetDisplay(), False ); + pDisplay->GetXLib()->PopXErrorLevel(); +} + +// -=-= SalFrame / X11SalFrame =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +bool X11SalFrame::IsOverrideRedirect() const +{ + return + ((nStyle_ & SAL_FRAME_STYLE_INTRO) && !pDisplay_->getWMAdaptor()->supportsSplash()) + || + (!( nStyle_ & ~SAL_FRAME_STYLE_DEFAULT ) && !pDisplay_->getWMAdaptor()->supportsFullScreen()) + ; +} + +bool X11SalFrame::IsFloatGrabWindow() const +{ + static const char* pDisableGrab = getenv( "SAL_DISABLE_FLOATGRAB" ); + + return + ( ( !pDisableGrab || !*pDisableGrab ) && + ( + (nStyle_ & SAL_FRAME_STYLE_FLOAT) && + ! (nStyle_ & SAL_FRAME_STYLE_TOOLTIP) && + ! (nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION) + ) + ); +} + +void X11SalFrame::setXEmbedInfo() +{ + if( m_bXEmbed ) + { + long aInfo[2]; + aInfo[0] = 1; // XEMBED protocol version + aInfo[1] = (bMapped_ ? 1 : 0); // XEMBED_MAPPED + XChangeProperty( pDisplay_->GetDisplay(), + mhWindow, + pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::XEMBED_INFO ), + pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::XEMBED_INFO ), + 32, + PropModeReplace, + reinterpret_cast(aInfo), + sizeof(aInfo)/sizeof(aInfo[0]) ); + } +} + +void X11SalFrame::askForXEmbedFocus( sal_Int32 i_nTimeCode ) +{ + XEvent aEvent; + + rtl_zeroMemory( &aEvent, sizeof(aEvent) ); + aEvent.xclient.window = mhForeignParent; + aEvent.xclient.type = ClientMessage; + aEvent.xclient.message_type = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::XEMBED ); + aEvent.xclient.format = 32; + aEvent.xclient.data.l[0] = i_nTimeCode ? i_nTimeCode : CurrentTime; + aEvent.xclient.data.l[1] = 3; // XEMBED_REQUEST_FOCUS + aEvent.xclient.data.l[2] = 0; + aEvent.xclient.data.l[3] = 0; + aEvent.xclient.data.l[4] = 0; + + GetDisplay()->GetXLib()->PushXErrorLevel( true ); + XSendEvent( pDisplay_->GetDisplay(), + mhForeignParent, + False, NoEventMask, &aEvent ); + XSync( pDisplay_->GetDisplay(), False ); + GetDisplay()->GetXLib()->PopXErrorLevel(); +} + + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pParentData, bool bUseGeometry ) +{ + if( nScreen < 0 || nScreen >= GetDisplay()->GetScreenCount() ) + nScreen = GetDisplay()->GetDefaultScreenNumber(); + if( mpParent ) + nScreen = mpParent->m_nScreen; + + m_nScreen = nScreen; + nStyle_ = nSalFrameStyle; + XWMHints Hints; + Hints.flags = InputHint; + Hints.input = (nSalFrameStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) ? False : True; + + int x = 0, y = 0; + unsigned int w = 500, h = 500; + XSetWindowAttributes Attributes; + + int nAttrMask = CWBorderPixel + | CWBackPixmap + | CWColormap + | CWOverrideRedirect + | CWEventMask + ; + Attributes.border_pixel = 0; + Attributes.background_pixmap = None; + Attributes.colormap = GetDisplay()->GetColormap( m_nScreen ).GetXColormap(); + Attributes.override_redirect = False; + Attributes.event_mask = CLIENT_EVENTS; + + const SalVisual& rVis = GetDisplay()->GetVisual( m_nScreen ); + XLIB_Window aFrameParent = pParentData ? pParentData->aWindow : GetDisplay()->GetRootWindow( m_nScreen ); + XLIB_Window aClientLeader = None; + + if( bUseGeometry ) + { + x = maGeometry.nX; + y = maGeometry.nY; + w = maGeometry.nWidth; + h = maGeometry.nHeight; + } + + if( (nSalFrameStyle & SAL_FRAME_STYLE_FLOAT) && + ! (nSalFrameStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) + ) + { + if( nShowState_ == SHOWSTATE_UNKNOWN ) + { + w = 10; + h = 10; + } + Attributes.override_redirect = True; + } + else if( (nSalFrameStyle & SAL_FRAME_STYLE_SYSTEMCHILD ) ) + { + DBG_ASSERT( mpParent, "SAL_FRAME_STYLE_SYSTEMCHILD window without parent" ); + if( mpParent ) + { + aFrameParent = mpParent->mhWindow; + // FIXME: since with SAL_FRAME_STYLE_SYSTEMCHILD + // multiple X11SalFrame objects can have the same shell window + // dispatching events in saldisp.cxx is unclear (the first frame) + // wins. HTH this correctly is unclear yet + // for the time being, treat set the shell window to own window + // like for a normal frame + // mhShellWindow = mpParent->GetShellWindow(); + } + } + else if( pParentData ) + { + // plugin parent may be killed unexpectedly by + // plugging process; ignore XErrors in that case + GetDisplay()->setHaveSystemChildFrame(); + + nStyle_ |= SAL_FRAME_STYLE_PLUG; + Attributes.override_redirect = True; + if( pParentData->nSize >= sizeof(SystemParentData) ) + m_bXEmbed = pParentData->bXEmbedSupport; + + int x_ret, y_ret; + unsigned int bw, d; + XLIB_Window aRoot, aParent; + + XGetGeometry( GetXDisplay(), pParentData->aWindow, + &aRoot, &x_ret, &y_ret, &w, &h, &bw, &d ); + mhForeignParent = pParentData->aWindow; + + mhShellWindow = aParent = mhForeignParent; + XLIB_Window* pChildren; + unsigned int nChildren; + bool bBreak = false; + do + { + XQueryTree( GetDisplay()->GetDisplay(), mhShellWindow, + &aRoot, &aParent, &pChildren, &nChildren ); + XFree( pChildren ); + if( aParent != aRoot ) + mhShellWindow = aParent; + int nCount = 0; + Atom* pProps = XListProperties( GetDisplay()->GetDisplay(), + mhShellWindow, + &nCount ); + for( int i = 0; i < nCount && ! bBreak; ++i ) + bBreak = (pProps[i] == XA_WM_HINTS); + if( pProps ) + XFree( pProps ); + } while( aParent != aRoot && ! bBreak ); + + // check if this is really one of our own frames + // do not change the input mask in that case + const std::list< SalFrame* >& rFrames = GetDisplay()->getFrames(); + std::list< SalFrame* >::const_iterator it = rFrames.begin(); + while( it != rFrames.end() && mhForeignParent != static_cast(*it)->GetWindow() ) + ++it; + + if( it == rFrames.end() ) + { + XSelectInput( GetDisplay()->GetDisplay(), mhForeignParent, StructureNotifyMask | FocusChangeMask ); + XSelectInput( GetDisplay()->GetDisplay(), mhShellWindow, StructureNotifyMask | FocusChangeMask ); + } + } + else + { + if( ! bUseGeometry ) + { + Size aScreenSize( GetDisplay()->getDataForScreen( m_nScreen ).m_aSize ); + w = aScreenSize.Width(); + h = aScreenSize.Height(); + if( nSalFrameStyle & SAL_FRAME_STYLE_SIZEABLE && + nSalFrameStyle & SAL_FRAME_STYLE_MOVEABLE ) + { + // fill in holy default values brought to us by product management + if( aScreenSize.Width() >= 800 ) + w = 785; + if( aScreenSize.Width() >= 1024 ) + w = 920; + + if( aScreenSize.Height() >= 600 ) + h = 550; + if( aScreenSize.Height() >= 768 ) + h = 630; + if( aScreenSize.Height() >= 1024 ) + h = 875; + } + if( ! mpParent ) + { + // find the last document window (if any) + const X11SalFrame* pFrame = NULL; + const std::list< SalFrame* >& rFrames = GetDisplay()->getFrames(); + std::list< SalFrame* >::const_iterator it = rFrames.begin(); + while( it != rFrames.end() ) + { + pFrame = static_cast< const X11SalFrame* >(*it); + if( ! ( pFrame->mpParent + || pFrame->mbFullScreen + || ! ( pFrame->nStyle_ & SAL_FRAME_STYLE_SIZEABLE ) + || ! pFrame->GetUnmirroredGeometry().nWidth + || ! pFrame->GetUnmirroredGeometry().nHeight + ) + ) + break; + ++it; + } + + if( it != rFrames.end() ) + { + // set a document position and size + // the first frame gets positioned by the window manager + const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() ); + x = rGeom.nX; + y = rGeom.nY; + if( x+(int)w+40 <= (int)aScreenSize.Width() && + y+(int)h+40 <= (int)aScreenSize.Height() + ) + { + y += 40; + x += 40; + } + else + { + x = 10; // leave some space for decoration + y = 20; + } + } + else if( GetDisplay()->IsXinerama() ) + { + // place frame on same screen as mouse pointer + XLIB_Window aRoot, aChild; + int root_x = 0, root_y = 0, lx, ly; + unsigned int mask; + XQueryPointer( GetXDisplay(), + GetDisplay()->GetRootWindow( m_nScreen ), + &aRoot, &aChild, + &root_x, &root_y, &lx, &ly, &mask ); + const std::vector< Rectangle >& rScreens = GetDisplay()->GetXineramaScreens(); + for( unsigned int i = 0; i < rScreens.size(); i++ ) + if( rScreens[i].IsInside( Point( root_x, root_y ) ) ) + { + x = rScreens[i].Left(); + y = rScreens[i].Top(); + break; + } + } + } + } + Attributes.win_gravity = pDisplay_->getWMAdaptor()->getInitWinGravity(); + nAttrMask |= CWWinGravity; + if( mpParent ) + { + Attributes.save_under = True; + nAttrMask |= CWSaveUnder; + } + if( IsOverrideRedirect() ) + Attributes.override_redirect = True; + // default icon + if( (nStyle_ & SAL_FRAME_STYLE_INTRO) == 0 ) + { + bool bOk=false; + try + { + bOk=SelectAppIconPixmap( pDisplay_, m_nScreen, + mnIconID != 1 ? mnIconID : + (mpParent ? mpParent->mnIconID : 1), 32, + Hints.icon_pixmap, Hints.icon_mask ); + } + catch( com::sun::star::uno::Exception& ) + { + // can happen - no ucb during early startup + } + if( bOk ) + { + Hints.flags |= IconPixmapHint; + if( Hints.icon_mask ) + Hints.flags |= IconMaskHint; + } + } + + // find the top level frame of the transience hierarchy + X11SalFrame* pFrame = this; + while( pFrame->mpParent ) + pFrame = pFrame->mpParent; + if( (pFrame->nStyle_ & SAL_FRAME_STYLE_PLUG ) ) + { + // if the top level window is a plugin window, + // then we should place us in the same window group as + // the parent application (or none if there is no window group + // hint in the parent). + if( pFrame->GetShellWindow() ) + { + XWMHints* pWMHints = XGetWMHints( pDisplay_->GetDisplay(), + pFrame->GetShellWindow() ); + if( pWMHints ) + { + if( (pWMHints->flags & WindowGroupHint) ) + { + Hints.flags |= WindowGroupHint; + Hints.window_group = pWMHints->window_group; + } + XFree( pWMHints ); + } + } + } + else + { + Hints.flags |= WindowGroupHint; + Hints.window_group = pFrame->GetShellWindow(); + // note: for a normal document window this will produce None + // as the window is not yet created and the shell window is + // initialized to None. This must be corrected after window creation. + aClientLeader = GetDisplay()->GetDrawable( m_nScreen ); + } + } + + nShowState_ = SHOWSTATE_UNKNOWN; + bViewable_ = TRUE; + bMapped_ = FALSE; + nVisibility_ = VisibilityFullyObscured; + mhWindow = XCreateWindow( GetXDisplay(), + aFrameParent, + x, y, + w, h, + 0, + rVis.GetDepth(), + InputOutput, + rVis.GetVisual(), + nAttrMask, + &Attributes ); + // FIXME: see above: fake shell window for now to own window + if( /*! IsSysChildWindow() &&*/ pParentData == NULL ) + { + mhShellWindow = mhWindow; + } + + // correct window group if necessary + if( (Hints.flags & WindowGroupHint) == WindowGroupHint ) + { + if( Hints.window_group == None ) + Hints.window_group = GetShellWindow(); + } + + maGeometry.nX = x; + maGeometry.nY = y; + maGeometry.nWidth = w; + maGeometry.nHeight = h; + updateScreenNumber(); + + XSync( GetXDisplay(), False ); + setXEmbedInfo(); + + XLIB_Time nUserTime = (nStyle_ & (SAL_FRAME_STYLE_OWNERDRAWDECORATION | SAL_FRAME_STYLE_TOOLWINDOW) ) == 0 ? + pDisplay_->GetLastUserEventTime() : 0; + pDisplay_->getWMAdaptor()->setUserTime( this, nUserTime ); + + if( ! pParentData && ! IsChildWindow() && ! Attributes.override_redirect ) + { + XSetWMHints( GetXDisplay(), mhWindow, &Hints ); + // WM Protocols && internals + Atom a[4]; + int n = 0; + a[n++] = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::WM_DELETE_WINDOW ); + if( pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::NET_WM_PING ) ) + a[n++] = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::NET_WM_PING ); + if( ! s_pSaveYourselfFrame && ! mpParent) + { + // at all times have only one frame with SaveYourself + a[n++] = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::WM_SAVE_YOURSELF ); + s_pSaveYourselfFrame = this; + } + if( (nSalFrameStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) + a[n++] = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::WM_TAKE_FOCUS ); + XSetWMProtocols( GetXDisplay(), GetShellWindow(), a, n ); + + XClassHint* pClass = XAllocClassHint(); + pClass->res_name = const_cast(X11SalData::getFrameResName()); + pClass->res_class = const_cast(X11SalData::getFrameClassName()); + XSetClassHint( GetXDisplay(), GetShellWindow(), pClass ); + XFree( pClass ); + + XSizeHints* pHints = XAllocSizeHints(); + pHints->flags = PWinGravity | PPosition; + pHints->win_gravity = GetDisplay()->getWMAdaptor()->getPositionWinGravity(); + pHints->x = 0; + pHints->y = 0; + if( mbFullScreen ) + { + pHints->flags |= PMaxSize | PMinSize; + pHints->max_width = w+100; + pHints->max_height = h+100; + pHints->min_width = w; + pHints->min_height = h; + } + XSetWMNormalHints( GetXDisplay(), + GetShellWindow(), + pHints ); + XFree (pHints); + + // set PID and WM_CLIENT_MACHINE + pDisplay_->getWMAdaptor()->setClientMachine( this ); + pDisplay_->getWMAdaptor()->setPID( this ); + + // set client leader + if( aClientLeader ) + { + XChangeProperty( GetXDisplay(), + mhWindow, + pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::WM_CLIENT_LEADER), + XA_WINDOW, + 32, + PropModeReplace, + (unsigned char*)&aClientLeader, + 1 + ); + } +#define DECOFLAGS (SAL_FRAME_STYLE_MOVEABLE | SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_CLOSEABLE) + int nDecoFlags = WMAdaptor::decoration_All; + if( (nStyle_ & SAL_FRAME_STYLE_PARTIAL_FULLSCREEN) || + (nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION) + ) + nDecoFlags = 0; + else if( (nStyle_ & DECOFLAGS ) != DECOFLAGS || (nStyle_ & SAL_FRAME_STYLE_TOOLWINDOW) ) + { + if( nStyle_ & DECOFLAGS ) + // if any decoration, then show a border + nDecoFlags = WMAdaptor::decoration_Border; + else + nDecoFlags = 0; + + if( ! mpParent && (nStyle_ & DECOFLAGS) ) + // don't add a min button if window should be decorationless + nDecoFlags |= WMAdaptor::decoration_MinimizeBtn; + if( nStyle_ & SAL_FRAME_STYLE_CLOSEABLE ) + nDecoFlags |= WMAdaptor::decoration_CloseBtn; + if( nStyle_ & SAL_FRAME_STYLE_SIZEABLE ) + { + nDecoFlags |= WMAdaptor::decoration_Resize; + if( ! (nStyle_ & SAL_FRAME_STYLE_TOOLWINDOW) ) + nDecoFlags |= WMAdaptor::decoration_MaximizeBtn; + } + if( nStyle_ & SAL_FRAME_STYLE_MOVEABLE ) + nDecoFlags |= WMAdaptor::decoration_Title; + } + + WMAdaptor::WMWindowType eType = WMAdaptor::windowType_Normal; + if( nStyle_ & SAL_FRAME_STYLE_INTRO ) + eType = WMAdaptor::windowType_Splash; + if( (nStyle_ & SAL_FRAME_STYLE_DIALOG) && hPresentationWindow == None ) + eType = WMAdaptor::windowType_ModelessDialogue; + if( nStyle_ & SAL_FRAME_STYLE_TOOLWINDOW ) + eType = WMAdaptor::windowType_Utility; + if( nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION ) + eType = WMAdaptor::windowType_Toolbar; + if( (nStyle_ & SAL_FRAME_STYLE_PARTIAL_FULLSCREEN) + && GetDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() ) + eType = WMAdaptor::windowType_Dock; + + GetDisplay()->getWMAdaptor()-> + setFrameTypeAndDecoration( this, + eType, + nDecoFlags, + hPresentationWindow ? NULL : mpParent ); + + if( (nStyle_ & (SAL_FRAME_STYLE_DEFAULT | + SAL_FRAME_STYLE_OWNERDRAWDECORATION| + SAL_FRAME_STYLE_FLOAT | + SAL_FRAME_STYLE_INTRO | + SAL_FRAME_STYLE_PARTIAL_FULLSCREEN) ) + == SAL_FRAME_STYLE_DEFAULT ) + pDisplay_->getWMAdaptor()->maximizeFrame( this, true, true ); + } + + m_nWorkArea = GetDisplay()->getWMAdaptor()->getCurrentWorkArea(); + + // Pointer + SetPointer( POINTER_ARROW ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +X11SalFrame::X11SalFrame( SalFrame *pParent, ULONG nSalFrameStyle, SystemParentData* pSystemParent ) +{ + X11SalData* pSalData = GetX11SalData(); + + // initialize frame geometry + memset( &maGeometry, 0, sizeof(maGeometry) ); + + mpParent = static_cast< X11SalFrame* >( pParent ); + + mbTransientForRoot = false; + + pDisplay_ = pSalData->GetDisplay(); + // insert frame in framelist + pDisplay_->registerFrame( this ); + + mhWindow = None; + mhShellWindow = None; + mhStackingWindow = None; + mhForeignParent = None; + mhBackgroundPixmap = None; + m_bSetFocusOnMap = false; + + pGraphics_ = NULL; + pFreeGraphics_ = NULL; + + hCursor_ = None; + nCaptured_ = 0; + + nReleaseTime_ = 0; + nKeyCode_ = 0; + nKeyState_ = 0; + nCompose_ = -1; + mbKeyMenu = false; + mbSendExtKeyModChange = false; + mnExtKeyMod = 0; + + nShowState_ = SHOWSTATE_UNKNOWN; + nWidth_ = 0; + nHeight_ = 0; + nStyle_ = 0; + mnExtStyle = 0; + bAlwaysOnTop_ = FALSE; + + // set bViewable_ to TRUE: hack GetClientSize to report something + // different to 0/0 before first map + bViewable_ = TRUE; + bMapped_ = FALSE; + bDefaultPosition_ = TRUE; + nVisibility_ = VisibilityFullyObscured; + m_nWorkArea = 0; + mbInShow = FALSE; + m_bXEmbed = false; + + nScreenSaversTimeout_ = 0; + + mpInputContext = NULL; + mbInputFocus = False; + + maAlwaysOnTopRaiseTimer.SetTimeoutHdl( LINK( this, X11SalFrame, HandleAlwaysOnTopRaise ) ); + maAlwaysOnTopRaiseTimer.SetTimeout( 100 ); + + meWindowType = WMAdaptor::windowType_Normal; + mnDecorationFlags = WMAdaptor::decoration_All; + mbMaximizedVert = false; + mbMaximizedHorz = false; + mbShaded = false; + mbFullScreen = false; + + mnIconID = 1; // ICON_DEFAULT + + m_pClipRectangles = NULL; + m_nCurClipRect = 0; + m_nMaxClipRect = 0; + + if( mpParent ) + mpParent->maChildren.push_back( this ); + + Init( nSalFrameStyle, GetDisplay()->GetDefaultScreenNumber(), pSystemParent ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +void X11SalFrame::passOnSaveYourSelf() +{ + if( this == s_pSaveYourselfFrame ) + { + // pass on SaveYourself + const X11SalFrame* pFrame = NULL; + const std::list< SalFrame* >& rFrames = GetDisplay()->getFrames(); + std::list< SalFrame* >::const_iterator it = rFrames.begin(); + while( it != rFrames.end() ) + { + pFrame = static_cast< const X11SalFrame* >(*it); + if( ! ( IsChildWindow() || pFrame->mpParent ) + && pFrame != s_pSaveYourselfFrame ) + break; + ++it; + } + + s_pSaveYourselfFrame = (it != rFrames.end() ) ? const_cast(pFrame) : NULL; + if( s_pSaveYourselfFrame ) + { + Atom a[4]; + int n = 0; + a[n++] = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::WM_DELETE_WINDOW ); + a[n++] = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::WM_SAVE_YOURSELF ); + if( pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::NET_WM_PING ) ) + a[n++] = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::NET_WM_PING ); + XSetWMProtocols( GetXDisplay(), s_pSaveYourselfFrame->GetShellWindow(), a, n ); + } + } +} + +X11SalFrame::~X11SalFrame() +{ + notifyDelete(); + + if( m_pClipRectangles ) + { + delete [] m_pClipRectangles; + m_pClipRectangles = NULL; + m_nCurClipRect = m_nMaxClipRect = 0; + } + + if( mhBackgroundPixmap ) + { + XSetWindowBackgroundPixmap( GetXDisplay(), GetWindow(), None ); + XFreePixmap( GetXDisplay(), mhBackgroundPixmap ); + } + + if( mhStackingWindow ) + aPresentationReparentList.remove( mhStackingWindow ); + + // remove from parent's list + if( mpParent ) + mpParent->maChildren.remove( this ); + + // deregister on SalDisplay + pDisplay_->deregisterFrame( this ); + + // unselect all events, some may be still in the queue anyway + if( ! IsSysChildWindow() ) + XSelectInput( GetXDisplay(), GetShellWindow(), 0 ); + XSelectInput( GetXDisplay(), GetWindow(), 0 ); + + ShowFullScreen( FALSE, 0 ); + + if( bMapped_ ) + Show( FALSE ); + + if( mpInputContext ) + { + mpInputContext->UnsetICFocus( this ); + mpInputContext->Unmap( this ); + delete mpInputContext; + } + + if( GetWindow() == hPresentationWindow ) + { + hPresentationWindow = None; + doReparentPresentationDialogues( GetDisplay() ); + } + + if( pGraphics_ ) + { + pGraphics_->DeInit(); + delete pGraphics_; + } + + if( pFreeGraphics_ ) + { + pFreeGraphics_->DeInit(); + delete pFreeGraphics_; + } + + + XDestroyWindow( GetXDisplay(), mhWindow ); + + /* + * check if there is only the status frame left + * if so, free it + */ + if( ! GetDisplay()->getFrames().empty() && I18NStatus::exists() ) + { + SalFrame* pStatusFrame = I18NStatus::get().getStatusFrame(); + std::list< SalFrame* >::const_iterator sit = GetDisplay()->getFrames().begin(); + if( pStatusFrame + && *sit == pStatusFrame + && ++sit == GetDisplay()->getFrames().end() ) + vcl::I18NStatus::free(); + } + + passOnSaveYourSelf(); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +void X11SalFrame::SetExtendedFrameStyle( SalExtStyle nStyle ) +{ + if( nStyle != mnExtStyle && ! IsChildWindow() ) + { + mnExtStyle = nStyle; + + XClassHint* pClass = XAllocClassHint(); + rtl::OString aResHint = X11SalData::getFrameResName( mnExtStyle ); + pClass->res_name = const_cast(aResHint.getStr()); + pClass->res_class = const_cast(X11SalData::getFrameClassName()); + XSetClassHint( GetXDisplay(), GetShellWindow(), pClass ); + XFree( pClass ); + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +void X11SalFrame::SetBackgroundBitmap( SalBitmap* pBitmap ) +{ + if( mhBackgroundPixmap ) + { + XSetWindowBackgroundPixmap( GetXDisplay(), GetWindow(), None ); + XFreePixmap( GetXDisplay(), mhBackgroundPixmap ); + mhBackgroundPixmap = None; + } + if( pBitmap ) + { + X11SalBitmap* pBM = static_cast(pBitmap); + Size aSize = pBM->GetSize(); + if( aSize.Width() && aSize.Height() ) + { + mhBackgroundPixmap = + XCreatePixmap( GetXDisplay(), + GetWindow(), + aSize.Width(), + aSize.Height(), + GetDisplay()->GetVisual( m_nScreen ).GetDepth() ); + if( mhBackgroundPixmap ) + { + SalTwoRect aTwoRect; + aTwoRect.mnSrcX = aTwoRect.mnSrcY = aTwoRect.mnDestX = aTwoRect.mnDestY = 0; + aTwoRect.mnSrcWidth = aTwoRect.mnDestWidth = aSize.Width(); + aTwoRect.mnSrcHeight = aTwoRect.mnDestHeight = aSize.Height(); + pBM->ImplDraw( mhBackgroundPixmap, + m_nScreen, + GetDisplay()->GetVisual( m_nScreen ).GetDepth(), + aTwoRect, GetDisplay()->GetCopyGC( m_nScreen ) ); + XSetWindowBackgroundPixmap( GetXDisplay(), GetWindow(), mhBackgroundPixmap ); + } + } + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +const SystemChildData* X11SalFrame::GetSystemData() const +{ + X11SalFrame *pFrame = const_cast(this); + pFrame->maSystemChildData.nSize = sizeof( SystemChildData ); + pFrame->maSystemChildData.pDisplay = GetXDisplay(); + pFrame->maSystemChildData.aWindow = pFrame->GetWindow(); + pFrame->maSystemChildData.pSalFrame = pFrame; + pFrame->maSystemChildData.pWidget = NULL; + pFrame->maSystemChildData.pVisual = GetDisplay()->GetVisual( m_nScreen ).GetVisual(); + pFrame->maSystemChildData.nScreen = m_nScreen; + pFrame->maSystemChildData.nDepth = GetDisplay()->GetVisual( m_nScreen ).GetDepth(); + pFrame->maSystemChildData.aColormap = GetDisplay()->GetColormap( m_nScreen ).GetXColormap(); + pFrame->maSystemChildData.pAppContext = NULL; + pFrame->maSystemChildData.aShellWindow = pFrame->GetShellWindow(); + pFrame->maSystemChildData.pShellWidget = NULL; + return &maSystemChildData; +} + +SalGraphics *X11SalFrame::GetGraphics() +{ + if( pGraphics_ ) + return NULL; + + if( pFreeGraphics_ ) + { + pGraphics_ = pFreeGraphics_; + pFreeGraphics_ = NULL; + } + else + { + pGraphics_ = new X11SalGraphics(); + pGraphics_->Init( this, GetWindow(), m_nScreen ); + } + + return pGraphics_; +} + +void X11SalFrame::ReleaseGraphics( SalGraphics *pGraphics ) +{ + DBG_ASSERT( pGraphics == pGraphics_, "SalFrame::ReleaseGraphics pGraphics!=pGraphics_" ); + + if( pGraphics != pGraphics_ ) + return; + + pFreeGraphics_ = pGraphics_; + pGraphics_ = NULL; +} + +void X11SalFrame::updateGraphics( bool bClear ) +{ + Drawable aDrawable = bClear ? None : GetWindow(); + if( pGraphics_ ) + pGraphics_->SetDrawable( aDrawable, m_nScreen ); + if( pFreeGraphics_ ) + pFreeGraphics_->SetDrawable( aDrawable, m_nScreen ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +void X11SalFrame::Enable( BOOL /*bEnable*/ ) +{ + // NYI: enable/disable frame +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +void X11SalFrame::SetIcon( USHORT nIcon ) +{ + if ( ! IsChildWindow() ) + { + // 0 == default icon -> #1 + if ( nIcon == 0 ) + nIcon = 1; + + mnIconID = nIcon; + + XIconSize *pIconSize = NULL; + int nSizes = 0; + int iconSize = 32; + if ( XGetIconSizes( GetXDisplay(), GetDisplay()->GetRootWindow( m_nScreen ), &pIconSize, &nSizes ) ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf(stderr, "X11SalFrame::SetIcon(): found %d IconSizes:\n", nSizes); +#endif + + const int ourLargestIconSize = 48; + bool bFoundIconSize = false; + + int i; + for( i=0; i twice of our + // largest available icon) reported by XGetIconSizes. + if( pIconSize[i].max_width > iconSize + && pIconSize[i].max_width <= 2*ourLargestIconSize ) + { + iconSize = pIconSize[i].max_width; + bFoundIconSize = true; + } + iconSize = pIconSize[i].max_width; + +#if OSL_DEBUG_LEVEL > 1 + fprintf(stderr, "min: %d, %d\nmax: %d, %d\ninc: %d, %d\n\n", + pIconSize[i].min_width, pIconSize[i].min_height, + pIconSize[i].max_width, pIconSize[i].max_height, + pIconSize[i].width_inc, pIconSize[i].height_inc); +#endif + } + + if ( !bFoundIconSize ) + { + // Unless someone has fixed olwm/olvwm, we have rejected + // the max icon size from |XGetIconSizes()|. Provide a + // better icon size default value, in case our window manager + // is olwm/olvwm. + const String& rWM( pDisplay_->getWMAdaptor()->getWindowManagerName() ); + + if ( rWM.EqualsAscii( "Olwm" ) ) + iconSize = 48; + } + + XFree( pIconSize ); + } + else + { + const String& rWM( pDisplay_->getWMAdaptor()->getWindowManagerName() ); + if( rWM.EqualsAscii( "KWin" ) ) // assume KDE is running + iconSize = 48; + static bool bGnomeIconSize = false; + static bool bGnomeChecked = false; + if( ! bGnomeChecked ) + { + bGnomeChecked=true; + int nCount = 0; + Atom* pProps = XListProperties( GetXDisplay(), + GetDisplay()->GetRootWindow( m_nScreen ), + &nCount ); + for( int i = 0; i < nCount && !bGnomeIconSize; i++ ) + { + char* pName = XGetAtomName( GetXDisplay(), pProps[i] ); + if( !strcmp( pName, "GNOME_PANEL_DESKTOP_AREA" ) ) + bGnomeIconSize = true; + if( pName ) + XFree( pName ); + } + if( pProps ) + XFree( pProps ); + } + if( bGnomeIconSize ) + iconSize = 48; + } + + XWMHints Hints; + Hints.flags = 0; + XWMHints *pHints = XGetWMHints( GetXDisplay(), GetShellWindow() ); + if( pHints ) + { + memcpy(&Hints, pHints, sizeof( XWMHints )); + XFree( pHints ); + } + pHints = &Hints; + + BOOL bOk = SelectAppIconPixmap( GetDisplay(), m_nScreen, + nIcon, iconSize, + pHints->icon_pixmap, pHints->icon_mask ); + if ( !bOk ) + { + // load default icon (0) + bOk = SelectAppIconPixmap( GetDisplay(), m_nScreen, + 0, iconSize, + pHints->icon_pixmap, pHints->icon_mask ); + } + if( bOk ) + { + pHints->flags |= IconPixmapHint; + if( pHints->icon_mask ) + pHints->flags |= IconMaskHint; + + XSetWMHints( GetXDisplay(), GetShellWindow(), pHints ); + } + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +void X11SalFrame::SetMaxClientSize( long nWidth, long nHeight ) +{ + if( ! IsChildWindow() ) + { + if( GetShellWindow() && (nStyle_ & (SAL_FRAME_STYLE_FLOAT|SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) != SAL_FRAME_STYLE_FLOAT ) + { + XSizeHints* pHints = XAllocSizeHints(); + long nSupplied = 0; + XGetWMNormalHints( GetXDisplay(), + GetShellWindow(), + pHints, + &nSupplied + ); + pHints->max_width = nWidth; + pHints->max_height = nHeight; + pHints->flags |= PMaxSize; + XSetWMNormalHints( GetXDisplay(), + GetShellWindow(), + pHints ); + XFree( pHints ); + } + } +} + +void X11SalFrame::SetMinClientSize( long nWidth, long nHeight ) +{ + if( ! IsChildWindow() ) + { + if( GetShellWindow() && (nStyle_ & (SAL_FRAME_STYLE_FLOAT|SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) != SAL_FRAME_STYLE_FLOAT ) + { + XSizeHints* pHints = XAllocSizeHints(); + long nSupplied = 0; + XGetWMNormalHints( GetXDisplay(), + GetShellWindow(), + pHints, + &nSupplied + ); + pHints->min_width = nWidth; + pHints->min_height = nHeight; + pHints->flags |= PMinSize; + XSetWMNormalHints( GetXDisplay(), + GetShellWindow(), + pHints ); + XFree( pHints ); + } + } +} + +// Show + Pos (x,y,z) + Size (width,height) +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate ) +{ + if( ( bVisible && bMapped_ ) + || ( !bVisible && !bMapped_ ) ) + return; + + // HACK: this is a workaround for (at least) kwin + // even though transient frames should be kept above their parent + // this does not necessarily hold true for DOCK type windows + // so artificially set ABOVE and remove it again on hide + if( mpParent && (mpParent->nStyle_ & SAL_FRAME_STYLE_PARTIAL_FULLSCREEN ) && pDisplay_->getWMAdaptor()->isLegacyPartialFullscreen()) + pDisplay_->getWMAdaptor()->enableAlwaysOnTop( this, bVisible ); + + bMapped_ = bVisible; + bViewable_ = bVisible; + setXEmbedInfo(); + if( bVisible ) + { + SessionManagerClient::open(); // will simply return after the first time + + mbInShow = TRUE; + if( ! (nStyle_ & SAL_FRAME_STYLE_INTRO) ) + { + // hide all INTRO frames + const std::list< SalFrame* >& rFrames = GetDisplay()->getFrames(); + for( std::list< SalFrame* >::const_iterator it = rFrames.begin(); it != rFrames.end(); ++it ) + { + const X11SalFrame* pFrame = static_cast< const X11SalFrame* >(*it); + // look for intro bit map; if present, hide it + if( pFrame->nStyle_ & SAL_FRAME_STYLE_INTRO ) + { + if( pFrame->bMapped_ ) + const_cast(pFrame)->Show( FALSE ); + } + } + } + + // update NET_WM_STATE which may have been deleted due to earlier Show(FALSE) + if( nShowState_ == SHOWSTATE_HIDDEN ) + GetDisplay()->getWMAdaptor()->frameIsMapping( this ); + + /* + * #95097# + * Actually this is rather exotic and currently happens only in conjunction + * with the basic dialogue editor, + * which shows a frame and instantly hides it again. After that the + * editor window is shown and the WM takes this as an opportunity + * to show our hidden transient frame also. So Show( FALSE ) must + * withdraw the frame AND delete the WM_TRANSIENT_FOR property. + * In case the frame is shown again, the transient hint must be restored here. + */ + if( ! IsChildWindow() + && ! IsOverrideRedirect() + && ! IsFloatGrabWindow() + && mpParent + ) + { + GetDisplay()->getWMAdaptor()->changeReferenceFrame( this, mpParent ); + } + + // #i45160# switch to desktop where a dialog with parent will appear + if( mpParent && mpParent->m_nWorkArea != m_nWorkArea ) + GetDisplay()->getWMAdaptor()->switchToWorkArea( mpParent->m_nWorkArea ); + + if( IsFloatGrabWindow() && + mpParent && + nVisibleFloats == 0 && + ! GetDisplay()->GetCaptureFrame() ) + { + /* #i39420# + * outsmart KWin's "focus strictly under mouse" mode + * which insists on taking the focus from the document + * to the new float. Grab focus to parent frame BEFORE + * showing the float (cannot grab it to the float + * before show). + */ + XGrabPointer( GetXDisplay(), + mpParent->GetWindow(), + True, + PointerMotionMask | ButtonPressMask | ButtonReleaseMask, + GrabModeAsync, + GrabModeAsync, + None, + mpParent ? mpParent->GetCursor() : None, + CurrentTime + ); + } + + XLIB_Time nUserTime = 0; + if( ! bNoActivate && (nStyle_ & (SAL_FRAME_STYLE_OWNERDRAWDECORATION)) == 0 ) + nUserTime = pDisplay_->GetLastUserEventTime( true ); + GetDisplay()->getWMAdaptor()->setUserTime( this, nUserTime ); + if( ! bNoActivate && (nStyle_ & SAL_FRAME_STYLE_TOOLWINDOW) ) + m_bSetFocusOnMap = true; + + // actually map the window + if( m_bXEmbed ) + askForXEmbedFocus( 0 ); + else + { + if( GetWindow() != GetShellWindow() && ! IsSysChildWindow() ) + { + if( IsChildWindow() ) + XMapWindow( GetXDisplay(), GetShellWindow() ); + XSelectInput( GetXDisplay(), GetShellWindow(), CLIENT_EVENTS ); + } + if( nStyle_ & SAL_FRAME_STYLE_FLOAT ) + XMapRaised( GetXDisplay(), GetWindow() ); + else + XMapWindow( GetXDisplay(), GetWindow() ); + } + XSelectInput( GetXDisplay(), GetWindow(), CLIENT_EVENTS ); + + if( maGeometry.nWidth > 0 + && maGeometry.nHeight > 0 + && ( nWidth_ != (int)maGeometry.nWidth + || nHeight_ != (int)maGeometry.nHeight ) ) + { + nWidth_ = maGeometry.nWidth; + nHeight_ = maGeometry.nHeight; + } + + XSync( GetXDisplay(), False ); + + if( IsFloatGrabWindow() ) + { + /* + * #95453# + * Sawfish and twm can be switched to enter-exit focus behaviour. In this case + * we must grab the pointer else the dumb WM will put the focus to the + * override-redirect float window. The application window will be deactivated + * which causes that the floats are destroyed, so the user can never click on + * a menu because it vanishes as soon as he enters it. + */ + nVisibleFloats++; + if( nVisibleFloats == 1 && ! GetDisplay()->GetCaptureFrame() ) + { + /* #i39420# now move grab to the new float window */ + XGrabPointer( GetXDisplay(), + GetWindow(), + True, + PointerMotionMask | ButtonPressMask | ButtonReleaseMask, + GrabModeAsync, + GrabModeAsync, + None, + mpParent ? mpParent->GetCursor() : None, + CurrentTime + ); + } + } + CallCallback( SALEVENT_RESIZE, NULL ); + + /* + * sometimes a message box/dialogue is brought up when a frame is not mapped + * the corresponding TRANSIENT_FOR hint is then set to the root window + * so that the dialogue shows in all cases. Correct it here if the + * frame is shown afterwards. + */ + if( ! IsChildWindow() + && ! IsOverrideRedirect() + && ! IsFloatGrabWindow() + ) + { + for( std::list< X11SalFrame* >::const_iterator it = maChildren.begin(); + it != maChildren.end(); ++it ) + { + if( (*it)->mbTransientForRoot ) + GetDisplay()->getWMAdaptor()->changeReferenceFrame( *it, this ); + } + } + /* + * leave SHOWSTATE_UNKNOWN as this indicates first mapping + * and is only reset int HandleSizeEvent + */ + if( nShowState_ != SHOWSTATE_UNKNOWN ) + nShowState_ = SHOWSTATE_NORMAL; + + /* + * #98107# plugged windows don't necessarily get the + * focus on show because the parent may already be mapped + * and have the focus. So try to set the focus + * to the child on Show(TRUE) + */ + if( (nStyle_ & SAL_FRAME_STYLE_PLUG) && ! m_bXEmbed ) + XSetInputFocus( GetXDisplay(), + GetWindow(), + RevertToParent, + CurrentTime ); + + if( mpParent ) + { + // push this frame so it will be in front of its siblings + // only necessary for insane transient behaviour of Dtwm/olwm + mpParent->maChildren.remove( this ); + mpParent->maChildren.push_front(this); + } + } + else + { + if( getInputContext() ) + getInputContext()->Unmap( this ); + + if( ! IsChildWindow() ) + { + /* FIXME: Is deleting the property really necessary ? It hurts + * owner drawn windows at least. + */ + if( mpParent && ! (nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) + XDeleteProperty( GetXDisplay(), GetShellWindow(), GetDisplay()->getWMAdaptor()->getAtom( WMAdaptor::WM_TRANSIENT_FOR ) ); + XWithdrawWindow( GetXDisplay(), GetShellWindow(), m_nScreen ); + } + else if( ! m_bXEmbed ) + XUnmapWindow( GetXDisplay(), GetWindow() ); + + nShowState_ = SHOWSTATE_HIDDEN; + if( IsFloatGrabWindow() && nVisibleFloats ) + { + nVisibleFloats--; + if( nVisibleFloats == 0 && ! GetDisplay()->GetCaptureFrame() ) + XUngrabPointer( GetXDisplay(), + CurrentTime ); + } + // flush here; there may be a very seldom race between + // the display connection used for clipboard and our connection + Flush(); + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalFrame::ToTop( USHORT nFlags ) +{ + if( ( nFlags & SAL_FRAME_TOTOP_RESTOREWHENMIN ) + && ! ( nStyle_ & SAL_FRAME_STYLE_FLOAT ) + && nShowState_ != SHOWSTATE_HIDDEN + && nShowState_ != SHOWSTATE_UNKNOWN + ) + { + GetDisplay()->getWMAdaptor()->frameIsMapping( this ); + if( GetWindow() != GetShellWindow() && ! IsSysChildWindow() ) + XMapWindow( GetXDisplay(), GetShellWindow() ); + XMapWindow( GetXDisplay(), GetWindow() ); + } + + XLIB_Window aToTopWindow = IsSysChildWindow() ? GetWindow() : GetShellWindow(); + if( ! (nFlags & SAL_FRAME_TOTOP_GRABFOCUS_ONLY) ) + { + XRaiseWindow( GetXDisplay(), aToTopWindow ); + if( ! GetDisplay()->getWMAdaptor()->isTransientBehaviourAsExpected() ) + for( std::list< X11SalFrame* >::const_iterator it = maChildren.begin(); + it != maChildren.end(); ++it ) + (*it)->ToTop( nFlags & ~SAL_FRAME_TOTOP_GRABFOCUS ); + } + + if( ( ( nFlags & SAL_FRAME_TOTOP_GRABFOCUS ) || ( nFlags & SAL_FRAME_TOTOP_GRABFOCUS_ONLY ) ) + && bMapped_ ) + { + if( m_bXEmbed ) + askForXEmbedFocus( 0 ); + else + XSetInputFocus( GetXDisplay(), aToTopWindow, RevertToParent, CurrentTime ); + } +} +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalFrame::GetWorkArea( Rectangle& rWorkArea ) +{ + rWorkArea = pDisplay_->getWMAdaptor()->getWorkArea( 0 ); +} +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalFrame::GetClientSize( long &rWidth, long &rHeight ) +{ + if( ! bViewable_ ) + { + rWidth = rHeight = 0; + return; + } + + rWidth = maGeometry.nWidth; + rHeight = maGeometry.nHeight; + + if( !rWidth || !rHeight ) + { + XWindowAttributes aAttrib; + + XGetWindowAttributes( GetXDisplay(), GetWindow(), &aAttrib ); + + maGeometry.nWidth = rWidth = aAttrib.width; + maGeometry.nHeight = rHeight = aAttrib.height; + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +void X11SalFrame::SetWindowGravity (int nGravity) const +{ + if( ! IsChildWindow() ) + { + XSizeHints* pHint = XAllocSizeHints(); + long nFlag; + + XGetWMNormalHints (GetXDisplay(), GetShellWindow(), pHint, &nFlag); + pHint->flags |= PWinGravity; + pHint->win_gravity = nGravity; + + XSetWMNormalHints (GetXDisplay(), GetShellWindow(), pHint); + XSync (GetXDisplay(), False); + + XFree (pHint); + } +} + +void X11SalFrame::Center( ) +{ + int nX, nY, nScreenWidth, nScreenHeight; + int nRealScreenWidth, nRealScreenHeight; + int nScreenX = 0, nScreenY = 0; + + const Size& aScreenSize = GetDisplay()->getDataForScreen( m_nScreen ).m_aSize; + nScreenWidth = aScreenSize.Width(); + nScreenHeight = aScreenSize.Height(); + nRealScreenWidth = nScreenWidth; + nRealScreenHeight = nScreenHeight; + + if( GetDisplay()->IsXinerama() ) + { + // get xinerama screen we are on + // if there is a parent, use its center for screen determination + // else use the pointer + XLIB_Window aRoot, aChild; + int root_x, root_y, x, y; + unsigned int mask; + if( mpParent ) + { + root_x = mpParent->maGeometry.nX + mpParent->maGeometry.nWidth/2; + root_y = mpParent->maGeometry.nY + mpParent->maGeometry.nHeight/2; + } + else + XQueryPointer( GetXDisplay(), + GetShellWindow(), + &aRoot, &aChild, + &root_x, &root_y, + &x, &y, + &mask ); + const std::vector< Rectangle >& rScreens = GetDisplay()->GetXineramaScreens(); + for( unsigned int i = 0; i < rScreens.size(); i++ ) + if( rScreens[i].IsInside( Point( root_x, root_y ) ) ) + { + nScreenX = rScreens[i].Left(); + nScreenY = rScreens[i].Top(); + nRealScreenWidth = rScreens[i].GetWidth(); + nRealScreenHeight = rScreens[i].GetHeight(); + break; + } + } + + if( mpParent ) + { + X11SalFrame* pFrame = mpParent; + while( pFrame->mpParent ) + pFrame = pFrame->mpParent; + if( pFrame->maGeometry.nWidth < 1 || pFrame->maGeometry.nHeight < 1 ) + { + Rectangle aRect; + pFrame->GetPosSize( aRect ); + pFrame->maGeometry.nX = aRect.Left(); + pFrame->maGeometry.nY = aRect.Top(); + pFrame->maGeometry.nWidth = aRect.GetWidth(); + pFrame->maGeometry.nHeight = aRect.GetHeight(); + } + + if( pFrame->nStyle_ & SAL_FRAME_STYLE_PLUG ) + { + XLIB_Window aRoot; + unsigned int bw, depth; + XGetGeometry( GetXDisplay(), + pFrame->GetShellWindow(), + &aRoot, + &nScreenX, &nScreenY, + (unsigned int*)&nScreenWidth, + (unsigned int*)&nScreenHeight, + &bw, &depth ); + } + else + { + nScreenX = pFrame->maGeometry.nX; + nScreenY = pFrame->maGeometry.nY; + nScreenWidth = pFrame->maGeometry.nWidth; + nScreenHeight = pFrame->maGeometry.nHeight; + } + } + + if( mpParent && mpParent->nShowState_ == SHOWSTATE_NORMAL ) + { + if( maGeometry.nWidth >= mpParent->maGeometry.nWidth && + maGeometry.nHeight >= mpParent->maGeometry.nHeight ) + { + nX = nScreenX + 40; + nY = nScreenY + 40; + } + else + { + // center the window relative to the top level frame + nX = (nScreenWidth - (int)maGeometry.nWidth ) / 2 + nScreenX; + nY = (nScreenHeight - (int)maGeometry.nHeight) / 2 + nScreenY; + } + } + else + { + // center the window relative to screen + nX = (nRealScreenWidth - (int)maGeometry.nWidth ) / 2 + nScreenX; + nY = (nRealScreenHeight - (int)maGeometry.nHeight) / 2 + nScreenY; + } + nX = nX < 0 ? 0 : nX; + nY = nY < 0 ? 0 : nY; + + bDefaultPosition_ = False; + if( mpParent ) + { + nX -= mpParent->maGeometry.nX; + nY -= mpParent->maGeometry.nY; + } + + Point aPoint(nX, nY); + SetPosSize( Rectangle( aPoint, Size( maGeometry.nWidth, maGeometry.nHeight ) ) ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalFrame::updateScreenNumber() +{ + if( GetDisplay()->IsXinerama() && GetDisplay()->GetXineramaScreens().size() > 1 ) + { + Point aPoint( maGeometry.nX, maGeometry.nY ); + const std::vector& rScreenRects( GetDisplay()->GetXineramaScreens() ); + size_t nScreens = rScreenRects.size(); + for( size_t i = 0; i < nScreens; i++ ) + { + if( rScreenRects[i].IsInside( aPoint ) ) + { + maGeometry.nScreenNumber = static_cast(i); + break; + } + } + } + else + maGeometry.nScreenNumber = static_cast(m_nScreen); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ) +{ + if( nStyle_ & SAL_FRAME_STYLE_PLUG ) + return; + + // relative positioning in X11SalFrame::SetPosSize + Rectangle aPosSize( Point( maGeometry.nX, maGeometry.nY ), Size( maGeometry.nWidth, maGeometry.nHeight ) ); + aPosSize.Justify(); + + if( ! ( nFlags & SAL_FRAME_POSSIZE_X ) ) + { + nX = aPosSize.Left(); + if( mpParent ) + nX -= mpParent->maGeometry.nX; + } + if( ! ( nFlags & SAL_FRAME_POSSIZE_Y ) ) + { + nY = aPosSize.Top(); + if( mpParent ) + nY -= mpParent->maGeometry.nY; + } + if( ! ( nFlags & SAL_FRAME_POSSIZE_WIDTH ) ) + nWidth = aPosSize.GetWidth(); + if( ! ( nFlags & SAL_FRAME_POSSIZE_HEIGHT ) ) + nHeight = aPosSize.GetHeight(); + + aPosSize = Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ); + + if( ! ( nFlags & ( SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y ) ) ) + { + if( bDefaultPosition_ ) + { + maGeometry.nWidth = aPosSize.GetWidth(); + maGeometry.nHeight = aPosSize.GetHeight(); + Center(); + } + else + SetSize( Size( nWidth, nHeight ) ); + } + else + SetPosSize( aPosSize ); + + bDefaultPosition_ = False; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalFrame::SetAlwaysOnTop( BOOL bOnTop ) +{ + if( ! IsOverrideRedirect() ) + { + bAlwaysOnTop_ = bOnTop; + pDisplay_->getWMAdaptor()->enableAlwaysOnTop( this, bOnTop ); + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +#define _FRAMESTATE_MASK_GEOMETRY \ + (SAL_FRAMESTATE_MASK_X | SAL_FRAMESTATE_MASK_Y | \ + SAL_FRAMESTATE_MASK_WIDTH | SAL_FRAMESTATE_MASK_HEIGHT) +#define _FRAMESTATE_MASK_MAXIMIZED_GEOMETRY \ + (SAL_FRAMESTATE_MASK_MAXIMIZED_X | SAL_FRAMESTATE_MASK_MAXIMIZED_Y | \ + SAL_FRAMESTATE_MASK_MAXIMIZED_WIDTH | SAL_FRAMESTATE_MASK_MAXIMIZED_HEIGHT) + +void X11SalFrame::SetWindowState( const SalFrameState *pState ) +{ + if (pState == NULL) + return; + + // Request for position or size change + if (pState->mnMask & _FRAMESTATE_MASK_GEOMETRY) + { + Rectangle aPosSize; + bool bDoAdjust = false; + + /* #i44325# + * if maximized, set restore size and guess maximized size from last time + * in state change below maximize window + */ + if( ! IsChildWindow() && + (pState->mnMask & SAL_FRAMESTATE_MASK_STATE) && + (pState->mnState & SAL_FRAMESTATE_MAXIMIZED) && + (pState->mnMask & _FRAMESTATE_MASK_GEOMETRY) == _FRAMESTATE_MASK_GEOMETRY && + (pState->mnMask & _FRAMESTATE_MASK_MAXIMIZED_GEOMETRY) == _FRAMESTATE_MASK_MAXIMIZED_GEOMETRY + ) + { + XSizeHints* pHints = XAllocSizeHints(); + long nSupplied = 0; + XGetWMNormalHints( GetXDisplay(), + GetShellWindow(), + pHints, + &nSupplied ); + pHints->flags |= PPosition | PWinGravity; + pHints->x = pState->mnX; + pHints->y = pState->mnY; + pHints->win_gravity = pDisplay_->getWMAdaptor()->getPositionWinGravity(); + XSetWMNormalHints( GetXDisplay(), + GetShellWindow(), + pHints ); + XFree( pHints ); + + XMoveResizeWindow( GetXDisplay(), GetShellWindow(), + pState->mnX, pState->mnY, + pState->mnWidth, pState->mnHeight ); + // guess maximized geometry from last time + maGeometry.nX = pState->mnMaximizedX; + maGeometry.nY = pState->mnMaximizedY; + maGeometry.nWidth = pState->mnMaximizedWidth; + maGeometry.nHeight = pState->mnMaximizedHeight; + updateScreenNumber(); + } + else + { + // initialize with current geometry + if ((pState->mnMask & _FRAMESTATE_MASK_GEOMETRY) != _FRAMESTATE_MASK_GEOMETRY) + GetPosSize (aPosSize); + + // change requested properties + if (pState->mnMask & SAL_FRAMESTATE_MASK_X) + { + aPosSize.setX (pState->mnX); + } + if (pState->mnMask & SAL_FRAMESTATE_MASK_Y) + { + aPosSize.setY (pState->mnY); + } + if (pState->mnMask & SAL_FRAMESTATE_MASK_WIDTH) + { + long nWidth = pState->mnWidth > 0 ? pState->mnWidth - 1 : 0; + aPosSize.setWidth (nWidth); + bDoAdjust = true; + } + if (pState->mnMask & SAL_FRAMESTATE_MASK_HEIGHT) + { + int nHeight = pState->mnHeight > 0 ? pState->mnHeight - 1 : 0; + aPosSize.setHeight (nHeight); + bDoAdjust = true; + } + + const Size& aScreenSize = pDisplay_->getDataForScreen( m_nScreen ).m_aSize; + const WMAdaptor *pWM = GetDisplay()->getWMAdaptor(); + + if( bDoAdjust && aPosSize.GetWidth() <= aScreenSize.Width() + && aPosSize.GetHeight() <= aScreenSize.Height() ) + { + SalFrameGeometry aGeom = maGeometry; + + if( ! (nStyle_ & ( SAL_FRAME_STYLE_FLOAT | SAL_FRAME_STYLE_PLUG ) ) && + mpParent && + aGeom.nLeftDecoration == 0 && + aGeom.nTopDecoration == 0 ) + { + aGeom = mpParent->maGeometry; + if( aGeom.nLeftDecoration == 0 && + aGeom.nTopDecoration == 0 ) + { + aGeom.nLeftDecoration = 5; + aGeom.nTopDecoration = 20; + aGeom.nRightDecoration = 5; + aGeom.nBottomDecoration = 5; + } + } + + // adjust position so that frame fits onto screen + if( aPosSize.Right()+(long)aGeom.nRightDecoration > aScreenSize.Width()-1 ) + aPosSize.Move( (long)aScreenSize.Width() - (long)aPosSize.Right() - (long)aGeom.nRightDecoration, 0 ); + if( aPosSize.Bottom()+(long)aGeom.nBottomDecoration > aScreenSize.Height()-1 ) + aPosSize.Move( 0, (long)aScreenSize.Height() - (long)aPosSize.Bottom() - (long)aGeom.nBottomDecoration ); + if( aPosSize.Left() < (long)aGeom.nLeftDecoration ) + aPosSize.Move( (long)aGeom.nLeftDecoration - (long)aPosSize.Left(), 0 ); + if( aPosSize.Top() < (long)aGeom.nTopDecoration ) + aPosSize.Move( 0, (long)aGeom.nTopDecoration - (long)aPosSize.Top() ); + } + + // resize with new args + if (pWM->supportsICCCMPos()) + { + if( mpParent ) + aPosSize.Move( -mpParent->maGeometry.nX, + -mpParent->maGeometry.nY ); + SetPosSize( aPosSize ); + bDefaultPosition_ = False; + } + else + SetPosSize( 0, 0, aPosSize.GetWidth(), aPosSize.GetHeight(), SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT ); + } + } + + // request for status change + if (pState->mnMask & SAL_FRAMESTATE_MASK_STATE) + { + if (pState->mnState & SAL_FRAMESTATE_MAXIMIZED) + { + nShowState_ = SHOWSTATE_NORMAL; + if( ! (pState->mnState & (SAL_FRAMESTATE_MAXIMIZED_HORZ|SAL_FRAMESTATE_MAXIMIZED_VERT) ) ) + Maximize(); + else + { + bool bHorz = (pState->mnState & SAL_FRAMESTATE_MAXIMIZED_HORZ) ? true : false; + bool bVert = (pState->mnState & SAL_FRAMESTATE_MAXIMIZED_VERT) ? true : false; + GetDisplay()->getWMAdaptor()->maximizeFrame( this, bHorz, bVert ); + } + maRestorePosSize.Left() = pState->mnX; + maRestorePosSize.Top() = pState->mnY; + maRestorePosSize.Right() = maRestorePosSize.Left() + pState->mnWidth; + maRestorePosSize.Right() = maRestorePosSize.Left() + pState->mnHeight; + } + else if( mbMaximizedHorz || mbMaximizedVert ) + GetDisplay()->getWMAdaptor()->maximizeFrame( this, false, false ); + + if (pState->mnState & SAL_FRAMESTATE_MINIMIZED) + { + if (nShowState_ == SHOWSTATE_UNKNOWN) + nShowState_ = SHOWSTATE_NORMAL; + Minimize(); + } + if (pState->mnState & SAL_FRAMESTATE_NORMAL) + { + if (nShowState_ != SHOWSTATE_NORMAL) + Restore(); + } + if (pState->mnState & SAL_FRAMESTATE_ROLLUP) + GetDisplay()->getWMAdaptor()->shade( this, true ); + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +BOOL X11SalFrame::GetWindowState( SalFrameState* pState ) +{ + if( SHOWSTATE_MINIMIZED == nShowState_ ) + pState->mnState = SAL_FRAMESTATE_MINIMIZED; + else + pState->mnState = SAL_FRAMESTATE_NORMAL; + + Rectangle aPosSize; + if( maRestorePosSize.IsEmpty() ) + GetPosSize( aPosSize ); + else + aPosSize = maRestorePosSize; + + if( mbMaximizedHorz ) + pState->mnState |= SAL_FRAMESTATE_MAXIMIZED_HORZ; + if( mbMaximizedVert ) + pState->mnState |= SAL_FRAMESTATE_MAXIMIZED_VERT; + if( mbShaded ) + pState->mnState |= SAL_FRAMESTATE_ROLLUP; + + pState->mnX = aPosSize.Left(); + pState->mnY = aPosSize.Top(); + pState->mnWidth = aPosSize.GetWidth(); + pState->mnHeight = aPosSize.GetHeight(); + + pState->mnMask = _FRAMESTATE_MASK_GEOMETRY | SAL_FRAMESTATE_MASK_STATE; + + + if (! maRestorePosSize.IsEmpty() ) + { + GetPosSize( aPosSize ); + pState->mnState |= SAL_FRAMESTATE_MAXIMIZED; + pState->mnMaximizedX = aPosSize.Left(); + pState->mnMaximizedY = aPosSize.Top(); + pState->mnMaximizedWidth = aPosSize.GetWidth(); + pState->mnMaximizedHeight = aPosSize.GetHeight(); + pState->mnMask |= _FRAMESTATE_MASK_MAXIMIZED_GEOMETRY; + } + + return TRUE; +} + +// ---------------------------------------------------------------------------- +// get a screenshot of the current frame including window manager decoration +SalBitmap* X11SalFrame::SnapShot() +{ + Display* pDisplay = GetXDisplay(); + + // make sure the frame has been reparented and all paint timer have been + // expired + do + { + XSync(pDisplay, False); + Application::Reschedule (); + } + while (XPending(pDisplay)); + TimeValue aVal; + aVal.Seconds = 0; + aVal.Nanosec = 50000000; + osl_waitThread( &aVal ); + do + { + XSync(pDisplay, False); + Application::Reschedule (); + } + while (XPending(pDisplay)); + + // get the most outer window, usually the window manager decoration + Drawable hWindow = None; + if (IsOverrideRedirect()) + hWindow = GetDrawable(); + else + if (hPresentationWindow != None) + hWindow = hPresentationWindow; + else + hWindow = GetStackingWindow(); + + // query the contents of the window + if (hWindow != None) + { + X11SalBitmap *pBmp = new X11SalBitmap; + if (pBmp->SnapShot (pDisplay, hWindow)) + return pBmp; + else + delete pBmp; + } + + return NULL; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +// native menu implementation - currently empty +void X11SalFrame::DrawMenuBar() +{ +} + +void X11SalFrame::SetMenu( SalMenu* ) +{ +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalFrame::GetPosSize( Rectangle &rPosSize ) +{ + if( maGeometry.nWidth < 1 || maGeometry.nHeight < 1 ) + { + const Size& aScreenSize = pDisplay_->getDataForScreen( m_nScreen ).m_aSize; + long w = aScreenSize.Width() - maGeometry.nLeftDecoration - maGeometry.nRightDecoration; + long h = aScreenSize.Height() - maGeometry.nTopDecoration - maGeometry.nBottomDecoration; + + rPosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ), Size( w, h ) ); + } + else + rPosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ), + Size( maGeometry.nWidth, maGeometry.nHeight ) ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalFrame::SetSize( const Size &rSize ) +{ + if( rSize.Width() > 0 && rSize.Height() > 0 ) + { + if( ! ( nStyle_ & SAL_FRAME_STYLE_SIZEABLE ) + && ! IsChildWindow() + && ( nStyle_ & (SAL_FRAME_STYLE_FLOAT|SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) != SAL_FRAME_STYLE_FLOAT ) + { + XSizeHints* pHints = XAllocSizeHints(); + long nSupplied = 0; + XGetWMNormalHints( GetXDisplay(), + GetShellWindow(), + pHints, + &nSupplied + ); + pHints->min_width = rSize.Width(); + pHints->min_height = rSize.Height(); + pHints->max_width = rSize.Width(); + pHints->max_height = rSize.Height(); + pHints->flags |= PMinSize | PMaxSize; + XSetWMNormalHints( GetXDisplay(), + GetShellWindow(), + pHints ); + XFree( pHints ); + } + XResizeWindow( GetXDisplay(), IsSysChildWindow() ? GetWindow() : GetShellWindow(), rSize.Width(), rSize.Height() ); + if( GetWindow() != GetShellWindow() ) + { + if( (nStyle_ & SAL_FRAME_STYLE_PLUG ) ) + XMoveResizeWindow( GetXDisplay(), GetWindow(), 0, 0, rSize.Width(), rSize.Height() ); + else + XResizeWindow( GetXDisplay(), GetWindow(), rSize.Width(), rSize.Height() ); + } + + maGeometry.nWidth = rSize.Width(); + maGeometry.nHeight = rSize.Height(); + + // allow the external status window to reposition + if (mbInputFocus && mpInputContext != NULL) + mpInputContext->SetICFocus ( this ); + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +void X11SalFrame::SetPosSize( const Rectangle &rPosSize ) +{ + XWindowChanges values; + values.x = rPosSize.Left(); + values.y = rPosSize.Top(); + values.width = rPosSize.GetWidth(); + values.height = rPosSize.GetHeight(); + + if( !values.width || !values.height ) + return; + + if( mpParent && ! IsSysChildWindow() ) + { + // --- RTL --- (mirror window pos) + if( Application::GetSettings().GetLayoutRTL() ) + values.x = mpParent->maGeometry.nWidth-values.width-1-values.x; + + XLIB_Window aChild; + // coordinates are relative to parent, so translate to root coordinates + XTranslateCoordinates( GetDisplay()->GetDisplay(), + mpParent->GetWindow(), + GetDisplay()->GetRootWindow( m_nScreen ), + values.x, values.y, + &values.x, &values.y, + & aChild ); + } + + bool bMoved = false; + bool bSized = false; + if( values.x != maGeometry.nX || values.y != maGeometry.nY ) + bMoved = true; + if( values.width != (int)maGeometry.nWidth || values.height != (int)maGeometry.nHeight ) + bSized = true; + + if( ! ( nStyle_ & ( SAL_FRAME_STYLE_PLUG | SAL_FRAME_STYLE_FLOAT ) ) + && !(pDisplay_->GetProperties() & PROPERTY_SUPPORT_WM_ClientPos) ) + { + values.x -= maGeometry.nLeftDecoration; + values.y -= maGeometry.nTopDecoration; + } + + // do net set WMNormalHints for .. + if( + // child windows + ! IsChildWindow() + // popups (menu, help window, etc.) + && (nStyle_ & (SAL_FRAME_STYLE_FLOAT|SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) != SAL_FRAME_STYLE_FLOAT + // shown, sizeable windows + && ( nShowState_ == SHOWSTATE_UNKNOWN || + nShowState_ == SHOWSTATE_HIDDEN || + ! ( nStyle_ & SAL_FRAME_STYLE_SIZEABLE ) + ) + ) + { + XSizeHints* pHints = XAllocSizeHints(); + long nSupplied = 0; + XGetWMNormalHints( GetXDisplay(), + GetShellWindow(), + pHints, + &nSupplied + ); + if( ! ( nStyle_ & SAL_FRAME_STYLE_SIZEABLE ) ) + { + pHints->min_width = rPosSize.GetWidth(); + pHints->min_height = rPosSize.GetHeight(); + pHints->max_width = rPosSize.GetWidth(); + pHints->max_height = rPosSize.GetHeight(); + pHints->flags |= PMinSize | PMaxSize; + } + if( nShowState_ == SHOWSTATE_UNKNOWN || nShowState_ == SHOWSTATE_HIDDEN ) + { + pHints->flags |= PPosition | PWinGravity; + pHints->x = values.x; + pHints->y = values.y; + pHints->win_gravity = pDisplay_->getWMAdaptor()->getPositionWinGravity(); + } + if( mbFullScreen ) + { + pHints->max_width = 10000; + pHints->max_height = 10000; + pHints->flags |= PMaxSize; + } + XSetWMNormalHints( GetXDisplay(), + GetShellWindow(), + pHints ); + XFree( pHints ); + } + + XMoveResizeWindow( GetXDisplay(), IsSysChildWindow() ? GetWindow() : GetShellWindow(), values.x, values.y, values.width, values.height ); + if( GetShellWindow() != GetWindow() ) + { + if( (nStyle_ & SAL_FRAME_STYLE_PLUG ) ) + XMoveResizeWindow( GetXDisplay(), GetWindow(), 0, 0, values.width, values.height ); + else + XMoveResizeWindow( GetXDisplay(), GetWindow(), values.x, values.y, values.width, values.height ); + } + + maGeometry.nX = values.x; + maGeometry.nY = values.y; + maGeometry.nWidth = values.width; + maGeometry.nHeight = values.height; + if( IsSysChildWindow() && mpParent ) + { + // translate back to root coordinates + maGeometry.nX += mpParent->maGeometry.nX; + maGeometry.nY += mpParent->maGeometry.nY; + } + + updateScreenNumber(); + if( bSized && ! bMoved ) + CallCallback( SALEVENT_RESIZE, NULL ); + else if( bMoved && ! bSized ) + CallCallback( SALEVENT_MOVE, NULL ); + else + CallCallback( SALEVENT_MOVERESIZE, NULL ); + + // allow the external status window to reposition + if (mbInputFocus && mpInputContext != NULL) + mpInputContext->SetICFocus ( this ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalFrame::Minimize() +{ + if( IsSysChildWindow() ) + return; + + if( SHOWSTATE_UNKNOWN == nShowState_ || SHOWSTATE_HIDDEN == nShowState_ ) + { + stderr0( "X11SalFrame::Minimize on withdrawn window\n" ); + return; + } + + if( XIconifyWindow( GetXDisplay(), + GetShellWindow(), + pDisplay_->GetDefaultScreenNumber() ) ) + nShowState_ = SHOWSTATE_MINIMIZED; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalFrame::Maximize() +{ + if( IsSysChildWindow() ) + return; + + if( SHOWSTATE_MINIMIZED == nShowState_ ) + { + GetDisplay()->getWMAdaptor()->frameIsMapping( this ); + XMapWindow( GetXDisplay(), GetShellWindow() ); + nShowState_ = SHOWSTATE_NORMAL; + } + + pDisplay_->getWMAdaptor()->maximizeFrame( this, true, true ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalFrame::Restore() +{ + if( IsSysChildWindow() ) + return; + + if( SHOWSTATE_UNKNOWN == nShowState_ || SHOWSTATE_HIDDEN == nShowState_ ) + { + stderr0( "X11SalFrame::Restore on withdrawn window\n" ); + return; + } + + if( SHOWSTATE_MINIMIZED == nShowState_ ) + { + GetDisplay()->getWMAdaptor()->frameIsMapping( this ); + XMapWindow( GetXDisplay(), GetShellWindow() ); + nShowState_ = SHOWSTATE_NORMAL; + } + + pDisplay_->getWMAdaptor()->maximizeFrame( this, false, false ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +void X11SalFrame::SetScreenNumber( unsigned int nNewScreen ) +{ + if( nNewScreen == maGeometry.nScreenNumber ) + return; + + if( GetDisplay()->IsXinerama() && GetDisplay()->GetXineramaScreens().size() > 1 ) + { + if( nNewScreen >= GetDisplay()->GetXineramaScreens().size() ) + return; + + Rectangle aOldScreenRect( GetDisplay()->GetXineramaScreens()[maGeometry.nScreenNumber] ); + Rectangle aNewScreenRect( GetDisplay()->GetXineramaScreens()[nNewScreen] ); + bool bVisible = bMapped_; + if( bVisible ) + Show( FALSE ); + maGeometry.nX = aNewScreenRect.Left() + (maGeometry.nX - aOldScreenRect.Left()); + maGeometry.nY = aNewScreenRect.Top() + (maGeometry.nY - aOldScreenRect.Top()); + createNewWindow( None, m_nScreen ); + if( bVisible ) + Show( TRUE ); + maGeometry.nScreenNumber = nNewScreen; + } + else if( sal_Int32(nNewScreen) < GetDisplay()->GetScreenCount() ) + { + bool bVisible = bMapped_; + if( bVisible ) + Show( FALSE ); + createNewWindow( None, nNewScreen ); + if( bVisible ) + Show( TRUE ); + maGeometry.nScreenNumber = nNewScreen; + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +void X11SalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen ) +{ + if( GetDisplay()->IsXinerama() && GetDisplay()->GetXineramaScreens().size() > 1 ) + { + if( mbFullScreen == (bool)bFullScreen ) + return; + if( bFullScreen ) + { + maRestorePosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ), + Size( maGeometry.nWidth, maGeometry.nHeight ) ); + Rectangle aRect; + if( nScreen < 0 || nScreen >= static_cast(GetDisplay()->GetXineramaScreens().size()) ) + aRect = Rectangle( Point(0,0), GetDisplay()->GetScreenSize( m_nScreen ) ); + else + aRect = GetDisplay()->GetXineramaScreens()[nScreen]; + nStyle_ |= SAL_FRAME_STYLE_PARTIAL_FULLSCREEN; + bool bVisible = bMapped_; + if( bVisible ) + Show( FALSE ); + maGeometry.nX = aRect.Left(); + maGeometry.nY = aRect.Top(); + maGeometry.nWidth = aRect.GetWidth(); + maGeometry.nHeight = aRect.GetHeight(); + mbMaximizedHorz = mbMaximizedVert = false; + mbFullScreen = true; + createNewWindow( None, m_nScreen ); + if( GetDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() ) + GetDisplay()->getWMAdaptor()->enableAlwaysOnTop( this, true ); + else + GetDisplay()->getWMAdaptor()->showFullScreen( this, true ); + if( bVisible ) + Show(TRUE); + + } + else + { + mbFullScreen = false; + nStyle_ &= ~SAL_FRAME_STYLE_PARTIAL_FULLSCREEN; + bool bVisible = bMapped_; + Rectangle aRect = maRestorePosSize; + maRestorePosSize = Rectangle(); + if( bVisible ) + Show( FALSE ); + createNewWindow( None, m_nScreen ); + if( !aRect.IsEmpty() ) + SetPosSize( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), + SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y | + SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT ); + if( bVisible ) + Show( TRUE ); + } + } + else + { + if( nScreen < 0 || nScreen >= GetDisplay()->GetScreenCount() ) + nScreen = m_nScreen; + if( nScreen != m_nScreen ) + { + bool bVisible = bMapped_; + if( mbFullScreen ) + pDisplay_->getWMAdaptor()->showFullScreen( this, false ); + if( bVisible ) + Show( FALSE ); + createNewWindow( None, nScreen ); + if( mbFullScreen ) + pDisplay_->getWMAdaptor()->showFullScreen( this, true ); + if( bVisible ) + Show( TRUE ); + } + if( mbFullScreen == (bool)bFullScreen ) + return; + + pDisplay_->getWMAdaptor()->showFullScreen( this, bFullScreen ); + if( IsOverrideRedirect() + && WMSupportsFWS( GetXDisplay(), GetDisplay()->GetRootWindow( m_nScreen ) ) ) + { + AddFwsProtocols( GetXDisplay(), GetShellWindow() ); + RegisterFwsWindow( GetXDisplay(), GetShellWindow() ); + } + } +} + +/* --------------------------------------------------------------------- + the xautolock pseudo screen saver needs special treatment since it + doesn't cooperate with XxxxScreenSaver settings + ------------------------------------------------------------------- */ + +static Bool +IsRunningXAutoLock( Display *p_display, XLIB_Window a_window ) +{ + const char *p_atomname = "XAUTOLOCK_SEMAPHORE_PID"; + Atom a_pidatom; + + // xautolock interns this atom + a_pidatom = XInternAtom( p_display, p_atomname, True ); + if ( a_pidatom == None ) + return False; + + Atom a_type; + int n_format; + unsigned long n_items; + unsigned long n_bytes_after; + pid_t *p_pid; + pid_t n_pid; + // get pid of running xautolock + XGetWindowProperty (p_display, a_window, a_pidatom, 0L, 2L, False, + AnyPropertyType, &a_type, &n_format, &n_items, &n_bytes_after, + (unsigned char**) &p_pid ); + n_pid = *p_pid; + XFree( p_pid ); + + if ( a_type == XA_INTEGER ) + { + // check if xautolock pid points to a running process + if ( kill(n_pid, 0) == -1 ) + return False; + else + return True; + } + + return False; +} + +/* definitions from xautolock.c (pl15) */ +#define XAUTOLOCK_DISABLE 1 +#define XAUTOLOCK_ENABLE 2 + +static Bool +MessageToXAutoLock( Display *p_display, int n_message ) +{ + const char *p_atomname = "XAUTOLOCK_MESSAGE" ; + Atom a_messageatom; + XLIB_Window a_rootwindow; + + a_rootwindow = RootWindowOfScreen( ScreenOfDisplay(p_display, 0) ); + if ( ! IsRunningXAutoLock(p_display, a_rootwindow) ) + { + // remove any pending messages + a_messageatom = XInternAtom( p_display, p_atomname, True ); + if ( a_messageatom != None ) + XDeleteProperty( p_display, a_rootwindow, a_messageatom ); + return False; + } + + a_messageatom = XInternAtom( p_display, p_atomname, False ); + XChangeProperty (p_display, a_rootwindow, a_messageatom, XA_INTEGER, + 8, PropModeReplace, (unsigned char*)&n_message, sizeof(n_message) ); + + return True; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalFrame::StartPresentation( BOOL bStart ) +{ + I18NStatus::get().show( !bStart, I18NStatus::presentation ); + if ( bStart ) + MessageToXAutoLock( GetXDisplay(), XAUTOLOCK_DISABLE ); + else + MessageToXAutoLock( GetXDisplay(), XAUTOLOCK_ENABLE ); + + if( ! bStart && hPresentationWindow != None ) + doReparentPresentationDialogues( GetDisplay() ); + hPresentationWindow = (bStart && IsOverrideRedirect() ) ? GetWindow() : None; + + + // needs static here to save DPMS settings + int dummy; + static bool DPMSExtensionAvailable = +#ifndef SOLARIS + (DPMSQueryExtension(GetXDisplay(), &dummy, &dummy) != 0); + static XLIB_BOOL DPMSEnabled = false; +#else + false; + bool DPMSEnabled = false; + (void)dummy; +#define CARD16 unsigned short +#endif + static CARD16 dpms_standby_timeout=0; + static CARD16 dpms_suspend_timeout=0; + static CARD16 dpms_off_timeout=0; + + + if( bStart || nScreenSaversTimeout_ || DPMSEnabled) + { + if( hPresentationWindow ) + { + /* #i10559# workaround for WindowMaker: try to restore + * current focus after presentation window is gone + */ + int revert_to = 0; + XGetInputFocus( GetXDisplay(), &hPresFocusWindow, &revert_to ); + } + int timeout, interval, prefer_blanking, allow_exposures; + XGetScreenSaver( GetXDisplay(), + &timeout, + &interval, + &prefer_blanking, + &allow_exposures ); + + + // get the DPMS state right before the start + if (DPMSExtensionAvailable) + { +#ifndef SOLARIS + CARD16 state; // card16 is defined in Xdm.h + DPMSInfo( GetXDisplay(), + &state, + &DPMSEnabled); +#endif + } + if( bStart ) // start show + { + if ( timeout ) + { + nScreenSaversTimeout_ = timeout; + XResetScreenSaver( GetXDisplay() ); + XSetScreenSaver( GetXDisplay(), + 0, + interval, + prefer_blanking, + allow_exposures ); + } +#ifndef SOLARIS + if( DPMSEnabled ) + { + if ( DPMSExtensionAvailable ) + { + DPMSGetTimeouts( GetXDisplay(), + &dpms_standby_timeout, + &dpms_suspend_timeout, + &dpms_off_timeout); + DPMSSetTimeouts(GetXDisplay(), 0,0,0); + } + } +#endif + } + else // if( !bStart ) // end of show + { + if( nScreenSaversTimeout_ ) + { + XSetScreenSaver( GetXDisplay(), + nScreenSaversTimeout_, + interval, + prefer_blanking, + allow_exposures ); + nScreenSaversTimeout_ = 0; + } +#ifndef SOLARIS + if ( DPMSEnabled ) + { + if ( DPMSExtensionAvailable ) + { + // restore timeouts + DPMSSetTimeouts(GetXDisplay(), dpms_standby_timeout, + dpms_suspend_timeout, dpms_off_timeout); + } + } +#endif + } + } +} + +// Pointer +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalFrame::SetPointer( PointerStyle ePointerStyle ) +{ + hCursor_ = pDisplay_->GetPointer( ePointerStyle ); + XDefineCursor( GetXDisplay(), GetWindow(), hCursor_ ); + + if( IsCaptured() || nVisibleFloats > 0 ) + XChangeActivePointerGrab( GetXDisplay(), + PointerMotionMask|ButtonPressMask|ButtonReleaseMask, + hCursor_, + CurrentTime ); +} + +void X11SalFrame::SetPointerPos(long nX, long nY) +{ + /* #87921# when the application tries to center the mouse in the dialog the + * window isn't mapped already. So use coordinates relative to the root window. + */ + unsigned int nWindowLeft = maGeometry.nX + nX; + unsigned int nWindowTop = maGeometry.nY + nY; + + XWarpPointer( GetXDisplay(), None, pDisplay_->GetRootWindow( pDisplay_->GetDefaultScreenNumber() ), + 0, 0, 0, 0, nWindowLeft, nWindowTop); +} + +// delay handling of extended text input +#if !defined(__synchronous_extinput__) +void +X11SalFrame::PostExtTextEvent (sal_uInt16 nExtTextEventType, void *pExtTextEvent) +{ + XLIB_Window nFocusWindow = GetWindow(); + Atom nEventAtom = GetDisplay()->getWMAdaptor()->getAtom( WMAdaptor::SAL_EXTTEXTEVENT ); + + XEvent aEvent; + aEvent.xclient.type = ClientMessage; + aEvent.xclient.serial = 0; + aEvent.xclient.send_event = True; + aEvent.xclient.display = GetXDisplay(); + aEvent.xclient.window = nFocusWindow; + aEvent.xclient.message_type = nEventAtom; + aEvent.xclient.format = 32; + +#if SAL_TYPES_SIZEOFLONG > 4 + aEvent.xclient.data.l[0] = (sal_uInt32)((long)pExtTextEvent & 0xffffffff); + aEvent.xclient.data.l[1] = (sal_uInt32)((long)pExtTextEvent >> 32); +#else + aEvent.xclient.data.l[0] = (sal_uInt32)((long)pExtTextEvent); + aEvent.xclient.data.l[1] = 0; +#endif + aEvent.xclient.data.l[2] = (sal_uInt32)nExtTextEventType; + aEvent.xclient.data.l[3] = 0; + aEvent.xclient.data.l[4] = 0; + + XPutBackEvent( GetXDisplay(), &aEvent ); +} + +void +X11SalFrame::HandleExtTextEvent (XClientMessageEvent *pEvent) +{ + #if SAL_TYPES_SIZEOFLONG > 4 + void* pExtTextEvent = (void*)( (pEvent->data.l[0] & 0xffffffff) + | (pEvent->data.l[1] << 32) ); + #else + void* pExtTextEvent = (void*)(pEvent->data.l[0]); + #endif + sal_uInt16 nExtTextEventType = sal_uInt16(pEvent->data.l[2]); + + CallCallback(nExtTextEventType, pExtTextEvent); + + switch (nExtTextEventType) + { + case SALEVENT_ENDEXTTEXTINPUT: + break; + + case SALEVENT_EXTTEXTINPUT: + break; + + default: + + fprintf(stderr, "X11SalFrame::HandleExtTextEvent: invalid extended input\n"); + } +} +#endif /* defined(__synchronous_extinput__) */ + +// PostEvent +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +BOOL X11SalFrame::PostEvent( void *pData ) +{ + GetDisplay()->SendInternalEvent( this, pData ); + return TRUE; +} + +// Title +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalFrame::SetTitle( const XubString& rTitle ) +{ + if( ! ( IsChildWindow() || (nStyle_ & SAL_FRAME_STYLE_FLOAT ) ) ) + { + m_aTitle = rTitle; + GetDisplay()->getWMAdaptor()->setWMName( this, rTitle ); + } +} + +// ----------------------------------------------------------------------- + +void X11SalFrame::Flush() +{ + XFlush( GetDisplay()->GetDisplay() ); +} + +// ----------------------------------------------------------------------- + +void X11SalFrame::Sync() +{ + XSync( GetDisplay()->GetDisplay(), False ); +} + +// Keyboard +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +// ----------------------------------------------------------------------- + +void X11SalFrame::SetInputContext( SalInputContext* pContext ) +{ + if (pContext == NULL) + return; + + // 1. We should create an input context for this frame + // only when SAL_INPUTCONTEXT_TEXT is set. + + if (!(pContext->mnOptions & SAL_INPUTCONTEXT_TEXT)) + { + if( mpInputContext ) + mpInputContext->Unmap( this ); + return; + } + + // 2. We should use on-the-spot inputstyle + // only when SAL_INPUTCONTEXT_EXTTEXTINPUT is set. + + if (mpInputContext == NULL) + { + I18NStatus& rStatus( I18NStatus::get() ); + rStatus.setParent( this ); + mpInputContext = new SalI18N_InputContext( this ); + if (mpInputContext->UseContext()) + { + mpInputContext->ExtendEventMask( GetShellWindow() ); + if (pContext->mnOptions & SAL_INPUTCONTEXT_CHANGELANGUAGE) + mpInputContext->SetLanguage(pContext->meLanguage); + if (mbInputFocus) + mpInputContext->SetICFocus( this ); + } + } + else + mpInputContext->Map( this ); + return; +} + +// ----------------------------------------------------------------------- + +void X11SalFrame::EndExtTextInput( USHORT nFlags ) +{ + if (mpInputContext != NULL) + mpInputContext->EndExtTextInput( nFlags ); +} + +// ----------------------------------------------------------------------- + +XubString X11SalFrame::GetKeyName( USHORT nKeyCode ) +{ + return GetDisplay()->GetKeyName( nKeyCode ); +} + +XubString X11SalFrame::GetSymbolKeyName( const XubString&, USHORT nKeyCode ) +{ + return GetKeyName( nKeyCode ); +} + +BOOL X11SalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , KeyCode& ) +{ + // not supported yet + return FALSE; +} + +LanguageType X11SalFrame::GetInputLanguage() +{ + // could be improved by checking unicode ranges of the last input + return LANGUAGE_DONTKNOW; +} + +// Settings +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +inline Color getColorFromLong( long nColor ) +{ + return Color( (nColor & 0xff), (nColor & 0xff00)>>8, (nColor & 0xff0000)>>16); +} + +void X11SalFrame::UpdateSettings( AllSettings& rSettings ) +{ + + DtIntegrator* pIntegrator = GetDisplay()->getDtIntegrator(); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "DtIntegrator: %d\n", pIntegrator ? pIntegrator->GetDtType() : -1 ); +#endif + if( pIntegrator ) + pIntegrator->GetSystemLook( rSettings ); +} + +void X11SalFrame::CaptureMouse( BOOL bCapture ) +{ + nCaptured_ = pDisplay_->CaptureMouse( bCapture ? this : NULL ); +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +void X11SalFrame::SetParent( SalFrame* pNewParent ) +{ + if( mpParent != pNewParent ) + { + if( mpParent ) + mpParent->maChildren.remove( this ); + + mpParent = static_cast(pNewParent); + mpParent->maChildren.push_back( this ); + if( mpParent->m_nScreen != m_nScreen ) + createNewWindow( None, mpParent->m_nScreen ); + GetDisplay()->getWMAdaptor()->changeReferenceFrame( this, mpParent ); + } +} + +SalFrame* X11SalFrame::GetParent() const +{ + return mpParent; +} + +void X11SalFrame::createNewWindow( XLIB_Window aNewParent, int nScreen ) +{ + bool bWasVisible = bMapped_; + if( bWasVisible ) + Show( FALSE ); + + if( nScreen < 0 || nScreen >= GetDisplay()->GetScreenCount() ) + nScreen = m_nScreen; + + SystemParentData aParentData; + aParentData.aWindow = aNewParent; + aParentData.bXEmbedSupport = (aNewParent != None && m_bXEmbed); // caution: this is guesswork + if( aNewParent == None ) + { + aNewParent = GetDisplay()->GetRootWindow(nScreen); + aParentData.aWindow = None; + m_bXEmbed = false; + } + else + { + // is new parent a root window ? + Display* pDisp = GetDisplay()->GetDisplay(); + int nScreens = GetDisplay()->GetScreenCount(); + for( int i = 0; i < nScreens; i++ ) + { + if( aNewParent == RootWindow( pDisp, i ) ) + { + nScreen = i; + aParentData.aWindow = None; + m_bXEmbed = false; + break; + } + } + } + + // first deinit frame + updateGraphics(true); + if( mpInputContext ) + { + mpInputContext->UnsetICFocus( this ); + mpInputContext->Unmap( this ); + } + if( GetWindow() == hPresentationWindow ) + { + hPresentationWindow = None; + doReparentPresentationDialogues( GetDisplay() ); + } + XDestroyWindow( GetXDisplay(), mhWindow ); + mhWindow = None; + + passOnSaveYourSelf(); + + // now init with new parent again + if ( aParentData.aWindow != None ) + Init( nStyle_ | SAL_FRAME_STYLE_PLUG, nScreen, &aParentData ); + else + Init( nStyle_ & ~SAL_FRAME_STYLE_PLUG, nScreen, NULL, true ); + + // update graphics if necessary + updateGraphics(false); + + if( m_aTitle.Len() ) + SetTitle( m_aTitle ); + + if( mpParent ) + { + if( mpParent->m_nScreen != m_nScreen ) + SetParent( NULL ); + else + pDisplay_->getWMAdaptor()->changeReferenceFrame( this, mpParent ); + } + + if( bWasVisible ) + Show( TRUE ); + + std::list< X11SalFrame* > aChildren = maChildren; + for( std::list< X11SalFrame* >::iterator it = aChildren.begin(); it != aChildren.end(); ++it ) + (*it)->createNewWindow( None, m_nScreen ); + + // FIXME: SalObjects +} + +bool X11SalFrame::SetPluginParent( SystemParentData* pNewParent ) +{ + if( pNewParent->nSize >= sizeof(SystemParentData) ) + m_bXEmbed = pNewParent->aWindow != None && pNewParent->bXEmbedSupport; + createNewWindow( pNewParent ? pNewParent->aWindow : None ); + + return true; +} + +// Sound +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +void X11SalFrame::Beep( SoundType eSoundType ) // not fully suported +{ + switch( eSoundType ) + { + case SOUND_DEFAULT: + case SOUND_ERROR: + GetDisplay()->Beep(); + break; + default: + // Excessive beeping averted + break; + } +} + +// Event Handling +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +static USHORT sal_GetCode( int state ) +{ + USHORT nCode = 0; + + if( state & Button1Mask ) + nCode |= MOUSE_LEFT; + if( state & Button2Mask ) + nCode |= MOUSE_MIDDLE; + if( state & Button3Mask ) + nCode |= MOUSE_RIGHT; + + if( state & ShiftMask ) + nCode |= KEY_SHIFT; + if( state & ControlMask ) + nCode |= KEY_MOD1; + if( state & Mod1Mask ) + nCode |= KEY_MOD2; + + // Map Meta/Super modifier to MOD3 on all Unix systems + // except Mac OS X + if( (state & Mod3Mask) ) + nCode |= KEY_MOD3; + + return nCode; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +SalFrame::SalPointerState X11SalFrame::GetPointerState() +{ + SalPointerState aState; + XLIB_Window aRoot, aChild; + int rx, ry, wx, wy; + unsigned int nMask = 0; + XQueryPointer( GetXDisplay(), + GetShellWindow(), + &aRoot, + &aChild, + &rx, &ry, + &wx, &wy, + &nMask + ); + + aState.maPos = Point(wx, wy); + aState.mnState = sal_GetCode( nMask ); + return aState; +} + +long X11SalFrame::HandleMouseEvent( XEvent *pEvent ) +{ + SalMouseEvent aMouseEvt; + USHORT nEvent = 0; + bool bClosePopups = false; + + if( nVisibleFloats && pEvent->type == EnterNotify ) + return 0; + + // Solaris X86: clicking the right button on a two-button mouse + // generates a button2 event not a button3 event + if (pDisplay_->GetProperties() & PROPERTY_SUPPORT_3ButtonMouse ) + { + switch (pEvent->type) + { + case EnterNotify: + case LeaveNotify: + if ( pEvent->xcrossing.state & Button2Mask ) + { + pEvent->xcrossing.state &= ~Button2Mask; + pEvent->xcrossing.state |= Button3Mask; + } + break; + + case MotionNotify: + if ( pEvent->xmotion.state & Button2Mask ) + { + pEvent->xmotion.state &= ~Button2Mask; + pEvent->xmotion.state |= Button3Mask; + } + break; + + default: + if ( Button2 == pEvent->xbutton.button ) + { + pEvent->xbutton.state &= ~Button2Mask; + pEvent->xbutton.state |= Button3Mask; + pEvent->xbutton.button = Button3; + } + break; + } + } + + + if( LeaveNotify == pEvent->type || EnterNotify == pEvent->type ) + { + /* + * #89075# #89335# + * + * some WMs (and/or) applications have a passive grab on + * mouse buttons (XGrabButton). This leads to enter/leave notifies + * with mouse buttons pressed in the state mask before the actual + * ButtonPress event gets dispatched. But EnterNotify + * is reported in vcl as MouseMove event. Some office code + * decides that a pressed button in a MouseMove belongs to + * a drag operation which leads to doing things differently. + * + * #95901# + * ignore Enter/LeaveNotify resulting from grabs so that + * help windows do not disappear just after appearing + * + * hopefully this workaround will not break anything. + */ + if( pEvent->xcrossing.mode == NotifyGrab || pEvent->xcrossing.mode == NotifyUngrab ) + return 0; + + aMouseEvt.mnX = pEvent->xcrossing.x; + aMouseEvt.mnY = pEvent->xcrossing.y; + aMouseEvt.mnTime = pEvent->xcrossing.time; + aMouseEvt.mnCode = sal_GetCode( pEvent->xcrossing.state ); + aMouseEvt.mnButton = 0; + + nEvent = LeaveNotify == pEvent->type + ? SALEVENT_MOUSELEAVE + : SALEVENT_MOUSEMOVE; + } + else if( pEvent->type == MotionNotify ) + { + aMouseEvt.mnX = pEvent->xmotion.x; + aMouseEvt.mnY = pEvent->xmotion.y; + aMouseEvt.mnTime = pEvent->xmotion.time; + aMouseEvt.mnCode = sal_GetCode( pEvent->xmotion.state ); + + aMouseEvt.mnButton = 0; + + nEvent = SALEVENT_MOUSEMOVE; + if( nVisibleFloats > 0 && mpParent ) + { + XLIB_Cursor aCursor = mpParent->GetCursor(); + if( pEvent->xmotion.x >= 0 && pEvent->xmotion.x < (int)maGeometry.nWidth && + pEvent->xmotion.y >= 0 && pEvent->xmotion.y < (int)maGeometry.nHeight ) + aCursor = None; + + XChangeActivePointerGrab( GetXDisplay(), + PointerMotionMask|ButtonPressMask|ButtonReleaseMask, + aCursor, + CurrentTime ); + } + } + else + { + // let mouse events reach the correct window + if( nVisibleFloats < 1 ) + { + if( ! (nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) + XUngrabPointer( GetXDisplay(), CurrentTime ); + } + else if( pEvent->type == ButtonPress ) + { + // see if the user clicks outside all of the floats + // if yes release the grab + bool bInside = false; + const std::list< SalFrame* >& rFrames = GetDisplay()->getFrames(); + for( std::list< SalFrame* >::const_iterator it = rFrames.begin(); it != rFrames.end(); ++it ) + { + const X11SalFrame* pFrame = static_cast< const X11SalFrame* >(*it); + if( pFrame->IsFloatGrabWindow() && + pFrame->bMapped_ && + pEvent->xbutton.x_root >= pFrame->maGeometry.nX && + pEvent->xbutton.x_root < pFrame->maGeometry.nX + (int)pFrame->maGeometry.nWidth && + pEvent->xbutton.y_root >= pFrame->maGeometry.nY && + pEvent->xbutton.y_root < pFrame->maGeometry.nY + (int)pFrame->maGeometry.nHeight ) + { + bInside = true; + break; + } + } + if( ! bInside ) + { + // need not take care of the XUngrabPointer in Show( FALSE ) + // because XUngrabPointer does not produce errors if pointer + // is not grabbed + XUngrabPointer( GetXDisplay(), CurrentTime ); + bClosePopups = true; + + /* #i15246# only close popups if pointer is outside all our frames + * cannot use our own geometry data here because stacking + * is unknown (the above case implicitly assumes + * that floats are on top which should be true) + */ + XLIB_Window aRoot, aChild; + int root_x, root_y, win_x, win_y; + unsigned int mask_return; + if( XQueryPointer( GetXDisplay(), + GetDisplay()->GetRootWindow( m_nScreen ), + &aRoot, &aChild, + &root_x, &root_y, + &win_x, &win_y, + &mask_return ) + && aChild // pointer may not be in any child + ) + { + for( std::list< SalFrame* >::const_iterator it = rFrames.begin(); it != rFrames.end(); ++it ) + { + const X11SalFrame* pFrame = static_cast< const X11SalFrame* >(*it); + if( ! pFrame->IsFloatGrabWindow() + && ( pFrame->GetWindow() == aChild || + pFrame->GetShellWindow() == aChild || + pFrame->GetStackingWindow() == aChild ) + ) + { + // #i63638# check that pointer is inside window, not + // only inside stacking window + if( root_x >= pFrame->maGeometry.nX && root_x < sal::static_int_cast< int >(pFrame->maGeometry.nX+pFrame->maGeometry.nWidth) && + root_y >= pFrame->maGeometry.nY && root_y < sal::static_int_cast< int >(pFrame->maGeometry.nX+pFrame->maGeometry.nHeight) ) + { + bClosePopups = false; + } + break; + } + } + } + } + } + + if( m_bXEmbed && pEvent->xbutton.button == Button1 ) + askForXEmbedFocus( pEvent->xbutton.time ); + + if( pEvent->xbutton.button == Button1 || + pEvent->xbutton.button == Button2 || + pEvent->xbutton.button == Button3 ) + { + aMouseEvt.mnX = pEvent->xbutton.x; + aMouseEvt.mnY = pEvent->xbutton.y; + aMouseEvt.mnTime = pEvent->xbutton.time; + aMouseEvt.mnCode = sal_GetCode( pEvent->xbutton.state ); + + if( Button1 == pEvent->xbutton.button ) + aMouseEvt.mnButton = MOUSE_LEFT; + else if( Button2 == pEvent->xbutton.button ) + aMouseEvt.mnButton = MOUSE_MIDDLE; + else if( Button3 == pEvent->xbutton.button ) + aMouseEvt.mnButton = MOUSE_RIGHT; + + nEvent = ButtonPress == pEvent->type + ? SALEVENT_MOUSEBUTTONDOWN + : SALEVENT_MOUSEBUTTONUP; + } + else if( pEvent->xbutton.button == Button4 || + pEvent->xbutton.button == Button5 || + pEvent->xbutton.button == Button6 || + pEvent->xbutton.button == Button7 ) + { + const bool bIncrement( + pEvent->xbutton.button == Button4 || + pEvent->xbutton.button == Button6 ); + const bool bHoriz( + pEvent->xbutton.button == Button6 || + pEvent->xbutton.button == Button7 ); + + if( pEvent->type == ButtonRelease ) + return 0; + + static ULONG nLines = 0; + if( ! nLines ) + { + char* pEnv = getenv( "SAL_WHEELLINES" ); + nLines = pEnv ? atoi( pEnv ) : 3; + if( nLines > 10 ) + nLines = SAL_WHEELMOUSE_EVENT_PAGESCROLL; + } + + SalWheelMouseEvent aWheelEvt; + aWheelEvt.mnTime = pEvent->xbutton.time; + aWheelEvt.mnX = pEvent->xbutton.x; + aWheelEvt.mnY = pEvent->xbutton.y; + aWheelEvt.mnDelta = bIncrement ? 120 : -120; + aWheelEvt.mnNotchDelta = bIncrement ? 1 : -1; + aWheelEvt.mnScrollLines = nLines; + aWheelEvt.mnCode = sal_GetCode( pEvent->xbutton.state ); + aWheelEvt.mbHorz = bHoriz; + + nEvent = SALEVENT_WHEELMOUSE; + + // --- RTL --- (mirror mouse pos) + if( Application::GetSettings().GetLayoutRTL() ) + aWheelEvt.mnX = nWidth_-1-aWheelEvt.mnX; + return CallCallback( nEvent, &aWheelEvt ); + } + } + + int nRet = 0; + if( nEvent == SALEVENT_MOUSELEAVE + || ( aMouseEvt.mnX < nWidth_ && aMouseEvt.mnX > -1 && + aMouseEvt.mnY < nHeight_ && aMouseEvt.mnY > -1 ) + || pDisplay_->MouseCaptured( this ) + ) + { + // --- RTL --- (mirror mouse pos) + if( Application::GetSettings().GetLayoutRTL() ) + aMouseEvt.mnX = nWidth_-1-aMouseEvt.mnX; + nRet = CallCallback( nEvent, &aMouseEvt ); + } + + if( bClosePopups ) + { + /* #108213# close popups after dispatching the event outside the popup; + * applications do weird things. + */ + ImplSVData* pSVData = ImplGetSVData(); + if ( pSVData->maWinData.mpFirstFloat ) + { + static const char* pEnv = getenv( "SAL_FLOATWIN_NOAPPFOCUSCLOSE" ); + if ( !(pSVData->maWinData.mpFirstFloat->GetPopupModeFlags() & FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE) && !(pEnv && *pEnv) ) + pSVData->maWinData.mpFirstFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); + } + } + + return nRet; +} + +// F10 means either KEY_F10 or KEY_MENU, which has to be decided +// in the independent part. +struct KeyAlternate +{ + USHORT nKeyCode; + sal_Unicode nCharCode; + KeyAlternate() : nKeyCode( 0 ), nCharCode( 0 ) {} + KeyAlternate( USHORT nKey, sal_Unicode nChar = 0 ) : nKeyCode( nKey ), nCharCode( nChar ) {} +}; + +inline KeyAlternate +GetAlternateKeyCode( const USHORT nKeyCode ) +{ + KeyAlternate aAlternate; + + switch( nKeyCode ) + { + case KEY_F10: aAlternate = KeyAlternate( KEY_MENU );break; + case KEY_F24: aAlternate = KeyAlternate( KEY_SUBTRACT, '-' );break; + } + + return aAlternate; +} + +void X11SalFrame::beginUnicodeSequence() +{ + rtl::OUString& rSeq( GetX11SalData()->GetUnicodeAccumulator() ); + DeletionListener aDeleteWatch( this ); + + if( rSeq.getLength() ) + endUnicodeSequence(); + + rSeq = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "u" ) ); + + if( ! aDeleteWatch.isDeleted() ) + { + USHORT nTextAttr = SAL_EXTTEXTINPUT_ATTR_UNDERLINE; + SalExtTextInputEvent aEv; + aEv.mnTime = 0; + aEv.maText = rSeq; + aEv.mpTextAttr = &nTextAttr; + aEv.mnCursorPos = 0; + aEv.mnDeltaStart = 0; + aEv.mnCursorFlags = 0; + aEv.mbOnlyCursor = FALSE; + + CallCallback(SALEVENT_EXTTEXTINPUT, (void*)&aEv); + } +} + +bool X11SalFrame::appendUnicodeSequence( sal_Unicode c ) +{ + bool bRet = false; + rtl::OUString& rSeq( GetX11SalData()->GetUnicodeAccumulator() ); + if( rSeq.getLength() > 0 ) + { + // range check + if( (c >= sal_Unicode('0') && c <= sal_Unicode('9')) || + (c >= sal_Unicode('a') && c <= sal_Unicode('f')) || + (c >= sal_Unicode('A') && c <= sal_Unicode('F')) ) + { + rtl::OUStringBuffer aBuf( rSeq.getLength() + 1 ); + aBuf.append( rSeq ); + aBuf.append( c ); + rSeq = aBuf.makeStringAndClear(); + std::vector attribs( rSeq.getLength(), SAL_EXTTEXTINPUT_ATTR_UNDERLINE ); + + SalExtTextInputEvent aEv; + aEv.mnTime = 0; + aEv.maText = rSeq; + aEv.mpTextAttr = &attribs[0]; + aEv.mnCursorPos = 0; + aEv.mnDeltaStart = 0; + aEv.mnCursorFlags = 0; + aEv.mbOnlyCursor = FALSE; + + CallCallback(SALEVENT_EXTTEXTINPUT, (void*)&aEv); + bRet = true; + } + else + bRet = endUnicodeSequence(); + } + else + endUnicodeSequence(); + return bRet; +} + +bool X11SalFrame::endUnicodeSequence() +{ + rtl::OUString& rSeq( GetX11SalData()->GetUnicodeAccumulator() ); + + DeletionListener aDeleteWatch( this ); + if( rSeq.getLength() > 1 && rSeq.getLength() < 6 ) + { + // cut the "u" + rtl::OUString aNumbers( rSeq.copy( 1 ) ); + sal_Int32 nValue = aNumbers.toInt32( 16 ); + if( nValue >= 32 ) + { + USHORT nTextAttr = SAL_EXTTEXTINPUT_ATTR_UNDERLINE; + SalExtTextInputEvent aEv; + aEv.mnTime = 0; + aEv.maText = rtl::OUString( sal_Unicode(nValue) ); + aEv.mpTextAttr = &nTextAttr; + aEv.mnCursorPos = 0; + aEv.mnDeltaStart = 0; + aEv.mnCursorFlags = 0; + aEv.mbOnlyCursor = FALSE; + CallCallback(SALEVENT_EXTTEXTINPUT, (void*)&aEv); + } + } + bool bWasInput = rSeq.getLength() > 0; + rSeq = rtl::OUString(); + if( bWasInput && ! aDeleteWatch.isDeleted() ) + CallCallback(SALEVENT_ENDEXTTEXTINPUT, NULL); + return bWasInput; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent ) +{ + KeySym nKeySym; + KeySym nUnmodifiedKeySym; + int nLen = 2048; + unsigned char *pPrintable = (unsigned char*)alloca( nLen ); + + // singlebyte code composed by input method, the new default + if (mpInputContext != NULL && mpInputContext->UseContext()) + { + // returns a keysym as well as the pPrintable (in system encoding) + // printable may be empty. + Status nStatus; + nKeySym = pDisplay_->GetKeySym( pEvent, pPrintable, &nLen, + &nUnmodifiedKeySym, + &nStatus, mpInputContext->GetContext() ); + if ( nStatus == XBufferOverflow ) + { + nLen *= 2; + pPrintable = (unsigned char*)alloca( nLen ); + nKeySym = pDisplay_->GetKeySym( pEvent, pPrintable, &nLen, + &nUnmodifiedKeySym, + &nStatus, mpInputContext->GetContext() ); + } + } + else + { + // fallback, this should never ever be called + Status nStatus = 0; + nKeySym = pDisplay_->GetKeySym( pEvent, pPrintable, &nLen, &nUnmodifiedKeySym, &nStatus ); + } + + SalKeyEvent aKeyEvt; + USHORT nKeyCode; + USHORT nModCode = 0; + char aDummy; + + if( pEvent->state & ShiftMask ) + nModCode |= KEY_SHIFT; + if( pEvent->state & ControlMask ) + nModCode |= KEY_MOD1; + if( pEvent->state & Mod1Mask ) + nModCode |= KEY_MOD2; + + if( nModCode != (KEY_SHIFT|KEY_MOD1) ) + endUnicodeSequence(); + + if( nKeySym == XK_Shift_L || nKeySym == XK_Shift_R + || nKeySym == XK_Control_L || nKeySym == XK_Control_R + || nKeySym == XK_Alt_L || nKeySym == XK_Alt_R + || nKeySym == XK_Meta_L || nKeySym == XK_Meta_R + || nKeySym == XK_Super_L || nKeySym == XK_Super_R ) + { + SalKeyModEvent aModEvt; + aModEvt.mnModKeyCode = 0; + if( pEvent->type == XLIB_KeyPress && mnExtKeyMod == 0 ) + mbSendExtKeyModChange = true; + else if( pEvent->type == KeyRelease && mbSendExtKeyModChange ) + { + aModEvt.mnModKeyCode = mnExtKeyMod; + mnExtKeyMod = 0; + } + + // pressing just the ctrl key leads to a keysym of XK_Control but + // the event state does not contain ControlMask. In the release + // event its the other way round: it does contain the Control mask. + // The modifier mode therefore has to be adapted manually. + USHORT nExtModMask = 0; + USHORT nModMask = 0; + switch( nKeySym ) + { + case XK_Control_L: + nExtModMask = MODKEY_LMOD1; + nModMask = KEY_MOD1; + break; + case XK_Control_R: + nExtModMask = MODKEY_RMOD1; + nModMask = KEY_MOD1; + break; + case XK_Alt_L: + nExtModMask = MODKEY_LMOD2; + nModMask = KEY_MOD2; + break; + case XK_Alt_R: + nExtModMask = MODKEY_RMOD2; + nModMask = KEY_MOD2; + break; + case XK_Shift_L: + nExtModMask = MODKEY_LSHIFT; + nModMask = KEY_SHIFT; + break; + case XK_Shift_R: + nExtModMask = MODKEY_RSHIFT; + nModMask = KEY_SHIFT; + break; + // Map Meta/Super keys to MOD3 modifier on all Unix systems + // except Mac OS X + case XK_Meta_L: + case XK_Super_L: + nExtModMask = MODKEY_LMOD3; + nModMask = KEY_MOD3; + break; + case XK_Meta_R: + case XK_Super_R: + nExtModMask = MODKEY_RMOD3; + nModMask = KEY_MOD3; + break; + } + if( pEvent->type == KeyRelease ) + { + nModCode &= ~nModMask; + mnExtKeyMod &= ~nExtModMask; + } + else + { + nModCode |= nModMask; + mnExtKeyMod |= nExtModMask; + } + + aModEvt.mnCode = nModCode; + aModEvt.mnTime = pEvent->time; + + int nRet = CallCallback( SALEVENT_KEYMODCHANGE, &aModEvt ); + + // emulate KEY_MENU + if ( ( (nKeySym == XK_Alt_L) || (nKeySym == XK_Alt_R) ) && + ( (nModCode & ~(KEY_MOD3|KEY_MOD2)) == 0 ) ) + { + if( pEvent->type == XLIB_KeyPress ) + mbKeyMenu = true; + else if( mbKeyMenu ) + { + // simulate KEY_MENU + aKeyEvt.mnCode = KEY_MENU | nModCode; + aKeyEvt.mnRepeat = 0; + aKeyEvt.mnTime = pEvent->time; + aKeyEvt.mnCharCode = 0; + nRet = CallCallback( SALEVENT_KEYINPUT, &aKeyEvt ); + nRet = CallCallback( SALEVENT_KEYUP, &aKeyEvt ); + } + } + else + mbKeyMenu = false; + return nRet; + } + + mbSendExtKeyModChange = mbKeyMenu = false; + + // try to figure out the vcl code for the keysym + // #i52338# use the unmodified KeySym if there is none for the real KeySym + // because the independent part has only keycodes for unshifted keys + nKeyCode = pDisplay_->GetKeyCode( nKeySym, &aDummy ); + if( nKeyCode == 0 ) + nKeyCode = pDisplay_->GetKeyCode( nUnmodifiedKeySym, &aDummy ); + + // try to figure out a printable if XmbLookupString returns only a keysym + // and NOT a printable. Do not store it in pPrintable[0] since it is expected to + // be in system encoding, not unicode. + // #i8988##, if KeySym and printable look equally promising then prefer KeySym + // the printable is bound to the encoding so the KeySym might contain more + // information (in et_EE locale: "Compose + Z + <" delivers "," in printable and + // (the desired) Zcaron in KeySym + sal_Unicode nKeyString = 0x0; + if ( (nLen == 0) + || ((nLen == 1) && (nKeySym > 0)) ) + nKeyString = KeysymToUnicode (nKeySym); + // if we have nothing we give up + if( !nKeyCode && !nLen && !nKeyString) + return 0; + + DeletionListener aDeleteWatch( this ); + + if( nModCode == (KEY_SHIFT | KEY_MOD1) && pEvent->type == XLIB_KeyPress ) + { + USHORT nSeqKeyCode = pDisplay_->GetKeyCode( nUnmodifiedKeySym, &aDummy ); + if( nSeqKeyCode == KEY_U ) + { + beginUnicodeSequence(); + return 1; + } + else if( nSeqKeyCode >= KEY_0 && nSeqKeyCode <= KEY_9 ) + { + if( appendUnicodeSequence( sal_Unicode( '0' ) + sal_Unicode(nSeqKeyCode - KEY_0) ) ) + return 1; + } + else if( nSeqKeyCode >= KEY_A && nSeqKeyCode <= KEY_F ) + { + if( appendUnicodeSequence( sal_Unicode( 'a' ) + sal_Unicode(nSeqKeyCode - KEY_A) ) ) + return 1; + } + else + endUnicodeSequence(); + } + + if( aDeleteWatch.isDeleted() ) + return 0; + + rtl_TextEncoding nEncoding; + + if (mpInputContext != NULL && mpInputContext->IsMultiLingual() ) + nEncoding = RTL_TEXTENCODING_UTF8; + else + nEncoding = osl_getThreadTextEncoding(); + + sal_Unicode *pBuffer; + sal_Unicode *pString; + sal_Size nBufferSize = nLen * 2; + sal_Size nSize; + pBuffer = (sal_Unicode*) malloc( nBufferSize + 2 ); + pBuffer[ 0 ] = 0; + + if (nKeyString != 0) + { + pString = &nKeyString; + nSize = 1; + } + else + if (nLen > 0 && nEncoding != RTL_TEXTENCODING_UNICODE) + { + // create text converter + rtl_TextToUnicodeConverter aConverter = + rtl_createTextToUnicodeConverter( nEncoding ); + rtl_TextToUnicodeContext aContext = + rtl_createTextToUnicodeContext( aConverter ); + + sal_uInt32 nConversionInfo; + sal_Size nConvertedChars; + + // convert to single byte text stream + nSize = rtl_convertTextToUnicode( + aConverter, aContext, + (char*)pPrintable, nLen, + pBuffer, nBufferSize, + RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_IGNORE | + RTL_TEXTTOUNICODE_FLAGS_INVALID_IGNORE, + &nConversionInfo, &nConvertedChars ); + + // destroy converter + rtl_destroyTextToUnicodeContext( aConverter, aContext ); + rtl_destroyTextToUnicodeConverter( aConverter ); + + pString = pBuffer; + } + else + if (nLen > 0 /* nEncoding == RTL_TEXTENCODING_UNICODE */) + { + pString = (sal_Unicode*)pPrintable; + nSize = nLen; + } + else + { + pString = pBuffer; + nSize = 0; + } + + if ( mpInputContext != NULL + && mpInputContext->UseContext() + && KeyRelease != pEvent->type + && ( (nSize > 1) + || (nSize > 0 && mpInputContext->IsPreeditMode())) ) + { + mpInputContext->CommitKeyEvent(pString, nSize); + } + else + // normal single character keyinput + { + aKeyEvt.mnCode = nKeyCode | nModCode; + aKeyEvt.mnRepeat = 0; + aKeyEvt.mnTime = pEvent->time; + aKeyEvt.mnCharCode = pString[ 0 ]; + + if( KeyRelease == pEvent->type ) + { + CallCallback( SALEVENT_KEYUP, &aKeyEvt ); + } + else + { + if ( ! CallCallback(SALEVENT_KEYINPUT, &aKeyEvt) ) + { + // independent layer doesnt want to handle key-event, so check + // whether the keycode may have an alternate meaning + KeyAlternate aAlternate = GetAlternateKeyCode( nKeyCode ); + if ( aAlternate.nKeyCode != 0 ) + { + aKeyEvt.mnCode = aAlternate.nKeyCode | nModCode; + if( aAlternate.nCharCode ) + aKeyEvt.mnCharCode = aAlternate.nCharCode; + CallCallback(SALEVENT_KEYINPUT, &aKeyEvt); + } + } + } + } + + // + // update the spot location for PreeditPosition IME style + // + if (! aDeleteWatch.isDeleted()) + { + if (mpInputContext != NULL && mpInputContext->UseContext()) + mpInputContext->UpdateSpotLocation(); + } + + free (pBuffer); + return True; +} + + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent ) +{ + // #107739# ReflectionX in Windows mode changes focus while mouse is grabbed + if( nVisibleFloats > 0 && GetDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii( "ReflectionX Windows" ) ) + return 1; + + /* #55691# ignore focusout resulting from keyboard grabs + * we do not grab it and are not interested when + * someone else does CDE e.g. does a XGrabKey on arrow keys + * #73179# handle focus events with mode NotifyWhileGrabbed + * because with CDE alt-tab focus changing we do not get + * normal focus events + * #71791# cast focus event to the input context, otherwise the + * status window does not follow the application frame + */ + + if ( mpInputContext != NULL ) + { + if( FocusIn == pEvent->type ) + mpInputContext->SetICFocus( this ); + else + { + /* + * do not unset the IC focuse here because would kill + * a lookup choice windows that might have the focus now + * mpInputContext->UnsetICFocus( this ); + */ + I18NStatus::get().show( false, I18NStatus::focus ); + } + } + + + if ( pEvent->mode == NotifyNormal || pEvent->mode == NotifyWhileGrabbed || + ( ( nStyle_ & SAL_FRAME_STYLE_PLUG ) && pEvent->window == GetShellWindow() ) + ) + { + if( hPresentationWindow != None && hPresentationWindow != GetShellWindow() ) + return 0; + + if( FocusIn == pEvent->type ) + { + vcl_sal::PrinterUpdate::update(); + mbInputFocus = True; + ImplSVData* pSVData = ImplGetSVData(); + + + + long nRet = CallCallback( SALEVENT_GETFOCUS, 0 ); + if ((mpParent != NULL && nStyle_ == 0) + && pSVData->maWinData.mpFirstFloat ) + { + ULONG nMode = pSVData->maWinData.mpFirstFloat->GetPopupModeFlags(); + pSVData->maWinData.mpFirstFloat->SetPopupModeFlags( + nMode & ~(FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE)); + } + return nRet; + } + else + { + mbInputFocus = False; + mbSendExtKeyModChange = mbKeyMenu = false; + mnExtKeyMod = 0; + return CallCallback( SALEVENT_LOSEFOCUS, 0 ); + } + } + + return 0; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +long X11SalFrame::HandleExposeEvent( XEvent *pEvent ) +{ + XRectangle aRect = { 0, 0, 0, 0 }; + USHORT nCount = 0; + + if( pEvent->type == Expose ) + { + aRect.x = pEvent->xexpose.x; + aRect.y = pEvent->xexpose.y; + aRect.width = pEvent->xexpose.width; + aRect.height = pEvent->xexpose.height; + nCount = pEvent->xexpose.count; + } + else if( pEvent->type == GraphicsExpose ) + { + aRect.x = pEvent->xgraphicsexpose.x; + aRect.y = pEvent->xgraphicsexpose.y; + aRect.width = pEvent->xgraphicsexpose.width; + aRect.height = pEvent->xgraphicsexpose.height; + nCount = pEvent->xgraphicsexpose.count; + } + + if( IsOverrideRedirect() && mbFullScreen && + aPresentationReparentList.begin() == aPresentationReparentList.end() ) + // we are in fullscreen mode -> override redirect + // focus is possibly lost, so reget it + XSetInputFocus( GetXDisplay(), GetShellWindow(), RevertToNone, CurrentTime ); + + // width and height are extents, so they are of by one for rectangle + maPaintRegion.Union( Rectangle( Point(aRect.x, aRect.y), Size(aRect.width+1, aRect.height+1) ) ); + + if( nCount ) + // wait for last expose rectangle, do not wait for resize timer + // if a completed graphics expose sequence is available + return 1; + + SalPaintEvent aPEvt( maPaintRegion.Left(), maPaintRegion.Top(), maPaintRegion.GetWidth(), maPaintRegion.GetHeight() ); + + CallCallback( SALEVENT_PAINT, &aPEvt ); + maPaintRegion = Rectangle(); + + return 1; +} + +void X11SalFrame::RestackChildren( XLIB_Window* pTopLevelWindows, int nTopLevelWindows ) +{ + if( maChildren.begin() != maChildren.end() ) + { + int nWindow = nTopLevelWindows; + while( nWindow-- ) + if( pTopLevelWindows[nWindow] == GetStackingWindow() ) + break; + if( nWindow < 0 ) + return; + + std::list< X11SalFrame* >::const_iterator it; + for( it = maChildren.begin(); it != maChildren.end(); ++it ) + { + X11SalFrame* pData = *it; + if( pData->bMapped_ ) + { + int nChild = nWindow; + while( nChild-- ) + { + if( pTopLevelWindows[nChild] == pData->GetStackingWindow() ) + { + // if a child is behind its parent, place it above the + // parent (for insane WMs like Dtwm and olwm) + XWindowChanges aCfg; + aCfg.sibling = GetStackingWindow(); + aCfg.stack_mode = Above; + XConfigureWindow( GetXDisplay(), pData->GetStackingWindow(), CWSibling|CWStackMode, &aCfg ); + break; + } + } + } + } + for( it = maChildren.begin(); it != maChildren.end(); ++it ) + { + X11SalFrame* pData = *it; + pData->RestackChildren( pTopLevelWindows, nTopLevelWindows ); + } + } +} + +void X11SalFrame::RestackChildren() +{ + if( ! GetDisplay()->getWMAdaptor()->isTransientBehaviourAsExpected() + && maChildren.begin() != maChildren.end() ) + { + XLIB_Window aRoot, aParent, *pChildren = NULL; + unsigned int nChildren; + if( XQueryTree( GetXDisplay(), + GetDisplay()->GetRootWindow( m_nScreen ), + &aRoot, + &aParent, + &pChildren, + &nChildren ) ) + { + RestackChildren( pChildren, nChildren ); + XFree( pChildren ); + } + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +long X11SalFrame::HandleSizeEvent( XConfigureEvent *pEvent ) +{ + if ( pEvent->window != GetShellWindow() + && pEvent->window != GetWindow() + && pEvent->window != GetForeignParent() + && pEvent->window != GetStackingWindow() + ) + { + // could be as well a sys-child window (aka SalObject) + return 1; + } + + + if( ( nStyle_ & SAL_FRAME_STYLE_PLUG ) && pEvent->window == GetShellWindow() ) + { + // just update the children's positions + RestackChildren(); + return 1; + } + + if( pEvent->window == GetForeignParent() ) + XResizeWindow( GetXDisplay(), + GetWindow(), + pEvent->width, + pEvent->height ); + + XLIB_Window hDummy; + XTranslateCoordinates( GetXDisplay(), + GetWindow(), + pDisplay_->GetRootWindow( pDisplay_->GetDefaultScreenNumber() ), + 0, 0, + &pEvent->x, &pEvent->y, + &hDummy ); + + if( pEvent->window == GetStackingWindow() ) + { + if( maGeometry.nX != pEvent->x || maGeometry.nY != pEvent->y ) + { + maGeometry.nX = pEvent->x; + maGeometry.nY = pEvent->y; + CallCallback( SALEVENT_MOVE, NULL ); + } + return 1; + } + + // check size hints in first time SalFrame::Show + if( SHOWSTATE_UNKNOWN == nShowState_ && bMapped_ ) + nShowState_ = SHOWSTATE_NORMAL; + + nWidth_ = pEvent->width; + nHeight_ = pEvent->height; + + bool bMoved = ( pEvent->x != maGeometry.nX || pEvent->y != maGeometry.nY ); + bool bSized = ( pEvent->width != (int)maGeometry.nWidth || pEvent->height != (int)maGeometry.nHeight ); + + maGeometry.nX = pEvent->x; + maGeometry.nY = pEvent->y; + maGeometry.nWidth = pEvent->width; + maGeometry.nHeight = pEvent->height; + updateScreenNumber(); + + // update children's position + RestackChildren(); + + if( bSized && ! bMoved ) + CallCallback( SALEVENT_RESIZE, NULL ); + else if( bMoved && ! bSized ) + CallCallback( SALEVENT_MOVE, NULL ); + else if( bMoved && bSized ) + CallCallback( SALEVENT_MOVERESIZE, NULL ); + + return 1; +} + +IMPL_LINK( X11SalFrame, HandleAlwaysOnTopRaise, void*, EMPTYARG ) +{ + if( bMapped_ ) + ToTop( 0 ); + return 0; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent ) +{ + Display *pDisplay = pEvent->display; + XLIB_Window hWM_Parent; + XLIB_Window hRoot, *Children, hDummy; + unsigned int nChildren; + BOOL bNone = pDisplay_->GetProperties() + & PROPERTY_SUPPORT_WM_Parent_Pixmap_None; + BOOL bAccessParentWindow = ! (pDisplay_->GetProperties() + & PROPERTY_FEATURE_TrustedSolaris); + + static const char* pDisableStackingCheck = getenv( "SAL_DISABLE_STACKING_CHECK" ); + + GetDisplay()->GetXLib()->PushXErrorLevel( true ); + + /* + * #89186# don't rely on the new parent from the event. + * the event may be "out of date", that is the window manager + * window may not exist anymore. This can happen if someone + * shows a frame and hides it again quickly (not that that would + * be very sensible) + */ + hWM_Parent = GetShellWindow(); + do + { + Children = NULL; + XQueryTree( pDisplay, + hWM_Parent, + &hRoot, + &hDummy, + &Children, + &nChildren ); + if( GetDisplay()->GetXLib()->HasXErrorOccured() ) + { + hWM_Parent = GetShellWindow(); + break; + } + /* #107048# this sometimes happens if a Show(TRUE) is + * immediately followed by Show(FALSE) (which is braindead anyway) + */ + if( hDummy == hWM_Parent ) + hDummy = hRoot; + if( hDummy != hRoot ) + { + hWM_Parent = hDummy; + if( bAccessParentWindow && bNone ) + XSetWindowBackgroundPixmap( pDisplay, hWM_Parent, None ); + } + if( Children ) + XFree( Children ); + } while( hDummy != hRoot ); + + if( GetStackingWindow() == None + && hWM_Parent != hPresentationWindow + && hWM_Parent != GetShellWindow() + && ( ! pDisableStackingCheck || ! *pDisableStackingCheck ) + ) + { + mhStackingWindow = hWM_Parent; + if (bAccessParentWindow) + XSelectInput( pDisplay, GetStackingWindow(), StructureNotifyMask ); + } + + if( hWM_Parent == pDisplay_->GetRootWindow( pDisplay_->GetDefaultScreenNumber() ) + || hWM_Parent == GetForeignParent() + || pEvent->parent == pDisplay_->GetRootWindow( pDisplay_->GetDefaultScreenNumber() ) + || ( nStyle_ & SAL_FRAME_STYLE_FLOAT ) ) + { + // Reparenting before Destroy + aPresentationReparentList.remove( GetStackingWindow() ); + mhStackingWindow = None; + GetDisplay()->GetXLib()->PopXErrorLevel(); + return 0; + } + + /* + * evil hack to show decorated windows on top + * of override redirect presentation windows: + * reparent the window manager window to the presentation window + * does not work with non-reparenting WMs + * in future this should not be necessary anymore with + * _NET_WM_STATE_FULLSCREEN available + */ + if( hPresentationWindow != None + && hPresentationWindow != GetWindow() + && GetStackingWindow() != None + && GetStackingWindow() != GetDisplay()->GetRootWindow( m_nScreen ) + ) + { + int x = 0, y = 0; + XLIB_Window aChild; + XTranslateCoordinates( GetXDisplay(), + GetStackingWindow(), + GetDisplay()->GetRootWindow( m_nScreen ), + 0, 0, + &x, &y, + &aChild + ); + XReparentWindow( GetXDisplay(), + GetStackingWindow(), + hPresentationWindow, + x, y + ); + aPresentationReparentList.push_back( GetStackingWindow() ); + } + + int nLeft = 0, nTop = 0; + XTranslateCoordinates( GetXDisplay(), + GetShellWindow(), + hWM_Parent, + 0, 0, + &nLeft, + &nTop, + &hDummy ); + maGeometry.nLeftDecoration = nLeft > 0 ? nLeft-1 : 0; + maGeometry.nTopDecoration = nTop > 0 ? nTop-1 : 0; + + /* + * decorations are not symmetric, + * so need real geometries here + * (this will fail with virtual roots ?) + */ + GetDisplay()->GetXLib()->ResetXErrorOccured(); + int xp, yp, x, y; + unsigned int wp, w, hp, h, bw, d; + XGetGeometry( GetXDisplay(), + GetShellWindow(), + &hRoot, + &x, &y, &w, &h, &bw, &d ); + XGetGeometry( GetXDisplay(), + hWM_Parent, + &hRoot, + &xp, &yp, &wp, &hp, &bw, &d ); + bool bResized = false; + if( ! GetDisplay()->GetXLib()->HasXErrorOccured() ) + { + maGeometry.nRightDecoration = wp - w - maGeometry.nLeftDecoration; + maGeometry.nBottomDecoration = hp - h - maGeometry.nTopDecoration; + /* + * note: this works because hWM_Parent is direct child of root, + * not necessarily parent of GetShellWindow() + */ + maGeometry.nX = xp + nLeft; + maGeometry.nY = yp + nTop; + bResized = w != maGeometry.nWidth || h != maGeometry.nHeight; + maGeometry.nWidth = w; + maGeometry.nHeight = h; + } + + + // limit width and height if we are too large: #47757 + // olwm and fvwm need this, it doesnt harm the rest + + // #i81311# do this only for sizable frames + if( (nStyle_ & SAL_FRAME_STYLE_SIZEABLE) != 0 ) + { + Size aScreenSize = GetDisplay()->GetScreenSize( m_nScreen ); + int nScreenWidth = aScreenSize.Width(); + int nScreenHeight = aScreenSize.Height(); + int nFrameWidth = maGeometry.nWidth + maGeometry.nLeftDecoration + maGeometry.nRightDecoration; + int nFrameHeight = maGeometry.nHeight + maGeometry.nTopDecoration + maGeometry.nBottomDecoration; + + if ((nFrameWidth > nScreenWidth) || (nFrameHeight > nScreenHeight)) + { + Size aSize(maGeometry.nWidth, maGeometry.nHeight); + + if (nFrameWidth > nScreenWidth) + aSize.Width() = nScreenWidth - maGeometry.nRightDecoration - maGeometry.nLeftDecoration; + if (nFrameHeight > nScreenHeight) + aSize.Height() = nScreenHeight - maGeometry.nBottomDecoration - maGeometry.nTopDecoration; + + SetSize( aSize ); + bResized = false; + } + } + if( bResized ) + CallCallback( SALEVENT_RESIZE, NULL ); + + GetDisplay()->GetXLib()->PopXErrorLevel(); + + return 1; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +long X11SalFrame::HandleColormapEvent( XColormapEvent* ) +{ + return 0; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +long X11SalFrame::HandleStateEvent( XPropertyEvent *pEvent ) +{ + Atom actual_type; + int actual_format; + unsigned long nitems, bytes_after; + unsigned char *prop = NULL; + + if( 0 != XGetWindowProperty( GetXDisplay(), + GetShellWindow(), + pEvent->atom, // property + 0, // long_offset (32bit) + 2, // long_length (32bit) + False, // delete + pEvent->atom, // req_type + &actual_type, + &actual_format, + &nitems, + &bytes_after, + &prop ) + || ! prop + ) + return 0; + + DBG_ASSERT( actual_type = pEvent->atom + && 32 == actual_format + && 2 == nitems + && 0 == bytes_after, "HandleStateEvent" ); + + if( *(unsigned long*)prop == NormalState ) + nShowState_ = SHOWSTATE_NORMAL; + else if( *(unsigned long*)prop == IconicState ) + nShowState_ = SHOWSTATE_MINIMIZED; + + XFree( prop ); + return 1; +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +long X11SalFrame::HandleClientMessage( XClientMessageEvent *pEvent ) +{ + const WMAdaptor& rWMAdaptor( *pDisplay_->getWMAdaptor() ); + +#if !defined(__synchronous_extinput__) + if( pEvent->message_type == rWMAdaptor.getAtom( WMAdaptor::SAL_EXTTEXTEVENT ) ) + { + HandleExtTextEvent (pEvent); + return 1; + } +#endif + else if( pEvent->message_type == rWMAdaptor.getAtom( WMAdaptor::SAL_QUITEVENT ) ) + { + stderr0( "X11SalFrame::Dispatch Quit\n" ); + Close(); // ??? + return 1; + } + else if( pEvent->message_type == rWMAdaptor.getAtom( WMAdaptor::WM_PROTOCOLS ) ) + { + if( (Atom)pEvent->data.l[0] == rWMAdaptor.getAtom( WMAdaptor::NET_WM_PING ) ) + rWMAdaptor.answerPing( this, pEvent ); + else if( ! ( nStyle_ & SAL_FRAME_STYLE_PLUG ) + && ! (( nStyle_ & SAL_FRAME_STYLE_FLOAT ) && (nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION)) + ) + { + if( (Atom)pEvent->data.l[0] == rWMAdaptor.getAtom( WMAdaptor::WM_DELETE_WINDOW ) ) + { + Close(); + return 1; + } + else if( (Atom)pEvent->data.l[0] == rWMAdaptor.getAtom( WMAdaptor::WM_TAKE_FOCUS ) ) + { + // do nothing, we set the input focus in ToTop() if necessary + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "got WM_TAKE_FOCUS on %s window\n", + (nStyle_&SAL_FRAME_STYLE_OWNERDRAWDECORATION) ? + "ownerdraw" : "NON OWNERDRAW" ); + #endif + } + else if( (Atom)pEvent->data.l[0] == rWMAdaptor.getAtom( WMAdaptor::WM_SAVE_YOURSELF ) ) + { + bool bSession = rWMAdaptor.getWindowManagerName().EqualsAscii( "Dtwm" ); + + if( ! bSession ) + { + if( this == s_pSaveYourselfFrame ) + { + ByteString aExec( SessionManagerClient::getExecName(), osl_getThreadTextEncoding() ); + const char* argv[2]; + argv[0] = "/bin/sh"; + argv[1] = const_cast(aExec.GetBuffer()); + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "SaveYourself request, setting command: %s %s\n", argv[0], argv[1] ); + #endif + XSetCommand( GetXDisplay(), GetShellWindow(), (char**)argv, 2 ); + } + else + // can only happen in race between WM and window closing + XChangeProperty( GetXDisplay(), GetShellWindow(), rWMAdaptor.getAtom( WMAdaptor::WM_COMMAND ), XA_STRING, 8, PropModeReplace, (unsigned char*)"", 0 ); + } + else + { + // save open documents; would be good for non Dtwm, too, + // but there is no real Shutdown message in the ancient + // SM protocol; on Dtwm SaveYourself really means Shutdown, too. + IceSalSession::handleOldX11SaveYourself( this ); + } + } + } + } + else if( pEvent->message_type == rWMAdaptor.getAtom( WMAdaptor::XEMBED ) && + pEvent->window == GetWindow() ) + { + if( pEvent->data.l[1] == 1 || // XEMBED_WINDOW_ACTIVATE + pEvent->data.l[1] == 2 ) // XEMBED_WINDOW_DEACTIVATE + { + XFocusChangeEvent aEvent; + aEvent.type = (pEvent->data.l[1] == 1 ? FocusIn : FocusOut); + aEvent.serial = pEvent->serial; + aEvent.send_event = True; + aEvent.display = pEvent->display; + aEvent.window = pEvent->window; + aEvent.mode = NotifyNormal; + aEvent.detail = NotifyDetailNone; + HandleFocusEvent( &aEvent ); + } + } + return 0; +} + +void X11SalFrame::SaveYourselfDone( SalFrame* pSaveFrame ) +{ + // session save was done, inform dtwm + if( s_pSaveYourselfFrame && pSaveFrame ) + { + ByteString aExec( SessionManagerClient::getExecName(), osl_getThreadTextEncoding() ); + const char* argv[2]; + argv[0] = "/bin/sh"; + argv[1] = const_cast(aExec.GetBuffer()); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "SaveYourself request, setting command: %s %s\n", argv[0], argv[1] ); +#endif + XSetCommand( s_pSaveYourselfFrame->GetXDisplay(), + s_pSaveYourselfFrame->GetShellWindow(), + (char**)argv, 2 ); + if( pSaveFrame != s_pSaveYourselfFrame ) + { + // check if it still exists + const X11SalFrame* pFrame = NULL; + const std::list< SalFrame* >& rFrames = static_cast(pSaveFrame)->GetDisplay()->getFrames(); + std::list< SalFrame* >::const_iterator it = rFrames.begin(); + while( it != rFrames.end() ) + { + pFrame = static_cast< const X11SalFrame* >(*it); + if( pFrame == pSaveFrame ) + break; + ++it; + } + if( pFrame == pSaveFrame ) + { + const WMAdaptor& rWMAdaptor( *pFrame->pDisplay_->getWMAdaptor() ); + XChangeProperty( pFrame->GetXDisplay(), + pFrame->GetShellWindow(), + rWMAdaptor.getAtom( WMAdaptor::WM_COMMAND ), XA_STRING, 8, PropModeReplace, (unsigned char*)"", 0 ); + } + } + s_pSaveYourselfFrame->ShutDown(); + } +} + +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +extern "C" +{ +Bool call_checkKeyReleaseForRepeat( Display* pDisplay, XEvent* pCheck, XPointer pX11SalFrame ) +{ + return X11SalFrame::checkKeyReleaseForRepeat( pDisplay, pCheck, pX11SalFrame ); +} +} + +Bool X11SalFrame::checkKeyReleaseForRepeat( Display*, XEvent* pCheck, XPointer pX11SalFrame ) +{ + X11SalFrame* pThis = (X11SalFrame*)pX11SalFrame; + return + pCheck->type == XLIB_KeyPress && + pCheck->xkey.state == pThis->nKeyState_ && + pCheck->xkey.keycode == pThis->nKeyCode_ && + pCheck->xkey.time == pThis->nReleaseTime_ ? True : False; +} + +long X11SalFrame::Dispatch( XEvent *pEvent ) +{ + long nRet = 0; + + if( -1 == nCaptured_ ) + { + CaptureMouse( TRUE ); +#ifdef DBG_UTIL + if( -1 != nCaptured_ ) + pDisplay_->PrintEvent( "Captured", pEvent ); +#endif + } + + if( pEvent->xany.window == GetShellWindow() || pEvent->xany.window == GetWindow() ) + { + switch( pEvent->type ) + { + case XLIB_KeyPress: + nKeyCode_ = pEvent->xkey.keycode; + nKeyState_ = pEvent->xkey.state; + nRet = HandleKeyEvent( &pEvent->xkey ); + break; + + case KeyRelease: + if( -1 == nCompose_ ) + { + nReleaseTime_ = pEvent->xkey.time; + XEvent aEvent; + if( XCheckIfEvent( pEvent->xkey.display, &aEvent, call_checkKeyReleaseForRepeat, (XPointer)this ) ) + XPutBackEvent( pEvent->xkey.display, &aEvent ); + else + nRet = HandleKeyEvent( &pEvent->xkey ); + } + break; + + case ButtonPress: + // #74406# if we loose the focus in presentation mode + // there are good chances that we never get it back + // since the WM ignores us + if( IsOverrideRedirect() ) + { + XSetInputFocus( GetXDisplay(), GetShellWindow(), + RevertToNone, CurrentTime ); + } + + case ButtonRelease: + case MotionNotify: + case EnterNotify: + case LeaveNotify: + nRet = HandleMouseEvent( pEvent ); + break; + + case FocusIn: + case FocusOut: + nRet = HandleFocusEvent( &pEvent->xfocus ); + break; + + case Expose: + case GraphicsExpose: + nRet = HandleExposeEvent( pEvent ); + break; + + case MapNotify: + if( pEvent->xmap.window == GetShellWindow() ) + { + if( nShowState_ == SHOWSTATE_HIDDEN ) + { + /* + * #95097# workaround for (at least) KWin 2.2.2 + * which will map windows that were once transient + * even if they are withdrawn when the respective + * document is mapped. + */ + if( ! (nStyle_ & SAL_FRAME_STYLE_PLUG) ) + XUnmapWindow( GetXDisplay(), GetShellWindow() ); + break; + } + bMapped_ = TRUE; + bViewable_ = TRUE; + nRet = TRUE; + if ( mpInputContext != NULL ) + mpInputContext->Map( this ); + CallCallback( SALEVENT_RESIZE, NULL ); + if( pDisplay_->GetServerVendor() == vendor_hummingbird ) + { + /* + * With Exceed sometimes there does not seem to be + * an Expose after the MapNotify. + * so start a delayed paint here + */ + maPaintRegion.Union( Rectangle( Point( 0, 0 ), Size( maGeometry.nWidth, maGeometry.nHeight ) ) ); + XEvent aEvent; + aEvent.xexpose.type = Expose; + aEvent.xexpose.display = pDisplay_->GetDisplay(); + aEvent.xexpose.x = 0; + aEvent.xexpose.y = 0; + aEvent.xexpose.width = maGeometry.nWidth; + aEvent.xexpose.height = maGeometry.nHeight; + aEvent.xexpose.count = 0; + XSendEvent( pDisplay_->GetDisplay(), + GetWindow(), + True, + ExposureMask, + &aEvent ); + } + + bool bSetFocus = m_bSetFocusOnMap; + /* #99570# another workaround for sawfish: if a transient window for the same parent is shown + * sawfish does not set the focus to it. Applies only for click to focus mode. + */ + if( ! (nStyle_ & SAL_FRAME_STYLE_FLOAT ) && mbInShow && GetDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii( "Sawfish" ) ) + { + // #101775# don't set the focus into the IME status window + // since this will lead to a parent loose-focus, close status, + // reget focus, open status, .... flicker loop + if ( (I18NStatus::get().getStatusFrame() != this) ) + bSetFocus = true; + } + + /* + * sometimes a message box/dialogue is brought up when a frame is not mapped + * the corresponding TRANSIENT_FOR hint is then set to the root window + * so that the dialogue shows in all cases. Correct it here if the + * frame is shown afterwards. + */ + if( ! IsChildWindow() + && ! IsOverrideRedirect() + && ! IsFloatGrabWindow() + ) + { + for( std::list< X11SalFrame* >::const_iterator it = maChildren.begin(); + it != maChildren.end(); ++it ) + { + if( (*it)->mbTransientForRoot ) + pDisplay_->getWMAdaptor()->changeReferenceFrame( *it, this ); + } + } + + if( hPresentationWindow != None && GetShellWindow() == hPresentationWindow ) + XSetInputFocus( GetXDisplay(), GetShellWindow(), RevertToParent, CurrentTime ); + /* For unknown reasons Dtwm does respect the input_hint + * set to False, but not when mapping the window. So + * emulate the correct behaviour and set the focus back + * to where it most probably should have been. + */ + if( (nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION) && + mpParent && + GetDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii( "Dtwm" ) + ) + { + XSetInputFocus( GetXDisplay(), + mpParent->GetShellWindow(), + RevertToParent, + CurrentTime ); + bSetFocus = false; + } + + if( bSetFocus ) + { + XSetInputFocus( GetXDisplay(), + GetShellWindow(), + RevertToParent, + CurrentTime ); + } + + + RestackChildren(); + mbInShow = FALSE; + m_bSetFocusOnMap = false; + } + break; + + case UnmapNotify: + if( pEvent->xunmap.window == GetShellWindow() ) + { + bMapped_ = FALSE; + bViewable_ = FALSE; + nRet = TRUE; + if ( mpInputContext != NULL ) + mpInputContext->Unmap( this ); + CallCallback( SALEVENT_RESIZE, NULL ); + } + break; + + case ConfigureNotify: + if( pEvent->xconfigure.window == GetShellWindow() + || pEvent->xconfigure.window == GetWindow() ) + nRet = HandleSizeEvent( &pEvent->xconfigure ); + break; + + case VisibilityNotify: + nVisibility_ = pEvent->xvisibility.state; + nRet = TRUE; + if( bAlwaysOnTop_ + && bMapped_ + && ! GetDisplay()->getWMAdaptor()->isAlwaysOnTopOK() + && nVisibility_ != VisibilityUnobscured ) + maAlwaysOnTopRaiseTimer.Start(); + break; + + case ReparentNotify: + nRet = HandleReparentEvent( &pEvent->xreparent ); + break; + + case MappingNotify: + if( MappingPointer != pEvent->xmapping.request ) + nRet = CallCallback( SALEVENT_KEYBOARDCHANGED, 0 ); + break; + + case ColormapNotify: + nRet = HandleColormapEvent( &pEvent->xcolormap ); + break; + + case PropertyNotify: + { + if( pEvent->xproperty.atom == pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::WM_STATE ) ) + nRet = HandleStateEvent( &pEvent->xproperty ); + else + nRet = pDisplay_->getWMAdaptor()->handlePropertyNotify( this, &pEvent->xproperty ); + break; + } + + case ClientMessage: + nRet = HandleClientMessage( &pEvent->xclient ); + break; + } + } + else + { + switch( pEvent->type ) + { + case FocusIn: + case FocusOut: + if( ( nStyle_ & SAL_FRAME_STYLE_PLUG ) + && ( pEvent->xfocus.window == GetShellWindow() + || pEvent->xfocus.window == GetForeignParent() ) + ) + { + nRet = HandleFocusEvent( &pEvent->xfocus ); + } + break; + + case ConfigureNotify: + if( pEvent->xconfigure.window == GetForeignParent() || + pEvent->xconfigure.window == GetShellWindow() ) + nRet = HandleSizeEvent( &pEvent->xconfigure ); + + if( pEvent->xconfigure.window == GetStackingWindow() ) + nRet = HandleSizeEvent( &pEvent->xconfigure ); + + RestackChildren(); + break; + } + } + + return nRet; +} + +void X11SalFrame::ResetClipRegion() +{ + delete [] m_pClipRectangles; + m_pClipRectangles = NULL; + m_nCurClipRect = m_nMaxClipRect = 0; + + const int dest_kind = ShapeBounding; + const int op = ShapeSet; + const int ordering = YSorted; + + XWindowAttributes win_attrib; + XRectangle win_size; + + XLIB_Window aShapeWindow = mhShellWindow; + + XGetWindowAttributes ( GetDisplay()->GetDisplay(), + aShapeWindow, + &win_attrib ); + + win_size.x = 0; + win_size.y = 0; + win_size.width = win_attrib.width; + win_size.height = win_attrib.height; + + XShapeCombineRectangles ( GetDisplay()->GetDisplay(), + aShapeWindow, + dest_kind, + 0, 0, // x_off, y_off + &win_size, // list of rectangles + 1, // number of rectangles + op, ordering ); +} + +void X11SalFrame::BeginSetClipRegion( ULONG nRects ) +{ + if( m_pClipRectangles ) + delete [] m_pClipRectangles; + if( nRects ) + m_pClipRectangles = new XRectangle[nRects]; + else + m_pClipRectangles = NULL; + m_nMaxClipRect = static_cast(nRects); + m_nCurClipRect = 0; +} + +void X11SalFrame::UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) +{ + if( m_pClipRectangles && m_nCurClipRect < m_nMaxClipRect ) + { + m_pClipRectangles[m_nCurClipRect].x = nX; + m_pClipRectangles[m_nCurClipRect].y = nY; + m_pClipRectangles[m_nCurClipRect].width = nWidth; + m_pClipRectangles[m_nCurClipRect].height = nHeight; + m_nCurClipRect++; + } +} + +void X11SalFrame::EndSetClipRegion() +{ + const int dest_kind = ShapeBounding; + const int ordering = YSorted; + const int op = ShapeSet; + + XLIB_Window aShapeWindow = mhShellWindow; + XShapeCombineRectangles ( GetDisplay()->GetDisplay(), + aShapeWindow, + dest_kind, + 0, 0, // x_off, y_off + m_pClipRectangles, + m_nCurClipRect, + op, ordering ); + +} + diff --git a/vcl/unx/generic/window/salobj.cxx b/vcl/unx/generic/window/salobj.cxx new file mode 100644 index 000000000000..6651b5b3eccb --- /dev/null +++ b/vcl/unx/generic/window/salobj.cxx @@ -0,0 +1,567 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#if OSL_DEBUG_LEVEL > 1 +#include +#endif +#include + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + + +// ======================================================================= +// SalInstance member to create and destroy a SalObject + +SalObject* X11SalInstance::CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow ) +{ + return X11SalObject::CreateObject( pParent, pWindowData, bShow ); +} + +X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow ) +{ + int error_base, event_base; + X11SalObject* pObject = new X11SalObject(); + SystemChildData* pObjData = const_cast(pObject->GetSystemData()); + + if ( ! XShapeQueryExtension( (Display*)pObjData->pDisplay, + &event_base, &error_base ) ) + { + delete pObject; + return NULL; + } + + pObject->mpParent = pParent; + + SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); + const SystemEnvData* pEnv = pParent->GetSystemData(); + Display* pDisp = pSalDisp->GetDisplay(); + XLIB_Window aObjectParent = (XLIB_Window)pEnv->aWindow; + + // find out on which screen that window is + XWindowAttributes aParentAttr; + XGetWindowAttributes( pDisp, aObjectParent, &aParentAttr ); + int nScreen = XScreenNumberOfScreen( aParentAttr.screen ); + Visual* pVisual = (pWindowData && pWindowData->pVisual) ? + (Visual*)pWindowData->pVisual : + pSalDisp->GetVisual( nScreen ).GetVisual(); + // get visual info + VisualID aVisID = XVisualIDFromVisual( pVisual ); + XVisualInfo aTemplate; + aTemplate.visualid = aVisID; + int nVisuals = 0; + XVisualInfo* pInfos = XGetVisualInfo( pDisp, VisualIDMask, &aTemplate, &nVisuals ); + // only one VisualInfo structure can match the visual id + DBG_ASSERT( nVisuals == 1, "match count for visual id is not 1" ); + unsigned int nDepth = pInfos->depth; + XFree( pInfos ); + XSetWindowAttributes aAttribs; + aAttribs.event_mask = StructureNotifyMask + | ButtonPressMask + | ButtonReleaseMask + | PointerMotionMask + | EnterWindowMask + | LeaveWindowMask + | FocusChangeMask + | ExposureMask + ; + + pObject->maPrimary = + XCreateSimpleWindow( pDisp, + aObjectParent, + 0, 0, + 1, 1, 0, + pSalDisp->GetColormap( nScreen ).GetBlackPixel(), + pSalDisp->GetColormap( nScreen ).GetWhitePixel() + ); + if( aVisID == pSalDisp->GetVisual( nScreen ).GetVisualId() ) + { + pObject->maSecondary = + XCreateSimpleWindow( pDisp, + pObject->maPrimary, + 0, 0, + 1, 1, 0, + pSalDisp->GetColormap( nScreen ).GetBlackPixel(), + pSalDisp->GetColormap( nScreen ).GetWhitePixel() + ); + } + else + { + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "visual id of vcl %x, of visual %x\n", + static_cast (pSalDisp->GetVisual( nScreen ).GetVisualId()), + static_cast (aVisID) ); + #endif + pSalDisp->GetXLib()->PushXErrorLevel( true ); + + // create colormap for visual - there might not be one + pObject->maColormap = aAttribs.colormap = XCreateColormap( + pDisp, + pSalDisp->GetRootWindow( nScreen ), + pVisual, + AllocNone ); + + pObject->maSecondary = + XCreateWindow( pDisp, + pSalDisp->GetRootWindow( nScreen ), + 0, 0, + 1, 1, 0, + nDepth, InputOutput, + pVisual, + CWEventMask|CWColormap, &aAttribs ); + XSync( pDisp, False ); + BOOL bWasXError = pSalDisp->GetXLib()->HasXErrorOccured(); + pSalDisp->GetXLib()->PopXErrorLevel(); + if( bWasXError ) + { + pObject->maSecondary = None; + delete pObject; + return NULL; + } + XReparentWindow( pDisp, pObject->maSecondary, pObject->maPrimary, 0, 0 ); + } + + pSalDisp->GetXLib()->PushXErrorLevel( true ); + if( bShow ) { + XMapWindow( pDisp, pObject->maSecondary ); + XMapWindow( pDisp, pObject->maPrimary ); + } + + pObjData->pDisplay = pDisp; + pObjData->aWindow = pObject->maSecondary; + pObjData->pWidget = NULL; + pObjData->pVisual = pVisual; + pObjData->nDepth = nDepth; + pObjData->aColormap = aVisID == pSalDisp->GetVisual( nScreen ).GetVisualId() ? + pSalDisp->GetColormap( nScreen ).GetXColormap() : None; + pObjData->pAppContext = NULL; + + XSync(pDisp, False); + BOOL bWasXError = pSalDisp->GetXLib()->HasXErrorOccured(); + pSalDisp->GetXLib()->PopXErrorLevel(); + if( bWasXError ) + { + delete pObject; + return NULL; + } + + return pObject; +} + + +void X11SalInstance::DestroyObject( SalObject* pObject ) +{ + delete pObject; +} + + +// ====================================================================== +// SalClipRegion is a member of SalObject +// definition of SalClipRegion my be found in unx/inc/salobj.h + + +SalClipRegion::SalClipRegion() +{ + ClipRectangleList = NULL; + numClipRectangles = 0; + maxClipRectangles = 0; + nClipRegionType = SAL_OBJECT_CLIP_INCLUDERECTS; +} + + +SalClipRegion::~SalClipRegion() +{ + if ( ClipRectangleList ) + delete [] ClipRectangleList; +} + + +void +SalClipRegion::BeginSetClipRegion( ULONG nRects ) +{ + if (ClipRectangleList) + delete [] ClipRectangleList; + + ClipRectangleList = new XRectangle[nRects]; + numClipRectangles = 0; + maxClipRectangles = nRects; +} + + +void +SalClipRegion::UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) +{ + if ( nWidth && nHeight && (numClipRectangles < maxClipRectangles) ) + { + XRectangle *aRect = ClipRectangleList + numClipRectangles; + + aRect->x = (short) nX; + aRect->y = (short) nY; + aRect->width = (unsigned short) nWidth; + aRect->height= (unsigned short) nHeight; + + numClipRectangles++; + } +} + + +// ======================================================================= +// SalObject Implementation + + +X11SalObject::X11SalObject() +{ + maSystemChildData.nSize = sizeof( SystemChildData ); + maSystemChildData.pDisplay = GetX11SalData()->GetDisplay()->GetDisplay(); + maSystemChildData.aWindow = None; + maSystemChildData.pSalFrame = 0; + maSystemChildData.pWidget = 0; + maSystemChildData.pVisual = 0; + maSystemChildData.nDepth = 0; + maSystemChildData.aColormap = 0; + maSystemChildData.pAppContext = NULL; + maSystemChildData.aShellWindow = 0; + maSystemChildData.pShellWidget = NULL; + maPrimary = 0; + maSecondary = 0; + maColormap = 0; + + std::list< SalObject* >& rObjects = GetX11SalData()->GetDisplay()->getSalObjects(); + rObjects.push_back( this ); +} + + +X11SalObject::~X11SalObject() +{ + std::list< SalObject* >& rObjects = GetX11SalData()->GetDisplay()->getSalObjects(); + rObjects.remove( this ); + SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); + pSalDisp->GetXLib()->PushXErrorLevel( true ); + if ( maSecondary ) + XDestroyWindow( (Display*)maSystemChildData.pDisplay, maSecondary ); + if ( maPrimary ) + XDestroyWindow( (Display*)maSystemChildData.pDisplay, maPrimary ); + if ( maColormap ) + XFreeColormap((Display*)maSystemChildData.pDisplay, maColormap); + XSync( (Display*)maSystemChildData.pDisplay, False ); + pSalDisp->GetXLib()->PopXErrorLevel(); +} + + +void +X11SalObject::ResetClipRegion() +{ + maClipRegion.ResetClipRegion(); + + const int dest_kind = ShapeBounding; + const int op = ShapeSet; + const int ordering = YSorted; + + XWindowAttributes win_attrib; + XRectangle win_size; + + XLIB_Window aShapeWindow = maPrimary; + + XGetWindowAttributes ( (Display*)maSystemChildData.pDisplay, + aShapeWindow, + &win_attrib ); + + win_size.x = 0; + win_size.y = 0; + win_size.width = win_attrib.width; + win_size.height = win_attrib.height; + + XShapeCombineRectangles ( (Display*)maSystemChildData.pDisplay, + aShapeWindow, + dest_kind, + 0, 0, // x_off, y_off + &win_size, // list of rectangles + 1, // number of rectangles + op, ordering ); +} + + +void +X11SalObject::BeginSetClipRegion( ULONG nRectCount ) +{ + maClipRegion.BeginSetClipRegion ( nRectCount ); +} + + +void +X11SalObject::UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) +{ + maClipRegion.UnionClipRegion ( nX, nY, nWidth, nHeight ); +} + + +void +X11SalObject::EndSetClipRegion() +{ + XRectangle *pRectangles = maClipRegion.EndSetClipRegion (); + const int nType = maClipRegion.GetClipRegionType(); + const int nRectangles = maClipRegion.GetRectangleCount(); + + const int dest_kind = ShapeBounding; + const int ordering = YSorted; + int op; + + switch ( nType ) + { + case SAL_OBJECT_CLIP_INCLUDERECTS : + op = ShapeSet; + break; + case SAL_OBJECT_CLIP_EXCLUDERECTS : + op = ShapeSubtract; + break; + case SAL_OBJECT_CLIP_ABSOLUTE : + op = ShapeSet; + break; + default : + op = ShapeUnion; + } + + XLIB_Window aShapeWindow = maPrimary; + + XShapeCombineRectangles ( (Display*)maSystemChildData.pDisplay, + aShapeWindow, + dest_kind, + 0, 0, // x_off, y_off + pRectangles, + nRectangles, + op, ordering ); +} + + +USHORT +X11SalObject::GetClipRegionType() +{ + return maClipRegion.GetClipRegionType(); +} + +// ----------------------------------------------------------------------- + +void +X11SalObject::SetPosSize( long nX, long nY, long nWidth, long nHeight ) +{ + if ( maPrimary && maSecondary && nWidth && nHeight ) + { + XMoveResizeWindow( (Display*)maSystemChildData.pDisplay, + maPrimary, + nX, nY, nWidth, nHeight ); + XMoveResizeWindow( (Display*)maSystemChildData.pDisplay, + maSecondary, + 0, 0, nWidth, nHeight ); + } +} + + +void +X11SalObject::Show( BOOL bVisible ) +{ + if ( ! maSystemChildData.aWindow ) + return; + + if ( bVisible ) { + XMapWindow( (Display*)maSystemChildData.pDisplay, + maSecondary ); + XMapWindow( (Display*)maSystemChildData.pDisplay, + maPrimary ); + } else { + XUnmapWindow( (Display*)maSystemChildData.pDisplay, + maPrimary ); + XUnmapWindow( (Display*)maSystemChildData.pDisplay, + maSecondary ); + } + mbVisible = bVisible; +} + +// ----------------------------------------------------------------------- + +void X11SalObject::Enable( BOOL ) +{ +} + +// ----------------------------------------------------------------------- + +void X11SalObject::GrabFocus() +{ + if( mbVisible ) + XSetInputFocus( (Display*)maSystemChildData.pDisplay, + maSystemChildData.aWindow, + RevertToNone, + CurrentTime ); +} + +// ----------------------------------------------------------------------- + +void X11SalObject::SetBackground() +{ +} + +// ----------------------------------------------------------------------- + +void X11SalObject::SetBackground( SalColor ) +{ +} + +// ----------------------------------------------------------------------- + +const SystemChildData* X11SalObject::GetSystemData() const +{ + return &maSystemChildData; +} + +static USHORT sal_GetCode( int state ) +{ + USHORT nCode = 0; + + if( state & Button1Mask ) + nCode |= MOUSE_LEFT; + if( state & Button2Mask ) + nCode |= MOUSE_MIDDLE; + if( state & Button3Mask ) + nCode |= MOUSE_RIGHT; + + if( state & ShiftMask ) + nCode |= KEY_SHIFT; + if( state & ControlMask ) + nCode |= KEY_MOD1; + if( state & Mod1Mask ) + nCode |= KEY_MOD2; + if( state & Mod3Mask ) + nCode |= KEY_MOD3; + + return nCode; +} + +long X11SalObject::Dispatch( XEvent* pEvent ) +{ + std::list< SalObject* >& rObjects = GetX11SalData()->GetDisplay()->getSalObjects(); + + for( std::list< SalObject* >::iterator it = rObjects.begin(); it != rObjects.end(); ++it ) + { + X11SalObject* pObject = static_cast(*it); + if( pEvent->xany.window == pObject->maPrimary || + pEvent->xany.window == pObject->maSecondary ) + { + if( pObject->IsMouseTransparent() && ( + pEvent->type == ButtonPress || + pEvent->type == ButtonRelease || + pEvent->type == EnterNotify || + pEvent->type == LeaveNotify || + pEvent->type == MotionNotify + ) + ) + { + SalMouseEvent aEvt; + const SystemEnvData* pParentData = pObject->mpParent->GetSystemData(); + int dest_x, dest_y; + XLIB_Window aChild = None; + XTranslateCoordinates( pEvent->xbutton.display, + pEvent->xbutton.root, + pParentData->aWindow, + pEvent->xbutton.x_root, + pEvent->xbutton.y_root, + &dest_x, &dest_y, + &aChild ); + aEvt.mnX = dest_x; + aEvt.mnY = dest_y; + aEvt.mnTime = pEvent->xbutton.time; + aEvt.mnCode = sal_GetCode( pEvent->xbutton.state ); + aEvt.mnButton = 0; + USHORT nEvent = 0; + if( pEvent->type == ButtonPress || + pEvent->type == ButtonRelease ) + { + switch( pEvent->xbutton.button ) + { + case Button1: aEvt.mnButton = MOUSE_LEFT;break; + case Button2: aEvt.mnButton = MOUSE_MIDDLE;break; + case Button3: aEvt.mnButton = MOUSE_RIGHT;break; + } + nEvent = (pEvent->type == ButtonPress) ? + SALEVENT_MOUSEBUTTONDOWN : + SALEVENT_MOUSEBUTTONUP; + } + else if( pEvent->type == EnterNotify ) + nEvent = SALEVENT_MOUSELEAVE; + else + nEvent = SALEVENT_MOUSEMOVE; + pObject->mpParent->CallCallback( nEvent, &aEvt ); + } + else + { + switch( pEvent->type ) + { + case UnmapNotify: + pObject->mbVisible = FALSE; + return 1; + case MapNotify: + pObject->mbVisible = TRUE; + return 1; + case ButtonPress: + pObject->CallCallback( SALOBJ_EVENT_TOTOP, NULL ); + return 1; + case FocusIn: + pObject->CallCallback( SALOBJ_EVENT_GETFOCUS, NULL ); + return 1; + case FocusOut: + pObject->CallCallback( SALOBJ_EVENT_LOSEFOCUS, NULL ); + return 1; + default: break; + } + } + return 0; + } + } + return 0; +} + +// ----------------------------------------------------------------------- + +void X11SalObject::InterceptChildWindowKeyDown( sal_Bool /*bIntercept*/ ) +{ +} + diff --git a/vcl/unx/gtk/a11y/atkbridge.cxx b/vcl/unx/gtk/a11y/atkbridge.cxx index 25add8e0dd18..71c05bd16626 100644 --- a/vcl/unx/gtk/a11y/atkbridge.cxx +++ b/vcl/unx/gtk/a11y/atkbridge.cxx @@ -28,8 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include -#include +#include +#include #include "atkfactory.hxx" #include "atkutil.hxx" diff --git a/vcl/unx/gtk/a11y/atkfactory.cxx b/vcl/unx/gtk/a11y/atkfactory.cxx index d2574f616539..9588123f4032 100644 --- a/vcl/unx/gtk/a11y/atkfactory.cxx +++ b/vcl/unx/gtk/a11y/atkfactory.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include +#include #include #include "atkwrapper.hxx" #include "atkfactory.hxx" diff --git a/vcl/unx/gtk/a11y/atkwindow.cxx b/vcl/unx/gtk/a11y/atkwindow.cxx index 5448235998e8..83c1c14876e1 100644 --- a/vcl/unx/gtk/a11y/atkwindow.cxx +++ b/vcl/unx/gtk/a11y/atkwindow.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include +#include #include #include "vcl/popupmenuwindow.hxx" diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx index f308822df147..eac10d041021 100644 --- a/vcl/unx/gtk/app/gtkdata.cxx +++ b/vcl/unx/gtk/app/gtkdata.cxx @@ -46,19 +46,19 @@ #include #include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include -#include "i18n_im.hxx" -#include "i18n_xkb.hxx" -#include +#include "unx/i18n_im.hxx" +#include "unx/i18n_xkb.hxx" +#include -#include "../../unx/source/inc/salcursors.h" +#include "unx/x11_cursors/salcursors.h" #include diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx index 2cb92ecd8292..22adb201aa72 100644 --- a/vcl/unx/gtk/app/gtkinst.cxx +++ b/vcl/unx/gtk/app/gtkinst.cxx @@ -29,13 +29,12 @@ #include "precompiled_vcl.hxx" #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx index 272af20d0886..daaf4b27bc5c 100644 --- a/vcl/unx/gtk/app/gtksys.cxx +++ b/vcl/unx/gtk/app/gtksys.cxx @@ -28,10 +28,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include -#include +#include +#include #include -#include +#include #include #include #include diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index ff615f5ede74..a97198d7def8 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -28,12 +28,16 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "plugins/gtk/gtkframe.hxx" -#include "plugins/gtk/gtkdata.hxx" -#include "plugins/gtk/gtkinst.hxx" -#include "plugins/gtk/gtkgdi.hxx" +#include "vcl/svapp.hxx" + +#include "unx/gtk/gtkframe.hxx" +#include "unx/gtk/gtkdata.hxx" +#include "unx/gtk/gtkinst.hxx" +#include "unx/gtk/gtkgdi.hxx" -#include "pspgraphics.h" +#include "unx/pspgraphics.h" +#include "unx/saldata.hxx" +#include "unx/saldisp.hxx" #include #include @@ -41,10 +45,6 @@ #include #include -#include "saldata.hxx" -#include "saldisp.hxx" -#include "vcl/svapp.hxx" - typedef struct _cairo_font_options cairo_font_options_t; // initialize statics diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx index 9181ee3fd40d..f26750695180 100644 --- a/vcl/unx/gtk/window/gtkframe.cxx +++ b/vcl/unx/gtk/window/gtkframe.cxx @@ -28,17 +28,16 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include -#include -#include -#include +#include +#include +#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include -#include #include #include @@ -49,8 +48,8 @@ #include #include #include -#include -#include +#include +#include #include diff --git a/vcl/unx/gtk/window/gtkobject.cxx b/vcl/unx/gtk/window/gtkobject.cxx index c5f5a168f653..f2ab26179d27 100644 --- a/vcl/unx/gtk/window/gtkobject.cxx +++ b/vcl/unx/gtk/window/gtkobject.cxx @@ -28,10 +28,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include -#include -#include -#include +#include +#include +#include +#include GtkSalObject::GtkSalObject( GtkSalFrame* pParent, BOOL bShow ) : m_pSocket( NULL ), diff --git a/vcl/unx/headless/svpbmp.hxx b/vcl/unx/headless/svpbmp.hxx index dc775e66aaf1..5573fa0ef940 100644 --- a/vcl/unx/headless/svpbmp.hxx +++ b/vcl/unx/headless/svpbmp.hxx @@ -28,7 +28,7 @@ #ifndef SVP_SVBMP_HXX #define SVP_SVBMP_HXX -#include +#include #include "svpelement.hxx" class SvpSalBitmap : public SalBitmap, public SvpElement diff --git a/vcl/unx/headless/svpdummies.hxx b/vcl/unx/headless/svpdummies.hxx index ea7667ce51ca..7d6ef9221395 100644 --- a/vcl/unx/headless/svpdummies.hxx +++ b/vcl/unx/headless/svpdummies.hxx @@ -27,10 +27,11 @@ #ifndef _SVP_SVPDUMMIES_HXX -#include #include -#include -#include + +#include +#include +#include class SalGraphics; diff --git a/vcl/unx/headless/svpframe.hxx b/vcl/unx/headless/svpframe.hxx index de968bbf7a4a..692a117b184d 100644 --- a/vcl/unx/headless/svpframe.hxx +++ b/vcl/unx/headless/svpframe.hxx @@ -27,9 +27,9 @@ #ifndef _SVP_SVPFRAME_HXX -#include #include +#include #include "svpelement.hxx" #include diff --git a/vcl/unx/headless/svpgdi.hxx b/vcl/unx/headless/svpgdi.hxx index 93ec080d0136..829ba84295c8 100644 --- a/vcl/unx/headless/svpgdi.hxx +++ b/vcl/unx/headless/svpgdi.hxx @@ -27,11 +27,12 @@ #ifndef _SVP_SVPGDI_HXX -#include -#include #include #include +#include +#include + class ServerFont; class SvpSalGraphics : public SalGraphics diff --git a/vcl/unx/headless/svpinst.cxx b/vcl/unx/headless/svpinst.cxx index 09e359ca3f71..d53ed5cf202d 100644 --- a/vcl/unx/headless/svpinst.cxx +++ b/vcl/unx/headless/svpinst.cxx @@ -30,17 +30,19 @@ #include #include +#include + +#include + #include "svpinst.hxx" #include "svpframe.hxx" #include "svpdummies.hxx" #include "svpvd.hxx" #include "svpbmp.hxx" -#include -#include -#include -#include -#include +#include +#include +#include // plugin factory function extern "C" diff --git a/vcl/unx/headless/svpinst.hxx b/vcl/unx/headless/svpinst.hxx index 02d5e3fa9494..fe873a5f7940 100644 --- a/vcl/unx/headless/svpinst.hxx +++ b/vcl/unx/headless/svpinst.hxx @@ -28,12 +28,13 @@ #ifndef _SVP_SALINST_HXX #define _SVP_SALINST_HXX -#include -#include -#include #include #include +#include +#include +#include + #include #include // timeval diff --git a/vcl/unx/headless/svpprn.cxx b/vcl/unx/headless/svpprn.cxx index 5b461bb996ef..2be922038bd7 100644 --- a/vcl/unx/headless/svpprn.cxx +++ b/vcl/unx/headless/svpprn.cxx @@ -28,21 +28,22 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" +#include +#include +#include + #include "vcl/svapp.hxx" -#include "vcl/jobset.h" -#include "vcl/print.h" -#include "vcl/salptype.hxx" #include "vcl/timer.hxx" #include "vcl/printerinfomanager.hxx" +#include "jobset.h" +#include "print.h" +#include "salptype.hxx" + #include "svpprn.hxx" #include "svppspgraphics.hxx" #include "svpinst.hxx" -#include -#include -#include - using namespace psp; using namespace rtl; diff --git a/vcl/unx/headless/svpprn.hxx b/vcl/unx/headless/svpprn.hxx index 0da506076908..f53cf97e0eed 100644 --- a/vcl/unx/headless/svpprn.hxx +++ b/vcl/unx/headless/svpprn.hxx @@ -29,9 +29,10 @@ #define _SVP_SVPPRN_HXX #include "vcl/jobdata.hxx" -#include "vcl/printergfx.hxx" -#include "vcl/printerjob.hxx" -#include "vcl/salprn.hxx" + +#include "printergfx.hxx" +#include "printerjob.hxx" +#include "salprn.hxx" class PspGraphics; diff --git a/vcl/unx/headless/svppspgraphics.cxx b/vcl/unx/headless/svppspgraphics.cxx index c7b1f4f41fca..253dd0b8c792 100644 --- a/vcl/unx/headless/svppspgraphics.cxx +++ b/vcl/unx/headless/svppspgraphics.cxx @@ -28,32 +28,33 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "svppspgraphics.hxx" -#include "svpbmp.hxx" +#include +#include +#include +#include +#include +#include + +#include "basegfx/vector/b2ivector.hxx" +#include "basegfx/point/b2ipoint.hxx" + +#include "basebmp/color.hxx" #include "vcl/jobdata.hxx" -#include "vcl/printergfx.hxx" #include "vcl/printerinfomanager.hxx" #include "vcl/bmpacc.hxx" -#include "vcl/salbmp.hxx" -#include "vcl/glyphcache.hxx" -#include "vcl/impfont.hxx" -#include "vcl/outfont.hxx" -#include "vcl/fontsubset.hxx" #include "vcl/svapp.hxx" -#include "vcl/salprn.hxx" #include "vcl/sysdata.hxx" -#include "basegfx/vector/b2ivector.hxx" -#include "basegfx/point/b2ipoint.hxx" -#include "basebmp/color.hxx" - -#include -#include -#include -#include -#include -#include +#include "salprn.hxx" +#include "salbmp.hxx" +#include "glyphcache.hxx" +#include "impfont.hxx" +#include "outfont.hxx" +#include "fontsubset.hxx" +#include "printergfx.hxx" +#include "svppspgraphics.hxx" +#include "svpbmp.hxx" using namespace psp; using namespace rtl; diff --git a/vcl/unx/headless/svppspgraphics.hxx b/vcl/unx/headless/svppspgraphics.hxx index 138198239621..4e4085773200 100644 --- a/vcl/unx/headless/svppspgraphics.hxx +++ b/vcl/unx/headless/svppspgraphics.hxx @@ -30,8 +30,9 @@ #include "vcl/fontmanager.hxx" -#include "vcl/sallayout.hxx" -#include "vcl/salgdi.hxx" + +#include "sallayout.hxx" +#include "salgdi.hxx" namespace psp { struct JobData; class PrinterGfx; } diff --git a/vcl/unx/headless/svptext.cxx b/vcl/unx/headless/svptext.cxx index dff1fd4d6ca7..a229859a9570 100644 --- a/vcl/unx/headless/svptext.cxx +++ b/vcl/unx/headless/svptext.cxx @@ -25,12 +25,10 @@ * ************************************************************************/ -#include "svpgdi.hxx" -#include "svpbmp.hxx" - #include #include #include + #include #include @@ -39,10 +37,12 @@ #include #endif -#include -#include -#include +#include +#include +#include +#include "svpgdi.hxx" +#include "svpbmp.hxx" #include "svppspgraphics.hxx" using namespace basegfx; diff --git a/vcl/unx/headless/svpvd.hxx b/vcl/unx/headless/svpvd.hxx index 083547cf19a9..dbe3d8072647 100644 --- a/vcl/unx/headless/svpvd.hxx +++ b/vcl/unx/headless/svpvd.hxx @@ -28,7 +28,7 @@ #ifndef _SVP_SVPVD_HXX #define _SVP_SVPVD_HXX -#include +#include #include "svpelement.hxx" #include diff --git a/vcl/unx/inc/XIM.h b/vcl/unx/inc/XIM.h deleted file mode 100644 index b00634090b5d..000000000000 --- a/vcl/unx/inc/XIM.h +++ /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 _XIM_h -#define _XIM_h - -#include -#include - -#ifdef __cplusplus -extern "C" -#endif -XIM XvaOpenIM( Display*, XrmDatabase, char*, char*, ... ); - -extern Status XCloseIM(XIM); - -#ifndef XIMCallback1 -typedef int (*XIMProc1)(XIC, XPointer, XPointer); -typedef struct { - XPointer client_data; - XIMProc1 callback; -} XIMCallback1; -#endif - -typedef struct _XIMAnnotation { - int start_position; - int end_position; - XPointer data; -} XIMAnnotation; - -/* - XIMUText: XIMText extention for UTF16 - */ -typedef struct _XIMUnicodeText { - unsigned short length; - XIMFeedback *feedback; - Bool encoding_is_wchar; - union { - char *multi_byte; - wchar_t *wide_char; - unsigned short *utf16_char; - } string; - unsigned int count_annotations; - XIMAnnotation *annotations; -} XIMUnicodeText; - -/* lookup choice */ -typedef enum { - XIMDrawUpHorizontally = 0 , - XIMDrawUpVertically = 1 -} XIMDrawUpDirection ; - -typedef struct _XIMLookupStartCallbackStruct { - int choice_per_window; /* Number of choices can be display - * in the region - */ - int nrows; - int ncolumns; - XIMDrawUpDirection draw_up_direction; -} XIMLookupStartCallbackStruct; - -typedef struct _XIMUnicodeChoiceObject { - XIMUnicodeText *label; - XIMUnicodeText *value; -} XIMUnicodeChoiceObject; - -typedef struct _XIMLookupDrawCallbackStruct { - XIMUnicodeChoiceObject *choices; /* the lookup choices */ - int n_choices; /* Total number of lookup choices */ - int first_index; - int last_index; - int current_index; - XIMUnicodeText *title; -} XIMLookupDrawCallbackStruct; - -/* Unicode Subset */ -typedef enum { - XIMKatakana, XIMHanzi -} XIMUnicodeCharacterSubsetID; - -typedef struct _XIMUncodeSubset { - XIMUnicodeCharacterSubsetID index; - XIMUnicodeCharacterSubsetID subset_id; - char *name; - Bool is_active; -} XIMUnicodeCharacterSubset; - -typedef struct _XIMUncodeSubsets { - unsigned short count_subsets; - XIMUnicodeCharacterSubset *supported_subsets; -} XIMUnicodeCharacterSubsets; - -typedef struct _XIMSwitchIMNotifyCallbackStruct { - XIMUnicodeCharacterSubset *from; - XIMUnicodeCharacterSubset *to; -} XIMSwitchIMNotifyCallbackStruct; - -/* XIM attributes for multilingual IM extension */ -#define XNMultiLingualInput "multiLingualInput" -#define XNQueryUnicodeCharacterSubset "unicodeCharacterSubset" - -/* XIC attributes for multilingual IM extension */ - -#define XNUnicodeCharacterSubset "UnicodeChararcterSubset" - -#define XNSwitchIMNotifyCallback "switchIMNotifyCallback" -#define XNCommitStringCallback "commitStringCallback" -#define XNForwardEventCallback "forwardEventCallback" - -#define XNLookupStartCallback "lookupStartCallback" -#define XNLookupDrawCallback "lookupDrawCallback" -#define XNLookupDoneCallback "lookupDoneCallback" - -#endif diff --git a/vcl/unx/inc/Xproto.h b/vcl/unx/inc/Xproto.h deleted file mode 100644 index 804b3ffa98cc..000000000000 --- a/vcl/unx/inc/Xproto.h +++ /dev/null @@ -1,49 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef INCLUDED_VCL_UNX_INC_XPROTO_H -#define INCLUDED_VCL_UNX_INC_XPROTO_H - -#include "sal/config.h" - -#include - -#if defined __GNUC__ -#pragma GCC system_header -#elif defined __SUNPRO_CC -#pragma disable_warn -#endif - -#include - -#if defined __SUNPRO_CC -#pragma enable_warn -#endif - -#include - -#endif diff --git a/vcl/unx/inc/cdeint.hxx b/vcl/unx/inc/cdeint.hxx deleted file mode 100644 index 91cbf33caf47..000000000000 --- a/vcl/unx/inc/cdeint.hxx +++ /dev/null @@ -1,44 +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 _SV_CDEINT_HXX -#define _SV_CDEINT_HXX - -#include - -class CDEIntegrator : public DtIntegrator -{ - friend DtIntegrator* DtIntegrator::CreateDtIntegrator(); -private: - CDEIntegrator(); - -public: - virtual ~CDEIntegrator(); - - virtual void GetSystemLook( AllSettings& rSettings ); -}; - -#endif diff --git a/vcl/unx/inc/dtint.hxx b/vcl/unx/inc/dtint.hxx deleted file mode 100644 index 75f197c81e13..000000000000 --- a/vcl/unx/inc/dtint.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 _SV_DTINT_HXX -#define _SV_DTINT_HXX - -#include -#include -#include -#include - -class SalBitmap; -class SalDisplay; -class AllSettings; - -#ifndef _XLIB_H_ -// forwards from X -struct Display; -struct XEvent; -#define Atom UINT32 -#define XLIB_Window UINT32 -#endif - -enum DtType { - DtGeneric, - DtCDE -}; - -class DtIntegrator -{ -protected: - DtType meType; - Display* mpDisplay; - SalDisplay* mpSalDisplay; - int mnSystemLookCommandProcess; - - - DtIntegrator(); - - static String aHomeDir; - -public: - static DtIntegrator* CreateDtIntegrator(); - - virtual ~DtIntegrator(); - - // SystemLook - virtual void GetSystemLook( AllSettings& rSettings ); - - DtType GetDtType() { return meType; } - SalDisplay* GetSalDisplay() { return mpSalDisplay; } - Display* GetDisplay() { return mpDisplay; } -}; - -#endif diff --git a/vcl/unx/inc/i18n_cb.hxx b/vcl/unx/inc/i18n_cb.hxx deleted file mode 100644 index d2301c26a3b0..000000000000 --- a/vcl/unx/inc/i18n_cb.hxx +++ /dev/null @@ -1,95 +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 _SAL_I18N_CALLBACK_HXX -#define _SAL_I18N_CALLBACK_HXX - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -// for iiimp / ml input -int CommitStringCallback( XIC ic, XPointer client_data, XPointer call_data); - -// xim callbacks -void PreeditDoneCallback ( XIC ic, XPointer client_data, XPointer call_data); -int PreeditStartCallback( XIC ic, XPointer client_data, XPointer call_data); -void PreeditDoneCallback ( XIC ic, XPointer client_data, XPointer call_data); -void PreeditDrawCallback ( XIC ic, XPointer client_data, - XIMPreeditDrawCallbackStruct *call_data ); -void PreeditCaretCallback( XIC ic, XPointer client_data, - XIMPreeditCaretCallbackStruct *call_data ); -void GetPreeditSpotLocation(XIC ic, XPointer client_data); - -// private hook to prevent from sending further edit events -void PreeditCancelCallback( XPointer client_data ); - -void StatusStartCallback (XIC ic, XPointer client_data, XPointer call_data); -void StatusDoneCallback (XIC ic, XPointer client_data, XPointer call_data); -void StatusDrawCallback (XIC ic, XPointer client_data, - XIMStatusDrawCallbackStruct *call_data); -void SwitchIMCallback (XIC ix, XPointer client_data, XPointer call_data ); - -// keep informed if kinput2 crashed again -void IC_IMDestroyCallback (XIM im, XPointer client_data, XPointer call_data); -void IM_IMDestroyCallback (XIM im, XPointer client_data, XPointer call_data); - -Bool IsControlCode(sal_Unicode nChar); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -typedef struct { - sal_Unicode *pUnicodeBuffer; - XIMFeedback *pCharStyle; - unsigned int nCursorPos; - unsigned int nLength; - unsigned int nSize; -} preedit_text_t; - -class SalFrame; - -typedef enum { - ePreeditStatusDontKnow = 0, - ePreeditStatusActive, - ePreeditStatusActivationRequired, - ePreeditStatusStartPending -} preedit_status_t; - -typedef struct { - SalFrame* pFrame; - Bool bIsMultilingual; - preedit_status_t eState; - preedit_text_t aText; - SalExtTextInputEvent aInputEv; - std::vector< USHORT > aInputFlags; -} preedit_data_t; - -#endif /* _SAL_I18N_CALLBACK_HXX */ diff --git a/vcl/unx/inc/i18n_ic.hxx b/vcl/unx/inc/i18n_ic.hxx deleted file mode 100644 index 2fb97a00b6f2..000000000000 --- a/vcl/unx/inc/i18n_ic.hxx +++ /dev/null @@ -1,100 +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 _SAL_I18N_INPUTCONTEXT_HXX -#define _SAL_I18N_INPUTCONTEXT_HXX - -#include -#include "i18n_cb.hxx" - -class SalI18N_InputContext -{ - -private: - - Bool mbUseable; // system supports current locale ? - Bool mbMultiLingual; // system supports iiimp ? - XIC maContext; - - XIMStyle mnSupportedStatusStyle; - XIMStyle mnSupportedPreeditStyle; - XIMStyle mnStatusStyle; - XIMStyle mnPreeditStyle; - - preedit_data_t maClientData; - XIMCallback maPreeditStartCallback; - XIMCallback maPreeditDoneCallback; - XIMCallback maPreeditDrawCallback; - XIMCallback maPreeditCaretCallback; - XIMCallback maCommitStringCallback; - XIMCallback maSwitchIMCallback; - XIMCallback maDestroyCallback; - - XVaNestedList mpAttributes; - XVaNestedList mpStatusAttributes; - XVaNestedList mpPreeditAttributes; - - Bool SupportInputMethodStyle( XIMStyles *pIMStyles ); - unsigned int GetWeightingOfIMStyle( XIMStyle n_style ) const ; - Bool IsSupportedIMStyle( XIMStyle n_style ) const ; - -public: - - Bool UseContext() { return mbUseable; } - Bool IsMultiLingual() { return mbMultiLingual; } - Bool IsPreeditMode() { return maClientData.eState == ePreeditStatusActive; } - XIC GetContext() { return maContext; } - - void ExtendEventMask( XLIB_Window aFocusWindow ); - void SetICFocus( SalFrame* pFocusFrame ); - void UnsetICFocus( SalFrame* pFrame ); - void HandleDestroyIM(); - - int HandleKeyEvent( XKeyEvent *pEvent, SalFrame *pFrame ); // unused - void EndExtTextInput( USHORT nFlags ); // unused - int CommitStringCallback( sal_Unicode* pText, sal_Size nLength ); - int CommitKeyEvent( sal_Unicode* pText, sal_Size nLength ); - int UpdateSpotLocation(); - - void Map( SalFrame *pFrame ); - void Unmap( SalFrame* pFrame ); - - void SetPreeditState(Bool aPreeditState); - void SetLanguage(LanguageType aInputLanguage); - - SalI18N_InputContext( SalFrame *aFrame ); - ~SalI18N_InputContext(); - -private: - - SalI18N_InputContext(); // do not use this - -}; - -#endif // _SAL_I18N_INPUTCONTEXT_HXX - - diff --git a/vcl/unx/inc/i18n_im.hxx b/vcl/unx/inc/i18n_im.hxx deleted file mode 100644 index a22a57b976c8..000000000000 --- a/vcl/unx/inc/i18n_im.hxx +++ /dev/null @@ -1,65 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SAL_I18N_INPUTMETHOD_HXX -#define _SAL_I18N_INPUTMETHOD_HXX - -#include - -extern "C" char* GetMethodName( XIMStyle nStyle, char *pBuf, int nBufSize); - -#define bUseInputMethodDefault True - -class VCL_DLLPUBLIC SalI18N_InputMethod -{ - Bool mbUseable; // system supports locale as well as status - // and preedit style ? - Bool mbMultiLingual; // system supports iiimp - XIM maMethod; - XIMCallback maDestroyCallback; - XIMStyles *mpStyles; - -public: - - Bool IsMultiLingual() { return mbMultiLingual; } - Bool PosixLocale(); - Bool UseMethod() { return mbUseable; } - XIM GetMethod() { return maMethod; } - void HandleDestroyIM(); - Bool CreateMethod( Display *pDisplay ); - XIMStyles *GetSupportedStyles() { return mpStyles; } - Bool SetLocale( const char* pLocale = "" ); - Bool FilterEvent( XEvent *pEvent, XLIB_Window window ); - Bool AddConnectionWatch (Display *pDisplay, void *pConnectionHandler); - - SalI18N_InputMethod(); - ~SalI18N_InputMethod(); -}; - -#endif // _SAL_I18N_INPUTMETHOD_HXX - - diff --git a/vcl/unx/inc/i18n_keysym.hxx b/vcl/unx/inc/i18n_keysym.hxx deleted file mode 100644 index 641d00dc02c0..000000000000 --- a/vcl/unx/inc/i18n_keysym.hxx +++ /dev/null @@ -1,71 +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 _SAL_I18N_KEYSYM_HXX -#define _SAL_I18N_KEYSYM_HXX - -/* - convert a keysym as defined in /usr/{X11R6|openwin}/include/X11/keysymdef.h - to unicode - - supported charsets: (byte1 and byte2 are always 0x0) - - Latin-1 Byte 3 = 0x00 - Latin-2 Byte 3 = 0x01 - Latin-3 Byte 3 = 0x02 - Latin-4 Byte 3 = 0x03 - Kana Byte 3 = 0x04 - Arabic Byte 3 = 0x05 - Cyrillic Byte 3 = 0x06 - Greek Byte 3 = 0x07 - Technical Byte 3 = 0x08 - Special Byte 3 = 0x09 - Publishing Byte 3 = 0x0a = 10 - APL Byte 3 = 0x0b = 11 - Hebrew Byte 3 = 0x0c = 12 - Thai Byte 3 = 0x0d = 13 - Korean Byte 3 = 0x0e = 14 - Latin-9 Byte 3 = 0x13 = 19 - Currency Byte 3 = 0x20 = 32 - Keyboard Byte 3 = 0xff = 255 - - missing charsets: - - Latin-8 Byte 3 = 0x12 = 18 - Armenian Byte 3 = 0x14 = 20 - Georgian Byte 3 = 0x15 = 21 - Azeri Byte 3 = 0x16 = 22 - Vietnamese Byte 3 = 0x1e = 30 - - of course not all keysyms can be mapped to a unicode code point -*/ - -sal_Unicode KeysymToUnicode (KeySym nKeySym); - -#endif /* _SAL_I18N_KEYSYM_HXX */ - - diff --git a/vcl/unx/inc/i18n_status.hxx b/vcl/unx/inc/i18n_status.hxx deleted file mode 100644 index 7202cf6e0eef..000000000000 --- a/vcl/unx/inc/i18n_status.hxx +++ /dev/null @@ -1,125 +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 _SAL_I18N_STATUS_HXX -#define _SAL_I18N_STATUS_HXX - -#include -#include -#include - -#ifndef _RTL_USTRING_HXX -#include -#endif -#include - -#include - -class SalFrame; -class WorkWindow; -class ListBox; -class FixedText; -class PushButton; -class SalI18N_InputContext; - -namespace vcl -{ - -class StatusWindow; - -class X11ImeStatus : public SalI18NImeStatus -{ -public: - X11ImeStatus() {} - virtual ~X11ImeStatus(); - - virtual bool canToggle(); - virtual void toggle(); -}; - -class I18NStatus -{ -public: - struct ChoiceData - { - String aString; - void* pData; - }; -private: - SalFrame* m_pParent; - StatusWindow* m_pStatusWindow; - String m_aCurrentIM; - ::std::vector< ChoiceData > m_aChoices; - - I18NStatus(); - ~I18NStatus(); - - static I18NStatus* pInstance; - - static bool getStatusWindowMode(); - -public: - static I18NStatus& get(); - static bool exists(); - static void free(); - - void setParent( SalFrame* pParent ); - SalFrame* getParent() const { return m_pParent; } - SalFrame* getStatusFrame() const; - - void setStatusText( const String& rText ); - String getStatusText() const; - - enum ShowReason { focus, presentation, contextmap }; - void show( bool bShow, ShowReason eReason ); - - const ::std::vector< ChoiceData >& getChoices() const { return m_aChoices; } - void clearChoices(); - void addChoice( const String&, void* pData ); - - void toTop() const; - - // for SwitchIMCallback - void changeIM( const String& ); - - // External Control: - - /** Return true if the status window can be toggled on and off externally. - */ - bool canToggleStatusWindow() const; - - /** Toggle the status window on or off. - - This only works if canToggleStatusWindow returns true (otherwise, any - calls of this method are ignored). - */ - void toggleStatusWindow(); -}; - -} // namespace - -#endif // _SAL_I18N_STATUS_HXX diff --git a/vcl/unx/inc/i18n_xkb.hxx b/vcl/unx/inc/i18n_xkb.hxx deleted file mode 100644 index db6517cbea0b..000000000000 --- a/vcl/unx/inc/i18n_xkb.hxx +++ /dev/null @@ -1,115 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SAL_I18N_XKBDEXTENSION_HXX -#define _SAL_I18N_XKBDEXTENSION_HXX - -#include -#include - -class VCL_DLLPUBLIC SalI18N_KeyboardExtension -{ -private: - - sal_Bool mbUseExtension; - sal_uInt32 mnDefaultGroup; - sal_uInt32 mnGroup; - int mnEventBase; - int mnErrorBase; - Display* mpDisplay; - -public: - - SalI18N_KeyboardExtension( Display *pDisplay ); - inline ~SalI18N_KeyboardExtension(); - - inline sal_Bool UseExtension() const ; // server and client support the - // extension - inline void UseExtension( sal_Bool bState );// used to disable the Extension - - void Dispatch( XEvent *pEvent ); // keep track of group changes - - sal_uInt32 LookupKeysymInGroup( sal_uInt32 nKeyCode, - sal_uInt32 nShiftState, - sal_uInt32 nGroup ) const ; - - inline sal_uInt32 LookupKeysymInDefaultGroup( - sal_uInt32 nKeyCode, - sal_uInt32 nShiftState ) const ; - inline sal_uInt32 GetGroup() const ; // the current keyboard group - inline sal_uInt32 GetDefaultGroup() const ; // base group, usually group 1 - inline int GetEventBase() const ; - -protected: - - SalI18N_KeyboardExtension(); // disabled -}; - -inline -SalI18N_KeyboardExtension::~SalI18N_KeyboardExtension() -{ -} - -inline sal_Bool -SalI18N_KeyboardExtension::UseExtension() const -{ - return mbUseExtension; -} - -inline void -SalI18N_KeyboardExtension::UseExtension( sal_Bool bState ) -{ - mbUseExtension = mbUseExtension && bState; -} - -inline sal_uInt32 -SalI18N_KeyboardExtension::LookupKeysymInDefaultGroup( sal_uInt32 nKeyCode, - sal_uInt32 nShiftState ) const -{ - return LookupKeysymInGroup( nKeyCode, nShiftState, mnDefaultGroup ); -} - -inline sal_uInt32 -SalI18N_KeyboardExtension::GetGroup() const -{ - return mnGroup; -} - -inline sal_uInt32 -SalI18N_KeyboardExtension::GetDefaultGroup() const -{ - return mnDefaultGroup; -} - -inline int -SalI18N_KeyboardExtension::GetEventBase() const -{ - return mnEventBase; -} - -#endif // _SAL_I18N_XKBDEXTENSION_HXX - diff --git a/vcl/unx/inc/plugins/gtk/atkbridge.hxx b/vcl/unx/inc/plugins/gtk/atkbridge.hxx deleted file mode 100644 index 959b3aec1fb1..000000000000 --- a/vcl/unx/inc/plugins/gtk/atkbridge.hxx +++ /dev/null @@ -1,36 +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 __ATK_BRIDGE_HXX__ -#define __ATK_BRIDGE_HXX__ - -#include - -bool VCL_DLLPUBLIC InitAtkBridge(void); -void VCL_DLLPUBLIC DeInitAtkBridge(void); - -#endif diff --git a/vcl/unx/inc/plugins/gtk/gtkdata.hxx b/vcl/unx/inc/plugins/gtk/gtkdata.hxx deleted file mode 100644 index b650cffbae8b..000000000000 --- a/vcl/unx/inc/plugins/gtk/gtkdata.hxx +++ /dev/null @@ -1,93 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _VCL_GTKDATA_HXX -#define _VCL_GTKDATA_HXX - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -class GtkData : public X11SalData -{ -public: - GtkData() {} - virtual ~GtkData(); - - virtual void Init(); - - virtual void initNWF(); - virtual void deInitNWF(); -}; - -class GtkSalFrame; - -class GtkSalDisplay : public SalDisplay -{ - GdkDisplay* m_pGdkDisplay; - GdkCursor *m_aCursors[ POINTER_COUNT ]; - bool m_bStartupCompleted; - std::vector< int > m_aXineramaScreenIndexMap; - - GdkCursor* getFromXPM( const char *pBitmap, const char *pMask, - int nWidth, int nHeight, int nXHot, int nYHot ); -public: - GtkSalDisplay( GdkDisplay* pDisplay ); - virtual ~GtkSalDisplay(); - - GdkDisplay* GetGdkDisplay() const { return m_pGdkDisplay; } - - virtual void deregisterFrame( SalFrame* pFrame ); - GdkCursor *getCursor( PointerStyle ePointerStyle ); - virtual int CaptureMouse( SalFrame* pFrame ); - virtual long Dispatch( XEvent *pEvent ); - virtual void initScreen( int nScreen ) const; - - virtual int GetDefaultMonitorNumber() const; - - static GdkFilterReturn filterGdkEvent( GdkXEvent* sys_event, - GdkEvent* event, - gpointer data ); - inline bool HasMoreEvents() { return m_aUserEvents.size() > 1; } - inline void EventGuardAcquire() { osl_acquireMutex( hEventGuard_ ); } - inline void EventGuardRelease() { osl_releaseMutex( hEventGuard_ ); } - void startupNotificationCompleted() { m_bStartupCompleted = true; } - - void screenSizeChanged( GdkScreen* ); - void monitorsChanged( GdkScreen* ); -}; - - -#endif // _VCL_GTKDATA_HXX diff --git a/vcl/unx/inc/plugins/gtk/gtkframe.hxx b/vcl/unx/inc/plugins/gtk/gtkframe.hxx deleted file mode 100644 index d47e5fb50fca..000000000000 --- a/vcl/unx/inc/plugins/gtk/gtkframe.hxx +++ /dev/null @@ -1,407 +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 _VCL_GTKFRAME_HXX -#define _VCL_GTKFRAME_HXX - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "tools/link.hxx" - -#include -#include - -class GtkSalGraphics; -class GtkSalDisplay; - -class GtkSalFrame : public SalFrame -{ - static const int nMaxGraphics = 2; - - struct GraphicsHolder - { - GtkSalGraphics* pGraphics; - bool bInUse; - GraphicsHolder() - : pGraphics( NULL ), - bInUse( false ) - {} - ~GraphicsHolder(); - }; - - struct IMHandler - { - //-------------------------------------------------------- - // Not all GTK Input Methods swallow key release - // events. Since they swallow the key press events and we - // are left with the key release events, we need to - // manually swallow those. To do this, we keep a list of - // the previous 10 key press events in each GtkSalFrame - // and when we get a key release that matches one of the - // key press events in our list, we swallow it. - struct PreviousKeyPress - { - GdkWindow *window; - gint8 send_event; - guint32 time; - guint state; - guint keyval; - guint16 hardware_keycode; - guint8 group; - - PreviousKeyPress (GdkEventKey *event) - : window (NULL), - send_event (0), - time (0), - state (0), - keyval (0), - hardware_keycode (0), - group (0) - { - if (event) - { - window = event->window; - send_event = event->send_event; - time = event->time; - state = event->state; - keyval = event->keyval; - hardware_keycode = event->hardware_keycode; - group = event->group; - } - } - - PreviousKeyPress( const PreviousKeyPress& rPrev ) - : window( rPrev.window ), - send_event( rPrev.send_event ), - time( rPrev.time ), - state( rPrev.state ), - keyval( rPrev.keyval ), - hardware_keycode( rPrev.hardware_keycode ), - group( rPrev.group ) - {} - - bool operator== (GdkEventKey *event) const - { - return (event != NULL) - && (event->window == window) - && (event->send_event == send_event) - && (event->state == state) - && (event->keyval == keyval) - && (event->hardware_keycode == hardware_keycode) - && (event->group == group) - && (event->time - time < 3) - ; - } - }; - - - GtkSalFrame* m_pFrame; - std::list< PreviousKeyPress > m_aPrevKeyPresses; - int m_nPrevKeyPresses; // avoid using size() - GtkIMContext* m_pIMContext; - bool m_bFocused; - bool m_bPreeditJustChanged; - SalExtTextInputEvent m_aInputEvent; - std::vector< USHORT > m_aInputFlags; - - IMHandler( GtkSalFrame* ); - ~IMHandler(); - - void createIMContext(); - void deleteIMContext(); - void updateIMSpotLocation(); - void setInputContext( SalInputContext* pContext ); - void endExtTextInput( USHORT nFlags ); - bool handleKeyEvent( GdkEventKey* pEvent ); - void focusChanged( bool bFocusIn ); - - void doCallEndExtTextInput(); - void sendEmptyCommit(); - - - static void signalIMCommit( GtkIMContext*, gchar*, gpointer ); - static gboolean signalIMDeleteSurrounding( GtkIMContext*, gint, gint, gpointer ); - static void signalIMPreeditChanged( GtkIMContext*, gpointer ); - static void signalIMPreeditEnd( GtkIMContext*, gpointer ); - static void signalIMPreeditStart( GtkIMContext*, gpointer ); - static gboolean signalIMRetrieveSurrounding( GtkIMContext*, gpointer ); - }; - friend struct IMHandler; - - int m_nScreen; - GtkWidget* m_pWindow; - GdkWindow* m_pForeignParent; - GdkNativeWindow m_aForeignParentWindow; - GdkWindow* m_pForeignTopLevel; - GdkNativeWindow m_aForeignTopLevelWindow; - Pixmap m_hBackgroundPixmap; - ULONG m_nStyle; - SalExtStyle m_nExtStyle; - GtkFixed* m_pFixedContainer; - GtkSalFrame* m_pParent; - std::list< GtkSalFrame* > m_aChildren; - GdkWindowState m_nState; - SystemEnvData m_aSystemData; - GraphicsHolder m_aGraphics[ nMaxGraphics ]; - USHORT m_nKeyModifiers; - GdkCursor *m_pCurrentCursor; - GdkVisibilityState m_nVisibility; - PointerStyle m_ePointerStyle; - int m_nSavedScreenSaverTimeout; - guint m_nGSMCookie; - int m_nWorkArea; - bool m_bFullscreen; - bool m_bSingleAltPress; - bool m_bDefaultPos; - bool m_bDefaultSize; - bool m_bSendModChangeOnRelease; - bool m_bWindowIsGtkPlug; - bool m_bSetFocusOnMap; - String m_aTitle; - - IMHandler* m_pIMHandler; - - Size m_aMaxSize; - Size m_aMinSize; - Rectangle m_aRestorePosSize; - - GdkRegion* m_pRegion; - - void Init( SalFrame* pParent, ULONG nStyle ); - void Init( SystemParentData* pSysData ); - void InitCommon(); - - // signals - static gboolean signalButton( GtkWidget*, GdkEventButton*, gpointer ); - static void signalStyleSet( GtkWidget*, GtkStyle* pPrevious, gpointer ); - static gboolean signalExpose( GtkWidget*, GdkEventExpose*, gpointer ); - static gboolean signalFocus( GtkWidget*, GdkEventFocus*, gpointer ); - static gboolean signalMap( GtkWidget*, GdkEvent*, gpointer ); - static gboolean signalUnmap( GtkWidget*, GdkEvent*, gpointer ); - static gboolean signalConfigure( GtkWidget*, GdkEventConfigure*, gpointer ); - static gboolean signalMotion( GtkWidget*, GdkEventMotion*, gpointer ); - static gboolean signalKey( GtkWidget*, GdkEventKey*, gpointer ); - static gboolean signalDelete( GtkWidget*, GdkEvent*, gpointer ); - static gboolean signalState( GtkWidget*, GdkEvent*, gpointer ); - static gboolean signalScroll( GtkWidget*, GdkEvent*, gpointer ); - static gboolean signalCrossing( GtkWidget*, GdkEventCrossing*, gpointer ); - static gboolean signalVisibility( GtkWidget*, GdkEventVisibility*, gpointer ); - static void signalDestroy( GtkObject*, gpointer ); - - void Center(); - void SetDefaultSize(); - void setAutoLock( bool bLock ); - void setScreenSaverTimeout( int nTimeout ); - - void doKeyCallback( guint state, - guint keyval, - guint16 hardware_keycode, - guint8 group, - guint32 time, - sal_Unicode aOrigCode, - bool bDown, - bool bSendRelease - ); - - - GdkNativeWindow findTopLevelSystemWindow( GdkNativeWindow aWindow ); - - static int m_nFloats; - - bool isFloatGrabWindow() const - { - return - (m_nStyle & SAL_FRAME_STYLE_FLOAT) && // only a float can be floatgrab - !(m_nStyle & SAL_FRAME_STYLE_TOOLTIP) && // tool tips are not - !(m_nStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) && // toolbars are also not - !(m_nStyle & SAL_FRAME_STYLE_FLOAT_FOCUSABLE); // focusable floats are not - } - - bool isChild( bool bPlug = true, bool bSysChild = true ) - { - ULONG nMask = 0; - if( bPlug ) - nMask |= SAL_FRAME_STYLE_PLUG; - if( bSysChild ) - nMask |= SAL_FRAME_STYLE_SYSTEMCHILD; - return (m_nStyle & nMask) != 0; - } - - void resizeWindow( long nWidth, long nHeight ); - void moveWindow( long nX, long nY ); - - Size calcDefaultSize(); - - void setMinMaxSize(); - void createNewWindow( XLIB_Window aParent, bool bXEmbed, int nScreen ); - void askForXEmbedFocus( sal_Int32 nTimecode ); - - DECL_LINK( ImplDelayedFullScreenHdl, void* ); -public: - GtkSalFrame( SalFrame* pParent, ULONG nStyle ); - GtkSalFrame( SystemParentData* pSysData ); - - // dispatches an event, returns true if dispatched - // and false else; if true was returned the event should - // be swallowed - bool Dispatch( const XEvent* pEvent ); - void grabPointer( BOOL bGrab, BOOL bOwnerEvents = FALSE ); - - GtkSalDisplay* getDisplay(); - GdkDisplay* getGdkDisplay(); - GtkWidget* getWindow() const { return m_pWindow; } - GtkFixed* getFixedContainer() const { return m_pFixedContainer; } - GdkWindow* getForeignParent() const { return m_pForeignParent; } - GdkNativeWindow getForeignParentWindow() const { return m_aForeignParentWindow; } - GdkWindow* getForeignTopLevel() const { return m_pForeignTopLevel; } - GdkNativeWindow getForeignTopLevelWindow() const { return m_aForeignTopLevelWindow; } - GdkVisibilityState getVisibilityState() const - { return m_nVisibility; } - Pixmap getBackgroundPixmap() const { return m_hBackgroundPixmap; } - int getScreenNumber() const { return m_nScreen; } - void updateScreenNumber(); - - void moveToScreen( int nScreen ); - - virtual ~GtkSalFrame(); - - // SalGraphics or NULL, but two Graphics for all SalFrames - // must be returned - virtual SalGraphics* GetGraphics(); - virtual void ReleaseGraphics( SalGraphics* pGraphics ); - - // Event must be destroyed, when Frame is destroyed - // When Event is called, SalInstance::Yield() must be returned - virtual BOOL PostEvent( void* pData ); - - virtual void SetTitle( const XubString& rTitle ); - virtual void SetIcon( USHORT nIcon ); - virtual void SetMenu( SalMenu *pSalMenu ); - virtual void DrawMenuBar(); - - virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ); - // Before the window is visible, a resize event - // must be sent with the correct size - virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE ); - virtual void Enable( BOOL bEnable ); - // Set ClientSize and Center the Window to the desktop - // and send/post a resize message - virtual void SetMinClientSize( long nWidth, long nHeight ); - virtual void SetMaxClientSize( long nWidth, long nHeight ); - virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ); - virtual void GetClientSize( long& rWidth, long& rHeight ); - virtual void GetWorkArea( Rectangle& rRect ); - virtual SalFrame* GetParent() const; - virtual void SetWindowState( const SalFrameState* pState ); - virtual BOOL GetWindowState( SalFrameState* pState ); - virtual void ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay ); - // Enable/Disable ScreenSaver, SystemAgents, ... - virtual void StartPresentation( BOOL bStart ); - // Show Window over all other Windows - virtual void SetAlwaysOnTop( BOOL bOnTop ); - - // Window to top and grab focus - virtual void ToTop( USHORT nFlags ); - - // this function can call with the same - // pointer style - virtual void SetPointer( PointerStyle ePointerStyle ); - virtual void CaptureMouse( BOOL bMouse ); - virtual void SetPointerPos( long nX, long nY ); - - // flush output buffer - using SalFrame::Flush; - virtual void Flush(); - // flush output buffer, wait till outstanding operations are done - virtual void Sync(); - - virtual void SetInputContext( SalInputContext* pContext ); - virtual void EndExtTextInput( USHORT nFlags ); - - virtual String GetKeyName( USHORT nKeyCode ); - virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode ); - virtual BOOL MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); - - // returns the input language used for the last key stroke - // may be LANGUAGE_DONTKNOW if not supported by the OS - virtual LanguageType GetInputLanguage(); - - virtual SalBitmap* SnapShot(); - - virtual void UpdateSettings( AllSettings& rSettings ); - - virtual void Beep( SoundType eSoundType ); - - // returns system data (most prominent: window handle) - virtual const SystemEnvData* GetSystemData() const; - - - // get current modifier and button mask - virtual SalPointerState GetPointerState(); - - // set new parent window - virtual void SetParent( SalFrame* pNewParent ); - // reparent window to act as a plugin; implementation - // may choose to use a new system window internally - // return false to indicate failure - virtual bool SetPluginParent( SystemParentData* pNewParent ); - - virtual void SetBackgroundBitmap( SalBitmap* ); - - virtual void SetScreenNumber( unsigned int ); - - // shaped system windows - // set clip region to none (-> rectangular windows, normal state) - virtual void ResetClipRegion(); - // start setting the clipregion consisting of nRects rectangles - virtual void BeginSetClipRegion( ULONG nRects ); - // add a rectangle to the clip region - virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); - // done setting up the clipregion - virtual void EndSetClipRegion(); - - static GtkSalFrame *getFromWindow( GtkWindow *pWindow ); -}; - - -#define OOO_TYPE_FIXED ooo_fixed_get_type() - -extern "C" { - -GType ooo_fixed_get_type( void ); - -} // extern "C" - -#endif //_VCL_GTKFRAME_HXX diff --git a/vcl/unx/inc/plugins/gtk/gtkgdi.hxx b/vcl/unx/inc/plugins/gtk/gtkgdi.hxx deleted file mode 100644 index 38c79b3e11df..000000000000 --- a/vcl/unx/inc/plugins/gtk/gtkgdi.hxx +++ /dev/null @@ -1,183 +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 _VCL_GTKGDI_HXX -#define _VCL_GTKGDI_HXX - -#include -#include -#include -#include -#include - -#include - -class GtkSalGraphics : public X11SalGraphics -{ - GtkWidget *m_pWindow; - Region m_aClipRegion; - -public: - GtkSalGraphics( GtkWidget *window ) - : m_pWindow( window ), - m_aClipRegion( REGION_NULL ) - {} - virtual ~GtkSalGraphics(); - - inline GtkWidget* GetGtkWidget() const { return m_pWindow; } - inline GdkWindow* GetGdkWindow() const { return m_pWindow->window; } - inline GtkSalFrame* GetGtkFrame() const { return static_cast(m_pFrame); } - void SetWindow( GtkWidget* window ) { m_pWindow = window; } - - - // will be set when UI theme was changed - static BOOL bThemeChanged; - static BOOL bNeedPixmapPaint; - static BOOL bGlobalNeedPixmapPaint; - static BOOL bToolbarGripWorkaround; - static BOOL bNeedButtonStyleAsEditBackgroundWorkaround; - - // native widget methods - virtual BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart ); - virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, - const Point& aPos, BOOL& rIsInside ); - virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, - ControlState nState, const ImplControlValue& aValue, - const rtl::OUString& rCaption ); - virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, - ControlState nState, const ImplControlValue& aValue, - const rtl::OUString& rCaption ); - virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, - const ImplControlValue& aValue, const rtl::OUString& rCaption, - Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ); - - //helper methods for frame's UpdateSettings - void updateSettings( AllSettings& rSettings ); - - virtual void ResetClipRegion(); - virtual void BeginSetClipRegion( ULONG nCount ); - virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ); - virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ); - virtual void EndSetClipRegion(); - - // some themes set the background pixmap of our window EVERY time - // a control is painted; but presentation effects need - // the background set to None; workaround: set the background - // before copyBits - virtual void copyBits( const SalTwoRect* pPosAry, - SalGraphics* pSrcGraphics ); - -protected: - typedef std::list< Rectangle > clipList; - - GdkPixmap* NWGetPixmapFromScreen( Rectangle srcRect ); - BOOL NWRenderPixmapToScreen( GdkPixmap* pPixmap, Rectangle dstRect ); - - BOOL NWPaintGTKButton( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const clipList& rClipList, - ControlState nState, const ImplControlValue& aValue, - const OUString& rCaption ); - BOOL NWPaintGTKRadio( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const clipList& rClipList, - ControlState nState, const ImplControlValue& aValue, - const OUString& rCaption ); - BOOL NWPaintGTKCheck( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const clipList& rClipList, - ControlState nState, const ImplControlValue& aValue, - const OUString& rCaption ); - BOOL NWPaintGTKScrollbar( ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const clipList& rClipList, - ControlState nState, const ImplControlValue& aValue, - const OUString& rCaption ); - BOOL NWPaintGTKEditBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const clipList& rClipList, - ControlState nState, const ImplControlValue& aValue, - const OUString& rCaption ); - BOOL NWPaintGTKSpinBox( ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const clipList& rClipList, - ControlState nState, const ImplControlValue& aValue, - const OUString& rCaption ); - BOOL NWPaintGTKComboBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const clipList& rClipList, - ControlState nState, const ImplControlValue& aValue, - const OUString& rCaption ); - BOOL NWPaintGTKTabItem( ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const clipList& rClipList, - ControlState nState, const ImplControlValue& aValue, - const OUString& rCaption ); - BOOL NWPaintGTKListBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const clipList& rClipList, - ControlState nState, const ImplControlValue& aValue, - const OUString& rCaption ); - - BOOL NWPaintGTKToolbar( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const clipList& rClipList, - ControlState nState, const ImplControlValue& aValue, - const OUString& rCaption ); - BOOL NWPaintGTKMenubar( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const clipList& rClipList, - ControlState nState, const ImplControlValue& aValue, - const OUString& rCaption ); - BOOL NWPaintGTKPopupMenu( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const clipList& rClipList, - ControlState nState, const ImplControlValue& aValue, - const OUString& rCaption ); - BOOL NWPaintGTKTooltip( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const clipList& rClipList, - ControlState nState, const ImplControlValue& aValue, - const OUString& rCaption ); - BOOL NWPaintGTKProgress( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const clipList& rClipList, - ControlState nState, const ImplControlValue& aValue, - const OUString& rCaption ); - BOOL NWPaintGTKSlider( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const clipList& rClipList, - ControlState nState, const ImplControlValue& aValue, - const OUString& rCaption ); - BOOL NWPaintGTKListNode( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const clipList& rClipList, - ControlState nState, const ImplControlValue& aValue, - const OUString& rCaption ); -}; - -#endif // _VCL_GTKGDI_HXX diff --git a/vcl/unx/inc/plugins/gtk/gtkinst.hxx b/vcl/unx/inc/plugins/gtk/gtkinst.hxx deleted file mode 100644 index ee07199cb266..000000000000 --- a/vcl/unx/inc/plugins/gtk/gtkinst.hxx +++ /dev/null @@ -1,105 +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 _VCL_GTKINST_HXX -#define _VCL_GTKINST_HXX - -#include -#include - -class GtkYieldMutex : public SalYieldMutex -{ -public: - GtkYieldMutex(); - virtual void acquire(); - virtual void release(); - virtual sal_Bool tryToAcquire(); - - virtual int Grab(); - virtual void Ungrab( int ); - - class GtkYieldGuard - { - GtkYieldMutex* m_pMutex; - int m_nGrab; - public: - GtkYieldGuard( GtkYieldMutex* pMutex ) - : m_pMutex( pMutex ) - { - m_nGrab = m_pMutex->Grab(); - } - ~GtkYieldGuard() - { - m_pMutex->Ungrab( m_nGrab ); - } - }; -}; - -class GtkHookedYieldMutex : public GtkYieldMutex -{ - virtual int Grab() { return 0; }; - virtual void Ungrab(int ) {}; - std::list aYieldStack; -public: - GtkHookedYieldMutex(); - virtual void acquire(); - virtual void release(); - virtual sal_Bool tryToAcquire() { return SalYieldMutex::tryToAcquire(); } - void ThreadsEnter(); - void ThreadsLeave(); -}; - - -#define GTK_YIELD_GRAB() GtkYieldMutex::GtkYieldGuard aLocalGtkYieldGuard( static_cast(GetSalData()->m_pInstance->GetYieldMutex()) ) - -class GtkInstance : public X11SalInstance -{ -public: - GtkInstance( SalYieldMutex* pMutex ) - : X11SalInstance( pMutex ) - {} - virtual ~GtkInstance(); - - virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle ); - virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle ); - virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE ); - virtual SalSystem* CreateSalSystem(); - virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType); -}; - -class GtkSalSystem : public X11SalSystem -{ -public: - GtkSalSystem() : X11SalSystem() {} - virtual ~GtkSalSystem(); - virtual int ShowNativeDialog( const String& rTitle, - const String& rMessage, - const std::list< String >& rButtons, - int nDefButton ); -}; - -#endif // _VCL_GTKINST_HXX diff --git a/vcl/unx/inc/plugins/gtk/gtkobject.hxx b/vcl/unx/inc/plugins/gtk/gtkobject.hxx deleted file mode 100644 index 9d3f235b8894..000000000000 --- a/vcl/unx/inc/plugins/gtk/gtkobject.hxx +++ /dev/null @@ -1,70 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _VCL_GTKOBJECT_HXX -#define _VCL_GTKOBJECT_HXX - -#include -#include -#include -#include - -class GtkSalObject : public SalObject -{ - SystemChildData m_aSystemData; - GtkWidget* m_pSocket; - GdkRegion* m_pRegion; - - // signals - static gboolean signalButton( GtkWidget*, GdkEventButton*, gpointer ); - static gboolean signalFocus( GtkWidget*, GdkEventFocus*, gpointer ); - static void signalDestroy( GtkObject*, gpointer ); -public: - GtkSalObject( GtkSalFrame* pParent, BOOL bShow = TRUE ); - virtual ~GtkSalObject(); - - // overload all pure virtual methods - virtual void ResetClipRegion(); - virtual USHORT GetClipRegionType(); - virtual void BeginSetClipRegion( ULONG nRects ); - virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); - virtual void EndSetClipRegion(); - - virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ); - virtual void Show( BOOL bVisible ); - virtual void Enable( BOOL nEnable ); - virtual void GrabFocus(); - - virtual void SetBackground(); - virtual void SetBackground( SalColor nSalColor ); - - virtual const SystemEnvData* GetSystemData() const; - - virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ); -}; - -#endif // _SV_SALOBJ_H diff --git a/vcl/unx/inc/plugins/kde/kdedata.hxx b/vcl/unx/inc/plugins/kde/kdedata.hxx deleted file mode 100644 index a55471901283..000000000000 --- a/vcl/unx/inc/plugins/kde/kdedata.hxx +++ /dev/null @@ -1,110 +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 _VCL_KDEDATA_HXX -#define _VCL_KDEDATA_HXX - -#include -#include -#include - -class KDEData : public X11SalData -{ -public: - KDEData() {} - virtual ~KDEData(); - - virtual void Init(); - virtual void initNWF(); - virtual void deInitNWF(); -}; - -class SalKDEDisplay : public SalX11Display -{ -public: - SalKDEDisplay( Display* pDisp ); - virtual ~SalKDEDisplay(); -}; - -class KDESalFrame : public X11SalFrame -{ - static const int nMaxGraphics = 2; - - struct GraphicsHolder - { - X11SalGraphics* pGraphics; - bool bInUse; - GraphicsHolder() - : pGraphics( NULL ), - bInUse( false ) - {} - ~GraphicsHolder(); - }; - GraphicsHolder m_aGraphics[ nMaxGraphics ]; - -public: - KDESalFrame( SalFrame* pParent, ULONG nStyle ); - virtual ~KDESalFrame(); - - virtual SalGraphics* GetGraphics(); - virtual void ReleaseGraphics( SalGraphics *pGraphics ); - virtual void updateGraphics( bool bClear ); - virtual void UpdateSettings( AllSettings& rSettings ); - virtual void Show( BOOL bVisible, BOOL bNoActivate ); -}; - -class KDESalInstance : public X11SalInstance -{ -public: - KDESalInstance( SalYieldMutex* pMutex ) - : X11SalInstance( pMutex ) {} - virtual ~KDESalInstance() {} - virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle ); -}; - -class KDEXLib : public SalXLib -{ - bool m_bStartupDone; - void* m_pApplication; - char** m_pFreeCmdLineArgs; - char** m_pAppCmdLineArgs; - int m_nFakeCmdLineArgs; -public: - KDEXLib() : SalXLib(), - m_bStartupDone( false ), - m_pApplication( NULL ), - m_pFreeCmdLineArgs( NULL ), - m_pAppCmdLineArgs( NULL ), - m_nFakeCmdLineArgs( 0 ) - {} - virtual ~KDEXLib(); - virtual void Init(); - - void doStartup(); -}; - -#endif // _VCL_KDEDATA_HXX diff --git a/vcl/unx/inc/pspgraphics.h b/vcl/unx/inc/pspgraphics.h deleted file mode 100644 index d4f5a9f156e0..000000000000 --- a/vcl/unx/inc/pspgraphics.h +++ /dev/null @@ -1,193 +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 _VCL_PSPGRAPHICS_H -#define _VCL_PSPGRAPHICS_H - - -#include "vcl/fontmanager.hxx" -#include "vcl/salgdi.hxx" -#include "vcl/sallayout.hxx" -#include "vcl/dllapi.h" - -namespace psp { struct JobData; class PrinterGfx; } - -class ServerFont; -class ImplDevFontAttributes; -class SalInfoPrinter; - -class VCL_DLLPUBLIC PspGraphics : public SalGraphics -{ - psp::JobData* m_pJobData; - psp::PrinterGfx* m_pPrinterGfx; - String* m_pPhoneNr; - bool m_bSwallowFaxNo; - String m_aPhoneCollection; - bool m_bPhoneCollectionActive; - - ServerFont* m_pServerFont[ MAX_FALLBACK ]; - bool m_bFontVertical; - SalInfoPrinter* m_pInfoPrinter; -public: - PspGraphics( psp::JobData* pJob, psp::PrinterGfx* pGfx, String* pPhone, bool bSwallow, SalInfoPrinter* pInfoPrinter ) - : m_pJobData( pJob ), - m_pPrinterGfx( pGfx ), - m_pPhoneNr( pPhone ), - m_bSwallowFaxNo( bSwallow ), - m_bPhoneCollectionActive( false ), - m_bFontVertical( false ), - m_pInfoPrinter( pInfoPrinter ) - { for( int i = 0; i < MAX_FALLBACK; i++ ) m_pServerFont[i] = 0; } - virtual ~PspGraphics(); - - // helper methods for sharing with X11SalGraphics - static const void* DoGetEmbedFontData( psp::fontID aFont, const sal_Ucs* pUnicodes, sal_Int32* pWidths, FontSubsetInfo& rInfo, long* pDataLen ); - static void DoFreeEmbedFontData( const void* pData, long nLen ); - static const Ucs2SIntMap* DoGetFontEncodingVector( psp::fontID aFont, const Ucs2OStrMap** pNonEncoded ); - static void DoGetGlyphWidths( psp::fontID aFont, - bool bVertical, - Int32Vector& rWidths, - Ucs2UIntMap& rUnicodeEnc ); - - static ImplDevFontAttributes Info2DevFontAttributes( const psp::FastPrintFontInfo& ); - static void AnnounceFonts( ImplDevFontList*, const psp::FastPrintFontInfo& ); - static FontWidth ToFontWidth (psp::width::type eWidth); - static FontWeight ToFontWeight (psp::weight::type eWeight); - static FontPitch ToFontPitch (psp::pitch::type ePitch); - static FontItalic ToFontItalic (psp::italic::type eItalic); - static FontFamily ToFontFamily (psp::family::type eFamily); - - // overload all pure virtual methods - virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ); - virtual USHORT GetBitCount(); - virtual long GetGraphicsWidth() const; - - virtual void ResetClipRegion(); - virtual void BeginSetClipRegion( ULONG nCount ); - virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ); - virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ); - virtual void EndSetClipRegion(); - - virtual void SetLineColor(); - virtual void SetLineColor( SalColor nSalColor ); - virtual void SetFillColor(); - virtual void SetFillColor( SalColor nSalColor ); - virtual void SetXORMode( bool bSet, bool ); - virtual void SetROPLineColor( SalROPColor nROPColor ); - virtual void SetROPFillColor( SalROPColor nROPColor ); - - virtual void SetTextColor( SalColor nSalColor ); - virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel ); - virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ); - virtual ULONG GetKernPairs( ULONG nMaxPairs, ImplKernPairData* ); - virtual const ImplFontCharMap* GetImplFontCharMap() const; - virtual void GetDevFontList( ImplDevFontList* ); - virtual void GetDevFontSubstList( OutputDevice* ); - virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ); - virtual BOOL CreateFontSubset( const rtl::OUString& rToFile, - const ImplFontData*, - sal_Int32* pGlyphIDs, - sal_uInt8* pEncoding, - sal_Int32* pWidths, - int nGlyphs, - FontSubsetInfo& rInfo - ); - virtual const Ucs2SIntMap* GetFontEncodingVector( const ImplFontData*, const Ucs2OStrMap** ppNonEncoded ); - virtual const void* GetEmbedFontData( const ImplFontData*, - const sal_Ucs* pUnicodes, - sal_Int32* pWidths, - FontSubsetInfo& rInfo, - long* pDataLen ); - virtual void FreeEmbedFontData( const void* pData, long nDataLen ); - virtual void GetGlyphWidths( const ImplFontData*, - bool bVertical, - Int32Vector& rWidths, - Ucs2UIntMap& rUnicodeEnc ); - virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& ); - virtual BOOL GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& ); - virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ); - virtual void DrawServerFontLayout( const ServerFontLayout& ); - virtual bool supportsOperation( OutDevSupportType ) const; - virtual void drawPixel( long nX, long nY ); - virtual void drawPixel( long nX, long nY, SalColor nSalColor ); - virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ); - virtual void drawRect( long nX, long nY, long nWidth, long nHeight ); - virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry ); - virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry ); - virtual void drawPolyPolygon( sal_uInt32 nPoly, - const sal_uInt32* pPoints, - PCONSTSALPOINT* pPtAry ); - virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency ); - virtual bool drawPolyLine( const basegfx::B2DPolygon&, double fTransparency, const basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin); - virtual sal_Bool drawPolyLineBezier( ULONG nPoints, - const SalPoint* pPtAry, - const BYTE* pFlgAry ); - virtual sal_Bool drawPolygonBezier( ULONG nPoints, - const SalPoint* pPtAry, - const BYTE* pFlgAry ); - virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, - const sal_uInt32* pPoints, - const SalPoint* const* pPtAry, - const BYTE* const* pFlgAry ); - virtual void copyArea( long nDestX, - long nDestY, - long nSrcX, - long nSrcY, - long nSrcWidth, - long nSrcHeight, - USHORT nFlags ); - virtual void copyBits( const SalTwoRect* pPosAry, - SalGraphics* pSrcGraphics ); - virtual void drawBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap ); - virtual void drawBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - SalColor nTransparentColor ); - virtual void drawBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - const SalBitmap& rTransparentBitmap ); - virtual void drawMask( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - SalColor nMaskColor ); - virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight ); - virtual SalColor getPixel( long nX, long nY ); - virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags ); - virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags ); - - virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ); - virtual bool filterText( const String& rOrigText, String& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop ); - - virtual bool drawAlphaBitmap( const SalTwoRect&, - const SalBitmap& rSourceBitmap, - const SalBitmap& rAlphaBitmap ); - virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency ); - - virtual SystemGraphicsData GetGraphicsData() const; - virtual SystemFontData GetSysFontData( int nFallbacklevel ) const; -}; - -#endif // _VCL_PSPGRAPHICS_H diff --git a/vcl/unx/inc/salbmp.h b/vcl/unx/inc/salbmp.h deleted file mode 100644 index 23e038f30ab1..000000000000 --- a/vcl/unx/inc/salbmp.h +++ /dev/null @@ -1,237 +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 _SV_SALBMP_H -#define _SV_SALBMP_H - -#include -#ifndef _SV_SALGTYPE -#include -#endif -#include -#include -#include - -struct BitmapBuffer; -class BitmapPalette; -class SalGraphics; -class ImplSalDDB; -class ImplSalBitmapCache; - -// ------------- -// - SalBitmap - -// ------------- - -class VCL_DLLPUBLIC X11SalBitmap : public SalBitmap -{ -private: - - static BitmapBuffer* ImplCreateDIB( const Size& rSize, - USHORT nBitCount, - const BitmapPalette& rPal ); - static BitmapBuffer* ImplCreateDIB( Drawable aDrawable, - int nScreen, - long nDrawableDepth, - long nX, long nY, - long nWidth, long nHeight ); - -public: - - static ImplSalBitmapCache* mpCache; - static ULONG mnCacheInstCount; - - static void ImplCreateCache(); - static void ImplDestroyCache(); - void ImplRemovedFromCache(); - - bool SnapShot (Display* pDisplay, XLIB_Window hWindow); - bool ImplCreateFromXImage( Display* pDisplay, - XLIB_Window hWindow, - int nScreen, - XImage* pImage); -private: - - - BitmapBuffer* mpDIB; - ImplSalDDB* mpDDB; - -public: - - SAL_DLLPRIVATE bool ImplCreateFromDrawable( Drawable aDrawable, - int nScreen, - long nDrawableDepth, - long nX, long nY, - long nWidth, long nHeight ); - - SAL_DLLPRIVATE XImage* ImplCreateXImage( SalDisplay* pSalDisp, - int nScreen, long nDepth, - const SalTwoRect& rTwoRect ) const; - - SAL_DLLPRIVATE ImplSalDDB* ImplGetDDB( Drawable, int nScreen, long nDrawableDepth, - const SalTwoRect& ) const; - void ImplDraw( Drawable aDrawable, int nScreen, long nDrawableDepth, - const SalTwoRect& rTwoRect, const GC& rGC ) const; - -public: - - X11SalBitmap(); - virtual ~X11SalBitmap(); - - // overload pure virtual methods - virtual bool Create( const Size& rSize, - USHORT nBitCount, - const BitmapPalette& rPal ); - virtual bool Create( const SalBitmap& rSalBmp ); - virtual bool Create( const SalBitmap& rSalBmp, - SalGraphics* pGraphics ); - virtual bool Create( const SalBitmap& rSalBmp, - USHORT nNewBitCount ); - - virtual void Destroy(); - - virtual Size GetSize() const; - virtual USHORT GetBitCount() const; - - virtual BitmapBuffer* AcquireBuffer( bool bReadOnly ); - virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ); - virtual bool GetSystemData( BitmapSystemData& rData ); -}; - -// -------------- -// - ImplSalDDB - -// -------------- - -class ImplSalDDB -{ -private: - - Pixmap maPixmap; - SalTwoRect maTwoRect; - long mnDepth; - int mnScreen; - - ImplSalDDB() {} - - static void ImplDraw( Drawable aSrcDrawable, long nSrcDrawableDepth, - Drawable aDstDrawable, long nDstDrawableDepth, - long nSrcX, long nSrcY, - long nDestWidth, long nDestHeight, - long nDestX, long nDestY, const GC& rGC ); - -public: - - ImplSalDDB( XImage* pImage, - Drawable aDrawable, int nScreen, - const SalTwoRect& rTwoRect ); - ImplSalDDB( Drawable aDrawable, - int nScreen, - long nDrawableDepth, - long nX, long nY, long nWidth, long nHeight ); - ImplSalDDB( Display* pDisplay, - XLIB_Window hWindow, - int nScreen, - XImage* pImage); - ~ImplSalDDB(); - - Pixmap ImplGetPixmap() const { return maPixmap; } - long ImplGetWidth() const { return maTwoRect.mnDestWidth; } - long ImplGetHeight() const { return maTwoRect.mnDestHeight; } - long ImplGetDepth() const { return mnDepth; } - ULONG ImplGetMemSize() const { return( ( maTwoRect.mnDestWidth * maTwoRect.mnDestHeight * mnDepth ) >> 3 ); } - int ImplGetScreen() const { return mnScreen; } - - bool ImplMatches( int nScreen, long nDepth, const SalTwoRect& rTwoRect ) const; - void ImplDraw( Drawable aDrawable, long nDrawableDepth, - const SalTwoRect& rTwoRect, const GC& rGC ) const; -}; - -// ---------------------- -// - ImplSalBitmapCache - -// ---------------------- - -class ImplSalBitmapCache -{ -private: - - List maBmpList; - ULONG mnTotalSize; - -public: - - ImplSalBitmapCache(); - ~ImplSalBitmapCache(); - - void ImplAdd( X11SalBitmap* pBmp, ULONG nMemSize = 0UL, ULONG nFlags = 0UL ); - void ImplRemove( X11SalBitmap* pBmp ); - void ImplClear(); -}; - -#endif // _SV_SALBMP_HXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vcl/unx/inc/saldata.hxx b/vcl/unx/inc/saldata.hxx deleted file mode 100644 index 939437060750..000000000000 --- a/vcl/unx/inc/saldata.hxx +++ /dev/null @@ -1,134 +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 _SV_SALDATA_HXX -#define _SV_SALDATA_HXX - -// -=-= includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#include -#include -#include -#include -#include -#ifndef _OSL_MODULE_H -#include -#endif -#include - -// -=-= forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -class SalXLib; -class SalDisplay; -class SalPrinter; - -// -=-= typedefs -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -DECLARE_LIST( SalDisplays, SalDisplay* ) - -#if defined SCO || defined LINUX || defined NETBSD || defined AIX || defined HPUX || defined FREEBSD -#include -#else -typedef unsigned int pthread_t; -#endif - -// -=-= SalData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -class VCL_DLLPUBLIC X11SalData : public SalData -{ -protected: - BOOL bNoExceptions_; - SalXLib *pXLib_; - SalDisplay *m_pSalDisplay; - pthread_t hMainThread_; - rtl::OUString maLocalHostName; - rtl::OUString maUnicodeAccumulator; - -public: - X11SalData(); - virtual ~X11SalData(); - - virtual void Init(); - virtual void initNWF(); - virtual void deInitNWF(); - - inline void XError( Display *pDisplay, XErrorEvent *pEvent ) const; - - SalDisplay* GetDisplay() const - { return m_pSalDisplay; } - void SetSalDisplay( SalDisplay* pDisplay ) - { m_pSalDisplay = pDisplay; } - - void DeleteDisplay(); // for shutdown - - inline SalXLib* GetLib() const { return pXLib_; } - inline pthread_t GetMainThread() const { return hMainThread_; } - - void StartTimer( ULONG nMS ); - inline void StopTimer(); - void Timeout() const; - - const rtl::OUString& GetLocalHostName() const - { return maLocalHostName; } - rtl::OUString& GetUnicodeAccumulator() { return maUnicodeAccumulator; } - - static int XErrorHdl( Display*, XErrorEvent* ); - static int XIOErrorHdl( Display* ); - - // set helper functions to set class and res name in W_CLASS hint - static const char* getFrameResName(); - static const char* getFrameClassName(); - static rtl::OString getFrameResName( SalExtStyle nStyle ); - -}; - -inline X11SalData* GetX11SalData() -{ return (X11SalData*)ImplGetSVData()->mpSalData; } - - -#ifdef _SV_SALDISP_HXX -inline void X11SalData::XError( Display *pDisplay, XErrorEvent *pEvent ) const -{ pXLib_->XError( pDisplay, pEvent ); } -#endif - -class YieldMutexReleaser -{ - ULONG m_nYieldCount; -public: - inline YieldMutexReleaser(); - inline ~YieldMutexReleaser(); -}; - -inline YieldMutexReleaser::YieldMutexReleaser() -{ - m_nYieldCount = GetSalData()->m_pInstance->ReleaseYieldMutex(); -} - -inline YieldMutexReleaser::~YieldMutexReleaser() -{ - GetSalData()->m_pInstance->AcquireYieldMutex( m_nYieldCount ); -} - -#endif // _SV_SALDATA_HXX - diff --git a/vcl/unx/inc/saldisp.hxx b/vcl/unx/inc/saldisp.hxx deleted file mode 100644 index 89efad3cde4d..000000000000 --- a/vcl/unx/inc/saldisp.hxx +++ /dev/null @@ -1,550 +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 _SV_SALDISP_HXX -#define _SV_SALDISP_HXX - -// -=-= exports =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -class SalDisplay; -class SalColormap; -class SalVisual; -class SalXLib; - -// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#include -#include -#ifndef _SV_PTRSTYLE_HXX -#include -#endif -#include -#ifndef _OSL_MUTEX_H -#include -#endif -#include -#include -#include -#include -#include -#include - -// -=-= forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -class BitmapPalette; -class SalFrame; -class ColorMask; - -namespace vcl_sal { class WMAdaptor; } -class DtIntegrator; - -// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#define PROPERTY_SUPPORT_WM_SetPos 0x00000001 -#define PROPERTY_SUPPORT_WM_Screen 0x00000002 -#define PROPERTY_SUPPORT_WM_Parent_Pixmap_None 0x00000004 -#define PROPERTY_SUPPORT_WM_ClientPos 0x00000008 -#define PROPERTY_SUPPORT_XSetClipMask 0x00000010 // for bitmap ops. -#define PROPERTY_SUPPORT_3ButtonMouse 0x00000020 - -#define PROPERTY_BUG_XA_FAMILY_NAME_nil 0x00001000 -#define PROPERTY_BUG_XCopyArea_GXxor 0x00002000 // from window -#define PROPERTY_BUG_Stipple 0x00004000 // 0/1 inverted -#define PROPERTY_BUG_Tile 0x00008000 // Recreate the - // dither brush each time -#define PROPERTY_BUG_FillPolygon_Tile 0x00010000 // always Toggle Fillstyle -#define PROPERTY_BUG_DrawLine 0x00020000 // a DrawLine is one point to short -#define PROPERTY_BUG_CopyPlane_RevertBWPixel 0x00040000 // revert fg and bg for xcopyplane -#define PROPERTY_BUG_CopyArea_OnlySmallSlices 0x00080000 -#define PROPERTY_BUG_Bitmap_Bit_Order 0x00100000 - -#define PROPERTY_FEATURE_Maximize 0x01000000 -#define PROPERTY_FEATURE_SharedMemory 0x02000000 -#define PROPERTY_FEATURE_TrustedSolaris 0x04000000 - -#define PROPERTY_DEFAULT 0x00000FCB - -// ------------------------------------------------------------------------ -// server vendor - -typedef enum { - vendor_none = 0, - vendor_attachmate, - vendor_excursion, - vendor_hp, - vendor_hummingbird, - vendor_ibm, - vendor_sco, - vendor_sgi, - vendor_sun, - vendor_xfree, - vendor_xinside, - vendor_xprinter, - vendor_unknown -} srv_vendor_t; - -extern "C" srv_vendor_t sal_GetServerVendor( Display *p_display ); - -// -=-= SalWM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -enum SalWM { olwm, // Open Look - mwm, // Motif - kwm, // KDE Desktop Environment - FourDwm, // SGI - vuewm, // HP - dtwm, // CDE - winmgr, // Oracle NC - twm, - fvwm, // ... - pmwm, // SCO - otherwm }; - -// -=-= SalRGB -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// MSB/Bigendian Sicht (SalColor == RGB, r=0xFF0000, g=0xFF00, b=0xFF) - -enum SalRGB { RGB, RBG, - GBR, GRB, - BGR, BRG, - RGBA, RBGA, - GBRA, GRBA, - BGRA, BRGA, - other }; - -// -=-= SalVisual =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -class SalVisual : public XVisualInfo -{ - SalRGB eRGBMode_; - int nRedShift_; - int nGreenShift_; - int nBlueShift_; - int nRedBits_; - int nGreenBits_; - int nBlueBits_; -public: - SalVisual(); - ~SalVisual(); - SalVisual( const XVisualInfo* pXVI ); - - inline VisualID GetVisualId() const { return visualid; } - inline Visual *GetVisual() const { return visual; } - inline int GetClass() const { return c_class; } - inline int GetDepth() const { return depth; } - inline SalRGB GetMode() const { return eRGBMode_; } - - Pixel GetTCPixel( SalColor nColor ) const; - SalColor GetTCColor( Pixel nPixel ) const; - BOOL Convert( int &n0, int &n1, int &n2, int &n3 ); // 32bit - BOOL Convert( int &n0, int &n1, int &n2 ); // 24bit -}; - -// -=-= SalColormap =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -class SalColormap -{ - const SalDisplay* m_pDisplay; - Colormap m_hColormap; - std::vector m_aPalette; // Pseudocolor - SalVisual m_aVisual; - std::vector m_aLookupTable; // Pseudocolor: 12bit reduction - Pixel m_nWhitePixel; - Pixel m_nBlackPixel; - Pixel m_nUsed; // Pseudocolor - int m_nScreen; - - void GetPalette(); - void GetLookupTable(); -public: - SalColormap( const SalDisplay* pSalDisplay, - Colormap hColormap, - int nScreen ); - SalColormap( const BitmapPalette &rpPalette ); - SalColormap( USHORT nDepth ); - SalColormap(); - ~SalColormap(); - - inline Colormap GetXColormap() const { return m_hColormap; } - inline const SalDisplay* GetDisplay() const { return m_pDisplay; } - inline Display* GetXDisplay() const; - inline const SalVisual& GetVisual() const { return m_aVisual; } - inline Visual* GetXVisual() const { return m_aVisual.GetVisual(); } - inline Pixel GetWhitePixel() const { return m_nWhitePixel; } - inline Pixel GetBlackPixel() const { return m_nBlackPixel; } - inline Pixel GetUsed() const { return m_nUsed; } - inline int GetClass() const { return m_aVisual.GetClass(); } - inline int GetScreenNumber() const { return m_nScreen; } - - BOOL GetXPixels( XColor &rColor, - int r, - int g, - int b ) const; - inline BOOL GetXPixel( XColor &rColor, - int r, - int g, - int b ) const; - Pixel GetPixel( SalColor nColor ) const; - SalColor GetColor( Pixel nPixel ) const; - void SetPalette( const BitmapPalette &rPalette ); -}; - -// -=-= SalXLib =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -typedef int(*YieldFunc)(int fd, void* data); -struct YieldEntry; - -class VCL_DLLPUBLIC SalXLib -{ -protected: - timeval m_aTimeout; - ULONG m_nTimeoutMS; - int m_pTimeoutFDS[2]; - - bool m_bHaveSystemChildFrames; - - int nFDs_; - fd_set aReadFDS_; - fd_set aExceptionFDS_; - YieldEntry *pYieldEntries_; - - - struct XErrorStackEntry - { - bool m_bIgnore; - bool m_bWas; - unsigned int m_nLastErrorRequest; - XErrorHandler m_aHandler; - }; - std::vector< XErrorStackEntry > m_aXErrorHandlerStack; - XIOErrorHandler m_aOrigXIOErrorHandler; -public: - SalXLib(); - virtual ~SalXLib(); - virtual void Init(); - - virtual void Yield( bool bWait, bool bHandleAllCurrentEvents ); - virtual void Wakeup(); - virtual void PostUserEvent(); - - virtual void Insert( int fd, void* data, - YieldFunc pending, - YieldFunc queued, - YieldFunc handle ); - virtual void Remove( int fd ); - - void XError( Display *pDisp, XErrorEvent *pEvent ); - bool HasXErrorOccured() const { return m_aXErrorHandlerStack.back().m_bWas; } - unsigned int GetLastXErrorRequestCode() const { return m_aXErrorHandlerStack.back().m_nLastErrorRequest; } - void ResetXErrorOccured() { m_aXErrorHandlerStack.back().m_bWas = false; } - void PushXErrorLevel( bool bIgnore ); - void PopXErrorLevel(); - - virtual void StartTimer( ULONG nMS ); - virtual void StopTimer(); - - bool CheckTimeout( bool bExecuteTimers = true ); - - void setHaveSystemChildFrame() - { m_bHaveSystemChildFrames = true; } - bool getHaveSystemChildFrame() const - { return m_bHaveSystemChildFrames; } -}; - -// -=-= SalDisplay -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -class SalI18N_InputMethod; -class SalI18N_KeyboardExtension; -class AttributeProvider; -class SalUnicodeConverter; -class SalConverterCache; - -extern "C" { - struct SnDisplay; - struct SnLauncheeContext; - typedef Bool(*X_if_predicate)(Display*,XEvent*,XPointer); -} - -class VCL_DLLPUBLIC SalDisplay -{ -public: - struct RenderEntry - { - Pixmap m_aPixmap; - Picture m_aPicture; - - RenderEntry() : m_aPixmap( 0 ), m_aPicture( 0 ) {} - }; - - typedef std::hash_map RenderEntryMap; - - struct ScreenData - { - bool m_bInit; - - XLIB_Window m_aRoot; - XLIB_Window m_aRefWindow; - Size m_aSize; - SalVisual m_aVisual; - SalColormap m_aColormap; - GC m_aMonoGC; - GC m_aCopyGC; - GC m_aAndInvertedGC; - GC m_aAndGC; - GC m_aOrGC; - GC m_aStippleGC; - Pixmap m_hInvert50; - mutable RenderEntryMap m_aRenderData; - - ScreenData() : - m_bInit( false ), - m_aRoot( None ), - m_aRefWindow( None ), - m_aMonoGC( None ), - m_aCopyGC( None ), - m_aAndInvertedGC( None ), - m_aAndGC( None ), - m_aOrGC( None ), - m_aStippleGC( None ), - m_hInvert50( None ), - m_aRenderData( 1 ) - {} - }; -// -=-= UserEvent =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - struct SalUserEvent - { - SalFrame* m_pFrame; - void* m_pData; - USHORT m_nEvent; - - SalUserEvent( SalFrame* pFrame, void* pData, USHORT nEvent = SALEVENT_USEREVENT ) - : m_pFrame( pFrame ), - m_pData( pData ), - m_nEvent( nEvent ) - {} - }; - -protected: - SalXLib *pXLib_; - SalI18N_InputMethod *mpInputMethod; - SalI18N_KeyboardExtension *mpKbdExtension; - - AttributeProvider *mpFactory; - - Display *pDisp_; // X Display - int m_nDefaultScreen; // XDefaultScreen - std::vector< ScreenData > m_aScreens; - ScreenData m_aInvalidScreenData; - Pair aResolution_; // [dpi] - bool mbExactResolution; - ULONG nMaxRequestSize_; // [byte] - - srv_vendor_t meServerVendor; - SalWM eWindowManager_; - ULONG nProperties_; // PROPERTY_SUPPORT, BUG, FEATURE - BOOL bLocal_; // Server==Client? Init - // in SalDisplay::IsLocal() - BOOL mbLocalIsValid; // bLocal_ is valid ? - // until x bytes - - oslMutex hEventGuard_; - std::list< SalUserEvent > m_aUserEvents; - - XLIB_Cursor aPointerCache_[POINTER_COUNT]; - SalFrame* m_pCapture; - - // Keyboard - BOOL bNumLockFromXS_; // Num Lock handled by X Server - int nNumLockIndex_; // modifier index in modmap - int nNumLockMask_; // keyevent state mask for - KeySym nShiftKeySym_; // first shift modifier - KeySym nCtrlKeySym_; // first control modifier - KeySym nMod1KeySym_; // first mod1 modifier - ByteString m_aKeyboardName; - - vcl_sal::WMAdaptor* m_pWMAdaptor; - DtIntegrator* m_pDtIntegrator; - - bool m_bXinerama; - std::vector< Rectangle > m_aXineramaScreens; - std::list m_aFrames; - std::list m_aSalObjects; - - bool m_bUseRandRWrapper; // don't use randr on gtk, use gdk signals there - - mutable XLIB_Time m_nLastUserEventTime; // mutable because changed on first access - - virtual long Dispatch( XEvent *pEvent ) = 0; - void InitXinerama(); - void InitRandR( XLIB_Window aRoot ) const; - void DeInitRandR(); - int processRandREvent( XEvent* ); - - void doDestruct(); - int addXineramaScreenUnique( long i_nX, long i_nY, long i_nWidth, long i_nHeight ); -public: - static SalDisplay *GetSalDisplay( Display* display ); - static BOOL BestVisual( Display *pDisp, - int nScreen, - XVisualInfo &rVI ); - - SalDisplay( Display* pDisp ); - - virtual ~SalDisplay(); - - - virtual void registerFrame( SalFrame* pFrame ); - virtual void deregisterFrame( SalFrame* pFrame ); - void setHaveSystemChildFrame() const - { pXLib_->setHaveSystemChildFrame(); } - bool getHaveSystemChildFrame() const - { return pXLib_->getHaveSystemChildFrame(); } - - void Init(); - - void SendInternalEvent( SalFrame* pFrame, void* pData, USHORT nEvent = SALEVENT_USEREVENT ); - void CancelInternalEvent( SalFrame* pFrame, void* pData, USHORT nEvent ); - bool DispatchInternalEvent(); - void PrintInfo() const; - - void PrintEvent( const ByteString &rComment, - XEvent *pEvent ) const; - - void Beep() const; - - void ModifierMapping(); - String GetKeyNameFromKeySym( KeySym keysym ) const; - XubString GetKeyName( USHORT nKeyCode ) const; - USHORT GetKeyCode( KeySym keysym, char*pcPrintable ) const; - KeySym GetKeySym( XKeyEvent *pEvent, - unsigned char *pPrintable, - int *pLen, - KeySym *pUnmodifiedKeySym, - Status *pStatus, - XIC = NULL ) const; - - XLIB_Cursor GetPointer( int ePointerStyle ); - virtual int CaptureMouse( SalFrame *pCapture ); - - BOOL IsLocal(); - - void Remove( XEvent *pEvent ); - - virtual void initScreen( int nScreen ) const; - const ScreenData& getDataForScreen( int nScreen ) const - { - if( nScreen < 0 || nScreen >= static_cast(m_aScreens.size()) ) - return m_aInvalidScreenData; - if( ! m_aScreens[nScreen].m_bInit ) - initScreen( nScreen ); - return m_aScreens[nScreen]; - } - - XLIB_Window GetDrawable( int nScreen ) const { return getDataForScreen( nScreen ).m_aRefWindow; } - Display *GetDisplay() const { return pDisp_; } - int GetDefaultScreenNumber() const { return m_nDefaultScreen; } - virtual int GetDefaultMonitorNumber() const { return 0; } - const Size& GetScreenSize( int nScreen ) const { return getDataForScreen( nScreen ).m_aSize; } - srv_vendor_t GetServerVendor() const { return meServerVendor; } - void SetServerVendor() { meServerVendor = sal_GetServerVendor(pDisp_); } - BOOL IsDisplay() const { return !!pXLib_; } - GC GetMonoGC( int nScreen ) const { return getDataForScreen(nScreen).m_aMonoGC; } - GC GetCopyGC( int nScreen ) const { return getDataForScreen(nScreen).m_aCopyGC; } - GC GetAndInvertedGC( int nScreen ) const { return getDataForScreen(nScreen).m_aAndInvertedGC; } - GC GetAndGC( int nScreen ) const { return getDataForScreen(nScreen).m_aAndGC; } - GC GetOrGC( int nScreen ) const { return getDataForScreen(nScreen).m_aOrGC; } - GC GetStippleGC( int nScreen ) const { return getDataForScreen(nScreen).m_aStippleGC; } - GC GetGC( USHORT nDepth, int nScreen ) const; - Pixmap GetInvert50( int nScreen ) const { return getDataForScreen(nScreen).m_hInvert50; } - const SalColormap& GetColormap( int nScreen ) const { return getDataForScreen(nScreen).m_aColormap; } - const SalVisual& GetVisual( int nScreen ) const { return getDataForScreen(nScreen).m_aVisual; } - RenderEntryMap& GetRenderEntries( int nScreen ) const { return getDataForScreen(nScreen).m_aRenderData; } - const Pair &GetResolution() const { return aResolution_; } - bool GetExactResolution() const { return mbExactResolution; } - ULONG GetProperties() const { return nProperties_; } - ULONG GetMaxRequestSize() const { return nMaxRequestSize_; } - XLIB_Time GetLastUserEventTime( bool bAlwaysReget = false ) const; - - bool XIfEventWithTimeout( XEvent*, XPointer, X_if_predicate, long i_nTimeout = 1000 ) const; - - BOOL MouseCaptured( const SalFrame *pFrameData ) const - { return m_pCapture == pFrameData; } - SalFrame* GetCaptureFrame() const - { return m_pCapture; } - SalXLib* GetXLib() const { return pXLib_; } - - SalI18N_InputMethod* GetInputMethod() const { return mpInputMethod; } - SalI18N_KeyboardExtension* GetKbdExtension() const { return mpKbdExtension; } - void SetInputMethod( SalI18N_InputMethod *pInputMethod ) - { mpInputMethod = pInputMethod; } - void SetKbdExtension(SalI18N_KeyboardExtension *pKbdExtension) - { mpKbdExtension = pKbdExtension; } - const char* GetKeyboardName( BOOL bRefresh = FALSE ); - ::vcl_sal::WMAdaptor* getWMAdaptor() const { return m_pWMAdaptor; } - DtIntegrator* getDtIntegrator() const { return m_pDtIntegrator; } - bool IsXinerama() const { return m_bXinerama; } - const std::vector< Rectangle >& GetXineramaScreens() const { return m_aXineramaScreens; } - XLIB_Window GetRootWindow( int nScreen ) const - { return getDataForScreen( nScreen ).m_aRoot; } - const std::vector< ScreenData >& GetScreenData() - { return m_aScreens; } - int GetScreenCount() const { return static_cast(m_aScreens.size()); } - - const std::list< SalFrame* >& getFrames() const - { return m_aFrames; } - - BOOL IsNumLockFromXS() const { return bNumLockFromXS_; } - - std::list< SalObject* >& getSalObjects() { return m_aSalObjects; } -}; - -// -=-= inlines =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -inline GC SalDisplay::GetGC( USHORT nDepth, int nScreen ) const -{ return 1 == nDepth - ? GetMonoGC( nScreen ) - : getDataForScreen(nScreen).m_aVisual.GetDepth() == nDepth - ? GetCopyGC( nScreen ) - : None; } - -inline Display *SalColormap::GetXDisplay() const -{ return m_pDisplay->GetDisplay(); } - -class VCL_DLLPUBLIC SalX11Display : public SalDisplay -{ -public: - SalX11Display( Display* pDisp ); - virtual ~SalX11Display(); - - virtual long Dispatch( XEvent *pEvent ); - virtual void Yield(); - - BOOL IsEvent(); -}; - -/*---------------------------------------------------------- - keep track of correct size of the initial window - */ -// get foreign key names -namespace vcl_sal { - String getKeysymReplacementName( - const char* pKeyboard, - KeySym nSymbol ); -} - - -#endif // _SV_SALDISP_HXX diff --git a/vcl/unx/inc/salfont.h b/vcl/unx/inc/salfont.h deleted file mode 100644 index b3fbe93137f3..000000000000 --- a/vcl/unx/inc/salfont.h +++ /dev/null @@ -1,180 +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 _SV_SALFONT_H -#define _SV_SALFONT_H - -// -=-= exports =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -class SalFontCache; -struct SalFontDimension; -class SalFontFamily; -class SalFontFamilyList; -class SalFontStruct; -class SalFontStructList; -class SalFonts; - -// -=-= includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#include -#include - -// -=-= forwards =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -typedef ULONG XFP_FLAGS; - -class SalDisplay; -class SalFontCacheItem; - -// -=-= SalFontCache -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -DECLARE_LIST( SalFontCache, SalFontCacheItem* ) - -// -=-= SalFontDimension -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -struct SalFontDimension -{ - USHORT nHeight_; // [pixel] - USHORT nPtHeight_; // [point/10] - USHORT nAverage_; // [pixel/10] - USHORT nXRes_; // [dpi] - USHORT nYRes_; // [dpi] - USHORT nSlant_; // [pixel] -// size_t nUnderlineThickness_; // [pixel] -// size_t nUnderlinePosition_; // [pixel] -// size_t nStrikeoutAscent_; // [pixel] -// size_t nStrikeoutDescent_; // [pixel] -// Subscript, Superscript, Capital, Space ... - - inline SalFontDimension( USHORT nA = 0, USHORT nH = 0 ); - - inline BOOL IsScalable() const; - inline USHORT GetWidth() const { return (nAverage_ + 5) / 10; } - inline Size GetSize() const; - inline void SetSize( const Size & rSize ); - inline BOOL operator == ( const SalFontDimension &r ) const; - inline BOOL operator != ( const SalFontDimension &r ) const; - inline BOOL operator >= ( const SalFontDimension &r ) const; -}; - -inline SalFontDimension::SalFontDimension( USHORT nA, USHORT nH ) - : nHeight_( nH ), nAverage_( nA ) -{ nPtHeight_ = nXRes_ = nYRes_ = nSlant_ = 0; } - -inline BOOL SalFontDimension::IsScalable() const -{ return !nHeight_ && !nPtHeight_ && !nAverage_; } - -inline Size SalFontDimension::GetSize() const -{ return Size( (nAverage_ + 5) / 10, nHeight_ ); } - -inline void SalFontDimension::SetSize( const Size & rSize ) -{ nAverage_ = (USHORT)rSize.Width() * 10; nHeight_ = (USHORT)rSize.Height(); } - -inline BOOL SalFontDimension::operator == ( const SalFontDimension &r ) const -{ return nHeight_ == r.nHeight_ && (!r.nAverage_ || nAverage_ == r.nAverage_); } - -inline BOOL SalFontDimension::operator != ( const SalFontDimension &r ) const -{ return !(*this == r); } - -inline BOOL SalFontDimension::operator >= ( const SalFontDimension &r ) const -{ return nHeight_ > r.nHeight_ - || (nHeight_ == r.nHeight_ && nAverage_ >= r.nAverage_); } - -// -=-= SalFontStruct =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -class SalFontStruct : public ImplFontMetricData -{ - friend class SalDisplay; - friend class SalGraphicsData; - - SalFontCacheItem*pCache_; - -#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL - ByteString aFontName_; -#endif - USHORT nHeightCount_; // Anzahl der Hoehen-Eintraege - SalFontDimension*pDimensions_; // Hoehen-Array - USHORT nWeight_; - - USHORT nFoundry_; // properties indexies - USHORT nFamily_; - USHORT nWeightName_; - USHORT nSlant_; - USHORT nSetWidthName_; - ByteString aAddStyleName_; - USHORT nSpacing_; - USHORT nCharSet_; - USHORT nFaceName_; - BOOL mbValidFontDescription; // valid xlfd entries - - void Init(); - BOOL Init( SalDisplay* pDisp, - const char* pFontName, - SalFontDimension& rDim ); - - ByteString GetXFontName( const SalFontDimension& ); - - inline void SetFoundry( USHORT n ) - { nFoundry_ = n; } - inline void SetFamily( USHORT n ) - { meFamily = sal_FamilyToSal( nFamily_ = n ); } - inline void SetWeightName( USHORT n ) - { meWeight = sal_WeightToSal( nWeightName_ = n ); } - inline void SetSlant( USHORT n ) - { meItalic = sal_ItalicToSal( nSlant_ = n ); } - inline void SetSetWidthName( USHORT n ) - { nSetWidthName_ = n; } - inline void SetAddStyleName( const ByteString& rAddStyle ) - { aAddStyleName_ = rAddStyle; aAddStyleName_.ToLowerAscii(); } - inline void SetSpacing( USHORT n ) - { mePitch = sal_PitchToSal( nSpacing_ = n ); } - inline void SetAverage( long n ) - { mnWidth = (n + 5) / 10; } - void SetCharSet( USHORT n ); - - SalFontStruct( const SalFontStruct& rFont ); -public: - SalFontStruct( SalDisplay* pDisp, - const char* pFontName, - SalFontDimension& rDim ); - - ~SalFontStruct(); - - inline void Cache( SalFontCacheItem *p ) { pCache_ = p; } - inline SalFontCacheItem*IsCache() const { return pCache_; } - inline BOOL IsScalable() const { return TYPE_SCALABLE==meType; } - inline SalFontDimension*GetDim() const { return pDimensions_; } - inline BOOL IsValid() const { return mbValidFontDescription; } -#ifdef DBG_UTIL - const ByteString& GetName() const { return aFontName_; } -#endif - - ImplFontData *GetDevFontData(); - SalFontCacheItem*Load( SalDisplay *pDisp, const SalFontDimension &rDim ); - CharSet GetCharSet() { return meCharSet; } - -}; - -// -=-= SalFontStructList =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -DECLARE_LIST( SalFontStructList, SalFontStruct* ) - -#endif // _SV_SALFONT_H - diff --git a/vcl/unx/inc/salframe.h b/vcl/unx/inc/salframe.h deleted file mode 100644 index 9786bac76f35..000000000000 --- a/vcl/unx/inc/salframe.h +++ /dev/null @@ -1,292 +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 _SV_SALFRAME_H -#define _SV_SALFRAME_H - -// -=-= #includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#include -#include -#include -#ifndef _SV_PTRSTYLE_HXX -#include -#endif -#include -#include -#include -#include - -#include -#include - -// -=-= forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -class SalDisplay; -class X11SalGraphics; -class SalGraphicsLayout; -class SalI18N_InputContext; - -namespace vcl_sal { class WMAdaptor; class NetWMAdaptor; class GnomeWMAdaptor; } - -// -=-= X11SalFrame =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#define SHOWSTATE_UNKNOWN -1 -#define SHOWSTATE_MINIMIZED 0 -#define SHOWSTATE_NORMAL 1 -#define SHOWSTATE_HIDDEN 2 - -class VCL_DLLPUBLIC X11SalFrame : public SalFrame -{ - friend class vcl_sal::WMAdaptor; - friend class vcl_sal::NetWMAdaptor; - friend class vcl_sal::GnomeWMAdaptor; - - static X11SalFrame* s_pSaveYourselfFrame; - - X11SalFrame* mpParent; // pointer to parent frame - // which should never obscur this frame - bool mbTransientForRoot; - std::list< X11SalFrame* > maChildren; // List of child frames - - SalDisplay *pDisplay_; - int m_nScreen; - XLIB_Window mhWindow; - XLIB_Window mhShellWindow; - XLIB_Window mhForeignParent; - // window to fall back to when no longer in fullscreen mode - XLIB_Window mhStackingWindow; - // window to listen for CirculateNotify events - - Pixmap mhBackgroundPixmap; - - XLIB_Cursor hCursor_; - int nCaptured_; // is captured - - X11SalGraphics *pGraphics_; // current frame graphics - X11SalGraphics *pFreeGraphics_; // first free frame graphics - - XLIB_Time nReleaseTime_; // timestamp of last key release - USHORT nKeyCode_; // last key code - USHORT nKeyState_; // last key state - int nCompose_; // compose state - bool mbKeyMenu; - bool mbSendExtKeyModChange; - USHORT mnExtKeyMod; - - int nShowState_; // show state - int nWidth_; // client width - int nHeight_; // client height - Rectangle maRestorePosSize; - ULONG nStyle_; - SalExtStyle mnExtStyle; - BOOL bAlwaysOnTop_; - BOOL bViewable_; - BOOL bMapped_; - BOOL mbInShow; - BOOL bDefaultPosition_; // client is centered initially - bool m_bXEmbed; - int nVisibility_; - int m_nWorkArea; - bool m_bSetFocusOnMap; - - - int nScreenSaversTimeout_; - Rectangle maPaintRegion; - - Timer maAlwaysOnTopRaiseTimer; - - // data for WMAdaptor - int meWindowType; - int mnDecorationFlags; - bool mbMaximizedVert; - bool mbMaximizedHorz; - bool mbShaded; - bool mbFullScreen; - - // icon id - int mnIconID; - - String m_aTitle; - - SystemChildData maSystemChildData; - - SalI18N_InputContext *mpInputContext; - Bool mbInputFocus; - - XRectangle* m_pClipRectangles; - int m_nCurClipRect; - int m_nMaxClipRect; - - - void GetPosSize( Rectangle &rPosSize ); - void SetSize ( const Size &rSize ); - void Center(); - void SetPosSize( const Rectangle &rPosSize ); - void Minimize(); - void Maximize(); - void Restore(); - void SetWindowGravity (int nGravity ) const; - - void RestackChildren( XLIB_Window* pTopLevelWindows, int nTopLevelWindows ); - void RestackChildren(); - - long HandleKeyEvent ( XKeyEvent *pEvent ); - long HandleMouseEvent ( XEvent *pEvent ); - long HandleFocusEvent ( XFocusChangeEvent *pEvent ); - long HandleExposeEvent ( XEvent *pEvent ); - long HandleSizeEvent ( XConfigureEvent *pEvent ); - long HandleColormapEvent ( XColormapEvent *pEvent ); - long HandleMapUnmapEvent ( XEvent *pEvent ); - long HandleStateEvent ( XPropertyEvent *pEvent ); - long HandleReparentEvent ( XReparentEvent *pEvent ); - long HandleClientMessage ( XClientMessageEvent*pEvent ); - - DECL_LINK( HandleAlwaysOnTopRaise, void* ); - - void passOnSaveYourSelf(); - - void createNewWindow( XLIB_Window aParent, int nScreen = -1 ); - void updateScreenNumber(); - - void setXEmbedInfo(); - void askForXEmbedFocus( sal_Int32 i_nTimeCode ); -public: - X11SalFrame( SalFrame* pParent, ULONG nSalFrameStyle, SystemParentData* pSystemParent = NULL ); - virtual ~X11SalFrame(); - - long Dispatch( XEvent *pEvent ); - void Init( ULONG nSalFrameStyle, int nScreen = -1, - SystemParentData* pParentData = NULL, bool bUseGeometry = false ); - - SalDisplay* GetDisplay() const { return pDisplay_; } - Display* GetXDisplay() const; - XLIB_Window GetDrawable() const; - int GetScreenNumber() const { return m_nScreen; } - XLIB_Window GetWindow() const { return mhWindow; } - XLIB_Window GetShellWindow() const { return mhShellWindow; } - XLIB_Window GetForeignParent() const { return mhForeignParent; } - XLIB_Window GetStackingWindow() const { return mhStackingWindow; } - long ShutDown() const { return CallCallback( SALEVENT_SHUTDOWN, 0 ); } - long Close() const { return CallCallback( SALEVENT_CLOSE, 0 ); } - ULONG GetStyle() const { return nStyle_; } - - inline XLIB_Cursor GetCursor() const { return hCursor_; } - inline BOOL IsCaptured() const { return nCaptured_ == 1; } -#if !defined(__synchronous_extinput__) - void HandleExtTextEvent (XClientMessageEvent *pEvent); - void PostExtTextEvent (sal_uInt16 nExtTextEventType, - void *pExtTextEvent); -#endif - bool IsOverrideRedirect() const; - bool IsChildWindow() const { return (nStyle_ & (SAL_FRAME_STYLE_PLUG|SAL_FRAME_STYLE_SYSTEMCHILD)) != 0; } - bool IsSysChildWindow() const { return (nStyle_ & (SAL_FRAME_STYLE_SYSTEMCHILD)) != 0; } - bool IsFloatGrabWindow() const; - SalI18N_InputContext* getInputContext() const { return mpInputContext; } - void getPosSize( Rectangle& rRect ) { GetPosSize( rRect ); } - void setPosSize( const Rectangle& rRect ) { SetPosSize( rRect ); } - bool isMapped() const { return bMapped_; } - bool hasFocus() const { return mbInputFocus; } - - void beginUnicodeSequence(); - bool appendUnicodeSequence( sal_Unicode ); - bool endUnicodeSequence(); - - virtual SalGraphics* GetGraphics(); - virtual void ReleaseGraphics( SalGraphics* pGraphics ); - - // call with true to clear graphics (setting None as drawable) - // call with false to setup graphics with window (GetWindow()) - virtual void updateGraphics( bool bClear ); - - virtual BOOL PostEvent( void* pData ); - - virtual void SetTitle( const XubString& rTitle ); - virtual void SetIcon( USHORT nIcon ); - virtual void SetMenu( SalMenu* pMenu ); - virtual void DrawMenuBar(); - - virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ); - virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE ); - virtual void Enable( BOOL bEnable ); - virtual void SetMinClientSize( long nWidth, long nHeight ); - virtual void SetMaxClientSize( long nWidth, long nHeight ); - virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ); - virtual void GetClientSize( long& rWidth, long& rHeight ); - virtual void GetWorkArea( Rectangle& rRect ); - virtual SalFrame* GetParent() const; - virtual void SetWindowState( const SalFrameState* pState ); - virtual BOOL GetWindowState( SalFrameState* pState ); - virtual void ShowFullScreen( BOOL bFullScreen, sal_Int32 nMonitor ); - virtual void StartPresentation( BOOL bStart ); - virtual void SetAlwaysOnTop( BOOL bOnTop ); - virtual void ToTop( USHORT nFlags ); - virtual void SetPointer( PointerStyle ePointerStyle ); - virtual void CaptureMouse( BOOL bMouse ); - virtual void SetPointerPos( long nX, long nY ); - using SalFrame::Flush; - virtual void Flush(); - virtual void Sync(); - virtual void SetInputContext( SalInputContext* pContext ); - virtual void EndExtTextInput( USHORT nFlags ); - virtual String GetKeyName( USHORT nKeyCode ); - virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode ); - virtual BOOL MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); - virtual LanguageType GetInputLanguage(); - virtual SalBitmap* SnapShot(); - virtual void UpdateSettings( AllSettings& rSettings ); - virtual void Beep( SoundType eSoundType ); - virtual const SystemEnvData* GetSystemData() const; - virtual SalPointerState GetPointerState(); - virtual void SetParent( SalFrame* pNewParent ); - virtual bool SetPluginParent( SystemParentData* pNewParent ); - virtual void SetBackgroundBitmap( SalBitmap* pBitmap ); - - virtual void SetScreenNumber( unsigned int ); - - // shaped system windows - // set clip region to none (-> rectangular windows, normal state) - virtual void ResetClipRegion(); - // start setting the clipregion consisting of nRects rectangles - virtual void BeginSetClipRegion( ULONG nRects ); - // add a rectangle to the clip region - virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); - // done setting up the clipregion - virtual void EndSetClipRegion(); - - static void SaveYourselfDone( SalFrame* ); - static Bool checkKeyReleaseForRepeat( Display*, XEvent*, XPointer pX11SalFrame ); -}; - -#ifdef _SV_SALDISP_HXX - -inline Display *X11SalFrame::GetXDisplay() const -{ return pDisplay_->GetDisplay(); } - -inline XLIB_Window X11SalFrame::GetDrawable() const -{ return GetWindow(); } - -#endif - -#endif // _SV_SALFRAME_H - diff --git a/vcl/unx/inc/salgdi.h b/vcl/unx/inc/salgdi.h deleted file mode 100644 index 8af62a5c6607..000000000000 --- a/vcl/unx/inc/salgdi.h +++ /dev/null @@ -1,387 +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 _SV_SALGDI_H -#define _SV_SALGDI_H - -// -=-= includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#include "salstd.hxx" -#include "vcl/salgdi.hxx" -#include "vcl/salgtype.hxx" -#include "tools/fract.hxx" -#include "vcl/dllapi.h" -#include -#include -#include - -// -=-= forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -struct ImplFontMetricData; -struct ImplFontSelectData; -class SalBitmap; -class SalColormap; -class SalDisplay; -class SalFrame; -class X11SalVirtualDevice; -class SalPolyLine; -class PspSalPrinter; -class PspSalInfoPrinter; -class ServerFont; -class ImplLayoutArgs; -class X11FontLayout; -class ServerFontLayout; - -namespace basegfx { - class B2DTrapezoid; -} - -// -=-= SalGraphicsData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -class CairoFontsCache -{ -private: - static int mnRefCount; - typedef std::deque< std::pair > LRUFonts; - static LRUFonts maLRUFonts; -public: - CairoFontsCache(); - static void CacheFont(void *pFont, void *pId); - static void* FindCachedFont(void *pId); - ~CairoFontsCache(); -}; - -class VCL_DLLPUBLIC X11SalGraphics : public SalGraphics -{ - friend class X11FontLayout; - friend class ServerFontLayout; -protected: - SalFrame* m_pFrame; // the SalFrame which created this Graphics or NULL - X11SalVirtualDevice* m_pVDev; // the SalVirtualDevice which created this Graphics or NULL - - const SalColormap* m_pColormap; - SalColormap *m_pDeleteColormap; - Drawable hDrawable_; // use - int m_nScreen; - void* m_pRenderFormat; - XID m_aRenderPicture; - CairoFontsCache m_aCairoFontsCache; - - XLIB_Region pPaintRegion_; - XLIB_Region pClipRegion_; - - GC pPenGC_; // Pen attributes - SalColor nPenColor_; - Pixel nPenPixel_; - - GC pFontGC_; // Font attributes - ServerFont* mpServerFont[ MAX_FALLBACK ]; - - SalColor nTextColor_; - Pixel nTextPixel_; - BOOL bFontVertical_; - - BOOL bDisableGraphite_; - - GC pBrushGC_; // Brush attributes - SalColor nBrushColor_; - Pixel nBrushPixel_; - Pixmap hBrush_; // Dither - - GC pMonoGC_; - GC pCopyGC_; - GC pMaskGC_; - GC pInvertGC_; - GC pInvert50GC_; - GC pStippleGC_; - GC pTrackingGC_; - - BOOL bWindow_ : 1; // is Window - BOOL bPrinter_ : 1; // is Printer - BOOL bVirDev_ : 1; // is VirDev - BOOL bPenGC_ : 1; // is Pen GC valid - BOOL bFontGC_ : 1; // is Font GC valid - BOOL bBrushGC_ : 1; // is Brush GC valid - BOOL bMonoGC_ : 1; // is Mono GC valid - BOOL bCopyGC_ : 1; // is Copy GC valid - BOOL bInvertGC_ : 1; // is Invert GC valid - BOOL bInvert50GC_ : 1; // is Invert50 GC valid - BOOL bStippleGC_ : 1; // is Stipple GC valid - BOOL bTrackingGC_ : 1; // is Tracking GC valid - bool bXORMode_ : 1; // is ROP XOR Mode set - BOOL bDitherBrush_ : 1; // is solid or tile - - void SetClipRegion( GC pGC, - XLIB_Region pXReg = NULL ) const; - - GC GetTrackingGC(); - GC GetInvertGC(); - GC GetInvert50GC(); - GC CreateGC( Drawable hDrawable, - unsigned long nMask = GCGraphicsExposures ); - GC SelectPen(); - GC SelectBrush(); - void DrawLines( ULONG nPoints, - const SalPolyLine &rPoints, - GC pGC, - bool bClose - ); - BOOL GetDitherPixmap ( SalColor nSalColor ); - - inline GC GetMonoGC( Pixmap hPixmap ); - inline GC GetCopyGC(); - inline GC GetStippleGC(); - - int Clip ( XLIB_Region pRegion, - int &nX, - int &nY, - unsigned int &nDX, - unsigned int &nDY, - int &nSrcX, - int &nSrcY ) const; - int Clip ( int &nX, - int &nY, - unsigned int &nDX, - unsigned int &nDY, - int &nSrcX, - int &nSrcY ) const; - GC SetMask ( int &nX, - int &nY, - unsigned int &nDX, - unsigned int &nDY, - int &nSrcX, - int &nSrcY, - Pixmap hClipMask ); - using SalGraphics::DrawBitmap; - void DrawBitmap( const SalTwoRect *pPosAry, - SalGraphics *pThis, - const SalBitmap &rSalBitmap, - const SalBitmap &rTransparentBitmap, - SalColor nTransparentColor ); - - GC GetFontGC(); - bool setFont( const ImplFontSelectData* pEntry, int nFallbackLevel ); - - void drawMaskedBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - const SalBitmap& rTransparentBitmap ); - -protected: - void DrawPrinterString( const SalLayout& ); - - void DrawServerFontString( const ServerFontLayout& ); - void DrawServerSimpleFontString( const ServerFontLayout& ); - void DrawServerAAFontString( const ServerFontLayout& ); - bool DrawServerAAForcedString( const ServerFontLayout& ); - void DrawCairoAAFontString( const ServerFontLayout& ); - - void freeResources(); -public: - X11SalGraphics(); - virtual ~X11SalGraphics(); - - void Init( SalFrame *pFrame, Drawable aDrawable, int nScreen ); - void Init( X11SalVirtualDevice *pVirtualDevice, SalColormap* pColormap = NULL, bool bDeleteColormap = false ); - void Init( class ImplSalPrinterData *pPrinter ); - void DeInit(); - - inline const SalDisplay* GetDisplay() const; - inline Display* GetXDisplay() const; - inline const SalVisual& GetVisual() const; - inline Drawable GetDrawable() const { return hDrawable_; } - void SetDrawable( Drawable d, int nScreen ); - XID GetXRenderPicture(); - void* GetXRenderFormat() const { return m_pRenderFormat; } - inline void SetXRenderFormat( void* pRenderFormat ) { m_pRenderFormat = pRenderFormat; } - inline const SalColormap& GetColormap() const { return *m_pColormap; } - using SalGraphics::GetPixel; - inline Pixel GetPixel( SalColor nSalColor ) const; - - int GetScreenNumber() const { return m_nScreen; } - - // overload all pure virtual methods - virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ); - virtual USHORT GetBitCount(); - virtual long GetGraphicsWidth() const; - virtual long GetGraphicsHeight() const; - - virtual void ResetClipRegion(); - virtual void BeginSetClipRegion( ULONG nCount ); - virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ); - virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ); - virtual void EndSetClipRegion(); - - virtual void SetLineColor(); - virtual void SetLineColor( SalColor nSalColor ); - virtual void SetFillColor(); - - virtual void SetFillColor( SalColor nSalColor ); - - virtual void SetXORMode( bool bSet, bool ); - - virtual void SetROPLineColor( SalROPColor nROPColor ); - virtual void SetROPFillColor( SalROPColor nROPColor ); - - virtual void SetTextColor( SalColor nSalColor ); - virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel ); - virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ); - virtual ULONG GetKernPairs( ULONG nMaxPairs, ImplKernPairData* ); - virtual const ImplFontCharMap* GetImplFontCharMap() const; - virtual void GetDevFontList( ImplDevFontList* ); - virtual void GetDevFontSubstList( OutputDevice* ); - virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ); - virtual BOOL CreateFontSubset( const rtl::OUString& rToFile, - const ImplFontData*, - sal_Int32* pGlyphIDs, - sal_uInt8* pEncoding, - sal_Int32* pWidths, - int nGlyphs, - FontSubsetInfo& rInfo - ); - virtual const Ucs2SIntMap* GetFontEncodingVector( const ImplFontData*, const Ucs2OStrMap** ppNonEncoded ); - virtual const void* GetEmbedFontData( const ImplFontData*, - const sal_Ucs* pUnicodes, - sal_Int32* pWidths, - FontSubsetInfo& rInfo, - long* pDataLen ); - virtual void FreeEmbedFontData( const void* pData, long nDataLen ); - virtual void GetGlyphWidths( const ImplFontData*, - bool bVertical, - Int32Vector& rWidths, - Ucs2UIntMap& rUnicodeEnc ); - virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& ); - virtual BOOL GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& ); - virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ); - virtual void DrawServerFontLayout( const ServerFontLayout& ); - virtual bool supportsOperation( OutDevSupportType ) const; - virtual void drawPixel( long nX, long nY ); - virtual void drawPixel( long nX, long nY, SalColor nSalColor ); - virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ); - virtual void drawRect( long nX, long nY, long nWidth, long nHeight ); - void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry, bool bClose ); - virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry ); - virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry ); - virtual void drawPolyPolygon( sal_uInt32 nPoly, - const sal_uInt32* pPoints, - PCONSTSALPOINT* pPtAry ); - virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency ); - virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin ); - virtual bool drawFilledTrapezoids( const ::basegfx::B2DTrapezoid*, int nTrapCount, double fTransparency ); - -#if 1 // TODO: remove these obselete methods - virtual sal_Bool drawPolyLineBezier( ULONG nPoints, - const SalPoint* pPtAry, - const BYTE* pFlgAry ); - virtual sal_Bool drawPolygonBezier( ULONG nPoints, - const SalPoint* pPtAry, - const BYTE* pFlgAry ); - virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, - const sal_uInt32* pPoints, - const SalPoint* const* pPtAry, - const BYTE* const* pFlgAry ); -#endif - - virtual void copyArea( long nDestX, - long nDestY, - long nSrcX, - long nSrcY, - long nSrcWidth, - long nSrcHeight, - USHORT nFlags ); - virtual void copyBits( const SalTwoRect* pPosAry, - SalGraphics* pSrcGraphics ); - virtual void drawBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap ); - virtual void drawBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - SalColor nTransparentColor ); - virtual void drawBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - const SalBitmap& rMaskBitmap ); - virtual void drawMask( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - SalColor nMaskColor ); - virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight ); - virtual SalColor getPixel( long nX, long nY ); - virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags ); - virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags ); - - virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ); - - virtual bool drawAlphaBitmap( const SalTwoRect&, - const SalBitmap& rSourceBitmap, - const SalBitmap& rAlphaBitmap ); - - virtual bool drawAlphaRect( long nX, long nY, long nWidth, - long nHeight, sal_uInt8 nTransparency ); - - virtual SystemGraphicsData GetGraphicsData() const; - virtual SystemFontData GetSysFontData( int nFallbacklevel ) const; - - /* use to handle GraphicsExpose/NoExpose after XCopyArea & friends - * if pFrame is not NULL, corresponding Paint events are generated - * and dispatched to pFrame - * - * it is imperative to eat up graphics exposes even in case you don't need - * them because the next one using XCopyArea can depend on them - */ - void YieldGraphicsExpose(); - - // do XCopyArea or XGet/PutImage depending on screen numbers - // signature is like XCopyArea with screen numbers added - static void CopyScreenArea( Display* pDisplay, - Drawable aSrc, int nScreenSrc, int nSrcDepth, - Drawable aDest, int nScreenDest, int nDestDepth, - GC aDestGC, - int src_x, int src_y, - unsigned int w, unsigned int h, - int dest_x, int dest_y ); - static void releaseGlyphPeer(); -}; - - -inline const SalDisplay *X11SalGraphics::GetDisplay() const -{ return GetColormap().GetDisplay(); } - -inline const SalVisual& X11SalGraphics::GetVisual() const -{ return GetColormap().GetVisual(); } - -inline Display *X11SalGraphics::GetXDisplay() const -{ return GetColormap().GetXDisplay(); } - -inline Pixel X11SalGraphics::GetPixel( SalColor nSalColor ) const -{ return GetColormap().GetPixel( nSalColor ); } - - -// -=-= Shortcuts =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -#ifdef DBG_UTIL -#define stderr0( s ) fprintf( stderr, s ) -#else -#define stderr0( s ) ; -#endif - -#endif // _SV_SALGDI_H - diff --git a/vcl/unx/inc/salinst.h b/vcl/unx/inc/salinst.h deleted file mode 100644 index 133f0bf6037f..000000000000 --- a/vcl/unx/inc/salinst.h +++ /dev/null @@ -1,128 +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. - * - ************************************************************************/ - -// -=-= includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#ifndef _SV_SALINST_H -#define _SV_SALINST_H - -#include -#ifndef _VOS_MUTEX_HXX -#include -#endif -#ifndef _VOS_THREAD_HXX -#include -#endif -#include -#include - -class VCL_DLLPUBLIC SalYieldMutex : public vos::OMutex -{ -protected: - ULONG mnCount; - vos::OThread::TThreadIdentifier mnThreadId; - -public: - SalYieldMutex(); - - virtual void acquire(); - virtual void release(); - virtual sal_Bool tryToAcquire(); - - ULONG GetAcquireCount() const { return mnCount; } - vos::OThread::TThreadIdentifier GetThreadId() const { return mnThreadId; } -}; - -// -=-= SalInstanceData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -class VCL_DLLPUBLIC X11SalInstance : public SalInstance -{ -protected: - SalYieldMutex* mpSalYieldMutex; - bool mbPrinterInit; - -public: - X11SalInstance( SalYieldMutex* pMutex ) - : mpSalYieldMutex( pMutex ), - mbPrinterInit( false ) - {} - virtual ~X11SalInstance(); - - virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle ); - virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle ); - virtual void DestroyFrame( SalFrame* pFrame ); - - virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE ); - virtual void DestroyObject( SalObject* pObject ); - - virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics, - long nDX, long nDY, - USHORT nBitCount, const SystemGraphicsData *pData = NULL ); - virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice ); - - virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo, - ImplJobSetup* pSetupData ); - virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter ); - virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter ); - virtual void DestroyPrinter( SalPrinter* pPrinter ); - - virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList ); - virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo ); - virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ); - virtual String GetDefaultPrinter(); - - virtual SalTimer* CreateSalTimer(); - virtual SalI18NImeStatus* CreateI18NImeStatus(); - virtual SalSystem* CreateSalSystem(); - virtual SalBitmap* CreateSalBitmap(); - virtual SalSession* CreateSalSession(); - - virtual vos::IMutex* GetYieldMutex(); - virtual ULONG ReleaseYieldMutex(); - virtual void AcquireYieldMutex( ULONG nCount ); - virtual bool CheckYieldMutex(); - - virtual void Yield( bool bWait, bool bHandleAllCurrentEvents ); - virtual bool AnyInput( USHORT nType ); - - virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ); - void FillFontPathList( std::list< rtl::OString >& o_rFontPaths ); - - // dtrans implementation - virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > - CreateClipboard( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& i_rArguments ); - virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDragSource(); - virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDropTarget(); - virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType); - - - bool isPrinterInit() const - { - return mbPrinterInit; - } -}; - -#endif // _SV_SALINST_H - diff --git a/vcl/unx/inc/salmenu.h b/vcl/unx/inc/salmenu.h deleted file mode 100644 index 09a753ff1d98..000000000000 --- a/vcl/unx/inc/salmenu.h +++ /dev/null @@ -1,65 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SALMENU_H -#define _SV_SALMENU_H - -#include -#include -#include - - -class X11SalMenu : public SalMenu -{ -public: - X11SalMenu() {} - virtual ~X11SalMenu(); - - virtual BOOL VisibleMenuBar(); // must return TRUE to actually DISPLAY native menu bars - // otherwise only menu messages are processed (eg, OLE on Windows) - - virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ); - virtual void RemoveItem( unsigned nPos ); - virtual void SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos ); - virtual void SetFrame( const SalFrame* pFrame ); - virtual void CheckItem( unsigned nPos, BOOL bCheck ); - virtual void EnableItem( unsigned nPos, BOOL bEnable ); - virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText ); - virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage); - virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName ); - virtual void GetSystemMenuData( SystemMenuData* pData ); -}; - -class X11SalMenuItem : public SalMenuItem -{ -public: - X11SalMenuItem() {} - virtual ~X11SalMenuItem(); -}; - -#endif // _SV_SALMENU_H - diff --git a/vcl/unx/inc/salobj.h b/vcl/unx/inc/salobj.h deleted file mode 100644 index d7d9334f281b..000000000000 --- a/vcl/unx/inc/salobj.h +++ /dev/null @@ -1,104 +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 _SV_SALOBJ_H -#define _SV_SALOBJ_H - -#include -#include -#include -#include - -class SalClipRegion -{ - -public: - - SalClipRegion(); - ~SalClipRegion(); - - void BeginSetClipRegion( ULONG nRects ); - void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); - - XRectangle *EndSetClipRegion() { - return ClipRectangleList; } - void ResetClipRegion() { - numClipRectangles = 0; } - USHORT GetClipRegionType() { - return nClipRegionType; } - void SetClipRegionType( USHORT nType ) { - nClipRegionType = nType; } - int GetRectangleCount() { - return numClipRectangles; } - -private: - - XRectangle* ClipRectangleList; - int numClipRectangles; - int maxClipRectangles; - USHORT nClipRegionType; -}; - - -class X11SalObject : public SalObject -{ -public: - SystemChildData maSystemChildData; - SalFrame* mpParent; - XLIB_Window maPrimary; - XLIB_Window maSecondary; - Colormap maColormap; - SalClipRegion maClipRegion; - BOOL mbVisible; - - static VCL_DLLPUBLIC long Dispatch( XEvent* pEvent ); - static VCL_DLLPUBLIC X11SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE ); - - X11SalObject(); - virtual ~X11SalObject(); - - // overload all pure virtual methods - virtual void ResetClipRegion(); - virtual USHORT GetClipRegionType(); - virtual void BeginSetClipRegion( ULONG nRects ); - virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); - virtual void EndSetClipRegion(); - - virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ); - virtual void Show( BOOL bVisible ); - virtual void Enable( BOOL nEnable ); - virtual void GrabFocus(); - - virtual void SetBackground(); - virtual void SetBackground( SalColor nSalColor ); - - virtual const SystemEnvData* GetSystemData() const; - - virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ); -}; - -#endif // _SV_SALOBJ_H diff --git a/vcl/unx/inc/salprn.h b/vcl/unx/inc/salprn.h deleted file mode 100644 index 6e6ca0a2f1cc..000000000000 --- a/vcl/unx/inc/salprn.h +++ /dev/null @@ -1,126 +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 _SV_SALPRN_H -#define _SV_SALPRN_H - -#include "vcl/jobdata.hxx" -#include "vcl/printergfx.hxx" -#include "vcl/printerjob.hxx" -#include "vcl/salprn.hxx" - -class PspGraphics; - -class PspSalInfoPrinter : public SalInfoPrinter -{ -public: - PspGraphics* m_pGraphics; - psp::JobData m_aJobData; - psp::PrinterGfx m_aPrinterGfx; - - PspSalInfoPrinter(); - virtual ~PspSalInfoPrinter(); - - // overload all pure virtual methods - virtual SalGraphics* GetGraphics(); - virtual void ReleaseGraphics( SalGraphics* pGraphics ); - virtual BOOL Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ); - virtual BOOL SetPrinterData( ImplJobSetup* pSetupData ); - virtual BOOL SetData( ULONG nFlags, ImplJobSetup* pSetupData ); - virtual void GetPageInfo( const ImplJobSetup* pSetupData, - long& rOutWidth, long& rOutHeight, - long& rPageOffX, long& rPageOffY, - long& rPageWidth, long& rPageHeight ); - virtual ULONG GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType ); - virtual ULONG GetPaperBinCount( const ImplJobSetup* pSetupData ); - virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin ); - virtual void InitPaperFormats( const ImplJobSetup* pSetupData ); - virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData ); -}; - -class PspSalPrinter : public SalPrinter -{ -public: - String m_aFileName; - String m_aTmpFile; - String m_aFaxNr; - bool m_bFax:1; - bool m_bPdf:1; - bool m_bSwallowFaxNo:1; - bool m_bIsPDFWriterJob:1; - PspGraphics* m_pGraphics; - psp::PrinterJob m_aPrintJob; - psp::JobData m_aJobData; - psp::PrinterGfx m_aPrinterGfx; - ULONG m_nCopies; - bool m_bCollate; - SalInfoPrinter* m_pInfoPrinter; - - PspSalPrinter( SalInfoPrinter* ); - virtual ~PspSalPrinter(); - - // overload all pure virtual methods - using SalPrinter::StartJob; - virtual BOOL StartJob( const XubString* pFileName, - const XubString& rJobName, - const XubString& rAppName, - ULONG nCopies, - bool bCollate, - bool bDirect, - ImplJobSetup* pSetupData ); - virtual BOOL StartJob( const String*, - const String&, - const String&, - ImplJobSetup*, - vcl::PrinterController& i_rController ); - virtual BOOL EndJob(); - virtual BOOL AbortJob(); - virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData ); - virtual BOOL EndPage(); - virtual ULONG GetErrorCode(); -}; - -class Timer; - -namespace vcl_sal { -class VCL_DLLPUBLIC PrinterUpdate -{ - static Timer* pPrinterUpdateTimer; - static int nActiveJobs; - - static void doUpdate(); - DECL_STATIC_LINK( PrinterUpdate, UpdateTimerHdl, void* ); -public: - static void update(); - static void jobStarted() { nActiveJobs++; } - static void jobEnded(); -}; -} - -#endif // _SV_SALPRN_H - - diff --git a/vcl/unx/inc/salstd.hxx b/vcl/unx/inc/salstd.hxx deleted file mode 100644 index cc03b3fb35a4..000000000000 --- a/vcl/unx/inc/salstd.hxx +++ /dev/null @@ -1,77 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SALSTD_HXX -#define _SALSTD_HXX - -// -=-= includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#include -#include -#include -#include - -// -=-= X-Lib forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#ifndef _SVUNX_H -typedef unsigned long Pixel; -typedef unsigned long XID; -typedef unsigned long XLIB_Time; -typedef unsigned long XtIntervalId; - -typedef XID Colormap; -typedef XID Drawable; -typedef XID Pixmap; -typedef XID XLIB_Cursor; -typedef XID XLIB_Font; -typedef XID XLIB_Window; - -typedef struct _XDisplay Display; -typedef struct _XGC *GC; -typedef struct _XImage XImage; -typedef struct _XRegion *XLIB_Region; - -typedef union _XEvent XEvent; - -typedef struct _XConfigureEvent XConfigureEvent; -typedef struct _XReparentEvent XReparentEvent; -typedef struct _XClientMessageEvent XClientMessageEvent; -typedef struct _XErrorEvent XErrorEvent; - -struct Screen; -struct Visual; -struct XColormapEvent; -struct XFocusChangeEvent; -struct XFontStruct; -struct XKeyEvent; -struct XPropertyEvent; -struct XTextItem; -struct XWindowChanges; - -#define None 0L -#endif - -#endif - diff --git a/vcl/unx/inc/salsys.h b/vcl/unx/inc/salsys.h deleted file mode 100644 index 1da7cae8564a..000000000000 --- a/vcl/unx/inc/salsys.h +++ /dev/null @@ -1,67 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// -=-= includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#ifndef _SV_SALSYS_H -#define _SV_SALSYS_H - -#include -#ifndef _VOS_MUTEX_HXX -#include -#endif -#ifndef _VOS_THREAD_HXX -#include -#endif -#include -#include - -#include - -class VCL_DLLPUBLIC X11SalSystem : public SalSystem -{ -public: - X11SalSystem() {} - virtual ~X11SalSystem(); - - // overload pure virtual methods - virtual unsigned int GetDisplayScreenCount(); - virtual bool IsMultiDisplay(); - virtual unsigned int GetDefaultDisplayNumber(); - virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ); - virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen ); - virtual rtl::OUString GetScreenName( unsigned int nScreen ); - virtual int ShowNativeDialog( const String& rTitle, - const String& rMessage, - const std::list< String >& rButtons, - int nDefButton ); - virtual int ShowNativeMessageBox( const String& rTitle, - const String& rMessage, - int nButtonCombination, - int nDefaultButton); -}; - -#endif // _SV_SALSYS_H diff --git a/vcl/unx/inc/saltimer.h b/vcl/unx/inc/saltimer.h deleted file mode 100644 index 132107d705f8..000000000000 --- a/vcl/unx/inc/saltimer.h +++ /dev/null @@ -1,44 +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 _SV_SALTIMER_H -#define _SV_SALTIMER_H - -#include - -class X11SalTimer : public SalTimer -{ -public: - X11SalTimer() {} - virtual ~X11SalTimer(); - - // overload all pure virtual methods - void Start( ULONG nMS ); - void Stop(); -}; - -#endif diff --git a/vcl/unx/inc/salunx.h b/vcl/unx/inc/salunx.h deleted file mode 100644 index ef53273b60b4..000000000000 --- a/vcl/unx/inc/salunx.h +++ /dev/null @@ -1,128 +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 _SALUNX_H -#define _SALUNX_H - -// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#if defined SCO || defined LINUX || defined HPUX || defined FREEBSD || defined NETBSD -#include -#elif defined AIX -#include -#include -#include -#endif -#include -#include - -// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#define capacityof(a) (sizeof(a)/sizeof(*a)) - -// -=-= inlines =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -inline long Divide( long nDividend, long nDivisor ) -{ return (nDividend + nDivisor/2) / nDivisor; } - -inline long DPI( long pixel, long mm ) -{ return Divide( pixel*254, mm*10 ); } - -// -=-= timeval =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -inline int operator >= ( const timeval &t1, const timeval &t2 ) -{ - if( t1.tv_sec == t2.tv_sec ) - return t1.tv_usec >= t2.tv_usec; - return t1.tv_sec > t2.tv_sec; -} - -inline int operator > ( const timeval &t1, const timeval &t2 ) -{ - if( t1.tv_sec == t2.tv_sec ) - return t1.tv_usec > t2.tv_usec; - return t1.tv_sec > t2.tv_sec; -} - -inline int operator == ( const timeval &t1, const timeval &t2 ) -{ - if( t1.tv_sec == t2.tv_sec ) - return t1.tv_usec == t2.tv_usec; - return FALSE; -} - -inline timeval &operator -= ( timeval &t1, const timeval &t2 ) -{ - if( t1.tv_usec < t2.tv_usec ) - { - t1.tv_sec--; - t1.tv_usec += 1000000; - } - t1.tv_sec -= t2.tv_sec; - t1.tv_usec -= t2.tv_usec; - return t1; -} - -inline timeval &operator += ( timeval &t1, const timeval &t2 ) -{ - t1.tv_sec += t2.tv_sec; - t1.tv_usec += t2.tv_usec; - if( t1.tv_usec > 1000000 ) - { - t1.tv_sec++; - t1.tv_usec -= 1000000; - } - return t1; -} - -inline timeval &operator += ( timeval &t1, ULONG t2 ) -{ - t1.tv_sec += t2 / 1000; - t1.tv_usec += t2 ? (t2 % 1000) * 1000 : 500; - if( t1.tv_usec > 1000000 ) - { - t1.tv_sec++; - t1.tv_usec -= 1000000; - } - return t1; -} - -inline timeval operator + ( const timeval &t1, const timeval &t2 ) -{ - timeval t0 = t1; - return t0 += t2; -} - -inline timeval operator + ( const timeval &t1, ULONG t2 ) -{ - timeval t0 = t1; - return t0 += t2; -} - -inline timeval operator - ( const timeval &t1, const timeval &t2 ) -{ - timeval t0 = t1; - return t0 -= t2; -} -#endif - diff --git a/vcl/unx/inc/salvd.h b/vcl/unx/inc/salvd.h deleted file mode 100644 index 3d8c681c4e22..000000000000 --- a/vcl/unx/inc/salvd.h +++ /dev/null @@ -1,101 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SALVD_H -#define _SV_SALVD_H - -// -=-= #includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#include -#include - -// -=-= forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -class SalDisplay; -class X11SalGraphics; - -// -=-= SalVirDevData -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -class X11SalVirtualDevice : public SalVirtualDevice -{ - SalDisplay *pDisplay_; - X11SalGraphics *pGraphics_; - - - Pixmap hDrawable_; - int m_nScreen; - - int nDX_; - int nDY_; - USHORT nDepth_; - BOOL bGraphics_; // is Graphics used - BOOL bExternPixmap_; - -public: - X11SalVirtualDevice(); - virtual ~X11SalVirtualDevice(); - - BOOL Init( SalDisplay *pDisplay, - long nDX, long nDY, - USHORT nBitCount, - int nScreen, - Pixmap hDrawable = None, - void* pRenderFormat = NULL ); - inline void InitGraphics( X11SalVirtualDevice *pVD ); - - inline Display *GetXDisplay() const; - inline SalDisplay *GetDisplay() const; - inline BOOL IsDisplay() const; - inline Pixmap GetDrawable() const { return hDrawable_; } - inline USHORT GetDepth() const { return nDepth_; } - int GetWidth() const { return nDX_; } - int GetHeight() const { return nDY_; } - int GetScreenNumber() const { return m_nScreen; } - - virtual SalGraphics* GetGraphics(); - virtual void ReleaseGraphics( SalGraphics* pGraphics ); - - // Set new size, without saving the old contents - virtual BOOL SetSize( long nNewDX, long nNewDY ); - virtual void GetSize( long& rWidth, long& rHeight ); -}; - -#ifdef _SV_SALDISP_HXX - -inline void X11SalVirtualDevice::InitGraphics( X11SalVirtualDevice *pVD ) -{ pGraphics_->Init( pVD ); } - -inline Display *X11SalVirtualDevice::GetXDisplay() const -{ return pDisplay_->GetDisplay(); } - -inline SalDisplay *X11SalVirtualDevice::GetDisplay() const -{ return pDisplay_; } - -inline BOOL X11SalVirtualDevice::IsDisplay() const -{ return pDisplay_->IsDisplay(); } - -#endif - -#endif // _SV_SALVD_H - diff --git a/vcl/unx/inc/sm.hxx b/vcl/unx/inc/sm.hxx deleted file mode 100644 index b4339bb8567e..000000000000 --- a/vcl/unx/inc/sm.hxx +++ /dev/null @@ -1,91 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _VCL_SM_HXX -#define _VCL_SM_HXX - -#include -#include -#include -#include - -class SessionManagerClient -{ - static SmcConn aSmcConnection; - static ByteString aClientID; - static bool bDocSaveDone; - - static void SaveYourselfProc( SmcConn connection, - SmPointer client_data, - int save_type, - Bool shutdown, - int interact_style, - Bool fast ); - static void DieProc( SmcConn connection, - SmPointer client_data ); - static void SaveCompleteProc( SmcConn connection, - SmPointer client_data ); - static void ShutdownCanceledProc( SmcConn connection, - SmPointer client_data ); - static void InteractProc( SmcConn connection, - SmPointer clientData ); - - static const ByteString& getPreviousSessionID(); - - DECL_STATIC_LINK( SessionManagerClient, ShutDownHdl, void* ); - DECL_STATIC_LINK( SessionManagerClient, ShutDownCancelHdl, void* ); - DECL_STATIC_LINK( SessionManagerClient, SaveYourselfHdl, void* ); - DECL_STATIC_LINK( SessionManagerClient, InteractionHdl, void* ); -public: - static VCL_DLLPUBLIC void open(); // needed by other plugins, so export - static void close(); - - static bool checkDocumentsSaved(); - static bool queryInteraction(); - static void saveDone(); - static void interactionDone( bool bCancelShutdown ); - - static String getExecName(); - static VCL_DLLPUBLIC const ByteString& getSessionID(); -}; - -class SalFrame; - -class IceSalSession : public SalSession -{ -public: - IceSalSession(); - virtual ~IceSalSession(); - - virtual void queryInteraction(); - virtual void interactionDone(); - virtual void saveDone(); - virtual bool cancelShutdown(); - - static void handleOldX11SaveYourself( SalFrame* pFrame ); -}; - -#endif diff --git a/vcl/unx/inc/soicon.hxx b/vcl/unx/inc/soicon.hxx deleted file mode 100644 index 419f9b2cc54a..000000000000 --- a/vcl/unx/inc/soicon.hxx +++ /dev/null @@ -1,37 +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 _SV_SOICON_HXX -#define _SV_SOICON_HXX - -class SalDisplay; -class SalBitmap; -class Bitmap; - -BOOL SelectAppIconPixmap( SalDisplay *pDisplay, int nScreen, - USHORT nIcon, USHORT iconSize, - Pixmap& icon_pixmap, Pixmap& icon_mask ); -#endif diff --git a/vcl/unx/inc/strhelper.hxx b/vcl/unx/inc/strhelper.hxx deleted file mode 100644 index cd0220b77e05..000000000000 --- a/vcl/unx/inc/strhelper.hxx +++ /dev/null @@ -1,41 +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 _SV_STRHELPER_HXX -#define _SV_STRHELPER_HXX -#include - -String GetCommandLineToken( int, const String& ); -// gets one token of a unix command line style string -// doublequote, singlequote and singleleftquote protect their respective -// contents - -int GetCommandLineTokenCount( const String& ); -// returns number of tokens (zero if empty or whitespace only) - -String WhitespaceToSpace( const String&, BOOL bProtect = TRUE ); - -#endif diff --git a/vcl/unx/inc/svsys.h b/vcl/unx/inc/svsys.h deleted file mode 100644 index d4077d0998e9..000000000000 --- a/vcl/unx/inc/svsys.h +++ /dev/null @@ -1,32 +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 _SV_SVSYS_H -#define _SV_SVSYS_H - -#include - -#endif // _SV_SVSYS_H diff --git a/vcl/unx/inc/svunx.h b/vcl/unx/inc/svunx.h deleted file mode 100644 index e7d6150b79f4..000000000000 --- a/vcl/unx/inc/svunx.h +++ /dev/null @@ -1,35 +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 _SVUNX_H -#define _SVUNX_H - -#include -#include - -#endif - diff --git a/vcl/unx/inc/wmadaptor.hxx b/vcl/unx/inc/wmadaptor.hxx deleted file mode 100644 index e8620db29c6f..000000000000 --- a/vcl/unx/inc/wmadaptor.hxx +++ /dev/null @@ -1,354 +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 _VCL_WMADAPTOR_HXX_ -#define _VCL_WMADAPTOR_HXX_ - -#ifndef _TL_STRING_HXX -#include -#endif -#include -#include -#ifndef _PREX_H -#include -#include -#include -#endif -#include - -class SalDisplay; -class X11SalFrame; - -namespace vcl_sal { - -class VCL_DLLPUBLIC WMAdaptor -{ -public: - enum WMAtom { - // atoms for types - UTF8_STRING, - - // atoms for extended WM hints - NET_SUPPORTED, - NET_SUPPORTING_WM_CHECK, - NET_WM_NAME, - NET_WM_DESKTOP, - NET_WM_ICON_NAME, - NET_WM_PID, - NET_WM_PING, - NET_WM_STATE, - NET_WM_STATE_MAXIMIZED_HORZ, - NET_WM_STATE_MAXIMIZED_VERT, - NET_WM_STATE_MODAL, - NET_WM_STATE_SHADED, - NET_WM_STATE_SKIP_PAGER, - NET_WM_STATE_SKIP_TASKBAR, - NET_WM_STATE_STAYS_ON_TOP, - NET_WM_STATE_STICKY, - NET_WM_STATE_FULLSCREEN, - NET_WM_STRUT, - NET_WM_STRUT_PARTIAL, - NET_WM_USER_TIME, - NET_WM_WINDOW_TYPE, - NET_WM_WINDOW_TYPE_DESKTOP, - NET_WM_WINDOW_TYPE_DIALOG, - NET_WM_WINDOW_TYPE_DOCK, - NET_WM_WINDOW_TYPE_MENU, - NET_WM_WINDOW_TYPE_NORMAL, - NET_WM_WINDOW_TYPE_TOOLBAR, - KDE_NET_WM_WINDOW_TYPE_OVERRIDE, - NET_WM_WINDOW_TYPE_SPLASH, - NET_WM_WINDOW_TYPE_UTILITY, - NET_NUMBER_OF_DESKTOPS, - NET_CURRENT_DESKTOP, - NET_WORKAREA, - - // atoms for Gnome WM hints - WIN_SUPPORTING_WM_CHECK, - WIN_PROTOCOLS, - WIN_WORKSPACE_COUNT, - WIN_WORKSPACE, - WIN_LAYER, - WIN_STATE, - WIN_HINTS, - WIN_APP_STATE, - WIN_EXPANDED_SIZE, - WIN_ICONS, - WIN_WORKSPACE_NAMES, - WIN_CLIENT_LIST, - - // atoms for general WM hints - WM_STATE, - MOTIF_WM_HINTS, - WM_PROTOCOLS, - WM_DELETE_WINDOW, - WM_TAKE_FOCUS, - WM_SAVE_YOURSELF, - WM_CLIENT_LEADER, - WM_COMMAND, - WM_LOCALE_NAME, - WM_TRANSIENT_FOR, - - // special atoms - SAL_QUITEVENT, - SAL_USEREVENT, - SAL_EXTTEXTEVENT, - SAL_GETTIMEEVENT, - DTWM_IS_RUNNING, - VCL_SYSTEM_SETTINGS, - XSETTINGS, - XEMBED, - XEMBED_INFO, - NetAtomMax - }; - - /* - * flags for frame decoration - */ - static const int decoration_Title = 0x00000001; - static const int decoration_Border = 0x00000002; - static const int decoration_Resize = 0x00000004; - static const int decoration_MinimizeBtn = 0x00000008; - static const int decoration_MaximizeBtn = 0x00000010; - static const int decoration_CloseBtn = 0x00000020; - static const int decoration_All = 0x10000000; - - /* - * window type - */ - enum WMWindowType - { - windowType_Normal, - windowType_ModalDialogue, - windowType_ModelessDialogue, - windowType_Utility, - windowType_Splash, - windowType_Toolbar, - windowType_Dock - }; - -protected: - SalDisplay* m_pSalDisplay; // Display to use - Display* m_pDisplay; // X Display of SalDisplay - String m_aWMName; - Atom m_aWMAtoms[ NetAtomMax]; - int m_nDesktops; - bool m_bEqualWorkAreas; - ::std::vector< Rectangle > - m_aWMWorkAreas; - bool m_bTransientBehaviour; - bool m_bEnableAlwaysOnTopWorks; - bool m_bLegacyPartialFullscreen; - int m_nWinGravity; - int m_nInitWinGravity; - bool m_bWMshouldSwitchWorkspace; - bool m_bWMshouldSwitchWorkspaceInit; - - WMAdaptor( SalDisplay * ) -; - void initAtoms(); - bool getNetWmName(); - - /* - * returns whether this instance is useful - * only useful for createWMAdaptor - */ - virtual bool isValid() const; - - bool getWMshouldSwitchWorkspace() const; -public: - virtual ~WMAdaptor(); - - /* - * creates a vaild WMAdaptor instance for the SalDisplay - */ - static WMAdaptor* createWMAdaptor( SalDisplay* ); - - /* - * may return an empty string if the window manager could - * not be identified. - */ - const String& getWindowManagerName() const - { return m_aWMName; } - - /* - * gets the number of workareas - */ - int getWorkAreaCount() const - { return m_aWMWorkAreas.size(); } - - /* - * gets the current work area/desktop number: [0,m_nDesktops[ or -1 if unknown - */ - int getCurrentWorkArea() const; - /* - * gets the workarea the specified window is on (or -1) - */ - int getWindowWorkArea( XLIB_Window aWindow ) const; - /* - * gets the specified workarea - */ - const Rectangle& getWorkArea( int n ) const - { return m_aWMWorkAreas[n]; } - - /* - * attemp to switch the desktop to a certain workarea - * if bConsiderWM is true, then on some WMs the call will not result in any action - */ - void switchToWorkArea( int nWorkArea, bool bConsiderWM = true ) const; - - /* - * sets window title - */ - virtual void setWMName( X11SalFrame* pFrame, const String& rWMName ) const; - - /* - * set NET_WM_PID - */ - virtual void setPID( X11SalFrame* pFrame ) const; - - /* - * set WM_CLIENT_MACHINE - */ - virtual void setClientMachine( X11SalFrame* pFrame ) const; - - virtual void answerPing( X11SalFrame*, XClientMessageEvent* ) const; - - /* - * maximizes frame - * maximization can be toggled in either direction - * to get the original position and size - * use maximizeFrame( pFrame, false, false ) - */ - virtual void maximizeFrame( X11SalFrame* pFrame, bool bHorizontal = true, bool bVertical = true ) const; - /* - * start/stop fullscreen mode on a frame - */ - virtual void showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const; - /* - * tell whether legacy partial full screen handling is necessary - * see #i107249#: NET_WM_STATE_FULLSCREEN is not well defined, but de facto - * modern WM's interpret it the "right" way, namely they make "full screen" - * taking twin view or Xinerama into accound and honor the positioning hints - * to see which screen actually was meant to use for fullscreen. - */ - bool isLegacyPartialFullscreen() const - { return m_bLegacyPartialFullscreen; } - /* - * set window struts - */ - virtual void setFrameStruts( X11SalFrame*pFrame, - int left, int right, int top, int bottom, - int left_start_y, int left_end_y, - int right_start_y, int right_end_y, - int top_start_x, int top_end_x, - int bottom_start_x, int bottom_end_x ) const; - /* - * set _NET_WM_USER_TIME property, if NetWM - */ - virtual void setUserTime( X11SalFrame* i_pFrame, long i_nUserTime ) const; - - /* - * tells whether fullscreen mode is supported by WM - */ - bool supportsFullScreen() const { return m_aWMAtoms[ NET_WM_STATE_FULLSCREEN ] != 0; } - - /* - * shade/unshade frame - */ - virtual void shade( X11SalFrame* pFrame, bool bToShaded ) const; - - /* - * set hints what decoration is needed; - * must be called before showing the frame - */ - virtual void setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eType, int nDecorationFlags, X11SalFrame* pTransientFrame = NULL ) const; - - /* - * tells whether there is WM support for splash screens - */ - bool supportsSplash() const { return m_aWMAtoms[ NET_WM_WINDOW_TYPE_SPLASH ] != 0; } - - /* - * tells whteher there is WM support for NET_WM_WINDOW_TYPE_TOOLBAR - */ - bool supportsToolbar() const { return m_aWMAtoms[ NET_WM_WINDOW_TYPE_TOOLBAR ] != 0; } - - /* - * enables always on top or equivalent if possible - */ - virtual void enableAlwaysOnTop( X11SalFrame* pFrame, bool bEnable ) const; - - /* - * tells whether enableAlwaysOnTop actually works with this WM - */ - bool isAlwaysOnTopOK() const { return m_bEnableAlwaysOnTopWorks; } - - /* - * handle WM messages (especially WM state changes) - */ - virtual int handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEvent ) const; - - /* - * called by SalFrame::Show: time to update state properties - */ - virtual void frameIsMapping( X11SalFrame* ) const; - - /* - * gets a WM atom - */ - Atom getAtom( WMAtom eAtom ) const - { return m_aWMAtoms[ eAtom ]; } - - /* - * supports correct positioning - */ - - virtual bool supportsICCCMPos () const; - - int getPositionWinGravity () const - { return m_nWinGravity; } - int getInitWinGravity() const - { return m_nInitWinGravity; } - - /* - * expected behaviour is that the WM will not allow transient - * windows to get stacked behind the windows they are transient for - */ - bool isTransientBehaviourAsExpected() const - { return m_bTransientBehaviour; } - - /* - * changes the transient hint of a window to reference frame - * if reference frame is NULL the root window is used instead - */ - void changeReferenceFrame( X11SalFrame* pFrame, X11SalFrame* pReferenceFrame ) const; -}; - -} // namespace - -#endif diff --git a/vcl/unx/kde/kdedata.cxx b/vcl/unx/kde/kdedata.cxx index 34b0ff652cde..d3b94fdb5456 100644 --- a/vcl/unx/kde/kdedata.cxx +++ b/vcl/unx/kde/kdedata.cxx @@ -45,18 +45,18 @@ #include #include #endif -#include +#include +#include "unx/i18n_im.hxx" +#include "unx/i18n_xkb.hxx" + #include #include #include #include -#include "i18n_im.hxx" -#include "i18n_xkb.hxx" + #include -#ifndef _VOS_MUTEX_HXX #include -#endif /* #i59042# override KApplications method for session management * since it will interfere badly with our own. diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx index 29d79f88ffb3..15d3edfbf8c5 100644 --- a/vcl/unx/kde/salnativewidgets-kde.cxx +++ b/vcl/unx/kde/salnativewidgets-kde.cxx @@ -31,23 +31,16 @@ #define _SV_SALNATIVEWIDGETS_KDE_CXX #include -#include -#include -#include +#include +#include +#include +#include +#include +#include -#ifndef _SV_SALGDI_HXX -#include -#endif - -#ifndef _SV_SALGDI_HXX -#include -#endif #include #include -#include -#include -#include using namespace ::rtl; diff --git a/vcl/unx/kde4/KDEData.cxx b/vcl/unx/kde4/KDEData.cxx index 99871edadae3..dcf1db32068e 100644 --- a/vcl/unx/kde4/KDEData.cxx +++ b/vcl/unx/kde4/KDEData.cxx @@ -51,4 +51,4 @@ void KDEData::initNWF() void KDEData::deInitNWF() { -} \ No newline at end of file +} diff --git a/vcl/unx/kde4/KDEData.hxx b/vcl/unx/kde4/KDEData.hxx index 7cf5836c9688..753deb697e95 100644 --- a/vcl/unx/kde4/KDEData.hxx +++ b/vcl/unx/kde4/KDEData.hxx @@ -27,8 +27,8 @@ #pragma once -#include -#include +#include +#include class KDEData : public X11SalData { @@ -39,4 +39,4 @@ class KDEData : public X11SalData virtual void Init(); virtual void initNWF(); virtual void deInitNWF(); -}; \ No newline at end of file +}; diff --git a/vcl/unx/kde4/KDESalDisplay.cxx b/vcl/unx/kde4/KDESalDisplay.cxx index d67399528a7c..41fa9fedde3f 100644 --- a/vcl/unx/kde4/KDESalDisplay.cxx +++ b/vcl/unx/kde4/KDESalDisplay.cxx @@ -42,4 +42,4 @@ SalKDEDisplay::~SalKDEDisplay() doDestruct(); // prevent SalDisplay from closing KApplication's display pDisp_ = NULL; -} \ No newline at end of file +} diff --git a/vcl/unx/kde4/KDESalDisplay.hxx b/vcl/unx/kde4/KDESalDisplay.hxx index 1ab966b1847b..8287bbfb9bda 100644 --- a/vcl/unx/kde4/KDESalDisplay.hxx +++ b/vcl/unx/kde4/KDESalDisplay.hxx @@ -27,7 +27,7 @@ #pragma once -#include +#include class SalKDEDisplay : public SalX11Display { @@ -35,3 +35,4 @@ class SalKDEDisplay : public SalX11Display SalKDEDisplay( Display* pDisp ); virtual ~SalKDEDisplay(); }; + diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx index 0c8f04f9fe41..6741fb7449ae 100644 --- a/vcl/unx/kde4/KDESalFrame.cxx +++ b/vcl/unx/kde4/KDESalFrame.cxx @@ -44,13 +44,14 @@ #include "KDEXLib.hxx" #include "KDESalGraphics.hxx" +#include + #include #include -#include -#include +#include -#include +#include #if OSL_DEBUG_LEVEL > 1 #include @@ -86,12 +87,14 @@ static OUString readEntryUntranslated( KConfigGroup *pGroup, const char *pKey ) return OUString::createFromAscii( (const char *) pGroup->readEntryUntranslated( pKey ).toAscii() ); } +#if 0 /** Helper function to read color from KConfig configuration repository. */ static Color readColor( KConfigGroup *pGroup, const char *pKey ) { return toColor( pGroup->readEntry( pKey, QColor(Qt::white) ) ); } +#endif /** Helper function to add information to Font from QFont. @@ -402,4 +405,4 @@ SalGraphics* KDESalFrame::GetGraphics() } return NULL; -} \ No newline at end of file +} diff --git a/vcl/unx/kde4/KDESalFrame.hxx b/vcl/unx/kde4/KDESalFrame.hxx index 643be72c27f3..a518017855cb 100644 --- a/vcl/unx/kde4/KDESalFrame.hxx +++ b/vcl/unx/kde4/KDESalFrame.hxx @@ -27,8 +27,8 @@ #pragma once -#include -#include +#include +#include class KDESalFrame : public X11SalFrame { @@ -55,4 +55,4 @@ class KDESalFrame : public X11SalFrame virtual void updateGraphics( bool bClear ); virtual void UpdateSettings( AllSettings& rSettings ); virtual void Show( BOOL bVisible, BOOL bNoActivate ); -}; \ No newline at end of file +}; diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx index 2c04af384c51..5a5cd11c52d9 100644 --- a/vcl/unx/kde4/KDESalGraphics.cxx +++ b/vcl/unx/kde4/KDESalGraphics.cxx @@ -556,7 +556,7 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part, if (returnVal) { - GC gc = SelectFont(); + GC gc = GetFontGC(); if( gc ) { diff --git a/vcl/unx/kde4/KDESalGraphics.hxx b/vcl/unx/kde4/KDESalGraphics.hxx index 0bce1700f1fc..327ba0b3d464 100644 --- a/vcl/unx/kde4/KDESalGraphics.hxx +++ b/vcl/unx/kde4/KDESalGraphics.hxx @@ -28,8 +28,8 @@ #pragma once #include -#include -#include +#include +#include #define Region QtXRegion #include @@ -110,4 +110,4 @@ class KDESalGraphics : public X11SalGraphics const ImplControlValue& aValue, const rtl::OUString& aCaption, Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ); -}; \ No newline at end of file +}; diff --git a/vcl/unx/kde4/KDESalInstance.cxx b/vcl/unx/kde4/KDESalInstance.cxx index 01c4723bd530..e06bf1a3cf7a 100644 --- a/vcl/unx/kde4/KDESalInstance.cxx +++ b/vcl/unx/kde4/KDESalInstance.cxx @@ -32,4 +32,4 @@ SalFrame* KDESalInstance::CreateFrame( SalFrame *pParent, ULONG nState ) { return new KDESalFrame( pParent, nState ); -} \ No newline at end of file +} diff --git a/vcl/unx/kde4/KDESalInstance.hxx b/vcl/unx/kde4/KDESalInstance.hxx index 7d050fe6819e..dc1e52b26717 100644 --- a/vcl/unx/kde4/KDESalInstance.hxx +++ b/vcl/unx/kde4/KDESalInstance.hxx @@ -27,7 +27,7 @@ #pragma once -#include +#include class SalYieldMutex; class SalFrame; @@ -38,4 +38,4 @@ class KDESalInstance : public X11SalInstance KDESalInstance( SalYieldMutex* pMutex ) : X11SalInstance( pMutex ) {} virtual ~KDESalInstance() {} virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle ); -}; \ No newline at end of file +}; diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx index 6a2793b8abe3..f60e84c0bc02 100644 --- a/vcl/unx/kde4/KDEXLib.cxx +++ b/vcl/unx/kde4/KDEXLib.cxx @@ -25,6 +25,8 @@ * ************************************************************************/ +#include + #include "VCLKDEApplication.hxx" #define Region QtXRegion @@ -39,11 +41,10 @@ #include "KDEXLib.hxx" -#include -#include +#include +#include -#include -#include +#include #include "KDESalDisplay.hxx" diff --git a/vcl/unx/kde4/KDEXLib.hxx b/vcl/unx/kde4/KDEXLib.hxx index 985e0c3c6717..561f6ee73a78 100644 --- a/vcl/unx/kde4/KDEXLib.hxx +++ b/vcl/unx/kde4/KDEXLib.hxx @@ -27,7 +27,7 @@ #pragma once -#include +#include class KDEXLib : public SalXLib { @@ -46,3 +46,4 @@ class KDEXLib : public SalXLib void doStartup(); }; + diff --git a/vcl/unx/kde4/VCLKDEApplication.cxx b/vcl/unx/kde4/VCLKDEApplication.cxx index 2cfb071e96ae..5e3a85256313 100644 --- a/vcl/unx/kde4/VCLKDEApplication.cxx +++ b/vcl/unx/kde4/VCLKDEApplication.cxx @@ -49,4 +49,4 @@ bool VCLKDEApplication::x11EventFilter(XEvent* event) } return false; -} \ No newline at end of file +} diff --git a/vcl/unx/kde4/VCLKDEApplication.hxx b/vcl/unx/kde4/VCLKDEApplication.hxx index 2edfddd69a9c..7cbbe38b61df 100644 --- a/vcl/unx/kde4/VCLKDEApplication.hxx +++ b/vcl/unx/kde4/VCLKDEApplication.hxx @@ -50,4 +50,4 @@ class VCLKDEApplication : public KApplication virtual bool x11EventFilter(XEvent* event); SalKDEDisplay* disp; -}; \ No newline at end of file +}; diff --git a/vcl/unx/source/app/i18n_cb.cxx b/vcl/unx/source/app/i18n_cb.cxx deleted file mode 100644 index d3a4f2b819ae..000000000000 --- a/vcl/unx/source/app/i18n_cb.cxx +++ /dev/null @@ -1,664 +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_vcl.hxx" - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include "i18n_ic.hxx" -#include "i18n_im.hxx" -#ifndef _OSL_THREAD_H -#include -#endif -#include - -// ------------------------------------------------------------------------- -// -// i. preedit start callback -// -// ------------------------------------------------------------------------- - -int -PreeditStartCallback ( XIC, XPointer client_data, XPointer ) -{ - preedit_data_t* pPreeditData = (preedit_data_t*)client_data; - if ( pPreeditData->eState == ePreeditStatusActivationRequired ) - { - pPreeditData->eState = ePreeditStatusActive; - pPreeditData->aText.nCursorPos = 0; - pPreeditData->aText.nLength = 0; - } - - return -1; -} - -// ------------------------------------------------------------------------- -// -// ii. preedit done callback -// -// ------------------------------------------------------------------------- - -void -PreeditDoneCallback ( XIC, XPointer client_data, XPointer ) -{ - preedit_data_t* pPreeditData = (preedit_data_t*)client_data; - if (pPreeditData->eState == ePreeditStatusActive ) - { - if( pPreeditData->pFrame ) - pPreeditData->pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, (void*)NULL ); - } - pPreeditData->eState = ePreeditStatusStartPending; -} - -// ------------------------------------------------------------------------- -// -// iii. preedit draw callback -// -// ------------------------------------------------------------------------- - -// -// Handle deletion of text in a preedit_draw_callback -// from and howmuch are guaranteed to be nonnegative -// - -void -Preedit_DeleteText(preedit_text_t *ptext, int from, int howmuch) -{ - // If we've been asked to delete no text then just set - // nLength correctly and return - if (ptext->nLength == 0) - { - ptext->nLength = from; - return; - } - - int to = from + howmuch; - - if (to == (int)ptext->nLength) - { - // delete from the end of the text - ptext->nLength = from; - } - else - if (to < (int)ptext->nLength) - { - // cut out of the middle of the text - memmove( (void*)(ptext->pUnicodeBuffer + from), - (void*)(ptext->pUnicodeBuffer + to), - (ptext->nLength - to) * sizeof(sal_Unicode)); - memmove( (void*)(ptext->pCharStyle + from), - (void*)(ptext->pCharStyle + to), - (ptext->nLength - to) * sizeof(XIMFeedback)); - ptext->nLength -= howmuch; - } - else - // if ( to > pText->nLength ) - { - // XXX this indicates an error, are we out of sync ? - fprintf(stderr, "Preedit_DeleteText( from=%i to=%i length=%i )\n", - from, to, ptext->nLength ); - fprintf (stderr, "\t XXX internal error, out of sync XXX\n"); - - ptext->nLength = from; - } - - // NULL-terminate the string - ptext->pUnicodeBuffer[ptext->nLength] = (sal_Unicode)0; -} - -// reallocate the textbuffer with sufficiently large size 2^x -// nnewlimit is presupposed to be larger than ptext->size -void -enlarge_buffer ( preedit_text_t *ptext, int nnewlimit ) -{ - size_t nnewsize = ptext->nSize; - - while ( nnewsize <= (size_t)nnewlimit ) - nnewsize *= 2; - - ptext->nSize = nnewsize; - ptext->pUnicodeBuffer = (sal_Unicode*)realloc((void*)ptext->pUnicodeBuffer, - nnewsize * sizeof(sal_Unicode)); - ptext->pCharStyle = (XIMFeedback*)realloc((void*)ptext->pCharStyle, - nnewsize * sizeof(XIMFeedback)); -} - -// -// Handle insertion of text in a preedit_draw_callback -// string field of XIMText struct is guaranteed to be != NULL -// - -void -Preedit_InsertText(preedit_text_t *pText, XIMText *pInsertText, int where, - Bool isMultilingual) -{ - sal_Unicode *pInsertTextString; - int nInsertTextLength = 0; - XIMFeedback *pInsertTextCharStyle = pInsertText->feedback; - - nInsertTextLength = pInsertText->length; - - if (isMultilingual) - { - XIMUnicodeText *pUniText = (XIMUnicodeText*)pInsertText; - pInsertTextString = pUniText->string.utf16_char; - } - else - { - // can't handle wchar_t strings, so convert to multibyte chars first - char *pMBString; - size_t nMBLength; - if (pInsertText->encoding_is_wchar) - { - wchar_t *pWCString = pInsertText->string.wide_char; - size_t nBytes = wcstombs ( NULL, pWCString, 1024 /* dont care */); - pMBString = (char*)alloca( nBytes + 1 ); - nMBLength = wcstombs ( pMBString, pWCString, nBytes + 1); - } - else - { - pMBString = pInsertText->string.multi_byte; - nMBLength = strlen(pMBString); // xxx - } - - // convert multibyte chars to unicode - rtl_TextEncoding nEncoding = osl_getThreadTextEncoding(); - - if (nEncoding != RTL_TEXTENCODING_UNICODE) - { - rtl_TextToUnicodeConverter aConverter = - rtl_createTextToUnicodeConverter( nEncoding ); - rtl_TextToUnicodeContext aContext = - rtl_createTextToUnicodeContext(aConverter); - - sal_Size nBufferSize = nInsertTextLength * 2; - - pInsertTextString = (sal_Unicode*)alloca(nBufferSize); - - sal_uInt32 nConversionInfo; - sal_Size nConvertedChars; - - rtl_convertTextToUnicode( aConverter, aContext, - pMBString, nMBLength, - pInsertTextString, nBufferSize, - RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_IGNORE - | RTL_TEXTTOUNICODE_FLAGS_INVALID_IGNORE, - &nConversionInfo, &nConvertedChars ); - - rtl_destroyTextToUnicodeContext(aConverter, aContext); - rtl_destroyTextToUnicodeConverter(aConverter); - - } - else - { - pInsertTextString = (sal_Unicode*)pMBString; - } - } - - // enlarge target text-buffer if necessary - if (pText->nSize <= (pText->nLength + nInsertTextLength)) - enlarge_buffer(pText, pText->nLength + nInsertTextLength); - - // insert text: displace old mem and put new bytes in - int from = where; - int to = where + nInsertTextLength; - int howmany = pText->nLength - where; - - memmove((void*)(pText->pUnicodeBuffer + to), - (void*)(pText->pUnicodeBuffer + from), - howmany * sizeof(sal_Unicode)); - memmove((void*)(pText->pCharStyle + to), - (void*)(pText->pCharStyle + from), - howmany * sizeof(XIMFeedback)); - - to = from; - howmany = nInsertTextLength; - - memcpy((void*)(pText->pUnicodeBuffer + to), (void*)pInsertTextString, - howmany * sizeof(sal_Unicode)); - memcpy((void*)(pText->pCharStyle + to), (void*)pInsertTextCharStyle, - howmany * sizeof(XIMFeedback)); - - pText->nLength += howmany; - - // NULL-terminate the string - pText->pUnicodeBuffer[pText->nLength] = (sal_Unicode)0; -} - -// -// Handle the change of attributes in a preedit_draw_callback -// -void -Preedit_UpdateAttributes ( preedit_text_t* ptext, XIMFeedback* feedback, - int from, int amount ) -{ - if ( (from + amount) > (int)ptext->nLength ) - { - // XXX this indicates an error, are we out of sync ? - fprintf (stderr, "Preedit_UpdateAttributes( %i + %i > %i )\n", - from, amount, ptext->nLength ); - fprintf (stderr, "\t XXX internal error, out of sync XXX\n"); - - return; - } - - memcpy ( ptext->pCharStyle + from, - feedback, amount * sizeof(XIMFeedback) ); -} - -// Convert the XIM feedback values into appropriate VCL -// SAL_EXTTEXTINPUT_ATTR values -// returns an allocate list of attributes, which must be freed by caller -USHORT* -Preedit_FeedbackToSAL ( XIMFeedback* pfeedback, int nlength, std::vector& rSalAttr ) -{ - USHORT *psalattr; - USHORT nval; - USHORT noldval = 0; - XIMFeedback nfeedback; - - // only work with reasonable length - if (nlength > 0 && nlength > sal::static_int_cast(rSalAttr.size()) ) - { - rSalAttr.reserve( nlength ); - psalattr = &rSalAttr[0]; - } - else - return (USHORT*)NULL; - - for (int npos = 0; npos < nlength; npos++) - { - nval = 0; - nfeedback = pfeedback[npos]; - - // means to use the feedback of the previous char - if (nfeedback == 0) - { - nval = noldval; - } - // convert feedback to attributes - else - { - if (nfeedback & XIMReverse) - nval |= SAL_EXTTEXTINPUT_ATTR_HIGHLIGHT; - if (nfeedback & XIMUnderline) - nval |= SAL_EXTTEXTINPUT_ATTR_UNDERLINE; - if (nfeedback & XIMHighlight) - nval |= SAL_EXTTEXTINPUT_ATTR_HIGHLIGHT; - if (nfeedback & XIMPrimary) - nval |= SAL_EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE; - if (nfeedback & XIMSecondary) - nval |= SAL_EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE; - if (nfeedback & XIMTertiary) // same as 2ery - nval |= SAL_EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE; - - /* - // visibility feedback not supported now - if ( (nfeedback & XIMVisibleToForward) - || (nfeedback & XIMVisibleToBackward) - || (nfeedback & XIMVisibleCenter) ) - { } - */ - } - // copy in list - psalattr[npos] = nval; - noldval = nval; - } - // return list of sal attributes - return psalattr; -} - -void -PreeditDrawCallback(XIC ic, XPointer client_data, - XIMPreeditDrawCallbackStruct *call_data) -{ - preedit_data_t* pPreeditData = (preedit_data_t*)client_data; - - // if there's nothing to change then change nothing - if ( ( (call_data->text == NULL) && (call_data->chg_length == 0) ) - || pPreeditData->pFrame == NULL ) - return; - - // #88564# Solaris 7 deletes the preedit buffer after commit - // since the next call to preeditstart will have the same effect just skip this. - // if (pPreeditData->eState == ePreeditStatusStartPending && call_data->text == NULL) - // return; - - if ( pPreeditData->eState == ePreeditStatusStartPending ) - pPreeditData->eState = ePreeditStatusActivationRequired; - PreeditStartCallback( ic, client_data, NULL ); - - // Edit the internal textbuffer as indicated by the call_data, - // chg_first and chg_length are guaranteed to be nonnegative - - // handle text deletion - if (call_data->text == NULL) - { - Preedit_DeleteText(&(pPreeditData->aText), - call_data->chg_first, call_data->chg_length ); - } - else - { - // handle text insertion - if ( (call_data->chg_length == 0) - && (call_data->text->string.wide_char != NULL)) - { - Preedit_InsertText(&(pPreeditData->aText), call_data->text, - call_data->chg_first, pPreeditData->bIsMultilingual); - } - else - // handle text replacement by deletion and insertion of text, - // not smart, just good enough - if ( (call_data->chg_length != 0) - && (call_data->text->string.wide_char != NULL)) - { - Preedit_DeleteText(&(pPreeditData->aText), - call_data->chg_first, call_data->chg_length); - Preedit_InsertText(&(pPreeditData->aText), call_data->text, - call_data->chg_first, pPreeditData->bIsMultilingual); - } - else - // not really a text update, only attributes are concerned - if ( (call_data->chg_length != 0) - && (call_data->text->string.wide_char == NULL)) - { - Preedit_UpdateAttributes(&(pPreeditData->aText), - call_data->text->feedback, - call_data->chg_first, call_data->chg_length); - } - } - - // - // build the SalExtTextInputEvent and send it up - // - pPreeditData->aInputEv.mnTime = 0; - pPreeditData->aInputEv.mpTextAttr = Preedit_FeedbackToSAL( - pPreeditData->aText.pCharStyle, pPreeditData->aText.nLength, pPreeditData->aInputFlags); - pPreeditData->aInputEv.mnCursorPos = call_data->caret; - pPreeditData->aInputEv.maText = String (pPreeditData->aText.pUnicodeBuffer, - pPreeditData->aText.nLength); - pPreeditData->aInputEv.mnCursorFlags = 0; // default: make cursor visible - pPreeditData->aInputEv.mnDeltaStart = 0; // call_data->chg_first; - pPreeditData->aInputEv.mbOnlyCursor = False; - - if ( pPreeditData->eState == ePreeditStatusActive && pPreeditData->pFrame ) - pPreeditData->pFrame->CallCallback(SALEVENT_EXTTEXTINPUT, (void*)&pPreeditData->aInputEv); - if (pPreeditData->aText.nLength == 0 && pPreeditData->pFrame ) - pPreeditData->pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, (void*)NULL ); - - if (pPreeditData->aText.nLength == 0) - pPreeditData->eState = ePreeditStatusStartPending; - - GetPreeditSpotLocation(ic, (XPointer)pPreeditData); -} - -void -GetPreeditSpotLocation(XIC ic, XPointer client_data) -{ - // - // Send SalEventExtTextInputPos event to get spotlocation - // - SalExtTextInputPosEvent mPosEvent; - preedit_data_t* pPreeditData = (preedit_data_t*)client_data; - - if( pPreeditData->pFrame ) - pPreeditData->pFrame->CallCallback(SALEVENT_EXTTEXTINPUTPOS, (void*)&mPosEvent); - - XPoint point; - point.x = mPosEvent.mnX + mPosEvent.mnWidth; - point.y = mPosEvent.mnY + mPosEvent.mnHeight; - - XVaNestedList preedit_attr; - preedit_attr = XVaCreateNestedList(0, XNSpotLocation, &point, NULL); - XSetICValues(ic, XNPreeditAttributes, preedit_attr, NULL); - XFree(preedit_attr); - - return; -} - -// ------------------------------------------------------------------------- -// -// iv. preedit caret callback -// -// ------------------------------------------------------------------------- - -#if OSL_DEBUG_LEVEL > 1 -void -PreeditCaretCallback ( XIC ic, XPointer client_data, - XIMPreeditCaretCallbackStruct *call_data ) -#else -void -PreeditCaretCallback ( XIC, XPointer,XIMPreeditCaretCallbackStruct* ) -#endif -{ - #if OSL_DEBUG_LEVEL > 1 - // XXX PreeditCaretCallback is pure debug code for now - const char *direction = "?"; - const char *style = "?"; - - switch ( call_data->style ) - { - case XIMIsInvisible: style = "Invisible"; break; - case XIMIsPrimary: style = "Primary"; break; - case XIMIsSecondary: style = "Secondary"; break; - } - switch ( call_data->direction ) - { - case XIMForwardChar: direction = "Forward char"; break; - case XIMBackwardChar: direction = "Backward char"; break; - case XIMForwardWord: direction = "Forward word"; break; - case XIMBackwardWord: direction = "Backward word"; break; - case XIMCaretUp: direction = "Caret up"; break; - case XIMCaretDown: direction = "Caret down"; break; - case XIMNextLine: direction = "Next line"; break; - case XIMPreviousLine: direction = "Previous line"; break; - case XIMLineStart: direction = "Line start"; break; - case XIMLineEnd: direction = "Line end"; break; - case XIMAbsolutePosition: direction = "Absolute"; break; - case XIMDontChange: direction = "Dont change"; break; - } - - fprintf (stderr, "PreeditCaretCallback( ic=%p, client=%p,\n", - ic, client_data ); - fprintf (stderr, "\t position=%i, direction=\"%s\", style=\"%s\" )\n", - call_data->position, direction, style ); - #endif -} - -// ----------------------------------------------------------------------- -// -// v. commit string callback: convert an extended text input (iiimp ... ) -// into an ordinary key-event -// -// ----------------------------------------------------------------------- - -Bool -IsControlCode(sal_Unicode nChar) -{ - if ( nChar <= 0x1F // C0 controls - /* || (0x80 <= nChar && nChar <= 0x9F) C1 controls */ ) - return True; - else - return False; -} - -int -CommitStringCallback( XIC ic, XPointer client_data, XPointer call_data ) -{ - preedit_data_t* pPreeditData = (preedit_data_t*)client_data; - - XIMUnicodeText *cbtext = (XIMUnicodeText *)call_data; - sal_Unicode *p_unicode_data = (sal_Unicode*)cbtext->string.utf16_char; - - // #86964# filter unexpected pure control events - if (cbtext->length == 1 && IsControlCode(p_unicode_data[0]) ) - { - if( pPreeditData->pFrame ) - { - pPreeditData->pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, (void*)NULL ); - } - } - else - { - if( pPreeditData->pFrame ) - { - pPreeditData->aInputEv.mnTime = 0; - pPreeditData->aInputEv.mpTextAttr = 0; - pPreeditData->aInputEv.mnCursorPos = cbtext->length; - pPreeditData->aInputEv.maText = UniString(p_unicode_data, cbtext->length); - pPreeditData->aInputEv.mnCursorFlags = 0; // default: make cursor visible - pPreeditData->aInputEv.mnDeltaStart = 0; - pPreeditData->aInputEv.mbOnlyCursor = False; - - pPreeditData->pFrame->CallCallback( SALEVENT_EXTTEXTINPUT, (void*)&pPreeditData->aInputEv); - pPreeditData->pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, (void*)NULL ); - } - } - pPreeditData->eState = ePreeditStatusStartPending; - - GetPreeditSpotLocation(ic, (XPointer)pPreeditData); - - return 0; -} - -// ---------------------------------------------------------------------------------- -// -// vi. status callbacks: for now these are empty, they are just needed for turbo linux -// -// ---------------------------------------------------------------------------------- - -void -StatusStartCallback (XIC, XPointer, XPointer) -{ - return; -} - -void -StatusDoneCallback (XIC, XPointer, XPointer) -{ - return; -} - -void -StatusDrawCallback (XIC ic, XPointer client_data, XIMStatusDrawCallbackStruct *call_data) -{ - preedit_data_t* pPreeditData = (preedit_data_t*)client_data; - if( pPreeditData->bIsMultilingual ) - { - // IIIMP - XIMUnicodeText *cbtext = (XIMUnicodeText *)call_data->data.text; - ::vcl::I18NStatus::get().setStatusText( String( cbtext->string.utf16_char, call_data->data.text->length ) ); - XIMUnicodeCharacterSubset* pSubset = NULL; - if( ! XGetICValues( ic, - XNUnicodeCharacterSubset, & pSubset, - NULL ) - && pSubset ) - { - ::vcl::I18NStatus::get().changeIM( String( ByteString( pSubset->name ), RTL_TEXTENCODING_UTF8 ) ); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "got XNUnicodeCharacterSubset\n %d\n %d\n %s\n %d\n", pSubset->index, pSubset->subset_id, pSubset->name, pSubset->is_active ); -#endif - } - } - else if( call_data->type == XIMTextType ) - { - String aText; - if( call_data->data.text ) - { - // XIM with text - sal_Char* pMBString = NULL; - size_t nLength = 0; - if( call_data->data.text->encoding_is_wchar ) - { - if( call_data->data.text->string.wide_char ) - { - wchar_t* pWString = call_data->data.text->string.wide_char; - size_t nBytes = wcstombs( NULL, pWString, 1024 ); - pMBString = (sal_Char*)alloca( nBytes+1 ); - nLength = wcstombs( pMBString, pWString, nBytes+1 ); - } - } - else - { - if( call_data->data.text->string.multi_byte ) - { - pMBString = call_data->data.text->string.multi_byte; - nLength = strlen( pMBString ); - } - } - if( nLength ) - aText = String( pMBString, nLength, gsl_getSystemTextEncoding() ); - } - ::vcl::I18NStatus::get().setStatusText( aText ); - } -#if OSL_DEBUG_LEVEL > 1 - else - fprintf( stderr, "XIMStatusDataType %s not supported\n", - call_data->type == XIMBitmapType ? "XIMBitmapType" : ByteString::CreateFromInt32( call_data->type ).GetBuffer() ); -#endif - return; -} - -void -SwitchIMCallback (XIC, XPointer, XPointer call_data) -{ - XIMSwitchIMNotifyCallbackStruct* pCallData = (XIMSwitchIMNotifyCallbackStruct*)call_data; - ::vcl::I18NStatus::get().changeIM( String( ByteString( pCallData->to->name ), RTL_TEXTENCODING_UTF8 ) ); -} - -// ---------------------------------------------------------------------------------- -// -// vii. destroy callbacks: internally disable all IC/IM calls -// -// ---------------------------------------------------------------------------------- - -void -IC_IMDestroyCallback (XIM, XPointer client_data, XPointer) -{ - SalI18N_InputContext *pContext = (SalI18N_InputContext*)client_data; - if (pContext != NULL) - pContext->HandleDestroyIM(); -} - -void -IM_IMDestroyCallback (XIM, XPointer client_data, XPointer) -{ - SalI18N_InputMethod *pMethod = (SalI18N_InputMethod*)client_data; - if (pMethod != NULL) - pMethod->HandleDestroyIM(); -} diff --git a/vcl/unx/source/app/i18n_ic.cxx b/vcl/unx/source/app/i18n_ic.cxx deleted file mode 100644 index 3064be9367e1..000000000000 --- a/vcl/unx/source/app/i18n_ic.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_vcl.hxx" - -#include -#include - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -#ifndef _SV_SALFRAME_HXX -#include -#endif -#include -#include - -#ifndef _OSL_THREAD_H -#include -#endif - -using namespace vcl; - -static void sendEmptyCommit( SalFrame* pFrame ) -{ - vcl::DeletionListener aDel( pFrame ); - - SalExtTextInputEvent aEmptyEv; - aEmptyEv.mnTime = 0; - aEmptyEv.mpTextAttr = 0; - aEmptyEv.maText = String(); - aEmptyEv.mnCursorPos = 0; - aEmptyEv.mnCursorFlags = 0; - aEmptyEv.mnDeltaStart = 0; - aEmptyEv.mbOnlyCursor = False; - pFrame->CallCallback( SALEVENT_EXTTEXTINPUT, (void*)&aEmptyEv ); - if( ! aDel.isDeleted() ) - pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, NULL ); -} - -// --------------------------------------------------------------------------- -// -// Constructor / Destructor, the InputContext is bound to the SalFrame, as it -// needs the shell window as a focus window -// -// ---------------------------------------------------------------------------- - -SalI18N_InputContext::~SalI18N_InputContext() -{ - if ( maContext != NULL ) - XDestroyIC( maContext ); - if ( mpAttributes != NULL ) - XFree( mpAttributes ); - if ( mpStatusAttributes != NULL ) - XFree( mpStatusAttributes ); - if ( mpPreeditAttributes != NULL ) - XFree( mpPreeditAttributes ); - - if (maClientData.aText.pUnicodeBuffer != NULL) - free(maClientData.aText.pUnicodeBuffer); - if (maClientData.aText.pCharStyle != NULL) - free(maClientData.aText.pCharStyle); -} - -// ---------------------------------------------------------------------------- -// convenience routine to add items to a XVaNestedList -// ---------------------------------------------------------------------------- - -static XVaNestedList -XVaAddToNestedList( XVaNestedList a_srclist, char* name, XPointer value ) -{ - XVaNestedList a_dstlist; - - // if ( value == NULL ) - // return a_srclist; - - if ( a_srclist == NULL ) - { - a_dstlist = XVaCreateNestedList( - 0, - name, value, - NULL ); - } - else - { - a_dstlist = XVaCreateNestedList( - 0, - XNVaNestedList, a_srclist, - name, value, - NULL ); - } - - return a_dstlist != NULL ? a_dstlist : a_srclist ; -} - -// ---------------------------------------------------------------------------- -// convenience routine to create a fontset -// ---------------------------------------------------------------------------- - -static XFontSet -get_font_set( Display *p_display ) -{ - static XFontSet p_font_set = NULL; - - if (p_font_set == NULL) - { - char **pp_missing_list; - int n_missing_count; - char *p_default_string; - - p_font_set = XCreateFontSet(p_display, "-*", - &pp_missing_list, &n_missing_count, &p_default_string); - } - - return p_font_set; -} - -// --------------------------------------------------------------------------- -// -// Constructor for a InputContext (IC) -// -// ---------------------------------------------------------------------------- - -SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) : - mbUseable( True ), - maContext( (XIC)NULL ), - mnSupportedStatusStyle( - XIMStatusCallbacks | - XIMStatusNothing | - XIMStatusNone - ), - mnSupportedPreeditStyle( - XIMPreeditCallbacks | - XIMPreeditNothing | - XIMPreeditNone - ), - mnStatusStyle( 0 ), - mnPreeditStyle( 0 ), - mpAttributes( NULL ), - mpStatusAttributes( NULL ), - mpPreeditAttributes( NULL ) -{ -#ifdef SOLARIS - static const char* pIIIMPEnable = getenv( "SAL_DISABLE_OWN_IM_STATUS" ); - if( pIIIMPEnable && *pIIIMPEnable ) - mnSupportedStatusStyle &= ~XIMStatusCallbacks; -#endif - - maClientData.aText.pUnicodeBuffer = NULL; - maClientData.aText.pCharStyle = NULL; - maClientData.aInputEv.mnTime = 0; - maClientData.aInputEv.mpTextAttr = NULL; - maClientData.aInputEv.mnCursorPos = 0; - maClientData.aInputEv.mnDeltaStart = 0; - maClientData.aInputEv.mnCursorFlags = 0; - maClientData.aInputEv.mbOnlyCursor = FALSE; - - SalI18N_InputMethod *pInputMethod; - pInputMethod = GetX11SalData()->GetDisplay()->GetInputMethod(); - mbMultiLingual = pInputMethod->IsMultiLingual(); - - mnSupportedPreeditStyle = XIMPreeditCallbacks | XIMPreeditPosition - | XIMPreeditNothing | XIMPreeditNone; - if (pInputMethod->UseMethod() - && SupportInputMethodStyle( pInputMethod->GetSupportedStyles() ) ) - { - const SystemEnvData* pEnv = pFrame->GetSystemData(); - XLIB_Window aClientWindow = pEnv->aShellWindow; - XLIB_Window aFocusWindow = pEnv->aWindow; - - // for status callbacks and commit string callbacks -#define PREEDIT_BUFSZ 16 - maClientData.bIsMultilingual = mbMultiLingual; - maClientData.eState = ePreeditStatusStartPending; - maClientData.pFrame = pFrame; - maClientData.aText.pUnicodeBuffer = - (sal_Unicode*)malloc(PREEDIT_BUFSZ * sizeof(sal_Unicode)); - maClientData.aText.pCharStyle = - (XIMFeedback*)malloc(PREEDIT_BUFSZ * sizeof(XIMFeedback));; - maClientData.aText.nSize = PREEDIT_BUFSZ; - maClientData.aText.nCursorPos = 0; - maClientData.aText.nLength = 0; - - // - // Status attributes - // - - switch ( mnStatusStyle ) - { - case XIMStatusCallbacks: - { - static XIMCallback aStatusStartCallback; - static XIMCallback aStatusDoneCallback; - static XIMCallback aStatusDrawCallback; - - aStatusStartCallback.callback = (XIMProc)StatusStartCallback; - aStatusStartCallback.client_data = (XPointer)&maClientData; - aStatusDoneCallback.callback = (XIMProc)StatusDoneCallback; - aStatusDoneCallback.client_data = (XPointer)&maClientData; - aStatusDrawCallback.callback = (XIMProc)StatusDrawCallback; - aStatusDrawCallback.client_data = (XPointer)&maClientData; - - mpStatusAttributes = XVaCreateNestedList ( - 0, - XNStatusStartCallback, &aStatusStartCallback, - XNStatusDoneCallback, &aStatusDoneCallback, - XNStatusDrawCallback, &aStatusDrawCallback, - NULL ); - - break; - } - - case XIMStatusArea: - /* not supported */ - break; - - case XIMStatusNone: - case XIMStatusNothing: - default: - /* no arguments needed */ - break; - } - - // - // set preedit attributes - // - - switch ( mnPreeditStyle ) - { - case XIMPreeditCallbacks: - - maPreeditCaretCallback.callback = (XIMProc)PreeditCaretCallback; - maPreeditStartCallback.callback = (XIMProc)PreeditStartCallback; - maPreeditDoneCallback.callback = (XIMProc)PreeditDoneCallback; - maPreeditDrawCallback.callback = (XIMProc)PreeditDrawCallback; - maPreeditCaretCallback.client_data = (XPointer)&maClientData; - maPreeditStartCallback.client_data = (XPointer)&maClientData; - maPreeditDoneCallback.client_data = (XPointer)&maClientData; - maPreeditDrawCallback.client_data = (XPointer)&maClientData; - - mpPreeditAttributes = XVaCreateNestedList ( - 0, - XNPreeditStartCallback, &maPreeditStartCallback, - XNPreeditDoneCallback, &maPreeditDoneCallback, - XNPreeditDrawCallback, &maPreeditDrawCallback, - XNPreeditCaretCallback, &maPreeditCaretCallback, - NULL ); - - break; - - case XIMPreeditArea: - /* not supported */ - break; - - case XIMPreeditPosition: - { - // spot location - SalExtTextInputPosEvent aPosEvent; - pFrame->CallCallback(SALEVENT_EXTTEXTINPUTPOS, (void*)&aPosEvent); - - static XPoint aSpot; - aSpot.x = aPosEvent.mnX + aPosEvent.mnWidth; - aSpot.y = aPosEvent.mnY + aPosEvent.mnHeight; - - // create attributes for preedit position style - mpPreeditAttributes = XVaCreateNestedList ( - 0, - XNSpotLocation, &aSpot, - NULL ); - - // XCreateIC() fails on Redflag Linux 2.0 if there is no - // fontset though the data itself is not evaluated nor is - // it required according to the X specs. - Display* pDisplay = GetX11SalData()->GetDisplay()->GetDisplay(); - XFontSet pFontSet = get_font_set(pDisplay); - - if (pFontSet != NULL) - { - mpPreeditAttributes = XVaAddToNestedList( mpPreeditAttributes, - const_cast(XNFontSet), (XPointer)pFontSet); - } - - break; - } - - case XIMPreeditNone: - case XIMPreeditNothing: - default: - /* no arguments needed */ - break; - } - - // Create the InputContext by giving it exactly the information it - // deserves, because inappropriate attributes - // let XCreateIC fail on Solaris (eg. for C locale) - - mpAttributes = XVaCreateNestedList( - 0, - XNFocusWindow, aFocusWindow, - XNClientWindow, aClientWindow, - XNInputStyle, mnPreeditStyle | mnStatusStyle, - NULL ); - - if ( mnPreeditStyle != XIMPreeditNone ) - { -#if defined LINUX || defined FREEBSD || defined NETBSD - if ( mpPreeditAttributes != NULL ) -#endif - mpAttributes = XVaAddToNestedList( mpAttributes, - const_cast(XNPreeditAttributes), (XPointer)mpPreeditAttributes ); - } - if ( mnStatusStyle != XIMStatusNone ) - { -#if defined LINUX || defined FREEBSD || defined NETBSD - if ( mpStatusAttributes != NULL ) -#endif - mpAttributes = XVaAddToNestedList( mpAttributes, - const_cast(XNStatusAttributes), (XPointer)mpStatusAttributes ); - } - maContext = XCreateIC( pInputMethod->GetMethod(), - XNVaNestedList, mpAttributes, - NULL ); - } - - if ( maContext == NULL ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf(stderr, "input context creation failed\n"); -#endif - - mbUseable = False; - mbMultiLingual = False; - - if ( mpAttributes != NULL ) - XFree( mpAttributes ); - if ( mpStatusAttributes != NULL ) - XFree( mpStatusAttributes ); - if ( mpPreeditAttributes != NULL ) - XFree( mpPreeditAttributes ); - if ( maClientData.aText.pUnicodeBuffer != NULL ) - free ( maClientData.aText.pUnicodeBuffer ); - if ( maClientData.aText.pCharStyle != NULL ) - free ( maClientData.aText.pCharStyle ); - - mpAttributes = NULL; - mpStatusAttributes = NULL; - mpPreeditAttributes = NULL; - maClientData.aText.pUnicodeBuffer = NULL; - maClientData.aText.pCharStyle = NULL; - } - - if ( maContext != NULL && mbMultiLingual ) - { - maCommitStringCallback.callback = (XIMProc)::CommitStringCallback; - maCommitStringCallback.client_data = (XPointer)&maClientData; - maSwitchIMCallback.callback = (XIMProc)::SwitchIMCallback; - maSwitchIMCallback.client_data = (XPointer)&maClientData; - XSetICValues( maContext, - XNCommitStringCallback, &maCommitStringCallback, - XNSwitchIMNotifyCallback, &maSwitchIMCallback, - NULL ); - } - if ( maContext != NULL) - { - maDestroyCallback.callback = (XIMProc)IC_IMDestroyCallback; - maDestroyCallback.client_data = (XPointer)this; - XSetICValues( maContext, - XNDestroyCallback, &maDestroyCallback, - NULL ); - } - - if( mbMultiLingual ) - { - // set initial IM status - XIMUnicodeCharacterSubset* pSubset = NULL; - if( ! XGetICValues( maContext, - XNUnicodeCharacterSubset, & pSubset, - NULL ) - && pSubset ) - { - String aCurrent( ByteString( pSubset->name ), RTL_TEXTENCODING_UTF8 ); - ::vcl::I18NStatus::get().changeIM( aCurrent ); - ::vcl::I18NStatus::get().setStatusText( aCurrent ); - } - } -} - -// --------------------------------------------------------------------------- -// -// In Solaris 8 the status window does not unmap if the frame unmapps, so -// unmap it the hard way -// -// --------------------------------------------------------------------------- - -void -SalI18N_InputContext::Unmap( SalFrame* pFrame ) -{ - if ( maContext != NULL ) - { - I18NStatus& rStatus( I18NStatus::get() ); - if( rStatus.getParent() == pFrame ) - rStatus.show( false, I18NStatus::contextmap ); - - } - UnsetICFocus( pFrame ); - maClientData.pFrame = NULL; -} - -void -SalI18N_InputContext::Map( SalFrame *pFrame ) -{ - if( mbUseable ) - { - I18NStatus& rStatus(I18NStatus::get() ); - rStatus.setParent( pFrame ); - if( pFrame ) - { - rStatus.show( true, I18NStatus::contextmap ); - if ( maContext == NULL ) - { - SalI18N_InputMethod *pInputMethod; - pInputMethod = GetX11SalData()->GetDisplay()->GetInputMethod(); - - maContext = XCreateIC( pInputMethod->GetMethod(), - XNVaNestedList, mpAttributes, - NULL ); - if ( maContext != NULL && mbMultiLingual ) - XSetICValues( maContext, - XNCommitStringCallback, &maCommitStringCallback, - XNSwitchIMNotifyCallback, &maSwitchIMCallback, - NULL ); - } - if( maClientData.pFrame != pFrame ) - SetICFocus( pFrame ); - } - } -} - -// -------------------------------------------------------------------------- -// -// Handle DestroyCallbacks -// in fact this is a callback called from the XNDestroyCallback -// -// -------------------------------------------------------------------------- - -void -SalI18N_InputContext::HandleDestroyIM() -{ - maContext = 0; // noli me tangere - mbUseable = False; -} - -// --------------------------------------------------------------------------- -// -// make sure, the input method gets all the X-Events it needs, this is only -// called once on each frame, it relys on a valid maContext -// -// --------------------------------------------------------------------------- - -void -SalI18N_InputContext::ExtendEventMask( XLIB_Window aFocusWindow ) -{ - unsigned long nIMEventMask; - XWindowAttributes aWindowAttributes; - - if ( mbUseable ) - { - Display *pDisplay = XDisplayOfIM( XIMOfIC(maContext) ); - - XGetWindowAttributes( pDisplay, aFocusWindow, - &aWindowAttributes ); - XGetICValues ( maContext, - XNFilterEvents, &nIMEventMask, - NULL); - nIMEventMask |= aWindowAttributes.your_event_mask; - XSelectInput ( pDisplay, aFocusWindow, nIMEventMask ); - } -} - -// --------------------------------------------------------------------------- -// -// tune the styles provided by the input method with the supported one -// -// --------------------------------------------------------------------------- - -unsigned int -SalI18N_InputContext::GetWeightingOfIMStyle( XIMStyle nStyle ) const -{ - struct StyleWeightingT { - const XIMStyle nStyle; - const unsigned int nWeight; - }; - - StyleWeightingT const *pWeightPtr; - const StyleWeightingT pWeight[] = { - { XIMPreeditCallbacks, 0x10000000 }, - { XIMPreeditPosition, 0x02000000 }, - { XIMPreeditArea, 0x01000000 }, - { XIMPreeditNothing, 0x00100000 }, - { XIMPreeditNone, 0x00010000 }, - { XIMStatusCallbacks, 0x1000 }, - { XIMStatusArea, 0x0100 }, - { XIMStatusNothing, 0x0010 }, - { XIMStatusNone, 0x0001 }, - { 0, 0x0 } - }; - - int nWeight = 0; - for ( pWeightPtr = pWeight; pWeightPtr->nStyle != 0; pWeightPtr++ ) - { - if ( (pWeightPtr->nStyle & nStyle) != 0 ) - nWeight += pWeightPtr->nWeight; - } - return nWeight; -} - -Bool -SalI18N_InputContext::IsSupportedIMStyle( XIMStyle nStyle ) const -{ - if ( (nStyle & mnSupportedPreeditStyle) - && (nStyle & mnSupportedStatusStyle) ) - { - return True; - } - return False; -} - -Bool -SalI18N_InputContext::SupportInputMethodStyle( XIMStyles *pIMStyles ) -{ - int nBestScore = 0; - int nActualScore = 0; - - mnPreeditStyle = 0; - mnStatusStyle = 0; - - if ( pIMStyles != NULL ) - { - // check whether the XIM supports one of the desired styles - // only a single preedit and a single status style must occure - // in a inpuut method style. Hideki said so, so i trust him - for ( int nStyle = 0; nStyle < pIMStyles->count_styles; nStyle++ ) - { - XIMStyle nProvidedStyle = pIMStyles->supported_styles[ nStyle ]; - if ( IsSupportedIMStyle(nProvidedStyle) ) - { - nActualScore = GetWeightingOfIMStyle( nProvidedStyle ); - if ( nActualScore >= nBestScore ) - { - nBestScore = nActualScore; - mnPreeditStyle = nProvidedStyle & mnSupportedPreeditStyle; - mnStatusStyle = nProvidedStyle & mnSupportedStatusStyle; - } - } - } - } - -#if OSL_DEBUG_LEVEL > 1 - char pBuf[ 128 ]; - fprintf( stderr, "selected inputmethod style = %s\n", - GetMethodName(mnPreeditStyle | mnStatusStyle, pBuf, sizeof(pBuf)) ); -#endif - - return (mnPreeditStyle != 0) && (mnStatusStyle != 0) ; -} - -// --------------------------------------------------------------------------- -// -// handle extended and normal key input -// -// --------------------------------------------------------------------------- - -int -SalI18N_InputContext::CommitStringCallback (sal_Unicode* pText, sal_Size nLength) -{ - XIMUnicodeText call_data; - - call_data.string.utf16_char = pText; - call_data.length = nLength; - call_data.annotations = NULL; - call_data.count_annotations = 0; - call_data.feedback = NULL; - - return ::CommitStringCallback( maContext, - (XPointer)&maClientData, (XPointer)&call_data ); -} - -int -SalI18N_InputContext::CommitKeyEvent(sal_Unicode* pText, sal_Size nLength) -{ - if (nLength == 1 && IsControlCode(pText[0])) - return 0; - - if( maClientData.pFrame ) - { - SalExtTextInputEvent aTextEvent; - - aTextEvent.mnTime = 0; - aTextEvent.mpTextAttr = 0; - aTextEvent.mnCursorPos = nLength; - aTextEvent.maText = UniString(pText, nLength); - aTextEvent.mnCursorFlags = 0; - aTextEvent.mnDeltaStart = 0; - aTextEvent.mbOnlyCursor = False; - - maClientData.pFrame->CallCallback(SALEVENT_EXTTEXTINPUT, (void*)&aTextEvent); - maClientData.pFrame->CallCallback(SALEVENT_ENDEXTTEXTINPUT, (void*)NULL); - } -#if OSL_DEBUG_LEVEL > 1 - else - fprintf(stderr, "CommitKeyEvent without frame\n" ); -#endif - - return 0; -} - -int -SalI18N_InputContext::UpdateSpotLocation() -{ - if (maContext == 0 || maClientData.pFrame == NULL) - return -1; - - SalExtTextInputPosEvent aPosEvent; - maClientData.pFrame->CallCallback(SALEVENT_EXTTEXTINPUTPOS, (void*)&aPosEvent); - - XPoint aSpot; - aSpot.x = aPosEvent.mnX + aPosEvent.mnWidth; - aSpot.y = aPosEvent.mnY + aPosEvent.mnHeight; - - XVaNestedList preedit_attr = XVaCreateNestedList(0, XNSpotLocation, &aSpot, NULL); - XSetICValues(maContext, XNPreeditAttributes, preedit_attr, NULL); - XFree(preedit_attr); - - I18NStatus::get().show( true, I18NStatus::contextmap ); - - return 0; -} - -// --------------------------------------------------------------------------- -// -// set and unset the focus for the Input Context -// the context may be NULL despite it is useable if the framewindow is -// in unmapped state -// -// --------------------------------------------------------------------------- - -void -SalI18N_InputContext::SetICFocus( SalFrame* pFocusFrame ) -{ - I18NStatus::get().setParent( pFocusFrame ); - if ( mbUseable && (maContext != NULL) ) - { - maClientData.pFrame = pFocusFrame; - - const SystemEnvData* pEnv = pFocusFrame->GetSystemData(); - XLIB_Window aClientWindow = pEnv->aShellWindow; - XLIB_Window aFocusWindow = pEnv->aWindow; - - XSetICValues( maContext, - XNFocusWindow, aFocusWindow, - XNClientWindow, aClientWindow, - NULL ); - - if( maClientData.aInputEv.mpTextAttr ) - { - sendEmptyCommit(pFocusFrame); - // begin preedit again - GetX11SalData()->GetDisplay()->SendInternalEvent( pFocusFrame, &maClientData.aInputEv, SALEVENT_EXTTEXTINPUT ); - } - - XSetICFocus( maContext ); - } -} - -void -SalI18N_InputContext::UnsetICFocus( SalFrame* pFrame ) -{ - I18NStatus& rStatus( I18NStatus::get() ); - if( rStatus.getParent() == pFrame ) - rStatus.setParent( NULL ); - - if ( mbUseable && (maContext != NULL) ) - { - // cancel an eventual event posted to begin preedit again - GetX11SalData()->GetDisplay()->CancelInternalEvent( maClientData.pFrame, &maClientData.aInputEv, SALEVENT_EXTTEXTINPUT ); - maClientData.pFrame = NULL; - XUnsetICFocus( maContext ); - } -} - -// --------------------------------------------------------------------------- -// -// multi byte input method only -// -// --------------------------------------------------------------------------- - -void -SalI18N_InputContext::SetPreeditState(Bool aPreeditState) -{ - XIMPreeditState preedit_state = XIMPreeditUnKnown; - XVaNestedList preedit_attr; - - preedit_attr = XVaCreateNestedList( - 0, - XNPreeditState, &preedit_state, - NULL); - if (!XGetICValues(maContext, XNPreeditAttributes, preedit_attr, NULL)) - { - XFree(preedit_attr); - - preedit_state = aPreeditState? XIMPreeditEnable : XIMPreeditDisable; - preedit_attr = XVaCreateNestedList( - 0, - XNPreeditState, preedit_state, - NULL); - XSetICValues(maContext, XNPreeditAttributes, preedit_attr, NULL); - } - - XFree(preedit_attr); - - return; -} - -void -SalI18N_InputContext::SetLanguage(LanguageType) -{ - // not yet implemented - return; -} - -void -SalI18N_InputContext::EndExtTextInput( USHORT /*nFlags*/ ) -{ - if ( mbUseable && (maContext != NULL) && maClientData.pFrame ) - { - vcl::DeletionListener aDel( maClientData.pFrame ); - // delete preedit in sal (commit an empty string) - sendEmptyCommit( maClientData.pFrame ); - if( ! aDel.isDeleted() ) - { - // mark previous preedit state again (will e.g. be sent at focus gain) - maClientData.aInputEv.mpTextAttr = &maClientData.aInputFlags[0]; - if( static_cast(maClientData.pFrame)->hasFocus() ) - { - // begin preedit again - GetX11SalData()->GetDisplay()->SendInternalEvent( maClientData.pFrame, &maClientData.aInputEv, SALEVENT_EXTTEXTINPUT ); - } - } - } -} - - diff --git a/vcl/unx/source/app/i18n_im.cxx b/vcl/unx/source/app/i18n_im.cxx deleted file mode 100644 index c797da34e76c..000000000000 --- a/vcl/unx/source/app/i18n_im.cxx +++ /dev/null @@ -1,618 +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_vcl.hxx" - -#include -#include -#ifdef LINUX -# ifndef __USE_XOPEN -# define __USE_XOPEN -# endif -#endif -#include - -#include -#include -#include -#include -#include - -#include -#include -#include "i18n_im.hxx" -#include - -#include -#include - -using namespace vcl; -#include "i18n_cb.hxx" -#if defined(SOLARIS) || defined(LINUX) -extern "C" char * XSetIMValues(XIM im, ...); -#endif - -// ------------------------------------------------------------------------------------ -// -// kinput2 IME needs special key handling since key release events are filtered in -// preeditmode and XmbResetIC does not work -// -// ------------------------------------------------------------------------------------ - -Bool -IMServerKinput2 () -{ - const static char* p_xmodifiers = getenv ("XMODIFIERS"); - const static Bool b_kinput2 = (p_xmodifiers != NULL) - && (strcmp(p_xmodifiers, "@im=kinput2") == 0); - - return b_kinput2; -} - -class XKeyEventOp : XKeyEvent -{ - private: - void init(); - - public: - XKeyEventOp(); - ~XKeyEventOp(); - - XKeyEventOp& operator= (const XKeyEvent &rEvent); - void erase (); - Bool match (const XKeyEvent &rEvent) const; -}; - -void -XKeyEventOp::init() -{ - type = 0; /* serial = 0; */ - send_event = 0; display = 0; - window = 0; root = 0; - subwindow = 0; /* time = 0; */ - /* x = 0; y = 0; */ - /* x_root = 0; y_root = 0; */ - state = 0; keycode = 0; - same_screen = 0; -} - -XKeyEventOp::XKeyEventOp() -{ - init(); -} - -XKeyEventOp::~XKeyEventOp() -{ -} - -XKeyEventOp& -XKeyEventOp::operator= (const XKeyEvent &rEvent) -{ - type = rEvent.type; /* serial = rEvent.serial; */ - send_event = rEvent.send_event; display = rEvent.display; - window = rEvent.window; root = rEvent.root; - subwindow = rEvent.subwindow;/* time = rEvent.time; */ - /* x = rEvent.x, y = rEvent.y; */ - /* x_root = rEvent.x_root, y_root = rEvent.y_root; */ - state = rEvent.state; keycode = rEvent.keycode; - same_screen = rEvent.same_screen; - - return *this; -} - -void -XKeyEventOp::erase () -{ - init(); -} - -Bool -XKeyEventOp::match (const XKeyEvent &rEvent) const -{ - return ( (type == XLIB_KeyPress && rEvent.type == KeyRelease) - || (type == KeyRelease && rEvent.type == XLIB_KeyPress )) - /* && serial == rEvent.serial */ - && send_event == rEvent.send_event - && display == rEvent.display - && window == rEvent.window - && root == rEvent.root - && subwindow == rEvent.subwindow - /* && time == rEvent.time - && x == rEvent.x - && y == rEvent.y - && x_root == rEvent.x_root - && y_root == rEvent.y_root */ - && state == rEvent.state - && keycode == rEvent.keycode - && same_screen == rEvent.same_screen; -} - -// ------------------------------------------------------------------------- -// -// locale handling -// -// ------------------------------------------------------------------------- - -// Locale handling of the operating system layer - -static char* -SetSystemLocale( const char* p_inlocale ) -{ - char *p_outlocale; - - if ( (p_outlocale = setlocale(LC_ALL, p_inlocale)) == NULL ) - { - fprintf( stderr, "I18N: Operating system doesn't support locale \"%s\"\n", - p_inlocale ); - } - - return p_outlocale; -} - -#ifdef SOLARIS -static void -SetSystemEnvironment( const rtl::OUString& rLocale ) -{ - rtl::OUString LC_ALL_Var(RTL_CONSTASCII_USTRINGPARAM("LC_ALL")); - osl_setEnvironment(LC_ALL_Var.pData, rLocale.pData); - - rtl::OUString LANG_Var(RTL_CONSTASCII_USTRINGPARAM("LANG")); - osl_setEnvironment(LANG_Var.pData, rLocale.pData); -} -#endif - -static Bool -IsPosixLocale( const char* p_locale ) -{ - if ( p_locale == NULL ) - return False; - if ( (p_locale[ 0 ] == 'C') && (p_locale[ 1 ] == '\0') ) - return True; - if ( strncmp(p_locale, "POSIX", sizeof("POSIX")) == 0 ) - return True; - - return False; -} - -// Locale handling of the X Window System layer - -static Bool -IsXWindowCompatibleLocale( const char* p_locale ) -{ - if ( p_locale == NULL ) - return False; - - if ( !XSupportsLocale() ) - { - fprintf (stderr, "I18N: X Window System doesn't support locale \"%s\"\n", - p_locale ); - return False; - } - return True; -} - -// Set the operating system locale prior to trying to open an -// XIM InputMethod. -// Handle the cases where the current locale is either not supported by the -// operating system (LANG=gaga) or by the XWindow system (LANG=aa_ER@saaho) -// by providing a fallback. -// Upgrade "C" or "POSIX" to "en_US" locale to allow umlauts and accents -// see i8988, i9188, i8930, i16318 -// on Solaris the environment needs to be set equivalent to the locale (#i37047#) - -Bool -SalI18N_InputMethod::SetLocale( const char* pLocale ) -{ - // check whether we want an Input Method engine, if we don't we - // do not need to set the locale - if ( mbUseable ) - { - char *locale = SetSystemLocale( pLocale ); - if ( (!IsXWindowCompatibleLocale(locale)) || IsPosixLocale(locale) ) - { - osl_setThreadTextEncoding (RTL_TEXTENCODING_ISO_8859_1); - locale = SetSystemLocale( "en_US" ); - #ifdef SOLARIS - SetSystemEnvironment( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en_US")) ); - #endif - if (! IsXWindowCompatibleLocale(locale)) - { - locale = SetSystemLocale( "C" ); - #ifdef SOLARIS - SetSystemEnvironment( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("C")) ); - #endif - if (! IsXWindowCompatibleLocale(locale)) - mbUseable = False; - } - } - - // must not fail if mbUseable since XSupportsLocale() asserts success - if ( mbUseable && XSetLocaleModifiers("") == NULL ) - { - fprintf (stderr, "I18N: Can't set X modifiers for locale \"%s\"\n", - locale); - mbUseable = False; - } - } - - return mbUseable; -} - -Bool -SalI18N_InputMethod::PosixLocale() -{ - if (mbMultiLingual) - return False; - if (maMethod) - return IsPosixLocale (XLocaleOfIM (maMethod)); - return False; -} - -// ------------------------------------------------------------------------ -// -// Constructor / Destructor / Initialisation -// -// ------------------------------------------------------------------------ - -SalI18N_InputMethod::SalI18N_InputMethod( ) : mbUseable( bUseInputMethodDefault ), - mbMultiLingual( False ), - maMethod( (XIM)NULL ), - mpStyles( (XIMStyles*)NULL ) -{ - const char *pUseInputMethod = getenv( "SAL_USEINPUTMETHOD" ); - if ( pUseInputMethod != NULL ) - mbUseable = pUseInputMethod[0] != '\0' ; -} - -SalI18N_InputMethod::~SalI18N_InputMethod() -{ - ::vcl::I18NStatus::free(); - if ( mpStyles != NULL ) - XFree( mpStyles ); - if ( maMethod != NULL ) - XCloseIM ( maMethod ); -} - -// -// XXX -// debug routine: lets have a look at the provided method styles -// - -#if OSL_DEBUG_LEVEL > 1 - -extern "C" char* -GetMethodName( XIMStyle nStyle, char *pBuf, int nBufSize) -{ - struct StyleName { - const XIMStyle nStyle; - const char *pName; - const int nNameLen; - }; - - StyleName *pDescPtr; - static const StyleName pDescription[] = { - { XIMPreeditArea, "PreeditArea ", sizeof("PreeditArea ") }, - { XIMPreeditCallbacks, "PreeditCallbacks ",sizeof("PreeditCallbacks ")}, - { XIMPreeditPosition, "PreeditPosition ", sizeof("PreeditPosition ") }, - { XIMPreeditNothing, "PreeditNothing ", sizeof("PreeditNothing ") }, - { XIMPreeditNone, "PreeditNone ", sizeof("PreeditNone ") }, - { XIMStatusArea, "StatusArea ", sizeof("StatusArea ") }, - { XIMStatusCallbacks, "StatusCallbacks ", sizeof("StatusCallbacks ") }, - { XIMStatusNothing, "StatusNothing ", sizeof("StatusNothing ") }, - { XIMStatusNone, "StatusNone ", sizeof("StatusNone ") }, - { 0, "NULL", 0 } - }; - - if ( nBufSize > 0 ) - pBuf[0] = '\0'; - - char *pBufPtr = pBuf; - for ( pDescPtr = const_cast(pDescription); pDescPtr->nStyle != 0; pDescPtr++ ) - { - int nSize = pDescPtr->nNameLen - 1; - if ( (nStyle & pDescPtr->nStyle) && (nBufSize > nSize) ) - { - strncpy( pBufPtr, pDescPtr->pName, nSize + 1); - pBufPtr += nSize; - nBufSize -= nSize; - } - } - - return pBuf; -} - -extern "C" void -PrintInputStyle( XIMStyles *pStyle ) -{ - char pBuf[ 128 ]; - int nBuf = sizeof( pBuf ); - - if ( pStyle == NULL ) - fprintf( stderr, "no input method styles\n"); - else - for ( int nStyle = 0; nStyle < pStyle->count_styles; nStyle++ ) - { - fprintf( stderr, "style #%i = %s\n", nStyle, - GetMethodName(pStyle->supported_styles[nStyle], pBuf, nBuf) ); - } -} - -#endif - -// -// this is the real constructing routine, since locale setting has to be done -// prior to xopendisplay, the xopenim call has to be delayed -// - -Bool -SalI18N_InputMethod::CreateMethod ( Display *pDisplay ) -{ - if ( mbUseable ) - { - const bool bTryMultiLingual = - #ifdef LINUX - false; - #else - true; - #endif - if ( bTryMultiLingual && getenv("USE_XOPENIM") == NULL ) - { - mbMultiLingual = True; // set ml-input flag to create input-method - maMethod = XvaOpenIM(pDisplay, NULL, NULL, NULL, - XNMultiLingualInput, mbMultiLingual, /* dummy */ - (void *)0); - // get ml-input flag from input-method - if ( maMethod == (XIM)NULL ) - mbMultiLingual = False; - else - if ( XGetIMValues(maMethod, - XNMultiLingualInput, &mbMultiLingual, NULL ) != NULL ) - mbMultiLingual = False; - if( mbMultiLingual ) - { - XIMUnicodeCharacterSubsets* subsets; - if( XGetIMValues( maMethod, - XNQueryUnicodeCharacterSubset, &subsets, NULL ) == NULL ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "IM reports %d subsets: ", subsets->count_subsets ); -#endif - I18NStatus& rStatus( I18NStatus::get() ); - rStatus.clearChoices(); - for( int i = 0; i < subsets->count_subsets; i++ ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr,"\"%s\" ", subsets->supported_subsets[i].name ); -#endif - rStatus.addChoice( String( subsets->supported_subsets[i].name, RTL_TEXTENCODING_UTF8 ), &subsets->supported_subsets[i] ); - } -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "\n" ); -#endif - } -#if OSL_DEBUG_LEVEL > 1 - else - fprintf( stderr, "query subsets failed\n" ); -#endif - } - } - else - { - maMethod = XOpenIM(pDisplay, NULL, NULL, NULL); - mbMultiLingual = False; - } - - if ((maMethod == (XIM)NULL) && (getenv("XMODIFIERS") != NULL)) - { - rtl::OUString envVar(RTL_CONSTASCII_USTRINGPARAM("XMODIFIERS")); - osl_clearEnvironment(envVar.pData); - XSetLocaleModifiers(""); - maMethod = XOpenIM(pDisplay, NULL, NULL, NULL); - mbMultiLingual = False; - } - - if ( maMethod != (XIM)NULL ) - { - if ( XGetIMValues(maMethod, XNQueryInputStyle, &mpStyles, NULL) - != NULL) - mbUseable = False; - #if OSL_DEBUG_LEVEL > 1 - fprintf(stderr, "Creating %s-Lingual InputMethod\n", - mbMultiLingual ? "Multi" : "Mono" ); - PrintInputStyle( mpStyles ); - #endif - } - else - { - mbUseable = False; - } - } - - #if OSL_DEBUG_LEVEL > 1 - if ( !mbUseable ) - fprintf(stderr, "input method creation failed\n"); - #endif - - maDestroyCallback.callback = (XIMProc)IM_IMDestroyCallback; - maDestroyCallback.client_data = (XPointer)this; - if (mbUseable && maMethod != NULL) - XSetIMValues(maMethod, XNDestroyCallback, &maDestroyCallback, NULL); - - return mbUseable; -} - -// -// give IM the opportunity to look at the event, and possibly hide it -// - -Bool -SalI18N_InputMethod::FilterEvent( XEvent *pEvent, XLIB_Window window ) -{ - if (!mbUseable) - return False; - - Bool bFilterEvent = XFilterEvent (pEvent, window); - - if (pEvent->type != XLIB_KeyPress && pEvent->type != KeyRelease) - return bFilterEvent; - - /* - * fix broken key release handling of some IMs - */ - XKeyEvent* pKeyEvent = &(pEvent->xkey); - static XKeyEventOp maLastKeyPress; - - if (bFilterEvent) - { - if (pKeyEvent->type == KeyRelease) - bFilterEvent = !maLastKeyPress.match (*pKeyEvent); - maLastKeyPress.erase(); - } - else /* (!bFilterEvent) */ - { - if (pKeyEvent->type == XLIB_KeyPress) - maLastKeyPress = *pKeyEvent; - else - maLastKeyPress.erase(); - } - - return bFilterEvent; -} - -void -SalI18N_InputMethod::HandleDestroyIM() -{ - mbUseable = False; - mbMultiLingual = False; - maMethod = NULL; -} - -// ------------------------------------------------------------------------ -// -// add a connection watch into the SalXLib yieldTable to allow iiimp -// connection processing: soffice waits in select() not in XNextEvent(), so -// there may be requests pending on the iiimp internal connection that will -// not be processed until XNextEvent is called the next time. If we do not -// have the focus because the atok12 lookup choice aux window has it we stay -// deaf and dump otherwise. -// -// ------------------------------------------------------------------------ - -int -InputMethod_HasPendingEvent(int nFileDescriptor, void *pData) -{ - if (pData == NULL) - return 0; - - struct pollfd aFileDescriptor; - #ifdef SOLARIS - nfds_t nNumDescriptor = 1; - #else - unsigned int nNumDescriptor = 1; - #endif - aFileDescriptor.fd = nFileDescriptor; - aFileDescriptor.events = POLLRDNORM; - aFileDescriptor.revents = 0; - - int nPoll = poll (&aFileDescriptor, nNumDescriptor, 0 /* timeout */ ); - - if (nPoll > 0) - { - /* at least some conditions in revent are set */ - if ( (aFileDescriptor.revents & POLLHUP) - || (aFileDescriptor.revents & POLLERR) - || (aFileDescriptor.revents & POLLNVAL)) - return 0; /* oops error condition set */ - - if (aFileDescriptor.revents & POLLRDNORM) - return 1; /* success */ - } - - /* nPoll == 0 means timeout, nPoll < 0 means error */ - return 0; -} - -int -InputMethod_IsEventQueued(int nFileDescriptor, void *pData) -{ - return InputMethod_HasPendingEvent (nFileDescriptor, pData); -} - -int -InputMethod_HandleNextEvent(int nFileDescriptor, void *pData) -{ - if (pData != NULL) - XProcessInternalConnection((Display*)pData, nFileDescriptor); - - return 0; -} - -extern "C" void -InputMethod_ConnectionWatchProc (Display *pDisplay, XPointer pClientData, - int nFileDescriptor, Bool bOpening, XPointer*) -{ - SalXLib *pConnectionHandler = (SalXLib*)pClientData; - - if (pConnectionHandler == NULL) - return; - - if (bOpening) - { - pConnectionHandler->Insert (nFileDescriptor, pDisplay, - InputMethod_HasPendingEvent, - InputMethod_IsEventQueued, - InputMethod_HandleNextEvent); - } - else - { - pConnectionHandler->Remove (nFileDescriptor); - } -} - -Bool -SalI18N_InputMethod::AddConnectionWatch(Display *pDisplay, void *pConnectionHandler) -{ - // sanity check - if (pDisplay == NULL || pConnectionHandler == NULL) - return False; - - // if we are not ml all the extended text input comes on the stock X queue, - // so there is no need to monitor additional file descriptors. -#ifndef SOLARIS - if (!mbMultiLingual || !mbUseable) - return False; -#endif - - // pConnectionHandler must be really a pointer to a SalXLib - Status nStatus = XAddConnectionWatch (pDisplay, InputMethod_ConnectionWatchProc, - (XPointer)pConnectionHandler); - return (Bool)nStatus; -} - - - diff --git a/vcl/unx/source/app/i18n_keysym.cxx b/vcl/unx/source/app/i18n_keysym.cxx deleted file mode 100644 index 812e54aae937..000000000000 --- a/vcl/unx/source/app/i18n_keysym.cxx +++ /dev/null @@ -1,365 +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_vcl.hxx" - -#include -#include - -#include - -// convert keysyms to unicode -// for all keysyms with byte1 and byte2 equal zero, and of course only for -// keysyms that have a unicode counterpart - -typedef const sal_Unicode unicode_t; -typedef struct { - const int first; const int last; - unicode_t *map; -} keymap_t; - -// Latin-1 Byte 3 = 0x00 -unicode_t keymap00_map[] = { - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, - 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, - 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, - 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, - 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, - 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, - 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, - 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, - 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, - 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, - 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, - 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff }; -const keymap_t keymap00 = { 32, 255, keymap00_map }; - -// Latin-2 Byte 3 = 0x01 -unicode_t keymap01_map[] = { - 0x0104, 0x02d8, 0x0141, 0x0000, 0x013d, 0x015a, 0x0000, 0x0000, - 0x0160, 0x015e, 0x0164, 0x0179, 0x0000, 0x017d, 0x017b, 0x0000, - 0x0105, 0x02db, 0x0142, 0x0000, 0x013e, 0x015b, 0x02c7, 0x0000, - 0x0161, 0x015f, 0x0165, 0x017a, 0x02dd, 0x017e, 0x017c, 0x0154, - 0x0000, 0x0000, 0x0102, 0x0000, 0x0139, 0x0106, 0x0000, 0x010c, - 0x0000, 0x0118, 0x0000, 0x011a, 0x0000, 0x0000, 0x010e, 0x0110, - 0x0143, 0x0147, 0x0000, 0x0000, 0x0150, 0x0000, 0x0000, 0x0158, - 0x016e, 0x0000, 0x0170, 0x0000, 0x0000, 0x0162, 0x0000, 0x0155, - 0x0000, 0x0000, 0x0103, 0x0000, 0x013a, 0x0107, 0x0000, 0x010d, - 0x0000, 0x0119, 0x0000, 0x011b, 0x0000, 0x0000, 0x010f, 0x0111, - 0x0144, 0x0148, 0x0000, 0x0000, 0x0151, 0x0000, 0x0000, 0x0159, - 0x016f, 0x0000, 0x0171, 0x0000, 0x0000, 0x0163, 0x02d9 }; -const keymap_t keymap01 = { 161, 255, keymap01_map }; - -// Latin-3 Byte 3 = 0x02 -unicode_t keymap02_map[] = { - 0x0126, 0x0000, 0x0000, 0x0000, 0x0000, 0x0124, 0x0000, 0x0000, - 0x0130, 0x0000, 0x011e, 0x0134, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0127, 0x0000, 0x0000, 0x0000, 0x0000, 0x0125, 0x0000, 0x0000, - 0x0131, 0x0000, 0x011f, 0x0135, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x010a, 0x0108, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0120, 0x0000, 0x0000, 0x011c, - 0x0000, 0x0000, 0x0000, 0x0000, 0x016c, 0x015c, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x010b, 0x0109, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0121, 0x0000, 0x0000, 0x011d, - 0x0000, 0x0000, 0x0000, 0x0000, 0x016d, 0x015d }; -const keymap_t keymap02 = { 161, 254, keymap02_map }; - -// Latin-4 Byte 3 = 0x03 -unicode_t keymap03_map[] = { - 0x0138, 0x0156, 0x0000, 0x0128, 0x013b, 0x0000, 0x0000, 0x0000, - 0x0112, 0x0122, 0x0166, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0157, 0x0000, 0x0129, 0x013c, 0x0000, 0x0000, 0x0000, - 0x0113, 0x0123, 0x0167, 0x014a, 0x0000, 0x014b, 0x0100, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x012e, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0116, 0x0000, 0x0000, 0x012a, 0x0000, 0x0145, - 0x014c, 0x0136, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0172, - 0x0000, 0x0000, 0x0000, 0x0168, 0x016a, 0x0000, 0x0101, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x012f, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0117, 0x0000, 0x0000, 0x012b, 0x0000, 0x0146, - 0x014d, 0x0137, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0173, - 0x0000, 0x0000, 0x0000, 0x0169, 0x016b }; -const keymap_t keymap03 = { 162, 254, keymap03_map }; - -// Kana Byte 3 = 0x04 -unicode_t keymap04_map[] = { - 0x203e, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x3002, 0x300c, 0x300d, 0x3001, 0x30fb, - 0x30f2, 0x30a1, 0x30a3, 0x30a5, 0x30a7, 0x30a9, 0x30e3, 0x30e5, - 0x30e7, 0x30c3, 0x30fc, 0x30a2, 0x30a4, 0x30a6, 0x30a8, 0x30aa, - 0x30ab, 0x30ad, 0x30af, 0x30b1, 0x30b3, 0x30b5, 0x30b7, 0x30b9, - 0x30bb, 0x30bd, 0x30bf, 0x30c1, 0x30c4, 0x30c6, 0x30c8, 0x30ca, - 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, 0x30d2, 0x30d5, 0x30d8, - 0x30db, 0x30de, 0x30df, 0x30e0, 0x30e1, 0x30e2, 0x30e4, 0x30e6, - 0x30e8, 0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ef, 0x30f3, - 0x309b, 0x309c }; -const keymap_t keymap04 = { 126, 223, keymap04_map }; - -// Arabic Byte 3 = 0x05 -unicode_t keymap05_map[] = { - 0x060c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x061b, - 0x0000, 0x0000, 0x0000, 0x061f, 0x0000, 0x0621, 0x0622, 0x0623, - 0x0624, 0x0625, 0x0626, 0x0627, 0x0628, 0x0629, 0x062a, 0x062b, - 0x062c, 0x062d, 0x062e, 0x062f, 0x0630, 0x0631, 0x0632, 0x0633, - 0x0634, 0x0635, 0x0636, 0x0637, 0x0638, 0x0639, 0x063a, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0640, 0x0641, 0x0642, 0x0643, - 0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649, 0x064a, 0x064b, - 0x064c, 0x064d, 0x064e, 0x064f, 0x0650, 0x0651, 0x0652 }; -const keymap_t keymap05 = { 172, 242, keymap05_map }; - -// Cyrillic Byte 3 = 0x06 -unicode_t keymap06_map[] = { - 0x0452, 0x0453, 0x0451, 0x0454, 0x0455, 0x0456, 0x0457, 0x0458, - 0x0459, 0x045a, 0x045b, 0x045c, 0x0000, 0x045e, 0x045f, 0x2116, - 0x0402, 0x0403, 0x0401, 0x0404, 0x0405, 0x0406, 0x0407, 0x0408, - 0x0409, 0x040a, 0x040b, 0x040c, 0x0000, 0x040e, 0x040f, 0x044e, - 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, 0x0445, - 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, - 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, 0x044c, - 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a, 0x042e, - 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, 0x0425, - 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, - 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, 0x042c, - 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a }; -const keymap_t keymap06 = { 161, 255, keymap06_map }; - -// Greek Byte 3 = 0x07 -unicode_t keymap07_map[] = { - 0x0386, 0x0388, 0x0389, 0x038a, 0x03aa, 0x0000, 0x038c, 0x038e, - 0x03ab, 0x0000, 0x038f, 0x0000, 0x0000, 0x0385, 0x2015, 0x0000, - 0x03ac, 0x03ad, 0x03ae, 0x03af, 0x03ca, 0x0390, 0x03cc, 0x03cd, - 0x03cb, 0x03b0, 0x03ce, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, - 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0, - 0x03a1, 0x03a3, 0x0000, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, - 0x03a9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8, - 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0, - 0x03c1, 0x03c3, 0x03c2, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, - 0x03c9 }; -const keymap_t keymap07 = { 161, 249, keymap07_map }; - -// Technical Byte 3 = 0x08 -unicode_t keymap08_map[] = { - 0x23b7, 0x250c, 0x2500, 0x2320, 0x2321, 0x2502, 0x23a1, 0x23a3, - 0x23a4, 0x23a6, 0x239b, 0x239d, 0x239e, 0x23a0, 0x23a8, 0x23ac, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x2264, 0x2260, 0x2265, 0x222b, 0x2234, - 0x221d, 0x221e, 0x0000, 0x0000, 0x2207, 0x0000, 0x0000, 0x223c, - 0x2243, 0x0000, 0x0000, 0x0000, 0x21d4, 0x21d2, 0x2261, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x221a, 0x0000, 0x0000, - 0x0000, 0x2282, 0x2283, 0x2229, 0x222a, 0x2227, 0x2228, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2202, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0192, 0x0000, 0x0000, - 0x0000, 0x0000, 0x2190, 0x2191, 0x2192, 0x2193 }; -const keymap_t keymap08 = { 161, 254, keymap08_map }; - -// Special Byte 3 = 0x09 -unicode_t keymap09_map[] = { - 0x25c6, 0x2592, 0x2409, 0x240c, 0x240d, 0x240a, 0x0000, 0x0000, - 0x2424, 0x240b, 0x2518, 0x2510, 0x250c, 0x2514, 0x253c, 0x23ba, - 0x23bb, 0x2500, 0x23bc, 0x23bd, 0x251c, 0x2524, 0x2534, 0x252c, - 0x2502 }; -const keymap_t keymap09 = { 224, 248, keymap09_map }; - -// Publishing Byte 3 = 0x0a = 10 -unicode_t keymap10_map[] = { - 0x2003, 0x2002, 0x2004, 0x2005, 0x2007, 0x2008, 0x2009, 0x200a, - 0x2014, 0x2013, 0x0000, 0x0000, 0x0000, 0x2026, 0x2025, 0x2153, - 0x2154, 0x2155, 0x2156, 0x2157, 0x2158, 0x2159, 0x215a, 0x2105, - 0x0000, 0x0000, 0x2012, 0x2329, 0x0000, 0x232a, 0x0000, 0x0000, - 0x0000, 0x0000, 0x215b, 0x215c, 0x215d, 0x215e, 0x0000, 0x0000, - 0x2122, 0x2613, 0x0000, 0x25c1, 0x25b7, 0x25cb, 0x25af, 0x2018, - 0x2019, 0x201c, 0x201d, 0x211e, 0x0000, 0x2032, 0x2033, 0x0000, - 0x271d, 0x0000, 0x25ac, 0x25c0, 0x25b6, 0x25cf, 0x25ae, 0x25e6, - 0x25ab, 0x25ad, 0x25b3, 0x25bd, 0x2606, 0x2022, 0x25aa, 0x25b2, - 0x25bc, 0x261c, 0x261e, 0x2663, 0x2666, 0x2665, 0x0000, 0x2720, - 0x2020, 0x2021, 0x2713, 0x2717, 0x266f, 0x266d, 0x2642, 0x2640, - 0x260e, 0x2315, 0x2117, 0x2038, 0x201a, 0x201e }; -const keymap_t keymap10 = { 161, 254, keymap10_map }; - -// APL Byte 3 = 0x0b = 11 -unicode_t keymap11_map[] = { - 0x003c, 0x0000, 0x0000, 0x003e, 0x0000, 0x2228, 0x2227, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00af, 0x0000, 0x22a5, - 0x2229, 0x230a, 0x0000, 0x005f, 0x0000, 0x0000, 0x0000, 0x2218, - 0x0000, 0x2395, 0x0000, 0x22a4, 0x25cb, 0x0000, 0x0000, 0x0000, - 0x2308, 0x0000, 0x0000, 0x222a, 0x0000, 0x2283, 0x0000, 0x2282, - 0x0000, 0x22a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x22a3 }; -const keymap_t keymap11 = { 163, 252, keymap11_map }; - -// Hebrew Byte 3 = 0x0c = 12 -unicode_t keymap12_map[] = { - 0x2017, 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, - 0x05d7, 0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, - 0x05df, 0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, - 0x05e7, 0x05e8, 0x05e9, 0x05ea }; -const keymap_t keymap12 = { 223, 250, keymap12_map }; - -// Thai Byte 3 = 0x0d = 13 -unicode_t keymap13_map[] = { - 0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07, 0x0e08, - 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f, 0x0e10, - 0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17, 0x0e18, - 0x0e19, 0x0e1a, 0x0e1b, 0x0e1c, 0x0e1d, 0x0e1e, 0x0e1f, 0x0e20, - 0x0e21, 0x0e22, 0x0e23, 0x0e24, 0x0e25, 0x0e26, 0x0e27, 0x0e28, - 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f, 0x0e30, - 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e35, 0x0e36, 0x0e37, 0x0e38, - 0x0e39, 0x0e3a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0e3f, 0x0e40, - 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47, 0x0e48, - 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0000, 0x0000, 0x0e50, - 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57, 0x0e58, - 0x0e59 }; -const keymap_t keymap13 = { 161, 249, keymap13_map }; - -// Korean Byte 3 = 0x0e = 14 -unicode_t keymap14_map[] = { - 0x3131, 0x3132, 0x3133, 0x3134, 0x3135, 0x3136, 0x3137, 0x3138, - 0x3139, 0x313a, 0x313b, 0x313c, 0x313d, 0x313e, 0x313f, 0x3140, - 0x3141, 0x3142, 0x3143, 0x3144, 0x3145, 0x3146, 0x3147, 0x3148, - 0x3149, 0x314a, 0x314b, 0x314c, 0x314d, 0x314e, 0x314f, 0x3150, - 0x3151, 0x3152, 0x3153, 0x3154, 0x3155, 0x3156, 0x3157, 0x3158, - 0x3159, 0x315a, 0x315b, 0x315c, 0x315d, 0x315e, 0x315f, 0x3160, - 0x3161, 0x3162, 0x3163, 0x11a8, 0x11a9, 0x11aa, 0x11ab, 0x11ac, - 0x11ad, 0x11ae, 0x11af, 0x11b0, 0x11b1, 0x11b2, 0x11b3, 0x11b4, - 0x11b5, 0x11b6, 0x11b7, 0x11b8, 0x11b9, 0x11ba, 0x11bb, 0x11bc, - 0x11bd, 0x11be, 0x11bf, 0x11c0, 0x11c1, 0x11c2, 0x316d, 0x3171, - 0x3178, 0x317f, 0x3181, 0x3184, 0x3186, 0x318d, 0x318e, 0x11eb, - 0x11f0, 0x11f9, 0x0000, 0x0000, 0x0000, 0x0000, 0x20a9 }; -const keymap_t keymap14 = { 161, 255, keymap14_map }; - -// missing: -// Latin-8 Byte 3 = 0x12 = 18 - -// Latin-9 Byte 3 = 0x13 = 19 -unicode_t keymap19_map[] = { - 0x0152, 0x0153, 0x0178 }; -const keymap_t keymap19 = { 188, 190, keymap19_map }; - -// missing: -// Armenian Byte 3 = 0x14 = 20 -// Georgian Byte 3 = 0x15 = 21 -// Azeri Byte 3 = 0x16 = 22 -// Vietnamese Byte 3 = 0x1e = 30 - -// Currency Byte 3 = 0x20 = 32 -unicode_t keymap32_map[] = { - 0x20a0, 0x20a1, 0x20a2, 0x20a3, 0x20a4, 0x20a5, 0x20a6, 0x20a7, - 0x20a8, 0x0000, 0x20aa, 0x20ab, 0x20ac }; -const keymap_t keymap32 = { 160, 172, keymap32_map }; - -// Keyboard (Keypad mappings) Byte 3 = 0xff = 255 -unicode_t keymap255_map[] = { - 0x0020, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x0000, 0x0000, 0x0000, 0x003d }; -const keymap_t keymap255 = { 128, 189, keymap255_map }; - -#define INITIAL_KEYMAPS 33 -const keymap_t* p_keymap[INITIAL_KEYMAPS] = { - &keymap00, &keymap01, &keymap02, &keymap03, /* 00 -- 03 */ - &keymap04, &keymap05, &keymap06, &keymap07, /* 04 -- 07 */ - &keymap08, &keymap09, &keymap10, &keymap11, /* 08 -- 11 */ - &keymap12, &keymap13, &keymap14, (keymap_t*)NULL, /* 12 -- 15 */ - (keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, &keymap19, /* 16 -- 19 */ - (keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, /* 20 -- 23 */ - (keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, /* 24 -- 27 */ - (keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, /* 28 -- 31 */ - &keymap32 /* 32 */ -}; - -sal_Unicode -KeysymToUnicode (KeySym nKeySym) -{ - // keysym is already unicode - if ((nKeySym & 0xff000000) == 0x01000000) - { - // strip off group indicator and iso10646 plane - // FIXME can't handle chars from surrogate area. - if (! (nKeySym & 0x00ff0000) ) - return (sal_Unicode)(nKeySym & 0x0000ffff); - } - // legacy keysyms, switch to appropriate codeset - else - { - unsigned char n_byte1 = (nKeySym & 0xff000000) >> 24; - unsigned char n_byte2 = (nKeySym & 0x00ff0000) >> 16; - unsigned char n_byte3 = (nKeySym & 0x0000ff00) >> 8; - unsigned char n_byte4 = (nKeySym & 0x000000ff); - - if (n_byte1 != 0) - return 0; - if (n_byte2 != 0) - return 0; - - keymap_t const* p_map = NULL; - if (n_byte3 < INITIAL_KEYMAPS) - p_map = p_keymap[n_byte3]; - else - if (n_byte3 == 255) - p_map = &keymap255; - - if ((p_map != NULL) && (n_byte4 >= p_map->first) && (n_byte4 <= p_map->last) ) - return p_map->map[n_byte4 - p_map->first]; - } - - return 0; -} diff --git a/vcl/unx/source/app/i18n_status.cxx b/vcl/unx/source/app/i18n_status.cxx deleted file mode 100644 index 3a6ae26a2b0e..000000000000 --- a/vcl/unx/source/app/i18n_status.cxx +++ /dev/null @@ -1,733 +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_vcl.hxx" - -#if OSL_DEBUG_LEVEL > 1 -#include -#endif -#include - -#include -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace vcl; -using namespace rtl; - -namespace vcl { - -class StatusWindow : public WorkWindow -{ -protected: - StatusWindow( WinBits nWinBits ); -public: - virtual ~StatusWindow(); - - virtual void setPosition( SalFrame* ); - virtual void setText( const String & ) = 0; - virtual String getText() const = 0; - virtual void show( bool bShow, I18NStatus::ShowReason eReason ) = 0; - virtual void toggle( bool bOn ) = 0; -}; - -} - -StatusWindow::StatusWindow( WinBits nWinBits ) : - WorkWindow( NULL, nWinBits ) -{ -} - -StatusWindow::~StatusWindow() {} - -void StatusWindow::setPosition( SalFrame* ) -{ -} - -// -------------------------------------------------------------------------- - -namespace vcl { - -class XIMStatusWindow : public StatusWindow -{ - FixedText m_aStatusText; - SalFrame* m_pLastParent; - Size m_aWindowSize; - bool m_bAnchoredAtRight; - // true if the right edge (instead of the left edge) should stay at a - // fixed position when re-sizing the window - - // for delayed showing - bool m_bDelayedShow; - I18NStatus::ShowReason m_eDelayedReason; - ULONG m_nDelayedEvent; - // for toggling - bool m_bOn; - - Point updatePosition(); - void layout(); - bool checkLastParent() const; - - DECL_LINK( DelayedShowHdl, void* ); -public: - XIMStatusWindow( bool bOn ); - virtual ~XIMStatusWindow(); - - virtual void setPosition( SalFrame* ); - virtual void setText( const String & ); - virtual String getText() const; - virtual void show( bool bShow, I18NStatus::ShowReason eReason ); - virtual void toggle( bool bOn ); - - // overload WorkWindow::DataChanged - virtual void DataChanged( const DataChangedEvent& rEvt ); -}; - -} - -XIMStatusWindow::XIMStatusWindow( bool bOn ) : - StatusWindow( WB_BORDER | WB_SYSTEMFLOATWIN | WB_TOOLTIPWIN ), - m_aStatusText( this, 0 ), - m_pLastParent( NULL ), - m_bAnchoredAtRight( false ), - m_bDelayedShow( false ), - m_eDelayedReason( I18NStatus::contextmap ), - m_nDelayedEvent( 0 ), - m_bOn( bOn ) -{ - layout(); -} - -XIMStatusWindow::~XIMStatusWindow() -{ - if( m_nDelayedEvent ) - Application::RemoveUserEvent( m_nDelayedEvent ); -} - -void XIMStatusWindow::toggle( bool bOn ) -{ - m_bOn = bOn; - show( bOn, I18NStatus::contextmap ); -} - -void XIMStatusWindow::layout() -{ - m_aWindowSize.Width() = m_aStatusText.GetTextWidth( m_aStatusText.GetText() )+8; - Font aFont( m_aStatusText.GetFont() ); - m_aWindowSize.Height() = aFont.GetHeight()+10; - m_aWindowSize = LogicToPixel( m_aWindowSize ); - - Size aControlSize( m_aWindowSize ); - aControlSize.Width() -= 4; - aControlSize.Height() -= 4; - - m_aStatusText.SetPosSizePixel( Point( 1, 1 ), aControlSize ); - m_aStatusText.SetFont( aFont ); - m_aStatusText.Show( TRUE ); - - if (m_bAnchoredAtRight && IsVisible()) - { - SalFrame* pFrame = (SalFrame*)GetSystemData()->pSalFrame; - long nDelta = pFrame->maGeometry.nWidth - m_aWindowSize.Width(); - pFrame->SetPosSize( pFrame->maGeometry.nX + nDelta, - pFrame->maGeometry.nY, - m_aWindowSize.Width(), - m_aWindowSize.Height(), - SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y | SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT ); - } - else - SetOutputSizePixel( m_aWindowSize ); -} - -bool XIMStatusWindow::checkLastParent() const -{ - if( m_pLastParent ) - { - const std::list< SalFrame* >& rFrames = GetX11SalData()->GetDisplay()->getFrames(); - for( std::list< SalFrame* >::const_iterator it = rFrames.begin(); it != rFrames.end(); ++it ) - { - if( *it == m_pLastParent ) - return true; - } - } - return false; -} - -void XIMStatusWindow::DataChanged( const DataChangedEvent& ) -{ - m_aStatusText.SetSettings( GetSettings() ); - layout(); -} - -Point XIMStatusWindow::updatePosition() -{ - Point aRet; - if( checkLastParent() ) - { - const SystemEnvData* pParentEnvData = m_pLastParent->GetSystemData(); - - SalExtTextInputPosEvent aPosEvent; - m_pLastParent->CallCallback( SALEVENT_EXTTEXTINPUTPOS, (void*)&aPosEvent ); - int x, y; - XLIB_Window aChild; - XTranslateCoordinates( (Display*)pParentEnvData->pDisplay, - (XLIB_Window)pParentEnvData->aShellWindow, - GetX11SalData()->GetDisplay()->GetRootWindow( GetX11SalData()->GetDisplay()->GetDefaultScreenNumber() ), - 0, 0, - &x, &y, - &aChild ); - - // TODO: Currently, place the status window to the (physical) left of - // the cursor iff in vertical mode (assuming that the columns in - // vertical mode are always written from right to left, this causes the - // status window to keep out of the text already written). This - // heuristic would break if there is ever a vertical mode in which the - // columns are written from left to right. Also, more elaborate - // positioning for (both horizontal and vertical) left-to-right and - // right-to-left text would be possible. - bool bLeft = aPosEvent.mbVertical; - // true if status window is to the left of the cursor - - int const nGap = 4; // between cursor and status window - if (aPosEvent.mbVertical) - { - aRet.X() = x + aPosEvent.mnX + (bLeft - ? -m_aWindowSize.Width() - nGap - : aPosEvent.mnHeight + nGap); - aRet.Y() = y + aPosEvent.mnY; - } - else - { - aRet.X() = x + aPosEvent.mnX + (bLeft ? -m_aWindowSize.Width() : 0); - aRet.Y() = y + aPosEvent.mnY+aPosEvent.mnHeight + nGap; - } - - m_bAnchoredAtRight = bLeft; - } - return aRet; -} - -void XIMStatusWindow::setPosition( SalFrame* pParent ) -{ - if( pParent ) - { - if( pParent != m_pLastParent ) - { - setText( String() ); - m_pLastParent = pParent; - Show( FALSE, SHOW_NOACTIVATE ); - } - if( IsVisible() ) - { - const SystemEnvData* pEnvData = GetSystemData(); - SalFrame* pStatusFrame = (SalFrame*)pEnvData->pSalFrame; - Point aPoint = updatePosition(); - pStatusFrame->SetPosSize( aPoint.X(), aPoint.Y(), m_aWindowSize.Width(), m_aWindowSize.Height(), SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y | SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT ); - } - } -} - -IMPL_LINK( XIMStatusWindow, DelayedShowHdl, void*, EMPTYARG ) -{ - m_nDelayedEvent = 0; - const SystemEnvData* pData = GetSystemData(); - SalFrame* pStatusFrame = (SalFrame*)pData->pSalFrame; - if( m_bDelayedShow ) - { - Size aControlSize( m_aWindowSize.Width()-4, m_aWindowSize.Height()-4 ); - m_aStatusText.SetPosSizePixel( Point( 1, 1 ), aControlSize ); - Point aPoint = updatePosition(); - pStatusFrame->SetPosSize( aPoint.X(), aPoint.Y(), m_aWindowSize.Width(), m_aWindowSize.Height(), SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y | SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT ); - } - Show( m_bDelayedShow && m_bOn, SHOW_NOACTIVATE ); - if( m_bDelayedShow ) - { - XRaiseWindow( (Display*)pData->pDisplay, - (XLIB_Window)pData->aShellWindow ); - } - return 0; -} - -void XIMStatusWindow::show( bool bShow, I18NStatus::ShowReason eReason ) -{ - if( bShow && ! m_aStatusText.GetText().Len() ) - bShow = false; - - m_bDelayedShow = bShow; - m_eDelayedReason = eReason; - if( ! m_nDelayedEvent ) - m_nDelayedEvent = Application::PostUserEvent( LINK( this, XIMStatusWindow, DelayedShowHdl ) ); -} - -void XIMStatusWindow::setText( const String& rText ) -{ - m_aStatusText.SetText( rText ); - m_aWindowSize.Width() = m_aStatusText.GetTextWidth( rText )+8; -} - -String XIMStatusWindow::getText() const -{ - return m_aStatusText.GetText(); -} - -// -------------------------------------------------------------------------- - -namespace vcl { - -class IIIMPStatusWindow : public StatusWindow -{ - MenuButton m_aStatusBtn; - PopupMenu m_aMenu; - SalFrame* m_pResetFocus; - bool m_bShow; - bool m_bOn; - - DECL_LINK( SelectHdl, MenuButton* ); - - void show(); - -public: - IIIMPStatusWindow( SalFrame* pParent, bool bOn ); // for initial position - virtual ~IIIMPStatusWindow(); - - virtual void setText( const String & ); - virtual String getText() const; - virtual void show( bool bShow, I18NStatus::ShowReason eReason ); - virtual void toggle( bool bOn ); - void layout(); - - // overload Window focus handler - virtual void GetFocus(); - // overload WorkWindow::DataChanged - virtual void DataChanged( const DataChangedEvent& rEvt ); -}; - -} - -IIIMPStatusWindow::IIIMPStatusWindow( SalFrame* pParent, bool bOn ) : - StatusWindow( WB_MOVEABLE ), - m_aStatusBtn( this, WB_BORDER ), - m_pResetFocus( pParent ), - m_bShow( true ), - m_bOn( bOn ) -{ - SetText( String( RTL_CONSTASCII_USTRINGPARAM( "IME Status" ) ) ); - - layout(); - - m_aStatusBtn.SetSelectHdl( LINK( this, IIIMPStatusWindow, SelectHdl ) ); - m_aStatusBtn.SetPopupMenu( &m_aMenu ); - m_aStatusBtn.Show( TRUE ); - - const ::std::vector< I18NStatus::ChoiceData >& rChoices( I18NStatus::get().getChoices() ); - int i = 1; - for( ::std::vector< I18NStatus::ChoiceData >::const_iterator it = rChoices.begin(); it != rChoices.end(); ++it, i++ ) - m_aMenu.InsertItem( i, it->aString ); - - if( pParent ) - { - const SystemEnvData* pEnvData = GetSystemData(); - - const SalFrameGeometry& rGeom( pParent->GetUnmirroredGeometry() ); - int nDistance = rGeom.nTopDecoration; - if( nDistance < 20 ) - nDistance = 20; - XMoveWindow( (Display*)pEnvData->pDisplay, - (XLIB_Window)pEnvData->aShellWindow, - rGeom.nX, - rGeom.nY + rGeom.nHeight + nDistance - ); - } -#if OSL_DEBUG_LEVEL > 1 - else - fprintf( stderr, "Warning: could not reposition status window since no frame\n" ); -#endif - EnableAlwaysOnTop( TRUE ); -} - -IIIMPStatusWindow::~IIIMPStatusWindow() -{ -} - -void IIIMPStatusWindow::layout() -{ - Font aFont( m_aStatusBtn.GetFont() ); - Size aSize( 15*aFont.GetHeight(), aFont.GetHeight()+14 ); - aSize = m_aStatusBtn.LogicToPixel( aSize ); - - m_aStatusBtn.SetPosSizePixel( Point( 0, 0 ), aSize ); - SetOutputSizePixel( aSize ); - if( IsVisible() ) - Invalidate(); -} - -void IIIMPStatusWindow::DataChanged( const DataChangedEvent& ) -{ - m_aStatusBtn.SetSettings( GetSettings() ); - layout(); -} - -void IIIMPStatusWindow::setText( const String& rText ) -{ - m_aStatusBtn.SetText( rText ); -} - -String IIIMPStatusWindow::getText() const -{ - return m_aStatusBtn.GetText(); -} - -void IIIMPStatusWindow::show( bool bShow, I18NStatus::ShowReason eReason ) -{ - // hide IIIMPStatusWindow only in presentations - if( ! bShow - && eReason != I18NStatus::presentation - ) - return; - - m_bShow = bShow; - show(); -} - -void IIIMPStatusWindow::toggle( bool bOn ) -{ - if (bOn != m_bOn) - { - m_bOn = bOn; - show(); - } -} - -void IIIMPStatusWindow::show() -{ - if (m_bOn && m_bShow && !IsVisible()) - m_pResetFocus = I18NStatus::get().getParent(); - Show(m_bOn && m_bShow); -} - -void IIIMPStatusWindow::GetFocus() -{ - /* - * this is here just to put the focus back to the application - * window at startup on clickToFocus WMs - */ - WorkWindow::GetFocus(); - if( m_pResetFocus ) - { - /* - * look if reset focus still exists - * since reset focus really is an internal hack there should - * not be a method to be called in SalFrame destructor - */ - const std::list< SalFrame* >& rFrames = GetX11SalData()->GetDisplay()->getFrames(); - std::list< SalFrame* >::const_iterator it; - for( it = rFrames.begin(); it != rFrames.end() && *it != m_pResetFocus; ++it ) - ; - if( it != rFrames.end() ) - { - const SystemEnvData* pParentEnvData = m_pResetFocus->GetSystemData(); - SalXLib* pXLib = GetX11SalData()->GetDisplay()->GetXLib(); - pXLib->PushXErrorLevel( true ); - XSetInputFocus( (Display*)pParentEnvData->pDisplay, - (XLIB_Window)pParentEnvData->aShellWindow, - RevertToNone, - CurrentTime - ); - XSync( (Display*)pParentEnvData->pDisplay, False ); - pXLib->PopXErrorLevel(); - } - m_pResetFocus = NULL; - } -} - -// -------------------------------------------------------------------------- - -IMPL_LINK( IIIMPStatusWindow, SelectHdl, MenuButton*, pBtn ) -{ - if( pBtn == & m_aStatusBtn ) - { - const ::std::vector< I18NStatus::ChoiceData >& rChoices( I18NStatus::get().getChoices() ); - unsigned int nIndex = m_aStatusBtn.GetCurItemId()-1; - if( nIndex < rChoices.size() ) - { - XSetICValues( static_cast(I18NStatus::get().getParent())->getInputContext()->GetContext(), - XNUnicodeCharacterSubset, - rChoices[nIndex].pData, - NULL); - // FIXME: get rid of X11SalFrame - X11SalFrame* pParent = static_cast(I18NStatus::get().getParent()); - if( pParent && pParent->isMapped() ) - { - const SystemEnvData* pEnv = pParent->GetSystemData(); - SalXLib* pXLib = GetX11SalData()->GetDisplay()->GetXLib(); - pXLib->PushXErrorLevel( true ); - XSetInputFocus( (Display*)pEnv->pDisplay, - (XLIB_Window)pEnv->aShellWindow, - RevertToNone, - CurrentTime - ); - XSync( (Display*)pEnv->pDisplay, False ); - pXLib->PopXErrorLevel(); - } - } - } - return 0; -} - -/* - * I18NStatus - */ - -I18NStatus* I18NStatus::pInstance = NULL; - -I18NStatus& I18NStatus::get() -{ - if( ! pInstance ) - pInstance = new I18NStatus(); - return *pInstance; -} - -// -------------------------------------------------------------------------- - -bool I18NStatus::exists() -{ - return pInstance != NULL; -} - -// -------------------------------------------------------------------------- - -void I18NStatus::free() -{ - if( pInstance ) - delete pInstance, pInstance = NULL; -} - -// -------------------------------------------------------------------------- - -I18NStatus::I18NStatus() : - m_pParent( NULL ), - m_pStatusWindow( NULL ) -{ -} - -// -------------------------------------------------------------------------- - -I18NStatus::~I18NStatus() -{ - if( m_pStatusWindow ) - delete m_pStatusWindow, m_pStatusWindow = NULL; - if( pInstance == this ) - pInstance = NULL; -} - -// -------------------------------------------------------------------------- - -void I18NStatus::setParent( SalFrame* pParent ) -{ - m_pParent = pParent; - if( ! m_pStatusWindow ) - { - bool bIIIMPmode = m_aChoices.begin() != m_aChoices.end(); - if( bIIIMPmode ) - m_pStatusWindow = new IIIMPStatusWindow( pParent, - getStatusWindowMode() ); - else - m_pStatusWindow = new XIMStatusWindow( getStatusWindowMode() ); - setStatusText( m_aCurrentIM ); - } - m_pStatusWindow->setPosition( m_pParent ); -} - -// -------------------------------------------------------------------------- - -void I18NStatus::show( bool bShow, ShowReason eReason ) -{ - if( m_pStatusWindow ) - { - m_pStatusWindow->setPosition( m_pParent ); - m_pStatusWindow->show( bShow, eReason ); - } -} - -// -------------------------------------------------------------------------- - -void I18NStatus::setStatusText( const String& rText ) -{ - if( m_pStatusWindow ) - { - /* - * #93614# convert fullwidth ASCII forms to ascii - */ - int nChars = rText.Len()+1; - sal_Unicode* pBuffer = (sal_Unicode*)alloca( nChars*sizeof( sal_Unicode ) ); - const sal_Unicode* pCopy = rText.GetBuffer(); - for( int i = 0; i < nChars; i++ ) - { - if( pCopy[i] >=0xff00 && pCopy[i] <= 0xff5f ) - pBuffer[i] = (pCopy[i] & 0xff) + 0x20; - else - pBuffer[i] = pCopy[i]; - } - String aText( pBuffer ); - m_pStatusWindow->setText( aText ); - m_pStatusWindow->setPosition( m_pParent ); - - bool bVisible = true; - if( m_pParent ) - { - long w, h; - m_pParent->GetClientSize( w, h ); - if( w == 0 || h == 0 ) - { - bVisible = false; - } - } - - m_pStatusWindow->show( bVisible, contextmap ); - } -} - -// -------------------------------------------------------------------------- - -void I18NStatus::changeIM( const String& rIM ) -{ - m_aCurrentIM = rIM; -} - -// -------------------------------------------------------------------------- - -String I18NStatus::getStatusText() const -{ - return m_pStatusWindow ? m_pStatusWindow->getText() : String(); -} - -// -------------------------------------------------------------------------- - -void I18NStatus::clearChoices() -{ - m_aChoices.clear(); -} - -// -------------------------------------------------------------------------- - -void I18NStatus::addChoice( const String& rChoice, void* pData ) -{ - ChoiceData aData; - aData.pData = pData; - aData.aString = rChoice; - m_aChoices.push_back( aData ); -} - -// -------------------------------------------------------------------------- - -void I18NStatus::toTop() const -{ - if( m_pStatusWindow ) - { - const SystemEnvData* pData = m_pStatusWindow->GetSystemData(); - XRaiseWindow( (Display*)pData->pDisplay, - (XLIB_Window)pData->aShellWindow ); - } -} - -// -------------------------------------------------------------------------- - -SalFrame* I18NStatus::getStatusFrame() const -{ - SalFrame* pRet = NULL; - if( m_pStatusWindow ) - { - const SystemEnvData* pData = m_pStatusWindow->GetSystemData(); - pRet = (SalFrame*)pData->pSalFrame; - } - return pRet; -} - -bool I18NStatus::canToggleStatusWindow() const -{ - return true; -} - -void I18NStatus::toggleStatusWindow() -{ - if (m_pStatusWindow != 0) - m_pStatusWindow->toggle(getStatusWindowMode()); -} - -bool I18NStatus::getStatusWindowMode() -{ - switch (ImplGetSVData()->maAppData.meShowImeStatusWindow) - { - default: // ImplSVAppData::ImeStatusWindowMode_UNKNOWN - return Application::GetShowImeStatusWindowDefault(); - case ImplSVAppData::ImeStatusWindowMode_HIDE: - return false; - case ImplSVAppData::ImeStatusWindowMode_SHOW: - return true; - } -} - -/* - * X11ImeStatus - */ -X11ImeStatus::~X11ImeStatus() -{ - vcl::I18NStatus::free(); -} - -bool X11ImeStatus::canToggle() -{ - return vcl::I18NStatus::get().canToggleStatusWindow(); -} - -void X11ImeStatus::toggle() -{ - vcl::I18NStatus::get().toggleStatusWindow(); -} - -SalI18NImeStatus* X11SalInstance::CreateI18NImeStatus() -{ - return new X11ImeStatus(); -} diff --git a/vcl/unx/source/app/i18n_wrp.cxx b/vcl/unx/source/app/i18n_wrp.cxx deleted file mode 100644 index eb48962a24d0..000000000000 --- a/vcl/unx/source/app/i18n_wrp.cxx +++ /dev/null @@ -1,259 +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_vcl.hxx" - -struct XIMArg -{ - char *name; - char *value; -}; - -#if defined(SOLARIS) && !defined(__GNUC__) -#include -#else -#include -#endif -#include - -#include -#include -#include -#include -#include "XIM.h" - -#define XIIIMP_LIB "xiiimp.so.2" - -#ifdef SOLARIS -#define XIIIMP_PATH "/usr/openwin/lib/locale/common/" XIIIMP_LIB -#else /* Linux */ -#define XIIIMP_PATH "/usr/lib/im/" XIIIMP_LIB -#endif - -extern "C" { -typedef XIM (*OpenFunction)(Display*, XrmDatabase, char*, char*, XIMArg*); -} - -/* global variables */ -static void *g_dlmodule = 0; -static OpenFunction g_open_im = (OpenFunction)NULL; - -/* utility function to transform vararg list into an array of XIMArg */ - -int -XvaCountArgs( XIMArg *pInArgs ) -{ - int nArgs = 0; - char *pName, *pValue; - - while ( (pName = pInArgs->name) != NULL ) - { - pValue = pInArgs->value; - - if ( strcmp(pName, XNVaNestedList) == 0 ) - { - nArgs += XvaCountArgs( (XIMArg*)pValue ); - } - else - { - nArgs += 1; - } - pInArgs++; - } - - return nArgs; -} - -int -XvaCountArgs( va_list pInArgs ) -{ - int nArgs = 0; - char *pName, *pValue; - - while ( (pName = va_arg(pInArgs, char*)) != NULL) - { - pValue = va_arg(pInArgs, char*); - - if ( strcmp(pName, XNVaNestedList) == 0 ) - { - nArgs += XvaCountArgs( (XIMArg*)pValue ); - } - else - { - nArgs += 1; - } - } - - return nArgs; -} - -XIMArg* -XvaGetArgs( XIMArg *pInArgs, XIMArg *pOutArgs ) -{ - char *pName, *pValue; - - while ( (pName = pInArgs->name) != NULL ) - { - pValue = pInArgs->value; - - if ( strcmp(pName, XNVaNestedList) == 0 ) - { - pOutArgs = XvaGetArgs( (XIMArg*)pValue, pOutArgs ); - } - else - { - pOutArgs->name = pName; - pOutArgs->value = pValue; - pOutArgs++; - } - pInArgs++; - } - - return pOutArgs; -} - -void -XvaGetArgs( va_list pInArgs, XIMArg *pOutArgs ) -{ - char *pName, *pValue; - - while ((pName = va_arg(pInArgs, char*)) != NULL) - { - pValue = va_arg(pInArgs, char*); - - if ( strcmp(pName, XNVaNestedList) == 0 ) - { - pOutArgs = XvaGetArgs( (XIMArg*)pValue, pOutArgs ); - } - else - { - pOutArgs->name = pName; - pOutArgs->value = pValue; - pOutArgs++; - } - } - - pOutArgs->name = NULL; - pOutArgs->value = NULL; -} - - -/* Puplic functions */ - -#ifdef __cplusplus -extern "C" -#endif -XIM -XvaOpenIM(Display *display, XrmDatabase rdb, - char *res_name, char *res_class, ...) -{ - XIM xim = (XIM)0; - va_list variable; - int total_count = 0; - - /* - * so count the stuff dangling here - */ - -#if defined(SOLARIS) && !defined(__GNUC__) - va_start(variable); -#else - va_start(variable, res_class); -#endif - total_count = XvaCountArgs(variable); - va_end(variable); - - if (total_count > 0) - { - /* call a new open IM method */ - - XIMArg* args = (XIMArg*)alloca( (total_count + 1) * sizeof(XIMArg) ); - - /* - * now package it up so we can set it along - */ -#if defined(SOLARIS) && !defined(__GNUC__) - va_start(variable); -#else - va_start(variable, res_class); -#endif - XvaGetArgs( variable, args ); - va_end(variable); - - if (!g_dlmodule) - { - g_dlmodule = dlopen(XIIIMP_LIB, RTLD_LAZY); - if(!g_dlmodule) - { - g_dlmodule = dlopen(XIIIMP_PATH, RTLD_LAZY); - if (!g_dlmodule) - goto legacy_XIM; - } - g_open_im = (OpenFunction)(long)dlsym(g_dlmodule, "__XOpenIM"); - if (!g_open_im) - goto legacy_XIM; - - xim = (*g_open_im)(display, (XrmDatabase)rdb, - (char*)res_name, (char *)res_class, (XIMArg*)args); - } - else - { - goto legacy_XIM; - } - } - -// in #if to prevent warning "warning: label 'legacy_XIM' defined but not used" - legacy_XIM: - - if (!xim) - xim = XOpenIM(display, rdb, res_name, res_class); - - return xim; -} - -/* - * Close the connection to the input manager, and free the XIM structure - */ - -Status XvaCloseIM(XIM) -{ - Status s = False; - - if (!g_dlmodule) - { - /* assuming one XvaOpenIM call */ - dlclose(g_dlmodule); - g_dlmodule = (void*)0; - g_open_im = (OpenFunction)NULL; - s = True; - } - return (s); -} - - - diff --git a/vcl/unx/source/app/i18n_xkb.cxx b/vcl/unx/source/app/i18n_xkb.cxx deleted file mode 100644 index e9a787eda667..000000000000 --- a/vcl/unx/source/app/i18n_xkb.cxx +++ /dev/null @@ -1,163 +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_vcl.hxx" - - -#include - -#include "saldisp.hxx" -#include "saldata.hxx" -#include "i18n_xkb.hxx" - -SalI18N_KeyboardExtension::SalI18N_KeyboardExtension( Display* -#if __XKeyboardExtension__ -pDisplay -#endif -) - : mbUseExtension( (sal_Bool)__XKeyboardExtension__ ), - mnDefaultGroup( 0 ) -{ - #if __XKeyboardExtension__ - - mpDisplay = pDisplay; - - // allow user to set the default keyboard group idx or to disable the usage - // of x keyboard extension at all: - // setenv SAL_XKEYBOARDGROUP disables keyboard extension - // setenv SAL_XKEYBOARDGROUP 2 sets the keyboard group index to 2 - // keyboard group index must be in [1,4], may be specified in hex or decimal - static char *pUseKeyboardExtension = getenv( "SAL_XKEYBOARDGROUP" ); - if ( pUseKeyboardExtension != NULL ) - { - mbUseExtension = pUseKeyboardExtension[0] != '\0' ; - if ( mbUseExtension ) - mnDefaultGroup = strtol( pUseKeyboardExtension, NULL, 0 ); - if ( mnDefaultGroup > XkbMaxKbdGroup ) - mnDefaultGroup = 0; - } - - // query XServer support for XKB Extension, - // do not call XQueryExtension() / XInitExtension() due to possible version - // clashes ! - if ( mbUseExtension ) - { - int nMajorExtOpcode; - int nExtMajorVersion = XkbMajorVersion; - int nExtMinorVersion = XkbMinorVersion; - - mbUseExtension = (sal_Bool)XkbQueryExtension( mpDisplay, - &nMajorExtOpcode, (int*)&mnEventBase, (int*)&mnErrorBase, - &nExtMajorVersion, &nExtMinorVersion ); - } - - // query notification for changes of the keyboard group - if ( mbUseExtension ) - { - #define XkbGroupMask ( XkbGroupStateMask | XkbGroupBaseMask \ - | XkbGroupLatchMask | XkbGroupLockMask ) - - mbUseExtension = XkbSelectEventDetails( mpDisplay, - XkbUseCoreKbd, XkbStateNotify, XkbGroupMask, XkbGroupMask ); - } - - // query initial keyboard group - if ( mbUseExtension ) - { - XkbStateRec aStateRecord; - XkbGetState( mpDisplay, XkbUseCoreKbd, &aStateRecord ); - mnGroup = aStateRecord.group; - } - - #endif // __XKeyboardExtension__ -} - -void -SalI18N_KeyboardExtension::Dispatch( XEvent* -#if __XKeyboardExtension__ -pEvent -#endif -) -{ - #if __XKeyboardExtension__ - - // must the event be handled? - if ( !mbUseExtension - || (pEvent->type != mnEventBase) ) - return; - - // only handle state notify events for now, and only interested - // in group details - sal_uInt32 nXKBType = ((XkbAnyEvent*)pEvent)->xkb_type; - switch ( nXKBType ) - { - case XkbStateNotify: - - mnGroup = ((XkbStateNotifyEvent*)pEvent)->group; - break; - - default: - - #if OSL_DEBUG_LEVEL > 1 - fprintf(stderr, "Got unrequested XkbAnyEvent %#x/%i\n", - static_cast(nXKBType), static_cast(nXKBType) ); - #endif - break; - } - #endif // __XKeyboardExtension__ -} - -#if __XKeyboardExtension__ -sal_uInt32 -SalI18N_KeyboardExtension::LookupKeysymInGroup( sal_uInt32 nKeyCode, - sal_uInt32 nShiftState, - sal_uInt32 nGroup ) const -#else -sal_uInt32 -SalI18N_KeyboardExtension::LookupKeysymInGroup( sal_uInt32,sal_uInt32,sal_uInt32 ) const -#endif -{ - #if __XKeyboardExtension__ - - if ( !mbUseExtension ) - return NoSymbol; - - nShiftState &= ShiftMask; - - KeySym nKeySymbol; - nKeySymbol = XkbKeycodeToKeysym( mpDisplay, nKeyCode, nGroup, nShiftState ); - return nKeySymbol; - - #else - - return NoSymbol; - - #endif // __XKeyboardExtension__ -} - - diff --git a/vcl/unx/source/app/keysymnames.cxx b/vcl/unx/source/app/keysymnames.cxx deleted file mode 100644 index c9515f016433..000000000000 --- a/vcl/unx/source/app/keysymnames.cxx +++ /dev/null @@ -1,688 +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_vcl.hxx" - -#ifndef SOLARIS -#include -#include -#include -#endif - -#include -#include - -#if !defined (SunXK_Undo) -#define SunXK_Undo 0x0000FF65 // XK_Undo -#define SunXK_Again 0x0000FF66 // XK_Redo -#define SunXK_Find 0x0000FF68 // XK_Find -#define SunXK_Stop 0x0000FF69 // XK_Cancel -#define SunXK_Props 0x1005FF70 -#define SunXK_Front 0x1005FF71 -#define SunXK_Copy 0x1005FF72 -#define SunXK_Open 0x1005FF73 -#define SunXK_Paste 0x1005FF74 -#define SunXK_Cut 0x1005FF75 -#endif - -#ifdef SOLARIS -#include -#include -#include -#include -#include -#include -#include -#include -#include -#endif - -#include - -namespace vcl_sal { - - struct KeysymNameReplacement - { - KeySym aSymbol; - const char* pName; - }; - - struct KeyboardReplacements - { - const char* pKeyboardName; - const KeysymNameReplacement* pReplacements; - int nReplacements; - }; - - // ==================================================================== - // - // CAUTION CAUTION CAUTION - // every string value in the replacements tables must be in UTF8 - // be careful with your editor ! - // - // ==================================================================== - - static const struct KeysymNameReplacement aImplReplacements_English[] = - { - { XK_Control_L, "Ctrl" }, - { XK_Control_R, "Ctrl" }, - { XK_Escape, "Esc" }, - { XK_space, "Space" }, - { XK_minus, "-" }, - { XK_plus, "+" } - }; - - static const struct KeysymNameReplacement aImplReplacements_Turkish[] = - { - { XK_Control_L, "Ctrl" }, - { XK_Control_R, "Ctrl" }, - { XK_Right, "Sağ" }, - { XK_Left, "Sol" }, - { XK_Up, "Yukarı" }, - { XK_Down, "Aşağı" }, - { XK_space, "Boşluk" } - }; - - static const struct KeysymNameReplacement aImplReplacements_Russian[] = - { - { XK_Right, "Вправо" }, - { XK_Left, "Влево" }, - { XK_Up, "Вверх" }, - { XK_Down, "Вниз" }, - { XK_space, "Пробел" } - }; - - static const struct KeysymNameReplacement aImplReplacements_German[] = - { - { XK_Control_L, "Strg" }, - { XK_Control_R, "Strg" }, - { XK_Shift_L, "Umschalt" }, - { XK_Shift_R, "Umschalt" }, - { XK_Alt_L, "Alt" }, - { XK_Alt_R, "Alt Gr" }, - { XK_Page_Up, "Bild auf" }, - { XK_Page_Down, "Bild ab" }, - { XK_End, "Ende" }, - { XK_Home, "Pos 1" }, - { XK_Insert, "Einfg" }, - { XK_Delete, "Entf" }, - { XK_Escape, "Esc" }, - { XK_Right, "Rechts" }, - { XK_Left, "Links" }, - { XK_Up, "Oben" }, - { XK_Down, "Unten" }, - { XK_BackSpace, "Rückschritt" }, - { XK_Return, "Eingabe" }, - { XK_slash, "Schrägstrich" }, - { XK_space, "Leertaste" }, - { SunXK_Stop, "Stop" }, - { SunXK_Again, "Wiederholen" }, - { SunXK_Props, "Eigenschaften" }, - { SunXK_Undo, "Zurücknehmen" }, - { SunXK_Front, "Vordergrund" }, - { SunXK_Copy, "Kopieren" }, - { SunXK_Open, "Öffnen" }, - { SunXK_Paste, "Einsetzen" }, - { SunXK_Find, "Suchen" }, - { SunXK_Cut, "Ausschneiden" }, - { XK_minus, "-" }, - { XK_plus, "+" } - }; - - static const struct KeysymNameReplacement aImplReplacements_French[] = - { - { XK_Shift_L, "Maj" }, - { XK_Shift_R, "Maj" }, - { XK_Page_Up, "Pg. Préc" }, - { XK_Page_Down, "Pg. Suiv" }, - { XK_End, "Fin" }, - { XK_Home, "Origine" }, - { XK_Insert, "Insérer" }, - { XK_Delete, "Suppr" }, - { XK_Escape, "Esc" }, - { XK_Right, "Droite" }, - { XK_Left, "Gauche" }, - { XK_Up, "Haut" }, - { XK_Down, "Bas" }, - { XK_BackSpace, "Ret. Arr" }, - { XK_Return, "Retour" }, - { XK_KP_Enter, "Entrée" }, - { SunXK_Stop, "Stop" }, - { SunXK_Again, "Encore" }, - { SunXK_Props, "Props" }, - { SunXK_Undo, "Annuler" }, - { SunXK_Front, "Devant" }, - { SunXK_Copy, "Copy" }, - { SunXK_Open, "Ouvrir" }, - { SunXK_Paste, "Coller" }, - { SunXK_Find, "Cher." }, - { SunXK_Cut, "Couper" }, - { XK_minus, "-" }, - { XK_plus, "+" } - }; - - static const struct KeysymNameReplacement aImplReplacements_Italian[] = - { - { XK_Shift_L, "Maiusc" }, - { XK_Shift_R, "Maiusc" }, - { XK_Page_Up, "PgSu" }, - { XK_Page_Down, "PgGiu" }, - { XK_End, "Fine" }, - { XK_Insert, "Ins" }, - { XK_Delete, "Canc" }, - { XK_Escape, "Esc" }, - { XK_Right, "A destra" }, - { XK_Left, "A sinistra" }, - { XK_Up, "Sposta verso l'alto" }, - { XK_Down, "Sposta verso il basso" }, - { XK_BackSpace, "Backspace" }, - { XK_Return, "Invio" }, - { XK_space, "Spazio" }, - { SunXK_Stop, "Stop" }, - { SunXK_Again, "Ancora" }, - { SunXK_Props, "Proprietà" }, - { SunXK_Undo, "Annulla" }, - { SunXK_Front, "Davanti" }, - { SunXK_Copy, "Copia" }, - { SunXK_Open, "Apri" }, - { SunXK_Paste, "Incolla" }, - { SunXK_Find, "Trova" }, - { SunXK_Cut, "Taglia" }, - { XK_minus, "-" }, - { XK_plus, "+" } - }; - - static const struct KeysymNameReplacement aImplReplacements_Dutch[] = - { - { XK_Page_Up, "PageUp" }, - { XK_Page_Down, "PageDown" }, - { XK_Escape, "Esc" }, - { XK_Right, "Rechts" }, - { XK_Left, "Links" }, - { XK_Up, "Boven" }, - { XK_Down, "Onder" }, - { XK_BackSpace, "Backspace" }, - { XK_Return, "Return" }, - { XK_space, "Spatiebalk" }, - { SunXK_Stop, "Stop" }, - { SunXK_Again, "Again" }, - { SunXK_Props, "Props" }, - { SunXK_Undo, "Undo" }, - { SunXK_Front, "Front" }, - { SunXK_Copy, "Copy" }, - { SunXK_Open, "Open" }, - { SunXK_Paste, "Paste" }, - { SunXK_Find, "Find" }, - { SunXK_Cut, "Cut" }, - { XK_minus, "-" }, - { XK_plus, "+" } - }; - - static const struct KeysymNameReplacement aImplReplacements_Norwegian[] = - { - { XK_Shift_L, "Skift" }, - { XK_Shift_R, "Skift" }, - { XK_Page_Up, "PageUp" }, - { XK_Page_Down, "PageDown" }, - { XK_Escape, "Esc" }, - { XK_Right, "Hyre" }, - { XK_Left, "Venstre" }, - { XK_Up, "Opp" }, - { XK_Down, "Ned" }, - { XK_BackSpace, "Tilbake" }, - { XK_Return, "Enter" }, - { SunXK_Stop, "Avbryt" }, - { SunXK_Again, "Gjenta" }, - { SunXK_Props, "Egenskaper" }, - { SunXK_Undo, "Angre" }, - { SunXK_Front, "Front" }, - { SunXK_Copy, "Kopi" }, - { SunXK_Open, "Åpne" }, - { SunXK_Paste, "Lim" }, - { SunXK_Find, "Søk" }, - { SunXK_Cut, "Klipp" }, - { XK_minus, "-" }, - { XK_plus, "+" } - }; - - static const struct KeysymNameReplacement aImplReplacements_Swedish[] = - { - { XK_Shift_L, "Skift" }, - { XK_Shift_R, "Skift" }, - { XK_Page_Up, "PageUp" }, - { XK_Page_Down, "PageDown" }, - { XK_Escape, "Esc" }, - { XK_Right, "Höger" }, - { XK_Left, "Vänster" }, - { XK_Up, "Up" }, - { XK_Down, "Ned" }, - { XK_BackSpace, "Backsteg" }, - { XK_Return, "Retur" }, - { XK_space, "Blank" }, - { SunXK_Stop, "Avbryt" }, - { SunXK_Again, "Upprepa" }, - { SunXK_Props, "Egenskaper" }, - { SunXK_Undo, "Ångra" }, - { SunXK_Front, "Fram" }, - { SunXK_Copy, "Kopiera" }, - { SunXK_Open, "Öppna" }, - { SunXK_Paste, "Klistra in" }, - { SunXK_Find, "Sök" }, - { SunXK_Cut, "Klipp ut" }, - { XK_minus, "-" }, - { XK_plus, "+" } - }; - - static const struct KeysymNameReplacement aImplReplacements_Portuguese[] = - { - { XK_Page_Up, "PageUp" }, - { XK_Page_Down, "PageDown" }, - { XK_Escape, "Esc" }, - { XK_Right, "Direita" }, - { XK_Left, "Esquerda" }, - { XK_Up, "Acima" }, - { XK_Down, "Abaixo" }, - { XK_BackSpace, "Backspace" }, - { XK_Return, "Enter" }, - { XK_slash, "Barra" }, - { SunXK_Stop, "Stop" }, - { SunXK_Again, "Again" }, - { SunXK_Props, "Props" }, - { SunXK_Undo, "Undo" }, - { SunXK_Front, "Front" }, - { SunXK_Copy, "Copy" }, - { SunXK_Open, "Open" }, - { SunXK_Paste, "Paste" }, - { SunXK_Find, "Find" }, - { SunXK_Cut, "Cut" }, - { XK_minus, "-" }, - { XK_plus, "+" } - }; - - static const struct KeysymNameReplacement aImplReplacements_Spanish[] = - { - { XK_Shift_L, "Mayús" }, - { XK_Shift_R, "Mayús" }, - { XK_Page_Up, "RePág" }, - { XK_Page_Down, "AvPág" }, - { XK_End, "Fin" }, - { XK_Home, "Inicio" }, - { XK_Delete, "Supr" }, - { XK_Escape, "Esc" }, - { XK_Right, "Hacia la derecha" }, - { XK_Left, "Hacia la izquierda" }, - { XK_Up, "Hacia arriba" }, - { XK_Down, "Hacia abajo" }, - { XK_BackSpace, "Ret" }, - { XK_Return, "Entrada" }, - { XK_space, "Espacio" }, - { XK_KP_Enter, "Intro" }, - { SunXK_Stop, "Stop" }, - { SunXK_Again, "Repetir" }, - { SunXK_Props, "Props" }, - { SunXK_Undo, "Anular" }, - { SunXK_Front, "Delante" }, - { SunXK_Copy, "Copiar" }, - { SunXK_Open, "Abrir" }, - { SunXK_Paste, "Pegar" }, - { SunXK_Find, "Buscar" }, - { SunXK_Cut, "Cortar" }, - { XK_minus, "-" }, - { XK_plus, "+" } - }; - - static const struct KeyboardReplacements aKeyboards[] = - { -#ifdef SOLARIS - { "Germany5", aImplReplacements_German, sizeof(aImplReplacements_German)/sizeof(aImplReplacements_German[0]) }, - { "Germany4", aImplReplacements_German, sizeof(aImplReplacements_German)/sizeof(aImplReplacements_German[0]) }, - { "France5", aImplReplacements_French, sizeof(aImplReplacements_French)/sizeof(aImplReplacements_French[0]) }, - { "France6", aImplReplacements_French, sizeof(aImplReplacements_French)/sizeof(aImplReplacements_French[0]) }, - { "France_x86", aImplReplacements_French, sizeof(aImplReplacements_French)/sizeof(aImplReplacements_French[0]) }, - { "Italy5", aImplReplacements_Italian, sizeof(aImplReplacements_Italian)/sizeof(aImplReplacements_Italian[0]) }, - { "Italy5-Hobo", aImplReplacements_Italian, sizeof(aImplReplacements_Italian)/sizeof(aImplReplacements_Italian[0]) }, - { "Italy4", aImplReplacements_Italian, sizeof(aImplReplacements_Italian)/sizeof(aImplReplacements_Italian[0]) }, - { "Italy6", aImplReplacements_Italian, sizeof(aImplReplacements_Italian)/sizeof(aImplReplacements_Italian[0]) }, - { "Italy_x86", aImplReplacements_Italian, sizeof(aImplReplacements_Italian)/sizeof(aImplReplacements_Italian[0]) }, - { "Netherland4", aImplReplacements_Dutch, sizeof(aImplReplacements_Dutch)/sizeof(aImplReplacements_Dutch[0]) }, - { "Netherland5", aImplReplacements_Dutch, sizeof(aImplReplacements_Dutch)/sizeof(aImplReplacements_Dutch[0]) }, - { "Netherland5-Hobo", aImplReplacements_Dutch, sizeof(aImplReplacements_Dutch)/sizeof(aImplReplacements_Dutch[0]) }, - { "Netherland6", aImplReplacements_Dutch, sizeof(aImplReplacements_Dutch)/sizeof(aImplReplacements_Dutch[0]) }, - { "Netherland_x86", aImplReplacements_Dutch, sizeof(aImplReplacements_Dutch)/sizeof(aImplReplacements_Dutch[0]) }, - { "Norway5", aImplReplacements_Norwegian, sizeof(aImplReplacements_Norwegian)/sizeof(aImplReplacements_Norwegian[0]) }, - { "Norway5-Hobo", aImplReplacements_Norwegian, sizeof(aImplReplacements_Norwegian)/sizeof(aImplReplacements_Norwegian[0]) }, - { "Norway4", aImplReplacements_Norwegian, sizeof(aImplReplacements_Norwegian)/sizeof(aImplReplacements_Norwegian[0]) }, - { "Norway6", aImplReplacements_Norwegian, sizeof(aImplReplacements_Norwegian)/sizeof(aImplReplacements_Norwegian[0]) }, - { "Norway_x86", aImplReplacements_Norwegian, sizeof(aImplReplacements_Norwegian)/sizeof(aImplReplacements_Norwegian[0]) }, - { "Portugal5", aImplReplacements_Portuguese, sizeof(aImplReplacements_Portuguese)/sizeof(aImplReplacements_Portuguese[0]) }, - { "Portugal5-Hobo", aImplReplacements_Portuguese, sizeof(aImplReplacements_Portuguese)/sizeof(aImplReplacements_Portuguese[0]) }, - { "Portugal4", aImplReplacements_Portuguese, sizeof(aImplReplacements_Portuguese)/sizeof(aImplReplacements_Portuguese[0]) }, - { "Portugal6", aImplReplacements_Portuguese, sizeof(aImplReplacements_Portuguese)/sizeof(aImplReplacements_Portuguese[0]) }, - { "Portugal_x86", aImplReplacements_Portuguese, sizeof(aImplReplacements_Portuguese)/sizeof(aImplReplacements_Portuguese[0]) }, - { "Spain5", aImplReplacements_Spanish, sizeof(aImplReplacements_Spanish)/sizeof(aImplReplacements_Spanish[0]) }, - { "Spain5-Hobo", aImplReplacements_Spanish, sizeof(aImplReplacements_Spanish)/sizeof(aImplReplacements_Spanish[0]) }, - { "Spain4", aImplReplacements_Spanish, sizeof(aImplReplacements_Spanish)/sizeof(aImplReplacements_Spanish[0]) }, - { "Spain6", aImplReplacements_Spanish, sizeof(aImplReplacements_Spanish)/sizeof(aImplReplacements_Spanish[0]) }, - { "Spain_x86", aImplReplacements_Spanish, sizeof(aImplReplacements_Spanish)/sizeof(aImplReplacements_Spanish[0]) }, - { "Sweden5", aImplReplacements_Swedish, sizeof(aImplReplacements_Swedish)/sizeof(aImplReplacements_Swedish[0]) }, - { "Sweden5-Hobo", aImplReplacements_Swedish, sizeof(aImplReplacements_Swedish)/sizeof(aImplReplacements_Swedish[0]) }, - { "Sweden4", aImplReplacements_Swedish, sizeof(aImplReplacements_Swedish)/sizeof(aImplReplacements_Swedish[0]) }, - { "Sweden6", aImplReplacements_Swedish, sizeof(aImplReplacements_Swedish)/sizeof(aImplReplacements_Swedish[0]) }, - { "Sweden_x86", aImplReplacements_Swedish, sizeof(aImplReplacements_Swedish)/sizeof(aImplReplacements_Swedish[0]) }, -#endif - { "U.S. English", aImplReplacements_English, sizeof(aImplReplacements_English)/sizeof(aImplReplacements_English[0]) }, - { "United Kingdom", aImplReplacements_English, sizeof(aImplReplacements_English)/sizeof(aImplReplacements_English[0]) }, - // Germany, German - { "German", aImplReplacements_German, sizeof(aImplReplacements_German)/sizeof(aImplReplacements_German[0]) }, - { "France", aImplReplacements_French, sizeof(aImplReplacements_French)/sizeof(aImplReplacements_French[0]) }, - { "French", aImplReplacements_French, sizeof(aImplReplacements_French)/sizeof(aImplReplacements_French[0]) }, - // Italy, Italian - { "Ital", aImplReplacements_Italian, sizeof(aImplReplacements_Italian)/sizeof(aImplReplacements_Italian[0]) }, - // Norway, Norwegian - { "Norw", aImplReplacements_Norwegian, sizeof(aImplReplacements_Norwegian)/sizeof(aImplReplacements_Norwegian[0]) }, - // Portugal, Portuguese - { "Portu", aImplReplacements_Portuguese, sizeof(aImplReplacements_Portuguese)/sizeof(aImplReplacements_Portuguese[0]) }, - { "Spain", aImplReplacements_Spanish, sizeof(aImplReplacements_Spanish)/sizeof(aImplReplacements_Spanish[0]) }, - { "Spanish", aImplReplacements_Spanish, sizeof(aImplReplacements_Spanish)/sizeof(aImplReplacements_Spanish[0]) }, - // Sweden, Swedish - { "Swed", aImplReplacements_Swedish, sizeof(aImplReplacements_Swedish)/sizeof(aImplReplacements_Swedish[0]) }, - { "Netherland", aImplReplacements_Dutch, sizeof(aImplReplacements_Dutch)/sizeof(aImplReplacements_Dutch[0]) }, - { "Dutch", aImplReplacements_Dutch, sizeof(aImplReplacements_Dutch)/sizeof(aImplReplacements_Dutch[0]) }, - // Turkish, Turkey - { "Turk", aImplReplacements_Turkish, sizeof(aImplReplacements_Turkish)/sizeof(aImplReplacements_Turkish[0]) }, - // Russian, Russia - { "Russia", aImplReplacements_Russian, sizeof(aImplReplacements_Russian)/sizeof(aImplReplacements_Russian[0]) }, - { "English", aImplReplacements_English, sizeof(aImplReplacements_English)/sizeof(aImplReplacements_English[0]) } - }; - - String getKeysymReplacementName( const char* pKeyboard, KeySym nSymbol ) - { - for( unsigned int n = 0; n < sizeof(aKeyboards)/sizeof(aKeyboards[0]); n++ ) - { - if( ! strncasecmp( pKeyboard, aKeyboards[n].pKeyboardName, strlen( aKeyboards[n].pKeyboardName ) ) ) - { - const struct KeysymNameReplacement* pRepl = aKeyboards[n].pReplacements; - for( int m = aKeyboards[n].nReplacements ; m ; ) - { - if( nSymbol == pRepl[--m].aSymbol ) - return String( pRepl[m].pName, RTL_TEXTENCODING_UTF8 ); - } - } - } - // try english fallbacks - const struct KeysymNameReplacement* pRepl = aImplReplacements_English; - for( int m = sizeof(aImplReplacements_English)/sizeof(aImplReplacements_English[0]) ; m ; ) - { - if( nSymbol == pRepl[--m].aSymbol ) - return String( pRepl[m].pName, RTL_TEXTENCODING_UTF8 ); - } - return String(); - } - -} - -#ifdef SOLARIS -typedef struct { - int n_layout; - const char* p_description; -} keyboard_layout; - -static const keyboard_layout type0_layout[] = -{ - { 0, "US4" }, - { -1, NULL } -}; - -static const keyboard_layout type3_layout[] = -{ - { 0, "US3" }, - { -1, NULL } -}; - -static const keyboard_layout type4_layout[] = -{ - { 0, "US4" }, - { 1, "US4" }, - { 2, "FranceBelg4" }, - { 3, "Canada4" }, - { 4, "Denmark4" }, - { 5, "Germany4" }, - { 6, "Italy4" }, - { 7, "Netherland4" }, - { 8, "Norway4" }, - { 9, "Portugal4" }, - { 10, "SpainLatAm4" }, - { 11, "SwedenFin4" }, - { 12, "Switzer_Fr4" }, - { 13, "Switzer_Ge4" }, - { 14, "UK4" }, - { 16, "Korea4" }, - { 17, "Taiwan4" }, - { 19, "US101A_PC" }, - { 19, "US101A_Sun" }, - { 32, "Japan4" }, - { 33, "US5" }, - { 34, "US_UNIX5" }, - { 35, "France5" }, - { 36, "Denmark5" }, - { 37, "Germany5" }, - { 38, "Italy5" }, - { 39, "Netherland5" }, - { 40, "Norway5" }, - { 41, "Portugal5" }, - { 42, "Spain5" }, - { 43, "Sweden5" }, - { 44, "Switzer_Fr5" }, - { 45, "Switzer_Ge5" }, - { 46, "UK5" }, - { 47, "Korea5" }, - { 48, "Taiwan5" }, - { 49, "Japan5" }, - { 50, "Canada_Fr5" }, - { 51, "Hungary5" }, - { 52, "Poland5" }, - { 53, "Czech5" }, - { 54, "Russia5" }, - { 55, "Latvia5" }, - { 56, "Turkey5" }, - { 57, "Greece5" }, - { 58, "Estonia5" }, - { 59, "Lithuania5" }, - { 63, "Canada_Fr5_TBITS5" }, - { 80, "US5_Hobo" }, - { 81, "US_UNIX5_Hobo" }, - { 82, "France5_Hobo" }, - { 83, "Denmark5_Hobo" }, - { 84, "Germany5_Hobo" }, - { 85, "Italy5_Hobo" }, - { 86, "Netherland5_Hobo" }, - { 87, "Norway5_Hobo" }, - { 88, "Portugal5_Hobo" }, - { 89, "Spain5_Hobo" }, - { 90, "Sweden5_Hobo" }, - { 91, "Switzer_Fr5_Hobo" }, - { 92, "Switzer_Ge5_Hobo" }, - { 93, "UK5_Hobo" }, - { 94, "Korea5_Hobo" }, - { 95, "Taiwan5_Hobo" }, - { 96, "Japan5_Hobo" }, - { 97, "Canada_Fr5_Hobo" }, - { -1, NULL } -}; - -static const keyboard_layout type101_layout[] = -{ - { 0, "US101A_x86" }, - { 1, "US101A_x86" }, - { 34, "J3100_x86" }, - { 35, "France_x86" }, - { 36, "Denmark_x86" }, - { 37, "Germany_x86" }, - { 38, "Italy_x86" }, - { 39, "Netherland_x86" }, - { 40, "Norway_x86" }, - { 41, "Portugal_x86" }, - { 42, "Spain_x86" }, - { 43, "Sweden_x86" }, - { 44, "Switzer_Fr_x86" }, - { 45, "Switzer_Ge_x86" }, - { 46, "UK_x86" }, - { 47, "Korea_x86" }, - { 48, "Taiwan_x86" }, - { 49, "Japan_x86" }, - { 50, "Canada_Fr2_x86" }, - { 51, "Hungary_x86" }, - { 52, "Poland_x86" }, - { 53, "Czech_x86" }, - { 54, "Russia_x86" }, - { 55, "Latvia_x86" }, - { 56, "Turkey_x86" }, - { 57, "Greece_x86" }, - { 59, "Lithuania_x86" }, - { 1001, "MS_US101A_x86" }, - { -1, NULL } -}; - -static const keyboard_layout type6_layout[] = -{ - { 0, "US6" }, - { 6, "Denmark6" }, - { 7, "Finnish6" }, - { 8, "France6" }, - { 9, "Germany6" }, - { 14, "Italy6" }, - { 15, "Japan6" }, - { 16, "Korea6" }, - { 18, "Netherland6" }, - { 19, "Norway6" }, - { 22, "Portugal6" }, - { 25, "Spain6" }, - { 26, "Sweden6" }, - { 27, "Switzer_Fr6" }, - { 28, "Switzer_Ge6" }, - { 30, "Taiwan6" }, - { 32, "UK6" }, - { 33, "US6" }, - { -1, NULL } -}; -#endif - - -#if OSL_DEBUG_LEVEL > 1 -#include -#endif - -const char* SalDisplay::GetKeyboardName( BOOL bRefresh ) -{ - if( bRefresh || ! m_aKeyboardName.Len() ) - { -#ifdef SOLARIS - if( IsLocal() ) - { - int kbd = open( "/dev/kbd", O_RDONLY ); - if( kbd >= 0 ) - { - int kbd_type = 0; - if( ! ioctl( kbd, KIOCTYPE, &kbd_type ) ) - { - int kbd_layout = 0; - if( ! ioctl( kbd, KIOCLAYOUT, &kbd_layout ) ) - { - const keyboard_layout *p_layout = NULL; - switch( kbd_type ) - { - case KB_KLUNK: p_layout = type0_layout; break; - case KB_SUN3: p_layout = type3_layout; break; - case KB_SUN4: p_layout = type4_layout; break; - case KB_USB: p_layout = type6_layout; break; - case KB_PC: p_layout = type101_layout; break; - } - - if( p_layout ) - { - while( p_layout->n_layout != -1 ) - { - if ( p_layout->n_layout == kbd_layout ) - { - m_aKeyboardName = p_layout->p_description; - break; - } - p_layout++; - } - } - } - } - close(kbd); - } - } -#else - int opcode, event, error; - int major = XkbMajorVersion, minor = XkbMinorVersion; - if( XkbQueryExtension( GetDisplay(), &opcode, &event,&error, &major, &minor ) ) - { - XkbDescPtr pXkbDesc = NULL; - // try X keyboard extension - if( (pXkbDesc = XkbGetKeyboard( GetDisplay(), XkbAllComponentsMask, XkbUseCoreKbd )) ) - { - const char* pAtom = NULL; - if( pXkbDesc->names->groups[0] ) - { - pAtom = XGetAtomName( GetDisplay(), pXkbDesc->names->groups[0] ); - m_aKeyboardName = pAtom; - XFree( (void*)pAtom ); - } - else - m_aKeyboardName = ""; -#if OSL_DEBUG_LEVEL > 1 -#define PRINT_ATOM( x ) { if( pXkbDesc->names->x ) { pAtom = XGetAtomName( GetDisplay(), pXkbDesc->names->x ); fprintf( stderr, "%s: %s\n", #x, pAtom ); XFree( (void*)pAtom ); } else fprintf( stderr, "%s: \n", #x ); } - - PRINT_ATOM( keycodes ); - PRINT_ATOM( geometry ); - PRINT_ATOM( symbols ); - PRINT_ATOM( types ); - PRINT_ATOM( compat ); - PRINT_ATOM( phys_symbols ); - -#define PRINT_ATOM_2( x ) { if( pXkbDesc->names->x[i] ) { pAtom = XGetAtomName( GetDisplay(), pXkbDesc->names->x[i] ); fprintf( stderr, "%s[%d]: %s\n", #x, i, pAtom ); XFree( (void*)pAtom ); } else fprintf( stderr, "%s[%d]: \n", #x, i ); } - int i; - for( i = 0; i < XkbNumVirtualMods; i++ ) - PRINT_ATOM_2( vmods ); - for( i = 0; i < XkbNumIndicators; i++ ) - PRINT_ATOM_2( indicators ); - for( i = 0; i < XkbNumKbdGroups; i++ ) - PRINT_ATOM_2( groups ); -#endif - XkbFreeKeyboard( pXkbDesc, XkbAllComponentsMask, True ); - } - } -#endif - if( ! m_aKeyboardName.Len() ) - m_aKeyboardName = ""; - } - return m_aKeyboardName.GetBuffer(); -} diff --git a/vcl/unx/source/app/makefile.mk b/vcl/unx/source/app/makefile.mk deleted file mode 100644 index bd7549945c7c..000000000000 --- a/vcl/unx/source/app/makefile.mk +++ /dev/null @@ -1,110 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=salapp -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"!="unx" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"!="unx" - -SLOFILES=\ - $(SLO)$/i18n_cb.obj \ - $(SLO)$/i18n_ic.obj \ - $(SLO)$/i18n_im.obj \ - $(SLO)$/i18n_xkb.obj \ - $(SLO)$/i18n_wrp.obj \ - $(SLO)$/i18n_status.obj \ - $(SLO)$/i18n_keysym.obj \ - $(SLO)$/saldata.obj \ - $(SLO)$/saltimer.obj \ - $(SLO)$/saldisp.obj \ - $(SLO)$/randrwrapper.obj \ - $(SLO)$/salinst.obj \ - $(SLO)$/salsys.obj \ - $(SLO)$/soicon.obj \ - $(SLO)$/sm.obj \ - $(SLO)$/keysymnames.obj \ - $(SLO)$/wmadaptor.obj - -EXCEPTIONSFILES=\ - $(SLO)$/wmadaptor.obj \ - $(SLO)$/saldata.obj \ - $(SLO)$/salinst.obj \ - $(SLO)$/saldisp.obj \ - $(SLO)$/i18n_status.obj \ - $(SLO)$/i18n_cb.obj \ - $(SLO)$/i18n_ic.obj \ - $(SLO)$/salsys.obj - - -.IF "$(ENABLE_RANDR)" != "" -CDEFS+=-DUSE_RANDR -.IF "$(XRANDR_DLOPEN)" == "FALSE" -CDEFS+=$(XRANDR_CFLAGS) -.ELSE -CDEFS+=-DXRANDR_DLOPEN -.ENDIF -.ENDIF - -.IF "$(USE_XINERAMA)" != "NO" -CDEFS+=-DUSE_XINERAMA -.IF "$(USE_XINERAMA_VERSION)" == "Xorg" -CDEFS+=-DUSE_XINERAMA_XORG -.ELIF "$(USE_XINERAMA_VERSION)" == "Xsun" -CDEFS+=-DUSE_XINERAMA_XSUN -.ELSE -# provide sensible default -.IF "$(OS)" != "SOLARIS" -CDEFS+=-DUSE_XINERAMA_XORG -.ELSE -CDEFS+=-DUSE_XINERAMA_XSUN -.ENDIF -.ENDIF -.ENDIF - -.ENDIF # "$(GUIBASE)"!="unx" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk - diff --git a/vcl/unx/source/app/randrwrapper.cxx b/vcl/unx/source/app/randrwrapper.cxx deleted file mode 100644 index 27f9b1d1b77c..000000000000 --- a/vcl/unx/source/app/randrwrapper.cxx +++ /dev/null @@ -1,360 +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. - * - ************************************************************************/ - -#ifdef USE_RANDR - -#include -#include -#include - -#include "osl/module.h" -#include "rtl/ustring.hxx" - -namespace -{ - -# ifdef XRANDR_DLOPEN - -class RandRWrapper -{ - oslModule m_pRandRLib; - - // function pointers - Bool(*m_pXRRQueryExtension)(Display*,int*,int*); - Status(*m_pXRRQueryVersion)(Display*,int*,int*); - XRRScreenConfiguration*(*m_pXRRGetScreenInfo)(Display*,Drawable); - void(*m_pXRRFreeScreenConfigInfo)(XRRScreenConfiguration*); - void(*m_pXRRSelectInput)(Display*,XLIB_Window,int); - int(*m_pXRRUpdateConfiguration)(XEvent*); - XRRScreenSize*(*m_pXRRSizes)(Display*,int,int*); - XRRScreenSize*(*m_pXRRConfigSizes)(XRRScreenConfiguration*,int*); - SizeID(*m_pXRRConfigCurrentConfiguration)(XRRScreenConfiguration*,Rotation*); - int(*m_pXRRRootToScreen)(Display*, XLIB_Window); - - bool m_bValid; - - void initFromModule(); - - RandRWrapper(Display*); - ~RandRWrapper(); -public: - static RandRWrapper& get(Display*); - static void releaseWrapper(); - - Bool XRRQueryExtension(Display* i_pDisp, int* o_event_base, int* o_error_base ) - { - Bool bRet = False; - if( m_bValid ) - bRet = m_pXRRQueryExtension( i_pDisp, o_event_base, o_error_base ); - return bRet; - } - Status XRRQueryVersion( Display* i_pDisp, int* o_major, int* o_minor ) - { - return m_bValid ? m_pXRRQueryVersion( i_pDisp, o_major, o_minor ) : 0; - } - XRRScreenConfiguration* XRRGetScreenInfo( Display* i_pDisp, Drawable i_aDrawable ) - { - return m_bValid ? m_pXRRGetScreenInfo( i_pDisp, i_aDrawable ) : NULL; - } - void XRRFreeScreenConfigInfo( XRRScreenConfiguration* i_pConfig ) - { - if( m_bValid ) - m_pXRRFreeScreenConfigInfo( i_pConfig ); - } - void XRRSelectInput( Display* i_pDisp, XLIB_Window i_window, int i_nMask ) - { - if( m_bValid ) - m_pXRRSelectInput( i_pDisp, i_window, i_nMask ); - } - int XRRUpdateConfiguration( XEvent* i_pEvent ) - { - return m_bValid ? m_pXRRUpdateConfiguration( i_pEvent ) : 0; - } - XRRScreenSize* XRRSizes( Display* i_pDisp, int i_screen, int* o_nscreens ) - { - return m_bValid ? m_pXRRSizes( i_pDisp, i_screen, o_nscreens ) : NULL; - } - XRRScreenSize* XRRConfigSizes( XRRScreenConfiguration* i_pConfig, int* o_nSizes ) - { - return m_bValid ? m_pXRRConfigSizes( i_pConfig, o_nSizes ) : NULL; - } - SizeID XRRConfigCurrentConfiguration( XRRScreenConfiguration* i_pConfig, Rotation* o_pRot ) - { - return m_bValid ? m_pXRRConfigCurrentConfiguration( i_pConfig, o_pRot ) : 0; - } - int XRRRootToScreen( Display *dpy, XLIB_Window root ) - { - return m_bValid ? m_pXRRRootToScreen( dpy, root ) : -1; - } -}; - -void RandRWrapper::initFromModule() -{ - m_pXRRQueryExtension = (Bool(*)(Display*,int*,int*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRQueryExtension" ); - m_pXRRQueryVersion = (Status(*)(Display*,int*,int*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRQueryVersion" ); - m_pXRRGetScreenInfo = (XRRScreenConfiguration*(*)(Display*,Drawable))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRGetScreenInfo" ); - m_pXRRFreeScreenConfigInfo = (void(*)(XRRScreenConfiguration*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRFreeScreenConfigInfo" ); - m_pXRRSelectInput = (void(*)(Display*,XLIB_Window,int))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRSelectInput" ); - m_pXRRUpdateConfiguration = (int(*)(XEvent*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRUpdateConfiguration" ); - m_pXRRSizes = (XRRScreenSize*(*)(Display*,int,int*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRSizes" ); - m_pXRRConfigSizes = (XRRScreenSize*(*)(XRRScreenConfiguration*,int*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRConfigSizes" ); - m_pXRRConfigCurrentConfiguration = (SizeID(*)(XRRScreenConfiguration*,Rotation*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRConfigCurrentConfiguration" ); - m_pXRRRootToScreen = (int(*)(Display*,XLIB_Window))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRRootToScreen" ); - - m_bValid = m_pXRRQueryExtension && - m_pXRRQueryVersion && - m_pXRRGetScreenInfo && - m_pXRRFreeScreenConfigInfo && - m_pXRRSelectInput && - m_pXRRUpdateConfiguration && - m_pXRRSizes && - m_pXRRConfigSizes && - m_pXRRConfigCurrentConfiguration && - m_pXRRRootToScreen - ; -} - -RandRWrapper::RandRWrapper( Display* pDisplay ) : - m_pRandRLib( NULL ), - m_pXRRQueryExtension( NULL ), - m_pXRRQueryVersion( NULL ), - m_pXRRGetScreenInfo( NULL ), - m_pXRRFreeScreenConfigInfo( NULL ), - m_pXRRSelectInput( NULL ), - m_pXRRUpdateConfiguration( NULL ), - m_pXRRSizes( NULL ), - m_pXRRConfigSizes( NULL ), - m_pXRRConfigCurrentConfiguration( NULL ), - m_pXRRRootToScreen( NULL ), - m_bValid( false ) -{ - // first try in process space (e.g. gtk links that ?) - initFromModule(); - if( ! m_bValid ) - { - rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libXrandr.so.2" ) ); - // load and resolve dependencies immediately - // rationale: there are older distributions where libXrandr.so.2 is not linked - // with libXext.so, resulting in a missing symbol and terminating the office - // obviously they expected libXext to be linked in global symbolspace (that is - // linked by the application), which is not the case with us (because we want - // to be able to run in headless mode even without an installed X11 library) - m_pRandRLib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_DEFAULT | SAL_LOADMODULE_NOW ); - initFromModule(); - } - if( m_bValid ) - { - int nEventBase = 0, nErrorBase = 0; - if( ! m_pXRRQueryExtension( pDisplay, &nEventBase, &nErrorBase ) ) - m_bValid = false; - } -} - -RandRWrapper::~RandRWrapper() -{ - if( m_pRandRLib ) - osl_unloadModule( m_pRandRLib ); -} - -static RandRWrapper* pWrapper = NULL; - -RandRWrapper& RandRWrapper::get( Display* i_pDisplay ) -{ - if( ! pWrapper ) - pWrapper = new RandRWrapper( i_pDisplay ); - return *pWrapper; -} - -void RandRWrapper::releaseWrapper() -{ - delete pWrapper; - pWrapper = NULL; -} - -# else - -class RandRWrapper -{ - bool m_bValid; - - RandRWrapper(Display*); -public: - static RandRWrapper& get(Display*); - static void releaseWrapper(); - - Bool XRRQueryExtension(Display* i_pDisp, int* o_event_base, int* o_error_base ) - { - Bool bRet = False; - if( m_bValid ) - bRet = ::XRRQueryExtension( i_pDisp, o_event_base, o_error_base ); - return bRet; - } - Status XRRQueryVersion( Display* i_pDisp, int* o_major, int* o_minor ) - { - return m_bValid ? ::XRRQueryVersion( i_pDisp, o_major, o_minor ) : 0; - } - XRRScreenConfiguration* XRRGetScreenInfo( Display* i_pDisp, Drawable i_aDrawable ) - { - return m_bValid ? ::XRRGetScreenInfo( i_pDisp, i_aDrawable ) : NULL; - } - void XRRFreeScreenConfigInfo( XRRScreenConfiguration* i_pConfig ) - { - if( m_bValid ) - ::XRRFreeScreenConfigInfo( i_pConfig ); - } - void XRRSelectInput( Display* i_pDisp, XLIB_Window i_window, int i_nMask ) - { - if( m_bValid ) - ::XRRSelectInput( i_pDisp, i_window, i_nMask ); - } - int XRRUpdateConfiguration( XEvent* i_pEvent ) - { - return m_bValid ? ::XRRUpdateConfiguration( i_pEvent ) : 0; - } - XRRScreenSize* XRRSizes( Display* i_pDisp, int i_screen, int* o_nscreens ) - { - return m_bValid ? ::XRRSizes( i_pDisp, i_screen, o_nscreens ) : NULL; - } - XRRScreenSize* XRRConfigSizes( XRRScreenConfiguration* i_pConfig, int* o_nSizes ) - { - return m_bValid ? ::XRRConfigSizes( i_pConfig, o_nSizes ) : NULL; - } - SizeID XRRConfigCurrentConfiguration( XRRScreenConfiguration* i_pConfig, Rotation* o_pRot ) - { - return m_bValid ? ::XRRConfigCurrentConfiguration( i_pConfig, o_pRot ) : 0; - } - int XRRRootToScreen( Display *dpy, XLIB_Window root ) - { - return m_bValid ? ::XRRRootToScreen( dpy, root ) : -1; - } -}; - -RandRWrapper::RandRWrapper( Display* pDisplay ) : - m_bValid( true ) -{ - int nEventBase = 0, nErrorBase = 0; - if( !XRRQueryExtension( pDisplay, &nEventBase, &nErrorBase ) ) - m_bValid = false; -} - -static RandRWrapper* pWrapper = NULL; - -RandRWrapper& RandRWrapper::get( Display* i_pDisplay ) -{ - if( ! pWrapper ) - pWrapper = new RandRWrapper( i_pDisplay ); - return *pWrapper; -} - -void RandRWrapper::releaseWrapper() -{ - delete pWrapper; - pWrapper = NULL; -} - -#endif - -} // namespace - -#endif - -#include "saldisp.hxx" -#include "salframe.h" -#if OSL_DEBUG_LEVEL > 1 -#include -#endif - -void SalDisplay::InitRandR( XLIB_Window aRoot ) const -{ - #ifdef USE_RANDR - if( m_bUseRandRWrapper ) - RandRWrapper::get( GetDisplay() ).XRRSelectInput( GetDisplay(), aRoot, RRScreenChangeNotifyMask ); - #else - (void)aRoot; - #endif -} - -void SalDisplay::DeInitRandR() -{ - #ifdef USE_RANDR - if( m_bUseRandRWrapper ) - RandRWrapper::releaseWrapper(); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "SalDisplay::DeInitRandR()\n" ); -#endif - #endif -} - -int SalDisplay::processRandREvent( XEvent* pEvent ) -{ - int nRet = 0; - #ifdef USE_RANDR - XConfigureEvent* pCnfEvent=(XConfigureEvent*)pEvent; - if( m_bUseRandRWrapper && pWrapper && pWrapper->XRRRootToScreen(GetDisplay(),pCnfEvent->window) != -1 ) - { - nRet = pWrapper->XRRUpdateConfiguration( pEvent ); - if( nRet == 1 && pEvent->type != ConfigureNotify) // this should then be a XRRScreenChangeNotifyEvent - { - // update screens - bool bNotify = false; - for( size_t i = 0; i < m_aScreens.size(); i++ ) - { - if( m_aScreens[i].m_bInit ) - { - XRRScreenConfiguration *pConfig = NULL; - XRRScreenSize *pSizes = NULL; - int nSizes = 0; - Rotation nRot = 0; - SizeID nId = 0; - - pConfig = pWrapper->XRRGetScreenInfo( GetDisplay(), m_aScreens[i].m_aRoot ); - nId = pWrapper->XRRConfigCurrentConfiguration( pConfig, &nRot ); - pSizes = pWrapper->XRRConfigSizes( pConfig, &nSizes ); - XRRScreenSize *pTargetSize = pSizes + nId; - - bNotify = bNotify || - m_aScreens[i].m_aSize.Width() != pTargetSize->width || - m_aScreens[i].m_aSize.Height() != pTargetSize->height; - - m_aScreens[i].m_aSize = Size( pTargetSize->width, pTargetSize->height ); - - pWrapper->XRRFreeScreenConfigInfo( pConfig ); - - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "screen %d changed to size %dx%d\n", (int)i, (int)pTargetSize->width, (int)pTargetSize->height ); - #endif - } - } - if( bNotify && ! m_aFrames.empty() ) - m_aFrames.front()->CallCallback( SALEVENT_DISPLAYCHANGED, 0 ); - } - } - #else - (void)pEvent; - #endif - return nRet; -} diff --git a/vcl/unx/source/app/saldata.cxx b/vcl/unx/source/app/saldata.cxx deleted file mode 100644 index beb7b60a551c..000000000000 --- a/vcl/unx/source/app/saldata.cxx +++ /dev/null @@ -1,869 +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_vcl.hxx" - -#ifdef USE_XTOOLKIT -# define SAL_XT -#endif - -// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -#include -#include - -#include -#include -#include -#include // snprintf, seems not to be in namespace std on every platform -#include -#include -#include -#include -#ifdef SUN -#include -#endif -#ifdef AIX -#include -#endif -#ifdef FREEBSD -#include -#include -#include -#endif -#include -#ifndef _VOS_MUTEX_HXX -#include -#endif - -#include "Xproto.h" -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef _RTL_BOOTSTRAP_HXX -#include -#endif - -#include -#include -#include -#include "i18n_im.hxx" -#include "i18n_xkb.hxx" - -// -=-= -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#ifndef UNX -#ifndef SIGBUS -#define SIGBUS 10 -#endif -#ifndef SIGSEGV -#define SIGSEGV 11 -#endif -#ifndef SIGIOT -#define SIGIOT SIGABRT -#endif -#endif - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -static const struct timeval noyield__ = { 0, 0 }; -static const struct timeval yield__ = { 0, 10000 }; - -static const char* XRequest[] = { - // see /usr/lib/X11/XErrorDB, /usr/openwin/lib/XErrorDB ... - NULL, - "X_CreateWindow", - "X_ChangeWindowAttributes", - "X_GetWindowAttributes", - "X_DestroyWindow", - "X_DestroySubwindows", - "X_ChangeSaveSet", - "X_ReparentWindow", - "X_MapWindow", - "X_MapSubwindows", - "X_UnmapWindow", - "X_UnmapSubwindows", - "X_ConfigureWindow", - "X_CirculateWindow", - "X_GetGeometry", - "X_QueryTree", - "X_InternAtom", - "X_GetAtomName", - "X_ChangeProperty", - "X_DeleteProperty", - "X_GetProperty", - "X_ListProperties", - "X_SetSelectionOwner", - "X_GetSelectionOwner", - "X_ConvertSelection", - "X_SendEvent", - "X_GrabPointer", - "X_UngrabPointer", - "X_GrabButton", - "X_UngrabButton", - "X_ChangeActivePointerGrab", - "X_GrabKeyboard", - "X_UngrabKeyboard", - "X_GrabKey", - "X_UngrabKey", - "X_AllowEvents", - "X_GrabServer", - "X_UngrabServer", - "X_QueryPointer", - "X_GetMotionEvents", - "X_TranslateCoords", - "X_WarpPointer", - "X_SetInputFocus", - "X_GetInputFocus", - "X_QueryKeymap", - "X_OpenFont", - "X_CloseFont", - "X_QueryFont", - "X_QueryTextExtents", - "X_ListFonts", - "X_ListFontsWithInfo", - "X_SetFontPath", - "X_GetFontPath", - "X_CreatePixmap", - "X_FreePixmap", - "X_CreateGC", - "X_ChangeGC", - "X_CopyGC", - "X_SetDashes", - "X_SetClipRectangles", - "X_FreeGC", - "X_ClearArea", - "X_CopyArea", - "X_CopyPlane", - "X_PolyPoint", - "X_PolyLine", - "X_PolySegment", - "X_PolyRectangle", - "X_PolyArc", - "X_FillPoly", - "X_PolyFillRectangle", - "X_PolyFillArc", - "X_PutImage", - "X_GetImage", - "X_PolyText8", - "X_PolyText16", - "X_ImageText8", - "X_ImageText16", - "X_CreateColormap", - "X_FreeColormap", - "X_CopyColormapAndFree", - "X_InstallColormap", - "X_UninstallColormap", - "X_ListInstalledColormaps", - "X_AllocColor", - "X_AllocNamedColor", - "X_AllocColorCells", - "X_AllocColorPlanes", - "X_FreeColors", - "X_StoreColors", - "X_StoreNamedColor", - "X_QueryColors", - "X_LookupColor", - "X_CreateCursor", - "X_CreateGlyphCursor", - "X_FreeCursor", - "X_RecolorCursor", - "X_QueryBestSize", - "X_QueryExtension", - "X_ListExtensions", - "X_ChangeKeyboardMapping", - "X_GetKeyboardMapping", - "X_ChangeKeyboardControl", - "X_GetKeyboardControl", - "X_Bell", - "X_ChangePointerControl", - "X_GetPointerControl", - "X_SetScreenSaver", - "X_GetScreenSaver", - "X_ChangeHosts", - "X_ListHosts", - "X_SetAccessControl", - "X_SetCloseDownMode", - "X_KillClient", - "X_RotateProperties", - "X_ForceScreenSaver", - "X_SetPointerMapping", - "X_GetPointerMapping", - "X_SetModifierMapping", - "X_GetModifierMapping", - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - "X_NoOperation" -}; - -// -=-= C statics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -int X11SalData::XErrorHdl( Display *pDisplay, XErrorEvent *pEvent ) -{ - GetX11SalData()->XError( pDisplay, pEvent ); - return 0; -} - -int X11SalData::XIOErrorHdl( Display * ) -{ - /* #106197# hack: until a real shutdown procedure exists - * _exit ASAP - */ - if( ImplGetSVData()->maAppData.mbAppQuit ) - _exit(1); - - // really bad hack - if( ! SessionManagerClient::checkDocumentsSaved() ) - /* oslSignalAction eToDo = */ osl_raiseSignal (OSL_SIGNAL_USER_X11SUBSYSTEMERROR, NULL); - - std::fprintf( stderr, "X IO Error\n" ); - std::fflush( stdout ); - std::fflush( stderr ); - - /* #106197# the same reasons to use _exit instead of exit in salmain - * do apply here. Since there is nothing to be done after an XIO - * error we have to _exit immediately. - */ - _exit(0); - return 0; -} - -// -=-= SalData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#include - -X11SalData::X11SalData() -{ - bNoExceptions_ = !!getenv( "SAL_NOSEGV" ); - - pXLib_ = NULL; - m_pSalDisplay = NULL; - m_pInstance = NULL; - m_pPlugin = NULL; - - hMainThread_ = pthread_self(); - osl_getLocalHostname( &maLocalHostName.pData ); -} - -X11SalData::~X11SalData() -{ - DeleteDisplay(); -} - -void X11SalData::DeleteDisplay() -{ - delete m_pSalDisplay; - m_pSalDisplay = NULL; - delete pXLib_; - pXLib_ = NULL; -} - -void X11SalData::Init() -{ - pXLib_ = new SalXLib(); - pXLib_->Init(); -} - -void X11SalData::initNWF( void ) -{ -} - -void X11SalData::deInitNWF( void ) -{ -} - -// -=-= SalXLib =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -SalXLib::SalXLib() -{ - m_aTimeout.tv_sec = 0; - m_aTimeout.tv_usec = 0; - m_nTimeoutMS = 0; - - nFDs_ = 0; - FD_ZERO( &aReadFDS_ ); - FD_ZERO( &aExceptionFDS_ ); - - m_pTimeoutFDS[0] = m_pTimeoutFDS[1] = -1; - if (pipe (m_pTimeoutFDS) != -1) - { - // initialize 'wakeup' pipe. - int flags; - - // set close-on-exec descriptor flag. - if ((flags = fcntl (m_pTimeoutFDS[0], F_GETFD)) != -1) - { - flags |= FD_CLOEXEC; - fcntl (m_pTimeoutFDS[0], F_SETFD, flags); - } - if ((flags = fcntl (m_pTimeoutFDS[1], F_GETFD)) != -1) - { - flags |= FD_CLOEXEC; - fcntl (m_pTimeoutFDS[1], F_SETFD, flags); - } - - // set non-blocking I/O flag. - if ((flags = fcntl (m_pTimeoutFDS[0], F_GETFL)) != -1) - { - flags |= O_NONBLOCK; - fcntl (m_pTimeoutFDS[0], F_SETFL, flags); - } - if ((flags = fcntl (m_pTimeoutFDS[1], F_GETFL)) != -1) - { - flags |= O_NONBLOCK; - fcntl (m_pTimeoutFDS[1], F_SETFL, flags); - } - - // insert [0] into read descriptor set. - FD_SET( m_pTimeoutFDS[0], &aReadFDS_ ); - nFDs_ = m_pTimeoutFDS[0] + 1; - } - - m_bHaveSystemChildFrames = false; - m_aOrigXIOErrorHandler = XSetIOErrorHandler ( (XIOErrorHandler)X11SalData::XIOErrorHdl ); - PushXErrorLevel( !!getenv( "SAL_IGNOREXERRORS" ) ); -} - -SalXLib::~SalXLib() -{ - // close 'wakeup' pipe. - close (m_pTimeoutFDS[0]); - close (m_pTimeoutFDS[1]); - - PopXErrorLevel(); - XSetIOErrorHandler (m_aOrigXIOErrorHandler); -} - -void SalXLib::PushXErrorLevel( bool bIgnore ) -{ - m_aXErrorHandlerStack.push_back( XErrorStackEntry() ); - XErrorStackEntry& rEnt = m_aXErrorHandlerStack.back(); - rEnt.m_bWas = false; - rEnt.m_bIgnore = bIgnore; - rEnt.m_nLastErrorRequest = 0; - rEnt.m_aHandler = XSetErrorHandler( (XErrorHandler)X11SalData::XErrorHdl ); -} - -void SalXLib::PopXErrorLevel() -{ - if( m_aXErrorHandlerStack.size() ) - { - XSetErrorHandler( m_aXErrorHandlerStack.back().m_aHandler ); - m_aXErrorHandlerStack.pop_back(); - } -} - -void SalXLib::Init() -{ - SalI18N_InputMethod* pInputMethod = new SalI18N_InputMethod; - pInputMethod->SetLocale(); - XrmInitialize(); - - /* - * open connection to X11 Display - * try in this order: - * o -display command line parameter, - * o $DISPLAY environment variable - * o default display - */ - - Display *pDisp = NULL; - - // is there a -display command line parameter? - vos::OExtCommandLine aCommandLine; - sal_uInt32 nParams = aCommandLine.getCommandArgCount(); - rtl::OUString aParam; - rtl::OString aDisplay; - for (USHORT i=0; iCreateMethod( pDisp ); - pInputMethod->AddConnectionWatch( pDisp, (void*)this ); - pSalDisplay->SetInputMethod( pInputMethod ); - - PushXErrorLevel( true ); - SalI18N_KeyboardExtension *pKbdExtension = new SalI18N_KeyboardExtension( pDisp ); - XSync( pDisp, False ); - - pKbdExtension->UseExtension( ! HasXErrorOccured() ); - PopXErrorLevel(); - - pSalDisplay->SetKbdExtension( pKbdExtension ); -} - -extern "C" { -void EmitFontpathWarning( void ) -{ - static Bool bOnce = False; - if ( !bOnce ) - { - bOnce = True; - std::fprintf( stderr, "Please verify your fontpath settings\n" - "\t(See \"man xset\" for details" - " or ask your system administrator)\n" ); - } -} - -} /* extern "C" */ - -static void PrintXError( Display *pDisplay, XErrorEvent *pEvent ) -{ - char msg[ 120 ] = ""; -#if ! ( defined LINUX && defined PPC ) - XGetErrorText( pDisplay, pEvent->error_code, msg, sizeof( msg ) ); -#endif - std::fprintf( stderr, "X-Error: %s\n", msg ); - if( pEvent->request_code < capacityof( XRequest ) ) - { - const char* pName = XRequest[pEvent->request_code]; - if( !pName ) - pName = "BadRequest?"; - std::fprintf( stderr, "\tMajor opcode: %d (%s)\n", pEvent->request_code, pName ); - } - else - { - std::fprintf( stderr, "\tMajor opcode: %d\n", pEvent->request_code ); - // TODO: also display extension name? - std::fprintf( stderr, "\tMinor opcode: %d\n", pEvent->minor_code ); - } - - std::fprintf( stderr, "\tResource ID: 0x%lx\n", - pEvent->resourceid ); - std::fprintf( stderr, "\tSerial No: %ld (%ld)\n", - pEvent->serial, LastKnownRequestProcessed(pDisplay) ); - - if( !getenv( "SAL_SYNCHRONIZE" ) ) - { - std::fprintf( stderr, "These errors are reported asynchronously,\n"); - std::fprintf( stderr, "set environment variable SAL_SYNCHRONIZE to 1 to help debugging\n"); - } - - std::fflush( stdout ); - std::fflush( stderr ); -} - -void SalXLib::XError( Display *pDisplay, XErrorEvent *pEvent ) -{ - if( m_bHaveSystemChildFrames ) - return; - - if( ! m_aXErrorHandlerStack.back().m_bIgnore ) - { - if ( (pEvent->error_code == BadAlloc) - && (pEvent->request_code == X_OpenFont) ) - { - static Bool bOnce = False; - if ( !bOnce ) - { - std::fprintf(stderr, "X-Error occured in a request for X_OpenFont\n"); - EmitFontpathWarning(); - - bOnce = True ; - } - return; - } - /* ignore - * X_SetInputFocus: it's a hint only anyway - * X_GetProperty: this is part of the XGetWindowProperty call and will - * be handled by the return value of that function - */ - else if( pEvent->request_code == X_SetInputFocus || - pEvent->request_code == X_GetProperty - ) - return; - - - if( pDisplay != GetX11SalData()->GetDisplay()->GetDisplay() ) - return; - - PrintXError( pDisplay, pEvent ); - - oslSignalAction eToDo = osl_raiseSignal (OSL_SIGNAL_USER_X11SUBSYSTEMERROR, NULL); - switch (eToDo) - { - case osl_Signal_ActIgnore : - return; - case osl_Signal_ActAbortApp : - abort(); - case osl_Signal_ActKillApp : - exit(0); - case osl_Signal_ActCallNextHdl : - break; - default : - break; - } - - } - - m_aXErrorHandlerStack.back().m_bWas = true; -} - -struct YieldEntry -{ - YieldEntry* next; // pointer to next entry - int fd; // file descriptor for reading - void* data; // data for predicate and callback - YieldFunc pending; // predicate (determins pending events) - YieldFunc queued; // read and queue up events - YieldFunc handle; // handle pending events - - inline int HasPendingEvent() const { return pending( fd, data ); } - inline int IsEventQueued() const { return queued( fd, data ); } - inline void HandleNextEvent() const { handle( fd, data ); } -}; - -#define MAX_NUM_DESCRIPTORS 128 - -static YieldEntry yieldTable[ MAX_NUM_DESCRIPTORS ]; - -void SalXLib::Insert( int nFD, void* data, - YieldFunc pending, - YieldFunc queued, - YieldFunc handle ) -{ - DBG_ASSERT( nFD, "can not insert stdin descriptor" ); - DBG_ASSERT( !yieldTable[nFD].fd, "SalXLib::Insert fd twice" ); - - yieldTable[nFD].fd = nFD; - yieldTable[nFD].data = data; - yieldTable[nFD].pending = pending; - yieldTable[nFD].queued = queued; - yieldTable[nFD].handle = handle; - - FD_SET( nFD, &aReadFDS_ ); - FD_SET( nFD, &aExceptionFDS_ ); - - if( nFD >= nFDs_ ) - nFDs_ = nFD + 1; -} - -void SalXLib::Remove( int nFD ) -{ - FD_CLR( nFD, &aReadFDS_ ); - FD_CLR( nFD, &aExceptionFDS_ ); - - yieldTable[nFD].fd = 0; - - if ( nFD == nFDs_ ) - { - for ( nFD = nFDs_ - 1; - nFD >= 0 && !yieldTable[nFD].fd; - nFD-- ) ; - - nFDs_ = nFD + 1; - } -} - -bool SalXLib::CheckTimeout( bool bExecuteTimers ) -{ - bool bRet = false; - if( m_aTimeout.tv_sec ) // timer is started - { - timeval aTimeOfDay; - gettimeofday( &aTimeOfDay, 0 ); - if( aTimeOfDay >= m_aTimeout ) - { - bRet = true; - if( bExecuteTimers ) - { - // timed out, update timeout - m_aTimeout = aTimeOfDay; - /* - * #107827# autorestart immediately, will be stopped (or set - * to different value in notify hdl if necessary; - * CheckTimeout should return false while - * timers are being dispatched. - */ - m_aTimeout += m_nTimeoutMS; - // notify - GetX11SalData()->Timeout(); - } - } - } - return bRet; -} - -void SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents ) -{ - // check for timeouts here if you want to make screenshots - static char* p_prioritize_timer = getenv ("SAL_HIGHPRIORITY_REPAINT"); - if (p_prioritize_timer != NULL) - CheckTimeout(); - - // first, check for already queued events. - for ( int nFD = 0; nFD < nFDs_; nFD++ ) - { - YieldEntry* pEntry = &(yieldTable[nFD]); - if ( pEntry->fd ) - { - DBG_ASSERT( nFD == pEntry->fd, "wrong fd in Yield()" ); - if ( pEntry->HasPendingEvent() ) - { - pEntry->HandleNextEvent(); - // #63862# da jetzt alle user-events ueber die interne - // queue kommen, wird die Kontrolle analog zum select - // gesteuerten Zweig einmal bei bWait abgegeben - - /* #i9277# do not reschedule since performance gets down the - the drain under heavy load - YieldMutexReleaser aReleaser; - if ( bWait ) osl_yieldThread(); - */ - - return; - } - } - } - - // next, select with or without timeout according to bWait. - int nFDs = nFDs_; - fd_set ReadFDS = aReadFDS_; - fd_set ExceptionFDS = aExceptionFDS_; - int nFound = 0; - - timeval Timeout = noyield__; - timeval *pTimeout = &Timeout; - - if (bWait) - { - pTimeout = 0; - if (m_aTimeout.tv_sec) // Timer is started. - { - // determine remaining timeout. - gettimeofday (&Timeout, 0); - Timeout = m_aTimeout - Timeout; - if (yield__ >= Timeout) - { - // guard against micro timeout. - Timeout = yield__; - } - pTimeout = &Timeout; - } - } - - { - // release YieldMutex (and re-acquire at block end) - YieldMutexReleaser aReleaser; - nFound = select( nFDs, &ReadFDS, NULL, &ExceptionFDS, pTimeout ); - } - if( nFound < 0 ) // error - { -#ifdef DBG_UTIL - std::fprintf( stderr, "SalXLib::Yield e=%d f=%d\n", errno, nFound ); -#endif - if( EINTR == errno ) - { - errno = 0; - } - } - - // usually handle timeouts here (as in 5.2) - if (p_prioritize_timer == NULL) - CheckTimeout(); - - // handle wakeup events. - if ((nFound > 0) && (FD_ISSET(m_pTimeoutFDS[0], &ReadFDS))) - { - int buffer; - while (read (m_pTimeoutFDS[0], &buffer, sizeof(buffer)) > 0) - continue; - nFound -= 1; - } - - // handle other events. - if( nFound > 0 ) - { - // now we are in the protected section ! - // recall select if we have acquired fd's, ready for reading, - - struct timeval noTimeout = { 0, 0 }; - nFound = select( nFDs_, &ReadFDS, NULL, - &ExceptionFDS, &noTimeout ); - - // someone-else has done the job for us - if (nFound == 0) - return; - - for ( int nFD = 0; nFD < nFDs_; nFD++ ) - { - YieldEntry* pEntry = &(yieldTable[nFD]); - if ( pEntry->fd ) - { - if ( FD_ISSET( nFD, &ExceptionFDS ) ) { -#if OSL_DEBUG_LEVEL > 1 - std::fprintf( stderr, "SalXLib::Yield exception\n" ); -#endif - nFound--; - } - if ( FD_ISSET( nFD, &ReadFDS ) ) - { - int nMaxEvents = bHandleAllCurrentEvents ? 100 : 1; - for( int i = 0; pEntry->IsEventQueued() && i < nMaxEvents; i++ ) - { - pEntry->HandleNextEvent(); - // if a recursive call has done the job - // so abort here - } - nFound--; - } - } - } - } -} - -void SalXLib::Wakeup() -{ - write (m_pTimeoutFDS[1], "", 1); -} - -void SalXLib::PostUserEvent() -{ - Wakeup(); -} - -const char* X11SalData::getFrameResName() -{ - /* according to ICCCM: - * first search command line for -name parameter - * then try RESOURCE_NAME environment variable - * then use argv[0] stripped by directories - */ - static rtl::OStringBuffer aResName; - if( !aResName.getLength() ) - { - int nArgs = osl_getCommandArgCount(); - for( int n = 0; n < nArgs-1; n++ ) - { - rtl::OUString aArg; - if( ! osl_getCommandArg( n, &aArg.pData ) && - aArg.equalsIgnoreAsciiCaseAscii( "-name" ) && - ! osl_getCommandArg( n+1, &aArg.pData ) ) - { - aResName.append( rtl::OUStringToOString( aArg, osl_getThreadTextEncoding() ) ); - break; - } - } - if( !aResName.getLength() ) - { - const char* pEnv = getenv( "RESOURCE_NAME" ); - if( pEnv && *pEnv ) - aResName.append( pEnv ); - } - if( !aResName.getLength() ) - aResName.append( "VCLSalFrame" ); - } - return aResName.getStr(); -} - -const char* X11SalData::getFrameClassName() -{ - static rtl::OStringBuffer aClassName; - if( !aClassName.getLength() ) - { - rtl::OUString aIni, aProduct; - rtl::Bootstrap::get( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BRAND_BASE_DIR" ) ), aIni ); - aIni += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/program/" SAL_CONFIGFILE( "bootstrap" ) ) ); - rtl::Bootstrap aBootstrap( aIni ); - aBootstrap.getFrom( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ProductKey" ) ), aProduct ); - - if( aProduct.getLength() ) - aClassName.append( rtl::OUStringToOString( aProduct, osl_getThreadTextEncoding() ) ); - else - aClassName.append( "VCLSalFrame" ); - } - return aClassName.getStr(); -} - -rtl::OString X11SalData::getFrameResName( SalExtStyle nStyle ) -{ - rtl::OStringBuffer aBuf( 64 ); - aBuf.append( getFrameResName() ); - if( (nStyle & SAL_FRAME_EXT_STYLE_DOCUMENT) ) - aBuf.append( ".DocumentWindow" ); - - return aBuf.makeStringAndClear(); -} diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx deleted file mode 100644 index 92d5f75f7315..000000000000 --- a/vcl/unx/source/app/saldisp.cxx +++ /dev/null @@ -1,3435 +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_vcl.hxx" - -#define SAL_XT - -// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(SOLARIS) -#include -#include -#endif - -#include -#include -#include "salcursors.h" -#include "invert50.h" -#ifdef SOLARIS -#define XK_KOREAN -#endif -#include - -#include - -#ifdef USE_XINERAMA -#ifdef USE_XINERAMA_XORG -#include -#elif defined USE_XINERAMA_XSUN -#if defined(SOLARIS) && defined(INTEL) // missing extension header in standard installation -#define MAXFRAMEBUFFERS 16 -Bool XineramaGetState(Display*, int); -Status XineramaGetInfo(Display*, int, XRectangle*, unsigned char*, int*); -#else -#include -#endif -#else -#error USE_XINERAMA but no xinerama version -#endif -#endif - -#include - -#include -#include -#include "i18n_im.hxx" -#include "i18n_xkb.hxx" -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef _OSL_THREADMUTEX_H_ -#include -#endif -#include -#include -#include -#include - -#include -#include - -using namespace rtl; -using namespace vcl_sal; - -// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#define PSEUDOCOLOR12 -#define PSEUDOCOLOR8 -#define TRUECOLOR24 -#define TRUECOLOR16 -#define TRUECOLOR15 -#define TRUECOLOR12 -#define TRUECOLOR8 - -#define SALCOLOR_WHITE MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF ) -#define SALCOLOR_BLACK MAKE_SALCOLOR( 0x00, 0x00, 0x00 ) - -// -=-= Prototyps =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-= static variables -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -static const char* const VisualClassName[] = { - "StaticGray", - "GrayScale", - "StaticColor", - "PseudoColor", - "TrueColor", - "DirectColor" -}; - -static const char* const EventNames[] = -{ - NULL, - NULL, - "KeyPress", - "KeyRelease", - "ButtonPress", - "ButtonRelease", - "MotionNotify", - "EnterNotify", - "LeaveNotify", - "FocusIn", - "FocusOut", - "KeymapNotify", - "Expose", - "GraphicsExpose", - "NoExpose", - "VisibilityNotify", - "CreateNotify", - "DestroyNotify", - "UnmapNotify", - "MapNotify", - "MapRequest", - "ReparentNotify", - "ConfigureNotify", - "ConfigureRequest", - "GravityNotify", - "ResizeRequest", - "CirculateNotify", - "CirculateRequest", - "PropertyNotify", - "SelectionClear", - "SelectionRequest", - "SelectionNotify", - "ColormapNotify", - "ClientMessage", - "MappingNotify" -}; - -// -=-= global inline =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -inline const char *Null( const char *p ) { return p ? p : ""; } -inline const char *GetEnv( const char *p ) { return Null( getenv( p ) ); } -inline const char *KeyStr( KeySym n ) { return Null( XKeysymToString( n ) ); } - -inline const char *GetAtomName( Display *d, Atom a ) -{ return Null( XGetAtomName( d, a ) ); } - -inline double Hypothenuse( long w, long h ) -{ return sqrt( (double)((w*w)+(h*h)) ); } - -inline int ColorDiff( int r, int g, int b ) -{ return (r*r)+(g*g)+(b*b); } - -inline int ColorDiff( SalColor c1, int r, int g, int b ) -{ return ColorDiff( (int)SALCOLOR_RED (c1)-r, - (int)SALCOLOR_GREEN(c1)-g, - (int)SALCOLOR_BLUE (c1)-b ); } - -// -=-= global functions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -static int sal_Shift( Pixel nMask ) -{ - int i = 24; - if( nMask < 0x00010000 ) { nMask <<= 16; i -= 16; } - if( nMask < 0x01000000 ) { nMask <<= 8; i -= 8; } - if( nMask < 0x10000000 ) { nMask <<= 4; i -= 4; } - if( nMask < 0x40000000 ) { nMask <<= 2; i -= 2; } - if( nMask < 0x80000000 ) { nMask <<= 1; i -= 1; } - return i; -} - -static int sal_significantBits( Pixel nMask ) -{ - int nRotate = sizeof(Pixel)*4; - int nBits = 0; - while( nRotate-- ) - { - if( nMask & 1 ) - nBits++; - nMask >>= 1; - } - return nBits; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -static BOOL sal_GetVisualInfo( Display *pDisplay, XID nVID, XVisualInfo &rVI ) -{ - int nInfos; - XVisualInfo aTemplate; - XVisualInfo*pInfos; - - aTemplate.visualid = nVID; - - pInfos = XGetVisualInfo( pDisplay, VisualIDMask, &aTemplate, &nInfos ); - if( !pInfos ) - return FALSE; - - rVI = *pInfos; - XFree( pInfos ); - - DBG_ASSERT( rVI.visualid == nVID, - "sal_GetVisualInfo: could not get correct visual by visualId" ); - return TRUE; -} - -// --------------------------------------------------------------------------- - -// check wether displaystring is in format N.M or N. or just N -// with N and M beeing natural numbers -static BOOL -sal_IsDisplayNumber( const char *pDisplayString ) -{ - if ( ! isdigit(*pDisplayString) ) - return FALSE; - while ( isdigit(*(++pDisplayString)) ) - ; /* do nothing */ - - if ( *pDisplayString == '.' ) - { - while ( isdigit(*(++pDisplayString)) ) - ; /* do nothing */ - } - - return (*pDisplayString == '\0'); -} - -// check whether host1 and host2 point to the same ip address -static BOOL -sal_EqualHosts( const OUString& Host1, const OUString& Host2) -{ - oslSocketAddr pHostAddr1; - oslSocketAddr pHostAddr2; - BOOL bEqualAddress = FALSE; - - if ( Host1.toChar() >= '0' && Host1.toChar() <= '9' ) - pHostAddr1 = osl_createInetSocketAddr( Host1.pData, 0 ); - else - pHostAddr1 = osl_resolveHostname( Host1.pData ); - - if ( Host2.toChar() >= '0' && Host2.toChar() <= '9' ) - pHostAddr2 = osl_createInetSocketAddr( Host2.pData, 0 ); - else - pHostAddr2 = osl_resolveHostname( Host2.pData ); - - if( pHostAddr1 && pHostAddr2 ) - bEqualAddress = osl_isEqualSocketAddr( pHostAddr1, pHostAddr2 ) ? TRUE : FALSE; - - if( pHostAddr1 ) - osl_destroySocketAddr( pHostAddr1 ); - if( pHostAddr2 ) - osl_destroySocketAddr( pHostAddr2 ); - - return bEqualAddress; -} - -static BOOL -sal_IsLocalDisplay( Display *pDisplay ) -{ - const char *pDisplayString = DisplayString( pDisplay ); - - // no string, no idea - if ( pDisplayString == NULL || pDisplayString[ 0 ] == '\0') - return FALSE; - - // check for ":x.y" - if ( pDisplayString[ 0 ] == ':' ) - return sal_IsDisplayNumber( pDisplayString + 1 ); - - // check for fixed token which all mean localhost:x.y - const char pLocal[] = "localhost:"; - const int nLocalLen = sizeof(pLocal) - 1; - if ( strncmp(pDisplayString, pLocal, nLocalLen) == 0 ) - return sal_IsDisplayNumber( pDisplayString + nLocalLen ); - - const char pUnix[] = "unix:"; - const int nUnixLen = sizeof(pUnix) - 1; - if ( strncmp(pDisplayString, pUnix, nUnixLen) == 0 ) - return sal_IsDisplayNumber( pDisplayString + nUnixLen ); - - const char pLoopback[] = "127.0.0.1:"; - const int nLoopbackLen= sizeof(pLoopback) - 1; - if ( strncmp(pDisplayString, pLoopback, nLoopbackLen) == 0 ) - return sal_IsDisplayNumber( pDisplayString + nLoopbackLen ); - - // compare local hostname to displaystring, both may be ip address or - // hostname - BOOL bEqual = FALSE; - char *pDisplayHost = strdup( pDisplayString ); - char *pPtr = strrchr( pDisplayHost, ':' ); - - if( pPtr != NULL ) - { - const OUString& rLocalHostname( GetX11SalData()->GetLocalHostName() ); - if( rLocalHostname.getLength() ) - { - *pPtr = '\0'; - OUString aDisplayHostname( pDisplayHost, strlen( pDisplayHost ), osl_getThreadTextEncoding() ); - bEqual = sal_EqualHosts( rLocalHostname, aDisplayHostname ); - bEqual = bEqual && sal_IsDisplayNumber( pPtr + 1 ); - } - } - free( pDisplayHost ); - - return bEqual; -} - -// --------------------------------------------------------------------------- -// IsLocal means soffice is running on the same host as the xserver -// since it is not called very often and sal_IsLocalDisplay() is relative -// expensive bLocal_ is initialized on first call - -BOOL SalDisplay::IsLocal() -{ - if ( ! mbLocalIsValid ) - { - bLocal_ = sal_IsLocalDisplay( pDisp_ ); - mbLocalIsValid = TRUE; - } - return (BOOL)bLocal_; -} - -// --------------------------------------------------------------------------- -extern "C" srv_vendor_t -sal_GetServerVendor( Display *p_display ) -{ - typedef struct { - srv_vendor_t e_vendor; // vendor as enum - const char *p_name; // vendor name as returned by VendorString() - unsigned int n_len; // number of chars to compare - } vendor_t; - - const vendor_t p_vendorlist[] = { - { vendor_xfree, "The XFree86 Project, Inc", 13 }, - { vendor_sun, "Sun Microsystems, Inc.", 10 }, - { vendor_attachmate, "Attachmate Corporation", 10 }, - { vendor_excursion, - "DECWINDOWS DigitalEquipmentCorporation, eXcursion", 42 }, - { vendor_hp, "Hewlett-Packard Company", 17 }, - { vendor_hummingbird, "Hummingbird Communications Ltd.", 11 }, - { vendor_ibm, "International Business Machines", 24 }, - { vendor_sgi, "Silicon Graphics", 9 }, - { vendor_sco, "The Santa Cruz Operation", 16 }, - { vendor_xinside, "X Inside Inc.", 10 }, - // allways the last entry: vendor_none to indicate eol - { vendor_none, NULL, 0 }, - }; - - // handle regular server vendors - char *p_name = ServerVendor( p_display ); - vendor_t *p_vendor; - for (p_vendor = const_cast(p_vendorlist); p_vendor->e_vendor != vendor_none; p_vendor++) - { - if ( strncmp (p_name, p_vendor->p_name, p_vendor->n_len) == 0 ) - return p_vendor->e_vendor; - } - - // vendor not found in list - return vendor_unknown; -} - -static sal_Bool sal_IsTrustedSolaris (Display *p_display) -{ - int n_numextensions = 0; - char **p_extensions = XListExtensions (p_display, &n_numextensions); - sal_Bool b_is = sal_False; - - if (p_extensions != NULL) - { - for (int i = 0; !b_is && i < n_numextensions; i++) - b_is = (strcmp (p_extensions[i], "SUN_TSOL") == 0); - XFreeExtensionList (p_extensions); - } - - return b_is; -} - -// -=-= SalDisplay -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -BOOL SalDisplay::BestVisual( Display *pDisplay, - int nScreen, - XVisualInfo &rVI ) -{ - VisualID nDefVID = XVisualIDFromVisual( DefaultVisual( pDisplay, nScreen ) ); - VisualID nVID = 0; - char *pVID = getenv( "SAL_VISUAL" ); - if( pVID ) - sscanf( pVID, "%li", &nVID ); - - if( nVID && sal_GetVisualInfo( pDisplay, nVID, rVI ) ) - return rVI.visualid == nDefVID; - - XVisualInfo aVI; - aVI.screen = nScreen; - // get all visuals - int nVisuals; - XVisualInfo* pVInfos = XGetVisualInfo( pDisplay, VisualScreenMask, - &aVI, &nVisuals ); - // pVInfos should contain at least one visual, otherwise - // we're in trouble - int* pWeight = (int*)alloca( sizeof(int)*nVisuals ); - int i; - for( i = 0; i < nVisuals; i++ ) - { - BOOL bUsable = FALSE; - int nTrueColor = 1; - - if ( pVInfos[i].screen != nScreen ) - { - bUsable = FALSE; - } - else - if( pVInfos[i].c_class == TrueColor ) - { - nTrueColor = 2048; - if( pVInfos[i].depth == 24 ) - bUsable = TRUE; -#ifdef TRUECOLOR8 - else if( pVInfos[i].depth == 8 ) - { - nTrueColor = -1; // strongly discourage 8 bit true color - bUsable = TRUE; - } -#endif -#ifdef TRUECOLOR15 - else if( pVInfos[i].depth == 15 ) - bUsable = TRUE; -#endif -#ifdef TRUECOLOR16 - else if( pVInfos[i].depth == 16 ) - bUsable = TRUE; -#endif -#ifdef TRUECOLOR32 - else if( pVInfos[i].depth == 32 ) - { - nTrueColor = 256; - // we do not have use for an alpha channel - // better use a 24 or 16 bit truecolor visual if possible - bUsable = TRUE; - } -#endif - } - else if( pVInfos[i].c_class == PseudoColor ) - { - if( pVInfos[i].depth <= 8 ) - bUsable = TRUE; -#ifdef PSEUDOCOLOR12 - else if( pVInfos[i].depth == 12 ) - bUsable = TRUE; -#endif - } - pWeight[ i ] = bUsable ? nTrueColor*pVInfos[i].depth : -1024; - pWeight[ i ] -= pVInfos[ i ].visualid; - } - - int nBestVisual = 0; - int nBestWeight = -1024; - for( i = 0; i < nVisuals; i++ ) - { - if( pWeight[ i ] > nBestWeight ) - { - nBestWeight = pWeight[ i ]; - nBestVisual = i; - } - } - - rVI = pVInfos[ nBestVisual ]; - - XFree( pVInfos ); - return rVI.visualid == nDefVID; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -SalDisplay::SalDisplay( Display *display ) : - mpInputMethod( NULL ), - pDisp_( display ), - m_pWMAdaptor( NULL ), - m_pDtIntegrator( NULL ), - m_bUseRandRWrapper( true ), - m_nLastUserEventTime( CurrentTime ) -{ -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "SalDisplay::SalDisplay()\n" ); -#endif - X11SalData *pSalData = GetX11SalData(); - - DBG_ASSERT( ! pSalData->GetDisplay(), "Second SalDisplay created !!!\n" ); - pSalData->SetSalDisplay( this ); - - pXLib_ = pSalData->GetLib(); - m_nDefaultScreen = DefaultScreen( pDisp_ ); - -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -SalDisplay::~SalDisplay( ) -{ -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "SalDisplay::~SalDisplay()\n" ); -#endif - if( pDisp_ ) - { - doDestruct(); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "display %p closed\n", pDisp_ ); -#endif - pDisp_ = NULL; - } - // don't do this in doDestruct since RandR extension adds hooks into Display - // that is XCloseDisplay still needs the RandR library if it was used - DeInitRandR(); -} - -void SalDisplay::doDestruct() -{ - X11SalData *pSalData = GetX11SalData(); - - delete m_pWMAdaptor; - m_pWMAdaptor = NULL; - delete m_pDtIntegrator; - m_pDtIntegrator = NULL; - X11SalBitmap::ImplDestroyCache(); - X11SalGraphics::releaseGlyphPeer(); - - if( IsDisplay() ) - { - delete mpInputMethod, mpInputMethod = (SalI18N_InputMethod*)ILLEGAL_POINTER; - delete mpKbdExtension, mpKbdExtension = (SalI18N_KeyboardExtension*)ILLEGAL_POINTER; - - // do not call anything that could implicitly call back into - // this object after this point - osl_destroyMutex( hEventGuard_ ); - - for( unsigned int i = 0; i < m_aScreens.size(); i++ ) - { - ScreenData& rData = m_aScreens[i]; - if( rData.m_bInit ) - { - if( rData.m_aMonoGC != rData.m_aCopyGC ) - XFreeGC( pDisp_, rData.m_aMonoGC ); - XFreeGC( pDisp_, rData.m_aCopyGC ); - XFreeGC( pDisp_, rData.m_aAndInvertedGC ); - XFreeGC( pDisp_, rData.m_aAndGC ); - XFreeGC( pDisp_, rData.m_aOrGC ); - XFreeGC( pDisp_, rData.m_aStippleGC ); - XFreePixmap( pDisp_, rData.m_hInvert50 ); - XDestroyWindow( pDisp_, rData.m_aRefWindow ); - Colormap aColMap = rData.m_aColormap.GetXColormap(); - if( aColMap != None && aColMap != DefaultColormap( pDisp_, i ) ) - XFreeColormap( pDisp_, aColMap ); - } - } - - hEventGuard_ = (oslMutex)ILLEGAL_POINTER; - - for( size_t i = 0; i < POINTER_COUNT; i++ ) - { - if( aPointerCache_[i] ) - XFreeCursor( pDisp_, aPointerCache_[i] ); - } - - pXLib_->Remove( ConnectionNumber( pDisp_ ) ); - } - - if( pSalData->GetDisplay() == this ) - pSalData->SetSalDisplay( NULL ); -} - -static int DisplayHasEvent( int -#ifdef DBG_UTIL -fd -#endif -, SalX11Display *pDisplay ) -{ - DBG_ASSERT( ConnectionNumber( pDisplay->GetDisplay() ) == fd, - "wrong fd in DisplayHasEvent" ); - if( ! pDisplay->IsDisplay() ) - return 0; - - vos::IMutex* pSalInstYieldMutex = - GetSalData()->m_pInstance->GetYieldMutex(); - ::vos::OGuard aGuard( *pSalInstYieldMutex ); - return pDisplay->IsEvent(); -} -static int DisplayQueue( int -#ifdef DBG_UTIL -fd -#endif -, SalX11Display *pDisplay ) -{ - DBG_ASSERT( ConnectionNumber( pDisplay->GetDisplay() ) == fd, - "wrong fd in DisplayHasEvent" ); - vos::IMutex* pSalInstYieldMutex = - GetSalData()->m_pInstance->GetYieldMutex(); - ::vos::OGuard aGuard( *pSalInstYieldMutex ); - return XEventsQueued( pDisplay->GetDisplay(), - QueuedAfterReading ); -} -static int DisplayYield( int -#ifdef DBG_UTIL -fd -#endif -, SalX11Display *pDisplay ) -{ - DBG_ASSERT( ConnectionNumber( pDisplay->GetDisplay() ) == fd, - "wrong fd in DisplayHasEvent" ); - vos::IMutex* pSalInstYieldMutex = - GetSalData()->m_pInstance->GetYieldMutex(); - ::vos::OGuard aGuard( *pSalInstYieldMutex ); - pDisplay->Yield(); - return TRUE; -} - -SalX11Display::SalX11Display( Display *display ) - : SalDisplay( display ) -{ - Init(); - - pXLib_->Insert( ConnectionNumber( pDisp_ ), - this, - (YieldFunc) DisplayHasEvent, - (YieldFunc) DisplayQueue, - (YieldFunc) DisplayYield ); -} - -SalX11Display::~SalX11Display() -{ -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "SalX11Display::~SalX11Display()\n" ); -#endif - if( pDisp_ ) - { - doDestruct(); - XCloseDisplay( pDisp_ ); - pDisp_ = NULL; - } -} - -void SalDisplay::initScreen( int nScreen ) const -{ - if( nScreen < 0 || nScreen >= static_cast(m_aScreens.size()) ) - nScreen = m_nDefaultScreen; - ScreenData& rSD = const_cast(m_aScreens[nScreen]); - if( rSD.m_bInit ) - return; - rSD.m_bInit = true; - - XVisualInfo aVI; - Colormap aColMap; - - if( SalDisplay::BestVisual( pDisp_, nScreen, aVI ) ) // DefaultVisual - aColMap = DefaultColormap( pDisp_, nScreen ); - else - aColMap = XCreateColormap( pDisp_, - RootWindow( pDisp_, nScreen ), - aVI.visual, - AllocNone ); - - Screen* pScreen = ScreenOfDisplay( pDisp_, nScreen ); - - rSD.m_aSize = Size( WidthOfScreen( pScreen ), HeightOfScreen( pScreen ) ); - rSD.m_aRoot = RootWindow( pDisp_, nScreen ); - rSD.m_aVisual = SalVisual( &aVI ); - rSD.m_aColormap = SalColormap( this, aColMap, nScreen ); - - // we're interested in configure notification of root windows - InitRandR( rSD.m_aRoot ); - - // - - - - - - - - - - Reference Window/Default Drawable - - - XSetWindowAttributes aXWAttributes; - aXWAttributes.border_pixel = 0; - aXWAttributes.background_pixel = 0; - aXWAttributes.colormap = aColMap; - rSD.m_aRefWindow = XCreateWindow( pDisp_, - rSD.m_aRoot, - 0,0, 16,16, 0, - rSD.m_aVisual.GetDepth(), - InputOutput, - rSD.m_aVisual.GetVisual(), - CWBorderPixel|CWBackPixel|CWColormap, - &aXWAttributes ); - - // set client leader (session id gets set when session is started) - if( rSD.m_aRefWindow ) - { - // client leader must have WM_CLIENT_LEADER pointing to itself - XChangeProperty( pDisp_, - rSD.m_aRefWindow, - XInternAtom( pDisp_, "WM_CLIENT_LEADER", False ), - XA_WINDOW, - 32, - PropModeReplace, - (unsigned char*)&rSD.m_aRefWindow, - 1 - ); - - ByteString aExec( SessionManagerClient::getExecName(), osl_getThreadTextEncoding() ); - const char* argv[2]; - argv[0] = "/bin/sh"; - argv[1] = aExec.GetBuffer(); - XSetCommand( pDisp_, rSD.m_aRefWindow, const_cast(argv), 2 ); - XSelectInput( pDisp_, rSD.m_aRefWindow, PropertyChangeMask ); - - // - - - - - - - - - - GCs - - - - - - - - - - - - - - - - - - XGCValues values; - values.graphics_exposures = False; - values.fill_style = FillOpaqueStippled; - values.background = (1<(nDisplayScreens); - - mbExactResolution = false; - /* #i15507# - * Xft resolution should take precedence since - * it is what modern desktops use. - */ - const char* pValStr = XGetDefault( pDisp_, "Xft", "dpi" ); - if( pValStr != NULL ) - { - const rtl::OString aValStr( pValStr ); - const long nDPI = (long) aValStr.toDouble(); - // guard against insane resolution - if( (nDPI >= 50) && (nDPI <= 500) ) - { - aResolution_ = Pair( nDPI, nDPI ); - mbExactResolution = true; - } - } - if( mbExactResolution == false ) - { - aResolution_ = - Pair( DPI( WidthOfScreen( DefaultScreenOfDisplay( pDisp_ ) ), DisplayWidthMM ( pDisp_, m_nDefaultScreen ) ), - DPI( HeightOfScreen( DefaultScreenOfDisplay( pDisp_ ) ), DisplayHeightMM( pDisp_, m_nDefaultScreen ) ) ); - } - - nMaxRequestSize_ = XExtendedMaxRequestSize( pDisp_ ) * 4; - if( !nMaxRequestSize_ ) - nMaxRequestSize_ = XMaxRequestSize( pDisp_ ) * 4; - - SetServerVendor(); - X11SalBitmap::ImplCreateCache(); - - hEventGuard_ = osl_createMutex(); - bLocal_ = FALSE; /* dont care, initialize later by - calling SalDisplay::IsLocal() */ - mbLocalIsValid = FALSE; /* bLocal_ is not yet initialized */ - - // - - - - - - - - - - Synchronize - - - - - - - - - - - - - - if( getenv( "SAL_SYNCHRONIZE" ) ) - XSynchronize( pDisp_, True ); - - // - - - - - - - - - - Keyboardmapping - - - - - - - - - - - - ModifierMapping(); - - // - - - - - - - - - - Window Manager - - - - - - - - - - - - m_pWMAdaptor = ::vcl_sal::WMAdaptor::createWMAdaptor( this ); - const char *pWM = getenv( "SAL_WM" ); - if( pWM ) - { - long int nWM = 0; - sscanf( pWM, "%li", &nWM ); - eWindowManager_ = SalWM(nWM); - } - else if( XInternAtom( pDisp_, "_SGI_TELL_WM", True ) ) - eWindowManager_ = FourDwm; - else if( XInternAtom( pDisp_, "KWM_RUNNING", True ) ) - eWindowManager_ = mwm; // naja, eigentlich kwm ... - else if( XInternAtom( pDisp_, "_OL_WIN_ATTR", True ) ) - eWindowManager_ = olwm; - else if( m_pWMAdaptor->getWindowManagerName().EqualsAscii( "Dtwm" ) ) - eWindowManager_ = dtwm; - - // - - - - - - - - - - Properties - - - - - - - - - - - - - - const char *pProperties = getenv( "SAL_PROPERTIES" ); - if( pProperties ) - sscanf( pProperties, "%li", &nProperties_ ); - else - { -#if defined DBG_UTIL || defined SUN || defined LINUX || defined FREEBSD - nProperties_ |= PROPERTY_FEATURE_Maximize; -#endif - // Server Bugs & Properties - if( GetServerVendor() == vendor_excursion ) - { - nProperties_ |= PROPERTY_BUG_Stipple; - nProperties_ |= PROPERTY_BUG_DrawLine; - nProperties_ &= ~PROPERTY_SUPPORT_XSetClipMask; - } - else - if( GetServerVendor() == vendor_attachmate ) - { - nProperties_ |= PROPERTY_BUG_CopyPlane_RevertBWPixel; - } - else - if( GetServerVendor() == vendor_ibm ) - { - nProperties_ |= PROPERTY_BUG_XA_FAMILY_NAME_nil; - - if( otherwm == eWindowManager_ ) eWindowManager_ = mwm; - } - else - if( GetServerVendor() == vendor_xfree ) - { - nProperties_ |= PROPERTY_BUG_XCopyArea_GXxor; -#if defined LINUX || defined FREEBSD - // otherwm and olwm are a kind of default, which are not detected - // carefully. if we are running linux (i.e. not netbsd) on an xfree - // display, fvwm is most probable the wm to choose, confusing with mwm - // doesn't harm. #57791# start maximized if possible - if( (otherwm == eWindowManager_) - || (olwm == eWindowManager_ )) - { - eWindowManager_ = fvwm; // ??? - nProperties_ |= PROPERTY_FEATURE_Maximize; - } -#else - if( otherwm == eWindowManager_ ) eWindowManager_ = winmgr; -#endif -#if defined SOLARIS && defined SPARC - nProperties_ |= PROPERTY_BUG_Bitmap_Bit_Order; - // solaris xlib seems to have problems with putting images - // in correct bit order to xfree 8 bit displays -#endif - } - else - if( GetServerVendor() == vendor_sun ) - { - // nicht alle! (bekannt: nur Sparc II CG3, CG6?) - nProperties_ &= ~PROPERTY_SUPPORT_XSetClipMask; - - // trusted solaris doesn't allow to change properties on the - // wm decoration window - if (sal_IsTrustedSolaris (pDisp_)) - nProperties_ |= PROPERTY_FEATURE_TrustedSolaris; - - // Fehler im Sun-Solaris X86 Server ! - if (ImageByteOrder(GetDisplay()) == LSBFirst) - { - nProperties_ |= PROPERTY_BUG_Tile; - nProperties_ |= PROPERTY_SUPPORT_3ButtonMouse; - } - else // MSBFirst Sun-Solaris Sparc Server - { - // XCopyPlane reverts black and white for 1bit bitmaps - // only sun, only 8bit pseudocolor target - if ( (GetVisual(m_nDefaultScreen).GetDepth() == 8) - && (GetVisual(m_nDefaultScreen).GetClass() == PseudoColor)) - nProperties_ |= PROPERTY_BUG_CopyPlane_RevertBWPixel; - // Fehler in Solaris 2.5.1 - if (VendorRelease ( GetDisplay() ) < 3600) - nProperties_ |= PROPERTY_BUG_FillPolygon_Tile; - } - - if( otherwm == eWindowManager_ ) - eWindowManager_ = olwm; - } - else - if( GetServerVendor() == vendor_sco ) - { - if( otherwm == eWindowManager_ ) eWindowManager_ = pmwm; - } - else - if( GetServerVendor() == vendor_sgi ) - { - if( GetVisual( m_nDefaultScreen ).GetDepth() > 8 && GetVisual( m_nDefaultScreen ).GetDepth() <= 16 ) - nProperties_ |= PROPERTY_BUG_XCopyArea_GXxor; - nProperties_ |= PROPERTY_SUPPORT_XSetClipMask; - - if( otherwm == eWindowManager_ ) - eWindowManager_ = FourDwm; - } - else - if( GetServerVendor() == vendor_hp ) - { - if( otherwm == eWindowManager_ ) eWindowManager_ = dtwm; - } - else - if( GetServerVendor() == vendor_hummingbird ) - { - if (GetVisual(m_nDefaultScreen).GetDepth() == 24) - nProperties_ |= PROPERTY_BUG_CopyArea_OnlySmallSlices; - } - - if( otherwm == eWindowManager_ ) - { - if( !XInternAtom( pDisp_, "_MOTIF_WM_INFO", True ) ) - eWindowManager_ = olwm; - // ??? - } - - if( winmgr == eWindowManager_ ) - { - nProperties_ &= ~PROPERTY_SUPPORT_WM_SetPos; - nProperties_ &= ~PROPERTY_SUPPORT_WM_Screen; - nProperties_ |= PROPERTY_FEATURE_Maximize; - } - else if( dtwm == eWindowManager_ ) - { - nProperties_ &= ~PROPERTY_SUPPORT_WM_ClientPos; - } - else if( pmwm == eWindowManager_ ) - { - nProperties_ &= ~PROPERTY_SUPPORT_WM_ClientPos; - } - } - - InitXinerama(); - - // initialize system settings update - m_pDtIntegrator = DtIntegrator::CreateDtIntegrator(); - -#ifdef DBG_UTIL - PrintInfo(); -#endif -} - -// Sound -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void SalDisplay::Beep() const -{ - XBell( pDisp_, 0 ); -} - -// Keyboard -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -String SalDisplay::GetKeyNameFromKeySym( KeySym nKeySym ) const -{ - String aRet; - - // return an empty string for keysyms that are not bound to - // any key code - XLIB_KeyCode aKeyCode = XKeysymToKeycode( GetDisplay(), nKeySym ); - if( aKeyCode != 0 && aKeyCode != NoSymbol ) - { - if( !nKeySym ) - aRet = String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "???" ) ); - else - { - aRet = ::vcl_sal::getKeysymReplacementName( const_cast(this)->GetKeyboardName(), nKeySym ); - if( ! aRet.Len() ) - { - const char *pString = XKeysymToString( nKeySym ); - int n = strlen( pString ); - if( n > 2 && pString[n-2] == '_' ) - aRet = String( pString, n-2, RTL_TEXTENCODING_ISO_8859_1 ); - else - aRet = String( pString, n, RTL_TEXTENCODING_ISO_8859_1 ); - } - } - } - return aRet; -} - -inline KeySym sal_XModifier2Keysym( Display *pDisplay, - XModifierKeymap *pXModMap, - int n ) -{ - return XKeycodeToKeysym( pDisplay, - pXModMap->modifiermap[n*pXModMap->max_keypermod], - 0 ); -} - -void SalDisplay::ModifierMapping() -{ - XModifierKeymap *pXModMap = XGetModifierMapping( pDisp_ ); - - bNumLockFromXS_ = True; - nShiftKeySym_ = sal_XModifier2Keysym( pDisp_, pXModMap, ShiftMapIndex ); - nCtrlKeySym_ = sal_XModifier2Keysym( pDisp_, pXModMap, ControlMapIndex ); - nMod1KeySym_ = sal_XModifier2Keysym( pDisp_, pXModMap, Mod1MapIndex ); - // Auf Sun-Servern und SCO-Severn beruecksichtigt XLookupString - // nicht den NumLock Modifier. - if( (GetServerVendor() == vendor_sun) - || (GetServerVendor() == vendor_sco) ) - { - XLIB_KeyCode aNumLock = XKeysymToKeycode( pDisp_, XK_Num_Lock ); - - if( aNumLock ) for( int i = ShiftMapIndex; i <= Mod5MapIndex; i++ ) - { - if( pXModMap->modifiermap[i*pXModMap->max_keypermod] == aNumLock ) - { - bNumLockFromXS_ = False; - nNumLockIndex_ = i; - nNumLockMask_ = 1<= keysym ) - nKey = (USHORT)(KEY_A + (keysym - XK_a)); - else if( XK_A <= keysym && XK_Z >= keysym ) - nKey = (USHORT)(KEY_A + (keysym - XK_A)); - else if( XK_0 <= keysym && XK_9 >= keysym ) - nKey = (USHORT)(KEY_0 + (keysym - XK_0)); - else if( IsModifierKey( keysym ) ) - ; - else if( IsKeypadKey( keysym ) ) - { - if( (keysym >= XK_KP_0) && (keysym <= XK_KP_9) ) - { - nKey = (USHORT)(KEY_0 + (keysym - XK_KP_0)); - *pcPrintable = '0' + nKey - KEY_0; - } - else if( IsPFKey( keysym ) ) - nKey = (USHORT)(KEY_F1 + (keysym - XK_KP_F1)); - else switch( keysym ) - { - case XK_KP_Space: - nKey = KEY_SPACE; - *pcPrintable = ' '; - break; - case XK_KP_Tab: - nKey = KEY_TAB; - break; - case XK_KP_Enter: - nKey = KEY_RETURN; - break; - case XK_KP_Begin: - case XK_KP_Home: - nKey = KEY_HOME; - break; - case XK_KP_Left: - nKey = KEY_LEFT; - break; - case XK_KP_Up: - nKey = KEY_UP; - break; - case XK_KP_Right: - nKey = KEY_RIGHT; - break; - case XK_KP_Down: - nKey = KEY_DOWN; - break; - case XK_KP_Prior: // XK_KP_Page_Up - nKey = KEY_PAGEUP; - break; - case XK_KP_Next: // XK_KP_Page_Down - nKey = KEY_PAGEDOWN; - break; - case XK_KP_End: - nKey = KEY_END; - break; - case XK_KP_Insert: - nKey = KEY_INSERT; - break; - case XK_KP_Delete: - nKey = KEY_DELETE; - break; - case XK_KP_Equal: - nKey = KEY_EQUAL; - *pcPrintable = '='; - break; - case XK_KP_Multiply: - nKey = KEY_MULTIPLY; - *pcPrintable = '*'; - break; - case XK_KP_Add: - nKey = KEY_ADD; - *pcPrintable = '+'; - break; - case XK_KP_Separator: - nKey = KEY_DECIMAL; - *pcPrintable = ','; - break; - case XK_KP_Subtract: - nKey = KEY_SUBTRACT; - *pcPrintable = '-'; - break; - case XK_KP_Decimal: - nKey = KEY_DECIMAL; - *pcPrintable = '.'; - break; - case XK_KP_Divide: - nKey = KEY_DIVIDE; - *pcPrintable = '/'; - break; - } - } - else if( IsFunctionKey( keysym ) ) - { - if( bNumLockFromXS_ ) - { - if( keysym >= XK_F1 && keysym <= XK_F26 ) - nKey = (USHORT)(KEY_F1 + keysym - XK_F1); - } - else switch( keysym ) - { - // - - - - - Sun X-Server Tastatur ohne Cursorblock ??? - - - - case XK_R7: // XK_F27: - nKey = KEY_HOME; - break; - case XK_R8: // XK_F28: - nKey = KEY_UP; - break; - case XK_R9: // XK_F29: - nKey = KEY_PAGEUP; - break; - case XK_R10: // XK_F30: - nKey = KEY_LEFT; - break; - case XK_R11: // XK_F31: - nKey = 0; // KEY_F31 - break; - case XK_R12: // XK_F32: - nKey = KEY_RIGHT; - break; - case XK_R13: // XK_F33: - nKey = KEY_END; - break; - case XK_R14: // XK_F34: - nKey = KEY_DOWN; - break; - case XK_R15: // XK_F35: - nKey = KEY_PAGEDOWN; - break; - // - - - - - Sun X-Server Tastatur ??? - - - - - - - - - - - - - case XK_L1: // XK_F11: - nKey = KEY_F11; // on a sun keyboard this actually is usally SunXK_Stop, - // but VCL doesn't have a key defintion for that - break; - case XK_L2: // XK_F12: - if ( GetServerVendor() == vendor_sun ) - nKey = KEY_REPEAT; - else - nKey = KEY_F12; - break; - case XK_L3: // XK_F13: - nKey = KEY_PROPERTIES; // KEY_F13 - break; - case XK_L4: // XK_F14: - nKey = KEY_UNDO; // KEY_F14 - break; - case XK_L5: // XK_F15: - nKey = KEY_F15; // KEY_FRONT - break; - case XK_L6: // XK_F16: - nKey = KEY_COPY; // KEY_F16 - break; - case XK_L7: // XK_F17: - nKey = KEY_F17; // KEY_OPEN - break; - case XK_L8: // XK_F18: - nKey = KEY_PASTE; // KEY_F18 - break; - case XK_L9: // XK_F19: - nKey = KEY_F19; // KEY_FIND - break; - case XK_L10: // XK_F20: - nKey = KEY_CUT; // KEY_F20 - break; - default: - if( keysym >= XK_F1 && keysym <= XK_F26 ) - nKey = (USHORT)(KEY_F1 + keysym - XK_F1); - break; - } - } - else if( IsCursorKey( keysym ) ) - { - switch( keysym ) - { - case XK_Begin: - case XK_Home: - nKey = KEY_HOME; - break; - case XK_Left: - nKey = KEY_LEFT; - break; - case XK_Up: - nKey = KEY_UP; - break; - case XK_Right: - nKey = KEY_RIGHT; - break; - case XK_Down: - nKey = KEY_DOWN; - break; - case XK_Prior: // XK_Page_Up - nKey = KEY_PAGEUP; - break; - case XK_Next: // XK_Page_Down - nKey = KEY_PAGEDOWN; - break; - case XK_End: - nKey = KEY_END; - break; - } - } - else if( IsMiscFunctionKey( keysym ) ) - { - switch( keysym ) - { - case XK_Insert: - nKey = KEY_INSERT; - break; - case XK_Redo: - nKey = KEY_REPEAT; - break; - case XK_Undo: - nKey = KEY_UNDO; - break; - case XK_Find: - nKey = KEY_FIND; - break; - case XK_Help: - nKey = KEY_HELP; - break; - case XK_Menu: - nKey = KEY_CONTEXTMENU; - break; -/* - case XK_Break: - case XK_Select: - case XK_Execute: - case XK_Print: - case XK_Cancel: -*/ - } - } - else if( IsISOKey( keysym ) ) // XK_ISO_ - { - switch( keysym ) - { - case 0xFE20: // XK_ISO_Left_Tab: - nKey = KEY_TAB; - break; - } - } - else switch( keysym ) - { - case XK_Return: - nKey = KEY_RETURN; - break; - case XK_BackSpace: - nKey = KEY_BACKSPACE; - break; - case XK_Delete: - nKey = KEY_DELETE; - break; - case XK_space: - nKey = KEY_SPACE; - break; - case XK_Tab: - nKey = KEY_TAB; - break; - case XK_Escape: - nKey = KEY_ESCAPE; - break; - case XK_plus: - nKey = KEY_ADD; - break; - case XK_minus: - nKey = KEY_SUBTRACT; - break; - case XK_asterisk: - nKey = KEY_MULTIPLY; - break; - case XK_slash: - nKey = KEY_DIVIDE; - break; - case XK_period: - nKey = KEY_POINT; - break; - case XK_comma: - nKey = KEY_COMMA; - break; - case XK_less: - nKey = KEY_LESS; - break; - case XK_greater: - nKey = KEY_GREATER; - break; - case XK_equal: - nKey = KEY_EQUAL; - break; - case XK_Hangul_Hanja: - nKey = KEY_HANGUL_HANJA; - break; - case XK_asciitilde: - nKey = KEY_TILDE; - *pcPrintable = '~'; - break; - case XK_grave: - nKey = KEY_QUOTELEFT; - *pcPrintable = '`'; - break; -// case XK_Linefeed: -// *pcPrintable = '\n'; -// break; - // - - - - - - - - - - - - - Apollo - - - - - - - - - - - - - 0x1000 - case 0x1000FF02: // apXK_Copy - nKey = KEY_COPY; - break; - case 0x1000FF03: // apXK_Cut - nKey = KEY_CUT; - break; - case 0x1000FF04: // apXK_Paste - nKey = KEY_PASTE; - break; - case 0x1000FF14: // apXK_Repeat - nKey = KEY_REPEAT; - break; - // Exit, Save - // - - - - - - - - - - - - - - D E C - - - - - - - - - - - - - 0x1000 - case 0x1000FF00: - nKey = KEY_DELETE; - break; - // - - - - - - - - - - - - - - H P - - - - - - - - - - - - - 0x1000 - case 0x1000FF73: // hpXK_DeleteChar - nKey = KEY_DELETE; - break; - case 0x1000FF74: // hpXK_BackTab - case 0x1000FF75: // hpXK_KP_BackTab - nKey = KEY_TAB; - break; - // - - - - - - - - - - - - - - I B M - - - - - - - - - - - - - - // - - - - - - - - - - - - - - O S F - - - - - - - - - - - - - 0x1004 - case 0x1004FF02: // osfXK_Copy - nKey = KEY_COPY; - break; - case 0x1004FF03: // osfXK_Cut - nKey = KEY_CUT; - break; - case 0x1004FF04: // osfXK_Paste - nKey = KEY_PASTE; - break; - case 0x1004FF07: // osfXK_BackTab - nKey = KEY_TAB; - break; - case 0x1004FF08: // osfXK_BackSpace - nKey = KEY_BACKSPACE; - break; - case 0x1004FF1B: // osfXK_Escape - nKey = KEY_ESCAPE; - break; - // Up, Down, Left, Right, PageUp, PageDown - // - - - - - - - - - - - - - - S C O - - - - - - - - - - - - - - // - - - - - - - - - - - - - - S G I - - - - - - - - - - - - - 0x1007 - // - - - - - - - - - - - - - - S N I - - - - - - - - - - - - - - // - - - - - - - - - - - - - - S U N - - - - - - - - - - - - - 0x1005 - case 0x1005FF10: // SunXK_F36 - nKey = KEY_F11; - break; - case 0x1005FF11: // SunXK_F37 - nKey = KEY_F12; - break; - case 0x1005FF70: // SunXK_Props - nKey = KEY_PROPERTIES; - break; - case 0x1005FF71: // SunXK_Front - nKey = KEY_FRONT; - break; - case 0x1005FF72: // SunXK_Copy - nKey = KEY_COPY; - break; - case 0x1005FF73: // SunXK_Open - nKey = KEY_OPEN; - break; - case 0x1005FF74: // SunXK_Paste - nKey = KEY_PASTE; - break; - case 0x1005FF75: // SunXK_Cut - nKey = KEY_CUT; - break; - } - return nKey; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -KeySym SalDisplay::GetKeySym( XKeyEvent *pEvent, - unsigned char *pPrintable, - int *pLen, - KeySym *pUnmodifiedKeySym, - Status *pStatusReturn, - XIC aInputContext ) const -{ - KeySym nKeySym = 0; - memset( pPrintable, 0, *pLen ); - *pStatusReturn = 0; - - // first get the printable of the possibly modified KeySym - if ( (aInputContext == 0) - || (pEvent->type == KeyRelease) - || (mpInputMethod != NULL && mpInputMethod->PosixLocale()) ) - { - // XmbLookupString must not be called for KeyRelease events - // Cannot enter space in c locale problem #89616# #88978# btraq #4478197 - *pLen = XLookupString( pEvent, (char*)pPrintable, 1, &nKeySym, NULL ); - } - else - { - *pLen = XmbLookupString( aInputContext, - pEvent, (char*)pPrintable, *pLen - 1, &nKeySym, pStatusReturn ); - - // Lookup the string again, now with appropriate size - if ( *pStatusReturn == XBufferOverflow ) - { - pPrintable[ 0 ] = (char)0; - return 0; - } - - switch ( *pStatusReturn ) - { - case XBufferOverflow: - /* unhandled error */ - break; - case XLookupNone: - /* unhandled error */ - break; - case XLookupKeySym: - /* #72223# this is a strange one: on exceed sometimes - * no printable is returned for the first char entered, - * just to retry lookup solves the problem. The problem - * is not yet fully understood, so restrict 2nd lookup - * to 7bit ascii chars */ - if ( (XK_space <= nKeySym) && (XK_asciitilde >= nKeySym) ) - { - *pLen = 1; - pPrintable[ 0 ] = (char)nKeySym; - } - break; - case XLookupBoth: - case XLookupChars: - - /* nothing to, char allready in pPrintable */ - break; - } - } - - if( !bNumLockFromXS_ - && (IsCursorKey(nKeySym) - || IsFunctionKey(nKeySym) - || IsKeypadKey(nKeySym) - || XK_Delete == nKeySym ) ) - { - // Bei einigen X-Servern muss man bei den Keypadtasten - // schon sehr genau hinschauen. ZB. Solaris XServer: - // 2, 4, 6, 8 werden als Cursorkeys klassifiziert (Up, Down, Left, Right - // 1, 3, 5, 9 werden als Functionkeys klassifiziert (F27,F29,F33,F35) - // 0 als Keypadkey und der Dezimalpunkt gar nicht (KP_Insert) - KeySym nNewKeySym = XLookupKeysym( pEvent, nNumLockIndex_ ); - if( nNewKeySym != NoSymbol ) - nKeySym = nNewKeySym; - } - - // Now get the unmodified KeySym for KeyCode retrieval - // try to strip off modifiers, e.g. Ctrl-$ becomes Ctrl-Shift-4 - *pUnmodifiedKeySym = XKeycodeToKeysym( GetDisplay(), pEvent->keycode, 0); - - return nKeySym; -} - -// Pointer -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#define MAKE_BITMAP( name ) \ - XCreateBitmapFromData( pDisp_, \ - DefaultRootWindow( pDisp_ ), \ - name##_bits, \ - name##_width, \ - name##_height ) - -#define MAKE_CURSOR( name ) \ - aCursBitmap = MAKE_BITMAP( name##curs ); \ - aMaskBitmap = MAKE_BITMAP( name##mask ); \ - nXHot = name##curs_x_hot; \ - nYHot = name##curs_y_hot - -XLIB_Cursor SalDisplay::GetPointer( int ePointerStyle ) -{ - if( ePointerStyle >= POINTER_COUNT ) - return 0; - - XLIB_Cursor &aCur = aPointerCache_[ePointerStyle]; - - if( aCur != None ) - return aCur; - - Pixmap aCursBitmap = None, aMaskBitmap = None; - unsigned int nXHot = 0, nYHot = 0; - - switch( ePointerStyle ) - { - case POINTER_NULL: - MAKE_CURSOR( null ); - break; - case POINTER_ARROW: - aCur = XCreateFontCursor( pDisp_, XC_left_ptr ); - DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); - break; - case POINTER_WAIT: - aCur = XCreateFontCursor( pDisp_, XC_watch ); - break; - case POINTER_TEXT: // Mouse Pointer ist ein "I" Beam - aCur = XCreateFontCursor( pDisp_, XC_xterm ); - DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); - break; - case POINTER_HELP: - aCur = XCreateFontCursor( pDisp_, XC_question_arrow ); - DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); - break; - case POINTER_CROSS: // Mouse Pointer ist ein Kreuz - aCur = XCreateFontCursor( pDisp_, XC_crosshair ); - DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); - break; - case POINTER_NSIZE: - aCur = XCreateFontCursor( pDisp_, XC_sb_v_double_arrow ); - DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); - break; - case POINTER_SSIZE: - aCur = XCreateFontCursor( pDisp_, XC_sb_v_double_arrow ); - DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); - break; - case POINTER_WSIZE: - aCur = XCreateFontCursor( pDisp_, XC_sb_h_double_arrow ); - DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); - break; - case POINTER_ESIZE: - aCur = XCreateFontCursor( pDisp_, XC_sb_h_double_arrow ); - DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); - break; - case POINTER_WINDOW_NSIZE: - aCur = XCreateFontCursor( pDisp_, XC_top_side ); - DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); - break; - case POINTER_WINDOW_SSIZE: - aCur = XCreateFontCursor( pDisp_, XC_bottom_side ); - DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); - break; - case POINTER_WINDOW_WSIZE: - aCur = XCreateFontCursor( pDisp_, XC_left_side ); - DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); - break; - case POINTER_WINDOW_ESIZE: - aCur = XCreateFontCursor( pDisp_, XC_right_side ); - DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); - break; - case POINTER_NWSIZE: - aCur = XCreateFontCursor( pDisp_, XC_top_left_corner ); - break; - case POINTER_NESIZE: - aCur = XCreateFontCursor( pDisp_, XC_top_right_corner ); - break; - case POINTER_SWSIZE: - aCur = XCreateFontCursor( pDisp_, XC_bottom_left_corner ); - break; - case POINTER_SESIZE: - aCur = XCreateFontCursor( pDisp_, XC_bottom_right_corner ); - break; - case POINTER_WINDOW_NWSIZE: - aCur = XCreateFontCursor( pDisp_, XC_top_left_corner ); - DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); - break; - case POINTER_WINDOW_NESIZE: - aCur = XCreateFontCursor( pDisp_, XC_top_right_corner ); - DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); - break; - case POINTER_WINDOW_SWSIZE: - aCur = XCreateFontCursor( pDisp_, XC_bottom_left_corner ); - DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); - break; - case POINTER_WINDOW_SESIZE: - aCur = XCreateFontCursor( pDisp_, XC_bottom_right_corner ); - DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); - break; - case POINTER_HSPLIT: - aCur = XCreateFontCursor( pDisp_, XC_sb_h_double_arrow ); - break; - case POINTER_VSPLIT: - aCur = XCreateFontCursor( pDisp_, XC_sb_v_double_arrow ); - break; - case POINTER_HSIZEBAR: - aCur = XCreateFontCursor( pDisp_, XC_sb_h_double_arrow ); // ??? - DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); - break; - case POINTER_VSIZEBAR: - aCur = XCreateFontCursor( pDisp_, XC_sb_v_double_arrow ); // ??? - DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); - break; - case POINTER_REFHAND: - aCur = XCreateFontCursor( pDisp_, XC_hand1 ); - DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); - break; - case POINTER_HAND: - aCur = XCreateFontCursor( pDisp_, XC_hand2 ); - break; - case POINTER_MAGNIFY: - MAKE_CURSOR( magnify_ ); - break; - case POINTER_FILL: - MAKE_CURSOR( fill_ ); - break; - case POINTER_MOVE: - aCur = XCreateFontCursor( pDisp_, XC_fleur ); - break; - case POINTER_MOVEDATA: - MAKE_CURSOR( movedata_ ); - break; - case POINTER_COPYDATA: - MAKE_CURSOR( copydata_ ); - break; - case POINTER_MOVEFILE: - MAKE_CURSOR( movefile_ ); - break; - case POINTER_COPYFILE: - MAKE_CURSOR( copyfile_ ); - break; - case POINTER_MOVEFILES: - MAKE_CURSOR( movefiles_ ); - break; - case POINTER_COPYFILES: - MAKE_CURSOR( copyfiles_ ); - break; - case POINTER_NOTALLOWED: - MAKE_CURSOR( nodrop_ ); - break; - case POINTER_ROTATE: - MAKE_CURSOR( rotate_ ); - break; - case POINTER_HSHEAR: - MAKE_CURSOR( hshear_ ); - break; - case POINTER_VSHEAR: - MAKE_CURSOR( vshear_ ); - break; - case POINTER_DRAW_LINE: - MAKE_CURSOR( drawline_ ); - break; - case POINTER_DRAW_RECT: - MAKE_CURSOR( drawrect_ ); - break; - case POINTER_DRAW_POLYGON: - MAKE_CURSOR( drawpolygon_ ); - break; - case POINTER_DRAW_BEZIER: - MAKE_CURSOR( drawbezier_ ); - break; - case POINTER_DRAW_ARC: - MAKE_CURSOR( drawarc_ ); - break; - case POINTER_DRAW_PIE: - MAKE_CURSOR( drawpie_ ); - break; - case POINTER_DRAW_CIRCLECUT: - MAKE_CURSOR( drawcirclecut_ ); - break; - case POINTER_DRAW_ELLIPSE: - MAKE_CURSOR( drawellipse_ ); - break; - case POINTER_DRAW_CONNECT: - MAKE_CURSOR( drawconnect_ ); - break; - case POINTER_DRAW_TEXT: - MAKE_CURSOR( drawtext_ ); - break; - case POINTER_MIRROR: - MAKE_CURSOR( mirror_ ); - break; - case POINTER_CROOK: - MAKE_CURSOR( crook_ ); - break; - case POINTER_CROP: - MAKE_CURSOR( crop_ ); - break; - case POINTER_MOVEPOINT: - MAKE_CURSOR( movepoint_ ); - break; - case POINTER_MOVEBEZIERWEIGHT: - MAKE_CURSOR( movebezierweight_ ); - break; - case POINTER_DRAW_FREEHAND: - MAKE_CURSOR( drawfreehand_ ); - break; - case POINTER_DRAW_CAPTION: - MAKE_CURSOR( drawcaption_ ); - break; - case POINTER_PEN: // Mouse Pointer ist ein Stift - aCur = XCreateFontCursor( pDisp_, XC_pencil ); - DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); - break; - case POINTER_LINKDATA: - MAKE_CURSOR( linkdata_ ); - break; - case POINTER_MOVEDATALINK: - MAKE_CURSOR( movedlnk_ ); - break; - case POINTER_COPYDATALINK: - MAKE_CURSOR( copydlnk_ ); - break; - case POINTER_LINKFILE: - MAKE_CURSOR( linkfile_ ); - break; - case POINTER_MOVEFILELINK: - MAKE_CURSOR( moveflnk_ ); - break; - case POINTER_COPYFILELINK: - MAKE_CURSOR( copyflnk_ ); - break; - case POINTER_CHART: - MAKE_CURSOR( chart_ ); - break; - case POINTER_DETECTIVE: - MAKE_CURSOR( detective_ ); - break; - case POINTER_PIVOT_COL: - MAKE_CURSOR( pivotcol_ ); - break; - case POINTER_PIVOT_ROW: - MAKE_CURSOR( pivotrow_ ); - break; - case POINTER_PIVOT_FIELD: - MAKE_CURSOR( pivotfld_ ); - break; - case POINTER_PIVOT_DELETE: - MAKE_CURSOR( pivotdel_ ); - break; - case POINTER_CHAIN: - MAKE_CURSOR( chain_ ); - break; - case POINTER_CHAIN_NOTALLOWED: - MAKE_CURSOR( chainnot_ ); - break; - case POINTER_TIMEEVENT_MOVE: - MAKE_CURSOR( timemove_ ); - break; - case POINTER_TIMEEVENT_SIZE: - MAKE_CURSOR( timesize_ ); - break; - case POINTER_AUTOSCROLL_N: - MAKE_CURSOR(asn_ ); - break; - case POINTER_AUTOSCROLL_S: - MAKE_CURSOR( ass_ ); - break; - case POINTER_AUTOSCROLL_W: - MAKE_CURSOR( asw_ ); - break; - case POINTER_AUTOSCROLL_E: - MAKE_CURSOR( ase_ ); - break; - case POINTER_AUTOSCROLL_NW: - MAKE_CURSOR( asnw_ ); - break; - case POINTER_AUTOSCROLL_NE: - MAKE_CURSOR( asne_ ); - break; - case POINTER_AUTOSCROLL_SW: - MAKE_CURSOR( assw_ ); - break; - case POINTER_AUTOSCROLL_SE: - MAKE_CURSOR( asse_ ); - break; - case POINTER_AUTOSCROLL_NS: - MAKE_CURSOR( asns_ ); - break; - case POINTER_AUTOSCROLL_WE: - MAKE_CURSOR( aswe_ ); - break; - case POINTER_AUTOSCROLL_NSWE: - MAKE_CURSOR( asnswe_ ); - break; - case POINTER_AIRBRUSH: - MAKE_CURSOR( airbrush_ ); - break; - case POINTER_TEXT_VERTICAL: - MAKE_CURSOR( vertcurs_ ); - break; - - // --> FME 2004-07-30 #i32329# Enhanced table selection - case POINTER_TAB_SELECT_S: - MAKE_CURSOR( tblsels_ ); - break; - case POINTER_TAB_SELECT_E: - MAKE_CURSOR( tblsele_ ); - break; - case POINTER_TAB_SELECT_SE: - MAKE_CURSOR( tblselse_ ); - break; - case POINTER_TAB_SELECT_W: - MAKE_CURSOR( tblselw_ ); - break; - case POINTER_TAB_SELECT_SW: - MAKE_CURSOR( tblselsw_ ); - break; - // <-- - - // --> FME 2004-08-16 #i20119# Paintbrush tool - case POINTER_PAINTBRUSH : - MAKE_CURSOR( paintbrush_ ); - break; - // <-- - - default: - DBG_ERROR("pointer not implemented"); - aCur = XCreateFontCursor( pDisp_, XC_arrow ); - break; - } - - if( None == aCur ) - { - XColor aBlack, aWhite, aDummy; - Colormap hColormap = GetColormap(m_nDefaultScreen).GetXColormap(); - - XAllocNamedColor( pDisp_, hColormap, "black", &aBlack, &aDummy ); - XAllocNamedColor( pDisp_, hColormap, "white", &aWhite, &aDummy ); - - aCur = XCreatePixmapCursor( pDisp_, - aCursBitmap, aMaskBitmap, - &aBlack, &aWhite, - nXHot, nYHot ); - - XFreePixmap( pDisp_, aCursBitmap ); - XFreePixmap( pDisp_, aMaskBitmap ); - } - - return aCur; -} - -int SalDisplay::CaptureMouse( SalFrame *pCapture ) -{ - if( !pCapture ) - { - m_pCapture = NULL; - XUngrabPointer( GetDisplay(), CurrentTime ); - XFlush( GetDisplay() ); - return 0; - } - - m_pCapture = NULL; - - // FIXME: get rid of X11SalFrame - const SystemEnvData* pEnvData = pCapture->GetSystemData(); - int ret = XGrabPointer( GetDisplay(), - (XLIB_Window)pEnvData->aWindow, - False, - PointerMotionMask| ButtonPressMask|ButtonReleaseMask, - GrabModeAsync, - GrabModeAsync, - None, - static_cast(pCapture)->GetCursor(), - CurrentTime ); - - if( ret != GrabSuccess ) - { - DBG_ASSERT( 1, "SalDisplay::CaptureMouse could not grab pointer\n"); - return -1; - } - - m_pCapture = pCapture; - return 1; -} - -// Events -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -void SalDisplay::SendInternalEvent( SalFrame* pFrame, void* pData, USHORT nEvent ) -{ - if( osl_acquireMutex( hEventGuard_ ) ) - { - m_aUserEvents.push_back( SalUserEvent( pFrame, pData, nEvent ) ); - - // Notify SalXLib::Yield() of a pending event. - pXLib_->PostUserEvent(); - - osl_releaseMutex( hEventGuard_ ); - } - else { - DBG_ASSERT( 1, "SalDisplay::SendInternalEvent !acquireMutex\n" ); - } -} - -void SalDisplay::CancelInternalEvent( SalFrame* pFrame, void* pData, USHORT nEvent ) -{ - if( osl_acquireMutex( hEventGuard_ ) ) - { - if( ! m_aUserEvents.empty() ) - { - std::list< SalUserEvent >::iterator it, next; - next = m_aUserEvents.begin(); - do - { - it = next++; - if( it->m_pFrame == pFrame && - it->m_pData == pData && - it->m_nEvent == nEvent ) - { - m_aUserEvents.erase( it ); - } - } while( next != m_aUserEvents.end() ); - } - - osl_releaseMutex( hEventGuard_ ); - } - else { - DBG_ASSERT( 1, "SalDisplay::CancelInternalEvent !acquireMutex\n" ); - } -} - -BOOL SalX11Display::IsEvent() -{ - BOOL bRet = FALSE; - - if( osl_acquireMutex( hEventGuard_ ) ) - { - if( m_aUserEvents.begin() != m_aUserEvents.end() ) - bRet = TRUE; - osl_releaseMutex( hEventGuard_ ); - } - - if( bRet || XEventsQueued( pDisp_, QueuedAlready ) ) - return TRUE; - - XFlush( pDisp_ ); - return FALSE; -} - -bool SalDisplay::DispatchInternalEvent() -{ - SalFrame* pFrame = NULL; - void* pData = NULL; - USHORT nEvent = 0; - - if( osl_acquireMutex( hEventGuard_ ) ) - { - if( m_aUserEvents.begin() != m_aUserEvents.end() ) - { - pFrame = m_aUserEvents.front().m_pFrame; - pData = m_aUserEvents.front().m_pData; - nEvent = m_aUserEvents.front().m_nEvent; - - m_aUserEvents.pop_front(); - } - osl_releaseMutex( hEventGuard_ ); - } - else { - DBG_ASSERT( 1, "SalDisplay::Yield !acquireMutex\n" ); - } - - if( pFrame ) - pFrame->CallCallback( nEvent, pData ); - - return pFrame != NULL; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -void SalX11Display::Yield() -{ - if( DispatchInternalEvent() ) - return; - - XEvent aEvent; - DBG_ASSERT( static_cast(GetSalData()->m_pInstance->GetYieldMutex())->GetThreadId() == - vos::OThread::getCurrentIdentifier(), - "will crash soon since solar mutex not locked in SalDisplay::Yield" ); - - XNextEvent( pDisp_, &aEvent ); - - Dispatch( &aEvent ); - -#ifdef DBG_UTIL - if( pXLib_->HasXErrorOccured() ) - { - XFlush( pDisp_ ); - PrintEvent( "SalDisplay::Yield (WasXError)", &aEvent ); - } -#endif - pXLib_->ResetXErrorOccured(); -} - -long SalX11Display::Dispatch( XEvent *pEvent ) -{ - if( pEvent->type == XLIB_KeyPress || pEvent->type == KeyRelease ) - { - XLIB_Window aWindow = pEvent->xkey.window; - - std::list< SalFrame* >::const_iterator it; - for( it = m_aFrames.begin(); it != m_aFrames.end(); ++it ) - { - const X11SalFrame* pFrame = static_cast< const X11SalFrame* >(*it); - if( pFrame->GetWindow() == aWindow || pFrame->GetShellWindow() == aWindow ) - { - aWindow = pFrame->GetWindow(); - break; - } - } - if( it != m_aFrames.end() ) - { - if ( mpInputMethod->FilterEvent( pEvent , aWindow ) ) - return 0; - } - } - else - if ( mpInputMethod->FilterEvent( pEvent, None ) ) - return 0; - - SalInstance* pInstance = GetSalData()->m_pInstance; - pInstance->CallEventCallback( pEvent, sizeof( XEvent ) ); - - switch( pEvent->type ) - { - case MotionNotify: - while( XCheckWindowEvent( pEvent->xany.display, - pEvent->xany.window, - ButtonMotionMask, - pEvent ) ) - ; - m_nLastUserEventTime = pEvent->xmotion.time; - break; - case PropertyNotify: - if( pEvent->xproperty.atom == getWMAdaptor()->getAtom( WMAdaptor::VCL_SYSTEM_SETTINGS ) ) - { - for( unsigned int i = 0; i < m_aScreens.size(); i++ ) - { - if( pEvent->xproperty.window == m_aScreens[i].m_aRefWindow ) - { - std::list< SalFrame* >::const_iterator it; - for( it = m_aFrames.begin(); it != m_aFrames.end(); ++it ) - (*it)->CallCallback( SALEVENT_SETTINGSCHANGED, NULL ); - return 0; - } - } - } - break; - case MappingNotify: - if( MappingKeyboard == pEvent->xmapping.request || - MappingModifier == pEvent->xmapping.request ) - { - XRefreshKeyboardMapping( &pEvent->xmapping ); - if( MappingModifier == pEvent->xmapping.request ) - ModifierMapping(); - if( MappingKeyboard == pEvent->xmapping.request ) // refresh mapping - GetKeyboardName( TRUE ); - } - break; - case ButtonPress: - case ButtonRelease: - m_nLastUserEventTime = pEvent->xbutton.time; - break; - case XLIB_KeyPress: - case KeyRelease: - m_nLastUserEventTime = pEvent->xkey.time; - break; - default: - - if ( GetKbdExtension()->UseExtension() - && GetKbdExtension()->GetEventBase() == pEvent->type ) - { - GetKbdExtension()->Dispatch( pEvent ); - return 1; - } - break; - } - - std::list< SalFrame* >::iterator it; - for( it = m_aFrames.begin(); it != m_aFrames.end(); ++it ) - { - X11SalFrame* pFrame = static_cast< X11SalFrame* >(*it); - XLIB_Window aDispatchWindow = pEvent->xany.window; - if( pFrame->GetWindow() == aDispatchWindow - || pFrame->GetShellWindow() == aDispatchWindow - || pFrame->GetForeignParent() == aDispatchWindow - ) - { - return pFrame->Dispatch( pEvent ); - } - if( pEvent->type == ConfigureNotify && pEvent->xconfigure.window == pFrame->GetStackingWindow() ) - { - return pFrame->Dispatch( pEvent ); - } - } - - // dispatch to salobjects - X11SalObject::Dispatch( pEvent ); - - // is this perhaps a root window that changed size ? - processRandREvent( pEvent ); - - return 0; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void SalDisplay::PrintEvent( const ByteString &rComment, - XEvent *pEvent ) const -{ - if( pEvent->type <= MappingNotify ) - { - fprintf( stderr, "[%s] %s s=%d w=%ld\n", - rComment.GetBuffer(), - EventNames[pEvent->type], - pEvent->xany.send_event, - pEvent->xany.window ); - - switch( pEvent->type ) - { - case XLIB_KeyPress: - case KeyRelease: - fprintf( stderr, "\t\ts=%d c=%d\n", - pEvent->xkey.state, - pEvent->xkey.keycode ); - break; - - case ButtonPress: - case ButtonRelease: - fprintf( stderr, "\t\ts=%d b=%d x=%d y=%d rx=%d ry=%d\n", - pEvent->xbutton.state, - pEvent->xbutton.button, - pEvent->xbutton.x, - pEvent->xbutton.y, - pEvent->xbutton.x_root, - pEvent->xbutton.y_root ); - break; - - case MotionNotify: - fprintf( stderr, "\t\ts=%d x=%d y=%d\n", - pEvent->xmotion.state, - pEvent->xmotion.x, - pEvent->xmotion.y ); - break; - - case EnterNotify: - case LeaveNotify: - fprintf( stderr, "\t\tm=%d f=%d x=%d y=%d\n", - pEvent->xcrossing.mode, - pEvent->xcrossing.focus, - pEvent->xcrossing.x, - pEvent->xcrossing.y ); - break; - - case FocusIn: - case FocusOut: - fprintf( stderr, "\t\tm=%d d=%d\n", - pEvent->xfocus.mode, - pEvent->xfocus.detail ); - break; - - case Expose: - case GraphicsExpose: - fprintf( stderr, "\t\tc=%d %d*%d %d+%d\n", - pEvent->xexpose.count, - pEvent->xexpose.width, - pEvent->xexpose.height, - pEvent->xexpose.x, - pEvent->xexpose.y ); - break; - - case VisibilityNotify: - fprintf( stderr, "\t\ts=%d\n", - pEvent->xvisibility.state ); - break; - - case CreateNotify: - case DestroyNotify: - break; - - case MapNotify: - case UnmapNotify: - break; - - case ReparentNotify: - fprintf( stderr, "\t\tp=%d x=%d y=%d\n", - sal::static_int_cast< int >(pEvent->xreparent.parent), - pEvent->xreparent.x, - pEvent->xreparent.y ); - break; - - case ConfigureNotify: - fprintf( stderr, "\t\tb=%d %d*%d %d+%d\n", - pEvent->xconfigure.border_width, - pEvent->xconfigure.width, - pEvent->xconfigure.height, - pEvent->xconfigure.x, - pEvent->xconfigure.y ); - break; - - case PropertyNotify: - fprintf( stderr, "\t\ta=%s (0x%X)\n", - GetAtomName( pDisp_, pEvent->xproperty.atom ), - sal::static_int_cast< unsigned int >( - pEvent->xproperty.atom) ); - break; - - case ColormapNotify: - fprintf( stderr, "\t\tc=%ld n=%d s=%d\n", - pEvent->xcolormap.colormap, - pEvent->xcolormap.c_new, - pEvent->xcolormap.state ); - break; - - case ClientMessage: - fprintf( stderr, "\t\ta=%s (0x%X) f=%i [0x%lX,0x%lX,0x%lX,0x%lX,0x%lX])\n", - GetAtomName( pDisp_, pEvent->xclient.message_type ), - sal::static_int_cast< unsigned int >( - pEvent->xclient.message_type), - pEvent->xclient.format, - pEvent->xclient.data.l[0], - pEvent->xclient.data.l[1], - pEvent->xclient.data.l[2], - pEvent->xclient.data.l[3], - pEvent->xclient.data.l[4] ); - break; - - case MappingNotify: - fprintf( stderr, "\t\tr=%sd\n", - MappingModifier == pEvent->xmapping.request - ? "MappingModifier" - : MappingKeyboard == pEvent->xmapping.request - ? "MappingKeyboard" - : "MappingPointer" ); - - break; - } - } - else - fprintf( stderr, "[%s] %d s=%d w=%ld\n", - rComment.GetBuffer(), - pEvent->type, - pEvent->xany.send_event, - pEvent->xany.window ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void SalDisplay::PrintInfo() const -{ - if( IsDisplay() ) - { - fprintf( stderr, "\n" ); - fprintf( stderr, "Environment\n" ); - fprintf( stderr, "\t$XENVIRONMENT \t\"%s\"\n", - GetEnv( "XENVIRONMENT" ) ); - fprintf( stderr, "\t$DISPLAY \t\"%s\"\n", - GetEnv( "DISPLAY" ) ); - fprintf( stderr, "\t$SAL_VISUAL \t\"%s\"\n", - GetEnv( "SAL_VISUAL" ) ); - fprintf( stderr, "\t$SAL_FONTPATH \t\"%s\"\n", - GetEnv( "SAL_FONTPATH" ) ); - fprintf( stderr, "\t$SAL_NOSEGV \t\"%s\"\n", - GetEnv( "SAL_NOSEGV" ) ); - fprintf( stderr, "\t$SAL_IGNOREXERRORS\t\"%s\"\n", - GetEnv( "SAL_IGNOREXERRORS" ) ); - fprintf( stderr, "\t$SAL_PROPERTIES \t\"%s\"\n", - GetEnv( "SAL_PROPERTIES" ) ); - fprintf( stderr, "\t$SAL_WM \t\"%s\"\n", - GetEnv( "SAL_WM" ) ); - fprintf( stderr, "\t$SAL_SYNCHRONIZE \t\"%s\"\n", - GetEnv( "SAL_SYNCHRONIZE" ) ); - - char sHostname[ 120 ]; - gethostname (sHostname, 120 ); - fprintf( stderr, "Client\n" ); - fprintf( stderr, "\tHost \t\"%s\"\n", - sHostname ); - - fprintf( stderr, "Display\n" ); - fprintf( stderr, "\tHost \t\"%s\"\n", - DisplayString(pDisp_) ); - fprintf( stderr, "\tVendor (Release) \t\"%s (%d)\"\n", - ServerVendor(pDisp_), VendorRelease(pDisp_) ); - fprintf( stderr, "\tProtocol \t%d.%d\n", - ProtocolVersion(pDisp_), ProtocolRevision(pDisp_) ); - fprintf( stderr, "\tScreen (count,def)\t%d (%d,%d)\n", - m_nDefaultScreen, ScreenCount(pDisp_), DefaultScreen(pDisp_) ); - fprintf( stderr, "\tshift ctrl alt \t%s (0x%X) %s (0x%X) %s (0x%X)\n", - KeyStr( nShiftKeySym_ ), sal::static_int_cast< unsigned int >(nShiftKeySym_), - KeyStr( nCtrlKeySym_ ), sal::static_int_cast< unsigned int >(nCtrlKeySym_), - KeyStr( nMod1KeySym_ ), sal::static_int_cast< unsigned int >(nMod1KeySym_) ); - if( XExtendedMaxRequestSize(pDisp_) * 4 ) - fprintf( stderr, "\tXMaxRequestSize \t%ld %ld [bytes]\n", - XMaxRequestSize(pDisp_) * 4, XExtendedMaxRequestSize(pDisp_) * 4 ); - if( GetProperties() != PROPERTY_DEFAULT ) - fprintf( stderr, "\tProperties \t0x%lX\n", GetProperties() ); - if( eWindowManager_ != otherwm ) - fprintf( stderr, "\tWindowmanager \t%d\n", eWindowManager_ ); - fprintf( stderr, "\tWMName \t%s\n", rtl::OUStringToOString( getWMAdaptor()->getWindowManagerName(), osl_getThreadTextEncoding() ).getStr() ); - } - fprintf( stderr, "Screen\n" ); - fprintf( stderr, "\tResolution/Size \t%ld*%ld %ld*%ld %.1lf\"\n", - aResolution_.A(), aResolution_.B(), - m_aScreens[m_nDefaultScreen].m_aSize.Width(), m_aScreens[m_nDefaultScreen].m_aSize.Height(), - Hypothenuse( DisplayWidthMM ( pDisp_, m_nDefaultScreen ), - DisplayHeightMM( pDisp_, m_nDefaultScreen ) ) / 25.4 ); - fprintf( stderr, "\tBlack&White \t%lu %lu\n", - GetColormap(m_nDefaultScreen).GetBlackPixel(), GetColormap(m_nDefaultScreen).GetWhitePixel() ); - fprintf( stderr, "\tRGB \t0x%lx 0x%lx 0x%lx\n", - GetVisual(m_nDefaultScreen).red_mask, GetVisual(m_nDefaultScreen).green_mask, GetVisual(m_nDefaultScreen).blue_mask ); - fprintf( stderr, "\tVisual \t%d-bit %s ID=0x%x\n", - GetVisual(m_nDefaultScreen).GetDepth(), - VisualClassName[ GetVisual(m_nDefaultScreen).GetClass() ], - sal::static_int_cast< unsigned int >(GetVisual(m_nDefaultScreen).GetVisualId()) ); -} - -int SalDisplay::addXineramaScreenUnique( long i_nX, long i_nY, long i_nWidth, long i_nHeight ) -{ - // see if any frame buffers are at the same coordinates - // this can happen with weird configuration e.g. on - // XFree86 and Clone displays - const size_t nScreens = m_aXineramaScreens.size(); - for( size_t n = 0; n < nScreens; n++ ) - { - if( m_aXineramaScreens[n].Left() == i_nX && - m_aXineramaScreens[n].Top() == i_nY ) - { - if( m_aXineramaScreens[n].GetWidth() < i_nWidth || - m_aXineramaScreens[n].GetHeight() < i_nHeight ) - { - m_aXineramaScreens[n].SetSize( Size( i_nWidth, i_nHeight ) ); - } - return (int)n; - } - } - m_aXineramaScreens.push_back( Rectangle( Point( i_nX, i_nY ), Size( i_nWidth, i_nHeight ) ) ); - return (int)m_aXineramaScreens.size()-1; -} - -void SalDisplay::InitXinerama() -{ - if( m_aScreens.size() > 1 ) - { - m_bXinerama = false; - return; // multiple screens mean no xinerama - } -#ifdef USE_XINERAMA -#if defined(USE_XINERAMA_XSUN) - int nFramebuffers = 1; - if( XineramaGetState( pDisp_, m_nDefaultScreen ) ) - { - XRectangle pFramebuffers[MAXFRAMEBUFFERS]; - unsigned char hints[MAXFRAMEBUFFERS]; - int result = XineramaGetInfo( pDisp_, - m_nDefaultScreen, - pFramebuffers, - hints, - &nFramebuffers ); - if( result > 0 && nFramebuffers > 1 ) - { - m_bXinerama = true; - m_aXineramaScreens = std::vector(); - for( int i = 0; i < nFramebuffers; i++ ) - addXineramaScreenUnique( pFramebuffers[i].x, - pFramebuffers[i].y, - pFramebuffers[i].width, - pFramebuffers[i].height ); - } - } -#elif defined(USE_XINERAMA_XORG) -if( XineramaIsActive( pDisp_ ) ) -{ - int nFramebuffers = 1; - XineramaScreenInfo* pScreens = XineramaQueryScreens( pDisp_, &nFramebuffers ); - if( pScreens ) - { - if( nFramebuffers > 1 ) - { - m_aXineramaScreens = std::vector(); - for( int i = 0; i < nFramebuffers; i++ ) - { - addXineramaScreenUnique( pScreens[i].x_org, - pScreens[i].y_org, - pScreens[i].width, - pScreens[i].height ); - } - m_bXinerama = m_aXineramaScreens.size() > 1; - } - XFree( pScreens ); - } -} -#endif -#if OSL_DEBUG_LEVEL > 1 - if( m_bXinerama ) - { - for( std::vector< Rectangle >::const_iterator it = m_aXineramaScreens.begin(); it != m_aXineramaScreens.end(); ++it ) - fprintf( stderr, "Xinerama screen: %ldx%ld+%ld+%ld\n", it->GetWidth(), it->GetHeight(), it->Left(), it->Top() ); - } -#endif -#endif // USE_XINERAMA -} - -void SalDisplay::registerFrame( SalFrame* pFrame ) -{ - m_aFrames.push_front( pFrame ); -} - -void SalDisplay::deregisterFrame( SalFrame* pFrame ) -{ - if( osl_acquireMutex( hEventGuard_ ) ) - { - std::list< SalUserEvent >::iterator it = m_aUserEvents.begin(); - while ( it != m_aUserEvents.end() ) - { - if( it->m_pFrame == pFrame ) - it = m_aUserEvents.erase( it ); - else - ++it; - } - osl_releaseMutex( hEventGuard_ ); - } - else { - DBG_ERROR( "SalDisplay::deregisterFrame !acquireMutex\n" ); - } - - m_aFrames.remove( pFrame ); -} - - -extern "C" -{ - static Bool timestamp_predicate( Display*, XEvent* i_pEvent, XPointer i_pArg ) - { - SalDisplay* pSalDisplay = reinterpret_cast(i_pArg); - if( i_pEvent->type == PropertyNotify && - i_pEvent->xproperty.window == pSalDisplay->GetDrawable( pSalDisplay->GetDefaultScreenNumber() ) && - i_pEvent->xproperty.atom == pSalDisplay->getWMAdaptor()->getAtom( WMAdaptor::SAL_GETTIMEEVENT ) - ) - return True; - - return False; - } -} - -XLIB_Time SalDisplay::GetLastUserEventTime( bool i_bAlwaysReget ) const -{ - if( m_nLastUserEventTime == CurrentTime || i_bAlwaysReget ) - { - // get current server time - unsigned char c = 0; - XEvent aEvent; - Atom nAtom = getWMAdaptor()->getAtom( WMAdaptor::SAL_GETTIMEEVENT ); - XChangeProperty( GetDisplay(), GetDrawable( GetDefaultScreenNumber() ), - nAtom, nAtom, 8, PropModeReplace, &c, 1 ); - XFlush( GetDisplay() ); - - if( ! XIfEventWithTimeout( &aEvent, (XPointer)this, timestamp_predicate ) ) - { - // this should not happen at all; still sometimes it happens - aEvent.xproperty.time = CurrentTime; - } - - m_nLastUserEventTime = aEvent.xproperty.time; - } - return m_nLastUserEventTime; -} - -bool SalDisplay::XIfEventWithTimeout( XEvent* o_pEvent, XPointer i_pPredicateData, - X_if_predicate i_pPredicate, long i_nTimeout ) const -{ - /* #i99360# ugly workaround an X11 library bug - this replaces the following call: - XIfEvent( GetDisplay(), o_pEvent, i_pPredicate, i_pPredicateData ); - */ - bool bRet = true; - - if( ! XCheckIfEvent( GetDisplay(), o_pEvent, i_pPredicate, i_pPredicateData ) ) - { - // wait for some event to arrive - struct pollfd aFD; - aFD.fd = ConnectionNumber(GetDisplay()); - aFD.events = POLLIN; - aFD.revents = 0; - poll( &aFD, 1, i_nTimeout ); - if( ! XCheckIfEvent( GetDisplay(), o_pEvent, i_pPredicate, i_pPredicateData ) ) - { - poll( &aFD, 1, i_nTimeout ); // try once more for a packet of events from the Xserver - if( ! XCheckIfEvent( GetDisplay(), o_pEvent, i_pPredicate, i_pPredicateData ) ) - { - bRet = false; - } - } - } - return bRet; -} - -// -=-= SalVisual -=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -SalVisual::SalVisual() -{ - rtl_zeroMemory( this, sizeof( SalVisual ) ); -} - -SalVisual::SalVisual( const XVisualInfo* pXVI ) -{ - *(XVisualInfo*)this = *pXVI; - if( GetClass() == TrueColor ) - { - nRedShift_ = sal_Shift( red_mask ); - nGreenShift_ = sal_Shift( green_mask ); - nBlueShift_ = sal_Shift( blue_mask ); - - nRedBits_ = sal_significantBits( red_mask ); - nGreenBits_ = sal_significantBits( green_mask ); - nBlueBits_ = sal_significantBits( blue_mask ); - - if( GetDepth() == 24 ) - if( red_mask == 0xFF0000 ) - if( green_mask == 0xFF00 ) - if( blue_mask == 0xFF ) - eRGBMode_ = RGB; - else - eRGBMode_ = other; - else if( blue_mask == 0xFF00 ) - if( green_mask == 0xFF ) - eRGBMode_ = RBG; - else - eRGBMode_ = other; - else - eRGBMode_ = other; - else if( green_mask == 0xFF0000 ) - if( red_mask == 0xFF00 ) - if( blue_mask == 0xFF ) - eRGBMode_ = GRB; - else - eRGBMode_ = other; - else if( blue_mask == 0xFF00 ) - if( red_mask == 0xFF ) - eRGBMode_ = GBR; - else - eRGBMode_ = other; - else - eRGBMode_ = other; - else if( blue_mask == 0xFF0000 ) - if( red_mask == 0xFF00 ) - if( green_mask == 0xFF ) - eRGBMode_ = BRG; - else - eRGBMode_ = other; - else if( green_mask == 0xFF00 ) - if( red_mask == 0xFF ) - eRGBMode_ = BGR; - else - eRGBMode_ = other; - else - eRGBMode_ = other; - else - eRGBMode_ = other; - else - eRGBMode_ = other; - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -SalVisual::~SalVisual() -{ - if( -1 == screen && VisualID(-1) == visualid ) delete visual; -} - -// Konvertiert die Reihenfolge der Bytes eines Pixel in Bytes eines SalColors -// fuer die 6 XXXA ist das nicht reversibel -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// SalColor is RGB (ABGR) a=0xFF000000, r=0xFF0000, g=0xFF00, b=0xFF - -#define SALCOLOR RGB -#define SALCOLORREVERSE BGR - -BOOL SalVisual::Convert( int &n0, int &n1, int &n2, int &n3 ) -{ - int n; - - switch( GetMode() ) - { - case other: - return FALSE; - case SALCOLOR: - break; - case SALCOLORREVERSE: - case RBG: - case BRG: - case GBR: - case GRB: - return Convert( n0, n1, n2 ); - case RGBA: - n = n0; - n0 = n1; - n1 = n2; - n2 = n3; - n3 = n; - break; - case BGRA: - case RBGA: - case BRGA: - case GBRA: - case GRBA: - default: - fprintf( stderr, "SalVisual::Convert %d\n", GetMode() ); - abort(); - } - return TRUE; -} - -BOOL SalVisual::Convert( int &n0, int &n1, int &n2 ) -{ - int n; - - switch( GetMode() ) - { - case other: - return FALSE; - case SALCOLOR: - break; - case RBG: - n = n0; - n0 = n1; - n1 = n; - break; - case GRB: - n = n1; - n1 = n2; - n2 = n; - break; - case SALCOLORREVERSE: - n = n0; - n0 = n2; - n2 = n; - break; - case BRG: - n = n0; - n0 = n1; - n1 = n2; - n2 = n; - break; - case GBR: - n = n2; - n2 = n1; - n1 = n0; - n0 = n; - break; - default: - fprintf( stderr, "SalVisual::Convert %d\n", GetMode() ); - abort(); - } - return TRUE; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -SalColor SalVisual::GetTCColor( Pixel nPixel ) const -{ - if( SALCOLOR == eRGBMode_ ) - return (SalColor)nPixel; - - if( SALCOLORREVERSE == eRGBMode_ ) - return MAKE_SALCOLOR( (nPixel & 0x0000FF), - (nPixel & 0x00FF00) >> 8, - (nPixel & 0xFF0000) >> 16); - - Pixel r = nPixel & red_mask; - Pixel g = nPixel & green_mask; - Pixel b = nPixel & blue_mask; - - if( other != eRGBMode_ ) // 8+8+8=24 - return MAKE_SALCOLOR( r >> nRedShift_, - g >> nGreenShift_, - b >> nBlueShift_ ); - - if( nRedShift_ > 0 ) r >>= nRedShift_; else r <<= -nRedShift_; - if( nGreenShift_ > 0 ) g >>= nGreenShift_; else g <<= -nGreenShift_; - if( nBlueShift_ > 0 ) b >>= nBlueShift_; else b <<= -nBlueShift_; - - if( nRedBits_ != 8 ) - r |= (r & 0xff) >> (8-nRedBits_); - if( nGreenBits_ != 8 ) - g |= (g & 0xff) >> (8-nGreenBits_); - if( nBlueBits_ != 8 ) - b |= (b & 0xff) >> (8-nBlueBits_); - - return MAKE_SALCOLOR( r, g, b ); -} - -Pixel SalVisual::GetTCPixel( SalColor nSalColor ) const -{ - if( SALCOLOR == eRGBMode_ ) - return (Pixel)nSalColor; - - Pixel r = (Pixel)SALCOLOR_RED( nSalColor ); - Pixel g = (Pixel)SALCOLOR_GREEN( nSalColor ); - Pixel b = (Pixel)SALCOLOR_BLUE( nSalColor ); - - if( SALCOLORREVERSE == eRGBMode_ ) - return (b << 16) | (g << 8) | (r); - - if( other != eRGBMode_ ) // 8+8+8=24 - return (r << nRedShift_) | (g << nGreenShift_) | (b << nBlueShift_); - - if( nRedShift_ > 0 ) r <<= nRedShift_; else r >>= -nRedShift_; - if( nGreenShift_ > 0 ) g <<= nGreenShift_; else g >>= -nGreenShift_; - if( nBlueShift_ > 0 ) b <<= nBlueShift_; else b >>= -nBlueShift_; - - return (r&red_mask) | (g&green_mask) | (b&blue_mask); -} - -// -=-= SalColormap -=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -SalColormap::SalColormap( const SalDisplay *pDisplay, Colormap hColormap, int nScreen ) - : m_pDisplay( pDisplay ), - m_hColormap( hColormap ), - m_nScreen( nScreen ) -{ - m_aVisual = m_pDisplay->GetVisual( m_nScreen ); - - XColor aColor; - - GetXPixel( aColor, 0x00, 0x00, 0x00 ); - m_nBlackPixel = aColor.pixel; - - GetXPixel( aColor, 0xFF, 0xFF, 0xFF ); - m_nWhitePixel = aColor.pixel; - - m_nUsed = 1 << m_aVisual.GetDepth(); - - if( m_aVisual.GetClass() == PseudoColor ) - { - int r, g, b; - - // black, white, gray, ~gray = 4 - GetXPixels( aColor, 0xC0, 0xC0, 0xC0 ); - - // light colors: 3 * 2 = 6 -// GetXPixels( aColor, 0x00, 0x00, 0x00 ); - GetXPixels( aColor, 0x00, 0x00, 0xFF ); - GetXPixels( aColor, 0x00, 0xFF, 0x00 ); - GetXPixels( aColor, 0x00, 0xFF, 0xFF ); -// GetXPixels( aColor, 0xFF, 0x00, 0x00 ); -// GetXPixels( aColor, 0xFF, 0x00, 0xFF ); -// GetXPixels( aColor, 0xFF, 0xFF, 0x00 ); -// GetXPixels( aColor, 0xFF, 0xFF, 0xFF ); - - // standard colors: 7 * 2 = 14 -// GetXPixels( aColor, 0x00, 0x00, 0x00 ); - GetXPixels( aColor, 0x00, 0x00, 0x80 ); - GetXPixels( aColor, 0x00, 0x80, 0x00 ); - GetXPixels( aColor, 0x00, 0x80, 0x80 ); - GetXPixels( aColor, 0x80, 0x00, 0x00 ); - GetXPixels( aColor, 0x80, 0x00, 0x80 ); - GetXPixels( aColor, 0x80, 0x80, 0x00 ); - GetXPixels( aColor, 0x80, 0x80, 0x80 ); - GetXPixels( aColor, 0x00, 0xB8, 0xFF ); // Blau 7 - - // cube: 6*6*6 - 8 = 208 - for( r = 0; r < 0x100; r += 0x33 ) // 0x33, 0x66, 0x99, 0xCC, 0xFF - for( g = 0; g < 0x100; g += 0x33 ) - for( b = 0; b < 0x100; b += 0x33 ) - GetXPixels( aColor, r, g, b ); - - // gray: 16 - 6 = 10 - for( g = 0x11; g < 0xFF; g += 0x11 ) - GetXPixels( aColor, g, g, g ); - - // green: 16 - 6 = 10 - for( g = 0x11; g < 0xFF; g += 0x11 ) - GetXPixels( aColor, 0, g, 0 ); - - // red: 16 - 6 = 10 - for( r = 0x11; r < 0xFF; r += 0x11 ) - GetXPixels( aColor, r, 0, 0 ); - - // blue: 16 - 6 = 10 - for( b = 0x11; b < 0xFF; b += 0x11 ) - GetXPixels( aColor, 0, 0, b ); - } -} - -// PseudoColor -SalColormap::SalColormap( const BitmapPalette &rPalette ) - : m_pDisplay( GetX11SalData()->GetDisplay() ), - m_hColormap( None ), - m_nWhitePixel( SALCOLOR_NONE ), - m_nBlackPixel( SALCOLOR_NONE ), - m_nUsed( rPalette.GetEntryCount() ), - m_nScreen( GetX11SalData()->GetDisplay()->GetDefaultScreenNumber() ) -{ - m_aPalette = std::vector(m_nUsed); - - for( unsigned int i = 0; i < m_nUsed; i++ ) - { - const BitmapColor &rColor = rPalette[i]; - m_aPalette[i] = MAKE_SALCOLOR( rColor.GetRed(), - rColor.GetGreen(), - rColor.GetBlue() ); - if( (m_nBlackPixel == SALCOLOR_NONE) && (SALCOLOR_BLACK == m_aPalette[i]) ) - m_nBlackPixel = i; - else if( (m_nWhitePixel == SALCOLOR_NONE) && (SALCOLOR_WHITE == m_aPalette[i]) ) - m_nWhitePixel = i; - } -} - -// MonoChrome -SalColormap::SalColormap() - : m_pDisplay( GetX11SalData()->GetDisplay() ), - m_hColormap( None ), - m_nWhitePixel( 1 ), - m_nBlackPixel( 0 ), - m_nUsed( 2 ), - m_nScreen( 0 ) -{ - if( m_pDisplay ) - m_nScreen = m_pDisplay->GetDefaultScreenNumber(); - m_aPalette = std::vector(m_nUsed); - - m_aPalette[m_nBlackPixel] = SALCOLOR_BLACK; - m_aPalette[m_nWhitePixel] = SALCOLOR_WHITE; -} - -// TrueColor -SalColormap::SalColormap( USHORT nDepth ) - : m_pDisplay( GetX11SalData()->GetDisplay() ), - m_hColormap( None ), - m_nWhitePixel( (1 << nDepth) - 1 ), - m_nBlackPixel( 0x00000000 ), - m_nUsed( 1 << nDepth ), - m_nScreen( GetX11SalData()->GetDisplay()->GetDefaultScreenNumber() ) -{ - const SalVisual *pVisual = &m_pDisplay->GetVisual( m_nScreen ); - - if( pVisual->GetClass() == TrueColor && pVisual->GetDepth() == nDepth ) - m_aVisual = *pVisual; - else - { - XVisualInfo aVI; - - if( !XMatchVisualInfo( m_pDisplay->GetDisplay(), - m_pDisplay->GetDefaultScreenNumber(), - nDepth, - TrueColor, - &aVI ) ) - { - aVI.visual = new Visual(); - aVI.visualid = (VisualID)0; // beware of temporary destructor below - aVI.screen = 0; - aVI.depth = nDepth; - aVI.c_class = TrueColor; - if( 24 == nDepth ) // 888 - { - aVI.red_mask = 0xFF0000; - aVI.green_mask = 0x00FF00; - aVI.blue_mask = 0x0000FF; - } - else if( 16 == nDepth ) // 565 - { - aVI.red_mask = 0x00F800; - aVI.green_mask = 0x0007E0; - aVI.blue_mask = 0x00001F; - } - else if( 15 == nDepth ) // 555 - { - aVI.red_mask = 0x007C00; - aVI.green_mask = 0x0003E0; - aVI.blue_mask = 0x00001F; - } - else if( 12 == nDepth ) // 444 - { - aVI.red_mask = 0x000F00; - aVI.green_mask = 0x0000F0; - aVI.blue_mask = 0x00000F; - } - else if( 8 == nDepth ) // 332 - { - aVI.red_mask = 0x0000E0; - aVI.green_mask = 0x00001C; - aVI.blue_mask = 0x000003; - } - else - { - aVI.red_mask = 0x000000; - aVI.green_mask = 0x000000; - aVI.blue_mask = 0x000000; - } - aVI.colormap_size = 0; - aVI.bits_per_rgb = 8; - - aVI.visual->ext_data = NULL; - aVI.visual->visualid = aVI.visualid; - aVI.visual->c_class = aVI.c_class; - aVI.visual->red_mask = aVI.red_mask; - aVI.visual->green_mask = aVI.green_mask; - aVI.visual->blue_mask = aVI.blue_mask; - aVI.visual->bits_per_rgb = aVI.bits_per_rgb; - aVI.visual->map_entries = aVI.colormap_size; - - m_aVisual = SalVisual( &aVI ); - // give ownership of constructed Visual() to m_aVisual - // see SalVisual destructor - m_aVisual.visualid = (VisualID)-1; - m_aVisual.screen = -1; - } - else - m_aVisual = SalVisual( &aVI ); - } -} - -SalColormap::~SalColormap() -{ -#ifdef DBG_UTIL - m_hColormap = (Colormap)ILLEGAL_POINTER; - m_pDisplay = (SalDisplay*)ILLEGAL_POINTER; -#endif -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void SalColormap::SetPalette( const BitmapPalette &rPalette ) -{ - if( this != &GetX11SalData()->GetDisplay()->GetColormap(m_nScreen) ) - { - m_nBlackPixel = SALCOLOR_NONE; - m_nWhitePixel = SALCOLOR_NONE; - } - - if( rPalette.GetEntryCount() > m_nUsed ) - { - m_nBlackPixel = SALCOLOR_NONE; - m_nWhitePixel = SALCOLOR_NONE; - m_nUsed = rPalette.GetEntryCount(); - m_aPalette = std::vector(m_nUsed); - } - - for( int i = 0; i < rPalette.GetEntryCount(); i++ ) - { - const BitmapColor &rColor = rPalette[i]; - m_aPalette[i] = MAKE_SALCOLOR( rColor.GetRed(), - rColor.GetGreen(), - rColor.GetBlue() ); - if( (m_nBlackPixel == SALCOLOR_NONE) && (SALCOLOR_BLACK == m_aPalette[i]) ) - m_nBlackPixel = i; - else if( (m_nWhitePixel == SALCOLOR_NONE) && (SALCOLOR_WHITE == m_aPalette[i]) ) - m_nWhitePixel = i; - } -} - -void SalColormap::GetPalette() -{ - Pixel i; - m_aPalette = std::vector(m_nUsed); - - XColor *aColor = new XColor[m_nUsed]; - - for( i = 0; i < m_nUsed; i++ ) - { - aColor[i].red = aColor[i].green = aColor[i].blue = 0; - aColor[i].pixel = i; - } - - XQueryColors( m_pDisplay->GetDisplay(), m_hColormap, aColor, m_nUsed ); - - for( i = 0; i < m_nUsed; i++ ) - { - m_aPalette[i] = MAKE_SALCOLOR( aColor[i].red >> 8, - aColor[i].green >> 8, - aColor[i].blue >> 8 ); - } - - delete [] aColor; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -static USHORT sal_Lookup( const std::vector& rPalette, - int r, int g, int b, - Pixel nUsed ) -{ - USHORT nPixel = 0; - int nBest = ColorDiff( rPalette[0], r, g, b ); - - for( USHORT i = 1; i < nUsed; i++ ) - { - int n = ColorDiff( rPalette[i], r, g, b ); - - if( n < nBest ) - { - if( !n ) - return i; - - nPixel = i; - nBest = n; - } - } - return nPixel; -} - -void SalColormap::GetLookupTable() -{ - m_aLookupTable = std::vector(16*16*16); - - int i = 0; - for( int r = 0; r < 256; r += 17 ) - for( int g = 0; g < 256; g += 17 ) - for( int b = 0; b < 256; b += 17 ) - m_aLookupTable[i++] = sal_Lookup( m_aPalette, r, g, b, m_nUsed ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -SalColor SalColormap::GetColor( Pixel nPixel ) const -{ - if( m_nBlackPixel == nPixel ) return SALCOLOR_BLACK; - if( m_nWhitePixel == nPixel ) return SALCOLOR_WHITE; - - if( m_aVisual.GetVisual() ) - { - if( m_aVisual.GetClass() == TrueColor ) - return m_aVisual.GetTCColor( nPixel ); - - if( m_aPalette.empty() - && m_hColormap -#ifdef PSEUDOCOLOR12 - && m_aVisual.GetDepth() <= 12 -#else - && m_aVisual.GetDepth() <= 8 -#endif - && m_aVisual.GetClass() == PseudoColor ) - ((SalColormap*)this)->GetPalette(); - } - - if( !m_aPalette.empty() && nPixel < m_nUsed ) - return m_aPalette[nPixel]; - - if( m_hColormap ) - { - DBG_ASSERT( 1, "SalColormap::GetColor() !hColormap_\n" ); - return nPixel; - } - - // DirectColor, StaticColor, StaticGray, GrayScale - XColor aColor; - - aColor.pixel = nPixel; - - XQueryColor( m_pDisplay->GetDisplay(), m_hColormap, &aColor ); - - return MAKE_SALCOLOR( aColor.red>>8, aColor.green>>8, aColor.blue>>8 ); -} - -inline BOOL SalColormap::GetXPixel( XColor &rColor, - int r, - int g, - int b ) const -{ - rColor.red = r * 257; - rColor.green = g * 257; - rColor.blue = b * 257; - return XAllocColor( GetXDisplay(), m_hColormap, &rColor ); -} - -BOOL SalColormap::GetXPixels( XColor &rColor, - int r, - int g, - int b ) const -{ - if( !GetXPixel( rColor, r, g, b ) ) - return FALSE; - if( rColor.pixel & 1 ) - return TRUE; - return GetXPixel( rColor, r^0xFF, g^0xFF, b^0xFF ); -} - -Pixel SalColormap::GetPixel( SalColor nSalColor ) const -{ - if( SALCOLOR_NONE == nSalColor ) return 0; - if( SALCOLOR_BLACK == nSalColor ) return m_nBlackPixel; - if( SALCOLOR_WHITE == nSalColor ) return m_nWhitePixel; - - if( m_aVisual.GetClass() == TrueColor ) - return m_aVisual.GetTCPixel( nSalColor ); - - if( m_aLookupTable.empty() ) - { - if( m_aPalette.empty() - && m_hColormap -#ifdef PSEUDOCOLOR12 - && m_aVisual.GetDepth() <= 12 -#else - && m_aVisual.GetDepth() <= 8 -#endif - && m_aVisual.GetClass() == PseudoColor ) // what else ??? - ((SalColormap*)this)->GetPalette(); - - if( !m_aPalette.empty() ) - for( Pixel i = 0; i < m_nUsed; i++ ) - if( m_aPalette[i] == nSalColor ) - return i; - - if( m_hColormap ) - { - // DirectColor, StaticColor, StaticGray, GrayScale (PseudoColor) - XColor aColor; - - if( GetXPixel( aColor, - SALCOLOR_RED ( nSalColor ), - SALCOLOR_GREEN( nSalColor ), - SALCOLOR_BLUE ( nSalColor ) ) ) - { - if( !m_aPalette.empty() && !m_aPalette[aColor.pixel] ) - { - const_cast(this)->m_aPalette[aColor.pixel] = nSalColor; - - if( !(aColor.pixel & 1) && !m_aPalette[aColor.pixel+1] ) - { - XColor aInversColor; - - SalColor nInversColor = nSalColor ^ 0xFFFFFF; - - GetXPixel( aInversColor, - SALCOLOR_RED ( nInversColor ), - SALCOLOR_GREEN( nInversColor ), - SALCOLOR_BLUE ( nInversColor ) ); - - if( !m_aPalette[aInversColor.pixel] ) - const_cast(this)->m_aPalette[aInversColor.pixel] = nInversColor; -#ifdef DBG_UTIL - else - fprintf( stderr, "SalColormap::GetPixel() 0x%06lx=%lu 0x%06lx=%lu\n", - static_cast< unsigned long >(nSalColor), aColor.pixel, - static_cast< unsigned long >(nInversColor), aInversColor.pixel); -#endif - } - } - - return aColor.pixel; - } - -#ifdef DBG_UTIL - fprintf( stderr, "SalColormap::GetPixel() !XAllocColor %lx\n", - static_cast< unsigned long >(nSalColor) ); -#endif - } - - if( m_aPalette.empty() ) - { -#ifdef DBG_UTIL - fprintf( stderr, "SalColormap::GetPixel() Palette empty %lx\n", - static_cast< unsigned long >(nSalColor)); -#endif - return nSalColor; - } - - ((SalColormap*)this)->GetLookupTable(); - } - - // Colormatching ueber Palette - USHORT r = SALCOLOR_RED ( nSalColor ); - USHORT g = SALCOLOR_GREEN( nSalColor ); - USHORT b = SALCOLOR_BLUE ( nSalColor ); - return m_aLookupTable[ (((r+8)/17) << 8) - + (((g+8)/17) << 4) - + ((b+8)/17) ]; -} - diff --git a/vcl/unx/source/app/salinst.cxx b/vcl/unx/source/app/salinst.cxx deleted file mode 100644 index f125d5f98fa6..000000000000 --- a/vcl/unx/source/app/salinst.cxx +++ /dev/null @@ -1,451 +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_vcl.hxx" - -#include -#include -#include - -#include - -#include "salunx.h" - -#include "saldata.hxx" -#include "saldisp.hxx" -#include "salinst.h" -#include "salframe.h" -#include "dtint.hxx" -#include "salprn.h" -#include "sm.hxx" - -#include "vcl/salwtype.hxx" -#include "vcl/apptypes.hxx" -#include "vcl/helper.hxx" -#include -#include "vos/mutex.hxx" - -// ------------------------------------------------------------------------- -// -// SalYieldMutex -// -// ------------------------------------------------------------------------- - -SalYieldMutex::SalYieldMutex() -{ - mnCount = 0; - mnThreadId = 0; - ::tools::SolarMutex::SetSolarMutex( this ); -} - -void SalYieldMutex::acquire() -{ - OMutex::acquire(); - mnThreadId = vos::OThread::getCurrentIdentifier(); - mnCount++; -} - -void SalYieldMutex::release() -{ - if ( mnThreadId == vos::OThread::getCurrentIdentifier() ) - { - if ( mnCount == 1 ) - mnThreadId = 0; - mnCount--; - } - OMutex::release(); -} - -sal_Bool SalYieldMutex::tryToAcquire() -{ - if ( OMutex::tryToAcquire() ) - { - mnThreadId = vos::OThread::getCurrentIdentifier(); - mnCount++; - return True; - } - else - return False; -} - -//---------------------------------------------------------------------------- - -// -=-= SalInstance =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -// plugin factory function -extern "C" -{ - VCL_DLLPUBLIC SalInstance* create_SalInstance() - { - /* #i92121# workaround deadlocks in the X11 implementation - */ - static const char* pNoXInitThreads = getenv( "SAL_NO_XINITTHREADS" ); - /* #i90094# - from now on we know that an X connection will be - established, so protect X against itself - */ - if( ! ( pNoXInitThreads && *pNoXInitThreads ) ) - XInitThreads(); - - X11SalInstance* pInstance = new X11SalInstance( new SalYieldMutex() ); - - // initialize SalData - X11SalData *pSalData = new X11SalData; - SetSalData( pSalData ); - pSalData->m_pInstance = pInstance; - pSalData->Init(); - - return pInstance; - } -} - -X11SalInstance::~X11SalInstance() -{ - // close session management - SessionManagerClient::close(); - - // dispose SalDisplay list from SalData - // would be done in a static destructor else which is - // a little late - - X11SalData *pSalData = GetX11SalData(); - pSalData->deInitNWF(); - delete pSalData; - SetSalData( NULL ); - - ::tools::SolarMutex::SetSolarMutex( 0 ); - delete mpSalYieldMutex; -} - - -// -------------------------------------------------------- -// AnyInput from sv/mow/source/app/svapp.cxx - -struct PredicateReturn -{ - USHORT nType; - BOOL bRet; -}; - -extern "C" { -Bool ImplPredicateEvent( Display *, XEvent *pEvent, char *pData ) -{ - PredicateReturn *pPre = (PredicateReturn *)pData; - - if ( pPre->bRet ) - return False; - - USHORT nType; - - switch( pEvent->type ) - { - case ButtonPress: - case ButtonRelease: - case MotionNotify: - case EnterNotify: - case LeaveNotify: - nType = INPUT_MOUSE; - break; - - case XLIB_KeyPress: - //case KeyRelease: - nType = INPUT_KEYBOARD; - break; - case Expose: - case GraphicsExpose: - case NoExpose: - nType = INPUT_PAINT; - break; - default: - nType = 0; - } - - if ( (nType & pPre->nType) || ( ! nType && (pPre->nType & INPUT_OTHER) ) ) - pPre->bRet = TRUE; - - return False; -} -} - -bool X11SalInstance::AnyInput(USHORT nType) -{ - X11SalData *pSalData = GetX11SalData(); - Display *pDisplay = pSalData->GetDisplay()->GetDisplay(); - BOOL bRet = FALSE; - - if( (nType & INPUT_TIMER) && - pSalData->GetDisplay()->GetXLib()->CheckTimeout( false ) ) - { - bRet = TRUE; - } - else if (XPending(pDisplay) ) - { - PredicateReturn aInput; - XEvent aEvent; - - aInput.bRet = FALSE; - aInput.nType = nType; - - XCheckIfEvent(pDisplay, &aEvent, ImplPredicateEvent, - (char *)&aInput ); - - bRet = aInput.bRet; - } - return bRet; -} - -vos::IMutex* X11SalInstance::GetYieldMutex() -{ - return mpSalYieldMutex; -} - -// ----------------------------------------------------------------------- - -ULONG X11SalInstance::ReleaseYieldMutex() -{ - SalYieldMutex* pYieldMutex = mpSalYieldMutex; - if ( pYieldMutex->GetThreadId() == - vos::OThread::getCurrentIdentifier() ) - { - ULONG nCount = pYieldMutex->GetAcquireCount(); - ULONG n = nCount; - while ( n ) - { - pYieldMutex->release(); - n--; - } - - return nCount; - } - else - return 0; -} - -// ----------------------------------------------------------------------- - -void X11SalInstance::AcquireYieldMutex( ULONG nCount ) -{ - SalYieldMutex* pYieldMutex = mpSalYieldMutex; - while ( nCount ) - { - pYieldMutex->acquire(); - nCount--; - } -} - -// ----------------------------------------------------------------------- - -bool X11SalInstance::CheckYieldMutex() -{ - bool bRet = true; - - SalYieldMutex* pYieldMutex = mpSalYieldMutex; - if ( pYieldMutex->GetThreadId() != - vos::OThread::getCurrentIdentifier() ) - { - bRet = false; - } - - return bRet; -} - -// ----------------------------------------------------------------------- - -void X11SalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents ) -{ GetX11SalData()->GetLib()->Yield( bWait, bHandleAllCurrentEvents ); } - -void* X11SalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ) -{ - static const char* pDisplay = getenv( "DISPLAY" ); - rReturnedType = AsciiCString; - rReturnedBytes = pDisplay ? strlen( pDisplay )+1 : 1; - return pDisplay ? (void*)pDisplay : (void*)""; -} - -SalFrame *X11SalInstance::CreateFrame( SalFrame *pParent, ULONG nSalFrameStyle ) -{ - SalFrame *pFrame = new X11SalFrame( pParent, nSalFrameStyle ); - - return pFrame; -} - -SalFrame* X11SalInstance::CreateChildFrame( SystemParentData* pParentData, ULONG nStyle ) -{ - SalFrame* pFrame = new X11SalFrame( NULL, nStyle, pParentData ); - - return pFrame; -} - -void X11SalInstance::DestroyFrame( SalFrame* pFrame ) -{ - delete pFrame; -} - -static void getServerDirectories( std::list< rtl::OString >& o_rFontPaths ) -{ -#ifdef LINUX - /* - * chkfontpath exists on some (RH derived) Linux distributions - */ - static const char* pCommands[] = { - "/usr/sbin/chkfontpath 2>/dev/null", "chkfontpath 2>/dev/null" - }; - ::std::list< ByteString > aLines; - - for( unsigned int i = 0; i < sizeof(pCommands)/sizeof(pCommands[0]); i++ ) - { - FILE* pPipe = popen( pCommands[i], "r" ); - aLines.clear(); - if( pPipe ) - { - char line[1024]; - char* pSearch; - while( fgets( line, sizeof(line), pPipe ) ) - { - int nLen = strlen( line ); - if( line[nLen-1] == '\n' ) - line[nLen-1] = 0; - pSearch = strstr( line, ": " ); - if( pSearch ) - aLines.push_back( pSearch+2 ); - } - if( ! pclose( pPipe ) ) - break; - } - } - - for( ::std::list< ByteString >::iterator it = aLines.begin(); it != aLines.end(); ++it ) - { - if( ! access( it->GetBuffer(), F_OK ) ) - { - o_rFontPaths.push_back( *it ); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "adding fs dir %s\n", it->GetBuffer() ); -#endif - } - } -#else - (void)o_rFontPaths; -#endif -} - - - -void X11SalInstance::FillFontPathList( std::list< rtl::OString >& o_rFontPaths ) -{ - Display *pDisplay = GetX11SalData()->GetDisplay()->GetDisplay(); - - DBG_ASSERT( pDisplay, "No Display !" ); - if( pDisplay ) - { - // get font paths to look for fonts - int nPaths = 0, i; - char** pPaths = XGetFontPath( pDisplay, &nPaths ); - - bool bServerDirs = false; - for( i = 0; i < nPaths; i++ ) - { - OString aPath( pPaths[i] ); - sal_Int32 nPos = 0; - if( ! bServerDirs - && ( nPos = aPath.indexOf( ':' ) ) > 0 - && ( !aPath.copy(nPos).equals( ":unscaled" ) ) ) - { - bServerDirs = true; - getServerDirectories( o_rFontPaths ); - } - else - { - psp::normPath( aPath ); - o_rFontPaths.push_back( aPath ); - } - } - - if( nPaths ) - XFreeFontPath( pPaths ); - } - - // insert some standard directories - o_rFontPaths.push_back( "/usr/openwin/lib/X11/fonts/TrueType" ); - o_rFontPaths.push_back( "/usr/openwin/lib/X11/fonts/Type1" ); - o_rFontPaths.push_back( "/usr/openwin/lib/X11/fonts/Type1/sun" ); - o_rFontPaths.push_back( "/usr/X11R6/lib/X11/fonts/truetype" ); - o_rFontPaths.push_back( "/usr/X11R6/lib/X11/fonts/Type1" ); - - #ifdef SOLARIS - /* cde specials, from /usr/dt/bin/Xsession: here are the good fonts, - the OWfontpath file may contain as well multiple lines as a comma - separated list of fonts in each line. to make it even more weird - environment variables are allowed as well */ - - const char* lang = getenv("LANG"); - if ( lang != NULL ) - { - String aOpenWinDir( String::CreateFromAscii( "/usr/openwin/lib/locale/" ) ); - aOpenWinDir.AppendAscii( lang ); - aOpenWinDir.AppendAscii( "/OWfontpath" ); - - SvFileStream aStream( aOpenWinDir, STREAM_READ ); - - // TODO: replace environment variables - while( aStream.IsOpen() && ! aStream.IsEof() ) - { - ByteString aLine; - aStream.ReadLine( aLine ); - // need an OString for normpath - OString aNLine( aLine ); - psp::normPath( aNLine ); - aLine = aNLine; - // try to avoid bad fonts in some cases - static bool bAvoid = (strncasecmp( lang, "ar", 2 ) == 0) || (strncasecmp( lang, "he", 2 ) == 0) || strncasecmp( lang, "iw", 2 ) == 0 || (strncasecmp( lang, "hi", 2 ) == 0); - if( bAvoid && aLine.Search( "iso_8859" ) != STRING_NOTFOUND ) - continue; - o_rFontPaths.push_back( aLine ); - } - } - #endif /* SOLARIS */ -} - -extern "C" { static void SAL_CALL thisModule() {} } - -void X11SalInstance::AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType) -{ - const rtl::OUString SYM_ADD_TO_RECENTLY_USED_FILE_LIST(RTL_CONSTASCII_USTRINGPARAM("add_to_recently_used_file_list")); - const rtl::OUString LIB_RECENT_FILE(RTL_CONSTASCII_USTRINGPARAM("librecentfile.so")); - typedef void (*PFUNC_ADD_TO_RECENTLY_USED_LIST)(const rtl::OUString&, const rtl::OUString&); - - PFUNC_ADD_TO_RECENTLY_USED_LIST add_to_recently_used_file_list = 0; - - osl::Module module; - module.loadRelative( &thisModule, LIB_RECENT_FILE ); - if (module.is()) - add_to_recently_used_file_list = (PFUNC_ADD_TO_RECENTLY_USED_LIST)module.getFunctionSymbol(SYM_ADD_TO_RECENTLY_USED_FILE_LIST); - if (add_to_recently_used_file_list) - add_to_recently_used_file_list(rFileUrl, rMimeType); -} diff --git a/vcl/unx/source/app/salsys.cxx b/vcl/unx/source/app/salsys.cxx deleted file mode 100644 index 84c9dba32e40..000000000000 --- a/vcl/unx/source/app/salsys.cxx +++ /dev/null @@ -1,225 +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_vcl.hxx" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -SalSystem* X11SalInstance::CreateSalSystem() -{ - return new X11SalSystem(); -} - -// ----------------------------------------------------------------------- - -X11SalSystem::~X11SalSystem() -{ -} - -// for the moment only handle xinerama case -unsigned int X11SalSystem::GetDisplayScreenCount() -{ - SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); - return pSalDisp->IsXinerama() ? pSalDisp->GetXineramaScreens().size() : pSalDisp->GetScreenCount(); -} - -bool X11SalSystem::IsMultiDisplay() -{ - SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); - unsigned int nScreenCount = pSalDisp->GetScreenCount(); - return pSalDisp->IsXinerama() ? false : (nScreenCount > 1); -} - -unsigned int X11SalSystem::GetDefaultDisplayNumber() -{ - SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); - return pSalDisp->IsXinerama() ? pSalDisp->GetDefaultMonitorNumber() : pSalDisp->GetDefaultScreenNumber(); -} - -Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) -{ - Rectangle aRet; - SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); - if( pSalDisp->IsXinerama() ) - { - const std::vector< Rectangle >& rScreens = pSalDisp->GetXineramaScreens(); - if( nScreen < rScreens.size() ) - aRet = rScreens[nScreen]; - } - else - { - const SalDisplay::ScreenData& rScreen = pSalDisp->getDataForScreen( nScreen ); - aRet = Rectangle( Point( 0, 0 ), rScreen.m_aSize ); - } - - return aRet; -} - -Rectangle X11SalSystem::GetDisplayWorkAreaPosSizePixel( unsigned int nScreen ) -{ - // FIXME: workareas - return GetDisplayScreenPosSizePixel( nScreen ); -} - -rtl::OUString X11SalSystem::GetScreenName( unsigned int nScreen ) -{ - rtl::OUString aScreenName; - SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); - if( pSalDisp->IsXinerama() ) - { - const std::vector< Rectangle >& rScreens = pSalDisp->GetXineramaScreens(); - if( nScreen >= rScreens.size() ) - nScreen = 0; - rtl::OUStringBuffer aBuf( 256 ); - aBuf.append( rtl::OStringToOUString( rtl::OString( DisplayString( pSalDisp->GetDisplay() ) ), osl_getThreadTextEncoding() ) ); - aBuf.appendAscii( " [" ); - aBuf.append( static_cast(nScreen) ); - aBuf.append( sal_Unicode(']') ); - aScreenName = aBuf.makeStringAndClear(); - } - else - { - if( nScreen >= static_cast(pSalDisp->GetScreenCount()) ) - nScreen = 0; - rtl::OUStringBuffer aBuf( 256 ); - aBuf.append( rtl::OStringToOUString( rtl::OString( DisplayString( pSalDisp->GetDisplay() ) ), osl_getThreadTextEncoding() ) ); - // search backwards for ':' - int nPos = aBuf.getLength(); - if( nPos > 0 ) - nPos--; - while( nPos > 0 && aBuf.charAt( nPos ) != ':' ) - nPos--; - // search forward to '.' - while( nPos < aBuf.getLength() && aBuf.charAt( nPos ) != '.' ) - nPos++; - if( nPos < aBuf.getLength() ) - aBuf.setLength( nPos+1 ); - else - aBuf.append( sal_Unicode('.') ); - aBuf.append( static_cast(nScreen) ); - aScreenName = aBuf.makeStringAndClear(); - } - return aScreenName; -} - -int X11SalSystem::ShowNativeDialog( const String& rTitle, const String& rMessage, const std::list< String >& rButtons, int nDefButton ) -{ - int nRet = -1; - - ImplSVData* pSVData = ImplGetSVData(); - if( pSVData->mpIntroWindow ) - pSVData->mpIntroWindow->Hide(); - - WarningBox aWarn( NULL, WB_STDWORK, rMessage ); - aWarn.SetText( rTitle ); - aWarn.Clear(); - - USHORT nButton = 0; - for( std::list< String >::const_iterator it = rButtons.begin(); it != rButtons.end(); ++it ) - { - aWarn.AddButton( *it, nButton+1, nButton == (USHORT)nDefButton ? BUTTONDIALOG_DEFBUTTON : 0 ); - nButton++; - } - aWarn.SetFocusButton( (USHORT)nDefButton+1 ); - - nRet = ((int)aWarn.Execute()) - 1; - - // normalize behaviour, actually this should never happen - if( nRet < -1 || nRet >= int(rButtons.size()) ) - nRet = -1; - - return nRet; -} - -int X11SalSystem::ShowNativeMessageBox(const String& rTitle, const String& rMessage, int nButtonCombination, int nDefaultButton) -{ - int nDefButton = 0; - std::list< String > aButtons; - int nButtonIds[5], nBut = 0; - - if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK || - nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL ) - { - aButtons.push_back( Button::GetStandardText( BUTTON_OK ) ); - nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK; - } - if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO_CANCEL || - nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO ) - { - aButtons.push_back( Button::GetStandardText( BUTTON_YES ) ); - nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_YES; - aButtons.push_back( Button::GetStandardText( BUTTON_NO ) ); - nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO; - if( nDefaultButton == SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO ) - nDefButton = 1; - } - if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL || - nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO_CANCEL || - nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL ) - { - if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL ) - { - aButtons.push_back( Button::GetStandardText( BUTTON_RETRY ) ); - nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY; - } - aButtons.push_back( Button::GetStandardText( BUTTON_CANCEL ) ); - nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL; - if( nDefaultButton == SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL ) - nDefButton = aButtons.size()-1; - } - if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_ABORT_RETRY_IGNORE ) - { - aButtons.push_back( Button::GetStandardText( BUTTON_ABORT ) ); - nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_ABORT; - aButtons.push_back( Button::GetStandardText( BUTTON_RETRY ) ); - nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY; - aButtons.push_back( Button::GetStandardText( BUTTON_IGNORE ) ); - nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_IGNORE; - switch( nDefaultButton ) - { - case SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY: nDefButton = 1;break; - case SALSYSTEM_SHOWNATIVEMSGBOX_BTN_IGNORE: nDefButton = 2;break; - } - } - int nResult = ShowNativeDialog( rTitle, rMessage, aButtons, nDefButton ); - - return nResult != -1 ? nButtonIds[ nResult ] : 0; -} diff --git a/vcl/unx/source/app/saltimer.cxx b/vcl/unx/source/app/saltimer.cxx deleted file mode 100644 index 431470935d9e..000000000000 --- a/vcl/unx/source/app/saltimer.cxx +++ /dev/null @@ -1,96 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_vcl.hxx" - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -// -=-= SalData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalData::Timeout() const -{ - ImplSVData* pSVData = ImplGetSVData(); - if( pSVData->mpSalTimer ) - pSVData->mpSalTimer->CallCallback(); -} - -// -=-= SalXLib =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void SalXLib::StopTimer() -{ - m_aTimeout.tv_sec = 0; - m_aTimeout.tv_usec = 0; - m_nTimeoutMS = 0; -} - -void SalXLib::StartTimer( ULONG nMS ) -{ - timeval Timeout (m_aTimeout); // previous timeout. - gettimeofday (&m_aTimeout, 0); - - m_nTimeoutMS = nMS; - m_aTimeout += m_nTimeoutMS; - - if ((Timeout > m_aTimeout) || (Timeout.tv_sec == 0)) - { - // Wakeup from previous timeout (or stopped timer). - Wakeup(); - } -} - -// -=-= SalTimer -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -SalTimer* X11SalInstance::CreateSalTimer() -{ - return new X11SalTimer(); -} - -X11SalTimer::~X11SalTimer() -{ -} - -void X11SalTimer::Stop() -{ - GetX11SalData()->GetLib()->StopTimer(); -} - -void X11SalTimer::Start( ULONG nMS ) -{ - GetX11SalData()->GetLib()->StartTimer( nMS ); -} - diff --git a/vcl/unx/source/app/sm.cxx b/vcl/unx/source/app/sm.cxx deleted file mode 100644 index 959d6af5912d..000000000000 --- a/vcl/unx/source/app/sm.cxx +++ /dev/null @@ -1,800 +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_vcl.hxx" -#include -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#define USE_SM_EXTENSION - -#if OSL_DEBUG_LEVEL > 1 -#include -static bool bFirstAssert = true; -#endif - -#if OSL_DEBUG_LEVEL > 1 -inline void SMprintf( const char* pFormat, ... ) -#else -inline void SMprintf( const char*, ... ) -#endif -{ -#if OSL_DEBUG_LEVEL > 1 - FILE* fp = fopen( "/tmp/sessionlog.txt", bFirstAssert ? "w" : "a" ); - if(!fp) return; - bFirstAssert = false; - std::va_list ap; - va_start( ap, pFormat ); - vfprintf( fp, pFormat, ap ); - fclose( fp ); - va_end( ap ); -#endif -}; - -static IceSalSession* pOneInstance = NULL; - -SalSession* X11SalInstance::CreateSalSession() -{ - if( ! pOneInstance ) - pOneInstance = new IceSalSession(); - return pOneInstance; -} - -/* - * class IceSalSession - */ - -static X11SalFrame* pOldStyleSaveFrame = NULL; - -IceSalSession::IceSalSession() -{ -} - -IceSalSession::~IceSalSession() -{ - if( pOneInstance == this ) - pOneInstance = NULL; -} - -void IceSalSession::queryInteraction() -{ - if( ! SessionManagerClient::queryInteraction() ) - { - SalSessionInteractionEvent aEvent( false ); - CallCallback( &aEvent ); - } -} - -void IceSalSession::interactionDone() -{ - SessionManagerClient::interactionDone( false ); -} - -void IceSalSession::saveDone() -{ - SessionManagerClient::saveDone(); - if( pOldStyleSaveFrame ) - { - // note: does nothing if not running in generic plugin - X11SalFrame::SaveYourselfDone( pOldStyleSaveFrame ); - } -} - -bool IceSalSession::cancelShutdown() -{ - SessionManagerClient::interactionDone( true ); - return false; -} - -void IceSalSession::handleOldX11SaveYourself( SalFrame* pFrame ) -{ - // do this only once - if( ! pOldStyleSaveFrame ) - { - pOldStyleSaveFrame = static_cast(pFrame); - if( pOneInstance ) - { - SalSessionSaveRequestEvent aEvent( true, false ); - pOneInstance->CallCallback( &aEvent ); - } - } -} - -extern "C" void SAL_CALL ICEConnectionWorker( void* ); - -class ICEConnectionObserver -{ - friend void SAL_CALL ICEConnectionWorker(void*); - static BOOL bIsWatching; - static void ICEWatchProc( IceConn connection, IcePointer client_data, - Bool opening, IcePointer* watch_data ); - - static struct pollfd* pFilehandles; - static IceConn* pConnections; - static int nConnections; - static int nWakeupFiles[2]; - static oslMutex ICEMutex; - static oslThread ICEThread; -#ifdef USE_SM_EXTENSION - static IceIOErrorHandler origIOErrorHandler; - static IceErrorHandler origErrorHandler; -#endif -public: - - static void activate(); - static void deactivate(); - static void lock(); - static void unlock(); - static void wakeup(); -}; - - -SmcConn SessionManagerClient::aSmcConnection = NULL; -ByteString SessionManagerClient::aClientID; -BOOL ICEConnectionObserver::bIsWatching = FALSE; -struct pollfd* ICEConnectionObserver::pFilehandles = NULL; -IceConn* ICEConnectionObserver::pConnections = NULL; -int ICEConnectionObserver::nConnections = 0; -oslMutex ICEConnectionObserver::ICEMutex = NULL; -oslThread ICEConnectionObserver::ICEThread = NULL; -int ICEConnectionObserver::nWakeupFiles[2] = { 0, 0 }; - -#ifdef USE_SM_EXTENSION -IceIOErrorHandler ICEConnectionObserver::origIOErrorHandler = NULL; -IceErrorHandler ICEConnectionObserver::origErrorHandler = NULL; - -static void IgnoreIceErrors(IceConn, Bool, int, unsigned long, int, int, IcePointer) -{ -} - -static void IgnoreIceIOErrors(IceConn) -{ -} -#endif - -// HACK -bool SessionManagerClient::bDocSaveDone = false; - - -static SmProp* pSmProps = NULL; -static SmProp** ppSmProps = NULL; -static int nSmProps = 0; -static unsigned char *pSmRestartHint = NULL; - - -static void BuildSmPropertyList() -{ - if( ! pSmProps ) - { - ByteString aExec( SessionManagerClient::getExecName(), osl_getThreadTextEncoding() ); - - nSmProps = 5; - pSmProps = new SmProp[ nSmProps ]; - - pSmProps[ 0 ].name = const_cast(SmCloneCommand); - pSmProps[ 0 ].type = const_cast(SmLISTofARRAY8); - pSmProps[ 0 ].num_vals = 1; - pSmProps[ 0 ].vals = new SmPropValue; - pSmProps[ 0 ].vals->length = aExec.Len()+1; - pSmProps[ 0 ].vals->value = strdup( aExec.GetBuffer() ); - - pSmProps[ 1 ].name = const_cast(SmProgram); - pSmProps[ 1 ].type = const_cast(SmARRAY8); - pSmProps[ 1 ].num_vals = 1; - pSmProps[ 1 ].vals = new SmPropValue; - pSmProps[ 1 ].vals->length = aExec.Len()+1; - pSmProps[ 1 ].vals->value = strdup( aExec.GetBuffer() ); - - pSmProps[ 2 ].name = const_cast(SmRestartCommand); - pSmProps[ 2 ].type = const_cast(SmLISTofARRAY8); - pSmProps[ 2 ].num_vals = 3; - pSmProps[ 2 ].vals = new SmPropValue[3]; - pSmProps[ 2 ].vals[0].length = aExec.Len()+1; - pSmProps[ 2 ].vals[0].value = strdup( aExec.GetBuffer() ); - ByteString aRestartOption( "-session=" ); - aRestartOption.Append( SessionManagerClient::getSessionID() ); - pSmProps[ 2 ].vals[1].length = aRestartOption.Len()+1; - pSmProps[ 2 ].vals[1].value = strdup( aRestartOption.GetBuffer() ); - ByteString aRestartOptionNoLogo( "-nologo" ); - pSmProps[ 2 ].vals[2].length = aRestartOptionNoLogo.Len()+1; - pSmProps[ 2 ].vals[2].value = strdup( aRestartOptionNoLogo.GetBuffer() ); - - rtl::OUString aUserName; - rtl::OString aUser; - oslSecurity aSec = osl_getCurrentSecurity(); - if( aSec ) - { - osl_getUserName( aSec, &aUserName.pData ); - aUser = rtl::OUStringToOString( aUserName, osl_getThreadTextEncoding() ); - osl_freeSecurityHandle( aSec ); - } - - pSmProps[ 3 ].name = const_cast(SmUserID); - pSmProps[ 3 ].type = const_cast(SmARRAY8); - pSmProps[ 3 ].num_vals = 1; - pSmProps[ 3 ].vals = new SmPropValue; - pSmProps[ 3 ].vals->value = strdup( aUser.getStr() ); - pSmProps[ 3 ].vals->length = strlen( (char *)pSmProps[ 3 ].vals->value )+1; - - pSmProps[ 4 ].name = const_cast(SmRestartStyleHint); - pSmProps[ 4 ].type = const_cast(SmCARD8); - pSmProps[ 4 ].num_vals = 1; - pSmProps[ 4 ].vals = new SmPropValue; - pSmProps[ 4 ].vals->value = malloc(1); - pSmRestartHint = (unsigned char *)pSmProps[ 4 ].vals->value; - *pSmRestartHint = SmRestartIfRunning; - pSmProps[ 4 ].vals->length = 1; - - ppSmProps = new SmProp*[ nSmProps ]; - for( int i = 0; i < nSmProps; i++ ) - ppSmProps[ i ] = &pSmProps[i]; - } -} - -bool SessionManagerClient::checkDocumentsSaved() -{ - return bDocSaveDone; -} - -IMPL_STATIC_LINK( SessionManagerClient, SaveYourselfHdl, void*, EMPTYARG ) -{ - SMprintf( "posting save documents event shutdown = %s\n", (pThis!=0) ? "true" : "false" ); - - static bool bFirstShutdown=true; - if (pThis != 0 && bFirstShutdown) //first shutdown request - { - bFirstShutdown = false; - /* - If we have no actual frames open, e.g. we launched a quickstarter, - and then shutdown all our frames leaving just a quickstarter running, - then we don't want to launch an empty toplevel frame on the next - start. (The job of scheduling the restart of the quick-starter is a - task of the quick-starter) - */ - *pSmRestartHint = SmRestartNever; - const std::list< SalFrame* >& rFrames = GetX11SalData()->GetDisplay()->getFrames(); - for( std::list< SalFrame* >::const_iterator it = rFrames.begin(); it != rFrames.end(); ++it ) - { - Window *pWindow = (*it)->GetWindow(); - if (pWindow && pWindow->IsVisible()) - { - *pSmRestartHint = SmRestartIfRunning; - break; - } - } - } - - if( pOneInstance ) - { - SalSessionSaveRequestEvent aEvent( pThis != 0, false ); - pOneInstance->CallCallback( &aEvent ); - } - else - saveDone(); - - return 0; -} - -IMPL_STATIC_LINK_NOINSTANCE( SessionManagerClient, InteractionHdl, void*, EMPTYARG ) -{ - SMprintf( "interaction link\n" ); - if( pOneInstance ) - { - SalSessionInteractionEvent aEvent( true ); - pOneInstance->CallCallback( &aEvent ); - } - - return 0; -} - -IMPL_STATIC_LINK_NOINSTANCE( SessionManagerClient, ShutDownCancelHdl, void*, EMPTYARG ) -{ - SMprintf( "shutdown cancel\n" ); - if( pOneInstance ) - { - SalSessionShutdownCancelEvent aEvent; - pOneInstance->CallCallback( &aEvent ); - } - - return 0; -} - -void SessionManagerClient::SaveYourselfProc( - SmcConn, - SmPointer, - int save_type, - Bool shutdown, - int interact_style, - Bool - ) -{ - SMprintf( "Session: save yourself, save_type = %s, shutdown = %s, interact_style = %s, fast = %s\n", - save_type == SmSaveLocal ? "SmcSaveLocal" : - ( save_type == SmSaveGlobal ? "SmcSaveGlobal" : - ( save_type == SmSaveBoth ? "SmcSaveBoth" : "" ) ), - shutdown ? "true" : "false", - interact_style == SmInteractStyleNone ? "SmInteractStyleNone" : - ( interact_style == SmInteractStyleErrors ? "SmInteractStyleErrors" : - ( interact_style == SmInteractStyleAny ? "SmInteractStyleAny" : "" ) ), - false ? "true" : "false" - ); - BuildSmPropertyList(); -#ifdef USE_SM_EXTENSION - bDocSaveDone = false; - /* #i49875# some session managers send a "die" message if the - * saveDone does not come early enough for their convenience - * this can occasionally happen on startup, especially the first - * startup. So shortcut the "not shutting down" case since the - * upper layers are currently not interested in that event anyway. - */ - if( ! shutdown ) - { - SessionManagerClient::saveDone(); - return; - } - Application::PostUserEvent( STATIC_LINK( (void*)(shutdown ? 0xffffffff : 0x0), SessionManagerClient, SaveYourselfHdl ) ); - SMprintf( "waiting for save yourself event to be processed\n" ); -#endif -} - -IMPL_STATIC_LINK_NOINSTANCE( SessionManagerClient, ShutDownHdl, void*, EMPTYARG ) -{ - if( pOneInstance ) - { - SalSessionQuitEvent aEvent; - pOneInstance->CallCallback( &aEvent ); - } - - const std::list< SalFrame* >& rFrames = GetX11SalData()->GetDisplay()->getFrames(); - SMprintf( rFrames.begin() != rFrames.end() ? "shutdown on first frame\n" : "shutdown event but no frame\n" ); - if( rFrames.begin() != rFrames.end() ) - rFrames.front()->CallCallback( SALEVENT_SHUTDOWN, 0 ); - return 0; -} - -void SessionManagerClient::DieProc( - SmcConn connection, - SmPointer - ) -{ - SMprintf( "Session: die\n" ); - if( connection == aSmcConnection ) - { - Application::PostUserEvent( STATIC_LINK( NULL, SessionManagerClient, ShutDownHdl ) ); - SMprintf( "waiting for shutdown event to be processed\n" ); - } -} - -void SessionManagerClient::SaveCompleteProc( - SmcConn, - SmPointer - ) -{ - SMprintf( "Session: save complete\n" ); -} - -void SessionManagerClient::ShutdownCanceledProc( - SmcConn connection, - SmPointer ) -{ - SMprintf( "Session: shutdown canceled\n" ); - if( connection == aSmcConnection ) - Application::PostUserEvent( STATIC_LINK( NULL, SessionManagerClient, ShutDownCancelHdl ) ); -} - -void SessionManagerClient::InteractProc( - SmcConn connection, - SmPointer ) -{ - SMprintf( "Session: interaction request completed\n" ); - if( connection == aSmcConnection ) - Application::PostUserEvent( STATIC_LINK( NULL, SessionManagerClient, InteractionHdl ) ); -} - -void SessionManagerClient::saveDone() -{ - if( aSmcConnection ) - { - ICEConnectionObserver::lock(); - SmcSetProperties( aSmcConnection, nSmProps, ppSmProps ); - SmcSaveYourselfDone( aSmcConnection, True ); - SMprintf( "sent SaveYourselfDone SmRestartHint of %d\n", *pSmRestartHint ); - bDocSaveDone = true; - ICEConnectionObserver::unlock(); - } -} - - -void SessionManagerClient::open() -{ - static SmcCallbacks aCallbacks; - -#ifdef USE_SM_EXTENSION - // this is the way Xt does it, so we can too - if( ! aSmcConnection && getenv( "SESSION_MANAGER" ) ) - { - char aErrBuf[1024]; - ICEConnectionObserver::activate(); - ICEConnectionObserver::lock(); - - char* pClientID = NULL; - const ByteString& rPrevId( getPreviousSessionID() ); - - aCallbacks.save_yourself.callback = SaveYourselfProc; - aCallbacks.save_yourself.client_data = NULL; - aCallbacks.die.callback = DieProc; - aCallbacks.die.client_data = NULL; - aCallbacks.save_complete.callback = SaveCompleteProc; - aCallbacks.save_complete.client_data = NULL; - aCallbacks.shutdown_cancelled.callback = ShutdownCanceledProc; - aCallbacks.shutdown_cancelled.client_data = NULL; - aSmcConnection = SmcOpenConnection( NULL, - NULL, - SmProtoMajor, - SmProtoMinor, - SmcSaveYourselfProcMask | - SmcDieProcMask | - SmcSaveCompleteProcMask | - SmcShutdownCancelledProcMask , - &aCallbacks, - rPrevId.Len() ? const_cast(rPrevId.GetBuffer()) : NULL, - &pClientID, - sizeof( aErrBuf ), - aErrBuf ); - if( ! aSmcConnection ) - SMprintf( "SmcOpenConnection failed: %s\n", aErrBuf ); - else - SMprintf( "SmcOpenConnection succeeded, client ID is \"%s\"\n", pClientID ); - aClientID = ByteString( pClientID ); - free( pClientID ); - pClientID = NULL; - ICEConnectionObserver::unlock(); - - SalDisplay* pDisp = GetX11SalData()->GetDisplay(); - if( pDisp->GetDrawable( pDisp->GetDefaultScreenNumber() ) && aClientID.Len() ) - { - XChangeProperty( pDisp->GetDisplay(), - pDisp->GetDrawable( pDisp->GetDefaultScreenNumber() ), - XInternAtom( pDisp->GetDisplay(), "SM_CLIENT_ID", False ), - XA_STRING, - 8, - PropModeReplace, - (unsigned char*)aClientID.GetBuffer(), - aClientID.Len() - ); - } - } - else if( ! aSmcConnection ) - SMprintf( "no SESSION_MANAGER\n" ); -#endif -} - -const ByteString& SessionManagerClient::getSessionID() -{ - return aClientID; -} - -void SessionManagerClient::close() -{ - if( aSmcConnection ) - { -#ifdef USE_SM_EXTENSION - ICEConnectionObserver::lock(); - SMprintf( "attempting SmcCloseConnection\n" ); - SmcCloseConnection( aSmcConnection, 0, NULL ); - SMprintf( "SmcConnection closed\n" ); - ICEConnectionObserver::unlock(); - ICEConnectionObserver::deactivate(); -#endif - aSmcConnection = NULL; - } -} - -bool SessionManagerClient::queryInteraction() -{ - bool bRet = false; - if( aSmcConnection ) - { - ICEConnectionObserver::lock(); - if( SmcInteractRequest( aSmcConnection, SmDialogNormal, InteractProc, NULL ) ) - bRet = true; - ICEConnectionObserver::unlock(); - } - return bRet; -} - -void SessionManagerClient::interactionDone( bool bCancelShutdown ) -{ - if( aSmcConnection ) - { - ICEConnectionObserver::lock(); - SmcInteractDone( aSmcConnection, bCancelShutdown ? True : False ); - ICEConnectionObserver::unlock(); - } -} - - -String SessionManagerClient::getExecName() -{ - rtl::OUString aExec, aSysExec; - osl_getExecutableFile( &aExec.pData ); - osl_getSystemPathFromFileURL( aExec.pData, &aSysExec.pData ); - - int nPos = aSysExec.indexOf( rtl::OUString::createFromAscii( ".bin" ) ); - if( nPos != -1 ) - aSysExec = aSysExec.copy( 0, nPos ); - return aSysExec; -} - - -const ByteString& SessionManagerClient::getPreviousSessionID() -{ - static ByteString aPrevId; - - int nCommands = osl_getCommandArgCount(); - for( int i = 0; i < nCommands; i++ ) - { - ::rtl::OUString aArg; - osl_getCommandArg( i, &aArg.pData ); - if( aArg.compareToAscii( "-session=", 9 ) == 0 ) - { - aPrevId = ByteString( ::rtl::OUStringToOString( aArg.copy( 9 ), osl_getThreadTextEncoding() ) ); - break; - } - } - SMprintf( "previous ID = \"%s\"\n", aPrevId.GetBuffer() ); - return aPrevId; -} - -void ICEConnectionObserver::lock() -{ - osl_acquireMutex( ICEMutex ); -} - -void ICEConnectionObserver::unlock() -{ - osl_releaseMutex( ICEMutex ); -} - -void ICEConnectionObserver::activate() -{ - if( ! bIsWatching ) - { - nWakeupFiles[0] = nWakeupFiles[1] = 0; - ICEMutex = osl_createMutex(); - bIsWatching = TRUE; -#ifdef USE_SM_EXTENSION - /* - * Default handlers call exit, we don't care that strongly if something - * happens to fail - */ - origIOErrorHandler = IceSetIOErrorHandler( IgnoreIceIOErrors ); - origErrorHandler = IceSetErrorHandler( IgnoreIceErrors ); - IceAddConnectionWatch( ICEWatchProc, NULL ); -#endif - } -} - -void ICEConnectionObserver::deactivate() -{ - if( bIsWatching ) - { - lock(); - bIsWatching = FALSE; -#ifdef USE_SM_EXTENSION - IceRemoveConnectionWatch( ICEWatchProc, NULL ); - IceSetErrorHandler( origErrorHandler ); - IceSetIOErrorHandler( origIOErrorHandler ); -#endif - nConnections = 0; - if( ICEThread ) - { - osl_terminateThread( ICEThread ); - wakeup(); - } - unlock(); - if( ICEThread ) - { - osl_joinWithThread( ICEThread ); - osl_destroyThread( ICEThread ); - close( nWakeupFiles[1] ); - close( nWakeupFiles[0] ); - ICEThread = NULL; - } - osl_destroyMutex( ICEMutex ); - ICEMutex = NULL; - } -} - -void ICEConnectionObserver::wakeup() -{ - char cChar = 'w'; - write( nWakeupFiles[1], &cChar, 1 ); -} - -void ICEConnectionWorker( void* ) -{ -#ifdef USE_SM_EXTENSION - while( osl_scheduleThread(ICEConnectionObserver::ICEThread) && ICEConnectionObserver::nConnections ) - { - ICEConnectionObserver::lock(); - int nConnectionsBefore = ICEConnectionObserver::nConnections; - int nBytes = sizeof( struct pollfd )*(nConnectionsBefore+1); - struct pollfd* pLocalFD = (struct pollfd*)rtl_allocateMemory( nBytes ); - rtl_copyMemory( pLocalFD, ICEConnectionObserver::pFilehandles, nBytes ); - ICEConnectionObserver::unlock(); - - int nRet = poll( pLocalFD,nConnectionsBefore+1,-1 ); - bool bWakeup = (pLocalFD[0].revents & POLLIN); - rtl_freeMemory( pLocalFD ); - - if( nRet < 1 ) - continue; - - // clear wakeup pipe - if( bWakeup ) - { - char buf[4]; - while( read( ICEConnectionObserver::nWakeupFiles[0], buf, sizeof( buf ) ) > 0 ) - ; - SMprintf( "file handles active in wakeup: %d\n", nRet ); - if( nRet == 1 ) - continue; - } - - // check fd's after we obtained the lock - ICEConnectionObserver::lock(); - if( ICEConnectionObserver::nConnections > 0 && ICEConnectionObserver::nConnections == nConnectionsBefore ) - { - nRet = poll( ICEConnectionObserver::pFilehandles+1, ICEConnectionObserver::nConnections, 0 ); - if( nRet > 0 ) - { - SMprintf( "IceProcessMessages\n" ); - Bool bReply; - for( int i = 0; i < ICEConnectionObserver::nConnections; i++ ) - if( ICEConnectionObserver::pFilehandles[i+1].revents & POLLIN ) - IceProcessMessages( ICEConnectionObserver::pConnections[i], NULL, &bReply ); - } - } - ICEConnectionObserver::unlock(); - } -#endif - SMprintf( "shutting donw ICE dispatch thread\n" ); -} - -void ICEConnectionObserver::ICEWatchProc( - IceConn connection, - IcePointer, - Bool opening, - IcePointer* - ) -{ - // note: this is a callback function for ICE - // this implicitly means that a call into ICE lib is calling this - // so the ICEMutex MUST already be locked by the caller - -#ifdef USE_SM_EXTENSION - if( opening ) - { - int fd = IceConnectionNumber( connection ); - nConnections++; - pConnections = (IceConn*)rtl_reallocateMemory( pConnections, sizeof( IceConn )*nConnections ); - pFilehandles = (struct pollfd*)rtl_reallocateMemory( pFilehandles, sizeof( struct pollfd )*(nConnections+1) ); - pConnections[ nConnections-1 ] = connection; - pFilehandles[ nConnections ].fd = fd; - pFilehandles[ nConnections ].events = POLLIN; - if( nConnections == 1 ) - { - if( ! pipe( nWakeupFiles ) ) - { - int flags; - pFilehandles[0].fd = nWakeupFiles[0]; - pFilehandles[0].events = POLLIN; - // set close-on-exec and nonblock descriptor flag. - if ((flags = fcntl (nWakeupFiles[0], F_GETFD)) != -1) - { - flags |= FD_CLOEXEC; - fcntl (nWakeupFiles[0], F_SETFD, flags); - } - if ((flags = fcntl (nWakeupFiles[0], F_GETFL)) != -1) - { - flags |= O_NONBLOCK; - fcntl (nWakeupFiles[0], F_SETFL, flags); - } - // set close-on-exec and nonblock descriptor flag. - if ((flags = fcntl (nWakeupFiles[1], F_GETFD)) != -1) - { - flags |= FD_CLOEXEC; - fcntl (nWakeupFiles[1], F_SETFD, flags); - } - if ((flags = fcntl (nWakeupFiles[1], F_GETFL)) != -1) - { - flags |= O_NONBLOCK; - fcntl (nWakeupFiles[1], F_SETFL, flags); - } - ICEThread = osl_createSuspendedThread( ICEConnectionWorker, NULL ); - osl_resumeThread( ICEThread ); - } - } - } - else - { - for( int i = 0; i < nConnections; i++ ) - { - if( pConnections[i] == connection ) - { - if( i < nConnections-1 ) - { - rtl_moveMemory( pConnections+i, pConnections+i+1, sizeof( IceConn )*(nConnections-i-1) ); - rtl_moveMemory( pFilehandles+i+1, pFilehandles+i+2, sizeof( struct pollfd )*(nConnections-i-1) ); - } - nConnections--; - pConnections = (IceConn*)rtl_reallocateMemory( pConnections, sizeof( IceConn )*nConnections ); - pFilehandles = (struct pollfd*)rtl_reallocateMemory( pFilehandles, sizeof( struct pollfd )*(nConnections+1) ); - break; - } - } - if( nConnections == 0 && ICEThread ) - { - SMprintf( "terminating ICEThread\n" ); - osl_terminateThread( ICEThread ); - wakeup(); - // must release the mutex here - osl_releaseMutex( ICEMutex ); - osl_joinWithThread( ICEThread ); - osl_destroyThread( ICEThread ); - close( nWakeupFiles[1] ); - close( nWakeupFiles[0] ); - ICEThread = NULL; - } - } - SMprintf( "ICE connection on %d %s\n", - IceConnectionNumber( connection ), - opening ? "inserted" : "removed" ); - SMprintf( "Display connection is %d\n", ConnectionNumber( GetX11SalData()->GetDisplay()->GetDisplay() ) ); -#endif -} diff --git a/vcl/unx/source/app/soicon.cxx b/vcl/unx/source/app/soicon.cxx deleted file mode 100644 index 2bf9e55731d1..000000000000 --- a/vcl/unx/source/app/soicon.cxx +++ /dev/null @@ -1,115 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_vcl.hxx" - -#include -#include -#include -#include -#include -#include -#ifndef _SV_BITMAP_HXX -#include -#endif -#include -#include -#include -#include -#include - -BOOL SelectAppIconPixmap( SalDisplay *pDisplay, int nScreen,USHORT nIcon, USHORT iconSize, - Pixmap& icon_pixmap, Pixmap& icon_mask) -{ - if( ! ImplGetResMgr() ) - return FALSE; - - USHORT nIconSizeOffset; - - if( iconSize >= 48 ) - nIconSizeOffset = SV_ICON_SIZE48_START; - else if( iconSize >= 32 ) - nIconSizeOffset = SV_ICON_SIZE32_START; - else if( iconSize >= 16 ) - nIconSizeOffset = SV_ICON_SIZE16_START; - else - return FALSE; - - BitmapEx aIcon( ResId(nIconSizeOffset + nIcon, *ImplGetResMgr())); - if( TRUE == aIcon.IsEmpty() ) - return FALSE; - - SalTwoRect aRect; - aRect.mnSrcX = 0; aRect.mnSrcY = 0; - aRect.mnSrcWidth = iconSize; aRect.mnSrcHeight = iconSize; - aRect.mnDestX = 0; aRect.mnDestY = 0; - aRect.mnDestWidth = iconSize; aRect.mnDestHeight = iconSize; - - X11SalBitmap *pBitmap = static_cast < X11SalBitmap * > - (aIcon.ImplGetBitmapImpBitmap()->ImplGetSalBitmap()); - - icon_pixmap = XCreatePixmap( pDisplay->GetDisplay(), - pDisplay->GetRootWindow( nScreen ), - iconSize, iconSize, - DefaultDepth( pDisplay->GetDisplay(), nScreen ) - ); - - pBitmap->ImplDraw( icon_pixmap, - nScreen, - DefaultDepth( pDisplay->GetDisplay(), nScreen ), - aRect, - DefaultGC(pDisplay->GetDisplay(), nScreen ) ); - - icon_mask = None; - - if( TRANSPARENT_BITMAP == aIcon.GetTransparentType() ) - { - icon_mask = XCreatePixmap( pDisplay->GetDisplay(), - pDisplay->GetRootWindow( pDisplay->GetDefaultScreenNumber() ), - iconSize, iconSize, 1); - - XGCValues aValues; - aValues.foreground = 0xffffffff; - aValues.background = 0; - aValues.function = GXcopy; - GC aMonoGC = XCreateGC( pDisplay->GetDisplay(), icon_mask, - GCFunction|GCForeground|GCBackground, &aValues ); - - Bitmap aMask = aIcon.GetMask(); - aMask.Invert(); - - X11SalBitmap *pMask = static_cast < X11SalBitmap * > - (aMask.ImplGetImpBitmap()->ImplGetSalBitmap()); - - pMask->ImplDraw(icon_mask, nScreen, 1, aRect, aMonoGC); - XFreeGC( pDisplay->GetDisplay(), aMonoGC ); - } - - return TRUE; -} - diff --git a/vcl/unx/source/app/wmadaptor.cxx b/vcl/unx/source/app/wmadaptor.cxx deleted file mode 100644 index f816c5d1426e..000000000000 --- a/vcl/unx/source/app/wmadaptor.cxx +++ /dev/null @@ -1,2543 +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_vcl.hxx" - -#include -#include -#include -#include "sal/alloca.h" -#include "wmadaptor.hxx" -#include "saldisp.hxx" -#include "saldata.hxx" -#include "salframe.h" -#include "vcl/salgdi.hxx" -#include "osl/thread.h" -#include "rtl/locale.h" -#include "osl/process.h" -#include "vcl/configsettings.hxx" - -#include "tools/prex.h" -#include -#include -#include -#include "tools/postx.h" - -#if OSL_DEBUG_LEVEL > 1 -#include -#endif - -namespace vcl_sal { - -class NetWMAdaptor : public WMAdaptor -{ - void setNetWMState( X11SalFrame* pFrame ) const; - void initAtoms(); - virtual bool isValid() const; -public: - NetWMAdaptor( SalDisplay* ); - virtual ~NetWMAdaptor(); - - virtual void setWMName( X11SalFrame* pFrame, const String& rWMName ) const; - virtual void maximizeFrame( X11SalFrame* pFrame, bool bHorizontal = true, bool bVertical = true ) const; - virtual void shade( X11SalFrame* pFrame, bool bToShaded ) const; - virtual void setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eType, int nDecorationFlags, X11SalFrame* pTransientFrame = NULL ) const; - virtual bool supportsICCCMPos() const; - virtual void enableAlwaysOnTop( X11SalFrame* pFrame, bool bEnable ) const; - virtual int handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEvent ) const; - virtual void showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const; - virtual void frameIsMapping( X11SalFrame* pFrame ) const; - virtual void setFrameStruts( X11SalFrame* pFrame, - int left, int right, int top, int bottom, - int left_start_y, int left_end_y, - int right_start_y, int right_end_y, - int top_start_x, int top_end_x, - int bottom_start_x, int bottom_end_x ) const; - virtual void setUserTime( X11SalFrame* i_pFrame, long i_nUserTime ) const; -}; - -class GnomeWMAdaptor : public WMAdaptor -{ - bool m_bValid; - - void setGnomeWMState( X11SalFrame* pFrame ) const; - void initAtoms(); - virtual bool isValid() const; -public: - GnomeWMAdaptor( SalDisplay * ); - virtual ~GnomeWMAdaptor(); - - virtual void maximizeFrame( X11SalFrame* pFrame, bool bHorizontal = true, bool bVertical = true ) const; - virtual void shade( X11SalFrame* pFrame, bool bToShaded ) const; - virtual void enableAlwaysOnTop( X11SalFrame* pFrame, bool bEnable ) const; - virtual int handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEvent ) const; -}; - -} - -using namespace vcl_sal; - -struct WMAdaptorProtocol -{ - const char* pProtocol; - int nProtocol; -}; - - -/* - * table must be sorted ascending in strings - * since it is use with bsearch - */ -static const WMAdaptorProtocol aProtocolTab[] = -{ - { "_KDE_NET_WM_WINDOW_TYPE_OVERRIDE", WMAdaptor::KDE_NET_WM_WINDOW_TYPE_OVERRIDE }, - { "_NET_CURRENT_DESKTOP", WMAdaptor::NET_CURRENT_DESKTOP }, - { "_NET_NUMBER_OF_DESKTOPS", WMAdaptor::NET_NUMBER_OF_DESKTOPS }, - { "_NET_WM_DESKTOP", WMAdaptor::NET_WM_DESKTOP }, - { "_NET_WM_ICON_NAME", WMAdaptor::NET_WM_ICON_NAME }, - { "_NET_WM_PING", WMAdaptor::NET_WM_PING }, - { "_NET_WM_STATE", WMAdaptor::NET_WM_STATE }, - { "_NET_WM_STATE_ABOVE", WMAdaptor::NET_WM_STATE_STAYS_ON_TOP }, - { "_NET_WM_STATE_FULLSCREEN", WMAdaptor::NET_WM_STATE_FULLSCREEN }, - { "_NET_WM_STATE_MAXIMIZED_HORIZ", WMAdaptor::NET_WM_STATE_MAXIMIZED_HORZ }, // common bug in e.g. older kwin and sawfish implementations - { "_NET_WM_STATE_MAXIMIZED_HORZ", WMAdaptor::NET_WM_STATE_MAXIMIZED_HORZ }, - { "_NET_WM_STATE_MAXIMIZED_VERT", WMAdaptor::NET_WM_STATE_MAXIMIZED_VERT }, - { "_NET_WM_STATE_MODAL", WMAdaptor::NET_WM_STATE_MODAL }, - { "_NET_WM_STATE_SHADED", WMAdaptor::NET_WM_STATE_SHADED }, - { "_NET_WM_STATE_SKIP_PAGER", WMAdaptor::NET_WM_STATE_SKIP_PAGER }, - { "_NET_WM_STATE_SKIP_TASKBAR", WMAdaptor::NET_WM_STATE_SKIP_TASKBAR }, - { "_NET_WM_STATE_STAYS_ON_TOP", WMAdaptor::NET_WM_STATE_STAYS_ON_TOP }, - { "_NET_WM_STATE_STICKY", WMAdaptor::NET_WM_STATE_STICKY }, - { "_NET_WM_STRUT", WMAdaptor::NET_WM_STRUT }, - { "_NET_WM_STRUT_PARTIAL", WMAdaptor::NET_WM_STRUT_PARTIAL }, - { "_NET_WM_WINDOW_TYPE", WMAdaptor::NET_WM_WINDOW_TYPE }, - { "_NET_WM_WINDOW_TYPE_DESKTOP", WMAdaptor::NET_WM_WINDOW_TYPE_DESKTOP }, - { "_NET_WM_WINDOW_TYPE_DIALOG", WMAdaptor::NET_WM_WINDOW_TYPE_DIALOG }, - { "_NET_WM_WINDOW_TYPE_DOCK", WMAdaptor::NET_WM_WINDOW_TYPE_DOCK }, - { "_NET_WM_WINDOW_TYPE_MENU", WMAdaptor::NET_WM_WINDOW_TYPE_MENU }, - { "_NET_WM_WINDOW_TYPE_NORMAL", WMAdaptor::NET_WM_WINDOW_TYPE_NORMAL }, - { "_NET_WM_WINDOW_TYPE_SPLASH", WMAdaptor::NET_WM_WINDOW_TYPE_SPLASH }, - { "_NET_WM_WINDOW_TYPE_SPLASHSCREEN", WMAdaptor::NET_WM_WINDOW_TYPE_SPLASH }, // bug in Metacity 2.4.1 - { "_NET_WM_WINDOW_TYPE_TOOLBAR", WMAdaptor::NET_WM_WINDOW_TYPE_TOOLBAR }, - { "_NET_WM_WINDOW_TYPE_UTILITY", WMAdaptor::NET_WM_WINDOW_TYPE_UTILITY }, - { "_NET_WORKAREA", WMAdaptor::NET_WORKAREA }, - { "_WIN_APP_STATE", WMAdaptor::WIN_APP_STATE }, - { "_WIN_CLIENT_LIST", WMAdaptor::WIN_CLIENT_LIST }, - { "_WIN_EXPANDED_SIZE", WMAdaptor::WIN_EXPANDED_SIZE }, - { "_WIN_HINTS", WMAdaptor::WIN_HINTS }, - { "_WIN_ICONS", WMAdaptor::WIN_ICONS }, - { "_WIN_LAYER", WMAdaptor::WIN_LAYER }, - { "_WIN_STATE", WMAdaptor::WIN_STATE }, - { "_WIN_WORKSPACE", WMAdaptor::WIN_WORKSPACE }, - { "_WIN_WORKSPACE_COUNT", WMAdaptor::WIN_WORKSPACE_COUNT } -}; - -/* - * table containing atoms to get anyway - */ - -static const WMAdaptorProtocol aAtomTab[] = -{ - { "WM_STATE", WMAdaptor::WM_STATE }, - { "_MOTIF_WM_HINTS", WMAdaptor::MOTIF_WM_HINTS }, - { "WM_PROTOCOLS", WMAdaptor::WM_PROTOCOLS }, - { "WM_DELETE_WINDOW", WMAdaptor::WM_DELETE_WINDOW }, - { "WM_TAKE_FOCUS", WMAdaptor::WM_TAKE_FOCUS }, - { "WM_SAVE_YOURSELF", WMAdaptor::WM_SAVE_YOURSELF }, - { "WM_COMMAND", WMAdaptor::WM_COMMAND }, - { "WM_CLIENT_LEADER", WMAdaptor::WM_CLIENT_LEADER }, - { "WM_LOCALE_NAME", WMAdaptor::WM_LOCALE_NAME }, - { "WM_TRANSIENT_FOR", WMAdaptor::WM_TRANSIENT_FOR }, - { "SAL_QUITEVENT", WMAdaptor::SAL_QUITEVENT }, - { "SAL_USEREVENT", WMAdaptor::SAL_USEREVENT }, - { "SAL_EXTTEXTEVENT", WMAdaptor::SAL_EXTTEXTEVENT }, - { "SAL_GETTIMEEVENT", WMAdaptor::SAL_GETTIMEEVENT }, - { "VCL_SYSTEM_SETTINGS", WMAdaptor::VCL_SYSTEM_SETTINGS }, - { "DTWM_IS_RUNNING", WMAdaptor::DTWM_IS_RUNNING }, - { "_XSETTINGS_SETTINGS", WMAdaptor::XSETTINGS }, - { "_XEMBED", WMAdaptor::XEMBED }, - { "_XEMBED_INFO", WMAdaptor::XEMBED_INFO }, - { "_NET_WM_USER_TIME", WMAdaptor::NET_WM_USER_TIME }, - { "_NET_WM_PID", WMAdaptor::NET_WM_PID } -}; - -extern "C" { -static int compareProtocol( const void* pLeft, const void* pRight ) -{ - return strcmp( ((const WMAdaptorProtocol*)pLeft)->pProtocol, ((const WMAdaptorProtocol*)pRight)->pProtocol ); -} -} - -WMAdaptor* WMAdaptor::createWMAdaptor( SalDisplay* pSalDisplay ) -{ - WMAdaptor* pAdaptor = NULL; - - // try a NetWM - pAdaptor = new NetWMAdaptor( pSalDisplay ); - if( ! pAdaptor->isValid() ) - delete pAdaptor, pAdaptor = NULL; -#if OSL_DEBUG_LEVEL > 1 - else - fprintf( stderr, "WM supports extended WM hints\n" ); -#endif - - // try a GnomeWM - if( ! pAdaptor ) - { - pAdaptor = new GnomeWMAdaptor( pSalDisplay ); - if( ! pAdaptor->isValid() ) - delete pAdaptor, pAdaptor = NULL; -#if OSL_DEBUG_LEVEL > 1 - else - fprintf( stderr, "WM supports GNOME WM hints\n" ); -#endif - } - - if( ! pAdaptor ) - pAdaptor = new WMAdaptor( pSalDisplay ); - -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "Window Manager's name is \"%s\"\n", - ByteString( pAdaptor->getWindowManagerName(), RTL_TEXTENCODING_ISO_8859_1 ).GetBuffer() ); -#endif - return pAdaptor; -} - - -/* - * WMAdaptor constructor - */ - -WMAdaptor::WMAdaptor( SalDisplay* pDisplay ) : - m_pSalDisplay( pDisplay ), - m_bTransientBehaviour( true ), - m_bEnableAlwaysOnTopWorks( false ), - m_bLegacyPartialFullscreen( false ), - m_nWinGravity( StaticGravity ), - m_nInitWinGravity( StaticGravity ), - m_bWMshouldSwitchWorkspace( true ), - m_bWMshouldSwitchWorkspaceInit( false ) -{ - Atom aRealType = None; - int nFormat = 8; - unsigned long nItems = 0; - unsigned long nBytesLeft = 0; - unsigned char* pProperty = NULL; - - // default desktops - m_nDesktops = 1; - m_aWMWorkAreas = ::std::vector< Rectangle > - ( 1, Rectangle( Point(), m_pSalDisplay->GetScreenSize( m_pSalDisplay->GetDefaultScreenNumber() ) ) ); - m_bEqualWorkAreas = true; - - memset( m_aWMAtoms, 0, sizeof( m_aWMAtoms ) ); - m_pDisplay = m_pSalDisplay->GetDisplay(); - - initAtoms(); - getNetWmName(); // try to discover e.g. Sawfish - - // check for dtwm running - if( m_aWMAtoms[ DTWM_IS_RUNNING ] ) - { - if ( (XGetWindowProperty( m_pDisplay, - m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), - m_aWMAtoms[ DTWM_IS_RUNNING ], - 0, 1, - False, - XA_INTEGER, - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty) == 0 - && nItems) - || (XGetWindowProperty( m_pDisplay, - m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), - m_aWMAtoms[ DTWM_IS_RUNNING ], - 0, 1, - False, - m_aWMAtoms[ DTWM_IS_RUNNING ], - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty) == 0 - && nItems)) - { - if (*pProperty) - { - m_aWMName = String(RTL_CONSTASCII_USTRINGPARAM("Dtwm")); - m_bTransientBehaviour = false; - m_nWinGravity = CenterGravity; - } - XFree (pProperty); - } - else if( pProperty ) - { - XFree( pProperty ); - pProperty = NULL; - } - } - if( m_aWMName.Len() == 0 ) - { - // check for window maker - needs different gravity - Atom aWMakerRunning = XInternAtom( m_pDisplay, "_WINDOWMAKER_WM_PROTOCOLS", True ); - if( aWMakerRunning != None && - XGetWindowProperty( m_pDisplay, - m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), - aWMakerRunning, - 0, 32, - False, - XA_ATOM, - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty ) == 0 ) - { - if( aRealType == XA_ATOM ) - m_aWMName = String( RTL_CONSTASCII_USTRINGPARAM("Windowmaker" ) ); - XFree( pProperty ); - m_nInitWinGravity = NorthWestGravity; - } - else if( pProperty ) - { - XFree( pProperty ); - pProperty = NULL; - } - } - if( m_aWMName.Len() == 0 ) - { - if( XInternAtom( m_pDisplay, "_OL_WIN_ATTR", True ) ) - { - m_aWMName = String( RTL_CONSTASCII_USTRINGPARAM( "Olwm" ) ); - m_nInitWinGravity = NorthWestGravity; - } - } - if( m_aWMName.Len() == 0 ) - { - // check for ReflectionX wm (as it needs a workaround in Windows mode - Atom aRwmRunning = XInternAtom( m_pDisplay, "RWM_RUNNING", True ); - if( aRwmRunning != None && - XGetWindowProperty( m_pDisplay, - m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), - aRwmRunning, - 0, 32, - False, - aRwmRunning, - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty ) == 0 ) - { - if( aRealType == aRwmRunning ) - m_aWMName = String( RTL_CONSTASCII_USTRINGPARAM("ReflectionX" ) ); - XFree( pProperty ); - } - else if( (aRwmRunning = XInternAtom( m_pDisplay, "_WRQ_WM_RUNNING", True )) != None && - XGetWindowProperty( m_pDisplay, - m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), - aRwmRunning, - 0, 32, - False, - XA_STRING, - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty ) == 0 ) - { - if( aRealType == XA_STRING ) - m_aWMName = String( RTL_CONSTASCII_USTRINGPARAM( "ReflectionX Windows" ) ); - XFree( pProperty ); - } - } - if( m_aWMName.Len() == 0 ) - { - Atom aTTAPlatform = XInternAtom( m_pDisplay, "TTA_CLIENT_PLATFORM", True ); - if( aTTAPlatform != None && - XGetWindowProperty( m_pDisplay, - m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), - aTTAPlatform, - 0, 32, - False, - XA_STRING, - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty ) == 0 ) - { - if( aRealType == XA_STRING ) - { - m_aWMName = String( RTL_CONSTASCII_USTRINGPARAM("Tarantella" ) ); - // #i62319# pretend that AlwaysOnTop works since - // the alwaysontop workaround in salframe.cxx results - // in a raise/lower loop on a Windows tarantella client - // FIXME: this property contains an identification string that - // in theory should be good enough to recognize running on a - // Windows client; however this string does not seem to be - // documented as well as the property itself. - m_bEnableAlwaysOnTopWorks = true; - } - XFree( pProperty ); - } - } -} - -/* - * WMAdaptor destructor - */ - -WMAdaptor::~WMAdaptor() -{ -} - -/* - * NetWMAdaptor constructor - */ - -NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) : - WMAdaptor( pSalDisplay ) -{ - // currently all _NET WMs do transient like expected - m_bTransientBehaviour = true; - - Atom aRealType = None; - int nFormat = 8; - unsigned long nItems = 0; - unsigned long nBytesLeft = 0; - unsigned char* pProperty = NULL; - bool bNetWM = false; - - initAtoms(); - - // check for NetWM - bNetWM = getNetWmName(); - if( bNetWM - && XGetWindowProperty( m_pDisplay, - m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), - m_aWMAtoms[ NET_SUPPORTED ], - 0, 0, - False, - XA_ATOM, - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty ) == 0 - && aRealType == XA_ATOM - && nFormat == 32 - ) - { - if( pProperty ) - { - XFree( pProperty ); - pProperty = NULL; - } - // collect supported protocols - if( XGetWindowProperty( m_pDisplay, - m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), - m_aWMAtoms[ NET_SUPPORTED ], - 0, nBytesLeft/4, - False, - XA_ATOM, - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty ) == 0 - && nItems - ) - { - Atom* pAtoms = (Atom*)pProperty; - char** pAtomNames = (char**)alloca( sizeof(char*)*nItems ); - if( XGetAtomNames( m_pDisplay, pAtoms, nItems, pAtomNames ) ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "supported protocols:\n" ); -#endif - for( unsigned int i = 0; i < nItems; i++ ) - { - // #i80971# protect against invalid atoms - if( pAtomNames[i] == NULL ) - continue; - - int nProtocol = -1; - WMAdaptorProtocol aSearch; - aSearch.pProtocol = pAtomNames[i]; - WMAdaptorProtocol* pMatch = (WMAdaptorProtocol*) - bsearch( &aSearch, - aProtocolTab, - sizeof( aProtocolTab )/sizeof( aProtocolTab[0] ), - sizeof( struct WMAdaptorProtocol ), - compareProtocol ); - if( pMatch ) - { - nProtocol = pMatch->nProtocol; - m_aWMAtoms[ nProtocol ] = pAtoms[ i ]; - if( pMatch->nProtocol == NET_WM_STATE_STAYS_ON_TOP ) - m_bEnableAlwaysOnTopWorks = true; - } -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, " %s%s\n", pAtomNames[i], nProtocol != -1 ? "" : " (unsupported)" ); -#endif - - XFree( pAtomNames[i] ); - } - } - XFree( pProperty ); - pProperty = NULL; - } - else if( pProperty ) - { - XFree( pProperty ); - pProperty = NULL; - } - - // get number of desktops - if( m_aWMAtoms[ NET_NUMBER_OF_DESKTOPS ] - && XGetWindowProperty( m_pDisplay, - m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), - m_aWMAtoms[ NET_NUMBER_OF_DESKTOPS ], - 0, 1, - False, - XA_CARDINAL, - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty ) == 0 - && pProperty - ) - { - m_nDesktops = *(long*)pProperty; - XFree( pProperty ); - pProperty = NULL; - // get work areas - if( m_aWMAtoms[ NET_WORKAREA ] - && XGetWindowProperty( m_pDisplay, - m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), - m_aWMAtoms[ NET_WORKAREA ], - 0, 4*m_nDesktops, - False, - XA_CARDINAL, - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty - ) == 0 - && nItems == 4*(unsigned)m_nDesktops - ) - { - m_aWMWorkAreas = ::std::vector< Rectangle > ( m_nDesktops ); - long* pValues = (long*)pProperty; - for( int i = 0; i < m_nDesktops; i++ ) - { - Point aPoint( pValues[4*i], - pValues[4*i+1] ); - Size aSize( pValues[4*i+2], - pValues[4*i+3] ); - Rectangle aWorkArea( aPoint, aSize ); - m_aWMWorkAreas[i] = aWorkArea; - if( aWorkArea != m_aWMWorkAreas[0] ) - m_bEqualWorkAreas = false; -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "workarea %d: %ldx%ld+%ld+%ld\n", - i, - m_aWMWorkAreas[i].GetWidth(), - m_aWMWorkAreas[i].GetHeight(), - m_aWMWorkAreas[i].Left(), - m_aWMWorkAreas[i].Top() ); -#endif - } - XFree( pProperty ); - } - else - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "%ld workareas for %d desktops !\n", nItems/4, m_nDesktops ); -#endif - if( pProperty ) - { - XFree(pProperty); - pProperty = NULL; - } - } - } - else if( pProperty ) - { - XFree( pProperty ); - pProperty = NULL; - } - } - else if( pProperty ) - { - XFree( pProperty ); - pProperty = NULL; - } -} - -/* - * NetWMAdaptor destructor - */ -NetWMAdaptor::~NetWMAdaptor() -{ -} - -/* - * GnomeWMAdaptor constructor - */ - -GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) : - WMAdaptor( pSalDisplay ), - m_bValid( false ) -{ - // currently all Gnome WMs do transient like expected - m_bTransientBehaviour = true; - - Atom aRealType = None; - int nFormat = 8; - unsigned long nItems = 0; - unsigned long nBytesLeft = 0; - unsigned char* pProperty = NULL; - - initAtoms(); - - // check for GnomeWM - if( m_aWMAtoms[ WIN_SUPPORTING_WM_CHECK ] && m_aWMAtoms[ WIN_PROTOCOLS ] ) - { - XLIB_Window aWMChild = None; - if( XGetWindowProperty( m_pDisplay, - m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), - m_aWMAtoms[ WIN_SUPPORTING_WM_CHECK ], - 0, 1, - False, - XA_CARDINAL, - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty ) == 0 - && aRealType == XA_CARDINAL - && nFormat == 32 - && nItems != 0 - ) - { - aWMChild = *(XLIB_Window*)pProperty; - XFree( pProperty ); - pProperty = NULL; - XLIB_Window aCheckWindow = None; - m_pSalDisplay->GetXLib()->PushXErrorLevel( true ); - if( XGetWindowProperty( m_pDisplay, - aWMChild, - m_aWMAtoms[ WIN_SUPPORTING_WM_CHECK ], - 0, 1, - False, - XA_CARDINAL, - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty ) == 0 - && aRealType == XA_CARDINAL - && nFormat == 32 - && nItems != 0 - && ! m_pSalDisplay->GetXLib()->HasXErrorOccured() - ) - { - aCheckWindow = *(XLIB_Window*)pProperty; - XFree( pProperty ); - pProperty = NULL; - if( aCheckWindow == aWMChild ) - { - m_bValid = true; - /* - * get name of WM - * this is NOT part of the GNOME WM hints, but e.g. Sawfish - * already supports this part of the extended WM hints - */ - m_aWMAtoms[ UTF8_STRING ] = XInternAtom( m_pDisplay, "UTF8_STRING", False ); - getNetWmName(); - } - } - m_pSalDisplay->GetXLib()->PopXErrorLevel(); - } - else if( pProperty ) - { - XFree( pProperty ); - pProperty = NULL; - } - } - if( m_bValid - && XGetWindowProperty( m_pDisplay, - m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), - m_aWMAtoms[ WIN_PROTOCOLS ], - 0, 0, - False, - XA_ATOM, - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty ) == 0 - && aRealType == XA_ATOM - && nFormat == 32 - ) - { - if( pProperty ) - { - XFree( pProperty ); - pProperty = NULL; - } - // collect supported protocols - if( XGetWindowProperty( m_pDisplay, - m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), - m_aWMAtoms[ WIN_PROTOCOLS ], - 0, nBytesLeft/4, - False, - XA_ATOM, - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty ) == 0 - && pProperty - ) - { - Atom* pAtoms = (Atom*)pProperty; - char** pAtomNames = (char**)alloca( sizeof(char*)*nItems ); - if( XGetAtomNames( m_pDisplay, pAtoms, nItems, pAtomNames ) ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "supported protocols:\n" ); -#endif - for( unsigned int i = 0; i < nItems; i++ ) - { - // #i80971# protect against invalid atoms - if( pAtomNames[i] == NULL ) - continue; - - int nProtocol = -1; - WMAdaptorProtocol aSearch; - aSearch.pProtocol = pAtomNames[i]; - WMAdaptorProtocol* pMatch = (WMAdaptorProtocol*) - bsearch( &aSearch, - aProtocolTab, - sizeof( aProtocolTab )/sizeof( aProtocolTab[0] ), - sizeof( struct WMAdaptorProtocol ), - compareProtocol ); - if( pMatch ) - { - nProtocol = pMatch->nProtocol; - m_aWMAtoms[ nProtocol ] = pAtoms[ i ]; - if( pMatch->nProtocol == WIN_LAYER ) - m_bEnableAlwaysOnTopWorks = true; - } - if( strncmp( "_ICEWM_TRAY", pAtomNames[i], 11 ) == 0 ) - { - m_aWMName = String(RTL_CONSTASCII_USTRINGPARAM("IceWM" )); - m_nWinGravity = NorthWestGravity; - m_nInitWinGravity = NorthWestGravity; - } -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, " %s%s\n", pAtomNames[i], nProtocol != -1 ? "" : " (unsupported)" ); -#endif - - XFree( pAtomNames[i] ); - } - } - XFree( pProperty ); - pProperty = NULL; - } - else if( pProperty ) - { - XFree( pProperty ); - pProperty = NULL; - } - - // get number of desktops - if( m_aWMAtoms[ WIN_WORKSPACE_COUNT ] - && XGetWindowProperty( m_pDisplay, - m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), - m_aWMAtoms[ WIN_WORKSPACE_COUNT ], - 0, 1, - False, - XA_CARDINAL, - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty ) == 0 - && pProperty - ) - { - m_nDesktops = *(long*)pProperty; - XFree( pProperty ); - pProperty = NULL; - } - else if( pProperty ) - { - XFree( pProperty ); - pProperty = NULL; - } - } - else if( pProperty ) - { - XFree( pProperty ); - pProperty = NULL; - } -} - -/* - * GnomeWMAdaptor destructor - */ -GnomeWMAdaptor::~GnomeWMAdaptor() -{ -} - -/* - * getNetWmName() - */ -bool WMAdaptor::getNetWmName() -{ - Atom aRealType = None; - int nFormat = 8; - unsigned long nItems = 0; - unsigned long nBytesLeft = 0; - unsigned char* pProperty = NULL; - bool bNetWM = false; - - if( m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ] && m_aWMAtoms[ NET_WM_NAME ] ) - { - XLIB_Window aWMChild = None; - if( XGetWindowProperty( m_pDisplay, - m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), - m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ], - 0, 1, - False, - XA_WINDOW, - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty ) == 0 - && aRealType == XA_WINDOW - && nFormat == 32 - && nItems != 0 - ) - { - aWMChild = *(XLIB_Window*)pProperty; - XFree( pProperty ); - pProperty = NULL; - XLIB_Window aCheckWindow = None; - m_pSalDisplay->GetXLib()->PushXErrorLevel( true ); - if( XGetWindowProperty( m_pDisplay, - aWMChild, - m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ], - 0, 1, - False, - XA_WINDOW, - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty ) == 0 - && aRealType == XA_WINDOW - && nFormat == 32 - && nItems != 0 - && ! m_pSalDisplay->GetXLib()->HasXErrorOccured() - ) - { - aCheckWindow = *(XLIB_Window*)pProperty; - XFree( pProperty ); - pProperty = NULL; - if( aCheckWindow == aWMChild ) - { - bNetWM = true; - // get name of WM - m_aWMAtoms[ UTF8_STRING ] = XInternAtom( m_pDisplay, "UTF8_STRING", False ); - if( XGetWindowProperty( m_pDisplay, - aWMChild, - m_aWMAtoms[ NET_WM_NAME ], - 0, 256, - False, - AnyPropertyType, /* m_aWMAtoms[ UTF8_STRING ],*/ - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty ) == 0 - && nItems != 0 - ) - { - if (aRealType == m_aWMAtoms[ UTF8_STRING ]) - { - m_aWMName = String( (sal_Char*)pProperty, nItems, RTL_TEXTENCODING_UTF8 ); - } - else - if (aRealType == XA_STRING) - { - m_aWMName = String( (sal_Char*)pProperty, nItems, RTL_TEXTENCODING_ISO_8859_1 ); - } - - XFree( pProperty ); - pProperty = NULL; - } - else if( pProperty ) - { - XFree( pProperty ); - pProperty = NULL; - } - // if this is metacity, check for version to enable a legacy workaround - if( m_aWMName.EqualsAscii( "Metacity" ) ) - { - int nVersionMajor = 0, nVersionMinor = 0; - Atom nVersionAtom = XInternAtom( m_pDisplay, "_METACITY_VERSION", True ); - if( nVersionAtom ) - { - if( XGetWindowProperty( m_pDisplay, - aWMChild, - nVersionAtom, - 0, 256, - False, - m_aWMAtoms[ UTF8_STRING ], - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty ) == 0 - && nItems != 0 - ) - { - String aMetaVersion( (sal_Char*)pProperty, nItems, RTL_TEXTENCODING_UTF8 ); - nVersionMajor = aMetaVersion.GetToken( 0, '.' ).ToInt32(); - nVersionMinor = aMetaVersion.GetToken( 1, '.' ).ToInt32(); - } - if( pProperty ) - { - XFree( pProperty ); - pProperty = NULL; - } - } - if( nVersionMajor < 2 || (nVersionMajor == 2 && nVersionMinor < 12) ) - m_bLegacyPartialFullscreen = true; - } - } - } - else if( pProperty ) - { - XFree( pProperty ); - pProperty = NULL; - } - m_pSalDisplay->GetXLib()->PopXErrorLevel(); - } - else if( pProperty ) - { - XFree( pProperty ); - pProperty = NULL; - } - } - return bNetWM; -} - -bool WMAdaptor::getWMshouldSwitchWorkspace() const -{ - if( ! m_bWMshouldSwitchWorkspaceInit ) - { - WMAdaptor * pWMA = const_cast(this); - - pWMA->m_bWMshouldSwitchWorkspace = true; - vcl::SettingsConfigItem* pItem = vcl::SettingsConfigItem::get(); - rtl::OUString aSetting( pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "WM" ) ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ShouldSwitchWorkspace" ) ) ) ); - if( aSetting.getLength() == 0 ) - { - if( m_aWMName.EqualsAscii( "awesome" ) ) - { - pWMA->m_bWMshouldSwitchWorkspace = false; - } - } - else - pWMA->m_bWMshouldSwitchWorkspace = aSetting.toBoolean(); - pWMA->m_bWMshouldSwitchWorkspaceInit = true; - } - return m_bWMshouldSwitchWorkspace; -} - -/* - * WMAdaptor::isValid() - */ -bool WMAdaptor::isValid() const -{ - return true; -} - -/* - * NetWMAdaptor::isValid() - */ -bool NetWMAdaptor::isValid() const -{ - // some necessary sanity checks; there are WMs out there - // which implement some of the WM hints spec without - // real functionality - return - m_aWMAtoms[ NET_SUPPORTED ] - && m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ] - && m_aWMAtoms[ NET_WM_NAME ] - && m_aWMAtoms[ NET_WM_WINDOW_TYPE_NORMAL ] - && m_aWMAtoms[ NET_WM_WINDOW_TYPE_DIALOG ] - ; -} - -/* - * GnomeWMAdaptor::isValid() - */ -bool GnomeWMAdaptor::isValid() const -{ - return m_bValid; -} - -/* - * WMAdaptor::initAtoms - */ - -void WMAdaptor::initAtoms() -{ - // get basic atoms - for( unsigned int i = 0; i < sizeof( aAtomTab )/sizeof( aAtomTab[0] ); i++ ) - m_aWMAtoms[ aAtomTab[i].nProtocol ] = XInternAtom( m_pDisplay, aAtomTab[i].pProtocol, False ); - m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ] = XInternAtom( m_pDisplay, "_NET_SUPPORTING_WM_CHECK", True ); - m_aWMAtoms[ NET_WM_NAME ] = XInternAtom( m_pDisplay, "_NET_WM_NAME", True ); -} - -/* - * NetWMAdaptor::initAtoms - */ - -void NetWMAdaptor::initAtoms() -{ - WMAdaptor::initAtoms(); - - m_aWMAtoms[ NET_SUPPORTED ] = XInternAtom( m_pDisplay, "_NET_SUPPORTED", True ); -} - -/* - * GnomeWMAdaptor::initAtoms - */ - -void GnomeWMAdaptor::initAtoms() -{ - WMAdaptor::initAtoms(); - - m_aWMAtoms[ WIN_PROTOCOLS ] = XInternAtom( m_pDisplay, "_WIN_PROTOCOLS", True ); - m_aWMAtoms[ WIN_SUPPORTING_WM_CHECK ] = XInternAtom( m_pDisplay, "_WIN_SUPPORTING_WM_CHECK", True ); -} - -/* - * WMAdaptor::setWMName - * sets WM_NAME - * WM_ICON_NAME - */ - -void WMAdaptor::setWMName( X11SalFrame* pFrame, const String& rWMName ) const -{ - ByteString aTitle( rWMName, osl_getThreadTextEncoding() ); - - if( ! rWMName.Len() && m_aWMName.EqualsAscii( "Dtwm" ) ) - aTitle = " "; - - ::rtl::OString aWMLocale; - rtl_Locale* pLocale = NULL; - osl_getProcessLocale( &pLocale ); - if( pLocale ) - { - ::rtl::OUString aLocaleString( pLocale->Language ); - ::rtl::OUString aCountry( pLocale->Country ); - ::rtl::OUString aVariant( pLocale->Variant ); - - if( aCountry.getLength() ) - { - aLocaleString += ::rtl::OUString::createFromAscii( "_" ); - aLocaleString += aCountry; - } - if( aVariant.getLength() ) - aLocaleString += aVariant; - aWMLocale = ::rtl::OUStringToOString( aLocaleString, RTL_TEXTENCODING_ISO_8859_1 ); - } - else - { - static const char* pLang = getenv( "LANG" ); - aWMLocale = pLang ? pLang : "C"; - } - - static bool bTrustXmb = true; - #ifdef SOLARIS - /* #i64273# there are some weird cases when using IIIMP on Solaris - * where for unknown reasons XmbTextListToTextProperty results in - * garbage. Test one string once to ensure safety. - * - * FIXME: This must be a bug in xiiimp.so.2 somewhere. However - * it was not possible to recreate this in a small sample program. - * This reeks of memory corruption somehow. - */ - static bool bOnce = true; - if( bOnce ) - { - bOnce = false; - XTextProperty aTestProp = { NULL, None, 0, 0 }; - const char *pText = "trustme"; - XmbTextListToTextProperty( m_pDisplay, - &const_cast(pText), - 1, - XStdICCTextStyle, - &aTestProp ); - bTrustXmb = (aTestProp.nitems == 7) && - (aTestProp.value != NULL ) && - (strncmp( (char*)aTestProp.value, pText, 7 ) == 0) && - (aTestProp.encoding == XA_STRING); - if( aTestProp.value ) - XFree( aTestProp.value ); - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "%s\n", - bTrustXmb ? - "XmbTextListToTextProperty seems to work" : - "XmbTextListToTextProperty does not seem to work" ); - #endif - } - #endif - - char* pT = const_cast(aTitle.GetBuffer()); - XTextProperty aProp = { NULL, None, 0, 0 }; - if( bTrustXmb ) - { - XmbTextListToTextProperty( m_pDisplay, - &pT, - 1, - XStdICCTextStyle, - &aProp ); - } - - unsigned char* pData = aProp.nitems ? aProp.value : (unsigned char*)aTitle.GetBuffer(); - Atom nType = aProp.nitems ? aProp.encoding : XA_STRING; - int nFormat = aProp.nitems ? aProp.format : 8; - int nBytes = aProp.nitems ? aProp.nitems : aTitle.Len(); - const SystemEnvData* pEnv = pFrame->GetSystemData(); - XChangeProperty( m_pDisplay, - (XLIB_Window)pEnv->aShellWindow, - XA_WM_NAME, - nType, - nFormat, - PropModeReplace, - pData, - nBytes ); - XChangeProperty( m_pDisplay, - (XLIB_Window)pEnv->aShellWindow, - XA_WM_ICON_NAME, - nType, - nFormat, - PropModeReplace, - pData, - nBytes ); - XChangeProperty( m_pDisplay, - (XLIB_Window)pEnv->aShellWindow, - m_aWMAtoms[ WM_LOCALE_NAME ], - XA_STRING, - 8, - PropModeReplace, - (unsigned char*)aWMLocale.getStr(), - aWMLocale.getLength() ); - if (aProp.value != NULL) - XFree( aProp.value ); -} - -/* - * NetWMAdaptor::setWMName - * sets WM_NAME - * _NET_WM_NAME - * WM_ICON_NAME - * _NET_WM_ICON_NAME - */ -void NetWMAdaptor::setWMName( X11SalFrame* pFrame, const String& rWMName ) const -{ - WMAdaptor::setWMName( pFrame, rWMName ); - - ByteString aTitle( rWMName, RTL_TEXTENCODING_UTF8 ); - const SystemEnvData* pEnv = pFrame->GetSystemData(); - if( m_aWMAtoms[ NET_WM_NAME ] ) - XChangeProperty( m_pDisplay, - (XLIB_Window)pEnv->aShellWindow, - m_aWMAtoms[ NET_WM_NAME ], - m_aWMAtoms[ UTF8_STRING ], - 8, - PropModeReplace, - (unsigned char*)aTitle.GetBuffer(), - aTitle.Len()+1 ); - if( m_aWMAtoms[ NET_WM_ICON_NAME ] ) - XChangeProperty( m_pDisplay, - (XLIB_Window)pEnv->aShellWindow, - m_aWMAtoms[ NET_WM_ICON_NAME ], - m_aWMAtoms[ UTF8_STRING ], - 8, - PropModeReplace, - (unsigned char*)aTitle.GetBuffer(), - aTitle.Len()+1 ); - // The +1 copies the terminating null byte. Although - // the spec says, this should not be necessary - // at least the kwin implementation seems to depend - // on the null byte -} - -/* - * NetWMAdaptor::setNetWMState - * sets _NET_WM_STATE - */ -void NetWMAdaptor::setNetWMState( X11SalFrame* pFrame ) const -{ - if( m_aWMAtoms[ NET_WM_STATE ] ) - { - Atom aStateAtoms[ 10 ]; - int nStateAtoms = 0; - - // set NET_WM_STATE_MODAL - if( m_aWMAtoms[ NET_WM_STATE_MODAL ] - && pFrame->meWindowType == windowType_ModalDialogue ) - { - aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_MODAL ]; - /* - * #90998# NET_WM_STATE_SKIP_TASKBAR set on a frame will - * cause kwin not to give it the focus on map request - * this seems to be a bug in kwin - * aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_SKIP_TASKBAR ]; - */ - } - if( pFrame->mbMaximizedVert - && m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_VERT ] ) - aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_VERT ]; - if( pFrame->mbMaximizedHorz - && m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_HORZ ] ) - aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_HORZ ]; - if( pFrame->bAlwaysOnTop_ && m_aWMAtoms[ NET_WM_STATE_STAYS_ON_TOP ] ) - aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_STAYS_ON_TOP ]; - if( pFrame->mbShaded && m_aWMAtoms[ NET_WM_STATE_SHADED ] ) - aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_SHADED ]; - if( pFrame->mbFullScreen && m_aWMAtoms[ NET_WM_STATE_FULLSCREEN ] ) - aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_FULLSCREEN ]; - if( pFrame->meWindowType == windowType_Utility && m_aWMAtoms[ NET_WM_STATE_SKIP_TASKBAR ] ) - aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_SKIP_TASKBAR ]; - - if( nStateAtoms ) - { - XChangeProperty( m_pDisplay, - pFrame->GetShellWindow(), - m_aWMAtoms[ NET_WM_STATE ], - XA_ATOM, - 32, - PropModeReplace, - (unsigned char*)aStateAtoms, - nStateAtoms - ); - } - else - XDeleteProperty( m_pDisplay, - pFrame->GetShellWindow(), - m_aWMAtoms[ NET_WM_STATE ] ); - if( pFrame->mbMaximizedHorz - && pFrame->mbMaximizedVert - && ! ( pFrame->nStyle_ & SAL_FRAME_STYLE_SIZEABLE ) ) - { - /* - * for maximizing use NorthWestGravity (including decoration) - */ - XSizeHints hints; - long supplied; - bool bHint = false; - if( XGetWMNormalHints( m_pDisplay, - pFrame->GetShellWindow(), - &hints, - &supplied ) ) - { - bHint = true; - hints.flags |= PWinGravity; - hints.win_gravity = NorthWestGravity; - XSetWMNormalHints( m_pDisplay, - pFrame->GetShellWindow(), - &hints ); - XSync( m_pDisplay, False ); - } - - // SetPosSize necessary to set width/height, min/max w/h - sal_Int32 nCurrent = 0; - /* - * get current desktop here if work areas have different size - * (does this happen on any platform ?) - */ - if( ! m_bEqualWorkAreas ) - { - nCurrent = getCurrentWorkArea(); - if( nCurrent < 0 ) - nCurrent = 0; - } - Rectangle aPosSize = m_aWMWorkAreas[nCurrent]; - const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() ); - aPosSize = Rectangle( Point( aPosSize.Left() + rGeom.nLeftDecoration, - aPosSize.Top() + rGeom.nTopDecoration ), - Size( aPosSize.GetWidth() - - rGeom.nLeftDecoration - - rGeom.nRightDecoration, - aPosSize.GetHeight() - - rGeom.nTopDecoration - - rGeom.nBottomDecoration ) - ); - pFrame->SetPosSize( aPosSize ); - - /* - * reset gravity hint to static gravity - * (this should not move window according to ICCCM) - */ - if( bHint && pFrame->nShowState_ != SHOWSTATE_UNKNOWN ) - { - hints.win_gravity = StaticGravity; - XSetWMNormalHints( m_pDisplay, - pFrame->GetShellWindow(), - &hints ); - } - } - } -} - -/* - * GnomeWMAdaptor::setNetWMState - * sets _WIN_STATE - */ -void GnomeWMAdaptor::setGnomeWMState( X11SalFrame* pFrame ) const -{ - if( m_aWMAtoms[ WIN_STATE ] ) - { - sal_uInt32 nWinWMState = 0; - - if( pFrame->mbMaximizedVert ) - nWinWMState |= 1 << 2; - if( pFrame->mbMaximizedHorz ) - nWinWMState |= 1 << 3; - if( pFrame->mbShaded ) - nWinWMState |= 1 << 5; - - XChangeProperty( m_pDisplay, - pFrame->GetShellWindow(), - m_aWMAtoms[ WIN_STATE ], - XA_CARDINAL, - 32, - PropModeReplace, - (unsigned char*)&nWinWMState, - 1 - ); - if( pFrame->mbMaximizedHorz - && pFrame->mbMaximizedVert - && ! ( pFrame->nStyle_ & SAL_FRAME_STYLE_SIZEABLE ) ) - { - /* - * for maximizing use NorthWestGravity (including decoration) - */ - XSizeHints hints; - long supplied; - bool bHint = false; - if( XGetWMNormalHints( m_pDisplay, - pFrame->GetShellWindow(), - &hints, - &supplied ) ) - { - bHint = true; - hints.flags |= PWinGravity; - hints.win_gravity = NorthWestGravity; - XSetWMNormalHints( m_pDisplay, - pFrame->GetShellWindow(), - &hints ); - XSync( m_pDisplay, False ); - } - - // SetPosSize necessary to set width/height, min/max w/h - sal_Int32 nCurrent = 0; - /* - * get current desktop here if work areas have different size - * (does this happen on any platform ?) - */ - if( ! m_bEqualWorkAreas ) - { - nCurrent = getCurrentWorkArea(); - if( nCurrent < 0 ) - nCurrent = 0; - } - Rectangle aPosSize = m_aWMWorkAreas[nCurrent]; - const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() ); - aPosSize = Rectangle( Point( aPosSize.Left() + rGeom.nLeftDecoration, - aPosSize.Top() + rGeom.nTopDecoration ), - Size( aPosSize.GetWidth() - - rGeom.nLeftDecoration - - rGeom.nRightDecoration, - aPosSize.GetHeight() - - rGeom.nTopDecoration - - rGeom.nBottomDecoration ) - ); - pFrame->SetPosSize( aPosSize ); - - /* - * reset gravity hint to static gravity - * (this should not move window according to ICCCM) - */ - if( bHint && pFrame->nShowState_ != SHOWSTATE_UNKNOWN ) - { - hints.win_gravity = StaticGravity; - XSetWMNormalHints( m_pDisplay, - pFrame->GetShellWindow(), - &hints ); - } - } - } -} - -/* - * WMAdaptor::setFrameDecoration - * sets _MOTIF_WM_HINTS - * WM_TRANSIENT_FOR - */ - -void WMAdaptor::setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eType, int nDecorationFlags, X11SalFrame* pReferenceFrame ) const -{ - pFrame->meWindowType = eType; - pFrame->mnDecorationFlags = nDecorationFlags; - - if( ! pFrame->mbFullScreen ) - { - // set mwm hints - struct _mwmhints { - unsigned long flags, func, deco; - long input_mode; - unsigned long status; - } aHint; - - aHint.flags = 15; /* flags for functions, decoration, input mode and status */ - aHint.deco = 0; - aHint.func = 1L << 2; - aHint.status = 0; - aHint.input_mode = 0; - - // evaluate decoration flags - if( nDecorationFlags & decoration_All ) - aHint.deco = 1, aHint.func = 1; - else - { - if( nDecorationFlags & decoration_Title ) - aHint.deco |= 1L << 3; - if( nDecorationFlags & decoration_Border ) - aHint.deco |= 1L << 1; - if( nDecorationFlags & decoration_Resize ) - aHint.deco |= 1L << 2, aHint.func |= 1L << 1; - if( nDecorationFlags & decoration_MinimizeBtn ) - aHint.deco |= 1L << 5, aHint.func |= 1L << 3; - if( nDecorationFlags & decoration_MaximizeBtn ) - aHint.deco |= 1L << 6, aHint.func |= 1L << 4; - if( nDecorationFlags & decoration_CloseBtn ) - aHint.deco |= 1L << 4, aHint.func |= 1L << 5; - } - // evaluate window type - switch( eType ) - { - case windowType_ModalDialogue: - aHint.input_mode = 1; - break; - default: - break; - } - - // set the hint - XChangeProperty( m_pDisplay, - pFrame->GetShellWindow(), - m_aWMAtoms[ MOTIF_WM_HINTS ], - m_aWMAtoms[ MOTIF_WM_HINTS ], - 32, - PropModeReplace, - (unsigned char*)&aHint, - 5 ); - } - - // set transientFor hint - /* #91030# dtwm will not map a dialogue if the transient - * window is iconified. This is deemed undesireable because - * message boxes do not get mapped, so use the root as transient - * instead. - */ - if( pReferenceFrame ) - { - XSetTransientForHint( m_pDisplay, - pFrame->GetShellWindow(), - pReferenceFrame->bMapped_ ? - pReferenceFrame->GetShellWindow() : - m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ) - ); - if( ! pReferenceFrame->bMapped_ ) - pFrame->mbTransientForRoot = true; - } - // #110333# in case no one ever sets a title prevent - // the Dtwm taking the class instead - if( m_aWMName.EqualsAscii( "Dtwm" ) ) - setWMName( pFrame, String() ); -} - -/* - * NetWMAdaptor::setFrameDecoration - * sets _MOTIF_WM_HINTS - * _NET_WM_WINDOW_TYPE - * _NET_WM_STATE - * WM_TRANSIENT_FOR - */ - -void NetWMAdaptor::setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eType, int nDecorationFlags, X11SalFrame* pReferenceFrame ) const -{ - WMAdaptor::setFrameTypeAndDecoration( pFrame, eType, nDecorationFlags, pReferenceFrame ); - - setNetWMState( pFrame ); - - // set NET_WM_WINDOW_TYPE - if( m_aWMAtoms[ NET_WM_WINDOW_TYPE ] ) - { - Atom aWindowTypes[4]; - int nWindowTypes = 0; - switch( eType ) - { - case windowType_Utility: - aWindowTypes[nWindowTypes++] = - m_aWMAtoms[ NET_WM_WINDOW_TYPE_UTILITY ] ? - m_aWMAtoms[ NET_WM_WINDOW_TYPE_UTILITY ] : - m_aWMAtoms[ NET_WM_WINDOW_TYPE_DIALOG ]; - break; - case windowType_ModelessDialogue: - case windowType_ModalDialogue: - aWindowTypes[nWindowTypes++] = - m_aWMAtoms[ NET_WM_WINDOW_TYPE_DIALOG ]; - break; - case windowType_Splash: - aWindowTypes[nWindowTypes++] = - m_aWMAtoms[ NET_WM_WINDOW_TYPE_SPLASH ] ? - m_aWMAtoms[ NET_WM_WINDOW_TYPE_SPLASH ] : - m_aWMAtoms[ NET_WM_WINDOW_TYPE_NORMAL ]; - break; - case windowType_Toolbar: - if( m_aWMAtoms[ KDE_NET_WM_WINDOW_TYPE_OVERRIDE ] ) - aWindowTypes[nWindowTypes++] = m_aWMAtoms[ KDE_NET_WM_WINDOW_TYPE_OVERRIDE ]; - aWindowTypes[nWindowTypes++] = - m_aWMAtoms[ NET_WM_WINDOW_TYPE_TOOLBAR ] ? - m_aWMAtoms[ NET_WM_WINDOW_TYPE_TOOLBAR ] : - m_aWMAtoms[ NET_WM_WINDOW_TYPE_NORMAL]; - break; - case windowType_Dock: - aWindowTypes[nWindowTypes++] = - m_aWMAtoms[ NET_WM_WINDOW_TYPE_DOCK ] ? - m_aWMAtoms[ NET_WM_WINDOW_TYPE_DOCK ] : - m_aWMAtoms[ NET_WM_WINDOW_TYPE_NORMAL]; - break; - default: - aWindowTypes[nWindowTypes++] = m_aWMAtoms[ NET_WM_WINDOW_TYPE_NORMAL ]; - break; - } - XChangeProperty( m_pDisplay, - pFrame->GetShellWindow(), - m_aWMAtoms[ NET_WM_WINDOW_TYPE ], - XA_ATOM, - 32, - PropModeReplace, - (unsigned char*)aWindowTypes, - nWindowTypes ); - } - if( ( eType == windowType_ModalDialogue || - eType == windowType_ModelessDialogue ) - && ! pReferenceFrame ) - { - XSetTransientForHint( m_pDisplay, - pFrame->GetShellWindow(), - m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ) ); - pFrame->mbTransientForRoot = true; - } -} - -/* - * WMAdaptor::maximizeFrame - */ - -void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVertical ) const -{ - pFrame->mbMaximizedVert = bVertical; - pFrame->mbMaximizedHorz = bHorizontal; - - const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() ); - - // discard pending configure notifies for this frame - XSync( m_pDisplay, False ); - XEvent aDiscard; - while( XCheckTypedWindowEvent( m_pDisplay, - pFrame->GetShellWindow(), - ConfigureNotify, - &aDiscard ) ) - ; - while( XCheckTypedWindowEvent( m_pDisplay, - pFrame->GetWindow(), - ConfigureNotify, - &aDiscard ) ) - ; - - if( bHorizontal || bVertical ) - { - Size aScreenSize( m_pSalDisplay->GetScreenSize( pFrame->GetScreenNumber() ) ); - Point aTL( rGeom.nLeftDecoration, rGeom.nTopDecoration ); - if( m_pSalDisplay->IsXinerama() ) - { - Point aMed( aTL.X() + rGeom.nWidth/2, aTL.Y() + rGeom.nHeight/2 ); - const std::vector< Rectangle >& rScreens = m_pSalDisplay->GetXineramaScreens(); - for( unsigned int i = 0; i < rScreens.size(); i++ ) - if( rScreens[i].IsInside( aMed ) ) - { - aTL += rScreens[i].TopLeft(); - aScreenSize = rScreens[i].GetSize(); - break; - } - } - Rectangle aTarget( aTL, - Size( aScreenSize.Width() - rGeom.nLeftDecoration - rGeom.nTopDecoration, - aScreenSize.Height() - rGeom.nTopDecoration - rGeom.nBottomDecoration ) - ); - if( ! bHorizontal ) - { - aTarget.SetSize( - Size( - pFrame->maRestorePosSize.IsEmpty() ? - rGeom.nWidth : pFrame->maRestorePosSize.GetWidth(), - aTarget.GetHeight() - ) - ); - aTarget.Left() = - pFrame->maRestorePosSize.IsEmpty() ? - rGeom.nX : pFrame->maRestorePosSize.Left(); - } - else if( ! bVertical ) - { - aTarget.SetSize( - Size( - aTarget.GetWidth(), - pFrame->maRestorePosSize.IsEmpty() ? - rGeom.nHeight : pFrame->maRestorePosSize.GetHeight() - ) - ); - aTarget.Top() = - pFrame->maRestorePosSize.IsEmpty() ? - rGeom.nY : pFrame->maRestorePosSize.Top(); - } - - Rectangle aRestore( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); - if( pFrame->bMapped_ ) - { - XSetInputFocus( m_pDisplay, - pFrame->GetShellWindow(), - RevertToNone, - CurrentTime - ); - if( m_aWMName.EqualsAscii( "Dtwm" ) ) - { - /* - * Dtwm will only position correctly with center gravity - * and in this case the request actually changes the frame - * not the shell window - */ - aTarget = Rectangle( Point( 0, 0 ), aScreenSize ); - aRestore.Move( -rGeom.nLeftDecoration, -rGeom.nTopDecoration ); - } - } - - if( pFrame->maRestorePosSize.IsEmpty() ) - pFrame->maRestorePosSize = aRestore; - - pFrame->SetPosSize( aTarget ); - pFrame->nWidth_ = aTarget.GetWidth(); - pFrame->nHeight_ = aTarget.GetHeight(); - XRaiseWindow( m_pDisplay, - pFrame->GetShellWindow() - ); - if( pFrame->GetStackingWindow() ) - XRaiseWindow( m_pDisplay, - pFrame->GetStackingWindow() - ); - - } - else - { - pFrame->SetPosSize( pFrame->maRestorePosSize ); - pFrame->maRestorePosSize = Rectangle(); - pFrame->nWidth_ = rGeom.nWidth; - pFrame->nHeight_ = rGeom.nHeight; - if( m_aWMName.EqualsAscii( "Dtwm" ) && pFrame->bMapped_ ) - { - pFrame->maGeometry.nX += rGeom.nLeftDecoration; - pFrame->maGeometry.nY += rGeom.nTopDecoration; - } - } -} - -/* - * NetWMAdaptor::maximizeFrame - * changes _NET_WM_STATE by sending a client message - */ - -void NetWMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVertical ) const -{ - pFrame->mbMaximizedVert = bVertical; - pFrame->mbMaximizedHorz = bHorizontal; - - if( m_aWMAtoms[ NET_WM_STATE ] - && m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_VERT ] - && m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_HORZ ] - && ( pFrame->nStyle_ & ~SAL_FRAME_STYLE_DEFAULT ) - ) - { - if( pFrame->bMapped_ ) - { - // window already mapped, send WM a message - XEvent aEvent; - aEvent.type = ClientMessage; - aEvent.xclient.display = m_pDisplay; - aEvent.xclient.window = pFrame->GetShellWindow(); - aEvent.xclient.message_type = m_aWMAtoms[ NET_WM_STATE ]; - aEvent.xclient.format = 32; - aEvent.xclient.data.l[0] = bHorizontal ? 1 : 0; - aEvent.xclient.data.l[1] = m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_HORZ ]; - aEvent.xclient.data.l[2] = bHorizontal == bVertical ? m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_VERT ] : 0; - aEvent.xclient.data.l[3] = 0; - aEvent.xclient.data.l[4] = 0; - XSendEvent( m_pDisplay, - m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), - False, - SubstructureNotifyMask | SubstructureRedirectMask, - &aEvent - ); - if( bHorizontal != bVertical ) - { - aEvent.xclient.data.l[0]= bVertical ? 1 : 0; - aEvent.xclient.data.l[1]= m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_VERT ]; - aEvent.xclient.data.l[2]= 0; - XSendEvent( m_pDisplay, - m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), - False, - SubstructureNotifyMask | SubstructureRedirectMask, - &aEvent - ); - } - } - else - { - // window not mapped yet, set _NET_WM_STATE directly - setNetWMState( pFrame ); - } - if( !bHorizontal && !bVertical ) - pFrame->maRestorePosSize = Rectangle(); - else if( pFrame->maRestorePosSize.IsEmpty() ) - { - const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() ); - pFrame->maRestorePosSize = - Rectangle( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); - } - } - else - WMAdaptor::maximizeFrame( pFrame, bHorizontal, bVertical ); -} - -/* - * GnomeWMAdaptor::maximizeFrame - * changes _WIN_STATE by sending a client message - */ - -void GnomeWMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVertical ) const -{ - pFrame->mbMaximizedVert = bVertical; - pFrame->mbMaximizedHorz = bHorizontal; - - if( m_aWMAtoms[ WIN_STATE ] - && ( pFrame->nStyle_ & ~SAL_FRAME_STYLE_DEFAULT ) - ) - { - if( pFrame->bMapped_ ) - { - // window already mapped, send WM a message - XEvent aEvent; - aEvent.type = ClientMessage; - aEvent.xclient.display = m_pDisplay; - aEvent.xclient.window = pFrame->GetShellWindow(); - aEvent.xclient.message_type = m_aWMAtoms[ WIN_STATE ]; - aEvent.xclient.format = 32; - aEvent.xclient.data.l[0] = (1<<2)|(1<<3); - aEvent.xclient.data.l[1] = - (bVertical ? (1<<2) : 0) - | (bHorizontal ? (1<<3) : 0); - aEvent.xclient.data.l[2] = 0; - aEvent.xclient.data.l[3] = 0; - aEvent.xclient.data.l[4] = 0; - XSendEvent( m_pDisplay, - m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), - False, - SubstructureNotifyMask, - &aEvent - ); - } - else - // window not mapped yet, set _WIN_STATE directly - setGnomeWMState( pFrame ); - - if( !bHorizontal && !bVertical ) - pFrame->maRestorePosSize = Rectangle(); - else if( pFrame->maRestorePosSize.IsEmpty() ) - { - const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() ); - pFrame->maRestorePosSize = - Rectangle( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); - } - } - else - WMAdaptor::maximizeFrame( pFrame, bHorizontal, bVertical ); -} - -/* - * WMAdaptor::supportsICCCMPos - */ - -bool WMAdaptor::supportsICCCMPos() const -{ - return - m_aWMName.EqualsAscii( "Sawfish" ) - || m_aWMName.EqualsAscii( "Dtwm" ); -} - -/* - * NetWMAdaptor::supportsICCCMPos - */ - -bool NetWMAdaptor::supportsICCCMPos() const -{ - return true; -} - - -/* - * WMAdaptor::enableAlwaysOnTop - */ -void WMAdaptor::enableAlwaysOnTop( X11SalFrame*, bool /*bEnable*/ ) const -{ -} - -/* - * NetWMAdaptor::enableAlwaysOnTop - */ -void NetWMAdaptor::enableAlwaysOnTop( X11SalFrame* pFrame, bool bEnable ) const -{ - pFrame->bAlwaysOnTop_ = bEnable; - if( m_aWMAtoms[ NET_WM_STATE_STAYS_ON_TOP ] ) - { - if( pFrame->bMapped_ ) - { - // window already mapped, send WM a message - XEvent aEvent; - aEvent.type = ClientMessage; - aEvent.xclient.display = m_pDisplay; - aEvent.xclient.window = pFrame->GetShellWindow(); - aEvent.xclient.message_type = m_aWMAtoms[ NET_WM_STATE ]; - aEvent.xclient.format = 32; - aEvent.xclient.data.l[0] = bEnable ? 1 : 0; - aEvent.xclient.data.l[1] = m_aWMAtoms[ NET_WM_STATE_STAYS_ON_TOP ]; - aEvent.xclient.data.l[2] = 0; - aEvent.xclient.data.l[3] = 0; - aEvent.xclient.data.l[4] = 0; - XSendEvent( m_pDisplay, - m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), - False, - SubstructureNotifyMask | SubstructureRedirectMask, - &aEvent - ); - } - else - setNetWMState( pFrame ); - } -} - -/* - * GnomeWMAdaptor::enableAlwaysOnTop - */ -void GnomeWMAdaptor::enableAlwaysOnTop( X11SalFrame* pFrame, bool bEnable ) const -{ - pFrame->bAlwaysOnTop_ = bEnable; - if( m_aWMAtoms[ WIN_LAYER ] ) - { - if( pFrame->bMapped_ ) - { - // window already mapped, send WM a message - XEvent aEvent; - aEvent.type = ClientMessage; - aEvent.xclient.display = m_pDisplay; - aEvent.xclient.window = pFrame->GetShellWindow(); - aEvent.xclient.message_type = m_aWMAtoms[ WIN_LAYER ]; - aEvent.xclient.format = 32; - aEvent.xclient.data.l[0] = bEnable ? 6 : 4; - aEvent.xclient.data.l[1] = 0; - aEvent.xclient.data.l[2] = 0; - aEvent.xclient.data.l[3] = 0; - aEvent.xclient.data.l[4] = 0; - XSendEvent( m_pDisplay, - m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), - False, - SubstructureNotifyMask | SubstructureRedirectMask, - &aEvent - ); - } - else - { - sal_uInt32 nNewLayer = bEnable ? 6 : 4; - XChangeProperty( m_pDisplay, - pFrame->GetShellWindow(), - m_aWMAtoms[ WIN_LAYER ], - XA_CARDINAL, - 32, - PropModeReplace, - (unsigned char*)&nNewLayer, - 1 - ); - } - } -} - -/* - * WMAdaptor::changeReferenceFrame - */ -void WMAdaptor::changeReferenceFrame( X11SalFrame* pFrame, X11SalFrame* pReferenceFrame ) const -{ - if( ! ( pFrame->nStyle_ & SAL_FRAME_STYLE_PLUG ) - && ! pFrame->IsOverrideRedirect() - && ! pFrame->IsFloatGrabWindow() - ) - { - XLIB_Window aTransient = pFrame->pDisplay_->GetRootWindow( pFrame->GetScreenNumber() ); - pFrame->mbTransientForRoot = true; - if( pReferenceFrame ) - { - aTransient = pReferenceFrame->GetShellWindow(); - pFrame->mbTransientForRoot = false; - } - XSetTransientForHint( m_pDisplay, - pFrame->GetShellWindow(), - aTransient ); - } -} - -/* - * WMAdaptor::handlePropertyNotify - */ -int WMAdaptor::handlePropertyNotify( X11SalFrame*, XPropertyEvent* ) const -{ - return 0; -} - -/* - * NetWMAdaptor::handlePropertyNotify - */ -int NetWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEvent ) const -{ - int nHandled = 1; - if( pEvent->atom == m_aWMAtoms[ NET_WM_STATE ] ) - { - pFrame->mbMaximizedHorz = pFrame->mbMaximizedVert = false; - pFrame->mbShaded = false; - - if( pEvent->state == PropertyNewValue ) - { - Atom nType, *pStates; - int nFormat; - unsigned long nItems, nBytesLeft; - unsigned char* pData = NULL; - long nOffset = 0; - do - { - XGetWindowProperty( m_pDisplay, - pEvent->window, - m_aWMAtoms[ NET_WM_STATE ], - nOffset, 64, - False, - XA_ATOM, - &nType, - &nFormat, - &nItems, &nBytesLeft, - &pData ); - if( pData ) - { - if( nType == XA_ATOM && nFormat == 32 && nItems > 0 ) - { - pStates = (Atom*)pData; - for( unsigned long i = 0; i < nItems; i++ ) - { - if( pStates[i] == m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_VERT ] && m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_VERT ] ) - pFrame->mbMaximizedVert = true; - else if( pStates[i] == m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_HORZ ] && m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_HORZ ] ) - pFrame->mbMaximizedHorz = true; - else if( pStates[i] == m_aWMAtoms[ NET_WM_STATE_SHADED ] && m_aWMAtoms[ NET_WM_STATE_SHADED ] ) - pFrame->mbShaded = true; - } - } - XFree( pData ); - pData = NULL; - nOffset += nItems * nFormat / 32; - } - else - break; - } while( nBytesLeft > 0 ); - } - - if( ! (pFrame->mbMaximizedHorz || pFrame->mbMaximizedVert ) ) - pFrame->maRestorePosSize = Rectangle(); - else - { - const SalFrameGeometry& rGeom = pFrame->GetUnmirroredGeometry(); - // the current geometry may already be changed by the corresponding - // ConfigureNotify, but this cannot be helped - pFrame->maRestorePosSize = - Rectangle( Point( rGeom.nX, rGeom.nY ), - Size( rGeom.nWidth, rGeom.nHeight ) ); - } - } - else if( pEvent->atom == m_aWMAtoms[ NET_WM_DESKTOP ] ) - { - pFrame->m_nWorkArea = getWindowWorkArea( pFrame->GetShellWindow() ); - } - else - nHandled = 0; - - return nHandled; -} - -/* - * GnomeWMAdaptor::handlePropertyNotify - */ -int GnomeWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEvent ) const -{ - int nHandled = 1; - if( pEvent->atom == m_aWMAtoms[ WIN_STATE ] ) - { - pFrame->mbMaximizedHorz = pFrame->mbMaximizedVert = false; - pFrame->mbShaded = false; - - if( pEvent->state == PropertyNewValue ) - { - Atom nType; - int nFormat = 0; - unsigned long nItems = 0; - unsigned long nBytesLeft = 0; - unsigned char* pData = 0; - XGetWindowProperty( m_pDisplay, - pEvent->window, - m_aWMAtoms[ WIN_STATE ], - 0, 1, - False, - XA_CARDINAL, - &nType, - &nFormat, - &nItems, &nBytesLeft, - &pData ); - if( pData ) - { - if( nType == XA_CARDINAL && nFormat == 32 && nItems == 1 ) - { - sal_uInt32 nWinState = *(sal_uInt32*)pData; - if( nWinState & (1<<2) ) - pFrame->mbMaximizedVert = true; - if( nWinState & (1<<3) ) - pFrame->mbMaximizedHorz = true; - if( nWinState & (1<<5) ) - pFrame->mbShaded = true; - } - XFree( pData ); - } - } - - if( ! (pFrame->mbMaximizedHorz || pFrame->mbMaximizedVert ) ) - pFrame->maRestorePosSize = Rectangle(); - else - { - const SalFrameGeometry& rGeom = pFrame->GetUnmirroredGeometry(); - // the current geometry may already be changed by the corresponding - // ConfigureNotify, but this cannot be helped - pFrame->maRestorePosSize = - Rectangle( Point( rGeom.nX, rGeom.nY ), - Size( rGeom.nWidth, rGeom.nHeight ) ); - } - } - else if( pEvent->atom == m_aWMAtoms[ NET_WM_DESKTOP ] ) - { - pFrame->m_nWorkArea = getWindowWorkArea( pFrame->GetShellWindow() ); - } - else - nHandled = 0; - - return nHandled; -} - -/* - * WMAdaptor::shade - */ -void WMAdaptor::shade( X11SalFrame*, bool /*bToShaded*/ ) const -{ -} - -/* - * NetWMAdaptor::shade - */ -void NetWMAdaptor::shade( X11SalFrame* pFrame, bool bToShaded ) const -{ - if( m_aWMAtoms[ NET_WM_STATE ] - && m_aWMAtoms[ NET_WM_STATE_SHADED ] - && ( pFrame->nStyle_ & ~SAL_FRAME_STYLE_DEFAULT ) - ) - { - pFrame->mbShaded = bToShaded; - if( pFrame->bMapped_ ) - { - // window already mapped, send WM a message - XEvent aEvent; - aEvent.type = ClientMessage; - aEvent.xclient.display = m_pDisplay; - aEvent.xclient.window = pFrame->GetShellWindow(); - aEvent.xclient.message_type = m_aWMAtoms[ NET_WM_STATE ]; - aEvent.xclient.format = 32; - aEvent.xclient.data.l[0] = bToShaded ? 1 : 0; - aEvent.xclient.data.l[1] = m_aWMAtoms[ NET_WM_STATE_SHADED ]; - aEvent.xclient.data.l[2] = 0; - aEvent.xclient.data.l[3] = 0; - aEvent.xclient.data.l[4] = 0; - XSendEvent( m_pDisplay, - m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), - False, - SubstructureNotifyMask | SubstructureRedirectMask, - &aEvent - ); - } - else - { - // window not mapped yet, set _NET_WM_STATE directly - setNetWMState( pFrame ); - } - } -} - -/* - * GnomeWMAdaptor::shade - */ -void GnomeWMAdaptor::shade( X11SalFrame* pFrame, bool bToShaded ) const -{ - if( m_aWMAtoms[ WIN_STATE ] ) - { - pFrame->mbShaded = bToShaded; - if( pFrame->bMapped_ ) - { - // window already mapped, send WM a message - XEvent aEvent; - aEvent.type = ClientMessage; - aEvent.xclient.display = m_pDisplay; - aEvent.xclient.window = pFrame->GetShellWindow(); - aEvent.xclient.message_type = m_aWMAtoms[ WIN_STATE ]; - aEvent.xclient.format = 32; - aEvent.xclient.data.l[0] = (1<<5); - aEvent.xclient.data.l[1] = bToShaded ? (1<<5) : 0; - aEvent.xclient.data.l[2] = 0; - aEvent.xclient.data.l[3] = 0; - aEvent.xclient.data.l[4] = 0; - XSendEvent( m_pDisplay, - m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), - False, - SubstructureNotifyMask | SubstructureRedirectMask, - &aEvent - ); - } - else - setGnomeWMState( pFrame ); - } -} - -/* - * WMAdaptor::showFullScreen - */ -void WMAdaptor::showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const -{ - pFrame->mbFullScreen = bFullScreen; - maximizeFrame( pFrame, bFullScreen, bFullScreen ); -} - -/* - * NetWMAdaptor::showFullScreen - */ -void NetWMAdaptor::showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const -{ - if( m_aWMAtoms[ NET_WM_STATE_FULLSCREEN ] ) - { - pFrame->mbFullScreen = bFullScreen; - if( bFullScreen ) - { - if( m_aWMAtoms[ MOTIF_WM_HINTS ] ) - { - XDeleteProperty( m_pDisplay, - pFrame->GetShellWindow(), - m_aWMAtoms[ MOTIF_WM_HINTS ] ); - } - } - if( pFrame->bMapped_ ) - { - // window already mapped, send WM a message - XEvent aEvent; - aEvent.type = ClientMessage; - aEvent.xclient.display = m_pDisplay; - aEvent.xclient.window = pFrame->GetShellWindow(); - aEvent.xclient.message_type = m_aWMAtoms[ NET_WM_STATE ]; - aEvent.xclient.format = 32; - aEvent.xclient.data.l[0] = bFullScreen ? 1 : 0; - aEvent.xclient.data.l[1] = m_aWMAtoms[ NET_WM_STATE_FULLSCREEN ]; - aEvent.xclient.data.l[2] = 0; - aEvent.xclient.data.l[3] = 0; - aEvent.xclient.data.l[4] = 0; - XSendEvent( m_pDisplay, - m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), - False, - SubstructureNotifyMask | SubstructureRedirectMask, - &aEvent - ); - } - else - { - // window not mapped yet, set _NET_WM_STATE directly - setNetWMState( pFrame ); - } - // #i42750# guess size before resize event shows up - if( bFullScreen ) - { - if( m_pSalDisplay->IsXinerama() ) - { - XLIB_Window aRoot, aChild; - int root_x = 0, root_y = 0, lx, ly; - unsigned int mask; - XQueryPointer( m_pDisplay, - m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), - &aRoot, &aChild, - &root_x, &root_y, &lx, &ly, &mask ); - const std::vector< Rectangle >& rScreens = m_pSalDisplay->GetXineramaScreens(); - Point aMousePoint( root_x, root_y ); - for( unsigned int i = 0; i < rScreens.size(); i++ ) - { - if( rScreens[i].IsInside( aMousePoint ) ) - { - pFrame->maGeometry.nX = rScreens[i].Left(); - pFrame->maGeometry.nY = rScreens[i].Top(); - pFrame->maGeometry.nWidth = rScreens[i].GetWidth(); - pFrame->maGeometry.nHeight = rScreens[i].GetHeight(); - break; - } - } - } - else - { - Size aSize = m_pSalDisplay->GetScreenSize( pFrame->GetScreenNumber() ); - pFrame->maGeometry.nX = 0; - pFrame->maGeometry.nY = 0; - pFrame->maGeometry.nWidth = aSize.Width(); - pFrame->maGeometry.nHeight = aSize.Height(); - } - pFrame->CallCallback( SALEVENT_MOVERESIZE, NULL ); - } - } - else WMAdaptor::showFullScreen( pFrame, bFullScreen ); -} - -/* - * WMAdaptor::getCurrentWorkArea - */ -// FIXME: multiscreen case -int WMAdaptor::getCurrentWorkArea() const -{ - int nCurrent = -1; - if( m_aWMAtoms[ NET_CURRENT_DESKTOP ] ) - { - Atom aRealType = None; - int nFormat = 8; - unsigned long nItems = 0; - unsigned long nBytesLeft = 0; - unsigned char* pProperty = NULL; - if( XGetWindowProperty( m_pDisplay, - m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), - m_aWMAtoms[ NET_CURRENT_DESKTOP ], - 0, 1, - False, - XA_CARDINAL, - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty ) == 0 - && pProperty - ) - { - nCurrent = int(*(sal_Int32*)pProperty); - XFree( pProperty ); - } - else if( pProperty ) - { - XFree( pProperty ); - pProperty = NULL; - } - } - return nCurrent; -} - -/* - * WMAdaptor::getWindowWorkArea - */ -int WMAdaptor::getWindowWorkArea( XLIB_Window aWindow ) const -{ - int nCurrent = -1; - if( m_aWMAtoms[ NET_WM_DESKTOP ] ) - { - Atom aRealType = None; - int nFormat = 8; - unsigned long nItems = 0; - unsigned long nBytesLeft = 0; - unsigned char* pProperty = NULL; - if( XGetWindowProperty( m_pDisplay, - aWindow, - m_aWMAtoms[ NET_WM_DESKTOP ], - 0, 1, - False, - XA_CARDINAL, - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty ) == 0 - && pProperty - ) - { - nCurrent = int(*(sal_Int32*)pProperty); - XFree( pProperty ); - } - else if( pProperty ) - { - XFree( pProperty ); - pProperty = NULL; - } - } - return nCurrent; -} - -/* - * WMAdaptor::getCurrentWorkArea - */ -// fixme: multi screen case -void WMAdaptor::switchToWorkArea( int nWorkArea, bool bConsiderWM ) const -{ - if( bConsiderWM && ! getWMshouldSwitchWorkspace() ) - return; - - if( m_aWMAtoms[ NET_CURRENT_DESKTOP ] ) - { - XEvent aEvent; - aEvent.type = ClientMessage; - aEvent.xclient.display = m_pDisplay; - aEvent.xclient.window = m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ); - aEvent.xclient.message_type = m_aWMAtoms[ NET_CURRENT_DESKTOP ]; - aEvent.xclient.format = 32; - aEvent.xclient.data.l[0] = nWorkArea; - aEvent.xclient.data.l[1] = 0; - aEvent.xclient.data.l[2] = 0; - aEvent.xclient.data.l[3] = 0; - aEvent.xclient.data.l[4] = 0; - XSendEvent( m_pDisplay, - m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ), - False, - SubstructureNotifyMask | SubstructureRedirectMask, - &aEvent - ); - } -} - -/* - * WMAdaptor::frameIsMapping - */ -void WMAdaptor::frameIsMapping( X11SalFrame* ) const -{ -} - -/* - * NetWMAdaptor::frameIsMapping - */ -void NetWMAdaptor::frameIsMapping( X11SalFrame* pFrame ) const -{ - setNetWMState( pFrame ); -} - -/* - * WMAdaptor::setFrameStruts - */ -void WMAdaptor::setFrameStruts( X11SalFrame*, - int, int, int, int, - int, int, int, int, - int, int, int, int ) const -{ -} - -/* - * NetWMAdaptor::setFrameStruts - */ -void NetWMAdaptor::setFrameStruts( X11SalFrame* pFrame, - int left, int right, int top, int bottom, - int left_start_y, int left_end_y, - int right_start_y, int right_end_y, - int top_start_x, int top_end_x, - int bottom_start_x, int bottom_end_x ) const -{ - long nData[12]; - nData[0] = left; - nData[1] = right; - nData[2] = top; - nData[3] = bottom; - nData[4] = left_start_y; - nData[5] = left_end_y; - nData[6] = right_start_y; - nData[7] = right_end_y; - nData[8] = top_start_x; - nData[9] = top_end_x; - nData[10]= bottom_start_x; - nData[11]= bottom_end_x; - Atom aProperty = None; - int nSetData = 0; - - if( m_aWMAtoms[NET_WM_STRUT_PARTIAL] ) - { - aProperty = m_aWMAtoms[NET_WM_STRUT_PARTIAL]; - nSetData = 12; - } - else if( m_aWMAtoms[NET_WM_STRUT] ) - { - aProperty = m_aWMAtoms[NET_WM_STRUT]; - nSetData = 4; - } - if( nSetData ) - { - XChangeProperty( m_pDisplay, - pFrame->GetShellWindow(), - aProperty, - XA_CARDINAL, - 32, - PropModeReplace, - (unsigned char*)&nData, - nSetData - ); - } -} - -/* - * WMAdaptor::setUserTime - */ -void WMAdaptor::setUserTime( X11SalFrame*, long ) const -{ -} - -/* - * NetWMAdaptor::setUserTime - */ -void NetWMAdaptor::setUserTime( X11SalFrame* i_pFrame, long i_nUserTime ) const -{ - if( m_aWMAtoms[NET_WM_USER_TIME] ) - { - XChangeProperty( m_pDisplay, - i_pFrame->GetShellWindow(), - m_aWMAtoms[NET_WM_USER_TIME], - XA_CARDINAL, - 32, - PropModeReplace, - (unsigned char*)&i_nUserTime, - 1 - ); - } -} - -/* - * WMAdaptor::setPID - */ -void WMAdaptor::setPID( X11SalFrame* i_pFrame ) const -{ - if( m_aWMAtoms[NET_WM_PID] ) - { - long nPID = (long)getpid(); - XChangeProperty( m_pDisplay, - i_pFrame->GetShellWindow(), - m_aWMAtoms[NET_WM_PID], - XA_CARDINAL, - 32, - PropModeReplace, - (unsigned char*)&nPID, - 1 - ); - } -} - -/* -* WMAdaptor::setClientMachine -*/ -void WMAdaptor::setClientMachine( X11SalFrame* i_pFrame ) const -{ - rtl::OString aWmClient( rtl::OUStringToOString( GetX11SalData()->GetLocalHostName(), RTL_TEXTENCODING_ASCII_US ) ); - XTextProperty aClientProp = { (unsigned char*)aWmClient.getStr(), XA_STRING, 8, aWmClient.getLength() }; - XSetWMClientMachine( m_pDisplay, i_pFrame->GetShellWindow(), &aClientProp ); -} - -void WMAdaptor::answerPing( X11SalFrame* i_pFrame, XClientMessageEvent* i_pEvent ) const -{ - if( m_aWMAtoms[NET_WM_PING] && - i_pEvent->message_type == m_aWMAtoms[ WM_PROTOCOLS ] && - (Atom)i_pEvent->data.l[0] == m_aWMAtoms[ NET_WM_PING ] ) - { - XEvent aEvent; - aEvent.xclient = *i_pEvent; - aEvent.xclient.window = m_pSalDisplay->GetRootWindow( i_pFrame->GetScreenNumber() ); - XSendEvent( m_pDisplay, - m_pSalDisplay->GetRootWindow( i_pFrame->GetScreenNumber() ), - False, - SubstructureNotifyMask | SubstructureRedirectMask, - &aEvent - ); - XFlush( m_pDisplay ); - } -} diff --git a/vcl/unx/source/desktopdetect/desktopdetector.cxx b/vcl/unx/source/desktopdetect/desktopdetector.cxx deleted file mode 100644 index 74ab2e2c3ea2..000000000000 --- a/vcl/unx/source/desktopdetect/desktopdetector.cxx +++ /dev/null @@ -1,343 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_vcl.hxx" - -#include -#include -#include -#include - -#include "vcl/dllapi.h" - -#include "rtl/ustrbuf.hxx" -#include "osl/module.h" -#include "osl/process.h" -#include "osl/thread.h" - -#include - -using namespace rtl; - -enum { - DESKTOP_NONE = 0, - DESKTOP_UNKNOWN, - DESKTOP_GNOME, - DESKTOP_KDE, - DESKTOP_KDE4, - DESKTOP_CDE -}; - -static const char * desktop_strings[] = { "none", "unknown", "GNOME", "KDE", "KDE4", "CDE" }; - -static bool is_gnome_desktop( Display* pDisplay ) -{ - bool ret = false; - - // warning: these checks are coincidental, GNOME does not - // explicitly advertise itself - - if ( NULL != getenv( "GNOME_DESKTOP_SESSION_ID" ) ) - ret = true; - - if( ! ret ) - { - Atom nAtom1 = XInternAtom( pDisplay, "GNOME_SM_PROXY", True ); - Atom nAtom2 = XInternAtom( pDisplay, "NAUTILUS_DESKTOP_WINDOW_ID", True ); - if( nAtom1 || nAtom2 ) - { - int nProperties = 0; - Atom* pProperties = XListProperties( pDisplay, DefaultRootWindow( pDisplay ), &nProperties ); - if( pProperties && nProperties ) - { - for( int i = 0; i < nProperties; i++ ) - if( pProperties[ i ] == nAtom1 || - pProperties[ i ] == nAtom2 ) - { - ret = true; - } - XFree( pProperties ); - } - } - } - - if( ! ret ) - { - Atom nUTFAtom = XInternAtom( pDisplay, "UTF8_STRING", True ); - Atom nNetWMNameAtom = XInternAtom( pDisplay, "_NET_WM_NAME", True ); - if( nUTFAtom && nNetWMNameAtom ) - { - // another, more expensive check: search for a gnome-panel - XLIB_Window aRoot, aParent, *pChildren = NULL; - unsigned int nChildren = 0; - XQueryTree( pDisplay, DefaultRootWindow( pDisplay ), - &aRoot, &aParent, &pChildren, &nChildren ); - if( pChildren && nChildren ) - { - for( unsigned int i = 0; i < nChildren && ! ret; i++ ) - { - Atom nType = None; - int nFormat = 0; - unsigned long nItems = 0, nBytes = 0; - unsigned char* pProp = NULL; - XGetWindowProperty( pDisplay, - pChildren[i], - nNetWMNameAtom, - 0, 8, - False, - nUTFAtom, - &nType, - &nFormat, - &nItems, - &nBytes, - &pProp ); - if( pProp && nType == nUTFAtom ) - { - OString aWMName( (sal_Char*)pProp ); - if( aWMName.equalsIgnoreAsciiCase( "gnome-panel" ) ) - ret = true; - } - if( pProp ) - XFree( pProp ); - } - XFree( pChildren ); - } - } - } - - return ret; -} - -static bool bWasXError = false; - -static inline bool WasXError() -{ - bool bRet = bWasXError; - bWasXError = false; - return bRet; -} - -extern "C" -{ - static int autodect_error_handler( Display*, XErrorEvent* ) - { - bWasXError = true; - return 0; - } - - typedef int(* XErrorHandler)(Display*,XErrorEvent*); -} - -static int KDEVersion( Display* pDisplay ) -{ - int nRet = 0; - - Atom nFullSession = XInternAtom( pDisplay, "KDE_FULL_SESSION", True ); - Atom nKDEVersion = XInternAtom( pDisplay, "KDE_SESSION_VERSION", True ); - - if( nFullSession ) - { - if( !nKDEVersion ) - return 3; - - Atom aRealType = None; - int nFormat = 8; - unsigned long nItems = 0; - unsigned long nBytesLeft = 0; - unsigned char* pProperty = NULL; - XGetWindowProperty( pDisplay, - DefaultRootWindow( pDisplay ), - nKDEVersion, - 0, 1, - False, - AnyPropertyType, - &aRealType, - &nFormat, - &nItems, - &nBytesLeft, - &pProperty ); - if( !WasXError() && nItems != 0 && pProperty ) - { - nRet = *reinterpret_cast< sal_Int32* >( pProperty ); - } - if( pProperty ) - { - XFree( pProperty ); - pProperty = NULL; - } - } - return nRet; -} - -static bool is_kde_desktop( Display* pDisplay ) -{ - if ( NULL != getenv( "KDE_FULL_SESSION" ) ) - { - const char *pVer = getenv( "KDE_SESSION_VERSION" ); - if ( !pVer || pVer[0] == '0' ) - { - return true; // does not exist => KDE3 - } - - rtl::OUString aVer( RTL_CONSTASCII_USTRINGPARAM( "3" ) ); - if ( aVer.equalsIgnoreAsciiCaseAscii( pVer ) ) - { - return true; - } - } - - if ( KDEVersion( pDisplay ) == 3 ) - return true; - - return false; -} - -static bool is_kde4_desktop( Display* pDisplay ) -{ - if ( NULL != getenv( "KDE_FULL_SESSION" ) ) - { - rtl::OUString aVer( RTL_CONSTASCII_USTRINGPARAM( "4" ) ); - - const char *pVer = getenv( "KDE_SESSION_VERSION" ); - if ( pVer && aVer.equalsIgnoreAsciiCaseAscii( pVer ) ) - return true; - } - - if ( KDEVersion( pDisplay ) == 4 ) - return true; - - return false; -} - -static bool is_cde_desktop( Display* pDisplay ) -{ - void* pLibrary = NULL; - - Atom nDtAtom = XInternAtom( pDisplay, "_DT_WM_READY", True ); - OUString aPathName( RTL_CONSTASCII_USTRINGPARAM( "file:///usr/dt/lib/libDtSvc.so" ) ); - if( nDtAtom && ( pLibrary = osl_loadModule( aPathName.pData, SAL_LOADMODULE_DEFAULT ) ) ) - { - osl_unloadModule( (oslModule)pLibrary ); - return true; - } - - return false; -} - - -extern "C" -{ - -VCL_DLLPUBLIC rtl::OUString get_desktop_environment() -{ - rtl::OUStringBuffer aRet( 8 ); - static const char *pOverride = getenv( "OOO_FORCE_DESKTOP" ); - - if ( pOverride && *pOverride ) - { - OString aOver( pOverride ); - - if ( aOver.equalsIgnoreAsciiCase( "cde" ) ) - aRet.appendAscii( desktop_strings[DESKTOP_CDE] ); - if ( aOver.equalsIgnoreAsciiCase( "kde4" ) ) - aRet.appendAscii( desktop_strings[DESKTOP_KDE4] ); - if ( aOver.equalsIgnoreAsciiCase( "gnome" ) ) - aRet.appendAscii( desktop_strings[DESKTOP_GNOME] ); - if ( aOver.equalsIgnoreAsciiCase( "kde" ) ) - aRet.appendAscii( desktop_strings[DESKTOP_KDE] ); - if ( aOver.equalsIgnoreAsciiCase( "none" ) ) - aRet.appendAscii( desktop_strings[DESKTOP_UNKNOWN] ); - } - - if( aRet.getLength() == 0 ) - { - // get display to connect to - const char* pDisplayStr = getenv( "DISPLAY" ); - int nParams = osl_getCommandArgCount(); - OUString aParam; - OString aBParm; - for( int i = 0; i < nParams; i++ ) - { - osl_getCommandArg( i, &aParam.pData ); - if( aParam.equalsAscii( "-headless" ) ) - { - pDisplayStr = NULL; - break; - } - if( i < nParams-1 && (aParam.equalsAscii( "-display" ) || aParam.equalsAscii( "--display" )) ) - { - osl_getCommandArg( i+1, &aParam.pData ); - aBParm = OUStringToOString( aParam, osl_getThreadTextEncoding() ); - pDisplayStr = aBParm.getStr(); - break; - } - } - - // no server at all - if( ! pDisplayStr || !*pDisplayStr ) - aRet.appendAscii( desktop_strings[DESKTOP_NONE] ); - else - { - /* #i92121# workaround deadlocks in the X11 implementation - */ - static const char* pNoXInitThreads = getenv( "SAL_NO_XINITTHREADS" ); - /* #i90094# - from now on we know that an X connection will be - established, so protect X against itself - */ - if( ! ( pNoXInitThreads && *pNoXInitThreads ) ) - XInitThreads(); - - Display* pDisplay = XOpenDisplay( pDisplayStr ); - if( pDisplay ) - { - XErrorHandler pOldHdl = XSetErrorHandler( autodect_error_handler ); - - if ( is_kde4_desktop( pDisplay ) ) - aRet.appendAscii( desktop_strings[DESKTOP_KDE4] ); - else if ( is_gnome_desktop( pDisplay ) ) - aRet.appendAscii( desktop_strings[DESKTOP_GNOME] ); - else if ( is_cde_desktop( pDisplay ) ) - aRet.appendAscii( desktop_strings[DESKTOP_CDE] ); - else if ( is_kde_desktop( pDisplay ) ) - aRet.appendAscii( desktop_strings[DESKTOP_KDE] ); - else - aRet.appendAscii( desktop_strings[DESKTOP_UNKNOWN] ); - - // set the default handler again - XSetErrorHandler( pOldHdl ); - - XCloseDisplay( pDisplay ); - } - } - } - - return aRet.makeStringAndClear(); -} - -} diff --git a/vcl/unx/source/desktopdetect/makefile.mk b/vcl/unx/source/desktopdetect/makefile.mk deleted file mode 100644 index 83d5d29f4b71..000000000000 --- a/vcl/unx/source/desktopdetect/makefile.mk +++ /dev/null @@ -1,57 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=dtdetect - -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"!="unx" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"!="unx" - -SLOFILES=$(SLO)$/desktopdetector.obj - -.ENDIF # "$(GUIBASE)"!="unx" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/vcl/unx/source/dtrans/X11_clipboard.cxx b/vcl/unx/source/dtrans/X11_clipboard.cxx deleted file mode 100644 index a08a9481b8e8..000000000000 --- a/vcl/unx/source/dtrans/X11_clipboard.cxx +++ /dev/null @@ -1,293 +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_vcl.hxx" - -#include -#include -#include -#include -#include -#include -#include -#include -#include // declaration of generic uno interface -#include // mapping stuff -#include -#include - -#if OSL_DEBUG_LEVEL > 1 -#include -#endif - -using namespace com::sun::star::datatransfer; -using namespace com::sun::star::datatransfer::clipboard; -using namespace com::sun::star::lang; -using namespace com::sun::star::uno; -using namespace com::sun::star::awt; -using namespace cppu; -using namespace osl; -using namespace rtl; -using namespace x11; - -X11Clipboard::X11Clipboard( SelectionManager& rManager, Atom aSelection ) : - ::cppu::WeakComponentImplHelper4< - ::com::sun::star::datatransfer::clipboard::XClipboardEx, - ::com::sun::star::datatransfer::clipboard::XClipboardNotifier, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::lang::XInitialization - >( rManager.getMutex() ), - - m_rSelectionManager( rManager ), - m_xSelectionManager( & rManager ), - m_aSelection( aSelection ) -{ -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "creating instance of X11Clipboard (this=%p)\n", this ); -#endif - - if( m_aSelection != None ) - { - m_rSelectionManager.registerHandler( m_aSelection, *this ); - } - else - { - m_rSelectionManager.registerHandler( XA_PRIMARY, *this ); - m_rSelectionManager.registerHandler( m_rSelectionManager.getAtom( OUString::createFromAscii( "CLIPBOARD" ) ), *this ); - } -} - -// ------------------------------------------------------------------------ - -X11Clipboard::~X11Clipboard() -{ - MutexGuard aGuard( *Mutex::getGlobalMutex() ); - -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "shutting down instance of X11Clipboard (this=%p, Selecttion=\"%s\")\n", this, OUStringToOString( m_rSelectionManager.getString( m_aSelection ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); -#endif - if( m_aSelection != None ) - m_rSelectionManager.deregisterHandler( m_aSelection ); - else - { - m_rSelectionManager.deregisterHandler( XA_PRIMARY ); - m_rSelectionManager.deregisterHandler( m_rSelectionManager.getAtom( OUString::createFromAscii( "CLIPBOARD" ) ) ); - } -} - - -// ------------------------------------------------------------------------ - -void X11Clipboard::fireChangedContentsEvent() -{ - ClearableMutexGuard aGuard( m_rSelectionManager.getMutex() ); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "X11Clipboard::fireChangedContentsEvent for %s (%d listeners)\n", - OUStringToOString( m_rSelectionManager.getString( m_aSelection ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), m_aListeners.size() ); -#endif - ::std::list< Reference< XClipboardListener > > listeners( m_aListeners ); - aGuard.clear(); - - ClipboardEvent aEvent( static_cast(this), m_aContents); - while( listeners.begin() != listeners.end() ) - { - if( listeners.front().is() ) - listeners.front()->changedContents(aEvent); - listeners.pop_front(); - } -} - -// ------------------------------------------------------------------------ - -void X11Clipboard::clearContents() -{ - ClearableMutexGuard aGuard(m_rSelectionManager.getMutex()); - // protect against deletion during outside call - Reference< XClipboard > xThis( static_cast(this)); - // copy member references on stack so they can be called - // without having the mutex - Reference< XClipboardOwner > xOwner( m_aOwner ); - Reference< XTransferable > xTrans( m_aContents ); - // clear members - m_aOwner.clear(); - m_aContents.clear(); - - // release the mutex - aGuard.clear(); - - // inform previous owner of lost ownership - if ( xOwner.is() ) - xOwner->lostOwnership(xThis, m_aContents); -} - -// ------------------------------------------------------------------------ - -Reference< XTransferable > SAL_CALL X11Clipboard::getContents() - throw(RuntimeException) -{ - MutexGuard aGuard(m_rSelectionManager.getMutex()); - - if( ! m_aContents.is() ) - m_aContents = new X11Transferable( SelectionManager::get(), static_cast< OWeakObject* >(this), m_aSelection ); - return m_aContents; -} - -// ------------------------------------------------------------------------ - -void SAL_CALL X11Clipboard::setContents( - const Reference< XTransferable >& xTrans, - const Reference< XClipboardOwner >& xClipboardOwner ) - throw(RuntimeException) -{ - // remember old values for callbacks before setting the new ones. - ClearableMutexGuard aGuard(m_rSelectionManager.getMutex()); - - Reference< XClipboardOwner > oldOwner( m_aOwner ); - m_aOwner = xClipboardOwner; - - Reference< XTransferable > oldContents( m_aContents ); - m_aContents = xTrans; - - aGuard.clear(); - - // for now request ownership for both selections - if( m_aSelection != None ) - m_rSelectionManager.requestOwnership( m_aSelection ); - else - { - m_rSelectionManager.requestOwnership( XA_PRIMARY ); - m_rSelectionManager.requestOwnership( m_rSelectionManager.getAtom( OUString::createFromAscii( "CLIPBOARD" ) ) ); - } - - // notify old owner on loss of ownership - if( oldOwner.is() ) - oldOwner->lostOwnership(static_cast < XClipboard * > (this), oldContents); - - // notify all listeners on content changes - fireChangedContentsEvent(); -} - -// ------------------------------------------------------------------------ - -OUString SAL_CALL X11Clipboard::getName() - throw(RuntimeException) -{ - return m_rSelectionManager.getString( m_aSelection ); -} - -// ------------------------------------------------------------------------ - -sal_Int8 SAL_CALL X11Clipboard::getRenderingCapabilities() - throw(RuntimeException) -{ - return RenderingCapabilities::Delayed; -} - - -// ------------------------------------------------------------------------ -void SAL_CALL X11Clipboard::addClipboardListener( const Reference< XClipboardListener >& listener ) - throw(RuntimeException) -{ - MutexGuard aGuard( m_rSelectionManager.getMutex() ); - m_aListeners.push_back( listener ); -} - -// ------------------------------------------------------------------------ - -void SAL_CALL X11Clipboard::removeClipboardListener( const Reference< XClipboardListener >& listener ) - throw(RuntimeException) -{ - MutexGuard aGuard( m_rSelectionManager.getMutex() ); - m_aListeners.remove( listener ); -} - - -// ------------------------------------------------------------------------ - -Reference< XTransferable > X11Clipboard::getTransferable() -{ - return getContents(); -} - -// ------------------------------------------------------------------------ - -void X11Clipboard::clearTransferable() -{ - clearContents(); -} - -// ------------------------------------------------------------------------ - -void X11Clipboard::fireContentsChanged() -{ - fireChangedContentsEvent(); -} - -// ------------------------------------------------------------------------ - -Reference< XInterface > X11Clipboard::getReference() throw() -{ - return Reference< XInterface >( static_cast< OWeakObject* >(this) ); -} - -// ------------------------------------------------------------------------ - -OUString SAL_CALL X11Clipboard::getImplementationName( ) - throw(RuntimeException) -{ - return OUString::createFromAscii(X11_CLIPBOARD_IMPLEMENTATION_NAME); -} - -// ------------------------------------------------------------------------ - -sal_Bool SAL_CALL X11Clipboard::supportsService( const OUString& ServiceName ) - throw(RuntimeException) -{ - Sequence < OUString > SupportedServicesNames = X11Clipboard_getSupportedServiceNames(); - - for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; ) - if (SupportedServicesNames[n].compareTo(ServiceName) == 0) - return sal_True; - - return sal_False; -} - -// ------------------------------------------------------------------------ - -void SAL_CALL X11Clipboard::initialize( const Sequence< Any >& ) throw( ::com::sun::star::uno::Exception ) -{ -} - -// ------------------------------------------------------------------------ - -Sequence< OUString > SAL_CALL X11Clipboard::getSupportedServiceNames( ) - throw(RuntimeException) -{ - return X11Clipboard_getSupportedServiceNames(); -} - diff --git a/vcl/unx/source/dtrans/X11_clipboard.hxx b/vcl/unx/source/dtrans/X11_clipboard.hxx deleted file mode 100644 index 21bf547a9cb7..000000000000 --- a/vcl/unx/source/dtrans/X11_clipboard.hxx +++ /dev/null @@ -1,151 +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 _DTRANS_X11_CLIPBOARD_HXX_ -#define _DTRANS_X11_CLIPBOARD_HXX_ - -#include - -#ifndef _COM_SUN_STAR_DATATRANSFER_CLIPBAORD_XCLIPBOARDEX_HPP_ -#include -#endif - -#ifndef _COM_SUN_STAR_DATATRANSFER_CLIPBAORD_XCLIPBOARDNOTIFIER_HPP_ -#include -#endif -#include - -// ------------------------------------------------------------------------ - -#define X11_CLIPBOARD_IMPLEMENTATION_NAME "com.sun.star.datatransfer.X11ClipboardSupport" - -namespace x11 { - - class X11Clipboard : - public ::cppu::WeakComponentImplHelper4 < - ::com::sun::star::datatransfer::clipboard::XClipboardEx, - ::com::sun::star::datatransfer::clipboard::XClipboardNotifier, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::lang::XInitialization - >, - public SelectionAdaptor - { - Reference< ::com::sun::star::datatransfer::XTransferable > m_aContents; - Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner > m_aOwner; - - SelectionManager& m_rSelectionManager; - Reference< ::com::sun::star::lang::XInitialization > m_xSelectionManager; - ::std::list< Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener > > m_aListeners; - Atom m_aSelection; - - protected: - - - friend class SelectionManager; - friend class X11_Transferable; - - void fireChangedContentsEvent(); - void clearContents(); - - public: - - X11Clipboard( SelectionManager& rManager, Atom aSelection ); - virtual ~X11Clipboard(); - - static X11Clipboard* get( const ::rtl::OUString& rDisplayName, Atom aSelection ); - - /* - * XInitialization - */ - virtual void SAL_CALL initialize( const Sequence< Any >& arguments ) throw( ::com::sun::star::uno::Exception ); - - /* - * XServiceInfo - */ - - virtual ::rtl::OUString SAL_CALL getImplementationName( ) - throw(RuntimeException); - - virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) - throw(RuntimeException); - - virtual Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) - throw(RuntimeException); - - /* - * XClipboard - */ - - virtual Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getContents() - throw(RuntimeException); - - virtual void SAL_CALL setContents( - const Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans, - const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner ) - throw(RuntimeException); - - virtual ::rtl::OUString SAL_CALL getName() - throw(RuntimeException); - - /* - * XClipboardEx - */ - - virtual sal_Int8 SAL_CALL getRenderingCapabilities() - throw(RuntimeException); - - /* - * XClipboardNotifier - */ - virtual void SAL_CALL addClipboardListener( - const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener ) - throw(RuntimeException); - - virtual void SAL_CALL removeClipboardListener( - const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener ) - throw(RuntimeException); - - /* - * SelectionAdaptor - */ - virtual Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable(); - virtual void clearTransferable(); - virtual void fireContentsChanged(); - virtual Reference< XInterface > getReference() throw(); - }; - -// ------------------------------------------------------------------------ - - Sequence< ::rtl::OUString > SAL_CALL X11Clipboard_getSupportedServiceNames(); - Reference< XInterface > SAL_CALL X11Clipboard_createInstance( - const Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory); - -// ------------------------------------------------------------------------ - -} // namepspace - -#endif diff --git a/vcl/unx/source/dtrans/X11_dndcontext.cxx b/vcl/unx/source/dtrans/X11_dndcontext.cxx deleted file mode 100644 index e6fc3dd8a532..000000000000 --- a/vcl/unx/source/dtrans/X11_dndcontext.cxx +++ /dev/null @@ -1,138 +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_vcl.hxx" - -#include -#include - -using namespace cppu; -using namespace x11; - -/* - * DropTargetDropContext - */ - -DropTargetDropContext::DropTargetDropContext( - XLIB_Window aDropWindow, - XLIB_Time aTimestamp, - SelectionManager& rManager ) : - m_aDropWindow( aDropWindow ), - m_nTimestamp( aTimestamp ), - m_rManager( rManager ), - m_xManagerRef( static_cast< OWeakObject* >(&rManager) ) -{ -} - -DropTargetDropContext::~DropTargetDropContext() -{ -} - -void DropTargetDropContext::acceptDrop( sal_Int8 dragOperation ) throw() -{ - m_rManager.accept( dragOperation, m_aDropWindow, m_nTimestamp ); -} - -void DropTargetDropContext::rejectDrop() throw() -{ - m_rManager.reject( m_aDropWindow, m_nTimestamp ); -} - -void DropTargetDropContext::dropComplete( sal_Bool success ) throw() -{ - m_rManager.dropComplete( success, m_aDropWindow, m_nTimestamp ); -} - - -/* - * DropTargetDragContext - */ - -DropTargetDragContext::DropTargetDragContext( - XLIB_Window aDropWindow, - XLIB_Time aTimestamp, - SelectionManager& rManager ) : - m_aDropWindow( aDropWindow ), - m_nTimestamp( aTimestamp ), - m_rManager( rManager ), - m_xManagerRef( static_cast< OWeakObject* >(&rManager) ) -{ -} - -DropTargetDragContext::~DropTargetDragContext() -{ -} - -void DropTargetDragContext::acceptDrag( sal_Int8 dragOperation ) throw() -{ - m_rManager.accept( dragOperation, m_aDropWindow, m_nTimestamp ); -} - -void DropTargetDragContext::rejectDrag() throw() -{ - m_rManager.reject( m_aDropWindow, m_nTimestamp ); -} - -/* - * DragSourceContext - */ - -DragSourceContext::DragSourceContext( - XLIB_Window aDropWindow, - XLIB_Time aTimestamp, - SelectionManager& rManager ) : - m_aDropWindow( aDropWindow ), - m_nTimestamp( aTimestamp ), - m_rManager( rManager ), - m_xManagerRef( static_cast< OWeakObject* >(&rManager) ) -{ -} - -DragSourceContext::~DragSourceContext() -{ -} - -sal_Int32 DragSourceContext::getCurrentCursor() throw() -{ - return m_rManager.getCurrentCursor(); -} - -void DragSourceContext::setCursor( sal_Int32 cursorId ) throw() -{ - m_rManager.setCursor( cursorId, m_aDropWindow, m_nTimestamp ); -} - -void DragSourceContext::setImage( sal_Int32 imageId ) throw() -{ - m_rManager.setImage( imageId, m_aDropWindow, m_nTimestamp ); -} - -void DragSourceContext::transferablesFlavorsChanged() throw() -{ - m_rManager.transferablesFlavorsChanged(); -} diff --git a/vcl/unx/source/dtrans/X11_dndcontext.hxx b/vcl/unx/source/dtrans/X11_dndcontext.hxx deleted file mode 100644 index 9b48d346f03b..000000000000 --- a/vcl/unx/source/dtrans/X11_dndcontext.hxx +++ /dev/null @@ -1,104 +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 _DTRANS_X11_DNDCONTEXT_HXX -#define _DTRANS_X11_DNDCONTEXT_HXX - -#include -#include -#include -#include - -#include "tools/prex.h" -#include -#include "tools/postx.h" - -using namespace com::sun::star::uno; - -namespace x11 { - - class SelectionManager; - - class DropTargetDropContext : - public ::cppu::WeakImplHelper1< - ::com::sun::star::datatransfer::dnd::XDropTargetDropContext - > - { - XLIB_Window m_aDropWindow; - XLIB_Time m_nTimestamp; - SelectionManager& m_rManager; - Reference< XInterface > m_xManagerRef; - public: - DropTargetDropContext( XLIB_Window, XLIB_Time, SelectionManager& ); - virtual ~DropTargetDropContext(); - - // XDropTargetDropContext - virtual void SAL_CALL acceptDrop( sal_Int8 dragOperation ) throw(); - virtual void SAL_CALL rejectDrop() throw(); - virtual void SAL_CALL dropComplete( sal_Bool success ) throw(); - }; - - class DropTargetDragContext : - public ::cppu::WeakImplHelper1< - ::com::sun::star::datatransfer::dnd::XDropTargetDragContext - > - { - XLIB_Window m_aDropWindow; - XLIB_Time m_nTimestamp; - SelectionManager& m_rManager; - Reference< XInterface > m_xManagerRef; - public: - DropTargetDragContext( XLIB_Window, XLIB_Time, SelectionManager& ); - virtual ~DropTargetDragContext(); - - // XDropTargetDragContext - virtual void SAL_CALL acceptDrag( sal_Int8 dragOperation ) throw(); - virtual void SAL_CALL rejectDrag() throw(); - }; - - class DragSourceContext : - public ::cppu::WeakImplHelper1< - ::com::sun::star::datatransfer::dnd::XDragSourceContext - > - { - XLIB_Window m_aDropWindow; - XLIB_Time m_nTimestamp; - SelectionManager& m_rManager; - Reference< XInterface > m_xManagerRef; - public: - DragSourceContext( XLIB_Window, XLIB_Time, SelectionManager& ); - virtual ~DragSourceContext(); - - // XDragSourceContext - virtual sal_Int32 SAL_CALL getCurrentCursor() throw(); - virtual void SAL_CALL setCursor( sal_Int32 cursorId ) throw(); - virtual void SAL_CALL setImage( sal_Int32 imageId ) throw(); - virtual void SAL_CALL transferablesFlavorsChanged() throw(); - }; -} // namespace - -#endif // _DTRANS_X11_DNDCONTEXT_HXX diff --git a/vcl/unx/source/dtrans/X11_droptarget.cxx b/vcl/unx/source/dtrans/X11_droptarget.cxx deleted file mode 100644 index 5db23329abd8..000000000000 --- a/vcl/unx/source/dtrans/X11_droptarget.cxx +++ /dev/null @@ -1,228 +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_vcl.hxx" - -#include - -using namespace x11; -using namespace rtl; -using namespace com::sun::star::lang; -using namespace com::sun::star::awt; -using namespace com::sun::star::datatransfer; -using namespace com::sun::star::datatransfer::dnd; - -DropTarget::DropTarget() : - ::cppu::WeakComponentImplHelper3< - XDropTarget, - XInitialization, - XServiceInfo - >( m_aMutex ), - m_bActive( false ), - m_nDefaultActions( 0 ), - m_aTargetWindow( None ), - m_pSelectionManager( NULL ) -{ -} - -DropTarget::~DropTarget() -{ - if( m_pSelectionManager ) - m_pSelectionManager->deregisterDropTarget( m_aTargetWindow ); -} - -// -------------------------------------------------------------------------- - -void DropTarget::initialize( const Sequence< Any >& arguments ) throw( ::com::sun::star::uno::Exception ) -{ - if( arguments.getLength() > 1 ) - { - OUString aDisplayName; - Reference< XDisplayConnection > xConn; - arguments.getConstArray()[0] >>= xConn; - if( xConn.is() ) - { - Any aIdentifier; - aIdentifier >>= aDisplayName; - } - - m_pSelectionManager = &SelectionManager::get( aDisplayName ); - m_xSelectionManager = static_cast< XDragSource* >(m_pSelectionManager); - m_pSelectionManager->initialize( arguments ); - - if( m_pSelectionManager->getDisplay() ) // #136582# sanity check - { - sal_Size aWindow = None; - arguments.getConstArray()[1] >>= aWindow; - m_pSelectionManager->registerDropTarget( aWindow, this ); - m_aTargetWindow = aWindow; - m_bActive = true; - } - } -} - -// -------------------------------------------------------------------------- - -void DropTarget::addDropTargetListener( const Reference< XDropTargetListener >& xListener ) throw() -{ - ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); - - m_aListeners.push_back( xListener ); -} - -// -------------------------------------------------------------------------- - -void DropTarget::removeDropTargetListener( const Reference< XDropTargetListener >& xListener ) throw() -{ - ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); - - m_aListeners.remove( xListener ); -} - -// -------------------------------------------------------------------------- - -sal_Bool DropTarget::isActive() throw() -{ - return m_bActive; -} - -// -------------------------------------------------------------------------- - -void DropTarget::setActive( sal_Bool active ) throw() -{ - ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); - - m_bActive = active; -} - -// -------------------------------------------------------------------------- - -sal_Int8 DropTarget::getDefaultActions() throw() -{ - return m_nDefaultActions; -} - -// -------------------------------------------------------------------------- - -void DropTarget::setDefaultActions( sal_Int8 actions ) throw() -{ - ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); - - m_nDefaultActions = actions; -} - -// -------------------------------------------------------------------------- - -void DropTarget::drop( const DropTargetDropEvent& dtde ) throw() -{ - osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex ); - std::list< Reference< XDropTargetListener > > aListeners( m_aListeners ); - aGuard.clear(); - - for( std::list< Reference< XDropTargetListener > >::iterator it = aListeners.begin(); it!= aListeners.end(); ++it ) - { - (*it)->drop( dtde ); - } -} - -// -------------------------------------------------------------------------- - -void DropTarget::dragEnter( const DropTargetDragEnterEvent& dtde ) throw() -{ - osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex ); - std::list< Reference< XDropTargetListener > > aListeners( m_aListeners ); - aGuard.clear(); - - for( std::list< Reference< XDropTargetListener > >::iterator it = aListeners.begin(); it!= aListeners.end(); ++it ) - { - (*it)->dragEnter( dtde ); - } -} - -// -------------------------------------------------------------------------- - -void DropTarget::dragExit( const DropTargetEvent& dte ) throw() -{ - osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex ); - std::list< Reference< XDropTargetListener > > aListeners( m_aListeners ); - aGuard.clear(); - - for( std::list< Reference< XDropTargetListener > >::iterator it = aListeners.begin(); it!= aListeners.end(); ++it ) - { - (*it)->dragExit( dte ); - } -} - -// -------------------------------------------------------------------------- - -void DropTarget::dragOver( const DropTargetDragEvent& dtde ) throw() -{ - osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex ); - std::list< Reference< XDropTargetListener > > aListeners( m_aListeners ); - aGuard.clear(); - - for( std::list< Reference< XDropTargetListener > >::iterator it = aListeners.begin(); it!= aListeners.end(); ++it ) - { - (*it)->dragOver( dtde ); - } -} - -// -------------------------------------------------------------------------- - -/* - * XServiceInfo - */ - -// ------------------------------------------------------------------------ - -OUString DropTarget::getImplementationName() throw() -{ - return OUString::createFromAscii(XDND_DROPTARGET_IMPLEMENTATION_NAME); -} - -// ------------------------------------------------------------------------ - -sal_Bool DropTarget::supportsService( const OUString& ServiceName ) throw() -{ - Sequence < OUString > SupportedServicesNames = Xdnd_dropTarget_getSupportedServiceNames(); - - for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; ) - if (SupportedServicesNames[n].compareTo(ServiceName) == 0) - return sal_True; - - return sal_False; -} - -// ------------------------------------------------------------------------ - -Sequence< OUString > DropTarget::getSupportedServiceNames() throw() -{ - return Xdnd_dropTarget_getSupportedServiceNames(); -} - - diff --git a/vcl/unx/source/dtrans/X11_selection.cxx b/vcl/unx/source/dtrans/X11_selection.cxx deleted file mode 100644 index 403ee9707a94..000000000000 --- a/vcl/unx/source/dtrans/X11_selection.cxx +++ /dev/null @@ -1,4205 +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_vcl.hxx" - -#include "saldisp.hxx" -#include "saldata.hxx" - -#include -#include -#include -#include - -#include "tools/prex.h" -#include -#include -#include -#include "tools/postx.h" -#if defined(LINUX) || defined(NETBSD) || defined (FREEBSD) -#include -#else -#include -#endif -#include - -#include -#include -#include -#include -#include - -#include "vcl/svapp.hxx" - -// pointer bitmaps -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#define DRAG_EVENT_MASK ButtonPressMask |\ - ButtonReleaseMask |\ - PointerMotionMask |\ - EnterWindowMask |\ - LeaveWindowMask - -using namespace com::sun::star::datatransfer; -using namespace com::sun::star::datatransfer::dnd; -using namespace com::sun::star::lang; -using namespace com::sun::star::awt; -using namespace com::sun::star::uno; -using namespace com::sun::star::frame; -using namespace cppu; -using namespace osl; -using namespace rtl; - -using namespace x11; - -// stubs to satisfy solaris compiler's rather rigid linking warning -extern "C" -{ - static void call_SelectionManager_run( void * pMgr ) - { - SelectionManager::run( pMgr ); - } - - static void call_SelectionManager_runDragExecute( void * pMgr ) - { - SelectionManager::runDragExecute( pMgr ); - } -} - - -static const long nXdndProtocolRevision = 5; - -// mapping between mime types (or what the office thinks of mime types) -// and X convention types -struct NativeTypeEntry -{ - Atom nAtom; - const char* pType; // Mime encoding on our side - const char* pNativeType; // string corresponding to nAtom for the case of nAtom being uninitialized - int nFormat; // the corresponding format -}; - -// the convention for Xdnd is mime types as specified by the corresponding -// RFC's with the addition that text/plain without charset tag contains iso8859-1 -// sadly some applications (e.g. gtk) do not honor the mimetype only rule, -// so for compatibility add UTF8_STRING -static NativeTypeEntry aXdndConversionTab[] = -{ - { 0, "text/plain;charset=iso8859-1", "text/plain", 8 }, - { 0, "text/plain;charset=utf-8", "UTF8_STRING", 8 } -}; - -// for clipboard and primary selections there is only a convention for text -// that the encoding name of the text is taken as type in all capitalized letters -static NativeTypeEntry aNativeConversionTab[] = -{ - { 0, "text/plain;charset=utf-16", "ISO10646-1", 16 }, - { 0, "text/plain;charset=utf-8", "UTF8_STRING", 8 }, - { 0, "text/plain;charset=utf-8", "UTF-8", 8 }, - { 0, "text/plain;charset=utf-8", "text/plain;charset=UTF-8", 8 }, - // ISO encodings - { 0, "text/plain;charset=iso8859-2", "ISO8859-2", 8 }, - { 0, "text/plain;charset=iso8859-3", "ISO8859-3", 8 }, - { 0, "text/plain;charset=iso8859-4", "ISO8859-4", 8 }, - { 0, "text/plain;charset=iso8859-5", "ISO8859-5", 8 }, - { 0, "text/plain;charset=iso8859-6", "ISO8859-6", 8 }, - { 0, "text/plain;charset=iso8859-7", "ISO8859-7", 8 }, - { 0, "text/plain;charset=iso8859-8", "ISO8859-8", 8 }, - { 0, "text/plain;charset=iso8859-9", "ISO8859-9", 8 }, - { 0, "text/plain;charset=iso8859-10", "ISO8859-10", 8 }, - { 0, "text/plain;charset=iso8859-13", "ISO8859-13", 8 }, - { 0, "text/plain;charset=iso8859-14", "ISO8859-14", 8 }, - { 0, "text/plain;charset=iso8859-15", "ISO8859-15", 8 }, - // asian encodings - { 0, "text/plain;charset=jisx0201.1976-0", "JISX0201.1976-0", 8 }, - { 0, "text/plain;charset=jisx0208.1983-0", "JISX0208.1983-0", 8 }, - { 0, "text/plain;charset=jisx0208.1990-0", "JISX0208.1990-0", 8 }, - { 0, "text/plain;charset=jisx0212.1990-0", "JISX0212.1990-0", 8 }, - { 0, "text/plain;charset=gb2312.1980-0", "GB2312.1980-0", 8 }, - { 0, "text/plain;charset=ksc5601.1992-0", "KSC5601.1992-0", 8 }, - // eastern european encodings - { 0, "text/plain;charset=koi8-r", "KOI8-R", 8 }, - { 0, "text/plain;charset=koi8-u", "KOI8-U", 8 }, - // String (== iso8859-1) - { XA_STRING, "text/plain;charset=iso8859-1", "STRING", 8 }, - // special for compound text - { 0, "text/plain;charset=compound_text", "COMPOUND_TEXT", 8 }, - - // PIXMAP - { XA_PIXMAP, "image/bmp", "PIXMAP", 32 } -}; - -rtl_TextEncoding x11::getTextPlainEncoding( const OUString& rMimeType ) -{ - rtl_TextEncoding aEncoding = RTL_TEXTENCODING_DONTKNOW; - OUString aMimeType( rMimeType.toAsciiLowerCase() ); - sal_Int32 nIndex = 0; - if( aMimeType.getToken( 0, ';', nIndex ).equalsAsciiL( "text/plain" , 10 ) ) - { - if( aMimeType.getLength() == 10 ) // only "text/plain" - aEncoding = RTL_TEXTENCODING_ISO_8859_1; - else - { - while( nIndex != -1 ) - { - OUString aToken = aMimeType.getToken( 0, ';', nIndex ); - sal_Int32 nPos = 0; - if( aToken.getToken( 0, '=', nPos ).equalsAsciiL( "charset", 7 ) ) - { - OString aEncToken = OUStringToOString( aToken.getToken( 0, '=', nPos ), RTL_TEXTENCODING_ISO_8859_1 ); - aEncoding = rtl_getTextEncodingFromUnixCharset( aEncToken.getStr() ); - if( aEncoding == RTL_TEXTENCODING_DONTKNOW ) - { - if( aEncToken.equalsIgnoreAsciiCase( "utf-8" ) ) - aEncoding = RTL_TEXTENCODING_UTF8; - } - if( aEncoding != RTL_TEXTENCODING_DONTKNOW ) - break; - } - } - } - } -#if OSL_DEBUG_LEVEL > 1 - if( aEncoding == RTL_TEXTENCODING_DONTKNOW ) - fprintf( stderr, "getTextPlainEncoding( %s ) failed\n", OUStringToOString( rMimeType, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); -#endif - return aEncoding; -} - -// ------------------------------------------------------------------------ - -::std::hash_map< OUString, SelectionManager*, OUStringHash >& SelectionManager::getInstances() -{ - static ::std::hash_map< OUString, SelectionManager*, OUStringHash > aInstances; - return aInstances; -} - -// ------------------------------------------------------------------------ - -SelectionManager::SelectionManager() : - m_nIncrementalThreshold( 15*1024 ), - m_pDisplay( NULL ), - m_aThread( NULL ), - m_aDragExecuteThread( NULL ), - m_aWindow( None ), - m_nSelectionTimeout( 0 ), - m_nSelectionTimestamp( CurrentTime ), - m_bDropEnterSent( true ), - m_aCurrentDropWindow( None ), - m_nDropTime( None ), - m_nLastDropAction( 0 ), - m_nLastX( 0 ), - m_nLastY( 0 ), - m_nDropTimestamp( 0 ), - m_bDropWaitingForCompletion( false ), - m_aDropWindow( None ), - m_aDropProxy( None ), - m_aDragSourceWindow( None ), - m_nLastDragX( 0 ), - m_nLastDragY( 0 ), - m_nNoPosX( 0 ), - m_nNoPosY( 0 ), - m_nNoPosWidth( 0 ), - m_nNoPosHeight( 0 ), - m_nDragButton( 0 ), - m_nUserDragAction( 0 ), - m_nTargetAcceptAction( 0 ), - m_nSourceActions( 0 ), - m_bLastDropAccepted( false ), - m_bDropSuccess( false ), - m_bDropSent( false ), - m_bWaitingForPrimaryConversion( false ), - m_nDragTimestamp( None ), - m_aMoveCursor( None ), - m_aCopyCursor( None ), - m_aLinkCursor( None ), - m_aNoneCursor( None ), - m_aCurrentCursor( None ), - m_nCurrentProtocolVersion( nXdndProtocolRevision ), - m_nCLIPBOARDAtom( None ), - m_nTARGETSAtom( None ), - m_nTIMESTAMPAtom( None ), - m_nTEXTAtom( None ), - m_nINCRAtom( None ), - m_nCOMPOUNDAtom( None ), - m_nMULTIPLEAtom( None ), - m_nUTF16Atom( None ), - m_nImageBmpAtom( None ), - m_nXdndAware( None ), - m_nXdndEnter( None ), - m_nXdndLeave( None ), - m_nXdndPosition( None ), - m_nXdndStatus( None ), - m_nXdndDrop( None ), - m_nXdndFinished( None ), - m_nXdndSelection( None ), - m_nXdndTypeList( None ), - m_nXdndProxy( None ), - m_nXdndActionCopy( None ), - m_nXdndActionMove( None ), - m_nXdndActionLink( None ), - m_nXdndActionAsk( None ), - m_nXdndActionPrivate( None ) -{ - m_aDropEnterEvent.data.l[0] = None; - m_aDragRunning.reset(); -} - -XLIB_Cursor SelectionManager::createCursor( const char* pPointerData, const char* pMaskData, int width, int height, int hotX, int hotY ) -{ - Pixmap aPointer; - Pixmap aMask; - XColor aBlack, aWhite; - - aBlack.pixel = BlackPixel( m_pDisplay, 0 ); - aBlack.red = aBlack.green = aBlack.blue = 0; - aBlack.flags = DoRed | DoGreen | DoBlue; - - aWhite.pixel = WhitePixel( m_pDisplay, 0 ); - aWhite.red = aWhite.green = aWhite.blue = 0xffff; - aWhite.flags = DoRed | DoGreen | DoBlue; - - aPointer = - XCreateBitmapFromData( m_pDisplay, - m_aWindow, - pPointerData, - width, - height ); - aMask - = XCreateBitmapFromData( m_pDisplay, - m_aWindow, - pMaskData, - width, - height ); - XLIB_Cursor aCursor = - XCreatePixmapCursor( m_pDisplay, aPointer, aMask, - &aBlack, &aWhite, - hotX, - hotY ); - XFreePixmap( m_pDisplay, aPointer ); - XFreePixmap( m_pDisplay, aMask ); - - return aCursor; -} - -void SelectionManager::initialize( const Sequence< Any >& arguments ) throw (::com::sun::star::uno::Exception) -{ - MutexGuard aGuard(m_aMutex); - - if( ! m_xDisplayConnection.is() ) - { - /* - * first argument must be a ::com::sun::star::awt::XDisplayConnection - * from this we will get the XEvents of the vcl event loop by - * registering us as XEventHandler on it. - * - * implementor's note: - * FIXME: - * finally the clipboard and XDND service is back in the module it belongs - * now cleanup and sharing of resources with the normal vcl event loop - * needs to be added. The display used whould be that of the normal event loop - * and synchronization should be done via the SolarMutex. - */ - if( arguments.getLength() > 0 ) - arguments.getConstArray()[0] >>= m_xDisplayConnection; - if( ! m_xDisplayConnection.is() ) - { -#if 0 - // for the time being try to live without XDisplayConnection - // for the sake of clipboard service - // clipboard service should be initialized with a XDisplayConnection - // in the future - Exception aExc; - aExc.Message = OUString::createFromAscii( "initialize me with a valid XDisplayConnection" ); - aExc.Context = static_cast< OWeakObject* >(this); - throw aExc; -#endif - } - else - m_xDisplayConnection->addEventHandler( Any(), this, ~0 ); - } - - if( !m_xBitmapConverter.is() ) - { - if( arguments.getLength() > 2 ) - arguments.getConstArray()[2] >>= m_xBitmapConverter; - } - - OUString aParam; - if( ! m_pDisplay ) - { - OUString aUDisplay; - if( m_xDisplayConnection.is() ) - { - Any aIdentifier; - aIdentifier = m_xDisplayConnection->getIdentifier(); - aIdentifier >>= aUDisplay; - } - - OString aDisplayName( OUStringToOString( aUDisplay, RTL_TEXTENCODING_ISO_8859_1 ) ); - - m_pDisplay = XOpenDisplay( aDisplayName.getLength() ? aDisplayName.getStr() : NULL ); - - if( m_pDisplay ) - { -#ifdef SYNCHRONIZE - XSynchronize( m_pDisplay, True ); -#endif - // clipboard selection - m_nCLIPBOARDAtom = getAtom( OUString::createFromAscii( "CLIPBOARD" ) ); - - // special targets - m_nTARGETSAtom = getAtom( OUString::createFromAscii( "TARGETS" ) ); - m_nTIMESTAMPAtom = getAtom( OUString::createFromAscii( "TIMESTAMP" ) ); - m_nTEXTAtom = getAtom( OUString::createFromAscii( "TEXT" ) ); - m_nINCRAtom = getAtom( OUString::createFromAscii( "INCR" ) ); - m_nCOMPOUNDAtom = getAtom( OUString::createFromAscii( "COMPOUND_TEXT" ) ); - m_nMULTIPLEAtom = getAtom( OUString::createFromAscii( "MULTIPLE" ) ); - m_nUTF16Atom = getAtom( OUString::createFromAscii( "ISO10646-1" ) ); -// m_nUTF16Atom = getAtom( OUString::createFromAscii( "text/plain;charset=ISO-10646-UCS-2" ) ); - m_nImageBmpAtom = getAtom( OUString::createFromAscii( "image/bmp" ) ); - - // Atoms for Xdnd protocol - m_nXdndAware = getAtom( OUString::createFromAscii( "XdndAware" ) ); - m_nXdndEnter = getAtom( OUString::createFromAscii( "XdndEnter" ) ); - m_nXdndLeave = getAtom( OUString::createFromAscii( "XdndLeave" ) ); - m_nXdndPosition = getAtom( OUString::createFromAscii( "XdndPosition" ) ); - m_nXdndStatus = getAtom( OUString::createFromAscii( "XdndStatus" ) ); - m_nXdndDrop = getAtom( OUString::createFromAscii( "XdndDrop" ) ); - m_nXdndFinished = getAtom( OUString::createFromAscii( "XdndFinished" ) ); - m_nXdndSelection = getAtom( OUString::createFromAscii( "XdndSelection" ) ); - m_nXdndTypeList = getAtom( OUString::createFromAscii( "XdndTypeList" ) ); - m_nXdndProxy = getAtom( OUString::createFromAscii( "XdndProxy" ) ); - m_nXdndActionCopy = getAtom( OUString::createFromAscii( "XdndActionCopy" ) ); - m_nXdndActionMove = getAtom( OUString::createFromAscii( "XdndActionMove" ) ); - m_nXdndActionLink = getAtom( OUString::createFromAscii( "XdndActionLink" ) ); - m_nXdndActionAsk = getAtom( OUString::createFromAscii( "XdndActionAsk" ) ); - m_nXdndActionPrivate= getAtom( OUString::createFromAscii( "XdndActionPrivate" ) ); - - // initialize map with member none - m_aAtomToString[ 0 ]= OUString::createFromAscii( "None" ); - m_aAtomToString[ XA_PRIMARY ] = OUString::createFromAscii( "PRIMARY" ); - - // create a (invisible) message window - m_aWindow = XCreateSimpleWindow( m_pDisplay, DefaultRootWindow( m_pDisplay ), - 10, 10, 10, 10, 0, 0, 1 ); - - // initialize threshold for incremetal transfers - // ICCCM says it should be smaller that the max request size - // which in turn is guaranteed to be at least 16k bytes - m_nIncrementalThreshold = XMaxRequestSize( m_pDisplay ) - 1024; - - if( m_aWindow ) - { - // initialize default cursors - m_aMoveCursor = createCursor( movedata_curs_bits, - movedata_mask_bits, - movedata_curs_width, - movedata_curs_height, - movedata_curs_x_hot, - movedata_curs_y_hot ); - m_aCopyCursor = createCursor( copydata_curs_bits, - copydata_mask_bits, - copydata_curs_width, - copydata_curs_height, - copydata_curs_x_hot, - copydata_curs_y_hot ); - m_aLinkCursor = createCursor( linkdata_curs_bits, - linkdata_mask_bits, - linkdata_curs_width, - linkdata_curs_height, - linkdata_curs_x_hot, - linkdata_curs_y_hot ); - m_aNoneCursor = createCursor( nodrop_curs_bits, - nodrop_mask_bits, - nodrop_curs_width, - nodrop_curs_height, - nodrop_curs_x_hot, - nodrop_curs_y_hot ); - - - - - // just interested in SelectionClear/Notify/Request and PropertyChange - XSelectInput( m_pDisplay, m_aWindow, PropertyChangeMask ); - // create the transferable for Drag operations - m_xDropTransferable = new X11Transferable( *this, static_cast< OWeakObject* >(this), m_nXdndSelection ); - registerHandler( m_nXdndSelection, *this ); - - m_aThread = osl_createSuspendedThread( call_SelectionManager_run, this ); - if( m_aThread ) - osl_resumeThread( m_aThread ); -#if OSL_DEBUG_LEVEL > 1 - else - fprintf( stderr, "SelectionManager::initialize: creation of dispatch thread failed !\n" ); -#endif - } - } - } -} - -// ------------------------------------------------------------------------ - -SelectionManager::~SelectionManager() -{ -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "SelectionManager::~SelectionManager (%s)\n", m_pDisplay ? DisplayString(m_pDisplay) : "no display" ); -#endif - { - MutexGuard aGuard( *Mutex::getGlobalMutex() ); - - ::std::hash_map< OUString, SelectionManager*, OUStringHash >::iterator it; - for( it = getInstances().begin(); it != getInstances().end(); ++it ) - if( it->second == this ) - { - getInstances().erase( it ); - break; - } - } - - if( m_aThread ) - { - osl_terminateThread( m_aThread ); - osl_joinWithThread( m_aThread ); - osl_destroyThread( m_aThread ); - } - - if( m_aDragExecuteThread ) - { - osl_terminateThread( m_aDragExecuteThread ); - osl_joinWithThread( m_aDragExecuteThread ); - m_aDragExecuteThread = NULL; - // thread handle is freed in dragDoDispatch() - } - - MutexGuard aGuard(m_aMutex); - -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "shutting down SelectionManager\n" ); -#endif - - if( m_xDisplayConnection.is() ) - { - m_xDisplayConnection->removeEventHandler( Any(), this ); - m_xDisplayConnection.clear(); - } - - if( m_pDisplay ) - { - deregisterHandler( m_nXdndSelection ); - // destroy message window - if( m_aWindow ) - XDestroyWindow( m_pDisplay, m_aWindow ); - // release cursors - if (m_aMoveCursor != None) - XFreeCursor(m_pDisplay, m_aMoveCursor); - if (m_aCopyCursor != None) - XFreeCursor(m_pDisplay, m_aCopyCursor); - if (m_aLinkCursor != None) - XFreeCursor(m_pDisplay, m_aLinkCursor); - if (m_aNoneCursor != None) - XFreeCursor(m_pDisplay, m_aNoneCursor); - - // paranoia setting, the drag thread should have - // done that already - XUngrabPointer( m_pDisplay, CurrentTime ); - XUngrabKeyboard( m_pDisplay, CurrentTime ); - - XCloseDisplay( m_pDisplay ); - } -} - -// ------------------------------------------------------------------------ - -SelectionAdaptor* SelectionManager::getAdaptor( Atom selection ) -{ - ::std::hash_map< Atom, Selection* >::iterator it = - m_aSelections.find( selection ); - return it != m_aSelections.end() ? it->second->m_pAdaptor : NULL; -} - -// ------------------------------------------------------------------------ - -OUString SelectionManager::convertFromCompound( const char* pText, int nLen ) -{ - MutexGuard aGuard( m_aMutex ); - OUString aRet; - if( nLen < 0 ) - nLen = strlen( pText ); - - char** pTextList = NULL; - int nTexts = 0; - - XTextProperty aProp; - aProp.value = (unsigned char*)pText; - aProp.encoding = m_nCOMPOUNDAtom; - aProp.format = 8; - aProp.nitems = nLen; - XmbTextPropertyToTextList( m_pDisplay, - &aProp, - &pTextList, - &nTexts ); - rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - for( int i = 0; i < nTexts; i++ ) - aRet += OStringToOUString( pTextList[i], aEncoding ); - - if( pTextList ) - XFreeStringList( pTextList ); - - return aRet; -} - -// ------------------------------------------------------------------------ - -OString SelectionManager::convertToCompound( const OUString& rText ) -{ - MutexGuard aGuard( m_aMutex ); - XTextProperty aProp; - aProp.value = NULL; - aProp.encoding = XA_STRING; - aProp.format = 8; - aProp.nitems = 0; - - OString aRet( rText.getStr(), rText.getLength(), osl_getThreadTextEncoding() ); - char* pT = const_cast(aRet.getStr()); - - XmbTextListToTextProperty( m_pDisplay, - &pT, - 1, - XCompoundTextStyle, - &aProp ); - if( aProp.value ) - { - aRet = (char*)aProp.value; - XFree( aProp.value ); -#ifdef SOLARIS - /* #97070# - * for currently unknown reasons XmbTextListToTextProperty on Solaris returns - * no data in ISO8859-n encodings (at least for n = 1, 15) - * in these encodings the directly converted text does the - * trick, also. - */ - if( ! aRet.getLength() && rText.getLength() ) - aRet = OUStringToOString( rText, osl_getThreadTextEncoding() ); -#endif - } - else - aRet = OString(); - - return aRet; -} - -// ------------------------------------------------------------------------ - -bool SelectionManager::convertData( - const Reference< XTransferable >& xTransferable, - Atom nType, - Atom nSelection, - int& rFormat, - Sequence< sal_Int8 >& rData ) -{ - bool bSuccess = false; - - if( ! xTransferable.is() ) - return bSuccess; - - try - { - - DataFlavor aFlavor; - aFlavor.MimeType = convertTypeFromNative( nType, nSelection, rFormat ); - - sal_Int32 nIndex = 0; - if( aFlavor.MimeType.getToken( 0, ';', nIndex ).compareToAscii( "text/plain" ) == 0 ) - { - if( aFlavor.MimeType.getToken( 0, ';', nIndex ).compareToAscii( "charset=utf-16" ) == 0 ) - aFlavor.DataType = getCppuType( (OUString *) 0 ); - else - aFlavor.DataType = getCppuType( (Sequence< sal_Int8 >*)0 ); - } - else - aFlavor.DataType = getCppuType( (Sequence< sal_Int8 >*)0 ); - - if( xTransferable->isDataFlavorSupported( aFlavor ) ) - { - Any aValue( xTransferable->getTransferData( aFlavor ) ); - if( aValue.getValueTypeClass() == TypeClass_STRING ) - { - OUString aString; - aValue >>= aString; - rData = Sequence< sal_Int8 >( (sal_Int8*)aString.getStr(), aString.getLength() * sizeof( sal_Unicode ) ); - bSuccess = true; - } - else if( aValue.getValueType() == getCppuType( (Sequence< sal_Int8 >*)0 ) ) - { - aValue >>= rData; - bSuccess = true; - } - } - else if( aFlavor.MimeType.compareToAscii( "text/plain", 10 ) == 0 ) - { - rtl_TextEncoding aEncoding = RTL_TEXTENCODING_DONTKNOW; - bool bCompoundText = false; - if( nType == m_nCOMPOUNDAtom ) - bCompoundText = true; - else - aEncoding = getTextPlainEncoding( aFlavor.MimeType ); - if( aEncoding != RTL_TEXTENCODING_DONTKNOW || bCompoundText ) - { - aFlavor.MimeType = OUString::createFromAscii( "text/plain;charset=utf-16" ); - aFlavor.DataType = getCppuType( (OUString *) 0 ); - if( xTransferable->isDataFlavorSupported( aFlavor ) ) - { - Any aValue( xTransferable->getTransferData( aFlavor ) ); - OUString aString; - aValue >>= aString; - OString aByteString( bCompoundText ? convertToCompound( aString ) : OUStringToOString( aString, aEncoding ) ); - rData = Sequence< sal_Int8 >( (sal_Int8*)aByteString.getStr(), aByteString.getLength() * sizeof( sal_Char ) ); - bSuccess = true; - } - } - } - } - // various exceptions possible ... which all lead to a failed conversion - // so simplify here to a catch all - catch(...) - { - } - - return bSuccess; -} - -// ------------------------------------------------------------------------ - -SelectionManager& SelectionManager::get( const OUString& rDisplayName ) -{ - MutexGuard aGuard( *Mutex::getGlobalMutex() ); - - OUString aDisplayName( rDisplayName ); - if( ! aDisplayName.getLength() ) - aDisplayName = OStringToOUString( getenv( "DISPLAY" ), RTL_TEXTENCODING_ISO_8859_1 ); - SelectionManager* pInstance = NULL; - - ::std::hash_map< OUString, SelectionManager*, OUStringHash >::iterator it = getInstances().find( aDisplayName ); - if( it != getInstances().end() ) - pInstance = it->second; - else pInstance = getInstances()[ aDisplayName ] = new SelectionManager(); - - return *pInstance; -} - -// ------------------------------------------------------------------------ - -const OUString& SelectionManager::getString( Atom aAtom ) -{ - MutexGuard aGuard(m_aMutex); - - ::std::hash_map< Atom, OUString >::const_iterator it; - if( ( it = m_aAtomToString.find( aAtom ) ) == m_aAtomToString.end() ) - { - static OUString aEmpty; - char* pAtom = m_pDisplay ? XGetAtomName( m_pDisplay, aAtom ) : NULL; - if( ! pAtom ) - return aEmpty; - OUString aString( OStringToOUString( pAtom, RTL_TEXTENCODING_ISO_8859_1 ) ); - XFree( pAtom ); - m_aStringToAtom[ aString ] = aAtom; - m_aAtomToString[ aAtom ] = aString; - } - return m_aAtomToString[ aAtom ]; -} - -// ------------------------------------------------------------------------ - -Atom SelectionManager::getAtom( const OUString& rString ) -{ - MutexGuard aGuard(m_aMutex); - - ::std::hash_map< OUString, Atom, OUStringHash >::const_iterator it; - if( ( it = m_aStringToAtom.find( rString ) ) == m_aStringToAtom.end() ) - { - static Atom nNoDisplayAtoms = 1; - Atom aAtom = m_pDisplay ? XInternAtom( m_pDisplay, OUStringToOString( rString, RTL_TEXTENCODING_ISO_8859_1 ), False ) : nNoDisplayAtoms++; - m_aStringToAtom[ rString ] = aAtom; - m_aAtomToString[ aAtom ] = rString; - } - return m_aStringToAtom[ rString ]; -} - -// ------------------------------------------------------------------------ - -bool SelectionManager::requestOwnership( Atom selection ) -{ - bool bSuccess = false; - if( m_pDisplay && m_aWindow ) - { - MutexGuard aGuard(m_aMutex); - - SelectionAdaptor* pAdaptor = getAdaptor( selection ); - if( pAdaptor ) - { - XSetSelectionOwner( m_pDisplay, selection, m_aWindow, CurrentTime ); - if( XGetSelectionOwner( m_pDisplay, selection ) == m_aWindow ) - bSuccess = true; -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "%s ownership for selection %s\n", - bSuccess ? "acquired" : "failed to acquire", - OUStringToOString( getString( selection ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); -#endif - Selection* pSel = m_aSelections[ selection ]; - pSel->m_bOwner = bSuccess; - delete pSel->m_pPixmap; - pSel->m_pPixmap = NULL; - pSel->m_nOrigTimestamp = m_nSelectionTimestamp; - } -#if OSL_DEBUG_LEVEL > 1 - else - fprintf( stderr, "no adaptor for selection %s\n", - OUStringToOString( getString( selection ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); - - if( pAdaptor->getTransferable().is() ) - { - Sequence< DataFlavor > aTypes = pAdaptor->getTransferable()->getTransferDataFlavors(); - for( int i = 0; i < aTypes.getLength(); i++ ) - { - fprintf( stderr, " %s\n", OUStringToOString( aTypes.getConstArray()[i].MimeType, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); - } - } -#endif - } - return bSuccess; -} - -// ------------------------------------------------------------------------ - -void SelectionManager::convertTypeToNative( const OUString& rType, Atom selection, int& rFormat, ::std::list< Atom >& rConversions, bool bPushFront ) -{ - NativeTypeEntry* pTab = selection == m_nXdndSelection ? aXdndConversionTab : aNativeConversionTab; - int nTabEntries = selection == m_nXdndSelection - ? sizeof(aXdndConversionTab)/sizeof(aXdndConversionTab[0]) : - sizeof(aNativeConversionTab)/sizeof(aNativeConversionTab[0]); - - OString aType( OUStringToOString( rType, RTL_TEXTENCODING_ISO_8859_1 ) ); - rFormat = 0; - for( int i = 0; i < nTabEntries; i++ ) - { - if( aType.equalsIgnoreAsciiCase( pTab[i].pType ) ) - { - if( ! pTab[i].nAtom ) - pTab[i].nAtom = getAtom( OStringToOUString( pTab[i].pNativeType, RTL_TEXTENCODING_ISO_8859_1 ) ); - rFormat = pTab[i].nFormat; - if( bPushFront ) - rConversions.push_front( pTab[i].nAtom ); - else - rConversions.push_back( pTab[i].nAtom ); - if( pTab[i].nFormat == XA_PIXMAP ) - { - if( bPushFront ) - { - rConversions.push_front( XA_VISUALID ); - rConversions.push_front( XA_COLORMAP ); - } - else - { - rConversions.push_back( XA_VISUALID ); - rConversions.push_back( XA_COLORMAP ); - } - } - } - } - if( ! rFormat ) - rFormat = 8; // byte buffer - if( bPushFront ) - rConversions.push_front( getAtom( rType ) ); - else - rConversions.push_back( getAtom( rType ) ); -}; - -// ------------------------------------------------------------------------ - -void SelectionManager::getNativeTypeList( const Sequence< DataFlavor >& rTypes, std::list< Atom >& rOutTypeList, Atom targetselection ) -{ - rOutTypeList.clear(); - - int nFormat; - int nFlavors = rTypes.getLength(); - const DataFlavor* pFlavors = rTypes.getConstArray(); - bool bHaveText = false; - for( int i = 0; i < nFlavors; i++ ) - { - if( pFlavors[i].MimeType.compareToAscii( "text/plain", 10 ) == 0) - bHaveText = true; - else - convertTypeToNative( pFlavors[i].MimeType, targetselection, nFormat, rOutTypeList ); - } - if( bHaveText ) - { - if( targetselection != m_nXdndSelection ) - { - // only mimetypes should go into Xdnd type list - rOutTypeList.push_front( XA_STRING ); - rOutTypeList.push_front( m_nCOMPOUNDAtom ); - } - convertTypeToNative( OUString::createFromAscii( "text/plain;charset=utf-8" ), targetselection, nFormat, rOutTypeList, true ); - } - if( targetselection != m_nXdndSelection ) - rOutTypeList.push_back( m_nMULTIPLEAtom ); -} - -// ------------------------------------------------------------------------ - -OUString SelectionManager::convertTypeFromNative( Atom nType, Atom selection, int& rFormat ) -{ - NativeTypeEntry* pTab = selection == m_nXdndSelection ? aXdndConversionTab : aNativeConversionTab; - int nTabEntries = selection == m_nXdndSelection - ? sizeof(aXdndConversionTab)/sizeof(aXdndConversionTab[0]) : - sizeof(aNativeConversionTab)/sizeof(aNativeConversionTab[0]); - - for( int i = 0; i < nTabEntries; i++ ) - { - if( ! pTab[i].nAtom ) - pTab[i].nAtom = getAtom( OStringToOUString( pTab[i].pNativeType, RTL_TEXTENCODING_ISO_8859_1 ) ); - if( nType == pTab[i].nAtom ) - { - rFormat = pTab[i].nFormat; - return OStringToOUString( pTab[i].pType, RTL_TEXTENCODING_ISO_8859_1 ); - } - } - rFormat = 8; - return getString( nType ); -} - -// ------------------------------------------------------------------------ - -bool SelectionManager::getPasteData( Atom selection, Atom type, Sequence< sal_Int8 >& rData ) -{ - ResettableMutexGuard aGuard(m_aMutex); - ::std::hash_map< Atom, Selection* >::iterator it; - bool bSuccess = false; - -#if OSL_DEBUG_LEVEL > 1 - OUString aSelection( getString( selection ) ); - OUString aType( getString( type ) ); - fprintf( stderr, "getPasteData( %s, native: %s )\n", - OUStringToOString( aSelection, RTL_TEXTENCODING_ISO_8859_1 ).getStr(), - OUStringToOString( aType, RTL_TEXTENCODING_ISO_8859_1 ).getStr() - ); -#endif - - if( ! m_pDisplay ) - return false; - - it = m_aSelections.find( selection ); - if( it == m_aSelections.end() ) - return false; - - XLIB_Window aSelectionOwner = XGetSelectionOwner( m_pDisplay, selection ); - if( aSelectionOwner == None ) - return false; - if( aSelectionOwner == m_aWindow ) - { - // probably bad timing led us here -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "Innere Nabelschau\n" ); -#endif - return false; - } - - // ICCCM recommends to destroy property before convert request unless - // parameters are transported; we do only in case of MULTIPLE, - // so destroy property unless target is MULTIPLE - if( type != m_nMULTIPLEAtom ) - XDeleteProperty( m_pDisplay, m_aWindow, selection ); - - XConvertSelection( m_pDisplay, selection, type, selection, m_aWindow, selection == m_nXdndSelection ? m_nDropTime : CurrentTime ); - it->second->m_eState = Selection::WaitingForResponse; - it->second->m_aRequestedType = type; - it->second->m_aData = Sequence< sal_Int8 >(); - it->second->m_aDataArrived.reset(); - // really start the request; if we don't flush the - // queue the request won't leave it because there are no more - // X calls after this until the data arrived or timeout - XFlush( m_pDisplay ); - - // do a reschedule - struct timeval tv_last, tv_current; - gettimeofday( &tv_last, NULL ); - tv_current = tv_last; - - XEvent aEvent; - do - { - bool bAdjustTime = false; - { - bool bHandle = false; - - if( XCheckTypedEvent( m_pDisplay, - PropertyNotify, - &aEvent - ) ) - { - bHandle = true; - if( aEvent.xproperty.window == m_aWindow - && aEvent.xproperty.atom == selection ) - bAdjustTime = true; - } - else - if( XCheckTypedEvent( m_pDisplay, - SelectionClear, - &aEvent - ) ) - { - bHandle = true; - } - else - if( XCheckTypedEvent( m_pDisplay, - SelectionRequest, - &aEvent - ) ) - bHandle = true; - else - if( XCheckTypedEvent( m_pDisplay, - SelectionNotify, - &aEvent - ) ) - { - bHandle = true; - if( aEvent.xselection.selection == selection - && ( aEvent.xselection.requestor == m_aWindow || - aEvent.xselection.requestor == m_aCurrentDropWindow ) - ) - bAdjustTime = true; - } - else - { - TimeValue aTVal; - aTVal.Seconds = 0; - aTVal.Nanosec = 100000000; - aGuard.clear(); - osl_waitThread( &aTVal ); - aGuard.reset(); - } - if( bHandle ) - { - aGuard.clear(); - handleXEvent( aEvent ); - aGuard.reset(); - } - } - gettimeofday( &tv_current, NULL ); - if( bAdjustTime ) - tv_last = tv_current; - } while( ! it->second->m_aDataArrived.check() && (tv_current.tv_sec - tv_last.tv_sec) < getSelectionTimeout() ); - -#if OSL_DEBUG_LEVEL > 1 - if( (tv_current.tv_sec - tv_last.tv_sec) > getSelectionTimeout() ) - fprintf( stderr, "timed out\n" ); -#endif - if( it->second->m_aDataArrived.check() && - it->second->m_aData.getLength() ) - { - rData = it->second->m_aData; - bSuccess = true; - } -#if OSL_DEBUG_LEVEL > 1 - else - fprintf( stderr, "conversion unsuccessfull\n" ); -#endif - return bSuccess; -} - -// ------------------------------------------------------------------------ - -bool SelectionManager::getPasteData( Atom selection, const ::rtl::OUString& rType, Sequence< sal_Int8 >& rData ) -{ - int nFormat; - bool bSuccess = false; - - ::std::hash_map< Atom, Selection* >::iterator it; - { - MutexGuard aGuard(m_aMutex); - - it = m_aSelections.find( selection ); - if( it == m_aSelections.end() ) - return false; - } - - if( it->second->m_aTypes.getLength() == 0 ) - { - Sequence< DataFlavor > aFlavors; - getPasteDataTypes( selection, aFlavors ); - if( it->second->m_aTypes.getLength() == 0 ) - return false; - } - - const Sequence< DataFlavor >& rTypes( it->second->m_aTypes ); - const std::vector< Atom >& rNativeTypes( it->second->m_aNativeTypes ); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "getPasteData( \"%s\", \"%s\" )\n", - OUStringToOString( getString( selection ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), - OUStringToOString( rType, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); -#endif - - if( rType.equalsAsciiL( "text/plain;charset=utf-16", 25 ) ) - { - // lets see if we have UTF16 else try to find something convertible - if( it->second->m_aTypes.getLength() && ! it->second->m_bHaveUTF16 ) - { - Sequence< sal_Int8 > aData; - if( it->second->m_aUTF8Type != None && - getPasteData( selection, - it->second->m_aUTF8Type, - aData ) - ) - { - OUString aRet( (const sal_Char*)aData.getConstArray(), aData.getLength(), RTL_TEXTENCODING_UTF8 ); - rData = Sequence< sal_Int8 >( (sal_Int8*)aRet.getStr(), (aRet.getLength()+1)*sizeof( sal_Unicode ) ); - bSuccess = true; - } - else if( it->second->m_bHaveCompound && - getPasteData( selection, - m_nCOMPOUNDAtom, - aData ) - ) - { - OUString aRet( convertFromCompound( (const char*)aData.getConstArray(), aData.getLength() ) ); - rData = Sequence< sal_Int8 >( (sal_Int8*)aRet.getStr(), (aRet.getLength()+1)*sizeof( sal_Unicode ) ); - bSuccess = true; - } - else - { - for( int i = 0; i < rTypes.getLength(); i++ ) - { - rtl_TextEncoding aEncoding = getTextPlainEncoding( rTypes.getConstArray()[i].MimeType ); - if( aEncoding != RTL_TEXTENCODING_DONTKNOW && - aEncoding != RTL_TEXTENCODING_UNICODE && - getPasteData( selection, - rNativeTypes[i], - aData ) - ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "using \"%s\" instead of \"%s\"\n", - OUStringToOString( rTypes.getConstArray()[i].MimeType, RTL_TEXTENCODING_ISO_8859_1 ).getStr(), - OUStringToOString( rType, RTL_TEXTENCODING_ISO_8859_1 ).getStr() - ); -#endif - OString aConvert( (sal_Char*)aData.getConstArray(), aData.getLength() ); - OUString aUTF( OStringToOUString( aConvert, aEncoding ) ); - rData = Sequence< sal_Int8 >( (sal_Int8*)aUTF.getStr(), (aUTF.getLength()+1)*sizeof( sal_Unicode ) ); - bSuccess = true; - break; - } - } - } - } - } - else if( rType.equalsAsciiL( "image/bmp", 9 ) ) - { - // #i83376# try if someone has the data in image/bmp already before - // doing the PIXMAP stuff (e.g. the gimp has this) - bSuccess = getPasteData( selection, m_nImageBmpAtom, rData ); - #if OSL_DEBUG_LEVEL > 1 - if( bSuccess ) - fprintf( stderr, "got %d bytes of image/bmp\n", (int)rData.getLength() ); - #endif - if( ! bSuccess ) - { - Pixmap aPixmap = None; - Colormap aColormap = None; - - // prepare property for MULTIPLE request - Sequence< sal_Int8 > aData; - Atom pTypes[4] = { XA_PIXMAP, XA_PIXMAP, - XA_COLORMAP, XA_COLORMAP }; - { - MutexGuard aGuard(m_aMutex); - - XChangeProperty( m_pDisplay, - m_aWindow, - selection, - XA_ATOM, - 32, - PropModeReplace, - (unsigned char*)pTypes, - 4 ); - } - - // try MULTIPLE request - if( getPasteData( selection, m_nMULTIPLEAtom, aData ) ) - { - Atom* pReturnedTypes = (Atom*)aData.getArray(); - if( pReturnedTypes[0] == XA_PIXMAP && pReturnedTypes[1] == XA_PIXMAP ) - { - MutexGuard aGuard(m_aMutex); - - Atom type = None; - int format = 0; - unsigned long nItems = 0; - unsigned long nBytes = 0; - unsigned char* pReturn = NULL; - XGetWindowProperty( m_pDisplay, m_aWindow, XA_PIXMAP, 0, 1, True, XA_PIXMAP, &type, &format, &nItems, &nBytes, &pReturn ); - if( pReturn ) - { - if( type == XA_PIXMAP ) - aPixmap = *(Pixmap*)pReturn; - XFree( pReturn ); - pReturn = NULL; - if( pReturnedTypes[2] == XA_COLORMAP && pReturnedTypes[3] == XA_COLORMAP ) - { - XGetWindowProperty( m_pDisplay, m_aWindow, XA_COLORMAP, 0, 1, True, XA_COLORMAP, &type, &format, &nItems, &nBytes, &pReturn ); - if( pReturn ) - { - if( type == XA_COLORMAP ) - aColormap = *(Colormap*)pReturn; - XFree( pReturn ); - } - } - } - #if OSL_DEBUG_LEVEL > 1 - else - { - fprintf( stderr, "could not get PIXMAP property: type=%s, format=%d, items=%ld, bytes=%ld, ret=0x%p\n", OUStringToOString( getString( type ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), format, nItems, nBytes, pReturn ); - } - #endif - } - } - - if( aPixmap == None ) - { - // perhaps two normal requests will work - if( getPasteData( selection, XA_PIXMAP, aData ) ) - { - aPixmap = *(Pixmap*)aData.getArray(); - if( aColormap == None && getPasteData( selection, XA_COLORMAP, aData ) ) - aColormap = *(Colormap*)aData.getArray(); - } - } - - // convert data if possible - if( aPixmap != None ) - { - MutexGuard aGuard(m_aMutex); - - sal_Int32 nOutSize = 0; - sal_uInt8* pBytes = X11_getBmpFromPixmap( m_pDisplay, aPixmap, aColormap, nOutSize ); - if( pBytes && nOutSize ) - { - rData = Sequence< sal_Int8 >( nOutSize ); - memcpy( rData.getArray(), pBytes, nOutSize ); - X11_freeBmp( pBytes ); - bSuccess = true; - } - } - } - } - - if( ! bSuccess ) - { - ::std::list< Atom > aTypes; - convertTypeToNative( rType, selection, nFormat, aTypes ); - ::std::list< Atom >::const_iterator type_it; - Atom nSelectedType = None; - for( type_it = aTypes.begin(); type_it != aTypes.end() && nSelectedType == None; ++type_it ) - { - for( unsigned int i = 0; i < rNativeTypes.size() && nSelectedType == None; i++ ) - if( rNativeTypes[i] == *type_it ) - nSelectedType = *type_it; - } - if( nSelectedType != None ) - bSuccess = getPasteData( selection, nSelectedType, rData ); - } -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "getPasteData for selection %s and data type %s returns %s, returned sequence has length %ld\n", - OUStringToOString( getString( selection ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), - OUStringToOString( rType, RTL_TEXTENCODING_ISO_8859_1 ).getStr(), - bSuccess ? "true" : "false", - rData.getLength() - ); -#endif - return bSuccess; -} - -// ------------------------------------------------------------------------ - -bool SelectionManager::getPasteDataTypes( Atom selection, Sequence< DataFlavor >& rTypes ) -{ - ::std::hash_map< Atom, Selection* >::iterator it; - { - MutexGuard aGuard(m_aMutex); - - it = m_aSelections.find( selection ); - if( it != m_aSelections.end() && - it->second->m_aTypes.getLength() && - abs( it->second->m_nLastTimestamp - time( NULL ) ) < 2 - ) - { - rTypes = it->second->m_aTypes; - return true; - } - } - - bool bSuccess = false; - bool bHaveUTF16 = false; - Atom aUTF8Type = None; - bool bHaveCompound = false; - bool bHaveText = false; - Sequence< sal_Int8 > aAtoms; - - if( selection == m_nXdndSelection ) - { - // xdnd sends first three types with XdndEnter - // if more than three types are supported then the XDndTypeList - // property on the source window is used - if( m_aDropEnterEvent.data.l[0] && m_aCurrentDropWindow ) - { - if( m_aDropEnterEvent.data.l[1] & 1 ) - { - const unsigned int atomcount = 256; - // more than three types; look in property - MutexGuard aGuard(m_aMutex); - - Atom nType; - int nFormat; - unsigned long nItems, nBytes; - unsigned char* pBytes = NULL; - - XGetWindowProperty( m_pDisplay, m_aDropEnterEvent.data.l[0], - m_nXdndTypeList, 0, atomcount, False, - XA_ATOM, - &nType, &nFormat, &nItems, &nBytes, &pBytes ); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "have %ld data types in XdndTypeList\n", nItems ); -#endif - if( nItems == atomcount && nBytes > 0 ) - { - // wow ... more than 256 types ! - aAtoms.realloc( sizeof( Atom )*atomcount+nBytes ); - memcpy( aAtoms.getArray(), pBytes, sizeof( Atom )*atomcount ); - XFree( pBytes ); - pBytes = NULL; - XGetWindowProperty( m_pDisplay, m_aDropEnterEvent.data.l[0], - m_nXdndTypeList, atomcount, nBytes/sizeof(Atom), - False, XA_ATOM, - &nType, &nFormat, &nItems, &nBytes, &pBytes ); - { - memcpy( aAtoms.getArray()+atomcount*sizeof(Atom), pBytes, nItems*sizeof(Atom) ); - XFree( pBytes ); - } - } - else - { - aAtoms.realloc( sizeof(Atom)*nItems ); - memcpy( aAtoms.getArray(), pBytes, nItems*sizeof(Atom) ); - XFree( pBytes ); - } - } - else - { - // one to three types - int n = 0, i; - for( i = 0; i < 3; i++ ) - if( m_aDropEnterEvent.data.l[2+i] ) - n++; -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "have %d data types in XdndEnter\n", n ); -#endif - aAtoms.realloc( sizeof(Atom)*n ); - for( i = 0, n = 0; i < 3; i++ ) - if( m_aDropEnterEvent.data.l[2+i] ) - ((Atom*)aAtoms.getArray())[n++] = m_aDropEnterEvent.data.l[2+i]; - } - } - } - // get data of type TARGETS - else if( ! getPasteData( selection, m_nTARGETSAtom, aAtoms ) ) - aAtoms = Sequence< sal_Int8 >(); - - std::vector< Atom > aNativeTypes; - if( aAtoms.getLength() ) - { - sal_Int32 nAtoms = aAtoms.getLength() / sizeof(Atom); - Atom* pAtoms = (Atom*)aAtoms.getArray(); - rTypes.realloc( nAtoms ); - aNativeTypes.resize( nAtoms ); - DataFlavor* pFlavors = rTypes.getArray(); - sal_Int32 nNativeTypesIndex = 0; - while( nAtoms-- ) - { -#if OSL_DEBUG_LEVEL > 1 - if( *pAtoms && *pAtoms < 0x01000000 ) - fprintf( stderr, "native type: %s\n", OUStringToOString( getString( *pAtoms ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); -#endif - if( *pAtoms == m_nCOMPOUNDAtom ) - bHaveText = bHaveCompound = true; - else if( *pAtoms && *pAtoms < 0x01000000 ) - { - int nFormat; - pFlavors->MimeType = convertTypeFromNative( *pAtoms, selection, nFormat ); - pFlavors->DataType = getCppuType( (Sequence< sal_Int8 >*)0 ); - sal_Int32 nIndex = 0; - if( pFlavors->MimeType.getToken( 0, ';', nIndex ).equalsAsciiL( "text/plain", 10 ) ) - { - OUString aToken(pFlavors->MimeType.getToken( 0, ';', nIndex )); - // omit text/plain;charset=unicode since it is not well defined - if( aToken.compareToAscii( "charset=unicode" ) == 0 ) - { - pAtoms++; - continue; - } - bHaveText = true; - if( aToken.compareToAscii( "charset=utf-16" ) == 0 ) - { - bHaveUTF16 = true; - pFlavors->DataType = getCppuType( (OUString*)0 ); - } - else if( aToken.compareToAscii( "charset=utf-8" ) == 0 ) - { - aUTF8Type = *pAtoms; - } - } - pFlavors++; - aNativeTypes[ nNativeTypesIndex ] = *pAtoms; - nNativeTypesIndex++; - } - pAtoms++; - } - if( (pFlavors - rTypes.getArray()) < rTypes.getLength() ) - rTypes.realloc(pFlavors - rTypes.getArray()); - bSuccess = rTypes.getLength() ? true : false; - if( bHaveText && ! bHaveUTF16 ) - { - int i = 0; - - int nNewFlavors = rTypes.getLength()+1; - Sequence< DataFlavor > aTemp( nNewFlavors ); - for( i = 0; i < nNewFlavors-1; i++ ) - aTemp.getArray()[i+1] = rTypes.getConstArray()[i]; - aTemp.getArray()[0].MimeType = OUString::createFromAscii( "text/plain;charset=utf-16" ); - aTemp.getArray()[0].DataType = getCppuType( (OUString*)0 ); - rTypes = aTemp; - - std::vector< Atom > aNativeTemp( nNewFlavors ); - for( i = 0; i < nNewFlavors-1; i++ ) - aNativeTemp[ i + 1 ] = aNativeTypes[ i ]; - aNativeTemp[0] = None; - aNativeTypes = aNativeTemp; - } - } - - { - MutexGuard aGuard(m_aMutex); - - it = m_aSelections.find( selection ); - if( it != m_aSelections.end() ) - { - if( bSuccess ) - { - it->second->m_aTypes = rTypes; - it->second->m_aNativeTypes = aNativeTypes; - it->second->m_nLastTimestamp = time( NULL ); - it->second->m_bHaveUTF16 = bHaveUTF16; - it->second->m_aUTF8Type = aUTF8Type; - it->second->m_bHaveCompound = bHaveCompound; - } - else - { - it->second->m_aTypes = Sequence< DataFlavor >(); - it->second->m_aNativeTypes = std::vector< Atom >(); - it->second->m_nLastTimestamp = 0; - it->second->m_bHaveUTF16 = false; - it->second->m_aUTF8Type = None; - it->second->m_bHaveCompound = false; - } - } - } - -#if OSL_DEBUG_LEVEL > 1 -// if( selection != m_nCLIPBOARDAtom ) - { - fprintf( stderr, "SelectionManager::getPasteDataTypes( %s ) = %s\n", OUStringToOString( getString( selection ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), bSuccess ? "true" : "false" ); - for( int i = 0; i < rTypes.getLength(); i++ ) - fprintf( stderr, "type: %s\n", OUStringToOString( rTypes.getConstArray()[i].MimeType, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); - } -#endif - - return bSuccess; -} - -// ------------------------------------------------------------------------ - -PixmapHolder* SelectionManager::getPixmapHolder( Atom selection ) -{ - std::hash_map< Atom, Selection* >::const_iterator it = m_aSelections.find( selection ); - if( it == m_aSelections.end() ) - return NULL; - if( ! it->second->m_pPixmap ) - it->second->m_pPixmap = new PixmapHolder( m_pDisplay ); - return it->second->m_pPixmap; -} - -static sal_Size GetTrueFormatSize(int nFormat) -{ - // http://mail.gnome.org/archives/wm-spec-list/2003-March/msg00067.html - return nFormat == 32 ? sizeof(long) : nFormat/8; -} - -bool SelectionManager::sendData( SelectionAdaptor* pAdaptor, - XLIB_Window requestor, - Atom target, - Atom property, - Atom selection ) -{ - ResettableMutexGuard aGuard( m_aMutex ); - - // handle targets related to image/bmp - if( target == XA_COLORMAP || target == XA_PIXMAP || target == XA_BITMAP || target == XA_VISUALID ) - { - PixmapHolder* pPixmap = getPixmapHolder( selection ); - if( ! pPixmap ) return false; - XID nValue = None; - - // handle colormap request - if( target == XA_COLORMAP ) - nValue = (XID)pPixmap->getColormap(); - else if( target == XA_VISUALID ) - nValue = (XID)pPixmap->getVisualID(); - else if( target == XA_PIXMAP || target == XA_BITMAP ) - { - nValue = (XID)pPixmap->getPixmap(); - if( nValue == None ) - { - // first conversion - Sequence< sal_Int8 > aData; - int nFormat; - aGuard.clear(); - bool bConverted = convertData( pAdaptor->getTransferable(), target, selection, nFormat, aData ); - aGuard.reset(); - if( bConverted ) - { - // get pixmap again since clearing the guard could have invalidated - // the pixmap in another thread - pPixmap = getPixmapHolder( selection ); - // conversion succeeded, so aData contains image/bmp now - if( pPixmap->needsConversion( (const sal_uInt8*)aData.getConstArray() ) - && m_xBitmapConverter.is() ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "trying bitmap conversion\n" ); -#endif - Reference xBM( new BmpTransporter( aData ) ); - Sequence aArgs(2), aOutArgs; - Sequence aOutIndex; - aArgs.getArray()[0] = makeAny( xBM ); - aArgs.getArray()[1] = makeAny( (sal_uInt16)pPixmap->getDepth() ); - aGuard.clear(); - try - { - Any aResult = - m_xBitmapConverter->invoke( OUString::createFromAscii( "convert-bitmap-depth" ), - aArgs, aOutIndex, aOutArgs ); - if( aResult >>= xBM ) - aData = xBM->getDIB(); - } - catch(...) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "exception in bitmap converter\n" ); -#endif - } - aGuard.reset(); - } - // get pixmap again since clearing the guard could have invalidated - // the pixmap in another thread - pPixmap = getPixmapHolder( selection ); - nValue = (XID)pPixmap->setBitmapData( (const sal_uInt8*)aData.getConstArray() ); - } - if( nValue == None ) - return false; - } - if( target == XA_BITMAP ) - nValue = (XID)pPixmap->getBitmap(); - } - - XChangeProperty( m_pDisplay, - requestor, - property, - target, - 32, - PropModeReplace, - (const unsigned char*)&nValue, - 1); - return true; - } - - /* - * special target TEXT allows us to transfer - * the data in an encoding of our choice - * COMPOUND_TEXT will work with most applications - */ - if( target == m_nTEXTAtom ) - target = m_nCOMPOUNDAtom; - - Sequence< sal_Int8 > aData; - int nFormat; - aGuard.clear(); - bool bConverted = convertData( pAdaptor->getTransferable(), target, selection, nFormat, aData ); - aGuard.reset(); - if( bConverted ) - { - // conversion succeeded - if( aData.getLength() > m_nIncrementalThreshold ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "using INCR protocol\n" ); - std::hash_map< XLIB_Window, std::hash_map< Atom, IncrementalTransfer > >::const_iterator win_it = m_aIncrementals.find( requestor ); - if( win_it != m_aIncrementals.end() ) - { - std::hash_map< Atom, IncrementalTransfer >::const_iterator inc_it = win_it->second.find( property ); - if( inc_it != win_it->second.end() ) - { - const IncrementalTransfer& rInc = inc_it->second; - fprintf( stderr, "premature end and new start for INCR transfer for window 0x%lx, property %s, type %s\n", - rInc.m_aRequestor, - OUStringToOString( getString( rInc.m_aProperty ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), - OUStringToOString( getString( rInc.m_aTarget ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() - ); - } - } -#endif - - // insert IncrementalTransfer - IncrementalTransfer& rInc = m_aIncrementals[ requestor ][ property ]; - rInc.m_aData = aData; - rInc.m_nBufferPos = 0; - rInc.m_aRequestor = requestor; - rInc.m_aProperty = property; - rInc.m_aTarget = target; - rInc.m_nFormat = nFormat; - rInc.m_nTransferStartTime = time( NULL ); - - // use incr protocol, signal start to requestor - long nMinSize = m_nIncrementalThreshold; - XSelectInput( m_pDisplay, requestor, PropertyChangeMask ); - XChangeProperty( m_pDisplay, requestor, property, - m_nINCRAtom, 32, PropModeReplace, (unsigned char*)&nMinSize, 1 ); - XFlush( m_pDisplay ); - } - else - { - sal_Size nUnitSize = GetTrueFormatSize(nFormat); - XChangeProperty( m_pDisplay, - requestor, - property, - target, - nFormat, - PropModeReplace, - (const unsigned char*)aData.getConstArray(), - aData.getLength()/nUnitSize ); - } - } -#if OSL_DEBUG_LEVEL > 1 - else - fprintf( stderr, "convertData failed for type: %s \n", - OUStringToOString( convertTypeFromNative( target, selection, nFormat ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); -#endif - return bConverted; -} - -// ------------------------------------------------------------------------ - -bool SelectionManager::handleSelectionRequest( XSelectionRequestEvent& rRequest ) -{ - ResettableMutexGuard aGuard( m_aMutex ); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "handleSelectionRequest for selection %s and target %s\n", - OUStringToOString( getString( rRequest.selection ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), - OUStringToOString( getString( rRequest.target ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() - ); -#endif - - XEvent aNotify; - - aNotify.type = SelectionNotify; - aNotify.xselection.display = rRequest.display; - aNotify.xselection.send_event = True; - aNotify.xselection.requestor = rRequest.requestor; - aNotify.xselection.selection = rRequest.selection; - aNotify.xselection.time = rRequest.time; - aNotify.xselection.target = rRequest.target; - aNotify.xselection.property = None; - - SelectionAdaptor* pAdaptor = getAdaptor( rRequest.selection ); - // ensure that we still own that selection - if( pAdaptor && - XGetSelectionOwner( m_pDisplay, rRequest.selection ) == m_aWindow ) - { - Reference< XTransferable > xTrans( pAdaptor->getTransferable() ); - if( rRequest.target == m_nTARGETSAtom ) - { - // someone requests our types - if( xTrans.is() ) - { - aGuard.clear(); - Sequence< DataFlavor > aFlavors = xTrans->getTransferDataFlavors(); - aGuard.reset(); - - ::std::list< Atom > aConversions; - getNativeTypeList( aFlavors, aConversions, rRequest.selection ); - - int i, nTypes = aConversions.size(); - Atom* pTypes = (Atom*)alloca( nTypes * sizeof( Atom ) ); - std::list< Atom >::const_iterator it; - for( i = 0, it = aConversions.begin(); i < nTypes; i++, ++it ) - pTypes[i] = *it; - XChangeProperty( m_pDisplay, rRequest.requestor, rRequest.property, - XA_ATOM, 32, PropModeReplace, (const unsigned char*)pTypes, nTypes ); - aNotify.xselection.property = rRequest.property; -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "sending type list:\n" ); - for( int k = 0; k < nTypes; k++ ) - fprintf( stderr, " %s\n", pTypes[k] ? XGetAtomName( m_pDisplay, pTypes[k] ) : "" ); -#endif - } - } - else if( rRequest.target == m_nTIMESTAMPAtom ) - { - long nTimeStamp = (long)m_aSelections[rRequest.selection]->m_nOrigTimestamp; - XChangeProperty( m_pDisplay, rRequest.requestor, rRequest.property, - XA_INTEGER, 32, PropModeReplace, (const unsigned char*)&nTimeStamp, 1 ); - aNotify.xselection.property = rRequest.property; -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "sending timestamp: %d\n", (int)nTimeStamp ); -#endif - } - else - { - bool bEventSuccess = false; - if( rRequest.target == m_nMULTIPLEAtom ) - { - // get all targets - Atom nType = None; - int nFormat = 0; - unsigned long nItems = 0, nBytes = 0; - unsigned char* pData = NULL; - - // get number of atoms - XGetWindowProperty( m_pDisplay, - rRequest.requestor, - rRequest.property, - 0, 0, - False, - AnyPropertyType, - &nType, &nFormat, - &nItems, &nBytes, - &pData ); - if( nFormat == 32 && nBytes/4 ) - { - if( pData ) // ?? should not happen - { - XFree( pData ); - pData = NULL; - } - XGetWindowProperty( m_pDisplay, - rRequest.requestor, - rRequest.property, - 0, nBytes/4, - False, - nType, - &nType, &nFormat, - &nItems, &nBytes, - &pData ); - if( pData && nItems ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "found %ld atoms in MULTIPLE request\n", nItems ); -#endif - bEventSuccess = true; - bool bResetAtoms = false; - Atom* pAtoms = (Atom*)pData; - aGuard.clear(); - for( unsigned int i = 0; i < nItems; i += 2 ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, " %s => %s: ", - OUStringToOString( getString( pAtoms[i] ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), - OUStringToOString( getString( pAtoms[i+1] ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); -#endif - bool bSuccess = sendData( pAdaptor, rRequest.requestor, pAtoms[i], pAtoms[i+1], rRequest.selection ); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "%s\n", bSuccess ? "succeeded" : "failed" ); -#endif - if( ! bSuccess ) - { - pAtoms[i] = None; - bResetAtoms = true; - } - } - aGuard.reset(); - if( bResetAtoms ) - XChangeProperty( m_pDisplay, - rRequest.requestor, - rRequest.property, - XA_ATOM, - 32, - PropModeReplace, - pData, - nBytes/4 ); - } - if( pData ) - XFree( pData ); - } -#if OSL_DEBUG_LEVEL > 1 - else - { - fprintf( stderr, "could not get type list from \"%s\" of type \"%s\" on requestor 0x%lx, requestor has properties:", - OUStringToOString( getString( rRequest.property ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), - OUStringToOString( getString( nType ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), - rRequest.requestor ); - int nProps = 0; - Atom* pProps = XListProperties( m_pDisplay, rRequest.requestor, &nProps ); - if( pProps ) - { - for( int i = 0; i < nProps; i++ ) - fprintf( stderr, " \"%s\"", OUStringToOString( getString( pProps[i]), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); - XFree( pProps ); - } - } -#endif - } - else - { - aGuard.clear(); - bEventSuccess = sendData( pAdaptor, rRequest.requestor, rRequest.target, rRequest.property, rRequest.selection ); - aGuard.reset(); - } - if( bEventSuccess ) - { - aNotify.xselection.target = rRequest.target; - aNotify.xselection.property = rRequest.property; - } - } - aGuard.clear(); - xTrans.clear(); - aGuard.reset(); - } - XSendEvent( m_pDisplay, rRequest.requestor, False, 0, &aNotify ); - - if( rRequest.selection == XA_PRIMARY && - m_bWaitingForPrimaryConversion && - m_xDragSourceListener.is() ) - { - DragSourceDropEvent dsde; - dsde.Source = static_cast< OWeakObject* >(this); - dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, rRequest.time, *this ); - dsde.DragSource = static_cast< XDragSource* >(this); - if( aNotify.xselection.property != None ) - { - dsde.DropAction = DNDConstants::ACTION_COPY; - dsde.DropSuccess = sal_True; - } - else - { - dsde.DropAction = DNDConstants::ACTION_NONE; - dsde.DropSuccess = sal_False; - } - Reference< XDragSourceListener > xListener( m_xDragSourceListener ); - m_xDragSourceListener.clear(); - aGuard.clear(); - if( xListener.is() ) - xListener->dragDropEnd( dsde ); - } - - // we handled the event in any case by answering - return true; -} - -// ------------------------------------------------------------------------ - -bool SelectionManager::handleReceivePropertyNotify( XPropertyEvent& rNotify ) -{ - MutexGuard aGuard( m_aMutex ); - // data we requested arrived -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "handleReceivePropertyNotify for property %s\n", - OUStringToOString( getString( rNotify.atom ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); -#endif - bool bHandled = false; - - ::std::hash_map< Atom, Selection* >::iterator it = - m_aSelections.find( rNotify.atom ); - if( it != m_aSelections.end() && - rNotify.state == PropertyNewValue && - ( it->second->m_eState == Selection::WaitingForResponse || - it->second->m_eState == Selection::WaitingForData || - it->second->m_eState == Selection::IncrementalTransfer - ) - ) - { - // MULTIPLE requests are only complete after selection notify - if( it->second->m_aRequestedType == m_nMULTIPLEAtom && - ( it->second->m_eState == Selection::WaitingForResponse || - it->second->m_eState == Selection::WaitingForData ) ) - return false; - - bHandled = true; - - Atom nType = None; - int nFormat = 0; - unsigned long nItems = 0, nBytes = 0; - unsigned char* pData = NULL; - - // get type and length - XGetWindowProperty( m_pDisplay, - rNotify.window, - rNotify.atom, - 0, 0, - False, - AnyPropertyType, - &nType, &nFormat, - &nItems, &nBytes, - &pData ); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "found %ld bytes data of type %s and format %d, items = %ld\n", - nBytes, - OUStringToOString( getString( nType ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), - nFormat, nItems ); -#endif - if( pData ) - { - XFree( pData ); - pData = NULL; - } - - if( nType == m_nINCRAtom ) - { - // start data transfer - XDeleteProperty( m_pDisplay, rNotify.window, rNotify.atom ); - it->second->m_eState = Selection::IncrementalTransfer; - } - else if( nType != None ) - { - XGetWindowProperty( m_pDisplay, - rNotify.window, - rNotify.atom, - 0, nBytes/4 +1, - True, - nType, - &nType, &nFormat, - &nItems, &nBytes, - &pData ); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "read %ld items data of type %s and format %d, %ld bytes left in property\n", - nItems, - OUStringToOString( getString( nType ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), - nFormat, nBytes ); -#endif - - sal_Size nUnitSize = GetTrueFormatSize(nFormat); - - if( it->second->m_eState == Selection::WaitingForData || - it->second->m_eState == Selection::WaitingForResponse ) - { - // copy data - it->second->m_aData = Sequence< sal_Int8 >( (sal_Int8*)pData, nItems*nUnitSize ); - it->second->m_eState = Selection::Inactive; - it->second->m_aDataArrived.set(); - } - else if( it->second->m_eState == Selection::IncrementalTransfer ) - { - if( nItems ) - { - // append data - Sequence< sal_Int8 > aData( it->second->m_aData.getLength() + nItems*nUnitSize ); - memcpy( aData.getArray(), it->second->m_aData.getArray(), it->second->m_aData.getLength() ); - memcpy( aData.getArray() + it->second->m_aData.getLength(), pData, nItems*nUnitSize ); - it->second->m_aData = aData; - } - else - { - it->second->m_eState = Selection::Inactive; - it->second->m_aDataArrived.set(); - } - } - if( pData ) - XFree( pData ); - } - else if( it->second->m_eState == Selection::IncrementalTransfer ) - { - it->second->m_eState = Selection::Inactive; - it->second->m_aDataArrived.set(); - } - } - return bHandled; -} - -// ------------------------------------------------------------------------ - -bool SelectionManager::handleSendPropertyNotify( XPropertyEvent& rNotify ) -{ - MutexGuard aGuard( m_aMutex ); - - // ready for next part of a IncrementalTransfer -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "handleSendPropertyNotify for property %s (%s)\n", - OUStringToOString( getString( rNotify.atom ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), - rNotify.state == PropertyNewValue ? "new value" : ( rNotify.state == PropertyDelete ? "deleted" : "unknown") - ); -#endif - - bool bHandled = false; - // feed incrementals - if( rNotify.state == PropertyDelete ) - { - std::hash_map< XLIB_Window, std::hash_map< Atom, IncrementalTransfer > >::iterator it; - it = m_aIncrementals.find( rNotify.window ); - if( it != m_aIncrementals.end() ) - { - bHandled = true; - int nCurrentTime = time( NULL ); - std::hash_map< Atom, IncrementalTransfer >::iterator inc_it; - // throw out aborted transfers - std::list< Atom > aTimeouts; - for( inc_it = it->second.begin(); inc_it != it->second.end(); ++inc_it ) - { - if( (nCurrentTime - inc_it->second.m_nTransferStartTime) > (getSelectionTimeout()+2) ) - { - aTimeouts.push_back( inc_it->first ); -#if OSL_DEBUG_LEVEL > 1 - const IncrementalTransfer& rInc = inc_it->second; - fprintf( stderr, "timeout on INCR transfer for window 0x%lx, property %s, type %s\n", - rInc.m_aRequestor, - OUStringToOString( getString( rInc.m_aProperty ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), - OUStringToOString( getString( rInc.m_aTarget ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() - ); -#endif - } - } - - while( aTimeouts.begin() != aTimeouts.end() ) - { - // transfer broken, might even be a new client with the - // same window id - it->second.erase( aTimeouts.front() ); - aTimeouts.pop_front(); - } - - inc_it = it->second.find( rNotify.atom ); - if( inc_it != it->second.end() ) - { - IncrementalTransfer& rInc = inc_it->second; - - int nBytes = rInc.m_aData.getLength() - rInc.m_nBufferPos; - nBytes = (nBytes > m_nIncrementalThreshold) ? m_nIncrementalThreshold : nBytes; - if( nBytes < 0 ) // sanity check - nBytes = 0; -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "pushing %d bytes: \"%.*s\"...\n", - nBytes, nBytes > 32 ? 32 : nBytes, - (const unsigned char*)rInc.m_aData.getConstArray()+rInc.m_nBufferPos ); -#endif - - sal_Size nUnitSize = GetTrueFormatSize(rInc.m_nFormat); - - XChangeProperty( m_pDisplay, - rInc.m_aRequestor, - rInc.m_aProperty, - rInc.m_aTarget, - rInc.m_nFormat, - PropModeReplace, - (const unsigned char*)rInc.m_aData.getConstArray()+rInc.m_nBufferPos, - nBytes/nUnitSize ); - rInc.m_nBufferPos += nBytes; - rInc.m_nTransferStartTime = nCurrentTime; - - if( nBytes == 0 ) // transfer finished - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "finished INCR transfer for window 0x%lx, property %s, type %s\n", - rInc.m_aRequestor, - OUStringToOString( getString( rInc.m_aProperty ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), - OUStringToOString( getString( rInc.m_aTarget ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() - ); -#endif - it->second.erase( inc_it ); - } - - } - // eventually clean up the hash map - if( it->second.begin() == it->second.end() ) - m_aIncrementals.erase( it ); - } - } - return bHandled; -} - -// ------------------------------------------------------------------------ - -bool SelectionManager::handleSelectionNotify( XSelectionEvent& rNotify ) -{ - MutexGuard aGuard( m_aMutex ); - - bool bHandled = false; - - // notification about success/failure of one of our conversion requests -#if OSL_DEBUG_LEVEL > 1 - OUString aSelection( getString( rNotify.selection ) ); - OUString aProperty( OUString::createFromAscii( "None" ) ); - if( rNotify.property ) - aProperty = getString( rNotify.property ); - fprintf( stderr, "handleSelectionNotify for selection %s and property %s (0x%lx)\n", - OUStringToOString( aSelection, RTL_TEXTENCODING_ISO_8859_1 ).getStr(), - OUStringToOString( aProperty, RTL_TEXTENCODING_ISO_8859_1 ).getStr(), - rNotify.property - ); - if( rNotify.requestor != m_aWindow && rNotify.requestor != m_aCurrentDropWindow ) - fprintf( stderr, "Warning: selection notify for unknown window 0x%lx\n", rNotify.requestor ); -#endif - ::std::hash_map< Atom, Selection* >::iterator it = - m_aSelections.find( rNotify.selection ); - if ( - (rNotify.requestor == m_aWindow || rNotify.requestor == m_aCurrentDropWindow) && - it != m_aSelections.end() && - ( - (it->second->m_eState == Selection::WaitingForResponse) || - (it->second->m_eState == Selection::WaitingForData) - ) - ) - { - bHandled = true; - if( it->second->m_aRequestedType == m_nMULTIPLEAtom ) - { - Atom nType = None; - int nFormat = 0; - unsigned long nItems = 0, nBytes = 0; - unsigned char* pData = NULL; - - // get type and length - XGetWindowProperty( m_pDisplay, - rNotify.requestor, - rNotify.property, - 0, 256, - False, - AnyPropertyType, - &nType, &nFormat, - &nItems, &nBytes, - &pData ); - if( nBytes ) // HUGE request !!! - { - if( pData ) - XFree( pData ); - XGetWindowProperty( m_pDisplay, - rNotify.requestor, - rNotify.property, - 0, 256+(nBytes+3)/4, - False, - AnyPropertyType, - &nType, &nFormat, - &nItems, &nBytes, - &pData ); - } - it->second->m_eState = Selection::Inactive; - sal_Size nUnitSize = GetTrueFormatSize(nFormat); - it->second->m_aData = Sequence< sal_Int8 >((sal_Int8*)pData, nItems * nUnitSize); - it->second->m_aDataArrived.set(); - if( pData ) - XFree( pData ); - } - // WaitingForData can actually happen; some - // applications (e.g. cmdtool on Solaris) first send - // a success and then cancel it. Weird ! - else if( rNotify.property == None ) - { - // conversion failed, stop transfer - it->second->m_eState = Selection::Inactive; - it->second->m_aData = Sequence< sal_Int8 >(); - it->second->m_aDataArrived.set(); - } - // get the bytes, by INCR if necessary - else - it->second->m_eState = Selection::WaitingForData; - } -#if OSL_DEBUG_LEVEL > 1 - else if( it != m_aSelections.end() ) - fprintf( stderr, "Warning: selection in state %d\n", it->second->m_eState ); -#endif - return bHandled; -} - -// ------------------------------------------------------------------------ - -bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage ) -{ - ResettableMutexGuard aGuard(m_aMutex); - - // handle drop related events - XLIB_Window aSource = rMessage.data.l[0]; - XLIB_Window aTarget = rMessage.window; - - bool bHandled = false; - - ::std::hash_map< XLIB_Window, DropTargetEntry >::iterator it = - m_aDropTargets.find( aTarget ); - -#if OSL_DEBUG_LEVEL > 1 - if( rMessage.message_type == m_nXdndEnter || - rMessage.message_type == m_nXdndLeave || - rMessage.message_type == m_nXdndDrop || - rMessage.message_type == m_nXdndPosition ) - { - fprintf( stderr, "got drop event %s, ", OUStringToOString( getString( rMessage.message_type ), RTL_TEXTENCODING_ASCII_US).getStr() ); - if( it == m_aDropTargets.end() ) - fprintf( stderr, "but no target found\n" ); - else if( ! it->second.m_pTarget->m_bActive ) - fprintf( stderr, "but target is inactive\n" ); - else if( m_aDropEnterEvent.data.l[0] != None && (XLIB_Window)m_aDropEnterEvent.data.l[0] != aSource ) - fprintf( stderr, "but source 0x%lx is unknown (expected 0x%lx or 0)\n", aSource, m_aDropEnterEvent.data.l[0] ); - else - fprintf( stderr, "processing.\n" ); - } -#endif - - if( it != m_aDropTargets.end() && it->second.m_pTarget->m_bActive && - m_bDropWaitingForCompletion && m_aDropEnterEvent.data.l[0] ) - { - bHandled = true; - OSL_ENSURE( 0, "someone forgot to call dropComplete ?" ); - // some listener forgot to call dropComplete in the last operation - // let us end it now and accept the new enter event - aGuard.clear(); - dropComplete( sal_False, m_aCurrentDropWindow, m_nDropTime ); - aGuard.reset(); - } - - if( it != m_aDropTargets.end() && - it->second.m_pTarget->m_bActive && - ( m_aDropEnterEvent.data.l[0] == None || XLIB_Window(m_aDropEnterEvent.data.l[0]) == aSource ) - ) - { - if( rMessage.message_type == m_nXdndEnter ) - { - bHandled = true; - m_aDropEnterEvent = rMessage; - m_bDropEnterSent = false; - m_aCurrentDropWindow = aTarget; - m_nCurrentProtocolVersion = m_aDropEnterEvent.data.l[1] >> 24; -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "received XdndEnter on 0x%lx\n", aTarget ); -#endif - } - else if( - rMessage.message_type == m_nXdndPosition && - aSource == XLIB_Window(m_aDropEnterEvent.data.l[0]) - ) - { - bHandled = true; - m_nDropTime = m_nCurrentProtocolVersion > 0 ? rMessage.data.l[3] : CurrentTime; - if( ! m_bDropEnterSent ) - m_nDropTimestamp = m_nDropTime; - - XLIB_Window aChild; - XTranslateCoordinates( m_pDisplay, - it->second.m_aRootWindow, - it->first, - rMessage.data.l[2] >> 16, - rMessage.data.l[2] & 0xffff, - &m_nLastX, &m_nLastY, - &aChild ); - -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "received XdndPosition on 0x%lx (%d, %d)\n", aTarget, m_nLastX, m_nLastY ); -#endif - DropTargetDragEnterEvent aEvent; - aEvent.Source = static_cast< XDropTarget* >(it->second.m_pTarget); - aEvent.Context = new DropTargetDragContext( m_aCurrentDropWindow, m_nDropTimestamp, *this ); - aEvent.LocationX = m_nLastX; - aEvent.LocationY = m_nLastY; - aEvent.SourceActions = m_nSourceActions; - if( m_nCurrentProtocolVersion < 2 ) - aEvent.DropAction = DNDConstants::ACTION_COPY; - else if( Atom(rMessage.data.l[4]) == m_nXdndActionCopy ) - aEvent.DropAction = DNDConstants::ACTION_COPY; - else if( Atom(rMessage.data.l[4]) == m_nXdndActionMove ) - aEvent.DropAction = DNDConstants::ACTION_MOVE; - else if( Atom(rMessage.data.l[4]) == m_nXdndActionLink ) - aEvent.DropAction = DNDConstants::ACTION_LINK; - else if( Atom(rMessage.data.l[4]) == m_nXdndActionAsk ) - // currently no interface to implement ask - aEvent.DropAction = ~0; - else - aEvent.DropAction = DNDConstants::ACTION_NONE; - - m_nLastDropAction = aEvent.DropAction; - if( ! m_bDropEnterSent ) - { - m_bDropEnterSent = true; - aEvent.SupportedDataFlavors = m_xDropTransferable->getTransferDataFlavors(); - aGuard.clear(); - it->second->dragEnter( aEvent ); - } - else - { - aGuard.clear(); - it->second->dragOver( aEvent ); - } - } - else if( - rMessage.message_type == m_nXdndLeave && - aSource == XLIB_Window(m_aDropEnterEvent.data.l[0]) - ) - { - bHandled = true; -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "received XdndLeave on 0x%lx\n", aTarget ); -#endif - DropTargetEvent aEvent; - aEvent.Source = static_cast< XDropTarget* >(it->second.m_pTarget); - m_aDropEnterEvent.data.l[0] = None; - if( m_aCurrentDropWindow == aTarget ) - m_aCurrentDropWindow = None; - m_nCurrentProtocolVersion = nXdndProtocolRevision; - aGuard.clear(); - it->second->dragExit( aEvent ); - } - else if( - rMessage.message_type == m_nXdndDrop && - aSource == XLIB_Window(m_aDropEnterEvent.data.l[0]) - ) - { - bHandled = true; - m_nDropTime = m_nCurrentProtocolVersion > 0 ? rMessage.data.l[2] : CurrentTime; - -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "received XdndDrop on 0x%lx (%d, %d)\n", aTarget, m_nLastX, m_nLastY ); -#endif - if( m_bLastDropAccepted ) - { - DropTargetDropEvent aEvent; - aEvent.Source = static_cast< XDropTarget* >(it->second.m_pTarget); - aEvent.Context = new DropTargetDropContext( m_aCurrentDropWindow, m_nDropTimestamp, *this ); - aEvent.LocationX = m_nLastX; - aEvent.LocationY = m_nLastY; - aEvent.DropAction = m_nLastDropAction; - // there is nothing corresponding to source supported actions - // every source can do link, copy and move - aEvent.SourceActions= m_nLastDropAction; - aEvent.Transferable = m_xDropTransferable; - - m_bDropWaitingForCompletion = true; - aGuard.clear(); - it->second->drop( aEvent ); - } - else - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "XdndDrop canceled due to m_bLastDropAccepted = fale\n" ); -#endif - DropTargetEvent aEvent; - aEvent.Source = static_cast< XDropTarget* >(it->second.m_pTarget); - aGuard.clear(); - it->second->dragExit( aEvent ); - // reset the drop status, notify source - dropComplete( sal_False, m_aCurrentDropWindow, m_nDropTime ); - } - } - } - return bHandled; -} - -/* - * methods for XDropTargetDropContext - */ - -void SelectionManager::dropComplete( sal_Bool bSuccess, XLIB_Window aDropWindow, XLIB_Time ) -{ - ClearableMutexGuard aGuard(m_aMutex); - - if( aDropWindow == m_aCurrentDropWindow ) - { - if( m_xDragSourceListener.is() ) - { - DragSourceDropEvent dsde; - dsde.Source = static_cast< OWeakObject* >(this); - dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); - dsde.DragSource = static_cast< XDragSource* >(this); - dsde.DropAction = getUserDragAction(); - dsde.DropSuccess = bSuccess; - Reference< XDragSourceListener > xListener = m_xDragSourceListener; - m_xDragSourceListener.clear(); - - aGuard.clear(); - xListener->dragDropEnd( dsde ); - } - else if( m_aDropEnterEvent.data.l[0] && m_aCurrentDropWindow ) - { - XEvent aEvent; - aEvent.xclient.type = ClientMessage; - aEvent.xclient.display = m_pDisplay; - aEvent.xclient.window = m_aDropEnterEvent.data.l[0]; - aEvent.xclient.message_type = m_nXdndFinished; - aEvent.xclient.format = 32; - aEvent.xclient.data.l[0] = m_aCurrentDropWindow; - aEvent.xclient.data.l[1] = bSuccess ? 1 : 0; - aEvent.xclient.data.l[2] = 0; - aEvent.xclient.data.l[3] = 0; - aEvent.xclient.data.l[4] = 0; - if( bSuccess ) - { - if( m_nLastDropAction & DNDConstants::ACTION_MOVE ) - aEvent.xclient.data.l[2] = m_nXdndActionMove; - else if( m_nLastDropAction & DNDConstants::ACTION_COPY ) - aEvent.xclient.data.l[2] = m_nXdndActionCopy; - else if( m_nLastDropAction & DNDConstants::ACTION_LINK ) - aEvent.xclient.data.l[2] = m_nXdndActionLink; - } - -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "Sending XdndFinished to 0x%lx\n", - m_aDropEnterEvent.data.l[0] - ); -#endif - - XSendEvent( m_pDisplay, m_aDropEnterEvent.data.l[0], - False, NoEventMask, & aEvent ); - - m_aDropEnterEvent.data.l[0] = None; - m_aCurrentDropWindow = None; - m_nCurrentProtocolVersion = nXdndProtocolRevision; - } - m_bDropWaitingForCompletion = false; - } - else - OSL_ASSERT( "dropComplete from invalid DropTargetDropContext" ); -} - -/* - * methods for XDropTargetDragContext - */ - -// ------------------------------------------------------------------------ - -void SelectionManager::sendDragStatus( Atom nDropAction ) -{ - ClearableMutexGuard aGuard(m_aMutex); - - if( m_xDragSourceListener.is() ) - { - sal_Int8 nNewDragAction; - if( nDropAction == m_nXdndActionMove ) - nNewDragAction = DNDConstants::ACTION_MOVE; - else if( nDropAction == m_nXdndActionCopy ) - nNewDragAction = DNDConstants::ACTION_COPY; - else if( nDropAction == m_nXdndActionLink ) - nNewDragAction = DNDConstants::ACTION_LINK; - else - nNewDragAction = DNDConstants::ACTION_NONE; - nNewDragAction &= m_nSourceActions; - - if( nNewDragAction != m_nTargetAcceptAction ) - { - setCursor( getDefaultCursor( nNewDragAction ), m_aDropWindow, m_nDragTimestamp ); - m_nTargetAcceptAction = nNewDragAction; - } - - DragSourceDragEvent dsde; - dsde.Source = static_cast< OWeakObject* >(this); - dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); - dsde.DragSource = static_cast< XDragSource* >(this); - dsde.DropAction = m_nSourceActions; - dsde.UserAction = getUserDragAction(); - - Reference< XDragSourceListener > xListener( m_xDragSourceListener ); - // caution: do not change anything after this - aGuard.clear(); - if( xListener.is() ) - xListener->dragOver( dsde ); - } - else if( m_aDropEnterEvent.data.l[0] && m_aCurrentDropWindow ) - { - XEvent aEvent; - aEvent.xclient.type = ClientMessage; - aEvent.xclient.display = m_pDisplay; - aEvent.xclient.window = m_aDropEnterEvent.data.l[0]; - aEvent.xclient.message_type = m_nXdndStatus; - aEvent.xclient.format = 32; - aEvent.xclient.data.l[0] = m_aCurrentDropWindow; - aEvent.xclient.data.l[1] = 2; - if( nDropAction == m_nXdndActionMove || - nDropAction == m_nXdndActionLink || - nDropAction == m_nXdndActionCopy ) - aEvent.xclient.data.l[1] |= 1; - aEvent.xclient.data.l[2] = 0; - aEvent.xclient.data.l[3] = 0; - aEvent.xclient.data.l[4] = m_nCurrentProtocolVersion > 1 ? nDropAction : 0; - -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "Sending XdndStatus to 0x%lx with action %s\n", - m_aDropEnterEvent.data.l[0], - OUStringToOString( getString( nDropAction ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() - ); -#endif - - XSendEvent( m_pDisplay, m_aDropEnterEvent.data.l[0], - False, NoEventMask, & aEvent ); - XFlush( m_pDisplay ); - } -} - -// ------------------------------------------------------------------------ - -sal_Int8 SelectionManager::getUserDragAction() const -{ - return (m_nTargetAcceptAction != DNDConstants::ACTION_DEFAULT) ? m_nTargetAcceptAction : m_nUserDragAction; -} - -// ------------------------------------------------------------------------ - -bool SelectionManager::updateDragAction( int modifierState ) -{ - bool bRet = false; - - sal_Int8 nNewDropAction = DNDConstants::ACTION_MOVE; - if( ( modifierState & ShiftMask ) && ! ( modifierState & ControlMask ) ) - nNewDropAction = DNDConstants::ACTION_MOVE; - else if( ( modifierState & ControlMask ) && ! ( modifierState & ShiftMask ) ) - nNewDropAction = DNDConstants::ACTION_COPY; - else if( ( modifierState & ShiftMask ) && ( modifierState & ControlMask ) ) - nNewDropAction = DNDConstants::ACTION_LINK; - if( m_nCurrentProtocolVersion < 0 && m_aDropWindow != None ) - nNewDropAction = DNDConstants::ACTION_COPY; - nNewDropAction &= m_nSourceActions; - - if( ! ( modifierState & ( ControlMask | ShiftMask ) ) ) - { - if( ! nNewDropAction ) - { - // default to an action so the user does not have to press - // keys explicitly - if( m_nSourceActions & DNDConstants::ACTION_MOVE ) - nNewDropAction = DNDConstants::ACTION_MOVE; - else if( m_nSourceActions & DNDConstants::ACTION_COPY ) - nNewDropAction = DNDConstants::ACTION_COPY; - else if( m_nSourceActions & DNDConstants::ACTION_LINK ) - nNewDropAction = DNDConstants::ACTION_LINK; - } - nNewDropAction |= DNDConstants::ACTION_DEFAULT; - } - - if( nNewDropAction != m_nUserDragAction || m_nTargetAcceptAction != DNDConstants::ACTION_DEFAULT ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "updateDragAction: %x -> %x\n", (int)m_nUserDragAction, (int)nNewDropAction ); -#endif - bRet = true; - m_nUserDragAction = nNewDropAction; - - DragSourceDragEvent dsde; - dsde.Source = static_cast< OWeakObject* >(this); - dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); - dsde.DragSource = static_cast< XDragSource* >(this); - dsde.DropAction = m_nUserDragAction; - dsde.UserAction = m_nUserDragAction; - m_nTargetAcceptAction = DNDConstants::ACTION_DEFAULT; // invalidate last accept - m_xDragSourceListener->dropActionChanged( dsde ); - } - return bRet; -} - -// ------------------------------------------------------------------------ - -void SelectionManager::sendDropPosition( bool bForce, XLIB_Time eventTime ) -{ - ClearableMutexGuard aGuard(m_aMutex); - - if( m_bDropSent ) - return; - - ::std::hash_map< XLIB_Window, DropTargetEntry >::const_iterator it = - m_aDropTargets.find( m_aDropWindow ); - if( it != m_aDropTargets.end() ) - { - if( it->second.m_pTarget->m_bActive ) - { - int x, y; - XLIB_Window aChild; - XTranslateCoordinates( m_pDisplay, it->second.m_aRootWindow, m_aDropWindow, m_nLastDragX, m_nLastDragY, &x, &y, &aChild ); - DropTargetDragEvent dtde; - dtde.Source = static_cast< OWeakObject* >(it->second.m_pTarget ); - dtde.Context = new DropTargetDragContext( m_aCurrentDropWindow, m_nDropTimestamp, *this ); - dtde.LocationX = x; - dtde.LocationY = y; - dtde.DropAction = getUserDragAction(); - dtde.SourceActions = m_nSourceActions; - aGuard.clear(); - it->second->dragOver( dtde ); - } - } - else if( bForce || - - m_nLastDragX < m_nNoPosX || m_nLastDragX >= m_nNoPosX+m_nNoPosWidth || - m_nLastDragY < m_nNoPosY || m_nLastDragY >= m_nNoPosY+m_nNoPosHeight - ) - { - // send XdndPosition - XEvent aEvent; - aEvent.type = ClientMessage; - aEvent.xclient.display = m_pDisplay; - aEvent.xclient.format = 32; - aEvent.xclient.message_type = m_nXdndPosition; - aEvent.xclient.window = m_aDropWindow; - aEvent.xclient.data.l[0] = m_aWindow; - aEvent.xclient.data.l[1] = 0; - aEvent.xclient.data.l[2] = m_nLastDragX << 16 | (m_nLastDragY&0xffff); - aEvent.xclient.data.l[3] = eventTime; - - if( m_nUserDragAction & DNDConstants::ACTION_COPY ) - aEvent.xclient.data.l[4]=m_nXdndActionCopy; - else if( m_nUserDragAction & DNDConstants::ACTION_MOVE ) - aEvent.xclient.data.l[4]=m_nXdndActionMove; - else if( m_nUserDragAction & DNDConstants::ACTION_LINK ) - aEvent.xclient.data.l[4]=m_nXdndActionLink; - else - aEvent.xclient.data.l[4]=m_nXdndActionCopy; - XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent ); - m_nNoPosX = m_nNoPosY = m_nNoPosWidth = m_nNoPosHeight = 0; - } -} - -// ------------------------------------------------------------------------ - -bool SelectionManager::handleDragEvent( XEvent& rMessage ) -{ - if( ! m_xDragSourceListener.is() ) - return false; - - ResettableMutexGuard aGuard(m_aMutex); - - bool bHandled = false; - - // for shortcut - ::std::hash_map< XLIB_Window, DropTargetEntry >::const_iterator it = - m_aDropTargets.find( m_aDropWindow ); -#if OSL_DEBUG_LEVEL > 1 - switch( rMessage.type ) - { - case ClientMessage: - fprintf( stderr, "handleDragEvent: %s\n", OUStringToOString( getString( rMessage.xclient.message_type ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); - break; - case MotionNotify: -// fprintf( stderr, "handleDragEvent: MotionNotify\n" ); - break; - case EnterNotify: - fprintf( stderr, "handleDragEvent: EnterNotify\n" ); - break; - case LeaveNotify: - fprintf( stderr, "handleDragEvent: LeaveNotify\n" ); - break; - case ButtonPress: - fprintf( stderr, "handleDragEvent: ButtonPress %d (m_nDragButton = %d)\n", rMessage.xbutton.button, m_nDragButton ); - break; - case ButtonRelease: - fprintf( stderr, "handleDragEvent: ButtonRelease %d (m_nDragButton = %d)\n", rMessage.xbutton.button, m_nDragButton ); - break; - case XLIB_KeyPress: - fprintf( stderr, "handleDragEvent: KeyPress\n" ); - break; - case KeyRelease: - fprintf( stderr, "handleDragEvent: KeyRelease\n" ); - break; - default: - fprintf( stderr, "handleDragEvent: \n", rMessage.type ); - break; - } -#endif - - // handle drag related events - if( rMessage.type == ClientMessage ) - { - if( Atom(rMessage.xclient.message_type) == m_nXdndStatus && Atom(rMessage.xclient.data.l[0]) == m_aDropWindow ) - { - bHandled = true; - DragSourceDragEvent dsde; - dsde.Source = static_cast< OWeakObject* >(this); - dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); - dsde.DragSource = static_cast< XDragSource* >( this ); - dsde.UserAction = getUserDragAction(); - dsde.DropAction = DNDConstants::ACTION_NONE; - m_bDropSuccess = rMessage.xclient.data.l[1] & 1 ? true : false; -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "status drop action: accept = %s, %s\n", - m_bDropSuccess ? "true" : "false", - OUStringToOString( getString( rMessage.xclient.data.l[4] ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); -#endif - if( rMessage.xclient.data.l[1] & 1 ) - { - if( m_nCurrentProtocolVersion > 1 ) - { - if( Atom(rMessage.xclient.data.l[4]) == m_nXdndActionCopy ) - dsde.DropAction = DNDConstants::ACTION_COPY; - else if( Atom(rMessage.xclient.data.l[4]) == m_nXdndActionMove ) - dsde.DropAction = DNDConstants::ACTION_MOVE; - else if( Atom(rMessage.xclient.data.l[4]) == m_nXdndActionLink ) - dsde.DropAction = DNDConstants::ACTION_LINK; - } - else - dsde.DropAction = DNDConstants::ACTION_COPY; - } - m_nTargetAcceptAction = dsde.DropAction; - - if( ! ( rMessage.xclient.data.l[1] & 2 ) ) - { - m_nNoPosX = rMessage.xclient.data.l[2] >> 16; - m_nNoPosY = rMessage.xclient.data.l[2] & 0xffff; - m_nNoPosWidth = rMessage.xclient.data.l[3] >> 16; - m_nNoPosHeight = rMessage.xclient.data.l[3] & 0xffff; - } - else - m_nNoPosX = m_nNoPosY = m_nNoPosWidth = m_nNoPosHeight = 0; - - setCursor( getDefaultCursor( dsde.DropAction ), m_aDropWindow, m_nDragTimestamp ); - aGuard.clear(); - m_xDragSourceListener->dragOver( dsde ); - } - else if( Atom(rMessage.xclient.message_type) == m_nXdndFinished && m_aDropWindow == Atom(rMessage.xclient.data.l[0]) ) - { - bHandled = true; - // notify the listener - DragSourceDropEvent dsde; - dsde.Source = static_cast< OWeakObject* >(this); - dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); - dsde.DragSource = static_cast< XDragSource* >(this); - dsde.DropAction = m_nTargetAcceptAction; - dsde.DropSuccess = m_bDropSuccess; - Reference< XDragSourceListener > xListener( m_xDragSourceListener ); - m_xDragSourceListener.clear(); - aGuard.clear(); - xListener->dragDropEnd( dsde ); - } - } - else if( rMessage.type == MotionNotify || - rMessage.type == EnterNotify || rMessage.type == LeaveNotify - ) - { - bHandled = true; - bool bForce = false; - int root_x = rMessage.type == MotionNotify ? rMessage.xmotion.x_root : rMessage.xcrossing.x_root; - int root_y = rMessage.type == MotionNotify ? rMessage.xmotion.y_root : rMessage.xcrossing.y_root; - XLIB_Window root = rMessage.type == MotionNotify ? rMessage.xmotion.root : rMessage.xcrossing.root; - m_nDragTimestamp = rMessage.type == MotionNotify ? rMessage.xmotion.time : rMessage.xcrossing.time; - - aGuard.clear(); - if( rMessage.type == MotionNotify ) - { - bForce = updateDragAction( rMessage.xmotion.state ); - } - updateDragWindow( root_x, root_y, root ); - aGuard.reset(); - - if( m_nCurrentProtocolVersion >= 0 && m_aDropProxy != None ) - { - aGuard.clear(); - sendDropPosition( bForce, rMessage.type == MotionNotify ? rMessage.xmotion.time : rMessage.xcrossing.time ); - } - } - else if( rMessage.type == XLIB_KeyPress || rMessage.type == KeyRelease ) - { - bHandled = true; - KeySym aKey = XKeycodeToKeysym( m_pDisplay, rMessage.xkey.keycode, 0 ); - if( aKey == XK_Escape ) - { - // abort drag - if( it != m_aDropTargets.end() ) - { - DropTargetEvent dte; - dte.Source = static_cast< OWeakObject* >( it->second.m_pTarget ); - aGuard.clear(); - it->second.m_pTarget->dragExit( dte ); - } - else if( m_aDropProxy != None && m_nCurrentProtocolVersion >= 0 ) - { - // send XdndLeave - XEvent aEvent; - aEvent.type = ClientMessage; - aEvent.xclient.display = m_pDisplay; - aEvent.xclient.format = 32; - aEvent.xclient.message_type = m_nXdndLeave; - aEvent.xclient.window = m_aDropWindow; - aEvent.xclient.data.l[0] = m_aWindow; - memset( aEvent.xclient.data.l+1, 0, sizeof(long)*4); - m_aDropWindow = m_aDropProxy = None; - XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent ); - } - // notify the listener - DragSourceDropEvent dsde; - dsde.Source = static_cast< OWeakObject* >(this); - dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); - dsde.DragSource = static_cast< XDragSource* >(this); - dsde.DropAction = DNDConstants::ACTION_NONE; - dsde.DropSuccess = sal_False; - Reference< XDragSourceListener > xListener( m_xDragSourceListener ); - m_xDragSourceListener.clear(); - aGuard.clear(); - xListener->dragDropEnd( dsde ); - } - else - { - /* - * man page says: state is state immediate PRIOR to the - * event. It would seem that this is a somewhat arguable - * design decision. - */ - int nState = rMessage.xkey.state; - int nNewState = 0; - switch( aKey ) - { - case XK_Shift_R: - case XK_Shift_L: nNewState = ShiftMask;break; - case XK_Control_R: - case XK_Control_L: nNewState = ControlMask;break; - // just interested in shift and ctrl for dnd - } - if( rMessage.type == XLIB_KeyPress ) - nState |= nNewState; - else - nState &= ~nNewState; - aGuard.clear(); - if( updateDragAction( nState ) ) - sendDropPosition( true, rMessage.xkey.time ); - } - } - else if( - ( rMessage.type == ButtonPress || rMessage.type == ButtonRelease ) && - rMessage.xbutton.button == m_nDragButton ) - { - bool bCancel = true; - if( m_aDropWindow != None ) - { - if( it != m_aDropTargets.end() ) - { - if( it->second.m_pTarget->m_bActive && m_nUserDragAction != DNDConstants::ACTION_NONE && m_bLastDropAccepted ) - { - bHandled = true; - int x, y; - XLIB_Window aChild; - XTranslateCoordinates( m_pDisplay, rMessage.xbutton.root, m_aDropWindow, rMessage.xbutton.x_root, rMessage.xbutton.y_root, &x, &y, &aChild ); - DropTargetDropEvent dtde; - dtde.Source = static_cast< OWeakObject* >(it->second.m_pTarget ); - dtde.Context = new DropTargetDropContext( m_aCurrentDropWindow, m_nDropTimestamp, *this ); - dtde.LocationX = x; - dtde.LocationY = y; - dtde.DropAction = m_nUserDragAction; - dtde.SourceActions = m_nSourceActions; - dtde.Transferable = m_xDragSourceTransferable; - m_bDropSent = true; - m_nDropTimeout = time( NULL ); - m_bDropWaitingForCompletion = true; - aGuard.clear(); - it->second->drop( dtde ); - bCancel = false; - } - else bCancel = true; - } - else if( m_nCurrentProtocolVersion >= 0 ) - { - bHandled = true; - - XEvent aEvent; - aEvent.type = ClientMessage; - aEvent.xclient.display = m_pDisplay; - aEvent.xclient.format = 32; - aEvent.xclient.message_type = m_nXdndDrop; - aEvent.xclient.window = m_aDropWindow; - aEvent.xclient.data.l[0] = m_aWindow; - aEvent.xclient.data.l[1] = 0; - aEvent.xclient.data.l[2] = rMessage.xbutton.time; - aEvent.xclient.data.l[3] = 0; - aEvent.xclient.data.l[4] = 0; - - m_bDropSent = true; - m_nDropTimeout = time( NULL ); - XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent ); - bCancel = false; - } - else - { - // dropping on non XdndWindows: acquire ownership of - // PRIMARY and send a middle mouse button click down/up to - // target window - SelectionAdaptor* pAdaptor = getAdaptor( XA_PRIMARY ); - if( pAdaptor ) - { - bHandled = true; - - XLIB_Window aDummy; - XEvent aEvent; - aEvent.type = ButtonPress; - aEvent.xbutton.display = m_pDisplay; - aEvent.xbutton.window = m_aDropWindow; - aEvent.xbutton.root = rMessage.xbutton.root; - aEvent.xbutton.subwindow = m_aDropWindow; - aEvent.xbutton.time = rMessage.xbutton.time+1; - aEvent.xbutton.x_root = rMessage.xbutton.x_root; - aEvent.xbutton.y_root = rMessage.xbutton.y_root; - aEvent.xbutton.state = rMessage.xbutton.state; - aEvent.xbutton.button = Button2; - aEvent.xbutton.same_screen = True; - XTranslateCoordinates( m_pDisplay, - rMessage.xbutton.root, m_aDropWindow, - rMessage.xbutton.x_root, rMessage.xbutton.y_root, - &aEvent.xbutton.x, &aEvent.xbutton.y, - &aDummy ); - XSendEvent( m_pDisplay, m_aDropWindow, False, ButtonPressMask, &aEvent ); - aEvent.xbutton.type = ButtonRelease; - aEvent.xbutton.time++; - aEvent.xbutton.state |= Button2Mask; - XSendEvent( m_pDisplay, m_aDropWindow, False, ButtonReleaseMask, &aEvent ); - - m_bDropSent = true; - m_nDropTimeout = time( NULL ); - XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent ); - m_bWaitingForPrimaryConversion = true; - m_bDropSent = true; - m_nDropTimeout = time( NULL ); - // HACK :-) - aGuard.clear(); - static_cast< X11Clipboard* >( pAdaptor )->setContents( m_xDragSourceTransferable, Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >() ); - aGuard.reset(); - bCancel = false; - } - } - } - if( bCancel ) - { - // cancel drag - DragSourceDropEvent dsde; - dsde.Source = static_cast< OWeakObject* >(this); - dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); - dsde.DragSource = static_cast< XDragSource* >(this); - dsde.DropAction = DNDConstants::ACTION_NONE; - dsde.DropSuccess = sal_False; - Reference< XDragSourceListener > xListener( m_xDragSourceListener ); - m_xDragSourceListener.clear(); - aGuard.clear(); - xListener->dragDropEnd( dsde ); - bHandled = true; - } - } - return bHandled; -} - -// ------------------------------------------------------------------------ - -void SelectionManager::accept( sal_Int8 dragOperation, XLIB_Window aDropWindow, XLIB_Time ) -{ - if( aDropWindow == m_aCurrentDropWindow ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "accept: %x\n", dragOperation ); -#endif - Atom nAction = None; - dragOperation &= (DNDConstants::ACTION_MOVE | DNDConstants::ACTION_COPY | DNDConstants::ACTION_LINK); - if( dragOperation & DNDConstants::ACTION_MOVE ) - nAction = m_nXdndActionMove; - else if( dragOperation & DNDConstants::ACTION_COPY ) - nAction = m_nXdndActionCopy; - else if( dragOperation & DNDConstants::ACTION_LINK ) - nAction = m_nXdndActionLink; - m_bLastDropAccepted = true; - sendDragStatus( nAction ); - } -} - -// ------------------------------------------------------------------------ - -void SelectionManager::reject( XLIB_Window aDropWindow, XLIB_Time ) -{ - if( aDropWindow == m_aCurrentDropWindow ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "reject\n" ); -#endif - m_bLastDropAccepted = false; - sendDragStatus( None ); - if( m_bDropSent && m_xDragSourceListener.is() ) - { - DragSourceDropEvent dsde; - dsde.Source = static_cast< OWeakObject* >(this); - dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); - dsde.DragSource = static_cast< XDragSource* >(this); - dsde.DropAction = DNDConstants::ACTION_NONE; - dsde.DropSuccess = sal_False; - m_xDragSourceListener->dragDropEnd( dsde ); - m_xDragSourceListener.clear(); - } - } -} - -/* - * XDragSource - */ - -sal_Bool SelectionManager::isDragImageSupported() throw() -{ - return sal_False; -} - -// ------------------------------------------------------------------------ - -sal_Int32 SelectionManager::getDefaultCursor( sal_Int8 dragAction ) throw() -{ - XLIB_Cursor aCursor = m_aNoneCursor; - if( dragAction & DNDConstants::ACTION_MOVE ) - aCursor = m_aMoveCursor; - else if( dragAction & DNDConstants::ACTION_COPY ) - aCursor = m_aCopyCursor; - else if( dragAction & DNDConstants::ACTION_LINK ) - aCursor = m_aLinkCursor; - return aCursor; -} - -// ------------------------------------------------------------------------ - -int SelectionManager::getXdndVersion( XLIB_Window aWindow, XLIB_Window& rProxy ) -{ - Atom* pProperties = NULL; - int nProperties = 0; - Atom nType; - int nFormat; - unsigned long nItems, nBytes; - unsigned char* pBytes = NULL; - - int nVersion = -1; - rProxy = None; - - /* - * XListProperties is used here to avoid unnecessary XGetWindowProperty calls - * and therefore reducing latency penalty - */ - pProperties = XListProperties( m_pDisplay, aWindow, &nProperties ); - // first look for proxy - int i; - for( i = 0; i < nProperties; i++ ) - { - if( pProperties[i] == m_nXdndProxy ) - { - XGetWindowProperty( m_pDisplay, aWindow, m_nXdndProxy, 0, 1, False, XA_WINDOW, - &nType, &nFormat, &nItems, &nBytes, &pBytes ); - if( pBytes ) - { - if( nType == XA_WINDOW ) - rProxy = *(XLIB_Window*)pBytes; - XFree( pBytes ); - pBytes = NULL; - if( rProxy != None ) - { - // now check proxy wether it points to itself - XGetWindowProperty( m_pDisplay, rProxy, m_nXdndProxy, 0, 1, False, XA_WINDOW, - &nType, &nFormat, &nItems, &nBytes, &pBytes ); - if( pBytes ) - { - if( nType == XA_WINDOW && *(XLIB_Window*)pBytes != rProxy ) - rProxy = None; - XFree( pBytes ); - pBytes = NULL; - } - else - rProxy = None; - } - } - break; - } - } - XLIB_Window aAwareWindow = rProxy != None ? rProxy : aWindow; - - XGetWindowProperty( m_pDisplay, aAwareWindow, m_nXdndAware, 0, 1, False, XA_ATOM, - &nType, &nFormat, &nItems, &nBytes, &pBytes ); - if( pBytes ) - { - if( nType == XA_ATOM ) - nVersion = *(Atom*)pBytes; - XFree( pBytes ); - } - - nVersion = nVersion > nXdndProtocolRevision ? nXdndProtocolRevision : nVersion; - - return nVersion; -} - -// ------------------------------------------------------------------------ - -void SelectionManager::updateDragWindow( int nX, int nY, XLIB_Window aRoot ) -{ - ResettableMutexGuard aGuard( m_aMutex ); - - Reference< XDragSourceListener > xListener( m_xDragSourceListener ); - - m_nLastDragX = nX; - m_nLastDragY = nY; - - XLIB_Window aParent = aRoot; - XLIB_Window aChild; - XLIB_Window aNewProxy = None, aNewCurrentWindow = None; - int nNewProtocolVersion = -1; - int nWinX, nWinY; - - // find the first XdndAware window or check if root window is - // XdndAware or has XdndProxy - do - { - XTranslateCoordinates( m_pDisplay, aRoot, aParent, nX, nY, &nWinX, &nWinY, &aChild ); - if( aChild != None ) - { - if( aChild == m_aCurrentDropWindow && aChild != aRoot && m_nCurrentProtocolVersion >= 0 ) - { - aParent = aChild; - break; - } - nNewProtocolVersion = getXdndVersion( aChild, aNewProxy ); - aParent = aChild; - } - } while( aChild != None && nNewProtocolVersion < 0 ); - - aNewCurrentWindow = aParent; - if( aNewCurrentWindow == aRoot ) - { - // no children, try root drop - nNewProtocolVersion = getXdndVersion( aNewCurrentWindow, aNewProxy ); - if( nNewProtocolVersion < 3 ) - { - aNewCurrentWindow = aNewProxy = None; - nNewProtocolVersion = nXdndProtocolRevision; - } - } - - - DragSourceDragEvent dsde; - dsde.Source = static_cast< OWeakObject* >(this); - dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); - dsde.DragSource = static_cast< XDragSource* >(this); - dsde.DropAction = nNewProtocolVersion >= 0 ? m_nUserDragAction : DNDConstants::ACTION_COPY; - dsde.UserAction = nNewProtocolVersion >= 0 ? m_nUserDragAction : DNDConstants::ACTION_COPY; - - ::std::hash_map< XLIB_Window, DropTargetEntry >::const_iterator it; - if( aNewCurrentWindow != m_aDropWindow ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "drag left window 0x%lx (rev. %d), entered window 0x%lx (rev %d)\n", m_aDropWindow, m_nCurrentProtocolVersion, aNewCurrentWindow, nNewProtocolVersion ); -#endif - - if( m_aDropWindow != None ) - { - it = m_aDropTargets.find( m_aDropWindow ); - if( it != m_aDropTargets.end() ) - // shortcut for own drop targets - { - DropTargetEvent dte; - dte.Source = static_cast< OWeakObject* >( it->second.m_pTarget ); - aGuard.clear(); - it->second.m_pTarget->dragExit( dte ); - aGuard.reset(); - } - else - { - // send old drop target a XdndLeave - XEvent aEvent; - aEvent.type = ClientMessage; - aEvent.xclient.display = m_pDisplay; - aEvent.xclient.format = 32; - aEvent.xclient.message_type = m_nXdndLeave; - aEvent.xclient.window = m_aDropWindow; - aEvent.xclient.data.l[0] = m_aWindow; - aEvent.xclient.data.l[1] = 0; - XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent ); - } - if( xListener.is() ) - { - aGuard.clear(); - xListener->dragExit( dsde ); - aGuard.reset(); - } - } - - m_nCurrentProtocolVersion = nNewProtocolVersion; - m_aDropWindow = aNewCurrentWindow; - m_aDropProxy = aNewProxy != None ? aNewProxy : m_aDropWindow; - - it = m_aDropTargets.find( m_aDropWindow ); - if( it != m_aDropTargets.end() && ! it->second.m_pTarget->m_bActive ) - m_aDropProxy = None; - - if( m_aDropProxy != None && xListener.is() ) - { - aGuard.clear(); - xListener->dragEnter( dsde ); - aGuard.reset(); - } - // send XdndEnter - if( m_aDropProxy != None && m_nCurrentProtocolVersion >= 0 ) - { - it = m_aDropTargets.find( m_aDropWindow ); - if( it != m_aDropTargets.end() ) - { - XTranslateCoordinates( m_pDisplay, aRoot, m_aDropWindow, nX, nY, &nWinX, &nWinY, &aChild ); - DropTargetDragEnterEvent dtde; - dtde.Source = static_cast< OWeakObject* >( it->second.m_pTarget ); - dtde.Context = new DropTargetDragContext( m_aCurrentDropWindow, m_nDropTimestamp, *this ); - dtde.LocationX = nWinX; - dtde.LocationY = nWinY; - dtde.DropAction = m_nUserDragAction; - dtde.SourceActions = m_nSourceActions; - dtde.SupportedDataFlavors = m_xDragSourceTransferable->getTransferDataFlavors(); - aGuard.clear(); - it->second.m_pTarget->dragEnter( dtde ); - aGuard.reset(); - } - else - { - XEvent aEvent; - aEvent.type = ClientMessage; - aEvent.xclient.display = m_pDisplay; - aEvent.xclient.format = 32; - aEvent.xclient.message_type = m_nXdndEnter; - aEvent.xclient.window = m_aDropWindow; - aEvent.xclient.data.l[0] = m_aWindow; - aEvent.xclient.data.l[1] = m_nCurrentProtocolVersion << 24; - memset( aEvent.xclient.data.l + 2, 0, sizeof( long )*3 ); - // fill in data types - ::std::list< Atom > aConversions; - getNativeTypeList( m_aDragFlavors, aConversions, m_nXdndSelection ); - if( aConversions.size() > 3 ) - aEvent.xclient.data.l[1] |= 1; - ::std::list< Atom >::const_iterator type_it = aConversions.begin(); - for( int i = 0; type_it != aConversions.end() && i < 3; i++, ++type_it ) - aEvent.xclient.data.l[i+2] = *type_it; - XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent ); - } - } - m_nNoPosX = m_nNoPosY = m_nNoPosWidth = m_nNoPosHeight = 0; - } - else if( m_aDropProxy != None && xListener.is() ) - { - aGuard.clear(); - // drag over for XdndAware windows comes when receiving XdndStatus - xListener->dragOver( dsde ); - } -} - -// ------------------------------------------------------------------------ - -void SelectionManager::startDrag( - const DragGestureEvent& trigger, - sal_Int8 sourceActions, - sal_Int32, - sal_Int32, - const Reference< XTransferable >& transferable, - const Reference< XDragSourceListener >& listener - ) throw() -{ -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "startDrag( sourceActions = %x )\n", (int)sourceActions ); -#endif - - DragSourceDropEvent aDragFailedEvent; - aDragFailedEvent.Source = static_cast< OWeakObject* >(this); - aDragFailedEvent.DragSource = static_cast< XDragSource* >(this); - aDragFailedEvent.DragSourceContext = new DragSourceContext( None, CurrentTime, *this ); - aDragFailedEvent.DropAction = DNDConstants::ACTION_NONE; - aDragFailedEvent.DropSuccess = sal_False; - - if( m_aDragRunning.check() ) - { - if( listener.is() ) - listener->dragDropEnd( aDragFailedEvent ); - -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "*** ERROR *** second drag and drop started.\n" ); - if( m_xDragSourceListener.is() ) - fprintf( stderr, "*** ERROR *** drag source listener already set.\n" ); - else - fprintf( stderr, "*** ERROR *** drag thread already running.\n" ); -#endif - return; - } - - SalFrame* pCaptureFrame = NULL; - - { - ClearableMutexGuard aGuard(m_aMutex); - - // first get the current pointer position and the window that - // the pointer is located in. since said window should be one - // of our DropTargets at the time of executeDrag we can use - // them for a start - XLIB_Window aRoot, aParent, aChild; - int root_x, root_y, win_x, win_y; - unsigned int mask; - - ::std::hash_map< XLIB_Window, DropTargetEntry >::const_iterator it; - it = m_aDropTargets.begin(); - while( it != m_aDropTargets.end() ) - { - if( XQueryPointer( m_pDisplay, it->second.m_aRootWindow, - &aRoot, &aParent, - &root_x, &root_y, - &win_x, &win_y, - &mask ) ) - { - aParent = it->second.m_aRootWindow; - break; - } - ++it; - } - - // don't start DnD if there is none of our windows on the same screen as - // the pointer or if no mouse button is pressed - if( it == m_aDropTargets.end() || (mask & (Button1Mask|Button2Mask|Button3Mask)) == 0 ) - { - aGuard.clear(); - if( listener.is() ) - listener->dragDropEnd( aDragFailedEvent ); - return; - } - - // try to find which of our drop targets is the drag source - // if that drop target is deregistered we should stop executing - // the drag (actually this is a poor substitute for an "endDrag" - // method ). - m_aDragSourceWindow = None; - aParent = aRoot = it->second.m_aRootWindow; - do - { - XTranslateCoordinates( m_pDisplay, aRoot, aParent, root_x, root_y, &win_x, &win_y, &aChild ); - if( aChild != None && m_aDropTargets.find( aChild ) != m_aDropTargets.end() ) - { - m_aDragSourceWindow = aChild; -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "found drag source window 0x%lx\n", m_aDragSourceWindow ); -#endif - break; - } - aParent = aChild; - } while( aChild != None ); - - -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "try to grab pointer ... " ); -#endif - int nPointerGrabSuccess = - XGrabPointer( m_pDisplay, it->second.m_aRootWindow, True, - DRAG_EVENT_MASK, - GrabModeAsync, GrabModeAsync, - None, - None, - CurrentTime ); - /* if we could not grab the pointer here, there is a chance - that the pointer is grabbed by the other vcl display (the main loop) - so let's break that grab an reset it later - - remark: this whole code should really be molten into normal vcl so only - one display is used .... - */ - if( nPointerGrabSuccess != GrabSuccess ) - { - vos::IMutex& rSolarMutex( Application::GetSolarMutex() ); - if( rSolarMutex.tryToAcquire() ) - { - pCaptureFrame = GetX11SalData()->GetDisplay()->GetCaptureFrame(); - if( pCaptureFrame ) - { - GetX11SalData()->GetDisplay()->CaptureMouse( NULL ); - nPointerGrabSuccess = - XGrabPointer( m_pDisplay, it->second.m_aRootWindow, True, - DRAG_EVENT_MASK, - GrabModeAsync, GrabModeAsync, - None, - None, - CurrentTime ); - } - } - } -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "%d\n", nPointerGrabSuccess ); -#endif -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "try to grab keyboard ... " ); -#endif - int nKeyboardGrabSuccess = - XGrabKeyboard( m_pDisplay, it->second.m_aRootWindow, True, - GrabModeAsync, GrabModeAsync, CurrentTime ); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "%d\n", nKeyboardGrabSuccess ); -#endif - if( nPointerGrabSuccess != GrabSuccess || nKeyboardGrabSuccess != GrabSuccess ) - { - if( nPointerGrabSuccess == GrabSuccess ) - XUngrabPointer( m_pDisplay, CurrentTime ); - if( nKeyboardGrabSuccess == GrabSuccess ) - XUngrabKeyboard( m_pDisplay, CurrentTime ); - XFlush( m_pDisplay ); - aGuard.clear(); - if( listener.is() ) - listener->dragDropEnd( aDragFailedEvent ); - if( pCaptureFrame ) - { - vos::IMutex& rSolarMutex( Application::GetSolarMutex() ); - if( rSolarMutex.tryToAcquire() ) - GetX11SalData()->GetDisplay()->CaptureMouse( pCaptureFrame ); -#if OSL_DEBUG_LEVEL > 0 - else - OSL_ENSURE( 0, "failed to acquire SolarMutex to reset capture frame" ); -#endif - } - return; - } - - m_xDragSourceTransferable = transferable; - m_xDragSourceListener = listener; - m_aDragFlavors = transferable->getTransferDataFlavors(); - m_aCurrentCursor = None; - - requestOwnership( m_nXdndSelection ); - - ::std::list< Atom > aConversions; - ::std::list< Atom >::const_iterator type_it; - getNativeTypeList( m_aDragFlavors, aConversions, m_nXdndSelection ); - - int nTypes = aConversions.size(); - Atom* pTypes = (Atom*)alloca( sizeof(Atom)*nTypes ); - type_it = aConversions.begin(); - for( int n = 0; n < nTypes; n++, ++type_it ) - pTypes[n] = *type_it; - - XChangeProperty( m_pDisplay, m_aWindow, m_nXdndTypeList, XA_ATOM, 32, PropModeReplace, (unsigned char*)pTypes, nTypes ); - - m_nSourceActions = sourceActions | DNDConstants::ACTION_DEFAULT; - m_nUserDragAction = DNDConstants::ACTION_MOVE & m_nSourceActions; - if( ! m_nUserDragAction ) - m_nUserDragAction = DNDConstants::ACTION_COPY & m_nSourceActions; - if( ! m_nUserDragAction ) - m_nUserDragAction = DNDConstants::ACTION_LINK & m_nSourceActions; - m_nTargetAcceptAction = DNDConstants::ACTION_DEFAULT; - m_bDropSent = false; - m_bDropSuccess = false; - m_bWaitingForPrimaryConversion = false; - m_nDragButton = Button1; // default to left button - com::sun::star::awt::MouseEvent aEvent; - if( trigger.Event >>= aEvent ) - { - if( aEvent.Buttons & MouseButton::LEFT ) - m_nDragButton = Button1; - else if( aEvent.Buttons & MouseButton::RIGHT ) - m_nDragButton = Button3; - else if( aEvent.Buttons & MouseButton::MIDDLE ) - m_nDragButton = Button2; - } -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "m_nUserDragAction = %x\n", (int)m_nUserDragAction ); -#endif - updateDragWindow( root_x, root_y, aRoot ); - m_nUserDragAction = ~0; - updateDragAction( mask ); - } - - m_aDragRunning.set(); - m_aDragExecuteThread = osl_createSuspendedThread( call_SelectionManager_runDragExecute, this ); - if( m_aDragExecuteThread ) - osl_resumeThread( m_aDragExecuteThread ); - else - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "osl_createSuspendedThread failed for drag execute\n" ); -#endif - m_xDragSourceListener.clear(); - m_xDragSourceTransferable.clear(); - - m_bDropSent = false; - m_bDropSuccess = false; - m_bWaitingForPrimaryConversion = false; - m_aDropWindow = None; - m_aDropProxy = None; - m_nCurrentProtocolVersion = nXdndProtocolRevision; - m_nNoPosX = 0; - m_nNoPosY = 0; - m_nNoPosWidth = 0; - m_nNoPosHeight = 0; - m_aCurrentCursor = None; - - XUngrabPointer( m_pDisplay, CurrentTime ); - XUngrabKeyboard( m_pDisplay, CurrentTime ); - XFlush( m_pDisplay ); - - if( pCaptureFrame ) - { - vos::IMutex& rSolarMutex( Application::GetSolarMutex() ); - if( rSolarMutex.tryToAcquire() ) - GetX11SalData()->GetDisplay()->CaptureMouse( pCaptureFrame ); -#if OSL_DEBUG_LEVEL > 0 - else - OSL_ENSURE( 0, "failed to acquire SolarMutex to reset capture frame" ); -#endif - } - - m_aDragRunning.reset(); - - if( listener.is() ) - listener->dragDropEnd( aDragFailedEvent ); - } -} - -void SelectionManager::runDragExecute( void* pThis ) -{ - SelectionManager* This = (SelectionManager*)pThis; - This->dragDoDispatch(); -} - -void SelectionManager::dragDoDispatch() -{ - - // do drag - // m_xDragSourceListener will be cleared on finished drop -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "begin executeDrag dispatching\n" ); -#endif - TimeValue aTVal; - aTVal.Seconds = 0; - aTVal.Nanosec = 200000000; - oslThread aThread = m_aDragExecuteThread; - while( m_xDragSourceListener.is() && ( ! m_bDropSent || time(NULL)-m_nDropTimeout < 5 ) && osl_scheduleThread( aThread ) ) - { - // let the thread in the run method do the dispatching - // just look occasionally here whether drop timed out or is completed - osl_waitThread( &aTVal ); - } -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "end executeDrag dispatching\n" ); -#endif - { - ClearableMutexGuard aGuard(m_aMutex); - - Reference< XDragSourceListener > xListener( m_xDragSourceListener ); - Reference< XTransferable > xTransferable( m_xDragSourceTransferable ); - m_xDragSourceListener.clear(); - m_xDragSourceTransferable.clear(); - - DragSourceDropEvent dsde; - dsde.Source = static_cast< OWeakObject* >(this); - dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); - dsde.DragSource = static_cast< XDragSource* >(this); - dsde.DropAction = DNDConstants::ACTION_NONE; - dsde.DropSuccess = sal_False; - - // cleanup after drag - if( m_bWaitingForPrimaryConversion ) - getAdaptor( XA_PRIMARY )->clearTransferable(); - - m_bDropSent = false; - m_bDropSuccess = false; - m_bWaitingForPrimaryConversion = false; - m_aDropWindow = None; - m_aDropProxy = None; - m_nCurrentProtocolVersion = nXdndProtocolRevision; - m_nNoPosX = 0; - m_nNoPosY = 0; - m_nNoPosWidth = 0; - m_nNoPosHeight = 0; - m_aCurrentCursor = None; - - XUngrabPointer( m_pDisplay, CurrentTime ); - XUngrabKeyboard( m_pDisplay, CurrentTime ); - XFlush( m_pDisplay ); - - m_aDragExecuteThread = NULL; - m_aDragRunning.reset(); - - aGuard.clear(); - if( xListener.is() ) - { - xTransferable.clear(); - xListener->dragDropEnd( dsde ); - } - } - osl_destroyThread( aThread ); -} - -/* - * XDragSourceContext - */ - -sal_Int32 SelectionManager::getCurrentCursor() -{ - return m_aCurrentCursor; -} - -// ------------------------------------------------------------------------ - -void SelectionManager::setCursor( sal_Int32 cursor, XLIB_Window aDropWindow, XLIB_Time ) -{ - MutexGuard aGuard( m_aMutex ); - if( aDropWindow == m_aDropWindow && XLIB_Cursor(cursor) != m_aCurrentCursor ) - { - if( m_xDragSourceListener.is() && ! m_bDropSent ) - { - m_aCurrentCursor = cursor; - XChangeActivePointerGrab( m_pDisplay, DRAG_EVENT_MASK, cursor, CurrentTime ); - XFlush( m_pDisplay ); - } - } -} - -// ------------------------------------------------------------------------ - -void SelectionManager::setImage( sal_Int32, XLIB_Window, XLIB_Time ) -{ -} - -// ------------------------------------------------------------------------ - -void SelectionManager::transferablesFlavorsChanged() -{ - MutexGuard aGuard(m_aMutex); - - m_aDragFlavors = m_xDragSourceTransferable->getTransferDataFlavors(); - int i; - - std::list< Atom > aConversions; - std::list< Atom >::const_iterator type_it; - - getNativeTypeList( m_aDragFlavors, aConversions, m_nXdndSelection ); - - int nTypes = aConversions.size(); - Atom* pTypes = (Atom*)alloca( sizeof(Atom)*aConversions.size() ); - for( i = 0, type_it = aConversions.begin(); type_it != aConversions.end(); ++type_it, i++ ) - pTypes[i] = *type_it; - XChangeProperty( m_pDisplay, m_aWindow, m_nXdndTypeList, XA_ATOM, 32, PropModeReplace, (unsigned char*)pTypes, nTypes ); - - if( m_aCurrentDropWindow != None && m_nCurrentProtocolVersion >= 0 ) - { - // send synthetic leave and enter events - - XEvent aEvent; - - aEvent.type = ClientMessage; - aEvent.xclient.display = m_pDisplay; - aEvent.xclient.format = 32; - aEvent.xclient.window = m_aDropWindow; - aEvent.xclient.data.l[0] = m_aWindow; - - aEvent.xclient.message_type = m_nXdndLeave; - aEvent.xclient.data.l[1] = 0; - XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent ); - - aEvent.xclient.message_type = m_nXdndEnter; - aEvent.xclient.data.l[1] = m_nCurrentProtocolVersion << 24; - memset( aEvent.xclient.data.l + 2, 0, sizeof( long )*3 ); - // fill in data types - if( nTypes > 3 ) - aEvent.xclient.data.l[1] |= 1; - for( int j = 0; j < nTypes && j < 3; j++ ) - aEvent.xclient.data.l[j+2] = pTypes[j]; - - XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent ); - } -} - -/* - * dispatch loop - */ - -// ------------------------------------------------------------------------ - -bool SelectionManager::handleXEvent( XEvent& rEvent ) -{ - /* - * since we are XConnectionListener to a second X display - * to get client messages it is essential not to dispatch - * events twice that we get on both connections - * - * #95201# between dispatching ButtonPress and startDrag - * the user can already have released the mouse. The ButtonRelease - * will then be dispatched in VCLs queue and never turn up here. - * Which is not so good, since startDrag will XGrabPointer and - * XGrabKeyboard -> solid lock. - */ - if( rEvent.xany.display != m_pDisplay - && rEvent.type != ClientMessage - && rEvent.type != ButtonPress - && rEvent.type != ButtonRelease - ) - return false; - - bool bHandled = false; - switch (rEvent.type) - { - case SelectionClear: - { - ClearableMutexGuard aGuard(m_aMutex); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "SelectionClear for selection %s\n", - OUStringToOString( getString( rEvent.xselectionclear.selection ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() - ); -#endif - SelectionAdaptor* pAdaptor = getAdaptor( rEvent.xselectionclear.selection ); - std::hash_map< Atom, Selection* >::iterator it( m_aSelections.find( rEvent.xselectionclear.selection ) ); - if( it != m_aSelections.end() ) - it->second->m_bOwner = false; - aGuard.clear(); - if ( pAdaptor ) - pAdaptor->clearTransferable(); - } - break; - - case SelectionRequest: - bHandled = handleSelectionRequest( rEvent.xselectionrequest ); - break; - case PropertyNotify: - if( rEvent.xproperty.window == m_aWindow || - rEvent.xproperty.window == m_aCurrentDropWindow - ) - bHandled = handleReceivePropertyNotify( rEvent.xproperty ); - else - bHandled = handleSendPropertyNotify( rEvent.xproperty ); - break; - case SelectionNotify: - bHandled = handleSelectionNotify( rEvent.xselection ); - break; - case ClientMessage: - // messages from drag target - if( rEvent.xclient.message_type == m_nXdndStatus || - rEvent.xclient.message_type == m_nXdndFinished ) - bHandled = handleDragEvent( rEvent ); - // messages from drag source - else if( - rEvent.xclient.message_type == m_nXdndEnter || - rEvent.xclient.message_type == m_nXdndLeave || - rEvent.xclient.message_type == m_nXdndPosition || - rEvent.xclient.message_type == m_nXdndDrop - ) - bHandled = handleDropEvent( rEvent.xclient ); - break; - case EnterNotify: - case LeaveNotify: - case MotionNotify: - case ButtonPress: - case ButtonRelease: - case XLIB_KeyPress: - case KeyRelease: - bHandled = handleDragEvent( rEvent ); - break; - default: - ; - } - return bHandled; -} - -// ------------------------------------------------------------------------ - -void SelectionManager::dispatchEvent( int millisec ) -{ - pollfd aPollFD; - XEvent event; - - // query socket handle to poll on - aPollFD.fd = ConnectionNumber( m_pDisplay ); - aPollFD.events = POLLIN; - aPollFD.revents = 0; - - // wait for activity (outside the xlib) - if( poll( &aPollFD, 1, millisec ) > 0 ) - { - // now acquire the mutex to prevent other threads - // from using the same X connection - ResettableMutexGuard aGuard(m_aMutex); - - // prevent that another thread already ate the input - // this can happen if e.g. another thread does - // an X request getting a response. the response - // would be removed from the queue and we would end up - // with an empty socket here - if( poll( &aPollFD, 1, 0 ) > 0 ) - { - int nPending = 1; - while( nPending ) - { - nPending = XPending( m_pDisplay ); - if( nPending ) - { - XNextEvent( m_pDisplay, &event ); - aGuard.clear(); - handleXEvent( event ); - aGuard.reset(); - } - } - } - } -} - -// ------------------------------------------------------------------------ - -void SelectionManager::run( void* pThis ) -{ -#if OSL_DEBUG_LEVEL > 1 - fprintf(stderr, "SelectionManager::run\n" ); -#endif - // dispatch until the cows come home - - SelectionManager* This = (SelectionManager*)pThis; - - timeval aLast; - gettimeofday( &aLast, 0 ); - - Reference< XMultiServiceFactory > xFact( ::comphelper::getProcessServiceFactory() ); - if( xFact.is() ) - { - Reference< XDesktop > xDesktop( xFact->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ), UNO_QUERY ); - if( xDesktop.is() ) - xDesktop->addTerminateListener(This); - } - - while( osl_scheduleThread(This->m_aThread) ) - { - This->dispatchEvent( 1000 ); - - timeval aNow; - gettimeofday( &aNow, 0 ); - - if( (aNow.tv_sec - aLast.tv_sec) > 0 ) - { - ClearableMutexGuard aGuard(This->m_aMutex); - std::list< std::pair< SelectionAdaptor*, Reference< XInterface > > > aChangeList; - - for( std::hash_map< Atom, Selection* >::iterator it = This->m_aSelections.begin(); it != This->m_aSelections.end(); ++it ) - { - if( it->first != This->m_nXdndSelection && ! it->second->m_bOwner ) - { - XLIB_Window aOwner = XGetSelectionOwner( This->m_pDisplay, it->first ); - if( aOwner != it->second->m_aLastOwner ) - { - it->second->m_aLastOwner = aOwner; - std::pair< SelectionAdaptor*, Reference< XInterface > > - aKeep( it->second->m_pAdaptor, it->second->m_pAdaptor->getReference() ); - aChangeList.push_back( aKeep ); - } - } - } - aGuard.clear(); - while( aChangeList.begin() != aChangeList.end() ) - { - aChangeList.front().first->fireContentsChanged(); - aChangeList.pop_front(); - } - aLast = aNow; - } - } -#if OSL_DEBUG_LEVEL > 1 - fprintf(stderr, "SelectionManager::run end\n" ); -#endif -} - -void SelectionManager::shutdown() throw() -{ - ResettableMutexGuard aGuard(m_aMutex); - // stop dispatching - if( m_aThread ) - { - osl_terminateThread( m_aThread ); - /* - * Allow thread to finish before app exits to avoid pulling the carpet - * out from under it if pasting is occuring during shutdown - * - * a) allow it to have the Mutex and - * b) reschedule to allow it to complete callbacks to any - * Application::GetSolarMutex protected regions, etc. e.g. - * TransferableHelper::getTransferDataFlavors (via - * SelectionManager::handleSelectionRequest) which it might - * currently be trying to enter. - * - * Otherwise the thread may be left still waiting on a GlobalMutex - * when that gets destroyed, letting the thread blow up and die - * when enters the section in a now dead OOo instance. - */ - aGuard.clear(); - while (osl_isThreadRunning(m_aThread)) - { - vos::OGuard guard2(Application::GetSolarMutex()); - Application::Reschedule(); - } - osl_joinWithThread( m_aThread ); - osl_destroyThread( m_aThread ); - m_aThread = NULL; - aGuard.reset(); - } - m_xDisplayConnection->removeEventHandler( Any(), this ); - m_xDisplayConnection.clear(); -} - -// ------------------------------------------------------------------------ - -sal_Bool SelectionManager::handleEvent( const Any& event ) throw() -{ - Sequence< sal_Int8 > aSeq; - if( (event >>= aSeq) ) - { - XEvent* pEvent = (XEvent*)aSeq.getArray(); - XLIB_Time nTimestamp = CurrentTime; - if( pEvent->type == ButtonPress || pEvent->type == ButtonRelease ) - nTimestamp = pEvent->xbutton.time; - else if( pEvent->type == XLIB_KeyPress || pEvent->type == KeyRelease ) - nTimestamp = pEvent->xkey.time; - else if( pEvent->type == MotionNotify ) - nTimestamp = pEvent->xmotion.time; - else if( pEvent->type == PropertyNotify ) - nTimestamp = pEvent->xproperty.time; - - if( nTimestamp != CurrentTime ) - { - MutexGuard aGuard(m_aMutex); - - m_nSelectionTimestamp = nTimestamp; - } - - return sal_Bool( handleXEvent( *pEvent ) ); - } - else - { - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "SelectionManager got downing event\n" ); - #endif - shutdown(); - } - return sal_True; -} - -void SAL_CALL SelectionManager::disposing( const ::com::sun::star::lang::EventObject& ) - throw( ::com::sun::star::uno::RuntimeException ) -{ -} - -void SAL_CALL SelectionManager::queryTermination( const ::com::sun::star::lang::EventObject& ) - throw( ::com::sun::star::frame::TerminationVetoException, ::com::sun::star::uno::RuntimeException ) -{ -} - -/* - * To be safe, shutdown needs to be called before the ~SfxApplication is called, waiting until - * the downing event can be too late if paste are requested during shutdown and ~SfxApplication - * has been called before vcl is shutdown - */ -void SAL_CALL SelectionManager::notifyTermination( const ::com::sun::star::lang::EventObject& rEvent ) - throw( ::com::sun::star::uno::RuntimeException ) -{ - Reference< XDesktop > xDesktop( rEvent.Source, UNO_QUERY ); - if( xDesktop.is() == sal_True ) - xDesktop->removeTerminateListener( this ); - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "SelectionManager got app termination event\n" ); - #endif - shutdown(); -} - -// ------------------------------------------------------------------------ - -void SelectionManager::registerHandler( Atom selection, SelectionAdaptor& rAdaptor ) -{ - MutexGuard aGuard(m_aMutex); - - Selection* pNewSelection = new Selection(); - pNewSelection->m_pAdaptor = &rAdaptor; - pNewSelection->m_aAtom = selection; - m_aSelections[ selection ] = pNewSelection; -} - -// ------------------------------------------------------------------------ - -void SelectionManager::deregisterHandler( Atom selection ) -{ - MutexGuard aGuard(m_aMutex); - - ::std::hash_map< Atom, Selection* >::iterator it = - m_aSelections.find( selection ); - if( it != m_aSelections.end() ) - { - delete it->second->m_pPixmap; - delete it->second; - m_aSelections.erase( it ); - } -} - -// ------------------------------------------------------------------------ - -static bool bWasError = false; - -extern "C" -{ - int local_xerror_handler(Display* , XErrorEvent*) - { - bWasError = true; - return 0; - } - typedef int(*xerror_hdl_t)(Display*,XErrorEvent*); -} - -void SelectionManager::registerDropTarget( XLIB_Window aWindow, DropTarget* pTarget ) -{ - MutexGuard aGuard(m_aMutex); - - // sanity check - ::std::hash_map< XLIB_Window, DropTargetEntry >::const_iterator it = - m_aDropTargets.find( aWindow ); - if( it != m_aDropTargets.end() ) - OSL_ASSERT( "attempt to register window as drop target twice" ); - else if( aWindow && m_pDisplay ) - { - DropTargetEntry aEntry( pTarget ); - bWasError=false; - /* #i100000# ugly workaround: gtk sets its own XErrorHandler which is not suitable for us - unfortunately XErrorHandler is not per display, so this is just and ugly hack - Need to remove separate display and integrate clipboard/dnd into vcl's unx code ASAP - */ - xerror_hdl_t pOldHandler = XSetErrorHandler( local_xerror_handler ); - XSelectInput( m_pDisplay, aWindow, PropertyChangeMask ); - if( ! bWasError ) - { - // set XdndAware - XChangeProperty( m_pDisplay, aWindow, m_nXdndAware, XA_ATOM, 32, PropModeReplace, (unsigned char*)&nXdndProtocolRevision, 1 ); - if( ! bWasError ) - { - // get root window of window (in 99.999% of all cases this will be - // DefaultRootWindow( m_pDisplay ) - int x, y; - unsigned int w, h, bw, d; - XGetGeometry( m_pDisplay, aWindow, &aEntry.m_aRootWindow, - &x, &y, &w, &h, &bw, &d ); - } - } - XSetErrorHandler( pOldHandler ); - if(bWasError) - return; - m_aDropTargets[ aWindow ] = aEntry; - } - else - OSL_ASSERT( "attempt to register None as drop target" ); -} - -// ------------------------------------------------------------------------ - -void SelectionManager::deregisterDropTarget( XLIB_Window aWindow ) -{ - ClearableMutexGuard aGuard(m_aMutex); - - m_aDropTargets.erase( aWindow ); - if( aWindow == m_aDragSourceWindow && m_aDragRunning.check() ) - { - // abort drag - std::hash_map< XLIB_Window, DropTargetEntry >::const_iterator it = - m_aDropTargets.find( m_aDropWindow ); - if( it != m_aDropTargets.end() ) - { - DropTargetEvent dte; - dte.Source = static_cast< OWeakObject* >( it->second.m_pTarget ); - aGuard.clear(); - it->second.m_pTarget->dragExit( dte ); - } - else if( m_aDropProxy != None && m_nCurrentProtocolVersion >= 0 ) - { - // send XdndLeave - XEvent aEvent; - aEvent.type = ClientMessage; - aEvent.xclient.display = m_pDisplay; - aEvent.xclient.format = 32; - aEvent.xclient.message_type = m_nXdndLeave; - aEvent.xclient.window = m_aDropWindow; - aEvent.xclient.data.l[0] = m_aWindow; - memset( aEvent.xclient.data.l+1, 0, sizeof(long)*4); - m_aDropWindow = m_aDropProxy = None; - XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent ); - } - // notify the listener - DragSourceDropEvent dsde; - dsde.Source = static_cast< OWeakObject* >(this); - dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this ); - dsde.DragSource = static_cast< XDragSource* >(this); - dsde.DropAction = DNDConstants::ACTION_NONE; - dsde.DropSuccess = sal_False; - Reference< XDragSourceListener > xListener( m_xDragSourceListener ); - m_xDragSourceListener.clear(); - aGuard.clear(); - xListener->dragDropEnd( dsde ); - } -} - -/* - * SelectionAdaptor - */ - -Reference< XTransferable > SelectionManager::getTransferable() throw() -{ - return m_xDragSourceTransferable; -} - -// ------------------------------------------------------------------------ - -void SelectionManager::clearTransferable() throw() -{ - m_xDragSourceTransferable.clear(); -} - -// ------------------------------------------------------------------------ - -void SelectionManager::fireContentsChanged() throw() -{ -} - -// ------------------------------------------------------------------------ - -Reference< XInterface > SelectionManager::getReference() throw() -{ - return Reference< XInterface >( static_cast(this) ); -} - -// ------------------------------------------------------------------------ - -/* - * SelectionManagerHolder - */ - -SelectionManagerHolder::SelectionManagerHolder() : - ::cppu::WeakComponentImplHelper3< - XDragSource, - XInitialization, - XServiceInfo > (m_aMutex) -{ -} - -// ------------------------------------------------------------------------ - -SelectionManagerHolder::~SelectionManagerHolder() -{ -} - -// ------------------------------------------------------------------------ - -void SelectionManagerHolder::initialize( const Sequence< Any >& arguments ) throw( ::com::sun::star::uno::Exception ) -{ - OUString aDisplayName; - - if( arguments.getLength() > 0 ) - { - Reference< XDisplayConnection > xConn; - arguments.getConstArray()[0] >>= xConn; - if( xConn.is() ) - { - Any aIdentifier; - aIdentifier >>= aDisplayName; - } - } - - SelectionManager& rManager = SelectionManager::get( aDisplayName ); - rManager.initialize( arguments ); - m_xRealDragSource = static_cast< XDragSource* >(&rManager); -} - -/* - * XDragSource - */ - -sal_Bool SelectionManagerHolder::isDragImageSupported() throw() -{ - return m_xRealDragSource.is() ? m_xRealDragSource->isDragImageSupported() : sal_False; -} - -// ------------------------------------------------------------------------ - -sal_Int32 SelectionManagerHolder::getDefaultCursor( sal_Int8 dragAction ) throw() -{ - return m_xRealDragSource.is() ? m_xRealDragSource->getDefaultCursor( dragAction ) : 0; -} - -// ------------------------------------------------------------------------ - -void SelectionManagerHolder::startDrag( - const ::com::sun::star::datatransfer::dnd::DragGestureEvent& trigger, - sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image, - const Reference< ::com::sun::star::datatransfer::XTransferable >& transferable, - const Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener - ) throw() -{ - if( m_xRealDragSource.is() ) - m_xRealDragSource->startDrag( trigger, sourceActions, cursor, image, transferable, listener ); -} - -// ------------------------------------------------------------------------ - -/* - * XServiceInfo - */ - -// ------------------------------------------------------------------------ - -OUString SelectionManagerHolder::getImplementationName() throw() -{ - return OUString::createFromAscii(XDND_IMPLEMENTATION_NAME); -} - -// ------------------------------------------------------------------------ - -sal_Bool SelectionManagerHolder::supportsService( const OUString& ServiceName ) throw() -{ - Sequence < OUString > SupportedServicesNames = Xdnd_getSupportedServiceNames(); - - for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; ) - if (SupportedServicesNames[n].compareTo(ServiceName) == 0) - return sal_True; - - return sal_False; -} - -// ------------------------------------------------------------------------ - -Sequence< OUString > SelectionManagerHolder::getSupportedServiceNames() throw() -{ - return Xdnd_getSupportedServiceNames(); -} - - -// ------------------------------------------------------------------------ - diff --git a/vcl/unx/source/dtrans/X11_selection.hxx b/vcl/unx/source/dtrans/X11_selection.hxx deleted file mode 100644 index 47baa1776d1a..000000000000 --- a/vcl/unx/source/dtrans/X11_selection.hxx +++ /dev/null @@ -1,531 +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 _DTRANS_X11_SELECTION_HXX_ -#define _DTRANS_X11_SELECTION_HXX_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _OSL_CONDITION_HXX_ -#include -#endif - -#include -#include - -#include "tools/prex.h" -#include -#include "tools/postx.h" - -#define XDND_IMPLEMENTATION_NAME "com.sun.star.datatransfer.dnd.XdndSupport" -#define XDND_DROPTARGET_IMPLEMENTATION_NAME "com.sun.star.datatransfer.dnd.XdndDropTarget" - -using namespace ::com::sun::star::uno; - -namespace x11 { - - class PixmapHolder; // in bmp.hxx - -// ------------------------------------------------------------------------ - rtl_TextEncoding getTextPlainEncoding( const ::rtl::OUString& rMimeType ); - - class SelectionAdaptor - { - public: - virtual Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable() = 0; - virtual void clearTransferable() = 0; - virtual void fireContentsChanged() = 0; - virtual Reference< XInterface > getReference() = 0; - // returns a reference that will keep the SelectionAdaptor alive until the - // refernce is released - }; - - class DropTarget : - public ::cppu::WeakComponentImplHelper3< - ::com::sun::star::datatransfer::dnd::XDropTarget, - ::com::sun::star::lang::XInitialization, - ::com::sun::star::lang::XServiceInfo - > - { - public: - ::osl::Mutex m_aMutex; - bool m_bActive; - sal_Int8 m_nDefaultActions; - XLIB_Window m_aTargetWindow; - class SelectionManager* m_pSelectionManager; - Reference< ::com::sun::star::datatransfer::dnd::XDragSource > - m_xSelectionManager; - ::std::list< Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener > > - m_aListeners; - - DropTarget(); - virtual ~DropTarget(); - - // convenience functions that loop over listeners - void dragEnter( const ::com::sun::star::datatransfer::dnd::DropTargetDragEnterEvent& dtde ) throw(); - void dragExit( const ::com::sun::star::datatransfer::dnd::DropTargetEvent& dte ) throw(); - void dragOver( const ::com::sun::star::datatransfer::dnd::DropTargetDragEvent& dtde ) throw(); - void drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent& dtde ) throw(); - - // XInitialization - virtual void SAL_CALL initialize( const Sequence< Any >& args ) throw ( ::com::sun::star::uno::Exception ); - - // XDropTarget - virtual void SAL_CALL addDropTargetListener( const Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw(); - virtual void SAL_CALL removeDropTargetListener( const Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw(); - virtual sal_Bool SAL_CALL isActive() throw(); - virtual void SAL_CALL setActive( sal_Bool active ) throw(); - virtual sal_Int8 SAL_CALL getDefaultActions() throw(); - virtual void SAL_CALL setDefaultActions( sal_Int8 actions ) throw(); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName() throw(); - virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > - SAL_CALL getSupportedServiceNames() throw(); - }; - - class SelectionManagerHolder : - public ::cppu::WeakComponentImplHelper3< - ::com::sun::star::datatransfer::dnd::XDragSource, - ::com::sun::star::lang::XInitialization, - ::com::sun::star::lang::XServiceInfo - > - { - ::osl::Mutex m_aMutex; - Reference< ::com::sun::star::datatransfer::dnd::XDragSource > - m_xRealDragSource; - public: - SelectionManagerHolder(); - virtual ~SelectionManagerHolder(); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName() throw(); - virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > - SAL_CALL getSupportedServiceNames() throw(); - - // XInitialization - virtual void SAL_CALL initialize( const Sequence< Any >& arguments ) throw( ::com::sun::star::uno::Exception ); - - // XDragSource - virtual sal_Bool SAL_CALL isDragImageSupported() throw(); - virtual sal_Int32 SAL_CALL getDefaultCursor( sal_Int8 dragAction ) throw(); - virtual void SAL_CALL startDrag( - const ::com::sun::star::datatransfer::dnd::DragGestureEvent& trigger, - sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image, - const Reference< ::com::sun::star::datatransfer::XTransferable >& transferable, - const Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener - ) throw(); - - }; - - - class SelectionManager : - public ::cppu::WeakImplHelper4< - ::com::sun::star::datatransfer::dnd::XDragSource, - ::com::sun::star::lang::XInitialization, - ::com::sun::star::awt::XEventHandler, - ::com::sun::star::frame::XTerminateListener - >, - public SelectionAdaptor - { - static ::std::hash_map< ::rtl::OUString, SelectionManager*, ::rtl::OUStringHash >& getInstances(); - - // for INCR type selection transfer - // INCR protocol is used if the data cannot - // be transported at once but in parts - // IncrementalTransfer holds the bytes to be transmitted - // as well a the current position - // INCR triggers the delivery of the next part by deleting the - // property used to transfer the data - struct IncrementalTransfer - { - Sequence< sal_Int8 > m_aData; - int m_nBufferPos; - XLIB_Window m_aRequestor; - Atom m_aProperty; - Atom m_aTarget; - int m_nFormat; - int m_nTransferStartTime; - }; - int m_nIncrementalThreshold; - - // a struct to hold the data associated with a selection - struct Selection - { - enum State - { - Inactive, WaitingForResponse, WaitingForData, IncrementalTransfer - }; - - State m_eState; - SelectionAdaptor* m_pAdaptor; - Atom m_aAtom; - ::osl::Condition m_aDataArrived; - Sequence< sal_Int8 > m_aData; - Sequence< ::com::sun::star::datatransfer::DataFlavor > - m_aTypes; - std::vector< Atom > m_aNativeTypes; - // this is used for caching - // m_aTypes is invalid after 2 seconds - // m_aNativeTypes contains the corresponding original atom - Atom m_aRequestedType; - // m_aRequestedType is only valid while WaitingForResponse and WaitingFotData - int m_nLastTimestamp; - bool m_bHaveUTF16; - Atom m_aUTF8Type; - bool m_bHaveCompound; - bool m_bOwner; - XLIB_Window m_aLastOwner; - PixmapHolder* m_pPixmap; - // m_nOrigXLIB_Timestamp contains the XLIB_Timestamp at which the seclection - // was acquired; needed for XLIB_TimeSTAMP target - XLIB_Time m_nOrigTimestamp; - - Selection() : m_eState( Inactive ), - m_pAdaptor( NULL ), - m_aAtom( None ), - m_aRequestedType( None ), - m_nLastTimestamp( 0 ), - m_bHaveUTF16( false ), - m_aUTF8Type( None ), - m_bHaveCompound( false ), - m_bOwner( false ), - m_aLastOwner( None ), - m_pPixmap( NULL ), - m_nOrigTimestamp( CurrentTime ) - {} - }; - - // a struct to hold data associated with a XDropTarget - struct DropTargetEntry - { - DropTarget* m_pTarget; - XLIB_Window m_aRootWindow; - - DropTargetEntry() : m_pTarget( NULL ), m_aRootWindow( None ) {} - DropTargetEntry( DropTarget* pTarget ) : - m_pTarget( pTarget ), - m_aRootWindow( None ) - {} - DropTargetEntry( const DropTargetEntry& rEntry ) : - m_pTarget( rEntry.m_pTarget ), - m_aRootWindow( rEntry.m_aRootWindow ) - {} - ~DropTargetEntry() {} - - DropTarget* operator->() const { return m_pTarget; } - DropTargetEntry& operator=(const DropTargetEntry& rEntry) - { m_pTarget = rEntry.m_pTarget; m_aRootWindow = rEntry.m_aRootWindow; return *this; } - }; - - // internal data - Display* m_pDisplay; - oslThread m_aThread; - oslThread m_aDragExecuteThread; - ::osl::Condition m_aDragRunning; - XLIB_Window m_aWindow; - Reference< ::com::sun::star::awt::XDisplayConnection > - m_xDisplayConnection; - Reference< com::sun::star::script::XInvocation > - m_xBitmapConverter; - sal_Int32 m_nSelectionTimeout; - XLIB_Time m_nSelectionTimestamp; - - - // members used for Xdnd - - // drop only - - // contains the XdndEnterEvent of a drop action running - // with one of our targets. The data.l[0] member - // (conatining the drag source XLIB_Window) is set - // to None while that is not the case - XClientMessageEvent m_aDropEnterEvent; - // set to false on XdndEnter - // set to true on first XdndPosition or XdndLeave - bool m_bDropEnterSent; - XLIB_Window m_aCurrentDropWindow; - // XLIB_Time code of XdndDrop - XLIB_Time m_nDropTime; - sal_Int8 m_nLastDropAction; - // XTransferable for Xdnd with foreign drag source - Reference< ::com::sun::star::datatransfer::XTransferable > - m_xDropTransferable; - int m_nLastX, m_nLastY; - XLIB_Time m_nDropTimestamp; - // set to true when calling drop() - // if another XdndEnter is received this shows that - // someone forgot to call dropComplete - we should reset - // and react to the new drop - bool m_bDropWaitingForCompletion; - - // drag only - - // None if no Dnd action is running with us as source - XLIB_Window m_aDropWindow; - // either m_aDropXLIB_Window or its XdndProxy - XLIB_Window m_aDropProxy; - XLIB_Window m_aDragSourceWindow; - // XTransferable for Xdnd when we are drag source - Reference< ::com::sun::star::datatransfer::XTransferable > - m_xDragSourceTransferable; - Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener > - m_xDragSourceListener; - // root coordinates - int m_nLastDragX, m_nLastDragY; - Sequence< ::com::sun::star::datatransfer::DataFlavor > - m_aDragFlavors; - // the rectangle the pointer must leave until a new XdndPosition should - // be sent. empty unless the drop target told to fill - int m_nNoPosX, m_nNoPosY, m_nNoPosWidth, m_nNoPosHeight; - unsigned int m_nDragButton; - sal_Int8 m_nUserDragAction; - sal_Int8 m_nTargetAcceptAction; - sal_Int8 m_nSourceActions; - bool m_bLastDropAccepted; - bool m_bDropSuccess; - bool m_bDropSent; - time_t m_nDropTimeout; - bool m_bWaitingForPrimaryConversion; - XLIB_Time m_nDragTimestamp; - - // drag cursors - XLIB_Cursor m_aMoveCursor; - XLIB_Cursor m_aCopyCursor; - XLIB_Cursor m_aLinkCursor; - XLIB_Cursor m_aNoneCursor; - XLIB_Cursor m_aCurrentCursor; - - - // drag and drop - - int m_nCurrentProtocolVersion; - ::std::hash_map< XLIB_Window, DropTargetEntry > - m_aDropTargets; - - - // some special atoms that are needed often - Atom m_nCLIPBOARDAtom; - Atom m_nTARGETSAtom; - Atom m_nTIMESTAMPAtom; - Atom m_nTEXTAtom; - Atom m_nINCRAtom; - Atom m_nCOMPOUNDAtom; - Atom m_nMULTIPLEAtom; - Atom m_nUTF16Atom; - Atom m_nImageBmpAtom; - Atom m_nXdndAware; - Atom m_nXdndEnter; - Atom m_nXdndLeave; - Atom m_nXdndPosition; - Atom m_nXdndStatus; - Atom m_nXdndDrop; - Atom m_nXdndFinished; - Atom m_nXdndSelection; - Atom m_nXdndTypeList; - Atom m_nXdndProxy; - Atom m_nXdndActionCopy; - Atom m_nXdndActionMove; - Atom m_nXdndActionLink; - Atom m_nXdndActionAsk; - Atom m_nXdndActionPrivate; - - // caching for atoms - ::std::hash_map< Atom, ::rtl::OUString > - m_aAtomToString; - ::std::hash_map< ::rtl::OUString, Atom, ::rtl::OUStringHash > - m_aStringToAtom; - - // the registered selections - ::std::hash_map< Atom, Selection* > - m_aSelections; - // IncrementalTransfers in progress - std::hash_map< XLIB_Window, std::hash_map< Atom, IncrementalTransfer > > - m_aIncrementals; - - // do not use X11 multithreading capabilities - // since this leads to deadlocks in different Xlib implentations - // (XFree as well as Xsun) use an own mutex instead - ::osl::Mutex m_aMutex; - - SelectionManager(); - ~SelectionManager(); - - SelectionAdaptor* getAdaptor( Atom selection ); - PixmapHolder* getPixmapHolder( Atom selection ); - - // handle various events - bool handleSelectionRequest( XSelectionRequestEvent& rRequest ); - bool handleSendPropertyNotify( XPropertyEvent& rNotify ); - bool handleReceivePropertyNotify( XPropertyEvent& rNotify ); - bool handleSelectionNotify( XSelectionEvent& rNotify ); - bool handleDragEvent( XEvent& rMessage ); - bool handleDropEvent( XClientMessageEvent& rMessage ); - - // dnd helpers - void sendDragStatus( Atom nDropAction ); - void sendDropPosition( bool bForce, XLIB_Time eventXLIB_Time ); - bool updateDragAction( int modifierState ); - int getXdndVersion( XLIB_Window aXLIB_Window, XLIB_Window& rProxy ); - XLIB_Cursor createCursor( const char* pPointerData, const char* pMaskData, int width, int height, int hotX, int hotY ); - // coordinates on root XLIB_Window - void updateDragWindow( int nX, int nY, XLIB_Window aRoot ); - - bool getPasteData( Atom selection, Atom type, Sequence< sal_Int8 >& rData ); - // returns true if conversion was successful - bool convertData( const Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable, - Atom nType, - Atom nSelection, - int & rFormat, - Sequence< sal_Int8 >& rData ); - bool sendData( SelectionAdaptor* pAdaptor, XLIB_Window requestor, Atom target, Atom property, Atom selection ); - - // thread dispatch loop - public: - // public for extern "C" stub - static void run( void* ); - private: - void dispatchEvent( int millisec ); - // drag thread dispatch - public: - // public for extern "C" stub - static void runDragExecute( void* ); - private: - void dragDoDispatch(); - bool handleXEvent( XEvent& rEvent ); - - // compound text conversion - ::rtl::OString convertToCompound( const ::rtl::OUString& rText ); - ::rtl::OUString convertFromCompound( const char* pText, int nLen = -1 ); - - sal_Int8 getUserDragAction() const; - sal_Int32 getSelectionTimeout(); - public: - static SelectionManager& get( const ::rtl::OUString& rDisplayName = ::rtl::OUString() ); - - Display * getDisplay() { return m_pDisplay; }; - XLIB_Window getWindow() { return m_aWindow; }; - - - void registerHandler( Atom selection, SelectionAdaptor& rAdaptor ); - void deregisterHandler( Atom selection ); - bool requestOwnership( Atom selection ); - - // allow for synchronization over one mutex for XClipboard - osl::Mutex& getMutex() { return m_aMutex; } - - - Atom getAtom( const ::rtl::OUString& rString ); - const ::rtl::OUString& getString( Atom nAtom ); - - // type conversion - // note: convertTypeToNative does NOT clear the list, so you can append - // multiple types to the same list - void convertTypeToNative( const ::rtl::OUString& rType, Atom selection, int& rFormat, ::std::list< Atom >& rConversions, bool bPushFront = false ); - ::rtl::OUString convertTypeFromNative( Atom nType, Atom selection, int& rFormat ); - void getNativeTypeList( const Sequence< com::sun::star::datatransfer::DataFlavor >& rTypes, std::list< Atom >& rOutTypeList, Atom targetselection ); - - // methods for transferable - bool getPasteDataTypes( Atom selection, Sequence< ::com::sun::star::datatransfer::DataFlavor >& rTypes ); - bool getPasteData( Atom selection, const ::rtl::OUString& rType, Sequence< sal_Int8 >& rData ); - - // for XDropTarget to register/deregister itself - void registerDropTarget( XLIB_Window aXLIB_Window, DropTarget* pTarget ); - void deregisterDropTarget( XLIB_Window aXLIB_Window ); - - // for XDropTarget{Drag|Drop}Context - void accept( sal_Int8 dragOperation, XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); - void reject( XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); - void dropComplete( sal_Bool success, XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); - - // for XDragSourceContext - sal_Int32 getCurrentCursor(); - void setCursor( sal_Int32 cursor, XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); - void setImage( sal_Int32 image, XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); - void transferablesFlavorsChanged(); - - void shutdown() throw(); - - // XInitialization - virtual void SAL_CALL initialize( const Sequence< Any >& arguments ) throw( ::com::sun::star::uno::Exception ); - - // XEventHandler - virtual sal_Bool SAL_CALL handleEvent( const Any& event ) throw(); - - // XDragSource - virtual sal_Bool SAL_CALL isDragImageSupported() throw(); - virtual sal_Int32 SAL_CALL getDefaultCursor( sal_Int8 dragAction ) throw(); - virtual void SAL_CALL startDrag( - const ::com::sun::star::datatransfer::dnd::DragGestureEvent& trigger, - sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image, - const Reference< ::com::sun::star::datatransfer::XTransferable >& transferable, - const Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener - ) throw(); - - // SelectionAdaptor for XdndSelection Drag (we are drag source) - virtual Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable() throw(); - virtual void clearTransferable() throw(); - virtual void fireContentsChanged() throw(); - virtual Reference< XInterface > getReference() throw(); - - // XEventListener - virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw( ::com::sun::star::uno::RuntimeException ); - - // XTerminateListener - virtual void SAL_CALL queryTermination( const ::com::sun::star::lang::EventObject& aEvent ) - throw( ::com::sun::star::frame::TerminationVetoException, ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL notifyTermination( const ::com::sun::star::lang::EventObject& aEvent ) - throw( ::com::sun::star::uno::RuntimeException ); - }; - -// ------------------------------------------------------------------------ - - ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL Xdnd_getSupportedServiceNames(); - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Xdnd_createInstance( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory); - - ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL Xdnd_dropTarget_getSupportedServiceNames(); - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Xdnd_dropTarget_createInstance( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory); - -// ------------------------------------------------------------------------ - -} - -#endif diff --git a/vcl/unx/source/dtrans/X11_service.cxx b/vcl/unx/source/dtrans/X11_service.cxx deleted file mode 100644 index e14d81643553..000000000000 --- a/vcl/unx/source/dtrans/X11_service.cxx +++ /dev/null @@ -1,135 +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_vcl.hxx" - -#include "salinst.h" - -#include -#include -#include -#include -#include // declaration of generic uno interface -#include // mapping stuff -#include -#include - -using namespace rtl; -using namespace cppu; -using namespace com::sun::star::lang; -using namespace com::sun::star::datatransfer::clipboard; -using namespace com::sun::star::awt; -using namespace x11; - -Sequence< OUString > SAL_CALL x11::X11Clipboard_getSupportedServiceNames() -{ - Sequence< OUString > aRet(1); - aRet[0] = OUString::createFromAscii("com.sun.star.datatransfer.clipboard.SystemClipboard"); - return aRet; -} - -Sequence< OUString > SAL_CALL x11::Xdnd_getSupportedServiceNames() -{ - Sequence< OUString > aRet(1); - aRet[0] = OUString::createFromAscii("com.sun.star.datatransfer.dnd.X11DragSource"); - return aRet; -} - -Sequence< OUString > SAL_CALL x11::Xdnd_dropTarget_getSupportedServiceNames() -{ - Sequence< OUString > aRet(1); - aRet[0] = OUString::createFromAscii("com.sun.star.datatransfer.dnd.X11DropTarget"); - return aRet; -} - -// ------------------------------------------------------------------------ - -Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >& arguments ) -{ - static std::hash_map< OUString, ::std::hash_map< Atom, Reference< XClipboard > >, ::rtl::OUStringHash > m_aInstances; - - OUString aDisplayName; - Atom nSelection; - - // extract display name from connection argument. An exception is thrown - // by SelectionManager.initialize() if no display connection is given. - if( arguments.getLength() > 0 ) - { - Reference< XDisplayConnection > xConn; - arguments.getConstArray()[0] >>= xConn; - - if( xConn.is() ) - { - Any aIdentifier = xConn->getIdentifier(); - aIdentifier >>= aDisplayName; - } - } - - SelectionManager& rManager = SelectionManager::get( aDisplayName ); - rManager.initialize( arguments ); - - // check if any other selection than clipboard selection is specified - if( arguments.getLength() > 1 ) - { - OUString aSelectionName; - - arguments.getConstArray()[1] >>= aSelectionName; - nSelection = rManager.getAtom( aSelectionName ); - } - else - { - // default atom is clipboard selection - nSelection = rManager.getAtom( OUString::createFromAscii( "CLIPBOARD" ) ); - } - - ::std::hash_map< Atom, Reference< XClipboard > >& rMap( m_aInstances[ aDisplayName ] ); - ::std::hash_map< Atom, Reference< XClipboard > >::iterator it = rMap.find( nSelection ); - if( it != rMap.end() ) - return it->second; - - X11Clipboard* pClipboard = new X11Clipboard( rManager, nSelection ); - rMap[ nSelection ] = pClipboard; - - return static_cast(pClipboard); -} - -// ------------------------------------------------------------------------ - -Reference< XInterface > X11SalInstance::CreateDragSource() -{ - return Reference < XInterface >( ( OWeakObject * ) new SelectionManagerHolder() ); -} - -// ------------------------------------------------------------------------ - -Reference< XInterface > X11SalInstance::CreateDropTarget() -{ - return Reference < XInterface >( ( OWeakObject * ) new DropTarget() ); -} - - diff --git a/vcl/unx/source/dtrans/X11_transferable.cxx b/vcl/unx/source/dtrans/X11_transferable.cxx deleted file mode 100644 index 16518f0b2864..000000000000 --- a/vcl/unx/source/dtrans/X11_transferable.cxx +++ /dev/null @@ -1,134 +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_vcl.hxx" - -#if OSL_DEBUG_LEVEL > 1 -#include -#endif - -#include -#include -#include - -using namespace com::sun::star::datatransfer; -using namespace com::sun::star::lang; -using namespace com::sun::star::io; -using namespace com::sun::star::uno; -using namespace cppu; -using namespace osl; -using namespace rtl; - - -using namespace x11; - - -X11Transferable::X11Transferable( - SelectionManager& rManager, - const Reference< XInterface >& xCreator, - Atom selection - ) : - m_rManager( rManager ), - m_xCreator( xCreator ), - m_aSelection( selection ) -{ -} - -//================================================================================================== - -X11Transferable::~X11Transferable() -{ -} - -//================================================================================================== - -Any SAL_CALL X11Transferable::getTransferData( const DataFlavor& rFlavor ) - throw(UnsupportedFlavorException, IOException, RuntimeException) -{ - Any aRet; - Sequence< sal_Int8 > aData; - bool bSuccess = m_rManager.getPasteData( m_aSelection ? m_aSelection : XA_PRIMARY, rFlavor.MimeType, aData ); - if( ! bSuccess && m_aSelection == 0 ) - bSuccess = m_rManager.getPasteData( m_rManager.getAtom( OUString::createFromAscii( "CLIPBOARD" ) ), rFlavor.MimeType, aData ); - - if( ! bSuccess ) - { - throw UnsupportedFlavorException( rFlavor.MimeType, static_cast < XTransferable * > ( this ) ); - } - if( rFlavor.MimeType.equalsIgnoreAsciiCase( OUString::createFromAscii( "text/plain;charset=utf-16" ) ) ) - { - int nLen = aData.getLength()/2; - if( ((sal_Unicode*)aData.getConstArray())[nLen-1] == 0 ) - nLen--; - OUString aString( (sal_Unicode*)aData.getConstArray(), nLen ); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "X11Transferable::getTransferData( \"%s\" )\n -> \"%s\"\n", - OUStringToOString( rFlavor.MimeType, RTL_TEXTENCODING_ISO_8859_1 ).getStr(), - OUStringToOString( aString, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); -#endif - aRet <<= aString; - } - else - aRet <<= aData; - return aRet; -} - -//================================================================================================== - -Sequence< DataFlavor > SAL_CALL X11Transferable::getTransferDataFlavors() - throw(RuntimeException) -{ - Sequence< DataFlavor > aFlavorList; - bool bSuccess = m_rManager.getPasteDataTypes( m_aSelection ? m_aSelection : XA_PRIMARY, aFlavorList ); - if( ! bSuccess && m_aSelection == 0 ) - bSuccess = m_rManager.getPasteDataTypes( m_rManager.getAtom( OUString::createFromAscii( "CLIPBOARD" ) ), aFlavorList ); - - return aFlavorList; -} - -//================================================================================================== - -sal_Bool SAL_CALL X11Transferable::isDataFlavorSupported( const DataFlavor& aFlavor ) - throw(RuntimeException) -{ - if( aFlavor.DataType != getCppuType( (Sequence< sal_Int8 >*)0 ) ) - { - if( ! aFlavor.MimeType.equalsIgnoreAsciiCase( OUString::createFromAscii( "text/plain;charset=utf-16" ) ) && - aFlavor.DataType == getCppuType( (OUString*)0 ) ) - return false; - } - - Sequence< DataFlavor > aFlavors( getTransferDataFlavors() ); - for( int i = 0; i < aFlavors.getLength(); i++ ) - if( aFlavor.MimeType.equalsIgnoreAsciiCase( aFlavors.getConstArray()[i].MimeType ) && - aFlavor.DataType == aFlavors.getConstArray()[i].DataType ) - return sal_True; - - return sal_False; -} - diff --git a/vcl/unx/source/dtrans/X11_transferable.hxx b/vcl/unx/source/dtrans/X11_transferable.hxx deleted file mode 100644 index 57f0d6682cab..000000000000 --- a/vcl/unx/source/dtrans/X11_transferable.hxx +++ /dev/null @@ -1,72 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _DTRANS_X11_TRANSFERABLE_HXX_ -#define _DTRANS_X11_TRANSFERABLE_HXX_ - -#include -#include - -#ifndef _COM_SUN_STAR_LANG_XEVENTLISTENER_HDL_ -#include -#endif -#include - -namespace x11 { - - class X11Transferable : public ::cppu::WeakImplHelper1 < - ::com::sun::star::datatransfer::XTransferable > - { - ::osl::Mutex m_aMutex; - - SelectionManager& m_rManager; - Reference< XInterface > m_xCreator; - Atom m_aSelection; - public: - X11Transferable( SelectionManager& rManager, const Reference< XInterface >& xCreator, Atom selection = None ); - virtual ~X11Transferable(); - - /* - * XTransferable - */ - - virtual ::com::sun::star::uno::Any SAL_CALL getTransferData( const ::com::sun::star::datatransfer::DataFlavor& aFlavor ) - throw(::com::sun::star::datatransfer::UnsupportedFlavorException, - ::com::sun::star::io::IOException, - ::com::sun::star::uno::RuntimeException - ); - - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors( ) - throw(::com::sun::star::uno::RuntimeException); - - virtual sal_Bool SAL_CALL isDataFlavorSupported( const ::com::sun::star::datatransfer::DataFlavor& aFlavor ) - throw(::com::sun::star::uno::RuntimeException); - }; - -} // namespace - -#endif diff --git a/vcl/unx/source/dtrans/bmp.cxx b/vcl/unx/source/dtrans/bmp.cxx deleted file mode 100644 index 1ccd04eba725..000000000000 --- a/vcl/unx/source/dtrans/bmp.cxx +++ /dev/null @@ -1,739 +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_vcl.hxx" - -#include -#include -#include - -#include - -#include - -using namespace x11; -using namespace com::sun::star::uno; -using namespace com::sun::star::script; -using namespace com::sun::star::awt; -using namespace rtl; - -/* - * helper functions - */ - -inline void writeLE( sal_uInt16 nNumber, sal_uInt8* pBuffer ) -{ - pBuffer[ 0 ] = (nNumber & 0xff); - pBuffer[ 1 ] = ((nNumber>>8)&0xff); -} - -inline void writeLE( sal_uInt32 nNumber, sal_uInt8* pBuffer ) -{ - pBuffer[ 0 ] = (nNumber & 0xff); - pBuffer[ 1 ] = ((nNumber>>8)&0xff); - pBuffer[ 2 ] = ((nNumber>>16)&0xff); - pBuffer[ 3 ] = ((nNumber>>24)&0xff); -} - -inline sal_uInt16 readLE16( const sal_uInt8* pBuffer ) -{ - return (((sal_uInt16)pBuffer[1]) << 8 ) | pBuffer[0]; -} - -inline sal_uInt16 readLE32( const sal_uInt8* pBuffer ) -{ - return - (((sal_uInt32)pBuffer[3]) << 24 ) | - (((sal_uInt32)pBuffer[2]) << 16 ) | - (((sal_uInt32)pBuffer[1]) << 8 ) | - pBuffer[0]; -} - - -/* - * BmpTransporter - */ - -BmpTransporter::BmpTransporter( const Sequence& rBmp ) : - m_aBM( rBmp ) -{ - const sal_uInt8* pData = (const sal_uInt8*)rBmp.getConstArray(); - - if( pData[0] == 'B' || pData[1] == 'M' ) - { - pData = pData+14; - m_aSize.Width = readLE32( pData+4 ); - m_aSize.Height = readLE32( pData+8 ); - } - else - m_aSize.Width = m_aSize.Height = 0; -} - -BmpTransporter::~BmpTransporter() -{ -} - -com::sun::star::awt::Size SAL_CALL BmpTransporter::getSize() throw() -{ - return m_aSize; -} - -Sequence< sal_Int8 > SAL_CALL BmpTransporter::getDIB() throw() -{ - return m_aBM; -} - -Sequence< sal_Int8 > SAL_CALL BmpTransporter::getMaskDIB() throw() -{ - return Sequence< sal_Int8 >(); -} - -/* - * scanline helpers - */ - -inline void X11_writeScanlinePixel( unsigned long nColor, sal_uInt8* pScanline, int depth, int x ) -{ - switch( depth ) - { - case 1: - pScanline[ x/8 ] &= ~(1 << (x&7)); - pScanline[ x/8 ] |= ((nColor & 1) << (x&7)); - break; - case 4: - pScanline[ x/2 ] &= ((x&1) ? 0x0f : 0xf0); - pScanline[ x/2 ] |= ((x&1) ? (nColor & 0x0f) : ((nColor & 0x0f) << 4)); - break; - default: - case 8: - pScanline[ x ] = (nColor & 0xff); - break; - } -} - -static sal_uInt8* X11_getPaletteBmpFromImage( - Display* pDisplay, - XImage* pImage, - Colormap aColormap, - sal_Int32& rOutSize - ) -{ - sal_uInt32 nColors = 0; - - rOutSize = 0; - - sal_uInt8* pBuffer = 0; - sal_uInt32 nHeaderSize, nScanlineSize; - sal_uInt16 nBitCount; - // determine header and scanline size - switch( pImage->depth ) - { - case 1: - nHeaderSize = 64; - nScanlineSize = (pImage->width+31)/32; - nBitCount = 1; - break; - case 4: - nHeaderSize = 72; - nScanlineSize = (pImage->width+1)/2; - nBitCount = 4; - break; - default: - case 8: - nHeaderSize = 1084; - nScanlineSize = pImage->width; - nBitCount = 8; - break; - } - // adjust scan lines to begin on %4 boundaries - if( nScanlineSize & 3 ) - { - nScanlineSize &= 0xfffffffc; - nScanlineSize += 4; - } - - // allocate buffer to hold header and scanlines, initialize to zero - rOutSize = nHeaderSize + nScanlineSize*pImage->height; - pBuffer = (sal_uInt8*)rtl_allocateZeroMemory( rOutSize ); - for( int y = 0; y < pImage->height; y++ ) - { - sal_uInt8* pScanline = pBuffer + nHeaderSize + (pImage->height-1-y)*nScanlineSize; - for( int x = 0; x < pImage->width; x++ ) - { - unsigned long nPixel = XGetPixel( pImage, x, y ); - if( nPixel >= nColors ) - nColors = nPixel+1; - X11_writeScanlinePixel( nPixel, pScanline, pImage->depth, x ); - } - } - - // fill in header fields - pBuffer[ 0 ] = 'B'; - pBuffer[ 1 ] = 'M'; - - writeLE( nHeaderSize, pBuffer+10 ); - writeLE( (sal_uInt32)40, pBuffer+14 ); - writeLE( (sal_uInt32)pImage->width, pBuffer+18 ); - writeLE( (sal_uInt32)pImage->height, pBuffer+22 ); - writeLE( (sal_uInt16)1, pBuffer+26 ); - writeLE( nBitCount, pBuffer+28 ); - writeLE( (sal_uInt32)(DisplayWidth(pDisplay,DefaultScreen(pDisplay))*1000/DisplayWidthMM(pDisplay,DefaultScreen(pDisplay))), pBuffer+38); - writeLE( (sal_uInt32)(DisplayHeight(pDisplay,DefaultScreen(pDisplay))*1000/DisplayHeightMM(pDisplay,DefaultScreen(pDisplay))), pBuffer+42); - writeLE( nColors, pBuffer+46 ); - writeLE( nColors, pBuffer+50 ); - - XColor aColors[256]; - if( nColors > (1U << nBitCount) ) // paranoia - nColors = (1U << nBitCount); - for( unsigned long nPixel = 0; nPixel < nColors; nPixel++ ) - { - aColors[nPixel].flags = DoRed | DoGreen | DoBlue; - aColors[nPixel].pixel = nPixel; - } - XQueryColors( pDisplay, aColormap, aColors, nColors ); - for( sal_uInt32 i = 0; i < nColors; i++ ) - { - pBuffer[ 54 + i*4 ] = (sal_uInt8)(aColors[i].blue >> 8); - pBuffer[ 55 + i*4 ] = (sal_uInt8)(aColors[i].green >> 8); - pBuffer[ 56 + i*4 ] = (sal_uInt8)(aColors[i].red >> 8); - } - - // done - - return pBuffer; -} - -inline unsigned long doRightShift( unsigned long nValue, int nShift ) -{ - return (nShift > 0) ? (nValue >> nShift) : (nValue << (-nShift)); -} - -inline unsigned long doLeftShift( unsigned long nValue, int nShift ) -{ - return (nShift > 0) ? (nValue << nShift) : (nValue >> (-nShift)); -} - -static void getShift( unsigned long nMask, int& rShift, int& rSigBits, int& rShift2 ) -{ - unsigned long nUseMask = nMask; - rShift = 0; - while( nMask & 0xffffff00 ) - { - rShift++; - nMask >>= 1; - } - if( rShift == 0 ) - while( ! (nMask & 0x00000080) ) - { - rShift--; - nMask <<= 1; - } - - int nRotate = sizeof(unsigned long)*8 - rShift; - rSigBits = 0; - nMask = doRightShift( nUseMask, rShift) ; - while( nRotate-- ) - { - if( nMask & 1 ) - rSigBits++; - nMask >>= 1; - } - - rShift2 = 0; - if( rSigBits < 8 ) - rShift2 = 8-rSigBits; -} - -static sal_uInt8* X11_getTCBmpFromImage( - Display* pDisplay, - XImage* pImage, - sal_Int32& rOutSize, - int nScreenNo - ) -{ - // get masks from visual info (guesswork) - XVisualInfo aVInfo; - if( ! XMatchVisualInfo( pDisplay, nScreenNo, pImage->depth, TrueColor, &aVInfo ) ) - return NULL; - - rOutSize = 0; - - sal_uInt8* pBuffer = 0; - sal_uInt32 nHeaderSize = 60; - sal_uInt32 nScanlineSize = pImage->width*3; - - // adjust scan lines to begin on %4 boundaries - if( nScanlineSize & 3 ) - { - nScanlineSize &= 0xfffffffc; - nScanlineSize += 4; - } - int nRedShift, nRedSig, nRedShift2 = 0; - getShift( aVInfo.red_mask, nRedShift, nRedSig, nRedShift2 ); - int nGreenShift, nGreenSig, nGreenShift2 = 0; - getShift( aVInfo.green_mask, nGreenShift, nGreenSig, nGreenShift2 ); - int nBlueShift, nBlueSig, nBlueShift2 = 0; - getShift( aVInfo.blue_mask, nBlueShift, nBlueSig, nBlueShift2 ); - - // allocate buffer to hold header and scanlines, initialize to zero - rOutSize = nHeaderSize + nScanlineSize*pImage->height; - pBuffer = (sal_uInt8*)rtl_allocateZeroMemory( rOutSize ); - for( int y = 0; y < pImage->height; y++ ) - { - sal_uInt8* pScanline = pBuffer + nHeaderSize + (pImage->height-1-y)*nScanlineSize; - for( int x = 0; x < pImage->width; x++ ) - { - unsigned long nPixel = XGetPixel( pImage, x, y ); - - sal_uInt8 nValue = (sal_uInt8)doRightShift( nPixel&aVInfo.blue_mask, nBlueShift); - if( nBlueShift2 ) - nValue |= (nValue >> nBlueShift2 ); - *pScanline++ = nValue; - - nValue = (sal_uInt8)doRightShift( nPixel&aVInfo.green_mask, nGreenShift); - if( nGreenShift2 ) - nValue |= (nValue >> nGreenShift2 ); - *pScanline++ = nValue; - - nValue = (sal_uInt8)doRightShift( nPixel&aVInfo.red_mask, nRedShift); - if( nRedShift2 ) - nValue |= (nValue >> nRedShift2 ); - *pScanline++ = nValue; - } - } - - // fill in header fields - pBuffer[ 0 ] = 'B'; - pBuffer[ 1 ] = 'M'; - - writeLE( nHeaderSize, pBuffer+10 ); - writeLE( (sal_uInt32)40, pBuffer+14 ); - writeLE( (sal_uInt32)pImage->width, pBuffer+18 ); - writeLE( (sal_uInt32)pImage->height, pBuffer+22 ); - writeLE( (sal_uInt16)1, pBuffer+26 ); - writeLE( (sal_uInt16)24, pBuffer+28 ); - writeLE( (sal_uInt32)(DisplayWidth(pDisplay,DefaultScreen(pDisplay))*1000/DisplayWidthMM(pDisplay,DefaultScreen(pDisplay))), pBuffer+38); - writeLE( (sal_uInt32)(DisplayHeight(pDisplay,DefaultScreen(pDisplay))*1000/DisplayHeightMM(pDisplay,DefaultScreen(pDisplay))), pBuffer+42); - - // done - - return pBuffer; -} - -sal_uInt8* x11::X11_getBmpFromPixmap( - Display* pDisplay, - Drawable aDrawable, - Colormap aColormap, - sal_Int32& rOutSize - ) -{ - // get geometry of drawable - XLIB_Window aRoot; - int x,y; - unsigned int w, h, bw, d; - XGetGeometry( pDisplay, aDrawable, &aRoot, &x, &y, &w, &h, &bw, &d ); - - // find which screen we are on - int nScreenNo = ScreenCount( pDisplay ); - while( nScreenNo-- ) - { - if( RootWindow( pDisplay, nScreenNo ) == aRoot ) - break; - } - if( nScreenNo < 0 ) - return NULL; - - if( aColormap == None ) - aColormap = DefaultColormap( pDisplay, nScreenNo ); - - // get the image - XImage* pImage = XGetImage( pDisplay, aDrawable, 0, 0, w, h, AllPlanes, ZPixmap ); - if( ! pImage ) - return NULL; - - sal_uInt8* pBmp = d <= 8 ? - X11_getPaletteBmpFromImage( pDisplay, pImage, aColormap, rOutSize ) : - X11_getTCBmpFromImage( pDisplay, pImage, rOutSize, nScreenNo ); - XDestroyImage( pImage ); - - return pBmp; -} - -void x11::X11_freeBmp( sal_uInt8* pBmp ) -{ - rtl_freeMemory( pBmp ); -} - -/* - * PixmapHolder - */ - -PixmapHolder::PixmapHolder( Display* pDisplay ) : - m_pDisplay( pDisplay ), - m_aColormap( None ), - m_aPixmap( None ), - m_aBitmap( None ) -{ - /* try to get a 24 bit true color visual, if that fails, - * revert to default visual - */ - if( ! XMatchVisualInfo( m_pDisplay, DefaultScreen( m_pDisplay ), 24, TrueColor, &m_aInfo ) ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "PixmapHolder reverting to default visual\n" ); -#endif - Visual* pVisual = DefaultVisual( m_pDisplay, DefaultScreen( m_pDisplay ) ); - m_aInfo.screen = DefaultScreen( m_pDisplay ); - m_aInfo.visual = pVisual; - m_aInfo.visualid = pVisual->visualid; - m_aInfo.c_class = pVisual->c_class; - m_aInfo.red_mask = pVisual->red_mask; - m_aInfo.green_mask = pVisual->green_mask; - m_aInfo.blue_mask = pVisual->blue_mask; - m_aInfo.depth = DefaultDepth( m_pDisplay, m_aInfo.screen ); - } - m_aColormap = DefaultColormap( m_pDisplay, m_aInfo.screen ); -#if OSL_DEBUG_LEVEL > 1 - static const char* pClasses[] = - { "StaticGray", "GrayScale", "StaticColor", "PseudoColor", "TrueColor", "DirectColor" }; - fprintf( stderr, "PixmapHolder visual: id = 0x%lx, class = %s (%d), depth=%d; color map = 0x%lx\n", - m_aInfo.visualid, - (m_aInfo.c_class >= 0 && unsigned(m_aInfo.c_class) < sizeof(pClasses)/sizeof(pClasses[0])) ? pClasses[m_aInfo.c_class] : "", - m_aInfo.c_class, - m_aInfo.depth, - m_aColormap ); -#endif - if( m_aInfo.c_class == TrueColor ) - { - int nRedSig, nGreenSig, nBlueSig; - m_nRedShift = m_nRedShift2 = 0; - getShift( m_aInfo.red_mask, m_nRedShift, nRedSig, m_nRedShift2 ); - m_nGreenShift = m_nGreenShift2 = 0; - getShift( m_aInfo.green_mask, m_nGreenShift, nGreenSig, m_nGreenShift2 ); - m_nBlueShift = m_nBlueShift2 = 0; - getShift( m_aInfo.blue_mask, m_nBlueShift, nBlueSig, m_nBlueShift2 ); - - m_nBlueShift2Mask = m_nBlueShift2 ? ~((unsigned long)((1<> (x&7))) != 0 ? 0 : 1; break; - case 4: - if( x & 1 ) - nCol = (int)(pScanline[ x/2 ] >> 4); - else - nCol = (int)(pScanline[ x/2 ] & 0x0f); - break; - case 8: nCol = (int)pScanline[x]; - } - XPutPixel( pImage, x, y, aPalette[nCol].pixel ); - } - } -} - -void PixmapHolder::setBitmapDataTCDither( const sal_uInt8* pData, XImage* pImage ) -{ - XColor aPalette[216]; - - int nNonAllocs = 0; - - for( int r = 0; r < 6; r++ ) - { - for( int g = 0; g < 6; g++ ) - { - for( int b = 0; b < 6; b++ ) - { - int i = r*36+g*6+b; - aPalette[i].red = r == 5 ? 0xffff : r*10922; - aPalette[i].green = g == 5 ? 0xffff : g*10922; - aPalette[i].blue = b == 5 ? 0xffff : b*10922; - aPalette[i].pixel = 0; - if( ! XAllocColor( m_pDisplay, m_aColormap, aPalette+i ) ) - nNonAllocs++; - } - } - } - - if( nNonAllocs ) - { - XColor aRealPalette[256]; - int nColors = 1 << m_aInfo.depth; - int i; - for( i = 0; i < nColors; i++ ) - aRealPalette[i].pixel = (unsigned long)i; - XQueryColors( m_pDisplay, m_aColormap, aRealPalette, nColors ); - for( i = 0; i < nColors; i++ ) - { - sal_uInt8 nIndex = - 36*(sal_uInt8)(aRealPalette[i].red/10923) + - 6*(sal_uInt8)(aRealPalette[i].green/10923) + - (sal_uInt8)(aRealPalette[i].blue/10923); - if( aPalette[nIndex].pixel == 0 ) - aPalette[nIndex] = aRealPalette[i]; - } - } - - sal_uInt32 nWidth = readLE32( pData+4 ); - sal_uInt32 nHeight = readLE32( pData+8 ); - - const sal_uInt8* pBMData = pData + readLE32( pData ); - sal_uInt32 nScanlineSize = nWidth*3; - // adjust scan lines to begin on %4 boundaries - if( nScanlineSize & 3 ) - { - nScanlineSize &= 0xfffffffc; - nScanlineSize += 4; - } - - for( int y = 0; y < (int)nHeight; y++ ) - { - const sal_uInt8* pScanline = pBMData + (nHeight-1-(sal_uInt32)y)*nScanlineSize; - for( int x = 0; x < (int)nWidth; x++ ) - { - sal_uInt8 b = pScanline[3*x]; - sal_uInt8 g = pScanline[3*x+1]; - sal_uInt8 r = pScanline[3*x+2]; - sal_uInt8 i = 36*(r/43) + 6*(g/43) + (b/43); - - XPutPixel( pImage, x, y, aPalette[ i ].pixel ); - } - } -} - -void PixmapHolder::setBitmapDataTC( const sal_uInt8* pData, XImage* pImage ) -{ - sal_uInt32 nWidth = readLE32( pData+4 ); - sal_uInt32 nHeight = readLE32( pData+8 ); - - const sal_uInt8* pBMData = pData + readLE32( pData ); - sal_uInt32 nScanlineSize = nWidth*3; - // adjust scan lines to begin on %4 boundaries - if( nScanlineSize & 3 ) - { - nScanlineSize &= 0xfffffffc; - nScanlineSize += 4; - } - - for( int y = 0; y < (int)nHeight; y++ ) - { - const sal_uInt8* pScanline = pBMData + (nHeight-1-(sal_uInt32)y)*nScanlineSize; - for( int x = 0; x < (int)nWidth; x++ ) - { - unsigned long nPixel = getTCPixel( pScanline[3*x+2], pScanline[3*x+1], pScanline[3*x] ); - XPutPixel( pImage, x, y, nPixel ); - } - } -} - -bool PixmapHolder::needsConversion( const sal_uInt8* pData ) -{ - if( pData[0] != 'B' || pData[1] != 'M' ) - return true; - - pData = pData+14; - sal_uInt32 nDepth = readLE32( pData+14 ); - if( nDepth == 24 ) - { - if( m_aInfo.c_class != TrueColor ) - return true; - } - else if( nDepth != (sal_uInt32)m_aInfo.depth ) - { - if( m_aInfo.c_class != TrueColor ) - return true; - } - - return false; -} - -Pixmap PixmapHolder::setBitmapData( const sal_uInt8* pData ) -{ - if( pData[0] != 'B' || pData[1] != 'M' ) - return None; - - pData = pData+14; - - // reject compressed data - if( readLE32( pData + 16 ) != 0 ) - return None; - - sal_uInt32 nWidth = readLE32( pData+4 ); - sal_uInt32 nHeight = readLE32( pData+8 ); - - if( m_aPixmap != None ) - XFreePixmap( m_pDisplay, m_aPixmap ), m_aPixmap = None; - if( m_aBitmap != None ) - XFreePixmap( m_pDisplay, m_aBitmap ), m_aBitmap = None; - - m_aPixmap = XCreatePixmap( m_pDisplay, - RootWindow( m_pDisplay, m_aInfo.screen ), - nWidth, nHeight, m_aInfo.depth ); - - if( m_aPixmap != None ) - { - XImage aImage; - aImage.width = (int)nWidth; - aImage.height = (int)nHeight; - aImage.xoffset = 0; - aImage.format = ZPixmap; - aImage.data = NULL; - aImage.byte_order = ImageByteOrder( m_pDisplay ); - aImage.bitmap_unit = BitmapUnit( m_pDisplay ); - aImage.bitmap_bit_order = BitmapBitOrder( m_pDisplay ); - aImage.bitmap_pad = BitmapPad( m_pDisplay ); - aImage.depth = m_aInfo.depth; - aImage.red_mask = m_aInfo.red_mask; - aImage.green_mask = m_aInfo.green_mask; - aImage.blue_mask = m_aInfo.blue_mask; - aImage.bytes_per_line = 0; // filled in by XInitImage - if( m_aInfo.depth <= 8 ) - aImage.bits_per_pixel = m_aInfo.depth; - else - aImage.bits_per_pixel = 8*((m_aInfo.depth+7)/8); - aImage.obdata = NULL; - - XInitImage( &aImage ); - aImage.data = (char*)rtl_allocateMemory( nHeight*aImage.bytes_per_line ); - - if( readLE32( pData+14 ) == 24 ) - { - if( m_aInfo.c_class == TrueColor ) - setBitmapDataTC( pData, &aImage ); - else - setBitmapDataTCDither( pData, &aImage ); - } - else - setBitmapDataPalette( pData, &aImage ); - - // put the image - XPutImage( m_pDisplay, - m_aPixmap, - DefaultGC( m_pDisplay, m_aInfo.screen ), - &aImage, - 0, 0, - 0, 0, - nWidth, nHeight ); - - // clean up - rtl_freeMemory( aImage.data ); - - // prepare bitmap (mask) - m_aBitmap = XCreatePixmap( m_pDisplay, - RootWindow( m_pDisplay, m_aInfo.screen ), - nWidth, nHeight, 1 ); - XGCValues aVal; - aVal.function = GXcopy; - aVal.foreground = 0xffffffff; - GC aGC = XCreateGC( m_pDisplay, m_aBitmap, GCFunction | GCForeground, &aVal ); - XFillRectangle( m_pDisplay, m_aBitmap, aGC, 0, 0, nWidth, nHeight ); - XFreeGC( m_pDisplay, aGC ); - } - - return m_aPixmap; -} diff --git a/vcl/unx/source/dtrans/bmp.hxx b/vcl/unx/source/dtrans/bmp.hxx deleted file mode 100644 index b59b4417ca69..000000000000 --- a/vcl/unx/source/dtrans/bmp.hxx +++ /dev/null @@ -1,105 +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 _DTRANS_BMP_HXX_ -#define _DTRANS_BMP_HXX_ - -#include "tools/prex.h" -#include -#include -#include -#include -#include "tools/postx.h" - -#include -#include -#include - - - -namespace x11 { - -// helper methods -sal_uInt8* X11_getBmpFromPixmap( Display* pDisplay, - Drawable aDrawable, - Colormap aColormap, - sal_Int32& rOutSize ); - -void X11_freeBmp( sal_uInt8* pBmp ); - -class PixmapHolder -{ - Display* m_pDisplay; - Colormap m_aColormap; - Pixmap m_aPixmap; - Pixmap m_aBitmap; - XVisualInfo m_aInfo; - - int m_nRedShift, m_nRedShift2; - int m_nGreenShift, m_nGreenShift2; - int m_nBlueShift, m_nBlueShift2; - unsigned long m_nBlueShift2Mask, m_nRedShift2Mask, m_nGreenShift2Mask; - - // these expect data pointers to bitmapinfo header - void setBitmapDataTC( const sal_uInt8* pData, XImage* pImage ); - void setBitmapDataTCDither( const sal_uInt8* pData, XImage* pImage ); - void setBitmapDataPalette( const sal_uInt8* pData, XImage* pImage ); - - unsigned long getTCPixel( sal_uInt8 r, sal_uInt8 g, sal_uInt8 b ) const; -public: - PixmapHolder( Display* pDisplay ); - ~PixmapHolder(); - - // accepts bitmap file (including bitmap file header) - Pixmap setBitmapData( const sal_uInt8* pData ); - bool needsConversion( const sal_uInt8* pData ); - - Colormap getColormap() const { return m_aColormap; } - Pixmap getPixmap() const { return m_aPixmap; } - Pixmap getBitmap() const { return m_aBitmap; } - VisualID getVisualID() const { return m_aInfo.visualid; } - int getClass() const { return m_aInfo.c_class; } - int getDepth() const { return m_aInfo.depth; } -}; - -class BmpTransporter : - public cppu::WeakImplHelper1< com::sun::star::awt::XBitmap > -{ - com::sun::star::uno::Sequence m_aBM; - com::sun::star::awt::Size m_aSize; -public: - BmpTransporter( const com::sun::star::uno::Sequence& rBmp ); - virtual ~BmpTransporter(); - - virtual com::sun::star::awt::Size SAL_CALL getSize() throw(); - virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getDIB() throw(); - virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getMaskDIB() throw(); -}; - -} - -#endif diff --git a/vcl/unx/source/dtrans/config.cxx b/vcl/unx/source/dtrans/config.cxx deleted file mode 100644 index 001da3900bb7..000000000000 --- a/vcl/unx/source/dtrans/config.cxx +++ /dev/null @@ -1,148 +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_vcl.hxx" - -#include -#include - -#include "X11_selection.hxx" - -#define SETTINGS_CONFIGNODE "VCL/Settings/Transfer" -#define SELECTION_PROPERTY "SelectionTimeout" - -namespace x11 -{ - -class DtransX11ConfigItem : public ::utl::ConfigItem -{ - sal_Int32 m_nSelectionTimeout; - - virtual void Notify( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rPropertyNames ); - virtual void Commit(); -public: - DtransX11ConfigItem(); - virtual ~DtransX11ConfigItem(); - - sal_Int32 getSelectionTimeout() const { return m_nSelectionTimeout; } -}; - -} - -using namespace com::sun::star::lang; -using namespace com::sun::star::uno; -using namespace rtl; -using namespace x11; - -sal_Int32 SelectionManager::getSelectionTimeout() -{ - if( m_nSelectionTimeout < 1 ) - { - DtransX11ConfigItem aCfg; - m_nSelectionTimeout = aCfg.getSelectionTimeout(); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "initialized selection timeout to %ld seconds\n", m_nSelectionTimeout ); -#endif - } - return m_nSelectionTimeout; -} - -/* - * DtransX11ConfigItem constructor - */ - -DtransX11ConfigItem::DtransX11ConfigItem() : - ConfigItem( OUString( RTL_CONSTASCII_USTRINGPARAM( SETTINGS_CONFIGNODE ) ), - CONFIG_MODE_DELAYED_UPDATE ), - m_nSelectionTimeout( 3 ) -{ - if( IsValidConfigMgr() ) - { - Sequence< OUString > aKeys( 1 ); - aKeys.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( SELECTION_PROPERTY ) ); - Sequence< Any > aValues = GetProperties( aKeys ); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "found %ld properties for %s\n", aValues.getLength(), SELECTION_PROPERTY ); -#endif - Any* pValue = aValues.getArray(); - for( int i = 0; i < aValues.getLength(); i++, pValue++ ) - { - if( pValue->getValueTypeClass() == TypeClass_STRING ) - { - const OUString* pLine = (const OUString*)pValue->getValue(); - if( pLine->getLength() ) - { - m_nSelectionTimeout = pLine->toInt32(); - if( m_nSelectionTimeout < 1 ) - m_nSelectionTimeout = 1; - } -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "found SelectionTimeout \"%s\"\n", - OUStringToOString( *pLine, osl_getThreadTextEncoding() ).getStr() ); -#endif - } -#if OSL_DEBUG_LEVEL > 1 - else - fprintf( stderr, "found SelectionTimeout of type \"%s\"\n", - OUStringToOString( pValue->getValueType().getTypeName(), osl_getThreadTextEncoding() ).getStr() ); -#endif - } - } -#if OSL_DEBUG_LEVEL > 1 - else - fprintf( stderr, "no valid configmanager, could not read timeout setting\n" ); -#endif -} - -/* - * DtransX11ConfigItem destructor - */ - -DtransX11ConfigItem::~DtransX11ConfigItem() -{ -} - -/* - * DtransX11ConfigItem::Commit - */ - -void DtransX11ConfigItem::Commit() -{ - // for the clipboard service this is readonly, so - // there is nothing to commit -} - -/* - * DtransX11ConfigItem::Notify - */ - -void DtransX11ConfigItem::Notify( const Sequence< OUString >& /*rPropertyNames*/ ) -{ -} - - diff --git a/vcl/unx/source/dtrans/copydata_curs.h b/vcl/unx/source/dtrans/copydata_curs.h deleted file mode 100644 index e3d0e3e76530..000000000000 --- a/vcl/unx/source/dtrans/copydata_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define copydata_curs_width 32 -#define copydata_curs_height 32 -#define copydata_curs_x_hot 1 -#define copydata_curs_y_hot 1 -static char copydata_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, - 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, - 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, - 0xfe, 0x03, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, - 0x66, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, - 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x53, 0x00, 0x00, - 0x28, 0xa3, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x10, 0xf0, 0x1f, 0x00, 0x08, 0xf0, 0x1f, 0x00, 0x10, 0xf0, 0x1e, 0x00, - 0xa8, 0xf2, 0x1e, 0x00, 0x50, 0x35, 0x18, 0x00, 0x00, 0xf0, 0x1e, 0x00, - 0x00, 0xf0, 0x1e, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/dtrans/copydata_mask.h b/vcl/unx/source/dtrans/copydata_mask.h deleted file mode 100644 index f25b0863d807..000000000000 --- a/vcl/unx/source/dtrans/copydata_mask.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define copydata_mask_width 32 -#define copydata_mask_height 32 -#define copydata_mask_x_hot 1 -#define copydata_mask_y_hot 1 -static char copydata_mask_bits[] = { - 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, - 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, - 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, - 0xe0, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, - 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0x3c, 0xf8, 0x3f, 0x00, - 0x3c, 0xf8, 0x3f, 0x00, 0x3c, 0xf8, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00, - 0xfc, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00, - 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, - 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/dtrans/linkdata_curs.h b/vcl/unx/source/dtrans/linkdata_curs.h deleted file mode 100644 index c60edc3b99d0..000000000000 --- a/vcl/unx/source/dtrans/linkdata_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define linkdata_curs_width 32 -#define linkdata_curs_height 32 -#define linkdata_curs_x_hot 1 -#define linkdata_curs_y_hot 1 -static char linkdata_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, - 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, - 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, - 0xfe, 0x03, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, - 0x66, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, - 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x53, 0x00, 0x00, - 0x28, 0xa3, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x10, 0xf0, 0x1f, 0x00, 0x08, 0x70, 0x18, 0x00, 0x10, 0xf0, 0x18, 0x00, - 0xa8, 0x72, 0x18, 0x00, 0x50, 0x35, 0x1a, 0x00, 0x00, 0x30, 0x1f, 0x00, - 0x00, 0xb0, 0x1f, 0x00, 0x00, 0x70, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/dtrans/linkdata_mask.h b/vcl/unx/source/dtrans/linkdata_mask.h deleted file mode 100644 index cf0f89f63b1b..000000000000 --- a/vcl/unx/source/dtrans/linkdata_mask.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define linkdata_mask_width 32 -#define linkdata_mask_height 32 -#define linkdata_mask_x_hot 1 -#define linkdata_mask_y_hot 1 -static char linkdata_mask_bits[] = { - 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, - 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, - 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, - 0xe0, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, - 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0x3c, 0xf8, 0x3f, 0x00, - 0x3c, 0xf8, 0x3f, 0x00, 0x3c, 0xf8, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00, - 0xfc, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00, - 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, - 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/dtrans/makefile.mk b/vcl/unx/source/dtrans/makefile.mk deleted file mode 100644 index 6f5caccfd734..000000000000 --- a/vcl/unx/source/dtrans/makefile.mk +++ /dev/null @@ -1,68 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=dtransX11 -TARGETTYPE=GUI - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# ------------------------------------------------------------------ - -.IF "$(GUIBASE)"=="aqua" - -dummy: - @echo "Nothing to build for Mac OS X" - -.ELSE # "$(GUIBASE)"=="aqua" - -.IF "$(COM)$(CPU)" == "C50I" || "$(COM)$(CPU)" == "C52I" -NOOPTFILES=\ - $(SLO)$/X11_selection.obj -.ENDIF - -SLOFILES=\ - $(SLO)$/X11_dndcontext.obj \ - $(SLO)$/X11_transferable.obj \ - $(SLO)$/X11_clipboard.obj \ - $(SLO)$/X11_selection.obj \ - $(SLO)$/X11_droptarget.obj \ - $(SLO)$/X11_service.obj \ - $(SLO)$/bmp.obj \ - $(SLO)$/config.obj - -.ENDIF # "$(OS)"=="MACOSX" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/vcl/unx/source/dtrans/movedata_curs.h b/vcl/unx/source/dtrans/movedata_curs.h deleted file mode 100644 index b79412bc3f41..000000000000 --- a/vcl/unx/source/dtrans/movedata_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define movedata_curs_width 32 -#define movedata_curs_height 32 -#define movedata_curs_x_hot 1 -#define movedata_curs_y_hot 1 -static char movedata_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, - 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, - 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, - 0xfe, 0x03, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, - 0x66, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, - 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x53, 0x00, 0x00, - 0x28, 0xa3, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, - 0x10, 0x40, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, - 0xa8, 0xaa, 0x00, 0x00, 0x50, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/dtrans/movedata_mask.h b/vcl/unx/source/dtrans/movedata_mask.h deleted file mode 100644 index e25d0837d8dc..000000000000 --- a/vcl/unx/source/dtrans/movedata_mask.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define movedata_mask_width 32 -#define movedata_mask_height 32 -#define movedata_mask_x_hot 1 -#define movedata_mask_y_hot 1 -static char movedata_mask_bits[] = { - 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, - 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, - 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, - 0xe0, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, - 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0x3c, 0xe0, 0x01, 0x00, - 0x3c, 0xe0, 0x01, 0x00, 0x3c, 0xe0, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, - 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0xf8, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/dtrans/nodrop_curs.h b/vcl/unx/source/dtrans/nodrop_curs.h deleted file mode 100644 index 8e208e32f293..000000000000 --- a/vcl/unx/source/dtrans/nodrop_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define nodrop_curs_width 32 -#define nodrop_curs_height 32 -#define nodrop_curs_x_hot 9 -#define nodrop_curs_y_hot 9 -static char nodrop_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, - 0xf8, 0x7f, 0x00, 0x00, 0x7c, 0xf8, 0x00, 0x00, 0x1c, 0xfc, 0x00, 0x00, - 0x1e, 0xfe, 0x01, 0x00, 0x0e, 0xdf, 0x01, 0x00, 0x8e, 0xcf, 0x01, 0x00, - 0xce, 0xc7, 0x01, 0x00, 0xee, 0xc3, 0x01, 0x00, 0xfe, 0xe1, 0x01, 0x00, - 0xfc, 0xe0, 0x00, 0x00, 0x7c, 0xf8, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, - 0xf0, 0x3f, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/dtrans/nodrop_mask.h b/vcl/unx/source/dtrans/nodrop_mask.h deleted file mode 100644 index 7cbecef2c60f..000000000000 --- a/vcl/unx/source/dtrans/nodrop_mask.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define nodrop_mask_width 32 -#define nodrop_mask_height 32 -#define nodrop_mask_x_hot 9 -#define nodrop_mask_y_hot 9 -static char nodrop_mask_bits[] = { - 0xc0, 0x0f, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, - 0xfc, 0xff, 0x00, 0x00, 0xfe, 0xff, 0x01, 0x00, 0x7e, 0xfe, 0x01, 0x00, - 0x3f, 0xff, 0x03, 0x00, 0x9f, 0xff, 0x03, 0x00, 0xdf, 0xff, 0x03, 0x00, - 0xff, 0xef, 0x03, 0x00, 0xff, 0xe7, 0x03, 0x00, 0xff, 0xf3, 0x03, 0x00, - 0xfe, 0xf9, 0x01, 0x00, 0xfe, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x00, 0x00, - 0xf8, 0x7f, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/fontmanager/adobeenc.tab b/vcl/unx/source/fontmanager/adobeenc.tab deleted file mode 100644 index 492e92f3fcf2..000000000000 --- a/vcl/unx/source/fontmanager/adobeenc.tab +++ /dev/null @@ -1,1087 +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. - * - ************************************************************************/ - -struct AdobeEncEntry { - sal_Unicode aUnicode; - sal_uInt8 aAdobeStandardCode; - const char* const pAdobename; -}; - -static const AdobeEncEntry aAdobeCodes[]= -{ - { 0x0041, 0101, "A" }, - { 0x00C6, 0341, "AE" }, - { 0x01FC, 0, "AEacute" }, - { 0xF7E6, 0, "AEsmall" }, - { 0x00C1, 0, "Aacute" }, - { 0xF7E1, 0, "Aacutesmall" }, - { 0x0102, 0, "Abreve" }, - { 0x00C2, 0, "Acircumflex" }, - { 0xF7E2, 0, "Acircumflexsmall" }, - { 0xF6C9, 0, "Acute" }, - { 0xF7B4, 0, "Acutesmall" }, - { 0x00C4, 0, "Adieresis" }, - { 0xF7E4, 0, "Adieresissmall" }, - { 0x00C0, 0, "Agrave" }, - { 0xF7E0, 0, "Agravesmall" }, - { 0x0391, 0, "Alpha" }, - { 0x0386, 0, "Alphatonos" }, - { 0x0100, 0, "Amacron" }, - { 0x0104, 0, "Aogonek" }, - { 0x00C5, 0, "Aring" }, - { 0x01FA, 0, "Aringacute" }, - { 0xF7E5, 0, "Aringsmall" }, - { 0xF761, 0, "Asmall" }, - { 0x00C3, 0, "Atilde" }, - { 0xF7E3, 0, "Atildesmall" }, - { 0x0042, 0102, "B" }, - { 0x0392, 0, "Beta" }, - { 0xF6F4, 0, "Brevesmall" }, - { 0xF762, 0, "Bsmall" }, - { 0x0043, 0103, "C" }, - { 0x0106, 0, "Cacute" }, - { 0xF6CA, 0, "Caron" }, - { 0xF6F5, 0, "Caronsmall" }, - { 0x010C, 0, "Ccaron" }, - { 0x00C7, 0, "Ccedilla" }, - { 0xF7E7, 0, "Ccedillasmall" }, - { 0x0108, 0, "Ccircumflex" }, - { 0x010A, 0, "Cdotaccent" }, - { 0xF7B8, 0, "Cedillasmall" }, - { 0x03A7, 0, "Chi" }, - { 0xF6F6, 0, "Circumflexsmall" }, - { 0xF763, 0, "Csmall" }, - { 0x0044, 0104, "D" }, - { 0x010E, 0, "Dcaron" }, - { 0x0110, 0, "Dcroat" }, - { 0x2206, 0, "Delta" }, - { 0x0394, 0, "Delta" }, - { 0xF6CB, 0, "Dieresis" }, - { 0xF6CC, 0, "DieresisAcute" }, - { 0xF6CD, 0, "DieresisGrave" }, - { 0xF7A8, 0, "Dieresissmall" }, - { 0xF6F7, 0, "Dotaccentsmall" }, - { 0xF764, 0, "Dsmall" }, - { 0x0045, 0105, "E" }, - { 0x00C9, 0, "Eacute" }, - { 0xF7E9, 0, "Eacutesmall" }, - { 0x0114, 0, "Ebreve" }, - { 0x011A, 0, "Ecaron" }, - { 0x00CA, 0, "Ecircumflex" }, - { 0xF7EA, 0, "Ecircumflexsmall" }, - { 0x00CB, 0, "Edieresis" }, - { 0xF7EB, 0, "Edieresissmall" }, - { 0x0116, 0, "Edotaccent" }, - { 0x00C8, 0, "Egrave" }, - { 0xF7E8, 0, "Egravesmall" }, - { 0x0112, 0, "Emacron" }, - { 0x014A, 0, "Eng" }, - { 0x0118, 0, "Eogonek" }, - { 0x0395, 0, "Epsilon" }, - { 0x0388, 0, "Epsilontonos" }, - { 0xF765, 0, "Esmall" }, - { 0x0397, 0, "Eta" }, - { 0x0389, 0, "Etatonos" }, - { 0x00D0, 0, "Eth" }, - { 0xF7F0, 0, "Ethsmall" }, - { 0x20AC, 0, "Euro" }, - { 0x0046, 0106, "F" }, - { 0xF766, 0, "Fsmall" }, - { 0x0047, 0107, "G" }, - { 0x0393, 0, "Gamma" }, - { 0x011E, 0, "Gbreve" }, - { 0x01E6, 0, "Gcaron" }, - { 0x011C, 0, "Gcircumflex" }, - { 0x0122, 0, "Gcommaaccent" }, - { 0x0120, 0, "Gdotaccent" }, - { 0xF6CE, 0, "Grave" }, - { 0xF760, 0, "Gravesmall" }, - { 0xF767, 0, "Gsmall" }, - { 0x0048, 0110, "H" }, - { 0x25CF, 0, "H18533" }, - { 0x25AA, 0, "H18543" }, - { 0x25AB, 0, "H18551" }, - { 0x25A1, 0, "H22073" }, - { 0x0126, 0, "Hbar" }, - { 0x0124, 0, "Hcircumflex" }, - { 0xF768, 0, "Hsmall" }, - { 0xF6CF, 0, "Hungarumlaut" }, - { 0xF6F8, 0, "Hungarumlautsmall" }, - { 0x0049, 0111, "I" }, - { 0x0132, 0, "IJ" }, - { 0x00CD, 0, "Iacute" }, - { 0xF7ED, 0, "Iacutesmall" }, - { 0x012C, 0, "Ibreve" }, - { 0x00CE, 0, "Icircumflex" }, - { 0xF7EE, 0, "Icircumflexsmall" }, - { 0x00CF, 0, "Idieresis" }, - { 0xF7EF, 0, "Idieresissmall" }, - { 0x0130, 0, "Idotaccent" }, - { 0x2111, 0, "Ifraktur" }, - { 0x00CC, 0, "Igrave" }, - { 0xF7EC, 0, "Igravesmall" }, - { 0x012A, 0, "Imacron" }, - { 0x012E, 0, "Iogonek" }, - { 0x0399, 0, "Iota" }, - { 0x03AA, 0, "Iotadieresis" }, - { 0x038A, 0, "Iotatonos" }, - { 0xF769, 0, "Ismall" }, - { 0x0128, 0, "Itilde" }, - { 0x004A, 0112, "J" }, - { 0x0134, 0, "Jcircumflex" }, - { 0xF76A, 0, "Jsmall" }, - { 0x004B, 0113, "K" }, - { 0x039A, 0, "Kappa" }, - { 0x0136, 0, "Kcommaaccent" }, - { 0xF76B, 0, "Ksmall" }, - { 0x004C, 0114, "L" }, - { 0xF6BF, 0, "LL" }, - { 0x0139, 0, "Lacute" }, - { 0x039B, 0, "Lambda" }, - { 0x013D, 0, "Lcaron" }, - { 0x013B, 0, "Lcommaaccent" }, - { 0x013F, 0, "Ldot" }, - { 0x0141, 0350, "Lslash" }, - { 0xF6F9, 0, "Lslashsmall" }, - { 0xF76C, 0, "Lsmall" }, - { 0x004D, 0115, "M" }, - { 0xF6D0, 0, "Macron" }, - { 0xF7AF, 0, "Macronsmall" }, - { 0xF76D, 0, "Msmall" }, - { 0x039C, 0, "Mu" }, - { 0x004E, 0116, "N" }, - { 0x0143, 0, "Nacute" }, - { 0x0147, 0, "Ncaron" }, - { 0x0145, 0, "Ncommaaccent" }, - { 0xF76E, 0, "Nsmall" }, - { 0x00D1, 0, "Ntilde" }, - { 0xF7F1, 0, "Ntildesmall" }, - { 0x039D, 0, "Nu" }, - { 0x004F, 0117, "O" }, - { 0x0152, 0, "OE" }, - { 0xF6FA, 0, "OEsmall" }, - { 0x00D3, 0, "Oacute" }, - { 0xF7F3, 0, "Oacutesmall" }, - { 0x014E, 0, "Obreve" }, - { 0x00D4, 0, "Ocircumflex" }, - { 0xF7F4, 0, "Ocircumflexsmall" }, - { 0x00D6, 0, "Odieresis" }, - { 0xF7F6, 0, "Odieresissmall" }, - { 0xF6FB, 0, "Ogoneksmall" }, - { 0x00D2, 0, "Ograve" }, - { 0xF7F2, 0, "Ogravesmall" }, - { 0x01A0, 0, "Ohorn" }, - { 0x0150, 0, "Ohungarumlaut" }, - { 0x014C, 0, "Omacron" }, - { 0x2126, 0, "Omega" }, - { 0x03A9, 0, "Omega" }, - { 0x038F, 0, "Omegatonos" }, - { 0x039F, 0, "Omicron" }, - { 0x038C, 0, "Omicrontonos" }, - { 0x00D8, 0351, "Oslash" }, - { 0x01FE, 0, "Oslashacute" }, - { 0xF7F8, 0, "Oslashsmall" }, - { 0xF76F, 0, "Osmall" }, - { 0x00D5, 0, "Otilde" }, - { 0xF7F5, 0, "Otildesmall" }, - { 0x0050, 0120, "P" }, - { 0x03A6, 0, "Phi" }, - { 0x03A0, 0, "Pi" }, - { 0x03A8, 0, "Psi" }, - { 0xF770, 0, "Psmall" }, - { 0x0051, 0121, "Q" }, - { 0xF771, 0, "Qsmall" }, - { 0x0052, 0122, "R" }, - { 0x0154, 0, "Racute" }, - { 0x0158, 0, "Rcaron" }, - { 0x0156, 0, "Rcommaaccent" }, - { 0x211C, 0, "Rfraktur" }, - { 0x03A1, 0, "Rho" }, - { 0xF6FC, 0, "Ringsmall" }, - { 0xF772, 0, "Rsmall" }, - { 0x0053, 0123, "S" }, - { 0x250C, 0, "SF010000" }, - { 0x2514, 0, "SF020000" }, - { 0x2510, 0, "SF030000" }, - { 0x2518, 0, "SF040000" }, - { 0x253C, 0, "SF050000" }, - { 0x252C, 0, "SF060000" }, - { 0x2534, 0, "SF070000" }, - { 0x251C, 0, "SF080000" }, - { 0x2524, 0, "SF090000" }, - { 0x2500, 0, "SF100000" }, - { 0x2502, 0, "SF110000" }, - { 0x2561, 0, "SF190000" }, - { 0x2562, 0, "SF200000" }, - { 0x2556, 0, "SF210000" }, - { 0x2555, 0, "SF220000" }, - { 0x2563, 0, "SF230000" }, - { 0x2551, 0, "SF240000" }, - { 0x2557, 0, "SF250000" }, - { 0x255D, 0, "SF260000" }, - { 0x255C, 0, "SF270000" }, - { 0x255B, 0, "SF280000" }, - { 0x255E, 0, "SF360000" }, - { 0x255F, 0, "SF370000" }, - { 0x255A, 0, "SF380000" }, - { 0x2554, 0, "SF390000" }, - { 0x2569, 0, "SF400000" }, - { 0x2566, 0, "SF410000" }, - { 0x2560, 0, "SF420000" }, - { 0x2550, 0, "SF430000" }, - { 0x256C, 0, "SF440000" }, - { 0x2567, 0, "SF450000" }, - { 0x2568, 0, "SF460000" }, - { 0x2564, 0, "SF470000" }, - { 0x2565, 0, "SF480000" }, - { 0x2559, 0, "SF490000" }, - { 0x2558, 0, "SF500000" }, - { 0x2552, 0, "SF510000" }, - { 0x2553, 0, "SF520000" }, - { 0x256B, 0, "SF530000" }, - { 0x256A, 0, "SF540000" }, - { 0x015A, 0, "Sacute" }, - { 0x0160, 0, "Scaron" }, - { 0xF6FD, 0, "Scaronsmall" }, - { 0x015E, 0, "Scedilla" }, - { 0xF6C1, 0, "Scedilla" }, - { 0x015C, 0, "Scircumflex" }, - { 0x0218, 0, "Scommaaccent" }, - { 0x03A3, 0, "Sigma" }, - { 0xF773, 0, "Ssmall" }, - { 0x0054, 0124, "T" }, - { 0x03A4, 0, "Tau" }, - { 0x0166, 0, "Tbar" }, - { 0x0164, 0, "Tcaron" }, - { 0x0162, 0, "Tcommaaccent" }, - { 0x021A, 0, "Tcommaaccent" }, - { 0x0398, 0, "Theta" }, - { 0x00DE, 0, "Thorn" }, - { 0xF7FE, 0, "Thornsmall" }, - { 0xF6FE, 0, "Tildesmall" }, - { 0xF774, 0, "Tsmall" }, - { 0x0055, 0125, "U" }, - { 0x00DA, 0, "Uacute" }, - { 0xF7FA, 0, "Uacutesmall" }, - { 0x016C, 0, "Ubreve" }, - { 0x00DB, 0, "Ucircumflex" }, - { 0xF7FB, 0, "Ucircumflexsmall" }, - { 0x00DC, 0, "Udieresis" }, - { 0xF7FC, 0, "Udieresissmall" }, - { 0x00D9, 0, "Ugrave" }, - { 0xF7F9, 0, "Ugravesmall" }, - { 0x01AF, 0, "Uhorn" }, - { 0x0170, 0, "Uhungarumlaut" }, - { 0x016A, 0, "Umacron" }, - { 0x0172, 0, "Uogonek" }, - { 0x03A5, 0, "Upsilon" }, - { 0x03D2, 0, "Upsilon1" }, - { 0x03AB, 0, "Upsilondieresis" }, - { 0x038E, 0, "Upsilontonos" }, - { 0x016E, 0, "Uring" }, - { 0xF775, 0, "Usmall" }, - { 0x0168, 0, "Utilde" }, - { 0x0056, 0126, "V" }, - { 0xF776, 0, "Vsmall" }, - { 0x0057, 0127, "W" }, - { 0x1E82, 0, "Wacute" }, - { 0x0174, 0, "Wcircumflex" }, - { 0x1E84, 0, "Wdieresis" }, - { 0x1E80, 0, "Wgrave" }, - { 0xF777, 0, "Wsmall" }, - { 0x0058, 0130, "X" }, - { 0x039E, 0, "Xi" }, - { 0xF778, 0, "Xsmall" }, - { 0x0059, 0131, "Y" }, - { 0x00DD, 0, "Yacute" }, - { 0xF7FD, 0, "Yacutesmall" }, - { 0x0176, 0, "Ycircumflex" }, - { 0x0178, 0, "Ydieresis" }, - { 0xF7FF, 0, "Ydieresissmall" }, - { 0x1EF2, 0, "Ygrave" }, - { 0xF779, 0, "Ysmall" }, - { 0x005A, 0132, "Z" }, - { 0x0179, 0, "Zacute" }, - { 0x017D, 0, "Zcaron" }, - { 0xF6FF, 0, "Zcaronsmall" }, - { 0x017B, 0, "Zdotaccent" }, - { 0x0396, 0, "Zeta" }, - { 0xF77A, 0, "Zsmall" }, - { 0x0061, 0141, "a" }, - { 0x00E1, 0, "aacute" }, - { 0x0103, 0, "abreve" }, - { 0x00E2, 0, "acircumflex" }, - { 0x00B4, 0302, "acute" }, - { 0x0301, 0, "acutecomb" }, - { 0x00E4, 0, "adieresis" }, - { 0x00E6, 0361, "ae" }, - { 0x01FD, 0, "aeacute" }, - { 0x2015, 0, "afii00208" }, - { 0x0410, 0, "afii10017" }, - { 0x0411, 0, "afii10018" }, - { 0x0412, 0, "afii10019" }, - { 0x0413, 0, "afii10020" }, - { 0x0414, 0, "afii10021" }, - { 0x0415, 0, "afii10022" }, - { 0x0401, 0, "afii10023" }, - { 0x0416, 0, "afii10024" }, - { 0x0417, 0, "afii10025" }, - { 0x0418, 0, "afii10026" }, - { 0x0419, 0, "afii10027" }, - { 0x041A, 0, "afii10028" }, - { 0x041B, 0, "afii10029" }, - { 0x041C, 0, "afii10030" }, - { 0x041D, 0, "afii10031" }, - { 0x041E, 0, "afii10032" }, - { 0x041F, 0, "afii10033" }, - { 0x0420, 0, "afii10034" }, - { 0x0421, 0, "afii10035" }, - { 0x0422, 0, "afii10036" }, - { 0x0423, 0, "afii10037" }, - { 0x0424, 0, "afii10038" }, - { 0x0425, 0, "afii10039" }, - { 0x0426, 0, "afii10040" }, - { 0x0427, 0, "afii10041" }, - { 0x0428, 0, "afii10042" }, - { 0x0429, 0, "afii10043" }, - { 0x042A, 0, "afii10044" }, - { 0x042B, 0, "afii10045" }, - { 0x042C, 0, "afii10046" }, - { 0x042D, 0, "afii10047" }, - { 0x042E, 0, "afii10048" }, - { 0x042F, 0, "afii10049" }, - { 0x0490, 0, "afii10050" }, - { 0x0402, 0, "afii10051" }, - { 0x0403, 0, "afii10052" }, - { 0x0404, 0, "afii10053" }, - { 0x0405, 0, "afii10054" }, - { 0x0406, 0, "afii10055" }, - { 0x0407, 0, "afii10056" }, - { 0x0408, 0, "afii10057" }, - { 0x0409, 0, "afii10058" }, - { 0x040A, 0, "afii10059" }, - { 0x040B, 0, "afii10060" }, - { 0x040C, 0, "afii10061" }, - { 0x040E, 0, "afii10062" }, - { 0xF6C4, 0, "afii10063" }, - { 0xF6C5, 0, "afii10064" }, - { 0x0430, 0, "afii10065" }, - { 0x0431, 0, "afii10066" }, - { 0x0432, 0, "afii10067" }, - { 0x0433, 0, "afii10068" }, - { 0x0434, 0, "afii10069" }, - { 0x0435, 0, "afii10070" }, - { 0x0451, 0, "afii10071" }, - { 0x0436, 0, "afii10072" }, - { 0x0437, 0, "afii10073" }, - { 0x0438, 0, "afii10074" }, - { 0x0439, 0, "afii10075" }, - { 0x043A, 0, "afii10076" }, - { 0x043B, 0, "afii10077" }, - { 0x043C, 0, "afii10078" }, - { 0x043D, 0, "afii10079" }, - { 0x043E, 0, "afii10080" }, - { 0x043F, 0, "afii10081" }, - { 0x0440, 0, "afii10082" }, - { 0x0441, 0, "afii10083" }, - { 0x0442, 0, "afii10084" }, - { 0x0443, 0, "afii10085" }, - { 0x0444, 0, "afii10086" }, - { 0x0445, 0, "afii10087" }, - { 0x0446, 0, "afii10088" }, - { 0x0447, 0, "afii10089" }, - { 0x0448, 0, "afii10090" }, - { 0x0449, 0, "afii10091" }, - { 0x044A, 0, "afii10092" }, - { 0x044B, 0, "afii10093" }, - { 0x044C, 0, "afii10094" }, - { 0x044D, 0, "afii10095" }, - { 0x044E, 0, "afii10096" }, - { 0x044F, 0, "afii10097" }, - { 0x0491, 0, "afii10098" }, - { 0x0452, 0, "afii10099" }, - { 0x0453, 0, "afii10100" }, - { 0x0454, 0, "afii10101" }, - { 0x0455, 0, "afii10102" }, - { 0x0456, 0, "afii10103" }, - { 0x0457, 0, "afii10104" }, - { 0x0458, 0, "afii10105" }, - { 0x0459, 0, "afii10106" }, - { 0x045A, 0, "afii10107" }, - { 0x045B, 0, "afii10108" }, - { 0x045C, 0, "afii10109" }, - { 0x045E, 0, "afii10110" }, - { 0x040F, 0, "afii10145" }, - { 0x0462, 0, "afii10146" }, - { 0x0472, 0, "afii10147" }, - { 0x0474, 0, "afii10148" }, - { 0xF6C6, 0, "afii10192" }, - { 0x045F, 0, "afii10193" }, - { 0x0463, 0, "afii10194" }, - { 0x0473, 0, "afii10195" }, - { 0x0475, 0, "afii10196" }, - { 0xF6C7, 0, "afii10831" }, - { 0xF6C8, 0, "afii10832" }, - { 0x04D9, 0, "afii10846" }, - { 0x200E, 0, "afii299" }, - { 0x200F, 0, "afii300" }, - { 0x200D, 0, "afii301" }, - { 0x066A, 0, "afii57381" }, - { 0x060C, 0, "afii57388" }, - { 0x0660, 0, "afii57392" }, - { 0x0661, 0, "afii57393" }, - { 0x0662, 0, "afii57394" }, - { 0x0663, 0, "afii57395" }, - { 0x0664, 0, "afii57396" }, - { 0x0665, 0, "afii57397" }, - { 0x0666, 0, "afii57398" }, - { 0x0667, 0, "afii57399" }, - { 0x0668, 0, "afii57400" }, - { 0x0669, 0, "afii57401" }, - { 0x061B, 0, "afii57403" }, - { 0x061F, 0, "afii57407" }, - { 0x0621, 0, "afii57409" }, - { 0x0622, 0, "afii57410" }, - { 0x0623, 0, "afii57411" }, - { 0x0624, 0, "afii57412" }, - { 0x0625, 0, "afii57413" }, - { 0x0626, 0, "afii57414" }, - { 0x0627, 0, "afii57415" }, - { 0x0628, 0, "afii57416" }, - { 0x0629, 0, "afii57417" }, - { 0x062A, 0, "afii57418" }, - { 0x062B, 0, "afii57419" }, - { 0x062C, 0, "afii57420" }, - { 0x062D, 0, "afii57421" }, - { 0x062E, 0, "afii57422" }, - { 0x062F, 0, "afii57423" }, - { 0x0630, 0, "afii57424" }, - { 0x0631, 0, "afii57425" }, - { 0x0632, 0, "afii57426" }, - { 0x0633, 0, "afii57427" }, - { 0x0634, 0, "afii57428" }, - { 0x0635, 0, "afii57429" }, - { 0x0636, 0, "afii57430" }, - { 0x0637, 0, "afii57431" }, - { 0x0638, 0, "afii57432" }, - { 0x0639, 0, "afii57433" }, - { 0x063A, 0, "afii57434" }, - { 0x0640, 0, "afii57440" }, - { 0x0641, 0, "afii57441" }, - { 0x0642, 0, "afii57442" }, - { 0x0643, 0, "afii57443" }, - { 0x0644, 0, "afii57444" }, - { 0x0645, 0, "afii57445" }, - { 0x0646, 0, "afii57446" }, - { 0x0648, 0, "afii57448" }, - { 0x0649, 0, "afii57449" }, - { 0x064A, 0, "afii57450" }, - { 0x064B, 0, "afii57451" }, - { 0x064C, 0, "afii57452" }, - { 0x064D, 0, "afii57453" }, - { 0x064E, 0, "afii57454" }, - { 0x064F, 0, "afii57455" }, - { 0x0650, 0, "afii57456" }, - { 0x0651, 0, "afii57457" }, - { 0x0652, 0, "afii57458" }, - { 0x0647, 0, "afii57470" }, - { 0x06A4, 0, "afii57505" }, - { 0x067E, 0, "afii57506" }, - { 0x0686, 0, "afii57507" }, - { 0x0698, 0, "afii57508" }, - { 0x06AF, 0, "afii57509" }, - { 0x0679, 0, "afii57511" }, - { 0x0688, 0, "afii57512" }, - { 0x0691, 0, "afii57513" }, - { 0x06BA, 0, "afii57514" }, - { 0x06D2, 0, "afii57519" }, - { 0x06D5, 0, "afii57534" }, - { 0x20AA, 0, "afii57636" }, - { 0x05BE, 0, "afii57645" }, - { 0x05C3, 0, "afii57658" }, - { 0x05D0, 0, "afii57664" }, - { 0x05D1, 0, "afii57665" }, - { 0x05D2, 0, "afii57666" }, - { 0x05D3, 0, "afii57667" }, - { 0x05D4, 0, "afii57668" }, - { 0x05D5, 0, "afii57669" }, - { 0x05D6, 0, "afii57670" }, - { 0x05D7, 0, "afii57671" }, - { 0x05D8, 0, "afii57672" }, - { 0x05D9, 0, "afii57673" }, - { 0x05DA, 0, "afii57674" }, - { 0x05DB, 0, "afii57675" }, - { 0x05DC, 0, "afii57676" }, - { 0x05DD, 0, "afii57677" }, - { 0x05DE, 0, "afii57678" }, - { 0x05DF, 0, "afii57679" }, - { 0x05E0, 0, "afii57680" }, - { 0x05E1, 0, "afii57681" }, - { 0x05E2, 0, "afii57682" }, - { 0x05E3, 0, "afii57683" }, - { 0x05E4, 0, "afii57684" }, - { 0x05E5, 0, "afii57685" }, - { 0x05E6, 0, "afii57686" }, - { 0x05E7, 0, "afii57687" }, - { 0x05E8, 0, "afii57688" }, - { 0x05E9, 0, "afii57689" }, - { 0x05EA, 0, "afii57690" }, - { 0xFB2A, 0, "afii57694" }, - { 0xFB2B, 0, "afii57695" }, - { 0xFB4B, 0, "afii57700" }, - { 0xFB1F, 0, "afii57705" }, - { 0x05F0, 0, "afii57716" }, - { 0x05F1, 0, "afii57717" }, - { 0x05F2, 0, "afii57718" }, - { 0xFB35, 0, "afii57723" }, - { 0x05B4, 0, "afii57793" }, - { 0x05B5, 0, "afii57794" }, - { 0x05B6, 0, "afii57795" }, - { 0x05BB, 0, "afii57796" }, - { 0x05B8, 0, "afii57797" }, - { 0x05B7, 0, "afii57798" }, - { 0x05B0, 0, "afii57799" }, - { 0x05B2, 0, "afii57800" }, - { 0x05B1, 0, "afii57801" }, - { 0x05B3, 0, "afii57802" }, - { 0x05C2, 0, "afii57803" }, - { 0x05C1, 0, "afii57804" }, - { 0x05B9, 0, "afii57806" }, - { 0x05BC, 0, "afii57807" }, - { 0x05BD, 0, "afii57839" }, - { 0x05BF, 0, "afii57841" }, - { 0x05C0, 0, "afii57842" }, - { 0x02BC, 0, "afii57929" }, - { 0x2105, 0, "afii61248" }, - { 0x2113, 0, "afii61289" }, - { 0x2116, 0, "afii61352" }, - { 0x202C, 0, "afii61573" }, - { 0x202D, 0, "afii61574" }, - { 0x202E, 0, "afii61575" }, - { 0x200C, 0, "afii61664" }, - { 0x066D, 0, "afii63167" }, - { 0x02BD, 0, "afii64937" }, - { 0x00E0, 0, "agrave" }, - { 0x2135, 0, "aleph" }, - { 0x03B1, 0, "alpha" }, - { 0x03AC, 0, "alphatonos" }, - { 0x0101, 0, "amacron" }, - { 0x0026, 046, "ampersand" }, - { 0xF726, 0, "ampersandsmall" }, - { 0x2220, 0, "angle" }, - { 0x2329, 0, "angleleft" }, - { 0x232A, 0, "angleright" }, - { 0x0387, 0, "anoteleia" }, - { 0x0105, 0, "aogonek" }, - { 0x2248, 0, "approxequal" }, - { 0x00E5, 0, "aring" }, - { 0x01FB, 0, "aringacute" }, - { 0x2194, 0, "arrowboth" }, - { 0x21D4, 0, "arrowdblboth" }, - { 0x21D3, 0, "arrowdbldown" }, - { 0x21D0, 0, "arrowdblleft" }, - { 0x21D2, 0, "arrowdblright" }, - { 0x21D1, 0, "arrowdblup" }, - { 0x2193, 0, "arrowdown" }, - { 0xF8E7, 0, "arrowhorizex" }, - { 0x2190, 0, "arrowleft" }, - { 0x2192, 0, "arrowright" }, - { 0x2191, 0, "arrowup" }, - { 0x2195, 0, "arrowupdn" }, - { 0x21A8, 0, "arrowupdnbse" }, - { 0xF8E6, 0, "arrowvertex" }, - { 0x005E, 0136, "asciicircum" }, - { 0x007E, 0176, "asciitilde" }, - { 0x002A, 052, "asterisk" }, - { 0x2217, 0, "asteriskmath" }, - { 0xF6E9, 0, "asuperior" }, - { 0x0040, 0100, "at" }, - { 0x00E3, 0, "atilde" }, - { 0x0062, 0142, "b" }, - { 0x005C, 0134, "backslash" }, - { 0x007C, 0174, "bar" }, - { 0x03B2, 0, "beta" }, - { 0x2588, 0, "block" }, - { 0xF8F4, 0, "braceex" }, - { 0x007B, 0173, "braceleft" }, - { 0xF8F3, 0, "braceleftbt" }, - { 0xF8F2, 0, "braceleftmid" }, - { 0xF8F1, 0, "bracelefttp" }, - { 0x007D, 0175, "braceright" }, - { 0xF8FE, 0, "bracerightbt" }, - { 0xF8FD, 0, "bracerightmid" }, - { 0xF8FC, 0, "bracerighttp" }, - { 0x005B, 0133, "bracketleft" }, - { 0xF8F0, 0, "bracketleftbt" }, - { 0xF8EF, 0, "bracketleftex" }, - { 0xF8EE, 0, "bracketlefttp" }, - { 0x005D, 0135, "bracketright" }, - { 0xF8FB, 0, "bracketrightbt" }, - { 0xF8FA, 0, "bracketrightex" }, - { 0xF8F9, 0, "bracketrighttp" }, - { 0x02D8, 0306, "breve" }, - { 0x00A6, 0, "brokenbar" }, - { 0xF6EA, 0, "bsuperior" }, - { 0x2022, 0267, "bullet" }, - { 0x0063, 0143, "c" }, - { 0x0107, 0, "cacute" }, - { 0x02C7, 0317, "caron" }, - { 0x21B5, 0, "carriagereturn" }, - { 0x010D, 0, "ccaron" }, - { 0x00E7, 0, "ccedilla" }, - { 0x0109, 0, "ccircumflex" }, - { 0x010B, 0, "cdotaccent" }, - { 0x00B8, 0313, "cedilla" }, - { 0x00A2, 0242, "cent" }, - { 0xF6DF, 0, "centinferior" }, - { 0xF7A2, 0, "centoldstyle" }, - { 0xF6E0, 0, "centsuperior" }, - { 0x03C7, 0, "chi" }, - { 0x25CB, 0, "circle" }, - { 0x2297, 0, "circlemultiply" }, - { 0x2295, 0, "circleplus" }, - { 0x02C6, 0303, "circumflex" }, - { 0x2663, 0, "club" }, - { 0x003A, 072, "colon" }, - { 0x20A1, 0, "colonmonetary" }, - { 0x002C, 054, "comma" }, - { 0xF6C3, 0, "commaaccent" }, - { 0xF6E1, 0, "commainferior" }, - { 0xF6E2, 0, "commasuperior" }, - { 0x2245, 0, "congruent" }, - { 0x00A9, 0, "copyright" }, - { 0xF8E9, 0, "copyrightsans" }, - { 0xF6D9, 0, "copyrightserif" }, - { 0x00A4, 0250, "currency" }, - { 0xF6D1, 0, "cyrBreve" }, - { 0xF6D2, 0, "cyrFlex" }, - { 0xF6D4, 0, "cyrbreve" }, - { 0xF6D5, 0, "cyrflex" }, - { 0x0064, 0144, "d" }, - { 0x2020, 0262, "dagger" }, - { 0x2021, 0263, "daggerdbl" }, - { 0xF6D3, 0, "dblGrave" }, - { 0xF6D6, 0, "dblgrave" }, - { 0x010F, 0, "dcaron" }, - { 0x0111, 0, "dcroat" }, - { 0x00B0, 0, "degree" }, - { 0x03B4, 0, "delta" }, - { 0x2666, 0, "diamond" }, - { 0x00A8, 0310, "dieresis" }, - { 0xF6D7, 0, "dieresisacute" }, - { 0xF6D8, 0, "dieresisgrave" }, - { 0x0385, 0, "dieresistonos" }, - { 0x00F7, 0, "divide" }, - { 0x2593, 0, "dkshade" }, - { 0x2584, 0, "dnblock" }, - { 0x0024, 044, "dollar" }, - { 0xF6E3, 0, "dollarinferior" }, - { 0xF724, 0, "dollaroldstyle" }, - { 0xF6E4, 0, "dollarsuperior" }, - { 0x20AB, 0, "dong" }, - { 0x02D9, 0307, "dotaccent" }, - { 0x0323, 0, "dotbelowcomb" }, - { 0x0131, 0365, "dotlessi" }, - { 0xF6BE, 0, "dotlessj" }, - { 0x22C5, 0, "dotmath" }, - { 0xF6EB, 0, "dsuperior" }, - { 0x0065, 0145, "e" }, - { 0x00E9, 0, "eacute" }, - { 0x0115, 0, "ebreve" }, - { 0x011B, 0, "ecaron" }, - { 0x00EA, 0, "ecircumflex" }, - { 0x00EB, 0, "edieresis" }, - { 0x0117, 0, "edotaccent" }, - { 0x00E8, 0, "egrave" }, - { 0x0038, 070, "eight" }, - { 0x2088, 0, "eightinferior" }, - { 0xF738, 0, "eightoldstyle" }, - { 0x2078, 0, "eightsuperior" }, - { 0x2208, 0, "element" }, - { 0x2026, 0274, "ellipsis" }, - { 0x0113, 0, "emacron" }, - { 0x2014, 0320, "emdash" }, - { 0x2205, 0, "emptyset" }, - { 0x2013, 0261, "endash" }, - { 0x014B, 0, "eng" }, - { 0x0119, 0, "eogonek" }, - { 0x03B5, 0, "epsilon" }, - { 0x03AD, 0, "epsilontonos" }, - { 0x003D, 075, "equal" }, - { 0x2261, 0, "equivalence" }, - { 0x212E, 0, "estimated" }, - { 0xF6EC, 0, "esuperior" }, - { 0x03B7, 0, "eta" }, - { 0x03AE, 0, "etatonos" }, - { 0x00F0, 0, "eth" }, - { 0x0021, 041, "exclam" }, - { 0x203C, 0, "exclamdbl" }, - { 0x00A1, 0241, "exclamdown" }, - { 0xF7A1, 0, "exclamdownsmall" }, - { 0xF721, 0, "exclamsmall" }, - { 0x2203, 0, "existential" }, - { 0x0066, 0146, "f" }, - { 0x2640, 0, "female" }, - { 0xFB00, 0, "ff" }, - { 0xFB03, 0, "ffi" }, - { 0xFB04, 0, "ffl" }, - { 0xFB01, 0256, "fi" }, - { 0x2012, 0, "figuredash" }, - { 0x25A0, 0, "filledbox" }, - { 0x25AC, 0, "filledrect" }, - { 0x0035, 065, "five" }, - { 0x215D, 0, "fiveeighths" }, - { 0x2085, 0, "fiveinferior" }, - { 0xF735, 0, "fiveoldstyle" }, - { 0x2075, 0, "fivesuperior" }, - { 0xFB02, 0257, "fl" }, - { 0x0192, 0246, "florin" }, - { 0x0034, 064, "four" }, - { 0x2084, 0, "fourinferior" }, - { 0xF734, 0, "fouroldstyle" }, - { 0x2074, 0, "foursuperior" }, - { 0x2044, 0244, "fraction" }, - { 0x2215, 0244, "fraction" }, - { 0x20A3, 0, "franc" }, - { 0x0067, 0147, "g" }, - { 0x03B3, 0, "gamma" }, - { 0x011F, 0, "gbreve" }, - { 0x01E7, 0, "gcaron" }, - { 0x011D, 0, "gcircumflex" }, - { 0x0123, 0, "gcommaaccent" }, - { 0x0121, 0, "gdotaccent" }, - { 0x00DF, 0373, "germandbls" }, - { 0x2207, 0, "gradient" }, - { 0x0060, 0301, "grave" }, - { 0x0300, 0, "gravecomb" }, - { 0x003E, 076, "greater" }, - { 0x2265, 0, "greaterequal" }, - { 0x00AB, 0253, "guillemotleft" }, - { 0x00BB, 0273, "guillemotright" }, - { 0x2039, 0254, "guilsinglleft" }, - { 0x203A, 0255, "guilsinglright" }, - { 0x0068, 0150, "h" }, - { 0x0127, 0, "hbar" }, - { 0x0125, 0, "hcircumflex" }, - { 0x2665, 0, "heart" }, - { 0x0309, 0, "hookabovecomb" }, - { 0x2302, 0, "house" }, - { 0x02DD, 0315, "hungarumlaut" }, - { 0x002D, 055, "hyphen" }, - { 0x00AD, 0, "hyphen" }, - { 0xF6E5, 0, "hypheninferior" }, - { 0xF6E6, 0, "hyphensuperior" }, - { 0x0069, 0151, "i" }, - { 0x00ED, 0, "iacute" }, - { 0x012D, 0, "ibreve" }, - { 0x00EE, 0, "icircumflex" }, - { 0x00EF, 0, "idieresis" }, - { 0x00EC, 0, "igrave" }, - { 0x0133, 0, "ij" }, - { 0x012B, 0, "imacron" }, - { 0x221E, 0, "infinity" }, - { 0x222B, 0, "integral" }, - { 0x2321, 0, "integralbt" }, - { 0xF8F5, 0, "integralex" }, - { 0x2320, 0, "integraltp" }, - { 0x2229, 0, "intersection" }, - { 0x25D8, 0, "invbullet" }, - { 0x25D9, 0, "invcircle" }, - { 0x263B, 0, "invsmileface" }, - { 0x012F, 0, "iogonek" }, - { 0x03B9, 0, "iota" }, - { 0x03CA, 0, "iotadieresis" }, - { 0x0390, 0, "iotadieresistonos" }, - { 0x03AF, 0, "iotatonos" }, - { 0xF6ED, 0, "isuperior" }, - { 0x0129, 0, "itilde" }, - { 0x006A, 0152, "j" }, - { 0x0135, 0, "jcircumflex" }, - { 0x006B, 0153, "k" }, - { 0x03BA, 0, "kappa" }, - { 0x0137, 0, "kcommaaccent" }, - { 0x0138, 0, "kgreenlandic" }, - { 0x006C, 0154, "l" }, - { 0x013A, 0, "lacute" }, - { 0x03BB, 0, "lambda" }, - { 0x013E, 0, "lcaron" }, - { 0x013C, 0, "lcommaaccent" }, - { 0x0140, 0, "ldot" }, - { 0x003C, 074, "less" }, - { 0x2264, 0, "lessequal" }, - { 0x258C, 0, "lfblock" }, - { 0x20A4, 0, "lira" }, - { 0xF6C0, 0, "ll" }, - { 0x2227, 0, "logicaland" }, - { 0x00AC, 0, "logicalnot" }, - { 0x2228, 0, "logicalor" }, - { 0x017F, 0, "longs" }, - { 0x25CA, 0, "lozenge" }, - { 0x0142, 0370, "lslash" }, - { 0xF6EE, 0, "lsuperior" }, - { 0x2591, 0, "ltshade" }, - { 0x006D, 0155, "m" }, - { 0x00AF, 0305, "macron" }, - { 0x02C9, 0305, "macron" }, - { 0x2642, 0, "male" }, - { 0x2212, 0, "minus" }, - { 0x2032, 0, "minute" }, - { 0xF6EF, 0, "msuperior" }, - { 0x00B5, 0, "mu" }, - { 0x03BC, 0, "mu" }, - { 0x00D7, 0, "multiply" }, - { 0x266A, 0, "musicalnote" }, - { 0x266B, 0, "musicalnotedbl" }, - { 0x006E, 0156, "n" }, - { 0x0144, 0, "nacute" }, - { 0x0149, 0, "napostrophe" }, - { 0x0148, 0, "ncaron" }, - { 0x0146, 0, "ncommaaccent" }, - { 0x0039, 071, "nine" }, - { 0x2089, 0, "nineinferior" }, - { 0xF739, 0, "nineoldstyle" }, - { 0x2079, 0, "ninesuperior" }, - { 0x2209, 0, "notelement" }, - { 0x2260, 0, "notequal" }, - { 0x2284, 0, "notsubset" }, - { 0x207F, 0, "nsuperior" }, - { 0x00F1, 0, "ntilde" }, - { 0x03BD, 0, "nu" }, - { 0x0023, 043, "numbersign" }, - { 0x006F, 0157, "o" }, - { 0x00F3, 0, "oacute" }, - { 0x014F, 0, "obreve" }, - { 0x00F4, 0, "ocircumflex" }, - { 0x00F6, 0, "odieresis" }, - { 0x0153, 0372, "oe" }, - { 0x02DB, 0316, "ogonek" }, - { 0x00F2, 0, "ograve" }, - { 0x01A1, 0, "ohorn" }, - { 0x0151, 0, "ohungarumlaut" }, - { 0x014D, 0, "omacron" }, - { 0x03C9, 0, "omega" }, - { 0x03D6, 0, "omega1" }, - { 0x03CE, 0, "omegatonos" }, - { 0x03BF, 0, "omicron" }, - { 0x03CC, 0, "omicrontonos" }, - { 0x0031, 061, "one" }, - { 0x2024, 0, "onedotenleader" }, - { 0x215B, 0, "oneeighth" }, - { 0xF6DC, 0, "onefitted" }, - { 0x00BD, 0, "onehalf" }, - { 0x2081, 0, "oneinferior" }, - { 0xF731, 0, "oneoldstyle" }, - { 0x00BC, 0, "onequarter" }, - { 0x00B9, 0, "onesuperior" }, - { 0x2153, 0, "onethird" }, - { 0x25E6, 0, "openbullet" }, - { 0x00AA, 0343, "ordfeminine" }, - { 0x00BA, 0353, "ordmasculine" }, - { 0x221F, 0, "orthogonal" }, - { 0x00F8, 0371, "oslash" }, - { 0x01FF, 0, "oslashacute" }, - { 0xF6F0, 0, "osuperior" }, - { 0x00F5, 0, "otilde" }, - { 0x0070, 0160, "p" }, - { 0x00B6, 0266, "paragraph" }, - { 0x0028, 050, "parenleft" }, - { 0xF8ED, 0, "parenleftbt" }, - { 0xF8EC, 0, "parenleftex" }, - { 0x208D, 0, "parenleftinferior" }, - { 0x207D, 0, "parenleftsuperior" }, - { 0xF8EB, 0, "parenlefttp" }, - { 0x0029, 051, "parenright" }, - { 0xF8F8, 0, "parenrightbt" }, - { 0xF8F7, 0, "parenrightex" }, - { 0x208E, 0, "parenrightinferior" }, - { 0x207E, 0, "parenrightsuperior" }, - { 0xF8F6, 0, "parenrighttp" }, - { 0x2202, 0, "partialdiff" }, - { 0x0025, 045, "percent" }, - { 0x002E, 056, "period" }, - { 0x00B7, 0264, "periodcentered" }, - { 0x2219, 0, "periodcentered" }, - { 0xF6E7, 0, "periodinferior" }, - { 0xF6E8, 0, "periodsuperior" }, - { 0x22A5, 0, "perpendicular" }, - { 0x2030, 0275, "perthousand" }, - { 0x20A7, 0, "peseta" }, - { 0x03C6, 0, "phi" }, - { 0x03D5, 0, "phi1" }, - { 0x03C0, 0, "pi" }, - { 0x002B, 053, "plus" }, - { 0x00B1, 0, "plusminus" }, - { 0x211E, 0, "prescription" }, - { 0x220F, 0, "product" }, - { 0x2282, 0, "propersubset" }, - { 0x2283, 0, "propersuperset" }, - { 0x221D, 0, "proportional" }, - { 0x03C8, 0, "psi" }, - { 0x0071, 0161, "q" }, - { 0x003F, 077, "question" }, - { 0x00BF, 0277, "questiondown" }, - { 0xF7BF, 0, "questiondownsmall" }, - { 0xF73F, 0, "questionsmall" }, - { 0x0022, 042, "quotedbl" }, - { 0x201E, 0271, "quotedblbase" }, - { 0x201C, 0252, "quotedblleft" }, - { 0x201D, 0272, "quotedblright" }, - { 0x2018, 0140, "quoteleft" }, - { 0x201B, 0, "quotereversed" }, - { 0x2019, 047, "quoteright" }, - { 0x201A, 0270, "quotesinglbase" }, - { 0x0027, 0251, "quotesingle" }, - { 0x0072, 0162, "r" }, - { 0x0155, 0, "racute" }, - { 0x221A, 0, "radical" }, - { 0xF8E5, 0, "radicalex" }, - { 0x0159, 0, "rcaron" }, - { 0x0157, 0, "rcommaaccent" }, - { 0x2286, 0, "reflexsubset" }, - { 0x2287, 0, "reflexsuperset" }, - { 0x00AE, 0, "registered" }, - { 0xF8E8, 0, "registersans" }, - { 0xF6DA, 0, "registerserif" }, - { 0x2310, 0, "revlogicalnot" }, - { 0x03C1, 0, "rho" }, - { 0x02DA, 0312, "ring" }, - { 0xF6F1, 0, "rsuperior" }, - { 0x2590, 0, "rtblock" }, - { 0xF6DD, 0, "rupiah" }, - { 0x0073, 0163, "s" }, - { 0x015B, 0, "sacute" }, - { 0x0161, 0, "scaron" }, - { 0x015F, 0, "scedilla" }, - { 0xF6C2, 0, "scedilla" }, - { 0x015D, 0, "scircumflex" }, - { 0x0219, 0, "scommaaccent" }, - { 0x2033, 0, "second" }, - { 0x00A7, 0247, "section" }, - { 0x003B, 073, "semicolon" }, - { 0x0037, 067, "seven" }, - { 0x215E, 0, "seveneighths" }, - { 0x2087, 0, "seveninferior" }, - { 0xF737, 0, "sevenoldstyle" }, - { 0x2077, 0, "sevensuperior" }, - { 0x2592, 0, "shade" }, - { 0x03C3, 0, "sigma" }, - { 0x03C2, 0, "sigma1" }, - { 0x223C, 0, "similar" }, - { 0x0036, 066, "six" }, - { 0x2086, 0, "sixinferior" }, - { 0xF736, 0, "sixoldstyle" }, - { 0x2076, 0, "sixsuperior" }, - { 0x002F, 057, "slash" }, - { 0x263A, 0, "smileface" }, - { 0x0020, 040, "space" }, - { 0x00A0, 040, "space" }, - { 0x2660, 0, "spade" }, - { 0xF6F2, 0, "ssuperior" }, - { 0x00A3, 0243, "sterling" }, - { 0x220B, 0, "suchthat" }, - { 0x2211, 0, "summation" }, - { 0x263C, 0, "sun" }, - { 0x0074, 0164, "t" }, - { 0x03C4, 0, "tau" }, - { 0x0167, 0, "tbar" }, - { 0x0165, 0, "tcaron" }, - { 0x0163, 0, "tcommaaccent" }, - { 0x021B, 0, "tcommaaccent" }, - { 0x2234, 0, "therefore" }, - { 0x03B8, 0, "theta" }, - { 0x03D1, 0, "theta1" }, - { 0x00FE, 0, "thorn" }, - { 0x0033, 063, "three" }, - { 0x215C, 0, "threeeighths" }, - { 0x2083, 0, "threeinferior" }, - { 0xF733, 0, "threeoldstyle" }, - { 0x00BE, 0, "threequarters" }, - { 0xF6DE, 0, "threequartersemdash" }, - { 0x00B3, 0, "threesuperior" }, - { 0x02DC, 0304, "tilde" }, - { 0x0303, 0, "tildecomb" }, - { 0x0384, 0, "tonos" }, - { 0x2122, 0, "trademark" }, - { 0xF8EA, 0, "trademarksans" }, - { 0xF6DB, 0, "trademarkserif" }, - { 0x25BC, 0, "triagdn" }, - { 0x25C4, 0, "triaglf" }, - { 0x25BA, 0, "triagrt" }, - { 0x25B2, 0, "triagup" }, - { 0xF6F3, 0, "tsuperior" }, - { 0x0032, 062, "two" }, - { 0x2025, 0, "twodotenleader" }, - { 0x2082, 0, "twoinferior" }, - { 0xF732, 0, "twooldstyle" }, - { 0x00B2, 0, "twosuperior" }, - { 0x2154, 0, "twothirds" }, - { 0x0075, 0165, "u" }, - { 0x00FA, 0, "uacute" }, - { 0x016D, 0, "ubreve" }, - { 0x00FB, 0, "ucircumflex" }, - { 0x00FC, 0, "udieresis" }, - { 0x00F9, 0, "ugrave" }, - { 0x01B0, 0, "uhorn" }, - { 0x0171, 0, "uhungarumlaut" }, - { 0x016B, 0, "umacron" }, - { 0x005F, 0137, "underscore" }, - { 0x2017, 0, "underscoredbl" }, - { 0x222A, 0, "union" }, - { 0x2200, 0, "universal" }, - { 0x0173, 0, "uogonek" }, - { 0x2580, 0, "upblock" }, - { 0x03C5, 0, "upsilon" }, - { 0x03CB, 0, "upsilondieresis" }, - { 0x03B0, 0, "upsilondieresistonos" }, - { 0x03CD, 0, "upsilontonos" }, - { 0x016F, 0, "uring" }, - { 0x0169, 0, "utilde" }, - { 0x0076, 0166, "v" }, - { 0x0077, 0167, "w" }, - { 0x1E83, 0, "wacute" }, - { 0x0175, 0, "wcircumflex" }, - { 0x1E85, 0, "wdieresis" }, - { 0x2118, 0, "weierstrass" }, - { 0x1E81, 0, "wgrave" }, - { 0x0078, 0170, "x" }, - { 0x03BE, 0, "xi" }, - { 0x0079, 0171, "y" }, - { 0x00FD, 0, "yacute" }, - { 0x0177, 0, "ycircumflex" }, - { 0x00FF, 0, "ydieresis" }, - { 0x00A5, 0245, "yen" }, - { 0x1EF3, 0, "ygrave" }, - { 0x007A, 0172, "z" }, - { 0x017A, 0, "zacute" }, - { 0x017E, 0, "zcaron" }, - { 0x017C, 0, "zdotaccent" }, - { 0x0030, 060, "zero" }, - { 0x2080, 0, "zeroinferior" }, - { 0xF730, 0, "zerooldstyle" }, - { 0x2070, 0, "zerosuperior" }, - { 0x03B6, 0, "zeta" } -}; diff --git a/vcl/unx/source/fontmanager/afm_hash.cpp b/vcl/unx/source/fontmanager/afm_hash.cpp deleted file mode 100755 index de01d8cd0434..000000000000 --- a/vcl/unx/source/fontmanager/afm_hash.cpp +++ /dev/null @@ -1,245 +0,0 @@ -/* C++ code produced by gperf version 3.0.1 */ -/* Command-line: gperf -C -t -l -L C++ -m 20 -Z AfmKeywordHash afm_keyword_list */ -/* Computed positions: -k'1,4,6,$' */ - -#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ - && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ - && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ - && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ - && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ - && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ - && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ - && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ - && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ - && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ - && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ - && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ - && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ - && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ - && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ - && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ - && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ - && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ - && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ - && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ - && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ - && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ - && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) -/* The character set is not based on ISO-646. */ -#error "gperf generated tables don't work with this execution character set. Please report a bug to ." -#endif - -#line 1 "afm_keyword_list" -struct hash_entry { const char* name; enum parseKey eKey; }; - -#define TOTAL_KEYWORDS 56 -#define MIN_WORD_LENGTH 1 -#define MAX_WORD_LENGTH 18 -#define MIN_HASH_VALUE 1 -#define MAX_HASH_VALUE 57 -/* maximum key range = 57, duplicates = 0 */ - -class AfmKeywordHash -{ -private: - static inline unsigned int hash (const char *str, unsigned int len); -public: - static const struct hash_entry *in_word_set (const char *str, unsigned int len); -}; - -inline unsigned int -AfmKeywordHash::hash (register const char *str, register unsigned int len) -{ - static const unsigned char asso_values[] = - { - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 28, 1, 0, 9, 0, - 19, 58, 2, 10, 58, 0, 28, 0, 20, 58, - 44, 58, 58, 0, 16, 10, 24, 2, 3, 58, - 58, 58, 58, 58, 58, 58, 58, 6, 58, 0, - 19, 0, 58, 25, 14, 6, 58, 58, 17, 11, - 0, 17, 39, 58, 0, 0, 10, 58, 58, 58, - 13, 4, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58 - }; - register int hval = len; - - switch (hval) - { - default: - hval += asso_values[(unsigned char)str[5]]; - /*FALLTHROUGH*/ - case 5: - case 4: - hval += asso_values[(unsigned char)str[3]]; - /*FALLTHROUGH*/ - case 3: - case 2: - case 1: - hval += asso_values[(unsigned char)str[0]]; - break; - } - return hval + asso_values[(unsigned char)str[len - 1]]; -} - -const struct hash_entry * -AfmKeywordHash::in_word_set (register const char *str, register unsigned int len) -{ - static const unsigned char lengthtable[] = - { - 0, 1, 2, 1, 2, 1, 3, 2, 3, 5, 10, 11, 12, 2, - 14, 15, 16, 11, 9, 13, 14, 12, 12, 14, 13, 9, 7, 9, - 7, 9, 14, 5, 6, 14, 12, 16, 10, 14, 11, 10, 7, 1, - 12, 8, 17, 18, 2, 3, 7, 1, 8, 8, 13, 6, 6, 8, - 0, 1 - }; - static const struct hash_entry wordlist[] = - { - {"",NOPE}, -#line 6 "afm_keyword_list" - {"C",CODE}, -#line 7 "afm_keyword_list" - {"CC",COMPCHAR}, -#line 5 "afm_keyword_list" - {"B",CHARBBOX}, -#line 8 "afm_keyword_list" - {"CH",CODEHEX}, -#line 54 "afm_keyword_list" - {"W",XYWIDTH}, -#line 33 "afm_keyword_list" - {"KPX",KERNPAIRXAMT}, -#line 56 "afm_keyword_list" - {"WX",XWIDTH}, -#line 55 "afm_keyword_list" - {"W0X",X0WIDTH}, -#line 47 "afm_keyword_list" - {"StdHW",STDHW}, -#line 12 "afm_keyword_list" - {"Characters",CHARACTERS}, -#line 36 "afm_keyword_list" - {"MetricsSets",METRICSSETS}, -#line 23 "afm_keyword_list" - {"EndKernPairs",ENDKERNPAIRS}, -#line 16 "afm_keyword_list" - {"Em",EM}, -#line 45 "afm_keyword_list" - {"StartKernPairs",STARTKERNPAIRS}, -#line 41 "afm_keyword_list" - {"StartComposites",STARTCOMPOSITES}, -#line 40 "afm_keyword_list" - {"StartCharMetrics",STARTCHARMETRICS}, -#line 22 "afm_keyword_list" - {"EndKernData",ENDKERNDATA}, -#line 14 "afm_keyword_list" - {"Descender",DESCENDER}, -#line 44 "afm_keyword_list" - {"StartKernData",STARTKERNDATA}, -#line 18 "afm_keyword_list" - {"EndCharMetrics",ENDCHARMETRICS}, -#line 20 "afm_keyword_list" - {"EndDirection",ENDDIRECTION}, -#line 11 "afm_keyword_list" - {"CharacterSet",CHARACTERSET}, -#line 42 "afm_keyword_list" - {"StartDirection",STARTDIRECTION}, -#line 19 "afm_keyword_list" - {"EndComposites",ENDCOMPOSITES}, -#line 49 "afm_keyword_list" - {"TrackKern",TRACKKERN}, -#line 15 "afm_keyword_list" - {"Descent",DESCENT}, -#line 9 "afm_keyword_list" - {"CapHeight",CAPHEIGHT}, -#line 13 "afm_keyword_list" - {"Comment",COMMENT}, -#line 10 "afm_keyword_list" - {"CharWidth",CHARWIDTH}, -#line 46 "afm_keyword_list" - {"StartTrackKern",STARTTRACKKERN}, -#line 48 "afm_keyword_list" - {"StdVW",STDVW}, -#line 38 "afm_keyword_list" - {"Notice",NOTICE}, -#line 21 "afm_keyword_list" - {"EndFontMetrics",ENDFONTMETRICS}, -#line 24 "afm_keyword_list" - {"EndTrackKern",ENDTRACKKERN}, -#line 43 "afm_keyword_list" - {"StartFontMetrics",STARTFONTMETRICS}, -#line 29 "afm_keyword_list" - {"IsBaseFont",ISBASEFONT}, -#line 17 "afm_keyword_list" - {"EncodingScheme",ENCODINGSCHEME}, -#line 31 "afm_keyword_list" - {"ItalicAngle",ITALICANGLE}, -#line 25 "afm_keyword_list" - {"FamilyName",FAMILYNAME}, -#line 58 "afm_keyword_list" - {"XHeight",XHEIGHT}, -#line 37 "afm_keyword_list" - {"N",CHARNAME}, -#line 30 "afm_keyword_list" - {"IsFixedPitch",ISFIXEDPITCH}, -#line 27 "afm_keyword_list" - {"FontName",FONTNAME}, -#line 50 "afm_keyword_list" - {"UnderlinePosition",UNDERLINEPOSITION}, -#line 51 "afm_keyword_list" - {"UnderlineThickness",UNDERLINETHICKNESS}, -#line 32 "afm_keyword_list" - {"KP",KERNPAIR}, -#line 39 "afm_keyword_list" - {"PCC",COMPCHARPIECE}, -#line 53 "afm_keyword_list" - {"Version",VERSION}, -#line 52 "afm_keyword_list" - {"V",VVECTOR}, -#line 28 "afm_keyword_list" - {"FullName",FULLNAME}, -#line 26 "afm_keyword_list" - {"FontBBox",FONTBBOX}, -#line 35 "afm_keyword_list" - {"MappingScheme",MAPPINGSCHEME}, -#line 57 "afm_keyword_list" - {"Weight",WEIGHT}, -#line 4 "afm_keyword_list" - {"Ascent",ASCENT}, -#line 3 "afm_keyword_list" - {"Ascender",ASCENDER}, - {"",NOPE}, -#line 34 "afm_keyword_list" - {"L",LIGATURE} - }; - - if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) - { - register int key = hash (str, len); - - if (key <= MAX_HASH_VALUE && key >= 0) - if (len == lengthtable[key]) - { - register const char *s = wordlist[key].name; - - if (*str == *s && !memcmp (str + 1, s + 1, len - 1)) - return &wordlist[key]; - } - } - return 0; -} diff --git a/vcl/unx/source/fontmanager/afm_keyword_list b/vcl/unx/source/fontmanager/afm_keyword_list deleted file mode 100755 index 263d76bca4d3..000000000000 --- a/vcl/unx/source/fontmanager/afm_keyword_list +++ /dev/null @@ -1,58 +0,0 @@ -struct hash_entry { char* name; enum parseKey eKey; }; -%% -Ascender,ASCENDER -Ascent,ASCENT -B,CHARBBOX -C,CODE -CC,COMPCHAR -CH,CODEHEX -CapHeight,CAPHEIGHT -CharWidth,CHARWIDTH -CharacterSet,CHARACTERSET -Characters,CHARACTERS -Comment,COMMENT -Descender,DESCENDER -Descent,DESCENT -Em,EM -EncodingScheme,ENCODINGSCHEME -EndCharMetrics,ENDCHARMETRICS -EndComposites,ENDCOMPOSITES -EndDirection,ENDDIRECTION -EndFontMetrics,ENDFONTMETRICS -EndKernData,ENDKERNDATA -EndKernPairs,ENDKERNPAIRS -EndTrackKern,ENDTRACKKERN -FamilyName,FAMILYNAME -FontBBox,FONTBBOX -FontName,FONTNAME -FullName,FULLNAME -IsBaseFont,ISBASEFONT -IsFixedPitch,ISFIXEDPITCH -ItalicAngle,ITALICANGLE -KP,KERNPAIR -KPX,KERNPAIRXAMT -L,LIGATURE -MappingScheme,MAPPINGSCHEME -MetricsSets,METRICSSETS -N,CHARNAME -Notice,NOTICE -PCC,COMPCHARPIECE -StartCharMetrics,STARTCHARMETRICS -StartComposites,STARTCOMPOSITES -StartDirection,STARTDIRECTION -StartFontMetrics,STARTFONTMETRICS -StartKernData,STARTKERNDATA -StartKernPairs,STARTKERNPAIRS -StartTrackKern,STARTTRACKKERN -StdHW,STDHW -StdVW,STDVW -TrackKern,TRACKKERN -UnderlinePosition,UNDERLINEPOSITION -UnderlineThickness,UNDERLINETHICKNESS -V,VVECTOR -Version,VERSION -W,XYWIDTH -W0X,X0WIDTH -WX,XWIDTH -Weight,WEIGHT -XHeight,XHEIGHT diff --git a/vcl/unx/source/fontmanager/fontcache.cxx b/vcl/unx/source/fontmanager/fontcache.cxx deleted file mode 100644 index 0c43373bfa8e..000000000000 --- a/vcl/unx/source/fontmanager/fontcache.cxx +++ /dev/null @@ -1,811 +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_vcl.hxx" - -#include -#include - -#include "vcl/fontcache.hxx" - -#include "osl/thread.h" - -#include "unotools/atom.hxx" - -#include "tools/stream.hxx" - -#include -#include - -#if OSL_DEBUG_LEVEL >1 -#include -#endif - -#define FONTCACHEFILE "/user/psprint/pspfontcache" -#define CACHE_MAGIC "PspFontCacheFile format 4" - -using namespace std; -using namespace rtl; -using namespace psp; -using namespace utl; - -/* - * static helpers - */ - -/* - * FontCache constructor - */ - -FontCache::FontCache() -{ - m_bDoFlush = false; - m_aCacheFile = getOfficePath( UserPath ); - if( m_aCacheFile.Len() ) - { - m_aCacheFile.AppendAscii( FONTCACHEFILE ); - read(); - } -} - -/* - * FontCache destructor - */ - -FontCache::~FontCache() -{ - clearCache(); -} - -/* - * FontCache::clearCache - */ -void FontCache::clearCache() -{ - for( FontCacheData::iterator dir_it = m_aCache.begin(); dir_it != m_aCache.end(); ++dir_it ) - { - for( FontDirMap::iterator entry_it = dir_it->second.m_aEntries.begin(); entry_it != dir_it->second.m_aEntries.end(); ++entry_it ) - { - for( FontCacheEntry::iterator font_it = entry_it->second.m_aEntry.begin(); font_it != entry_it->second.m_aEntry.end(); ++font_it ) - delete *font_it; - } - } - m_aCache.clear(); -} - -/* - * FontCache::Commit - */ - -void FontCache::flush() -{ - if( ! m_bDoFlush || ! m_aCacheFile.Len() ) - return; - - SvFileStream aStream; - aStream.Open( m_aCacheFile, STREAM_WRITE | STREAM_TRUNC ); - if( ! (aStream.IsOpen() && aStream.IsWritable()) ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "FontCache::flush: opening cache file %s failed\n", ByteString( m_aCacheFile, osl_getThreadTextEncoding() ).GetBuffer() ); -#endif - return; - } - - aStream.SetLineDelimiter( LINEEND_LF ); - aStream.WriteLine( ByteString( CACHE_MAGIC ) ); - - PrintFontManager& rManager( PrintFontManager::get() ); - MultiAtomProvider* pAtoms = rManager.m_pAtoms; - - for( FontCacheData::const_iterator dir_it = m_aCache.begin(); dir_it != m_aCache.end(); ++ dir_it ) - { - const FontDirMap& rDir( dir_it->second.m_aEntries ); - - ByteString aDirectory( rManager.getDirectory( dir_it->first ) ); - ByteString aLine( "FontCacheDirectory:" ); - aLine.Append( ByteString::CreateFromInt64( dir_it->second.m_nTimestamp ) ); - aLine.Append( ':' ); - aLine.Append( aDirectory ); - if( rDir.empty() && dir_it->second.m_bNoFiles ) - aLine.Insert( "Empty", 0 ); - aStream.WriteLine( aLine ); - - for( FontDirMap::const_iterator entry_it = rDir.begin(); entry_it != rDir.end(); ++entry_it ) - { - // insert cache entries - const FontCacheEntry& rEntry( entry_it->second.m_aEntry ); - if( rEntry.begin() == rEntry.end() ) - continue; - - aLine = "File:"; - aLine.Append( ByteString( entry_it->first ) ); - aStream.WriteLine( aLine ); - - int nEntrySize = entry_it->second.m_aEntry.size(); - // write: type;nfonts - aLine = ByteString::CreateFromInt32( rEntry.front()->m_eType ); - aLine.Append( ';' ); - aLine.Append( ByteString::CreateFromInt32( nEntrySize ) ); - aStream.WriteLine( aLine ); - - sal_Int32 nSubEntry = 0; - for( FontCacheEntry::const_iterator it = rEntry.begin(); it != rEntry.end(); ++it, nSubEntry++ ) - { - /* - * for each font entry write: - * name[;name[;name]] - * fontnr;PSName;italic;weight;width;pitch;encoding;ascend;descend;leading;vsubst;gxw;gxh;gyw;gyh;useroverrride;embed;antialias[;{metricfile,typeflags}][;stylename] - */ - if( nEntrySize > 1 ) - nSubEntry = static_cast(*it)->m_nCollectionEntry; - else - nSubEntry = -1; - - aLine = OUStringToOString( pAtoms->getString( ATOM_FAMILYNAME, (*it)->m_nFamilyName ), RTL_TEXTENCODING_UTF8 ); - for( ::std::list< int >::const_iterator name_it = (*it)->m_aAliases.begin(); name_it != (*it)->m_aAliases.end(); ++name_it ) - { - const OUString& rAdd( pAtoms->getString( ATOM_FAMILYNAME, *name_it ) ); - if( rAdd.getLength() ) - { - aLine.Append( ';' ); - aLine.Append( ByteString( String( rAdd ), RTL_TEXTENCODING_UTF8 ) ); - } - } - aStream.WriteLine( aLine ); - - const OUString& rPSName( pAtoms->getString( ATOM_PSNAME, (*it)->m_nPSName ) ); - aLine = ByteString::CreateFromInt32( nSubEntry ); - aLine.Append( ';' ); - aLine.Append( ByteString( String( rPSName ), RTL_TEXTENCODING_UTF8 ) ); - aLine.Append( ';' ); - aLine.Append( ByteString::CreateFromInt32( (*it)->m_eItalic ) ); - aLine.Append( ';' ); - aLine.Append( ByteString::CreateFromInt32( (*it)->m_eWeight ) ); - aLine.Append( ';' ); - aLine.Append( ByteString::CreateFromInt32( (*it)->m_eWidth ) ); - aLine.Append( ';' ); - aLine.Append( ByteString::CreateFromInt32( (*it)->m_ePitch ) ); - aLine.Append( ';' ); - aLine.Append( ByteString::CreateFromInt32( (*it)->m_aEncoding ) ); - aLine.Append( ';' ); - aLine.Append( ByteString::CreateFromInt32( (*it)->m_nAscend ) ); - aLine.Append( ';' ); - aLine.Append( ByteString::CreateFromInt32( (*it)->m_nDescend ) ); - aLine.Append( ';' ); - aLine.Append( ByteString::CreateFromInt32( (*it)->m_nLeading ) ); - aLine.Append( ';' ); - aLine.Append( (*it)->m_bHaveVerticalSubstitutedGlyphs ? "1" : "0" ); - aLine.Append( ';' ); - aLine.Append( ByteString::CreateFromInt32( (*it)->m_aGlobalMetricX.width ) ); - aLine.Append( ';' ); - aLine.Append( ByteString::CreateFromInt32( (*it)->m_aGlobalMetricX.height ) ); - aLine.Append( ';' ); - aLine.Append( ByteString::CreateFromInt32( (*it)->m_aGlobalMetricY.width ) ); - aLine.Append( ';' ); - aLine.Append( ByteString::CreateFromInt32( (*it)->m_aGlobalMetricY.height ) ); - aLine.Append( ';' ); - aLine.Append( (*it)->m_bUserOverride ? "1" : "0" ); - aLine.Append( ';' ); - aLine.Append( ByteString::CreateFromInt32( 0 ) ); - aLine.Append( ';' ); - aLine.Append( ByteString::CreateFromInt32( 0 ) ); - - switch( (*it)->m_eType ) - { - case fonttype::Type1: - aLine.Append( ';' ); - aLine.Append( ByteString( static_cast(*it)->m_aMetricFile ) ); - break; - case fonttype::TrueType: - aLine.Append( ';' ); - aLine.Append( ByteString::CreateFromInt32( static_cast(*it)->m_nTypeFlags ) ); - break; - default: break; - } - if( (*it)->m_aStyleName.getLength() ) - { - aLine.Append( ';' ); - aLine.Append( ByteString( String( (*it)->m_aStyleName ), RTL_TEXTENCODING_UTF8 ) ); - } - aStream.WriteLine( aLine ); - } - aStream.WriteLine( ByteString() ); - } - } - m_bDoFlush = false; -} - -/* - * FontCache::read - */ - -void FontCache::read() -{ - PrintFontManager& rManager( PrintFontManager::get() ); - MultiAtomProvider* pAtoms = rManager.m_pAtoms; - - SvFileStream aStream( m_aCacheFile, STREAM_READ ); - if( ! aStream.IsOpen() ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "FontCache::read: opening cache file %s failed\n", ByteString( m_aCacheFile, osl_getThreadTextEncoding() ).GetBuffer() ); -#endif - return; - } - - - ByteString aLine; - aStream.ReadLine( aLine ); - if( !aLine.Equals( CACHE_MAGIC ) ) - { - #if OSL_DEBUG_LEVEL >1 - fprintf( stderr, "FontCache::read: cache file %s fails magic test\n", ByteString( m_aCacheFile, osl_getThreadTextEncoding() ).GetBuffer() ); - #endif - return; - } - - int nDir = 0; - FontDirMap* pDir = NULL; - xub_StrLen nIndex; - bool bKeepOnlyUserOverridden = false; - do - { - aStream.ReadLine( aLine ); - if( aLine.CompareTo( "FontCacheDirectory:", 19 ) == COMPARE_EQUAL || - aLine.CompareTo( "EmptyFontCacheDirectory:", 24 ) == COMPARE_EQUAL ) - { - bool bEmpty = (aLine.CompareTo( "Empty", 5 ) == COMPARE_EQUAL); - xub_StrLen nSearchIndex = bEmpty ? 24 : 19; - - OString aDir; - sal_Int64 nTimestamp = 0; - xub_StrLen nTEnd = aLine.Search( ':', nSearchIndex ); - if( nTEnd != STRING_NOTFOUND ) - { - nTimestamp = aLine.Copy( nSearchIndex, nTEnd - nSearchIndex ).ToInt64(); - aDir = aLine.Copy( nTEnd+1 ); - } - else - { - // invalid format, remove - pDir = NULL; - nDir = 0; - m_bDoFlush = true; - continue; - } - - // is the directory modified ? - struct stat aStat; - if( stat( aDir.getStr(), &aStat ) || - ! S_ISDIR(aStat.st_mode) ) - { - // remove outdated cache data - pDir = NULL; - nDir = 0; - m_bDoFlush = true; - continue; - } - else - { - nDir = rManager.getDirectoryAtom( aDir, true ); - m_aCache[ nDir ].m_nTimestamp = (sal_Int64)aStat.st_mtime; - m_aCache[ nDir ].m_bNoFiles = bEmpty; - pDir = bEmpty ? NULL : &m_aCache[ nDir ].m_aEntries; - bKeepOnlyUserOverridden = ((sal_Int64)aStat.st_mtime != nTimestamp); - m_aCache[ nDir ].m_bUserOverrideOnly = bKeepOnlyUserOverridden; - } - } - else if( pDir && aLine.CompareTo( "File:", 5 ) == COMPARE_EQUAL ) - { - OString aFile( aLine.Copy( 5 ) ); - aStream.ReadLine( aLine ); - - const char* pLine = aLine.GetBuffer(); - - fonttype::type eType = (fonttype::type)atoi( pLine ); - if( eType != fonttype::TrueType && - eType != fonttype::Type1 && - eType != fonttype::Builtin - ) - continue; - while( *pLine && *pLine != ';' ) - pLine++; - if( *pLine != ';' ) - continue; - - pLine++; - sal_Int32 nFonts = atoi( pLine ); - for( int n = 0; n < nFonts; n++ ) - { - aStream.ReadLine( aLine ); - pLine = aLine.GetBuffer(); - int nLen = aLine.Len(); - - PrintFontManager::PrintFont* pFont = NULL; - switch( eType ) - { - case fonttype::TrueType: - pFont = new PrintFontManager::TrueTypeFontFile(); - break; - case fonttype::Type1: - pFont = new PrintFontManager::Type1FontFile(); - break; - case fonttype::Builtin: - pFont = new PrintFontManager::BuiltinFont(); - break; - default: break; - } - - for( nIndex = 0; nIndex < nLen && pLine[nIndex] != ';'; nIndex++ ) - ; - - pFont->m_nFamilyName = pAtoms->getAtom( ATOM_FAMILYNAME, - OUString( pLine, nIndex, RTL_TEXTENCODING_UTF8 ), - sal_True ); - while( nIndex < nLen ) - { - xub_StrLen nLastIndex = nIndex+1; - for( nIndex = nLastIndex ; nIndex < nLen && pLine[nIndex] != ';'; nIndex++ ) - ; - if( nIndex - nLastIndex ) - { - OUString aAlias( pLine+nLastIndex, nIndex-nLastIndex, RTL_TEXTENCODING_UTF8 ); - pFont->m_aAliases.push_back( pAtoms->getAtom( ATOM_FAMILYNAME, aAlias, sal_True ) ); - } - } - aStream.ReadLine( aLine ); - pLine = aLine.GetBuffer(); - nLen = aLine.Len(); - - // get up to 20 token positions - const int nMaxTokens = 20; - int nTokenPos[nMaxTokens]; - nTokenPos[0] = 0; - int nTokens = 1; - for( int i = 0; i < nLen; i++ ) - { - if( pLine[i] == ';' ) - { - nTokenPos[nTokens++] = i+1; - if( nTokens == nMaxTokens ) - break; - } - } - if( nTokens < 18 ) - { - delete pFont; - continue; - } - int nCollEntry = atoi( pLine ); - pFont->m_nPSName = pAtoms->getAtom( ATOM_PSNAME, OUString( pLine + nTokenPos[1], nTokenPos[2]-nTokenPos[1]-1, RTL_TEXTENCODING_UTF8 ), sal_True ); - pFont->m_eItalic = (italic::type)atoi( pLine+nTokenPos[2] ); - pFont->m_eWeight = (weight::type)atoi( pLine+nTokenPos[3] ); - pFont->m_eWidth = (width::type)atoi( pLine+nTokenPos[4] ); - pFont->m_ePitch = (pitch::type)atoi( pLine+nTokenPos[5] ); - pFont->m_aEncoding = (rtl_TextEncoding)atoi( pLine+nTokenPos[6] ); - pFont->m_nAscend = atoi( pLine + nTokenPos[7] ); - pFont->m_nDescend = atoi( pLine + nTokenPos[8] ); - pFont->m_nLeading = atoi( pLine + nTokenPos[9] ); - pFont->m_bHaveVerticalSubstitutedGlyphs - = (atoi( pLine + nTokenPos[10] ) != 0); - pFont->m_aGlobalMetricX.width - = atoi( pLine + nTokenPos[11] ); - pFont->m_aGlobalMetricX.height - = atoi( pLine + nTokenPos[12] ); - pFont->m_aGlobalMetricY.width - = atoi( pLine + nTokenPos[13] ); - pFont->m_aGlobalMetricY.height - = atoi( pLine + nTokenPos[14] ); - pFont->m_bUserOverride - = (atoi( pLine + nTokenPos[15] ) != 0); - int nStyleTokenNr = 18; - switch( eType ) - { - case fonttype::TrueType: - static_cast(pFont)->m_nTypeFlags = atoi( pLine + nTokenPos[18] ); - static_cast(pFont)->m_nCollectionEntry = nCollEntry; - static_cast(pFont)->m_nDirectory = nDir; - static_cast(pFont)->m_aFontFile = aFile; - nStyleTokenNr++; - break; - case fonttype::Type1: - { - int nTokLen = (nTokens > 19 ) ? nTokenPos[19]-nTokenPos[18]-1 : nLen - nTokenPos[18]; - static_cast(pFont)->m_aMetricFile = OString( pLine + nTokenPos[18], nTokLen ); - static_cast(pFont)->m_nDirectory = nDir; - static_cast(pFont)->m_aFontFile = aFile; - nStyleTokenNr++; - } - break; - case fonttype::Builtin: - static_cast(pFont)->m_nDirectory = nDir; - static_cast(pFont)->m_aMetricFile = aFile; - break; - default: break; - } - if( nTokens > nStyleTokenNr ) - pFont->m_aStyleName = OUString::intern( pLine + nTokenPos[nStyleTokenNr], - nLen - nTokenPos[nStyleTokenNr], - RTL_TEXTENCODING_UTF8 ); - - bool bObsolete = false; - if( bKeepOnlyUserOverridden ) - { - if( pFont->m_bUserOverride ) - { - ByteString aFilePath = rManager.getDirectory( nDir ); - aFilePath.Append( '/' ); - aFilePath.Append( ByteString(aFile) ); - struct stat aStat; - if( stat( aFilePath.GetBuffer(), &aStat ) || - ! S_ISREG( aStat.st_mode ) || - aStat.st_size < 16 ) - { - bObsolete = true; - } - #if OSL_DEBUG_LEVEL > 2 - else - fprintf( stderr, "keeping file %s in outdated cache entry due to user override\n", - aFilePath.GetBuffer() ); - #endif - } - else - bObsolete = true; - } - if( bObsolete ) - { - m_bDoFlush = true; -#if OSL_DEBUG_LEVEL > 2 - fprintf( stderr, "removing obsolete font %s\n", aFile.getStr() ); -#endif - delete pFont; - continue; - } - - FontCacheEntry& rEntry = (*pDir)[aFile].m_aEntry; - rEntry.push_back( pFont ); - } - } - } while( ! aStream.IsEof() ); -} - -/* - * FontCache::updateDirTimestamp - */ -void FontCache::updateDirTimestamp( int nDirID ) -{ - PrintFontManager& rManager( PrintFontManager::get() ); - const OString& rDir = rManager.getDirectory( nDirID ); - - struct stat aStat; - if( ! stat( rDir.getStr(), &aStat ) ) - m_aCache[ nDirID ].m_nTimestamp = (sal_Int64)aStat.st_mtime; -} - - -/* - * FontCache::copyPrintFont - */ -void FontCache::copyPrintFont( const PrintFontManager::PrintFont* pFrom, PrintFontManager::PrintFont* pTo ) const -{ - if( pFrom->m_eType != pTo->m_eType ) - return; - switch( pFrom->m_eType ) - { - case fonttype::TrueType: - static_cast(pTo)->m_nDirectory = static_cast(pFrom)->m_nDirectory; - static_cast(pTo)->m_aFontFile = static_cast(pFrom)->m_aFontFile; - static_cast(pTo)->m_nCollectionEntry = static_cast(pFrom)->m_nCollectionEntry; - static_cast(pTo)->m_nTypeFlags = static_cast(pFrom)->m_nTypeFlags; - break; - case fonttype::Type1: - static_cast(pTo)->m_nDirectory = static_cast(pFrom)->m_nDirectory; - static_cast(pTo)->m_aFontFile = static_cast(pFrom)->m_aFontFile; - static_cast(pTo)->m_aMetricFile = static_cast(pFrom)->m_aMetricFile; - break; - case fonttype::Builtin: - static_cast(pTo)->m_nDirectory = static_cast(pFrom)->m_nDirectory; - static_cast(pTo)->m_aMetricFile = static_cast(pFrom)->m_aMetricFile; - break; - default: break; - } - pTo->m_nFamilyName = pFrom->m_nFamilyName; - pTo->m_aStyleName = pFrom->m_aStyleName; - pTo->m_aAliases = pFrom->m_aAliases; - pTo->m_nPSName = pFrom->m_nPSName; - pTo->m_eItalic = pFrom->m_eItalic; - pTo->m_eWeight = pFrom->m_eWeight; - pTo->m_eWidth = pFrom->m_eWidth; - pTo->m_ePitch = pFrom->m_ePitch; - pTo->m_aEncoding = pFrom->m_aEncoding; - pTo->m_aGlobalMetricX = pFrom->m_aGlobalMetricX; - pTo->m_aGlobalMetricY = pFrom->m_aGlobalMetricY; - pTo->m_nAscend = pFrom->m_nAscend; - pTo->m_nDescend = pFrom->m_nDescend; - pTo->m_nLeading = pFrom->m_nLeading; - pTo->m_nXMin = pFrom->m_nXMin; - pTo->m_nYMin = pFrom->m_nYMin; - pTo->m_nXMax = pFrom->m_nXMax; - pTo->m_nYMax = pFrom->m_nYMax; - pTo->m_bHaveVerticalSubstitutedGlyphs = pFrom->m_bHaveVerticalSubstitutedGlyphs; - pTo->m_bUserOverride = pFrom->m_bUserOverride; -} - -/* - * FontCache::equalsPrintFont - */ -bool FontCache::equalsPrintFont( const PrintFontManager::PrintFont* pLeft, PrintFontManager::PrintFont* pRight ) const -{ - if( pLeft->m_eType != pRight->m_eType ) - return false; - switch( pLeft->m_eType ) - { - case fonttype::TrueType: - { - const PrintFontManager::TrueTypeFontFile* pLT = static_cast(pLeft); - const PrintFontManager::TrueTypeFontFile* pRT = static_cast(pRight); - if( pRT->m_nDirectory != pLT->m_nDirectory || - pRT->m_aFontFile != pLT->m_aFontFile || - pRT->m_nCollectionEntry != pLT->m_nCollectionEntry || - pRT->m_nTypeFlags != pLT->m_nTypeFlags ) - return false; - } - break; - case fonttype::Type1: - { - const PrintFontManager::Type1FontFile* pLT = static_cast(pLeft); - const PrintFontManager::Type1FontFile* pRT = static_cast(pRight); - if( pRT->m_nDirectory != pLT->m_nDirectory || - pRT->m_aFontFile != pLT->m_aFontFile || - pRT->m_aMetricFile != pLT->m_aMetricFile ) - return false; - } - break; - case fonttype::Builtin: - { - const PrintFontManager::BuiltinFont* pLT = static_cast(pLeft); - const PrintFontManager::BuiltinFont* pRT = static_cast(pRight); - if( pRT->m_nDirectory != pLT->m_nDirectory || - pRT->m_aMetricFile != pLT->m_aMetricFile ) - return false; - } - break; - default: break; - } - if( pRight->m_nFamilyName != pLeft->m_nFamilyName || - pRight->m_aStyleName != pLeft->m_aStyleName || - pRight->m_nPSName != pLeft->m_nPSName || - pRight->m_eItalic != pLeft->m_eItalic || - pRight->m_eWeight != pLeft->m_eWeight || - pRight->m_eWidth != pLeft->m_eWidth || - pRight->m_ePitch != pLeft->m_ePitch || - pRight->m_aEncoding != pLeft->m_aEncoding || - pRight->m_aGlobalMetricX != pLeft->m_aGlobalMetricX || - pRight->m_aGlobalMetricY != pLeft->m_aGlobalMetricY || - pRight->m_nAscend != pLeft->m_nAscend || - pRight->m_nDescend != pLeft->m_nDescend || - pRight->m_nLeading != pLeft->m_nLeading || - pRight->m_nXMin != pLeft->m_nXMin || - pRight->m_nYMin != pLeft->m_nYMin || - pRight->m_nXMax != pLeft->m_nXMax || - pRight->m_nYMax != pLeft->m_nYMax || - pRight->m_bHaveVerticalSubstitutedGlyphs != pLeft->m_bHaveVerticalSubstitutedGlyphs || - pRight->m_bUserOverride != pLeft->m_bUserOverride - ) - return false; - std::list< int >::const_iterator lit, rit; - for( lit = pLeft->m_aAliases.begin(), rit = pRight->m_aAliases.begin(); - lit != pLeft->m_aAliases.end() && rit != pRight->m_aAliases.end() && (*lit) == (*rit); - ++lit, ++rit ) - ; - return lit == pLeft->m_aAliases.end() && rit == pRight->m_aAliases.end(); -} - -/* - * FontCache::clonePrintFont - */ -PrintFontManager::PrintFont* FontCache::clonePrintFont( const PrintFontManager::PrintFont* pOldFont ) const -{ - PrintFontManager::PrintFont* pFont = NULL; - switch( pOldFont->m_eType ) - { - case fonttype::TrueType: - pFont = new PrintFontManager::TrueTypeFontFile(); - break; - case fonttype::Type1: - pFont = new PrintFontManager::Type1FontFile(); - break; - case fonttype::Builtin: - pFont = new PrintFontManager::BuiltinFont(); - break; - default: break; - } - if( pFont ) - { - copyPrintFont( pOldFont, pFont ); - } - return pFont; - } - -/* - * FontCache::getFontCacheFile - */ -bool FontCache::getFontCacheFile( int nDirID, const OString& rFile, list< PrintFontManager::PrintFont* >& rNewFonts ) const -{ - bool bSuccess = false; - - FontCacheData::const_iterator dir = m_aCache.find( nDirID ); - if( dir != m_aCache.end() ) - { - FontDirMap::const_iterator entry = dir->second.m_aEntries.find( rFile ); - if( entry != dir->second.m_aEntries.end() ) - { - for( FontCacheEntry::const_iterator font = entry->second.m_aEntry.begin(); font != entry->second.m_aEntry.end(); ++font ) - { - bSuccess = true; - PrintFontManager::PrintFont* pFont = clonePrintFont( *font ); - rNewFonts.push_back( pFont ); - } - } - } - return bSuccess; -} - -/* - * FontCache::updateFontCacheEntry - */ -void FontCache::updateFontCacheEntry( const PrintFontManager::PrintFont* pFont, bool bFlush ) -{ - PrintFontManager& rManager( PrintFontManager::get() ); - - OString aFile; - int nDirID = 0; - switch( pFont->m_eType ) - { - case fonttype::TrueType: - nDirID = static_cast(pFont)->m_nDirectory; - aFile = static_cast(pFont)->m_aFontFile; - break; - case fonttype::Type1: - nDirID = static_cast(pFont)->m_nDirectory; - aFile = static_cast(pFont)->m_aFontFile; - break; - case fonttype::Builtin: - nDirID = static_cast(pFont)->m_nDirectory; - aFile = static_cast(pFont)->m_aMetricFile; - break; - default: - return; - } - FontCacheData::const_iterator dir = m_aCache.find( nDirID ); - FontDirMap::const_iterator entry; - FontCacheEntry::const_iterator font; - PrintFontManager::PrintFont* pCacheFont = NULL; - - if( dir != m_aCache.end() ) - { - entry = dir->second.m_aEntries.find( aFile ); - if( entry != dir->second.m_aEntries.end() ) - { - for( font = entry->second.m_aEntry.begin(); font != entry->second.m_aEntry.end(); ++font ) - { - if( (*font)->m_eType == pFont->m_eType && - ( (*font)->m_eType != fonttype::TrueType || - static_cast(*font)->m_nCollectionEntry == static_cast(pFont)->m_nCollectionEntry - ) ) - break; - } - if( font != entry->second.m_aEntry.end() ) - pCacheFont = *font; - } - } - else - createCacheDir( nDirID ); - - if( pCacheFont ) - { - if( ! equalsPrintFont( pFont, pCacheFont ) ) - { - copyPrintFont( pFont, pCacheFont ); - m_bDoFlush = true; - } - } - else - { - pCacheFont = clonePrintFont( pFont ); - m_aCache[nDirID].m_aEntries[aFile].m_aEntry.push_back( pCacheFont ); - - ByteString aPath = rManager.getDirectory( nDirID ); - aPath.Append( '/' ); - aPath.Append( ByteString( aFile ) ); - m_bDoFlush = true; - } - if( bFlush ) - flush(); -} - -/* - * FontCache::listDirectory - */ -bool FontCache::listDirectory( const OString& rDir, std::list< PrintFontManager::PrintFont* >& rNewFonts ) const -{ - PrintFontManager& rManager( PrintFontManager::get() ); - int nDirID = rManager.getDirectoryAtom( rDir ); - FontCacheData::const_iterator dir = m_aCache.find( nDirID ); - bool bFound = (dir != m_aCache.end()); - - if( bFound && !dir->second.m_bNoFiles ) - { - for( FontDirMap::const_iterator file = dir->second.m_aEntries.begin(); file != dir->second.m_aEntries.end(); ++file ) - { - for( FontCacheEntry::const_iterator font = file->second.m_aEntry.begin(); font != file->second.m_aEntry.end(); ++font ) - { - PrintFontManager::PrintFont* pFont = clonePrintFont( *font ); - rNewFonts.push_back( pFont ); - } - } - } - return bFound; -} - -/* - * FontCache::listDirectory - */ -bool FontCache::scanAdditionalFiles( const OString& rDir ) -{ - PrintFontManager& rManager( PrintFontManager::get() ); - int nDirID = rManager.getDirectoryAtom( rDir ); - FontCacheData::const_iterator dir = m_aCache.find( nDirID ); - bool bFound = (dir != m_aCache.end()); - - return (bFound && dir->second.m_bUserOverrideOnly); -} - -/* - * FontCache::createCacheDir - */ -void FontCache::createCacheDir( int nDirID ) -{ - PrintFontManager& rManager( PrintFontManager::get() ); - - const OString& rDir = rManager.getDirectory( nDirID ); - struct stat aStat; - if( ! stat( rDir.getStr(), &aStat ) ) - m_aCache[nDirID].m_nTimestamp = (sal_Int64)aStat.st_mtime; -} - -/* - * FontCache::markEmptyDir - */ -void FontCache::markEmptyDir( int nDirID, bool bNoFiles ) -{ - createCacheDir( nDirID ); - m_aCache[nDirID].m_bNoFiles = bNoFiles; - m_bDoFlush = true; -} diff --git a/vcl/unx/source/fontmanager/fontconfig.cxx b/vcl/unx/source/fontmanager/fontconfig.cxx deleted file mode 100644 index 434263db352e..000000000000 --- a/vcl/unx/source/fontmanager/fontconfig.cxx +++ /dev/null @@ -1,1306 +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_vcl.hxx" - -#include "vcl/fontmanager.hxx" -#include "vcl/fontcache.hxx" -#include "vcl/impfont.hxx" - -using namespace psp; - -#ifdef ENABLE_FONTCONFIG - #include - #include - #include - // allow compile on baseline (currently with fontconfig 2.2.0) - #ifndef FC_WEIGHT_BOOK // TODO: remove when baseline moves to fc>=2.2.1 - #define FC_WEIGHT_BOOK 75 - #endif - #ifndef FC_EMBEDDED_BITMAP // TODO: remove when baseline moves to fc>=2.3.92 - #define FC_EMBEDDED_BITMAP "embeddedbitmap" - #endif - #ifndef FC_FAMILYLANG // TODO: remove when baseline moves to fc>=2.2.97 - #define FC_FAMILYLANG "familylang" - #endif - #ifndef FC_HINT_STYLE // TODO: remove when baseline moves to fc>=2.2.91 - #define FC_HINT_STYLE "hintstyle" - #define FC_HINT_NONE 0 - #define FC_HINT_SLIGHT 1 - #define FC_HINT_MEDIUM 2 - #define FC_HINT_FULL 3 - #endif -#else - typedef void FcConfig; - typedef void FcObjectSet; - typedef void FcPattern; - typedef void FcFontSet; - typedef void FcCharSet; - typedef int FcResult; - typedef int FcBool; - typedef int FcMatchKind; - typedef char FcChar8; - typedef int FcChar32; - typedef unsigned int FT_UInt; - typedef void* FT_Face; - typedef int FcSetName; -#endif - -#include -#include - -#include "unotools/atom.hxx" - -#include "osl/module.h" -#include "osl/thread.h" -#include "osl/process.h" - -#include "rtl/ustrbuf.hxx" -#include "rtl/locale.hxx" - -#include "sal/alloca.h" - -#include -#include - -using namespace osl; -using namespace rtl; - -class FontCfgWrapper -{ - oslModule m_pLib; - FcFontSet* m_pOutlineSet; - - int m_nFcVersion; - FcBool (*m_pFcInit)(); - int (*m_pFcGetVersion)(); - FcConfig* (*m_pFcConfigGetCurrent)(); - FcObjectSet* (*m_pFcObjectSetVaBuild)(const char*,va_list); - void (*m_pFcObjectSetDestroy)(FcObjectSet* pSet); - FcPattern* (*m_pFcPatternCreate)(); - void (*m_pFcPatternDestroy)(FcPattern*); - FcFontSet* (*m_pFcFontList)(FcConfig*,FcPattern*,FcObjectSet*); - FcFontSet* (*m_pFcConfigGetFonts)(FcConfig*,FcSetName); - FcFontSet* (*m_pFcFontSetCreate)(); - FcCharSet* (*m_pFcCharSetCreate)(); - FcBool (*m_pFcCharSetAddChar)(FcCharSet *, FcChar32); - FcBool (*m_pFcCharSetHasChar)(FcCharSet *, FcChar32); - void (*m_pFcCharSetDestroy)(FcCharSet*); - void (*m_pFcFontSetDestroy)(FcFontSet*); - FcBool (*m_pFcFontSetAdd)(FcFontSet*,FcPattern*); - void (*m_pFcPatternReference)(FcPattern*); - FcResult (*m_pFcPatternGetCharSet)(const FcPattern*,const char*,int,FcCharSet**); - FcResult (*m_pFcPatternGetString)(const FcPattern*,const char*,int,FcChar8**); - FcResult (*m_pFcPatternGetInteger)(const FcPattern*,const char*,int,int*); - FcResult (*m_pFcPatternGetDouble)(const FcPattern*,const char*,int,double*); - FcResult (*m_pFcPatternGetBool)(const FcPattern*,const char*,int,FcBool*); - void (*m_pFcDefaultSubstitute)(FcPattern *); - FcPattern* (*m_pFcFontSetMatch)(FcConfig*,FcFontSet**, int, FcPattern*,FcResult*); - FcPattern* (*m_pFcFontMatch)(FcConfig*,FcPattern*,FcResult*); - FcBool (*m_pFcConfigAppFontAddFile)(FcConfig*, const FcChar8*); - FcBool (*m_pFcConfigAppFontAddDir)(FcConfig*, const FcChar8*); - FcBool (*m_pFcConfigParseAndLoad)(FcConfig*,const FcChar8*,FcBool); - FcBool (*m_pFcConfigSubstitute)(FcConfig*,FcPattern*,FcMatchKind); - - FcPattern* (*m_pFcPatternDuplicate)(const FcPattern*); - FcBool (*m_pFcPatternAddInteger)(FcPattern*,const char*,int); - FcBool (*m_pFcPatternAddDouble)(FcPattern*,const char*,double); - FcBool (*m_pFcPatternAddBool)(FcPattern*,const char*,FcBool); - FcBool (*m_pFcPatternAddCharSet)(FcPattern*,const char*,const FcCharSet*); - FcBool (*m_pFcPatternAddString)(FcPattern*,const char*,const FcChar8*); - FcBool (*m_pFcPatternDel)(FcPattern*,const char*); - - FT_UInt (*m_pFcFreeTypeCharIndex)(FT_Face,FcChar32); - - oslGenericFunction loadSymbol( const char* ); - void addFontSet( FcSetName ); - - FontCfgWrapper(); - ~FontCfgWrapper(); - -public: - static FontCfgWrapper& get(); - static void release(); - - bool isValid() const - { return m_pLib != NULL;} - - FcFontSet* getFontSet(); - - FcBool FcInit() - { return m_pFcInit(); } - - int FcGetVersion() - { return m_pFcGetVersion(); } - - FcConfig* FcConfigGetCurrent() - { return m_pFcConfigGetCurrent(); } - - FcObjectSet* FcObjectSetBuild( const char* first, ... ) - { - va_list ap; - va_start( ap, first ); - FcObjectSet* pSet = m_pFcObjectSetVaBuild( first, ap ); - va_end( ap ); - return pSet; - } - - void FcObjectSetDestroy( FcObjectSet* pSet ) - { m_pFcObjectSetDestroy( pSet ); } - - FcPattern* FcPatternCreate() - { return m_pFcPatternCreate(); } - - void FcPatternDestroy( FcPattern* pPattern ) - { m_pFcPatternDestroy( pPattern ); } - - FcFontSet* FcFontList( FcConfig* pConfig, FcPattern* pPattern, FcObjectSet* pSet ) - { return m_pFcFontList( pConfig, pPattern, pSet ); } - - FcFontSet* FcConfigGetFonts( FcConfig* pConfig, FcSetName eSet) - { return m_pFcConfigGetFonts( pConfig, eSet ); } - - FcFontSet* FcFontSetCreate() - { return m_pFcFontSetCreate(); } - - FcCharSet* FcCharSetCreate() - { return m_pFcCharSetCreate(); } - - FcBool FcCharSetAddChar(FcCharSet *fcs, FcChar32 ucs4) - { return m_pFcCharSetAddChar(fcs, ucs4); } - - FcBool FcCharSetHasChar(FcCharSet *fcs, FcChar32 ucs4) - { return m_pFcCharSetHasChar(fcs, ucs4); } - - void FcCharSetDestroy( FcCharSet* pSet ) - { m_pFcCharSetDestroy( pSet );} - - void FcFontSetDestroy( FcFontSet* pSet ) - { m_pFcFontSetDestroy( pSet );} - - FcBool FcFontSetAdd( FcFontSet* pSet, FcPattern* pPattern ) - { return m_pFcFontSetAdd( pSet, pPattern ); } - - void FcPatternReference( FcPattern* pPattern ) - { m_pFcPatternReference( pPattern ); } - - FcResult FcPatternGetCharSet( const FcPattern* pPattern, const char* object, int n, FcCharSet** s ) - { return m_pFcPatternGetCharSet( pPattern, object, n, s ); } - - FcResult FcPatternGetString( const FcPattern* pPattern, const char* object, int n, FcChar8** s ) - { return m_pFcPatternGetString( pPattern, object, n, s ); } - - FcResult FcPatternGetInteger( const FcPattern* pPattern, const char* object, int n, int* s ) - { return m_pFcPatternGetInteger( pPattern, object, n, s ); } - - FcResult FcPatternGetDouble( const FcPattern* pPattern, const char* object, int n, double* s ) - { return m_pFcPatternGetDouble( pPattern, object, n, s ); } - - FcResult FcPatternGetBool( const FcPattern* pPattern, const char* object, int n, FcBool* s ) - { return m_pFcPatternGetBool( pPattern, object, n, s ); } - FcBool FcConfigAppFontAddFile( FcConfig* pConfig, const FcChar8* pFileName ) - { return m_pFcConfigAppFontAddFile( pConfig, pFileName ); } - FcBool FcConfigAppFontAddDir(FcConfig* pConfig, const FcChar8* pDirName ) - { return m_pFcConfigAppFontAddDir( pConfig, pDirName ); } - FcBool FcConfigParseAndLoad( FcConfig* pConfig, const FcChar8* pFileName, FcBool bComplain ) - { return m_pFcConfigParseAndLoad( pConfig, pFileName, bComplain ); } - - void FcDefaultSubstitute( FcPattern* pPattern ) - { m_pFcDefaultSubstitute( pPattern ); } - FcPattern* FcFontSetMatch( FcConfig* pConfig, FcFontSet **ppFontSet, int nset, FcPattern* pPattern, FcResult* pResult ) - { return m_pFcFontSetMatch ? m_pFcFontSetMatch( pConfig, ppFontSet, nset, pPattern, pResult ) : 0; } - FcPattern* FcFontMatch( FcConfig* pConfig, FcPattern* pPattern, FcResult* pResult ) - { return m_pFcFontMatch( pConfig, pPattern, pResult ); } - FcBool FcConfigSubstitute( FcConfig* pConfig, FcPattern* pPattern, FcMatchKind eKind ) - { return m_pFcConfigSubstitute( pConfig, pPattern, eKind ); } - - FcPattern* FcPatternDuplicate( const FcPattern* pPattern ) const - { return m_pFcPatternDuplicate( pPattern ); } - FcBool FcPatternAddInteger( FcPattern* pPattern, const char* pObject, int nValue ) - { return m_pFcPatternAddInteger( pPattern, pObject, nValue ); } - FcBool FcPatternAddDouble( FcPattern* pPattern, const char* pObject, double nValue ) - { return m_pFcPatternAddDouble( pPattern, pObject, nValue ); } - FcBool FcPatternAddString( FcPattern* pPattern, const char* pObject, const FcChar8* pString ) - { return m_pFcPatternAddString( pPattern, pObject, pString ); } - FcBool FcPatternAddBool( FcPattern* pPattern, const char* pObject, bool nValue ) - { return m_pFcPatternAddBool( pPattern, pObject, nValue ); } - FcBool FcPatternAddCharSet(FcPattern* pPattern,const char* pObject,const FcCharSet*pCharSet) - { return m_pFcPatternAddCharSet(pPattern,pObject,pCharSet); } - FcBool FcPatternDel(FcPattern* pPattern, const char* object) - { return m_pFcPatternDel( pPattern, object); } - - FT_UInt FcFreeTypeCharIndex( FT_Face face, FcChar32 ucs4 ) - { return m_pFcFreeTypeCharIndex ? m_pFcFreeTypeCharIndex( face, ucs4 ) : 0; } - -public: // TODO: cleanup - FcResult FamilyFromPattern(FcPattern* pPattern, FcChar8 **family); - std::hash_map< rtl::OString, rtl::OString, rtl::OStringHash > m_aFontNameToLocalized; - std::hash_map< rtl::OString, rtl::OString, rtl::OStringHash > m_aLocalizedToCanonical; -}; - -oslGenericFunction FontCfgWrapper::loadSymbol( const char* pSymbol ) -{ - OUString aSym( OUString::createFromAscii( pSymbol ) ); - oslGenericFunction pSym = osl_getFunctionSymbol( m_pLib, aSym.pData ); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "%s %s\n", pSymbol, pSym ? "found" : "not found" ); -#endif - return pSym; -} - -FontCfgWrapper::FontCfgWrapper() - : m_pLib( NULL ), - m_pOutlineSet( NULL ), - m_nFcVersion( 0 ) -{ - OUString aLib( RTL_CONSTASCII_USTRINGPARAM( "libfontconfig.so.1" ) ); - m_pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY ); - if( !m_pLib ) - { - aLib = OUString( RTL_CONSTASCII_USTRINGPARAM( "libfontconfig.so" ) ); - m_pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY ); - } - - if( ! m_pLib ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "no libfontconfig\n" ); -#endif - return; - } - - m_pFcInit = (FcBool(*)()) - loadSymbol( "FcInit" ); - m_pFcGetVersion = (int(*)()) - loadSymbol( "FcGetVersion" ); - m_pFcConfigGetCurrent = (FcConfig *(*)()) - loadSymbol( "FcConfigGetCurrent" ); - m_pFcObjectSetVaBuild = (FcObjectSet*(*)(const char*,va_list)) - loadSymbol( "FcObjectSetVaBuild" ); - m_pFcObjectSetDestroy = (void(*)(FcObjectSet*)) - loadSymbol( "FcObjectSetDestroy" ); - m_pFcPatternCreate = (FcPattern*(*)()) - loadSymbol( "FcPatternCreate" ); - m_pFcPatternDestroy = (void(*)(FcPattern*)) - loadSymbol( "FcPatternDestroy" ); - m_pFcFontList = (FcFontSet*(*)(FcConfig*,FcPattern*,FcObjectSet*)) - loadSymbol( "FcFontList" ); - m_pFcConfigGetFonts = (FcFontSet*(*)(FcConfig*,FcSetName)) - loadSymbol( "FcConfigGetFonts" ); - m_pFcFontSetCreate = (FcFontSet*(*)()) - loadSymbol( "FcFontSetCreate" ); - m_pFcCharSetCreate = (FcCharSet*(*)()) - loadSymbol( "FcCharSetCreate" ); - m_pFcCharSetAddChar = (FcBool(*)(FcCharSet*, FcChar32)) - loadSymbol( "FcCharSetAddChar" ); - m_pFcCharSetHasChar = (FcBool(*)(FcCharSet*, FcChar32)) - loadSymbol( "FcCharSetHasChar" ); - m_pFcCharSetDestroy = (void(*)(FcCharSet*)) - loadSymbol( "FcCharSetDestroy" ); - m_pFcFontSetDestroy = (void(*)(FcFontSet*)) - loadSymbol( "FcFontSetDestroy" ); - m_pFcFontSetAdd = (FcBool(*)(FcFontSet*,FcPattern*)) - loadSymbol( "FcFontSetAdd" ); - m_pFcPatternReference = (void(*)(FcPattern*)) - loadSymbol( "FcPatternReference" ); - m_pFcPatternGetCharSet = (FcResult(*)(const FcPattern*,const char*,int,FcCharSet**)) - loadSymbol( "FcPatternGetCharSet" ); - m_pFcPatternGetString = (FcResult(*)(const FcPattern*,const char*,int,FcChar8**)) - loadSymbol( "FcPatternGetString" ); - m_pFcPatternGetInteger = (FcResult(*)(const FcPattern*,const char*,int,int*)) - loadSymbol( "FcPatternGetInteger" ); - m_pFcPatternGetDouble = (FcResult(*)(const FcPattern*,const char*,int,double*)) - loadSymbol( "FcPatternGetDouble" ); - m_pFcPatternGetBool = (FcResult(*)(const FcPattern*,const char*,int,FcBool*)) - loadSymbol( "FcPatternGetBool" ); - m_pFcConfigAppFontAddFile = (FcBool(*)(FcConfig*, const FcChar8*)) - loadSymbol( "FcConfigAppFontAddFile" ); - m_pFcConfigAppFontAddDir = (FcBool(*)(FcConfig*, const FcChar8*)) - loadSymbol( "FcConfigAppFontAddDir" ); - m_pFcConfigParseAndLoad = (FcBool(*)(FcConfig*, const FcChar8*, FcBool)) - loadSymbol( "FcConfigParseAndLoad" ); - m_pFcDefaultSubstitute = (void(*)(FcPattern *)) - loadSymbol( "FcDefaultSubstitute" ); - m_pFcFontSetMatch = (FcPattern*(*)(FcConfig*,FcFontSet**,int,FcPattern*,FcResult*)) - loadSymbol( "FcFontSetMatch" ); - m_pFcFontMatch = (FcPattern*(*)(FcConfig*,FcPattern*,FcResult*)) - loadSymbol( "FcFontMatch" ); - m_pFcConfigSubstitute = (FcBool(*)(FcConfig*,FcPattern*,FcMatchKind)) - loadSymbol( "FcConfigSubstitute" ); - - m_pFcPatternDuplicate = (FcPattern*(*)(const FcPattern*)) - loadSymbol( "FcPatternDuplicate" ); - m_pFcPatternAddInteger = (FcBool(*)(FcPattern*,const char*,int)) - loadSymbol( "FcPatternAddInteger" ); - m_pFcPatternAddDouble = (FcBool(*)(FcPattern*,const char*,double)) - loadSymbol( "FcPatternAddDouble" ); - m_pFcPatternAddBool = (FcBool(*)(FcPattern*,const char*,FcBool)) - loadSymbol( "FcPatternAddBool" ); - m_pFcPatternAddCharSet = (FcBool(*)(FcPattern*,const char*,const FcCharSet *)) - loadSymbol( "FcPatternAddCharSet" ); - m_pFcPatternAddString = (FcBool(*)(FcPattern*,const char*,const FcChar8*)) - loadSymbol( "FcPatternAddString" ); - m_pFcPatternDel = (FcBool(*)(FcPattern*,const char*)) - loadSymbol( "FcPatternDel" ); - - m_pFcFreeTypeCharIndex = (FT_UInt(*)(FT_Face,FcChar32)) - loadSymbol( "FcFreeTypeCharIndex" ); - - m_nFcVersion = FcGetVersion(); -#if (OSL_DEBUG_LEVEL > 1) - fprintf( stderr,"FC_VERSION = %05d\n", m_nFcVersion ); -#endif - // make minimum version configurable - const char* pMinFcVersion = getenv( "SAL_MIN_FC_VERSION"); - if( pMinFcVersion ) - { - const int nMinFcVersion = atoi( pMinFcVersion ); - if( m_nFcVersion < nMinFcVersion ) - m_pFcInit = NULL; - } - - if( ! ( - m_pFcInit && - m_pFcGetVersion && - m_pFcConfigGetCurrent && - m_pFcObjectSetVaBuild && - m_pFcObjectSetDestroy && - m_pFcPatternCreate && - m_pFcPatternDestroy && - m_pFcFontList && - m_pFcConfigGetFonts && - m_pFcFontSetCreate && - m_pFcCharSetCreate && - m_pFcCharSetAddChar && - m_pFcCharSetHasChar && - m_pFcCharSetDestroy && - m_pFcFontSetDestroy && - m_pFcFontSetAdd && - m_pFcPatternReference && - m_pFcPatternGetCharSet && - m_pFcPatternGetString && - m_pFcPatternGetInteger && - m_pFcPatternGetDouble && - m_pFcPatternGetBool && - m_pFcConfigAppFontAddFile && - m_pFcConfigAppFontAddDir && - m_pFcConfigParseAndLoad && - m_pFcFontMatch && - m_pFcDefaultSubstitute && - m_pFcConfigSubstitute && - m_pFcPatternDuplicate && - m_pFcPatternAddInteger && - m_pFcPatternAddDouble && - m_pFcPatternAddCharSet && - m_pFcPatternAddBool && - m_pFcPatternAddString && - m_pFcPatternDel - ) ) - { - osl_unloadModule( (oslModule)m_pLib ); - m_pLib = NULL; -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "not all needed symbols were found in libfontconfig\n" ); -#endif - return; - } - - - FcInit(); - if( ! FcConfigGetCurrent() ) - { - osl_unloadModule( (oslModule)m_pLib ); - m_pLib = NULL; - } -} - -void FontCfgWrapper::addFontSet( FcSetName eSetName ) -{ - #ifdef ENABLE_FONTCONFIG - /* - add only acceptable outlined fonts to our config, - for future fontconfig use - */ - FcFontSet* pOrig = FcConfigGetFonts( FcConfigGetCurrent(), eSetName ); - if( !pOrig ) - return; - - // filter the font sets to remove obsolete or duplicate faces - for( int i = 0; i < pOrig->nfont; ++i ) - { - FcPattern* pOrigPattern = pOrig->fonts[i]; - // #i115131# ignore non-outline fonts - FcBool bOutline = FcFalse; - FcResult eOutRes = FcPatternGetBool( pOrigPattern, FC_OUTLINE, 0, &bOutline ); - if( (eOutRes != FcResultMatch) || (bOutline == FcFalse) ) - continue; - // create a pattern to find eventually better alternatives - FcPattern* pBetterPattern = pOrigPattern; - if( m_nFcVersion > 20400 ) // #i115204# avoid trouble with old FC versions - { - FcPattern* pTestPattern = FcPatternDuplicate( pOrigPattern ); - FcPatternAddBool( pTestPattern, FC_OUTLINE, FcTrue ); - // TODO: ignore all attributes that are not interesting for finding dupes - // e.g. by using pattern->ImplFontAttr->pattern conversion - FcPatternDel( pTestPattern, FC_FONTVERSION ); - FcPatternDel( pTestPattern, FC_CHARSET ); - FcPatternDel( pTestPattern, FC_FILE ); - // find the font face for the dupe-search pattern - FcResult eFcResult = FcResultMatch; - pBetterPattern = FcFontMatch( FcConfigGetCurrent(), pTestPattern, &eFcResult ); - FcPatternDestroy( pTestPattern ); - if( eFcResult != FcResultMatch ) - continue; - // #i115131# double check results and eventually ignore them - eOutRes = FcPatternGetBool( pBetterPattern, FC_OUTLINE, 0, &bOutline ); - if( (eOutRes != FcResultMatch) || (bOutline == FcFalse) ) - continue; - } - // insert best found pattern for the dupe-search pattern - // TODO: skip inserting patterns that are already known in the target fontset - FcPatternReference( pBetterPattern ); - FcFontSetAdd( m_pOutlineSet, pBetterPattern ); - } - - // TODO?: FcFontSetDestroy( pOrig ); - #else - (void)eSetName; // prevent compiler warning about unused parameter - #endif -} - -FcFontSet* FontCfgWrapper::getFontSet() -{ - #ifdef ENABLE_FONTCONFIG - if( !m_pOutlineSet ) - { - m_pOutlineSet = FcFontSetCreate(); - addFontSet( FcSetSystem ); - if( m_nFcVersion > 20400 ) // #i85462# prevent crashes - addFontSet( FcSetApplication ); - } - #endif - - return m_pOutlineSet; -} - -FontCfgWrapper::~FontCfgWrapper() -{ - if( m_pOutlineSet ) - FcFontSetDestroy( m_pOutlineSet ); - if( m_pLib ) - osl_unloadModule( (oslModule)m_pLib ); -} - -static FontCfgWrapper* pOneInstance = NULL; - -FontCfgWrapper& FontCfgWrapper::get() -{ - if( ! pOneInstance ) - pOneInstance = new FontCfgWrapper(); - return *pOneInstance; -} - -void FontCfgWrapper::release() -{ - if( pOneInstance ) - { - delete pOneInstance; - pOneInstance = NULL; - } -} - -#ifdef ENABLE_FONTCONFIG -namespace -{ - typedef std::pair lang_and_family; - - class localizedsorter - { - rtl::OLocale maLoc; - public: - localizedsorter(rtl_Locale* pLoc) : maLoc(pLoc) {} - FcChar8* bestname(const std::vector &families); - }; - - FcChar8* localizedsorter::bestname(const std::vector &families) - { - FcChar8* candidate = families.begin()->second; - rtl::OString sLangMatch(rtl::OUStringToOString(maLoc.getLanguage().toAsciiLowerCase(), RTL_TEXTENCODING_UTF8)); - rtl::OString sFullMatch = sLangMatch; - sFullMatch += OString('-'); - sFullMatch += rtl::OUStringToOString(maLoc.getCountry().toAsciiLowerCase(), RTL_TEXTENCODING_UTF8); - - std::vector::const_iterator aEnd = families.end(); - bool alreadyclosematch = false; - for( std::vector::const_iterator aIter = families.begin(); aIter != aEnd; ++aIter ) - { - const char *pLang = (const char*)aIter->first; - if( rtl_str_compare( pLang, sFullMatch.getStr() ) == 0) - { - // both language and country match - candidate = aIter->second; - break; - } - else if( alreadyclosematch ) - continue; - else if( rtl_str_compare( pLang, sLangMatch.getStr()) == 0) - { - // just the language matches - candidate = aIter->second; - alreadyclosematch = true; - } - else if( rtl_str_compare( pLang, "en") == 0) - { - // fallback to the english family name - candidate = aIter->second; - } - } - return candidate; - } -} - -FcResult FontCfgWrapper::FamilyFromPattern(FcPattern* pPattern, FcChar8 **family) -{ - FcChar8 *origfamily; - FcResult eFamilyRes = FcPatternGetString( pPattern, FC_FAMILY, 0, &origfamily ); - *family = origfamily; - - if( eFamilyRes == FcResultMatch) - { - FcChar8* familylang = NULL; - if (FcPatternGetString( pPattern, FC_FAMILYLANG, 0, &familylang ) == FcResultMatch) - { - std::vector< lang_and_family > lang_and_families; - lang_and_families.push_back(lang_and_family(familylang, *family)); - int k = 1; - while (1) - { - if (FcPatternGetString( pPattern, FC_FAMILYLANG, k, &familylang ) != FcResultMatch) - break; - if (FcPatternGetString( pPattern, FC_FAMILY, k, family ) != FcResultMatch) - break; - lang_and_families.push_back(lang_and_family(familylang, *family)); - ++k; - } - - //possible to-do, sort by UILocale instead of process locale - rtl_Locale* pLoc; - osl_getProcessLocale(&pLoc); - localizedsorter aSorter(pLoc); - *family = aSorter.bestname(lang_and_families); - - std::vector::const_iterator aEnd = lang_and_families.end(); - for (std::vector::const_iterator aIter = lang_and_families.begin(); aIter != aEnd; ++aIter) - { - const char *candidate = (const char*)(aIter->second); - if (rtl_str_compare(candidate, (const char*)(*family)) != 0) - m_aFontNameToLocalized[OString(candidate)] = OString((const char*)(*family)); - } - if (rtl_str_compare((const char*)origfamily, (const char*)(*family)) != 0) - m_aLocalizedToCanonical[OString((const char*)(*family))] = OString((const char*)origfamily); - } - } - - return eFamilyRes; -} - -/* - * PrintFontManager::initFontconfig - */ -bool PrintFontManager::initFontconfig() -{ - FontCfgWrapper& rWrapper = FontCfgWrapper::get(); - if( ! rWrapper.isValid() ) - return false; - return true; -} - -namespace -{ - weight::type convertWeight(int weight) - { - // set weight - if( weight <= FC_WEIGHT_THIN ) - return weight::Thin; - else if( weight <= FC_WEIGHT_ULTRALIGHT ) - return weight::UltraLight; - else if( weight <= FC_WEIGHT_LIGHT ) - return weight::Light; - else if( weight <= FC_WEIGHT_BOOK ) - return weight::SemiLight; - else if( weight <= FC_WEIGHT_NORMAL ) - return weight::Normal; - else if( weight <= FC_WEIGHT_MEDIUM ) - return weight::Medium; - else if( weight <= FC_WEIGHT_SEMIBOLD ) - return weight::SemiBold; - else if( weight <= FC_WEIGHT_BOLD ) - return weight::Bold; - else if( weight <= FC_WEIGHT_ULTRABOLD ) - return weight::UltraBold; - return weight::Black; - } - - italic::type convertSlant(int slant) - { - // set italic - if( slant == FC_SLANT_ITALIC ) - return italic::Italic; - else if( slant == FC_SLANT_OBLIQUE ) - return italic::Oblique; - return italic::Upright; - } - - pitch::type convertSpacing(int spacing) - { - // set pitch - if( spacing == FC_MONO || spacing == FC_CHARCELL ) - return pitch::Fixed; - return pitch::Variable; - } - - width::type convertWidth(int width) - { - if (width == FC_WIDTH_ULTRACONDENSED) - return width::UltraCondensed; - else if (width == FC_WIDTH_EXTRACONDENSED) - return width::ExtraCondensed; - else if (width == FC_WIDTH_CONDENSED) - return width::Condensed; - else if (width == FC_WIDTH_SEMICONDENSED) - return width::SemiCondensed; - else if (width == FC_WIDTH_SEMIEXPANDED) - return width::SemiExpanded; - else if (width == FC_WIDTH_EXPANDED) - return width::Expanded; - else if (width == FC_WIDTH_EXTRAEXPANDED) - return width::ExtraExpanded; - else if (width == FC_WIDTH_ULTRAEXPANDED) - return width::UltraExpanded; - return width::Normal; - } -} - -int PrintFontManager::countFontconfigFonts( std::hash_map& o_rVisitedPaths ) -{ - int nFonts = 0; - - FontCfgWrapper& rWrapper = FontCfgWrapper::get(); - if( !rWrapper.isValid() ) - return 0; - - FcFontSet* pFSet = rWrapper.getFontSet(); - if( pFSet ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "found %d entries in fontconfig fontset\n", pFSet->nfont ); -#endif - for( int i = 0; i < pFSet->nfont; i++ ) - { - FcChar8* file = NULL; - FcChar8* family = NULL; - FcChar8* style = NULL; - int slant = 0; - int weight = 0; - int spacing = 0; - int nCollectionEntry = -1; - FcBool outline = false; - - FcResult eFileRes = rWrapper.FcPatternGetString( pFSet->fonts[i], FC_FILE, 0, &file ); - FcResult eFamilyRes = rWrapper.FamilyFromPattern( pFSet->fonts[i], &family ); - FcResult eStyleRes = rWrapper.FcPatternGetString( pFSet->fonts[i], FC_STYLE, 0, &style ); - FcResult eSlantRes = rWrapper.FcPatternGetInteger( pFSet->fonts[i], FC_SLANT, 0, &slant ); - FcResult eWeightRes = rWrapper.FcPatternGetInteger( pFSet->fonts[i], FC_WEIGHT, 0, &weight ); - FcResult eSpacRes = rWrapper.FcPatternGetInteger( pFSet->fonts[i], FC_SPACING, 0, &spacing ); - FcResult eOutRes = rWrapper.FcPatternGetBool( pFSet->fonts[i], FC_OUTLINE, 0, &outline ); - FcResult eIndexRes = rWrapper.FcPatternGetInteger( pFSet->fonts[i], FC_INDEX, 0, &nCollectionEntry ); - - if( eFileRes != FcResultMatch || eFamilyRes != FcResultMatch || eOutRes != FcResultMatch ) - continue; - -#if (OSL_DEBUG_LEVEL > 2) - fprintf( stderr, "found font \"%s\" in file %s\n" - " weight = %d, slant = %d, style = \"%s\"\n" - " spacing = %d, outline = %d\n" - , family, file - , eWeightRes == FcResultMatch ? weight : -1 - , eSpacRes == FcResultMatch ? slant : -1 - , eStyleRes == FcResultMatch ? (const char*) style : "" - , eSpacRes == FcResultMatch ? spacing : -1 - , eOutRes == FcResultMatch ? outline : -1 - ); -#endif - -// OSL_ASSERT(eOutRes != FcResultMatch || outline); - - // only outline fonts are usable to psprint anyway - if( eOutRes == FcResultMatch && ! outline ) - continue; - - // see if this font is already cached - // update attributes - std::list< PrintFont* > aFonts; - OString aDir, aBase, aOrgPath( (sal_Char*)file ); - splitPath( aOrgPath, aDir, aBase ); - - o_rVisitedPaths[aDir] = 1; - - int nDirID = getDirectoryAtom( aDir, true ); - if( ! m_pFontCache->getFontCacheFile( nDirID, aBase, aFonts ) ) - { -#if OSL_DEBUG_LEVEL > 2 - fprintf( stderr, "file %s not cached\n", aBase.getStr() ); -#endif - // not known, analyze font file to get attributes - // not described by fontconfig (e.g. alias names, PSName) - std::list< OString > aDummy; - analyzeFontFile( nDirID, aBase, aDummy, aFonts ); -#if OSL_DEBUG_LEVEL > 1 - if( aFonts.empty() ) - fprintf( stderr, "Warning: file \"%s\" is unusable to psprint\n", aOrgPath.getStr() ); -#endif - } - if( aFonts.empty() ) - { - // TODO: remove fonts unusable to psprint from fontset - continue; - } - - int nFamilyName = m_pAtoms->getAtom( ATOM_FAMILYNAME, OStringToOUString( OString( (sal_Char*)family ), RTL_TEXTENCODING_UTF8 ), sal_True ); - PrintFont* pUpdate = aFonts.front(); - std::list::const_iterator second_font = aFonts.begin(); - ++second_font; - if( second_font != aFonts.end() ) // more than one font - { - // a collection entry, get the correct index - if( eIndexRes == FcResultMatch && nCollectionEntry != -1 ) - { - for( std::list< PrintFont* >::iterator it = aFonts.begin(); it != aFonts.end(); ++it ) - { - if( (*it)->m_eType == fonttype::TrueType && - static_cast(*it)->m_nCollectionEntry == nCollectionEntry ) - { - pUpdate = *it; - break; - } - } - // update collection entry - // additional entries will be created in the cache - // if this is a new index (that is if the loop above - // ran to the end of the list) - if( pUpdate->m_eType == fonttype::TrueType ) // sanity check, this should always be the case here - static_cast(pUpdate)->m_nCollectionEntry = nCollectionEntry; - } - else - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "multiple fonts for file, but no index in fontconfig pattern ! (index res = %d collection entry = %d\nfile will not be used\n", eIndexRes, nCollectionEntry ); -#endif - // we have found more than one font in this file - // but fontconfig will not tell us which index is meant - // -> something is in disorder, do not use this font - pUpdate = NULL; - } - } - - if( pUpdate ) - { - // set family name - if( pUpdate->m_nFamilyName != nFamilyName ) - { -#if 0 // fontconfig prefers nameid=16 for the family name which is all fine - // but Writer suffers from #i79878# - // the only reasonable workaround for now is to use the classic nameid=1 - pUpdate->m_aAliases.remove( pUpdate->m_nFamilyName ); - pUpdate->m_aAliases.push_back( pUpdate->m_nFamilyName ); - pUpdate->m_aAliases.remove( nFamilyName ); - pUpdate->m_nFamilyName = nFamilyName; -#endif - } - if( eWeightRes == FcResultMatch ) - pUpdate->m_eWeight = convertWeight(weight); - if( eSpacRes == FcResultMatch ) - pUpdate->m_ePitch = convertSpacing(spacing); - if( eSlantRes == FcResultMatch ) - pUpdate->m_eItalic = convertSlant(slant); - if( eStyleRes == FcResultMatch ) - { - pUpdate->m_aStyleName = OStringToOUString( OString( (sal_Char*)style ), RTL_TEXTENCODING_UTF8 ); - } - - // update font cache - m_pFontCache->updateFontCacheEntry( pUpdate, false ); - // sort into known fonts - fontID aFont = m_nNextFontID++; - m_aFonts[ aFont ] = pUpdate; - m_aFontFileToFontID[ aBase ].insert( aFont ); - nFonts++; -#if OSL_DEBUG_LEVEL > 2 - fprintf( stderr, "inserted font %s as fontID %d\n", family, aFont ); -#endif - } - // clean up the fonts we did not put into the list - for( std::list< PrintFont* >::iterator it = aFonts.begin(); it != aFonts.end(); ++it ) - { - if( *it != pUpdate ) - { - m_pFontCache->updateFontCacheEntry( *it, false ); // prepare a cache entry for a collection item - delete *it; - } - } - } - } - - // how does one get rid of the config ? -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "inserted %d fonts from fontconfig\n", nFonts ); -#endif - return nFonts; -} - -void PrintFontManager::deinitFontconfig() -{ - FontCfgWrapper::release(); -} - -int PrintFontManager::FreeTypeCharIndex( void *pFace, sal_uInt32 aChar ) -{ - FontCfgWrapper& rWrapper = FontCfgWrapper::get(); - return rWrapper.isValid() ? rWrapper.FcFreeTypeCharIndex( (FT_Face)pFace, aChar ) : 0; -} - -bool PrintFontManager::addFontconfigDir( const rtl::OString& rDirName ) -{ - FontCfgWrapper& rWrapper = FontCfgWrapper::get(); - if( ! rWrapper.isValid() ) - return false; - - // workaround for a stability problems in older FC versions - // when handling application specifc fonts - const int nVersion = rWrapper.FcGetVersion(); - if( nVersion <= 20400 ) - return false; - const char* pDirName = (const char*)rDirName.getStr(); - bool bDirOk = (rWrapper.FcConfigAppFontAddDir( rWrapper.FcConfigGetCurrent(), (FcChar8*)pDirName ) == FcTrue); - -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "FcConfigAppFontAddDir( \"%s\") => %d\n", pDirName, bDirOk ); -#endif - - if( !bDirOk ) - return false; - - // load dir-specific fc-config file too if available - const rtl::OString aConfFileName = rDirName + "/fc_local.conf"; - FILE* pCfgFile = fopen( aConfFileName.getStr(), "rb" ); - if( pCfgFile ) - { - fclose( pCfgFile); - bool bCfgOk = rWrapper.FcConfigParseAndLoad( rWrapper.FcConfigGetCurrent(), - (FcChar8*)aConfFileName.getStr(), FcTrue ); - if( !bCfgOk ) - fprintf( stderr, "FcConfigParseAndLoad( \"%s\") => %d\n", aConfFileName.getStr(), bCfgOk ); - } - - return true; -} - -static void addtopattern(FontCfgWrapper& rWrapper, FcPattern *pPattern, - italic::type eItalic, weight::type eWeight, width::type eWidth, pitch::type ePitch) -{ - if( eItalic != italic::Unknown ) - { - int nSlant = FC_SLANT_ROMAN; - switch( eItalic ) - { - case italic::Italic: nSlant = FC_SLANT_ITALIC;break; - case italic::Oblique: nSlant = FC_SLANT_OBLIQUE;break; - default: - break; - } - rWrapper.FcPatternAddInteger( pPattern, FC_SLANT, nSlant ); - } - if( eWeight != weight::Unknown ) - { - int nWeight = FC_WEIGHT_NORMAL; - switch( eWeight ) - { - case weight::Thin: nWeight = FC_WEIGHT_THIN;break; - case weight::UltraLight: nWeight = FC_WEIGHT_ULTRALIGHT;break; - case weight::Light: nWeight = FC_WEIGHT_LIGHT;break; - case weight::SemiLight: nWeight = FC_WEIGHT_BOOK;break; - case weight::Normal: nWeight = FC_WEIGHT_NORMAL;break; - case weight::Medium: nWeight = FC_WEIGHT_MEDIUM;break; - case weight::SemiBold: nWeight = FC_WEIGHT_SEMIBOLD;break; - case weight::Bold: nWeight = FC_WEIGHT_BOLD;break; - case weight::UltraBold: nWeight = FC_WEIGHT_ULTRABOLD;break; - case weight::Black: nWeight = FC_WEIGHT_BLACK;break; - default: - break; - } - rWrapper.FcPatternAddInteger( pPattern, FC_WEIGHT, nWeight ); - } - if( eWidth != width::Unknown ) - { - int nWidth = FC_WIDTH_NORMAL; - switch( eWidth ) - { - case width::UltraCondensed: nWidth = FC_WIDTH_ULTRACONDENSED;break; - case width::ExtraCondensed: nWidth = FC_WIDTH_EXTRACONDENSED;break; - case width::Condensed: nWidth = FC_WIDTH_CONDENSED;break; - case width::SemiCondensed: nWidth = FC_WIDTH_SEMICONDENSED;break; - case width::Normal: nWidth = FC_WIDTH_NORMAL;break; - case width::SemiExpanded: nWidth = FC_WIDTH_SEMIEXPANDED;break; - case width::Expanded: nWidth = FC_WIDTH_EXPANDED;break; - case width::ExtraExpanded: nWidth = FC_WIDTH_EXTRAEXPANDED;break; - case width::UltraExpanded: nWidth = FC_WIDTH_ULTRACONDENSED;break; - default: - break; - } - rWrapper.FcPatternAddInteger( pPattern, FC_WIDTH, nWidth ); - } - if( ePitch != pitch::Unknown ) - { - int nSpacing = FC_PROPORTIONAL; - switch( ePitch ) - { - case pitch::Fixed: nSpacing = FC_MONO;break; - case pitch::Variable: nSpacing = FC_PROPORTIONAL;break; - default: - break; - } - rWrapper.FcPatternAddInteger( pPattern, FC_SPACING, nSpacing ); - if (nSpacing == FC_MONO) - rWrapper.FcPatternAddString( pPattern, FC_FAMILY, (FcChar8*)"monospace"); - } -} - -rtl::OUString PrintFontManager::Substitute(const rtl::OUString& rFontName, - rtl::OUString& rMissingCodes, const rtl::OString &rLangAttrib, - italic::type &rItalic, weight::type &rWeight, - width::type &rWidth, pitch::type &rPitch) const -{ - rtl::OUString aName; - FontCfgWrapper& rWrapper = FontCfgWrapper::get(); - if( ! rWrapper.isValid() ) - return aName; - - // build pattern argument for fontconfig query - FcPattern* pPattern = rWrapper.FcPatternCreate(); - - // Prefer scalable fonts - rWrapper.FcPatternAddBool( pPattern, FC_SCALABLE, FcTrue ); - - const rtl::OString aTargetName = rtl::OUStringToOString( rFontName, RTL_TEXTENCODING_UTF8 ); - const FcChar8* pTargetNameUtf8 = (FcChar8*)aTargetName.getStr(); - rWrapper.FcPatternAddString( pPattern, FC_FAMILY, pTargetNameUtf8 ); - - const FcChar8* pLangAttribUtf8 = (FcChar8*)rLangAttrib.getStr(); - if( rLangAttrib.getLength() ) - rWrapper.FcPatternAddString( pPattern, FC_LANG, pLangAttribUtf8 ); - - // Add required Unicode characters, if any - if ( rMissingCodes.getLength() ) - { - FcCharSet *unicodes = rWrapper.FcCharSetCreate(); - for( sal_Int32 nStrIndex = 0; nStrIndex < rMissingCodes.getLength(); ) - { - // also handle unicode surrogates - const sal_uInt32 nCode = rMissingCodes.iterateCodePoints( &nStrIndex ); - rWrapper.FcCharSetAddChar( unicodes, nCode ); - } - rWrapper.FcPatternAddCharSet( pPattern, FC_CHARSET, unicodes); - rWrapper.FcCharSetDestroy( unicodes ); - } - - addtopattern(rWrapper, pPattern, rItalic, rWeight, rWidth, rPitch); - - // query fontconfig for a substitute - rWrapper.FcConfigSubstitute( rWrapper.FcConfigGetCurrent(), pPattern, FcMatchPattern ); - rWrapper.FcDefaultSubstitute( pPattern ); - - // process the result of the fontconfig query - FcResult eResult = FcResultNoMatch; - FcFontSet* pFontSet = rWrapper.getFontSet(); - FcPattern* pResult = rWrapper.FcFontSetMatch( rWrapper.FcConfigGetCurrent(), &pFontSet, 1, pPattern, &eResult ); - rWrapper.FcPatternDestroy( pPattern ); - - FcFontSet* pSet = NULL; - if( pResult ) - { - pSet = rWrapper.FcFontSetCreate(); - // info: destroying the pSet destroys pResult implicitly - // since pResult was "added" to pSet - rWrapper.FcFontSetAdd( pSet, pResult ); - } - - if( pSet ) - { - if( pSet->nfont > 0 ) - { - //extract the closest match - FcChar8* family = NULL; - FcResult eFileRes = rWrapper.FcPatternGetString( pSet->fonts[0], FC_FAMILY, 0, &family ); - - // get the family name - if( eFileRes == FcResultMatch ) - { - OString sFamily((sal_Char*)family); - std::hash_map< rtl::OString, rtl::OString, rtl::OStringHash >::const_iterator aI = rWrapper.m_aFontNameToLocalized.find(sFamily); - if (aI != rWrapper.m_aFontNameToLocalized.end()) - sFamily = aI->second; - aName = rtl::OStringToOUString( sFamily, RTL_TEXTENCODING_UTF8 ); - - - int val = 0; - if ( FcResultMatch == rWrapper.FcPatternGetInteger( pSet->fonts[0], FC_WEIGHT, 0, &val)) - rWeight = convertWeight(val); - if ( FcResultMatch == rWrapper.FcPatternGetInteger( pSet->fonts[0], FC_SLANT, 0, &val)) - rItalic = convertSlant(val); - if ( FcResultMatch == rWrapper.FcPatternGetInteger( pSet->fonts[0], FC_SPACING, 0, &val)) - rPitch = convertSpacing(val); - if ( FcResultMatch == rWrapper.FcPatternGetInteger( pSet->fonts[0], FC_WIDTH, 0, &val)) - rWidth = convertWidth(val); - } - - // update rMissingCodes by removing resolved unicodes - if( rMissingCodes.getLength() > 0 ) - { - sal_uInt32* pRemainingCodes = (sal_uInt32*)alloca( rMissingCodes.getLength() * sizeof(sal_uInt32) ); - int nRemainingLen = 0; - FcCharSet* unicodes; - if( !rWrapper.FcPatternGetCharSet( pSet->fonts[0], FC_CHARSET, 0, &unicodes ) ) - { - for( sal_Int32 nStrIndex = 0; nStrIndex < rMissingCodes.getLength(); ) - { - // also handle unicode surrogates - const sal_uInt32 nCode = rMissingCodes.iterateCodePoints( &nStrIndex ); - if( rWrapper.FcCharSetHasChar( unicodes, nCode ) != FcTrue ) - pRemainingCodes[ nRemainingLen++ ] = nCode; - } - } - rMissingCodes = OUString( pRemainingCodes, nRemainingLen ); - } - } - - rWrapper.FcFontSetDestroy( pSet ); - } - - return aName; -} - -bool PrintFontManager::getFontOptions( - const FastPrintFontInfo& rInfo, int nSize, void (*subcallback)(void*), - ImplFontOptions& rOptions) const -{ -#ifndef ENABLE_FONTCONFIG - (void)rInfo;(void)nSize;(void)subcallback;(void)rOptions; - return false; -#else // ENABLE_FONTCONFIG - FontCfgWrapper& rWrapper = FontCfgWrapper::get(); - if( ! rWrapper.isValid() ) - return false; - - FcConfig* pConfig = rWrapper.FcConfigGetCurrent(); - FcPattern* pPattern = rWrapper.FcPatternCreate(); - - OString sFamily = OUStringToOString( rInfo.m_aFamilyName, RTL_TEXTENCODING_UTF8 ); - - std::hash_map< rtl::OString, rtl::OString, rtl::OStringHash >::const_iterator aI = rWrapper.m_aLocalizedToCanonical.find(sFamily); - if (aI != rWrapper.m_aLocalizedToCanonical.end()) - sFamily = aI->second; - if( sFamily.getLength() ) - rWrapper.FcPatternAddString( pPattern, FC_FAMILY, (FcChar8*)sFamily.getStr() ); - - addtopattern(rWrapper, pPattern, rInfo.m_eItalic, rInfo.m_eWeight, rInfo.m_eWidth, rInfo.m_ePitch); - rWrapper.FcPatternAddDouble( pPattern, FC_PIXEL_SIZE, nSize); - - FcBool embitmap = true, antialias = true, autohint = true, hinting = true; - int hintstyle = FC_HINT_FULL; - - rWrapper.FcConfigSubstitute( pConfig, pPattern, FcMatchPattern ); - if (subcallback) subcallback(pPattern); - rWrapper.FcDefaultSubstitute( pPattern ); - - FcResult eResult = FcResultNoMatch; - FcFontSet* pFontSet = rWrapper.getFontSet(); - FcPattern* pResult = rWrapper.FcFontSetMatch( pConfig, &pFontSet, 1, pPattern, &eResult ); - if( pResult ) - { - FcFontSet* pSet = rWrapper.FcFontSetCreate(); - rWrapper.FcFontSetAdd( pSet, pResult ); - if( pSet->nfont > 0 ) - { - FcResult eEmbeddedBitmap = rWrapper.FcPatternGetBool(pSet->fonts[0], - FC_EMBEDDED_BITMAP, 0, &embitmap); - FcResult eAntialias = rWrapper.FcPatternGetBool(pSet->fonts[0], - FC_ANTIALIAS, 0, &antialias); - FcResult eAutoHint = rWrapper.FcPatternGetBool(pSet->fonts[0], - FC_AUTOHINT, 0, &autohint); - FcResult eHinting = rWrapper.FcPatternGetBool(pSet->fonts[0], - FC_HINTING, 0, &hinting); - /*FcResult eHintStyle =*/ rWrapper.FcPatternGetInteger( pSet->fonts[0], - FC_HINT_STYLE, 0, &hintstyle); - - if( eEmbeddedBitmap == FcResultMatch ) - rOptions.meEmbeddedBitmap = embitmap ? EMBEDDEDBITMAP_TRUE : EMBEDDEDBITMAP_FALSE; - if( eAntialias == FcResultMatch ) - rOptions.meAntiAlias = antialias ? ANTIALIAS_TRUE : ANTIALIAS_FALSE; - if( eAutoHint == FcResultMatch ) - rOptions.meAutoHint = autohint ? AUTOHINT_TRUE : AUTOHINT_FALSE; - if( eHinting == FcResultMatch ) - rOptions.meHinting = hinting ? HINTING_TRUE : HINTING_FALSE; - switch (hintstyle) - { - case FC_HINT_NONE: rOptions.meHintStyle = HINT_NONE; break; - case FC_HINT_SLIGHT: rOptions.meHintStyle = HINT_SLIGHT; break; - case FC_HINT_MEDIUM: rOptions.meHintStyle = HINT_MEDIUM; break; - default: // fall through - case FC_HINT_FULL: rOptions.meHintStyle = HINT_FULL; break; - } - } - // info: destroying the pSet destroys pResult implicitly - // since pResult was "added" to pSet - rWrapper.FcFontSetDestroy( pSet ); - } - - // cleanup - rWrapper.FcPatternDestroy( pPattern ); - - // TODO: return true only if non-default font options are set - const bool bOK = (pResult != NULL); - return bOK; -#endif -} - -bool PrintFontManager::matchFont( FastPrintFontInfo& rInfo, const com::sun::star::lang::Locale& rLocale ) -{ - FontCfgWrapper& rWrapper = FontCfgWrapper::get(); - if( ! rWrapper.isValid() ) - return false; - - FcConfig* pConfig = rWrapper.FcConfigGetCurrent(); - FcPattern* pPattern = rWrapper.FcPatternCreate(); - - OString aLangAttrib; - // populate pattern with font characteristics - if( rLocale.Language.getLength() ) - { - OUStringBuffer aLang(6); - aLang.append( rLocale.Language ); - if( rLocale.Country.getLength() ) - { - aLang.append( sal_Unicode('-') ); - aLang.append( rLocale.Country ); - } - aLangAttrib = OUStringToOString( aLang.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ); - } - if( aLangAttrib.getLength() ) - rWrapper.FcPatternAddString( pPattern, FC_LANG, (FcChar8*)aLangAttrib.getStr() ); - - OString aFamily = OUStringToOString( rInfo.m_aFamilyName, RTL_TEXTENCODING_UTF8 ); - if( aFamily.getLength() ) - rWrapper.FcPatternAddString( pPattern, FC_FAMILY, (FcChar8*)aFamily.getStr() ); - - addtopattern(rWrapper, pPattern, rInfo.m_eItalic, rInfo.m_eWeight, rInfo.m_eWidth, rInfo.m_ePitch); - - rWrapper.FcConfigSubstitute( pConfig, pPattern, FcMatchPattern ); - rWrapper.FcDefaultSubstitute( pPattern ); - FcResult eResult = FcResultNoMatch; - FcFontSet *pFontSet = rWrapper.getFontSet(); - FcPattern* pResult = rWrapper.FcFontSetMatch( pConfig, &pFontSet, 1, pPattern, &eResult ); - bool bSuccess = false; - if( pResult ) - { - FcFontSet* pSet = rWrapper.FcFontSetCreate(); - rWrapper.FcFontSetAdd( pSet, pResult ); - if( pSet->nfont > 0 ) - { - //extract the closest match - FcChar8* file = NULL; - FcResult eFileRes = rWrapper.FcPatternGetString( pSet->fonts[0], FC_FILE, 0, &file ); - if( eFileRes == FcResultMatch ) - { - OString aDir, aBase, aOrgPath( (sal_Char*)file ); - splitPath( aOrgPath, aDir, aBase ); - int nDirID = getDirectoryAtom( aDir, true ); - fontID aFont = findFontFileID( nDirID, aBase ); - if( aFont > 0 ) - bSuccess = getFontFastInfo( aFont, rInfo ); - } - } - // info: destroying the pSet destroys pResult implicitly - // since pResult was "added" to pSet - rWrapper.FcFontSetDestroy( pSet ); - } - - // cleanup - rWrapper.FcPatternDestroy( pPattern ); - - return bSuccess; -} - -#else // ENABLE_FONTCONFIG not defined - -bool PrintFontManager::initFontconfig() -{ - return false; -} - -int PrintFontManager::countFontconfigFonts( std::hash_map& ) -{ - return 0; -} - -void PrintFontManager::deinitFontconfig() -{} - -bool PrintFontManager::addFontconfigDir( const rtl::OString& ) -{ - return false; -} - -bool PrintFontManager::matchFont( FastPrintFontInfo&, const com::sun::star::lang::Locale& ) -{ - return false; -} - -int PrintFontManager::FreeTypeCharIndex( void*, sal_uInt32 ) -{ - return 0; -} - -rtl::OUString PrintFontManager::Substitute( const rtl::OUString&, - rtl::OUString&, const rtl::OString&, italic::type, weight::type, width::type, pitch::type) const -{ - rtl::OUString aName; - return aName; -} - -#endif // ENABLE_FONTCONFIG - diff --git a/vcl/unx/source/fontmanager/fontmanager.cxx b/vcl/unx/source/fontmanager/fontmanager.cxx deleted file mode 100644 index 21183dc567ec..000000000000 --- a/vcl/unx/source/fontmanager/fontmanager.cxx +++ /dev/null @@ -1,4099 +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_vcl.hxx" - -#include -#include -#include -#include -#include - -#include "unotools/atom.hxx" - -#include "vcl/fontmanager.hxx" -#include "vcl/fontcache.hxx" -#include "vcl/fontcache.hxx" -#include "vcl/fontsubset.hxx" -#include "vcl/impfont.hxx" -#include "vcl/strhelper.hxx" -#include "vcl/ppdparser.hxx" -#include "vcl/svdata.hxx" -#include "vcl/salinst.hxx" - -#include "tools/urlobj.hxx" -#include "tools/stream.hxx" -#include "tools/debug.hxx" -#include "tools/config.hxx" - -#include "osl/file.hxx" -#include "osl/process.h" - -#include "rtl/tencinfo.h" -#include "rtl/ustrbuf.hxx" -#include "rtl/strbuf.hxx" - -#include "i18npool/mslangid.hxx" - - -#include "parseAFM.hxx" -#include "sft.hxx" - -#if OSL_DEBUG_LEVEL > 1 -#include -#include -#endif - -#include "sal/alloca.h" - -#include -#include -#include - -#include "adobeenc.tab" // get encoding table for AFM metrics - -#ifdef CALLGRIND_COMPILE -#include -#endif - -#include "comphelper/processfactory.hxx" -#include "com/sun/star/beans/XMaterialHolder.hpp" -#include "com/sun/star/beans/NamedValue.hpp" - -#define PRINTER_METRICDIR "fontmetric" - -using namespace vcl; -using namespace utl; -using namespace psp; -using namespace osl; -using namespace rtl; -using namespace com::sun::star::uno; -using namespace com::sun::star::beans; -using namespace com::sun::star::lang; - -/* - * static helpers - */ - -inline sal_uInt16 getUInt16BE( const sal_uInt8*& pBuffer ) -{ - sal_uInt16 nRet = (sal_uInt16)pBuffer[1] | - (((sal_uInt16)pBuffer[0]) << 8); - pBuffer+=2; - return nRet; -} - -inline sal_uInt32 getUInt32BE( const sal_uInt8*& pBuffer ) -{ - sal_uInt32 nRet = (((sal_uInt32)pBuffer[0]) << 24) | - (((sal_uInt32)pBuffer[1]) << 16) | - (((sal_uInt32)pBuffer[2]) << 8) | - (((sal_uInt32)pBuffer[3]) ); - pBuffer += 4; - return nRet; -} - -static italic::type parseItalic( const ByteString& rItalic ) -{ - italic::type eItalic = italic::Unknown; - if( rItalic.EqualsIgnoreCaseAscii( "i" ) ) - eItalic = italic::Italic; - else if( rItalic.EqualsIgnoreCaseAscii( "o" ) ) - eItalic = italic::Oblique; - else - eItalic = italic::Upright; - return eItalic; -} - -// ------------------------------------------------------------------------- - -static weight::type parseWeight( const ByteString& rWeight ) -{ - weight::type eWeight = weight::Unknown; - if( rWeight.Search( "bold" ) != STRING_NOTFOUND ) - { - if( rWeight.Search( "emi" ) != STRING_NOTFOUND ) // semi, demi - eWeight = weight::SemiBold; - else if( rWeight.Search( "ultra" ) != STRING_NOTFOUND ) - eWeight = weight::UltraBold; - else - eWeight = weight::Bold; - } - else if( rWeight.Search( "heavy" ) != STRING_NOTFOUND ) - eWeight = weight::Bold; - else if( rWeight.Search( "light" ) != STRING_NOTFOUND ) - { - if( rWeight.Search( "emi" ) != STRING_NOTFOUND ) // semi, demi - eWeight = weight::SemiLight; - else if( rWeight.Search( "ultra" ) != STRING_NOTFOUND ) - eWeight = weight::UltraLight; - else - eWeight = weight::Light; - } - else if( rWeight.Search( "black" ) != STRING_NOTFOUND ) - eWeight = weight::Black; - else if( rWeight.Equals( "demi" ) ) - eWeight = weight::SemiBold; - else if( rWeight.Equals( "book" ) || - rWeight.Equals( "semicondensed" ) ) - eWeight = weight::Light; - else if( rWeight.Equals( "medium" ) || rWeight.Equals( "roman" ) ) - eWeight = weight::Medium; - else - eWeight = weight::Normal; - return eWeight; -} - -// ------------------------------------------------------------------------- - -static width::type parseWidth( const ByteString& rWidth ) -{ - width::type eWidth = width::Unknown; - if( rWidth.Equals( "bold" ) || - rWidth.Equals( "semiexpanded" ) ) - eWidth = width::SemiExpanded; - else if( rWidth.Equals( "condensed" ) || - rWidth.Equals( "narrow" ) ) - eWidth = width::Condensed; - else if( rWidth.Equals( "double wide" ) || - rWidth.Equals( "extraexpanded" ) || - rWidth.Equals( "ultraexpanded" ) ) - eWidth = width::UltraExpanded; - else if( rWidth.Equals( "expanded" ) || - rWidth.Equals( "wide" ) ) - eWidth = width::Expanded; - else if( rWidth.Equals( "extracondensed" ) ) - eWidth = width::ExtraCondensed; - else if( rWidth.Equals( "semicondensed" ) ) - eWidth = width::SemiCondensed; - else if( rWidth.Equals( "ultracondensed" ) ) - eWidth = width::UltraCondensed; - else - eWidth = width::Normal; - - return eWidth; -} - -// ------------------------------------------------------------------------- -bool PrintFontManager::XLFDEntry::operator<(const PrintFontManager::XLFDEntry& rRight) const -{ - sal_Int32 nCmp = 0; - if( (nMask & MaskFamily) && (rRight.nMask & MaskFamily) ) - { - nCmp = rtl_str_compareIgnoreAsciiCase_WithLength( aFamily.pData->buffer, - aFamily.pData->length, - rRight.aFamily.pData->buffer, - rRight.aFamily.pData->length ); - if( nCmp != 0 ) - return nCmp < 0; - } - - if( (nMask & MaskFoundry) && (rRight.nMask & MaskFoundry) ) - { - nCmp = rtl_str_compareIgnoreAsciiCase_WithLength( aFoundry.pData->buffer, - aFoundry.pData->length, - rRight.aFoundry.pData->buffer, - rRight.aFoundry.pData->length ); - if( nCmp != 0 ) - return nCmp < 0; - } - - if( (nMask & MaskItalic) && (rRight.nMask & MaskItalic) ) - { - if( eItalic != rRight.eItalic ) - return (int)eItalic < (int)rRight.eItalic; - } - - if( (nMask & MaskWeight) && (rRight.nMask & MaskWeight) ) - { - if( eWeight != rRight.eWeight ) - return (int)eWeight < (int)rRight.eWeight; - } - - if( (nMask & MaskWidth) && (rRight.nMask & MaskWidth) ) - { - if( eWidth != rRight.eWidth ) - return (int)eWidth < (int)rRight.eWidth; - } - - if( (nMask & MaskPitch) && (rRight.nMask & MaskPitch) ) - { - if( ePitch != rRight.ePitch ) - return (int)ePitch < (int)rRight.ePitch; - } - - if( (nMask & MaskAddStyle) && (rRight.nMask & MaskAddStyle) ) - { - nCmp = rtl_str_compareIgnoreAsciiCase_WithLength( aAddStyle.pData->buffer, - aAddStyle.pData->length, - rRight.aAddStyle.pData->buffer, - rRight.aAddStyle.pData->length ); - if( nCmp != 0 ) - return nCmp < 0; - } - - if( (nMask & MaskEncoding) && (rRight.nMask & MaskEncoding) ) - { - if( aEncoding != rRight.aEncoding ) - return aEncoding < rRight.aEncoding; - } - - return false; -} - -bool PrintFontManager::XLFDEntry::operator==(const PrintFontManager::XLFDEntry& rRight) const -{ - sal_Int32 nCmp = 0; - if( (nMask & MaskFamily) && (rRight.nMask & MaskFamily) ) - { - nCmp = rtl_str_compareIgnoreAsciiCase_WithLength( aFamily.pData->buffer, - aFamily.pData->length, - rRight.aFamily.pData->buffer, - rRight.aFamily.pData->length ); - if( nCmp != 0 ) - return false; - } - - if( (nMask & MaskFoundry) && (rRight.nMask & MaskFoundry) ) - { - nCmp = rtl_str_compareIgnoreAsciiCase_WithLength( aFoundry.pData->buffer, - aFoundry.pData->length, - rRight.aFoundry.pData->buffer, - rRight.aFoundry.pData->length ); - if( nCmp != 0 ) - return false; - } - - if( (nMask & MaskItalic) && (rRight.nMask & MaskItalic) ) - { - if( eItalic != rRight.eItalic ) - return false; - } - - if( (nMask & MaskWeight) && (rRight.nMask & MaskWeight) ) - { - if( eWeight != rRight.eWeight ) - return false; - } - - if( (nMask & MaskWidth) && (rRight.nMask & MaskWidth) ) - { - if( eWidth != rRight.eWidth ) - return false; - } - - if( (nMask & MaskPitch) && (rRight.nMask & MaskPitch) ) - { - if( ePitch != rRight.ePitch ) - return false; - } - - if( (nMask & MaskAddStyle) && (rRight.nMask & MaskAddStyle) ) - { - nCmp = rtl_str_compareIgnoreAsciiCase_WithLength( aAddStyle.pData->buffer, - aAddStyle.pData->length, - rRight.aAddStyle.pData->buffer, - rRight.aAddStyle.pData->length ); - if( nCmp != 0 ) - return false; - } - - if( (nMask & MaskEncoding) && (rRight.nMask & MaskEncoding) ) - { - if( aEncoding != rRight.aEncoding ) - return false; - } - - return true; -} - -/* - * PrintFont implementations - */ -PrintFontManager::PrintFont::PrintFont( fonttype::type eType ) : - m_eType( eType ), - m_nFamilyName( 0 ), - m_nPSName( 0 ), - m_eItalic( italic::Unknown ), - m_eWidth( width::Unknown ), - m_eWeight( weight::Unknown ), - m_ePitch( pitch::Unknown ), - m_aEncoding( RTL_TEXTENCODING_DONTKNOW ), - m_bFontEncodingOnly( false ), - m_pMetrics( NULL ), - m_nAscend( 0 ), - m_nDescend( 0 ), - m_nLeading( 0 ), - m_nXMin( 0 ), - m_nYMin( 0 ), - m_nXMax( 0 ), - m_nYMax( 0 ), - m_bHaveVerticalSubstitutedGlyphs( false ), - m_bUserOverride( false ) -{ -} - -// ------------------------------------------------------------------------- - -PrintFontManager::PrintFont::~PrintFont() -{ - if( m_pMetrics ) - delete m_pMetrics; -} - -// ------------------------------------------------------------------------- - -PrintFontManager::Type1FontFile::~Type1FontFile() -{ -} - -// ------------------------------------------------------------------------- - -PrintFontManager::TrueTypeFontFile::TrueTypeFontFile() -: PrintFont( fonttype::TrueType ) -, m_nDirectory( 0 ) -, m_nCollectionEntry(-1) -, m_nTypeFlags( TYPEFLAG_INVALID ) -{} - -// ------------------------------------------------------------------------- - -PrintFontManager::TrueTypeFontFile::~TrueTypeFontFile() -{ -} - -// ------------------------------------------------------------------------- - -PrintFontManager::BuiltinFont::~BuiltinFont() -{ -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager::Type1FontFile::queryMetricPage( int /*nPage*/, MultiAtomProvider* pProvider ) -{ - return readAfmMetrics( PrintFontManager::get().getAfmFile( this ), pProvider, false, false ); -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager::BuiltinFont::queryMetricPage( int /*nPage*/, MultiAtomProvider* pProvider ) -{ - return readAfmMetrics( PrintFontManager::get().getAfmFile( this ), pProvider, false, false ); -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager::TrueTypeFontFile::queryMetricPage( int nPage, MultiAtomProvider* pProvider ) -{ - bool bSuccess = false; - - ByteString aFile( PrintFontManager::get().getFontFile( this ) ); - - TrueTypeFont* pTTFont = NULL; - - if( OpenTTFontFile( aFile.GetBuffer(), m_nCollectionEntry < 0 ? 0 : m_nCollectionEntry, &pTTFont ) == SF_OK ) - { - if( ! m_pMetrics ) - { - m_pMetrics = new PrintFontMetrics; - memset (m_pMetrics->m_aPages, 0, sizeof(m_pMetrics->m_aPages)); - } - m_pMetrics->m_aPages[ nPage/8 ] |= (1 << ( nPage & 7 )); - int i; - sal_uInt16 table[256], table_vert[256]; - - for( i = 0; i < 256; i++ ) - table[ i ] = 256*nPage + i; - - int nCharacters = nPage < 255 ? 256 : 254; - MapString( pTTFont, table, nCharacters, NULL, 0 ); - TTSimpleGlyphMetrics* pMetrics = GetTTSimpleCharMetrics( pTTFont, nPage*256, nCharacters, 0 ); - if( pMetrics ) - { - for( i = 0; i < nCharacters; i++ ) - { - if( table[i] ) - { - CharacterMetric& rChar = m_pMetrics->m_aMetrics[ nPage*256 + i ]; - rChar.width = pMetrics[ i ].adv; - rChar.height = m_aGlobalMetricX.height; - } - } - - free( pMetrics ); - } - - for( i = 0; i < 256; i++ ) - table_vert[ i ] = 256*nPage + i; - MapString( pTTFont, table_vert, nCharacters, NULL, 1 ); - pMetrics = GetTTSimpleCharMetrics( pTTFont, nPage*256, nCharacters, 1 ); - if( pMetrics ) - { - for( i = 0; i < nCharacters; i++ ) - { - if( table_vert[i] ) - { - CharacterMetric& rChar = m_pMetrics->m_aMetrics[ nPage*256 + i + ( 1 << 16 ) ]; - rChar.width = m_aGlobalMetricY.width; - rChar.height = pMetrics[ i ].adv; - if( table_vert[i] != table[i] ) - m_pMetrics->m_bVerticalSubstitutions[ nPage*256 + i ] = 1; - } - } - free( pMetrics ); - } - - if( ! m_pMetrics->m_bKernPairsQueried ) - { - m_pMetrics->m_bKernPairsQueried = true; - // this is really a hack - // in future MapString/KernGlyphs should be used - // but vcl is not in a state where that could be used - // so currently we get kernpairs by accessing the raw data - struct _TrueTypeFont* pImplTTFont = (struct _TrueTypeFont*)pTTFont; - - //----------------------------------------------------------------- - // Kerning: KT_MICROSOFT - //----------------------------------------------------------------- - if( pImplTTFont->nkern && pImplTTFont->kerntype == KT_MICROSOFT ) - { - // create a glyph -> character mapping - ::std::hash_map< sal_uInt16, sal_Unicode > aGlyphMap; - ::std::hash_map< sal_uInt16, sal_Unicode >::iterator left, right; - for( i = 21; i < 0xfffd; i++ ) - { - sal_uInt16 nGlyph = MapChar( pTTFont, (sal_Unicode)i, 0 ); // kerning for horz only - if( nGlyph != 0 ) - aGlyphMap[ nGlyph ] = (sal_Unicode)i; - } - - - KernPair aPair; - for( i = 0; i < (int)pImplTTFont->nkern; i++ ) - { - const sal_uInt8* pTable = pImplTTFont->kerntables[i]; - - /*sal_uInt16 nVersion =*/ getUInt16BE( pTable ); - /*sal_uInt16 nLength =*/ getUInt16BE( pTable ); - sal_uInt16 nCoverage = getUInt16BE( pTable ); - - aPair.kern_x = 0; - aPair.kern_y = 0; - switch( nCoverage >> 8 ) - { - case 0: - { - sal_uInt16 nPairs = getUInt16BE( pTable ); - pTable += 6; - for( int n = 0; n < nPairs; n++ ) - { - sal_uInt16 nLeftGlyph = getUInt16BE( pTable ); - sal_uInt16 nRightGlyph = getUInt16BE( pTable ); - sal_Int16 nKern = (sal_Int16)getUInt16BE( pTable ); - - left = aGlyphMap.find( nLeftGlyph ); - right = aGlyphMap.find( nRightGlyph ); - if( left != aGlyphMap.end() && right != aGlyphMap.end() ) - { - aPair.first = left->second; - aPair.second = right->second; - switch( nCoverage & 1 ) - { - case 1: - aPair.kern_x = (int)nKern * 1000 / pImplTTFont->unitsPerEm; - m_pMetrics->m_aXKernPairs.push_back( aPair ); - break; - case 0: - aPair.kern_y = (int)nKern * 1000 / pImplTTFont->unitsPerEm; - m_pMetrics->m_aYKernPairs.push_back( aPair ); - break; - } - } - } - } - break; - - case 2: - { - const sal_uInt8* pSubTable = pTable; - /*sal_uInt16 nRowWidth =*/ getUInt16BE( pTable ); - sal_uInt16 nOfLeft = getUInt16BE( pTable ); - sal_uInt16 nOfRight = getUInt16BE( pTable ); - /*sal_uInt16 nOfArray =*/ getUInt16BE( pTable ); - const sal_uInt8* pTmp = pSubTable + nOfLeft; - sal_uInt16 nFirstLeft = getUInt16BE( pTmp ); - sal_uInt16 nLastLeft = getUInt16BE( pTmp ) + nFirstLeft - 1; - pTmp = pSubTable + nOfRight; - sal_uInt16 nFirstRight = getUInt16BE( pTmp ); - sal_uInt16 nLastRight = getUInt16BE( pTmp ) + nFirstRight -1; - - // int nPairs = (int)(nLastLeft-nFirstLeft+1)*(int)(nLastRight-nFirstRight+1); - for( aPair.first = nFirstLeft; aPair.first < nLastLeft; aPair.first++ ) - { - for( aPair.second = 0; aPair.second < nLastRight; aPair.second++ ) - { - sal_Int16 nKern = (sal_Int16)getUInt16BE( pTmp ); - switch( nCoverage & 1 ) - { - case 1: - aPair.kern_x = (int)nKern * 1000 / pImplTTFont->unitsPerEm; - m_pMetrics->m_aXKernPairs.push_back( aPair ); - break; - case 0: - aPair.kern_y = (int)nKern * 1000 / pImplTTFont->unitsPerEm; - m_pMetrics->m_aYKernPairs.push_back( aPair ); - break; - } - } - } - } - break; - } - } - } - - //----------------------------------------------------------------- - // Kerning: KT_APPLE_NEW - //----------------------------------------------------------------- - if( pImplTTFont->nkern && pImplTTFont->kerntype == KT_APPLE_NEW ) - { - // create a glyph -> character mapping - ::std::hash_map< sal_uInt16, sal_Unicode > aGlyphMap; - ::std::hash_map< sal_uInt16, sal_Unicode >::iterator left, right; - for( i = 21; i < 0xfffd; i++ ) - { - sal_uInt16 nGlyph = MapChar( pTTFont, (sal_Unicode)i, 0 ); // kerning for horz only - if( nGlyph != 0 ) - aGlyphMap[ nGlyph ] = (sal_Unicode)i; - } - - // Loop through each of the 'kern' subtables - KernPair aPair; - for( i = 0; (unsigned int)i < pImplTTFont->nkern; i++ ) - { - const sal_uInt8* pTable = pImplTTFont->kerntables[i]; - - /*sal_uInt32 nLength =*/ getUInt32BE( pTable ); - sal_uInt16 nCoverage = getUInt16BE( pTable ); - /*sal_uInt16 nTupleIndex =*/ getUInt16BE( pTable ); - - // Get kerning type - // sal_Bool bKernVertical = nCoverage & 0x8000; - // sal_Bool bKernCrossStream = nCoverage & 0x4000; - // sal_Bool bKernVariation = nCoverage & 0x2000; - - // Kerning sub-table format, 0 through 3 - sal_uInt8 nSubTableFormat = nCoverage & 0x00FF; - - aPair.kern_x = 0; - aPair.kern_y = 0; - switch( nSubTableFormat ) - { - case 0: - { - // Grab the # of kern pairs but skip over the: - // searchRange - // entrySelector - // rangeShift - sal_uInt16 nPairs = getUInt16BE( pTable ); - pTable += 6; - - for( int n = 0; n < nPairs; n++ ) - { - sal_uInt16 nLeftGlyph = getUInt16BE( pTable ); - sal_uInt16 nRightGlyph = getUInt16BE( pTable ); - sal_Int16 nKern = (sal_Int16)getUInt16BE( pTable ); - - left = aGlyphMap.find( nLeftGlyph ); - right = aGlyphMap.find( nRightGlyph ); - if( left != aGlyphMap.end() && right != aGlyphMap.end() ) - { - aPair.first = left->second; - aPair.second = right->second; - - // Only support horizontal kerning for now - aPair.kern_x = (int)nKern * 1000 / pImplTTFont->unitsPerEm; - aPair.kern_y = 0; - m_pMetrics->m_aXKernPairs.push_back( aPair ); - -/* switch( nCoverage & 1 ) - { - case 1: - aPair.kern_x = (int)nKern * 1000 / pImplTTFont->unitsPerEm; - m_pMetrics->m_aXKernPairs.push_back( aPair ); - break; - case 0: - aPair.kern_y = (int)nKern * 1000 / pImplTTFont->unitsPerEm; - m_pMetrics->m_aYKernPairs.push_back( aPair ); - break; - } -*/ - } - } - } - break; - - case 2: - { - const sal_uInt8* pSubTable = pTable; - /*sal_uInt16 nRowWidth =*/ getUInt16BE( pTable ); - sal_uInt16 nOfLeft = getUInt16BE( pTable ); - sal_uInt16 nOfRight = getUInt16BE( pTable ); - /*sal_uInt16 nOfArray =*/ getUInt16BE( pTable ); - const sal_uInt8* pTmp = pSubTable + nOfLeft; - sal_uInt16 nFirstLeft = getUInt16BE( pTmp ); - sal_uInt16 nLastLeft = getUInt16BE( pTmp ) + nFirstLeft - 1; - pTmp = pSubTable + nOfRight; - sal_uInt16 nFirstRight = getUInt16BE( pTmp ); - sal_uInt16 nLastRight = getUInt16BE( pTmp ) + nFirstRight -1; - - for( aPair.first = nFirstLeft; aPair.first < nLastLeft; aPair.first++ ) - { - for( aPair.second = 0; aPair.second < nLastRight; aPair.second++ ) - { - sal_Int16 nKern = (sal_Int16)getUInt16BE( pTmp ); - switch( nCoverage & 1 ) - { - case 1: - aPair.kern_x = (int)nKern * 1000 / pImplTTFont->unitsPerEm; - m_pMetrics->m_aXKernPairs.push_back( aPair ); - break; - case 0: - aPair.kern_y = (int)nKern * 1000 / pImplTTFont->unitsPerEm; - m_pMetrics->m_aYKernPairs.push_back( aPair ); - break; - } - } - } - } - break; - - default: - fprintf( stderr, "Found unsupported Apple-style kern subtable type %d.\n", nSubTableFormat ); - break; - } - } - } - -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "found %d/%d kern pairs for %s\n", - m_pMetrics->m_aXKernPairs.size(), - m_pMetrics->m_aYKernPairs.size(), - OUStringToOString( pProvider->getString( ATOM_FAMILYNAME, m_nFamilyName ), RTL_TEXTENCODING_MS_1252 ).getStr() ); -#else - (void) pProvider; /* avoid warnings */ -#endif - } - - CloseTTFont( pTTFont ); - bSuccess = true; - } - return bSuccess; -} - -// ------------------------------------------------------------------------- - -/* #i73387# There seem to be fonts with a rather unwell chosen family name -* consider e.g. "Helvetica Narrow" which defines its family as "Helvetica" -* It can really only be distinguished by its PSName and FullName. Both of -* which are not user presentable in OOo. So replace it by something sensible. -* -* If other fonts feature this behaviour, insert them to the map. -*/ -static bool familyNameOverride( const OUString& i_rPSname, OUString& o_rFamilyName ) -{ - static std::hash_map< OUString, OUString, OUStringHash > aPSNameToFamily( 16 ); - if( aPSNameToFamily.empty() ) // initialization - { - aPSNameToFamily[ OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica-Narrow" ) ) ] = - OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica Narrow" ) ); - aPSNameToFamily[ OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica-Narrow-Bold" ) ) ] = - OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica Narrow" ) ); - aPSNameToFamily[ OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica-Narrow-BoldOblique" ) ) ] = - OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica Narrow" ) ); - aPSNameToFamily[ OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica-Narrow-Oblique" ) ) ] = - OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica Narrow" ) ); - } - std::hash_map::const_iterator it = - aPSNameToFamily.find( i_rPSname ); - bool bReplaced = (it != aPSNameToFamily.end() ); - if( bReplaced ) - o_rFamilyName = it->second; - return bReplaced; -}; - -bool PrintFontManager::PrintFont::readAfmMetrics( const OString& rFileName, MultiAtomProvider* pProvider, bool bFillEncodingvector, bool bOnlyGlobalAttributes ) -{ - PrintFontManager& rManager( PrintFontManager::get() ); - - int i; - FontInfo* pInfo = NULL; - parseFile( rFileName.getStr(), &pInfo, P_ALL ); - if( ! pInfo || ! pInfo->numOfChars ) - { - if( pInfo ) - freeFontInfo( pInfo ); - return false; - } - - m_aEncodingVector.clear(); - // fill in global info - - // PSName - OUString aPSName( OStringToOUString( pInfo->gfi->fontName, RTL_TEXTENCODING_ISO_8859_1 ) ); - m_nPSName = pProvider->getAtom( ATOM_PSNAME, aPSName, sal_True ); - - // family name (if not already set) - OUString aFamily; - if( ! m_nFamilyName ) - { - aFamily = OStringToOUString( pInfo->gfi->familyName, RTL_TEXTENCODING_ISO_8859_1 ); - if( ! aFamily.getLength() ) - { - aFamily = OStringToOUString( pInfo->gfi->fontName, RTL_TEXTENCODING_ISO_8859_1 ); - sal_Int32 nIndex = 0; - aFamily = aFamily.getToken( 0, '-', nIndex ); - } - familyNameOverride( aPSName, aFamily ); - m_nFamilyName = pProvider->getAtom( ATOM_FAMILYNAME, aFamily, sal_True ); - } - else - aFamily = pProvider->getString( ATOM_FAMILYNAME, m_nFamilyName ); - - // style name: if fullname begins with family name - // interpret the rest of fullname as style - if( ! m_aStyleName.getLength() && pInfo->gfi->fullName && *pInfo->gfi->fullName ) - { - OUString aFullName( OStringToOUString( pInfo->gfi->fullName, RTL_TEXTENCODING_ISO_8859_1 ) ); - if( aFullName.indexOf( aFamily ) == 0 ) - m_aStyleName = WhitespaceToSpace( aFullName.copy( aFamily.getLength() ) ); - } - - // italic - if( pInfo->gfi->italicAngle > 0 ) - m_eItalic = italic::Oblique; - else if( pInfo->gfi->italicAngle < 0 ) - m_eItalic = italic::Italic; - else - m_eItalic = italic::Upright; - - // weight - ByteString aLowerWeight( pInfo->gfi->weight ); - aLowerWeight.ToLowerAscii(); - m_eWeight = parseWeight( aLowerWeight ); - - // pitch - m_ePitch = pInfo->gfi->isFixedPitch ? pitch::Fixed : pitch::Variable; - - // encoding - only set if unknown - int nAdobeEncoding = 0; - if( pInfo->gfi->encodingScheme ) - { - if( !strcmp( pInfo->gfi->encodingScheme, "AdobeStandardEncoding" ) ) - nAdobeEncoding = 1; - else if( !strcmp( pInfo->gfi->encodingScheme, "ISO10646-1" ) ) - { - nAdobeEncoding = 1; - m_aEncoding = RTL_TEXTENCODING_UNICODE; - } - else if( !strcmp( pInfo->gfi->encodingScheme, "Symbol") ) - nAdobeEncoding = 2; - else if( !strcmp( pInfo->gfi->encodingScheme, "FontSpecific") ) - nAdobeEncoding = 3; - - if( m_aEncoding == RTL_TEXTENCODING_DONTKNOW ) - m_aEncoding = nAdobeEncoding == 1 ? - RTL_TEXTENCODING_ADOBE_STANDARD : RTL_TEXTENCODING_SYMBOL; - } - else if( m_aEncoding == RTL_TEXTENCODING_DONTKNOW ) - m_aEncoding = RTL_TEXTENCODING_ADOBE_STANDARD; - - // try to parse the font name and decide wether it might be a - // japanese font. Who invented this PITA ? - OUString aPSNameLastToken( aPSName.copy( aPSName.lastIndexOf( '-' )+1 ) ); - if( ! aPSNameLastToken.compareToAscii( "H" ) || - ! aPSNameLastToken.compareToAscii( "V" ) ) - { - static const char* pEncs[] = - { - "EUC", - "RKSJ", - "SJ" - }; - static const rtl_TextEncoding aEncs[] = - { - RTL_TEXTENCODING_EUC_JP, - RTL_TEXTENCODING_SHIFT_JIS, - RTL_TEXTENCODING_JIS_X_0208 - }; - - for( unsigned int enc = 0; enc < sizeof( aEncs )/sizeof(aEncs[0]) && m_aEncoding == RTL_TEXTENCODING_DONTKNOW; enc++ ) - { - sal_Int32 nIndex = 0, nOffset = 1; - do - { - OUString aToken( aPSName.getToken( nOffset, '-', nIndex ) ); - if( nIndex == -1 ) - break; - nOffset = 0; - if( ! aToken.compareToAscii( pEncs[enc] ) ) - { - m_aEncoding = aEncs[ enc ]; - m_bFontEncodingOnly = true; - } - } while( nIndex != -1 ); - } - - // default is jis - if( m_aEncoding == RTL_TEXTENCODING_DONTKNOW ) - m_aEncoding = RTL_TEXTENCODING_JIS_X_0208; -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "Encoding %d for %s\n", m_aEncoding, pInfo->gfi->fontName ); -#endif - } - - // hack for GB encoded builtin fonts posing as FontSpecific - if( m_eType == fonttype::Builtin && ( nAdobeEncoding == 3 || nAdobeEncoding == 0 ) ) - { - int nLen = aFamily.getLength(); - if( nLen > 2 && - aFamily.getStr()[ nLen-2 ] == 'G' && - aFamily.getStr()[ nLen-1 ] == 'B' && - pInfo->numOfChars > 255 ) - { - m_aEncoding = RTL_TEXTENCODING_GBK; - m_bFontEncodingOnly = true; -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "found builtin font %s with GBK encoding\n", pInfo->gfi->fontName ); -#endif - } - } - - // #i37313# check if Fontspecific is not rather some character encoding - if( nAdobeEncoding == 3 && m_aEncoding == RTL_TEXTENCODING_SYMBOL ) - { - bool bYFound = false; - bool bQFound = false; - CharMetricInfo* pChar = pInfo->cmi; - for( int j = 0; j < pInfo->numOfChars && ! (bYFound && bQFound); j++ ) - { - if( pChar[j].name ) - { - if( pChar[j].name[0] == 'Y' && pChar[j].name[1] == 0 ) - bYFound = true; - else if( pChar[j].name[0] == 'Q' && pChar[j].name[1] == 0 ) - bQFound = true; - } - } - if( bQFound && bYFound ) - { - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "setting FontSpecific font %s (file %s) to unicode\n", - pInfo->gfi->fontName, - rFileName.getStr() - ); - #endif - nAdobeEncoding = 4; - m_aEncoding = RTL_TEXTENCODING_UNICODE; - bFillEncodingvector = false; // will be filled anyway, don't do the work twice - } - } - - // ascend - m_nAscend = pInfo->gfi->fontBBox.ury; - - // descend - // descends have opposite sign of our definition - m_nDescend = -pInfo->gfi->fontBBox.lly; - - // fallback to ascender, descender - // interesting: the BBox seems to describe Ascender and Descender better - // as we understand it - if( m_nAscend == 0 ) - m_nAscend = pInfo->gfi->ascender; - if( m_nDescend == 0) - m_nDescend = -pInfo->gfi->descender; - - m_nLeading = m_nAscend + m_nDescend - 1000; - - if( m_pMetrics ) - delete m_pMetrics; - m_pMetrics = new PrintFontMetrics; - // mark all pages as queried (or clear if only global font info queiried) - memset( m_pMetrics->m_aPages, bOnlyGlobalAttributes ? 0 : 0xff, sizeof( m_pMetrics->m_aPages ) ); - - m_aGlobalMetricX.width = m_aGlobalMetricY.width = - pInfo->gfi->charwidth ? pInfo->gfi->charwidth : pInfo->gfi->fontBBox.urx; - m_aGlobalMetricX.height = m_aGlobalMetricY.height = - pInfo->gfi->capHeight ? pInfo->gfi->capHeight : pInfo->gfi->fontBBox.ury; - - m_nXMin = pInfo->gfi->fontBBox.llx; - m_nYMin = pInfo->gfi->fontBBox.lly; - m_nXMax = pInfo->gfi->fontBBox.urx; - m_nYMax = pInfo->gfi->fontBBox.ury; - - if( bFillEncodingvector || !bOnlyGlobalAttributes ) - { - // fill in character metrics - - // first transform the character codes to unicode - // note: this only works with single byte encodings - sal_Unicode* pUnicodes = (sal_Unicode*)alloca( pInfo->numOfChars * sizeof(sal_Unicode)); - CharMetricInfo* pChar = pInfo->cmi; - - for( i = 0; i < pInfo->numOfChars; i++, pChar++ ) - { - if( nAdobeEncoding == 4 ) - { - if( pChar->name ) - { - pUnicodes[i] = 0; - std::list< sal_Unicode > aCodes = rManager.getUnicodeFromAdobeName( pChar->name ); - for( std::list< sal_Unicode >::const_iterator it = aCodes.begin(); it != aCodes.end(); ++it ) - { - if( *it != 0 ) - { - m_aEncodingVector[ *it ] = pChar->code; - if( pChar->code == -1 ) - m_aNonEncoded[ *it ] = pChar->name; - if( ! pUnicodes[i] ) // map the first - pUnicodes[i] = *it; - } - } - } - } - else if( pChar->code != -1 ) - { - if( nAdobeEncoding == 3 && m_aEncoding == RTL_TEXTENCODING_SYMBOL ) - { - pUnicodes[i] = pChar->code + 0xf000; - if( bFillEncodingvector ) - m_aEncodingVector[ pUnicodes[i] ] = pChar->code; - continue; - } - - if( m_aEncoding == RTL_TEXTENCODING_UNICODE ) - { - pUnicodes[i] = (sal_Unicode)pChar->code; - continue; - } - - ByteString aTranslate; - if( pChar->code & 0xff000000 ) - aTranslate += (char)(pChar->code >> 24 ); - if( pChar->code & 0xffff0000 ) - aTranslate += (char)((pChar->code & 0x00ff0000) >> 16 ); - if( pChar->code & 0xffffff00 ) - aTranslate += (char)((pChar->code & 0x0000ff00) >> 8 ); - aTranslate += (char)(pChar->code & 0xff); - String aUni( aTranslate, m_aEncoding ); - pUnicodes[i] = *aUni.GetBuffer(); - } - else - pUnicodes[i] = 0; - } - - // now fill in the character metrics - // parseAFM.cxx effectively only supports direction 0 (horizontal) - pChar = pInfo->cmi; - CharacterMetric aMetric; - for( i = 0; i < pInfo->numOfChars; i++, pChar++ ) - { - if( pChar->code == -1 && ! pChar->name ) - continue; - - if( bFillEncodingvector && pChar->name ) - { - std::list< sal_Unicode > aCodes = rManager.getUnicodeFromAdobeName( pChar->name ); - for( std::list< sal_Unicode >::const_iterator it = aCodes.begin(); it != aCodes.end(); ++it ) - { - if( *it != 0 ) - { - m_aEncodingVector[ *it ] = pChar->code; - if( pChar->code == -1 ) - m_aNonEncoded[ *it ] = pChar->name; - } - } - } - - aMetric.width = pChar->wx ? pChar->wx : pChar->charBBox.urx; - aMetric.height = pChar->wy ? pChar->wy : pChar->charBBox.ury - pChar->charBBox.lly; - if( aMetric.width == 0 && aMetric.height == 0 ) - // guess something for e.g. space - aMetric.width = m_aGlobalMetricX.width/4; - - if( ( nAdobeEncoding == 0 ) || - ( ( nAdobeEncoding == 3 ) && ( m_aEncoding != RTL_TEXTENCODING_SYMBOL ) ) ) - { - if( pChar->code != -1 ) - { - m_pMetrics->m_aMetrics[ pUnicodes[i] ] = aMetric; - if( bFillEncodingvector ) - m_aEncodingVector[ pUnicodes[i] ] = pChar->code; - } - else if( pChar->name ) - { - std::list< sal_Unicode > aCodes = rManager.getUnicodeFromAdobeName( pChar->name ); - for( std::list< sal_Unicode >::const_iterator it = aCodes.begin(); it != aCodes.end(); ++it ) - { - if( *it != 0 ) - m_pMetrics->m_aMetrics[ *it ] = aMetric; - } - } - } - else if( nAdobeEncoding == 1 || nAdobeEncoding == 2 || nAdobeEncoding == 4) - { - if( pChar->name ) - { - std::list< sal_Unicode > aCodes = rManager.getUnicodeFromAdobeName( pChar->name ); - for( std::list< sal_Unicode >::const_iterator it = aCodes.begin(); it != aCodes.end(); ++it ) - { - if( *it != 0 ) - m_pMetrics->m_aMetrics[ *it ] = aMetric; - } - } - else if( pChar->code != -1 ) - { - ::std::pair< ::std::hash_multimap< sal_uInt8, sal_Unicode >::const_iterator, - ::std::hash_multimap< sal_uInt8, sal_Unicode >::const_iterator > - aCodes = rManager.getUnicodeFromAdobeCode( pChar->code ); - while( aCodes.first != aCodes.second ) - { - if( (*aCodes.first).second != 0 ) - { - m_pMetrics->m_aMetrics[ (*aCodes.first).second ] = aMetric; - if( bFillEncodingvector ) - m_aEncodingVector[ (*aCodes.first).second ] = pChar->code; - } - ++aCodes.first; - } - } - } - else if( nAdobeEncoding == 3 ) - { - if( pChar->code != -1 ) - { - sal_Unicode code = 0xf000 + pChar->code; - m_pMetrics->m_aMetrics[ code ] = aMetric; - // maybe should try to find the name in the convtabs ? - if( bFillEncodingvector ) - m_aEncodingVector[ code ] = pChar->code; - } - } - } - - m_pMetrics->m_aXKernPairs.clear(); - m_pMetrics->m_aYKernPairs.clear(); - - // now fill in the kern pairs - // parseAFM.cxx effectively only supports direction 0 (horizontal) - PairKernData* pKern = pInfo->pkd; - KernPair aPair; - for( i = 0; i < pInfo->numOfPairs; i++, pKern++ ) - { - // #i37703# broken kern table - if( ! pKern->name1 || ! pKern->name2 ) - continue; - - aPair.first = 0; - aPair.second = 0; - // currently we have to find the adobe character names - // in the already parsed character metrics to find - // the corresponding UCS2 code which is a bit dangerous - // since the character names are not required - // in the metric descriptions - pChar = pInfo->cmi; - for( int j = 0; - j < pInfo->numOfChars && ( aPair.first == 0 || aPair.second == 0 ); - j++, pChar++ ) - { - if( pChar->code != -1 ) - { - if( ! strcmp( pKern->name1, pChar->name ? pChar->name : "" ) ) - aPair.first = pUnicodes[ j ]; - if( ! strcmp( pKern->name2, pChar->name ? pChar->name : "" ) ) - aPair.second = pUnicodes[ j ]; - } - } - if( aPair.first && aPair.second ) - { - aPair.kern_x = pKern->xamt; - aPair.kern_y = pKern->yamt; - m_pMetrics->m_aXKernPairs.push_back( aPair ); - } - } - m_pMetrics->m_bKernPairsQueried = true; - } - - freeFontInfo( pInfo ); - return true; -} - -// ------------------------------------------------------------------------- - -OString PrintFontManager::s_aEmptyOString; - -/* - * one instance only - */ -PrintFontManager& PrintFontManager::get() -{ - static PrintFontManager* theManager = NULL; - if( ! theManager ) - { - theManager = new PrintFontManager(); - theManager->initialize(); - } - return *theManager; -} - -// ------------------------------------------------------------------------- - -/* - * the PrintFontManager - */ - -PrintFontManager::PrintFontManager() : - m_nNextFontID( 1 ), - m_pAtoms( new MultiAtomProvider() ), - m_nNextDirAtom( 1 ), - m_pFontCache( NULL ), - m_bFontconfigSuccess( false ) -{ - for( unsigned int i = 0; i < sizeof( aAdobeCodes )/sizeof( aAdobeCodes[0] ); i++ ) - { - m_aUnicodeToAdobename.insert( ::std::hash_multimap< sal_Unicode, ::rtl::OString >::value_type( aAdobeCodes[i].aUnicode, aAdobeCodes[i].pAdobename ) ); - m_aAdobenameToUnicode.insert( ::std::hash_multimap< ::rtl::OString, sal_Unicode, ::rtl::OStringHash >::value_type( aAdobeCodes[i].pAdobename, aAdobeCodes[i].aUnicode ) ); - if( aAdobeCodes[i].aAdobeStandardCode ) - { - m_aUnicodeToAdobecode.insert( ::std::hash_multimap< sal_Unicode, sal_uInt8 >::value_type( aAdobeCodes[i].aUnicode, aAdobeCodes[i].aAdobeStandardCode ) ); - m_aAdobecodeToUnicode.insert( ::std::hash_multimap< sal_uInt8, sal_Unicode >::value_type( aAdobeCodes[i].aAdobeStandardCode, aAdobeCodes[i].aUnicode ) ); - } -#if 0 - m_aUnicodeToAdobename[ aAdobeCodes[i].aUnicode ] = aAdobeCodes[i].pAdobename; - m_aAdobenameToUnicode[ aAdobeCodes[i].pAdobename ] = aAdobeCodes[i].aUnicode; - if( aAdobeCodes[i].aAdobeStandardCode ) - { - m_aUnicodeToAdobecode[ aAdobeCodes[i].aUnicode ] = aAdobeCodes[i].aAdobeStandardCode; - m_aAdobecodeToUnicode[ aAdobeCodes[i].aAdobeStandardCode ] = aAdobeCodes[i].aUnicode; - } -#endif - } -} - -// ------------------------------------------------------------------------- - -PrintFontManager::~PrintFontManager() -{ - deinitFontconfig(); - for( ::std::hash_map< fontID, PrintFont* >::const_iterator it = m_aFonts.begin(); it != m_aFonts.end(); ++it ) - delete (*it).second; - delete m_pAtoms; - if( m_pFontCache ) - delete m_pFontCache; -} - -// ------------------------------------------------------------------------- - -const OString& PrintFontManager::getDirectory( int nAtom ) const -{ - ::std::hash_map< int, OString >::const_iterator it( m_aAtomToDir.find( nAtom ) ); - return it != m_aAtomToDir.end() ? it->second : s_aEmptyOString; -} - -// ------------------------------------------------------------------------- - -int PrintFontManager::getDirectoryAtom( const OString& rDirectory, bool bCreate ) -{ - int nAtom = 0; - ::std::hash_map< OString, int, OStringHash >::const_iterator it - ( m_aDirToAtom.find( rDirectory ) ); - if( it != m_aDirToAtom.end() ) - nAtom = it->second; - else if( bCreate ) - { - nAtom = m_nNextDirAtom++; - m_aDirToAtom[ rDirectory ] = nAtom; - m_aAtomToDir[ nAtom ] = rDirectory; - } - return nAtom; -} - -// ------------------------------------------------------------------------- - -int PrintFontManager::addFontFile( const ::rtl::OString& rFileName, int /*nFaceNum*/ ) -{ - rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - INetURLObject aPath( OStringToOUString( rFileName, aEncoding ), INET_PROT_FILE, INetURLObject::ENCODE_ALL ); - OString aName( OUStringToOString( aPath.GetName(), aEncoding ) ); - OString aDir( OUStringToOString( aPath.GetPath(), aEncoding ) ); - - int nDirID = getDirectoryAtom( aDir, true ); - fontID nFontId = findFontFileID( nDirID, aName ); - if( !nFontId ) - { - ::std::list< PrintFont* > aNewFonts; - if( analyzeFontFile( nDirID, aName, ::std::list(), aNewFonts ) ) - { - for( ::std::list< PrintFont* >::iterator it = aNewFonts.begin(); - it != aNewFonts.end(); ++it ) - { - m_aFonts[ nFontId = m_nNextFontID++ ] = *it; - m_aFontFileToFontID[ aName ].insert( nFontId ); - m_pFontCache->updateFontCacheEntry( *it, true ); - } - } - } - return nFontId; -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, const ::std::list& rXLFDs, ::std::list< PrintFontManager::PrintFont* >& rNewFonts ) const -{ - rNewFonts.clear(); - - OString aDir( getDirectory( nDirID ) ); - - OString aFullPath( aDir ); - aFullPath += "/"; - aFullPath += rFontFile; - - // #i1872# reject unreadable files - if( access( aFullPath.getStr(), R_OK ) ) - return false; - - ByteString aExt( rFontFile.copy( rFontFile.lastIndexOf( '.' )+1 ) ); - if( aExt.EqualsIgnoreCaseAscii( "pfb" ) || aExt.EqualsIgnoreCaseAscii( "pfa" ) ) - { - // check for corresponding afm metric - // first look for an adjacent file - static const char* pSuffix[] = { ".afm", ".AFM" }; - - for( unsigned int i = 0; i < sizeof(pSuffix)/sizeof(pSuffix[0]); i++ ) - { - ByteString aName( rFontFile ); - aName.Erase( aName.Len()-4 ); - aName.Append( pSuffix[i] ); - - ByteString aFilePath( aDir ); - aFilePath.Append( '/' ); - aFilePath.Append( aName ); - - ByteString aAfmFile; - if( access( aFilePath.GetBuffer(), R_OK ) ) - { - // try in subdirectory afm instead - aFilePath = aDir; - aFilePath.Append( "/afm/" ); - aFilePath.Append( aName ); - - if( ! access( aFilePath.GetBuffer(), R_OK ) ) - { - aAfmFile = "afm/"; - aAfmFile += aName; - } - } - else - aAfmFile = aName; - - if( aAfmFile.Len() ) - { - Type1FontFile* pFont = new Type1FontFile(); - pFont->m_nDirectory = nDirID; - - pFont->m_aFontFile = rFontFile; - pFont->m_aMetricFile = aAfmFile; - - if( ! pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, true ) ) - { - delete pFont; - pFont = NULL; - } - if( pFont && rXLFDs.size() ) - getFontAttributesFromXLFD( pFont, rXLFDs ); - if( pFont ) - rNewFonts.push_back( pFont ); - break; - } - } - } - else if( aExt.EqualsIgnoreCaseAscii( "afm" ) ) - { - ByteString aFilePath( aDir ); - aFilePath.Append( '/' ); - aFilePath.Append( ByteString( rFontFile ) ); - BuiltinFont* pFont = new BuiltinFont(); - pFont->m_nDirectory = nDirID; - pFont->m_aMetricFile = rFontFile; - if( pFont->readAfmMetrics( aFilePath, m_pAtoms, false, true ) ) - rNewFonts.push_back( pFont ); - else - delete pFont; - } - else if( aExt.EqualsIgnoreCaseAscii( "ttf" ) - || aExt.EqualsIgnoreCaseAscii( "tte" ) // #i33947# for Gaiji support - || aExt.EqualsIgnoreCaseAscii( "otf" ) ) // check for TTF- and PS-OpenType too - { - TrueTypeFontFile* pFont = new TrueTypeFontFile(); - pFont->m_nDirectory = nDirID; - pFont->m_aFontFile = rFontFile; - pFont->m_nCollectionEntry = -1; - - if( rXLFDs.size() ) - getFontAttributesFromXLFD( pFont, rXLFDs ); - // need to read the font anyway to get aliases inside the font file - if( ! analyzeTrueTypeFile( pFont ) ) - { - delete pFont; - pFont = NULL; - } - else - rNewFonts.push_back( pFont ); - } - else if( aExt.EqualsIgnoreCaseAscii( "ttc" ) ) - { - // get number of ttc entries - int nLength = CountTTCFonts( aFullPath.getStr() ); - if( nLength ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "%s contains %d fonts\n", aFullPath.getStr(), nLength ); -#endif - for( int i = 0; i < nLength; i++ ) - { - TrueTypeFontFile* pFont = new TrueTypeFontFile(); - pFont->m_nDirectory = nDirID; - pFont->m_aFontFile = rFontFile; - pFont->m_nCollectionEntry = i; - if( nLength == 1 ) - getFontAttributesFromXLFD( pFont, rXLFDs ); - if( ! analyzeTrueTypeFile( pFont ) ) - { - delete pFont; - pFont = NULL; - } - else - rNewFonts.push_back( pFont ); - } - } -#if OSL_DEBUG_LEVEL > 1 - else - fprintf( stderr, "CountTTCFonts( \"%s/%s\" ) failed\n", getDirectory(nDirID).getStr(), rFontFile.getStr() ); -#endif - } - return ! rNewFonts.empty(); -} - -// ------------------------------------------------------------------------- - -fontID PrintFontManager::findFontBuiltinID( int nPSNameAtom ) const -{ - fontID nID = 0; - ::std::hash_map< fontID, PrintFont* >::const_iterator it; - for( it = m_aFonts.begin(); nID == 0 && it != m_aFonts.end(); ++it ) - { - if( it->second->m_eType == fonttype::Builtin && - it->second->m_nPSName == nPSNameAtom ) - nID = it->first; - } - return nID; -} - -// ------------------------------------------------------------------------- - -fontID PrintFontManager::findFontFileID( int nDirID, const OString& rFontFile ) const -{ - fontID nID = 0; - - ::std::hash_map< OString, ::std::set< fontID >, OStringHash >::const_iterator set_it = m_aFontFileToFontID.find( rFontFile ); - if( set_it != m_aFontFileToFontID.end() ) - { - for( ::std::set< fontID >::const_iterator font_it = set_it->second.begin(); font_it != set_it->second.end() && ! nID; ++font_it ) - { - ::std::hash_map< fontID, PrintFont* >::const_iterator it = m_aFonts.find( *font_it ); - if( it != m_aFonts.end() ) - { - switch( it->second->m_eType ) - { - case fonttype::Type1: - { - Type1FontFile* const pFont = static_cast< Type1FontFile* const >((*it).second); - if( pFont->m_nDirectory == nDirID && - pFont->m_aFontFile == rFontFile ) - nID = it->first; - } - break; - case fonttype::TrueType: - { - TrueTypeFontFile* const pFont = static_cast< TrueTypeFontFile* const >((*it).second); - if( pFont->m_nDirectory == nDirID && - pFont->m_aFontFile == rFontFile ) - nID = it->first; - } - break; - case fonttype::Builtin: - if( static_cast((*it).second)->m_nDirectory == nDirID && - static_cast((*it).second)->m_aMetricFile == rFontFile ) - nID = it->first; - break; - default: - break; - } - } - } - } - return nID; -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager::parseXLFD( const OString& rXLFD, XLFDEntry& rEntry ) -{ - sal_Int32 nIndex = 0; - OString aFoundry = WhitespaceToSpace( rXLFD.getToken( 1, '-', nIndex ) ); - if( nIndex < 0 ) return false; - OString aFamilyXLFD = WhitespaceToSpace( rXLFD.getToken( 0, '-', nIndex ) ); - if( nIndex < 0 ) return false; - OString aWeight = rXLFD.getToken( 0, '-', nIndex ).toAsciiLowerCase(); - if( nIndex < 0 ) return false; - OString aSlant = rXLFD.getToken( 0, '-', nIndex ).toAsciiLowerCase(); - if( nIndex < 0 ) return false; - OString aWidth = rXLFD.getToken( 0, '-', nIndex ).toAsciiLowerCase(); - if( nIndex < 0 ) return false; - OString aAddStyle = rXLFD.getToken( 0, '-', nIndex ).toAsciiLowerCase(); - if( nIndex < 0 ) return false; - OString aPitch = rXLFD.getToken( 4, '-', nIndex ).toAsciiLowerCase(); - if( nIndex < 0 ) return false; - OString aRegEnc = WhitespaceToSpace( rXLFD.getToken( 1, '-', nIndex ).toAsciiLowerCase() ); - if( nIndex < 0 ) return false; - OString aEnc = WhitespaceToSpace( rXLFD.getToken( 0, '-', nIndex ).toAsciiLowerCase() ); - - // capitalize words - sal_Int32 nFamIndex = 0; - OStringBuffer aFamilyName; - while( nFamIndex >= 0 ) - { - OString aToken = aFamilyXLFD.getToken( 0, ' ', nFamIndex ); - sal_Char aFirst = aToken.toChar(); - if( aFirst >= 'a' && aFirst <= 'z' ) - aFirst = aFirst - 'a' + 'A'; - OStringBuffer aNewToken( aToken.getLength() ); - aNewToken.append( aToken ); - aNewToken.setCharAt( 0, aFirst ); - if( aFamilyName.getLength() > 0 ) - aFamilyName.append( ' ' ); - aFamilyName.append( aNewToken.makeStringAndClear() ); - } - - rEntry.aFoundry = aFoundry; - rEntry.aFamily = aFamilyName.makeStringAndClear(); - rEntry.aAddStyle = aAddStyle; - // evaluate weight - rEntry.eWeight = parseWeight( aWeight ); - // evaluate slant - rEntry.eItalic = parseItalic( aSlant ); - // evaluate width - rEntry.eWidth = parseWidth( aWidth ); - - // evaluate pitch - if( aPitch.toChar() == 'c' || aPitch.toChar() == 'm' ) - rEntry.ePitch = pitch::Fixed; - else - rEntry.ePitch = pitch::Variable; - - OString aToken = aEnc.toAsciiLowerCase(); - // get encoding - if( aAddStyle.indexOf( "symbol" ) != -1 ) - rEntry.aEncoding = RTL_TEXTENCODING_SYMBOL; - else - { - if( aToken.equals( "symbol" ) ) - rEntry.aEncoding = RTL_TEXTENCODING_SYMBOL; - else - { - OStringBuffer aCharset( aRegEnc.getLength() + aEnc.getLength() + 1 ); - aCharset.append( aRegEnc ); - aCharset.append( '-' ); - aCharset.append( aEnc ); - rEntry.aEncoding = rtl_getTextEncodingFromUnixCharset( aCharset.getStr() ); - } - } - - // set correct mask flags - rEntry.nMask = 0; - if( rEntry.aFoundry != "*" ) rEntry.nMask |= XLFDEntry::MaskFoundry; - if( rEntry.aFamily != "*" ) rEntry.nMask |= XLFDEntry::MaskFamily; - if( rEntry.aAddStyle != "*" ) rEntry.nMask |= XLFDEntry::MaskAddStyle; - if( aWeight != "*" ) rEntry.nMask |= XLFDEntry::MaskWeight; - if( aSlant != "*" ) rEntry.nMask |= XLFDEntry::MaskItalic; - if( aWidth != "*" ) rEntry.nMask |= XLFDEntry::MaskWidth; - if( aPitch != "*" ) rEntry.nMask |= XLFDEntry::MaskPitch; - if( aRegEnc != "*" && aEnc != "*" ) rEntry.nMask |= XLFDEntry::MaskEncoding; - - return true; -} - -// ------------------------------------------------------------------------- - -void PrintFontManager::parseXLFD_appendAliases( const std::list< OString >& rXLFDs, std::list< XLFDEntry >& rEntries ) const -{ - for( std::list< OString >::const_iterator it = rXLFDs.begin(); it != rXLFDs.end(); ++it ) - { - XLFDEntry aEntry; - if( ! parseXLFD(*it, aEntry) ) - continue; - rEntries.push_back( aEntry ); - std::map< XLFDEntry, std::list< XLFDEntry > >::const_iterator alias_it = - m_aXLFD_Aliases.find( aEntry ); - if( alias_it != m_aXLFD_Aliases.end() ) - { - rEntries.insert( rEntries.end(), alias_it->second.begin(), alias_it->second.end() ); - } - } -} - -// ------------------------------------------------------------------------- - -void PrintFontManager::getFontAttributesFromXLFD( PrintFont* pFont, const std::list< OString >& rXLFDs ) const -{ - bool bFamilyName = false; - - std::list< XLFDEntry > aXLFDs; - - parseXLFD_appendAliases( rXLFDs, aXLFDs ); - - for( std::list< XLFDEntry >::const_iterator it = aXLFDs.begin(); - it != aXLFDs.end(); ++it ) - { - // set family name or alias - int nFam = - m_pAtoms->getAtom( ATOM_FAMILYNAME, - OStringToOUString( it->aFamily, it->aAddStyle.indexOf( "utf8" ) != -1 ? RTL_TEXTENCODING_UTF8 : RTL_TEXTENCODING_ISO_8859_1 ), - sal_True ); - if( ! bFamilyName ) - { - bFamilyName = true; - pFont->m_nFamilyName = nFam; - switch( pFont->m_eType ) - { - case fonttype::Type1: - static_cast(pFont)->m_aXLFD = rXLFDs.front(); - break; - case fonttype::TrueType: - static_cast(pFont)->m_aXLFD = rXLFDs.front(); - break; - default: - break; - } - } - else - { - // make sure that aliases are unique - if( nFam != pFont->m_nFamilyName ) - { - std::list< int >::const_iterator al_it; - for( al_it = pFont->m_aAliases.begin(); al_it != pFont->m_aAliases.end() && *al_it != nFam; ++al_it ) - ; - if( al_it == pFont->m_aAliases.end() ) - pFont->m_aAliases.push_back( nFam ); - - } - // for the rest of the attributes there can only be one value; - // we'll trust the first one - continue; - } - - // fill in weight - pFont->m_eWeight = it->eWeight; - // fill in slant - pFont->m_eItalic = it->eItalic; - // fill in width - pFont->m_eWidth = it->eWidth; - // fill in pitch - pFont->m_ePitch = it->ePitch; - // fill in encoding - pFont->m_aEncoding = it->aEncoding; - } - - // handle iso8859-1 as ms1252 to fill the "gap" starting at 0x80 - if( pFont->m_aEncoding == RTL_TEXTENCODING_ISO_8859_1 ) - pFont->m_aEncoding = RTL_TEXTENCODING_MS_1252; - if( rXLFDs.begin() != rXLFDs.end() ) - { - switch( pFont->m_eType ) - { - case fonttype::Type1: - static_cast(pFont)->m_aXLFD = rXLFDs.front(); - break; - case fonttype::TrueType: - static_cast(pFont)->m_aXLFD = rXLFDs.front(); - break; - default: break; - } - } -} - -// ------------------------------------------------------------------------- - -OString PrintFontManager::getXLFD( PrintFont* pFont ) const -{ - if( pFont->m_eType == fonttype::Type1 ) - { - if( static_cast(pFont)->m_aXLFD.getLength() ) - return static_cast(pFont)->m_aXLFD; - } - if( pFont->m_eType == fonttype::TrueType ) - { - if( static_cast(pFont)->m_aXLFD.getLength() ) - return static_cast(pFont)->m_aXLFD; - } - - OStringBuffer aXLFD( 128 ); - - aXLFD.append( "-misc-" ); - ByteString aFamily( String( m_pAtoms->getString( ATOM_FAMILYNAME, pFont->m_nFamilyName ) ), RTL_TEXTENCODING_UTF8 ); - aFamily.SearchAndReplaceAll( '-',' ' ); - aFamily.SearchAndReplaceAll( '?',' ' ); - aFamily.SearchAndReplaceAll( '*',' ' ); - aXLFD.append( OString( aFamily ) ); - aXLFD.append( '-' ); - switch( pFont->m_eWeight ) - { - case weight::Thin: aXLFD.append("thin");break; - case weight::UltraLight: aXLFD.append("ultralight");break; - case weight::Light: aXLFD.append("light");break; - case weight::SemiLight: aXLFD.append("semilight");break; - case weight::Normal: aXLFD.append("normal");break; - case weight::Medium: aXLFD.append("medium");break; - case weight::SemiBold: aXLFD.append("semibold");break; - case weight::Bold: aXLFD.append("bold");break; - case weight::UltraBold: aXLFD.append("ultrabold");break; - case weight::Black: aXLFD.append("black");break; - default: break; - } - aXLFD.append('-'); - switch( pFont->m_eItalic ) - { - case italic::Upright: aXLFD.append('r');break; - case italic::Oblique: aXLFD.append('o');break; - case italic::Italic: aXLFD.append('i');break; - default: break; - } - aXLFD.append('-'); - switch( pFont->m_eWidth ) - { - case width::UltraCondensed: aXLFD.append("ultracondensed");break; - case width::ExtraCondensed: aXLFD.append("extracondensed");break; - case width::Condensed: aXLFD.append("condensed");break; - case width::SemiCondensed: aXLFD.append("semicondensed");break; - case width::Normal: aXLFD.append("normal");break; - case width::SemiExpanded: aXLFD.append("semiexpanded");break; - case width::Expanded: aXLFD.append("expanded");break; - case width::ExtraExpanded: aXLFD.append("extraexpanded");break; - case width::UltraExpanded: aXLFD.append("ultraexpanded");break; - default: break; - } - aXLFD.append("-utf8-0-0-0-0-"); - aXLFD.append( pFont->m_ePitch == pitch::Fixed ? "m" : "p" ); - aXLFD.append("-0-"); - const char* pEnc = rtl_getBestUnixCharsetFromTextEncoding( pFont->m_aEncoding ); - if( ! pEnc ) - { - if( pFont->m_aEncoding == RTL_TEXTENCODING_ADOBE_STANDARD ) - pEnc = "adobe-standard"; - else - pEnc = "iso8859-1"; - } - aXLFD .append( pEnc ); - - return aXLFD.makeStringAndClear(); -} - -// ------------------------------------------------------------------------- - -OUString PrintFontManager::convertTrueTypeName( void* pRecord ) const -{ - NameRecord* pNameRecord = (NameRecord*)pRecord; - OUString aValue; - if( - ( pNameRecord->platformID == 3 && ( pNameRecord->encodingID == 0 || pNameRecord->encodingID == 1 ) ) // MS, Unicode - || - ( pNameRecord->platformID == 0 ) // Apple, Unicode - ) - { - OUStringBuffer aName( pNameRecord->slen/2 ); - const sal_uInt8* pNameBuffer = pNameRecord->sptr; - for(int n = 0; n < pNameRecord->slen/2; n++ ) - aName.append( (sal_Unicode)getUInt16BE( pNameBuffer ) ); - aValue = aName.makeStringAndClear(); - } - else if( pNameRecord->platformID == 3 ) - { - if( pNameRecord->encodingID >= 2 && pNameRecord->encodingID <= 6 ) - { - /* - * and now for a special kind of madness: - * some fonts encode their byte value string as BE uint16 - * (leading to stray zero bytes in the string) - * while others code two bytes as a uint16 and swap to BE - */ - OStringBuffer aName; - const sal_uInt8* pNameBuffer = pNameRecord->sptr; - for(int n = 0; n < pNameRecord->slen/2; n++ ) - { - sal_Unicode aCode = (sal_Unicode)getUInt16BE( pNameBuffer ); - sal_Char aChar = aCode >> 8; - if( aChar ) - aName.append( aChar ); - aChar = aCode & 0x00ff; - if( aChar ) - aName.append( aChar ); - } - switch( pNameRecord->encodingID ) - { - case 2: - aValue = OStringToOUString( aName.makeStringAndClear(), RTL_TEXTENCODING_MS_932 ); - break; - case 3: - aValue = OStringToOUString( aName.makeStringAndClear(), RTL_TEXTENCODING_MS_936 ); - break; - case 4: - aValue = OStringToOUString( aName.makeStringAndClear(), RTL_TEXTENCODING_MS_950 ); - break; - case 5: - aValue = OStringToOUString( aName.makeStringAndClear(), RTL_TEXTENCODING_MS_949 ); - break; - case 6: - aValue = OStringToOUString( aName.makeStringAndClear(), RTL_TEXTENCODING_MS_1361 ); - break; - } - } - } - return aValue; -} - -// ------------------------------------------------------------------------- - -void PrintFontManager::analyzeTrueTypeFamilyName( void* pTTFont, ::std::list< OUString >& rNames ) const -{ - OUString aFamily; - - rNames.clear(); - ::std::set< OUString > aSet; - - NameRecord* pNameRecords = NULL; - int nNameRecords = GetTTNameRecords( (TrueTypeFont*)pTTFont, &pNameRecords ); - if( nNameRecords && pNameRecords ) - { - LanguageType aLang = MsLangId::getSystemLanguage(); - int nLastMatch = -1; - for( int i = 0; i < nNameRecords; i++ ) - { - if( pNameRecords[i].nameID != 1 || pNameRecords[i].sptr == NULL ) - continue; - int nMatch = -1; - if( pNameRecords[i].platformID == 0 ) // Unicode - nMatch = 4000; - else if( pNameRecords[i].platformID == 3 ) - { - // this bases on the LanguageType actually being a Win LCID - if( pNameRecords[i].languageID == aLang ) - nMatch = 8000; - else if( pNameRecords[i].languageID == LANGUAGE_ENGLISH_US ) - nMatch = 2000; - else if( pNameRecords[i].languageID == LANGUAGE_ENGLISH || - pNameRecords[i].languageID == LANGUAGE_ENGLISH_UK ) - nMatch = 1500; - else - nMatch = 1000; - } - OUString aName = convertTrueTypeName( pNameRecords + i ); - aSet.insert( aName ); - if( nMatch > nLastMatch ) - { - nLastMatch = nMatch; - aFamily = aName; - } - } - DisposeNameRecords( pNameRecords, nNameRecords ); - } - if( aFamily.getLength() ) - { - rNames.push_front( aFamily ); - for( ::std::set< OUString >::const_iterator it = aSet.begin(); it != aSet.end(); ++it ) - if( *it != aFamily ) - rNames.push_back( *it ); - } - return; -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager::analyzeTrueTypeFile( PrintFont* pFont ) const -{ - bool bSuccess = false; - rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - ByteString aFile = getFontFile( pFont ); - TrueTypeFont* pTTFont = NULL; - - TrueTypeFontFile* pTTFontFile = static_cast< TrueTypeFontFile* >(pFont); - if( OpenTTFontFile( aFile.GetBuffer(), pTTFontFile->m_nCollectionEntry < 0 ? 0 : pTTFontFile->m_nCollectionEntry, &pTTFont ) == SF_OK ) - { - TTGlobalFontInfo aInfo; - GetTTGlobalFontInfo( pTTFont, & aInfo ); - - ::std::list< OUString > aNames; - analyzeTrueTypeFamilyName( pTTFont, aNames ); - - // set family name from XLFD if possible - if( ! pFont->m_nFamilyName ) - { - if( aNames.begin() != aNames.end() ) - { - pFont->m_nFamilyName = m_pAtoms->getAtom( ATOM_FAMILYNAME, aNames.front(), sal_True ); - aNames.pop_front(); - } - else - { - sal_Int32 dotIndex; - - // poor font does not have a family name - // name it to file name minus the extension - dotIndex = pTTFontFile->m_aFontFile.lastIndexOf( '.' ); - if ( dotIndex == -1 ) - dotIndex = pTTFontFile->m_aFontFile.getLength(); - - pFont->m_nFamilyName = m_pAtoms->getAtom( ATOM_FAMILYNAME, OStringToOUString( pTTFontFile->m_aFontFile.copy( 0, dotIndex ), aEncoding ), sal_True ); - } - } - for( ::std::list< OUString >::iterator it = aNames.begin(); it != aNames.end(); ++it ) - { - if( it->getLength() ) - { - int nAlias = m_pAtoms->getAtom( ATOM_FAMILYNAME, *it, sal_True ); - if( nAlias != pFont->m_nFamilyName ) - { - std::list< int >::const_iterator al_it; - for( al_it = pFont->m_aAliases.begin(); al_it != pFont->m_aAliases.end() && *al_it != nAlias; ++al_it ) - ; - if( al_it == pFont->m_aAliases.end() ) - pFont->m_aAliases.push_back( nAlias ); - } - } - } - - if( aInfo.usubfamily ) - pFont->m_aStyleName = OUString( aInfo.usubfamily ); - - pFont->m_nPSName = m_pAtoms->getAtom( ATOM_PSNAME, String( ByteString( aInfo.psname ), aEncoding ), sal_True ); - switch( aInfo.weight ) - { - case FW_THIN: pFont->m_eWeight = weight::Thin; break; - case FW_EXTRALIGHT: pFont->m_eWeight = weight::UltraLight; break; - case FW_LIGHT: pFont->m_eWeight = weight::Light; break; - case FW_MEDIUM: pFont->m_eWeight = weight::Medium; break; - case FW_SEMIBOLD: pFont->m_eWeight = weight::SemiBold; break; - case FW_BOLD: pFont->m_eWeight = weight::Bold; break; - case FW_EXTRABOLD: pFont->m_eWeight = weight::UltraBold; break; - case FW_BLACK: pFont->m_eWeight = weight::Black; break; - - case FW_NORMAL: - default: pFont->m_eWeight = weight::Normal; break; - } - - switch( aInfo.width ) - { - case FWIDTH_ULTRA_CONDENSED: pFont->m_eWidth = width::UltraCondensed; break; - case FWIDTH_EXTRA_CONDENSED: pFont->m_eWidth = width::ExtraCondensed; break; - case FWIDTH_CONDENSED: pFont->m_eWidth = width::Condensed; break; - case FWIDTH_SEMI_CONDENSED: pFont->m_eWidth = width::SemiCondensed; break; - case FWIDTH_SEMI_EXPANDED: pFont->m_eWidth = width::SemiExpanded; break; - case FWIDTH_EXPANDED: pFont->m_eWidth = width::Expanded; break; - case FWIDTH_EXTRA_EXPANDED: pFont->m_eWidth = width::ExtraExpanded; break; - case FWIDTH_ULTRA_EXPANDED: pFont->m_eWidth = width::UltraExpanded; break; - - case FWIDTH_NORMAL: - default: pFont->m_eWidth = width::Normal; break; - } - - pFont->m_ePitch = aInfo.pitch ? pitch::Fixed : pitch::Variable; - pFont->m_eItalic = aInfo.italicAngle == 0 ? italic::Upright : ( aInfo.italicAngle < 0 ? italic::Italic : italic::Oblique ); - // #104264# there are fonts that set italic angle 0 although they are - // italic; use macstyle bit here - if( aInfo.italicAngle == 0 && (aInfo.macStyle & 2) ) - pFont->m_eItalic = italic::Italic; - - pFont->m_aEncoding = aInfo.symbolEncoded ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UCS2; - - pFont->m_aGlobalMetricY.width = pFont->m_aGlobalMetricX.width = aInfo.xMax - aInfo.xMin; - pFont->m_aGlobalMetricY.height = pFont->m_aGlobalMetricX.height = aInfo.yMax - aInfo.yMin; - - if( aInfo.winAscent && aInfo.winDescent ) - { - pFont->m_nAscend = aInfo.winAscent; - pFont->m_nDescend = aInfo.winDescent; - pFont->m_nLeading = pFont->m_nAscend + pFont->m_nDescend - 1000; - } - else if( aInfo.typoAscender && aInfo.typoDescender ) - { - pFont->m_nLeading = aInfo.typoLineGap; - pFont->m_nAscend = aInfo.typoAscender; - pFont->m_nDescend = -aInfo.typoDescender; - } - else - { - pFont->m_nLeading = aInfo.linegap; - pFont->m_nAscend = aInfo.ascender; - pFont->m_nDescend = -aInfo.descender; - } - - // last try: font bounding box - if( pFont->m_nAscend == 0 ) - pFont->m_nAscend = aInfo.yMax; - if( pFont->m_nDescend == 0 ) - pFont->m_nDescend = -aInfo.yMin; - if( pFont->m_nLeading == 0 ) - pFont->m_nLeading = 15 * (pFont->m_nAscend+pFont->m_nDescend) / 100; - - if( pFont->m_nAscend ) - pFont->m_aGlobalMetricX.height = pFont->m_aGlobalMetricY.height = pFont->m_nAscend + pFont->m_nDescend; - - // get bounding box - pFont->m_nXMin = aInfo.xMin; - pFont->m_nYMin = aInfo.yMin; - pFont->m_nXMax = aInfo.xMax; - pFont->m_nYMax = aInfo.yMax; - - // get type flags - pTTFontFile->m_nTypeFlags = (unsigned int)aInfo.typeFlags; - - // get vertical substitutions flag - pFont->m_bHaveVerticalSubstitutedGlyphs = DoesVerticalSubstitution( pTTFont, 1 ); - - CloseTTFont( pTTFont ); - bSuccess = true; - } -#if OSL_DEBUG_LEVEL > 1 - else - fprintf( stderr, "could not OpenTTFont \"%s\"\n", aFile.GetBuffer() ); -#endif - - return bSuccess; -} - -// ------------------------------------------------------------------------- - -void PrintFontManager::initFontsAlias() -{ - m_aXLFD_Aliases.clear(); - rtl_TextEncoding aEnc = osl_getThreadTextEncoding(); - for( std::list< OString >::const_iterator dir_it = m_aFontDirectories.begin(); - dir_it != m_aFontDirectories.end(); ++dir_it ) - { - OStringBuffer aDirName(512); - aDirName.append( *dir_it ); - aDirName.append( "/fonts.alias" ); - SvFileStream aStream( OStringToOUString( aDirName.makeStringAndClear(), aEnc ), STREAM_READ ); - if( ! aStream.IsOpen() ) - continue; - - do - { - ByteString aLine; - aStream.ReadLine( aLine ); - - // get the alias and the pattern it gets translated to - ByteString aAlias = GetCommandLineToken( 0, aLine ); - ByteString aMap = GetCommandLineToken( 1, aLine ); - - // remove eventual quotes - aAlias.EraseLeadingChars( '"' ); - aAlias.EraseTrailingChars( '"' ); - aMap.EraseLeadingChars( '"' ); - aMap.EraseTrailingChars( '"' ); - - XLFDEntry aAliasEntry, aMapEntry; - parseXLFD( aAlias, aAliasEntry ); - parseXLFD( aMap, aMapEntry ); - - if( aAliasEntry.nMask && aMapEntry.nMask ) - m_aXLFD_Aliases[ aMapEntry ].push_back( aAliasEntry ); - } while( ! aStream.IsEof() ); - } -} - -// code stolen from vcl's RegisterFontSubstitutors() -// TODO: use that method once psprint gets merged into vcl -static bool AreFCSubstitutionsEnabled() -{ - // init font substitution defaults - int nDisableBits = 0; -#ifdef SOLARIS - // TODO: check the OS version and fc-data maintenance level - nDisableBits = 1; // disable "font fallback" here on default -#endif - // apply the environment variable if any - const char* pEnvStr = ::getenv( "SAL_DISABLE_FC_SUBST" ); - if( pEnvStr ) - { - // - if( (*pEnvStr >= '0') && (*pEnvStr <= '9') ) - nDisableBits = (*pEnvStr - '0'); - else - nDisableBits = ~0U; // no specific bits set: disable all - } - - return ((nDisableBits & 3) == 0); -} - -void PrintFontManager::initialize() -{ - #ifdef CALLGRIND_COMPILE - CALLGRIND_TOGGLE_COLLECT(); - CALLGRIND_ZERO_STATS(); - #endif - - long aDirEntBuffer[ (sizeof(struct dirent)+_PC_NAME_MAX)+1 ]; - - if( ! m_pFontCache ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "creating font cache ... " ); - clock_t aStart; - struct tms tms; - aStart = times( &tms ); -#endif - m_pFontCache = new FontCache(); -#if OSL_DEBUG_LEVEL > 1 - clock_t aStop = times( &tms ); - fprintf( stderr, "done in %lf s\n", (double)(aStop - aStart)/(double)sysconf( _SC_CLK_TCK ) ); -#endif - } - - // initialize may be called twice in the future - { - for( ::std::hash_map< fontID, PrintFont* >::const_iterator it = m_aFonts.begin(); it != m_aFonts.end(); ++it ) - delete (*it).second; - m_nNextFontID = 1; - m_aFonts.clear(); - m_aFontDirectories.clear(); - m_aPrivateFontDirectories.clear(); - m_aOverrideFonts.clear(); - } - -#if OSL_DEBUG_LEVEL > 1 - clock_t aStart; - clock_t aStep1; - clock_t aStep2; - clock_t aStep3; - int nBuiltinFonts = 0; - int nCached = 0; - - struct tms tms; - - aStart = times( &tms ); -#endif - - // first try fontconfig - m_bFontconfigSuccess = initFontconfig(); - - // part one - look for downloadable fonts - rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - const ::rtl::OUString &rSalPrivatePath = psp::getFontPath(); - - // search for the fonts in SAL_PRIVATE_FONTPATH first; those are - // the fonts installed with the office - if( rSalPrivatePath.getLength() ) - { - OString aPath = rtl::OUStringToOString( rSalPrivatePath, aEncoding ); - const bool bAreFCSubstitutionsEnabled = AreFCSubstitutionsEnabled(); - sal_Int32 nIndex = 0; - do - { - OString aToken = aPath.getToken( 0, ';', nIndex ); - normPath( aToken ); - // if registering an app-specific fontdir with fontconfig fails - // and fontconfig-based substitutions are enabled - // then trying to use these app-specific fonts doesn't make sense - if( m_bFontconfigSuccess && !addFontconfigDir( aToken ) ) - if( bAreFCSubstitutionsEnabled ) - continue; - m_aFontDirectories.push_back( aToken ); - m_aPrivateFontDirectories.push_back( getDirectoryAtom( aToken, true ) ); - } while( nIndex >= 0 ); - } - - // protect against duplicate paths - std::hash_map< OString, int, OStringHash > visited_dirs; - - // now that all global and local font dirs are known to fontconfig - // check that there are fonts actually managed by fontconfig - // also don't search directories that fontconfig already did - if( m_bFontconfigSuccess ) - m_bFontconfigSuccess = (countFontconfigFonts( visited_dirs ) > 0); - - // don't search through many directories fontconfig already told us about - if( ! m_bFontconfigSuccess ) - ImplGetSVData()->mpDefInst->FillFontPathList( m_aFontDirectories ); - - // fill XLFD aliases from fonts.alias files - initFontsAlias(); - - // search for font files in each path - std::list< OString >::iterator dir_it; - for( dir_it = m_aFontDirectories.begin(); dir_it != m_aFontDirectories.end(); ++dir_it ) - { - OString aPath( *dir_it ); - // see if we were here already - if( visited_dirs.find( aPath ) != visited_dirs.end() ) - continue; - visited_dirs[ aPath ] = 1; - - // there may be ":unscaled" directories (see XFree86) - // it should be safe to ignore them since they should not - // contain any of our recognizeable fonts - - // ask the font cache whether it handles this directory - std::list< PrintFont* > aCacheFonts; - if( m_pFontCache->listDirectory( aPath, aCacheFonts ) ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "adding cache directory: %s\n", aPath.getStr() ); -#endif - for( ::std::list< PrintFont* >::iterator it = aCacheFonts.begin(); it != aCacheFonts.end(); ++it ) - { - fontID aFont = m_nNextFontID++; - m_aFonts[ aFont ] = *it; - if( (*it)->m_eType == fonttype::Type1 ) - m_aFontFileToFontID[ static_cast(*it)->m_aFontFile ].insert( aFont ); - else if( (*it)->m_eType == fonttype::TrueType ) - m_aFontFileToFontID[ static_cast(*it)->m_aFontFile ].insert( aFont ); - else if( (*it)->m_eType == fonttype::Builtin ) - m_aFontFileToFontID[ static_cast(*it)->m_aMetricFile ].insert( aFont ); -#if OSL_DEBUG_LEVEL > 1 - if( (*it)->m_eType == fonttype::Builtin ) - nBuiltinFonts++; - nCached++; -#if OSL_DEBUG_LEVEL > 2 - fprintf( stderr, "adding cached font %d: \"%s\" from %s\n", aFont, - OUStringToOString( getFontFamily( aFont ), RTL_TEXTENCODING_MS_1252 ).getStr(), - getFontFileSysPath( aFont ).getStr() ); -#endif -#endif - } - if( ! m_pFontCache->scanAdditionalFiles( aPath ) ) - continue; - } - - DIR* pDIR = opendir( aPath.getStr() ); - struct dirent* pEntry = (struct dirent*)aDirEntBuffer; - if( pDIR ) - { - // read fonts.dir if possible - ::std::hash_map< OString, ::std::list, OStringHash > aFontsDir; - int nDirID = getDirectoryAtom( aPath, true ); - // #i38367# no fonts.dir in our own directories anymore - std::list< int >::const_iterator priv_dir; - for( priv_dir = m_aPrivateFontDirectories.begin(); - priv_dir != m_aPrivateFontDirectories.end() && *priv_dir != nDirID; - ++priv_dir ) - ; - - if( priv_dir == m_aPrivateFontDirectories.end() ) - { - ByteString aGccDummy( aPath ); - String aFontsDirPath( aGccDummy, aEncoding ); - aFontsDirPath.AppendAscii( "/fonts.dir" ); - SvFileStream aStream( aFontsDirPath, STREAM_READ ); - if( aStream.IsOpen() ) - { - ByteString aLine; - while( ! aStream.IsEof() ) - { - aStream.ReadLine( aLine ); - ByteString aFileName( GetCommandLineToken( 0, aLine ) ); - ByteString aXLFD( aLine.Copy( aFileName.Len() ) ); - if( aFileName.Len() && aXLFD.Len() ) - aFontsDir[ aFileName ].push_back(aXLFD); - } - } - } - - int nDirFonts = 0; - while( ! readdir_r( pDIR, (struct dirent*)aDirEntBuffer, &pEntry ) && pEntry ) - { - OString aFileName( pEntry->d_name ); - // ignore .afm files here - if( aFileName.getLength() > 3 && - aFileName.lastIndexOf( ".afm" ) == aFileName.getLength()-4 ) - continue; - - struct stat aStat; - ByteString aFilePath( aPath ); - aFilePath.Append( '/' ); - aFilePath.Append( ByteString( aFileName ) ); - if( ! stat( aFilePath.GetBuffer(), &aStat ) && - S_ISREG( aStat.st_mode ) ) - { - if( findFontFileID( nDirID, aFileName ) == 0 ) - { - ::std::list aXLFDs; - ::std::hash_map< OString, ::std::list, OStringHash >::const_iterator it = - aFontsDir.find( aFileName ); - if( it != aFontsDir.end() ) - aXLFDs = (*it).second; - - // fill in font attributes from XLFD rather - // than reading every file - ::std::list< PrintFont* > aNewFonts; - if( analyzeFontFile( nDirID, aFileName, aXLFDs, aNewFonts ) ) - { - for( ::std::list< PrintFont* >::iterator font_it = aNewFonts.begin(); font_it != aNewFonts.end(); ++font_it ) - { - fontID aFont = m_nNextFontID++; - m_aFonts[ aFont ] = *font_it; - m_aFontFileToFontID[ aFileName ].insert( aFont ); - m_pFontCache->updateFontCacheEntry( *font_it, false ); - nDirFonts++; -#if OSL_DEBUG_LEVEL > 2 - fprintf( stderr, "adding font %d: \"%s\" from %s\n", aFont, - OUStringToOString( getFontFamily( aFont ), RTL_TEXTENCODING_MS_1252 ).getStr(), - getFontFileSysPath( aFont ).getStr() ); -#endif - } - } - } - } - } - closedir( pDIR ); - m_pFontCache->updateDirTimestamp( nDirID ); - if( ! nDirFonts ) - m_pFontCache->markEmptyDir( nDirID ); - } - } - -#if OSL_DEBUG_LEVEL > 1 - aStep1 = times( &tms ); -#endif - - // part two - look for metrics for builtin printer fonts - std::list< OUString > aMetricDirs; - psp::getPrinterPathList( aMetricDirs, PRINTER_METRICDIR ); - - std::list< OString > aEmptyFontsDir; - for( std::list< OUString >::const_iterator met_dir_it = aMetricDirs.begin(); met_dir_it != aMetricDirs.end(); ++met_dir_it ) - { - OString aDir = OUStringToOString( *met_dir_it, aEncoding ); - - // ask the font cache whether it handles this directory - std::list< PrintFont* > aCacheFonts; - - if( m_pFontCache->listDirectory( aDir, aCacheFonts ) ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "adding cache directory: %s\n", aDir.getStr() ); -#endif - for( ::std::list< PrintFont* >::iterator it = aCacheFonts.begin(); it != aCacheFonts.end(); ++it ) - { - fontID aFont = m_nNextFontID++; - m_aFonts[ aFont ] = *it; - if( (*it)->m_eType == fonttype::Type1 ) - m_aFontFileToFontID[ static_cast(*it)->m_aFontFile ].insert( aFont ); - else if( (*it)->m_eType == fonttype::TrueType ) - m_aFontFileToFontID[ static_cast(*it)->m_aFontFile ].insert( aFont ); - else if( (*it)->m_eType == fonttype::Builtin ) - m_aFontFileToFontID[ static_cast(*it)->m_aMetricFile ].insert( aFont ); -#if OSL_DEBUG_LEVEL > 1 - if( (*it)->m_eType == fonttype::Builtin ) - nBuiltinFonts++; - nCached++; -#if OSL_DEBUG_LEVEL > 2 - fprintf( stderr, "adding cached font %d: \"%s\" from %s\n", aFont, - OUStringToOString( getFontFamily( aFont ), RTL_TEXTENCODING_MS_1252 ).getStr(), - getFontFileSysPath( aFont ).getStr() ); -#endif -#endif - } - continue; - } - - DIR* pDIR = opendir( aDir.getStr() ); - if( pDIR ) - { - struct dirent* pDirEntry = (struct dirent*)aDirEntBuffer; - int nDirID = getDirectoryAtom( aDir, true ); - int nDirFonts = 0; - - while( ! readdir_r( pDIR, (struct dirent*)aDirEntBuffer, &pDirEntry ) && pDirEntry ) - { - ByteString aFile( aDir ); - aFile += '/'; - aFile += pDirEntry->d_name; - struct stat aStat; - if( ! stat( aFile.GetBuffer(), &aStat ) - && S_ISREG( aStat.st_mode ) - ) - { - OString aFileName( pDirEntry->d_name, strlen( pDirEntry->d_name ) ); - OString aExt( aFileName.copy( aFileName.lastIndexOf( '.' )+1 ) ); - if( aExt.equalsIgnoreAsciiCase( "afm" ) ) - { - ::std::list< PrintFont* > aNewFonts; - - analyzeFontFile( nDirID, aFileName, aEmptyFontsDir, aNewFonts ); - for( ::std::list< PrintFont* >::iterator it = aNewFonts.begin(); it != aNewFonts.end(); ++it ) - { - if( findFontBuiltinID( (*it)->m_nPSName ) == 0 ) - { - m_aFontFileToFontID[ aFileName ].insert( m_nNextFontID ); - m_aFonts[ m_nNextFontID++ ] = *it; - m_pFontCache->updateFontCacheEntry( *it, false ); -#if OSL_DEBUG_LEVEL > 2 - nBuiltinFonts++; -#endif - } - else - delete *it; - } - } - } - } - closedir( pDIR ); - if( ! nDirFonts ) - m_pFontCache->markEmptyDir( nDirID ); - } - } - -#if OSL_DEBUG_LEVEL > 1 - aStep2 = times( &tms ); -#endif - - // part three - fill in family styles - ::std::hash_map< fontID, PrintFont* >::iterator font_it; - for (font_it = m_aFonts.begin(); font_it != m_aFonts.end(); ++font_it) - { - ::std::hash_map< int, family::type >::const_iterator it = - m_aFamilyTypes.find( font_it->second->m_nFamilyName ); - if (it != m_aFamilyTypes.end()) - continue; - const ::rtl::OUString& rFamily = - m_pAtoms->getString( ATOM_FAMILYNAME, font_it->second->m_nFamilyName); - family::type eType = matchFamilyName( rFamily ); - m_aFamilyTypes[ font_it->second->m_nFamilyName ] = eType; - } - -#if OSL_DEBUG_LEVEL > 1 - aStep3 = times( &tms ); - fprintf( stderr, "PrintFontManager::initialize: collected %d fonts (%d builtin, %d cached)\n", m_aFonts.size(), nBuiltinFonts, nCached ); - double fTick = (double)sysconf( _SC_CLK_TCK ); - fprintf( stderr, "Step 1 took %lf seconds\n", (double)(aStep1 - aStart)/fTick ); - fprintf( stderr, "Step 2 took %lf seconds\n", (double)(aStep2 - aStep1)/fTick ); - fprintf( stderr, "Step 3 took %lf seconds\n", (double)(aStep3 - aStep2)/fTick ); -#endif - - m_pFontCache->flush(); - - #ifdef CALLGRIND_COMPILE - CALLGRIND_DUMP_STATS(); - CALLGRIND_TOGGLE_COLLECT(); - #endif -} - -// ------------------------------------------------------------------------- -inline bool -equalPitch (psp::pitch::type from, psp::pitch::type to) -{ - return from == to; -} - -inline bool -equalWeight (psp::weight::type from, psp::weight::type to) -{ - return from > to ? (from - to) <= 3 : (to - from) <= 3; -} - -inline bool -equalItalic (psp::italic::type from, psp::italic::type to) -{ - if ( (from == psp::italic::Italic) || (from == psp::italic::Oblique) ) - return (to == psp::italic::Italic) || (to == psp::italic::Oblique); - return to == from; -} -inline bool -equalEncoding (rtl_TextEncoding from, rtl_TextEncoding to) -{ - if ((from == RTL_TEXTENCODING_ISO_8859_1) || (from == RTL_TEXTENCODING_MS_1252)) - return (to == RTL_TEXTENCODING_ISO_8859_1) || (to == RTL_TEXTENCODING_MS_1252); - return from == to; -} - -namespace { - struct BuiltinFontIdentifier - { - OUString aFamily; - italic::type eItalic; - weight::type eWeight; - pitch::type ePitch; - rtl_TextEncoding aEncoding; - - BuiltinFontIdentifier( const OUString& rFam, - italic::type eIt, - weight::type eWg, - pitch::type ePt, - rtl_TextEncoding enc ) : - aFamily( rFam ), - eItalic( eIt ), - eWeight( eWg ), - ePitch( ePt ), - aEncoding( enc ) - {} - - bool operator==( const BuiltinFontIdentifier& rRight ) const - { - return equalItalic( eItalic, rRight.eItalic ) && - equalWeight( eWeight, rRight.eWeight ) && - equalPitch( ePitch, rRight.ePitch ) && - equalEncoding( aEncoding, rRight.aEncoding ) && - aFamily.equalsIgnoreAsciiCase( rRight.aFamily ); - } - }; - - struct BuiltinFontIdentifierHash - { - size_t operator()( const BuiltinFontIdentifier& rFont ) const - { - return rFont.aFamily.hashCode() ^ rFont.eItalic ^ rFont.eWeight ^ rFont.ePitch ^ rFont.aEncoding; - } - }; -} - -void PrintFontManager::getFontList( ::std::list< fontID >& rFontIDs, const PPDParser* pParser, bool bUseOverrideMetrics ) -{ - rFontIDs.clear(); - std::hash_map< fontID, PrintFont* >::const_iterator it; - - /* - * Note: there are two easy steps making this faster: - * first: insert the printer builtins first, then the not builtins, - * if they do not match. - * drawback: this would change the sequence of fonts; this could have - * subtle, unknown consequences in vcl font matching - * second: instead of comparing attributes to see whether a softfont - * is duplicate to a builtin one could simply compare the PSName (which is - * supposed to be unique), which at this point is just an int. - * drawback: this could change which fonts are listed; especially TrueType - * fonts often have a rather dubious PSName, so this could change the - * font list not so subtle. - * Until getFontList for a printer becomes a performance issue (which is - * currently not the case), best stay with the current algorithm. - */ - - // fill sets of printer supported fonts - if( pParser ) - { - std::set aBuiltinPSNames; - std::hash_set< BuiltinFontIdentifier, - BuiltinFontIdentifierHash - > aBuiltinFonts; - - std::map aOverridePSNames; - if( bUseOverrideMetrics ) - { - readOverrideMetrics(); - for( std::vector::const_iterator over = m_aOverrideFonts.begin(); - over != m_aOverrideFonts.end(); ++over ) - { - std::hash_map::const_iterator font_it = m_aFonts.find( *over ); - DBG_ASSERT( font_it != m_aFonts.end(), "override to nonexistant font" ); - if( font_it != m_aFonts.end() ) - aOverridePSNames[ font_it->second->m_nPSName ] = *over; - } - } - - int nFonts = pParser->getFonts(); - for( int i = 0; i < nFonts; i++ ) - aBuiltinPSNames.insert( m_pAtoms->getAtom( ATOM_PSNAME, pParser->getFont( i ) ) ); - for( it = m_aFonts.begin(); it != m_aFonts.end(); ++it ) - { - PrintFont* pFont = it->second; - if( it->second->m_eType == fonttype::Builtin && - aBuiltinPSNames.find( pFont->m_nPSName ) != aBuiltinPSNames.end() ) - { - bool bInsert = true; - if( bUseOverrideMetrics ) - { - // in override case only use the override fonts, not their counterparts - std::map::const_iterator over = aOverridePSNames.find( pFont->m_nPSName ); - if( over != aOverridePSNames.end() && over->second != it->first ) - bInsert = false; - } - else - { - // do not insert override fonts in non override case - if( std::find( m_aOverrideFonts.begin(), m_aOverrideFonts.end(), it->first ) != m_aOverrideFonts.end() ) - bInsert = false; - } - if( bInsert ) - { - aBuiltinFonts.insert( BuiltinFontIdentifier( - m_pAtoms->getString( ATOM_FAMILYNAME, pFont->m_nFamilyName ), - pFont->m_eItalic, - pFont->m_eWeight, - pFont->m_ePitch, - pFont->m_aEncoding - ) ); - } - } - } - for( it = m_aFonts.begin(); it != m_aFonts.end(); ++it ) - { - PrintFont* pFont = it->second; - if( it->second->m_eType == fonttype::Builtin ) - { - if( aBuiltinPSNames.find( pFont->m_nPSName ) != aBuiltinPSNames.end() ) - { - bool bInsert = true; - if( bUseOverrideMetrics ) - { - // in override case only use the override fonts, not their counterparts - std::map::const_iterator over = aOverridePSNames.find( pFont->m_nPSName ); - if( over != aOverridePSNames.end() && over->second != it->first ) - bInsert = false; - } - else - { - // do not insert override fonts in non override case - if( std::find( m_aOverrideFonts.begin(), m_aOverrideFonts.end(), it->first ) != m_aOverrideFonts.end() ) - bInsert = false; - } - if( bInsert ) - rFontIDs.push_back( it->first ); - } - } - else if( aBuiltinFonts.find( BuiltinFontIdentifier( - m_pAtoms->getString( ATOM_FAMILYNAME, pFont->m_nFamilyName ), - pFont->m_eItalic, - pFont->m_eWeight, - pFont->m_ePitch, - pFont->m_aEncoding - ) ) == aBuiltinFonts.end() ) - { - rFontIDs.push_back( it->first ); - } - } - } - else // no specific printer - { - for( it = m_aFonts.begin(); it != m_aFonts.end(); ++it ) - rFontIDs.push_back( it->first ); - } -} - -// ------------------------------------------------------------------------- - -void PrintFontManager::fillPrintFontInfo( PrintFont* pFont, FastPrintFontInfo& rInfo ) const -{ - ::std::hash_map< int, family::type >::const_iterator style_it = - m_aFamilyTypes.find( pFont->m_nFamilyName ); - rInfo.m_eType = pFont->m_eType; - rInfo.m_aFamilyName = m_pAtoms->getString( ATOM_FAMILYNAME, pFont->m_nFamilyName ); - rInfo.m_aStyleName = pFont->m_aStyleName; - rInfo.m_eFamilyStyle = style_it != m_aFamilyTypes.end() ? style_it->second : family::Unknown; - rInfo.m_eItalic = pFont->m_eItalic; - rInfo.m_eWidth = pFont->m_eWidth; - rInfo.m_eWeight = pFont->m_eWeight; - rInfo.m_ePitch = pFont->m_ePitch; - rInfo.m_aEncoding = pFont->m_aEncoding; - - rInfo.m_bEmbeddable = (pFont->m_eType == fonttype::Type1); - rInfo.m_bSubsettable = (pFont->m_eType == fonttype::TrueType); // TODO: rename to SfntType - - rInfo.m_aAliases.clear(); - for( ::std::list< int >::iterator it = pFont->m_aAliases.begin(); it != pFont->m_aAliases.end(); ++it ) - rInfo.m_aAliases.push_back( m_pAtoms->getString( ATOM_FAMILYNAME, *it ) ); -} - -// ------------------------------------------------------------------------- - -void PrintFontManager::fillPrintFontInfo( PrintFont* pFont, PrintFontInfo& rInfo ) const -{ - if( ( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) || - ! pFont->m_pMetrics || pFont->m_pMetrics->isEmpty() - ) - { - // might be a truetype font not analyzed or type1 without metrics read - if( pFont->m_eType == fonttype::Type1 ) - pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, false ); - else if( pFont->m_eType == fonttype::TrueType ) - analyzeTrueTypeFile( pFont ); - } - - fillPrintFontInfo( pFont, static_cast< FastPrintFontInfo& >( rInfo ) ); - - rInfo.m_nAscend = pFont->m_nAscend; - rInfo.m_nDescend = pFont->m_nDescend; - rInfo.m_nLeading = pFont->m_nLeading; - rInfo.m_nWidth = pFont->m_aGlobalMetricX.width < pFont->m_aGlobalMetricY.width ? pFont->m_aGlobalMetricY.width : pFont->m_aGlobalMetricX.width; -} - -// ------------------------------------------------------------------------- - -void PrintFontManager::getFontListWithInfo( ::std::list< PrintFontInfo >& rFonts, const PPDParser* pParser, bool bUseOverrideMetrics ) -{ - rFonts.clear(); - ::std::list< fontID > aFontList; - getFontList( aFontList, pParser, bUseOverrideMetrics ); - - ::std::list< fontID >::iterator it; - for( it = aFontList.begin(); it != aFontList.end(); ++it ) - { - PrintFontInfo aInfo; - aInfo.m_nID = *it; - fillPrintFontInfo( getFont( *it ), aInfo ); - rFonts.push_back( aInfo ); - } -} - -// ------------------------------------------------------------------------- - -void PrintFontManager::getFontListWithFastInfo( ::std::list< FastPrintFontInfo >& rFonts, const PPDParser* pParser, bool bUseOverrideMetrics ) -{ - rFonts.clear(); - ::std::list< fontID > aFontList; - getFontList( aFontList, pParser, bUseOverrideMetrics ); - - ::std::list< fontID >::iterator it; - for( it = aFontList.begin(); it != aFontList.end(); ++it ) - { - FastPrintFontInfo aInfo; - aInfo.m_nID = *it; - fillPrintFontInfo( getFont( *it ), aInfo ); - rFonts.push_back( aInfo ); - } -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager::getFontInfo( fontID nFontID, PrintFontInfo& rInfo ) const -{ - PrintFont* pFont = getFont( nFontID ); - if( pFont ) - { - rInfo.m_nID = nFontID; - fillPrintFontInfo( pFont, rInfo ); - } - return pFont ? true : false; -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager::getFontFastInfo( fontID nFontID, FastPrintFontInfo& rInfo ) const -{ - PrintFont* pFont = getFont( nFontID ); - if( pFont ) - { - rInfo.m_nID = nFontID; - fillPrintFontInfo( pFont, rInfo ); - } - return pFont ? true : false; -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager::getFontBoundingBox( fontID nFontID, int& xMin, int& yMin, int& xMax, int& yMax ) -{ - bool bSuccess = false; - PrintFont* pFont = getFont( nFontID ); - if( pFont ) - { - if( pFont->m_nXMin == 0 && pFont->m_nYMin == 0 && pFont->m_nXMax == 0 && pFont->m_nYMax == 0 ) - { - // might be a truetype font not analyzed or type1 without metrics read - if( pFont->m_eType == fonttype::Type1 || pFont->m_eType == fonttype::Builtin ) - pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, true ); - else if( pFont->m_eType == fonttype::TrueType ) - analyzeTrueTypeFile( pFont ); - } - bSuccess = true; - xMin = pFont->m_nXMin; - yMin = pFont->m_nYMin; - xMax = pFont->m_nXMax; - yMax = pFont->m_nYMax; - } - return bSuccess; -} - -// ------------------------------------------------------------------------- - -int PrintFontManager::getFontFaceNumber( fontID nFontID ) const -{ - int nRet = -1; - PrintFont* pFont = getFont( nFontID ); - if( pFont && pFont->m_eType == fonttype::TrueType ) - nRet = static_cast< TrueTypeFontFile* >(pFont)->m_nCollectionEntry; - return nRet; -} - -// ------------------------------------------------------------------------- - - -family::type PrintFontManager::matchFamilyName( const ::rtl::OUString& rFamily ) const -{ - typedef struct { - const char* mpName; - sal_uInt16 mnLength; - family::type meType; - } family_t; - -#define InitializeClass( p, a ) p, sizeof(p) - 1, a - const family_t pFamilyMatch[] = { - { InitializeClass( "arial", family::Swiss ) }, - { InitializeClass( "arioso", family::Script ) }, - { InitializeClass( "avant garde", family::Swiss ) }, - { InitializeClass( "avantgarde", family::Swiss ) }, - { InitializeClass( "bembo", family::Roman ) }, - { InitializeClass( "bookman", family::Roman ) }, - { InitializeClass( "conga", family::Roman ) }, - { InitializeClass( "courier", family::Modern ) }, - { InitializeClass( "curl", family::Script ) }, - { InitializeClass( "fixed", family::Modern ) }, - { InitializeClass( "gill", family::Swiss ) }, - { InitializeClass( "helmet", family::Modern ) }, - { InitializeClass( "helvetica", family::Swiss ) }, - { InitializeClass( "international", family::Modern ) }, - { InitializeClass( "lucida", family::Swiss ) }, - { InitializeClass( "new century schoolbook", family::Roman ) }, - { InitializeClass( "palatino", family::Roman ) }, - { InitializeClass( "roman", family::Roman ) }, - { InitializeClass( "sans serif", family::Swiss ) }, - { InitializeClass( "sansserif", family::Swiss ) }, - { InitializeClass( "serf", family::Roman ) }, - { InitializeClass( "serif", family::Roman ) }, - { InitializeClass( "times", family::Roman ) }, - { InitializeClass( "utopia", family::Roman ) }, - { InitializeClass( "zapf chancery", family::Script ) }, - { InitializeClass( "zapfchancery", family::Script ) } - }; - - rtl::OString aFamily = rtl::OUStringToOString( rFamily, RTL_TEXTENCODING_ASCII_US ); - sal_uInt32 nLower = 0; - sal_uInt32 nUpper = sizeof(pFamilyMatch) / sizeof(pFamilyMatch[0]); - - while( nLower < nUpper ) - { - sal_uInt32 nCurrent = (nLower + nUpper) / 2; - const family_t* pHaystack = pFamilyMatch + nCurrent; - sal_Int32 nComparison = - rtl_str_compareIgnoreAsciiCase_WithLength - ( - aFamily.getStr(), aFamily.getLength(), - pHaystack->mpName, pHaystack->mnLength - ); - - if( nComparison < 0 ) - nUpper = nCurrent; - else - if( nComparison > 0 ) - nLower = nCurrent + 1; - else - return pHaystack->meType; - } - - return family::Unknown; -} - -// ------------------------------------------------------------------------- - -family::type PrintFontManager::getFontFamilyType( fontID nFontID ) const -{ - PrintFont* pFont = getFont( nFontID ); - if( !pFont ) - return family::Unknown; - - ::std::hash_map< int, family::type >::const_iterator it = - m_aFamilyTypes.find( pFont->m_nFamilyName ); - return (it != m_aFamilyTypes.end()) ? it->second : family::Unknown; -} - - -// ------------------------------------------------------------------------- - -const ::rtl::OUString& PrintFontManager::getFontFamily( fontID nFontID ) const -{ - PrintFont* pFont = getFont( nFontID ); - return m_pAtoms->getString( ATOM_FAMILYNAME, pFont ? pFont->m_nFamilyName : INVALID_ATOM ); -} - -// ------------------------------------------------------------------------- - -OString PrintFontManager::getAfmFile( PrintFont* pFont ) const -{ - OString aMetricPath; - if( pFont ) - { - switch( pFont->m_eType ) - { - case fonttype::Type1: - { - Type1FontFile* pPSFont = static_cast< Type1FontFile* >(pFont); - aMetricPath = getDirectory( pPSFont->m_nDirectory ); - aMetricPath += "/"; - aMetricPath += pPSFont->m_aMetricFile; - } - break; - case fonttype::Builtin: - { - BuiltinFont* pBuiltinFont = static_cast< BuiltinFont* >(pFont); - aMetricPath = getDirectory( pBuiltinFont->m_nDirectory ); - aMetricPath += "/"; - aMetricPath += pBuiltinFont->m_aMetricFile; - } - break; - default: break; - } - } - return aMetricPath; -} - -// ------------------------------------------------------------------------- - -OString PrintFontManager::getFontFile( PrintFont* pFont ) const -{ - OString aPath; - - if( pFont && pFont->m_eType == fonttype::Type1 ) - { - Type1FontFile* pPSFont = static_cast< Type1FontFile* >(pFont); - ::std::hash_map< int, OString >::const_iterator it = m_aAtomToDir.find( pPSFont->m_nDirectory ); - aPath = it->second; - aPath += "/"; - aPath += pPSFont->m_aFontFile; - } - else if( pFont && pFont->m_eType == fonttype::TrueType ) - { - TrueTypeFontFile* pTTFont = static_cast< TrueTypeFontFile* >(pFont); - ::std::hash_map< int, OString >::const_iterator it = m_aAtomToDir.find( pTTFont->m_nDirectory ); - aPath = it->second; - aPath += "/"; - aPath += pTTFont->m_aFontFile; - } - return aPath; -} - -// ------------------------------------------------------------------------- - -const ::rtl::OUString& PrintFontManager::getPSName( fontID nFontID ) const -{ - PrintFont* pFont = getFont( nFontID ); - if( pFont && pFont->m_nPSName == 0 ) - { - if( pFont->m_eType == fonttype::TrueType ) - analyzeTrueTypeFile( pFont ); - } - - return m_pAtoms->getString( ATOM_PSNAME, pFont ? pFont->m_nPSName : INVALID_ATOM ); -} - -// ------------------------------------------------------------------------- - -const CharacterMetric& PrintFontManager::getGlobalFontMetric( fontID nFontID, bool bHorizontal ) const -{ - static CharacterMetric aMetric; - PrintFont* pFont = getFont( nFontID ); - return pFont ? ( bHorizontal ? pFont->m_aGlobalMetricX : pFont->m_aGlobalMetricY ) : aMetric; -} - -// ------------------------------------------------------------------------- - -int PrintFontManager::getFontAscend( fontID nFontID ) const -{ - PrintFont* pFont = getFont( nFontID ); - if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) - { - // might be a truetype font not yet analyzed - if( pFont->m_eType == fonttype::TrueType ) - analyzeTrueTypeFile( pFont ); - else if( pFont->m_eType == fonttype::Type1 || pFont->m_eType == fonttype::Builtin ) - pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, true ); - } - return pFont->m_nAscend; -} - -// ------------------------------------------------------------------------- - -int PrintFontManager::getFontDescend( fontID nFontID ) const -{ - PrintFont* pFont = getFont( nFontID ); - if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) - { - // might be a truetype font not yet analyzed - if( pFont->m_eType == fonttype::TrueType ) - analyzeTrueTypeFile( pFont ); - else if( pFont->m_eType == fonttype::Type1 || pFont->m_eType == fonttype::Builtin ) - pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, true ); - } - return pFont->m_nDescend; -} - -// ------------------------------------------------------------------------- - -int PrintFontManager::getFontLeading( fontID nFontID ) const -{ - PrintFont* pFont = getFont( nFontID ); - if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) - { - // might be a truetype font not yet analyzed - if( pFont->m_eType == fonttype::TrueType ) - analyzeTrueTypeFile( pFont ); - } - return pFont->m_nLeading; -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager::hasVerticalSubstitutions( fontID nFontID ) const -{ - PrintFont* pFont = getFont( nFontID ); - if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) - { - // might be a truetype font not yet analyzed - if( pFont->m_eType == fonttype::TrueType ) - analyzeTrueTypeFile( pFont ); - } - return pFont->m_bHaveVerticalSubstitutedGlyphs; -} - -// ------------------------------------------------------------------------- - -void PrintFontManager::hasVerticalSubstitutions( fontID nFontID, - const sal_Unicode* pCharacters, int nCharacters, bool* pHasSubst ) const -{ - PrintFont* pFont = getFont( nFontID ); - if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) - { - // might be a truetype font not yet analyzed - if( pFont->m_eType == fonttype::TrueType ) - analyzeTrueTypeFile( pFont ); - } - - if( ! pFont->m_bHaveVerticalSubstitutedGlyphs ) - memset( pHasSubst, 0, sizeof(bool)*nCharacters ); - else - { - for( int i = 0; i < nCharacters; i++ ) - { - sal_Unicode code = pCharacters[i]; - if( ! pFont->m_pMetrics || - ! ( pFont->m_pMetrics->m_aPages[ code >> 11 ] & ( 1 << ( ( code >> 8 ) & 7 ) ) ) ) - pFont->queryMetricPage( code >> 8, m_pAtoms ); - ::std::hash_map< sal_Unicode, bool >::const_iterator it = pFont->m_pMetrics->m_bVerticalSubstitutions.find( code ); - pHasSubst[i] = it != pFont->m_pMetrics->m_bVerticalSubstitutions.end(); - } - } -} - -// ------------------------------------------------------------------------- - -OUString PrintFontManager::getFontXLFD( fontID nFontID ) const -{ - PrintFont* pFont = getFont( nFontID ); - OUString aRet; - if( pFont ) - { - ByteString aXLFD( getXLFD( pFont ) ); - rtl_TextEncoding aEncoding = aXLFD.GetToken( 6, '-' ).Search( "utf8" ) != STRING_NOTFOUND ? RTL_TEXTENCODING_UTF8 : RTL_TEXTENCODING_ISO_8859_1; - aRet = OStringToOUString( aXLFD, aEncoding ); - } - return aRet; -} - -// ------------------------------------------------------------------------- - -const ::std::list< KernPair >& PrintFontManager::getKernPairs( fontID nFontID, bool bVertical ) const -{ - static ::std::list< KernPair > aEmpty; - - PrintFont* pFont = getFont( nFontID ); - if( ! pFont ) - return aEmpty; - - if( ! pFont->m_pMetrics || ! pFont->m_pMetrics->m_bKernPairsQueried ) - pFont->queryMetricPage( 0, m_pAtoms ); - if( ! pFont->m_pMetrics || ! pFont->m_pMetrics->m_bKernPairsQueried ) - return aEmpty; - return bVertical ? pFont->m_pMetrics->m_aYKernPairs : pFont->m_pMetrics->m_aXKernPairs; -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager::isFontDownloadingAllowed( fontID nFont ) const -{ - static const char* pEnable = getenv( "PSPRINT_ENABLE_TTF_COPYRIGHTAWARENESS" ); - bool bRet = true; - - if( pEnable && *pEnable ) - { - PrintFont* pFont = getFont( nFont ); - if( pFont && pFont->m_eType == fonttype::TrueType ) - { - TrueTypeFontFile* pTTFontFile = static_cast(pFont); - if( pTTFontFile->m_nTypeFlags & TYPEFLAG_INVALID ) - { - TrueTypeFont* pTTFont = NULL; - ByteString aFile = getFontFile( pFont ); - if( OpenTTFontFile( aFile.GetBuffer(), pTTFontFile->m_nCollectionEntry < 0 ? 0 : pTTFontFile->m_nCollectionEntry, &pTTFont ) == SF_OK ) - { - // get type flags - TTGlobalFontInfo aInfo; - GetTTGlobalFontInfo( pTTFont, & aInfo ); - pTTFontFile->m_nTypeFlags = (unsigned int)aInfo.typeFlags; - CloseTTFont( pTTFont ); - } - } - - unsigned int nCopyrightFlags = pTTFontFile->m_nTypeFlags & TYPEFLAG_COPYRIGHT_MASK; - - // font embedding is allowed if either - // no restriction at all (bit 1 clear) - // printing allowed (bit 1 set, bit 2 set ) - bRet = ! ( nCopyrightFlags & 0x02 ) || ( nCopyrightFlags & 0x04 ); - } - } - return bRet; -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager::getMetrics( fontID nFontID, const sal_Unicode* pString, int nLen, CharacterMetric* pArray, bool bVertical ) const -{ - PrintFont* pFont = getFont( nFontID ); - if( ! pFont ) - return false; - - if( ( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) - || ! pFont->m_pMetrics || pFont->m_pMetrics->isEmpty() - ) - { - // might be a font not yet analyzed - if( pFont->m_eType == fonttype::Type1 || pFont->m_eType == fonttype::Builtin ) - pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, false ); - else if( pFont->m_eType == fonttype::TrueType ) - analyzeTrueTypeFile( pFont ); - } - - for( int i = 0; i < nLen; i++ ) - { - if( ! pFont->m_pMetrics || - ! ( pFont->m_pMetrics->m_aPages[ pString[i] >> 11 ] & ( 1 << ( ( pString[i] >> 8 ) & 7 ) ) ) ) - pFont->queryMetricPage( pString[i] >> 8, m_pAtoms ); - pArray[i].width = pArray[i].height = -1; - if( pFont->m_pMetrics ) - { - int effectiveCode = pString[i]; - effectiveCode |= bVertical ? 1 << 16 : 0; - ::std::hash_map< int, CharacterMetric >::const_iterator it = - pFont->m_pMetrics->m_aMetrics.find( effectiveCode ); - // if no vertical metrics are available assume rotated horizontal metrics - if( bVertical && (it == pFont->m_pMetrics->m_aMetrics.end()) ) - it = pFont->m_pMetrics->m_aMetrics.find( pString[i] ); - // the character metrics are in it->second - if( it != pFont->m_pMetrics->m_aMetrics.end() ) - pArray[ i ] = it->second; - } - } - - return true; -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager::getMetrics( fontID nFontID, sal_Unicode minCharacter, sal_Unicode maxCharacter, CharacterMetric* pArray, bool bVertical ) const -{ - PrintFont* pFont = getFont( nFontID ); - if( ! pFont ) - return false; - - if( ( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) - || ! pFont->m_pMetrics || pFont->m_pMetrics->isEmpty() - ) - { - // might be a font not yet analyzed - if( pFont->m_eType == fonttype::Type1 || pFont->m_eType == fonttype::Builtin ) - pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, false ); - else if( pFont->m_eType == fonttype::TrueType ) - analyzeTrueTypeFile( pFont ); - } - - sal_Unicode code = minCharacter; - do - { - if( ! pFont->m_pMetrics || - ! ( pFont->m_pMetrics->m_aPages[ code >> 11 ] & ( 1 << ( ( code >> 8 ) & 7 ) ) ) ) - pFont->queryMetricPage( code >> 8, m_pAtoms ); - pArray[ code - minCharacter ].width = -1; - pArray[ code - minCharacter ].height = -1; - if( pFont->m_pMetrics ) - { - int effectiveCode = code; - effectiveCode |= bVertical ? 1 << 16 : 0; - ::std::hash_map< int, CharacterMetric >::const_iterator it = - pFont->m_pMetrics->m_aMetrics.find( effectiveCode ); - // if no vertical metrics are available assume rotated horizontal metrics - if( bVertical && (it == pFont->m_pMetrics->m_aMetrics.end()) ) - it = pFont->m_pMetrics->m_aMetrics.find( code ); - // the character metrics are in it->second - if( it != pFont->m_pMetrics->m_aMetrics.end() ) - pArray[ code - minCharacter ] = it->second; - } - } while( code++ != maxCharacter ); - - return true; -} - -// ------------------------------------------------------------------------- - -static bool createWriteablePath( const ByteString& rPath ) -{ - bool bSuccess = false; - - if( access( rPath.GetBuffer(), W_OK ) ) - { - int nPos = rPath.SearchBackward( '/' ); - if( nPos != STRING_NOTFOUND ) - while( nPos > 0 && rPath.GetChar( nPos ) == '/' ) - nPos--; - - if( nPos != STRING_NOTFOUND && nPos != 0 && createWriteablePath( rPath.Copy( 0, nPos+1 ) ) ) - { - bSuccess = mkdir( rPath.GetBuffer(), 0777 ) ? false : true; - } - } - else - bSuccess = true; - - return bSuccess; -} - - -// ------------------------------------------------------------------------- - -int PrintFontManager::importFonts( const ::std::list< OString >& rFiles, bool bLinkOnly, ImportFontCallback* pCallback ) -{ - int nSuccess = 0; - - // find a directory with write access - rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - bool bCanWrite = false; - int nDirID = 0; - INetURLObject aDir; - for( ::std::list< int >::const_iterator dir_it = m_aPrivateFontDirectories.begin(); - ! bCanWrite && dir_it != m_aPrivateFontDirectories.end(); ++dir_it ) - { - // check if we can create files in that directory - ByteString aDirPath = getDirectory( *dir_it ); - if( createWriteablePath( aDirPath ) ) - { - aDir = INetURLObject( OStringToOUString( aDirPath, aEncoding ), INET_PROT_FILE, INetURLObject::ENCODE_ALL ); - nDirID = *dir_it; - bCanWrite = true; - } - } - if( bCanWrite ) - { - for( ::std::list< OString >::const_iterator font_it = rFiles.begin(); - font_it != rFiles.end(); ++font_it ) - { - INetURLObject aFrom( OStringToOUString( *font_it, aEncoding ), INET_PROT_FILE, INetURLObject::ENCODE_ALL ); - INetURLObject aTo( aDir ); - aTo.Append( aFrom.GetName() ); - - if( pCallback ) - pCallback->progress( aTo.PathToFileName() ); - - if( pCallback && pCallback->isCanceled() ) - break; - - if( ! access( ByteString( String(aTo.PathToFileName()), aEncoding ).GetBuffer(), F_OK ) ) - { - if( ! ( pCallback ? pCallback->queryOverwriteFile( aTo.PathToFileName() ) : false ) ) - continue; - } - // look for afm if necessary - OUString aAfmCopied; - FileBase::RC nError; - if( aFrom.getExtension().equalsIgnoreAsciiCaseAscii( "pfa" ) || - aFrom.getExtension().equalsIgnoreAsciiCaseAscii( "pfb" ) ) - { - INetURLObject aFromAfm( aFrom ); - aFromAfm.setExtension( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "afm" ) ) ); - if( access( ByteString( String(aFromAfm.PathToFileName()), aEncoding ).GetBuffer(), F_OK ) ) - { - aFromAfm.setExtension( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AFM" ) ) ); - if( access( ByteString( String(aFromAfm.PathToFileName()), aEncoding ).GetBuffer(), F_OK ) ) - { - aFromAfm.removeSegment(); - aFromAfm.Append( String( RTL_CONSTASCII_USTRINGPARAM( "afm" ) ) ); - aFromAfm.Append( aTo.GetName() ); - aFromAfm.setExtension( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "afm" ) ) ); - if( access( ByteString( String(aFromAfm.PathToFileName()), aEncoding ).GetBuffer(), F_OK ) ) - { - aFromAfm.setExtension( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AFM" ) ) ); - if( access( ByteString( String(aFromAfm.PathToFileName()), aEncoding ).GetBuffer(), F_OK ) ) - { - // give up - if( pCallback ) - pCallback->importFontFailed( aTo.PathToFileName(), ImportFontCallback::NoAfmMetric ); - continue; - } - } - } - } - INetURLObject aToAfm( aTo ); - aToAfm.setExtension( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "afm" ) ) ); - OUString aFromPath, aToPath; - if( bLinkOnly ) - { - ByteString aLinkFromPath( String(aFromAfm.PathToFileName()), - aEncoding ); - ByteString aLinkToPath( String(aToAfm.PathToFileName()), - aEncoding ); - nError = (FileBase::RC)symlink( aLinkFromPath.GetBuffer(), aLinkToPath.GetBuffer() ); - } - else - nError = File::copy( aFromAfm.GetMainURL(INetURLObject::DECODE_TO_IURI), aToAfm.GetMainURL(INetURLObject::DECODE_TO_IURI) ); - if( nError ) - { - if( pCallback ) - pCallback->importFontFailed( aTo.PathToFileName(), ImportFontCallback::AfmCopyFailed ); - continue; - } - aAfmCopied = aToPath; - } - if( bLinkOnly ) - { - ByteString aFromPath( String(aFrom.PathToFileName()), - aEncoding ); - ByteString aToPath( String(aTo.PathToFileName()), aEncoding ); - nError = (FileBase::RC)symlink( aFromPath.GetBuffer(), - aToPath.GetBuffer() ); - } - else - nError = File::copy( aFrom.GetMainURL(INetURLObject::DECODE_TO_IURI), aTo.GetMainURL(INetURLObject::DECODE_TO_IURI) ); - // copy font file - if( nError ) - { - if( aAfmCopied.getLength() ) - File::remove( aAfmCopied ); - if( pCallback ) - pCallback->importFontFailed( aTo.PathToFileName(), ImportFontCallback::FontCopyFailed ); - continue; - } - - ::std::list< PrintFont* > aNewFonts; - ::std::list< PrintFont* >::iterator it; - if( analyzeFontFile( nDirID, OUStringToOString( aTo.GetName(), aEncoding ), ::std::list(), aNewFonts ) ) - { - // remove all fonts for the same file - // discarding their font ids - ::std::hash_map< fontID, PrintFont* >::iterator current, next; - current = m_aFonts.begin(); - OString aFileName( OUStringToOString( aTo.GetName(), aEncoding ) ); - while( current != m_aFonts.end() ) - { - bool bRemove = false; - switch( current->second->m_eType ) - { - case fonttype::Type1: - if( static_cast(current->second)->m_aFontFile == aFileName ) - bRemove = true; - break; - case fonttype::TrueType: - if( static_cast(current->second)->m_aFontFile == aFileName ) - bRemove = true; - break; - default: break; - } - if( bRemove ) - { - next = current; - ++next; - m_aFontFileToFontID[ aFileName ].erase( current->first ); - delete current->second; - m_aFonts.erase( current ); - current = next; - } - else - ++current; - } - - DBG_ASSERT( !findFontFileID( nDirID, aFileName ), "not all fonts removed for file" ); - - nSuccess++; - for( it = aNewFonts.begin(); it != aNewFonts.end(); ++it ) - { - m_aFontFileToFontID[ aFileName ].insert( m_nNextFontID ); - m_aFonts[ m_nNextFontID++ ] = *it; - m_pFontCache->updateFontCacheEntry( *it, false ); - } - } - } - - m_pFontCache->updateDirTimestamp( nDirID ); - m_pFontCache->flush(); - } - else if( pCallback ) - pCallback->importFontsFailed( ImportFontCallback::NoWritableDirectory ); - - return nSuccess; -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager::checkImportPossible() const -{ - bool bSuccess = false; - - // find a directory with write access - ByteString aDir; - for( std::list< int >::const_iterator dir_it = m_aPrivateFontDirectories.begin(); - dir_it != m_aPrivateFontDirectories.end(); ++dir_it ) - { - aDir = getDirectory( *dir_it ); - if( createWriteablePath( aDir ) ) - { - bSuccess = true; - break; - } - } - -#if OSL_DEBUG_LEVEL > 1 - if( bSuccess ) - fprintf( stderr, "found writable %s\n", aDir.GetBuffer() ); -#endif - - return bSuccess; -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager::checkChangeFontPropertiesPossible( fontID /*nFontID*/ ) const -{ - // since font properties are changed in the font cache file only nowadays - // they can always be changed - return true; -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager::changeFontProperties( fontID nFontID, const ::rtl::OUString& rXLFD ) -{ - ByteString aXLFD( OUStringToOString( rXLFD, RTL_TEXTENCODING_UTF8 ) ); - ByteString aAddStyle = aXLFD.GetToken( '-', 6 ); - if( aAddStyle.Search( "utf8" ) == STRING_NOTFOUND ) - { - aAddStyle.Append( aAddStyle.Len() ? ";utf8" : "utf8" ); - aXLFD.SetToken( 6, ';', aAddStyle ); - } - PrintFont* pFont = getFont( nFontID ); - std::list< OString > aDummyList; - aDummyList.push_back( aXLFD ); - getFontAttributesFromXLFD( pFont, aDummyList ); - pFont->m_bUserOverride = true; - m_pFontCache->updateFontCacheEntry( pFont, true ); - - return true; -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager:: -getImportableFontProperties( - const OString& rFile, - ::std::list< FastPrintFontInfo >& rFontProps - ) -{ - rFontProps.clear(); - int nIndex = rFile.lastIndexOf( '/' ); - OString aDir, aFile( rFile.copy( nIndex+1 ) ); - if( nIndex != -1 ) - aDir = rFile.copy( 0, nIndex ); - int nDirID = getDirectoryAtom( aDir, true ); - ::std::list< PrintFont* > aFonts; - bool bRet = analyzeFontFile( nDirID, aFile, ::std::list(), aFonts ); - while( aFonts.begin() != aFonts.end() ) - { - PrintFont* pFont = aFonts.front(); - aFonts.pop_front(); - FastPrintFontInfo aInfo; - fillPrintFontInfo( pFont, aInfo ); - rFontProps.push_back( aInfo ); - delete pFont; - } - return bRet; -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager::getFileDuplicates( fontID nFont, ::std::list< fontID >& rFonts ) const -{ - bool bRet = false; - - rFonts.clear(); - - PrintFont* pSearchFont = getFont( nFont ); - if( ! pSearchFont || - pSearchFont->m_eType != fonttype::TrueType || - static_cast(pSearchFont)->m_nCollectionEntry == -1 - ) - return false; - - OString aFile( getFontFileSysPath( nFont ) ); - if( ! aFile.getLength() ) - return false; - - for( ::std::hash_map< fontID, PrintFont* >::const_iterator it = m_aFonts.begin(); it != m_aFonts.end(); ++it ) - { - if( nFont != it->first ) - { - OString aCompFile( getFontFile( it->second ) ); - if( aCompFile == aFile ) - { - rFonts.push_back( it->first ); - bRet = true; - } - } - } - return bRet; -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager::removeFonts( const ::std::list< fontID >& rFonts ) -{ - bool bRet = true; - ::std::list< fontID > aDuplicates; - for( ::std::list< fontID >::const_iterator it = rFonts.begin(); it != rFonts.end(); ++it ) - { - ::std::hash_map< fontID, PrintFont* >::const_iterator haveFont = m_aFonts.find( *it ); - if( haveFont == m_aFonts.end() ) - continue; - - PrintFont* pFont = haveFont->second; - bool bRemoveDuplicates = getFileDuplicates( *it, aDuplicates ); - ByteString aFile( getFontFile( pFont ) ); - if( aFile.Len() ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "try unlink( \"%s\" ) ... ", aFile.GetBuffer() ); -#endif - if( unlink( aFile.GetBuffer() ) ) - { - bRet = false; -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "failed\n" ); -#endif - continue; - } -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "succeeded\n" ); -#endif - OString aAfm( getAfmFile( pFont ) ); - if( aAfm.getLength() ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "unlink( \"%s\" )\n", aAfm.getStr() ); -#endif - unlink( aAfm.getStr() ); - } - m_aFonts.erase( *it ); - delete pFont; - if( bRemoveDuplicates ) - { - for( ::std::list< fontID >::iterator dup = aDuplicates.begin(); dup != aDuplicates.end(); ++dup ) - { - m_aFontFileToFontID[ aFile ].erase( *dup ); - PrintFont* pDup = m_aFonts[ *dup ]; - m_aFonts.erase( *dup ); - delete pDup; - } - } - } - } - return bRet; -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager::isPrivateFontFile( fontID nFont ) const -{ - bool bRet = false; - int nDirID = -1; - PrintFont* pFont = getFont( nFont ); - if( pFont ) - { - switch( pFont->m_eType ) - { - case fonttype::Type1: nDirID = static_cast< Type1FontFile* >(pFont)->m_nDirectory;break; - case fonttype::TrueType: nDirID = static_cast< TrueTypeFontFile* >(pFont)->m_nDirectory;break; - default: break; - } - } - if( nDirID != -1 ) - { - for( ::std::list< int >::const_iterator it = m_aPrivateFontDirectories.begin(); it != m_aPrivateFontDirectories.end(); ++it ) - { - if( nDirID == *it ) - { - bRet = true; - break; - } - } - } - return bRet; -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager::getAlternativeFamilyNames( fontID nFont, ::std::list< OUString >& rNames ) const -{ - rNames.clear(); - - PrintFont* pFont = getFont( nFont ); - if( pFont && pFont->m_eType == fonttype::TrueType ) - { - TrueTypeFontFile* pTTFontFile = static_cast< TrueTypeFontFile* >(pFont); - ByteString aFile( getFontFile( pFont ) ); - TrueTypeFont* pTTFont; - if( OpenTTFontFile( aFile.GetBuffer(), pTTFontFile->m_nCollectionEntry < 0 ? 0 : pTTFontFile->m_nCollectionEntry, &pTTFont ) == SF_OK ) - { - NameRecord* pNameRecords = NULL; - int nNameRecords = GetTTNameRecords( pTTFont, &pNameRecords ); - for( int i = 0; i < nNameRecords; i++ ) - { - if( pNameRecords[i].nameID != 1 ) // family name - continue; - - OUString aFamily( convertTrueTypeName( pNameRecords+i ) ); - if( aFamily.getLength() - && - m_pAtoms->getAtom( ATOM_FAMILYNAME, aFamily, sal_True ) != pFont->m_nFamilyName - ) - { - rNames.push_back( aFamily ); - } - } - - if( nNameRecords ) - DisposeNameRecords( pNameRecords, nNameRecords ); - CloseTTFont( pTTFont ); - } - } - return rNames.begin() != rNames.end(); -} - -// ------------------------------------------------------------------------- - -// TODO: move most of this stuff into the central font-subsetting code -bool PrintFontManager::createFontSubset( - FontSubsetInfo& rInfo, - fontID nFont, - const OUString& rOutFile, - sal_Int32* pGlyphIDs, - sal_uInt8* pNewEncoding, - sal_Int32* pWidths, - int nGlyphs, - bool bVertical - ) -{ - PrintFont* pFont = getFont( nFont ); - if( !pFont ) - return false; - - switch( pFont->m_eType ) - { - case psp::fonttype::TrueType: rInfo.m_nFontType = FontSubsetInfo::SFNT_TTF; break; - case psp::fonttype::Type1: rInfo.m_nFontType = FontSubsetInfo::ANY_TYPE1; break; - default: - return false; - } - // TODO: remove when Type1 subsetting gets implemented - if( pFont->m_eType != fonttype::TrueType ) - return false; - - // reshuffle array of requested glyphs to make sure glyph0==notdef - sal_uInt8 pEnc[256]; - sal_uInt16 pGID[256]; - sal_uInt8 pOldIndex[256]; - memset( pEnc, 0, sizeof( pEnc ) ); - memset( pGID, 0, sizeof( pGID ) ); - memset( pOldIndex, 0, sizeof( pOldIndex ) ); - if( nGlyphs > 256 ) - return false; - int nChar = 1; - for( int i = 0; i < nGlyphs; i++ ) - { - if( pNewEncoding[i] == 0 ) - { - pOldIndex[ 0 ] = i; - } - else - { - DBG_ASSERT( !(pGlyphIDs[i] & 0x007f0000), "overlong glyph id" ); - DBG_ASSERT( (int)pNewEncoding[i] < nGlyphs, "encoding wrong" ); - DBG_ASSERT( pEnc[pNewEncoding[i]] == 0 && pGID[pNewEncoding[i]] == 0, "duplicate encoded glyph" ); - pEnc[ pNewEncoding[i] ] = pNewEncoding[i]; - pGID[ pNewEncoding[i] ] = (sal_uInt16)pGlyphIDs[ i ]; - pOldIndex[ pNewEncoding[i] ] = i; - nChar++; - } - } - nGlyphs = nChar; // either input value or increased by one - - // prepare system name for read access for subset source file - // TODO: since this file is usually already mmapped there is no need to open it again - const ByteString aFromFile = getFontFile( pFont ); - - TrueTypeFont* pTTFont = NULL; // TODO: rename to SfntFont - TrueTypeFontFile* pTTFontFile = static_cast< TrueTypeFontFile* >(pFont); - if( OpenTTFontFile( aFromFile.GetBuffer(), pTTFontFile->m_nCollectionEntry < 0 ? 0 : pTTFontFile->m_nCollectionEntry, &pTTFont ) != SF_OK ) - return false; - - // prepare system name for write access for subset file target - OUString aSysPath; - if( osl_File_E_None != osl_getSystemPathFromFileURL( rOutFile.pData, &aSysPath.pData ) ) - return false; - const rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - const ByteString aToFile( OUStringToOString( aSysPath, aEncoding ) ); - - // do CFF subsetting if possible - int nCffLength = 0; - const sal_uInt8* pCffBytes = NULL; - if( GetSfntTable( pTTFont, O_CFF, &pCffBytes, &nCffLength ) ) - { - rInfo.LoadFont( FontSubsetInfo::CFF_FONT, pCffBytes, nCffLength ); -#if 1 // TODO: remove 16bit->long conversion when related methods handle non-16bit glyphids - long aRequestedGlyphs[256]; - for( int i = 0; i < nGlyphs; ++i ) - aRequestedGlyphs[i] = pGID[i]; -#endif - // create subset file at requested path - FILE* pOutFile = fopen( aToFile.GetBuffer(), "wb" ); - // create font subset - const char* pGlyphSetName = NULL; // TODO: better name? - const bool bOK = rInfo.CreateFontSubset( - FontSubsetInfo::TYPE1_PFB, - pOutFile, pGlyphSetName, - aRequestedGlyphs, pEnc, nGlyphs, pWidths ); - fclose( pOutFile ); - // cleanup before early return - CloseTTFont( pTTFont ); - return bOK; - } - - // do TTF->Type42 or Type3 subsetting - // fill in font info - psp::PrintFontInfo aFontInfo; - if( ! getFontInfo( nFont, aFontInfo ) ) - return false; - - rInfo.m_nAscent = aFontInfo.m_nAscend; - rInfo.m_nDescent = aFontInfo.m_nDescend; - rInfo.m_aPSName = getPSName( nFont ); - - int xMin, yMin, xMax, yMax; - getFontBoundingBox( nFont, xMin, yMin, xMax, yMax ); - rInfo.m_aFontBBox = Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) ); - rInfo.m_nCapHeight = yMax; // Well ... - - // fill in glyph advance widths - TTSimpleGlyphMetrics* pMetrics = GetTTSimpleGlyphMetrics( pTTFont, - pGID, - nGlyphs, - bVertical ? 1 : 0 ); - if( pMetrics ) - { - for( int i = 0; i < nGlyphs; i++ ) - pWidths[pOldIndex[i]] = pMetrics[i].adv; - free( pMetrics ); - } - else - { - CloseTTFont( pTTFont ); - return false; - } - - bool bSuccess = ( SF_OK == CreateTTFromTTGlyphs( pTTFont, - aToFile.GetBuffer(), - pGID, - pEnc, - nGlyphs, - 0, - NULL, - 0 ) ); - CloseTTFont( pTTFont ); - - return bSuccess; -} - -void PrintFontManager::getGlyphWidths( fontID nFont, - bool bVertical, - std::vector< sal_Int32 >& rWidths, - std::map< sal_Unicode, sal_uInt32 >& rUnicodeEnc ) -{ - PrintFont* pFont = getFont( nFont ); - if( !pFont || - (pFont->m_eType != fonttype::TrueType && pFont->m_eType != fonttype::Type1) ) - return; - if( pFont->m_eType == fonttype::TrueType ) - { - TrueTypeFont* pTTFont = NULL; - TrueTypeFontFile* pTTFontFile = static_cast< TrueTypeFontFile* >(pFont); - ByteString aFromFile = getFontFile( pFont ); - if( OpenTTFontFile( aFromFile.GetBuffer(), pTTFontFile->m_nCollectionEntry < 0 ? 0 : pTTFontFile->m_nCollectionEntry, &pTTFont ) != SF_OK ) - return; - int nGlyphs = GetTTGlyphCount( pTTFont ); - if( nGlyphs > 0 ) - { - rWidths.resize(nGlyphs); - std::vector aGlyphIds(nGlyphs); - for( int i = 0; i < nGlyphs; i++ ) - aGlyphIds[i] = sal_uInt16(i); - TTSimpleGlyphMetrics* pMetrics = GetTTSimpleGlyphMetrics( pTTFont, - &aGlyphIds[0], - nGlyphs, - bVertical ? 1 : 0 ); - if( pMetrics ) - { - for( int i = 0; i< nGlyphs; i++ ) - rWidths[i] = pMetrics[i].adv; - free( pMetrics ); - rUnicodeEnc.clear(); - } - - // fill the unicode map - // TODO: isn't this map already available elsewhere in the fontmanager? - const sal_uInt8* pCmapData = NULL; - int nCmapSize = 0; - if( GetSfntTable( pTTFont, O_cmap, &pCmapData, &nCmapSize ) ) - { - CmapResult aCmapResult; - if( ParseCMAP( pCmapData, nCmapSize, aCmapResult ) ) - { - const ImplFontCharMap aCharMap( aCmapResult ); - for( sal_uInt32 cOld = 0;;) - { - // get next unicode covered by font - const sal_uInt32 c = aCharMap.GetNextChar( cOld ); - if( c == cOld ) - break; - cOld = c; -#if 1 // TODO: remove when sal_Unicode covers all of unicode - if( c > (sal_Unicode)~0 ) - break; -#endif - // get the matching glyph index - const sal_uInt32 nGlyphId = aCharMap.GetGlyphIndex( c ); - // update the requested map - rUnicodeEnc[ (sal_Unicode)c ] = nGlyphId; - } - } - } - } - CloseTTFont( pTTFont ); - } - else if( pFont->m_eType == fonttype::Type1 ) - { - if( ! pFont->m_aEncodingVector.size() ) - pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, true, true ); - if( pFont->m_pMetrics ) - { - rUnicodeEnc.clear(); - rWidths.clear(); - rWidths.reserve( pFont->m_pMetrics->m_aMetrics.size() ); - for( std::hash_map< int, CharacterMetric >::const_iterator it = - pFont->m_pMetrics->m_aMetrics.begin(); - it != pFont->m_pMetrics->m_aMetrics.end(); ++it ) - { - if( (it->first & 0x00010000) == 0 || bVertical ) - { - rUnicodeEnc[ sal_Unicode(it->first & 0x0000ffff) ] = sal_uInt32(rWidths.size()); - rWidths.push_back( it->second.width ); - } - } - } - } -} - -// ------------------------------------------------------------------------- - -const std::map< sal_Unicode, sal_Int32 >* PrintFontManager::getEncodingMap( fontID nFont, const std::map< sal_Unicode, rtl::OString >** pNonEncoded ) const -{ - PrintFont* pFont = getFont( nFont ); - if( !pFont || - (pFont->m_eType != fonttype::Type1 && pFont->m_eType != fonttype::Builtin) - ) - return NULL; - - if( ! pFont->m_aEncodingVector.size() ) - pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, true, true ); - - if( pNonEncoded ) - *pNonEncoded = pFont->m_aNonEncoded.size() ? &pFont->m_aNonEncoded : NULL; - - return pFont->m_aEncodingVector.size() ? &pFont->m_aEncodingVector : NULL; -} - -// ------------------------------------------------------------------------- - -std::list< OString > PrintFontManager::getAdobeNameFromUnicode( sal_Unicode aChar ) const -{ - std::pair< std::hash_multimap< sal_Unicode, rtl::OString >::const_iterator, - std::hash_multimap< sal_Unicode, rtl::OString >::const_iterator > range - = m_aUnicodeToAdobename.equal_range( aChar ); - - std::list< OString > aRet; - for( ; range.first != range.second; ++range.first ) - aRet.push_back( range.first->second ); - - if( aRet.begin() == aRet.end() && aChar != 0 ) - { - sal_Char aBuf[8]; - sal_Int32 nChars = snprintf( (char*)aBuf, sizeof( aBuf ), "uni%.4hX", aChar ); - aRet.push_back( OString( aBuf, nChars ) ); - } - - return aRet; -} - -// ------------------------------------------------------------------------- -std::list< sal_Unicode > PrintFontManager::getUnicodeFromAdobeName( const rtl::OString& rName ) const -{ - std::pair< std::hash_multimap< rtl::OString, sal_Unicode, rtl::OStringHash >::const_iterator, - std::hash_multimap< rtl::OString, sal_Unicode, rtl::OStringHash >::const_iterator > range - = m_aAdobenameToUnicode.equal_range( rName ); - - std::list< sal_Unicode > aRet; - for( ; range.first != range.second; ++range.first ) - aRet.push_back( range.first->second ); - - if( aRet.begin() == aRet.end() ) - { - if( rName.getLength() == 7 && rName.indexOf( "uni" ) == 0 ) - { - sal_Unicode aCode = (sal_Unicode)rName.copy( 3 ).toInt32( 16 ); - aRet.push_back( aCode ); - } - } - - return aRet; -} - -// ------------------------------------------------------------------------- -namespace -{ - OUString getString( const Any& rAny ) - { - OUString aStr; - rAny >>= aStr; - return aStr; - } - bool getBool( const Any& rAny ) - { - sal_Bool bBool = sal_False; - rAny >>= bBool; - return static_cast(bBool); - } - sal_Int32 getInt( const Any& rAny ) - { - sal_Int32 n = 0; - rAny >>= n; - return n; - } -} -bool PrintFontManager::readOverrideMetrics() -{ - if( ! m_aOverrideFonts.empty() ) - return false; - - Reference< XMultiServiceFactory > xFact( comphelper::getProcessServiceFactory() ); - if( !xFact.is() ) - return false; - Reference< XMaterialHolder > xMat( - xFact->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.psprint.CompatMetricOverride" ) ) ), - UNO_QUERY ); - if( !xMat.is() ) - return false; - - Any aAny( xMat->getMaterial() ); - Sequence< Any > aOverrideFonts; - if( ! (aAny >>= aOverrideFonts ) ) - return false; - sal_Int32 nFonts = aOverrideFonts.getLength(); - for( sal_Int32 i = 0; i < nFonts; i++ ) - { - Sequence< NamedValue > aMetrics; - if( ! (aOverrideFonts.getConstArray()[i] >>= aMetrics) ) - continue; - BuiltinFont* pFont = new BuiltinFont(); - pFont->m_nDirectory = 0; - pFont->m_bUserOverride = false; - pFont->m_pMetrics = new PrintFontMetrics; - memset( pFont->m_pMetrics->m_aPages, 0xff, sizeof( pFont->m_pMetrics->m_aPages ) ); - pFont->m_pMetrics->m_bKernPairsQueried = true; - sal_Int32 nProps = aMetrics.getLength(); - const NamedValue* pProps = aMetrics.getConstArray(); - for( sal_Int32 n = 0; n < nProps; n++ ) - { - if( pProps[n].Name.equalsAscii( "FamilyName" ) ) - pFont->m_nFamilyName = m_pAtoms->getAtom( ATOM_FAMILYNAME, - getString(pProps[n].Value), - sal_True ); - else if( pProps[n].Name.equalsAscii( "PSName" ) ) - pFont->m_nPSName = m_pAtoms->getAtom( ATOM_PSNAME, - getString(pProps[n].Value), - sal_True ); - else if( pProps[n].Name.equalsAscii( "StyleName" ) ) - pFont->m_aStyleName = getString(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "Italic" ) ) - pFont->m_eItalic = static_cast(getInt(pProps[n].Value)); - else if( pProps[n].Name.equalsAscii( "Width" ) ) - pFont->m_eWidth = static_cast(getInt(pProps[n].Value)); - else if( pProps[n].Name.equalsAscii( "Weight" ) ) - pFont->m_eWeight = static_cast(getInt(pProps[n].Value)); - else if( pProps[n].Name.equalsAscii( "Pitch" ) ) - pFont->m_ePitch = static_cast(getInt(pProps[n].Value)); - else if( pProps[n].Name.equalsAscii( "Encoding" ) ) - pFont->m_aEncoding = static_cast(getInt(pProps[n].Value)); - else if( pProps[n].Name.equalsAscii( "FontEncodingOnly" ) ) - pFont->m_bFontEncodingOnly = getBool(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "GlobalMetricXWidth" ) ) - pFont->m_aGlobalMetricX.width = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "GlobalMetricXHeight" ) ) - pFont->m_aGlobalMetricX.height = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "GlobalMetricYWidth" ) ) - pFont->m_aGlobalMetricY.width = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "GlobalMetricYHeight" ) ) - pFont->m_aGlobalMetricY.height = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "Ascend" ) ) - pFont->m_nAscend = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "Descend" ) ) - pFont->m_nDescend = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "Leading" ) ) - pFont->m_nLeading = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "XMin" ) ) - pFont->m_nXMin = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "YMin" ) ) - pFont->m_nYMin = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "XMax" ) ) - pFont->m_nXMax = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "YMax" ) ) - pFont->m_nYMax = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "VerticalSubstitutes" ) ) - pFont->m_bHaveVerticalSubstitutedGlyphs = getBool(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "EncodingVector" ) ) - { - Sequence< NamedValue > aEncoding; - pProps[n].Value >>= aEncoding; - sal_Int32 nEnc = aEncoding.getLength(); - const NamedValue* pEnc = aEncoding.getConstArray(); - for( sal_Int32 m = 0; m < nEnc; m++ ) - { - sal_Unicode cCode = *pEnc[m].Name.getStr(); - sal_Int32 nGlyph = getInt(pEnc[m].Value); - pFont->m_aEncodingVector[ cCode ] = nGlyph; - } - } - else if( pProps[n].Name.equalsAscii( "NonEncoded" ) ) - { - Sequence< NamedValue > aEncoding; - pProps[n].Value >>= aEncoding; - sal_Int32 nEnc = aEncoding.getLength(); - const NamedValue* pEnc = aEncoding.getConstArray(); - for( sal_Int32 m = 0; m < nEnc; m++ ) - { - sal_Unicode cCode = *pEnc[m].Name.getStr(); - OUString aGlyphName( getString(pEnc[m].Value) ); - pFont->m_aNonEncoded[ cCode ] = OUStringToOString(aGlyphName,RTL_TEXTENCODING_ASCII_US); - } - } - else if( pProps[n].Name.equalsAscii( "CharacterMetrics" ) ) - { - // fill pFont->m_pMetrics->m_aMetrics - // expect triples of int: int -> CharacterMetric.{ width, height } - Sequence< sal_Int32 > aSeq; - pProps[n].Value >>= aSeq; - sal_Int32 nInts = aSeq.getLength(); - const sal_Int32* pInts = aSeq.getConstArray(); - for( sal_Int32 m = 0; m < nInts; m+=3 ) - { - pFont->m_pMetrics->m_aMetrics[ pInts[m] ].width = static_cast(pInts[m+1]); - pFont->m_pMetrics->m_aMetrics[ pInts[m] ].height = static_cast(pInts[m+2]); - } - } - else if( pProps[n].Name.equalsAscii( "XKernPairs" ) ) - { - // fill pFont->m_pMetrics->m_aXKernPairs - // expection name: value: ((height << 16)| width) - Sequence< NamedValue > aKern; - pProps[n].Value >>= aKern; - KernPair aPair; - const NamedValue* pVals = aKern.getConstArray(); - int nPairs = aKern.getLength(); - for( int m = 0; m < nPairs; m++ ) - { - if( pVals[m].Name.getLength() == 2 ) - { - aPair.first = pVals[m].Name.getStr()[0]; - aPair.second = pVals[m].Name.getStr()[1]; - sal_Int32 nKern = getInt( pVals[m].Value ); - aPair.kern_x = static_cast(nKern & 0xffff); - aPair.kern_y = static_cast((sal_uInt32(nKern) >> 16) & 0xffff); - pFont->m_pMetrics->m_aXKernPairs.push_back( aPair ); - } - } - } - } - // sanity check - if( pFont->m_nPSName && - pFont->m_nFamilyName && - ! pFont->m_pMetrics->m_aMetrics.empty() ) - { - m_aOverrideFonts.push_back( m_nNextFontID ); - m_aFonts[ m_nNextFontID++ ] = pFont; - } - else - { - DBG_ASSERT( 0, "override font failed" ); - delete pFont; - } - } - - return true; -} diff --git a/vcl/unx/source/fontmanager/helper.cxx b/vcl/unx/source/fontmanager/helper.cxx deleted file mode 100644 index 05213a52597c..000000000000 --- a/vcl/unx/source/fontmanager/helper.cxx +++ /dev/null @@ -1,404 +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_vcl.hxx" - -#include -#include -#include -#include - -#include "vcl/helper.hxx" -#include "vcl/ppdparser.hxx" -#include "tools/string.hxx" -#include "tools/urlobj.hxx" -#include "osl/file.hxx" -#include "osl/process.h" -#include "rtl/bootstrap.hxx" - -using namespace rtl; - -namespace psp { - -OUString getOfficePath( enum whichOfficePath ePath ) -{ - static OUString aNetPath; - static OUString aUserPath; - static OUString aConfigPath; - static OUString aEmpty; - static bool bOnce = false; - - if( ! bOnce ) - { - bOnce = true; - OUString aIni; - Bootstrap::get( OUString( RTL_CONSTASCII_USTRINGPARAM( "BRAND_BASE_DIR" ) ), aIni ); - aIni += OUString( RTL_CONSTASCII_USTRINGPARAM( "/program/" SAL_CONFIGFILE( "bootstrap" ) ) ); - Bootstrap aBootstrap( aIni ); - aBootstrap.getFrom( OUString( RTL_CONSTASCII_USTRINGPARAM( "CustomDataUrl" ) ), aConfigPath ); - aBootstrap.getFrom( OUString( RTL_CONSTASCII_USTRINGPARAM( "BaseInstallation" ) ), aNetPath ); - aBootstrap.getFrom( OUString( RTL_CONSTASCII_USTRINGPARAM( "UserInstallation" ) ), aUserPath ); - OUString aUPath = aUserPath; - - if( ! aConfigPath.compareToAscii( "file://", 7 ) ) - { - OUString aSysPath; - if( osl_getSystemPathFromFileURL( aConfigPath.pData, &aSysPath.pData ) == osl_File_E_None ) - aConfigPath = aSysPath; - } - if( ! aNetPath.compareToAscii( "file://", 7 ) ) - { - OUString aSysPath; - if( osl_getSystemPathFromFileURL( aNetPath.pData, &aSysPath.pData ) == osl_File_E_None ) - aNetPath = aSysPath; - } - if( ! aUserPath.compareToAscii( "file://", 7 ) ) - { - OUString aSysPath; - if( osl_getSystemPathFromFileURL( aUserPath.pData, &aSysPath.pData ) == osl_File_E_None ) - aUserPath = aSysPath; - } - // ensure user path exists - aUPath += OUString( RTL_CONSTASCII_USTRINGPARAM( "/user/psprint" ) ); - #if OSL_DEBUG_LEVEL > 1 - oslFileError eErr = - #endif - osl_createDirectoryPath( aUPath.pData, NULL, NULL ); - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "try to create \"%s\" = %d\n", OUStringToOString( aUPath, RTL_TEXTENCODING_UTF8 ).getStr(), eErr ); - #endif - } - - switch( ePath ) - { - case ConfigPath: return aConfigPath; - case NetPath: return aNetPath; - case UserPath: return aUserPath; - } - return aEmpty; -} - -static OString getEnvironmentPath( const char* pKey ) -{ - OString aPath; - - const char* pValue = getenv( pKey ); - if( pValue && *pValue ) - { - aPath = OString( pValue ); - } - return aPath; -} - -} // namespace psp - -void psp::getPrinterPathList( std::list< OUString >& rPathList, const char* pSubDir ) -{ - rPathList.clear(); - rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - - OUStringBuffer aPathBuffer( 256 ); - - // append net path - aPathBuffer.append( getOfficePath( psp::NetPath ) ); - if( aPathBuffer.getLength() ) - { - aPathBuffer.appendAscii( "/share/psprint" ); - if( pSubDir ) - { - aPathBuffer.append( sal_Unicode('/') ); - aPathBuffer.appendAscii( pSubDir ); - } - rPathList.push_back( aPathBuffer.makeStringAndClear() ); - } - // append user path - aPathBuffer.append( getOfficePath( psp::UserPath ) ); - if( aPathBuffer.getLength() ) - { - aPathBuffer.appendAscii( "/user/psprint" ); - if( pSubDir ) - { - aPathBuffer.append( sal_Unicode('/') ); - aPathBuffer.appendAscii( pSubDir ); - } - rPathList.push_back( aPathBuffer.makeStringAndClear() ); - } - - OString aPath( getEnvironmentPath("SAL_PSPRINT") ); - sal_Int32 nIndex = 0; - do - { - OString aDir( aPath.getToken( 0, ':', nIndex ) ); - if( ! aDir.getLength() ) - continue; - - if( pSubDir ) - { - aDir += "/"; - aDir += pSubDir; - } - struct stat aStat; - if( stat( aDir.getStr(), &aStat ) || ! S_ISDIR( aStat.st_mode ) ) - continue; - - rPathList.push_back( OStringToOUString( aDir, aEncoding ) ); - } while( nIndex != -1 ); - - #ifdef SYSTEM_PPD_DIR - if( pSubDir && rtl_str_compare( pSubDir, PRINTER_PPDDIR ) == 0 ) - { - rPathList.push_back( rtl::OStringToOUString( rtl::OString( SYSTEM_PPD_DIR ), RTL_TEXTENCODING_UTF8 ) ); - } - #endif - - if( rPathList.empty() ) - { - // last resort: next to program file (mainly for setup) - OUString aExe; - if( osl_getExecutableFile( &aExe.pData ) == osl_Process_E_None ) - { - INetURLObject aDir( aExe ); - aDir.removeSegment(); - aExe = aDir.GetMainURL( INetURLObject::NO_DECODE ); - OUString aSysPath; - if( osl_getSystemPathFromFileURL( aExe.pData, &aSysPath.pData ) == osl_File_E_None ) - { - rPathList.push_back( aSysPath ); - } - } - } -} - -OUString psp::getFontPath() -{ - static OUString aPath; - - if( ! aPath.getLength() ) - { - OUStringBuffer aPathBuffer( 512 ); - - OUString aConfigPath( getOfficePath( psp::ConfigPath ) ); - OUString aNetPath( getOfficePath( psp::NetPath ) ); - OUString aUserPath( getOfficePath( psp::UserPath ) ); - if( aConfigPath.getLength() ) - { - // #i53530# Path from CustomDataUrl will completely - // replace net and user paths if the path exists - aPathBuffer.append(aConfigPath); - aPathBuffer.appendAscii("/share/fonts"); - // check existance of config path - struct stat aStat; - if( 0 != stat( OUStringToOString( aPathBuffer.makeStringAndClear(), osl_getThreadTextEncoding() ).getStr(), &aStat ) - || ! S_ISDIR( aStat.st_mode ) ) - aConfigPath = OUString(); - else - { - aPathBuffer.append(aConfigPath); - aPathBuffer.appendAscii("/share/fonts"); - } - } - if( aConfigPath.getLength() == 0 ) - { - if( aNetPath.getLength() ) - { - aPathBuffer.append( aNetPath ); - aPathBuffer.appendAscii( "/share/fonts/truetype;"); - aPathBuffer.append( aNetPath ); - aPathBuffer.appendAscii( "/share/fonts/type1;" ); - } - if( aUserPath.getLength() ) - { - aPathBuffer.append( aUserPath ); - aPathBuffer.appendAscii( "/user/fonts" ); - } - } - OString aEnvPath( getEnvironmentPath( "SAL_FONTPATH_PRIVATE" ) ); - if( aEnvPath.getLength() ) - { - aPathBuffer.append( sal_Unicode(';') ); - aPathBuffer.append( OStringToOUString( aEnvPath, osl_getThreadTextEncoding() ) ); - } - - aPath = aPathBuffer.makeStringAndClear(); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "initializing font path to \"%s\"\n", OUStringToOString( aPath, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); -#endif - } - return aPath; -} - -bool psp::convertPfbToPfa( ::osl::File& rInFile, ::osl::File& rOutFile ) -{ - static unsigned char hexDigits[] = - { - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' - }; - - bool bSuccess = true; - bool bEof = false; - unsigned char buffer[256]; - sal_uInt64 nRead; - sal_uInt64 nOrgPos = 0; - rInFile.getPos( nOrgPos ); - - while( bSuccess && ! bEof ) - { - // read leading bytes - bEof = ! rInFile.read( buffer, 6, nRead ) && nRead == 6 ? false : true; - unsigned int nType = buffer[ 1 ]; - unsigned int nBytesToRead = buffer[2] | buffer[3] << 8 | buffer[4] << 16 | buffer[5] << 24; - if( buffer[0] != 0x80 ) // test for pfb m_agic number - { - // this migt be a pfa font already - sal_uInt64 nWrite = 0; - if( ! rInFile.read( buffer+6, 9, nRead ) && nRead == 9 && - ( ! std::strncmp( (char*)buffer, "%!FontType1-", 12 ) || - ! std::strncmp( (char*)buffer, "%!PS-AdobeFont-", 15 ) ) ) - { - if( rOutFile.write( buffer, 15, nWrite ) || nWrite != 15 ) - bSuccess = false; - while( bSuccess && - ! rInFile.read( buffer, sizeof( buffer ), nRead ) && - nRead != 0 ) - { - if( rOutFile.write( buffer, nRead, nWrite ) || - nWrite != nRead ) - bSuccess = false; - } - bEof = true; - } - else - bSuccess = false; - } - else if( nType == 1 || nType == 2 ) - { - unsigned char* pBuffer = new unsigned char[ nBytesToRead+1 ]; - - if( ! rInFile.read( pBuffer, nBytesToRead, nRead ) && nRead == nBytesToRead ) - { - if( nType == 1 ) - { - // ascii data, convert dos lineends( \r\n ) and - // m_ac lineends( \r ) to \n - unsigned char * pWriteBuffer = new unsigned char[ nBytesToRead ]; - unsigned int nBytesToWrite = 0; - for( unsigned int i = 0; i < nBytesToRead; i++ ) - { - if( pBuffer[i] != '\r' ) - pWriteBuffer[ nBytesToWrite++ ] = pBuffer[i]; - else if( pBuffer[ i+1 ] == '\n' ) - { - i++; - pWriteBuffer[ nBytesToWrite++ ] = '\n'; - } - else - pWriteBuffer[ nBytesToWrite++ ] = '\n'; - } - if( rOutFile.write( pWriteBuffer, nBytesToWrite, nRead ) || nRead != nBytesToWrite ) - bSuccess = false; - - delete [] pWriteBuffer; - } - else - { - // binary data - unsigned int nBuffer = 0; - for( unsigned int i = 0; i < nBytesToRead && bSuccess; i++ ) - { - buffer[ nBuffer++ ] = hexDigits[ pBuffer[ i ] >> 4 ]; - buffer[ nBuffer++ ] = hexDigits[ pBuffer[ i ] & 15 ]; - if( nBuffer >= 80 ) - { - buffer[ nBuffer++ ] = '\n'; - if( rOutFile.write( buffer, nBuffer, nRead ) || nRead != nBuffer ) - bSuccess = false; - nBuffer = 0; - } - } - if( nBuffer > 0 && bSuccess ) - { - buffer[ nBuffer++ ] = '\n'; - if( rOutFile.write( buffer, nBuffer, nRead ) || nRead != nBuffer ) - bSuccess = false; - } - } - } - else - bSuccess = false; - - delete [] pBuffer; - } - else if( nType == 3 ) - bEof = true; - else - bSuccess = false; - } - - return bSuccess; -} - -void psp::normPath( OString& rPath ) -{ - char buf[PATH_MAX]; - - ByteString aPath( rPath ); - - // double slashes and slash at end are probably - // removed by realpath anyway, but since this runs - // on many different platforms let's play it safe - while( aPath.SearchAndReplace( "//", "/" ) != STRING_NOTFOUND ) - ; - if( aPath.Len() > 0 && aPath.GetChar( aPath.Len()-1 ) == '/' ) - aPath.Erase( aPath.Len()-1 ); - - if( ( aPath.Search( "./" ) != STRING_NOTFOUND || - aPath.Search( "~" ) != STRING_NOTFOUND ) - && realpath( aPath.GetBuffer(), buf ) ) - { - rPath = buf; - } - else - { - rPath = aPath; - } -} - -void psp::splitPath( OString& rPath, OString& rDir, OString& rBase ) -{ - normPath( rPath ); - sal_Int32 nIndex = rPath.lastIndexOf( '/' ); - if( nIndex > 0 ) - rDir = rPath.copy( 0, nIndex ); - else if( nIndex == 0 ) // root dir - rDir = rPath.copy( 0, 1 ); - if( rPath.getLength() > nIndex+1 ) - rBase = rPath.copy( nIndex+1 ); -} - - diff --git a/vcl/unx/source/fontmanager/makefile.mk b/vcl/unx/source/fontmanager/makefile.mk deleted file mode 100644 index c6a23b88f35b..000000000000 --- a/vcl/unx/source/fontmanager/makefile.mk +++ /dev/null @@ -1,72 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -ENABLE_EXCEPTIONS=TRUE -PRJNAME=vcl -TARGET=fontman - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -CFLAGS+= -I..$/fontsubset -INCDEPN+= -I..$/fontsubset - -.IF "$(ENABLE_FONTCONFIG)" != "" -CDEFS += -DENABLE_FONTCONFIG -.ENDIF - -CFLAGS+=$(FREETYPE_CFLAGS) - - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"=="aqua" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"=="aqua" - -SLOFILES=\ - $(SLO)$/fontmanager.obj \ - $(SLO)$/fontcache.obj \ - $(SLO)$/fontconfig.obj \ - $(SLO)$/helper.obj \ - $(SLO)$/parseAFM.obj - -.IF "$(OS)$(CPU)"=="SOLARISI" -NOOPTFILES=$(SLO)$/fontmanager.obj -.ENDIF - -.ENDIF - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/vcl/unx/source/fontmanager/parseAFM.cxx b/vcl/unx/source/fontmanager/parseAFM.cxx deleted file mode 100644 index e1a33b4d1b5d..000000000000 --- a/vcl/unx/source/fontmanager/parseAFM.cxx +++ /dev/null @@ -1,1577 +0,0 @@ -/* - * (C) 1988, 1989, 1990 by Adobe Systems Incorporated. All rights reserved. - * - * This file may be freely copied and redistributed as long as: - * 1) This entire notice continues to be included in the file, - * 2) If the file has been modified in any way, a notice of such - * modification is conspicuously indicated. - * - * PostScript, Display PostScript, and Adobe are registered trademarks of - * Adobe Systems Incorporated. - * - * ************************************************************************ - * THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO CHANGE WITHOUT - * NOTICE, AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY ADOBE SYSTEMS - * INCORPORATED. ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY OR - * LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO WARRANTY OF ANY - * KIND (EXPRESS, IMPLIED OR STATUTORY) WITH RESPECT TO THIS INFORMATION, - * AND EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. - * ************************************************************************ - */ - -/* - * Changes made for OpenOffice.org - * - * 10/24/2000 pl - changed code to compile with c++-compilers - * - added namespace to avoid symbol clashes - * - replaced BOOL by bool - * - added function to free space allocated by parseFile - * 10/26/2000 pl - added additional keys - * - added ability to parse slightly broken files - * - added charwidth member to GlobalFontInfo - * 04/26/2001 pl - added OpenOffice header - * 10/19/2005 pl - performance increase: - * - fread file in one pass - * - replace file io by buffer access - * 10/20/2005 pl - performance increase: - * - use one table lookup in token() routine - * instead of many conditions - * - return token length in toke() routine - * - use hash lookup instead of binary search - * in recognize() routine - */ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_vcl.hxx" - -/* parseAFM.c - * - * This file is used in conjuction with the parseAFM.h header file. - * This file contains several procedures that are used to parse AFM - * files. It is intended to work with an application program that needs - * font metric information. The program can be used as is by making a - * procedure call to "parseFile" (passing in the expected parameters) - * and having it fill in a data structure with the data from the - * AFM file, or an application developer may wish to customize this - * code. - * - * There is also a file, parseAFMclient.c, that is a sample application - * showing how to call the "parseFile" procedure and how to use the data - * after "parseFile" has returned. - * - * Please read the comments in parseAFM.h and parseAFMclient.c. - * - * History: - * original: DSM Thu Oct 20 17:39:59 PDT 1988 - * modified: DSM Mon Jul 3 14:17:50 PDT 1989 - * - added 'storageProblem' return code - * - fixed bug of not allocating extra byte for string duplication - * - fixed typos - * modified: DSM Tue Apr 3 11:18:34 PDT 1990 - * - added free(ident) at end of parseFile routine - * modified: DSM Tue Jun 19 10:16:29 PDT 1990 - * - changed (width == 250) to (width = 250) in initializeArray - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "parseAFM.hxx" -#include "vcl/strhelper.hxx" - -#include "rtl/alloc.h" - -#define lineterm EOL /* line terminating character */ -#define normalEOF 1 /* return code from parsing routines used only */ -/* in this module */ -#define Space "space" /* used in string comparison to look for the width */ -/* of the space character to init the widths array */ -#define False "false" /* used in string comparison to check the value of */ -/* boolean keys (e.g. IsFixedPitch) */ - -#define MATCH(A,B) (strncmp((A),(B), MAX_NAME) == 0) - -namespace psp { - -class FileInputStream -{ - char* m_pMemory; - unsigned int m_nPos; - unsigned int m_nLen; - public: - FileInputStream( const char* pFilename ); - ~FileInputStream(); - - int getChar() { return (m_nPos < m_nLen) ? int(m_pMemory[m_nPos++]) : -1; } - void ungetChar() - { - if( m_nPos > 0 ) - m_nPos--; - } - unsigned int tell() const { return m_nPos; } - void seek( unsigned int nPos ) - // NOTE: do not check input data since only results of tell() - // get seek()ed in this file - { m_nPos = nPos; } -}; - -FileInputStream::FileInputStream( const char* pFilename ) : - m_pMemory( NULL ), - m_nPos( 0 ), - m_nLen( 0 ) -{ - struct stat aStat; - if( ! stat( pFilename, &aStat ) && - S_ISREG( aStat.st_mode ) && - aStat.st_size > 0 - ) - { - FILE* fp = fopen( pFilename, "r" ); - if( fp ) - { - m_pMemory = (char*)rtl_allocateMemory( aStat.st_size ); - m_nLen = (unsigned int)fread( m_pMemory, 1, aStat.st_size, fp ); - fclose( fp ); - } - } -} - -FileInputStream::~FileInputStream() -{ - rtl_freeMemory( m_pMemory ); -} - -/*************************** GLOBALS ***********************/ -/* "shorts" for fast case statement - * The values of each of these enumerated items correspond to an entry in the - * table of strings defined below. Therefore, if you add a new string as - * new keyword into the keyStrings table, you must also add a corresponding - * parseKey AND it MUST be in the same position! - * - * IMPORTANT: since the sorting algorithm is a binary search, the strings of - * keywords must be placed in lexicographical order, below. [Therefore, the - * enumerated items are not necessarily in lexicographical order, depending - * on the name chosen. BUT, they must be placed in the same position as the - * corresponding key string.] The NOPE shall remain in the last position, - * since it does not correspond to any key string, and it is used in the - * "recognize" procedure to calculate how many possible keys there are. - */ - -// some metrics have Ascent, Descent instead Ascender, Descender or Em -// which is not allowed per afm spcification, but let us handle -// this gently -enum parseKey { - ASCENDER, ASCENT, CHARBBOX, CODE, COMPCHAR, CODEHEX, CAPHEIGHT, CHARWIDTH, CHARACTERSET, CHARACTERS, COMMENT, - DESCENDER, DESCENT, EM, ENCODINGSCHEME, ENDCHARMETRICS, ENDCOMPOSITES, ENDDIRECTION, - ENDFONTMETRICS, ENDKERNDATA, ENDKERNPAIRS, ENDTRACKKERN, - FAMILYNAME, FONTBBOX, FONTNAME, FULLNAME, ISBASEFONT, ISFIXEDPITCH, - ITALICANGLE, KERNPAIR, KERNPAIRXAMT, LIGATURE, MAPPINGSCHEME, METRICSSETS, CHARNAME, - NOTICE, COMPCHARPIECE, STARTCHARMETRICS, STARTCOMPOSITES, STARTDIRECTION, - STARTFONTMETRICS, STARTKERNDATA, STARTKERNPAIRS, - STARTTRACKKERN, STDHW, STDVW, TRACKKERN, UNDERLINEPOSITION, - UNDERLINETHICKNESS, VVECTOR, VERSION, XYWIDTH, X0WIDTH, XWIDTH, WEIGHT, XHEIGHT, - NOPE -}; - -/*************************** PARSING ROUTINES **************/ - -/*************************** token *************************/ - -/* A "AFM file Conventions" tokenizer. That means that it will - * return the next token delimited by white space. See also - * the `linetoken' routine, which does a similar thing but - * reads all tokens until the next end-of-line. - */ - -// token white space is ' ', '\n', '\r', ',', '\t', ';' -static const bool is_white_Array[ 256 ] = -{ false, false, false, false, false, false, false, false, // 0-7 - false, true, true, false, false, true, false, false, // 8-15 - false, false, false, false, false, false, false, false, // 16-23 - false, false, false, false, false, false, false, false, // 24-31 - true, false, false, false, false, false, false, false, // 32-39 - false, false, false, false, true, false, false, false, // 40-47 - false, false, false, false, false, false, false, false, // 48-55 - false, false, false, true, false, false, false, false, // 56-63 - - false, false, false, false, false, false, false, false, // 64 - - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, // 127 - - false, false, false, false, false, false, false, false, // 128 - - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, // 191 - - false, false, false, false, false, false, false, false, // 192 - - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, // 255 -}; -// token delimiters are ' ', '\n', '\r', '\t', ':', ';' -static const bool is_delimiter_Array[ 256 ] = -{ false, false, false, false, false, false, false, false, // 0-7 - false, true, true, false, false, true, false, false, // 8-15 - false, false, false, false, false, false, false, false, // 16-23 - false, false, false, false, false, false, false, false, // 24-31 - true, false, false, false, false, false, false, false, // 32-39 - false, false, false, false, false, false, false, false, // 40-47 - false, false, false, false, false, false, false, false, // 48-55 - false, false, true, true, false, false, false, false, // 56-63 - - false, false, false, false, false, false, false, false, // 64 - - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, // 127 - - false, false, false, false, false, false, false, false, // 128 - - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, // 191 - - false, false, false, false, false, false, false, false, // 192 - - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, // 255 -}; -static char *token( FileInputStream* stream, int& rLen ) -{ - static char ident[MAX_NAME]; /* storage buffer for keywords */ - - int ch, idx; - - /* skip over white space */ - // relies on EOF = -1 - while( is_white_Array[ (ch = stream->getChar()) & 255 ] ) - ; - - idx = 0; - while( ch != -1 && ! is_delimiter_Array[ ch & 255 ] && idx < MAX_NAME-1 ) - { - ident[idx++] = ch; - ch = stream->getChar(); - } - - if (ch == -1 && idx < 1) return ((char *)NULL); - if (idx >= 1 && ch != ':' && ch != -1) stream->ungetChar(); - if (idx < 1 ) ident[idx++] = ch; /* single-character token */ - ident[idx] = 0; - rLen = idx; - - return(ident); /* returns pointer to the token */ - -} /* token */ - - -/*************************** linetoken *************************/ - -/* "linetoken" will get read all tokens until the EOL character from - * the given stream. This is used to get any arguments that can be - * more than one word (like Comment lines and FullName). - */ - -static char *linetoken( FileInputStream* stream ) -{ - static char ident[MAX_NAME]; /* storage buffer for keywords */ - int ch, idx; - - while ((ch = stream->getChar()) == ' ' || ch == '\t' ) ; - - idx = 0; - while (ch != -1 && ch != lineterm && ch != '\r' && idx < MAX_NAME-1 ) - { - ident[idx++] = ch; - ch = stream->getChar(); - } /* while */ - - stream->ungetChar(); - ident[idx] = 0; - - return(ident); /* returns pointer to the token */ - -} /* linetoken */ - - -/*************************** recognize *************************/ - -/* This function tries to match a string to a known list of - * valid AFM entries (check the keyStrings array above). - * "ident" contains everything from white space through the - * next space, tab, or ":" character. - * - * The algorithm is a standard Knuth binary search. - */ -#include "afm_hash.cpp" - -static inline enum parseKey recognize( register char* ident, int len) -{ - const hash_entry* pEntry = AfmKeywordHash::in_word_set( ident, len ); - return pEntry ? pEntry->eKey : NOPE; - -} /* recognize */ - - -/************************* parseGlobals *****************************/ - -/* This function is called by "parseFile". It will parse the AFM file - * up to the "StartCharMetrics" keyword, which essentially marks the - * end of the Global Font Information and the beginning of the character - * metrics information. - * - * If the caller of "parseFile" specified that it wanted the Global - * Font Information (as defined by the "AFM file Specification" - * document), then that information will be stored in the returned - * data structure. - * - * Any Global Font Information entries that are not found in a - * given file, will have the usual default initialization value - * for its type (i.e. entries of type int will be 0, etc). - * - * This function returns an error code specifying whether there was - * a premature EOF or a parsing error. This return value is used by - * parseFile to determine if there is more file to parse. - */ - -static int parseGlobals( FileInputStream* fp, register GlobalFontInfo* gfi ) -{ - bool cont = true, save = (gfi != NULL); - int error = ok; - register char *keyword; - int direction = -1; - int tokenlen; - - while (cont) - { - keyword = token(fp, tokenlen); - - if (keyword == NULL) - /* Have reached an early and unexpected EOF. */ - /* Set flag and stop parsing */ - { - error = earlyEOF; - break; /* get out of loop */ - } - if (!save) - /* get tokens until the end of the Global Font info section */ - /* without saving any of the data */ - switch (recognize(keyword, tokenlen)) - { - case STARTCHARMETRICS: - cont = false; - break; - case ENDFONTMETRICS: - cont = false; - error = normalEOF; - break; - default: - break; - } /* switch */ - else - /* otherwise parse entire global font info section, */ - /* saving the data */ - switch(recognize(keyword, tokenlen)) - { - case STARTFONTMETRICS: - if ((keyword = token(fp,tokenlen)) != NULL) - gfi->afmVersion = strdup( keyword ); - break; - case COMMENT: - keyword = linetoken(fp); - break; - case FONTNAME: - if ((keyword = token(fp,tokenlen)) != NULL) - gfi->fontName = strdup( keyword ); - break; - case ENCODINGSCHEME: - if ((keyword = token(fp,tokenlen)) != NULL) - gfi->encodingScheme = strdup( keyword ); - break; - case FULLNAME: - if ((keyword = linetoken(fp)) != NULL) - gfi->fullName = strdup( keyword ); - break; - case FAMILYNAME: - if ((keyword = linetoken(fp)) != NULL) - gfi->familyName = strdup( keyword ); - break; - case WEIGHT: - if ((keyword = token(fp,tokenlen)) != NULL) - gfi->weight = strdup( keyword ); - break; - case ITALICANGLE: - if ((keyword = token(fp,tokenlen)) != NULL) - gfi->italicAngle = StringToDouble( keyword ); - break; - case ISFIXEDPITCH: - if ((keyword = token(fp,tokenlen)) != NULL) - { - if (MATCH(keyword, False)) - gfi->isFixedPitch = 0; - else - gfi->isFixedPitch = 1; - } - break; - case UNDERLINEPOSITION: - if ((keyword = token(fp,tokenlen)) != NULL) - gfi->underlinePosition = atoi(keyword); - break; - case UNDERLINETHICKNESS: - if ((keyword = token(fp,tokenlen)) != NULL) - gfi->underlineThickness = atoi(keyword); - break; - case VERSION: - if ((keyword = token(fp,tokenlen)) != NULL) - gfi->version = strdup( keyword ); - break; - case NOTICE: - if ((keyword = linetoken(fp)) != NULL) - gfi->notice = strdup( keyword ); - break; - case FONTBBOX: - if ((keyword = token(fp,tokenlen)) != NULL) - gfi->fontBBox.llx = atoi(keyword); - if ((keyword = token(fp,tokenlen)) != NULL) - gfi->fontBBox.lly = atoi(keyword); - if ((keyword = token(fp,tokenlen)) != NULL) - gfi->fontBBox.urx = atoi(keyword); - if ((keyword = token(fp,tokenlen)) != NULL) - gfi->fontBBox.ury = atoi(keyword); - break; - case CAPHEIGHT: - if ((keyword = token(fp,tokenlen)) != NULL) - gfi->capHeight = atoi(keyword); - break; - case XHEIGHT: - if ((keyword = token(fp,tokenlen)) != NULL) - gfi->xHeight = atoi(keyword); - break; - case DESCENT: - if ((keyword = token(fp,tokenlen)) != NULL) - gfi->descender = -atoi(keyword); - break; - case DESCENDER: - if ((keyword = token(fp,tokenlen)) != NULL) - gfi->descender = atoi(keyword); - break; - case ASCENT: - case ASCENDER: - if ((keyword = token(fp,tokenlen)) != NULL) - gfi->ascender = atoi(keyword); - break; - case STARTCHARMETRICS: - cont = false; - break; - case ENDFONTMETRICS: - cont = false; - error = normalEOF; - break; - case EM: - // skip one token - keyword = token(fp,tokenlen); - break; - case STARTDIRECTION: - if ((keyword = token(fp,tokenlen)) != NULL) - direction = atoi(keyword); - break; /* ignore this for now */ - case ENDDIRECTION: - break; /* ignore this for now */ - case MAPPINGSCHEME: - keyword = token(fp,tokenlen); - break; /* ignore this for now */ - case CHARACTERS: - keyword = token(fp,tokenlen); - break; /* ignore this for now */ - case ISBASEFONT: - keyword = token(fp,tokenlen); - break; /* ignore this for now */ - case CHARACTERSET: - keyword=token(fp,tokenlen); //ignore - break; - case STDHW: - keyword=token(fp,tokenlen); //ignore - break; - case STDVW: - keyword=token(fp,tokenlen); //ignore - break; - case CHARWIDTH: - if ((keyword = token(fp,tokenlen)) != NULL) - { - if (direction == 0) - gfi->charwidth = atoi(keyword); - } - keyword = token(fp,tokenlen); - /* ignore y-width for now */ - break; - case METRICSSETS: - keyword = token(fp,tokenlen); - break; /* ignore this for now */ - case NOPE: - default: - error = parseError; - break; - } /* switch */ - } /* while */ - - return(error); - -} /* parseGlobals */ - - -#if 0 -/************************* initializeArray ************************/ - -/* Unmapped character codes are (at Adobe Systems) assigned the - * width of the space character (if one exists) else they get the - * value of 250 ems. This function initializes all entries in the - * char widths array to have this value. Then any mapped character - * codes will be replaced with the width of the appropriate character - * when parsing the character metric section. - - * This function parses the Character Metrics Section looking - * for a space character (by comparing character names). If found, - * the width of the space character will be used to initialize the - * values in the array of character widths. - * - * Before returning, the position of the read/write pointer of the - * FileInputStream is reset to be where it was upon entering this function. - */ - -static int initializeArray( FileInputStream* fp, register int* cwi) -{ - bool cont = true, found = false; - unsigned int opos = fp->tell(); - int code = 0, width = 0, i = 0, error = 0, tokenlen; - register char *keyword; - - while (cont) - { - keyword = token(fp,tokenlen); - if (keyword == NULL) - { - error = earlyEOF; - break; /* get out of loop */ - } - switch(recognize(keyword,tokenlen)) - { - case COMMENT: - keyword = linetoken(fp); - break; - case CODE: - if ((keyword = token(fp,tokenlen)) != NULL) - code = atoi(keyword); - break; - case CODEHEX: - if ((keyword = token(fp,tokenlen)) != NULL) - sscanf(keyword,"<%x>", &code); - break; - case XWIDTH: - if ((keyword = token(fp,tokenlen)) != NULL) - width = atoi(keyword); - break; - case X0WIDTH: - (void) token(fp,tokenlen); - break; - case CHARNAME: - if ((keyword = token(fp,tokenlen)) != NULL) - if (MATCH(keyword, Space)) - { - cont = false; - found = true; - } - break; - case ENDCHARMETRICS: - cont = false; - break; - case ENDFONTMETRICS: - cont = false; - error = normalEOF; - break; - case NOPE: - default: - error = parseError; - break; - } /* switch */ - } /* while */ - - if (!found) - width = 250; - - for (i = 0; i < 256; ++i) - cwi[i] = width; - - fp->seek(opos); - - return(error); - -} /* initializeArray */ -#endif - -/************************* parseCharWidths **************************/ - -/* This function is called by "parseFile". It will parse the AFM file - * up to the "EndCharMetrics" keyword. It will save the character - * width info (as opposed to all of the character metric information) - * if requested by the caller of parseFile. Otherwise, it will just - * parse through the section without saving any information. - * - * If data is to be saved, parseCharWidths is passed in a pointer - * to an array of widths that has already been initialized by the - * standard value for unmapped character codes. This function parses - * the Character Metrics section only storing the width information - * for the encoded characters into the array using the character code - * as the index into that array. - * - * This function returns an error code specifying whether there was - * a premature EOF or a parsing error. This return value is used by - * parseFile to determine if there is more file to parse. - */ - -static int parseCharWidths( FileInputStream* fp, register int* cwi) -{ - bool cont = true, save = (cwi != NULL); - int pos = 0, error = ok, tokenlen; - register char *keyword; - - while (cont) - { - keyword = token(fp,tokenlen); - /* Have reached an early and unexpected EOF. */ - /* Set flag and stop parsing */ - if (keyword == NULL) - { - error = earlyEOF; - break; /* get out of loop */ - } - if (!save) - /* get tokens until the end of the Char Metrics section without */ - /* saving any of the data*/ - switch (recognize(keyword,tokenlen)) - { - case ENDCHARMETRICS: - cont = false; - break; - case ENDFONTMETRICS: - cont = false; - error = normalEOF; - break; - default: - break; - } /* switch */ - else - /* otherwise parse entire char metrics section, saving */ - /* only the char x-width info */ - switch(recognize(keyword,tokenlen)) - { - case COMMENT: - keyword = linetoken(fp); - break; - case CODE: - if ((keyword = token(fp,tokenlen)) != NULL) - pos = atoi(keyword); - break; - case XYWIDTH: - /* PROBLEM: Should be no Y-WIDTH when doing "quick & dirty" */ - keyword = token(fp,tokenlen); keyword = token(fp,tokenlen); /* eat values */ - error = parseError; - break; - case CODEHEX: - if ((keyword = token(fp,tokenlen)) != NULL) - sscanf(keyword, "<%x>", &pos); - break; - case X0WIDTH: - (void) token(fp,tokenlen); - break; - case XWIDTH: - if ((keyword = token(fp,tokenlen)) != NULL) - if (pos >= 0) /* ignore unmapped chars */ - cwi[pos] = atoi(keyword); - break; - case ENDCHARMETRICS: - cont = false; - break; - case ENDFONTMETRICS: - cont = false; - error = normalEOF; - break; - case CHARNAME: /* eat values (so doesn't cause parseError) */ - keyword = token(fp,tokenlen); - break; - case CHARBBOX: - keyword = token(fp,tokenlen); keyword = token(fp,tokenlen); - keyword = token(fp,tokenlen); keyword = token(fp,tokenlen); - break; - case LIGATURE: - keyword = token(fp,tokenlen); keyword = token(fp,tokenlen); - break; - case VVECTOR: - keyword = token(fp,tokenlen); - keyword = token(fp,tokenlen); - break; - case NOPE: - default: - error = parseError; - break; - } /* switch */ - } /* while */ - - return(error); - -} /* parseCharWidths */ - - -/* - * number of char metrics is almost allways inaccurate, so be gentle and try to - * adapt our internal storage by adjusting the allocated list - */ - -static int -reallocFontMetrics( void **pp_fontmetrics, int *p_oldcount, int n_newcount, unsigned int n_size ) -{ - char *p_tmpmetrics = NULL; - - if ((pp_fontmetrics == NULL) || (*pp_fontmetrics == NULL)) - return storageProblem; - - if (*p_oldcount == n_newcount) - return ok; - - p_tmpmetrics = (char*)realloc(*pp_fontmetrics, n_newcount * n_size); - if (p_tmpmetrics == NULL) - return storageProblem; - - if ( n_newcount > *p_oldcount ) - { - char *p_inimetrics = p_tmpmetrics + n_size * *p_oldcount; - int n_inimetrics = n_size * (n_newcount - *p_oldcount); - memset( p_inimetrics, 0, n_inimetrics ); - } - - *pp_fontmetrics = p_tmpmetrics; - *p_oldcount = n_newcount; - - return ok; -} - -static unsigned int -enlargeCount( unsigned int n_oldcount ) -{ - unsigned int n_newcount = n_oldcount + n_oldcount / 5; - if (n_oldcount == n_newcount ) - n_newcount = n_oldcount + 5; - - return n_newcount; -} - -/************************* parseCharMetrics ************************/ - -/* This function is called by parseFile if the caller of parseFile - * requested that all character metric information be saved - * (as opposed to only the character width information). - * - * parseCharMetrics is passed in a pointer to an array of records - * to hold information on a per character basis. This function - * parses the Character Metrics section storing all character - * metric information for the ALL characters (mapped and unmapped) - * into the array. - * - * This function returns an error code specifying whether there was - * a premature EOF or a parsing error. This return value is used by - * parseFile to determine if there is more file to parse. - */ - -static int parseCharMetrics( FileInputStream* fp, register FontInfo* fi) -{ - bool cont = true, firstTime = true; - int error = ok, count = 0, tokenlen; - register CharMetricInfo *temp = fi->cmi; - register char *keyword; - - while (cont) - { - keyword = token(fp,tokenlen); - if (keyword == NULL) - { - error = earlyEOF; - break; /* get out of loop */ - } - switch(recognize(keyword,tokenlen)) - { - case COMMENT: - keyword = linetoken(fp); - break; - case CODE: - if (!(count < fi->numOfChars)) - { - reallocFontMetrics( (void**)&(fi->cmi), - &(fi->numOfChars), enlargeCount(fi->numOfChars), - sizeof(CharMetricInfo) ); - temp = &(fi->cmi[ count - 1 ]); - } - if (count < fi->numOfChars) - { - if (firstTime) firstTime = false; - else temp++; - if ((keyword = token(fp,tokenlen)) != NULL) - temp->code = atoi(keyword); - if (fi->gfi && fi->gfi->charwidth) - temp->wx = fi->gfi->charwidth; - count++; - } - else - { - error = parseError; - cont = false; - } - break; - case CODEHEX: - if (!(count < fi->numOfChars )) - { - reallocFontMetrics( (void**)&(fi->cmi), - &(fi->numOfChars), enlargeCount(fi->numOfChars), - sizeof(CharMetricInfo) ); - temp = &(fi->cmi[ count - 1 ]); - } - if (count < fi->numOfChars) { - if (firstTime) - firstTime = false; - else - temp++; - if ((keyword = token(fp,tokenlen)) != NULL) - sscanf(keyword,"<%x>", &temp->code); - if (fi->gfi && fi->gfi->charwidth) - temp->wx = fi->gfi->charwidth; - count++; - } - else { - error = parseError; - cont = false; - } - break; - case XYWIDTH: - if ((keyword = token(fp,tokenlen)) != NULL) - temp->wx = atoi(keyword); - if ((keyword = token(fp,tokenlen)) != NULL) - temp->wy = atoi(keyword); - break; - case X0WIDTH: - if ((keyword = token(fp,tokenlen)) != NULL) - temp->wx = atoi(keyword); - break; - case XWIDTH: - if ((keyword = token(fp,tokenlen)) != NULL) - temp->wx = atoi(keyword); - break; - case CHARNAME: - if ((keyword = token(fp,tokenlen)) != NULL) - temp->name = (char *)strdup(keyword); - break; - case CHARBBOX: - if ((keyword = token(fp,tokenlen)) != NULL) - temp->charBBox.llx = atoi(keyword); - if ((keyword = token(fp,tokenlen)) != NULL) - temp->charBBox.lly = atoi(keyword); - if ((keyword = token(fp,tokenlen)) != NULL) - temp->charBBox.urx = atoi(keyword); - if ((keyword = token(fp,tokenlen)) != NULL) - temp->charBBox.ury = atoi(keyword); - break; - case LIGATURE: { - Ligature **tail = &(temp->ligs); - Ligature *node = *tail; - - if (*tail != NULL) - { - while (node->next != NULL) - node = node->next; - tail = &(node->next); - } - - *tail = (Ligature *) calloc(1, sizeof(Ligature)); - if ((keyword = token(fp,tokenlen)) != NULL) - (*tail)->succ = (char *)strdup(keyword); - if ((keyword = token(fp,tokenlen)) != NULL) - (*tail)->lig = (char *)strdup(keyword); - break; } - case ENDCHARMETRICS: - cont = false;; - break; - case ENDFONTMETRICS: - cont = false; - error = normalEOF; - break; - case VVECTOR: - keyword = token(fp,tokenlen); - keyword = token(fp,tokenlen); - break; - case NOPE: - default: - error = parseError; - break; - } /* switch */ - } /* while */ - - if ((error == ok) && (count != fi->numOfChars)) - error = reallocFontMetrics( (void**)&(fi->cmi), &(fi->numOfChars), - count, sizeof(CharMetricInfo) ); - - if ((error == ok) && (count != fi->numOfChars)) - error = parseError; - - return(error); - -} /* parseCharMetrics */ - - - -/************************* parseTrackKernData ***********************/ - -/* This function is called by "parseFile". It will parse the AFM file - * up to the "EndTrackKern" or "EndKernData" keywords. It will save the - * track kerning data if requested by the caller of parseFile. - * - * parseTrackKernData is passed in a pointer to the FontInfo record. - * If data is to be saved, the FontInfo record will already contain - * a valid pointer to storage for the track kerning data. - * - * This function returns an error code specifying whether there was - * a premature EOF or a parsing error. This return value is used by - * parseFile to determine if there is more file to parse. - */ - -static int parseTrackKernData( FileInputStream* fp, register FontInfo* fi) -{ - bool cont = true, save = (fi->tkd != NULL); - int pos = 0, error = ok, tcount = 0, tokenlen; - register char *keyword; - - while (cont) - { - keyword = token(fp,tokenlen); - - if (keyword == NULL) - { - error = earlyEOF; - break; /* get out of loop */ - } - if (!save) - /* get tokens until the end of the Track Kerning Data */ - /* section without saving any of the data */ - switch(recognize(keyword,tokenlen)) - { - case ENDTRACKKERN: - case ENDKERNDATA: - cont = false; - break; - case ENDFONTMETRICS: - cont = false; - error = normalEOF; - break; - default: - break; - } /* switch */ - else - /* otherwise parse entire Track Kerning Data section, */ - /* saving the data */ - switch(recognize(keyword,tokenlen)) - { - case COMMENT: - keyword = linetoken(fp); - break; - case TRACKKERN: - if (!(tcount < fi->numOfTracks)) - { - reallocFontMetrics( (void**)&(fi->tkd), &(fi->numOfTracks), - enlargeCount(fi->numOfTracks), sizeof(TrackKernData) ); - } - - if (tcount < fi->numOfTracks) - { - if ((keyword = token(fp,tokenlen)) != NULL) - fi->tkd[pos].degree = atoi(keyword); - if ((keyword = token(fp,tokenlen)) != NULL) - fi->tkd[pos].minPtSize = StringToDouble(keyword); - if ((keyword = token(fp,tokenlen)) != NULL) - fi->tkd[pos].minKernAmt = StringToDouble(keyword); - if ((keyword = token(fp,tokenlen)) != NULL) - fi->tkd[pos].maxPtSize = StringToDouble(keyword); - if ((keyword = token(fp,tokenlen)) != NULL) - fi->tkd[pos++].maxKernAmt = StringToDouble(keyword); - tcount++; - } - else - { - error = parseError; - cont = false; - } - break; - case ENDTRACKKERN: - case ENDKERNDATA: - cont = false; - break; - case ENDFONTMETRICS: - cont = false; - error = normalEOF; - break; - case NOPE: - default: - error = parseError; - break; - } /* switch */ - } /* while */ - - if (error == ok && tcount != fi->numOfTracks) - error = reallocFontMetrics( (void**)&(fi->tkd), &(fi->numOfTracks), - tcount, sizeof(TrackKernData) ); - - if (error == ok && tcount != fi->numOfTracks) - error = parseError; - - return(error); - -} /* parseTrackKernData */ - - -/************************* parsePairKernData ************************/ - -/* This function is called by "parseFile". It will parse the AFM file - * up to the "EndKernPairs" or "EndKernData" keywords. It will save - * the pair kerning data if requested by the caller of parseFile. - * - * parsePairKernData is passed in a pointer to the FontInfo record. - * If data is to be saved, the FontInfo record will already contain - * a valid pointer to storage for the pair kerning data. - * - * This function returns an error code specifying whether there was - * a premature EOF or a parsing error. This return value is used by - * parseFile to determine if there is more file to parse. - */ - -static int parsePairKernData( FileInputStream* fp, register FontInfo* fi) -{ - bool cont = true, save = (fi->pkd != NULL); - int pos = 0, error = ok, pcount = 0, tokenlen; - register char *keyword; - - while (cont) - { - keyword = token(fp,tokenlen); - - if (keyword == NULL) - { - error = earlyEOF; - break; /* get out of loop */ - } - if (!save) - /* get tokens until the end of the Pair Kerning Data */ - /* section without saving any of the data */ - switch(recognize(keyword,tokenlen)) - { - case ENDKERNPAIRS: - case ENDKERNDATA: - cont = false; - break; - case ENDFONTMETRICS: - cont = false; - error = normalEOF; - break; - default: - break; - } /* switch */ - else - /* otherwise parse entire Pair Kerning Data section, */ - /* saving the data */ - switch(recognize(keyword,tokenlen)) - { - case COMMENT: - keyword = linetoken(fp); - break; - case KERNPAIR: - if (!(pcount < fi->numOfPairs)) - { - reallocFontMetrics( (void**)&(fi->pkd), &(fi->numOfPairs), - enlargeCount(fi->numOfPairs), sizeof(PairKernData) ); - } - if (pcount < fi->numOfPairs) - { - if ((keyword = token(fp,tokenlen)) != NULL) - fi->pkd[pos].name1 = strdup( keyword ); - if ((keyword = token(fp,tokenlen)) != NULL) - fi->pkd[pos].name2 = strdup( keyword ); - if ((keyword = token(fp,tokenlen)) != NULL) - fi->pkd[pos].xamt = atoi(keyword); - if ((keyword = token(fp,tokenlen)) != NULL) - fi->pkd[pos++].yamt = atoi(keyword); - pcount++; - } - else - { - error = parseError; - cont = false; - } - break; - case KERNPAIRXAMT: - if (!(pcount < fi->numOfPairs)) - { - reallocFontMetrics( (void**)&(fi->pkd), &(fi->numOfPairs), - enlargeCount(fi->numOfPairs), sizeof(PairKernData) ); - } - if (pcount < fi->numOfPairs) - { - if ((keyword = token(fp,tokenlen)) != NULL) - fi->pkd[pos].name1 = strdup( keyword ); - if ((keyword = token(fp,tokenlen)) != NULL) - fi->pkd[pos].name2 = strdup( keyword ); - if ((keyword = token(fp,tokenlen)) != NULL) - fi->pkd[pos++].xamt = atoi(keyword); - pcount++; - } - else - { - error = parseError; - cont = false; - } - break; - case ENDKERNPAIRS: - case ENDKERNDATA: - cont = false; - break; - case ENDFONTMETRICS: - cont = false; - error = normalEOF; - break; - case NOPE: - default: - error = parseError; - break; - } /* switch */ - } /* while */ - - if ((error == ok) && (pcount != fi->numOfPairs)) - error = reallocFontMetrics( (void**)&(fi->pkd), &(fi->numOfPairs), - pcount, sizeof(PairKernData) ); - - if (error == ok && pcount != fi->numOfPairs) - error = parseError; - - return(error); - -} /* parsePairKernData */ - - -/************************* parseCompCharData **************************/ - -/* This function is called by "parseFile". It will parse the AFM file - * up to the "EndComposites" keyword. It will save the composite - * character data if requested by the caller of parseFile. - * - * parseCompCharData is passed in a pointer to the FontInfo record, and - * a boolean representing if the data should be saved. - * - * This function will create the appropriate amount of storage for - * the composite character data and store a pointer to the storage - * in the FontInfo record. - * - * This function returns an error code specifying whether there was - * a premature EOF or a parsing error. This return value is used by - * parseFile to determine if there is more file to parse. - */ - -static int parseCompCharData( FileInputStream* fp, register FontInfo* fi) -{ - bool cont = true, firstTime = true, save = (fi->ccd != NULL); - int pos = 0, j = 0, error = ok, ccount = 0, pcount = 0, tokenlen; - register char *keyword; - - while (cont) - { - keyword = token(fp,tokenlen); - if (keyword == NULL) - /* Have reached an early and unexpected EOF. */ - /* Set flag and stop parsing */ - { - error = earlyEOF; - break; /* get out of loop */ - } - if (ccount > fi->numOfComps) - { - reallocFontMetrics( (void**)&(fi->ccd), &(fi->numOfComps), - enlargeCount(fi->numOfComps), sizeof(CompCharData) ); - } - if (ccount > fi->numOfComps) - { - error = parseError; - break; /* get out of loop */ - } - if (!save) - /* get tokens until the end of the Composite Character info */ - /* section without saving any of the data */ - switch(recognize(keyword,tokenlen)) - { - case ENDCOMPOSITES: - cont = false; - break; - case ENDFONTMETRICS: - cont = false; - error = normalEOF; - break; - case COMMENT: - case COMPCHAR: - keyword = linetoken(fp); - break; - default: - break; - } /* switch */ - else - /* otherwise parse entire Composite Character info section, */ - /* saving the data */ - switch(recognize(keyword,tokenlen)) - { - case COMMENT: - keyword = linetoken(fp); - break; - case COMPCHAR: - if (!(ccount < fi->numOfComps)) - { - reallocFontMetrics( (void**)&(fi->ccd), &(fi->numOfComps), - enlargeCount(fi->numOfComps), sizeof(CompCharData) ); - } - if (ccount < fi->numOfComps) - { - keyword = token(fp,tokenlen); - if (pcount != fi->ccd[pos].numOfPieces) - error = parseError; - pcount = 0; - if (firstTime) firstTime = false; - else pos++; - fi->ccd[pos].ccName = strdup( keyword ); - if ((keyword = token(fp,tokenlen)) != NULL) - fi->ccd[pos].numOfPieces = atoi(keyword); - fi->ccd[pos].pieces = (Pcc *) - calloc(fi->ccd[pos].numOfPieces, sizeof(Pcc)); - j = 0; - ccount++; - } - else - { - error = parseError; - cont = false; - } - break; - case COMPCHARPIECE: - if (pcount < fi->ccd[pos].numOfPieces) - { - if ((keyword = token(fp,tokenlen)) != NULL) - fi->ccd[pos].pieces[j].pccName = strdup( keyword ); - if ((keyword = token(fp,tokenlen)) != NULL) - fi->ccd[pos].pieces[j].deltax = atoi(keyword); - if ((keyword = token(fp,tokenlen)) != NULL) - fi->ccd[pos].pieces[j++].deltay = atoi(keyword); - pcount++; - } - else - error = parseError; - break; - case ENDCOMPOSITES: - cont = false; - break; - case ENDFONTMETRICS: - cont = false; - error = normalEOF; - break; - case NOPE: - default: - error = parseError; - break; - } /* switch */ - } /* while */ - - if (error == ok && ccount != fi->numOfComps) - reallocFontMetrics( (void**)&(fi->ccd), &(fi->numOfComps), - ccount, sizeof(CompCharData) ); - - if (error == ok && ccount != fi->numOfComps) - error = parseError; - - return(error); - -} /* parseCompCharData */ - - - - -/*************************** 'PUBLIC' FUNCTION ********************/ - - -/*************************** parseFile *****************************/ - -/* parseFile is the only 'public' procedure available. It is called - * from an application wishing to get information from an AFM file. - * The caller of this function is responsible for locating and opening - * an AFM file and handling all errors associated with that task. - * - * parseFile expects 3 parameters: a filename pointer, a pointer - * to a (FontInfo *) variable (for which storage will be allocated and - * the data requested filled in), and a mask specifying which - * data from the AFM file should be saved in the FontInfo structure. - * - * The file will be parsed and the requested data will be stored in - * a record of type FontInfo (refer to ParseAFM.h). - * - * parseFile returns an error code as defined in parseAFM.h. - * - * The position of the read/write pointer associated with the file - * pointer upon return of this function is undefined. - */ - -int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags) -{ - FileInputStream aFile( pFilename ); - - int code = ok; /* return code from each of the parsing routines */ - int error = ok; /* used as the return code from this function */ - int tokenlen; - - register char *keyword; /* used to store a token */ - - - (*fi) = (FontInfo *) calloc(1, sizeof(FontInfo)); - if ((*fi) == NULL) {error = storageProblem; return(error);} - - if (flags & P_G) - { - (*fi)->gfi = (GlobalFontInfo *) calloc(1, sizeof(GlobalFontInfo)); - if ((*fi)->gfi == NULL) {error = storageProblem; return(error);} - } - - /* The AFM file begins with Global Font Information. This section */ - /* will be parsed whether or not information should be saved. */ - code = parseGlobals(&aFile, (*fi)->gfi); - - if (code < 0) error = code; - - /* The Global Font Information is followed by the Character Metrics */ - /* section. Which procedure is used to parse this section depends on */ - /* how much information should be saved. If all of the metrics info */ - /* is wanted, parseCharMetrics is called. If only the character widths */ - /* is wanted, parseCharWidths is called. parseCharWidths will also */ - /* be called in the case that no character data is to be saved, just */ - /* to parse through the section. */ - - if ((code != normalEOF) && (code != earlyEOF)) - { - if ((keyword = token(&aFile,tokenlen)) != NULL) - (*fi)->numOfChars = atoi(keyword); - if (flags & (P_M ^ P_W)) - { - (*fi)->cmi = (CharMetricInfo *) - calloc((*fi)->numOfChars, sizeof(CharMetricInfo)); - if ((*fi)->cmi == NULL) {error = storageProblem; return(error);} - code = parseCharMetrics(&aFile, *fi); - } - else - { - if (flags & P_W) - { - (*fi)->cwi = (int *) calloc(256, sizeof(int)); - if ((*fi)->cwi == NULL) - { - error = storageProblem; - return(error); - } - } - /* parse section regardless */ - code = parseCharWidths(&aFile, (*fi)->cwi); - } /* else */ - } /* if */ - - if ((error != earlyEOF) && (code < 0)) error = code; - - /* The remaining sections of the AFM are optional. This code will */ - /* look at the next keyword in the file to determine what section */ - /* is next, and then allocate the appropriate amount of storage */ - /* for the data (if the data is to be saved) and call the */ - /* appropriate parsing routine to parse the section. */ - - while ((code != normalEOF) && (code != earlyEOF)) - { - keyword = token(&aFile,tokenlen); - if (keyword == NULL) - /* Have reached an early and unexpected EOF. */ - /* Set flag and stop parsing */ - { - code = earlyEOF; - break; /* get out of loop */ - } - switch(recognize(keyword,tokenlen)) - { - case STARTKERNDATA: - break; - case ENDKERNDATA: - break; - case STARTTRACKKERN: - keyword = token(&aFile,tokenlen); - if ((flags & P_T) && keyword) - { - (*fi)->numOfTracks = atoi(keyword); - (*fi)->tkd = (TrackKernData *) - calloc((*fi)->numOfTracks, sizeof(TrackKernData)); - if ((*fi)->tkd == NULL) - { - error = storageProblem; - return(error); - } - } /* if */ - code = parseTrackKernData(&aFile, *fi); - break; - case STARTKERNPAIRS: - keyword = token(&aFile,tokenlen); - if ((flags & P_P) && keyword) - { - (*fi)->numOfPairs = atoi(keyword); - (*fi)->pkd = (PairKernData *) - calloc((*fi)->numOfPairs, sizeof(PairKernData)); - if ((*fi)->pkd == NULL) - { - error = storageProblem; - return(error); - } - } /* if */ - code = parsePairKernData(&aFile, *fi); - break; - case STARTCOMPOSITES: - keyword = token(&aFile,tokenlen); - if ((flags & P_C) && keyword) - { - (*fi)->numOfComps = atoi(keyword); - (*fi)->ccd = (CompCharData *) - calloc((*fi)->numOfComps, sizeof(CompCharData)); - if ((*fi)->ccd == NULL) - { - error = storageProblem; - return(error); - } - } /* if */ - code = parseCompCharData(&aFile, *fi); - break; - case ENDFONTMETRICS: - code = normalEOF; - break; - case COMMENT: - linetoken(&aFile); - break; - case NOPE: - default: - code = parseError; - break; - } /* switch */ - - if ((error != earlyEOF) && (code < 0)) error = code; - - } /* while */ - - if ((error != earlyEOF) && (code < 0)) error = code; - - return(error); - -} /* parseFile */ - -void -freeFontInfo (FontInfo *fi) -{ - int i, j; - - if (fi->gfi) - { - free (fi->gfi->afmVersion); - free (fi->gfi->fontName); - free (fi->gfi->fullName); - free (fi->gfi->familyName); - free (fi->gfi->weight); - free (fi->gfi->version); - free (fi->gfi->notice); - free (fi->gfi->encodingScheme); - free (fi->gfi); - } - - free (fi->cwi); - - if (fi->cmi) - { - for (i = 0; i < fi->numOfChars; i++) - { - Ligature *ligs; - free (fi->cmi[i].name); - ligs = fi->cmi[i].ligs; - while (ligs) - { - Ligature *tmp; - tmp = ligs; - ligs = ligs->next; - free (tmp->succ); - free (tmp->lig); - free (tmp); - } - } - free (fi->cmi); - } - - free (fi->tkd); - - if (fi->pkd) - { - for ( i = 0; i < fi->numOfPairs; i++) - { - free (fi->pkd[i].name1); - free (fi->pkd[i].name2); - } - free (fi->pkd); - } - - if (fi->ccd) - { - for (i = 0; i < fi->numOfComps; i++) - { - free (fi->ccd[i].ccName); - for (j = 0; j < fi->ccd[i].numOfPieces; j++) - free (fi->ccd[i].pieces[j].pccName); - - free (fi->ccd[i].pieces); - } - free (fi->ccd); - } - - free (fi); -} - -} // namspace diff --git a/vcl/unx/source/fontmanager/parseAFM.hxx b/vcl/unx/source/fontmanager/parseAFM.hxx deleted file mode 100644 index cfebde696c14..000000000000 --- a/vcl/unx/source/fontmanager/parseAFM.hxx +++ /dev/null @@ -1,334 +0,0 @@ -/* - * (C) 1988, 1989 by Adobe Systems Incorporated. All rights reserved. - * - * This file may be freely copied and redistributed as long as: - * 1) This entire notice continues to be included in the file, - * 2) If the file has been modified in any way, a notice of such - * modification is conspicuously indicated. - * - * PostScript, Display PostScript, and Adobe are registered trademarks of - * Adobe Systems Incorporated. - * - * ************************************************************************ - * THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO CHANGE WITHOUT - * NOTICE, AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY ADOBE SYSTEMS - * INCORPORATED. ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY OR - * LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO WARRANTY OF ANY - * KIND (EXPRESS, IMPLIED OR STATUTORY) WITH RESPECT TO THIS INFORMATION, - * AND EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. - * ************************************************************************ - */ - -/* - * Changes made for OpenOffice.org - * - * 10/24/2000 pl - changed code to compile with c++-compilers - * - added namespace to avoid symbol clashes - * - replaced BOOL by bool - * - added function to free space allocated by parseFile - * 10/26/2000 pl - added additional keys - * - added ability to parse slightly broken files - * - added charwidth member to GlobalFontInfo - * 04/26/2001 pl - added OpenOffice header - * 10/19/2005 pl - changed parseFile to accept a file name instead of a stream - */ - -/* ParseAFM.h - * - * This header file is used in conjuction with the parseAFM.c file. - * Together these files provide the functionality to parse Adobe Font - * Metrics files and store the information in predefined data structures. - * It is intended to work with an application program that needs font metric - * information. The program can be used as is by making a procedure call to - * parse an AFM file and have the data stored, or an application developer - * may wish to customize the code. - * - * This header file defines the data structures used as well as the key - * strings that are currently recognized by this version of the AFM parser. - * This program is based on the document "Adobe Font Metrics Files, - * Specification Version 2.0". - * - * AFM files are separated into distinct sections of different data. Because - * of this, the parseAFM program can parse a specified file to only save - * certain sections of information based on the application's needs. A record - * containing the requested information will be returned to the application. - * - * AFM files are divided into five sections of data: - * 1) The Global Font Information - * 2) The Character Metrics Information - * 3) The Track Kerning Data - * 4) The Pair-Wise Kerning Data - * 5) The Composite Character Data - * - * Basically, the application can request any of these sections independent - * of what other sections are requested. In addition, in recognizing that - * many applications will want ONLY the x-width of characters and not all - * of the other character metrics information, there is a way to receive - * only the width information so as not to pay the storage cost for the - * unwanted data. An application should never request both the - * "quick and dirty" char metrics (widths only) and the Character Metrics - * Information since the Character Metrics Information will contain all - * of the character widths as well. - * - * There is a procedure in parseAFM.c, called parseFile, that can be - * called from any application wishing to get information from the AFM File. - * This procedure expects 3 parameters: a vaild file descriptor, a pointer - * to a (FontInfo *) variable (for which space will be allocated and then - * will be filled in with the data requested), and a mask specifying - * which data from the AFM File should be saved in the FontInfo structure. - * - * The flags that can be used to set the appropriate mask are defined below. - * In addition, several commonly used masks have already been defined. - * - * History: - * original: DSM Thu Oct 20 17:39:59 PDT 1988 - * modified: DSM Mon Jul 3 14:17:50 PDT 1989 - * - added 'storageProblem' return code - * - fixed typos - */ - -#include - -namespace psp { - -/* your basic constants */ -#define EOL '\n' /* end-of-line indicator */ -#define MAX_NAME 4096 /* max length for identifiers */ -#define FLAGS int - - - -/* Flags that can be AND'ed together to specify exactly what - * information from the AFM file should be saved. - */ -#define P_G 0x01 /* 0000 0001 */ /* Global Font Info */ -#define P_W 0x02 /* 0000 0010 */ /* Character Widths ONLY */ -#define P_M 0x06 /* 0000 0110 */ /* All Char Metric Info */ -#define P_P 0x08 /* 0000 1000 */ /* Pair Kerning Info */ -#define P_T 0x10 /* 0001 0000 */ /* Track Kerning Info */ -#define P_C 0x20 /* 0010 0000 */ /* Composite Char Info */ - - -/* Commonly used flags - */ -#define P_GW (P_G | P_W) -#define P_GM (P_G | P_M) -#define P_GMP (P_G | P_M | P_P) -#define P_GMK (P_G | P_M | P_P | P_T) -#define P_ALL (P_G | P_M | P_P | P_T | P_C) - - - -/* Possible return codes from the parseFile procedure. - * - * ok means there were no problems parsing the file. - * - * parseError means that there was some kind of parsing error, but the - * parser went on. This could include problems like the count for any given - * section does not add up to how many entries there actually were, or - * there was a key that was not recognized. The return record may contain - * vaild data or it may not. - * - * earlyEOF means that an End of File was encountered before expected. This - * may mean that the AFM file had been truncated, or improperly formed. - * - * storageProblem means that there were problems allocating storage for - * the data structures that would have contained the AFM data. - */ - -enum afmError { ok = 0, parseError = -1, earlyEOF = -2, storageProblem = -3 }; - - -/************************* TYPES *********************************/ -/* Below are all of the data structure definitions. These structures - * try to map as closely as possible to grouping and naming of data - * in the AFM Files. - */ - - -/* Bounding box definition. Used for the Font BBox as well as the - * Character BBox. - */ -typedef struct -{ - int llx; /* lower left x-position */ - int lly; /* lower left y-position */ - int urx; /* upper right x-position */ - int ury; /* upper right y-position */ -} BBox; - - -/* Global Font information. - * The key that each field is associated with is in comments. For an - * explanation about each key and its value please refer to the AFM - * documentation (full title & version given above). - */ -typedef struct -{ - char *afmVersion; /* key: StartFontMetrics */ - char *fontName; /* key: FontName */ - char *fullName; /* key: FullName */ - char *familyName; /* key: FamilyName */ - char *weight; /* key: Weight */ - float italicAngle; /* key: ItalicAngle */ - bool isFixedPitch; /* key: IsFixedPitch */ - BBox fontBBox; /* key: FontBBox */ - int underlinePosition; /* key: UnderlinePosition */ - int underlineThickness; /* key: UnderlineThickness */ - char *version; /* key: Version */ - char *notice; /* key: Notice */ - char *encodingScheme; /* key: EncodingScheme */ - int capHeight; /* key: CapHeight */ - int xHeight; /* key: XHeight */ - int ascender; /* key: Ascender */ - int descender; /* key: Descender */ - int charwidth; /* key: CharWidth */ -} GlobalFontInfo; - - -/* Ligature definition is a linked list since any character can have - * any number of ligatures. - */ -typedef struct _t_ligature -{ - char *succ, *lig; - struct _t_ligature *next; -} Ligature; - - -/* Character Metric Information. This structure is used only if ALL - * character metric information is requested. If only the character - * widths is requested, then only an array of the character x-widths - * is returned. - * - * The key that each field is associated with is in comments. For an - * explanation about each key and its value please refer to the - * Character Metrics section of the AFM documentation (full title - * & version given above). - */ -typedef struct -{ - int code, /* key: C */ - wx, /* key: WX */ - w0x, /* key: W0X */ - wy; /* together wx and wy are associated with key: W */ - char *name; /* key: N */ - BBox charBBox; /* key: B */ - Ligature *ligs; /* key: L (linked list; not a fixed number of Ls */ -} CharMetricInfo; - - -/* Track kerning data structure. - * The fields of this record are the five values associated with every - * TrackKern entry. - * - * For an explanation about each value please refer to the - * Track Kerning section of the AFM documentation (full title - * & version given above). - */ -typedef struct -{ - int degree; - float minPtSize, - minKernAmt, - maxPtSize, - maxKernAmt; -} TrackKernData; - - -/* Pair Kerning data structure. - * The fields of this record are the four values associated with every - * KP entry. For KPX entries, the yamt will be zero. - * - * For an explanation about each value please refer to the - * Pair Kerning section of the AFM documentation (full title - * & version given above). - */ -typedef struct -{ - char *name1; - char *name2; - int xamt, - yamt; -} PairKernData; - - -/* PCC is a piece of a composite character. This is a sub structure of a - * compCharData described below. - * These fields will be filled in with the values from the key PCC. - * - * For an explanation about each key and its value please refer to the - * Composite Character section of the AFM documentation (full title - * & version given above). - */ -typedef struct -{ - char *pccName; - int deltax, - deltay; -} Pcc; - - -/* Composite Character Information data structure. - * The fields ccName and numOfPieces are filled with the values associated - * with the key CC. The field pieces points to an array (size = numOfPieces) - * of information about each of the parts of the composite character. That - * array is filled in with the values from the key PCC. - * - * For an explanation about each key and its value please refer to the - * Composite Character section of the AFM documentation (full title - * & version given above). - */ -typedef struct -{ - char *ccName; - int numOfPieces; - Pcc *pieces; -} CompCharData; - - -/* FontInfo - * Record type containing pointers to all of the other data - * structures containing information about a font. - * A a record of this type is filled with data by the - * parseFile function. - */ -typedef struct -{ - GlobalFontInfo *gfi; /* ptr to a GlobalFontInfo record */ - int *cwi; /* ptr to 256 element array of just char widths */ - int numOfChars; /* number of entries in char metrics array */ - CharMetricInfo *cmi; /* ptr to char metrics array */ - int numOfTracks; /* number to entries in track kerning array */ - TrackKernData *tkd; /* ptr to track kerning array */ - int numOfPairs; /* number to entries in pair kerning array */ - PairKernData *pkd; /* ptr to pair kerning array */ - int numOfComps; /* number to entries in comp char array */ - CompCharData *ccd; /* ptr to comp char array */ -} FontInfo; - - - -/************************* PROCEDURES ****************************/ - -/* Call this procedure to do the grunt work of parsing an AFM file. - * - * "fp" should be a valid file pointer to an AFM file. - * - * "fi" is a pointer to a pointer to a FontInfo record sturcture - * (defined above). Storage for the FontInfo structure will be - * allocated in parseFile and the structure will be filled in - * with the requested data from the AFM File. - * - * "flags" is a mask with bits set representing what data should - * be saved. Defined above are valid flags that can be used to set - * the mask, as well as a few commonly used masks. - * - * The possible return codes from parseFile are defined above. - */ - -int parseFile( const char* pFilename, FontInfo **fi, FLAGS flags ); -void freeFontInfo(FontInfo *fi); - -} // namespace diff --git a/vcl/unx/source/gdi/cdeint.cxx b/vcl/unx/source/gdi/cdeint.cxx deleted file mode 100644 index caa4867af874..000000000000 --- a/vcl/unx/source/gdi/cdeint.cxx +++ /dev/null @@ -1,241 +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_vcl.hxx" -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -CDEIntegrator::CDEIntegrator() -{ - meType = DtCDE; -} - -CDEIntegrator::~CDEIntegrator() -{ -} - -static int getHexDigit( const char c ) -{ - if( c >= '0' && c <= '9' ) - return (int)(c-'0'); - else if( c >= 'a' && c <= 'f' ) - return (int)(c-'a'+10); - else if( c >= 'A' && c <= 'F' ) - return (int)(c-'A'+10); - return -1; -} - - -void CDEIntegrator::GetSystemLook( AllSettings& rSettings ) -{ - static Color aColors[ 8 ]; - static sal_Bool bRead = sal_False; - static sal_Bool bValid = sal_False; - - if( ! bRead ) - { - // get used palette from xrdb - char **ppStringList = 0; - int nStringCount; - XTextProperty aTextProperty; - aTextProperty.value = 0; - int i; - - static Atom nResMgrAtom = XInternAtom( mpDisplay, "RESOURCE_MANAGER", False ); - - if( XGetTextProperty( mpDisplay, - RootWindow( mpDisplay, 0 ), - &aTextProperty, - nResMgrAtom ) - && aTextProperty.value - && XTextPropertyToStringList( &aTextProperty, &ppStringList, &nStringCount ) - ) - { - // format of ColorPalette resource: - // *n*ColorPalette: palettefile - - ByteString aLines; - for( i=0; i < nStringCount; i++ ) - aLines += ppStringList[i]; - for( i = aLines.GetTokenCount( '\n' )-1; i >= 0; i-- ) - { - ByteString aLine = aLines.GetToken( i, '\n' ); - int nIndex = aLine.Search( "ColorPalette" ); - if( nIndex != STRING_NOTFOUND ) - { - int nPos = nIndex; - - nIndex+=12; - const char* pStr = aLine.GetBuffer() +nIndex; - while( *pStr && isspace( *pStr ) && *pStr != ':' ) - { - pStr++; - nIndex++; - } - if( *pStr != ':' ) - continue; - pStr++, nIndex++; - for( ; *pStr && isspace( *pStr ); pStr++, nIndex++ ) - ; - if( ! *pStr ) - continue; - int nIndex2 = nIndex; - for( ; *pStr && ! isspace( *pStr ); pStr++, nIndex2++ ) - ; - ByteString aPaletteFile( aLine.Copy( nIndex, nIndex2 - nIndex ) ); - // extract number before ColorPalette; - for( ; nPos >= 0 && aLine.GetChar( nPos ) != '*'; nPos-- ) - ; - nPos--; - for( ; nPos >= 0 && aLine.GetChar( nPos ) != '*'; nPos-- ) - ; - int nNumber = aLine.Copy( ++nPos ).ToInt32(); - - DBG_TRACE2( "found palette %d in resource \"%s\"", nNumber, aLine.GetBuffer() ); - - // found no documentation what this number actually means; - // might be the screen number. 0 seems to be the right one - // in most cases. - if( nNumber ) - continue; - - DBG_TRACE1( "Palette file is \"%s\".\n", aPaletteFile.GetBuffer() ); - - String aPath( aHomeDir ); - aPath.AppendAscii( "/.dt/palettes/" ); - aPath += String( aPaletteFile, gsl_getSystemTextEncoding() ); - - SvFileStream aStream( aPath, STREAM_READ ); - if( ! aStream.IsOpen() ) - { - aPath = String::CreateFromAscii( "/usr/dt/palettes/" ); - aPath += String( aPaletteFile, gsl_getSystemTextEncoding() ); - aStream.Open( aPath, STREAM_READ ); - if( ! aStream.IsOpen() ) - continue; - } - - ByteString aBuffer; - for( nIndex = 0; nIndex < 8; nIndex++ ) - { - aStream.ReadLine( aBuffer ); - // format is "#RRRRGGGGBBBB" - - DBG_TRACE1( "\t\"%s\".\n", aBuffer.GetBuffer() ); - - if( aBuffer.Len() ) - { - const char* pArr = (const char*)aBuffer.GetBuffer()+1; - aColors[nIndex] = Color( - getHexDigit( pArr[1] ) - | ( getHexDigit( pArr[0] ) << 4 ), - getHexDigit( pArr[5] ) - | ( getHexDigit( pArr[4] ) << 4 ), - getHexDigit( pArr[9] ) - | ( getHexDigit( pArr[8] ) << 4 ) - ); - - DBG_TRACE1( "\t\t%lx\n", aColors[nIndex].GetColor() ); - } - } - - bValid = sal_True; - break; - } - } - } - - if( ppStringList ) - XFreeStringList( ppStringList ); - if( aTextProperty.value ) - XFree( aTextProperty.value ); - } - - - StyleSettings aStyleSettings = rSettings.GetStyleSettings(); - // #i48001# set a default blink rate - aStyleSettings.SetCursorBlinkTime( 500 ); - if (bValid) - { - aStyleSettings.SetActiveColor( aColors[0] ); - aStyleSettings.SetActiveColor2( aColors[0] ); - aStyleSettings.SetActiveBorderColor( aColors[0] ); - - aStyleSettings.SetDeactiveColor( aColors[0] ); - aStyleSettings.SetDeactiveColor2( aColors[0] ); - aStyleSettings.SetDeactiveBorderColor( aColors[0] ); - - Color aActive = - aColors[ 0 ].GetBlue() < 128 || - aColors[ 0 ].GetGreen() < 128 || - aColors[ 0 ].GetRed() < 128 - ? Color( COL_WHITE ) : Color( COL_BLACK ); - Color aDeactive = - aColors[ 1 ].GetBlue() < 128 || - aColors[ 1 ].GetGreen() < 128 || - aColors[ 1 ].GetRed() < 128 - ? Color( COL_WHITE ) : Color( COL_BLACK ); - aStyleSettings.SetActiveTextColor( aActive ); - aStyleSettings.SetDeactiveTextColor( aDeactive ); - - aStyleSettings.SetDialogTextColor( aDeactive ); - aStyleSettings.SetMenuTextColor( aDeactive ); - aStyleSettings.SetMenuBarTextColor( aDeactive ); - aStyleSettings.SetButtonTextColor( aDeactive ); - aStyleSettings.SetRadioCheckTextColor( aDeactive ); - aStyleSettings.SetGroupTextColor( aDeactive ); - aStyleSettings.SetLabelTextColor( aDeactive ); - aStyleSettings.SetInfoTextColor( aDeactive ); - - aStyleSettings.Set3DColors( aColors[1] ); - aStyleSettings.SetFaceColor( aColors[1] ); - aStyleSettings.SetDialogColor( aColors[1] ); - aStyleSettings.SetMenuColor( aColors[1] ); - aStyleSettings.SetMenuBarColor( aColors[1] ); - if ( aStyleSettings.GetFaceColor() == COL_LIGHTGRAY ) - aStyleSettings.SetCheckedColor( Color( 0xCC, 0xCC, 0xCC ) ); - else - { - // calculate Checked color - Color aColor2 = aStyleSettings.GetLightColor(); - BYTE nRed = (BYTE)(((USHORT)aColors[1].GetRed() + (USHORT)aColor2.GetRed())/2); - BYTE nGreen = (BYTE)(((USHORT)aColors[1].GetGreen() + (USHORT)aColor2.GetGreen())/2); - BYTE nBlue = (BYTE)(((USHORT)aColors[1].GetBlue() + (USHORT)aColor2.GetBlue())/2); - aStyleSettings.SetCheckedColor( Color( nRed, nGreen, nBlue ) ); - } - } - rSettings.SetStyleSettings( aStyleSettings ); -} diff --git a/vcl/unx/source/gdi/dtint.cxx b/vcl/unx/source/gdi/dtint.cxx deleted file mode 100644 index 5f0dbd50ea17..000000000000 --- a/vcl/unx/source/gdi/dtint.cxx +++ /dev/null @@ -1,139 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_vcl.hxx" - -#include -#include -#include -#include -#include - -#include -#include - -#ifdef USE_CDE -#include -#endif -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include - -// NETBSD has no RTLD_GLOBAL -#ifndef RTLD_GLOBAL -#define DLOPEN_MODE (RTLD_LAZY) -#else -#define DLOPEN_MODE (RTLD_GLOBAL | RTLD_LAZY) -#endif - - -using namespace rtl; -using namespace vcl_sal; - -String DtIntegrator::aHomeDir; - -DtIntegrator::DtIntegrator() : - meType( DtGeneric ), - mnSystemLookCommandProcess( -1 ) -{ - mpSalDisplay = GetX11SalData()->GetDisplay(); - mpDisplay = mpSalDisplay->GetDisplay(); - OUString aDir; - oslSecurity aCur = osl_getCurrentSecurity(); - if( aCur ) - { - osl_getHomeDir( aCur, &aDir.pData ); - osl_freeSecurityHandle( aCur ); - OUString aSysDir; - osl_getSystemPathFromFileURL( aDir.pData, &aSysDir.pData ); - aHomeDir = aSysDir; - } -} - -DtIntegrator::~DtIntegrator() -{ -} - -DtIntegrator* DtIntegrator::CreateDtIntegrator() -{ - /* - * #i22061# override desktop detection - * if environment variable OOO_FORCE_DESKTOP is set - * to one of "cde" "kde" "gnome" then autodetection - * is overridden. - */ - static const char* pOverride = getenv( "OOO_FORCE_DESKTOP" ); - if( pOverride && *pOverride ) - { - OString aOver( pOverride ); - -#if USE_CDE - if( aOver.equalsIgnoreAsciiCase( "cde" ) ) - return new CDEIntegrator(); -#endif - if( aOver.equalsIgnoreAsciiCase( "none" ) ) - return new DtIntegrator(); - } - -#ifdef USE_CDE - void* pLibrary = NULL; - - // check dt type - // CDE - SalDisplay* pSalDisplay = GetX11SalData()->GetDisplay(); - Display* pDisplay = pSalDisplay->GetDisplay(); - Atom nDtAtom = XInternAtom( pDisplay, "_DT_WM_READY", True ); - if( nDtAtom && ( pLibrary = dlopen( "/usr/dt/lib/libDtSvc.so", DLOPEN_MODE ) ) ) - { - dlclose( pLibrary ); - return new CDEIntegrator(); - } -#endif - - // default: generic implementation - return new DtIntegrator(); -} - -void DtIntegrator::GetSystemLook( AllSettings& rSettings ) -{ - // #i48001# set a default blink rate - StyleSettings aStyleSettings = rSettings.GetStyleSettings(); - aStyleSettings.SetCursorBlinkTime( 500 ); - rSettings.SetStyleSettings( aStyleSettings ); -} diff --git a/vcl/unx/source/gdi/dtsetenum.hxx b/vcl/unx/source/gdi/dtsetenum.hxx deleted file mode 100644 index 5406ac870a43..000000000000 --- a/vcl/unx/source/gdi/dtsetenum.hxx +++ /dev/null @@ -1,146 +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 _VCL_DTSETENUM_HXX -#define _VCL_DTSETENUM_HXX - -enum DtSetEnum -{ - /* settings for mouse */ - MouseOptions = 1, - DoubleClickTime, - DoubleClickWidth, - DoubleClickHeight, - StartDragWidth, - StartDragHeight, - DragMoveCode, - DragCopyCode, - DragLinkCode, - ContextMenuCode, - ContextMenuClicks, - ContextMenuDown, - ScrollRepeat, - ButtonStartRepeat, - ButtonRepeat, - ActionDelay, - MenuDelay, - Follow, - MiddleButtonAction, - /* settings for keyboard */ - KeyboardOptions=64, - /* style settings */ - StyleOptions = 128, - BorderSize, - TitleHeight, - FloatTitleHeight, - TearOffTitleHeight, - MenuBarHeight, - ScrollBarSize, - SpinSize, - SplitSize, - IconHorzSpace, - IconVertSpace, - CursorSize, - CursorBlinkTime, - ScreenZoom, - ScreenFontZoom, - LogoDisplayTime, - DragFullOptions, - AnimationOptions, - SelectionOptions, - DisplayOptions, - AntialiasingMinPixelHeight, - /* style colors */ - AllTextColors, /* convenience, sets all control text colors */ - AllBackColors, /* convenience, sets all control background colors */ - ThreeDColor, - FaceColor, - CheckedColor, - LightColor, - LightBorderColor, - ShadowColor, - DarkShadowColor, - ButtonTextColor, - RadioCheckTextColor, - GroupTextColor, - LabelTextColor, - InfoTextColor, - WindowColor, - WindowTextColor, - DialogColor, - DialogTextColor, - WorkspaceColor, - FieldColor, - FieldTextColor, - ActiveColor, - ActiveColor2, - ActiveTextColor, - ActiveBorderColor, - DeactiveColor, - DeactiveColor2, - DeactiveTextColor, - DeactiveBorderColor, - HighlightColor, - HighlightTextColor, - DisableColor, - HelpColor, - HelpTextColor, - MenuColor, - MenuBarColor, - MenuTextColor, - MenuHighlightColor, - MenuHighlightTextColor, - LinkColor, - VisitedLinkColor, - HighlightLinkColor, - HighContrastMode, - /* style fonts */ - UIFont, /* convenience, sets all fonts but TitleFont and FloatTitleFont */ - AppFont, - HelpFont, - TitleFont, - FloatTitleFont, - MenuFont, - ToolFont, - GroupFont, - LabelFont, - InfoFont, - RadioCheckFont, - PushButtonFont, - FieldFont, - IconFont, - /* style numeric styles */ - RadioButtonStyle, - CheckBoxStyle, - PushButtonStyle, - TabControlStyle, - /* toolbar style */ - ToolbarIconSize - -}; - -#endif // _VCL_DTSETENUM_HXX diff --git a/vcl/unx/source/gdi/gcach_xpeer.cxx b/vcl/unx/source/gdi/gcach_xpeer.cxx deleted file mode 100644 index a69a2426b519..000000000000 --- a/vcl/unx/source/gdi/gcach_xpeer.cxx +++ /dev/null @@ -1,682 +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_vcl.hxx" - -#include -#include -#include - -#include -#include -#include -#include -#include - -// =========================================================================== - -// all glyph specific data needed by the XGlyphPeer is quite trivial -// with one exception: if multiple screens are involved and non-antialiased -// glyph rendering is active, then we need screen specific pixmaps -struct MultiScreenGlyph -{ - const RawBitmap* mpRawBitmap; - Glyph maXRGlyphId; - Pixmap maPixmaps[1]; // [mnMaxScreens] -}; - -// =========================================================================== - -X11GlyphPeer::X11GlyphPeer() -: mpDisplay( GetX11SalData()->GetDisplay()->GetDisplay() ) -, mnMaxScreens(0) -, mnDefaultScreen(0) -, mnExtByteCount(0) -, mnForcedAA(0) -, mnUsingXRender(0) -{ - maRawBitmap.mnAllocated = 0; - maRawBitmap.mpBits = NULL; - if( !mpDisplay ) - return; - - SalDisplay& rSalDisplay = *GetX11SalData()->GetDisplay(); - mpDisplay = rSalDisplay.GetDisplay(); - mnMaxScreens = rSalDisplay.GetScreenCount(); - if( mnMaxScreens > MAX_GCACH_SCREENS ) - mnMaxScreens = MAX_GCACH_SCREENS; - // if specific glyph data has to be kept for many screens - // then prepare the allocation of MultiScreenGlyph objects - if( mnMaxScreens > 1 ) - mnExtByteCount = sizeof(MultiScreenGlyph) + sizeof(Pixmap) * (mnMaxScreens - 1); - mnDefaultScreen = rSalDisplay.GetDefaultScreenNumber(); - - InitAntialiasing(); -} - -// --------------------------------------------------------------------------- - -X11GlyphPeer::~X11GlyphPeer() -{ - SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); - Display* const pX11Disp = pSalDisp->GetDisplay(); - XRenderPeer& rRenderPeer = XRenderPeer::GetInstance(); - for( int i = 0; i < mnMaxScreens; i++ ) - { - SalDisplay::RenderEntryMap& rMap = pSalDisp->GetRenderEntries( i ); - for( SalDisplay::RenderEntryMap::iterator it = rMap.begin(); it != rMap.end(); ++it ) - { - if( it->second.m_aPixmap ) - ::XFreePixmap( pX11Disp, it->second.m_aPixmap ); - if( it->second.m_aPicture ) - rRenderPeer.FreePicture( it->second.m_aPicture ); - } - rMap.clear(); - } -} - -// --------------------------------------------------------------------------- - -void X11GlyphPeer::InitAntialiasing() -{ - int nEnvAntiAlias = 0; - const char* pEnvAntiAlias = getenv( "SAL_ANTIALIAS_DISABLE" ); - if( pEnvAntiAlias ) - { - nEnvAntiAlias = atoi( pEnvAntiAlias ); - if( nEnvAntiAlias == 0 ) - return; - } - - mnUsingXRender = 0; - mnForcedAA = 0; - - // enable XRENDER accelerated aliasing on screens that support it - // unless it explicitly disabled by an environment variable - if( (nEnvAntiAlias & 2) == 0 ) - mnUsingXRender = XRenderPeer::GetInstance().InitRenderText(); - - // else enable client side antialiasing for these screens - // unless it is explicitly disabled by an environment variable - if( (nEnvAntiAlias & 1) != 0 ) - return; - - // enable client side antialiasing for screen visuals that are suitable - // mnForcedAA is a bitmask of screens enabled for client side antialiasing - mnForcedAA = (~(~0U << mnMaxScreens)) ^ mnUsingXRender; - SalDisplay& rSalDisplay = *GetX11SalData()->GetDisplay(); - for( int nScreen = 0; nScreen < mnMaxScreens; ++nScreen) - { - Visual* pVisual = rSalDisplay.GetVisual( nScreen ).GetVisual(); - XVisualInfo aXVisualInfo; - aXVisualInfo.visualid = pVisual->visualid; - int nVisuals = 0; - XVisualInfo* pXVisualInfo = XGetVisualInfo( mpDisplay, VisualIDMask, &aXVisualInfo, &nVisuals ); - for( int i = nVisuals; --i >= 0; ) - { - if( ((pXVisualInfo[i].c_class==PseudoColor) || (pXVisualInfo[i].depth<24)) - && ((pXVisualInfo[i].c_class>GrayScale) || (pXVisualInfo[i].depth!=8) ) ) - mnForcedAA &= ~(1U << nScreen); - } - if( pXVisualInfo != NULL ) - XFree( pXVisualInfo ); - } -} - -// =========================================================================== - -enum { INFO_EMPTY=0, INFO_PIXMAP, INFO_XRENDER, INFO_RAWBMP, INFO_MULTISCREEN }; -static const Glyph NO_GLYPHID = 0; -static RawBitmap* const NO_RAWBMP = NULL; -static const Pixmap NO_PIXMAP = ~0; - -// --------------------------------------------------------------------------- - -MultiScreenGlyph* X11GlyphPeer::PrepareForMultiscreen( ExtGlyphData& rEGD ) const -{ - // prepare to store screen specific pixmaps - MultiScreenGlyph* pMSGlyph = (MultiScreenGlyph*)new char[ mnExtByteCount ]; - - // init the glyph formats - pMSGlyph->mpRawBitmap = NO_RAWBMP; - pMSGlyph->maXRGlyphId = NO_GLYPHID; - for( int i = 0; i < mnMaxScreens; ++i ) - pMSGlyph->maPixmaps[i] = NO_PIXMAP; - // reuse already available glyph formats - if( rEGD.meInfo == INFO_XRENDER ) - pMSGlyph->maXRGlyphId = reinterpret_cast(rEGD.mpData); - else if( rEGD.meInfo == INFO_RAWBMP ) - pMSGlyph->mpRawBitmap = reinterpret_cast(rEGD.mpData); - else if( rEGD.meInfo == INFO_PIXMAP ) - { - Pixmap aPixmap = reinterpret_cast(rEGD.mpData); - if( aPixmap != None ) - // pixmap for the default screen is available - pMSGlyph->maPixmaps[ mnDefaultScreen ] = aPixmap; - else // empty pixmap for all screens is available - for( int i = 0; i < mnMaxScreens; ++i ) - pMSGlyph->maPixmaps[ i ] = None; - } - // enable use of multiscreen glyph - rEGD.mpData = (void*)pMSGlyph; - rEGD.meInfo = INFO_MULTISCREEN; - - return pMSGlyph; - } - -// --------------------------------------------------------------------------- - -Glyph X11GlyphPeer::GetRenderGlyph( const GlyphData& rGD ) const -{ - Glyph aGlyphId = NO_GLYPHID; - const ExtGlyphData& rEGD = rGD.ExtDataRef(); - if( rEGD.meInfo == INFO_XRENDER ) - aGlyphId = reinterpret_cast(rEGD.mpData); - else if( rEGD.meInfo == INFO_MULTISCREEN ) - aGlyphId = reinterpret_cast(rEGD.mpData)->maXRGlyphId; - return aGlyphId; -} - -// --------------------------------------------------------------------------- - -void X11GlyphPeer::SetRenderGlyph( GlyphData& rGD, Glyph aGlyphId ) const -{ - ExtGlyphData& rEGD = rGD.ExtDataRef(); - switch( rEGD.meInfo ) - { - case INFO_EMPTY: - rEGD.meInfo = INFO_XRENDER; - // fall through - case INFO_XRENDER: - rEGD.mpData = reinterpret_cast(aGlyphId); - break; - case INFO_PIXMAP: - case INFO_RAWBMP: - PrepareForMultiscreen( rEGD ); - // fall through - case INFO_MULTISCREEN: - reinterpret_cast(rEGD.mpData)->maXRGlyphId = aGlyphId; - break; - default: - break; // cannot happen... - } -} - -// --------------------------------------------------------------------------- - -const RawBitmap* X11GlyphPeer::GetRawBitmap( const GlyphData& rGD ) const -{ - const RawBitmap* pRawBitmap = NO_RAWBMP; - const ExtGlyphData& rEGD = rGD.ExtDataRef(); - if( rEGD.meInfo == INFO_RAWBMP ) - pRawBitmap = reinterpret_cast(rEGD.mpData); - else if( rEGD.meInfo == INFO_MULTISCREEN ) - pRawBitmap = reinterpret_cast(rEGD.mpData)->mpRawBitmap; - return pRawBitmap; -} - -// --------------------------------------------------------------------------- - -void X11GlyphPeer::SetRawBitmap( GlyphData& rGD, const RawBitmap* pRawBitmap ) const -{ - ExtGlyphData& rEGD = rGD.ExtDataRef(); - switch( rEGD.meInfo ) - { - case INFO_EMPTY: - rEGD.meInfo = INFO_RAWBMP; - // fall through - case INFO_RAWBMP: - rEGD.mpData = (void*)pRawBitmap; - break; - case INFO_PIXMAP: - case INFO_XRENDER: - PrepareForMultiscreen( rEGD ); - // fall through - case INFO_MULTISCREEN: - reinterpret_cast(rEGD.mpData)->mpRawBitmap = pRawBitmap; - break; - default: - // cannot happen... - break; - } -} - -// --------------------------------------------------------------------------- - -Pixmap X11GlyphPeer::GetPixmap( const GlyphData& rGD, int nScreen ) const -{ - Pixmap aPixmap = NO_PIXMAP; - const ExtGlyphData& rEGD = rGD.ExtDataRef(); - if( (rEGD.meInfo == INFO_PIXMAP) && (nScreen == mnDefaultScreen) ) - aPixmap = (Pixmap)rEGD.mpData; - else if( rEGD.meInfo == INFO_MULTISCREEN ) - aPixmap = (Pixmap)(reinterpret_cast(rEGD.mpData)->maPixmaps[nScreen]); - return aPixmap; -} - -// --------------------------------------------------------------------------- - -void X11GlyphPeer::SetPixmap( GlyphData& rGD, Pixmap aPixmap, int nScreen ) const -{ - if( aPixmap == NO_PIXMAP ) - aPixmap = None; - - ExtGlyphData& rEGD = rGD.ExtDataRef(); - if( (rEGD.meInfo == INFO_EMPTY) && (nScreen == mnDefaultScreen) ) - { - rEGD.meInfo = INFO_PIXMAP; - rEGD.mpData = (void*)aPixmap; - } - else - { - MultiScreenGlyph* pMSGlyph; - if( rEGD.meInfo == INFO_MULTISCREEN ) - pMSGlyph = reinterpret_cast(rEGD.mpData); - else - pMSGlyph = PrepareForMultiscreen( rEGD ); - - pMSGlyph->maPixmaps[ nScreen ] = aPixmap; - } -} - -// --------------------------------------------------------------------------- - -void X11GlyphPeer::RemovingFont( ServerFont& rServerFont ) -{ - void* pFontExt = rServerFont.GetExtPointer(); - switch( rServerFont.GetExtInfo() ) - { - case INFO_PIXMAP: - case INFO_RAWBMP: - // nothing to do - break; - case INFO_MULTISCREEN: - // cannot happen... - break; - - case INFO_XRENDER: - XRenderPeer::GetInstance().FreeGlyphSet( (GlyphSet)pFontExt ); - break; - } - - rServerFont.SetExtended( INFO_EMPTY, NULL ); -} - -// --------------------------------------------------------------------------- - -// notification to clean up GlyphPeer resources for this glyph -void X11GlyphPeer::RemovingGlyph( ServerFont& /*rServerFont*/, GlyphData& rGlyphData, int /*nGlyphIndex*/ ) -{ - // nothing to do if the GlyphPeer hasn't allocated resources for the glyph - if( rGlyphData.ExtDataRef().meInfo == INFO_EMPTY ) - return; - - const GlyphMetric& rGM = rGlyphData.GetMetric(); - const int nWidth = rGM.GetSize().Width(); - const int nHeight = rGM.GetSize().Height(); - - void* pGlyphExt = rGlyphData.ExtDataRef().mpData; - switch( rGlyphData.ExtDataRef().meInfo ) - { - case INFO_PIXMAP: - { - Pixmap aPixmap = (Pixmap)pGlyphExt; - if( aPixmap != None ) - { - XFreePixmap( mpDisplay, aPixmap ); - mnBytesUsed -= nHeight * ((nWidth + 7) >> 3); - } - } - break; - - case INFO_MULTISCREEN: - { - MultiScreenGlyph* pMSGlyph = reinterpret_cast(pGlyphExt); - for( int i = 0; i < mnMaxScreens; ++i) - { - if( pMSGlyph->maPixmaps[i] == NO_PIXMAP ) - continue; - if( pMSGlyph->maPixmaps[i] == None ) - continue; - XFreePixmap( mpDisplay, pMSGlyph->maPixmaps[i] ); - mnBytesUsed -= nHeight * ((nWidth + 7) >> 3); - } - delete pMSGlyph->mpRawBitmap; - // Glyph nGlyphId = (Glyph)rGlyphData.GetExtPointer(); - // XRenderPeer::GetInstance().FreeGlyph( aGlyphSet, &nGlyphId ); - delete[] pMSGlyph; // it was allocated with new char[] - } - break; - - case INFO_RAWBMP: - { - RawBitmap* pRawBitmap = (RawBitmap*)pGlyphExt; - if( pRawBitmap != NULL ) - { - mnBytesUsed -= pRawBitmap->mnScanlineSize * pRawBitmap->mnHeight; - mnBytesUsed -= sizeof(RawBitmap); - delete pRawBitmap; - } - } - break; - - case INFO_XRENDER: - { - // Glyph nGlyphId = (Glyph)rGlyphData.GetExtPointer(); - // XRenderPeer::GetInstance().FreeGlyph( aGlyphSet, &nGlyphId ); - mnBytesUsed -= nHeight * ((nWidth + 3) & ~3); - } - break; - } - - if( mnBytesUsed < 0 ) // TODO: eliminate nBytesUsed calc mismatch - mnBytesUsed = 0; - - rGlyphData.ExtDataRef() = ExtGlyphData(); -} - -// --------------------------------------------------------------------------- - -bool X11GlyphPeer::ForcedAntialiasing( const ServerFont& rServerFont, int nScreen ) const -{ - bool bForceOk = rServerFont.GetAntialiasAdvice(); - // maximum size for antialiasing is 250 pixels - bForceOk &= (rServerFont.GetFontSelData().mnHeight < 250); - return (bForceOk && ((mnForcedAA >> nScreen) & 1)); -} - -// --------------------------------------------------------------------------- - -GlyphSet X11GlyphPeer::GetGlyphSet( ServerFont& rServerFont, int nScreen ) -{ - if( (nScreen >= 0) && ((mnUsingXRender >> nScreen) & 1) == 0 ) - return 0; - - GlyphSet aGlyphSet; - - switch( rServerFont.GetExtInfo() ) - { - case INFO_XRENDER: - aGlyphSet = (GlyphSet)rServerFont.GetExtPointer(); - break; - - case INFO_EMPTY: - { - // antialiasing for reasonable font heights only - // => prevents crashes caused by X11 requests >= 256k - // => prefer readablity of hinted glyphs at small sizes - // => prefer "grey clouds" to "black clouds" at very small sizes - int nHeight = rServerFont.GetFontSelData().mnHeight; - if( nHeight<250 && rServerFont.GetAntialiasAdvice() ) - { - aGlyphSet = XRenderPeer::GetInstance().CreateGlyphSet(); - rServerFont.SetExtended( INFO_XRENDER, (void*)aGlyphSet ); - } - else - aGlyphSet = 0; - } - break; - - default: - aGlyphSet = 0; - break; - } - - return aGlyphSet; -} - -// --------------------------------------------------------------------------- - -Pixmap X11GlyphPeer::GetPixmap( ServerFont& rServerFont, int nGlyphIndex, int nReqScreen ) -{ - if( rServerFont.IsGlyphInvisible( nGlyphIndex ) ) - return None; - - GlyphData& rGlyphData = rServerFont.GetGlyphData( nGlyphIndex ); - Pixmap aPixmap = GetPixmap( rGlyphData, nReqScreen ); - if( aPixmap == NO_PIXMAP ) - { - aPixmap = None; - if( rServerFont.GetGlyphBitmap1( nGlyphIndex, maRawBitmap ) ) - { - // #94666# circumvent bug in some X11 systems, e.g. XF410.LynxEM.v163 - ULONG nPixmapWidth = 8 * maRawBitmap.mnScanlineSize - 1; - nPixmapWidth = Max( nPixmapWidth, maRawBitmap.mnWidth ); - - rGlyphData.SetSize( Size( nPixmapWidth, maRawBitmap.mnHeight ) ); - rGlyphData.SetOffset( +maRawBitmap.mnXOffset, +maRawBitmap.mnYOffset ); - - const ULONG nBytes = maRawBitmap.mnHeight * maRawBitmap.mnScanlineSize; - if( nBytes > 0 ) - { - // conversion table LSB<->MSB (for XCreatePixmapFromData) - static const unsigned char lsb2msb[256] = - { - 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, - 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0, - 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, - 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, - 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4, - 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4, - 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, - 0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC, - 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, - 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2, - 0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA, - 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA, - 0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6, - 0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6, - 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE, - 0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE, - 0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1, - 0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1, - 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, - 0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9, - 0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5, - 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5, - 0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED, - 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD, - 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3, - 0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3, - 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, - 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB, - 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, - 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7, - 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, - 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF - }; - - unsigned char* pTemp = maRawBitmap.mpBits; - for( int i = nBytes; --i >= 0; ++pTemp ) - *pTemp = lsb2msb[ *pTemp ]; - - // often a glyph pixmap is only needed on the default screen - // => optimize for this common case - int nMinScreen = 0; - int nEndScreen = mnMaxScreens; - if( nReqScreen == mnDefaultScreen ) { - nMinScreen = mnDefaultScreen; - nEndScreen = mnDefaultScreen + 1; - } - // prepare glyph pixmaps for the different screens - for( int i = nMinScreen; i < nEndScreen; ++i ) - { - // don't bother if the pixmap is already there - if( GetPixmap( rGlyphData, i ) != NO_PIXMAP ) - continue; - // create the glyph pixmap - Pixmap aScreenPixmap = XCreatePixmapFromBitmapData( mpDisplay, - RootWindow( mpDisplay, i ), (char*)maRawBitmap.mpBits, - nPixmapWidth, maRawBitmap.mnHeight, 1, 0, 1 ); - // and cache it as glyph specific data - SetPixmap( rGlyphData, aScreenPixmap, i ); - mnBytesUsed += nBytes; - if( i == nReqScreen ) - aPixmap = aScreenPixmap; - } - } - } - else - { - // fall back to .notdef glyph - if( nGlyphIndex != 0 ) // recurse only once - aPixmap = GetPixmap( rServerFont, 0, nReqScreen ); - - if( aPixmap == NO_PIXMAP ) - aPixmap = None; - } - } - - return aPixmap; -} - -// --------------------------------------------------------------------------- - -const RawBitmap* X11GlyphPeer::GetRawBitmap( ServerFont& rServerFont, - int nGlyphIndex ) -{ - if( rServerFont.IsGlyphInvisible( nGlyphIndex ) ) - return NO_RAWBMP; - - GlyphData& rGlyphData = rServerFont.GetGlyphData( nGlyphIndex ); - - const RawBitmap* pRawBitmap = GetRawBitmap( rGlyphData ); - if( pRawBitmap == NO_RAWBMP ) - { - RawBitmap* pNewBitmap = new RawBitmap; - if( rServerFont.GetGlyphBitmap8( nGlyphIndex, *pNewBitmap ) ) - { - pRawBitmap = pNewBitmap; - mnBytesUsed += pNewBitmap->mnScanlineSize * pNewBitmap->mnHeight; - mnBytesUsed += sizeof(pNewBitmap); - } - else - { - delete pNewBitmap; - // fall back to .notdef glyph - if( nGlyphIndex != 0 ) // recurse only once - pRawBitmap = GetRawBitmap( rServerFont, 0 ); - } - - SetRawBitmap( rGlyphData, pRawBitmap ); - } - - return pRawBitmap; -} - -// --------------------------------------------------------------------------- - -Glyph X11GlyphPeer::GetGlyphId( ServerFont& rServerFont, int nGlyphIndex ) -{ - if( rServerFont.IsGlyphInvisible( nGlyphIndex ) ) - return NO_GLYPHID; - - GlyphData& rGlyphData = rServerFont.GetGlyphData( nGlyphIndex ); - - Glyph aGlyphId = GetRenderGlyph( rGlyphData ); - if( aGlyphId == NO_GLYPHID ) - { - // prepare GlyphInfo and Bitmap - if( rServerFont.GetGlyphBitmap8( nGlyphIndex, maRawBitmap ) ) - { - XGlyphInfo aGlyphInfo; - aGlyphInfo.width = maRawBitmap.mnWidth; - aGlyphInfo.height = maRawBitmap.mnHeight; - aGlyphInfo.x = -maRawBitmap.mnXOffset; - aGlyphInfo.y = -maRawBitmap.mnYOffset; - - rGlyphData.SetSize( Size( maRawBitmap.mnWidth, maRawBitmap.mnHeight ) ); - rGlyphData.SetOffset( +maRawBitmap.mnXOffset, +maRawBitmap.mnYOffset ); - - const GlyphMetric& rGM = rGlyphData.GetMetric(); - aGlyphInfo.xOff = +rGM.GetDelta().X(); - aGlyphInfo.yOff = +rGM.GetDelta().Y(); - - // upload glyph bitmap to server - GlyphSet aGlyphSet = GetGlyphSet( rServerFont, -1 ); - - aGlyphId = nGlyphIndex & 0x00FFFFFF; - const ULONG nBytes = maRawBitmap.mnScanlineSize * maRawBitmap.mnHeight; - XRenderPeer::GetInstance().AddGlyph( aGlyphSet, aGlyphId, - aGlyphInfo, (char*)maRawBitmap.mpBits, nBytes ); - mnBytesUsed += nBytes; - } - else - { - // fall back to .notdef glyph - if( nGlyphIndex != 0 ) // recurse only once - aGlyphId = GetGlyphId( rServerFont, 0 ); - } - - SetRenderGlyph( rGlyphData, aGlyphId ); - } - - return aGlyphId; -} - -// =========================================================================== - -X11GlyphCache::X11GlyphCache( X11GlyphPeer& rPeer ) -: GlyphCache( rPeer ) -{ -} - -// --------------------------------------------------------------------------- - -static X11GlyphPeer* pX11GlyphPeer = NULL; -static X11GlyphCache* pX11GlyphCache = NULL; - -X11GlyphCache& X11GlyphCache::GetInstance() -{ - if( !pX11GlyphCache ) - { - pX11GlyphPeer = new X11GlyphPeer(); - pX11GlyphCache = new X11GlyphCache( *pX11GlyphPeer ); - } - return *pX11GlyphCache; -} - -// --------------------------------------------------------------------------- - -void X11GlyphCache::KillInstance() -{ - delete pX11GlyphCache; - delete pX11GlyphPeer; - pX11GlyphCache = NULL; - pX11GlyphPeer = NULL; -} - -// =========================================================================== - -void X11SalGraphics::releaseGlyphPeer() -{ - X11GlyphCache::KillInstance(); -} - -// =========================================================================== - diff --git a/vcl/unx/source/gdi/gcach_xpeer.hxx b/vcl/unx/source/gdi/gcach_xpeer.hxx deleted file mode 100644 index 13277fa975de..000000000000 --- a/vcl/unx/source/gdi/gcach_xpeer.hxx +++ /dev/null @@ -1,94 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_GCACH_XPEER_HXX -#define _SV_GCACH_XPEER_HXX - -#include - -#include -#include -#include -#include - - -class SalDisplay; -struct MultiScreenGlyph; - -class X11GlyphPeer -: public GlyphCachePeer -{ -public: - X11GlyphPeer(); - virtual ~X11GlyphPeer(); - - Pixmap GetPixmap( ServerFont&, int nGlyphIndex, int nScreen ); - const RawBitmap* GetRawBitmap( ServerFont&, int nGlyphIndex ); - bool ForcedAntialiasing( const ServerFont&, int nScreen ) const; - - GlyphSet GetGlyphSet( ServerFont&, int nScreen ); - Glyph GetGlyphId( ServerFont&, int nGlyphIndex ); - -protected: - void InitAntialiasing(); - - virtual void RemovingFont( ServerFont& ); - virtual void RemovingGlyph( ServerFont&, GlyphData&, int nGlyphIndex ); - - MultiScreenGlyph* PrepareForMultiscreen( ExtGlyphData& ) const; - void SetRenderGlyph( GlyphData&, Glyph ) const; - void SetRawBitmap( GlyphData&, const RawBitmap* ) const; - void SetPixmap( GlyphData&, Pixmap, int nScreen ) const; - Glyph GetRenderGlyph( const GlyphData& ) const; - const RawBitmap* GetRawBitmap( const GlyphData& ) const; - Pixmap GetPixmap( const GlyphData&, int nScreen ) const; - -private: - Display* mpDisplay; - - // thirty-two screens should be enough for everyone... - static const int MAX_GCACH_SCREENS = 32; - int mnMaxScreens; - int mnDefaultScreen; - int mnExtByteCount; - RawBitmap maRawBitmap; - sal_uInt32 mnForcedAA; - sal_uInt32 mnUsingXRender; -}; - -class X11GlyphCache : public GlyphCache -{ -public: - X11GlyphPeer& GetPeer() { return reinterpret_cast( mrPeer ); } -static X11GlyphCache& GetInstance(); -static void KillInstance(); - -private: - X11GlyphCache( X11GlyphPeer& ); -}; - -#endif // _SV_GCACH_XPEER_HXX diff --git a/vcl/unx/source/gdi/makefile.mk b/vcl/unx/source/gdi/makefile.mk deleted file mode 100644 index 123fcbcf9131..000000000000 --- a/vcl/unx/source/gdi/makefile.mk +++ /dev/null @@ -1,101 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=salgdi - -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"!="unx" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"!="unx" - -SLOFILES= \ - $(SLO)$/salgdi2.obj \ - $(SLO)$/salbmp.obj \ - $(SLO)$/salgdi.obj \ - $(SLO)$/salvd.obj \ - $(SLO)$/dtint.obj \ - $(SLO)$/salcvt.obj \ - $(SLO)$/salgdi3.obj \ - $(SLO)$/gcach_xpeer.obj \ - $(SLO)$/xrender_peer.obj \ - $(SLO)$/pspgraphics.obj - -EXCEPTIONSFILES=\ - $(SLO)$/salgdi.obj \ - $(SLO)$/salbmp.obj \ - $(SLO)$/salgdi3.obj \ - $(SLO)$/salcvt.obj - -SLOFILES+=$(SLO)$/salprnpsp.obj -EXCEPTIONSFILES+=$(SLO)$/salprnpsp.obj - -.IF "$(OS)"=="SOLARIS" -SLOFILES+=$(SLO)$/cdeint.obj -ENVCFLAGS+=-DUSE_CDE -.ENDIF - -.IF "$(XRENDER_LINK)" == "YES" -CFLAGS+=-DXRENDER_LINK -.ENDIF - -.IF "$(ENABLE_GRAPHITE)" == "TRUE" -CFLAGS+=-DENABLE_GRAPHITE -.ENDIF - -.ENDIF # "$(GUIBASE)"!="unx" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk - -ALLTAR : $(MACOSXRC) - -XSALSETLIBNAME=$(DLLPRE)spa$(DLLPOSTFIX)$(DLLPOST) - -$(INCCOM)$/rtsname.hxx: - @rm -f $(INCCOM)$/rtsname.hxx ; \ - echo "#define _XSALSET_LIBNAME "\"$(XSALSETLIBNAME)\" > $(INCCOM)$/rtsname.hxx - -$(SLO)$/salpimpl.obj : $(INCCOM)$/rtsname.hxx -$(SLO)$/salprnpsp.obj : $(INCCOM)$/rtsname.hxx - diff --git a/vcl/unx/source/gdi/pspgraphics.cxx b/vcl/unx/source/gdi/pspgraphics.cxx deleted file mode 100644 index bab78b0cb2df..000000000000 --- a/vcl/unx/source/gdi/pspgraphics.cxx +++ /dev/null @@ -1,1502 +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_vcl.hxx" - -#include "pspgraphics.h" -#include "vcl/jobdata.hxx" -#include "vcl/printergfx.hxx" -#include "vcl/printerinfomanager.hxx" -#include "vcl/bmpacc.hxx" -#include "vcl/salbmp.hxx" -#include "vcl/glyphcache.hxx" -#include "vcl/impfont.hxx" -#include "vcl/outfont.hxx" -#include "vcl/fontsubset.hxx" -#include "vcl/svapp.hxx" -#include "vcl/salprn.hxx" -#include "vcl/sysdata.hxx" - -#include -#include -#include -#include -#include -#include - -#ifdef ENABLE_GRAPHITE -#include -#include -#endif - -using namespace psp; -using namespace rtl; - -// ----- Implementation of PrinterBmp by means of SalBitmap/BitmapBuffer --------------- - -class SalPrinterBmp : public psp::PrinterBmp -{ - private: - BitmapBuffer* mpBmpBuffer; - - FncGetPixel mpFncGetPixel; - Scanline mpScanAccess; - sal_PtrDiff mnScanOffset; - - sal_uInt32 ColorOf (BitmapColor& rColor) const; - sal_uInt8 GrayOf (BitmapColor& rColor) const; - - SalPrinterBmp (); - - public: - - SalPrinterBmp (BitmapBuffer* pBitmap); - virtual ~SalPrinterBmp (); - virtual sal_uInt32 GetPaletteColor (sal_uInt32 nIdx) const; - virtual sal_uInt32 GetPaletteEntryCount () const; - virtual sal_uInt32 GetPixelRGB (sal_uInt32 nRow, sal_uInt32 nColumn) const; - virtual sal_uInt8 GetPixelGray (sal_uInt32 nRow, sal_uInt32 nColumn) const; - virtual sal_uInt8 GetPixelIdx (sal_uInt32 nRow, sal_uInt32 nColumn) const; - virtual sal_uInt32 GetWidth () const; - virtual sal_uInt32 GetHeight() const; - virtual sal_uInt32 GetDepth () const; -}; - -SalPrinterBmp::SalPrinterBmp (BitmapBuffer* pBuffer) : - mpBmpBuffer (pBuffer) -{ - DBG_ASSERT (mpBmpBuffer, "SalPrinterBmp::SalPrinterBmp () can't acquire Bitmap"); - - // calibrate scanline buffer - if( BMP_SCANLINE_ADJUSTMENT( mpBmpBuffer->mnFormat ) == BMP_FORMAT_TOP_DOWN ) - { - mpScanAccess = mpBmpBuffer->mpBits; - mnScanOffset = mpBmpBuffer->mnScanlineSize; - } - else - { - mpScanAccess = mpBmpBuffer->mpBits - + (mpBmpBuffer->mnHeight - 1) * mpBmpBuffer->mnScanlineSize; - mnScanOffset = - mpBmpBuffer->mnScanlineSize; - } - - // request read access to the pixels - switch( BMP_SCANLINE_FORMAT( mpBmpBuffer->mnFormat ) ) - { - case BMP_FORMAT_1BIT_MSB_PAL: - mpFncGetPixel = BitmapReadAccess::GetPixelFor_1BIT_MSB_PAL; break; - case BMP_FORMAT_1BIT_LSB_PAL: - mpFncGetPixel = BitmapReadAccess::GetPixelFor_1BIT_LSB_PAL; break; - case BMP_FORMAT_4BIT_MSN_PAL: - mpFncGetPixel = BitmapReadAccess::GetPixelFor_4BIT_MSN_PAL; break; - case BMP_FORMAT_4BIT_LSN_PAL: - mpFncGetPixel = BitmapReadAccess::GetPixelFor_4BIT_LSN_PAL; break; - case BMP_FORMAT_8BIT_PAL: - mpFncGetPixel = BitmapReadAccess::GetPixelFor_8BIT_PAL; break; - case BMP_FORMAT_8BIT_TC_MASK: - mpFncGetPixel = BitmapReadAccess::GetPixelFor_8BIT_TC_MASK; break; - case BMP_FORMAT_16BIT_TC_MSB_MASK: - mpFncGetPixel = BitmapReadAccess::GetPixelFor_16BIT_TC_MSB_MASK; break; - case BMP_FORMAT_16BIT_TC_LSB_MASK: - mpFncGetPixel = BitmapReadAccess::GetPixelFor_16BIT_TC_LSB_MASK; break; - case BMP_FORMAT_24BIT_TC_BGR: - mpFncGetPixel = BitmapReadAccess::GetPixelFor_24BIT_TC_BGR; break; - case BMP_FORMAT_24BIT_TC_RGB: - mpFncGetPixel = BitmapReadAccess::GetPixelFor_24BIT_TC_RGB; break; - case BMP_FORMAT_24BIT_TC_MASK: - mpFncGetPixel = BitmapReadAccess::GetPixelFor_24BIT_TC_MASK; break; - case BMP_FORMAT_32BIT_TC_ABGR: - mpFncGetPixel = BitmapReadAccess::GetPixelFor_32BIT_TC_ABGR; break; - case BMP_FORMAT_32BIT_TC_ARGB: - mpFncGetPixel = BitmapReadAccess::GetPixelFor_32BIT_TC_ARGB; break; - case BMP_FORMAT_32BIT_TC_BGRA: - mpFncGetPixel = BitmapReadAccess::GetPixelFor_32BIT_TC_BGRA; break; - case BMP_FORMAT_32BIT_TC_RGBA: - mpFncGetPixel = BitmapReadAccess::GetPixelFor_32BIT_TC_RGBA; break; - case BMP_FORMAT_32BIT_TC_MASK: - mpFncGetPixel = BitmapReadAccess::GetPixelFor_32BIT_TC_MASK; break; - - default: - DBG_ERROR("Error: SalPrinterBmp::SalPrinterBmp() unknown bitmap format"); - break; - } -} - -SalPrinterBmp::~SalPrinterBmp () -{ -} - -sal_uInt32 -SalPrinterBmp::GetWidth () const -{ - return mpBmpBuffer->mnWidth; -} - -sal_uInt32 -SalPrinterBmp::GetHeight () const -{ - return mpBmpBuffer->mnHeight; -} - -sal_uInt32 -SalPrinterBmp::GetDepth () const -{ - sal_uInt32 nDepth; - - switch (mpBmpBuffer->mnBitCount) - { - case 1: - nDepth = 1; - break; - - case 4: - case 8: - nDepth = 8; - break; - - case 16: - case 24: - case 32: - nDepth = 24; - break; - - default: - nDepth = 1; - DBG_ERROR ("Error: unsupported bitmap depth in SalPrinterBmp::GetDepth()"); - break; - } - - return nDepth; -} - -sal_uInt32 -SalPrinterBmp::ColorOf (BitmapColor& rColor) const -{ - if (rColor.IsIndex()) - return ColorOf (mpBmpBuffer->maPalette[rColor.GetIndex()]); - else - return ((rColor.GetBlue()) & 0x000000ff) - | ((rColor.GetGreen() << 8) & 0x0000ff00) - | ((rColor.GetRed() << 16) & 0x00ff0000); -} - -sal_uInt8 -SalPrinterBmp::GrayOf (BitmapColor& rColor) const -{ - if (rColor.IsIndex()) - return GrayOf (mpBmpBuffer->maPalette[rColor.GetIndex()]); - else - return ( rColor.GetBlue() * 28UL - + rColor.GetGreen() * 151UL - + rColor.GetRed() * 77UL ) >> 8; -} - -sal_uInt32 -SalPrinterBmp::GetPaletteEntryCount () const -{ - return mpBmpBuffer->maPalette.GetEntryCount (); -} - -sal_uInt32 -SalPrinterBmp::GetPaletteColor (sal_uInt32 nIdx) const -{ - return ColorOf (mpBmpBuffer->maPalette[nIdx]); -} - -sal_uInt32 -SalPrinterBmp::GetPixelRGB (sal_uInt32 nRow, sal_uInt32 nColumn) const -{ - Scanline pScan = mpScanAccess + nRow * mnScanOffset; - BitmapColor aColor = mpFncGetPixel (pScan, nColumn, mpBmpBuffer->maColorMask); - - return ColorOf (aColor); -} - -sal_uInt8 -SalPrinterBmp::GetPixelGray (sal_uInt32 nRow, sal_uInt32 nColumn) const -{ - Scanline pScan = mpScanAccess + nRow * mnScanOffset; - BitmapColor aColor = mpFncGetPixel (pScan, nColumn, mpBmpBuffer->maColorMask); - - return GrayOf (aColor); -} - -sal_uInt8 -SalPrinterBmp::GetPixelIdx (sal_uInt32 nRow, sal_uInt32 nColumn) const -{ - Scanline pScan = mpScanAccess + nRow * mnScanOffset; - BitmapColor aColor = mpFncGetPixel (pScan, nColumn, mpBmpBuffer->maColorMask); - - if (aColor.IsIndex()) - return aColor.GetIndex(); - else - return 0; -} - -/******************************************************* - * PspGraphics * - *******************************************************/ - -PspGraphics::~PspGraphics() -{ - ReleaseFonts(); -} - -void PspGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) -{ - if (m_pJobData != NULL) - { - int x = m_pJobData->m_aContext.getRenderResolution(); - - rDPIX = x; - rDPIY = x; - } -} - -USHORT PspGraphics::GetBitCount() -{ - return m_pPrinterGfx->GetBitCount(); -} - -long PspGraphics::GetGraphicsWidth() const -{ - return 0; -} - -void PspGraphics::ResetClipRegion() -{ - m_pPrinterGfx->ResetClipRegion (); -} - -void PspGraphics::BeginSetClipRegion( ULONG n ) -{ - m_pPrinterGfx->BeginSetClipRegion(n); -} - -BOOL PspGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY ) -{ - return (BOOL)m_pPrinterGfx->UnionClipRegion (nX, nY, nDX, nDY); -} - -bool PspGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& ) -{ - // TODO: implement and advertise OutDevSupport_B2DClip support - return false; -} - -void PspGraphics::EndSetClipRegion() -{ - m_pPrinterGfx->EndSetClipRegion (); -} - -void PspGraphics::SetLineColor() -{ - m_pPrinterGfx->SetLineColor (); -} - -void PspGraphics::SetLineColor( SalColor nSalColor ) -{ - psp::PrinterColor aColor (SALCOLOR_RED (nSalColor), - SALCOLOR_GREEN (nSalColor), - SALCOLOR_BLUE (nSalColor)); - m_pPrinterGfx->SetLineColor (aColor); -} - -void PspGraphics::SetFillColor() -{ - m_pPrinterGfx->SetFillColor (); -} - -void PspGraphics::SetFillColor( SalColor nSalColor ) -{ - psp::PrinterColor aColor (SALCOLOR_RED (nSalColor), - SALCOLOR_GREEN (nSalColor), - SALCOLOR_BLUE (nSalColor)); - m_pPrinterGfx->SetFillColor (aColor); -} - -void PspGraphics::SetROPLineColor( SalROPColor ) -{ - DBG_ASSERT( 0, "Error: PrinterGfx::SetROPLineColor() not implemented" ); -} - -void PspGraphics::SetROPFillColor( SalROPColor ) -{ - DBG_ASSERT( 0, "Error: PrinterGfx::SetROPFillColor() not implemented" ); -} - -void PspGraphics::SetXORMode( bool bSet, bool ) -{ - (void)bSet; - DBG_ASSERT( !bSet, "Error: PrinterGfx::SetXORMode() not implemented" ); -} - -void PspGraphics::drawPixel( long nX, long nY ) -{ - m_pPrinterGfx->DrawPixel (Point(nX, nY)); -} - -void PspGraphics::drawPixel( long nX, long nY, SalColor nSalColor ) -{ - psp::PrinterColor aColor (SALCOLOR_RED (nSalColor), - SALCOLOR_GREEN (nSalColor), - SALCOLOR_BLUE (nSalColor)); - m_pPrinterGfx->DrawPixel (Point(nX, nY), aColor); -} - -void PspGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 ) -{ - m_pPrinterGfx->DrawLine (Point(nX1, nY1), Point(nX2, nY2)); -} - -void PspGraphics::drawRect( long nX, long nY, long nDX, long nDY ) -{ - m_pPrinterGfx->DrawRect (Rectangle(Point(nX, nY), Size(nDX, nDY))); -} - -void PspGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry ) -{ - m_pPrinterGfx->DrawPolyLine (nPoints, (Point*)pPtAry); -} - -void PspGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry ) -{ - // Point must be equal to SalPoint! see vcl/inc/salgtype.hxx - m_pPrinterGfx->DrawPolygon (nPoints, (Point*)pPtAry); -} - -void PspGraphics::drawPolyPolygon( sal_uInt32 nPoly, - const sal_uInt32 *pPoints, - PCONSTSALPOINT *pPtAry ) -{ - m_pPrinterGfx->DrawPolyPolygon (nPoly, pPoints, (const Point**)pPtAry); -} - -bool PspGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double /*fTransparency*/ ) -{ - // TODO: implement and advertise OutDevSupport_B2DDraw support - return false; -} - -bool PspGraphics::drawPolyLine( const basegfx::B2DPolygon&, double /*fTranspareny*/, const basegfx::B2DVector& /*rLineWidths*/, basegfx::B2DLineJoin /*eJoin*/) -{ - // TODO: a PS printer can draw B2DPolyLines almost directly - return false; -} - -sal_Bool PspGraphics::drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) -{ - m_pPrinterGfx->DrawPolyLineBezier (nPoints, (Point*)pPtAry, pFlgAry); - return sal_True; -} - -sal_Bool PspGraphics::drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) -{ - m_pPrinterGfx->DrawPolygonBezier (nPoints, (Point*)pPtAry, pFlgAry); - return sal_True; -} - -sal_Bool PspGraphics::drawPolyPolygonBezier( sal_uInt32 nPoly, - const sal_uInt32* pPoints, - const SalPoint* const* pPtAry, - const BYTE* const* pFlgAry ) -{ - // Point must be equal to SalPoint! see vcl/inc/salgtype.hxx - m_pPrinterGfx->DrawPolyPolygonBezier (nPoly, pPoints, (Point**)pPtAry, (BYTE**)pFlgAry); - return sal_True; -} - -void PspGraphics::invert( ULONG, - const SalPoint*, - SalInvert ) -{ - DBG_ASSERT( 0, "Error: PrinterGfx::Invert() not implemented" ); -} -BOOL PspGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ) -{ - return m_pPrinterGfx->DrawEPS( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ), pPtr, nSize ); -} - -void PspGraphics::copyBits( const SalTwoRect*, - SalGraphics* ) -{ - DBG_ERROR( "Error: PrinterGfx::CopyBits() not implemented" ); -} - -void PspGraphics::copyArea ( long,long,long,long,long,long,USHORT ) -{ - DBG_ERROR( "Error: PrinterGfx::CopyArea() not implemented" ); -} - -void PspGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap ) -{ - Rectangle aSrc (Point(pPosAry->mnSrcX, pPosAry->mnSrcY), - Size(pPosAry->mnSrcWidth, pPosAry->mnSrcHeight)); - Rectangle aDst (Point(pPosAry->mnDestX, pPosAry->mnDestY), - Size(pPosAry->mnDestWidth, pPosAry->mnDestHeight)); - - BitmapBuffer* pBuffer= const_cast(rSalBitmap).AcquireBuffer(sal_True); - - SalPrinterBmp aBmp (pBuffer); - m_pPrinterGfx->DrawBitmap (aDst, aSrc, aBmp); - - const_cast(rSalBitmap).ReleaseBuffer (pBuffer, sal_True); -} - -void PspGraphics::drawBitmap( const SalTwoRect*, - const SalBitmap&, - const SalBitmap& ) -{ - DBG_ERROR("Error: no PrinterGfx::DrawBitmap() for transparent bitmap"); -} - -void PspGraphics::drawBitmap( const SalTwoRect*, - const SalBitmap&, - SalColor ) -{ - DBG_ERROR("Error: no PrinterGfx::DrawBitmap() for transparent color"); -} - -void PspGraphics::drawMask( const SalTwoRect*, - const SalBitmap &, - SalColor ) -{ - DBG_ERROR("Error: PrinterGfx::DrawMask() not implemented"); -} - -SalBitmap* PspGraphics::getBitmap( long, long, long, long ) -{ - DBG_WARNING ("Warning: PrinterGfx::GetBitmap() not implemented"); - return NULL; -} - -SalColor PspGraphics::getPixel( long, long ) -{ - DBG_ERROR ("Warning: PrinterGfx::GetPixel() not implemented"); - return 0; -} - -void PspGraphics::invert(long,long,long,long,SalInvert) -{ - DBG_ERROR ("Warning: PrinterGfx::Invert() not implemented"); -} - -//========================================================================== - -class ImplPspFontData : public ImplFontData -{ -private: - enum { PSPFD_MAGIC = 0xb5bf01f0 }; - sal_IntPtr mnFontId; - -public: - ImplPspFontData( const psp::FastPrintFontInfo& ); - virtual sal_IntPtr GetFontId() const { return mnFontId; } - virtual ImplFontData* Clone() const { return new ImplPspFontData( *this ); } - virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const; - static bool CheckFontData( const ImplFontData& r ) { return r.CheckMagic( PSPFD_MAGIC ); } -}; - -//-------------------------------------------------------------------------- - -ImplPspFontData::ImplPspFontData( const psp::FastPrintFontInfo& rInfo ) -: ImplFontData( PspGraphics::Info2DevFontAttributes(rInfo), PSPFD_MAGIC ), - mnFontId( rInfo.m_nID ) -{} - -//-------------------------------------------------------------------------- - -ImplFontEntry* ImplPspFontData::CreateFontInstance( ImplFontSelectData& rFSD ) const -{ - ImplServerFontEntry* pEntry = new ImplServerFontEntry( rFSD ); - return pEntry; -} - -//========================================================================== - -class PspFontLayout : public GenericSalLayout -{ -public: - PspFontLayout( ::psp::PrinterGfx& ); - virtual bool LayoutText( ImplLayoutArgs& ); - virtual void InitFont() const; - virtual void DrawText( SalGraphics& ) const; -private: - ::psp::PrinterGfx& mrPrinterGfx; - sal_IntPtr mnFontID; - int mnFontHeight; - int mnFontWidth; - bool mbVertical; - bool mbArtItalic; - bool mbArtBold; -}; - -//-------------------------------------------------------------------------- - -PspFontLayout::PspFontLayout( ::psp::PrinterGfx& rGfx ) -: mrPrinterGfx( rGfx ) -{ - mnFontID = mrPrinterGfx.GetFontID(); - mnFontHeight = mrPrinterGfx.GetFontHeight(); - mnFontWidth = mrPrinterGfx.GetFontWidth(); - mbVertical = mrPrinterGfx.GetFontVertical(); - mbArtItalic = mrPrinterGfx.GetArtificialItalic(); - mbArtBold = mrPrinterGfx.GetArtificialBold(); -} - -//-------------------------------------------------------------------------- - -bool PspFontLayout::LayoutText( ImplLayoutArgs& rArgs ) -{ - mbVertical = ((rArgs.mnFlags & SAL_LAYOUT_VERTICAL) != 0); - - long nUnitsPerPixel = 1; - int nOldGlyphId = -1; - long nGlyphWidth = 0; - int nCharPos = -1; - Point aNewPos( 0, 0 ); - GlyphItem aPrevItem; - rtl_TextEncoding aFontEnc = mrPrinterGfx.GetFontMgr().getFontEncoding( mnFontID ); - for(;;) - { - bool bRightToLeft; - if( !rArgs.GetNextPos( &nCharPos, &bRightToLeft ) ) - break; - - sal_Unicode cChar = rArgs.mpStr[ nCharPos ]; - if( bRightToLeft ) - cChar = GetMirroredChar( cChar ); - // symbol font aliasing: 0x0020-0x00ff -> 0xf020 -> 0xf0ff - if( aFontEnc == RTL_TEXTENCODING_SYMBOL ) - if( cChar < 256 ) - cChar += 0xf000; - int nGlyphIndex = cChar; // printer glyphs = unicode - - // update fallback_runs if needed - psp::CharacterMetric aMetric; - mrPrinterGfx.GetFontMgr().getMetrics( mnFontID, cChar, cChar, &aMetric, mbVertical ); - if( aMetric.width == -1 && aMetric.height == -1 ) - rArgs.NeedFallback( nCharPos, bRightToLeft ); - - // apply pair kerning to prev glyph if requested - if( SAL_LAYOUT_KERNING_PAIRS & rArgs.mnFlags ) - { - if( nOldGlyphId > 0 ) - { - const std::list< KernPair >& rKernPairs = mrPrinterGfx.getKernPairs(mbVertical); - for( std::list< KernPair >::const_iterator it = rKernPairs.begin(); - it != rKernPairs.end(); ++it ) - { - if( it->first == nOldGlyphId && it->second == nGlyphIndex ) - { - int nTextScale = mrPrinterGfx.GetFontWidth(); - if( ! nTextScale ) - nTextScale = mrPrinterGfx.GetFontHeight(); - int nKern = (mbVertical ? it->kern_y : it->kern_x) * nTextScale; - nGlyphWidth += nKern; - aPrevItem.mnNewWidth = nGlyphWidth; - break; - } - } - } - } - - // finish previous glyph - if( nOldGlyphId >= 0 ) - AppendGlyph( aPrevItem ); - nOldGlyphId = nGlyphIndex; - aNewPos.X() += nGlyphWidth; - - // prepare GlyphItem for appending it in next round - nUnitsPerPixel = mrPrinterGfx.GetCharWidth( cChar, cChar, &nGlyphWidth ); - int nGlyphFlags = bRightToLeft ? GlyphItem::IS_RTL_GLYPH : 0; - nGlyphIndex |= GF_ISCHAR; - aPrevItem = GlyphItem( nCharPos, nGlyphIndex, aNewPos, nGlyphFlags, nGlyphWidth ); - } - - // append last glyph item if any - if( nOldGlyphId >= 0 ) - AppendGlyph( aPrevItem ); - - SetOrientation( mrPrinterGfx.GetFontAngle() ); - SetUnitsPerPixel( nUnitsPerPixel ); - return (nOldGlyphId >= 0); -} - -class PspServerFontLayout : public ServerFontLayout -{ -public: - PspServerFontLayout( psp::PrinterGfx&, ServerFont& rFont, const ImplLayoutArgs& rArgs ); - - virtual void InitFont() const; - const sal_Unicode* getTextPtr() const { return maText.getStr() - mnMinCharPos; } - int getMinCharPos() const { return mnMinCharPos; } - int getMaxCharPos() const { return mnMinCharPos+maText.getLength()-1; } -private: - ::psp::PrinterGfx& mrPrinterGfx; - sal_IntPtr mnFontID; - int mnFontHeight; - int mnFontWidth; - bool mbVertical; - bool mbArtItalic; - bool mbArtBold; - rtl::OUString maText; - int mnMinCharPos; -}; - -PspServerFontLayout::PspServerFontLayout( ::psp::PrinterGfx& rGfx, ServerFont& rFont, const ImplLayoutArgs& rArgs ) - : ServerFontLayout( rFont ), - mrPrinterGfx( rGfx ) -{ - mnFontID = mrPrinterGfx.GetFontID(); - mnFontHeight = mrPrinterGfx.GetFontHeight(); - mnFontWidth = mrPrinterGfx.GetFontWidth(); - mbVertical = mrPrinterGfx.GetFontVertical(); - mbArtItalic = mrPrinterGfx.GetArtificialItalic(); - mbArtBold = mrPrinterGfx.GetArtificialBold(); - maText = OUString( rArgs.mpStr + rArgs.mnMinCharPos, rArgs.mnEndCharPos - rArgs.mnMinCharPos+1 ); - mnMinCharPos = rArgs.mnMinCharPos; -} - -void PspServerFontLayout::InitFont() const -{ - mrPrinterGfx.SetFont( mnFontID, mnFontHeight, mnFontWidth, - mnOrientation, mbVertical, mbArtItalic, mbArtBold ); -} - -//-------------------------------------------------------------------------- - -static void DrawPrinterLayout( const SalLayout& rLayout, ::psp::PrinterGfx& rGfx, bool bIsPspServerFontLayout ) -{ - const int nMaxGlyphs = 200; - sal_uInt32 aGlyphAry[ nMaxGlyphs ]; // TODO: use sal_GlyphId - sal_Int32 aWidthAry[ nMaxGlyphs ]; - sal_Int32 aIdxAry [ nMaxGlyphs ]; - sal_Unicode aUnicodes[ nMaxGlyphs ]; - int aCharPosAry [ nMaxGlyphs ]; - - Point aPos; - long nUnitsPerPixel = rLayout.GetUnitsPerPixel(); - const sal_Unicode* pText = NULL; - int nMinCharPos = 0; - int nMaxCharPos = 0; - if (bIsPspServerFontLayout) - { - const PspServerFontLayout * pPspLayout = dynamic_cast(&rLayout); -#ifdef ENABLE_GRAPHITE - const GraphiteServerFontLayout * pGrLayout = dynamic_cast(&rLayout); -#endif - if (pPspLayout) - { - pText = pPspLayout->getTextPtr(); - nMinCharPos = pPspLayout->getMinCharPos(); - nMaxCharPos = pPspLayout->getMaxCharPos(); - } -#ifdef ENABLE_GRAPHITE - else if (pGrLayout) - { - #if 0 // HACK: disabled for now due to #i114460#, see #desc12 there - // TODO: get rid of glyph->string mapping altogether for printing - // TODO: fix GraphiteServerFontLayout's returned aCharPosAry - // TODO: fix PrinterGfx's caching? - pText = pGrLayout->getTextPtr(); - nMinCharPos = pGrLayout->getMinCharPos(); - nMaxCharPos = pGrLayout->getMaxCharPos(); - #endif - } -#endif - } - for( int nStart = 0;; ) - { - int nGlyphCount = rLayout.GetNextGlyphs( nMaxGlyphs, aGlyphAry, aPos, nStart, aWidthAry, pText ? aCharPosAry : NULL ); - if( !nGlyphCount ) - break; - - sal_Int32 nXOffset = 0; - for( int i = 0; i < nGlyphCount; ++i ) - { - nXOffset += aWidthAry[ i ]; - aIdxAry[ i ] = nXOffset / nUnitsPerPixel; - sal_Int32 nGlyphIdx = aGlyphAry[i] & (GF_IDXMASK | GF_ROTMASK); - if( pText ) - aUnicodes[i] = (aCharPosAry[i] >= nMinCharPos && aCharPosAry[i] <= nMaxCharPos) ? pText[ aCharPosAry[i] ] : 0; - else - aUnicodes[i] = (aGlyphAry[i] & GF_ISCHAR) ? nGlyphIdx : 0; - aGlyphAry[i] = nGlyphIdx; - } - - rGfx.DrawGlyphs( aPos, (sal_uInt32 *)aGlyphAry, aUnicodes, nGlyphCount, aIdxAry ); - } -} - -//-------------------------------------------------------------------------- - -void PspFontLayout::InitFont() const -{ - mrPrinterGfx.SetFont( mnFontID, mnFontHeight, mnFontWidth, - mnOrientation, mbVertical, mbArtItalic, mbArtBold ); -} - -//-------------------------------------------------------------------------- - -void PspFontLayout::DrawText( SalGraphics& ) const -{ - DrawPrinterLayout( *this, mrPrinterGfx, false ); -} - -void PspGraphics::DrawServerFontLayout( const ServerFontLayout& rLayout ) -{ - // print complex text - DrawPrinterLayout( rLayout, *m_pPrinterGfx, true ); -} - -const ImplFontCharMap* PspGraphics::GetImplFontCharMap() const -{ - if( !m_pServerFont[0] ) - return NULL; - - const ImplFontCharMap* pIFCMap = m_pServerFont[0]->GetImplFontCharMap(); - return pIFCMap; -} - -USHORT PspGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel ) -{ - // release all fonts that are to be overridden - for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i ) - { - if( m_pServerFont[i] != NULL ) - { - // old server side font is no longer referenced - GlyphCache::GetInstance().UncacheFont( *m_pServerFont[i] ); - m_pServerFont[i] = NULL; - } - } - - // return early if there is no new font - if( !pEntry ) - return 0; - - sal_IntPtr nID = pEntry->mpFontData ? pEntry->mpFontData->GetFontId() : 0; - - // determine which font attributes need to be emulated - bool bArtItalic = false; - bool bArtBold = false; - if( pEntry->meItalic == ITALIC_OBLIQUE || pEntry->meItalic == ITALIC_NORMAL ) - { - psp::italic::type eItalic = m_pPrinterGfx->GetFontMgr().getFontItalic( nID ); - if( eItalic != psp::italic::Italic && eItalic != psp::italic::Oblique ) - bArtItalic = true; - } - int nWeight = (int)pEntry->meWeight; - int nRealWeight = (int)m_pPrinterGfx->GetFontMgr().getFontWeight( nID ); - if( nRealWeight <= (int)psp::weight::Medium && nWeight > (int)WEIGHT_MEDIUM ) - { - bArtBold = true; - } - - // also set the serverside font for layouting - m_bFontVertical = pEntry->mbVertical; - if( pEntry->mpFontData ) - { - // requesting a font provided by builtin rasterizer - ServerFont* pServerFont = GlyphCache::GetInstance().CacheFont( *pEntry ); - if( pServerFont != NULL ) - { - if( pServerFont->TestFont() ) - m_pServerFont[ nFallbackLevel ] = pServerFont; - else - GlyphCache::GetInstance().UncacheFont( *pServerFont ); - } - } - - // set the printer font - return m_pPrinterGfx->SetFont( nID, - pEntry->mnHeight, - pEntry->mnWidth, - pEntry->mnOrientation, - pEntry->mbVertical, - bArtItalic, - bArtBold - ); -} - -void PspGraphics::SetTextColor( SalColor nSalColor ) -{ - psp::PrinterColor aColor (SALCOLOR_RED (nSalColor), - SALCOLOR_GREEN (nSalColor), - SALCOLOR_BLUE (nSalColor)); - m_pPrinterGfx->SetTextColor (aColor); -} - -bool PspGraphics::AddTempDevFont( ImplDevFontList*, const String&,const String& ) -{ - return false; -} - -void RegisterFontSubstitutors( ImplDevFontList* ); - -void PspGraphics::GetDevFontList( ImplDevFontList *pList ) -{ - ::std::list< psp::fontID > aList; - psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); - rMgr.getFontList( aList, m_pJobData->m_pParser, m_pInfoPrinter->m_bCompatMetrics ); - - ::std::list< psp::fontID >::iterator it; - psp::FastPrintFontInfo aInfo; - for (it = aList.begin(); it != aList.end(); ++it) - if (rMgr.getFontFastInfo (*it, aInfo)) - AnnounceFonts( pList, aInfo ); - - // register platform specific font substitutions if available - if( rMgr.hasFontconfig() ) - RegisterFontSubstitutors( pList ); -} - -void PspGraphics::GetDevFontSubstList( OutputDevice* pOutDev ) -{ - const psp::PrinterInfo& rInfo = psp::PrinterInfoManager::get().getPrinterInfo( m_pJobData->m_aPrinterName ); - if( rInfo.m_bPerformFontSubstitution ) - { - for( std::hash_map< rtl::OUString, rtl::OUString, rtl::OUStringHash >::const_iterator it = rInfo.m_aFontSubstitutes.begin(); it != rInfo.m_aFontSubstitutes.end(); ++it ) - pOutDev->ImplAddDevFontSubstitute( it->first, it->second, FONT_SUBSTITUTE_ALWAYS ); - } -} - -void PspGraphics::GetFontMetric( ImplFontMetricData *pMetric, int ) -{ - const psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); - psp::PrintFontInfo aInfo; - - if (rMgr.getFontInfo (m_pPrinterGfx->GetFontID(), aInfo)) - { - ImplDevFontAttributes aDFA = Info2DevFontAttributes( aInfo ); - static_cast(*pMetric) = aDFA; - pMetric->mbDevice = aDFA.mbDevice; - pMetric->mbScalableFont = true; - - pMetric->mnOrientation = m_pPrinterGfx->GetFontAngle(); - pMetric->mnSlant = 0; - - sal_Int32 nTextHeight = m_pPrinterGfx->GetFontHeight(); - sal_Int32 nTextWidth = m_pPrinterGfx->GetFontWidth(); - if( ! nTextWidth ) - nTextWidth = nTextHeight; - - pMetric->mnWidth = nTextWidth; - pMetric->mnAscent = ( aInfo.m_nAscend * nTextHeight + 500 ) / 1000; - pMetric->mnDescent = ( aInfo.m_nDescend * nTextHeight + 500 ) / 1000; - pMetric->mnIntLeading = ( aInfo.m_nLeading * nTextHeight + 500 ) / 1000; - pMetric->mnExtLeading = 0; - } -} - -ULONG PspGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs ) -{ - const ::std::list< ::psp::KernPair >& rPairs( m_pPrinterGfx->getKernPairs() ); - ULONG nHavePairs = rPairs.size(); - if( pKernPairs && nPairs ) - { - ::std::list< ::psp::KernPair >::const_iterator it; - unsigned int i; - int nTextScale = m_pPrinterGfx->GetFontWidth(); - if( ! nTextScale ) - nTextScale = m_pPrinterGfx->GetFontHeight(); - for( i = 0, it = rPairs.begin(); i < nPairs && i < nHavePairs; i++, ++it ) - { - pKernPairs[i].mnChar1 = it->first; - pKernPairs[i].mnChar2 = it->second; - pKernPairs[i].mnKern = it->kern_x * nTextScale / 1000; - } - - } - return nHavePairs; -} - -BOOL PspGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect ) -{ - int nLevel = nGlyphIndex >> GF_FONTSHIFT; - if( nLevel >= MAX_FALLBACK ) - return FALSE; - - ServerFont* pSF = m_pServerFont[ nLevel ]; - if( !pSF ) - return FALSE; - - nGlyphIndex &= ~GF_FONTMASK; - const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex ); - rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() ); - return TRUE; -} - -BOOL PspGraphics::GetGlyphOutline( long nGlyphIndex, - ::basegfx::B2DPolyPolygon& rB2DPolyPoly ) -{ - int nLevel = nGlyphIndex >> GF_FONTSHIFT; - if( nLevel >= MAX_FALLBACK ) - return FALSE; - - ServerFont* pSF = m_pServerFont[ nLevel ]; - if( !pSF ) - return FALSE; - - nGlyphIndex &= ~GF_FONTMASK; - if( pSF->GetGlyphOutline( nGlyphIndex, rB2DPolyPoly ) ) - return TRUE; - - return FALSE; -} - -SalLayout* PspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel ) -{ - // workaround for printers not handling glyph indexing for non-TT fonts - int nFontId = m_pPrinterGfx->GetFontID(); - if( psp::fonttype::TrueType != psp::PrintFontManager::get().getFontType( nFontId ) ) - rArgs.mnFlags |= SAL_LAYOUT_DISABLE_GLYPH_PROCESSING; - else if( nFallbackLevel > 0 ) - rArgs.mnFlags &= ~SAL_LAYOUT_DISABLE_GLYPH_PROCESSING; - - GenericSalLayout* pLayout = NULL; - - if( m_pServerFont[ nFallbackLevel ] - && !(rArgs.mnFlags & SAL_LAYOUT_DISABLE_GLYPH_PROCESSING) ) - { -#ifdef ENABLE_GRAPHITE - // Is this a Graphite font? - if (GraphiteFontAdaptor::IsGraphiteEnabledFont(*m_pServerFont[nFallbackLevel])) - { - sal_Int32 xdpi, ydpi; - GetResolution(xdpi, ydpi); - GraphiteFontAdaptor * pGrfont = new GraphiteFontAdaptor( *m_pServerFont[nFallbackLevel], xdpi, ydpi); - if (!pGrfont) return NULL; - pLayout = new GraphiteServerFontLayout(pGrfont); - } - else -#endif - pLayout = new PspServerFontLayout( *m_pPrinterGfx, *m_pServerFont[nFallbackLevel], rArgs ); - } - else - pLayout = new PspFontLayout( *m_pPrinterGfx ); - - return pLayout; -} - -//-------------------------------------------------------------------------- - -BOOL PspGraphics::CreateFontSubset( - const rtl::OUString& rToFile, - const ImplFontData* pFont, - sal_Int32* pGlyphIDs, - sal_uInt8* pEncoding, - sal_Int32* pWidths, - int nGlyphCount, - FontSubsetInfo& rInfo - ) -{ - // in this context the pFont->GetFontId() is a valid PSP - // font since they are the only ones left after the PDF - // export has filtered its list of subsettable fonts (for - // which this method was created). The correct way would - // be to have the GlyphCache search for the ImplFontData pFont - psp::fontID aFont = pFont->GetFontId(); - - psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); - bool bSuccess = rMgr.createFontSubset( rInfo, - aFont, - rToFile, - pGlyphIDs, - pEncoding, - pWidths, - nGlyphCount ); - return bSuccess; -} - -//-------------------------------------------------------------------------- - -const void* PspGraphics::GetEmbedFontData( const ImplFontData* pFont, const sal_Ucs* pUnicodes, sal_Int32* pWidths, FontSubsetInfo& rInfo, long* pDataLen ) -{ - // in this context the pFont->GetFontId() is a valid PSP - // font since they are the only ones left after the PDF - // export has filtered its list of subsettable fonts (for - // which this method was created). The correct way would - // be to have the GlyphCache search for the ImplFontData pFont - psp::fontID aFont = pFont->GetFontId(); - return PspGraphics::DoGetEmbedFontData( aFont, pUnicodes, pWidths, rInfo, pDataLen ); -} - -//-------------------------------------------------------------------------- - -void PspGraphics::FreeEmbedFontData( const void* pData, long nLen ) -{ - PspGraphics::DoFreeEmbedFontData( pData, nLen ); -} - -//-------------------------------------------------------------------------- - -const Ucs2SIntMap* PspGraphics::GetFontEncodingVector( const ImplFontData* pFont, const Ucs2OStrMap** pNonEncoded ) -{ - // in this context the pFont->GetFontId() is a valid PSP - // font since they are the only ones left after the PDF - // export has filtered its list of subsettable fonts (for - // which this method was created). The correct way would - // be to have the GlyphCache search for the ImplFontData pFont - psp::fontID aFont = pFont->GetFontId(); - return PspGraphics::DoGetFontEncodingVector( aFont, pNonEncoded ); -} - -//-------------------------------------------------------------------------- - -void PspGraphics::GetGlyphWidths( const ImplFontData* pFont, - bool bVertical, - Int32Vector& rWidths, - Ucs2UIntMap& rUnicodeEnc ) -{ - // in this context the pFont->GetFontId() is a valid PSP - // font since they are the only ones left after the PDF - // export has filtered its list of subsettable fonts (for - // which this method was created). The correct way would - // be to have the GlyphCache search for the ImplFontData pFont - psp::fontID aFont = pFont->GetFontId(); - PspGraphics::DoGetGlyphWidths( aFont, bVertical, rWidths, rUnicodeEnc ); -} - - -// static helpers of PspGraphics - -const void* PspGraphics::DoGetEmbedFontData( fontID aFont, const sal_Ucs* pUnicodes, sal_Int32* pWidths, FontSubsetInfo& rInfo, long* pDataLen ) -{ - psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); - - psp::PrintFontInfo aFontInfo; - if( ! rMgr.getFontInfo( aFont, aFontInfo ) ) - return NULL; - - // fill in font info - rInfo.m_nAscent = aFontInfo.m_nAscend; - rInfo.m_nDescent = aFontInfo.m_nDescend; - rInfo.m_aPSName = rMgr.getPSName( aFont ); - - int xMin, yMin, xMax, yMax; - rMgr.getFontBoundingBox( aFont, xMin, yMin, xMax, yMax ); - - psp::CharacterMetric aMetrics[256]; - sal_Ucs aUnicodes[256]; - if( aFontInfo.m_aEncoding == RTL_TEXTENCODING_SYMBOL && aFontInfo.m_eType == psp::fonttype::Type1 ) - { - for( int i = 0; i < 256; i++ ) - aUnicodes[i] = pUnicodes[i] < 0x0100 ? pUnicodes[i] + 0xf000 : pUnicodes[i]; - pUnicodes = aUnicodes; - } - if( ! rMgr.getMetrics( aFont, pUnicodes, 256, aMetrics ) ) - return NULL; - - OString aSysPath = rMgr.getFontFileSysPath( aFont ); - struct stat aStat; - if( stat( aSysPath.getStr(), &aStat ) ) - return NULL; - int fd = open( aSysPath.getStr(), O_RDONLY ); - if( fd < 0 ) - return NULL; - void* pFile = mmap( NULL, aStat.st_size, PROT_READ, MAP_SHARED, fd, 0 ); - close( fd ); - if( pFile == MAP_FAILED ) - return NULL; - - *pDataLen = aStat.st_size; - - rInfo.m_aFontBBox = Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) ); - rInfo.m_nCapHeight = yMax; // Well ... - - for( int i = 0; i < 256; i++ ) - pWidths[i] = (aMetrics[i].width > 0 ? aMetrics[i].width : 0); - - switch( aFontInfo.m_eType ) - { - case psp::fonttype::TrueType: - rInfo.m_nFontType = FontSubsetInfo::SFNT_TTF; - break; - case psp::fonttype::Type1: { - const bool bPFA = ((*(unsigned char*)pFile) < 0x80); - rInfo.m_nFontType = bPFA ? FontSubsetInfo::TYPE1_PFA : FontSubsetInfo::TYPE1_PFB; - } - break; - default: - return NULL; - } - - return pFile; -} - -void PspGraphics::DoFreeEmbedFontData( const void* pData, long nLen ) -{ - if( pData ) - munmap( (char*)pData, nLen ); -} - -const Ucs2SIntMap* PspGraphics::DoGetFontEncodingVector( fontID aFont, const Ucs2OStrMap** pNonEncoded ) -{ - psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); - - psp::PrintFontInfo aFontInfo; - if( ! rMgr.getFontInfo( aFont, aFontInfo ) ) - { - if( pNonEncoded ) - *pNonEncoded = NULL; - return NULL; - } - - return rMgr.getEncodingMap( aFont, pNonEncoded ); -} - -void PspGraphics::DoGetGlyphWidths( psp::fontID aFont, - bool bVertical, - Int32Vector& rWidths, - Ucs2UIntMap& rUnicodeEnc ) -{ - psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); - rMgr.getGlyphWidths( aFont, bVertical, rWidths, rUnicodeEnc ); -} -// ---------------------------------------------------------------------------- - -FontWidth PspGraphics::ToFontWidth (psp::width::type eWidth) -{ - switch (eWidth) - { - case psp::width::UltraCondensed: return WIDTH_ULTRA_CONDENSED; - case psp::width::ExtraCondensed: return WIDTH_EXTRA_CONDENSED; - case psp::width::Condensed: return WIDTH_CONDENSED; - case psp::width::SemiCondensed: return WIDTH_SEMI_CONDENSED; - case psp::width::Normal: return WIDTH_NORMAL; - case psp::width::SemiExpanded: return WIDTH_SEMI_EXPANDED; - case psp::width::Expanded: return WIDTH_EXPANDED; - case psp::width::ExtraExpanded: return WIDTH_EXTRA_EXPANDED; - case psp::width::UltraExpanded: return WIDTH_ULTRA_EXPANDED; - case psp::width::Unknown: return WIDTH_DONTKNOW; - default: - DBG_ERROR( "unknown width mapping" ); - break; - } - return WIDTH_DONTKNOW; -} - -FontWeight PspGraphics::ToFontWeight (psp::weight::type eWeight) -{ - switch (eWeight) - { - case psp::weight::Thin: return WEIGHT_THIN; - case psp::weight::UltraLight: return WEIGHT_ULTRALIGHT; - case psp::weight::Light: return WEIGHT_LIGHT; - case psp::weight::SemiLight: return WEIGHT_SEMILIGHT; - case psp::weight::Normal: return WEIGHT_NORMAL; - case psp::weight::Medium: return WEIGHT_MEDIUM; - case psp::weight::SemiBold: return WEIGHT_SEMIBOLD; - case psp::weight::Bold: return WEIGHT_BOLD; - case psp::weight::UltraBold: return WEIGHT_ULTRABOLD; - case psp::weight::Black: return WEIGHT_BLACK; - case psp::weight::Unknown: return WEIGHT_DONTKNOW; - default: - DBG_ERROR( "unknown weight mapping" ); - break; - } - return WEIGHT_DONTKNOW; -} - -FontPitch PspGraphics::ToFontPitch (psp::pitch::type ePitch) -{ - switch (ePitch) - { - case psp::pitch::Fixed: return PITCH_FIXED; - case psp::pitch::Variable: return PITCH_VARIABLE; - case psp::pitch::Unknown: return PITCH_DONTKNOW; - default: - DBG_ERROR( "unknown pitch mapping" ); - break; - } - return PITCH_DONTKNOW; -} - -FontItalic PspGraphics::ToFontItalic (psp::italic::type eItalic) -{ - switch (eItalic) - { - case psp::italic::Upright: return ITALIC_NONE; - case psp::italic::Oblique: return ITALIC_OBLIQUE; - case psp::italic::Italic: return ITALIC_NORMAL; - case psp::italic::Unknown: return ITALIC_DONTKNOW; - default: - DBG_ERROR( "unknown italic mapping" ); - break; - } - return ITALIC_DONTKNOW; -} - -FontFamily PspGraphics::ToFontFamily (psp::family::type eFamily) -{ - switch (eFamily) - { - case psp::family::Decorative: return FAMILY_DECORATIVE; - case psp::family::Modern: return FAMILY_MODERN; - case psp::family::Roman: return FAMILY_ROMAN; - case psp::family::Script: return FAMILY_SCRIPT; - case psp::family::Swiss: return FAMILY_SWISS; - case psp::family::System: return FAMILY_SYSTEM; - case psp::family::Unknown: return FAMILY_DONTKNOW; - default: - DBG_ERROR( "unknown family mapping" ); - break; - } - return FAMILY_DONTKNOW; -} - -ImplDevFontAttributes PspGraphics::Info2DevFontAttributes( const psp::FastPrintFontInfo& rInfo ) -{ - ImplDevFontAttributes aDFA; - aDFA.maName = rInfo.m_aFamilyName; - aDFA.maStyleName = rInfo.m_aStyleName; - aDFA.meFamily = ToFontFamily (rInfo.m_eFamilyStyle); - aDFA.meWeight = ToFontWeight (rInfo.m_eWeight); - aDFA.meItalic = ToFontItalic (rInfo.m_eItalic); - aDFA.meWidthType = ToFontWidth (rInfo.m_eWidth); - aDFA.mePitch = ToFontPitch (rInfo.m_ePitch); - aDFA.mbSymbolFlag = (rInfo.m_aEncoding == RTL_TEXTENCODING_SYMBOL); - aDFA.mbSubsettable = rInfo.m_bSubsettable; - aDFA.mbEmbeddable = rInfo.m_bEmbeddable; - - switch( rInfo.m_eType ) - { - case psp::fonttype::Builtin: - aDFA.mnQuality = 1024; - aDFA.mbDevice = true; - break; - case psp::fonttype::TrueType: - aDFA.mnQuality = 512; - aDFA.mbDevice = false; - break; - case psp::fonttype::Type1: - aDFA.mnQuality = 0; - aDFA.mbDevice = false; - break; - default: - aDFA.mnQuality = 0; - aDFA.mbDevice = false; - break; - } - - aDFA.mbOrientation = true; - - // add font family name aliases - ::std::list< OUString >::const_iterator it = rInfo.m_aAliases.begin(); - bool bHasMapNames = false; - for(; it != rInfo.m_aAliases.end(); ++it ) - { - if( bHasMapNames ) - aDFA.maMapNames.Append( ';' ); - aDFA.maMapNames.Append( (*it).getStr() ); - bHasMapNames = true; - } - -#if OSL_DEBUG_LEVEL > 2 - if( bHasMapNames ) - { - ByteString aOrigName( aDFA.maName, osl_getThreadTextEncoding() ); - ByteString aAliasNames( aDFA.maMapNames, osl_getThreadTextEncoding() ); - fprintf( stderr, "using alias names \"%s\" for font family \"%s\"\n", - aAliasNames.GetBuffer(), aOrigName.GetBuffer() ); - } -#endif - - return aDFA; -} - -// ----------------------------------------------------------------------- - -void PspGraphics::AnnounceFonts( ImplDevFontList* pFontList, const psp::FastPrintFontInfo& aInfo ) -{ - int nQuality = 0; - - if( aInfo.m_eType == psp::fonttype::TrueType ) - { - // asian type 1 fonts are not known - psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); - ByteString aFileName( rMgr.getFontFileSysPath( aInfo.m_nID ) ); - int nPos = aFileName.SearchBackward( '_' ); - if( nPos == STRING_NOTFOUND || aFileName.GetChar( nPos+1 ) == '.' ) - nQuality += 5; - else - { - static const char* pLangBoost = NULL; - static bool bOnce = true; - if( bOnce ) - { - bOnce = false; - const LanguageType aLang = Application::GetSettings().GetUILanguage(); - switch( aLang ) - { - case LANGUAGE_JAPANESE: - pLangBoost = "jan"; - break; - case LANGUAGE_CHINESE: - case LANGUAGE_CHINESE_SIMPLIFIED: - case LANGUAGE_CHINESE_SINGAPORE: - pLangBoost = "zhs"; - break; - case LANGUAGE_CHINESE_TRADITIONAL: - case LANGUAGE_CHINESE_HONGKONG: - case LANGUAGE_CHINESE_MACAU: - pLangBoost = "zht"; - break; - case LANGUAGE_KOREAN: - case LANGUAGE_KOREAN_JOHAB: - pLangBoost = "kor"; - break; - } - } - - if( pLangBoost ) - if( aFileName.Copy( nPos+1, 3 ).EqualsIgnoreCaseAscii( pLangBoost ) ) - nQuality += 10; - } - } - - ImplPspFontData* pFD = new ImplPspFontData( aInfo ); - pFD->mnQuality += nQuality; - pFontList->Add( pFD ); -} - -bool PspGraphics::filterText( const String& rOrig, String& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop ) -{ - if( ! m_pPhoneNr ) - return false; - - rCutStop = rCutStart = STRING_NOTFOUND; - -#define FAX_PHONE_TOKEN "@@#" -#define FAX_PHONE_TOKEN_LENGTH 3 -#define FAX_END_TOKEN "@@" -#define FAX_END_TOKEN_LENGTH 2 - - bool bRet = false; - bool bStarted = false; - bool bStopped = false; - USHORT nPos; - USHORT nStart = 0; - USHORT nStop = rLen; - String aPhone = rOrig.Copy( nIndex, rLen ); - - if( ! m_bPhoneCollectionActive ) - { - if( ( nPos = aPhone.SearchAscii( FAX_PHONE_TOKEN ) ) != STRING_NOTFOUND ) - { - nStart = nPos; - m_bPhoneCollectionActive = true; - m_aPhoneCollection.Erase(); - bRet = true; - bStarted = true; - } - } - if( m_bPhoneCollectionActive ) - { - bRet = true; - nPos = bStarted ? nStart + FAX_PHONE_TOKEN_LENGTH : 0; - if( ( nPos = aPhone.SearchAscii( FAX_END_TOKEN, nPos ) ) != STRING_NOTFOUND ) - { - m_bPhoneCollectionActive = false; - nStop = nPos + FAX_END_TOKEN_LENGTH; - bStopped = true; - } - int nTokenStart = nStart + (bStarted ? FAX_PHONE_TOKEN_LENGTH : 0); - int nTokenStop = nStop - (bStopped ? FAX_END_TOKEN_LENGTH : 0); - m_aPhoneCollection += aPhone.Copy( nTokenStart, nTokenStop - nTokenStart ); - if( ! m_bPhoneCollectionActive ) - { - m_pPhoneNr->AppendAscii( "" ); - m_pPhoneNr->Append( m_aPhoneCollection ); - m_pPhoneNr->AppendAscii( "" ); - m_aPhoneCollection.Erase(); - } - } - if( m_aPhoneCollection.Len() > 1024 ) - { - m_bPhoneCollectionActive = false; - m_aPhoneCollection.Erase(); - bRet = false; - } - - if( bRet && m_bSwallowFaxNo ) - { - rLen -= nStop - nStart; - rCutStart = nStart+nIndex; - rCutStop = nStop+nIndex; - if( rCutStart ) - rNewText = rOrig.Copy( 0, rCutStart ); - rNewText += rOrig.Copy( rCutStop ); - } - - return bRet && m_bSwallowFaxNo; -} - -bool PspGraphics::drawAlphaBitmap( const SalTwoRect&, - const SalBitmap&, - const SalBitmap& ) -{ - return false; -} - -bool PspGraphics::drawAlphaRect( long, long, long, long, sal_uInt8 ) -{ - return false; -} - -SystemGraphicsData PspGraphics::GetGraphicsData() const -{ - SystemGraphicsData aRes; - aRes.nSize = sizeof(aRes); - aRes.hDrawable = 0; - aRes.pRenderFormat = 0; - return aRes; -} - -SystemFontData PspGraphics::GetSysFontData( int nFallbacklevel ) const -{ - SystemFontData aSysFontData; - - if (nFallbacklevel >= MAX_FALLBACK) nFallbacklevel = MAX_FALLBACK - 1; - if (nFallbacklevel < 0 ) nFallbacklevel = 0; - - aSysFontData.nSize = sizeof( SystemFontData ); - aSysFontData.nFontId = 0; - aSysFontData.nFontFlags = 0; - aSysFontData.bFakeBold = false; - aSysFontData.bFakeItalic = false; - aSysFontData.bAntialias = true; - return aSysFontData; -} - -bool PspGraphics::supportsOperation( OutDevSupportType ) const -{ - return false; -} diff --git a/vcl/unx/source/gdi/salbmp.cxx b/vcl/unx/source/gdi/salbmp.cxx deleted file mode 100644 index cc7934b0a798..000000000000 --- a/vcl/unx/source/gdi/salbmp.cxx +++ /dev/null @@ -1,1093 +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_vcl.hxx" - -#include -#include -#include -#ifdef FREEBSD -#include -#endif -#include -#include "Xproto.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// ----------- -// - Defines - -// ----------- - -#define SAL_DRAWPIXMAP_MAX_EXT 4096 - -// ------------- -// - SalBitmap - -// ------------- - -SalBitmap* X11SalInstance::CreateSalBitmap() -{ - return new X11SalBitmap(); -} - -ImplSalBitmapCache* X11SalBitmap::mpCache = NULL; -ULONG X11SalBitmap::mnCacheInstCount = 0; - -// ----------------------------------------------------------------------------- - -X11SalBitmap::X11SalBitmap() : - mpDIB( NULL ), - mpDDB( NULL ) -{ -} - -// ----------------------------------------------------------------------------- - -X11SalBitmap::~X11SalBitmap() -{ - Destroy(); -} - -// ----------------------------------------------------------------------------- - -void X11SalBitmap::ImplCreateCache() -{ - if( !mnCacheInstCount++ ) - mpCache = new ImplSalBitmapCache; -} - -// ----------------------------------------------------------------------------- - -void X11SalBitmap::ImplDestroyCache() -{ - DBG_ASSERT( mnCacheInstCount, "X11SalBitmap::ImplDestroyCache(): underflow" ); - - if( mnCacheInstCount && !--mnCacheInstCount ) - delete mpCache, mpCache = NULL; -} - -// ----------------------------------------------------------------------------- - -void X11SalBitmap::ImplRemovedFromCache() -{ - if( mpDDB ) - delete mpDDB, mpDDB = NULL; -} - -// ----------------------------------------------------------------------------- - -BitmapBuffer* X11SalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ) -{ - DBG_ASSERT( nBitCount == 1 || nBitCount == 4 || nBitCount == 8 || nBitCount == 16 || nBitCount == 24, "Unsupported BitCount!" ); - - BitmapBuffer* pDIB = NULL; - - if( rSize.Width() && rSize.Height() ) - { - try - { - pDIB = new BitmapBuffer; - } - catch( std::bad_alloc& ) - { - pDIB = NULL; - } - - if( pDIB ) - { - const USHORT nColors = ( nBitCount <= 8 ) ? ( 1 << nBitCount ) : 0; - - pDIB->mnFormat = BMP_FORMAT_BOTTOM_UP; - - switch( nBitCount ) - { - case( 1 ): pDIB->mnFormat |= BMP_FORMAT_1BIT_MSB_PAL; break; - case( 4 ): pDIB->mnFormat |= BMP_FORMAT_4BIT_MSN_PAL; break; - case( 8 ): pDIB->mnFormat |= BMP_FORMAT_8BIT_PAL; break; -#ifdef OSL_BIGENDIAN - case(16 ): - pDIB->mnFormat|= BMP_FORMAT_16BIT_TC_MSB_MASK; - pDIB->maColorMask = ColorMask( 0xf800, 0x07e0, 0x001f ); - break; -#else - case(16 ): - pDIB->mnFormat|= BMP_FORMAT_16BIT_TC_LSB_MASK; - pDIB->maColorMask = ColorMask( 0xf800, 0x07e0, 0x001f ); - break; -#endif - default: - nBitCount = 24; - //fall through - case 24: - pDIB->mnFormat |= BMP_FORMAT_24BIT_TC_BGR; - break; - } - - pDIB->mnWidth = rSize.Width(); - pDIB->mnHeight = rSize.Height(); - pDIB->mnScanlineSize = AlignedWidth4Bytes( pDIB->mnWidth * nBitCount ); - pDIB->mnBitCount = nBitCount; - - if( nColors ) - { - pDIB->maPalette = rPal; - pDIB->maPalette.SetEntryCount( nColors ); - } - - try - { - pDIB->mpBits = new BYTE[ pDIB->mnScanlineSize * pDIB->mnHeight ]; - } - catch(std::bad_alloc&) - { - delete pDIB; - pDIB = NULL; - } - } - } - else - pDIB = NULL; - - return pDIB; -} - -// ----------------------------------------------------------------------------- - -BitmapBuffer* X11SalBitmap::ImplCreateDIB( Drawable aDrawable, - int nScreen, - long nDrawableDepth, - long nX, long nY, - long nWidth, long nHeight ) -{ - BitmapBuffer* pDIB = NULL; - - if( aDrawable && nWidth && nHeight && nDrawableDepth ) - { - SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); - SalXLib* pXLib = pSalDisp->GetXLib(); - Display* pXDisp = pSalDisp->GetDisplay(); - - // do not die on XError here - // alternatively one could check the coordinates for being offscreen - // but this call can actually work on servers with backing store - // defaults even if the rectangle is offscreen - // so better catch the XError - pXLib->PushXErrorLevel( true ); - XImage* pImage = XGetImage( pXDisp, aDrawable, nX, nY, nWidth, nHeight, AllPlanes, ZPixmap ); - bool bWasError = pXLib->HasXErrorOccured() && pXLib->GetLastXErrorRequestCode() == X_GetImage; - pXLib->PopXErrorLevel(); - - if( ! bWasError && pImage && pImage->data ) - { - const SalTwoRect aTwoRect = { 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight }; - BitmapBuffer aSrcBuf; - ULONG nDstFormat = BMP_FORMAT_BOTTOM_UP; - const BitmapPalette* pDstPal = NULL; - - aSrcBuf.mnFormat = BMP_FORMAT_TOP_DOWN; - aSrcBuf.mnWidth = nWidth; - aSrcBuf.mnHeight = nHeight; - aSrcBuf.mnBitCount = pImage->bits_per_pixel; - aSrcBuf.mnScanlineSize = pImage->bytes_per_line; - aSrcBuf.mpBits = (BYTE*) pImage->data; - - pImage->red_mask = pSalDisp->GetVisual( nScreen ).red_mask; - pImage->green_mask = pSalDisp->GetVisual( nScreen ).green_mask; - pImage->blue_mask = pSalDisp->GetVisual( nScreen ).blue_mask; - - switch( aSrcBuf.mnBitCount ) - { - case( 1 ): - { - aSrcBuf.mnFormat |= ( LSBFirst == pImage->bitmap_bit_order ? BMP_FORMAT_1BIT_LSB_PAL : BMP_FORMAT_1BIT_MSB_PAL ); - nDstFormat |= BMP_FORMAT_1BIT_MSB_PAL; - } - break; - - case( 4 ): - { - aSrcBuf.mnFormat |= ( LSBFirst == pImage->bitmap_bit_order ? BMP_FORMAT_4BIT_LSN_PAL : BMP_FORMAT_4BIT_MSN_PAL ); - nDstFormat |= BMP_FORMAT_4BIT_MSN_PAL; - } - break; - - case( 8 ): - { - aSrcBuf.mnFormat |= BMP_FORMAT_8BIT_PAL; - nDstFormat |= BMP_FORMAT_8BIT_PAL; - } - break; - - case( 16 ): - { - nDstFormat |= BMP_FORMAT_24BIT_TC_BGR; - aSrcBuf.maColorMask = ColorMask( pImage->red_mask, pImage->green_mask, pImage->blue_mask ); - - if( LSBFirst == pImage->byte_order ) - { - aSrcBuf.mnFormat |= BMP_FORMAT_16BIT_TC_LSB_MASK; - } - else - { - aSrcBuf.mnFormat |= BMP_FORMAT_16BIT_TC_MSB_MASK; - // aSrcBuf.maColorMask = ColorMask( pImage->red_mask ), SWAPSHORT( pImage->green_mask ), SWAPSHORT( pImage->blue_mask ) ); - } - } - break; - - case( 24 ): - { - if( ( LSBFirst == pImage->byte_order ) && ( pImage->red_mask == 0xFF ) ) - aSrcBuf.mnFormat |= BMP_FORMAT_24BIT_TC_RGB; - else - aSrcBuf.mnFormat |= BMP_FORMAT_24BIT_TC_BGR; - - nDstFormat |= BMP_FORMAT_24BIT_TC_BGR; - } - break; - - case( 32 ): - { - if( LSBFirst == pImage->byte_order ) - aSrcBuf.mnFormat |= ( pSalDisp->GetVisual(nScreen).red_mask == 0xFF ? BMP_FORMAT_32BIT_TC_RGBA : BMP_FORMAT_32BIT_TC_BGRA ); - else - aSrcBuf.mnFormat |= ( pSalDisp->GetVisual(nScreen).red_mask == 0xFF ? BMP_FORMAT_32BIT_TC_ABGR : BMP_FORMAT_32BIT_TC_ARGB ); - - nDstFormat |= BMP_FORMAT_24BIT_TC_BGR; - } - break; - } - - BitmapPalette& rPal = aSrcBuf.maPalette; - - if( aSrcBuf.mnBitCount == 1 ) - { - rPal.SetEntryCount( 2 ); - pDstPal = &rPal; - - rPal[ 0 ] = Color( COL_BLACK ); - rPal[ 1 ] = Color( COL_WHITE ); - } - else if( aSrcBuf.mnBitCount <= 8 ) - { - const SalColormap& rColMap = pSalDisp->GetColormap( nScreen ); - const USHORT nCols = Min( (ULONG)rColMap.GetUsed(), (ULONG)(1 << nDrawableDepth) ); - - rPal.SetEntryCount( nCols ); - pDstPal = &rPal; - - for( USHORT i = 0; i < nCols; i++ ) - { - const SalColor nColor( rColMap.GetColor( i ) ); - BitmapColor& rBmpCol = rPal[ i ]; - - rBmpCol.SetRed( SALCOLOR_RED( nColor ) ); - rBmpCol.SetGreen( SALCOLOR_GREEN( nColor ) ); - rBmpCol.SetBlue( SALCOLOR_BLUE( nColor ) ); - } - } - - nDstFormat = aSrcBuf.mnFormat; - pDIB = StretchAndConvert( aSrcBuf, aTwoRect, nDstFormat, - const_cast(pDstPal), &aSrcBuf.maColorMask ); - XDestroyImage( pImage ); - } - } - - return pDIB; -} - -// ----------------------------------------------------------------------------- - -XImage* X11SalBitmap::ImplCreateXImage( SalDisplay *pSalDisp, int nScreen, long nDepth, const SalTwoRect& rTwoRect ) const -{ - XImage* pImage = NULL; - - if( !mpDIB && mpDDB ) - { - const_cast(this)->mpDIB = - ImplCreateDIB( mpDDB->ImplGetPixmap(), - mpDDB->ImplGetScreen(), - mpDDB->ImplGetDepth(), - 0, 0, - mpDDB->ImplGetWidth(), - mpDDB->ImplGetHeight() ); - } - - if( mpDIB && mpDIB->mnWidth && mpDIB->mnHeight ) - { - Display* pXDisp = pSalDisp->GetDisplay(); - long nWidth = rTwoRect.mnDestWidth; - long nHeight = rTwoRect.mnDestHeight; - - if( 1 == GetBitCount() ) - nDepth = 1; - - pImage = XCreateImage( pXDisp, pSalDisp->GetVisual( nScreen ).GetVisual(), - nDepth, ( 1 == nDepth ) ? XYBitmap :ZPixmap, 0, NULL, - nWidth, nHeight, 32, 0 ); - - if( pImage ) - { - BitmapBuffer* pDstBuf; - ULONG nDstFormat = BMP_FORMAT_TOP_DOWN; - BitmapPalette* pPal = NULL; - ColorMask* pMask = NULL; - - switch( pImage->bits_per_pixel ) - { - case( 1 ): - nDstFormat |= ( LSBFirst == pImage->bitmap_bit_order ? BMP_FORMAT_1BIT_LSB_PAL : BMP_FORMAT_1BIT_MSB_PAL ); - break; - - case( 4 ): - nDstFormat |= ( LSBFirst == pImage->bitmap_bit_order ? BMP_FORMAT_4BIT_LSN_PAL : BMP_FORMAT_4BIT_MSN_PAL ); - break; - - case( 8 ): - nDstFormat |= BMP_FORMAT_8BIT_PAL; - break; - - case( 16 ): - { - #ifdef OSL_BIGENDIAN - - if( MSBFirst == pImage->byte_order ) - nDstFormat |= BMP_FORMAT_16BIT_TC_MSB_MASK; - else - nDstFormat |= BMP_FORMAT_16BIT_TC_LSB_MASK; - - #else /* OSL_LITENDIAN */ - - nDstFormat |= BMP_FORMAT_16BIT_TC_LSB_MASK; - if( MSBFirst == pImage->byte_order ) - pImage->byte_order = LSBFirst; - - #endif - - pMask = new ColorMask( pImage->red_mask, pImage->green_mask, pImage->blue_mask ); - } - break; - - case( 24 ): - { - if( ( LSBFirst == pImage->byte_order ) && ( pImage->red_mask == 0xFF ) ) - nDstFormat |= BMP_FORMAT_24BIT_TC_RGB; - else - nDstFormat |= BMP_FORMAT_24BIT_TC_BGR; - } - break; - - case( 32 ): - { - if( LSBFirst == pImage->byte_order ) - nDstFormat |= ( pImage->red_mask == 0xFF ? BMP_FORMAT_32BIT_TC_RGBA : BMP_FORMAT_32BIT_TC_BGRA ); - else - nDstFormat |= ( pImage->red_mask == 0xFF ? BMP_FORMAT_32BIT_TC_ABGR : BMP_FORMAT_32BIT_TC_ARGB ); - } - break; - } - - if( pImage->depth == 1 ) - { - pPal = new BitmapPalette( 2 ); - (*pPal)[ 0 ] = Color( COL_BLACK ); - (*pPal)[ 1 ] = Color( COL_WHITE ); - } - else if( pImage->depth <= 8 ) - { - const SalColormap& rColMap = pSalDisp->GetColormap( nScreen ); - const USHORT nCols = Min( (ULONG)rColMap.GetUsed(), (ULONG)(1 << pImage->depth) ); - - pPal = new BitmapPalette( nCols ); - - for( USHORT i = 0; i < nCols; i++ ) - { - const SalColor nColor( rColMap.GetColor( i ) ); - BitmapColor& rBmpCol = (*pPal)[ i ]; - - rBmpCol.SetRed( SALCOLOR_RED( nColor ) ); - rBmpCol.SetGreen( SALCOLOR_GREEN( nColor ) ); - rBmpCol.SetBlue( SALCOLOR_BLUE( nColor ) ); - } - } - - pDstBuf = StretchAndConvert( *mpDIB, rTwoRect, nDstFormat, pPal, pMask ); - delete pPal; - delete pMask; - - if( pDstBuf && pDstBuf->mpBits ) - { - // set data in buffer as data member in pImage - pImage->data = (char*) pDstBuf->mpBits; - - // destroy buffer; don't destroy allocated data in buffer - delete pDstBuf; - } - else - { - XDestroyImage( pImage ); - pImage = NULL; - } - } - } - - return pImage; -} - -// ----------------------------------------------------------------------------- -bool X11SalBitmap::ImplCreateFromDrawable( Drawable aDrawable, - int nScreen, long nDrawableDepth, - long nX, long nY, long nWidth, long nHeight ) -{ - Destroy(); - - if( aDrawable && nWidth && nHeight && nDrawableDepth ) - mpDDB = new ImplSalDDB( aDrawable, nScreen, nDrawableDepth, nX, nY, nWidth, nHeight ); - - return( mpDDB != NULL ); -} -// ----------------------------------------------------------------------------- - -bool -X11SalBitmap::SnapShot (Display* pDisplay, XLIB_Window hWindow) -{ - if (hWindow != None) - { - XWindowAttributes aAttribute; - XGetWindowAttributes (pDisplay, hWindow, &aAttribute); - if (aAttribute.map_state == IsViewable) - { - // get coordinates relative to root window - XLIB_Window hPetitFleur; - int nRootX, nRootY; - - if (XTranslateCoordinates (pDisplay, hWindow, aAttribute.root, - 0, 0, &nRootX, &nRootY, &hPetitFleur)) - { - XWindowAttributes aRootAttribute; - XGetWindowAttributes (pDisplay, aAttribute.root, &aRootAttribute); - - int width = aAttribute.width; - int height = aAttribute.height; - int x = nRootX; - int y = nRootY; - - // horizontal range check - if (x < 0) - { - width = width + x; - x = 0; - } - else - if (x > aRootAttribute.width) - { - width = 0; - x = aRootAttribute.width; - } - else - if (x + width > aRootAttribute.width) - { - width = aRootAttribute.width - x; - } - - // vertical range check - if (y < 0) - { - height = height + y; - y = 0; - } - else - if (y > aRootAttribute.height) - { - height = 0; - y = aRootAttribute.height; - } - else - if (y + height > aRootAttribute.height) - { - height = aRootAttribute.height - y; - } - - if ((width > 0) && (height > 0)) - { - XImage* pImage = XGetImage( pDisplay, aAttribute.root, - x, y, width, height, AllPlanes, ZPixmap ); - bool bSnapShot = ImplCreateFromXImage( pDisplay, - aAttribute.root, - XScreenNumberOfScreen( aAttribute.screen ), - pImage ); - XDestroyImage (pImage); - - return bSnapShot; - } - } - } - } - - return False; -} - -bool -X11SalBitmap::ImplCreateFromXImage (Display* pDisplay, XLIB_Window hWindow, int nScreen, XImage* pImage) -{ - Destroy(); - - if (pImage != NULL && pImage->width != 0 && pImage->height != 0 && pImage->depth != 0) - { - mpDDB = new ImplSalDDB (pDisplay, hWindow, nScreen, pImage); - return True; - } - return False; -} - -ImplSalDDB* X11SalBitmap::ImplGetDDB( Drawable aDrawable, - int nScreen, - long nDrawableDepth, - const SalTwoRect& rTwoRect ) const -{ - if( !mpDDB || !mpDDB->ImplMatches( nScreen, nDrawableDepth, rTwoRect ) ) - { - if( mpDDB ) - { - // do we already have a DIB? if not, create aDIB from current DDB first - if( !mpDIB ) - { - const_cast(this)->mpDIB = ImplCreateDIB( mpDDB->ImplGetPixmap(), - mpDDB->ImplGetScreen(), - mpDDB->ImplGetDepth(), - 0, 0, - mpDDB->ImplGetWidth(), - mpDDB->ImplGetHeight() ); - } - - delete mpDDB, const_cast(this)->mpDDB = NULL; - } - - if( mpCache ) - mpCache->ImplRemove( const_cast(this) ); - - SalTwoRect aTwoRect( rTwoRect ); - if( aTwoRect.mnSrcX < 0 ) - { - aTwoRect.mnSrcWidth += aTwoRect.mnSrcX; - aTwoRect.mnSrcX = 0; - } - if( aTwoRect.mnSrcY < 0 ) - { - aTwoRect.mnSrcHeight += aTwoRect.mnSrcY; - aTwoRect.mnSrcY = 0; - } - - // create new DDB from DIB - const Size aSize( GetSize() ); - if( aTwoRect.mnSrcWidth == aTwoRect.mnDestWidth && - aTwoRect.mnSrcHeight == aTwoRect.mnDestHeight ) - { - aTwoRect.mnSrcX = aTwoRect.mnSrcY = aTwoRect.mnDestX = aTwoRect.mnDestY = 0; - aTwoRect.mnSrcWidth = aTwoRect.mnDestWidth = aSize.Width(); - aTwoRect.mnSrcHeight = aTwoRect.mnDestHeight = aSize.Height(); - } - else if( aTwoRect.mnSrcWidth+aTwoRect.mnSrcX > aSize.Width() || - aTwoRect.mnSrcHeight+aTwoRect.mnSrcY > aSize.Height() ) - { - // #i47823# this should not happen at all, but does nonetheless - // because BitmapEx allows for mask bitmaps of different size - // than image bitmap (broken) - if( aTwoRect.mnSrcX >= aSize.Width() || - aTwoRect.mnSrcY >= aSize.Height() ) - return NULL; // this would be a really mad case - - if( aTwoRect.mnSrcWidth+aTwoRect.mnSrcX > aSize.Width() ) - { - aTwoRect.mnSrcWidth = aSize.Width()-aTwoRect.mnSrcX; - if( aTwoRect.mnSrcWidth < 1 ) - { - aTwoRect.mnSrcX = 0; - aTwoRect.mnSrcWidth = aSize.Width(); - } - } - if( aTwoRect.mnSrcHeight+aTwoRect.mnSrcY > aSize.Height() ) - { - aTwoRect.mnSrcHeight = aSize.Height() - aTwoRect.mnSrcY; - if( aTwoRect.mnSrcHeight < 1 ) - { - aTwoRect.mnSrcY = 0; - aTwoRect.mnSrcHeight = aSize.Height(); - } - } - } - - XImage* pImage = ImplCreateXImage( GetX11SalData()->GetDisplay(), nScreen, - nDrawableDepth, aTwoRect ); - - if( pImage ) - { - const_cast(this)->mpDDB = new ImplSalDDB( pImage, aDrawable, nScreen, aTwoRect ); - delete[] pImage->data, pImage->data = NULL; - XDestroyImage( pImage ); - - if( mpCache ) - mpCache->ImplAdd( const_cast(this), mpDDB->ImplGetMemSize() ); - } - } - - return mpDDB; -} - -// ----------------------------------------------------------------------------- - -void X11SalBitmap::ImplDraw( Drawable aDrawable, - int nScreen, - long nDrawableDepth, - const SalTwoRect& rTwoRect, - const GC& rGC ) const -{ - ImplGetDDB( aDrawable, nScreen, nDrawableDepth, rTwoRect ); - if( mpDDB ) - mpDDB->ImplDraw( aDrawable, nDrawableDepth, rTwoRect, rGC ); -} - -// ----------------------------------------------------------------------------- - -bool X11SalBitmap::Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ) -{ - Destroy(); - mpDIB = ImplCreateDIB( rSize, nBitCount, rPal ); - - return( mpDIB != NULL ); -} - -// ----------------------------------------------------------------------------- - -bool X11SalBitmap::Create( const SalBitmap& rSSalBmp ) -{ - Destroy(); - - const X11SalBitmap& rSalBmp = static_cast( rSSalBmp ); - - if( rSalBmp.mpDIB ) - { - // TODO: reference counting... - mpDIB = new BitmapBuffer( *rSalBmp.mpDIB ); - // TODO: get rid of this when BitmapBuffer gets copy constructor - try - { - mpDIB->mpBits = new BYTE[ mpDIB->mnScanlineSize * mpDIB->mnHeight ]; - } - catch( std::bad_alloc& ) - { - delete mpDIB; - mpDIB = NULL; - } - - if( mpDIB ) - memcpy( mpDIB->mpBits, rSalBmp.mpDIB->mpBits, mpDIB->mnScanlineSize * mpDIB->mnHeight ); - } - else if( rSalBmp.mpDDB ) - ImplCreateFromDrawable( rSalBmp.mpDDB->ImplGetPixmap(), - rSalBmp.mpDDB->ImplGetScreen(), - rSalBmp.mpDDB->ImplGetDepth(), - 0, 0, rSalBmp.mpDDB->ImplGetWidth(), rSalBmp.mpDDB->ImplGetHeight() ); - - return( ( !rSalBmp.mpDIB && !rSalBmp.mpDDB ) || - ( rSalBmp.mpDIB && ( mpDIB != NULL ) ) || - ( rSalBmp.mpDDB && ( mpDDB != NULL ) ) ); -} - -// ----------------------------------------------------------------------------- - -bool X11SalBitmap::Create( const SalBitmap&, SalGraphics* ) -{ - return FALSE; -} - -// ----------------------------------------------------------------------------- - -bool X11SalBitmap::Create( const SalBitmap&, USHORT ) -{ - return FALSE; -} - -// ----------------------------------------------------------------------------- - -void X11SalBitmap::Destroy() -{ - if( mpDIB ) - { - delete[] mpDIB->mpBits; - delete mpDIB, mpDIB = NULL; - } - - if( mpDDB ) - delete mpDDB, mpDDB = NULL; - - if( mpCache ) - mpCache->ImplRemove( this ); -} - -// ----------------------------------------------------------------------------- - -Size X11SalBitmap::GetSize() const -{ - Size aSize; - - if( mpDIB ) - aSize.Width() = mpDIB->mnWidth, aSize.Height() = mpDIB->mnHeight; - else if( mpDDB ) - aSize.Width() = mpDDB->ImplGetWidth(), aSize.Height() = mpDDB->ImplGetHeight(); - - return aSize; -} - -// ----------------------------------------------------------------------------- - -USHORT X11SalBitmap::GetBitCount() const -{ - USHORT nBitCount; - - if( mpDIB ) - nBitCount = mpDIB->mnBitCount; - else if( mpDDB ) - nBitCount = mpDDB->ImplGetDepth(); - else - nBitCount = 0; - - return nBitCount; -} - -// ----------------------------------------------------------------------------- - -BitmapBuffer* X11SalBitmap::AcquireBuffer( bool ) -{ - if( !mpDIB && mpDDB ) - { - mpDIB = ImplCreateDIB( mpDDB->ImplGetPixmap(), - mpDDB->ImplGetScreen(), - mpDDB->ImplGetDepth(), - 0, 0, mpDDB->ImplGetWidth(), mpDDB->ImplGetHeight() ); - } - - return mpDIB; -} - -// ----------------------------------------------------------------------------- - -void X11SalBitmap::ReleaseBuffer( BitmapBuffer*, bool bReadOnly ) -{ - if( !bReadOnly ) - { - if( mpDDB ) - delete mpDDB, mpDDB = NULL; - - if( mpCache ) - mpCache->ImplRemove( this ); - } -} - -// ----------------------------------------------------------------------------- - -bool X11SalBitmap::GetSystemData( BitmapSystemData& rData ) -{ - if( mpDDB ) - { - // Rename/retype pDummy to your likings (though X11 Pixmap is - // prolly not a good idea, since it's accessed from - // non-platform aware code in vcl/bitmap.hxx) - rData.aPixmap = (void*)mpDDB->ImplGetPixmap(); - rData.mnWidth = mpDDB->ImplGetWidth (); - rData.mnHeight = mpDDB->ImplGetHeight (); - return true; - } - - return false; -} - -// -------------- -// - ImplSalDDB - -// -------------- - -ImplSalDDB::ImplSalDDB( XImage* pImage, Drawable aDrawable, int nScreen, const SalTwoRect& rTwoRect ) : - maPixmap ( 0 ), - maTwoRect ( rTwoRect ), - mnDepth ( pImage->depth ), - mnScreen ( nScreen ) -{ - SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); - Display* pXDisp = pSalDisp->GetDisplay(); - - if( (maPixmap = XCreatePixmap( pXDisp, aDrawable, ImplGetWidth(), ImplGetHeight(), ImplGetDepth() )) ) - { - XGCValues aValues; - GC aGC; - int nValues = GCFunction; - - aValues.function = GXcopy; - - if( 1 == mnDepth ) - { - nValues |= ( GCForeground | GCBackground ); - aValues.foreground = 1, aValues.background = 0; - } - - aGC = XCreateGC( pXDisp, maPixmap, nValues, &aValues ); - XPutImage( pXDisp, maPixmap, aGC, pImage, 0, 0, 0, 0, maTwoRect.mnDestWidth, maTwoRect.mnDestHeight ); - XFreeGC( pXDisp, aGC ); - } -} - -// ----------------------------------------------------------------------------------------- -// create from XImage - -ImplSalDDB::ImplSalDDB (Display* pDisplay, XLIB_Window hWindow, int nScreen, XImage* pImage) : - mnScreen( nScreen ) -{ - maPixmap = XCreatePixmap (pDisplay, hWindow, pImage->width, pImage->height, pImage->depth); - if (maPixmap != 0) - { - XGCValues aValues; - GC aGC; - int nValues = GCFunction; - - aValues.function = GXcopy; - - if (pImage->depth == 1) - { - nValues |= ( GCForeground | GCBackground ); - aValues.foreground = 1; - aValues.background = 0; - } - - aGC = XCreateGC (pDisplay, maPixmap, nValues, &aValues); - XPutImage (pDisplay, maPixmap, aGC, pImage, 0, 0, 0, 0, pImage->width, pImage->height); - XFreeGC (pDisplay, aGC); - - maTwoRect.mnSrcX = 0; - maTwoRect.mnSrcY = 0; - maTwoRect.mnDestX = 0; - maTwoRect.mnDestY = 0; - maTwoRect.mnSrcWidth = pImage->width; - maTwoRect.mnDestWidth = pImage->width; - maTwoRect.mnSrcHeight = pImage->height; - maTwoRect.mnDestHeight = pImage->height; - - mnDepth = pImage->depth; - } -} - -// ----------------------------------------------------------------------------- - -ImplSalDDB::ImplSalDDB( Drawable aDrawable, int nScreen, long nDrawableDepth, long nX, long nY, long nWidth, long nHeight ) : - mnDepth( nDrawableDepth ), - mnScreen( nScreen ) -{ - SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); - Display* pXDisp = pSalDisp->GetDisplay(); - - if( (maPixmap = XCreatePixmap( pXDisp, aDrawable, nWidth, nHeight, nDrawableDepth )) ) - { - XGCValues aValues; - GC aGC; - int nValues = GCFunction; - - aValues.function = GXcopy; - - if( 1 == mnDepth ) - { - nValues |= ( GCForeground | GCBackground ); - aValues.foreground = 1, aValues.background = 0; - } - - aGC = XCreateGC( pXDisp, maPixmap, nValues, &aValues ); - ImplDraw( aDrawable, nDrawableDepth, maPixmap, mnDepth, - nX, nY, nWidth, nHeight, 0, 0, aGC ); - XFreeGC( pXDisp, aGC ); - - maTwoRect.mnSrcX = maTwoRect.mnSrcY = maTwoRect.mnDestX = maTwoRect.mnDestY = 0; - maTwoRect.mnSrcWidth = maTwoRect.mnDestWidth = nWidth; - maTwoRect.mnSrcHeight = maTwoRect.mnDestHeight = nHeight; - } -} - -// ----------------------------------------------------------------------------- - -ImplSalDDB::~ImplSalDDB() -{ - if( maPixmap && ImplGetSVData() ) - XFreePixmap( GetX11SalData()->GetDisplay()->GetDisplay(), maPixmap ); -} - -// ----------------------------------------------------------------------------- - -bool ImplSalDDB::ImplMatches( int nScreen, long nDepth, const SalTwoRect& rTwoRect ) const -{ - bool bRet = FALSE; - - if( ( maPixmap != 0 ) && ( ( mnDepth == nDepth ) || ( 1 == mnDepth ) ) && nScreen == mnScreen) - { - if( rTwoRect.mnSrcX == maTwoRect.mnSrcX && rTwoRect.mnSrcY == maTwoRect.mnSrcY && - rTwoRect.mnSrcWidth == maTwoRect.mnSrcWidth && rTwoRect.mnSrcHeight == maTwoRect.mnSrcHeight && - rTwoRect.mnDestWidth == maTwoRect.mnDestWidth && rTwoRect.mnDestHeight == maTwoRect.mnDestHeight ) - { - // absolutely indentically - bRet = TRUE; - } - else if( rTwoRect.mnSrcWidth == rTwoRect.mnDestWidth && rTwoRect.mnSrcHeight == rTwoRect.mnDestHeight && - maTwoRect.mnSrcWidth == maTwoRect.mnDestWidth && maTwoRect.mnSrcHeight == maTwoRect.mnDestHeight && - rTwoRect.mnSrcX >= maTwoRect.mnSrcX && rTwoRect.mnSrcY >= maTwoRect.mnSrcY && - ( rTwoRect.mnSrcX + rTwoRect.mnSrcWidth ) <= ( maTwoRect.mnSrcX + maTwoRect.mnSrcWidth ) && - ( rTwoRect.mnSrcY + rTwoRect.mnSrcHeight ) <= ( maTwoRect.mnSrcY + maTwoRect.mnSrcHeight ) ) - { - bRet = TRUE; - } - } - - return bRet; -} - -// ----------------------------------------------------------------------------- - -void ImplSalDDB::ImplDraw( Drawable aDrawable, long nDrawableDepth, const SalTwoRect& rTwoRect, const GC& rGC ) const -{ - ImplDraw( maPixmap, mnDepth, aDrawable, nDrawableDepth, - rTwoRect.mnSrcX - maTwoRect.mnSrcX, rTwoRect.mnSrcY - maTwoRect.mnSrcY, - rTwoRect.mnDestWidth, rTwoRect.mnDestHeight, - rTwoRect.mnDestX, rTwoRect.mnDestY, rGC ); -} - -// ----------------------------------------------------------------------------- - -void ImplSalDDB::ImplDraw( Drawable aSrcDrawable, long nSrcDrawableDepth, - Drawable aDstDrawable, long, - long nSrcX, long nSrcY, - long nDestWidth, long nDestHeight, - long nDestX, long nDestY, const GC& rGC ) -{ - SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); - Display* pXDisp = pSalDisp->GetDisplay(); - - if( 1 == nSrcDrawableDepth ) - { - XCopyPlane( pXDisp, aSrcDrawable, aDstDrawable, rGC, - nSrcX, nSrcY, nDestWidth, nDestHeight, nDestX, nDestY, 1 ); - } - else - { - XCopyArea( pXDisp, aSrcDrawable, aDstDrawable, rGC, - nSrcX, nSrcY, nDestWidth, nDestHeight, nDestX, nDestY ); - } -} - -// ---------------------- -// - ImplSalBitmapCache - -// ---------------------- - -struct ImplBmpObj -{ - X11SalBitmap* mpBmp; - ULONG mnMemSize; - ULONG mnFlags; - - ImplBmpObj( X11SalBitmap* pBmp, ULONG nMemSize, ULONG nFlags ) : - mpBmp( pBmp ), mnMemSize( nMemSize ), mnFlags( nFlags ) {} -}; - -// ----------------------------------------------------------------------------- - -ImplSalBitmapCache::ImplSalBitmapCache() : - mnTotalSize( 0UL ) -{ -} - -// ----------------------------------------------------------------------------- - -ImplSalBitmapCache::~ImplSalBitmapCache() -{ - ImplClear(); -} - -// ----------------------------------------------------------------------------- - -void ImplSalBitmapCache::ImplAdd( X11SalBitmap* pBmp, ULONG nMemSize, ULONG nFlags ) -{ - ImplBmpObj* pObj; - bool bFound = FALSE; - - for( pObj = (ImplBmpObj*) maBmpList.Last(); pObj && !bFound; pObj = (ImplBmpObj*) maBmpList.Prev() ) - if( pObj->mpBmp == pBmp ) - bFound = TRUE; - - mnTotalSize += nMemSize; - - if( bFound ) - { - mnTotalSize -= pObj->mnMemSize; - pObj->mnMemSize = nMemSize, pObj->mnFlags = nFlags; - } - else - maBmpList.Insert( new ImplBmpObj( pBmp, nMemSize, nFlags ), LIST_APPEND ); -} - -// ----------------------------------------------------------------------------- - -void ImplSalBitmapCache::ImplRemove( X11SalBitmap* pBmp ) -{ - for( ImplBmpObj* pObj = (ImplBmpObj*) maBmpList.Last(); pObj; pObj = (ImplBmpObj*) maBmpList.Prev() ) - { - if( pObj->mpBmp == pBmp ) - { - maBmpList.Remove( pObj ); - pObj->mpBmp->ImplRemovedFromCache(); - mnTotalSize -= pObj->mnMemSize; - delete pObj; - break; - } - } -} - -// ----------------------------------------------------------------------------- - -void ImplSalBitmapCache::ImplClear() -{ - for( ImplBmpObj* pObj = (ImplBmpObj*) maBmpList.First(); pObj; pObj = (ImplBmpObj*) maBmpList.Next() ) - { - pObj->mpBmp->ImplRemovedFromCache(); - delete pObj; - } - - maBmpList.Clear(); - mnTotalSize = 0; -} diff --git a/vcl/unx/source/gdi/salcvt.cxx b/vcl/unx/source/gdi/salcvt.cxx deleted file mode 100644 index c699cdb12335..000000000000 --- a/vcl/unx/source/gdi/salcvt.cxx +++ /dev/null @@ -1,341 +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_vcl.hxx" -#include "salcvt.hxx" - - -SalConverterCache::SalConverterCache() -{ -} - -SalConverterCache* -SalConverterCache::GetInstance () -{ - static SalConverterCache* pCvt = NULL; - if (pCvt == NULL) - pCvt = new SalConverterCache; - - return pCvt; -} - -SalConverterCache::~SalConverterCache() -{ -} - -// ---> FIXME -#include -// <--- - -rtl_UnicodeToTextConverter -SalConverterCache::GetU2TConverter( rtl_TextEncoding nEncoding ) -{ - if( rtl_isOctetTextEncoding( nEncoding ) ) - { - ConverterT& rConverter( m_aConverters[ nEncoding ] ); - if ( rConverter.mpU2T == NULL ) - { - rConverter.mpU2T = - rtl_createUnicodeToTextConverter( nEncoding ); -// ---> FIXME -if ( rConverter.mpU2T == NULL ) - fprintf( stderr, "failed to create Unicode -> %i converter\n", nEncoding); -// <--- - } - return rConverter.mpU2T; - } - return NULL; -} - -rtl_TextToUnicodeConverter -SalConverterCache::GetT2UConverter( rtl_TextEncoding nEncoding ) -{ - if( rtl_isOctetTextEncoding( nEncoding ) ) - { - ConverterT& rConverter( m_aConverters[ nEncoding ] ); - if ( rConverter.mpT2U == NULL ) - { - rConverter.mpT2U = - rtl_createTextToUnicodeConverter( nEncoding ); -// ---> FIXME -if ( rConverter.mpT2U == NULL ) - fprintf( stderr, "failed to create %i -> Unicode converter\n", nEncoding ); -// <--- - } - return rConverter.mpT2U; - } - return NULL; -} - -Bool -SalConverterCache::IsSingleByteEncoding( rtl_TextEncoding nEncoding ) -{ - if( rtl_isOctetTextEncoding( nEncoding ) ) - { - ConverterT& rConverter( m_aConverters[ nEncoding ] ); - if ( ! rConverter.mbValid ) - { - rConverter.mbValid = True; - - rtl_TextEncodingInfo aTextEncInfo; - aTextEncInfo.StructSize = sizeof( aTextEncInfo ); - rtl_getTextEncodingInfo( nEncoding, &aTextEncInfo ); - - if ( aTextEncInfo.MinimumCharSize == aTextEncInfo.MaximumCharSize - && aTextEncInfo.MinimumCharSize == 1) - rConverter.mbSingleByteEncoding = True; - else - rConverter.mbSingleByteEncoding = False; - } - - return rConverter.mbSingleByteEncoding; - } - return False; -} - -// check whether the character set nEncoding contains the unicode -// code point nChar. This list has been compiled from the according -// ttmap files in /usr/openwin/lib/X11/fonts/TrueType/ttmap/ -Bool -SalConverterCache::EncodingHasChar( rtl_TextEncoding nEncoding, - sal_Unicode nChar ) -{ - Bool bMatch = False; - - switch ( nEncoding ) - { - case RTL_TEXTENCODING_DONTKNOW: - bMatch = False; - break; - - case RTL_TEXTENCODING_MS_1252: - case RTL_TEXTENCODING_ISO_8859_1: - case RTL_TEXTENCODING_ISO_8859_15: - // handle iso8859-15 and iso8859-1 the same (and both with euro) - // handle them also like ms1252 - // this is due to the fact that so many X fonts say they are iso8859-1 - // but have the other glyphs anyway because they are really ms1252 - bMatch = ( /*nChar >= 0x0000 &&*/ nChar <= 0x00ff ) - || ( nChar == 0x20ac ) - || ( nChar == 0x201a ) - || ( nChar == 0x0192 ) - || ( nChar == 0x201e ) - || ( nChar == 0x2026 ) - || ( nChar == 0x2020 ) - || ( nChar == 0x2021 ) - || ( nChar == 0x02c6 ) - || ( nChar == 0x2030 ) - || ( nChar == 0x0160 ) - || ( nChar == 0x2039 ) - || ( nChar == 0x0152 ) - || ( nChar == 0x017d ) - || ( nChar == 0x2018 ) - || ( nChar == 0x2019 ) - || ( nChar == 0x201c ) - || ( nChar == 0x201d ) - || ( nChar == 0x2022 ) - || ( nChar == 0x2013 ) - || ( nChar == 0x2014 ) - || ( nChar == 0x02dc ) - || ( nChar == 0x2122 ) - || ( nChar == 0x0161 ) - || ( nChar == 0x203a ) - || ( nChar == 0x0153 ) - || ( nChar == 0x017e ) - || ( nChar == 0x0178 ) - ; - break; - - case RTL_TEXTENCODING_ISO_8859_2: - bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) - || ( nChar >= 0x00a0 && nChar <= 0x017e ) - || ( nChar >= 0x02c7 && nChar <= 0x02dd ); - break; - - case RTL_TEXTENCODING_ISO_8859_4: - bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) - || ( nChar >= 0x00a0 && nChar <= 0x017e ) - || ( nChar >= 0x02c7 && nChar <= 0x02db ); - break; - - case RTL_TEXTENCODING_ISO_8859_5: - bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) - || ( nChar >= 0x00a0 && nChar <= 0x00ad ) - || ( nChar >= 0x0401 && nChar <= 0x045f ) - || ( nChar == 0x2116 ); - break; - - case RTL_TEXTENCODING_ISO_8859_6: - bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) - || ( nChar >= 0x0600 && nChar <= 0x06ff ) - || ( nChar >= 0xfb50 && nChar <= 0xfffe ); - break; - - case RTL_TEXTENCODING_ISO_8859_7: - bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) - || ( nChar >= 0x00a0 && nChar <= 0x00bd ) - || ( nChar == 0x02bd ) - || ( nChar >= 0x0384 && nChar <= 0x03ce ) - || ( nChar >= 0x2014 && nChar <= 0x2019 ); - break; - - case RTL_TEXTENCODING_ISO_8859_8: - bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) - || ( nChar >= 0x00a0 && nChar <= 0x00f7 ) - || ( nChar >= 0x05d0 && nChar <= 0x05ea ) - || ( nChar == 0x2017 ); - break; - - case RTL_TEXTENCODING_ISO_8859_9: - bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) - || ( nChar >= 0x00a0 && nChar <= 0x015f ); - break; - - case RTL_TEXTENCODING_ISO_8859_13: - bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) - || ( nChar >= 0x00a0 && nChar <= 0x017e ) - || ( nChar >= 0x2019 && nChar <= 0x201e ); - break; - - /* real case for RTL_TEXTENCODING_ISO_8859_15 - case RTL_TEXTENCODING_ISO_8859_15: - bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) - || ( nChar >= 0x00a0 && nChar <= 0x00ff ) - || ( nChar >= 0x0152 && nChar <= 0x017e ) - || ( nChar == 0x20ac ); - break; - */ - - case RTL_TEXTENCODING_JIS_X_0201: - bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) - || ( nChar >= 0xff61 && nChar <= 0xff9f ); - break; - - case RTL_TEXTENCODING_MS_1251: - bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) - || ( nChar >= 0x00a0 && nChar <= 0x00bb ) - || ( nChar >= 0x0401 && nChar <= 0x045f ) - || ( nChar >= 0x0490 && nChar <= 0x0491 ) - || ( nChar >= 0x2013 && nChar <= 0x203a ) - || ( nChar >= 0x2116 && nChar <= 0x2122 ); - break; - - case RTL_TEXTENCODING_KOI8_R: - bMatch = ( nChar >= 0x0020 && nChar <= 0x007e ) - || ( nChar >= 0x00a0 && nChar <= 0x00b7 ) - || ( nChar == 0x00f7 ) - || ( nChar >= 0x0401 && nChar <= 0x0451 ) - || ( nChar >= 0x2219 && nChar <= 0x221a ) - || ( nChar >= 0x2248 && nChar <= 0x2265 ) - || ( nChar >= 0x2320 && nChar <= 0x2321 ) - || ( nChar >= 0x2500 && nChar <= 0x25a0 ); - break; - - case RTL_TEXTENCODING_UNICODE: - bMatch = True; - break; - - case RTL_TEXTENCODING_EUC_KR: - case RTL_TEXTENCODING_BIG5: - case RTL_TEXTENCODING_GBK: - case RTL_TEXTENCODING_GB_2312: - case RTL_TEXTENCODING_MS_1361: - case RTL_TEXTENCODING_JIS_X_0208: - - // XXX Big5 and Korean EUC contain Ascii chars, but Solaris - // *-big5-1 and *-ksc5601.1992-3 fonts dont, in general CJK fonts - // are monospaced, so dont trust them for latin chars - if (nChar <= 0xFF) - { - bMatch = False; - break; - } - - default: - // XXX really convert the unicode char into the encoding - // and check for conversion errors, this is expensive ! - rtl_UnicodeToTextConverter aConverter; - rtl_UnicodeToTextContext aContext; - - aConverter = GetU2TConverter(nEncoding); - aContext = rtl_createUnicodeToTextContext( aConverter ); - - // ---> FIXME - if ( aConverter == NULL ) - return False; - // <--- - - sal_Char pConversionBuffer[ 32 ]; - sal_uInt32 nConversionInfo; - sal_Size nConvertedChars; - sal_Size nSize; - - nSize = rtl_convertUnicodeToText( aConverter, aContext, - &nChar, 1, pConversionBuffer, sizeof(pConversionBuffer), - RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR - | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR, - &nConversionInfo, &nConvertedChars ); - - rtl_destroyUnicodeToTextContext( aConverter, aContext ); - - bMatch = (nConvertedChars == 1) - && (nSize == 1 || nSize == 2) // XXX Fix me this is a hack - && ((nConversionInfo & RTL_UNICODETOTEXT_INFO_ERROR) == 0); - break; - } - - return bMatch; -} - -// wrapper for rtl_convertUnicodeToText that handles the usual cases for -// textconversion in drawtext and gettextwidth routines -sal_Size -SalConverterCache::ConvertStringUTF16( const sal_Unicode *pText, int nTextLen, - sal_Char *pBuffer, sal_Size nBufferSize, rtl_TextEncoding nEncoding ) -{ - rtl_UnicodeToTextConverter aConverter = GetU2TConverter(nEncoding); - - const sal_uInt32 nCvtFlags = - RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACE - | RTL_UNICODETOTEXT_FLAGS_UNDEFINED_QUESTIONMARK - | RTL_UNICODETOTEXT_FLAGS_INVALID_QUESTIONMARK ; - sal_uInt32 nCvtInfo; - sal_Size nCvtChars; - - rtl_UnicodeToTextContext aContext = - rtl_createUnicodeToTextContext( aConverter ); - - sal_Size nSize = rtl_convertUnicodeToText( aConverter, aContext, - pText, nTextLen, pBuffer, nBufferSize, - nCvtFlags, &nCvtInfo, &nCvtChars ); - - rtl_destroyUnicodeToTextContext( aConverter, aContext ); - - return nSize; -} - diff --git a/vcl/unx/source/gdi/salcvt.hxx b/vcl/unx/source/gdi/salcvt.hxx deleted file mode 100644 index c142c76fe5d0..000000000000 --- a/vcl/unx/source/gdi/salcvt.hxx +++ /dev/null @@ -1,92 +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 SAL_CONVERTER_CACHE_HXX_ -#define SAL_CONVERTER_CACHE_HXX_ - -#include -#include -#include - -#include - -extern "C" const char* -pGetEncodingName( rtl_TextEncoding nEncoding ); - -// -// Cache TextToUnicode and UnicodeToText converter and conversion info which is -// used in DrawXYZ routines and in the Event loop -// - -class SalConverterCache { - - public: - SalConverterCache(); - ~SalConverterCache(); - Bool EncodingHasChar( - rtl_TextEncoding nEncoding, sal_Unicode nChar ); - rtl_UnicodeToTextConverter - GetU2TConverter( rtl_TextEncoding nEncoding ); - rtl_TextToUnicodeConverter - GetT2UConverter( rtl_TextEncoding nEncoding ); - Bool IsSingleByteEncoding( rtl_TextEncoding nEncoding ); - sal_Size ConvertStringUTF16( const sal_Unicode *pText, int nTextLen, - sal_Char *pBuffer, sal_Size nBufferSize, - rtl_TextEncoding nEncoding); - - static SalConverterCache* - GetInstance (); - - private: - - struct ConverterT { - rtl_UnicodeToTextConverter mpU2T; - rtl_TextToUnicodeConverter mpT2U; - Bool mbSingleByteEncoding; - Bool mbValid; - ConverterT() : - mpU2T( NULL ), - mpT2U( NULL ), - mbSingleByteEncoding( False ), - mbValid( False ) - { - } - ~ConverterT() - { - if( mpU2T ) - rtl_destroyUnicodeToTextConverter( mpU2T ); - if( mpT2U ) - rtl_destroyTextToUnicodeConverter( mpT2U ); - } - }; - - std::map< rtl_TextEncoding, ConverterT > m_aConverters; -}; - - - -#endif /* SAL_CONVERTER_CACHE_HXX_ */ - diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx deleted file mode 100644 index 9dfbfff22d03..000000000000 --- a/vcl/unx/source/gdi/salgdi.cxx +++ /dev/null @@ -1,1285 +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_vcl.hxx" - -#include "Xproto.h" - -#include "salunx.h" -#include "saldata.hxx" -#include "saldisp.hxx" -#include "salgdi.h" -#include "salframe.h" -#include "salvd.h" -#include "xrender_peer.hxx" - -#include "vcl/printergfx.hxx" -#include "vcl/jobdata.hxx" - -#include "tools/debug.hxx" - -#include "basegfx/polygon/b2dpolygon.hxx" -#include "basegfx/polygon/b2dpolypolygon.hxx" -#include "basegfx/polygon/b2dpolypolygontools.hxx" -#include "basegfx/polygon/b2dpolygontools.hxx" -#include "basegfx/polygon/b2dpolygonclipper.hxx" -#include "basegfx/polygon/b2dlinegeometry.hxx" -#include "basegfx/matrix/b2dhommatrix.hxx" -#include "basegfx/matrix/b2dhommatrixtools.hxx" -#include "basegfx/polygon/b2dpolypolygoncutter.hxx" -#include "basegfx/polygon/b2dtrapezoid.hxx" - -#include -#include -#include - -// -=-= SalPolyLine =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#define STATIC_POINTS 64 - -class SalPolyLine -{ - XPoint Points_[STATIC_POINTS]; - XPoint *pFirst_; -public: - inline SalPolyLine( ULONG nPoints ); - inline SalPolyLine( ULONG nPoints, const SalPoint *p ); - inline ~SalPolyLine(); - inline XPoint &operator [] ( ULONG n ) const - { return pFirst_[n]; } -}; - -inline SalPolyLine::SalPolyLine( ULONG nPoints ) - : pFirst_( nPoints+1 > STATIC_POINTS ? new XPoint[nPoints+1] : Points_ ) -{} - -inline SalPolyLine::SalPolyLine( ULONG nPoints, const SalPoint *p ) - : pFirst_( nPoints+1 > STATIC_POINTS ? new XPoint[nPoints+1] : Points_ ) -{ - for( ULONG i = 0; i < nPoints; i++ ) - { - pFirst_[i].x = (short)p[i].mnX; - pFirst_[i].y = (short)p[i].mnY; - } - pFirst_[nPoints] = pFirst_[0]; // close polyline -} - -inline SalPolyLine::~SalPolyLine() -{ if( pFirst_ != Points_ ) delete [] pFirst_; } - -#undef STATIC_POINTS -// -=-= X11SalGraphics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -X11SalGraphics::X11SalGraphics() -{ - m_pFrame = NULL; - m_pVDev = NULL; - m_pDeleteColormap = NULL; - hDrawable_ = None; - m_aRenderPicture = 0; - m_pRenderFormat = NULL; - - pClipRegion_ = NULL; - pPaintRegion_ = NULL; - - pPenGC_ = NULL; - nPenPixel_ = 0; - nPenColor_ = MAKE_SALCOLOR( 0x00, 0x00, 0x00 ); // Black - - pFontGC_ = NULL; - for( int i = 0; i < MAX_FALLBACK; ++i ) - mpServerFont[i] = NULL; - - nTextPixel_ = 0; - nTextColor_ = MAKE_SALCOLOR( 0x00, 0x00, 0x00 ); // Black - -#ifdef ENABLE_GRAPHITE - // check if graphite fonts have been disabled - static const char* pDisableGraphiteStr = getenv( "SAL_DISABLE_GRAPHITE" ); - bDisableGraphite_ = pDisableGraphiteStr ? (pDisableGraphiteStr[0]!='0') : FALSE; -#endif - - pBrushGC_ = NULL; - nBrushPixel_ = 0; - nBrushColor_ = MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF ); // White - hBrush_ = None; - - pMonoGC_ = NULL; - pCopyGC_ = NULL; - pMaskGC_ = NULL; - pInvertGC_ = NULL; - pInvert50GC_ = NULL; - pStippleGC_ = NULL; - pTrackingGC_ = NULL; - - bWindow_ = FALSE; - bPrinter_ = FALSE; - bVirDev_ = FALSE; - bPenGC_ = FALSE; - bFontGC_ = FALSE; - bBrushGC_ = FALSE; - bMonoGC_ = FALSE; - bCopyGC_ = FALSE; - bInvertGC_ = FALSE; - bInvert50GC_ = FALSE; - bStippleGC_ = FALSE; - bTrackingGC_ = FALSE; - bXORMode_ = FALSE; - bDitherBrush_ = FALSE; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -X11SalGraphics::~X11SalGraphics() -{ - ReleaseFonts(); - freeResources(); -} - -// -=-= SalGraphics / X11SalGraphics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -void X11SalGraphics::freeResources() -{ - Display *pDisplay = GetXDisplay(); - - DBG_ASSERT( !pPaintRegion_, "pPaintRegion_" ); - if( pClipRegion_ ) XDestroyRegion( pClipRegion_ ), pClipRegion_ = None; - - if( hBrush_ ) XFreePixmap( pDisplay, hBrush_ ), hBrush_ = None; - if( pPenGC_ ) XFreeGC( pDisplay, pPenGC_ ), pPenGC_ = None; - if( pFontGC_ ) XFreeGC( pDisplay, pFontGC_ ), pFontGC_ = None; - if( pBrushGC_ ) XFreeGC( pDisplay, pBrushGC_ ), pBrushGC_ = None; - if( pMonoGC_ ) XFreeGC( pDisplay, pMonoGC_ ), pMonoGC_ = None; - if( pCopyGC_ ) XFreeGC( pDisplay, pCopyGC_ ), pCopyGC_ = None; - if( pMaskGC_ ) XFreeGC( pDisplay, pMaskGC_ ), pMaskGC_ = None; - if( pInvertGC_ ) XFreeGC( pDisplay, pInvertGC_ ), pInvertGC_ = None; - if( pInvert50GC_ ) XFreeGC( pDisplay, pInvert50GC_ ), pInvert50GC_ = None; - if( pStippleGC_ ) XFreeGC( pDisplay, pStippleGC_ ), pStippleGC_ = None; - if( pTrackingGC_ ) XFreeGC( pDisplay, pTrackingGC_ ), pTrackingGC_ = None; - if( m_pDeleteColormap ) - delete m_pDeleteColormap, m_pColormap = m_pDeleteColormap = NULL; - - if( m_aRenderPicture ) - XRenderPeer::GetInstance().FreePicture( m_aRenderPicture ), m_aRenderPicture = 0; - - bPenGC_ = bFontGC_ = bBrushGC_ = bMonoGC_ = bCopyGC_ = bInvertGC_ = bInvert50GC_ = bStippleGC_ = bTrackingGC_ = false; -} - -void X11SalGraphics::SetDrawable( Drawable aDrawable, int nScreen ) -{ - // shortcut if nothing changed - if( hDrawable_ == aDrawable ) - return; - - // free screen specific resources if needed - if( nScreen != m_nScreen ) - { - freeResources(); - m_pColormap = &GetX11SalData()->GetDisplay()->GetColormap( nScreen ); - m_nScreen = nScreen; - } - - hDrawable_ = aDrawable; - SetXRenderFormat( NULL ); - if( m_aRenderPicture ) - { - XRenderPeer::GetInstance().FreePicture( m_aRenderPicture ); - m_aRenderPicture = 0; - } - - if( hDrawable_ ) - { - nPenPixel_ = GetPixel( nPenColor_ ); - nTextPixel_ = GetPixel( nTextColor_ ); - nBrushPixel_ = GetPixel( nBrushColor_ ); - } -} - -void X11SalGraphics::Init( SalFrame *pFrame, Drawable aTarget, int nScreen ) -{ -#if 0 // TODO: use SetDrawable() instead - m_pColormap = &GetX11SalData()->GetDisplay()->GetColormap(nScreen); - hDrawable_ = aTarget; - m_nScreen = nScreen; - SetXRenderFormat( NULL ); - if( m_aRenderPicture ) - XRenderPeer::GetInstance().FreePicture( m_aRenderPicture ), m_aRenderPicture = 0; - - nPenPixel_ = GetPixel( nPenColor_ ); - nTextPixel_ = GetPixel( nTextColor_ ); - nBrushPixel_ = GetPixel( nBrushColor_ ); -#else - m_pColormap = &GetX11SalData()->GetDisplay()->GetColormap(nScreen); - m_nScreen = nScreen; - SetDrawable( aTarget, nScreen ); -#endif - - bWindow_ = TRUE; - m_pFrame = pFrame; - m_pVDev = NULL; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::DeInit() -{ - SetDrawable( None, m_nScreen ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::SetClipRegion( GC pGC, XLIB_Region pXReg ) const -{ - Display *pDisplay = GetXDisplay(); - - int n = 0; - XLIB_Region Regions[3]; - - if( pClipRegion_ /* && !XEmptyRegion( pClipRegion_ ) */ ) - Regions[n++] = pClipRegion_; -// if( pPaintRegion_ /* && !XEmptyRegion( pPaintRegion_ ) */ ) -// Regions[n++] = pPaintRegion_; - - if( pXReg && !XEmptyRegion( pXReg ) ) - Regions[n++] = pXReg; - - if( 0 == n ) - XSetClipMask( pDisplay, pGC, None ); - else if( 1 == n ) - XSetRegion( pDisplay, pGC, Regions[0] ); - else - { - XLIB_Region pTmpRegion = XCreateRegion(); - XIntersectRegion( Regions[0], Regions[1], pTmpRegion ); -// if( 3 == n ) -// XIntersectRegion( Regions[2], pTmpRegion, pTmpRegion ); - XSetRegion( pDisplay, pGC, pTmpRegion ); - XDestroyRegion( pTmpRegion ); - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -GC X11SalGraphics::SelectPen() -{ - Display *pDisplay = GetXDisplay(); - - if( !pPenGC_ ) - { - XGCValues values; - values.subwindow_mode = ClipByChildren; - values.fill_rule = EvenOddRule; // Pict import/ Gradient - values.graphics_exposures = False; - - pPenGC_ = XCreateGC( pDisplay, hDrawable_, - GCSubwindowMode | GCFillRule | GCGraphicsExposures, - &values ); - } - - if( !bPenGC_ ) - { - if( nPenColor_ != SALCOLOR_NONE ) - XSetForeground( pDisplay, pPenGC_, nPenPixel_ ); - XSetFunction ( pDisplay, pPenGC_, bXORMode_ ? GXxor : GXcopy ); - SetClipRegion( pPenGC_ ); - bPenGC_ = TRUE; - } - - return pPenGC_; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -GC X11SalGraphics::SelectBrush() -{ - Display *pDisplay = GetXDisplay(); - - DBG_ASSERT( nBrushColor_ != SALCOLOR_NONE, "Brush Transparent" ); - - if( !pBrushGC_ ) - { - XGCValues values; - // values.subwindow_mode = IncludeInferiors; - values.subwindow_mode = ClipByChildren; - values.fill_rule = EvenOddRule; // Pict import/ Gradient - values.graphics_exposures = False; - - pBrushGC_ = XCreateGC( pDisplay, hDrawable_, - GCSubwindowMode | GCFillRule | GCGraphicsExposures, - &values ); - } - - if( !bBrushGC_ ) - { - if( !bDitherBrush_ ) - { - XSetFillStyle ( pDisplay, pBrushGC_, FillSolid ); - XSetForeground( pDisplay, pBrushGC_, nBrushPixel_ ); - if( bPrinter_ ) - XSetTile( pDisplay, pBrushGC_, None ); - } - else - { - // Bug in Sun Solaris 2.5.1, XFillPolygon doesn't allways reflect - // changes of the tile. PROPERTY_BUG_Tile doesn't fix this ! - if (GetDisplay()->GetProperties() & PROPERTY_BUG_FillPolygon_Tile) - XSetFillStyle ( pDisplay, pBrushGC_, FillSolid ); - - XSetFillStyle ( pDisplay, pBrushGC_, FillTiled ); - XSetTile ( pDisplay, pBrushGC_, hBrush_ ); - } - XSetFunction ( pDisplay, pBrushGC_, bXORMode_ ? GXxor : GXcopy ); - SetClipRegion( pBrushGC_ ); - - bBrushGC_ = TRUE; - } - - return pBrushGC_; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -GC X11SalGraphics::GetTrackingGC() -{ - const char dash_list[2] = {2, 2}; - - if( !pTrackingGC_ ) - { - XGCValues values; - - values.graphics_exposures = False; - values.foreground = m_pColormap->GetBlackPixel() - ^ m_pColormap->GetWhitePixel(); - values.function = GXxor; - values.line_width = 1; - values.line_style = LineOnOffDash; - - pTrackingGC_ = XCreateGC( GetXDisplay(), GetDrawable(), - GCGraphicsExposures | GCForeground | GCFunction - | GCLineWidth | GCLineStyle, - &values ); - XSetDashes( GetXDisplay(), pTrackingGC_, 0, dash_list, 2 ); - } - - if( !bTrackingGC_ ) - { - SetClipRegion( pTrackingGC_ ); - bTrackingGC_ = TRUE; - } - - return pTrackingGC_; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::DrawLines( ULONG nPoints, - const SalPolyLine &rPoints, - GC pGC, - bool bClose - ) -{ - // errechne wie viele Linien XWindow auf einmal zeichnen kann - ULONG nMaxLines = (GetDisplay()->GetMaxRequestSize() - sizeof(xPolyPointReq)) - / sizeof(xPoint); - if( nMaxLines > nPoints ) nMaxLines = nPoints; - - // gebe alle Linien aus, die XWindows zeichnen kann. - ULONG n; - for( n = 0; nPoints - n > nMaxLines; n += nMaxLines - 1 ) - XDrawLines( GetXDisplay(), - GetDrawable(), - pGC, - &rPoints[n], - nMaxLines, - CoordModeOrigin ); - - if( n < nPoints ) - XDrawLines( GetXDisplay(), - GetDrawable(), - pGC, - &rPoints[n], - nPoints - n, - CoordModeOrigin ); - if( bClose ) - { - if( rPoints[nPoints-1].x != rPoints[0].x || rPoints[nPoints-1].y != rPoints[0].y ) - drawLine( rPoints[nPoints-1].x, rPoints[nPoints-1].y, rPoints[0].x, rPoints[0].y ); - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// Dithern: Calculate a dither-pixmap and make a brush of it -#define P_DELTA 51 -#define DMAP( v, m ) ((v % P_DELTA) > m ? (v / P_DELTA) + 1 : (v / P_DELTA)) - -BOOL X11SalGraphics::GetDitherPixmap( SalColor nSalColor ) -{ - static const short nOrdDither8Bit[ 8 ][ 8 ] = - { - { 0, 38, 9, 48, 2, 40, 12, 50}, - {25, 12, 35, 22, 28, 15, 37, 24}, - { 6, 44, 3, 41, 8, 47, 5, 44}, - {32, 19, 28, 16, 34, 21, 31, 18}, - { 1, 40, 11, 49, 0, 39, 10, 48}, - {27, 14, 36, 24, 26, 13, 36, 23}, - { 8, 46, 4, 43, 7, 45, 4, 42}, - {33, 20, 30, 17, 32, 20, 29, 16} - }; - - // test for correct depth (8bit) - if( GetColormap().GetVisual().GetDepth() != 8 ) - return FALSE; - - char pBits[64]; - char *pBitsPtr = pBits; - - // Set the pallette-entries for the dithering tile - UINT8 nSalColorRed = SALCOLOR_RED ( nSalColor ); - UINT8 nSalColorGreen = SALCOLOR_GREEN ( nSalColor ); - UINT8 nSalColorBlue = SALCOLOR_BLUE ( nSalColor ); - - for( int nY = 0; nY < 8; nY++ ) - { - for( int nX = 0; nX < 8; nX++ ) - { - short nMagic = nOrdDither8Bit[nY][nX]; - UINT8 nR = P_DELTA * DMAP( nSalColorRed, nMagic ); - UINT8 nG = P_DELTA * DMAP( nSalColorGreen, nMagic ); - UINT8 nB = P_DELTA * DMAP( nSalColorBlue, nMagic ); - - *pBitsPtr++ = GetColormap().GetPixel( MAKE_SALCOLOR( nR, nG, nB ) ); - } - } - - // create the tile as ximage and an according pixmap -> caching - XImage *pImage = XCreateImage( GetXDisplay(), - GetColormap().GetXVisual(), - 8, - ZPixmap, - 0, // offset - pBits, // data - 8, 8, // width & height - 8, // bitmap_pad - 0 ); // (default) bytes_per_line - - if ( GetDisplay()->GetProperties() & PROPERTY_BUG_Tile ) - { - if (hBrush_) - XFreePixmap (GetXDisplay(), hBrush_); - hBrush_ = XCreatePixmap( GetXDisplay(), GetDrawable(), 8, 8, 8 ); - } - else - if( !hBrush_ ) - hBrush_ = XCreatePixmap( GetXDisplay(), GetDrawable(), 8, 8, 8 ); - - // put the ximage to the pixmap - XPutImage( GetXDisplay(), - hBrush_, - GetDisplay()->GetCopyGC( m_nScreen ), - pImage, - 0, 0, // Source - 0, 0, // Destination - 8, 8 ); // width & height - - // destroy image-frame but not palette-data - pImage->data = NULL; - XDestroyImage( pImage ); - - return TRUE; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) // const -{ - const SalDisplay *pDisplay = GetDisplay(); - - rDPIX = pDisplay->GetResolution().A(); - rDPIY = pDisplay->GetResolution().B(); - if( !pDisplay->GetExactResolution() && rDPIY < 96 ) - { - rDPIX = Divide( rDPIX * 96, rDPIY ); - rDPIY = 96; - } - else if ( rDPIY > 200 ) - { - rDPIX = Divide( rDPIX * 200, rDPIY ); - rDPIY = 200; - } - - // #i12705# equalize x- and y-resolution if they are close enough - if( rDPIX != rDPIY ) - { - // different x- and y- resolutions are usually artifacts of - // a wrongly calculated screen size. - //if( (13*rDPIX >= 10*rDPIY) && (13*rDPIY >= 10*rDPIX) ) //+-30% - { -#ifdef DEBUG - printf("Forcing Resolution from %" SAL_PRIdINT32 "x%" SAL_PRIdINT32 " to %" SAL_PRIdINT32 "x%" SAL_PRIdINT32 "\n", - rDPIX,rDPIY,rDPIY,rDPIY); -#endif - rDPIX = rDPIY; // y-resolution is more trustworthy - } - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -USHORT X11SalGraphics::GetBitCount() // const -{ - return GetVisual().GetDepth(); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -long X11SalGraphics::GetGraphicsWidth() const -{ - if( m_pFrame ) - return m_pFrame->maGeometry.nWidth; - else if( m_pVDev ) - return m_pVDev->GetWidth(); - else - return 0; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -long X11SalGraphics::GetGraphicsHeight() const -{ - if( m_pFrame ) - return m_pFrame->maGeometry.nHeight; - else if( m_pVDev ) - return m_pVDev->GetHeight(); - else - return 0; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::ResetClipRegion() -{ - if( pClipRegion_ ) - { - bPenGC_ = FALSE; - bFontGC_ = FALSE; - bBrushGC_ = FALSE; - bMonoGC_ = FALSE; - bCopyGC_ = FALSE; - bInvertGC_ = FALSE; - bInvert50GC_ = FALSE; - bStippleGC_ = FALSE; - bTrackingGC_ = FALSE; - - XDestroyRegion( pClipRegion_ ); - pClipRegion_ = NULL; - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::BeginSetClipRegion( ULONG ) -{ - if( pClipRegion_ ) - XDestroyRegion( pClipRegion_ ); - pClipRegion_ = XCreateRegion(); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -BOOL X11SalGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY ) -{ - if (!nDX || !nDY) - return TRUE; - - XRectangle aRect; - aRect.x = (short)nX; - aRect.y = (short)nY; - aRect.width = (unsigned short)nDX; - aRect.height = (unsigned short)nDY; - - XUnionRectWithRegion( &aRect, pClipRegion_, pClipRegion_ ); - - return TRUE; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -bool X11SalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& ) -{ - // TODO: implement and advertise OutDevSupport_B2DClip support - return false; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::EndSetClipRegion() -{ - bPenGC_ = FALSE; - bFontGC_ = FALSE; - bBrushGC_ = FALSE; - bMonoGC_ = FALSE; - bCopyGC_ = FALSE; - bInvertGC_ = FALSE; - bInvert50GC_ = FALSE; - bStippleGC_ = FALSE; - bTrackingGC_ = FALSE; - - if( XEmptyRegion( pClipRegion_ ) ) - { - XDestroyRegion( pClipRegion_ ); - pClipRegion_= NULL; - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::SetLineColor() -{ - if( nPenColor_ != SALCOLOR_NONE ) - { - nPenColor_ = SALCOLOR_NONE; - bPenGC_ = FALSE; - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::SetLineColor( SalColor nSalColor ) -{ - if( nPenColor_ != nSalColor ) - { - nPenColor_ = nSalColor; - nPenPixel_ = GetPixel( nSalColor ); - bPenGC_ = FALSE; - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::SetFillColor() -{ - if( nBrushColor_ != SALCOLOR_NONE ) - { - bDitherBrush_ = FALSE; - nBrushColor_ = SALCOLOR_NONE; - bBrushGC_ = FALSE; - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::SetFillColor( SalColor nSalColor ) -{ - if( nBrushColor_ != nSalColor ) - { - bDitherBrush_ = FALSE; - nBrushColor_ = nSalColor; - nBrushPixel_ = GetPixel( nSalColor ); - if( TrueColor != GetColormap().GetVisual().GetClass() - && GetColormap().GetColor( nBrushPixel_ ) != nBrushColor_ - && nSalColor != MAKE_SALCOLOR( 0x00, 0x00, 0x00 ) // black - && nSalColor != MAKE_SALCOLOR( 0x00, 0x00, 0x80 ) // blue - && nSalColor != MAKE_SALCOLOR( 0x00, 0x80, 0x00 ) // green - && nSalColor != MAKE_SALCOLOR( 0x00, 0x80, 0x80 ) // cyan - && nSalColor != MAKE_SALCOLOR( 0x80, 0x00, 0x00 ) // red - && nSalColor != MAKE_SALCOLOR( 0x80, 0x00, 0x80 ) // magenta - && nSalColor != MAKE_SALCOLOR( 0x80, 0x80, 0x00 ) // brown - && nSalColor != MAKE_SALCOLOR( 0x80, 0x80, 0x80 ) // gray - && nSalColor != MAKE_SALCOLOR( 0xC0, 0xC0, 0xC0 ) // light gray - && nSalColor != MAKE_SALCOLOR( 0x00, 0x00, 0xFF ) // light blue - && nSalColor != MAKE_SALCOLOR( 0x00, 0xFF, 0x00 ) // light green - && nSalColor != MAKE_SALCOLOR( 0x00, 0xFF, 0xFF ) // light cyan - && nSalColor != MAKE_SALCOLOR( 0xFF, 0x00, 0x00 ) // light red - && nSalColor != MAKE_SALCOLOR( 0xFF, 0x00, 0xFF ) // light magenta - && nSalColor != MAKE_SALCOLOR( 0xFF, 0xFF, 0x00 ) // light brown - && nSalColor != MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF ) ) - bDitherBrush_ = GetDitherPixmap(nSalColor); - bBrushGC_ = FALSE; - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::SetROPLineColor( SalROPColor nROPColor ) -{ - switch( nROPColor ) - { - case SAL_ROP_0 : // 0 - nPenPixel_ = (Pixel)0; - break; - case SAL_ROP_1 : // 1 - nPenPixel_ = (Pixel)(1 << GetVisual().GetDepth()) - 1; - break; - case SAL_ROP_INVERT : // 2 - nPenPixel_ = (Pixel)(1 << GetVisual().GetDepth()) - 1; - break; - } - nPenColor_ = GetColormap().GetColor( nPenPixel_ ); - bPenGC_ = FALSE; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::SetROPFillColor( SalROPColor nROPColor ) -{ - switch( nROPColor ) - { - case SAL_ROP_0 : // 0 - nBrushPixel_ = (Pixel)0; - break; - case SAL_ROP_1 : // 1 - nBrushPixel_ = (Pixel)(1 << GetVisual().GetDepth()) - 1; - break; - case SAL_ROP_INVERT : // 2 - nBrushPixel_ = (Pixel)(1 << GetVisual().GetDepth()) - 1; - break; - } - bDitherBrush_ = FALSE; - nBrushColor_ = GetColormap().GetColor( nBrushPixel_ ); - bBrushGC_ = FALSE; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::SetXORMode( bool bSet, bool ) -{ - if( !bXORMode_ == bSet ) - { - bXORMode_ = bSet; - bPenGC_ = FALSE; - bFontGC_ = FALSE; - bBrushGC_ = FALSE; - bMonoGC_ = FALSE; - bCopyGC_ = FALSE; - bInvertGC_ = FALSE; - bInvert50GC_ = FALSE; - bStippleGC_ = FALSE; - bTrackingGC_ = FALSE; - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::drawPixel( long nX, long nY ) -{ - if( nPenColor_ != SALCOLOR_NONE ) - XDrawPoint( GetXDisplay(), GetDrawable(), SelectPen(), nX, nY ); -} - -void X11SalGraphics::drawPixel( long nX, long nY, SalColor nSalColor ) -{ - if( nSalColor != SALCOLOR_NONE ) - { - Display *pDisplay = GetXDisplay(); - - if( (nPenColor_ == SALCOLOR_NONE) && !bPenGC_ ) - { - SetLineColor( nSalColor ); - XDrawPoint( pDisplay, GetDrawable(), SelectPen(), nX, nY ); - nPenColor_ = SALCOLOR_NONE; - bPenGC_ = False; - } - else - { - GC pGC = SelectPen(); - - if( nSalColor != nPenColor_ ) - XSetForeground( pDisplay, pGC, GetPixel( nSalColor ) ); - - XDrawPoint( pDisplay, GetDrawable(), pGC, nX, nY ); - - if( nSalColor != nPenColor_ ) - XSetForeground( pDisplay, pGC, nPenPixel_ ); - } - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 ) -{ - if( nPenColor_ != SALCOLOR_NONE ) - { - if ( GetDisplay()->GetProperties() & PROPERTY_BUG_DrawLine ) - { - GC aGC = SelectPen(); - XDrawPoint (GetXDisplay(), GetDrawable(), aGC, (int)nX1, (int)nY1); - XDrawPoint (GetXDisplay(), GetDrawable(), aGC, (int)nX2, (int)nY2); - XDrawLine (GetXDisplay(), GetDrawable(), aGC, nX1, nY1, nX2, nY2 ); - } - else - XDrawLine( GetXDisplay(), GetDrawable(),SelectPen(), - nX1, nY1, nX2, nY2 ); - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::drawRect( long nX, long nY, long nDX, long nDY ) -{ - if( nBrushColor_ != SALCOLOR_NONE ) - { - XFillRectangle( GetXDisplay(), - GetDrawable(), - SelectBrush(), - nX, nY, nDX, nDY ); - } - // Beschreibung DrawRect verkehrt, deshalb -1 - if( nPenColor_ != SALCOLOR_NONE ) - XDrawRectangle( GetXDisplay(), - GetDrawable(), - SelectPen(), - nX, nY, nDX-1, nDY-1 ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry ) -{ - drawPolyLine( nPoints, pPtAry, false ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry, bool bClose ) -{ - if( nPenColor_ != 0xFFFFFFFF ) - { - SalPolyLine Points( nPoints, pPtAry ); - - DrawLines( nPoints, Points, SelectPen(), bClose ); - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry ) -{ - if( nPoints == 0 ) - return; - - if( nPoints < 3 ) - { - if( !bXORMode_ ) - { - if( 1 == nPoints ) - drawPixel( pPtAry[0].mnX, pPtAry[0].mnY ); - else - drawLine( pPtAry[0].mnX, pPtAry[0].mnY, - pPtAry[1].mnX, pPtAry[1].mnY ); - } - return; - } - - SalPolyLine Points( nPoints, pPtAry ); - - nPoints++; - - /* WORKAROUND: some Xservers (Xorg, VIA chipset in this case) - * do not draw the visible part of a polygon - * if it overlaps to the left of screen 0,y. - * This happens to be the case in the gradient drawn in the - * menubar background. workaround for the special case of - * of a rectangle overlapping to the left. - */ - if( nPoints == 5 && - Points[ 0 ].x == Points[ 1 ].x && - Points[ 1 ].y == Points[ 2 ].y && - Points[ 2 ].x == Points[ 3 ].x && - Points[ 0 ].x == Points[ 4 ].x && Points[ 0 ].y == Points[ 4 ].y - ) - { - bool bLeft = false; - bool bRight = false; - for(unsigned int i = 0; i < nPoints; i++ ) - { - if( Points[i].x < 0 ) - bLeft = true; - else - bRight= true; - } - if( bLeft && ! bRight ) - return; - if( bLeft && bRight ) - { - for( unsigned int i = 0; i < nPoints; i++ ) - if( Points[i].x < 0 ) - Points[i].x = 0; - } - } - - if( nBrushColor_ != SALCOLOR_NONE ) - XFillPolygon( GetXDisplay(), - GetDrawable(), - SelectBrush(), - &Points[0], nPoints, - Complex, CoordModeOrigin ); - - if( nPenColor_ != 0xFFFFFFFF ) - DrawLines( nPoints, Points, SelectPen(), true ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::drawPolyPolygon( sal_uInt32 nPoly, - const sal_uInt32 *pPoints, - PCONSTSALPOINT *pPtAry ) -{ - if( nBrushColor_ != SALCOLOR_NONE ) - { - ULONG i, n; - XLIB_Region pXRegA = NULL; - - for( i = 0; i < nPoly; i++ ) { - n = pPoints[i]; - SalPolyLine Points( n, pPtAry[i] ); - if( n > 2 ) - { - XLIB_Region pXRegB = XPolygonRegion( &Points[0], n+1, WindingRule ); - if( !pXRegA ) - pXRegA = pXRegB; - else - { - XXorRegion( pXRegA, pXRegB, pXRegA ); - XDestroyRegion( pXRegB ); - } - } - } - - if( pXRegA ) - { - XRectangle aXRect; - XClipBox( pXRegA, &aXRect ); - - GC pGC = SelectBrush(); - SetClipRegion( pGC, pXRegA ); // ??? doppelt - XDestroyRegion( pXRegA ); - bBrushGC_ = FALSE; - - XFillRectangle( GetXDisplay(), - GetDrawable(), - pGC, - aXRect.x, aXRect.y, aXRect.width, aXRect.height ); - } - } - - if( nPenColor_ != SALCOLOR_NONE ) - for( ULONG i = 0; i < nPoly; i++ ) - drawPolyLine( pPoints[i], pPtAry[i], true ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -sal_Bool X11SalGraphics::drawPolyLineBezier( ULONG, const SalPoint*, const BYTE* ) -{ - return sal_False; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -sal_Bool X11SalGraphics::drawPolygonBezier( ULONG, const SalPoint*, const BYTE* ) -{ - return sal_False; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -sal_Bool X11SalGraphics::drawPolyPolygonBezier( sal_uInt32, const sal_uInt32*, - const SalPoint* const*, const BYTE* const* ) -{ - return sal_False; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -void X11SalGraphics::invert( ULONG nPoints, - const SalPoint* pPtAry, - SalInvert nFlags ) -{ - SalPolyLine Points ( nPoints, pPtAry ); - - GC pGC; - if( SAL_INVERT_50 & nFlags ) - pGC = GetInvert50GC(); - else - if ( SAL_INVERT_TRACKFRAME & nFlags ) - pGC = GetTrackingGC(); - else - pGC = GetInvertGC(); - - if( SAL_INVERT_TRACKFRAME & nFlags ) - DrawLines ( nPoints, Points, pGC, true ); - else - XFillPolygon( GetXDisplay(), - GetDrawable(), - pGC, - &Points[0], nPoints, - Complex, CoordModeOrigin ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -BOOL X11SalGraphics::drawEPS( long,long,long,long,void*,ULONG ) -{ - return FALSE; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -XID X11SalGraphics::GetXRenderPicture() -{ - XRenderPeer& rRenderPeer = XRenderPeer::GetInstance(); - - if( !m_aRenderPicture ) - { - // check xrender support for matching visual - // find a XRenderPictFormat compatible with the Drawable - XRenderPictFormat* pVisualFormat = static_cast(GetXRenderFormat()); - if( !pVisualFormat ) - { - Visual* pVisual = GetDisplay()->GetVisual( m_nScreen ).GetVisual(); - pVisualFormat = rRenderPeer.FindVisualFormat( pVisual ); - if( !pVisualFormat ) - return 0; - // cache the XRenderPictFormat - SetXRenderFormat( static_cast(pVisualFormat) ); - } - - // get the matching xrender target for drawable - m_aRenderPicture = rRenderPeer.CreatePicture( hDrawable_, pVisualFormat, 0, NULL ); - } - -#if 0 - // setup clipping so the callers don't have to do it themselves - // TODO: avoid clipping if already set correctly - if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) ) - rRenderPeer.SetPictureClipRegion( aDstPic, pClipRegion_ ); - else -#endif - { - // reset clip region - // TODO: avoid clip reset if already done - XRenderPictureAttributes aAttr; - aAttr.clip_mask = None; - rRenderPeer.ChangePicture( m_aRenderPicture, CPClipMask, &aAttr ); - } - - return m_aRenderPicture; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -SystemGraphicsData X11SalGraphics::GetGraphicsData() const -{ - SystemGraphicsData aRes; - - aRes.nSize = sizeof(aRes); - aRes.pDisplay = GetXDisplay(); - aRes.hDrawable = hDrawable_; - aRes.pVisual = GetDisplay()->GetVisual( m_nScreen ).GetVisual(); - aRes.nScreen = m_nScreen; - aRes.nDepth = GetDisplay()->GetVisual( m_nScreen ).GetDepth(); - aRes.aColormap = GetDisplay()->GetColormap( m_nScreen ).GetXColormap(); - aRes.pRenderFormat = m_pRenderFormat; - return aRes; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -// draw a poly-polygon -bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rOrigPolyPoly, double fTransparency ) -{ - // nothing to do for empty polypolygons - const int nOrigPolyCount = rOrigPolyPoly.count(); - if( nOrigPolyCount <= 0 ) - return TRUE; - - // nothing to do if everything is transparent - if( (nBrushColor_ == SALCOLOR_NONE) - && (nPenColor_ == SALCOLOR_NONE) ) - return TRUE; - - // cannot handle pencolor!=brushcolor yet - if( (nPenColor_ != SALCOLOR_NONE) - && (nPenColor_ != nBrushColor_) ) - return FALSE; - - // TODO: remove the env-variable when no longer needed - static const char* pRenderEnv = getenv( "SAL_DISABLE_RENDER_POLY" ); - if( pRenderEnv ) - return FALSE; - - // snap to raster if requested - basegfx::B2DPolyPolygon aPolyPoly = rOrigPolyPoly; - const bool bSnapToRaster = !getAntiAliasB2DDraw(); - if( bSnapToRaster ) - aPolyPoly = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges( aPolyPoly ); - - // don't bother with polygons outside of visible area - const basegfx::B2DRange aViewRange( 0, 0, GetGraphicsWidth(), GetGraphicsHeight() ); - aPolyPoly = basegfx::tools::clipPolyPolygonOnRange( aPolyPoly, aViewRange, true, false ); - if( !aPolyPoly.count() ) - return true; - - // tesselate the polypolygon into trapezoids - basegfx::B2DTrapezoidVector aB2DTrapVector; - basegfx::tools::trapezoidSubdivide( aB2DTrapVector, aPolyPoly ); - const int nTrapCount = aB2DTrapVector.size(); - if( !nTrapCount ) - return true; - const bool bDrawn = drawFilledTrapezoids( &aB2DTrapVector[0], nTrapCount, fTransparency ); - return bDrawn; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -bool X11SalGraphics::drawFilledTrapezoids( const ::basegfx::B2DTrapezoid* pB2DTraps, int nTrapCount, double fTransparency ) -{ - if( nTrapCount <= 0 ) - return true; - - Picture aDstPic = GetXRenderPicture(); - // check xrender support for this drawable - if( !aDstPic ) - return false; - - // convert the B2DTrapezoids into XRender-Trapezoids - typedef std::vector TrapezoidVector; - TrapezoidVector aTrapVector( nTrapCount ); - const basegfx::B2DTrapezoid* pB2DTrap = pB2DTraps; - for( int i = 0; i < nTrapCount; ++pB2DTrap, ++i ) - { - XTrapezoid& rTrap = aTrapVector[ i ] ; - - // set y-coordinates - const double fY1 = pB2DTrap->getTopY(); - rTrap.left.p1.y = rTrap.right.p1.y = rTrap.top = XDoubleToFixed( fY1 ); - const double fY2 = pB2DTrap->getBottomY(); - rTrap.left.p2.y = rTrap.right.p2.y = rTrap.bottom = XDoubleToFixed( fY2 ); - - // set x-coordinates - const double fXL1 = pB2DTrap->getTopXLeft(); - rTrap.left.p1.x = XDoubleToFixed( fXL1 ); - const double fXR1 = pB2DTrap->getTopXRight(); - rTrap.right.p1.x = XDoubleToFixed( fXR1 ); - const double fXL2 = pB2DTrap->getBottomXLeft(); - rTrap.left.p2.x = XDoubleToFixed( fXL2 ); - const double fXR2 = pB2DTrap->getBottomXRight(); - rTrap.right.p2.x = XDoubleToFixed( fXR2 ); - } - - // get xrender Picture for polygon foreground - // TODO: cache it like the target picture which uses GetXRenderPicture() - XRenderPeer& rRenderPeer = XRenderPeer::GetInstance(); - SalDisplay::RenderEntry& rEntry = GetDisplay()->GetRenderEntries( m_nScreen )[ 32 ]; - if( !rEntry.m_aPicture ) - { - Display* pXDisplay = GetXDisplay(); - - rEntry.m_aPixmap = ::XCreatePixmap( pXDisplay, hDrawable_, 1, 1, 32 ); - XRenderPictureAttributes aAttr; - aAttr.repeat = true; - - XRenderPictFormat* pXRPF = rRenderPeer.FindStandardFormat( PictStandardARGB32 ); - rEntry.m_aPicture = rRenderPeer.CreatePicture( rEntry.m_aPixmap, pXRPF, CPRepeat, &aAttr ); - } - - // set polygon foreground color and opacity - XRenderColor aRenderColor = GetXRenderColor( nBrushColor_ , fTransparency ); - rRenderPeer.FillRectangle( PictOpSrc, rEntry.m_aPicture, &aRenderColor, 0, 0, 1, 1 ); - - // set clipping - // TODO: move into GetXRenderPicture? - if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) ) - rRenderPeer.SetPictureClipRegion( aDstPic, pClipRegion_ ); - - // render the trapezoids - const XRenderPictFormat* pMaskFormat = rRenderPeer.GetStandardFormatA8(); - rRenderPeer.CompositeTrapezoids( PictOpOver, - rEntry.m_aPicture, aDstPic, pMaskFormat, 0, 0, &aTrapVector[0], aTrapVector.size() ); - - return true; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, double fTransparency, const ::basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin eLineJoin) -{ - const bool bIsHairline = (rLineWidth.getX() == rLineWidth.getY()) && (rLineWidth.getX() <= 1.2); - - // #i101491# - if( !bIsHairline && (rPolygon.count() > 1000) ) - { - // the used basegfx::tools::createAreaGeometry is simply too - // expensive with very big polygons; fallback to caller (who - // should use ImplLineConverter normally) - // AW: ImplLineConverter had to be removed since it does not even - // know LineJoins, so the fallback will now prepare the line geometry - // the same way. - return false; - } - - // temporarily adjust brush color to pen color - // since the line is drawn as an area-polygon - const SalColor aKeepBrushColor = nBrushColor_; - nBrushColor_ = nPenColor_; - - // #i11575#desc5#b adjust B2D tesselation result to raster positions - basegfx::B2DPolygon aPolygon = rPolygon; - const double fHalfWidth = 0.5 * rLineWidth.getX(); - aPolygon.transform( basegfx::tools::createTranslateB2DHomMatrix(+fHalfWidth,+fHalfWidth) ); - - // shortcut for hairline drawing to improve performance - if( bIsHairline ) - { - // hairlines can benefit from a simplified tesselation - // e.g. for hairlines the linejoin style can be ignored - basegfx::B2DTrapezoidVector aB2DTrapVector; - basegfx::tools::createLineTrapezoidFromB2DPolygon( aB2DTrapVector, aPolygon, rLineWidth.getX() ); - - // draw tesselation result - if( ! aB2DTrapVector.empty() ) - { - const int nTrapCount = aB2DTrapVector.size(); - const bool bDrawOk = drawFilledTrapezoids( &aB2DTrapVector[0], nTrapCount, fTransparency ); - - // restore the original brush GC - nBrushColor_ = aKeepBrushColor; - return bDrawOk; - } - else - return true; - } - - // get the area polygon for the line polygon - if( (rLineWidth.getX() != rLineWidth.getY()) - && !basegfx::fTools::equalZero( rLineWidth.getY() ) ) - { - // prepare for createAreaGeometry() with anisotropic linewidth - aPolygon.transform( basegfx::tools::createScaleB2DHomMatrix(1.0, rLineWidth.getX() / rLineWidth.getY())); - } - - // create the area-polygon for the line - const basegfx::B2DPolyPolygon aAreaPolyPoly( basegfx::tools::createAreaGeometry(aPolygon, fHalfWidth, eLineJoin) ); - - if( (rLineWidth.getX() != rLineWidth.getY()) - && !basegfx::fTools::equalZero( rLineWidth.getX() ) ) - { - // postprocess createAreaGeometry() for anisotropic linewidth - aPolygon.transform(basegfx::tools::createScaleB2DHomMatrix(1.0, rLineWidth.getY() / rLineWidth.getX())); - } - - // draw each area polypolygon component individually - // to emulate the polypolygon winding rule "non-zero" - bool bDrawOk = true; - const int nPolyCount = aAreaPolyPoly.count(); - for( int nPolyIdx = 0; nPolyIdx < nPolyCount; ++nPolyIdx ) - { - const ::basegfx::B2DPolyPolygon aOnePoly( aAreaPolyPoly.getB2DPolygon( nPolyIdx ) ); - bDrawOk = drawPolyPolygon( aOnePoly, fTransparency ); - if( !bDrawOk ) - break; - } - - // restore the original brush GC - nBrushColor_ = aKeepBrushColor; - return bDrawOk; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - diff --git a/vcl/unx/source/gdi/salgdi2.cxx b/vcl/unx/source/gdi/salgdi2.cxx deleted file mode 100644 index 1cb2abbedf43..000000000000 --- a/vcl/unx/source/gdi/salgdi2.cxx +++ /dev/null @@ -1,1149 +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_vcl.hxx" - -#include -#include - -#include "salunx.h" -#include "saldata.hxx" -#include "saldisp.hxx" -#include "salbmp.h" -#include "salgdi.h" -#include "salframe.h" -#include "salvd.h" -#include "xrender_peer.hxx" - -#include "vcl/salbtype.hxx" -#include "vcl/printergfx.hxx" -#include "vcl/bmpacc.hxx" - -#undef SALGDI2_TESTTRANS - -// -=-= debugging =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#if 0 - -static void sal_PrintImage( char *s, XImage*p ) -{ - fprintf( stderr, "%s %d %d %d\n", s, p->depth, p->width, p->height ); - int nW = Min( 64, p->width*p->bits_per_pixel >> 3 ); - for( int i = 0; i < Min( 16, p->height ); i++ ) - { - for( int j = 0; j < nW; j++ ) - fprintf( stderr, "%02X", (UINT8)p->data[i*p->bytes_per_line+j] ); - fprintf( stderr, "\n" ); - } -} - -#endif // DBG_UTIL - -// ----------------------------------------------------------------------------- - -#if (OSL_DEBUG_LEVEL > 1) && defined SALGDI2_TESTTRANS -#define DBG_TESTTRANS( _def_drawable ) \ -{ \ - XCopyArea( pXDisp, _def_drawable, aDrawable, GetCopyGC(), \ - 0, 0, \ - pPosAry->mnDestWidth, pPosAry->mnDestHeight, \ - 0, 0 ); \ -} -#else // (OSL_DEBUG_LEVEL > 1) && defined SALGDI2_TESTTRANS -#define DBG_TESTTRANS( _def_drawable ) -#endif // (OSL_DEBUG_LEVEL > 1) && defined SALGDI2_TESTTRANS - -// -=-= X11SalGraphics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::CopyScreenArea( Display* pDisplay, - Drawable aSrc, int nScreenSrc, int nSrcDepth, - Drawable aDest, int nScreenDest, int nDestDepth, - GC aDestGC, - int src_x, int src_y, - unsigned int w, unsigned int h, - int dest_x, int dest_y ) -{ - if( nSrcDepth == nDestDepth ) - { - if( nScreenSrc == nScreenDest ) - XCopyArea( pDisplay, aSrc, aDest, aDestGC, - src_x, src_y, w, h, dest_x, dest_y ); - else - { - SalXLib* pLib = GetX11SalData()->GetDisplay()->GetXLib(); - pLib->PushXErrorLevel( true ); - XImage* pImage = XGetImage( pDisplay, aSrc, src_x, src_y, w, h, - AllPlanes, ZPixmap ); - if( pImage ) - { - if( pImage->data ) - { - XPutImage( pDisplay, aDest, aDestGC, pImage, - 0, 0, dest_x, dest_y, w, h ); - } - XDestroyImage( pImage ); - } - pLib->PopXErrorLevel(); - } - } - else - { - X11SalBitmap aBM; - aBM.ImplCreateFromDrawable( aSrc, nScreenSrc, nSrcDepth, src_x, src_y, w, h ); - SalTwoRect aTwoRect; - aTwoRect.mnSrcX = aTwoRect.mnSrcY = 0; - aTwoRect.mnSrcWidth = aTwoRect.mnDestWidth = w; - aTwoRect.mnSrcHeight = aTwoRect.mnDestHeight = h; - aTwoRect.mnDestX = dest_x; - aTwoRect.mnDestY = dest_y; - aBM.ImplDraw( aDest, nScreenDest, nDestDepth, aTwoRect,aDestGC ); - } -} - -GC X11SalGraphics::CreateGC( Drawable hDrawable, unsigned long nMask ) -{ - XGCValues values; - - values.graphics_exposures = False; - values.foreground = m_pColormap->GetBlackPixel() - ^ m_pColormap->GetWhitePixel(); - values.function = GXxor; - values.line_width = 1; - values.fill_style = FillStippled; - values.stipple = GetDisplay()->GetInvert50( m_nScreen ); - values.subwindow_mode = ClipByChildren; - - return XCreateGC( GetXDisplay(), hDrawable, nMask | GCSubwindowMode, &values ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -inline GC X11SalGraphics::GetMonoGC( Pixmap hPixmap ) -{ - if( !pMonoGC_ ) - pMonoGC_ = CreateGC( hPixmap ); - - if( !bMonoGC_ ) - { - SetClipRegion( pMonoGC_ ); - bMonoGC_ = TRUE; - } - - return pMonoGC_; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -inline GC X11SalGraphics::GetCopyGC() -{ - if( bXORMode_ ) return GetInvertGC(); - - if( !pCopyGC_ ) - pCopyGC_ = CreateGC( GetDrawable() ); - - if( !bCopyGC_ ) - { - SetClipRegion( pCopyGC_ ); - bCopyGC_ = TRUE; - } - return pCopyGC_; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -GC X11SalGraphics::GetInvertGC() -{ - if( !pInvertGC_ ) - pInvertGC_ = CreateGC( GetDrawable(), - GCGraphicsExposures - | GCForeground - | GCFunction - | GCLineWidth ); - - if( !bInvertGC_ ) - { - SetClipRegion( pInvertGC_ ); - bInvertGC_ = TRUE; - } - return pInvertGC_; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -GC X11SalGraphics::GetInvert50GC() -{ - if( !pInvert50GC_ ) - { - XGCValues values; - - values.graphics_exposures = False; - values.foreground = m_pColormap->GetWhitePixel(); - values.background = m_pColormap->GetBlackPixel(); - values.function = GXinvert; - values.line_width = 1; - values.line_style = LineSolid; - unsigned long nValueMask = - GCGraphicsExposures - | GCForeground - | GCBackground - | GCFunction - | GCLineWidth - | GCLineStyle - | GCFillStyle - | GCStipple; - - char* pEnv = getenv( "SAL_DO_NOT_USE_INVERT50" ); - if( pEnv && ! strcasecmp( pEnv, "true" ) ) - { - values.fill_style = FillSolid; - nValueMask &= ~ GCStipple; - } - else - { - values.fill_style = FillStippled; - values.stipple = GetDisplay()->GetInvert50( m_nScreen ); - } - - pInvert50GC_ = XCreateGC( GetXDisplay(), GetDrawable(), - nValueMask, - &values ); - } - - if( !bInvert50GC_ ) - { - SetClipRegion( pInvert50GC_ ); - bInvert50GC_ = TRUE; - } - return pInvert50GC_; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -inline GC X11SalGraphics::GetStippleGC() -{ - if( !pStippleGC_ ) - pStippleGC_ = CreateGC( GetDrawable(), - GCGraphicsExposures - | GCFillStyle - | GCLineWidth ); - - if( !bStippleGC_ ) - { - XSetFunction( GetXDisplay(), pStippleGC_, bXORMode_ ? GXxor : GXcopy ); - SetClipRegion( pStippleGC_ ); - bStippleGC_ = TRUE; - } - - return pStippleGC_; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -int X11SalGraphics::Clip( XLIB_Region pRegion, - int &nX, - int &nY, - unsigned int &nDX, - unsigned int &nDY, - int &nSrcX, - int &nSrcY ) const -{ - XRectangle aRect; - XClipBox( pRegion, &aRect ); - - if( int(nX + nDX) <= int(aRect.x) || nX >= int(aRect.x + aRect.width) ) - return RectangleOut; - if( int(nY + nDY) <= int(aRect.y) || nY >= int(aRect.y + aRect.height) ) - return RectangleOut; - - if( nX < aRect.x ) - { - nSrcX += aRect.x - nX; - nDX -= aRect.x - nX; - nX = aRect.x; - } - else if( int(nX + nDX) > int(aRect.x + aRect.width) ) - nDX = aRect.x + aRect.width - nX; - - if( nY < aRect.y ) - { - nSrcY += aRect.y - nY; - nDY -= aRect.y - nY; - nY = aRect.y; - } - else if( int(nY + nDY) > int(aRect.y + aRect.height) ) - nDY = aRect.y + aRect.height - nY; - - return RectangleIn; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -int X11SalGraphics::Clip( int &nX, - int &nY, - unsigned int &nDX, - unsigned int &nDY, - int &nSrcX, - int &nSrcY ) const - -{ - if( pPaintRegion_ - && RectangleOut == Clip( pPaintRegion_, nX, nY, nDX, nDY, nSrcX, nSrcY ) ) - return RectangleOut; - - if( pClipRegion_ - && RectangleOut == Clip( pClipRegion_, nX, nY, nDX, nDY, nSrcX, nSrcY ) ) - return RectangleOut; - - int nPaint; - if( pPaintRegion_ ) - { - nPaint = XRectInRegion( pPaintRegion_, nX, nY, nDX, nDY ); - if( RectangleOut == nPaint ) - return RectangleOut; - } - else - nPaint = RectangleIn; - - int nClip; - if( pClipRegion_ ) - { - nClip = XRectInRegion( pClipRegion_, nX, nY, nDX, nDY ); - if( RectangleOut == nClip ) - return RectangleOut; - } - else - nClip = RectangleIn; - - return RectangleIn == nClip && RectangleIn == nPaint - ? RectangleIn - : RectanglePart; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -GC X11SalGraphics::SetMask( int &nX, - int &nY, - unsigned int &nDX, - unsigned int &nDY, - int &nSrcX, - int &nSrcY, - Pixmap hClipMask ) -{ - int n = Clip( nX, nY, nDX, nDY, nSrcX, nSrcY ); - if( RectangleOut == n ) - return NULL; - - Display *pDisplay = GetXDisplay(); - - if( !pMaskGC_ ) - pMaskGC_ = CreateGC( GetDrawable() ); - - if( RectangleIn == n ) - { - XSetClipMask( pDisplay, pMaskGC_, hClipMask ); - XSetClipOrigin( pDisplay, pMaskGC_, nX - nSrcX, nY - nSrcY ); - return pMaskGC_; - } - - // - - - - create alternate clip pixmap for region clipping - - - - - Pixmap hPixmap = XCreatePixmap( pDisplay, hClipMask, nDX, nDY, 1 ); - - if( !hPixmap ) - { -#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL - fprintf( stderr, "X11SalGraphics::SetMask !hPixmap\n" ); -#endif - return NULL; - } - - // - - - - reset pixmap; all 0 - - - - - - - - - - - - - - - - - - - - XFillRectangle( pDisplay, - hPixmap, - GetDisplay()->GetMonoGC( m_nScreen ), - 0, 0, - nDX, nDY ); - - // - - - - copy pixmap only within region - - - - - - - - - - - - - - GC pMonoGC = GetMonoGC( hPixmap ); - XSetClipOrigin( pDisplay, pMonoGC, -nX, -nY ); - XCopyArea( pDisplay, - hClipMask, // Source - hPixmap, // Destination - pMonoGC, - nSrcX, nSrcY, // Source - nDX, nDY, // Width & Height - 0, 0 ); // Destination - - XSetClipMask( pDisplay, pMaskGC_, hPixmap ); - XSetClipOrigin( pDisplay, pMaskGC_, nX, nY ); - - XFreePixmap( pDisplay, hPixmap ); - return pMaskGC_; -} - -// -=-= SalGraphics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -extern "C" -{ - static Bool GraphicsExposePredicate( Display*, XEvent* pEvent, XPointer pFrameWindow ) - { - Bool bRet = False; - if( (pEvent->type == GraphicsExpose || pEvent->type == NoExpose) && - pEvent->xnoexpose.drawable == (Drawable)pFrameWindow ) - { - bRet = True; - } - return bRet; - } -} - - -void X11SalGraphics::YieldGraphicsExpose() -{ - // get frame if necessary - SalFrame* pFrame = m_pFrame; - Display* pDisplay = GetXDisplay(); - XLIB_Window aWindow = GetDrawable(); - if( ! pFrame ) - { - const std::list< SalFrame* >& rFrames = GetX11SalData()->GetDisplay()->getFrames(); - for( std::list< SalFrame* >::const_iterator it = rFrames.begin(); it != rFrames.end() && ! pFrame; ++it ) - { - const SystemEnvData* pEnvData = (*it)->GetSystemData(); - if( Drawable(pEnvData->aWindow) == aWindow ) - pFrame = *it; - } - if( ! pFrame ) - return; - } - - XEvent aEvent; - while( XCheckTypedWindowEvent( pDisplay, aWindow, Expose, &aEvent ) ) - { - SalPaintEvent aPEvt( aEvent.xexpose.x, aEvent.xexpose.y, aEvent.xexpose.width+1, aEvent.xexpose.height+1 ); - pFrame->CallCallback( SALEVENT_PAINT, &aPEvt ); - } - - do - { - if( ! GetDisplay()->XIfEventWithTimeout( &aEvent, (XPointer)aWindow, GraphicsExposePredicate ) ) - // this should not happen at all; still sometimes it happens - break; - - if( aEvent.type == NoExpose ) - break; - - if( pFrame ) - { - SalPaintEvent aPEvt( aEvent.xgraphicsexpose.x, aEvent.xgraphicsexpose.y, aEvent.xgraphicsexpose.width+1, aEvent.xgraphicsexpose.height+1 ); - pFrame->CallCallback( SALEVENT_PAINT, &aPEvt ); - } - } while( aEvent.xgraphicsexpose.count != 0 ); -} - -void X11SalGraphics::copyBits( const SalTwoRect *pPosAry, - SalGraphics *pSSrcGraphics ) -{ - X11SalGraphics* pSrcGraphics = pSSrcGraphics - ? static_cast(pSSrcGraphics) - : this; - - if( pPosAry->mnSrcWidth <= 0 - || pPosAry->mnSrcHeight <= 0 - || pPosAry->mnDestWidth <= 0 - || pPosAry->mnDestHeight <= 0 ) - { - return; - } - - int n; - if( pSrcGraphics == this ) - { - n = 2; - } - else if( pSrcGraphics->bWindow_ ) - { - // window or compatible virtual device - if( pSrcGraphics->GetDisplay() == GetDisplay() && - pSrcGraphics->m_nScreen == m_nScreen && - pSrcGraphics->GetVisual().GetDepth() == GetVisual().GetDepth() - ) - n = 2; // same Display - else - n = 1; // printer or other display - } - else if( pSrcGraphics->bVirDev_ ) - { - // printer compatible virtual device - if( bPrinter_ ) - n = 2; // printer or compatible virtual device == same display - else - n = 1; // window or compatible virtual device - } - else - n = 0; - - if( n == 2 - && pPosAry->mnSrcWidth == pPosAry->mnDestWidth - && pPosAry->mnSrcHeight == pPosAry->mnDestHeight - ) - { - // #i60699# Need to generate graphics exposures (to repaint - // obscured areas beneath overlapping windows), src and dest - // are the same window. - const bool bNeedGraphicsExposures( pSrcGraphics == this && - !bVirDev_ && - pSrcGraphics->bWindow_ ); - - GC pCopyGC; - - if( bXORMode_ - && !pSrcGraphics->bVirDev_ - && (GetDisplay()->GetProperties() & PROPERTY_BUG_XCopyArea_GXxor) ) - { - Pixmap hPixmap = XCreatePixmap( GetXDisplay(), - pSrcGraphics->GetDrawable(), // source - pPosAry->mnSrcWidth, pPosAry->mnSrcHeight, - pSrcGraphics->GetBitCount() ); - - pCopyGC = GetDisplay()->GetCopyGC( m_nScreen ); - - if( bNeedGraphicsExposures ) - XSetGraphicsExposures( GetXDisplay(), - pCopyGC, - True ); - - XCopyArea( GetXDisplay(), - pSrcGraphics->GetDrawable(), // source - hPixmap, // destination - pCopyGC, // no clipping - pPosAry->mnSrcX, pPosAry->mnSrcY, - pPosAry->mnSrcWidth, pPosAry->mnSrcHeight, - 0, 0 ); // destination - XCopyArea( GetXDisplay(), - hPixmap, // source - GetDrawable(), // destination - GetInvertGC(), // destination clipping - 0, 0, // source - pPosAry->mnSrcWidth, pPosAry->mnSrcHeight, - pPosAry->mnDestX, pPosAry->mnDestY ); - XFreePixmap( GetXDisplay(), hPixmap ); - } - else - { - pCopyGC = GetCopyGC(); - - if( bNeedGraphicsExposures ) - XSetGraphicsExposures( GetXDisplay(), - pCopyGC, - True ); - - XCopyArea( GetXDisplay(), - pSrcGraphics->GetDrawable(), // source - GetDrawable(), // destination - pCopyGC, // destination clipping - pPosAry->mnSrcX, pPosAry->mnSrcY, - pPosAry->mnSrcWidth, pPosAry->mnSrcHeight, - pPosAry->mnDestX, pPosAry->mnDestY ); - } - - if( bNeedGraphicsExposures ) - { - YieldGraphicsExpose(); - - if( pCopyGC ) - XSetGraphicsExposures( GetXDisplay(), - pCopyGC, - False ); - } - } - else if( n ) - { - // #i60699# No chance to handle graphics exposures - we copy - // to a temp bitmap first, into which no repaints are - // technically possible. - SalBitmap *pDDB = pSrcGraphics->getBitmap( pPosAry->mnSrcX, - pPosAry->mnSrcY, - pPosAry->mnSrcWidth, - pPosAry->mnSrcHeight ); - - if( !pDDB ) - { - stderr0( "SalGraphics::CopyBits !pSrcGraphics->GetBitmap()\n" ); - return; - } - - SalTwoRect aPosAry( *pPosAry ); - - aPosAry.mnSrcX = 0, aPosAry.mnSrcY = 0; - drawBitmap( &aPosAry, *pDDB ); - - delete pDDB; - } - else { - stderr0( "X11SalGraphics::CopyBits from Printer not yet implemented\n" ); - } -} - -// -------------------------------------------------------------------------- - -void X11SalGraphics::copyArea ( long nDestX, long nDestY, - long nSrcX, long nSrcY, - long nSrcWidth, long nSrcHeight, - USHORT ) -{ - SalTwoRect aPosAry; - - aPosAry.mnDestX = nDestX; - aPosAry.mnDestY = nDestY; - aPosAry.mnDestWidth = nSrcWidth; - aPosAry.mnDestHeight = nSrcHeight; - - aPosAry.mnSrcX = nSrcX; - aPosAry.mnSrcY = nSrcY; - aPosAry.mnSrcWidth = nSrcWidth; - aPosAry.mnSrcHeight = nSrcHeight; - - copyBits ( &aPosAry, 0 ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap ) -{ - const SalDisplay* pSalDisp = GetDisplay(); - Display* pXDisp = pSalDisp->GetDisplay(); - const Drawable aDrawable( GetDrawable() ); - const SalColormap& rColMap = pSalDisp->GetColormap( m_nScreen ); - const long nDepth = GetDisplay()->GetVisual( m_nScreen ).GetDepth(); - GC aGC( GetCopyGC() ); - XGCValues aOldVal, aNewVal; - int nValues = GCForeground | GCBackground; - - if( rSalBitmap.GetBitCount() == 1 ) - { - // set foreground/background values for 1Bit bitmaps - XGetGCValues( pXDisp, aGC, nValues, &aOldVal ); - aNewVal.foreground = rColMap.GetWhitePixel(), aNewVal.background = rColMap.GetBlackPixel(); - XChangeGC( pXDisp, aGC, nValues, &aNewVal ); - } - - static_cast(rSalBitmap).ImplDraw( aDrawable, m_nScreen, nDepth, *pPosAry, aGC ); - - if( rSalBitmap.GetBitCount() == 1 ) - XChangeGC( pXDisp, aGC, nValues, &aOldVal ); - XFlush( pXDisp ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -void X11SalGraphics::drawBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSrcBitmap, - const SalBitmap& rMaskBitmap ) -{ - DBG_ASSERT( !bPrinter_, "Drawing of transparent bitmaps on printer devices is strictly forbidden" ); - - // decide if alpha masking or transparency masking is needed - BitmapBuffer* pAlphaBuffer = const_cast(rMaskBitmap).AcquireBuffer( TRUE ); - if( pAlphaBuffer != NULL ) - { - int nMaskFormat = pAlphaBuffer->mnFormat; - const_cast(rMaskBitmap).ReleaseBuffer( pAlphaBuffer, TRUE ); - if( nMaskFormat == BMP_FORMAT_8BIT_PAL ) - drawAlphaBitmap( *pPosAry, rSrcBitmap, rMaskBitmap ); - } - - drawMaskedBitmap( pPosAry, rSrcBitmap, rMaskBitmap ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -void X11SalGraphics::drawMaskedBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - const SalBitmap& rTransBitmap ) -{ - const SalDisplay* pSalDisp = GetDisplay(); - Display* pXDisp = pSalDisp->GetDisplay(); - Drawable aDrawable( GetDrawable() ); - - // figure work mode depth. If this is a VDev Drawable, use its - // bitdepth to create pixmaps for, otherwise, XCopyArea will - // refuse to work. - const USHORT nDepth( m_pVDev ? - m_pVDev->GetDepth() : - pSalDisp->GetVisual( m_nScreen ).GetDepth() ); - Pixmap aFG( XCreatePixmap( pXDisp, aDrawable, pPosAry->mnDestWidth, - pPosAry->mnDestHeight, nDepth ) ); - Pixmap aBG( XCreatePixmap( pXDisp, aDrawable, pPosAry->mnDestWidth, - pPosAry->mnDestHeight, nDepth ) ); - - if( aFG && aBG ) - { - GC aTmpGC; - XGCValues aValues; - const SalColormap& rColMap = pSalDisp->GetColormap( m_nScreen ); - const int nBlack = rColMap.GetBlackPixel(), nWhite = rColMap.GetWhitePixel(); - const int nValues = GCFunction | GCForeground | GCBackground; - SalTwoRect aTmpRect( *pPosAry ); aTmpRect.mnDestX = aTmpRect.mnDestY = 0; - - // draw paint bitmap in pixmap #1 - aValues.function = GXcopy, aValues.foreground = nWhite, aValues.background = nBlack; - aTmpGC = XCreateGC( pXDisp, aFG, nValues, &aValues ); - static_cast(rSalBitmap).ImplDraw( aFG, m_nScreen, nDepth, aTmpRect, aTmpGC ); - DBG_TESTTRANS( aFG ); - - // draw background in pixmap #2 - XCopyArea( pXDisp, aDrawable, aBG, aTmpGC, - pPosAry->mnDestX, pPosAry->mnDestY, - pPosAry->mnDestWidth, pPosAry->mnDestHeight, - 0, 0 ); - - DBG_TESTTRANS( aBG ); - - // mask out paint bitmap in pixmap #1 (transparent areas 0) - aValues.function = GXand, aValues.foreground = 0x00000000, aValues.background = 0xffffffff; - XChangeGC( pXDisp, aTmpGC, nValues, &aValues ); - static_cast(rTransBitmap).ImplDraw( aFG, m_nScreen, 1, aTmpRect, aTmpGC ); - - DBG_TESTTRANS( aFG ); - - // #105055# For XOR mode, keep background behind bitmap intact - if( !bXORMode_ ) - { - // mask out background in pixmap #2 (nontransparent areas 0) - aValues.function = GXand, aValues.foreground = 0xffffffff, aValues.background = 0x00000000; - XChangeGC( pXDisp, aTmpGC, nValues, &aValues ); - static_cast(rTransBitmap).ImplDraw( aBG, m_nScreen, 1, aTmpRect, aTmpGC ); - - DBG_TESTTRANS( aBG ); - } - - // merge pixmap #1 and pixmap #2 in pixmap #2 - aValues.function = GXxor, aValues.foreground = 0xffffffff, aValues.background = 0x00000000; - XChangeGC( pXDisp, aTmpGC, nValues, &aValues ); - XCopyArea( pXDisp, aFG, aBG, aTmpGC, - 0, 0, - pPosAry->mnDestWidth, pPosAry->mnDestHeight, - 0, 0 ); - DBG_TESTTRANS( aBG ); - - // #105055# Disable XOR temporarily - BOOL bOldXORMode( bXORMode_ ); - bXORMode_ = FALSE; - - // copy pixmap #2 (result) to background - XCopyArea( pXDisp, aBG, aDrawable, GetCopyGC(), - 0, 0, - pPosAry->mnDestWidth, pPosAry->mnDestHeight, - pPosAry->mnDestX, pPosAry->mnDestY ); - - DBG_TESTTRANS( aBG ); - - bXORMode_ = bOldXORMode; - - XFreeGC( pXDisp, aTmpGC ); - XFlush( pXDisp ); - } - else - drawBitmap( pPosAry, rSalBitmap ); - - if( aFG ) - XFreePixmap( pXDisp, aFG ); - - if( aBG ) - XFreePixmap( pXDisp, aBG ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -bool X11SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR, - const SalBitmap& rSrcBitmap, const SalBitmap& rAlphaBmp ) -{ - // non 8-bit alpha not implemented yet - if( rAlphaBmp.GetBitCount() != 8 ) - return false; - - // horizontal mirroring not implemented yet - if( rTR.mnDestWidth < 0 ) - return false; - - // stretched conversion is not implemented yet - if( rTR.mnDestWidth != rTR.mnSrcWidth ) - return false; - if( rTR.mnDestHeight!= rTR.mnSrcHeight ) - return false; - - XRenderPeer& rPeer = XRenderPeer::GetInstance(); - if( rPeer.GetVersion() < 0x02 ) - return false; - - // create destination picture - Picture aDstPic = GetXRenderPicture(); - if( !aDstPic ) - return false; - - const SalDisplay* pSalDisp = GetDisplay(); - const SalVisual& rSalVis = pSalDisp->GetVisual( m_nScreen ); - Display* pXDisplay = pSalDisp->GetDisplay(); - - // create source Picture - int nDepth = m_pVDev ? m_pVDev->GetDepth() : rSalVis.GetDepth(); - const X11SalBitmap& rSrcX11Bmp = static_cast( rSrcBitmap ); - ImplSalDDB* pSrcDDB = rSrcX11Bmp.ImplGetDDB( hDrawable_, m_nScreen, nDepth, rTR ); - if( !pSrcDDB ) - return false; - - //#i75249# workaround for ImplGetDDB() giving us back a different depth than - // we requested. E.g. mask pixmaps are always compatible with the drawable - // TODO: find an appropriate picture format for these cases - // then remove the workaround below and the one for #i75531# - if( nDepth != pSrcDDB->ImplGetDepth() ) - return false; - - Pixmap aSrcPM = pSrcDDB->ImplGetPixmap(); - if( !aSrcPM ) - return false; - - // create source picture - // TODO: use scoped picture - Visual* pSrcXVisual = rSalVis.GetVisual(); - XRenderPictFormat* pSrcVisFmt = rPeer.FindVisualFormat( pSrcXVisual ); - if( !pSrcVisFmt ) - return false; - Picture aSrcPic = rPeer.CreatePicture( aSrcPM, pSrcVisFmt, 0, NULL ); - if( !aSrcPic ) - return false; - - // create alpha Picture - - // TODO: use SalX11Bitmap functionality and caching for the Alpha Pixmap - // problem is that they don't provide an 8bit Pixmap on a non-8bit display - BitmapBuffer* pAlphaBuffer = const_cast(rAlphaBmp).AcquireBuffer( TRUE ); - - // an XImage needs its data top_down - // TODO: avoid wrongly oriented images in upper layers! - const int nImageSize = pAlphaBuffer->mnHeight * pAlphaBuffer->mnScanlineSize; - const char* pSrcBits = (char*)pAlphaBuffer->mpBits; - char* pAlphaBits = new char[ nImageSize ]; - if( BMP_SCANLINE_ADJUSTMENT( pAlphaBuffer->mnFormat ) == BMP_FORMAT_TOP_DOWN ) - memcpy( pAlphaBits, pSrcBits, nImageSize ); - else - { - char* pDstBits = pAlphaBits + nImageSize; - const int nLineSize = pAlphaBuffer->mnScanlineSize; - for(; (pDstBits -= nLineSize) >= pAlphaBits; pSrcBits += nLineSize ) - memcpy( pDstBits, pSrcBits, nLineSize ); - } - - // the alpha values need to be inverted for XRender - // TODO: make upper layers use standard alpha - long* pLDst = (long*)pAlphaBits; - for( int i = nImageSize/sizeof(long); --i >= 0; ++pLDst ) - *pLDst = ~*pLDst; - - char* pCDst = (char*)pLDst; - for( int i = nImageSize & (sizeof(long)-1); --i >= 0; ++pCDst ) - *pCDst = ~*pCDst; - - const XRenderPictFormat* pAlphaFormat = rPeer.GetStandardFormatA8(); - XImage* pAlphaImg = XCreateImage( pXDisplay, pSrcXVisual, 8, ZPixmap, 0, - pAlphaBits, pAlphaBuffer->mnWidth, pAlphaBuffer->mnHeight, - pAlphaFormat->depth, pAlphaBuffer->mnScanlineSize ); - - Pixmap aAlphaPM = XCreatePixmap( pXDisplay, hDrawable_, - rTR.mnDestWidth, rTR.mnDestHeight, 8 ); - - XGCValues aAlphaGCV; - aAlphaGCV.function = GXcopy; - GC aAlphaGC = XCreateGC( pXDisplay, aAlphaPM, GCFunction, &aAlphaGCV ); - XPutImage( pXDisplay, aAlphaPM, aAlphaGC, pAlphaImg, - rTR.mnSrcX, rTR.mnSrcY, 0, 0, rTR.mnDestWidth, rTR.mnDestHeight ); - XFreeGC( pXDisplay, aAlphaGC ); - XFree( pAlphaImg ); - if( pAlphaBits != (char*)pAlphaBuffer->mpBits ) - delete[] pAlphaBits; - - const_cast(rAlphaBmp).ReleaseBuffer( pAlphaBuffer, TRUE ); - - XRenderPictureAttributes aAttr; - aAttr.repeat = true; - Picture aAlphaPic = rPeer.CreatePicture( aAlphaPM, pAlphaFormat, CPRepeat, &aAttr ); - if( !aAlphaPic ) - return false; - - // set clipping - if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) ) - rPeer.SetPictureClipRegion( aDstPic, pClipRegion_ ); - - // paint source * mask over destination picture - rPeer.CompositePicture( PictOpOver, aSrcPic, aAlphaPic, aDstPic, - rTR.mnSrcX, rTR.mnSrcY, 0, 0, - rTR.mnDestX, rTR.mnDestY, rTR.mnDestWidth, rTR.mnDestHeight ); - - // TODO: used ScopedPic - rPeer.FreePicture( aAlphaPic ); - XFreePixmap(pXDisplay, aAlphaPM); - rPeer.FreePicture( aSrcPic ); - return true; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -bool X11SalGraphics::drawAlphaRect( long nX, long nY, long nWidth, - long nHeight, sal_uInt8 nTransparency ) -{ - if( ! m_pFrame && ! m_pVDev ) - return false; - - if( bPenGC_ || !bBrushGC_ || bXORMode_ ) - return false; // can only perform solid fills without XOR. - - if( m_pVDev && m_pVDev->GetDepth() < 8 ) - return false; - - XRenderPeer& rPeer = XRenderPeer::GetInstance(); - if( rPeer.GetVersion() < 0x02 ) // TODO: replace with better test - return false; - - Picture aDstPic = GetXRenderPicture(); - if( !aDstPic ) - return false; - - const double fTransparency = (100 - nTransparency) * (1.0/100); - const XRenderColor aRenderColor = GetXRenderColor( nBrushColor_ , fTransparency); - - rPeer.FillRectangle( PictOpOver, - aDstPic, - &aRenderColor, - nX, nY, - nWidth, nHeight ); - - return true; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::drawBitmap( const SalTwoRect*, - const SalBitmap&, - SalColor ) -{ - DBG_ERROR( "::DrawBitmap with transparent color not supported" ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::drawMask( const SalTwoRect* pPosAry, - const SalBitmap &rSalBitmap, - SalColor nMaskColor ) -{ - const SalDisplay* pSalDisp = GetDisplay(); - Display* pXDisp = pSalDisp->GetDisplay(); - Drawable aDrawable( GetDrawable() ); - Pixmap aStipple( XCreatePixmap( pXDisp, aDrawable, - pPosAry->mnDestWidth, - pPosAry->mnDestHeight, 1 ) ); - - if( aStipple ) - { - SalTwoRect aTwoRect( *pPosAry ); aTwoRect.mnDestX = aTwoRect.mnDestY = 0; - GC aTmpGC; - XGCValues aValues; - - // create a stipple bitmap first (set bits are changed to unset bits and vice versa) - aValues.function = GXcopyInverted; - aValues.foreground = 1, aValues.background = 0; - aTmpGC = XCreateGC( pXDisp, aStipple, GCFunction | GCForeground | GCBackground, &aValues ); - static_cast(rSalBitmap).ImplDraw( aStipple, m_nScreen, 1, aTwoRect, aTmpGC ); - - XFreeGC( pXDisp, aTmpGC ); - - // Set stipple and draw rectangle - GC aStippleGC( GetStippleGC() ); - int nX = pPosAry->mnDestX, nY = pPosAry->mnDestY; - - XSetStipple( pXDisp, aStippleGC, aStipple ); - XSetTSOrigin( pXDisp, aStippleGC, nX, nY ); - XSetForeground( pXDisp, aStippleGC, GetPixel( nMaskColor ) ); - XFillRectangle( pXDisp, aDrawable, aStippleGC, - nX, nY, - pPosAry->mnDestWidth, pPosAry->mnDestHeight ); - XFreePixmap( pXDisp, aStipple ); - XFlush( pXDisp ); - } - else - drawBitmap( pPosAry, rSalBitmap ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -SalBitmap *X11SalGraphics::getBitmap( long nX, long nY, long nDX, long nDY ) -{ - if( bPrinter_ && !bVirDev_ ) - return NULL; - - bool bFakeWindowBG = false; - - // normalize - if( nDX < 0 ) - { - nX += nDX; - nDX = -nDX; - } - if ( nDY < 0 ) - { - nY += nDY; - nDY = -nDY; - } - - if( bWindow_ && !bVirDev_ ) - { - XWindowAttributes aAttrib; - - XGetWindowAttributes( GetXDisplay(), GetDrawable(), &aAttrib ); - if( aAttrib.map_state != IsViewable ) - bFakeWindowBG = true; - else - { - long nOrgDX = nDX, nOrgDY = nDY; - - // clip to window size - if ( nX < 0 ) - { - nDX += nX; - nX = 0; - } - if ( nY < 0 ) - { - nDY += nY; - nY = 0; - } - if( nX + nDX > aAttrib.width ) - nDX = aAttrib.width - nX; - if( nY + nDY > aAttrib.height ) - nDY = aAttrib.height - nY; - - // inside ? - if( nDX <= 0 || nDY <= 0 ) - { - bFakeWindowBG = true; - nDX = nOrgDX; - nDY = nOrgDY; - } - } - } - - X11SalBitmap* pSalBitmap = new X11SalBitmap; - USHORT nBitCount = GetBitCount(); - - if( &GetDisplay()->GetColormap( m_nScreen ) != &GetColormap() ) - nBitCount = 1; - - if( ! bFakeWindowBG ) - pSalBitmap->ImplCreateFromDrawable( GetDrawable(), m_nScreen, nBitCount, nX, nY, nDX, nDY ); - else - pSalBitmap->Create( Size( nDX, nDY ), (nBitCount > 8) ? 24 : nBitCount, BitmapPalette( nBitCount > 8 ? nBitCount : 0 ) ); - - return pSalBitmap; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -SalColor X11SalGraphics::getPixel( long nX, long nY ) -{ - if( bWindow_ && !bVirDev_ ) - { - XWindowAttributes aAttrib; - - XGetWindowAttributes( GetXDisplay(), GetDrawable(), &aAttrib ); - if( aAttrib.map_state != IsViewable ) - { - stderr0( "X11SalGraphics::GetPixel drawable not viewable\n" ); - return 0; - } - } - - XImage *pXImage = XGetImage( GetXDisplay(), - GetDrawable(), - nX, nY, - 1, 1, - AllPlanes, - ZPixmap ); - if( !pXImage ) - { - stderr0( "X11SalGraphics::GetPixel !XGetImage()\n" ); - return 0; - } - - XColor aXColor; - - aXColor.pixel = XGetPixel( pXImage, 0, 0 ); - XDestroyImage( pXImage ); - - return GetColormap().GetColor( aXColor.pixel ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::invert( long nX, - long nY, - long nDX, - long nDY, - SalInvert nFlags ) -{ - GC pGC; - if( SAL_INVERT_50 & nFlags ) - { - pGC = GetInvert50GC(); - XFillRectangle( GetXDisplay(), GetDrawable(), pGC, nX, nY, nDX, nDY ); - } - else - { - if ( SAL_INVERT_TRACKFRAME & nFlags ) - { - pGC = GetTrackingGC(); - XDrawRectangle( GetXDisplay(), GetDrawable(), pGC, nX, nY, nDX, nDY ); - } - else - { - pGC = GetInvertGC(); - XFillRectangle( GetXDisplay(), GetDrawable(), pGC, nX, nY, nDX, nDY ); - } - } -} - -bool X11SalGraphics::supportsOperation( OutDevSupportType eType ) const -{ - bool bRet = false; - switch( eType ) - { - case OutDevSupport_TransparentRect: - case OutDevSupport_B2DDraw: - { - XRenderPeer& rPeer = XRenderPeer::GetInstance(); - if( rPeer.GetVersion() >= 0x02 ) - { - const SalDisplay* pSalDisp = GetDisplay(); - const SalVisual& rSalVis = pSalDisp->GetVisual( m_nScreen ); - - Visual* pDstXVisual = rSalVis.GetVisual(); - XRenderPictFormat* pDstVisFmt = rPeer.FindVisualFormat( pDstXVisual ); - if( pDstVisFmt ) - bRet = true; - } - } - break; - default: break; - } - return bRet; -} - diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx deleted file mode 100644 index d9f81c0f67d2..000000000000 --- a/vcl/unx/source/gdi/salgdi3.cxx +++ /dev/null @@ -1,1688 +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_vcl.hxx" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "gcach_xpeer.hxx" -#include "xrender_peer.hxx" -#include "salunx.h" -#include "saldata.hxx" -#include "saldisp.hxx" -#include "salgdi.h" -#include "pspgraphics.h" -#include "salvd.h" -#include -#include "salcvt.hxx" - -#include "vcl/printergfx.hxx" -#include "vcl/fontmanager.hxx" -#include "vcl/jobdata.hxx" -#include "vcl/printerinfomanager.hxx" -#include "vcl/svapp.hxx" -#include "vcl/impfont.hxx" -#include "vcl/salframe.hxx" -#include "vcl/outdev.h" - -#include "sal/alloca.h" -#include "sal/types.h" - -#include "rtl/tencinfo.h" - -#include "osl/file.hxx" - -#include "tools/string.hxx" -#include "tools/debug.hxx" -#include "tools/stream.hxx" - -#include "basegfx/polygon/b2dpolypolygon.hxx" - -#include "i18npool/mslangid.hxx" - -#include - -#ifdef ENABLE_GRAPHITE -#include -#include -#endif - -struct cairo_surface_t; -struct cairo_t; -struct cairo_font_face_t; -typedef void* FT_Face; -struct cairo_matrix_t { - double xx; double yx; - double xy; double yy; - double x0; double y0; -}; -struct cairo_glyph_t -{ - unsigned long index; - double x; - double y; -}; -struct BOX -{ - short x1, x2, y1, y2; -}; -struct _XRegion -{ - long size; - long numRects; - BOX *rects; - BOX extents; -}; -using namespace rtl; - -// =========================================================================== - -// PspKernInfo allows on-demand-querying of psprint provided kerning info (#i29881#) -class PspKernInfo : public ExtraKernInfo -{ -public: - PspKernInfo( int nFontId ) : ExtraKernInfo(nFontId) {} -protected: - virtual void Initialize() const; -}; - -//-------------------------------------------------------------------------- - -void PspKernInfo::Initialize() const -{ - mbInitialized = true; - - // get the kerning pairs from psprint - const psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); - typedef std::list< psp::KernPair > PspKernPairs; - const PspKernPairs& rKernPairs = rMgr.getKernPairs( mnFontId ); - if( rKernPairs.empty() ) - return; - - // feed psprint's kerning list into a lookup-friendly container - maUnicodeKernPairs.resize( rKernPairs.size() ); - PspKernPairs::const_iterator it = rKernPairs.begin(); - for(; it != rKernPairs.end(); ++it ) - { - ImplKernPairData aKernPair = { it->first, it->second, it->kern_x }; - maUnicodeKernPairs.insert( aKernPair ); - } -} - -// ---------------------------------------------------------------------------- -// -// X11SalGraphics -// -// ---------------------------------------------------------------------------- - -GC -X11SalGraphics::GetFontGC() -{ - Display *pDisplay = GetXDisplay(); - - if( !pFontGC_ ) - { - XGCValues values; - values.subwindow_mode = ClipByChildren; - values.fill_rule = EvenOddRule; // Pict import/ Gradient - values.graphics_exposures = False; - values.foreground = nTextPixel_; - pFontGC_ = XCreateGC( pDisplay, hDrawable_, - GCSubwindowMode | GCFillRule - | GCGraphicsExposures | GCForeground, - &values ); - } - if( !bFontGC_ ) - { - XSetForeground( pDisplay, pFontGC_, nTextPixel_ ); - SetClipRegion( pFontGC_ ); - bFontGC_ = TRUE; - } - - return pFontGC_; -} - -//-------------------------------------------------------------------------- - -bool X11SalGraphics::setFont( const ImplFontSelectData *pEntry, int nFallbackLevel ) -{ -#ifdef HDU_DEBUG - ByteString aReqName( "NULL" ); - if( pEntry ) - aReqName = ByteString( pEntry->maName, RTL_TEXTENCODING_UTF8 ); - ByteString aUseName( "NULL" ); - if( pEntry && pEntry->mpFontData ) - aUseName = ByteString( pEntry->mpFontData->GetFamilyName(), RTL_TEXTENCODING_UTF8 ); - fprintf( stderr, "SetFont(lvl=%d,\"%s\", %d*%d, naa=%d,b=%d,i=%d) => \"%s\"\n", - nFallbackLevel, aReqName.GetBuffer(), - !pEntry?-1:pEntry->mnWidth, !pEntry?-1:pEntry->mnHeight, - !pEntry?-1:pEntry->mbNonAntialiased, - !pEntry?-1:pEntry->meWeight, !pEntry?-1:pEntry->meItalic, - aUseName.GetBuffer() ); -#endif - - // release all no longer needed font resources - for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i ) - { - if( mpServerFont[i] != NULL ) - { - // old server side font is no longer referenced - GlyphCache::GetInstance().UncacheFont( *mpServerFont[i] ); - mpServerFont[i] = NULL; - } - } - - // return early if there is no new font - if( !pEntry ) - return false; - - bFontVertical_ = pEntry->mbVertical; - - // return early if this is not a valid font for this graphics - if( !pEntry->mpFontData ) - return false; - - // handle the request for a non-native X11-font => use the GlyphCache - ServerFont* pServerFont = GlyphCache::GetInstance().CacheFont( *pEntry ); - if( pServerFont != NULL ) - { - // ignore fonts with e.g. corrupted font files - if( !pServerFont->TestFont() ) - { - GlyphCache::GetInstance().UncacheFont( *pServerFont ); - return false; - } - - // register to use the font - mpServerFont[ nFallbackLevel ] = pServerFont; - - // apply font specific-hint settings if needed - // TODO: also disable it for reference devices - if( !bPrinter_ ) - { - ImplServerFontEntry* pSFE = static_cast( pEntry->mpFontEntry ); - pSFE->HandleFontOptions(); - } - - return true; - } - - return false; -} - -void ImplServerFontEntry::HandleFontOptions( void ) -{ - bool GetFCFontOptions( const ImplFontAttributes&, int nSize, ImplFontOptions& ); - - if( !mpServerFont ) - return; - if( !mbGotFontOptions ) - { - // get and cache the font options - mbGotFontOptions = true; - mbValidFontOptions = GetFCFontOptions( *maFontSelData.mpFontData, - maFontSelData.mnHeight, maFontOptions ); - } - // apply the font options - if( mbValidFontOptions ) - mpServerFont->SetFontOptions( maFontOptions ); -} - -//-------------------------------------------------------------------------- - -namespace { - -class CairoWrapper -{ -private: - oslModule mpCairoLib; - - cairo_surface_t* (*mp_xlib_surface_create_with_xrender_format)(Display *, Drawable , Screen *, XRenderPictFormat *, int , int ); - void (*mp_surface_destroy)(cairo_surface_t *); - cairo_t* (*mp_create)(cairo_surface_t *); - void (*mp_destroy)(cairo_t*); - void (*mp_clip)(cairo_t*); - void (*mp_rectangle)(cairo_t*, double, double, double, double); - cairo_font_face_t * (*mp_ft_font_face_create_for_ft_face)(FT_Face, int); - void (*mp_set_font_face)(cairo_t *, cairo_font_face_t *); - void (*mp_font_face_destroy)(cairo_font_face_t *); - void (*mp_matrix_init_identity)(cairo_matrix_t *); - void (*mp_matrix_scale)(cairo_matrix_t *, double, double); - void (*mp_matrix_rotate)(cairo_matrix_t *, double); - void (*mp_set_font_matrix)(cairo_t *, const cairo_matrix_t *); - void (*mp_show_glyphs)(cairo_t *, const cairo_glyph_t *, int ); - void (*mp_set_source_rgb)(cairo_t *, double , double , double ); - void (*mp_set_font_options)(cairo_t *, const void *); - void (*mp_ft_font_options_substitute)(const void*, void*); - - bool canEmbolden() const { return false; } - - CairoWrapper(); -public: - static CairoWrapper& get(); - bool isValid() const { return (mpCairoLib != NULL); } - bool isCairoRenderable(const ServerFont& rFont); - - cairo_surface_t* xlib_surface_create_with_xrender_format(Display *pDisplay, Drawable drawable, Screen *pScreen, XRenderPictFormat *pFormat, int width, int height) - { return (*mp_xlib_surface_create_with_xrender_format)(pDisplay, drawable, pScreen, pFormat, width, height); } - void surface_destroy(cairo_surface_t *surface) { (*mp_surface_destroy)(surface); } - cairo_t* create(cairo_surface_t *surface) { return (*mp_create)(surface); } - void destroy(cairo_t *cr) { (*mp_destroy)(cr); } - void clip(cairo_t *cr) { (*mp_clip)(cr); } - void rectangle(cairo_t *cr, double x, double y, double width, double height) - { (*mp_rectangle)(cr, x, y, width, height); } - cairo_font_face_t* ft_font_face_create_for_ft_face(FT_Face face, int load_flags) - { return (*mp_ft_font_face_create_for_ft_face)(face, load_flags); } - void set_font_face(cairo_t *cr, cairo_font_face_t *font_face) - { (*mp_set_font_face)(cr, font_face); } - void font_face_destroy(cairo_font_face_t *font_face) - { (*mp_font_face_destroy)(font_face); } - void matrix_init_identity(cairo_matrix_t *matrix) - { (*mp_matrix_init_identity)(matrix); } - void matrix_scale(cairo_matrix_t *matrix, double sx, double sy) - { (*mp_matrix_scale)(matrix, sx, sy); } - void matrix_rotate(cairo_matrix_t *matrix, double radians) - { (*mp_matrix_rotate)(matrix, radians); } - void set_font_matrix(cairo_t *cr, const cairo_matrix_t *matrix) - { (*mp_set_font_matrix)(cr, matrix); } - void show_glyphs(cairo_t *cr, const cairo_glyph_t *glyphs, int no_glyphs) - { (*mp_show_glyphs)(cr, glyphs, no_glyphs); } - void set_source_rgb(cairo_t *cr, double red, double green, double blue) - { (*mp_set_source_rgb)(cr, red, green, blue); } - void set_font_options(cairo_t *cr, const void *options) - { (*mp_set_font_options)(cr, options); } - void ft_font_options_substitute(const void *options, void *pattern) - { (*mp_ft_font_options_substitute)(options, pattern); } -}; - -static CairoWrapper* pCairoInstance = NULL; - -CairoWrapper& CairoWrapper::get() -{ - if( ! pCairoInstance ) - pCairoInstance = new CairoWrapper(); - return *pCairoInstance; -} - -CairoWrapper::CairoWrapper() -: mpCairoLib( NULL ) -{ - static const char* pDisableCairoText = getenv( "SAL_DISABLE_CAIROTEXT" ); - if( pDisableCairoText && (pDisableCairoText[0] != '0') ) - return; - - int nDummy; - if( !XQueryExtension( GetX11SalData()->GetDisplay()->GetDisplay(), "RENDER", &nDummy, &nDummy, &nDummy ) ) - return; - -#ifdef MACOSX - OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libcairo.2.dylib" )); -#else - OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libcairo.so.2" )); -#endif - mpCairoLib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_DEFAULT ); - if( !mpCairoLib ) - return; - -#ifdef DEBUG - // check cairo version - int (*p_version)(); - p_version = (int(*)()) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_version" ); - const int nVersion = p_version ? (*p_version)() : 0; - fprintf( stderr, "CAIRO version=%d\n", nVersion ); -#endif - - mp_xlib_surface_create_with_xrender_format = (cairo_surface_t* (*)(Display *, Drawable , Screen *, XRenderPictFormat *, int , int )) - osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_xlib_surface_create_with_xrender_format" ); - mp_surface_destroy = (void(*)(cairo_surface_t*)) - osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_surface_destroy" ); - mp_create = (cairo_t*(*)(cairo_surface_t*)) - osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_create" ); - mp_destroy = (void(*)(cairo_t*)) - osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_destroy" ); - mp_clip = (void(*)(cairo_t*)) - osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_clip" ); - mp_rectangle = (void(*)(cairo_t*, double, double, double, double)) - osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_rectangle" ); - mp_ft_font_face_create_for_ft_face = (cairo_font_face_t * (*)(FT_Face, int)) - osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_ft_font_face_create_for_ft_face" ); - mp_set_font_face = (void (*)(cairo_t *, cairo_font_face_t *)) - osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_set_font_face" ); - mp_font_face_destroy = (void (*)(cairo_font_face_t *)) - osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_font_face_destroy" ); - mp_matrix_init_identity = (void (*)(cairo_matrix_t *)) - osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_matrix_init_identity" ); - mp_matrix_scale = (void (*)(cairo_matrix_t *, double, double)) - osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_matrix_scale" ); - mp_matrix_rotate = (void (*)(cairo_matrix_t *, double)) - osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_matrix_rotate" ); - mp_set_font_matrix = (void (*)(cairo_t *, const cairo_matrix_t *)) - osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_set_font_matrix" ); - mp_show_glyphs = (void (*)(cairo_t *, const cairo_glyph_t *, int )) - osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_show_glyphs" ); - mp_set_source_rgb = (void (*)(cairo_t *, double , double , double )) - osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_set_source_rgb" ); - mp_set_font_options = (void (*)(cairo_t *, const void *options )) - osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_set_font_options" ); - mp_ft_font_options_substitute = (void (*)(const void *, void *)) - osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_ft_font_options_substitute" ); - - if( !( - mp_xlib_surface_create_with_xrender_format && - mp_surface_destroy && - mp_create && - mp_destroy && - mp_clip && - mp_rectangle && - mp_ft_font_face_create_for_ft_face && - mp_set_font_face && - mp_font_face_destroy && - mp_matrix_init_identity && - mp_matrix_scale && - mp_matrix_rotate && - mp_set_font_matrix && - mp_show_glyphs && - mp_set_source_rgb && - mp_set_font_options && - mp_ft_font_options_substitute - ) ) - { - osl_unloadModule( mpCairoLib ); - mpCairoLib = NULL; -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "not all needed symbols were found\n" ); -#endif - } -} - -bool CairoWrapper::isCairoRenderable(const ServerFont& rFont) -{ - return rFont.GetFtFace() && isValid() && rFont.GetAntialiasAdvice() && - (rFont.NeedsArtificialBold() ? canEmbolden() : true); -} - -} //namespace - -CairoFontsCache::LRUFonts CairoFontsCache::maLRUFonts; -int CairoFontsCache::mnRefCount = 0; - -CairoFontsCache::CairoFontsCache() -{ - ++mnRefCount; -} - -CairoFontsCache::~CairoFontsCache() -{ - --mnRefCount; - if (!mnRefCount && !maLRUFonts.empty()) - { - CairoWrapper &rCairo = CairoWrapper::get(); - LRUFonts::iterator aEnd = maLRUFonts.end(); - for (LRUFonts::iterator aI = maLRUFonts.begin(); aI != aEnd; ++aI) - rCairo.font_face_destroy((cairo_font_face_t*)aI->first); - } -} - -void CairoFontsCache::CacheFont(void *pFont, void* pId) -{ - maLRUFonts.push_front( std::pair(pFont, pId) ); - if (maLRUFonts.size() > 8) - { - CairoWrapper &rCairo = CairoWrapper::get(); - rCairo.font_face_destroy((cairo_font_face_t*)maLRUFonts.back().first); - maLRUFonts.pop_back(); - } -} - -void* CairoFontsCache::FindCachedFont(void *pId) -{ - LRUFonts::iterator aEnd = maLRUFonts.end(); - for (LRUFonts::iterator aI = maLRUFonts.begin(); aI != aEnd; ++aI) - if (aI->second == pId) - return aI->first; - return NULL; -} - -void X11SalGraphics::DrawCairoAAFontString( const ServerFontLayout& rLayout ) -{ - std::vector cairo_glyphs; - cairo_glyphs.reserve( 256 ); - - Point aPos; - sal_GlyphId aGlyphId; - for( int nStart = 0; rLayout.GetNextGlyphs( 1, &aGlyphId, aPos, nStart ); ) - { - cairo_glyph_t aGlyph; - aGlyph.index = aGlyphId & GF_IDXMASK; - aGlyph.x = aPos.X(); - aGlyph.y = aPos.Y(); - cairo_glyphs.push_back(aGlyph); - } - - if (cairo_glyphs.empty()) - return; - - // find a XRenderPictFormat compatible with the Drawable - XRenderPictFormat* pVisualFormat = static_cast(GetXRenderFormat()); - if( !pVisualFormat ) - { - Visual* pVisual = GetDisplay()->GetVisual( m_nScreen ).GetVisual(); - pVisualFormat = XRenderPeer::GetInstance().FindVisualFormat( pVisual ); - // cache the XRenderPictFormat - SetXRenderFormat( static_cast(pVisualFormat) ); - } - - DBG_ASSERT( pVisualFormat!=NULL, "no matching XRenderPictFormat for text" ); - if( !pVisualFormat ) - return; - - CairoWrapper &rCairo = CairoWrapper::get(); - - Display* pDisplay = GetXDisplay(); - - cairo_surface_t *surface = rCairo.xlib_surface_create_with_xrender_format (pDisplay, - hDrawable_, ScreenOfDisplay(pDisplay, m_nScreen), pVisualFormat, SAL_MAX_INT16, SAL_MAX_INT16); - - /* - * It might be ideal to cache surface and cairo context between calls and - * only destroy it when the drawable changes, but to do that we need to at - * least change the SalFrame etc impls to dtor the SalGraphics *before* the - * destruction of the windows they reference - */ - cairo_t *cr = rCairo.create(surface); - rCairo.surface_destroy(surface); - - if (const void *pOptions = Application::GetSettings().GetStyleSettings().GetCairoFontOptions()) - rCairo.set_font_options( cr, pOptions); - - if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) ) - { - for (long i = 0; i < pClipRegion_->numRects; ++i) - { - rCairo.rectangle(cr, - pClipRegion_->rects[i].x1, - pClipRegion_->rects[i].y1, - pClipRegion_->rects[i].x2 - pClipRegion_->rects[i].x1, - pClipRegion_->rects[i].y2 - pClipRegion_->rects[i].y1); - } - rCairo.clip(cr); - } - - rCairo.set_source_rgb(cr, - SALCOLOR_RED(nTextColor_)/255.0, - SALCOLOR_GREEN(nTextColor_)/255.0, - SALCOLOR_BLUE(nTextColor_)/255.0); - - ServerFont& rFont = rLayout.GetServerFont(); - - cairo_font_face_t* font_face = NULL; - - void *pId = rFont.GetFtFace(); - font_face = (cairo_font_face_t*)m_aCairoFontsCache.FindCachedFont(pId); - if (!font_face) - { - font_face = rCairo.ft_font_face_create_for_ft_face(pId, rFont.GetLoadFlags()); - m_aCairoFontsCache.CacheFont(font_face, pId); - } - - rCairo.set_font_face(cr, font_face); - - cairo_matrix_t m; - const ImplFontSelectData& rFSD = rFont.GetFontSelData(); - int nWidth = rFSD.mnWidth ? rFSD.mnWidth : rFSD.mnHeight; - - rCairo.matrix_init_identity(&m); - - if (rLayout.GetOrientation()) - rCairo.matrix_rotate(&m, (3600 - rLayout.GetOrientation()) * M_PI / 1800.0); - - rCairo.matrix_scale(&m, nWidth, rFSD.mnHeight); - if (rFont.NeedsArtificialItalic()) - m.xy = -m.xx * 0x6000L / 0x10000L; - - rCairo.set_font_matrix(cr, &m); - rCairo.show_glyphs(cr, &cairo_glyphs[0], cairo_glyphs.size()); - rCairo.destroy(cr); -} - -//-------------------------------------------------------------------------- - -void X11SalGraphics::DrawServerAAFontString( const ServerFontLayout& rLayout ) -{ - // get xrender target for this drawable - Picture aDstPic = GetXRenderPicture(); - if( !aDstPic ) - return; - - // get a XRenderPicture for the font foreground - // TODO: move into own method - XRenderPeer& rRenderPeer = XRenderPeer::GetInstance(); - XRenderPictFormat* pVisualFormat = (XRenderPictFormat*)GetXRenderFormat(); - DBG_ASSERT( pVisualFormat, "we already have a render picture, but XRenderPictFormat==NULL???"); - const int nVisualDepth = pVisualFormat->depth; - SalDisplay::RenderEntry& rEntry = GetDisplay()->GetRenderEntries( m_nScreen )[ nVisualDepth ]; - if( !rEntry.m_aPicture ) - { - // create and cache XRenderPicture for the font foreground - Display* pDisplay = GetXDisplay(); -#ifdef DEBUG - int iDummy; - unsigned uDummy; - XLIB_Window wDummy; - unsigned int nDrawDepth; - ::XGetGeometry( pDisplay, hDrawable_, &wDummy, &iDummy, &iDummy, - &uDummy, &uDummy, &uDummy, &nDrawDepth ); - DBG_ASSERT( static_cast(nVisualDepth) == nDrawDepth, "depth messed up for XRender" ); -#endif - - rEntry.m_aPixmap = ::XCreatePixmap( pDisplay, hDrawable_, 1, 1, nVisualDepth ); - - XRenderPictureAttributes aAttr; - aAttr.repeat = true; - rEntry.m_aPicture = rRenderPeer.CreatePicture ( rEntry.m_aPixmap, pVisualFormat, CPRepeat, &aAttr ); - } - - // set font foreground color and opacity - XRenderColor aRenderColor = GetXRenderColor( nTextColor_ ); - rRenderPeer.FillRectangle( PictOpSrc, rEntry.m_aPicture, &aRenderColor, 0, 0, 1, 1 ); - - // set clipping - // TODO: move into GetXRenderPicture()? - if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) ) - rRenderPeer.SetPictureClipRegion( aDstPic, pClipRegion_ ); - - ServerFont& rFont = rLayout.GetServerFont(); - X11GlyphPeer& rGlyphPeer = X11GlyphCache::GetInstance().GetPeer(); - GlyphSet aGlyphSet = rGlyphPeer.GetGlyphSet( rFont, m_nScreen ); - - Point aPos; - static const int MAXGLYPHS = 160; - sal_GlyphId aGlyphAry[ MAXGLYPHS ]; - int nMaxGlyphs = rLayout.GetOrientation() ? 1 : MAXGLYPHS; - for( int nStart = 0;;) - { - int nGlyphs = rLayout.GetNextGlyphs( nMaxGlyphs, aGlyphAry, aPos, nStart ); - if( !nGlyphs ) - break; - - // #i51924# avoid 32->16bit coordinate truncation problem in X11 - // TODO: reevaluate once displays with >30000 pixels are available - if( aPos.X() >= 30000 || aPos.Y() >= 30000 ) - continue; - - unsigned int aRenderAry[ MAXGLYPHS ]; - for( int i = 0; i < nGlyphs; ++i ) - aRenderAry[ i ] = rGlyphPeer.GetGlyphId( rFont, aGlyphAry[i] ); - rRenderPeer.CompositeString32( rEntry.m_aPicture, aDstPic, - aGlyphSet, aPos.X(), aPos.Y(), aRenderAry, nGlyphs ); - } -} - -//-------------------------------------------------------------------------- - -bool X11SalGraphics::DrawServerAAForcedString( const ServerFontLayout& rLayout ) -{ - ServerFont& rFont = rLayout.GetServerFont(); - - // prepare glyphs and get extent of operation - X11GlyphPeer& rGlyphPeer = X11GlyphCache::GetInstance().GetPeer(); - int nXmin = 0; - int nXmax = 0; - int nYmin = 0; - int nYmax = 0; - int nStart = 0; - Point aPos; - sal_GlyphId nGlyph; - for( bool bFirst=true; rLayout.GetNextGlyphs( 1, &nGlyph, aPos, nStart ); ) - { - const RawBitmap* const pRawBitmap = rGlyphPeer.GetRawBitmap( rFont, nGlyph ); - if( !pRawBitmap ) - continue; - - const int nX1 = aPos.X() + pRawBitmap->mnXOffset; - const int nY1 = aPos.Y() + pRawBitmap->mnYOffset; - const int nX2 = nX1 + pRawBitmap->mnWidth; - const int nY2 = nY1 + pRawBitmap->mnHeight; - - if( bFirst ) - { - bFirst = false; - nXmin = nX1; - nXmax = nX2; - nYmin = nY1; - nYmax = nY2; - } - else - { - if( nXmin > nX1 ) nXmin = nX1; - if( nXmax < nX2 ) nXmax = nX2; - if( nYmin > nY1 ) nYmin = nY1; - if( nYmax < nY2 ) nYmax = nY2; - } - } - - // get XImage - GetDisplay()->GetXLib()->PushXErrorLevel( true ); - Display* pDisplay = GetXDisplay(); - - XRectangle aXRect; - long nWidth = 1, nHeight = 1; - if( m_pFrame ) - nWidth = m_pFrame->maGeometry.nWidth, nHeight = m_pFrame->maGeometry.nHeight; - else if( m_pVDev ) - nWidth = m_pVDev->GetWidth(), nHeight = m_pVDev->GetHeight(); - - if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) ) - { - // get bounding box - XClipBox( pClipRegion_, &aXRect ); - // clip with window - if( aXRect.x < 0 ) aXRect.x = 0; - - if( aXRect.y < 0 ) aXRect.y = 0; - if( aXRect.width+aXRect.x > nWidth ) aXRect.width = nWidth-aXRect.x; - if( aXRect.height+aXRect.y > nHeight ) aXRect.height = nHeight-aXRect.y; - } - else - { - aXRect.x = 0; - aXRect.y = 0; - aXRect.width = nWidth; - aXRect.height = nHeight; - } - if( m_pFrame ) - { - // clip with screen - int nScreenX = m_pFrame->maGeometry.nX+aXRect.x; - int nScreenY = m_pFrame->maGeometry.nY+aXRect.y; - const Size& rScreenSize = GetDisplay()->getDataForScreen( m_nScreen ).m_aSize; - int nScreenW = rScreenSize.Width(); - int nScreenH = rScreenSize.Height(); - if( nScreenX < 0 ) - aXRect.x -= nScreenX, aXRect.width += nScreenX; - if( nScreenX+aXRect.width > nScreenW ) - aXRect.width = nScreenW-nScreenX; - if( nScreenY < 0 ) - aXRect.y -= nScreenY, aXRect.height += nScreenY; - if( nScreenY+aXRect.height > nScreenH ) - aXRect.height = nScreenH-nScreenY; - } - - - if( nXmin < aXRect.x ) nXmin = aXRect.x; - if( nYmin < aXRect.y ) nYmin = aXRect.y; - if( nXmax >= aXRect.x+aXRect.width ) nXmax = aXRect.x + aXRect.width - 1; - if( nYmax >= aXRect.y+aXRect.height ) nYmax = aXRect.y + aXRect.height - 1; - - if( nXmin > nXmax ) - return false; - if( nYmin > nYmax ) - return false; - - XImage* pImg = XGetImage( pDisplay, hDrawable_, - nXmin, nYmin, - (nXmax-nXmin+1), (nYmax-nYmin+1), - ~0, ZPixmap ); - if( pImg == NULL ) - { - if( m_pFrame ) - { - // the reason we did not get an image could be that the frame - // geometry changed in the meantime; lets get the current geometry - // and clip against the current window size as well as the screen - // with the current frame position - const Size& rScreenSize = GetDisplay()->getDataForScreen(m_nScreen).m_aSize; - int nScreenW = rScreenSize.Width(); - int nScreenH = rScreenSize.Height(); - XLIB_Window aRoot = None; - int x = 0, y = 0; - unsigned int w = 0, h = 0, bw = 0, d; - XGetGeometry( pDisplay, hDrawable_, &aRoot, &x, &y, &w, &h, &bw, &d ); - XTranslateCoordinates( pDisplay, hDrawable_, aRoot, 0, 0, &x, &y, &aRoot ); - if( nXmin + x < 0 ) // clip on left screen edge - nXmin += x-nXmin; - if( nYmin + y < 0 ) // clip on top screen edge - nYmin += y-nYmin; - if( nXmax >= int(w) ) // clip on right window egde - nXmax = w-1; - if( nYmax >= int(h) ) // clip on bottom window edge - nYmax = h-1; - if( nXmax + x >= nScreenW ) // clip on right screen edge - nXmax -= (nXmax + x - nScreenW)+1; - if( nYmax + y >= nScreenH ) // clip on bottom screen edge - nYmax -= (nYmax + y - nScreenH)+1; - if( nXmax >= nXmin && nYmax >= nYmin ) - { - // try again to get the image - pImg = XGetImage( pDisplay, hDrawable_, - nXmin, nYmin, - (nXmax-nXmin+1), (nYmax-nYmin+1), - ~0, ZPixmap ); - } - } - if( pImg == NULL ) - { - GetDisplay()->GetXLib()->PopXErrorLevel(); - return false; - } - } - - // prepare context - GC nGC = GetFontGC(); - XGCValues aGCVal; - XGetGCValues( pDisplay, nGC, GCForeground, &aGCVal ); - - unsigned long nOrigColor = XGetPixel( pImg, 0, 0 ); - XPutPixel( pImg, 0, 0, aGCVal.foreground ); - unsigned char aColor[4]; - aColor[0] = pImg->data[0]; - aColor[1] = pImg->data[1]; - aColor[2] = pImg->data[2]; - aColor[3] = pImg->data[3]; - XPutPixel( pImg, 0, 0, nOrigColor ); - - // work on XImage - const int bpp = pImg->bits_per_pixel >> 3; - for( nStart = 0; rLayout.GetNextGlyphs( 1, &nGlyph, aPos, nStart ); ) - { - const RawBitmap* const pRawBitmap = rGlyphPeer.GetRawBitmap( rFont, nGlyph ); - if( !pRawBitmap ) - continue; - - const int nX1 = aPos.X() + pRawBitmap->mnXOffset; - const int nY1 = aPos.Y() + pRawBitmap->mnYOffset; - - if( (nX1 <= nXmax) && (int(nX1 + pRawBitmap->mnWidth) > nXmin) - && (nY1 <= nYmax) && (int(nY1 + pRawBitmap->mnHeight) > nYmin) ) - { - const unsigned char* p10 = pRawBitmap->mpBits; - unsigned char* p20 = (unsigned char*)pImg->data; // dest left limit - p20 += (nY1 - nYmin) * pImg->bytes_per_line; - unsigned char* p21 = p20 + (nX1 - nXmin + pImg->xoffset) * bpp; - int y = pRawBitmap->mnHeight; - if( y > nYmax - nY1 ) - y = nYmax - nY1 + 1; - while( --y >= 0 ) - { - if( p20 >= (unsigned char*)pImg->data ) - { - unsigned char* const p22 = p20 + pImg->width * bpp; // dest right limit - unsigned char* pDst = p21; - const unsigned char* pSrc = p10; - for( int x = pRawBitmap->mnWidth; (--x >= 0) && (p22 > pDst); ++pSrc ) - { - if( (*pSrc == 0) || (p20 > pDst) ) // keep background - pDst += bpp; - else if( *pSrc == 0xFF ) // paint foreground - { - const unsigned char* pColor = aColor; - for( int z = bpp; --z >= 0; ++pColor, ++pDst ) - *pDst = *pColor; - } - else // blend fg into bg - { - const unsigned char* pColor = aColor; - for( int z = bpp; --z >= 0; ++pColor, ++pDst ) - // theoretically it should be *257) >> 16 - // but the error is <0.4% worst case and we are in - // the innermost loop of very perf-sensitive code - - *pDst += (*pSrc * ((int)*pColor - *pDst)) >> 8; - } - } - } - p10 += pRawBitmap->mnScanlineSize; - p20 += pImg->bytes_per_line; - p21 += pImg->bytes_per_line; - } - } - } - - // put XImage - XPutImage( pDisplay, hDrawable_, nGC, pImg, - 0, 0, nXmin, nYmin, (nXmax - nXmin + 1), (nYmax - nYmin + 1) ); - XDestroyImage( pImg ); - - GetDisplay()->GetXLib()->PopXErrorLevel(); - return true; -} - -//-------------------------------------------------------------------------- - -void X11SalGraphics::DrawServerSimpleFontString( const ServerFontLayout& rSalLayout ) -{ - ServerFont& rFont = rSalLayout.GetServerFont(); - X11GlyphPeer& rGlyphPeer = X11GlyphCache::GetInstance().GetPeer(); - - Display* pDisplay = GetXDisplay(); - GC nGC = GetFontGC(); - - XGCValues aGCVal; - aGCVal.fill_style = FillStippled; - aGCVal.line_width = 0; - GC tmpGC = XCreateGC( pDisplay, hDrawable_, GCFillStyle|GCLineWidth, &aGCVal ); - XCopyGC( pDisplay, nGC, (1<16bit coordinate truncation problem in X11 - // TODO: reevaluate once displays with >30000 pixels are available - if( aPos.X() >= 30000 || aPos.Y() >= 30000 ) - continue; - - Pixmap aStipple = rGlyphPeer.GetPixmap( rFont, nGlyph, m_nScreen ); - const GlyphMetric& rGM = rFont.GetGlyphMetric( nGlyph ); - - if( aStipple != None ) - { - const int nDestX = aPos.X() + rGM.GetOffset().X(); - const int nDestY = aPos.Y() + rGM.GetOffset().Y(); - - aGCVal.stipple = aStipple; - aGCVal.ts_x_origin = nDestX; - aGCVal.ts_y_origin = nDestY; - XChangeGC( pDisplay, tmpGC, GCStipple|GCTileStipXOrigin|GCTileStipYOrigin, &aGCVal ); - - const int nWidth = rGM.GetSize().Width(); - const int nHeight = rGM.GetSize().Height(); - XFillRectangle( pDisplay, hDrawable_, tmpGC, nDestX, nDestY, nWidth, nHeight ); - } - } - - XFreeGC( pDisplay, tmpGC ); -} - -//-------------------------------------------------------------------------- - -void X11SalGraphics::DrawServerFontLayout( const ServerFontLayout& rLayout ) -{ - // draw complex text - ServerFont& rFont = rLayout.GetServerFont(); - const bool bVertical = rFont.GetFontSelData().mbVertical; - - if( !bVertical && CairoWrapper::get().isCairoRenderable(rFont) ) - DrawCairoAAFontString( rLayout ); - else - { - X11GlyphPeer& rGlyphPeer = X11GlyphCache::GetInstance().GetPeer(); - if( rGlyphPeer.GetGlyphSet( rFont, m_nScreen ) ) - DrawServerAAFontString( rLayout ); - else if( !rGlyphPeer.ForcedAntialiasing( rFont, m_nScreen ) ) - DrawServerSimpleFontString( rLayout ); - else - DrawServerAAForcedString( rLayout ); - } -} - -//-------------------------------------------------------------------------- - -const ImplFontCharMap* X11SalGraphics::GetImplFontCharMap() const -{ - if( !mpServerFont[0] ) - return NULL; - - const ImplFontCharMap* pIFCMap = mpServerFont[0]->GetImplFontCharMap(); - return pIFCMap; -} - -// ---------------------------------------------------------------------------- -// -// SalGraphics -// -// ---------------------------------------------------------------------------- - -USHORT X11SalGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel ) -{ - USHORT nRetVal = 0; - if( !setFont( pEntry, nFallbackLevel ) ) - nRetVal |= SAL_SETFONT_BADFONT; - if( bPrinter_ || (mpServerFont[ nFallbackLevel ] != NULL) ) - nRetVal |= SAL_SETFONT_USEDRAWTEXTARRAY; - return nRetVal; -} - -// ---------------------------------------------------------------------------- - -void -X11SalGraphics::SetTextColor( SalColor nSalColor ) -{ - if( nTextColor_ != nSalColor ) - { - nTextColor_ = nSalColor; - nTextPixel_ = GetPixel( nSalColor ); - bFontGC_ = FALSE; - } -} - -// ---------------------------------------------------------------------------- - -bool X11SalGraphics::AddTempDevFont( ImplDevFontList* pFontList, - const String& rFileURL, const String& rFontName ) -{ - // inform PSP font manager - rtl::OUString aUSystemPath; - OSL_VERIFY( !osl::FileBase::getSystemPathFromFileURL( rFileURL, aUSystemPath ) ); - rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - OString aOFileName( OUStringToOString( aUSystemPath, aEncoding ) ); - psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); - int nFontId = rMgr.addFontFile( aOFileName, 0 ); - if( !nFontId ) - return false; - - // prepare font data - psp::FastPrintFontInfo aInfo; - rMgr.getFontFastInfo( nFontId, aInfo ); - aInfo.m_aFamilyName = rFontName; - - // inform glyph cache of new font - ImplDevFontAttributes aDFA = PspGraphics::Info2DevFontAttributes( aInfo ); - aDFA.mnQuality += 5800; - - int nFaceNum = rMgr.getFontFaceNumber( aInfo.m_nID ); - if( nFaceNum < 0 ) - nFaceNum = 0; - - GlyphCache& rGC = X11GlyphCache::GetInstance(); - const rtl::OString& rFileName = rMgr.getFontFileSysPath( aInfo.m_nID ); - rGC.AddFontFile( rFileName, nFaceNum, aInfo.m_nID, aDFA ); - - // announce new font to device's font list - rGC.AnnounceFonts( pFontList ); - return true; -} - -// ---------------------------------------------------------------------------- - -void RegisterFontSubstitutors( ImplDevFontList* ); - -void X11SalGraphics::GetDevFontList( ImplDevFontList *pList ) -{ - // prepare the GlyphCache using psprint's font infos - X11GlyphCache& rGC = X11GlyphCache::GetInstance(); - - psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); - ::std::list< psp::fontID > aList; - ::std::list< psp::fontID >::iterator it; - psp::FastPrintFontInfo aInfo; - rMgr.getFontList( aList ); - for( it = aList.begin(); it != aList.end(); ++it ) - { - if( !rMgr.getFontFastInfo( *it, aInfo ) ) - continue; - - // the GlyphCache must not bother with builtin fonts because - // it cannot access or use them anyway - if( aInfo.m_eType == psp::fonttype::Builtin ) - continue; - - // normalize face number to the GlyphCache - int nFaceNum = rMgr.getFontFaceNumber( aInfo.m_nID ); - if( nFaceNum < 0 ) - nFaceNum = 0; - - // for fonts where extra kerning info can be provided on demand - // an ExtraKernInfo object is supplied - const ExtraKernInfo* pExtraKernInfo = NULL; - if( aInfo.m_eType == psp::fonttype::Type1 ) - pExtraKernInfo = new PspKernInfo( *it ); - - // inform GlyphCache about this font provided by the PsPrint subsystem - ImplDevFontAttributes aDFA = PspGraphics::Info2DevFontAttributes( aInfo ); - aDFA.mnQuality += 4096; - const rtl::OString& rFileName = rMgr.getFontFileSysPath( aInfo.m_nID ); - rGC.AddFontFile( rFileName, nFaceNum, aInfo.m_nID, aDFA, pExtraKernInfo ); - } - - // announce glyphcache fonts - rGC.AnnounceFonts( pList ); - - // register platform specific font substitutions if available - if( rMgr.hasFontconfig() ) - RegisterFontSubstitutors( pList ); - - ImplGetSVData()->maGDIData.mbNativeFontConfig = rMgr.hasFontconfig(); -} - -// ---------------------------------------------------------------------------- - -void X11SalGraphics::GetDevFontSubstList( OutputDevice* ) -{ - // no device specific font substitutions on X11 needed -} - -// ---------------------------------------------------------------------------- - -void cairosubcallback( void* pPattern ) -{ - CairoWrapper& rCairo = CairoWrapper::get(); - if( !rCairo.isValid() ) - return; - const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); - const void* pFontOptions = rStyleSettings.GetCairoFontOptions(); - if( !pFontOptions ) - return; - rCairo.ft_font_options_substitute( pFontOptions, pPattern ); -} - -bool GetFCFontOptions( const ImplFontAttributes& rFontAttributes, int nSize, - ImplFontOptions& rFontOptions) -{ - // TODO: get rid of these insane enum-conversions - // e.g. by using the classic vclenum values inside VCL - - psp::FastPrintFontInfo aInfo; - // set family name - aInfo.m_aFamilyName = rFontAttributes.GetFamilyName(); - // set italic - switch( rFontAttributes.GetSlant() ) - { - case ITALIC_NONE: - aInfo.m_eItalic = psp::italic::Upright; - break; - case ITALIC_NORMAL: - aInfo.m_eItalic = psp::italic::Italic; - break; - case ITALIC_OBLIQUE: - aInfo.m_eItalic = psp::italic::Oblique; - break; - default: - aInfo.m_eItalic = psp::italic::Unknown; - break; - } - // set weight - switch( rFontAttributes.GetWeight() ) - { - case WEIGHT_THIN: - aInfo.m_eWeight = psp::weight::Thin; - break; - case WEIGHT_ULTRALIGHT: - aInfo.m_eWeight = psp::weight::UltraLight; - break; - case WEIGHT_LIGHT: - aInfo.m_eWeight = psp::weight::Light; - break; - case WEIGHT_SEMILIGHT: - aInfo.m_eWeight = psp::weight::SemiLight; - break; - case WEIGHT_NORMAL: - aInfo.m_eWeight = psp::weight::Normal; - break; - case WEIGHT_MEDIUM: - aInfo.m_eWeight = psp::weight::Medium; - break; - case WEIGHT_SEMIBOLD: - aInfo.m_eWeight = psp::weight::SemiBold; - break; - case WEIGHT_BOLD: - aInfo.m_eWeight = psp::weight::Bold; - break; - case WEIGHT_ULTRABOLD: - aInfo.m_eWeight = psp::weight::UltraBold; - break; - case WEIGHT_BLACK: - aInfo.m_eWeight = psp::weight::Black; - break; - default: - aInfo.m_eWeight = psp::weight::Unknown; - break; - } - // set width - switch( rFontAttributes.GetWidthType() ) - { - case WIDTH_ULTRA_CONDENSED: - aInfo.m_eWidth = psp::width::UltraCondensed; - break; - case WIDTH_EXTRA_CONDENSED: - aInfo.m_eWidth = psp::width::ExtraCondensed; - break; - case WIDTH_CONDENSED: - aInfo.m_eWidth = psp::width::Condensed; - break; - case WIDTH_SEMI_CONDENSED: - aInfo.m_eWidth = psp::width::SemiCondensed; - break; - case WIDTH_NORMAL: - aInfo.m_eWidth = psp::width::Normal; - break; - case WIDTH_SEMI_EXPANDED: - aInfo.m_eWidth = psp::width::SemiExpanded; - break; - case WIDTH_EXPANDED: - aInfo.m_eWidth = psp::width::Expanded; - break; - case WIDTH_EXTRA_EXPANDED: - aInfo.m_eWidth = psp::width::ExtraExpanded; - break; - case WIDTH_ULTRA_EXPANDED: - aInfo.m_eWidth = psp::width::UltraExpanded; - break; - default: - aInfo.m_eWidth = psp::width::Unknown; - break; - } - - const psp::PrintFontManager& rPFM = psp::PrintFontManager::get(); - bool bOK = rPFM.getFontOptions( aInfo, nSize, cairosubcallback, rFontOptions); - return bOK; -} - -// ---------------------------------------------------------------------------- - -void -X11SalGraphics::GetFontMetric( ImplFontMetricData *pMetric, int nFallbackLevel ) -{ - if( nFallbackLevel >= MAX_FALLBACK ) - return; - - if( mpServerFont[nFallbackLevel] != NULL ) - { - long rDummyFactor; - mpServerFont[nFallbackLevel]->FetchFontMetric( *pMetric, rDummyFactor ); - } -} - -// --------------------------------------------------------------------------- - -ULONG -X11SalGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs ) -{ - if( ! bPrinter_ ) - { - if( mpServerFont[0] != NULL ) - { - ImplKernPairData* pTmpKernPairs; - ULONG nGotPairs = mpServerFont[0]->GetKernPairs( &pTmpKernPairs ); - for( unsigned int i = 0; i < nPairs && i < nGotPairs; ++i ) - pKernPairs[ i ] = pTmpKernPairs[ i ]; - delete[] pTmpKernPairs; - return nGotPairs; - } - } - return 0; -} - -// --------------------------------------------------------------------------- - -BOOL X11SalGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect ) -{ - int nLevel = nGlyphIndex >> GF_FONTSHIFT; - if( nLevel >= MAX_FALLBACK ) - return FALSE; - - ServerFont* pSF = mpServerFont[ nLevel ]; - if( !pSF ) - return FALSE; - - nGlyphIndex &= ~GF_FONTMASK; - const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex ); - rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() ); - return TRUE; -} - -// --------------------------------------------------------------------------- - -BOOL X11SalGraphics::GetGlyphOutline( long nGlyphIndex, - ::basegfx::B2DPolyPolygon& rPolyPoly ) -{ - int nLevel = nGlyphIndex >> GF_FONTSHIFT; - if( nLevel >= MAX_FALLBACK ) - return FALSE; - - ServerFont* pSF = mpServerFont[ nLevel ]; - if( !pSF ) - return FALSE; - - nGlyphIndex &= ~GF_FONTMASK; - if( pSF->GetGlyphOutline( nGlyphIndex, rPolyPoly ) ) - return TRUE; - - return FALSE; -} - -//-------------------------------------------------------------------------- - -SalLayout* X11SalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel ) -{ - SalLayout* pLayout = NULL; - - if( mpServerFont[ nFallbackLevel ] - && !(rArgs.mnFlags & SAL_LAYOUT_DISABLE_GLYPH_PROCESSING) ) - { -#ifdef ENABLE_GRAPHITE - // Is this a Graphite font? - if (!bDisableGraphite_ && - GraphiteFontAdaptor::IsGraphiteEnabledFont(*mpServerFont[nFallbackLevel])) - { - sal_Int32 xdpi, ydpi; - - xdpi = GetDisplay()->GetResolution().A(); - ydpi = GetDisplay()->GetResolution().B(); - - GraphiteFontAdaptor * pGrfont = new GraphiteFontAdaptor( *mpServerFont[nFallbackLevel], xdpi, ydpi); - if (!pGrfont) return NULL; - pLayout = new GraphiteServerFontLayout(pGrfont); - } - else -#endif - pLayout = new ServerFontLayout( *mpServerFont[ nFallbackLevel ] ); - } - - return pLayout; -} - -//-------------------------------------------------------------------------- - -SystemFontData X11SalGraphics::GetSysFontData( int nFallbacklevel ) const -{ - SystemFontData aSysFontData; - aSysFontData.nSize = sizeof( SystemFontData ); - aSysFontData.nFontId = 0; - - if (nFallbacklevel >= MAX_FALLBACK) nFallbacklevel = MAX_FALLBACK - 1; - if (nFallbacklevel < 0 ) nFallbacklevel = 0; - - if (mpServerFont[nFallbacklevel] != NULL) - { - ServerFont* rFont = mpServerFont[nFallbacklevel]; - aSysFontData.nFontId = rFont->GetFtFace(); - aSysFontData.nFontFlags = rFont->GetLoadFlags(); - aSysFontData.bFakeBold = rFont->NeedsArtificialBold(); - aSysFontData.bFakeItalic = rFont->NeedsArtificialItalic(); - aSysFontData.bAntialias = rFont->GetAntialiasAdvice(); - aSysFontData.bVerticalCharacterType = rFont->GetFontSelData().mbVertical; - } - - return aSysFontData; -} - -//-------------------------------------------------------------------------- - -BOOL X11SalGraphics::CreateFontSubset( - const rtl::OUString& rToFile, - const ImplFontData* pFont, - sal_Int32* pGlyphIDs, - sal_uInt8* pEncoding, - sal_Int32* pWidths, - int nGlyphCount, - FontSubsetInfo& rInfo - ) -{ - // in this context the pFont->GetFontId() is a valid PSP - // font since they are the only ones left after the PDF - // export has filtered its list of subsettable fonts (for - // which this method was created). The correct way would - // be to have the GlyphCache search for the ImplFontData pFont - psp::fontID aFont = pFont->GetFontId(); - - psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); - bool bSuccess = rMgr.createFontSubset( rInfo, - aFont, - rToFile, - pGlyphIDs, - pEncoding, - pWidths, - nGlyphCount ); - return bSuccess; -} - -//-------------------------------------------------------------------------- - -const void* X11SalGraphics::GetEmbedFontData( const ImplFontData* pFont, const sal_Ucs* pUnicodes, sal_Int32* pWidths, FontSubsetInfo& rInfo, long* pDataLen ) -{ - // in this context the pFont->GetFontId() is a valid PSP - // font since they are the only ones left after the PDF - // export has filtered its list of subsettable fonts (for - // which this method was created). The correct way would - // be to have the GlyphCache search for the ImplFontData pFont - psp::fontID aFont = pFont->GetFontId(); - return PspGraphics::DoGetEmbedFontData( aFont, pUnicodes, pWidths, rInfo, pDataLen ); -} - -//-------------------------------------------------------------------------- - -void X11SalGraphics::FreeEmbedFontData( const void* pData, long nLen ) -{ - PspGraphics::DoFreeEmbedFontData( pData, nLen ); -} - -//-------------------------------------------------------------------------- - -const Ucs2SIntMap* X11SalGraphics::GetFontEncodingVector( const ImplFontData* pFont, const Ucs2OStrMap** pNonEncoded ) -{ - // in this context the pFont->GetFontId() is a valid PSP - // font since they are the only ones left after the PDF - // export has filtered its list of subsettable fonts (for - // which this method was created). The correct way would - // be to have the GlyphCache search for the ImplFontData pFont - psp::fontID aFont = pFont->GetFontId(); - return PspGraphics::DoGetFontEncodingVector( aFont, pNonEncoded ); -} - -//-------------------------------------------------------------------------- - -void X11SalGraphics::GetGlyphWidths( const ImplFontData* pFont, - bool bVertical, - Int32Vector& rWidths, - Ucs2UIntMap& rUnicodeEnc ) -{ - // in this context the pFont->GetFontId() is a valid PSP - // font since they are the only ones left after the PDF - // export has filtered its list of subsettable fonts (for - // which this method was created). The correct way would - // be to have the GlyphCache search for the ImplFontData pFont - psp::fontID aFont = pFont->GetFontId(); - PspGraphics::DoGetGlyphWidths( aFont, bVertical, rWidths, rUnicodeEnc ); -} - -// =========================================================================== -// platform specific font substitution hooks - -class FcPreMatchSubstititution -: public ImplPreMatchFontSubstitution -{ -public: - bool FindFontSubstitute( ImplFontSelectData& ) const; -}; - -class FcGlyphFallbackSubstititution -: public ImplGlyphFallbackFontSubstitution -{ - // TODO: add a cache -public: - bool FindFontSubstitute( ImplFontSelectData&, OUString& rMissingCodes ) const; -}; - -void RegisterFontSubstitutors( ImplDevFontList* pList ) -{ - // init font substitution defaults - int nDisableBits = 0; -#ifdef SOLARIS - nDisableBits = 1; // disable "font fallback" here on default -#endif - // apply the environment variable if any - const char* pEnvStr = ::getenv( "SAL_DISABLE_FC_SUBST" ); - if( pEnvStr ) - { - if( (*pEnvStr >= '0') && (*pEnvStr <= '9') ) - nDisableBits = (*pEnvStr - '0'); - else - nDisableBits = ~0U; // no specific bits set: disable all - } - - // register font fallback substitutions (unless disabled by bit0) - if( (nDisableBits & 1) == 0 ) - { - static FcPreMatchSubstititution aSubstPreMatch; - pList->SetPreMatchHook( &aSubstPreMatch ); - } - - // register glyph fallback substitutions (unless disabled by bit1) - if( (nDisableBits & 2) == 0 ) - { - static FcGlyphFallbackSubstititution aSubstFallback; - pList->SetFallbackHook( &aSubstFallback ); - } -} - -// ----------------------------------------------------------------------- - -static ImplFontSelectData GetFcSubstitute(const ImplFontSelectData &rFontSelData, OUString& rMissingCodes ) -{ - ImplFontSelectData aRet(rFontSelData); - - const rtl::OString aLangAttrib = MsLangId::convertLanguageToIsoByteString( rFontSelData.meLanguage ); - - psp::italic::type eItalic = psp::italic::Unknown; - if( rFontSelData.GetSlant() != ITALIC_DONTKNOW ) - { - switch( rFontSelData.GetSlant() ) - { - case ITALIC_NONE: eItalic = psp::italic::Upright; break; - case ITALIC_NORMAL: eItalic = psp::italic::Italic; break; - case ITALIC_OBLIQUE: eItalic = psp::italic::Oblique; break; - default: - break; - } - } - - psp::weight::type eWeight = psp::weight::Unknown; - if( rFontSelData.GetWeight() != WEIGHT_DONTKNOW ) - { - switch( rFontSelData.GetWeight() ) - { - case WEIGHT_THIN: eWeight = psp::weight::Thin; break; - case WEIGHT_ULTRALIGHT: eWeight = psp::weight::UltraLight; break; - case WEIGHT_LIGHT: eWeight = psp::weight::Light; break; - case WEIGHT_SEMILIGHT: eWeight = psp::weight::SemiLight; break; - case WEIGHT_NORMAL: eWeight = psp::weight::Normal; break; - case WEIGHT_MEDIUM: eWeight = psp::weight::Medium; break; - case WEIGHT_SEMIBOLD: eWeight = psp::weight::SemiBold; break; - case WEIGHT_BOLD: eWeight = psp::weight::Bold; break; - case WEIGHT_ULTRABOLD: eWeight = psp::weight::UltraBold; break; - case WEIGHT_BLACK: eWeight = psp::weight::Black; break; - default: - break; - } - } - - psp::width::type eWidth = psp::width::Unknown; - if( rFontSelData.GetWidthType() != WIDTH_DONTKNOW ) - { - switch( rFontSelData.GetWidthType() ) - { - case WIDTH_ULTRA_CONDENSED: eWidth = psp::width::UltraCondensed; break; - case WIDTH_EXTRA_CONDENSED: eWidth = psp::width::ExtraCondensed; break; - case WIDTH_CONDENSED: eWidth = psp::width::Condensed; break; - case WIDTH_SEMI_CONDENSED: eWidth = psp::width::SemiCondensed; break; - case WIDTH_NORMAL: eWidth = psp::width::Normal; break; - case WIDTH_SEMI_EXPANDED: eWidth = psp::width::SemiExpanded; break; - case WIDTH_EXPANDED: eWidth = psp::width::Expanded; break; - case WIDTH_EXTRA_EXPANDED: eWidth = psp::width::ExtraExpanded; break; - case WIDTH_ULTRA_EXPANDED: eWidth = psp::width::UltraExpanded; break; - default: - break; - } - } - - psp::pitch::type ePitch = psp::pitch::Unknown; - if( rFontSelData.GetPitch() != PITCH_DONTKNOW ) - { - switch( rFontSelData.GetPitch() ) - { - case PITCH_FIXED: ePitch=psp::pitch::Fixed; break; - case PITCH_VARIABLE: ePitch=psp::pitch::Variable; break; - default: - break; - } - } - - const psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); - aRet.maSearchName = rMgr.Substitute( rFontSelData.maTargetName, rMissingCodes, aLangAttrib, eItalic, eWeight, eWidth, ePitch); - - switch (eItalic) - { - case psp::italic::Upright: aRet.meItalic = ITALIC_NONE; break; - case psp::italic::Italic: aRet.meItalic = ITALIC_NORMAL; break; - case psp::italic::Oblique: aRet.meItalic = ITALIC_OBLIQUE; break; - default: - break; - } - - switch (eWeight) - { - case psp::weight::Thin: aRet.meWeight = WEIGHT_THIN; break; - case psp::weight::UltraLight: aRet.meWeight = WEIGHT_ULTRALIGHT; break; - case psp::weight::Light: aRet.meWeight = WEIGHT_LIGHT; break; - case psp::weight::SemiLight: aRet.meWeight = WEIGHT_SEMILIGHT; break; - case psp::weight::Normal: aRet.meWeight = WEIGHT_NORMAL; break; - case psp::weight::Medium: aRet.meWeight = WEIGHT_MEDIUM; break; - case psp::weight::SemiBold: aRet.meWeight = WEIGHT_SEMIBOLD; break; - case psp::weight::Bold: aRet.meWeight = WEIGHT_BOLD; break; - case psp::weight::UltraBold: aRet.meWeight = WEIGHT_ULTRABOLD; break; - case psp::weight::Black: aRet.meWeight = WEIGHT_BLACK; break; - default: - break; - } - - switch (eWidth) - { - case psp::width::UltraCondensed: aRet.meWidthType = WIDTH_ULTRA_CONDENSED; break; - case psp::width::ExtraCondensed: aRet.meWidthType = WIDTH_EXTRA_CONDENSED; break; - case psp::width::Condensed: aRet.meWidthType = WIDTH_CONDENSED; break; - case psp::width::SemiCondensed: aRet.meWidthType = WIDTH_SEMI_CONDENSED; break; - case psp::width::Normal: aRet.meWidthType = WIDTH_NORMAL; break; - case psp::width::SemiExpanded: aRet.meWidthType = WIDTH_SEMI_EXPANDED; break; - case psp::width::Expanded: aRet.meWidthType = WIDTH_EXPANDED; break; - case psp::width::ExtraExpanded: aRet.meWidthType = WIDTH_EXTRA_EXPANDED; break; - case psp::width::UltraExpanded: aRet.meWidthType = WIDTH_ULTRA_EXPANDED; break; - default: - break; - } - - switch (ePitch) - { - case psp::pitch::Fixed: aRet.mePitch = PITCH_FIXED; break; - case psp::pitch::Variable: aRet.mePitch = PITCH_VARIABLE; break; - default: - break; - } - - return aRet; -} - -namespace -{ - bool uselessmatch(const ImplFontSelectData &rOrig, const ImplFontSelectData &rNew) - { - return - ( - rOrig.maTargetName == rNew.maSearchName && - rOrig.meWeight == rNew.meWeight && - rOrig.meItalic == rNew.meItalic && - rOrig.mePitch == rNew.mePitch && - rOrig.meWidthType == rNew.meWidthType - ); - } -} - -//-------------------------------------------------------------------------- - -bool FcPreMatchSubstititution::FindFontSubstitute( ImplFontSelectData &rFontSelData ) const -{ - // We dont' actually want to talk to Fontconfig at all for symbol fonts - if( rFontSelData.IsSymbolFont() ) - return false; - // StarSymbol is a unicode font, but it still deserves the symbol flag - if( 0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "starsymbol", 10) - || 0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "opensymbol", 10) ) - return false; - - rtl::OUString aDummy; - const ImplFontSelectData aOut = GetFcSubstitute( rFontSelData, aDummy ); - // TODO: cache the font substitution suggestion - // FC doing it would be preferable because it knows the invariables - // e.g. FC knows the FC rule that all Arial gets replaced by LiberationSans - // whereas we would have to check for every size or attribute - if( !aOut.maSearchName.Len() ) - return false; - - const bool bHaveSubstitute = !uselessmatch( rFontSelData, aOut ); - -#ifdef DEBUG - const ByteString aOrigName( rFontSelData.maTargetName, RTL_TEXTENCODING_UTF8 ); - const ByteString aSubstName( aOut.maSearchName, RTL_TEXTENCODING_UTF8 ); - printf( "FcPreMatchSubstititution \"%s\" bipw=%d%d%d%d -> ", - aOrigName.GetBuffer(), rFontSelData.meWeight, rFontSelData.meItalic, - rFontSelData.mePitch, rFontSelData.meWidthType ); - if( !bHaveSubstitute ) - printf( "no substitute available\n" ); - else - printf( "\"%s\" bipw=%d%d%d%d\n", aSubstName.GetBuffer(), - aOut.meWeight, aOut.meItalic, aOut.mePitch, aOut.meWidthType ); -#endif - - if( bHaveSubstitute ) - rFontSelData = aOut; - - return bHaveSubstitute; -} - -// ----------------------------------------------------------------------- - -bool FcGlyphFallbackSubstititution::FindFontSubstitute( ImplFontSelectData& rFontSelData, - rtl::OUString& rMissingCodes ) const -{ - // We dont' actually want to talk to Fontconfig at all for symbol fonts - if( rFontSelData.IsSymbolFont() ) - return false; - // StarSymbol is a unicode font, but it still deserves the symbol flag - if( 0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "starsymbol", 10) - || 0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "opensymbol", 10) ) - return false; - - const ImplFontSelectData aOut = GetFcSubstitute( rFontSelData, rMissingCodes ); - // TODO: cache the unicode + srcfont specific result - // FC doing it would be preferable because it knows the invariables - // e.g. FC knows the FC rule that all Arial gets replaced by LiberationSans - // whereas we would have to check for every size or attribute - if( !aOut.maSearchName.Len() ) - return false; - - const bool bHaveSubstitute = !uselessmatch( rFontSelData, aOut ); - -#ifdef DEBUG - const ByteString aOrigName( rFontSelData.maTargetName, RTL_TEXTENCODING_UTF8 ); - const ByteString aSubstName( aOut.maSearchName, RTL_TEXTENCODING_UTF8 ); - printf( "FcGFSubstititution \"%s\" bipw=%d%d%d%d ->", - aOrigName.GetBuffer(), rFontSelData.meWeight, rFontSelData.meItalic, - rFontSelData.mePitch, rFontSelData.meWidthType ); - if( !bHaveSubstitute ) - printf( "no substitute available\n" ); - else - printf( "\"%s\" bipw=%d%d%d%d\n", aSubstName.GetBuffer(), - aOut.meWeight, aOut.meItalic, aOut.mePitch, aOut.meWidthType ); -#endif - - if( bHaveSubstitute ) - rFontSelData = aOut; - - return bHaveSubstitute; -} - -// =========================================================================== - diff --git a/vcl/unx/source/gdi/salprnpsp.cxx b/vcl/unx/source/gdi/salprnpsp.cxx deleted file mode 100644 index ece724d717cb..000000000000 --- a/vcl/unx/source/gdi/salprnpsp.cxx +++ /dev/null @@ -1,1460 +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_vcl.hxx" - -/** - this file implements the sal printer interface ( SalPrinter, SalInfoPrinter - and some printer relevant methods of SalInstance and SalGraphicsData ) - - as aunderlying library the printer features of psprint are used. - - The query methods of a SalInfoPrinter are implemented by querying psprint - - The job methods of a SalPrinter are implemented by calling psprint - printer job functions. - */ - -#include -#include -#include -#include - -#include "saldisp.hxx" -#include "salinst.h" -#include "salprn.h" -#include "salframe.h" -#include "pspgraphics.h" -#include "saldata.hxx" -#include "vcl/svapp.hxx" -#include "vcl/jobset.h" -#include "vcl/print.h" -#include "vcl/print.hxx" -#include "vcl/pdfwriter.hxx" -#include "vcl/salptype.hxx" -#include "vcl/printerinfomanager.hxx" - -#include "rtl/ustring.hxx" - -#include "osl/module.h" - -using namespace psp; -using namespace rtl; -using namespace com::sun::star; - -/* - * static helpers - */ - -#include "rtsname.hxx" - -static oslModule driverLib = NULL; -extern "C" -{ -typedef int(*setupFunction)(PrinterInfo&); -static setupFunction pSetupFunction = NULL; -typedef int(*faxFunction)(String&); -static faxFunction pFaxNrFunction = NULL; -} - -static String getPdfDir( const PrinterInfo& rInfo ) -{ - String aDir; - sal_Int32 nIndex = 0; - while( nIndex != -1 ) - { - OUString aToken( rInfo.m_aFeatures.getToken( 0, ',', nIndex ) ); - if( ! aToken.compareToAscii( "pdf=", 4 ) ) - { - sal_Int32 nPos = 0; - aDir = aToken.getToken( 1, '=', nPos ); - if( ! aDir.Len() ) - aDir = String( ByteString( getenv( "HOME" ) ), osl_getThreadTextEncoding() ); - break; - } - } - return aDir; -} - -static void getPaLib() -{ - if( ! driverLib ) - { - OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( _XSALSET_LIBNAME ) ); - driverLib = osl_loadModuleRelative( (oslGenericFunction)getPaLib, aLibName.pData, SAL_LOADMODULE_DEFAULT ); - if ( !driverLib ) - { - return; - } - - pSetupFunction = (setupFunction)osl_getAsciiFunctionSymbol( driverLib, "Sal_SetupPrinterDriver" ); - if ( !pSetupFunction ) - fprintf( stderr, "could not resolve Sal_SetupPrinterDriver\n" ); - - pFaxNrFunction = (faxFunction)osl_getAsciiFunctionSymbol( driverLib, "Sal_queryFaxNumber" ); - if ( !pFaxNrFunction ) - fprintf( stderr, "could not resolve Sal_queryFaxNumber\n" ); - } -} - -inline int PtTo10Mu( int nPoints ) { return (int)((((double)nPoints)*35.27777778)+0.5); } - -inline int TenMuToPt( int nUnits ) { return (int)((((double)nUnits)/35.27777778)+0.5); } - -static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData ) -{ - pJobSetup->meOrientation = (Orientation)(rData.m_eOrientation == orientation::Landscape ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT); - - // copy page size - String aPaper; - int width, height; - - rData.m_aContext.getPageSize( aPaper, width, height ); - pJobSetup->mePaperFormat = PaperInfo::fromPSName(OUStringToOString( aPaper, RTL_TEXTENCODING_ISO_8859_1 )); - - pJobSetup->mnPaperWidth = 0; - pJobSetup->mnPaperHeight = 0; - if( pJobSetup->mePaperFormat == PAPER_USER ) - { - // transform to 100dth mm - width = PtTo10Mu( width ); - height = PtTo10Mu( height ); - - if( rData.m_eOrientation == psp::orientation::Portrait ) - { - pJobSetup->mnPaperWidth = width; - pJobSetup->mnPaperHeight= height; - } - else - { - pJobSetup->mnPaperWidth = height; - pJobSetup->mnPaperHeight= width; - } - } - - // copy input slot - const PPDKey* pKey = NULL; - const PPDValue* pValue = NULL; - - pJobSetup->mnPaperBin = 0; - if( rData.m_pParser ) - pKey = rData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) ); - if( pKey ) - pValue = rData.m_aContext.getValue( pKey ); - if( pKey && pValue ) - { - for( pJobSetup->mnPaperBin = 0; - pValue != pKey->getValue( pJobSetup->mnPaperBin ) && - pJobSetup->mnPaperBin < pKey->countValues(); - pJobSetup->mnPaperBin++ ) - ; - if( pJobSetup->mnPaperBin >= pKey->countValues() ) - pJobSetup->mnPaperBin = 0; - } - - // copy duplex - pKey = NULL; - pValue = NULL; - - pJobSetup->meDuplexMode = DUPLEX_UNKNOWN; - if( rData.m_pParser ) - pKey = rData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) ); - if( pKey ) - pValue = rData.m_aContext.getValue( pKey ); - if( pKey && pValue ) - { - if( pValue->m_aOption.EqualsIgnoreCaseAscii( "None" ) || - pValue->m_aOption.EqualsIgnoreCaseAscii( "Simplex", 0, 7 ) - ) - { - pJobSetup->meDuplexMode = DUPLEX_OFF; - } - else if( pValue->m_aOption.EqualsIgnoreCaseAscii( "DuplexNoTumble" ) ) - { - pJobSetup->meDuplexMode = DUPLEX_LONGEDGE; - } - else if( pValue->m_aOption.EqualsIgnoreCaseAscii( "DuplexTumble" ) ) - { - pJobSetup->meDuplexMode = DUPLEX_SHORTEDGE; - } - } - - // copy the whole context - if( pJobSetup->mpDriverData ) - rtl_freeMemory( pJobSetup->mpDriverData ); - - int nBytes; - void* pBuffer = NULL; - if( rData.getStreamBuffer( pBuffer, nBytes ) ) - { - pJobSetup->mnDriverDataLen = nBytes; - pJobSetup->mpDriverData = (BYTE*)pBuffer; - } - else - { - pJobSetup->mnDriverDataLen = 0; - pJobSetup->mpDriverData = NULL; - } -} - -static bool passFileToCommandLine( const String& rFilename, const String& rCommandLine, bool bRemoveFile = true ) -{ - bool bSuccess = false; - - rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - ByteString aCmdLine( rCommandLine, aEncoding ); - ByteString aFilename( rFilename, aEncoding ); - - bool bPipe = aCmdLine.Search( "(TMP)" ) != STRING_NOTFOUND ? false : true; - - // setup command line for exec - if( ! bPipe ) - while( aCmdLine.SearchAndReplace( "(TMP)", aFilename ) != STRING_NOTFOUND ) - ; - -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "%s commandline: \"%s\"\n", - bPipe ? "piping to" : "executing", - aCmdLine.GetBuffer() ); - struct stat aStat; - if( stat( aFilename.GetBuffer(), &aStat ) ) - fprintf( stderr, "stat( %s ) failed\n", aFilename.GetBuffer() ); - fprintf( stderr, "Tmp file %s has modes: 0%03lo\n", aFilename.GetBuffer(), (long)aStat.st_mode ); -#endif - const char* argv[4]; - if( ! ( argv[ 0 ] = getenv( "SHELL" ) ) ) - argv[ 0 ] = "/bin/sh"; - argv[ 1 ] = "-c"; - argv[ 2 ] = aCmdLine.GetBuffer(); - argv[ 3 ] = 0; - - bool bHavePipes = false; - int pid, fd[2]; - - if( bPipe ) - bHavePipes = pipe( fd ) ? false : true; - if( ( pid = fork() ) > 0 ) - { - if( bPipe && bHavePipes ) - { - close( fd[0] ); - char aBuffer[ 2048 ]; - FILE* fp = fopen( aFilename.GetBuffer(), "r" ); - while( fp && ! feof( fp ) ) - { - int nBytes = fread( aBuffer, 1, sizeof( aBuffer ), fp ); - if( nBytes ) - write( fd[ 1 ], aBuffer, nBytes ); - } - fclose( fp ); - close( fd[ 1 ] ); - } - int status = 0; - waitpid( pid, &status, 0 ); - if( ! status ) - bSuccess = true; - } - else if( ! pid ) - { - if( bPipe && bHavePipes ) - { - close( fd[1] ); - if( fd[0] != STDIN_FILENO ) // not probable, but who knows :) - dup2( fd[0], STDIN_FILENO ); - } - execv( argv[0], const_cast(argv) ); - fprintf( stderr, "failed to execute \"%s\"\n", aCmdLine.GetBuffer() ); - _exit( 1 ); - } - else - fprintf( stderr, "failed to fork\n" ); - - // clean up the mess - if( bRemoveFile ) - unlink( aFilename.GetBuffer() ); - - return bSuccess; -} - -static bool sendAFax( const String& rFaxNumber, const String& rFileName, const String& rCommand ) -{ - std::list< OUString > aFaxNumbers; - - if( ! rFaxNumber.Len() ) - { - getPaLib(); - if( pFaxNrFunction ) - { - String aNewNr; - if( pFaxNrFunction( aNewNr ) ) - aFaxNumbers.push_back( OUString( aNewNr ) ); - } - } - else - { - sal_Int32 nIndex = 0; - OUString aFaxes( rFaxNumber ); - OUString aBeginToken( RTL_CONSTASCII_USTRINGPARAM("") ); - OUString aEndToken( RTL_CONSTASCII_USTRINGPARAM("") ); - while( nIndex != -1 ) - { - nIndex = aFaxes.indexOf( aBeginToken, nIndex ); - if( nIndex != -1 ) - { - sal_Int32 nBegin = nIndex + aBeginToken.getLength(); - nIndex = aFaxes.indexOf( aEndToken, nIndex ); - if( nIndex != -1 ) - { - aFaxNumbers.push_back( aFaxes.copy( nBegin, nIndex-nBegin ) ); - nIndex += aEndToken.getLength(); - } - } - } - } - - bool bSuccess = true; - if( aFaxNumbers.begin() != aFaxNumbers.end() ) - { - while( aFaxNumbers.begin() != aFaxNumbers.end() && bSuccess ) - { - String aCmdLine( rCommand ); - String aFaxNumber( aFaxNumbers.front() ); - aFaxNumbers.pop_front(); - while( aCmdLine.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "(PHONE)" ) ), aFaxNumber ) != STRING_NOTFOUND ) - ; -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "sending fax to \"%s\"\n", OUStringToOString( aFaxNumber, osl_getThreadTextEncoding() ).getStr() ); -#endif - bSuccess = passFileToCommandLine( rFileName, aCmdLine, false ); - } - } - else - bSuccess = false; - - // clean up temp file - unlink( ByteString( rFileName, osl_getThreadTextEncoding() ).GetBuffer() ); - - return bSuccess; -} - -static bool createPdf( const String& rToFile, const String& rFromFile, const String& rCommandLine ) -{ - String aCommandLine( rCommandLine ); - while( aCommandLine.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "(OUTFILE)" ) ), rToFile ) != STRING_NOTFOUND ) - ; - return passFileToCommandLine( rFromFile, aCommandLine ); -} - -/* - * SalInstance - */ - -// ----------------------------------------------------------------------- - -SalInfoPrinter* X11SalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo, - ImplJobSetup* pJobSetup ) -{ - mbPrinterInit = true; - // create and initialize SalInfoPrinter - PspSalInfoPrinter* pPrinter = new PspSalInfoPrinter; - - if( pJobSetup ) - { - PrinterInfoManager& rManager( PrinterInfoManager::get() ); - PrinterInfo aInfo( rManager.getPrinterInfo( pQueueInfo->maPrinterName ) ); - pPrinter->m_aJobData = aInfo; - pPrinter->m_aPrinterGfx.Init( pPrinter->m_aJobData ); - - if( pJobSetup->mpDriverData ) - JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aInfo ); - - pJobSetup->mnSystem = JOBSETUP_SYSTEM_UNIX; - pJobSetup->maPrinterName = pQueueInfo->maPrinterName; - pJobSetup->maDriver = aInfo.m_aDriverName; - copyJobDataToJobSetup( pJobSetup, aInfo ); - - // set/clear backwards compatibility flag - bool bStrictSO52Compatibility = false; - std::hash_map::const_iterator compat_it = - pJobSetup->maValueMap.find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StrictSO52Compatibility" ) ) ); - - if( compat_it != pJobSetup->maValueMap.end() ) - { - if( compat_it->second.equalsIgnoreAsciiCaseAscii( "true" ) ) - bStrictSO52Compatibility = true; - } - pPrinter->m_aPrinterGfx.setStrictSO52Compatibility( bStrictSO52Compatibility ); - } - - - return pPrinter; -} - -// ----------------------------------------------------------------------- - -void X11SalInstance::DestroyInfoPrinter( SalInfoPrinter* pPrinter ) -{ - delete pPrinter; -} - -// ----------------------------------------------------------------------- - -SalPrinter* X11SalInstance::CreatePrinter( SalInfoPrinter* pInfoPrinter ) -{ - mbPrinterInit = true; - // create and initialize SalPrinter - PspSalPrinter* pPrinter = new PspSalPrinter( pInfoPrinter ); - pPrinter->m_aJobData = static_cast(pInfoPrinter)->m_aJobData; - - return pPrinter; -} - -// ----------------------------------------------------------------------- - -void X11SalInstance::DestroyPrinter( SalPrinter* pPrinter ) -{ - delete pPrinter; -} - -// ----------------------------------------------------------------------- - -void X11SalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList ) -{ - mbPrinterInit = true; - PrinterInfoManager& rManager( PrinterInfoManager::get() ); - static const char* pNoSyncDetection = getenv( "SAL_DISABLE_SYNCHRONOUS_PRINTER_DETECTION" ); - if( ! pNoSyncDetection || ! *pNoSyncDetection ) - { - // #i62663# synchronize possible asynchronouse printer detection now - rManager.checkPrintersChanged( true ); - } - ::std::list< OUString > aPrinters; - rManager.listPrinters( aPrinters ); - - for( ::std::list< OUString >::iterator it = aPrinters.begin(); it != aPrinters.end(); ++it ) - { - const PrinterInfo& rInfo( rManager.getPrinterInfo( *it ) ); - // Neuen Eintrag anlegen - SalPrinterQueueInfo* pInfo = new SalPrinterQueueInfo; - pInfo->maPrinterName = *it; - pInfo->maDriver = rInfo.m_aDriverName; - pInfo->maLocation = rInfo.m_aLocation; - pInfo->maComment = rInfo.m_aComment; - pInfo->mpSysData = NULL; - - sal_Int32 nIndex = 0; - while( nIndex != -1 ) - { - String aToken( rInfo.m_aFeatures.getToken( 0, ',', nIndex ) ); - if( aToken.CompareToAscii( "pdf=", 4 ) == COMPARE_EQUAL ) - { - pInfo->maLocation = getPdfDir( rInfo ); - break; - } - } - - pList->Add( pInfo ); - } -} - -// ----------------------------------------------------------------------- - -void X11SalInstance::DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ) -{ - delete pInfo; -} - -// ----------------------------------------------------------------------- - -void X11SalInstance::GetPrinterQueueState( SalPrinterQueueInfo* ) -{ - mbPrinterInit = true; -} - -// ----------------------------------------------------------------------- - -String X11SalInstance::GetDefaultPrinter() -{ - mbPrinterInit = true; - PrinterInfoManager& rManager( PrinterInfoManager::get() ); - return rManager.getDefaultPrinter(); -} - -// ======================================================================= - -PspSalInfoPrinter::PspSalInfoPrinter() -{ - m_pGraphics = NULL; - m_bPapersInit = false; -} - -// ----------------------------------------------------------------------- - -PspSalInfoPrinter::~PspSalInfoPrinter() -{ - if( m_pGraphics ) - { - delete m_pGraphics; - m_pGraphics = NULL; - } -} - -// ----------------------------------------------------------------------- - -void PspSalInfoPrinter::InitPaperFormats( const ImplJobSetup* ) -{ - m_aPaperFormats.clear(); - m_bPapersInit = true; - - if( m_aJobData.m_pParser ) - { - const PPDKey* pKey = m_aJobData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) ); - if( pKey ) - { - int nValues = pKey->countValues(); - for( int i = 0; i < nValues; i++ ) - { - const PPDValue* pValue = pKey->getValue( i ); - int nWidth = 0, nHeight = 0; - m_aJobData.m_pParser->getPaperDimension( pValue->m_aOption, nWidth, nHeight ); - PaperInfo aInfo(PtTo10Mu( nWidth ), PtTo10Mu( nHeight )); - m_aPaperFormats.push_back( aInfo ); - } - } - } -} - -// ----------------------------------------------------------------------- - -int PspSalInfoPrinter::GetLandscapeAngle( const ImplJobSetup* ) -{ - return 900; -} - -// ----------------------------------------------------------------------- - -SalGraphics* PspSalInfoPrinter::GetGraphics() -{ - // return a valid pointer only once - // the reasoning behind this is that we could have different - // SalGraphics that can run in multiple threads - // (future plans) - SalGraphics* pRet = NULL; - if( ! m_pGraphics ) - { - m_pGraphics = new PspGraphics( &m_aJobData, &m_aPrinterGfx, NULL, false, this ); - m_pGraphics->SetLayout( 0 ); - pRet = m_pGraphics; - } - return pRet; -} - -// ----------------------------------------------------------------------- - -void PspSalInfoPrinter::ReleaseGraphics( SalGraphics* pGraphics ) -{ - if( pGraphics == m_pGraphics ) - { - delete pGraphics; - m_pGraphics = NULL; - } - return; -} - -// ----------------------------------------------------------------------- - -BOOL PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup ) -{ - if( ! pFrame || ! pJobSetup ) - return FALSE; - - getPaLib(); - - if( ! pSetupFunction ) - return FALSE; - - PrinterInfoManager& rManager = PrinterInfoManager::get(); - - PrinterInfo aInfo( rManager.getPrinterInfo( pJobSetup->maPrinterName ) ); - if ( pJobSetup->mpDriverData ) - { - SetData( ~0, pJobSetup ); - JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aInfo ); - } - - if( pSetupFunction( aInfo ) ) - { - rtl_freeMemory( pJobSetup->mpDriverData ); - pJobSetup->mpDriverData = NULL; - - int nBytes; - void* pBuffer = NULL; - aInfo.getStreamBuffer( pBuffer, nBytes ); - pJobSetup->mnDriverDataLen = nBytes; - pJobSetup->mpDriverData = (BYTE*)pBuffer; - - // copy everything to job setup - copyJobDataToJobSetup( pJobSetup, aInfo ); - JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, m_aJobData ); - return TRUE; - } - return FALSE; -} - -// ----------------------------------------------------------------------- - -// This function gets the driver data and puts it into pJobSetup -// If pJobSetup->mpDriverData is NOT NULL, then the independend -// data should be merged into the driver data -// If pJobSetup->mpDriverData IS NULL, then the driver defaults -// should be merged into the independent data -BOOL PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup ) -{ - // set/clear backwards compatibility flag - bool bStrictSO52Compatibility = false; - std::hash_map::const_iterator compat_it = - pJobSetup->maValueMap.find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StrictSO52Compatibility" ) ) ); - - if( compat_it != pJobSetup->maValueMap.end() ) - { - if( compat_it->second.equalsIgnoreAsciiCaseAscii( "true" ) ) - bStrictSO52Compatibility = true; - } - m_aPrinterGfx.setStrictSO52Compatibility( bStrictSO52Compatibility ); - - if( pJobSetup->mpDriverData ) - return SetData( ~0, pJobSetup ); - - copyJobDataToJobSetup( pJobSetup, m_aJobData ); - - return TRUE; -} - -// ----------------------------------------------------------------------- - -// This function merges the independ driver data -// and sets the new independ data in pJobSetup -// Only the data must be changed, where the bit -// in nGetDataFlags is set -BOOL PspSalInfoPrinter::SetData( - ULONG nSetDataFlags, - ImplJobSetup* pJobSetup ) -{ - JobData aData; - JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData ); - - if( aData.m_pParser ) - { - const PPDKey* pKey; - const PPDValue* pValue; - - // merge papersize if necessary - if( nSetDataFlags & SAL_JOBSET_PAPERSIZE ) - { - int nWidth, nHeight; - if( pJobSetup->meOrientation == ORIENTATION_PORTRAIT ) - { - nWidth = pJobSetup->mnPaperWidth; - nHeight = pJobSetup->mnPaperHeight; - } - else - { - nWidth = pJobSetup->mnPaperHeight; - nHeight = pJobSetup->mnPaperWidth; - } - String aPaper; - - if( pJobSetup->mePaperFormat == PAPER_USER ) - aPaper = aData.m_pParser->matchPaper( - TenMuToPt( pJobSetup->mnPaperWidth ), - TenMuToPt( pJobSetup->mnPaperHeight ) ); - else - aPaper = rtl::OStringToOUString(PaperInfo::toPSName(pJobSetup->mePaperFormat), RTL_TEXTENCODING_ISO_8859_1); - - pKey = aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) ); - pValue = pKey ? pKey->getValueCaseInsensitive( aPaper ) : NULL; - - // some PPD files do not specify the standard paper names (e.g. C5 instead of EnvC5) - // try to find the correct paper anyway using the size - if( pKey && ! pValue && pJobSetup->mePaperFormat != PAPER_USER ) - { - PaperInfo aInfo( pJobSetup->mePaperFormat ); - aPaper = aData.m_pParser->matchPaper( - TenMuToPt( aInfo.getWidth() ), - TenMuToPt( aInfo.getHeight() ) ); - pValue = pKey->getValueCaseInsensitive( aPaper ); - } - - if( ! ( pKey && pValue && aData.m_aContext.setValue( pKey, pValue, false ) == pValue ) ) - return FALSE; - } - - // merge paperbin if necessary - if( nSetDataFlags & SAL_JOBSET_PAPERBIN ) - { - pKey = aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) ); - if( pKey ) - { - int nPaperBin = pJobSetup->mnPaperBin; - if( nPaperBin >= pKey->countValues() ) - pValue = pKey->getDefaultValue(); - else - pValue = pKey->getValue( pJobSetup->mnPaperBin ); - - // may fail due to constraints; - // real paper bin is copied back to jobsetup in that case - aData.m_aContext.setValue( pKey, pValue ); - } - // if printer has no InputSlot key simply ignore this setting - // (e.g. SGENPRT has no InputSlot) - } - - // merge orientation if necessary - if( nSetDataFlags & SAL_JOBSET_ORIENTATION ) - aData.m_eOrientation = pJobSetup->meOrientation == ORIENTATION_LANDSCAPE ? orientation::Landscape : orientation::Portrait; - - // merge duplex if necessary - if( nSetDataFlags & SAL_JOBSET_DUPLEXMODE ) - { - pKey = aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) ); - if( pKey ) - { - pValue = NULL; - switch( pJobSetup->meDuplexMode ) - { - case DUPLEX_OFF: - pValue = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "None" ) ) ); - if( pValue == NULL ) - pValue = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "SimplexNoTumble" ) ) ); - break; - case DUPLEX_SHORTEDGE: - pValue = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "DuplexTumble" ) ) ); - break; - case DUPLEX_LONGEDGE: - pValue = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "DuplexNoTumble" ) ) ); - break; - case DUPLEX_UNKNOWN: - default: - pValue = 0; - break; - } - if( ! pValue ) - pValue = pKey->getDefaultValue(); - aData.m_aContext.setValue( pKey, pValue ); - } - } - - m_aJobData = aData; - copyJobDataToJobSetup( pJobSetup, aData ); - return TRUE; - } - - return FALSE; -} - -// ----------------------------------------------------------------------- - -void PspSalInfoPrinter::GetPageInfo( - const ImplJobSetup* pJobSetup, - long& rOutWidth, long& rOutHeight, - long& rPageOffX, long& rPageOffY, - long& rPageWidth, long& rPageHeight ) -{ - if( ! pJobSetup ) - return; - - JobData aData; - JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData ); - - // get the selected page size - if( aData.m_pParser ) - { - - String aPaper; - int width, height; - int left = 0, top = 0, right = 0, bottom = 0; - int nDPI = aData.m_aContext.getRenderResolution(); - - - if( aData.m_eOrientation == psp::orientation::Portrait ) - { - aData.m_aContext.getPageSize( aPaper, width, height ); - aData.m_pParser->getMargins( aPaper, left, right, top, bottom ); - } - else - { - aData.m_aContext.getPageSize( aPaper, height, width ); - aData.m_pParser->getMargins( aPaper, top, bottom, right, left ); - } - - rPageWidth = width * nDPI / 72; - rPageHeight = height * nDPI / 72; - rPageOffX = left * nDPI / 72; - rPageOffY = top * nDPI / 72; - rOutWidth = ( width - left - right ) * nDPI / 72; - rOutHeight = ( height - top - bottom ) * nDPI / 72; - } -} - -// ----------------------------------------------------------------------- - -ULONG PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup ) -{ - if( ! pJobSetup ) - return 0; - - JobData aData; - JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData ); - - const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) ): NULL; - return pKey ? pKey->countValues() : 0; -} - -// ----------------------------------------------------------------------- - -String PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, ULONG nPaperBin ) -{ - JobData aData; - JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData ); - - String aRet; - if( aData.m_pParser ) - { - const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) ): NULL; - if( ! pKey || nPaperBin >= (ULONG)pKey->countValues() ) - aRet = aData.m_pParser->getDefaultInputSlot(); - else - { - const PPDValue* pValue = pKey->getValue( nPaperBin ); - if( pValue ) - aRet = aData.m_pParser->translateOption( pKey->getKey(), pValue->m_aOption ); - } - } - - return aRet; -} - -// ----------------------------------------------------------------------- - -ULONG PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, USHORT nType ) -{ - switch( nType ) - { - case PRINTER_CAPABILITIES_SUPPORTDIALOG: - return 1; - case PRINTER_CAPABILITIES_COPIES: - return 0xffff; - case PRINTER_CAPABILITIES_COLLATECOPIES: - { - // see if the PPD contains a value to set Collate to True - JobData aData; - JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData ); - - const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Collate" ) ) ) : NULL; - const PPDValue* pVal = pKey ? pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "True" ) ) ) : NULL; - - // PPDs don't mention the number of possible collated copies. - // so let's guess as many as we want ? - return pVal ? 0xffff : 0; - } - case PRINTER_CAPABILITIES_SETORIENTATION: - return 1; - case PRINTER_CAPABILITIES_SETDUPLEX: - return 1; - case PRINTER_CAPABILITIES_SETPAPERBIN: - return 1; - case PRINTER_CAPABILITIES_SETPAPERSIZE: - return 1; - case PRINTER_CAPABILITIES_SETPAPER: - return 0; - case PRINTER_CAPABILITIES_FAX: - return PrinterInfoManager::get().checkFeatureToken( pJobSetup->maPrinterName, "fax" ) ? 1 : 0; - case PRINTER_CAPABILITIES_PDF: - if( PrinterInfoManager::get().checkFeatureToken( pJobSetup->maPrinterName, "pdf" ) ) - return 1; - else - { - // see if the PPD contains a value to set Collate to True - JobData aData = PrinterInfoManager::get().getPrinterInfo( pJobSetup->maPrinterName ); - if( pJobSetup->mpDriverData ) - JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData ); - return aData.m_nPDFDevice > 0 ? 1 : 0; - } - case PRINTER_CAPABILITIES_EXTERNALDIALOG: - return PrinterInfoManager::get().checkFeatureToken( pJobSetup->maPrinterName, "external_dialog" ) ? 1 : 0; - case PRINTER_CAPABILITIES_USEPULLMODEL: - { - // see if the PPD contains a value to set Collate to True - JobData aData = PrinterInfoManager::get().getPrinterInfo( pJobSetup->maPrinterName ); - if( pJobSetup->mpDriverData ) - JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData ); - return aData.m_nPDFDevice > 0 ? 1 : 0; - } - default: break; - }; - return 0; -} - -// ======================================================================= - -/* - * SalPrinter - */ - - PspSalPrinter::PspSalPrinter( SalInfoPrinter* pInfoPrinter ) - : m_bFax( false ), - m_bPdf( false ), - m_bSwallowFaxNo( false ), - m_bIsPDFWriterJob( false ), - m_pGraphics( NULL ), - m_nCopies( 1 ), - m_bCollate( false ), - m_pInfoPrinter( pInfoPrinter ) -{ -} - -// ----------------------------------------------------------------------- - -PspSalPrinter::~PspSalPrinter() -{ -} - -// ----------------------------------------------------------------------- - -static String getTmpName() -{ - rtl::OUString aTmp, aSys; - osl_createTempFile( NULL, NULL, &aTmp.pData ); - osl_getSystemPathFromFileURL( aTmp.pData, &aSys.pData ); - - return aSys; -} - -BOOL PspSalPrinter::StartJob( - const XubString* pFileName, - const XubString& rJobName, - const XubString& rAppName, - ULONG nCopies, - bool bCollate, - bool bDirect, - ImplJobSetup* pJobSetup ) -{ - vcl_sal::PrinterUpdate::jobStarted(); - - m_bFax = false; - m_bPdf = false; - m_aFileName = pFileName ? *pFileName : String(); - m_aTmpFile = String(); - m_nCopies = nCopies; - m_bCollate = bCollate; - - JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, m_aJobData ); - if( m_nCopies > 1 ) - { - // in case user did not do anything (m_nCopies=1) - // take the default from jobsetup - m_aJobData.m_nCopies = m_nCopies; - m_aJobData.setCollate( bCollate ); - } - - // check wether this printer is configured as fax - int nMode = 0; - const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( m_aJobData.m_aPrinterName ) ); - sal_Int32 nIndex = 0; - while( nIndex != -1 ) - { - OUString aToken( rInfo.m_aFeatures.getToken( 0, ',', nIndex ) ); - if( ! aToken.compareToAscii( "fax", 3 ) ) - { - m_bFax = true; - m_aTmpFile = getTmpName(); - nMode = S_IRUSR | S_IWUSR; - - ::std::hash_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash >::const_iterator it; - it = pJobSetup->maValueMap.find( ::rtl::OUString::createFromAscii( "FAX#" ) ); - if( it != pJobSetup->maValueMap.end() ) - m_aFaxNr = it->second; - - sal_Int32 nPos = 0; - m_bSwallowFaxNo = ! aToken.getToken( 1, '=', nPos ).compareToAscii( "swallow", 7 ) ? true : false; - - break; - } - if( ! aToken.compareToAscii( "pdf=", 4 ) ) - { - m_bPdf = true; - m_aTmpFile = getTmpName(); - nMode = S_IRUSR | S_IWUSR; - - if( ! m_aFileName.Len() ) - { - m_aFileName = getPdfDir( rInfo ); - m_aFileName.Append( '/' ); - m_aFileName.Append( rJobName ); - m_aFileName.AppendAscii( ".pdf" ); - } - break; - } - } - m_aPrinterGfx.Init( m_aJobData ); - - // set/clear backwards compatibility flag - bool bStrictSO52Compatibility = false; - std::hash_map::const_iterator compat_it = - pJobSetup->maValueMap.find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StrictSO52Compatibility" ) ) ); - - if( compat_it != pJobSetup->maValueMap.end() ) - { - if( compat_it->second.equalsIgnoreAsciiCaseAscii( "true" ) ) - bStrictSO52Compatibility = true; - } - m_aPrinterGfx.setStrictSO52Compatibility( bStrictSO52Compatibility ); - - return m_aPrintJob.StartJob( m_aTmpFile.Len() ? m_aTmpFile : m_aFileName, nMode, rJobName, rAppName, m_aJobData, &m_aPrinterGfx, bDirect ) ? TRUE : FALSE; -} - -// ----------------------------------------------------------------------- - -BOOL PspSalPrinter::EndJob() -{ - BOOL bSuccess = FALSE; - if( m_bIsPDFWriterJob ) - bSuccess = TRUE; - else - { - bSuccess = m_aPrintJob.EndJob(); - - if( bSuccess ) - { - // check for fax - if( m_bFax ) - { - - const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( m_aJobData.m_aPrinterName ) ); - // sendAFax removes the file after use - bSuccess = sendAFax( m_aFaxNr, m_aTmpFile, rInfo.m_aCommand ); - } - else if( m_bPdf ) - { - const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( m_aJobData.m_aPrinterName ) ); - bSuccess = createPdf( m_aFileName, m_aTmpFile, rInfo.m_aCommand ); - } - } - } - vcl_sal::PrinterUpdate::jobEnded(); - return bSuccess; -} - -// ----------------------------------------------------------------------- - -BOOL PspSalPrinter::AbortJob() -{ - BOOL bAbort = m_aPrintJob.AbortJob() ? TRUE : FALSE; - vcl_sal::PrinterUpdate::jobEnded(); - return bAbort; -} - -// ----------------------------------------------------------------------- - -SalGraphics* PspSalPrinter::StartPage( ImplJobSetup* pJobSetup, BOOL ) -{ - JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, m_aJobData ); - m_pGraphics = new PspGraphics( &m_aJobData, &m_aPrinterGfx, m_bFax ? &m_aFaxNr : NULL, m_bSwallowFaxNo, m_pInfoPrinter ); - m_pGraphics->SetLayout( 0 ); - if( m_nCopies > 1 ) - { - // in case user did not do anything (m_nCopies=1) - // take the default from jobsetup - m_aJobData.m_nCopies = m_nCopies; - m_aJobData.setCollate( m_nCopies > 1 && m_bCollate ); - } - - m_aPrintJob.StartPage( m_aJobData ); - m_aPrinterGfx.Init( m_aPrintJob ); - - return m_pGraphics; -} - -// ----------------------------------------------------------------------- - -BOOL PspSalPrinter::EndPage() -{ - sal_Bool bResult = m_aPrintJob.EndPage(); - m_aPrinterGfx.Clear(); - return bResult ? TRUE : FALSE; -} - -// ----------------------------------------------------------------------- - -ULONG PspSalPrinter::GetErrorCode() -{ - return 0; -} - -// ----------------------------------------------------------------------- - -struct PDFNewJobParameters -{ - Size maPageSize; - USHORT mnPaperBin; - - PDFNewJobParameters( const Size& i_rSize = Size(), - USHORT i_nPaperBin = 0xffff ) - : maPageSize( i_rSize ), mnPaperBin( i_nPaperBin ) {} - - bool operator!=(const PDFNewJobParameters& rComp ) const - { - Size aCompLSSize( rComp.maPageSize.Height(), rComp.maPageSize.Width() ); - return - (maPageSize != rComp.maPageSize && maPageSize != aCompLSSize) - || mnPaperBin != rComp.mnPaperBin - ; - } - - bool operator==(const PDFNewJobParameters& rComp) const - { - return ! this->operator!=(rComp); - } -}; - -struct PDFPrintFile -{ - rtl::OUString maTmpURL; - PDFNewJobParameters maParameters; - - PDFPrintFile( const rtl::OUString& i_rURL, const PDFNewJobParameters& i_rNewParameters ) - : maTmpURL( i_rURL ) - , maParameters( i_rNewParameters ) {} -}; - -BOOL PspSalPrinter::StartJob( const String* i_pFileName, const String& i_rJobName, const String& i_rAppName, - ImplJobSetup* i_pSetupData, vcl::PrinterController& i_rController ) -{ - OSL_TRACE( "StartJob with controller: pFilename = %s", i_pFileName ? rtl::OUStringToOString( *i_pFileName, RTL_TEXTENCODING_UTF8 ).getStr() : "" ); - // mark for endjob - m_bIsPDFWriterJob = true; - // reset IsLastPage - i_rController.setLastPage( sal_False ); - - // update job data - if( i_pSetupData ) - JobData::constructFromStreamBuffer( i_pSetupData->mpDriverData, i_pSetupData->mnDriverDataLen, m_aJobData ); - - OSL_ASSERT( m_aJobData.m_nPDFDevice > 0 ); - m_aJobData.m_nPDFDevice = 1; - - // possibly create one job for collated output - sal_Bool bSinglePrintJobs = sal_False; - beans::PropertyValue* pSingleValue = i_rController.getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintCollateAsSingleJobs" ) ) ); - if( pSingleValue ) - { - pSingleValue->Value >>= bSinglePrintJobs; - } - - int nCopies = i_rController.getPrinter()->GetCopyCount(); - bool bCollate = i_rController.getPrinter()->IsCollateCopy(); - - // notify start of real print job - i_rController.jobStarted(); - - // setup PDFWriter context - vcl::PDFWriter::PDFWriterContext aContext; - aContext.Version = vcl::PDFWriter::PDF_1_4; - aContext.Tagged = false; - aContext.EmbedStandardFonts = true; - aContext.DocumentLocale = Application::GetSettings().GetLocale(); - - // prepare doc info - aContext.DocumentInfo.Title = i_rJobName; - aContext.DocumentInfo.Creator = i_rAppName; - aContext.DocumentInfo.Producer = i_rAppName; - - // define how we handle metafiles in PDFWriter - vcl::PDFWriter::PlayMetafileContext aMtfContext; - aMtfContext.m_bOnlyLosslessCompression = true; - - boost::shared_ptr pWriter; - std::vector< PDFPrintFile > aPDFFiles; - boost::shared_ptr pPrinter( i_rController.getPrinter() ); - int nAllPages = i_rController.getFilteredPageCount(); - i_rController.createProgressDialog(); - bool bAborted = false; - PDFNewJobParameters aLastParm; - - aContext.DPIx = pPrinter->ImplGetDPIX(); - aContext.DPIy = pPrinter->ImplGetDPIY(); - for( int nPage = 0; nPage < nAllPages && ! bAborted; nPage++ ) - { - if( nPage == nAllPages-1 ) - i_rController.setLastPage( sal_True ); - - // get the page's metafile - GDIMetaFile aPageFile; - vcl::PrinterController::PageSize aPageSize = i_rController.getFilteredPageFile( nPage, aPageFile ); - if( i_rController.isProgressCanceled() ) - { - bAborted = true; - if( nPage != nAllPages-1 ) - { - i_rController.createProgressDialog(); - i_rController.setLastPage( sal_True ); - i_rController.getFilteredPageFile( nPage, aPageFile ); - } - } - else - { - pPrinter->SetMapMode( MapMode( MAP_100TH_MM ) ); - pPrinter->SetPaperSizeUser( aPageSize.aSize, true ); - PDFNewJobParameters aNewParm( pPrinter->GetPaperSize(), pPrinter->GetPaperBin() ); - - // create PDF writer on demand - // either on first page - // or on paper format change - cups does not support multiple paper formats per job (yet?) - // so we need to start a new job to get a new paper format from the printer - // orientation switches (that is switch of height and width) is handled transparently by CUPS - if( ! pWriter || - (aNewParm != aLastParm && ! i_pFileName ) ) - { - if( pWriter ) - { - pWriter->Emit(); - } - // produce PDF file - OUString aPDFUrl; - if( i_pFileName ) - aPDFUrl = *i_pFileName; - else - osl_createTempFile( NULL, NULL, &aPDFUrl.pData ); - // normalize to file URL - if( aPDFUrl.compareToAscii( "file:", 5 ) != 0 ) - { - // this is not a file URL, but it should - // form it into a osl friendly file URL - rtl::OUString aTmp; - osl_getFileURLFromSystemPath( aPDFUrl.pData, &aTmp.pData ); - aPDFUrl = aTmp; - } - // save current file and paper format - aLastParm = aNewParm; - aPDFFiles.push_back( PDFPrintFile( aPDFUrl, aNewParm ) ); - // update context - aContext.URL = aPDFUrl; - - // create and initialize PDFWriter - #if defined __SUNPRO_CC - #pragma disable_warn - #endif - pWriter.reset( new vcl::PDFWriter( aContext, uno::Reference< beans::XMaterialHolder >() ) ); - #if defined __SUNPRO_CC - #pragma enable_warn - #endif - } - - pWriter->NewPage( TenMuToPt( aNewParm.maPageSize.Width() ), - TenMuToPt( aNewParm.maPageSize.Height() ), - vcl::PDFWriter::Portrait ); - - pWriter->PlayMetafile( aPageFile, aMtfContext, NULL ); - } - } - - // emit the last file - if( pWriter ) - pWriter->Emit(); - - // handle collate, copy count and multiple jobs correctly - int nOuterJobs = 1; - if( bSinglePrintJobs ) - { - nOuterJobs = nCopies; - m_aJobData.m_nCopies = 1; - } - else - { - if( bCollate ) - { - if( aPDFFiles.size() == 1 && pPrinter->HasSupport( SUPPORT_COLLATECOPY ) ) - { - m_aJobData.setCollate( true ); - m_aJobData.m_nCopies = nCopies; - } - else - { - nOuterJobs = nCopies; - m_aJobData.m_nCopies = 1; - } - } - else - { - m_aJobData.setCollate( false ); - m_aJobData.m_nCopies = nCopies; - } - } - - // spool files - if( ! i_pFileName && ! bAborted ) - { - bool bFirstJob = true; - for( int nCurJob = 0; nCurJob < nOuterJobs; nCurJob++ ) - { - for( size_t i = 0; i < aPDFFiles.size(); i++ ) - { - oslFileHandle pFile = NULL; - osl_openFile( aPDFFiles[i].maTmpURL.pData, &pFile, osl_File_OpenFlag_Read ); - if( pFile ) - { - osl_setFilePos( pFile, osl_Pos_Absolut, 0 ); - std::vector< char > buffer( 0x10000, 0 ); - // update job data with current page size - Size aPageSize( aPDFFiles[i].maParameters.maPageSize ); - m_aJobData.setPaper( TenMuToPt( aPageSize.Width() ), TenMuToPt( aPageSize.Height() ) ); - // update job data with current paperbin - m_aJobData.setPaperBin( aPDFFiles[i].maParameters.mnPaperBin ); - - // spool current file - FILE* fp = PrinterInfoManager::get().startSpool( pPrinter->GetName(), i_rController.isDirectPrint() ); - if( fp ) - { - sal_uInt64 nBytesRead = 0; - do - { - osl_readFile( pFile, &buffer[0], buffer.size(), &nBytesRead ); - if( nBytesRead > 0 ) - fwrite( &buffer[0], 1, nBytesRead, fp ); - } while( nBytesRead == buffer.size() ); - rtl::OUStringBuffer aBuf( i_rJobName.Len() + 8 ); - aBuf.append( i_rJobName ); - if( i > 0 || nCurJob > 0 ) - { - aBuf.append( sal_Unicode(' ') ); - aBuf.append( sal_Int32( i + nCurJob * aPDFFiles.size() ) ); - } - PrinterInfoManager::get().endSpool( pPrinter->GetName(), aBuf.makeStringAndClear(), fp, m_aJobData, bFirstJob ); - bFirstJob = false; - } - } - osl_closeFile( pFile ); - } - } - } - - // job has been spooled - i_rController.setJobState( bAborted ? view::PrintableState_JOB_ABORTED : view::PrintableState_JOB_SPOOLED ); - - // clean up the temporary PDF files - if( ! i_pFileName || bAborted ) - { - for( size_t i = 0; i < aPDFFiles.size(); i++ ) - { - osl_removeFile( aPDFFiles[i].maTmpURL.pData ); - OSL_TRACE( "removed print PDF file %s\n", rtl::OUStringToOString( aPDFFiles[i].maTmpURL, RTL_TEXTENCODING_UTF8 ).getStr() ); - } - } - - return TRUE; -} - - - -/* - * vcl::PrinterUpdate - */ - -Timer* vcl_sal::PrinterUpdate::pPrinterUpdateTimer = NULL; -int vcl_sal::PrinterUpdate::nActiveJobs = 0; - -void vcl_sal::PrinterUpdate::doUpdate() -{ - ::psp::PrinterInfoManager& rManager( ::psp::PrinterInfoManager::get() ); - if( rManager.checkPrintersChanged( false ) ) - { - SalDisplay* pDisp = GetX11SalData()->GetDisplay(); - const std::list< SalFrame* >& rList = pDisp->getFrames(); - for( std::list< SalFrame* >::const_iterator it = rList.begin(); - it != rList.end(); ++it ) - pDisp->SendInternalEvent( *it, NULL, SALEVENT_PRINTERCHANGED ); - } -} - -// ----------------------------------------------------------------------- - -IMPL_STATIC_LINK_NOINSTANCE( vcl_sal::PrinterUpdate, UpdateTimerHdl, void*, EMPTYARG ) -{ - if( nActiveJobs < 1 ) - { - doUpdate(); - delete pPrinterUpdateTimer; - pPrinterUpdateTimer = NULL; - } - else - pPrinterUpdateTimer->Start(); - - return 0; -} - -// ----------------------------------------------------------------------- - -void vcl_sal::PrinterUpdate::update() -{ - if( Application::GetSettings().GetMiscSettings().GetDisablePrinting() ) - return; - - if( ! static_cast< X11SalInstance* >(GetSalData()->m_pInstance)->isPrinterInit() ) - { - // #i45389# start background printer detection - psp::PrinterInfoManager::get(); - return; - } - - if( nActiveJobs < 1 ) - doUpdate(); - else if( ! pPrinterUpdateTimer ) - { - pPrinterUpdateTimer = new Timer(); - pPrinterUpdateTimer->SetTimeout( 500 ); - pPrinterUpdateTimer->SetTimeoutHdl( STATIC_LINK( NULL, vcl_sal::PrinterUpdate, UpdateTimerHdl ) ); - pPrinterUpdateTimer->Start(); - } -} - -// ----------------------------------------------------------------------- - -void vcl_sal::PrinterUpdate::jobEnded() -{ - nActiveJobs--; - if( nActiveJobs < 1 ) - { - if( pPrinterUpdateTimer ) - { - pPrinterUpdateTimer->Stop(); - delete pPrinterUpdateTimer; - pPrinterUpdateTimer = NULL; - doUpdate(); - } - } -} diff --git a/vcl/unx/source/gdi/salvd.cxx b/vcl/unx/source/gdi/salvd.cxx deleted file mode 100644 index f242fffae715..000000000000 --- a/vcl/unx/source/gdi/salvd.cxx +++ /dev/null @@ -1,272 +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_vcl.hxx" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -// -=-= SalInstance =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -SalVirtualDevice* X11SalInstance::CreateVirtualDevice( SalGraphics* pGraphics, - long nDX, long nDY, - USHORT nBitCount, const SystemGraphicsData *pData ) -{ - X11SalVirtualDevice *pVDev = new X11SalVirtualDevice(); - if( !nBitCount && pGraphics ) - nBitCount = pGraphics->GetBitCount(); - - if( pData && pData->hDrawable != None ) - { - XLIB_Window aRoot; - int x, y; - unsigned int w = 0, h = 0, bw, d; - Display* pDisp = GetX11SalData()->GetDisplay()->GetDisplay(); - XGetGeometry( pDisp, pData->hDrawable, - &aRoot, &x, &y, &w, &h, &bw, &d ); - int nScreen = 0; - while( nScreen < ScreenCount( pDisp ) ) - { - if( RootWindow( pDisp, nScreen ) == aRoot ) - break; - nScreen++; - } - nDX = (long)w; - nDY = (long)h; - if( !pVDev->Init( GetX11SalData()->GetDisplay(), nDX, nDY, nBitCount, nScreen, pData->hDrawable, pData->pRenderFormat ) ) - { - delete pVDev; - return NULL; - } - } - else if( !pVDev->Init( GetX11SalData()->GetDisplay(), nDX, nDY, nBitCount, - pGraphics ? static_cast(pGraphics)->GetScreenNumber() : - GetX11SalData()->GetDisplay()->GetDefaultScreenNumber() ) ) - { - delete pVDev; - return NULL; - } - - pVDev->InitGraphics( pVDev ); - return pVDev; -} - -void X11SalInstance::DestroyVirtualDevice( SalVirtualDevice* pDevice ) -{ - delete pDevice; -} - -// -=-= SalGraphicsData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::Init( X11SalVirtualDevice *pDevice, SalColormap* pColormap, bool bDeleteColormap ) -{ - SalColormap *pOrigDeleteColormap = m_pDeleteColormap; - - SalDisplay *pDisplay = pDevice->GetDisplay(); - m_nScreen = pDevice->GetScreenNumber(); - - int nVisualDepth = pDisplay->GetColormap( m_nScreen ).GetVisual().GetDepth(); - int nDeviceDepth = pDevice->GetDepth(); - - if( pColormap ) - { - m_pColormap = pColormap; - if( bDeleteColormap ) - m_pDeleteColormap = pColormap; - } - else - if( nDeviceDepth == nVisualDepth ) - m_pColormap = &pDisplay->GetColormap( m_nScreen ); - else - if( nDeviceDepth == 1 ) - m_pColormap = m_pDeleteColormap = new SalColormap(); - - if (m_pDeleteColormap != pOrigDeleteColormap) - delete pOrigDeleteColormap; - - const Drawable aVdevDrawable = pDevice->GetDrawable(); - SetDrawable( aVdevDrawable, m_nScreen ); - - m_pVDev = pDevice; - m_pFrame = NULL; - - bWindow_ = pDisplay->IsDisplay(); - bVirDev_ = TRUE; -} - -// -=-= SalVirDevData / SalVirtualDevice -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -BOOL X11SalVirtualDevice::Init( SalDisplay *pDisplay, - long nDX, long nDY, - USHORT nBitCount, - int nScreen, - Pixmap hDrawable, - void* pRenderFormatVoid ) -{ - SalColormap* pColormap = NULL; - bool bDeleteColormap = false; - - pDisplay_ = pDisplay; - pGraphics_ = new X11SalGraphics(); - m_nScreen = nScreen; - if( pRenderFormatVoid ) { - XRenderPictFormat *pRenderFormat = ( XRenderPictFormat* )pRenderFormatVoid; - pGraphics_->SetXRenderFormat( pRenderFormat ); - if( pRenderFormat->colormap ) - pColormap = new SalColormap( pDisplay, pRenderFormat->colormap, m_nScreen ); - else - pColormap = new SalColormap( nBitCount ); - bDeleteColormap = true; - } - else if( nBitCount != pDisplay->GetVisual( m_nScreen ).GetDepth() ) - { - pColormap = new SalColormap( nBitCount ); - bDeleteColormap = true; - } - pGraphics_->SetLayout( 0 ); // by default no! mirroring for VirtualDevices, can be enabled with EnableRTL() - nDX_ = nDX; - nDY_ = nDY; - nDepth_ = nBitCount; - - if( hDrawable == None ) - hDrawable_ = XCreatePixmap( GetXDisplay(), - pDisplay_->GetDrawable( m_nScreen ), - nDX_, nDY_, - GetDepth() ); - else - { - hDrawable_ = hDrawable; - bExternPixmap_ = TRUE; - } - - pGraphics_->Init( this, pColormap, bDeleteColormap ); - - return hDrawable_ != None ? TRUE : FALSE; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -X11SalVirtualDevice::X11SalVirtualDevice() -{ - pDisplay_ = (SalDisplay*)ILLEGAL_POINTER; - pGraphics_ = NULL; - hDrawable_ = None; - nDX_ = 0; - nDY_ = 0; - nDepth_ = 0; - bGraphics_ = FALSE; - bExternPixmap_ = FALSE; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -X11SalVirtualDevice::~X11SalVirtualDevice() -{ - if( pGraphics_ ) - delete pGraphics_; - pGraphics_ = NULL; - - if( GetDrawable() && !bExternPixmap_ ) - XFreePixmap( GetXDisplay(), GetDrawable() ); -} - -SalGraphics* X11SalVirtualDevice::GetGraphics() -{ - if( bGraphics_ ) - return NULL; - - if( pGraphics_ ) - bGraphics_ = TRUE; - - return pGraphics_; -} - -void X11SalVirtualDevice::ReleaseGraphics( SalGraphics* ) -{ bGraphics_ = FALSE; } - -BOOL X11SalVirtualDevice::SetSize( long nDX, long nDY ) -{ - if( bExternPixmap_ ) - return FALSE; - - // #144688# - // the X protocol request CreatePixmap puts an upper bound - // of 16 bit to the size. Beyond that there may be implementation - // limits of the Xserver; which we should catch by a failed XCreatePixmap - // call. However extra large values should be caught here since we'd run into - // 16 bit truncation here without noticing. - if( nDX < 0 || nDX > 65535 || - nDY < 0 || nDY > 65535 ) - return FALSE; - - if( !nDX ) nDX = 1; - if( !nDY ) nDY = 1; - - Pixmap h = XCreatePixmap( GetXDisplay(), - pDisplay_->GetDrawable( m_nScreen ), - nDX, nDY, nDepth_ ); - - if( !h ) - { - if( !GetDrawable() ) - { - hDrawable_ = XCreatePixmap( GetXDisplay(), - pDisplay_->GetDrawable( m_nScreen ), - 1, 1, nDepth_ ); - nDX_ = 1; - nDY_ = 1; - } - return FALSE; - } - - if( GetDrawable() ) - XFreePixmap( GetXDisplay(), GetDrawable() ); - hDrawable_ = h; - - nDX_ = nDX; - nDY_ = nDY; - - if( pGraphics_ ) - InitGraphics( this ); - - return TRUE; -} - -void X11SalVirtualDevice::GetSize( long& rWidth, long& rHeight ) -{ - rWidth = GetWidth(); - rHeight = GetHeight(); -} - diff --git a/vcl/unx/source/gdi/xrender_peer.cxx b/vcl/unx/source/gdi/xrender_peer.cxx deleted file mode 100644 index 8d24e4098df4..000000000000 --- a/vcl/unx/source/gdi/xrender_peer.cxx +++ /dev/null @@ -1,246 +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_vcl.hxx" - -#include -#include -#include -//#include -using namespace rtl; - -#include - -#include -#include -#include - -// --------------------------------------------------------------------------- - -XRenderPeer::XRenderPeer() -: mpDisplay( GetX11SalData()->GetDisplay()->GetDisplay() ), - mpStandardFormatA8( NULL ), - mnRenderVersion( 0 ), - mpRenderLib( NULL ) -#ifndef XRENDER_LINK -, mpXRenderCompositeTrapezoids( NULL ) -, mpXRenderAddTraps( NULL ) -#endif // XRENDER_LINK -{ - InitRenderLib(); -} - -// --------------------------------------------------------------------------- - -XRenderPeer::~XRenderPeer() -{ - osl_unloadModule( mpRenderLib ); -} - -// --------------------------------------------------------------------------- - -XRenderPeer& XRenderPeer::GetInstance() -{ - static XRenderPeer aPeer; - return aPeer; -} - -// --------------------------------------------------------------------------- - -void XRenderPeer::InitRenderLib() -{ - int nDummy; - if( !XQueryExtension( mpDisplay, "RENDER", &nDummy, &nDummy, &nDummy ) ) - return; - -#ifndef XRENDER_LINK - // we don't know if we are running on a system with xrender library - // we don't want to install system libraries ourselves - // => load them dynamically when they are there - const OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libXrender.so.1" )); - mpRenderLib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_DEFAULT ); - if( !mpRenderLib ) { -#ifdef DEBUG - fprintf( stderr, "Display can do XRender, but no %s installed.\n" - "Please install for improved display performance\n", OUStringToOString( aLibName.getStr(), - osl_getThreadTextEncoding() ).getStr() ); -#endif - return; - } - - oslGenericFunction pFunc; - pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderQueryExtension" ); - if( !pFunc ) return; - mpXRenderQueryExtension = (Bool(*)(Display*,int*,int*))pFunc; - - pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderQueryVersion" ); - if( !pFunc ) return; - mpXRenderQueryVersion = (void(*)(Display*,int*,int*))pFunc; - - pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderFindVisualFormat" ); - if( !pFunc ) return; - mpXRenderFindVisualFormat = (XRenderPictFormat*(*)(Display*,Visual*))pFunc; - - pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderFindStandardFormat" ); - if( !pFunc ) return; - mpXRenderFindStandardFormat = (XRenderPictFormat*(*)(Display*,int))pFunc; - - pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderFindFormat" ); - if( !pFunc ) return; - mpXRenderFindFormat = (XRenderPictFormat*(*)(Display*,unsigned long, - const XRenderPictFormat*,int))pFunc; - - pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderCreateGlyphSet" ); - if( !pFunc ) return; - mpXRenderCreateGlyphSet = (GlyphSet(*)(Display*,const XRenderPictFormat*))pFunc; - - pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderFreeGlyphSet" ); - if( !pFunc ) return; - mpXRenderFreeGlyphSet = (void(*)(Display*,GlyphSet))pFunc; - - pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderAddGlyphs" ); - if( !pFunc ) return; - mpXRenderAddGlyphs = (void(*)(Display*,GlyphSet,Glyph*,const XGlyphInfo*, - int,const char*,int))pFunc; - - pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderFreeGlyphs" ); - if( !pFunc ) return; - mpXRenderFreeGlyphs = (void(*)(Display*,GlyphSet,Glyph*,int))pFunc; - - pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderCompositeString32" ); - if( !pFunc ) return; - mpXRenderCompositeString32 = (void(*)(Display*,int,Picture,Picture, - const XRenderPictFormat*,GlyphSet,int,int,int,int,const unsigned*,int))pFunc; - - pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderCreatePicture" ); - if( !pFunc ) return; - mpXRenderCreatePicture = (Picture(*)(Display*,Drawable,const XRenderPictFormat*, - unsigned long,const XRenderPictureAttributes*))pFunc; - - pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderChangePicture" ); - if( !pFunc ) return; - mpXRenderChangePicture = (void(*)(Display*,Picture,unsigned long,const XRenderPictureAttributes*))pFunc; - - pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderSetPictureClipRegion" ); - if( !pFunc ) return; - mpXRenderSetPictureClipRegion = (void(*)(Display*,Picture,XLIB_Region))pFunc; - - pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderFreePicture" ); - if( !pFunc ) return; - mpXRenderFreePicture = (void(*)(Display*,Picture))pFunc; - - pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderComposite" ); - if( !pFunc ) return; - mpXRenderComposite = (void(*)(Display*,int,Picture,Picture,Picture, - int,int,int,int,int,int,unsigned,unsigned))pFunc; - - pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderFillRectangle" ); - if( !pFunc ) return; - mpXRenderFillRectangle = (void(*)(Display*,int,Picture,const XRenderColor*, - int,int,unsigned int,unsigned int))pFunc; - - pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderCompositeTrapezoids" ); -#if 0 // not having trapezoid support is supported - if( !pFunc ) return; -#endif - mpXRenderCompositeTrapezoids = (void(*)(Display*,int,Picture,Picture, - const XRenderPictFormat*,int,int,const XTrapezoid*,int))pFunc; - - pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderAddTraps" ); -#if 0 // not having trapezoid support is supported - if( !pFunc ) return; -#endif - mpXRenderAddTraps = (void(*)(Display*,Picture,int,int,const _XTrap*,int))pFunc; - -#endif // XRENDER_LINK - - // needed to initialize libXrender internals, we already know its there -#ifdef XRENDER_LINK - XRenderQueryExtension( mpDisplay, &nDummy, &nDummy ); -#else - (*mpXRenderQueryExtension)( mpDisplay, &nDummy, &nDummy ); -#endif - - int nMajor, nMinor; -#ifdef XRENDER_LINK - XRenderQueryVersion( mpDisplay, &nMajor, &nMinor ); -#else - (*mpXRenderQueryVersion)( mpDisplay, &nMajor, &nMinor ); -#endif - mnRenderVersion = 16*nMajor + nMinor; - - // the 8bit alpha mask format must be there - XRenderPictFormat aPictFormat={0,0,8,{0,0,0,0,0,0,0,0xFF},0}; - mpStandardFormatA8 = FindPictureFormat( PictFormatAlphaMask|PictFormatDepth, aPictFormat ); -} - -// --------------------------------------------------------------------------- - -// return mask of screens capable of XRENDER text -sal_uInt32 XRenderPeer::InitRenderText() -{ - if( mnRenderVersion < 0x01 ) - return 0; - - // #93033# disable XRENDER for old RENDER versions if XINERAMA is present - int nDummy; - if( XQueryExtension( mpDisplay, "XINERAMA", &nDummy, &nDummy, &nDummy ) ) - if( mnRenderVersion < 0x02 ) - return 0; - - if( !mpStandardFormatA8 ) - return 0; - - // and the visual must be supported too on at least one screen - sal_uInt32 nRetMask = 0; - SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); - const int nScreenCount = pSalDisp->GetScreenCount(); - XRenderPictFormat* pVisualFormat = NULL; - int nMaxDepth = 0; - for( int nScreen = 0; nScreen < nScreenCount; ++nScreen ) - { - Visual* pXVisual = pSalDisp->GetVisual( nScreen ).GetVisual(); - pVisualFormat = FindVisualFormat( pXVisual ); - if( pVisualFormat != NULL ) - { - int nVDepth = pSalDisp->GetVisual( nScreen ).GetDepth(); - if( nVDepth > nMaxDepth ) - nMaxDepth = nVDepth; - nRetMask |= 1U << nScreen; - } - } - - // #97763# disable XRENDER on <15bit displays for XFree<=4.2.0 - if( mnRenderVersion <= 0x02 ) - if( nMaxDepth < 15 ) - nRetMask = 0; - - return nRetMask; -} - -// --------------------------------------------------------------------------- diff --git a/vcl/unx/source/gdi/xrender_peer.hxx b/vcl/unx/source/gdi/xrender_peer.hxx deleted file mode 100644 index 89dccfcef40b..000000000000 --- a/vcl/unx/source/gdi/xrender_peer.hxx +++ /dev/null @@ -1,387 +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 _SV_XRENDER_PEER_HXX -#define _SV_XRENDER_PEER_HXX - -#include -struct _XTrap; // on some older systems this is not declared within Xrender.h -#include -#include - -#include -#include - -class XRenderPeer -{ -public: - static XRenderPeer& GetInstance(); - int GetVersion() const; - - sal_uInt32 InitRenderText(); - -protected: - XRenderPeer(); - ~XRenderPeer(); - void InitRenderLib(); - - Display* mpDisplay; - XRenderPictFormat* mpStandardFormatA8; - int mnRenderVersion; - oslModule mpRenderLib; - -public: - XRenderPictFormat* GetStandardFormatA8() const; - XRenderPictFormat* FindStandardFormat(int nFormat) const; - - // the methods below are thin wrappers for the XRENDER API - XRenderPictFormat* FindVisualFormat( Visual* ) const; - XRenderPictFormat* FindPictureFormat( unsigned long nMask, - const XRenderPictFormat& ) const; - Picture CreatePicture( Drawable, const XRenderPictFormat*, - unsigned long nDrawable, const XRenderPictureAttributes* ) const; - void ChangePicture( Picture, unsigned long nValueMask, - const XRenderPictureAttributes* ) const; - void SetPictureClipRegion( Picture, XLIB_Region ) const; - void CompositePicture( int nOp, Picture aSrc, Picture aMask, Picture aDst, - int nXSrc, int nYSrc, int nXMask, int nYMask, - int nXDst, int nYDst, unsigned nWidth, unsigned nHeight ) const; - void FreePicture( Picture ) const; - - GlyphSet CreateGlyphSet() const; - void FreeGlyphSet( GlyphSet ) const; - void AddGlyph( GlyphSet, Glyph nGlyphId, const XGlyphInfo&, - const char* pBuffer, int nBufSize ) const; - void FreeGlyph( GlyphSet, Glyph nGlyphId ) const; - void CompositeString32( Picture aSrc, Picture aDst, GlyphSet, - int nDstX, int nDstY, const unsigned* pText, int nTextLen ) const; - void FillRectangle( int nOp, Picture aDst, const XRenderColor*, - int nX, int nY, unsigned nW, unsigned nH ) const; - void CompositeTrapezoids( int nOp, Picture aSrc, Picture aDst, - const XRenderPictFormat*, int nXSrc, int nYSrc, - const XTrapezoid*, int nCount ) const; - bool AddTraps( Picture aDst, int nXOfs, int nYOfs, - const _XTrap*, int nCount ) const; - - bool AreTrapezoidsSupported() const -#ifdef XRENDER_LINK - { return true; } -#else - { return mpXRenderCompositeTrapezoids!=NULL; } - -private: - XRenderPictFormat* (*mpXRenderFindFormat)(Display*,unsigned long, - const XRenderPictFormat*,int); - XRenderPictFormat* (*mpXRenderFindVisualFormat)(Display*,Visual*); - XRenderPictFormat* (*mpXRenderFindStandardFormat)(Display*,int); - Bool (*mpXRenderQueryExtension)(Display*,int*,int*); - void (*mpXRenderQueryVersion)(Display*,int*,int*); - - Picture (*mpXRenderCreatePicture)(Display*,Drawable, const XRenderPictFormat*, - unsigned long,const XRenderPictureAttributes*); - void (*mpXRenderChangePicture)(Display*,Picture, - unsigned long,const XRenderPictureAttributes*); - void (*mpXRenderSetPictureClipRegion)(Display*,Picture,XLIB_Region); - void (*mpXRenderFreePicture)(Display*,Picture); - void (*mpXRenderComposite)(Display*,int,Picture,Picture,Picture, - int,int,int,int,int,int,unsigned,unsigned); - - GlyphSet (*mpXRenderCreateGlyphSet)(Display*, const XRenderPictFormat*); - void (*mpXRenderFreeGlyphSet)(Display*,GlyphSet); - void (*mpXRenderAddGlyphs)(Display*,GlyphSet,Glyph*, - const XGlyphInfo*,int,const char*,int); - void (*mpXRenderFreeGlyphs)(Display*,GlyphSet,Glyph*,int); - void (*mpXRenderCompositeString32)(Display*,int,Picture,Picture, - const XRenderPictFormat*,GlyphSet,int,int,int,int,const unsigned*,int); - void (*mpXRenderFillRectangle)(Display*,int,Picture, - const XRenderColor*,int,int,unsigned int,unsigned int); - void (*mpXRenderCompositeTrapezoids)(Display*,int,Picture,Picture, - const XRenderPictFormat*,int,int,const XTrapezoid*,int); - void (*mpXRenderAddTraps)(Display*,Picture,int,int,const _XTrap*,int); -#endif // XRENDER_LINK -}; - -//===================================================================== - -class ScopedPic -{ -public: - ScopedPic( XRenderPeer& rPeer, Picture& rPic ); - ~ScopedPic(); - Picture& Get(); - -private: - XRenderPeer& mrRenderPeer; - Picture maPicture; - -private: // prevent copy and assignmet - ScopedPic( const ScopedPic& ); - void operator=( const ScopedPic& ); -}; - -//===================================================================== - -inline int XRenderPeer::GetVersion() const -{ - return mnRenderVersion; -} - -inline XRenderPictFormat* XRenderPeer::GetStandardFormatA8() const -{ - return mpStandardFormatA8; -} - -inline XRenderPictFormat* XRenderPeer::FindStandardFormat(int nFormat) const -{ -#ifdef XRENDER_LINK - return XRenderFindStandardFormat(mpDisplay, nFormat); -#else - return (*mpXRenderFindStandardFormat)(mpDisplay, nFormat); -#endif -} - -inline XRenderPictFormat* XRenderPeer::FindVisualFormat( Visual* pVisual ) const -{ -#ifdef XRENDER_LINK - return XRenderFindVisualFormat ( mpDisplay, pVisual ); -#else - return (*mpXRenderFindVisualFormat)( mpDisplay, pVisual ); -#endif -} - -inline XRenderPictFormat* XRenderPeer::FindPictureFormat( unsigned long nFormatMask, - const XRenderPictFormat& rFormatAttr ) const -{ -#ifdef XRENDER_LINK - return XRenderFindFormat( mpDisplay, nFormatMask, &rFormatAttr, 0 ); -#else - return (*mpXRenderFindFormat)( mpDisplay, nFormatMask, &rFormatAttr, 0 ); -#endif -} - -inline Picture XRenderPeer::CreatePicture( Drawable aDrawable, - const XRenderPictFormat* pVisFormat, unsigned long nValueMask, - const XRenderPictureAttributes* pRenderAttr ) const -{ -#ifdef XRENDER_LINK - return XRenderCreatePicture( mpDisplay, aDrawable, pVisFormat, - nValueMask, pRenderAttr ); -#else - return (*mpXRenderCreatePicture)( mpDisplay, aDrawable, pVisFormat, - nValueMask, pRenderAttr ); -#endif -} - -inline void XRenderPeer::ChangePicture( Picture aPicture, - unsigned long nValueMask, const XRenderPictureAttributes* pRenderAttr ) const -{ -#ifdef XRENDER_LINK - XRenderChangePicture( mpDisplay, aPicture, nValueMask, pRenderAttr ); -#else - (*mpXRenderChangePicture)( mpDisplay, aPicture, nValueMask, pRenderAttr ); -#endif -} - -inline void XRenderPeer::SetPictureClipRegion( Picture aPicture, - XLIB_Region aXlibRegion ) const -{ -#ifdef XRENDER_LINK - XRenderSetPictureClipRegion( mpDisplay, aPicture, aXlibRegion ); -#else - (*mpXRenderSetPictureClipRegion)( mpDisplay, aPicture, aXlibRegion ); -#endif -} - -inline void XRenderPeer::CompositePicture( int nXRenderOp, - Picture aSrcPic, Picture aMaskPic, Picture aDstPic, - int nSrcX, int nSrcY, int nMaskX, int nMaskY, int nDstX, int nDstY, - unsigned nWidth, unsigned nHeight ) const -{ -#ifdef XRENDER_LINK - XRenderComposite( mpDisplay, nXRenderOp, aSrcPic, aMaskPic, aDstPic, - nSrcX, nSrcY, nMaskX, nMaskY, nDstX, nDstY, nWidth, nHeight ); -#else - (*mpXRenderComposite)( mpDisplay, nXRenderOp, aSrcPic, aMaskPic, aDstPic, - nSrcX, nSrcY, nMaskX, nMaskY, nDstX, nDstY, nWidth, nHeight ); -#endif -} - -inline void XRenderPeer::FreePicture( Picture aPicture ) const -{ -#ifdef XRENDER_LINK - XRenderFreePicture( mpDisplay, aPicture ); -#else - (*mpXRenderFreePicture)( mpDisplay, aPicture ); -#endif -} - -inline GlyphSet XRenderPeer::CreateGlyphSet() const -{ -#ifdef XRENDER_LINK - return XRenderCreateGlyphSet( mpDisplay, mpStandardFormatA8 ); -#else - return (*mpXRenderCreateGlyphSet)( mpDisplay, mpStandardFormatA8 ); -#endif -} - -inline void XRenderPeer::FreeGlyphSet( GlyphSet aGS ) const -{ -#ifdef XRENDER_LINK - XRenderFreeGlyphSet( mpDisplay, aGS ); -#else - (*mpXRenderFreeGlyphSet)( mpDisplay, aGS ); -#endif -} - -inline void XRenderPeer::AddGlyph( GlyphSet aGS, Glyph nGlyphId, - const XGlyphInfo& rGI, const char* pBuffer, int nBufSize ) const -{ -#ifdef XRENDER_LINK - XRenderAddGlyphs( mpDisplay, aGS, &nGlyphId, &rGI, 1, - const_cast(pBuffer), nBufSize ); -#else - (*mpXRenderAddGlyphs)( mpDisplay, aGS, &nGlyphId, &rGI, 1, - const_cast(pBuffer), nBufSize ); -#endif -} - -inline void XRenderPeer::FreeGlyph( GlyphSet aGS, Glyph nGlyphId ) const -{ - (void)aGS; (void)nGlyphId; - - // XRenderFreeGlyphs not implemented yet for version<=0.2 - // #108209# disabled because of crash potential, - // the glyph leak is not too bad because they will - // be cleaned up when the glyphset is released -#if 0 // TODO: reenable when it works without problems - if( mnRenderVersion >= 0x05 ) - { -#ifdef XRENDER_LINK - XRenderFreeGlyphs( mpDisplay, aGS, &nGlyphId, 1 ); -#else - (*mpXRenderFreeGlyphs)( mpDisplay, aGS, &nGlyphId, 1 ); -#endif - } -#endif -} - -inline void XRenderPeer::CompositeString32( Picture aSrc, Picture aDst, - GlyphSet aGlyphSet, int nDstX, int nDstY, - const unsigned* pText, int nTextLen ) const -{ -#ifdef XRENDER_LINK - XRenderCompositeString32( mpDisplay, PictOpOver, aSrc, aDst, NULL, - aGlyphSet, 0, 0, nDstX, nDstY, pText, nTextLen ); -#else - (*mpXRenderCompositeString32)( mpDisplay, PictOpOver, aSrc, aDst, NULL, - aGlyphSet, 0, 0, nDstX, nDstY, pText, nTextLen ); -#endif -} - -inline void XRenderPeer::FillRectangle( int a, Picture b, const XRenderColor* c, - int d, int e, unsigned int f, unsigned int g) const -{ -#ifdef XRENDER_LINK - XRenderFillRectangle( mpDisplay, a, b, c, d, e, f, g ); -#else - (*mpXRenderFillRectangle)( mpDisplay, a, b, c, d, e, f, g ); -#endif -} - - -inline void XRenderPeer::CompositeTrapezoids( int nOp, - Picture aSrc, Picture aDst, const XRenderPictFormat* pXRPF, - int nXSrc, int nYSrc, const XTrapezoid* pXT, int nCount ) const -{ -#ifdef XRENDER_LINK - XRenderCompositeTrapezoids( mpDisplay, nOp, aSrc, aDst, pXRPF, - nXSrc, nYSrc, pXT, nCount ); -#else - (*mpXRenderCompositeTrapezoids)( mpDisplay, nOp, aSrc, aDst, pXRPF, - nXSrc, nYSrc, pXT, nCount ); -#endif -} - -inline bool XRenderPeer::AddTraps( Picture aDst, int nXOfs, int nYOfs, - const _XTrap* pTraps, int nCount ) const -{ -#ifdef XRENDER_LINK - XRenderAddTraps( mpDisplay, aDst, nXOfs, nYOfs, pTraps, nCount ); -#else - if( !mpXRenderAddTraps ) - return false; - (*mpXRenderAddTraps)( mpDisplay, aDst, nXOfs, nYOfs, pTraps, nCount ); -#endif - return true; -} - -//===================================================================== - -inline ScopedPic::ScopedPic( XRenderPeer& rPeer, Picture& rPic ) -: mrRenderPeer( rPeer) -, maPicture( rPic ) -{} - -inline ScopedPic::~ScopedPic() -{ - if( maPicture ) - mrRenderPeer.FreePicture( maPicture ); -} - -inline Picture& ScopedPic::Get() -{ - return maPicture; -} - -//===================================================================== - -inline XRenderColor GetXRenderColor( const SalColor& rSalColor, double fTransparency = 0.0 ) -{ - XRenderColor aRetVal; - // convert the SalColor - aRetVal.red = SALCOLOR_RED( rSalColor ); aRetVal.red |= (aRetVal.red << 8); - aRetVal.green = SALCOLOR_GREEN( rSalColor ); aRetVal.green |= (aRetVal.green << 8); - aRetVal.blue = SALCOLOR_BLUE( rSalColor ); aRetVal.blue |= (aRetVal.blue << 8); - - // handle transparency - aRetVal.alpha = 0xFFFF; // default to opaque - if( fTransparency != 0 ) - { - const double fAlpha = 1.0 - fTransparency; - aRetVal.alpha = static_cast(fAlpha * 0xFFFF + 0.5); - // xrender wants pre-multiplied colors - aRetVal.red = static_cast(fAlpha * aRetVal.red + 0.5); - aRetVal.green = static_cast(fAlpha * aRetVal.green + 0.5); - aRetVal.blue = static_cast(fAlpha * aRetVal.blue + 0.5); - } - - return aRetVal; -} - -//===================================================================== - -#endif // _SV_XRENDER_PEER_HXX diff --git a/vcl/unx/source/inc/airbrush_curs.h b/vcl/unx/source/inc/airbrush_curs.h deleted file mode 100644 index 293c9757e77b..000000000000 --- a/vcl/unx/source/inc/airbrush_curs.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define airbrush_curs_width 32 -#define airbrush_curs_height 32 -#define airbrush_curs_x_hot 5 -#define airbrush_curs_y_hot 22 -static char airbrush_curs_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x78,0x00,0x00,0x00, - 0x7c,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x1f,0x00,0x00,0x98,0x0f,0x00,0x00, - 0xcc,0x07,0x00,0x00,0xb4,0x03,0x00,0x00,0x10,0x01,0x00,0x00,0x88,0x00,0x00, - 0x00,0x44,0x00,0x00,0x00,0x62,0x60,0x00,0x00,0x91,0x10,0x00,0x80,0x88,0x10, - 0x00,0x40,0x04,0x09,0x00,0x40,0x02,0x06,0x00,0xa0,0x01,0x00,0x00,0x60,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/airbrush_mask.h b/vcl/unx/source/inc/airbrush_mask.h deleted file mode 100644 index 811ea2819669..000000000000 --- a/vcl/unx/source/inc/airbrush_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define airbrush_mask_width 32 -#define airbrush_mask_height 32 -#define airbrush_mask_x_hot 5 -#define airbrush_mask_y_hot 22 -static char airbrush_mask_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x78,0x00,0x00,0x00, - 0x7c,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x1f,0x00,0x00,0x98,0x0f,0x00,0x00, - 0xcc,0x07,0x00,0x00,0xf4,0x03,0x00,0x00,0xf0,0x01,0x00,0x00,0xf8,0x00,0x00, - 0x00,0x7c,0x00,0x00,0x00,0x7e,0x60,0x00,0x00,0x9f,0x10,0x00,0x80,0x8f,0x10, - 0x00,0xc0,0x07,0x09,0x00,0xc0,0x03,0x06,0x00,0xe0,0x01,0x00,0x00,0x60,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/ase_curs.h b/vcl/unx/source/inc/ase_curs.h deleted file mode 100644 index 52b67f56d2ae..000000000000 --- a/vcl/unx/source/inc/ase_curs.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define ase_curs_width 32 -#define ase_curs_height 32 -#define ase_curs_x_hot 19 -#define ase_curs_y_hot 16 -static char ase_curs_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x1c,0x0e, - 0x00,0x00,0x3e,0x1e,0x00,0x00,0x3e,0x7e,0x00,0x00,0x3e,0x1e,0x00,0x00,0x1c, - 0x0e,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/ase_mask.h b/vcl/unx/source/inc/ase_mask.h deleted file mode 100644 index 5dbd5c134dbf..000000000000 --- a/vcl/unx/source/inc/ase_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define ase_mask_width 32 -#define ase_mask_height 32 -#define ase_mask_x_hot 19 -#define ase_mask_y_hot 16 -static char ase_mask_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x9c,0x0f,0x00,0x00,0x3e,0x1f, - 0x00,0x00,0x7f,0x7f,0x00,0x00,0x7f,0xff,0x00,0x00,0x7f,0x7f,0x00,0x00,0x3e, - 0x1f,0x00,0x00,0x9c,0x0f,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/asn_curs.h b/vcl/unx/source/inc/asn_curs.h deleted file mode 100644 index 3b5f4364b5e2..000000000000 --- a/vcl/unx/source/inc/asn_curs.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define asn_curs_width 32 -#define asn_curs_height 32 -#define asn_curs_x_hot 16 -#define asn_curs_y_hot 12 -static char asn_curs_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x80,0x03, - 0x00,0x00,0xc0,0x07,0x00,0x00,0xc0,0x07,0x00,0x00,0xe0,0x0f,0x00,0x00,0x20, - 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x03,0x00,0x00, - 0xc0,0x07,0x00,0x00,0xc0,0x07,0x00,0x00,0xc0,0x07,0x00,0x00,0x80,0x03,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/asn_mask.h b/vcl/unx/source/inc/asn_mask.h deleted file mode 100644 index 902fe80df8a1..000000000000 --- a/vcl/unx/source/inc/asn_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define asn_mask_width 32 -#define asn_mask_height 32 -#define asn_mask_x_hot 16 -#define asn_mask_y_hot 12 -static char asn_mask_bits[] = { - 0x00,0x00,0x01,0x00,0x00,0x80,0x03,0x00,0x00,0x80,0x03,0x00,0x00,0xc0,0x07, - 0x00,0x00,0xe0,0x0f,0x00,0x00,0xe0,0x0f,0x00,0x00,0xf0,0x1f,0x00,0x00,0xf0, - 0x1f,0x00,0x00,0x20,0x08,0x00,0x00,0x80,0x03,0x00,0x00,0xc0,0x07,0x00,0x00, - 0xe0,0x0f,0x00,0x00,0xe0,0x0f,0x00,0x00,0xe0,0x0f,0x00,0x00,0xc0,0x07,0x00, - 0x00,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/asne_curs.h b/vcl/unx/source/inc/asne_curs.h deleted file mode 100644 index 0939b1d07e4b..000000000000 --- a/vcl/unx/source/inc/asne_curs.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define asne_curs_width 32 -#define asne_curs_height 32 -#define asne_curs_x_hot 21 -#define asne_curs_y_hot 10 -static char asne_curs_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x80, - 0x3f,0x00,0x00,0xc0,0x3f,0x00,0x00,0x00,0x3f,0x00,0x00,0x00,0x1c,0x00,0x00, - 0x00,0x1c,0x00,0x00,0x70,0x18,0x00,0x00,0xf8,0x08,0x00,0x00,0xf8,0x00,0x00, - 0x00,0xf8,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/asne_mask.h b/vcl/unx/source/inc/asne_mask.h deleted file mode 100644 index 9ab55c293218..000000000000 --- a/vcl/unx/source/inc/asne_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define asne_mask_width 32 -#define asne_mask_height 32 -#define asne_mask_x_hot 21 -#define asne_mask_y_hot 10 -static char asne_mask_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x80,0x7f,0x00,0x00,0xc0, - 0x7f,0x00,0x00,0xe0,0x7f,0x00,0x00,0xc0,0x7f,0x00,0x00,0x00,0x3f,0x00,0x00, - 0x70,0x3e,0x00,0x00,0xf8,0x3c,0x00,0x00,0xfc,0x1d,0x00,0x00,0xfc,0x09,0x00, - 0x00,0xfc,0x01,0x00,0x00,0xf8,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/asns_curs.h b/vcl/unx/source/inc/asns_curs.h deleted file mode 100644 index fef8fe2f4ab5..000000000000 --- a/vcl/unx/source/inc/asns_curs.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define asns_curs_width 32 -#define asns_curs_height 32 -#define asns_curs_x_hot 15 -#define asns_curs_y_hot 15 -static char asns_curs_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0, - 0x03,0x00,0x00,0xe0,0x03,0x00,0x00,0xf0,0x07,0x00,0x00,0x10,0x04,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0,0x03,0x00, - 0x00,0xe0,0x03,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x04,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0, - 0x03,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00,0x80,0x00,0x00,0x00, - 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/asns_mask.h b/vcl/unx/source/inc/asns_mask.h deleted file mode 100644 index f90cb95ee721..000000000000 --- a/vcl/unx/source/inc/asns_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define asns_mask_width 32 -#define asns_mask_height 32 -#define asns_mask_x_hot 15 -#define asns_mask_y_hot 15 -static char asns_mask_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00, - 0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0,0x03,0x00,0x00,0xf0, - 0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf8,0x0f,0x00,0x00, - 0x10,0x04,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0,0x03,0x00,0x00,0xf0,0x07,0x00, - 0x00,0xf0,0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01, - 0x00,0x00,0x10,0x04,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf0, - 0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00, - 0xc0,0x01,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/asnswe_curs.h b/vcl/unx/source/inc/asnswe_curs.h deleted file mode 100644 index fd6ddaca65cb..000000000000 --- a/vcl/unx/source/inc/asnswe_curs.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define asnswe_curs_width 32 -#define asnswe_curs_height 32 -#define asnswe_curs_x_hot 15 -#define asnswe_curs_y_hot 15 -static char asnswe_curs_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0, - 0x03,0x00,0x00,0xe0,0x03,0x00,0x00,0xf0,0x07,0x00,0x00,0x10,0x04,0x00,0x00, - 0x00,0x00,0x00,0x00,0x06,0x30,0x00,0x80,0xc3,0xe1,0x00,0xc0,0xe3,0xe3,0x01, - 0xf0,0xe3,0xe3,0x07,0xc0,0xe3,0xe3,0x01,0x80,0xc3,0xe1,0x00,0x00,0x06,0x30, - 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x04,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0, - 0x03,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00,0x80,0x00,0x00,0x00, - 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/asnswe_mask.h b/vcl/unx/source/inc/asnswe_mask.h deleted file mode 100644 index e48da90e3de5..000000000000 --- a/vcl/unx/source/inc/asnswe_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define asnswe_mask_width 32 -#define asnswe_mask_height 32 -#define asnswe_mask_x_hot 15 -#define asnswe_mask_y_hot 15 -static char asnswe_mask_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00, - 0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0,0x03,0x00,0x00,0xf0, - 0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf8,0x0f,0x00,0x00, - 0x16,0x34,0x00,0x80,0xcf,0xf9,0x00,0xc0,0xe7,0xf3,0x01,0xf0,0xf7,0xf7,0x07, - 0xf8,0xf7,0xf7,0x0f,0xf0,0xf7,0xf7,0x07,0xc0,0xe7,0xf3,0x01,0x80,0xcf,0xf9, - 0x00,0x00,0x16,0x34,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf0, - 0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00, - 0xc0,0x01,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/asnw_curs.h b/vcl/unx/source/inc/asnw_curs.h deleted file mode 100644 index cb3a35d793c7..000000000000 --- a/vcl/unx/source/inc/asnw_curs.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define asnw_curs_width 32 -#define asnw_curs_height 32 -#define asnw_curs_x_hot 10 -#define asnw_curs_y_hot 10 -static char asnw_curs_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0xfc,0x01,0x00, - 0x00,0xfc,0x03,0x00,0x00,0xfc,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x38,0x00, - 0x00,0x00,0x18,0x0e,0x00,0x00,0x10,0x1f,0x00,0x00,0x00,0x1f,0x00,0x00,0x00, - 0x1f,0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/asnw_mask.h b/vcl/unx/source/inc/asnw_mask.h deleted file mode 100644 index e583957c4bae..000000000000 --- a/vcl/unx/source/inc/asnw_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define asnw_mask_width 32 -#define asnw_mask_height 32 -#define asnw_mask_x_hot 10 -#define asnw_mask_y_hot 10 -static char asnw_mask_bits[] = { - 0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0xfe,0x01,0x00,0x00,0xfe,0x03,0x00, - 0x00,0xfe,0x07,0x00,0x00,0xfe,0x03,0x00,0x00,0xfc,0x00,0x00,0x00,0x7c,0x0e, - 0x00,0x00,0x3c,0x1f,0x00,0x00,0xb8,0x3f,0x00,0x00,0x90,0x3f,0x00,0x00,0x80, - 0x3f,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/ass_curs.h b/vcl/unx/source/inc/ass_curs.h deleted file mode 100644 index ea942cefe942..000000000000 --- a/vcl/unx/source/inc/ass_curs.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define ass_curs_width 32 -#define ass_curs_height 32 -#define ass_curs_x_hot 15 -#define ass_curs_y_hot 19 -static char ass_curs_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0,0x03, - 0x00,0x00,0xe0,0x03,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x04,0x00,0x00,0xf0,0x07,0x00,0x00, - 0xe0,0x03,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00,0x80,0x00,0x00, - 0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/ass_mask.h b/vcl/unx/source/inc/ass_mask.h deleted file mode 100644 index b35298183cb1..000000000000 --- a/vcl/unx/source/inc/ass_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define ass_mask_width 32 -#define ass_mask_height 32 -#define ass_mask_x_hot 15 -#define ass_mask_y_hot 19 -static char ass_mask_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0,0x03,0x00,0x00,0xf0,0x07, - 0x00,0x00,0xf0,0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0, - 0x01,0x00,0x00,0x10,0x04,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf8,0x0f,0x00,0x00, - 0xf0,0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00, - 0x00,0xc0,0x01,0x00,0x00,0x80,0x00,0x00}; diff --git a/vcl/unx/source/inc/asse_curs.h b/vcl/unx/source/inc/asse_curs.h deleted file mode 100644 index 4b30e81882ff..000000000000 --- a/vcl/unx/source/inc/asse_curs.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define asse_curs_width 32 -#define asse_curs_height 32 -#define asse_curs_x_hot 21 -#define asse_curs_y_hot 21 -static char asse_curs_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0xf8,0x00,0x00,0x00, - 0xf8,0x08,0x00,0x00,0x70,0x18,0x00,0x00,0x00,0x1c,0x00,0x00,0x00,0x1c,0x00, - 0x00,0x00,0x3f,0x00,0x00,0xc0,0x3f,0x00,0x00,0x80,0x3f,0x00,0x00,0x00,0x3c, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/asse_mask.h b/vcl/unx/source/inc/asse_mask.h deleted file mode 100644 index ad74b0cf724a..000000000000 --- a/vcl/unx/source/inc/asse_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define asse_mask_width 32 -#define asse_mask_height 32 -#define asse_mask_x_hot 21 -#define asse_mask_y_hot 21 -static char asse_mask_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70, - 0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0xfc,0x01,0x00,0x00,0xfc,0x09,0x00,0x00, - 0xfc,0x1d,0x00,0x00,0xf8,0x3c,0x00,0x00,0x70,0x3e,0x00,0x00,0x00,0x3f,0x00, - 0x00,0xc0,0x7f,0x00,0x00,0xe0,0x7f,0x00,0x00,0xc0,0x7f,0x00,0x00,0x80,0x7f, - 0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/assw_curs.h b/vcl/unx/source/inc/assw_curs.h deleted file mode 100644 index d26c36e79ed4..000000000000 --- a/vcl/unx/source/inc/assw_curs.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define assw_curs_width 32 -#define assw_curs_height 32 -#define assw_curs_x_hot 21 -#define assw_curs_y_hot 21 -static char assw_curs_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x0e,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x1f,0x00,0x00,0x10,0x1f, - 0x00,0x00,0x18,0x0e,0x00,0x00,0x38,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0xfc, - 0x00,0x00,0x00,0xfc,0x03,0x00,0x00,0xfc,0x01,0x00,0x00,0x3c,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/assw_mask.h b/vcl/unx/source/inc/assw_mask.h deleted file mode 100644 index ea47a3ee27e9..000000000000 --- a/vcl/unx/source/inc/assw_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define assw_mask_width 32 -#define assw_mask_height 32 -#define assw_mask_x_hot 21 -#define assw_mask_y_hot 21 -static char assw_mask_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x0e,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x1f,0x00,0x00,0x10,0x1f, - 0x00,0x00,0x18,0x0e,0x00,0x00,0x38,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0xfc, - 0x00,0x00,0x00,0xfc,0x03,0x00,0x00,0xfc,0x01,0x00,0x00,0x3c,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/asw_curs.h b/vcl/unx/source/inc/asw_curs.h deleted file mode 100644 index 7b9b2199955a..000000000000 --- a/vcl/unx/source/inc/asw_curs.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define asw_curs_width 32 -#define asw_curs_height 32 -#define asw_curs_x_hot 12 -#define asw_curs_y_hot 15 -static char asw_curs_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x70,0x38,0x00,0x00,0x78,0x7c,0x00,0x00, - 0x7e,0x7c,0x00,0x00,0x78,0x7c,0x00,0x00,0x70,0x38,0x00,0x00,0xc0,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/asw_mask.h b/vcl/unx/source/inc/asw_mask.h deleted file mode 100644 index df934399fe91..000000000000 --- a/vcl/unx/source/inc/asw_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define asw_mask_width 32 -#define asw_mask_height 32 -#define asw_mask_x_hot 12 -#define asw_mask_y_hot 15 -static char asw_mask_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, - 0x00,0x00,0x00,0xf0,0x39,0x00,0x00,0xf8,0x7c,0x00,0x00,0xfe,0xfe,0x00,0x00, - 0xff,0xfe,0x00,0x00,0xfe,0xfe,0x00,0x00,0xf8,0x7c,0x00,0x00,0xf0,0x39,0x00, - 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/aswe_curs.h b/vcl/unx/source/inc/aswe_curs.h deleted file mode 100644 index f06d2140559e..000000000000 --- a/vcl/unx/source/inc/aswe_curs.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define aswe_curs_width 32 -#define aswe_curs_height 32 -#define aswe_curs_x_hot 15 -#define aswe_curs_y_hot 15 -static char aswe_curs_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x06,0x30,0x00,0x80,0xc3,0xe1,0x00,0xc0,0xe3,0xe3,0x01, - 0xf0,0xe3,0xe3,0x07,0xc0,0xe3,0xe3,0x01,0x80,0xc3,0xe1,0x00,0x00,0x06,0x30, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/aswe_mask.h b/vcl/unx/source/inc/aswe_mask.h deleted file mode 100644 index c04dbf5deafb..000000000000 --- a/vcl/unx/source/inc/aswe_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define aswe_mask_width 32 -#define aswe_mask_height 32 -#define aswe_mask_x_hot 15 -#define aswe_mask_y_hot 15 -static char aswe_mask_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x06,0x30,0x00,0x80,0xcf,0xf9,0x00,0xc0,0xe7,0xf3,0x01,0xf0,0xf7,0xf7,0x07, - 0xf8,0xf7,0xf7,0x0f,0xf0,0xf7,0xf7,0x07,0xc0,0xe7,0xf3,0x01,0x80,0xcf,0xf9, - 0x00,0x00,0x06,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/chain_curs.h b/vcl/unx/source/inc/chain_curs.h deleted file mode 100644 index 95b4fbe66c2e..000000000000 --- a/vcl/unx/source/inc/chain_curs.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define chain_curs_width 32 -#define chain_curs_height 32 -#define chain_curs_x_hot 0 -#define chain_curs_y_hot 2 -static char chain_curs_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00, - 0x00,0x05,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x21,0x00, - 0x00,0x00,0x41,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x01, - 0x02,0x00,0x00,0x01,0x04,0x00,0x00,0x81,0x0f,0x00,0x00,0x91,0x00,0x00,0x00, - 0x99,0x00,0x00,0x00,0x25,0x01,0x00,0x00,0x23,0x01,0x00,0x00,0x41,0x3e,0xbf, - 0x0f,0x40,0x82,0x40,0x10,0x80,0x5c,0xae,0x23,0x80,0x24,0x91,0x24,0x00,0x23, - 0x91,0x28,0x80,0x24,0x91,0x28,0x80,0x24,0x91,0x24,0x80,0x98,0x4f,0x23,0x00, - 0x41,0x20,0x10,0x00,0x3e,0xde,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/chain_mask.h b/vcl/unx/source/inc/chain_mask.h deleted file mode 100644 index 91d89bbed3c6..000000000000 --- a/vcl/unx/source/inc/chain_mask.h +++ /dev/null @@ -1,38 +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. - * - ************************************************************************/ -#define chain_mask_width 32 -#define chain_mask_height 32 -static char chain_mask_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00, - 0x00,0x07,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x3f,0x00, - 0x00,0x00,0x7f,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0xff, - 0x03,0x00,0x00,0xff,0x07,0x00,0x00,0xff,0x0f,0x00,0x00,0xff,0x00,0x00,0x00, - 0xff,0x00,0x00,0x00,0xe7,0x01,0x00,0x00,0xe3,0x01,0x00,0x00,0xc1,0x3f,0xbf, - 0x0f,0xc0,0xbf,0xff,0x1f,0x80,0xdf,0xff,0x3f,0x80,0xe7,0xf1,0x3c,0x00,0xe3, - 0xf1,0x38,0x80,0xe7,0xf1,0x38,0x80,0xe7,0xf1,0x3c,0x80,0xff,0xff,0x3f,0x00, - 0x7f,0xff,0x1f,0x00,0x3e,0xde,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/chainnot_curs.h b/vcl/unx/source/inc/chainnot_curs.h deleted file mode 100644 index 841e2efdec63..000000000000 --- a/vcl/unx/source/inc/chainnot_curs.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define chainnot_curs_width 32 -#define chainnot_curs_height 32 -#define chainnot_curs_x_hot 2 -#define chainnot_curs_y_hot 2 -static char chainnot_curs_bits[] = { - 0x00,0x00,0x00,0x00,0x80,0x1f,0x00,0x00,0xe0,0x7f,0x00,0x00,0xf0,0xf0,0x00, - 0x00,0x38,0xc0,0x01,0x00,0x7c,0x80,0x03,0x00,0xec,0x00,0x03,0x00,0xce,0x01, - 0x07,0x00,0x86,0x03,0x06,0x00,0x06,0x07,0x06,0x00,0x06,0x0e,0x06,0x00,0x06, - 0x1c,0x06,0x00,0x0e,0x38,0x07,0x00,0x0c,0x70,0x03,0x00,0x1c,0xe0,0x03,0x00, - 0x38,0xc0,0x01,0x00,0xf0,0xe0,0x00,0x00,0xe0,0x7f,0x00,0x00,0x80,0x9f,0xfc, - 0x3e,0x00,0x00,0x02,0x41,0x00,0x72,0xb9,0x8e,0x00,0x92,0x44,0x92,0x00,0x8c, - 0x44,0xa2,0x00,0x92,0x44,0xa2,0x00,0x92,0x44,0x92,0x00,0x62,0x3e,0x8d,0x00, - 0x04,0x81,0x40,0x00,0xf8,0x78,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/chainnot_mask.h b/vcl/unx/source/inc/chainnot_mask.h deleted file mode 100644 index 9fbed6408c54..000000000000 --- a/vcl/unx/source/inc/chainnot_mask.h +++ /dev/null @@ -1,38 +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. - * - ************************************************************************/ -#define chainnot_mask_width 32 -#define chainnot_mask_height 32 -static char chainnot_mask_bits[] = { - 0x80,0x1f,0x00,0x00,0xe0,0x7f,0x00,0x00,0xf0,0xff,0x00,0x00,0xf8,0xff,0x01, - 0x00,0xfc,0xf0,0x03,0x00,0xfe,0xc0,0x07,0x00,0xfe,0x81,0x07,0x00,0xff,0x83, - 0x0f,0x00,0xcf,0x07,0x0f,0x00,0x8f,0x0f,0x0f,0x00,0x0f,0x1f,0x0f,0x00,0x0f, - 0x3e,0x0f,0x00,0x1f,0xfc,0x0f,0x00,0x1e,0xf8,0x07,0x00,0x3e,0xf0,0x07,0x00, - 0xfc,0xe0,0x03,0x00,0xf8,0xff,0x01,0x00,0xf0,0xff,0x00,0x00,0xe0,0xff,0xfc, - 0x3e,0x80,0xff,0xfe,0x7f,0x00,0x7e,0xff,0xff,0x00,0x9e,0xc7,0xf3,0x00,0x8c, - 0xc7,0xe3,0x00,0x9e,0xc7,0xe3,0x00,0x9e,0xc7,0xf3,0x00,0xfe,0xff,0xff,0x00, - 0xfc,0xfd,0x7f,0x00,0xf8,0x78,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/chart_curs.h b/vcl/unx/source/inc/chart_curs.h deleted file mode 100644 index 9346fbd8f2c0..000000000000 --- a/vcl/unx/source/inc/chart_curs.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define chart_curs_width 32 -#define chart_curs_height 32 -#define chart_curs_x_hot 15 -#define chart_curs_y_hot 16 -static char chart_curs_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00, - 0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0xbf,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00, - 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80, - 0x10,0x00,0x00,0x80,0x00,0x06,0x00,0x00,0x10,0x06,0x00,0x00,0x00,0x06,0x00, - 0x00,0x10,0x36,0x00,0x00,0xc0,0x36,0x00,0x00,0xd0,0x36,0x00,0x00,0xc0,0x36, - 0x00,0x00,0xf0,0x7f,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/chart_mask.h b/vcl/unx/source/inc/chart_mask.h deleted file mode 100644 index d4804fb6c85b..000000000000 --- a/vcl/unx/source/inc/chart_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define chart_mask_width 32 -#define chart_mask_height 32 -#define chart_mask_x_hot 15 -#define chart_mask_y_hot 16 -static char chart_mask_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00, - 0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00, - 0x80,0xff,0xff,0x00,0x80,0xff,0xff,0x00,0x80,0xff,0xff,0x00,0x00,0xc0,0x01, - 0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x39,0x00,0x00,0xc0, - 0x39,0x0f,0x00,0xc0,0x39,0x0f,0x00,0xc0,0x39,0x0f,0x00,0x00,0x38,0x7f,0x00, - 0x00,0xf8,0x7f,0x00,0x00,0xf8,0x7f,0x00,0x00,0xf8,0x7f,0x00,0x00,0xf8,0xff, - 0x00,0x00,0xf8,0xff,0x00,0x00,0xf8,0xff}; diff --git a/vcl/unx/source/inc/copydata_curs.h b/vcl/unx/source/inc/copydata_curs.h deleted file mode 100644 index e3d0e3e76530..000000000000 --- a/vcl/unx/source/inc/copydata_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define copydata_curs_width 32 -#define copydata_curs_height 32 -#define copydata_curs_x_hot 1 -#define copydata_curs_y_hot 1 -static char copydata_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, - 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, - 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, - 0xfe, 0x03, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, - 0x66, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, - 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x53, 0x00, 0x00, - 0x28, 0xa3, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x10, 0xf0, 0x1f, 0x00, 0x08, 0xf0, 0x1f, 0x00, 0x10, 0xf0, 0x1e, 0x00, - 0xa8, 0xf2, 0x1e, 0x00, 0x50, 0x35, 0x18, 0x00, 0x00, 0xf0, 0x1e, 0x00, - 0x00, 0xf0, 0x1e, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/copydata_mask.h b/vcl/unx/source/inc/copydata_mask.h deleted file mode 100644 index f25b0863d807..000000000000 --- a/vcl/unx/source/inc/copydata_mask.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define copydata_mask_width 32 -#define copydata_mask_height 32 -#define copydata_mask_x_hot 1 -#define copydata_mask_y_hot 1 -static char copydata_mask_bits[] = { - 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, - 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, - 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, - 0xe0, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, - 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0x3c, 0xf8, 0x3f, 0x00, - 0x3c, 0xf8, 0x3f, 0x00, 0x3c, 0xf8, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00, - 0xfc, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00, - 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, - 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/copydlnk_curs.h b/vcl/unx/source/inc/copydlnk_curs.h deleted file mode 100644 index 8e22a5bee37b..000000000000 --- a/vcl/unx/source/inc/copydlnk_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define copydlnk_curs_width 32 -#define copydlnk_curs_height 32 -#define copydlnk_curs_x_hot 1 -#define copydlnk_curs_y_hot 1 -static char copydlnk_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, - 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, - 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, - 0xfe, 0x03, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, - 0x66, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, - 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x53, 0x00, 0x00, - 0x28, 0xa3, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, - 0x30, 0xf1, 0x1f, 0x00, 0x10, 0xf1, 0x1f, 0x00, 0xd0, 0xf1, 0x1e, 0x00, - 0xf0, 0xf1, 0x1e, 0x00, 0x00, 0x34, 0x18, 0x00, 0x00, 0xf0, 0x1e, 0x00, - 0x00, 0xf0, 0x1e, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/copydlnk_mask.h b/vcl/unx/source/inc/copydlnk_mask.h deleted file mode 100644 index 02ee5db5fbc1..000000000000 --- a/vcl/unx/source/inc/copydlnk_mask.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define copydlnk_mask_width 32 -#define copydlnk_mask_height 32 -#define copydlnk_mask_x_hot 1 -#define copydlnk_mask_y_hot 1 -static char copydlnk_mask_bits[] = { - 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, - 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, - 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, - 0xe0, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, - 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0xf8, 0xff, 0x3f, 0x00, - 0xf8, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00, - 0xf8, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00, 0x00, 0xfe, 0x3f, 0x00, - 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, - 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/copyfile_curs.h b/vcl/unx/source/inc/copyfile_curs.h deleted file mode 100644 index c74a1da26b66..000000000000 --- a/vcl/unx/source/inc/copyfile_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define copyfile_curs_width 32 -#define copyfile_curs_height 32 -#define copyfile_curs_x_hot 9 -#define copyfile_curs_y_hot 9 -static char copyfile_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00, - 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, - 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, - 0xfe, 0x02, 0x00, 0x00, 0xfe, 0x06, 0x00, 0x00, 0xfe, 0x0e, 0x00, 0x00, - 0xfe, 0x1e, 0x00, 0x00, 0xfe, 0x3e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, - 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x03, 0x00, - 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, - 0x00, 0xc2, 0xe0, 0x3f, 0x00, 0xc0, 0xe0, 0x3f, 0x00, 0x80, 0xe1, 0x3d, - 0x00, 0x80, 0xe1, 0x3d, 0x00, 0x00, 0x63, 0x30, 0x00, 0x00, 0xe3, 0x3d, - 0x00, 0x00, 0xe0, 0x3d, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x3f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/copyfile_mask.h b/vcl/unx/source/inc/copyfile_mask.h deleted file mode 100644 index c13089abaea5..000000000000 --- a/vcl/unx/source/inc/copyfile_mask.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define copyfile_mask_width 32 -#define copyfile_mask_height 32 -#define copyfile_mask_x_hot 9 -#define copyfile_mask_y_hot 9 -static char copyfile_mask_bits[] = { - 0xff, 0x01, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, - 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, - 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, - 0xff, 0x0f, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, - 0xff, 0x7f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, - 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, - 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0xf1, 0x7f, - 0x00, 0xff, 0xf1, 0x7f, 0x00, 0xe7, 0xf3, 0x7f, 0x00, 0xe0, 0xf3, 0x7f, - 0x00, 0xc0, 0xf7, 0x7f, 0x00, 0xc0, 0xf7, 0x7f, 0x00, 0x80, 0xf7, 0x7f, - 0x00, 0x80, 0xf7, 0x7f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf0, 0x7f, - 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/copyfiles_curs.h b/vcl/unx/source/inc/copyfiles_curs.h deleted file mode 100644 index e6a9b7a668af..000000000000 --- a/vcl/unx/source/inc/copyfiles_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define copyfiles_curs_width 32 -#define copyfiles_curs_height 32 -#define copyfiles_curs_x_hot 8 -#define copyfiles_curs_y_hot 9 -static char copyfiles_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0xe0, 0x2f, 0x00, 0x00, - 0xe8, 0x0f, 0x00, 0x00, 0xe8, 0x7f, 0x00, 0x00, 0xea, 0x7f, 0x00, 0x00, - 0xea, 0x7f, 0x00, 0x00, 0xea, 0x7f, 0x00, 0x00, 0x6a, 0x7e, 0x00, 0x00, - 0x6a, 0x7d, 0x00, 0x00, 0x6a, 0x7b, 0x00, 0x00, 0x6a, 0x77, 0x00, 0x00, - 0x6a, 0x6f, 0x00, 0x00, 0x6a, 0x5f, 0x00, 0x00, 0x0a, 0x3f, 0x00, 0x00, - 0x7a, 0x7f, 0x00, 0x00, 0x02, 0xff, 0x00, 0x00, 0x7e, 0xff, 0x01, 0x00, - 0x00, 0x3f, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, - 0x00, 0x61, 0xe0, 0x3f, 0x00, 0x60, 0xe0, 0x3f, 0x00, 0xc0, 0xe0, 0x3d, - 0x00, 0xc0, 0xe0, 0x3d, 0x00, 0x80, 0x61, 0x30, 0x00, 0x80, 0xe1, 0x3d, - 0x00, 0x00, 0xe0, 0x3d, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x3f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/copyfiles_mask.h b/vcl/unx/source/inc/copyfiles_mask.h deleted file mode 100644 index f904b7848f64..000000000000 --- a/vcl/unx/source/inc/copyfiles_mask.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define copyfiles_mask_width 32 -#define copyfiles_mask_height 32 -#define copyfiles_mask_x_hot 8 -#define copyfiles_mask_y_hot 9 -static char copyfiles_mask_bits[] = { - 0xf0, 0x1f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, - 0xfc, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x03, 0x00, 0xff, 0xff, 0x03, 0x00, - 0xff, 0xff, 0x03, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x80, 0xff, 0xf0, 0x7f, - 0x80, 0xff, 0xf0, 0x7f, 0x80, 0xf3, 0xf1, 0x7f, 0x00, 0xf0, 0xf1, 0x7f, - 0x00, 0xe0, 0xf3, 0x7f, 0x00, 0xe0, 0xf3, 0x7f, 0x00, 0xc0, 0xf3, 0x7f, - 0x00, 0xc0, 0xf3, 0x7f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf0, 0x7f, - 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/copyflnk_curs.h b/vcl/unx/source/inc/copyflnk_curs.h deleted file mode 100644 index b76368923f31..000000000000 --- a/vcl/unx/source/inc/copyflnk_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define copyflnk_curs_width 32 -#define copyflnk_curs_height 32 -#define copyflnk_curs_x_hot 9 -#define copyflnk_curs_y_hot 9 -static char copyflnk_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00, - 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, - 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, - 0xbe, 0x02, 0x00, 0x00, 0xa6, 0x06, 0x00, 0x00, 0xa2, 0x0e, 0x00, 0x00, - 0xba, 0x1e, 0x00, 0x00, 0xbe, 0x3e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, - 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x03, 0x00, - 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, - 0x00, 0xc2, 0xe0, 0x3f, 0x00, 0xc0, 0xe0, 0x3f, 0x00, 0x80, 0xe1, 0x3d, - 0x00, 0x80, 0xe1, 0x3d, 0x00, 0x00, 0x63, 0x30, 0x00, 0x00, 0xe3, 0x3d, - 0x00, 0x00, 0xe0, 0x3d, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x3f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/copyflnk_mask.h b/vcl/unx/source/inc/copyflnk_mask.h deleted file mode 100644 index b8fac92fdd75..000000000000 --- a/vcl/unx/source/inc/copyflnk_mask.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define copyflnk_mask_width 32 -#define copyflnk_mask_height 32 -#define copyflnk_mask_x_hot 9 -#define copyflnk_mask_y_hot 9 -static char copyflnk_mask_bits[] = { - 0xff, 0x01, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, - 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, - 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, - 0xff, 0x0f, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, - 0xff, 0x7f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, - 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, - 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0xf1, 0x7f, - 0x00, 0xff, 0xf1, 0x7f, 0x00, 0xe7, 0xf3, 0x7f, 0x00, 0xe0, 0xf3, 0x7f, - 0x00, 0xc0, 0xf7, 0x7f, 0x00, 0xc0, 0xf7, 0x7f, 0x00, 0x80, 0xf7, 0x7f, - 0x00, 0x80, 0xf7, 0x7f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf0, 0x7f, - 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/crook_curs.h b/vcl/unx/source/inc/crook_curs.h deleted file mode 100644 index 6e4d5f613959..000000000000 --- a/vcl/unx/source/inc/crook_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define crook_curs_width 32 -#define crook_curs_height 32 -#define crook_curs_x_hot 15 -#define crook_curs_y_hot 14 -static char crook_curs_bits[] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x7c, 0x3e, 0xff, 0x7f, 0xbb, 0xdd, 0xfe, - 0x7f, 0xbb, 0xdd, 0xfe, 0xf3, 0xb6, 0x6d, 0xcf, 0xed, 0xb6, 0x6d, 0xb7, - 0xdd, 0x75, 0xae, 0xbb, 0xbb, 0x0b, 0xd0, 0xdd, 0xb7, 0xf1, 0x8f, 0xed, - 0x4f, 0x0e, 0x70, 0xf2, 0xbf, 0xf1, 0x8f, 0xfd, 0x5f, 0xfe, 0x7f, 0xfa, - 0xaf, 0xff, 0xff, 0xf5, 0xd7, 0xff, 0xff, 0xeb, 0xef, 0xff, 0xff, 0xf7, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/vcl/unx/source/inc/crook_mask.h b/vcl/unx/source/inc/crook_mask.h deleted file mode 100644 index 7493f3a501dc..000000000000 --- a/vcl/unx/source/inc/crook_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define crook_mask_width 32 -#define crook_mask_height 32 -static char crook_mask_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x83, 0xc1, 0x00, 0x80, 0xc7, 0xe3, 0x01, 0xc0, 0xef, 0xf7, 0x03, - 0xcc, 0xef, 0xf7, 0x33, 0x9e, 0xff, 0xff, 0x79, 0xbf, 0xff, 0xff, 0xfd, - 0x77, 0xff, 0xff, 0xee, 0xee, 0xf6, 0x6f, 0x77, 0xfc, 0xff, 0xff, 0x3f, - 0xb8, 0xff, 0xff, 0x1d, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, - 0xf8, 0x01, 0x80, 0x1f, 0x7c, 0x00, 0x00, 0x3e, 0x38, 0x00, 0x00, 0x1c, - 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/crop_curs.h b/vcl/unx/source/inc/crop_curs.h deleted file mode 100644 index a546ce6c1ba8..000000000000 --- a/vcl/unx/source/inc/crop_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define crop_curs_width 32 -#define crop_curs_height 32 -#define crop_curs_x_hot 9 -#define crop_curs_y_hot 9 -static char crop_curs_bits[] = { - 0xff, 0x0f, 0xff, 0xff, 0xff, 0x6f, 0xff, 0xff, 0xff, 0x6f, 0xff, 0xff, - 0x07, 0x60, 0xf8, 0xff, 0xf7, 0x6f, 0xfb, 0xff, 0xf7, 0x6f, 0xfb, 0xff, - 0x37, 0x60, 0xf8, 0xff, 0xb7, 0x6f, 0xff, 0xff, 0xb7, 0x6f, 0xff, 0xff, - 0xb7, 0x6f, 0xff, 0xff, 0xb7, 0x6f, 0xff, 0xff, 0xb7, 0x6f, 0xff, 0xff, - 0x30, 0x60, 0xff, 0xff, 0xb6, 0x7f, 0xff, 0xff, 0xb6, 0x7f, 0xff, 0xff, - 0x30, 0x00, 0xff, 0xff, 0xb7, 0xff, 0xff, 0xff, 0xb7, 0xff, 0xff, 0xff, - 0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/vcl/unx/source/inc/crop_mask.h b/vcl/unx/source/inc/crop_mask.h deleted file mode 100644 index 5a10726cf36c..000000000000 --- a/vcl/unx/source/inc/crop_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define crop_mask_width 32 -#define crop_mask_height 32 -static char crop_mask_bits[] = { - 0x00, 0xf8, 0x01, 0x00, 0x00, 0xf8, 0x01, 0x00, 0xfc, 0xff, 0x0f, 0x00, - 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x0f, 0x00, - 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xf8, 0x01, 0x00, - 0xfc, 0xf8, 0x01, 0x00, 0xfc, 0xf8, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, - 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, - 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, 0xfc, 0x00, 0x00, 0x00, - 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/detective_curs.h b/vcl/unx/source/inc/detective_curs.h deleted file mode 100644 index 9d8a0d6a1c47..000000000000 --- a/vcl/unx/source/inc/detective_curs.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define detective_curs_width 32 -#define detective_curs_height 32 -#define detective_curs_x_hot 12 -#define detective_curs_y_hot 13 -static char detective_curs_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x38,0x00, - 0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c, - 0x00,0x00,0x00,0x83,0x01,0x00,0x80,0x00,0x02,0x00,0x80,0x10,0x02,0x00,0x40, - 0x38,0x04,0x00,0x40,0x7c,0x04,0x00,0x40,0xfe,0x04,0x00,0x40,0x38,0x04,0x00, - 0x40,0x38,0x04,0x00,0x80,0x38,0x02,0x00,0x80,0x00,0x02,0x00,0x00,0x83,0x07, - 0x00,0x00,0x7c,0x0e,0x00,0x00,0x00,0x1c,0x00,0x00,0x10,0x38,0x00,0x00,0x38, - 0x70,0x00,0x00,0x10,0x60,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/detective_mask.h b/vcl/unx/source/inc/detective_mask.h deleted file mode 100644 index 14402a37b641..000000000000 --- a/vcl/unx/source/inc/detective_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define detective_mask_width 32 -#define detective_mask_height 32 -#define detective_mask_x_hot 12 -#define detective_mask_y_hot 13 -static char detective_mask_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x38,0x00, - 0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c, - 0x00,0x00,0x00,0xff,0x01,0x00,0x80,0xff,0x03,0x00,0x80,0xff,0x03,0x00,0xc0, - 0xff,0x07,0x00,0xc0,0xff,0x07,0x00,0xc0,0xff,0x07,0x00,0xc0,0xff,0x07,0x00, - 0xc0,0xff,0x07,0x00,0x80,0xff,0x03,0x00,0x80,0xff,0x03,0x00,0x00,0xff,0x07, - 0x00,0x00,0x7c,0x0e,0x00,0x00,0x00,0x1c,0x00,0x00,0x10,0x38,0x00,0x00,0x38, - 0x70,0x00,0x00,0x10,0x60,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/drawarc_curs.h b/vcl/unx/source/inc/drawarc_curs.h deleted file mode 100644 index daea116e186e..000000000000 --- a/vcl/unx/source/inc/drawarc_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define drawarc_curs_width 32 -#define drawarc_curs_height 32 -#define drawarc_curs_x_hot 7 -#define drawarc_curs_y_hot 7 -static char drawarc_curs_bits[] = { - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x42, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawarc_mask.h b/vcl/unx/source/inc/drawarc_mask.h deleted file mode 100644 index c9e2b6dd8737..000000000000 --- a/vcl/unx/source/inc/drawarc_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define drawarc_mask_width 32 -#define drawarc_mask_height 32 -static char drawarc_mask_bits[] = { - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x80, 0xe7, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, - 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawbezier_curs.h b/vcl/unx/source/inc/drawbezier_curs.h deleted file mode 100644 index ea677d4734aa..000000000000 --- a/vcl/unx/source/inc/drawbezier_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define drawbezier_curs_width 32 -#define drawbezier_curs_height 32 -#define drawbezier_curs_x_hot 7 -#define drawbezier_curs_y_hot 7 -static char drawbezier_curs_bits[] = { - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, 0x88, 0x00, - 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, - 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x0e, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawbezier_mask.h b/vcl/unx/source/inc/drawbezier_mask.h deleted file mode 100644 index 17c1075d07a7..000000000000 --- a/vcl/unx/source/inc/drawbezier_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define drawbezier_mask_width 32 -#define drawbezier_mask_height 32 -static char drawbezier_mask_bits[] = { - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x0e, 0x0f, 0x00, 0x00, 0x8e, 0x0f, 0x00, 0x00, 0xdc, 0x0f, - 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xe0, 0x00, - 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0xbf, 0x03, 0x00, 0x00, 0x1f, 0x07, - 0x00, 0x00, 0x0f, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawcaption_curs.h b/vcl/unx/source/inc/drawcaption_curs.h deleted file mode 100644 index 3fe104f3673e..000000000000 --- a/vcl/unx/source/inc/drawcaption_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define drawcaption_curs_width 32 -#define drawcaption_curs_height 32 -#define drawcaption_curs_x_hot 8 -#define drawcaption_curs_y_hot 8 -static char drawcaption_curs_bits[] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, - 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, - 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x81, 0x02, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, - 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xbe, 0xff, 0xff, - 0xff, 0x7e, 0x1f, 0xe0, 0xff, 0xff, 0xde, 0xef, 0xff, 0xff, 0xc1, 0xef, - 0xff, 0xff, 0xdf, 0xef, 0xff, 0xff, 0x1f, 0xe0, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/vcl/unx/source/inc/drawcaption_mask.h b/vcl/unx/source/inc/drawcaption_mask.h deleted file mode 100644 index 70b39e37b65e..000000000000 --- a/vcl/unx/source/inc/drawcaption_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define drawcaption_mask_width 32 -#define drawcaption_mask_height 32 -static char drawcaption_mask_bits[] = { - 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, - 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, - 0x80, 0x03, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, - 0xff, 0xff, 0x01, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, - 0x80, 0x03, 0x00, 0x00, 0x80, 0x43, 0x00, 0x00, 0x80, 0xe3, 0xf0, 0x3f, - 0x80, 0xc3, 0xf1, 0x3f, 0x80, 0x83, 0xff, 0x3f, 0x00, 0x00, 0x7f, 0x38, - 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0xf0, 0x3f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawcirclecut_curs.h b/vcl/unx/source/inc/drawcirclecut_curs.h deleted file mode 100644 index dc632873dd3b..000000000000 --- a/vcl/unx/source/inc/drawcirclecut_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define drawcirclecut_curs_width 32 -#define drawcirclecut_curs_height 32 -#define drawcirclecut_curs_x_hot 7 -#define drawcirclecut_curs_y_hot 7 -static char drawcirclecut_curs_bits[] = { - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0a, 0x00, - 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x41, 0x00, - 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x3c, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawcirclecut_mask.h b/vcl/unx/source/inc/drawcirclecut_mask.h deleted file mode 100644 index 1f96be33b86a..000000000000 --- a/vcl/unx/source/inc/drawcirclecut_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define drawcirclecut_mask_width 32 -#define drawcirclecut_mask_height 32 -static char drawcirclecut_mask_bits[] = { - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x1f, 0x00, - 0x00, 0x80, 0x3b, 0x00, 0x00, 0x80, 0x73, 0x00, 0x00, 0x80, 0xe3, 0x00, - 0x00, 0x80, 0xc3, 0x01, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x7e, 0x00, - 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawconnect_curs.h b/vcl/unx/source/inc/drawconnect_curs.h deleted file mode 100644 index 994f34b96e0e..000000000000 --- a/vcl/unx/source/inc/drawconnect_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define drawconnect_curs_width 32 -#define drawconnect_curs_height 32 -#define drawconnect_curs_x_hot 7 -#define drawconnect_curs_y_hot 7 -static char drawconnect_curs_bits[] = { - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x80, 0x5f, 0x00, 0x00, 0x80, 0x70, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0xfd, 0x00, - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawconnect_mask.h b/vcl/unx/source/inc/drawconnect_mask.h deleted file mode 100644 index 187cf31cfd1a..000000000000 --- a/vcl/unx/source/inc/drawconnect_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define drawconnect_mask_width 32 -#define drawconnect_mask_height 32 -static char drawconnect_mask_bits[] = { - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, - 0x00, 0x00, 0xc0, 0xff, 0x00, 0x00, 0xc0, 0xdf, 0x00, 0x00, 0xc0, 0xff, - 0x00, 0x80, 0xcf, 0xf9, 0x00, 0x80, 0xff, 0x01, 0x00, 0x80, 0xfd, 0x01, - 0x00, 0x80, 0xff, 0x01, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawcrook_curs.h b/vcl/unx/source/inc/drawcrook_curs.h deleted file mode 100644 index 4fdba0e8442a..000000000000 --- a/vcl/unx/source/inc/drawcrook_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define drawcrook_curs_width 32 -#define drawcrook_curs_height 32 -#define drawcrook_curs_x_hot 15 -#define drawcrook_curs_y_hot 14 -static char drawcrook_curs_bits[] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x7c, 0x3e, 0xff, 0x7f, 0xbb, 0xdd, 0xfe, - 0x7f, 0xbb, 0xdd, 0xfe, 0xf3, 0xb6, 0x6d, 0xcf, 0xed, 0xb6, 0x6d, 0xb7, - 0xdd, 0x75, 0xae, 0xbb, 0xbb, 0x0b, 0xd0, 0xdd, 0xb7, 0xf1, 0x8f, 0xed, - 0x4f, 0x0e, 0x70, 0xf2, 0xbf, 0xf1, 0x8f, 0xfd, 0x5f, 0xfe, 0x7f, 0xfa, - 0xaf, 0xff, 0xff, 0xf5, 0xd7, 0xff, 0xff, 0xeb, 0xef, 0xff, 0xff, 0xf7, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/vcl/unx/source/inc/drawcrook_mask.h b/vcl/unx/source/inc/drawcrook_mask.h deleted file mode 100644 index 657fcff2b4fd..000000000000 --- a/vcl/unx/source/inc/drawcrook_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define drawcrook_mask_width 32 -#define drawcrook_mask_height 32 -static char drawcrook_mask_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x83, 0xc1, 0x00, 0x80, 0xc7, 0xe3, 0x01, 0xc0, 0xef, 0xf7, 0x03, - 0xcc, 0xef, 0xf7, 0x33, 0x9e, 0xff, 0xff, 0x79, 0xbf, 0xff, 0xff, 0xfd, - 0x77, 0xff, 0xff, 0xee, 0xee, 0xf6, 0x6f, 0x77, 0xfc, 0xff, 0xff, 0x3f, - 0xb8, 0xff, 0xff, 0x1d, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, - 0xf8, 0x01, 0x80, 0x1f, 0x7c, 0x00, 0x00, 0x3e, 0x38, 0x00, 0x00, 0x1c, - 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawcrop_curs.h b/vcl/unx/source/inc/drawcrop_curs.h deleted file mode 100644 index 7f574e1ab351..000000000000 --- a/vcl/unx/source/inc/drawcrop_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define drawcrop_curs_width 32 -#define drawcrop_curs_height 32 -#define drawcrop_curs_x_hot 9 -#define drawcrop_curs_y_hot 9 -static char drawcrop_curs_bits[] = { - 0xff, 0x0f, 0xff, 0xff, 0xff, 0x6f, 0xff, 0xff, 0xff, 0x6f, 0xff, 0xff, - 0x07, 0x60, 0xf8, 0xff, 0xf7, 0x6f, 0xfb, 0xff, 0xf7, 0x6f, 0xfb, 0xff, - 0x37, 0x60, 0xf8, 0xff, 0xb7, 0x6f, 0xff, 0xff, 0xb7, 0x6f, 0xff, 0xff, - 0xb7, 0x6f, 0xff, 0xff, 0xb7, 0x6f, 0xff, 0xff, 0xb7, 0x6f, 0xff, 0xff, - 0x30, 0x60, 0xff, 0xff, 0xb6, 0x7f, 0xff, 0xff, 0xb6, 0x7f, 0xff, 0xff, - 0x30, 0x00, 0xff, 0xff, 0xb7, 0xff, 0xff, 0xff, 0xb7, 0xff, 0xff, 0xff, - 0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/vcl/unx/source/inc/drawcrop_mask.h b/vcl/unx/source/inc/drawcrop_mask.h deleted file mode 100644 index ac2e8885bdbb..000000000000 --- a/vcl/unx/source/inc/drawcrop_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define drawcrop_mask_width 32 -#define drawcrop_mask_height 32 -static char drawcrop_mask_bits[] = { - 0x00, 0xf8, 0x01, 0x00, 0x00, 0xf8, 0x01, 0x00, 0xfc, 0xff, 0x0f, 0x00, - 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x0f, 0x00, - 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xf8, 0x01, 0x00, - 0xfc, 0xf8, 0x01, 0x00, 0xfc, 0xf8, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, - 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, - 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, 0xfc, 0x00, 0x00, 0x00, - 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawellipse_curs.h b/vcl/unx/source/inc/drawellipse_curs.h deleted file mode 100644 index bddc330d71d2..000000000000 --- a/vcl/unx/source/inc/drawellipse_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define drawellipse_curs_width 32 -#define drawellipse_curs_height 32 -#define drawellipse_curs_x_hot 7 -#define drawellipse_curs_y_hot 7 -static char drawellipse_curs_bits[] = { - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x42, 0x00, - 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x81, 0x00, - 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x3c, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawellipse_mask.h b/vcl/unx/source/inc/drawellipse_mask.h deleted file mode 100644 index 0ac5f200eab1..000000000000 --- a/vcl/unx/source/inc/drawellipse_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define drawellipse_mask_width 32 -#define drawellipse_mask_height 32 -static char drawellipse_mask_bits[] = { - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x80, 0xe7, 0x01, 0x00, 0x80, 0xc3, 0x01, 0x00, 0x80, 0xc3, 0x01, - 0x00, 0x80, 0xe7, 0x01, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x7e, 0x00, - 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawfreehand_curs.h b/vcl/unx/source/inc/drawfreehand_curs.h deleted file mode 100644 index 75795c088c8e..000000000000 --- a/vcl/unx/source/inc/drawfreehand_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define drawfreehand_curs_width 32 -#define drawfreehand_curs_height 32 -#define drawfreehand_curs_x_hot 8 -#define drawfreehand_curs_y_hot 8 -static char drawfreehand_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xfd, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x70, 0x00, 0x02, - 0x00, 0x88, 0x00, 0x02, 0x00, 0x84, 0x00, 0x01, 0x00, 0x84, 0xc0, 0x00, - 0x00, 0x04, 0x3f, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawfreehand_mask.h b/vcl/unx/source/inc/drawfreehand_mask.h deleted file mode 100644 index 29edf44a9999..000000000000 --- a/vcl/unx/source/inc/drawfreehand_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define drawfreehand_mask_width 32 -#define drawfreehand_mask_height 32 -static char drawfreehand_mask_bits[] = { - 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, - 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, - 0x80, 0x03, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, - 0xff, 0xff, 0x01, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, - 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x08, - 0x80, 0x03, 0x00, 0x1c, 0x80, 0x73, 0x00, 0x0e, 0x00, 0xf8, 0x00, 0x07, - 0x00, 0xfc, 0x01, 0x07, 0x00, 0xce, 0xc1, 0x03, 0x00, 0xce, 0xff, 0x01, - 0x00, 0x8e, 0xff, 0x00, 0x00, 0x0e, 0x3f, 0x00, 0x00, 0x0e, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawline_curs.h b/vcl/unx/source/inc/drawline_curs.h deleted file mode 100644 index 2d2aa162fac6..000000000000 --- a/vcl/unx/source/inc/drawline_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define drawline_curs_width 32 -#define drawline_curs_height 32 -#define drawline_curs_x_hot 7 -#define drawline_curs_y_hot 7 -static char drawline_curs_bits[] = { - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x0c, 0x00, - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawline_mask.h b/vcl/unx/source/inc/drawline_mask.h deleted file mode 100644 index d66b0fd09aaa..000000000000 --- a/vcl/unx/source/inc/drawline_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define drawline_mask_width 32 -#define drawline_mask_height 32 -static char drawline_mask_bits[] = { - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0x3f, 0xfe, 0x00, 0x00, 0xbf, 0xfe, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x70, - 0xc0, 0x01, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0xc0, 0x0f, - 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x3f, 0x00, - 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawmirror_curs.h b/vcl/unx/source/inc/drawmirror_curs.h deleted file mode 100644 index 3f61e751befb..000000000000 --- a/vcl/unx/source/inc/drawmirror_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define drawmirror_curs_width 32 -#define drawmirror_curs_height 32 -#define drawmirror_curs_x_hot 14 -#define drawmirror_curs_y_hot 12 -static char drawmirror_curs_bits[] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0x03, 0xf8, 0xf5, 0xff, - 0xfb, 0xfb, 0xee, 0xff, 0x0b, 0xfa, 0xf5, 0xff, 0xeb, 0xfa, 0xfa, 0xff, - 0xeb, 0xfa, 0xfa, 0xff, 0xeb, 0x7a, 0xfd, 0xff, 0xeb, 0x7a, 0xfd, 0xff, - 0xeb, 0xba, 0x7e, 0xff, 0xeb, 0xba, 0xbe, 0xfe, 0xeb, 0x5a, 0x5f, 0xfd, - 0x0b, 0x5a, 0xaf, 0xfa, 0xfb, 0xab, 0xd7, 0xf5, 0x03, 0xa8, 0xeb, 0xeb, - 0xff, 0xd7, 0xf5, 0xf5, 0xff, 0xd7, 0xfa, 0xfa, 0xff, 0x6b, 0x7d, 0xfd, - 0xff, 0xeb, 0xba, 0xfe, 0xff, 0xf5, 0x55, 0xff, 0xff, 0xf5, 0xab, 0xff, - 0xff, 0xfa, 0xd7, 0xff, 0x7f, 0xf7, 0xef, 0xff, 0xff, 0xfa, 0xff, 0xff, - 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/vcl/unx/source/inc/drawmirror_mask.h b/vcl/unx/source/inc/drawmirror_mask.h deleted file mode 100644 index 5394dd74576a..000000000000 --- a/vcl/unx/source/inc/drawmirror_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define drawmirror_mask_width 32 -#define drawmirror_mask_height 32 -static char drawmirror_mask_bits[] = { - 0x00, 0x00, 0x04, 0x00, 0xfe, 0x0f, 0x0e, 0x00, 0xfe, 0x0f, 0x1f, 0x00, - 0xfe, 0x8f, 0x3f, 0x00, 0xfe, 0x0f, 0x1f, 0x00, 0xfe, 0x8f, 0x0f, 0x00, - 0xbe, 0x8f, 0x0f, 0x00, 0xbe, 0xcf, 0x07, 0x00, 0xbe, 0xcf, 0x87, 0x00, - 0xbe, 0xef, 0xc3, 0x01, 0xbe, 0xef, 0xe3, 0x03, 0xfe, 0xff, 0xf1, 0x07, - 0xfe, 0xff, 0x79, 0x0f, 0xfe, 0xff, 0x3c, 0x1e, 0xfe, 0xff, 0x1e, 0x3c, - 0xfe, 0x7f, 0x0f, 0x1e, 0x00, 0xfc, 0x07, 0x0f, 0x00, 0xfe, 0x83, 0x07, - 0x00, 0xbe, 0xc7, 0x03, 0x00, 0x1f, 0xef, 0x01, 0x00, 0x1f, 0xfe, 0x00, - 0x80, 0x0f, 0x7c, 0x00, 0xc0, 0x1d, 0x38, 0x00, 0x80, 0x0f, 0x10, 0x00, - 0x00, 0x07, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawpie_curs.h b/vcl/unx/source/inc/drawpie_curs.h deleted file mode 100644 index 327b15258d3d..000000000000 --- a/vcl/unx/source/inc/drawpie_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define drawpie_curs_width 32 -#define drawpie_curs_height 32 -#define drawpie_curs_x_hot 7 -#define drawpie_curs_y_hot 7 -static char drawpie_curs_bits[] = { - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0a, 0x00, - 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xf9, 0x00, - 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x3c, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawpie_mask.h b/vcl/unx/source/inc/drawpie_mask.h deleted file mode 100644 index 6b5e5ac4ff0d..000000000000 --- a/vcl/unx/source/inc/drawpie_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define drawpie_mask_width 32 -#define drawpie_mask_height 32 -static char drawpie_mask_bits[] = { - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1f, 0x00, - 0x00, 0x80, 0x1f, 0x00, 0x00, 0x80, 0xff, 0x01, 0x00, 0x80, 0xff, 0x01, - 0x00, 0x80, 0xfb, 0x01, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x7e, 0x00, - 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawpolygon_curs.h b/vcl/unx/source/inc/drawpolygon_curs.h deleted file mode 100644 index ee68c707444c..000000000000 --- a/vcl/unx/source/inc/drawpolygon_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define drawpolygon_curs_width 32 -#define drawpolygon_curs_height 32 -#define drawpolygon_curs_x_hot 7 -#define drawpolygon_curs_y_hot 7 -static char drawpolygon_curs_bits[] = { - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x83, 0x00, - 0x00, 0x00, 0xc5, 0x00, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x99, 0x00, - 0x00, 0x00, 0x89, 0x03, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x01, 0x01, - 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawpolygon_mask.h b/vcl/unx/source/inc/drawpolygon_mask.h deleted file mode 100644 index 8b82e237233c..000000000000 --- a/vcl/unx/source/inc/drawpolygon_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define drawpolygon_mask_width 32 -#define drawpolygon_mask_height 32 -static char drawpolygon_mask_bits[] = { - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x06, - 0x00, 0x00, 0x1e, 0x07, 0x00, 0x00, 0xbe, 0x07, 0x00, 0x00, 0xfe, 0x07, - 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x7e, 0x1f, 0x00, 0x00, 0x3e, 0x1f, - 0x00, 0x00, 0x0e, 0x0e, 0x00, 0x00, 0x0e, 0x07, 0x00, 0x00, 0x0e, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawrect_curs.h b/vcl/unx/source/inc/drawrect_curs.h deleted file mode 100644 index c2508d37fad5..000000000000 --- a/vcl/unx/source/inc/drawrect_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define drawrect_curs_width 32 -#define drawrect_curs_height 32 -#define drawrect_curs_x_hot 7 -#define drawrect_curs_y_hot 7 -static char drawrect_curs_bits[] = { - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x81, 0x00, - 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x81, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawrect_mask.h b/vcl/unx/source/inc/drawrect_mask.h deleted file mode 100644 index 955152f312c9..000000000000 --- a/vcl/unx/source/inc/drawrect_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define drawrect_mask_width 32 -#define drawrect_mask_height 32 -static char drawrect_mask_bits[] = { - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0x3f, 0x7e, 0x00, 0x00, 0xbf, 0x7e, 0x00, 0x00, 0x3f, 0x7e, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0x00, 0x80, 0xff, 0x01, 0x00, 0x80, 0xff, 0x01, 0x00, 0x80, 0xff, 0x01, - 0x00, 0x80, 0xc3, 0x01, 0x00, 0x80, 0xc3, 0x01, 0x00, 0x80, 0xff, 0x01, - 0x00, 0x80, 0xff, 0x01, 0x00, 0x80, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawtext_curs.h b/vcl/unx/source/inc/drawtext_curs.h deleted file mode 100644 index c5049670b9ec..000000000000 --- a/vcl/unx/source/inc/drawtext_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define drawtext_curs_width 32 -#define drawtext_curs_height 32 -#define drawtext_curs_x_hot 8 -#define drawtext_curs_y_hot 8 -static char drawtext_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xfd, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x81, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, - 0x00, 0x80, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/drawtext_mask.h b/vcl/unx/source/inc/drawtext_mask.h deleted file mode 100644 index e27ce2514306..000000000000 --- a/vcl/unx/source/inc/drawtext_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define drawtext_mask_width 32 -#define drawtext_mask_height 32 -static char drawtext_mask_bits[] = { - 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, - 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, - 0x80, 0x03, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, - 0xff, 0xff, 0x01, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, - 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0xc3, 0x1f, 0x00, - 0x80, 0xc3, 0x1f, 0x00, 0x80, 0xc3, 0x1f, 0x00, 0x00, 0x00, 0x07, 0x00, - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xc0, 0x1f, 0x00, - 0x00, 0xc0, 0x1f, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/fill_curs.h b/vcl/unx/source/inc/fill_curs.h deleted file mode 100644 index 792ea50e4f00..000000000000 --- a/vcl/unx/source/inc/fill_curs.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define fill_curs_width 32 -#define fill_curs_height 32 -#define fill_curs_x_hot 10 -#define fill_curs_y_hot 22 -static char fill_curs_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x80,0x02,0x00,0x00,0x5c,0x0c,0x00,0x00, - 0x2e,0x12,0x00,0x00,0x17,0x38,0x00,0x00,0x0b,0x7c,0x00,0x00,0x5b,0xbe,0x00, - 0x00,0x27,0x9f,0x00,0x00,0xa7,0x4f,0x00,0x00,0xc7,0x27,0x00,0x00,0x87,0x13, - 0x00,0x00,0x06,0x09,0x00,0x00,0x06,0x06,0x00,0x00,0x04,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/fill_mask.h b/vcl/unx/source/inc/fill_mask.h deleted file mode 100644 index 67681f243f7b..000000000000 --- a/vcl/unx/source/inc/fill_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define fill_mask_width 32 -#define fill_mask_height 32 -#define fill_mask_x_hot 10 -#define fill_mask_y_hot 22 -static char fill_mask_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x80,0x03,0x00,0x00,0xdc,0x0f,0x00,0x00, - 0xfe,0x1f,0x00,0x00,0xff,0x3f,0x00,0x00,0xff,0x7f,0x00,0x00,0xff,0xff,0x00, - 0x00,0xe7,0xff,0x00,0x00,0xe7,0x7f,0x00,0x00,0xc7,0x3f,0x00,0x00,0x87,0x1f, - 0x00,0x00,0x06,0x0f,0x00,0x00,0x06,0x06,0x00,0x00,0x04,0x00,0x00,0x00,0x04, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/hshear_curs.h b/vcl/unx/source/inc/hshear_curs.h deleted file mode 100644 index 7f6092b648de..000000000000 --- a/vcl/unx/source/inc/hshear_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define hshear_curs_width 32 -#define hshear_curs_height 32 -#define hshear_curs_x_hot 15 -#define hshear_curs_y_hot 15 -static char hshear_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, - 0x00, 0x3c, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x0c, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/hshear_mask.h b/vcl/unx/source/inc/hshear_mask.h deleted file mode 100644 index 6d09b3b0af01..000000000000 --- a/vcl/unx/source/inc/hshear_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define hshear_mask_width 32 -#define hshear_mask_height 32 -static char hshear_mask_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, - 0x80, 0xff, 0xff, 0x01, 0x80, 0xff, 0xff, 0x01, 0x80, 0xff, 0xff, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x01, - 0x80, 0xff, 0xff, 0x01, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, 0x3e, 0x00, - 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/invert50.h b/vcl/unx/source/inc/invert50.h deleted file mode 100644 index 7c0d00ce8fa4..000000000000 --- a/vcl/unx/source/inc/invert50.h +++ /dev/null @@ -1,65 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#define invert50_width 32 -#define invert50_height 32 -static char invert50_bits[] = { -#if 1 - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, - 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, -#else - 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, - 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, - 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, - 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, - 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, - 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, - 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, - 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, -#endif -}; diff --git a/vcl/unx/source/inc/linkdata_curs.h b/vcl/unx/source/inc/linkdata_curs.h deleted file mode 100644 index c60edc3b99d0..000000000000 --- a/vcl/unx/source/inc/linkdata_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define linkdata_curs_width 32 -#define linkdata_curs_height 32 -#define linkdata_curs_x_hot 1 -#define linkdata_curs_y_hot 1 -static char linkdata_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, - 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, - 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, - 0xfe, 0x03, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, - 0x66, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, - 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x53, 0x00, 0x00, - 0x28, 0xa3, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x10, 0xf0, 0x1f, 0x00, 0x08, 0x70, 0x18, 0x00, 0x10, 0xf0, 0x18, 0x00, - 0xa8, 0x72, 0x18, 0x00, 0x50, 0x35, 0x1a, 0x00, 0x00, 0x30, 0x1f, 0x00, - 0x00, 0xb0, 0x1f, 0x00, 0x00, 0x70, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/linkdata_mask.h b/vcl/unx/source/inc/linkdata_mask.h deleted file mode 100644 index cf0f89f63b1b..000000000000 --- a/vcl/unx/source/inc/linkdata_mask.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define linkdata_mask_width 32 -#define linkdata_mask_height 32 -#define linkdata_mask_x_hot 1 -#define linkdata_mask_y_hot 1 -static char linkdata_mask_bits[] = { - 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, - 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, - 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, - 0xe0, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, - 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0x3c, 0xf8, 0x3f, 0x00, - 0x3c, 0xf8, 0x3f, 0x00, 0x3c, 0xf8, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00, - 0xfc, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00, - 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, - 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/linkfile_curs.h b/vcl/unx/source/inc/linkfile_curs.h deleted file mode 100644 index fb676ae2a04b..000000000000 --- a/vcl/unx/source/inc/linkfile_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define linkfile_curs_width 32 -#define linkfile_curs_height 32 -#define linkfile_curs_x_hot 9 -#define linkfile_curs_y_hot 9 -static char linkfile_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00, - 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, - 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, - 0xfe, 0x02, 0x00, 0x00, 0xfe, 0x06, 0x00, 0x00, 0xfe, 0x0e, 0x00, 0x00, - 0xfe, 0x1e, 0x00, 0x00, 0xfe, 0x3e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, - 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x03, 0x00, - 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, - 0x00, 0xc2, 0xe0, 0x3f, 0x00, 0xc0, 0xe0, 0x30, 0x00, 0x80, 0xe1, 0x31, - 0x00, 0x80, 0xe1, 0x30, 0x00, 0x00, 0x63, 0x34, 0x00, 0x00, 0x63, 0x3e, - 0x00, 0x00, 0x60, 0x3f, 0x00, 0x00, 0xe0, 0x3e, 0x00, 0x00, 0xe0, 0x3f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/linkfile_mask.h b/vcl/unx/source/inc/linkfile_mask.h deleted file mode 100644 index 28ff46c4fae4..000000000000 --- a/vcl/unx/source/inc/linkfile_mask.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define linkfile_mask_width 32 -#define linkfile_mask_height 32 -#define linkfile_mask_x_hot 9 -#define linkfile_mask_y_hot 9 -static char linkfile_mask_bits[] = { - 0xff, 0x01, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, - 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, - 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, - 0xff, 0x0f, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, - 0xff, 0x7f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, - 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, - 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0xf1, 0x7f, - 0x00, 0xff, 0xf1, 0x7f, 0x00, 0xe7, 0xf3, 0x7f, 0x00, 0xe0, 0xf3, 0x7f, - 0x00, 0xc0, 0xf7, 0x7f, 0x00, 0xc0, 0xf7, 0x7f, 0x00, 0x80, 0xf7, 0x7f, - 0x00, 0x80, 0xf7, 0x7f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf0, 0x7f, - 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/magnify_curs.h b/vcl/unx/source/inc/magnify_curs.h deleted file mode 100644 index 76114ca410d5..000000000000 --- a/vcl/unx/source/inc/magnify_curs.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define magnify_curs_width 32 -#define magnify_curs_height 32 -#define magnify_curs_x_hot 12 -#define magnify_curs_y_hot 13 -static char magnify_curs_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x83, - 0x01,0x00,0x80,0x00,0x02,0x00,0x40,0x00,0x04,0x00,0x40,0x00,0x04,0x00,0x20, - 0x00,0x08,0x00,0x20,0x00,0x08,0x00,0x20,0x00,0x08,0x00,0x20,0x00,0x08,0x00, - 0x20,0x00,0x08,0x00,0x40,0x00,0x04,0x00,0x40,0x00,0x04,0x00,0x80,0x00,0x06, - 0x00,0x00,0x83,0x0f,0x00,0x00,0x7c,0x1c,0x00,0x00,0x00,0x38,0x00,0x00,0x00, - 0x70,0x00,0x00,0x00,0xe0,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/magnify_mask.h b/vcl/unx/source/inc/magnify_mask.h deleted file mode 100644 index db4213943b6e..000000000000 --- a/vcl/unx/source/inc/magnify_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define magnify_mask_width 32 -#define magnify_mask_height 32 -static char magnify_mask_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, - 0x00, 0xff, 0x01, 0x00, 0x80, 0xff, 0x03, 0x00, 0xc0, 0x83, 0x07, 0x00, - 0xe0, 0x00, 0x0e, 0x00, 0xe0, 0x00, 0x0e, 0x00, 0x70, 0x00, 0x1c, 0x00, - 0x70, 0x00, 0x1c, 0x00, 0x70, 0x00, 0x1c, 0x00, 0x70, 0x00, 0x1c, 0x00, - 0x70, 0x00, 0x1c, 0x00, 0xe0, 0x00, 0x0e, 0x00, 0xe0, 0x00, 0x0e, 0x00, - 0xc0, 0x83, 0x0f, 0x00, 0x80, 0xff, 0x1f, 0x00, 0x00, 0xff, 0x3f, 0x00, - 0x00, 0x7c, 0x7c, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0x01, - 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/mirror_curs.h b/vcl/unx/source/inc/mirror_curs.h deleted file mode 100644 index 0f0f1b360224..000000000000 --- a/vcl/unx/source/inc/mirror_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define mirror_curs_width 32 -#define mirror_curs_height 32 -#define mirror_curs_x_hot 14 -#define mirror_curs_y_hot 12 -static char mirror_curs_bits[] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0x03, 0xf8, 0xf5, 0xff, - 0xfb, 0xfb, 0xee, 0xff, 0x0b, 0xfa, 0xf5, 0xff, 0xeb, 0xfa, 0xfa, 0xff, - 0xeb, 0xfa, 0xfa, 0xff, 0xeb, 0x7a, 0xfd, 0xff, 0xeb, 0x7a, 0xfd, 0xff, - 0xeb, 0xba, 0x7e, 0xff, 0xeb, 0xba, 0xbe, 0xfe, 0xeb, 0x5a, 0x5f, 0xfd, - 0x0b, 0x5a, 0xaf, 0xfa, 0xfb, 0xab, 0xd7, 0xf5, 0x03, 0xa8, 0xeb, 0xeb, - 0xff, 0xd7, 0xf5, 0xf5, 0xff, 0xd7, 0xfa, 0xfa, 0xff, 0x6b, 0x7d, 0xfd, - 0xff, 0xeb, 0xba, 0xfe, 0xff, 0xf5, 0x55, 0xff, 0xff, 0xf5, 0xab, 0xff, - 0xff, 0xfa, 0xd7, 0xff, 0x7f, 0xf7, 0xef, 0xff, 0xff, 0xfa, 0xff, 0xff, - 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/vcl/unx/source/inc/mirror_mask.h b/vcl/unx/source/inc/mirror_mask.h deleted file mode 100644 index da9c00435162..000000000000 --- a/vcl/unx/source/inc/mirror_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define mirror_mask_width 32 -#define mirror_mask_height 32 -static char mirror_mask_bits[] = { - 0x00, 0x00, 0x04, 0x00, 0xfe, 0x0f, 0x0e, 0x00, 0xfe, 0x0f, 0x1f, 0x00, - 0xfe, 0x8f, 0x3f, 0x00, 0xfe, 0x0f, 0x1f, 0x00, 0xfe, 0x8f, 0x0f, 0x00, - 0xbe, 0x8f, 0x0f, 0x00, 0xbe, 0xcf, 0x07, 0x00, 0xbe, 0xcf, 0x87, 0x00, - 0xbe, 0xef, 0xc3, 0x01, 0xbe, 0xef, 0xe3, 0x03, 0xfe, 0xff, 0xf1, 0x07, - 0xfe, 0xff, 0x79, 0x0f, 0xfe, 0xff, 0x3c, 0x1e, 0xfe, 0xff, 0x1e, 0x3c, - 0xfe, 0x7f, 0x0f, 0x1e, 0x00, 0xfc, 0x07, 0x0f, 0x00, 0xfe, 0x83, 0x07, - 0x00, 0xbe, 0xc7, 0x03, 0x00, 0x1f, 0xef, 0x01, 0x00, 0x1f, 0xfe, 0x00, - 0x80, 0x0f, 0x7c, 0x00, 0xc0, 0x1d, 0x38, 0x00, 0x80, 0x0f, 0x10, 0x00, - 0x00, 0x07, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/movebezierweight_curs.h b/vcl/unx/source/inc/movebezierweight_curs.h deleted file mode 100644 index a1ece2d925e9..000000000000 --- a/vcl/unx/source/inc/movebezierweight_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define movebezierweight_curs_width 32 -#define movebezierweight_curs_height 32 -#define movebezierweight_curs_x_hot 0 -#define movebezierweight_curs_y_hot 0 -static char movebezierweight_curs_bits[] = { - 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, - 0xf1, 0xff, 0xff, 0xff, 0xe1, 0xff, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xff, - 0x81, 0xff, 0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, - 0x01, 0xfc, 0xff, 0xff, 0x81, 0xff, 0xff, 0xff, 0x91, 0xff, 0xff, 0xff, - 0x99, 0xff, 0xff, 0xef, 0x3d, 0xff, 0xff, 0xef, 0x3f, 0xff, 0xff, 0xef, - 0x7f, 0xfe, 0xff, 0xf7, 0x7f, 0xfe, 0xff, 0xf7, 0xff, 0xfc, 0xff, 0xfb, - 0xff, 0x7c, 0xff, 0xec, 0xff, 0xbf, 0x0e, 0xd7, 0xff, 0x7f, 0xf3, 0xef, - 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, - 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/vcl/unx/source/inc/movebezierweight_mask.h b/vcl/unx/source/inc/movebezierweight_mask.h deleted file mode 100644 index 27e0d8c703db..000000000000 --- a/vcl/unx/source/inc/movebezierweight_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define movebezierweight_mask_width 32 -#define movebezierweight_mask_height 32 -static char movebezierweight_mask_bits[] = { - 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, - 0x1f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, - 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x10, - 0xff, 0x00, 0x00, 0x38, 0xe7, 0x01, 0x00, 0x38, 0xe3, 0x01, 0x00, 0x38, - 0xc0, 0x03, 0x00, 0x1c, 0xc0, 0x03, 0x00, 0x1c, 0x80, 0x87, 0x00, 0x1f, - 0x80, 0xc7, 0xf1, 0x3f, 0x80, 0xe7, 0xff, 0x7f, 0x00, 0xc0, 0xff, 0x38, - 0x00, 0x80, 0x0f, 0x10, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, - 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, - 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/movedata_curs.h b/vcl/unx/source/inc/movedata_curs.h deleted file mode 100644 index b79412bc3f41..000000000000 --- a/vcl/unx/source/inc/movedata_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define movedata_curs_width 32 -#define movedata_curs_height 32 -#define movedata_curs_x_hot 1 -#define movedata_curs_y_hot 1 -static char movedata_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, - 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, - 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, - 0xfe, 0x03, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, - 0x66, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, - 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x53, 0x00, 0x00, - 0x28, 0xa3, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, - 0x10, 0x40, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, - 0xa8, 0xaa, 0x00, 0x00, 0x50, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/movedata_mask.h b/vcl/unx/source/inc/movedata_mask.h deleted file mode 100644 index e25d0837d8dc..000000000000 --- a/vcl/unx/source/inc/movedata_mask.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define movedata_mask_width 32 -#define movedata_mask_height 32 -#define movedata_mask_x_hot 1 -#define movedata_mask_y_hot 1 -static char movedata_mask_bits[] = { - 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, - 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, - 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, - 0xe0, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, - 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0x3c, 0xe0, 0x01, 0x00, - 0x3c, 0xe0, 0x01, 0x00, 0x3c, 0xe0, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, - 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0xf8, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/movedlnk_curs.h b/vcl/unx/source/inc/movedlnk_curs.h deleted file mode 100644 index 56608b8153a6..000000000000 --- a/vcl/unx/source/inc/movedlnk_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define movedlnk_curs_width 32 -#define movedlnk_curs_height 32 -#define movedlnk_curs_x_hot 1 -#define movedlnk_curs_y_hot 1 -static char movedlnk_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, - 0x0e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, - 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, - 0xfe, 0x03, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, - 0x66, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, - 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x53, 0x00, 0x00, - 0x28, 0xa3, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0xf0, 0x81, 0x00, 0x00, - 0x30, 0x41, 0x00, 0x00, 0x10, 0x81, 0x00, 0x00, 0xd0, 0x41, 0x00, 0x00, - 0xf0, 0xa9, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/movedlnk_mask.h b/vcl/unx/source/inc/movedlnk_mask.h deleted file mode 100644 index 2aa3eb4b277d..000000000000 --- a/vcl/unx/source/inc/movedlnk_mask.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define movedlnk_mask_width 32 -#define movedlnk_mask_height 32 -#define movedlnk_mask_x_hot 1 -#define movedlnk_mask_y_hot 1 -static char movedlnk_mask_bits[] = { - 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, - 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, - 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, - 0xe0, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, - 0xfc, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x01, 0x00, 0xf8, 0xe3, 0x01, 0x00, - 0xf8, 0xe3, 0x01, 0x00, 0xf8, 0xe3, 0x01, 0x00, 0xf8, 0xff, 0x01, 0x00, - 0xf8, 0xff, 0x01, 0x00, 0xf8, 0xff, 0x01, 0x00, 0x00, 0xfe, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/movefile_curs.h b/vcl/unx/source/inc/movefile_curs.h deleted file mode 100644 index ed3a11e7f49d..000000000000 --- a/vcl/unx/source/inc/movefile_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define movefile_curs_width 32 -#define movefile_curs_height 32 -#define movefile_curs_x_hot 9 -#define movefile_curs_y_hot 9 -static char movefile_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00, - 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, - 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, - 0xfe, 0x02, 0x00, 0x00, 0xfe, 0x06, 0x00, 0x00, 0xfe, 0x0e, 0x00, 0x00, - 0xfe, 0x1e, 0x00, 0x00, 0xfe, 0x3e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, - 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x03, 0x00, - 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, - 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, - 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/movefile_mask.h b/vcl/unx/source/inc/movefile_mask.h deleted file mode 100644 index 668d8d7e8015..000000000000 --- a/vcl/unx/source/inc/movefile_mask.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define movefile_mask_width 32 -#define movefile_mask_height 32 -#define movefile_mask_x_hot 9 -#define movefile_mask_y_hot 9 -static char movefile_mask_bits[] = { - 0xff, 0x01, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, - 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, - 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, - 0xff, 0x0f, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, - 0xff, 0x7f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, - 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, - 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, - 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, 0xe0, 0x03, 0x00, - 0x00, 0xc0, 0x07, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x80, 0x07, 0x00, - 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/movefiles_curs.h b/vcl/unx/source/inc/movefiles_curs.h deleted file mode 100644 index 148fe2e72a5e..000000000000 --- a/vcl/unx/source/inc/movefiles_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define movefiles_curs_width 32 -#define movefiles_curs_height 32 -#define movefiles_curs_x_hot 8 -#define movefiles_curs_y_hot 9 -static char movefiles_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0xe0, 0x2f, 0x00, 0x00, - 0xe8, 0x0f, 0x00, 0x00, 0xe8, 0x7f, 0x00, 0x00, 0xea, 0x7f, 0x00, 0x00, - 0xea, 0x7f, 0x00, 0x00, 0xea, 0x7f, 0x00, 0x00, 0x6a, 0x7e, 0x00, 0x00, - 0x6a, 0x7d, 0x00, 0x00, 0x6a, 0x7b, 0x00, 0x00, 0x6a, 0x77, 0x00, 0x00, - 0x6a, 0x6f, 0x00, 0x00, 0x6a, 0x5f, 0x00, 0x00, 0x0a, 0x3f, 0x00, 0x00, - 0x7a, 0x7f, 0x00, 0x00, 0x02, 0xff, 0x00, 0x00, 0x7e, 0xff, 0x01, 0x00, - 0x00, 0x3f, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, - 0x00, 0x61, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, - 0x00, 0xc0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/movefiles_mask.h b/vcl/unx/source/inc/movefiles_mask.h deleted file mode 100644 index dc990dc5cb61..000000000000 --- a/vcl/unx/source/inc/movefiles_mask.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define movefiles_mask_width 32 -#define movefiles_mask_height 32 -#define movefiles_mask_x_hot 8 -#define movefiles_mask_y_hot 9 -static char movefiles_mask_bits[] = { - 0xf0, 0x1f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, - 0xfc, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x03, 0x00, 0xff, 0xff, 0x03, 0x00, - 0xff, 0xff, 0x03, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, - 0x80, 0xff, 0x00, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0xf0, 0x01, 0x00, - 0x00, 0xe0, 0x03, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, - 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/moveflnk_curs.h b/vcl/unx/source/inc/moveflnk_curs.h deleted file mode 100644 index 7f48bc4506fc..000000000000 --- a/vcl/unx/source/inc/moveflnk_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define moveflnk_curs_width 32 -#define moveflnk_curs_height 32 -#define moveflnk_curs_x_hot 9 -#define moveflnk_curs_y_hot 9 -static char moveflnk_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00, - 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, - 0xfe, 0x07, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, - 0xbe, 0x02, 0x00, 0x00, 0xa6, 0x06, 0x00, 0x00, 0xa2, 0x0e, 0x00, 0x00, - 0xba, 0x1e, 0x00, 0x00, 0xbe, 0x3e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, - 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x03, 0x00, - 0x00, 0x7e, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, - 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, - 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/moveflnk_mask.h b/vcl/unx/source/inc/moveflnk_mask.h deleted file mode 100644 index a25b7ee18960..000000000000 --- a/vcl/unx/source/inc/moveflnk_mask.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define moveflnk_mask_width 32 -#define moveflnk_mask_height 32 -#define moveflnk_mask_x_hot 9 -#define moveflnk_mask_y_hot 9 -static char moveflnk_mask_bits[] = { - 0xff, 0x01, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, - 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, - 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, - 0xff, 0x0f, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, - 0xff, 0x7f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, - 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, - 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, - 0x00, 0xff, 0x01, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, 0xe0, 0x03, 0x00, - 0x00, 0xc0, 0x07, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x80, 0x07, 0x00, - 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/movepoint_curs.h b/vcl/unx/source/inc/movepoint_curs.h deleted file mode 100644 index e3b20bd8edf9..000000000000 --- a/vcl/unx/source/inc/movepoint_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define movepoint_curs_width 32 -#define movepoint_curs_height 32 -#define movepoint_curs_x_hot 0 -#define movepoint_curs_y_hot 0 -static char movepoint_curs_bits[] = { - 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, - 0xf1, 0xff, 0xff, 0xff, 0xe1, 0xff, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xff, - 0x81, 0xff, 0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, - 0x01, 0xfc, 0xff, 0xff, 0x81, 0xff, 0xff, 0xff, 0x91, 0xff, 0xff, 0xff, - 0x39, 0xff, 0xff, 0xff, 0x3d, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, - 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xfc, 0x83, 0xff, 0xff, 0xfc, 0x83, 0xff, - 0xff, 0xff, 0x83, 0xff, 0xff, 0xff, 0x83, 0xff, 0xff, 0xff, 0x83, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/vcl/unx/source/inc/movepoint_mask.h b/vcl/unx/source/inc/movepoint_mask.h deleted file mode 100644 index e4fae36c023c..000000000000 --- a/vcl/unx/source/inc/movepoint_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define movepoint_mask_width 32 -#define movepoint_mask_height 32 -static char movepoint_mask_bits[] = { - 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, - 0x1f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, - 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xef, 0x01, 0x00, 0x00, 0xe7, 0x01, 0x00, 0x00, 0xc3, 0x03, 0x00, 0x00, - 0xc0, 0x03, 0xfe, 0x00, 0x80, 0x07, 0xfe, 0x00, 0x80, 0x07, 0xfe, 0x00, - 0x80, 0x07, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x00, - 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/nodrop_curs.h b/vcl/unx/source/inc/nodrop_curs.h deleted file mode 100644 index 8e208e32f293..000000000000 --- a/vcl/unx/source/inc/nodrop_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define nodrop_curs_width 32 -#define nodrop_curs_height 32 -#define nodrop_curs_x_hot 9 -#define nodrop_curs_y_hot 9 -static char nodrop_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, - 0xf8, 0x7f, 0x00, 0x00, 0x7c, 0xf8, 0x00, 0x00, 0x1c, 0xfc, 0x00, 0x00, - 0x1e, 0xfe, 0x01, 0x00, 0x0e, 0xdf, 0x01, 0x00, 0x8e, 0xcf, 0x01, 0x00, - 0xce, 0xc7, 0x01, 0x00, 0xee, 0xc3, 0x01, 0x00, 0xfe, 0xe1, 0x01, 0x00, - 0xfc, 0xe0, 0x00, 0x00, 0x7c, 0xf8, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, - 0xf0, 0x3f, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/nodrop_mask.h b/vcl/unx/source/inc/nodrop_mask.h deleted file mode 100644 index 7cbecef2c60f..000000000000 --- a/vcl/unx/source/inc/nodrop_mask.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define nodrop_mask_width 32 -#define nodrop_mask_height 32 -#define nodrop_mask_x_hot 9 -#define nodrop_mask_y_hot 9 -static char nodrop_mask_bits[] = { - 0xc0, 0x0f, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, - 0xfc, 0xff, 0x00, 0x00, 0xfe, 0xff, 0x01, 0x00, 0x7e, 0xfe, 0x01, 0x00, - 0x3f, 0xff, 0x03, 0x00, 0x9f, 0xff, 0x03, 0x00, 0xdf, 0xff, 0x03, 0x00, - 0xff, 0xef, 0x03, 0x00, 0xff, 0xe7, 0x03, 0x00, 0xff, 0xf3, 0x03, 0x00, - 0xfe, 0xf9, 0x01, 0x00, 0xfe, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x00, 0x00, - 0xf8, 0x7f, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/null_curs.h b/vcl/unx/source/inc/null_curs.h deleted file mode 100644 index 19d4130d4b5d..000000000000 --- a/vcl/unx/source/inc/null_curs.h +++ /dev/null @@ -1,31 +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. - * - ************************************************************************/ -#define nullcurs_width 4 -#define nullcurs_height 4 -#define nullcurs_x_hot 2 -#define nullcurs_y_hot 2 -static char nullcurs_bits[] = { 0x00, 0x00 }; diff --git a/vcl/unx/source/inc/null_mask.h b/vcl/unx/source/inc/null_mask.h deleted file mode 100644 index a657cfa54af4..000000000000 --- a/vcl/unx/source/inc/null_mask.h +++ /dev/null @@ -1,29 +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. - * - ************************************************************************/ -#define nullmask_width 4 -#define nullmask_height 4 -static char nullmask_bits[] = { 0x00, 0x00 }; diff --git a/vcl/unx/source/inc/paintbrush_curs.h b/vcl/unx/source/inc/paintbrush_curs.h deleted file mode 100644 index 5dfd18a539a6..000000000000 --- a/vcl/unx/source/inc/paintbrush_curs.h +++ /dev/null @@ -1,8 +0,0 @@ -#define paintbrush_curs_width 16 -#define paintbrush_curs_height 16 -#define paintbrush_curs_x_hot 0 -#define paintbrush_curs_y_hot 10 -static char paintbrush_curs_bits[] = { - 0x00, 0x80, 0x00, 0x40, 0x00, 0x20, 0x00, 0x90, 0x80, 0xcb, 0x60, 0x64, - 0x90, 0x34, 0x08, 0x19, 0x06, 0x22, 0x11, 0x24, 0x09, 0x18, 0x46, 0x14, - 0x24, 0x0a, 0x18, 0x05, 0x90, 0x02, 0xe0, 0x01 }; diff --git a/vcl/unx/source/inc/paintbrush_mask.h b/vcl/unx/source/inc/paintbrush_mask.h deleted file mode 100644 index a5b5617b820f..000000000000 --- a/vcl/unx/source/inc/paintbrush_mask.h +++ /dev/null @@ -1,7 +0,0 @@ -#define paintbrush_mask_width 16 -#define paintbrush_mask_height 16 -static char paintbrush_mask_bits[] = { - 0x00, 0x80, 0x00, 0xc0, 0x00, 0xe0, 0x00, 0xf0, 0x80, 0xfb, 0xe0, 0x7f, - 0xf0, 0x3f, 0xf8, 0x1f, 0xfe, 0x3f, 0xff, 0x3f, 0xff, 0x1f, 0xfe, 0x1f, - 0xfc, 0x0f, 0xf8, 0x07, 0xf0, 0x03, 0xe0, 0x01 }; - diff --git a/vcl/unx/source/inc/pivotcol_curs.h b/vcl/unx/source/inc/pivotcol_curs.h deleted file mode 100644 index 22873985daf0..000000000000 --- a/vcl/unx/source/inc/pivotcol_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define pivotcol_curs_width 32 -#define pivotcol_curs_height 32 -#define pivotcol_curs_x_hot 7 -#define pivotcol_curs_y_hot 5 -static char pivotcol_curs_bits[] = { - 0xff, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x55, 0x01, 0x00, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x15, 0x01, 0x00, 0x00, 0xa9, 0x00, 0x00, 0x00, - 0x95, 0x01, 0x00, 0x00, 0xa9, 0x02, 0x00, 0x00, 0x95, 0x04, 0x00, 0x00, - 0xa9, 0x08, 0x00, 0x00, 0x95, 0x10, 0x00, 0x00, 0xa9, 0x20, 0x00, 0x00, - 0x95, 0x40, 0x00, 0x00, 0xa9, 0x80, 0x00, 0x00, 0x95, 0x00, 0x01, 0x00, - 0xa9, 0xe0, 0x03, 0x00, 0x95, 0x2c, 0x00, 0x00, 0xbd, 0x4a, 0x00, 0x00, - 0xbf, 0x51, 0x00, 0x00, 0x80, 0x90, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, - 0x00, 0x20, 0x01, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/unx/source/inc/pivotcol_mask.h b/vcl/unx/source/inc/pivotcol_mask.h deleted file mode 100644 index 911eede87ed4..000000000000 --- a/vcl/unx/source/inc/pivotcol_mask.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define pivotcol_mask_width 32 -#define pivotcol_mask_height 32 -#define pivotcol_mask_x_hot 7 -#define pivotcol_mask_y_hot 5 -static char pivotcol_mask_bits[] = { - 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, - 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, - 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, - 0xff, 0x0f, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, - 0xff, 0x7f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, - 0xff, 0xff, 0x03, 0x00, 0xff, 0x3f, 0x00, 0x00, 0xff, 0x7b, 0x00, 0x00, - 0xff, 0x71, 0x00, 0x00, 0x80, 0xf0, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, - 0x00, 0xe0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/unx/source/inc/pivotdel_curs.h b/vcl/unx/source/inc/pivotdel_curs.h deleted file mode 100644 index e0dcbc14a6d6..000000000000 --- a/vcl/unx/source/inc/pivotdel_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define pivotdel_curs_width 32 -#define pivotdel_curs_height 32 -#define pivotdel_curs_x_hot 9 -#define pivotdel_curs_y_hot 8 -static char pivotdel_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x80, 0x01, 0x00, - 0x3c, 0xc0, 0x00, 0x00, 0x73, 0x6f, 0x07, 0x00, 0xe1, 0x30, 0x04, 0x00, - 0xc1, 0x1d, 0x04, 0x00, 0x81, 0x0f, 0x04, 0x00, 0x01, 0x07, 0x04, 0x00, - 0x81, 0x0f, 0x04, 0x00, 0xc1, 0x1d, 0x04, 0x00, 0xe1, 0x38, 0x04, 0x00, - 0x77, 0xaf, 0x07, 0x00, 0x78, 0x40, 0x00, 0x00, 0x3c, 0x80, 0x00, 0x00, - 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/unx/source/inc/pivotdel_mask.h b/vcl/unx/source/inc/pivotdel_mask.h deleted file mode 100644 index 147bc2da410d..000000000000 --- a/vcl/unx/source/inc/pivotdel_mask.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define pivotdel_mask_width 32 -#define pivotdel_mask_height 32 -#define pivotdel_mask_x_hot 9 -#define pivotdel_mask_y_hot 8 -static char pivotdel_mask_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x80, 0x01, 0x00, - 0x3c, 0xc0, 0x00, 0x00, 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, - 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, - 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, - 0xff, 0xff, 0x07, 0x00, 0x78, 0x40, 0x00, 0x00, 0x3c, 0x80, 0x00, 0x00, - 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/unx/source/inc/pivotfld_curs.h b/vcl/unx/source/inc/pivotfld_curs.h deleted file mode 100644 index 1daf4f553275..000000000000 --- a/vcl/unx/source/inc/pivotfld_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define pivotfld_curs_width 32 -#define pivotfld_curs_height 32 -#define pivotfld_curs_x_hot 8 -#define pivotfld_curs_y_hot 7 -static char pivotfld_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0x00, - 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x04, 0x00, - 0x01, 0x00, 0x04, 0x00, 0x01, 0x01, 0x04, 0x00, 0x01, 0x03, 0x04, 0x00, - 0x01, 0x05, 0x04, 0x00, 0x7f, 0xc9, 0x07, 0x00, 0x00, 0x11, 0x00, 0x00, - 0x00, 0x21, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, - 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0xc1, 0x07, 0x00, - 0x00, 0x59, 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0xa3, 0x00, 0x00, - 0x00, 0x21, 0x01, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x40, 0x02, 0x00, - 0x00, 0x80, 0x02, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/unx/source/inc/pivotfld_mask.h b/vcl/unx/source/inc/pivotfld_mask.h deleted file mode 100644 index 6d62d8bbda46..000000000000 --- a/vcl/unx/source/inc/pivotfld_mask.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define pivotfld_mask_width 32 -#define pivotfld_mask_height 32 -#define pivotfld_mask_x_hot 8 -#define pivotfld_mask_y_hot 7 -static char pivotfld_mask_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0x00, - 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, - 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, - 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, 0x00, 0x1f, 0x00, 0x00, - 0x00, 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, - 0x00, 0x7f, 0x00, 0x00, 0x00, 0xf7, 0x00, 0x00, 0x00, 0xe3, 0x00, 0x00, - 0x00, 0xe1, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00, - 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/unx/source/inc/pivotrow_curs.h b/vcl/unx/source/inc/pivotrow_curs.h deleted file mode 100644 index 75f4965f2582..000000000000 --- a/vcl/unx/source/inc/pivotrow_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define pivotrow_curs_width 32 -#define pivotrow_curs_height 32 -#define pivotrow_curs_x_hot 8 -#define pivotrow_curs_y_hot 7 -static char pivotrow_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0x00, - 0x01, 0x00, 0x04, 0x00, 0x55, 0x55, 0x07, 0x00, 0xa9, 0xaa, 0x06, 0x00, - 0x55, 0x54, 0x07, 0x00, 0x29, 0xa9, 0x06, 0x00, 0x55, 0x53, 0x07, 0x00, - 0x29, 0xa5, 0x06, 0x00, 0x7f, 0xc9, 0x07, 0x00, 0x00, 0x11, 0x00, 0x00, - 0x00, 0x21, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, - 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0xc1, 0x07, 0x00, - 0x00, 0x59, 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0xa3, 0x00, 0x00, - 0x00, 0x21, 0x01, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x40, 0x02, 0x00, - 0x00, 0x80, 0x02, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/unx/source/inc/pivotrow_mask.h b/vcl/unx/source/inc/pivotrow_mask.h deleted file mode 100644 index a8896d0975f9..000000000000 --- a/vcl/unx/source/inc/pivotrow_mask.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define pivotrow_mask_width 32 -#define pivotrow_mask_height 32 -#define pivotrow_curs_x_hot 8 -#define pivotrow_curs_y_hot 7 -static char pivotrow_mask_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0x00, - 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, - 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, - 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0x00, 0x00, 0x1f, 0x00, 0x00, - 0x00, 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0xff, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, - 0x00, 0x7f, 0x00, 0x00, 0x00, 0xf7, 0x00, 0x00, 0x00, 0xe3, 0x00, 0x00, - 0x00, 0xe1, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00, - 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/unx/source/inc/rotate_curs.h b/vcl/unx/source/inc/rotate_curs.h deleted file mode 100644 index f9c57674dfb2..000000000000 --- a/vcl/unx/source/inc/rotate_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define rotate_curs_width 32 -#define rotate_curs_height 32 -#define rotate_curs_x_hot 15 -#define rotate_curs_y_hot 15 -static char rotate_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, - 0x00, 0xc0, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0xd8, 0x00, 0x00, - 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0xc0, 0x01, 0x80, 0x00, 0xe0, 0x03, 0x80, 0x00, 0x80, 0x00, - 0x00, 0x01, 0x40, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x02, 0x20, 0x00, - 0x00, 0x04, 0x10, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0xe0, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/rotate_mask.h b/vcl/unx/source/inc/rotate_mask.h deleted file mode 100644 index 9fcff18925f0..000000000000 --- a/vcl/unx/source/inc/rotate_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define rotate_mask_width 32 -#define rotate_mask_height 32 -static char rotate_mask_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, - 0x00, 0xe0, 0x01, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0xfc, 0x01, 0x00, - 0x00, 0xfe, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, - 0x80, 0x03, 0x00, 0x00, 0xc0, 0x01, 0x80, 0x00, 0xc0, 0x01, 0xc0, 0x01, - 0xc0, 0x01, 0xe0, 0x03, 0xc0, 0x01, 0xf0, 0x07, 0xc0, 0x01, 0xf0, 0x07, - 0x80, 0x03, 0xe0, 0x00, 0x80, 0x03, 0xe0, 0x00, 0x00, 0x07, 0x70, 0x00, - 0x00, 0x1e, 0x3c, 0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0xf8, 0x0f, 0x00, - 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/salcursors.h b/vcl/unx/source/inc/salcursors.h deleted file mode 100644 index e8a63d6195aa..000000000000 --- a/vcl/unx/source/inc/salcursors.h +++ /dev/null @@ -1,162 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "nodrop_curs.h" -#include "nodrop_mask.h" -#include "magnify_curs.h" -#include "magnify_mask.h" -#include "rotate_curs.h" -#include "rotate_mask.h" -#include "hshear_curs.h" -#include "hshear_mask.h" -#include "vshear_curs.h" -#include "vshear_mask.h" -#include "drawline_curs.h" -#include "drawline_mask.h" -#include "drawrect_curs.h" -#include "drawrect_mask.h" -#include "drawpolygon_curs.h" -#include "drawpolygon_mask.h" -#include "drawbezier_curs.h" -#include "drawbezier_mask.h" -#include "drawarc_curs.h" -#include "drawarc_mask.h" -#include "drawpie_curs.h" -#include "drawpie_mask.h" -#include "drawcirclecut_curs.h" -#include "drawcirclecut_mask.h" -#include "drawellipse_curs.h" -#include "drawellipse_mask.h" -#include "drawconnect_curs.h" -#include "drawconnect_mask.h" -#include "drawtext_curs.h" -#include "drawtext_mask.h" -#include "mirror_curs.h" -#include "mirror_mask.h" -#include "crook_curs.h" -#include "crook_mask.h" -#include "crop_curs.h" -#include "crop_mask.h" -#include "movepoint_curs.h" -#include "movepoint_mask.h" -#include "movebezierweight_curs.h" -#include "movebezierweight_mask.h" -#include "drawfreehand_curs.h" -#include "drawfreehand_mask.h" -#include "drawcaption_curs.h" -#include "drawcaption_mask.h" -#include "movedata_curs.h" -#include "movedata_mask.h" -#include "copydata_curs.h" -#include "copydata_mask.h" -#include "linkdata_curs.h" -#include "linkdata_mask.h" -#include "movedlnk_curs.h" -#include "movedlnk_mask.h" -#include "copydlnk_curs.h" -#include "copydlnk_mask.h" -#include "movefile_curs.h" -#include "movefile_mask.h" -#include "copyfile_curs.h" -#include "copyfile_mask.h" -#include "linkfile_curs.h" -#include "linkfile_mask.h" -#include "moveflnk_curs.h" -#include "moveflnk_mask.h" -#include "copyflnk_curs.h" -#include "copyflnk_mask.h" -#include "movefiles_curs.h" -#include "movefiles_mask.h" -#include "copyfiles_curs.h" -#include "copyfiles_mask.h" - -#include "chart_curs.h" -#include "chart_mask.h" -#include "detective_curs.h" -#include "detective_mask.h" -#include "pivotcol_curs.h" -#include "pivotcol_mask.h" -#include "pivotfld_curs.h" -#include "pivotfld_mask.h" -#include "pivotrow_curs.h" -#include "pivotrow_mask.h" -#include "pivotdel_curs.h" -#include "pivotdel_mask.h" - -#include "chain_curs.h" -#include "chain_mask.h" -#include "chainnot_curs.h" -#include "chainnot_mask.h" - -#include "timemove_curs.h" -#include "timemove_mask.h" -#include "timesize_curs.h" -#include "timesize_mask.h" - -#include "ase_curs.h" -#include "ase_mask.h" -#include "asn_curs.h" -#include "asn_mask.h" -#include "asne_curs.h" -#include "asne_mask.h" -#include "asns_curs.h" -#include "asns_mask.h" -#include "asnswe_curs.h" -#include "asnswe_mask.h" -#include "asnw_curs.h" -#include "asnw_mask.h" -#include "ass_curs.h" -#include "ass_mask.h" -#include "asse_curs.h" -#include "asse_mask.h" -#include "assw_curs.h" -#include "assw_mask.h" -#include "asw_curs.h" -#include "asw_mask.h" -#include "aswe_curs.h" -#include "aswe_mask.h" -#include "null_curs.h" -#include "null_mask.h" - -#include "airbrush_curs.h" -#include "airbrush_mask.h" -#include "fill_curs.h" -#include "fill_mask.h" -#include "vertcurs_curs.h" -#include "vertcurs_mask.h" -#include "tblsele_curs.h" -#include "tblsele_mask.h" -#include "tblsels_curs.h" -#include "tblsels_mask.h" -#include "tblselse_curs.h" -#include "tblselse_mask.h" -#include "tblselw_curs.h" -#include "tblselw_mask.h" -#include "tblselsw_curs.h" -#include "tblselsw_mask.h" -#include "paintbrush_curs.h" -#include "paintbrush_mask.h" diff --git a/vcl/unx/source/inc/tblsele_curs.h b/vcl/unx/source/inc/tblsele_curs.h deleted file mode 100644 index 7ad1314d1957..000000000000 --- a/vcl/unx/source/inc/tblsele_curs.h +++ /dev/null @@ -1,8 +0,0 @@ -#define tblsele_curs_width 16 -#define tblsele_curs_height 16 -#define tblsele_curs_x_hot 14 -#define tblsele_curs_y_hot 8 -static char tblsele_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0c, - 0x00, 0x1c, 0xfc, 0x3f, 0xfc, 0x7f, 0xfc, 0x3f, 0x00, 0x1c, 0x00, 0x0c, - 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/unx/source/inc/tblsele_mask.h b/vcl/unx/source/inc/tblsele_mask.h deleted file mode 100644 index bb35c22c97cb..000000000000 --- a/vcl/unx/source/inc/tblsele_mask.h +++ /dev/null @@ -1,7 +0,0 @@ -#define tblsele_mask_width 16 -#define tblsele_mask_height 16 -static char tblsele_mask_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0e, 0x00, 0x1e, - 0xfe, 0x3f, 0xfe, 0x7f, 0xfe, 0xff, 0xfe, 0x7f, 0xfe, 0x3f, 0x00, 0x1e, - 0x00, 0x0e, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00 }; - diff --git a/vcl/unx/source/inc/tblsels_curs.h b/vcl/unx/source/inc/tblsels_curs.h deleted file mode 100644 index 0bf38d4b3fdb..000000000000 --- a/vcl/unx/source/inc/tblsels_curs.h +++ /dev/null @@ -1,9 +0,0 @@ -#define tblsels_curs_width 16 -#define tblsels_curs_height 16 -#define tblsels_curs_x_hot 7 -#define tblsels_curs_y_hot 14 -static char tblsels_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, - 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xf8, 0x0f, 0xf0, 0x07, - 0xe0, 0x03, 0xc0, 0x01, 0x80, 0x00, 0x00, 0x00 }; - diff --git a/vcl/unx/source/inc/tblsels_mask.h b/vcl/unx/source/inc/tblsels_mask.h deleted file mode 100644 index 9ba3b51d8d76..000000000000 --- a/vcl/unx/source/inc/tblsels_mask.h +++ /dev/null @@ -1,7 +0,0 @@ -#define tblsels_mask_width 16 -#define tblsels_mask_height 16 -static char tblsels_mask_bits[] = { - 0x00, 0x00, 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, - 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xfc, 0x1f, 0xfc, 0x1f, 0xf8, 0x0f, - 0xf0, 0x07, 0xe0, 0x03, 0xc0, 0x01, 0x80, 0x00 }; - diff --git a/vcl/unx/source/inc/tblselse_curs.h b/vcl/unx/source/inc/tblselse_curs.h deleted file mode 100644 index 208c7c59dc2d..000000000000 --- a/vcl/unx/source/inc/tblselse_curs.h +++ /dev/null @@ -1,8 +0,0 @@ -#define tblselse_curs_width 16 -#define tblselse_curs_height 16 -#define tblselse_curs_x_hot 14 -#define tblselse_curs_y_hot 14 -static char tblselse_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0xf0, 0x00, - 0xf0, 0x01, 0xe0, 0x03, 0xc0, 0x47, 0x80, 0x6f, 0x00, 0x7f, 0x00, 0x7e, - 0x00, 0x7c, 0x00, 0x7e, 0x00, 0x7f, 0x00, 0x00 }; diff --git a/vcl/unx/source/inc/tblselse_mask.h b/vcl/unx/source/inc/tblselse_mask.h deleted file mode 100644 index 4c4c97ad4ccf..000000000000 --- a/vcl/unx/source/inc/tblselse_mask.h +++ /dev/null @@ -1,7 +0,0 @@ -#define tblselse_mask_width 16 -#define tblselse_mask_height 16 -static char tblselse_mask_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0xf0, 0x00, 0xf8, 0x01, - 0xf8, 0x03, 0xf0, 0xc7, 0xe0, 0xef, 0xc0, 0xff, 0x80, 0xff, 0x00, 0xff, - 0x00, 0xfe, 0x00, 0xff, 0x80, 0xff, 0x80, 0xff }; - diff --git a/vcl/unx/source/inc/tblselsw_curs.h b/vcl/unx/source/inc/tblselsw_curs.h deleted file mode 100644 index a3166a27ca52..000000000000 --- a/vcl/unx/source/inc/tblselsw_curs.h +++ /dev/null @@ -1,8 +0,0 @@ -#define tblselsw_curs_width 16 -#define tblselsw_curs_height 16 -#define tblselsw_curs_x_hot 1 -#define tblselsw_curs_y_hot 14 -static char tblselsw_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0f, - 0x80, 0x0f, 0xc0, 0x07, 0xe2, 0x03, 0xf6, 0x01, 0xfe, 0x00, 0x7e, 0x00, - 0x3e, 0x00, 0x7e, 0x00, 0xfe, 0x00, 0x00, 0x00 }; diff --git a/vcl/unx/source/inc/tblselsw_mask.h b/vcl/unx/source/inc/tblselsw_mask.h deleted file mode 100644 index 3981cbaa884d..000000000000 --- a/vcl/unx/source/inc/tblselsw_mask.h +++ /dev/null @@ -1,7 +0,0 @@ -#define tblselsw_mask_width 16 -#define tblselsw_mask_height 16 -static char tblselsw_mask_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0f, 0x80, 0x1f, - 0xc0, 0x1f, 0xe3, 0x0f, 0xf7, 0x07, 0xff, 0x03, 0xff, 0x01, 0xff, 0x00, - 0x7f, 0x00, 0xff, 0x00, 0xff, 0x01, 0xff, 0x01 }; - diff --git a/vcl/unx/source/inc/tblselw_curs.h b/vcl/unx/source/inc/tblselw_curs.h deleted file mode 100644 index 9d802d094ef8..000000000000 --- a/vcl/unx/source/inc/tblselw_curs.h +++ /dev/null @@ -1,8 +0,0 @@ -#define tblselw_curs_width 16 -#define tblselw_curs_height 16 -#define tblselw_curs_x_hot 1 -#define tblselw_curs_y_hot 8 -static char tblselw_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x30, 0x00, - 0x38, 0x00, 0xfc, 0x3f, 0xfe, 0x3f, 0xfc, 0x3f, 0x38, 0x00, 0x30, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/unx/source/inc/tblselw_mask.h b/vcl/unx/source/inc/tblselw_mask.h deleted file mode 100644 index 940668e3db7f..000000000000 --- a/vcl/unx/source/inc/tblselw_mask.h +++ /dev/null @@ -1,6 +0,0 @@ -#define tblselw_mask_width 16 -#define tblselw_mask_height 16 -static char tblselw_mask_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x70, 0x00, 0x78, 0x00, - 0xfc, 0x7f, 0xfe, 0x7f, 0xff, 0x7f, 0xfe, 0x7f, 0xfc, 0x7f, 0x78, 0x00, - 0x70, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/vcl/unx/source/inc/timemove_curs.h b/vcl/unx/source/inc/timemove_curs.h deleted file mode 100644 index 252a702caf77..000000000000 --- a/vcl/unx/source/inc/timemove_curs.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define timemove_curs_width 32 -#define timemove_curs_height 32 -#define timemove_curs_x_hot 16 -#define timemove_curs_y_hot 16 -static char timemove_curs_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x80,0x03,0x00,0x00,0xc0,0x07,0x00,0x00, - 0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0xff,0xff,0x01, - 0x00,0x01,0x01,0x01,0x00,0x01,0x01,0x01,0x00,0x01,0x01,0x01,0x00,0xff,0xff, - 0x01,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0xc0, - 0x07,0x00,0x00,0x80,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/timemove_mask.h b/vcl/unx/source/inc/timemove_mask.h deleted file mode 100644 index b7a9542a64c6..000000000000 --- a/vcl/unx/source/inc/timemove_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define timemove_mask_width 32 -#define timemove_mask_height 32 -#define timemove_mask_x_hot 16 -#define timemove_mask_y_hot 16 -static char timemove_mask_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x00,0x00,0x80,0x03,0x00,0x00,0xc0,0x07,0x00,0x00,0xe0,0x0f,0x00,0x00, - 0xc0,0x07,0x00,0x00,0x80,0x03,0x00,0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03, - 0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff, - 0x03,0x80,0xff,0xff,0x03,0x00,0x80,0x03,0x00,0x00,0xc0,0x07,0x00,0x00,0xe0, - 0x0f,0x00,0x00,0xc0,0x07,0x00,0x00,0x80,0x03,0x00,0x00,0x00,0x01,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/timesize_curs.h b/vcl/unx/source/inc/timesize_curs.h deleted file mode 100644 index 61e53971290e..000000000000 --- a/vcl/unx/source/inc/timesize_curs.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define timesize_curs_width 32 -#define timesize_curs_height 32 -#define timesize_curs_x_hot 16 -#define timesize_curs_y_hot 16 -static char timesize_curs_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0xff,0xff,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00, - 0x01,0x01,0x01,0x00,0x81,0x03,0x01,0x00,0xc1,0x07,0x01,0x00,0x01,0x01,0x01, - 0x00,0x01,0x01,0x01,0x00,0x01,0x01,0x01,0x00,0xff,0xff,0x01,0x00,0x00,0x01, - 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0xc0,0x07,0x00,0x00,0x80, - 0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/timesize_mask.h b/vcl/unx/source/inc/timesize_mask.h deleted file mode 100644 index 3c4333c5e7b8..000000000000 --- a/vcl/unx/source/inc/timesize_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define timesize_mask_width 32 -#define timesize_mask_height 32 -#define timesize_mask_x_hot 16 -#define timesize_mask_y_hot 16 -static char timesize_mask_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff, - 0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80, - 0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03, - 0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff,0x03,0x80,0xff,0xff, - 0x03,0x00,0x80,0x03,0x00,0x00,0xc0,0x07,0x00,0x00,0xe0,0x0f,0x00,0x00,0xc0, - 0x07,0x00,0x00,0x80,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/vcl/unx/source/inc/vertcurs_curs.h b/vcl/unx/source/inc/vertcurs_curs.h deleted file mode 100644 index d67251a1743d..000000000000 --- a/vcl/unx/source/inc/vertcurs_curs.h +++ /dev/null @@ -1,8 +0,0 @@ -#define vertcurs_curs_width 16 -#define vertcurs_curs_height 16 -#define vertcurs_curs_x_hot 8 -#define vertcurs_curs_y_hot 8 -static char vertcurs_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x02, 0x40, - 0x06, 0x60, 0xfc, 0x3f, 0x06, 0x60, 0x02, 0x40, 0x02, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/vertcurs_mask.h b/vcl/unx/source/inc/vertcurs_mask.h deleted file mode 100644 index 769d6966571f..000000000000 --- a/vcl/unx/source/inc/vertcurs_mask.h +++ /dev/null @@ -1,8 +0,0 @@ -#define vertcurs_mask_width 16 -#define vertcurs_mask_height 16 -#define vertcurs_mask_x_hot 8 -#define vertcurs_mask_y_hot 8 -static char vertcurs_mask_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0, 0x07, 0xe0, 0x0f, 0xf0, - 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0x0f, 0xf0, 0x07, 0xe0, 0x07, 0xe0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/vshear_curs.h b/vcl/unx/source/inc/vshear_curs.h deleted file mode 100644 index 87357c0a5027..000000000000 --- a/vcl/unx/source/inc/vshear_curs.h +++ /dev/null @@ -1,42 +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. - * - ************************************************************************/ -#define vshear_curs_width 32 -#define vshear_curs_height 32 -#define vshear_curs_x_hot 15 -#define vshear_curs_y_hot 15 -static char vshear_curs_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, - 0x00, 0x20, 0x04, 0x00, 0x00, 0x30, 0x04, 0x00, 0x00, 0x30, 0x04, 0x00, - 0x00, 0x38, 0x04, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, 0x20, 0x04, 0x00, - 0x00, 0x20, 0x04, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x20, 0x04, 0x00, - 0x00, 0x20, 0x1c, 0x00, 0x00, 0x20, 0x1c, 0x00, 0x00, 0x20, 0x0c, 0x00, - 0x00, 0x20, 0x0c, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x20, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/inc/vshear_mask.h b/vcl/unx/source/inc/vshear_mask.h deleted file mode 100644 index be77728c13f9..000000000000 --- a/vcl/unx/source/inc/vshear_mask.h +++ /dev/null @@ -1,40 +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. - * - ************************************************************************/ -#define vshear_mask_width 32 -#define vshear_mask_height 32 -static char vshear_mask_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 0x70, 0x0e, 0x00, - 0x00, 0x70, 0x0e, 0x00, 0x00, 0x78, 0x0e, 0x00, 0x00, 0x78, 0x0e, 0x00, - 0x00, 0x7c, 0x0e, 0x00, 0x00, 0x7c, 0x0e, 0x00, 0x00, 0x7c, 0x0e, 0x00, - 0x00, 0x70, 0x0e, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 0x70, 0x3e, 0x00, - 0x00, 0x70, 0x3e, 0x00, 0x00, 0x70, 0x3e, 0x00, 0x00, 0x70, 0x1e, 0x00, - 0x00, 0x70, 0x1e, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 0x70, 0x0e, 0x00, - 0x00, 0x70, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/vcl/unx/source/plugadapt/makefile.mk b/vcl/unx/source/plugadapt/makefile.mk deleted file mode 100644 index af409c04af35..000000000000 --- a/vcl/unx/source/plugadapt/makefile.mk +++ /dev/null @@ -1,59 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=salplug - -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"!="unx" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"!="unx" - -CFLAGS+=-DSAL_DLLPOSTFIX=\"$(DLLPOSTFIX)\" - -SLOFILES=$(SLO)$/salplug.obj - -.ENDIF # "$(GUIBASE)"!="unx" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/vcl/unx/source/plugadapt/salplug.cxx b/vcl/unx/source/plugadapt/salplug.cxx deleted file mode 100644 index fd49ee34f543..000000000000 --- a/vcl/unx/source/plugadapt/salplug.cxx +++ /dev/null @@ -1,303 +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_vcl.hxx" - -#include "osl/module.h" -#include "osl/process.h" - -#include "rtl/ustrbuf.hxx" - - -#include "vcl/salinst.hxx" -#include "saldata.hxx" -#include "vcl/printerinfomanager.hxx" - -#include -#include - -using namespace rtl; - -extern "C" { -typedef SalInstance*(*salFactoryProc)( oslModule pModule); -} - -static oslModule pCloseModule = NULL; - -enum { - DESKTOP_NONE = 0, - DESKTOP_UNKNOWN, - DESKTOP_GNOME, - DESKTOP_KDE, - DESKTOP_KDE4, - DESKTOP_CDE -}; - -static const char * desktop_strings[] = { "none", "unknown", "GNOME", "KDE", "KDE4", "CDE" }; - -static SalInstance* tryInstance( const OUString& rModuleBase ) -{ - SalInstance* pInst = NULL; - - OUStringBuffer aModName( 128 ); - aModName.appendAscii( SAL_DLLPREFIX"vclplug_" ); - aModName.append( rModuleBase ); - aModName.appendAscii( SAL_DLLPOSTFIX ); - aModName.appendAscii( SAL_DLLEXTENSION ); - OUString aModule = aModName.makeStringAndClear(); - - oslModule aMod = osl_loadModuleRelative( - reinterpret_cast< oslGenericFunction >( &tryInstance ), aModule.pData, - SAL_LOADMODULE_DEFAULT ); - if( aMod ) - { - salFactoryProc aProc = (salFactoryProc)osl_getAsciiFunctionSymbol( aMod, "create_SalInstance" ); - if( aProc ) - { - pInst = aProc( aMod ); -#if OSL_DEBUG_LEVEL > 1 - std::fprintf( stderr, "sal plugin %s produced instance %p\n", - OUStringToOString( aModule, RTL_TEXTENCODING_ASCII_US ).getStr(), - pInst ); -#endif - if( pInst ) - { - pCloseModule = aMod; - - /* - * Recent GTK+ versions load their modules with RTLD_LOCAL, so we can - * not access the 'gnome_accessibility_module_shutdown' anymore. - * So make sure libgtk+ & co are still mapped into memory when - * atk-bridge's atexit handler gets called. - */ - if( rModuleBase.equalsAscii("gtk") ) - { - pCloseModule = NULL; - } - /* - * #i109007# KDE3 seems to have the same problem; an atexit cleanup - * handler, which cannot be resolved anymore if the plugin is already unloaded. - */ - else if( rModuleBase.equalsAscii("kde") ) - { - pCloseModule = NULL; - } - - GetSalData()->m_pPlugin = aMod; - } - else - osl_unloadModule( aMod ); - } - else - { -#if OSL_DEBUG_LEVEL > 1 - std::fprintf( stderr, "could not load symbol %s from shared object %s\n", - "create_SalInstance", - OUStringToOString( aModule, RTL_TEXTENCODING_ASCII_US ).getStr() ); -#endif - osl_unloadModule( aMod ); - } - } -#if OSL_DEBUG_LEVEL > 1 - else - std::fprintf( stderr, "could not load shared object %s\n", - OUStringToOString( aModule, RTL_TEXTENCODING_ASCII_US ).getStr() ); -#endif - - return pInst; -} - -static const rtl::OUString& get_desktop_environment() -{ - static rtl::OUString aRet; - if( ! aRet.getLength() ) - { - OUStringBuffer aModName( 128 ); - aModName.appendAscii( SAL_DLLPREFIX"desktop_detector" ); - aModName.appendAscii( SAL_DLLPOSTFIX ); - aModName.appendAscii( SAL_DLLEXTENSION ); - OUString aModule = aModName.makeStringAndClear(); - - oslModule aMod = osl_loadModuleRelative( - reinterpret_cast< oslGenericFunction >( &tryInstance ), aModule.pData, - SAL_LOADMODULE_DEFAULT ); - if( aMod ) - { - rtl::OUString (*pSym)() = (rtl::OUString(*)()) - osl_getAsciiFunctionSymbol( aMod, "get_desktop_environment" ); - if( pSym ) - aRet = pSym(); - } - osl_unloadModule( aMod ); - } - return aRet; -} - -static SalInstance* autodetect_plugin() -{ - static const char* pKDEFallbackList[] = - { - "kde4", "kde", "gtk", "gen", 0 - }; - - static const char* pStandardFallbackList[] = - { - "gtk", "gen", 0 - }; - - static const char* pHeadlessFallbackList[] = - { - "svp", 0 - }; - - const rtl::OUString& desktop( get_desktop_environment() ); - const char ** pList = pStandardFallbackList; - int nListEntry = 0; - - // no server at all: dummy plugin - if ( desktop.equalsAscii( desktop_strings[DESKTOP_NONE] ) ) - pList = pHeadlessFallbackList; - else if ( desktop.equalsAscii( desktop_strings[DESKTOP_GNOME] ) ) - pList = pStandardFallbackList; - else if( desktop.equalsAscii( desktop_strings[DESKTOP_KDE] ) ) - { - pList = pKDEFallbackList; - nListEntry = 1; - } - else if( desktop.equalsAscii( desktop_strings[DESKTOP_KDE4] ) ) - pList = pKDEFallbackList; - - SalInstance* pInst = NULL; - while( pList[nListEntry] && pInst == NULL ) - { - rtl::OUString aTry( rtl::OUString::createFromAscii( pList[nListEntry] ) ); - pInst = tryInstance( aTry ); - #if OSL_DEBUG_LEVEL > 1 - if( pInst ) - std::fprintf( stderr, "plugin autodetection: %s\n", pList[nListEntry] ); - #endif - nListEntry++; - } - - return pInst; -} - -static SalInstance* check_headless_plugin() -{ - int nParams = osl_getCommandArgCount(); - OUString aParam; - for( int i = 0; i < nParams; i++ ) - { - osl_getCommandArg( i, &aParam.pData ); - if( aParam.equalsAscii( "-headless" ) ) - return tryInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "svp" ) ) ); - } - return NULL; -} - -SalInstance *CreateSalInstance() -{ - SalInstance* pInst = NULL; - - static const char* pUsePlugin = getenv( "SAL_USE_VCLPLUGIN" ); - - if( !(pUsePlugin && *pUsePlugin) ) - pInst = check_headless_plugin(); - else - pInst = tryInstance( OUString::createFromAscii( pUsePlugin ) ); - - if( ! pInst ) - pInst = autodetect_plugin(); - - // fallback to gen - if( ! pInst ) - pInst = tryInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "gen" ) ) ); - - if( ! pInst ) - { - std::fprintf( stderr, "no suitable windowing system found, exiting.\n" ); - _exit( 1 ); - } - - // acquire SolarMutex - pInst->AcquireYieldMutex( 1 ); - - return pInst; -} - -void DestroySalInstance( SalInstance *pInst ) -{ - // release SolarMutex - pInst->ReleaseYieldMutex(); - - delete pInst; - if( pCloseModule ) - osl_unloadModule( pCloseModule ); -} - -void InitSalData() -{ -} - -void DeInitSalData() -{ -} - -void InitSalMain() -{ -} - -void DeInitSalMain() -{ -} - -void SalAbort( const XubString& rErrorText ) -{ - if( !rErrorText.Len() ) - std::fprintf( stderr, "Application Error" ); - else - std::fprintf( stderr, ByteString( rErrorText, gsl_getSystemTextEncoding() ).GetBuffer() ); - abort(); -} - -const OUString& SalGetDesktopEnvironment() -{ - return get_desktop_environment(); -} - -SalData::SalData() : - m_pInstance(NULL), - m_pPlugin(NULL), - m_pPIManager(NULL) -{ -} - -SalData::~SalData() -{ - psp::PrinterInfoManager::release(); -} diff --git a/vcl/unx/source/printer/cupsmgr.cxx b/vcl/unx/source/printer/cupsmgr.cxx deleted file mode 100644 index caf3249b5f46..000000000000 --- a/vcl/unx/source/printer/cupsmgr.cxx +++ /dev/null @@ -1,1175 +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_vcl.hxx" - -#ifdef ENABLE_CUPS -#include -#include - -#else // !ENABLE_CUPS -typedef void ppd_file_t; -typedef void cups_dest_t; -typedef void cups_option_t; -#endif - -#include - -#include "cupsmgr.hxx" - -#include "osl/thread.h" -#include "osl/diagnose.h" -#include "osl/conditn.hxx" - -#include "rtl/ustrbuf.hxx" - -#include -#include -#include - -#define CUPS_LIB_NAME "libcups.so.2" - -namespace psp -{ -class CUPSWrapper -{ - oslModule m_pLib; - osl::Mutex m_aGetPPDMutex; - bool m_bPPDThreadRunning; - - int (*m_pcupsPrintFile)(const char*, const char*, const char*, int, cups_option_t*); - int (*m_pcupsGetDests)(cups_dest_t**); - void (*m_pcupsSetDests)(int,cups_dest_t*); - void (*m_pcupsFreeDests)(int,cups_dest_t*); - const char* (*m_pcupsGetPPD)(const char*); - int (*m_pcupsMarkOptions)(ppd_file_t*,int,cups_option_t*); - int (*m_pcupsAddOption)(const char*,const char*,int,cups_option_t**); - void (*m_pcupsFreeOptions)(int,cups_option_t*); - ppd_file_t* (*m_pppdOpenFile)(const char* pFile); - void (*m_pppdClose)(ppd_file_t*); - const char* (*m_pcupsServer)(); - void (*m_pcupsSetPasswordCB)(const char*(cb)(const char*)); - const char* (*m_pcupsUser)(); - void (*m_pcupsSetUser)(const char*); - const char* (*m_pcupsGetOption)(const char*,int,cups_option_t*); - - oslGenericFunction loadSymbol( const char* ); -public: - CUPSWrapper(); - ~CUPSWrapper(); - - bool isValid(); - - int cupsGetDests(cups_dest_t** pDests) - { return m_pcupsGetDests(pDests); } - - void cupsSetDests( int nDests, cups_dest_t* pDests ) - { m_pcupsSetDests( nDests, pDests ); } - - void cupsFreeDests(int nDests, cups_dest_t* pDests) - { m_pcupsFreeDests(nDests, pDests); } - - int cupsPrintFile( const char* pPrinter, - const char* pFileName, - const char* pTitle, - int nOptions, - cups_option_t* pOptions ) - { return m_pcupsPrintFile( pPrinter, pFileName, pTitle, nOptions, pOptions ); } - - rtl::OString cupsGetPPD( const char* pPrinter ); - - int cupsMarkOptions(ppd_file_t* pPPD, int nOptions, cups_option_t* pOptions ) - { return m_pcupsMarkOptions(pPPD, nOptions, pOptions); } - - int cupsAddOption( const char* pName, const char* pValue, int nOptions, cups_option_t** pOptions ) - { return m_pcupsAddOption( pName, pValue, nOptions, pOptions ); } - - void cupsFreeOptions( int nOptions, cups_option_t* pOptions ) - { m_pcupsFreeOptions( nOptions, pOptions ); } - - ppd_file_t* ppdOpenFile( const char* pFileName ) - { return m_pppdOpenFile( pFileName ); } - - void ppdClose( ppd_file_t* pPPD ) - { m_pppdClose( pPPD ); } - - const char *cupsServer(void) - { return m_pcupsServer(); } - - const char *cupsUser(void) - { return m_pcupsUser(); } - - void cupsSetPasswordCB(const char *(*cb)(const char *)) - { m_pcupsSetPasswordCB( cb ); } - - void cupsSetUser(const char *user) - { m_pcupsSetUser( user ); } - - const char* cupsGetOption(const char* name, int num_options, cups_option_t* options) - { return m_pcupsGetOption( name, num_options, options ); } - -}; -} - -using namespace psp; -using namespace osl; -using namespace rtl; - -/* - * CUPSWrapper class - */ - -oslGenericFunction CUPSWrapper::loadSymbol( const char* pSymbol ) -{ - OUString aSym( OUString::createFromAscii( pSymbol ) ); - oslGenericFunction pSym = osl_getFunctionSymbol( m_pLib, aSym.pData ); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "%s %s\n", pSymbol, pSym ? "found" : "not found" ); -#endif - return pSym; -} - -CUPSWrapper::CUPSWrapper() - : m_pLib( NULL ), - m_bPPDThreadRunning( false ) -{ -#ifdef ENABLE_CUPS - OUString aLib( RTL_CONSTASCII_USTRINGPARAM( CUPS_LIB_NAME ) ); - m_pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY ); - if( ! m_pLib ) - { - aLib = OUString( RTL_CONSTASCII_USTRINGPARAM( SAL_MODULENAME( "cups" ) ) ); - m_pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY ); - } -#endif - - if( ! m_pLib ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "no cups library found\n" ); -#endif - return; - } - - m_pcupsPrintFile = (int(*)(const char*,const char*,const char*,int,cups_option_t*)) - loadSymbol( "cupsPrintFile" ); - m_pcupsGetDests = (int(*)(cups_dest_t**)) - loadSymbol( "cupsGetDests" ); - m_pcupsSetDests = (void(*)(int,cups_dest_t*)) - loadSymbol( "cupsSetDests" ); - m_pcupsFreeDests = (void(*)(int,cups_dest_t*)) - loadSymbol( "cupsFreeDests" ); - m_pcupsGetPPD = (const char*(*)(const char*)) - loadSymbol( "cupsGetPPD" ); - m_pcupsMarkOptions = (int(*)(ppd_file_t*,int,cups_option_t*)) - loadSymbol( "cupsMarkOptions" ); - m_pcupsAddOption = (int(*)(const char*,const char*,int,cups_option_t**)) - loadSymbol( "cupsAddOption" ); - m_pcupsFreeOptions = (void(*)(int,cups_option_t*)) - loadSymbol( "cupsFreeOptions" ); - m_pppdOpenFile = (ppd_file_t*(*)(const char*)) - loadSymbol( "ppdOpenFile" ); - m_pppdClose = (void(*)(ppd_file_t*)) - loadSymbol( "ppdClose" ); - m_pcupsServer = (const char*(*)()) - loadSymbol( "cupsServer" ); - m_pcupsUser = (const char*(*)()) - loadSymbol( "cupsUser" ); - m_pcupsSetPasswordCB = (void(*)(const char*(*)(const char*))) - loadSymbol( "cupsSetPasswordCB" ); - m_pcupsSetUser = (void(*)(const char*)) - loadSymbol( "cupsSetUser" ); - m_pcupsGetOption = (const char*(*)(const char*,int,cups_option_t*)) - loadSymbol( "cupsGetOption" ); - - if( ! ( - m_pcupsPrintFile && - m_pcupsGetDests && - m_pcupsSetDests && - m_pcupsFreeDests && - m_pcupsGetPPD && - m_pcupsMarkOptions && - m_pcupsAddOption && - m_pcupsServer && - m_pcupsUser && - m_pcupsSetPasswordCB && - m_pcupsSetUser && - m_pcupsFreeOptions && - m_pppdOpenFile && - m_pppdClose && - m_pcupsGetOption - ) ) - { - osl_unloadModule( m_pLib ); - m_pLib = NULL; - } -} - -CUPSWrapper::~CUPSWrapper() -{ - if( m_pLib ) - osl_unloadModule( m_pLib ); -} - -bool CUPSWrapper::isValid() -{ - return m_pLib != NULL; -} - -typedef const char*(*PPDFunction)(const char*); -struct GetPPDAttribs -{ - PPDFunction m_pFunction; - osl::Condition m_aCondition; - OString m_aParameter; - OString m_aResult; - oslThread m_aThread; - int m_nRefs; - bool* m_pResetRunning; - osl::Mutex* m_pSyncMutex; - - GetPPDAttribs( PPDFunction pFn, const char * m_pParameter, - bool* pResetRunning, osl::Mutex* pSyncMutex ) - : m_pFunction( pFn ), - m_aParameter( m_pParameter ), - m_pResetRunning( pResetRunning ), - m_pSyncMutex( pSyncMutex ) - { - m_nRefs = 2; - m_aCondition.reset(); - } - - ~GetPPDAttribs() - { - if( m_aResult.getLength() ) - unlink( m_aResult.getStr() ); - } - - void unref() - { - if( --m_nRefs == 0 ) - { - *m_pResetRunning = false; - delete this; - } - } - - void executeCall() - { - // This CUPS method is not at all thread-safe we need - // to dup the pointer to a static buffer it returns ASAP - OString aResult = m_pFunction( m_aParameter ); - MutexGuard aGuard( *m_pSyncMutex ); - m_aResult = aResult; - m_aCondition.set(); - unref(); - } - - OString waitResult( TimeValue *pDelay ) - { - m_pSyncMutex->release(); - - if (m_aCondition.wait( pDelay ) != Condition::result_ok - ) - { - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "cupsGetPPD %s timed out\n", - (const sal_Char *) m_aParameter - ); - #endif - } - m_pSyncMutex->acquire(); - - OString aRetval = m_aResult; - m_aResult = OString(); - unref(); - - return aRetval; - } -}; - -extern "C" { - static void getPPDWorker(void* pData) - { - GetPPDAttribs* pAttribs = (GetPPDAttribs*)pData; - pAttribs->executeCall(); - } -} - -OString CUPSWrapper::cupsGetPPD( const char* pPrinter ) -{ - OString aResult; - - m_aGetPPDMutex.acquire(); - // if one thread hangs in cupsGetPPD already, don't start another - if( ! m_bPPDThreadRunning ) - { - m_bPPDThreadRunning = true; - GetPPDAttribs* pAttribs = new GetPPDAttribs( m_pcupsGetPPD, - pPrinter, - &m_bPPDThreadRunning, - &m_aGetPPDMutex ); - - oslThread aThread = osl_createThread( getPPDWorker, pAttribs ); - - TimeValue aValue; - aValue.Seconds = 5; - aValue.Nanosec = 0; - - // NOTE: waitResult release and acquires the GetPPD mutex - aResult = pAttribs->waitResult( &aValue ); - osl_destroyThread( aThread ); - } - m_aGetPPDMutex.release(); - - return aResult; -} - -#ifdef ENABLE_CUPS -static const char* setPasswordCallback( const char* pIn ) -{ - const char* pRet = NULL; - - PrinterInfoManager& rMgr = PrinterInfoManager::get(); - if( rMgr.getType() == PrinterInfoManager::CUPS ) // sanity check - pRet = static_cast(rMgr).authenticateUser( pIn ); - return pRet; -} -#endif - -/* - * CUPSManager class - */ - -CUPSManager* CUPSManager::tryLoadCUPS() -{ - CUPSManager* pManager = NULL; -#ifdef ENABLE_CUPS - static const char* pEnv = getenv( "SAL_DISABLE_CUPS" ); - - if( ! pEnv || ! *pEnv ) - { - // try to load CUPS - CUPSWrapper* pWrapper = new CUPSWrapper(); - if( pWrapper->isValid() ) - pManager = new CUPSManager( pWrapper ); - else - delete pWrapper; - } -#endif - return pManager; -} - -extern "C" -{ -static void run_dest_thread_stub( void* pThis ) -{ - CUPSManager::runDestThread( pThis ); -} -} - -CUPSManager::CUPSManager( CUPSWrapper* pWrapper ) : - PrinterInfoManager( CUPS ), - m_pCUPSWrapper( pWrapper ), - m_nDests( 0 ), - m_pDests( NULL ), - m_bNewDests( false ) -{ - m_aDestThread = osl_createThread( run_dest_thread_stub, this ); -} - -CUPSManager::~CUPSManager() -{ - if( m_aDestThread ) - { - // if the thread is still running here, then - // cupsGetDests is hung; terminate the thread instead of joining - osl_terminateThread( m_aDestThread ); - osl_destroyThread( m_aDestThread ); - } - - if( m_nDests && m_pDests ) - m_pCUPSWrapper->cupsFreeDests( m_nDests, (cups_dest_t*)m_pDests ); - delete m_pCUPSWrapper; -} - -void CUPSManager::runDestThread( void* pThis ) -{ - ((CUPSManager*)pThis)->runDests(); -} - -static sigjmp_buf aViolationBuffer; - -extern "C" -{ - static void lcl_signal_action(int nSignal) - { - fprintf( stderr, "Signal %d during fontconfig initialization called, ignoring fontconfig\n", nSignal ); - siglongjmp( aViolationBuffer, 1 ); - } -} - -void CUPSManager::runDests() -{ -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "starting cupsGetDests\n" ); -#endif - int nDests = 0; - cups_dest_t* pDests = NULL; - - // #i86306# prepare against really broken CUPS installations / missing servers - - // install signal handler for SEGV, BUS and ABRT - struct sigaction act; - struct sigaction oact[3]; - - act.sa_handler = lcl_signal_action; - act.sa_flags = 0; - sigemptyset(&(act.sa_mask)); - - int nSegvSignalInstalled = sigaction(SIGSEGV, &act, &oact[0]); - int nBusSignalInstalled = sigaction(SIGBUS, &act, &oact[1]); - int nAbortSignalInstalled = sigaction(SIGABRT, &act, &oact[2]); - - // prepare against a signal during FcInit or FcConfigGetCurrent - if( sigsetjmp( aViolationBuffer, ~0 ) == 0 ) - { - nDests = m_pCUPSWrapper->cupsGetDests( &pDests ); - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "came out of cupsGetDests\n" ); - #endif - - osl::MutexGuard aGuard( m_aCUPSMutex ); - m_nDests = nDests; - m_pDests = pDests; - m_bNewDests = true; - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "finished cupsGetDests\n" ); - #endif - } - else - { - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "cupsGetDests crashed, not using CUPS\n" ); - #endif - } - - // restore old signal handlers - if( nSegvSignalInstalled == 0 ) - sigaction( SIGSEGV, &oact[0], NULL ); - if( nBusSignalInstalled == 0 ) - sigaction( SIGBUS, &oact[1], NULL ); - if( nAbortSignalInstalled == 0 ) - sigaction( SIGABRT, &oact[2], NULL ); -} - -void CUPSManager::initialize() -{ - // get normal printers, clear printer list - PrinterInfoManager::initialize(); - -#ifdef ENABLE_CUPS - // check whether thread has completed - // if not behave like old printing system - osl::MutexGuard aGuard( m_aCUPSMutex ); - - if( ! m_bNewDests ) - return; - - // dest thread has run, clean up - if( m_aDestThread ) - { - osl_joinWithThread( m_aDestThread ); - osl_destroyThread( m_aDestThread ); - m_aDestThread = NULL; - } - m_bNewDests = false; - - // clear old stuff - m_aCUPSDestMap.clear(); - - if( ! (m_nDests && m_pDests ) ) - return; - - if( isCUPSDisabled() ) - return; - - // check for CUPS server(?) > 1.2 - // since there is no API to query, check for options that were - // introduced in dests with 1.2 - // this is needed to check for %%IncludeFeature support - // (#i65684#, #i65491#) - bool bUsePDF = false; - cups_dest_t* pDest = ((cups_dest_t*)m_pDests); - const char* pOpt = m_pCUPSWrapper->cupsGetOption( "printer-info", - pDest->num_options, - pDest->options ); - if( pOpt ) - { - m_bUseIncludeFeature = true; - bUsePDF = true; - if( m_aGlobalDefaults.m_nPSLevel == 0 && m_aGlobalDefaults.m_nPDFDevice == 0 ) - m_aGlobalDefaults.m_nPDFDevice = 1; - } - // do not send include JobPatch; CUPS will insert that itself - // TODO: currently unknwon which versions of CUPS insert JobPatches - // so currently it is assumed CUPS = don't insert JobPatch files - m_bUseJobPatch = false; - - rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - int nPrinter = m_nDests; - - // reset global default PPD options; these are queried on demand from CUPS - m_aGlobalDefaults.m_pParser = NULL; - m_aGlobalDefaults.m_aContext = PPDContext(); - - // add CUPS printers, should there be a printer - // with the same name as a CUPS printer, overwrite it - while( nPrinter-- ) - { - pDest = ((cups_dest_t*)m_pDests)+nPrinter; - OUString aPrinterName = OStringToOUString( pDest->name, aEncoding ); - if( pDest->instance && *pDest->instance ) - { - OUStringBuffer aBuf( 256 ); - aBuf.append( aPrinterName ); - aBuf.append( sal_Unicode( '/' ) ); - aBuf.append( OStringToOUString( pDest->instance, aEncoding ) ); - aPrinterName = aBuf.makeStringAndClear(); - } - - // initialize printer with possible configuration from psprint.conf - bool bSetToGlobalDefaults = m_aPrinters.find( aPrinterName ) == m_aPrinters.end(); - Printer aPrinter = m_aPrinters[ aPrinterName ]; - if( bSetToGlobalDefaults ) - aPrinter.m_aInfo = m_aGlobalDefaults; - aPrinter.m_aInfo.m_aPrinterName = aPrinterName; - if( pDest->is_default ) - m_aDefaultPrinter = aPrinterName; - - for( int k = 0; k < pDest->num_options; k++ ) - { - if(!strcmp(pDest->options[k].name, "printer-info")) - aPrinter.m_aInfo.m_aComment=OStringToOUString(pDest->options[k].value, aEncoding); - if(!strcmp(pDest->options[k].name, "printer-location")) - aPrinter.m_aInfo.m_aLocation=OStringToOUString(pDest->options[k].value, aEncoding); - } - - - OUStringBuffer aBuf( 256 ); - aBuf.appendAscii( "CUPS:" ); - aBuf.append( aPrinterName ); - // note: the parser that goes with the PrinterInfo - // is created implicitly by the JobData::operator=() - // when it detects the NULL ptr m_pParser. - // if we wanted to fill in the parser here this - // would mean we'd have to download PPDs for each and - // every printer - which would be really bad runtime - // behaviour - aPrinter.m_aInfo.m_pParser = NULL; - aPrinter.m_aInfo.m_aContext.setParser( NULL ); - std::hash_map< OUString, PPDContext, OUStringHash >::const_iterator c_it = m_aDefaultContexts.find( aPrinterName ); - if( c_it != m_aDefaultContexts.end() ) - { - aPrinter.m_aInfo.m_pParser = c_it->second.getParser(); - aPrinter.m_aInfo.m_aContext = c_it->second; - } - if( bUsePDF && aPrinter.m_aInfo.m_nPSLevel == 0 && aPrinter.m_aInfo.m_nPDFDevice == 0 ) - aPrinter.m_aInfo.m_nPDFDevice = 1; - aPrinter.m_aInfo.m_aDriverName = aBuf.makeStringAndClear(); - aPrinter.m_bModified = false; - - m_aPrinters[ aPrinter.m_aInfo.m_aPrinterName ] = aPrinter; - m_aCUPSDestMap[ aPrinter.m_aInfo.m_aPrinterName ] = nPrinter; - } - - // remove everything that is not a CUPS printer and not - // a special purpose printer (PDF, Fax) - std::list< OUString > aRemovePrinters; - for( std::hash_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.begin(); - it != m_aPrinters.end(); ++it ) - { - if( m_aCUPSDestMap.find( it->first ) != m_aCUPSDestMap.end() ) - continue; - - if( it->second.m_aInfo.m_aFeatures.getLength() > 0 ) - continue; - aRemovePrinters.push_back( it->first ); - } - while( aRemovePrinters.begin() != aRemovePrinters.end() ) - { - m_aPrinters.erase( aRemovePrinters.front() ); - aRemovePrinters.pop_front(); - } - - m_pCUPSWrapper->cupsSetPasswordCB( setPasswordCallback ); -#endif // ENABLE_CUPS -} - -#ifdef ENABLE_CUPS -static void updatePrinterContextInfo( ppd_group_t* pPPDGroup, PPDContext& rContext ) -{ - rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - for( int i = 0; i < pPPDGroup->num_options; i++ ) - { - ppd_option_t* pOption = pPPDGroup->options + i; - for( int n = 0; n < pOption->num_choices; n++ ) - { - ppd_choice_t* pChoice = pOption->choices + n; - if( pChoice->marked ) - { - const PPDKey* pKey = rContext.getParser()->getKey( OStringToOUString( pOption->keyword, aEncoding ) ); - if( pKey ) - { - const PPDValue* pValue = pKey->getValue( OStringToOUString( pChoice->choice, aEncoding ) ); - if( pValue ) - { - if( pValue != pKey->getDefaultValue() ) - { - rContext.setValue( pKey, pValue, true ); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "key %s is set to %s\n", pOption->keyword, pChoice->choice ); -#endif - - } -#if OSL_DEBUG_LEVEL > 1 - else - fprintf( stderr, "key %s is defaulted to %s\n", pOption->keyword, pChoice->choice ); -#endif - } -#if OSL_DEBUG_LEVEL > 1 - else - fprintf( stderr, "caution: value %s not found in key %s\n", pChoice->choice, pOption->keyword ); -#endif - } -#if OSL_DEBUG_LEVEL > 1 - else - fprintf( stderr, "caution: key %s not found in parser\n", pOption->keyword ); -#endif - } - } - } - - // recurse through subgroups - for( int g = 0; g < pPPDGroup->num_subgroups; g++ ) - { - updatePrinterContextInfo( pPPDGroup->subgroups + g, rContext ); - } -} -#endif // ENABLE_CUPS - -const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter ) -{ - const PPDParser* pNewParser = NULL; - OUString aPrinter; - - if( rPrinter.compareToAscii( "CUPS:", 5 ) == 0 ) - aPrinter = rPrinter.copy( 5 ); - else - aPrinter = rPrinter; - -#ifdef ENABLE_CUPS - if( m_aCUPSMutex.tryToAcquire() ) - { - if( m_nDests && m_pDests && ! isCUPSDisabled() ) - { - std::hash_map< OUString, int, OUStringHash >::iterator dest_it = - m_aCUPSDestMap.find( aPrinter ); - if( dest_it != m_aCUPSDestMap.end() ) - { - cups_dest_t* pDest = ((cups_dest_t*)m_pDests) + dest_it->second; - OString aPPDFile = m_pCUPSWrapper->cupsGetPPD( pDest->name ); - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "PPD for %s is %s\n", OUStringToOString( aPrinter, osl_getThreadTextEncoding() ).getStr(), aPPDFile.getStr() ); - #endif - if( aPPDFile.getLength() ) - { - rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - OUString aFileName( OStringToOUString( aPPDFile, aEncoding ) ); - // update the printer info with context information - ppd_file_t* pPPD = m_pCUPSWrapper->ppdOpenFile( aPPDFile.getStr() ); - if( pPPD ) - { - // create the new parser - PPDParser* pCUPSParser = new PPDParser( aFileName ); - pCUPSParser->m_aFile = rPrinter; - pNewParser = pCUPSParser; - - /*int nConflicts =*/ m_pCUPSWrapper->cupsMarkOptions( pPPD, pDest->num_options, pDest->options ); - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "processing the following options for printer %s (instance %s):\n", - pDest->name, pDest->instance ); - for( int k = 0; k < pDest->num_options; k++ ) - fprintf( stderr, " \"%s\" = \"%s\"\n", - pDest->options[k].name, - pDest->options[k].value ); - #endif - PrinterInfo& rInfo = m_aPrinters[ aPrinter ].m_aInfo; - - // remember the default context for later use - PPDContext& rContext = m_aDefaultContexts[ aPrinter ]; - rContext.setParser( pNewParser ); - // set system default paper; printer CUPS PPD options - // may overwrite it - setDefaultPaper( rContext ); - for( int i = 0; i < pPPD->num_groups; i++ ) - updatePrinterContextInfo( pPPD->groups + i, rContext ); - - rInfo.m_pParser = pNewParser; - rInfo.m_aContext = rContext; - - // clean up the mess - m_pCUPSWrapper->ppdClose( pPPD ); - } - #if OSL_DEBUG_LEVEL > 1 - else - fprintf( stderr, "ppdOpenFile failed, falling back to generic driver\n" ); - #endif - - // remove temporary PPD file - unlink( aPPDFile.getStr() ); - } - #if OSL_DEBUG_LEVEL > 1 - else - fprintf( stderr, "cupsGetPPD failed, falling back to generic driver\n" ); - #endif - } - #if OSL_DEBUG_LEVEL > 1 - else - fprintf( stderr, "no dest found for printer %s\n", OUStringToOString( aPrinter, osl_getThreadTextEncoding() ).getStr() ); - #endif - } - m_aCUPSMutex.release(); - } - #if OSL_DEBUG_LEVEL >1 - else - fprintf( stderr, "could not acquire CUPS mutex !!!\n" ); - #endif - #endif // ENABLE_CUPS - - if( ! pNewParser ) - { - // get the default PPD - pNewParser = PPDParser::getParser( String( RTL_CONSTASCII_USTRINGPARAM( "SGENPRT" ) ) ); - - PrinterInfo& rInfo = m_aPrinters[ aPrinter ].m_aInfo; - - rInfo.m_pParser = pNewParser; - rInfo.m_aContext.setParser( pNewParser ); - } - - return pNewParser; -} - -void CUPSManager::setupJobContextData( - JobData& -#ifdef ENABLE_CUPS - rData -#endif -) -{ -#ifdef ENABLE_CUPS - std::hash_map< OUString, int, OUStringHash >::iterator dest_it = - m_aCUPSDestMap.find( rData.m_aPrinterName ); - - if( dest_it == m_aCUPSDestMap.end() ) - return PrinterInfoManager::setupJobContextData( rData ); - - std::hash_map< OUString, Printer, OUStringHash >::iterator p_it = - m_aPrinters.find( rData.m_aPrinterName ); - if( p_it == m_aPrinters.end() ) // huh ? - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "CUPS printer list in disorder, no dest for printer %s !\n", OUStringToOString( rData.m_aPrinterName, osl_getThreadTextEncoding() ).getStr() ); -#endif - return; - } - - if( p_it->second.m_aInfo.m_pParser == NULL ) - { - // in turn calls createCUPSParser - // which updates the printer info - p_it->second.m_aInfo.m_pParser = PPDParser::getParser( p_it->second.m_aInfo.m_aDriverName ); - } - if( p_it->second.m_aInfo.m_aContext.getParser() == NULL ) - { - OUString aPrinter; - if( p_it->second.m_aInfo.m_aDriverName.compareToAscii( "CUPS:", 5 ) == 0 ) - aPrinter = p_it->second.m_aInfo.m_aDriverName.copy( 5 ); - else - aPrinter = p_it->second.m_aInfo.m_aDriverName; - - p_it->second.m_aInfo.m_aContext = m_aDefaultContexts[ aPrinter ]; - } - - rData.m_pParser = p_it->second.m_aInfo.m_pParser; - rData.m_aContext = p_it->second.m_aInfo.m_aContext; -#endif -} - -FILE* CUPSManager::startSpool( const OUString& rPrintername, bool bQuickCommand ) -{ - OSL_TRACE( "endSpool: %s, %s", - rtl::OUStringToOString( rPrintername, RTL_TEXTENCODING_UTF8 ).getStr(), - bQuickCommand ? "true" : "false" ); - - if( m_aCUPSDestMap.find( rPrintername ) == m_aCUPSDestMap.end() ) - { - OSL_TRACE( "defer to PrinterInfoManager::startSpool" ); - return PrinterInfoManager::startSpool( rPrintername, bQuickCommand ); - } - -#ifdef ENABLE_CUPS - OUString aTmpURL, aTmpFile; - osl_createTempFile( NULL, NULL, &aTmpURL.pData ); - osl_getSystemPathFromFileURL( aTmpURL.pData, &aTmpFile.pData ); - OString aSysFile = OUStringToOString( aTmpFile, osl_getThreadTextEncoding() ); - FILE* fp = fopen( aSysFile.getStr(), "w" ); - if( fp ) - m_aSpoolFiles[fp] = aSysFile; - - return fp; -#else - return NULL; -#endif -} - -struct less_ppd_key : public ::std::binary_function -{ - bool operator()(const PPDKey* left, const PPDKey* right) - { return left->getOrderDependency() < right->getOrderDependency(); } -}; - -void CUPSManager::getOptionsFromDocumentSetup( const JobData& rJob, bool bBanner, int& rNumOptions, void** rOptions ) const -{ - rNumOptions = 0; - *rOptions = NULL; - int i; - - // emit features ordered to OrderDependency - // ignore features that are set to default - - // sanity check - if( rJob.m_pParser == rJob.m_aContext.getParser() && rJob.m_pParser ) - { - int nKeys = rJob.m_aContext.countValuesModified(); - ::std::vector< const PPDKey* > aKeys( nKeys ); - for( i = 0; i < nKeys; i++ ) - aKeys[i] = rJob.m_aContext.getModifiedKey( i ); - ::std::sort( aKeys.begin(), aKeys.end(), less_ppd_key() ); - - for( i = 0; i < nKeys; i++ ) - { - const PPDKey* pKey = aKeys[i]; - const PPDValue* pValue = rJob.m_aContext.getValue( pKey ); - if(pValue && pValue->m_eType == eInvocation && pValue->m_aValue.Len() ) - { - OString aKey = OUStringToOString( pKey->getKey(), RTL_TEXTENCODING_ASCII_US ); - OString aValue = OUStringToOString( pValue->m_aOption, RTL_TEXTENCODING_ASCII_US ); - rNumOptions = m_pCUPSWrapper->cupsAddOption( aKey.getStr(), aValue.getStr(), rNumOptions, (cups_option_t**)rOptions ); - } - } - } - - if( rJob.m_nPDFDevice > 0 && rJob.m_nCopies > 1 ) - { - rtl::OString aVal( rtl::OString::valueOf( sal_Int32( rJob.m_nCopies ) ) ); - rNumOptions = m_pCUPSWrapper->cupsAddOption( "copies", aVal.getStr(), rNumOptions, (cups_option_t**)rOptions ); - } - if( ! bBanner ) - { - rNumOptions = m_pCUPSWrapper->cupsAddOption( "job-sheets", "none", rNumOptions, (cups_option_t**)rOptions ); - } -} - -int CUPSManager::endSpool( const OUString& rPrintername, const OUString& rJobTitle, FILE* pFile, const JobData& rDocumentJobData, bool bBanner ) -{ - OSL_TRACE( "endSpool: %s, %s, copy count = %d", - rtl::OUStringToOString( rPrintername, RTL_TEXTENCODING_UTF8 ).getStr(), - rtl::OUStringToOString( rJobTitle, RTL_TEXTENCODING_UTF8 ).getStr(), - rDocumentJobData.m_nCopies - ); - - int nJobID = 0; - - osl::MutexGuard aGuard( m_aCUPSMutex ); - - std::hash_map< OUString, int, OUStringHash >::iterator dest_it = - m_aCUPSDestMap.find( rPrintername ); - if( dest_it == m_aCUPSDestMap.end() ) - { - OSL_TRACE( "defer to PrinterInfoManager::endSpool" ); - return PrinterInfoManager::endSpool( rPrintername, rJobTitle, pFile, rDocumentJobData, bBanner ); - } - - #ifdef ENABLE_CUPS - std::hash_map< FILE*, OString, FPtrHash >::const_iterator it = m_aSpoolFiles.find( pFile ); - if( it != m_aSpoolFiles.end() ) - { - fclose( pFile ); - rtl_TextEncoding aEnc = osl_getThreadTextEncoding(); - - // setup cups options - int nNumOptions = 0; - cups_option_t* pOptions = NULL; - getOptionsFromDocumentSetup( rDocumentJobData, bBanner, nNumOptions, (void**)&pOptions ); - - cups_dest_t* pDest = ((cups_dest_t*)m_pDests) + dest_it->second; - nJobID = m_pCUPSWrapper->cupsPrintFile( pDest->name, - it->second.getStr(), - OUStringToOString( rJobTitle, aEnc ).getStr(), - nNumOptions, pOptions ); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "cupsPrintFile( %s, %s, %s, %d, %p ) returns %d\n", - pDest->name, - it->second.getStr(), - OUStringToOString( rJobTitle, aEnc ).getStr(), - nNumOptions, - pOptions, - nJobID - ); - for( int n = 0; n < nNumOptions; n++ ) - fprintf( stderr, " option %s=%s\n", pOptions[n].name, pOptions[n].value ); - OString aCmd( "cp " ); - aCmd = aCmd + it->second; - aCmd = aCmd + OString( " $HOME/cupsprint.ps" ); - system( aCmd.getStr() ); -#endif - - unlink( it->second.getStr() ); - m_aSpoolFiles.erase( pFile ); - if( pOptions ) - m_pCUPSWrapper->cupsFreeOptions( nNumOptions, pOptions ); - } -#endif // ENABLE_CUPS - - return nJobID; -} - - -void CUPSManager::changePrinterInfo( const OUString& rPrinter, const PrinterInfo& rNewInfo ) -{ - PrinterInfoManager::changePrinterInfo( rPrinter, rNewInfo ); -} - -bool CUPSManager::checkPrintersChanged( bool bWait ) -{ - bool bChanged = false; - if( bWait ) - { - if( m_aDestThread ) - { - // initial asynchronous detection still running - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "syncing cups discovery thread\n" ); - #endif - osl_joinWithThread( m_aDestThread ); - osl_destroyThread( m_aDestThread ); - m_aDestThread = NULL; - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "done: syncing cups discovery thread\n" ); - #endif - } - else - { - // #i82321# check for cups printer updates - // with this change the whole asynchronous detection in a thread is - // almost useless. The only relevance left is for some stalled systems - // where the user can set SAL_DISABLE_SYNCHRONOUS_PRINTER_DETECTION - // (see vcl/unx/source/gdi/salprnpsp.cxx) - // so that checkPrintersChanged( true ) will never be called - - // there is no way to query CUPS whether the printer list has changed - // so get the dest list anew - if( m_nDests && m_pDests ) - m_pCUPSWrapper->cupsFreeDests( m_nDests, (cups_dest_t*)m_pDests ); - m_nDests = 0; - m_pDests = NULL; - runDests(); - } - } - if( m_aCUPSMutex.tryToAcquire() ) - { - bChanged = m_bNewDests; - m_aCUPSMutex.release(); - } - - if( ! bChanged ) - { - bChanged = PrinterInfoManager::checkPrintersChanged( bWait ); - // #i54375# ensure new merging with CUPS list in :initialize - if( bChanged ) - m_bNewDests = true; - } - - if( bChanged ) - initialize(); - - return bChanged; -} - -bool CUPSManager::addPrinter( const OUString& rName, const OUString& rDriver ) -{ - // don't touch the CUPS printers - if( m_aCUPSDestMap.find( rName ) != m_aCUPSDestMap.end() || - rDriver.compareToAscii( "CUPS:", 5 ) == 0 - ) - return false; - return PrinterInfoManager::addPrinter( rName, rDriver ); -} - -bool CUPSManager::removePrinter( const OUString& rName, bool bCheck ) -{ - // don't touch the CUPS printers - if( m_aCUPSDestMap.find( rName ) != m_aCUPSDestMap.end() ) - return false; - return PrinterInfoManager::removePrinter( rName, bCheck ); -} - -bool CUPSManager::setDefaultPrinter( const OUString& rName ) -{ - bool bSuccess = false; -#ifdef ENABLE_CUPS - std::hash_map< OUString, int, OUStringHash >::iterator nit = - m_aCUPSDestMap.find( rName ); - if( nit != m_aCUPSDestMap.end() && m_aCUPSMutex.tryToAcquire() ) - { - cups_dest_t* pDests = (cups_dest_t*)m_pDests; - for( int i = 0; i < m_nDests; i++ ) - pDests[i].is_default = 0; - pDests[ nit->second ].is_default = 1; - m_pCUPSWrapper->cupsSetDests( m_nDests, (cups_dest_t*)m_pDests ); - m_aDefaultPrinter = rName; - m_aCUPSMutex.release(); - bSuccess = true; - } - else -#endif - bSuccess = PrinterInfoManager::setDefaultPrinter( rName ); - - return bSuccess; -} - -bool CUPSManager::writePrinterConfig() -{ -#ifdef ENABLE_CUPS - bool bDestModified = false; - rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - - for( std::hash_map< OUString, Printer, OUStringHash >::iterator prt = - m_aPrinters.begin(); prt != m_aPrinters.end(); ++prt ) - { - std::hash_map< OUString, int, OUStringHash >::iterator nit = - m_aCUPSDestMap.find( prt->first ); - if( nit == m_aCUPSDestMap.end() ) - continue; - - if( ! prt->second.m_bModified ) - continue; - - if( m_aCUPSMutex.tryToAcquire() ) - { - bDestModified = true; - cups_dest_t* pDest = ((cups_dest_t*)m_pDests) + nit->second; - PrinterInfo& rInfo = prt->second.m_aInfo; - - // create new option list - int nNewOptions = 0; - cups_option_t* pNewOptions = NULL; - int nValues = rInfo.m_aContext.countValuesModified(); - for( int i = 0; i < nValues; i++ ) - { - const PPDKey* pKey = rInfo.m_aContext.getModifiedKey( i ); - const PPDValue* pValue = rInfo.m_aContext.getValue( pKey ); - if( pKey && pValue ) // sanity check - { - OString aName = OUStringToOString( pKey->getKey(), aEncoding ); - OString aValue = OUStringToOString( pValue->m_aOption, aEncoding ); - nNewOptions = m_pCUPSWrapper->cupsAddOption( aName.getStr(), aValue.getStr(), nNewOptions, &pNewOptions ); - } - } - // set PPD options on CUPS dest - m_pCUPSWrapper->cupsFreeOptions( pDest->num_options, pDest->options ); - pDest->num_options = nNewOptions; - pDest->options = pNewOptions; - m_aCUPSMutex.release(); - } - } - if( bDestModified && m_aCUPSMutex.tryToAcquire() ) - { - m_pCUPSWrapper->cupsSetDests( m_nDests, (cups_dest_t*)m_pDests ); - m_aCUPSMutex.release(); - } -#endif // ENABLE_CUPS - - return PrinterInfoManager::writePrinterConfig(); -} - -bool CUPSManager::addOrRemovePossible() const -{ - return (m_nDests && m_pDests && ! isCUPSDisabled())? false : PrinterInfoManager::addOrRemovePossible(); -} - -#include - -const char* CUPSManager::authenticateUser( const char* /*pIn*/ ) -{ - const char* pRet = NULL; - -#ifdef ENABLE_CUPS - OUString aLib = OUString::createFromAscii( _XSALSET_LIBNAME ); - oslModule pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY ); - if( pLib ) - { - OUString aSym( RTL_CONSTASCII_USTRINGPARAM( "Sal_authenticateQuery" ) ); - bool (*getpw)( const OString& rServer, OString& rUser, OString& rPw) = - (bool(*)(const OString&,OString&,OString&))osl_getFunctionSymbol( pLib, aSym.pData ); - if( getpw ) - { - osl::MutexGuard aGuard( m_aCUPSMutex ); - - OString aUser = m_pCUPSWrapper->cupsUser(); - OString aServer = m_pCUPSWrapper->cupsServer(); - OString aPassword; - if( getpw( aServer, aUser, aPassword ) ) - { - m_aPassword = aPassword; - m_aUser = aUser; - m_pCUPSWrapper->cupsSetUser( m_aUser.getStr() ); - pRet = m_aPassword.getStr(); - } - } - osl_unloadModule( pLib ); - } -#if OSL_DEBUG_LEVEL > 1 - else fprintf( stderr, "loading of module %s failed\n", OUStringToOString( aLib, osl_getThreadTextEncoding() ).getStr() ); -#endif -#endif // ENABLE_CUPS - - return pRet; -} diff --git a/vcl/unx/source/printer/jobdata.cxx b/vcl/unx/source/printer/jobdata.cxx deleted file mode 100644 index d4211eae31df..000000000000 --- a/vcl/unx/source/printer/jobdata.cxx +++ /dev/null @@ -1,265 +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_vcl.hxx" - -#include "vcl/jobdata.hxx" -#include "vcl/printerinfomanager.hxx" - -#include "tools/stream.hxx" - -#include "sal/alloca.h" - -using namespace psp; -using namespace rtl; - -JobData& JobData::operator=(const JobData& rRight) -{ - m_nCopies = rRight.m_nCopies; - m_nLeftMarginAdjust = rRight.m_nLeftMarginAdjust; - m_nRightMarginAdjust = rRight.m_nRightMarginAdjust; - m_nTopMarginAdjust = rRight.m_nTopMarginAdjust; - m_nBottomMarginAdjust = rRight.m_nBottomMarginAdjust; - m_nColorDepth = rRight.m_nColorDepth; - m_eOrientation = rRight.m_eOrientation; - m_aPrinterName = rRight.m_aPrinterName; - m_pParser = rRight.m_pParser; - m_aContext = rRight.m_aContext; - m_nPSLevel = rRight.m_nPSLevel; - m_nPDFDevice = rRight.m_nPDFDevice; - m_nColorDevice = rRight.m_nColorDevice; - - if( ! m_pParser && m_aPrinterName.getLength() ) - { - PrinterInfoManager& rMgr = PrinterInfoManager::get(); - rMgr.setupJobContextData( *this ); - } - return *this; -} - -void JobData::setCollate( bool bCollate ) -{ - const PPDParser* pParser = m_aContext.getParser(); - if( pParser ) - { - const PPDKey* pKey = pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Collate" ) ) ); - if( pKey ) - { - const PPDValue* pVal = NULL; - if( bCollate ) - pVal = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "True" ) ) ); - else - { - pVal = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "False" ) ) ); - if( ! pVal ) - pVal = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "None" ) ) ); - } - m_aContext.setValue( pKey, pVal ); - } - } -} - -bool JobData::setPaper( int i_nWidth, int i_nHeight ) -{ - bool bSuccess = false; - if( m_pParser ) - { - rtl::OUString aPaper( m_pParser->matchPaper( i_nWidth, i_nHeight ) ); - - const PPDKey* pKey = m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) ); - const PPDValue* pValue = pKey ? pKey->getValueCaseInsensitive( aPaper ) : NULL; - - bSuccess = pKey && pValue && m_aContext.setValue( pKey, pValue, false ); - } - return bSuccess; -} - -bool JobData::setPaperBin( int i_nPaperBin ) -{ - bool bSuccess = false; - if( m_pParser ) - { - const PPDKey* pKey = m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) ); - const PPDValue* pValue = pKey ? pKey->getValue( i_nPaperBin ) : NULL; - - bSuccess = pKey && pValue && m_aContext.setValue( pKey, pValue, false ); - } - return bSuccess; -} - -bool JobData::getStreamBuffer( void*& pData, int& bytes ) -{ - // consistency checks - if( ! m_pParser ) - m_pParser = m_aContext.getParser(); - if( m_pParser != m_aContext.getParser() || - ! m_pParser ) - return false; - - SvMemoryStream aStream; - ByteString aLine; - - // write header job data - aStream.WriteLine( "JobData 1" ); - - aLine = "printer="; - aLine += ByteString( String( m_aPrinterName ), RTL_TEXTENCODING_UTF8 ); - aStream.WriteLine( aLine ); - - aLine = "orientation="; - aLine += m_eOrientation == orientation::Landscape ? "Landscape" : "Portrait"; - aStream.WriteLine( aLine ); - - aLine = "copies="; - aLine += ByteString::CreateFromInt32( m_nCopies ); - aStream.WriteLine( aLine ); - - aLine = "margindajustment="; - aLine += ByteString::CreateFromInt32( m_nLeftMarginAdjust ); - aLine += ','; - aLine += ByteString::CreateFromInt32( m_nRightMarginAdjust ); - aLine += ','; - aLine += ByteString::CreateFromInt32( m_nTopMarginAdjust ); - aLine += ','; - aLine += ByteString::CreateFromInt32( m_nBottomMarginAdjust ); - aStream.WriteLine( aLine ); - - aLine = "colordepth="; - aLine += ByteString::CreateFromInt32( m_nColorDepth ); - aStream.WriteLine( aLine ); - - aLine = "pslevel="; - aLine += ByteString::CreateFromInt32( m_nPSLevel ); - aStream.WriteLine( aLine ); - - aLine = "pdfdevice="; - aLine += ByteString::CreateFromInt32( m_nPDFDevice ); - aStream.WriteLine( aLine ); - - aLine = "colordevice="; - aLine += ByteString::CreateFromInt32( m_nColorDevice ); - aStream.WriteLine( aLine ); - - // now append the PPDContext stream buffer - aStream.WriteLine( "PPDContexData" ); - ULONG nBytes; - void* pContextBuffer = m_aContext.getStreamableBuffer( nBytes ); - if( nBytes ) - aStream.Write( pContextBuffer, nBytes ); - - // success - pData = rtl_allocateMemory( bytes = aStream.Tell() ); - memcpy( pData, aStream.GetData(), bytes ); - return true; -} - -bool JobData::constructFromStreamBuffer( void* pData, int bytes, JobData& rJobData ) -{ - SvMemoryStream aStream( pData, bytes, STREAM_READ ); - ByteString aLine; - bool bVersion = false; - bool bPrinter = false; - bool bOrientation = false; - bool bCopies = false; - bool bContext = false; - bool bMargin = false; - bool bColorDepth = false; - bool bColorDevice = false; - bool bPSLevel = false; - bool bPDFDevice = false; - while( ! aStream.IsEof() ) - { - aStream.ReadLine( aLine ); - if( aLine.CompareTo( "JobData", 7 ) == COMPARE_EQUAL ) - bVersion = true; - else if( aLine.CompareTo( "printer=", 8 ) == COMPARE_EQUAL ) - { - bPrinter = true; - rJobData.m_aPrinterName = String( aLine.Copy( 8 ), RTL_TEXTENCODING_UTF8 ); - } - else if( aLine.CompareTo( "orientation=", 12 ) == COMPARE_EQUAL ) - { - bOrientation = true; - rJobData.m_eOrientation = aLine.Copy( 12 ).EqualsIgnoreCaseAscii( "landscape" ) ? orientation::Landscape : orientation::Portrait; - } - else if( aLine.CompareTo( "copies=", 7 ) == COMPARE_EQUAL ) - { - bCopies = true; - rJobData.m_nCopies = aLine.Copy( 7 ).ToInt32(); - } - else if( aLine.CompareTo( "margindajustment=",17 ) == COMPARE_EQUAL ) - { - bMargin = true; - ByteString aValues( aLine.Copy( 17 ) ); - rJobData.m_nLeftMarginAdjust = aValues.GetToken( 0, ',' ).ToInt32(); - rJobData.m_nRightMarginAdjust = aValues.GetToken( 1, ',' ).ToInt32(); - rJobData.m_nTopMarginAdjust = aValues.GetToken( 2, ',' ).ToInt32(); - rJobData.m_nBottomMarginAdjust = aValues.GetToken( 3, ',' ).ToInt32(); - } - else if( aLine.CompareTo( "colordepth=", 11 ) == COMPARE_EQUAL ) - { - bColorDepth = true; - rJobData.m_nColorDepth = aLine.Copy( 11 ).ToInt32(); - } - else if( aLine.CompareTo( "colordevice=", 12 ) == COMPARE_EQUAL ) - { - bColorDevice = true; - rJobData.m_nColorDevice = aLine.Copy( 12 ).ToInt32(); - } - else if( aLine.CompareTo( "pslevel=", 8 ) == COMPARE_EQUAL ) - { - bPSLevel = true; - rJobData.m_nPSLevel = aLine.Copy( 8 ).ToInt32(); - } - else if( aLine.CompareTo( "pdfdevice=", 10 ) == COMPARE_EQUAL ) - { - bPDFDevice = true; - rJobData.m_nPDFDevice = aLine.Copy( 10 ).ToInt32(); - } - else if( aLine.Equals( "PPDContexData" ) ) - { - if( bPrinter ) - { - PrinterInfoManager& rManager = PrinterInfoManager::get(); - const PrinterInfo& rInfo = rManager.getPrinterInfo( rJobData.m_aPrinterName ); - rJobData.m_pParser = PPDParser::getParser( rInfo.m_aDriverName ); - if( rJobData.m_pParser ) - { - rJobData.m_aContext.setParser( rJobData.m_pParser ); - int nBytes = bytes - aStream.Tell(); - void* pRemain = alloca( bytes - aStream.Tell() ); - aStream.Read( pRemain, nBytes ); - rJobData.m_aContext.rebuildFromStreamBuffer( pRemain, nBytes ); - bContext = true; - } - } - } - } - - return bVersion && bPrinter && bOrientation && bCopies && bContext && bMargin && bPSLevel && bPDFDevice && bColorDevice && bColorDepth; -} diff --git a/vcl/unx/source/printer/makefile.mk b/vcl/unx/source/printer/makefile.mk deleted file mode 100644 index 5cd35088acd9..000000000000 --- a/vcl/unx/source/printer/makefile.mk +++ /dev/null @@ -1,70 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -ENABLE_EXCEPTIONS=TRUE -PRJNAME=vcl -TARGET=printer - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -.IF "$(ENABLE_CUPS)" != "" -CDEFS += -DENABLE_CUPS -.ENDIF - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"=="aqua" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"=="aqua" - -SLOFILES=\ - $(SLO)$/ppdparser.obj \ - $(SLO)$/printerinfomanager.obj \ - $(SLO)$/jobdata.obj \ - $(SLO)$/cupsmgr.obj - -.ENDIF # GUIBASE = aqua - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -XSALSETLIBNAME=$(DLLPRE)spa$(DLLPOSTFIX)$(DLLPOST) - -$(INCCOM)$/rtsname.hxx: - rm -f $(INCCOM)$/rtsname.hxx ; \ - echo "#define _XSALSET_LIBNAME "\"$(XSALSETLIBNAME)\" > $(INCCOM)$/rtsname.hxx - -$(SLO)$/cupsmgr.obj : $(INCCOM)$/rtsname.hxx - diff --git a/vcl/unx/source/printer/ppdparser.cxx b/vcl/unx/source/printer/ppdparser.cxx deleted file mode 100644 index 587e58be5bc7..000000000000 --- a/vcl/unx/source/printer/ppdparser.cxx +++ /dev/null @@ -1,2166 +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_vcl.hxx" - -#include -#include - -#include - -#include "vcl/ppdparser.hxx" -#include "vcl/strhelper.hxx" -#include "vcl/helper.hxx" -#include "vcl/svapp.hxx" -#include "cupsmgr.hxx" -#include "tools/debug.hxx" -#include "tools/urlobj.hxx" -#include "tools/stream.hxx" -#include "tools/zcodec.hxx" -#include "osl/mutex.hxx" -#include "osl/file.hxx" -#include "osl/process.h" -#include "osl/thread.h" -#include "rtl/strbuf.hxx" -#include "rtl/ustrbuf.hxx" - -#include "com/sun/star/lang/Locale.hpp" - -namespace psp -{ - class PPDTranslator - { - struct LocaleEqual - { - bool operator()(const com::sun::star::lang::Locale& i_rLeft, - const com::sun::star::lang::Locale& i_rRight) const - { - return i_rLeft.Language.equals( i_rRight.Language ) && - i_rLeft.Country.equals( i_rRight.Country ) && - i_rLeft.Variant.equals( i_rRight.Variant ); - } - }; - - struct LocaleHash - { - size_t operator()(const com::sun::star::lang::Locale& rLocale) const - { return - (size_t)rLocale.Language.hashCode() - ^ (size_t)rLocale.Country.hashCode() - ^ (size_t)rLocale.Variant.hashCode() - ; - } - }; - - typedef std::hash_map< com::sun::star::lang::Locale, rtl::OUString, LocaleHash, LocaleEqual > translation_map; - typedef std::hash_map< rtl::OUString, translation_map, rtl::OUStringHash > key_translation_map; - - key_translation_map m_aTranslations; - public: - PPDTranslator() {} - ~PPDTranslator() {} - - - void insertValue( - const rtl::OUString& i_rKey, - const rtl::OUString& i_rOption, - const rtl::OUString& i_rValue, - const rtl::OUString& i_rTranslation, - const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale() - ); - - void insertOption( const rtl::OUString& i_rKey, - const rtl::OUString& i_rOption, - const rtl::OUString& i_rTranslation, - const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale() ) - { - insertValue( i_rKey, i_rOption, rtl::OUString(), i_rTranslation, i_rLocale ); - } - - void insertKey( const rtl::OUString& i_rKey, - const rtl::OUString& i_rTranslation, - const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale() ) - { - insertValue( i_rKey, rtl::OUString(), rtl::OUString(), i_rTranslation, i_rLocale ); - } - - rtl::OUString translateValue( - const rtl::OUString& i_rKey, - const rtl::OUString& i_rOption, - const rtl::OUString& i_rValue, - const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale() - ) const; - - rtl::OUString translateOption( const rtl::OUString& i_rKey, - const rtl::OUString& i_rOption, - const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale() ) const - { - return translateValue( i_rKey, i_rOption, rtl::OUString(), i_rLocale ); - } - - rtl::OUString translateKey( const rtl::OUString& i_rKey, - const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale() ) const - { - return translateValue( i_rKey, rtl::OUString(), rtl::OUString(), i_rLocale ); - } - }; - - static com::sun::star::lang::Locale normalizeInputLocale( - const com::sun::star::lang::Locale& i_rLocale, - bool bInsertDefault = false - ) - { - com::sun::star::lang::Locale aLoc( i_rLocale ); - if( bInsertDefault && aLoc.Language.getLength() == 0 ) - { - // empty locale requested, fill in application UI locale - aLoc = Application::GetSettings().GetUILocale(); - - #if OSL_DEBUG_LEVEL > 1 - static const char* pEnvLocale = getenv( "SAL_PPDPARSER_LOCALE" ); - if( pEnvLocale && *pEnvLocale ) - { - rtl::OString aStr( pEnvLocale ); - sal_Int32 nLen = aStr.getLength(); - aLoc.Language = rtl::OStringToOUString( aStr.copy( 0, nLen > 2 ? 2 : nLen ), RTL_TEXTENCODING_MS_1252 ); - if( nLen >=5 && aStr.getStr()[2] == '_' ) - aLoc.Country = rtl::OStringToOUString( aStr.copy( 3, 2 ), RTL_TEXTENCODING_MS_1252 ); - else - aLoc.Country = rtl::OUString(); - aLoc.Variant = rtl::OUString(); - } - #endif - } - aLoc.Language = aLoc.Language.toAsciiLowerCase(); - aLoc.Country = aLoc.Country.toAsciiUpperCase(); - aLoc.Variant = aLoc.Variant.toAsciiUpperCase(); - - return aLoc; - } - - void PPDTranslator::insertValue( - const rtl::OUString& i_rKey, - const rtl::OUString& i_rOption, - const rtl::OUString& i_rValue, - const rtl::OUString& i_rTranslation, - const com::sun::star::lang::Locale& i_rLocale - ) - { - rtl::OUStringBuffer aKey( i_rKey.getLength() + i_rOption.getLength() + i_rValue.getLength() + 2 ); - aKey.append( i_rKey ); - if( i_rOption.getLength() || i_rValue.getLength() ) - { - aKey.append( sal_Unicode( ':' ) ); - aKey.append( i_rOption ); - } - if( i_rValue.getLength() ) - { - aKey.append( sal_Unicode( ':' ) ); - aKey.append( i_rValue ); - } - if( aKey.getLength() && i_rTranslation.getLength() ) - { - rtl::OUString aK( aKey.makeStringAndClear() ); - com::sun::star::lang::Locale aLoc; - aLoc.Language = i_rLocale.Language.toAsciiLowerCase(); - aLoc.Country = i_rLocale.Country.toAsciiUpperCase(); - aLoc.Variant = i_rLocale.Variant.toAsciiUpperCase(); - m_aTranslations[ aK ][ aLoc ] = i_rTranslation; - } - } - - rtl::OUString PPDTranslator::translateValue( - const rtl::OUString& i_rKey, - const rtl::OUString& i_rOption, - const rtl::OUString& i_rValue, - const com::sun::star::lang::Locale& i_rLocale - ) const - { - rtl::OUString aResult; - - rtl::OUStringBuffer aKey( i_rKey.getLength() + i_rOption.getLength() + i_rValue.getLength() + 2 ); - aKey.append( i_rKey ); - if( i_rOption.getLength() || i_rValue.getLength() ) - { - aKey.append( sal_Unicode( ':' ) ); - aKey.append( i_rOption ); - } - if( i_rValue.getLength() ) - { - aKey.append( sal_Unicode( ':' ) ); - aKey.append( i_rValue ); - } - if( aKey.getLength() ) - { - rtl::OUString aK( aKey.makeStringAndClear() ); - key_translation_map::const_iterator it = m_aTranslations.find( aK ); - if( it != m_aTranslations.end() ) - { - const translation_map& rMap( it->second ); - - com::sun::star::lang::Locale aLoc( normalizeInputLocale( i_rLocale, true ) ); - for( int nTry = 0; nTry < 4; nTry++ ) - { - translation_map::const_iterator tr = rMap.find( aLoc ); - if( tr != rMap.end() ) - { - aResult = tr->second; - break; - } - switch( nTry ) - { - case 0: aLoc.Variant = rtl::OUString();break; - case 1: aLoc.Country = rtl::OUString();break; - case 2: aLoc.Language = rtl::OUString();break; - } - } - } - } - return aResult; - } -} - -using namespace psp; -using namespace rtl; - -#undef DBG_ASSERT -#if defined DBG_UTIL || (OSL_DEBUG_LEVEL > 1) -#define BSTRING(x) ByteString( x, osl_getThreadTextEncoding() ) -#define DBG_ASSERT( x, y ) { if( ! (x) ) fprintf( stderr, (y) ); } -#else -#define DBG_ASSERT( x, y ) -#endif - -std::list< PPDParser* > PPDParser::aAllParsers; -std::hash_map< OUString, OUString, OUStringHash >* PPDParser::pAllPPDFiles = NULL; - -class PPDDecompressStream -{ - SvFileStream* mpFileStream; - SvMemoryStream* mpMemStream; - rtl::OUString maFileName; - - // forbid copying - PPDDecompressStream( const PPDDecompressStream& ); - PPDDecompressStream& operator=(const PPDDecompressStream& ); - - public: - PPDDecompressStream( const rtl::OUString& rFile ); - ~PPDDecompressStream(); - - bool IsOpen() const; - bool IsEof() const; - void ReadLine( ByteString& o_rLine); - void Open( const rtl::OUString& i_rFile ); - void Close(); - const rtl::OUString& GetFileName() const { return maFileName; } -}; - -PPDDecompressStream::PPDDecompressStream( const rtl::OUString& i_rFile ) : - mpFileStream( NULL ), - mpMemStream( NULL ) -{ - Open( i_rFile ); -} - -PPDDecompressStream::~PPDDecompressStream() -{ - Close(); -} - -void PPDDecompressStream::Open( const rtl::OUString& i_rFile ) -{ - Close(); - - mpFileStream = new SvFileStream( i_rFile, STREAM_READ ); - maFileName = mpFileStream->GetFileName(); - - if( ! mpFileStream->IsOpen() ) - { - Close(); - return; - } - - ByteString aLine; - mpFileStream->ReadLine( aLine ); - mpFileStream->Seek( 0 ); - - // check for compress'ed or gzip'ed file - ULONG nCompressMethod = 0; - if( aLine.Len() > 1 && static_cast(aLine.GetChar( 0 )) == 0x1f ) - { - if( static_cast(aLine.GetChar( 1 )) == 0x8b ) // check for gzip - nCompressMethod = ZCODEC_DEFAULT | ZCODEC_GZ_LIB; - } - - if( nCompressMethod != 0 ) - { - // so let's try to decompress the stream - mpMemStream = new SvMemoryStream( 4096, 4096 ); - ZCodec aCodec; - aCodec.BeginCompression( nCompressMethod ); - long nComp = aCodec.Decompress( *mpFileStream, *mpMemStream ); - aCodec.EndCompression(); - if( nComp < 0 ) - { - // decompression failed, must be an uncompressed stream after all - delete mpMemStream, mpMemStream = NULL; - mpFileStream->Seek( 0 ); - } - else - { - // compression successfull, can get rid of file stream - delete mpFileStream, mpFileStream = NULL; - mpMemStream->Seek( 0 ); - } - } -} - -void PPDDecompressStream::Close() -{ - delete mpMemStream, mpMemStream = NULL; - delete mpFileStream, mpFileStream = NULL; -} - -bool PPDDecompressStream::IsOpen() const -{ - return (mpMemStream || (mpFileStream && mpFileStream->IsOpen())); -} - -bool PPDDecompressStream::IsEof() const -{ - return ( mpMemStream ? mpMemStream->IsEof() : ( mpFileStream ? mpFileStream->IsEof() : true ) ); -} - -void PPDDecompressStream::ReadLine( ByteString& o_rLine ) -{ - if( mpMemStream ) - mpMemStream->ReadLine( o_rLine ); - else if( mpFileStream ) - mpFileStream->ReadLine( o_rLine ); -} - -static osl::FileBase::RC resolveLink( const rtl::OUString& i_rURL, rtl::OUString& o_rResolvedURL, rtl::OUString& o_rBaseName, osl::FileStatus::Type& o_rType, int nLinkLevel = 10 ) -{ - osl::DirectoryItem aLinkItem; - osl::FileBase::RC aRet = osl::FileBase::E_None; - - if( ( aRet = osl::DirectoryItem::get( i_rURL, aLinkItem ) ) == osl::FileBase::E_None ) - { - osl::FileStatus aStatus( FileStatusMask_FileName | FileStatusMask_Type | FileStatusMask_LinkTargetURL ); - if( ( aRet = aLinkItem.getFileStatus( aStatus ) ) == osl::FileBase::E_None ) - { - if( aStatus.getFileType() == osl::FileStatus::Link ) - { - if( nLinkLevel > 0 ) - aRet = resolveLink( aStatus.getLinkTargetURL(), o_rResolvedURL, o_rBaseName, o_rType, nLinkLevel-1 ); - else - aRet = osl::FileBase::E_MULTIHOP; - } - else - { - o_rResolvedURL = i_rURL; - o_rBaseName = aStatus.getFileName(); - o_rType = aStatus.getFileType(); - } - } - } - return aRet; -} - -void PPDParser::scanPPDDir( const String& rDir ) -{ - static struct suffix_t - { - const sal_Char* pSuffix; - const sal_Int32 nSuffixLen; - } const pSuffixes[] = - { { ".PS", 3 }, { ".PPD", 4 }, { ".PS.GZ", 6 }, { ".PPD.GZ", 7 } }; - - const int nSuffixes = sizeof(pSuffixes)/sizeof(pSuffixes[0]); - - osl::Directory aDir( rDir ); - if ( aDir.open() == osl::FileBase::E_None ) - { - osl::DirectoryItem aItem; - - INetURLObject aPPDDir(rDir); - while( aDir.getNextItem( aItem ) == osl::FileBase::E_None ) - { - osl::FileStatus aStatus( FileStatusMask_FileName ); - if( aItem.getFileStatus( aStatus ) == osl::FileBase::E_None ) - { - rtl::OUStringBuffer aURLBuf( rDir.Len() + 64 ); - aURLBuf.append( rDir ); - aURLBuf.append( sal_Unicode( '/' ) ); - aURLBuf.append( aStatus.getFileName() ); - - rtl::OUString aFileURL, aFileName; - osl::FileStatus::Type eType = osl::FileStatus::Unknown; - - if( resolveLink( aURLBuf.makeStringAndClear(), aFileURL, aFileName, eType ) == osl::FileBase::E_None ) - { - if( eType == osl::FileStatus::Regular ) - { - INetURLObject aPPDFile = aPPDDir; - aPPDFile.Append( aFileName ); - - // match extension - for( int nSuffix = 0; nSuffix < nSuffixes; nSuffix++ ) - { - if( aFileName.getLength() > pSuffixes[nSuffix].nSuffixLen ) - { - if( aFileName.endsWithIgnoreAsciiCaseAsciiL( pSuffixes[nSuffix].pSuffix, pSuffixes[nSuffix].nSuffixLen ) ) - { - (*pAllPPDFiles)[ aFileName.copy( 0, aFileName.getLength() - pSuffixes[nSuffix].nSuffixLen ) ] = aPPDFile.PathToFileName(); - break; - } - } - } - } - else if( eType == osl::FileStatus::Directory ) - { - scanPPDDir( aFileURL ); - } - } - } - } - aDir.close(); - } -} - -void PPDParser::initPPDFiles() -{ - if( pAllPPDFiles ) - return; - - pAllPPDFiles = new std::hash_map< OUString, OUString, OUStringHash >(); - - // check installation directories - std::list< OUString > aPathList; - psp::getPrinterPathList( aPathList, PRINTER_PPDDIR ); - for( std::list< OUString >::const_iterator ppd_it = aPathList.begin(); ppd_it != aPathList.end(); ++ppd_it ) - { - INetURLObject aPPDDir( *ppd_it, INET_PROT_FILE, INetURLObject::ENCODE_ALL ); - scanPPDDir( aPPDDir.GetMainURL( INetURLObject::NO_DECODE ) ); - } - if( pAllPPDFiles->find( OUString( RTL_CONSTASCII_USTRINGPARAM( "SGENPRT" ) ) ) == pAllPPDFiles->end() ) - { - // last try: search in directory of executable (mainly for setup) - OUString aExe; - if( osl_getExecutableFile( &aExe.pData ) == osl_Process_E_None ) - { - INetURLObject aDir( aExe ); - aDir.removeSegment(); -#ifdef DEBUG - fprintf( stderr, "scanning last chance dir: %s\n", OUStringToOString( aDir.GetMainURL( INetURLObject::NO_DECODE ), osl_getThreadTextEncoding() ).getStr() ); -#endif - scanPPDDir( aDir.GetMainURL( INetURLObject::NO_DECODE ) ); -#ifdef DEBUG - fprintf( stderr, "SGENPRT %s\n", pAllPPDFiles->find( OUString( RTL_CONSTASCII_USTRINGPARAM( "SGENPRT" ) ) ) == pAllPPDFiles->end() ? "not found" : "found" ); -#endif - } - } -} - -void PPDParser::getKnownPPDDrivers( std::list< rtl::OUString >& o_rDrivers, bool bRefresh ) -{ - if( bRefresh ) - { - delete pAllPPDFiles; - pAllPPDFiles = NULL; - } - - initPPDFiles(); - o_rDrivers.clear(); - - std::hash_map< OUString, OUString, OUStringHash >::const_iterator it; - for( it = pAllPPDFiles->begin(); it != pAllPPDFiles->end(); ++it ) - o_rDrivers.push_back( it->first ); -} - -String PPDParser::getPPDFile( const String& rFile ) -{ - INetURLObject aPPD( rFile, INET_PROT_FILE, INetURLObject::ENCODE_ALL ); - // someone might enter a full qualified name here - PPDDecompressStream aStream( aPPD.PathToFileName() ); - if( ! aStream.IsOpen() ) - { - std::hash_map< OUString, OUString, OUStringHash >::const_iterator it; - - bool bRetry = true; - do - { - initPPDFiles(); - // some PPD files contain dots beside the extension, so try name first - // and cut of points after that - rtl::OUString aBase( rFile ); - sal_Int32 nLastIndex = aBase.lastIndexOf( sal_Unicode( '/' ) ); - if( nLastIndex >= 0 ) - aBase = aBase.copy( nLastIndex+1 ); - do - { - it = pAllPPDFiles->find( aBase ); - nLastIndex = aBase.lastIndexOf( sal_Unicode( '.' ) ); - if( nLastIndex > 0 ) - aBase = aBase.copy( 0, nLastIndex ); - } while( it == pAllPPDFiles->end() && nLastIndex > 0 ); - - if( it == pAllPPDFiles->end() && bRetry ) - { - // a new file ? rehash - delete pAllPPDFiles; pAllPPDFiles = NULL; - bRetry = false; - // note this is optimized for office start where - // no new files occur and initPPDFiles is called only once - } - } while( ! pAllPPDFiles ); - - if( it != pAllPPDFiles->end() ) - aStream.Open( it->second ); - } - - String aRet; - if( aStream.IsOpen() ) - { - ByteString aLine; - aStream.ReadLine( aLine ); - if( aLine.Search( "*PPD-Adobe" ) == 0 ) - aRet = aStream.GetFileName(); - else - { - // our *Include hack does usually not begin - // with *PPD-Adobe, so try some lines for *Include - int nLines = 10; - while( aLine.Search( "*Include" ) != 0 && --nLines ) - aStream.ReadLine( aLine ); - if( nLines ) - aRet = aStream.GetFileName(); - } - } - - return aRet; -} - -String PPDParser::getPPDPrinterName( const String& rFile ) -{ - String aPath = getPPDFile( rFile ); - String aName; - - // read in the file - PPDDecompressStream aStream( aPath ); - if( aStream.IsOpen() ) - { - String aCurLine; - while( ! aStream.IsEof() && aStream.IsOpen() ) - { - ByteString aByteLine; - aStream.ReadLine( aByteLine ); - aCurLine = String( aByteLine, RTL_TEXTENCODING_MS_1252 ); - if( aCurLine.CompareIgnoreCaseToAscii( "*include:", 9 ) == COMPARE_EQUAL ) - { - aCurLine.Erase( 0, 9 ); - aCurLine.EraseLeadingChars( ' ' ); - aCurLine.EraseTrailingChars( ' ' ); - aCurLine.EraseLeadingChars( '\t' ); - aCurLine.EraseTrailingChars( '\t' ); - aCurLine.EraseTrailingChars( '\r' ); - aCurLine.EraseTrailingChars( '\n' ); - aCurLine.EraseLeadingChars( '"' ); - aCurLine.EraseTrailingChars( '"' ); - aStream.Close(); - aStream.Open( getPPDFile( aCurLine ) ); - continue; - } - if( aCurLine.CompareToAscii( "*ModelName:", 11 ) == COMPARE_EQUAL ) - { - aName = aCurLine.GetToken( 1, '"' ); - break; - } - else if( aCurLine.CompareToAscii( "*NickName:", 10 ) == COMPARE_EQUAL ) - aName = aCurLine.GetToken( 1, '"' ); - } - } - return aName; -} - -const PPDParser* PPDParser::getParser( const String& rFile ) -{ - static ::osl::Mutex aMutex; - ::osl::Guard< ::osl::Mutex > aGuard( aMutex ); - - String aFile = rFile; - if( rFile.CompareToAscii( "CUPS:", 5 ) != COMPARE_EQUAL ) - aFile = getPPDFile( rFile ); - if( ! aFile.Len() ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "Could not get printer PPD file \"%s\" !\n", OUStringToOString( rFile, osl_getThreadTextEncoding() ).getStr() ); -#endif - return NULL; - } - - for( ::std::list< PPDParser* >::const_iterator it = aAllParsers.begin(); it != aAllParsers.end(); ++it ) - if( (*it)->m_aFile == aFile ) - return *it; - - PPDParser* pNewParser = NULL; - if( aFile.CompareToAscii( "CUPS:", 5 ) != COMPARE_EQUAL ) - pNewParser = new PPDParser( aFile ); - else - { - PrinterInfoManager& rMgr = PrinterInfoManager::get(); - if( rMgr.getType() == PrinterInfoManager::CUPS ) - { - pNewParser = const_cast(static_cast(rMgr).createCUPSParser( aFile )); - } - } - if( pNewParser ) - { - // this may actually be the SGENPRT parser, - // so ensure uniquness here - aAllParsers.remove( pNewParser ); - // insert new parser to list - aAllParsers.push_front( pNewParser ); - } - return pNewParser; -} - -void PPDParser::freeAll() -{ - while( aAllParsers.begin() != aAllParsers.end() ) - { - delete aAllParsers.front(); - aAllParsers.pop_front(); - } - delete pAllPPDFiles; - pAllPPDFiles = NULL; -} - -PPDParser::PPDParser( const String& rFile ) : - m_aFile( rFile ), - m_bType42Capable( false ), - m_aFileEncoding( RTL_TEXTENCODING_MS_1252 ), - m_pDefaultImageableArea( NULL ), - m_pImageableAreas( NULL ), - m_pDefaultPaperDimension( NULL ), - m_pPaperDimensions( NULL ), - m_pDefaultInputSlot( NULL ), - m_pInputSlots( NULL ), - m_pDefaultResolution( NULL ), - m_pResolutions( NULL ), - m_pDefaultDuplexType( NULL ), - m_pDuplexTypes( NULL ), - m_pFontList( NULL ), - m_pTranslator( new PPDTranslator() ) -{ - // read in the file - std::list< ByteString > aLines; - PPDDecompressStream aStream( m_aFile ); - bool bLanguageEncoding = false; - if( aStream.IsOpen() ) - { - ByteString aCurLine; - while( ! aStream.IsEof() ) - { - aStream.ReadLine( aCurLine ); - if( aCurLine.GetChar( 0 ) == '*' ) - { - if( aCurLine.CompareIgnoreCaseToAscii( "*include:", 9 ) == COMPARE_EQUAL ) - { - aCurLine.Erase( 0, 9 ); - aCurLine.EraseLeadingChars( ' ' ); - aCurLine.EraseTrailingChars( ' ' ); - aCurLine.EraseLeadingChars( '\t' ); - aCurLine.EraseTrailingChars( '\t' ); - aCurLine.EraseTrailingChars( '\r' ); - aCurLine.EraseTrailingChars( '\n' ); - aCurLine.EraseLeadingChars( '"' ); - aCurLine.EraseTrailingChars( '"' ); - aStream.Close(); - aStream.Open( getPPDFile( String( aCurLine, m_aFileEncoding ) ) ); - continue; - } - else if( ! bLanguageEncoding && - aCurLine.CompareIgnoreCaseToAscii( "*languageencoding", 17 ) == COMPARE_EQUAL ) - { - bLanguageEncoding = true; // generally only the first one counts - ByteString aLower = aCurLine; - aLower.ToLowerAscii(); - if( aLower.Search( "isolatin1", 17 ) != STRING_NOTFOUND || - aLower.Search( "windowsansi", 17 ) != STRING_NOTFOUND ) - m_aFileEncoding = RTL_TEXTENCODING_MS_1252; - else if( aLower.Search( "isolatin2", 17 ) != STRING_NOTFOUND ) - m_aFileEncoding = RTL_TEXTENCODING_ISO_8859_2; - else if( aLower.Search( "isolatin5", 17 ) != STRING_NOTFOUND ) - m_aFileEncoding = RTL_TEXTENCODING_ISO_8859_5; - else if( aLower.Search( "jis83-rksj", 17 ) != STRING_NOTFOUND ) - m_aFileEncoding = RTL_TEXTENCODING_SHIFT_JIS; - else if( aLower.Search( "macstandard", 17 ) != STRING_NOTFOUND ) - m_aFileEncoding = RTL_TEXTENCODING_APPLE_ROMAN; - else if( aLower.Search( "utf-8", 17 ) != STRING_NOTFOUND ) - m_aFileEncoding = RTL_TEXTENCODING_UTF8; - } - } - aLines.push_back( aCurLine ); - } - } - aStream.Close(); - - // now get the Values - parse( aLines ); -#if OSL_DEBUG_LEVEL > 2 - fprintf( stderr, "acquired %d Keys from PPD %s:\n", m_aKeys.size(), BSTRING( m_aFile ).GetBuffer() ); - for( PPDParser::hash_type::const_iterator it = m_aKeys.begin(); it != m_aKeys.end(); ++it ) - { - const PPDKey* pKey = it->second; - char* pSetupType = ""; - switch( pKey->m_eSetupType ) - { - case PPDKey::ExitServer: pSetupType = "ExitServer";break; - case PPDKey::Prolog: pSetupType = "Prolog";break; - case PPDKey::DocumentSetup: pSetupType = "DocumentSetup";break; - case PPDKey::PageSetup: pSetupType = "PageSetup";break; - case PPDKey::JCLSetup: pSetupType = "JCLSetup";break; - case PPDKey::AnySetup: pSetupType = "AnySetup";break; - default: break; - }; - fprintf( stderr, "\t\"%s\" (\"%s\") (%d values) OrderDependency: %d %s\n", - BSTRING( pKey->getKey() ).GetBuffer(), - BSTRING( pKey->m_aUITranslation ).GetBuffer(), - pKey->countValues(), - pKey->m_nOrderDependency, - pSetupType ); - for( int j = 0; j < pKey->countValues(); j++ ) - { - fprintf( stderr, "\t\t" ); - const PPDValue* pValue = pKey->getValue( j ); - if( pValue == pKey->m_pDefaultValue ) - fprintf( stderr, "(Default:) " ); - char* pVType = ""; - switch( pValue->m_eType ) - { - case eInvocation: pVType = "invocation";break; - case eQuoted: pVType = "quoted";break; - case eString: pVType = "string";break; - case eSymbol: pVType = "symbol";break; - case eNo: pVType = "no";break; - default: break; - }; - fprintf( stderr, "option: \"%s\" (\"%s\"), value: type %s \"%s\" (\"%s\")\n", - BSTRING( pValue->m_aOption ).GetBuffer(), - BSTRING( pValue->m_aOptionTranslation ).GetBuffer(), - pVType, - BSTRING( pValue->m_aValue ).GetBuffer(), - BSTRING( pValue->m_aValueTranslation ).GetBuffer() ); - } - } - fprintf( stderr, "constraints: (%d found)\n", m_aConstraints.size() ); - for( std::list< PPDConstraint >::const_iterator cit = m_aConstraints.begin(); cit != m_aConstraints.end(); ++cit ) - { - fprintf( stderr, "*\"%s\" \"%s\" *\"%s\" \"%s\"\n", - BSTRING( cit->m_pKey1->getKey() ).GetBuffer(), - cit->m_pOption1 ? BSTRING( cit->m_pOption1->m_aOption ).GetBuffer() : "", - BSTRING( cit->m_pKey2->getKey() ).GetBuffer(), - cit->m_pOption2 ? BSTRING( cit->m_pOption2->m_aOption ).GetBuffer() : "" - ); - } -#endif - - // fill in shortcuts - const PPDKey* pKey; - - m_pImageableAreas = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "ImageableArea" ) ) ); - if( m_pImageableAreas ) - m_pDefaultImageableArea = m_pImageableAreas->getDefaultValue(); - DBG_ASSERT( m_pImageableAreas, "Warning: no ImageableArea in PPD\n" ); - DBG_ASSERT( m_pDefaultImageableArea, "Warning: no DefaultImageableArea in PPD\n" ); - - m_pPaperDimensions = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PaperDimension" ) ) ); - if( m_pPaperDimensions ) - m_pDefaultPaperDimension = m_pPaperDimensions->getDefaultValue(); - DBG_ASSERT( m_pPaperDimensions, "Warning: no PaperDimension in PPD\n" ); - DBG_ASSERT( m_pDefaultPaperDimension, "Warning: no DefaultPaperDimension in PPD\n" ); - - m_pResolutions = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Resolution" ) ) ); - if( m_pResolutions ) - m_pDefaultResolution = m_pResolutions->getDefaultValue(); - DBG_ASSERT( m_pResolutions, "Warning: no Resolution in PPD\n" ); - DBG_ASSERT( m_pDefaultResolution, "Warning: no DefaultResolution in PPD\n" ); - - m_pInputSlots = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) ); - if( m_pInputSlots ) - m_pDefaultInputSlot = m_pInputSlots->getDefaultValue(); - DBG_ASSERT( m_pPaperDimensions, "Warning: no InputSlot in PPD\n" ); - DBG_ASSERT( m_pDefaultPaperDimension, "Warning: no DefaultInputSlot in PPD\n" ); - - m_pDuplexTypes = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) ); - if( m_pDuplexTypes ) - m_pDefaultDuplexType = m_pDuplexTypes->getDefaultValue(); - - m_pFontList = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Font" ) ) ); - DBG_ASSERT( m_pFontList, "Warning: no Font in PPD\n" ); - - // fill in direct values - if( (pKey = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "ModelName" ) ) )) ) - m_aPrinterName = pKey->getValue( 0 )->m_aValue; - if( (pKey = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "NickName" ) ) )) ) - m_aNickName = pKey->getValue( 0 )->m_aValue; - if( (pKey = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "ColorDevice" ) ) )) ) - m_bColorDevice = pKey->getValue( 0 )->m_aValue.CompareIgnoreCaseToAscii( "true", 4 ) == COMPARE_EQUAL ? true : false; - - if( (pKey = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "LanguageLevel" ) ) )) ) - m_nLanguageLevel = pKey->getValue( 0 )->m_aValue.ToInt32(); - if( (pKey = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "TTRasterizer" ) ) )) ) - m_bType42Capable = pKey->getValue( 0 )->m_aValue.EqualsIgnoreCaseAscii( "Type42" ) ? true : false; -} - -PPDParser::~PPDParser() -{ - for( PPDParser::hash_type::iterator it = m_aKeys.begin(); it != m_aKeys.end(); ++it ) - delete it->second; - delete m_pTranslator; -} - -void PPDParser::insertKey( const String& rKey, PPDKey* pKey ) -{ - m_aKeys[ rKey ] = pKey; - m_aOrderedKeys.push_back( pKey ); -} - -const PPDKey* PPDParser::getKey( int n ) const -{ - return ((unsigned int)n < m_aOrderedKeys.size() && n >= 0) ? m_aOrderedKeys[n] : NULL; -} - -const PPDKey* PPDParser::getKey( const String& rKey ) const -{ - PPDParser::hash_type::const_iterator it = m_aKeys.find( rKey ); - return it != m_aKeys.end() ? it->second : NULL; -} - -bool PPDParser::hasKey( const PPDKey* pKey ) const -{ - return - pKey ? - ( m_aKeys.find( pKey->getKey() ) != m_aKeys.end() ? true : false ) : - false; -} - -static sal_uInt8 getNibble( sal_Char cChar ) -{ - sal_uInt8 nRet = 0; - if( cChar >= '0' && cChar <= '9' ) - nRet = sal_uInt8( cChar - '0' ); - else if( cChar >= 'A' && cChar <= 'F' ) - nRet = 10 + sal_uInt8( cChar - 'A' ); - else if( cChar >= 'a' && cChar <= 'f' ) - nRet = 10 + sal_uInt8( cChar - 'a' ); - return nRet; -} - -String PPDParser::handleTranslation( const ByteString& i_rString, bool bIsGlobalized ) -{ - int nOrigLen = i_rString.Len(); - OStringBuffer aTrans( nOrigLen ); - const sal_Char* pStr = i_rString.GetBuffer(); - const sal_Char* pEnd = pStr + nOrigLen; - while( pStr < pEnd ) - { - if( *pStr == '<' ) - { - pStr++; - sal_Char cChar; - while( *pStr != '>' && pStr < pEnd-1 ) - { - cChar = getNibble( *pStr++ ) << 4; - cChar |= getNibble( *pStr++ ); - aTrans.append( cChar ); - } - pStr++; - } - else - aTrans.append( *pStr++ ); - } - return OStringToOUString( aTrans.makeStringAndClear(), bIsGlobalized ? RTL_TEXTENCODING_UTF8 : m_aFileEncoding ); -} - -void PPDParser::parse( ::std::list< ByteString >& rLines ) -{ - std::list< ByteString >::iterator line = rLines.begin(); - PPDParser::hash_type::const_iterator keyit; - while( line != rLines.end() ) - { - ByteString aCurrentLine( *line ); - ++line; - if( aCurrentLine.GetChar(0) != '*' ) - continue; - if( aCurrentLine.GetChar(1) == '%' ) - continue; - - ByteString aKey = GetCommandLineToken( 0, aCurrentLine.GetToken( 0, ':' ) ); - int nPos = aKey.Search( '/' ); - if( nPos != STRING_NOTFOUND ) - aKey.Erase( nPos ); - aKey.Erase( 0, 1 ); // remove the '*' - - if( aKey.Equals( "CloseUI" ) || aKey.Equals( "OpenGroup" ) || aKey.Equals( "CloseGroup" ) || aKey.Equals( "End" ) || aKey.Equals( "OpenSubGroup" ) || aKey.Equals( "CloseSubGroup" ) ) - continue; - - if( aKey.Equals( "OpenUI" ) ) - { - parseOpenUI( aCurrentLine ); - continue; - } - else if( aKey.Equals( "OrderDependency" ) ) - { - parseOrderDependency( aCurrentLine ); - continue; - } - else if( aKey.Equals( "UIConstraints" ) || aKey.Equals( "NonUIConstraints" ) ) - continue; // parsed in pass 2 - else if( aKey.Equals( "CustomPageSize" ) ) // currently not handled - continue; - - // default values are parsed in pass 2 - if( aKey.CompareTo( "Default", 7 ) == COMPARE_EQUAL ) - continue; - - bool bQuery = false; - if( aKey.GetChar( 0 ) == '?' ) - { - aKey.Erase( 0, 1 ); - bQuery = true; - } - - String aUniKey( aKey, RTL_TEXTENCODING_MS_1252 ); - // handle CUPS extension for globalized PPDs - bool bIsGlobalizedLine = false; - com::sun::star::lang::Locale aTransLocale; - if( ( aUniKey.Len() > 3 && aUniKey.GetChar( 2 ) == '.' ) || - ( aUniKey.Len() > 5 && aUniKey.GetChar( 2 ) == '_' && aUniKey.GetChar( 5 ) == '.' ) ) - { - if( aUniKey.GetChar( 2 ) == '.' ) - { - aTransLocale.Language = aUniKey.Copy( 0, 2 ); - aUniKey = aUniKey.Copy( 3 ); - } - else - { - aTransLocale.Language = aUniKey.Copy( 0, 2 ); - aTransLocale.Country = aUniKey.Copy( 3, 2 ); - aUniKey = aUniKey.Copy( 6 ); - } - bIsGlobalizedLine = true; - } - - String aOption; - nPos = aCurrentLine.Search( ':' ); - if( nPos != STRING_NOTFOUND ) - { - aOption = String( aCurrentLine.Copy( 1, nPos-1 ), RTL_TEXTENCODING_MS_1252 ); - aOption = GetCommandLineToken( 1, aOption ); - int nTransPos = aOption.Search( '/' ); - if( nTransPos != STRING_NOTFOUND ) - aOption.Erase( nTransPos ); - } - - PPDValueType eType = eNo; - String aValue; - rtl::OUString aOptionTranslation; - rtl::OUString aValueTranslation; - if( nPos != STRING_NOTFOUND ) - { - // found a colon, there may be an option - ByteString aLine = aCurrentLine.Copy( 1, nPos-1 ); - aLine = WhitespaceToSpace( aLine ); - int nTransPos = aLine.Search( '/' ); - if( nTransPos != STRING_NOTFOUND ) - aOptionTranslation = handleTranslation( aLine.Copy( nTransPos+1 ), bIsGlobalizedLine ); - - // read in more lines if necessary for multiline values - aLine = aCurrentLine.Copy( nPos+1 ); - if( aLine.Len() ) - { - while( ! ( aLine.GetTokenCount( '"' ) & 1 ) && - line != rLines.end() ) - // while there is an even number of tokens; that means - // an odd number of doubleqoutes - { - // copy the newlines also - aLine += '\n'; - aLine += *line; - ++line; - } - } - aLine = WhitespaceToSpace( aLine ); - - // #i100644# handle a missing value (actually a broken PPD) - if( ! aLine.Len() ) - { - if( aOption.Len() && - aUniKey.CompareToAscii( "JCL", 3 ) != COMPARE_EQUAL ) - eType = eInvocation; - else - eType = eQuoted; - } - // check for invocation or quoted value - else if( aLine.GetChar(0) == '"' ) - { - aLine.Erase( 0, 1 ); - nTransPos = aLine.Search( '"' ); - aValue = String( aLine.Copy( 0, nTransPos ), RTL_TEXTENCODING_MS_1252 ); - // after the second doublequote can follow a / and a translation - aValueTranslation = handleTranslation( aLine.Copy( nTransPos+2 ), bIsGlobalizedLine ); - // check for quoted value - if( aOption.Len() && - aUniKey.CompareToAscii( "JCL", 3 ) != COMPARE_EQUAL ) - eType = eInvocation; - else - eType = eQuoted; - } - // check for symbol value - else if( aLine.GetChar(0) == '^' ) - { - aLine.Erase( 0, 1 ); - aValue = String( aLine, RTL_TEXTENCODING_MS_1252 ); - eType = eSymbol; - } - else - { - // must be a string value then - // strictly this is false because string values - // can contain any whitespace which is reduced - // to one space by now - // who cares ... - nTransPos = aLine.Search( '/' ); - if( nTransPos == STRING_NOTFOUND ) - nTransPos = aLine.Len(); - aValue = String( aLine.Copy( 0, nTransPos ), RTL_TEXTENCODING_MS_1252 ); - aValueTranslation = handleTranslation( aLine.Copy( nTransPos+1 ), bIsGlobalizedLine ); - eType = eString; - } - } - - // handle globalized PPD entries - if( bIsGlobalizedLine ) - { - // handle main key translations of form: - // *ll_CC.Translation MainKeyword/translated text: "" - if( aUniKey.EqualsAscii( "Translation" ) ) - { - m_pTranslator->insertKey( aOption, aOptionTranslation, aTransLocale ); - } - // handle options translations of for: - // *ll_CC.MainKeyword OptionKeyword/translated text: "" - else - { - m_pTranslator->insertOption( aUniKey, aOption, aOptionTranslation, aTransLocale ); - } - continue; - } - - PPDKey* pKey = NULL; - keyit = m_aKeys.find( aUniKey ); - if( keyit == m_aKeys.end() ) - { - pKey = new PPDKey( aUniKey ); - insertKey( aUniKey, pKey ); - } - else - pKey = keyit->second; - - if( eType == eNo && bQuery ) - continue; - - PPDValue* pValue = pKey->insertValue( aOption ); - if( ! pValue ) - continue; - pValue->m_eType = eType; - pValue->m_aValue = aValue; - - if( aOptionTranslation.getLength() ) - m_pTranslator->insertOption( aUniKey, aOption, aOptionTranslation, aTransLocale ); - if( aValueTranslation.getLength() ) - m_pTranslator->insertValue( aUniKey, aOption, aValue, aValueTranslation, aTransLocale ); - - // eventually update query and remove from option list - if( bQuery && pKey->m_bQueryValue == FALSE ) - { - pKey->m_aQueryValue = *pValue; - pKey->m_bQueryValue = true; - pKey->eraseValue( pValue->m_aOption ); - } - } - - // second pass: fill in defaults - for( line = rLines.begin(); line != rLines.end(); ++line ) - { - ByteString aLine( *line ); - if( aLine.CompareTo( "*Default", 8 ) == COMPARE_EQUAL ) - { - String aKey( aLine.Copy( 8 ), RTL_TEXTENCODING_MS_1252 ); - USHORT nPos = aKey.Search( ':' ); - if( nPos != STRING_NOTFOUND ) - { - aKey.Erase( nPos ); - String aOption( WhitespaceToSpace( aLine.Copy( nPos+9 ) ), RTL_TEXTENCODING_MS_1252 ); - keyit = m_aKeys.find( aKey ); - if( keyit != m_aKeys.end() ) - { - PPDKey* pKey = keyit->second; - const PPDValue* pDefValue = pKey->getValue( aOption ); - if( pKey->m_pDefaultValue == NULL ) - pKey->m_pDefaultValue = pDefValue; - } - else - { - // some PPDs contain defaults for keys that - // do not exist otherwise - // (example: DefaultResolution) - // so invent that key here and have a default value - PPDKey* pKey = new PPDKey( aKey ); - PPDValue* pNewValue = pKey->insertValue( aOption ); - pNewValue->m_eType = eInvocation; // or what ? - insertKey( aKey, pKey ); - } - } - } - else if( aLine.CompareTo( "*UIConstraints", 14 ) == COMPARE_EQUAL || - aLine.CompareTo( "*NonUIConstraints", 17 ) == COMPARE_EQUAL ) - parseConstraint( aLine ); - - } -} - -void PPDParser::parseOpenUI( const ByteString& rLine ) -{ - String aTranslation; - ByteString aKey = rLine; - - int nPos = aKey.Search( ':' ); - if( nPos != STRING_NOTFOUND ) - aKey.Erase( nPos ); - nPos = aKey.Search( '/' ); - if( nPos != STRING_NOTFOUND ) - { - aTranslation = handleTranslation( aKey.Copy( nPos + 1 ), false ); - aKey.Erase( nPos ); - } - aKey = GetCommandLineToken( 1, aKey ); - aKey.Erase( 0, 1 ); - - String aUniKey( aKey, RTL_TEXTENCODING_MS_1252 ); - PPDParser::hash_type::const_iterator keyit = m_aKeys.find( aUniKey ); - PPDKey* pKey; - if( keyit == m_aKeys.end() ) - { - pKey = new PPDKey( aUniKey ); - insertKey( aUniKey, pKey ); - } - else - pKey = keyit->second; - - pKey->m_bUIOption = true; - m_pTranslator->insertKey( pKey->getKey(), aTranslation ); - - ByteString aValue = WhitespaceToSpace( rLine.GetToken( 1, ':' ) ); - if( aValue.CompareIgnoreCaseToAscii( "boolean" ) == COMPARE_EQUAL ) - pKey->m_eUIType = PPDKey::Boolean; - else if( aValue.CompareIgnoreCaseToAscii( "pickmany" ) == COMPARE_EQUAL ) - pKey->m_eUIType = PPDKey::PickMany; - else - pKey->m_eUIType = PPDKey::PickOne; -} - -void PPDParser::parseOrderDependency( const ByteString& rLine ) -{ - ByteString aLine( rLine ); - int nPos = aLine.Search( ':' ); - if( nPos != STRING_NOTFOUND ) - aLine.Erase( 0, nPos+1 ); - - int nOrder = GetCommandLineToken( 0, aLine ).ToInt32(); - ByteString aSetup = GetCommandLineToken( 1, aLine ); - String aKey( GetCommandLineToken( 2, aLine ), RTL_TEXTENCODING_MS_1252 ); - if( aKey.GetChar( 0 ) != '*' ) - return; // invalid order depency - aKey.Erase( 0, 1 ); - - PPDKey* pKey; - PPDParser::hash_type::const_iterator keyit = m_aKeys.find( aKey ); - if( keyit == m_aKeys.end() ) - { - pKey = new PPDKey( aKey ); - insertKey( aKey, pKey ); - } - else - pKey = keyit->second; - - pKey->m_nOrderDependency = nOrder; - if( aSetup.Equals( "ExitServer" ) ) - pKey->m_eSetupType = PPDKey::ExitServer; - else if( aSetup.Equals( "Prolog" ) ) - pKey->m_eSetupType = PPDKey::Prolog; - else if( aSetup.Equals( "DocumentSetup" ) ) - pKey->m_eSetupType = PPDKey::DocumentSetup; - else if( aSetup.Equals( "PageSetup" ) ) - pKey->m_eSetupType = PPDKey::PageSetup; - else if( aSetup.Equals( "JCLSetup" ) ) - pKey->m_eSetupType = PPDKey::JCLSetup; - else - pKey->m_eSetupType = PPDKey::AnySetup; -} - -void PPDParser::parseConstraint( const ByteString& rLine ) -{ - bool bFailed = false; - - String aLine( rLine, RTL_TEXTENCODING_MS_1252 ); - aLine.Erase( 0, rLine.Search( ':' )+1 ); - PPDConstraint aConstraint; - int nTokens = GetCommandLineTokenCount( aLine ); - for( int i = 0; i < nTokens; i++ ) - { - String aToken = GetCommandLineToken( i, aLine ); - if( aToken.GetChar( 0 ) == '*' ) - { - aToken.Erase( 0, 1 ); - if( aConstraint.m_pKey1 ) - aConstraint.m_pKey2 = getKey( aToken ); - else - aConstraint.m_pKey1 = getKey( aToken ); - } - else - { - if( aConstraint.m_pKey2 ) - { - if( ! ( aConstraint.m_pOption2 = aConstraint.m_pKey2->getValue( aToken ) ) ) - bFailed = true; - } - else if( aConstraint.m_pKey1 ) - { - if( ! ( aConstraint.m_pOption1 = aConstraint.m_pKey1->getValue( aToken ) ) ) - bFailed = true; - } - else - // constraint for nonexistent keys; this happens - // e.g. in HP4PLUS3 (#75636#) - bFailed = true; - } - } - // there must be two keywords - if( ! aConstraint.m_pKey1 || ! aConstraint.m_pKey2 || bFailed ) - { -#ifdef __DEBUG - fprintf( stderr, "Warning: constraint \"%s\" is invalid\n", rLine.GetStr() ); -#endif - } - else - m_aConstraints.push_back( aConstraint ); -} - -String PPDParser::getDefaultPaperDimension() const -{ - if( m_pDefaultPaperDimension ) - return m_pDefaultPaperDimension->m_aOption; - - return String(); -} - -bool PPDParser::getMargins( - const String& rPaperName, - int& rLeft, int& rRight, - int& rUpper, int& rLower ) const -{ - if( ! m_pImageableAreas || ! m_pPaperDimensions ) - return false; - - int nPDim=-1, nImArea=-1, i; - for( i = 0; i < m_pImageableAreas->countValues(); i++ ) - if( rPaperName == m_pImageableAreas->getValue( i )->m_aOption ) - nImArea = i; - for( i = 0; i < m_pPaperDimensions->countValues(); i++ ) - if( rPaperName == m_pPaperDimensions->getValue( i )->m_aOption ) - nPDim = i; - if( nPDim == -1 || nImArea == -1 ) - return false; - - double ImLLx, ImLLy, ImURx, ImURy; - double PDWidth, PDHeight; - String aArea = m_pImageableAreas->getValue( nImArea )->m_aValue; - ImLLx = StringToDouble( GetCommandLineToken( 0, aArea ) ); - ImLLy = StringToDouble( GetCommandLineToken( 1, aArea ) ); - ImURx = StringToDouble( GetCommandLineToken( 2, aArea ) ); - ImURy = StringToDouble( GetCommandLineToken( 3, aArea ) ); -// sscanf( m_pImageableAreas->getValue( nImArea )->m_aValue.GetStr(), -// "%lg%lg%lg%lg", &ImLLx, &ImLLy, &ImURx, &ImURy ); - aArea = m_pPaperDimensions->getValue( nPDim )->m_aValue; - PDWidth = StringToDouble( GetCommandLineToken( 0, aArea ) ); - PDHeight = StringToDouble( GetCommandLineToken( 1, aArea ) ); -// sscanf( m_pPaperDimensions->getValue( nPDim )->m_aValue.GetStr(), -// "%lg%lg", &PDWidth, &PDHeight ); - rLeft = (int)(ImLLx + 0.5); - rLower = (int)(ImLLy + 0.5); - rUpper = (int)(PDHeight - ImURy + 0.5); - rRight = (int)(PDWidth - ImURx + 0.5); - - return true; -} - -bool PPDParser::getPaperDimension( - const String& rPaperName, - int& rWidth, int& rHeight ) const -{ - if( ! m_pPaperDimensions ) - return false; - - int nPDim=-1; - for( int i = 0; i < m_pPaperDimensions->countValues(); i++ ) - if( rPaperName == m_pPaperDimensions->getValue( i )->m_aOption ) - nPDim = i; - if( nPDim == -1 ) - return false; - - double PDWidth, PDHeight; - String aArea = m_pPaperDimensions->getValue( nPDim )->m_aValue; - PDWidth = StringToDouble( GetCommandLineToken( 0, aArea ) ); - PDHeight = StringToDouble( GetCommandLineToken( 1, aArea ) ); - rHeight = (int)(PDHeight + 0.5); - rWidth = (int)(PDWidth + 0.5); - - return true; -} - -String PPDParser::matchPaper( int nWidth, int nHeight ) const -{ - if( ! m_pPaperDimensions ) - return String(); - - int nPDim = -1; - double PDWidth, PDHeight; - double fSort = 2e36, fNewSort; - - for( int i = 0; i < m_pPaperDimensions->countValues(); i++ ) - { - String aArea = m_pPaperDimensions->getValue( i )->m_aValue; - PDWidth = StringToDouble( GetCommandLineToken( 0, aArea ) ); - PDHeight = StringToDouble( GetCommandLineToken( 1, aArea ) ); - PDWidth /= (double)nWidth; - PDHeight /= (double)nHeight; - if( PDWidth >= 0.9 && PDWidth <= 1.1 && - PDHeight >= 0.9 && PDHeight <= 1.1 ) - { - fNewSort = - (1.0-PDWidth)*(1.0-PDWidth) + (1.0-PDHeight)*(1.0-PDHeight); - if( fNewSort == 0.0 ) // perfect match - return m_pPaperDimensions->getValue( i )->m_aOption; - - if( fNewSort < fSort ) - { - fSort = fNewSort; - nPDim = i; - } - } - } - - static bool bDontSwap = false; - if( nPDim == -1 && ! bDontSwap ) - { - // swap portrait/landscape and try again - bDontSwap = true; - String rRet = matchPaper( nHeight, nWidth ); - bDontSwap = false; - return rRet; - } - - return nPDim != -1 ? m_pPaperDimensions->getValue( nPDim )->m_aOption : String(); -} - -String PPDParser::getDefaultInputSlot() const -{ - if( m_pDefaultInputSlot ) - return m_pDefaultInputSlot->m_aValue; - return String(); -} - -String PPDParser::getSlot( int nSlot ) const -{ - if( ! m_pInputSlots ) - return String(); - - if( nSlot > 0 && nSlot < m_pInputSlots->countValues() ) - return m_pInputSlots->getValue( nSlot )->m_aOption; - else if( m_pInputSlots->countValues() > 0 ) - return m_pInputSlots->getValue( (ULONG)0 )->m_aOption; - - return String(); -} - -String PPDParser::getSlotCommand( int nSlot ) const -{ - if( ! m_pInputSlots ) - return String(); - - if( nSlot > 0 && nSlot < m_pInputSlots->countValues() ) - return m_pInputSlots->getValue( nSlot )->m_aValue; - else if( m_pInputSlots->countValues() > 0 ) - return m_pInputSlots->getValue( (ULONG)0 )->m_aValue; - - return String(); -} - -String PPDParser::getSlotCommand( const String& rSlot ) const -{ - if( ! m_pInputSlots ) - return String(); - - for( int i=0; i < m_pInputSlots->countValues(); i++ ) - { - const PPDValue* pValue = m_pInputSlots->getValue( i ); - if( pValue->m_aOption == rSlot ) - return pValue->m_aValue; - } - return String(); -} - -String PPDParser::getPaperDimension( int nPaperDimension ) const -{ - if( ! m_pPaperDimensions ) - return String(); - - if( nPaperDimension > 0 && nPaperDimension < m_pPaperDimensions->countValues() ) - return m_pPaperDimensions->getValue( nPaperDimension )->m_aOption; - else if( m_pPaperDimensions->countValues() > 0 ) - return m_pPaperDimensions->getValue( (ULONG)0 )->m_aOption; - - return String(); -} - -String PPDParser::getPaperDimensionCommand( int nPaperDimension ) const -{ - if( ! m_pPaperDimensions ) - return String(); - - if( nPaperDimension > 0 && nPaperDimension < m_pPaperDimensions->countValues() ) - return m_pPaperDimensions->getValue( nPaperDimension )->m_aValue; - else if( m_pPaperDimensions->countValues() > 0 ) - return m_pPaperDimensions->getValue( (ULONG)0 )->m_aValue; - - return String(); -} - -String PPDParser::getPaperDimensionCommand( const String& rPaperDimension ) const -{ - if( ! m_pPaperDimensions ) - return String(); - - for( int i=0; i < m_pPaperDimensions->countValues(); i++ ) - { - const PPDValue* pValue = m_pPaperDimensions->getValue( i ); - if( pValue->m_aOption == rPaperDimension ) - return pValue->m_aValue; - } - return String(); -} - -void PPDParser::getResolutionFromString( - const String& rString, - int& rXRes, int& rYRes ) const -{ - int nPos = 0, nDPIPos; - - rXRes = rYRes = 300; - - nDPIPos = rString.SearchAscii( "dpi" ); - if( nDPIPos != STRING_NOTFOUND ) - { - if( ( nPos = rString.Search( 'x' ) ) != STRING_NOTFOUND ) - { - rXRes = rString.Copy( 0, nPos ).ToInt32(); - rYRes = rString.GetToken( 1, 'x' ).Erase( nDPIPos - nPos - 1 ).ToInt32(); - } - else - rXRes = rYRes = rString.Copy( 0, nDPIPos ).ToInt32(); - } -} - -void PPDParser::getDefaultResolution( int& rXRes, int& rYRes ) const -{ - if( m_pDefaultResolution ) - { - getResolutionFromString( m_pDefaultResolution->m_aValue, rXRes, rYRes ); - return; - } - - rXRes = 300; - rYRes = 300; -} - -int PPDParser::getResolutions() const -{ - if( ( ! m_pResolutions || m_pResolutions->countValues() == 0 ) && - m_pDefaultResolution ) - return 1; - return m_pResolutions ? m_pResolutions->countValues() : 0; -} - -void PPDParser::getResolution( int nNr, int& rXRes, int& rYRes ) const -{ - if( ( ! m_pResolutions || m_pResolutions->countValues() == 0 ) && m_pDefaultResolution && nNr == 0 ) - { - getDefaultResolution( rXRes, rYRes ); - return; - } - if( ! m_pResolutions ) - return; - - getResolutionFromString( m_pResolutions->getValue( nNr )->m_aOption, - rXRes, rYRes ); -} - -String PPDParser::getResolutionCommand( int nXRes, int nYRes ) const -{ - if( ( ! m_pResolutions || m_pResolutions->countValues() == 0 ) && m_pDefaultResolution ) - return m_pDefaultResolution->m_aValue; - - if( ! m_pResolutions ) - return String(); - - int nX, nY; - for( int i = 0; i < m_pResolutions->countValues(); i++ ) - { - getResolutionFromString( m_pResolutions->getValue( i )->m_aOption, - nX, nY ); - if( nX == nXRes && nY == nYRes ) - return m_pResolutions->getValue( i )->m_aValue; - } - return String(); -} - -String PPDParser::getDefaultDuplexType() const -{ - if( m_pDefaultDuplexType ) - return m_pDefaultDuplexType->m_aValue; - return String(); -} - -String PPDParser::getDuplex( int nDuplex ) const -{ - if( ! m_pDuplexTypes ) - return String(); - - if( nDuplex > 0 && nDuplex < m_pDuplexTypes->countValues() ) - return m_pDuplexTypes->getValue( nDuplex )->m_aOption; - else if( m_pDuplexTypes->countValues() > 0 ) - return m_pDuplexTypes->getValue( (ULONG)0 )->m_aOption; - - return String(); -} - -String PPDParser::getDuplexCommand( int nDuplex ) const -{ - if( ! m_pDuplexTypes ) - return String(); - - if( nDuplex > 0 && nDuplex < m_pDuplexTypes->countValues() ) - return m_pDuplexTypes->getValue( nDuplex )->m_aValue; - else if( m_pDuplexTypes->countValues() > 0 ) - return m_pDuplexTypes->getValue( (ULONG)0 )->m_aValue; - - return String(); -} - -String PPDParser::getDuplexCommand( const String& rDuplex ) const -{ - if( ! m_pDuplexTypes ) - return String(); - - for( int i=0; i < m_pDuplexTypes->countValues(); i++ ) - { - const PPDValue* pValue = m_pDuplexTypes->getValue( i ); - if( pValue->m_aOption == rDuplex ) - return pValue->m_aValue; - } - return String(); -} - -void PPDParser::getFontAttributes( - int nFont, - String& rEncoding, - String& rCharset ) const -{ - if( m_pFontList && nFont >= 0 && nFont < m_pFontList->countValues() ) - { - String aAttribs = - WhitespaceToSpace( m_pFontList->getValue( nFont )->m_aValue ); - rEncoding = GetCommandLineToken( 0, aAttribs ); - rCharset = GetCommandLineToken( 2, aAttribs ); - } -} - -void PPDParser::getFontAttributes( - const String& rFont, - String& rEncoding, - String& rCharset ) const -{ - if( m_pFontList ) - { - for( int i = 0; i < m_pFontList->countValues(); i++ ) - if( m_pFontList->getValue( i )->m_aOption == rFont ) - getFontAttributes( i, rEncoding, rCharset ); - } -} - -String PPDParser::getFont( int nFont ) const -{ - if( ! m_pFontList ) - return String(); - - if( nFont >=0 && nFont < m_pFontList->countValues() ) - return m_pFontList->getValue( nFont )->m_aOption; - return String(); -} - -rtl::OUString PPDParser::translateKey( const rtl::OUString& i_rKey, - const com::sun::star::lang::Locale& i_rLocale ) const -{ - rtl::OUString aResult( m_pTranslator->translateKey( i_rKey, i_rLocale ) ); - if( aResult.getLength() == 0 ) - aResult = i_rKey; - return aResult; -} - -rtl::OUString PPDParser::translateOption( const rtl::OUString& i_rKey, - const rtl::OUString& i_rOption, - const com::sun::star::lang::Locale& i_rLocale ) const -{ - rtl::OUString aResult( m_pTranslator->translateOption( i_rKey, i_rOption, i_rLocale ) ); - if( aResult.getLength() == 0 ) - aResult = i_rOption; - return aResult; -} - -rtl::OUString PPDParser::translateValue( const rtl::OUString& i_rKey, - const rtl::OUString& i_rOption, - const rtl::OUString& i_rValue, - const com::sun::star::lang::Locale& i_rLocale ) const -{ - rtl::OUString aResult( m_pTranslator->translateValue( i_rKey, i_rOption, i_rValue, i_rLocale ) ); - if( aResult.getLength() == 0 ) - aResult = i_rValue; - return aResult; -} - -/* - * PPDKey - */ - -PPDKey::PPDKey( const String& rKey ) : - m_aKey( rKey ), - m_pDefaultValue( NULL ), - m_bQueryValue( false ), - m_bUIOption( false ), - m_eUIType( PickOne ), - m_nOrderDependency( 100 ), - m_eSetupType( AnySetup ) -{ -} - -// ------------------------------------------------------------------- - -PPDKey::~PPDKey() -{ -} - -// ------------------------------------------------------------------- - -const PPDValue* PPDKey::getValue( int n ) const -{ - return ((unsigned int)n < m_aOrderedValues.size() && n >= 0) ? m_aOrderedValues[n] : NULL; -} - -// ------------------------------------------------------------------- - -const PPDValue* PPDKey::getValue( const String& rOption ) const -{ - PPDKey::hash_type::const_iterator it = m_aValues.find( rOption ); - return it != m_aValues.end() ? &it->second : NULL; -} - -// ------------------------------------------------------------------- - -const PPDValue* PPDKey::getValueCaseInsensitive( const String& rOption ) const -{ - const PPDValue* pValue = getValue( rOption ); - if( ! pValue ) - { - for( size_t n = 0; n < m_aOrderedValues.size() && ! pValue; n++ ) - if( m_aOrderedValues[n]->m_aOption.EqualsIgnoreCaseAscii( rOption ) ) - pValue = m_aOrderedValues[n]; - } - - return pValue; -} - -// ------------------------------------------------------------------- - -void PPDKey::eraseValue( const String& rOption ) -{ - PPDKey::hash_type::iterator it = m_aValues.find( rOption ); - if( it == m_aValues.end() ) - return; - - for( PPDKey::value_type::iterator vit = m_aOrderedValues.begin(); vit != m_aOrderedValues.end(); ++vit ) - { - if( *vit == &(it->second ) ) - { - m_aOrderedValues.erase( vit ); - break; - } - } - m_aValues.erase( it ); -} - -// ------------------------------------------------------------------- - -PPDValue* PPDKey::insertValue( const String& rOption ) -{ - if( m_aValues.find( rOption ) != m_aValues.end() ) - return NULL; - - PPDValue aValue; - aValue.m_aOption = rOption; - m_aValues[ rOption ] = aValue; - PPDValue* pValue = &m_aValues[rOption]; - m_aOrderedValues.push_back( pValue ); - return pValue; -} - -// ------------------------------------------------------------------- - -/* - * PPDContext - */ - -PPDContext::PPDContext( const PPDParser* pParser ) : - m_pParser( pParser ) -{ -} - -// ------------------------------------------------------------------- - -PPDContext& PPDContext::operator=( const PPDContext& rCopy ) -{ - m_pParser = rCopy.m_pParser; - m_aCurrentValues = rCopy.m_aCurrentValues; - return *this; -} - -// ------------------------------------------------------------------- - -PPDContext::~PPDContext() -{ -} - -// ------------------------------------------------------------------- - -const PPDKey* PPDContext::getModifiedKey( int n ) const -{ - hash_type::const_iterator it; - for( it = m_aCurrentValues.begin(); it != m_aCurrentValues.end() && n--; ++it ) - ; - return it != m_aCurrentValues.end() ? it->first : NULL; -} - -// ------------------------------------------------------------------- - -void PPDContext::setParser( const PPDParser* pParser ) -{ - if( pParser != m_pParser ) - { - m_aCurrentValues.clear(); - m_pParser = pParser; - } -} - -// ------------------------------------------------------------------- - -const PPDValue* PPDContext::getValue( const PPDKey* pKey ) const -{ - if( ! m_pParser ) - return NULL; - - hash_type::const_iterator it; - it = m_aCurrentValues.find( pKey ); - if( it != m_aCurrentValues.end() ) - return it->second; - - if( ! m_pParser->hasKey( pKey ) ) - return NULL; - - const PPDValue* pValue = pKey->getDefaultValue(); - if( ! pValue ) - pValue = pKey->getValue( 0 ); - - return pValue; -} - -// ------------------------------------------------------------------- - -const PPDValue* PPDContext::setValue( const PPDKey* pKey, const PPDValue* pValue, bool bDontCareForConstraints ) -{ - if( ! m_pParser || ! pKey ) - return NULL; - - // pValue can be NULL - it means ignore this option - - if( ! m_pParser->hasKey( pKey ) ) - return NULL; - - // check constraints - if( pValue ) - { - if( bDontCareForConstraints ) - { - m_aCurrentValues[ pKey ] = pValue; - } - else if( checkConstraints( pKey, pValue, true ) ) - { - m_aCurrentValues[ pKey ] = pValue; - - // after setting this value, check all constraints ! - hash_type::iterator it = m_aCurrentValues.begin(); - while( it != m_aCurrentValues.end() ) - { - if( it->first != pKey && - ! checkConstraints( it->first, it->second, false ) ) - { -#ifdef __DEBUG - fprintf( stderr, "PPDContext::setValue: option %s (%s) is constrained after setting %s to %s\n", - it->first->getKey().GetStr(), - it->second->m_aOption.GetStr(), - pKey->getKey().GetStr(), - pValue->m_aOption.GetStr() ); -#endif - resetValue( it->first, true ); - it = m_aCurrentValues.begin(); - } - else - ++it; - } - } - } - else - m_aCurrentValues[ pKey ] = NULL; - - return pValue; -} - -// ------------------------------------------------------------------- - -bool PPDContext::checkConstraints( const PPDKey* pKey, const PPDValue* pValue ) -{ - if( ! m_pParser || ! pKey || ! pValue ) - return false; - - // ensure that this key is already in the list if it exists at all - if( m_aCurrentValues.find( pKey ) != m_aCurrentValues.end() ) - return checkConstraints( pKey, pValue, false ); - - // it is not in the list, insert it temporarily - bool bRet = false; - if( m_pParser->hasKey( pKey ) ) - { - const PPDValue* pDefValue = pKey->getDefaultValue(); - m_aCurrentValues[ pKey ] = pDefValue; - bRet = checkConstraints( pKey, pValue, false ); - m_aCurrentValues.erase( pKey ); - } - - return bRet; -} - -// ------------------------------------------------------------------- - -bool PPDContext::resetValue( const PPDKey* pKey, bool bDefaultable ) -{ - if( ! pKey || ! m_pParser || ! m_pParser->hasKey( pKey ) ) - return false; - - const PPDValue* pResetValue = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "None" ) ) ); - if( ! pResetValue ) - pResetValue = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "False" ) ) ); - if( ! pResetValue && bDefaultable ) - pResetValue = pKey->getDefaultValue(); - - bool bRet = pResetValue ? ( setValue( pKey, pResetValue ) == pResetValue ? true : false ) : false; - - return bRet; -} - -// ------------------------------------------------------------------- - -bool PPDContext::checkConstraints( const PPDKey* pKey, const PPDValue* pNewValue, bool bDoReset ) -{ - if( ! pNewValue ) - return true; - - // sanity checks - if( ! m_pParser ) - return false; - - if( pKey->getValue( pNewValue->m_aOption ) != pNewValue ) - return false; - - // None / False and the default can always be set, but be careful ! - // setting them might influence constrained values - if( pNewValue->m_aOption.EqualsAscii( "None" ) || pNewValue->m_aOption.EqualsAscii( "False" ) || - pNewValue == pKey->getDefaultValue() ) - return true; - - const ::std::list< PPDParser::PPDConstraint >& rConstraints( m_pParser->getConstraints() ); - for( ::std::list< PPDParser::PPDConstraint >::const_iterator it = rConstraints.begin(); it != rConstraints.end(); ++it ) - { - const PPDKey* pLeft = it->m_pKey1; - const PPDKey* pRight = it->m_pKey2; - if( ! pLeft || ! pRight || ( pKey != pLeft && pKey != pRight ) ) - continue; - - const PPDKey* pOtherKey = pKey == pLeft ? pRight : pLeft; - const PPDValue* pOtherKeyOption = pKey == pLeft ? it->m_pOption2 : it->m_pOption1; - const PPDValue* pKeyOption = pKey == pLeft ? it->m_pOption1 : it->m_pOption2; - - // syntax *Key1 option1 *Key2 option2 - if( pKeyOption && pOtherKeyOption ) - { - if( pNewValue != pKeyOption ) - continue; - if( pOtherKeyOption == getValue( pOtherKey ) ) - { - return false; - } - } - // syntax *Key1 option *Key2 or *Key1 *Key2 option - else if( pOtherKeyOption || pKeyOption ) - { - if( pKeyOption ) - { - if( ! ( pOtherKeyOption = getValue( pOtherKey ) ) ) - continue; // this should not happen, PPD broken - - if( pKeyOption == pNewValue && - ! pOtherKeyOption->m_aOption.EqualsAscii( "None" ) && - ! pOtherKeyOption->m_aOption.EqualsAscii( "False" ) ) - { - // check if the other value can be reset and - // do so if possible - if( bDoReset && resetValue( pOtherKey ) ) - continue; - - return false; - } - } - else if( pOtherKeyOption ) - { - if( getValue( pOtherKey ) == pOtherKeyOption && - ! pNewValue->m_aOption.EqualsAscii( "None" ) && - ! pNewValue->m_aOption.EqualsAscii( "False" ) ) - return false; - } - else - { - // this should not happen, PPD is broken - } - } - // syntax *Key1 *Key2 - else - { - const PPDValue* pOtherValue = getValue( pOtherKey ); - if( ! pOtherValue->m_aOption.EqualsAscii( "None" ) && - ! pOtherValue->m_aOption.EqualsAscii( "False" ) && - ! pNewValue->m_aOption.EqualsAscii( "None" ) && - ! pNewValue->m_aOption.EqualsAscii( "False" ) ) - return false; - } - } - return true; -} - -// ------------------------------------------------------------------- - -void PPDContext::getUnconstrainedValues( const PPDKey* pKey, ::std::list< const PPDValue* >& rValues ) -{ - rValues.clear(); - - if( ! m_pParser || ! pKey || ! m_pParser->hasKey( pKey ) ) - return; - - int nValues = pKey->countValues(); - for( int i = 0; i < nValues; i++ ) - { - const PPDValue* pValue = pKey->getValue( i ); - if( checkConstraints( pKey, pValue ) ) - rValues.push_back( pValue ); - } -} - - -// ------------------------------------------------------------------- - -void* PPDContext::getStreamableBuffer( ULONG& rBytes ) const -{ - rBytes = 0; - if( ! m_aCurrentValues.size() ) - return NULL; - hash_type::const_iterator it; - for( it = m_aCurrentValues.begin(); it != m_aCurrentValues.end(); ++it ) - { - ByteString aCopy( it->first->getKey(), RTL_TEXTENCODING_MS_1252 ); - rBytes += aCopy.Len(); - rBytes += 1; // for ':' - if( it->second ) - { - aCopy = ByteString( it->second->m_aOption, RTL_TEXTENCODING_MS_1252 ); - rBytes += aCopy.Len(); - } - else - rBytes += 4; - rBytes += 1; // for '\0' - } - rBytes += 1; - void* pBuffer = new char[ rBytes ]; - memset( pBuffer, 0, rBytes ); - char* pRun = (char*)pBuffer; - for( it = m_aCurrentValues.begin(); it != m_aCurrentValues.end(); ++it ) - { - ByteString aCopy( it->first->getKey(), RTL_TEXTENCODING_MS_1252 ); - int nBytes = aCopy.Len(); - memcpy( pRun, aCopy.GetBuffer(), nBytes ); - pRun += nBytes; - *pRun++ = ':'; - if( it->second ) - aCopy = ByteString( it->second->m_aOption, RTL_TEXTENCODING_MS_1252 ); - else - aCopy = "*nil"; - nBytes = aCopy.Len(); - memcpy( pRun, aCopy.GetBuffer(), nBytes ); - pRun += nBytes; - - *pRun++ = 0; - } - return pBuffer; -} - -// ------------------------------------------------------------------- - -void PPDContext::rebuildFromStreamBuffer( void* pBuffer, ULONG nBytes ) -{ - if( ! m_pParser ) - return; - - m_aCurrentValues.clear(); - - char* pRun = (char*)pBuffer; - while( nBytes && *pRun ) - { - ByteString aLine( pRun ); - int nPos = aLine.Search( ':' ); - if( nPos != STRING_NOTFOUND ) - { - const PPDKey* pKey = m_pParser->getKey( String( aLine.Copy( 0, nPos ), RTL_TEXTENCODING_MS_1252 ) ); - if( pKey ) - { - const PPDValue* pValue = NULL; - String aOption( aLine.Copy( nPos+1 ), RTL_TEXTENCODING_MS_1252 ); - if( ! aOption.EqualsAscii( "*nil" ) ) - pValue = pKey->getValue( aOption ); - m_aCurrentValues[ pKey ] = pValue; -#ifdef __DEBUG - fprintf( stderr, "PPDContext::rebuildFromStreamBuffer: read PPDKeyValue { %s, %s }\n", pKV->m_pKey->getKey().GetStr(), pKV->m_pCurrentValue ? pKV->m_pCurrentValue->m_aOption.GetStr() : "" ); -#endif - } - } - nBytes -= aLine.Len()+1; - pRun += aLine.Len()+1; - } -} - -// ------------------------------------------------------------------- - -int PPDContext::getRenderResolution() const -{ - // initialize to reasonable default, if parser is not set - int nDPI = 300; - if( m_pParser ) - { - int nDPIx = 300, nDPIy = 300; - const PPDKey* pKey = m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Resolution" ) ) ); - if( pKey ) - { - const PPDValue* pValue = getValue( pKey ); - if( pValue ) - m_pParser->getResolutionFromString( pValue->m_aOption, nDPIx, nDPIy ); - else - m_pParser->getDefaultResolution( nDPIx, nDPIy ); - } - else - m_pParser->getDefaultResolution( nDPIx, nDPIy ); - - nDPI = (nDPIx > nDPIy) ? nDPIx : nDPIy; - } - return nDPI; -} - -// ------------------------------------------------------------------- - -void PPDContext::getPageSize( String& rPaper, int& rWidth, int& rHeight ) const -{ - // initialize to reasonable default, if parser is not set - rPaper = String( RTL_CONSTASCII_USTRINGPARAM( "A4" ) ); - rWidth = 595; - rHeight = 842; - if( m_pParser ) - { - const PPDKey* pKey = m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) ); - if( pKey ) - { - const PPDValue* pValue = getValue( pKey ); - if( pValue ) - { - rPaper = pValue->m_aOption; - m_pParser->getPaperDimension( rPaper, rWidth, rHeight ); - } - else - { - rPaper = m_pParser->getDefaultPaperDimension(); - m_pParser->getDefaultPaperDimension( rWidth, rHeight ); - } - } - } -} diff --git a/vcl/unx/source/printer/printerinfomanager.cxx b/vcl/unx/source/printer/printerinfomanager.cxx deleted file mode 100644 index af189b1b01b5..000000000000 --- a/vcl/unx/source/printer/printerinfomanager.cxx +++ /dev/null @@ -1,1428 +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_vcl.hxx" - -#include -#include -#include - -#include "cupsmgr.hxx" -#include "vcl/fontmanager.hxx" -#include "vcl/strhelper.hxx" -#include "saldata.hxx" - -#include "tools/urlobj.hxx" -#include "tools/stream.hxx" -#include "tools/debug.hxx" -#include "tools/config.hxx" - -#include "i18npool/paper.hxx" - -#include "rtl/strbuf.hxx" - -#include "osl/thread.hxx" -#include "osl/mutex.hxx" -#include "osl/process.h" - -// filename of configuration files -#define PRINT_FILENAME "psprint.conf" -// the group of the global defaults -#define GLOBAL_DEFAULTS_GROUP "__Global_Printer_Defaults__" - -#include - -using namespace psp; -using namespace rtl; -using namespace osl; - -namespace psp -{ - class SystemQueueInfo : public Thread - { - mutable Mutex m_aMutex; - bool m_bChanged; - std::list< PrinterInfoManager::SystemPrintQueue > - m_aQueues; - OUString m_aCommand; - - virtual void run(); - - public: - SystemQueueInfo(); - ~SystemQueueInfo(); - - bool hasChanged() const; - OUString getCommand() const; - - // sets changed status to false; therefore not const - void getSystemQueues( std::list< PrinterInfoManager::SystemPrintQueue >& rQueues ); - }; -} // namespace - -/* -* class PrinterInfoManager -*/ - -// ----------------------------------------------------------------- - -PrinterInfoManager& PrinterInfoManager::get() -{ - SalData* pSalData = GetSalData(); - - if( ! pSalData->m_pPIManager ) - { - pSalData->m_pPIManager = CUPSManager::tryLoadCUPS(); - if( ! pSalData->m_pPIManager ) - pSalData->m_pPIManager = new PrinterInfoManager(); - - pSalData->m_pPIManager->initialize(); - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "PrinterInfoManager::get create Manager of type %d\n", pSalData->m_pPIManager->getType() ); - #endif - } - - return *pSalData->m_pPIManager; -} - -void PrinterInfoManager::release() -{ - SalData* pSalData = GetSalData(); - delete pSalData->m_pPIManager; - pSalData->m_pPIManager = NULL; -} - -// ----------------------------------------------------------------- - -PrinterInfoManager::PrinterInfoManager( Type eType ) : - m_pQueueInfo( NULL ), - m_eType( eType ), - m_bUseIncludeFeature( false ), - m_bUseJobPatch( true ), - m_aSystemDefaultPaper( RTL_CONSTASCII_USTRINGPARAM( "A4" ) ), - m_bDisableCUPS( false ) -{ - if( eType == Default ) - m_pQueueInfo = new SystemQueueInfo(); - initSystemDefaultPaper(); -} - -// ----------------------------------------------------------------- - -PrinterInfoManager::~PrinterInfoManager() -{ - delete m_pQueueInfo; - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "PrinterInfoManager: destroyed Manager of type %d\n", getType() ); - #endif -} - -// ----------------------------------------------------------------- - -bool PrinterInfoManager::isCUPSDisabled() const -{ - return m_bDisableCUPS; -} - -// ----------------------------------------------------------------- - -void PrinterInfoManager::setCUPSDisabled( bool bDisable ) -{ - m_bDisableCUPS = bDisable; - writePrinterConfig(); - // actually we know the printers changed - // however this triggers reinitialization the right way - checkPrintersChanged( true ); -} - -// ----------------------------------------------------------------- - -void PrinterInfoManager::initSystemDefaultPaper() -{ - m_aSystemDefaultPaper = rtl::OStringToOUString( - PaperInfo::toPSName(PaperInfo::getSystemDefaultPaper().getPaper()), - RTL_TEXTENCODING_UTF8); -} - -// ----------------------------------------------------------------- - -bool PrinterInfoManager::checkPrintersChanged( bool bWait ) -{ - // check if files were created, deleted or modified since initialize() - ::std::list< WatchFile >::const_iterator it; - bool bChanged = false; - for( it = m_aWatchFiles.begin(); it != m_aWatchFiles.end() && ! bChanged; ++it ) - { - DirectoryItem aItem; - if( DirectoryItem::get( it->m_aFilePath, aItem ) ) - { - if( it->m_aModified.Seconds != 0 ) - bChanged = true; // file probably has vanished - } - else - { - FileStatus aStatus( FileStatusMask_ModifyTime ); - if( aItem.getFileStatus( aStatus ) ) - bChanged = true; // unlikely but not impossible - else - { - TimeValue aModified = aStatus.getModifyTime(); - if( aModified.Seconds != it->m_aModified.Seconds ) - bChanged = true; - } - } - } - - if( bWait && m_pQueueInfo ) - { - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "syncing printer discovery thread\n" ); - #endif - m_pQueueInfo->join(); - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "done: syncing printer discovery thread\n" ); - #endif - } - - if( ! bChanged && m_pQueueInfo ) - bChanged = m_pQueueInfo->hasChanged(); - if( bChanged ) - { - initialize(); - } - - return bChanged; -} - -// ----------------------------------------------------------------- - -void PrinterInfoManager::initialize() -{ - m_bUseIncludeFeature = false; - rtl_TextEncoding aEncoding = gsl_getSystemTextEncoding(); - m_aPrinters.clear(); - m_aWatchFiles.clear(); - OUString aDefaultPrinter; - - // first initialize the global defaults - // have to iterate over all possible files - // there should be only one global setup section in all - // available config files - m_aGlobalDefaults = PrinterInfo(); - - // need a parser for the PPDContext. generic printer should do. - m_aGlobalDefaults.m_pParser = PPDParser::getParser( String( RTL_CONSTASCII_USTRINGPARAM( "SGENPRT" ) ) ); - m_aGlobalDefaults.m_aContext.setParser( m_aGlobalDefaults.m_pParser ); - m_aGlobalDefaults.m_bPerformFontSubstitution = true; - m_bDisableCUPS = false; - - if( ! m_aGlobalDefaults.m_pParser ) - { - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "Error: no default PPD file SGENPRT available, shutting down psprint...\n" ); - #endif - return; - } - - std::list< OUString > aDirList; - psp::getPrinterPathList( aDirList, NULL ); - std::list< OUString >::const_iterator print_dir_it; - for( print_dir_it = aDirList.begin(); print_dir_it != aDirList.end(); ++print_dir_it ) - { - INetURLObject aFile( *print_dir_it, INET_PROT_FILE, INetURLObject::ENCODE_ALL ); - aFile.Append( String( RTL_CONSTASCII_USTRINGPARAM( PRINT_FILENAME ) ) ); - Config aConfig( aFile.PathToFileName() ); - if( aConfig.HasGroup( GLOBAL_DEFAULTS_GROUP ) ) - { - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "found global defaults in %s\n", OUStringToOString( aFile.PathToFileName(), RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); - #endif - aConfig.SetGroup( GLOBAL_DEFAULTS_GROUP ); - - ByteString aValue( aConfig.ReadKey( "Copies" ) ); - if( aValue.Len() ) - m_aGlobalDefaults.m_nCopies = aValue.ToInt32(); - - aValue = aConfig.ReadKey( "Orientation" ); - if( aValue.Len() ) - m_aGlobalDefaults.m_eOrientation = aValue.EqualsIgnoreCaseAscii( "Landscape" ) ? orientation::Landscape : orientation::Portrait; - - aValue = aConfig.ReadKey( "MarginAdjust" ); - if( aValue.Len() ) - { - m_aGlobalDefaults.m_nLeftMarginAdjust = aValue.GetToken( 0, ',' ).ToInt32(); - m_aGlobalDefaults.m_nRightMarginAdjust = aValue.GetToken( 1, ',' ).ToInt32(); - m_aGlobalDefaults.m_nTopMarginAdjust = aValue.GetToken( 2, ',' ).ToInt32(); - m_aGlobalDefaults.m_nBottomMarginAdjust = aValue.GetToken( 3, ',' ).ToInt32(); - } - - aValue = aConfig.ReadKey( "ColorDepth", "24" ); - if( aValue.Len() ) - m_aGlobalDefaults.m_nColorDepth = aValue.ToInt32(); - - aValue = aConfig.ReadKey( "ColorDevice" ); - if( aValue.Len() ) - m_aGlobalDefaults.m_nColorDevice = aValue.ToInt32(); - - aValue = aConfig.ReadKey( "PSLevel" ); - if( aValue.Len() ) - m_aGlobalDefaults.m_nPSLevel = aValue.ToInt32(); - - aValue = aConfig.ReadKey( "PDFDevice" ); - if( aValue.Len() ) - m_aGlobalDefaults.m_nPDFDevice = aValue.ToInt32(); - - aValue = aConfig.ReadKey( "PerformFontSubstitution" ); - if( aValue.Len() ) - { - if( ! aValue.Equals( "0" ) && ! aValue.EqualsIgnoreCaseAscii( "false" ) ) - m_aGlobalDefaults.m_bPerformFontSubstitution = true; - else - m_aGlobalDefaults.m_bPerformFontSubstitution = false; - } - - aValue = aConfig.ReadKey( "DisableCUPS" ); - if( aValue.Len() ) - { - if( aValue.Equals( "1" ) || aValue.EqualsIgnoreCaseAscii( "true" ) ) - m_bDisableCUPS = true; - else - m_bDisableCUPS = false; - } - - // get the PPDContext of global JobData - for( int nKey = 0; nKey < aConfig.GetKeyCount(); nKey++ ) - { - ByteString aKey( aConfig.GetKeyName( nKey ) ); - if( aKey.CompareTo( "PPD_", 4 ) == COMPARE_EQUAL ) - { - aValue = aConfig.ReadKey( aKey ); - const PPDKey* pKey = m_aGlobalDefaults.m_pParser->getKey( String( aKey.Copy( 4 ), RTL_TEXTENCODING_ISO_8859_1 ) ); - if( pKey ) - { - m_aGlobalDefaults.m_aContext. - setValue( pKey, - aValue.Equals( "*nil" ) ? NULL : pKey->getValue( String( aValue, RTL_TEXTENCODING_ISO_8859_1 ) ), - TRUE ); - } - } - else if( aKey.Len() > 10 && aKey.CompareTo("SubstFont_", 10 ) == COMPARE_EQUAL ) - { - aValue = aConfig.ReadKey( aKey ); - m_aGlobalDefaults.m_aFontSubstitutes[ OStringToOUString( aKey.Copy( 10 ), RTL_TEXTENCODING_ISO_8859_1 ) ] = OStringToOUString( aValue, RTL_TEXTENCODING_ISO_8859_1 ); - } - } - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "global settings: fontsubst = %s, %d substitutes\n", m_aGlobalDefaults.m_bPerformFontSubstitution ? "true" : "false", (int)m_aGlobalDefaults.m_aFontSubstitutes.size() ); - #endif - } - } - setDefaultPaper( m_aGlobalDefaults.m_aContext ); - fillFontSubstitutions( m_aGlobalDefaults ); - - // now collect all available printers - for( print_dir_it = aDirList.begin(); print_dir_it != aDirList.end(); ++print_dir_it ) - { - INetURLObject aDir( *print_dir_it, INET_PROT_FILE, INetURLObject::ENCODE_ALL ); - INetURLObject aFile( aDir ); - aFile.Append( String( RTL_CONSTASCII_USTRINGPARAM( PRINT_FILENAME ) ) ); - - // check directory validity - OUString aUniPath; - FileBase::getFileURLFromSystemPath( aDir.PathToFileName(), aUniPath ); - Directory aDirectory( aUniPath ); - if( aDirectory.open() ) - continue; - aDirectory.close(); - - - FileBase::getFileURLFromSystemPath( aFile.PathToFileName(), aUniPath ); - FileStatus aStatus( FileStatusMask_ModifyTime ); - DirectoryItem aItem; - - // setup WatchFile list - WatchFile aWatchFile; - aWatchFile.m_aFilePath = aUniPath; - if( ! DirectoryItem::get( aUniPath, aItem ) && - ! aItem.getFileStatus( aStatus ) ) - { - aWatchFile.m_aModified = aStatus.getModifyTime(); - } - else - { - aWatchFile.m_aModified.Seconds = 0; - aWatchFile.m_aModified.Nanosec = 0; - } - m_aWatchFiles.push_back( aWatchFile ); - - Config aConfig( aFile.PathToFileName() ); - for( int nGroup = 0; nGroup < aConfig.GetGroupCount(); nGroup++ ) - { - aConfig.SetGroup( aConfig.GetGroupName( nGroup ) ); - ByteString aValue = aConfig.ReadKey( "Printer" ); - if( aValue.Len() ) - { - OUString aPrinterName; - - int nNamePos = aValue.Search( '/' ); - // check for valid value of "Printer" - if( nNamePos == STRING_NOTFOUND ) - continue; - - Printer aPrinter; - // initialize to global defaults - aPrinter.m_aInfo = m_aGlobalDefaults; - // global settings do not default the printer substitution - // list ! the substitution list in there is only used for - // newly created printers - aPrinter.m_aInfo.m_aFontSubstitutes.clear(); - aPrinter.m_aInfo.m_aFontSubstitutions.clear(); - - aPrinterName = String( aValue.Copy( nNamePos+1 ), RTL_TEXTENCODING_UTF8 ); - aPrinter.m_aInfo.m_aPrinterName = aPrinterName; - aPrinter.m_aInfo.m_aDriverName = String( aValue.Copy( 0, nNamePos ), RTL_TEXTENCODING_UTF8 ); - - // set parser, merge settings - // don't do this for CUPS printers as this is done - // by the CUPS system itself - if( aPrinter.m_aInfo.m_aDriverName.compareToAscii( "CUPS:", 5 ) != 0 ) - { - aPrinter.m_aInfo.m_pParser = PPDParser::getParser( aPrinter.m_aInfo.m_aDriverName ); - aPrinter.m_aInfo.m_aContext.setParser( aPrinter.m_aInfo.m_pParser ); - // note: setParser also purges the context - - // ignore this printer if its driver is not found - if( ! aPrinter.m_aInfo.m_pParser ) - continue; - - // merge the ppd context keys if the printer has the same keys and values - // this is a bit tricky, since it involves mixing two PPDs - // without constraints which might end up badly - // this feature should be use with caution - // it is mainly to select default paper sizes for new printers - for( int nPPDValueModified = 0; nPPDValueModified < m_aGlobalDefaults.m_aContext.countValuesModified(); nPPDValueModified++ ) - { - const PPDKey* pDefKey = m_aGlobalDefaults.m_aContext.getModifiedKey( nPPDValueModified ); - const PPDValue* pDefValue = m_aGlobalDefaults.m_aContext.getValue( pDefKey ); - const PPDKey* pPrinterKey = pDefKey ? aPrinter.m_aInfo.m_pParser->getKey( pDefKey->getKey() ) : NULL; - if( pDefKey && pPrinterKey ) - // at least the options exist in both PPDs - { - if( pDefValue ) - { - const PPDValue* pPrinterValue = pPrinterKey->getValue( pDefValue->m_aOption ); - if( pPrinterValue ) - // the printer has a corresponding option for the key - aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, pPrinterValue ); - } - else - aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, NULL ); - } - } - - aValue = aConfig.ReadKey( "Command" ); - // no printer without a command - if( ! aValue.Len() ) - { - /* TODO: - * porters: please append your platform to the Solaris - * case if your platform has SystemV printing per default. - */ - #if defined SOLARIS - aValue = "lp"; - #else - aValue = "lpr"; - #endif - } - aPrinter.m_aInfo.m_aCommand = String( aValue, RTL_TEXTENCODING_UTF8 ); - } - - aValue = aConfig.ReadKey( "QuickCommand" ); - aPrinter.m_aInfo.m_aQuickCommand = String( aValue, RTL_TEXTENCODING_UTF8 ); - - aValue = aConfig.ReadKey( "Features" ); - aPrinter.m_aInfo.m_aFeatures = String( aValue, RTL_TEXTENCODING_UTF8 ); - - // override the settings in m_aGlobalDefaults if keys exist - aValue = aConfig.ReadKey( "DefaultPrinter" ); - if( ! aValue.Equals( "0" ) && ! aValue.EqualsIgnoreCaseAscii( "false" ) ) - aDefaultPrinter = aPrinterName; - - aValue = aConfig.ReadKey( "Location" ); - aPrinter.m_aInfo.m_aLocation = String( aValue, RTL_TEXTENCODING_UTF8 ); - - aValue = aConfig.ReadKey( "Comment" ); - aPrinter.m_aInfo.m_aComment = String( aValue, RTL_TEXTENCODING_UTF8 ); - - aValue = aConfig.ReadKey( "Copies" ); - if( aValue.Len() ) - aPrinter.m_aInfo.m_nCopies = aValue.ToInt32(); - - aValue = aConfig.ReadKey( "Orientation" ); - if( aValue.Len() ) - aPrinter.m_aInfo.m_eOrientation = aValue.EqualsIgnoreCaseAscii( "Landscape" ) ? orientation::Landscape : orientation::Portrait; - - aValue = aConfig.ReadKey( "MarginAdjust" ); - if( aValue.Len() ) - { - aPrinter.m_aInfo.m_nLeftMarginAdjust = aValue.GetToken( 0, ',' ).ToInt32(); - aPrinter.m_aInfo.m_nRightMarginAdjust = aValue.GetToken( 1, ',' ).ToInt32(); - aPrinter.m_aInfo.m_nTopMarginAdjust = aValue.GetToken( 2, ',' ).ToInt32(); - aPrinter.m_aInfo.m_nBottomMarginAdjust = aValue.GetToken( 3, ',' ).ToInt32(); - } - - aValue = aConfig.ReadKey( "ColorDepth" ); - if( aValue.Len() ) - aPrinter.m_aInfo.m_nColorDepth = aValue.ToInt32(); - - aValue = aConfig.ReadKey( "ColorDevice" ); - if( aValue.Len() ) - aPrinter.m_aInfo.m_nColorDevice = aValue.ToInt32(); - - aValue = aConfig.ReadKey( "PSLevel" ); - if( aValue.Len() ) - aPrinter.m_aInfo.m_nPSLevel = aValue.ToInt32(); - - aValue = aConfig.ReadKey( "PDFDevice" ); - if( aValue.Len() ) - aPrinter.m_aInfo.m_nPDFDevice = aValue.ToInt32(); - - aValue = aConfig.ReadKey( "PerformFontSubstitution" ); - if( ! aValue.Equals( "0" ) && ! aValue.EqualsIgnoreCaseAscii( "false" ) ) - aPrinter.m_aInfo.m_bPerformFontSubstitution = true; - else - aPrinter.m_aInfo.m_bPerformFontSubstitution = false; - - // now iterate over all keys to extract multi key information: - // 1. PPDContext information - // 2. Font substitution table - for( int nKey = 0; nKey < aConfig.GetKeyCount(); nKey++ ) - { - ByteString aKey( aConfig.GetKeyName( nKey ) ); - if( aKey.CompareTo( "PPD_", 4 ) == COMPARE_EQUAL && aPrinter.m_aInfo.m_pParser ) - { - aValue = aConfig.ReadKey( aKey ); - const PPDKey* pKey = aPrinter.m_aInfo.m_pParser->getKey( String( aKey.Copy( 4 ), RTL_TEXTENCODING_ISO_8859_1 ) ); - if( pKey ) - { - aPrinter.m_aInfo.m_aContext. - setValue( pKey, - aValue.Equals( "*nil" ) ? NULL : pKey->getValue( String( aValue, RTL_TEXTENCODING_ISO_8859_1 ) ), - TRUE ); - } - } - else if( aKey.Len() > 10 && aKey.CompareTo("SubstFont_", 10 ) == COMPARE_EQUAL ) - { - aValue = aConfig.ReadKey( aKey ); - aPrinter.m_aInfo.m_aFontSubstitutes[ OStringToOUString( aKey.Copy( 10 ), RTL_TEXTENCODING_ISO_8859_1 ) ] = OStringToOUString( aValue, RTL_TEXTENCODING_ISO_8859_1 ); - } - } - - setDefaultPaper( aPrinter.m_aInfo.m_aContext ); - fillFontSubstitutions( aPrinter.m_aInfo ); - - // finally insert printer - FileBase::getFileURLFromSystemPath( aFile.PathToFileName(), aPrinter.m_aFile ); - aPrinter.m_bModified = false; - aPrinter.m_aGroup = aConfig.GetGroupName( nGroup ); - std::hash_map< OUString, Printer, OUStringHash >::const_iterator find_it = - m_aPrinters.find( aPrinterName ); - if( find_it != m_aPrinters.end() ) - { - aPrinter.m_aAlternateFiles = find_it->second.m_aAlternateFiles; - aPrinter.m_aAlternateFiles.push_front( find_it->second.m_aFile ); - } - m_aPrinters[ aPrinterName ] = aPrinter; - } - } - } - - // set default printer - if( m_aPrinters.size() ) - { - if( m_aPrinters.find( aDefaultPrinter ) == m_aPrinters.end() ) - aDefaultPrinter = m_aPrinters.begin()->first; - } - else - aDefaultPrinter = OUString(); - m_aDefaultPrinter = aDefaultPrinter; - - if( m_eType != Default ) - return; - - // add a default printer for every available print queue - // merge paper and font substitution from default printer, - // all else from global defaults - PrinterInfo aMergeInfo( m_aGlobalDefaults ); - aMergeInfo.m_aDriverName = String( RTL_CONSTASCII_USTRINGPARAM( "SGENPRT" ) ); - aMergeInfo.m_aFeatures = String( RTL_CONSTASCII_USTRINGPARAM( "autoqueue" ) ); - - if( m_aDefaultPrinter.getLength() ) - { - PrinterInfo aDefaultInfo( getPrinterInfo( m_aDefaultPrinter ) ); - aMergeInfo.m_bPerformFontSubstitution = aDefaultInfo.m_bPerformFontSubstitution; - fillFontSubstitutions( aMergeInfo ); - - const PPDKey* pDefKey = aDefaultInfo.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) ); - const PPDKey* pMergeKey = aMergeInfo.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) ); - const PPDValue* pDefValue = aDefaultInfo.m_aContext.getValue( pDefKey ); - const PPDValue* pMergeValue = pMergeKey ? pMergeKey->getValue( pDefValue->m_aOption ) : NULL; - if( pMergeKey && pMergeValue ) - aMergeInfo.m_aContext.setValue( pMergeKey, pMergeValue ); - } - - getSystemPrintQueues(); - for( ::std::list< SystemPrintQueue >::iterator it = m_aSystemPrintQueues.begin(); it != m_aSystemPrintQueues.end(); ++it ) - { - String aPrinterName( RTL_CONSTASCII_USTRINGPARAM( "<" ) ); - aPrinterName += String( it->m_aQueue ); - aPrinterName.Append( '>' ); - - if( m_aPrinters.find( aPrinterName ) != m_aPrinters.end() ) - // probably user made this one permanent in padmin - continue; - - String aCmd( m_aSystemPrintCommand ); - aCmd.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "(PRINTER)" ) ), it->m_aQueue ); - - Printer aPrinter; - - // initialize to merged defaults - aPrinter.m_aInfo = aMergeInfo; - aPrinter.m_aInfo.m_aPrinterName = aPrinterName; - aPrinter.m_aInfo.m_aCommand = aCmd; - aPrinter.m_aInfo.m_aComment = it->m_aComment; - aPrinter.m_aInfo.m_aLocation = it->m_aLocation; - aPrinter.m_bModified = false; - aPrinter.m_aGroup = ByteString( aPrinterName, aEncoding ); //provide group name in case user makes this one permanent in padmin - - m_aPrinters[ aPrinterName ] = aPrinter; - } -} - -// ----------------------------------------------------------------- - -void PrinterInfoManager::listPrinters( ::std::list< OUString >& rList ) const -{ - ::std::hash_map< OUString, Printer, OUStringHash >::const_iterator it; - rList.clear(); - for( it = m_aPrinters.begin(); it != m_aPrinters.end(); ++it ) - rList.push_back( it->first ); -} - -// ----------------------------------------------------------------- - -const PrinterInfo& PrinterInfoManager::getPrinterInfo( const OUString& rPrinter ) const -{ - static PrinterInfo aEmptyInfo; - ::std::hash_map< OUString, Printer, OUStringHash >::const_iterator it = m_aPrinters.find( rPrinter ); - - DBG_ASSERT( it != m_aPrinters.end(), "Do not ask for info about nonexistent printers" ); - - return it != m_aPrinters.end() ? it->second.m_aInfo : aEmptyInfo; -} - -// ----------------------------------------------------------------- - -void PrinterInfoManager::changePrinterInfo( const OUString& rPrinter, const PrinterInfo& rNewInfo ) -{ - ::std::hash_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.find( rPrinter ); - - DBG_ASSERT( it != m_aPrinters.end(), "Do not change nonexistant printers" ); - - if( it != m_aPrinters.end() ) - { - it->second.m_aInfo = rNewInfo; - // recalculate font substitutions - fillFontSubstitutions( it->second.m_aInfo ); - it->second.m_bModified = true; - writePrinterConfig(); - } -} - -// ----------------------------------------------------------------- - -// need to check writeability / creatability of config files -static bool checkWriteability( const OUString& rUniPath ) -{ - bool bRet = false; - OUString aSysPath; - FileBase::getSystemPathFromFileURL( rUniPath, aSysPath ); - SvFileStream aStream( aSysPath, STREAM_READ | STREAM_WRITE ); - if( aStream.IsOpen() && aStream.IsWritable() ) - bRet = true; - return bRet; -} - -bool PrinterInfoManager::writePrinterConfig() -{ - // find at least one writeable config - ::std::hash_map< OUString, Config*, OUStringHash > files; - ::std::hash_map< OUString, int, OUStringHash > rofiles; - ::std::hash_map< OUString, Config*, OUStringHash >::iterator file_it; - - for( ::std::list< WatchFile >::const_iterator wit = m_aWatchFiles.begin(); wit != m_aWatchFiles.end(); ++wit ) - { - if( checkWriteability( wit->m_aFilePath ) ) - { - files[ wit->m_aFilePath ] = new Config( wit->m_aFilePath ); - break; - } - } - - if( files.empty() ) - return false; - - Config* pGlobal = files.begin()->second; - pGlobal->SetGroup( GLOBAL_DEFAULTS_GROUP ); - pGlobal->WriteKey( "DisableCUPS", m_bDisableCUPS ? "true" : "false" ); - - ::std::hash_map< OUString, Printer, OUStringHash >::iterator it; - for( it = m_aPrinters.begin(); it != m_aPrinters.end(); ++it ) - { - if( ! it->second.m_bModified ) - // printer was not changed, do nothing - continue; - - // don't save autoqueue printers - sal_Int32 nIndex = 0; - bool bAutoQueue = false; - while( nIndex != -1 && ! bAutoQueue ) - { - OUString aToken( it->second.m_aInfo.m_aFeatures.getToken( 0, ',', nIndex ) ); - if( aToken.getLength() && aToken.compareToAscii( "autoqueue" ) == 0 ) - bAutoQueue = true; - } - if( bAutoQueue ) - continue; - - if( it->second.m_aFile.getLength() ) - { - // check if file is writable - if( files.find( it->second.m_aFile ) == files.end() ) - { - bool bInsertToNewFile = false; - // maybe it is simply not inserted yet - if( rofiles.find( it->second.m_aFile ) == rofiles.end() ) - { - if( checkWriteability( it->second.m_aFile ) ) - files[ it->second.m_aFile ] = new Config( it->second.m_aFile ); - else - bInsertToNewFile = true; - } - else - bInsertToNewFile = true; - // original file is read only, insert printer in a new writeable file - if( bInsertToNewFile ) - { - rofiles[ it->second.m_aFile ] = 1; - // update alternate file list - // the remove operation ensures uniqueness of each alternate - it->second.m_aAlternateFiles.remove( it->second.m_aFile ); - it->second.m_aAlternateFiles.remove( files.begin()->first ); - it->second.m_aAlternateFiles.push_front( it->second.m_aFile ); - // update file - it->second.m_aFile = files.begin()->first; - } - } - } - else // a new printer, write it to the first file available - it->second.m_aFile = files.begin()->first; - - if( ! it->second.m_aGroup.getLength() ) // probably a new printer - it->second.m_aGroup = OString( it->first.getStr(), it->first.getLength(), RTL_TEXTENCODING_UTF8 ); - - if( files.find( it->second.m_aFile ) != files.end() ) - { - Config* pConfig = files[ it->second.m_aFile ]; - pConfig->DeleteGroup( it->second.m_aGroup ); // else some old keys may remain - pConfig->SetGroup( it->second.m_aGroup ); - - ByteString aValue( String( it->second.m_aInfo.m_aDriverName ), RTL_TEXTENCODING_UTF8 ); - aValue += '/'; - aValue += ByteString( String( it->first ), RTL_TEXTENCODING_UTF8 ); - pConfig->WriteKey( "Printer", aValue ); - pConfig->WriteKey( "DefaultPrinter", it->first == m_aDefaultPrinter ? "1" : "0" ); - pConfig->WriteKey( "Location", ByteString( String( it->second.m_aInfo.m_aLocation ), RTL_TEXTENCODING_UTF8 ) ); - pConfig->WriteKey( "Comment", ByteString( String( it->second.m_aInfo.m_aComment ), RTL_TEXTENCODING_UTF8 ) ); - pConfig->WriteKey( "Command", ByteString( String( it->second.m_aInfo.m_aCommand ), RTL_TEXTENCODING_UTF8 ) ); - pConfig->WriteKey( "QuickCommand", ByteString( String( it->second.m_aInfo.m_aQuickCommand ), RTL_TEXTENCODING_UTF8 ) ); - pConfig->WriteKey( "Features", ByteString( String( it->second.m_aInfo.m_aFeatures ), RTL_TEXTENCODING_UTF8 ) ); - pConfig->WriteKey( "Copies", ByteString::CreateFromInt32( it->second.m_aInfo.m_nCopies ) ); - pConfig->WriteKey( "Orientation", it->second.m_aInfo.m_eOrientation == orientation::Landscape ? "Landscape" : "Portrait" ); - pConfig->WriteKey( "PSLevel", ByteString::CreateFromInt32( it->second.m_aInfo.m_nPSLevel ) ); - pConfig->WriteKey( "PDFDevice", ByteString::CreateFromInt32( it->second.m_aInfo.m_nPDFDevice ) ); - pConfig->WriteKey( "ColorDevice", ByteString::CreateFromInt32( it->second.m_aInfo.m_nColorDevice ) ); - pConfig->WriteKey( "ColorDepth", ByteString::CreateFromInt32( it->second.m_aInfo.m_nColorDepth ) ); - aValue = ByteString::CreateFromInt32( it->second.m_aInfo.m_nLeftMarginAdjust ); - aValue += ','; - aValue += ByteString::CreateFromInt32( it->second.m_aInfo.m_nRightMarginAdjust ); - aValue += ','; - aValue += ByteString::CreateFromInt32( it->second.m_aInfo.m_nTopMarginAdjust ); - aValue += ','; - aValue += ByteString::CreateFromInt32( it->second.m_aInfo.m_nBottomMarginAdjust ); - pConfig->WriteKey( "MarginAdjust", aValue ); - - if( it->second.m_aInfo.m_aDriverName.compareToAscii( "CUPS:", 5 ) != 0 ) - { - // write PPDContext (not for CUPS) - for( int i = 0; i < it->second.m_aInfo.m_aContext.countValuesModified(); i++ ) - { - const PPDKey* pKey = it->second.m_aInfo.m_aContext.getModifiedKey( i ); - ByteString aKey( "PPD_" ); - aKey += ByteString( pKey->getKey(), RTL_TEXTENCODING_ISO_8859_1 ); - - const PPDValue* pValue = it->second.m_aInfo.m_aContext.getValue( pKey ); - aValue = pValue ? ByteString( pValue->m_aOption, RTL_TEXTENCODING_ISO_8859_1 ) : ByteString( "*nil" ); - pConfig->WriteKey( aKey, aValue ); - } - } - - // write font substitution table - pConfig->WriteKey( "PerformFontSubstitution", it->second.m_aInfo.m_bPerformFontSubstitution ? "true" : "false" ); - for( ::std::hash_map< OUString, OUString, OUStringHash >::const_iterator subst = it->second.m_aInfo.m_aFontSubstitutes.begin(); - subst != it->second.m_aInfo.m_aFontSubstitutes.end(); ++subst ) - { - ByteString aKey( "SubstFont_" ); - aKey.Append( OUStringToOString( subst->first, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); - pConfig->WriteKey( aKey, OUStringToOString( subst->second, RTL_TEXTENCODING_ISO_8859_1 ) ); - } - } - } - - // get rid of Config objects. this also writes any changes - for( file_it = files.begin(); file_it != files.end(); ++file_it ) - delete file_it->second; - - return true; -} - -// ----------------------------------------------------------------- - -bool PrinterInfoManager::addPrinter( const OUString& rPrinterName, const OUString& rDriverName ) -{ - bool bSuccess = false; - - const PPDParser* pParser = NULL; - if( m_aPrinters.find( rPrinterName ) == m_aPrinters.end() && ( pParser = PPDParser::getParser( rDriverName ) ) ) - { - Printer aPrinter; - aPrinter.m_bModified = true; - aPrinter.m_aInfo = m_aGlobalDefaults; - aPrinter.m_aInfo.m_aDriverName = rDriverName; - aPrinter.m_aInfo.m_pParser = pParser; - aPrinter.m_aInfo.m_aContext.setParser( pParser ); - aPrinter.m_aInfo.m_aPrinterName = rPrinterName; - - fillFontSubstitutions( aPrinter.m_aInfo ); - // merge PPD values with global defaults - for( int nPPDValueModified = 0; nPPDValueModified < m_aGlobalDefaults.m_aContext.countValuesModified(); nPPDValueModified++ ) - { - const PPDKey* pDefKey = m_aGlobalDefaults.m_aContext.getModifiedKey( nPPDValueModified ); - const PPDValue* pDefValue = m_aGlobalDefaults.m_aContext.getValue( pDefKey ); - const PPDKey* pPrinterKey = pDefKey ? aPrinter.m_aInfo.m_pParser->getKey( pDefKey->getKey() ) : NULL; - if( pDefKey && pPrinterKey ) - // at least the options exist in both PPDs - { - if( pDefValue ) - { - const PPDValue* pPrinterValue = pPrinterKey->getValue( pDefValue->m_aOption ); - if( pPrinterValue ) - // the printer has a corresponding option for the key - aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, pPrinterValue ); - } - else - aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, NULL ); - } - } - - m_aPrinters[ rPrinterName ] = aPrinter; - bSuccess = true; - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "new printer %s, level = %d, pdfdevice = %d, colordevice = %d, depth = %d\n", - OUStringToOString( rPrinterName, osl_getThreadTextEncoding() ).getStr(), - m_aPrinters[rPrinterName].m_aInfo.m_nPSLevel, - m_aPrinters[rPrinterName].m_aInfo.m_nPDFDevice, - m_aPrinters[rPrinterName].m_aInfo.m_nColorDevice, - m_aPrinters[rPrinterName].m_aInfo.m_nColorDepth ); - #endif - // comment: logically one should writePrinterConfig() here - // but immediately after addPrinter() a changePrinterInfo() - // will follow (see padmin code), which writes it again, - // so we can currently save some performance here - } - return bSuccess; -} - -// ----------------------------------------------------------------- - -bool PrinterInfoManager::removePrinter( const OUString& rPrinterName, bool bCheckOnly ) -{ - bool bSuccess = true; - - ::std::hash_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.find( rPrinterName ); - if( it != m_aPrinters.end() ) - { - if( it->second.m_aFile.getLength() ) - { - // this printer already exists in a config file - - - // check writeability of config file(s) - if( ! checkWriteability( it->second.m_aFile ) ) - bSuccess = false; - else - { - for( std::list< OUString >::const_iterator file_it = it->second.m_aAlternateFiles.begin(); - file_it != it->second.m_aAlternateFiles.end() && bSuccess; ++file_it ) - { - if( ! checkWriteability( *file_it ) ) - bSuccess = false; - } - } - if( bSuccess && ! bCheckOnly ) - { - - Config aConfig( it->second.m_aFile ); - aConfig.DeleteGroup( it->second.m_aGroup ); - aConfig.Flush(); - for( std::list< OUString >::const_iterator file_it = it->second.m_aAlternateFiles.begin(); - file_it != it->second.m_aAlternateFiles.end() && bSuccess; ++file_it ) - { - Config aAltConfig( *file_it ); - aAltConfig.DeleteGroup( it->second.m_aGroup ); - aAltConfig.Flush(); - } - } - } - if( bSuccess && ! bCheckOnly ) - { - m_aPrinters.erase( it ); - // need this here because someone may call - // checkPrintersChanged after the removal - // but then other added printers were not flushed - // to disk, so they are discarded - writePrinterConfig(); - } - } - return bSuccess; -} - -// ----------------------------------------------------------------- - -bool PrinterInfoManager::setDefaultPrinter( const OUString& rPrinterName ) -{ - bool bSuccess = false; - - ::std::hash_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.find( rPrinterName ); - if( it != m_aPrinters.end() ) - { - bSuccess = true; - it->second.m_bModified = true; - if( ( it = m_aPrinters.find( m_aDefaultPrinter ) ) != m_aPrinters.end() ) - it->second.m_bModified = true; - m_aDefaultPrinter = rPrinterName; - writePrinterConfig(); - } - return bSuccess; -} - -// ----------------------------------------------------------------- -bool PrinterInfoManager::addOrRemovePossible() const -{ - return true; -} - -// ----------------------------------------------------------------- - -void PrinterInfoManager::fillFontSubstitutions( PrinterInfo& rInfo ) const -{ - PrintFontManager& rFontManager( PrintFontManager::get() ); - rInfo.m_aFontSubstitutions.clear(); - - if( ! rInfo.m_bPerformFontSubstitution || - ! rInfo.m_aFontSubstitutes.size() ) - return; - - ::std::list< FastPrintFontInfo > aFonts; - ::std::hash_map< OUString, ::std::list< FastPrintFontInfo >, OUStringHash > aPrinterFonts; - rFontManager.getFontListWithFastInfo( aFonts, rInfo.m_pParser ); - - // get builtin fonts - ::std::list< FastPrintFontInfo >::const_iterator it; - for( it = aFonts.begin(); it != aFonts.end(); ++it ) - if( it->m_eType == fonttype::Builtin ) - aPrinterFonts[ it->m_aFamilyName.toAsciiLowerCase() ].push_back( *it ); - - // map lower case, so build a local copy of the font substitutions - ::std::hash_map< OUString, OUString, OUStringHash > aSubstitutions; - ::std::hash_map< OUString, OUString, OUStringHash >::const_iterator subst; - for( subst = rInfo.m_aFontSubstitutes.begin(); subst != rInfo.m_aFontSubstitutes.end(); ++subst ) - { - OUString aFamily( subst->first.toAsciiLowerCase() ); - // first look if there is a builtin of this family - // in this case override the substitution table - if( aPrinterFonts.find( aFamily ) != aPrinterFonts.end() ) - aSubstitutions[ aFamily ] = aFamily; - else - aSubstitutions[ aFamily ] = subst->second.toAsciiLowerCase(); - } - - - // now find substitutions - for( it = aFonts.begin(); it != aFonts.end(); ++it ) - { - if( it->m_eType != fonttype::Builtin ) - { - OUString aFamily( it->m_aFamilyName.toAsciiLowerCase() ); - subst = aSubstitutions.find( aFamily ); - if( subst != aSubstitutions.end() ) - { - // search a substitution - const ::std::list< FastPrintFontInfo >& rBuiltins( aPrinterFonts[ aSubstitutions[ aFamily ] ] ); - ::std::list< FastPrintFontInfo >::const_iterator builtin; - int nLastMatch = -10000; - fontID nSubstitute = -1; - for( builtin = rBuiltins.begin(); builtin != rBuiltins.end(); ++builtin ) - { - int nMatch = 0; - int nDiff; - if( builtin->m_eItalic == it->m_eItalic ) - nMatch += 8000; - - nDiff = builtin->m_eWeight - it->m_eWeight; - nDiff = nDiff < 0 ? -nDiff : nDiff; - nMatch += 4000 - 1000*nDiff; - - nDiff = builtin->m_eWidth - it->m_eWidth; - nDiff = nDiff < 0 ? -nDiff : nDiff; - nMatch += 2000 - 500*nDiff; - - if( nMatch > nLastMatch ) - { - nLastMatch = nMatch; - nSubstitute = builtin->m_nID; - } - } - if( nSubstitute != -1 ) - { - rInfo.m_aFontSubstitutions[ it->m_nID ] = nSubstitute; - #if OSL_DEBUG_LEVEL > 2 - FastPrintFontInfo aInfo; - rFontManager.getFontFastInfo( nSubstitute, aInfo ); - fprintf( stderr, - "substitute %s %s %d %d\n" - " -> %s %s %d %d\n", - OUStringToOString( it->m_aFamilyName, RTL_TEXTENCODING_ISO_8859_1 ).getStr(), - it->m_eItalic == italic::Upright ? "r" : it->m_eItalic == italic::Oblique ? "o" : it->m_eItalic == italic::Italic ? "i" : "u", - it->m_eWeight, - it->m_eWidth, - - OUStringToOString( aInfo.m_aFamilyName, RTL_TEXTENCODING_ISO_8859_1 ).getStr(), - aInfo.m_eItalic == italic::Upright ? "r" : aInfo.m_eItalic == italic::Oblique ? "o" : aInfo.m_eItalic == italic::Italic ? "i" : "u", - aInfo.m_eWeight, - aInfo.m_eWidth - ); - #endif - } - } - } - } -} - -// ----------------------------------------------------------------- - -void PrinterInfoManager::getSystemPrintCommands( std::list< OUString >& rCommands ) -{ - if( m_pQueueInfo && m_pQueueInfo->hasChanged() ) - { - m_aSystemPrintCommand = m_pQueueInfo->getCommand(); - m_pQueueInfo->getSystemQueues( m_aSystemPrintQueues ); - delete m_pQueueInfo, m_pQueueInfo = NULL; - } - - std::list< SystemPrintQueue >::const_iterator it; - rCommands.clear(); - String aPrinterConst( RTL_CONSTASCII_USTRINGPARAM( "(PRINTER)" ) ); - for( it = m_aSystemPrintQueues.begin(); it != m_aSystemPrintQueues.end(); ++it ) - { - String aCmd( m_aSystemPrintCommand ); - aCmd.SearchAndReplace( aPrinterConst, it->m_aQueue ); - rCommands.push_back( aCmd ); - } -} - -const std::list< PrinterInfoManager::SystemPrintQueue >& PrinterInfoManager::getSystemPrintQueues() -{ - if( m_pQueueInfo && m_pQueueInfo->hasChanged() ) - { - m_aSystemPrintCommand = m_pQueueInfo->getCommand(); - m_pQueueInfo->getSystemQueues( m_aSystemPrintQueues ); - delete m_pQueueInfo, m_pQueueInfo = NULL; - } - - return m_aSystemPrintQueues; -} - -bool PrinterInfoManager::checkFeatureToken( const rtl::OUString& rPrinterName, const char* pToken ) const -{ - const PrinterInfo& rPrinterInfo( getPrinterInfo( rPrinterName ) ); - sal_Int32 nIndex = 0; - while( nIndex != -1 ) - { - OUString aOuterToken = rPrinterInfo.m_aFeatures.getToken( 0, ',', nIndex ); - sal_Int32 nInnerIndex = 0; - OUString aInnerToken = aOuterToken.getToken( 0, '=', nInnerIndex ); - if( aInnerToken.equalsIgnoreAsciiCaseAscii( pToken ) ) - return true; - } - return false; -} - -FILE* PrinterInfoManager::startSpool( const OUString& rPrintername, bool bQuickCommand ) -{ - const PrinterInfo& rPrinterInfo = getPrinterInfo (rPrintername); - const rtl::OUString& rCommand = (bQuickCommand && rPrinterInfo.m_aQuickCommand.getLength() ) ? - rPrinterInfo.m_aQuickCommand : rPrinterInfo.m_aCommand; - rtl::OString aShellCommand = OUStringToOString (rCommand, RTL_TEXTENCODING_ISO_8859_1); - aShellCommand += rtl::OString( " 2>/dev/null" ); - - return popen (aShellCommand.getStr(), "w"); -} - -int PrinterInfoManager::endSpool( const OUString& /*rPrintername*/, const OUString& /*rJobTitle*/, FILE* pFile, const JobData& /*rDocumentJobData*/, bool /*bBanner*/ ) -{ - return (0 == pclose( pFile )); -} - -void PrinterInfoManager::setupJobContextData( JobData& rData ) -{ - std::hash_map< OUString, Printer, OUStringHash >::iterator it = - m_aPrinters.find( rData.m_aPrinterName ); - if( it != m_aPrinters.end() ) - { - rData.m_pParser = it->second.m_aInfo.m_pParser; - rData.m_aContext = it->second.m_aInfo.m_aContext; - } -} - -void PrinterInfoManager::setDefaultPaper( PPDContext& rContext ) const -{ - if( ! rContext.getParser() ) - return; - - const PPDKey* pPageSizeKey = rContext.getParser()->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) ); - if( ! pPageSizeKey ) - return; - - int nModified = rContext.countValuesModified(); - while( nModified-- && - rContext.getModifiedKey( nModified ) != pPageSizeKey ) - ; - - if( nModified >= 0 ) // paper was set already, do not modify - { - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "not setting default paper, already set %s\n", - OUStringToOString( rContext.getValue( pPageSizeKey )->m_aOption, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); - #endif - return; - } - - // paper not set, fill in default value - const PPDValue* pPaperVal = NULL; - int nValues = pPageSizeKey->countValues(); - for( int i = 0; i < nValues && ! pPaperVal; i++ ) - { - const PPDValue* pVal = pPageSizeKey->getValue( i ); - if( pVal->m_aOption.EqualsIgnoreCaseAscii( m_aSystemDefaultPaper.getStr() ) ) - pPaperVal = pVal; - } - if( pPaperVal ) - { - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "setting default paper %s\n", OUStringToOString( pPaperVal->m_aOption, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); - #endif - rContext.setValue( pPageSizeKey, pPaperVal ); - #if OSL_DEBUG_LEVEL > 1 - pPaperVal = rContext.getValue( pPageSizeKey ); - fprintf( stderr, "-> got paper %s\n", OUStringToOString( pPaperVal->m_aOption, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); - #endif - } -} - -// ----------------------------------------------------------------- - -SystemQueueInfo::SystemQueueInfo() : - m_bChanged( false ) -{ - create(); -} - -SystemQueueInfo::~SystemQueueInfo() -{ - static const char* pNoSyncDetection = getenv( "SAL_DISABLE_SYNCHRONOUS_PRINTER_DETECTION" ); - if( ! pNoSyncDetection || !*pNoSyncDetection ) - join(); - else - terminate(); -} - -bool SystemQueueInfo::hasChanged() const -{ - MutexGuard aGuard( m_aMutex ); - bool bChanged = m_bChanged; - return bChanged; -} - -void SystemQueueInfo::getSystemQueues( std::list< PrinterInfoManager::SystemPrintQueue >& rQueues ) -{ - MutexGuard aGuard( m_aMutex ); - rQueues = m_aQueues; - m_bChanged = false; -} - -OUString SystemQueueInfo::getCommand() const -{ - MutexGuard aGuard( m_aMutex ); - OUString aRet = m_aCommand; - return aRet; -} - -struct SystemCommandParameters; -typedef void(* tokenHandler)(const std::list< rtl::OString >&, - std::list< PrinterInfoManager::SystemPrintQueue >&, - const SystemCommandParameters*); - -struct SystemCommandParameters -{ - const char* pQueueCommand; - const char* pPrintCommand; - const char* pForeToken; - const char* pAftToken; - unsigned int nForeTokenCount; - tokenHandler pHandler; -}; - -#if ! (defined(LINUX) || defined(NETBSD) || defined(FREEBSD)) -static void lpgetSysQueueTokenHandler( - const std::list< rtl::OString >& i_rLines, - std::list< PrinterInfoManager::SystemPrintQueue >& o_rQueues, - const SystemCommandParameters* ) -{ - rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - std::hash_set< OUString, OUStringHash > aUniqueSet; - std::hash_set< OUString, OUStringHash > aOnlySet; - aUniqueSet.insert( OUString( RTL_CONSTASCII_USTRINGPARAM( "_all" ) ) ); - aUniqueSet.insert( OUString( RTL_CONSTASCII_USTRINGPARAM( "_default" ) ) ); - - // the eventual "all" attribute of the "_all" queue tells us, which - // printers are to be used for this user at all - - // find _all: line - rtl::OString aAllLine( "_all:" ); - rtl::OString aAllAttr( "all=" ); - for( std::list< rtl::OString >::const_iterator it = i_rLines.begin(); - it != i_rLines.end(); ++it ) - { - if( it->indexOf( aAllLine, 0 ) == 0 ) - { - // now find the "all" attribute - ++it; - while( it != i_rLines.end() ) - { - rtl::OString aClean( WhitespaceToSpace( *it ) ); - if( aClean.indexOf( aAllAttr, 0 ) == 0 ) - { - // insert the comma separated entries into the set of printers to use - sal_Int32 nPos = aAllAttr.getLength(); - while( nPos != -1 ) - { - OString aTok( aClean.getToken( 0, ',', nPos ) ); - if( aTok.getLength() > 0 ) - aOnlySet.insert( rtl::OStringToOUString( aTok, aEncoding ) ); - } - break; - } - } - break; - } - } - - bool bInsertAttribute = false; - rtl::OString aDescrStr( "description=" ); - rtl::OString aLocStr( "location=" ); - for( std::list< rtl::OString >::const_iterator it = i_rLines.begin(); - it != i_rLines.end(); ++it ) - { - sal_Int32 nPos = 0; - // find the begin of a new printer section - nPos = it->indexOf( ':', 0 ); - if( nPos != -1 ) - { - OUString aSysQueue( rtl::OStringToOUString( it->copy( 0, nPos ), aEncoding ) ); - // do not insert duplicates (e.g. lpstat tends to produce such lines) - // in case there was a "_all" section, insert only those printer explicitly - // set in the "all" attribute - if( aUniqueSet.find( aSysQueue ) == aUniqueSet.end() && - ( aOnlySet.empty() || aOnlySet.find( aSysQueue ) != aOnlySet.end() ) - ) - { - o_rQueues.push_back( PrinterInfoManager::SystemPrintQueue() ); - o_rQueues.back().m_aQueue = aSysQueue; - o_rQueues.back().m_aLocation = aSysQueue; - aUniqueSet.insert( aSysQueue ); - bInsertAttribute = true; - } - else - bInsertAttribute = false; - continue; - } - if( bInsertAttribute && ! o_rQueues.empty() ) - { - // look for "description" attribute, insert as comment - nPos = it->indexOf( aDescrStr, 0 ); - if( nPos != -1 ) - { - ByteString aComment( WhitespaceToSpace( it->copy(nPos+12) ) ); - if( aComment.Len() > 0 ) - o_rQueues.back().m_aComment = String( aComment, aEncoding ); - continue; - } - // look for "location" attribute, inser as location - nPos = it->indexOf( aLocStr, 0 ); - if( nPos != -1 ) - { - ByteString aLoc( WhitespaceToSpace( it->copy(nPos+9) ) ); - if( aLoc.Len() > 0 ) - o_rQueues.back().m_aLocation = String( aLoc, aEncoding ); - continue; - } - } - } -} -#endif -static void standardSysQueueTokenHandler( - const std::list< rtl::OString >& i_rLines, - std::list< PrinterInfoManager::SystemPrintQueue >& o_rQueues, - const SystemCommandParameters* i_pParms) -{ - rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - std::hash_set< OUString, OUStringHash > aUniqueSet; - rtl::OString aForeToken( i_pParms->pForeToken ); - rtl::OString aAftToken( i_pParms->pAftToken ); - /* Normal Unix print queue discovery, also used for Darwin 5 LPR printing - */ - for( std::list< rtl::OString >::const_iterator it = i_rLines.begin(); - it != i_rLines.end(); ++it ) - { - sal_Int32 nPos = 0; - - // search for a line describing a printer: - // find if there are enough tokens before the name - for( unsigned int i = 0; i < i_pParms->nForeTokenCount && nPos != -1; i++ ) - { - nPos = it->indexOf( aForeToken, nPos ); - if( nPos != -1 && it->getLength() >= nPos+aForeToken.getLength() ) - nPos += aForeToken.getLength(); - } - if( nPos != -1 ) - { - // find if there is the token after the queue - sal_Int32 nAftPos = it->indexOf( aAftToken, nPos ); - if( nAftPos != -1 ) - { - // get the queue name between fore and aft tokens - OUString aSysQueue( rtl::OStringToOUString( it->copy( nPos, nAftPos - nPos ), aEncoding ) ); - // do not insert duplicates (e.g. lpstat tends to produce such lines) - if( aUniqueSet.find( aSysQueue ) == aUniqueSet.end() ) - { - o_rQueues.push_back( PrinterInfoManager::SystemPrintQueue() ); - o_rQueues.back().m_aQueue = aSysQueue; - o_rQueues.back().m_aLocation = aSysQueue; - aUniqueSet.insert( aSysQueue ); - } - } - } - } -} - -static const struct SystemCommandParameters aParms[] = -{ - #if defined(LINUX) || defined(NETBSD) || defined(FREEBSD) - { "/usr/sbin/lpc status", "lpr -P \"(PRINTER)\"", "", ":", 0, standardSysQueueTokenHandler }, - { "lpc status", "lpr -P \"(PRINTER)\"", "", ":", 0, standardSysQueueTokenHandler }, - { "LANG=C;LC_ALL=C;export LANG LC_ALL;lpstat -s", "lp -d \"(PRINTER)\"", "system for ", ": ", 1, standardSysQueueTokenHandler } - #else - { "LANG=C;LC_ALL=C;export LANG LC_ALL;lpget list", "lp -d \"(PRINTER)\"", "", ":", 0, lpgetSysQueueTokenHandler }, - { "LANG=C;LC_ALL=C;export LANG LC_ALL;lpstat -s", "lp -d \"(PRINTER)\"", "system for ", ": ", 1, standardSysQueueTokenHandler }, - { "/usr/sbin/lpc status", "lpr -P \"(PRINTER)\"", "", ":", 0, standardSysQueueTokenHandler }, - { "lpc status", "lpr -P \"(PRINTER)\"", "", ":", 0, standardSysQueueTokenHandler } - #endif -}; - -void SystemQueueInfo::run() -{ - char pBuffer[1024]; - FILE *pPipe; - std::list< rtl::OString > aLines; - - /* Discover which command we can use to get a list of all printer queues */ - for( unsigned int i = 0; i < sizeof(aParms)/sizeof(aParms[0]); i++ ) - { - aLines.clear(); - rtl::OStringBuffer aCmdLine( 128 ); - aCmdLine.append( aParms[i].pQueueCommand ); - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "trying print queue command \"%s\" ... ", aParms[i].pQueueCommand ); - #endif - aCmdLine.append( " 2>/dev/null" ); - if( (pPipe = popen( aCmdLine.getStr(), "r" )) ) - { - while( fgets( pBuffer, 1024, pPipe ) ) - aLines.push_back( rtl::OString( pBuffer ) ); - if( ! pclose( pPipe ) ) - { - std::list< PrinterInfoManager::SystemPrintQueue > aSysPrintQueues; - aParms[i].pHandler( aLines, aSysPrintQueues, &(aParms[i]) ); - MutexGuard aGuard( m_aMutex ); - m_bChanged = true; - m_aQueues = aSysPrintQueues; - m_aCommand = rtl::OUString::createFromAscii( aParms[i].pPrintCommand ); - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "success\n" ); - #endif - break; - } - } - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "failed\n" ); - #endif - } -} - diff --git a/vcl/unx/source/printergfx/bitmap_gfx.cxx b/vcl/unx/source/printergfx/bitmap_gfx.cxx deleted file mode 100644 index 1421fb7433f7..000000000000 --- a/vcl/unx/source/printergfx/bitmap_gfx.cxx +++ /dev/null @@ -1,732 +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_vcl.hxx" - -#include "psputil.hxx" - -#include "vcl/printergfx.hxx" -#include "vcl/strhelper.hxx" - -namespace psp { - -const sal_uInt32 nLineLength = 80; -const sal_uInt32 nBufferSize = 16384; - -/* - * - * Bitmap compression / Hex encoding / Ascii85 Encoding - * - */ - -PrinterBmp::~PrinterBmp () -{ /* dont need this, but C50 does */ } - -/* virtual base class */ - -class ByteEncoder -{ -private: - -public: - - virtual void EncodeByte (sal_uInt8 nByte) = 0; - virtual ~ByteEncoder () = 0; -}; - -ByteEncoder::~ByteEncoder () -{ /* dont need this, but the C50 does */ } - -/* HexEncoder */ - -class HexEncoder : public ByteEncoder -{ -private: - - osl::File* mpFile; - sal_uInt32 mnColumn; - sal_uInt32 mnOffset; - sal_Char mpFileBuffer[nBufferSize + 16]; - - HexEncoder (); /* dont use */ - -public: - - HexEncoder (osl::File* pFile); - virtual ~HexEncoder (); - void WriteAscii (sal_uInt8 nByte); - virtual void EncodeByte (sal_uInt8 nByte); - void FlushLine (); -}; - -HexEncoder::HexEncoder (osl::File* pFile) : - mpFile (pFile), - mnColumn (0), - mnOffset (0) -{} - -HexEncoder::~HexEncoder () -{ - FlushLine (); - if (mnColumn > 0) - WritePS (mpFile, "\n"); -} - -void -HexEncoder::WriteAscii (sal_uInt8 nByte) -{ - sal_uInt32 nOff = psp::getHexValueOf (nByte, mpFileBuffer + mnOffset); - mnColumn += nOff; - mnOffset += nOff; - - if (mnColumn >= nLineLength) - { - mnOffset += psp::appendStr ("\n", mpFileBuffer + mnOffset); - mnColumn = 0; - } - if (mnOffset >= nBufferSize) - FlushLine (); -} - -void -HexEncoder::EncodeByte (sal_uInt8 nByte) -{ - WriteAscii (nByte); -} - -void -HexEncoder::FlushLine () -{ - if (mnOffset > 0) - { - WritePS (mpFile, mpFileBuffer, mnOffset); - mnOffset = 0; - } -} - -/* Ascii85 encoder, is abi compatible with HexEncoder but writes a ~> to - indicate end of data EOD */ - -class Ascii85Encoder : public ByteEncoder -{ -private: - - osl::File* mpFile; - sal_uInt32 mnByte; - sal_uInt8 mpByteBuffer[4]; - - sal_uInt32 mnColumn; - sal_uInt32 mnOffset; - sal_Char mpFileBuffer[nBufferSize + 16]; - - Ascii85Encoder (); /* dont use */ - - inline void PutByte (sal_uInt8 nByte); - inline void PutEOD (); - void ConvertToAscii85 (); - void FlushLine (); - -public: - - Ascii85Encoder (osl::File* pFile); - virtual ~Ascii85Encoder (); - virtual void EncodeByte (sal_uInt8 nByte); - void WriteAscii (sal_uInt8 nByte); -}; - -Ascii85Encoder::Ascii85Encoder (osl::File* pFile) : - mpFile (pFile), - mnByte (0), - mnColumn (0), - mnOffset (0) -{} - -inline void -Ascii85Encoder::PutByte (sal_uInt8 nByte) -{ - mpByteBuffer [mnByte++] = nByte; -} - -inline void -Ascii85Encoder::PutEOD () -{ - WritePS (mpFile, "~>\n"); -} - -void -Ascii85Encoder::ConvertToAscii85 () -{ - if (mnByte < 4) - std::memset (mpByteBuffer + mnByte, 0, (4 - mnByte) * sizeof(sal_uInt8)); - - sal_uInt32 nByteValue = mpByteBuffer[0] * 256 * 256 * 256 - + mpByteBuffer[1] * 256 * 256 - + mpByteBuffer[2] * 256 - + mpByteBuffer[3]; - - if (nByteValue == 0 && mnByte == 4) - { - /* special case of 4 Bytes in row */ - mpFileBuffer [mnOffset] = 'z'; - - mnOffset += 1; - mnColumn += 1; - } - else - { - /* real ascii85 encoding */ - mpFileBuffer [mnOffset + 4] = (nByteValue % 85) + 33; - nByteValue /= 85; - mpFileBuffer [mnOffset + 3] = (nByteValue % 85) + 33; - nByteValue /= 85; - mpFileBuffer [mnOffset + 2] = (nByteValue % 85) + 33; - nByteValue /= 85; - mpFileBuffer [mnOffset + 1] = (nByteValue % 85) + 33; - nByteValue /= 85; - mpFileBuffer [mnOffset + 0] = (nByteValue % 85) + 33; - - mnColumn += (mnByte + 1); - mnOffset += (mnByte + 1); - - /* insert a newline if necessary */ - if (mnColumn > nLineLength) - { - sal_uInt32 nEolOff = mnColumn - nLineLength; - sal_uInt32 nBufOff = mnOffset - nEolOff; - - std::memmove (mpFileBuffer + nBufOff + 1, mpFileBuffer + nBufOff, nEolOff); - mpFileBuffer[ nBufOff ] = '\n'; - - mnOffset++; - mnColumn = nEolOff; - } - } - - mnByte = 0; -} - -void -Ascii85Encoder::WriteAscii (sal_uInt8 nByte) -{ - PutByte (nByte); - if (mnByte == 4) - ConvertToAscii85 (); - - if (mnColumn >= nLineLength) - { - mnOffset += psp::appendStr ("\n", mpFileBuffer + mnOffset); - mnColumn = 0; - } - if (mnOffset >= nBufferSize) - FlushLine (); -} - -void -Ascii85Encoder::EncodeByte (sal_uInt8 nByte) -{ - WriteAscii (nByte); -} - -void -Ascii85Encoder::FlushLine () -{ - if (mnOffset > 0) - { - WritePS (mpFile, mpFileBuffer, mnOffset); - mnOffset = 0; - } -} - -Ascii85Encoder::~Ascii85Encoder () -{ - if (mnByte > 0) - ConvertToAscii85 (); - if (mnOffset > 0) - FlushLine (); - PutEOD (); -} - -/* LZW encoder */ - -class LZWEncoder : public Ascii85Encoder -{ -private: - - struct LZWCTreeNode - { - LZWCTreeNode* mpBrother; // next node with same parent - LZWCTreeNode* mpFirstChild; // first son - sal_uInt16 mnCode; // code for the string - sal_uInt16 mnValue; // pixelvalue - }; - - LZWCTreeNode* mpTable; // LZW compression data - LZWCTreeNode* mpPrefix; // the compression is as same as the TIFF compression - sal_uInt16 mnDataSize; - sal_uInt16 mnClearCode; - sal_uInt16 mnEOICode; - sal_uInt16 mnTableSize; - sal_uInt16 mnCodeSize; - sal_uInt32 mnOffset; - sal_uInt32 mdwShift; - - LZWEncoder (); - void WriteBits (sal_uInt16 nCode, sal_uInt16 nCodeLen); - -public: - - LZWEncoder (osl::File* pOutputFile); - ~LZWEncoder (); - - virtual void EncodeByte (sal_uInt8 nByte); -}; - -LZWEncoder::LZWEncoder(osl::File* pOutputFile) : - Ascii85Encoder (pOutputFile) -{ - mnDataSize = 8; - - mnClearCode = 1 << mnDataSize; - mnEOICode = mnClearCode + 1; - mnTableSize = mnEOICode + 1; - mnCodeSize = mnDataSize + 1; - - mnOffset = 32; // free bits in dwShift - mdwShift = 0; - - mpTable = new LZWCTreeNode[ 4096 ]; - - for (sal_uInt32 i = 0; i < 4096; i++) - { - mpTable[i].mpBrother = NULL; - mpTable[i].mpFirstChild = NULL; - mpTable[i].mnCode = i; - mpTable[i].mnValue = (sal_uInt8)mpTable[i].mnCode; - } - - mpPrefix = NULL; - - WriteBits( mnClearCode, mnCodeSize ); -} - -LZWEncoder::~LZWEncoder() -{ - if (mpPrefix) - WriteBits (mpPrefix->mnCode, mnCodeSize); - - WriteBits (mnEOICode, mnCodeSize); - - delete[] mpTable; -} - -void -LZWEncoder::WriteBits (sal_uInt16 nCode, sal_uInt16 nCodeLen) -{ - mdwShift |= (nCode << (mnOffset - nCodeLen)); - mnOffset -= nCodeLen; - while (mnOffset < 24) - { - WriteAscii ((sal_uInt8)(mdwShift >> 24)); - mdwShift <<= 8; - mnOffset += 8; - } - if (nCode == 257 && mnOffset != 32) - WriteAscii ((sal_uInt8)(mdwShift >> 24)); -} - -void -LZWEncoder::EncodeByte (sal_uInt8 nByte ) -{ - LZWCTreeNode* p; - sal_uInt16 i; - sal_uInt8 nV; - - if (!mpPrefix) - { - mpPrefix = mpTable + nByte; - } - else - { - nV = nByte; - for (p = mpPrefix->mpFirstChild; p != NULL; p = p->mpBrother) - { - if (p->mnValue == nV) - break; - } - - if (p != NULL) - { - mpPrefix = p; - } - else - { - WriteBits (mpPrefix->mnCode, mnCodeSize); - - if (mnTableSize == 409) - { - WriteBits (mnClearCode, mnCodeSize); - - for (i = 0; i < mnClearCode; i++) - mpTable[i].mpFirstChild = NULL; - - mnCodeSize = mnDataSize + 1; - mnTableSize = mnEOICode + 1; - } - else - { - if(mnTableSize == (sal_uInt16)((1 << mnCodeSize) - 1)) - mnCodeSize++; - - p = mpTable + (mnTableSize++); - p->mpBrother = mpPrefix->mpFirstChild; - mpPrefix->mpFirstChild = p; - p->mnValue = nV; - p->mpFirstChild = NULL; - } - - mpPrefix = mpTable + nV; - } - } -} - -/* - * - * bitmap handling routines - * - */ - -void -PrinterGfx::DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc, - const PrinterBmp& rBitmap) -{ - double fScaleX = (double)rDest.GetWidth() / (double)rSrc.GetWidth(); - double fScaleY = (double)rDest.GetHeight() / (double)rSrc.GetHeight(); - - PSGSave (); - PSTranslate (rDest.BottomLeft()); - PSScale (fScaleX, fScaleY); - - if (mnPSLevel >= 2) - { - if (rBitmap.GetDepth() == 1) - { - DrawPS2MonoImage (rBitmap, rSrc); - } - else - if (rBitmap.GetDepth() == 8 && mbColor) - { - // if the palette is larger than the image itself print it as a truecolor - // image to save diskspace. This is important for printing transparent - // bitmaps that are disassembled into small pieces - sal_Int32 nImageSz = rSrc.GetWidth() * rSrc.GetHeight(); - sal_Int32 nPaletteSz = rBitmap.GetPaletteEntryCount(); - if ((nImageSz < nPaletteSz) || (nImageSz < 24) ) - DrawPS2TrueColorImage (rBitmap, rSrc); - else - DrawPS2PaletteImage (rBitmap, rSrc); - } - else - if (rBitmap.GetDepth() == 24 && mbColor) - { - DrawPS2TrueColorImage (rBitmap, rSrc); - } - else - { - DrawPS2GrayImage (rBitmap, rSrc); - } - } - else - { - DrawPS1GrayImage (rBitmap, rSrc); - } - - PSGRestore (); -} - -/* XXX does not work XXX */ -void -PrinterGfx::DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc, - const PrinterBmp& /*rBitmap*/, const PrinterBmp& /*rTransBitmap*/) -{ - double fScaleX = (double)rDest.GetWidth() / (double)rSrc.GetWidth(); - double fScaleY = (double)rDest.GetHeight() / (double)rSrc.GetHeight(); - - PSGSave (); - PSTranslate (rDest.BottomLeft()); - PSScale (fScaleX, fScaleY); - PSGRestore (); -} - -/* XXX does not work XXX */ -void -PrinterGfx::DrawMask (const Rectangle& rDest, const Rectangle& rSrc, - const PrinterBmp &/*rBitmap*/, PrinterColor& /*rMaskColor*/) -{ - double fScaleX = (double)rDest.GetWidth() / (double)rSrc.GetWidth(); - double fScaleY = (double)rDest.GetHeight() / (double)rSrc.GetHeight(); - - PSGSave (); - PSTranslate (rDest.BottomLeft()); - PSScale (fScaleX, fScaleY); - PSGRestore (); -} - -/* - * - * Implementation: PS Level 1 - * - */ - -void -PrinterGfx::DrawPS1GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea) -{ - sal_uInt32 nWidth = rArea.GetWidth(); - sal_uInt32 nHeight = rArea.GetHeight(); - - sal_Char pGrayImage [512]; - sal_Int32 nChar = 0; - - // image header - nChar += psp::getValueOf (nWidth, pGrayImage + nChar); - nChar += psp::appendStr (" ", pGrayImage + nChar); - nChar += psp::getValueOf (nHeight, pGrayImage + nChar); - nChar += psp::appendStr (" 8 ", pGrayImage + nChar); - nChar += psp::appendStr ("[ 1 0 0 1 0 ", pGrayImage + nChar); - nChar += psp::getValueOf (nHeight, pGrayImage + nChar); - nChar += psp::appendStr ("]", pGrayImage + nChar); - nChar += psp::appendStr (" {currentfile ", pGrayImage + nChar); - nChar += psp::getValueOf (nWidth, pGrayImage + nChar); - nChar += psp::appendStr (" string readhexstring pop}\n", pGrayImage + nChar); - nChar += psp::appendStr ("image\n", pGrayImage + nChar); - - WritePS (mpPageBody, pGrayImage); - - // image body - HexEncoder* pEncoder = new HexEncoder (mpPageBody); - - for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) - { - for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) - { - sal_uChar nByte = rBitmap.GetPixelGray (nRow, nColumn); - pEncoder->EncodeByte (nByte); - } - } - - delete pEncoder; - - WritePS (mpPageBody, "\n"); -} - -/* - * - * Implementation: PS Level 2 - * - */ - -void -PrinterGfx::writePS2ImageHeader (const Rectangle& rArea, psp::ImageType nType) -{ - sal_Int32 nChar = 0; - sal_Char pImage [512]; - - sal_Int32 nDictType = 0; - switch (nType) - { - case psp::TrueColorImage: nDictType = 0; break; - case psp::PaletteImage: nDictType = 1; break; - case psp::GrayScaleImage: nDictType = 2; break; - case psp::MonochromeImage: nDictType = 3; break; - default: break; - } - sal_Int32 nCompressType = mbCompressBmp ? 1 : 0; - - nChar += psp::getValueOf (rArea.GetWidth(), pImage + nChar); - nChar += psp::appendStr (" ", pImage + nChar); - nChar += psp::getValueOf (rArea.GetHeight(), pImage + nChar); - nChar += psp::appendStr (" ", pImage + nChar); - nChar += psp::getValueOf (nDictType, pImage + nChar); - nChar += psp::appendStr (" ", pImage + nChar); - nChar += psp::getValueOf (nCompressType, pImage + nChar); - nChar += psp::appendStr (" psp_imagedict image\n", pImage + nChar); - - WritePS (mpPageBody, pImage); -} - -void -PrinterGfx::writePS2Colorspace(const PrinterBmp& rBitmap, psp::ImageType nType) -{ - switch (nType) - { - case psp::GrayScaleImage: - - WritePS (mpPageBody, "/DeviceGray setcolorspace\n"); - break; - - case psp::TrueColorImage: - - WritePS (mpPageBody, "/DeviceRGB setcolorspace\n"); - break; - - case psp::MonochromeImage: - case psp::PaletteImage: - { - - sal_Int32 nChar = 0; - sal_Char pImage [4096]; - - const sal_uInt32 nSize = rBitmap.GetPaletteEntryCount(); - - nChar += psp::appendStr ("[/Indexed /DeviceRGB ", pImage + nChar); - nChar += psp::getValueOf (nSize - 1, pImage + nChar); - if (mbCompressBmp) - nChar += psp::appendStr ("\npsp_lzwstring\n", pImage + nChar); - else - nChar += psp::appendStr ("\npsp_ascii85string\n", pImage + nChar); - WritePS (mpPageBody, pImage); - - ByteEncoder* pEncoder = mbCompressBmp ? new LZWEncoder(mpPageBody) - : new Ascii85Encoder(mpPageBody); - for (sal_uInt32 i = 0; i < nSize; i++) - { - PrinterColor aColor = rBitmap.GetPaletteColor(i); - - pEncoder->EncodeByte (aColor.GetRed()); - pEncoder->EncodeByte (aColor.GetGreen()); - pEncoder->EncodeByte (aColor.GetBlue()); - } - delete pEncoder; - - WritePS (mpPageBody, "pop ] setcolorspace\n"); - } - break; - default: break; - } -} - -void -PrinterGfx::DrawPS2GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea) -{ - writePS2Colorspace(rBitmap, psp::GrayScaleImage); - writePS2ImageHeader(rArea, psp::GrayScaleImage); - - ByteEncoder* pEncoder = mbCompressBmp ? new LZWEncoder(mpPageBody) - : new Ascii85Encoder(mpPageBody); - - for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) - { - for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) - { - sal_uChar nByte = rBitmap.GetPixelGray (nRow, nColumn); - pEncoder->EncodeByte (nByte); - } - } - - delete pEncoder; -} - -void -PrinterGfx::DrawPS2MonoImage (const PrinterBmp& rBitmap, const Rectangle& rArea) -{ - writePS2Colorspace(rBitmap, psp::MonochromeImage); - writePS2ImageHeader(rArea, psp::MonochromeImage); - - ByteEncoder* pEncoder = mbCompressBmp ? new LZWEncoder(mpPageBody) - : new Ascii85Encoder(mpPageBody); - - for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) - { - long nBitPos = 0; - sal_uChar nBit = 0; - sal_uChar nByte = 0; - - for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) - { - nBit = rBitmap.GetPixelIdx (nRow, nColumn); - nByte |= nBit << (7 - nBitPos); - - if (++nBitPos == 8) - { - pEncoder->EncodeByte (nByte); - nBitPos = 0; - nByte = 0; - } - } - // keep the row byte aligned - if (nBitPos != 0) - pEncoder->EncodeByte (nByte); - } - - delete pEncoder; -} - -void -PrinterGfx::DrawPS2PaletteImage (const PrinterBmp& rBitmap, const Rectangle& rArea) -{ - writePS2Colorspace(rBitmap, psp::PaletteImage); - writePS2ImageHeader(rArea, psp::PaletteImage); - - ByteEncoder* pEncoder = mbCompressBmp ? new LZWEncoder(mpPageBody) - : new Ascii85Encoder(mpPageBody); - - for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) - { - for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) - { - sal_uChar nByte = rBitmap.GetPixelIdx (nRow, nColumn); - pEncoder->EncodeByte (nByte); - } - } - - delete pEncoder; -} - -void -PrinterGfx::DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const Rectangle& rArea) -{ - writePS2Colorspace(rBitmap, psp::TrueColorImage); - writePS2ImageHeader(rArea, psp::TrueColorImage); - - ByteEncoder* pEncoder = mbCompressBmp ? new LZWEncoder(mpPageBody) - : new Ascii85Encoder(mpPageBody); - - for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) - { - for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) - { - PrinterColor aColor = rBitmap.GetPixelRGB (nRow, nColumn); - pEncoder->EncodeByte (aColor.GetRed()); - pEncoder->EncodeByte (aColor.GetGreen()); - pEncoder->EncodeByte (aColor.GetBlue()); - } - } - - delete pEncoder; -} - -} /* namespace psp */ diff --git a/vcl/unx/source/printergfx/common_gfx.cxx b/vcl/unx/source/printergfx/common_gfx.cxx deleted file mode 100644 index 6bb31acfcbbe..000000000000 --- a/vcl/unx/source/printergfx/common_gfx.cxx +++ /dev/null @@ -1,1284 +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_vcl.hxx" - -#include "psputil.hxx" -#include "glyphset.hxx" - -#include "vcl/printergfx.hxx" -#include "vcl/printerjob.hxx" -#include "vcl/fontmanager.hxx" -#include "vcl/strhelper.hxx" -#include "vcl/printerinfomanager.hxx" - -#include "tools/debug.hxx" -#include "tools/color.hxx" -#include "tools/poly.hxx" - -using namespace psp ; - -static const sal_Int32 nMaxTextColumn = 80; - -GraphicsStatus::GraphicsStatus() : - mbArtItalic( false ), - mbArtBold( false ), - mnTextHeight( 0 ), - mnTextWidth( 0 ), - mfLineWidth( -1 ) -{ -} - -/* - * non graphics graphics routines - */ - -sal_Bool -PrinterGfx::Init (PrinterJob &rPrinterJob) -{ - mpPageHeader = rPrinterJob.GetCurrentPageHeader (); - mpPageBody = rPrinterJob.GetCurrentPageBody (); - mnDepth = rPrinterJob.GetDepth (); - mnPSLevel = rPrinterJob.GetPostscriptLevel (); - mbColor = rPrinterJob.IsColorPrinter (); - - mnDpi = rPrinterJob.GetResolution(); - rPrinterJob.GetScale (mfScaleX, mfScaleY); - const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( rPrinterJob.GetPrinterName() ) ); - if( mpFontSubstitutes ) - delete const_cast< ::std::hash_map* >(mpFontSubstitutes); - if( rInfo.m_bPerformFontSubstitution ) - mpFontSubstitutes = new ::std::hash_map< fontID, fontID >( rInfo.m_aFontSubstitutions ); - else - mpFontSubstitutes = NULL; - mbUploadPS42Fonts = rInfo.m_pParser ? ( rInfo.m_pParser->isType42Capable() ? sal_True : sal_False ) : sal_False; - - return sal_True; -} - -sal_Bool -PrinterGfx::Init (const JobData& rData) -{ - mpPageHeader = NULL; - mpPageBody = NULL; - mnDepth = rData.m_nColorDepth; - mnPSLevel = rData.m_nPSLevel ? rData.m_nPSLevel : (rData.m_pParser ? rData.m_pParser->getLanguageLevel() : 2 ); - mbColor = rData.m_nColorDevice ? ( rData.m_nColorDevice == -1 ? sal_False : sal_True ) : (( rData.m_pParser ? (rData.m_pParser->isColorDevice() ? sal_True : sal_False ) : sal_True ) ); - int nRes = rData.m_aContext.getRenderResolution(); - mnDpi = nRes; - mfScaleX = (double)72.0 / (double)mnDpi; - mfScaleY = (double)72.0 / (double)mnDpi; - const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( rData.m_aPrinterName ) ); - if( mpFontSubstitutes ) - delete const_cast< ::std::hash_map* >(mpFontSubstitutes); - if( rInfo.m_bPerformFontSubstitution ) - mpFontSubstitutes = new ::std::hash_map< fontID, fontID >( rInfo.m_aFontSubstitutions ); - else - mpFontSubstitutes = NULL; - mbUploadPS42Fonts = rInfo.m_pParser ? ( rInfo.m_pParser->isType42Capable() ? sal_True : sal_False ) : sal_False; - - return sal_True; -} - -void -PrinterGfx::GetResolution (sal_Int32 &rDpiX, sal_Int32 &rDpiY) const -{ - rDpiX = mnDpi; - rDpiY = mnDpi; -} - -sal_uInt16 -PrinterGfx::GetBitCount () -{ - return mnDepth; -} - -PrinterGfx::PrinterGfx() : - mpPageHeader (NULL), - mpPageBody (NULL), - mnFontID (0), - mnFallbackID (0), - mnTextAngle (0), - mbTextVertical (false), - mrFontMgr (PrintFontManager::get()), - mbCompressBmp (sal_True), - maFillColor (0xff,0,0), - maTextColor (0,0,0), - maLineColor (0, 0xff, 0), - mpFontSubstitutes( NULL ), - mbStrictSO52Compatibility( false ) -{ - maVirtualStatus.mfLineWidth = 1.0; - maVirtualStatus.mnTextHeight = 12; - maVirtualStatus.mnTextWidth = 0; - - maGraphicsStack.push_back( GraphicsStatus() ); -} - -PrinterGfx::~PrinterGfx() -{ - /* - * #95810# the original reasoning why mpFontSubstitutes is a pointer was - * that applications should release all PrinterGfx when printers change - * because they are really invalid; the corresponding printers may have - * changed their settings or even not exist anymore. - * - * Alas, this is not always done real time. So we keep a local copy of - * the font substitutes now in case of bad timing. - */ - delete const_cast< ::std::hash_map* >(mpFontSubstitutes); -} - -void -PrinterGfx::Clear() -{ - mpPageHeader = NULL; - mpPageBody = NULL; - mnFontID = 0; - maVirtualStatus = GraphicsStatus(); - maVirtualStatus.mnTextHeight = 12; - maVirtualStatus.mnTextWidth = 0; - maVirtualStatus.mfLineWidth = 1.0; - mbTextVertical = false; - maLineColor = PrinterColor(); - maFillColor = PrinterColor(); - maTextColor = PrinterColor(); - mbCompressBmp = sal_True; - mnDpi = 300; - mnDepth = 24; - mnPSLevel = 2; - mbColor = sal_True; - mnTextAngle = 0; - - maClipRegion.clear(); - maGraphicsStack.clear(); - maGraphicsStack.push_back( GraphicsStatus() ); -} - -/* - * clip region handling - */ - -void -PrinterGfx::ResetClipRegion() -{ - maClipRegion.clear(); - PSGRestore (); - PSGSave (); // get "clean" clippath -} - -void -PrinterGfx::BeginSetClipRegion( sal_uInt32 ) -{ - maClipRegion.clear(); -} - -sal_Bool -PrinterGfx::UnionClipRegion (sal_Int32 nX,sal_Int32 nY,sal_Int32 nDX,sal_Int32 nDY) -{ - if( nDX && nDY ) - maClipRegion.push_back (Rectangle(Point(nX,nY ), Size(nDX,nDY))); - return sal_True; -} - -sal_Bool -PrinterGfx::JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it, - Point& rOldPoint, sal_Int32& rColumn ) -{ - sal_Bool bSuccess = sal_False; - - std::list< Rectangle >::iterator tempit, nextit; - nextit = it; - ++nextit; - std::list< Point > leftside, rightside; - - Rectangle aLastRect( *it ); - leftside.push_back( Point( it->Left(), it->Top() ) ); - rightside.push_back( Point( it->Right()+1, it->Top() ) ); - while( nextit != maClipRegion.end() ) - { - tempit = nextit; - ++tempit; - if( nextit->Top() == aLastRect.Bottom()+1 ) - { - if( - ( nextit->Left() >= aLastRect.Left() && nextit->Left() <= aLastRect.Right() ) // left endpoint touches last rectangle - || - ( nextit->Right() >= aLastRect.Left() && nextit->Right() <= aLastRect.Right() ) // right endpoint touches last rectangle - || - ( nextit->Left() <= aLastRect.Left() && nextit->Right() >= aLastRect.Right() ) // whole line touches last rectangle - ) - { - if( aLastRect.GetHeight() > 1 || - abs( aLastRect.Left() - nextit->Left() ) > 2 || - abs( aLastRect.Right() - nextit->Right() ) > 2 - ) - { - leftside.push_back( Point( aLastRect.Left(), aLastRect.Bottom()+1 ) ); - rightside.push_back( Point( aLastRect.Right()+1, aLastRect.Bottom()+1 ) ); - } - aLastRect = *nextit; - leftside.push_back( aLastRect.TopLeft() ); - rightside.push_back( aLastRect.TopRight() ); - maClipRegion.erase( nextit ); - } - } - nextit = tempit; - } - if( leftside.size() > 1 ) - { - // push the last coordinates - leftside.push_back( Point( aLastRect.Left(), aLastRect.Bottom()+1 ) ); - rightside.push_back( Point( aLastRect.Right()+1, aLastRect.Bottom()+1 ) ); - - // cool, we can concatenate rectangles - int nDX = -65536, nDY = 65536; - int nNewDX = 0, nNewDY = 0; - - Point aLastPoint = leftside.front(); - PSBinMoveTo (aLastPoint, rOldPoint, rColumn); - leftside.pop_front(); - while( leftside.begin() != leftside.end() ) - { - Point aPoint (leftside.front()); - leftside.pop_front(); - // may have been the last one - if( leftside.begin() != leftside.end() ) - { - nNewDX = aPoint.X() - aLastPoint.X(); - nNewDY = aPoint.Y() - aLastPoint.Y(); - if( nNewDX == 0 && nDX == 0 ) - continue; - if( nDX != 0 && nNewDX != 0 && - (double)nNewDY/(double)nNewDX == (double)nDY/(double)nDX ) - continue; - } - PSBinLineTo (aPoint, rOldPoint, rColumn); - aLastPoint = aPoint; - } - - aLastPoint = rightside.back(); - nDX = -65536; - nDY = 65536; - PSBinLineTo (aLastPoint, rOldPoint, rColumn); - rightside.pop_back(); - while( rightside.begin() != rightside.end() ) - { - Point aPoint (rightside.back()); - rightside.pop_back(); - if( rightside.begin() != rightside.end() ) - { - nNewDX = aPoint.X() - aLastPoint.X(); - nNewDY = aPoint.Y() - aLastPoint.Y(); - if( nNewDX == 0 && nDX == 0 ) - continue; - if( nDX != 0 && nNewDX != 0 && - (double)nNewDY/(double)nNewDX == (double)nDY/(double)nDX ) - continue; - } - PSBinLineTo (aPoint, rOldPoint, rColumn); - } - - tempit = it; - ++tempit; - maClipRegion.erase( it ); - it = tempit; - bSuccess = sal_True; - } - return bSuccess; -} - -void -PrinterGfx::EndSetClipRegion() -{ - PSGRestore (); - PSGSave (); // get "clean" clippath - - PSBinStartPath (); - Point aOldPoint (0, 0); - sal_Int32 nColumn = 0; - - std::list< Rectangle >::iterator it = maClipRegion.begin(); - while( it != maClipRegion.end() ) - { - // try to concatenate adjacent rectangles - // first try in y direction, then in x direction - if( ! JoinVerticalClipRectangles( it, aOldPoint, nColumn ) ) - { - // failed, so it is a single rectangle - PSBinMoveTo (it->TopLeft(), aOldPoint, nColumn ); - PSBinLineTo (Point( it->Left(), it->Bottom()+1 ), aOldPoint, nColumn ); - PSBinLineTo (Point( it->Right()+1, it->Bottom()+1 ), aOldPoint, nColumn ); - PSBinLineTo (Point( it->Right()+1, it->Top() ), aOldPoint, nColumn ); - ++it; - } - } - - PSBinEndPath (); - - WritePS (mpPageBody, "closepath clip newpath\n"); - maClipRegion.clear(); -} - -/* - * draw graphic primitives - */ - -void -PrinterGfx::DrawRect (const Rectangle& rRectangle ) -{ - char pRect [128]; - sal_Int32 nChar = 0; - - nChar = psp::getValueOf (rRectangle.TopLeft().X(), pRect); - nChar += psp::appendStr (" ", pRect + nChar); - nChar += psp::getValueOf (rRectangle.TopLeft().Y(), pRect + nChar); - nChar += psp::appendStr (" ", pRect + nChar); - nChar += psp::getValueOf (rRectangle.GetWidth(), pRect + nChar); - nChar += psp::appendStr (" ", pRect + nChar); - nChar += psp::getValueOf (rRectangle.GetHeight(), pRect + nChar); - nChar += psp::appendStr (" ", pRect + nChar); - - if( maFillColor.Is() ) - { - PSSetColor (maFillColor); - PSSetColor (); - WritePS (mpPageBody, pRect, nChar); - WritePS (mpPageBody, "rectfill\n"); - } - if( maLineColor.Is() ) - { - PSSetColor (maLineColor); - PSSetColor (); - PSSetLineWidth (); - WritePS (mpPageBody, pRect, nChar); - WritePS (mpPageBody, "rectstroke\n"); - } -} - -void -PrinterGfx::DrawLine (const Point& rFrom, const Point& rTo) -{ - if( maLineColor.Is() ) - { - PSSetColor (maLineColor); - PSSetColor (); - PSSetLineWidth (); - - PSMoveTo (rFrom); - PSLineTo (rTo); - WritePS (mpPageBody, "stroke\n" ); - } -} - -void -PrinterGfx::DrawPixel (const Point& rPoint, const PrinterColor& rPixelColor) -{ - if( rPixelColor.Is() ) - { - PSSetColor (rPixelColor); - PSSetColor (); - - PSMoveTo (rPoint); - PSLineTo (Point (rPoint.X ()+1, rPoint.Y ())); - PSLineTo (Point (rPoint.X ()+1, rPoint.Y ()+1)); - PSLineTo (Point (rPoint.X (), rPoint.Y ()+1)); - WritePS (mpPageBody, "fill\n" ); - } -} - -void -PrinterGfx::DrawPolyLine (sal_uInt32 nPoints, const Point* pPath) -{ - if( maLineColor.Is() && nPoints && pPath ) - { - PSSetColor (maLineColor); - PSSetColor (); - PSSetLineWidth (); - - PSBinCurrentPath (nPoints, pPath); - - WritePS (mpPageBody, "stroke\n" ); - } -} - -void -PrinterGfx::DrawPolygon (sal_uInt32 nPoints, const Point* pPath) -{ - // premature end of operation - if (!(nPoints > 1) || (pPath == NULL) || !(maFillColor.Is() || maLineColor.Is())) - return; - - // setup closed path - Point aPoint( 0, 0 ); - sal_Int32 nColumn( 0 ); - - PSBinStartPath(); - PSBinMoveTo( pPath[0], aPoint, nColumn ); - for( unsigned int n = 1; n < nPoints; n++ ) - PSBinLineTo( pPath[n], aPoint, nColumn ); - if( pPath[0] != pPath[nPoints-1] ) - PSBinLineTo( pPath[0], aPoint, nColumn ); - PSBinEndPath(); - - // fill the polygon first, then draw the border, note that fill and - // stroke reset the currentpath - - // if fill and stroke, save the current path - if( maFillColor.Is() && maLineColor.Is()) - PSGSave(); - - if (maFillColor.Is ()) - { - PSSetColor (maFillColor); - PSSetColor (); - WritePS (mpPageBody, "eofill\n"); - } - - // restore the current path - if( maFillColor.Is() && maLineColor.Is()) - PSGRestore(); - - if (maLineColor.Is ()) - { - PSSetColor (maLineColor); - PSSetColor (); - PSSetLineWidth (); - WritePS (mpPageBody, "stroke\n"); - } -} - -void -PrinterGfx::DrawPolyPolygon (sal_uInt32 nPoly, const sal_uInt32* pSizes, const Point** pPaths ) -{ - // sanity check - if ( !nPoly || !pPaths || !(maFillColor.Is() || maLineColor.Is())) - return; - - - // setup closed path - for( unsigned int i = 0; i < nPoly; i++ ) - { - Point aPoint( 0, 0 ); - sal_Int32 nColumn( 0 ); - - PSBinStartPath(); - PSBinMoveTo( pPaths[i][0], aPoint, nColumn ); - for( unsigned int n = 1; n < pSizes[i]; n++ ) - PSBinLineTo( pPaths[i][n], aPoint, nColumn ); - if( pPaths[i][0] != pPaths[i][pSizes[i]-1] ) - PSBinLineTo( pPaths[i][0], aPoint, nColumn ); - PSBinEndPath(); - } - - // if eofill and stroke, save the current path - if( maFillColor.Is() && maLineColor.Is()) - PSGSave(); - - // first draw area - if( maFillColor.Is() ) - { - PSSetColor (maFillColor); - PSSetColor (); - WritePS (mpPageBody, "eofill\n"); - } - - // restore the current path - if( maFillColor.Is() && maLineColor.Is()) - PSGRestore(); - - // now draw outlines - if( maLineColor.Is() ) - { - PSSetColor (maLineColor); - PSSetColor (); - PSSetLineWidth (); - WritePS (mpPageBody, "stroke\n"); - } -} - -/* - * Bezier Polygon Drawing methods. - */ - -void -PrinterGfx::DrawPolyLineBezier (sal_uInt32 nPoints, const Point* pPath, const BYTE* pFlgAry) -{ - const sal_uInt32 nBezString = 1024; - sal_Char pString[nBezString]; - - if ( nPoints > 1 && maLineColor.Is() && pPath ) - { - PSSetColor (maLineColor); - PSSetColor (); - PSSetLineWidth (); - - snprintf(pString, nBezString, "%li %li moveto\n", pPath[0].X(), pPath[0].Y()); - WritePS(mpPageBody, pString); - - // Handle the drawing of mixed lines mixed with curves - // - a normal point followed by a normal point is a line - // - a normal point followed by 2 control points and a normal point is a curve - for (unsigned int i=1; i= nPoints) - return; //Error: wrong sequence of contol/normal points somehow - if ((pFlgAry[i] == POLY_CONTROL) && (pFlgAry[i+1] == POLY_CONTROL) && - (pFlgAry[i+2] != POLY_CONTROL)) - { - snprintf(pString, nBezString, "%li %li %li %li %li %li curveto\n", - pPath[i].X(), pPath[i].Y(), - pPath[i+1].X(), pPath[i+1].Y(), - pPath[i+2].X(), pPath[i+2].Y()); - } - else - { - DBG_ERROR( "PrinterGfx::DrawPolyLineBezier: Strange output" ); - } - i+=3; - } - WritePS(mpPageBody, pString); - } - - // now draw outlines - WritePS (mpPageBody, "stroke\n"); - } -} - -void -PrinterGfx::DrawPolygonBezier (sal_uInt32 nPoints, const Point* pPath, const BYTE* pFlgAry) -{ - const sal_uInt32 nBezString = 1024; - sal_Char pString[nBezString]; - // premature end of operation - if (!(nPoints > 1) || (pPath == NULL) || !(maFillColor.Is() || maLineColor.Is())) - return; - - snprintf(pString, nBezString, "%li %li moveto\n", pPath[0].X(), pPath[0].Y()); - WritePS(mpPageBody, pString); //Move to the starting point for the PolyPoygon - for (unsigned int i=1; i < nPoints;) - { - if (pFlgAry[i] != POLY_CONTROL) - { - snprintf(pString, nBezString, "%li %li lineto\n", pPath[i].X(), pPath[i].Y()); - WritePS(mpPageBody, pString); - i++; - } - else - { - if (i+2 >= nPoints) - return; //Error: wrong sequence of contol/normal points somehow - if ((pFlgAry[i] == POLY_CONTROL) && (pFlgAry[i+1] == POLY_CONTROL) && - (pFlgAry[i+2] != POLY_CONTROL)) - { - snprintf(pString, nBezString, "%li %li %li %li %li %li curveto\n", - pPath[i].X(), pPath[i].Y(), - pPath[i+1].X(), pPath[i+1].Y(), - pPath[i+2].X(), pPath[i+2].Y()); - WritePS(mpPageBody, pString); - } - else - { - DBG_ERROR( "PrinterGfx::DrawPolygonBezier: Strange output" ); - } - i+=3; - } - } - - // if fill and stroke, save the current path - if( maFillColor.Is() && maLineColor.Is()) - PSGSave(); - - if (maFillColor.Is ()) - { - PSSetColor (maFillColor); - PSSetColor (); - WritePS (mpPageBody, "eofill\n"); - } - - // restore the current path - if( maFillColor.Is() && maLineColor.Is()) - PSGRestore(); -} - -void -PrinterGfx::DrawPolyPolygonBezier (sal_uInt32 nPoly, const sal_uInt32 * pPoints, const Point* const * pPtAry, const BYTE* const* pFlgAry) -{ - const sal_uInt32 nBezString = 1024; - sal_Char pString[nBezString]; - if ( !nPoly || !pPtAry || !pPoints || !(maFillColor.Is() || maLineColor.Is())) - return; - - - for (unsigned int i=0; i= nPoints) - break; //Error: wrong sequence of contol/normal points somehow - if ((pFlgAry[i][j] == POLY_CONTROL) && (pFlgAry[i][j+1] == POLY_CONTROL) && (pFlgAry[i][j+2] != POLY_CONTROL)) - { - snprintf(pString, nBezString, "%li %li %li %li %li %li curveto\n", - pPtAry[i][j].X(), pPtAry[i][j].Y(), - pPtAry[i][j+1].X(), pPtAry[i][j+1].Y(), - pPtAry[i][j+2].X(), pPtAry[i][j+2].Y()); - WritePS(mpPageBody, pString); - } - else - { - DBG_ERROR( "PrinterGfx::DrawPolyPolygonBezier: Strange output" ); - } - j+=3; - } - } - } - - // if fill and stroke, save the current path - if( maFillColor.Is() && maLineColor.Is()) - PSGSave(); - - if (maFillColor.Is ()) - { - PSSetColor (maFillColor); - PSSetColor (); - WritePS (mpPageBody, "eofill\n"); - } - - // restore the current path - if( maFillColor.Is() && maLineColor.Is()) - PSGRestore(); -} - - -/* - * postscript generating routines - */ -void -PrinterGfx::PSGSave () -{ - WritePS (mpPageBody, "gsave\n" ); - GraphicsStatus aNewState; - if( maGraphicsStack.begin() != maGraphicsStack.end() ) - aNewState = maGraphicsStack.front(); - maGraphicsStack.push_front( aNewState ); -} - -void -PrinterGfx::PSGRestore () -{ - WritePS (mpPageBody, "grestore\n" ); - if( maGraphicsStack.begin() == maGraphicsStack.end() ) - WritePS (mpPageBody, "Error: too many grestores\n" ); - else - maGraphicsStack.pop_front(); -} - -void -PrinterGfx::PSSetLineWidth () -{ - if( currentState().mfLineWidth != maVirtualStatus.mfLineWidth ) - { - char pBuffer[128]; - sal_Int32 nChar = 0; - - currentState().mfLineWidth = maVirtualStatus.mfLineWidth; - nChar = psp::getValueOfDouble (pBuffer, maVirtualStatus.mfLineWidth, 5); - nChar += psp::appendStr (" setlinewidth\n", pBuffer + nChar); - WritePS (mpPageBody, pBuffer, nChar); - } -} - -void -PrinterGfx::PSSetColor () -{ - PrinterColor& rColor( maVirtualStatus.maColor ); - - if( currentState().maColor != rColor ) - { - currentState().maColor = rColor; - - char pBuffer[128]; - sal_Int32 nChar = 0; - - if( mbColor ) - { - nChar = psp::getValueOfDouble (pBuffer, - (double)rColor.GetRed() / 255.0, 5); - nChar += psp::appendStr (" ", pBuffer + nChar); - nChar += psp::getValueOfDouble (pBuffer + nChar, - (double)rColor.GetGreen() / 255.0, 5); - nChar += psp::appendStr (" ", pBuffer + nChar); - nChar += psp::getValueOfDouble (pBuffer + nChar, - (double)rColor.GetBlue() / 255.0, 5); - nChar += psp::appendStr (" setrgbcolor\n", pBuffer + nChar ); - } - else - { - Color aColor( rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue() ); - sal_uInt8 nCol = aColor.GetLuminance(); - nChar = psp::getValueOfDouble( pBuffer, (double)nCol / 255.0, 5 ); - nChar += psp::appendStr( " setgray\n", pBuffer + nChar ); - } - - WritePS (mpPageBody, pBuffer, nChar); - } -} - -void -PrinterGfx::PSSetFont () -{ - GraphicsStatus& rCurrent( currentState() ); - if( maVirtualStatus.maFont != rCurrent.maFont || - maVirtualStatus.mnTextHeight != rCurrent.mnTextHeight || - maVirtualStatus.maEncoding != rCurrent.maEncoding || - maVirtualStatus.mnTextWidth != rCurrent.mnTextWidth || - maVirtualStatus.mbArtBold != rCurrent.mbArtBold || - maVirtualStatus.mbArtItalic != rCurrent.mbArtItalic - ) - { - rCurrent.maFont = maVirtualStatus.maFont; - rCurrent.maEncoding = maVirtualStatus.maEncoding; - rCurrent.mnTextWidth = maVirtualStatus.mnTextWidth; - rCurrent.mnTextHeight = maVirtualStatus.mnTextHeight; - rCurrent.mbArtItalic = maVirtualStatus.mbArtItalic; - rCurrent.mbArtBold = maVirtualStatus.mbArtBold; - - sal_Int32 nTextHeight = rCurrent.mnTextHeight; - sal_Int32 nTextWidth = rCurrent.mnTextWidth ? rCurrent.mnTextWidth - : rCurrent.mnTextHeight; - - sal_Char pSetFont [256]; - sal_Int32 nChar = 0; - - // postscript based fonts need reencoding - if ( ( rCurrent.maEncoding == RTL_TEXTENCODING_MS_1252) - || ( rCurrent.maEncoding == RTL_TEXTENCODING_ISO_8859_1) - || ( rCurrent.maEncoding >= RTL_TEXTENCODING_USER_START - && rCurrent.maEncoding <= RTL_TEXTENCODING_USER_END) - ) - { - rtl::OString aReencodedFont = - psp::GlyphSet::GetReencodedFontName (rCurrent.maEncoding, - rCurrent.maFont); - - nChar += psp::appendStr ("(", pSetFont + nChar); - nChar += psp::appendStr (aReencodedFont.getStr(), - pSetFont + nChar); - nChar += psp::appendStr (") cvn findfont ", - pSetFont + nChar); - } - else - // tt based fonts mustn't reencode, the encoding is implied by the fontname - // same for symbol type1 fonts, dont try to touch them - { - nChar += psp::appendStr ("(", pSetFont + nChar); - nChar += psp::appendStr (rCurrent.maFont.getStr(), - pSetFont + nChar); - nChar += psp::appendStr (") cvn findfont ", - pSetFont + nChar); - } - - if( ! rCurrent.mbArtItalic ) - { - nChar += psp::getValueOf (nTextWidth, pSetFont + nChar); - nChar += psp::appendStr (" ", pSetFont + nChar); - nChar += psp::getValueOf (-nTextHeight, pSetFont + nChar); - nChar += psp::appendStr (" matrix scale makefont setfont\n", pSetFont + nChar); - } - else // skew 15 degrees to right - { - nChar += psp::appendStr ( " [", pSetFont + nChar); - nChar += psp::getValueOf (nTextWidth, pSetFont + nChar); - nChar += psp::appendStr (" 0 ", pSetFont + nChar); - nChar += psp::getValueOfDouble (pSetFont + nChar, 0.27*(double)nTextWidth, 3 ); - nChar += psp::appendStr ( " ", pSetFont + nChar); - nChar += psp::getValueOf (-nTextHeight, pSetFont + nChar); - - nChar += psp::appendStr (" 0 0] makefont setfont\n", pSetFont + nChar); - } - - WritePS (mpPageBody, pSetFont); - } -} - -void -PrinterGfx::PSRotate (sal_Int32 nAngle) -{ - sal_Int32 nPostScriptAngle = -nAngle; - while( nPostScriptAngle < 0 ) - nPostScriptAngle += 3600; - - if (nPostScriptAngle == 0) - return; - - sal_Int32 nFullAngle = nPostScriptAngle / 10; - sal_Int32 nTenthAngle = nPostScriptAngle % 10; - - sal_Char pRotate [48]; - sal_Int32 nChar = 0; - - nChar = psp::getValueOf (nFullAngle, pRotate); - nChar += psp::appendStr (".", pRotate + nChar); - nChar += psp::getValueOf (nTenthAngle, pRotate + nChar); - nChar += psp::appendStr (" rotate\n", pRotate + nChar); - - WritePS (mpPageBody, pRotate); -} - -void -PrinterGfx::PSPointOp (const Point& rPoint, const sal_Char* pOperator) -{ - sal_Char pPSCommand [48]; - sal_Int32 nChar = 0; - - nChar = psp::getValueOf (rPoint.X(), pPSCommand); - nChar += psp::appendStr (" ", pPSCommand + nChar); - nChar += psp::getValueOf (rPoint.Y(), pPSCommand + nChar); - nChar += psp::appendStr (" ", pPSCommand + nChar); - nChar += psp::appendStr (pOperator, pPSCommand + nChar); - nChar += psp::appendStr ("\n", pPSCommand + nChar); - - DBG_ASSERT (nChar < 48, "Buffer overflow in PSPointOp"); - - WritePS (mpPageBody, pPSCommand); -} - -void -PrinterGfx::PSTranslate (const Point& rPoint) -{ - PSPointOp (rPoint, "translate"); -} - -void -PrinterGfx::PSMoveTo (const Point& rPoint) -{ - PSPointOp (rPoint, "moveto"); -} - -void -PrinterGfx::PSLineTo (const Point& rPoint) -{ - PSPointOp (rPoint, "lineto"); -} - -void -PrinterGfx::PSRMoveTo (sal_Int32 nDx, sal_Int32 nDy) -{ - Point aPoint(nDx, nDy); - PSPointOp (aPoint, "rmoveto"); -} - -/* get a compressed representation of the path information */ - -#define DEBUG_BINPATH 0 - -void -PrinterGfx::PSBinLineTo (const Point& rCurrent, Point& rOld, sal_Int32& nColumn) -{ -#if (DEBUG_BINPATH == 1) - PSLineTo (rCurrent); -#else - PSBinPath (rCurrent, rOld, lineto, nColumn); -#endif -} - -void -PrinterGfx::PSBinMoveTo (const Point& rCurrent, Point& rOld, sal_Int32& nColumn) -{ -#if (DEBUG_BINPATH == 1) - PSMoveTo (rCurrent); -#else - PSBinPath (rCurrent, rOld, moveto, nColumn); -#endif -} - -void -PrinterGfx::PSBinStartPath () -{ -#if (DEBUG_BINPATH == 1) - WritePS (mpPageBody, "% PSBinStartPath\n"); -#else - WritePS (mpPageBody, "readpath\n" ); -#endif -} - -void -PrinterGfx::PSBinEndPath () -{ -#if (DEBUG_BINPATH == 1) - WritePS (mpPageBody, "% PSBinEndPath\n"); -#else - WritePS (mpPageBody, "~\n"); -#endif -} - -void -PrinterGfx::PSBinCurrentPath (sal_uInt32 nPoints, const Point* pPath) -{ - // create the path - Point aPoint (0, 0); - sal_Int32 nColumn = 0; - - PSBinStartPath (); - PSBinMoveTo (*pPath, aPoint, nColumn); - for (unsigned int i = 1; i < nPoints; i++) - PSBinLineTo (pPath[i], aPoint, nColumn); - PSBinEndPath (); -} - -void -PrinterGfx::PSBinPath (const Point& rCurrent, Point& rOld, - pspath_t eType, sal_Int32& nColumn) -{ - sal_Char pPath[48]; - sal_Int32 nChar; - - // create the hex representation of the dx and dy path shift, store the field - // width as it is needed for the building the command - sal_Int32 nXPrec = getAlignedHexValueOf (rCurrent.X() - rOld.X(), pPath + 1); - sal_Int32 nYPrec = getAlignedHexValueOf (rCurrent.Y() - rOld.Y(), pPath + 1 + nXPrec); - pPath [ 1 + nXPrec + nYPrec ] = 0; - - // build the command, it is a char with bit represention 000cxxyy - // c represents the char, xx and yy repr. the field width of the dx and dy shift, - // dx and dy represent the number of bytes to read after the opcode - sal_Char cCmd = (eType == lineto ? (sal_Char)0x00 : (sal_Char)0x10); - switch (nYPrec) - { - case 2: break; - case 4: cCmd |= 0x01; break; - case 6: cCmd |= 0x02; break; - case 8: cCmd |= 0x03; break; - default: DBG_ERROR ("invalid x precision in binary path"); - } - switch (nXPrec) - { - case 2: break; - case 4: cCmd |= 0x04; break; - case 6: cCmd |= 0x08; break; - case 8: cCmd |= 0x0c; break; - default: DBG_ERROR ("invalid y precision in binary path"); - } - cCmd += 'A'; - pPath[0] = cCmd; - - // write the command to file, - // line breaking at column nMaxTextColumn (80) - nChar = 1 + nXPrec + nYPrec; - if ((nColumn + nChar) > nMaxTextColumn) - { - sal_Int32 nSegment = nMaxTextColumn - nColumn; - - WritePS (mpPageBody, pPath, nSegment); - WritePS (mpPageBody, "\n", 1); - WritePS (mpPageBody, pPath + nSegment, nChar - nSegment); - - nColumn = nChar - nSegment; - } - else - { - WritePS (mpPageBody, pPath, nChar); - - nColumn += nChar; - } - - rOld = rCurrent; -} - -void -PrinterGfx::PSScale (double fScaleX, double fScaleY) -{ - sal_Char pScale [48]; - sal_Int32 nChar = 0; - - nChar = psp::getValueOfDouble (pScale, fScaleX, 5); - nChar += psp::appendStr (" ", pScale + nChar); - nChar += psp::getValueOfDouble (pScale + nChar, fScaleY, 5); - nChar += psp::appendStr (" scale\n", pScale + nChar); - - WritePS (mpPageBody, pScale); -} - -/* psshowtext helper routines: draw an hex string for show/xshow */ -void -PrinterGfx::PSHexString (const sal_uChar* pString, sal_Int16 nLen) -{ - sal_Char pHexString [128]; - sal_Int32 nChar = 0; - - nChar = psp::appendStr ("<", pHexString); - for (int i = 0; i < nLen; i++) - { - if (nChar >= (nMaxTextColumn - 1)) - { - nChar += psp::appendStr ("\n", pHexString + nChar); - WritePS (mpPageBody, pHexString, nChar); - nChar = 0; - } - nChar += psp::getHexValueOf ((sal_Int32)pString[i], pHexString + nChar); - } - - nChar += psp::appendStr (">\n", pHexString + nChar); - WritePS (mpPageBody, pHexString, nChar); -} - -/* psshowtext helper routines: draw an array for xshow ps operator */ -void -PrinterGfx::PSDeltaArray (const sal_Int32 *pArray, sal_Int16 nEntries) -{ - sal_Char pPSArray [128]; - sal_Int32 nChar = 0; - - nChar = psp::appendStr ("[", pPSArray + nChar); - nChar += psp::getValueOf (pArray[0], pPSArray + nChar); - - for (int i = 1; i < nEntries; i++) - { - if (nChar >= (nMaxTextColumn - 1)) - { - nChar += psp::appendStr ("\n", pPSArray + nChar); - WritePS (mpPageBody, pPSArray, nChar); - nChar = 0; - } - - nChar += psp::appendStr (" ", pPSArray + nChar); - nChar += psp::getValueOf (pArray[i] - pArray[i-1], pPSArray + nChar); - } - - nChar += psp::appendStr (" 0]\n", pPSArray + nChar); - WritePS (mpPageBody, pPSArray); -} - -/* the DrawText equivalent, pDeltaArray may be NULL. For Type1 fonts or single byte - * fonts in general nBytes and nGlyphs is the same. For printer resident Composite - * fonts it may be different (these fonts may be SJIS encoded for example) */ -void -PrinterGfx::PSShowText (const sal_uChar* pStr, sal_Int16 nGlyphs, sal_Int16 nBytes, - const sal_Int32* pDeltaArray) -{ - PSSetColor (maTextColor); - PSSetColor (); - PSSetFont (); - // rotate the user coordinate system - if (mnTextAngle != 0) - { - PSGSave (); - PSRotate (mnTextAngle); - } - - sal_Char pBuffer[256]; - if( maVirtualStatus.mbArtBold ) - { - sal_Int32 nLW = maVirtualStatus.mnTextWidth; - if( nLW == 0 ) - nLW = maVirtualStatus.mnTextHeight; - else - nLW = nLW < maVirtualStatus.mnTextHeight ? nLW : maVirtualStatus.mnTextHeight; - psp::getValueOfDouble( pBuffer, (double)nLW / 30.0 ); - } - // dispatch to the drawing method - if (pDeltaArray == NULL) - { - PSHexString (pStr, nBytes); - - if( maVirtualStatus.mbArtBold ) - { - WritePS( mpPageBody, pBuffer ); - WritePS( mpPageBody, " bshow\n" ); - } - else - WritePS (mpPageBody, "show\n"); - } - else - { - PSHexString (pStr, nBytes); - PSDeltaArray (pDeltaArray, nGlyphs - 1); - if( maVirtualStatus.mbArtBold ) - { - WritePS( mpPageBody, pBuffer ); - WritePS( mpPageBody, " bxshow\n" ); - } - else - WritePS (mpPageBody, "xshow\n"); - } - - // restore the user coordinate system - if (mnTextAngle != 0) - PSGRestore (); -} - -void -PrinterGfx::PSComment( const sal_Char* pComment ) -{ - const sal_Char* pLast = pComment; - while( pComment && *pComment ) - { - while( *pComment && *pComment != '\n' && *pComment != '\r' ) - pComment++; - if( pComment - pLast > 1 ) - { - WritePS( mpPageBody, "% ", 2 ); - WritePS( mpPageBody, pLast, pComment - pLast ); - WritePS( mpPageBody, "\n", 1 ); - } - if( *pComment ) - pLast = ++pComment; - } -} - -sal_Bool -PrinterGfx::DrawEPS( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize ) -{ - if( nSize == 0 ) - return sal_True; - if( ! mpPageBody ) - return sal_False; - - sal_Bool bSuccess = sal_False; - - // first search the BoundingBox of the EPS data - SvMemoryStream aStream( pPtr, nSize, STREAM_READ ); - aStream.Seek( STREAM_SEEK_TO_BEGIN ); - ByteString aLine; - - ByteString aDocTitle; - double fLeft = 0, fRight = 0, fTop = 0, fBottom = 0; - bool bEndComments = false; - while( ! aStream.IsEof() - && ( ( fLeft == 0 && fRight == 0 && fTop == 0 && fBottom == 0 ) || - ( aDocTitle.Len() == 0 && bEndComments == false ) ) - ) - { - aStream.ReadLine( aLine ); - if( aLine.Len() > 1 && aLine.GetChar( 0 ) == '%' ) - { - char cChar = aLine.GetChar(1); - if( cChar == '%' ) - { - if( aLine.CompareIgnoreCaseToAscii( "%%BoundingBox:", 14 ) == COMPARE_EQUAL ) - { - aLine = WhitespaceToSpace( aLine.GetToken( 1, ':' ) ); - if( aLine.Len() && aLine.Search( "atend" ) == STRING_NOTFOUND ) - { - fLeft = StringToDouble( GetCommandLineToken( 0, aLine ) ); - fBottom = StringToDouble( GetCommandLineToken( 1, aLine ) ); - fRight = StringToDouble( GetCommandLineToken( 2, aLine ) ); - fTop = StringToDouble( GetCommandLineToken( 3, aLine ) ); - } - } - else if( aLine.CompareIgnoreCaseToAscii( "%%Title:", 8 ) == COMPARE_EQUAL ) - aDocTitle = WhitespaceToSpace( aLine.Copy( 8 ) ); - else if( aLine.CompareIgnoreCaseToAscii( "%%EndComments", 13 ) == COMPARE_EQUAL ) - bEndComments = true; - } - else if( cChar == ' ' || cChar == '\t' || cChar == '\r' || cChar == '\n' ) - bEndComments = true; - } - else - bEndComments = true; - } - - static sal_uInt16 nEps = 0; - if( ! aDocTitle.Len() ) - aDocTitle = ByteString::CreateFromInt32( (sal_Int32)(nEps++) ); - - if( fLeft != fRight && fTop != fBottom ) - { - double fScaleX = (double)rBoundingBox.GetWidth()/(fRight-fLeft); - double fScaleY = -(double)rBoundingBox.GetHeight()/(fTop-fBottom); - Point aTranslatePoint( (int)(rBoundingBox.Left()-fLeft*fScaleX), - (int)(rBoundingBox.Bottom()+1-fBottom*fScaleY) ); - // prepare EPS - WritePS( mpPageBody, - "/b4_Inc_state save def\n" - "/dict_count countdictstack def\n" - "/op_count count 1 sub def\n" - "userdict begin\n" - "/showpage {} def\n" - "0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin\n" - "10 setmiterlimit [] 0 setdash newpath\n" - "/languagelevel where\n" - "{pop languagelevel\n" - "1 ne\n" - " {false setstrokeadjust false setoverprint\n" - " } if\n" - "}if\n" ); - // set up clip path and scale - BeginSetClipRegion( 1 ); - UnionClipRegion( rBoundingBox.Left(), rBoundingBox.Top(), rBoundingBox.GetWidth(), rBoundingBox.GetHeight() ); - EndSetClipRegion(); - PSTranslate( aTranslatePoint ); - PSScale( fScaleX, fScaleY ); - - // DSC requires BeginDocument - WritePS( mpPageBody, "%%BeginDocument: " ); - WritePS( mpPageBody, aDocTitle ); - WritePS( mpPageBody, "\n" ); - - // write the EPS data - sal_uInt64 nOutLength; - mpPageBody->write( pPtr, nSize, nOutLength ); - bSuccess = nOutLength == nSize; - - // corresponding EndDocument - if( ((char*)pPtr)[ nSize-1 ] != '\n' ) - WritePS( mpPageBody, "\n" ); - WritePS( mpPageBody, "%%EndDocument\n" ); - - // clean up EPS - WritePS( mpPageBody, - "count op_count sub {pop} repeat\n" - "countdictstack dict_count sub {end} repeat\n" - "b4_Inc_state restore\n" ); - } - return bSuccess; -} diff --git a/vcl/unx/source/printergfx/glyphset.cxx b/vcl/unx/source/printergfx/glyphset.cxx deleted file mode 100644 index 8885a6b42c1e..000000000000 --- a/vcl/unx/source/printergfx/glyphset.cxx +++ /dev/null @@ -1,942 +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_vcl.hxx" - -#include "glyphset.hxx" -#include "psputil.hxx" - -#include "sft.hxx" - -#include "vcl/printergfx.hxx" -#include "vcl/fontmanager.hxx" -#include "vcl/fontsubset.hxx" - -#include "osl/thread.h" - -#include "sal/alloca.h" - -#include "rtl/ustring.hxx" -#include "rtl/strbuf.hxx" - -#include -#include -#include - -using namespace vcl; -using namespace psp; -using namespace rtl; - -GlyphSet::GlyphSet () - : mnFontID (-1), - mbVertical (0), - mbUseFontEncoding (false) -{} - -GlyphSet::GlyphSet (sal_Int32 nFontID, sal_Bool bVertical) - : mnFontID (nFontID), - mbVertical (bVertical) -{ - PrintFontManager &rMgr = PrintFontManager::get(); - meBaseType = rMgr.getFontType (mnFontID); - maBaseName = OUStringToOString (rMgr.getPSName(mnFontID), - RTL_TEXTENCODING_ASCII_US); - mnBaseEncoding = rMgr.getFontEncoding(mnFontID); - mbUseFontEncoding = rMgr.getUseOnlyFontEncoding(mnFontID); -} - -GlyphSet::~GlyphSet () -{ - /* FIXME delete the glyphlist ??? */ -} - -sal_Int32 -GlyphSet::GetFontID () -{ - return mnFontID; -} - -fonttype::type -GlyphSet::GetFontType () -{ - return meBaseType; -} - -sal_Bool -GlyphSet::IsVertical () -{ - return mbVertical; -} - -sal_Bool -GlyphSet::SetFont (sal_Int32 nFontID, sal_Bool bVertical) -{ - if (mnFontID != -1) - return sal_False; - - mnFontID = nFontID; - mbVertical = bVertical; - - PrintFontManager &rMgr = PrintFontManager::get(); - meBaseType = rMgr.getFontType (mnFontID); - maBaseName = OUStringToOString (rMgr.getPSName(mnFontID), - RTL_TEXTENCODING_ASCII_US); - mnBaseEncoding = rMgr.getFontEncoding(mnFontID); - mbUseFontEncoding = rMgr.getUseOnlyFontEncoding(mnFontID); - - return sal_True; -} - -sal_Bool -GlyphSet::GetCharID ( - sal_Unicode nChar, - sal_uChar* nOutGlyphID, - sal_Int32* nOutGlyphSetID - ) -{ - return LookupCharID (nChar, nOutGlyphID, nOutGlyphSetID) - || AddCharID (nChar, nOutGlyphID, nOutGlyphSetID); -} - -sal_Bool -GlyphSet::GetGlyphID ( - sal_uInt32 nGlyph, - sal_Unicode nUnicode, - sal_uChar* nOutGlyphID, - sal_Int32* nOutGlyphSetID - ) -{ - return LookupGlyphID (nGlyph, nOutGlyphID, nOutGlyphSetID) - || AddGlyphID (nGlyph, nUnicode, nOutGlyphID, nOutGlyphSetID); -} - -sal_Bool -GlyphSet::LookupCharID ( - sal_Unicode nChar, - sal_uChar* nOutGlyphID, - sal_Int32* nOutGlyphSetID - ) -{ - char_list_t::iterator aGlyphSet; - sal_Int32 nGlyphSetID; - - // loop thru all the font subsets - for (aGlyphSet = maCharList.begin(), nGlyphSetID = 1; - aGlyphSet != maCharList.end(); - ++aGlyphSet, nGlyphSetID++) - { - // check every subset if it contains the queried unicode char - char_map_t::const_iterator aGlyph = (*aGlyphSet).find (nChar); - if (aGlyph != (*aGlyphSet).end()) - { - // success: found the unicode char, return the glyphid and the glyphsetid - *nOutGlyphSetID = nGlyphSetID; - *nOutGlyphID = (*aGlyph).second; - return sal_True; - } - } - - *nOutGlyphSetID = -1; - *nOutGlyphID = 0; - return sal_False; -} - -sal_Bool -GlyphSet::LookupGlyphID ( - sal_uInt32 nGlyph, - sal_uChar* nOutGlyphID, - sal_Int32* nOutGlyphSetID - ) -{ - glyph_list_t::iterator aGlyphSet; - sal_Int32 nGlyphSetID; - - // loop thru all the font subsets - for (aGlyphSet = maGlyphList.begin(), nGlyphSetID = 1; - aGlyphSet != maGlyphList.end(); - ++aGlyphSet, nGlyphSetID++) - { - // check every subset if it contains the queried unicode char - glyph_map_t::const_iterator aGlyph = (*aGlyphSet).find (nGlyph); - if (aGlyph != (*aGlyphSet).end()) - { - // success: found the glyph id, return the mapped glyphid and the glyphsetid - *nOutGlyphSetID = nGlyphSetID; - *nOutGlyphID = (*aGlyph).second; - return sal_True; - } - } - - *nOutGlyphSetID = -1; - *nOutGlyphID = 0; - return sal_False; -} - -sal_uChar -GlyphSet::GetAnsiMapping (sal_Unicode nUnicodeChar) -{ - static rtl_UnicodeToTextConverter aConverter = - rtl_createUnicodeToTextConverter(RTL_TEXTENCODING_MS_1252); - static rtl_UnicodeToTextContext aContext = - rtl_createUnicodeToTextContext( aConverter ); - - sal_Char nAnsiChar; - sal_uInt32 nCvtInfo; - sal_Size nCvtChars; - const sal_uInt32 nCvtFlags = RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR - | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR; - - sal_Size nSize = rtl_convertUnicodeToText( aConverter, aContext, - &nUnicodeChar, 1, &nAnsiChar, 1, - nCvtFlags, &nCvtInfo, &nCvtChars ); - - return nSize == 1 ? (sal_uChar)nAnsiChar : (sal_uChar)0; -} - -sal_uChar -GlyphSet::GetSymbolMapping (sal_Unicode nUnicodeChar) -{ - if (0x0000 < nUnicodeChar && nUnicodeChar < 0x0100) - return (sal_uChar)nUnicodeChar; - if (0xf000 < nUnicodeChar && nUnicodeChar < 0xf100) - return (sal_uChar)nUnicodeChar; - - return 0; -} - -void -GlyphSet::AddNotdef (char_map_t &rCharMap) -{ - if (rCharMap.size() == 0) - rCharMap[0] = 0; -} - -void -GlyphSet::AddNotdef (glyph_map_t &rGlyphMap) -{ - if (rGlyphMap.size() == 0) - rGlyphMap[0] = 0; -} -sal_Bool -GlyphSet::AddCharID ( - sal_Unicode nChar, - sal_uChar* nOutGlyphID, - sal_Int32* nOutGlyphSetID - ) -{ - sal_uChar nMappedChar; - - // XXX important: avoid to reencode type1 symbol fonts - if (mnBaseEncoding == RTL_TEXTENCODING_SYMBOL) - nMappedChar = GetSymbolMapping (nChar); - else - nMappedChar = GetAnsiMapping (nChar); - - // create an empty glyphmap that is reserved for iso1252 encoded glyphs - // (or -- unencoded -- symbol glyphs) and a second map that takes any other - if (maCharList.empty()) - { - char_map_t aMap, aMapp; - - maCharList.push_back (aMap); - maCharList.push_back (aMapp); - } - // if the last map is full, create a new one - if ((!nMappedChar) && (maCharList.back().size() == 255)) - { - char_map_t aMap; - maCharList.push_back (aMap); - } - - // insert a new glyph in the font subset - if (nMappedChar) - { - // always put iso1252 chars into the first map, map them on itself - char_map_t& aGlyphSet = maCharList.front(); - AddNotdef (aGlyphSet); - - aGlyphSet [nChar] = nMappedChar; - *nOutGlyphSetID = 1; - *nOutGlyphID = nMappedChar; - } - else - { - // other chars are just appended to the list - char_map_t& aGlyphSet = maCharList.back(); - AddNotdef (aGlyphSet); - - int nSize = aGlyphSet.size(); - - aGlyphSet [nChar] = nSize; - *nOutGlyphSetID = maCharList.size(); - *nOutGlyphID = aGlyphSet [nChar]; - } - - return sal_True; -} - -sal_Bool -GlyphSet::AddGlyphID ( - sal_uInt32 nGlyph, - sal_Unicode nUnicode, - sal_uChar* nOutGlyphID, - sal_Int32* nOutGlyphSetID - ) -{ - sal_uChar nMappedChar; - - // XXX important: avoid to reencode type1 symbol fonts - if (mnBaseEncoding == RTL_TEXTENCODING_SYMBOL) - nMappedChar = GetSymbolMapping (nUnicode); - else - nMappedChar = GetAnsiMapping (nUnicode); - - // create an empty glyphmap that is reserved for iso1252 encoded glyphs - // (or -- unencoded -- symbol glyphs) and a second map that takes any other - if (maGlyphList.empty()) - { - glyph_map_t aMap, aMapp; - - maGlyphList.push_back (aMap); - maGlyphList.push_back (aMapp); - } - // if the last map is full, create a new one - if ((!nMappedChar) && (maGlyphList.back().size() == 255)) - { - glyph_map_t aMap; - maGlyphList.push_back (aMap); - } - - // insert a new glyph in the font subset - if (nMappedChar) - { - // always put iso1252 chars into the first map, map them on itself - glyph_map_t& aGlyphSet = maGlyphList.front(); - AddNotdef (aGlyphSet); - - aGlyphSet [nGlyph] = nMappedChar; - *nOutGlyphSetID = 1; - *nOutGlyphID = nMappedChar; - } - else - { - // other chars are just appended to the list - glyph_map_t& aGlyphSet = maGlyphList.back(); - AddNotdef (aGlyphSet); - - int nSize = aGlyphSet.size(); - - aGlyphSet [nGlyph] = nSize; - *nOutGlyphSetID = maGlyphList.size(); - *nOutGlyphID = aGlyphSet [nGlyph]; - } - - return sal_True; -} - -OString -GlyphSet::GetCharSetName (sal_Int32 nGlyphSetID) -{ - if (meBaseType == fonttype::TrueType) - { - OStringBuffer aSetName( maBaseName.getLength() + 32 ); - aSetName.append( maBaseName ); - aSetName.append( "FID" ); - aSetName.append( mnFontID ); - aSetName.append( mbVertical ? "VCSet" : "HCSet" ); - aSetName.append( nGlyphSetID ); - return aSetName.makeStringAndClear(); - } - else - /* (meBaseType == fonttype::Type1 || meBaseType == fonttype::Builtin) */ - { - return maBaseName; - } -} - -OString -GlyphSet::GetGlyphSetName (sal_Int32 nGlyphSetID) -{ - if (meBaseType == fonttype::TrueType) - { - OStringBuffer aSetName( maBaseName.getLength() + 32 ); - aSetName.append( maBaseName ); - aSetName.append( "FID" ); - aSetName.append( mnFontID ); - aSetName.append( mbVertical ? "VGSet" : "HGSet" ); - aSetName.append( nGlyphSetID ); - return aSetName.makeStringAndClear(); - } - else - /* (meBaseType == fonttype::Type1 || meBaseType == fonttype::Builtin) */ - { - return maBaseName; - } -} - -sal_Int32 -GlyphSet::GetGlyphSetEncoding (sal_Int32 nGlyphSetID) -{ - if (meBaseType == fonttype::TrueType) - return RTL_TEXTENCODING_DONTKNOW; - else - { - /* (meBaseType == fonttype::Type1 || meBaseType == fonttype::Builtin) */ - if (mnBaseEncoding == RTL_TEXTENCODING_SYMBOL) - return RTL_TEXTENCODING_SYMBOL; - else - return nGlyphSetID == 1 ? RTL_TEXTENCODING_MS_1252 - : RTL_TEXTENCODING_USER_START + nGlyphSetID; - } -} - -OString -GlyphSet::GetGlyphSetEncodingName (rtl_TextEncoding nEnc, const OString &rFontName) -{ - if ( nEnc == RTL_TEXTENCODING_MS_1252 - || nEnc == RTL_TEXTENCODING_ISO_8859_1) - { - return OString("ISO1252Encoding"); - } - else - if (nEnc >= RTL_TEXTENCODING_USER_START && nEnc <= RTL_TEXTENCODING_USER_END) - { - return rFontName - + OString("Enc") - + OString::valueOf ((sal_Int32)(nEnc - RTL_TEXTENCODING_USER_START)); - } - else - { - return OString(); - } -} - -OString -GlyphSet::GetGlyphSetEncodingName (sal_Int32 nGlyphSetID) -{ - return GetGlyphSetEncodingName (GetGlyphSetEncoding(nGlyphSetID), maBaseName); -} - -void -GlyphSet::PSDefineReencodedFont (osl::File* pOutFile, sal_Int32 nGlyphSetID) -{ - // only for ps fonts - if ((meBaseType != fonttype::Builtin) && (meBaseType != fonttype::Type1)) - return; - - sal_Char pEncodingVector [256]; - sal_Int32 nSize = 0; - - nSize += psp::appendStr ("(", pEncodingVector + nSize); - nSize += psp::appendStr (GetReencodedFontName(nGlyphSetID), - pEncodingVector + nSize); - nSize += psp::appendStr (") cvn (", pEncodingVector + nSize); - nSize += psp::appendStr (maBaseName.getStr(), - pEncodingVector + nSize); - nSize += psp::appendStr (") cvn ", pEncodingVector + nSize); - nSize += psp::appendStr (GetGlyphSetEncodingName(nGlyphSetID), - pEncodingVector + nSize); - nSize += psp::appendStr (" psp_definefont\n", - pEncodingVector + nSize); - - psp::WritePS (pOutFile, pEncodingVector); -} - -OString -GlyphSet::GetReencodedFontName (rtl_TextEncoding nEnc, const OString &rFontName) -{ - if ( nEnc == RTL_TEXTENCODING_MS_1252 - || nEnc == RTL_TEXTENCODING_ISO_8859_1) - { - return rFontName - + OString("-iso1252"); - } - else - if (nEnc >= RTL_TEXTENCODING_USER_START && nEnc <= RTL_TEXTENCODING_USER_END) - { - return rFontName - + OString("-enc") - + OString::valueOf ((sal_Int32)(nEnc - RTL_TEXTENCODING_USER_START)); - } - else - { - return OString(); - } -} - -OString -GlyphSet::GetReencodedFontName (sal_Int32 nGlyphSetID) -{ - return GetReencodedFontName (GetGlyphSetEncoding(nGlyphSetID), maBaseName); -} - -void GlyphSet::DrawGlyphs( - PrinterGfx& rGfx, - const Point& rPoint, - const sal_uInt32* pGlyphIds, - const sal_Unicode* pUnicodes, - sal_Int16 nLen, - const sal_Int32* pDeltaArray ) -{ - sal_uChar *pGlyphID = (sal_uChar*)alloca (nLen * sizeof(sal_uChar)); - sal_Int32 *pGlyphSetID = (sal_Int32*)alloca (nLen * sizeof(sal_Int32)); - std::set< sal_Int32 > aGlyphSet; - - // convert unicode to font glyph id and font subset - for (int nChar = 0; nChar < nLen; nChar++) - { - GetGlyphID (pGlyphIds[nChar], pUnicodes[nChar], pGlyphID + nChar, pGlyphSetID + nChar); - aGlyphSet.insert (pGlyphSetID[nChar]); - } - - // loop over all glyph sets to detect substrings that can be xshown together - // without changing the postscript font - sal_Int32 *pDeltaSubset = (sal_Int32*)alloca (nLen * sizeof(sal_Int32)); - sal_uChar *pGlyphSubset = (sal_uChar*)alloca (nLen * sizeof(sal_uChar)); - - std::set< sal_Int32 >::iterator aSet; - for (aSet = aGlyphSet.begin(); aSet != aGlyphSet.end(); ++aSet) - { - Point aPoint = rPoint; - sal_Int32 nOffset = 0; - sal_Int32 nGlyphs = 0; - sal_Int32 nChar; - - // get offset to first glyph - for (nChar = 0; (nChar < nLen) && (pGlyphSetID[nChar] != *aSet); nChar++) - { - nOffset = pDeltaArray [nChar]; - } - - // loop over all chars to extract those that share the current glyph set - for (nChar = 0; nChar < nLen; nChar++) - { - if (pGlyphSetID[nChar] == *aSet) - { - pGlyphSubset [nGlyphs] = pGlyphID [nChar]; - // the offset to the next glyph is determined by the glyph in - // front of the next glyph with the same glyphset id - // most often, this will be the current glyph - while ((nChar + 1) < nLen) - { - if (pGlyphSetID[nChar + 1] == *aSet) - break; - else - nChar += 1; - } - pDeltaSubset [nGlyphs] = pDeltaArray[nChar] - nOffset; - - nGlyphs += 1; - } - } - - // show the text using the PrinterGfx text api - aPoint.Move (nOffset, 0); - - OString aGlyphSetName(GetGlyphSetName(*aSet)); - rGfx.PSSetFont (aGlyphSetName, GetGlyphSetEncoding(*aSet)); - rGfx.PSMoveTo (aPoint); - rGfx.PSShowText (pGlyphSubset, nGlyphs, nGlyphs, nGlyphs > 1 ? pDeltaSubset : NULL); - } -} - -void -GlyphSet::DrawText (PrinterGfx &rGfx, const Point& rPoint, - const sal_Unicode* pStr, sal_Int16 nLen, const sal_Int32* pDeltaArray) -{ - // dispatch to the impl method - if (pDeltaArray == NULL) - ImplDrawText (rGfx, rPoint, pStr, nLen); - else - ImplDrawText (rGfx, rPoint, pStr, nLen, pDeltaArray); -} - -void -GlyphSet::ImplDrawText (PrinterGfx &rGfx, const Point& rPoint, - const sal_Unicode* pStr, sal_Int16 nLen) -{ - rGfx.PSMoveTo (rPoint); - - if( mbUseFontEncoding ) - { - OString aPSName( OUStringToOString( rGfx.GetFontMgr().getPSName( mnFontID ), RTL_TEXTENCODING_ISO_8859_1 ) ); - OString aBytes( OUStringToOString( OUString( pStr, nLen ), mnBaseEncoding ) ); - rGfx.PSSetFont( aPSName, mnBaseEncoding ); - rGfx.PSShowText( (const unsigned char*)aBytes.getStr(), nLen, aBytes.getLength() ); - return; - } - - int nChar; - sal_uChar *pGlyphID = (sal_uChar*)alloca (nLen * sizeof(sal_uChar)); - sal_Int32 *pGlyphSetID = (sal_Int32*)alloca (nLen * sizeof(sal_Int32)); - - // convert unicode to glyph id and char set (font subset) - for (nChar = 0; nChar < nLen; nChar++) - GetCharID (pStr[nChar], pGlyphID + nChar, pGlyphSetID + nChar); - - // loop over the string to draw subsequent pieces of chars - // with the same postscript font - for (nChar = 0; nChar < nLen; /* atend */) - { - sal_Int32 nGlyphSetID = pGlyphSetID [nChar]; - sal_Int32 nGlyphs = 1; - for (int nNextChar = nChar + 1; nNextChar < nLen; nNextChar++) - { - if (pGlyphSetID[nNextChar] == nGlyphSetID) - nGlyphs++; - else - break; - } - - // show the text using the PrinterGfx text api - OString aGlyphSetName(GetCharSetName(nGlyphSetID)); - rGfx.PSSetFont (aGlyphSetName, GetGlyphSetEncoding(nGlyphSetID)); - rGfx.PSShowText (pGlyphID + nChar, nGlyphs, nGlyphs); - - nChar += nGlyphs; - } -} - -void -GlyphSet::ImplDrawText (PrinterGfx &rGfx, const Point& rPoint, - const sal_Unicode* pStr, sal_Int16 nLen, const sal_Int32* pDeltaArray) -{ - if( mbUseFontEncoding ) - { - OString aPSName( OUStringToOString( rGfx.GetFontMgr().getPSName( mnFontID ), RTL_TEXTENCODING_ISO_8859_1 ) ); - OString aBytes( OUStringToOString( OUString( pStr, nLen ), mnBaseEncoding ) ); - rGfx.PSMoveTo( rPoint ); - rGfx.PSSetFont( aPSName, mnBaseEncoding ); - rGfx.PSShowText( (const unsigned char*)aBytes.getStr(), nLen, aBytes.getLength(), pDeltaArray ); - return; - } - - sal_uChar *pGlyphID = (sal_uChar*)alloca (nLen * sizeof(sal_uChar)); - sal_Int32 *pGlyphSetID = (sal_Int32*)alloca (nLen * sizeof(sal_Int32)); - std::set< sal_Int32 > aGlyphSet; - - // convert unicode to font glyph id and font subset - for (int nChar = 0; nChar < nLen; nChar++) - { - GetCharID (pStr[nChar], pGlyphID + nChar, pGlyphSetID + nChar); - aGlyphSet.insert (pGlyphSetID[nChar]); - } - - // loop over all glyph sets to detect substrings that can be xshown together - // without changing the postscript font - sal_Int32 *pDeltaSubset = (sal_Int32*)alloca (nLen * sizeof(sal_Int32)); - sal_uChar *pGlyphSubset = (sal_uChar*)alloca (nLen * sizeof(sal_uChar)); - - std::set< sal_Int32 >::iterator aSet; - for (aSet = aGlyphSet.begin(); aSet != aGlyphSet.end(); ++aSet) - { - Point aPoint = rPoint; - sal_Int32 nOffset = 0; - sal_Int32 nGlyphs = 0; - sal_Int32 nChar; - - // get offset to first glyph - for (nChar = 0; (nChar < nLen) && (pGlyphSetID[nChar] != *aSet); nChar++) - { - nOffset = pDeltaArray [nChar]; - } - - // loop over all chars to extract those that share the current glyph set - for (nChar = 0; nChar < nLen; nChar++) - { - if (pGlyphSetID[nChar] == *aSet) - { - pGlyphSubset [nGlyphs] = pGlyphID [nChar]; - // the offset to the next glyph is determined by the glyph in - // front of the next glyph with the same glyphset id - // most often, this will be the current glyph - while ((nChar + 1) < nLen) - { - if (pGlyphSetID[nChar + 1] == *aSet) - break; - else - nChar += 1; - } - pDeltaSubset [nGlyphs] = pDeltaArray[nChar] - nOffset; - - nGlyphs += 1; - } - } - - // show the text using the PrinterGfx text api - aPoint.Move (nOffset, 0); - - OString aGlyphSetName(GetCharSetName(*aSet)); - rGfx.PSSetFont (aGlyphSetName, GetGlyphSetEncoding(*aSet)); - rGfx.PSMoveTo (aPoint); - rGfx.PSShowText (pGlyphSubset, nGlyphs, nGlyphs, nGlyphs > 1 ? pDeltaSubset : NULL); - } -} - -sal_Bool -GlyphSet::PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx) -{ - // only for ps fonts - if ((meBaseType != fonttype::Builtin) && (meBaseType != fonttype::Type1)) - return sal_False; - if (mnBaseEncoding == RTL_TEXTENCODING_SYMBOL) - return sal_False; - - PrintFontManager &rMgr = rGfx.GetFontMgr(); - - // loop thru all the font subsets - sal_Int32 nGlyphSetID = 0; - char_list_t::iterator aGlyphSet; - for (aGlyphSet = maCharList.begin(); aGlyphSet != maCharList.end(); aGlyphSet++) - { - ++nGlyphSetID; - - if (nGlyphSetID == 1) // latin1 page uses global reencoding table - { - PSDefineReencodedFont (pOutFile, nGlyphSetID); - continue; - } - if ((*aGlyphSet).size() == 0) // empty set, doesn't need reencoding - { - continue; - } - - // create reencoding table - - sal_Char pEncodingVector [256]; - sal_Int32 nSize = 0; - - nSize += psp::appendStr ("/", - pEncodingVector + nSize); - nSize += psp::appendStr (GetGlyphSetEncodingName(nGlyphSetID), - pEncodingVector + nSize); - nSize += psp::appendStr (" [ ", - pEncodingVector + nSize); - - // need a list of glyphs, sorted by glyphid - typedef std::map< sal_uInt8, sal_Unicode > ps_mapping_t; - typedef ps_mapping_t::value_type ps_value_t; - ps_mapping_t aSortedGlyphSet; - - char_map_t::const_iterator aUnsortedGlyph; - for (aUnsortedGlyph = (*aGlyphSet).begin(); - aUnsortedGlyph != (*aGlyphSet).end(); - ++aUnsortedGlyph) - { - aSortedGlyphSet.insert(ps_value_t((*aUnsortedGlyph).second, - (*aUnsortedGlyph).first)); - } - - ps_mapping_t::const_iterator aSortedGlyph; - // loop thru all the glyphs in the subset - for (aSortedGlyph = (aSortedGlyphSet).begin(); - aSortedGlyph != (aSortedGlyphSet).end(); - ++aSortedGlyph) - { - nSize += psp::appendStr ("/", - pEncodingVector + nSize); - - std::list< OString > aName( rMgr.getAdobeNameFromUnicode((*aSortedGlyph).second) ); - - if( aName.begin() != aName.end() ) - nSize += psp::appendStr ( aName.front(), pEncodingVector + nSize); - else - nSize += psp::appendStr (".notdef", pEncodingVector + nSize ); - nSize += psp::appendStr (" ", pEncodingVector + nSize); - // flush line - if (nSize >= 70) - { - nSize += psp::appendStr ("\n", pEncodingVector + nSize); - psp::WritePS (pOutFile, pEncodingVector); - nSize = 0; - } - } - - nSize += psp::appendStr ("] def\n", pEncodingVector + nSize); - psp::WritePS (pOutFile, pEncodingVector); - - PSDefineReencodedFont (pOutFile, nGlyphSetID); - } - - return sal_True; -} - -struct EncEntry -{ - sal_uChar aEnc; - long aGID; - - EncEntry() : aEnc( 0 ), aGID( 0 ) {} - - bool operator<( const EncEntry& rRight ) const - { return aEnc < rRight.aEnc; } -}; - -static void CreatePSUploadableFont( TrueTypeFont* pSrcFont, FILE* pTmpFile, - const char* pGlyphSetName, int nGlyphCount, - /*const*/ sal_uInt16* pRequestedGlyphs, /*const*/ sal_uChar* pEncoding, - bool bAllowType42, bool /*bAllowCID*/ ) -{ - // match the font-subset to the printer capabilities - // TODO: allow CFF for capable printers - int nTargetMask = FontSubsetInfo::TYPE1_PFA | FontSubsetInfo::TYPE3_FONT; - if( bAllowType42 ) - nTargetMask |= FontSubsetInfo::TYPE42_FONT; - - std::vector< EncEntry > aSorted( nGlyphCount, EncEntry() ); - for( int i = 0; i < nGlyphCount; i++ ) - { - aSorted[i].aEnc = pEncoding[i]; - aSorted[i].aGID = pRequestedGlyphs[i]; - } - - std::stable_sort( aSorted.begin(), aSorted.end() ); - - std::vector< sal_uChar > aEncoding( nGlyphCount ); - std::vector< long > aRequestedGlyphs( nGlyphCount ); - - for( int i = 0; i < nGlyphCount; i++ ) - { - aEncoding[i] = aSorted[i].aEnc; - aRequestedGlyphs[i] = aSorted[i].aGID; - } - - FontSubsetInfo aInfo; - aInfo.LoadFont( pSrcFont ); - - aInfo.CreateFontSubset( nTargetMask, pTmpFile, pGlyphSetName, - &aRequestedGlyphs[0], &aEncoding[0], nGlyphCount, NULL ); -} - -sal_Bool -GlyphSet::PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAllowType42, std::list< OString >& rSuppliedFonts ) -{ - // only for truetype fonts - if (meBaseType != fonttype::TrueType) - return sal_False; - - TrueTypeFont *pTTFont; - OString aTTFileName (rGfx.GetFontMgr().getFontFileSysPath(mnFontID)); - int nFace = rGfx.GetFontMgr().getFontFaceNumber(mnFontID); - sal_Int32 nSuccess = OpenTTFontFile(aTTFileName.getStr(), nFace < 0 ? 0 : nFace, &pTTFont); - if (nSuccess != SF_OK) - return sal_False; - FILE* pTmpFile = tmpfile(); - if (pTmpFile == NULL) - return sal_False; - - // array of unicode source characters - sal_Unicode pUChars[256]; - - // encoding vector maps character encoding to the ordinal number - // of the glyph in the output file - sal_uChar pEncoding[256]; - sal_uInt16 pTTGlyphMapping[256]; - const bool bAllowCID = false; // TODO: nPSLanguageLevel>=3 - - // loop thru all the font subsets - sal_Int32 nCharSetID; - char_list_t::iterator aCharSet; - for (aCharSet = maCharList.begin(), nCharSetID = 1; - aCharSet != maCharList.end(); - ++aCharSet, nCharSetID++) - { - if ((*aCharSet).size() == 0) - continue; - - // loop thru all the chars in the subset - char_map_t::const_iterator aChar; - sal_Int32 n = 0; - for (aChar = (*aCharSet).begin(); aChar != (*aCharSet).end(); aChar++) - { - pUChars [n] = (*aChar).first; - pEncoding [n] = (*aChar).second; - n++; - } - // create a mapping from the unicode chars to the char encoding in - // source TrueType font - MapString (pTTFont, pUChars, (*aCharSet).size(), pTTGlyphMapping, mbVertical); - - // create the current subset - OString aCharSetName = GetCharSetName(nCharSetID); - fprintf( pTmpFile, "%%%%BeginResource: font %s\n", aCharSetName.getStr() ); - CreatePSUploadableFont( pTTFont, pTmpFile, aCharSetName.getStr(), (*aCharSet).size(), - pTTGlyphMapping, pEncoding, bAllowType42, bAllowCID ); - fprintf( pTmpFile, "%%%%EndResource\n" ); - rSuppliedFonts.push_back( aCharSetName ); - } - - // loop thru all the font glyph subsets - sal_Int32 nGlyphSetID; - glyph_list_t::iterator aGlyphSet; - for (aGlyphSet = maGlyphList.begin(), nGlyphSetID = 1; - aGlyphSet != maGlyphList.end(); - ++aGlyphSet, nGlyphSetID++) - { - if ((*aGlyphSet).size() == 0) - continue; - - // loop thru all the glyphs in the subset - glyph_map_t::const_iterator aGlyph; - sal_Int32 n = 0; - for (aGlyph = (*aGlyphSet).begin(); aGlyph != (*aGlyphSet).end(); aGlyph++) - { - pTTGlyphMapping [n] = (*aGlyph).first; - pEncoding [n] = (*aGlyph).second; - n++; - } - - // create the current subset - OString aGlyphSetName = GetGlyphSetName(nGlyphSetID); - fprintf( pTmpFile, "%%%%BeginResource: font %s\n", aGlyphSetName.getStr() ); - CreatePSUploadableFont( pTTFont, pTmpFile, aGlyphSetName.getStr(), (*aGlyphSet).size(), - pTTGlyphMapping, pEncoding, bAllowType42, bAllowCID ); - fprintf( pTmpFile, "%%%%EndResource\n" ); - rSuppliedFonts.push_back( aGlyphSetName ); - } - - // copy the file into the page header - rewind(pTmpFile); - fflush(pTmpFile); - - sal_uChar pBuffer[0x2000]; - sal_uInt64 nIn; - sal_uInt64 nOut; - do - { - nIn = fread(pBuffer, 1, sizeof(pBuffer), pTmpFile); - rOutFile.write (pBuffer, nIn, nOut); - } - while ((nIn == nOut) && !feof(pTmpFile)); - - // cleanup - CloseTTFont (pTTFont); - fclose (pTmpFile); - - return sal_True; -} diff --git a/vcl/unx/source/printergfx/glyphset.hxx b/vcl/unx/source/printergfx/glyphset.hxx deleted file mode 100644 index 320e8e071955..000000000000 --- a/vcl/unx/source/printergfx/glyphset.hxx +++ /dev/null @@ -1,135 +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 _PSPRINT_GLYPHSET_HXX_ -#define _PSPRINT_GLYPHSET_HXX_ - -#include "vcl/fontmanager.hxx" - -#include "osl/file.hxx" - -#include "rtl/string.hxx" - -#include "tools/gen.hxx" - -#include -#include - -namespace psp { - -class PrinterGfx; -class PrintFontManager; - -class GlyphSet -{ -private: - - sal_Int32 mnFontID; - sal_Bool mbVertical; - rtl::OString maBaseName; - fonttype::type meBaseType; - rtl_TextEncoding mnBaseEncoding; - bool mbUseFontEncoding; - - typedef std::hash_map< sal_Unicode, sal_uInt8 > char_map_t; - typedef std::list< char_map_t > char_list_t; - typedef std::hash_map< sal_uInt32, sal_uInt8 > glyph_map_t; - typedef std::list< glyph_map_t > glyph_list_t; - - char_list_t maCharList; - glyph_list_t maGlyphList; - - rtl::OString GetGlyphSetName (sal_Int32 nGlyphSetID); - rtl::OString GetCharSetName (sal_Int32 nGlyphSetID); - sal_Int32 GetGlyphSetEncoding (sal_Int32 nGlyphSetID); - rtl::OString GetGlyphSetEncodingName (sal_Int32 nGlyphSetID); - - rtl::OString GetReencodedFontName (sal_Int32 nGlyphSetID); - void PSDefineReencodedFont (osl::File* pOutFile, - sal_Int32 nGlyphSetID); - - sal_Bool GetCharID (sal_Unicode nChar, - sal_uChar* nOutGlyphID, sal_Int32* nOutGlyphSetID); - sal_Bool LookupCharID (sal_Unicode nChar, - sal_uChar* nOutGlyphID, sal_Int32* nOutGlyphSetID); - sal_Bool AddCharID (sal_Unicode nChar, - sal_uChar* nOutGlyphID, - sal_Int32* nOutGlyphSetID); - sal_Bool GetGlyphID (sal_uInt32 nGlyph, sal_Unicode nUnicode, - sal_uChar* nOutGlyphID, sal_Int32* nOutGlyphSetID); - sal_Bool LookupGlyphID (sal_uInt32 nGlyph, - sal_uChar* nOutGlyphID, sal_Int32* nOutGlyphSetID); - sal_Bool AddGlyphID (sal_uInt32 nGlyph, sal_Unicode nUnicode, - sal_uChar* nOutGlyphID, - sal_Int32* nOutGlyphSetID); - void AddNotdef (char_map_t &rCharMap); - void AddNotdef (glyph_map_t &rGlyphMap); - sal_uChar GetAnsiMapping (sal_Unicode nUnicodeChar); - sal_uChar GetSymbolMapping (sal_Unicode nUnicodeChar); - - void ImplDrawText (PrinterGfx &rGfx, const Point& rPoint, - const sal_Unicode* pStr, sal_Int16 nLen); - void ImplDrawText (PrinterGfx &rGfx, const Point& rPoint, - const sal_Unicode* pStr, sal_Int16 nLen, - const sal_Int32* pDeltaArray); - -public: - - GlyphSet (); - GlyphSet (sal_Int32 nFontID, sal_Bool bVertical); - ~GlyphSet (); - - sal_Int32 GetFontID (); - fonttype::type GetFontType (); - static rtl::OString - GetReencodedFontName (rtl_TextEncoding nEnc, - const rtl::OString &rFontName); - static rtl::OString - GetGlyphSetEncodingName (rtl_TextEncoding nEnc, - const rtl::OString &rFontName); - sal_Bool IsVertical (); - - sal_Bool SetFont (sal_Int32 nFontID, sal_Bool bVertical); - - void DrawText (PrinterGfx &rGfx, const Point& rPoint, - const sal_Unicode* pStr, sal_Int16 nLen, - const sal_Int32* pDeltaArray = NULL); - void DrawGlyphs (PrinterGfx& rGfx, - const Point& rPoint, - const sal_uInt32* pGlyphIds, - const sal_Unicode* pUnicodes, - sal_Int16 nLen, - const sal_Int32* pDeltaArray ); - sal_Bool PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx); - sal_Bool PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAsType42, std::list< rtl::OString >& rSuppliedFonts ); -}; - - -} /* namespace psp */ - -#endif - diff --git a/vcl/unx/source/printergfx/makefile.mk b/vcl/unx/source/printergfx/makefile.mk deleted file mode 100644 index cc5692e951f5..000000000000 --- a/vcl/unx/source/printergfx/makefile.mk +++ /dev/null @@ -1,65 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=printergfx - -# --- Settings ----------------------------------------------------- - -ENABLE_EXCEPTIONS=true - -.INCLUDE : settings.mk - -.IF "$(ENABLE_CUPS)" != "" -CDEFS += -DENABLE_CUPS -.ENDIF - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"=="aqua" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"=="aqua" - -SLOFILES=\ - $(SLO)$/printerjob.obj \ - $(SLO)$/text_gfx.obj \ - $(SLO)$/psputil.obj \ - $(SLO)$/common_gfx.obj \ - $(SLO)$/glyphset.obj \ - $(SLO)$/bitmap_gfx.obj - -.ENDIF - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/vcl/unx/source/printergfx/printerjob.cxx b/vcl/unx/source/printergfx/printerjob.cxx deleted file mode 100644 index af2cf14b1a0c..000000000000 --- a/vcl/unx/source/printergfx/printerjob.cxx +++ /dev/null @@ -1,1204 +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_vcl.hxx" - -#include -#include -#include -#include -#include -#include - -#include "psputil.hxx" -#include "glyphset.hxx" - -#include "vcl/printerjob.hxx" -#include "vcl/ppdparser.hxx" -#include "vcl/strhelper.hxx" -#include "vcl/printerinfomanager.hxx" -#include "vcl/printergfx.hxx" - -#include "rtl/ustring.hxx" -#include "rtl/strbuf.hxx" -#include "rtl/ustrbuf.hxx" - -#include "osl/thread.h" -#include "sal/alloca.h" - -#include -#include - -using namespace psp; -using namespace rtl; - -// forward declaration - -#define nBLOCKSIZE 0x2000 - -namespace psp -{ - -sal_Bool -AppendPS (FILE* pDst, osl::File* pSrc, sal_uChar* pBuffer, - sal_uInt32 nBlockSize = nBLOCKSIZE) -{ - if ((pDst == NULL) || (pSrc == NULL)) - return sal_False; - - if (nBlockSize == 0) - nBlockSize = nBLOCKSIZE; - if (pBuffer == NULL) - pBuffer = (sal_uChar*)alloca (nBlockSize); - - pSrc->setPos (osl_Pos_Absolut, 0); - - sal_uInt64 nIn = 0; - sal_uInt64 nOut = 0; - do - { - pSrc->read (pBuffer, nBlockSize, nIn); - if (nIn > 0) - nOut = fwrite (pBuffer, 1, sal::static_int_cast(nIn), pDst); - } - while ((nIn > 0) && (nIn == nOut)); - - return sal_True; -} - -} // namespace psp - -/* - * private convenience routines for file handling - */ - -osl::File* -PrinterJob::CreateSpoolFile (const rtl::OUString& rName, const rtl::OUString& rExtension) -{ - osl::File::RC nError = osl::File::E_None; - osl::File* pFile = NULL; - - rtl::OUString aFile = rName + rExtension; - rtl::OUString aFileURL; - nError = osl::File::getFileURLFromSystemPath( aFile, aFileURL ); - if (nError != osl::File::E_None) - return NULL; - aFileURL = maSpoolDirName + rtl::OUString::createFromAscii ("/") + aFileURL; - - pFile = new osl::File (aFileURL); - nError = pFile->open (OpenFlag_Read | OpenFlag_Write | OpenFlag_Create); - if (nError != osl::File::E_None) - { - delete pFile; - return NULL; - } - - pFile->setAttributes (aFileURL, - osl_File_Attribute_OwnWrite | osl_File_Attribute_OwnRead); - return pFile; -} - -/* - * public methods of PrinterJob: for use in PrinterGfx - */ - -void -PrinterJob::GetScale (double &rXScale, double &rYScale) const -{ - rXScale = mfXScale; - rYScale = mfYScale; -} - -sal_uInt16 -PrinterJob::GetDepth () const -{ - sal_Int32 nLevel = GetPostscriptLevel(); - sal_Bool bColor = IsColorPrinter (); - - return nLevel > 1 && bColor ? 24 : 8; -} - -sal_uInt16 -PrinterJob::GetPostscriptLevel (const JobData *pJobData) const -{ - sal_uInt16 nPSLevel = 2; - - if( pJobData == NULL ) - pJobData = &m_aLastJobData; - - if( pJobData->m_nPSLevel ) - nPSLevel = pJobData->m_nPSLevel; - else - if( pJobData->m_pParser ) - nPSLevel = pJobData->m_pParser->getLanguageLevel(); - - return nPSLevel; -} - -sal_Bool -PrinterJob::IsColorPrinter () const -{ - sal_Bool bColor = sal_False; - - if( m_aLastJobData.m_nColorDevice ) - bColor = m_aLastJobData.m_nColorDevice == -1 ? sal_False : sal_True; - else if( m_aLastJobData.m_pParser ) - bColor = m_aLastJobData.m_pParser->isColorDevice() ? sal_True : sal_False; - - return bColor; -} - -osl::File* -PrinterJob::GetDocumentHeader () -{ - return mpJobHeader; -} - -osl::File* -PrinterJob::GetDocumentTrailer () -{ - return mpJobTrailer; -} - -osl::File* -PrinterJob::GetCurrentPageHeader () -{ - return maHeaderList.back(); -} - -osl::File* -PrinterJob::GetCurrentPageBody () -{ - return maPageList.back(); -} - -/* - * public methods of PrinterJob: the actual job / spool handling - */ - -PrinterJob::PrinterJob () : - mpJobHeader( NULL ), - mpJobTrailer( NULL ), - m_bQuickJob( false ) -{ -} - -namespace psp -{ - -/* check whether the given name points to a directory which is - usable for the user */ -sal_Bool -existsTmpDir (const char* pName) -{ - struct stat aFileStatus; - - if (pName == NULL) - return sal_False; - if (stat(pName, &aFileStatus) != 0) - return sal_False; - if (! S_ISDIR(aFileStatus.st_mode)) - return sal_False; - - return access(pName, W_OK | R_OK) == 0 ? sal_True : sal_False; -} - -/* return the username in the given buffer */ -sal_Bool -getUserName (char* pName, int nSize) -{ - struct passwd *pPWEntry; - struct passwd aPWEntry; - sal_Char pPWBuffer[256]; - - sal_Bool bSuccess = sal_False; - -#ifdef FREEBSD - pPWEntry = getpwuid( getuid()); -#else - if (getpwuid_r(getuid(), &aPWEntry, pPWBuffer, sizeof(pPWBuffer), &pPWEntry) != 0) - pPWEntry = NULL; -#endif - - if (pPWEntry != NULL && pPWEntry->pw_name != NULL) - { - sal_Int32 nLen = strlen(pPWEntry->pw_name); - if (nLen > 0 && nLen < nSize) - { - memcpy (pName, pPWEntry->pw_name, nLen); - pName[nLen] = '\0'; - - bSuccess = sal_True; - } - } - - // wipe the passwd off the stack - memset (pPWBuffer, 0, sizeof(pPWBuffer)); - - return bSuccess; -} - -/* remove all our temporary files, uses external program "rm", since - osl functionality is inadequate */ -void -removeSpoolDir (const rtl::OUString& rSpoolDir) -{ - rtl::OUString aSysPath; - if( osl::File::E_None != osl::File::getSystemPathFromFileURL( rSpoolDir, aSysPath ) ) - { - // Conversion did not work, as this is quite a dangerous action, - // we should abort here .... - OSL_ENSURE( 0, "psprint: couldn't remove spool directory" ); - return; - } - rtl::OString aSysPathByte = - rtl::OUStringToOString (aSysPath, osl_getThreadTextEncoding()); - sal_Char pSystem [128]; - sal_Int32 nChar = 0; - - nChar = psp::appendStr ("rm -rf ", pSystem); - nChar += psp::appendStr (aSysPathByte.getStr(), pSystem + nChar); - - if (system (pSystem) == -1) - OSL_ENSURE( 0, "psprint: couldn't remove spool directory" ); -} - -/* creates a spool directory with a "pidgin random" value based on - current system time */ -rtl::OUString -createSpoolDir () -{ - TimeValue aCur; - osl_getSystemTime( &aCur ); - sal_Int32 nRand = aCur.Seconds ^ (aCur.Nanosec/1000); - - rtl::OUString aTmpDir; - osl_getTempDirURL( &aTmpDir.pData ); - - do - { - rtl::OUStringBuffer aDir( aTmpDir.getLength() + 16 ); - aDir.append( aTmpDir ); - aDir.appendAscii( "/psp" ); - aDir.append(nRand); - rtl::OUString aResult = aDir.makeStringAndClear(); - if( osl::Directory::create( aResult ) == osl::FileBase::E_None ) - { - osl::File::setAttributes( aResult, - osl_File_Attribute_OwnWrite - | osl_File_Attribute_OwnRead - | osl_File_Attribute_OwnExe ); - return aResult; - } - nRand++; - } while( nRand ); - return rtl::OUString(); -} - -} // namespace psp - -PrinterJob::~PrinterJob () -{ - std::list< osl::File* >::iterator pPage; - for (pPage = maPageList.begin(); pPage != maPageList.end(); pPage++) - { - //(*pPage)->remove(); - delete *pPage; - } - for (pPage = maHeaderList.begin(); pPage != maHeaderList.end(); pPage++) - { - //(*pPage)->remove(); - delete *pPage; - } - // mpJobHeader->remove(); - delete mpJobHeader; - // mpJobTrailer->remove(); - delete mpJobTrailer; - - // XXX should really call osl::remove routines - if( maSpoolDirName.getLength() ) - removeSpoolDir (maSpoolDirName); - - // osl::Directory::remove (maSpoolDirName); -} - -namespace psp -{ - -// get locale invariant, 7bit clean current local time string -sal_Char* -getLocalTime(sal_Char* pBuffer) -{ - time_t nTime = time (NULL); - struct tm aTime; - struct tm *pLocalTime = localtime_r (&nTime, &aTime); - - return asctime_r(pLocalTime, pBuffer); -} - -} - -static bool isAscii( const rtl::OUString& rStr ) -{ - const sal_Unicode* pStr = rStr; - sal_Int32 nLen = rStr.getLength(); - for( sal_Int32 i = 0; i < nLen; i++ ) - if( pStr[i] > 127 ) - return false; - return true; -} - -sal_Bool -PrinterJob::StartJob ( - const rtl::OUString& rFileName, - int nMode, - const rtl::OUString& rJobName, - const rtl::OUString& rAppName, - const JobData& rSetupData, - PrinterGfx* pGraphics, - bool bIsQuickJob - ) -{ - m_bQuickJob = bIsQuickJob; - mnMaxWidthPt = mnMaxHeightPt = 0; - mnLandscapes = mnPortraits = 0; - m_pGraphics = pGraphics; - InitPaperSize (rSetupData); - - // create file container for document header and trailer - maFileName = rFileName; - mnFileMode = nMode; - maSpoolDirName = createSpoolDir (); - maJobTitle = rJobName; - - rtl::OUString aExt = rtl::OUString::createFromAscii (".ps"); - mpJobHeader = CreateSpoolFile (rtl::OUString::createFromAscii("psp_head"), aExt); - mpJobTrailer = CreateSpoolFile (rtl::OUString::createFromAscii("psp_tail"), aExt); - if( ! (mpJobHeader && mpJobTrailer) ) // existing files are removed in destructor - return sal_False; - - // write document header according to Document Structuring Conventions (DSC) - WritePS (mpJobHeader, - "%!PS-Adobe-3.0\n" - "%%BoundingBox: (atend)\n" ); - - rtl::OUString aFilterWS; - - // Creator (this application) - aFilterWS = WhitespaceToSpace( rAppName, FALSE ); - WritePS (mpJobHeader, "%%Creator: ("); - WritePS (mpJobHeader, aFilterWS); - WritePS (mpJobHeader, ")\n"); - - // For (user name) - sal_Char pUserName[64]; - if (getUserName(pUserName, sizeof(pUserName))) - { - WritePS (mpJobHeader, "%%For: ("); - WritePS (mpJobHeader, pUserName); - WritePS (mpJobHeader, ")\n"); - } - - // Creation Date (locale independent local time) - sal_Char pCreationDate [256]; - WritePS (mpJobHeader, "%%CreationDate: ("); - getLocalTime(pCreationDate); - for( unsigned int i = 0; i < sizeof(pCreationDate)/sizeof(pCreationDate[0]); i++ ) - { - if( pCreationDate[i] == '\n' ) - { - pCreationDate[i] = 0; - break; - } - } - WritePS (mpJobHeader, pCreationDate ); - WritePS (mpJobHeader, ")\n"); - - // Document Title - /* #i74335# - * The title should be clean ascii; rJobName however may - * contain any Unicode character. So implement the following - * algorithm: - * use rJobName, if it contains only ascii - * use the filename, if it contains only ascii - * else omit %%Title - */ - aFilterWS = WhitespaceToSpace( rJobName, FALSE ); - rtl::OUString aTitle( aFilterWS ); - if( ! isAscii( aTitle ) ) - { - sal_Int32 nIndex = 0; - while( nIndex != -1 ) - aTitle = rFileName.getToken( 0, '/', nIndex ); - aTitle = WhitespaceToSpace( aTitle, FALSE ); - if( ! isAscii( aTitle ) ) - aTitle = rtl::OUString(); - } - - maJobTitle = aFilterWS; - if( aTitle.getLength() ) - { - WritePS (mpJobHeader, "%%Title: ("); - WritePS (mpJobHeader, aTitle); - WritePS (mpJobHeader, ")\n"); - } - - // Language Level - sal_Char pLevel[16]; - sal_Int32 nSz = getValueOf(GetPostscriptLevel(&rSetupData), pLevel); - pLevel[nSz++] = '\n'; - pLevel[nSz ] = '\0'; - WritePS (mpJobHeader, "%%LanguageLevel: "); - WritePS (mpJobHeader, pLevel); - - // Other - WritePS (mpJobHeader, "%%DocumentData: Clean7Bit\n"); - WritePS (mpJobHeader, "%%Pages: (atend)\n"); - WritePS (mpJobHeader, "%%Orientation: (atend)\n"); - WritePS (mpJobHeader, "%%PageOrder: Ascend\n"); - WritePS (mpJobHeader, "%%EndComments\n"); - - // write Prolog - writeProlog (mpJobHeader, rSetupData); - - // mark last job setup as not set - m_aLastJobData.m_pParser = NULL; - m_aLastJobData.m_aContext.setParser( NULL ); - - return sal_True; -} - -sal_Bool -PrinterJob::EndJob () -{ - // no pages ? that really means no print job - if( maPageList.empty() ) - return sal_False; - - // write document setup (done here because it - // includes the accumulated fonts - if( mpJobHeader ) - writeSetup( mpJobHeader, m_aDocumentJobData ); - m_pGraphics->OnEndJob(); - if( ! (mpJobHeader && mpJobTrailer) ) - return sal_False; - - // write document trailer according to Document Structuring Conventions (DSC) - rtl::OStringBuffer aTrailer(512); - aTrailer.append( "%%Trailer\n" ); - aTrailer.append( "%%BoundingBox: 0 0 " ); - aTrailer.append( (sal_Int32)mnMaxWidthPt ); - aTrailer.append( " " ); - aTrailer.append( (sal_Int32)mnMaxHeightPt ); - if( mnLandscapes > mnPortraits ) - aTrailer.append("\n%%Orientation: Landscape"); - else - aTrailer.append("\n%%Orientation: Portrait"); - aTrailer.append( "\n%%Pages: " ); - aTrailer.append( (sal_Int32)maPageList.size() ); - aTrailer.append( "\n%%EOF\n" ); - WritePS (mpJobTrailer, aTrailer.getStr()); - - /* - * spool the set of files to their final destination, this is U**X dependent - */ - - FILE* pDestFILE = NULL; - - /* create a destination either as file or as a pipe */ - sal_Bool bSpoolToFile = maFileName.getLength() > 0 ? sal_True : sal_False; - if (bSpoolToFile) - { - const rtl::OString aFileName = rtl::OUStringToOString (maFileName, - osl_getThreadTextEncoding()); - if( mnFileMode ) - { - int nFile = open( aFileName.getStr(), O_CREAT | O_EXCL | O_RDWR, mnFileMode ); - if( nFile != -1 ) - { - pDestFILE = fdopen( nFile, "w" ); - if( pDestFILE == NULL ) - { - close( nFile ); - unlink( aFileName.getStr() ); - return sal_False; - } - } - else - chmod( aFileName.getStr(), mnFileMode ); - } - if (pDestFILE == NULL) - pDestFILE = fopen (aFileName.getStr(), "w"); - - if (pDestFILE == NULL) - return sal_False; - } - else - { - PrinterInfoManager& rPrinterInfoManager = PrinterInfoManager::get (); - pDestFILE = rPrinterInfoManager.startSpool( m_aLastJobData.m_aPrinterName, m_bQuickJob ); - if (pDestFILE == NULL) - return sal_False; - } - - /* spool the document parts to the destination */ - - sal_uChar pBuffer[ nBLOCKSIZE ]; - - AppendPS (pDestFILE, mpJobHeader, pBuffer); - mpJobHeader->close(); - - sal_Bool bSuccess = sal_True; - std::list< osl::File* >::iterator pPageBody; - std::list< osl::File* >::iterator pPageHead; - for (pPageBody = maPageList.begin(), pPageHead = maHeaderList.begin(); - pPageBody != maPageList.end() && pPageHead != maHeaderList.end(); - pPageBody++, pPageHead++) - { - if( *pPageHead ) - { - osl::File::RC nError = (*pPageHead)->open(OpenFlag_Read); - if (nError == osl::File::E_None) - { - AppendPS (pDestFILE, *pPageHead, pBuffer); - (*pPageHead)->close(); - } - } - else - bSuccess = sal_False; - if( *pPageBody ) - { - osl::File::RC nError = (*pPageBody)->open(OpenFlag_Read); - if (nError == osl::File::E_None) - { - AppendPS (pDestFILE, *pPageBody, pBuffer); - (*pPageBody)->close(); - } - } - else - bSuccess = sal_False; - } - - AppendPS (pDestFILE, mpJobTrailer, pBuffer); - mpJobTrailer->close(); - - /* well done */ - - if (bSpoolToFile) - fclose (pDestFILE); - else - { - PrinterInfoManager& rPrinterInfoManager = PrinterInfoManager::get(); - if (0 == rPrinterInfoManager.endSpool( m_aLastJobData.m_aPrinterName, - maJobTitle, pDestFILE, m_aDocumentJobData, true )) - { - bSuccess = sal_False; - } - } - - return bSuccess; -} - -sal_Bool -PrinterJob::AbortJob () -{ - m_pGraphics->OnEndJob(); - return sal_False; -} - -void -PrinterJob::InitPaperSize (const JobData& rJobSetup) -{ - int nRes = rJobSetup.m_aContext.getRenderResolution (); - - String aPaper; - int nWidth, nHeight; - rJobSetup.m_aContext.getPageSize (aPaper, nWidth, nHeight); - - int nLeft = 0, nRight = 0, nUpper = 0, nLower = 0; - const PPDParser* pParser = rJobSetup.m_aContext.getParser(); - if (pParser != NULL) - pParser->getMargins (aPaper, nLeft, nRight, nUpper, nLower); - - mnResolution = nRes; - - mnWidthPt = nWidth; - mnHeightPt = nHeight; - - if( mnWidthPt > mnMaxWidthPt ) - mnMaxWidthPt = mnWidthPt; - if( mnHeightPt > mnMaxHeightPt ) - mnMaxHeightPt = mnHeightPt; - - mnLMarginPt = nLeft; - mnRMarginPt = nRight; - mnTMarginPt = nUpper; - mnBMarginPt = nLower; - - mfXScale = (double)72.0 / (double)mnResolution; - mfYScale = -1.0 * (double)72.0 / (double)mnResolution; -} - - -sal_Bool -PrinterJob::StartPage (const JobData& rJobSetup) -{ - InitPaperSize (rJobSetup); - - rtl::OUString aPageNo = rtl::OUString::valueOf ((sal_Int32)maPageList.size()+1); // sequential page number must start with 1 - rtl::OUString aExt = aPageNo + rtl::OUString::createFromAscii (".ps"); - - osl::File* pPageHeader = CreateSpoolFile ( - rtl::OUString::createFromAscii("psp_pghead"), aExt); - osl::File* pPageBody = CreateSpoolFile ( - rtl::OUString::createFromAscii("psp_pgbody"), aExt); - - maHeaderList.push_back (pPageHeader); - maPageList.push_back (pPageBody); - - if( ! (pPageHeader && pPageBody) ) - return sal_False; - - // write page header according to Document Structuring Conventions (DSC) - WritePS (pPageHeader, "%%Page: "); - WritePS (pPageHeader, aPageNo); - WritePS (pPageHeader, " "); - WritePS (pPageHeader, aPageNo); - WritePS (pPageHeader, "\n"); - - if( rJobSetup.m_eOrientation == orientation::Landscape ) - { - WritePS (pPageHeader, "%%PageOrientation: Landscape\n"); - mnLandscapes++; - } - else - { - WritePS (pPageHeader, "%%PageOrientation: Portrait\n"); - mnPortraits++; - } - - sal_Char pBBox [256]; - sal_Int32 nChar = 0; - - nChar = psp::appendStr ("%%PageBoundingBox: ", pBBox); - nChar += psp::getValueOf (mnLMarginPt, pBBox + nChar); - nChar += psp::appendStr (" ", pBBox + nChar); - nChar += psp::getValueOf (mnBMarginPt, pBBox + nChar); - nChar += psp::appendStr (" ", pBBox + nChar); - nChar += psp::getValueOf (mnWidthPt - mnRMarginPt, pBBox + nChar); - nChar += psp::appendStr (" ", pBBox + nChar); - nChar += psp::getValueOf (mnHeightPt - mnTMarginPt, pBBox + nChar); - nChar += psp::appendStr ("\n", pBBox + nChar); - - WritePS (pPageHeader, pBBox); - - /* #i7262# #i65491# write setup only before first page - * (to %%Begin(End)Setup, instead of %%Begin(End)PageSetup) - * don't do this in StartJob since the jobsetup there may be - * different. - */ - bool bWriteFeatures = true; - if( 1 == maPageList.size() ) - { - m_aDocumentJobData = rJobSetup; - bWriteFeatures = false; - } - - if ( writePageSetup( pPageHeader, rJobSetup, bWriteFeatures ) ) - { - m_aLastJobData = rJobSetup; - return true; - } - - return false; -} - -sal_Bool -PrinterJob::EndPage () -{ - m_pGraphics->OnEndPage(); - - osl::File* pPageHeader = maHeaderList.back(); - osl::File* pPageBody = maPageList.back(); - - if( ! (pPageBody && pPageHeader) ) - return sal_False; - - // copy page to paper and write page trailer according to DSC - - sal_Char pTrailer[256]; - sal_Int32 nChar = 0; - nChar = psp::appendStr ("grestore grestore\n", pTrailer); - nChar += psp::appendStr ("showpage\n", pTrailer + nChar); - nChar += psp::appendStr ("%%PageTrailer\n\n", pTrailer + nChar); - WritePS (pPageBody, pTrailer); - - // this page is done for now, close it to avoid having too many open fd's - - pPageHeader->close(); - pPageBody->close(); - - return sal_True; -} - -sal_uInt32 -PrinterJob::GetErrorCode () -{ - /* TODO */ - return 0; -} - -struct less_ppd_key : public ::std::binary_function -{ - bool operator()(const PPDKey* left, const PPDKey* right) - { return left->getOrderDependency() < right->getOrderDependency(); } -}; - -static bool writeFeature( osl::File* pFile, const PPDKey* pKey, const PPDValue* pValue, bool bUseIncluseFeature ) -{ - if( ! pKey || ! pValue ) - return true; - - OStringBuffer aFeature(256); - aFeature.append( "[{\n" ); - if( bUseIncluseFeature ) - aFeature.append( "%%IncludeFeature:" ); - else - aFeature.append( "%%BeginFeature:" ); - aFeature.append( " *" ); - aFeature.append( OUStringToOString( pKey->getKey(), RTL_TEXTENCODING_ASCII_US ) ); - aFeature.append( ' ' ); - aFeature.append( OUStringToOString( pValue->m_aOption, RTL_TEXTENCODING_ASCII_US ) ); - if( !bUseIncluseFeature ) - { - aFeature.append( '\n' ); - aFeature.append( OUStringToOString( pValue->m_aValue, RTL_TEXTENCODING_ASCII_US ) ); - aFeature.append( "\n%%EndFeature" ); - } - aFeature.append( "\n} stopped cleartomark\n" ); - sal_uInt64 nWritten = 0; - return pFile->write( aFeature.getStr(), aFeature.getLength(), nWritten ) - || nWritten != (sal_uInt64)aFeature.getLength() ? false : true; -} - -bool PrinterJob::writeFeatureList( osl::File* pFile, const JobData& rJob, bool bDocumentSetup ) -{ - bool bSuccess = true; - int i; - - // emit features ordered to OrderDependency - // ignore features that are set to default - - // sanity check - if( rJob.m_pParser == rJob.m_aContext.getParser() && - rJob.m_pParser && - ( m_aLastJobData.m_pParser == rJob.m_pParser || m_aLastJobData.m_pParser == NULL ) - ) - { - int nKeys = rJob.m_aContext.countValuesModified(); - ::std::vector< const PPDKey* > aKeys( nKeys ); - for( i = 0; i < nKeys; i++ ) - aKeys[i] = rJob.m_aContext.getModifiedKey( i ); - ::std::sort( aKeys.begin(), aKeys.end(), less_ppd_key() ); - - for( i = 0; i < nKeys && bSuccess; i++ ) - { - const PPDKey* pKey = aKeys[i]; - bool bEmit = false; - if( bDocumentSetup ) - { - if( pKey->getSetupType() == PPDKey::DocumentSetup ) - bEmit = true; - } - if( pKey->getSetupType() == PPDKey::PageSetup || - pKey->getSetupType() == PPDKey::AnySetup ) - bEmit = true; - if( bEmit ) - { - const PPDValue* pValue = rJob.m_aContext.getValue( pKey ); - if( pValue - && pValue->m_eType == eInvocation - && ( m_aLastJobData.m_pParser == NULL - || m_aLastJobData.m_aContext.getValue( pKey ) != pValue - || bDocumentSetup - ) - ) - { - // try to avoid PS level 2 feature commands if level is set to 1 - if( GetPostscriptLevel( &rJob ) == 1 ) - { - bool bHavePS2 = - ( pValue->m_aValue.SearchAscii( "<<" ) != STRING_NOTFOUND ) - || - ( pValue->m_aValue.SearchAscii( ">>" ) != STRING_NOTFOUND ); - if( bHavePS2 ) - continue; - } - bSuccess = writeFeature( pFile, pKey, pValue, PrinterInfoManager::get().getUseIncludeFeature() ); - } - } - } - } - else - bSuccess = false; - - return bSuccess; -} - -bool PrinterJob::writePageSetup( osl::File* pFile, const JobData& rJob, bool bWriteFeatures ) -{ - bool bSuccess = true; - - WritePS (pFile, "%%BeginPageSetup\n%\n"); - if ( bWriteFeatures ) - bSuccess = writeFeatureList( pFile, rJob, false ); - WritePS (pFile, "%%EndPageSetup\n"); - - sal_Char pTranslate [128]; - sal_Int32 nChar = 0; - - if( rJob.m_eOrientation == orientation::Portrait ) - { - nChar = psp::appendStr ("gsave\n[", pTranslate); - nChar += psp::getValueOfDouble ( pTranslate + nChar, mfXScale, 5); - nChar += psp::appendStr (" 0 0 ", pTranslate + nChar); - nChar += psp::getValueOfDouble ( pTranslate + nChar, mfYScale, 5); - nChar += psp::appendStr (" ", pTranslate + nChar); - nChar += psp::getValueOf (mnRMarginPt, pTranslate + nChar); - nChar += psp::appendStr (" ", pTranslate + nChar); - nChar += psp::getValueOf (mnHeightPt-mnTMarginPt, - pTranslate + nChar); - nChar += psp::appendStr ("] concat\ngsave\n", - pTranslate + nChar); - } - else - { - nChar = psp::appendStr ("gsave\n", pTranslate); - nChar += psp::appendStr ("[ 0 ", pTranslate + nChar); - nChar += psp::getValueOfDouble ( pTranslate + nChar, -mfYScale, 5); - nChar += psp::appendStr (" ", pTranslate + nChar); - nChar += psp::getValueOfDouble ( pTranslate + nChar, mfXScale, 5); - nChar += psp::appendStr (" 0 ", pTranslate + nChar ); - nChar += psp::getValueOfDouble ( pTranslate + nChar, mnLMarginPt, 5 ); - nChar += psp::appendStr (" ", pTranslate + nChar); - nChar += psp::getValueOf (mnBMarginPt, pTranslate + nChar ); - nChar += psp::appendStr ("] concat\ngsave\n", - pTranslate + nChar); - } - - WritePS (pFile, pTranslate); - - return bSuccess; -} - -void PrinterJob::writeJobPatch( osl::File* pFile, const JobData& rJobData ) -{ - if( ! PrinterInfoManager::get().getUseJobPatch() ) - return; - - const PPDKey* pKey = NULL; - - if( rJobData.m_pParser ) - pKey = rJobData.m_pParser->getKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "JobPatchFile" ) ) ); - if( ! pKey ) - return; - - // order the patch files - // according to PPD spec the JobPatchFile options must be int - // and should be emitted in order - std::list< sal_Int32 > patch_order; - int nValueCount = pKey->countValues(); - for( int i = 0; i < nValueCount; i++ ) - { - const PPDValue* pVal = pKey->getValue( i ); - patch_order.push_back( pVal->m_aOption.ToInt32() ); - if( patch_order.back() == 0 && ! pVal->m_aOption.EqualsAscii( "0" ) ) - { - WritePS( pFile, "% Warning: left out JobPatchFile option \"" ); - OString aOption = OUStringToOString( pVal->m_aOption, RTL_TEXTENCODING_ASCII_US ); - WritePS( pFile, aOption.getStr() ); - WritePS( pFile, - "\"\n% as it violates the PPD spec;\n" - "% JobPatchFile options need to be numbered for ordering.\n" ); - } - } - - patch_order.sort(); - patch_order.unique(); - - while( patch_order.begin() != patch_order.end() ) - { - // note: this discards patch files not adhering to the "int" scheme - // as there won't be a value for them - writeFeature( pFile, pKey, pKey->getValue( OUString::valueOf( patch_order.front() ) ), false ); - patch_order.pop_front(); - } -} - -bool PrinterJob::writeProlog (osl::File* pFile, const JobData& rJobData ) -{ - WritePS( pFile, "%%BeginProlog\n" ); - - // JobPatchFile feature needs to be emitted at begin of prolog - writeJobPatch( pFile, rJobData ); - - static const sal_Char pProlog[] = { - "%%BeginResource: procset PSPrint-Prolog 1.0 0\n" - "/ISO1252Encoding [\n" - "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" - "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" - "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" - "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" - "/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle\n" - "/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash\n" - "/zero /one /two /three /four /five /six /seven\n" - "/eight /nine /colon /semicolon /less /equal /greater /question\n" - "/at /A /B /C /D /E /F /G\n" - "/H /I /J /K /L /M /N /O\n" - "/P /Q /R /S /T /U /V /W\n" - "/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore\n" - "/grave /a /b /c /d /e /f /g\n" - "/h /i /j /k /l /m /n /o\n" - "/p /q /r /s /t /u /v /w\n" - "/x /y /z /braceleft /bar /braceright /asciitilde /unused\n" - "/Euro /unused /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl\n" - "/circumflex /perthousand /Scaron /guilsinglleft /OE /unused /Zcaron /unused\n" - "/unused /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash\n" - "/tilde /trademark /scaron /guilsinglright /oe /unused /zcaron /Ydieresis\n" - "/space /exclamdown /cent /sterling /currency /yen /brokenbar /section\n" - "/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron\n" - "/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered\n" - "/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown\n" - "/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla\n" - "/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis\n" - "/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply\n" - "/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls\n" - "/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla\n" - "/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis\n" - "/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide\n" - "/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] def\n" - "\n" - "/psp_definefont { exch dup findfont dup length dict begin { 1 index /FID ne\n" - "{ def } { pop pop } ifelse } forall /Encoding 3 -1 roll def\n" - "currentdict end exch pop definefont pop } def\n" - "\n" - "/pathdict dup 8 dict def load begin\n" - "/rcmd { { currentfile 1 string readstring pop 0 get dup 32 gt { exit }\n" - "{ pop } ifelse } loop dup 126 eq { pop exit } if 65 sub dup 16#3 and 1\n" - "add exch dup 16#C and -2 bitshift 16#3 and 1 add exch 16#10 and 16#10\n" - "eq 3 1 roll exch } def\n" - "/rhex { dup 1 sub exch currentfile exch string readhexstring pop dup 0\n" - "get dup 16#80 and 16#80 eq dup 3 1 roll { 16#7f and } if 2 index 0 3\n" - "-1 roll put 3 1 roll 0 0 1 5 -1 roll { 2 index exch get add 256 mul }\n" - "for 256 div exch pop exch { neg } if } def\n" - "/xcmd { rcmd exch rhex exch rhex exch 5 -1 roll add exch 4 -1 roll add\n" - "1 index 1 index 5 -1 roll { moveto } { lineto } ifelse } def end\n" - "/readpath { 0 0 pathdict begin { xcmd } loop end pop pop } def\n" - "\n" - "systemdict /languagelevel known not {\n" - "/xshow { exch dup length 0 1 3 -1 roll 1 sub { dup 3 index exch get\n" - "exch 2 index exch get 1 string dup 0 4 -1 roll put currentpoint 3 -1\n" - "roll show moveto 0 rmoveto } for pop pop } def\n" - "/rectangle { 4 -2 roll moveto 1 index 0 rlineto 0 exch rlineto neg 0\n" - "rlineto closepath } def\n" - "/rectfill { rectangle fill } def\n" - "/rectstroke { rectangle stroke } def } if\n" - "/bshow { currentlinewidth 3 1 roll currentpoint 3 index show moveto\n" - "setlinewidth false charpath stroke setlinewidth } def\n" - "/bxshow { currentlinewidth 4 1 roll setlinewidth exch dup length 1 sub\n" - "0 1 3 -1 roll { 1 string 2 index 2 index get 1 index exch 0 exch put dup\n" - "currentpoint 3 -1 roll show moveto currentpoint 3 -1 roll false charpath\n" - "stroke moveto 2 index exch get 0 rmoveto } for pop pop setlinewidth } def\n" - "\n" - "/psp_lzwfilter { currentfile /ASCII85Decode filter /LZWDecode filter } def\n" - "/psp_ascii85filter { currentfile /ASCII85Decode filter } def\n" - "/psp_lzwstring { psp_lzwfilter 1024 string readstring } def\n" - "/psp_ascii85string { psp_ascii85filter 1024 string readstring } def\n" - "/psp_imagedict {\n" - "/psp_bitspercomponent { 3 eq { 1 }{ 8 } ifelse } def\n" - "/psp_decodearray { [ [0 1 0 1 0 1] [0 255] [0 1] [0 255] ] exch get }\n" - "def 7 dict dup\n" - "/ImageType 1 put dup\n" - "/Width 7 -1 roll put dup\n" - "/Height 5 index put dup\n" - "/BitsPerComponent 4 index psp_bitspercomponent put dup\n" - "/Decode 5 -1 roll psp_decodearray put dup\n" - "/ImageMatrix [1 0 0 1 0 0] dup 5 8 -1 roll put put dup\n" - "/DataSource 4 -1 roll 1 eq { psp_lzwfilter } { psp_ascii85filter } ifelse put\n" - "} def\n" - "%%EndResource\n" - "%%EndProlog\n" - }; - static const sal_Char pSO52CompatProlog[] = { - "%%BeginResource: procset PSPrint-Prolog 1.0 0\n" - "/ISO1252Encoding [\n" - "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" - "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" - "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" - "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" - "/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright\n" - "/parenleft /parenright /asterisk /plus /comma /minus /period /slash\n" - "/zero /one /two /three /four /five /six /seven\n" - "/eight /nine /colon /semicolon /less /equal /greater /question\n" - "/at /A /B /C /D /E /F /G\n" - "/H /I /J /K /L /M /N /O\n" - "/P /Q /R /S /T /U /V /W\n" - "/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore\n" - "/grave /a /b /c /d /e /f /g\n" - "/h /i /j /k /l /m /n /o\n" - "/p /q /r /s /t /u /v /w\n" - "/x /y /z /braceleft /bar /braceright /asciitilde /unused\n" - "/Euro /unused /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl\n" - "/circumflex /perthousand /Scaron /guilsinglleft /OE /unused /Zcaron /unused\n" - "/unused /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash\n" - "/tilde /trademark /scaron /guilsinglright /oe /unused /zcaron /Ydieresis\n" - "/space /exclamdown /cent /sterling /currency /yen /brokenbar /section\n" - "/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron\n" - "/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered\n" - "/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown\n" - "/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla\n" - "/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis\n" - "/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply\n" - "/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls\n" - "/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla\n" - "/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis\n" - "/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide\n" - "/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] def\n" - "\n" - "/psp_definefont { exch dup findfont dup length dict begin { 1 index /FID ne\n" - "{ def } { pop pop } ifelse } forall /Encoding 3 -1 roll def\n" - "currentdict end exch pop definefont pop } def\n" - "\n" - "/pathdict dup 8 dict def load begin\n" - "/rcmd { { currentfile 1 string readstring pop 0 get dup 32 gt { exit }\n" - "{ pop } ifelse } loop dup 126 eq { pop exit } if 65 sub dup 16#3 and 1\n" - "add exch dup 16#C and -2 bitshift 16#3 and 1 add exch 16#10 and 16#10\n" - "eq 3 1 roll exch } def\n" - "/rhex { dup 1 sub exch currentfile exch string readhexstring pop dup 0\n" - "get dup 16#80 and 16#80 eq dup 3 1 roll { 16#7f and } if 2 index 0 3\n" - "-1 roll put 3 1 roll 0 0 1 5 -1 roll { 2 index exch get add 256 mul }\n" - "for 256 div exch pop exch { neg } if } def\n" - "/xcmd { rcmd exch rhex exch rhex exch 5 -1 roll add exch 4 -1 roll add\n" - "1 index 1 index 5 -1 roll { moveto } { lineto } ifelse } def end\n" - "/readpath { 0 0 pathdict begin { xcmd } loop end pop pop } def\n" - "\n" - "systemdict /languagelevel known not {\n" - "/xshow { exch dup length 0 1 3 -1 roll 1 sub { dup 3 index exch get\n" - "exch 2 index exch get 1 string dup 0 4 -1 roll put currentpoint 3 -1\n" - "roll show moveto 0 rmoveto } for pop pop } def\n" - "/rectangle { 4 -2 roll moveto 1 index 0 rlineto 0 exch rlineto neg 0\n" - "rlineto closepath } def\n" - "/rectfill { rectangle fill } def\n" - "/rectstroke { rectangle stroke } def } if\n" - "/bshow { currentlinewidth 3 1 roll currentpoint 3 index show moveto\n" - "setlinewidth false charpath stroke setlinewidth } def\n" - "/bxshow { currentlinewidth 4 1 roll setlinewidth exch dup length 1 sub\n" - "0 1 3 -1 roll { 1 string 2 index 2 index get 1 index exch 0 exch put dup\n" - "currentpoint 3 -1 roll show moveto currentpoint 3 -1 roll false charpath\n" - "stroke moveto 2 index exch get 0 rmoveto } for pop pop setlinewidth } def\n" - "\n" - "/psp_lzwfilter { currentfile /ASCII85Decode filter /LZWDecode filter } def\n" - "/psp_ascii85filter { currentfile /ASCII85Decode filter } def\n" - "/psp_lzwstring { psp_lzwfilter 1024 string readstring } def\n" - "/psp_ascii85string { psp_ascii85filter 1024 string readstring } def\n" - "/psp_imagedict {\n" - "/psp_bitspercomponent { 3 eq { 1 }{ 8 } ifelse } def\n" - "/psp_decodearray { [ [0 1 0 1 0 1] [0 255] [0 1] [0 255] ] exch get }\n" - "def 7 dict dup\n" - "/ImageType 1 put dup\n" - "/Width 7 -1 roll put dup\n" - "/Height 5 index put dup\n" - "/BitsPerComponent 4 index psp_bitspercomponent put dup\n" - "/Decode 5 -1 roll psp_decodearray put dup\n" - "/ImageMatrix [1 0 0 1 0 0] dup 5 8 -1 roll put put dup\n" - "/DataSource 4 -1 roll 1 eq { psp_lzwfilter } { psp_ascii85filter } ifelse put\n" - "} def\n" - "%%EndResource\n" - "%%EndProlog\n" - }; - WritePS (pFile, m_pGraphics && m_pGraphics->getStrictSO52Compatibility() ? pSO52CompatProlog : pProlog); - - return true; -} - -bool PrinterJob::writeSetup( osl::File* pFile, const JobData& rJob ) -{ - WritePS (pFile, "%%BeginSetup\n%\n"); - - // download fonts - std::list< rtl::OString > aFonts[2]; - m_pGraphics->writeResources( pFile, aFonts[0], aFonts[1] ); - - for( int i = 0; i < 2; i++ ) - { - if( !aFonts[i].empty() ) - { - std::list< rtl::OString >::const_iterator it = aFonts[i].begin(); - rtl::OStringBuffer aLine( 256 ); - if( i == 0 ) - aLine.append( "%%DocumentSuppliedResources: font " ); - else - aLine.append( "%%DocumentNeededResources: font " ); - aLine.append( *it ); - aLine.append( "\n" ); - WritePS ( pFile, aLine.getStr() ); - while( (++it) != aFonts[i].end() ) - { - aLine.setLength(0); - aLine.append( "%%+ font " ); - aLine.append( *it ); - aLine.append( "\n" ); - WritePS ( pFile, aLine.getStr() ); - } - } - } - - bool bSuccess = true; - // in case of external print dialog the number of copies is prepended - // to the job, let us not complicate things by emitting our own copy count - bool bExternalDialog = PrinterInfoManager::get().checkFeatureToken( GetPrinterName(), "external_dialog" ); - if( ! bExternalDialog && rJob.m_nCopies > 1 ) - { - // setup code - ByteString aLine( "/#copies " ); - aLine += ByteString::CreateFromInt32( rJob.m_nCopies ); - aLine += " def\n"; - sal_uInt64 nWritten = 0; - bSuccess = pFile->write( aLine.GetBuffer(), aLine.Len(), nWritten ) - || nWritten != aLine.Len() ? false : true; - - if( bSuccess && GetPostscriptLevel( &rJob ) >= 2 ) - WritePS (pFile, "<< /NumCopies null /Policies << /NumCopies 1 >> >> setpagedevice\n" ); - } - - bool bFeatureSuccess = writeFeatureList( pFile, rJob, true ); - - WritePS (pFile, "%%EndSetup\n"); - - return bSuccess && bFeatureSuccess; -} diff --git a/vcl/unx/source/printergfx/psheader.ps b/vcl/unx/source/printergfx/psheader.ps deleted file mode 100644 index 6a0e350d9ddc..000000000000 --- a/vcl/unx/source/printergfx/psheader.ps +++ /dev/null @@ -1,368 +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. -% -%************************************************************************* - -% -% -% readpath -% -% The intention of readpath is to save disk space since the vcl clip region routines -% produce a huge amount of lineto/moveto commands -% -% The principal idea is to maintain the current point on stack and to provide only deltas -% in the command. These deltas are added to the current point. The new point is used for -% the lineto and moveto command and saved on stack for the next command. -% -% pathdict implements binary/hex representation of lineto and moveto commands. -% The command consists of a 1byte opcode to switch between lineto and moveto and the size -% of the following delta-x and delta-y values. The opcode is read with /rcmd, the two -% coordinates are read with /rhex. The whole command is executed with /xcmd -% -% - -/pathdict dup 8 dict def load -begin - - % the command is of the bit format cxxyy - % with c=0 meaning lineto - % c=1 meaning moveto - % xx is a 2bit value for the number of bytes for x position - % yy is the same for y, values are off by one: 00 means 1; 11 means 4 ! - % the command has been added to 'A' to be always in the ascii character - % range. the command is followed by 2*xx + 2*yy hexchars. - % '~' denotes the special case of EOD - /rcmd { - { - currentfile 1 string readstring % s bool - pop % s - 0 get % s[0] - % --- check wether s[0] is CR, LF ... - dup 32 gt % s > ' ' ? then read on - { exit } - { pop } - ifelse - } - loop - - dup 126 eq { pop exit } if % -- Exit loop if cmd is '~' - 65 sub % cmd=s[0]-'A' - % -- Separate yy bits - dup 16#3 and 1 add % cmd yy - % -- Separate xx bits - exch % yy cmd - dup 16#C and -2 bitshift - 16#3 and 1 add exch % yy xx cmd - % -- Separate command bit - 16#10 and 16#10 eq % yy xx bool - 3 1 roll exch % bool xx yy - } def - - % length rhex -- reads a signed hex value of given length - % the left most bit of char 0 is considered as the sign (0 means '+', 1 means '-') - % the rest of the bits is considered to be the abs value. Please note that this - % does not match the C binary representation of integers - /rhex { - dup 1 sub exch % l-1 l - currentfile exch string readhexstring % l-1 substring[l] bool - pop - dup 0 get dup % l-1 s s[0] s[0] - % -- Extract the sign - 16#80 and 16#80 eq dup % l-1 s s[0] sign=- sign=- - % -- Mask out the sign bit and put value back - 3 1 roll % l-1 s sign=- s[0] sign=- - { 16#7f and } if % l-1 s sign=- +s[0] - 2 index 0 % l-1 s sign=- +s[0] s 0 - 3 -1 roll put % l-1 s sign=- s 0 +s[0] - % -- Read loop: add to prev sum, mul with 256 - 3 1 roll 0 % sign=- l-1 s Sum=0 - 0 1 5 -1 roll % sign=- s Sum=0 0 1 l-1 - { % sign=- s Sum idx - 2 index exch % sign=- s Sum s idx - get % sign=- s Sum s[idx] - add 256 mul % sign=- s Sum=(s[idx]+Sum)*256 - } - for - % -- mul was once too often, weave in the sign - 256 div % sign=- s Sum/256 - exch pop % sign=- Sum/256 - exch { neg } if % (sign=- ? -Sum : Sum) - } def - - % execute a single command, the former x and y position is already on stack - % only offsets are read from cmdstring - /xcmd { % x y - rcmd % x y bool wx wy - exch rhex % x y bool wy Dx - exch rhex % x y bool Dx Dy - exch 5 -1 roll % y bool Dy Dx x - add exch % y bool X Dy - 4 -1 roll add % bool X Y - 1 index 1 index % bool X Y X Y - 5 -1 roll % X Y X Y bool - { moveto } - { lineto } - ifelse % X Y - } def -end - -/readpath -{ - 0 0 % push initial-x initial-y - pathdict begin - { xcmd } loop - end - pop pop % pop final-x final-y -} def - -% -% -% if languagelevel is not in the systemdict then its level 1 interpreter: -% provide compatibility routines -% -% - -systemdict /languagelevel known not -{ - % string numarray xxshow - - % does only work for single byte fonts - /xshow { - exch dup % a s s - length 0 1 % a s l(s) 1 1 - 3 -1 roll 1 sub % a s 0 1 l(s)-1 - { % a s idx - dup % a s idx idx - % -- extract the delta offset - 3 index exch get % a s idx a[idx] - % -- extract the character - exch % a s a[idx] idx - 2 index exch get % a s a[idx] s[idx] - % -- create a tmp string for show - 1 string dup 0 % a s a[idx] s[idx] s1 s1 0 - 4 -1 roll % a s a[idx] s1 s1 0 s[idx] - put % a s a[idx] s1 - % -- store the current point - currentpoint 3 -1 roll % a s a[idx] x y s1 - % -- draw the character - show % a s a[idx] x y - % -- move to the offset - moveto 0 rmoveto % a s - } - for - pop pop % - - } def - - % x y width height rectfill - % x y width height rectshow - % in contrast to the languagelevel 2 operator - % they use and change the currentpath - /rectangle { - 4 -2 roll % width height x y - moveto % width height - 1 index 0 rlineto % width height % rmoveto(width, 0) - 0 exch rlineto % width % rmoveto(0, height) - neg 0 rlineto % - % rmoveto(-width, 0) - closepath - } def - - /rectfill { rectangle fill } def - /rectstroke { rectangle stroke } def -} -if - -% -- small test program -% 75 75 moveto /Times-Roman findfont 12 scalefont setfont -% <292a2b2c2d2e2f30313233343536373839> -% [5 5 6 6 6 6 6 6 6 6 6 6 7 7 7 7 5] xshow <21>[0] xshow -% showpage - -% -% -% shortcuts for image header with compression -% -% - -/psp_lzwfilter { - currentfile /ASCII85Decode filter /LZWDecode filter -} def -/psp_ascii85filter { - currentfile /ASCII85Decode filter -} def -/psp_lzwstring { - psp_lzwfilter 1024 string readstring -} def -/psp_ascii85string { - psp_ascii85filter 1024 string readstring -} def -/psp_imagedict { - /psp_bitspercomponent { - 3 eq - { 1 } - { 8 } - ifelse - } def - /psp_decodearray { - [ [0 1 0 1 0 1] [0 255] [0 1] [0 255] ] exch get - } def - - 7 dict dup - /ImageType 1 put dup - /Width 7 -1 roll put dup - /Height 5 index put dup - /BitsPerComponent 4 index - psp_bitspercomponent put dup - /Decode 5 -1 roll - psp_decodearray put dup - /ImageMatrix [1 0 0 1 0 0] dup - 5 8 -1 roll put put dup - /DataSource 4 -1 roll - 1 eq - { psp_lzwfilter } - { psp_ascii85filter } - ifelse put -} def - - -% -% -% font encoding and reencoding -% -% - -/ISO1252Encoding [ - /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef - /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef - /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef - /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef - /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle - /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash - /zero /one /two /three /four /five /six /seven - /eight /nine /colon /semicolon /less /equal /greater /question - /at /A /B /C /D /E /F /G - /H /I /J /K /L /M /N /O - /P /Q /R /S /T /U /V /W - /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore - /grave /a /b /c /d /e /f /g - /h /i /j /k /l /m /n /o - /p /q /r /s /t /u /v /w - /x /y /z /braceleft /bar /braceright /asciitilde /unused - /Euro /unused /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl - /circumflex /perthousand /Scaron /guilsinglleft /OE /unused /Zcaron /unused - /unused /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash - /tilde /trademark /scaron /guilsinglright /oe /unused /zcaron /Ydieresis - /space /exclamdown /cent /sterling /currency /yen /brokenbar /section - /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron - /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered - /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown - /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla - /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis - /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply - /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls - /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla - /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis - /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide - /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis -] def - -% /fontname /encoding psp_findfont -/psp_findfont { - exch dup % encoding fontname fontname - findfont % encoding fontname - dup length dict - begin - { - 1 index /FID ne - { def } - { pop pop } - ifelse - } forall - /Encoding 3 -1 roll def - currentdict - end - /psp_reencodedfont exch definefont -} def - -% bshow shows a text in artificial bold -% this is achieved by first showing the text -% then stroking its outline over it with -% the linewidth set to the second parameter -% usage: (string) num bshow - -/bshow { - currentlinewidth % save current linewidth - 3 1 roll % move it to the last stack position - currentpoint % save the current point - 3 index % copy the string to show - show % show it - moveto % move to the original coordinates again - setlinewidth % set the linewidth - false charpath % create the outline path of the shown string - stroke % and stroke it - setlinewidth % reset the stored linewidth -} def - -% bxshow shows a text with a delta array in artificial bold -% that is it does what bshow does for show -% usage: (string) [deltaarray] num bxshow - -/bxshow { - currentlinewidth % save linewidth - 4 1 roll % move it to the last stack position - setlinewidth % set the new linewidth - exch % exchange string and delta array - dup - length % get length of string - 1 sub % prepare parameters for {} for - 0 1 - 3 -1 roll - { - 1 string % create a string object length 1 - 2 index % get the text - 2 index % get charpos (for index variable) - get % have char value at charpos - 1 index % prepare string for put - exch - 0 - exch - put % put into string of length 1 - dup % duplicate the it - currentpoint % save current position - 3 -1 roll % prepare show - show % show the character - moveto % move back to beginning - currentpoint % save current position - 3 -1 roll % prepare outline path of character - false charpath - stroke % stroke it - moveto % move back - % now move to next point - 2 index % get advance array - exch % get charpos - get % get advance element - 0 rmoveto % advance current position - } for - pop pop % remove string and delta array - setlinewidth % restore linewidth -} def diff --git a/vcl/unx/source/printergfx/psputil.cxx b/vcl/unx/source/printergfx/psputil.cxx deleted file mode 100644 index 370114be47cb..000000000000 --- a/vcl/unx/source/printergfx/psputil.cxx +++ /dev/null @@ -1,268 +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_vcl.hxx" - -#include - -#include "psputil.hxx" - -#include "tools/debug.hxx" - -namespace psp { - -/* - * string convenience routines - */ - -sal_Int32 -getHexValueOf (sal_Int32 nValue, sal_Char* pBuffer) -{ - const static sal_Char pHex [0x10] = { - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; - - pBuffer[0] = pHex [(nValue & 0xF0) >> 4]; - pBuffer[1] = pHex [(nValue & 0x0F) ]; - - return 2; -} - -sal_Int32 -getAlignedHexValueOf (sal_Int32 nValue, sal_Char* pBuffer) -{ - // get sign - sal_Bool bNegative = nValue < 0; - nValue = bNegative ? -nValue : nValue; - - // get required buffer size, must be a multiple of two - sal_Int32 nPrecision; - if (nValue < 0x80) - nPrecision = 2; - else - if (nValue < 0x8000) - nPrecision = 4; - else - if (nValue < 0x800000) - nPrecision = 6; - else - nPrecision = 8; - - // convert the int into its hex representation, write it into the buffer - sal_Int32 nRet = nPrecision; - while (nPrecision) - { - nPrecision -= getHexValueOf (nValue % 256, pBuffer + nPrecision - 2 ); - nValue /= 256; - } - - // set sign bit - if (bNegative) - { - switch (pBuffer[0]) - { - case '0' : pBuffer[0] = '8'; break; - case '1' : pBuffer[0] = '9'; break; - case '2' : pBuffer[0] = 'A'; break; - case '3' : pBuffer[0] = 'B'; break; - case '4' : pBuffer[0] = 'C'; break; - case '5' : pBuffer[0] = 'D'; break; - case '6' : pBuffer[0] = 'E'; break; - case '7' : pBuffer[0] = 'F'; break; - default: DBG_ERROR("Already a signed value"); - } - } - - // report precision - return nRet; -} - - -sal_Int32 -getValueOf (sal_Int32 nValue, sal_Char* pBuffer) -{ - sal_Int32 nChar = 0; - if (nValue < 0) - { - pBuffer [nChar++] = '-'; - nValue *= -1; - } - else - if (nValue == 0) - { - pBuffer [nChar++] = '0'; - return nChar; - } - - sal_Char pInvBuffer [32]; - sal_Int32 nInvChar = 0; - while (nValue > 0) - { - pInvBuffer [nInvChar++] = '0' + nValue % 10; - nValue /= 10; - } - while (nInvChar > 0) - { - pBuffer [nChar++] = pInvBuffer [--nInvChar]; - } - - return nChar; -} - -sal_Int32 -appendStr (const sal_Char* pSrc, sal_Char* pDst) -{ - sal_Int32 nBytes = strlen (pSrc); - strncpy (pDst, pSrc, nBytes + 1); - - return nBytes; -} - -sal_Int32 -appendStr (const sal_Char* pSrc, sal_Char* pDst, sal_Int32 nBytes) -{ - strncpy (pDst, pSrc, nBytes); - pDst [nBytes] = '\0'; - return nBytes; -} - -/* - * copy strings to file - */ - -sal_Bool -WritePS (osl::File* pFile, const sal_Char* pString) -{ - sal_uInt64 nInLength = rtl_str_getLength (pString); - sal_uInt64 nOutLength = 0; - - if (nInLength > 0 && pFile) - pFile->write (pString, nInLength, nOutLength); - - return nInLength == nOutLength; -} - -sal_Bool -WritePS (osl::File* pFile, const sal_Char* pString, sal_uInt64 nInLength) -{ - sal_uInt64 nOutLength = 0; - - if (nInLength > 0 && pFile) - pFile->write (pString, nInLength, nOutLength); - - return nInLength == nOutLength; -} - -sal_Bool -WritePS (osl::File* pFile, const rtl::OString &rString) -{ - sal_uInt64 nInLength = rString.getLength(); - sal_uInt64 nOutLength = 0; - - if (nInLength > 0 && pFile) - pFile->write (rString, nInLength, nOutLength); - - return nInLength == nOutLength; -} - -sal_Bool -WritePS (osl::File* pFile, const rtl::OUString &rString) -{ - return WritePS (pFile, rtl::OUStringToOString(rString, RTL_TEXTENCODING_ASCII_US)); -} - -/* - * cache converter for use in postscript drawing routines - */ - -ConverterFactory::ConverterFactory() -{ -} - -ConverterFactory::~ConverterFactory () -{ - for( std::map< rtl_TextEncoding, rtl_UnicodeToTextConverter >::const_iterator it = m_aConverters.begin(); it != m_aConverters.end(); ++it ) - rtl_destroyUnicodeToTextConverter (it->second); -} - -rtl_UnicodeToTextConverter -ConverterFactory::Get (rtl_TextEncoding nEncoding) -{ - if (rtl_isOctetTextEncoding( nEncoding )) - { - std::map< rtl_TextEncoding, rtl_UnicodeToTextConverter >::const_iterator it = - m_aConverters.find( nEncoding ); - rtl_UnicodeToTextConverter aConverter; - if (it == m_aConverters.end()) - { - aConverter = rtl_createUnicodeToTextConverter (nEncoding); - m_aConverters[nEncoding] = aConverter; - } - else - aConverter = it->second; - return aConverter; - } - return NULL; -} - -// wrapper for rtl_convertUnicodeToText that handles the usual cases for -// textconversion in drawtext -sal_Size -ConverterFactory::Convert (const sal_Unicode *pText, int nTextLen, - sal_uChar *pBuffer, sal_Size nBufferSize, rtl_TextEncoding nEncoding) -{ - const sal_uInt32 nCvtFlags = RTL_UNICODETOTEXT_FLAGS_UNDEFINED_QUESTIONMARK - | RTL_UNICODETOTEXT_FLAGS_INVALID_QUESTIONMARK ; - sal_uInt32 nCvtInfo; - sal_Size nCvtChars; - - rtl_UnicodeToTextConverter aConverter = Get (nEncoding); - rtl_UnicodeToTextContext aContext = rtl_createUnicodeToTextContext (aConverter); - - sal_Size nSize = rtl_convertUnicodeToText (aConverter, aContext, - pText, nTextLen, (sal_Char*)pBuffer, nBufferSize, - nCvtFlags, &nCvtInfo, &nCvtChars); - - rtl_destroyUnicodeToTextContext (aConverter, aContext); - - return nSize; -} - -ConverterFactory* -GetConverterFactory () -{ - static ConverterFactory* pCvt = NULL; - - if (pCvt == NULL) - pCvt = new ConverterFactory; - - return pCvt; -} - - -} /* namespace psp */ diff --git a/vcl/unx/source/printergfx/psputil.hxx b/vcl/unx/source/printergfx/psputil.hxx deleted file mode 100644 index d4af41bb95ed..000000000000 --- a/vcl/unx/source/printergfx/psputil.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 _PSPRINT_PRINTERUTIL_HXX_ -#define _PSPRINT_PRINTERUTIL_HXX_ - -#include "osl/file.hxx" - -#include "rtl/ustring.hxx" -#include "rtl/string.hxx" -#include "rtl/tencinfo.h" -#include "rtl/textcvt.h" - -#include - -namespace psp { - -/* - * string convenience routines - * sizeof(pBuffer) must be at least 2 Bytes, 0x00 <= nValue <= 0xFF, - * effective buffer of get*ValueOf() is NOT NULL-terminated - */ -sal_Int32 getHexValueOf (sal_Int32 nValue, sal_Char* pBuffer); -sal_Int32 getAlignedHexValueOf (sal_Int32 nValue, sal_Char* pBuffer); -sal_Int32 getValueOf (sal_Int32 nValue, sal_Char* pBuffer); -sal_Int32 appendStr (const sal_Char* pSrc, sal_Char* pDst); -sal_Int32 appendStr (const sal_Char* pSrc, sal_Char* pDst, sal_Int32 nBytes); - -sal_Bool WritePS (osl::File* pFile, const sal_Char* pString); -sal_Bool WritePS (osl::File* pFile, const sal_Char* pString, sal_uInt64 nInLength); -sal_Bool WritePS (osl::File* pFile, const rtl::OString &rString); -sal_Bool WritePS (osl::File* pFile, const rtl::OUString &rString); - -class ConverterFactory -{ - -public: - ConverterFactory(); - ~ConverterFactory(); - rtl_UnicodeToTextConverter Get (rtl_TextEncoding nEncoding); - sal_Size Convert (const sal_Unicode *pText, int nTextLen, - sal_uChar *pBuffer, sal_Size nBufferSize, - rtl_TextEncoding nEncoding); -private: - - std::map< rtl_TextEncoding, rtl_UnicodeToTextConverter > m_aConverters; -}; - -ConverterFactory* GetConverterFactory (); - -} /* namespace psp */ - -#endif /* _PSPRINT_PRINTERUTIL_HXX_ */ - diff --git a/vcl/unx/source/printergfx/text_gfx.cxx b/vcl/unx/source/printergfx/text_gfx.cxx deleted file mode 100644 index 1901aa0d004a..000000000000 --- a/vcl/unx/source/printergfx/text_gfx.cxx +++ /dev/null @@ -1,862 +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_vcl.hxx" - -#include - -#include "psputil.hxx" -#include "glyphset.hxx" - -#include "vcl/printergfx.hxx" -#include "vcl/fontmanager.hxx" -#include "vcl/helper.hxx" - -#include "osl/thread.h" - -#include "sal/alloca.h" - -using namespace psp ; - -namespace psp { -/* - container for a font and its helper fonts: - 1st font is the font substitute e.g. helvetica substitutes arial on the printer - 2nd is the font itself - 3rd is a fallback font, usually a font with unicode glyph repertoir (e.g. andale) - symbol fonts (adobe-fontspecific) may need special glyphmapping - (symbol page vc. latin page) -*/ -class Font3 -{ - private: - - #define Font3Size 3 - - fontID mpFont [Font3Size]; - bool mbSymbol; - - public: - - fontID GetFont (int nIdx) const - { return nIdx < Font3Size ? mpFont[nIdx] : -1 ; } - bool IsSymbolFont () const - { return mbSymbol; } - - Font3 (const PrinterGfx &rGfx); - ~Font3 () {} -}; - -Font3::Font3(const PrinterGfx &rGfx) -{ - mpFont[0] = rGfx.getFontSubstitute(); - mpFont[1] = rGfx.GetFontID(); - mpFont[2] = rGfx.getFallbackID(); - // mpFont[2] = rGfx.GetFontID(); - - PrintFontManager &rMgr = PrintFontManager::get(); - mbSymbol = mpFont[1] != -1 ? - rMgr.getFontEncoding(mpFont[1]) == RTL_TEXTENCODING_SYMBOL : false; -} - -} // namespace psp - -static int getVerticalDeltaAngle( sal_Unicode nChar ) -{ - int nAngle = 0; - if( ( nChar >= 0x1100 && nChar < 0x11fa ) || - ( nChar >= 0x3000 && nChar < 0xfb00 ) || - ( nChar >= 0xfe20 && nChar < 0xfe70 ) || - ( nChar >= 0xff00 && nChar < 0xff64 ) - ) - { - /* #i52932# remember: - nChar == 0x2010 || nChar == 0x2015 - nChar == 0x2016 || nChar == 0x2026 - - are nAngle = 0 also, but already handled in the first if - */ - if( ( nChar >= 0x3008 && nChar < 0x3019 && nChar != 0x3012 ) || - nChar == 0xff3b || nChar == 0xff3d || - (nChar >= 0xff6b && nChar < 0xff64 ) || - nChar == 0xffe3 - ) - nAngle = 0; - else if( nChar == 0x30fc ) - nAngle = -900; - else - nAngle = 900; - } - return nAngle; -} - -void -PrinterGfx::PSUploadPS1Font (sal_Int32 nFontID) -{ - std::list< sal_Int32 >::iterator aFont; - // already in the document header ? - for (aFont = maPS1Font.begin(); aFont != maPS1Font.end(); ++aFont ) - if( nFontID == *aFont ) - return; - - // no occurrenc yet, mark for download - // add the fontid to the list - maPS1Font.push_back (nFontID); -} - -/* - * implement text handling printer routines, - */ - -sal_uInt16 -PrinterGfx::SetFont( - sal_Int32 nFontID, - sal_Int32 nHeight, - sal_Int32 nWidth, - sal_Int32 nAngle, - bool bVertical, - bool bArtItalic, - bool bArtBold - ) -{ - // font and encoding will be set by drawText again immediately - // before PSShowText - mnFontID = nFontID; - maVirtualStatus.maFont = rtl::OString(); - maVirtualStatus.maEncoding = RTL_TEXTENCODING_DONTKNOW; - maVirtualStatus.mnTextHeight = nHeight; - maVirtualStatus.mnTextWidth = nWidth; - maVirtualStatus.mbArtItalic = bArtItalic; - maVirtualStatus.mbArtBold = bArtBold; - mnTextAngle = nAngle; - mbTextVertical = bVertical; - - return 0; -} - -sal_uInt16 -PrinterGfx::SetFallbackFont ( sal_Int32 nFontID ) -{ - mnFallbackID = nFontID; - return 0; -} - -void PrinterGfx::drawGlyphs( - const Point& rPoint, - sal_uInt32* pGlyphIds, - sal_Unicode* pUnicodes, - sal_Int16 nLen, - sal_Int32* pDeltaArray - ) -{ - - // draw the string - // search for a glyph set matching the set font - std::list< GlyphSet >::iterator aIter; - for (aIter = maPS3Font.begin(); aIter != maPS3Font.end(); aIter++) - if ( ((*aIter).GetFontID() == mnFontID) - && ((*aIter).IsVertical() == mbTextVertical)) - { - (*aIter).DrawGlyphs (*this, rPoint, pGlyphIds, pUnicodes, nLen, pDeltaArray); - break; - } - - // not found ? create a new one - if (aIter == maPS3Font.end()) - { - maPS3Font.push_back (GlyphSet(mnFontID, mbTextVertical)); - maPS3Font.back().DrawGlyphs (*this, rPoint, pGlyphIds, pUnicodes, nLen, pDeltaArray); - } -} - -void PrinterGfx::DrawGlyphs( - const Point& rPoint, - sal_GlyphId* pGlyphIds, - sal_Unicode* pUnicodes, - sal_Int16 nLen, - sal_Int32* pDeltaArray - ) -{ - if( nLen <= 0 ) - return; - - if ( !mrFontMgr.isFontDownloadingAllowed( mnFontID ) ) - { - LicenseWarning(rPoint, pUnicodes, nLen, pDeltaArray); - return; - } - - if( mrFontMgr.getFontType( mnFontID ) != fonttype::TrueType ) - { - DrawText( rPoint, pUnicodes, nLen, pDeltaArray ); - return; - } - - // move and rotate the user coordinate system - // avoid the gsave/grestore for the simple cases since it allows - // reuse of the current font if it hasn't changed - sal_Int32 nCurrentTextAngle = mnTextAngle; - Point aPoint( rPoint ); - - if (nCurrentTextAngle != 0) - { - PSGSave (); - PSTranslate (rPoint); - PSRotate (nCurrentTextAngle); - mnTextAngle = 0; - aPoint = Point( 0, 0 ); - } - - if( mbTextVertical ) - { - // vertical glyphs can have an additional rotation ... sigh. - // so break up text in chunks of normal glyphs and print out - // specially rotated glyphs extra - sal_uInt32* pTempGlyphIds = (sal_uInt32*)alloca(sizeof(sal_Int32)*nLen); - sal_Int32* pTempDelta = (sal_Int32*)alloca(sizeof(sal_Int32)*nLen); - sal_Unicode* pTempUnicodes = (sal_Unicode*)alloca(sizeof(sal_Unicode)*nLen); - sal_Int16 nTempLen = 0; - sal_Int32 nTempFirstDelta = 0; - Point aRotPoint; - sal_Int32 nTextHeight = maVirtualStatus.mnTextHeight; - sal_Int32 nTextWidth = maVirtualStatus.mnTextWidth ? maVirtualStatus.mnTextWidth : maVirtualStatus.mnTextHeight; - sal_Int32 nAscend = mrFontMgr.getFontAscend( mnFontID ); - sal_Int32 nDescend = mrFontMgr.getFontDescend( mnFontID ); - - nDescend = nDescend * nTextHeight / 1000; - nAscend = nAscend * nTextHeight / 1000; - - for( sal_Int16 i = 0; i < nLen; i++ ) - { - const sal_GlyphId nRot = pGlyphIds[i] & GF_ROTMASK; - if( nRot == GF_NONE ) - { - pTempUnicodes[nTempLen] = pUnicodes[i]; - pTempGlyphIds[nTempLen] = pGlyphIds[i]; - if( nTempLen > 0 ) - pTempDelta[nTempLen-1] = pDeltaArray[i-1]-nTempFirstDelta; - else - { - // the first element in pDeltaArray shows - // the offset of the second character - // so if the first glyph is normal - // then we do not need to move the delta indices - // else we have to move them down by one and - // recalculate aPoint and all deltas - if( i != 0 ) - nTempFirstDelta = pDeltaArray[ i-1 ]; - } - nTempLen++; - } - else - { - sal_Int32 nOffset = i > 0 ? pDeltaArray[i-1] : 0; - sal_Int32 nRotAngle = 0; - switch( nRot ) - { - case GF_ROTR: - nRotAngle = 2700; - aRotPoint = Point( -nAscend*nTextWidth/nTextHeight, -nDescend*nTextWidth/nTextHeight - nOffset ); - break; - case GF_VERT: - nRotAngle = 1800; - aRotPoint = Point( -nOffset, (nAscend+nDescend) ); - break; - case GF_ROTL: - nRotAngle = 900; - aRotPoint = Point( -nDescend*nTextWidth/nTextHeight, nOffset + nAscend*nTextWidth/nTextHeight ); - break; - } - sal_GlyphId nRotGlyphId = pGlyphIds[i]; - sal_Unicode nRotUnicode = pUnicodes[i]; - sal_Int32 nRotDelta = 0; - - // transform matrix to new individual direction - PSGSave (); - GraphicsStatus aSaveStatus = maVirtualStatus; - if( nRot != 2 ) // switch font aspect - { - maVirtualStatus.mnTextWidth = nTextHeight; - maVirtualStatus.mnTextHeight = nTextWidth; - } - if( aPoint.X() || aPoint.Y() ) - PSTranslate( aPoint ); - PSRotate (nRotAngle); - // draw the rotated glyph - drawGlyphs( aRotPoint, &nRotGlyphId, &nRotUnicode, 1, &nRotDelta ); - - // restore previous state - maVirtualStatus = aSaveStatus; - PSGRestore(); - } - } - - pGlyphIds = pTempGlyphIds; - pUnicodes = pTempUnicodes; - pDeltaArray = pTempDelta; - nLen = nTempLen; - - aPoint.X() += nTempFirstDelta; - } - - if( nLen > 0 ) - drawGlyphs( aPoint, pGlyphIds, pUnicodes, nLen, pDeltaArray ); - - // restore the user coordinate system - if (nCurrentTextAngle != 0) - { - PSGRestore (); - mnTextAngle = nCurrentTextAngle; - } -} - -void -PrinterGfx::DrawText ( - const Point& rPoint, - const sal_Unicode* pStr, - sal_Int16 nLen, - const sal_Int32* pDeltaArray - ) -{ - fontID nRestoreFont = mnFontID; - - // setup font[substitutes] and map the string into the symbol area in case of - // symbol font - Font3 aFont(*this); - sal_Unicode *pEffectiveStr; - if ( aFont.IsSymbolFont() ) - { - pEffectiveStr = (sal_Unicode*)alloca(nLen * sizeof(pStr[0])); - for (int i = 0; i < nLen; i++) - pEffectiveStr[i] = pStr[i] < 256 ? pStr[i] + 0xF000 : pStr[i]; - } - else - { - pEffectiveStr = const_cast(pStr); - } - - fontID *pFontMap = (fontID*) alloca(nLen * sizeof(fontID)); - sal_Int32 *pCharWidth = (sal_Int32*) alloca(nLen * sizeof(sal_Int32)); - - for( int n = 0; n < nLen; n++ ) - { - CharacterMetric aBBox; - pFontMap[n] = getCharMetric (aFont, pEffectiveStr[n], &aBBox); - pCharWidth[n] = getCharWidth (mbTextVertical, pEffectiveStr[n], &aBBox); - } - - // setup a new delta array, use virtual resolution of 1000 - sal_Int32* pNewDeltaArray = (sal_Int32*)alloca( sizeof( sal_Int32 )*nLen ); - if ( pDeltaArray != 0) - { - for (int i = 0; i < nLen - 1; i++) - pNewDeltaArray[i] = 1000 * pDeltaArray[i]; - pNewDeltaArray[nLen - 1] = 0; - } - else - { - pNewDeltaArray[0] = pCharWidth[0]; - for (int i = 1; i < nLen; i++) - pNewDeltaArray[i] = pNewDeltaArray[i-1] + pCharWidth[i]; - } - - // move and rotate the user coordinate system - // avoid the gsave/grestore for the simple cases since it allows - // reuse of the current font if it hasn't changed - sal_Int32 nCurrentTextAngle = mnTextAngle; - sal_Int32 nCurrentPointX; - sal_Int32 nCurrentPointY; - - if (nCurrentTextAngle != 0) - { - PSGSave (); - PSTranslate (rPoint); - PSRotate (nCurrentTextAngle); - mnTextAngle = 0; - - nCurrentPointX = 0; - nCurrentPointY = 0; - } - else - { - nCurrentPointX = rPoint.X(); - nCurrentPointY = rPoint.Y(); - } - - // draw the string - sal_Int32 nDelta = 0; - for (int nTo = 0; nTo < nLen; ) - { - int nFrom = nTo; - fontID nFont = pFontMap[ nFrom ]; - - while ((nTo < nLen) && (nFont == pFontMap[nTo])) - { - pNewDeltaArray[ nTo ] = (sal_Int32)(((0.5 + pNewDeltaArray[ nTo ]) / 1000.0) - nDelta); - nTo++ ; - } - - SetFont( nFont, - maVirtualStatus.mnTextHeight, maVirtualStatus.mnTextWidth, - mnTextAngle, - mbTextVertical, - maVirtualStatus.mbArtItalic, - maVirtualStatus.mbArtBold - ); - - if (mbTextVertical) - { - drawVerticalizedText( - Point(nCurrentPointX + nDelta, nCurrentPointY), - pEffectiveStr + nFrom, nTo - nFrom, - pNewDeltaArray + nFrom ); - } - else - { - drawText( - Point(nCurrentPointX + nDelta, nCurrentPointY), - pEffectiveStr + nFrom, nTo - nFrom, - pDeltaArray == NULL ? NULL : pNewDeltaArray + nFrom ); - } - nDelta += pNewDeltaArray[ nTo - 1 ]; - } - - // restore the user coordinate system - if (nCurrentTextAngle != 0) - { - PSGRestore (); - mnTextAngle = nCurrentTextAngle; - } - - // restore the original font settings - SetFont( nRestoreFont, - maVirtualStatus.mnTextHeight, maVirtualStatus.mnTextWidth, - mnTextAngle, mbTextVertical, - maVirtualStatus.mbArtItalic, - maVirtualStatus.mbArtBold - ); -} - -void PrinterGfx::drawVerticalizedText( - const Point& rPoint, - const sal_Unicode* pStr, - sal_Int16 nLen, - const sal_Int32* pDeltaArray - ) -{ - sal_Int32* pDelta = (sal_Int32*)alloca( nLen * sizeof(sal_Int32) ); - - int nTextScale = maVirtualStatus.mnTextWidth ? maVirtualStatus.mnTextWidth : maVirtualStatus.mnTextHeight; - int nNormalAngle = mnTextAngle; - int nDeltaAngle, nLastPos = 0; - - double fSin = sin( -2.0*M_PI*nNormalAngle/3600 ); - double fCos = cos( -2.0*M_PI*nNormalAngle/3600 ); - - PrintFontManager &rMgr = PrintFontManager::get(); - PrintFontInfo aInfo; - rMgr.getFontInfo( mnFontID, aInfo ); - - bool* pGsubFlags = (bool*)alloca( nLen * sizeof(bool) ); - rMgr.hasVerticalSubstitutions( mnFontID, pStr, nLen, pGsubFlags ); - - Point aPoint( rPoint ); - for( int i = 0; i < nLen; ) - { - while( ( nDeltaAngle = getVerticalDeltaAngle( pStr[i] ) ) == 0 && i < nLen ) - i++; - if( i <= nLen && i > nLastPos ) - { - for( int n = nLastPos; n < i; n++ ) - pDelta[n] = pDeltaArray[n] - (aPoint.X() - rPoint.X() ); - - SetFont( mnFontID, - maVirtualStatus.mnTextHeight, maVirtualStatus.mnTextWidth, - nNormalAngle, mbTextVertical, - maVirtualStatus.mbArtItalic, - maVirtualStatus.mbArtBold ); - drawText( aPoint, pStr + nLastPos, i - nLastPos, pDelta + nLastPos ); - - aPoint.X() = (sal_Int32)(rPoint.X() + ((double)pDeltaArray[i-1] * fCos)); - aPoint.Y() = (sal_Int32)(rPoint.Y() + ((double)pDeltaArray[i-1] * fSin)); - } - if( i < nLen ) - { - int nOldWidth = maVirtualStatus.mnTextWidth; - int nOldHeight = maVirtualStatus.mnTextHeight; - SetFont( mnFontID, - nTextScale, - maVirtualStatus.mnTextHeight, - nNormalAngle + nDeltaAngle, - mbTextVertical, - maVirtualStatus.mbArtItalic, - maVirtualStatus.mbArtBold ); - - double nA = nTextScale * aInfo.m_nAscend / 1000.0; - double nD = nTextScale * aInfo.m_nDescend / 1000.0; - double fStretch = (double)maVirtualStatus.mnTextWidth / maVirtualStatus.mnTextHeight; - if( !pGsubFlags[i] ) - nD *= fStretch; - - Point aPos( aPoint ); - switch( nDeltaAngle ) - { - case +900: - aPos.X() += (sal_Int32)(+nA * fCos + nD * fSin); - aPos.Y() += (sal_Int32)(-nA * fSin + nD * fCos); - break; - case -900: - aPos.X() += (sal_Int32)(+nA * fSin + nD * fCos); - aPos.Y() += (sal_Int32)(-(nTextScale*fStretch - nD) * fCos); - break; - } - drawText( aPos, pStr+i, 1, NULL ); - if( i < nLen-1 && pDeltaArray ) - { - aPoint.X() = (sal_Int32)(rPoint.X() + ((double)pDeltaArray[i] * fCos)); - aPoint.Y() = (sal_Int32)(rPoint.Y() + ((double)pDeltaArray[i] * fSin)); - } - - // swap text width/height again - SetFont( mnFontID, - nOldHeight, - nOldWidth, - nNormalAngle, - mbTextVertical, - maVirtualStatus.mbArtItalic, - maVirtualStatus.mbArtBold ); - } - i++; - nLastPos = i; - } - mnTextAngle = nNormalAngle; -} - -void -PrinterGfx::LicenseWarning(const Point& rPoint, const sal_Unicode* pStr, - sal_Int16 nLen, const sal_Int32* pDeltaArray) -{ - // treat it like a builtin font in case a user has that font also in the - // printer. This is not so unlikely as it may seem; no print embedding - // licensed fonts are often used (or so they say) in companies: - // they are installed on displays and printers, but get not embedded in - // they are installed on displays and printers, but get not embedded in - // print files or documents because they are not licensed for use outside - // the company. - rtl::OString aMessage( "The font " ); - aMessage += rtl::OUStringToOString( mrFontMgr.getPSName(mnFontID), - RTL_TEXTENCODING_ASCII_US ); - aMessage += " could not be downloaded\nbecause its license does not allow for that"; - PSComment( aMessage.getStr() ); - - rtl::OString aFontName = rtl::OUStringToOString( - mrFontMgr.getPSName(mnFontID), - RTL_TEXTENCODING_ASCII_US); - PSSetFont (aFontName, RTL_TEXTENCODING_ISO_8859_1); - - sal_Size nSize = 4 * nLen; - sal_uChar* pBuffer = (sal_uChar*)alloca (nSize* sizeof(sal_uChar)); - - ConverterFactory* pCvt = GetConverterFactory (); - nSize = pCvt->Convert (pStr, nLen, pBuffer, nSize, RTL_TEXTENCODING_ISO_8859_1); - - PSMoveTo (rPoint); - PSShowText (pBuffer, nLen, nSize, pDeltaArray); -} - -void -PrinterGfx::drawText( - const Point& rPoint, - const sal_Unicode* pStr, - sal_Int16 nLen, - const sal_Int32* pDeltaArray - ) -{ - if (!(nLen > 0)) - return; - - fonttype::type eType = mrFontMgr.getFontType (mnFontID); - - if (eType == fonttype::Type1) - PSUploadPS1Font (mnFontID); - - if ( eType == fonttype::TrueType - && !mrFontMgr.isFontDownloadingAllowed(mnFontID)) - { - LicenseWarning(rPoint, pStr, nLen, pDeltaArray); - return; - } - - if( mrFontMgr.getUseOnlyFontEncoding( mnFontID ) ) - { - GlyphSet aGSet( mnFontID, mbTextVertical ); - aGSet.DrawText( *this, rPoint, pStr, nLen, pDeltaArray ); - return; - } - - // search for a glyph set matching the set font - std::list< GlyphSet >::iterator aIter; - for (aIter = maPS3Font.begin(); aIter != maPS3Font.end(); aIter++) - if ( ((*aIter).GetFontID() == mnFontID) - && ((*aIter).IsVertical() == mbTextVertical)) - { - (*aIter).DrawText (*this, rPoint, pStr, nLen, pDeltaArray); - break; - } - - // not found ? create a new one - if (aIter == maPS3Font.end()) - { - maPS3Font.push_back (GlyphSet(mnFontID, mbTextVertical)); - maPS3Font.back().DrawText (*this, rPoint, pStr, nLen, pDeltaArray); - } -} - -int -PrinterGfx::getCharWidth (sal_Bool b_vert, sal_Unicode n_char, CharacterMetric *p_bbox) -{ - b_vert = b_vert && (getVerticalDeltaAngle(n_char) != 0); - int w = b_vert ? p_bbox->height : p_bbox->width; - w *= maVirtualStatus.mnTextWidth ? maVirtualStatus.mnTextWidth : maVirtualStatus.mnTextHeight; - return w; -} - -fontID -PrinterGfx::getCharMetric (const Font3 &rFont, sal_Unicode n_char, CharacterMetric *p_bbox) -{ - p_bbox->width = -1; - p_bbox->height = -1; - - for (fontID n = 0; n < 3; n++) - { - fontID n_font = rFont.GetFont(n); - if (n_font != -1) - { - if( mbStrictSO52Compatibility ) - { - fonttype::type eType = mrFontMgr.getFontType( n_font ); - if( (eType == fonttype::Builtin || eType == fonttype::Type1) ) - { - // note: any character exchanged here MUST also be changed - // in the compatibility ISO encoding vector in the prolog - // in printerjob.cxx - sal_Unicode aRepl = 0; - if( n_char == 0x2d ) - aRepl = 0x2212; - else if( n_char == 0x27 ) - aRepl = 0x2019; - /* - additional characters that may need backwards compatibility: - ISO5589 StdEnc Unicode suggested n_char -> aRepl - 0264 0302 0x00B4 0x00B4 (acute) -> 0x2019 (quiteright) - 0246 - 0x00A6 0x00A6 (brokenbar) -> 0x007C (bar) - 0225 0267 0x0095 0x0095 () -> 0x2022 (bullet) - 0140 0301 0x0060 0x0060 (grave) -> ? - */ - if( aRepl ) - { - mrFontMgr.getMetrics( n_font, aRepl, aRepl, p_bbox ); - if (p_bbox->width >= 0 && p_bbox->height >= 0) - return n_font; - } - } - } - mrFontMgr.getMetrics( n_font, n_char, n_char, p_bbox ); - } - if (p_bbox->width >= 0 && p_bbox->height >= 0) - return n_font; - } - if (n_char != '?') - return getCharMetric (rFont, '?', p_bbox); - - return rFont.GetFont(0) != -1 ? rFont.GetFont(0) : rFont.GetFont(1); -} - -fontID -PrinterGfx::getFontSubstitute () const -{ - if( mpFontSubstitutes ) - { - ::std::hash_map< fontID, fontID >::const_iterator it = - mpFontSubstitutes->find( mnFontID ); - if( it != mpFontSubstitutes->end() ) - return it->second; - } - - return -1; -} - -sal_Int32 -PrinterGfx::GetCharWidth (sal_Unicode nFrom, sal_Unicode nTo, long *pWidthArray) -{ - Font3 aFont(*this); - if (aFont.IsSymbolFont() && (nFrom < 256) && (nTo < 256)) - { - nFrom += 0xF000; - nTo += 0xF000; - } - - for( int n = 0; n < (nTo - nFrom + 1); n++ ) - { - CharacterMetric aBBox; - getCharMetric (aFont, n + nFrom, &aBBox); - pWidthArray[n] = getCharWidth (mbTextVertical, n + nFrom, &aBBox); - } - - // returned metrics have postscript precision - return 1000; -} - -const ::std::list< KernPair >& PrinterGfx::getKernPairs( bool bVertical ) const -{ - /* - * Note: this is only a 80% solution: if a font is only - * partially substituted in a string due to missing glyphs - * the results may not be perfect; the more so the more the - * substitution differs from the original metricwise. But - * vcl only asks for KernPairs for each font once and NOT - * in a string context this is the best we can do. - * In future the kerning should be done on a per string basis. - */ - fontID nFont = mnFontID; - if( mpFontSubstitutes ) - { - ::std::hash_map< fontID, fontID >::const_iterator it = - mpFontSubstitutes->find( mnFontID ); - if( it != mpFontSubstitutes->end() ) - nFont = it->second; - } - return mrFontMgr.getKernPairs( nFont, bVertical ); -} - -/* - * advanced glyph handling - */ - -sal_Bool -PrinterGfx::GetGlyphBoundRect (sal_Unicode /*c*/, Rectangle& /*rOutRect*/) -{ - return 0; -} - -sal_uInt32 -PrinterGfx::GetGlyphOutline (sal_Unicode /*c*/, - sal_uInt16 **/*ppPolySizes*/, Point **/*ppPoints*/, sal_uInt8 **/*ppFlags*/) -{ - return 0; -} - -/* - * spool the converted truetype fonts to the page header after the page body is - * complete - * for Type1 fonts spool additional reencoding vectors that are necessary to access the - * whole font - */ - -void -PrinterGfx::OnEndPage () -{ -} - -void -PrinterGfx::OnEndJob () -{ - maPS3Font.clear(); - maPS1Font.clear(); -} - -void -PrinterGfx::writeResources( osl::File* pFile, std::list< rtl::OString >& rSuppliedFonts, std::list< rtl::OString >& rNeededFonts ) -{ - // write all type 1 fonts - std::list< sal_Int32 >::iterator aFont; - // already in the document header ? - for (aFont = maPS1Font.begin(); aFont != maPS1Font.end(); ++aFont) - { - const rtl::OString& rSysPath (mrFontMgr.getFontFileSysPath(*aFont) ); - rtl::OUString aUNCPath; - osl::File::getFileURLFromSystemPath (OStringToOUString (rSysPath, osl_getThreadTextEncoding()), aUNCPath); - osl::File aFontFile (aUNCPath); - - // provide the pfb or pfa font as a (pfa-)font resource - rtl::OString aPostScriptName = - rtl::OUStringToOString ( mrFontMgr.getPSName(*aFont), - RTL_TEXTENCODING_ASCII_US ); - - WritePS (pFile, "%%BeginResource: font "); - WritePS (pFile, aPostScriptName.getStr()); - WritePS (pFile, "\n"); - - osl::File::RC nError = aFontFile.open (OpenFlag_Read); - if (nError == osl::File::E_None) - { - convertPfbToPfa (aFontFile, *pFile); - aFontFile.close (); - - pFile->setPos(osl_Pos_Current, -1); - char lastchar = '\n'; - sal_uInt64 uBytes(1); - pFile->read((void *)(&lastchar), uBytes, uBytes); - if (lastchar != '\n') - WritePS (pFile, "\n"); - } - WritePS (pFile, "%%EndResource\n"); - rSuppliedFonts.push_back( aPostScriptName ); - } - - // write glyphsets and reencodings - std::list< GlyphSet >::iterator aIter; - for (aIter = maPS3Font.begin(); aIter != maPS3Font.end(); ++aIter) - { - if (aIter->GetFontType() == fonttype::TrueType) - { - aIter->PSUploadFont (*pFile, *this, mbUploadPS42Fonts ? true : false, rSuppliedFonts ); - } - else - // ( aIter->GetFontType() == fonttype::Type1 - // || aIter->GetFontType() == fonttype::Builtin ) - { - aIter->PSUploadEncoding (pFile, *this); - if( aIter->GetFontType() == fonttype::Builtin ) - rNeededFonts.push_back( - rtl::OUStringToOString( - mrFontMgr.getPSName( aIter->GetFontID() ), - RTL_TEXTENCODING_ASCII_US ) ); - } - } -} - -bool PrinterGfx::getStrictSO52Compatibility() const -{ - return mbStrictSO52Compatibility; -} - -void PrinterGfx::setStrictSO52Compatibility( bool bCompat) -{ - mbStrictSO52Compatibility = bCompat; -} diff --git a/vcl/unx/source/window/FWS.cxx b/vcl/unx/source/window/FWS.cxx deleted file mode 100644 index 4683864fd116..000000000000 --- a/vcl/unx/source/window/FWS.cxx +++ /dev/null @@ -1,280 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_vcl.hxx" - -#include -#include -#include -#include - -#include -#include -#include -#include "FWS.hxx" - -static Atom fwsIconAtom; - -static Atom FWS_CLIENT; -static Atom FWS_COMM_WINDOW; -static Atom FWS_PROTOCOLS; -static Atom FWS_STACK_UNDER; -static Atom FWS_PARK_ICONS; -static Atom FWS_PASS_ALL_INPUT; -static Atom FWS_PASSES_INPUT; -static Atom FWS_HANDLES_FOCUS; - -static Atom FWS_REGISTER_WINDOW; -static Atom FWS_STATE_CHANGE; -static Atom FWS_UNSEEN_STATE; -static Atom FWS_NORMAL_STATE; -static Atom WM_PROTOCOLS; -static Atom WM_CHANGE_STATE; - -static Bool fwsStackUnder; -static Bool fwsParkIcons; -static Bool fwsPassesInput; -static Bool fwsHandlesFocus; - -static Window fwsCommWindow; - -/*************************************<->*********************************** - * - * WMSupportsFWS() - - * - * Initialize our atoms and determine if the current window manager is - * providing FWS extension support. - * - *************************************<->***********************************/ - -Bool -WMSupportsFWS (Display *display, int screen) -{ - unsigned int i; - Atom protocol; - Atom propType; - int propFormat; - unsigned long propItems; - unsigned long propBytesAfter; - unsigned char *propData; - char propName[64]; - - FWS_CLIENT = XInternAtom(display, "_SUN_FWS_CLIENT", False); - FWS_COMM_WINDOW = XInternAtom(display, "_SUN_FWS_COMM_WINDOW", False); - FWS_PROTOCOLS = XInternAtom(display, "_SUN_FWS_PROTOCOLS", False); - FWS_STACK_UNDER = XInternAtom(display, "_SUN_FWS_STACK_UNDER", False); - FWS_PARK_ICONS = XInternAtom(display, "_SUN_FWS_PARK_ICONS", False); - FWS_PASS_ALL_INPUT = XInternAtom(display, "_SUN_FWS_PASS_ALL_INPUT", False); - FWS_PASSES_INPUT = XInternAtom(display, "_SUN_FWS_PASSES_INPUT", False); - FWS_HANDLES_FOCUS = XInternAtom(display, "_SUN_FWS_HANDLES_FOCUS", False); - FWS_REGISTER_WINDOW= XInternAtom(display, "_SUN_FWS_REGISTER_WINDOW",False); - FWS_STATE_CHANGE = XInternAtom(display, "_SUN_FWS_STATE_CHANGE", False); - FWS_UNSEEN_STATE = XInternAtom(display, "_SUN_FWS_UNSEEN_STATE", False); - FWS_NORMAL_STATE = XInternAtom(display, "_SUN_FWS_NORMAL_STATE", False); - WM_PROTOCOLS = XInternAtom(display, "WM_PROTOCOLS", False); - WM_CHANGE_STATE = XInternAtom(display, "WM_CHANGE_STATE", False); - - snprintf (propName, sizeof(propName), "_SUN_FWS_NEXT_ICON_%d", screen); - fwsIconAtom = XInternAtom(display, propName, False); - - if (XGetWindowProperty (display, DefaultRootWindow (display), - FWS_COMM_WINDOW, 0, 1, - False, AnyPropertyType, &propType, - &propFormat, &propItems, - &propBytesAfter, &propData) != Success) - return False; - - if (propFormat != 32 || - propItems != 1 || - propBytesAfter != 0) - { - #if OSL_DEBUG_LEVEL > 1 - fprintf (stderr, "Bad FWS_COMM_WINDOW property on root window.\n"); - #endif - XFree (propData); - return False; - } - - fwsCommWindow = *(Window *) propData; - #if OSL_DEBUG_LEVEL > 1 - fprintf (stderr, "Using fwsCommWindow = 0x%lx.\n", fwsCommWindow); - #endif - XFree (propData); - - - if (XGetWindowProperty (display, DefaultRootWindow (display), - FWS_PROTOCOLS, 0, 10, - False, AnyPropertyType, &propType, - &propFormat, &propItems, - &propBytesAfter, &propData) != Success) - { - return False; - } - - if (propFormat != 32 || - propBytesAfter != 0) - { - #if OSL_DEBUG_LEVEL > 1 - fprintf (stderr, "Bad FWS_PROTOCOLS property on root window.\n"); - #endif - XFree (propData); - return False; - } - - for (i = 0; i < propItems; ++i) - { - protocol = ((Atom *) propData)[i]; - if (protocol == FWS_STACK_UNDER) - { - fwsStackUnder = True; - #if OSL_DEBUG_LEVEL > 1 - fprintf (stderr, "Using fwsStackUnder.\n"); - #endif - } - else - if (protocol == FWS_PARK_ICONS) - { - fwsParkIcons = True; - #if OSL_DEBUG_LEVEL > 1 - fprintf (stderr, "Using fwsParkIcons.\n"); - #endif - } - else - if (protocol == FWS_PASSES_INPUT) - { - fwsPassesInput = True; - #if OSL_DEBUG_LEVEL > 1 - fprintf (stderr, "Using fwsPassesInput.\n"); - #endif - } - else - if (protocol == FWS_HANDLES_FOCUS) - { - fwsHandlesFocus = True; - #if OSL_DEBUG_LEVEL > 1 - fprintf (stderr, "Using fwsHandlesFocus.\n"); - #endif - } - } - - XFree (propData); - return True; -} - -/*************************************<->*********************************** - * - * newHandler() - - * - * Handle X errors (temporarily) to record the occurance of BadWindow - * errors without crashing. Used to detect the FWS_COMM_WINDOW root window - * property containing an old or obsolete window id. - * - *************************************<->***********************************/ - -extern "C" { - -static Bool badWindowFound; -static int (* oldHandler) (Display *, XErrorEvent *); - -static int -newHandler (Display *display, XErrorEvent *xerror) -{ - if (xerror->error_code != BadWindow) - (*oldHandler)(display, xerror); - else - badWindowFound = True; - - return 0; -} - -} - -/*************************************<->*********************************** - * - * RegisterFwsWindow() - - * - * Send a client message to the FWS_COMM_WINDOW indicating the existance - * of a new FWS client window. Be careful to avoid BadWindow errors on - * the XSendEvent in case the FWS_COMM_WINDOW root window property had - * old/obsolete junk in it. - * - *************************************<->***********************************/ - -Bool -RegisterFwsWindow (Display *display, Window window) -{ - XClientMessageEvent msg; - - msg.type = ClientMessage; - msg.window = fwsCommWindow; - msg.message_type = FWS_REGISTER_WINDOW; - msg.format = 32; - msg.data.l[0] = window; - - XSync (display, False); - badWindowFound = False; - oldHandler = XSetErrorHandler (newHandler); - - XSendEvent (display, fwsCommWindow, False, NoEventMask, - (XEvent *) &msg); - XSync (display, False); - - XSetErrorHandler (oldHandler); - #if OSL_DEBUG_LEVEL > 1 - if (badWindowFound) - fprintf (stderr, "No FWS client window to register with.\n"); - #endif - - return !badWindowFound; -} - -/*************************************<->*********************************** - * - * AddFwsProtocols - - * - * Add the FWS protocol atoms to the WMProtocols property for the window. - * - *************************************<->***********************************/ - -void -AddFwsProtocols (Display *display, Window window) -{ - #define MAX_FWS_PROTOS 10 - - Atom fwsProtocols[ MAX_FWS_PROTOS ]; - int nProtos = 0; - - fwsProtocols[ nProtos++ ] = FWS_CLIENT; - fwsProtocols[ nProtos++ ] = FWS_STACK_UNDER; - fwsProtocols[ nProtos++ ] = FWS_STATE_CHANGE; - fwsProtocols[ nProtos++ ] = FWS_PASS_ALL_INPUT; - XChangeProperty (display, window, WM_PROTOCOLS, - XA_ATOM, 32, PropModeAppend, - (unsigned char *) fwsProtocols, nProtos); -} - diff --git a/vcl/unx/source/window/FWS.hxx b/vcl/unx/source/window/FWS.hxx deleted file mode 100644 index a687870ede4a..000000000000 --- a/vcl/unx/source/window/FWS.hxx +++ /dev/null @@ -1,64 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _FOREIGN_WINDOW_SYSTEM_HXX -#define _FOREIGN_WINDOW_SYSTEM_HXX - -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -/* Initialize our atoms and determine if the current window manager is - * providing FWS extension support. - */ - -Bool -WMSupportsFWS (Display *display, int screen); - -/* Send a client message to the FWS_COMM_WINDOW indicating the existance - * of a new FWS client window. Be careful to avoid BadWindow errors on - * the XSendEvent in case the FWS_COMM_WINDOW root window property had - * old/obsolete junk in it. - */ - -Bool -RegisterFwsWindow (Display *display, Window window); - -/* Add the FWS protocol atoms to the WMProtocols property for the window. - */ - -void -AddFwsProtocols (Display *display, Window window); - -#if defined(__cplusplus) -} /* extern "C" */ -#endif - -#endif // _FOREIGN_WINDOW_SYSTEM_HXX - diff --git a/vcl/unx/source/window/makefile.mk b/vcl/unx/source/window/makefile.mk deleted file mode 100644 index c5cd95ba6b1c..000000000000 --- a/vcl/unx/source/window/makefile.mk +++ /dev/null @@ -1,59 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=salwin -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"!="unx" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"!="unx" - -SLOFILES= \ - $(SLO)/FWS.obj $(SLO)/salframe.obj $(SLO)/salobj.obj - -.ENDIF # "$(GUIBASE)"!="unx" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/vcl/unx/source/window/salframe.cxx b/vcl/unx/source/window/salframe.cxx deleted file mode 100644 index 11c20aa40f5a..000000000000 --- a/vcl/unx/source/window/salframe.cxx +++ /dev/null @@ -1,4518 +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_vcl.hxx" - -#include -#include -#include -#include - -#include -#include -#include -#include "FWS.hxx" -#include -#ifndef SOLARIS -#include -#endif -#include - -#include "salunx.h" -#include "saldata.hxx" -#include "saldisp.hxx" -#include "salgdi.h" -#include "salframe.h" -#include "soicon.hxx" -#include "dtint.hxx" -#include "sm.hxx" -#include "wmadaptor.hxx" -#include "salprn.h" -#include "salbmp.h" -#include "i18n_ic.hxx" -#include "i18n_keysym.hxx" -#include "i18n_status.hxx" - -#include "vcl/salinst.hxx" -#include "vcl/floatwin.hxx" -#include "vcl/sallayout.hxx" -#include "vcl/svapp.hxx" -#include "vcl/keycodes.hxx" -#include "vcl/printerinfomanager.hxx" -#include "vcl/settings.hxx" - -#include "tools/debug.hxx" - -#include "sal/alloca.h" -#include - -#include - -#ifndef Button6 -# define Button6 6 -#endif -#ifndef Button7 -# define Button7 7 -#endif - -using namespace vcl_sal; -using namespace vcl; - -// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#define CLIENT_EVENTS StructureNotifyMask \ - | SubstructureNotifyMask \ - | KeyPressMask \ - | KeyReleaseMask \ - | ButtonPressMask \ - | ButtonReleaseMask \ - | PointerMotionMask \ - | EnterWindowMask \ - | LeaveWindowMask \ - | FocusChangeMask \ - | ExposureMask \ - | VisibilityChangeMask \ - | PropertyChangeMask \ - | ColormapChangeMask - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -static XLIB_Window hPresentationWindow = None, hPresFocusWindow = None; -static ::std::list< XLIB_Window > aPresentationReparentList; -static int nVisibleFloats = 0; - -X11SalFrame* X11SalFrame::s_pSaveYourselfFrame = NULL; - -// -=-= C++ statics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -static void doReparentPresentationDialogues( SalDisplay* pDisplay ) -{ - pDisplay->GetXLib()->PushXErrorLevel( true ); - while( aPresentationReparentList.begin() != aPresentationReparentList.end() ) - { - int x, y; - XLIB_Window aRoot, aChild; - unsigned int w, h, bw, d; - XGetGeometry( pDisplay->GetDisplay(), - aPresentationReparentList.front(), - &aRoot, - &x, &y, &w, &h, &bw, &d ); - XTranslateCoordinates( pDisplay->GetDisplay(), - hPresentationWindow, - aRoot, - x, y, - &x, &y, - &aChild ); - XReparentWindow( pDisplay->GetDisplay(), - aPresentationReparentList.front(), - aRoot, - x, y ); - aPresentationReparentList.pop_front(); - } - if( hPresFocusWindow ) - XSetInputFocus( pDisplay->GetDisplay(), hPresFocusWindow, PointerRoot, CurrentTime ); - XSync( pDisplay->GetDisplay(), False ); - pDisplay->GetXLib()->PopXErrorLevel(); -} - -// -=-= SalFrame / X11SalFrame =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -bool X11SalFrame::IsOverrideRedirect() const -{ - return - ((nStyle_ & SAL_FRAME_STYLE_INTRO) && !pDisplay_->getWMAdaptor()->supportsSplash()) - || - (!( nStyle_ & ~SAL_FRAME_STYLE_DEFAULT ) && !pDisplay_->getWMAdaptor()->supportsFullScreen()) - ; -} - -bool X11SalFrame::IsFloatGrabWindow() const -{ - static const char* pDisableGrab = getenv( "SAL_DISABLE_FLOATGRAB" ); - - return - ( ( !pDisableGrab || !*pDisableGrab ) && - ( - (nStyle_ & SAL_FRAME_STYLE_FLOAT) && - ! (nStyle_ & SAL_FRAME_STYLE_TOOLTIP) && - ! (nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION) - ) - ); -} - -void X11SalFrame::setXEmbedInfo() -{ - if( m_bXEmbed ) - { - long aInfo[2]; - aInfo[0] = 1; // XEMBED protocol version - aInfo[1] = (bMapped_ ? 1 : 0); // XEMBED_MAPPED - XChangeProperty( pDisplay_->GetDisplay(), - mhWindow, - pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::XEMBED_INFO ), - pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::XEMBED_INFO ), - 32, - PropModeReplace, - reinterpret_cast(aInfo), - sizeof(aInfo)/sizeof(aInfo[0]) ); - } -} - -void X11SalFrame::askForXEmbedFocus( sal_Int32 i_nTimeCode ) -{ - XEvent aEvent; - - rtl_zeroMemory( &aEvent, sizeof(aEvent) ); - aEvent.xclient.window = mhForeignParent; - aEvent.xclient.type = ClientMessage; - aEvent.xclient.message_type = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::XEMBED ); - aEvent.xclient.format = 32; - aEvent.xclient.data.l[0] = i_nTimeCode ? i_nTimeCode : CurrentTime; - aEvent.xclient.data.l[1] = 3; // XEMBED_REQUEST_FOCUS - aEvent.xclient.data.l[2] = 0; - aEvent.xclient.data.l[3] = 0; - aEvent.xclient.data.l[4] = 0; - - GetDisplay()->GetXLib()->PushXErrorLevel( true ); - XSendEvent( pDisplay_->GetDisplay(), - mhForeignParent, - False, NoEventMask, &aEvent ); - XSync( pDisplay_->GetDisplay(), False ); - GetDisplay()->GetXLib()->PopXErrorLevel(); -} - - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pParentData, bool bUseGeometry ) -{ - if( nScreen < 0 || nScreen >= GetDisplay()->GetScreenCount() ) - nScreen = GetDisplay()->GetDefaultScreenNumber(); - if( mpParent ) - nScreen = mpParent->m_nScreen; - - m_nScreen = nScreen; - nStyle_ = nSalFrameStyle; - XWMHints Hints; - Hints.flags = InputHint; - Hints.input = (nSalFrameStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) ? False : True; - - int x = 0, y = 0; - unsigned int w = 500, h = 500; - XSetWindowAttributes Attributes; - - int nAttrMask = CWBorderPixel - | CWBackPixmap - | CWColormap - | CWOverrideRedirect - | CWEventMask - ; - Attributes.border_pixel = 0; - Attributes.background_pixmap = None; - Attributes.colormap = GetDisplay()->GetColormap( m_nScreen ).GetXColormap(); - Attributes.override_redirect = False; - Attributes.event_mask = CLIENT_EVENTS; - - const SalVisual& rVis = GetDisplay()->GetVisual( m_nScreen ); - XLIB_Window aFrameParent = pParentData ? pParentData->aWindow : GetDisplay()->GetRootWindow( m_nScreen ); - XLIB_Window aClientLeader = None; - - if( bUseGeometry ) - { - x = maGeometry.nX; - y = maGeometry.nY; - w = maGeometry.nWidth; - h = maGeometry.nHeight; - } - - if( (nSalFrameStyle & SAL_FRAME_STYLE_FLOAT) && - ! (nSalFrameStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) - ) - { - if( nShowState_ == SHOWSTATE_UNKNOWN ) - { - w = 10; - h = 10; - } - Attributes.override_redirect = True; - } - else if( (nSalFrameStyle & SAL_FRAME_STYLE_SYSTEMCHILD ) ) - { - DBG_ASSERT( mpParent, "SAL_FRAME_STYLE_SYSTEMCHILD window without parent" ); - if( mpParent ) - { - aFrameParent = mpParent->mhWindow; - // FIXME: since with SAL_FRAME_STYLE_SYSTEMCHILD - // multiple X11SalFrame objects can have the same shell window - // dispatching events in saldisp.cxx is unclear (the first frame) - // wins. HTH this correctly is unclear yet - // for the time being, treat set the shell window to own window - // like for a normal frame - // mhShellWindow = mpParent->GetShellWindow(); - } - } - else if( pParentData ) - { - // plugin parent may be killed unexpectedly by - // plugging process; ignore XErrors in that case - GetDisplay()->setHaveSystemChildFrame(); - - nStyle_ |= SAL_FRAME_STYLE_PLUG; - Attributes.override_redirect = True; - if( pParentData->nSize >= sizeof(SystemParentData) ) - m_bXEmbed = pParentData->bXEmbedSupport; - - int x_ret, y_ret; - unsigned int bw, d; - XLIB_Window aRoot, aParent; - - XGetGeometry( GetXDisplay(), pParentData->aWindow, - &aRoot, &x_ret, &y_ret, &w, &h, &bw, &d ); - mhForeignParent = pParentData->aWindow; - - mhShellWindow = aParent = mhForeignParent; - XLIB_Window* pChildren; - unsigned int nChildren; - bool bBreak = false; - do - { - XQueryTree( GetDisplay()->GetDisplay(), mhShellWindow, - &aRoot, &aParent, &pChildren, &nChildren ); - XFree( pChildren ); - if( aParent != aRoot ) - mhShellWindow = aParent; - int nCount = 0; - Atom* pProps = XListProperties( GetDisplay()->GetDisplay(), - mhShellWindow, - &nCount ); - for( int i = 0; i < nCount && ! bBreak; ++i ) - bBreak = (pProps[i] == XA_WM_HINTS); - if( pProps ) - XFree( pProps ); - } while( aParent != aRoot && ! bBreak ); - - // check if this is really one of our own frames - // do not change the input mask in that case - const std::list< SalFrame* >& rFrames = GetDisplay()->getFrames(); - std::list< SalFrame* >::const_iterator it = rFrames.begin(); - while( it != rFrames.end() && mhForeignParent != static_cast(*it)->GetWindow() ) - ++it; - - if( it == rFrames.end() ) - { - XSelectInput( GetDisplay()->GetDisplay(), mhForeignParent, StructureNotifyMask | FocusChangeMask ); - XSelectInput( GetDisplay()->GetDisplay(), mhShellWindow, StructureNotifyMask | FocusChangeMask ); - } - } - else - { - if( ! bUseGeometry ) - { - Size aScreenSize( GetDisplay()->getDataForScreen( m_nScreen ).m_aSize ); - w = aScreenSize.Width(); - h = aScreenSize.Height(); - if( nSalFrameStyle & SAL_FRAME_STYLE_SIZEABLE && - nSalFrameStyle & SAL_FRAME_STYLE_MOVEABLE ) - { - // fill in holy default values brought to us by product management - if( aScreenSize.Width() >= 800 ) - w = 785; - if( aScreenSize.Width() >= 1024 ) - w = 920; - - if( aScreenSize.Height() >= 600 ) - h = 550; - if( aScreenSize.Height() >= 768 ) - h = 630; - if( aScreenSize.Height() >= 1024 ) - h = 875; - } - if( ! mpParent ) - { - // find the last document window (if any) - const X11SalFrame* pFrame = NULL; - const std::list< SalFrame* >& rFrames = GetDisplay()->getFrames(); - std::list< SalFrame* >::const_iterator it = rFrames.begin(); - while( it != rFrames.end() ) - { - pFrame = static_cast< const X11SalFrame* >(*it); - if( ! ( pFrame->mpParent - || pFrame->mbFullScreen - || ! ( pFrame->nStyle_ & SAL_FRAME_STYLE_SIZEABLE ) - || ! pFrame->GetUnmirroredGeometry().nWidth - || ! pFrame->GetUnmirroredGeometry().nHeight - ) - ) - break; - ++it; - } - - if( it != rFrames.end() ) - { - // set a document position and size - // the first frame gets positioned by the window manager - const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() ); - x = rGeom.nX; - y = rGeom.nY; - if( x+(int)w+40 <= (int)aScreenSize.Width() && - y+(int)h+40 <= (int)aScreenSize.Height() - ) - { - y += 40; - x += 40; - } - else - { - x = 10; // leave some space for decoration - y = 20; - } - } - else if( GetDisplay()->IsXinerama() ) - { - // place frame on same screen as mouse pointer - XLIB_Window aRoot, aChild; - int root_x = 0, root_y = 0, lx, ly; - unsigned int mask; - XQueryPointer( GetXDisplay(), - GetDisplay()->GetRootWindow( m_nScreen ), - &aRoot, &aChild, - &root_x, &root_y, &lx, &ly, &mask ); - const std::vector< Rectangle >& rScreens = GetDisplay()->GetXineramaScreens(); - for( unsigned int i = 0; i < rScreens.size(); i++ ) - if( rScreens[i].IsInside( Point( root_x, root_y ) ) ) - { - x = rScreens[i].Left(); - y = rScreens[i].Top(); - break; - } - } - } - } - Attributes.win_gravity = pDisplay_->getWMAdaptor()->getInitWinGravity(); - nAttrMask |= CWWinGravity; - if( mpParent ) - { - Attributes.save_under = True; - nAttrMask |= CWSaveUnder; - } - if( IsOverrideRedirect() ) - Attributes.override_redirect = True; - // default icon - if( (nStyle_ & SAL_FRAME_STYLE_INTRO) == 0 ) - { - bool bOk=false; - try - { - bOk=SelectAppIconPixmap( pDisplay_, m_nScreen, - mnIconID != 1 ? mnIconID : - (mpParent ? mpParent->mnIconID : 1), 32, - Hints.icon_pixmap, Hints.icon_mask ); - } - catch( com::sun::star::uno::Exception& ) - { - // can happen - no ucb during early startup - } - if( bOk ) - { - Hints.flags |= IconPixmapHint; - if( Hints.icon_mask ) - Hints.flags |= IconMaskHint; - } - } - - // find the top level frame of the transience hierarchy - X11SalFrame* pFrame = this; - while( pFrame->mpParent ) - pFrame = pFrame->mpParent; - if( (pFrame->nStyle_ & SAL_FRAME_STYLE_PLUG ) ) - { - // if the top level window is a plugin window, - // then we should place us in the same window group as - // the parent application (or none if there is no window group - // hint in the parent). - if( pFrame->GetShellWindow() ) - { - XWMHints* pWMHints = XGetWMHints( pDisplay_->GetDisplay(), - pFrame->GetShellWindow() ); - if( pWMHints ) - { - if( (pWMHints->flags & WindowGroupHint) ) - { - Hints.flags |= WindowGroupHint; - Hints.window_group = pWMHints->window_group; - } - XFree( pWMHints ); - } - } - } - else - { - Hints.flags |= WindowGroupHint; - Hints.window_group = pFrame->GetShellWindow(); - // note: for a normal document window this will produce None - // as the window is not yet created and the shell window is - // initialized to None. This must be corrected after window creation. - aClientLeader = GetDisplay()->GetDrawable( m_nScreen ); - } - } - - nShowState_ = SHOWSTATE_UNKNOWN; - bViewable_ = TRUE; - bMapped_ = FALSE; - nVisibility_ = VisibilityFullyObscured; - mhWindow = XCreateWindow( GetXDisplay(), - aFrameParent, - x, y, - w, h, - 0, - rVis.GetDepth(), - InputOutput, - rVis.GetVisual(), - nAttrMask, - &Attributes ); - // FIXME: see above: fake shell window for now to own window - if( /*! IsSysChildWindow() &&*/ pParentData == NULL ) - { - mhShellWindow = mhWindow; - } - - // correct window group if necessary - if( (Hints.flags & WindowGroupHint) == WindowGroupHint ) - { - if( Hints.window_group == None ) - Hints.window_group = GetShellWindow(); - } - - maGeometry.nX = x; - maGeometry.nY = y; - maGeometry.nWidth = w; - maGeometry.nHeight = h; - updateScreenNumber(); - - XSync( GetXDisplay(), False ); - setXEmbedInfo(); - - XLIB_Time nUserTime = (nStyle_ & (SAL_FRAME_STYLE_OWNERDRAWDECORATION | SAL_FRAME_STYLE_TOOLWINDOW) ) == 0 ? - pDisplay_->GetLastUserEventTime() : 0; - pDisplay_->getWMAdaptor()->setUserTime( this, nUserTime ); - - if( ! pParentData && ! IsChildWindow() && ! Attributes.override_redirect ) - { - XSetWMHints( GetXDisplay(), mhWindow, &Hints ); - // WM Protocols && internals - Atom a[4]; - int n = 0; - a[n++] = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::WM_DELETE_WINDOW ); - if( pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::NET_WM_PING ) ) - a[n++] = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::NET_WM_PING ); - if( ! s_pSaveYourselfFrame && ! mpParent) - { - // at all times have only one frame with SaveYourself - a[n++] = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::WM_SAVE_YOURSELF ); - s_pSaveYourselfFrame = this; - } - if( (nSalFrameStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) - a[n++] = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::WM_TAKE_FOCUS ); - XSetWMProtocols( GetXDisplay(), GetShellWindow(), a, n ); - - XClassHint* pClass = XAllocClassHint(); - pClass->res_name = const_cast(X11SalData::getFrameResName()); - pClass->res_class = const_cast(X11SalData::getFrameClassName()); - XSetClassHint( GetXDisplay(), GetShellWindow(), pClass ); - XFree( pClass ); - - XSizeHints* pHints = XAllocSizeHints(); - pHints->flags = PWinGravity | PPosition; - pHints->win_gravity = GetDisplay()->getWMAdaptor()->getPositionWinGravity(); - pHints->x = 0; - pHints->y = 0; - if( mbFullScreen ) - { - pHints->flags |= PMaxSize | PMinSize; - pHints->max_width = w+100; - pHints->max_height = h+100; - pHints->min_width = w; - pHints->min_height = h; - } - XSetWMNormalHints( GetXDisplay(), - GetShellWindow(), - pHints ); - XFree (pHints); - - // set PID and WM_CLIENT_MACHINE - pDisplay_->getWMAdaptor()->setClientMachine( this ); - pDisplay_->getWMAdaptor()->setPID( this ); - - // set client leader - if( aClientLeader ) - { - XChangeProperty( GetXDisplay(), - mhWindow, - pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::WM_CLIENT_LEADER), - XA_WINDOW, - 32, - PropModeReplace, - (unsigned char*)&aClientLeader, - 1 - ); - } -#define DECOFLAGS (SAL_FRAME_STYLE_MOVEABLE | SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_CLOSEABLE) - int nDecoFlags = WMAdaptor::decoration_All; - if( (nStyle_ & SAL_FRAME_STYLE_PARTIAL_FULLSCREEN) || - (nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION) - ) - nDecoFlags = 0; - else if( (nStyle_ & DECOFLAGS ) != DECOFLAGS || (nStyle_ & SAL_FRAME_STYLE_TOOLWINDOW) ) - { - if( nStyle_ & DECOFLAGS ) - // if any decoration, then show a border - nDecoFlags = WMAdaptor::decoration_Border; - else - nDecoFlags = 0; - - if( ! mpParent && (nStyle_ & DECOFLAGS) ) - // don't add a min button if window should be decorationless - nDecoFlags |= WMAdaptor::decoration_MinimizeBtn; - if( nStyle_ & SAL_FRAME_STYLE_CLOSEABLE ) - nDecoFlags |= WMAdaptor::decoration_CloseBtn; - if( nStyle_ & SAL_FRAME_STYLE_SIZEABLE ) - { - nDecoFlags |= WMAdaptor::decoration_Resize; - if( ! (nStyle_ & SAL_FRAME_STYLE_TOOLWINDOW) ) - nDecoFlags |= WMAdaptor::decoration_MaximizeBtn; - } - if( nStyle_ & SAL_FRAME_STYLE_MOVEABLE ) - nDecoFlags |= WMAdaptor::decoration_Title; - } - - WMAdaptor::WMWindowType eType = WMAdaptor::windowType_Normal; - if( nStyle_ & SAL_FRAME_STYLE_INTRO ) - eType = WMAdaptor::windowType_Splash; - if( (nStyle_ & SAL_FRAME_STYLE_DIALOG) && hPresentationWindow == None ) - eType = WMAdaptor::windowType_ModelessDialogue; - if( nStyle_ & SAL_FRAME_STYLE_TOOLWINDOW ) - eType = WMAdaptor::windowType_Utility; - if( nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION ) - eType = WMAdaptor::windowType_Toolbar; - if( (nStyle_ & SAL_FRAME_STYLE_PARTIAL_FULLSCREEN) - && GetDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() ) - eType = WMAdaptor::windowType_Dock; - - GetDisplay()->getWMAdaptor()-> - setFrameTypeAndDecoration( this, - eType, - nDecoFlags, - hPresentationWindow ? NULL : mpParent ); - - if( (nStyle_ & (SAL_FRAME_STYLE_DEFAULT | - SAL_FRAME_STYLE_OWNERDRAWDECORATION| - SAL_FRAME_STYLE_FLOAT | - SAL_FRAME_STYLE_INTRO | - SAL_FRAME_STYLE_PARTIAL_FULLSCREEN) ) - == SAL_FRAME_STYLE_DEFAULT ) - pDisplay_->getWMAdaptor()->maximizeFrame( this, true, true ); - } - - m_nWorkArea = GetDisplay()->getWMAdaptor()->getCurrentWorkArea(); - - // Pointer - SetPointer( POINTER_ARROW ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -X11SalFrame::X11SalFrame( SalFrame *pParent, ULONG nSalFrameStyle, SystemParentData* pSystemParent ) -{ - X11SalData* pSalData = GetX11SalData(); - - // initialize frame geometry - memset( &maGeometry, 0, sizeof(maGeometry) ); - - mpParent = static_cast< X11SalFrame* >( pParent ); - - mbTransientForRoot = false; - - pDisplay_ = pSalData->GetDisplay(); - // insert frame in framelist - pDisplay_->registerFrame( this ); - - mhWindow = None; - mhShellWindow = None; - mhStackingWindow = None; - mhForeignParent = None; - mhBackgroundPixmap = None; - m_bSetFocusOnMap = false; - - pGraphics_ = NULL; - pFreeGraphics_ = NULL; - - hCursor_ = None; - nCaptured_ = 0; - - nReleaseTime_ = 0; - nKeyCode_ = 0; - nKeyState_ = 0; - nCompose_ = -1; - mbKeyMenu = false; - mbSendExtKeyModChange = false; - mnExtKeyMod = 0; - - nShowState_ = SHOWSTATE_UNKNOWN; - nWidth_ = 0; - nHeight_ = 0; - nStyle_ = 0; - mnExtStyle = 0; - bAlwaysOnTop_ = FALSE; - - // set bViewable_ to TRUE: hack GetClientSize to report something - // different to 0/0 before first map - bViewable_ = TRUE; - bMapped_ = FALSE; - bDefaultPosition_ = TRUE; - nVisibility_ = VisibilityFullyObscured; - m_nWorkArea = 0; - mbInShow = FALSE; - m_bXEmbed = false; - - nScreenSaversTimeout_ = 0; - - mpInputContext = NULL; - mbInputFocus = False; - - maAlwaysOnTopRaiseTimer.SetTimeoutHdl( LINK( this, X11SalFrame, HandleAlwaysOnTopRaise ) ); - maAlwaysOnTopRaiseTimer.SetTimeout( 100 ); - - meWindowType = WMAdaptor::windowType_Normal; - mnDecorationFlags = WMAdaptor::decoration_All; - mbMaximizedVert = false; - mbMaximizedHorz = false; - mbShaded = false; - mbFullScreen = false; - - mnIconID = 1; // ICON_DEFAULT - - m_pClipRectangles = NULL; - m_nCurClipRect = 0; - m_nMaxClipRect = 0; - - if( mpParent ) - mpParent->maChildren.push_back( this ); - - Init( nSalFrameStyle, GetDisplay()->GetDefaultScreenNumber(), pSystemParent ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -void X11SalFrame::passOnSaveYourSelf() -{ - if( this == s_pSaveYourselfFrame ) - { - // pass on SaveYourself - const X11SalFrame* pFrame = NULL; - const std::list< SalFrame* >& rFrames = GetDisplay()->getFrames(); - std::list< SalFrame* >::const_iterator it = rFrames.begin(); - while( it != rFrames.end() ) - { - pFrame = static_cast< const X11SalFrame* >(*it); - if( ! ( IsChildWindow() || pFrame->mpParent ) - && pFrame != s_pSaveYourselfFrame ) - break; - ++it; - } - - s_pSaveYourselfFrame = (it != rFrames.end() ) ? const_cast(pFrame) : NULL; - if( s_pSaveYourselfFrame ) - { - Atom a[4]; - int n = 0; - a[n++] = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::WM_DELETE_WINDOW ); - a[n++] = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::WM_SAVE_YOURSELF ); - if( pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::NET_WM_PING ) ) - a[n++] = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::NET_WM_PING ); - XSetWMProtocols( GetXDisplay(), s_pSaveYourselfFrame->GetShellWindow(), a, n ); - } - } -} - -X11SalFrame::~X11SalFrame() -{ - notifyDelete(); - - if( m_pClipRectangles ) - { - delete [] m_pClipRectangles; - m_pClipRectangles = NULL; - m_nCurClipRect = m_nMaxClipRect = 0; - } - - if( mhBackgroundPixmap ) - { - XSetWindowBackgroundPixmap( GetXDisplay(), GetWindow(), None ); - XFreePixmap( GetXDisplay(), mhBackgroundPixmap ); - } - - if( mhStackingWindow ) - aPresentationReparentList.remove( mhStackingWindow ); - - // remove from parent's list - if( mpParent ) - mpParent->maChildren.remove( this ); - - // deregister on SalDisplay - pDisplay_->deregisterFrame( this ); - - // unselect all events, some may be still in the queue anyway - if( ! IsSysChildWindow() ) - XSelectInput( GetXDisplay(), GetShellWindow(), 0 ); - XSelectInput( GetXDisplay(), GetWindow(), 0 ); - - ShowFullScreen( FALSE, 0 ); - - if( bMapped_ ) - Show( FALSE ); - - if( mpInputContext ) - { - mpInputContext->UnsetICFocus( this ); - mpInputContext->Unmap( this ); - delete mpInputContext; - } - - if( GetWindow() == hPresentationWindow ) - { - hPresentationWindow = None; - doReparentPresentationDialogues( GetDisplay() ); - } - - if( pGraphics_ ) - { - pGraphics_->DeInit(); - delete pGraphics_; - } - - if( pFreeGraphics_ ) - { - pFreeGraphics_->DeInit(); - delete pFreeGraphics_; - } - - - XDestroyWindow( GetXDisplay(), mhWindow ); - - /* - * check if there is only the status frame left - * if so, free it - */ - if( ! GetDisplay()->getFrames().empty() && I18NStatus::exists() ) - { - SalFrame* pStatusFrame = I18NStatus::get().getStatusFrame(); - std::list< SalFrame* >::const_iterator sit = GetDisplay()->getFrames().begin(); - if( pStatusFrame - && *sit == pStatusFrame - && ++sit == GetDisplay()->getFrames().end() ) - vcl::I18NStatus::free(); - } - - passOnSaveYourSelf(); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -void X11SalFrame::SetExtendedFrameStyle( SalExtStyle nStyle ) -{ - if( nStyle != mnExtStyle && ! IsChildWindow() ) - { - mnExtStyle = nStyle; - - XClassHint* pClass = XAllocClassHint(); - rtl::OString aResHint = X11SalData::getFrameResName( mnExtStyle ); - pClass->res_name = const_cast(aResHint.getStr()); - pClass->res_class = const_cast(X11SalData::getFrameClassName()); - XSetClassHint( GetXDisplay(), GetShellWindow(), pClass ); - XFree( pClass ); - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -void X11SalFrame::SetBackgroundBitmap( SalBitmap* pBitmap ) -{ - if( mhBackgroundPixmap ) - { - XSetWindowBackgroundPixmap( GetXDisplay(), GetWindow(), None ); - XFreePixmap( GetXDisplay(), mhBackgroundPixmap ); - mhBackgroundPixmap = None; - } - if( pBitmap ) - { - X11SalBitmap* pBM = static_cast(pBitmap); - Size aSize = pBM->GetSize(); - if( aSize.Width() && aSize.Height() ) - { - mhBackgroundPixmap = - XCreatePixmap( GetXDisplay(), - GetWindow(), - aSize.Width(), - aSize.Height(), - GetDisplay()->GetVisual( m_nScreen ).GetDepth() ); - if( mhBackgroundPixmap ) - { - SalTwoRect aTwoRect; - aTwoRect.mnSrcX = aTwoRect.mnSrcY = aTwoRect.mnDestX = aTwoRect.mnDestY = 0; - aTwoRect.mnSrcWidth = aTwoRect.mnDestWidth = aSize.Width(); - aTwoRect.mnSrcHeight = aTwoRect.mnDestHeight = aSize.Height(); - pBM->ImplDraw( mhBackgroundPixmap, - m_nScreen, - GetDisplay()->GetVisual( m_nScreen ).GetDepth(), - aTwoRect, GetDisplay()->GetCopyGC( m_nScreen ) ); - XSetWindowBackgroundPixmap( GetXDisplay(), GetWindow(), mhBackgroundPixmap ); - } - } - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -const SystemChildData* X11SalFrame::GetSystemData() const -{ - X11SalFrame *pFrame = const_cast(this); - pFrame->maSystemChildData.nSize = sizeof( SystemChildData ); - pFrame->maSystemChildData.pDisplay = GetXDisplay(); - pFrame->maSystemChildData.aWindow = pFrame->GetWindow(); - pFrame->maSystemChildData.pSalFrame = pFrame; - pFrame->maSystemChildData.pWidget = NULL; - pFrame->maSystemChildData.pVisual = GetDisplay()->GetVisual( m_nScreen ).GetVisual(); - pFrame->maSystemChildData.nScreen = m_nScreen; - pFrame->maSystemChildData.nDepth = GetDisplay()->GetVisual( m_nScreen ).GetDepth(); - pFrame->maSystemChildData.aColormap = GetDisplay()->GetColormap( m_nScreen ).GetXColormap(); - pFrame->maSystemChildData.pAppContext = NULL; - pFrame->maSystemChildData.aShellWindow = pFrame->GetShellWindow(); - pFrame->maSystemChildData.pShellWidget = NULL; - return &maSystemChildData; -} - -SalGraphics *X11SalFrame::GetGraphics() -{ - if( pGraphics_ ) - return NULL; - - if( pFreeGraphics_ ) - { - pGraphics_ = pFreeGraphics_; - pFreeGraphics_ = NULL; - } - else - { - pGraphics_ = new X11SalGraphics(); - pGraphics_->Init( this, GetWindow(), m_nScreen ); - } - - return pGraphics_; -} - -void X11SalFrame::ReleaseGraphics( SalGraphics *pGraphics ) -{ - DBG_ASSERT( pGraphics == pGraphics_, "SalFrame::ReleaseGraphics pGraphics!=pGraphics_" ); - - if( pGraphics != pGraphics_ ) - return; - - pFreeGraphics_ = pGraphics_; - pGraphics_ = NULL; -} - -void X11SalFrame::updateGraphics( bool bClear ) -{ - Drawable aDrawable = bClear ? None : GetWindow(); - if( pGraphics_ ) - pGraphics_->SetDrawable( aDrawable, m_nScreen ); - if( pFreeGraphics_ ) - pFreeGraphics_->SetDrawable( aDrawable, m_nScreen ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -void X11SalFrame::Enable( BOOL /*bEnable*/ ) -{ - // NYI: enable/disable frame -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -void X11SalFrame::SetIcon( USHORT nIcon ) -{ - if ( ! IsChildWindow() ) - { - // 0 == default icon -> #1 - if ( nIcon == 0 ) - nIcon = 1; - - mnIconID = nIcon; - - XIconSize *pIconSize = NULL; - int nSizes = 0; - int iconSize = 32; - if ( XGetIconSizes( GetXDisplay(), GetDisplay()->GetRootWindow( m_nScreen ), &pIconSize, &nSizes ) ) - { -#if OSL_DEBUG_LEVEL > 1 - fprintf(stderr, "X11SalFrame::SetIcon(): found %d IconSizes:\n", nSizes); -#endif - - const int ourLargestIconSize = 48; - bool bFoundIconSize = false; - - int i; - for( i=0; i twice of our - // largest available icon) reported by XGetIconSizes. - if( pIconSize[i].max_width > iconSize - && pIconSize[i].max_width <= 2*ourLargestIconSize ) - { - iconSize = pIconSize[i].max_width; - bFoundIconSize = true; - } - iconSize = pIconSize[i].max_width; - -#if OSL_DEBUG_LEVEL > 1 - fprintf(stderr, "min: %d, %d\nmax: %d, %d\ninc: %d, %d\n\n", - pIconSize[i].min_width, pIconSize[i].min_height, - pIconSize[i].max_width, pIconSize[i].max_height, - pIconSize[i].width_inc, pIconSize[i].height_inc); -#endif - } - - if ( !bFoundIconSize ) - { - // Unless someone has fixed olwm/olvwm, we have rejected - // the max icon size from |XGetIconSizes()|. Provide a - // better icon size default value, in case our window manager - // is olwm/olvwm. - const String& rWM( pDisplay_->getWMAdaptor()->getWindowManagerName() ); - - if ( rWM.EqualsAscii( "Olwm" ) ) - iconSize = 48; - } - - XFree( pIconSize ); - } - else - { - const String& rWM( pDisplay_->getWMAdaptor()->getWindowManagerName() ); - if( rWM.EqualsAscii( "KWin" ) ) // assume KDE is running - iconSize = 48; - static bool bGnomeIconSize = false; - static bool bGnomeChecked = false; - if( ! bGnomeChecked ) - { - bGnomeChecked=true; - int nCount = 0; - Atom* pProps = XListProperties( GetXDisplay(), - GetDisplay()->GetRootWindow( m_nScreen ), - &nCount ); - for( int i = 0; i < nCount && !bGnomeIconSize; i++ ) - { - char* pName = XGetAtomName( GetXDisplay(), pProps[i] ); - if( !strcmp( pName, "GNOME_PANEL_DESKTOP_AREA" ) ) - bGnomeIconSize = true; - if( pName ) - XFree( pName ); - } - if( pProps ) - XFree( pProps ); - } - if( bGnomeIconSize ) - iconSize = 48; - } - - XWMHints Hints; - Hints.flags = 0; - XWMHints *pHints = XGetWMHints( GetXDisplay(), GetShellWindow() ); - if( pHints ) - { - memcpy(&Hints, pHints, sizeof( XWMHints )); - XFree( pHints ); - } - pHints = &Hints; - - BOOL bOk = SelectAppIconPixmap( GetDisplay(), m_nScreen, - nIcon, iconSize, - pHints->icon_pixmap, pHints->icon_mask ); - if ( !bOk ) - { - // load default icon (0) - bOk = SelectAppIconPixmap( GetDisplay(), m_nScreen, - 0, iconSize, - pHints->icon_pixmap, pHints->icon_mask ); - } - if( bOk ) - { - pHints->flags |= IconPixmapHint; - if( pHints->icon_mask ) - pHints->flags |= IconMaskHint; - - XSetWMHints( GetXDisplay(), GetShellWindow(), pHints ); - } - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -void X11SalFrame::SetMaxClientSize( long nWidth, long nHeight ) -{ - if( ! IsChildWindow() ) - { - if( GetShellWindow() && (nStyle_ & (SAL_FRAME_STYLE_FLOAT|SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) != SAL_FRAME_STYLE_FLOAT ) - { - XSizeHints* pHints = XAllocSizeHints(); - long nSupplied = 0; - XGetWMNormalHints( GetXDisplay(), - GetShellWindow(), - pHints, - &nSupplied - ); - pHints->max_width = nWidth; - pHints->max_height = nHeight; - pHints->flags |= PMaxSize; - XSetWMNormalHints( GetXDisplay(), - GetShellWindow(), - pHints ); - XFree( pHints ); - } - } -} - -void X11SalFrame::SetMinClientSize( long nWidth, long nHeight ) -{ - if( ! IsChildWindow() ) - { - if( GetShellWindow() && (nStyle_ & (SAL_FRAME_STYLE_FLOAT|SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) != SAL_FRAME_STYLE_FLOAT ) - { - XSizeHints* pHints = XAllocSizeHints(); - long nSupplied = 0; - XGetWMNormalHints( GetXDisplay(), - GetShellWindow(), - pHints, - &nSupplied - ); - pHints->min_width = nWidth; - pHints->min_height = nHeight; - pHints->flags |= PMinSize; - XSetWMNormalHints( GetXDisplay(), - GetShellWindow(), - pHints ); - XFree( pHints ); - } - } -} - -// Show + Pos (x,y,z) + Size (width,height) -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate ) -{ - if( ( bVisible && bMapped_ ) - || ( !bVisible && !bMapped_ ) ) - return; - - // HACK: this is a workaround for (at least) kwin - // even though transient frames should be kept above their parent - // this does not necessarily hold true for DOCK type windows - // so artificially set ABOVE and remove it again on hide - if( mpParent && (mpParent->nStyle_ & SAL_FRAME_STYLE_PARTIAL_FULLSCREEN ) && pDisplay_->getWMAdaptor()->isLegacyPartialFullscreen()) - pDisplay_->getWMAdaptor()->enableAlwaysOnTop( this, bVisible ); - - bMapped_ = bVisible; - bViewable_ = bVisible; - setXEmbedInfo(); - if( bVisible ) - { - SessionManagerClient::open(); // will simply return after the first time - - mbInShow = TRUE; - if( ! (nStyle_ & SAL_FRAME_STYLE_INTRO) ) - { - // hide all INTRO frames - const std::list< SalFrame* >& rFrames = GetDisplay()->getFrames(); - for( std::list< SalFrame* >::const_iterator it = rFrames.begin(); it != rFrames.end(); ++it ) - { - const X11SalFrame* pFrame = static_cast< const X11SalFrame* >(*it); - // look for intro bit map; if present, hide it - if( pFrame->nStyle_ & SAL_FRAME_STYLE_INTRO ) - { - if( pFrame->bMapped_ ) - const_cast(pFrame)->Show( FALSE ); - } - } - } - - // update NET_WM_STATE which may have been deleted due to earlier Show(FALSE) - if( nShowState_ == SHOWSTATE_HIDDEN ) - GetDisplay()->getWMAdaptor()->frameIsMapping( this ); - - /* - * #95097# - * Actually this is rather exotic and currently happens only in conjunction - * with the basic dialogue editor, - * which shows a frame and instantly hides it again. After that the - * editor window is shown and the WM takes this as an opportunity - * to show our hidden transient frame also. So Show( FALSE ) must - * withdraw the frame AND delete the WM_TRANSIENT_FOR property. - * In case the frame is shown again, the transient hint must be restored here. - */ - if( ! IsChildWindow() - && ! IsOverrideRedirect() - && ! IsFloatGrabWindow() - && mpParent - ) - { - GetDisplay()->getWMAdaptor()->changeReferenceFrame( this, mpParent ); - } - - // #i45160# switch to desktop where a dialog with parent will appear - if( mpParent && mpParent->m_nWorkArea != m_nWorkArea ) - GetDisplay()->getWMAdaptor()->switchToWorkArea( mpParent->m_nWorkArea ); - - if( IsFloatGrabWindow() && - mpParent && - nVisibleFloats == 0 && - ! GetDisplay()->GetCaptureFrame() ) - { - /* #i39420# - * outsmart KWin's "focus strictly under mouse" mode - * which insists on taking the focus from the document - * to the new float. Grab focus to parent frame BEFORE - * showing the float (cannot grab it to the float - * before show). - */ - XGrabPointer( GetXDisplay(), - mpParent->GetWindow(), - True, - PointerMotionMask | ButtonPressMask | ButtonReleaseMask, - GrabModeAsync, - GrabModeAsync, - None, - mpParent ? mpParent->GetCursor() : None, - CurrentTime - ); - } - - XLIB_Time nUserTime = 0; - if( ! bNoActivate && (nStyle_ & (SAL_FRAME_STYLE_OWNERDRAWDECORATION)) == 0 ) - nUserTime = pDisplay_->GetLastUserEventTime( true ); - GetDisplay()->getWMAdaptor()->setUserTime( this, nUserTime ); - if( ! bNoActivate && (nStyle_ & SAL_FRAME_STYLE_TOOLWINDOW) ) - m_bSetFocusOnMap = true; - - // actually map the window - if( m_bXEmbed ) - askForXEmbedFocus( 0 ); - else - { - if( GetWindow() != GetShellWindow() && ! IsSysChildWindow() ) - { - if( IsChildWindow() ) - XMapWindow( GetXDisplay(), GetShellWindow() ); - XSelectInput( GetXDisplay(), GetShellWindow(), CLIENT_EVENTS ); - } - if( nStyle_ & SAL_FRAME_STYLE_FLOAT ) - XMapRaised( GetXDisplay(), GetWindow() ); - else - XMapWindow( GetXDisplay(), GetWindow() ); - } - XSelectInput( GetXDisplay(), GetWindow(), CLIENT_EVENTS ); - - if( maGeometry.nWidth > 0 - && maGeometry.nHeight > 0 - && ( nWidth_ != (int)maGeometry.nWidth - || nHeight_ != (int)maGeometry.nHeight ) ) - { - nWidth_ = maGeometry.nWidth; - nHeight_ = maGeometry.nHeight; - } - - XSync( GetXDisplay(), False ); - - if( IsFloatGrabWindow() ) - { - /* - * #95453# - * Sawfish and twm can be switched to enter-exit focus behaviour. In this case - * we must grab the pointer else the dumb WM will put the focus to the - * override-redirect float window. The application window will be deactivated - * which causes that the floats are destroyed, so the user can never click on - * a menu because it vanishes as soon as he enters it. - */ - nVisibleFloats++; - if( nVisibleFloats == 1 && ! GetDisplay()->GetCaptureFrame() ) - { - /* #i39420# now move grab to the new float window */ - XGrabPointer( GetXDisplay(), - GetWindow(), - True, - PointerMotionMask | ButtonPressMask | ButtonReleaseMask, - GrabModeAsync, - GrabModeAsync, - None, - mpParent ? mpParent->GetCursor() : None, - CurrentTime - ); - } - } - CallCallback( SALEVENT_RESIZE, NULL ); - - /* - * sometimes a message box/dialogue is brought up when a frame is not mapped - * the corresponding TRANSIENT_FOR hint is then set to the root window - * so that the dialogue shows in all cases. Correct it here if the - * frame is shown afterwards. - */ - if( ! IsChildWindow() - && ! IsOverrideRedirect() - && ! IsFloatGrabWindow() - ) - { - for( std::list< X11SalFrame* >::const_iterator it = maChildren.begin(); - it != maChildren.end(); ++it ) - { - if( (*it)->mbTransientForRoot ) - GetDisplay()->getWMAdaptor()->changeReferenceFrame( *it, this ); - } - } - /* - * leave SHOWSTATE_UNKNOWN as this indicates first mapping - * and is only reset int HandleSizeEvent - */ - if( nShowState_ != SHOWSTATE_UNKNOWN ) - nShowState_ = SHOWSTATE_NORMAL; - - /* - * #98107# plugged windows don't necessarily get the - * focus on show because the parent may already be mapped - * and have the focus. So try to set the focus - * to the child on Show(TRUE) - */ - if( (nStyle_ & SAL_FRAME_STYLE_PLUG) && ! m_bXEmbed ) - XSetInputFocus( GetXDisplay(), - GetWindow(), - RevertToParent, - CurrentTime ); - - if( mpParent ) - { - // push this frame so it will be in front of its siblings - // only necessary for insane transient behaviour of Dtwm/olwm - mpParent->maChildren.remove( this ); - mpParent->maChildren.push_front(this); - } - } - else - { - if( getInputContext() ) - getInputContext()->Unmap( this ); - - if( ! IsChildWindow() ) - { - /* FIXME: Is deleting the property really necessary ? It hurts - * owner drawn windows at least. - */ - if( mpParent && ! (nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) - XDeleteProperty( GetXDisplay(), GetShellWindow(), GetDisplay()->getWMAdaptor()->getAtom( WMAdaptor::WM_TRANSIENT_FOR ) ); - XWithdrawWindow( GetXDisplay(), GetShellWindow(), m_nScreen ); - } - else if( ! m_bXEmbed ) - XUnmapWindow( GetXDisplay(), GetWindow() ); - - nShowState_ = SHOWSTATE_HIDDEN; - if( IsFloatGrabWindow() && nVisibleFloats ) - { - nVisibleFloats--; - if( nVisibleFloats == 0 && ! GetDisplay()->GetCaptureFrame() ) - XUngrabPointer( GetXDisplay(), - CurrentTime ); - } - // flush here; there may be a very seldom race between - // the display connection used for clipboard and our connection - Flush(); - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalFrame::ToTop( USHORT nFlags ) -{ - if( ( nFlags & SAL_FRAME_TOTOP_RESTOREWHENMIN ) - && ! ( nStyle_ & SAL_FRAME_STYLE_FLOAT ) - && nShowState_ != SHOWSTATE_HIDDEN - && nShowState_ != SHOWSTATE_UNKNOWN - ) - { - GetDisplay()->getWMAdaptor()->frameIsMapping( this ); - if( GetWindow() != GetShellWindow() && ! IsSysChildWindow() ) - XMapWindow( GetXDisplay(), GetShellWindow() ); - XMapWindow( GetXDisplay(), GetWindow() ); - } - - XLIB_Window aToTopWindow = IsSysChildWindow() ? GetWindow() : GetShellWindow(); - if( ! (nFlags & SAL_FRAME_TOTOP_GRABFOCUS_ONLY) ) - { - XRaiseWindow( GetXDisplay(), aToTopWindow ); - if( ! GetDisplay()->getWMAdaptor()->isTransientBehaviourAsExpected() ) - for( std::list< X11SalFrame* >::const_iterator it = maChildren.begin(); - it != maChildren.end(); ++it ) - (*it)->ToTop( nFlags & ~SAL_FRAME_TOTOP_GRABFOCUS ); - } - - if( ( ( nFlags & SAL_FRAME_TOTOP_GRABFOCUS ) || ( nFlags & SAL_FRAME_TOTOP_GRABFOCUS_ONLY ) ) - && bMapped_ ) - { - if( m_bXEmbed ) - askForXEmbedFocus( 0 ); - else - XSetInputFocus( GetXDisplay(), aToTopWindow, RevertToParent, CurrentTime ); - } -} -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalFrame::GetWorkArea( Rectangle& rWorkArea ) -{ - rWorkArea = pDisplay_->getWMAdaptor()->getWorkArea( 0 ); -} -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalFrame::GetClientSize( long &rWidth, long &rHeight ) -{ - if( ! bViewable_ ) - { - rWidth = rHeight = 0; - return; - } - - rWidth = maGeometry.nWidth; - rHeight = maGeometry.nHeight; - - if( !rWidth || !rHeight ) - { - XWindowAttributes aAttrib; - - XGetWindowAttributes( GetXDisplay(), GetWindow(), &aAttrib ); - - maGeometry.nWidth = rWidth = aAttrib.width; - maGeometry.nHeight = rHeight = aAttrib.height; - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -void X11SalFrame::SetWindowGravity (int nGravity) const -{ - if( ! IsChildWindow() ) - { - XSizeHints* pHint = XAllocSizeHints(); - long nFlag; - - XGetWMNormalHints (GetXDisplay(), GetShellWindow(), pHint, &nFlag); - pHint->flags |= PWinGravity; - pHint->win_gravity = nGravity; - - XSetWMNormalHints (GetXDisplay(), GetShellWindow(), pHint); - XSync (GetXDisplay(), False); - - XFree (pHint); - } -} - -void X11SalFrame::Center( ) -{ - int nX, nY, nScreenWidth, nScreenHeight; - int nRealScreenWidth, nRealScreenHeight; - int nScreenX = 0, nScreenY = 0; - - const Size& aScreenSize = GetDisplay()->getDataForScreen( m_nScreen ).m_aSize; - nScreenWidth = aScreenSize.Width(); - nScreenHeight = aScreenSize.Height(); - nRealScreenWidth = nScreenWidth; - nRealScreenHeight = nScreenHeight; - - if( GetDisplay()->IsXinerama() ) - { - // get xinerama screen we are on - // if there is a parent, use its center for screen determination - // else use the pointer - XLIB_Window aRoot, aChild; - int root_x, root_y, x, y; - unsigned int mask; - if( mpParent ) - { - root_x = mpParent->maGeometry.nX + mpParent->maGeometry.nWidth/2; - root_y = mpParent->maGeometry.nY + mpParent->maGeometry.nHeight/2; - } - else - XQueryPointer( GetXDisplay(), - GetShellWindow(), - &aRoot, &aChild, - &root_x, &root_y, - &x, &y, - &mask ); - const std::vector< Rectangle >& rScreens = GetDisplay()->GetXineramaScreens(); - for( unsigned int i = 0; i < rScreens.size(); i++ ) - if( rScreens[i].IsInside( Point( root_x, root_y ) ) ) - { - nScreenX = rScreens[i].Left(); - nScreenY = rScreens[i].Top(); - nRealScreenWidth = rScreens[i].GetWidth(); - nRealScreenHeight = rScreens[i].GetHeight(); - break; - } - } - - if( mpParent ) - { - X11SalFrame* pFrame = mpParent; - while( pFrame->mpParent ) - pFrame = pFrame->mpParent; - if( pFrame->maGeometry.nWidth < 1 || pFrame->maGeometry.nHeight < 1 ) - { - Rectangle aRect; - pFrame->GetPosSize( aRect ); - pFrame->maGeometry.nX = aRect.Left(); - pFrame->maGeometry.nY = aRect.Top(); - pFrame->maGeometry.nWidth = aRect.GetWidth(); - pFrame->maGeometry.nHeight = aRect.GetHeight(); - } - - if( pFrame->nStyle_ & SAL_FRAME_STYLE_PLUG ) - { - XLIB_Window aRoot; - unsigned int bw, depth; - XGetGeometry( GetXDisplay(), - pFrame->GetShellWindow(), - &aRoot, - &nScreenX, &nScreenY, - (unsigned int*)&nScreenWidth, - (unsigned int*)&nScreenHeight, - &bw, &depth ); - } - else - { - nScreenX = pFrame->maGeometry.nX; - nScreenY = pFrame->maGeometry.nY; - nScreenWidth = pFrame->maGeometry.nWidth; - nScreenHeight = pFrame->maGeometry.nHeight; - } - } - - if( mpParent && mpParent->nShowState_ == SHOWSTATE_NORMAL ) - { - if( maGeometry.nWidth >= mpParent->maGeometry.nWidth && - maGeometry.nHeight >= mpParent->maGeometry.nHeight ) - { - nX = nScreenX + 40; - nY = nScreenY + 40; - } - else - { - // center the window relative to the top level frame - nX = (nScreenWidth - (int)maGeometry.nWidth ) / 2 + nScreenX; - nY = (nScreenHeight - (int)maGeometry.nHeight) / 2 + nScreenY; - } - } - else - { - // center the window relative to screen - nX = (nRealScreenWidth - (int)maGeometry.nWidth ) / 2 + nScreenX; - nY = (nRealScreenHeight - (int)maGeometry.nHeight) / 2 + nScreenY; - } - nX = nX < 0 ? 0 : nX; - nY = nY < 0 ? 0 : nY; - - bDefaultPosition_ = False; - if( mpParent ) - { - nX -= mpParent->maGeometry.nX; - nY -= mpParent->maGeometry.nY; - } - - Point aPoint(nX, nY); - SetPosSize( Rectangle( aPoint, Size( maGeometry.nWidth, maGeometry.nHeight ) ) ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalFrame::updateScreenNumber() -{ - if( GetDisplay()->IsXinerama() && GetDisplay()->GetXineramaScreens().size() > 1 ) - { - Point aPoint( maGeometry.nX, maGeometry.nY ); - const std::vector& rScreenRects( GetDisplay()->GetXineramaScreens() ); - size_t nScreens = rScreenRects.size(); - for( size_t i = 0; i < nScreens; i++ ) - { - if( rScreenRects[i].IsInside( aPoint ) ) - { - maGeometry.nScreenNumber = static_cast(i); - break; - } - } - } - else - maGeometry.nScreenNumber = static_cast(m_nScreen); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ) -{ - if( nStyle_ & SAL_FRAME_STYLE_PLUG ) - return; - - // relative positioning in X11SalFrame::SetPosSize - Rectangle aPosSize( Point( maGeometry.nX, maGeometry.nY ), Size( maGeometry.nWidth, maGeometry.nHeight ) ); - aPosSize.Justify(); - - if( ! ( nFlags & SAL_FRAME_POSSIZE_X ) ) - { - nX = aPosSize.Left(); - if( mpParent ) - nX -= mpParent->maGeometry.nX; - } - if( ! ( nFlags & SAL_FRAME_POSSIZE_Y ) ) - { - nY = aPosSize.Top(); - if( mpParent ) - nY -= mpParent->maGeometry.nY; - } - if( ! ( nFlags & SAL_FRAME_POSSIZE_WIDTH ) ) - nWidth = aPosSize.GetWidth(); - if( ! ( nFlags & SAL_FRAME_POSSIZE_HEIGHT ) ) - nHeight = aPosSize.GetHeight(); - - aPosSize = Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ); - - if( ! ( nFlags & ( SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y ) ) ) - { - if( bDefaultPosition_ ) - { - maGeometry.nWidth = aPosSize.GetWidth(); - maGeometry.nHeight = aPosSize.GetHeight(); - Center(); - } - else - SetSize( Size( nWidth, nHeight ) ); - } - else - SetPosSize( aPosSize ); - - bDefaultPosition_ = False; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalFrame::SetAlwaysOnTop( BOOL bOnTop ) -{ - if( ! IsOverrideRedirect() ) - { - bAlwaysOnTop_ = bOnTop; - pDisplay_->getWMAdaptor()->enableAlwaysOnTop( this, bOnTop ); - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -#define _FRAMESTATE_MASK_GEOMETRY \ - (SAL_FRAMESTATE_MASK_X | SAL_FRAMESTATE_MASK_Y | \ - SAL_FRAMESTATE_MASK_WIDTH | SAL_FRAMESTATE_MASK_HEIGHT) -#define _FRAMESTATE_MASK_MAXIMIZED_GEOMETRY \ - (SAL_FRAMESTATE_MASK_MAXIMIZED_X | SAL_FRAMESTATE_MASK_MAXIMIZED_Y | \ - SAL_FRAMESTATE_MASK_MAXIMIZED_WIDTH | SAL_FRAMESTATE_MASK_MAXIMIZED_HEIGHT) - -void X11SalFrame::SetWindowState( const SalFrameState *pState ) -{ - if (pState == NULL) - return; - - // Request for position or size change - if (pState->mnMask & _FRAMESTATE_MASK_GEOMETRY) - { - Rectangle aPosSize; - bool bDoAdjust = false; - - /* #i44325# - * if maximized, set restore size and guess maximized size from last time - * in state change below maximize window - */ - if( ! IsChildWindow() && - (pState->mnMask & SAL_FRAMESTATE_MASK_STATE) && - (pState->mnState & SAL_FRAMESTATE_MAXIMIZED) && - (pState->mnMask & _FRAMESTATE_MASK_GEOMETRY) == _FRAMESTATE_MASK_GEOMETRY && - (pState->mnMask & _FRAMESTATE_MASK_MAXIMIZED_GEOMETRY) == _FRAMESTATE_MASK_MAXIMIZED_GEOMETRY - ) - { - XSizeHints* pHints = XAllocSizeHints(); - long nSupplied = 0; - XGetWMNormalHints( GetXDisplay(), - GetShellWindow(), - pHints, - &nSupplied ); - pHints->flags |= PPosition | PWinGravity; - pHints->x = pState->mnX; - pHints->y = pState->mnY; - pHints->win_gravity = pDisplay_->getWMAdaptor()->getPositionWinGravity(); - XSetWMNormalHints( GetXDisplay(), - GetShellWindow(), - pHints ); - XFree( pHints ); - - XMoveResizeWindow( GetXDisplay(), GetShellWindow(), - pState->mnX, pState->mnY, - pState->mnWidth, pState->mnHeight ); - // guess maximized geometry from last time - maGeometry.nX = pState->mnMaximizedX; - maGeometry.nY = pState->mnMaximizedY; - maGeometry.nWidth = pState->mnMaximizedWidth; - maGeometry.nHeight = pState->mnMaximizedHeight; - updateScreenNumber(); - } - else - { - // initialize with current geometry - if ((pState->mnMask & _FRAMESTATE_MASK_GEOMETRY) != _FRAMESTATE_MASK_GEOMETRY) - GetPosSize (aPosSize); - - // change requested properties - if (pState->mnMask & SAL_FRAMESTATE_MASK_X) - { - aPosSize.setX (pState->mnX); - } - if (pState->mnMask & SAL_FRAMESTATE_MASK_Y) - { - aPosSize.setY (pState->mnY); - } - if (pState->mnMask & SAL_FRAMESTATE_MASK_WIDTH) - { - long nWidth = pState->mnWidth > 0 ? pState->mnWidth - 1 : 0; - aPosSize.setWidth (nWidth); - bDoAdjust = true; - } - if (pState->mnMask & SAL_FRAMESTATE_MASK_HEIGHT) - { - int nHeight = pState->mnHeight > 0 ? pState->mnHeight - 1 : 0; - aPosSize.setHeight (nHeight); - bDoAdjust = true; - } - - const Size& aScreenSize = pDisplay_->getDataForScreen( m_nScreen ).m_aSize; - const WMAdaptor *pWM = GetDisplay()->getWMAdaptor(); - - if( bDoAdjust && aPosSize.GetWidth() <= aScreenSize.Width() - && aPosSize.GetHeight() <= aScreenSize.Height() ) - { - SalFrameGeometry aGeom = maGeometry; - - if( ! (nStyle_ & ( SAL_FRAME_STYLE_FLOAT | SAL_FRAME_STYLE_PLUG ) ) && - mpParent && - aGeom.nLeftDecoration == 0 && - aGeom.nTopDecoration == 0 ) - { - aGeom = mpParent->maGeometry; - if( aGeom.nLeftDecoration == 0 && - aGeom.nTopDecoration == 0 ) - { - aGeom.nLeftDecoration = 5; - aGeom.nTopDecoration = 20; - aGeom.nRightDecoration = 5; - aGeom.nBottomDecoration = 5; - } - } - - // adjust position so that frame fits onto screen - if( aPosSize.Right()+(long)aGeom.nRightDecoration > aScreenSize.Width()-1 ) - aPosSize.Move( (long)aScreenSize.Width() - (long)aPosSize.Right() - (long)aGeom.nRightDecoration, 0 ); - if( aPosSize.Bottom()+(long)aGeom.nBottomDecoration > aScreenSize.Height()-1 ) - aPosSize.Move( 0, (long)aScreenSize.Height() - (long)aPosSize.Bottom() - (long)aGeom.nBottomDecoration ); - if( aPosSize.Left() < (long)aGeom.nLeftDecoration ) - aPosSize.Move( (long)aGeom.nLeftDecoration - (long)aPosSize.Left(), 0 ); - if( aPosSize.Top() < (long)aGeom.nTopDecoration ) - aPosSize.Move( 0, (long)aGeom.nTopDecoration - (long)aPosSize.Top() ); - } - - // resize with new args - if (pWM->supportsICCCMPos()) - { - if( mpParent ) - aPosSize.Move( -mpParent->maGeometry.nX, - -mpParent->maGeometry.nY ); - SetPosSize( aPosSize ); - bDefaultPosition_ = False; - } - else - SetPosSize( 0, 0, aPosSize.GetWidth(), aPosSize.GetHeight(), SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT ); - } - } - - // request for status change - if (pState->mnMask & SAL_FRAMESTATE_MASK_STATE) - { - if (pState->mnState & SAL_FRAMESTATE_MAXIMIZED) - { - nShowState_ = SHOWSTATE_NORMAL; - if( ! (pState->mnState & (SAL_FRAMESTATE_MAXIMIZED_HORZ|SAL_FRAMESTATE_MAXIMIZED_VERT) ) ) - Maximize(); - else - { - bool bHorz = (pState->mnState & SAL_FRAMESTATE_MAXIMIZED_HORZ) ? true : false; - bool bVert = (pState->mnState & SAL_FRAMESTATE_MAXIMIZED_VERT) ? true : false; - GetDisplay()->getWMAdaptor()->maximizeFrame( this, bHorz, bVert ); - } - maRestorePosSize.Left() = pState->mnX; - maRestorePosSize.Top() = pState->mnY; - maRestorePosSize.Right() = maRestorePosSize.Left() + pState->mnWidth; - maRestorePosSize.Right() = maRestorePosSize.Left() + pState->mnHeight; - } - else if( mbMaximizedHorz || mbMaximizedVert ) - GetDisplay()->getWMAdaptor()->maximizeFrame( this, false, false ); - - if (pState->mnState & SAL_FRAMESTATE_MINIMIZED) - { - if (nShowState_ == SHOWSTATE_UNKNOWN) - nShowState_ = SHOWSTATE_NORMAL; - Minimize(); - } - if (pState->mnState & SAL_FRAMESTATE_NORMAL) - { - if (nShowState_ != SHOWSTATE_NORMAL) - Restore(); - } - if (pState->mnState & SAL_FRAMESTATE_ROLLUP) - GetDisplay()->getWMAdaptor()->shade( this, true ); - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -BOOL X11SalFrame::GetWindowState( SalFrameState* pState ) -{ - if( SHOWSTATE_MINIMIZED == nShowState_ ) - pState->mnState = SAL_FRAMESTATE_MINIMIZED; - else - pState->mnState = SAL_FRAMESTATE_NORMAL; - - Rectangle aPosSize; - if( maRestorePosSize.IsEmpty() ) - GetPosSize( aPosSize ); - else - aPosSize = maRestorePosSize; - - if( mbMaximizedHorz ) - pState->mnState |= SAL_FRAMESTATE_MAXIMIZED_HORZ; - if( mbMaximizedVert ) - pState->mnState |= SAL_FRAMESTATE_MAXIMIZED_VERT; - if( mbShaded ) - pState->mnState |= SAL_FRAMESTATE_ROLLUP; - - pState->mnX = aPosSize.Left(); - pState->mnY = aPosSize.Top(); - pState->mnWidth = aPosSize.GetWidth(); - pState->mnHeight = aPosSize.GetHeight(); - - pState->mnMask = _FRAMESTATE_MASK_GEOMETRY | SAL_FRAMESTATE_MASK_STATE; - - - if (! maRestorePosSize.IsEmpty() ) - { - GetPosSize( aPosSize ); - pState->mnState |= SAL_FRAMESTATE_MAXIMIZED; - pState->mnMaximizedX = aPosSize.Left(); - pState->mnMaximizedY = aPosSize.Top(); - pState->mnMaximizedWidth = aPosSize.GetWidth(); - pState->mnMaximizedHeight = aPosSize.GetHeight(); - pState->mnMask |= _FRAMESTATE_MASK_MAXIMIZED_GEOMETRY; - } - - return TRUE; -} - -// ---------------------------------------------------------------------------- -// get a screenshot of the current frame including window manager decoration -SalBitmap* X11SalFrame::SnapShot() -{ - Display* pDisplay = GetXDisplay(); - - // make sure the frame has been reparented and all paint timer have been - // expired - do - { - XSync(pDisplay, False); - Application::Reschedule (); - } - while (XPending(pDisplay)); - TimeValue aVal; - aVal.Seconds = 0; - aVal.Nanosec = 50000000; - osl_waitThread( &aVal ); - do - { - XSync(pDisplay, False); - Application::Reschedule (); - } - while (XPending(pDisplay)); - - // get the most outer window, usually the window manager decoration - Drawable hWindow = None; - if (IsOverrideRedirect()) - hWindow = GetDrawable(); - else - if (hPresentationWindow != None) - hWindow = hPresentationWindow; - else - hWindow = GetStackingWindow(); - - // query the contents of the window - if (hWindow != None) - { - X11SalBitmap *pBmp = new X11SalBitmap; - if (pBmp->SnapShot (pDisplay, hWindow)) - return pBmp; - else - delete pBmp; - } - - return NULL; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -// native menu implementation - currently empty -void X11SalFrame::DrawMenuBar() -{ -} - -void X11SalFrame::SetMenu( SalMenu* ) -{ -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalFrame::GetPosSize( Rectangle &rPosSize ) -{ - if( maGeometry.nWidth < 1 || maGeometry.nHeight < 1 ) - { - const Size& aScreenSize = pDisplay_->getDataForScreen( m_nScreen ).m_aSize; - long w = aScreenSize.Width() - maGeometry.nLeftDecoration - maGeometry.nRightDecoration; - long h = aScreenSize.Height() - maGeometry.nTopDecoration - maGeometry.nBottomDecoration; - - rPosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ), Size( w, h ) ); - } - else - rPosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ), - Size( maGeometry.nWidth, maGeometry.nHeight ) ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalFrame::SetSize( const Size &rSize ) -{ - if( rSize.Width() > 0 && rSize.Height() > 0 ) - { - if( ! ( nStyle_ & SAL_FRAME_STYLE_SIZEABLE ) - && ! IsChildWindow() - && ( nStyle_ & (SAL_FRAME_STYLE_FLOAT|SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) != SAL_FRAME_STYLE_FLOAT ) - { - XSizeHints* pHints = XAllocSizeHints(); - long nSupplied = 0; - XGetWMNormalHints( GetXDisplay(), - GetShellWindow(), - pHints, - &nSupplied - ); - pHints->min_width = rSize.Width(); - pHints->min_height = rSize.Height(); - pHints->max_width = rSize.Width(); - pHints->max_height = rSize.Height(); - pHints->flags |= PMinSize | PMaxSize; - XSetWMNormalHints( GetXDisplay(), - GetShellWindow(), - pHints ); - XFree( pHints ); - } - XResizeWindow( GetXDisplay(), IsSysChildWindow() ? GetWindow() : GetShellWindow(), rSize.Width(), rSize.Height() ); - if( GetWindow() != GetShellWindow() ) - { - if( (nStyle_ & SAL_FRAME_STYLE_PLUG ) ) - XMoveResizeWindow( GetXDisplay(), GetWindow(), 0, 0, rSize.Width(), rSize.Height() ); - else - XResizeWindow( GetXDisplay(), GetWindow(), rSize.Width(), rSize.Height() ); - } - - maGeometry.nWidth = rSize.Width(); - maGeometry.nHeight = rSize.Height(); - - // allow the external status window to reposition - if (mbInputFocus && mpInputContext != NULL) - mpInputContext->SetICFocus ( this ); - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -void X11SalFrame::SetPosSize( const Rectangle &rPosSize ) -{ - XWindowChanges values; - values.x = rPosSize.Left(); - values.y = rPosSize.Top(); - values.width = rPosSize.GetWidth(); - values.height = rPosSize.GetHeight(); - - if( !values.width || !values.height ) - return; - - if( mpParent && ! IsSysChildWindow() ) - { - // --- RTL --- (mirror window pos) - if( Application::GetSettings().GetLayoutRTL() ) - values.x = mpParent->maGeometry.nWidth-values.width-1-values.x; - - XLIB_Window aChild; - // coordinates are relative to parent, so translate to root coordinates - XTranslateCoordinates( GetDisplay()->GetDisplay(), - mpParent->GetWindow(), - GetDisplay()->GetRootWindow( m_nScreen ), - values.x, values.y, - &values.x, &values.y, - & aChild ); - } - - bool bMoved = false; - bool bSized = false; - if( values.x != maGeometry.nX || values.y != maGeometry.nY ) - bMoved = true; - if( values.width != (int)maGeometry.nWidth || values.height != (int)maGeometry.nHeight ) - bSized = true; - - if( ! ( nStyle_ & ( SAL_FRAME_STYLE_PLUG | SAL_FRAME_STYLE_FLOAT ) ) - && !(pDisplay_->GetProperties() & PROPERTY_SUPPORT_WM_ClientPos) ) - { - values.x -= maGeometry.nLeftDecoration; - values.y -= maGeometry.nTopDecoration; - } - - // do net set WMNormalHints for .. - if( - // child windows - ! IsChildWindow() - // popups (menu, help window, etc.) - && (nStyle_ & (SAL_FRAME_STYLE_FLOAT|SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) != SAL_FRAME_STYLE_FLOAT - // shown, sizeable windows - && ( nShowState_ == SHOWSTATE_UNKNOWN || - nShowState_ == SHOWSTATE_HIDDEN || - ! ( nStyle_ & SAL_FRAME_STYLE_SIZEABLE ) - ) - ) - { - XSizeHints* pHints = XAllocSizeHints(); - long nSupplied = 0; - XGetWMNormalHints( GetXDisplay(), - GetShellWindow(), - pHints, - &nSupplied - ); - if( ! ( nStyle_ & SAL_FRAME_STYLE_SIZEABLE ) ) - { - pHints->min_width = rPosSize.GetWidth(); - pHints->min_height = rPosSize.GetHeight(); - pHints->max_width = rPosSize.GetWidth(); - pHints->max_height = rPosSize.GetHeight(); - pHints->flags |= PMinSize | PMaxSize; - } - if( nShowState_ == SHOWSTATE_UNKNOWN || nShowState_ == SHOWSTATE_HIDDEN ) - { - pHints->flags |= PPosition | PWinGravity; - pHints->x = values.x; - pHints->y = values.y; - pHints->win_gravity = pDisplay_->getWMAdaptor()->getPositionWinGravity(); - } - if( mbFullScreen ) - { - pHints->max_width = 10000; - pHints->max_height = 10000; - pHints->flags |= PMaxSize; - } - XSetWMNormalHints( GetXDisplay(), - GetShellWindow(), - pHints ); - XFree( pHints ); - } - - XMoveResizeWindow( GetXDisplay(), IsSysChildWindow() ? GetWindow() : GetShellWindow(), values.x, values.y, values.width, values.height ); - if( GetShellWindow() != GetWindow() ) - { - if( (nStyle_ & SAL_FRAME_STYLE_PLUG ) ) - XMoveResizeWindow( GetXDisplay(), GetWindow(), 0, 0, values.width, values.height ); - else - XMoveResizeWindow( GetXDisplay(), GetWindow(), values.x, values.y, values.width, values.height ); - } - - maGeometry.nX = values.x; - maGeometry.nY = values.y; - maGeometry.nWidth = values.width; - maGeometry.nHeight = values.height; - if( IsSysChildWindow() && mpParent ) - { - // translate back to root coordinates - maGeometry.nX += mpParent->maGeometry.nX; - maGeometry.nY += mpParent->maGeometry.nY; - } - - updateScreenNumber(); - if( bSized && ! bMoved ) - CallCallback( SALEVENT_RESIZE, NULL ); - else if( bMoved && ! bSized ) - CallCallback( SALEVENT_MOVE, NULL ); - else - CallCallback( SALEVENT_MOVERESIZE, NULL ); - - // allow the external status window to reposition - if (mbInputFocus && mpInputContext != NULL) - mpInputContext->SetICFocus ( this ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalFrame::Minimize() -{ - if( IsSysChildWindow() ) - return; - - if( SHOWSTATE_UNKNOWN == nShowState_ || SHOWSTATE_HIDDEN == nShowState_ ) - { - stderr0( "X11SalFrame::Minimize on withdrawn window\n" ); - return; - } - - if( XIconifyWindow( GetXDisplay(), - GetShellWindow(), - pDisplay_->GetDefaultScreenNumber() ) ) - nShowState_ = SHOWSTATE_MINIMIZED; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalFrame::Maximize() -{ - if( IsSysChildWindow() ) - return; - - if( SHOWSTATE_MINIMIZED == nShowState_ ) - { - GetDisplay()->getWMAdaptor()->frameIsMapping( this ); - XMapWindow( GetXDisplay(), GetShellWindow() ); - nShowState_ = SHOWSTATE_NORMAL; - } - - pDisplay_->getWMAdaptor()->maximizeFrame( this, true, true ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalFrame::Restore() -{ - if( IsSysChildWindow() ) - return; - - if( SHOWSTATE_UNKNOWN == nShowState_ || SHOWSTATE_HIDDEN == nShowState_ ) - { - stderr0( "X11SalFrame::Restore on withdrawn window\n" ); - return; - } - - if( SHOWSTATE_MINIMIZED == nShowState_ ) - { - GetDisplay()->getWMAdaptor()->frameIsMapping( this ); - XMapWindow( GetXDisplay(), GetShellWindow() ); - nShowState_ = SHOWSTATE_NORMAL; - } - - pDisplay_->getWMAdaptor()->maximizeFrame( this, false, false ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -void X11SalFrame::SetScreenNumber( unsigned int nNewScreen ) -{ - if( nNewScreen == maGeometry.nScreenNumber ) - return; - - if( GetDisplay()->IsXinerama() && GetDisplay()->GetXineramaScreens().size() > 1 ) - { - if( nNewScreen >= GetDisplay()->GetXineramaScreens().size() ) - return; - - Rectangle aOldScreenRect( GetDisplay()->GetXineramaScreens()[maGeometry.nScreenNumber] ); - Rectangle aNewScreenRect( GetDisplay()->GetXineramaScreens()[nNewScreen] ); - bool bVisible = bMapped_; - if( bVisible ) - Show( FALSE ); - maGeometry.nX = aNewScreenRect.Left() + (maGeometry.nX - aOldScreenRect.Left()); - maGeometry.nY = aNewScreenRect.Top() + (maGeometry.nY - aOldScreenRect.Top()); - createNewWindow( None, m_nScreen ); - if( bVisible ) - Show( TRUE ); - maGeometry.nScreenNumber = nNewScreen; - } - else if( sal_Int32(nNewScreen) < GetDisplay()->GetScreenCount() ) - { - bool bVisible = bMapped_; - if( bVisible ) - Show( FALSE ); - createNewWindow( None, nNewScreen ); - if( bVisible ) - Show( TRUE ); - maGeometry.nScreenNumber = nNewScreen; - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -void X11SalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen ) -{ - if( GetDisplay()->IsXinerama() && GetDisplay()->GetXineramaScreens().size() > 1 ) - { - if( mbFullScreen == (bool)bFullScreen ) - return; - if( bFullScreen ) - { - maRestorePosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ), - Size( maGeometry.nWidth, maGeometry.nHeight ) ); - Rectangle aRect; - if( nScreen < 0 || nScreen >= static_cast(GetDisplay()->GetXineramaScreens().size()) ) - aRect = Rectangle( Point(0,0), GetDisplay()->GetScreenSize( m_nScreen ) ); - else - aRect = GetDisplay()->GetXineramaScreens()[nScreen]; - nStyle_ |= SAL_FRAME_STYLE_PARTIAL_FULLSCREEN; - bool bVisible = bMapped_; - if( bVisible ) - Show( FALSE ); - maGeometry.nX = aRect.Left(); - maGeometry.nY = aRect.Top(); - maGeometry.nWidth = aRect.GetWidth(); - maGeometry.nHeight = aRect.GetHeight(); - mbMaximizedHorz = mbMaximizedVert = false; - mbFullScreen = true; - createNewWindow( None, m_nScreen ); - if( GetDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() ) - GetDisplay()->getWMAdaptor()->enableAlwaysOnTop( this, true ); - else - GetDisplay()->getWMAdaptor()->showFullScreen( this, true ); - if( bVisible ) - Show(TRUE); - - } - else - { - mbFullScreen = false; - nStyle_ &= ~SAL_FRAME_STYLE_PARTIAL_FULLSCREEN; - bool bVisible = bMapped_; - Rectangle aRect = maRestorePosSize; - maRestorePosSize = Rectangle(); - if( bVisible ) - Show( FALSE ); - createNewWindow( None, m_nScreen ); - if( !aRect.IsEmpty() ) - SetPosSize( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), - SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y | - SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT ); - if( bVisible ) - Show( TRUE ); - } - } - else - { - if( nScreen < 0 || nScreen >= GetDisplay()->GetScreenCount() ) - nScreen = m_nScreen; - if( nScreen != m_nScreen ) - { - bool bVisible = bMapped_; - if( mbFullScreen ) - pDisplay_->getWMAdaptor()->showFullScreen( this, false ); - if( bVisible ) - Show( FALSE ); - createNewWindow( None, nScreen ); - if( mbFullScreen ) - pDisplay_->getWMAdaptor()->showFullScreen( this, true ); - if( bVisible ) - Show( TRUE ); - } - if( mbFullScreen == (bool)bFullScreen ) - return; - - pDisplay_->getWMAdaptor()->showFullScreen( this, bFullScreen ); - if( IsOverrideRedirect() - && WMSupportsFWS( GetXDisplay(), GetDisplay()->GetRootWindow( m_nScreen ) ) ) - { - AddFwsProtocols( GetXDisplay(), GetShellWindow() ); - RegisterFwsWindow( GetXDisplay(), GetShellWindow() ); - } - } -} - -/* --------------------------------------------------------------------- - the xautolock pseudo screen saver needs special treatment since it - doesn't cooperate with XxxxScreenSaver settings - ------------------------------------------------------------------- */ - -static Bool -IsRunningXAutoLock( Display *p_display, XLIB_Window a_window ) -{ - const char *p_atomname = "XAUTOLOCK_SEMAPHORE_PID"; - Atom a_pidatom; - - // xautolock interns this atom - a_pidatom = XInternAtom( p_display, p_atomname, True ); - if ( a_pidatom == None ) - return False; - - Atom a_type; - int n_format; - unsigned long n_items; - unsigned long n_bytes_after; - pid_t *p_pid; - pid_t n_pid; - // get pid of running xautolock - XGetWindowProperty (p_display, a_window, a_pidatom, 0L, 2L, False, - AnyPropertyType, &a_type, &n_format, &n_items, &n_bytes_after, - (unsigned char**) &p_pid ); - n_pid = *p_pid; - XFree( p_pid ); - - if ( a_type == XA_INTEGER ) - { - // check if xautolock pid points to a running process - if ( kill(n_pid, 0) == -1 ) - return False; - else - return True; - } - - return False; -} - -/* definitions from xautolock.c (pl15) */ -#define XAUTOLOCK_DISABLE 1 -#define XAUTOLOCK_ENABLE 2 - -static Bool -MessageToXAutoLock( Display *p_display, int n_message ) -{ - const char *p_atomname = "XAUTOLOCK_MESSAGE" ; - Atom a_messageatom; - XLIB_Window a_rootwindow; - - a_rootwindow = RootWindowOfScreen( ScreenOfDisplay(p_display, 0) ); - if ( ! IsRunningXAutoLock(p_display, a_rootwindow) ) - { - // remove any pending messages - a_messageatom = XInternAtom( p_display, p_atomname, True ); - if ( a_messageatom != None ) - XDeleteProperty( p_display, a_rootwindow, a_messageatom ); - return False; - } - - a_messageatom = XInternAtom( p_display, p_atomname, False ); - XChangeProperty (p_display, a_rootwindow, a_messageatom, XA_INTEGER, - 8, PropModeReplace, (unsigned char*)&n_message, sizeof(n_message) ); - - return True; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalFrame::StartPresentation( BOOL bStart ) -{ - I18NStatus::get().show( !bStart, I18NStatus::presentation ); - if ( bStart ) - MessageToXAutoLock( GetXDisplay(), XAUTOLOCK_DISABLE ); - else - MessageToXAutoLock( GetXDisplay(), XAUTOLOCK_ENABLE ); - - if( ! bStart && hPresentationWindow != None ) - doReparentPresentationDialogues( GetDisplay() ); - hPresentationWindow = (bStart && IsOverrideRedirect() ) ? GetWindow() : None; - - - // needs static here to save DPMS settings - int dummy; - static bool DPMSExtensionAvailable = -#ifndef SOLARIS - (DPMSQueryExtension(GetXDisplay(), &dummy, &dummy) != 0); - static XLIB_BOOL DPMSEnabled = false; -#else - false; - bool DPMSEnabled = false; - (void)dummy; -#define CARD16 unsigned short -#endif - static CARD16 dpms_standby_timeout=0; - static CARD16 dpms_suspend_timeout=0; - static CARD16 dpms_off_timeout=0; - - - if( bStart || nScreenSaversTimeout_ || DPMSEnabled) - { - if( hPresentationWindow ) - { - /* #i10559# workaround for WindowMaker: try to restore - * current focus after presentation window is gone - */ - int revert_to = 0; - XGetInputFocus( GetXDisplay(), &hPresFocusWindow, &revert_to ); - } - int timeout, interval, prefer_blanking, allow_exposures; - XGetScreenSaver( GetXDisplay(), - &timeout, - &interval, - &prefer_blanking, - &allow_exposures ); - - - // get the DPMS state right before the start - if (DPMSExtensionAvailable) - { -#ifndef SOLARIS - CARD16 state; // card16 is defined in Xdm.h - DPMSInfo( GetXDisplay(), - &state, - &DPMSEnabled); -#endif - } - if( bStart ) // start show - { - if ( timeout ) - { - nScreenSaversTimeout_ = timeout; - XResetScreenSaver( GetXDisplay() ); - XSetScreenSaver( GetXDisplay(), - 0, - interval, - prefer_blanking, - allow_exposures ); - } -#ifndef SOLARIS - if( DPMSEnabled ) - { - if ( DPMSExtensionAvailable ) - { - DPMSGetTimeouts( GetXDisplay(), - &dpms_standby_timeout, - &dpms_suspend_timeout, - &dpms_off_timeout); - DPMSSetTimeouts(GetXDisplay(), 0,0,0); - } - } -#endif - } - else // if( !bStart ) // end of show - { - if( nScreenSaversTimeout_ ) - { - XSetScreenSaver( GetXDisplay(), - nScreenSaversTimeout_, - interval, - prefer_blanking, - allow_exposures ); - nScreenSaversTimeout_ = 0; - } -#ifndef SOLARIS - if ( DPMSEnabled ) - { - if ( DPMSExtensionAvailable ) - { - // restore timeouts - DPMSSetTimeouts(GetXDisplay(), dpms_standby_timeout, - dpms_suspend_timeout, dpms_off_timeout); - } - } -#endif - } - } -} - -// Pointer -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalFrame::SetPointer( PointerStyle ePointerStyle ) -{ - hCursor_ = pDisplay_->GetPointer( ePointerStyle ); - XDefineCursor( GetXDisplay(), GetWindow(), hCursor_ ); - - if( IsCaptured() || nVisibleFloats > 0 ) - XChangeActivePointerGrab( GetXDisplay(), - PointerMotionMask|ButtonPressMask|ButtonReleaseMask, - hCursor_, - CurrentTime ); -} - -void X11SalFrame::SetPointerPos(long nX, long nY) -{ - /* #87921# when the application tries to center the mouse in the dialog the - * window isn't mapped already. So use coordinates relative to the root window. - */ - unsigned int nWindowLeft = maGeometry.nX + nX; - unsigned int nWindowTop = maGeometry.nY + nY; - - XWarpPointer( GetXDisplay(), None, pDisplay_->GetRootWindow( pDisplay_->GetDefaultScreenNumber() ), - 0, 0, 0, 0, nWindowLeft, nWindowTop); -} - -// delay handling of extended text input -#if !defined(__synchronous_extinput__) -void -X11SalFrame::PostExtTextEvent (sal_uInt16 nExtTextEventType, void *pExtTextEvent) -{ - XLIB_Window nFocusWindow = GetWindow(); - Atom nEventAtom = GetDisplay()->getWMAdaptor()->getAtom( WMAdaptor::SAL_EXTTEXTEVENT ); - - XEvent aEvent; - aEvent.xclient.type = ClientMessage; - aEvent.xclient.serial = 0; - aEvent.xclient.send_event = True; - aEvent.xclient.display = GetXDisplay(); - aEvent.xclient.window = nFocusWindow; - aEvent.xclient.message_type = nEventAtom; - aEvent.xclient.format = 32; - -#if SAL_TYPES_SIZEOFLONG > 4 - aEvent.xclient.data.l[0] = (sal_uInt32)((long)pExtTextEvent & 0xffffffff); - aEvent.xclient.data.l[1] = (sal_uInt32)((long)pExtTextEvent >> 32); -#else - aEvent.xclient.data.l[0] = (sal_uInt32)((long)pExtTextEvent); - aEvent.xclient.data.l[1] = 0; -#endif - aEvent.xclient.data.l[2] = (sal_uInt32)nExtTextEventType; - aEvent.xclient.data.l[3] = 0; - aEvent.xclient.data.l[4] = 0; - - XPutBackEvent( GetXDisplay(), &aEvent ); -} - -void -X11SalFrame::HandleExtTextEvent (XClientMessageEvent *pEvent) -{ - #if SAL_TYPES_SIZEOFLONG > 4 - void* pExtTextEvent = (void*)( (pEvent->data.l[0] & 0xffffffff) - | (pEvent->data.l[1] << 32) ); - #else - void* pExtTextEvent = (void*)(pEvent->data.l[0]); - #endif - sal_uInt16 nExtTextEventType = sal_uInt16(pEvent->data.l[2]); - - CallCallback(nExtTextEventType, pExtTextEvent); - - switch (nExtTextEventType) - { - case SALEVENT_ENDEXTTEXTINPUT: - break; - - case SALEVENT_EXTTEXTINPUT: - break; - - default: - - fprintf(stderr, "X11SalFrame::HandleExtTextEvent: invalid extended input\n"); - } -} -#endif /* defined(__synchronous_extinput__) */ - -// PostEvent -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -BOOL X11SalFrame::PostEvent( void *pData ) -{ - GetDisplay()->SendInternalEvent( this, pData ); - return TRUE; -} - -// Title -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalFrame::SetTitle( const XubString& rTitle ) -{ - if( ! ( IsChildWindow() || (nStyle_ & SAL_FRAME_STYLE_FLOAT ) ) ) - { - m_aTitle = rTitle; - GetDisplay()->getWMAdaptor()->setWMName( this, rTitle ); - } -} - -// ----------------------------------------------------------------------- - -void X11SalFrame::Flush() -{ - XFlush( GetDisplay()->GetDisplay() ); -} - -// ----------------------------------------------------------------------- - -void X11SalFrame::Sync() -{ - XSync( GetDisplay()->GetDisplay(), False ); -} - -// Keyboard -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -// ----------------------------------------------------------------------- - -void X11SalFrame::SetInputContext( SalInputContext* pContext ) -{ - if (pContext == NULL) - return; - - // 1. We should create an input context for this frame - // only when SAL_INPUTCONTEXT_TEXT is set. - - if (!(pContext->mnOptions & SAL_INPUTCONTEXT_TEXT)) - { - if( mpInputContext ) - mpInputContext->Unmap( this ); - return; - } - - // 2. We should use on-the-spot inputstyle - // only when SAL_INPUTCONTEXT_EXTTEXTINPUT is set. - - if (mpInputContext == NULL) - { - I18NStatus& rStatus( I18NStatus::get() ); - rStatus.setParent( this ); - mpInputContext = new SalI18N_InputContext( this ); - if (mpInputContext->UseContext()) - { - mpInputContext->ExtendEventMask( GetShellWindow() ); - if (pContext->mnOptions & SAL_INPUTCONTEXT_CHANGELANGUAGE) - mpInputContext->SetLanguage(pContext->meLanguage); - if (mbInputFocus) - mpInputContext->SetICFocus( this ); - } - } - else - mpInputContext->Map( this ); - return; -} - -// ----------------------------------------------------------------------- - -void X11SalFrame::EndExtTextInput( USHORT nFlags ) -{ - if (mpInputContext != NULL) - mpInputContext->EndExtTextInput( nFlags ); -} - -// ----------------------------------------------------------------------- - -XubString X11SalFrame::GetKeyName( USHORT nKeyCode ) -{ - return GetDisplay()->GetKeyName( nKeyCode ); -} - -XubString X11SalFrame::GetSymbolKeyName( const XubString&, USHORT nKeyCode ) -{ - return GetKeyName( nKeyCode ); -} - -BOOL X11SalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , KeyCode& ) -{ - // not supported yet - return FALSE; -} - -LanguageType X11SalFrame::GetInputLanguage() -{ - // could be improved by checking unicode ranges of the last input - return LANGUAGE_DONTKNOW; -} - -// Settings -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -inline Color getColorFromLong( long nColor ) -{ - return Color( (nColor & 0xff), (nColor & 0xff00)>>8, (nColor & 0xff0000)>>16); -} - -void X11SalFrame::UpdateSettings( AllSettings& rSettings ) -{ - - DtIntegrator* pIntegrator = GetDisplay()->getDtIntegrator(); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "DtIntegrator: %d\n", pIntegrator ? pIntegrator->GetDtType() : -1 ); -#endif - if( pIntegrator ) - pIntegrator->GetSystemLook( rSettings ); -} - -void X11SalFrame::CaptureMouse( BOOL bCapture ) -{ - nCaptured_ = pDisplay_->CaptureMouse( bCapture ? this : NULL ); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -void X11SalFrame::SetParent( SalFrame* pNewParent ) -{ - if( mpParent != pNewParent ) - { - if( mpParent ) - mpParent->maChildren.remove( this ); - - mpParent = static_cast(pNewParent); - mpParent->maChildren.push_back( this ); - if( mpParent->m_nScreen != m_nScreen ) - createNewWindow( None, mpParent->m_nScreen ); - GetDisplay()->getWMAdaptor()->changeReferenceFrame( this, mpParent ); - } -} - -SalFrame* X11SalFrame::GetParent() const -{ - return mpParent; -} - -void X11SalFrame::createNewWindow( XLIB_Window aNewParent, int nScreen ) -{ - bool bWasVisible = bMapped_; - if( bWasVisible ) - Show( FALSE ); - - if( nScreen < 0 || nScreen >= GetDisplay()->GetScreenCount() ) - nScreen = m_nScreen; - - SystemParentData aParentData; - aParentData.aWindow = aNewParent; - aParentData.bXEmbedSupport = (aNewParent != None && m_bXEmbed); // caution: this is guesswork - if( aNewParent == None ) - { - aNewParent = GetDisplay()->GetRootWindow(nScreen); - aParentData.aWindow = None; - m_bXEmbed = false; - } - else - { - // is new parent a root window ? - Display* pDisp = GetDisplay()->GetDisplay(); - int nScreens = GetDisplay()->GetScreenCount(); - for( int i = 0; i < nScreens; i++ ) - { - if( aNewParent == RootWindow( pDisp, i ) ) - { - nScreen = i; - aParentData.aWindow = None; - m_bXEmbed = false; - break; - } - } - } - - // first deinit frame - updateGraphics(true); - if( mpInputContext ) - { - mpInputContext->UnsetICFocus( this ); - mpInputContext->Unmap( this ); - } - if( GetWindow() == hPresentationWindow ) - { - hPresentationWindow = None; - doReparentPresentationDialogues( GetDisplay() ); - } - XDestroyWindow( GetXDisplay(), mhWindow ); - mhWindow = None; - - passOnSaveYourSelf(); - - // now init with new parent again - if ( aParentData.aWindow != None ) - Init( nStyle_ | SAL_FRAME_STYLE_PLUG, nScreen, &aParentData ); - else - Init( nStyle_ & ~SAL_FRAME_STYLE_PLUG, nScreen, NULL, true ); - - // update graphics if necessary - updateGraphics(false); - - if( m_aTitle.Len() ) - SetTitle( m_aTitle ); - - if( mpParent ) - { - if( mpParent->m_nScreen != m_nScreen ) - SetParent( NULL ); - else - pDisplay_->getWMAdaptor()->changeReferenceFrame( this, mpParent ); - } - - if( bWasVisible ) - Show( TRUE ); - - std::list< X11SalFrame* > aChildren = maChildren; - for( std::list< X11SalFrame* >::iterator it = aChildren.begin(); it != aChildren.end(); ++it ) - (*it)->createNewWindow( None, m_nScreen ); - - // FIXME: SalObjects -} - -bool X11SalFrame::SetPluginParent( SystemParentData* pNewParent ) -{ - if( pNewParent->nSize >= sizeof(SystemParentData) ) - m_bXEmbed = pNewParent->aWindow != None && pNewParent->bXEmbedSupport; - createNewWindow( pNewParent ? pNewParent->aWindow : None ); - - return true; -} - -// Sound -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalFrame::Beep( SoundType eSoundType ) // not fully suported -{ - switch( eSoundType ) - { - case SOUND_DEFAULT: - case SOUND_ERROR: - GetDisplay()->Beep(); - break; - default: - // Excessive beeping averted - break; - } -} - -// Event Handling -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -static USHORT sal_GetCode( int state ) -{ - USHORT nCode = 0; - - if( state & Button1Mask ) - nCode |= MOUSE_LEFT; - if( state & Button2Mask ) - nCode |= MOUSE_MIDDLE; - if( state & Button3Mask ) - nCode |= MOUSE_RIGHT; - - if( state & ShiftMask ) - nCode |= KEY_SHIFT; - if( state & ControlMask ) - nCode |= KEY_MOD1; - if( state & Mod1Mask ) - nCode |= KEY_MOD2; - - // Map Meta/Super modifier to MOD3 on all Unix systems - // except Mac OS X - if( (state & Mod3Mask) ) - nCode |= KEY_MOD3; - - return nCode; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -SalFrame::SalPointerState X11SalFrame::GetPointerState() -{ - SalPointerState aState; - XLIB_Window aRoot, aChild; - int rx, ry, wx, wy; - unsigned int nMask = 0; - XQueryPointer( GetXDisplay(), - GetShellWindow(), - &aRoot, - &aChild, - &rx, &ry, - &wx, &wy, - &nMask - ); - - aState.maPos = Point(wx, wy); - aState.mnState = sal_GetCode( nMask ); - return aState; -} - -long X11SalFrame::HandleMouseEvent( XEvent *pEvent ) -{ - SalMouseEvent aMouseEvt; - USHORT nEvent = 0; - bool bClosePopups = false; - - if( nVisibleFloats && pEvent->type == EnterNotify ) - return 0; - - // Solaris X86: clicking the right button on a two-button mouse - // generates a button2 event not a button3 event - if (pDisplay_->GetProperties() & PROPERTY_SUPPORT_3ButtonMouse ) - { - switch (pEvent->type) - { - case EnterNotify: - case LeaveNotify: - if ( pEvent->xcrossing.state & Button2Mask ) - { - pEvent->xcrossing.state &= ~Button2Mask; - pEvent->xcrossing.state |= Button3Mask; - } - break; - - case MotionNotify: - if ( pEvent->xmotion.state & Button2Mask ) - { - pEvent->xmotion.state &= ~Button2Mask; - pEvent->xmotion.state |= Button3Mask; - } - break; - - default: - if ( Button2 == pEvent->xbutton.button ) - { - pEvent->xbutton.state &= ~Button2Mask; - pEvent->xbutton.state |= Button3Mask; - pEvent->xbutton.button = Button3; - } - break; - } - } - - - if( LeaveNotify == pEvent->type || EnterNotify == pEvent->type ) - { - /* - * #89075# #89335# - * - * some WMs (and/or) applications have a passive grab on - * mouse buttons (XGrabButton). This leads to enter/leave notifies - * with mouse buttons pressed in the state mask before the actual - * ButtonPress event gets dispatched. But EnterNotify - * is reported in vcl as MouseMove event. Some office code - * decides that a pressed button in a MouseMove belongs to - * a drag operation which leads to doing things differently. - * - * #95901# - * ignore Enter/LeaveNotify resulting from grabs so that - * help windows do not disappear just after appearing - * - * hopefully this workaround will not break anything. - */ - if( pEvent->xcrossing.mode == NotifyGrab || pEvent->xcrossing.mode == NotifyUngrab ) - return 0; - - aMouseEvt.mnX = pEvent->xcrossing.x; - aMouseEvt.mnY = pEvent->xcrossing.y; - aMouseEvt.mnTime = pEvent->xcrossing.time; - aMouseEvt.mnCode = sal_GetCode( pEvent->xcrossing.state ); - aMouseEvt.mnButton = 0; - - nEvent = LeaveNotify == pEvent->type - ? SALEVENT_MOUSELEAVE - : SALEVENT_MOUSEMOVE; - } - else if( pEvent->type == MotionNotify ) - { - aMouseEvt.mnX = pEvent->xmotion.x; - aMouseEvt.mnY = pEvent->xmotion.y; - aMouseEvt.mnTime = pEvent->xmotion.time; - aMouseEvt.mnCode = sal_GetCode( pEvent->xmotion.state ); - - aMouseEvt.mnButton = 0; - - nEvent = SALEVENT_MOUSEMOVE; - if( nVisibleFloats > 0 && mpParent ) - { - XLIB_Cursor aCursor = mpParent->GetCursor(); - if( pEvent->xmotion.x >= 0 && pEvent->xmotion.x < (int)maGeometry.nWidth && - pEvent->xmotion.y >= 0 && pEvent->xmotion.y < (int)maGeometry.nHeight ) - aCursor = None; - - XChangeActivePointerGrab( GetXDisplay(), - PointerMotionMask|ButtonPressMask|ButtonReleaseMask, - aCursor, - CurrentTime ); - } - } - else - { - // let mouse events reach the correct window - if( nVisibleFloats < 1 ) - { - if( ! (nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) - XUngrabPointer( GetXDisplay(), CurrentTime ); - } - else if( pEvent->type == ButtonPress ) - { - // see if the user clicks outside all of the floats - // if yes release the grab - bool bInside = false; - const std::list< SalFrame* >& rFrames = GetDisplay()->getFrames(); - for( std::list< SalFrame* >::const_iterator it = rFrames.begin(); it != rFrames.end(); ++it ) - { - const X11SalFrame* pFrame = static_cast< const X11SalFrame* >(*it); - if( pFrame->IsFloatGrabWindow() && - pFrame->bMapped_ && - pEvent->xbutton.x_root >= pFrame->maGeometry.nX && - pEvent->xbutton.x_root < pFrame->maGeometry.nX + (int)pFrame->maGeometry.nWidth && - pEvent->xbutton.y_root >= pFrame->maGeometry.nY && - pEvent->xbutton.y_root < pFrame->maGeometry.nY + (int)pFrame->maGeometry.nHeight ) - { - bInside = true; - break; - } - } - if( ! bInside ) - { - // need not take care of the XUngrabPointer in Show( FALSE ) - // because XUngrabPointer does not produce errors if pointer - // is not grabbed - XUngrabPointer( GetXDisplay(), CurrentTime ); - bClosePopups = true; - - /* #i15246# only close popups if pointer is outside all our frames - * cannot use our own geometry data here because stacking - * is unknown (the above case implicitly assumes - * that floats are on top which should be true) - */ - XLIB_Window aRoot, aChild; - int root_x, root_y, win_x, win_y; - unsigned int mask_return; - if( XQueryPointer( GetXDisplay(), - GetDisplay()->GetRootWindow( m_nScreen ), - &aRoot, &aChild, - &root_x, &root_y, - &win_x, &win_y, - &mask_return ) - && aChild // pointer may not be in any child - ) - { - for( std::list< SalFrame* >::const_iterator it = rFrames.begin(); it != rFrames.end(); ++it ) - { - const X11SalFrame* pFrame = static_cast< const X11SalFrame* >(*it); - if( ! pFrame->IsFloatGrabWindow() - && ( pFrame->GetWindow() == aChild || - pFrame->GetShellWindow() == aChild || - pFrame->GetStackingWindow() == aChild ) - ) - { - // #i63638# check that pointer is inside window, not - // only inside stacking window - if( root_x >= pFrame->maGeometry.nX && root_x < sal::static_int_cast< int >(pFrame->maGeometry.nX+pFrame->maGeometry.nWidth) && - root_y >= pFrame->maGeometry.nY && root_y < sal::static_int_cast< int >(pFrame->maGeometry.nX+pFrame->maGeometry.nHeight) ) - { - bClosePopups = false; - } - break; - } - } - } - } - } - - if( m_bXEmbed && pEvent->xbutton.button == Button1 ) - askForXEmbedFocus( pEvent->xbutton.time ); - - if( pEvent->xbutton.button == Button1 || - pEvent->xbutton.button == Button2 || - pEvent->xbutton.button == Button3 ) - { - aMouseEvt.mnX = pEvent->xbutton.x; - aMouseEvt.mnY = pEvent->xbutton.y; - aMouseEvt.mnTime = pEvent->xbutton.time; - aMouseEvt.mnCode = sal_GetCode( pEvent->xbutton.state ); - - if( Button1 == pEvent->xbutton.button ) - aMouseEvt.mnButton = MOUSE_LEFT; - else if( Button2 == pEvent->xbutton.button ) - aMouseEvt.mnButton = MOUSE_MIDDLE; - else if( Button3 == pEvent->xbutton.button ) - aMouseEvt.mnButton = MOUSE_RIGHT; - - nEvent = ButtonPress == pEvent->type - ? SALEVENT_MOUSEBUTTONDOWN - : SALEVENT_MOUSEBUTTONUP; - } - else if( pEvent->xbutton.button == Button4 || - pEvent->xbutton.button == Button5 || - pEvent->xbutton.button == Button6 || - pEvent->xbutton.button == Button7 ) - { - const bool bIncrement( - pEvent->xbutton.button == Button4 || - pEvent->xbutton.button == Button6 ); - const bool bHoriz( - pEvent->xbutton.button == Button6 || - pEvent->xbutton.button == Button7 ); - - if( pEvent->type == ButtonRelease ) - return 0; - - static ULONG nLines = 0; - if( ! nLines ) - { - char* pEnv = getenv( "SAL_WHEELLINES" ); - nLines = pEnv ? atoi( pEnv ) : 3; - if( nLines > 10 ) - nLines = SAL_WHEELMOUSE_EVENT_PAGESCROLL; - } - - SalWheelMouseEvent aWheelEvt; - aWheelEvt.mnTime = pEvent->xbutton.time; - aWheelEvt.mnX = pEvent->xbutton.x; - aWheelEvt.mnY = pEvent->xbutton.y; - aWheelEvt.mnDelta = bIncrement ? 120 : -120; - aWheelEvt.mnNotchDelta = bIncrement ? 1 : -1; - aWheelEvt.mnScrollLines = nLines; - aWheelEvt.mnCode = sal_GetCode( pEvent->xbutton.state ); - aWheelEvt.mbHorz = bHoriz; - - nEvent = SALEVENT_WHEELMOUSE; - - // --- RTL --- (mirror mouse pos) - if( Application::GetSettings().GetLayoutRTL() ) - aWheelEvt.mnX = nWidth_-1-aWheelEvt.mnX; - return CallCallback( nEvent, &aWheelEvt ); - } - } - - int nRet = 0; - if( nEvent == SALEVENT_MOUSELEAVE - || ( aMouseEvt.mnX < nWidth_ && aMouseEvt.mnX > -1 && - aMouseEvt.mnY < nHeight_ && aMouseEvt.mnY > -1 ) - || pDisplay_->MouseCaptured( this ) - ) - { - // --- RTL --- (mirror mouse pos) - if( Application::GetSettings().GetLayoutRTL() ) - aMouseEvt.mnX = nWidth_-1-aMouseEvt.mnX; - nRet = CallCallback( nEvent, &aMouseEvt ); - } - - if( bClosePopups ) - { - /* #108213# close popups after dispatching the event outside the popup; - * applications do weird things. - */ - ImplSVData* pSVData = ImplGetSVData(); - if ( pSVData->maWinData.mpFirstFloat ) - { - static const char* pEnv = getenv( "SAL_FLOATWIN_NOAPPFOCUSCLOSE" ); - if ( !(pSVData->maWinData.mpFirstFloat->GetPopupModeFlags() & FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE) && !(pEnv && *pEnv) ) - pSVData->maWinData.mpFirstFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); - } - } - - return nRet; -} - -// F10 means either KEY_F10 or KEY_MENU, which has to be decided -// in the independent part. -struct KeyAlternate -{ - USHORT nKeyCode; - sal_Unicode nCharCode; - KeyAlternate() : nKeyCode( 0 ), nCharCode( 0 ) {} - KeyAlternate( USHORT nKey, sal_Unicode nChar = 0 ) : nKeyCode( nKey ), nCharCode( nChar ) {} -}; - -inline KeyAlternate -GetAlternateKeyCode( const USHORT nKeyCode ) -{ - KeyAlternate aAlternate; - - switch( nKeyCode ) - { - case KEY_F10: aAlternate = KeyAlternate( KEY_MENU );break; - case KEY_F24: aAlternate = KeyAlternate( KEY_SUBTRACT, '-' );break; - } - - return aAlternate; -} - -void X11SalFrame::beginUnicodeSequence() -{ - rtl::OUString& rSeq( GetX11SalData()->GetUnicodeAccumulator() ); - DeletionListener aDeleteWatch( this ); - - if( rSeq.getLength() ) - endUnicodeSequence(); - - rSeq = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "u" ) ); - - if( ! aDeleteWatch.isDeleted() ) - { - USHORT nTextAttr = SAL_EXTTEXTINPUT_ATTR_UNDERLINE; - SalExtTextInputEvent aEv; - aEv.mnTime = 0; - aEv.maText = rSeq; - aEv.mpTextAttr = &nTextAttr; - aEv.mnCursorPos = 0; - aEv.mnDeltaStart = 0; - aEv.mnCursorFlags = 0; - aEv.mbOnlyCursor = FALSE; - - CallCallback(SALEVENT_EXTTEXTINPUT, (void*)&aEv); - } -} - -bool X11SalFrame::appendUnicodeSequence( sal_Unicode c ) -{ - bool bRet = false; - rtl::OUString& rSeq( GetX11SalData()->GetUnicodeAccumulator() ); - if( rSeq.getLength() > 0 ) - { - // range check - if( (c >= sal_Unicode('0') && c <= sal_Unicode('9')) || - (c >= sal_Unicode('a') && c <= sal_Unicode('f')) || - (c >= sal_Unicode('A') && c <= sal_Unicode('F')) ) - { - rtl::OUStringBuffer aBuf( rSeq.getLength() + 1 ); - aBuf.append( rSeq ); - aBuf.append( c ); - rSeq = aBuf.makeStringAndClear(); - std::vector attribs( rSeq.getLength(), SAL_EXTTEXTINPUT_ATTR_UNDERLINE ); - - SalExtTextInputEvent aEv; - aEv.mnTime = 0; - aEv.maText = rSeq; - aEv.mpTextAttr = &attribs[0]; - aEv.mnCursorPos = 0; - aEv.mnDeltaStart = 0; - aEv.mnCursorFlags = 0; - aEv.mbOnlyCursor = FALSE; - - CallCallback(SALEVENT_EXTTEXTINPUT, (void*)&aEv); - bRet = true; - } - else - bRet = endUnicodeSequence(); - } - else - endUnicodeSequence(); - return bRet; -} - -bool X11SalFrame::endUnicodeSequence() -{ - rtl::OUString& rSeq( GetX11SalData()->GetUnicodeAccumulator() ); - - DeletionListener aDeleteWatch( this ); - if( rSeq.getLength() > 1 && rSeq.getLength() < 6 ) - { - // cut the "u" - rtl::OUString aNumbers( rSeq.copy( 1 ) ); - sal_Int32 nValue = aNumbers.toInt32( 16 ); - if( nValue >= 32 ) - { - USHORT nTextAttr = SAL_EXTTEXTINPUT_ATTR_UNDERLINE; - SalExtTextInputEvent aEv; - aEv.mnTime = 0; - aEv.maText = rtl::OUString( sal_Unicode(nValue) ); - aEv.mpTextAttr = &nTextAttr; - aEv.mnCursorPos = 0; - aEv.mnDeltaStart = 0; - aEv.mnCursorFlags = 0; - aEv.mbOnlyCursor = FALSE; - CallCallback(SALEVENT_EXTTEXTINPUT, (void*)&aEv); - } - } - bool bWasInput = rSeq.getLength() > 0; - rSeq = rtl::OUString(); - if( bWasInput && ! aDeleteWatch.isDeleted() ) - CallCallback(SALEVENT_ENDEXTTEXTINPUT, NULL); - return bWasInput; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent ) -{ - KeySym nKeySym; - KeySym nUnmodifiedKeySym; - int nLen = 2048; - unsigned char *pPrintable = (unsigned char*)alloca( nLen ); - - // singlebyte code composed by input method, the new default - if (mpInputContext != NULL && mpInputContext->UseContext()) - { - // returns a keysym as well as the pPrintable (in system encoding) - // printable may be empty. - Status nStatus; - nKeySym = pDisplay_->GetKeySym( pEvent, pPrintable, &nLen, - &nUnmodifiedKeySym, - &nStatus, mpInputContext->GetContext() ); - if ( nStatus == XBufferOverflow ) - { - nLen *= 2; - pPrintable = (unsigned char*)alloca( nLen ); - nKeySym = pDisplay_->GetKeySym( pEvent, pPrintable, &nLen, - &nUnmodifiedKeySym, - &nStatus, mpInputContext->GetContext() ); - } - } - else - { - // fallback, this should never ever be called - Status nStatus = 0; - nKeySym = pDisplay_->GetKeySym( pEvent, pPrintable, &nLen, &nUnmodifiedKeySym, &nStatus ); - } - - SalKeyEvent aKeyEvt; - USHORT nKeyCode; - USHORT nModCode = 0; - char aDummy; - - if( pEvent->state & ShiftMask ) - nModCode |= KEY_SHIFT; - if( pEvent->state & ControlMask ) - nModCode |= KEY_MOD1; - if( pEvent->state & Mod1Mask ) - nModCode |= KEY_MOD2; - - if( nModCode != (KEY_SHIFT|KEY_MOD1) ) - endUnicodeSequence(); - - if( nKeySym == XK_Shift_L || nKeySym == XK_Shift_R - || nKeySym == XK_Control_L || nKeySym == XK_Control_R - || nKeySym == XK_Alt_L || nKeySym == XK_Alt_R - || nKeySym == XK_Meta_L || nKeySym == XK_Meta_R - || nKeySym == XK_Super_L || nKeySym == XK_Super_R ) - { - SalKeyModEvent aModEvt; - aModEvt.mnModKeyCode = 0; - if( pEvent->type == XLIB_KeyPress && mnExtKeyMod == 0 ) - mbSendExtKeyModChange = true; - else if( pEvent->type == KeyRelease && mbSendExtKeyModChange ) - { - aModEvt.mnModKeyCode = mnExtKeyMod; - mnExtKeyMod = 0; - } - - // pressing just the ctrl key leads to a keysym of XK_Control but - // the event state does not contain ControlMask. In the release - // event its the other way round: it does contain the Control mask. - // The modifier mode therefore has to be adapted manually. - USHORT nExtModMask = 0; - USHORT nModMask = 0; - switch( nKeySym ) - { - case XK_Control_L: - nExtModMask = MODKEY_LMOD1; - nModMask = KEY_MOD1; - break; - case XK_Control_R: - nExtModMask = MODKEY_RMOD1; - nModMask = KEY_MOD1; - break; - case XK_Alt_L: - nExtModMask = MODKEY_LMOD2; - nModMask = KEY_MOD2; - break; - case XK_Alt_R: - nExtModMask = MODKEY_RMOD2; - nModMask = KEY_MOD2; - break; - case XK_Shift_L: - nExtModMask = MODKEY_LSHIFT; - nModMask = KEY_SHIFT; - break; - case XK_Shift_R: - nExtModMask = MODKEY_RSHIFT; - nModMask = KEY_SHIFT; - break; - // Map Meta/Super keys to MOD3 modifier on all Unix systems - // except Mac OS X - case XK_Meta_L: - case XK_Super_L: - nExtModMask = MODKEY_LMOD3; - nModMask = KEY_MOD3; - break; - case XK_Meta_R: - case XK_Super_R: - nExtModMask = MODKEY_RMOD3; - nModMask = KEY_MOD3; - break; - } - if( pEvent->type == KeyRelease ) - { - nModCode &= ~nModMask; - mnExtKeyMod &= ~nExtModMask; - } - else - { - nModCode |= nModMask; - mnExtKeyMod |= nExtModMask; - } - - aModEvt.mnCode = nModCode; - aModEvt.mnTime = pEvent->time; - - int nRet = CallCallback( SALEVENT_KEYMODCHANGE, &aModEvt ); - - // emulate KEY_MENU - if ( ( (nKeySym == XK_Alt_L) || (nKeySym == XK_Alt_R) ) && - ( (nModCode & ~(KEY_MOD3|KEY_MOD2)) == 0 ) ) - { - if( pEvent->type == XLIB_KeyPress ) - mbKeyMenu = true; - else if( mbKeyMenu ) - { - // simulate KEY_MENU - aKeyEvt.mnCode = KEY_MENU | nModCode; - aKeyEvt.mnRepeat = 0; - aKeyEvt.mnTime = pEvent->time; - aKeyEvt.mnCharCode = 0; - nRet = CallCallback( SALEVENT_KEYINPUT, &aKeyEvt ); - nRet = CallCallback( SALEVENT_KEYUP, &aKeyEvt ); - } - } - else - mbKeyMenu = false; - return nRet; - } - - mbSendExtKeyModChange = mbKeyMenu = false; - - // try to figure out the vcl code for the keysym - // #i52338# use the unmodified KeySym if there is none for the real KeySym - // because the independent part has only keycodes for unshifted keys - nKeyCode = pDisplay_->GetKeyCode( nKeySym, &aDummy ); - if( nKeyCode == 0 ) - nKeyCode = pDisplay_->GetKeyCode( nUnmodifiedKeySym, &aDummy ); - - // try to figure out a printable if XmbLookupString returns only a keysym - // and NOT a printable. Do not store it in pPrintable[0] since it is expected to - // be in system encoding, not unicode. - // #i8988##, if KeySym and printable look equally promising then prefer KeySym - // the printable is bound to the encoding so the KeySym might contain more - // information (in et_EE locale: "Compose + Z + <" delivers "," in printable and - // (the desired) Zcaron in KeySym - sal_Unicode nKeyString = 0x0; - if ( (nLen == 0) - || ((nLen == 1) && (nKeySym > 0)) ) - nKeyString = KeysymToUnicode (nKeySym); - // if we have nothing we give up - if( !nKeyCode && !nLen && !nKeyString) - return 0; - - DeletionListener aDeleteWatch( this ); - - if( nModCode == (KEY_SHIFT | KEY_MOD1) && pEvent->type == XLIB_KeyPress ) - { - USHORT nSeqKeyCode = pDisplay_->GetKeyCode( nUnmodifiedKeySym, &aDummy ); - if( nSeqKeyCode == KEY_U ) - { - beginUnicodeSequence(); - return 1; - } - else if( nSeqKeyCode >= KEY_0 && nSeqKeyCode <= KEY_9 ) - { - if( appendUnicodeSequence( sal_Unicode( '0' ) + sal_Unicode(nSeqKeyCode - KEY_0) ) ) - return 1; - } - else if( nSeqKeyCode >= KEY_A && nSeqKeyCode <= KEY_F ) - { - if( appendUnicodeSequence( sal_Unicode( 'a' ) + sal_Unicode(nSeqKeyCode - KEY_A) ) ) - return 1; - } - else - endUnicodeSequence(); - } - - if( aDeleteWatch.isDeleted() ) - return 0; - - rtl_TextEncoding nEncoding; - - if (mpInputContext != NULL && mpInputContext->IsMultiLingual() ) - nEncoding = RTL_TEXTENCODING_UTF8; - else - nEncoding = osl_getThreadTextEncoding(); - - sal_Unicode *pBuffer; - sal_Unicode *pString; - sal_Size nBufferSize = nLen * 2; - sal_Size nSize; - pBuffer = (sal_Unicode*) malloc( nBufferSize + 2 ); - pBuffer[ 0 ] = 0; - - if (nKeyString != 0) - { - pString = &nKeyString; - nSize = 1; - } - else - if (nLen > 0 && nEncoding != RTL_TEXTENCODING_UNICODE) - { - // create text converter - rtl_TextToUnicodeConverter aConverter = - rtl_createTextToUnicodeConverter( nEncoding ); - rtl_TextToUnicodeContext aContext = - rtl_createTextToUnicodeContext( aConverter ); - - sal_uInt32 nConversionInfo; - sal_Size nConvertedChars; - - // convert to single byte text stream - nSize = rtl_convertTextToUnicode( - aConverter, aContext, - (char*)pPrintable, nLen, - pBuffer, nBufferSize, - RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_IGNORE | - RTL_TEXTTOUNICODE_FLAGS_INVALID_IGNORE, - &nConversionInfo, &nConvertedChars ); - - // destroy converter - rtl_destroyTextToUnicodeContext( aConverter, aContext ); - rtl_destroyTextToUnicodeConverter( aConverter ); - - pString = pBuffer; - } - else - if (nLen > 0 /* nEncoding == RTL_TEXTENCODING_UNICODE */) - { - pString = (sal_Unicode*)pPrintable; - nSize = nLen; - } - else - { - pString = pBuffer; - nSize = 0; - } - - if ( mpInputContext != NULL - && mpInputContext->UseContext() - && KeyRelease != pEvent->type - && ( (nSize > 1) - || (nSize > 0 && mpInputContext->IsPreeditMode())) ) - { - mpInputContext->CommitKeyEvent(pString, nSize); - } - else - // normal single character keyinput - { - aKeyEvt.mnCode = nKeyCode | nModCode; - aKeyEvt.mnRepeat = 0; - aKeyEvt.mnTime = pEvent->time; - aKeyEvt.mnCharCode = pString[ 0 ]; - - if( KeyRelease == pEvent->type ) - { - CallCallback( SALEVENT_KEYUP, &aKeyEvt ); - } - else - { - if ( ! CallCallback(SALEVENT_KEYINPUT, &aKeyEvt) ) - { - // independent layer doesnt want to handle key-event, so check - // whether the keycode may have an alternate meaning - KeyAlternate aAlternate = GetAlternateKeyCode( nKeyCode ); - if ( aAlternate.nKeyCode != 0 ) - { - aKeyEvt.mnCode = aAlternate.nKeyCode | nModCode; - if( aAlternate.nCharCode ) - aKeyEvt.mnCharCode = aAlternate.nCharCode; - CallCallback(SALEVENT_KEYINPUT, &aKeyEvt); - } - } - } - } - - // - // update the spot location for PreeditPosition IME style - // - if (! aDeleteWatch.isDeleted()) - { - if (mpInputContext != NULL && mpInputContext->UseContext()) - mpInputContext->UpdateSpotLocation(); - } - - free (pBuffer); - return True; -} - - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent ) -{ - // #107739# ReflectionX in Windows mode changes focus while mouse is grabbed - if( nVisibleFloats > 0 && GetDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii( "ReflectionX Windows" ) ) - return 1; - - /* #55691# ignore focusout resulting from keyboard grabs - * we do not grab it and are not interested when - * someone else does CDE e.g. does a XGrabKey on arrow keys - * #73179# handle focus events with mode NotifyWhileGrabbed - * because with CDE alt-tab focus changing we do not get - * normal focus events - * #71791# cast focus event to the input context, otherwise the - * status window does not follow the application frame - */ - - if ( mpInputContext != NULL ) - { - if( FocusIn == pEvent->type ) - mpInputContext->SetICFocus( this ); - else - { - /* - * do not unset the IC focuse here because would kill - * a lookup choice windows that might have the focus now - * mpInputContext->UnsetICFocus( this ); - */ - I18NStatus::get().show( false, I18NStatus::focus ); - } - } - - - if ( pEvent->mode == NotifyNormal || pEvent->mode == NotifyWhileGrabbed || - ( ( nStyle_ & SAL_FRAME_STYLE_PLUG ) && pEvent->window == GetShellWindow() ) - ) - { - if( hPresentationWindow != None && hPresentationWindow != GetShellWindow() ) - return 0; - - if( FocusIn == pEvent->type ) - { - vcl_sal::PrinterUpdate::update(); - mbInputFocus = True; - ImplSVData* pSVData = ImplGetSVData(); - - - - long nRet = CallCallback( SALEVENT_GETFOCUS, 0 ); - if ((mpParent != NULL && nStyle_ == 0) - && pSVData->maWinData.mpFirstFloat ) - { - ULONG nMode = pSVData->maWinData.mpFirstFloat->GetPopupModeFlags(); - pSVData->maWinData.mpFirstFloat->SetPopupModeFlags( - nMode & ~(FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE)); - } - return nRet; - } - else - { - mbInputFocus = False; - mbSendExtKeyModChange = mbKeyMenu = false; - mnExtKeyMod = 0; - return CallCallback( SALEVENT_LOSEFOCUS, 0 ); - } - } - - return 0; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -long X11SalFrame::HandleExposeEvent( XEvent *pEvent ) -{ - XRectangle aRect = { 0, 0, 0, 0 }; - USHORT nCount = 0; - - if( pEvent->type == Expose ) - { - aRect.x = pEvent->xexpose.x; - aRect.y = pEvent->xexpose.y; - aRect.width = pEvent->xexpose.width; - aRect.height = pEvent->xexpose.height; - nCount = pEvent->xexpose.count; - } - else if( pEvent->type == GraphicsExpose ) - { - aRect.x = pEvent->xgraphicsexpose.x; - aRect.y = pEvent->xgraphicsexpose.y; - aRect.width = pEvent->xgraphicsexpose.width; - aRect.height = pEvent->xgraphicsexpose.height; - nCount = pEvent->xgraphicsexpose.count; - } - - if( IsOverrideRedirect() && mbFullScreen && - aPresentationReparentList.begin() == aPresentationReparentList.end() ) - // we are in fullscreen mode -> override redirect - // focus is possibly lost, so reget it - XSetInputFocus( GetXDisplay(), GetShellWindow(), RevertToNone, CurrentTime ); - - // width and height are extents, so they are of by one for rectangle - maPaintRegion.Union( Rectangle( Point(aRect.x, aRect.y), Size(aRect.width+1, aRect.height+1) ) ); - - if( nCount ) - // wait for last expose rectangle, do not wait for resize timer - // if a completed graphics expose sequence is available - return 1; - - SalPaintEvent aPEvt( maPaintRegion.Left(), maPaintRegion.Top(), maPaintRegion.GetWidth(), maPaintRegion.GetHeight() ); - - CallCallback( SALEVENT_PAINT, &aPEvt ); - maPaintRegion = Rectangle(); - - return 1; -} - -void X11SalFrame::RestackChildren( XLIB_Window* pTopLevelWindows, int nTopLevelWindows ) -{ - if( maChildren.begin() != maChildren.end() ) - { - int nWindow = nTopLevelWindows; - while( nWindow-- ) - if( pTopLevelWindows[nWindow] == GetStackingWindow() ) - break; - if( nWindow < 0 ) - return; - - std::list< X11SalFrame* >::const_iterator it; - for( it = maChildren.begin(); it != maChildren.end(); ++it ) - { - X11SalFrame* pData = *it; - if( pData->bMapped_ ) - { - int nChild = nWindow; - while( nChild-- ) - { - if( pTopLevelWindows[nChild] == pData->GetStackingWindow() ) - { - // if a child is behind its parent, place it above the - // parent (for insane WMs like Dtwm and olwm) - XWindowChanges aCfg; - aCfg.sibling = GetStackingWindow(); - aCfg.stack_mode = Above; - XConfigureWindow( GetXDisplay(), pData->GetStackingWindow(), CWSibling|CWStackMode, &aCfg ); - break; - } - } - } - } - for( it = maChildren.begin(); it != maChildren.end(); ++it ) - { - X11SalFrame* pData = *it; - pData->RestackChildren( pTopLevelWindows, nTopLevelWindows ); - } - } -} - -void X11SalFrame::RestackChildren() -{ - if( ! GetDisplay()->getWMAdaptor()->isTransientBehaviourAsExpected() - && maChildren.begin() != maChildren.end() ) - { - XLIB_Window aRoot, aParent, *pChildren = NULL; - unsigned int nChildren; - if( XQueryTree( GetXDisplay(), - GetDisplay()->GetRootWindow( m_nScreen ), - &aRoot, - &aParent, - &pChildren, - &nChildren ) ) - { - RestackChildren( pChildren, nChildren ); - XFree( pChildren ); - } - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -long X11SalFrame::HandleSizeEvent( XConfigureEvent *pEvent ) -{ - if ( pEvent->window != GetShellWindow() - && pEvent->window != GetWindow() - && pEvent->window != GetForeignParent() - && pEvent->window != GetStackingWindow() - ) - { - // could be as well a sys-child window (aka SalObject) - return 1; - } - - - if( ( nStyle_ & SAL_FRAME_STYLE_PLUG ) && pEvent->window == GetShellWindow() ) - { - // just update the children's positions - RestackChildren(); - return 1; - } - - if( pEvent->window == GetForeignParent() ) - XResizeWindow( GetXDisplay(), - GetWindow(), - pEvent->width, - pEvent->height ); - - XLIB_Window hDummy; - XTranslateCoordinates( GetXDisplay(), - GetWindow(), - pDisplay_->GetRootWindow( pDisplay_->GetDefaultScreenNumber() ), - 0, 0, - &pEvent->x, &pEvent->y, - &hDummy ); - - if( pEvent->window == GetStackingWindow() ) - { - if( maGeometry.nX != pEvent->x || maGeometry.nY != pEvent->y ) - { - maGeometry.nX = pEvent->x; - maGeometry.nY = pEvent->y; - CallCallback( SALEVENT_MOVE, NULL ); - } - return 1; - } - - // check size hints in first time SalFrame::Show - if( SHOWSTATE_UNKNOWN == nShowState_ && bMapped_ ) - nShowState_ = SHOWSTATE_NORMAL; - - nWidth_ = pEvent->width; - nHeight_ = pEvent->height; - - bool bMoved = ( pEvent->x != maGeometry.nX || pEvent->y != maGeometry.nY ); - bool bSized = ( pEvent->width != (int)maGeometry.nWidth || pEvent->height != (int)maGeometry.nHeight ); - - maGeometry.nX = pEvent->x; - maGeometry.nY = pEvent->y; - maGeometry.nWidth = pEvent->width; - maGeometry.nHeight = pEvent->height; - updateScreenNumber(); - - // update children's position - RestackChildren(); - - if( bSized && ! bMoved ) - CallCallback( SALEVENT_RESIZE, NULL ); - else if( bMoved && ! bSized ) - CallCallback( SALEVENT_MOVE, NULL ); - else if( bMoved && bSized ) - CallCallback( SALEVENT_MOVERESIZE, NULL ); - - return 1; -} - -IMPL_LINK( X11SalFrame, HandleAlwaysOnTopRaise, void*, EMPTYARG ) -{ - if( bMapped_ ) - ToTop( 0 ); - return 0; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent ) -{ - Display *pDisplay = pEvent->display; - XLIB_Window hWM_Parent; - XLIB_Window hRoot, *Children, hDummy; - unsigned int nChildren; - BOOL bNone = pDisplay_->GetProperties() - & PROPERTY_SUPPORT_WM_Parent_Pixmap_None; - BOOL bAccessParentWindow = ! (pDisplay_->GetProperties() - & PROPERTY_FEATURE_TrustedSolaris); - - static const char* pDisableStackingCheck = getenv( "SAL_DISABLE_STACKING_CHECK" ); - - GetDisplay()->GetXLib()->PushXErrorLevel( true ); - - /* - * #89186# don't rely on the new parent from the event. - * the event may be "out of date", that is the window manager - * window may not exist anymore. This can happen if someone - * shows a frame and hides it again quickly (not that that would - * be very sensible) - */ - hWM_Parent = GetShellWindow(); - do - { - Children = NULL; - XQueryTree( pDisplay, - hWM_Parent, - &hRoot, - &hDummy, - &Children, - &nChildren ); - if( GetDisplay()->GetXLib()->HasXErrorOccured() ) - { - hWM_Parent = GetShellWindow(); - break; - } - /* #107048# this sometimes happens if a Show(TRUE) is - * immediately followed by Show(FALSE) (which is braindead anyway) - */ - if( hDummy == hWM_Parent ) - hDummy = hRoot; - if( hDummy != hRoot ) - { - hWM_Parent = hDummy; - if( bAccessParentWindow && bNone ) - XSetWindowBackgroundPixmap( pDisplay, hWM_Parent, None ); - } - if( Children ) - XFree( Children ); - } while( hDummy != hRoot ); - - if( GetStackingWindow() == None - && hWM_Parent != hPresentationWindow - && hWM_Parent != GetShellWindow() - && ( ! pDisableStackingCheck || ! *pDisableStackingCheck ) - ) - { - mhStackingWindow = hWM_Parent; - if (bAccessParentWindow) - XSelectInput( pDisplay, GetStackingWindow(), StructureNotifyMask ); - } - - if( hWM_Parent == pDisplay_->GetRootWindow( pDisplay_->GetDefaultScreenNumber() ) - || hWM_Parent == GetForeignParent() - || pEvent->parent == pDisplay_->GetRootWindow( pDisplay_->GetDefaultScreenNumber() ) - || ( nStyle_ & SAL_FRAME_STYLE_FLOAT ) ) - { - // Reparenting before Destroy - aPresentationReparentList.remove( GetStackingWindow() ); - mhStackingWindow = None; - GetDisplay()->GetXLib()->PopXErrorLevel(); - return 0; - } - - /* - * evil hack to show decorated windows on top - * of override redirect presentation windows: - * reparent the window manager window to the presentation window - * does not work with non-reparenting WMs - * in future this should not be necessary anymore with - * _NET_WM_STATE_FULLSCREEN available - */ - if( hPresentationWindow != None - && hPresentationWindow != GetWindow() - && GetStackingWindow() != None - && GetStackingWindow() != GetDisplay()->GetRootWindow( m_nScreen ) - ) - { - int x = 0, y = 0; - XLIB_Window aChild; - XTranslateCoordinates( GetXDisplay(), - GetStackingWindow(), - GetDisplay()->GetRootWindow( m_nScreen ), - 0, 0, - &x, &y, - &aChild - ); - XReparentWindow( GetXDisplay(), - GetStackingWindow(), - hPresentationWindow, - x, y - ); - aPresentationReparentList.push_back( GetStackingWindow() ); - } - - int nLeft = 0, nTop = 0; - XTranslateCoordinates( GetXDisplay(), - GetShellWindow(), - hWM_Parent, - 0, 0, - &nLeft, - &nTop, - &hDummy ); - maGeometry.nLeftDecoration = nLeft > 0 ? nLeft-1 : 0; - maGeometry.nTopDecoration = nTop > 0 ? nTop-1 : 0; - - /* - * decorations are not symmetric, - * so need real geometries here - * (this will fail with virtual roots ?) - */ - GetDisplay()->GetXLib()->ResetXErrorOccured(); - int xp, yp, x, y; - unsigned int wp, w, hp, h, bw, d; - XGetGeometry( GetXDisplay(), - GetShellWindow(), - &hRoot, - &x, &y, &w, &h, &bw, &d ); - XGetGeometry( GetXDisplay(), - hWM_Parent, - &hRoot, - &xp, &yp, &wp, &hp, &bw, &d ); - bool bResized = false; - if( ! GetDisplay()->GetXLib()->HasXErrorOccured() ) - { - maGeometry.nRightDecoration = wp - w - maGeometry.nLeftDecoration; - maGeometry.nBottomDecoration = hp - h - maGeometry.nTopDecoration; - /* - * note: this works because hWM_Parent is direct child of root, - * not necessarily parent of GetShellWindow() - */ - maGeometry.nX = xp + nLeft; - maGeometry.nY = yp + nTop; - bResized = w != maGeometry.nWidth || h != maGeometry.nHeight; - maGeometry.nWidth = w; - maGeometry.nHeight = h; - } - - - // limit width and height if we are too large: #47757 - // olwm and fvwm need this, it doesnt harm the rest - - // #i81311# do this only for sizable frames - if( (nStyle_ & SAL_FRAME_STYLE_SIZEABLE) != 0 ) - { - Size aScreenSize = GetDisplay()->GetScreenSize( m_nScreen ); - int nScreenWidth = aScreenSize.Width(); - int nScreenHeight = aScreenSize.Height(); - int nFrameWidth = maGeometry.nWidth + maGeometry.nLeftDecoration + maGeometry.nRightDecoration; - int nFrameHeight = maGeometry.nHeight + maGeometry.nTopDecoration + maGeometry.nBottomDecoration; - - if ((nFrameWidth > nScreenWidth) || (nFrameHeight > nScreenHeight)) - { - Size aSize(maGeometry.nWidth, maGeometry.nHeight); - - if (nFrameWidth > nScreenWidth) - aSize.Width() = nScreenWidth - maGeometry.nRightDecoration - maGeometry.nLeftDecoration; - if (nFrameHeight > nScreenHeight) - aSize.Height() = nScreenHeight - maGeometry.nBottomDecoration - maGeometry.nTopDecoration; - - SetSize( aSize ); - bResized = false; - } - } - if( bResized ) - CallCallback( SALEVENT_RESIZE, NULL ); - - GetDisplay()->GetXLib()->PopXErrorLevel(); - - return 1; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -long X11SalFrame::HandleColormapEvent( XColormapEvent* ) -{ - return 0; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -long X11SalFrame::HandleStateEvent( XPropertyEvent *pEvent ) -{ - Atom actual_type; - int actual_format; - unsigned long nitems, bytes_after; - unsigned char *prop = NULL; - - if( 0 != XGetWindowProperty( GetXDisplay(), - GetShellWindow(), - pEvent->atom, // property - 0, // long_offset (32bit) - 2, // long_length (32bit) - False, // delete - pEvent->atom, // req_type - &actual_type, - &actual_format, - &nitems, - &bytes_after, - &prop ) - || ! prop - ) - return 0; - - DBG_ASSERT( actual_type = pEvent->atom - && 32 == actual_format - && 2 == nitems - && 0 == bytes_after, "HandleStateEvent" ); - - if( *(unsigned long*)prop == NormalState ) - nShowState_ = SHOWSTATE_NORMAL; - else if( *(unsigned long*)prop == IconicState ) - nShowState_ = SHOWSTATE_MINIMIZED; - - XFree( prop ); - return 1; -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -long X11SalFrame::HandleClientMessage( XClientMessageEvent *pEvent ) -{ - const WMAdaptor& rWMAdaptor( *pDisplay_->getWMAdaptor() ); - -#if !defined(__synchronous_extinput__) - if( pEvent->message_type == rWMAdaptor.getAtom( WMAdaptor::SAL_EXTTEXTEVENT ) ) - { - HandleExtTextEvent (pEvent); - return 1; - } -#endif - else if( pEvent->message_type == rWMAdaptor.getAtom( WMAdaptor::SAL_QUITEVENT ) ) - { - stderr0( "X11SalFrame::Dispatch Quit\n" ); - Close(); // ??? - return 1; - } - else if( pEvent->message_type == rWMAdaptor.getAtom( WMAdaptor::WM_PROTOCOLS ) ) - { - if( (Atom)pEvent->data.l[0] == rWMAdaptor.getAtom( WMAdaptor::NET_WM_PING ) ) - rWMAdaptor.answerPing( this, pEvent ); - else if( ! ( nStyle_ & SAL_FRAME_STYLE_PLUG ) - && ! (( nStyle_ & SAL_FRAME_STYLE_FLOAT ) && (nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION)) - ) - { - if( (Atom)pEvent->data.l[0] == rWMAdaptor.getAtom( WMAdaptor::WM_DELETE_WINDOW ) ) - { - Close(); - return 1; - } - else if( (Atom)pEvent->data.l[0] == rWMAdaptor.getAtom( WMAdaptor::WM_TAKE_FOCUS ) ) - { - // do nothing, we set the input focus in ToTop() if necessary - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "got WM_TAKE_FOCUS on %s window\n", - (nStyle_&SAL_FRAME_STYLE_OWNERDRAWDECORATION) ? - "ownerdraw" : "NON OWNERDRAW" ); - #endif - } - else if( (Atom)pEvent->data.l[0] == rWMAdaptor.getAtom( WMAdaptor::WM_SAVE_YOURSELF ) ) - { - bool bSession = rWMAdaptor.getWindowManagerName().EqualsAscii( "Dtwm" ); - - if( ! bSession ) - { - if( this == s_pSaveYourselfFrame ) - { - ByteString aExec( SessionManagerClient::getExecName(), osl_getThreadTextEncoding() ); - const char* argv[2]; - argv[0] = "/bin/sh"; - argv[1] = const_cast(aExec.GetBuffer()); - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "SaveYourself request, setting command: %s %s\n", argv[0], argv[1] ); - #endif - XSetCommand( GetXDisplay(), GetShellWindow(), (char**)argv, 2 ); - } - else - // can only happen in race between WM and window closing - XChangeProperty( GetXDisplay(), GetShellWindow(), rWMAdaptor.getAtom( WMAdaptor::WM_COMMAND ), XA_STRING, 8, PropModeReplace, (unsigned char*)"", 0 ); - } - else - { - // save open documents; would be good for non Dtwm, too, - // but there is no real Shutdown message in the ancient - // SM protocol; on Dtwm SaveYourself really means Shutdown, too. - IceSalSession::handleOldX11SaveYourself( this ); - } - } - } - } - else if( pEvent->message_type == rWMAdaptor.getAtom( WMAdaptor::XEMBED ) && - pEvent->window == GetWindow() ) - { - if( pEvent->data.l[1] == 1 || // XEMBED_WINDOW_ACTIVATE - pEvent->data.l[1] == 2 ) // XEMBED_WINDOW_DEACTIVATE - { - XFocusChangeEvent aEvent; - aEvent.type = (pEvent->data.l[1] == 1 ? FocusIn : FocusOut); - aEvent.serial = pEvent->serial; - aEvent.send_event = True; - aEvent.display = pEvent->display; - aEvent.window = pEvent->window; - aEvent.mode = NotifyNormal; - aEvent.detail = NotifyDetailNone; - HandleFocusEvent( &aEvent ); - } - } - return 0; -} - -void X11SalFrame::SaveYourselfDone( SalFrame* pSaveFrame ) -{ - // session save was done, inform dtwm - if( s_pSaveYourselfFrame && pSaveFrame ) - { - ByteString aExec( SessionManagerClient::getExecName(), osl_getThreadTextEncoding() ); - const char* argv[2]; - argv[0] = "/bin/sh"; - argv[1] = const_cast(aExec.GetBuffer()); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "SaveYourself request, setting command: %s %s\n", argv[0], argv[1] ); -#endif - XSetCommand( s_pSaveYourselfFrame->GetXDisplay(), - s_pSaveYourselfFrame->GetShellWindow(), - (char**)argv, 2 ); - if( pSaveFrame != s_pSaveYourselfFrame ) - { - // check if it still exists - const X11SalFrame* pFrame = NULL; - const std::list< SalFrame* >& rFrames = static_cast(pSaveFrame)->GetDisplay()->getFrames(); - std::list< SalFrame* >::const_iterator it = rFrames.begin(); - while( it != rFrames.end() ) - { - pFrame = static_cast< const X11SalFrame* >(*it); - if( pFrame == pSaveFrame ) - break; - ++it; - } - if( pFrame == pSaveFrame ) - { - const WMAdaptor& rWMAdaptor( *pFrame->pDisplay_->getWMAdaptor() ); - XChangeProperty( pFrame->GetXDisplay(), - pFrame->GetShellWindow(), - rWMAdaptor.getAtom( WMAdaptor::WM_COMMAND ), XA_STRING, 8, PropModeReplace, (unsigned char*)"", 0 ); - } - } - s_pSaveYourselfFrame->ShutDown(); - } -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -extern "C" -{ -Bool call_checkKeyReleaseForRepeat( Display* pDisplay, XEvent* pCheck, XPointer pX11SalFrame ) -{ - return X11SalFrame::checkKeyReleaseForRepeat( pDisplay, pCheck, pX11SalFrame ); -} -} - -Bool X11SalFrame::checkKeyReleaseForRepeat( Display*, XEvent* pCheck, XPointer pX11SalFrame ) -{ - X11SalFrame* pThis = (X11SalFrame*)pX11SalFrame; - return - pCheck->type == XLIB_KeyPress && - pCheck->xkey.state == pThis->nKeyState_ && - pCheck->xkey.keycode == pThis->nKeyCode_ && - pCheck->xkey.time == pThis->nReleaseTime_ ? True : False; -} - -long X11SalFrame::Dispatch( XEvent *pEvent ) -{ - long nRet = 0; - - if( -1 == nCaptured_ ) - { - CaptureMouse( TRUE ); -#ifdef DBG_UTIL - if( -1 != nCaptured_ ) - pDisplay_->PrintEvent( "Captured", pEvent ); -#endif - } - - if( pEvent->xany.window == GetShellWindow() || pEvent->xany.window == GetWindow() ) - { - switch( pEvent->type ) - { - case XLIB_KeyPress: - nKeyCode_ = pEvent->xkey.keycode; - nKeyState_ = pEvent->xkey.state; - nRet = HandleKeyEvent( &pEvent->xkey ); - break; - - case KeyRelease: - if( -1 == nCompose_ ) - { - nReleaseTime_ = pEvent->xkey.time; - XEvent aEvent; - if( XCheckIfEvent( pEvent->xkey.display, &aEvent, call_checkKeyReleaseForRepeat, (XPointer)this ) ) - XPutBackEvent( pEvent->xkey.display, &aEvent ); - else - nRet = HandleKeyEvent( &pEvent->xkey ); - } - break; - - case ButtonPress: - // #74406# if we loose the focus in presentation mode - // there are good chances that we never get it back - // since the WM ignores us - if( IsOverrideRedirect() ) - { - XSetInputFocus( GetXDisplay(), GetShellWindow(), - RevertToNone, CurrentTime ); - } - - case ButtonRelease: - case MotionNotify: - case EnterNotify: - case LeaveNotify: - nRet = HandleMouseEvent( pEvent ); - break; - - case FocusIn: - case FocusOut: - nRet = HandleFocusEvent( &pEvent->xfocus ); - break; - - case Expose: - case GraphicsExpose: - nRet = HandleExposeEvent( pEvent ); - break; - - case MapNotify: - if( pEvent->xmap.window == GetShellWindow() ) - { - if( nShowState_ == SHOWSTATE_HIDDEN ) - { - /* - * #95097# workaround for (at least) KWin 2.2.2 - * which will map windows that were once transient - * even if they are withdrawn when the respective - * document is mapped. - */ - if( ! (nStyle_ & SAL_FRAME_STYLE_PLUG) ) - XUnmapWindow( GetXDisplay(), GetShellWindow() ); - break; - } - bMapped_ = TRUE; - bViewable_ = TRUE; - nRet = TRUE; - if ( mpInputContext != NULL ) - mpInputContext->Map( this ); - CallCallback( SALEVENT_RESIZE, NULL ); - if( pDisplay_->GetServerVendor() == vendor_hummingbird ) - { - /* - * With Exceed sometimes there does not seem to be - * an Expose after the MapNotify. - * so start a delayed paint here - */ - maPaintRegion.Union( Rectangle( Point( 0, 0 ), Size( maGeometry.nWidth, maGeometry.nHeight ) ) ); - XEvent aEvent; - aEvent.xexpose.type = Expose; - aEvent.xexpose.display = pDisplay_->GetDisplay(); - aEvent.xexpose.x = 0; - aEvent.xexpose.y = 0; - aEvent.xexpose.width = maGeometry.nWidth; - aEvent.xexpose.height = maGeometry.nHeight; - aEvent.xexpose.count = 0; - XSendEvent( pDisplay_->GetDisplay(), - GetWindow(), - True, - ExposureMask, - &aEvent ); - } - - bool bSetFocus = m_bSetFocusOnMap; - /* #99570# another workaround for sawfish: if a transient window for the same parent is shown - * sawfish does not set the focus to it. Applies only for click to focus mode. - */ - if( ! (nStyle_ & SAL_FRAME_STYLE_FLOAT ) && mbInShow && GetDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii( "Sawfish" ) ) - { - // #101775# don't set the focus into the IME status window - // since this will lead to a parent loose-focus, close status, - // reget focus, open status, .... flicker loop - if ( (I18NStatus::get().getStatusFrame() != this) ) - bSetFocus = true; - } - - /* - * sometimes a message box/dialogue is brought up when a frame is not mapped - * the corresponding TRANSIENT_FOR hint is then set to the root window - * so that the dialogue shows in all cases. Correct it here if the - * frame is shown afterwards. - */ - if( ! IsChildWindow() - && ! IsOverrideRedirect() - && ! IsFloatGrabWindow() - ) - { - for( std::list< X11SalFrame* >::const_iterator it = maChildren.begin(); - it != maChildren.end(); ++it ) - { - if( (*it)->mbTransientForRoot ) - pDisplay_->getWMAdaptor()->changeReferenceFrame( *it, this ); - } - } - - if( hPresentationWindow != None && GetShellWindow() == hPresentationWindow ) - XSetInputFocus( GetXDisplay(), GetShellWindow(), RevertToParent, CurrentTime ); - /* For unknown reasons Dtwm does respect the input_hint - * set to False, but not when mapping the window. So - * emulate the correct behaviour and set the focus back - * to where it most probably should have been. - */ - if( (nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION) && - mpParent && - GetDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii( "Dtwm" ) - ) - { - XSetInputFocus( GetXDisplay(), - mpParent->GetShellWindow(), - RevertToParent, - CurrentTime ); - bSetFocus = false; - } - - if( bSetFocus ) - { - XSetInputFocus( GetXDisplay(), - GetShellWindow(), - RevertToParent, - CurrentTime ); - } - - - RestackChildren(); - mbInShow = FALSE; - m_bSetFocusOnMap = false; - } - break; - - case UnmapNotify: - if( pEvent->xunmap.window == GetShellWindow() ) - { - bMapped_ = FALSE; - bViewable_ = FALSE; - nRet = TRUE; - if ( mpInputContext != NULL ) - mpInputContext->Unmap( this ); - CallCallback( SALEVENT_RESIZE, NULL ); - } - break; - - case ConfigureNotify: - if( pEvent->xconfigure.window == GetShellWindow() - || pEvent->xconfigure.window == GetWindow() ) - nRet = HandleSizeEvent( &pEvent->xconfigure ); - break; - - case VisibilityNotify: - nVisibility_ = pEvent->xvisibility.state; - nRet = TRUE; - if( bAlwaysOnTop_ - && bMapped_ - && ! GetDisplay()->getWMAdaptor()->isAlwaysOnTopOK() - && nVisibility_ != VisibilityUnobscured ) - maAlwaysOnTopRaiseTimer.Start(); - break; - - case ReparentNotify: - nRet = HandleReparentEvent( &pEvent->xreparent ); - break; - - case MappingNotify: - if( MappingPointer != pEvent->xmapping.request ) - nRet = CallCallback( SALEVENT_KEYBOARDCHANGED, 0 ); - break; - - case ColormapNotify: - nRet = HandleColormapEvent( &pEvent->xcolormap ); - break; - - case PropertyNotify: - { - if( pEvent->xproperty.atom == pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::WM_STATE ) ) - nRet = HandleStateEvent( &pEvent->xproperty ); - else - nRet = pDisplay_->getWMAdaptor()->handlePropertyNotify( this, &pEvent->xproperty ); - break; - } - - case ClientMessage: - nRet = HandleClientMessage( &pEvent->xclient ); - break; - } - } - else - { - switch( pEvent->type ) - { - case FocusIn: - case FocusOut: - if( ( nStyle_ & SAL_FRAME_STYLE_PLUG ) - && ( pEvent->xfocus.window == GetShellWindow() - || pEvent->xfocus.window == GetForeignParent() ) - ) - { - nRet = HandleFocusEvent( &pEvent->xfocus ); - } - break; - - case ConfigureNotify: - if( pEvent->xconfigure.window == GetForeignParent() || - pEvent->xconfigure.window == GetShellWindow() ) - nRet = HandleSizeEvent( &pEvent->xconfigure ); - - if( pEvent->xconfigure.window == GetStackingWindow() ) - nRet = HandleSizeEvent( &pEvent->xconfigure ); - - RestackChildren(); - break; - } - } - - return nRet; -} - -void X11SalFrame::ResetClipRegion() -{ - delete [] m_pClipRectangles; - m_pClipRectangles = NULL; - m_nCurClipRect = m_nMaxClipRect = 0; - - const int dest_kind = ShapeBounding; - const int op = ShapeSet; - const int ordering = YSorted; - - XWindowAttributes win_attrib; - XRectangle win_size; - - XLIB_Window aShapeWindow = mhShellWindow; - - XGetWindowAttributes ( GetDisplay()->GetDisplay(), - aShapeWindow, - &win_attrib ); - - win_size.x = 0; - win_size.y = 0; - win_size.width = win_attrib.width; - win_size.height = win_attrib.height; - - XShapeCombineRectangles ( GetDisplay()->GetDisplay(), - aShapeWindow, - dest_kind, - 0, 0, // x_off, y_off - &win_size, // list of rectangles - 1, // number of rectangles - op, ordering ); -} - -void X11SalFrame::BeginSetClipRegion( ULONG nRects ) -{ - if( m_pClipRectangles ) - delete [] m_pClipRectangles; - if( nRects ) - m_pClipRectangles = new XRectangle[nRects]; - else - m_pClipRectangles = NULL; - m_nMaxClipRect = static_cast(nRects); - m_nCurClipRect = 0; -} - -void X11SalFrame::UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) -{ - if( m_pClipRectangles && m_nCurClipRect < m_nMaxClipRect ) - { - m_pClipRectangles[m_nCurClipRect].x = nX; - m_pClipRectangles[m_nCurClipRect].y = nY; - m_pClipRectangles[m_nCurClipRect].width = nWidth; - m_pClipRectangles[m_nCurClipRect].height = nHeight; - m_nCurClipRect++; - } -} - -void X11SalFrame::EndSetClipRegion() -{ - const int dest_kind = ShapeBounding; - const int ordering = YSorted; - const int op = ShapeSet; - - XLIB_Window aShapeWindow = mhShellWindow; - XShapeCombineRectangles ( GetDisplay()->GetDisplay(), - aShapeWindow, - dest_kind, - 0, 0, // x_off, y_off - m_pClipRectangles, - m_nCurClipRect, - op, ordering ); - -} - diff --git a/vcl/unx/source/window/salobj.cxx b/vcl/unx/source/window/salobj.cxx deleted file mode 100644 index 2ff6d05c35c6..000000000000 --- a/vcl/unx/source/window/salobj.cxx +++ /dev/null @@ -1,568 +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_vcl.hxx" - -#include -#include -#include -#include - -#include -#include -#include -#ifndef _SV_SALINST_HXX -#include -#endif -#include -#ifndef _SV_SALFRAME_HXX -#include -#endif -#include -#include -#include - -#include -#if OSL_DEBUG_LEVEL > 1 -#include -#endif - -// ======================================================================= -// SalInstance member to create and destroy a SalObject - -SalObject* X11SalInstance::CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow ) -{ - return X11SalObject::CreateObject( pParent, pWindowData, bShow ); -} - -X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow ) -{ - int error_base, event_base; - X11SalObject* pObject = new X11SalObject(); - SystemChildData* pObjData = const_cast(pObject->GetSystemData()); - - if ( ! XShapeQueryExtension( (Display*)pObjData->pDisplay, - &event_base, &error_base ) ) - { - delete pObject; - return NULL; - } - - pObject->mpParent = pParent; - - SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); - const SystemEnvData* pEnv = pParent->GetSystemData(); - Display* pDisp = pSalDisp->GetDisplay(); - XLIB_Window aObjectParent = (XLIB_Window)pEnv->aWindow; - - // find out on which screen that window is - XWindowAttributes aParentAttr; - XGetWindowAttributes( pDisp, aObjectParent, &aParentAttr ); - int nScreen = XScreenNumberOfScreen( aParentAttr.screen ); - Visual* pVisual = (pWindowData && pWindowData->pVisual) ? - (Visual*)pWindowData->pVisual : - pSalDisp->GetVisual( nScreen ).GetVisual(); - // get visual info - VisualID aVisID = XVisualIDFromVisual( pVisual ); - XVisualInfo aTemplate; - aTemplate.visualid = aVisID; - int nVisuals = 0; - XVisualInfo* pInfos = XGetVisualInfo( pDisp, VisualIDMask, &aTemplate, &nVisuals ); - // only one VisualInfo structure can match the visual id - DBG_ASSERT( nVisuals == 1, "match count for visual id is not 1" ); - unsigned int nDepth = pInfos->depth; - XFree( pInfos ); - XSetWindowAttributes aAttribs; - aAttribs.event_mask = StructureNotifyMask - | ButtonPressMask - | ButtonReleaseMask - | PointerMotionMask - | EnterWindowMask - | LeaveWindowMask - | FocusChangeMask - | ExposureMask - ; - - pObject->maPrimary = - XCreateSimpleWindow( pDisp, - aObjectParent, - 0, 0, - 1, 1, 0, - pSalDisp->GetColormap( nScreen ).GetBlackPixel(), - pSalDisp->GetColormap( nScreen ).GetWhitePixel() - ); - if( aVisID == pSalDisp->GetVisual( nScreen ).GetVisualId() ) - { - pObject->maSecondary = - XCreateSimpleWindow( pDisp, - pObject->maPrimary, - 0, 0, - 1, 1, 0, - pSalDisp->GetColormap( nScreen ).GetBlackPixel(), - pSalDisp->GetColormap( nScreen ).GetWhitePixel() - ); - } - else - { - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "visual id of vcl %x, of visual %x\n", - static_cast (pSalDisp->GetVisual( nScreen ).GetVisualId()), - static_cast (aVisID) ); - #endif - pSalDisp->GetXLib()->PushXErrorLevel( true ); - - // create colormap for visual - there might not be one - pObject->maColormap = aAttribs.colormap = XCreateColormap( - pDisp, - pSalDisp->GetRootWindow( nScreen ), - pVisual, - AllocNone ); - - pObject->maSecondary = - XCreateWindow( pDisp, - pSalDisp->GetRootWindow( nScreen ), - 0, 0, - 1, 1, 0, - nDepth, InputOutput, - pVisual, - CWEventMask|CWColormap, &aAttribs ); - XSync( pDisp, False ); - BOOL bWasXError = pSalDisp->GetXLib()->HasXErrorOccured(); - pSalDisp->GetXLib()->PopXErrorLevel(); - if( bWasXError ) - { - pObject->maSecondary = None; - delete pObject; - return NULL; - } - XReparentWindow( pDisp, pObject->maSecondary, pObject->maPrimary, 0, 0 ); - } - - pSalDisp->GetXLib()->PushXErrorLevel( true ); - if( bShow ) { - XMapWindow( pDisp, pObject->maSecondary ); - XMapWindow( pDisp, pObject->maPrimary ); - } - - pObjData->pDisplay = pDisp; - pObjData->aWindow = pObject->maSecondary; - pObjData->pWidget = NULL; - pObjData->pVisual = pVisual; - pObjData->nDepth = nDepth; - pObjData->aColormap = aVisID == pSalDisp->GetVisual( nScreen ).GetVisualId() ? - pSalDisp->GetColormap( nScreen ).GetXColormap() : None; - pObjData->pAppContext = NULL; - - XSync(pDisp, False); - BOOL bWasXError = pSalDisp->GetXLib()->HasXErrorOccured(); - pSalDisp->GetXLib()->PopXErrorLevel(); - if( bWasXError ) - { - delete pObject; - return NULL; - } - - return pObject; -} - - -void X11SalInstance::DestroyObject( SalObject* pObject ) -{ - delete pObject; -} - - -// ====================================================================== -// SalClipRegion is a member of SalObject -// definition of SalClipRegion my be found in unx/inc/salobj.h - - -SalClipRegion::SalClipRegion() -{ - ClipRectangleList = NULL; - numClipRectangles = 0; - maxClipRectangles = 0; - nClipRegionType = SAL_OBJECT_CLIP_INCLUDERECTS; -} - - -SalClipRegion::~SalClipRegion() -{ - if ( ClipRectangleList ) - delete [] ClipRectangleList; -} - - -void -SalClipRegion::BeginSetClipRegion( ULONG nRects ) -{ - if (ClipRectangleList) - delete [] ClipRectangleList; - - ClipRectangleList = new XRectangle[nRects]; - numClipRectangles = 0; - maxClipRectangles = nRects; -} - - -void -SalClipRegion::UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) -{ - if ( nWidth && nHeight && (numClipRectangles < maxClipRectangles) ) - { - XRectangle *aRect = ClipRectangleList + numClipRectangles; - - aRect->x = (short) nX; - aRect->y = (short) nY; - aRect->width = (unsigned short) nWidth; - aRect->height= (unsigned short) nHeight; - - numClipRectangles++; - } -} - - -// ======================================================================= -// SalObject Implementation - - -X11SalObject::X11SalObject() -{ - maSystemChildData.nSize = sizeof( SystemChildData ); - maSystemChildData.pDisplay = GetX11SalData()->GetDisplay()->GetDisplay(); - maSystemChildData.aWindow = None; - maSystemChildData.pSalFrame = 0; - maSystemChildData.pWidget = 0; - maSystemChildData.pVisual = 0; - maSystemChildData.nDepth = 0; - maSystemChildData.aColormap = 0; - maSystemChildData.pAppContext = NULL; - maSystemChildData.aShellWindow = 0; - maSystemChildData.pShellWidget = NULL; - maPrimary = 0; - maSecondary = 0; - maColormap = 0; - - std::list< SalObject* >& rObjects = GetX11SalData()->GetDisplay()->getSalObjects(); - rObjects.push_back( this ); -} - - -X11SalObject::~X11SalObject() -{ - std::list< SalObject* >& rObjects = GetX11SalData()->GetDisplay()->getSalObjects(); - rObjects.remove( this ); - SalDisplay* pSalDisp = GetX11SalData()->GetDisplay(); - pSalDisp->GetXLib()->PushXErrorLevel( true ); - if ( maSecondary ) - XDestroyWindow( (Display*)maSystemChildData.pDisplay, maSecondary ); - if ( maPrimary ) - XDestroyWindow( (Display*)maSystemChildData.pDisplay, maPrimary ); - if ( maColormap ) - XFreeColormap((Display*)maSystemChildData.pDisplay, maColormap); - XSync( (Display*)maSystemChildData.pDisplay, False ); - pSalDisp->GetXLib()->PopXErrorLevel(); -} - - -void -X11SalObject::ResetClipRegion() -{ - maClipRegion.ResetClipRegion(); - - const int dest_kind = ShapeBounding; - const int op = ShapeSet; - const int ordering = YSorted; - - XWindowAttributes win_attrib; - XRectangle win_size; - - XLIB_Window aShapeWindow = maPrimary; - - XGetWindowAttributes ( (Display*)maSystemChildData.pDisplay, - aShapeWindow, - &win_attrib ); - - win_size.x = 0; - win_size.y = 0; - win_size.width = win_attrib.width; - win_size.height = win_attrib.height; - - XShapeCombineRectangles ( (Display*)maSystemChildData.pDisplay, - aShapeWindow, - dest_kind, - 0, 0, // x_off, y_off - &win_size, // list of rectangles - 1, // number of rectangles - op, ordering ); -} - - -void -X11SalObject::BeginSetClipRegion( ULONG nRectCount ) -{ - maClipRegion.BeginSetClipRegion ( nRectCount ); -} - - -void -X11SalObject::UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) -{ - maClipRegion.UnionClipRegion ( nX, nY, nWidth, nHeight ); -} - - -void -X11SalObject::EndSetClipRegion() -{ - XRectangle *pRectangles = maClipRegion.EndSetClipRegion (); - const int nType = maClipRegion.GetClipRegionType(); - const int nRectangles = maClipRegion.GetRectangleCount(); - - const int dest_kind = ShapeBounding; - const int ordering = YSorted; - int op; - - switch ( nType ) - { - case SAL_OBJECT_CLIP_INCLUDERECTS : - op = ShapeSet; - break; - case SAL_OBJECT_CLIP_EXCLUDERECTS : - op = ShapeSubtract; - break; - case SAL_OBJECT_CLIP_ABSOLUTE : - op = ShapeSet; - break; - default : - op = ShapeUnion; - } - - XLIB_Window aShapeWindow = maPrimary; - - XShapeCombineRectangles ( (Display*)maSystemChildData.pDisplay, - aShapeWindow, - dest_kind, - 0, 0, // x_off, y_off - pRectangles, - nRectangles, - op, ordering ); -} - - -USHORT -X11SalObject::GetClipRegionType() -{ - return maClipRegion.GetClipRegionType(); -} - -// ----------------------------------------------------------------------- - -void -X11SalObject::SetPosSize( long nX, long nY, long nWidth, long nHeight ) -{ - if ( maPrimary && maSecondary && nWidth && nHeight ) - { - XMoveResizeWindow( (Display*)maSystemChildData.pDisplay, - maPrimary, - nX, nY, nWidth, nHeight ); - XMoveResizeWindow( (Display*)maSystemChildData.pDisplay, - maSecondary, - 0, 0, nWidth, nHeight ); - } -} - - -void -X11SalObject::Show( BOOL bVisible ) -{ - if ( ! maSystemChildData.aWindow ) - return; - - if ( bVisible ) { - XMapWindow( (Display*)maSystemChildData.pDisplay, - maSecondary ); - XMapWindow( (Display*)maSystemChildData.pDisplay, - maPrimary ); - } else { - XUnmapWindow( (Display*)maSystemChildData.pDisplay, - maPrimary ); - XUnmapWindow( (Display*)maSystemChildData.pDisplay, - maSecondary ); - } - mbVisible = bVisible; -} - -// ----------------------------------------------------------------------- - -void X11SalObject::Enable( BOOL ) -{ -} - -// ----------------------------------------------------------------------- - -void X11SalObject::GrabFocus() -{ - if( mbVisible ) - XSetInputFocus( (Display*)maSystemChildData.pDisplay, - maSystemChildData.aWindow, - RevertToNone, - CurrentTime ); -} - -// ----------------------------------------------------------------------- - -void X11SalObject::SetBackground() -{ -} - -// ----------------------------------------------------------------------- - -void X11SalObject::SetBackground( SalColor ) -{ -} - -// ----------------------------------------------------------------------- - -const SystemChildData* X11SalObject::GetSystemData() const -{ - return &maSystemChildData; -} - -static USHORT sal_GetCode( int state ) -{ - USHORT nCode = 0; - - if( state & Button1Mask ) - nCode |= MOUSE_LEFT; - if( state & Button2Mask ) - nCode |= MOUSE_MIDDLE; - if( state & Button3Mask ) - nCode |= MOUSE_RIGHT; - - if( state & ShiftMask ) - nCode |= KEY_SHIFT; - if( state & ControlMask ) - nCode |= KEY_MOD1; - if( state & Mod1Mask ) - nCode |= KEY_MOD2; - if( state & Mod3Mask ) - nCode |= KEY_MOD3; - - return nCode; -} - -long X11SalObject::Dispatch( XEvent* pEvent ) -{ - std::list< SalObject* >& rObjects = GetX11SalData()->GetDisplay()->getSalObjects(); - - for( std::list< SalObject* >::iterator it = rObjects.begin(); it != rObjects.end(); ++it ) - { - X11SalObject* pObject = static_cast(*it); - if( pEvent->xany.window == pObject->maPrimary || - pEvent->xany.window == pObject->maSecondary ) - { - if( pObject->IsMouseTransparent() && ( - pEvent->type == ButtonPress || - pEvent->type == ButtonRelease || - pEvent->type == EnterNotify || - pEvent->type == LeaveNotify || - pEvent->type == MotionNotify - ) - ) - { - SalMouseEvent aEvt; - const SystemEnvData* pParentData = pObject->mpParent->GetSystemData(); - int dest_x, dest_y; - XLIB_Window aChild = None; - XTranslateCoordinates( pEvent->xbutton.display, - pEvent->xbutton.root, - pParentData->aWindow, - pEvent->xbutton.x_root, - pEvent->xbutton.y_root, - &dest_x, &dest_y, - &aChild ); - aEvt.mnX = dest_x; - aEvt.mnY = dest_y; - aEvt.mnTime = pEvent->xbutton.time; - aEvt.mnCode = sal_GetCode( pEvent->xbutton.state ); - aEvt.mnButton = 0; - USHORT nEvent = 0; - if( pEvent->type == ButtonPress || - pEvent->type == ButtonRelease ) - { - switch( pEvent->xbutton.button ) - { - case Button1: aEvt.mnButton = MOUSE_LEFT;break; - case Button2: aEvt.mnButton = MOUSE_MIDDLE;break; - case Button3: aEvt.mnButton = MOUSE_RIGHT;break; - } - nEvent = (pEvent->type == ButtonPress) ? - SALEVENT_MOUSEBUTTONDOWN : - SALEVENT_MOUSEBUTTONUP; - } - else if( pEvent->type == EnterNotify ) - nEvent = SALEVENT_MOUSELEAVE; - else - nEvent = SALEVENT_MOUSEMOVE; - pObject->mpParent->CallCallback( nEvent, &aEvt ); - } - else - { - switch( pEvent->type ) - { - case UnmapNotify: - pObject->mbVisible = FALSE; - return 1; - case MapNotify: - pObject->mbVisible = TRUE; - return 1; - case ButtonPress: - pObject->CallCallback( SALOBJ_EVENT_TOTOP, NULL ); - return 1; - case FocusIn: - pObject->CallCallback( SALOBJ_EVENT_GETFOCUS, NULL ); - return 1; - case FocusOut: - pObject->CallCallback( SALOBJ_EVENT_LOSEFOCUS, NULL ); - return 1; - default: break; - } - } - return 0; - } - } - return 0; -} - -// ----------------------------------------------------------------------- - -void X11SalObject::InterceptChildWindowKeyDown( sal_Bool /*bIntercept*/ ) -{ -} - diff --git a/vcl/util/makefile.mk b/vcl/util/makefile.mk index 8d1de2ed30f0..bff6998fbb3b 100644 --- a/vcl/util/makefile.mk +++ b/vcl/util/makefile.mk @@ -97,7 +97,6 @@ HXXDEPNLST= $(INC)$/vcl$/accel.hxx \ $(INC)$/vcl$/ptrstyle.hxx \ $(INC)$/vcl$/prntypes.hxx \ $(INC)$/vcl$/print.hxx \ - $(INC)$/vcl$/prndlg.hxx \ $(INC)$/vcl$/region.hxx \ $(INC)$/vcl$/salbtype.hxx \ $(INC)$/vcl$/scrbar.hxx \ -- cgit v1.2.3 From 19ba1faf12419233e8a772ba8609703cbce1c6e7 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 24 Jan 2011 20:21:12 +0100 Subject: vcl2gnumake: #i116589# header cleanup: windows --- vcl/inc/win/salbmp.h | 87 ++++++ vcl/inc/win/saldata.hxx | 379 +++++++++++++++++++++++++ vcl/inc/win/salframe.h | 149 ++++++++++ vcl/inc/win/salgdi.h | 405 ++++++++++++++++++++++++++ vcl/inc/win/salids.hrc | 120 ++++++++ vcl/inc/win/salinst.h | 104 +++++++ vcl/inc/win/salmenu.h | 76 +++++ vcl/inc/win/salnativewidgets.h | 52 ++++ vcl/inc/win/salobj.h | 70 +++++ vcl/inc/win/salprn.h | 129 +++++++++ vcl/inc/win/salsys.h | 92 ++++++ vcl/inc/win/saltimer.h | 44 +++ vcl/inc/win/salvd.h | 60 ++++ vcl/inc/win/svsys.h | 33 +++ vcl/inc/win/wincomp.hxx | 263 +++++++++++++++++ vcl/source/app/dbggui.cxx | 12 +- vcl/source/gdi/outdev.cxx | 2 + vcl/source/gdi/outdev3.cxx | 2 + vcl/source/window/syschild.cxx | 3 + vcl/source/window/toolbox.cxx | 3 + vcl/source/window/window.cxx | 7 +- vcl/source/window/wrkwin.cxx | 2 + vcl/win/inc/salbmp.h | 88 ------ vcl/win/inc/saldata.hxx | 379 ------------------------- vcl/win/inc/salframe.h | 150 ---------- vcl/win/inc/salgdi.h | 406 --------------------------- vcl/win/inc/salids.hrc | 120 -------- vcl/win/inc/salinst.h | 105 ------- vcl/win/inc/salmenu.h | 78 ----- vcl/win/inc/salnativewidgets.h | 54 ---- vcl/win/inc/salobj.h | 71 ----- vcl/win/inc/salprn.h | 130 --------- vcl/win/inc/salsys.h | 92 ------ vcl/win/inc/saltimer.h | 44 --- vcl/win/inc/salvd.h | 61 ---- vcl/win/inc/svsys.h | 33 --- vcl/win/inc/wincomp.hxx | 264 ----------------- vcl/win/source/app/saldata.cxx | 7 +- vcl/win/source/app/salinfo.cxx | 17 +- vcl/win/source/app/salinst.cxx | 31 +- vcl/win/source/app/salshl.cxx | 5 +- vcl/win/source/app/saltimer.cxx | 6 +- vcl/win/source/gdi/salbmp.cxx | 14 +- vcl/win/source/gdi/salgdi.cxx | 15 +- vcl/win/source/gdi/salgdi2.cxx | 16 +- vcl/win/source/gdi/salgdi3.cxx | 46 +-- vcl/win/source/gdi/salgdi_gdiplus.cxx | 8 +- vcl/win/source/gdi/salnativewidgets-luna.cxx | 12 +- vcl/win/source/gdi/salprn.cxx | 28 +- vcl/win/source/gdi/salvd.cxx | 13 +- vcl/win/source/gdi/winlayout.cxx | 26 +- vcl/win/source/src/salsrc.rc | 2 +- vcl/win/source/window/salframe.cxx | 51 ++-- vcl/win/source/window/salmenu.cxx | 18 +- vcl/win/source/window/salobj.cxx | 16 +- 55 files changed, 2261 insertions(+), 2239 deletions(-) create mode 100755 vcl/inc/win/salbmp.h create mode 100755 vcl/inc/win/saldata.hxx create mode 100755 vcl/inc/win/salframe.h create mode 100755 vcl/inc/win/salgdi.h create mode 100644 vcl/inc/win/salids.hrc create mode 100755 vcl/inc/win/salinst.h create mode 100755 vcl/inc/win/salmenu.h create mode 100755 vcl/inc/win/salnativewidgets.h create mode 100755 vcl/inc/win/salobj.h create mode 100755 vcl/inc/win/salprn.h create mode 100755 vcl/inc/win/salsys.h create mode 100755 vcl/inc/win/saltimer.h create mode 100755 vcl/inc/win/salvd.h create mode 100644 vcl/inc/win/svsys.h create mode 100755 vcl/inc/win/wincomp.hxx mode change 100644 => 100755 vcl/source/app/dbggui.cxx mode change 100644 => 100755 vcl/source/gdi/outdev.cxx mode change 100644 => 100755 vcl/source/gdi/outdev3.cxx mode change 100644 => 100755 vcl/source/window/syschild.cxx mode change 100644 => 100755 vcl/source/window/toolbox.cxx mode change 100644 => 100755 vcl/source/window/window.cxx mode change 100644 => 100755 vcl/source/window/wrkwin.cxx delete mode 100644 vcl/win/inc/salbmp.h delete mode 100755 vcl/win/inc/saldata.hxx delete mode 100644 vcl/win/inc/salframe.h delete mode 100755 vcl/win/inc/salgdi.h delete mode 100644 vcl/win/inc/salids.hrc delete mode 100755 vcl/win/inc/salinst.h delete mode 100644 vcl/win/inc/salmenu.h delete mode 100644 vcl/win/inc/salnativewidgets.h delete mode 100644 vcl/win/inc/salobj.h delete mode 100644 vcl/win/inc/salprn.h delete mode 100644 vcl/win/inc/salsys.h delete mode 100644 vcl/win/inc/saltimer.h delete mode 100644 vcl/win/inc/salvd.h delete mode 100644 vcl/win/inc/svsys.h delete mode 100644 vcl/win/inc/wincomp.hxx mode change 100644 => 100755 vcl/win/source/app/saldata.cxx mode change 100644 => 100755 vcl/win/source/app/salinfo.cxx mode change 100644 => 100755 vcl/win/source/app/salshl.cxx mode change 100644 => 100755 vcl/win/source/app/saltimer.cxx mode change 100644 => 100755 vcl/win/source/gdi/salbmp.cxx mode change 100644 => 100755 vcl/win/source/gdi/salgdi.cxx mode change 100644 => 100755 vcl/win/source/gdi/salgdi2.cxx mode change 100644 => 100755 vcl/win/source/gdi/salgdi_gdiplus.cxx mode change 100644 => 100755 vcl/win/source/gdi/salprn.cxx mode change 100644 => 100755 vcl/win/source/gdi/salvd.cxx mode change 100644 => 100755 vcl/win/source/src/salsrc.rc mode change 100644 => 100755 vcl/win/source/window/salobj.cxx diff --git a/vcl/inc/win/salbmp.h b/vcl/inc/win/salbmp.h new file mode 100755 index 000000000000..44f3af42c137 --- /dev/null +++ b/vcl/inc/win/salbmp.h @@ -0,0 +1,87 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SV_SALBMP_H +#define _SV_SALBMP_H + +#include +#include +#include + +// -------------- +// - SalBitmap - +// -------------- + +struct BitmapBuffer; +class BitmapColor; +class BitmapPalette; +class SalGraphics; + +class WinSalBitmap : public SalBitmap +{ +private: + + Size maSize; + HGLOBAL mhDIB; + HBITMAP mhDDB; + USHORT mnBitCount; + +public: + + HGLOBAL ImplGethDIB() const { return mhDIB; } + HBITMAP ImplGethDDB() const { return mhDDB; } + + static HGLOBAL ImplCreateDIB( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ); + static HANDLE ImplCopyDIBOrDDB( HANDLE hHdl, bool bDIB ); + static USHORT ImplGetDIBColorCount( HGLOBAL hDIB ); + static void ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf, + const Size& rSizePixel, bool bRLE4 ); + +public: + + WinSalBitmap(); + virtual ~WinSalBitmap(); + +public: + + bool Create( HANDLE hBitmap, bool bDIB, bool bCopyHandle ); + virtual bool Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ); + virtual bool Create( const SalBitmap& rSalBmpImpl ); + virtual bool Create( const SalBitmap& rSalBmpImpl, SalGraphics* pGraphics ); + virtual bool Create( const SalBitmap& rSalBmpImpl, USHORT nNewBitCount ); + + virtual void Destroy(); + + virtual Size GetSize() const { return maSize; } + virtual USHORT GetBitCount() const { return mnBitCount; } + + virtual BitmapBuffer* AcquireBuffer( bool bReadOnly ); + virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ); + virtual bool GetSystemData( BitmapSystemData& rData ); +}; + +#endif // _SV_SALBMP_HXX diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx new file mode 100755 index 000000000000..d945f7cedfa6 --- /dev/null +++ b/vcl/inc/win/saldata.hxx @@ -0,0 +1,379 @@ +/************************************************************************* + * + * 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 _SV_SALDATA_HXX +#define _SV_SALDATA_HXX + +#include "osl/module.h" + +#include +#include + +#include + +#include // for hMenu validation +#include + +class AutoTimer; +class WinSalInstance; +class WinSalObject; +class WinSalFrame; +class WinSalVirtualDevice; +class WinSalPrinter; +class Font; +struct HDCCache; +struct TempFontItem; + +typedef HRESULT (WINAPI *DwmIsCompositionEnabled_ptr)(WIN_BOOL*); + +// -------------------- +// - Standard-Defines - +// -------------------- + +#define MAX_STOCKPEN 4 +#define MAX_STOCKBRUSH 4 +#define SAL_CLIPRECT_COUNT 16 + +// -------------------- +// - Icon cache - +// -------------------- + +struct SalIcon +{ + int nId; + HICON hIcon; + HICON hSmallIcon; + SalIcon *pNext; +}; + +// ----------- +// - SalData - +// ----------- + +class SalData +{ +public: + SalData(); + ~SalData(); + + // native widget framework + void initNWF(); + void deInitNWF(); + + // fill maVKMap; + void initKeyCodeMap(); + + // checks if the menuhandle was created by VCL + BOOL IsKnownMenuHandle( HMENU hMenu ); + +public: + HINSTANCE mhInst; // default instance handle + HINSTANCE mhPrevInst; // previous instance handle + int mnCmdShow; // default frame show style + HPALETTE mhDitherPal; // dither palette + HGLOBAL mhDitherDIB; // dither memory handle + BYTE* mpDitherDIB; // dither memory + BYTE* mpDitherDIBData; // beginning of DIB data + long* mpDitherDiff; // Dither mapping table + BYTE* mpDitherLow; // Dither mapping table + BYTE* mpDitherHigh; // Dither mapping table + ULONG mnTimerMS; // Current Time (in MS) of the Timer + ULONG mnTimerOrgMS; // Current Original Time (in MS) + DWORD mnNextTimerTime; + DWORD mnLastEventTime; + UINT mnTimerId; // windows timer id + BOOL mbInTimerProc; // timer event is currently being dispatched + HHOOK mhSalObjMsgHook; // hook to get interesting msg for SalObject + HWND mhWantLeaveMsg; // window handle, that want a MOUSELEAVE message + AutoTimer* mpMouseLeaveTimer; // Timer for MouseLeave Test + WinSalInstance* mpFirstInstance; // pointer of first instance + WinSalFrame* mpFirstFrame; // pointer of first frame + WinSalObject* mpFirstObject; // pointer of first object window + WinSalVirtualDevice* mpFirstVD; // first VirDev + WinSalPrinter* mpFirstPrinter; // first printing printer + HDCCache* mpHDCCache; // Cache for three DC's + HBITMAP mh50Bmp; // 50% Bitmap + HBRUSH mh50Brush; // 50% Brush + COLORREF maStockPenColorAry[MAX_STOCKPEN]; + COLORREF maStockBrushColorAry[MAX_STOCKBRUSH]; + HPEN mhStockPenAry[MAX_STOCKPEN]; + HBRUSH mhStockBrushAry[MAX_STOCKBRUSH]; + USHORT mnStockPenCount; // count of static pens + USHORT mnStockBrushCount; // count of static brushes + WPARAM mnSalObjWantKeyEvt; // KeyEvent, welcher vom SalObj-Hook verarbeitet werden soll + BYTE mnCacheDCInUse; // count of CacheDC in use + BOOL mbObjClassInit; // is SALOBJECTCLASS initialised + BOOL mbInPalChange; // is in WM_QUERYNEWPALETTE + DWORD mnAppThreadId; // Id from Applikation-Thread + WIN_BOOL mbScrSvrEnabled; // ScreenSaver enabled + int mnSageStatus; // status of Sage-DLL (DISABLE_AGENT == nicht vorhanden) + SysAgt_Enable_PROC mpSageEnableProc; // funktion to deactivate the system agent + SalIcon* mpFirstIcon; // icon cache, points to first icon, NULL if none + TempFontItem* mpTempFontItem; + BOOL mbThemeChanged; // true if visual theme was changed: throw away theme handles + BOOL mbThemeMenuSupport; + + // for GdiPlus GdiplusStartup/GdiplusShutdown + ULONG_PTR gdiplusToken; + + std::set< HMENU > mhMenuSet; // keeps track of menu handles created by VCL, used by IsKnownMenuHandle() + std::map< UINT,USHORT > maVKMap; // map some dynamic VK_* entries + oslModule maDwmLib; + DwmIsCompositionEnabled_ptr mpDwmIsCompositionEnabled; +}; + +inline void SetSalData( SalData* pData ) { ImplGetSVData()->mpSalData = (void*)pData; } +inline SalData* GetSalData() { return (SalData*)ImplGetSVData()->mpSalData; } +inline SalData* GetAppSalData() { return (SalData*)ImplGetAppSVData()->mpSalData; } + +// -------------- +// - SalShlData - +// -------------- + +struct SalShlData +{ + HINSTANCE mhInst; // Instance of SAL-DLL + UINT mnWheelScrollLines; // WheelScrollLines + UINT mnWheelScrollChars; // WheelScrollChars + UINT mnWheelMsgId; // Wheel-Message-Id fuer W95 + WORD mnVersion; // System-Version (311 == 3.11) + WIN_BOOL mbW40; // Is System-Version >= 4.0 + WIN_BOOL mbWXP; // Windows XP + WIN_BOOL mbWPrinter; // true: use unicode printer functions + // false: use anis compat printer functions + OSVERSIONINFO maVersionInfo; +}; + +extern SalShlData aSalShlData; + +// ------------ +// - GDICache - +// ------------ + +#define CACHESIZE_HDC 3 +#define CACHED_HDC_1 0 +#define CACHED_HDC_2 1 +#define CACHED_HDC_DRAW 2 +#define CACHED_HDC_DEFEXT 64 + +struct HDCCache +{ + HDC mhDC; + HPALETTE mhDefPal; + HBITMAP mhDefBmp; + HBITMAP mhSelBmp; + HBITMAP mhActBmp; +}; + +void ImplClearHDCCache( SalData* pData ); +HDC ImplGetCachedDC( ULONG nID, HBITMAP hBmp = 0 ); +void ImplReleaseCachedDC( ULONG nID ); + +bool ImplAddTempFont( SalData&, const String& rFontFileURL ); +void ImplReleaseTempFonts( SalData& ); + +// -------------------------------------------- +// - SALSHL.CXX - for accessing DLL resources - +// -------------------------------------------- + +HCURSOR ImplLoadSalCursor( int nId ); +HBITMAP ImplLoadSalBitmap( int nId ); +BOOL ImplLoadSalIcon( int nId, HICON& rIcon, HICON& rSmallIcon ); + +// SALGDI.CXX +void ImplInitSalGDI(); +void ImplFreeSalGDI(); + +// -------------- +// - Prototypes - +// -------------- + +// \\WIN\SOURCE\APP\SALINST.CXX +void ImplSalYieldMutexAcquireWithWait(); +BOOL ImplSalYieldMutexTryToAcquire(); +void ImplSalYieldMutexAcquire(); +void ImplSalYieldMutexRelease(); +ULONG ImplSalReleaseYieldMutex(); +void ImplSalAcquireYieldMutex( ULONG nCount ); +sal_Bool ImplInterceptChildWindowKeyDown( MSG& rMsg ); + +// \\WIN\SOURCE\WINDOW\SALFRAME.CXX +LRESULT CALLBACK SalFrameWndProcA( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ); +LRESULT CALLBACK SalFrameWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ); +// \SV\WIN\SOURCE\APP\SALTIMER.CXX +#define SALTIMERPROC_RECURSIVE 0xffffffff +void CALLBACK SalTimerProc( HWND hWnd, UINT nMsg, UINT_PTR nId, DWORD nTime ); + +// \WIN\SOURCE\WINDOW\SALFRAME.CXX +void SalTestMouseLeave(); +BOOL ImplWriteLastError( DWORD lastError, const char *szApiCall ); + +// \WIN\SOURCE\WINDOW\SALFRAME.CXX +long ImplHandleSalObjKeyMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ); +long ImplHandleSalObjSysCharMsg( HWND hWnd, WPARAM wParam, LPARAM lParam ); +BOOL ImplHandleGlobalMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT& rlResult ); + +// \WIN\SOURCE\WINDOW\SALOBJ.CXX +WinSalObject* ImplFindSalObject( HWND hWndChild ); +BOOL ImplSalPreDispatchMsg( MSG* pMsg ); +void ImplSalPostDispatchMsg( MSG* pMsg, LRESULT nDispatchResult ); + +// \WIN\SOURCE\GDI\SALGDI3.CXX +void ImplSalLogFontToFontA( HDC hDC, const LOGFONTA& rLogFont, Font& rFont ); +void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW& rLogFont, Font& rFont ); +bool ImplIsFontAvailable( HDC hDC, const UniString& rName ); + +// \WIN\SOURCE\APP\SALDATA.CXX +rtl_TextEncoding ImplSalGetSystemEncoding(); +ByteString ImplSalGetWinAnsiString( const UniString& rStr, BOOL bFileName = FALSE ); +UniString ImplSalGetUniString( const sal_Char* pStr, xub_StrLen nLen = STRING_LEN ); +int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 ); + +// ----------- +// - Defines - +// ----------- + +#define SAL_FRAME_WNDEXTRA sizeof( DWORD ) +#define SAL_FRAME_THIS 0 +#define SAL_FRAME_CLASSNAMEA "SALFRAME" +#define SAL_FRAME_CLASSNAMEW L"SALFRAME" +#define SAL_SUBFRAME_CLASSNAMEA "SALSUBFRAME" +#define SAL_SUBFRAME_CLASSNAMEW L"SALSUBFRAME" +#define SAL_TMPSUBFRAME_CLASSNAMEW L"SALTMPSUBFRAME" +#define SAL_OBJECT_WNDEXTRA sizeof( DWORD ) +#define SAL_OBJECT_THIS 0 +#define SAL_OBJECT_CLASSNAMEA "SALOBJECT" +#define SAL_OBJECT_CLASSNAMEW L"SALOBJECT" +#define SAL_OBJECT_CHILDCLASSNAMEA "SALOBJECTCHILD" +#define SAL_OBJECT_CHILDCLASSNAMEW L"SALOBJECTCHILD" +#define SAL_COM_CLASSNAMEA "SALCOMWND" +#define SAL_COM_CLASSNAMEW L"SALCOMWND" + +#define SAL_MOUSELEAVE_TIMEOUT 300 + +// wParam == hDC; lParam == 0 +#define SAL_MSG_PRINTABORTJOB (WM_USER+110) +// wParam == bWait; lParam == 0 +#define SAL_MSG_THREADYIELD (WM_USER+111) +// wParam == 0; lParam == 0 +#define SAL_MSG_RELEASEWAITYIELD (WM_USER+112) +// wParam == 0; lParam == nMS +#define SAL_MSG_STARTTIMER (WM_USER+113) +// wParam == nFrameStyle; lParam == pParent; lResult == pFrame +#define SAL_MSG_CREATEFRAME (WM_USER+114) +// wParam == 0; lParam == 0 +#define SAL_MSG_DESTROYFRAME (WM_USER+115) +// wParam == 0; lParam == pParent; lResult == pObject +#define SAL_MSG_CREATEOBJECT (WM_USER+116) +// wParam == 0; lParam == pObject; +#define SAL_MSG_DESTROYOBJECT (WM_USER+117) +// wParam == hWnd; lParam == 0; lResult == hDC +#define SAL_MSG_GETDC (WM_USER+120) +// wParam == hWnd; lParam == 0 +#define SAL_MSG_RELEASEDC (WM_USER+121) +// wParam == newParentHwnd; lParam == oldHwnd; lResult == newhWnd +#define SAL_MSG_RECREATEHWND (WM_USER+122) +// wParam == newParentHwnd; lParam == oldHwnd; lResult == newhWnd +#define SAL_MSG_RECREATECHILDHWND (WM_USER+123) +// wParam == 0; lParam == HWND; +#define SAL_MSG_DESTROYHWND (WM_USER+124) + +// wParam == 0; lParam == pData +#define SAL_MSG_USEREVENT (WM_USER+130) +// wParam == 0; lParam == MousePosition relativ to upper left of screen +#define SAL_MSG_MOUSELEAVE (WM_USER+131) +// NULL-Message, soll nicht verarbeitet werden +#define SAL_MSG_DUMMY (WM_USER+132) +// wParam == 0; lParam == 0 +#define SAL_MSG_POSTFOCUS (WM_USER+133) +// wParam == wParam; lParam == lParam +#define SAL_MSG_POSTQUERYNEWPAL (WM_USER+134) +// wParam == wParam; lParam == lParam +#define SAL_MSG_POSTPALCHANGED (WM_USER+135) +// wParam == wParam; lParam == lParam +#define SAL_MSG_POSTMOVE (WM_USER+136) +// wParam == wParam; lParam == lParam +#define SAL_MSG_POSTCALLSIZE (WM_USER+137) +// wParam == pRECT; lParam == 0 +#define SAL_MSG_POSTPAINT (WM_USER+138) +// wParam == 0; lParam == pFrame; lResult 0 +#define SAL_MSG_FORCEPALETTE (WM_USER+139) +// wParam == 0; lParam == 0 +#define SAL_MSG_CAPTUREMOUSE (WM_USER+140) +// wParam == 0; lParam == 0 +#define SAL_MSG_RELEASEMOUSE (WM_USER+141) +// wParam == nFlags; lParam == 0 +#define SAL_MSG_TOTOP (WM_USER+142) +// wParam == bVisible; lParam == 0 +#define SAL_MSG_SHOW (WM_USER+143) +// wParam == 0; lParam == SalInputContext +#define SAL_MSG_SETINPUTCONTEXT (WM_USER+144) +// wParam == nFlags; lParam == 0 +#define SAL_MSG_ENDEXTTEXTINPUT (WM_USER+145) +// POSTTIMER-Message; wparam = 0, lParam == time +#define SAL_MSG_POSTTIMER (WM_USER+161) + +// SysChild-ToTop; wParam = 0; lParam = 0 +#define SALOBJ_MSG_TOTOP (WM_USER+160) +// POSTFOCUS-Message; wParam == bFocus; lParam == 0 +#define SALOBJ_MSG_POSTFOCUS (WM_USER+161) + + +// ----------------- +// - Helpfunctions - +// ----------------- + +// A/W-Wrapper +LONG ImplSetWindowLong( HWND hWnd, int nIndex, DWORD dwNewLong ); +LONG ImplGetWindowLong( HWND hWnd, int nIndex ); +WIN_BOOL ImplPostMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam ); +WIN_BOOL ImplSendMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam ); +WIN_BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax ); +WIN_BOOL ImplPeekMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg ); +LONG ImplDispatchMessage( CONST MSG *lpMsg ); + +inline void SetWindowPtr( HWND hWnd, WinSalFrame* pThis ) +{ + ImplSetWindowLong( hWnd, SAL_FRAME_THIS, (LONG)pThis ); +} + +inline WinSalFrame* GetWindowPtr( HWND hWnd ) +{ + return (WinSalFrame*)ImplGetWindowLong( hWnd, SAL_FRAME_THIS ); +} + +inline void SetSalObjWindowPtr( HWND hWnd, WinSalObject* pThis ) +{ + ImplSetWindowLong( hWnd, SAL_OBJECT_THIS, (LONG)pThis ); +} + +inline WinSalObject* GetSalObjWindowPtr( HWND hWnd ) +{ + return (WinSalObject*)ImplGetWindowLong( hWnd, SAL_OBJECT_THIS ); +} + +#endif // _SV_SALDATA_HXX diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h new file mode 100755 index 000000000000..92b6bbc509da --- /dev/null +++ b/vcl/inc/win/salframe.h @@ -0,0 +1,149 @@ +/************************************************************************* + * + * 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 _SV_SALFRAME_H +#define _SV_SALFRAME_H + +#include +#include + +class WinSalGraphics; + +// ---------------- +// - WinSalFrame - +// ---------------- + +class WinSalFrame : public SalFrame +{ +public: + HWND mhWnd; // Window handle + HCURSOR mhCursor; // cursor handle + HIMC mhDefIMEContext; // default IME-Context + WinSalGraphics* mpGraphics; // current frame graphics + WinSalGraphics* mpGraphics2; // current frame graphics for other threads + WinSalFrame* mpNextFrame; // pointer to next frame + HMENU mSelectedhMenu; // the menu where highlighting is currently going on + HMENU mLastActivatedhMenu; // the menu that was most recently opened + SystemEnvData maSysData; // system data + SalFrameState maState; // frame state + int mnShowState; // show state + long mnWidth; // client width in pixeln + long mnHeight; // client height in pixeln + int mnMinWidth; // min. client width in pixeln + int mnMinHeight; // min. client height in pixeln + int mnMaxWidth; // max. client width in pixeln + int mnMaxHeight; // max. client height in pixeln + RECT maFullScreenRect; // fullscreen rect + int mnFullScreenShowState; // fullscreen restore show state + UINT mnInputLang; // current Input Language + UINT mnInputCodePage; // current Input CodePage + ULONG mnStyle; // style + BOOL mbGraphics; // is Graphics used + BOOL mbCaption; // has window a caption + BOOL mbBorder; // has window a border + BOOL mbFixBorder; // has window a fixed border + BOOL mbSizeBorder; // has window a sizeable border + BOOL mbNoIcon; // is an window without an icon + BOOL mbFloatWin; // is a FloatingWindow + BOOL mbFullScreen; // TRUE: in full screen mode + BOOL mbPresentation; // TRUE: Presentation Mode running + BOOL mbInShow; // innerhalb eines Show-Aufrufs + BOOL mbRestoreMaximize; // Restore-Maximize + BOOL mbInMoveMsg; // Move-Message wird verarbeitet + BOOL mbInSizeMsg; // Size-Message wird verarbeitet + BOOL mbFullScreenToolWin; // WS_EX_TOOLWINDOW reset in FullScreenMode + BOOL mbDefPos; // default-position + BOOL mbOverwriteState; // TRUE: WindowState darf umgesetzt werden + BOOL mbIME; // TRUE: We are in IME Mode + BOOL mbHandleIME; // TRUE: Wir handeln die IME-Messages + BOOL mbSpezIME; // TRUE: Spez IME + BOOL mbAtCursorIME; // TRUE: Wir behandeln nur einige IME-Messages + BOOL mbCandidateMode; // TRUE: Wir befinden uns im Candidate-Modus + static BOOL mbInReparent; // TRUE: ignore focus lost and gain due to reparenting + + RGNDATA* mpClipRgnData; + RECT* mpNextClipRect; + BOOL mbFirstClipRect; + sal_Int32 mnDisplay; // Display used for Fullscreen, 0 is primary monitor + + void updateScreenNumber(); +public: + WinSalFrame(); + virtual ~WinSalFrame(); + + virtual SalGraphics* GetGraphics(); + virtual void ReleaseGraphics( SalGraphics* pGraphics ); + virtual BOOL PostEvent( void* pData ); + virtual void SetTitle( const XubString& rTitle ); + virtual void SetIcon( USHORT nIcon ); + virtual void SetMenu( SalMenu* pSalMenu ); + virtual void DrawMenuBar(); + virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ); + virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE ); + virtual void Enable( BOOL bEnable ); + virtual void SetMinClientSize( long nWidth, long nHeight ); + virtual void SetMaxClientSize( long nWidth, long nHeight ); + virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ); + virtual void GetClientSize( long& rWidth, long& rHeight ); + virtual void GetWorkArea( Rectangle& rRect ); + virtual SalFrame* GetParent() const; + virtual void SetWindowState( const SalFrameState* pState ); + virtual BOOL GetWindowState( SalFrameState* pState ); + virtual void ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay ); + virtual void StartPresentation( BOOL bStart ); + virtual void SetAlwaysOnTop( BOOL bOnTop ); + virtual void ToTop( USHORT nFlags ); + virtual void SetPointer( PointerStyle ePointerStyle ); + virtual void CaptureMouse( BOOL bMouse ); + virtual void SetPointerPos( long nX, long nY ); + using SalFrame::Flush; + virtual void Flush(); + virtual void Sync(); + virtual void SetInputContext( SalInputContext* pContext ); + virtual void EndExtTextInput( USHORT nFlags ); + virtual String GetKeyName( USHORT nKeyCode ); + virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode ); + virtual BOOL MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); + virtual LanguageType GetInputLanguage(); + virtual SalBitmap* SnapShot(); + virtual void UpdateSettings( AllSettings& rSettings ); + virtual void Beep( SoundType eSoundType ); + virtual const SystemEnvData* GetSystemData() const; + virtual SalPointerState GetPointerState(); + virtual void SetParent( SalFrame* pNewParent ); + virtual bool SetPluginParent( SystemParentData* pNewParent ); + virtual void SetBackgroundBitmap( SalBitmap* ); + virtual void SetScreenNumber( unsigned int ); + virtual void ResetClipRegion(); + virtual void BeginSetClipRegion( ULONG nRects ); + virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); + virtual void EndSetClipRegion(); +}; + +void ImplSalGetWorkArea( HWND hWnd, RECT *pRect, const RECT *pParentRect ); + +#endif // _SV_SALFRAME_H diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h new file mode 100755 index 000000000000..3b0daa6d95ef --- /dev/null +++ b/vcl/inc/win/salgdi.h @@ -0,0 +1,405 @@ +/************************************************************************* + * + * 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 _SV_SALGDI_H +#define _SV_SALGDI_H + +#include +#include +#include +#include + +#include "boost/scoped_ptr.hpp" +#include + +class ImplFontSelectData; +class ImplWinFontEntry; +class ImplFontAttrCache; + +// ----------- +// - Defines - +// ----------- + +#define RGB_TO_PALRGB(nRGB) ((nRGB)|0x02000000) +#define PALRGB_TO_RGB(nPalRGB) ((nPalRGB)&0x00ffffff) + +// win32 platform specific options. Move them to the PMK file? + +#define GCP_KERN_HACK +#define GNG_VERT_HACK + +// win32 specific physically available font face +class ImplWinFontData : public ImplFontData +{ +public: + explicit ImplWinFontData( const ImplDevFontAttributes&, + int nFontHeight, WIN_BYTE eWinCharSet, + WIN_BYTE nPitchAndFamily ); + virtual ~ImplWinFontData(); + + virtual ImplFontData* Clone() const; + virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const; + virtual sal_IntPtr GetFontId() const; + void SetFontId( sal_IntPtr nId ) { mnId = nId; } + void UpdateFromHDC( HDC ) const; + + bool HasChar( sal_uInt32 cChar ) const; + + WIN_BYTE GetCharSet() const { return meWinCharSet; } + WIN_BYTE GetPitchAndFamily() const { return mnPitchAndFamily; } + bool IsGlyphApiDisabled() const { return mbDisableGlyphApi; } + bool SupportsKorean() const { return mbHasKoreanRange; } + bool SupportsCJK() const { return mbHasCJKSupport; } + bool SupportsArabic() const { return mbHasArabicSupport; } + bool AliasSymbolsHigh() const { return mbAliasSymbolsHigh; } + bool AliasSymbolsLow() const { return mbAliasSymbolsLow; } +#ifdef ENABLE_GRAPHITE + bool SupportsGraphite() const { return mbHasGraphiteSupport; } +#endif + + const ImplFontCharMap* GetImplFontCharMap() const; + const Ucs2SIntMap* GetEncodingVector() const { return mpEncodingVector; } + void SetEncodingVector( const Ucs2SIntMap* pNewVec ) const + { + if( mpEncodingVector ) + delete mpEncodingVector; + mpEncodingVector = pNewVec; + } +private: + sal_IntPtr mnId; + + // some members that are initalized lazily when the font gets selected into a HDC + mutable bool mbDisableGlyphApi; + mutable bool mbHasKoreanRange; + mutable bool mbHasCJKSupport; +#ifdef ENABLE_GRAPHITE + mutable bool mbHasGraphiteSupport; +#endif + mutable bool mbHasArabicSupport; + mutable ImplFontCharMap* mpUnicodeMap; + mutable const Ucs2SIntMap* mpEncodingVector; + + // TODO: get rid of the members below needed to work with the Win9x non-unicode API + BYTE* mpFontCharSets; // all Charsets for the current font (used on W98 for kerning) + BYTE mnFontCharSetCount; // Number of Charsets of the current font; 0 - if not queried + WIN_BYTE meWinCharSet; + WIN_BYTE mnPitchAndFamily; + bool mbAliasSymbolsHigh; + bool mbAliasSymbolsLow; +private: + void ReadCmapTable( HDC ) const; + void ReadOs2Table( HDC ) const; + +#ifdef GNG_VERT_HACK + void ReadGsubTable( HDC ) const; + + typedef std::hash_set UcsHashSet; + mutable UcsHashSet maGsubTable; + mutable bool mbGsubRead; +public: + bool HasGSUBstitutions( HDC ) const; + bool IsGSUBstituted( sal_UCS4 ) const; +#endif // GNG_VERT_HACK +}; + +// ------------------ +// - WinSalGraphics - +// ------------------ + +class WinSalGraphics : public SalGraphics +{ +public: + HDC mhDC; // HDC + HWND mhWnd; // Window-Handle, when Window-Graphics + HFONT mhFonts[ MAX_FALLBACK ]; // Font + Fallbacks + const ImplWinFontData* mpWinFontData[ MAX_FALLBACK ]; // pointer to the most recent font face + ImplWinFontEntry* mpWinFontEntry[ MAX_FALLBACK ]; // pointer to the most recent font instance + float mfFontScale; // allows metrics emulation of huge font sizes + HPEN mhPen; // Pen + HBRUSH mhBrush; // Brush + HRGN mhRegion; // Region Handle + HPEN mhDefPen; // DefaultPen + HBRUSH mhDefBrush; // DefaultBrush + HFONT mhDefFont; // DefaultFont + HPALETTE mhDefPal; // DefaultPalette + COLORREF mnPenColor; // PenColor + COLORREF mnBrushColor; // BrushColor + COLORREF mnTextColor; // TextColor + RGNDATA* mpClipRgnData; // ClipRegion-Data + RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data + RECT* mpNextClipRect; // Naechstes ClipRegion-Rect + BOOL mbFirstClipRect; // Flag for first cliprect to insert + LOGFONTA* mpLogFont; // LOG-Font which is currently selected (only W9x) + ImplFontAttrCache* mpFontAttrCache; // Cache font attributes from files in so/share/fonts + BYTE* mpFontCharSets; // All Charsets for the current font + BYTE mnFontCharSetCount; // Number of Charsets of the current font; 0 - if not queried + BOOL mbFontKernInit; // FALSE: FontKerns must be queried + KERNINGPAIR* mpFontKernPairs; // Kerning Pairs of the current Font + ULONG mnFontKernPairCount;// Number of Kerning Pairs of the current Font + int mnPenWidth; // Linienbreite + BOOL mbStockPen; // is Pen a stockpen + BOOL mbStockBrush; // is Brush a stcokbrush + BOOL mbPen; // is Pen (FALSE == NULL_PEN) + BOOL mbBrush; // is Brush (FALSE == NULL_BRUSH) + BOOL mbPrinter; // is Printer + BOOL mbVirDev; // is VirDev + BOOL mbWindow; // is Window + BOOL mbScreen; // is Screen compatible + bool mbXORMode; // _every_ output with RasterOp XOR + + // remember RGB values for SetLineColor/SetFillColor + SalColor maLineColor; + SalColor maFillColor; + + HFONT ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFontScale, HFONT& o_rOldFont ); + +public: + explicit WinSalGraphics(); + virtual ~WinSalGraphics(); + +protected: + virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ); + virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ); + // draw --> LineColor and FillColor and RasterOp and ClipRegion + virtual void drawPixel( long nX, long nY ); + virtual void drawPixel( long nX, long nY, SalColor nSalColor ); + virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ); + virtual void drawRect( long nX, long nY, long nWidth, long nHeight ); + virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry ); + virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry ); + virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry ); + virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency ); + virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin ); + virtual sal_Bool drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ); + virtual sal_Bool drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ); + virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry ); + + // CopyArea --> No RasterOp, but ClipRegion + virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, + long nSrcHeight, USHORT nFlags ); + + // CopyBits and DrawBitmap --> RasterOp and ClipRegion + // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics + virtual void copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics ); + virtual void drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap ); + virtual void drawBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + SalColor nTransparentColor ); + virtual void drawBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + const SalBitmap& rTransparentBitmap ); + virtual void drawMask( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + SalColor nMaskColor ); + + virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight ); + virtual SalColor getPixel( long nX, long nY ); + + // invert --> ClipRegion (only Windows or VirDevs) + virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags); + virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags ); + + virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ); + + // native widget rendering methods that require mirroring + virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + const Point& aPos, BOOL& rIsInside ); + virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + ControlState nState, const ImplControlValue& aValue, + const rtl::OUString& aCaption ); + virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + ControlState nState, const ImplControlValue& aValue, + const rtl::OUString& aCaption ); + virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, + const ImplControlValue& aValue, const rtl::OUString& aCaption, + Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ); + + virtual bool drawAlphaBitmap( const SalTwoRect&, + const SalBitmap& rSourceBitmap, + const SalBitmap& rAlphaBitmap ); + virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency ); + +public: + // public SalGraphics methods, the interface to teh independent vcl part + + // get device resolution + virtual void GetResolution( long& rDPIX, long& rDPIY ); + // get the depth of the device + virtual USHORT GetBitCount(); + // get the width of the device + virtual long GetGraphicsWidth() const; + + // set the clip region to empty + virtual void ResetClipRegion(); + // begin setting the clip region, add rectangles to the + // region with the UnionClipRegion call + virtual void BeginSetClipRegion( ULONG nCount ); + // all rectangles were added and the clip region should be set now + virtual void EndSetClipRegion(); + + // set the line color to transparent (= don't draw lines) + virtual void SetLineColor(); + // set the line color to a specific color + virtual void SetLineColor( SalColor nSalColor ); + // set the fill color to transparent (= don't fill) + virtual void SetFillColor(); + // set the fill color to a specific color, shapes will be + // filled accordingly + virtual void SetFillColor( SalColor nSalColor ); + // enable/disable XOR drawing + virtual void SetXORMode( bool bSet, bool ); + // set line color for raster operations + virtual void SetROPLineColor( SalROPColor nROPColor ); + // set fill color for raster operations + virtual void SetROPFillColor( SalROPColor nROPColor ); + // set the text color to a specific color + virtual void SetTextColor( SalColor nSalColor ); + // set the font + virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel ); + // get the current font's etrics + virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ); + // get kernign pairs of the current font + // return only PairCount if (pKernPairs == NULL) + virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs ); + // get the repertoire of the current font + virtual const ImplFontCharMap* GetImplFontCharMap() const; + // graphics must fill supplied font list + virtual void GetDevFontList( ImplDevFontList* ); + // graphics should call ImplAddDevFontSubstitute on supplied + // OutputDevice for all its device specific preferred font substitutions + virtual void GetDevFontSubstList( OutputDevice* ); + virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ); + // CreateFontSubset: a method to get a subset of glyhps of a font + // inside a new valid font file + // returns TRUE if creation of subset was successfull + // parameters: rToFile: contains a osl file URL to write the subset to + // pFont: describes from which font to create a subset + // pGlyphIDs: the glyph ids to be extracted + // pEncoding: the character code corresponding to each glyph + // pWidths: the advance widths of the correspoding glyphs (in PS font units) + // nGlyphs: the number of glyphs + // rInfo: additional outgoing information + // implementation note: encoding 0 with glyph id 0 should be added implicitly + // as "undefined character" + virtual BOOL CreateFontSubset( const rtl::OUString& rToFile, + const ImplFontData*, + long* pGlyphIDs, + sal_uInt8* pEncoding, + sal_Int32* pWidths, + int nGlyphs, + FontSubsetInfo& rInfo // out parameter + ); + + // GetFontEncodingVector: a method to get the encoding map Unicode + // to font encoded character; this is only used for type1 fonts and + // may return NULL in case of unknown encoding vector + // if ppNonEncoded is set and non encoded characters (that is type1 + // glyphs with only a name) exist it is set to the corresponding + // map for non encoded glyphs; the encoding vector contains -1 + // as encoding for these cases + virtual const Ucs2SIntMap* GetFontEncodingVector( const ImplFontData*, const Ucs2OStrMap** ppNonEncoded ); + + // GetEmbedFontData: gets the font data for a font marked + // embeddable by GetDevFontList or NULL in case of error + // parameters: pFont: describes the font in question + // pWidths: the widths of all glyphs from char code 0 to 255 + // pWidths MUST support at least 256 members; + // rInfo: additional outgoing information + // pDataLen: out parameter, contains the byte length of the returned buffer + virtual const void* GetEmbedFontData( const ImplFontData*, + const sal_Ucs* pUnicodes, + sal_Int32* pWidths, + FontSubsetInfo& rInfo, + long* pDataLen ); + // frees the font data again + virtual void FreeEmbedFontData( const void* pData, long nDataLen ); + virtual void GetGlyphWidths( const ImplFontData*, + bool bVertical, + Int32Vector& rWidths, + Ucs2UIntMap& rUnicodeEnc ); + virtual int GetMinKashidaWidth(); + + virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& ); + virtual BOOL GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& ); + + virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ); + virtual void DrawServerFontLayout( const ServerFontLayout& ); + + virtual bool supportsOperation( OutDevSupportType ) const; + // Query the platform layer for control support + virtual BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart ); + + virtual SystemGraphicsData GetGraphicsData() const; + virtual SystemFontData GetSysFontData( int nFallbacklevel ) const; +}; + +// Init/Deinit Graphics +void ImplSalInitGraphics( WinSalGraphics* ); +void ImplSalDeInitGraphics( WinSalGraphics* ); +void ImplUpdateSysColorEntries(); +int ImplIsSysColorEntry( SalColor nSalColor ); +void ImplGetLogFontFromFontSelect( HDC, const ImplFontSelectData*, + LOGFONTW&, bool bTestVerticalAvail ); + +// ----------- +// - Defines - +// ----------- + +#define MAX_64KSALPOINTS ((((USHORT)0xFFFF)-8)/sizeof(POINTS)) + +// ----------- +// - Inlines - +// ----------- + +// #102411# Win's GCP mishandles kerning => we need to do it ourselves +// SalGraphicsData::mpFontKernPairs is sorted by +inline bool ImplCmpKernData( const KERNINGPAIR& a, const KERNINGPAIR& b ) +{ + if( a.wFirst < b.wFirst ) + return true; + if( a.wFirst > b.wFirst ) + return false; + return (a.wSecond < b.wSecond); +} + +// called extremely often from just one spot => inline +inline bool ImplWinFontData::HasChar( sal_uInt32 cChar ) const +{ + if( mpUnicodeMap->HasChar( cChar ) ) + return true; + // second chance to allow symbol aliasing + if( mbAliasSymbolsLow && ((cChar-0xF000) <= 0xFF) ) + cChar -= 0xF000; + else if( mbAliasSymbolsHigh && (cChar <= 0xFF) ) + cChar += 0xF000; + else + return false; + return mpUnicodeMap->HasChar( cChar ); +} + +#endif // _SV_SALGDI_H + diff --git a/vcl/inc/win/salids.hrc b/vcl/inc/win/salids.hrc new file mode 100644 index 000000000000..3049f11b551b --- /dev/null +++ b/vcl/inc/win/salids.hrc @@ -0,0 +1,120 @@ +/************************************************************************* + * + * 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 _SV_SALIDS_HRC +#define _SV_SALIDS_HRC + +// Cursor +#define SAL_RESID_POINTER_NULL 10000 +#ifndef W40ONLY +#define SAL_RESID_POINTER_HELP 10001 +#endif +#ifndef WNT +#define SAL_RESID_POINTER_HSIZE 10002 +#define SAL_RESID_POINTER_VSIZE 10003 +#define SAL_RESID_POINTER_NESWSIZE 10004 +#define SAL_RESID_POINTER_NWSESIZE 10005 +#endif +#define SAL_RESID_POINTER_CROSS 10006 +#define SAL_RESID_POINTER_MOVE 10007 +#define SAL_RESID_POINTER_HSPLIT 10008 +#define SAL_RESID_POINTER_VSPLIT 10009 +#define SAL_RESID_POINTER_HSIZEBAR 10010 +#define SAL_RESID_POINTER_VSIZEBAR 10011 +#define SAL_RESID_POINTER_HAND 10012 +#define SAL_RESID_POINTER_REFHAND 10013 +#define SAL_RESID_POINTER_PEN 10014 +#define SAL_RESID_POINTER_MAGNIFY 10015 +#define SAL_RESID_POINTER_FILL 10016 +#define SAL_RESID_POINTER_ROTATE 10017 +#define SAL_RESID_POINTER_HSHEAR 10018 +#define SAL_RESID_POINTER_VSHEAR 10019 +#define SAL_RESID_POINTER_MIRROR 10020 +#define SAL_RESID_POINTER_CROOK 10021 +#define SAL_RESID_POINTER_CROP 10022 +#define SAL_RESID_POINTER_MOVEPOINT 10023 +#define SAL_RESID_POINTER_MOVEBEZIERWEIGHT 10024 +#define SAL_RESID_POINTER_MOVEDATA 10025 +#define SAL_RESID_POINTER_COPYDATA 10026 +#define SAL_RESID_POINTER_LINKDATA 10027 +#define SAL_RESID_POINTER_MOVEDATALINK 10028 +#define SAL_RESID_POINTER_COPYDATALINK 10029 +#define SAL_RESID_POINTER_MOVEFILE 10030 +#define SAL_RESID_POINTER_COPYFILE 10031 +#define SAL_RESID_POINTER_LINKFILE 10032 +#define SAL_RESID_POINTER_MOVEFILELINK 10033 +#define SAL_RESID_POINTER_COPYFILELINK 10034 +#define SAL_RESID_POINTER_MOVEFILES 10035 +#define SAL_RESID_POINTER_COPYFILES 10036 +#define SAL_RESID_POINTER_NOTALLOWED 10037 +#define SAL_RESID_POINTER_DRAW_LINE 10038 +#define SAL_RESID_POINTER_DRAW_RECT 10039 +#define SAL_RESID_POINTER_DRAW_POLYGON 10040 +#define SAL_RESID_POINTER_DRAW_BEZIER 10041 +#define SAL_RESID_POINTER_DRAW_ARC 10042 +#define SAL_RESID_POINTER_DRAW_PIE 10043 +#define SAL_RESID_POINTER_DRAW_CIRCLECUT 10044 +#define SAL_RESID_POINTER_DRAW_ELLIPSE 10045 +#define SAL_RESID_POINTER_DRAW_FREEHAND 10046 +#define SAL_RESID_POINTER_DRAW_CONNECT 10047 +#define SAL_RESID_POINTER_DRAW_TEXT 10048 +#define SAL_RESID_POINTER_DRAW_CAPTION 10049 +#define SAL_RESID_POINTER_CHART 10050 +#define SAL_RESID_POINTER_DETECTIVE 10051 +#define SAL_RESID_POINTER_PIVOT_COL 10052 +#define SAL_RESID_POINTER_PIVOT_ROW 10053 +#define SAL_RESID_POINTER_PIVOT_FIELD 10054 +#define SAL_RESID_POINTER_CHAIN 10055 +#define SAL_RESID_POINTER_CHAIN_NOTALLOWED 10056 +#define SAL_RESID_POINTER_TIMEEVENT_MOVE 10057 +#define SAL_RESID_POINTER_TIMEEVENT_SIZE 10058 +#define SAL_RESID_POINTER_AUTOSCROLL_N 10059 +#define SAL_RESID_POINTER_AUTOSCROLL_S 10060 +#define SAL_RESID_POINTER_AUTOSCROLL_W 10061 +#define SAL_RESID_POINTER_AUTOSCROLL_E 10062 +#define SAL_RESID_POINTER_AUTOSCROLL_NW 10063 +#define SAL_RESID_POINTER_AUTOSCROLL_NE 10064 +#define SAL_RESID_POINTER_AUTOSCROLL_SW 10065 +#define SAL_RESID_POINTER_AUTOSCROLL_SE 10066 +#define SAL_RESID_POINTER_AUTOSCROLL_NS 10067 +#define SAL_RESID_POINTER_AUTOSCROLL_WE 10068 +#define SAL_RESID_POINTER_AUTOSCROLL_NSWE 10069 +#define SAL_RESID_POINTER_AIRBRUSH 10070 +#define SAL_RESID_POINTER_TEXT_VERTICAL 10071 +#define SAL_RESID_POINTER_PIVOT_DELETE 10072 +#define SAL_RESID_POINTER_TAB_SELECT_S 10073 +#define SAL_RESID_POINTER_TAB_SELECT_E 10074 +#define SAL_RESID_POINTER_TAB_SELECT_SE 10075 +#define SAL_RESID_POINTER_TAB_SELECT_W 10076 +#define SAL_RESID_POINTER_TAB_SELECT_SW 10077 +#define SAL_RESID_POINTER_PAINTBRUSH 10078 + +#define SAL_RESID_BITMAP_50 11000 + +#define SAL_RESID_ICON_DEFAULT 1 + +#endif // _SV_SALIDS_HRC diff --git a/vcl/inc/win/salinst.h b/vcl/inc/win/salinst.h new file mode 100755 index 000000000000..6fc160a19e05 --- /dev/null +++ b/vcl/inc/win/salinst.h @@ -0,0 +1,104 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SV_SALINST_H +#define _SV_SALINST_H + +#include + +namespace vos { class OMutex; } + +// ------------------- +// - SalInstanceData - +// ------------------- + +class SalYieldMutex; + +class WinSalInstance : public SalInstance +{ +public: + HINSTANCE mhInst; // Instance Handle + HWND mhComWnd; // window, for communication (between threads and the main thread) + SalYieldMutex* mpSalYieldMutex; // Sal-Yield-Mutex + vos::OMutex* mpSalWaitMutex; // Sal-Wait-Mutex + USHORT mnYieldWaitCount; // Wait-Count +public: + WinSalInstance(); + virtual ~WinSalInstance(); + + virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle ); + virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle ); + virtual void DestroyFrame( SalFrame* pFrame ); + virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE ); + virtual void DestroyObject( SalObject* pObject ); + virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics, + long nDX, long nDY, + USHORT nBitCount, const SystemGraphicsData *pData ); + virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice ); + + virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo, + ImplJobSetup* pSetupData ); + virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter ); + virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter ); + virtual void DestroyPrinter( SalPrinter* pPrinter ); + virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList ); + virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo ); + virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ); + virtual String GetDefaultPrinter(); + virtual SalTimer* CreateSalTimer(); + virtual SalI18NImeStatus* CreateI18NImeStatus(); + virtual SalSystem* CreateSalSystem(); + virtual SalBitmap* CreateSalBitmap(); + virtual vos::IMutex* GetYieldMutex(); + virtual ULONG ReleaseYieldMutex(); + virtual void AcquireYieldMutex( ULONG nCount ); + virtual bool CheckYieldMutex(); + + virtual void Yield( bool bWait, bool bHandleAllCurrentEvents ); + virtual bool AnyInput( USHORT nType ); + virtual SalMenu* CreateMenu( BOOL bMenuBar, Menu* ); + virtual void DestroyMenu( SalMenu* ); + virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData ); + virtual void DestroyMenuItem( SalMenuItem* ); + virtual SalSession* CreateSalSession(); + virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ); + virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType); + + static int WorkaroundExceptionHandlingInUSER32Lib(int nExcept, LPEXCEPTION_POINTERS pExceptionInfo); +}; + +// -------------- +// - Prototypen - +// -------------- + +SalFrame* ImplSalCreateFrame( WinSalInstance* pInst, HWND hWndParent, ULONG nSalFrameStyle ); +SalObject* ImplSalCreateObject( WinSalInstance* pInst, WinSalFrame* pParent ); +HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, BOOL bAsChild ); +void ImplSalStartTimer( ULONG nMS, BOOL bMutex = FALSE ); +void ImplSalPrinterAbortJobAsync( HDC hPrnDC ); + +#endif // _SV_SALINST_H diff --git a/vcl/inc/win/salmenu.h b/vcl/inc/win/salmenu.h new file mode 100755 index 000000000000..1d8428b2b418 --- /dev/null +++ b/vcl/inc/win/salmenu.h @@ -0,0 +1,76 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SV_SALMENU_H +#define _SV_SALMENU_H + +#include +#include + +class WinSalMenu : public SalMenu +{ +public: + WinSalMenu(); + virtual ~WinSalMenu(); + virtual BOOL VisibleMenuBar(); // must return TRUE to actually DISPLAY native menu bars + // otherwise only menu messages are processed (eg, OLE on Windows) + + virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ); + virtual void RemoveItem( unsigned nPos ); + virtual void SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos ); + virtual void SetFrame( const SalFrame* pFrame ); + virtual void CheckItem( unsigned nPos, BOOL bCheck ); + virtual void EnableItem( unsigned nPos, BOOL bEnable ); + virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText ); + virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage ); + virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName ); + virtual void GetSystemMenuData( SystemMenuData* pData ); + + HMENU mhMenu; // the menu handle + BOOL mbMenuBar; // true for menu bars + HWND mhWnd; // the window handle where the menubar is attached, may be NULL + WinSalMenu *mpParentMenu; // the parent menu +}; + +class WinSalMenuItem : public SalMenuItem +{ +public: + WinSalMenuItem(); + virtual ~WinSalMenuItem(); + + + MENUITEMINFOW mInfo; + void* mpMenu; // pointer to corresponding VCL menu + XubString mText; // the item text + XubString mAccelText; // the accelerator string + Bitmap maBitmap; // item image + int mnId; // item id + WinSalMenu* mpSalMenu; // the menu where this item is inserted +}; + +#endif // _SV_SALMENU_H + diff --git a/vcl/inc/win/salnativewidgets.h b/vcl/inc/win/salnativewidgets.h new file mode 100755 index 000000000000..772e0cc5b036 --- /dev/null +++ b/vcl/inc/win/salnativewidgets.h @@ -0,0 +1,52 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SV_NATIVEWIDGETS_H +#define _SV_NATIVEWIDGETS_H + + +#ifdef __cplusplus + +/* SalControlHandleData: + * + * Holds platform specific theming data. + */ + +class SalControlHandleData +{ + public: + SalControlHandleData( void ); + ~SalControlHandleData( void ); + + public: + // nothing needed on Win32 +}; + + +#endif /* __cplusplus */ + +#endif diff --git a/vcl/inc/win/salobj.h b/vcl/inc/win/salobj.h new file mode 100755 index 000000000000..52137437975a --- /dev/null +++ b/vcl/inc/win/salobj.h @@ -0,0 +1,70 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SV_SALOBJ_H +#define _SV_SALOBJ_H + +#include + +// ----------------- +// - SalObjectData - +// ----------------- + +class WinSalObject : public SalObject +{ +public: + HWND mhWnd; // Window handle + HWND mhWndChild; // Child Window handle + HWND mhLastFocusWnd; // Child-Window, welches als letztes den Focus hatte + SystemChildData maSysData; // SystemEnvData + RGNDATA* mpClipRgnData; // ClipRegion-Data + RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data + RECT* mpNextClipRect; // Naechstes ClipRegion-Rect + BOOL mbFirstClipRect; // Flag for first cliprect to insert + sal_Bool mbInterceptChildWindowKeyDown; // Intercept the KeyDown event sent to system child window + WinSalObject* mpNextObject; // pointer to next object + + + WinSalObject(); + virtual ~WinSalObject(); + + virtual void ResetClipRegion(); + virtual USHORT GetClipRegionType(); + virtual void BeginSetClipRegion( ULONG nRects ); + virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); + virtual void EndSetClipRegion(); + virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ); + virtual void Show( BOOL bVisible ); + virtual void Enable( BOOL nEnable ); + virtual void GrabFocus(); + virtual void SetBackground(); + virtual void SetBackground( SalColor nSalColor ); + virtual const SystemEnvData* GetSystemData() const; + virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ); +}; + +#endif // _SV_SALOBJ_H diff --git a/vcl/inc/win/salprn.h b/vcl/inc/win/salprn.h new file mode 100755 index 000000000000..c438fc3ead71 --- /dev/null +++ b/vcl/inc/win/salprn.h @@ -0,0 +1,129 @@ +/************************************************************************* + * + * 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 _SV_SALPRN_H +#define _SV_SALPRN_H + +#include + +// ----------------- +// - SalDriverData - +// ----------------- + +// WNT3 +#define SAL_DRIVERDATA_SYSSIGN ((ULONG)0x574E5433) +#define SAL_DRIVERDATA_VERSION_A 1 +#define SAL_DRIVERDATA_VERSION_W 2 + +#pragma pack( 1 ) + +struct SalDriverData +{ + ULONG mnSysSignature; + USHORT mnVersion; + USHORT mnDriverOffset; + BYTE maDriverData[1]; +}; + +#pragma pack() + +// --------------------- +// - WinSalInfoPrinter - +// --------------------- + +class WinSalGraphics; + +class WinSalInfoPrinter : public SalInfoPrinter +{ +public: + WinSalGraphics* mpGraphics; // current Printer graphics + XubString maDriverName; // printer driver name + XubString maDeviceName; // printer device name + XubString maPortName; // printer port name + HDC mhDC; // printer hdc + BOOL mbGraphics; // is Graphics used +public: + WinSalInfoPrinter(); + virtual ~WinSalInfoPrinter(); + + virtual SalGraphics* GetGraphics(); + virtual void ReleaseGraphics( SalGraphics* pGraphics ); + virtual BOOL Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ); + virtual BOOL SetPrinterData( ImplJobSetup* pSetupData ); + virtual BOOL SetData( ULONG nFlags, ImplJobSetup* pSetupData ); + virtual void GetPageInfo( const ImplJobSetup* pSetupData, + long& rOutWidth, long& rOutHeight, + long& rPageOffX, long& rPageOffY, + long& rPageWidth, long& rPageHeight ); + virtual ULONG GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType ); + virtual ULONG GetPaperBinCount( const ImplJobSetup* pSetupData ); + virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin ); + virtual void InitPaperFormats( const ImplJobSetup* pSetupData ); + virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData ); +}; + +// ----------------- +// - WinSalPrinter - +// ----------------- + +class WinSalPrinter : public SalPrinter +{ +public: + WinSalGraphics* mpGraphics; // current Printer graphics + WinSalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter + WinSalPrinter* mpNextPrinter; // next printing printer + HDC mhDC; // printer hdc + ULONG mnError; // Error Code + ULONG mnCopies; // Kopien + BOOL mbCollate; // Sortierte Kopien + BOOL mbAbort; // Job Aborted + + bool mbValid; + +public: + WinSalPrinter(); + virtual ~WinSalPrinter(); + + using SalPrinter::StartJob; + virtual BOOL StartJob( const XubString* pFileName, + const XubString& rJobName, + const XubString& rAppName, + ULONG nCopies, + bool bCollate, + bool bDirect, + ImplJobSetup* pSetupData ); + virtual BOOL EndJob(); + virtual BOOL AbortJob(); + virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData ); + virtual BOOL EndPage(); + virtual ULONG GetErrorCode(); + + void markInvalid(); + bool isValid() const { return mbValid; } +}; + +#endif // _SV_SALPRN_H diff --git a/vcl/inc/win/salsys.h b/vcl/inc/win/salsys.h new file mode 100755 index 000000000000..f1848b72cee2 --- /dev/null +++ b/vcl/inc/win/salsys.h @@ -0,0 +1,92 @@ +/************************************************************************* + * + * 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 _SV_SALSYS_H +#define _SV_SALSYS_H + +#include + +#include +#include + +class WinSalSystem : public SalSystem +{ + public: + struct DisplayMonitor + { + rtl::OUString m_aName; + rtl::OUString m_aDeviceName; + Rectangle m_aArea; + Rectangle m_aWorkArea; + sal_Int32 m_nStateFlags; + + DisplayMonitor() : m_nStateFlags( 0 ) {} + DisplayMonitor( const rtl::OUString& rName, + const rtl::OUString& rDevName, + const Rectangle& rArea, + const Rectangle& rWorkArea, + DWORD nStateFlags ) + : m_aName( rName ), + m_aDeviceName( rDevName ), + m_aArea( rArea ), + m_aWorkArea( rWorkArea ), + m_nStateFlags( nStateFlags ) + { + } + ~DisplayMonitor() {} + }; + private: + std::vector m_aMonitors; + std::map m_aDeviceNameToMonitor; + unsigned int m_nPrimary; +public: + WinSalSystem() : m_nPrimary( 0 ) {} + virtual ~WinSalSystem(); + + virtual unsigned int GetDisplayScreenCount(); + virtual bool IsMultiDisplay(); + virtual unsigned int GetDefaultDisplayNumber(); + virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ); + virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen ); + virtual rtl::OUString GetScreenName( unsigned int nScreen ); + virtual int ShowNativeMessageBox( const String& rTitle, + const String& rMessage, + int nButtonCombination, + int nDefaultButton); + bool initMonitors(); + // discards monitorinfo; used by WM_DISPLAYCHANGED handler + void clearMonitors(); + const std::vector& getMonitors() + { initMonitors(); return m_aMonitors;} + + BOOL handleMonitorCallback( sal_IntPtr /*HMONITOR*/, + sal_IntPtr /*HDC*/, + sal_IntPtr /*LPRECT*/ ); +}; + +#endif // _SV_SALSYS_H + diff --git a/vcl/inc/win/saltimer.h b/vcl/inc/win/saltimer.h new file mode 100755 index 000000000000..88707ef41ad1 --- /dev/null +++ b/vcl/inc/win/saltimer.h @@ -0,0 +1,44 @@ +/************************************************************************* + * + * 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 _SV_SALTIMER_H +#define _SV_SALTIMER_H + +#include + +class WinSalTimer : public SalTimer +{ +public: + WinSalTimer() {} + virtual ~WinSalTimer(); + + // overload all pure virtual methods + void Start( ULONG nMS ); + void Stop(); +}; + +#endif diff --git a/vcl/inc/win/salvd.h b/vcl/inc/win/salvd.h new file mode 100755 index 000000000000..665d6b1c3a9c --- /dev/null +++ b/vcl/inc/win/salvd.h @@ -0,0 +1,60 @@ +/************************************************************************* + * + * 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 _SV_SALVD_H +#define _SV_SALVD_H + +#include + +class WinSalGraphics; + +// ----------------- +// - SalVirDevData - +// ----------------- + +class WinSalVirtualDevice : public SalVirtualDevice +{ +public: + HDC mhDC; // HDC or 0 for Cache Device + HBITMAP mhBmp; // Memory Bitmap + HBITMAP mhDefBmp; // Default Bitmap + WinSalGraphics* mpGraphics; // current VirDev graphics + WinSalVirtualDevice* mpNext; // next VirDev + USHORT mnBitCount; // BitCount (0 or 1) + BOOL mbGraphics; // is Graphics used + BOOL mbForeignDC; // uses a foreign DC instead of a bitmap + + WinSalVirtualDevice(); + virtual ~WinSalVirtualDevice(); + + virtual SalGraphics* GetGraphics(); + virtual void ReleaseGraphics( SalGraphics* pGraphics ); + virtual BOOL SetSize( long nNewDX, long nNewDY ); + virtual void GetSize( long& rWidth, long& rHeight ); +}; + +#endif // _SV_SALVD_H diff --git a/vcl/inc/win/svsys.h b/vcl/inc/win/svsys.h new file mode 100644 index 000000000000..7b0e87304d59 --- /dev/null +++ b/vcl/inc/win/svsys.h @@ -0,0 +1,33 @@ +/************************************************************************* + * + * 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 _SV_SVSYS_H +#define _SV_SVSYS_H + +#include + +#endif // _SV_SVSYS_H diff --git a/vcl/inc/win/wincomp.hxx b/vcl/inc/win/wincomp.hxx new file mode 100755 index 000000000000..d9c218d193ac --- /dev/null +++ b/vcl/inc/win/wincomp.hxx @@ -0,0 +1,263 @@ +/************************************************************************* + * + * 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 _SV_WINCOMP_HXX +#define _SV_WINCOMP_HXX + +#ifndef _STRING_H +#include +#endif + +// ---------- +// - Strict - +// ---------- + +// Anpassungen fuer TypeChecking + +inline HPEN SelectPen( HDC hDC, HPEN hPen ) +{ + return (HPEN)SelectObject( hDC, (HGDIOBJ)hPen ); +} + +inline void DeletePen( HPEN hPen ) +{ + DeleteObject( (HGDIOBJ)hPen ); +} + +inline HPEN GetStockPen( int nObject ) +{ + return (HPEN)GetStockObject( nObject ); +} + +inline HBRUSH SelectBrush( HDC hDC, HBRUSH hBrush ) +{ + return (HBRUSH)SelectObject( hDC, (HGDIOBJ)hBrush ); +} + +inline void DeleteBrush( HBRUSH hBrush ) +{ + DeleteObject( (HGDIOBJ)hBrush ); +} + +inline HBRUSH GetStockBrush( int nObject ) +{ + return (HBRUSH)GetStockObject( nObject ); +} + +inline HFONT SelectFont( HDC hDC, HFONT hFont ) +{ + return (HFONT)SelectObject( hDC, (HGDIOBJ)hFont ); +} + +inline void DeleteFont( HFONT hFont ) +{ + DeleteObject( (HGDIOBJ)hFont ); +} + +inline HFONT GetStockFont( int nObject ) +{ + return (HFONT)GetStockObject( nObject ); +} + +inline HBITMAP SelectBitmap( HDC hDC, HBITMAP hBitmap ) +{ + return (HBITMAP)SelectObject( hDC, (HGDIOBJ)hBitmap ); +} + +inline void DeleteBitmap( HBITMAP hBitmap ) +{ + DeleteObject( (HGDIOBJ)hBitmap ); +} + +inline void DeleteRegion( HRGN hRegion ) +{ + DeleteObject( (HGDIOBJ)hRegion ); +} + +inline HPALETTE GetStockPalette( int nObject ) +{ + return (HPALETTE)GetStockObject( nObject ); +} + +inline void DeletePalette( HPALETTE hPalette ) +{ + DeleteObject( (HGDIOBJ)hPalette ); +} + +inline void SetWindowStyle( HWND hWnd, DWORD nStyle ) +{ + SetWindowLong( hWnd, GWL_STYLE, nStyle ); +} + +inline DWORD GetWindowStyle( HWND hWnd ) +{ + return GetWindowLong( hWnd, GWL_STYLE ); +} + +inline void SetWindowExStyle( HWND hWnd, DWORD nStyle ) +{ + SetWindowLong( hWnd, GWL_EXSTYLE, nStyle ); +} + +inline DWORD GetWindowExStyle( HWND hWnd ) +{ + return GetWindowLong( hWnd, GWL_EXSTYLE ); +} + +inline WIN_BOOL IsMinimized( HWND hWnd ) +{ + return IsIconic( hWnd ); +} + +inline WIN_BOOL IsMaximized( HWND hWnd ) +{ + return IsZoomed( hWnd ); +} + +inline void SetWindowFont( HWND hWnd, HFONT hFont, WIN_BOOL bRedraw ) +{ + SendMessage( hWnd, WM_SETFONT, (WPARAM)hFont, MAKELPARAM((UINT)bRedraw,0) ); +} + +inline HFONT GetWindowFont( HWND hWnd ) +{ + return (HFONT)(UINT)SendMessage( hWnd, WM_GETFONT, 0, 0 ); +} + +inline void SetClassCursor( HWND hWnd, HCURSOR hCursor ) +{ + SetClassLong( hWnd, GCL_HCURSOR, (DWORD)hCursor ); +} + +inline HCURSOR GetClassCursor( HWND hWnd ) +{ + return (HCURSOR)GetClassLong( hWnd, GCL_HCURSOR ); +} + +inline void SetClassIcon( HWND hWnd, HICON hIcon ) +{ + SetClassLong( hWnd, GCL_HICON, (DWORD)hIcon ); +} + +inline HICON GetClassIcon( HWND hWnd ) +{ + return (HICON)GetClassLong( hWnd, GCL_HICON ); +} + +inline HBRUSH SetClassBrush( HWND hWnd, HBRUSH hBrush ) +{ + return (HBRUSH)SetClassLong( hWnd, GCL_HBRBACKGROUND, (DWORD)hBrush ); +} + +inline HBRUSH GetClassBrush( HWND hWnd ) +{ + return (HBRUSH)GetClassLong( hWnd, GCL_HBRBACKGROUND ); +} + +inline HINSTANCE GetWindowInstance( HWND hWnd ) +{ + return (HINSTANCE)GetWindowLong( hWnd, GWL_HINSTANCE ); +} + +// ------------------------ +// - ZMouse Erweiterungen - +// ------------------------ + +#define MSH_MOUSEWHEEL "MSWHEEL_ROLLMSG" + +#define MOUSEZ_CLASSNAME "MouseZ" // wheel window class +#define MOUSEZ_TITLE "Magellan MSWHEEL" // wheel window title + +#define MSH_WHEELMODULE_CLASS (MOUSEZ_CLASSNAME) +#define MSH_WHEELMODULE_TITLE (MOUSEZ_TITLE) + +#define MSH_SCROLL_LINES "MSH_SCROLL_LINES_MSG" + +#ifndef WHEEL_DELTA +#define WHEEL_DELTA 120 +#endif +#ifndef WM_MOUSEWHEEL +#define WM_MOUSEWHEEL 0x020A +#endif +#ifndef SPI_GETWHEELSCROLLLINES +#define SPI_GETWHEELSCROLLLINES 104 +#endif +#ifndef SPI_SETWHEELSCROLLLINES +#define SPI_SETWHEELSCROLLLINES 105 +#endif +#ifndef WHEEL_PAGESCROLL +#define WHEEL_PAGESCROLL (UINT_MAX) +#endif + + +// ----------------------------- +// - SystemAgent Erweiterungen - +// ----------------------------- + +#define ENABLE_AGENT 1 +#define DISABLE_AGENT 2 +#define GET_AGENT_STATUS 3 +typedef int (APIENTRY* SysAgt_Enable_PROC)( int ); + +// --------------------- +// - 5.0-Erweiterungen - +// --------------------- + +#ifndef COLOR_GRADIENTACTIVECAPTION +#define COLOR_GRADIENTACTIVECAPTION 27 +#endif +#ifndef COLOR_GRADIENTINACTIVECAPTION +#define COLOR_GRADIENTINACTIVECAPTION 28 +#endif + +#ifndef SPI_GETFLATMENU +#define SPI_GETFLATMENU 0x1022 +#endif +#ifndef COLOR_MENUBAR +#define COLOR_MENUBAR 30 +#endif +#ifndef COLOR_MENUHILIGHT +#define COLOR_MENUHILIGHT 29 +#endif + +#ifndef CS_DROPSHADOW +#define CS_DROPSHADOW 0x00020000 +#endif + +// ------------------------------------------------------- +// MT 12/03: From winuser.h, only needed in salframe.cxx +// Better change salframe.cxx to include winuser.h +// ------------------------------------------------------- + +#define WS_EX_LAYERED 0x00080000 + +#ifndef WM_UNICHAR +#define WM_UNICHAR 0x0109 +#define UNICODE_NOCHAR 0xFFFF +#endif + +#endif // _SV_WINCOMP_HXX diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx old mode 100644 new mode 100755 index f5fa628b3c28..fe8dd9607834 --- a/vcl/source/app/dbggui.cxx +++ b/vcl/source/app/dbggui.cxx @@ -54,9 +54,6 @@ #include "vcl/sound.hxx" #include "vcl/threadex.hxx" -#ifdef WNT -#undef min -#endif #include "svdata.hxx" #include "dbggui.hxx" @@ -65,7 +62,7 @@ #include "salinst.hxx" #include "svdata.hxx" -// #include "svsys.h" +#include "svsys.h" #include "com/sun/star/i18n/XCharacterClassification.hpp" @@ -630,10 +627,9 @@ BOOL DbgWindow::Close() // remember window position ByteString aState( GetWindowState() ); DbgData* pData = DbgGetData(); - strncpy( pData->aDbgWinState, - aState.GetBuffer(), - std::min( sizeof( pData->aDbgWinState ), - size_t(aState.Len() + 1U )) ); + size_t nCopy = (sizeof( pData->aDbgWinState ) < size_t(aState.Len() + 1U )) + ? sizeof( pData->aDbgWinState ) : size_t(aState.Len() + 1U ); + strncpy( pData->aDbgWinState, aState.GetBuffer(), nCopy ); pData->aDbgWinState[ sizeof( pData->aDbgWinState ) - 1 ] = 0; // and save for next session DbgSaveData( *pData ); diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx old mode 100644 new mode 100755 index 195f3cf6dc42..001b4e0b4043 --- a/vcl/source/gdi/outdev.cxx +++ b/vcl/source/gdi/outdev.cxx @@ -42,6 +42,8 @@ #include #include #include +// declare system types in sysdata.hxx +#include #include #include diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx old mode 100644 new mode 100755 index cfee741657e1..9478ff40dad6 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -51,6 +51,8 @@ #include "vcl/bmpacc.hxx" #include "vcl/outdev.hxx" #include "vcl/edit.hxx" +// declare system types in sysdata.hxx +#include #include "vcl/sysdata.hxx" #include "vcl/unohelp.hxx" #include "vcl/controllayout.hxx" diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx old mode 100644 new mode 100755 index 513f0a39dff7..8eca0ad09b89 --- a/vcl/source/window/syschild.cxx +++ b/vcl/source/window/syschild.cxx @@ -33,6 +33,9 @@ #include +// declare system types in sysdata.hxx +#include + #include #include #include diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx old mode 100644 new mode 100755 index 021b7e53402c..509d53638f77 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -53,6 +53,9 @@ #include #include #include +#if defined WNT +#include +#endif #include #include diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx old mode 100644 new mode 100755 index 9b4af1f01503..fdc3f20fea06 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -49,7 +49,6 @@ #include "vcl/wrkwin.hxx" #include "vcl/wall.hxx" #include "vcl/gradient.hxx" -#include "vcl/sysdata.hxx" #include "vcl/salctype.hxx" #include "vcl/button.hxx" #include "vcl/taskpanelist.hxx" @@ -59,6 +58,10 @@ #include "vcl/pdfextoutdevdata.hxx" #include "vcl/lazydelete.hxx" +// declare system types in sysdata.hxx +#include "svsys.h" +#include "vcl/sysdata.hxx" + #include "salframe.hxx" #include "salobj.hxx" #include "salinst.hxx" @@ -9676,7 +9679,7 @@ BOOL Window::IsNativeWidgetEnabled() const } #ifdef WNT // see #140456# -#include +#include #endif Reference< rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscreenSize, diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx old mode 100644 new mode 100755 index cd3522d431f4..0b62236430bf --- a/vcl/source/window/wrkwin.cxx +++ b/vcl/source/window/wrkwin.cxx @@ -33,6 +33,8 @@ #include #include +// declare system types in sysdata.hxx +#include #include #include diff --git a/vcl/win/inc/salbmp.h b/vcl/win/inc/salbmp.h deleted file mode 100644 index 7a31add2ae19..000000000000 --- a/vcl/win/inc/salbmp.h +++ /dev/null @@ -1,88 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SALBMP_H -#define _SV_SALBMP_H - -#include -#include -#include -#include - -// -------------- -// - SalBitmap - -// -------------- - -struct BitmapBuffer; -class BitmapColor; -class BitmapPalette; -class SalGraphics; - -class WinSalBitmap : public SalBitmap -{ -private: - - Size maSize; - HGLOBAL mhDIB; - HBITMAP mhDDB; - USHORT mnBitCount; - -public: - - HGLOBAL ImplGethDIB() const { return mhDIB; } - HBITMAP ImplGethDDB() const { return mhDDB; } - - static HGLOBAL ImplCreateDIB( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ); - static HANDLE ImplCopyDIBOrDDB( HANDLE hHdl, bool bDIB ); - static USHORT ImplGetDIBColorCount( HGLOBAL hDIB ); - static void ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf, - const Size& rSizePixel, bool bRLE4 ); - -public: - - WinSalBitmap(); - virtual ~WinSalBitmap(); - -public: - - bool Create( HANDLE hBitmap, bool bDIB, bool bCopyHandle ); - virtual bool Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ); - virtual bool Create( const SalBitmap& rSalBmpImpl ); - virtual bool Create( const SalBitmap& rSalBmpImpl, SalGraphics* pGraphics ); - virtual bool Create( const SalBitmap& rSalBmpImpl, USHORT nNewBitCount ); - - virtual void Destroy(); - - virtual Size GetSize() const { return maSize; } - virtual USHORT GetBitCount() const { return mnBitCount; } - - virtual BitmapBuffer* AcquireBuffer( bool bReadOnly ); - virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ); - virtual bool GetSystemData( BitmapSystemData& rData ); -}; - -#endif // _SV_SALBMP_HXX diff --git a/vcl/win/inc/saldata.hxx b/vcl/win/inc/saldata.hxx deleted file mode 100755 index 48180bbe185b..000000000000 --- a/vcl/win/inc/saldata.hxx +++ /dev/null @@ -1,379 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SALDATA_HXX -#define _SV_SALDATA_HXX - -#include -#include -#include -#include - -#include "osl/module.h" - -#include // for hMenu validation -#include - -class AutoTimer; -class WinSalInstance; -class WinSalObject; -class WinSalFrame; -class WinSalVirtualDevice; -class WinSalPrinter; -class Font; -struct HDCCache; -struct TempFontItem; - -typedef HRESULT (WINAPI *DwmIsCompositionEnabled_ptr)(WIN_BOOL*); - -// -------------------- -// - Standard-Defines - -// -------------------- - -#define MAX_STOCKPEN 4 -#define MAX_STOCKBRUSH 4 -#define SAL_CLIPRECT_COUNT 16 - -// -------------------- -// - Icon cache - -// -------------------- - -struct SalIcon -{ - int nId; - HICON hIcon; - HICON hSmallIcon; - SalIcon *pNext; -}; - -// ----------- -// - SalData - -// ----------- - -class SalData -{ -public: - SalData(); - ~SalData(); - - // native widget framework - void initNWF(); - void deInitNWF(); - - // fill maVKMap; - void initKeyCodeMap(); - - // checks if the menuhandle was created by VCL - BOOL IsKnownMenuHandle( HMENU hMenu ); - -public: - HINSTANCE mhInst; // default instance handle - HINSTANCE mhPrevInst; // previous instance handle - int mnCmdShow; // default frame show style - HPALETTE mhDitherPal; // dither palette - HGLOBAL mhDitherDIB; // dither memory handle - BYTE* mpDitherDIB; // dither memory - BYTE* mpDitherDIBData; // beginning of DIB data - long* mpDitherDiff; // Dither mapping table - BYTE* mpDitherLow; // Dither mapping table - BYTE* mpDitherHigh; // Dither mapping table - ULONG mnTimerMS; // Current Time (in MS) of the Timer - ULONG mnTimerOrgMS; // Current Original Time (in MS) - DWORD mnNextTimerTime; - DWORD mnLastEventTime; - UINT mnTimerId; // windows timer id - BOOL mbInTimerProc; // timer event is currently being dispatched - HHOOK mhSalObjMsgHook; // hook to get interesting msg for SalObject - HWND mhWantLeaveMsg; // window handle, that want a MOUSELEAVE message - AutoTimer* mpMouseLeaveTimer; // Timer for MouseLeave Test - WinSalInstance* mpFirstInstance; // pointer of first instance - WinSalFrame* mpFirstFrame; // pointer of first frame - WinSalObject* mpFirstObject; // pointer of first object window - WinSalVirtualDevice* mpFirstVD; // first VirDev - WinSalPrinter* mpFirstPrinter; // first printing printer - HDCCache* mpHDCCache; // Cache for three DC's - HBITMAP mh50Bmp; // 50% Bitmap - HBRUSH mh50Brush; // 50% Brush - COLORREF maStockPenColorAry[MAX_STOCKPEN]; - COLORREF maStockBrushColorAry[MAX_STOCKBRUSH]; - HPEN mhStockPenAry[MAX_STOCKPEN]; - HBRUSH mhStockBrushAry[MAX_STOCKBRUSH]; - USHORT mnStockPenCount; // count of static pens - USHORT mnStockBrushCount; // count of static brushes - WPARAM mnSalObjWantKeyEvt; // KeyEvent, welcher vom SalObj-Hook verarbeitet werden soll - BYTE mnCacheDCInUse; // count of CacheDC in use - BOOL mbObjClassInit; // is SALOBJECTCLASS initialised - BOOL mbInPalChange; // is in WM_QUERYNEWPALETTE - DWORD mnAppThreadId; // Id from Applikation-Thread - WIN_BOOL mbScrSvrEnabled; // ScreenSaver enabled - int mnSageStatus; // status of Sage-DLL (DISABLE_AGENT == nicht vorhanden) - SysAgt_Enable_PROC mpSageEnableProc; // funktion to deactivate the system agent - SalIcon* mpFirstIcon; // icon cache, points to first icon, NULL if none - TempFontItem* mpTempFontItem; - BOOL mbThemeChanged; // true if visual theme was changed: throw away theme handles - BOOL mbThemeMenuSupport; - - // for GdiPlus GdiplusStartup/GdiplusShutdown - ULONG_PTR gdiplusToken; - - std::set< HMENU > mhMenuSet; // keeps track of menu handles created by VCL, used by IsKnownMenuHandle() - std::map< UINT,USHORT > maVKMap; // map some dynamic VK_* entries - oslModule maDwmLib; - DwmIsCompositionEnabled_ptr mpDwmIsCompositionEnabled; -}; - -inline void SetSalData( SalData* pData ) { ImplGetSVData()->mpSalData = (void*)pData; } -inline SalData* GetSalData() { return (SalData*)ImplGetSVData()->mpSalData; } -inline SalData* GetAppSalData() { return (SalData*)ImplGetAppSVData()->mpSalData; } - -// -------------- -// - SalShlData - -// -------------- - -struct SalShlData -{ - HINSTANCE mhInst; // Instance of SAL-DLL - UINT mnWheelScrollLines; // WheelScrollLines - UINT mnWheelScrollChars; // WheelScrollChars - UINT mnWheelMsgId; // Wheel-Message-Id fuer W95 - WORD mnVersion; // System-Version (311 == 3.11) - WIN_BOOL mbW40; // Is System-Version >= 4.0 - WIN_BOOL mbWXP; // Windows XP - WIN_BOOL mbWPrinter; // true: use unicode printer functions - // false: use anis compat printer functions - OSVERSIONINFO maVersionInfo; -}; - -extern SalShlData aSalShlData; - -// ------------ -// - GDICache - -// ------------ - -#define CACHESIZE_HDC 3 -#define CACHED_HDC_1 0 -#define CACHED_HDC_2 1 -#define CACHED_HDC_DRAW 2 -#define CACHED_HDC_DEFEXT 64 - -struct HDCCache -{ - HDC mhDC; - HPALETTE mhDefPal; - HBITMAP mhDefBmp; - HBITMAP mhSelBmp; - HBITMAP mhActBmp; -}; - -void ImplClearHDCCache( SalData* pData ); -HDC ImplGetCachedDC( ULONG nID, HBITMAP hBmp = 0 ); -void ImplReleaseCachedDC( ULONG nID ); - -bool ImplAddTempFont( SalData&, const String& rFontFileURL ); -void ImplReleaseTempFonts( SalData& ); - -// -------------------------------------------- -// - SALSHL.CXX - for accessing DLL resources - -// -------------------------------------------- - -HCURSOR ImplLoadSalCursor( int nId ); -HBITMAP ImplLoadSalBitmap( int nId ); -BOOL ImplLoadSalIcon( int nId, HICON& rIcon, HICON& rSmallIcon ); - -// SALGDI.CXX -void ImplInitSalGDI(); -void ImplFreeSalGDI(); - -// -------------- -// - Prototypes - -// -------------- - -// \\WIN\SOURCE\APP\SALINST.CXX -void ImplSalYieldMutexAcquireWithWait(); -BOOL ImplSalYieldMutexTryToAcquire(); -void ImplSalYieldMutexAcquire(); -void ImplSalYieldMutexRelease(); -ULONG ImplSalReleaseYieldMutex(); -void ImplSalAcquireYieldMutex( ULONG nCount ); -sal_Bool ImplInterceptChildWindowKeyDown( MSG& rMsg ); - -// \\WIN\SOURCE\WINDOW\SALFRAME.CXX -LRESULT CALLBACK SalFrameWndProcA( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ); -LRESULT CALLBACK SalFrameWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ); -// \SV\WIN\SOURCE\APP\SALTIMER.CXX -#define SALTIMERPROC_RECURSIVE 0xffffffff -void CALLBACK SalTimerProc( HWND hWnd, UINT nMsg, UINT_PTR nId, DWORD nTime ); - -// \WIN\SOURCE\WINDOW\SALFRAME.CXX -void SalTestMouseLeave(); -BOOL ImplWriteLastError( DWORD lastError, const char *szApiCall ); - -// \WIN\SOURCE\WINDOW\SALFRAME.CXX -long ImplHandleSalObjKeyMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ); -long ImplHandleSalObjSysCharMsg( HWND hWnd, WPARAM wParam, LPARAM lParam ); -BOOL ImplHandleGlobalMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT& rlResult ); - -// \WIN\SOURCE\WINDOW\SALOBJ.CXX -WinSalObject* ImplFindSalObject( HWND hWndChild ); -BOOL ImplSalPreDispatchMsg( MSG* pMsg ); -void ImplSalPostDispatchMsg( MSG* pMsg, LRESULT nDispatchResult ); - -// \WIN\SOURCE\GDI\SALGDI3.CXX -void ImplSalLogFontToFontA( HDC hDC, const LOGFONTA& rLogFont, Font& rFont ); -void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW& rLogFont, Font& rFont ); -bool ImplIsFontAvailable( HDC hDC, const UniString& rName ); - -// \WIN\SOURCE\APP\SALDATA.CXX -rtl_TextEncoding ImplSalGetSystemEncoding(); -ByteString ImplSalGetWinAnsiString( const UniString& rStr, BOOL bFileName = FALSE ); -UniString ImplSalGetUniString( const sal_Char* pStr, xub_StrLen nLen = STRING_LEN ); -int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 ); - -// ----------- -// - Defines - -// ----------- - -#define SAL_FRAME_WNDEXTRA sizeof( DWORD ) -#define SAL_FRAME_THIS 0 -#define SAL_FRAME_CLASSNAMEA "SALFRAME" -#define SAL_FRAME_CLASSNAMEW L"SALFRAME" -#define SAL_SUBFRAME_CLASSNAMEA "SALSUBFRAME" -#define SAL_SUBFRAME_CLASSNAMEW L"SALSUBFRAME" -#define SAL_TMPSUBFRAME_CLASSNAMEW L"SALTMPSUBFRAME" -#define SAL_OBJECT_WNDEXTRA sizeof( DWORD ) -#define SAL_OBJECT_THIS 0 -#define SAL_OBJECT_CLASSNAMEA "SALOBJECT" -#define SAL_OBJECT_CLASSNAMEW L"SALOBJECT" -#define SAL_OBJECT_CHILDCLASSNAMEA "SALOBJECTCHILD" -#define SAL_OBJECT_CHILDCLASSNAMEW L"SALOBJECTCHILD" -#define SAL_COM_CLASSNAMEA "SALCOMWND" -#define SAL_COM_CLASSNAMEW L"SALCOMWND" - -#define SAL_MOUSELEAVE_TIMEOUT 300 - -// wParam == hDC; lParam == 0 -#define SAL_MSG_PRINTABORTJOB (WM_USER+110) -// wParam == bWait; lParam == 0 -#define SAL_MSG_THREADYIELD (WM_USER+111) -// wParam == 0; lParam == 0 -#define SAL_MSG_RELEASEWAITYIELD (WM_USER+112) -// wParam == 0; lParam == nMS -#define SAL_MSG_STARTTIMER (WM_USER+113) -// wParam == nFrameStyle; lParam == pParent; lResult == pFrame -#define SAL_MSG_CREATEFRAME (WM_USER+114) -// wParam == 0; lParam == 0 -#define SAL_MSG_DESTROYFRAME (WM_USER+115) -// wParam == 0; lParam == pParent; lResult == pObject -#define SAL_MSG_CREATEOBJECT (WM_USER+116) -// wParam == 0; lParam == pObject; -#define SAL_MSG_DESTROYOBJECT (WM_USER+117) -// wParam == hWnd; lParam == 0; lResult == hDC -#define SAL_MSG_GETDC (WM_USER+120) -// wParam == hWnd; lParam == 0 -#define SAL_MSG_RELEASEDC (WM_USER+121) -// wParam == newParentHwnd; lParam == oldHwnd; lResult == newhWnd -#define SAL_MSG_RECREATEHWND (WM_USER+122) -// wParam == newParentHwnd; lParam == oldHwnd; lResult == newhWnd -#define SAL_MSG_RECREATECHILDHWND (WM_USER+123) -// wParam == 0; lParam == HWND; -#define SAL_MSG_DESTROYHWND (WM_USER+124) - -// wParam == 0; lParam == pData -#define SAL_MSG_USEREVENT (WM_USER+130) -// wParam == 0; lParam == MousePosition relativ to upper left of screen -#define SAL_MSG_MOUSELEAVE (WM_USER+131) -// NULL-Message, soll nicht verarbeitet werden -#define SAL_MSG_DUMMY (WM_USER+132) -// wParam == 0; lParam == 0 -#define SAL_MSG_POSTFOCUS (WM_USER+133) -// wParam == wParam; lParam == lParam -#define SAL_MSG_POSTQUERYNEWPAL (WM_USER+134) -// wParam == wParam; lParam == lParam -#define SAL_MSG_POSTPALCHANGED (WM_USER+135) -// wParam == wParam; lParam == lParam -#define SAL_MSG_POSTMOVE (WM_USER+136) -// wParam == wParam; lParam == lParam -#define SAL_MSG_POSTCALLSIZE (WM_USER+137) -// wParam == pRECT; lParam == 0 -#define SAL_MSG_POSTPAINT (WM_USER+138) -// wParam == 0; lParam == pFrame; lResult 0 -#define SAL_MSG_FORCEPALETTE (WM_USER+139) -// wParam == 0; lParam == 0 -#define SAL_MSG_CAPTUREMOUSE (WM_USER+140) -// wParam == 0; lParam == 0 -#define SAL_MSG_RELEASEMOUSE (WM_USER+141) -// wParam == nFlags; lParam == 0 -#define SAL_MSG_TOTOP (WM_USER+142) -// wParam == bVisible; lParam == 0 -#define SAL_MSG_SHOW (WM_USER+143) -// wParam == 0; lParam == SalInputContext -#define SAL_MSG_SETINPUTCONTEXT (WM_USER+144) -// wParam == nFlags; lParam == 0 -#define SAL_MSG_ENDEXTTEXTINPUT (WM_USER+145) -// POSTTIMER-Message; wparam = 0, lParam == time -#define SAL_MSG_POSTTIMER (WM_USER+161) - -// SysChild-ToTop; wParam = 0; lParam = 0 -#define SALOBJ_MSG_TOTOP (WM_USER+160) -// POSTFOCUS-Message; wParam == bFocus; lParam == 0 -#define SALOBJ_MSG_POSTFOCUS (WM_USER+161) - - -// ----------------- -// - Helpfunctions - -// ----------------- - -// A/W-Wrapper -LONG ImplSetWindowLong( HWND hWnd, int nIndex, DWORD dwNewLong ); -LONG ImplGetWindowLong( HWND hWnd, int nIndex ); -WIN_BOOL ImplPostMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam ); -WIN_BOOL ImplSendMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam ); -WIN_BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax ); -WIN_BOOL ImplPeekMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg ); -LONG ImplDispatchMessage( CONST MSG *lpMsg ); - -inline void SetWindowPtr( HWND hWnd, WinSalFrame* pThis ) -{ - ImplSetWindowLong( hWnd, SAL_FRAME_THIS, (LONG)pThis ); -} - -inline WinSalFrame* GetWindowPtr( HWND hWnd ) -{ - return (WinSalFrame*)ImplGetWindowLong( hWnd, SAL_FRAME_THIS ); -} - -inline void SetSalObjWindowPtr( HWND hWnd, WinSalObject* pThis ) -{ - ImplSetWindowLong( hWnd, SAL_OBJECT_THIS, (LONG)pThis ); -} - -inline WinSalObject* GetSalObjWindowPtr( HWND hWnd ) -{ - return (WinSalObject*)ImplGetWindowLong( hWnd, SAL_OBJECT_THIS ); -} - -#endif // _SV_SALDATA_HXX diff --git a/vcl/win/inc/salframe.h b/vcl/win/inc/salframe.h deleted file mode 100644 index f9aa8ef9dc4b..000000000000 --- a/vcl/win/inc/salframe.h +++ /dev/null @@ -1,150 +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 _SV_SALFRAME_H -#define _SV_SALFRAME_H - -#include -#include -#include - -class WinSalGraphics; - -// ---------------- -// - WinSalFrame - -// ---------------- - -class WinSalFrame : public SalFrame -{ -public: - HWND mhWnd; // Window handle - HCURSOR mhCursor; // cursor handle - HIMC mhDefIMEContext; // default IME-Context - WinSalGraphics* mpGraphics; // current frame graphics - WinSalGraphics* mpGraphics2; // current frame graphics for other threads - WinSalFrame* mpNextFrame; // pointer to next frame - HMENU mSelectedhMenu; // the menu where highlighting is currently going on - HMENU mLastActivatedhMenu; // the menu that was most recently opened - SystemEnvData maSysData; // system data - SalFrameState maState; // frame state - int mnShowState; // show state - long mnWidth; // client width in pixeln - long mnHeight; // client height in pixeln - int mnMinWidth; // min. client width in pixeln - int mnMinHeight; // min. client height in pixeln - int mnMaxWidth; // max. client width in pixeln - int mnMaxHeight; // max. client height in pixeln - RECT maFullScreenRect; // fullscreen rect - int mnFullScreenShowState; // fullscreen restore show state - UINT mnInputLang; // current Input Language - UINT mnInputCodePage; // current Input CodePage - ULONG mnStyle; // style - BOOL mbGraphics; // is Graphics used - BOOL mbCaption; // has window a caption - BOOL mbBorder; // has window a border - BOOL mbFixBorder; // has window a fixed border - BOOL mbSizeBorder; // has window a sizeable border - BOOL mbNoIcon; // is an window without an icon - BOOL mbFloatWin; // is a FloatingWindow - BOOL mbFullScreen; // TRUE: in full screen mode - BOOL mbPresentation; // TRUE: Presentation Mode running - BOOL mbInShow; // innerhalb eines Show-Aufrufs - BOOL mbRestoreMaximize; // Restore-Maximize - BOOL mbInMoveMsg; // Move-Message wird verarbeitet - BOOL mbInSizeMsg; // Size-Message wird verarbeitet - BOOL mbFullScreenToolWin; // WS_EX_TOOLWINDOW reset in FullScreenMode - BOOL mbDefPos; // default-position - BOOL mbOverwriteState; // TRUE: WindowState darf umgesetzt werden - BOOL mbIME; // TRUE: We are in IME Mode - BOOL mbHandleIME; // TRUE: Wir handeln die IME-Messages - BOOL mbSpezIME; // TRUE: Spez IME - BOOL mbAtCursorIME; // TRUE: Wir behandeln nur einige IME-Messages - BOOL mbCandidateMode; // TRUE: Wir befinden uns im Candidate-Modus - static BOOL mbInReparent; // TRUE: ignore focus lost and gain due to reparenting - - RGNDATA* mpClipRgnData; - RECT* mpNextClipRect; - BOOL mbFirstClipRect; - sal_Int32 mnDisplay; // Display used for Fullscreen, 0 is primary monitor - - void updateScreenNumber(); -public: - WinSalFrame(); - virtual ~WinSalFrame(); - - virtual SalGraphics* GetGraphics(); - virtual void ReleaseGraphics( SalGraphics* pGraphics ); - virtual BOOL PostEvent( void* pData ); - virtual void SetTitle( const XubString& rTitle ); - virtual void SetIcon( USHORT nIcon ); - virtual void SetMenu( SalMenu* pSalMenu ); - virtual void DrawMenuBar(); - virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ); - virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE ); - virtual void Enable( BOOL bEnable ); - virtual void SetMinClientSize( long nWidth, long nHeight ); - virtual void SetMaxClientSize( long nWidth, long nHeight ); - virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ); - virtual void GetClientSize( long& rWidth, long& rHeight ); - virtual void GetWorkArea( Rectangle& rRect ); - virtual SalFrame* GetParent() const; - virtual void SetWindowState( const SalFrameState* pState ); - virtual BOOL GetWindowState( SalFrameState* pState ); - virtual void ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay ); - virtual void StartPresentation( BOOL bStart ); - virtual void SetAlwaysOnTop( BOOL bOnTop ); - virtual void ToTop( USHORT nFlags ); - virtual void SetPointer( PointerStyle ePointerStyle ); - virtual void CaptureMouse( BOOL bMouse ); - virtual void SetPointerPos( long nX, long nY ); - using SalFrame::Flush; - virtual void Flush(); - virtual void Sync(); - virtual void SetInputContext( SalInputContext* pContext ); - virtual void EndExtTextInput( USHORT nFlags ); - virtual String GetKeyName( USHORT nKeyCode ); - virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode ); - virtual BOOL MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); - virtual LanguageType GetInputLanguage(); - virtual SalBitmap* SnapShot(); - virtual void UpdateSettings( AllSettings& rSettings ); - virtual void Beep( SoundType eSoundType ); - virtual const SystemEnvData* GetSystemData() const; - virtual SalPointerState GetPointerState(); - virtual void SetParent( SalFrame* pNewParent ); - virtual bool SetPluginParent( SystemParentData* pNewParent ); - virtual void SetBackgroundBitmap( SalBitmap* ); - virtual void SetScreenNumber( unsigned int ); - virtual void ResetClipRegion(); - virtual void BeginSetClipRegion( ULONG nRects ); - virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); - virtual void EndSetClipRegion(); -}; - -void ImplSalGetWorkArea( HWND hWnd, RECT *pRect, const RECT *pParentRect ); - -#endif // _SV_SALFRAME_H diff --git a/vcl/win/inc/salgdi.h b/vcl/win/inc/salgdi.h deleted file mode 100755 index f592f53ae29c..000000000000 --- a/vcl/win/inc/salgdi.h +++ /dev/null @@ -1,406 +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 _SV_SALGDI_H -#define _SV_SALGDI_H - -#include -#include -#include -#include -#include - -#include "boost/scoped_ptr.hpp" -#include - -class ImplFontSelectData; -class ImplWinFontEntry; -class ImplFontAttrCache; - -// ----------- -// - Defines - -// ----------- - -#define RGB_TO_PALRGB(nRGB) ((nRGB)|0x02000000) -#define PALRGB_TO_RGB(nPalRGB) ((nPalRGB)&0x00ffffff) - -// win32 platform specific options. Move them to the PMK file? - -#define GCP_KERN_HACK -#define GNG_VERT_HACK - -// win32 specific physically available font face -class ImplWinFontData : public ImplFontData -{ -public: - explicit ImplWinFontData( const ImplDevFontAttributes&, - int nFontHeight, WIN_BYTE eWinCharSet, - WIN_BYTE nPitchAndFamily ); - virtual ~ImplWinFontData(); - - virtual ImplFontData* Clone() const; - virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const; - virtual sal_IntPtr GetFontId() const; - void SetFontId( sal_IntPtr nId ) { mnId = nId; } - void UpdateFromHDC( HDC ) const; - - bool HasChar( sal_uInt32 cChar ) const; - - WIN_BYTE GetCharSet() const { return meWinCharSet; } - WIN_BYTE GetPitchAndFamily() const { return mnPitchAndFamily; } - bool IsGlyphApiDisabled() const { return mbDisableGlyphApi; } - bool SupportsKorean() const { return mbHasKoreanRange; } - bool SupportsCJK() const { return mbHasCJKSupport; } - bool SupportsArabic() const { return mbHasArabicSupport; } - bool AliasSymbolsHigh() const { return mbAliasSymbolsHigh; } - bool AliasSymbolsLow() const { return mbAliasSymbolsLow; } -#ifdef ENABLE_GRAPHITE - bool SupportsGraphite() const { return mbHasGraphiteSupport; } -#endif - - const ImplFontCharMap* GetImplFontCharMap() const; - const Ucs2SIntMap* GetEncodingVector() const { return mpEncodingVector; } - void SetEncodingVector( const Ucs2SIntMap* pNewVec ) const - { - if( mpEncodingVector ) - delete mpEncodingVector; - mpEncodingVector = pNewVec; - } -private: - sal_IntPtr mnId; - - // some members that are initalized lazily when the font gets selected into a HDC - mutable bool mbDisableGlyphApi; - mutable bool mbHasKoreanRange; - mutable bool mbHasCJKSupport; -#ifdef ENABLE_GRAPHITE - mutable bool mbHasGraphiteSupport; -#endif - mutable bool mbHasArabicSupport; - mutable ImplFontCharMap* mpUnicodeMap; - mutable const Ucs2SIntMap* mpEncodingVector; - - // TODO: get rid of the members below needed to work with the Win9x non-unicode API - BYTE* mpFontCharSets; // all Charsets for the current font (used on W98 for kerning) - BYTE mnFontCharSetCount; // Number of Charsets of the current font; 0 - if not queried - WIN_BYTE meWinCharSet; - WIN_BYTE mnPitchAndFamily; - bool mbAliasSymbolsHigh; - bool mbAliasSymbolsLow; -private: - void ReadCmapTable( HDC ) const; - void ReadOs2Table( HDC ) const; - -#ifdef GNG_VERT_HACK - void ReadGsubTable( HDC ) const; - - typedef std::hash_set UcsHashSet; - mutable UcsHashSet maGsubTable; - mutable bool mbGsubRead; -public: - bool HasGSUBstitutions( HDC ) const; - bool IsGSUBstituted( sal_UCS4 ) const; -#endif // GNG_VERT_HACK -}; - -// ------------------ -// - WinSalGraphics - -// ------------------ - -class WinSalGraphics : public SalGraphics -{ -public: - HDC mhDC; // HDC - HWND mhWnd; // Window-Handle, when Window-Graphics - HFONT mhFonts[ MAX_FALLBACK ]; // Font + Fallbacks - const ImplWinFontData* mpWinFontData[ MAX_FALLBACK ]; // pointer to the most recent font face - ImplWinFontEntry* mpWinFontEntry[ MAX_FALLBACK ]; // pointer to the most recent font instance - float mfFontScale; // allows metrics emulation of huge font sizes - HPEN mhPen; // Pen - HBRUSH mhBrush; // Brush - HRGN mhRegion; // Region Handle - HPEN mhDefPen; // DefaultPen - HBRUSH mhDefBrush; // DefaultBrush - HFONT mhDefFont; // DefaultFont - HPALETTE mhDefPal; // DefaultPalette - COLORREF mnPenColor; // PenColor - COLORREF mnBrushColor; // BrushColor - COLORREF mnTextColor; // TextColor - RGNDATA* mpClipRgnData; // ClipRegion-Data - RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data - RECT* mpNextClipRect; // Naechstes ClipRegion-Rect - BOOL mbFirstClipRect; // Flag for first cliprect to insert - LOGFONTA* mpLogFont; // LOG-Font which is currently selected (only W9x) - ImplFontAttrCache* mpFontAttrCache; // Cache font attributes from files in so/share/fonts - BYTE* mpFontCharSets; // All Charsets for the current font - BYTE mnFontCharSetCount; // Number of Charsets of the current font; 0 - if not queried - BOOL mbFontKernInit; // FALSE: FontKerns must be queried - KERNINGPAIR* mpFontKernPairs; // Kerning Pairs of the current Font - ULONG mnFontKernPairCount;// Number of Kerning Pairs of the current Font - int mnPenWidth; // Linienbreite - BOOL mbStockPen; // is Pen a stockpen - BOOL mbStockBrush; // is Brush a stcokbrush - BOOL mbPen; // is Pen (FALSE == NULL_PEN) - BOOL mbBrush; // is Brush (FALSE == NULL_BRUSH) - BOOL mbPrinter; // is Printer - BOOL mbVirDev; // is VirDev - BOOL mbWindow; // is Window - BOOL mbScreen; // is Screen compatible - bool mbXORMode; // _every_ output with RasterOp XOR - - // remember RGB values for SetLineColor/SetFillColor - SalColor maLineColor; - SalColor maFillColor; - - HFONT ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFontScale, HFONT& o_rOldFont ); - -public: - explicit WinSalGraphics(); - virtual ~WinSalGraphics(); - -protected: - virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ); - virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ); - // draw --> LineColor and FillColor and RasterOp and ClipRegion - virtual void drawPixel( long nX, long nY ); - virtual void drawPixel( long nX, long nY, SalColor nSalColor ); - virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ); - virtual void drawRect( long nX, long nY, long nWidth, long nHeight ); - virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry ); - virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry ); - virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry ); - virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency ); - virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin ); - virtual sal_Bool drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ); - virtual sal_Bool drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ); - virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry ); - - // CopyArea --> No RasterOp, but ClipRegion - virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, - long nSrcHeight, USHORT nFlags ); - - // CopyBits and DrawBitmap --> RasterOp and ClipRegion - // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics - virtual void copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics ); - virtual void drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap ); - virtual void drawBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - SalColor nTransparentColor ); - virtual void drawBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - const SalBitmap& rTransparentBitmap ); - virtual void drawMask( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - SalColor nMaskColor ); - - virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight ); - virtual SalColor getPixel( long nX, long nY ); - - // invert --> ClipRegion (only Windows or VirDevs) - virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags); - virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags ); - - virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ); - - // native widget rendering methods that require mirroring - virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, - const Point& aPos, BOOL& rIsInside ); - virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, - ControlState nState, const ImplControlValue& aValue, - const rtl::OUString& aCaption ); - virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, - ControlState nState, const ImplControlValue& aValue, - const rtl::OUString& aCaption ); - virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, - const ImplControlValue& aValue, const rtl::OUString& aCaption, - Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ); - - virtual bool drawAlphaBitmap( const SalTwoRect&, - const SalBitmap& rSourceBitmap, - const SalBitmap& rAlphaBitmap ); - virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency ); - -public: - // public SalGraphics methods, the interface to teh independent vcl part - - // get device resolution - virtual void GetResolution( long& rDPIX, long& rDPIY ); - // get the depth of the device - virtual USHORT GetBitCount(); - // get the width of the device - virtual long GetGraphicsWidth() const; - - // set the clip region to empty - virtual void ResetClipRegion(); - // begin setting the clip region, add rectangles to the - // region with the UnionClipRegion call - virtual void BeginSetClipRegion( ULONG nCount ); - // all rectangles were added and the clip region should be set now - virtual void EndSetClipRegion(); - - // set the line color to transparent (= don't draw lines) - virtual void SetLineColor(); - // set the line color to a specific color - virtual void SetLineColor( SalColor nSalColor ); - // set the fill color to transparent (= don't fill) - virtual void SetFillColor(); - // set the fill color to a specific color, shapes will be - // filled accordingly - virtual void SetFillColor( SalColor nSalColor ); - // enable/disable XOR drawing - virtual void SetXORMode( bool bSet, bool ); - // set line color for raster operations - virtual void SetROPLineColor( SalROPColor nROPColor ); - // set fill color for raster operations - virtual void SetROPFillColor( SalROPColor nROPColor ); - // set the text color to a specific color - virtual void SetTextColor( SalColor nSalColor ); - // set the font - virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel ); - // get the current font's etrics - virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ); - // get kernign pairs of the current font - // return only PairCount if (pKernPairs == NULL) - virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs ); - // get the repertoire of the current font - virtual const ImplFontCharMap* GetImplFontCharMap() const; - // graphics must fill supplied font list - virtual void GetDevFontList( ImplDevFontList* ); - // graphics should call ImplAddDevFontSubstitute on supplied - // OutputDevice for all its device specific preferred font substitutions - virtual void GetDevFontSubstList( OutputDevice* ); - virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ); - // CreateFontSubset: a method to get a subset of glyhps of a font - // inside a new valid font file - // returns TRUE if creation of subset was successfull - // parameters: rToFile: contains a osl file URL to write the subset to - // pFont: describes from which font to create a subset - // pGlyphIDs: the glyph ids to be extracted - // pEncoding: the character code corresponding to each glyph - // pWidths: the advance widths of the correspoding glyphs (in PS font units) - // nGlyphs: the number of glyphs - // rInfo: additional outgoing information - // implementation note: encoding 0 with glyph id 0 should be added implicitly - // as "undefined character" - virtual BOOL CreateFontSubset( const rtl::OUString& rToFile, - const ImplFontData*, - long* pGlyphIDs, - sal_uInt8* pEncoding, - sal_Int32* pWidths, - int nGlyphs, - FontSubsetInfo& rInfo // out parameter - ); - - // GetFontEncodingVector: a method to get the encoding map Unicode - // to font encoded character; this is only used for type1 fonts and - // may return NULL in case of unknown encoding vector - // if ppNonEncoded is set and non encoded characters (that is type1 - // glyphs with only a name) exist it is set to the corresponding - // map for non encoded glyphs; the encoding vector contains -1 - // as encoding for these cases - virtual const Ucs2SIntMap* GetFontEncodingVector( const ImplFontData*, const Ucs2OStrMap** ppNonEncoded ); - - // GetEmbedFontData: gets the font data for a font marked - // embeddable by GetDevFontList or NULL in case of error - // parameters: pFont: describes the font in question - // pWidths: the widths of all glyphs from char code 0 to 255 - // pWidths MUST support at least 256 members; - // rInfo: additional outgoing information - // pDataLen: out parameter, contains the byte length of the returned buffer - virtual const void* GetEmbedFontData( const ImplFontData*, - const sal_Ucs* pUnicodes, - sal_Int32* pWidths, - FontSubsetInfo& rInfo, - long* pDataLen ); - // frees the font data again - virtual void FreeEmbedFontData( const void* pData, long nDataLen ); - virtual void GetGlyphWidths( const ImplFontData*, - bool bVertical, - Int32Vector& rWidths, - Ucs2UIntMap& rUnicodeEnc ); - virtual int GetMinKashidaWidth(); - - virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& ); - virtual BOOL GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& ); - - virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ); - virtual void DrawServerFontLayout( const ServerFontLayout& ); - - virtual bool supportsOperation( OutDevSupportType ) const; - // Query the platform layer for control support - virtual BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart ); - - virtual SystemGraphicsData GetGraphicsData() const; - virtual SystemFontData GetSysFontData( int nFallbacklevel ) const; -}; - -// Init/Deinit Graphics -void ImplSalInitGraphics( WinSalGraphics* ); -void ImplSalDeInitGraphics( WinSalGraphics* ); -void ImplUpdateSysColorEntries(); -int ImplIsSysColorEntry( SalColor nSalColor ); -void ImplGetLogFontFromFontSelect( HDC, const ImplFontSelectData*, - LOGFONTW&, bool bTestVerticalAvail ); - -// ----------- -// - Defines - -// ----------- - -#define MAX_64KSALPOINTS ((((USHORT)0xFFFF)-8)/sizeof(POINTS)) - -// ----------- -// - Inlines - -// ----------- - -// #102411# Win's GCP mishandles kerning => we need to do it ourselves -// SalGraphicsData::mpFontKernPairs is sorted by -inline bool ImplCmpKernData( const KERNINGPAIR& a, const KERNINGPAIR& b ) -{ - if( a.wFirst < b.wFirst ) - return true; - if( a.wFirst > b.wFirst ) - return false; - return (a.wSecond < b.wSecond); -} - -// called extremely often from just one spot => inline -inline bool ImplWinFontData::HasChar( sal_uInt32 cChar ) const -{ - if( mpUnicodeMap->HasChar( cChar ) ) - return true; - // second chance to allow symbol aliasing - if( mbAliasSymbolsLow && ((cChar-0xF000) <= 0xFF) ) - cChar -= 0xF000; - else if( mbAliasSymbolsHigh && (cChar <= 0xFF) ) - cChar += 0xF000; - else - return false; - return mpUnicodeMap->HasChar( cChar ); -} - -#endif // _SV_SALGDI_H - diff --git a/vcl/win/inc/salids.hrc b/vcl/win/inc/salids.hrc deleted file mode 100644 index 3049f11b551b..000000000000 --- a/vcl/win/inc/salids.hrc +++ /dev/null @@ -1,120 +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 _SV_SALIDS_HRC -#define _SV_SALIDS_HRC - -// Cursor -#define SAL_RESID_POINTER_NULL 10000 -#ifndef W40ONLY -#define SAL_RESID_POINTER_HELP 10001 -#endif -#ifndef WNT -#define SAL_RESID_POINTER_HSIZE 10002 -#define SAL_RESID_POINTER_VSIZE 10003 -#define SAL_RESID_POINTER_NESWSIZE 10004 -#define SAL_RESID_POINTER_NWSESIZE 10005 -#endif -#define SAL_RESID_POINTER_CROSS 10006 -#define SAL_RESID_POINTER_MOVE 10007 -#define SAL_RESID_POINTER_HSPLIT 10008 -#define SAL_RESID_POINTER_VSPLIT 10009 -#define SAL_RESID_POINTER_HSIZEBAR 10010 -#define SAL_RESID_POINTER_VSIZEBAR 10011 -#define SAL_RESID_POINTER_HAND 10012 -#define SAL_RESID_POINTER_REFHAND 10013 -#define SAL_RESID_POINTER_PEN 10014 -#define SAL_RESID_POINTER_MAGNIFY 10015 -#define SAL_RESID_POINTER_FILL 10016 -#define SAL_RESID_POINTER_ROTATE 10017 -#define SAL_RESID_POINTER_HSHEAR 10018 -#define SAL_RESID_POINTER_VSHEAR 10019 -#define SAL_RESID_POINTER_MIRROR 10020 -#define SAL_RESID_POINTER_CROOK 10021 -#define SAL_RESID_POINTER_CROP 10022 -#define SAL_RESID_POINTER_MOVEPOINT 10023 -#define SAL_RESID_POINTER_MOVEBEZIERWEIGHT 10024 -#define SAL_RESID_POINTER_MOVEDATA 10025 -#define SAL_RESID_POINTER_COPYDATA 10026 -#define SAL_RESID_POINTER_LINKDATA 10027 -#define SAL_RESID_POINTER_MOVEDATALINK 10028 -#define SAL_RESID_POINTER_COPYDATALINK 10029 -#define SAL_RESID_POINTER_MOVEFILE 10030 -#define SAL_RESID_POINTER_COPYFILE 10031 -#define SAL_RESID_POINTER_LINKFILE 10032 -#define SAL_RESID_POINTER_MOVEFILELINK 10033 -#define SAL_RESID_POINTER_COPYFILELINK 10034 -#define SAL_RESID_POINTER_MOVEFILES 10035 -#define SAL_RESID_POINTER_COPYFILES 10036 -#define SAL_RESID_POINTER_NOTALLOWED 10037 -#define SAL_RESID_POINTER_DRAW_LINE 10038 -#define SAL_RESID_POINTER_DRAW_RECT 10039 -#define SAL_RESID_POINTER_DRAW_POLYGON 10040 -#define SAL_RESID_POINTER_DRAW_BEZIER 10041 -#define SAL_RESID_POINTER_DRAW_ARC 10042 -#define SAL_RESID_POINTER_DRAW_PIE 10043 -#define SAL_RESID_POINTER_DRAW_CIRCLECUT 10044 -#define SAL_RESID_POINTER_DRAW_ELLIPSE 10045 -#define SAL_RESID_POINTER_DRAW_FREEHAND 10046 -#define SAL_RESID_POINTER_DRAW_CONNECT 10047 -#define SAL_RESID_POINTER_DRAW_TEXT 10048 -#define SAL_RESID_POINTER_DRAW_CAPTION 10049 -#define SAL_RESID_POINTER_CHART 10050 -#define SAL_RESID_POINTER_DETECTIVE 10051 -#define SAL_RESID_POINTER_PIVOT_COL 10052 -#define SAL_RESID_POINTER_PIVOT_ROW 10053 -#define SAL_RESID_POINTER_PIVOT_FIELD 10054 -#define SAL_RESID_POINTER_CHAIN 10055 -#define SAL_RESID_POINTER_CHAIN_NOTALLOWED 10056 -#define SAL_RESID_POINTER_TIMEEVENT_MOVE 10057 -#define SAL_RESID_POINTER_TIMEEVENT_SIZE 10058 -#define SAL_RESID_POINTER_AUTOSCROLL_N 10059 -#define SAL_RESID_POINTER_AUTOSCROLL_S 10060 -#define SAL_RESID_POINTER_AUTOSCROLL_W 10061 -#define SAL_RESID_POINTER_AUTOSCROLL_E 10062 -#define SAL_RESID_POINTER_AUTOSCROLL_NW 10063 -#define SAL_RESID_POINTER_AUTOSCROLL_NE 10064 -#define SAL_RESID_POINTER_AUTOSCROLL_SW 10065 -#define SAL_RESID_POINTER_AUTOSCROLL_SE 10066 -#define SAL_RESID_POINTER_AUTOSCROLL_NS 10067 -#define SAL_RESID_POINTER_AUTOSCROLL_WE 10068 -#define SAL_RESID_POINTER_AUTOSCROLL_NSWE 10069 -#define SAL_RESID_POINTER_AIRBRUSH 10070 -#define SAL_RESID_POINTER_TEXT_VERTICAL 10071 -#define SAL_RESID_POINTER_PIVOT_DELETE 10072 -#define SAL_RESID_POINTER_TAB_SELECT_S 10073 -#define SAL_RESID_POINTER_TAB_SELECT_E 10074 -#define SAL_RESID_POINTER_TAB_SELECT_SE 10075 -#define SAL_RESID_POINTER_TAB_SELECT_W 10076 -#define SAL_RESID_POINTER_TAB_SELECT_SW 10077 -#define SAL_RESID_POINTER_PAINTBRUSH 10078 - -#define SAL_RESID_BITMAP_50 11000 - -#define SAL_RESID_ICON_DEFAULT 1 - -#endif // _SV_SALIDS_HRC diff --git a/vcl/win/inc/salinst.h b/vcl/win/inc/salinst.h deleted file mode 100755 index 1ab59f8f7f9f..000000000000 --- a/vcl/win/inc/salinst.h +++ /dev/null @@ -1,105 +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 _SV_SALINST_H -#define _SV_SALINST_H - -#include -#include - -namespace vos { class OMutex; } - -// ------------------- -// - SalInstanceData - -// ------------------- - -class SalYieldMutex; - -class WinSalInstance : public SalInstance -{ -public: - HINSTANCE mhInst; // Instance Handle - HWND mhComWnd; // window, for communication (between threads and the main thread) - SalYieldMutex* mpSalYieldMutex; // Sal-Yield-Mutex - vos::OMutex* mpSalWaitMutex; // Sal-Wait-Mutex - USHORT mnYieldWaitCount; // Wait-Count -public: - WinSalInstance(); - virtual ~WinSalInstance(); - - virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle ); - virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle ); - virtual void DestroyFrame( SalFrame* pFrame ); - virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE ); - virtual void DestroyObject( SalObject* pObject ); - virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics, - long nDX, long nDY, - USHORT nBitCount, const SystemGraphicsData *pData ); - virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice ); - - virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo, - ImplJobSetup* pSetupData ); - virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter ); - virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter ); - virtual void DestroyPrinter( SalPrinter* pPrinter ); - virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList ); - virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo ); - virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ); - virtual String GetDefaultPrinter(); - virtual SalTimer* CreateSalTimer(); - virtual SalI18NImeStatus* CreateI18NImeStatus(); - virtual SalSystem* CreateSalSystem(); - virtual SalBitmap* CreateSalBitmap(); - virtual vos::IMutex* GetYieldMutex(); - virtual ULONG ReleaseYieldMutex(); - virtual void AcquireYieldMutex( ULONG nCount ); - virtual bool CheckYieldMutex(); - - virtual void Yield( bool bWait, bool bHandleAllCurrentEvents ); - virtual bool AnyInput( USHORT nType ); - virtual SalMenu* CreateMenu( BOOL bMenuBar, Menu* ); - virtual void DestroyMenu( SalMenu* ); - virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData ); - virtual void DestroyMenuItem( SalMenuItem* ); - virtual SalSession* CreateSalSession(); - virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ); - virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType); - - static int WorkaroundExceptionHandlingInUSER32Lib(int nExcept, LPEXCEPTION_POINTERS pExceptionInfo); -}; - -// -------------- -// - Prototypen - -// -------------- - -SalFrame* ImplSalCreateFrame( WinSalInstance* pInst, HWND hWndParent, ULONG nSalFrameStyle ); -SalObject* ImplSalCreateObject( WinSalInstance* pInst, WinSalFrame* pParent ); -HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, BOOL bAsChild ); -void ImplSalStartTimer( ULONG nMS, BOOL bMutex = FALSE ); -void ImplSalPrinterAbortJobAsync( HDC hPrnDC ); - -#endif // _SV_SALINST_H diff --git a/vcl/win/inc/salmenu.h b/vcl/win/inc/salmenu.h deleted file mode 100644 index 7f1774b61975..000000000000 --- a/vcl/win/inc/salmenu.h +++ /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 _SV_SALMENU_H -#define _SV_SALMENU_H - -#include -#include -#include - - -class WinSalMenu : public SalMenu -{ -public: - WinSalMenu(); - virtual ~WinSalMenu(); - virtual BOOL VisibleMenuBar(); // must return TRUE to actually DISPLAY native menu bars - // otherwise only menu messages are processed (eg, OLE on Windows) - - virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ); - virtual void RemoveItem( unsigned nPos ); - virtual void SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos ); - virtual void SetFrame( const SalFrame* pFrame ); - virtual void CheckItem( unsigned nPos, BOOL bCheck ); - virtual void EnableItem( unsigned nPos, BOOL bEnable ); - virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText ); - virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage ); - virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName ); - virtual void GetSystemMenuData( SystemMenuData* pData ); - - HMENU mhMenu; // the menu handle - BOOL mbMenuBar; // true for menu bars - HWND mhWnd; // the window handle where the menubar is attached, may be NULL - WinSalMenu *mpParentMenu; // the parent menu -}; - -class WinSalMenuItem : public SalMenuItem -{ -public: - WinSalMenuItem(); - virtual ~WinSalMenuItem(); - - - MENUITEMINFOW mInfo; - void* mpMenu; // pointer to corresponding VCL menu - XubString mText; // the item text - XubString mAccelText; // the accelerator string - Bitmap maBitmap; // item image - int mnId; // item id - WinSalMenu* mpSalMenu; // the menu where this item is inserted -}; - -#endif // _SV_SALMENU_H - diff --git a/vcl/win/inc/salnativewidgets.h b/vcl/win/inc/salnativewidgets.h deleted file mode 100644 index fceee1076595..000000000000 --- a/vcl/win/inc/salnativewidgets.h +++ /dev/null @@ -1,54 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_NATIVEWIDGETS_H -#define _SV_NATIVEWIDGETS_H - - -#ifdef __cplusplus - -#include - -/* SalControlHandleData: - * - * Holds platform specific theming data. - */ - -class SalControlHandleData -{ - public: - SalControlHandleData( void ); - ~SalControlHandleData( void ); - - public: - // nothing needed on Win32 -}; - - -#endif /* __cplusplus */ - -#endif diff --git a/vcl/win/inc/salobj.h b/vcl/win/inc/salobj.h deleted file mode 100644 index ae7ea5271800..000000000000 --- a/vcl/win/inc/salobj.h +++ /dev/null @@ -1,71 +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 _SV_SALOBJ_H -#define _SV_SALOBJ_H - -#include -#include - -// ----------------- -// - SalObjectData - -// ----------------- - -class WinSalObject : public SalObject -{ -public: - HWND mhWnd; // Window handle - HWND mhWndChild; // Child Window handle - HWND mhLastFocusWnd; // Child-Window, welches als letztes den Focus hatte - SystemChildData maSysData; // SystemEnvData - RGNDATA* mpClipRgnData; // ClipRegion-Data - RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data - RECT* mpNextClipRect; // Naechstes ClipRegion-Rect - BOOL mbFirstClipRect; // Flag for first cliprect to insert - sal_Bool mbInterceptChildWindowKeyDown; // Intercept the KeyDown event sent to system child window - WinSalObject* mpNextObject; // pointer to next object - - - WinSalObject(); - virtual ~WinSalObject(); - - virtual void ResetClipRegion(); - virtual USHORT GetClipRegionType(); - virtual void BeginSetClipRegion( ULONG nRects ); - virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); - virtual void EndSetClipRegion(); - virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ); - virtual void Show( BOOL bVisible ); - virtual void Enable( BOOL nEnable ); - virtual void GrabFocus(); - virtual void SetBackground(); - virtual void SetBackground( SalColor nSalColor ); - virtual const SystemEnvData* GetSystemData() const; - virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ); -}; - -#endif // _SV_SALOBJ_H diff --git a/vcl/win/inc/salprn.h b/vcl/win/inc/salprn.h deleted file mode 100644 index 57ae8eae55e3..000000000000 --- a/vcl/win/inc/salprn.h +++ /dev/null @@ -1,130 +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 _SV_SALPRN_H -#define _SV_SALPRN_H - -#include -#include - -// ----------------- -// - SalDriverData - -// ----------------- - -// WNT3 -#define SAL_DRIVERDATA_SYSSIGN ((ULONG)0x574E5433) -#define SAL_DRIVERDATA_VERSION_A 1 -#define SAL_DRIVERDATA_VERSION_W 2 - -#pragma pack( 1 ) - -struct SalDriverData -{ - ULONG mnSysSignature; - USHORT mnVersion; - USHORT mnDriverOffset; - BYTE maDriverData[1]; -}; - -#pragma pack() - -// --------------------- -// - WinSalInfoPrinter - -// --------------------- - -class WinSalGraphics; - -class WinSalInfoPrinter : public SalInfoPrinter -{ -public: - WinSalGraphics* mpGraphics; // current Printer graphics - XubString maDriverName; // printer driver name - XubString maDeviceName; // printer device name - XubString maPortName; // printer port name - HDC mhDC; // printer hdc - BOOL mbGraphics; // is Graphics used -public: - WinSalInfoPrinter(); - virtual ~WinSalInfoPrinter(); - - virtual SalGraphics* GetGraphics(); - virtual void ReleaseGraphics( SalGraphics* pGraphics ); - virtual BOOL Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ); - virtual BOOL SetPrinterData( ImplJobSetup* pSetupData ); - virtual BOOL SetData( ULONG nFlags, ImplJobSetup* pSetupData ); - virtual void GetPageInfo( const ImplJobSetup* pSetupData, - long& rOutWidth, long& rOutHeight, - long& rPageOffX, long& rPageOffY, - long& rPageWidth, long& rPageHeight ); - virtual ULONG GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType ); - virtual ULONG GetPaperBinCount( const ImplJobSetup* pSetupData ); - virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin ); - virtual void InitPaperFormats( const ImplJobSetup* pSetupData ); - virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData ); -}; - -// ----------------- -// - WinSalPrinter - -// ----------------- - -class WinSalPrinter : public SalPrinter -{ -public: - WinSalGraphics* mpGraphics; // current Printer graphics - WinSalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter - WinSalPrinter* mpNextPrinter; // next printing printer - HDC mhDC; // printer hdc - ULONG mnError; // Error Code - ULONG mnCopies; // Kopien - BOOL mbCollate; // Sortierte Kopien - BOOL mbAbort; // Job Aborted - - bool mbValid; - -public: - WinSalPrinter(); - virtual ~WinSalPrinter(); - - using SalPrinter::StartJob; - virtual BOOL StartJob( const XubString* pFileName, - const XubString& rJobName, - const XubString& rAppName, - ULONG nCopies, - bool bCollate, - bool bDirect, - ImplJobSetup* pSetupData ); - virtual BOOL EndJob(); - virtual BOOL AbortJob(); - virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData ); - virtual BOOL EndPage(); - virtual ULONG GetErrorCode(); - - void markInvalid(); - bool isValid() const { return mbValid; } -}; - -#endif // _SV_SALPRN_H diff --git a/vcl/win/inc/salsys.h b/vcl/win/inc/salsys.h deleted file mode 100644 index b6eadc6e6818..000000000000 --- a/vcl/win/inc/salsys.h +++ /dev/null @@ -1,92 +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 _SV_SALSYS_H -#define _SV_SALSYS_H - -#include - -#include -#include - -class WinSalSystem : public SalSystem -{ - public: - struct DisplayMonitor - { - rtl::OUString m_aName; - rtl::OUString m_aDeviceName; - Rectangle m_aArea; - Rectangle m_aWorkArea; - sal_Int32 m_nStateFlags; - - DisplayMonitor() : m_nStateFlags( 0 ) {} - DisplayMonitor( const rtl::OUString& rName, - const rtl::OUString& rDevName, - const Rectangle& rArea, - const Rectangle& rWorkArea, - DWORD nStateFlags ) - : m_aName( rName ), - m_aDeviceName( rDevName ), - m_aArea( rArea ), - m_aWorkArea( rWorkArea ), - m_nStateFlags( nStateFlags ) - { - } - ~DisplayMonitor() {} - }; - private: - std::vector m_aMonitors; - std::map m_aDeviceNameToMonitor; - unsigned int m_nPrimary; -public: - WinSalSystem() : m_nPrimary( 0 ) {} - virtual ~WinSalSystem(); - - virtual unsigned int GetDisplayScreenCount(); - virtual bool IsMultiDisplay(); - virtual unsigned int GetDefaultDisplayNumber(); - virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ); - virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen ); - virtual rtl::OUString GetScreenName( unsigned int nScreen ); - virtual int ShowNativeMessageBox( const String& rTitle, - const String& rMessage, - int nButtonCombination, - int nDefaultButton); - bool initMonitors(); - // discards monitorinfo; used by WM_DISPLAYCHANGED handler - void clearMonitors(); - const std::vector& getMonitors() - { initMonitors(); return m_aMonitors;} - - BOOL handleMonitorCallback( sal_IntPtr /*HMONITOR*/, - sal_IntPtr /*HDC*/, - sal_IntPtr /*LPRECT*/ ); -}; - -#endif // _SV_SALSYS_H - diff --git a/vcl/win/inc/saltimer.h b/vcl/win/inc/saltimer.h deleted file mode 100644 index c24af459aa97..000000000000 --- a/vcl/win/inc/saltimer.h +++ /dev/null @@ -1,44 +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 _SV_SALTIMER_H -#define _SV_SALTIMER_H - -#include - -class WinSalTimer : public SalTimer -{ -public: - WinSalTimer() {} - virtual ~WinSalTimer(); - - // overload all pure virtual methods - void Start( ULONG nMS ); - void Stop(); -}; - -#endif diff --git a/vcl/win/inc/salvd.h b/vcl/win/inc/salvd.h deleted file mode 100644 index d0f32a6460a9..000000000000 --- a/vcl/win/inc/salvd.h +++ /dev/null @@ -1,61 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SALVD_H -#define _SV_SALVD_H - -#include -#include - -class WinSalGraphics; - -// ----------------- -// - SalVirDevData - -// ----------------- - -class WinSalVirtualDevice : public SalVirtualDevice -{ -public: - HDC mhDC; // HDC or 0 for Cache Device - HBITMAP mhBmp; // Memory Bitmap - HBITMAP mhDefBmp; // Default Bitmap - WinSalGraphics* mpGraphics; // current VirDev graphics - WinSalVirtualDevice* mpNext; // next VirDev - USHORT mnBitCount; // BitCount (0 or 1) - BOOL mbGraphics; // is Graphics used - BOOL mbForeignDC; // uses a foreign DC instead of a bitmap - - WinSalVirtualDevice(); - virtual ~WinSalVirtualDevice(); - - virtual SalGraphics* GetGraphics(); - virtual void ReleaseGraphics( SalGraphics* pGraphics ); - virtual BOOL SetSize( long nNewDX, long nNewDY ); - virtual void GetSize( long& rWidth, long& rHeight ); -}; - -#endif // _SV_SALVD_H diff --git a/vcl/win/inc/svsys.h b/vcl/win/inc/svsys.h deleted file mode 100644 index 7b0e87304d59..000000000000 --- a/vcl/win/inc/svsys.h +++ /dev/null @@ -1,33 +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 _SV_SVSYS_H -#define _SV_SVSYS_H - -#include - -#endif // _SV_SVSYS_H diff --git a/vcl/win/inc/wincomp.hxx b/vcl/win/inc/wincomp.hxx deleted file mode 100644 index 61e04779dbce..000000000000 --- a/vcl/win/inc/wincomp.hxx +++ /dev/null @@ -1,264 +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 _SV_WINCOMP_HXX -#define _SV_WINCOMP_HXX - -#ifndef _STRING_H -#include -#endif -#include - -// ---------- -// - Strict - -// ---------- - -// Anpassungen fuer TypeChecking - -inline HPEN SelectPen( HDC hDC, HPEN hPen ) -{ - return (HPEN)SelectObject( hDC, (HGDIOBJ)hPen ); -} - -inline void DeletePen( HPEN hPen ) -{ - DeleteObject( (HGDIOBJ)hPen ); -} - -inline HPEN GetStockPen( int nObject ) -{ - return (HPEN)GetStockObject( nObject ); -} - -inline HBRUSH SelectBrush( HDC hDC, HBRUSH hBrush ) -{ - return (HBRUSH)SelectObject( hDC, (HGDIOBJ)hBrush ); -} - -inline void DeleteBrush( HBRUSH hBrush ) -{ - DeleteObject( (HGDIOBJ)hBrush ); -} - -inline HBRUSH GetStockBrush( int nObject ) -{ - return (HBRUSH)GetStockObject( nObject ); -} - -inline HFONT SelectFont( HDC hDC, HFONT hFont ) -{ - return (HFONT)SelectObject( hDC, (HGDIOBJ)hFont ); -} - -inline void DeleteFont( HFONT hFont ) -{ - DeleteObject( (HGDIOBJ)hFont ); -} - -inline HFONT GetStockFont( int nObject ) -{ - return (HFONT)GetStockObject( nObject ); -} - -inline HBITMAP SelectBitmap( HDC hDC, HBITMAP hBitmap ) -{ - return (HBITMAP)SelectObject( hDC, (HGDIOBJ)hBitmap ); -} - -inline void DeleteBitmap( HBITMAP hBitmap ) -{ - DeleteObject( (HGDIOBJ)hBitmap ); -} - -inline void DeleteRegion( HRGN hRegion ) -{ - DeleteObject( (HGDIOBJ)hRegion ); -} - -inline HPALETTE GetStockPalette( int nObject ) -{ - return (HPALETTE)GetStockObject( nObject ); -} - -inline void DeletePalette( HPALETTE hPalette ) -{ - DeleteObject( (HGDIOBJ)hPalette ); -} - -inline void SetWindowStyle( HWND hWnd, DWORD nStyle ) -{ - SetWindowLong( hWnd, GWL_STYLE, nStyle ); -} - -inline DWORD GetWindowStyle( HWND hWnd ) -{ - return GetWindowLong( hWnd, GWL_STYLE ); -} - -inline void SetWindowExStyle( HWND hWnd, DWORD nStyle ) -{ - SetWindowLong( hWnd, GWL_EXSTYLE, nStyle ); -} - -inline DWORD GetWindowExStyle( HWND hWnd ) -{ - return GetWindowLong( hWnd, GWL_EXSTYLE ); -} - -inline WIN_BOOL IsMinimized( HWND hWnd ) -{ - return IsIconic( hWnd ); -} - -inline WIN_BOOL IsMaximized( HWND hWnd ) -{ - return IsZoomed( hWnd ); -} - -inline void SetWindowFont( HWND hWnd, HFONT hFont, WIN_BOOL bRedraw ) -{ - SendMessage( hWnd, WM_SETFONT, (WPARAM)hFont, MAKELPARAM((UINT)bRedraw,0) ); -} - -inline HFONT GetWindowFont( HWND hWnd ) -{ - return (HFONT)(UINT)SendMessage( hWnd, WM_GETFONT, 0, 0 ); -} - -inline void SetClassCursor( HWND hWnd, HCURSOR hCursor ) -{ - SetClassLong( hWnd, GCL_HCURSOR, (DWORD)hCursor ); -} - -inline HCURSOR GetClassCursor( HWND hWnd ) -{ - return (HCURSOR)GetClassLong( hWnd, GCL_HCURSOR ); -} - -inline void SetClassIcon( HWND hWnd, HICON hIcon ) -{ - SetClassLong( hWnd, GCL_HICON, (DWORD)hIcon ); -} - -inline HICON GetClassIcon( HWND hWnd ) -{ - return (HICON)GetClassLong( hWnd, GCL_HICON ); -} - -inline HBRUSH SetClassBrush( HWND hWnd, HBRUSH hBrush ) -{ - return (HBRUSH)SetClassLong( hWnd, GCL_HBRBACKGROUND, (DWORD)hBrush ); -} - -inline HBRUSH GetClassBrush( HWND hWnd ) -{ - return (HBRUSH)GetClassLong( hWnd, GCL_HBRBACKGROUND ); -} - -inline HINSTANCE GetWindowInstance( HWND hWnd ) -{ - return (HINSTANCE)GetWindowLong( hWnd, GWL_HINSTANCE ); -} - -// ------------------------ -// - ZMouse Erweiterungen - -// ------------------------ - -#define MSH_MOUSEWHEEL "MSWHEEL_ROLLMSG" - -#define MOUSEZ_CLASSNAME "MouseZ" // wheel window class -#define MOUSEZ_TITLE "Magellan MSWHEEL" // wheel window title - -#define MSH_WHEELMODULE_CLASS (MOUSEZ_CLASSNAME) -#define MSH_WHEELMODULE_TITLE (MOUSEZ_TITLE) - -#define MSH_SCROLL_LINES "MSH_SCROLL_LINES_MSG" - -#ifndef WHEEL_DELTA -#define WHEEL_DELTA 120 -#endif -#ifndef WM_MOUSEWHEEL -#define WM_MOUSEWHEEL 0x020A -#endif -#ifndef SPI_GETWHEELSCROLLLINES -#define SPI_GETWHEELSCROLLLINES 104 -#endif -#ifndef SPI_SETWHEELSCROLLLINES -#define SPI_SETWHEELSCROLLLINES 105 -#endif -#ifndef WHEEL_PAGESCROLL -#define WHEEL_PAGESCROLL (UINT_MAX) -#endif - - -// ----------------------------- -// - SystemAgent Erweiterungen - -// ----------------------------- - -#define ENABLE_AGENT 1 -#define DISABLE_AGENT 2 -#define GET_AGENT_STATUS 3 -typedef int (APIENTRY* SysAgt_Enable_PROC)( int ); - -// --------------------- -// - 5.0-Erweiterungen - -// --------------------- - -#ifndef COLOR_GRADIENTACTIVECAPTION -#define COLOR_GRADIENTACTIVECAPTION 27 -#endif -#ifndef COLOR_GRADIENTINACTIVECAPTION -#define COLOR_GRADIENTINACTIVECAPTION 28 -#endif - -#ifndef SPI_GETFLATMENU -#define SPI_GETFLATMENU 0x1022 -#endif -#ifndef COLOR_MENUBAR -#define COLOR_MENUBAR 30 -#endif -#ifndef COLOR_MENUHILIGHT -#define COLOR_MENUHILIGHT 29 -#endif - -#ifndef CS_DROPSHADOW -#define CS_DROPSHADOW 0x00020000 -#endif - -// ------------------------------------------------------- -// MT 12/03: From winuser.h, only needed in salframe.cxx -// Better change salframe.cxx to include winuser.h -// ------------------------------------------------------- - -#define WS_EX_LAYERED 0x00080000 - -#ifndef WM_UNICHAR -#define WM_UNICHAR 0x0109 -#define UNICODE_NOCHAR 0xFFFF -#endif - -#endif // _SV_WINCOMP_HXX diff --git a/vcl/win/source/app/saldata.cxx b/vcl/win/source/app/saldata.cxx old mode 100644 new mode 100755 index 5f94029ad817..8dab0b56947a --- a/vcl/win/source/app/saldata.cxx +++ b/vcl/win/source/app/saldata.cxx @@ -27,11 +27,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include + +#include "tools/svwin.h" #include "rtl/tencinfo.h" -#include -#include +#include "vcl/svapp.hxx" +#include "win/saldata.hxx" // ======================================================================= diff --git a/vcl/win/source/app/salinfo.cxx b/vcl/win/source/app/salinfo.cxx old mode 100644 new mode 100755 index 14cb5d63437a..5a846d068d9a --- a/vcl/win/source/app/salinfo.cxx +++ b/vcl/win/source/app/salinfo.cxx @@ -46,16 +46,19 @@ #endif #include "tools/postsys.h" -#include "tools/string.hxx" -#include "salsys.h" -#include "salframe.h" -#include "salinst.h" -#include "saldata.hxx" +#include "rtl/ustrbuf.hxx" + #include "tools/debug.hxx" -#include "vcl/svdata.hxx" +#include "tools/string.hxx" + #include "vcl/window.hxx" -#include "rtl/ustrbuf.hxx" +#include "win/salsys.h" +#include "win/salframe.h" +#include "win/salinst.h" +#include "win/saldata.hxx" + +#include "svdata.hxx" #include diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx index 2a2a1827a515..a679cf709efc 100755 --- a/vcl/win/source/app/salinst.cxx +++ b/vcl/win/source/app/salinst.cxx @@ -36,23 +36,28 @@ #ifdef __MINGW32__ #include #endif + #include + #include + +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include + #include -#include // CS_DROPSHADOW -#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include #ifndef min #define min(a,b) (((a) < (b)) ? (a) : (b)) diff --git a/vcl/win/source/app/salshl.cxx b/vcl/win/source/app/salshl.cxx old mode 100644 new mode 100755 index 0f3b0c41e258..f9df1b0be783 --- a/vcl/win/source/app/salshl.cxx +++ b/vcl/win/source/app/salshl.cxx @@ -27,9 +27,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include -#include + #include +#include +#include // ======================================================================= diff --git a/vcl/win/source/app/saltimer.cxx b/vcl/win/source/app/saltimer.cxx old mode 100644 new mode 100755 index d512be753f9c..52fe8b7ddcb3 --- a/vcl/win/source/app/saltimer.cxx +++ b/vcl/win/source/app/saltimer.cxx @@ -31,9 +31,9 @@ #ifdef __MINGW32__ #include #endif -#include -#include -#include +#include +#include +#include // ======================================================================= diff --git a/vcl/win/source/gdi/salbmp.cxx b/vcl/win/source/gdi/salbmp.cxx old mode 100644 new mode 100755 index 141c812dcd31..5b08645b1d4c --- a/vcl/win/source/gdi/salbmp.cxx +++ b/vcl/win/source/gdi/salbmp.cxx @@ -27,13 +27,17 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include -#include -#include -#include -#include -#include + #include // for BitmapSystemData +#include + +#include +#include +#include +#include + #include // ----------- diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx old mode 100644 new mode 100755 index eb260eb808c6..885111801eea --- a/vcl/win/source/gdi/salgdi.cxx +++ b/vcl/win/source/gdi/salgdi.cxx @@ -30,16 +30,17 @@ #include #include + +#include + #include -#include -#include -#include #include -#include #include -#ifndef _RTL_STRINGBUF_HXX -#include -#endif + +#include +#include +#include +#include using namespace rtl; diff --git a/vcl/win/source/gdi/salgdi2.cxx b/vcl/win/source/gdi/salgdi2.cxx old mode 100644 new mode 100755 index 803c0886f429..a3dde8feece6 --- a/vcl/win/source/gdi/salgdi2.cxx +++ b/vcl/win/source/gdi/salgdi2.cxx @@ -30,16 +30,16 @@ #include #include + #include #include -#include -#include -#include -#ifndef _SV_SALIDS_HRC -#include -#endif -#include -#include + +#include +#include +#include +#include +#include +#include bool WinSalGraphics::supportsOperation( OutDevSupportType eType ) const { diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index 91662fb8aded..c8aed894844f 100755 --- a/vcl/win/source/gdi/salgdi3.cxx +++ b/vcl/win/source/gdi/salgdi3.cxx @@ -31,25 +31,6 @@ #include #include -#include -#include -#include -#include -#include "tools/svwin.h" - -#include "wincomp.hxx" -#include "saldata.hxx" -#include "salgdi.h" - -#include "vcl/svapp.hxx" -#include "vcl/outfont.hxx" -#include "vcl/font.hxx" -#include "vcl/fontsubset.hxx" -#include "vcl/sallayout.hxx" - -#include "vcl/outdev.h" // for ImplGlyphFallbackFontSubstitution -#include "unotools/fontcfg.hxx" // for IMPL_FONT_ATTR_SYMBOL - #include "rtl/logfile.hxx" #include "rtl/tencinfo.h" #include "rtl/textcvt.h" @@ -62,15 +43,34 @@ #include "osl/thread.hxx" #include "osl/process.h" +#include "basegfx/polygon/b2dpolygon.hxx" +#include "basegfx/polygon/b2dpolypolygon.hxx" +#include "basegfx/matrix/b2dhommatrix.hxx" +#include "basegfx/matrix/b2dhommatrixtools.hxx" + +#include "unotools/fontcfg.hxx" // for IMPL_FONT_ATTR_SYMBOL + +#include "vcl/font.hxx" +#include "vcl/svapp.hxx" + #include "tools/poly.hxx" #include "tools/debug.hxx" #include "tools/stream.hxx" -#include "basegfx/polygon/b2dpolygon.hxx" -#include "basegfx/polygon/b2dpolypolygon.hxx" -#include "basegfx/matrix/b2dhommatrix.hxx" -#include +#include +#include +#include + +#include + +#include "win/wincomp.hxx" +#include "win/saldata.hxx" +#include "win/salgdi.h" +#include "outfont.hxx" +#include "fontsubset.hxx" +#include "sallayout.hxx" +#include "outdev.h" // for ImplGlyphFallbackFontSubstitution #include "sft.hxx" #ifdef GCP_KERN_HACK diff --git a/vcl/win/source/gdi/salgdi_gdiplus.cxx b/vcl/win/source/gdi/salgdi_gdiplus.cxx old mode 100644 new mode 100755 index 88efbb29d30a..2b46ce47b82d --- a/vcl/win/source/gdi/salgdi_gdiplus.cxx +++ b/vcl/win/source/gdi/salgdi_gdiplus.cxx @@ -30,12 +30,14 @@ #include #include + #include -#include -#include -#include #include +#include +#include +#include + #ifndef min #define min(a,b) (((a) < (b)) ? (a) : (b)) #endif diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx index 97e3e1b48c79..2e08c9cb6af8 100755 --- a/vcl/win/source/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx @@ -30,14 +30,16 @@ #define _SV_SALNATIVEWIDGETS_CXX -#include "svsys.h" -#include "salgdi.h" -#include "saldata.hxx" -#include "vcl/svapp.hxx" - #include "rtl/ustring.h" + #include "osl/module.h" +#include "vcl/svapp.hxx" + +#include "win/svsys.h" +#include "win/salgdi.h" +#include "win/saldata.hxx" + #include "uxtheme.h" #include "vssym32.h" diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx old mode 100644 new mode 100755 index 702ff639ed84..d8f2a7342157 --- a/vcl/win/source/gdi/salprn.cxx +++ b/vcl/win/source/gdi/salprn.cxx @@ -29,26 +29,26 @@ #include "precompiled_vcl.hxx" #include -#include +#include + +#include +#include #ifdef __MINGW32__ #include #endif -#ifndef _OSL_MODULE_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include -#include #include #include #include diff --git a/vcl/win/source/gdi/salvd.cxx b/vcl/win/source/gdi/salvd.cxx old mode 100644 new mode 100755 index 816a8fef1141..37800435bdf4 --- a/vcl/win/source/gdi/salvd.cxx +++ b/vcl/win/source/gdi/salvd.cxx @@ -27,14 +27,17 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include -#include -#include -#include -#include -#include + #include +#include +#include +#include +#include +#include + // ======================================================================= static HBITMAP ImplCreateVirDevBitmap( HDC hDC, long nDX, long nDY, diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index a4c588f059d4..8c9e183bb729 100755 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -28,21 +28,21 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include "tools/svwin.h" - -#include "salgdi.h" -#include "saldata.hxx" -// for GetMirroredChar -#include "sft.hxx" - -#include "vcl/sallayout.hxx" -#include "vcl/svapp.hxx" - #include "rtl/ustring.hxx" #include "osl/module.h" #include "osl/file.h" +#include "tools/svwin.h" + +#include "vcl/svapp.hxx" + +#include "win/salgdi.h" +#include "win/saldata.hxx" + +// for GetMirroredChar +#include "sft.hxx" +#include "sallayout.hxx" #include #include @@ -74,9 +74,9 @@ typedef std::set IntSet; #include #include #include -#include -#include -#include +#include +#include +#include #endif #define DROPPED_OUTGLYPH 0xFFFF diff --git a/vcl/win/source/src/salsrc.rc b/vcl/win/source/src/salsrc.rc old mode 100644 new mode 100755 index 1db1bfc910cf..11b967ff475b --- a/vcl/win/source/src/salsrc.rc +++ b/vcl/win/source/src/salsrc.rc @@ -29,7 +29,7 @@ #include #ifndef _SV_SALIDS_HRC -#include +#include #endif SAL_RESID_POINTER_NULL CURSOR NULLPTR.CUR diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index 89a191c99ef6..b837d4e38278 100755 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -46,51 +46,48 @@ #include -#ifndef _SVWIN_HXX #include -#endif #ifdef __MINGW32__ #include #endif + #include #include #include + #include -// Warning in SDK header -#if defined(_MSC_VER) && (_MSC_VER > 1400) -#pragma warning( disable: 4242 4244 ) -#endif -#include -#ifndef _SV_SALIDS_HRC -#include -#endif #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include #include -#ifndef _SV_KEYCOES_HXX #include -#endif -#include #include #include -#include #include -#ifndef _VCL_IMPDEL_HXX -#include +#include + +// Warning in SDK header +#if defined(_MSC_VER) && (_MSC_VER > 1400) +#pragma warning( disable: 4242 4244 ) #endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + #define COMPILE_MULTIMON_STUBS #include #include diff --git a/vcl/win/source/window/salmenu.cxx b/vcl/win/source/window/salmenu.cxx index 47da911b012e..e16d9e573b2d 100755 --- a/vcl/win/source/window/salmenu.cxx +++ b/vcl/win/source/window/salmenu.cxx @@ -27,16 +27,20 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include -#include -#include -#include -#include -#include + #include #include -#include -#include + +#include +#include +#include +#include +#include + +#include +#include // uncomment the following line to have ownerdrawn menues, ie, with bitmaps // however, this is incompatible with OLE inplace editing diff --git a/vcl/win/source/window/salobj.cxx b/vcl/win/source/window/salobj.cxx old mode 100644 new mode 100755 index bf0f29bb72d3..ed2665096838 --- a/vcl/win/source/window/salobj.cxx +++ b/vcl/win/source/window/salobj.cxx @@ -30,17 +30,17 @@ #include -#ifndef _SVWIN_HXX -#include -#endif -#include -#include -#include -#include -#include #include +#include + #include +#include +#include +#include +#include +#include + // ======================================================================= static BOOL ImplIsSysWindowOrChild( HWND hWndParent, HWND hWndChild ) -- cgit v1.2.3 From bb3127a8c053434ab1f4c42624b3d70a5fbfa9e6 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 25 Jan 2011 17:35:20 +0100 Subject: vcl2gnumake: #i116588# move vcl to gbuild (step 1, linux) --- vcl/Library_desktop_detector.mk | 83 ++++++ vcl/Library_vcl.mk | 348 ++++++++++++++++++++++ vcl/Library_vclplug_gen.mk | 129 ++++++++ vcl/Library_vclplug_gtk.mk | 117 ++++++++ vcl/Library_vclplug_kde.mk | 95 ++++++ vcl/Library_vclplug_kde4.mk | 101 +++++++ vcl/Library_vclplug_svp.mk | 99 ++++++ vcl/Makefile | 38 +++ vcl/Module_vcl.mk | 63 ++++ vcl/Package_inc.mk | 164 ++++++++++ vcl/StaticLibrary_vclmain.mk | 54 ++++ vcl/inc/fontsubset.hxx | 4 +- vcl/inc/saldatabasic.hxx | 2 + vcl/inc/sft.hxx | 10 +- vcl/inc/unx/gtk/atkbridge.hxx | 6 +- vcl/inc/unx/i18n_im.hxx | 4 +- vcl/inc/unx/i18n_xkb.hxx | 4 +- vcl/inc/unx/pspgraphics.h | 4 +- vcl/inc/unx/salbmp.h | 4 +- vcl/inc/unx/saldata.hxx | 4 +- vcl/inc/unx/saldisp.hxx | 9 +- vcl/inc/unx/salframe.h | 4 +- vcl/inc/unx/salgdi.h | 15 +- vcl/inc/unx/salinst.h | 6 +- vcl/inc/unx/salobj.h | 4 +- vcl/inc/unx/salprn.h | 3 +- vcl/inc/unx/salsys.h | 4 +- vcl/inc/unx/sm.hxx | 11 +- vcl/inc/unx/wmadaptor.hxx | 4 +- vcl/inc/vcl/jobdata.hxx | 2 +- vcl/inc/vcl/ppdparser.hxx | 10 +- vcl/inc/vclpluginapi.h | 70 +++++ vcl/prj/build.lst | 55 +--- vcl/prj/d.lst | 153 ---------- vcl/prj/makefile.mk | 40 +++ vcl/source/glyphs/gcach_vdev.cxx | 287 ------------------ vcl/source/glyphs/gcach_vdev.hxx | 57 ---- vcl/source/window/abstdlg.cxx | 3 +- vcl/unx/generic/app/salinst.cxx | 2 +- vcl/unx/generic/desktopdetect/desktopdetector.cxx | 6 +- vcl/unx/generic/gdi/gcach_xpeer.hxx | 1 - vcl/unx/generic/gdi/salprnpsp.cxx | 2 - vcl/unx/generic/plugadapt/salplug.cxx | 1 - vcl/unx/generic/printer/cupsmgr.cxx | 2 - vcl/unx/gtk/app/gtkinst.cxx | 2 +- vcl/unx/headless/svpprn.hxx | 4 +- vcl/unx/kde/kdedata.cxx | 11 +- vcl/unx/kde4/VCLKDEApplication.cxx | 4 +- vcl/unx/kde4/main.cxx | 4 +- 49 files changed, 1487 insertions(+), 622 deletions(-) create mode 100644 vcl/Library_desktop_detector.mk create mode 100644 vcl/Library_vcl.mk create mode 100644 vcl/Library_vclplug_gen.mk create mode 100644 vcl/Library_vclplug_gtk.mk create mode 100644 vcl/Library_vclplug_kde.mk create mode 100644 vcl/Library_vclplug_kde4.mk create mode 100644 vcl/Library_vclplug_svp.mk create mode 100644 vcl/Makefile create mode 100644 vcl/Module_vcl.mk create mode 100644 vcl/Package_inc.mk create mode 100755 vcl/StaticLibrary_vclmain.mk create mode 100644 vcl/inc/vclpluginapi.h create mode 100644 vcl/prj/makefile.mk delete mode 100644 vcl/source/glyphs/gcach_vdev.cxx delete mode 100644 vcl/source/glyphs/gcach_vdev.hxx diff --git a/vcl/Library_desktop_detector.mk b/vcl/Library_desktop_detector.mk new file mode 100644 index 000000000000..4a96d194e7f6 --- /dev/null +++ b/vcl/Library_desktop_detector.mk @@ -0,0 +1,83 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,desktop_detector)) + +$(eval $(call gb_Library_add_precompiled_header,desktop_detector,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) + +$(eval $(call gb_Library_set_include,desktop_detector,\ + $$(INCLUDE) \ + -I$(SRCDIR)/vcl/inc \ + -I$(SRCDIR)/vcl/inc/pch \ + -I$(SRCDIR)/solenv/inc \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc/stl \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_Library_set_defs,vclplug_kde,\ + $$(DEFS) \ + -DDESKTOP_DETECTOR_IMPLEMENTATION \ +)) + +$(eval $(call gb_Library_add_linked_libs,desktop_detector,\ + vcl \ + tl \ + utl \ + sot \ + ucbhelper \ + basegfx \ + comphelper \ + cppuhelper \ + icuuc \ + icule \ + i18nisolang1 \ + i18npaper \ + i18nutil \ + jvmaccess \ + stl \ + cppu \ + sal \ + vos3 \ + X11 \ + Xext \ + SM \ + ICE \ +)) + +$(eval $(call gb_Library_add_exception_objects,vclplug_kde,\ + vcl/unx/generic/desktopdetect/desktopdetector \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,desktop_detector,\ + dl \ + m \ + pthread \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk new file mode 100644 index 000000000000..a8d39c2bba53 --- /dev/null +++ b/vcl/Library_vcl.mk @@ -0,0 +1,348 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,vcl)) + +$(eval $(call gb_Library_add_package_headers,vcl,vcl_inc)) + +$(eval $(call gb_Library_add_precompiled_header,vcl,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) + +$(eval $(call gb_Library_set_include,vcl,\ + $$(INCLUDE) \ + -I$(SRCDIR)/vcl/inc \ + -I$(SRCDIR)/vcl/inc/pch \ + -I$(SRCDIR)/solenv/inc \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc/stl \ + -I$(OUTDIR)/inc \ +)) +ifeq ($(GUI),UNX) +$(eval $(call gb_Library_set_cxxflags,vcl,\ + $$(CXXFLAGS) \ + $$(FREETYPE_CFLAGS) \ +)) +endif + +$(eval $(call gb_Library_set_defs,vcl,\ + $$(DEFS) \ + -DVCL_DLLIMPLEMENTATION \ + -DCUI_DLL_NAME=\"$(gb_Library_SYSPRE)cui$(gb_Library_OOOEXT)\" \ +)) + +$(eval $(call gb_Library_add_linked_libs,vcl,\ + tl \ + utl \ + sot \ + ucbhelper \ + basegfx \ + comphelper \ + cppuhelper \ + icuuc \ + icule \ + i18nisolang1 \ + i18npaper \ + i18nutil \ + jvmaccess \ + stl \ + cppu \ + sal \ + vos3 \ +)) + +ifneq ($(ENABLE_GRAPHITE),) +$(eval $(call gb_Library_add_linked_static_libs,vcl,\ + graphite \ +)) +endif +ifeq ($(GUI),UNX) +$(eval $(call gb_Library_add_linked_libs,vcl,\ + freetype \ +)) +endif + +ifeq ($(GUI),UNX) +$(eval $(call gb_Library_add_exception_objects,vcl,\ + vcl/unx/generic/printer/cupsmgr \ + vcl/unx/generic/printer/jobdata \ + vcl/unx/generic/printer/ppdparser \ + vcl/unx/generic/printer/printerinfomanager \ + vcl/unx/generic/fontmanager/fontcache \ + vcl/unx/generic/fontmanager/fontconfig \ + vcl/unx/generic/fontmanager/fontmanager \ + vcl/unx/generic/fontmanager/helper \ + vcl/unx/generic/fontmanager/parseAFM \ +)) +endif + +$(eval $(call gb_Library_add_cobjects,vcl,\ + vcl/source/fontsubset/list \ +)) +$(eval $(call gb_Library_add_exception_objects,vcl,\ + vcl/source/app/dbggui \ + vcl/source/app/dndhelp \ + vcl/source/app/help \ + vcl/source/app/i18nhelp \ + vcl/source/app/idlemgr \ + vcl/source/app/salvtables \ + vcl/source/app/session \ + vcl/source/app/settings \ + vcl/source/app/sound \ + vcl/source/app/stdtext \ + vcl/source/app/svapp \ + vcl/source/app/svdata \ + vcl/source/app/svmain \ + vcl/source/app/svmainhook \ + vcl/source/app/timer \ + vcl/source/app/unohelp2 \ + vcl/source/app/unohelp \ + vcl/source/app/vclevent \ + vcl/source/components/display \ + vcl/source/components/dtranscomp \ + vcl/source/components/factory \ + vcl/source/components/fontident \ + vcl/source/components/stringmirror \ + vcl/source/control/button \ + vcl/source/control/combobox \ + vcl/source/control/ctrl \ + vcl/source/control/edit \ + vcl/source/control/field2 \ + vcl/source/control/field \ + vcl/source/control/fixbrd \ + vcl/source/control/fixed \ + vcl/source/control/group \ + vcl/source/control/ilstbox \ + vcl/source/control/imgctrl \ + vcl/source/control/longcurr \ + vcl/source/control/lstbox \ + vcl/source/control/menubtn \ + vcl/source/control/morebtn \ + vcl/source/control/quickselectionengine \ + vcl/source/control/scrbar \ + vcl/source/control/slider \ + vcl/source/control/spinbtn \ + vcl/source/control/spinfld \ + vcl/source/control/tabctrl \ + vcl/source/fontsubset/cff \ + vcl/source/fontsubset/fontsubset \ + vcl/source/fontsubset/gsub \ + vcl/source/fontsubset/sft \ + vcl/source/fontsubset/ttcr \ + vcl/source/fontsubset/xlat \ + vcl/source/gdi/alpha \ + vcl/source/gdi/animate \ + vcl/source/gdi/base14 \ + vcl/source/gdi/bitmap2 \ + vcl/source/gdi/bitmap3 \ + vcl/source/gdi/bitmap4 \ + vcl/source/gdi/bitmap \ + vcl/source/gdi/bitmapex \ + vcl/source/gdi/bmpacc2 \ + vcl/source/gdi/bmpacc3 \ + vcl/source/gdi/bmpacc \ + vcl/source/gdi/bmpconv \ + vcl/source/gdi/bmpfast \ + vcl/source/gdi/configsettings \ + vcl/source/gdi/cvtgrf \ + vcl/source/gdi/cvtsvm \ + vcl/source/gdi/extoutdevdata \ + vcl/source/gdi/font \ + vcl/source/gdi/gdimtf \ + vcl/source/gdi/gfxlink \ + vcl/source/gdi/gradient \ + vcl/source/gdi/graph \ + vcl/source/gdi/graphictools \ + vcl/source/gdi/hatch \ + vcl/source/gdi/image \ + vcl/source/gdi/imagerepository \ + vcl/source/gdi/impanmvw \ + vcl/source/gdi/impbmp \ + vcl/source/gdi/impgraph \ + vcl/source/gdi/impimage \ + vcl/source/gdi/impimagetree \ + vcl/source/gdi/impvect \ + vcl/source/gdi/jobset \ + vcl/source/gdi/lineinfo \ + vcl/source/gdi/mapmod \ + vcl/source/gdi/metaact \ + vcl/source/gdi/metric \ + vcl/source/gdi/octree \ + vcl/source/gdi/oldprintadaptor \ + vcl/source/gdi/outdev2 \ + vcl/source/gdi/outdev3 \ + vcl/source/gdi/outdev4 \ + vcl/source/gdi/outdev5 \ + vcl/source/gdi/outdev6 \ + vcl/source/gdi/outdev \ + vcl/source/gdi/outdevnative \ + vcl/source/gdi/outmap \ + vcl/source/gdi/pdfextoutdevdata \ + vcl/source/gdi/pdffontcache \ + vcl/source/gdi/pdfwriter \ + vcl/source/gdi/pdfwriter_impl2 \ + vcl/source/gdi/pdfwriter_impl \ + vcl/source/gdi/pngread \ + vcl/source/gdi/pngwrite \ + vcl/source/gdi/print2 \ + vcl/source/gdi/print3 \ + vcl/source/gdi/print \ + vcl/source/gdi/regband \ + vcl/source/gdi/region \ + vcl/source/gdi/salgdilayout \ + vcl/source/gdi/sallayout \ + vcl/source/gdi/salmisc \ + vcl/source/gdi/salnativewidgets-none \ + vcl/source/gdi/textlayout \ + vcl/source/gdi/virdev \ + vcl/source/gdi/wall \ + vcl/source/glyphs/gcach_ftyp \ + vcl/source/glyphs/gcach_layout \ + vcl/source/glyphs/gcach_rbmp \ + vcl/source/glyphs/glyphcache \ + vcl/source/glyphs/graphite_adaptors \ + vcl/source/glyphs/graphite_cache \ + vcl/source/glyphs/graphite_features \ + vcl/source/glyphs/graphite_layout \ + vcl/source/glyphs/graphite_serverfont \ + vcl/source/glyphs/graphite_textsrc \ + vcl/source/helper/canvasbitmap \ + vcl/source/helper/canvastools \ + vcl/source/helper/evntpost \ + vcl/source/helper/lazydelete \ + vcl/source/helper/strhelper \ + vcl/source/helper/threadex \ + vcl/source/helper/xconnection \ + vcl/source/salmain/salmain \ + vcl/source/window/abstdlg \ + vcl/source/window/accel \ + vcl/source/window/accmgr \ + vcl/source/window/arrange \ + vcl/source/window/brdwin \ + vcl/source/window/btndlg \ + vcl/source/window/cmdevt \ + vcl/source/window/cursor \ + vcl/source/window/decoview \ + vcl/source/window/dialog \ + vcl/source/window/dlgctrl \ + vcl/source/window/dndevdis \ + vcl/source/window/dndlcon \ + vcl/source/window/dockingarea \ + vcl/source/window/dockmgr \ + vcl/source/window/dockwin \ + vcl/source/window/floatwin \ + vcl/source/window/introwin \ + vcl/source/window/javachild \ + vcl/source/window/keycod \ + vcl/source/window/keyevent \ + vcl/source/window/menu \ + vcl/source/window/mnemonic \ + vcl/source/window/mnemonicengine \ + vcl/source/window/mouseevent \ + vcl/source/window/msgbox \ + vcl/source/window/popupmenuwindow \ + vcl/source/window/printdlg \ + vcl/source/window/scrwnd \ + vcl/source/window/seleng \ + vcl/source/window/split \ + vcl/source/window/splitwin \ + vcl/source/window/status \ + vcl/source/window/syschild \ + vcl/source/window/syswin \ + vcl/source/window/tabdlg \ + vcl/source/window/tabpage \ + vcl/source/window/taskpanelist \ + vcl/source/window/toolbox2 \ + vcl/source/window/toolbox \ + vcl/source/window/window2 \ + vcl/source/window/window3 \ + vcl/source/window/window4 \ + vcl/source/window/window \ + vcl/source/window/winproc \ + vcl/source/window/wpropset \ + vcl/source/window/wrkwin \ +)) + +ifeq ($(GUI),UNX) +$(eval $(call gb_Library_add_exception_objects,vcl,\ + vcl/unx/generic/plugadapt/salplug \ +)) +$(eval $(call gb_Library_set_defs,vcl,\ + $$(DEFS) \ + -DSAL_DLLPREFIX=\"$(gb_Library_SYSPRE)\" \ + -DSAL_DLLPOSTFIX=\"$(gb_Library_OOOEXT)\" \ + -D_XSALSET_LIBNAME=\"$(gb_Library_SYSPRE)spa$(gb_Library_OOOEXT)\" \ +)) +ifneq ($(ENABLE_FONTCONFIG),) +$(eval $(call gb_Library_set_defs,vcl,\ + $$(DEFS) \ + -DENABLE_FONTCONFIG \ +)) +endif +endif + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,vcl,\ + dl \ + m \ + pthread \ +)) +endif + +ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Library_add_linked_libs,vcl,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + advapi32 \ + kernel32 \ + mpr \ + msvcrt \ + ole32 \ + shell32 \ + user32 \ + uuid \ +)) +else +$(eval $(call gb_Library_add_linked_libs,vcl,\ + advapi32 \ + kernel32 \ + mpr \ + msvcrt \ + oldnames \ + ole32 \ + shell32 \ + user32 \ + uuid \ + uwinapi \ +)) +endif +endif +# vim: set noet sw=4 ts=4: diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk new file mode 100644 index 000000000000..c7eb9b2b214e --- /dev/null +++ b/vcl/Library_vclplug_gen.mk @@ -0,0 +1,129 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,vclplug_gen)) + +$(eval $(call gb_Library_add_precompiled_header,vclplug_gen,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) + +$(eval $(call gb_Library_set_include,vclplug_gen,\ + $$(INCLUDE) \ + -I$(SRCDIR)/vcl/inc \ + -I$(SRCDIR)/vcl/inc/pch \ + -I$(SRCDIR)/solenv/inc \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc/stl \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_Library_add_linked_libs,vclplug_gen,\ + vcl \ + tl \ + utl \ + sot \ + ucbhelper \ + basegfx \ + comphelper \ + cppuhelper \ + icuuc \ + icule \ + i18nisolang1 \ + i18npaper \ + i18nutil \ + jvmaccess \ + stl \ + cppu \ + sal \ + vos3 \ + X11 \ + Xext \ + SM \ + ICE \ +)) + +$(eval $(call gb_Library_add_exception_objects,vclplug_gen,\ + vcl/unx/generic/app/i18n_cb \ + vcl/unx/generic/app/i18n_ic \ + vcl/unx/generic/app/i18n_im \ + vcl/unx/generic/app/i18n_keysym \ + vcl/unx/generic/app/i18n_status \ + vcl/unx/generic/app/i18n_wrp \ + vcl/unx/generic/app/i18n_xkb \ + vcl/unx/generic/app/keysymnames \ + vcl/unx/generic/app/randrwrapper \ + vcl/unx/generic/app/saldata \ + vcl/unx/generic/app/saldisp \ + vcl/unx/generic/app/salinst \ + vcl/unx/generic/app/salsys \ + vcl/unx/generic/app/saltimer \ + vcl/unx/generic/app/sm \ + vcl/unx/generic/app/soicon \ + vcl/unx/generic/app/wmadaptor \ + vcl/unx/generic/dtrans/bmp \ + vcl/unx/generic/dtrans/config \ + vcl/unx/generic/dtrans/X11_clipboard \ + vcl/unx/generic/dtrans/X11_dndcontext \ + vcl/unx/generic/dtrans/X11_droptarget \ + vcl/unx/generic/dtrans/X11_selection \ + vcl/unx/generic/dtrans/X11_service \ + vcl/unx/generic/dtrans/X11_transferable \ + vcl/unx/generic/gdi/cdeint \ + vcl/unx/generic/gdi/dtint \ + vcl/unx/generic/gdi/gcach_xpeer \ + vcl/unx/generic/gdi/pspgraphics \ + vcl/unx/generic/gdi/salbmp \ + vcl/unx/generic/gdi/salcvt \ + vcl/unx/generic/gdi/salgdi2 \ + vcl/unx/generic/gdi/salgdi3 \ + vcl/unx/generic/gdi/salgdi \ + vcl/unx/generic/gdi/salprnpsp \ + vcl/unx/generic/gdi/salvd \ + vcl/unx/generic/gdi/xrender_peer \ + vcl/unx/generic/printergfx/bitmap_gfx \ + vcl/unx/generic/printergfx/common_gfx \ + vcl/unx/generic/printergfx/glyphset \ + vcl/unx/generic/printergfx/printerjob \ + vcl/unx/generic/printergfx/psputil \ + vcl/unx/generic/printergfx/text_gfx \ + vcl/unx/generic/window/FWS \ + vcl/unx/generic/window/salframe \ + vcl/unx/generic/window/salobj \ +)) + +$(eval $(call gb_Library_set_defs,vclplug_gen,\ + $$(DEFS) \ + -D_XSALSET_LIBNAME=\"$(gb_Library_SYSPRE)spa$(gb_Library_OOOEXT)\" \ + -DVCLPLUG_GEN_IMPLEMENTATION \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,vclplug_gen,\ + dl \ + m \ + pthread \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/vcl/Library_vclplug_gtk.mk b/vcl/Library_vclplug_gtk.mk new file mode 100644 index 000000000000..3107702680a0 --- /dev/null +++ b/vcl/Library_vclplug_gtk.mk @@ -0,0 +1,117 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,vclplug_gtk)) + +$(eval $(call gb_Library_add_precompiled_header,vclplug_gtk,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) + +$(eval $(call gb_Library_set_include,vclplug_gtk,\ + $$(INCLUDE) \ + -I$(SRCDIR)/vcl/inc \ + -I$(SRCDIR)/vcl/inc/pch \ + -I$(SRCDIR)/solenv/inc \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc/stl \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_Library_set_cxxflags,vclplug_gtk,\ + $$(CXXFLAGS) \ + $$(GTK_CFLAGS) \ +)) + +$(eval $(call gb_Library_set_defs,vclplug_gtk,\ + $$(DEFS) \ + -DVCLPLUG_GTK_IMPLEMENTATION \ + -DVERSION=\"$(UPD)$(LAST_MINOR)\" \ +)) + +$(eval $(call gb_Library_set_ldflags,vclplug_gtk,\ + $$(LDFLAGS) \ + $$(GTK_LIBS)\ +)) + +$(eval $(call gb_Library_add_linked_libs,vclplug_gtk,\ + vclplug_gen \ + vcl \ + tl \ + utl \ + sot \ + ucbhelper \ + basegfx \ + comphelper \ + cppuhelper \ + icuuc \ + icule \ + i18nisolang1 \ + i18npaper \ + i18nutil \ + jvmaccess \ + stl \ + cppu \ + sal \ + vos3 \ + X11 \ + Xext \ + SM \ + ICE \ +)) + +$(eval $(call gb_Library_add_exception_objects,vclplug_gtk,\ + vcl/unx/gtk/a11y/atkaction \ + vcl/unx/gtk/a11y/atkbridge \ + vcl/unx/gtk/a11y/atkcomponent \ + vcl/unx/gtk/a11y/atkeditabletext \ + vcl/unx/gtk/a11y/atkfactory \ + vcl/unx/gtk/a11y/atkhypertext \ + vcl/unx/gtk/a11y/atkimage \ + vcl/unx/gtk/a11y/atklistener \ + vcl/unx/gtk/a11y/atkregistry \ + vcl/unx/gtk/a11y/atkselection \ + vcl/unx/gtk/a11y/atktable \ + vcl/unx/gtk/a11y/atktextattributes \ + vcl/unx/gtk/a11y/atktext \ + vcl/unx/gtk/a11y/atkutil \ + vcl/unx/gtk/a11y/atkvalue \ + vcl/unx/gtk/a11y/atkwindow \ + vcl/unx/gtk/a11y/atkwrapper \ + vcl/unx/gtk/app/gtkdata \ + vcl/unx/gtk/app/gtkinst \ + vcl/unx/gtk/app/gtksys \ + vcl/unx/gtk/gdi/salnativewidgets-gtk \ + vcl/unx/gtk/window/gtkframe \ + vcl/unx/gtk/window/gtkobject \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,vclplug_gtk,\ + dl \ + m \ + pthread \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/vcl/Library_vclplug_kde.mk b/vcl/Library_vclplug_kde.mk new file mode 100644 index 000000000000..4ea34bd0fb8a --- /dev/null +++ b/vcl/Library_vclplug_kde.mk @@ -0,0 +1,95 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,vclplug_kde)) + +$(eval $(call gb_Library_add_precompiled_header,vclplug_kde,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) + +$(eval $(call gb_Library_set_include,vclplug_kde,\ + $$(INCLUDE) \ + -I$(SRCDIR)/vcl/inc \ + -I$(SRCDIR)/vcl/inc/pch \ + -I$(SRCDIR)/solenv/inc \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc/stl \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_Library_set_cxxflags,vclplug_kde,\ + $$(CXXFLAGS) \ + $$(KDE_CFLAGS) \ +)) + +$(eval $(call gb_Library_set_defs,vclplug_kde,\ + $$(DEFS) \ + -DVCLPLUG_KDE_IMPLEMENTATION \ +)) + +$(eval $(call gb_Library_set_ldflags,vclplug_kde,\ + $$(KDE_LIBS)\ + $$(LDFLAGS) \ +)) + +$(eval $(call gb_Library_add_linked_libs,vclplug_kde,\ + vclplug_gen \ + vcl \ + tl \ + utl \ + sot \ + ucbhelper \ + basegfx \ + comphelper \ + cppuhelper \ + icuuc \ + icule \ + i18nisolang1 \ + i18npaper \ + i18nutil \ + jvmaccess \ + stl \ + cppu \ + sal \ + vos3 \ + X11 \ + Xext \ + SM \ + ICE \ +)) + +$(eval $(call gb_Library_add_exception_objects,vclplug_kde,\ + vcl/unx/kde/kdedata \ + vcl/unx/kde/salnativewidgets-kde \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,vclplug_kde,\ + dl \ + m \ + pthread \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/vcl/Library_vclplug_kde4.mk b/vcl/Library_vclplug_kde4.mk new file mode 100644 index 000000000000..d7204583e8f0 --- /dev/null +++ b/vcl/Library_vclplug_kde4.mk @@ -0,0 +1,101 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,vclplug_kde4)) + +$(eval $(call gb_Library_add_precompiled_header,vclplug_kde4,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) + +$(eval $(call gb_Library_set_include,vclplug_kde4,\ + $$(INCLUDE) \ + -I$(SRCDIR)/vcl/inc \ + -I$(SRCDIR)/vcl/inc/pch \ + -I$(SRCDIR)/solenv/inc \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc/stl \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_Library_set_cxxflags,vclplug_kde4,\ + $$(CXXFLAGS) \ + $$(KDE4_CFLAGS) \ +)) + +$(eval $(call gb_Library_set_defs,vclplug_kde4,\ + $$(DEFS) \ + -DVCLPLUG_KDE4_IMPLEMENTATION \ +)) + +$(eval $(call gb_Library_set_ldflags,vclplug_kde4,\ + $$(KDE4_LIBS)\ + $$(LDFLAGS) \ +)) + +$(eval $(call gb_Library_add_linked_libs,vclplug_kde4,\ + vclplug_gen \ + vcl \ + tl \ + utl \ + sot \ + ucbhelper \ + basegfx \ + comphelper \ + cppuhelper \ + icuuc \ + icule \ + i18nisolang1 \ + i18npaper \ + i18nutil \ + jvmaccess \ + stl \ + cppu \ + sal \ + vos3 \ + X11 \ + Xext \ + SM \ + ICE \ +)) + +$(eval $(call gb_Library_add_exception_objects,vclplug_kde4,\ + vcl/unx/kde4/KDEData \ + vcl/unx/kde4/KDESalDisplay \ + vcl/unx/kde4/KDESalFrame \ + vcl/unx/kde4/KDESalGraphics \ + vcl/unx/kde4/KDESalInstance \ + vcl/unx/kde4/KDEXLib \ + vcl/unx/kde4/main \ + vcl/unx/kde4/VCLKDEApplication \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,vclplug_kde4,\ + dl \ + m \ + pthread \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/vcl/Library_vclplug_svp.mk b/vcl/Library_vclplug_svp.mk new file mode 100644 index 000000000000..c559cf6d6c8e --- /dev/null +++ b/vcl/Library_vclplug_svp.mk @@ -0,0 +1,99 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,vclplug_svp)) + +$(eval $(call gb_Library_add_precompiled_header,vclplug_svp,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) + +$(eval $(call gb_Library_set_include,vclplug_svp,\ + $$(INCLUDE) \ + -I$(SRCDIR)/vcl/inc \ + -I$(SRCDIR)/vcl/inc/pch \ + -I$(SRCDIR)/solenv/inc \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc/stl \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_Library_set_defs,vclplug_svp,\ + $$(DEFS) \ + -DVCLPLUG_SVP_IMPLEMENTATION \ +)) + +$(eval $(call gb_Library_add_linked_libs,vclplug_svp,\ + vcl \ + tl \ + utl \ + sot \ + ucbhelper \ + basegfx \ + basebmp \ + comphelper \ + cppuhelper \ + icuuc \ + icule \ + i18nisolang1 \ + i18npaper \ + i18nutil \ + jvmaccess \ + stl \ + cppu \ + sal \ + vos3 \ + X11 \ + Xext \ + SM \ + ICE \ +)) + +$(eval $(call gb_Library_add_exception_objects,vclplug_svp,\ + vcl/unx/generic/printergfx/bitmap_gfx \ + vcl/unx/generic/printergfx/common_gfx \ + vcl/unx/generic/printergfx/glyphset \ + vcl/unx/generic/printergfx/printerjob \ + vcl/unx/generic/printergfx/psputil \ + vcl/unx/generic/printergfx/text_gfx \ + vcl/unx/headless/svpbmp \ + vcl/unx/headless/svpdummies \ + vcl/unx/headless/svpelement \ + vcl/unx/headless/svpframe \ + vcl/unx/headless/svpgdi \ + vcl/unx/headless/svpinst \ + vcl/unx/headless/svpprn \ + vcl/unx/headless/svppspgraphics \ + vcl/unx/headless/svptext \ + vcl/unx/headless/svpvd \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,vclplug_svp,\ + dl \ + m \ + pthread \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/vcl/Makefile b/vcl/Makefile new file mode 100644 index 000000000000..a79aff831024 --- /dev/null +++ b/vcl/Makefile @@ -0,0 +1,38 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +ifeq ($(strip $(SOLARENV)),) +$(error No environment set!) +endif + +gb_PARTIALBUILD := T +GBUILDDIR := $(SOLARENV)/gbuild +include $(GBUILDDIR)/gbuild.mk + +$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk))) + +# vim: set noet sw=4 ts=4: diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk new file mode 100644 index 000000000000..5cb49b312507 --- /dev/null +++ b/vcl/Module_vcl.mk @@ -0,0 +1,63 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + + +$(eval $(call gb_Module_Module,vcl)) + +$(eval $(call gb_Module_add_targets,vcl,\ + Library_vcl \ + Package_inc \ +)) +# FIXME: WiP +# StaticLibrary_vclmain \ + +ifeq ($(GUI),UNX) +$(eval $(call gb_Module_add_targets,vcl,\ + Library_vclplug_gen \ + Library_vclplug_svp \ + Library_desktop_detector \ +)) + +ifneq ($(ENABLE_GTK),) +$(eval $(call gb_Module_add_targets,vcl,\ + Library_vclplug_gtk \ +)) +endif +ifneq ($(ENABLE_KDE),) +$(eval $(call gb_Module_add_targets,vcl,\ + Library_vclplug_kde \ +)) +endif +ifneq ($(ENABLE_KDE4),) +$(eval $(call gb_Module_add_targets,vcl,\ + Library_vclplug_kde4 \ +)) +endif +endif + + +# vim: set noet sw=4 ts=4: diff --git a/vcl/Package_inc.mk b/vcl/Package_inc.mk new file mode 100644 index 000000000000..f3177b01c5dd --- /dev/null +++ b/vcl/Package_inc.mk @@ -0,0 +1,164 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,vcl_inc,$(SRCDIR)/vcl/inc)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/abstdlg.hxx,vcl/abstdlg.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/accel.hxx,vcl/accel.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/alpha.hxx,vcl/alpha.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/animate.hxx,vcl/animate.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/apptypes.hxx,vcl/apptypes.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/arrange.hxx,vcl/arrange.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/bitmapex.hxx,vcl/bitmapex.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/bitmap.hxx,vcl/bitmap.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/bmpacc.hxx,vcl/bmpacc.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/btndlg.hxx,vcl/btndlg.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/button.hxx,vcl/button.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/canvastools.hxx,vcl/canvastools.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/cmdevt.h,vcl/cmdevt.h)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/cmdevt.hxx,vcl/cmdevt.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/combobox.h,vcl/combobox.h)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/combobox.hxx,vcl/combobox.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/configsettings.hxx,vcl/configsettings.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/controllayout.hxx,vcl/controllayout.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/ctrl.hxx,vcl/ctrl.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/cursor.hxx,vcl/cursor.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/cvtgrf.hxx,vcl/cvtgrf.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/cvtsvm.hxx,vcl/cvtsvm.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/decoview.hxx,vcl/decoview.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/dialog.hxx,vcl/dialog.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/dllapi.h,vcl/dllapi.h)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/dndhelp.hxx,vcl/dndhelp.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/dockingarea.hxx,vcl/dockingarea.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/dockwin.hxx,vcl/dockwin.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/edit.hxx,vcl/edit.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/event.hxx,vcl/event.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/evntpost.hxx,vcl/evntpost.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/extoutdevdata.hxx,vcl/extoutdevdata.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/field.hxx,vcl/field.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/fixbrd.hxx,vcl/fixbrd.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/fixed.hxx,vcl/fixed.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/floatwin.hxx,vcl/floatwin.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/fntstyle.hxx,vcl/fntstyle.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/font.hxx,vcl/font.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/fontmanager.hxx,vcl/fontmanager.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/gdimtf.hxx,vcl/gdimtf.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/gfxlink.hxx,vcl/gfxlink.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/gradient.hxx,vcl/gradient.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/graph.h,vcl/graph.h)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/graph.hxx,vcl/graph.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/graphictools.hxx,vcl/graphictools.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/group.hxx,vcl/group.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/hatch.hxx,vcl/hatch.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/helper.hxx,vcl/helper.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/help.hxx,vcl/help.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/i18nhelp.hxx,vcl/i18nhelp.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/image.hxx,vcl/image.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/ImageListProvider.hxx,vcl/ImageListProvider.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/imagerepository.hxx,vcl/imagerepository.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/imgctrl.hxx,vcl/imgctrl.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/impdel.hxx,vcl/impdel.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/inputctx.hxx,vcl/inputctx.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/introwin.hxx,vcl/introwin.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/javachild.hxx,vcl/javachild.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/jobdata.hxx,vcl/jobdata.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/jobset.hxx,vcl/jobset.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/keycodes.hxx,vcl/keycodes.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/keycod.hxx,vcl/keycod.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/lazydelete.hxx,vcl/lazydelete.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/lineinfo.hxx,vcl/lineinfo.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/longcurr.hxx,vcl/longcurr.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/lstbox.h,vcl/lstbox.h)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/lstbox.hxx,vcl/lstbox.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/mapmod.hxx,vcl/mapmod.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/menubtn.hxx,vcl/menubtn.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/menu.hxx,vcl/menu.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/metaact.hxx,vcl/metaact.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/metric.hxx,vcl/metric.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/mnemonicengine.hxx,vcl/mnemonicengine.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/mnemonic.hxx,vcl/mnemonic.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/morebtn.hxx,vcl/morebtn.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/msgbox.hxx,vcl/msgbox.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/octree.hxx,vcl/octree.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/oldprintadaptor.hxx,vcl/oldprintadaptor.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/outdev.hxx,vcl/outdev.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/pdfextoutdevdata.hxx,vcl/pdfextoutdevdata.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/pdfwriter.hxx,vcl/pdfwriter.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/pngread.hxx,vcl/pngread.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/pngwrite.hxx,vcl/pngwrite.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/pointr.hxx,vcl/pointr.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/popupmenuwindow.hxx,vcl/popupmenuwindow.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/ppdparser.hxx,vcl/ppdparser.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/printerinfomanager.hxx,vcl/printerinfomanager.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/print.hxx,vcl/print.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/prntypes.hxx,vcl/prntypes.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/ptrstyle.hxx,vcl/ptrstyle.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/quickselectionengine.hxx,vcl/quickselectionengine.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/regband.hxx,vcl/regband.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/region.hxx,vcl/region.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/salbtype.hxx,vcl/salbtype.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/salctype.hxx,vcl/salctype.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/salgtype.hxx,vcl/salgtype.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/salnativewidgets.hxx,vcl/salnativewidgets.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/scrbar.hxx,vcl/scrbar.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/seleng.hxx,vcl/seleng.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/settings.hxx,vcl/settings.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/slider.hxx,vcl/slider.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/sndstyle.hxx,vcl/sndstyle.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/sound.hxx,vcl/sound.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/spinfld.hxx,vcl/spinfld.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/spin.h,vcl/spin.h)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/spin.hxx,vcl/spin.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/split.hxx,vcl/split.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/splitwin.hxx,vcl/splitwin.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/status.hxx,vcl/status.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/stdtext.hxx,vcl/stdtext.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/strhelper.hxx,vcl/strhelper.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/svapp.hxx,vcl/svapp.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/sv.h,vcl/sv.h)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/symbol.hxx,vcl/symbol.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/syschild.hxx,vcl/syschild.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/sysdata.hxx,vcl/sysdata.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/syswin.hxx,vcl/syswin.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/tabctrl.hxx,vcl/tabctrl.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/tabdlg.hxx,vcl/tabdlg.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/tabpage.hxx,vcl/tabpage.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/taskpanelist.hxx,vcl/taskpanelist.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/threadex.hxx,vcl/threadex.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/timer.hxx,vcl/timer.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/toolbox.hxx,vcl/toolbox.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/unohelp2.hxx,vcl/unohelp2.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/unohelp.hxx,vcl/unohelp.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/unowrap.hxx,vcl/unowrap.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/vclenum.hxx,vcl/vclenum.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/vclevent.hxx,vcl/vclevent.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/virdev.hxx,vcl/virdev.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/waitobj.hxx,vcl/waitobj.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/wall.hxx,vcl/wall.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/window.hxx,vcl/window.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/wpropset.hxx,vcl/wpropset.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/wrkwin.hxx,vcl/wrkwin.hxx)) + diff --git a/vcl/StaticLibrary_vclmain.mk b/vcl/StaticLibrary_vclmain.mk new file mode 100755 index 000000000000..9e6275f345d5 --- /dev/null +++ b/vcl/StaticLibrary_vclmain.mk @@ -0,0 +1,54 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_StaticLibrary_StaticLibrary,vclmain)) + +$(eval $(call gb_StaticLibrary_add_package_headers,vclmain,vcl_inc)) + +$(eval $(call gb_StaticLibrary_add_exception_objects,vclmain,\ + vcl/source/salmain/salmain \ +)) + +# HACK for now +# We really should fix the clients of this to link against the static library +# Instead of this evil linking of an object from $(OUTDIR) +define StaticLibrary_salmain_hack +$(call gb_StaticLibrary_get_target,vclmain) : $(OUTDIR)/lib/$(1) +$$(eval $$(call gb_Deliver_add_deliverable,$(OUTDIR)/lib/$(1),$(call gb_CxxObject_get_target,vcl/source/salmain/salmain))) + +$(OUTDIR)/lib/$(1) : $(call gb_CxxObject_get_target,vcl/source/salmain/salmain) + $$(call gb_Deliver_deliver,$$<,$$@) + +endef + +ifeq ($(OS),WNT) +$(eval $(call StaticLibrary_salmain_hack,salmain.obj)) +else +$(eval $(call StaticLibrary_salmain_hack,salmain.o)) +endif + +# vim: set noet sw=4 ts=4: diff --git a/vcl/inc/fontsubset.hxx b/vcl/inc/fontsubset.hxx index a34212128741..a57f5f0fd553 100644 --- a/vcl/inc/fontsubset.hxx +++ b/vcl/inc/fontsubset.hxx @@ -32,9 +32,11 @@ #include #include +#include "vcl/dllapi.h" + namespace vcl { struct _TrueTypeFont; } // SFT's idea of a TTF font -class FontSubsetInfo +class VCL_DLLPUBLIC FontSubsetInfo { public: explicit FontSubsetInfo( void ); diff --git a/vcl/inc/saldatabasic.hxx b/vcl/inc/saldatabasic.hxx index b9438e97c06e..ead0e0974713 100644 --- a/vcl/inc/saldatabasic.hxx +++ b/vcl/inc/saldatabasic.hxx @@ -32,6 +32,8 @@ #include #include +#include "vcl/dllapi.h" + namespace psp { class PrinterInfoManager; diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx index 88ba2844e1e0..7758545dd37c 100644 --- a/vcl/inc/sft.hxx +++ b/vcl/inc/sft.hxx @@ -68,6 +68,8 @@ #include +#include "vcl/dllapi.h" + #include namespace vcl @@ -286,7 +288,7 @@ namespace vcl * @return value of SFErrCodes enum * @ingroup sft */ - int OpenTTFontBuffer(void* pBuffer, sal_uInt32 nLen, sal_uInt32 facenum, TrueTypeFont** ttf); /*FOLD01*/ + int VCL_DLLPUBLIC OpenTTFontBuffer(void* pBuffer, sal_uInt32 nLen, sal_uInt32 facenum, TrueTypeFont** ttf); /*FOLD01*/ #if !defined(WIN32) && !defined(OS2) /** * TrueTypeFont constructor. @@ -297,14 +299,14 @@ namespace vcl * @return value of SFErrCodes enum * @ingroup sft */ - int OpenTTFontFile(const char *fname, sal_uInt32 facenum, TrueTypeFont** ttf); + int VCL_DLLPUBLIC OpenTTFontFile(const char *fname, sal_uInt32 facenum, TrueTypeFont** ttf); #endif /** * TrueTypeFont destructor. Deallocates the memory. * @ingroup sft */ - void CloseTTFont(TrueTypeFont *); + void VCL_DLLPUBLIC CloseTTFont(TrueTypeFont *); /** * Extracts TrueType control points, and stores them in an allocated array pointed to @@ -505,7 +507,7 @@ namespace vcl * MapString() replaces the UCS-2 characters in str with glyphIDs. * @ingroup sft */ - int MapString(TrueTypeFont *ttf, sal_uInt16 *str, int nchars, sal_uInt16 *glyphArray, int bvertical); + int VCL_DLLPUBLIC MapString(TrueTypeFont *ttf, sal_uInt16 *str, int nchars, sal_uInt16 *glyphArray, int bvertical); /** * Maps a Unicode (UCS-2) character to a glyph ID and returns it. Missing glyph has diff --git a/vcl/inc/unx/gtk/atkbridge.hxx b/vcl/inc/unx/gtk/atkbridge.hxx index 959b3aec1fb1..9d51ed0cc194 100644 --- a/vcl/inc/unx/gtk/atkbridge.hxx +++ b/vcl/inc/unx/gtk/atkbridge.hxx @@ -28,9 +28,9 @@ #ifndef __ATK_BRIDGE_HXX__ #define __ATK_BRIDGE_HXX__ -#include +#include -bool VCL_DLLPUBLIC InitAtkBridge(void); -void VCL_DLLPUBLIC DeInitAtkBridge(void); +bool VCLPLUG_GTK_PUBLIC InitAtkBridge(void); +void VCLPLUG_GTK_PUBLIC DeInitAtkBridge(void); #endif diff --git a/vcl/inc/unx/i18n_im.hxx b/vcl/inc/unx/i18n_im.hxx index a22a57b976c8..c54749772dd3 100644 --- a/vcl/inc/unx/i18n_im.hxx +++ b/vcl/inc/unx/i18n_im.hxx @@ -28,13 +28,13 @@ #ifndef _SAL_I18N_INPUTMETHOD_HXX #define _SAL_I18N_INPUTMETHOD_HXX -#include +#include extern "C" char* GetMethodName( XIMStyle nStyle, char *pBuf, int nBufSize); #define bUseInputMethodDefault True -class VCL_DLLPUBLIC SalI18N_InputMethod +class VCLPLUG_GEN_PUBLIC SalI18N_InputMethod { Bool mbUseable; // system supports locale as well as status // and preedit style ? diff --git a/vcl/inc/unx/i18n_xkb.hxx b/vcl/inc/unx/i18n_xkb.hxx index db6517cbea0b..2d75ea6f7d23 100644 --- a/vcl/inc/unx/i18n_xkb.hxx +++ b/vcl/inc/unx/i18n_xkb.hxx @@ -29,9 +29,9 @@ #define _SAL_I18N_XKBDEXTENSION_HXX #include -#include +#include -class VCL_DLLPUBLIC SalI18N_KeyboardExtension +class VCLPLUG_GEN_PUBLIC SalI18N_KeyboardExtension { private: diff --git a/vcl/inc/unx/pspgraphics.h b/vcl/inc/unx/pspgraphics.h index f0015c301229..b78c1916ae78 100644 --- a/vcl/inc/unx/pspgraphics.h +++ b/vcl/inc/unx/pspgraphics.h @@ -30,8 +30,8 @@ #include "vcl/fontmanager.hxx" -#include "vcl/dllapi.h" +#include "vclpluginapi.h" #include "salgdi.hxx" #include "sallayout.hxx" @@ -41,7 +41,7 @@ class ServerFont; class ImplDevFontAttributes; class SalInfoPrinter; -class VCL_DLLPUBLIC PspGraphics : public SalGraphics +class VCLPLUG_GEN_PUBLIC PspGraphics : public SalGraphics { psp::JobData* m_pJobData; psp::PrinterGfx* m_pPrinterGfx; diff --git a/vcl/inc/unx/salbmp.h b/vcl/inc/unx/salbmp.h index 1da035536179..5f70373322fc 100644 --- a/vcl/inc/unx/salbmp.h +++ b/vcl/inc/unx/salbmp.h @@ -34,7 +34,7 @@ #endif #include #include -#include +#include struct BitmapBuffer; class BitmapPalette; @@ -46,7 +46,7 @@ class ImplSalBitmapCache; // - SalBitmap - // ------------- -class VCL_DLLPUBLIC X11SalBitmap : public SalBitmap +class VCLPLUG_GEN_PUBLIC X11SalBitmap : public SalBitmap { private: diff --git a/vcl/inc/unx/saldata.hxx b/vcl/inc/unx/saldata.hxx index 566d17e98a32..ea2a9994baed 100644 --- a/vcl/inc/unx/saldata.hxx +++ b/vcl/inc/unx/saldata.hxx @@ -37,7 +37,7 @@ #ifndef _OSL_MODULE_H #include #endif -#include +#include // -=-= forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= class SalXLib; @@ -55,7 +55,7 @@ typedef unsigned int pthread_t; #endif // -=-= SalData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -class VCL_DLLPUBLIC X11SalData : public SalData +class VCLPLUG_GEN_PUBLIC X11SalData : public SalData { protected: BOOL bNoExceptions_; diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx index c83c1c56e1c5..6ed61c4a24c8 100644 --- a/vcl/inc/unx/saldisp.hxx +++ b/vcl/inc/unx/saldisp.hxx @@ -49,7 +49,8 @@ class SalXLib; #include #include #include -#include + +#include // -=-= forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= class BitmapPalette; @@ -208,7 +209,7 @@ public: typedef int(*YieldFunc)(int fd, void* data); struct YieldEntry; -class VCL_DLLPUBLIC SalXLib +class VCLPLUG_GEN_PUBLIC SalXLib { protected: timeval m_aTimeout; @@ -279,7 +280,7 @@ extern "C" { typedef Bool(*X_if_predicate)(Display*,XEvent*,XPointer); } -class VCL_DLLPUBLIC SalDisplay +class VCLPLUG_GEN_PUBLIC SalDisplay { public: struct RenderEntry @@ -524,7 +525,7 @@ inline GC SalDisplay::GetGC( USHORT nDepth, int nScreen ) const inline Display *SalColormap::GetXDisplay() const { return m_pDisplay->GetDisplay(); } -class VCL_DLLPUBLIC SalX11Display : public SalDisplay +class VCLPLUG_GEN_PUBLIC SalX11Display : public SalDisplay { public: SalX11Display( Display* pDisp ); diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h index 9f063975173d..3526e12badfe 100644 --- a/vcl/inc/unx/salframe.h +++ b/vcl/inc/unx/salframe.h @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include @@ -57,7 +57,7 @@ namespace vcl_sal { class WMAdaptor; class NetWMAdaptor; class GnomeWMAdaptor; } #define SHOWSTATE_NORMAL 1 #define SHOWSTATE_HIDDEN 2 -class VCL_DLLPUBLIC X11SalFrame : public SalFrame +class VCLPLUG_GEN_PUBLIC X11SalFrame : public SalFrame { friend class vcl_sal::WMAdaptor; friend class vcl_sal::NetWMAdaptor; diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h index a8804f1b3778..761df76d7ace 100644 --- a/vcl/inc/unx/salgdi.h +++ b/vcl/inc/unx/salgdi.h @@ -29,13 +29,16 @@ #define _SV_SALGDI_H // -=-= includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +#include "tools/fract.hxx" + +#include "vcl/salgtype.hxx" +#include "vcl/vclenum.hxx" + #include "salstd.hxx" #include "salgdi.hxx" -#include "vcl/salgtype.hxx" -#include "tools/fract.hxx" -#include "vcl/dllapi.h" -#include -#include +#include "sallayout.hxx" +#include "vclpluginapi.h" + #include // -=-= forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= @@ -73,7 +76,7 @@ public: ~CairoFontsCache(); }; -class VCL_DLLPUBLIC X11SalGraphics : public SalGraphics +class VCLPLUG_GEN_PUBLIC X11SalGraphics : public SalGraphics { friend class X11FontLayout; friend class ServerFontLayout; diff --git a/vcl/inc/unx/salinst.h b/vcl/inc/unx/salinst.h index 15cb4f1c7e65..6b21737f81f5 100644 --- a/vcl/inc/unx/salinst.h +++ b/vcl/inc/unx/salinst.h @@ -36,10 +36,10 @@ #ifndef _VOS_THREAD_HXX #include #endif -#include +#include #include -class VCL_DLLPUBLIC SalYieldMutex : public vos::OMutex +class VCLPLUG_GEN_PUBLIC SalYieldMutex : public vos::OMutex { protected: ULONG mnCount; @@ -57,7 +57,7 @@ public: }; // -=-= SalInstanceData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -class VCL_DLLPUBLIC X11SalInstance : public SalInstance +class VCLPLUG_GEN_PUBLIC X11SalInstance : public SalInstance { protected: SalYieldMutex* mpSalYieldMutex; diff --git a/vcl/inc/unx/salobj.h b/vcl/inc/unx/salobj.h index d2f63dad99aa..d2da11686b42 100644 --- a/vcl/inc/unx/salobj.h +++ b/vcl/inc/unx/salobj.h @@ -30,8 +30,8 @@ #include #include -#include +#include #include class SalClipRegion @@ -65,7 +65,7 @@ private: }; -class X11SalObject : public SalObject +class VCLPLUG_GEN_PUBLIC X11SalObject : public SalObject { public: SystemChildData maSystemChildData; diff --git a/vcl/inc/unx/salprn.h b/vcl/inc/unx/salprn.h index b65792e1351a..1232b6fbc619 100644 --- a/vcl/inc/unx/salprn.h +++ b/vcl/inc/unx/salprn.h @@ -32,6 +32,7 @@ #include "printergfx.hxx" #include "printerjob.hxx" #include "salprn.hxx" +#include "vclpluginapi.h" class PspGraphics; @@ -107,7 +108,7 @@ public: class Timer; namespace vcl_sal { -class VCL_DLLPUBLIC PrinterUpdate +class VCLPLUG_GEN_PUBLIC PrinterUpdate { static Timer* pPrinterUpdateTimer; static int nActiveJobs; diff --git a/vcl/inc/unx/salsys.h b/vcl/inc/unx/salsys.h index a62a3384a17e..3b21985b8282 100644 --- a/vcl/inc/unx/salsys.h +++ b/vcl/inc/unx/salsys.h @@ -37,11 +37,11 @@ #include #endif #include -#include +#include #include -class VCL_DLLPUBLIC X11SalSystem : public SalSystem +class VCLPLUG_GEN_PUBLIC X11SalSystem : public SalSystem { public: X11SalSystem() {} diff --git a/vcl/inc/unx/sm.hxx b/vcl/inc/unx/sm.hxx index 4c6a0c356c36..f5123f3e7ae0 100644 --- a/vcl/inc/unx/sm.hxx +++ b/vcl/inc/unx/sm.hxx @@ -27,10 +27,11 @@ #ifndef _VCL_SM_HXX #define _VCL_SM_HXX -#include -#include +#include "tools/link.hxx" +#include "unx/salunx.h" #include -#include +#include "salsession.hxx" +#include "vclpluginapi.h" class SessionManagerClient { @@ -60,7 +61,7 @@ class SessionManagerClient DECL_STATIC_LINK( SessionManagerClient, SaveYourselfHdl, void* ); DECL_STATIC_LINK( SessionManagerClient, InteractionHdl, void* ); public: - static VCL_DLLPUBLIC void open(); // needed by other plugins, so export + static VCLPLUG_GEN_PUBLIC void open(); // needed by other plugins, so export static void close(); static bool checkDocumentsSaved(); @@ -69,7 +70,7 @@ public: static void interactionDone( bool bCancelShutdown ); static String getExecName(); - static VCL_DLLPUBLIC const ByteString& getSessionID(); + static VCLPLUG_GEN_PUBLIC const ByteString& getSessionID(); }; class SalFrame; diff --git a/vcl/inc/unx/wmadaptor.hxx b/vcl/inc/unx/wmadaptor.hxx index e8620db29c6f..88f0e62024a9 100644 --- a/vcl/inc/unx/wmadaptor.hxx +++ b/vcl/inc/unx/wmadaptor.hxx @@ -32,12 +32,12 @@ #include #endif #include -#include #ifndef _PREX_H #include #include #include #endif +#include #include class SalDisplay; @@ -45,7 +45,7 @@ class X11SalFrame; namespace vcl_sal { -class VCL_DLLPUBLIC WMAdaptor +class VCLPLUG_GEN_PUBLIC WMAdaptor { public: enum WMAtom { diff --git a/vcl/inc/vcl/jobdata.hxx b/vcl/inc/vcl/jobdata.hxx index 18330ae3508d..fcdcf933bbd3 100644 --- a/vcl/inc/vcl/jobdata.hxx +++ b/vcl/inc/vcl/jobdata.hxx @@ -39,7 +39,7 @@ enum type { }; } -struct JobData +struct VCL_DLLPUBLIC JobData { int m_nCopies; int m_nLeftMarginAdjust; diff --git a/vcl/inc/vcl/ppdparser.hxx b/vcl/inc/vcl/ppdparser.hxx index c7a1e09b81e4..e9272d433d07 100644 --- a/vcl/inc/vcl/ppdparser.hxx +++ b/vcl/inc/vcl/ppdparser.hxx @@ -34,6 +34,8 @@ #include "tools/string.hxx" #include "tools/stream.hxx" +#include "vcl/dllapi.h" + #include "com/sun/star/lang/Locale.hpp" #define PRINTER_PPDDIR "driver" @@ -45,7 +47,7 @@ class PPDTranslator; enum PPDValueType { eInvocation, eQuoted, eSymbol, eString, eNo }; -struct PPDValue +struct VCL_DLLPUBLIC PPDValue { PPDValueType m_eType; String m_aOption; @@ -58,7 +60,7 @@ struct PPDValue * PPDKey - a container for the available options (=values) of a PPD keyword */ -class PPDKey +class VCL_DLLPUBLIC PPDKey { friend class PPDParser; @@ -120,7 +122,7 @@ struct PPDKeyhash class PPDContext; class CUPSManager; -class PPDParser +class VCL_DLLPUBLIC PPDParser { friend class PPDContext; friend class CUPSManager; @@ -296,7 +298,7 @@ public: * contents of a PPDParser. */ -class PPDContext +class VCL_DLLPUBLIC PPDContext { typedef ::std::hash_map< const PPDKey*, const PPDValue*, PPDKeyhash > hash_type; hash_type m_aCurrentValues; diff --git a/vcl/inc/vclpluginapi.h b/vcl/inc/vclpluginapi.h new file mode 100644 index 000000000000..3fe781a7bb97 --- /dev/null +++ b/vcl/inc/vclpluginapi.h @@ -0,0 +1,70 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _VCLPLUGINAPI_H +#define _VCLPLUGINAPI_H + +#include "sal/config.h" +#include "sal/types.h" + +#if defined VCLPLUG_GEN_IMPLEMENTATION +#define VCLPLUG_GEN_PUBLIC SAL_DLLPUBLIC_EXPORT +#else +#define VCLPLUG_GEN_PUBLIC SAL_DLLPUBLIC_IMPORT +#endif + +#if defined VCLPLUG_GTK_IMPLEMENTATION +#define VCLPLUG_GTK_PUBLIC SAL_DLLPUBLIC_EXPORT +#else +#define VCLPLUG_GTK_PUBLIC SAL_DLLPUBLIC_IMPORT +#endif + +#if defined VCLPLUG_KDE_IMPLEMENTATION +#define VCLPLUG_KDE_PUBLIC SAL_DLLPUBLIC_EXPORT +#else +#define VCLPLUG_KDE_PUBLIC SAL_DLLPUBLIC_IMPORT +#endif + +#if defined VCLPLUG_KDE4_IMPLEMENTATION +#define VCLPLUG_KDE4_PUBLIC SAL_DLLPUBLIC_EXPORT +#else +#define VCLPLUG_KDE4_PUBLIC SAL_DLLPUBLIC_IMPORT +#endif + +#if defined VCLPLUG_SVP_IMPLEMENTATION +#define VCLPLUG_SVP_PUBLIC SAL_DLLPUBLIC_EXPORT +#else +#define VCLPLUG_SVP_PUBLIC SAL_DLLPUBLIC_IMPORT +#endif + +#if defined DESKTOP_DETECTOR_IMPLEMENTATION +#define DESKTOP_DETECTOR_PUBLIC SAL_DLLPUBLIC_EXPORT +#else +#define DESKTOP_DETECTOR_PUBLIC SAL_DLLPUBLIC_IMPORT +#endif + +#endif diff --git a/vcl/prj/build.lst b/vcl/prj/build.lst index 6707cf5f4c47..1cebe9d1b319 100644 --- a/vcl/prj/build.lst +++ b/vcl/prj/build.lst @@ -1,57 +1,4 @@ vc vcl : l10n apple_remote BOOST:boost rsc sot ucbhelper unotools ICU:icu GRAPHITE:graphite i18npool i18nutil unoil ridljar X11_EXTENSIONS:x11_extensions offuh basegfx basebmp tools l10ntools icc SO:print_header cpputools shell svl LIBXSLT:libxslt NULL vc vcl usr1 - all vc_mkout NULL -vc vcl\inc nmake - all vc_inc NULL -vc vcl\source\glyphs nmake - all vc_glyphs vc_inc NULL -vc vcl\source\app nmake - all vc_app vc_inc NULL -vc vcl\source\gdi nmake - all vc_gdi vc_inc NULL -vc vcl\source\window nmake - all vc_win vc_inc NULL -vc vcl\source\control nmake - all vc_ctrl vc_inc NULL -vc vcl\source\src nmake - all vc_src vc_inc NULL -vc vcl\source\helper nmake - all vc_hlp vc_inc NULL -vc vcl\source\fontsubset nmake - all vc_fts vc_inc NULL -vc vcl\source\salmain nmake - all vc_salmain vc_inc NULL -vc vcl\os2\source\app nmake - p vc__appp vc_inc NULL -vc vcl\os2\source\gdi nmake - p vc__gdip vc_inc NULL -vc vcl\os2\source\window nmake - p vc__winp vc_inc NULL -vc vcl\os2\source\src nmake - p vc__srcp vc_inc NULL -vc vcl\source\components nmake - all vc_components vc_inc NULL -vc vcl\win\source\app nmake - w vc__appw vc_inc NULL -vc vcl\win\source\gdi nmake - w vc__gdiw vc_inc NULL -vc vcl\win\source\window nmake - w vc__winw vc_inc NULL -vc vcl\win\source\src nmake - w vc__srcw vc_inc NULL -vc vcl\unx\generic\plugadapt nmake - u vc__plug vc_inc NULL -vc vcl\unx\generic\desktopdetect nmake - u vc__desk vc_inc NULL -vc vcl\unx\generic\app nmake - u vc__appu vc_inc NULL -vc vcl\unx\generic\dtrans nmake - u vc__dtru vc_inc NULL -vc vcl\unx\generic\fontmanager nmake - u vc__ftmu vc_inc NULL -vc vcl\unx\generic\gdi nmake - u vc__gdiu vc_inc NULL -vc vcl\unx\generic\printer nmake - u vc__prnu vc_inc NULL -vc vcl\unx\generic\printergfx nmake - u vc__prgu vc_inc NULL -vc vcl\unx\generic\window nmake - u vc__winu vc_inc NULL -vc vcl\unx\gtk\a11y nmake - u vc__gtky vc_inc NULL -vc vcl\unx\gtk\app nmake - u vc__gtka vc_inc NULL -vc vcl\unx\gtk\window nmake - u vc__gtkw vc_inc NULL -vc vcl\unx\gtk\gdi nmake - u vc__gtkg vc_inc NULL -vc vcl\unx\headless nmake - u vc__hl vc_inc NULL -vc vcl\unx\kde nmake - u vc__kde vc_inc NULL -vc vcl\unx\kde4 nmake - u vc__kde4 vc_inc NULL -vc vcl\aqua\source\a11y nmake - u vc__aquy vc_inc NULL -vc vcl\aqua\source\app nmake - u vc__appa vc_inc NULL -vc vcl\aqua\source\dtrans nmake - u vc__dtra vc_inc NULL -vc vcl\aqua\source\gdi nmake - u vc__gdia vc_inc NULL -vc vcl\aqua\source\res nmake - u vc__resa NULL -vc vcl\aqua\source\window nmake - u vc__wina vc_inc NULL -vc vcl\mac\source\app nmake - m vc__appm vc_inc NULL -vc vcl\mac\source\gdi nmake - m vc__gdim vc_inc NULL -vc vcl\mac\source\window nmake - m vc__winm vc_inc NULL -vc vcl\mac\source\src nmake - m vc__srcm vc_inc NULL -vc vcl\util nmake - all vc_util vc__plug.u vc__desk.u vc__aquy.u vc__appa.u vc__dtra.u vc__appm.m vc__appu.u vc__dtru.u vc__appw.w vc__appp.p vc__gdia.u vc__gdim.m vc__gdiu.u vc__gdiw.w vc__gdip.p vc__srcm.m vc__srcw.w vc__srcp.p vc__wina.u vc__winm.m vc__winu.u vc__winw.w vc__winp.p vc__gtka.u vc__gtky.u vc__gtkw.u vc__gtkg.u vc__kde.u vc__kde4.u vc__hl.u vc__ftmu.u vc__prgu.u vc__prnu.u vc_app vc_ctrl vc_gdi vc_hlp vc_src vc_win vc_glyphs vc_fts vc_components NULL -vc vcl\util\linksvp nmake - u vc_lsvp vc_util NULL -vc vcl\workben nmake - all vc_wrkb vc_util vc_salmain NULL - -# memCheck works only within unix -# memCheck is not right yet -# vc vcl\qa\complex\memCheck nmake - u vc_qa_complex vc_util NULL -# GPF -# vc vcl\qa\complex\persistent_window_states nmake - all vc_qa_complex vc_util NULL +vc vcl\prj nmake - all vc_prj NULL diff --git a/vcl/prj/d.lst b/vcl/prj/d.lst index ba5949b00fad..8b137891791f 100644 --- a/vcl/prj/d.lst +++ b/vcl/prj/d.lst @@ -1,154 +1 @@ -mkdir: %COMMON_DEST%\bin%_EXT%\hid -mkdir: %_DEST%\inc%_EXT%\vcl - -..\%COMMON_OUTDIR%\bin\*.zip %COMMON_DEST%\bin%_EXT%\*.zip -..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid -..\%__SRC%\bin\vcl*.res %_DEST%\bin%_EXT%\vcl*.res -..\%__SRC%\bin\vcl?????.dll %_DEST%\bin%_EXT%\vcl?????.dll -..\%__SRC%\bin\vcl?????.sym %_DEST%\bin%_EXT%\vcl?????.sym -..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%\lib*.so -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib -..\%__SRC%\lib\ivcl.lib %_DEST%\lib%_EXT%\ivcl.lib -..\%__SRC%\misc\vcl?????.map %_DEST%\bin%_EXT%\vcl?????.map -..\%__SRC%\misc\vcl.component %_DEST%\xml%_EXT%\vcl.component -..\%__SRC%\obj\salmain.obj %_DEST%\lib%_EXT%\salmain.obj -..\%__SRC%\obj\salmain.o %_DEST%\lib%_EXT%\salmain.o - -..\inc\vcl\ImageListProvider.hxx %_DEST%\inc%_EXT%\vcl\ImageListProvider.hxx -..\inc\vcl\abstdlg.hxx %_DEST%\inc%_EXT%\vcl\abstdlg.hxx -..\inc\vcl\accel.hxx %_DEST%\inc%_EXT%\vcl\accel.hxx -..\inc\vcl\alpha.hxx %_DEST%\inc%_EXT%\vcl\alpha.hxx -..\inc\vcl\animate.hxx %_DEST%\inc%_EXT%\vcl\animate.hxx -..\inc\vcl\apptypes.hxx %_DEST%\inc%_EXT%\vcl\apptypes.hxx -..\inc\vcl\arrange.hxx %_DEST%\inc%_EXT%\vcl\arrange.hxx -..\inc\vcl\arrange.hxx %_DEST%\inc%_EXT%\vcl\arrange.hxx -..\inc\vcl\bitmap.hxx %_DEST%\inc%_EXT%\vcl\bitmap.hxx -..\inc\vcl\bitmapex.hxx %_DEST%\inc%_EXT%\vcl\bitmapex.hxx -..\inc\vcl\bmpacc.hxx %_DEST%\inc%_EXT%\vcl\bmpacc.hxx -..\inc\vcl\btndlg.hxx %_DEST%\inc%_EXT%\vcl\btndlg.hxx -..\inc\vcl\button.hxx %_DEST%\inc%_EXT%\vcl\button.hxx -..\inc\vcl\canvastools.hxx %_DEST%\inc%_EXT%\vcl\canvastools.hxx -..\inc\vcl\cmdevt.h %_DEST%\inc%_EXT%\vcl\cmdevt.h -..\inc\vcl\cmdevt.hxx %_DEST%\inc%_EXT%\vcl\cmdevt.hxx -..\inc\vcl\combobox.h %_DEST%\inc%_EXT%\vcl\combobox.h -..\inc\vcl\combobox.hxx %_DEST%\inc%_EXT%\vcl\combobox.hxx -..\inc\vcl\configsettings.hxx %_DEST%\inc%_EXT%\vcl\configsettings.hxx -..\inc\vcl\controllayout.hxx %_DEST%\inc%_EXT%\vcl\controllayout.hxx -..\inc\vcl\ctrl.hxx %_DEST%\inc%_EXT%\vcl\ctrl.hxx -..\inc\vcl\cursor.hxx %_DEST%\inc%_EXT%\vcl\cursor.hxx -..\inc\vcl\cvtgrf.hxx %_DEST%\inc%_EXT%\vcl\cvtgrf.hxx -..\inc\vcl\cvtsvm.hxx %_DEST%\inc%_EXT%\vcl\cvtsvm.hxx -..\inc\vcl\decoview.hxx %_DEST%\inc%_EXT%\vcl\decoview.hxx -..\inc\vcl\dialog.hxx %_DEST%\inc%_EXT%\vcl\dialog.hxx -..\inc\vcl\dllapi.h %_DEST%\inc%_EXT%\vcl\dllapi.h -..\inc\vcl\dndhelp.hxx %_DEST%\inc%_EXT%\vcl\dndhelp.hxx -..\inc\vcl\dockingarea.hxx %_DEST%\inc%_EXT%\vcl\dockingarea.hxx -..\inc\vcl\dockwin.hxx %_DEST%\inc%_EXT%\vcl\dockwin.hxx -..\inc\vcl\edit.hxx %_DEST%\inc%_EXT%\vcl\edit.hxx -..\inc\vcl\event.hxx %_DEST%\inc%_EXT%\vcl\event.hxx -..\inc\vcl\evntpost.hxx %_DEST%\inc%_EXT%\vcl\evntpost.hxx -..\inc\vcl\extoutdevdata.hxx %_DEST%\inc%_EXT%\vcl\extoutdevdata.hxx -..\inc\vcl\field.hxx %_DEST%\inc%_EXT%\vcl\field.hxx -..\inc\vcl\fixbrd.hxx %_DEST%\inc%_EXT%\vcl\fixbrd.hxx -..\inc\vcl\fixed.hxx %_DEST%\inc%_EXT%\vcl\fixed.hxx -..\inc\vcl\floatwin.hxx %_DEST%\inc%_EXT%\vcl\floatwin.hxx -..\inc\vcl\fntstyle.hxx %_DEST%\inc%_EXT%\vcl\fntstyle.hxx -..\inc\vcl\font.hxx %_DEST%\inc%_EXT%\vcl\font.hxx -..\inc\vcl\fontcvt.hxx %_DEST%\inc%_EXT%\vcl\fontcvt.hxx -..\inc\vcl\fontmanager.hxx %_DEST%\inc%_EXT%\vcl\fontmanager.hxx -..\inc\vcl\gdimtf.hxx %_DEST%\inc%_EXT%\vcl\gdimtf.hxx -..\inc\vcl\gfxlink.hxx %_DEST%\inc%_EXT%\vcl\gfxlink.hxx -..\inc\vcl\gradient.hxx %_DEST%\inc%_EXT%\vcl\gradient.hxx -..\inc\vcl\graph.h %_DEST%\inc%_EXT%\vcl\graph.h -..\inc\vcl\graph.hxx %_DEST%\inc%_EXT%\vcl\graph.hxx -..\inc\vcl\graphictools.hxx %_DEST%\inc%_EXT%\vcl\graphictools.hxx -..\inc\vcl\group.hxx %_DEST%\inc%_EXT%\vcl\group.hxx -..\inc\vcl\hatch.hxx %_DEST%\inc%_EXT%\vcl\hatch.hxx -..\inc\vcl\help.hxx %_DEST%\inc%_EXT%\vcl\help.hxx -..\inc\vcl\helper.hxx %_DEST%\inc%_EXT%\vcl\helper.hxx -..\inc\vcl\i18nhelp.hxx %_DEST%\inc%_EXT%\vcl\i18nhelp.hxx -..\inc\vcl\image.hxx %_DEST%\inc%_EXT%\vcl\image.hxx -..\inc\vcl\imagerepository.hxx %_DEST%\inc%_EXT%\vcl\imagerepository.hxx -..\inc\vcl\imgctrl.hxx %_DEST%\inc%_EXT%\vcl\imgctrl.hxx -..\inc\vcl\impdel.hxx %_DEST%\inc%_EXT%\vcl\impdel.hxx -..\inc\vcl\inputctx.hxx %_DEST%\inc%_EXT%\vcl\inputctx.hxx -..\inc\vcl\introwin.hxx %_DEST%\inc%_EXT%\vcl\introwin.hxx -..\inc\vcl\javachild.hxx %_DEST%\inc%_EXT%\vcl\javachild.hxx -..\inc\vcl\jobdata.hxx %_DEST%\inc%_EXT%\vcl\jobdata.hxx -..\inc\vcl\jobset.hxx %_DEST%\inc%_EXT%\vcl\jobset.hxx -..\inc\vcl\keycod.hxx %_DEST%\inc%_EXT%\vcl\keycod.hxx -..\inc\vcl\keycodes.hxx %_DEST%\inc%_EXT%\vcl\keycodes.hxx -..\inc\vcl\lazydelete.hxx %_DEST%\inc%_EXT%\vcl\lazydelete.hxx -..\inc\vcl\lineinfo.hxx %_DEST%\inc%_EXT%\vcl\lineinfo.hxx -..\inc\vcl\longcurr.hxx %_DEST%\inc%_EXT%\vcl\longcurr.hxx -..\inc\vcl\lstbox.h %_DEST%\inc%_EXT%\vcl\lstbox.h -..\inc\vcl\lstbox.hxx %_DEST%\inc%_EXT%\vcl\lstbox.hxx -..\inc\vcl\mapmod.hxx %_DEST%\inc%_EXT%\vcl\mapmod.hxx -..\inc\vcl\menu.hxx %_DEST%\inc%_EXT%\vcl\menu.hxx -..\inc\vcl\menubtn.hxx %_DEST%\inc%_EXT%\vcl\menubtn.hxx -..\inc\vcl\metaact.hxx %_DEST%\inc%_EXT%\vcl\metaact.hxx -..\inc\vcl\metric.hxx %_DEST%\inc%_EXT%\vcl\metric.hxx -..\inc\vcl\mnemonic.hxx %_DEST%\inc%_EXT%\vcl\mnemonic.hxx -..\inc\vcl\mnemonicengine.hxx %_DEST%\inc%_EXT%\vcl\mnemonicengine.hxx -..\inc\vcl\morebtn.hxx %_DEST%\inc%_EXT%\vcl\morebtn.hxx -..\inc\vcl\msgbox.hxx %_DEST%\inc%_EXT%\vcl\msgbox.hxx -..\inc\vcl\octree.hxx %_DEST%\inc%_EXT%\vcl\octree.hxx -..\inc\vcl\oldprintadaptor.hxx %_DEST%\inc%_EXT%\vcl\oldprintadaptor.hxx -..\inc\vcl\outdev.hxx %_DEST%\inc%_EXT%\vcl\outdev.hxx -..\inc\vcl\pdfextoutdevdata.hxx %_DEST%\inc%_EXT%\vcl\pdfextoutdevdata.hxx -..\inc\vcl\pdfwriter.hxx %_DEST%\inc%_EXT%\vcl\pdfwriter.hxx -..\inc\vcl\pngread.hxx %_DEST%\inc%_EXT%\vcl\pngread.hxx -..\inc\vcl\pngwrite.hxx %_DEST%\inc%_EXT%\vcl\pngwrite.hxx -..\inc\vcl\pointr.hxx %_DEST%\inc%_EXT%\vcl\pointr.hxx -..\inc\vcl\popupmenuwindow.hxx %_DEST%\inc%_EXT%\vcl\popupmenuwindow.hxx -..\inc\vcl\ppdparser.hxx %_DEST%\inc%_EXT%\vcl\ppdparser.hxx -..\inc\vcl\print.hxx %_DEST%\inc%_EXT%\vcl\print.hxx -..\inc\vcl\printerinfomanager.hxx %_DEST%\inc%_EXT%\vcl\printerinfomanager.hxx -..\inc\vcl\prntypes.hxx %_DEST%\inc%_EXT%\vcl\prntypes.hxx -..\inc\vcl\ptrstyle.hxx %_DEST%\inc%_EXT%\vcl\ptrstyle.hxx -..\inc\vcl\quickselectionengine.hxx %_DEST%\inc%_EXT%\vcl\quickselectionengine.hxx -..\inc\vcl\regband.hxx %_DEST%\inc%_EXT%\vcl\regband.hxx -..\inc\vcl\region.hxx %_DEST%\inc%_EXT%\vcl\region.hxx -..\inc\vcl\salbtype.hxx %_DEST%\inc%_EXT%\vcl\salbtype.hxx -..\inc\vcl\salctype.hxx %_DEST%\inc%_EXT%\vcl\salctype.hxx -..\inc\vcl\salgtype.hxx %_DEST%\inc%_EXT%\vcl\salgtype.hxx -..\inc\vcl\salnativewidgets.hxx %_DEST%\inc%_EXT%\vcl\salnativewidgets.hxx -..\inc\vcl\scrbar.hxx %_DEST%\inc%_EXT%\vcl\scrbar.hxx -..\inc\vcl\seleng.hxx %_DEST%\inc%_EXT%\vcl\seleng.hxx -..\inc\vcl\settings.hxx %_DEST%\inc%_EXT%\vcl\settings.hxx -..\inc\vcl\slider.hxx %_DEST%\inc%_EXT%\vcl\slider.hxx -..\inc\vcl\sndstyle.hxx %_DEST%\inc%_EXT%\vcl\sndstyle.hxx -..\inc\vcl\sound.hxx %_DEST%\inc%_EXT%\vcl\sound.hxx -..\inc\vcl\spin.h %_DEST%\inc%_EXT%\vcl\spin.h -..\inc\vcl\spin.hxx %_DEST%\inc%_EXT%\vcl\spin.hxx -..\inc\vcl\spinfld.hxx %_DEST%\inc%_EXT%\vcl\spinfld.hxx -..\inc\vcl\split.hxx %_DEST%\inc%_EXT%\vcl\split.hxx -..\inc\vcl\splitwin.hxx %_DEST%\inc%_EXT%\vcl\splitwin.hxx -..\inc\vcl\status.hxx %_DEST%\inc%_EXT%\vcl\status.hxx -..\inc\vcl\stdtext.hxx %_DEST%\inc%_EXT%\vcl\stdtext.hxx -..\inc\vcl\strhelper.hxx %_DEST%\inc%_EXT%\vcl\strhelper.hxx -..\inc\vcl\sv.h %_DEST%\inc%_EXT%\vcl\sv.h -..\inc\vcl\svapp.hxx %_DEST%\inc%_EXT%\vcl\svapp.hxx -..\inc\vcl\symbol.hxx %_DEST%\inc%_EXT%\vcl\symbol.hxx -..\inc\vcl\syschild.hxx %_DEST%\inc%_EXT%\vcl\syschild.hxx -..\inc\vcl\sysdata.hxx %_DEST%\inc%_EXT%\vcl\sysdata.hxx -..\inc\vcl\syswin.hxx %_DEST%\inc%_EXT%\vcl\syswin.hxx -..\inc\vcl\tabctrl.hxx %_DEST%\inc%_EXT%\vcl\tabctrl.hxx -..\inc\vcl\tabdlg.hxx %_DEST%\inc%_EXT%\vcl\tabdlg.hxx -..\inc\vcl\tabpage.hxx %_DEST%\inc%_EXT%\vcl\tabpage.hxx -..\inc\vcl\taskpanelist.hxx %_DEST%\inc%_EXT%\vcl\taskpanelist.hxx -..\inc\vcl\threadex.hxx %_DEST%\inc%_EXT%\vcl\threadex.hxx -..\inc\vcl\timer.hxx %_DEST%\inc%_EXT%\vcl\timer.hxx -..\inc\vcl\toolbox.hxx %_DEST%\inc%_EXT%\vcl\toolbox.hxx -..\inc\vcl\unohelp.hxx %_DEST%\inc%_EXT%\vcl\unohelp.hxx -..\inc\vcl\unohelp2.hxx %_DEST%\inc%_EXT%\vcl\unohelp2.hxx -..\inc\vcl\unowrap.hxx %_DEST%\inc%_EXT%\vcl\unowrap.hxx -..\inc\vcl\vclenum.hxx %_DEST%\inc%_EXT%\vcl\vclenum.hxx -..\inc\vcl\vclevent.hxx %_DEST%\inc%_EXT%\vcl\vclevent.hxx -..\inc\vcl\virdev.hxx %_DEST%\inc%_EXT%\vcl\virdev.hxx -..\inc\vcl\waitobj.hxx %_DEST%\inc%_EXT%\vcl\waitobj.hxx -..\inc\vcl\wall.hxx %_DEST%\inc%_EXT%\vcl\wall.hxx -..\inc\vcl\window.hxx %_DEST%\inc%_EXT%\vcl\window.hxx -..\inc\vcl\wpropset.hxx %_DEST%\inc%_EXT%\vcl\wpropset.hxx -..\inc\vcl\wrkwin.hxx %_DEST%\inc%_EXT%\vcl\wrkwin.hxx diff --git a/vcl/prj/makefile.mk b/vcl/prj/makefile.mk new file mode 100644 index 000000000000..c73a3d944bbf --- /dev/null +++ b/vcl/prj/makefile.mk @@ -0,0 +1,40 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ=.. +TARGET=prj + +.INCLUDE : settings.mk + +.IF "$(VERBOSE)"!="" +VERBOSEFLAG := +.ELSE +VERBOSEFLAG := -s +.ENDIF + +all: + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) diff --git a/vcl/source/glyphs/gcach_vdev.cxx b/vcl/source/glyphs/gcach_vdev.cxx deleted file mode 100644 index 8cd45cf58224..000000000000 --- a/vcl/source/glyphs/gcach_vdev.cxx +++ /dev/null @@ -1,287 +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_vcl.hxx" - -#include - -#include -#include -#include -#include -#include - -// ======================================================================= -// VirtDevServerFont -// ======================================================================= - -// ----------------------------------------------------------------------- - -void VirtDevServerFont::AnnounceFonts( ImplDevFontList* pToAdd ) -{ - // TODO: get fonts on server but not on client, - // problem is that currently there is no serverside virtual device... - VirtualDevice vdev( 1 ); - long nCount = vdev.GetDevFontCount(); - - for( int i = 0; i < nCount; ++i ) - { - const FontInfo aFontInfo = vdev.GetDevFont( i ); - - ImplFontData& rData = *new ImplFontData; - rData.SetSysData( new FontSysData( (void*)SERVERFONT_MAGIC ) ); - - rData.maName = aFontInfo.GetName(); - rData.maStyleName = aFontInfo.GetStyleName(); - rData.mnWidth = aFontInfo.GetWidth(); - rData.mnHeight = aFontInfo.GetHeight(); - rData.meFamily = aFontInfo.GetFamily(); - rData.meCharSet = aFontInfo.GetCharSet(); - rData.mePitch = aFontInfo.GetPitch(); - rData.meWidthType = aFontInfo.GetWidthType(); - rData.meWeight = aFontInfo.GetWeight(); - rData.meItalic = aFontInfo.GetItalic(); - rData.meType = aFontInfo.GetType(); - rData.meFamily = aFontInfo.GetFamily(); - - rData.mbOrientation = true; // TODO: where to get this info? - rData.mbDevice = false; - rData.mnQuality = 0; // prefer client-side fonts if available - - pToAdd->Add( &rData ); - } -} - -// ----------------------------------------------------------------------- - -void VirtDevServerFont::ClearFontList() -{ - // TODO -} - -// ----------------------------------------------------------------------- - -VirtDevServerFont* VirtDevServerFont::CreateFont( const ImplFontSelectData& rFSD ) -{ - VirtDevServerFont* pServerFont = NULL; - // TODO: search list of VirtDevServerFonts, return NULL if not found - // pServerFont = new VirtDevServerFont( rFSD ); - return pServerFont; -} - -// ----------------------------------------------------------------------- - -VirtDevServerFont::VirtDevServerFont( const ImplFontSelectData& rFSD ) -: ServerFont( rFSD) -{} - -// ----------------------------------------------------------------------- - -void VirtDevServerFont::FetchFontMetric( ImplFontMetricData& rTo, long& rFactor ) const -{ - const ImplFontSelectData& aFSD = GetFontSelData(); - - Font aFont; - aFont.SetName ( aFSD.maName ); - aFont.SetStyleName ( aFSD.maStyleName ); - aFont.SetHeight ( aFSD.mnHeight ); - aFont.SetWidth ( aFSD.mnWidth ); - aFont.SetOrientation( aFSD.mnOrientation ); - aFont.SetVertical ( GetFontSelData().mbVertical ); - - VirtualDevice vdev( 1 ); - FontMetric aMetric( vdev.GetFontMetric( aFont ) ); - - rFactor = 0x100; - - rTo.mnAscent = aMetric.GetAscent(); - rTo.mnDescent = aMetric.GetDescent(); - rTo.mnIntLeading = aMetric.GetIntLeading(); - rTo.mnExtLeading = aMetric.GetExtLeading(); - rTo.mnSlant = aMetric.GetSlant(); - rTo.meType = aMetric.GetType(); - rTo.mnFirstChar = 0x0020; // TODO: where to get this info? - rTo.mnLastChar = 0xFFFE; // TODO: where to get this info? - - rTo.mnWidth = aFSD.mnWidth; - rTo.maName = aFSD.maName; - rTo.maStyleName = aFSD.maStyleName; - rTo.mnOrientation = aFSD.mnOrientation; - rTo.meFamily = aFSD.meFamily; - rTo.meCharSet = aFSD.meCharSet; - rTo.meWeight = aFSD.meWeight; - rTo.meItalic = aFSD.meItalic; - rTo.mePitch = aFSD.mePitch; - rTo.mbDevice = FALSE; -} - -// ----------------------------------------------------------------------- - -int VirtDevServerFont::GetGlyphIndex( sal_Unicode aChar ) const -{ - return aChar; -} - -// ----------------------------------------------------------------------- - -void VirtDevServerFont::InitGlyphData( int nGlyphIndex, GlyphData& rGD ) const -{ - Font aFont; - aFont.SetName ( GetFontSelData().maName ); - aFont.SetStyleName ( GetFontSelData().maStyleName ); - aFont.SetHeight ( GetFontSelData().mnHeight ); - aFont.SetWidth ( GetFontSelData().mnWidth ); - aFont.SetOrientation( GetFontSelData().mnOrientation ); - aFont.SetVertical ( GetFontSelData().mbVertical ); - - VirtualDevice vdev( 1 ); - vdev.SetFont( aFont ); - - // get glyph metrics - sal_Int32 nCharWidth = 10; -// TODO: vdev.GetCharWidth( nGlyphIndex, nGlyphIndex, &nCharWidth ); - rGD.SetCharWidth( nCharWidth ); - - sal_Unicode aChar = nGlyphIndex; - String aGlyphStr( &aChar, 1 ); - Rectangle aRect; - if( vdev.GetTextBoundRect( aRect, aGlyphStr, 0, 1 ) ) - { - rGD.SetOffset( aRect.Top(), aRect.Left() ); - rGD.SetDelta( vdev.GetTextWidth( nGlyphIndex ), 0 ); - rGD.SetSize( aRect.GetSize() ); - } -} - -// ----------------------------------------------------------------------- - -bool VirtDevServerFont::GetAntialiasAdvice( void ) const -{ - return false; -} - -// ----------------------------------------------------------------------- - -bool VirtDevServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& ) const -{ - /* - sal_Unicode aChar = nGlyphIndex; - String aGlyphStr( &aChar, 1 ); - - // draw bitmap - vdev.SetOutputSizePixel( aSize, TRUE ); - vdev.DrawText( Point(0,0)-rGD.GetMetric().GetOffset(), aGlyphStr ); - - // create new glyph item - - const Bitmap& rBitmap = vdev.GetBitmap( Point(0,0), aSize ); - rGD.SetBitmap( new Bitmap( rBitmap ) ); - return true; - */ - return false; -} - -// ----------------------------------------------------------------------- - -bool VirtDevServerFont::GetGlyphBitmap8( int nGlyphIndex, RawBitmap& ) const -{ - return false; -} - -// ----------------------------------------------------------------------- - -int VirtDevServerFont::GetGlyphKernValue( int, int ) const -{ - return 0; -} - -// ----------------------------------------------------------------------- - -ULONG VirtDevServerFont::GetKernPairs( ImplKernPairData** ppImplKernPairs ) const -{ - Font aFont; - aFont.SetName ( GetFontSelData().maName ); - aFont.SetStyleName ( GetFontSelData().maStyleName ); - aFont.SetHeight ( GetFontSelData().mnHeight ); - aFont.SetWidth ( GetFontSelData().mnWidth ); - aFont.SetOrientation( GetFontSelData().mnOrientation ); - aFont.SetVertical ( GetFontSelData().mbVertical ); - - VirtualDevice vdev( 1 ); - vdev.SetFont( aFont ); - - ULONG nPairs = vdev.GetKerningPairCount(); - if( nPairs > 0 ) - { - KerningPair* const pKernPairs = new KerningPair[ nPairs ]; - vdev.GetKerningPairs( nPairs, pKernPairs ); - - *ppImplKernPairs = new ImplKernPairData[ nPairs ]; - ImplKernPairData* pTo = *ppImplKernPairs; - KerningPair* pFrom = pKernPairs; - for ( ULONG n = 0; n < nPairs; n++ ) - { - pTo->mnChar1 = pFrom->nChar1; - pTo->mnChar2 = pFrom->nChar2; - pTo->mnKern = pFrom->nKern; - ++pFrom; - ++pTo; - } - - delete[] pKernPairs; - } - - return nPairs; -} - -// ----------------------------------------------------------------------- - -bool VirtDevServerFont::GetGlyphOutline( int nGlyphIndex, PolyPolygon& rPolyPoly ) const -{ - return false; - /* - Font aFont; - aFont.SetName ( GetFontSelData().maName ); - aFont.SetStyleName ( GetFontSelData().maStyleName ); - aFont.SetHeight ( GetFontSelData().mnHeight ); - aFont.SetWidth ( GetFontSelData().mnWidth ); - aFont.SetOrientation( GetFontSelData().mnOrientation ); - aFont.SetVertical ( GetFontSelData().mbVertical ); - - VirtualDevice vdev( 1 ); - vdev.SetFont( aFont ); - - const bool bOptimize = true; - - sal_Unicode aChar = nGlyphIndex; - String aGlyphStr( &aChar, 1 ); - return vdev.GetTextOutline( rPolyPoly, aGlyphStr, 0, 1, bOptimize ); - */ -} - -// ======================================================================= diff --git a/vcl/source/glyphs/gcach_vdev.hxx b/vcl/source/glyphs/gcach_vdev.hxx deleted file mode 100644 index e2349169ee13..000000000000 --- a/vcl/source/glyphs/gcach_vdev.hxx +++ /dev/null @@ -1,57 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include - -// ----------------------------------------------------------------------- - -class VirtDevServerFont : public ServerFont -{ -public: - virtual bool GetAntialiasAdvice( void ) const; - virtual bool GetGlyphBitmap1( int nGlyphIndex, RawBitmap& ) const; - virtual bool GetGlyphBitmap8( int nGlyphIndex, RawBitmap& ) const; - virtual bool GetGlyphOutline( int nGlyphIndex, PolyPolygon& ) const; - -protected: - friend class GlyphCache; - static void AnnounceFonts( ImplDevFontList* ); - static void ClearFontList(); - - static VirtDevServerFont* CreateFont( const ImplFontSelectData& ); - virtual void FetchFontMetric( ImplFontMetricData&, long& rFactor ) const; - virtual ULONG GetKernPairs( ImplKernPairData** ) const; - virtual int GetGlyphKernValue( int, int ) const; - - virtual int GetGlyphIndex( sal_Unicode ) const; - virtual void InitGlyphData( int nGlyphIndex, GlyphData& ) const; - -private: - VirtDevServerFont( const ImplFontSelectData& ); -}; - -// ----------------------------------------------------------------------- diff --git a/vcl/source/window/abstdlg.cxx b/vcl/source/window/abstdlg.cxx index 7f00b73b0808..58f235bea25e 100644 --- a/vcl/source/window/abstdlg.cxx +++ b/vcl/source/window/abstdlg.cxx @@ -29,7 +29,6 @@ #include "precompiled_vcl.hxx" #include -#include "cuilib.hxx" #include #include @@ -42,7 +41,7 @@ VclAbstractDialogFactory* VclAbstractDialogFactory::Create() { FuncPtrCreateDialogFactory fp = 0; static ::osl::Module aDialogLibrary; - if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, String( RTL_CONSTASCII_USTRINGPARAM( DLL_NAME ) ) ) ) + if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, String( RTL_CONSTASCII_USTRINGPARAM( CUI_DLL_NAME ) ) ) ) fp = ( VclAbstractDialogFactory* (__LOADONCALLAPI*)() ) aDialogLibrary.getFunctionSymbol( ::rtl::OUString::createFromAscii("CreateDialogFactory") ); if ( fp ) diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx index 98bce72d6bce..156b1a340051 100644 --- a/vcl/unx/generic/app/salinst.cxx +++ b/vcl/unx/generic/app/salinst.cxx @@ -102,7 +102,7 @@ sal_Bool SalYieldMutex::tryToAcquire() // plugin factory function extern "C" { - VCL_DLLPUBLIC SalInstance* create_SalInstance() + VCLPLUG_GEN_PUBLIC SalInstance* create_SalInstance() { /* #i92121# workaround deadlocks in the X11 implementation */ diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx index 03429982c2d1..777e5aa921d3 100644 --- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx +++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx @@ -33,13 +33,13 @@ #include #include -#include "vcl/dllapi.h" - #include "rtl/ustrbuf.hxx" #include "osl/module.h" #include "osl/process.h" #include "osl/thread.h" +#include "vclpluginapi.h" + #include using namespace rtl; @@ -253,7 +253,7 @@ static bool is_cde_desktop( Display* pDisplay ) extern "C" { -VCL_DLLPUBLIC rtl::OUString get_desktop_environment() +DESKTOP_DETECTOR_PUBLIC rtl::OUString get_desktop_environment() { rtl::OUStringBuffer aRet( 8 ); static const char *pOverride = getenv( "OOO_FORCE_DESKTOP" ); diff --git a/vcl/unx/generic/gdi/gcach_xpeer.hxx b/vcl/unx/generic/gdi/gcach_xpeer.hxx index 4e041e51aec2..a65c75174858 100644 --- a/vcl/unx/generic/gdi/gcach_xpeer.hxx +++ b/vcl/unx/generic/gdi/gcach_xpeer.hxx @@ -31,7 +31,6 @@ #include #include #include -#include #include diff --git a/vcl/unx/generic/gdi/salprnpsp.cxx b/vcl/unx/generic/gdi/salprnpsp.cxx index c961c321a2d3..a67e6dd6c211 100644 --- a/vcl/unx/generic/gdi/salprnpsp.cxx +++ b/vcl/unx/generic/gdi/salprnpsp.cxx @@ -73,8 +73,6 @@ using namespace com::sun::star; * static helpers */ -#include "rtsname.hxx" - static oslModule driverLib = NULL; extern "C" { diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx index 29970e1299e6..00058bf24461 100644 --- a/vcl/unx/generic/plugadapt/salplug.cxx +++ b/vcl/unx/generic/plugadapt/salplug.cxx @@ -67,7 +67,6 @@ static SalInstance* tryInstance( const OUString& rModuleBase ) aModName.appendAscii( SAL_DLLPREFIX"vclplug_" ); aModName.append( rModuleBase ); aModName.appendAscii( SAL_DLLPOSTFIX ); - aModName.appendAscii( SAL_DLLEXTENSION ); OUString aModule = aModName.makeStringAndClear(); oslModule aMod = osl_loadModuleRelative( diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx index caf3249b5f46..97fe10f4d7ce 100644 --- a/vcl/unx/generic/printer/cupsmgr.cxx +++ b/vcl/unx/generic/printer/cupsmgr.cxx @@ -1135,8 +1135,6 @@ bool CUPSManager::addOrRemovePossible() const return (m_nDests && m_pDests && ! isCUPSDisabled())? false : PrinterInfoManager::addOrRemovePossible(); } -#include - const char* CUPSManager::authenticateUser( const char* /*pIn*/ ) { const char* pRet = NULL; diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx index 22adb201aa72..b94bf1061178 100644 --- a/vcl/unx/gtk/app/gtkinst.cxx +++ b/vcl/unx/gtk/app/gtkinst.cxx @@ -130,7 +130,7 @@ extern "C" return true; } - VCL_DLLPUBLIC SalInstance* create_SalInstance( oslModule pModule ) + VCLPLUG_GTK_PUBLIC SalInstance* create_SalInstance( oslModule pModule ) { /* #i92121# workaround deadlocks in the X11 implementation */ diff --git a/vcl/unx/headless/svpprn.hxx b/vcl/unx/headless/svpprn.hxx index f53cf97e0eed..147034d33439 100644 --- a/vcl/unx/headless/svpprn.hxx +++ b/vcl/unx/headless/svpprn.hxx @@ -34,6 +34,8 @@ #include "printerjob.hxx" #include "salprn.hxx" +#include "vclpluginapi.h" + class PspGraphics; class PspSalInfoPrinter : public SalInfoPrinter @@ -102,7 +104,7 @@ public: class Timer; namespace vcl_sal { -class VCL_DLLPUBLIC PrinterUpdate +class VCLPLUG_SVP_PUBLIC PrinterUpdate { static Timer* pPrinterUpdateTimer; static int nActiveJobs; diff --git a/vcl/unx/kde/kdedata.cxx b/vcl/unx/kde/kdedata.cxx index d3b94fdb5456..b97d57fb3714 100644 --- a/vcl/unx/kde/kdedata.cxx +++ b/vcl/unx/kde/kdedata.cxx @@ -45,9 +45,6 @@ #include #include #endif -#include -#include "unx/i18n_im.hxx" -#include "unx/i18n_xkb.hxx" #include #include @@ -58,6 +55,12 @@ #include #include +#include "unx/kde/kdedata.hxx" +#include "unx/i18n_im.hxx" +#include "unx/i18n_xkb.hxx" + +#include "vclpluginapi.h" + /* #i59042# override KApplications method for session management * since it will interfere badly with our own. */ @@ -227,7 +230,7 @@ void KDEData::Init() **********************************************************************/ extern "C" { - VCL_DLLPUBLIC SalInstance* create_SalInstance( oslModule ) + VCLPLUG_KDE_PUBLIC SalInstance* create_SalInstance( oslModule ) { /* #i92121# workaround deadlocks in the X11 implementation */ diff --git a/vcl/unx/kde4/VCLKDEApplication.cxx b/vcl/unx/kde4/VCLKDEApplication.cxx index 5e3a85256313..94d28d2e698a 100644 --- a/vcl/unx/kde4/VCLKDEApplication.cxx +++ b/vcl/unx/kde4/VCLKDEApplication.cxx @@ -39,11 +39,11 @@ VCLKDEApplication::VCLKDEApplication() : disp = 0; } -bool VCLKDEApplication::x11EventFilter(XEvent* event) +bool VCLKDEApplication::x11EventFilter(XEvent* ev) { //if we have a display and the display consumes the event //do not process the event in qt - if (disp && disp->Dispatch(event) > 0) + if (disp && disp->Dispatch(ev) > 0) { return true; } diff --git a/vcl/unx/kde4/main.cxx b/vcl/unx/kde4/main.cxx index 962a882af26b..063cdf2bef86 100644 --- a/vcl/unx/kde4/main.cxx +++ b/vcl/unx/kde4/main.cxx @@ -35,6 +35,8 @@ #include "KDEData.hxx" #include "KDESalInstance.hxx" +#include "vclpluginapi.h" + #if OSL_DEBUG_LEVEL > 1 #include #endif @@ -43,7 +45,7 @@ /// entry point for the KDE4 VCL plugin extern "C" { - VCL_DLLPUBLIC SalInstance* create_SalInstance( oslModule ) + VCLPLUG_KDE4_PUBLIC SalInstance* create_SalInstance( oslModule ) { /* #i92121# workaround deadlocks in the X11 implementation */ -- cgit v1.2.3 From e60595b380ef2a355ebfda0693044b4cb7699fec Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 25 Jan 2011 17:35:20 +0100 Subject: vcl2gnumake: #i116588# move vcl to gbuild (step 1, linux) --- Module_ooo.mk | 1 + Repository.mk | 12 ++++++++++++ solenv/bin/build.pl | 0 solenv/gbuild/platform/linux.mk | 4 ++++ 4 files changed, 17 insertions(+) mode change 100644 => 100755 solenv/bin/build.pl diff --git a/Module_ooo.mk b/Module_ooo.mk index bc8d42079993..fdfb183d2115 100644 --- a/Module_ooo.mk +++ b/Module_ooo.mk @@ -35,6 +35,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\ sw \ toolkit \ tools \ + vcl \ xmloff \ )) diff --git a/Repository.mk b/Repository.mk index be80170315d2..ee87695916e8 100644 --- a/Repository.mk +++ b/Repository.mk @@ -41,7 +41,9 @@ $(eval $(call gb_Helper_register_executables,NONE, \ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \ avmedia \ basegfx \ + basebmp \ cui \ + desktop_detector \ drawinglayer \ editeng \ eggtray \ @@ -50,6 +52,7 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \ fwk \ fwl \ fwm \ + i18npaper \ lng \ msfilter \ msword \ @@ -71,6 +74,11 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \ utl \ vbahelper \ vcl \ + vclplug_gen \ + vclplug_gtk \ + vclplug_kde \ + vclplug_kde4 \ + vclplug_svp \ xcr \ xo \ xof \ @@ -82,6 +90,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_URE, \ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \ icuuc \ + icule \ )) @@ -89,6 +98,7 @@ $(eval $(call gb_Helper_register_libraries,RTLIBS, \ comphelper \ i18nisolang1 \ i18nutil \ + jvmaccess \ ucbhelper \ vos3 \ )) @@ -122,6 +132,8 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \ ooopathutils \ salcpprt \ zlib \ + graphite \ + vclmain \ )) # vim: set noet sw=4 ts=4: diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl old mode 100644 new mode 100755 diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk index f8505ccd39fd..746765e2e82c 100755 --- a/solenv/gbuild/platform/linux.mk +++ b/solenv/gbuild/platform/linux.mk @@ -242,10 +242,14 @@ endif gb_Library_PLAINLIBS_NONE += \ dl \ + freetype \ jpeg \ m \ pthread \ X11 \ + Xext \ + SM \ + ICE \ z gb_Library_FILENAMES := \ -- cgit v1.2.3 From a6f0350550d96ba8e00e79325a260a63a5899107 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Wed, 26 Jan 2011 12:26:48 +0100 Subject: dba34d: #i108967# introduce new settings into UI and driver config: RespectDriverResultSetType --- dbaccess/inc/dbaccess_helpid.hrc | 1 + dbaccess/source/core/api/RowSetCache.cxx | 18 +++++++++++----- dbaccess/source/ui/browser/brwctrlr.cxx | 15 +++++++++---- dbaccess/source/ui/dlg/DbAdminImpl.cxx | 1 + dbaccess/source/ui/dlg/advancedsettings.cxx | 33 ++++++++++++++++------------- dbaccess/source/ui/dlg/advancedsettings.hrc | 1 + dbaccess/source/ui/dlg/advancedsettings.hxx | 1 + dbaccess/source/ui/dlg/advancedsettings.src | 15 +++++++++++-- dbaccess/source/ui/dlg/dbadmin.cxx | 2 ++ dbaccess/source/ui/inc/dsitems.hxx | 3 ++- dbaccess/source/ui/inc/dsmeta.hxx | 1 + dbaccess/source/ui/misc/dsmeta.cxx | 1 + 12 files changed, 65 insertions(+), 27 deletions(-) mode change 100755 => 100644 dbaccess/source/ui/dlg/DbAdminImpl.cxx diff --git a/dbaccess/inc/dbaccess_helpid.hrc b/dbaccess/inc/dbaccess_helpid.hrc index 29094bee1882..bb37eb5affff 100644 --- a/dbaccess/inc/dbaccess_helpid.hrc +++ b/dbaccess/inc/dbaccess_helpid.hrc @@ -436,6 +436,7 @@ #define HID_DSADMIN_IGNORECURRENCY "DBACCESS_HID_DSADMIN_IGNORECURRENCY" #define HID_MACRO_MIGRATION_BACKUP_LOCATION "DBACCESS_HID_MACRO_MIGRATION_BACKUP_LOCATION" #define HID_DSADMIN_PRIMARY_KEY_SUPPORT "DBACCESS_HID_DSADMIN_PRIMARY_KEY_SUPPORT" +#define HID_DSADMIN_RESPECTRESULTSETTYPE "DBACCESS_HID_DSADMIN_RESPECTRESULTSETTYPE" // this one below have hid in number space HID_SBA_START #define HID_DLG_ADABAS_NEWDB "DBACCESS_HID_DLG_ADABAS_NEWDB" diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index 2d4355edcaef..7401a1016e53 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -116,11 +116,11 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs, DBG_CTOR(ORowSetCache,NULL); // first try if the result can be used to do inserts and updates + Reference< XPropertySet> xProp(_xRs,UNO_QUERY); + Reference< XPropertySetInfo > xPropInfo = xProp->getPropertySetInfo(); try { Reference< XResultSetUpdate> xUp(_xRs,UNO_QUERY_THROW); - Reference< XPropertySet> xProp(_xRs,UNO_QUERY); - Reference< XPropertySetInfo > xPropInfo = xProp->getPropertySetInfo(); sal_Bool bBookmarkable = xPropInfo->hasPropertyByName(PROPERTY_ISBOOKMARKABLE) && any2bool(xProp->getPropertyValue(PROPERTY_ISBOOKMARKABLE)) && Reference< XRowLocate >(_xRs, UNO_QUERY).is(); if ( bBookmarkable ) @@ -139,14 +139,22 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs, { (void)ex; } - _xRs->beforeFirst(); + try + { + if ( xPropInfo->hasPropertyByName(PROPERTY_RESULTSETTYPE) && + ::comphelper::getINT32(xProp->getPropertyValue(PROPERTY_RESULTSETTYPE)) != ResultSetType::FORWARD_ONLY) + _xRs->beforeFirst(); + } + catch(const SQLException& e) + { + (void)e; + } // check if all keys of the updateable table are fetched sal_Bool bAllKeysFound = sal_False; sal_Int32 nTablesCount = 0; - Reference< XPropertySet> xProp(_xRs,UNO_QUERY); - Reference< XPropertySetInfo > xPropInfo = xProp->getPropertySetInfo(); + sal_Bool bNeedKeySet = !(xPropInfo->hasPropertyByName(PROPERTY_ISBOOKMARKABLE) && any2bool(xProp->getPropertyValue(PROPERTY_ISBOOKMARKABLE)) && Reference< XRowLocate >(_xRs, UNO_QUERY).is() ); bNeedKeySet = bNeedKeySet || (xPropInfo->hasPropertyByName(PROPERTY_RESULTSETCONCURRENCY) && diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 103267154da0..fdb225d620c9 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -760,11 +760,18 @@ sal_Bool SbaXDataBrowserController::reloadForm( const Reference< XLoadable >& _r Reference< XWarningsSupplier > xWarnings( _rxLoadable, UNO_QUERY ); if ( xWarnings.is() ) { - SQLExceptionInfo aInfo( xWarnings->getWarnings() ); - if ( aInfo.isValid() ) + try + { + SQLExceptionInfo aInfo( xWarnings->getWarnings() ); + if ( aInfo.isValid() ) + { + showError( aInfo ); + impl_checkForCannotSelectUnfiltered( aInfo ); + } + } + catch(const SQLException& e) { - showError( aInfo ); - impl_checkForCannotSelectUnfiltered( aInfo ); + (void)e; } } diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx old mode 100755 new mode 100644 index 797cb73eb021..cbcd504c5cac --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -204,6 +204,7 @@ ODbDataSourceAdministrationHelper::ODbDataSourceAdministrationHelper(const Refer m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_DOSLINEENDS, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PreferDosLikeLineEnds" ) ) ) ); m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_SOCKET, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LocalSocket" ) ) ) ); m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_NAMED_PIPE, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "NamedPipe" ) ) ) ); + m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_RESPECTRESULTSETTYPE, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RespectDriverResultSetType" ) ) ) ); // special settings for adabas m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_SHUTSERVICE, ::rtl::OUString::createFromAscii("ShutdownDatabase"))); diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index 1516c735f009..ae8ded9dd79b 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -95,6 +95,7 @@ namespace dbaui ,m_pIgnoreCurrency(NULL) ,m_pEscapeDateTime(NULL) ,m_pPrimaryKeySupport(NULL) + ,m_pRespectDriverResultSetType(NULL) ,m_pBooleanComparisonModeLabel( NULL ) ,m_pBooleanComparisonMode( NULL ) ,m_pMaxRowScanLabel( NULL ) @@ -206,6 +207,7 @@ namespace dbaui DELETEZ( m_pIgnoreCurrency ); DELETEZ( m_pEscapeDateTime ); DELETEZ( m_pPrimaryKeySupport ); + DELETEZ( m_pRespectDriverResultSetType ); DELETEZ( m_pBooleanComparisonModeLabel ); DELETEZ( m_pBooleanComparisonMode ); DELETEZ( m_pMaxRowScanLabel ); @@ -219,21 +221,22 @@ namespace dbaui // for easier maintainance, write the table in this form, then copy it to m_aBooleanSettings BooleanSettingDesc aSettings[] = { - { &m_pIsSQL92Check, CB_SQL92CHECK, DSID_SQL92CHECK, false }, - { &m_pAppendTableAlias, CB_APPENDTABLEALIAS, DSID_APPEND_TABLE_ALIAS, false }, - { &m_pAsBeforeCorrelationName, CB_AS_BEFORE_CORR_NAME, DSID_AS_BEFORE_CORRNAME, false }, - { &m_pEnableOuterJoin, CB_ENABLEOUTERJOIN, DSID_ENABLEOUTERJOIN, false }, - { &m_pIgnoreDriverPrivileges, CB_IGNOREDRIVER_PRIV, DSID_IGNOREDRIVER_PRIV, false }, - { &m_pParameterSubstitution, CB_PARAMETERNAMESUBST, DSID_PARAMETERNAMESUBST, false }, - { &m_pSuppressVersionColumn, CB_SUPPRESVERSIONCL, DSID_SUPPRESSVERSIONCL, true }, - { &m_pCatalog, CB_CATALOG, DSID_CATALOG, false }, - { &m_pSchema, CB_SCHEMA, DSID_SCHEMA, false }, - { &m_pIndexAppendix, CB_IGNOREINDEXAPPENDIX, DSID_INDEXAPPENDIX, false }, - { &m_pDosLineEnds, CB_DOSLINEENDS, DSID_DOSLINEENDS, false }, - { &m_pCheckRequiredFields, CB_CHECK_REQUIRED, DSID_CHECK_REQUIRED_FIELDS, false }, - { &m_pIgnoreCurrency, CB_IGNORECURRENCY, DSID_IGNORECURRENCY, false }, - { &m_pEscapeDateTime, CB_ESCAPE_DATETIME, DSID_ESCAPE_DATETIME, false }, - { &m_pPrimaryKeySupport, CB_PRIMARY_KEY_SUPPORT, DSID_PRIMARY_KEY_SUPPORT, false }, + { &m_pIsSQL92Check, CB_SQL92CHECK, DSID_SQL92CHECK, false }, + { &m_pAppendTableAlias, CB_APPENDTABLEALIAS, DSID_APPEND_TABLE_ALIAS, false }, + { &m_pAsBeforeCorrelationName, CB_AS_BEFORE_CORR_NAME, DSID_AS_BEFORE_CORRNAME, false }, + { &m_pEnableOuterJoin, CB_ENABLEOUTERJOIN, DSID_ENABLEOUTERJOIN, false }, + { &m_pIgnoreDriverPrivileges, CB_IGNOREDRIVER_PRIV, DSID_IGNOREDRIVER_PRIV, false }, + { &m_pParameterSubstitution, CB_PARAMETERNAMESUBST, DSID_PARAMETERNAMESUBST, false }, + { &m_pSuppressVersionColumn, CB_SUPPRESVERSIONCL, DSID_SUPPRESSVERSIONCL, true }, + { &m_pCatalog, CB_CATALOG, DSID_CATALOG, false }, + { &m_pSchema, CB_SCHEMA, DSID_SCHEMA, false }, + { &m_pIndexAppendix, CB_IGNOREINDEXAPPENDIX, DSID_INDEXAPPENDIX, false }, + { &m_pDosLineEnds, CB_DOSLINEENDS, DSID_DOSLINEENDS, false }, + { &m_pCheckRequiredFields, CB_CHECK_REQUIRED, DSID_CHECK_REQUIRED_FIELDS, false }, + { &m_pIgnoreCurrency, CB_IGNORECURRENCY, DSID_IGNORECURRENCY, false }, + { &m_pEscapeDateTime, CB_ESCAPE_DATETIME, DSID_ESCAPE_DATETIME, false }, + { &m_pPrimaryKeySupport, CB_PRIMARY_KEY_SUPPORT, DSID_PRIMARY_KEY_SUPPORT, false }, + { &m_pRespectDriverResultSetType, CB_RESPECTRESULTSETTYPE,DSID_RESPECTRESULTSETTYPE, false }, { NULL, 0, 0, false } }; diff --git a/dbaccess/source/ui/dlg/advancedsettings.hrc b/dbaccess/source/ui/dlg/advancedsettings.hrc index 193fdf5f3853..81c296916b09 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.hrc +++ b/dbaccess/source/ui/dlg/advancedsettings.hrc @@ -62,6 +62,7 @@ #define CB_IGNORECURRENCY 14 #define CB_ESCAPE_DATETIME 15 #define CB_PRIMARY_KEY_SUPPORT 16 +#define CB_RESPECTRESULTSETTYPE 17 #define ET_AUTOINCREMENTVALUE 1 #define ET_RETRIEVE_AUTO 2 diff --git a/dbaccess/source/ui/dlg/advancedsettings.hxx b/dbaccess/source/ui/dlg/advancedsettings.hxx index 07620496b11f..88595832020a 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.hxx +++ b/dbaccess/source/ui/dlg/advancedsettings.hxx @@ -73,6 +73,7 @@ namespace dbaui CheckBox* m_pIgnoreCurrency; CheckBox* m_pEscapeDateTime; CheckBox* m_pPrimaryKeySupport; + CheckBox* m_pRespectDriverResultSetType; FixedText* m_pBooleanComparisonModeLabel; ListBox* m_pBooleanComparisonMode; diff --git a/dbaccess/source/ui/dlg/advancedsettings.src b/dbaccess/source/ui/dlg/advancedsettings.src index f30b451025aa..d36a0b777563 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.src +++ b/dbaccess/source/ui/dlg/advancedsettings.src @@ -217,6 +217,16 @@ Text [ en-US ] = "Supports primary keys"; \ }; +#define AUTO_RESPECTRESULTSETTYPE(AUTO_Y) \ + CheckBox CB_RESPECTRESULTSETTYPE \ + { \ + Pos = MAP_APPFONT ( 6 , AUTO_Y ) ; \ + Size = MAP_APPFONT ( ADVANCED_PAGE_X - 12 , CHECKBOX_HEIGHT ) ; \ + TabStop = TRUE ; \ + HelpId = HID_DSADMIN_RESPECTRESULTSETTYPE; \ + Text [ en-US ] = "Ignore the result set type from the database driver"; \ + }; + //------------------------------------------------------------------------- @@ -351,8 +361,9 @@ TabPage PAGE_ADVANCED_SETTINGS_SPECIAL AUTO_IGNORECURRENCY( 13*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 12*CHECKBOX_HEIGHT + RELATED_CONTROLS ) AUTO_ESCAPE_DATETIME( 14*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 14*CHECKBOX_HEIGHT + RELATED_CONTROLS ) AUTO_PRIMARY_KEY_SUPPORT( 15*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 15*CHECKBOX_HEIGHT + RELATED_CONTROLS ) - AUTO_BOOLEANCOMPARISON( 16*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 14*CHECKBOX_HEIGHT + RELATED_CONTROLS + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 ) - AUTO_MAXROWSCAN( 17*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 14*CHECKBOX_HEIGHT + RELATED_CONTROLS + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 ) + AUTO_RESPECTRESULTSETTYPE( 16*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 16*CHECKBOX_HEIGHT + RELATED_CONTROLS ) + AUTO_BOOLEANCOMPARISON( 17*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 15*CHECKBOX_HEIGHT + RELATED_CONTROLS + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 ) + AUTO_MAXROWSCAN( 18*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 15*CHECKBOX_HEIGHT + RELATED_CONTROLS + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 ) }; //------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx index 1c1b945854ed..f03352497a98 100644 --- a/dbaccess/source/ui/dlg/dbadmin.cxx +++ b/dbaccess/source/ui/dlg/dbadmin.cxx @@ -411,6 +411,7 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp *pCounter++ = new SfxStringItem(DSID_NAMED_PIPE, String()); *pCounter++ = new OptionalBoolItem( DSID_PRIMARY_KEY_SUPPORT ); *pCounter++ = new SfxInt32Item(DSID_MAX_ROW_SCAN, 100); + *pCounter++ = new SfxBoolItem( DSID_RESPECTRESULTSETTYPE,sal_False ); // create the pool static SfxItemInfo __READONLY_DATA aItemInfos[DSID_LAST_ITEM_ID - DSID_FIRST_ITEM_ID + 1] = @@ -474,6 +475,7 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp {0,0}, {0,0}, {0,0}, + {0,0}, {0,0} }; diff --git a/dbaccess/source/ui/inc/dsitems.hxx b/dbaccess/source/ui/inc/dsitems.hxx index 6b87bee2a61a..a29e2201f370 100644 --- a/dbaccess/source/ui/inc/dsitems.hxx +++ b/dbaccess/source/ui/inc/dsitems.hxx @@ -93,6 +93,7 @@ typedef sal_Int32 ItemID; #define DSID_NAMED_PIPE 58 #define DSID_PRIMARY_KEY_SUPPORT 59 #define DSID_MAX_ROW_SCAN 60 +#define DSID_RESPECTRESULTSETTYPE 61 // don't forget to adjust DSID_LAST_ITEM_ID below! @@ -100,7 +101,7 @@ typedef sal_Int32 ItemID; //= item range. Adjust this if you introduce new items above #define DSID_FIRST_ITEM_ID DSID_NAME -#define DSID_LAST_ITEM_ID DSID_MAX_ROW_SCAN +#define DSID_LAST_ITEM_ID DSID_RESPECTRESULTSETTYPE #endif // _DBAUI_DATASOURCEITEMS_HXX_ diff --git a/dbaccess/source/ui/inc/dsmeta.hxx b/dbaccess/source/ui/inc/dsmeta.hxx index 87a93244cd3f..9d1275e073ff 100644 --- a/dbaccess/source/ui/inc/dsmeta.hxx +++ b/dbaccess/source/ui/inc/dsmeta.hxx @@ -133,6 +133,7 @@ namespace dbaui || has( DSID_ESCAPE_DATETIME ) || has( DSID_PRIMARY_KEY_SUPPORT ) || has( DSID_MAX_ROW_SCAN ) + || has( DSID_RESPECTRESULTSETTYPE ) ; } diff --git a/dbaccess/source/ui/misc/dsmeta.cxx b/dbaccess/source/ui/misc/dsmeta.cxx index 052d013f47a4..ad00b052a184 100644 --- a/dbaccess/source/ui/misc/dsmeta.cxx +++ b/dbaccess/source/ui/misc/dsmeta.cxx @@ -93,6 +93,7 @@ namespace dbaui { DSID_IGNORECURRENCY, "IgnoreCurrency" }, { DSID_ESCAPE_DATETIME, "EscapeDateTime" }, { DSID_PRIMARY_KEY_SUPPORT, "PrimaryKeySupport" }, + { DSID_RESPECTRESULTSETTYPE, "RespectDriverResultSetType" }, { DSID_MAX_ROW_SCAN, "MaxRowScan" }, { 0, NULL } }; -- cgit v1.2.3 From fca4891942b319dfe59d1a225d0ab01601a96205 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Wed, 26 Jan 2011 12:26:48 +0100 Subject: dba34d: #i108967# introduce new settings into UI and driver config: RespectDriverResultSetType --- connectivity/source/drivers/ado/ado.xcu | 5 +++++ connectivity/source/drivers/jdbc/jdbc.xcu | 5 +++++ connectivity/source/drivers/jdbc/tools.cxx | 1 + connectivity/source/drivers/odbc/odbc.xcu | 5 +++++ 4 files changed, 16 insertions(+) diff --git a/connectivity/source/drivers/ado/ado.xcu b/connectivity/source/drivers/ado/ado.xcu index e95e1a676c12..58bfcf8975a9 100755 --- a/connectivity/source/drivers/ado/ado.xcu +++ b/connectivity/source/drivers/ado/ado.xcu @@ -117,6 +117,11 @@ true + + + true + + diff --git a/connectivity/source/drivers/jdbc/jdbc.xcu b/connectivity/source/drivers/jdbc/jdbc.xcu index f4f599a701d9..2afaa54a9e90 100755 --- a/connectivity/source/drivers/jdbc/jdbc.xcu +++ b/connectivity/source/drivers/jdbc/jdbc.xcu @@ -147,6 +147,11 @@ true + + + true + + diff --git a/connectivity/source/drivers/jdbc/tools.cxx b/connectivity/source/drivers/jdbc/tools.cxx index 65315774a601..1be627b6d4ac 100644 --- a/connectivity/source/drivers/jdbc/tools.cxx +++ b/connectivity/source/drivers/jdbc/tools.cxx @@ -152,6 +152,7 @@ java_util_Properties* connectivity::createStringPropertyArray(const Sequence< Pr && pBegin->Name.compareToAscii( "Authentication" ) && pBegin->Name.compareToAscii( "PreferDosLikeLineEnds" ) && pBegin->Name.compareToAscii( "PrimaryKeySupport" ) + && pBegin->Name.compareToAscii( "RespectDriverResultSetType" ) ) { ::rtl::OUString aStr; diff --git a/connectivity/source/drivers/odbc/odbc.xcu b/connectivity/source/drivers/odbc/odbc.xcu index 74ba8815d021..c0d3939aa0e0 100755 --- a/connectivity/source/drivers/odbc/odbc.xcu +++ b/connectivity/source/drivers/odbc/odbc.xcu @@ -152,6 +152,11 @@ true + + + true + + -- cgit v1.2.3 From 096f56c6978a2d6570b0cc47016d344d5ef54a5a Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 26 Jan 2011 14:01:31 +0100 Subject: vcl2gnumake: #i116588# move vcl to gbuild (step 2) --- vcl/Library_desktop_detector.mk | 2 + vcl/Library_vcl.mk | 136 ++++++++++++++++----- vcl/Library_vclplug_gen.mk | 2 + vcl/Library_vclplug_gtk.mk | 2 + vcl/Library_vclplug_kde.mk | 2 + vcl/Library_vclplug_kde4.mk | 2 + vcl/Library_vclplug_svp.mk | 2 + vcl/Module_vcl.mk | 2 +- vcl/aqua/source/dtrans/aqua_service.cxx | 86 ------------- vcl/aqua/source/dtrans/test_aquacb.cxx | 208 -------------------------------- 10 files changed, 120 insertions(+), 324 deletions(-) delete mode 100644 vcl/aqua/source/dtrans/aqua_service.cxx delete mode 100644 vcl/aqua/source/dtrans/test_aquacb.cxx diff --git a/vcl/Library_desktop_detector.mk b/vcl/Library_desktop_detector.mk index 4a96d194e7f6..f98be027fa1d 100644 --- a/vcl/Library_desktop_detector.mk +++ b/vcl/Library_desktop_detector.mk @@ -27,6 +27,8 @@ $(eval $(call gb_Library_Library,desktop_detector)) +$(eval $(call gb_Library_add_package_headers,vcl,vcl_inc)) + $(eval $(call gb_Library_add_precompiled_header,desktop_detector,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) $(eval $(call gb_Library_set_include,desktop_detector,\ diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index a8d39c2bba53..487f9cce5754 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -40,7 +40,7 @@ $(eval $(call gb_Library_set_include,vcl,\ -I$(OUTDIR)/inc/stl \ -I$(OUTDIR)/inc \ )) -ifeq ($(GUI),UNX) +ifeq ($(GUIBASE),unx) $(eval $(call gb_Library_set_cxxflags,vcl,\ $$(CXXFLAGS) \ $$(FREETYPE_CFLAGS) \ @@ -78,23 +78,114 @@ $(eval $(call gb_Library_add_linked_static_libs,vcl,\ graphite \ )) endif -ifeq ($(GUI),UNX) +ifeq ($(GUIBASE),unx) $(eval $(call gb_Library_add_linked_libs,vcl,\ freetype \ )) endif -ifeq ($(GUI),UNX) +ifeq ($(GUIBASE),aqua) +$(eval $(call gb_Library_set_cxxflags,vcl,\ + $$(CXXFLAGS) \ + $$(OBJCXXFLAGS) \ +)) +$(eval $(call gb_Library_add_add_objcxxobjects,vcl,\ + vcl/aqua/source/a11y/aqua11yactionwrapper \ + vcl/aqua/source/a11y/aqua11ycomponentwrapper \ + vcl/aqua/source/a11y/aqua11yfactory \ + vcl/aqua/source/a11y/aqua11yrolehelper \ + vcl/aqua/source/a11y/aqua11yselectionwrapper \ + vcl/aqua/source/a11y/aqua11ytablewrapper \ + vcl/aqua/source/a11y/aqua11ytextattributeswrapper \ + vcl/aqua/source/a11y/aqua11ytextwrapper \ + vcl/aqua/source/a11y/aqua11yutil \ + vcl/aqua/source/a11y/aqua11yvaluewrapper \ + vcl/aqua/source/a11y/aqua11ywrapper \ + vcl/aqua/source/a11y/aqua11ywrapperbutton \ + vcl/aqua/source/a11y/aqua11ywrappercheckbox \ + vcl/aqua/source/a11y/aqua11ywrappercombobox \ + vcl/aqua/source/a11y/aqua11ywrappergroup \ + vcl/aqua/source/a11y/aqua11ywrapperlist \ + vcl/aqua/source/a11y/aqua11ywrapperradiobutton \ + vcl/aqua/source/a11y/aqua11ywrapperradiogroup \ + vcl/aqua/source/a11y/aqua11ywrapperrow \ + vcl/aqua/source/a11y/aqua11ywrapperscrollarea \ + vcl/aqua/source/a11y/aqua11ywrapperscrollbar \ + vcl/aqua/source/a11y/aqua11ywrappersplitter \ + vcl/aqua/source/a11y/aqua11ywrapperstatictext \ + vcl/aqua/source/a11y/aqua11ywrappertabgroup \ + vcl/aqua/source/a11y/aqua11ywrappertextarea \ + vcl/aqua/source/a11y/aqua11ywrappertoolbar \ + vcl/aqua/source/app/salnstimer \ + vcl/aqua/source/app/vclnsapp \ + vcl/aqua/source/gdi/aquaprintaccessoryview \ + vcl/aqua/source/gdi/aquaprintview \ + vcl/aqua/source/window/salframeview \ + vcl/aqua/source/window/salnsmenu \ +)) $(eval $(call gb_Library_add_exception_objects,vcl,\ - vcl/unx/generic/printer/cupsmgr \ - vcl/unx/generic/printer/jobdata \ - vcl/unx/generic/printer/ppdparser \ - vcl/unx/generic/printer/printerinfomanager \ + vcl/aqua/source/a11y/aqua11yfocuslistener \ + vcl/aqua/source/a11y/aqua11yfocustracker \ + vcl/aqua/source/a11y/aqua11ylistener \ + vcl/aqua/source/a11y/documentfocuslistener \ + vcl/aqua/source/app/saldata \ + vcl/aqua/source/app/salinst \ + vcl/aqua/source/app/salsys \ + vcl/aqua/source/app/saltimer \ + vcl/aqua/source/dtrans/DataFlavorMapping \ + vcl/aqua/source/dtrans/DragActionConversion \ + vcl/aqua/source/dtrans/DragSource \ + vcl/aqua/source/dtrans/DragSourceContext \ + vcl/aqua/source/dtrans/DropTarget \ + vcl/aqua/source/dtrans/HtmlFmtFlt \ + vcl/aqua/source/dtrans/OSXTransferable \ + vcl/aqua/source/dtrans/PictToBmpFlt \ + vcl/aqua/source/dtrans/aqua_clipboard \ + vcl/aqua/source/dtrans/service_entry \ + vcl/aqua/source/gdi/salatslayout \ + vcl/aqua/source/gdi/salatsuifontutils \ + vcl/aqua/source/gdi/salbmp \ + vcl/aqua/source/gdi/salcolorutils \ + vcl/aqua/source/gdi/salgdi \ + vcl/aqua/source/gdi/salgdiutils \ + vcl/aqua/source/gdi/salmathutils \ + vcl/aqua/source/gdi/salnativewidgets \ + vcl/aqua/source/gdi/salprn \ + vcl/aqua/source/gdi/salvd \ + vcl/aqua/source/window/salframe \ + vcl/aqua/source/window/salmenu \ + vcl/aqua/source/window/salobj \ +)) +endif + +ifeq ($(GUIBASE),unx) +$(eval $(call gb_Library_set_defs,vcl,\ + $$(DEFS) \ + -DSAL_DLLPREFIX=\"$(gb_Library_SYSPRE)\" \ + -DSAL_DLLPOSTFIX=\"$(gb_Library_OOOEXT)\" \ + -D_XSALSET_LIBNAME=\"$(gb_Library_SYSPRE)spa$(gb_Library_OOOEXT)\" \ +)) +ifneq ($(ENABLE_FONTCONFIG),) +$(eval $(call gb_Library_set_defs,vcl,\ + $$(DEFS) \ + -DENABLE_FONTCONFIG \ +)) +endif +$(eval $(call gb_Library_add_exception_objects,vcl,\ + vcl/source/glyphs/gcach_ftyp \ + vcl/source/glyphs/gcach_layout \ + vcl/source/glyphs/gcach_rbmp \ + vcl/source/glyphs/glyphcache \ vcl/unx/generic/fontmanager/fontcache \ vcl/unx/generic/fontmanager/fontconfig \ vcl/unx/generic/fontmanager/fontmanager \ vcl/unx/generic/fontmanager/helper \ vcl/unx/generic/fontmanager/parseAFM \ + vcl/unx/generic/plugadapt/salplug \ + vcl/unx/generic/printer/cupsmgr \ + vcl/unx/generic/printer/jobdata \ + vcl/unx/generic/printer/ppdparser \ + vcl/unx/generic/printer/printerinfomanager \ )) endif @@ -218,16 +309,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/gdi/textlayout \ vcl/source/gdi/virdev \ vcl/source/gdi/wall \ - vcl/source/glyphs/gcach_ftyp \ - vcl/source/glyphs/gcach_layout \ - vcl/source/glyphs/gcach_rbmp \ - vcl/source/glyphs/glyphcache \ - vcl/source/glyphs/graphite_adaptors \ - vcl/source/glyphs/graphite_cache \ - vcl/source/glyphs/graphite_features \ - vcl/source/glyphs/graphite_layout \ - vcl/source/glyphs/graphite_serverfont \ - vcl/source/glyphs/graphite_textsrc \ vcl/source/helper/canvasbitmap \ vcl/source/helper/canvastools \ vcl/source/helper/evntpost \ @@ -285,23 +366,20 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/window/wrkwin \ )) -ifeq ($(GUI),UNX) -$(eval $(call gb_Library_add_exception_objects,vcl,\ - vcl/unx/generic/plugadapt/salplug \ -)) +ifneq ($(ENABLE_GRAPHITE),) $(eval $(call gb_Library_set_defs,vcl,\ $$(DEFS) \ - -DSAL_DLLPREFIX=\"$(gb_Library_SYSPRE)\" \ - -DSAL_DLLPOSTFIX=\"$(gb_Library_OOOEXT)\" \ - -D_XSALSET_LIBNAME=\"$(gb_Library_SYSPRE)spa$(gb_Library_OOOEXT)\" \ + -DENABLE_GRAPHITE \ )) -ifneq ($(ENABLE_FONTCONFIG),) -$(eval $(call gb_Library_set_defs,vcl,\ - $$(DEFS) \ - -DENABLE_FONTCONFIG \ +$(eval $(call gb_Library_add_exception_objects,vcl,\ + vcl/source/glyphs/graphite_adaptors \ + vcl/source/glyphs/graphite_cache \ + vcl/source/glyphs/graphite_features \ + vcl/source/glyphs/graphite_layout \ + vcl/source/glyphs/graphite_serverfont \ + vcl/source/glyphs/graphite_textsrc \ )) endif -endif ifeq ($(OS),LINUX) $(eval $(call gb_Library_add_linked_libs,vcl,\ diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk index c7eb9b2b214e..cca106caf419 100644 --- a/vcl/Library_vclplug_gen.mk +++ b/vcl/Library_vclplug_gen.mk @@ -27,6 +27,8 @@ $(eval $(call gb_Library_Library,vclplug_gen)) +$(eval $(call gb_Library_add_package_headers,vcl,vcl_inc)) + $(eval $(call gb_Library_add_precompiled_header,vclplug_gen,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) $(eval $(call gb_Library_set_include,vclplug_gen,\ diff --git a/vcl/Library_vclplug_gtk.mk b/vcl/Library_vclplug_gtk.mk index 3107702680a0..1b8e2d881640 100644 --- a/vcl/Library_vclplug_gtk.mk +++ b/vcl/Library_vclplug_gtk.mk @@ -27,6 +27,8 @@ $(eval $(call gb_Library_Library,vclplug_gtk)) +$(eval $(call gb_Library_add_package_headers,vcl,vcl_inc)) + $(eval $(call gb_Library_add_precompiled_header,vclplug_gtk,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) $(eval $(call gb_Library_set_include,vclplug_gtk,\ diff --git a/vcl/Library_vclplug_kde.mk b/vcl/Library_vclplug_kde.mk index 4ea34bd0fb8a..560898d94ed7 100644 --- a/vcl/Library_vclplug_kde.mk +++ b/vcl/Library_vclplug_kde.mk @@ -27,6 +27,8 @@ $(eval $(call gb_Library_Library,vclplug_kde)) +$(eval $(call gb_Library_add_package_headers,vcl,vcl_inc)) + $(eval $(call gb_Library_add_precompiled_header,vclplug_kde,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) $(eval $(call gb_Library_set_include,vclplug_kde,\ diff --git a/vcl/Library_vclplug_kde4.mk b/vcl/Library_vclplug_kde4.mk index d7204583e8f0..ad1c5530ce79 100644 --- a/vcl/Library_vclplug_kde4.mk +++ b/vcl/Library_vclplug_kde4.mk @@ -27,6 +27,8 @@ $(eval $(call gb_Library_Library,vclplug_kde4)) +$(eval $(call gb_Library_add_package_headers,vcl,vcl_inc)) + $(eval $(call gb_Library_add_precompiled_header,vclplug_kde4,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) $(eval $(call gb_Library_set_include,vclplug_kde4,\ diff --git a/vcl/Library_vclplug_svp.mk b/vcl/Library_vclplug_svp.mk index c559cf6d6c8e..845b0c93d320 100644 --- a/vcl/Library_vclplug_svp.mk +++ b/vcl/Library_vclplug_svp.mk @@ -27,6 +27,8 @@ $(eval $(call gb_Library_Library,vclplug_svp)) +$(eval $(call gb_Library_add_package_headers,vcl,vcl_inc)) + $(eval $(call gb_Library_add_precompiled_header,vclplug_svp,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) $(eval $(call gb_Library_set_include,vclplug_svp,\ diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk index 5cb49b312507..636e5a3e367a 100644 --- a/vcl/Module_vcl.mk +++ b/vcl/Module_vcl.mk @@ -35,7 +35,7 @@ $(eval $(call gb_Module_add_targets,vcl,\ # FIXME: WiP # StaticLibrary_vclmain \ -ifeq ($(GUI),UNX) +ifeq ($(GUIBASE),unx) $(eval $(call gb_Module_add_targets,vcl,\ Library_vclplug_gen \ Library_vclplug_svp \ diff --git a/vcl/aqua/source/dtrans/aqua_service.cxx b/vcl/aqua/source/dtrans/aqua_service.cxx deleted file mode 100644 index 57ef1f11175c..000000000000 --- a/vcl/aqua/source/dtrans/aqua_service.cxx +++ /dev/null @@ -1,86 +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_vcl.hxx" -#include "aqua_clipboard.hxx" -#include -#include -#include - -using namespace rtl; -using namespace com::sun::star::uno; -using namespace com::sun::star::registry; -using namespace cppu; -using namespace com::sun::star::lang; -using namespace com::sun::star::datatransfer::clipboard; -using namespace aqua; - -namespace aqua { - -Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager ) -{ - return Reference< XInterface >( static_cast< XClipboard* >( new AquaClipboard(rServiceManager) ) ); -} - -} // namespace aqua - -extern "C" -{ - -void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* pRegistryKey ) -{ - void* pRet = 0; - - if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, AQUA_CLIPBOARD_IMPL_NAME ) ) ) - { - Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( AQUA_CLIPBOARD_SERVICE_NAME ) ); - - //OUString( RTL_CONSTASCII_USTRINGPARAM( FPS_IMPL_NAME ) ) - Reference< XSingleServiceFactory > xFactory ( createOneInstanceFactory( - reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ), - OUString::createFromAscii( pImplName ), - createInstance, - aSNS ) ); - if ( xFactory.is() ) - { - xFactory->acquire(); - pRet = xFactory.get(); - } - } - - return pRet; -} - -} // extern "C" diff --git a/vcl/aqua/source/dtrans/test_aquacb.cxx b/vcl/aqua/source/dtrans/test_aquacb.cxx deleted file mode 100644 index 85c87c6b9ba9..000000000000 --- a/vcl/aqua/source/dtrans/test_aquacb.cxx +++ /dev/null @@ -1,208 +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_vcl.hxx" - -#include "aqua_clipboard.hxx" -#include -#include -#include -#include -#include -#include - -#ifndef _CPPUHELPER_IMPLBASE1_HXX_ -#include -#endif -#include -#include -#include - -#include - -using namespace ::rtl; -using namespace ::std; -using namespace ::cppu; -using namespace ::com::sun::star::datatransfer; -using namespace ::com::sun::star::datatransfer::clipboard; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::io; -using namespace ::com::sun::star::lang; - -Reference< XTransferable > rXTransfRead; - -class TestTransferable : public WeakImplHelper2< XClipboardOwner, XTransferable > -{ -public: - TestTransferable(); - virtual Any SAL_CALL getTransferData( const DataFlavor& aFlavor ) throw(UnsupportedFlavorException, IOException, RuntimeException); - virtual Sequence< DataFlavor > SAL_CALL getTransferDataFlavors() throw(RuntimeException); - virtual sal_Bool SAL_CALL isDataFlavorSupported( const DataFlavor& aFlavor ) throw(RuntimeException); - virtual void SAL_CALL lostOwnership( const Reference< XClipboard >& xClipboard, const Reference< XTransferable >& xTrans ) throw(RuntimeException); - -private: - Sequence< DataFlavor > m_seqDFlv; - OUString m_Data; -}; - -TestTransferable::TestTransferable() : - m_seqDFlv( 1 ), - m_Data( RTL_CONSTASCII_USTRINGPARAM( "This is a test string" ) ) -{ - DataFlavor df; - - df.MimeType = OUString::createFromAscii( "text/html" ); - df.DataType = getCppuType( ( Sequence< sal_Int8 >* )0 ); - - m_seqDFlv[0] = df; -} - -Any SAL_CALL TestTransferable::getTransferData( const DataFlavor& aFlavor ) - throw(UnsupportedFlavorException, IOException, RuntimeException) -{ - Any anyData; - - if ( aFlavor.MimeType == m_seqDFlv[0].MimeType ) - { - OString aStr( m_Data.getStr(), m_Data.getLength(), 1252 ); - Sequence< sal_Int8 > sOfChars( aStr.getLength() ); - sal_Int32 lenStr = aStr.getLength(); - - for ( sal_Int32 i = 0; i < lenStr; ++i ) - sOfChars[i] = aStr[i]; - - anyData = makeAny( sOfChars ); - } - - return anyData; -} - -Sequence< DataFlavor > SAL_CALL TestTransferable::getTransferDataFlavors() - throw(RuntimeException) -{ - return m_seqDFlv; -} - -sal_Bool SAL_CALL TestTransferable::isDataFlavorSupported( const DataFlavor& aFlavor ) - throw(RuntimeException) -{ - sal_Int32 nLength = m_seqDFlv.getLength(); - sal_Bool bRet = sal_False; - - for ( sal_Int32 i = 0; i < nLength; ++i ) - { - if ( m_seqDFlv[i].MimeType == aFlavor.MimeType ) - { - bRet = sal_True; - break; - } - } - - return bRet; -} - -void SAL_CALL TestTransferable::lostOwnership( const Reference< XClipboard >& xClipboard, const Reference< XTransferable >& xTrans ) - throw(RuntimeException) -{ -} - -int SAL_CALL main( int argc, char** argv ) -{ - if(argc != 2) - { - fprintf( stderr, "usage: %s \n", argv[0] ); - return 1; - } - - //------------------------------------------------- - // get the global service-manager - //------------------------------------------------- - OUString rdbName = OUString::createFromAscii( argv[1] ); - Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( rdbName ) ); - - // Print a message if an error occured. - if ( !g_xFactory.is() ) - { - OSL_ENSURE(sal_False, "Can't create RegistryServiceFactory"); - return(-1); - } - - //------------------------------------------------- - // try to get an Interface to a XFilePicker Service - //------------------------------------------------- - - Reference< XTransferable > rXTransf( static_cast< XTransferable* >( new TestTransferable ) ); - - Reference< XClipboard > xClipboard( g_xFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( AQUA_CLIPBOARD_SERVICE_NAME ) ) ), UNO_QUERY ); - if ( !xClipboard.is() ) - { - OSL_ENSURE( sal_False, "Error creating FolderPicker Service" ); - return(-1); - } - - Reference< XTypeProvider > rXTypProv( xClipboard, UNO_QUERY ); - - if ( rXTypProv.is() ) - { - Sequence< Type > seqType = rXTypProv->getTypes(); - sal_Int32 nLen = seqType.getLength(); - for ( sal_Int32 i = 0; i < nLen; i++ ) - { - Type nxtType = seqType[i]; - } - - Sequence< sal_Int8 > seqInt8 = rXTypProv->getImplementationId(); - } - - xClipboard->setContents( rXTransf, Reference< XClipboardOwner >( rXTransf, UNO_QUERY ) ); - - rXTransfRead = xClipboard->getContents(); - - // destroy the transferable explicitly - rXTransfRead = Reference< XTransferable>(); - - // destroy the clipboard - xClipboard = Reference< XClipboard >(); - - //-------------------------------------------------- - // shutdown the service manager - //-------------------------------------------------- - - // Cast factory to XComponent - Reference< XComponent > xComponent( g_xFactory, UNO_QUERY ); - - if ( !xComponent.is() ) - OSL_ENSURE(sal_False, "Error shuting down"); - - // Dispose and clear factory - xComponent->dispose(); - g_xFactory.clear(); - g_xFactory = Reference< XMultiServiceFactory >(); - - return 0; -} -- cgit v1.2.3 From 5094622556d429df2028b5b299fe5aa3c2a96fd9 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 26 Jan 2011 14:01:31 +0100 Subject: vcl2gnumake: #i116588# move vcl to gbuild (step 2) --- solenv/config/sdev300.ini | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini index ce459e176b77..aadcb903e549 100644 --- a/solenv/config/sdev300.ini +++ b/solenv/config/sdev300.ini @@ -638,6 +638,7 @@ unxlngi6 SO_PACK %SOLAR_ENV_ROOT%/pack/%WORK_STAMP% SRC_ROOT %SOLAR_SOURCE_ROOT%/%WORK_STAMP%/ooo%UPDMINOREXT% PKG_CONFIG_LIBDIR %SOLAR_SYSBASE_ROOT%/usr/lib/pkgconfig + KDE_ROOT /so/env/kde/linux/kde-3.2.2 } common2 { @@ -661,7 +662,6 @@ unxlngi6 JDK13PATH %SOLAR_JDK13PATH% JDK14PATH %SOLAR_JDK14PATH% JDK15PATH %SOLAR_JDK15PATH% - KDE_ROOT /so/env/kde/linux/kde-3.2.2 LIBMYSQL_PATH %SOLARROOT%/mysql-connector-c-6.0.2/unxlngi6 NO_BSYMBOLIC True OJDK16PATH %SOLAR_OJDK16PATH% @@ -673,6 +673,10 @@ unxlngi6 SYSBASE %SOLAR_SYSBASE_ROOT% TEMP /tmp TMP /tmp + GTK_CFLAGS -I%SOLAR_SYSBASE_ROOT%/usr/include/gtk-2.0 -I%SOLAR_SYSBASE_ROOT%/usr/lib/gtk-2.0/include -I%SOLAR_SYSBASE_ROOT%/usr/include/atk-1.0 -I%SOLAR_SYSBASE_ROOT%/usr/include/cairo -I%SOLAR_SYSBASE_ROOT%/usr/include/pango-1.0 -I%SOLAR_SYSBASE_ROOT%/usr/include/glib-2.0 -I%SOLAR_SYSBASE_ROOT%/usr/lib/glib-2.0/include + GTK_LIBS -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lglib-2.0 + KDE_CFLAGS -I%KDE_ROOT%/include -DQT_CLEAN_NAMESPACE + KDE_LIBS -L%KDE_ROOT%/lib -lkdeui -lkdecore -lqt-mt } common3:0 IF X%UPDATER%X == XX { -- cgit v1.2.3 From 5a07595a428099575dcfe96a3cc54d136cbaba1b Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 26 Jan 2011 15:36:08 +0100 Subject: vcl2gnumake: #i116588# add static library for salmain --- vcl/Module_vcl.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk index 636e5a3e367a..2d4306883796 100644 --- a/vcl/Module_vcl.mk +++ b/vcl/Module_vcl.mk @@ -31,9 +31,8 @@ $(eval $(call gb_Module_Module,vcl)) $(eval $(call gb_Module_add_targets,vcl,\ Library_vcl \ Package_inc \ + StaticLibrary_vclmain \ )) -# FIXME: WiP -# StaticLibrary_vclmain \ ifeq ($(GUIBASE),unx) $(eval $(call gb_Module_add_targets,vcl,\ -- cgit v1.2.3 From 3afc7558eb03b88fd6041ef9fa530651f8468191 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 26 Jan 2011 19:18:52 +0100 Subject: vcl2gnumake: #i116588# move vcl to gbuild (step 3,linux,solaris,macos) --- vcl/AllLangResTarget_vcl.mk | 54 ++++++++++++++++++++++++++++++++++++++++++ vcl/Library_vcl.mk | 23 +++++++++++++++++- vcl/Module_vcl.mk | 1 + vcl/util/vcl.component | 49 -------------------------------------- vcl/util/vcl.macosx.component | 49 -------------------------------------- vcl/util/vcl.windows.component | 40 ------------------------------- vcl/vcl.macosx.component | 49 ++++++++++++++++++++++++++++++++++++++ vcl/vcl.unx.component | 49 ++++++++++++++++++++++++++++++++++++++ vcl/vcl.windows.component | 40 +++++++++++++++++++++++++++++++ 9 files changed, 215 insertions(+), 139 deletions(-) create mode 100644 vcl/AllLangResTarget_vcl.mk delete mode 100644 vcl/util/vcl.component delete mode 100644 vcl/util/vcl.macosx.component delete mode 100644 vcl/util/vcl.windows.component create mode 100644 vcl/vcl.macosx.component create mode 100644 vcl/vcl.unx.component create mode 100644 vcl/vcl.windows.component diff --git a/vcl/AllLangResTarget_vcl.mk b/vcl/AllLangResTarget_vcl.mk new file mode 100644 index 000000000000..9a3453af2810 --- /dev/null +++ b/vcl/AllLangResTarget_vcl.mk @@ -0,0 +1,54 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_AllLangResTarget_AllLangResTarget,vcl)) + +$(eval $(call gb_AllLangResTarget_set_reslocation,vcl,vcl)) + +$(eval $(call gb_AllLangResTarget_add_srs,vcl,\ + vcl/source/src \ +)) + +$(eval $(call gb_SrsTarget_SrsTarget,vcl/source/src)) + +$(eval $(call gb_SrsTarget_set_include,vcl/source/src,\ + $$(INCLUDE) \ + -I$(SRCDIR)/vcl/inc \ +)) + +$(eval $(call gb_SrsTarget_add_files,vcl/source/src,\ + vcl/source/src/btntext.src \ + vcl/source/src/helptext.src \ + vcl/source/src/images.src \ + vcl/source/src/menu.src \ + vcl/source/src/print.src \ + vcl/source/src/stdtext.src \ + vcl/source/src/units.src \ +)) + + +# vim: set noet sw=4 ts=4: diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 487f9cce5754..8c90cb6ce165 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -27,6 +27,14 @@ $(eval $(call gb_Library_Library,vcl)) +ifeq ($(OS),MACOSX) +$(eval $(call gb_Library_set_componentfile,vcl,vcl/vcl.macosx)) +else ifeq ($(OS),WNT) +$(eval $(call gb_Library_set_componentfile,vcl,vcl/vcl.windows)) +else +$(eval $(call gb_Library_set_componentfile,vcl,vcl/vcl.unx)) +endif + $(eval $(call gb_Library_add_package_headers,vcl,vcl_inc)) $(eval $(call gb_Library_add_precompiled_header,vcl,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) @@ -89,7 +97,7 @@ $(eval $(call gb_Library_set_cxxflags,vcl,\ $$(CXXFLAGS) \ $$(OBJCXXFLAGS) \ )) -$(eval $(call gb_Library_add_add_objcxxobjects,vcl,\ +$(eval $(call gb_Library_add_objcxxobjects,vcl,\ vcl/aqua/source/a11y/aqua11yactionwrapper \ vcl/aqua/source/a11y/aqua11ycomponentwrapper \ vcl/aqua/source/a11y/aqua11yfactory \ @@ -389,6 +397,19 @@ $(eval $(call gb_Library_add_linked_libs,vcl,\ )) endif +ifeq ($(GUIBASE),aqua) +$(eval $(call gb_Library_add_linked_libs,vcl,\ + AppleRemote \ +)) +$(eval $(call gb_Library_set_ldflags,vcl,\ + $$(LDFLAGS) \ + -framework QuickTime \ + -framework Cocoa \ + -framework Carbon \ + -framework CoreFoundation \ +)) +endif + ifeq ($(OS),WNT) ifneq ($(USE_MINGW),) $(eval $(call gb_Library_add_linked_libs,vcl,\ diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk index 2d4306883796..db2941976270 100644 --- a/vcl/Module_vcl.mk +++ b/vcl/Module_vcl.mk @@ -32,6 +32,7 @@ $(eval $(call gb_Module_add_targets,vcl,\ Library_vcl \ Package_inc \ StaticLibrary_vclmain \ + AllLangResTarget_vcl \ )) ifeq ($(GUIBASE),unx) diff --git a/vcl/util/vcl.component b/vcl/util/vcl.component deleted file mode 100644 index da20fc916c32..000000000000 --- a/vcl/util/vcl.component +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vcl/util/vcl.macosx.component b/vcl/util/vcl.macosx.component deleted file mode 100644 index 3aabcd8c7050..000000000000 --- a/vcl/util/vcl.macosx.component +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vcl/util/vcl.windows.component b/vcl/util/vcl.windows.component deleted file mode 100644 index 72f7ace9f251..000000000000 --- a/vcl/util/vcl.windows.component +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - diff --git a/vcl/vcl.macosx.component b/vcl/vcl.macosx.component new file mode 100644 index 000000000000..3aabcd8c7050 --- /dev/null +++ b/vcl/vcl.macosx.component @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcl/vcl.unx.component b/vcl/vcl.unx.component new file mode 100644 index 000000000000..da20fc916c32 --- /dev/null +++ b/vcl/vcl.unx.component @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcl/vcl.windows.component b/vcl/vcl.windows.component new file mode 100644 index 000000000000..72f7ace9f251 --- /dev/null +++ b/vcl/vcl.windows.component @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + -- cgit v1.2.3 From 65bff13b5d32bd7b19b9d45ef6c2b9a102ef329e Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 26 Jan 2011 19:18:52 +0100 Subject: vcl2gnumake: #i116588# move vcl to gbuild (step 3,linux,solaris,macos) --- Repository.mk | 1 + solenv/config/sdev300.ini | 12 +++++++++++- solenv/gbuild/platform/solaris.mk | 4 ++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Repository.mk b/Repository.mk index ee87695916e8..95f9a128c98f 100644 --- a/Repository.mk +++ b/Repository.mk @@ -39,6 +39,7 @@ $(eval $(call gb_Helper_register_executables,NONE, \ )) $(eval $(call gb_Helper_register_libraries,OOOLIBS, \ + AppleRemote \ avmedia \ basegfx \ basebmp \ diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini index aadcb903e549..52300e9bd207 100644 --- a/solenv/config/sdev300.ini +++ b/solenv/config/sdev300.ini @@ -923,6 +923,7 @@ unxlngx6 USE_SYSTEM_STL YES XAU_LIBS -lXau PKG_CONFIG_LIBDIR %SOLAR_SYSBASE_ROOT%/usr/lib/pkgconfig + KDE_ROOT /so/env/kde/linux-x64/kde-3.5.10 } common2 { @@ -946,7 +947,6 @@ unxlngx6 INPATH unxlngx6%PROEXT% JDK14PATH %SOLAR_JDK14PATH% JDK15PATH %SOLAR_JDK15PATH% - KDE_ROOT /so/env/kde/linux-x64/kde-3.5.10 LIBMYSQL_PATH %SOLARROOT%/mysql-connector-c-6.0.2/unxlngx6 NO_BSYMBOLIC True OJDK16PATH %SOLAR_OJDK16PATH% @@ -960,6 +960,10 @@ unxlngx6 SYSBASE %SOLAR_SYSBASE_ROOT% TEMP /tmp TMP /tmp + GTK_CFLAGS -I%SOLAR_SYSBASE_ROOT%/usr/include/gtk-2.0 -I%SOLAR_SYSBASE_ROOT%/usr/lib/gtk-2.0/include -I%SOLAR_SYSBASE_ROOT%/usr/include/atk-1.0 -I%SOLAR_SYSBASE_ROOT%/usr/include/cairo -I%SOLAR_SYSBASE_ROOT%/usr/include/pango-1.0 -I%SOLAR_SYSBASE_ROOT%/usr/include/glib-2.0 -I%SOLAR_SYSBASE_ROOT%/usr/lib/glib-2.0/include + GTK_LIBS -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lglib-2.0 + KDE_CFLAGS -I%KDE_ROOT%/include -DQT_CLEAN_NAMESPACE + KDE_LIBS -L%KDE_ROOT%/lib -lkdeui -lkdecore -lqt-mt } common3:0 IF X%UPDATER%X == XX { @@ -1473,6 +1477,7 @@ unxsoli4 SOLAR_OJDK16PATH %SOLAR_ENV_ROOT%/openjdk-6-b08-solaris-i586 SO_PACK %SOLAR_ENV_ROOT%/pack/%WORK_STAMP% SRC_ROOT %SOLAR_SOURCE_ROOT%/%WORK_STAMP%/ooo%UPDMINOREXT% + SOLAR_GTK_ROOT /so/env/gnome/solaris_intel/cinnabar_b15 } common2 { @@ -1502,6 +1507,8 @@ unxsoli4 SYSBASE %SOLAR_SYSBASE_ROOT% TEMP /var/tmp TMP /var/tmp + GTK_CFLAGS -I%SOLAR_GTK_ROOT%/usr/include/gtk-2.0 -I%SOLAR_GTK_ROOT%/usr/lib/gtk-2.0/include -I%SOLAR_GTK_ROOT%/usr/include/atk-1.0 -I%SOLAR_GTK_ROOT%/usr/include/pango-1.0 -I/usr/openwin/include -I%SOLAR_GTK_ROOT%/usr/sfw/include -I%SOLAR_GTK_ROOT%/usr/sfw/include/freetype2 -I%SOLAR_GTK_ROOT%/usr/include/glib-2.0 -I%SOLAR_GTK_ROOT%/usr/lib/glib-2.0/include + GTK_LIBS -L%SOLAR_GTK_ROOT%/usr/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lglib-2.0 } compath { @@ -1735,6 +1742,7 @@ unxsols4 SOLAR_OJDK16PATH %SOLAR_ENV_ROOT%/openjdk-6-b08-solaris-sparc SO_PACK %SOLAR_ENV_ROOT%/pack/%WORK_STAMP% SRC_ROOT %SOLAR_SOURCE_ROOT%/%WORK_STAMP%/ooo%UPDMINOREXT% + SOLAR_GTK_ROOT /so/env/gnome/solaris_sparc/cinnabar_b15 } common2 { @@ -1765,6 +1773,8 @@ unxsols4 SYSBASE %SOLAR_SYSBASE_ROOT% TEMP /var/tmp TMP /var/tmp + GTK_CFLAGS -I%SOLAR_GTK_ROOT%/usr/include/gtk-2.0 -I%SOLAR_GTK_ROOT%/usr/lib/gtk-2.0/include -I%SOLAR_GTK_ROOT%/usr/include/atk-1.0 -I%SOLAR_GTK_ROOT%/usr/include/pango-1.0 -I/usr/openwin/include -I%SOLAR_GTK_ROOT%/usr/sfw/include -I%SOLAR_GTK_ROOT%/usr/sfw/include/freetype2 -I%SOLAR_GTK_ROOT%/usr/include/glib-2.0 -I%SOLAR_GTK_ROOT%/usr/lib/glib-2.0/include + GTK_LIBS -L%SOLAR_GTK_ROOT%/usr/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lglib-2.0 } common:3 IF %UPDATER% == YES { diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk index b2e4ab3b8b44..a616a40c9ccf 100755 --- a/solenv/gbuild/platform/solaris.mk +++ b/solenv/gbuild/platform/solaris.mk @@ -218,10 +218,14 @@ endif gb_Library_PLAINLIBS_NONE += \ dl \ + freetype \ jpeg \ m \ pthread \ X11 \ + Xext \ + SM \ + ICE \ z gb_Library_FILENAMES := \ -- cgit v1.2.3 From e0a13ec42d76f487cb21c3fd80d2317bf322bc7e Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 26 Jan 2011 19:18:52 +0100 Subject: vcl2gnumake: #i116588# move vcl to gbuild (step 3,linux,solaris,macos) --- postprocess/packcomponents/makefile.mk | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk index 3ca8a15296b4..1a7c3145921f 100644 --- a/postprocess/packcomponents/makefile.mk +++ b/postprocess/packcomponents/makefile.mk @@ -172,7 +172,6 @@ my_components = \ utl \ uui \ vbaobj \ - vcl \ vclcanvas \ wpft \ writerfilter \ @@ -184,6 +183,16 @@ my_components = \ xsltfilter \ xstor +.IF "$(OS)" == "MACOSX" +my_components += component/vcl/vcl.macosx +.ELSE +.IF "$(OS)" == "WNT" +my_components += component/vcl/vcl.windows +.ELSE +my_components += component/vcl/vcl.unx +.ENDIF +.ENDIF + .IF "$(BUILD_SPECIAL)" != "" my_components += oooimprovement .END -- cgit v1.2.3 From e36eaeb472581320c6ea92181ef8e0592e2479fb Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 26 Jan 2011 19:18:52 +0100 Subject: vcl2gnumake: #i116588# move vcl to gbuild (step 3,linux,solaris,macos) --- default_images/vcl/res/check.png | Bin 0 -> 368 bytes default_images/vcl/res/checkmac.png | Bin 0 -> 377 bytes default_images/vcl/res/checkmono.bmp | Bin 0 -> 898 bytes default_images/vcl/res/checkos2.png | Bin 0 -> 388 bytes default_images/vcl/res/checkunx.png | Bin 0 -> 226 bytes default_images/vcl/res/checkwin.png | Bin 0 -> 368 bytes default_images/vcl/res/closedoc.png | Bin 0 -> 309 bytes default_images/vcl/res/closedochc.png | Bin 0 -> 106 bytes default_images/vcl/res/collate.png | Bin 0 -> 672 bytes default_images/vcl/res/collate_h.png | Bin 0 -> 380 bytes default_images/vcl/res/msgbox.png | Bin 0 -> 6023 bytes default_images/vcl/res/msgbox_hc.png | Bin 0 -> 1106 bytes default_images/vcl/res/ncollate.png | Bin 0 -> 635 bytes default_images/vcl/res/ncollate_h.png | Bin 0 -> 393 bytes default_images/vcl/res/pin.png | Bin 0 -> 330 bytes default_images/vcl/res/radio.png | Bin 0 -> 323 bytes default_images/vcl/res/radiomac.png | Bin 0 -> 380 bytes default_images/vcl/res/radiomono.bmp | Bin 0 -> 638 bytes default_images/vcl/res/radioos2.png | Bin 0 -> 404 bytes default_images/vcl/res/radiounx.png | Bin 0 -> 368 bytes default_images/vcl/res/radiowin.png | Bin 0 -> 323 bytes default_images/vcl/res/scrbmp.png | Bin 0 -> 749 bytes default_images/vcl/res/scrmsk.png | Bin 0 -> 229 bytes default_images/vcl/res/splharw.png | Bin 0 -> 258 bytes default_images/vcl/res/splhpin.png | Bin 0 -> 299 bytes default_images/vcl/res/splvarw.png | Bin 0 -> 279 bytes default_images/vcl/res/splvpin.png | Bin 0 -> 293 bytes default_images/vcl/source/src/check.png | Bin 368 -> 0 bytes default_images/vcl/source/src/checkmac.png | Bin 377 -> 0 bytes default_images/vcl/source/src/checkmono.bmp | Bin 898 -> 0 bytes default_images/vcl/source/src/checkos2.png | Bin 388 -> 0 bytes default_images/vcl/source/src/checkunx.png | Bin 226 -> 0 bytes default_images/vcl/source/src/checkwin.png | Bin 368 -> 0 bytes default_images/vcl/source/src/closedoc.png | Bin 309 -> 0 bytes default_images/vcl/source/src/closedochc.png | Bin 106 -> 0 bytes default_images/vcl/source/src/collate.png | Bin 672 -> 0 bytes default_images/vcl/source/src/collate_h.png | Bin 380 -> 0 bytes default_images/vcl/source/src/msgbox.png | Bin 6023 -> 0 bytes default_images/vcl/source/src/msgbox_hc.png | Bin 1106 -> 0 bytes default_images/vcl/source/src/ncollate.png | Bin 635 -> 0 bytes default_images/vcl/source/src/ncollate_h.png | Bin 393 -> 0 bytes default_images/vcl/source/src/pin.png | Bin 330 -> 0 bytes default_images/vcl/source/src/radio.png | Bin 323 -> 0 bytes default_images/vcl/source/src/radiomac.png | Bin 380 -> 0 bytes default_images/vcl/source/src/radiomono.bmp | Bin 638 -> 0 bytes default_images/vcl/source/src/radioos2.png | Bin 404 -> 0 bytes default_images/vcl/source/src/radiounx.png | Bin 368 -> 0 bytes default_images/vcl/source/src/radiowin.png | Bin 323 -> 0 bytes default_images/vcl/source/src/scrbmp.png | Bin 749 -> 0 bytes default_images/vcl/source/src/scrmsk.png | Bin 229 -> 0 bytes default_images/vcl/source/src/splharw.png | Bin 258 -> 0 bytes default_images/vcl/source/src/splhpin.png | Bin 299 -> 0 bytes default_images/vcl/source/src/splvarw.png | Bin 279 -> 0 bytes default_images/vcl/source/src/splvpin.png | Bin 293 -> 0 bytes 54 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 default_images/vcl/res/check.png create mode 100644 default_images/vcl/res/checkmac.png create mode 100644 default_images/vcl/res/checkmono.bmp create mode 100644 default_images/vcl/res/checkos2.png create mode 100644 default_images/vcl/res/checkunx.png create mode 100644 default_images/vcl/res/checkwin.png create mode 100644 default_images/vcl/res/closedoc.png create mode 100644 default_images/vcl/res/closedochc.png create mode 100644 default_images/vcl/res/collate.png create mode 100644 default_images/vcl/res/collate_h.png create mode 100644 default_images/vcl/res/msgbox.png create mode 100644 default_images/vcl/res/msgbox_hc.png create mode 100644 default_images/vcl/res/ncollate.png create mode 100644 default_images/vcl/res/ncollate_h.png create mode 100644 default_images/vcl/res/pin.png create mode 100644 default_images/vcl/res/radio.png create mode 100644 default_images/vcl/res/radiomac.png create mode 100644 default_images/vcl/res/radiomono.bmp create mode 100644 default_images/vcl/res/radioos2.png create mode 100644 default_images/vcl/res/radiounx.png create mode 100644 default_images/vcl/res/radiowin.png create mode 100644 default_images/vcl/res/scrbmp.png create mode 100644 default_images/vcl/res/scrmsk.png create mode 100644 default_images/vcl/res/splharw.png create mode 100644 default_images/vcl/res/splhpin.png create mode 100644 default_images/vcl/res/splvarw.png create mode 100644 default_images/vcl/res/splvpin.png delete mode 100644 default_images/vcl/source/src/check.png delete mode 100644 default_images/vcl/source/src/checkmac.png delete mode 100644 default_images/vcl/source/src/checkmono.bmp delete mode 100644 default_images/vcl/source/src/checkos2.png delete mode 100644 default_images/vcl/source/src/checkunx.png delete mode 100644 default_images/vcl/source/src/checkwin.png delete mode 100644 default_images/vcl/source/src/closedoc.png delete mode 100644 default_images/vcl/source/src/closedochc.png delete mode 100644 default_images/vcl/source/src/collate.png delete mode 100644 default_images/vcl/source/src/collate_h.png delete mode 100644 default_images/vcl/source/src/msgbox.png delete mode 100644 default_images/vcl/source/src/msgbox_hc.png delete mode 100644 default_images/vcl/source/src/ncollate.png delete mode 100644 default_images/vcl/source/src/ncollate_h.png delete mode 100644 default_images/vcl/source/src/pin.png delete mode 100644 default_images/vcl/source/src/radio.png delete mode 100644 default_images/vcl/source/src/radiomac.png delete mode 100644 default_images/vcl/source/src/radiomono.bmp delete mode 100644 default_images/vcl/source/src/radioos2.png delete mode 100644 default_images/vcl/source/src/radiounx.png delete mode 100644 default_images/vcl/source/src/radiowin.png delete mode 100644 default_images/vcl/source/src/scrbmp.png delete mode 100644 default_images/vcl/source/src/scrmsk.png delete mode 100644 default_images/vcl/source/src/splharw.png delete mode 100644 default_images/vcl/source/src/splhpin.png delete mode 100644 default_images/vcl/source/src/splvarw.png delete mode 100644 default_images/vcl/source/src/splvpin.png diff --git a/default_images/vcl/res/check.png b/default_images/vcl/res/check.png new file mode 100644 index 000000000000..790e2946215c Binary files /dev/null and b/default_images/vcl/res/check.png differ diff --git a/default_images/vcl/res/checkmac.png b/default_images/vcl/res/checkmac.png new file mode 100644 index 000000000000..acd233932a7a Binary files /dev/null and b/default_images/vcl/res/checkmac.png differ diff --git a/default_images/vcl/res/checkmono.bmp b/default_images/vcl/res/checkmono.bmp new file mode 100644 index 000000000000..7e0610d5e9d8 Binary files /dev/null and b/default_images/vcl/res/checkmono.bmp differ diff --git a/default_images/vcl/res/checkos2.png b/default_images/vcl/res/checkos2.png new file mode 100644 index 000000000000..0083a3ad90a6 Binary files /dev/null and b/default_images/vcl/res/checkos2.png differ diff --git a/default_images/vcl/res/checkunx.png b/default_images/vcl/res/checkunx.png new file mode 100644 index 000000000000..6dd1986fccc7 Binary files /dev/null and b/default_images/vcl/res/checkunx.png differ diff --git a/default_images/vcl/res/checkwin.png b/default_images/vcl/res/checkwin.png new file mode 100644 index 000000000000..790e2946215c Binary files /dev/null and b/default_images/vcl/res/checkwin.png differ diff --git a/default_images/vcl/res/closedoc.png b/default_images/vcl/res/closedoc.png new file mode 100644 index 000000000000..410982a21b05 Binary files /dev/null and b/default_images/vcl/res/closedoc.png differ diff --git a/default_images/vcl/res/closedochc.png b/default_images/vcl/res/closedochc.png new file mode 100644 index 000000000000..1e5056275aae Binary files /dev/null and b/default_images/vcl/res/closedochc.png differ diff --git a/default_images/vcl/res/collate.png b/default_images/vcl/res/collate.png new file mode 100644 index 000000000000..edbd5ea93584 Binary files /dev/null and b/default_images/vcl/res/collate.png differ diff --git a/default_images/vcl/res/collate_h.png b/default_images/vcl/res/collate_h.png new file mode 100644 index 000000000000..f4dc23974343 Binary files /dev/null and b/default_images/vcl/res/collate_h.png differ diff --git a/default_images/vcl/res/msgbox.png b/default_images/vcl/res/msgbox.png new file mode 100644 index 000000000000..ec609e3e66f1 Binary files /dev/null and b/default_images/vcl/res/msgbox.png differ diff --git a/default_images/vcl/res/msgbox_hc.png b/default_images/vcl/res/msgbox_hc.png new file mode 100644 index 000000000000..d3f7429eef81 Binary files /dev/null and b/default_images/vcl/res/msgbox_hc.png differ diff --git a/default_images/vcl/res/ncollate.png b/default_images/vcl/res/ncollate.png new file mode 100644 index 000000000000..a927de86bcf0 Binary files /dev/null and b/default_images/vcl/res/ncollate.png differ diff --git a/default_images/vcl/res/ncollate_h.png b/default_images/vcl/res/ncollate_h.png new file mode 100644 index 000000000000..dde8eba274fc Binary files /dev/null and b/default_images/vcl/res/ncollate_h.png differ diff --git a/default_images/vcl/res/pin.png b/default_images/vcl/res/pin.png new file mode 100644 index 000000000000..d9a9245abf9e Binary files /dev/null and b/default_images/vcl/res/pin.png differ diff --git a/default_images/vcl/res/radio.png b/default_images/vcl/res/radio.png new file mode 100644 index 000000000000..26056ac68a5c Binary files /dev/null and b/default_images/vcl/res/radio.png differ diff --git a/default_images/vcl/res/radiomac.png b/default_images/vcl/res/radiomac.png new file mode 100644 index 000000000000..e62ab10f5cdb Binary files /dev/null and b/default_images/vcl/res/radiomac.png differ diff --git a/default_images/vcl/res/radiomono.bmp b/default_images/vcl/res/radiomono.bmp new file mode 100644 index 000000000000..6c757c34bac8 Binary files /dev/null and b/default_images/vcl/res/radiomono.bmp differ diff --git a/default_images/vcl/res/radioos2.png b/default_images/vcl/res/radioos2.png new file mode 100644 index 000000000000..1e368da109b8 Binary files /dev/null and b/default_images/vcl/res/radioos2.png differ diff --git a/default_images/vcl/res/radiounx.png b/default_images/vcl/res/radiounx.png new file mode 100644 index 000000000000..c395d71260dd Binary files /dev/null and b/default_images/vcl/res/radiounx.png differ diff --git a/default_images/vcl/res/radiowin.png b/default_images/vcl/res/radiowin.png new file mode 100644 index 000000000000..26056ac68a5c Binary files /dev/null and b/default_images/vcl/res/radiowin.png differ diff --git a/default_images/vcl/res/scrbmp.png b/default_images/vcl/res/scrbmp.png new file mode 100644 index 000000000000..4c0efcb83c0e Binary files /dev/null and b/default_images/vcl/res/scrbmp.png differ diff --git a/default_images/vcl/res/scrmsk.png b/default_images/vcl/res/scrmsk.png new file mode 100644 index 000000000000..faa729e3cda6 Binary files /dev/null and b/default_images/vcl/res/scrmsk.png differ diff --git a/default_images/vcl/res/splharw.png b/default_images/vcl/res/splharw.png new file mode 100644 index 000000000000..f3574e774f9d Binary files /dev/null and b/default_images/vcl/res/splharw.png differ diff --git a/default_images/vcl/res/splhpin.png b/default_images/vcl/res/splhpin.png new file mode 100644 index 000000000000..0c81d89bc8a5 Binary files /dev/null and b/default_images/vcl/res/splhpin.png differ diff --git a/default_images/vcl/res/splvarw.png b/default_images/vcl/res/splvarw.png new file mode 100644 index 000000000000..cca207cac6b3 Binary files /dev/null and b/default_images/vcl/res/splvarw.png differ diff --git a/default_images/vcl/res/splvpin.png b/default_images/vcl/res/splvpin.png new file mode 100644 index 000000000000..9610b729a37e Binary files /dev/null and b/default_images/vcl/res/splvpin.png differ diff --git a/default_images/vcl/source/src/check.png b/default_images/vcl/source/src/check.png deleted file mode 100644 index 790e2946215c..000000000000 Binary files a/default_images/vcl/source/src/check.png and /dev/null differ diff --git a/default_images/vcl/source/src/checkmac.png b/default_images/vcl/source/src/checkmac.png deleted file mode 100644 index acd233932a7a..000000000000 Binary files a/default_images/vcl/source/src/checkmac.png and /dev/null differ diff --git a/default_images/vcl/source/src/checkmono.bmp b/default_images/vcl/source/src/checkmono.bmp deleted file mode 100644 index 7e0610d5e9d8..000000000000 Binary files a/default_images/vcl/source/src/checkmono.bmp and /dev/null differ diff --git a/default_images/vcl/source/src/checkos2.png b/default_images/vcl/source/src/checkos2.png deleted file mode 100644 index 0083a3ad90a6..000000000000 Binary files a/default_images/vcl/source/src/checkos2.png and /dev/null differ diff --git a/default_images/vcl/source/src/checkunx.png b/default_images/vcl/source/src/checkunx.png deleted file mode 100644 index 6dd1986fccc7..000000000000 Binary files a/default_images/vcl/source/src/checkunx.png and /dev/null differ diff --git a/default_images/vcl/source/src/checkwin.png b/default_images/vcl/source/src/checkwin.png deleted file mode 100644 index 790e2946215c..000000000000 Binary files a/default_images/vcl/source/src/checkwin.png and /dev/null differ diff --git a/default_images/vcl/source/src/closedoc.png b/default_images/vcl/source/src/closedoc.png deleted file mode 100644 index 410982a21b05..000000000000 Binary files a/default_images/vcl/source/src/closedoc.png and /dev/null differ diff --git a/default_images/vcl/source/src/closedochc.png b/default_images/vcl/source/src/closedochc.png deleted file mode 100644 index 1e5056275aae..000000000000 Binary files a/default_images/vcl/source/src/closedochc.png and /dev/null differ diff --git a/default_images/vcl/source/src/collate.png b/default_images/vcl/source/src/collate.png deleted file mode 100644 index edbd5ea93584..000000000000 Binary files a/default_images/vcl/source/src/collate.png and /dev/null differ diff --git a/default_images/vcl/source/src/collate_h.png b/default_images/vcl/source/src/collate_h.png deleted file mode 100644 index f4dc23974343..000000000000 Binary files a/default_images/vcl/source/src/collate_h.png and /dev/null differ diff --git a/default_images/vcl/source/src/msgbox.png b/default_images/vcl/source/src/msgbox.png deleted file mode 100644 index ec609e3e66f1..000000000000 Binary files a/default_images/vcl/source/src/msgbox.png and /dev/null differ diff --git a/default_images/vcl/source/src/msgbox_hc.png b/default_images/vcl/source/src/msgbox_hc.png deleted file mode 100644 index d3f7429eef81..000000000000 Binary files a/default_images/vcl/source/src/msgbox_hc.png and /dev/null differ diff --git a/default_images/vcl/source/src/ncollate.png b/default_images/vcl/source/src/ncollate.png deleted file mode 100644 index a927de86bcf0..000000000000 Binary files a/default_images/vcl/source/src/ncollate.png and /dev/null differ diff --git a/default_images/vcl/source/src/ncollate_h.png b/default_images/vcl/source/src/ncollate_h.png deleted file mode 100644 index dde8eba274fc..000000000000 Binary files a/default_images/vcl/source/src/ncollate_h.png and /dev/null differ diff --git a/default_images/vcl/source/src/pin.png b/default_images/vcl/source/src/pin.png deleted file mode 100644 index d9a9245abf9e..000000000000 Binary files a/default_images/vcl/source/src/pin.png and /dev/null differ diff --git a/default_images/vcl/source/src/radio.png b/default_images/vcl/source/src/radio.png deleted file mode 100644 index 26056ac68a5c..000000000000 Binary files a/default_images/vcl/source/src/radio.png and /dev/null differ diff --git a/default_images/vcl/source/src/radiomac.png b/default_images/vcl/source/src/radiomac.png deleted file mode 100644 index e62ab10f5cdb..000000000000 Binary files a/default_images/vcl/source/src/radiomac.png and /dev/null differ diff --git a/default_images/vcl/source/src/radiomono.bmp b/default_images/vcl/source/src/radiomono.bmp deleted file mode 100644 index 6c757c34bac8..000000000000 Binary files a/default_images/vcl/source/src/radiomono.bmp and /dev/null differ diff --git a/default_images/vcl/source/src/radioos2.png b/default_images/vcl/source/src/radioos2.png deleted file mode 100644 index 1e368da109b8..000000000000 Binary files a/default_images/vcl/source/src/radioos2.png and /dev/null differ diff --git a/default_images/vcl/source/src/radiounx.png b/default_images/vcl/source/src/radiounx.png deleted file mode 100644 index c395d71260dd..000000000000 Binary files a/default_images/vcl/source/src/radiounx.png and /dev/null differ diff --git a/default_images/vcl/source/src/radiowin.png b/default_images/vcl/source/src/radiowin.png deleted file mode 100644 index 26056ac68a5c..000000000000 Binary files a/default_images/vcl/source/src/radiowin.png and /dev/null differ diff --git a/default_images/vcl/source/src/scrbmp.png b/default_images/vcl/source/src/scrbmp.png deleted file mode 100644 index 4c0efcb83c0e..000000000000 Binary files a/default_images/vcl/source/src/scrbmp.png and /dev/null differ diff --git a/default_images/vcl/source/src/scrmsk.png b/default_images/vcl/source/src/scrmsk.png deleted file mode 100644 index faa729e3cda6..000000000000 Binary files a/default_images/vcl/source/src/scrmsk.png and /dev/null differ diff --git a/default_images/vcl/source/src/splharw.png b/default_images/vcl/source/src/splharw.png deleted file mode 100644 index f3574e774f9d..000000000000 Binary files a/default_images/vcl/source/src/splharw.png and /dev/null differ diff --git a/default_images/vcl/source/src/splhpin.png b/default_images/vcl/source/src/splhpin.png deleted file mode 100644 index 0c81d89bc8a5..000000000000 Binary files a/default_images/vcl/source/src/splhpin.png and /dev/null differ diff --git a/default_images/vcl/source/src/splvarw.png b/default_images/vcl/source/src/splvarw.png deleted file mode 100644 index cca207cac6b3..000000000000 Binary files a/default_images/vcl/source/src/splvarw.png and /dev/null differ diff --git a/default_images/vcl/source/src/splvpin.png b/default_images/vcl/source/src/splvpin.png deleted file mode 100644 index 9610b729a37e..000000000000 Binary files a/default_images/vcl/source/src/splvpin.png and /dev/null differ -- cgit v1.2.3 From 65731acd090a7ec992e761321d232ca997772f0f Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 27 Jan 2011 12:31:21 +0100 Subject: vcl2gnumake: #i116588# move vcl to gbuild (step 4, windows) --- vcl/Library_vcl.mk | 65 +++++++++++++++++++++++++++--------------- vcl/win/source/app/salinfo.cxx | 13 +-------- vcl/win/source/gdi/wntgdi.cxx | 3 -- 3 files changed, 43 insertions(+), 38 deletions(-) mode change 100644 => 100755 vcl/Library_vcl.mk mode change 100644 => 100755 vcl/win/source/gdi/wntgdi.cxx diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk old mode 100644 new mode 100755 index 8c90cb6ce165..0a1648ed3114 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -37,7 +37,7 @@ endif $(eval $(call gb_Library_add_package_headers,vcl,vcl_inc)) -$(eval $(call gb_Library_add_precompiled_header,vcl,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) +#$(eval $(call gb_Library_add_precompiled_header,vcl,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) $(eval $(call gb_Library_set_include,vcl,\ $$(INCLUDE) \ @@ -82,9 +82,15 @@ $(eval $(call gb_Library_add_linked_libs,vcl,\ )) ifneq ($(ENABLE_GRAPHITE),) +ifneq ($(OS),WNT) $(eval $(call gb_Library_add_linked_static_libs,vcl,\ graphite \ )) +else +$(eval $(call gb_Library_add_linked_libs,vcl,\ + graphite_dll \ +)) +endif endif ifeq ($(GUIBASE),unx) $(eval $(call gb_Library_add_linked_libs,vcl,\ @@ -197,6 +203,30 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ )) endif +ifeq ($(OS),WNT) +$(eval $(call gb_Library_add_exception_objects,vcl,\ + vcl/win/source/app/saldata \ + vcl/win/source/app/salinfo \ + vcl/win/source/app/salinst \ + vcl/win/source/app/salshl \ + vcl/win/source/app/saltimer \ + vcl/win/source/gdi/salbmp \ + vcl/win/source/gdi/salgdi \ + vcl/win/source/gdi/salgdi2 \ + vcl/win/source/gdi/salgdi3 \ + vcl/win/source/gdi/salgdi_gdiplus \ + vcl/win/source/gdi/salnativewidgets-luna \ + vcl/win/source/gdi/salprn \ + vcl/win/source/gdi/salvd \ + vcl/win/source/gdi/winlayout \ + vcl/win/source/gdi/wntgdi \ + vcl/win/source/window/salframe \ + vcl/win/source/window/salmenu \ + vcl/win/source/window/salobj \ +)) +#$(call gb_CxxObject_get_target,vcl/win/source/gdi/wntgdi) : DEFS += -DFOO +endif + $(eval $(call gb_Library_add_cobjects,vcl,\ vcl/source/fontsubset/list \ )) @@ -380,13 +410,17 @@ $(eval $(call gb_Library_set_defs,vcl,\ -DENABLE_GRAPHITE \ )) $(eval $(call gb_Library_add_exception_objects,vcl,\ - vcl/source/glyphs/graphite_adaptors \ vcl/source/glyphs/graphite_cache \ vcl/source/glyphs/graphite_features \ vcl/source/glyphs/graphite_layout \ - vcl/source/glyphs/graphite_serverfont \ vcl/source/glyphs/graphite_textsrc \ )) +ifeq ($(GUIBASE),unx) +$(eval $(call gb_Library_add_exception_objects,vcl,\ + vcl/source/glyphs/graphite_adaptors \ + vcl/source/glyphs/graphite_serverfont \ +)) +endif endif ifeq ($(OS),LINUX) @@ -411,29 +445,14 @@ $(eval $(call gb_Library_set_ldflags,vcl,\ endif ifeq ($(OS),WNT) -ifneq ($(USE_MINGW),) -$(eval $(call gb_Library_add_linked_libs,vcl,\ - mingwthrd \ - $(gb_MINGW_LIBSTDCPP) \ - mingw32 \ - $(gb_MINGW_LIBGCC) \ - uwinapi \ - moldname \ - mingwex \ - advapi32 \ - kernel32 \ - mpr \ - msvcrt \ - ole32 \ - shell32 \ - user32 \ - uuid \ -)) -else $(eval $(call gb_Library_add_linked_libs,vcl,\ advapi32 \ + gdi32 \ + gdiplus \ + imm32 \ kernel32 \ mpr \ + msimg32 \ msvcrt \ oldnames \ ole32 \ @@ -441,7 +460,7 @@ $(eval $(call gb_Library_add_linked_libs,vcl,\ user32 \ uuid \ uwinapi \ + winspool \ )) endif -endif # vim: set noet sw=4 ts=4: diff --git a/vcl/win/source/app/salinfo.cxx b/vcl/win/source/app/salinfo.cxx index 5a846d068d9a..37d416f2a90f 100755 --- a/vcl/win/source/app/salinfo.cxx +++ b/vcl/win/source/app/salinfo.cxx @@ -34,18 +34,7 @@ #define WINVER 0x0500 #endif -#define VCL_NEED_BASETSD -#include "tools/presys.h" -#if defined _MSC_VER -#pragma warning(push, 1) -#endif -#include -#include -#if defined _MSC_VER -#pragma warning(pop) -#endif -#include "tools/postsys.h" - +#include "svsys.h" #include "rtl/ustrbuf.hxx" #include "tools/debug.hxx" diff --git a/vcl/win/source/gdi/wntgdi.cxx b/vcl/win/source/gdi/wntgdi.cxx old mode 100644 new mode 100755 index eb53fb4d8699..2f6d73a83ec6 --- a/vcl/win/source/gdi/wntgdi.cxx +++ b/vcl/win/source/gdi/wntgdi.cxx @@ -25,9 +25,6 @@ * ************************************************************************/ -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_vcl.hxx" - #if defined _MSC_VER #pragma warning(push, 1) #endif -- cgit v1.2.3 From 31f889825edf23a303d41a30000a904558e557cf Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 27 Jan 2011 12:31:21 +0100 Subject: vcl2gnumake: #i116588# move vcl to gbuild (step 4, windows) --- Repository.mk | 1 + RepositoryFixes.mk | 6 ++++++ solenv/gbuild/platform/windows.mk | 4 ++++ 3 files changed, 11 insertions(+) mode change 100644 => 100755 Repository.mk mode change 100644 => 100755 RepositoryFixes.mk diff --git a/Repository.mk b/Repository.mk old mode 100644 new mode 100755 index 95f9a128c98f..d4c796330578 --- a/Repository.mk +++ b/Repository.mk @@ -92,6 +92,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_URE, \ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \ icuuc \ icule \ + graphite_dll \ )) diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk old mode 100644 new mode 100755 index 31604e13c672..6ccc096a550e --- a/RepositoryFixes.mk +++ b/RepositoryFixes.mk @@ -126,9 +126,14 @@ endif gb_Library_NOILIBFILENAMES:=\ advapi32 \ gdi32 \ + gdiplus \ + graphite_dll \ gnu_getopt \ icuuc \ + icule \ + imm32\ kernel32 \ + msimg32 \ msvcrt \ mpr \ oldnames \ @@ -140,6 +145,7 @@ gb_Library_NOILIBFILENAMES:=\ user32 \ uuid \ uwinapi \ + winspool \ gb_Library_FILENAMES := $(filter-out $(foreach lib,$(gb_Library_NOILIBFILENAMES),$(lib):%),$(gb_Library_FILENAMES)) gb_Library_FILENAMES += $(foreach lib,$(gb_Library_NOILIBFILENAMES),$(lib):$(lib)$(gb_Library_PLAINEXT)) diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk index a25d21ff5e79..be8f34bdd258 100755 --- a/solenv/gbuild/platform/windows.mk +++ b/solenv/gbuild/platform/windows.mk @@ -406,8 +406,11 @@ gb_Library_PLAINEXT := .lib gb_Library_PLAINLIBS_NONE += \ advapi32 \ gdi32 \ + gdiplus \ gnu_getopt \ + imm32\ kernel32 \ + msimg32 \ msvcrt \ mpr \ oldnames \ @@ -418,6 +421,7 @@ gb_Library_PLAINLIBS_NONE += \ user32 \ uuid \ uwinapi \ + winspool \ z \ gb_LinkTarget_LAYER := \ -- cgit v1.2.3 From 9d9c26ba19c9c27c96f096e0a167609932bc2200 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 27 Jan 2011 18:37:48 +0100 Subject: vcl2gnumake: #i116588# support all optional link and cflags --- vcl/Library_vcl.mk | 35 +++++++++++++++++----- vcl/Library_vclplug_gen.mk | 74 ++++++++++++++++++++++++++++++++++++++++++++++ vcl/Library_vclplug_gtk.mk | 11 +++++++ 3 files changed, 113 insertions(+), 7 deletions(-) diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 0a1648ed3114..b7d0999fe28c 100755 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -58,7 +58,7 @@ endif $(eval $(call gb_Library_set_defs,vcl,\ $$(DEFS) \ -DVCL_DLLIMPLEMENTATION \ - -DCUI_DLL_NAME=\"$(gb_Library_SYSPRE)cui$(gb_Library_OOOEXT)\" \ + -DCUI_DLL_NAME=\"$(or $(call gb_Library_get_dllname,cui),$(call gb_Library_get_filename,cui))\" \ )) $(eval $(call gb_Library_add_linked_libs,vcl,\ @@ -82,11 +82,7 @@ $(eval $(call gb_Library_add_linked_libs,vcl,\ )) ifneq ($(ENABLE_GRAPHITE),) -ifneq ($(OS),WNT) -$(eval $(call gb_Library_add_linked_static_libs,vcl,\ - graphite \ -)) -else +ifeq ($(OS),WNT) $(eval $(call gb_Library_add_linked_libs,vcl,\ graphite_dll \ )) @@ -103,6 +99,12 @@ $(eval $(call gb_Library_set_cxxflags,vcl,\ $$(CXXFLAGS) \ $$(OBJCXXFLAGS) \ )) +ifeq ($(ENABLE_CAIRO),TRUE) +$(eval $(call gb_Library_set_defs,vclplug_gen,\ + $$(DEFS) \ + -DCAIRO \ +)) +endif $(eval $(call gb_Library_add_objcxxobjects,vcl,\ vcl/aqua/source/a11y/aqua11yactionwrapper \ vcl/aqua/source/a11y/aqua11ycomponentwrapper \ @@ -177,13 +179,21 @@ $(eval $(call gb_Library_set_defs,vcl,\ $$(DEFS) \ -DSAL_DLLPREFIX=\"$(gb_Library_SYSPRE)\" \ -DSAL_DLLPOSTFIX=\"$(gb_Library_OOOEXT)\" \ - -D_XSALSET_LIBNAME=\"$(gb_Library_SYSPRE)spa$(gb_Library_OOOEXT)\" \ + -D_XSALSET_LIBNAME=\"$(call gb_Library_get_filename,spa)\" \ )) +## handle fontconfig ifneq ($(ENABLE_FONTCONFIG),) $(eval $(call gb_Library_set_defs,vcl,\ $$(DEFS) \ -DENABLE_FONTCONFIG \ )) +## handle CUPS +ifneq ($(ENABLE_CUPS),) +$(eval $(call gb_Library_set_defs,vcl,\ + $$(DEFS) \ + -DENABLE_CUPS \ +)) +endif endif $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/glyphs/gcach_ftyp \ @@ -404,6 +414,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/window/wrkwin \ )) +## handle Graphite ifneq ($(ENABLE_GRAPHITE),) $(eval $(call gb_Library_set_defs,vcl,\ $$(DEFS) \ @@ -420,6 +431,16 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/glyphs/graphite_adaptors \ vcl/source/glyphs/graphite_serverfont \ )) +ifeq ($(SYSTEM_GRAPHITE),YES) +$(eval $(call gb_Library_set_ldflags,vcl,\ + $$(LDFLAGS) \ + $(GRAPHITE_LIBS) +)) +else +$(eval $(call gb_Library_add_linked_static_libs,vcl,\ + graphite \ +)) +endif endif endif diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk index cca106caf419..7d534aa211a3 100644 --- a/vcl/Library_vclplug_gen.mk +++ b/vcl/Library_vclplug_gen.mk @@ -121,6 +121,80 @@ $(eval $(call gb_Library_set_defs,vclplug_gen,\ -DVCLPLUG_GEN_IMPLEMENTATION \ )) + +## handle RandR +ifneq ($(ENABLE_RANDR),) +$(eval $(call gb_Library_set_defs,vclplug_gen,\ + $$(DEFS) \ + -DUSE_RANDR \ +)) +ifeq ($(XRANDR_DLOPEN),FALSE) +$(eval $(call gb_Library_set_cxxflags,vclplug_gen,\ + $$(CXXFLAGS) \ + $$(XRANDR_CFLAGS) \ +)) +else +$(eval $(call gb_Library_set_defs,vclplug_gen,\ + $$(DEFS) \ + -DXRANDR_DLOPEN \ +)) +endif +endif + +## handle Xinerama +ifneq ($(USE_XINERAMA),NO) +ifneq ($(OS),SOLARIS) +# not Solaris +$(eval $(call gb_Library_set_defs,vclplug_gen,\ + $$(DEFS) \ + -DUSE_XINERAMA_XORG \ +)) +ifeq ($(XINERAMA_LINK),dynamic) +$(eval $(call gb_Library_set_ldflags,vclplug_gen,\ + $$(LDFLAGS) \ + -lXinerama \ +)) +else +$(eval $(call gb_Library_set_ldflags,vclplug_gen,\ + $$(LDFLAGS) \ + -Wl,-Bstatic -lXinerama -Wl,-Bdynamic \ +)) +endif +else +# Solaris +$(eval $(call gb_Library_set_defs,vclplug_gen,\ + $$(DEFS) \ + -DUSE_XINERAMA_XSUN \ +)) +ifeq ($(USE_XINERAMA_VERSION),Xorg) +# Solaris, Xorg +ifeq ($(XINERAMA_LINK),dynamic) +$(eval $(call gb_Library_set_ldflags,vclplug_gen,\ + $$(LDFLAGS) \ + -lXinerama \ +)) +else +$(eval $(call gb_Library_set_ldflags,vclplug_gen,\ + $$(LDFLAGS) \ + -Wl,-Bstatic -lXinerama -Wl,-Bdynamic \ +)) +endif +endif +endif +endif + +## handle Render linking +ifeq ($(XRENDER_LINK),YES) +$(eval $(call gb_Library_set_defs,vclplug_gen,\ + $$(DEFS) \ + -DXRENDER_LINK \ +)) +$(eval $(call gb_Library_set_ldflags,vclplug_gen,\ + $$(LDFLAGS) \ + $(shell pkg-config --libs xrender) \ +)) +endif + ifeq ($(OS),LINUX) $(eval $(call gb_Library_add_linked_libs,vclplug_gen,\ dl \ diff --git a/vcl/Library_vclplug_gtk.mk b/vcl/Library_vclplug_gtk.mk index 1b8e2d881640..d0df791bad7d 100644 --- a/vcl/Library_vclplug_gtk.mk +++ b/vcl/Library_vclplug_gtk.mk @@ -52,6 +52,17 @@ $(eval $(call gb_Library_set_defs,vclplug_gtk,\ -DVERSION=\"$(UPD)$(LAST_MINOR)\" \ )) +ifneq ($(ENABLE_DBUS),) +$(eval $(call gb_Library_set_defs,vclplug_gtk,\ + $$(DEFS) \ + -DENABLE_DBUS \ +)) +$(eval $(call gb_Library_set_ldflags,vclplug_gtk,\ + $$(LDFLAGS) \ + $(shell pkg-config --libs dbus-glib-1)\ +)) +endif + $(eval $(call gb_Library_set_ldflags,vclplug_gtk,\ $$(LDFLAGS) \ $$(GTK_LIBS)\ -- cgit v1.2.3 From 2b2de53ac02bcd85dcfa727e7fcc047189ca2e67 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 27 Jan 2011 18:37:48 +0100 Subject: vcl2gnumake: #i116588# support all optional link and cflags --- Repository.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/Repository.mk b/Repository.mk index d4c796330578..6b4acd635721 100755 --- a/Repository.mk +++ b/Repository.mk @@ -62,6 +62,7 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \ sb \ sfx \ sot \ + spa \ svl \ svt \ svx \ -- cgit v1.2.3 From 3465a97f4a786423bb8d86ef666da430337878e4 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 28 Jan 2011 13:43:38 +0100 Subject: vcl2gnumake: #i116588# add zip file for macos (preliminary) --- vcl/Module_vcl.mk | 6 ++++++ vcl/Package_osx.mk | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 vcl/Package_osx.mk diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk index db2941976270..ff35aadd574c 100644 --- a/vcl/Module_vcl.mk +++ b/vcl/Module_vcl.mk @@ -59,5 +59,11 @@ $(eval $(call gb_Module_add_targets,vcl,\ endif endif +ifeq ($(GUIBASE),aqua) +$(eval $(call gb_Module_add_targets,vcl,\ + Package_osx \ +)) +endif + # vim: set noet sw=4 ts=4: diff --git a/vcl/Package_osx.mk b/vcl/Package_osx.mk new file mode 100644 index 000000000000..414479a88fed --- /dev/null +++ b/vcl/Package_osx.mk @@ -0,0 +1,36 @@ +#************************************************************************* +# +# 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. +# +#************************************************************************* + +### FIXME: when we have a real ZipTarget mechanism in gbuild replace this mess +$(eval $(call gb_Package_Package,vcl_zip,)) +$(eval $(call gb_Package_add_file,vcl_zip,bin/osxres.zip,$(WORKDIR)/Misc/osxres.zip)) + +/$(WORKDIR)/Misc/osxres.zip: $(SRCDIR)/vcl/aqua/source/res/MainMenu.nib/*.nib $(SRCDIR)/vcl/aqua/source/res/cursors/*.png + cd $(SRCDIR)/vcl/aqua/source/res ; \ + mkdir -p $(dir $@) ; \ + zip $@ MainMenu.nib/*.nib cursors/*.png + -- cgit v1.2.3 From 59c216877d29a26854496a74ca8a2a8d6aecfffa Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 28 Jan 2011 15:10:29 +0100 Subject: vcl2gnumake: #i116588# add a define needed by unohelp.cxx --- vcl/Library_vcl.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index b7d0999fe28c..a6ea20856d35 100755 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -59,6 +59,7 @@ $(eval $(call gb_Library_set_defs,vcl,\ $$(DEFS) \ -DVCL_DLLIMPLEMENTATION \ -DCUI_DLL_NAME=\"$(or $(call gb_Library_get_dllname,cui),$(call gb_Library_get_filename,cui))\" \ + -DDLLPOSTFIX=$(subst $(or $(gb_Library_DLLEXT),$(gb_Library_PLAINEXT)),,$(gb_Library_OOOEXT)) \ )) $(eval $(call gb_Library_add_linked_libs,vcl,\ -- cgit v1.2.3 From a9aa5e1feff13541cdf725f83c408d5c5d795591 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 28 Jan 2011 17:09:18 +0100 Subject: vcl2gnumake: #i116588# remove old makefiles --- vcl/Library_vcl.mk | 3 +- vcl/aqua/source/a11y/makefile.mk | 88 ------ vcl/aqua/source/app/makefile.mk | 63 ---- vcl/aqua/source/dtrans/makefile.mk | 68 ----- vcl/aqua/source/gdi/makefile.mk | 74 ----- vcl/aqua/source/res/makefile.mk | 54 ---- vcl/aqua/source/window/makefile.mk | 63 ---- vcl/inc/makefile.mk | 49 --- vcl/source/app/makefile.mk | 69 ----- vcl/source/components/makefile.mk | 52 ---- vcl/source/control/makefile.mk | 80 ----- vcl/source/fontsubset/makefile.mk | 51 ---- vcl/source/gdi/makefile.mk | 122 -------- vcl/source/glyphs/makefile.mk | 80 ----- vcl/source/helper/makefile.mk | 55 ---- vcl/source/salmain/makefile.mk | 38 --- vcl/source/src/makefile.mk | 56 ---- vcl/source/window/makefile.mk | 106 ------- vcl/unx/generic/app/makefile.mk | 110 ------- vcl/unx/generic/desktopdetect/makefile.mk | 57 ---- vcl/unx/generic/dtrans/makefile.mk | 68 ----- vcl/unx/generic/fontmanager/makefile.mk | 72 ----- vcl/unx/generic/gdi/makefile.mk | 101 ------- vcl/unx/generic/plugadapt/makefile.mk | 59 ---- vcl/unx/generic/printer/makefile.mk | 70 ----- vcl/unx/generic/printergfx/makefile.mk | 65 ---- vcl/unx/generic/window/makefile.mk | 59 ---- vcl/unx/gtk/a11y/makefile.mk | 93 ------ vcl/unx/gtk/app/makefile.mk | 76 ----- vcl/unx/gtk/gdi/makefile.mk | 67 ----- vcl/unx/gtk/window/makefile.mk | 79 ----- vcl/unx/headless/makefile.mk | 66 ----- vcl/unx/kde/makefile.mk | 81 ----- vcl/unx/kde4/makefile.mk | 88 ------ vcl/util/hidother.src | 31 -- vcl/util/linksvp/makefile.mk | 65 ---- vcl/util/makefile.mk | 474 ------------------------------ vcl/util/makefile.pmk | 34 --- vcl/util/makefile2.pmk | 41 --- vcl/util/target.pmk | 39 --- vcl/win/source/app/MAKEFILE.MK | 53 ---- vcl/win/source/gdi/MAKEFILE.MK | 69 ----- vcl/win/source/src/MAKEFILE.MK | 130 -------- vcl/win/source/window/MAKEFILE.MK | 60 ---- 44 files changed, 2 insertions(+), 3376 deletions(-) delete mode 100644 vcl/aqua/source/a11y/makefile.mk delete mode 100644 vcl/aqua/source/app/makefile.mk delete mode 100644 vcl/aqua/source/dtrans/makefile.mk delete mode 100644 vcl/aqua/source/gdi/makefile.mk delete mode 100644 vcl/aqua/source/res/makefile.mk delete mode 100644 vcl/aqua/source/window/makefile.mk delete mode 100644 vcl/inc/makefile.mk delete mode 100644 vcl/source/app/makefile.mk delete mode 100644 vcl/source/components/makefile.mk delete mode 100644 vcl/source/control/makefile.mk delete mode 100644 vcl/source/fontsubset/makefile.mk delete mode 100755 vcl/source/gdi/makefile.mk delete mode 100644 vcl/source/glyphs/makefile.mk delete mode 100644 vcl/source/helper/makefile.mk delete mode 100644 vcl/source/salmain/makefile.mk delete mode 100644 vcl/source/src/makefile.mk delete mode 100644 vcl/source/window/makefile.mk delete mode 100644 vcl/unx/generic/app/makefile.mk delete mode 100644 vcl/unx/generic/desktopdetect/makefile.mk delete mode 100644 vcl/unx/generic/dtrans/makefile.mk delete mode 100644 vcl/unx/generic/fontmanager/makefile.mk delete mode 100644 vcl/unx/generic/gdi/makefile.mk delete mode 100644 vcl/unx/generic/plugadapt/makefile.mk delete mode 100644 vcl/unx/generic/printer/makefile.mk delete mode 100644 vcl/unx/generic/printergfx/makefile.mk delete mode 100644 vcl/unx/generic/window/makefile.mk delete mode 100644 vcl/unx/gtk/a11y/makefile.mk delete mode 100644 vcl/unx/gtk/app/makefile.mk delete mode 100644 vcl/unx/gtk/gdi/makefile.mk delete mode 100644 vcl/unx/gtk/window/makefile.mk delete mode 100644 vcl/unx/headless/makefile.mk delete mode 100644 vcl/unx/kde/makefile.mk delete mode 100644 vcl/unx/kde4/makefile.mk delete mode 100644 vcl/util/hidother.src delete mode 100644 vcl/util/linksvp/makefile.mk delete mode 100644 vcl/util/makefile.mk delete mode 100644 vcl/util/makefile.pmk delete mode 100644 vcl/util/makefile2.pmk delete mode 100644 vcl/util/target.pmk delete mode 100644 vcl/win/source/app/MAKEFILE.MK delete mode 100644 vcl/win/source/gdi/MAKEFILE.MK delete mode 100644 vcl/win/source/src/MAKEFILE.MK delete mode 100644 vcl/win/source/window/MAKEFILE.MK diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index a6ea20856d35..d2a02a888513 100755 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -235,7 +235,8 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/win/source/window/salmenu \ vcl/win/source/window/salobj \ )) -#$(call gb_CxxObject_get_target,vcl/win/source/gdi/wntgdi) : DEFS += -DFOO + +### FIXME: need to link windows resources to vcl dll endif $(eval $(call gb_Library_add_cobjects,vcl,\ diff --git a/vcl/aqua/source/a11y/makefile.mk b/vcl/aqua/source/a11y/makefile.mk deleted file mode 100644 index 0a16281e5a69..000000000000 --- a/vcl/aqua/source/a11y/makefile.mk +++ /dev/null @@ -1,88 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=sala11y -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"!="aqua" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"!="aqua" - -SLOFILES= \ - $(SLO)$/aqua11ywrapper.obj \ - $(SLO)$/aqua11yfactory.obj \ - $(SLO)$/aqua11yfocuslistener.obj \ - $(SLO)$/aqua11yfocustracker.obj \ - $(SLO)$/aqua11ylistener.obj \ - $(SLO)$/aqua11yrolehelper.obj \ - $(SLO)$/aqua11yactionwrapper.obj \ - $(SLO)$/aqua11ycomponentwrapper.obj \ - $(SLO)$/aqua11yselectionwrapper.obj \ - $(SLO)$/aqua11ytablewrapper.obj \ - $(SLO)$/aqua11ytextattributeswrapper.obj \ - $(SLO)$/aqua11ytextwrapper.obj \ - $(SLO)$/aqua11yutil.obj \ - $(SLO)$/aqua11yvaluewrapper.obj \ - $(SLO)$/aqua11ywrapperbutton.obj \ - $(SLO)$/aqua11ywrappercheckbox.obj \ - $(SLO)$/aqua11ywrappercombobox.obj \ - $(SLO)$/aqua11ywrappergroup.obj \ - $(SLO)$/aqua11ywrapperlist.obj \ - $(SLO)$/aqua11ywrapperradiobutton.obj \ - $(SLO)$/aqua11ywrapperradiogroup.obj \ - $(SLO)$/aqua11ywrapperrow.obj \ - $(SLO)$/aqua11ywrapperscrollarea.obj \ - $(SLO)$/aqua11ywrapperscrollbar.obj \ - $(SLO)$/aqua11ywrappersplitter.obj \ - $(SLO)$/aqua11ywrapperstatictext.obj \ - $(SLO)$/aqua11ywrappertabgroup.obj \ - $(SLO)$/aqua11ywrappertextarea.obj \ - $(SLO)$/aqua11ywrappertoolbar.obj \ - $(SLO)$/documentfocuslistener.obj - -.ENDIF # "$(GUIBASE)"!="aqua" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/vcl/aqua/source/app/makefile.mk b/vcl/aqua/source/app/makefile.mk deleted file mode 100644 index a0ddcbc02226..000000000000 --- a/vcl/aqua/source/app/makefile.mk +++ /dev/null @@ -1,63 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=salapp -.INCLUDE : $(PRJ)$/util$/makefile.pmk -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"!="aqua" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"!="aqua" - -SLOFILES= $(SLO)$/salinst.obj \ - $(SLO)$/saldata.obj \ - $(SLO)$/vclnsapp.obj \ - $(SLO)$/saltimer.obj \ - $(SLO)$/salnstimer.obj \ - $(SLO)$/salsys.obj - -.ENDIF # "$(GUIBASE)"!="aqua" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk - diff --git a/vcl/aqua/source/dtrans/makefile.mk b/vcl/aqua/source/dtrans/makefile.mk deleted file mode 100644 index 369799c9a260..000000000000 --- a/vcl/aqua/source/dtrans/makefile.mk +++ /dev/null @@ -1,68 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=dtransaqua -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# ------------------------------------------------------------------ - -.IF "$(OS)"!="MACOSX" -dummy: - @echo "Nothing to build for this platform" -.ELSE # "$(OS)"!="MACOSX" -.IF "$(GUIBASE)"!="aqua" -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" -.ELSE - -CFLAGSCXX+=-fconstant-cfstrings -x objective-c++ -fobjc-exceptions - -SLOFILES= \ - $(SLO)$/aqua_clipboard.obj \ - $(SLO)$/DataFlavorMapping.obj \ - $(SLO)$/OSXTransferable.obj \ - $(SLO)$/HtmlFmtFlt.obj \ - $(SLO)$/PictToBmpFlt.obj \ - $(SLO)$/DropTarget.obj \ - $(SLO)$/DragSource.obj \ - $(SLO)$/service_entry.obj \ - $(SLO)$/DragSourceContext.obj \ - $(SLO)$/DragActionConversion.obj - -# --- Targets ------------------------------------------------------ -.INCLUDE : target.mk - -.ENDIF # "$(GUIBASE)"!="aqua" -.ENDIF # "$(OS)"!="MACOSX" - diff --git a/vcl/aqua/source/gdi/makefile.mk b/vcl/aqua/source/gdi/makefile.mk deleted file mode 100644 index 2aea58e49250..000000000000 --- a/vcl/aqua/source/gdi/makefile.mk +++ /dev/null @@ -1,74 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=salgdi -ENABLE_EXCEPTIONS=TRUE - -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"!="aqua" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"!="aqua" - -SLOFILES= $(SLO)$/salmathutils.obj \ - $(SLO)$/salcolorutils.obj \ - $(SLO)$/salgdiutils.obj \ - $(SLO)$/salnativewidgets.obj \ - $(SLO)$/salatsuifontutils.obj \ - $(SLO)$/salatslayout.obj \ - $(SLO)$/salgdi.obj \ - $(SLO)$/salvd.obj \ - $(SLO)$/salprn.obj \ - $(SLO)$/aquaprintview.obj \ - $(SLO)$/aquaprintaccessoryview.obj \ - $(SLO)$/salbmp.obj - -.IF "$(ENABLE_CAIRO)" == "TRUE" -CDEFS+= -DCAIRO -.ENDIF - -.ENDIF # "$(GUIBASE)"!="aqua" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk - diff --git a/vcl/aqua/source/res/makefile.mk b/vcl/aqua/source/res/makefile.mk deleted file mode 100644 index 2043504450e7..000000000000 --- a/vcl/aqua/source/res/makefile.mk +++ /dev/null @@ -1,54 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. -TARGET=aquares - -# --- Settings ------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files ---------------------------------------------------- - -.IF "$(OS)"!="MACOSX" - -dummy: - @echo "Nothing to build for OS $(OS)" - -.ELSE # "$(OS)"!="MACOSX" - -ZIPFLAGS = -r -ZIP1TARGET = osxres -#ZIP1DIR = -ZIP1LIST = MainMenu.nib/*.nib cursors/*.png - -# --- Targets -------------------------------------------------- - -.INCLUDE : target.mk - -.ENDIF # "$(OS)"!="MACOSX" - diff --git a/vcl/aqua/source/window/makefile.mk b/vcl/aqua/source/window/makefile.mk deleted file mode 100644 index 7afbce885e4a..000000000000 --- a/vcl/aqua/source/window/makefile.mk +++ /dev/null @@ -1,63 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=salwin -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"!="aqua" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"!="aqua" - -SLOFILES= \ - $(SLO)/salframe.obj \ - $(SLO)/salframeview.obj \ - $(SLO)/salmenu.obj \ - $(SLO)/salnsmenu.obj \ - $(SLO)/salobj.obj - -.ENDIF # "$(GUIBASE)"!="aqua" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/vcl/inc/makefile.mk b/vcl/inc/makefile.mk deleted file mode 100644 index f1f917284f71..000000000000 --- a/vcl/inc/makefile.mk +++ /dev/null @@ -1,49 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=.. - -PRJNAME=vcl -TARGET=inc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/util$/makefile.pmk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- Files -------------------------------------------------------- -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -.IF "$(ENABLE_PCH)"!="" -ALLTAR : \ - $(SLO)$/precompiled.pch \ - $(SLO)$/precompiled_ex.pch - -.ENDIF # "$(ENABLE_PCH)"!="" - diff --git a/vcl/source/app/makefile.mk b/vcl/source/app/makefile.mk deleted file mode 100644 index 5d14f0032b4a..000000000000 --- a/vcl/source/app/makefile.mk +++ /dev/null @@ -1,69 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=vcl -TARGET=app -ENABLE_EXCEPTIONS=TRUE - -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -CDEFS+=-DDLLPOSTFIX=$(DLLPOSTFIX) - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/dbggui.obj \ - $(SLO)$/help.obj \ - $(SLO)$/idlemgr.obj \ - $(SLO)$/settings.obj \ - $(SLO)$/sound.obj \ - $(SLO)$/stdtext.obj \ - $(SLO)$/svapp.obj \ - $(SLO)$/svdata.obj \ - $(SLO)$/svmain.obj \ - $(SLO)$/svmainhook.obj \ - $(SLO)$/timer.obj \ - $(SLO)$/dndhelp.obj \ - $(SLO)$/unohelp.obj \ - $(SLO)$/unohelp2.obj \ - $(SLO)$/vclevent.obj \ - $(SLO)$/i18nhelp.obj \ - $(SLO)$/salvtables.obj \ - $(SLO)$/session.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk - diff --git a/vcl/source/components/makefile.mk b/vcl/source/components/makefile.mk deleted file mode 100644 index 982687104c01..000000000000 --- a/vcl/source/components/makefile.mk +++ /dev/null @@ -1,52 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=vcl -TARGET=components -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/util$/makefile.pmk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/display.obj \ - $(SLO)$/dtranscomp.obj \ - $(SLO)$/fontident.obj \ - $(SLO)$/stringmirror.obj \ - $(SLO)$/factory.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk -.INCLUDE : $(PRJ)$/util$/target.pmk - diff --git a/vcl/source/control/makefile.mk b/vcl/source/control/makefile.mk deleted file mode 100644 index b1644e58ccd9..000000000000 --- a/vcl/source/control/makefile.mk +++ /dev/null @@ -1,80 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=vcl -TARGET=ctrl - -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -.IF "$(COM)"=="ICC" -CDEFS+=-D_STD_NO_NAMESPACE -D_VOS_NO_NAMESPACE -D_UNO_NO_NAMESPACE -.ENDIF - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/button.obj \ - $(SLO)$/ctrl.obj \ - $(SLO)$/combobox.obj \ - $(SLO)$/edit.obj \ - $(SLO)$/field.obj \ - $(SLO)$/field2.obj \ - $(SLO)$/fixbrd.obj \ - $(SLO)$/fixed.obj \ - $(SLO)$/group.obj \ - $(SLO)$/ilstbox.obj \ - $(SLO)$/imgctrl.obj \ - $(SLO)$/longcurr.obj \ - $(SLO)$/lstbox.obj \ - $(SLO)$/morebtn.obj \ - $(SLO)$/menubtn.obj \ - $(SLO)$/scrbar.obj \ - $(SLO)$/slider.obj \ - $(SLO)$/spinfld.obj \ - $(SLO)$/spinbtn.obj \ - $(SLO)$/tabctrl.obj \ - $(SLO)$/quickselectionengine.obj - -EXCEPTIONSFILES= \ - $(SLO)$/button.obj \ - $(SLO)$/ctrl.obj \ - $(SLO)$/edit.obj \ - $(SLO)$/field2.obj \ - $(SLO)$/ilstbox.obj \ - $(SLO)$/tabctrl.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/vcl/source/fontsubset/makefile.mk b/vcl/source/fontsubset/makefile.mk deleted file mode 100644 index 25dde00af521..000000000000 --- a/vcl/source/fontsubset/makefile.mk +++ /dev/null @@ -1,51 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=vcl -TARGET=fontsubset - -# --- Settings ----------------------------------------------------- -ENABLE_EXCEPTIONS=true - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -SLOFILES=\ - $(SLO)$/list.obj \ - $(SLO)$/sft.obj \ - $(SLO)$/cff.obj \ - $(SLO)$/fontsubset.obj \ - $(SLO)$/xlat.obj \ - $(SLO)$/ttcr.obj \ - $(SLO)$/gsub.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/vcl/source/gdi/makefile.mk b/vcl/source/gdi/makefile.mk deleted file mode 100755 index ac2e586a41cb..000000000000 --- a/vcl/source/gdi/makefile.mk +++ /dev/null @@ -1,122 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=vcl -TARGET=gdi - -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -.IF "$(COM)"=="ICC" -CDEFS+=-D_STD_NO_NAMESPACE -D_VOS_NO_NAMESPACE -D_UNO_NO_NAMESPACE -.ENDIF -.IF "$(ENABLE_GRAPHITE)" == "TRUE" -CDEFS+=-DENABLE_GRAPHITE -.ENDIF - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES= $(SLO)$/salmisc.obj \ - $(SLO)$/outdev.obj \ - $(SLO)$/outdev3.obj \ - $(SLO)$/outdevnative.obj \ - $(SLO)$/gfxlink.obj \ - $(SLO)$/print.obj \ - $(SLO)$/print2.obj \ - $(SLO)$/print3.obj \ - $(SLO)$/oldprintadaptor.obj \ - $(SLO)$/configsettings.obj \ - $(SLO)$/sallayout.obj \ - $(SLO)$/image.obj \ - $(SLO)$/impimage.obj \ - $(SLO)$/impgraph.obj \ - $(SLO)$/metric.obj \ - $(SLO)$/pdfwriter_impl.obj \ - $(SLO)$/pdfwriter_impl2.obj \ - $(SLO)$/pdffontcache.obj\ - $(SLO)$/bmpconv.obj \ - $(SLO)$/pdfextoutdevdata.obj \ - $(SLO)$/jobset.obj \ - $(SLO)$/impimagetree.obj \ - $(SLO)$/pngread.obj \ - $(SLO)$/pngwrite.obj \ - $(SLO)$/virdev.obj \ - $(SLO)$/gdimtf.obj \ - $(SLO)$/graphictools.obj \ - $(SLO)$/textlayout.obj \ - $(SLO)$/lineinfo.obj - -SLOFILES= $(EXCEPTIONSFILES) \ - $(SLO)$/animate.obj \ - $(SLO)$/impanmvw.obj \ - $(SLO)$/bitmap.obj \ - $(SLO)$/bitmap2.obj \ - $(SLO)$/bitmap3.obj \ - $(SLO)$/bitmap4.obj \ - $(SLO)$/alpha.obj \ - $(SLO)$/bitmapex.obj \ - $(SLO)$/bmpacc.obj \ - $(SLO)$/bmpacc2.obj \ - $(SLO)$/bmpacc3.obj \ - $(SLO)$/bmpfast.obj \ - $(SLO)$/cvtsvm.obj \ - $(SLO)$/cvtgrf.obj \ - $(SLO)$/font.obj \ - $(SLO)$/gradient.obj \ - $(SLO)$/hatch.obj \ - $(SLO)$/graph.obj \ - $(SLO)$/impbmp.obj \ - $(SLO)$/imagerepository.obj \ - $(SLO)$/impvect.obj \ - $(SLO)$/mapmod.obj \ - $(SLO)$/metaact.obj \ - $(SLO)$/octree.obj \ - $(SLO)$/outmap.obj \ - $(SLO)$/outdev2.obj \ - $(SLO)$/outdev4.obj \ - $(SLO)$/outdev5.obj \ - $(SLO)$/outdev6.obj \ - $(SLO)$/regband.obj \ - $(SLO)$/region.obj \ - $(SLO)$/wall.obj \ - $(SLO)$/base14.obj \ - $(SLO)$/pdfwriter.obj \ - $(SLO)$/salgdilayout.obj \ - $(SLO)$/extoutdevdata.obj \ - $(SLO)$/salnativewidgets-none.obj - - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/vcl/source/glyphs/makefile.mk b/vcl/source/glyphs/makefile.mk deleted file mode 100644 index 74811aba6204..000000000000 --- a/vcl/source/glyphs/makefile.mk +++ /dev/null @@ -1,80 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=vcl -TARGET=glyphs - -ENABLE_EXCEPTIONS=true -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/util$/makefile.pmk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -CFLAGS+= $(FREETYPE_CFLAGS) - -# --- Files -------------------------------------------------------- - -.IF "$(USE_BUILTIN_RASTERIZER)" != "" -# GlyphCache + FreeType support (only on UNX platforms currently) -SLOFILES=\ - $(SLO)$/glyphcache.obj \ - $(SLO)$/gcach_rbmp.obj \ - $(SLO)$/gcach_layout.obj \ - $(SLO)$/gcach_ftyp.obj - -.IF "$(ENABLE_GRAPHITE)" != "" -# Graphite support using the glyphcache infrastructure -CFLAGS+=-DENABLE_GRAPHITE -SLOFILES+= $(SLO)$/graphite_adaptors.obj \ - $(SLO)$/graphite_features.obj \ - $(SLO)$/graphite_cache.obj \ - $(SLO)$/graphite_textsrc.obj \ - $(SLO)$/graphite_serverfont.obj \ - $(SLO)$/graphite_layout.obj -.ENDIF - -.ELSE - -.IF "$(ENABLE_GRAPHITE)" == "TRUE" -# Graphite support on non-UNX platforms -# make use of stlport headerfiles -EXT_USE_STLPORT=TRUE -SLOFILES=\ - $(SLO)$/graphite_textsrc.obj \ - $(SLO)$/graphite_cache.obj \ - $(SLO)$/graphite_features.obj \ - $(SLO)$/graphite_layout.obj -.ENDIF -.ENDIF - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/vcl/source/helper/makefile.mk b/vcl/source/helper/makefile.mk deleted file mode 100644 index 1a417417dbe4..000000000000 --- a/vcl/source/helper/makefile.mk +++ /dev/null @@ -1,55 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -ENABLE_EXCEPTIONS=TRUE -PRJNAME=vcl -TARGET=helper -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES=\ - $(SLO)$/strhelper.obj \ - $(SLO)$/evntpost.obj \ - $(SLO)$/canvasbitmap.obj \ - $(SLO)$/canvastools.obj \ - $(SLO)$/xconnection.obj \ - $(SLO)$/threadex.obj \ - $(SLO)$/lazydelete.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/vcl/source/salmain/makefile.mk b/vcl/source/salmain/makefile.mk deleted file mode 100644 index de085b482c4d..000000000000 --- a/vcl/source/salmain/makefile.mk +++ /dev/null @@ -1,38 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ = ..$/.. -PRJNAME = vcl -TARGET = salmain -LIBTARGET = NO -ENABLE_EXCEPTIONS = TRUE - -.INCLUDE: settings.mk - -OBJFILES = $(OBJ)$/salmain.obj - -.INCLUDE: target.mk diff --git a/vcl/source/src/makefile.mk b/vcl/source/src/makefile.mk deleted file mode 100644 index 40b7d4e75dfe..000000000000 --- a/vcl/source/src/makefile.mk +++ /dev/null @@ -1,56 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=vcl -TARGET=svsrc -RESTARGET=vcl - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES= images.src \ - menu.src \ - stdtext.src \ - helptext.src \ - units.src \ - btntext.src \ - print.src - -RESLIB1NAME= $(RESTARGET) -RESLIB1IMAGES= $(PRJ)$/source/src -RESLIB1SRSFILES= $(SRS)$/svsrc.srs - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/vcl/source/window/makefile.mk b/vcl/source/window/makefile.mk deleted file mode 100644 index 1c63376dfda5..000000000000 --- a/vcl/source/window/makefile.mk +++ /dev/null @@ -1,106 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=vcl -TARGET=win -ENABLE_EXCEPTIONS=TRUE - -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/arrange.obj \ - $(SLO)$/abstdlg.obj \ - $(SLO)$/accel.obj \ - $(SLO)$/accmgr.obj \ - $(SLO)$/brdwin.obj \ - $(SLO)$/btndlg.obj \ - $(SLO)$/cmdevt.obj \ - $(SLO)$/cursor.obj \ - $(SLO)$/decoview.obj \ - $(SLO)$/dialog.obj \ - $(SLO)$/dlgctrl.obj \ - $(SLO)$/dndevdis.obj \ - $(SLO)$/dndlcon.obj \ - $(SLO)$/dockingarea.obj \ - $(SLO)$/dockmgr.obj \ - $(SLO)$/dockwin.obj \ - $(SLO)$/floatwin.obj \ - $(SLO)$/introwin.obj \ - $(SLO)$/keycod.obj \ - $(SLO)$/keyevent.obj \ - $(SLO)$/mouseevent.obj \ - $(SLO)$/menu.obj \ - $(SLO)$/mnemonic.obj \ - $(SLO)$/mnemonicengine.obj \ - $(SLO)$/msgbox.obj \ - $(SLO)$/popupmenuwindow.obj \ - $(SLO)$/scrwnd.obj \ - $(SLO)$/printdlg.obj \ - $(SLO)$/seleng.obj \ - $(SLO)$/split.obj \ - $(SLO)$/splitwin.obj \ - $(SLO)$/status.obj \ - $(SLO)$/syschild.obj \ - $(SLO)$/javachild.obj \ - $(SLO)$/syswin.obj \ - $(SLO)$/tabdlg.obj \ - $(SLO)$/tabpage.obj \ - $(SLO)$/taskpanelist.obj \ - $(SLO)$/toolbox.obj \ - $(SLO)$/toolbox2.obj \ - $(SLO)$/window.obj \ - $(SLO)$/winproc.obj \ - $(SLO)$/window2.obj \ - $(SLO)$/window3.obj \ - $(SLO)$/window4.obj \ - $(SLO)$/wpropset.obj \ - $(SLO)$/wrkwin.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk - -$(INCCOM)$/cuilib.hxx: makefile.mk -.IF "$(GUI)"=="UNX" - @$(RM) $@ - @echo \#define DLL_NAME \"libcui$(DLLPOSTFIX)$(DLLPOST)\" >$@ -.ELSE - @echo $(EMQ)#define DLL_NAME $(EMQ)"cui$(DLLPOSTFIX)$(DLLPOST)$(EMQ)" >$@ -.ENDIF - -$(SLO)$/abstdlg.obj : $(INCCOM)$/cuilib.hxx diff --git a/vcl/unx/generic/app/makefile.mk b/vcl/unx/generic/app/makefile.mk deleted file mode 100644 index bd7549945c7c..000000000000 --- a/vcl/unx/generic/app/makefile.mk +++ /dev/null @@ -1,110 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=salapp -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"!="unx" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"!="unx" - -SLOFILES=\ - $(SLO)$/i18n_cb.obj \ - $(SLO)$/i18n_ic.obj \ - $(SLO)$/i18n_im.obj \ - $(SLO)$/i18n_xkb.obj \ - $(SLO)$/i18n_wrp.obj \ - $(SLO)$/i18n_status.obj \ - $(SLO)$/i18n_keysym.obj \ - $(SLO)$/saldata.obj \ - $(SLO)$/saltimer.obj \ - $(SLO)$/saldisp.obj \ - $(SLO)$/randrwrapper.obj \ - $(SLO)$/salinst.obj \ - $(SLO)$/salsys.obj \ - $(SLO)$/soicon.obj \ - $(SLO)$/sm.obj \ - $(SLO)$/keysymnames.obj \ - $(SLO)$/wmadaptor.obj - -EXCEPTIONSFILES=\ - $(SLO)$/wmadaptor.obj \ - $(SLO)$/saldata.obj \ - $(SLO)$/salinst.obj \ - $(SLO)$/saldisp.obj \ - $(SLO)$/i18n_status.obj \ - $(SLO)$/i18n_cb.obj \ - $(SLO)$/i18n_ic.obj \ - $(SLO)$/salsys.obj - - -.IF "$(ENABLE_RANDR)" != "" -CDEFS+=-DUSE_RANDR -.IF "$(XRANDR_DLOPEN)" == "FALSE" -CDEFS+=$(XRANDR_CFLAGS) -.ELSE -CDEFS+=-DXRANDR_DLOPEN -.ENDIF -.ENDIF - -.IF "$(USE_XINERAMA)" != "NO" -CDEFS+=-DUSE_XINERAMA -.IF "$(USE_XINERAMA_VERSION)" == "Xorg" -CDEFS+=-DUSE_XINERAMA_XORG -.ELIF "$(USE_XINERAMA_VERSION)" == "Xsun" -CDEFS+=-DUSE_XINERAMA_XSUN -.ELSE -# provide sensible default -.IF "$(OS)" != "SOLARIS" -CDEFS+=-DUSE_XINERAMA_XORG -.ELSE -CDEFS+=-DUSE_XINERAMA_XSUN -.ENDIF -.ENDIF -.ENDIF - -.ENDIF # "$(GUIBASE)"!="unx" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk - diff --git a/vcl/unx/generic/desktopdetect/makefile.mk b/vcl/unx/generic/desktopdetect/makefile.mk deleted file mode 100644 index 83d5d29f4b71..000000000000 --- a/vcl/unx/generic/desktopdetect/makefile.mk +++ /dev/null @@ -1,57 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=dtdetect - -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"!="unx" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"!="unx" - -SLOFILES=$(SLO)$/desktopdetector.obj - -.ENDIF # "$(GUIBASE)"!="unx" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/vcl/unx/generic/dtrans/makefile.mk b/vcl/unx/generic/dtrans/makefile.mk deleted file mode 100644 index 6f5caccfd734..000000000000 --- a/vcl/unx/generic/dtrans/makefile.mk +++ /dev/null @@ -1,68 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=dtransX11 -TARGETTYPE=GUI - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# ------------------------------------------------------------------ - -.IF "$(GUIBASE)"=="aqua" - -dummy: - @echo "Nothing to build for Mac OS X" - -.ELSE # "$(GUIBASE)"=="aqua" - -.IF "$(COM)$(CPU)" == "C50I" || "$(COM)$(CPU)" == "C52I" -NOOPTFILES=\ - $(SLO)$/X11_selection.obj -.ENDIF - -SLOFILES=\ - $(SLO)$/X11_dndcontext.obj \ - $(SLO)$/X11_transferable.obj \ - $(SLO)$/X11_clipboard.obj \ - $(SLO)$/X11_selection.obj \ - $(SLO)$/X11_droptarget.obj \ - $(SLO)$/X11_service.obj \ - $(SLO)$/bmp.obj \ - $(SLO)$/config.obj - -.ENDIF # "$(OS)"=="MACOSX" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/vcl/unx/generic/fontmanager/makefile.mk b/vcl/unx/generic/fontmanager/makefile.mk deleted file mode 100644 index c6a23b88f35b..000000000000 --- a/vcl/unx/generic/fontmanager/makefile.mk +++ /dev/null @@ -1,72 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -ENABLE_EXCEPTIONS=TRUE -PRJNAME=vcl -TARGET=fontman - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -CFLAGS+= -I..$/fontsubset -INCDEPN+= -I..$/fontsubset - -.IF "$(ENABLE_FONTCONFIG)" != "" -CDEFS += -DENABLE_FONTCONFIG -.ENDIF - -CFLAGS+=$(FREETYPE_CFLAGS) - - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"=="aqua" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"=="aqua" - -SLOFILES=\ - $(SLO)$/fontmanager.obj \ - $(SLO)$/fontcache.obj \ - $(SLO)$/fontconfig.obj \ - $(SLO)$/helper.obj \ - $(SLO)$/parseAFM.obj - -.IF "$(OS)$(CPU)"=="SOLARISI" -NOOPTFILES=$(SLO)$/fontmanager.obj -.ENDIF - -.ENDIF - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/vcl/unx/generic/gdi/makefile.mk b/vcl/unx/generic/gdi/makefile.mk deleted file mode 100644 index 123fcbcf9131..000000000000 --- a/vcl/unx/generic/gdi/makefile.mk +++ /dev/null @@ -1,101 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=salgdi - -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"!="unx" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"!="unx" - -SLOFILES= \ - $(SLO)$/salgdi2.obj \ - $(SLO)$/salbmp.obj \ - $(SLO)$/salgdi.obj \ - $(SLO)$/salvd.obj \ - $(SLO)$/dtint.obj \ - $(SLO)$/salcvt.obj \ - $(SLO)$/salgdi3.obj \ - $(SLO)$/gcach_xpeer.obj \ - $(SLO)$/xrender_peer.obj \ - $(SLO)$/pspgraphics.obj - -EXCEPTIONSFILES=\ - $(SLO)$/salgdi.obj \ - $(SLO)$/salbmp.obj \ - $(SLO)$/salgdi3.obj \ - $(SLO)$/salcvt.obj - -SLOFILES+=$(SLO)$/salprnpsp.obj -EXCEPTIONSFILES+=$(SLO)$/salprnpsp.obj - -.IF "$(OS)"=="SOLARIS" -SLOFILES+=$(SLO)$/cdeint.obj -ENVCFLAGS+=-DUSE_CDE -.ENDIF - -.IF "$(XRENDER_LINK)" == "YES" -CFLAGS+=-DXRENDER_LINK -.ENDIF - -.IF "$(ENABLE_GRAPHITE)" == "TRUE" -CFLAGS+=-DENABLE_GRAPHITE -.ENDIF - -.ENDIF # "$(GUIBASE)"!="unx" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk - -ALLTAR : $(MACOSXRC) - -XSALSETLIBNAME=$(DLLPRE)spa$(DLLPOSTFIX)$(DLLPOST) - -$(INCCOM)$/rtsname.hxx: - @rm -f $(INCCOM)$/rtsname.hxx ; \ - echo "#define _XSALSET_LIBNAME "\"$(XSALSETLIBNAME)\" > $(INCCOM)$/rtsname.hxx - -$(SLO)$/salpimpl.obj : $(INCCOM)$/rtsname.hxx -$(SLO)$/salprnpsp.obj : $(INCCOM)$/rtsname.hxx - diff --git a/vcl/unx/generic/plugadapt/makefile.mk b/vcl/unx/generic/plugadapt/makefile.mk deleted file mode 100644 index af409c04af35..000000000000 --- a/vcl/unx/generic/plugadapt/makefile.mk +++ /dev/null @@ -1,59 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=salplug - -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"!="unx" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"!="unx" - -CFLAGS+=-DSAL_DLLPOSTFIX=\"$(DLLPOSTFIX)\" - -SLOFILES=$(SLO)$/salplug.obj - -.ENDIF # "$(GUIBASE)"!="unx" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/vcl/unx/generic/printer/makefile.mk b/vcl/unx/generic/printer/makefile.mk deleted file mode 100644 index 5cd35088acd9..000000000000 --- a/vcl/unx/generic/printer/makefile.mk +++ /dev/null @@ -1,70 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -ENABLE_EXCEPTIONS=TRUE -PRJNAME=vcl -TARGET=printer - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -.IF "$(ENABLE_CUPS)" != "" -CDEFS += -DENABLE_CUPS -.ENDIF - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"=="aqua" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"=="aqua" - -SLOFILES=\ - $(SLO)$/ppdparser.obj \ - $(SLO)$/printerinfomanager.obj \ - $(SLO)$/jobdata.obj \ - $(SLO)$/cupsmgr.obj - -.ENDIF # GUIBASE = aqua - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -XSALSETLIBNAME=$(DLLPRE)spa$(DLLPOSTFIX)$(DLLPOST) - -$(INCCOM)$/rtsname.hxx: - rm -f $(INCCOM)$/rtsname.hxx ; \ - echo "#define _XSALSET_LIBNAME "\"$(XSALSETLIBNAME)\" > $(INCCOM)$/rtsname.hxx - -$(SLO)$/cupsmgr.obj : $(INCCOM)$/rtsname.hxx - diff --git a/vcl/unx/generic/printergfx/makefile.mk b/vcl/unx/generic/printergfx/makefile.mk deleted file mode 100644 index cc5692e951f5..000000000000 --- a/vcl/unx/generic/printergfx/makefile.mk +++ /dev/null @@ -1,65 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=printergfx - -# --- Settings ----------------------------------------------------- - -ENABLE_EXCEPTIONS=true - -.INCLUDE : settings.mk - -.IF "$(ENABLE_CUPS)" != "" -CDEFS += -DENABLE_CUPS -.ENDIF - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"=="aqua" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"=="aqua" - -SLOFILES=\ - $(SLO)$/printerjob.obj \ - $(SLO)$/text_gfx.obj \ - $(SLO)$/psputil.obj \ - $(SLO)$/common_gfx.obj \ - $(SLO)$/glyphset.obj \ - $(SLO)$/bitmap_gfx.obj - -.ENDIF - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/vcl/unx/generic/window/makefile.mk b/vcl/unx/generic/window/makefile.mk deleted file mode 100644 index c5cd95ba6b1c..000000000000 --- a/vcl/unx/generic/window/makefile.mk +++ /dev/null @@ -1,59 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=salwin -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"!="unx" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"!="unx" - -SLOFILES= \ - $(SLO)/FWS.obj $(SLO)/salframe.obj $(SLO)/salobj.obj - -.ENDIF # "$(GUIBASE)"!="unx" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/vcl/unx/gtk/a11y/makefile.mk b/vcl/unx/gtk/a11y/makefile.mk deleted file mode 100644 index 14d3014ddf11..000000000000 --- a/vcl/unx/gtk/a11y/makefile.mk +++ /dev/null @@ -1,93 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=gtka11y -ENABLE_EXCEPTIONS=TRUE - -# workaround for makedepend hang -MKDEPENDSOLVER= -NO_DEFAULT_STL=YES - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"!="unx" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"!="unx" - -.IF "$(ENABLE_GTK)" != "" - -PKGCONFIG_MODULES=gtk+-2.0 -.INCLUDE : pkg_config.mk - -CFLAGS+=-DVERSION=$(EMQ)"$(UPD)$(LAST_MINOR)$(EMQ)" - -ATKVERSION:=$(shell @$(PKG_CONFIG) --modversion atk | $(AWK) -v num=true -f $(SOLARENV)$/bin$/getcompver.awk) - -.IF "$(ATKVERSION)" >= "000100070000" -CFLAGS+=-DHAS_ATKRECTANGLE -.ENDIF - -SLOFILES=\ - $(SLO)$/atkaction.obj \ - $(SLO)$/atkbridge.obj \ - $(SLO)$/atkcomponent.obj \ - $(SLO)$/atkeditabletext.obj \ - $(SLO)$/atkfactory.obj \ - $(SLO)$/atkhypertext.obj \ - $(SLO)$/atkimage.obj \ - $(SLO)$/atklistener.obj \ - $(SLO)$/atkregistry.obj \ - $(SLO)$/atkselection.obj \ - $(SLO)$/atktable.obj \ - $(SLO)$/atktext.obj \ - $(SLO)$/atktextattributes.obj \ - $(SLO)$/atkutil.obj \ - $(SLO)$/atkvalue.obj \ - $(SLO)$/atkwindow.obj \ - $(SLO)$/atkwrapper.obj - -.ELSE # "$(ENABLE_GTK)" != "" - -dummy: - @echo GTK disabled - nothing to build -.ENDIF -.ENDIF # "$(GUIBASE)"!="unx" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/vcl/unx/gtk/app/makefile.mk b/vcl/unx/gtk/app/makefile.mk deleted file mode 100644 index 3e8cd750bf7a..000000000000 --- a/vcl/unx/gtk/app/makefile.mk +++ /dev/null @@ -1,76 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=gtkapp -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# workaround for makedepend hang -MKDEPENDSOLVER= - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"!="unx" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"!="unx" - -.IF "$(ENABLE_GTK)" != "" - -PKGCONFIG_MODULES=gtk+-2.0 -.INCLUDE : pkg_config.mk - -SLOFILES=\ - $(SLO)$/gtkdata.obj \ - $(SLO)$/gtkinst.obj \ - $(SLO)$/gtksys.obj - -EXCEPTIONSFILES=\ - $(SLO)$/gtkdata.obj\ - $(SLO)$/gtkinst.obj - -.ELSE # "$(ENABLE_GTK)" != "" - -dummy: - @echo GTK disabled - nothing to build -.ENDIF -.ENDIF # "$(GUIBASE)"!="unx" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/vcl/unx/gtk/gdi/makefile.mk b/vcl/unx/gtk/gdi/makefile.mk deleted file mode 100644 index ec6b4e1d205e..000000000000 --- a/vcl/unx/gtk/gdi/makefile.mk +++ /dev/null @@ -1,67 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=gtkgdi -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"!="unx" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"!="unx" - -.IF "$(ENABLE_GTK)" != "" - -PKGCONFIG_MODULES=gtk+-2.0 -.INCLUDE : pkg_config.mk - -SLOFILES=$(SLO)$/salnativewidgets-gtk.obj -EXCEPTIONSFILES=$(SLO)$/salnativewidgets-gtk.obj - -.ELSE # "$(ENABLE_GTK)" != "" -dummy: - @echo GTK disabled - nothing to build -.ENDIF - -.ENDIF # "$(GUIBASE)"!="unx" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/vcl/unx/gtk/window/makefile.mk b/vcl/unx/gtk/window/makefile.mk deleted file mode 100644 index ac23e9363eef..000000000000 --- a/vcl/unx/gtk/window/makefile.mk +++ /dev/null @@ -1,79 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=gtkwin -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# workaround for makedepend hang -MKDEPENDSOLVER= - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"!="unx" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"!="unx" - -.IF "$(ENABLE_GTK)" != "" - -PKGCONFIG_MODULES=gtk+-2.0 -.IF "$(ENABLE_DBUS)" != "" -CDEFS+=-DENABLE_DBUS -PKGCONFIG_MODULES+= dbus-glib-1 -.ENDIF -.INCLUDE : pkg_config.mk - -.IF "$(COM)" == "C52" -NOOPTFILES=$(SLO)$/gtkframe.obj -.ENDIF - -SLOFILES=\ - $(SLO)$/gtkframe.obj \ - $(SLO)$/gtkobject.obj -EXCEPTIONSFILES=$(SLO)$/gtkframe.obj -.ELSE # "$(ENABLE_GTK)" != "" - -dummy: - @echo GTK disabled - nothing to build -.ENDIF -.ENDIF # "$(GUIBASE)"!="unx" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/vcl/unx/headless/makefile.mk b/vcl/unx/headless/makefile.mk deleted file mode 100644 index a32f02838080..000000000000 --- a/vcl/unx/headless/makefile.mk +++ /dev/null @@ -1,66 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - - -ENABLE_EXCEPTIONS=true - -PRJNAME=vcl -TARGET=svpplug - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -.IF "$(listening)"!="" || "$(LISTENING)"!="" -CDEFS+= -DWITH_SVP_LISTENING -.ENDIF - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)" == "unx" - -SLOFILES=\ - $(SLO)$/svpinst.obj\ - $(SLO)$/svpdummies.obj\ - $(SLO)$/svpframe.obj\ - $(SLO)$/svpgdi.obj\ - $(SLO)$/svptext.obj\ - $(SLO)$/svpprn.obj\ - $(SLO)$/svppspgraphics.obj\ - $(SLO)$/svpvd.obj\ - $(SLO)$/svpbmp.obj\ - $(SLO)$/svpelement.obj - -.ENDIF - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - - diff --git a/vcl/unx/kde/makefile.mk b/vcl/unx/kde/makefile.mk deleted file mode 100644 index e4e056ee6435..000000000000 --- a/vcl/unx/kde/makefile.mk +++ /dev/null @@ -1,81 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=vcl -TARGET=kdeplug -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# workaround for makedepend hang -MKDEPENDSOLVER= - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# For some of the included external KDE headers, GCC complains about shadowed -# symbols in instantiated template code only at the end of a compilation unit, -# so the only solution is to disable that warning here: -.IF "$(COM)" == "GCC" -CFLAGSCXX+=-Wno-shadow -.ENDIF - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"!="unx" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"!="unx" - -.IF "$(ENABLE_KDE)" != "" - -CFLAGS+=$(KDE_CFLAGS) - -.IF "$(ENABLE_RANDR)" != "" -CDEFS+=-DUSE_RANDR -.ENDIF - -SLOFILES=\ - $(SLO)$/kdedata.obj \ - $(SLO)$/salnativewidgets-kde.obj - -.ELSE # "$(ENABLE_KDE)" != "" - -dummy: - @echo KDE disabled - nothing to build -.ENDIF -.ENDIF # "$(GUIBASE)"!="unx" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/vcl/unx/kde4/makefile.mk b/vcl/unx/kde4/makefile.mk deleted file mode 100644 index fd1e9ca59236..000000000000 --- a/vcl/unx/kde4/makefile.mk +++ /dev/null @@ -1,88 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=vcl -TARGET=kde4plug -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# workaround for makedepend hang -MKDEPENDSOLVER= - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# For some of the included external KDE headers, GCC complains about shadowed -# symbols in instantiated template code only at the end of a compilation unit, -# so the only solution is to disable that warning here: -.IF "$(COM)" == "GCC" -CFLAGSCXX+=-Wno-shadow -.ENDIF - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"!="unx" - -dummy: - @echo "Nothing to build for GUIBASE $(GUIBASE)" - -.ELSE # "$(GUIBASE)"!="unx" - -.IF "$(ENABLE_KDE4)" != "" - -CFLAGS+=$(KDE4_CFLAGS) - -.IF "$(ENABLE_RANDR)" != "" -CDEFS+=-DUSE_RANDR -.ENDIF - -SLOFILES=\ - $(SLO)$/main.obj \ - $(SLO)$/VCLKDEApplication.obj \ - $(SLO)$/KDEXLib.obj \ - $(SLO)$/KDESalDisplay.obj \ - $(SLO)$/KDESalFrame.obj \ - $(SLO)$/KDESalGraphics.obj \ - $(SLO)$/KDESalInstance.obj \ - $(SLO)$/KDEData.obj - - -.ELSE # "$(ENABLE_KDE4)" != "" - -dummy: - @echo KDE disabled - nothing to build -.ENDIF -.ENDIF # "$(GUIBASE)"!="unx" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/vcl/util/hidother.src b/vcl/util/hidother.src deleted file mode 100644 index f966fcded1b3..000000000000 --- a/vcl/util/hidother.src +++ /dev/null @@ -1,31 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "vcl/svids.hrc" - -hidspecial HID_PRINTDLG { HelpID = HID_PRINTDLG; }; - diff --git a/vcl/util/linksvp/makefile.mk b/vcl/util/linksvp/makefile.mk deleted file mode 100644 index 99d1c4537111..000000000000 --- a/vcl/util/linksvp/makefile.mk +++ /dev/null @@ -1,65 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=vcl -TARGET=svp -TARGETTYPE=CUI - -# --- Settings ----------------------------------------------------------- - -.INCLUDE : settings.mk - -.IF "$(OS)" == "SOLARIS" -LINKFLAGSRUNPATH_OOO := -R/usr/sfw/lib $(LINKFLAGSRUNPATH_OOO) -.ENDIF - -.IF "$(GUIBASE)" == "unx" -# headless plugin -LIB1TARGET=$(SLB)$/isvpplug -LIB1FILES= $(SLB)$/svpplug.lib \ - $(SLB)$/printergfx.lib -SHL1TARGET=vclplug_svp$(DLLPOSTFIX) -SHL1IMPLIB=isvpplug -SHL1LIBS=$(LIB1TARGET) -SHL1DEPN=$(LB)$/libvcl$(DLLPOSTFIX)$(DLLPOST) -SHL1STDLIBS=\ - $(VCLLIB)\ - $(I18NPAPERLIB)\ - $(BASEBMPLIB)\ - $(BASEGFXLIB)\ - $(TOOLSLIB) \ - $(VOSLIB) \ - $(SALLIB) -.ENDIF # GUIBASE unx - - -# --- Allgemein ---------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/vcl/util/makefile.mk b/vcl/util/makefile.mk deleted file mode 100644 index bff6998fbb3b..000000000000 --- a/vcl/util/makefile.mk +++ /dev/null @@ -1,474 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. - -PRJNAME=vcl -TARGET=vcl -TARGETTYPE=GUI -USE_DEFFILE=TRUE -GEN_HID_OTHER=TRUE - -.IF "$(SNDFILE_LIBS)"!="" -SNDFILELIB=$(SNDFILE_LIBS) -.ENDIF - -# --- Settings ----------------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : makefile.pmk -.INCLUDE : makefile2.pmk - -.IF "$(OS)" == "SOLARIS" -.IF "$(CPUNAME)" == "SPARC" && "$(CPU)" == "U" -LINKFLAGSRUNPATH_OOO := -R/usr/sfw/lib/64 $(LINKFLAGSRUNPATH_OOO) -.ELSE -LINKFLAGSRUNPATH_OOO := -R/usr/sfw/lib $(LINKFLAGSRUNPATH_OOO) -.ENDIF -.ENDIF - -# --- Allgemein ---------------------------------------------------------- - -HXXDEPNLST= $(INC)$/vcl$/accel.hxx \ - $(INC)$/vcl$/animate.hxx \ - $(INC)$/vcl$/apptypes.hxx \ - $(INC)$/vcl$/bitmap.hxx \ - $(INC)$/vcl$/bitmapex.hxx \ - $(INC)$/vcl$/bmpacc.hxx \ - $(INC)$/vcl$/btndlg.hxx \ - $(INC)$/vcl$/button.hxx \ - $(INC)$/vcl$/ctrl.hxx \ - $(INC)$/vcl$/cursor.hxx \ - $(INC)$/vcl$/cmdevt.hxx \ - $(INC)$/vcl$/decoview.hxx \ - $(INC)$/vcl$/dialog.hxx \ - $(INC)$/vcl$/dllapi.h \ - $(INC)$/vcl$/dockwin.hxx \ - $(INC)$/vcl$/edit.hxx \ - $(INC)$/vcl$/event.hxx \ - $(INC)$/vcl$/field.hxx \ - $(INC)$/vcl$/fixed.hxx \ - $(INC)$/vcl$/floatwin.hxx \ - $(INC)$/vcl$/font.hxx \ - $(INC)$/vcl$/floatwin.hxx \ - $(INC)$/vcl$/graph.hxx \ - $(INC)$/vcl$/group.hxx \ - $(INC)$/vcl$/help.hxx \ - $(INC)$/vcl$/jobset.hxx \ - $(INC)$/vcl$/keycodes.hxx \ - $(INC)$/vcl$/keycod.hxx \ - $(INC)$/vcl$/image.hxx \ - $(INC)$/vcl$/lstbox.h \ - $(INC)$/vcl$/lstbox.hxx \ - $(INC)$/vcl$/mapmod.hxx \ - $(INC)$/vcl$/metaact.hxx \ - $(INC)$/vcl$/menu.hxx \ - $(INC)$/vcl$/menubtn.hxx \ - $(INC)$/vcl$/metric.hxx \ - $(INC)$/vcl$/morebtn.hxx \ - $(INC)$/vcl$/msgbox.hxx \ - $(INC)$/vcl$/octree.hxx \ - $(INC)$/vcl$/outdev.hxx \ - $(INC)$/vcl$/pointr.hxx \ - $(INC)$/vcl$/ptrstyle.hxx \ - $(INC)$/vcl$/prntypes.hxx \ - $(INC)$/vcl$/print.hxx \ - $(INC)$/vcl$/region.hxx \ - $(INC)$/vcl$/salbtype.hxx \ - $(INC)$/vcl$/scrbar.hxx \ - $(INC)$/vcl$/slider.hxx \ - $(INC)$/vcl$/seleng.hxx \ - $(INC)$/vcl$/settings.hxx \ - $(INC)$/vcl$/sound.hxx \ - $(INC)$/vcl$/sndstyle.hxx \ - $(INC)$/vcl$/split.hxx \ - $(INC)$/vcl$/splitwin.hxx \ - $(INC)$/vcl$/spin.hxx \ - $(INC)$/vcl$/spinfld.hxx \ - $(INC)$/vcl$/status.hxx \ - $(INC)$/vcl$/stdtext.hxx \ - $(INC)$/vcl$/sv.h \ - $(INC)$/vcl$/svapp.hxx \ - $(INC)$/vcl$/syschild.hxx \ - $(INC)$/vcl$/sysdata.hxx \ - $(INC)$/vcl$/syswin.hxx \ - $(INC)$/vcl$/tabctrl.hxx \ - $(INC)$/vcl$/tabdlg.hxx \ - $(INC)$/vcl$/tabpage.hxx \ - $(INC)$/vcl$/toolbox.hxx \ - $(INC)$/vcl$/timer.hxx \ - $(INC)$/vcl$/virdev.hxx \ - $(INC)$/vcl$/wall.hxx \ - $(INC)$/vcl$/waitobj.hxx \ - $(INC)$/vcl$/window.hxx \ - $(INC)$/vcl$/wrkwin.hxx - -.IF "$(linkinc)" != "" -SHL11FILE= $(MISC)$/app.slo -SHL12FILE= $(MISC)$/gdi.slo -SHL13FILE= $(MISC)$/win.slo -SHL14FILE= $(MISC)$/ctrl.slo -#SHL15FILE= $(MISC)$/ex.slo -SHL16FILE= $(MISC)$/salapp.slo -SHL17FILE= $(MISC)$/salwin.slo -SHL18FILE= $(MISC)$/salgdi.slo -.ENDIF - -LIB1TARGET= $(SLB)$/$(TARGET).lib -LIB1FILES= $(SLB)$/app.lib \ - $(SLB)$/gdi.lib \ - $(SLB)$/win.lib \ - $(SLB)$/ctrl.lib \ - $(SLB)$/helper.lib \ - $(SLB)$/fontsubset.lib \ - $(SLB)$/components.lib - -.IF "$(GUI)" == "UNX" && "$(GUIBASE)"!="aqua" -LIB1FILES+= $(SLB)$/salplug.lib \ - $(SLB)$/fontman.lib \ - $(SLB)$/printer.lib -.ELSE -LIB1FILES+= \ - $(SLB)$/salwin.lib \ - $(SLB)$/salgdi.lib \ - $(SLB)$/salapp.lib -.IF "$(GUIBASE)" == "aqua" -LIB1FILES+= $(SLB)$/dtransaqua.lib -.ENDIF -.ENDIF - -SHL1TARGET= vcl$(DLLPOSTFIX) -SHL1IMPLIB= ivcl -SHL1STDLIBS+=\ - $(SOTLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(I18NPAPERLIB) \ - $(I18NISOLANGLIB) \ - $(I18NUTILLIB) \ - $(COMPHELPERLIB) \ - $(UCBHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(VOSLIB) \ - $(SALLIB) \ - $(BASEGFXLIB) \ - $(ICUUCLIB) \ - $(ICUDATALIB) \ - $(ICULELIB) \ - $(JVMACCESSLIB) - -.IF "$(GUI)" == "UNX" -.IF "$(ENABLE_GRAPHITE)" != "" -.IF "$(SYSTEM_GRAPHITE)" == "YES" -SHL1STDLIBS+= $(GRAPHITE_LIBS) -.ELSE -SHL1STDLIBS+= $(SOLARVERSION)/$(INPATH)/lib$(UPDMINOREXT)/libgraphite.a -.ENDIF -.ENDIF -.ENDIF -SHL1USE_EXPORTS=name - -.IF "$(GUIBASE)"=="aqua" -SHL1STDLIBS+= \ - $(BASEBMPLIB) \ - -lAppleRemote$(DLLPOSTFIX) \ - -framework QuickTime - -LIB1FILES+= \ - $(SLB)$/sala11y.lib -.ENDIF - -.IF "$(USE_BUILTIN_RASTERIZER)"!="" - LIB1FILES += $(SLB)$/glyphs.lib - SHL1STDLIBS+= $(FREETYPELIB) -.ELSE -.IF "$(ENABLE_GRAPHITE)" == "TRUE" - LIB1FILES += $(SLB)$/glyphs.lib -.ENDIF -.ENDIF # USE_BUILTIN_RASTERIZER - -SHL1LIBS= $(LIB1TARGET) -.IF "$(GUI)"!="UNX" -.IF "$(COM)"!="GCC" -#SHL1OBJS= $(SLO)$/salshl.obj -.ENDIF -.ENDIF - -.IF "$(GUI)" != "UNX" -SHL1RES= $(RES)$/salsrc.res -.ENDIF - -SHL1DEF= $(MISC)$/$(SHL1TARGET).def - -DEF1NAME =$(SHL1TARGET) -DEF1DEPN = $(HXXDEPNLST) \ - $(LIB1TARGET) -DEF1DES =VCL -DEFLIB1NAME =vcl - -# --- W32 ---------------------------------------------------------------- - -.IF "$(GUI)" == "WNT" - -.IF "$(ENABLE_GRAPHITE)" == "TRUE" -.IF "$(COM)" == "GCC" -SHL1STDLIBS += -lgraphite -.ELSE -SHL1STDLIBS += graphite_dll.lib -.ENDIF -.ENDIF - -SHL1STDLIBS += $(UWINAPILIB) \ - $(GDI32LIB) \ - $(GDIPLUSLIB) \ - $(MSIMG32LIB) \ - $(WINSPOOLLIB) \ - $(OLE32LIB) \ - $(SHELL32LIB) \ - $(ADVAPI32LIB) - -SHL1STDLIBS += $(IMM32LIB) - -.IF "$(GUI)$(COM)$(CPU)" == "WNTMSCI" -LINKFLAGSSHL += /ENTRY:LibMain@12 -.ENDIF -.ENDIF - -# --- OS2 ---------------------------------------------------------------- - -.IF "$(GUI)" == "OS2" -STDSHL1 += ft2lib.lib -.ENDIF - -# --- UNX ---------------------------------------------------------------- - -# UNX sal plugins -.IF "$(GUI)" == "UNX" && "$(GUIBASE)" != "aqua" - -# desktop detector -LIB7TARGET=$(SLB)$/idet -LIB7FILES=$(SLB)$/dtdetect.lib -SHL7TARGET=desktop_detector$(DLLPOSTFIX) -SHL7STDLIBS=\ - $(SALLIB) \ - $(X11LINK_DYNAMIC) -SHL7IMPLIB=idet -SHL7LIBS=$(LIB7TARGET) - -# basic pure X11 plugin -LIB2TARGET=$(SLB)$/ipure_x -LIB2FILES= \ - $(SLB)$/dtransX11.lib \ - $(SLB)$/printergfx.lib \ - $(SLB)$/salwin.lib \ - $(SLB)$/salgdi.lib \ - $(SLB)$/salapp.lib -SHL2TARGET=vclplug_gen$(DLLPOSTFIX) -SHL2IMPLIB=ipure_x -SHL2LIBS=$(LIB2TARGET) -SHL2DEPN=$(SHL1IMPLIBN) $(SHL1TARGETN) - -# libs for generic plugin -SHL2STDLIBS=\ - $(VCLLIB)\ - $(I18NPAPERLIB) \ - $(I18NISOLANGLIB) \ - $(TOOLSLIB) \ - $(VOSLIB) \ - $(BASEGFXLIB) \ - $(UNOTOOLSLIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) - -# prepare linking of Xinerama -.IF "$(USE_XINERAMA)" != "NO" - -.IF "$(OS)"=="MACOSX" || "$(OS)$(CPU)" == "LINUXX" -XINERAMALIBS=-lXinerama -.ELSE -.IF "$(OS)" != "SOLARIS" || "$(USE_XINERAMA_VERSION)" == "Xorg" -.IF "$(XINERAMA_LINK)" == "dynamic" -XINERAMALIBS= -lXinerama -.ELSE -XINERAMALIBS= -Wl,-Bstatic -lXinerama -Wl,-Bdynamic -.ENDIF # XINERAMA_LINK == dynamic -.ENDIF # OS == SOLARIS -.ENDIF # OS == MACOSX - -SHL2STDLIBS += $(XINERAMALIBS) -.ENDIF # USE_XINERAMA != NO - -.IF "$(XRENDER_LINK)" == "YES" -SHL2STDLIBS+=`pkg-config --libs xrender` -.ENDIF - -.IF "$(GUIBASE)"=="unx" - -SHL2STDLIBS += -lXext -lSM -lICE -lX11 -.IF "$(OS)"!="MACOSX" && "$(OS)"!="FREEBSD" && "$(OS)"!="NETBSD" -# needed by salprnpsp.cxx -SHL2STDLIBS+= -ldl -.ENDIF - -.IF "$(ENABLE_RANDR)" != "" -.IF "$(XRANDR_DLOPEN)" == "FALSE" -SHL2STDLIBS+= $(XRANDR_LIBS) -.ENDIF -.ENDIF - -.ENDIF # "$(GUIBASE)"=="unx" - -# gtk plugin -.IF "$(ENABLE_GTK)" != "" -PKGCONFIG_MODULES=gtk+-2.0 gthread-2.0 -.IF "$(ENABLE_DBUS)" != "" -PKGCONFIG_MODULES+= dbus-glib-1 -.ENDIF -.INCLUDE: pkg_config.mk - -LIB4TARGET=$(SLB)$/igtk_plug_ -LIB4FILES=\ - $(SLB)$/gtkapp.lib\ - $(SLB)$/gtka11y.lib \ - $(SLB)$/gtkgdi.lib\ - $(SLB)$/gtkwin.lib - -SHL4TARGET=vclplug_gtk$(DLLPOSTFIX) -SHL4IMPLIB=igtk_plug_ -SHL4LIBS=$(LIB4TARGET) -SHL4DEPN=$(SHL1IMPLIBN) $(SHL1TARGETN) $(SHL2IMPLIBN) $(SHL2TARGETN) -# libs for gtk plugin -SHL4STDLIBS+=$(PKGCONFIG_LIBS:s/ -lpangoxft-1.0//) -# hack for faked SO environment -.IF "$(PKGCONFIG_ROOT)"!="" -SHL4SONAME+=-z nodefs -SHL4NOCHECK=TRUE -.ENDIF # "$(PKGCONFIG_ROOT)"!="" - - -SHL4STDLIBS+=-l$(SHL2TARGET) -SHL4STDLIBS+=\ - $(VCLLIB) \ - $(TOOLSLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(VOSLIB) \ - $(SALLIB) \ - $(X11LINK_DYNAMIC) - -.IF "$(ENABLE_RANDR)" != "" -.IF "$(XRANDR_DLOPEN)" == "FALSE" -SHL4STDLIBS+= $(XRANDR_LIBS) -.ENDIF -.ENDIF - -.ENDIF # "$(ENABLE_GTK)" != "" - -# KDE plugin -.IF "$(ENABLE_KDE)" != "" -.IF "$(KDE_ROOT)"!="" -EXTRALIBPATHS+=-L$(KDE_ROOT)$/lib -.IF "$(OS)$(CPU)" == "LINUXX" -EXTRALIBPATHS+=-L$(KDE_ROOT)$/lib64 -.ENDIF -.ENDIF -LIB5TARGET=$(SLB)$/ikde_plug_ -LIB5FILES=$(SLB)$/kdeplug.lib -SHL5TARGET=vclplug_kde$(DLLPOSTFIX) -SHL5IMPLIB=ikde_plug_ -SHL5LIBS=$(LIB5TARGET) -SHL5DEPN=$(SHL2TARGETN) -# libs for KDE plugin -SHL5LINKFLAGS+=$(KDE_LIBS) -SHL5STDLIBS+=-l$(SHL2TARGET) -SHL5STDLIBS+=\ - $(VCLLIB) \ - $(TOOLSLIB) \ - $(VOSLIB) \ - $(SALLIB) \ - $(X11LINK_DYNAMIC) - -.IF "$(ENABLE_RANDR)" != "" -.IF "$(XRANDR_DLOPEN)" == "FALSE" -SHL5STDLIBS+= $(XRANDR_LIBS) -.ENDIF -.ENDIF - -.ENDIF # "$(ENABLE_KDE)" != "" - -# KDE4 plugin -.IF "$(ENABLE_KDE4)" != "" -.IF "$(KDE4_ROOT)"!="" -EXTRALIBPATHS+=-L$(KDE4_ROOT)$/lib -.ENDIF -LIB6TARGET=$(SLB)$/ikde4_plug_ -LIB6FILES=$(SLB)$/kde4plug.lib -SHL6TARGET=vclplug_kde4$(DLLPOSTFIX) -SHL6IMPLIB=ikde4_plug_ -SHL6LIBS=$(LIB6TARGET) -SHL6DEPN=$(SHL2TARGETN) -# libs for KDE4 plugin -SHL6LINKFLAGS+=$(KDE4_LIBS) -SHL6STDLIBS+=-l$(SHL2TARGET) -SHL6STDLIBS+=\ - $(VCLLIB) \ - $(PSPLIB) \ - $(TOOLSLIB) \ - $(VOSLIB) \ - $(SALLIB) \ - $(X11LINK_DYNAMIC) - -.IF "$(ENABLE_RANDR)" != "" -.IF "$(XRANDR_DLOPEN)" == "FALSE" -SHL6STDLIBS+= $(XRANDR_LIBS) -.ENDIF -.ENDIF - -.ENDIF # "$(ENABLE_KDE4)" != "" - -.ENDIF # UNX - -# --- Allgemein ---------------------------------------------------------- - -.INCLUDE : target.mk - -ALLTAR : $(MISC)/vcl.component - -.IF "$(OS)" == "MACOSX" -my_platform = .macosx -.ELIF "$(OS)" == "WNT" -my_platform = .windows -.END - -$(MISC)/vcl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ - vcl.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt vcl$(my_platform).component diff --git a/vcl/util/makefile.pmk b/vcl/util/makefile.pmk deleted file mode 100644 index 884eb499b532..000000000000 --- a/vcl/util/makefile.pmk +++ /dev/null @@ -1,34 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(GUI)" == "UNX" && "$(GUIBASE)"!="aqua" -USE_BUILTIN_RASTERIZER=true -.ENDIF - -.IF "$(USE_BUILTIN_RASTERIZER)" != "" -ADDCDEFS += -DUSE_BUILTIN_RASTERIZER -.ENDIF diff --git a/vcl/util/makefile2.pmk b/vcl/util/makefile2.pmk deleted file mode 100644 index ac2977ca8eab..000000000000 --- a/vcl/util/makefile2.pmk +++ /dev/null @@ -1,41 +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. -# -#************************************************************************* - -# Reduction of exported symbols: -CDEFS += -DVCL_DLLIMPLEMENTATION -VISIBILITY_HIDDEN=TRUE - -.IF "$(GUIBASE)"=="aqua" -CFLAGSCXX+=$(OBJCXXFLAGS) -.ENDIF # "$(GUIBASE)"=="aqua" - -#building with stlport, but graphite was not built with stlport -.IF "$(USE_SYSTEM_STL)"!="YES" -.IF "$(SYSTEM_GRAPHITE)"=="YES" -CFLAGSCXX+=-DADAPT_EXT_STL -.ENDIF -.ENDIF diff --git a/vcl/util/target.pmk b/vcl/util/target.pmk deleted file mode 100644 index 8ec15475bc90..000000000000 --- a/vcl/util/target.pmk +++ /dev/null @@ -1,39 +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. -# -#************************************************************************* -ALLSLO: $(SLOFILES) - -SOSHL: $(SHL1TARGETN) - -WHOLEPRJ .SETDIR=$(PRJ)$/prj: - make debug linkinc prjpch compinc - @echo "READY" - -ONLYDLL .SETDIR=$(PRJ)$/util: $(SLOFILES) - $(RM) ..$/$(OUTPATH)$/bin$/sv$(DLLPOSTFIX).dll - dmake debug=t prjpch=t linkinc=t compinc=t ..$/$(OUTPATH)$/bin$/sv$(DLLPOSTFIX).dll - @echo "READY" - diff --git a/vcl/win/source/app/MAKEFILE.MK b/vcl/win/source/app/MAKEFILE.MK deleted file mode 100644 index 9b3237567eff..000000000000 --- a/vcl/win/source/app/MAKEFILE.MK +++ /dev/null @@ -1,53 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=salapp -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- #105371# -CFLAGS += -DWINVER=0x0400 - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/salshl.obj \ - $(SLO)$/saldata.obj \ - $(SLO)$/salinst.obj \ - $(SLO)$/saltimer.obj \ - $(SLO)$/salinfo.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/vcl/win/source/gdi/MAKEFILE.MK b/vcl/win/source/gdi/MAKEFILE.MK deleted file mode 100644 index 7489be633f2b..000000000000 --- a/vcl/win/source/gdi/MAKEFILE.MK +++ /dev/null @@ -1,69 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=salgdi - -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- #105371# -.IF "$(COM)"=="GCC" -.ELSE -CFLAGS += -DWINVER=0x0400 -.ENDIF - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/salgdi.obj \ - $(SLO)$/salgdi2.obj \ - $(SLO)$/salgdi3.obj \ - $(SLO)$/salgdi_gdiplus.obj \ - $(SLO)$/salvd.obj \ - $(SLO)$/salprn.obj \ - $(SLO)$/salbmp.obj \ - $(SLO)$/winlayout.obj \ - $(SLO)$/wntgdi.obj \ - $(SLO)$/salnativewidgets-luna.obj - - -EXCEPTIONSFILES= $(SLO)$/salprn.obj - -.IF "$(ENABLE_GRAPHITE)" == "TRUE" -CFLAGS+=-DENABLE_GRAPHITE -.ENDIF - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/vcl/win/source/src/MAKEFILE.MK b/vcl/win/source/src/MAKEFILE.MK deleted file mode 100644 index 7addba363481..000000000000 --- a/vcl/win/source/src/MAKEFILE.MK +++ /dev/null @@ -1,130 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=salsrc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- #105371# -CFLAGS += -DWINVER=0x0400 - -# --- Files -------------------------------------------------------- - -RCDEPN= nullptr.cur \ - help.cur \ - hsize.cur \ - vsize.cur \ - neswsize.cur \ - nwsesize.cur \ - cross.cur \ - move.cur \ - hsplit.cur \ - vsplit.cur \ - hsizebar.cur \ - vsizebar.cur \ - hand.cur \ - refhand.cur \ - pen.cur \ - magnify.cur \ - fill.cur \ - rotate.cur \ - hshear.cur \ - vshear.cur \ - mirror.cur \ - crook.cur \ - crop.cur \ - movept.cur \ - movebw.cur \ - movedata.cur \ - copydata.cur \ - linkdata.cur \ - movedlnk.cur \ - copydlnk.cur \ - movef.cur \ - copyf.cur \ - linkf.cur \ - moveflnk.cur \ - copyflnk.cur \ - movef2.cur \ - copyf2.cur \ - notallow.cur \ - dline.cur \ - drect.cur \ - dpolygon.cur \ - dbezier.cur \ - darc.cur \ - dpie.cur \ - dcirccut.cur \ - dellipse.cur \ - dfree.cur \ - dconnect.cur \ - dtext.cur \ - dcapt.cur \ - chart.cur \ - detectiv.cur \ - pivotcol.cur \ - pivotrow.cur \ - pivotfld.cur \ - pivotdel.cur \ - chain.cur \ - chainnot.cur \ - timemove.cur \ - timesize.cur \ - asn.cur \ - ass.cur \ - asw.cur \ - ase.cur \ - asnw.cur \ - asne.cur \ - assw.cur \ - asse.cur \ - asns.cur \ - aswe.cur \ - asnswe.cur \ - airbrush.cur \ - vtext.cur \ - tblsels.cur \ - tblsele.cur \ - tblselse.cur \ - tblselw.cur \ - tblselsw.cur \ - pntbrsh.cur \ - 50.bmp \ - sd.ico - -RCFILES= salsrc.rc - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/vcl/win/source/window/MAKEFILE.MK b/vcl/win/source/window/MAKEFILE.MK deleted file mode 100644 index cecfbcf5b2e5..000000000000 --- a/vcl/win/source/window/MAKEFILE.MK +++ /dev/null @@ -1,60 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - - -PRJ=..$/..$/.. - -PRJNAME=vcl -TARGET=salwin -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile2.pmk - -# --- #105371# -CDEFS +=-U_WIN32_WINNT -D_WIN32_WINNT=0x0501 - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/salframe.obj \ - $(SLO)$/salmenu.obj \ - $(SLO)$/salobj.obj - -.IF "$(COM)"=="GCC" -EXCEPTIONSFILES= $(SLO)$/salframe.obj -.ENDIF - -.IF "$(ENABLE_GRAPHITE)" == "TRUE" -CFLAGS+=-DENABLE_GRAPHITE -.ENDIF - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk -- cgit v1.2.3 From bee746960f3d94d92e71006a7365a26669f52f8c Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Tue, 1 Feb 2011 13:42:47 +0100 Subject: dba34d: limit invalidate calls --- reportdesign/source/ui/inc/ReportSection.hxx | 4 + reportdesign/source/ui/inc/ReportWindow.hxx | 9 +- reportdesign/source/ui/misc/ColorListener.cxx | 16 ++- reportdesign/source/ui/report/DesignView.cxx | 4 - reportdesign/source/ui/report/EndMarker.cxx | 5 +- reportdesign/source/ui/report/ReportSection.cxx | 161 ++++++++++++------------ reportdesign/source/ui/report/ReportWindow.cxx | 13 ++ reportdesign/source/ui/report/SectionView.cxx | 1 + reportdesign/source/ui/report/SectionWindow.cxx | 35 +++--- reportdesign/source/ui/report/StartMarker.cxx | 19 +-- reportdesign/source/ui/report/ViewsWindow.cxx | 23 ++-- reportdesign/source/ui/report/dlgedfunc.cxx | 6 +- 12 files changed, 163 insertions(+), 133 deletions(-) diff --git a/reportdesign/source/ui/inc/ReportSection.hxx b/reportdesign/source/ui/inc/ReportSection.hxx index a95fd72b7f40..00f3480f6964 100644 --- a/reportdesign/source/ui/inc/ReportSection.hxx +++ b/reportdesign/source/ui/inc/ReportSection.hxx @@ -59,6 +59,7 @@ namespace rptui ::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pMulti; ::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pReportListener; ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > m_xSection; + sal_Int32 m_nPaintEntranceCount; DlgEdMode m_eMode; BOOL m_bDialogModelChanged; @@ -67,6 +68,9 @@ namespace rptui /** fills the section with all control from the report section */ void fill(); + /** checks all objects if they fit in the new paper width. + */ + void impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_Int32 i_nLeftMargin,sal_Int32 i_nRightMargin); OReportSection(OReportSection&); void operator =(OReportSection&); diff --git a/reportdesign/source/ui/inc/ReportWindow.hxx b/reportdesign/source/ui/inc/ReportWindow.hxx index 4267bc0ef6e4..9e7f7c6a8f90 100644 --- a/reportdesign/source/ui/inc/ReportWindow.hxx +++ b/reportdesign/source/ui/inc/ReportWindow.hxx @@ -36,6 +36,7 @@ #include #include +#include #include #include "ViewsWindow.hxx" @@ -54,12 +55,16 @@ namespace rptui class DlgEdFunc; class DlgEdFactory; - class OReportWindow : public Window, public IMarkedSection + class OReportWindow : public Window + , public IMarkedSection + , public ::cppu::BaseMutex + , public ::comphelper::OPropertyChangeListener { Ruler m_aHRuler; ODesignView* m_pView; OScrollWindowHelper* m_pParent; OViewsWindow m_aViewsWindow; + ::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pReportListener; ::std::auto_ptr m_pObjFac; @@ -72,6 +77,8 @@ namespace rptui void operator =(OReportWindow&); protected: virtual void DataChanged( const DataChangedEvent& rDCEvt ); + // OPropertyChangeListener + virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& _rEvent) throw( ::com::sun::star::uno::RuntimeException); public: OReportWindow(OScrollWindowHelper* _pParent,ODesignView* _pView); virtual ~OReportWindow(); diff --git a/reportdesign/source/ui/misc/ColorListener.cxx b/reportdesign/source/ui/misc/ColorListener.cxx index 2a53a5937095..78d7b8dba0fb 100644 --- a/reportdesign/source/ui/misc/ColorListener.cxx +++ b/reportdesign/source/ui/misc/ColorListener.cxx @@ -82,15 +82,21 @@ void OColorListener::DataChanged( const DataChangedEvent& rDCEvt ) // ----------------------------------------------------------------------------- void OColorListener::setCollapsed(sal_Bool _bCollapsed) { - m_bCollapsed = _bCollapsed; - if ( m_aCollapsedLink.IsSet() ) - m_aCollapsedLink.Call(this); + if ( m_bCollapsed != _bCollapsed ) + { + m_bCollapsed = _bCollapsed; + if ( m_aCollapsedLink.IsSet() ) + m_aCollapsedLink.Call(this); + } } // ----------------------------------------------------------------------------- void OColorListener::setMarked(sal_Bool _bMark) { - m_bMarked = _bMark; - Invalidate(); + if ( m_bMarked != _bMark) + { + m_bMarked = _bMark; + Invalidate(INVALIDATE_NOCHILDREN|INVALIDATE_NOERASE); + } } // ======================================================================= } diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index 8f703ab57f4f..b3165684d72d 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -495,10 +495,6 @@ IMPL_LINK( ODesignView, SplitHdl, void*, ) { long nOldSplitPos = getController().getSplitPos(); getController().setSplitPos(nTest); - if ( nOldSplitPos != -1 && nOldSplitPos <= nTest ) - { - Invalidate(/*INVALIDATE_NOCHILDREN*/); - } } return 0L; diff --git a/reportdesign/source/ui/report/EndMarker.cxx b/reportdesign/source/ui/report/EndMarker.cxx index c32a07d5fc76..0528631f851b 100644 --- a/reportdesign/source/ui/report/EndMarker.cxx +++ b/reportdesign/source/ui/report/EndMarker.cxx @@ -46,7 +46,6 @@ OEndMarker::OEndMarker(Window* _pParent ,const ::rtl::OUString& _sColorEntry) DBG_CTOR( rpt_OEndMarker,NULL); SetUniqueId(HID_RPT_ENDMARKER); ImplInitSettings(); - SetPaintTransparent(TRUE); } // ----------------------------------------------------------------------------- OEndMarker::~OEndMarker() @@ -89,6 +88,10 @@ void OEndMarker::Paint( const Rectangle& /*rRect*/ ) // ----------------------------------------------------------------------- void OEndMarker::ImplInitSettings() { + EnableChildTransparentMode( TRUE ); + SetParentClipMode( PARENTCLIPMODE_NOCLIP ); + SetPaintTransparent( TRUE ); + SetBackground( Wallpaper( svtools::ColorConfig().GetColorValue(::svtools::APPBACKGROUND).nColor) ); SetFillColor( Application::GetSettings().GetStyleSettings().GetShadowColor() ); } diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index 6aa29551bcbf..ffc77bc3c115 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -95,14 +95,18 @@ OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< re ,m_pMulti(NULL) ,m_pReportListener(NULL) ,m_xSection(_xSection) +,m_nPaintEntranceCount(0) ,m_eMode(RPTUI_SELECT) ,m_bDialogModelChanged(FALSE) ,m_bInDrag(sal_False) { DBG_CTOR( rpt_OReportSection,NULL); - EnableChildTransparentMode(); + //EnableChildTransparentMode(); SetHelpId(HID_REPORTSECTION); SetMapMode( MapMode( MAP_100TH_MM ) ); + SetParentClipMode( PARENTCLIPMODE_CLIP ); + EnableChildTransparentMode( FALSE ); + SetPaintTransparent( FALSE ); try { @@ -142,8 +146,9 @@ void OReportSection::Paint( const Rectangle& rRect ) { Window::Paint(rRect); - if ( m_pView ) + if ( m_pView && m_nPaintEntranceCount == 0) { + ++m_nPaintEntranceCount; // repaint, get PageView and prepare Region SdrPageView* pPgView = m_pView->GetSdrPageView(); const Region aPaintRectRegion(rRect); @@ -158,10 +163,7 @@ void OReportSection::Paint( const Rectangle& rRect ) OSL_ENSURE(pTargetPaintWindow, "BeginDrawLayers: Got no SdrPaintWindow (!)"); // draw background self using wallpaper OutputDevice& rTargetOutDev = pTargetPaintWindow->GetTargetOutputDevice(); - sal_Int32 nColor = m_xSection->getBackColor(); - if ( nColor == (sal_Int32)COL_TRANSPARENT ) - nColor = getStyleProperty(m_xSection->getReportDefinition(),PROPERTY_BACKCOLOR); - rTargetOutDev.DrawWallpaper(rRect, Wallpaper(Color(nColor))); + rTargetOutDev.DrawWallpaper(rRect, Wallpaper(pPgView->GetApplicationDocumentColor())); } // do paint (unbuffered) and mark repaint end @@ -172,21 +174,13 @@ void OReportSection::Paint( const Rectangle& rRect ) } m_pView->CompleteRedraw(this,aPaintRectRegion); + --m_nPaintEntranceCount; } } //------------------------------------------------------------------------------ void OReportSection::Resize() { Window::Resize(); - if ( m_xSection.is() && m_pPage && m_pView ) - { - uno::Reference xReportDefinition = m_xSection->getReportDefinition(); - m_pPage->SetSize( Size( getStyleProperty(xReportDefinition,PROPERTY_PAPERSIZE).Width,5*m_xSection->getHeight()) ); - const Size aPageSize = m_pPage->GetSize(); - const sal_Int32 nLeftMargin = getStyleProperty(xReportDefinition,PROPERTY_LEFTMARGIN); - const sal_Int32 nRightMargin = getStyleProperty(xReportDefinition,PROPERTY_RIGHTMARGIN); - m_pView->SetWorkArea( Rectangle( Point( nLeftMargin, 0), Size(aPageSize.Width() - nLeftMargin - nRightMargin,aPageSize.Height()) ) ); - } } //------------------------------------------------------------------------------ void OReportSection::fill() @@ -235,8 +229,9 @@ void OReportSection::fill() nColor = getStyleProperty(m_xSection->getReportDefinition(),PROPERTY_BACKCOLOR); m_pView->SetApplicationDocumentColor(nColor); - const sal_Int32 nLeftMargin = getStyleProperty(m_xSection->getReportDefinition(),PROPERTY_LEFTMARGIN); - const sal_Int32 nRightMargin = getStyleProperty(m_xSection->getReportDefinition(),PROPERTY_RIGHTMARGIN); + uno::Reference xReportDefinition = m_xSection->getReportDefinition(); + const sal_Int32 nLeftMargin = getStyleProperty(xReportDefinition,PROPERTY_LEFTMARGIN); + const sal_Int32 nRightMargin = getStyleProperty(xReportDefinition,PROPERTY_RIGHTMARGIN); m_pPage->SetLftBorder(nLeftMargin); m_pPage->SetRgtBorder(nRightMargin); @@ -247,15 +242,9 @@ void OReportSection::fill() m_pView->StartListening( *m_pModel ); /*Resize();*/ - if ( m_xSection.is() && m_pPage && m_pView ) - { - uno::Reference xReportDefinition = m_xSection->getReportDefinition(); - m_pPage->SetSize( Size( getStyleProperty(xReportDefinition,PROPERTY_PAPERSIZE).Width,5*m_xSection->getHeight()) ); - const Size aPageSize = m_pPage->GetSize(); - const sal_Int32 nWorkAreaLeftMargin = getStyleProperty(xReportDefinition,PROPERTY_LEFTMARGIN); - const sal_Int32 nWorkAreaRightMargin = getStyleProperty(xReportDefinition,PROPERTY_RIGHTMARGIN); - m_pView->SetWorkArea( Rectangle( Point( nWorkAreaLeftMargin, 0), Size(aPageSize.Width() - nWorkAreaLeftMargin - nWorkAreaRightMargin,aPageSize.Height()) ) ); - } // if ( m_xSection.is() && m_pPage && m_pView ) + m_pPage->SetSize( Size( getStyleProperty(xReportDefinition,PROPERTY_PAPERSIZE).Width,5*m_xSection->getHeight()) ); + const Size aPageSize = m_pPage->GetSize(); + m_pView->SetWorkArea( Rectangle( Point( nLeftMargin, 0), Size(aPageSize.Width() - nLeftMargin - nRightMargin,aPageSize.Height()) ) ); //SetBackground( Wallpaper( COL_BLUE )); } @@ -556,67 +545,77 @@ void OReportSection::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) { m_pPage->SetRgtBorder(nRightMargin); } - - try + const Size aOldPageSize = m_pPage->GetSize(); + sal_Int32 nNewHeight = 5*m_xSection->getHeight(); + if ( aOldPageSize.Height() != nNewHeight || nPaperWidth != aOldPageSize.Width() ) + { + m_pPage->SetSize( Size( nPaperWidth,nNewHeight) ); + const Size aPageSize = m_pPage->GetSize(); + m_pView->SetWorkArea( Rectangle( Point( nLeftMargin, 0), Size(aPageSize.Width() - nLeftMargin - nRightMargin,aPageSize.Height()) ) ); + } + impl_adjustObjectSizePosition(nPaperWidth,nLeftMargin,nRightMargin); + m_pParent->Invalidate(INVALIDATE_UPDATE | INVALIDATE_TRANSPARENT); + } + } +} +void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_Int32 i_nLeftMargin,sal_Int32 i_nRightMargin) +{ + try + { + sal_Int32 nRightBorder = i_nPaperWidth - i_nRightMargin; + const sal_Int32 nCount = m_xSection->getCount(); + for (sal_Int32 i = 0; i < nCount; ++i) + { + bool bChanged = false; + uno::Reference< report::XReportComponent> xReportComponent(m_xSection->getByIndex(i),uno::UNO_QUERY_THROW); + awt::Point aPos = xReportComponent->getPosition(); + awt::Size aSize = xReportComponent->getSize(); + SvxShape* pShape = SvxShape::getImplementation( xReportComponent ); + SdrObject* pObject = pShape ? pShape->GetSdrObject() : NULL; + if ( pObject ) { - sal_Int32 nRightBorder = nPaperWidth - nRightMargin; - const sal_Int32 nCount = m_xSection->getCount(); - for (sal_Int32 i = 0; i < nCount; ++i) + OObjectBase* pBase = dynamic_cast(pObject); + pBase->EndListening(sal_False); + if ( aPos.X < i_nLeftMargin ) + { + aPos.X = i_nLeftMargin; + bChanged = true; + } + if ( (aPos.X + aSize.Width) > nRightBorder ) { - bool bChanged = false; - uno::Reference< report::XReportComponent> xReportComponent(m_xSection->getByIndex(i),uno::UNO_QUERY_THROW); - awt::Point aPos = xReportComponent->getPosition(); - awt::Size aSize = xReportComponent->getSize(); - SvxShape* pShape = SvxShape::getImplementation( xReportComponent ); - SdrObject* pObject = pShape ? pShape->GetSdrObject() : NULL; - if ( pObject ) + aPos.X = nRightBorder - aSize.Width; + if ( aPos.X < i_nLeftMargin ) { - OObjectBase* pBase = dynamic_cast(pObject); - pBase->EndListening(sal_False); - if ( aPos.X < nLeftMargin ) - { - aPos.X = nLeftMargin; - bChanged = true; - } - if ( (aPos.X + aSize.Width) > nRightBorder ) - { - aPos.X = nRightBorder - aSize.Width; - if ( aPos.X < nLeftMargin ) - { - aSize.Width += aPos.X - nLeftMargin; - aPos.X = nLeftMargin; - // add listener around - pBase->StartListening(); - xReportComponent->setSize(aSize); - pBase->EndListening(sal_False); - } - bChanged = true; - } - if ( aPos.Y < 0 ) - aPos.Y = 0; - if ( bChanged ) - { - xReportComponent->setPosition(aPos); - correctOverlapping(pObject,*this,false); - Rectangle aRet(VCLPoint(xReportComponent->getPosition()),VCLSize(xReportComponent->getSize())); - aRet.setHeight(aRet.getHeight() + 1); - aRet.setWidth(aRet.getWidth() + 1); - if ( m_xSection.is() && (static_cast(aRet.getHeight() + aRet.Top()) > m_xSection->getHeight()) ) - m_xSection->setHeight(aRet.getHeight() + aRet.Top()); - - pObject->RecalcBoundRect(); - } + aSize.Width += aPos.X - i_nLeftMargin; + aPos.X = i_nLeftMargin; + // add listener around pBase->StartListening(); + xReportComponent->setSize(aSize); + pBase->EndListening(sal_False); } - } // for (sal_Int32 i = 0; i < nCount; ++i) - } - catch(uno::Exception) - { - OSL_ENSURE(0,"Exception caught: OReportSection::_propertyChanged("); + bChanged = true; + } + if ( aPos.Y < 0 ) + aPos.Y = 0; + if ( bChanged ) + { + xReportComponent->setPosition(aPos); + correctOverlapping(pObject,*this,false); + Rectangle aRet(VCLPoint(xReportComponent->getPosition()),VCLSize(xReportComponent->getSize())); + aRet.setHeight(aRet.getHeight() + 1); + aRet.setWidth(aRet.getWidth() + 1); + if ( m_xSection.is() && (static_cast(aRet.getHeight() + aRet.Top()) > m_xSection->getHeight()) ) + m_xSection->setHeight(aRet.getHeight() + aRet.Top()); + + pObject->RecalcBoundRect(); + } + pBase->StartListening(); } - - Resize(); - } + } // for (sal_Int32 i = 0; i < nCount; ++i) + } + catch(uno::Exception) + { + OSL_ENSURE(0,"Exception caught: OReportSection::_propertyChanged("); } } //------------------------------------------------------------------------------ diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx index 3a2f4559b43a..b59c30faac5c 100644 --- a/reportdesign/source/ui/report/ReportWindow.cxx +++ b/reportdesign/source/ui/report/ReportWindow.cxx @@ -31,6 +31,7 @@ #include "ViewsWindow.hxx" #include "ReportRuler.hxx" #include "DesignView.hxx" +#include "UITools.hxx" #include #include @@ -65,6 +66,7 @@ DBG_NAME( rpt_OReportWindow ) //------------------------------------------------------------------------------ OReportWindow::OReportWindow(OScrollWindowHelper* _pParent,ODesignView* _pView) : Window(_pParent,WB_DIALOGCONTROL) +, ::comphelper::OPropertyChangeListener(m_aMutex) ,m_aHRuler(this) ,m_pView(_pView) ,m_pParent(_pParent) @@ -88,11 +90,14 @@ OReportWindow::OReportWindow(OScrollWindowHelper* _pParent,ODesignView* _pView) m_aHRuler.SetUnit(MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH); ImplInitSettings(); + m_pReportListener = addStyleListener(_pView->getController().getReportDefinition(),this); } //------------------------------------------------------------------------------ OReportWindow::~OReportWindow() { DBG_DTOR( rpt_OReportWindow,NULL); + if ( m_pReportListener.is() ) + m_pReportListener->dispose(); } // ----------------------------------------------------------------------------- void OReportWindow::initialize() @@ -438,6 +443,14 @@ sal_uInt16 OReportWindow::getZoomFactor(SvxZoomType _eType) const return nZoom; } +// ----------------------------------------------------------------------------- +void OReportWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) throw( uno::RuntimeException) +{ + Resize(); + m_aViewsWindow.Resize(); + static sal_Int32 nIn = INVALIDATE_TRANSPARENT; + Invalidate(nIn); +} //================================================================== } //rptui //================================================================== diff --git a/reportdesign/source/ui/report/SectionView.cxx b/reportdesign/source/ui/report/SectionView.cxx index e0d836a3d8c5..fc0cb8b8c310 100644 --- a/reportdesign/source/ui/report/SectionView.cxx +++ b/reportdesign/source/ui/report/SectionView.cxx @@ -52,6 +52,7 @@ OSectionView::OSectionView( SdrModel* pModel, OReportSection* _pSectionWindow, O ,m_pSectionWindow(_pSectionWindow) { DBG_CTOR( rpt_OSectionView,NULL); + // SetPagePaintingAllowed(false); SetBufferedOutputAllowed(true); SetBufferedOverlayAllowed(true); SetPageBorderVisible(false); diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index 26ce8c13c2a6..5cf8994cb1d2 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -109,7 +109,6 @@ OSectionWindow::OSectionWindow( OViewsWindow* _pParent,const uno::Reference< rep } _propertyChanged(aEvent); - SetPaintTransparent(TRUE); } // ----------------------------------------------------------------------------- OSectionWindow::~OSectionWindow() @@ -135,18 +134,15 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) const uno::Reference< report::XSection> xCurrentSection = m_aReportSection.getSection(); if ( _rEvent.PropertyName.equals(PROPERTY_HEIGHT) ) { + static bool t4 = true; + if ( t4 ) m_pParent->getView()->SetUpdateMode(FALSE); - Resize(); + //Resize(); m_pParent->getView()->notifySizeChanged(); m_pParent->resize(*this); + if ( t4 ) m_pParent->getView()->SetUpdateMode(TRUE); - m_aStartMarker.Invalidate(INVALIDATE_NOERASE); - m_aEndMarker.Invalidate(INVALIDATE_NOERASE); - m_aReportSection.Invalidate(/*INVALIDATE_NOERASE*/); - getViewsWindow()->getView()->getReportView()->getController().resetZoomType(); - // Invalidate(INVALIDATE_NOCHILDREN | INVALIDATE_TRANSPARENT); - // m_pParent->Invalidate(INVALIDATE_NOCHILDREN|INVALIDATE_NOERASE|INVALIDATE_TRANSPARENT); - // m_pParent->Invalidate(/*INVALIDATE_NOCHILDREN | INVALIDATE_NOERASE |*/ INVALIDATE_NOCHILDREN | INVALIDATE_TRANSPARENT); + // getViewsWindow()->getView()->getReportView()->getController().resetZoomType(); } else if ( _rEvent.PropertyName.equals(PROPERTY_NAME) && !xSection->getGroup().is() ) { @@ -155,7 +151,9 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) || setReportSectionTitle(xReport,RID_STR_REPORT_FOOTER,::std::mem_fun(&OReportHelper::getReportFooter),::std::mem_fun(&OReportHelper::getReportFooterOn)) || setReportSectionTitle(xReport,RID_STR_PAGE_HEADER,::std::mem_fun(&OReportHelper::getPageHeader),::std::mem_fun(&OReportHelper::getPageHeaderOn)) || setReportSectionTitle(xReport,RID_STR_PAGE_FOOTER,::std::mem_fun(&OReportHelper::getPageFooter),::std::mem_fun(&OReportHelper::getPageFooterOn)) ) + { m_aStartMarker.Invalidate(INVALIDATE_NOERASE); + } else { String sTitle = String(ModuleRes(RID_STR_DETAIL)); @@ -167,10 +165,9 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) else if ( _rEvent.PropertyName.equals(PROPERTY_EXPRESSION) ) { uno::Reference< report::XGroup > xGroup(_rEvent.Source,uno::UNO_QUERY); - if ( xGroup.is() ) + if ( xGroup.is() && !setGroupSectionTitle(xGroup,RID_STR_HEADER,::std::mem_fun(&OGroupHelper::getHeader),::std::mem_fun(&OGroupHelper::getHeaderOn))) { - if ( !setGroupSectionTitle(xGroup,RID_STR_HEADER,::std::mem_fun(&OGroupHelper::getHeader),::std::mem_fun(&OGroupHelper::getHeaderOn)) ) - setGroupSectionTitle(xGroup,RID_STR_FOOTER,::std::mem_fun(&OGroupHelper::getFooter),::std::mem_fun(&OGroupHelper::getFooterOn)); + setGroupSectionTitle(xGroup,RID_STR_FOOTER,::std::mem_fun(&OGroupHelper::getFooter),::std::mem_fun(&OGroupHelper::getFooterOn)); } } } @@ -211,8 +208,14 @@ bool OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>& //------------------------------------------------------------------------------ void OSectionWindow::ImplInitSettings() { + static bool t = false; + if ( t ) + { + EnableChildTransparentMode( TRUE ); + SetParentClipMode( PARENTCLIPMODE_NOCLIP ); + SetPaintTransparent( TRUE ); + } SetBackground( ); - //SetBackground( Wallpaper( COL_RED )); } //----------------------------------------------------------------------------- void OSectionWindow::DataChanged( const DataChangedEvent& rDCEvt ) @@ -307,10 +310,6 @@ IMPL_LINK( OSectionWindow, Collapsed, OColorListener *, _pMarker ) m_aSplitter.Show(bShow); m_pParent->resize(*this); - Resize(); - // TRY - // m_pParent->Invalidate(INVALIDATE_TRANSPARENT | INVALIDATE_NOCHILDREN); - Invalidate(); } return 0L; } @@ -409,8 +408,6 @@ void OSectionWindow::scrollChildren(long _nX) lcl_setOrigin(m_aSplitter,_nX, 0); lcl_scroll(m_aSplitter,aDiff); - - Resize(); } //============================================================================== } // rptui diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx index c3fed866e534..91a9af79caf8 100644 --- a/reportdesign/source/ui/report/StartMarker.cxx +++ b/reportdesign/source/ui/report/StartMarker.cxx @@ -71,6 +71,7 @@ OStartMarker::OStartMarker(OSectionWindow* _pParent,const ::rtl::OUString& _sCol initDefaultNodeImages(); ImplInitSettings(); m_aText.SetHelpId(HID_RPT_START_TITLE); + m_aText.SetPaintTransparent(TRUE); m_aImage.SetHelpId(HID_RPT_START_IMAGE); m_aText.Show(); m_aImage.Show(); @@ -83,7 +84,9 @@ OStartMarker::OStartMarker(OSectionWindow* _pParent,const ::rtl::OUString& _sCol m_aVRuler.SetMargin2(); const MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum(); m_aVRuler.SetUnit(MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH); - SetPaintTransparent(TRUE); + EnableChildTransparentMode( TRUE ); + SetParentClipMode( PARENTCLIPMODE_NOCLIP ); + SetPaintTransparent( TRUE ); } // ----------------------------------------------------------------------------- OStartMarker::~OStartMarker() @@ -107,21 +110,22 @@ sal_Int32 OStartMarker::getMinHeight() const // ----------------------------------------------------------------------------- void OStartMarker::Paint( const Rectangle& rRect ) { - Window::Paint( rRect ); //SetUpdateMode(FALSE); Size aSize = GetOutputSizePixel(); long nSize = aSize.Width(); const long nCornerWidth = long(CORNER_SPACE * (double)GetMapMode().GetScaleX()); - if ( !isCollapsed() ) + if ( isCollapsed() ) + { + SetClipRegion(); + } + else { const long nVRulerWidth = m_aVRuler.GetSizePixel().Width(); nSize = aSize.Width() - nVRulerWidth/* - m_nCornerSize*/; - SetClipRegion(Region(PixelToLogic(Rectangle(Point(),Size( nSize,aSize.Height()))))); aSize.Width() += nCornerWidth; - } // if ( !isCollapsed() ) - else - SetClipRegion(); + SetClipRegion(Region(PixelToLogic(Rectangle(Point(),Size(nSize,aSize.Height()))))); + } const Point aGcc3WorkaroundTemporary; Rectangle aWholeRect(aGcc3WorkaroundTemporary,aSize); @@ -272,7 +276,6 @@ void OStartMarker::Notify(SfxBroadcaster & rBc, SfxHint const & rHint) == SFX_HINT_COLORS_CHANGED)) { setColor(); - //m_aText.Invalidate(); Invalidate(INVALIDATE_CHILDREN); } } diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index bcd50236aab3..130acfc88592 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -184,7 +184,6 @@ OViewsWindow::OViewsWindow( OReportWindow* _pReportWindow) ,m_bInUnmark(sal_False) { DBG_CTOR( rpt_OViewsWindow,NULL); - SetPaintTransparent(TRUE); SetUniqueId(UID_RPT_VIEWSWINDOW); SetMapMode( MapMode( MAP_100TH_MM ) ); m_aColorConfig.AddListener(this); @@ -244,8 +243,9 @@ void OViewsWindow::resize(const OSectionWindow& _rSectionWindow) if ( bSet ) { impl_resizeSectionWindow(*pSectionWindow.get(),aStartPoint,bSet); - pSectionWindow->Invalidate(INVALIDATE_NOERASE | INVALIDATE_NOCHILDREN | INVALIDATE_TRANSPARENT); - pSectionWindow->getStartMarker().Invalidate(INVALIDATE_NOERASE | INVALIDATE_NOCHILDREN | INVALIDATE_TRANSPARENT ); + static sal_Int32 nIn = INVALIDATE_UPDATE | INVALIDATE_TRANSPARENT; + pSectionWindow->getStartMarker().Invalidate( nIn ); // INVALIDATE_NOERASE |INVALIDATE_NOCHILDREN| INVALIDATE_TRANSPARENT + pSectionWindow->getEndMarker().Invalidate( nIn ); } } // for (;aIter != aEnd ; ++aIter,++nPos) Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH)); @@ -256,7 +256,6 @@ void OViewsWindow::resize(const OSectionWindow& _rSectionWindow) m_pParent->notifySizeChanged(); Rectangle aRect(PixelToLogic(Point(0,0)),aOut); - Invalidate(aRect,INVALIDATE_NOERASE | INVALIDATE_NOCHILDREN | INVALIDATE_TRANSPARENT); } //------------------------------------------------------------------------------ void OViewsWindow::Resize() @@ -294,7 +293,7 @@ void OViewsWindow::Paint( const Rectangle& rRect ) //------------------------------------------------------------------------------ void OViewsWindow::ImplInitSettings() { - // SetBackground( Wallpaper( COL_LIGHTBLUE )); + EnableChildTransparentMode( TRUE ); SetBackground( ); SetFillColor( Application::GetSettings().GetStyleSettings().GetDialogColor() ); SetTextFillColor( Application::GetSettings().GetStyleSettings().GetDialogColor() ); @@ -317,8 +316,6 @@ void OViewsWindow::addSection(const uno::Reference< report::XSection >& _xSectio ::boost::shared_ptr pSectionWindow( new OSectionWindow(this,_xSection,_sColorEntry) ); m_aSections.insert(getIteratorAtPos(_nPosition) , TSectionsMap::value_type(pSectionWindow)); m_pParent->setMarked(&pSectionWindow->getReportSection().getSectionView(),m_aSections.size() == 1); - - Resize(); } //---------------------------------------------------------------------------- void OViewsWindow::removeSection(USHORT _nPosition) @@ -566,8 +563,8 @@ void OViewsWindow::unmarkAllObjects(OSectionView* _pSectionView) // ----------------------------------------------------------------------- void OViewsWindow::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32) { - ImplInitSettings(); - Invalidate(); + ImplInitSettings(); + Invalidate(); } // ----------------------------------------------------------------------------- void OViewsWindow::MouseButtonDown( const MouseEvent& rMEvt ) @@ -946,7 +943,8 @@ void OViewsWindow::setGridSnap(BOOL bOn) for (; aIter != aEnd ; ++aIter) { (*aIter)->getReportSection().getSectionView().SetGridSnap(bOn); - (*aIter)->getReportSection().Invalidate(); + static sal_Int32 nIn = 0; + (*aIter)->getReportSection().Invalidate(nIn); } } // ----------------------------------------------------------------------------- @@ -1826,7 +1824,8 @@ void OViewsWindow::zoom(const Fraction& _aZoom) aOut = PixelToLogic(aOut); Rectangle aRect(PixelToLogic(Point(0,0)),aOut); - Invalidate(aRect,/*INVALIDATE_NOERASE | */INVALIDATE_NOCHILDREN /*| INVALIDATE_TRANSPARENT*/); + static sal_Int32 nIn = INVALIDATE_NOCHILDREN; + Invalidate(aRect,nIn); } //---------------------------------------------------------------------------- void OViewsWindow::scrollChildren(const Point& _aThumbPos) @@ -1843,8 +1842,6 @@ void OViewsWindow::scrollChildren(const Point& _aThumbPos) SetMapMode( aMapMode ); //OWindowPositionCorrector aCorrector(this,0,-( aOld.Y() + aPosY.Y())); Scroll(0, -( aOld.Y() + aPosY.Y()),SCROLL_CHILDREN); - Resize(); - Invalidate(INVALIDATE_NOCHILDREN|INVALIDATE_TRANSPARENT); } TSectionsMap::iterator aIter = m_aSections.begin(); diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx index 13badddbb079..3afb16b7ae0c 100644 --- a/reportdesign/source/ui/report/dlgedfunc.cxx +++ b/reportdesign/source/ui/report/dlgedfunc.cxx @@ -92,8 +92,12 @@ void DlgEdFunc::ForceScroll( const Point& rPos ) aStartWidth *= m_pParent->GetMapMode().GetScaleX(); aOut.Width() -= (long)aStartWidth; + aOut.Height() = m_pParent->GetOutputSizePixel().Height(); - Rectangle aOutRect( pScrollWindow->getThumbPos(), aOut ); + Point aPos = pScrollWindow->getThumbPos(); + aPos.X() *= 0.5; + aPos.Y() *= 0.5; + Rectangle aOutRect( aPos, aOut ); aOutRect = m_pParent->PixelToLogic( aOutRect ); //Rectangle aWorkArea = m_pParent->getView()->GetWorkArea(); Point aGcc3WorkaroundTemporary; -- cgit v1.2.3 From f7c840dba549a774ffb24c9d5910976c77f27452 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Tue, 1 Feb 2011 13:48:56 +0100 Subject: dba34d: #i116523# correct string --- dbaccess/source/ui/dlg/advancedsettings.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbaccess/source/ui/dlg/advancedsettings.src b/dbaccess/source/ui/dlg/advancedsettings.src index d36a0b777563..151c0faf21ed 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.src +++ b/dbaccess/source/ui/dlg/advancedsettings.src @@ -224,7 +224,7 @@ Size = MAP_APPFONT ( ADVANCED_PAGE_X - 12 , CHECKBOX_HEIGHT ) ; \ TabStop = TRUE ; \ HelpId = HID_DSADMIN_RESPECTRESULTSETTYPE; \ - Text [ en-US ] = "Ignore the result set type from the database driver"; \ + Text [ en-US ] = "Respect the result set type from the database driver"; \ }; -- cgit v1.2.3 From 9ba098098f9cdaa688988e169dc6791f3ac735e3 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Wed, 2 Feb 2011 08:47:25 +0100 Subject: dba34d: check eof --- connectivity/source/drivers/flat/ETable.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index c427675f15a0..f14f18f91342 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -159,7 +159,7 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) } ++nRowCount; } - while(nRowCount < nMaxRowsToScan && m_pFileStream->ReadByteStringLine(aFirstLine,nEncoding)); + while(nRowCount < nMaxRowsToScan && m_pFileStream->ReadByteStringLine(aFirstLine,nEncoding) && !m_pFileStream->IsEof()); for (xub_StrLen i = 0; i < nFieldCount; i++) { -- cgit v1.2.3 From d691fb3065d5ed29ac438a32d6cdfe4215f9e201 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Wed, 2 Feb 2011 09:43:05 +0100 Subject: dba34d: #i116214# set controldefault as string only --- dbaccess/source/ui/control/FieldDescControl.cxx | 30 +------------------------ 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index c5c2a084b64a..10ad1ef00a0a 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -1682,35 +1682,7 @@ void OFieldDescControl::SaveData( OFieldDescription* pFieldDescr ) } if ( sDefault.getLength() ) - { - sal_uInt32 nFormatKey; - try - { - if ( isTextFormat(pFieldDescr,nFormatKey) || pBoolDefault ) - { - pFieldDescr->SetControlDefault(makeAny(sDefault)); - } - else - { - try - { - double nValue = GetFormatter()->convertStringToNumber(nFormatKey,sDefault); - nValue = checkDoubleForDateFormat(nValue,nFormatKey,GetFormatter()); - pFieldDescr->SetControlDefault(makeAny(nValue)); - } - catch(const Exception&) - { - if ( sDefault.getLength() ) - pFieldDescr->SetControlDefault(makeAny(sDefault)); - else - pFieldDescr->SetControlDefault(Any()); - } - } - } - catch(const Exception&) - { - } - } // if ( sDefault.getLength() ) + pFieldDescr->SetControlDefault(makeAny(sDefault)); else pFieldDescr->SetControlDefault(Any()); -- cgit v1.2.3 From d6421660dd2ef25c0aaebe078d24919462f67d31 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Wed, 2 Feb 2011 11:15:51 +0100 Subject: dba34d: #i116022# allow to jump between empty space for controls --- reportdesign/source/ui/misc/UITools.cxx | 11 +++--- reportdesign/source/ui/report/ViewsWindow.cxx | 50 +++++++++++++++++++++++++-- 2 files changed, 53 insertions(+), 8 deletions(-) diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index 209017ed062e..288692a7d7de 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -885,14 +885,13 @@ SdrObject* isOver(const Rectangle& _rRect, SdrPage& _rPage, SdrView& _rView, boo OUnoObject* pObj = dynamic_cast(pObjIter); if (pObj != NULL) - { - - Rectangle aRect = _rRect.GetIntersection(pObjIter->GetLastBoundRect()); - if ( !aRect.IsEmpty() && (aRect.Left() != aRect.Right() && aRect.Top() != aRect.Bottom() ) ) - pOverlappedObj = pObjIter; + { + Rectangle aRect = _rRect.GetIntersection(pObjIter->GetLastBoundRect()); + if ( !aRect.IsEmpty() && (aRect.Left() != aRect.Right() && aRect.Top() != aRect.Bottom() ) ) + pOverlappedObj = pObjIter; + } } } - } return pOverlappedObj; } // ----------------------------------------------------------------------------- diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index 130acfc88592..164fb95f4d34 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -1652,6 +1652,7 @@ void OViewsWindow::handleKey(const KeyCode& _rCode) { // restrict movement to work area Rectangle rWorkArea = rView.GetWorkArea(); + rWorkArea.Right()++; if ( !rWorkArea.IsEmpty() ) { @@ -1682,8 +1683,53 @@ void OViewsWindow::handleKey(const KeyCode& _rCode) bCheck = dynamic_cast(pMark->GetMarkedSdrObj()) != NULL; } - if ( bCheck && isOver(aMarkRect,*rReportSection.getPage(),rView) ) - break; + + if ( bCheck ) + { + SdrObject* pOverlapped = isOver(aMarkRect,*rReportSection.getPage(),rView); + if ( pOverlapped ) + { + do + { + Rectangle aOver = pOverlapped->GetLastBoundRect(); + Point aPos; + if ( nCode == KEY_UP ) + { + aPos.X() = aMarkRect.Left(); + aPos.Y() = aOver.Top() - aMarkRect.getHeight(); + nY += (aPos.Y() - aMarkRect.Top()); + } + else if ( nCode == KEY_DOWN ) + { + aPos.X() = aMarkRect.Left(); + aPos.Y() = aOver.Bottom(); + nY += (aPos.Y() - aMarkRect.Top()); + } + else if ( nCode == KEY_LEFT ) + { + aPos.X() = aOver.Left() - aMarkRect.getWidth(); + aPos.Y() = aMarkRect.Top(); + nX += (aPos.X() - aMarkRect.Left()); + } + else if ( nCode == KEY_RIGHT ) + { + aPos.X() = aOver.Right(); + aPos.Y() = aMarkRect.Top(); + nX += (aPos.X() - aMarkRect.Left()); + } + + aMarkRect.SetPos(aPos); + if ( !rWorkArea.IsInside( aMarkRect ) ) + { + break; + } + pOverlapped = isOver(aMarkRect,*rReportSection.getPage(),rView); + } + while(pOverlapped != NULL); + if (pOverlapped != NULL) + break; + } + } } if ( nX != 0 || nY != 0 ) -- cgit v1.2.3 From ac4b181239597f70edfd49bf684c1e16256d71ab Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Thu, 3 Feb 2011 11:58:53 +0100 Subject: dba34d: #i102719# do not allow charts to have negative positions --- reportdesign/source/core/sdr/RptObject.cxx | 41 ++++++++++++++++------ .../source/ui/inspection/GeometryHandler.cxx | 8 +++-- reportdesign/source/ui/misc/UITools.cxx | 12 +++---- reportdesign/source/ui/report/ViewsWindow.cxx | 8 ++--- reportdesign/source/ui/report/dlgedfunc.cxx | 2 +- 5 files changed, 46 insertions(+), 25 deletions(-) diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx index 7d1cdbc6db30..272f0d6f4ecd 100644 --- a/reportdesign/source/core/sdr/RptObject.cxx +++ b/reportdesign/source/core/sdr/RptObject.cxx @@ -765,14 +765,7 @@ void OUnoObject::NbcMove( const Size& rSize ) } if (bPositionFixed) { - // OReportModel* pRptModel = static_cast(GetModel()); - // if ( pRptModel ) - // { - // if (! pRptModel->GetUndoEnv().IsLocked()) - // { - GetModel()->AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoMoveObject(*this, aUndoSize)); - // } - // } + GetModel()->AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoMoveObject(*this, aUndoSize)); } // set geometry properties SetPropsFromRect(GetLogicRect()); @@ -1040,14 +1033,40 @@ void OOle2Obj::NbcMove( const Size& rSize ) // stop listening OObjectBase::EndListening(sal_False); + bool bPositionFixed = false; + Size aUndoSize(0,0); + bool bUndoMode = false; if ( m_xReportComponent.is() ) { OReportModel* pRptModel = static_cast(GetModel()); + if (pRptModel->GetUndoEnv().IsUndoMode()) + { + // if we are locked from outside, then we must not handle wrong moves, we are in UNDO mode + bUndoMode = true; + } OXUndoEnvironment::OUndoEnvLock aLock(pRptModel->GetUndoEnv()); - m_xReportComponent->setPositionX(m_xReportComponent->getPositionX() + rSize.A()); - m_xReportComponent->setPositionY(m_xReportComponent->getPositionY() + rSize.B()); - } + // LLA: why there exists getPositionX and getPositionY and NOT getPosition() which return a Point? + int nNewX = m_xReportComponent->getPositionX() + rSize.A(); + // can this hinder us to set components outside the area? + // if (nNewX < 0) + // { + // nNewX = 0; + // } + m_xReportComponent->setPositionX(nNewX); + int nNewY = m_xReportComponent->getPositionY() + rSize.B(); + if (nNewY < 0 && !bUndoMode) + { + aUndoSize.B() = abs(nNewY); + bPositionFixed = true; + nNewY = 0; + } + m_xReportComponent->setPositionY(nNewY); + } + if (bPositionFixed) + { + GetModel()->AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoMoveObject(*this, aUndoSize)); + } // set geometry properties SetPropsFromRect(GetLogicRect()); diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index 084bd77f8d5b..af953a457edb 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -866,7 +866,10 @@ inspection::LineDescriptor SAL_CALL GeometryHandler::describePropertyLine(const uno::Reference< inspection::XNumericControl > xNumericControl(aOut.Control,uno::UNO_QUERY); xNumericControl->setDecimalDigits( 2 ); xNumericControl->setValueUnit( util::MeasureUnit::MM_100TH ); - xNumericControl->setMinValue(beans::Optional(sal_True,0.0)); + uno::Reference< drawing::XShapeDescriptor> xShapeDesc(m_xReportComponent,uno::UNO_QUERY); + bool bSetMin = !xShapeDesc.is() || xShapeDesc->getShapeType() != ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CustomShape")); + if ( bSetMin ) + xNumericControl->setMinValue(beans::Optional(sal_True,0.0)); if ( nDisplayUnit != -1 ) xNumericControl->setDisplayUnit( nDisplayUnit ); uno::Reference< report::XReportComponent> xComp(m_xReportComponent,uno::UNO_QUERY); @@ -884,7 +887,8 @@ inspection::LineDescriptor SAL_CALL GeometryHandler::describePropertyLine(const case PROPERTY_ID_POSITIONX: case PROPERTY_ID_POSITIONY: case PROPERTY_ID_WIDTH: - xNumericControl->setMinValue(beans::Optional(sal_True,0.0)); + if ( bSetMin ) + xNumericControl->setMinValue(beans::Optional(sal_True,0.0)); xNumericControl->setMaxValue(beans::Optional(sal_True,double(aSize.Width - nLeftMargin - nRightMargin))); if ( PROPERTY_ID_WIDTH == nId ) { diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index 288692a7d7de..fc553667341f 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -876,15 +876,14 @@ SdrObject* isOver(const Rectangle& _rRect, SdrPage& _rPage, SdrView& _rView, boo { if ( _pIgnore != pObjIter && (_bAllObjects || !_rView.IsObjMarked(pObjIter)) - && dynamic_cast(pObjIter) != NULL ) + && (dynamic_cast(pObjIter) != NULL || dynamic_cast(pObjIter) != NULL)) { if (_nIgnoreType == ISOVER_IGNORE_CUSTOMSHAPES && pObjIter->GetObjIdentifier() == OBJ_CUSTOMSHAPE) { continue; } - OUnoObject* pObj = dynamic_cast(pObjIter); - if (pObj != NULL) + if (dynamic_cast(pObjIter) != NULL || dynamic_cast(pObjIter) != NULL) { Rectangle aRect = _rRect.GetIntersection(pObjIter->GetLastBoundRect()); if ( !aRect.IsEmpty() && (aRect.Left() != aRect.Right() && aRect.Top() != aRect.Bottom() ) ) @@ -922,7 +921,7 @@ SdrObject* isOver(const Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _ } if ( (_bAllObjects || !_rView.IsObjMarked(pObjIter)) - && dynamic_cast(pObjIter) != NULL ) + && (dynamic_cast(pObjIter) != NULL || dynamic_cast(pObjIter) != NULL) ) { Rectangle aRect = _rRect.GetIntersection(pObjIter->GetLastBoundRect()); if ( !aRect.IsEmpty() && (aRect.Left() != aRect.Right() && aRect.Top() != aRect.Bottom() ) ) @@ -936,10 +935,9 @@ SdrObject* isOver(const Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _ SdrObject* isOver(SdrObject* _pObj,SdrPage& _rPage,SdrView& _rView,bool _bUnMarkedObjects) { SdrObject* pOverlappedObj = NULL; - OUnoObject* pUnoObj = dynamic_cast(_pObj); - if ( pUnoObj ) // this doesn't need to be done for shapes + if (dynamic_cast(_pObj) != NULL || dynamic_cast(_pObj) != NULL) // this doesn't need to be done for shapes { - Rectangle aRect = pUnoObj->GetCurrentBoundRect(); + Rectangle aRect = _pObj->GetCurrentBoundRect(); pOverlappedObj = isOver(aRect,_rPage,_rView,_bUnMarkedObjects,_pObj); } return pOverlappedObj; diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index 164fb95f4d34..d092d43d08fd 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -85,7 +85,7 @@ bool lcl_getNewRectSize(const Rectangle& _aObjRect,long& _nXMov, long& _nYMov,Sd aNewRect.Move(_nXMov,_nYMov); break; } - if ( dynamic_cast(_pObj) ) + if (dynamic_cast(_pObj) != NULL || dynamic_cast(_pObj) != NULL) { pOverlappedObj = isOver(aNewRect,*_pObj->GetPage(),*_pView,true,_pObj); if ( pOverlappedObj && _pObj != pOverlappedObj ) @@ -865,7 +865,7 @@ void OViewsWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAli TRectangleMap::iterator aInterSectRectIter = aSortRectangles.begin(); for (; aInterSectRectIter != aRectIter; ++aInterSectRectIter) { - if ( pView == aInterSectRectIter->second.second && dynamic_cast(aInterSectRectIter->second.first) ) + if ( pView == aInterSectRectIter->second.second && (dynamic_cast(aInterSectRectIter->second.first) || dynamic_cast(aInterSectRectIter->second.first))) { SdrObject* pPreviousObj = aInterSectRectIter->second.first; Rectangle aIntersectRect = aTest.GetIntersection(_bBoundRects ? pPreviousObj->GetCurrentBoundRect() : pPreviousObj->GetSnapRect()); @@ -1680,7 +1680,7 @@ void OViewsWindow::handleKey(const KeyCode& _rCode) for (sal_uInt32 i = 0; !bCheck && i < rMarkList.GetMarkCount();++i ) { SdrMark* pMark = rMarkList.GetMark(i); - bCheck = dynamic_cast(pMark->GetMarkedSdrObj()) != NULL; + bCheck = dynamic_cast(pMark->GetMarkedSdrObj()) != NULL|| dynamic_cast(pMark->GetMarkedSdrObj()); } @@ -1768,7 +1768,7 @@ void OViewsWindow::handleKey(const KeyCode& _rCode) for (sal_uInt32 i = 0; !bCheck && i < rMarkList.GetMarkCount();++i ) { SdrMark* pMark = rMarkList.GetMark(i); - bCheck = dynamic_cast(pMark->GetMarkedSdrObj()) != NULL; + bCheck = dynamic_cast(pMark->GetMarkedSdrObj()) != NULL || dynamic_cast(pMark->GetMarkedSdrObj()) != NULL; if ( bCheck ) aNewRect.Union(pMark->GetMarkedSdrObj()->GetLastBoundRect()); } diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx index 3afb16b7ae0c..efc19451725a 100644 --- a/reportdesign/source/ui/report/dlgedfunc.cxx +++ b/reportdesign/source/ui/report/dlgedfunc.cxx @@ -622,7 +622,7 @@ bool DlgEdFunc::isRectangleHit(const MouseEvent& rMEvt) while( (pObjIter = aIter.Next()) != NULL && !bIsSetPoint) { if ( m_rView.IsObjMarked(pObjIter) - && dynamic_cast(pObjIter) != NULL ) + && (dynamic_cast(pObjIter) != NULL || dynamic_cast(pObjIter) != NULL) ) { Rectangle aNewRect = pObjIter->GetLastBoundRect(); long nDx = rDragStat.IsHorFixed() ? 0 : rDragStat.GetDX(); -- cgit v1.2.3 From e239431ec10da5aab0a3c568bbc47ecd2d4b5b1d Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Thu, 3 Feb 2011 11:59:22 +0100 Subject: dba34d: remove unused code --- dbaccess/source/ui/browser/brwctrlr.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index fdb225d620c9..e8a1b84a5d1f 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -736,7 +736,7 @@ sal_Bool SbaXDataBrowserController::reloadForm( const Reference< XLoadable >& _r const Reference< XPropertySet > xFormSet(getRowSet(), UNO_QUERY); if (::comphelper::getBOOL(xFormSet->getPropertyValue(PROPERTY_ESCAPE_PROCESSING))) xFormSet->getPropertyValue(PROPERTY_SINGLESELECTQUERYCOMPOSER) >>= m_xParser; - +#if 0 { const Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY ); const Reference< XSingleSelectQueryAnalyzer > xAnalyzer( xRowSetProps->getPropertyValue( PROPERTY_SINGLESELECTQUERYCOMPOSER ), UNO_QUERY ); @@ -756,6 +756,7 @@ sal_Bool SbaXDataBrowserController::reloadForm( const Reference< XLoadable >& _r } } } +#endif Reference< XWarningsSupplier > xWarnings( _rxLoadable, UNO_QUERY ); if ( xWarnings.is() ) -- cgit v1.2.3 From 933795c27b41b3f8f66725a6d814d5fc608a8359 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Thu, 3 Feb 2011 13:07:12 +0100 Subject: dba34d: store max row scan --- dbaccess/source/ui/dlg/DbAdminImpl.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index cbcd504c5cac..2f770016c08f 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -205,6 +205,7 @@ ODbDataSourceAdministrationHelper::ODbDataSourceAdministrationHelper(const Refer m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_SOCKET, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LocalSocket" ) ) ) ); m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_NAMED_PIPE, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "NamedPipe" ) ) ) ); m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_RESPECTRESULTSETTYPE, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RespectDriverResultSetType" ) ) ) ); + m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_MAX_ROW_SCAN, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MaxRowScan" ) ) ) ); // special settings for adabas m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_SHUTSERVICE, ::rtl::OUString::createFromAscii("ShutdownDatabase"))); -- cgit v1.2.3 From 82fdb102997a241e11f7a03819803073fcc2f21f Mon Sep 17 00:00:00 2001 From: ka Date: Fri, 4 Feb 2011 14:49:25 +0100 Subject: ka102: SVG import implementation --- filter/prj/build.lst | 6 +- .../source/config/fragments/fcfg_drawgraphics.mk | 1 + .../config/fragments/fcfg_internalgraphics.mk | 1 + .../types/svg_Scalable_Vector_Graphics.xcu | 4 +- filter/source/flash/swfwriter1.cxx | 14 + filter/source/graphicfilter/eos2met/eos2met.cxx | 80 +- filter/source/graphicfilter/epict/epict.cxx | 24 +- filter/source/graphicfilter/eps/eps.cxx | 25 +- filter/source/svg/makefile.mk | 15 +- filter/source/svg/svgexport.cxx | 404 ++++- filter/source/svg/svgfilter.cxx | 31 +- filter/source/svg/svgfilter.hxx | 73 +- filter/source/svg/svgfontexport.cxx | 244 ++- filter/source/svg/svgfontexport.hxx | 26 +- filter/source/svg/svguno.cxx | 26 +- filter/source/svg/svgwriter.cxx | 1550 ++++++++++---------- filter/source/svg/svgwriter.hxx | 163 +- 17 files changed, 1633 insertions(+), 1054 deletions(-) diff --git a/filter/prj/build.lst b/filter/prj/build.lst index 5617d28856f7..c964e5fcf964 100644 --- a/filter/prj/build.lst +++ b/filter/prj/build.lst @@ -9,11 +9,11 @@ fl filter\source\msfilter\powerpoint nmake - all fl_powerpoint fl_inc NULL fl filter\source\pdf nmake - all fl_pdf fl_svg fl_inc NULL fl filter\source\svg nmake - all fl_svg fl_inc NULL fl filter\source\placeware nmake - all fl_placeware fl_inc NULL -fl filter\source\flash nmake - all fl_flash fl_pdf fl_inc NULL +fl filter\source\flash nmake - all fl_flash fl_pdf fl_inc NULL fl filter\source\filtertracer nmake - all fl_filtertracer fl_inc NULL fl filter\source\xsltfilter nmake - all fl_xsltfilter fl_inc NULL -fl filter\source\xsltvalidate nmake - all fl_xsltvalidate fl_xsltfilter fl_inc NULL -fl filter\source\xsltdialog nmake - all fl_xsltdialog fl_flash fl_inc NULL +fl filter\source\xsltvalidate nmake - all fl_xsltvalidate fl_xsltfilter fl_inc NULL +fl filter\source\xsltdialog nmake - all fl_xsltdialog fl_flash fl_inc NULL fl filter\source\docbook nmake - all fl_docbook fl_inc NULL fl filter\source\t602 nmake - all fl_t602 fl_inc NULL fl filter\source\graphicfilter\eos2met nmake - all g_vfeom fl_inc NULL diff --git a/filter/source/config/fragments/fcfg_drawgraphics.mk b/filter/source/config/fragments/fcfg_drawgraphics.mk index 7038e27e8ae4..948423a3e3ef 100644 --- a/filter/source/config/fragments/fcfg_drawgraphics.mk +++ b/filter/source/config/fragments/fcfg_drawgraphics.mk @@ -53,6 +53,7 @@ F4_DRAWGRAPHICS = \ RAS___Sun_Rasterfile \ SGF___StarOffice_Writer_SGF \ SGV___StarDraw_2_0 \ + SVG___Scalable_Vector_Graphics \ SVM___StarView_Metafile \ TGA___Truevision_TARGA \ TIF___Tag_Image_File \ diff --git a/filter/source/config/fragments/fcfg_internalgraphics.mk b/filter/source/config/fragments/fcfg_internalgraphics.mk index ae978f0ca06c..d1f628a6be4f 100644 --- a/filter/source/config/fragments/fcfg_internalgraphics.mk +++ b/filter/source/config/fragments/fcfg_internalgraphics.mk @@ -68,6 +68,7 @@ F4_INTERNALGRAPHICS = \ sgf_Import \ sgv_Import \ svg_Export \ + svg_Import \ svm_Export \ svm_Import \ tga_Import \ diff --git a/filter/source/config/fragments/types/svg_Scalable_Vector_Graphics.xcu b/filter/source/config/fragments/types/svg_Scalable_Vector_Graphics.xcu index 37643df4c7ec..2ed05926671d 100644 --- a/filter/source/config/fragments/types/svg_Scalable_Vector_Graphics.xcu +++ b/filter/source/config/fragments/types/svg_Scalable_Vector_Graphics.xcu @@ -1,10 +1,10 @@ - + com.sun.star.comp.draw.FormatDetector svg image/svg+xml false - + SVG - Scalable Vector Graphics SVG - Scalable Vector Graphics diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index cce0314436f8..7e8fbf997618 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #ifndef _ZLIB_H #ifdef SYSTEM_ZLIB @@ -1890,6 +1891,19 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; + case( META_RENDERGRAPHIC_ACTION ): + { + const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pAction; + const ::vcl::RenderGraphicRasterizer aRasterizer( pA->GetRenderGraphic() ); + const Point aPointPixel; + const Size aSizePixel( mpVDev->LogicToPixel( pA->GetSize() ) ); + const BitmapEx aBmpEx( aRasterizer.Rasterize( aSizePixel ) ); + + Impl_writeImage( aBmpEx, pA->GetPoint(), pA->GetSize(), + aPointPixel, aBmpEx.GetSizePixel(), clipRect, 1 == bMap ); + } + break; + case( META_MAPMODE_ACTION ): { // const MetaMapModeAction *pA = (const MetaMapModeAction*) pAction; diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx index 4fce357a91e8..79af3cfdb17f 100644 --- a/filter/source/graphicfilter/eos2met/eos2met.cxx +++ b/filter/source/graphicfilter/eos2met/eos2met.cxx @@ -44,8 +44,10 @@ #include #include #include +#include #include + // -----------------------------Feld-Typen------------------------------- #define BegDocumnMagic 0xA8A8 /* Begin Document */ @@ -164,6 +166,9 @@ private: ULONG nWrittenBitmaps; // Anzahl der bereits geschriebenen Bitmaps ULONG nActBitmapPercent; // Wieviel Prozent die naechste Bitmap schon geschrieben ist. + ::std::auto_ptr< VirtualDevice > apDummyVDev; + OutputDevice* pCompDev; + com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator; void MayCallback(); @@ -203,7 +208,7 @@ private: void METSetAndPushLineInfo( const LineInfo& rLineInfo ); void METPopLineInfo( const LineInfo& rLineInfo ); - void METBitBlt(Point aPt, Size aSize, const Bitmap & rBitmap); + void METBitBlt(Point aPt, Size aSize, const Size& rBmpSizePixel); void METBeginArea(BOOL bBoundaryLine); void METEndArea(); void METBeginPath(sal_uInt32 nPathId); @@ -242,7 +247,18 @@ private: public: - METWriter() {} + METWriter() : + pCompDev( NULL ) + { +#ifndef NO_GETAPPWINDOW + pCompDev = reinterpret_cast< OutputDevice* >( Application::GetAppWindow() ); +#endif + if( !pCompDev ) + { + apDummyVDev.reset( new VirtualDevice ); + pCompDev = apDummyVDev.get(); + } + } BOOL WriteMET( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem ); @@ -311,6 +327,7 @@ void METWriter::CountActionsAndBitmaps(const GDIMetaFile * pMTF) case META_BMPEX_ACTION: case META_BMPEXSCALE_ACTION: case META_BMPEXSCALEPART_ACTION: + case META_RENDERGRAPHIC_ACTION: nNumberOfBitmaps++; break; } @@ -334,7 +351,7 @@ void METWriter::WriteBigEndianLong(ULONG nLong) void METWriter::WritePoint(Point aPt) { - Point aNewPt = OutputDevice::LogicToLogic( aPt, aPictureMapMode, aTargetMapMode ); + Point aNewPt = pCompDev->LogicToLogic( aPt, aPictureMapMode, aTargetMapMode ); *pMET << (long) ( aNewPt.X() - aPictureRect.Left() ) << (long) ( aPictureRect.Bottom() - aNewPt.Y() ); @@ -783,6 +800,17 @@ void METWriter::WriteImageObjects(const GDIMetaFile * pMTF) } } break; + + case( META_RENDERGRAPHIC_ACTION ): + { + const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pMA; + const ::vcl::RenderGraphicRasterizer aRasterizer( pA->GetRenderGraphic() ); + const BitmapEx aBmpEx( aRasterizer.Rasterize( pCompDev->LogicToPixel( pA->GetSize() ) ) ); + + METSetMix( eGDIRasterOp ); + WriteImageObject( Graphic( aBmpEx ).GetBitmap() ); + } + break; } if (bStatus==FALSE) @@ -847,7 +875,7 @@ void METWriter::WriteDataDescriptor(const GDIMetaFile *) // GPS X left, X right // GPS Y bottom, Y top // GPS Z near, Z far - Size aUnitsPerDecimeter=OutputDevice::LogicToLogic(Size(10,10),MapMode(MAP_CM),aPictureMapMode); + Size aUnitsPerDecimeter=pCompDev->LogicToLogic(Size(10,10),MapMode(MAP_CM),aPictureMapMode); *pMET << (BYTE)0xf6 << (BYTE)0x28 << (BYTE)0x40 << (BYTE)0x00 << (BYTE)0x05 << (BYTE)0x01 << (sal_uInt32)(aUnitsPerDecimeter.Width()) @@ -1127,7 +1155,7 @@ void METWriter::WillWriteOrder(ULONG nNextOrderMaximumLength) -void METWriter::METBitBlt(Point aPt, Size aSize, const Bitmap & rBitmap) +void METWriter::METBitBlt(Point aPt, Size aSize, const Size& rBmpSizePixel) { WillWriteOrder(46); *pMET << (BYTE)0xd6 << (BYTE)44 << (USHORT)0 << (USHORT) 0x00cc; @@ -1136,13 +1164,13 @@ void METWriter::METBitBlt(Point aPt, Size aSize, const Bitmap & rBitmap) WritePoint(Point(aPt.X(),aPt.Y()+aSize.Height())); WritePoint(Point(aPt.X()+aSize.Width(),aPt.Y())); *pMET << (sal_uInt32)0 << (sal_uInt32)0 - << (sal_uInt32)(rBitmap.GetSizePixel().Width()) - << (sal_uInt32)(rBitmap.GetSizePixel().Height()); + << (sal_uInt32)(rBmpSizePixel.Width()) + << (sal_uInt32)(rBmpSizePixel.Height()); } void METWriter::METSetAndPushLineInfo( const LineInfo& rLineInfo ) { - INT32 nWidth = OutputDevice::LogicToLogic( Size( rLineInfo.GetWidth(),0 ), aPictureMapMode, aTargetMapMode ).Width(); + INT32 nWidth = pCompDev->LogicToLogic( Size( rLineInfo.GetWidth(),0 ), aPictureMapMode, aTargetMapMode ).Width(); WillWriteOrder( 8 ); // set stroke linewidth *pMET << (BYTE)0x15 @@ -1968,10 +1996,11 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF ) case META_BMP_ACTION: { - const MetaBmpAction* pA = (const MetaBmpAction*) pMA; + const MetaBmpAction* pA = (const MetaBmpAction*) pMA; + const Size aSizePixel( pA->GetBitmap().GetSizePixel() ); METSetMix(eGDIRasterOp); - METBitBlt( pA->GetPoint(), pA->GetBitmap().GetSizePixel(), pA->GetBitmap() ); + METBitBlt( pA->GetPoint(), pCompDev->PixelToLogic( aSizePixel, aPictureMapMode ), aSizePixel ); } break; @@ -1980,7 +2009,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF ) const MetaBmpScaleAction* pA = (const MetaBmpScaleAction*) pMA; METSetMix(eGDIRasterOp); - METBitBlt( pA->GetPoint(), pA->GetSize(), pA->GetBitmap() ); + METBitBlt( pA->GetPoint(), pA->GetSize(), pA->GetBitmap().GetSizePixel() ); } break; @@ -1991,27 +2020,27 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF ) aTmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); METSetMix( eGDIRasterOp ); - METBitBlt( pA->GetDestPoint(), pA->GetDestSize(), aTmp ); + METBitBlt( pA->GetDestPoint(), pA->GetDestSize(), pA->GetBitmap().GetSizePixel() ); } break; case META_BMPEX_ACTION: { const MetaBmpExAction* pA = (const MetaBmpExAction*) pMA; - Bitmap aTmp( Graphic( pA->GetBitmapEx() ).GetBitmap() ); + const Size aSizePixel( pA->GetBitmapEx().GetSizePixel() ); - METSetMix(eGDIRasterOp); - METBitBlt( pA->GetPoint(), aTmp.GetSizePixel(), aTmp ); + METSetMix( eGDIRasterOp ); + METBitBlt( pA->GetPoint(), pCompDev->PixelToLogic( aSizePixel, aPictureMapMode ), aSizePixel ); } break; case META_BMPEXSCALE_ACTION: { const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pMA; - Bitmap aTmp( Graphic( pA->GetBitmapEx() ).GetBitmap() ); + const Size aSizePixel( pA->GetBitmapEx().GetSizePixel() ); - METSetMix(eGDIRasterOp); - METBitBlt( pA->GetPoint(), pA->GetSize(), aTmp ); + METSetMix( eGDIRasterOp ); + METBitBlt( pA->GetPoint(), pA->GetSize(), aSizePixel ); } break; @@ -2021,8 +2050,8 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF ) Bitmap aTmp( Graphic( pA->GetBitmapEx() ).GetBitmap() ); aTmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); - METSetMix(eGDIRasterOp); - METBitBlt( pA->GetDestPoint(), pA->GetDestSize(), aTmp ); + METSetMix( eGDIRasterOp ); + METBitBlt( pA->GetDestPoint(), pA->GetDestSize(), aTmp.GetSizePixel() ); } break; @@ -2039,7 +2068,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF ) { const MetaBmpScaleAction* pBmpScaleAction = (const MetaBmpScaleAction*)pMetaAct; METSetMix(eGDIRasterOp); - METBitBlt( pA->GetPoint(), pA->GetSize(), pBmpScaleAction->GetBitmap() ); + METBitBlt( pA->GetPoint(), pA->GetSize(), pBmpScaleAction->GetBitmap().GetSizePixel() ); break; } } @@ -2329,6 +2358,15 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF ) WriteOrders( &aTmpMtf ); } break; + + case( META_RENDERGRAPHIC_ACTION ): + { + const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pMA; + + METSetMix( eGDIRasterOp ); + METBitBlt( pA->GetPoint(), pA->GetSize(), pCompDev->LogicToPixel( pA->GetSize(), pMTF->GetPrefMapMode() ) ); + } + break; } nWrittenActions++; diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx index 53bdfbdad6ff..12b5ba50d352 100644 --- a/filter/source/graphicfilter/epict/epict.cxx +++ b/filter/source/graphicfilter/epict/epict.cxx @@ -46,6 +46,7 @@ #include #include #include +#include #include @@ -226,6 +227,7 @@ void PictWriter::CountActionsAndBitmaps(const GDIMetaFile & rMTF) case META_BMPEX_ACTION: case META_BMPEXSCALE_ACTION: case META_BMPEXSCALEPART_ACTION: + case META_RENDERGRAPHIC_ACTION: nNumberOfBitmaps++; break; } @@ -1807,8 +1809,11 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) case META_BMP_ACTION: { - const MetaBmpAction* pA = (const MetaBmpAction*) pMA; - WriteOpcode_BitsRect( pA->GetPoint(),pA->GetBitmap().GetSizePixel(), pA->GetBitmap() ); + const MetaBmpAction* pA = (const MetaBmpAction*) pMA; + const Bitmap aBmp( pA->GetBitmap() ); + VirtualDevice aVirDev; + + WriteOpcode_BitsRect( pA->GetPoint(), aVirDev.PixelToLogic( aBmp.GetSizePixel(), aSrcMapMode ), aBmp ); } break; @@ -1833,8 +1838,9 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) { const MetaBmpExAction* pA = (const MetaBmpExAction*) pMA; const Bitmap aBmp( Graphic( pA->GetBitmapEx() ).GetBitmap() ); + VirtualDevice aVirDev; - WriteOpcode_BitsRect( pA->GetPoint(), aBmp.GetSizePixel(), aBmp ); + WriteOpcode_BitsRect( pA->GetPoint(), aVirDev.PixelToLogic( aBmp.GetSizePixel(), aSrcMapMode ), aBmp ); } break; @@ -2150,6 +2156,18 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) WriteOpcodes( aTmpMtf ); } break; + + case( META_RENDERGRAPHIC_ACTION ): + { + const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pMA; + const ::vcl::RenderGraphicRasterizer aRasterizer( pA->GetRenderGraphic() ); + VirtualDevice aVirDev; + const Bitmap aBmp( Graphic( aRasterizer.Rasterize( + aVirDev.LogicToPixel( pA->GetSize() ) ) ).GetBitmap() ); + + WriteOpcode_BitsRect( pA->GetPoint(), pA->GetSize(), aBmp ); + } + break; } nWrittenActions++; diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index 7c3a26844bc6..c69669565eb4 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -47,6 +47,7 @@ #include #include #include +#include #include "strings.hrc" #include @@ -789,7 +790,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) if ( mbGrayScale ) aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS ); Point aPoint = ( (const MetaBmpAction*) pMA )->GetPoint(); - Size aSize = aBitmap.GetSizePixel(); + Size aSize( rVDev.PixelToLogic( aBitmap.GetSizePixel() ) ); ImplBmp( &aBitmap, NULL, aPoint, aSize.Width(), aSize.Height() ); } break; @@ -825,8 +826,8 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) if ( mbGrayScale ) aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS ); Bitmap aMask( aBitmapEx.GetMask() ); - Point aPoint = ( (const MetaBmpExAction*) pMA)->GetPoint(); - Size aSize = ( aBitmap.GetSizePixel() ); + Point aPoint( ( (const MetaBmpExAction*) pMA )->GetPoint() ); + Size aSize( rVDev.PixelToLogic( aBitmap.GetSizePixel() ) ); ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() ); } break; @@ -1339,6 +1340,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) case META_BMPSCALEPART_ACTION : case META_BMPEXSCALE_ACTION : case META_BMPEXSCALEPART_ACTION : + case META_RENDERGRAPHIC_ACTION : { nBitmapCount++; nBitmapAction = nCurAction; @@ -1397,6 +1399,23 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) } } break; + + case( META_RENDERGRAPHIC_ACTION ): + { + const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pMA; + const ::vcl::RenderGraphicRasterizer aRasterizer( pA->GetRenderGraphic() ); + const BitmapEx aBmpEx( aRasterizer.Rasterize( rVDev.LogicToPixel( pA->GetSize() ) ) ); + Bitmap aBmp( aBmpEx.GetBitmap() ); + + if ( mbGrayScale ) + aBmp.Convert( BMP_CONVERSION_8BIT_GREYS ); + + Bitmap aMask( aBmpEx.GetMask() ); + Size aSize( pA->GetSize() ); + + ImplBmp( &aBmp, &aMask, pA->GetPoint(), aSize.Width(), aSize.Height() ); + } + break; } } } diff --git a/filter/source/svg/makefile.mk b/filter/source/svg/makefile.mk index 44bac23381f5..b742b75e1d02 100644 --- a/filter/source/svg/makefile.mk +++ b/filter/source/svg/makefile.mk @@ -2,10 +2,14 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2000, 2010 Oracle and/or its affiliates. +# Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite # +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.10.110.6 $ +# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -39,6 +43,8 @@ VISIBILITY_HIDDEN=TRUE # --- Types ------------------------------------- SLOFILES= $(SLO)$/svguno.obj \ + $(SLO)$/svgdialog.obj \ + $(SLO)$/impsvgdialog.obj \ $(SLO)$/svgfilter.obj \ $(SLO)$/svgexport.obj \ $(SLO)$/svgfontexport.obj \ @@ -52,17 +58,18 @@ SLOFILES+= $(SLO)$/svgimport.obj SHL1TARGET=$(TARGET)$(DLLPOSTFIX) SHL1STDLIBS=\ - $(EDITENGLIB) \ $(SVXCORELIB) \ + $(EDITENGLIB) \ $(XMLOFFLIB) \ - $(SVTOOLLIB) \ $(VCLLIB) \ $(UNOTOOLSLIB) \ $(TOOLSLIB) \ $(COMPHELPERLIB) \ $(CPPUHELPERLIB) \ $(CPPULIB) \ - $(SALLIB) + $(SALLIB) \ + $(BASEGFXLIB) \ + $(SVTOOLLIB) .IF "$(SOLAR_JAVA)"!="" SHL1STDLIBS+=\ diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 081a914934c7..034fb0018759 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -2,10 +2,13 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * + * $RCSfile: svgexport.cxx,v $ + * $Revision: 1.12.62.15 $ + * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -33,8 +36,11 @@ #include "svgwriter.hxx" #include "svgfontexport.hxx" #include "svgfilter.hxx" +#include "impsvgdialog.hxx" +#include #include +#include #include #include #include @@ -47,12 +53,14 @@ using ::rtl::OUString; // - SVGExport - // ------------- -// #110680# SVGExport::SVGExport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, - const Reference< XDocumentHandler >& rxHandler ) -: SvXMLExport( xServiceFactory, OUString(), rxHandler ) + const Reference< XDocumentHandler >& rxHandler, + const Sequence< PropertyValue >& rFilterData ) : + SvXMLExport( xServiceFactory, MAP_100TH_MM ), + mrFilterData( rFilterData ) { + SetDocHandler( rxHandler ); GetDocHandler()->startDocument(); } @@ -63,6 +71,109 @@ SVGExport::~SVGExport() GetDocHandler()->endDocument(); } +// ----------------------------------------------------------------------------- + +bool SVGExport::IsUseTinyProfile() const +{ + bool bRet = false; + + if( mrFilterData.getLength() > 0 ) + mrFilterData[ 0 ].Value >>= bRet; + + return bRet; +} + +// ----------------------------------------------------------------------------- + +bool SVGExport::IsEmbedFonts() const +{ + bool bRet = false; + + if( mrFilterData.getLength() > 1 ) + mrFilterData[ 1 ].Value >>= bRet; + + return bRet; +} + +// ----------------------------------------------------------------------------- + +bool SVGExport::IsUseNativeTextDecoration() const +{ + bool bRet = !IsUseTinyProfile(); + + if( bRet && ( mrFilterData.getLength() > 2 ) ) + mrFilterData[ 2 ].Value >>= bRet; + + return bRet; +} + +// ----------------------------------------------------------------------------- + +::rtl::OUString SVGExport::GetGlyphPlacement() const +{ + ::rtl::OUString aRet; + + if( mrFilterData.getLength() > 3 ) + mrFilterData[ 3 ].Value >>= aRet; + else + aRet = B2UCONST( "abs" ); + + return aRet; +} + +// ----------------------------------------------------------------------------- + +bool SVGExport::IsUseOpacity() const +{ + bool bRet = !IsUseTinyProfile(); + + if( !bRet && ( mrFilterData.getLength() > 4 ) ) + mrFilterData[ 4 ].Value >>= bRet; + + return bRet; +} + +// ----------------------------------------------------------------------------- + +bool SVGExport::IsUseGradient() const +{ + bool bRet = !IsUseTinyProfile(); + + if( !bRet && ( mrFilterData.getLength() > 5 ) ) + mrFilterData[ 5 ].Value >>= bRet; + + return bRet; +} + +// ----------------------------------------------------------------------------- + +void SVGExport::pushClip( const ::basegfx::B2DPolyPolygon& rPolyPoly ) +{ + maClipList.push_front( ::basegfx::tools::correctOrientations( rPolyPoly ) ); +} + +// ----------------------------------------------------------------------------- + +void SVGExport::popClip() +{ + if( !maClipList.empty() ) + maClipList.pop_front(); +} + +// ----------------------------------------------------------------------------- + +bool SVGExport::hasClip() const +{ + return( !maClipList.empty() ); +} + +// ----------------------------------------------------------------------------- + +const ::basegfx::B2DPolyPolygon* SVGExport::getCurClip() const +{ + return( maClipList.empty() ? NULL : &( *maClipList.begin() ) ); +} + // ------------------------ // - ObjectRepresentation - // ------------------------ @@ -129,6 +240,9 @@ sal_Bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor ) const PropertyValue* pValue = rDescriptor.getConstArray(); sal_Bool bRet = sal_False; + mnMasterSlideId = mnSlideId = mnDrawingGroupId = mnDrawingId = 0; + maFilterData.realloc( 0 ); + for ( sal_Int32 i = 0 ; i < nLength; ++i) { if( pValue[ i ].Name.equalsAscii( "OutputStream" ) ) @@ -144,8 +258,64 @@ sal_Bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor ) xOStm = Reference< XOutputStream >( new ::utl::OOutputStreamWrapper ( *pOStm ) ); } else if( pValue[ i ].Name.equalsAscii( "PagePos" ) ) + { pValue[ i ].Value >>= nPageToExport; - } + } + else if( pValue[ i ].Name.equalsAscii( "FilterData" ) ) + { + pValue[ i ].Value >>= maFilterData; + } + } + + // if no filter data is given use stored/prepared ones + if( !maFilterData.getLength() ) + { +#ifdef _SVG_USE_CONFIG + FilterConfigItem aCfgItem( String( RTL_CONSTASCII_USTRINGPARAM( SVG_EXPORTFILTER_CONFIGPATH ) ) ); + + aCfgItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( SVG_PROP_TINYPROFILE ) ), sal_True ); + aCfgItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( SVG_PROP_EMBEDFONTS ) ), sal_True ); + aCfgItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( SVG_PROP_NATIVEDECORATION ) ), sal_False ); + aCfgItem.ReadString( String( RTL_CONSTASCII_USTRINGPARAM( SVG_PROP_NATIVEDECORATION ) ), B2UCONST( "xlist" ) ); + aCfgItem.ReadString( String( RTL_CONSTASCII_USTRINGPARAM( SVG_PROP_OPACITY ) ), sal_True ); + aCfgItem.ReadString( String( RTL_CONSTASCII_USTRINGPARAM( SVG_PROP_GRADIENT ) ), sal_True ); + + maFilterData = aCfgItem.GetFilterData(); +#else + maFilterData.realloc( 6 ); + + maFilterData[ 0 ].Name = B2UCONST( SVG_PROP_TINYPROFILE ); + maFilterData[ 0 ].Value <<= (sal_Bool) true; + + // font embedding + const char* pSVGDisableFontEmbedding = getenv( "SVG_DISABLE_FONT_EMBEDDING" ); + + maFilterData[ 1 ].Name = B2UCONST( SVG_PROP_EMBEDFONTS ); + maFilterData[ 1 ].Value <<= (sal_Bool) ( pSVGDisableFontEmbedding ? false : true ); + + // Native decoration + maFilterData[ 2 ].Name = B2UCONST( SVG_PROP_NATIVEDECORATION ); + maFilterData[ 2 ].Value <<= (sal_Bool) false; + + // glyph placement + const char* pSVGGlyphPlacement = getenv( "SVG_GLYPH_PLACEMENT" ); + + maFilterData[ 3 ].Name = B2UCONST( SVG_PROP_GLYPHPLACEMENT ); + + if( pSVGGlyphPlacement ) + maFilterData[ 3 ].Value <<= ::rtl::OUString::createFromAscii( pSVGGlyphPlacement ); + else + maFilterData[ 3 ].Value <<= B2UCONST( "xlist" ); + + // Tiny Opacity + maFilterData[ 4 ].Name = B2UCONST( SVG_PROP_OPACITY ); + maFilterData[ 4 ].Value <<= (sal_Bool) true; + + // Tiny Gradient + maFilterData[ 5 ].Name = B2UCONST( SVG_PROP_GRADIENT ); + maFilterData[ 5 ].Value <<= (sal_Bool) false; +#endif + } if( xOStm.is() && xServiceFactory.is() ) { @@ -157,8 +327,7 @@ sal_Bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor ) Reference< XDrawPages > xMasterPages( xMasterPagesSupplier->getMasterPages(), UNO_QUERY ); Reference< XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY ); - if( xMasterPages.is() && xDrawPages->getCount() && - xDrawPages.is() && xDrawPages->getCount() ) + if( xMasterPages.is() && xMasterPages->getCount() && xDrawPages.is() && xDrawPages->getCount() ) { Reference< XDocumentHandler > xDocHandler( implCreateExportDocumentHandler( xOStm ) ); @@ -169,7 +338,7 @@ sal_Bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor ) // #110680# // mpSVGExport = new SVGExport( xDocHandler ); - mpSVGExport = new SVGExport( xServiceFactory, xDocHandler ); + mpSVGExport = new SVGExport( xServiceFactory, xDocHandler, maFilterData ); if( nPageToExport < 0 || nPageToExport >= xDrawPages->getCount() ) nPageToExport = SVG_EXPORT_ALLPAGES; @@ -292,8 +461,10 @@ sal_Bool SVGFilter::implExportDocument( const Reference< XDrawPages >& rxMasterP xDefaultPagePropertySet->getPropertyValue( B2UCONST( "Height" ) ) >>= nDocHeight; } - if( xExtDocHandler.is() ) + if( xExtDocHandler.is() && !mpSVGExport->IsUseTinyProfile() ) + { xExtDocHandler->unknown( SVG_DTD_STRING ); + } #ifdef _SVG_WRITE_EXTENTS aAttr = OUString::valueOf( nDocWidth * 0.01 ); @@ -310,11 +481,19 @@ sal_Bool SVGFilter::implExportDocument( const Reference< XDrawPages >& rxMasterP aAttr += B2UCONST( " " ); aAttr += OUString::valueOf( nDocHeight ); - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "version", B2UCONST( "1.1" ) ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "version", B2UCONST( "1.2" ) ); + + if( mpSVGExport->IsUseTinyProfile() ) + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "baseProfile", B2UCONST( "tiny" ) ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "viewBox", aAttr ); mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "preserveAspectRatio", B2UCONST( "xMidYMid" ) ); mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "fill-rule", B2UCONST( "evenodd" ) ); + // standard line width is based on 1 pixel on a 90 DPI device (0.28222mmm) + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "stroke-width", OUString::valueOf( 28.222 ) ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "stroke-linejoin", B2UCONST( "round" ) ); + if( !bSinglePage ) { mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:ooo", B2UCONST( "http://xml.openoffice.org/svg/export" ) ); @@ -322,11 +501,12 @@ sal_Bool SVGFilter::implExportDocument( const Reference< XDrawPages >& rxMasterP mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "onkeypress", B2UCONST( "onKeyPress(evt)" ) ); } - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns", B2UCONST( "http://www.w3.org/2000/svg" ) ); mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:xlink", B2UCONST( "http://www.w3.org/1999/xlink" ) ); - mpSVGDoc = new SvXMLElementExport( *mpSVGExport, XML_NAMESPACE_NONE, "svg", TRUE, TRUE ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xml:space", B2UCONST( "preserve" ) ); + + mpSVGDoc = new SvXMLElementExport( *mpSVGExport, XML_NAMESPACE_NONE, "svg", true, true ); while( ( nCurPage <= nLastPage ) && ( -1 == nVisible ) ) { @@ -372,9 +552,10 @@ sal_Bool SVGFilter::implExportDocument( const Reference< XDrawPages >& rxMasterP ++nCurPage; } -#ifdef _SVG_EMBED_FONTS - mpSVGFontExport->EmbedFonts(); -#endif + if( mpSVGExport->IsEmbedFonts() ) + { + mpSVGFontExport->EmbedFonts(); + } if( -1 != nVisible ) { @@ -409,7 +590,7 @@ sal_Bool SVGFilter::implGenerateMetaData( const Reference< XDrawPages >& /* rxMa mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "numberOfSlides", OUString::valueOf( rxDrawPages->getCount() ) ); { - SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "ooo:slidesInfo", TRUE, TRUE ); + SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "ooo:slidesInfo", true, true ); const OUString aId( B2UCONST( "meta_slide" ) ); for( sal_Int32 i = 0, nCount = rxDrawPages->getCount(); i < nCount; ++i ) @@ -442,7 +623,7 @@ sal_Bool SVGFilter::implGenerateMetaData( const Reference< XDrawPages >& /* rxMa mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "master-visibility", aMasterVisibility ); { - SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "ooo:slideInfo", TRUE, TRUE ); + SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "ooo:slideInfo", true, true ); } } } @@ -462,7 +643,7 @@ sal_Bool SVGFilter::implGenerateScript( const Reference< XDrawPages >& /* rxMast mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "type", B2UCONST( "text/ecmascript" ) ); { - SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "script", TRUE, TRUE ); + SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "script", true, false ); Reference< XExtendedDocumentHandler > xExtDocHandler( mpSVGExport->GetDocHandler(), UNO_QUERY ); if( xExtDocHandler.is() ) @@ -498,39 +679,37 @@ sal_Bool SVGFilter::implExportPages( const Reference< XDrawPages >& rxPages, if( xShapes.is() ) { - OUString aAttr; + OUString aVisibility, aId, aSlideName( implGetValidIDFromInterface( xShapes, true ) ); + // add visibility attribute if( i == nVisiblePage ) - aAttr = B2UCONST( "visible" ); + aVisibility = B2UCONST( "visible" ); else - aAttr = B2UCONST( "hidden" ); + aVisibility = B2UCONST( "hidden" ); - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "visibility", aAttr ); - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", implGetValidIDFromInterface( xShapes ) ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "visibility", aVisibility ); - { - SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", TRUE, TRUE ); - const Point aNullPt; - - { - Reference< XExtendedDocumentHandler > xExtDocHandler( mpSVGExport->GetDocHandler(), UNO_QUERY ); + // add id attribute + if( bMaster ) + aId = ( B2UCONST( "MasterSlide_" ) ) += ::rtl::OUString::valueOf( ++mnMasterSlideId ); + else + aId = ( B2UCONST( "Slide_" ) ) += ::rtl::OUString::valueOf( ++mnSlideId ); - if( xExtDocHandler.is() ) - { - SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "desc", TRUE, TRUE ); - OUString aDesc; + if( aSlideName.getLength() ) + ( ( aId += B2UCONST( "(" ) ) += aSlideName ) += B2UCONST( ")" ); - if( bMaster ) - aDesc = B2UCONST( "Master slide" ); - else - aDesc = B2UCONST( "Slide" ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", aId ); - xExtDocHandler->unknown( aDesc ); - } - } + { + SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", true, true ); + const Point aNullPt; - if( bMaster ) + if( mpObjects->find( xDrawPage ) != mpObjects->end() ) { +#ifdef DEBUG +fprintf( stderr, "Trying to get (Page): %p -- %p\n", xDrawPage.get(), SvxDrawPage::getImplementation( xDrawPage ) ); +#endif + const GDIMetaFile& rMtf = (*mpObjects)[ xDrawPage ].GetRepresentation(); mpSVGWriter->WriteMetaFile( aNullPt, rMtf.GetPrefSize(), rMtf, SVGWRITER_WRITE_FILL ); } @@ -585,10 +764,10 @@ sal_Bool SVGFilter::implExportShape( const Reference< XShape >& rxShape ) if( xPagePropSetInfo.is() ) { - static const ::rtl::OUString aHeaderString( B2UCONST( "IsHeaderVisible" ) ); - static const ::rtl::OUString aFooterString( B2UCONST( "IsFooterVisible" ) ); - static const ::rtl::OUString aDateTimeString( B2UCONST( "IsDateTimeVisible" ) ); - static const ::rtl::OUString aPageNumberString( B2UCONST( "IsPageNumberVisible" ) ); + const ::rtl::OUString aHeaderString( B2UCONST( "IsHeaderVisible" ) ); + const ::rtl::OUString aFooterString( B2UCONST( "IsFooterVisible" ) ); + const ::rtl::OUString aDateTimeString( B2UCONST( "IsDateTimeVisible" ) ); + const ::rtl::OUString aPageNumberString( B2UCONST( "IsPageNumberVisible" ) ); Any aProperty; bool bValue = sal_False; @@ -627,67 +806,81 @@ sal_Bool SVGFilter::implExportShape( const Reference< XShape >& rxShape ) if( !bHideObj ) { - OUString aObjName( implGetValidIDFromInterface( rxShape ) ), aObjDesc; - - if( aObjName.getLength() ) - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", aObjName ); - if( aShapeType.lastIndexOf( B2UCONST( "drawing.GroupShape" ) ) != -1 ) { Reference< XShapes > xShapes( rxShape, UNO_QUERY ); if( xShapes.is() ) { - SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", TRUE, TRUE ); + OUString aId( B2UCONST( "DrawingGroup_" ) ); + OUString aObjName( implGetValidIDFromInterface( rxShape, true ) ), aObjDesc; - { - SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "desc", TRUE, TRUE ); - Reference< XExtendedDocumentHandler > xExtDocHandler( mpSVGExport->GetDocHandler(), UNO_QUERY ); + aId += ::rtl::OUString::valueOf( ++mnDrawingGroupId ); - xExtDocHandler->unknown( B2UCONST( "Group" ) ); - } + if( aObjName.getLength() ) + ( ( aId += B2UCONST( "(" ) ) += aObjName ) += B2UCONST( ")" ); + + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", aId ); - bRet = implExportShapes( xShapes ); + { + SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", true, true ); + bRet = implExportShapes( xShapes ); + } } } - if( !bRet ) + if( !bRet && mpObjects->find( rxShape ) != mpObjects->end() ) { Reference< XText > xText( rxShape, UNO_QUERY ); ::com::sun::star::awt::Rectangle aBoundRect; +#ifdef DEBUG +fprintf( stderr, "Trying to get (Shape): %p -- %p\n", rxShape.get(), SvxShape::getImplementation( rxShape ) ); +#endif + const GDIMetaFile& rMtf = (*mpObjects)[ rxShape ].GetRepresentation(); xShapePropSet->getPropertyValue( B2UCONST( "BoundRect" ) ) >>= aBoundRect; + const Point aTopLeft( aBoundRect.X, aBoundRect.Y ); const Size aSize( aBoundRect.Width, aBoundRect.Height ); + if( rMtf.GetActionCount() ) { - SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", TRUE, TRUE ); + OUString aId( B2UCONST( "Drawing_" ) ); + OUString aObjName( implGetValidIDFromInterface( rxShape, true ) ), aObjDesc; - { - SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "desc", TRUE, TRUE ); - Reference< XExtendedDocumentHandler > xExtDocHandler( mpSVGExport->GetDocHandler(), UNO_QUERY ); + aId += ::rtl::OUString::valueOf( ++mnDrawingId ); - xExtDocHandler->unknown( implGetDescriptionFromShape( rxShape ) ); - } + if( aObjName.getLength() ) + ( ( aId += B2UCONST( "(" ) ) += aObjName ) += B2UCONST( ")" ); - if( rMtf.GetActionCount() ) { if( ( aShapeType.lastIndexOf( B2UCONST( "drawing.OLE2Shape" ) ) != -1 ) || ( aShapeType.lastIndexOf( B2UCONST( "drawing.GraphicObjectShape" ) ) != -1 ) ) { - SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "g", TRUE, TRUE ); - mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf, SVGWRITER_WRITE_ALL); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", aId ); + + { + SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", true, true ); + mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf, SVGWRITER_WRITE_FILL | SVGWRITER_WRITE_TEXT ); + } } else { - // write geometries - SvXMLElementExport aGeometryExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", TRUE, TRUE ); - mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf, SVGWRITER_WRITE_FILL ); + if( implHasText( rMtf ) ) + { + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", aId ); - // write text separately - SvXMLElementExport aTextExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", TRUE, TRUE ); - mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf, SVGWRITER_WRITE_TEXT ); + { + SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", true, true ); + mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf, SVGWRITER_WRITE_FILL ); + mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf, SVGWRITER_WRITE_TEXT ); + } + } + else + { + mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf, SVGWRITER_WRITE_FILL | SVGWRITER_WRITE_TEXT, &aId ); + } } } } @@ -836,6 +1029,10 @@ sal_Bool SVGFilter::implCreateObjectsFromShape( const Reference< XShape >& rxSha else (*mpObjects)[ rxShape ] = ObjectRepresentation( rxShape, aGraphic.GetGDIMetaFile() ); +#ifdef DEBUG +fprintf( stderr, "Put (Shape): %p -- %p\n", rxShape.get(), pObj ); +#endif + bRet = sal_True; } } @@ -873,6 +1070,10 @@ sal_Bool SVGFilter::implCreateObjectsFromBackground( const Reference< XDrawPage (*mpObjects)[ rxMasterPage ] = ObjectRepresentation( rxMasterPage, aMtf ); +#ifdef DEBUG +fprintf( stderr, "Put (Page): %p -- %p\n", rxMasterPage.get(), SvxDrawPage::getImplementation( rxMasterPage ) ); +#endif + bRet = sal_True; } @@ -908,19 +1109,64 @@ OUString SVGFilter::implGetDescriptionFromShape( const Reference< XShape >& rxSh // ----------------------------------------------------------------------------- -OUString SVGFilter::implGetValidIDFromInterface( const Reference< XInterface >& rxIf ) +OUString SVGFilter::implGetValidIDFromInterface( const Reference< XInterface >& rxIf, bool bUnique ) { Reference< XNamed > xNamed( rxIf, UNO_QUERY ); OUString aRet; if( xNamed.is() ) - aRet = xNamed->getName().replace( ' ', '_' ); + { + aRet = xNamed->getName().replace( ' ', '_' ). + replace( ':', '_' ). + replace( ',', '_' ). + replace( ';', '_' ). + replace( '&', '_' ). + replace( '!', '_' ). + replace( '|', '_' ); + } + + if( ( aRet.getLength() > 0 ) && bUnique ) + { + while( ::std::find( maUniqueIdVector.begin(), maUniqueIdVector.end(), aRet ) != maUniqueIdVector.end() ) + { + aRet += B2UCONST( "_" ); + } + + maUniqueIdVector.push_back( aRet ); + } return aRet; } // ----------------------------------------------------------------------------- +bool SVGFilter::implHasText( const GDIMetaFile& rMtf ) const +{ + bool bRet = false; + + for( sal_uInt32 nCurAction = 0, nCount = rMtf.GetActionCount(); ( nCurAction < nCount ) && !bRet; ++nCurAction ) + { + switch( rMtf.GetAction( nCurAction )->GetType() ) + { + case( META_TEXT_ACTION ): + case( META_TEXTRECT_ACTION ): + case( META_TEXTARRAY_ACTION ): + case( META_STRETCHTEXT_ACTION ): + { + bRet = true; + } + break; + + default: + break; + } + } + + return bRet; +} + +// ----------------------------------------------------------------------------- + IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo ) { OUString aRepresentation; @@ -928,10 +1174,10 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo ) if( pInfo ) { - static const ::rtl::OUString aHeaderText( B2UCONST( "HeaderText" ) ); - static const ::rtl::OUString aFooterText( B2UCONST( "FooterText" ) ); - static const ::rtl::OUString aDateTimeText( B2UCONST( "DateTimeText" ) ); - static const ::rtl::OUString aPageNumberText( B2UCONST( "Number" ) ); + const ::rtl::OUString aHeaderText( B2UCONST( "HeaderText" ) ); + const ::rtl::OUString aFooterText( B2UCONST( "FooterText" ) ); + const ::rtl::OUString aDateTimeText( B2UCONST( "DateTimeText" ) ); + const ::rtl::OUString aPageNumberText( B2UCONST( "Number" ) ); const Reference< XPropertySet > xDefaultPagePropertySet( mxDefaultPage, UNO_QUERY ); Reference< XPropertySetInfo > xDefaultPagePropSetInfo( xDefaultPagePropertySet->getPropertySetInfo() ); diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx index 118474bbe2b0..93d551682ea2 100644 --- a/filter/source/svg/svgfilter.cxx +++ b/filter/source/svg/svgfilter.cxx @@ -29,13 +29,16 @@ #include "precompiled_filter.hxx" #include - #include "svgfilter.hxx" +#include + #include #include #include #include -#include + +#define SVG_FILTER_SERVICE_NAME "com.sun.star.comp.Draw.SVGFilter" +#define SVG_FILTER_IMPLEMENTATION_NAME SVG_FILTER_SERVICE_NAME using ::rtl::OUString; using namespace ::com::sun::star; @@ -82,7 +85,7 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescripto #ifdef SOLAR_JAVA if( mxDstDoc.is() ) - bRet = implImport( rDescriptor ); + bRet = false;//implImport( rDescriptor ); else #endif if( mxSrcDoc.is() ) @@ -115,18 +118,18 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescripto } } - Sequence< PropertyValue > aNewDescritor( rDescriptor ); + Sequence< PropertyValue > aNewDescriptor( rDescriptor ); if( nCurrentPageNumber > 0 ) { const sal_uInt32 nOldLength = rDescriptor.getLength(); - aNewDescritor.realloc( nOldLength + 1 ); - aNewDescritor[ nOldLength ].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PagePos" ) ); - aNewDescritor[ nOldLength ].Value <<= static_cast< sal_Int16 >( nCurrentPageNumber - 1 ); + aNewDescriptor.realloc( nOldLength + 1 ); + aNewDescriptor[ nOldLength ].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PagePos" ) ); + aNewDescriptor[ nOldLength ].Value <<= static_cast< sal_Int16 >( nCurrentPageNumber - 1 ); } - bRet = implExport( aNewDescritor ); + bRet = implExport( aNewDescriptor ); } else bRet = sal_False; @@ -173,17 +176,15 @@ void SAL_CALL SVGFilter::initialize( const ::com::sun::star::uno::Sequence< ::co OUString SVGFilter_getImplementationName () throw (RuntimeException) { - return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Draw.SVGFilter" ) ); + return OUString ( RTL_CONSTASCII_USTRINGPARAM ( SVG_FILTER_IMPLEMENTATION_NAME ) ); } // ----------------------------------------------------------------------------- -#define SERVICE_NAME "com.sun.star.document.SVGFilter" - -sal_Bool SAL_CALL SVGFilter_supportsService( const OUString& ServiceName ) +sal_Bool SAL_CALL SVGFilter_supportsService( const OUString& rServiceName ) throw (RuntimeException) { - return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME ) ); + return( rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SVG_FILTER_SERVICE_NAME ) ) ); } // ----------------------------------------------------------------------------- @@ -192,12 +193,10 @@ Sequence< OUString > SAL_CALL SVGFilter_getSupportedServiceNames( ) throw (Runt { Sequence < OUString > aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) ); + pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SVG_FILTER_SERVICE_NAME ) ); return aRet; } -#undef SERVICE_NAME - // ----------------------------------------------------------------------------- Reference< XInterface > SAL_CALL SVGFilter_createInstance( const Reference< XMultiServiceFactory > & rSMgr) throw( Exception ) diff --git a/filter/source/svg/svgfilter.hxx b/filter/source/svg/svgfilter.hxx index 0bbc64e2c244..883d1d1615d7 100644 --- a/filter/source/svg/svgfilter.hxx +++ b/filter/source/svg/svgfilter.hxx @@ -2,10 +2,13 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * + * $RCSfile: svgfilter.hxx,v $ + * $Revision: 1.10.110.11 $ + * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -64,6 +67,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -84,6 +90,8 @@ #include "svgfilter.hxx" #include "svgscript.hxx" +#include + using namespace ::com::sun::star::uno; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; @@ -110,25 +118,43 @@ using namespace ::std; // #110680# class SVGExport : public SvXMLExport { -private: + typedef ::std::list< ::basegfx::B2DPolyPolygon > B2DPolyPolygonList; + +public: + + SVGExport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, + const Reference< XDocumentHandler >& rxHandler, + const Sequence< PropertyValue >& rFilterData ); + + virtual ~SVGExport(); - SVGExport(); + bool IsUseTinyProfile() const; + bool IsEmbedFonts() const; + bool IsUseNativeTextDecoration() const; + ::rtl::OUString GetGlyphPlacement() const; + bool IsUseOpacity() const; + bool IsUseGradient() const; + + void pushClip( const ::basegfx::B2DPolyPolygon& rPolyPoly ); + void popClip(); + bool hasClip() const; + const ::basegfx::B2DPolyPolygon* getCurClip() const; protected: - virtual void _ExportMeta() {} - virtual void _ExportStyles( BOOL /* bUsed */ ) {} - virtual void _ExportAutoStyles() {} - virtual void _ExportContent() {} - virtual void _ExportMasterStyles() {} - virtual sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum /* eClass */ ) { return 0; } +virtual void _ExportMeta() {} +virtual void _ExportStyles( BOOL ) {} +virtual void _ExportAutoStyles() {} +virtual void _ExportContent() {} +virtual void _ExportMasterStyles() {} +virtual sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum ) { return 0; } -public: +private: - SVGExport( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, - const Reference< XDocumentHandler >& rxHandler ); - virtual ~SVGExport(); + const Sequence< PropertyValue >& mrFilterData; + B2DPolyPolygonList maClipList; + + SVGExport(); }; // ------------------------ @@ -164,7 +190,13 @@ public: struct HashReferenceXInterface { - size_t operator()( const Reference< XInterface >& rxIf ) const { return reinterpret_cast< size_t >( rxIf.get() ); } + size_t operator()( const Reference< XInterface >& rxIf ) const + { +#ifdef DEBUG + fprintf( stderr, "HashCode for %p\n", (void*)rxIf.get() ); +#endif + return reinterpret_cast< size_t >( rxIf.get() ); + } }; // ------------- @@ -189,6 +221,7 @@ class SVGFilter : public cppu::WeakImplHelper4 < XFilter, #endif { typedef ::std::hash_map< Reference< XInterface >, ObjectRepresentation, HashReferenceXInterface > ObjectMap; + typedef ::std::vector< ::rtl::OUString > UniqueIdVector; private: @@ -207,6 +240,12 @@ private: Reference< XComponent > mxDstDoc; #endif Reference< XDrawPage > mxDefaultPage; + Sequence< PropertyValue > maFilterData; + UniqueIdVector maUniqueIdVector; + sal_Int32 mnMasterSlideId; + sal_Int32 mnSlideId; + sal_Int32 mnDrawingGroupId; + sal_Int32 mnDrawingId; Link maOldFieldHdl; #ifdef SOLAR_JAVA @@ -240,7 +279,9 @@ private: sal_Bool implCreateObjectsFromBackground( const Reference< XDrawPage >& rxMasterPage ); ::rtl::OUString implGetDescriptionFromShape( const Reference< XShape >& rxShape ); - ::rtl::OUString implGetValidIDFromInterface( const Reference< XInterface >& rxIf ); + ::rtl::OUString implGetValidIDFromInterface( const Reference< XInterface >& rxIf, bool bUnique = false ); + + bool implHasText( const GDIMetaFile& rMtf ) const; DECL_LINK( CalcFieldHdl, EditFieldInfo* ); diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx index 8fa9db03eacf..8ea64e888fc9 100644 --- a/filter/source/svg/svgfontexport.cxx +++ b/filter/source/svg/svgfontexport.cxx @@ -2,10 +2,13 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * + * $RCSfile: svgfontexport.cxx,v $ + * $Revision: 1.6.64.10 $ + * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,16 +31,16 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_filter.hxx" - #include "svgfontexport.hxx" +#include -static const sal_Int32 nFontEM = 2048; +static const sal_Int32 nFontEM = 2048; // ----------------- // - SVGFontExport - // ----------------- -SVGFontExport::SVGFontExport( SvXMLExport& rExport, const ::std::vector< ObjectRepresentation >& rObjects ) : +SVGFontExport::SVGFontExport( SVGExport& rExport, const ::std::vector< ObjectRepresentation >& rObjects ) : mrExport( rExport ), maObjects( rObjects ), mnCurFontId( 0 ) @@ -52,6 +55,33 @@ SVGFontExport::~SVGFontExport() // ----------------------------------------------------------------------------- +SVGFontExport::GlyphSet& SVGFontExport::implGetGlyphSet( const Font& rFont ) +{ + FontWeight eWeight( WEIGHT_NORMAL ); + FontItalic eItalic( ITALIC_NONE ); + ::rtl::OUString aFontName( rFont.GetName() ); + sal_Int32 nNextTokenPos( 0 ); + + switch( rFont.GetWeight() ) + { + case WEIGHT_BOLD: + case WEIGHT_ULTRABOLD: + case WEIGHT_BLACK: + eWeight = WEIGHT_BOLD; + break; + + default: + break; + } + + if( rFont.GetItalic() != ITALIC_NONE ) + eItalic = ITALIC_NORMAL; + + return( maGlyphTree[ aFontName.getToken( 0, ';', nNextTokenPos ) ][ eWeight ][ eItalic ] ); +} + +// ----------------------------------------------------------------------------- + void SVGFontExport::implCollectGlyphs() { VirtualDevice aVDev; @@ -110,11 +140,34 @@ void SVGFontExport::implCollectGlyphs() if( aText.getLength() ) { - const String& rFontName = aVDev.GetFont().GetName(); - const sal_Unicode* pStr = aText.getStr(); + GlyphSet& rGlyphSet = implGetGlyphSet( aVDev.GetFont() ); + ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > xBI( + ::vcl::unohelper::CreateBreakIterator() ); + + if( xBI.is() ) + { + const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetLocale(); + sal_Int32 nCurPos = 0, nLastPos = -1; + + while( ( nCurPos < aText.getLength() ) && ( nCurPos > nLastPos ) ) + { + sal_Int32 nCount2 = 1; - for( sal_uInt32 j = 0, nLen = aText.getLength(); j < nLen; ++j ) - maGlyphs[ rFontName ].insert( pStr[ j ] ); + nLastPos = nCurPos; + nCurPos = xBI->nextCharacters( aText, nCurPos, rLocale, + ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, + nCount2, nCount2 ); + + rGlyphSet.insert( aText.copy( nLastPos, nCurPos - nLastPos ) ); + } + } + else + { + const sal_Unicode* pStr = aText.getStr(); + + for( sal_uInt32 k = 0, nLen = aText.getLength(); k < nLen; ++k ) + rGlyphSet.insert( rtl::OUString( pStr[ k ] ) ); + } } } @@ -127,103 +180,118 @@ void SVGFontExport::implCollectGlyphs() // ----------------------------------------------------------------------------- -void SVGFontExport::implEmbedFont( const ::rtl::OUString& rFontName, const ::std::set< sal_Unicode >& rGlyphs ) +void SVGFontExport::implEmbedFont( const Font& rFont ) { -#ifdef _SVG_EMBED_FONTS - ::std::set< sal_Unicode >::const_iterator aIter( rGlyphs.begin() ); - const ::rtl::OUString aEmbeddedFontStr( B2UCONST( "EmbeddedFont_" ) ); - + if( mrExport.IsEmbedFonts() ) { - SvXMLElementExport aExp( mrExport, XML_NAMESPACE_NONE, "defs", TRUE, TRUE ); - ::rtl::OUString aCurIdStr( aEmbeddedFontStr ); - ::rtl::OUString aUnitsPerEM( SVGActionWriter::GetValueString( nFontEM ) ); - VirtualDevice aVDev; - Font aFont( rFontName, Size( 0, nFontEM ) ); + GlyphSet& rGlyphSet = implGetGlyphSet( rFont ); - aVDev.SetMapMode( MAP_100TH_MM ); - aFont.SetAlign( ALIGN_BASELINE ); - aVDev.SetFont( aFont ); + if( !rGlyphSet.empty() ) + { + GlyphSet::const_iterator aIter( rGlyphSet.begin() ); + const ::rtl::OUString aEmbeddedFontStr( B2UCONST( "EmbeddedFont_" ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, "id", aCurIdStr += SVGActionWriter::GetValueString( ++mnCurFontId ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, "horiz-adv-x", aUnitsPerEM ); + { + SvXMLElementExport aExp( mrExport, XML_NAMESPACE_NONE, "defs", true, true ); + ::rtl::OUString aCurIdStr( aEmbeddedFontStr ); + ::rtl::OUString aUnitsPerEM( ::rtl::OUString::valueOf( nFontEM ) ); + VirtualDevice aVDev; + Font aFont( rFont ); - { - SvXMLElementExport aExp2( mrExport, XML_NAMESPACE_NONE, "font", TRUE, TRUE ); - Point aPos; - Size aSize( nFontEM, nFontEM ); - PolyPolygon aMissingGlyphPolyPoly( Rectangle( aPos, aSize ) ); + aFont.SetSize( Size( 0, nFontEM ) ); + aFont.SetAlign( ALIGN_BASELINE ); - aMissingGlyphPolyPoly.Move( 0, -nFontEM ); - aMissingGlyphPolyPoly.Scale( 1.0, -1.0 ); + aVDev.SetMapMode( MAP_100TH_MM ); + aVDev.SetFont( aFont ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, "font-family", GetMappedFontName( rFontName ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, "units-per-em", aUnitsPerEM ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, "ascent", SVGActionWriter::GetValueString( aVDev.GetFontMetric().GetAscent() ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, "descent", SVGActionWriter::GetValueString( aVDev.GetFontMetric().GetDescent() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, "id", aCurIdStr += ::rtl::OUString::valueOf( ++mnCurFontId ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, "horiz-adv-x", aUnitsPerEM ); - { - SvXMLElementExport aExp3( mrExport, XML_NAMESPACE_NONE, "font-face", TRUE, TRUE ); - } + { + SvXMLElementExport aExp2( mrExport, XML_NAMESPACE_NONE, "font", true, true ); + ::rtl::OUString aFontWeight; + ::rtl::OUString aFontStyle; + const Size aSize( nFontEM, nFontEM ); + + // Font Weight + if( aFont.GetWeight() != WEIGHT_NORMAL ) + aFontWeight = B2UCONST( "bold" ); + else + aFontWeight = B2UCONST( "normal" ); + + // Font Italic + if( aFont.GetItalic() != ITALIC_NONE ) + aFontStyle = B2UCONST( "italic" ); + else + aFontStyle = B2UCONST( "normal" ); + + mrExport.AddAttribute( XML_NAMESPACE_NONE, "font-family", GetMappedFontName( rFont.GetName() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, "units-per-em", aUnitsPerEM ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, "font-weight", aFontWeight ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, "font-style", aFontStyle ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, "ascent", ::rtl::OUString::valueOf( aVDev.GetFontMetric().GetAscent() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, "descent", ::rtl::OUString::valueOf( aVDev.GetFontMetric().GetDescent() ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, "horiz-adv-x", SVGActionWriter::GetValueString( aSize.Width() ) ); + { + SvXMLElementExport aExp3( mrExport, XML_NAMESPACE_NONE, "font-face", true, true ); + } - { - SvXMLElementExport aExp3( mrExport, XML_NAMESPACE_NONE, "missing-glyph", TRUE, TRUE ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, "horiz-adv-x", ::rtl::OUString::valueOf( aSize.Width() ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, "style", B2UCONST( "fill:none;stroke:black;stroke-width:33" ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, "d", SVGActionWriter::GetPathString( aMissingGlyphPolyPoly, sal_False ) ); + { + const Point aPos; + const PolyPolygon aMissingGlyphPolyPoly( Rectangle( aPos, aSize ) ); - { - SvXMLElementExport aExp4( mrExport, XML_NAMESPACE_NONE, "path", TRUE, TRUE ); - } - } + mrExport.AddAttribute( XML_NAMESPACE_NONE, "d", SVGActionWriter::GetPathString( aMissingGlyphPolyPoly, sal_False ) ); - while( aIter != rGlyphs.end() ) - { - implEmbedGlyph( aVDev, ::rtl::OUString( *aIter ) ); - ++aIter; + { + SvXMLElementExport aExp4( mrExport, XML_NAMESPACE_NONE, "missing-glyph", true, true ); + } + } + + while( aIter != rGlyphSet.end() ) + { + implEmbedGlyph( aVDev, *aIter ); + ++aIter; + } + } } } } -#endif } // ----------------------------------------------------------------------------- -void SVGFontExport::implEmbedGlyph( OutputDevice& rOut, const ::rtl::OUString& rGlyphs ) +void SVGFontExport::implEmbedGlyph( OutputDevice& rOut, const ::rtl::OUString& rCellStr ) { PolyPolygon aPolyPoly; - ::rtl::OUString aStr( rGlyphs ); const sal_Unicode nSpace = ' '; - if( rOut.GetTextOutline( aPolyPoly, aStr ) ) + if( rOut.GetTextOutline( aPolyPoly, rCellStr ) ) { Rectangle aBoundRect; aPolyPoly.Scale( 1.0, -1.0 ); - if( !rOut.GetTextBoundRect( aBoundRect, aStr ) ) - aBoundRect = Rectangle( Point( 0, 0 ), Size( rOut.GetTextWidth( aStr ), 0 ) ); + if( !rOut.GetTextBoundRect( aBoundRect, rCellStr ) ) + aBoundRect = Rectangle( Point( 0, 0 ), Size( rOut.GetTextWidth( rCellStr ), 0 ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, "unicode", aStr ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, "unicode", rCellStr ); - if( rGlyphs[ 0 ] == nSpace ) - aBoundRect = Rectangle( Point( 0, 0 ), Size( rOut.GetTextWidth( sal_Unicode( 'x' ) ), 0 ) ); + if( rCellStr[ 0 ] == nSpace && rCellStr.getLength() == 1 ) + aBoundRect = Rectangle( Point( 0, 0 ), Size( rOut.GetTextWidth( sal_Unicode( ' ' ) ), 0 ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, "horiz-adv-x", SVGActionWriter::GetValueString( aBoundRect.GetWidth() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, "horiz-adv-x", ::rtl::OUString::valueOf( aBoundRect.GetWidth() ) ); - { - SvXMLElementExport aExp( mrExport, XML_NAMESPACE_NONE, "glyph", TRUE, TRUE ); - const ::rtl::OUString aPathString( SVGActionWriter::GetPathString( aPolyPoly, sal_False ) ); + const ::rtl::OUString aPathString( SVGActionWriter::GetPathString( aPolyPoly, sal_False ) ); - if( aPathString.getLength() ) - { - mrExport.AddAttribute( XML_NAMESPACE_NONE, "d", aPathString ); + if( aPathString.getLength() ) + { + mrExport.AddAttribute( XML_NAMESPACE_NONE, "d", aPathString ); + } - { - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, B2UCONST( "path" ), TRUE, TRUE ); - } - } + { + SvXMLElementExport aExp( mrExport, XML_NAMESPACE_NONE, "glyph", true, true ); } } } @@ -234,12 +302,35 @@ void SVGFontExport::EmbedFonts() { implCollectGlyphs(); - GlyphMap::const_iterator aIter( maGlyphs.begin() ); + GlyphTree::const_iterator aGlyphTreeIter( maGlyphTree.begin() ); - while( aIter != maGlyphs.end() ) + while( aGlyphTreeIter != maGlyphTree.end() ) { - implEmbedFont( (*aIter).first, (*aIter).second ); - ++aIter; + const FontWeightMap& rFontWeightMap = (*aGlyphTreeIter).second; + FontWeightMap::const_iterator aFontWeightIter( rFontWeightMap.begin() ); + + while( aFontWeightIter != rFontWeightMap.end() ) + { + const FontItalicMap& rFontItalicMap = (*aFontWeightIter).second; + FontItalicMap::const_iterator aFontItalicIter( rFontItalicMap.begin() ); + + while( aFontItalicIter != rFontItalicMap.end() ) + { + Font aFont; + + aFont.SetName( (*aGlyphTreeIter).first ); + aFont.SetWeight( (*aFontWeightIter).first ); + aFont.SetItalic( (*aFontItalicIter).first ); + + implEmbedFont( aFont ); + + ++aFontItalicIter; + } + + ++aFontWeightIter; + } + + ++aGlyphTreeIter; } } @@ -247,12 +338,11 @@ void SVGFontExport::EmbedFonts() ::rtl::OUString SVGFontExport::GetMappedFontName( const ::rtl::OUString& rFontName ) const { - ::rtl::OUString aRet( String( rFontName ).GetToken( 0, ';' ) ); + sal_Int32 nNextTokenPos( 0 ); + ::rtl::OUString aRet( rFontName.getToken( 0, ';', nNextTokenPos ) ); -#ifdef _SVG_EMBED_FONTS if( mnCurFontId ) aRet += B2UCONST( " embedded" ); -#endif return aRet; } diff --git a/filter/source/svg/svgfontexport.hxx b/filter/source/svg/svgfontexport.hxx index 9147efb27a55..9929dbc162c4 100644 --- a/filter/source/svg/svgfontexport.hxx +++ b/filter/source/svg/svgfontexport.hxx @@ -2,10 +2,13 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * + * $RCSfile: svgfontexport.hxx,v $ + * $Revision: 1.2.110.3 $ + * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -38,23 +41,28 @@ class SVGFontExport { - typedef ::std::hash_map< ::rtl::OUString, ::std::set< sal_Unicode >, ::comphelper::UStringHash > GlyphMap; - typedef ::std::vector< ObjectRepresentation > ObjectVector; + typedef ::std::vector< ObjectRepresentation > ObjectVector; + typedef ::std::set< ::rtl::OUString, ::std::greater< ::rtl::OUString > > GlyphSet; + typedef ::std::map< FontItalic, GlyphSet > FontItalicMap; + typedef ::std::map< FontWeight, FontItalicMap > FontWeightMap; + typedef ::std::map< ::rtl::OUString, FontWeightMap > FontNameMap; + typedef FontNameMap GlyphTree; private: - SvXMLExport& mrExport; - GlyphMap maGlyphs; + SVGExport& mrExport; + GlyphTree maGlyphTree; ObjectVector maObjects; - sal_uInt32 mnCurFontId; + sal_Int32 mnCurFontId; + GlyphSet& implGetGlyphSet( const Font& rFont ); void implCollectGlyphs(); - void implEmbedFont( const ::rtl::OUString& rFontName, const ::std::set< sal_Unicode >& rGlyphs ); - void implEmbedGlyph( OutputDevice& rOut, const ::rtl::OUString& rGlyphs ); + void implEmbedFont( const Font& rFont ); + void implEmbedGlyph( OutputDevice& rOut, const ::rtl::OUString& rCellStr ); public: - SVGFontExport( SvXMLExport& rExport, const ::std::vector< ObjectRepresentation >& rObjects ); + SVGFontExport( SVGExport& rExport, const ::std::vector< ObjectRepresentation >& rObjects ); ~SVGFontExport(); void EmbedFonts(); diff --git a/filter/source/svg/svguno.cxx b/filter/source/svg/svguno.cxx index f20bfb6a526d..08dcd4bda21a 100644 --- a/filter/source/svg/svguno.cxx +++ b/filter/source/svg/svguno.cxx @@ -35,6 +35,7 @@ #include #include +#include using ::rtl::OUString; using namespace ::cppu; @@ -56,13 +57,26 @@ extern "C" { void * pRet = 0; - OUString implName = OUString::createFromAscii( pImplName ); - if ( pServiceManager && implName.equals(SVGFilter_getImplementationName()) ) + const OUString aImplName = OUString::createFromAscii( pImplName ); + + if( pServiceManager ) { - Reference< XSingleServiceFactory > xFactory( createSingleFactory( - reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), - OUString::createFromAscii( pImplName ), - SVGFilter_createInstance, SVGFilter_getSupportedServiceNames() ) ); + Reference< XSingleServiceFactory > xFactory; + + if( aImplName.equals( SVGFilter_getImplementationName() ) ) + { + xFactory = Reference< XSingleServiceFactory >( createSingleFactory( + reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), + OUString::createFromAscii( pImplName ), + SVGFilter_createInstance, SVGFilter_getSupportedServiceNames() ) ); + } + else if( aImplName.equals( SVGDialog_getImplementationName() ) ) + { + xFactory = Reference< XSingleServiceFactory >( createSingleFactory( + reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), + OUString::createFromAscii( pImplName ), + SVGDialog_createInstance, SVGDialog_getSupportedServiceNames() ) ); + } if (xFactory.is()) { diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 15f83c3be407..705ad0bbde13 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -2,10 +2,13 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * + * $RCSfile: svgwriter.cxx,v $ + * $Revision: 1.7.64.23 $ + * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -37,7 +40,6 @@ static const char aXMLElemG[] = "g"; static const char aXMLElemDefs[] = "defs"; -static const char aXMLElemClipPath[] = "clipPath"; static const char aXMLElemLine[] = "line"; static const char aXMLElemRect[] = "rect"; static const char aXMLElemEllipse[] = "ellipse"; @@ -47,6 +49,11 @@ static const char aXMLElemPolyLine[] = "polyline"; static const char aXMLElemText[] = "text"; static const char aXMLElemTSpan[] = "tspan"; static const char aXMLElemImage[] = "image"; +static const char aXMLElemLinearGradient[] = "linearGradient"; +static const char aXMLElemRadialGradient[] = "radialGradient"; +static const char aXMLElemStop[] = "stop"; + +// ----------------------------------------------------------------------------- static const char aXMLAttrTransform[] = "transform"; static const char aXMLAttrStyle[] = "style"; @@ -60,12 +67,29 @@ static const char aXMLAttrX2[] = "x2"; static const char aXMLAttrY2[] = "y2"; static const char aXMLAttrCX[] = "cx"; static const char aXMLAttrCY[] = "cy"; +static const char aXMLAttrR[] = "r"; static const char aXMLAttrRX[] = "rx"; static const char aXMLAttrRY[] = "ry"; static const char aXMLAttrWidth[] = "width"; static const char aXMLAttrHeight[] = "height"; static const char aXMLAttrPoints[] = "points"; +static const char aXMLAttrStroke[] = "stroke"; +static const char aXMLAttrStrokeOpacity[] = "stroke-opacity"; +static const char aXMLAttrStrokeWidth[] = "stroke-width"; +static const char aXMLAttrStrokeDashArray[] = "stroke-dasharray"; +static const char aXMLAttrFill[] = "fill"; +static const char aXMLAttrFillOpacity[] = "fill-opacity"; +static const char aXMLAttrFontFamily[] = "font-family"; +static const char aXMLAttrFontSize[] = "font-size"; +static const char aXMLAttrFontStyle[] = "font-style"; +static const char aXMLAttrFontWeight[] = "font-weight"; +static const char aXMLAttrTextDecoration[] = "text-decoration"; static const char aXMLAttrXLinkHRef[] = "xlink:href"; +static const char aXMLAttrGradientUnits[] = "gradientUnits"; +static const char aXMLAttrOffset[] = "offset"; +static const char aXMLAttrStopColor[] = "stop-color"; + +// ----------------------------------------------------------------------------- static const sal_Unicode pBase64[] = { @@ -80,371 +104,216 @@ static const sal_Unicode pBase64[] = '4','5','6','7','8','9','+','/' // 7 }; -// -------------- -// - FastString - -// -------------- +// ---------------------- +// - SVGAttributeWriter - +// ---------------------- -FastString::FastString( sal_uInt32 nInitLen, sal_uInt32 nIncrement ) : - mnBufLen( nInitLen ), - mnCurLen( 0 ), - mnBufInc( nIncrement ), - mpBuffer( new sal_Unicode[ nInitLen * sizeof( sal_Unicode ) ] ), - mnPartPos( 0 ) +SVGAttributeWriter::SVGAttributeWriter( SVGExport& rExport, SVGFontExport& rFontExport ) : + mrExport( rExport ), + mrFontExport( rFontExport ), + mpElemFont( NULL ), + mpElemPaint( NULL ) { - DBG_ASSERT( nInitLen, "invalid initial length" ); - DBG_ASSERT( nIncrement, "invalid increment" ); } // ----------------------------------------------------------------------------- -FastString::FastString( sal_Char* pBufferForBase64Encoding, sal_uInt32 nBufLen ) : - mnBufInc( 2048 ), - mnPartPos( 0 ) +SVGAttributeWriter::~SVGAttributeWriter() { - DBG_ASSERT( pBufferForBase64Encoding && nBufLen, "invalid arguments" ); - - const sal_uInt32 nQuadCount = nBufLen / 3; - const sal_uInt32 nRest = nBufLen % 3; - - if( nQuadCount || nRest ) - { - mnBufLen = mnCurLen = ( ( nQuadCount + ( nRest ? 1 : 0 ) ) << 2 ); - mpBuffer = new sal_Unicode[ mnBufLen * sizeof( sal_Unicode ) ]; - - sal_Char* pTmpSrc = pBufferForBase64Encoding; - sal_Unicode* pTmpDst = mpBuffer; - - for( sal_uInt32 i = 0; i < nQuadCount; i++ ) - { - const sal_Int32 nA = *pTmpSrc++; - const sal_Int32 nB = *pTmpSrc++; - const sal_Int32 nC = *pTmpSrc++; - - *pTmpDst++ = pBase64[ ( nA >> 2 ) & 0x3f ]; - *pTmpDst++ = pBase64[ ( ( nA << 4 ) & 0x30 ) + ( ( nB >> 4 ) & 0xf ) ]; - *pTmpDst++ = pBase64[ ( ( nB << 2 ) & 0x3c ) + ( ( nC >> 6 ) & 0x3 ) ]; - *pTmpDst++ = pBase64[ nC & 0x3f ]; - } - - if( 1 == nRest ) - { - const sal_Int32 nA = *pTmpSrc; - - *pTmpDst++ = pBase64[ ( nA >> 2 ) & 0x3f ]; - *pTmpDst++ = pBase64[ ( nA << 4 ) & 0x30 ]; - *pTmpDst++ = '='; - *pTmpDst = '='; - } - else if( 2 == nRest ) - { - const sal_Int32 nA = *pTmpSrc++; - const sal_Int32 nB = *pTmpSrc; - - *pTmpDst++ = pBase64[ ( nA >> 2 ) & 0x3f ]; - *pTmpDst++ = pBase64[ ( ( nA << 4 ) & 0x30 ) + ( ( nB >> 4 ) & 0xf ) ]; - *pTmpDst++ = pBase64[ ( nB << 2 ) & 0x3c ]; - *pTmpDst = '='; - } - } - else - { - mpBuffer = new sal_Unicode[ ( mnBufLen = 1 ) * sizeof( sal_Unicode ) ]; - mnCurLen = 0; - } + delete mpElemPaint; + delete mpElemFont; } // ----------------------------------------------------------------------------- -FastString::~FastString() +double SVGAttributeWriter::ImplRound( double fValue, sal_Int32 nDecs ) { - delete[] mpBuffer; + return( floor( fValue * pow( 10.0, nDecs ) + 0.5 ) / pow( 10.0, nDecs ) ); } // ----------------------------------------------------------------------------- -FastString& FastString::operator+=( const NMSP_RTL::OUString& rStr ) +void SVGAttributeWriter::ImplGetColorStr( const Color& rColor, ::rtl::OUString& rColorStr ) { - if( rStr.getLength() ) + if( rColor.GetTransparency() == 255 ) + rColorStr = B2UCONST( "none" ); + else { - if( ( mnCurLen + rStr.getLength() ) > mnBufLen ) - { - const sal_uInt32 nNewBufLen = ( mnBufLen + ( ( ( mnCurLen + rStr.getLength() ) - mnBufLen ) / mnBufInc + 1 ) * mnBufInc ); - sal_Unicode* pNewBuffer = new sal_Unicode[ nNewBufLen * sizeof( sal_Unicode ) ]; - - memcpy( pNewBuffer, mpBuffer, mnBufLen * sizeof( sal_Unicode ) ); - delete[] mpBuffer; - mpBuffer = pNewBuffer; - mnBufLen = nNewBufLen; - } - - memcpy( mpBuffer + mnCurLen, rStr.getStr(), rStr.getLength() * sizeof( sal_Unicode ) ); - mnCurLen += rStr.getLength(); - - if( maString.getLength() ) - maString = NMSP_RTL::OUString(); + rColorStr = B2UCONST( "rgb(" ); + rColorStr += ::rtl::OUString::valueOf( static_cast< sal_Int32 >( rColor.GetRed() ) ); + rColorStr += B2UCONST( "," ); + rColorStr += ::rtl::OUString::valueOf( static_cast< sal_Int32 >( rColor.GetGreen() ) ); + rColorStr += B2UCONST( "," ); + rColorStr += ::rtl::OUString::valueOf( static_cast< sal_Int32 >( rColor.GetBlue() ) ); + rColorStr += B2UCONST( ")" ); } - - return *this; } // ----------------------------------------------------------------------------- -const NMSP_RTL::OUString& FastString::GetString() const +void SVGAttributeWriter::AddColorAttr( const char* pColorAttrName, + const char* pColorOpacityAttrName, + const Color& rColor ) { - if( !maString.getLength() && mnCurLen ) - ( (FastString*) this )->maString = NMSP_RTL::OUString( mpBuffer, mnCurLen ); - - return maString; -} - -// ----------------------------------------------------------------------------- + ::rtl::OUString aColor, aColorOpacity; -sal_Bool FastString::GetFirstPartString( const sal_uInt32 nPartLen, NMSP_RTL::OUString& rPartString ) -{ - const sal_uInt32 nLength = Min( mnCurLen, nPartLen ); + ImplGetColorStr( rColor, aColor ); - mnPartPos = 0; + if( rColor.GetTransparency() > 0 && rColor.GetTransparency() < 255 ) + aColorOpacity = ::rtl::OUString::valueOf( ImplRound( ( 255.0 - rColor.GetTransparency() ) / 255.0 ) ); - if( nLength ) - { - rPartString = NMSP_RTL::OUString( mpBuffer, nLength ); - mnPartPos = nLength; - } + mrExport.AddAttribute( XML_NAMESPACE_NONE, pColorAttrName, aColor ); - return( rPartString.getLength() > 0 ); + if( aColorOpacity.getLength() && mrExport.IsUseOpacity() ) + mrExport.AddAttribute( XML_NAMESPACE_NONE, pColorOpacityAttrName, aColorOpacity ); } // ----------------------------------------------------------------------------- -sal_Bool FastString::GetNextPartString( const sal_uInt32 nPartLen, NMSP_RTL::OUString& rPartString ) +void SVGAttributeWriter::AddPaintAttr( const Color& rLineColor, const Color& rFillColor, + const Rectangle* pObjBoundRect, const Gradient* pFillGradient ) { - if( mnPartPos < mnCurLen ) + // Fill + if( pObjBoundRect && pFillGradient ) { - const sal_uInt32 nLength = Min( mnCurLen - mnPartPos, nPartLen ); - rPartString = NMSP_RTL::OUString( mpBuffer + mnPartPos, nLength ); - mnPartPos += nLength; - } - else - rPartString = NMSP_RTL::OUString(); + ::rtl::OUString aGradientId; - return( rPartString.getLength() > 0 ); -} + AddGradientDef( *pObjBoundRect, *pFillGradient, aGradientId ); -// ---------------------- -// - SVGAttributeWriter - -// ---------------------- + if( aGradientId.getLength() ) + { + ::rtl::OUString aGradientURL( B2UCONST( "url(#" ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrFill, ( aGradientURL += aGradientId ) += B2UCONST( ")" ) ); + } + } + else + AddColorAttr( aXMLAttrFill, aXMLAttrFillOpacity, rFillColor ); -SVGAttributeWriter::SVGAttributeWriter( SvXMLExport& rExport, SVGFontExport& rFontExport ) : - mrExport( rExport ), - mrFontExport( rFontExport ), - mpElemFont( NULL ), - mpElemPaint( NULL ) -{ + // Stroke + AddColorAttr( aXMLAttrStroke, aXMLAttrStrokeOpacity, rLineColor ); } // ----------------------------------------------------------------------------- -SVGAttributeWriter::~SVGAttributeWriter() +void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradient& rGradient, ::rtl::OUString& rGradientId ) { - delete mpElemPaint; - delete mpElemFont; -} - -// ----------------------------------------------------------------------------- + if( rObjRect.GetWidth() && rObjRect.GetHeight() && + ( rGradient.GetStyle() == GRADIENT_LINEAR || rGradient.GetStyle() == GRADIENT_AXIAL || + rGradient.GetStyle() == GRADIENT_RADIAL || rGradient.GetStyle() == GRADIENT_ELLIPTICAL ) ) + { + SvXMLElementExport aDesc( mrExport, XML_NAMESPACE_NONE, aXMLElemDefs, true, true ); + Color aStartColor( rGradient.GetStartColor() ), aEndColor( rGradient.GetEndColor() ); + sal_uInt16 nAngle = rGradient.GetAngle() % 3600; + Point aObjRectCenter( rObjRect.Center() ); + Polygon aPoly( rObjRect ); + static sal_Int32 nCurGradientId = 1; -NMSP_RTL::OUString SVGAttributeWriter::GetFontStyle( const Font& rFont ) -{ - FastString aStyle; + aPoly.Rotate( aObjRectCenter, nAngle ); + Rectangle aRect( aPoly.GetBoundRect() ); - // font family - aStyle += B2UCONST( "font-family:" ); - aStyle += mrFontExport.GetMappedFontName( rFont.GetName() ); + // adjust start/end colors with intensities + aStartColor.SetRed( (BYTE)( (long) aStartColor.GetRed() * rGradient.GetStartIntensity() ) / 100 ); + aStartColor.SetGreen( (BYTE)( (long) aStartColor.GetGreen() * rGradient.GetStartIntensity() ) / 100 ); + aStartColor.SetBlue( (BYTE)( (long) aStartColor.GetBlue() * rGradient.GetStartIntensity() ) / 100 ); - // font size - aStyle += B2UCONST( ";" ); - aStyle += B2UCONST( "font-size:" ); - aStyle += SVGActionWriter::GetValueString( rFont.GetHeight() ); + aEndColor.SetRed( (BYTE)( (long) aEndColor.GetRed() * rGradient.GetEndIntensity() ) / 100 ); + aEndColor.SetGreen( (BYTE)( (long) aEndColor.GetGreen() * rGradient.GetEndIntensity() ) / 100 ); + aEndColor.SetBlue( (BYTE)( (long) aEndColor.GetBlue() * rGradient.GetEndIntensity() ) / 100 ); - // font style -/* - if( rFont.GetItalic() != ITALIC_NONE ) - { - aStyle += B2UCONST( ";" ); - aStyle += B2UCONST( "font-style:" ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrId, + ( rGradientId = B2UCONST( "Gradient_" ) ) += ::rtl::OUString::valueOf( nCurGradientId++ ) ); - if( rFont.GetItalic() == ITALIC_OBLIQUE ) - aStyle += B2UCONST( "oblique" ); - else - aStyle += B2UCONST( "italic" ); - } -*/ + { + ::std::auto_ptr< SvXMLElementExport > apGradient; + ::rtl::OUString aColorStr; - // font weight - sal_Int32 nFontWeight; + if( rGradient.GetStyle() == GRADIENT_LINEAR || rGradient.GetStyle() == GRADIENT_AXIAL ) + { + Polygon aLinePoly( 2 ); - switch( rFont.GetWeight() ) - { - case WEIGHT_THIN: nFontWeight = 100; break; - case WEIGHT_ULTRALIGHT: nFontWeight = 200; break; - case WEIGHT_LIGHT: nFontWeight = 300; break; - case WEIGHT_SEMILIGHT: nFontWeight = 400; break; - case WEIGHT_NORMAL: nFontWeight = 400; break; - case WEIGHT_MEDIUM: nFontWeight = 500; break; - case WEIGHT_SEMIBOLD: nFontWeight = 600; break; - case WEIGHT_BOLD: nFontWeight = 700; break; - case WEIGHT_ULTRABOLD: nFontWeight = 800; break; - case WEIGHT_BLACK: nFontWeight = 900; break; - default: nFontWeight = 400; break; - } + aLinePoly[ 0 ] = Point( aObjRectCenter.X(), aRect.Top() ); + aLinePoly[ 1 ] = Point( aObjRectCenter.X(), aRect.Bottom() ); - aStyle += B2UCONST( ";" ); - aStyle += B2UCONST( "font-weight:" ); - aStyle += NMSP_RTL::OUString::valueOf( nFontWeight ); + aLinePoly.Rotate( aObjRectCenter, nAngle ); - // !!! - // font-variant - // font-stretch - // font-size-adjust + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrGradientUnits, B2UCONST( "userSpaceOnUse" ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX1, ::rtl::OUString::valueOf( aLinePoly[ 0 ].X() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY1, ::rtl::OUString::valueOf( aLinePoly[ 0 ].Y() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX2, ::rtl::OUString::valueOf( aLinePoly[ 1 ].X() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY2, ::rtl::OUString::valueOf( aLinePoly[ 1 ].Y() ) ); -#ifdef _SVG_USE_NATIVE_TEXTDECORATION + apGradient.reset( new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemLinearGradient, true, true ) ); - if( rFont.GetUnderline() != UNDERLINE_NONE || rFont.GetStrikeout() != STRIKEOUT_NONE ) - { - aStyle += B2UCONST( ";" ); - aStyle += B2UCONST( "text-decoration:" ); + // write stop values + double fBorder = static_cast< double >( rGradient.GetBorder() ) * + ( ( rGradient.GetStyle() == GRADIENT_AXIAL ) ? 0.005 : 0.01 ); - if( rFont.GetUnderline() != UNDERLINE_NONE ) - aStyle += B2UCONST( " underline" ); + ImplGetColorStr( ( rGradient.GetStyle() == GRADIENT_AXIAL ) ? aEndColor : aStartColor, aColorStr ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrOffset, ::rtl::OUString::valueOf( fBorder ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStopColor, aColorStr ); - if( rFont.GetStrikeout() != STRIKEOUT_NONE ) - aStyle += B2UCONST( " line-through" ); - } + { + SvXMLElementExport aDesc2( mrExport, XML_NAMESPACE_NONE, aXMLElemStop, true, true ); + } -#endif // _SVG_USE_NATIVE_TEXTDECORATION + if( rGradient.GetStyle() == GRADIENT_AXIAL ) + { + ImplGetColorStr( aStartColor, aColorStr ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrOffset, ::rtl::OUString::valueOf( 0.5 ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStopColor, aColorStr ); - return aStyle.GetString(); -} + { + SvXMLElementExport aDesc3( mrExport, XML_NAMESPACE_NONE, aXMLElemStop, true, true ); + } + } -// ----------------------------------------------------------------------------- + if( rGradient.GetStyle() != GRADIENT_AXIAL ) + fBorder = 0.0; -NMSP_RTL::OUString SVGAttributeWriter::GetPaintStyle( const Color& rLineColor, const Color& rFillColor, const LineInfo* pLineInfo ) -{ - FastString aStyle; + ImplGetColorStr( aEndColor, aColorStr ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrOffset, ::rtl::OUString::valueOf( ImplRound( 1.0 - fBorder ) ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStopColor, aColorStr ); - // line color - aStyle += B2UCONST( "stroke:" ); + { + SvXMLElementExport aDesc4( mrExport, XML_NAMESPACE_NONE, aXMLElemStop, true, true ); + } + } + else + { + const double fCenterX = rObjRect.Left() + rObjRect.GetWidth() * rGradient.GetOfsX() * 0.01; + const double fCenterY = rObjRect.Top() + rObjRect.GetHeight() * rGradient.GetOfsY() * 0.01; + const double fRadius = sqrt( static_cast< double >( rObjRect.GetWidth() ) * rObjRect.GetWidth() + + rObjRect.GetHeight() * rObjRect.GetHeight() ) * 0.5; - if( rLineColor.GetTransparency() == 255 ) - aStyle += B2UCONST( "none" ); - else - { - // line color value in rgb - aStyle += B2UCONST( "rgb(" ); - aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) rLineColor.GetRed() ); - aStyle += B2UCONST( "," ); - aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) rLineColor.GetGreen() ); - aStyle += B2UCONST( "," ); - aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) rLineColor.GetBlue() ); - aStyle += B2UCONST( ")" ); - - // line color opacity in percent if neccessary - if( rLineColor.GetTransparency() ) - { - aStyle += B2UCONST( ";" ); - aStyle += B2UCONST( "stroke-opacity:" ); - aStyle += NMSP_RTL::OUString::valueOf( ( 255 - (double) rLineColor.GetTransparency() ) / 255.0 ); - } + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrGradientUnits, B2UCONST( "userSpaceOnUse" ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrCX, ::rtl::OUString::valueOf( ImplRound( fCenterX ) ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrCY, ::rtl::OUString::valueOf( ImplRound( fCenterY ) ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrR, ::rtl::OUString::valueOf( ImplRound( fRadius ) ) ); - if(pLineInfo) - { - // more infos for line needed - if(pLineInfo->GetWidth() > 1) - { - aStyle += B2UCONST( ";" ); - aStyle += B2UCONST( "stroke-width:" ); - aStyle += NMSP_RTL::OUString::valueOf(pLineInfo->GetWidth()); - } + apGradient.reset( new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemRadialGradient, true, true ) ); - if(LINE_DASH == pLineInfo->GetStyle()) - { - aStyle += B2UCONST( ";" ); - aStyle += B2UCONST( "stroke-dasharray:" ); - const long nDashLen(pLineInfo->GetDashLen()); - const long nDotLen(pLineInfo->GetDotLen()); - const long nDistance(pLineInfo->GetDistance()); - bool bIsFirst(true); - - for(sal_uInt16 a(0); a < pLineInfo->GetDashCount(); a++) - { - if(bIsFirst) - aStyle += B2UCONST(" "), bIsFirst = false; - else - aStyle += B2UCONST(","); - aStyle += NMSP_RTL::OUString::valueOf(nDashLen); - aStyle += B2UCONST(","); - aStyle += NMSP_RTL::OUString::valueOf(nDistance); - } + // write stop values + ImplGetColorStr( aEndColor, aColorStr ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrOffset, ::rtl::OUString::valueOf( 0.0 ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStopColor, aColorStr ); - for(sal_uInt16 b(0); b < pLineInfo->GetDotCount(); b++) { - if(bIsFirst) - aStyle += B2UCONST(" "), bIsFirst = false; - else - aStyle += B2UCONST(","); - aStyle += NMSP_RTL::OUString::valueOf(nDotLen); - aStyle += B2UCONST(","); - aStyle += NMSP_RTL::OUString::valueOf(nDistance); + SvXMLElementExport aDesc5( mrExport, XML_NAMESPACE_NONE, aXMLElemStop, true, true ); } - } - if(basegfx::B2DLINEJOIN_MITER != pLineInfo->GetLineJoin()) - { - aStyle += B2UCONST( ";" ); - aStyle += B2UCONST( "stroke-linejoin:" ); + ImplGetColorStr( aStartColor, aColorStr ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrOffset, + ::rtl::OUString::valueOf( ImplRound( 1.0 - rGradient.GetBorder() * 0.01 ) ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStopColor, aColorStr ); - switch(pLineInfo->GetLineJoin()) { - default: // B2DLINEJOIN_NONE, B2DLINEJOIN_MIDDLE, B2DLINEJOIN_MITER - aStyle += B2UCONST( "miter" ); - break; - case basegfx::B2DLINEJOIN_ROUND: - aStyle += B2UCONST( "round" ); - break; - case basegfx::B2DLINEJOIN_BEVEL: - aStyle += B2UCONST( "bevel" ); - break; + SvXMLElementExport aDesc6( mrExport, XML_NAMESPACE_NONE, aXMLElemStop, true, true ); } } } } - - // fill color - aStyle += B2UCONST( ";" ); - aStyle += B2UCONST( "fill:" ); - - if( rFillColor.GetTransparency() == 255 ) - aStyle += B2UCONST( "none" ); else - { - // fill color value in rgb - aStyle += B2UCONST( "rgb(" ); - aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) rFillColor.GetRed() ); - aStyle += B2UCONST( "," ); - aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) rFillColor.GetGreen() ); - aStyle += B2UCONST( "," ); - aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) rFillColor.GetBlue() ); - aStyle += B2UCONST( ")" ); - - // fill color opacity in percent if neccessary - if( rFillColor.GetTransparency() ) - { - aStyle += B2UCONST( ";" ); - aStyle += B2UCONST( "fill-opacity:" ); - aStyle += NMSP_RTL::OUString::valueOf( ( 255 - (double) rFillColor.GetTransparency() ) / 255.0 ); - } - } - - return aStyle.GetString(); + rGradientId = ::rtl::OUString(); } // ----------------------------------------------------------------------------- @@ -453,22 +322,67 @@ void SVGAttributeWriter::SetFontAttr( const Font& rFont ) { if( !mpElemFont || ( rFont != maCurFont ) ) { + ::rtl::OUString aFontStyle, aFontWeight, aTextDecoration; + sal_Int32 nFontWeight; + delete mpElemPaint, mpElemPaint = NULL; delete mpElemFont; - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, GetFontStyle( maCurFont = rFont ) ); - mpElemFont = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ); - } -} + maCurFont = rFont; -// ----------------------------------------------------------------------------- + // Font Family + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrFontFamily, mrFontExport.GetMappedFontName( rFont.GetName() ) ); -void SVGAttributeWriter::SetPaintAttr( const Color& rLineColor, const Color& rFillColor, const LineInfo* pLineInfo ) -{ - if( !mpElemPaint || ( rLineColor != maCurLineColor ) || ( rFillColor != maCurFillColor ) ) - { - delete mpElemPaint; - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, GetPaintStyle( maCurLineColor = rLineColor, maCurFillColor = rFillColor, pLineInfo ) ); - mpElemPaint = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ); + // Font Size + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrFontSize, ::rtl::OUString::valueOf( rFont.GetHeight() ) ); + + // Font Style + if( rFont.GetItalic() != ITALIC_NONE ) + { + if( rFont.GetItalic() == ITALIC_OBLIQUE ) + aFontStyle = B2UCONST( "oblique" ); + else + aFontStyle = B2UCONST( "italic" ); + } + else + aFontStyle = B2UCONST( "normal" ); + + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrFontStyle, aFontStyle ); + + // Font Weight + switch( rFont.GetWeight() ) + { + case WEIGHT_THIN: nFontWeight = 100; break; + case WEIGHT_ULTRALIGHT: nFontWeight = 200; break; + case WEIGHT_LIGHT: nFontWeight = 300; break; + case WEIGHT_SEMILIGHT: nFontWeight = 400; break; + case WEIGHT_NORMAL: nFontWeight = 400; break; + case WEIGHT_MEDIUM: nFontWeight = 500; break; + case WEIGHT_SEMIBOLD: nFontWeight = 600; break; + case WEIGHT_BOLD: nFontWeight = 700; break; + case WEIGHT_ULTRABOLD: nFontWeight = 800; break; + case WEIGHT_BLACK: nFontWeight = 900; break; + default: nFontWeight = 400; break; + } + + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrFontWeight, ::rtl::OUString::valueOf( nFontWeight ) ); + + if( mrExport.IsUseNativeTextDecoration() ) + { + if( rFont.GetUnderline() != UNDERLINE_NONE || rFont.GetStrikeout() != STRIKEOUT_NONE ) + { + if( rFont.GetUnderline() != UNDERLINE_NONE ) + aTextDecoration = B2UCONST( "underline " ); + + if( rFont.GetStrikeout() != STRIKEOUT_NONE ) + aTextDecoration += B2UCONST( "line-through " ); + } + else + aTextDecoration = B2UCONST( "none" ); + + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrTextDecoration, aTextDecoration ); + } + + mpElemFont = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, true, true ); } } @@ -476,12 +390,12 @@ void SVGAttributeWriter::SetPaintAttr( const Color& rLineColor, const Color& rFi // - SVGActionWriter - // ------------------- -SVGActionWriter::SVGActionWriter( SvXMLExport& rExport, SVGFontExport& rFontExport ) : +SVGActionWriter::SVGActionWriter( SVGExport& rExport, SVGFontExport& rFontExport ) : mrExport( rExport ), mrFontExport( rFontExport ), mpContext( NULL ), - mbClipAttrChanged( sal_False ), - mnCurClipId( 1 ) + mnInnerMtfCount( 0 ), + mbClipAttrChanged( sal_False ) { mpVDev = new VirtualDevice; mpVDev->EnableOutput( sal_False ); @@ -500,80 +414,75 @@ SVGActionWriter::~SVGActionWriter() long SVGActionWriter::ImplMap( sal_Int32 nVal ) const { - return ImplMap( Size( nVal, nVal ) ).Width(); + Size aSz( nVal, nVal ); + + return( ImplMap( aSz, aSz ).Width() ); } // ----------------------------------------------------------------------------- -Point SVGActionWriter::ImplMap( const Point& rPt ) const +Point& SVGActionWriter::ImplMap( const Point& rPt, Point& rDstPt ) const { - return mpVDev->LogicToLogic( rPt, mpVDev->GetMapMode(), maTargetMapMode ); + return( rDstPt = mpVDev->LogicToLogic( rPt, mpVDev->GetMapMode(), maTargetMapMode ) ); } // ----------------------------------------------------------------------------- -Size SVGActionWriter::ImplMap( const Size& rSz ) const +Size& SVGActionWriter::ImplMap( const Size& rSz, Size& rDstSz ) const { - return mpVDev->LogicToLogic( rSz, mpVDev->GetMapMode(), maTargetMapMode ); + return( rDstSz = mpVDev->LogicToLogic( rSz, mpVDev->GetMapMode(), maTargetMapMode ) ); } // ----------------------------------------------------------------------------- -LineInfo SVGActionWriter::ImplMap( const LineInfo& rLineInfo ) const +Rectangle& SVGActionWriter::ImplMap( const Rectangle& rRect, Rectangle& rDstRect ) const { - LineInfo aInfo(rLineInfo); - long aTemp(0); + Point aTL( rRect.TopLeft() ); + Size aSz( rRect.GetSize() ); - if(aInfo.GetStyle() == LINE_DASH) - { - if(aInfo.GetDotCount() && aInfo.GetDotLen()) - { - aTemp = aInfo.GetDotLen(); - mpVDev->LogicToLogic(&aTemp, 1, &mpVDev->GetMapMode(), &maTargetMapMode); - aInfo.SetDotLen(Max(aTemp, 1L)); - } - else - aInfo.SetDotCount(0); + return( rDstRect = Rectangle( ImplMap( aTL, aTL ), ImplMap( aSz, aSz ) ) ); +} - if(aInfo.GetDashCount() && aInfo.GetDashLen()) - { - aTemp = aInfo.GetDashLen(); - mpVDev->LogicToLogic(&aTemp, 1, &mpVDev->GetMapMode(), &maTargetMapMode); - aInfo.SetDashLen(Max(aTemp, 1L)); - } - else - aInfo.SetDashCount(0); - aTemp = aInfo.GetDistance(); - mpVDev->LogicToLogic(&aTemp, 1, &mpVDev->GetMapMode(), &maTargetMapMode); - aInfo.SetDistance(aTemp); +// ----------------------------------------------------------------------------- - if((!aInfo.GetDashCount() && !aInfo.GetDotCount()) || !aInfo.GetDistance()) - aInfo.SetStyle(LINE_SOLID); - } +Polygon& SVGActionWriter::ImplMap( const Polygon& rPoly, Polygon& rDstPoly ) const +{ + rDstPoly = Polygon( rPoly.GetSize() ); - aTemp = aInfo.GetWidth(); - mpVDev->LogicToLogic(&aTemp, 1, &mpVDev->GetMapMode(), &maTargetMapMode); - aInfo.SetWidth(aTemp); + for( sal_uInt16 i = 0, nSize = rPoly.GetSize(); i < nSize; ++i ) + { + ImplMap( rPoly[ i ], rDstPoly[ i ] ); + rDstPoly.SetFlags( i, rPoly.GetFlags( i ) ); + } - return aInfo; + return( rDstPoly ); } // ----------------------------------------------------------------------------- -NMSP_RTL::OUString SVGActionWriter::GetValueString( sal_Int32 nVal ) +PolyPolygon& SVGActionWriter::ImplMap( const PolyPolygon& rPolyPoly, PolyPolygon& rDstPolyPoly ) const { - return ::rtl::OUString::valueOf( nVal ); + Polygon aPoly; + + rDstPolyPoly = PolyPolygon(); + + for( USHORT i = 0, nCount = rPolyPoly.Count(); i < nCount; ++i ) + { + rDstPolyPoly.Insert( ImplMap( rPolyPoly[ i ], aPoly ) ); + } + + return( rDstPolyPoly ); } // ----------------------------------------------------------------------------- -NMSP_RTL::OUString SVGActionWriter::GetPathString( const PolyPolygon& rPolyPoly, sal_Bool bLine ) +::rtl::OUString SVGActionWriter::GetPathString( const PolyPolygon& rPolyPoly, sal_Bool bLine ) { - FastString aPathData; - const NMSP_RTL::OUString aBlank( B2UCONST( " " ) ); - const NMSP_RTL::OUString aComma( B2UCONST( "," ) ); - Point aPolyPoint; + ::rtl::OUString aPathData; + const ::rtl::OUString aBlank( B2UCONST( " " ) ); + const ::rtl::OUString aComma( B2UCONST( "," ) ); + Point aPolyPoint; for( long i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ ) { @@ -583,14 +492,16 @@ NMSP_RTL::OUString SVGActionWriter::GetPathString( const PolyPolygon& rPolyPoly if( nSize > 1 ) { aPathData += B2UCONST( "M " ); - aPathData += GetValueString( ( aPolyPoint = rPoly[ 0 ] ).X() ); + aPathData += ::rtl::OUString::valueOf( ( aPolyPoint = rPoly[ 0 ] ).X() ); aPathData += aComma; - aPathData += GetValueString( aPolyPoint.Y() ); + aPathData += ::rtl::OUString::valueOf( aPolyPoint.Y() ); + sal_Char nCurrentMode = 0; while( n < nSize ) { aPathData += aBlank; + if ( ( rPoly.GetFlags( n ) == POLY_CONTROL ) && ( ( n + 2 ) < nSize ) ) { if ( nCurrentMode != 'C' ) @@ -602,9 +513,9 @@ NMSP_RTL::OUString SVGActionWriter::GetPathString( const PolyPolygon& rPolyPoly { if ( j ) aPathData += aBlank; - aPathData += GetValueString( ( aPolyPoint = rPoly[ n++ ] ).X() ); + aPathData += ::rtl::OUString::valueOf( ( aPolyPoint = rPoly[ n++ ] ).X() ); aPathData += aComma; - aPathData += GetValueString( aPolyPoint.Y() ); + aPathData += ::rtl::OUString::valueOf( aPolyPoint.Y() ); } } else @@ -614,9 +525,9 @@ NMSP_RTL::OUString SVGActionWriter::GetPathString( const PolyPolygon& rPolyPoly nCurrentMode = 'L'; aPathData += B2UCONST( "L " ); } - aPathData += GetValueString( ( aPolyPoint = rPoly[ n++ ] ).X() ); + aPathData += ::rtl::OUString::valueOf( ( aPolyPoint = rPoly[ n++ ] ).X() ); aPathData += aComma; - aPathData += GetValueString( aPolyPoint.Y() ); + aPathData += ::rtl::OUString::valueOf( aPolyPoint.Y() ); } } @@ -628,25 +539,31 @@ NMSP_RTL::OUString SVGActionWriter::GetPathString( const PolyPolygon& rPolyPoly } } - return aPathData.GetString(); + return aPathData; } // ----------------------------------------------------------------------------- -void SVGActionWriter::ImplWriteLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor, - const NMSP_RTL::OUString* pStyle ) +void SVGActionWriter::ImplWriteLine( const Point& rPt1, const Point& rPt2, + const Color* pLineColor, bool bApplyMapping ) { - const Point aPt1( ImplMap( rPt1 ) ); - const Point aPt2( ImplMap( rPt2 ) ); + Point aPt1, aPt2; - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX1, GetValueString( aPt1.X() ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY1, GetValueString( aPt1.Y() ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX2, GetValueString( aPt2.X() ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY2, GetValueString( aPt2.Y() ) ); + if( bApplyMapping ) + { + ImplMap( rPt1, aPt1 ); + ImplMap( rPt2, aPt2 ); + } + else + { + aPt1 = rPt1; + aPt2 = rPt2; + } - // add additional style if requested - if( pStyle ) - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, *pStyle ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX1, ::rtl::OUString::valueOf( aPt1.X() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY1, ::rtl::OUString::valueOf( aPt1.Y() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX2, ::rtl::OUString::valueOf( aPt2.X() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY2, ::rtl::OUString::valueOf( aPt2.Y() ) ); if( pLineColor ) { @@ -655,306 +572,258 @@ void SVGActionWriter::ImplWriteLine( const Point& rPt1, const Point& rPt2, const } { - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemLine, TRUE, TRUE ); + SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemLine, true, true ); } } // ----------------------------------------------------------------------------- void SVGActionWriter::ImplWriteRect( const Rectangle& rRect, long nRadX, long nRadY, - const NMSP_RTL::OUString* pStyle ) + bool bApplyMapping ) { - const Rectangle aRect( ImplMap( rRect ) ); + Rectangle aRect; + + if( bApplyMapping ) + ImplMap( rRect, aRect ); + else + aRect = rRect; - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, GetValueString( aRect.Left() ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, GetValueString( aRect.Top() ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrWidth, GetValueString( aRect.GetWidth() ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrHeight, GetValueString( aRect.GetHeight() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, ::rtl::OUString::valueOf( aRect.Left() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, ::rtl::OUString::valueOf( aRect.Top() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrWidth, ::rtl::OUString::valueOf( aRect.GetWidth() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrHeight, ::rtl::OUString::valueOf( aRect.GetHeight() ) ); if( nRadX ) - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRX, GetValueString( ImplMap( nRadX ) ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRX, ::rtl::OUString::valueOf( bApplyMapping ? ImplMap( nRadX ) : nRadX ) ); if( nRadY ) - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRY, GetValueString( ImplMap( nRadY ) ) ); - - // add additional style if requested - if( pStyle ) - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, *pStyle ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRY, ::rtl::OUString::valueOf( bApplyMapping ? ImplMap( nRadY ) : nRadY ) ); { - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemRect, TRUE, TRUE ); + SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemRect, true, true ); } } // ----------------------------------------------------------------------------- void SVGActionWriter::ImplWriteEllipse( const Point& rCenter, long nRadX, long nRadY, - const NMSP_RTL::OUString* pStyle ) + bool bApplyMapping ) { - const Point aCenter( ImplMap( rCenter ) ); + Point aCenter; - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrCX, GetValueString( aCenter.X() ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrCY, GetValueString( aCenter.Y() ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRX, GetValueString( ImplMap( nRadX ) ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRY, GetValueString( ImplMap( nRadY ) ) ); + if( bApplyMapping ) + ImplMap( rCenter, aCenter ); + else + aCenter = rCenter; - // add additional style if requested - if( pStyle ) - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, *pStyle ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrCX, ::rtl::OUString::valueOf( aCenter.X() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrCY, ::rtl::OUString::valueOf( aCenter.Y() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRX, ::rtl::OUString::valueOf( bApplyMapping ? ImplMap( nRadX ) : nRadX ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRY, ::rtl::OUString::valueOf( bApplyMapping ? ImplMap( nRadY ) : nRadY ) ); { - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemEllipse, TRUE, TRUE ); + SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemEllipse, true, true ); } } // ----------------------------------------------------------------------------- void SVGActionWriter::ImplWritePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bool bLineOnly, - const NMSP_RTL::OUString* pStyle ) + bool bApplyMapping ) { - if( rPolyPoly.Count() ) - { - PolyPolygon aMappedPolyPoly; - FastString aStyle; - - for( USHORT i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ ) - { - const Polygon& rPoly = rPolyPoly[ i ]; - const USHORT nSize = rPoly.GetSize(); + PolyPolygon aPolyPoly; - // #i102224# congratulations, this throws away the curve flags - // and makes ANY curved polygon look bad. The Flags HAVE to be - // copied, too. It's NOT enough to copy the mapped points. Just - // copy the original polygon completely and REPLACE the points - - // old: Polygon aMappedPoly( nSize ); - // new: - Polygon aMappedPoly(rPoly); - - for( USHORT n = 0; n < nSize; n++ ) - aMappedPoly[ n ] = ImplMap( rPoly[ n ] ); + if( bApplyMapping ) + ImplMap( rPolyPoly, aPolyPoly ); + else + aPolyPoly = rPolyPoly; - aMappedPolyPoly.Insert( aMappedPoly ); - } + if( mrExport.hasClip() ) + { + const ::basegfx::B2DPolyPolygon aB2DPolyPoly( ::basegfx::tools::correctOrientations( aPolyPoly.getB2DPolyPolygon() ) ); - if( bLineOnly ) - { - aStyle += B2UCONST( "fill:none" ); - if( pStyle ) - aStyle += B2UCONST( ";" ); - } - if( pStyle ) - aStyle += *pStyle; + aPolyPoly = PolyPolygon( ::basegfx::tools::clipPolyPolygonOnPolyPolygon( + *mrExport.getCurClip(), aB2DPolyPoly, false, false ) ); + } - // add style attribute - if( aStyle.GetLength() ) - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, aStyle.GetString() ); + // add path data attribute + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrD, GetPathString( aPolyPoly, bLineOnly ) ); - // add path data attribute - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrD, GetPathString( aMappedPolyPoly, bLineOnly ) ); - { - // write polyline/polygon element - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemPath, TRUE, TRUE ); - } + { + // write polyline/polygon element + SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemPath, true, true ); } } // ----------------------------------------------------------------------------- -void SVGActionWriter::ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const Gradient& rGradient, - const NMSP_RTL::OUString* pStyle, sal_uInt32 nWriteFlags ) +void SVGActionWriter::ImplWriteShape( const SVGShapeDescriptor& rShape, bool bApplyMapping ) { - if( rPolyPoly.Count() ) - { - SvXMLElementExport aElemG( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ); - FastString aClipId; - FastString aClipStyle; + PolyPolygon aPolyPoly; - aClipId += B2UCONST( "clip" ); - aClipId += NMSP_RTL::OUString::valueOf( ImplGetNextClipId() ); + if( bApplyMapping ) + ImplMap( rShape.maShapePolyPoly, aPolyPoly ); + else + aPolyPoly = rShape.maShapePolyPoly; - { - SvXMLElementExport aElemDefs( mrExport, XML_NAMESPACE_NONE, aXMLElemDefs, TRUE, TRUE ); + const bool bLineOnly = ( rShape.maShapeFillColor == Color( COL_TRANSPARENT ) ) && ( !rShape.mapShapeGradient.get() ); + Rectangle aBoundRect( aPolyPoly.GetBoundRect() ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrId, aClipId.GetString() ); + mpContext->AddPaintAttr( rShape.maShapeLineColor, rShape.maShapeFillColor, &aBoundRect, rShape.mapShapeGradient.get() ); - { - SvXMLElementExport aElemClipPath( mrExport, XML_NAMESPACE_NONE, aXMLElemClipPath, TRUE, TRUE ); - ImplWritePolyPolygon( rPolyPoly, sal_False ); - } - } + if( rShape.maId.getLength() ) + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrId, rShape.maId ); - // create new context with clippath set - aClipStyle += B2UCONST( "clip-path:URL(#" ); - aClipStyle += aClipId.GetString(); - aClipStyle += B2UCONST( ")" ); + if( rShape.mnStrokeWidth ) + { + sal_Int32 nStrokeWidth = ( bApplyMapping ? ImplMap( rShape.mnStrokeWidth ) : rShape.mnStrokeWidth ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStrokeWidth, ::rtl::OUString::valueOf( nStrokeWidth ) ); + } - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, aClipStyle.GetString() ); + if( rShape.maDashArray.size() ) + { + const ::rtl::OUString aComma( B2UCONST( "," ) ); + ::rtl::OUString aDashArrayStr; + for( unsigned int k = 0; k < rShape.maDashArray.size(); ++k ) { - GDIMetaFile aTmpMtf; - SvXMLElementExport aElemG2( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ); + const sal_Int32 nDash = ( bApplyMapping ? + ImplMap( FRound( rShape.maDashArray[ k ] ) ) : + FRound( rShape.maDashArray[ k ] ) ); - mpVDev->AddGradientActions( rPolyPoly.GetBoundRect(), rGradient, aTmpMtf ); - ImplWriteActions( aTmpMtf, pStyle, nWriteFlags ); + if( k ) + aDashArrayStr += aComma; + + aDashArrayStr += ::rtl::OUString::valueOf( nDash ); } + + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStrokeDashArray, aDashArrayStr ); } + + ImplWritePolyPolygon( aPolyPoly, bLineOnly, false ); } // ----------------------------------------------------------------------------- -void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, - const sal_Int32* pDXArray, long nWidth, - const NMSP_RTL::OUString* pStyle ) +void SVGActionWriter::ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const Gradient& rGradient, + sal_uInt32 nWriteFlags, bool bApplyMapping ) { - long nLen = rText.Len(), i; + PolyPolygon aPolyPoly; - if( nLen ) - { - Size aNormSize; - sal_Int32* pOwnArray; - sal_Int32* pDX; - - // get text sizes - if( pDXArray ) - { - pOwnArray = NULL; - aNormSize = Size( mpVDev->GetTextWidth( rText ), 0 ); - pDX = (sal_Int32*) pDXArray; - } - else - { - pOwnArray = new sal_Int32[ nLen ]; - aNormSize = Size( mpVDev->GetTextArray( rText, pOwnArray ), 0 ); - pDX = pOwnArray; - } - - if( nLen > 1 ) - { - aNormSize.Width() = pDX[ nLen - 2 ] + mpVDev->GetTextWidth( rText.GetChar( sal::static_int_cast( nLen - 1 ) ) ); + if( bApplyMapping ) + ImplMap( rPolyPoly, aPolyPoly ); + else + aPolyPoly = rPolyPoly; - if( nWidth && aNormSize.Width() && ( nWidth != aNormSize.Width() ) ) - { - const double fFactor = (double) nWidth / aNormSize.Width(); + if( rGradient.GetStyle() == GRADIENT_LINEAR || rGradient.GetStyle() == GRADIENT_AXIAL || + rGradient.GetStyle() == GRADIENT_RADIAL || rGradient.GetStyle() == GRADIENT_ELLIPTICAL ) + { + SVGShapeDescriptor aShapeDesc; - for( i = 0; i < ( nLen - 1 ); i++ ) - pDX[ i ] = FRound( pDX[ i ] * fFactor ); - } - } + aShapeDesc.maShapePolyPoly = aPolyPoly; + aShapeDesc.mapShapeGradient.reset( new Gradient( rGradient ) ); - FastString aStyle; - const Font& rFont = mpVDev->GetFont(); - const FontMetric aMetric( mpVDev->GetFontMetric() ); - Point aBaseLinePos( rPos ); - SvXMLElementExport* pTransform = NULL; + ImplWriteShape( aShapeDesc, false ); + } + else + { + GDIMetaFile aTmpMtf; - // always adjust text position to match baseline alignment - switch( rFont.GetAlign() ) - { - case( ALIGN_TOP ): - aBaseLinePos.Y() += aMetric.GetAscent(); - break; + mrExport.pushClip( aPolyPoly.getB2DPolyPolygon() ); + mpVDev->AddGradientActions( rPolyPoly.GetBoundRect(), rGradient, aTmpMtf ); + ++mnInnerMtfCount; - case( ALIGN_BOTTOM ): - aBaseLinePos.Y() -= aMetric.GetDescent(); - break; + ImplWriteActions( aTmpMtf, nWriteFlags, NULL ); - default: - break; - } + --mnInnerMtfCount; + mrExport.popClip(); + } +} - // get mapped text position - const Point aPt( ImplMap( aBaseLinePos ) ); +// ----------------------------------------------------------------------------- - // if text is italic, set transform at new g element - if( ( rFont.GetItalic() != ITALIC_NONE ) || rFont.GetOrientation() ) - { - String aTransform; +void SVGActionWriter::ImplWriteText( const Point& /*rPos*/, const String& /*rText*/, + const sal_Int32* /*pDXArray*/, long /*nWidth*/, + bool /*bApplyMapping*/ ) +{ +/* !!! TODO KA + long nLen = rText.Len(), i; - aTransform = NMSP_RTL::OUString::createFromAscii( "translate" ); - aTransform += '('; - aTransform += String( GetValueString( aPt.X() ) ); - aTransform += ','; - aTransform += String( GetValueString( aPt.Y() ) ); - aTransform += ')'; + Size aNormSize; + sal_Int32* pOwnArray; + sal_Int32* pDX; - if( rFont.GetOrientation() ) - { - aTransform += String( NMSP_RTL::OUString::createFromAscii( " rotate" ) ); - aTransform += '('; - aTransform += String( NMSP_RTL::OUString::valueOf( rFont.GetOrientation() * -0.1 ) ); - aTransform += ')'; - } + // get text sizes + if( pDXArray ) + { + pOwnArray = NULL; + aNormSize = Size( mpVDev->GetTextWidth( rText ), 0 ); + pDX = (sal_Int32*) pDXArray; + } + else + { + pOwnArray = new sal_Int32[ nLen ]; + aNormSize = Size( mpVDev->GetTextArray( rText, pOwnArray ), 0 ); + pDX = pOwnArray; + } - if( rFont.GetItalic() != ITALIC_NONE ) - { - aTransform += String( NMSP_RTL::OUString::createFromAscii( " skewX" ) ); - aTransform += '('; - aTransform += String( NMSP_RTL::OUString::valueOf( (sal_Int32) -10 ) ); - aTransform += ')'; - } + if( nLen > 1 ) + { + aNormSize.Width() = pDX[ nLen - 2 ] + mpVDev->GetTextWidth( rText.GetChar( nLen - 1 ) ); - aTransform += String( NMSP_RTL::OUString::createFromAscii( " translate" ) ); - aTransform += '('; - aTransform += String( GetValueString( -aPt.X() ) ); - aTransform += ','; - aTransform += String( GetValueString( -aPt.Y() ) ); - aTransform += ')'; + if( nWidth && aNormSize.Width() && ( nWidth != aNormSize.Width() ) ) + { + const double fFactor = (double) nWidth / aNormSize.Width(); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrTransform, aTransform ); - pTransform = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ); + for( i = 0; i < ( nLen - 1 ); i++ ) + pDX[ i ] = FRound( pDX[ i ] * fFactor ); } - - // add additional style if requested - if( pStyle && pStyle->getLength() ) - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, *pStyle ); - - // write text element + else { -#ifdef _SVG_USE_TSPANS - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemText, TRUE, TRUE ); - FastString aTSpanX; - const NMSP_RTL::OUString aSpace( ' ' ); - String aOutputText( rText ); - long nCurPos = 0; - bool bIgnoreWhitespace = true; - - for( long j = 0, nX = aPt.X(); j < nLen; ++j ) + // write single glyphs at absolute text positions + while( bCont ) { - const sal_Unicode cCode = rText.GetChar( sal::static_int_cast( j ) ); + sal_Int32 nCount = 1; + + nLastPos = nCurPos; + nCurPos = xBI->nextCharacters( aBreakText, nCurPos, rLocale, + ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, + nCount, nCount ); + + nCount = nCurPos - nLastPos; + bCont = ( nCurPos < aBreakText.getLength() ) && nCount; - // don't take more than one whitespace into account - if( !bIgnoreWhitespace || ( ' ' != cCode ) ) + if( nCount ) { - aOutputText.SetChar( sal::static_int_cast( nCurPos++ ), cCode ); - ( aTSpanX += GetValueString( nX + ( ( j > 0 ) ? pDX[ j - 1 ] : 0 ) ) ) += aSpace; - bIgnoreWhitespace = ( ' ' == cCode ); - } - } + const String aGlyph( aBreakText.copy( nLastPos, nCount ) ); - if( nCurPos < nLen ) - aOutputText.Erase( sal::static_int_cast( nCurPos ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, ::rtl::OUString::valueOf( nX ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, ::rtl::OUString::valueOf( aPt.Y() ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, aTSpanX.GetString() ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, GetValueString( aPt.Y() ) ); + { + SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemText, true, false ); + mrExport.GetDocHandler()->characters( aGlyph ); + } - { - SvXMLElementExport aElem2( mrExport, XML_NAMESPACE_NONE, aXMLElemTSpan, TRUE, TRUE ); - mrExport.GetDocHandler()->characters( aOutputText ); + if( bCont ) + nX = aPt.X() + pDXArray[ nCurPos - 1 ]; + } } -#else - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, GetValueString( aPt.X() ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, GetValueString( aPt.Y() ) ); + } + } + else + { + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, ::rtl::OUString::valueOf( aPt.X() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, ::rtl::OUString::valueOf( aPt.Y() ) ); - { - SvXMLElementExport aElem2( mrExport, XML_NAMESPACE_NONE, aXMLElemText, TRUE, TRUE ); - mrExport.GetDocHandler()->characters( rText ); - } -#endif + { + SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemText, true, false ); + mrExport.GetDocHandler()->characters( rText ); } + } -#ifndef _SVG_USE_NATIVE_TEXTDECORATION - // write strikeout if neccessary + if( !mrExport.IsUseNativeTextDecoration() ) + { if( rFont.GetStrikeout() || rFont.GetUnderline() ) { Polygon aPoly( 4 ); @@ -984,11 +853,11 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, ImplWritePolyPolygon( aPoly, sal_False ); } } -#endif // _SVG_USE_NATIVE_TEXTDECORATION - - delete[] pOwnArray; - delete pTransform; } + + delete[] pOwnArray; + delete pTransform; +*/ } // ----------------------------------------------------------------------------- @@ -996,7 +865,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& rSrcPt, const Size& rSrcSz, - const NMSP_RTL::OUString* /* pStyle */ ) + bool bApplyMapping ) { if( !!rBmpEx ) { @@ -1014,56 +883,112 @@ void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx, if( GraphicConverter::Export( aOStm, rBmpEx, CVT_PNG ) == ERRCODE_NONE ) { - const Point aPt( ImplMap( rPt ) ); - const Size aSz( ImplMap( rSz ) ); - FastString aImageData( (sal_Char*) aOStm.GetData(), aOStm.Tell() ); + Point aPt; + Size aSz; + ::rtl::OUString aImageData( (sal_Char*) aOStm.GetData(), aOStm.Tell(), RTL_TEXTENCODING_ASCII_US ); REF( NMSP_SAX::XExtendedDocumentHandler ) xExtDocHandler( mrExport.GetDocHandler(), NMSP_UNO::UNO_QUERY ); + if( bApplyMapping ) + { + ImplMap( rPt, aPt ); + ImplMap( rSz, aSz ); + } + else + { + aPt = rPt; + aSz = rSz; + } + if( xExtDocHandler.is() ) { static const sal_uInt32 nPartLen = 64; - const NMSP_RTL::OUString aSpace( ' ' ); - const NMSP_RTL::OUString aLineFeed( NMSP_RTL::OUString::valueOf( (sal_Unicode) 0x0a ) ); - NMSP_RTL::OUString aString; - NMSP_RTL::OUString aImageString; + const ::rtl::OUString aSpace( ' ' ); + const ::rtl::OUString aLineFeed( ::rtl::OUString::valueOf( (sal_Unicode) 0x0a ) ); + ::rtl::OUString aString; aString = aLineFeed; aString += B2UCONST( "<" ); - aString += NMSP_RTL::OUString::createFromAscii( aXMLElemImage ); + aString += ::rtl::OUString::createFromAscii( aXMLElemImage ); aString += aSpace; - aString += NMSP_RTL::OUString::createFromAscii( aXMLAttrX ); + aString += ::rtl::OUString::createFromAscii( aXMLAttrX ); aString += B2UCONST( "=\"" ); - aString += GetValueString( aPt.X() ); + aString += ::rtl::OUString::valueOf( aPt.X() ); aString += B2UCONST( "\" " ); - aString += NMSP_RTL::OUString::createFromAscii( aXMLAttrY ); + aString += ::rtl::OUString::createFromAscii( aXMLAttrY ); aString += B2UCONST( "=\"" ); - aString += GetValueString( aPt.Y() ); + aString += ::rtl::OUString::valueOf( aPt.Y() ); aString += B2UCONST( "\" " ); - aString += NMSP_RTL::OUString::createFromAscii( aXMLAttrWidth ); + aString += ::rtl::OUString::createFromAscii( aXMLAttrWidth ); aString += B2UCONST( "=\"" ); - aString += GetValueString( aSz.Width() ); + aString += ::rtl::OUString::valueOf( aSz.Width() ); aString += B2UCONST( "\" " ); - aString += NMSP_RTL::OUString::createFromAscii( aXMLAttrHeight ); + aString += ::rtl::OUString::createFromAscii( aXMLAttrHeight ); aString += B2UCONST( "=\"" ); - aString += GetValueString( aSz.Height() ); + aString += ::rtl::OUString::valueOf( aSz.Height() ); aString += B2UCONST( "\" " ); - aString += NMSP_RTL::OUString::createFromAscii( aXMLAttrXLinkHRef ); + aString += ::rtl::OUString::createFromAscii( aXMLAttrXLinkHRef ); aString += B2UCONST( "=\"data:image/png;base64," ); - if( aImageData.GetFirstPartString( nPartLen, aImageString ) ) + xExtDocHandler->unknown( aString ); + + const sal_uInt32 nQuadCount = aImageData.getLength() / 3; + const sal_uInt32 nRest = aImageData.getLength() % 3; + + if( nQuadCount || nRest ) { - xExtDocHandler->unknown( aString += aImageString ); + sal_Int32 nBufLen = ( ( nQuadCount + ( nRest ? 1 : 0 ) ) << 2 ); + const sal_Unicode* pSrc = (const sal_Unicode*) aImageData; + sal_Unicode* pBuffer = new sal_Unicode[ nBufLen * sizeof( sal_Unicode ) ]; + sal_Unicode* pTmpDst = pBuffer; + + for( sal_uInt32 i = 0; i < nQuadCount; ++i ) + { + const sal_Int32 nA = *pSrc++; + const sal_Int32 nB = *pSrc++; + const sal_Int32 nC = *pSrc++; + + *pTmpDst++ = pBase64[ ( nA >> 2 ) & 0x3f ]; + *pTmpDst++ = pBase64[ ( ( nA << 4 ) & 0x30 ) + ( ( nB >> 4 ) & 0xf ) ]; + *pTmpDst++ = pBase64[ ( ( nB << 2 ) & 0x3c ) + ( ( nC >> 6 ) & 0x3 ) ]; + *pTmpDst++ = pBase64[ nC & 0x3f ]; + } - while( aImageData.GetNextPartString( nPartLen, aImageString ) ) + if( nRest ) { + const sal_Int32 nA = *pSrc++; + + *pTmpDst++ = pBase64[ ( nA >> 2 ) & 0x3f ]; + + if( 2 == nRest ) + { + const sal_Int32 nB = *pSrc; + + *pTmpDst++ = pBase64[ ( ( nA << 4 ) & 0x30 ) + ( ( nB >> 4 ) & 0xf ) ]; + *pTmpDst++ = pBase64[ ( nB << 2 ) & 0x3c ]; + } + else + { + *pTmpDst++ = pBase64[ ( nA << 4 ) & 0x30 ]; + *pTmpDst++ = '='; + } + + *pTmpDst = '='; + } + + for( sal_Int32 nCurPos = 0; nCurPos < nBufLen; nCurPos += nPartLen ) + { + const ::rtl::OUString aPart( pBuffer + nCurPos, ::std::min< sal_Int32 >( nPartLen, nBufLen - nCurPos ) ); + xExtDocHandler->unknown( aLineFeed ); - xExtDocHandler->unknown( aImageString ); + xExtDocHandler->unknown( aPart ); } + + delete[] pBuffer; } xExtDocHandler->unknown( B2UCONST( "\"/>" ) ); @@ -1076,14 +1001,15 @@ void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx, // ----------------------------------------------------------------------------- void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, - const NMSP_RTL::OUString* pStyle, - sal_uInt32 nWriteFlags ) + sal_uInt32 nWriteFlags, + const ::rtl::OUString* pElementId ) { - ImplAcquireContext(); + if( mnInnerMtfCount ) + nWriteFlags |= SVGWRITER_NO_SHAPE_COMMENTS; - for( ULONG i = 0, nCount = rMtf.GetActionCount(); i < nCount; i++ ) + for( ULONG nCurAction = 0, nCount = rMtf.GetActionCount(); nCurAction < nCount; nCurAction++ ) { - const MetaAction* pAction = rMtf.GetAction( i ); + const MetaAction* pAction = rMtf.GetAction( nCurAction ); const USHORT nType = pAction->GetType(); switch( nType ) @@ -1094,8 +1020,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, { const MetaPixelAction* pA = (const MetaPixelAction*) pAction; - mpContext->SetPaintAttr( pA->GetColor(), pA->GetColor() ); - ImplWriteLine( pA->GetPoint(), pA->GetPoint(), &pA->GetColor(), pStyle ); + mpContext->AddPaintAttr( pA->GetColor(), pA->GetColor() ); + ImplWriteLine( pA->GetPoint(), pA->GetPoint(), &pA->GetColor() ); } } break; @@ -1106,8 +1032,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, { const MetaPointAction* pA = (const MetaPointAction*) pAction; - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetLineColor() ); - ImplWriteLine( pA->GetPoint(), pA->GetPoint(), NULL, pStyle ); + mpContext->AddPaintAttr( mpVDev->GetLineColor(), mpVDev->GetLineColor() ); + ImplWriteLine( pA->GetPoint(), pA->GetPoint(), NULL ); } } break; @@ -1118,17 +1044,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, { const MetaLineAction* pA = (const MetaLineAction*) pAction; - if(pA->GetLineInfo().IsDefault()) - { - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetLineColor() ); - } - else - { - const LineInfo aMappedLineInfo(ImplMap(pA->GetLineInfo())); - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetLineColor(), &aMappedLineInfo ); - } - - ImplWriteLine( pA->GetStartPoint(), pA->GetEndPoint(), NULL, pStyle ); + mpContext->AddPaintAttr( mpVDev->GetLineColor(), mpVDev->GetLineColor() ); + ImplWriteLine( pA->GetStartPoint(), pA->GetEndPoint(), NULL ); } } break; @@ -1137,8 +1054,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, { if( nWriteFlags & SVGWRITER_WRITE_FILL ) { - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWriteRect( ( (const MetaRectAction*) pAction )->GetRect(), 0, 0, pStyle ); + mpContext->AddPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); + ImplWriteRect( ( (const MetaRectAction*) pAction )->GetRect(), 0, 0 ); } } break; @@ -1149,8 +1066,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, { const MetaRoundRectAction* pA = (const MetaRoundRectAction*) pAction; - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWriteRect( pA->GetRect(), pA->GetHorzRound(), pA->GetVertRound(), pStyle ); + mpContext->AddPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); + ImplWriteRect( pA->GetRect(), pA->GetHorzRound(), pA->GetVertRound() ); } } break; @@ -1162,8 +1079,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const MetaEllipseAction* pA = (const MetaEllipseAction*) pAction; const Rectangle& rRect = pA->GetRect(); - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWriteEllipse( rRect.Center(), rRect.GetWidth() >> 1, rRect.GetHeight() >> 1, pStyle ); + mpContext->AddPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); + ImplWriteEllipse( rRect.Center(), rRect.GetWidth() >> 1, rRect.GetHeight() >> 1 ); } } break; @@ -1207,8 +1124,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, if( aPoly.GetSize() ) { - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWritePolyPolygon( aPoly, sal_False, pStyle ); + mpContext->AddPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); + ImplWritePolyPolygon( aPoly, sal_False ); } } } @@ -1223,51 +1140,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, if( rPoly.GetSize() ) { - bool bNoLineJoin(false); - - if(pA->GetLineInfo().IsDefault()) - { - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - } - else - { - const LineInfo aMappedLineInfo(ImplMap(pA->GetLineInfo())); - bNoLineJoin = basegfx::B2DLINEJOIN_NONE == aMappedLineInfo.GetLineJoin(); - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor(), &aMappedLineInfo ); - } - - if(bNoLineJoin) - { - // emulate B2DLINEJOIN_NONE by creating single edges - const sal_uInt16 nPoints(rPoly.GetSize()); - const bool bCurve(rPoly.HasFlags()); - - for(sal_uInt16 a(0); a + 1 < nPoints; a++) - { - if(bCurve - && POLY_NORMAL != rPoly.GetFlags(a + 1) - && a + 2 < nPoints - && POLY_NORMAL != rPoly.GetFlags(a + 2) - && a + 3 < nPoints) - { - const Polygon aSnippet(4, - rPoly.GetConstPointAry() + a, - rPoly.GetConstFlagAry() + a); - ImplWritePolyPolygon( aSnippet, sal_True, pStyle ); - a += 2; - } - else - { - const Polygon aSnippet(2, - rPoly.GetConstPointAry() + a); - ImplWritePolyPolygon( aSnippet, sal_True, pStyle ); - } - } - } - else - { - ImplWritePolyPolygon( rPoly, sal_True, pStyle ); - } + mpContext->AddPaintAttr( mpVDev->GetLineColor(), Color( COL_TRANSPARENT ) ); + ImplWritePolyPolygon( rPoly, sal_True ); } } } @@ -1282,8 +1156,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, if( rPolyPoly.Count() ) { - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWritePolyPolygon( rPolyPoly, sal_False, pStyle ); + mpContext->AddPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); + ImplWritePolyPolygon( rPolyPoly, sal_False ); } } } @@ -1297,7 +1171,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const Polygon aRectPoly( pA->GetRect() ); const PolyPolygon aRectPolyPoly( aRectPoly ); - ImplWriteGradientEx( aRectPolyPoly, pA->GetGradient(), pStyle, nWriteFlags ); + ImplWriteGradientEx( aRectPolyPoly, pA->GetGradient(), nWriteFlags ); } } break; @@ -1307,7 +1181,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, if( nWriteFlags & SVGWRITER_WRITE_FILL ) { const MetaGradientExAction* pA = (const MetaGradientExAction*) pAction; - ImplWriteGradientEx( pA->GetPolyPolygon(), pA->GetGradient(), pStyle, nWriteFlags ); + ImplWriteGradientEx( pA->GetPolyPolygon(), pA->GetGradient(), nWriteFlags ); } } break; @@ -1320,7 +1194,12 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, GDIMetaFile aTmpMtf; mpVDev->AddHatchActions( pA->GetPolyPolygon(), pA->GetHatch(), aTmpMtf ); - ImplWriteActions( aTmpMtf, pStyle, nWriteFlags ); + + ++mnInnerMtfCount; + + ImplWriteActions( aTmpMtf, nWriteFlags, NULL ); + + --mnInnerMtfCount; } } break; @@ -1334,15 +1213,13 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, if( rPolyPoly.Count() ) { - const Color aOldLineColor( mpVDev->GetLineColor() ), aOldFillColor( mpVDev->GetFillColor() ); - Color aNewLineColor( aOldLineColor ), aNewFillColor( aOldFillColor ); + Color aNewLineColor( mpVDev->GetLineColor() ), aNewFillColor( mpVDev->GetFillColor() ); aNewLineColor.SetTransparency( sal::static_int_cast( FRound( pA->GetTransparence() * 2.55 ) ) ); aNewFillColor.SetTransparency( sal::static_int_cast( FRound( pA->GetTransparence() * 2.55 ) ) ); - mpContext->SetPaintAttr( aNewLineColor, aNewFillColor ); - ImplWritePolyPolygon( rPolyPoly, sal_False, pStyle ); - mpContext->SetPaintAttr( aOldLineColor, aOldFillColor ); + mpContext->AddPaintAttr( aNewLineColor, aNewFillColor ); + ImplWritePolyPolygon( rPolyPoly, sal_False ); } } } @@ -1374,7 +1251,11 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, aTmpMtf.Move( nMoveX, nMoveY ); mpVDev->Push(); - ImplWriteActions( aTmpMtf, pStyle, nWriteFlags ); + ++mnInnerMtfCount; + + ImplWriteActions( aTmpMtf, nWriteFlags, NULL ); + + --mnInnerMtfCount; mpVDev->Pop(); } } @@ -1388,18 +1269,17 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() ); sal_Bool bFound = sal_False; - for( ULONG j = 0, nC = aGDIMetaFile.GetActionCount(); ( j < nC ) && !bFound; j++ ) + for( sal_uInt32 k = 0, nCount2 = aGDIMetaFile.GetActionCount(); ( k < nCount2 ) && !bFound; ++k ) { - const MetaAction* pSubstAct = aGDIMetaFile.GetAction( j ); + const MetaAction* pSubstAct = aGDIMetaFile.GetAction( k ); if( pSubstAct->GetType() == META_BMPSCALE_ACTION ) { bFound = sal_True; const MetaBmpScaleAction* pBmpScaleAction = (const MetaBmpScaleAction*) pSubstAct; - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); ImplWriteBmp( pBmpScaleAction->GetBitmap(), pA->GetPoint(), pA->GetSize(), - Point(), pBmpScaleAction->GetBitmap().GetSizePixel(), pStyle ); + Point(), pBmpScaleAction->GetBitmap().GetSizePixel() ); } } } @@ -1417,21 +1297,159 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const MetaGradientExAction* pGradAction = NULL; sal_Bool bDone = sal_False; - while( !bDone && ( ++i < nCount ) ) + while( !bDone && ( ++nCurAction < nCount ) ) { - pAction = rMtf.GetAction( i ); + pAction = rMtf.GetAction( nCurAction ); if( pAction->GetType() == META_GRADIENTEX_ACTION ) pGradAction = (const MetaGradientExAction*) pAction; else if( ( pAction->GetType() == META_COMMENT_ACTION ) && - ( ( (const MetaCommentAction*) pAction )->GetComment().CompareIgnoreCaseToAscii( "XGRAD_SEQ_END" ) == COMPARE_EQUAL ) ) + ( ( (const MetaCommentAction*) pAction )->GetComment(). + CompareIgnoreCaseToAscii( "XGRAD_SEQ_END" ) == COMPARE_EQUAL ) ) { bDone = sal_True; } } if( pGradAction ) - ImplWriteGradientEx( pGradAction->GetPolyPolygon(), pGradAction->GetGradient(), pStyle, nWriteFlags ); + ImplWriteGradientEx( pGradAction->GetPolyPolygon(), pGradAction->GetGradient(), nWriteFlags ); + } + else if( ( pA->GetComment().CompareIgnoreCaseToAscii( "XPATHFILL_SEQ_BEGIN" ) == COMPARE_EQUAL ) && + ( nWriteFlags & SVGWRITER_WRITE_FILL ) && !( nWriteFlags & SVGWRITER_NO_SHAPE_COMMENTS ) && + pA->GetDataSize() ) + { + // write open shape in every case + if( mapCurShape.get() ) + { + ImplWriteShape( *mapCurShape ); + mapCurShape.reset(); + } + + SvMemoryStream aMemStm( (void*) pA->GetData(), pA->GetDataSize(), STREAM_READ ); + SvtGraphicFill aFill; + + aMemStm >> aFill; + + bool bGradient = SvtGraphicFill::fillGradient == aFill.getFillType() && + ( SvtGraphicFill::gradientLinear == aFill.getGradientType() || + SvtGraphicFill::gradientRadial == aFill.getGradientType() ); + bool bSkip = ( SvtGraphicFill::fillSolid == aFill.getFillType() || bGradient ); + + if( bSkip ) + { + PolyPolygon aShapePolyPoly; + + aFill.getPath( aShapePolyPoly ); + + if( aShapePolyPoly.Count() ) + { + mapCurShape.reset( new SVGShapeDescriptor ); + + if( pElementId ) + mapCurShape->maId = *pElementId; + + mapCurShape->maShapePolyPoly = aShapePolyPoly; + mapCurShape->maShapeFillColor = aFill.getFillColor(); + mapCurShape->maShapeFillColor.SetTransparency( (BYTE) FRound( 255.0 * aFill.getTransparency() ) ); + + if( bGradient ) + { + // step through following actions until the first Gradient/GradientEx action is found + while( !mapCurShape->mapShapeGradient.get() && bSkip && ( ++nCurAction < nCount ) ) + { + pAction = rMtf.GetAction( nCurAction ); + + if( ( pAction->GetType() == META_COMMENT_ACTION ) && + ( ( (const MetaCommentAction*) pAction )->GetComment(). + CompareIgnoreCaseToAscii( "XPATHFILL_SEQ_END" ) == COMPARE_EQUAL ) ) + { + bSkip = false; + } + else if( pAction->GetType() == META_GRADIENTEX_ACTION ) + { + mapCurShape->mapShapeGradient.reset( new Gradient( + static_cast< const MetaGradientExAction* >( pAction )->GetGradient() ) ); + } + else if( pAction->GetType() == META_GRADIENT_ACTION ) + { + mapCurShape->mapShapeGradient.reset( new Gradient( + static_cast< const MetaGradientAction* >( pAction )->GetGradient() ) ); + } + } + } + } + else + bSkip = false; + } + + // skip rest of comment + while( bSkip && ( ++nCurAction < nCount ) ) + { + pAction = rMtf.GetAction( nCurAction ); + + if( ( pAction->GetType() == META_COMMENT_ACTION ) && + ( ( (const MetaCommentAction*) pAction )->GetComment(). + CompareIgnoreCaseToAscii( "XPATHFILL_SEQ_END" ) == COMPARE_EQUAL ) ) + { + bSkip = false; + } + } + } + else if( ( pA->GetComment().CompareIgnoreCaseToAscii( "XPATHSTROKE_SEQ_BEGIN" ) == COMPARE_EQUAL ) && + ( nWriteFlags & SVGWRITER_WRITE_FILL ) && !( nWriteFlags & SVGWRITER_NO_SHAPE_COMMENTS ) && + pA->GetDataSize() ) + { + SvMemoryStream aMemStm( (void*) pA->GetData(), pA->GetDataSize(), STREAM_READ ); + SvtGraphicStroke aStroke; + PolyPolygon aStartArrow, aEndArrow; + + aMemStm >> aStroke; + aStroke.getStartArrow( aStartArrow ); + aStroke.getEndArrow( aEndArrow ); + + // Currently no support for strokes with start/end arrow(s) + bool bSkip = ( !aStartArrow.Count() && !aEndArrow.Count() ); + + if( bSkip ) + { + if( !mapCurShape.get() ) + { + Polygon aPoly; + + mapCurShape.reset( new SVGShapeDescriptor ); + + if( pElementId ) + mapCurShape->maId = *pElementId; + + aStroke.getPath( aPoly ); + mapCurShape->maShapePolyPoly = aPoly; + } + + mapCurShape->maShapeLineColor = mpVDev->GetLineColor(); + mapCurShape->maShapeLineColor.SetTransparency( (BYTE) FRound( aStroke.getTransparency() * 255.0 ) ); + mapCurShape->mnStrokeWidth = FRound( aStroke.getStrokeWidth() ); + aStroke.getDashArray( mapCurShape->maDashArray ); + } + + // write open shape in every case + if( mapCurShape.get() ) + { + ImplWriteShape( *mapCurShape ); + mapCurShape.reset(); + } + + // skip rest of comment + while( bSkip && ( ++nCurAction < nCount ) ) + { + pAction = rMtf.GetAction( nCurAction ); + + if( ( pAction->GetType() == META_COMMENT_ACTION ) && + ( ( (const MetaCommentAction*) pAction )->GetComment(). + CompareIgnoreCaseToAscii( "XPATHSTROKE_SEQ_END" ) == COMPARE_EQUAL ) ) + { + bSkip = sal_False; + } + } } } break; @@ -1442,10 +1460,9 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, { const MetaBmpAction* pA = (const MetaBmpAction*) pAction; - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); ImplWriteBmp( pA->GetBitmap(), pA->GetPoint(), mpVDev->PixelToLogic( pA->GetBitmap().GetSizePixel() ), - Point(), pA->GetBitmap().GetSizePixel(), pStyle ); + Point(), pA->GetBitmap().GetSizePixel() ); } } break; @@ -1456,10 +1473,9 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, { const MetaBmpScaleAction* pA = (const MetaBmpScaleAction*) pAction; - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); ImplWriteBmp( pA->GetBitmap(), pA->GetPoint(), pA->GetSize(), - Point(), pA->GetBitmap().GetSizePixel(), pStyle ); + Point(), pA->GetBitmap().GetSizePixel() ); } } break; @@ -1470,10 +1486,9 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, { const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*) pAction; - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); ImplWriteBmp( pA->GetBitmap(), pA->GetDestPoint(), pA->GetDestSize(), - pA->GetSrcPoint(), pA->GetSrcSize(), pStyle ); + pA->GetSrcPoint(), pA->GetSrcSize() ); } } break; @@ -1484,10 +1499,9 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, { const MetaBmpExAction* pA = (const MetaBmpExAction*) pAction; - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); ImplWriteBmp( pA->GetBitmapEx(), pA->GetPoint(), mpVDev->PixelToLogic( pA->GetBitmapEx().GetSizePixel() ), - Point(), pA->GetBitmapEx().GetSizePixel(), pStyle ); + Point(), pA->GetBitmapEx().GetSizePixel() ); } } break; @@ -1498,10 +1512,9 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, { const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pAction; - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); ImplWriteBmp( pA->GetBitmapEx(), pA->GetPoint(), pA->GetSize(), - Point(), pA->GetBitmapEx().GetSizePixel(), pStyle ); + Point(), pA->GetBitmapEx().GetSizePixel() ); } } break; @@ -1512,10 +1525,9 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, { const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pAction; - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); ImplWriteBmp( pA->GetBitmapEx(), pA->GetDestPoint(), pA->GetDestSize(), - pA->GetSrcPoint(), pA->GetSrcSize(), pStyle ); + pA->GetSrcPoint(), pA->GetSrcSize() ); } } break; @@ -1525,12 +1537,20 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, if( nWriteFlags & SVGWRITER_WRITE_TEXT ) { const MetaTextAction* pA = (const MetaTextAction*) pAction; - Font aFont( mpVDev->GetFont() ); + const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() ); + + if( aText.Len() ) + { + Font aFont( mpVDev->GetFont() ); + Size aSz; + + ImplMap( Size( 0, aFont.GetHeight() ), aSz ); - aFont.SetHeight( ImplMap( Size( 0, aFont.GetHeight() ) ).Height() ); - mpContext->SetFontAttr( aFont ); - mpContext->SetPaintAttr( COL_TRANSPARENT, aFont.GetColor() ); - ImplWriteText( pA->GetPoint(), String( pA->GetText(), pA->GetIndex(), pA->GetLen() ), NULL, 0, pStyle ); + aFont.SetHeight( aSz.Height() ); + mpContext->SetFontAttr( aFont ); + mpContext->AddPaintAttr( COL_TRANSPARENT, mpVDev->GetTextColor() ); + ImplWriteText( pA->GetPoint(), aText, NULL, 0 ); + } } } break; @@ -1539,13 +1559,20 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, { if( nWriteFlags & SVGWRITER_WRITE_TEXT ) { - const MetaTextRectAction* pA = (const MetaTextRectAction*) pAction; - Font aFont( mpVDev->GetFont() ); + const MetaTextRectAction* pA = (const MetaTextRectAction*) pAction; + + if( pA->GetText().Len() ) + { + Font aFont( mpVDev->GetFont() ); + Size aSz; + + ImplMap( Size( 0, aFont.GetHeight() ), aSz ); - aFont.SetHeight( ImplMap( Size( 0, aFont.GetHeight() ) ).Height() ); - mpContext->SetFontAttr( aFont ); - mpContext->SetPaintAttr( COL_TRANSPARENT, aFont.GetColor() ); - ImplWriteText( pA->GetRect().TopLeft(), pA->GetText(), NULL, 0, pStyle ); + aFont.SetHeight( aSz.Height() ); + mpContext->SetFontAttr( aFont ); + mpContext->AddPaintAttr( COL_TRANSPARENT, mpVDev->GetTextColor() ); + ImplWriteText( pA->GetRect().TopLeft(), pA->GetText(), NULL, 0 ); + } } } break; @@ -1555,13 +1582,20 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, if( nWriteFlags & SVGWRITER_WRITE_TEXT ) { const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pAction; - const Point aPos( ImplMap( pA->GetPoint() ) ); - Font aFont( mpVDev->GetFont() ); + const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() ); + + if( aText.Len() ) + { + Font aFont( mpVDev->GetFont() ); + Size aSz; - aFont.SetHeight( ImplMap( Size( 0, aFont.GetHeight() ) ).Height() ); - mpContext->SetFontAttr( aFont ); - mpContext->SetPaintAttr( COL_TRANSPARENT, aFont.GetColor() ); - ImplWriteText( pA->GetPoint(), String( pA->GetText(), pA->GetIndex(), pA->GetLen() ), pA->GetDXArray(), 0, pStyle ); + ImplMap( Size( 0, aFont.GetHeight() ), aSz ); + + aFont.SetHeight( aSz.Height() ); + mpContext->SetFontAttr( aFont ); + mpContext->AddPaintAttr( COL_TRANSPARENT, mpVDev->GetTextColor() ); + ImplWriteText( pA->GetPoint(), aText, pA->GetDXArray(), 0 ); + } } } break; @@ -1571,12 +1605,38 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, if( nWriteFlags & SVGWRITER_WRITE_TEXT ) { const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pAction; - Font aFont( mpVDev->GetFont() ); + const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() ); + + if( aText.Len() ) + { + Font aFont( mpVDev->GetFont() ); + Size aSz; + + ImplMap( Size( 0, aFont.GetHeight() ), aSz ); + + aFont.SetHeight( aSz.Height() ); + mpContext->SetFontAttr( aFont ); + mpContext->AddPaintAttr( COL_TRANSPARENT, mpVDev->GetTextColor() ); + ImplWriteText( pA->GetPoint(), aText, NULL, pA->GetWidth() ); + } + } + } + break; - aFont.SetHeight( ImplMap( Size( 0, aFont.GetHeight() ) ).Height() ); - mpContext->SetFontAttr( aFont ); - mpContext->SetPaintAttr( COL_TRANSPARENT, aFont.GetColor() ); - ImplWriteText( pA->GetPoint(), String( pA->GetText(), pA->GetIndex(), pA->GetLen() ), NULL, pA->GetWidth(), pStyle ); + case( META_RENDERGRAPHIC_ACTION ): + { + if( nWriteFlags & SVGWRITER_WRITE_FILL ) + { + // TODO KA: try to embed the native data in case the RenderGraphic + // contains valid SVG data (MimeType "image/svg+xml") + // => incorporate 'use' or 'image' element (KA 01/2011) + const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pAction; + const ::vcl::RenderGraphicRasterizer aRasterizer( pA->GetRenderGraphic() ); + const Point aPointPixel; + const Size aSizePixel( mpVDev->LogicToPixel( pA->GetSize() ) ); + const BitmapEx aBmpEx( aRasterizer.Rasterize( aSizePixel ) ); + + ImplWriteBmp( aBmpEx, pA->GetPoint(), pA->GetSize(), aPointPixel, aBmpEx.GetSizePixel() ); } } break; @@ -1624,8 +1684,6 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, break; } } - - ImplReleaseContext(); } // ----------------------------------------------------------------------------- @@ -1633,7 +1691,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, void SVGActionWriter::WriteMetaFile( const Point& rPos100thmm, const Size& rSize100thmm, const GDIMetaFile& rMtf, - sal_uInt32 nWriteFlags ) + sal_uInt32 nWriteFlags, + const ::rtl::OUString* pElementId ) { MapMode aMapMode( rMtf.GetPrefMapMode() ); Size aPrefSize( rMtf.GetPrefSize() ); @@ -1650,8 +1709,19 @@ void SVGActionWriter::WriteMetaFile( const Point& rPos100thmm, aMapMode.SetOrigin( aOffset += aMapMode.GetOrigin() ); mpVDev->SetMapMode( aMapMode ); + ImplAcquireContext(); + + mapCurShape.reset(); + + ImplWriteActions( rMtf, nWriteFlags, pElementId ); - ImplWriteActions( rMtf, NULL, nWriteFlags ); + // draw open shape that doesn't have a border + if( mapCurShape.get() ) + { + ImplWriteShape( *mapCurShape ); + mapCurShape.reset(); + } + ImplReleaseContext(); mpVDev->Pop(); } diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx index 113448a551d5..597022f5ae7a 100644 --- a/filter/source/svg/svgwriter.hxx +++ b/filter/source/svg/svgwriter.hxx @@ -2,10 +2,13 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * + * $RCSfile: svgwriter.hxx,v $ + * $Revision: 1.5.86.14 $ + * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -53,6 +56,8 @@ #ifndef _CVTGRF_HXX #include #endif +#include +#include #include #include @@ -66,18 +71,18 @@ #include #include #include +#include +#include // ----------------------------------------------------------------------------- -#define _SVG_USE_NATIVE_TEXTDECORATION -#define _SVG_USE_TSPANS 1 -#undef _SVG_WRITE_EXTENTS -#define _SVG_EMBED_FONTS 1 +#undef _SVG_WRITE_EXTENTS +#undef _SVG_WRITE_TEXT_DESC +#undef _SVG_USE_CONFIG // ----------------------------------------------------------------------------- #define NMSP_CPPU cppu -#define NMSP_RTL rtl #define NMSP_UNO com::sun::star::uno #define NMSP_LANG com::sun::star::lang #define NMSP_SAX com::sun::star::xml::sax @@ -87,50 +92,21 @@ #define REF( _def_Obj ) NMSP_UNO::Reference< _def_Obj > #define SEQ( _def_Obj ) NMSP_UNO::Sequence< _def_Obj > -#define B2UCONST( _def_pChar ) (NMSP_RTL::OUString(RTL_CONSTASCII_USTRINGPARAM(_def_pChar ))) +#define B2UCONST( _def_pChar ) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(_def_pChar ))) #define SVG_DTD_STRING B2UCONST( "" ) +#define SVG_TINY_DTD_STRING B2UCONST( "" ) -#define SVGWRITER_WRITE_NONE 0x00000000 -#define SVGWRITER_WRITE_FILL 0x00000001 -#define SVGWRITER_WRITE_TEXT 0x00000002 -#define SVGWRITER_WRITE_ALL 0xFFFFFFFF - -// -------------- -// - FastString - -// -------------- - -class FastString -{ -private: - - sal_uInt32 mnBufLen; - sal_uInt32 mnCurLen; - sal_uInt32 mnBufInc; - sal_Unicode* mpBuffer; - sal_uInt32 mnPartPos; - rtl::OUString maString; - -public: - - FastString( sal_uInt32 nInitLen = 2048, sal_uInt32 nIncrement = 2048 ); - FastString( sal_Char* pBufferForBase64Encoding, sal_uInt32 nBufLen ); - ~FastString(); - - FastString& operator+=( const ::rtl::OUString& rStr ); - - const ::rtl::OUString& GetString() const; - sal_Bool GetFirstPartString( const sal_uInt32 nPartLen, ::rtl::OUString& rPartString ); - sal_Bool GetNextPartString( const sal_uInt32 nPartLen, ::rtl::OUString& rPartString ); - - sal_uInt32 GetLength() const { return mnCurLen; } - void Clear() { mnCurLen = 0, maString = ::rtl::OUString(); } -}; +#define SVGWRITER_WRITE_NONE 0x00000000 +#define SVGWRITER_WRITE_FILL 0x00000001 +#define SVGWRITER_WRITE_TEXT 0x00000002 +#define SVGWRITER_NO_SHAPE_COMMENTS 0x01000000 // ---------------------- // - SVGAttributeWriter - // ---------------------- class SVGActionWriter; +class SVGExport; class SVGFontExport; class SVGAttributeWriter @@ -140,23 +116,51 @@ private: Font maCurFont; Color maCurLineColor; Color maCurFillColor; - SvXMLExport& mrExport; + SVGExport& mrExport; SVGFontExport& mrFontExport; SvXMLElementExport* mpElemFont; SvXMLElementExport* mpElemPaint; SVGAttributeWriter(); + void ImplGetColorStr( const Color& rColor, ::rtl::OUString& rColorStr ); + double ImplRound( double fVal, sal_Int32 nDecs = 3 ); + public: - SVGAttributeWriter( SvXMLExport& rExport, SVGFontExport& rFontExport ); + SVGAttributeWriter( SVGExport& rExport, SVGFontExport& rFontExport ); virtual ~SVGAttributeWriter(); - ::rtl::OUString GetFontStyle( const Font& rFont ); - ::rtl::OUString GetPaintStyle( const Color& rLineColor, const Color& rFillColor, const LineInfo* pLineInfo ); + void AddColorAttr( const char* pColorAttrName, const char* pColorOpacityAttrName, const Color& rColor ); + void AddGradientDef( const Rectangle& rObjRect,const Gradient& rGradient, ::rtl::OUString& rGradientId ); + void AddPaintAttr( const Color& rLineColor, const Color& rFillColor, + const Rectangle* pObjBoundRect = NULL, const Gradient* pFillGradient = NULL ); void SetFontAttr( const Font& rFont ); - void SetPaintAttr( const Color& rLineColor, const Color& rFillColor, const LineInfo* pLineInfo = 0); +}; + +// ---------------------- +// - SVGShapeDescriptor - +// ---------------------- + +struct SVGShapeDescriptor +{ + PolyPolygon maShapePolyPoly; + Color maShapeFillColor; + Color maShapeLineColor; + sal_Int32 mnStrokeWidth; + SvtGraphicStroke::DashArray maDashArray; + ::std::auto_ptr< Gradient > mapShapeGradient; + ::rtl::OUString maId; + + // ------------------------------------------------------------------------- + + SVGShapeDescriptor() : + maShapeFillColor( Color( COL_TRANSPARENT ) ), + maShapeLineColor( Color( COL_TRANSPARENT ) ), + mnStrokeWidth( 0 ) + { + } }; // ------------------- @@ -171,55 +175,64 @@ class SVGActionWriter { private: - SvXMLExport& mrExport; - SVGFontExport& mrFontExport; - SVGAttributeWriter* mpContext; - sal_Bool mbClipAttrChanged; - sal_Int32 mnCurClipId; - Stack maContextStack; - VirtualDevice* mpVDev; - MapMode maTargetMapMode; - sal_Bool mbDestroyVDev; - sal_Bool mbPaintAttrChanged; - sal_Bool mbFontAttrChanged; + Stack maContextStack; + ::std::auto_ptr< SVGShapeDescriptor > mapCurShape; + SVGExport& mrExport; + SVGFontExport& mrFontExport; + SVGAttributeWriter* mpContext; + VirtualDevice* mpVDev; + MapMode maTargetMapMode; + sal_uInt32 mnInnerMtfCount; + sal_Bool mbDestroyVDev; + sal_Bool mbPaintAttrChanged; + sal_Bool mbFontAttrChanged; + sal_Bool mbClipAttrChanged; SVGAttributeWriter* ImplAcquireContext() { maContextStack.Push( mpContext = new SVGAttributeWriter( mrExport, mrFontExport ) ); return mpContext; } void ImplReleaseContext() { delete (SVGAttributeWriter*) maContextStack.Pop(); mpContext = (SVGAttributeWriter*) maContextStack.Top(); } long ImplMap( sal_Int32 nVal ) const; - Point ImplMap( const Point& rPt ) const; - Size ImplMap( const Size& rSz ) const; - LineInfo ImplMap( const LineInfo& rLineInfo ) const; - inline Rectangle ImplMap( const Rectangle& rRect ) const { return Rectangle( ImplMap( rRect.TopLeft() ), ImplMap( rRect.GetSize() ) ); } - - void ImplWriteLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor = NULL, const ::rtl::OUString* pStyle = NULL ); - void ImplWriteRect( const Rectangle& rRect, long nRadX = 0, long nRadY = 0, const ::rtl::OUString* pStyle = NULL ); - void ImplWriteEllipse( const Point& rCenter, long nRadX, long nRadY, const ::rtl::OUString* pStyle = NULL ); - void ImplWritePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bool bLineOnly, const ::rtl::OUString* pStyle = NULL ); - void ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const Gradient& rGradient, const ::rtl::OUString* pStyle, sal_uInt32 nWriteFlags ); - void ImplWriteText( const Point& rPos, const String& rText, const sal_Int32* pDXArray, long nWidth, const ::rtl::OUString* pStyle = NULL ); - void ImplWriteBmp( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& rSrcPt, const Size& rSrcSz, const ::rtl::OUString* pStyle = NULL ); + Point& ImplMap( const Point& rPt, Point& rDstPt ) const; + Size& ImplMap( const Size& rSz, Size& rDstSz ) const; + Rectangle& ImplMap( const Rectangle& rRect, Rectangle& rDstRect ) const; + Polygon& ImplMap( const Polygon& rPoly, Polygon& rDstPoly ) const; + PolyPolygon& ImplMap( const PolyPolygon& rPolyPoly, PolyPolygon& rDstPolyPoly ) const; + + void ImplWriteLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor = NULL, + bool bApplyMapping = true ); + void ImplWriteRect( const Rectangle& rRect, long nRadX = 0, long nRadY = 0, + bool bApplyMapping = true ); + void ImplWriteEllipse( const Point& rCenter, long nRadX, long nRadY, + bool bApplyMapping = true ); + void ImplWritePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bool bLineOnly, + bool bApplyMapping = true ); + void ImplWriteShape( const SVGShapeDescriptor& rShape, bool bApplyMapping = true ); + void ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const Gradient& rGradient, sal_uInt32 nWriteFlags, + bool bApplyMapping = true ); + void ImplWriteText( const Point& rPos, const String& rText, const sal_Int32* pDXArray, long nWidth, + bool bApplyMapping = true ); + void ImplWriteBmp( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& rSrcPt, const Size& rSrcSz, + bool bApplyMapping = true ); void ImplCheckFontAttributes(); void ImplCheckPaintAttributes(); - void ImplWriteActions( const GDIMetaFile& rMtf, const ::rtl::OUString* pStyle, sal_uInt32 nWriteFlags ); - sal_Int32 ImplGetNextClipId() { return mnCurClipId++; } + void ImplWriteActions( const GDIMetaFile& rMtf, sal_uInt32 nWriteFlags, const ::rtl::OUString* pElementId ); public: - static ::rtl::OUString GetValueString( sal_Int32 nVal ); static ::rtl::OUString GetPathString( const PolyPolygon& rPolyPoly, sal_Bool bLine ); public: - SVGActionWriter( SvXMLExport& rExport, SVGFontExport& rFontExport ); + SVGActionWriter( SVGExport& rExport, SVGFontExport& rFontExport ); virtual ~SVGActionWriter(); void WriteMetaFile( const Point& rPos100thmm, const Size& rSize100thmm, const GDIMetaFile& rMtf, - sal_uInt32 nWriteFlags = SVGWRITER_WRITE_ALL ); + sal_uInt32 nWriteFlags, + const ::rtl::OUString* pElementId = NULL ); }; #endif -- cgit v1.2.3 From d1da85e8f5d3b6a0c5d1fdcc4fedb0eff5e90b65 Mon Sep 17 00:00:00 2001 From: ka Date: Fri, 4 Feb 2011 14:49:25 +0100 Subject: ka102: SVG import implementation --- cppcanvas/source/mtfrenderer/implrenderer.cxx | 27 + cppcanvas/source/mtfrenderer/makefile.mk | 3 +- .../source/mtfrenderer/transparencygroupaction.cxx | 1 + svtools/AllLangResTarget_svt.mk | 2 +- svtools/Library_svt.mk | 44 +- svtools/inc/svtools/filter.hxx | 4 + svtools/inc/svtools/grfmgr.hxx | 20 +- svtools/source/graphic/descriptor.cxx | 1 + svtools/source/graphic/descriptor.hxx | 2 +- svtools/source/graphic/grfmgr.cxx | 14 +- svtools/source/graphic/grfmgr2.cxx | 2 + vcl/inc/vcl/gdimtf.hxx | 12 +- vcl/inc/vcl/gfxlink.hxx | 3 +- vcl/inc/vcl/graph.hxx | 10 +- vcl/inc/vcl/impgraph.hxx | 14 +- vcl/inc/vcl/metaact.hxx | 51 ++ vcl/inc/vcl/outdev.hxx | 23 +- vcl/inc/vcl/salctype.hxx | 1 + vcl/prj/d.lst | 3 + vcl/source/components/factory.cxx | 15 +- vcl/source/components/makefile.mk | 21 +- vcl/source/gdi/gdimtf.cxx | 764 +++++++++++++-------- vcl/source/gdi/gfxlink.cxx | 1 + vcl/source/gdi/graph.cxx | 28 + vcl/source/gdi/impgraph.cxx | 54 ++ vcl/source/gdi/makefile.mk | 94 +-- vcl/source/gdi/metaact.cxx | 90 ++- vcl/source/gdi/outdev6.cxx | 28 +- vcl/source/gdi/pdfwriter_impl2.cxx | 12 + vcl/source/gdi/print2.cxx | 30 +- vcl/util/makefile.mk | 2 + vcl/util/vcl.component | 3 + 32 files changed, 954 insertions(+), 425 deletions(-) diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index bab5826e54aa..779d51754daa 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -82,6 +82,7 @@ #include #include #include +#include #include #include #include @@ -2646,6 +2647,32 @@ namespace cppcanvas } break; + case META_RENDERGRAPHIC_ACTION: + { + MetaRenderGraphicAction* pAct = static_cast(pCurrAct); + + ActionSharedPtr pRenderGraphicAction( + internal::RenderGraphicActionFactory::createRenderGraphicAction( + pAct->GetRenderGraphic(), + getState( rStates ).mapModeTransform * + ::vcl::unotools::b2DPointFromPoint( pAct->GetPoint() ), + getState( rStates ).mapModeTransform * + ::vcl::unotools::b2DSizeFromSize( pAct->GetSize() ), + rCanvas, + getState( rStates ) ) ); + + if( pRenderGraphicAction ) + { + maActions.push_back( + MtfAction( + pRenderGraphicAction, + io_rCurrActionIndex ) ); + + io_rCurrActionIndex += pRenderGraphicAction->getActionCount()-1; + } + } + break; + default: OSL_ENSURE( false, "Unknown meta action type encountered" ); diff --git a/cppcanvas/source/mtfrenderer/makefile.mk b/cppcanvas/source/mtfrenderer/makefile.mk index dfe6e28030bf..92ae7e1200bc 100644 --- a/cppcanvas/source/mtfrenderer/makefile.mk +++ b/cppcanvas/source/mtfrenderer/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # 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 @@ -48,6 +48,7 @@ SLOFILES = $(SLO)$/cachedprimitivebase.obj \ $(SLO)$/lineaction.obj \ $(SLO)$/pointaction.obj \ $(SLO)$/polypolyaction.obj \ + $(SLO)$/rendergraphicaction.obj \ $(SLO)$/textaction.obj \ $(SLO)$/transparencygroupaction.obj \ $(SLO)$/mtftools.obj diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx index a8984d41e585..7255df14cd47 100644 --- a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx +++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx @@ -391,6 +391,7 @@ namespace cppcanvas case META_TEXTLINE_ACTION: case META_TEXTRECT_ACTION: case META_STRETCHTEXT_ACTION: + case META_RENDERGRAPHIC_ACTION: // output-generating action - only // copy, if we're within the // requested subset diff --git a/svtools/AllLangResTarget_svt.mk b/svtools/AllLangResTarget_svt.mk index c41bc9d6b29e..442d6398a3fc 100644 --- a/svtools/AllLangResTarget_svt.mk +++ b/svtools/AllLangResTarget_svt.mk @@ -60,7 +60,7 @@ $(eval $(call gb_SrsTarget_add_files,svt/res,\ svtools/source/dialogs/prnsetup.src \ svtools/source/dialogs/so3res.src \ svtools/source/dialogs/wizardmachine.src \ - svtools/source/filter.vcl/filter/exportdialog.src \ + svtools/source/filter/exportdialog.src \ svtools/source/java/javaerror.src \ svtools/source/misc/ehdl.src \ svtools/source/misc/helpagent.src \ diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk index fb0fae66ca12..3d429ff1ebe3 100644 --- a/svtools/Library_svt.mk +++ b/svtools/Library_svt.mk @@ -177,27 +177,27 @@ $(eval $(call gb_Library_add_exception_objects,svt,\ svtools/source/edit/textwindowpeer \ svtools/source/edit/txtattr \ svtools/source/edit/xtextedt \ - svtools/source/filter.vcl/filter/FilterConfigCache \ - svtools/source/filter.vcl/filter/FilterConfigItem \ - svtools/source/filter.vcl/filter/SvFilterOptionsDialog \ - svtools/source/filter.vcl/filter/exportdialog \ - svtools/source/filter.vcl/filter/filter \ - svtools/source/filter.vcl/filter/filter2 \ - svtools/source/filter.vcl/filter/sgfbram \ - svtools/source/filter.vcl/filter/sgvmain \ - svtools/source/filter.vcl/filter/sgvspln \ - svtools/source/filter.vcl/filter/sgvtext \ - svtools/source/filter.vcl/igif/decode \ - svtools/source/filter.vcl/igif/gifread \ - svtools/source/filter.vcl/ixbm/xbmread \ - svtools/source/filter.vcl/ixpm/xpmread \ - svtools/source/filter.vcl/jpeg/jpeg \ - svtools/source/filter.vcl/wmf/emfwr \ - svtools/source/filter.vcl/wmf/enhwmf \ - svtools/source/filter.vcl/wmf/winmtf \ - svtools/source/filter.vcl/wmf/winwmf \ - svtools/source/filter.vcl/wmf/wmf \ - svtools/source/filter.vcl/wmf/wmfwr \ + svtools/source/filter/FilterConfigCache \ + svtools/source/filter/FilterConfigItem \ + svtools/source/filter/SvFilterOptionsDialog \ + svtools/source/filter/exportdialog \ + svtools/source/filter/filter \ + svtools/source/filter/filter2 \ + svtools/source/filter/sgfbram \ + svtools/source/filter/sgvmain \ + svtools/source/filter/sgvspln \ + svtools/source/filter/sgvtext \ + svtools/source/filter/igif/decode \ + svtools/source/filter/igif/gifread \ + svtools/source/filter/ixbm/xbmread \ + svtools/source/filter/ixpm/xpmread \ + svtools/source/filter/jpeg/jpeg \ + svtools/source/filter/wmf/emfwr \ + svtools/source/filter/wmf/enhwmf \ + svtools/source/filter/wmf/winmtf \ + svtools/source/filter/wmf/winwmf \ + svtools/source/filter/wmf/wmf \ + svtools/source/filter/wmf/wmfwr \ svtools/source/graphic/descriptor \ svtools/source/graphic/graphic \ svtools/source/graphic/graphicunofactory \ @@ -287,7 +287,7 @@ $(eval $(call gb_Library_add_exception_objects,svt,\ )) $(eval $(call gb_Library_add_cobjects,svt,\ - svtools/source/filter.vcl/jpeg/jpegc \ + svtools/source/filter/jpeg/jpegc \ )) ifeq ($(OS),LINUX) diff --git a/svtools/inc/svtools/filter.hxx b/svtools/inc/svtools/filter.hxx index 8c6f014d4219..74e7f6456e71 100644 --- a/svtools/inc/svtools/filter.hxx +++ b/svtools/inc/svtools/filter.hxx @@ -83,6 +83,7 @@ class Graphic; #define IMP_JPEG "SVIJPEG" #define IMP_XBM "SVIXBM" #define IMP_XPM "SVIXPM" +#define IMP_SVG "SVISVG" #define EXP_BMP "SVBMP" #define EXP_SVMETAFILE "SVMETAFILE" #define EXP_WMF "SVWMF" @@ -101,6 +102,7 @@ class Graphic; #define TIF_SHORTNAME "TIF" #define WMF_SHORTNAME "WMF" #define EMF_SHORTNAME "EMF" +#define SVG_SHORTNAME "SVG" // ------------------------------------ // - Info-Klasse fuer alle von uns @@ -132,6 +134,7 @@ class Graphic; #define GFF_WMF ( (USHORT)0x00f6 ) #define GFF_SGV ( (USHORT)0x00f7 ) #define GFF_EMF ( (USHORT)0x00f8 ) +#define GFF_SVG ( (USHORT)0x00f9 ) #define GFF_XXX ( (USHORT)0xffff ) // --------------------- @@ -177,6 +180,7 @@ class SVT_DLLPUBLIC GraphicDescriptor BOOL ImpDetectWMF( SvStream& rStm, BOOL bExtendedInfo ); BOOL ImpDetectSGV( SvStream& rStm, BOOL bExtendedInfo ); BOOL ImpDetectEMF( SvStream& rStm, BOOL bExtendedInfo ); + BOOL ImpDetectSVG( SvStream& rStm, BOOL bExtendedInfo ); GraphicDescriptor( const GraphicDescriptor& ); GraphicDescriptor& operator=( const GraphicDescriptor& ); diff --git a/svtools/inc/svtools/grfmgr.hxx b/svtools/inc/svtools/grfmgr.hxx index 3ed608c1525d..d358d5c3329a 100644 --- a/svtools/inc/svtools/grfmgr.hxx +++ b/svtools/inc/svtools/grfmgr.hxx @@ -213,14 +213,15 @@ private: ULONG mnAnimationLoopCount; void* mpDummy1; void* mpDummy2; - BOOL mbAutoSwapped : 1; - BOOL mbTransparent : 1; - BOOL mbAnimated : 1; - BOOL mbEPS : 1; - BOOL mbIsInSwapIn : 1; - BOOL mbIsInSwapOut : 1; - BOOL mbAlpha : 1; - BOOL mbDummyFlag8 : 1; + BOOL mbAutoSwapped : 1; + BOOL mbTransparent : 1; + BOOL mbAnimated : 1; + BOOL mbEPS : 1; + BOOL mbIsInSwapIn : 1; + BOOL mbIsInSwapOut : 1; + BOOL mbAlpha : 1; + BOOL mbIsRenderGraphic : 1; + BOOL mbHasRenderGraphic : 1; void SVT_DLLPRIVATE ImplConstruct(); void SVT_DLLPRIVATE ImplAssignGraphicData(); @@ -402,6 +403,8 @@ public: BOOL IsAlpha() const { return mbAlpha; } BOOL IsAnimated() const { return mbAnimated; } BOOL IsEPS() const { return mbEPS; } + BOOL IsRenderGraphic() const { return mbIsRenderGraphic; } + BOOL HasRenderGraphic() const { return mbHasRenderGraphic; } void ResetAnimationLoopCount(); List* GetAnimationInfoList() const; @@ -568,4 +571,3 @@ public: }; #endif // _GRFMGR_HXX - diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx index 5db73e6cc2f3..b82f4c8eb4aa 100644 --- a/svtools/source/graphic/descriptor.cxx +++ b/svtools/source/graphic/descriptor.cxx @@ -169,6 +169,7 @@ void GraphicDescriptor::implCreate( SvStream& rIStm, const ::rtl::OUString* pURL case( GFF_WMF ): pMimeType = MIMETYPE_WMF; cType = graphic::GraphicType::VECTOR; break; case( GFF_SGV ): pMimeType = MIMETYPE_SGV; cType = graphic::GraphicType::VECTOR; break; case( GFF_EMF ): pMimeType = MIMETYPE_EMF; cType = graphic::GraphicType::VECTOR; break; + case( GFF_SVG ): pMimeType = MIMETYPE_SVG; cType = graphic::GraphicType::VECTOR; break; default: break; diff --git a/svtools/source/graphic/descriptor.hxx b/svtools/source/graphic/descriptor.hxx index bed7c64c0411..8f1e730b1bbc 100644 --- a/svtools/source/graphic/descriptor.hxx +++ b/svtools/source/graphic/descriptor.hxx @@ -123,7 +123,7 @@ private: ::rtl::OUString maMimeType; Size maSizePixel; Size maSize100thMM; - USHORT mnBitsPerPixel; + USHORT mnBitsPerPixel; bool mbTransparent; bool mbAlpha; bool mbAnimated; diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index 221354cc6665..791caa29e421 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -190,15 +190,10 @@ void GraphicObject::ImplAssignGraphicData() mbTransparent = maGraphic.IsTransparent(); mbAlpha = maGraphic.IsAlpha(); mbAnimated = maGraphic.IsAnimated(); + mbEPS = maGraphic.IsEPS(); + mbIsRenderGraphic = maGraphic.IsRenderGraphic(); + mbHasRenderGraphic = maGraphic.HasRenderGraphic(); mnAnimationLoopCount = ( mbAnimated ? maGraphic.GetAnimationLoopCount() : 0 ); - - if( maGraphic.GetType() == GRAPHIC_GDIMETAFILE ) - { - const GDIMetaFile& rMtf = GetGraphic().GetGDIMetaFile(); - mbEPS = ( rMtf.GetActionCount() >= 1 ) && ( META_EPS_ACTION == rMtf.GetAction( 0 )->GetType() ); - } - else - mbEPS = FALSE; } // ----------------------------------------------------------------------------- @@ -447,7 +442,7 @@ void GraphicObject::Assign( const SvDataCopyStream& rCopyStream ) ByteString GraphicObject::GetUniqueID() const { - if ( !IsInSwapIn() && IsEPS() ) + if ( !IsInSwapIn() && ( IsEPS() || IsRenderGraphic() ) ) const_cast(this)->FireSwapInRequest(); ByteString aRet; @@ -1379,4 +1374,3 @@ GraphicObject GraphicObject::CreateGraphicObjectFromURL( const ::rtl::OUString & return GraphicObject( aGraphic ); } } - diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index 7e1255aabc56..7e459c7f44cf 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -869,6 +869,8 @@ BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut, // FALLTHROUGH intended case META_GRADIENTEX_ACTION: // FALLTHROUGH intended + case META_RENDERGRAPHIC_ACTION: + // FALLTHROUGH intended // OutDev state changes that _do_ affect bitmap // output diff --git a/vcl/inc/vcl/gdimtf.hxx b/vcl/inc/vcl/gdimtf.hxx index 636fc4a979f3..0fcb23599f42 100644 --- a/vcl/inc/vcl/gdimtf.hxx +++ b/vcl/inc/vcl/gdimtf.hxx @@ -68,6 +68,15 @@ class Gradient; #define MTF_MIRROR_HORZ 0x00000001UL #define MTF_MIRROR_VERT 0x00000002UL +// ----------------------------- +// - Write flags for streaming - +// ----------------------------- + +#define GDIMETAFILE_WRITE_DEFAULT 0x00000000 +#define GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC 0x00000001 + +typedef sal_uInt32 GDIMetaFileWriteFlags; + // --------- // - Enums - // --------- @@ -237,7 +246,7 @@ public: // Methoden zum Lesen und Schreiben des neuen Formats; // die Read-Methode kann auch das alte Format lesen SvStream& Read( SvStream& rIStm ); - SvStream& Write( SvStream& rOStm ); + SvStream& Write( SvStream& rOStm, GDIMetaFileWriteFlags = GDIMETAFILE_WRITE_DEFAULT ); // Stream-Operatoren schreiben das alte Format (noch) // und lesen sowohl das alte wie auch das neue Format @@ -248,4 +257,3 @@ public: }; #endif // _SV_GDIMTF_HXX - diff --git a/vcl/inc/vcl/gfxlink.hxx b/vcl/inc/vcl/gfxlink.hxx index dced5a19c461..e17e11aeb9c1 100644 --- a/vcl/inc/vcl/gfxlink.hxx +++ b/vcl/inc/vcl/gfxlink.hxx @@ -109,11 +109,12 @@ enum GfxLinkType GFX_LINK_TYPE_NATIVE_WMF = 6, // Don't forget to update the following defines GFX_LINK_TYPE_NATIVE_MET = 7, // Don't forget to update the following defines GFX_LINK_TYPE_NATIVE_PCT = 8, // Don't forget to update the following defines + GFX_LINK_TYPE_NATIVE_SVG = 9, // Don't forget to update the following defines GFX_LINK_TYPE_USER = 0xffff }; #define GFX_LINK_FIRST_NATIVE_ID GFX_LINK_TYPE_NATIVE_GIF -#define GFX_LINK_LAST_NATIVE_ID GFX_LINK_TYPE_NATIVE_PCT +#define GFX_LINK_LAST_NATIVE_ID GFX_LINK_TYPE_NATIVE_SVG // ----------- // - GfxLink - diff --git a/vcl/inc/vcl/graph.hxx b/vcl/inc/vcl/graph.hxx index aa860273fdb7..e9c314a74097 100644 --- a/vcl/inc/vcl/graph.hxx +++ b/vcl/inc/vcl/graph.hxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -122,6 +123,9 @@ public: BOOL IsTransparent() const; BOOL IsAlpha() const; BOOL IsAnimated() const; + BOOL IsEPS() const; + BOOL IsRenderGraphic() const; + BOOL HasRenderGraphic() const; // #i102089# Access of Bitmap potentially will have to rasterconvert the Graphic // if it is a MetaFile. To be able to control this conversion it is necessary to @@ -131,8 +135,9 @@ public: Bitmap GetBitmap(const GraphicConversionParameters& rParameters = GraphicConversionParameters()) const; BitmapEx GetBitmapEx(const GraphicConversionParameters& rParameters = GraphicConversionParameters()) const; - Animation GetAnimation() const; - const GDIMetaFile& GetGDIMetaFile() const; + Animation GetAnimation() const; + const GDIMetaFile& GetGDIMetaFile() const; + ::vcl::RenderGraphic GetRenderGraphic() const; ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > GetXGraphic() const; @@ -219,4 +224,3 @@ public: }; #endif // _SV_GRAPH_HXX - diff --git a/vcl/inc/vcl/impgraph.hxx b/vcl/inc/vcl/impgraph.hxx index bb28d801fe12..87d79320663d 100644 --- a/vcl/inc/vcl/impgraph.hxx +++ b/vcl/inc/vcl/impgraph.hxx @@ -33,6 +33,7 @@ #include #include #include +#include #include // --------------- @@ -99,11 +100,16 @@ private: BOOL ImplIsTransparent() const; BOOL ImplIsAlpha() const; BOOL ImplIsAnimated() const; + BOOL ImplIsEPS() const; + BOOL ImplIsRenderGraphic() const; + BOOL ImplHasRenderGraphic() const; + + Bitmap ImplGetBitmap(const GraphicConversionParameters& rParameters) const; + BitmapEx ImplGetBitmapEx(const GraphicConversionParameters& rParameters) const; + Animation ImplGetAnimation() const; + const GDIMetaFile& ImplGetGDIMetaFile() const; + ::vcl::RenderGraphic ImplGetRenderGraphic() const; - Bitmap ImplGetBitmap(const GraphicConversionParameters& rParameters) const; - BitmapEx ImplGetBitmapEx(const GraphicConversionParameters& rParameters) const; - Animation ImplGetAnimation() const; - const GDIMetaFile& ImplGetGDIMetaFile() const; Size ImplGetPrefSize() const; void ImplSetPrefSize( const Size& rPrefSize ); diff --git a/vcl/inc/vcl/metaact.hxx b/vcl/inc/vcl/metaact.hxx index 38ceff6e0690..990895217207 100644 --- a/vcl/inc/vcl/metaact.hxx +++ b/vcl/inc/vcl/metaact.hxx @@ -42,6 +42,7 @@ #include #include #include +#include class SvStream; @@ -102,6 +103,7 @@ class SvStream; #define META_LAYOUTMODE_ACTION (149) #define META_TEXTLANGUAGE_ACTION (150) #define META_OVERLINECOLOR_ACTION (151) +#define META_RENDERGRAPHIC_ACTION (152) #define META_COMMENT_ACTION (512) @@ -110,6 +112,11 @@ class SvStream; struct ImplMetaReadData { rtl_TextEncoding meActualCharSet; + + ImplMetaReadData() : + meActualCharSet( RTL_TEXTENCODING_ASCII_US ) + { + } }; // ------------------------------------------------------------------------ @@ -117,6 +124,13 @@ struct ImplMetaReadData struct ImplMetaWriteData { rtl_TextEncoding meActualCharSet; + GDIMetaFileWriteFlags mnWriteFlags; + + ImplMetaWriteData() : + meActualCharSet( RTL_TEXTENCODING_ASCII_US ), + mnWriteFlags( GDIMETAFILE_WRITE_DEFAULT ) + { + } }; // ------------------------------------------------------------------------ @@ -1543,4 +1557,41 @@ public: LanguageType GetTextLanguage() const { return meTextLanguage; } }; +// --------------------------- +// - MetaRenderGraphicAction - +// --------------------------- + +class VCL_DLLPUBLIC MetaRenderGraphicAction : public MetaAction +{ +private: + + ::vcl::RenderGraphic maRenderGraphic; + Point maPoint; + Size maSize; + double mfRotateAngle; + double mfShearAngleX; + double mfShearAngleY; + + virtual sal_Bool Compare( const MetaAction& ) const; + +public: + DECL_META_ACTION( RenderGraphic, META_RENDERGRAPHIC_ACTION ) + + MetaRenderGraphicAction( const Point& rPoint, const Size& rSize, + const vcl::RenderGraphic& rRenderData, + double fRotateAngle = 0.0, + double fShearAngleX = 0.0, + double fShearAngleY = 0.0 ); + + virtual void Move( long nHorzMove, long nVertMove ); + virtual void Scale( double fScaleX, double fScaleY ); + + const ::vcl::RenderGraphic& GetRenderGraphic() const { return maRenderGraphic; } + const Point& GetPoint() const { return maPoint; } + const Size& GetSize() const { return maSize; } + double GetRotateAngle() const { return mfRotateAngle; } + double GetShearAngleX() const { return mfShearAngleX; } + double GetShearAngleY() const { return mfShearAngleY; } +}; + #endif // _SV_METAACT_HXX diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx index 12c4202af144..d4c81d9dc8d4 100644 --- a/vcl/inc/vcl/outdev.hxx +++ b/vcl/inc/vcl/outdev.hxx @@ -108,6 +108,7 @@ namespace vcl class PDFWriterImpl; class ExtOutDevData; class ITextLayout; + class RenderGraphic; } #define OUTDEV_BUFFER_SIZE 128 @@ -809,7 +810,19 @@ public: void DrawTransparent( const PolyPolygon& rPolyPoly, USHORT nTransparencePercent ); void DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly, double fTransparency); - void DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, const Size& rSize, const Gradient& rTransparenceGradient ); + void DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, const Size& rSize, + const Gradient& rTransparenceGradient ); + + /** Added return value to see if EPS could be painted directly. + Theoreticaly, handing over a matrix would be needed to handle + painting rotated EPS files (e.g. contained in Metafiles). This + would then need to be supported for Mac and PS printers, but + that's too much for now, wrote #i107046# for this */ + bool DrawEPS( const Point& rPt, const Size& rSz, + const GfxLink& rGfxLink, GDIMetaFile* pSubst = NULL ); + + void DrawRenderGraphic( const Point& rPt, const Size& rSz, + const ::vcl::RenderGraphic& rRenderGraphic ); Color GetPixel( const Point& rPt ) const; Color* GetPixel( const Polygon& rPts ) const; @@ -1115,14 +1128,6 @@ public: */ BOOL HasAlpha(); - /** Added return value to see if EPS could be painted directly. - Theoreticaly, handing over a matrix would be needed to handle - painting rotated EPS files (e.g. contained in Metafiles). This - would then need to be supported for Mac and PS printers, but - that's too much for now, wrote #i107046# for this */ - bool DrawEPS( const Point& rPt, const Size& rSz, - const GfxLink& rGfxLink, GDIMetaFile* pSubst = NULL ); - /// request XCanvas render interface for this OutputDevice ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvas > GetCanvas() const; diff --git a/vcl/inc/vcl/salctype.hxx b/vcl/inc/vcl/salctype.hxx index 0cb037ad40e1..b649f945f657 100644 --- a/vcl/inc/vcl/salctype.hxx +++ b/vcl/inc/vcl/salctype.hxx @@ -48,6 +48,7 @@ #define CVT_TIF (0x00000008UL) #define CVT_WMF (0x00000009UL) #define CVT_EMF (0x0000000aUL) +#define CVT_SVG (0x0000000bUL) // --------------- // - ConvertData - diff --git a/vcl/prj/d.lst b/vcl/prj/d.lst index df30d48f1fab..bfa002c3a900 100644 --- a/vcl/prj/d.lst +++ b/vcl/prj/d.lst @@ -89,6 +89,8 @@ mkdir: %_DEST%\inc%_EXT%\vcl ..\inc\vcl\ptrstyle.hxx %_DEST%\inc%_EXT%\vcl\ptrstyle.hxx ..\inc\vcl\regband.hxx %_DEST%\inc%_EXT%\vcl\regband.hxx ..\inc\vcl\region.hxx %_DEST%\inc%_EXT%\vcl\region.hxx +..\inc\vcl\rendergraphic.hxx %_DEST%\inc%_EXT%\vcl\rendergraphic.hxx +..\inc\vcl\rendergraphicrasterizer.hxx %_DEST%\inc%_EXT%\vcl\rendergraphicrasterizer.hxx ..\inc\vcl\salbtype.hxx %_DEST%\inc%_EXT%\vcl\salbtype.hxx ..\inc\vcl\salctype.hxx %_DEST%\inc%_EXT%\vcl\salctype.hxx ..\inc\vcl\salgtype.hxx %_DEST%\inc%_EXT%\vcl\salgtype.hxx @@ -151,6 +153,7 @@ mkdir: %_DEST%\inc%_EXT%\vcl ..\inc\vcl\helper.hxx %_DEST%\inc%_EXT%\vcl\helper.hxx ..\inc\vcl\strhelper.hxx %_DEST%\inc%_EXT%\vcl\strhelper.hxx ..\inc\vcl\lazydelete.hxx %_DEST%\inc%_EXT%\vcl\lazydelete.hxx +..\inc\vcl\svgread.hxx %_DEST%\inc%_EXT%\vcl\svgread.hxx ..\inc\vcl\arrange.hxx %_DEST%\inc%_EXT%\vcl\arrange.hxx ..\inc\vcl\wpropset.hxx %_DEST%\inc%_EXT%\vcl\wpropset.hxx ..\%__SRC%\misc\vcl.component %_DEST%\xml%_EXT%\vcl.component diff --git a/vcl/source/components/factory.cxx b/vcl/source/components/factory.cxx index 7cfdecbfdb00..48fb3aac653a 100644 --- a/vcl/source/components/factory.cxx +++ b/vcl/source/components/factory.cxx @@ -45,9 +45,7 @@ using ::rtl::OUStringBuffer; using namespace com::sun::star::uno; using namespace com::sun::star::lang; - // service implementation - extern Sequence< OUString > SAL_CALL vcl_session_getSupportedServiceNames(); extern OUString SAL_CALL vcl_session_getImplementationName(); extern Reference< XInterface > SAL_CALL vcl_session_createInstance( const Reference< XMultiServiceFactory > & ); @@ -77,6 +75,13 @@ extern Reference< XInterface > SAL_CALL DragSource_createInstance( const Referen extern Sequence< OUString > SAL_CALL DropTarget_getSupportedServiceNames(); extern OUString SAL_CALL DropTarget_getImplementationName(); extern Reference< XInterface > SAL_CALL DropTarget_createInstance( const Reference< XMultiServiceFactory > & ); + +namespace rsvg +{ + extern Sequence< OUString > SAL_CALL Rasterizer_getSupportedServiceNames(); + extern OUString SAL_CALL Rasterizer_getImplementationName(); + extern Reference< XInterface > SAL_CALL Rasterizer_createInstance( const Reference< XMultiServiceFactory > & ); +} } extern "C" { @@ -142,6 +147,12 @@ extern "C" { xMgr, vcl::DropTarget_getImplementationName(), vcl::DropTarget_createInstance, vcl::DropTarget_getSupportedServiceNames() ); } + else if( vcl::rsvg::Rasterizer_getImplementationName().equalsAscii( pImplementationName ) ) + { + xFactory = ::cppu::createSingleFactory( + xMgr, vcl::rsvg::Rasterizer_getImplementationName(), vcl::rsvg::Rasterizer_createInstance, + vcl::rsvg::Rasterizer_getSupportedServiceNames() ); + } if( xFactory.is() ) { xFactory->acquire(); diff --git a/vcl/source/components/makefile.mk b/vcl/source/components/makefile.mk index 982687104c01..41f21bfa3749 100644 --- a/vcl/source/components/makefile.mk +++ b/vcl/source/components/makefile.mk @@ -33,20 +33,23 @@ ENABLE_EXCEPTIONS=TRUE # --- Settings ----------------------------------------------------- -.INCLUDE : $(PRJ)$/util$/makefile.pmk -.INCLUDE : settings.mk +.INCLUDE : $(PRJ)$/util$/makefile.pmk +.INCLUDE : settings.mk .INCLUDE : $(PRJ)$/util$/makefile2.pmk # --- Files -------------------------------------------------------- -SLOFILES= $(SLO)$/display.obj \ - $(SLO)$/dtranscomp.obj \ - $(SLO)$/fontident.obj \ - $(SLO)$/stringmirror.obj \ +SLOFILES= $(SLO)$/display.obj \ + $(SLO)$/dtranscomp.obj \ + $(SLO)$/fontident.obj \ + $(SLO)$/stringmirror.obj \ + $(SLO)$/rasterizer_rsvg.obj \ $(SLO)$/factory.obj -# --- Targets ------------------------------------------------------ +EXCEPTIONSFILES= $(SLO)$/rasterizer_rsvg.obj + -.INCLUDE : target.mk -.INCLUDE : $(PRJ)$/util$/target.pmk +# --- Targets ------------------------------------------------------ +.INCLUDE : target.mk +.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index d36a18a1afba..a61febe0be47 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -1449,6 +1449,15 @@ void GDIMetaFile::Rotate( long nAngle10 ) } break; + case( META_RENDERGRAPHIC_ACTION ): + { + OSL_TRACE( "Rotate not supported for RenderGraphic MetaActions yet" ); + + pAction->Duplicate(); + aMtf.AddAction( pAction ); + } + break; + default: { pAction->Execute( &aMapVDev ); @@ -1513,363 +1522,371 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference ) switch( nActionType ) { case( META_PIXEL_ACTION ): - { - MetaPixelAction* pAct = (MetaPixelAction*) pAction; - ImplActionBounds( aBound, - Rectangle( aMapVDev.LogicToLogic( pAct->GetPoint(), aMapVDev.GetMapMode(), GetPrefMapMode() ), - aMapVDev.PixelToLogic( Size( 1, 1 ), GetPrefMapMode() ) ), - aClipStack ); - } - break; + { + MetaPixelAction* pAct = (MetaPixelAction*) pAction; + ImplActionBounds( aBound, + Rectangle( aMapVDev.LogicToLogic( pAct->GetPoint(), aMapVDev.GetMapMode(), GetPrefMapMode() ), + aMapVDev.PixelToLogic( Size( 1, 1 ), GetPrefMapMode() ) ), + aClipStack ); + } + break; case( META_POINT_ACTION ): - { - MetaPointAction* pAct = (MetaPointAction*) pAction; - ImplActionBounds( aBound, - Rectangle( aMapVDev.LogicToLogic( pAct->GetPoint(), aMapVDev.GetMapMode(), GetPrefMapMode() ), - aMapVDev.PixelToLogic( Size( 1, 1 ), GetPrefMapMode() ) ), - aClipStack ); - } - break; + { + MetaPointAction* pAct = (MetaPointAction*) pAction; + ImplActionBounds( aBound, + Rectangle( aMapVDev.LogicToLogic( pAct->GetPoint(), aMapVDev.GetMapMode(), GetPrefMapMode() ), + aMapVDev.PixelToLogic( Size( 1, 1 ), GetPrefMapMode() ) ), + aClipStack ); + } + break; case( META_LINE_ACTION ): - { - MetaLineAction* pAct = (MetaLineAction*) pAction; - Point aP1( pAct->GetStartPoint() ), aP2( pAct->GetEndPoint() ); - Rectangle aRect( aP1, aP2 ); - aRect.Justify(); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaLineAction* pAct = (MetaLineAction*) pAction; + Point aP1( pAct->GetStartPoint() ), aP2( pAct->GetEndPoint() ); + Rectangle aRect( aP1, aP2 ); + aRect.Justify(); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_RECT_ACTION ): - { - MetaRectAction* pAct = (MetaRectAction*) pAction; - ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaRectAction* pAct = (MetaRectAction*) pAction; + ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_ROUNDRECT_ACTION ): - { - MetaRoundRectAction* pAct = (MetaRoundRectAction*) pAction; - ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaRoundRectAction* pAct = (MetaRoundRectAction*) pAction; + ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_ELLIPSE_ACTION ): - { - MetaEllipseAction* pAct = (MetaEllipseAction*) pAction; - ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaEllipseAction* pAct = (MetaEllipseAction*) pAction; + ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_ARC_ACTION ): - { - MetaArcAction* pAct = (MetaArcAction*) pAction; - // FIXME: this is imprecise - // e.g. for small arcs the whole rectangle is WAY too large - ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaArcAction* pAct = (MetaArcAction*) pAction; + // FIXME: this is imprecise + // e.g. for small arcs the whole rectangle is WAY too large + ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_PIE_ACTION ): - { - MetaPieAction* pAct = (MetaPieAction*) pAction; - // FIXME: this is imprecise - // e.g. for small arcs the whole rectangle is WAY too large - ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaPieAction* pAct = (MetaPieAction*) pAction; + // FIXME: this is imprecise + // e.g. for small arcs the whole rectangle is WAY too large + ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_CHORD_ACTION ): - { - MetaChordAction* pAct = (MetaChordAction*) pAction; - // FIXME: this is imprecise - // e.g. for small arcs the whole rectangle is WAY too large - ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaChordAction* pAct = (MetaChordAction*) pAction; + // FIXME: this is imprecise + // e.g. for small arcs the whole rectangle is WAY too large + ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_POLYLINE_ACTION ): - { - MetaPolyLineAction* pAct = (MetaPolyLineAction*) pAction; - Rectangle aRect( pAct->GetPolygon().GetBoundRect() ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaPolyLineAction* pAct = (MetaPolyLineAction*) pAction; + Rectangle aRect( pAct->GetPolygon().GetBoundRect() ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_POLYGON_ACTION ): - { - MetaPolygonAction* pAct = (MetaPolygonAction*) pAction; - Rectangle aRect( pAct->GetPolygon().GetBoundRect() ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaPolygonAction* pAct = (MetaPolygonAction*) pAction; + Rectangle aRect( pAct->GetPolygon().GetBoundRect() ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_POLYPOLYGON_ACTION ): - { - MetaPolyPolygonAction* pAct = (MetaPolyPolygonAction*) pAction; - Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaPolyPolygonAction* pAct = (MetaPolyPolygonAction*) pAction; + Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_TEXT_ACTION ): - { - MetaTextAction* pAct = (MetaTextAction*) pAction; - Rectangle aRect; - // hdu said base = index - aMapVDev.GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen() ); - Point aPt( pAct->GetPoint() ); - aRect.Move( aPt.X(), aPt.Y() ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaTextAction* pAct = (MetaTextAction*) pAction; + Rectangle aRect; + // hdu said base = index + aMapVDev.GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen() ); + Point aPt( pAct->GetPoint() ); + aRect.Move( aPt.X(), aPt.Y() ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_TEXTARRAY_ACTION ): - { - MetaTextArrayAction* pAct = (MetaTextArrayAction*) pAction; - Rectangle aRect; - // hdu said base = index - aMapVDev.GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen(), - 0, pAct->GetDXArray() ); - Point aPt( pAct->GetPoint() ); - aRect.Move( aPt.X(), aPt.Y() ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaTextArrayAction* pAct = (MetaTextArrayAction*) pAction; + Rectangle aRect; + // hdu said base = index + aMapVDev.GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen(), + 0, pAct->GetDXArray() ); + Point aPt( pAct->GetPoint() ); + aRect.Move( aPt.X(), aPt.Y() ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_STRETCHTEXT_ACTION ): - { - MetaStretchTextAction* pAct = (MetaStretchTextAction*) pAction; - Rectangle aRect; - // hdu said base = index - aMapVDev.GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen(), - pAct->GetWidth(), NULL ); - Point aPt( pAct->GetPoint() ); - aRect.Move( aPt.X(), aPt.Y() ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaStretchTextAction* pAct = (MetaStretchTextAction*) pAction; + Rectangle aRect; + // hdu said base = index + aMapVDev.GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen(), + pAct->GetWidth(), NULL ); + Point aPt( pAct->GetPoint() ); + aRect.Move( aPt.X(), aPt.Y() ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_TEXTLINE_ACTION ): - { - MetaTextLineAction* pAct = (MetaTextLineAction*) pAction; - // measure a test string to get ascend and descent right - static const sal_Unicode pStr[] = { 0xc4, 0x67, 0 }; - String aStr( pStr ); - - Rectangle aRect; - aMapVDev.GetTextBoundRect( aRect, aStr, 0, 0, aStr.Len(), 0, NULL ); - Point aPt( pAct->GetStartPoint() ); - aRect.Move( aPt.X(), aPt.Y() ); - aRect.Right() = aRect.Left() + pAct->GetWidth(); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaTextLineAction* pAct = (MetaTextLineAction*) pAction; + // measure a test string to get ascend and descent right + static const sal_Unicode pStr[] = { 0xc4, 0x67, 0 }; + String aStr( pStr ); + + Rectangle aRect; + aMapVDev.GetTextBoundRect( aRect, aStr, 0, 0, aStr.Len(), 0, NULL ); + Point aPt( pAct->GetStartPoint() ); + aRect.Move( aPt.X(), aPt.Y() ); + aRect.Right() = aRect.Left() + pAct->GetWidth(); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_BMPSCALE_ACTION ): - { - MetaBmpScaleAction* pAct = (MetaBmpScaleAction*) pAction; - Rectangle aRect( pAct->GetPoint(), pAct->GetSize() ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaBmpScaleAction* pAct = (MetaBmpScaleAction*) pAction; + Rectangle aRect( pAct->GetPoint(), pAct->GetSize() ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_BMPSCALEPART_ACTION ): - { - MetaBmpScalePartAction* pAct = (MetaBmpScalePartAction*) pAction; - Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaBmpScalePartAction* pAct = (MetaBmpScalePartAction*) pAction; + Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_BMPEXSCALE_ACTION ): - { - MetaBmpExScaleAction* pAct = (MetaBmpExScaleAction*) pAction; - Rectangle aRect( pAct->GetPoint(), pAct->GetSize() ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaBmpExScaleAction* pAct = (MetaBmpExScaleAction*) pAction; + Rectangle aRect( pAct->GetPoint(), pAct->GetSize() ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_BMPEXSCALEPART_ACTION ): - { - MetaBmpExScalePartAction* pAct = (MetaBmpExScalePartAction*) pAction; - Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaBmpExScalePartAction* pAct = (MetaBmpExScalePartAction*) pAction; + Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_GRADIENT_ACTION ): - { - MetaGradientAction* pAct = (MetaGradientAction*) pAction; - Rectangle aRect( pAct->GetRect() ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaGradientAction* pAct = (MetaGradientAction*) pAction; + Rectangle aRect( pAct->GetRect() ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_GRADIENTEX_ACTION ): - { - MetaGradientExAction* pAct = (MetaGradientExAction*) pAction; - Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaGradientExAction* pAct = (MetaGradientExAction*) pAction; + Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_COMMENT_ACTION ): - { - // nothing to do - }; - break; + { + // nothing to do + }; + break; case( META_HATCH_ACTION ): - { - MetaHatchAction* pAct = (MetaHatchAction*) pAction; - Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaHatchAction* pAct = (MetaHatchAction*) pAction; + Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_TRANSPARENT_ACTION ): - { - MetaTransparentAction* pAct = (MetaTransparentAction*) pAction; - Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaTransparentAction* pAct = (MetaTransparentAction*) pAction; + Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_FLOATTRANSPARENT_ACTION ): - { - MetaFloatTransparentAction* pAct = (MetaFloatTransparentAction*) pAction; - GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() ); - // get the bound rect of the contained metafile - Rectangle aRect( aTransMtf.GetBoundRect( i_rReference ) ); - // scale the rect now on the assumption that the correct top left of the metafile - // (not its bounds !) is (0,0) - Size aPSize( aTransMtf.GetPrefSize() ); - aPSize = aMapVDev.LogicToLogic( aPSize, aTransMtf.GetPrefMapMode(), aMapVDev.GetMapMode() ); - Size aActSize( pAct->GetSize() ); - double fX = double(aActSize.Width())/double(aPSize.Width()); - double fY = double(aActSize.Height())/double(aPSize.Height()); - aRect.Left() = long(double(aRect.Left())*fX); - aRect.Right() = long(double(aRect.Right())*fX); - aRect.Top() = long(double(aRect.Top())*fY); - aRect.Bottom() = long(double(aRect.Bottom())*fY); - - // transform the rect to current VDev state - aRect = aMapVDev.LogicToLogic( aRect, aTransMtf.GetPrefMapMode(), aMapVDev.GetMapMode() ); - - ImplActionBounds( aBound, aRect, aClipStack ); - } - break; + { + MetaFloatTransparentAction* pAct = (MetaFloatTransparentAction*) pAction; + GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() ); + // get the bound rect of the contained metafile + Rectangle aRect( aTransMtf.GetBoundRect( i_rReference ) ); + // scale the rect now on the assumption that the correct top left of the metafile + // (not its bounds !) is (0,0) + Size aPSize( aTransMtf.GetPrefSize() ); + aPSize = aMapVDev.LogicToLogic( aPSize, aTransMtf.GetPrefMapMode(), aMapVDev.GetMapMode() ); + Size aActSize( pAct->GetSize() ); + double fX = double(aActSize.Width())/double(aPSize.Width()); + double fY = double(aActSize.Height())/double(aPSize.Height()); + aRect.Left() = long(double(aRect.Left())*fX); + aRect.Right() = long(double(aRect.Right())*fX); + aRect.Top() = long(double(aRect.Top())*fY); + aRect.Bottom() = long(double(aRect.Bottom())*fY); + + // transform the rect to current VDev state + aRect = aMapVDev.LogicToLogic( aRect, aTransMtf.GetPrefMapMode(), aMapVDev.GetMapMode() ); + + ImplActionBounds( aBound, aRect, aClipStack ); + } + break; case( META_EPS_ACTION ): - { - MetaEPSAction* pAct = (MetaEPSAction*) pAction; - Rectangle aRect( pAct->GetPoint(), pAct->GetSize() ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaEPSAction* pAct = (MetaEPSAction*) pAction; + Rectangle aRect( pAct->GetPoint(), pAct->GetSize() ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_CLIPREGION_ACTION ): - { - MetaClipRegionAction* pAct = (MetaClipRegionAction*) pAction; - if( pAct->IsClipping() ) - aClipStack.back() = aMapVDev.LogicToLogic( pAct->GetRegion().GetBoundRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ); - else - aClipStack.back() = Rectangle(); - } - break; + { + MetaClipRegionAction* pAct = (MetaClipRegionAction*) pAction; + if( pAct->IsClipping() ) + aClipStack.back() = aMapVDev.LogicToLogic( pAct->GetRegion().GetBoundRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ); + else + aClipStack.back() = Rectangle(); + } + break; case( META_ISECTRECTCLIPREGION_ACTION ): - { - MetaISectRectClipRegionAction* pAct = (MetaISectRectClipRegionAction*) pAction; - Rectangle aRect( aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ) ); - if( aClipStack.back().IsEmpty() ) - aClipStack.back() = aRect; - else - aClipStack.back().Intersection( aRect ); - } - break; + { + MetaISectRectClipRegionAction* pAct = (MetaISectRectClipRegionAction*) pAction; + Rectangle aRect( aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ) ); + if( aClipStack.back().IsEmpty() ) + aClipStack.back() = aRect; + else + aClipStack.back().Intersection( aRect ); + } + break; case( META_ISECTREGIONCLIPREGION_ACTION ): - { - MetaISectRegionClipRegionAction* pAct = (MetaISectRegionClipRegionAction*) pAction; - Rectangle aRect( aMapVDev.LogicToLogic( pAct->GetRegion().GetBoundRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ) ); - if( aClipStack.back().IsEmpty() ) - aClipStack.back() = aRect; - else - aClipStack.back().Intersection( aRect ); - } - break; + { + MetaISectRegionClipRegionAction* pAct = (MetaISectRegionClipRegionAction*) pAction; + Rectangle aRect( aMapVDev.LogicToLogic( pAct->GetRegion().GetBoundRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ) ); + if( aClipStack.back().IsEmpty() ) + aClipStack.back() = aRect; + else + aClipStack.back().Intersection( aRect ); + } + break; case( META_BMP_ACTION ): - { - MetaBmpAction* pAct = (MetaBmpAction*) pAction; - Rectangle aRect( pAct->GetPoint(), aMapVDev.PixelToLogic( pAct->GetBitmap().GetSizePixel() ) ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaBmpAction* pAct = (MetaBmpAction*) pAction; + Rectangle aRect( pAct->GetPoint(), aMapVDev.PixelToLogic( pAct->GetBitmap().GetSizePixel() ) ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_BMPEX_ACTION ): - { - MetaBmpExAction* pAct = (MetaBmpExAction*) pAction; - Rectangle aRect( pAct->GetPoint(), aMapVDev.PixelToLogic( pAct->GetBitmapEx().GetSizePixel() ) ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaBmpExAction* pAct = (MetaBmpExAction*) pAction; + Rectangle aRect( pAct->GetPoint(), aMapVDev.PixelToLogic( pAct->GetBitmapEx().GetSizePixel() ) ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_MASK_ACTION ): - { - MetaMaskAction* pAct = (MetaMaskAction*) pAction; - Rectangle aRect( pAct->GetPoint(), aMapVDev.PixelToLogic( pAct->GetBitmap().GetSizePixel() ) ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaMaskAction* pAct = (MetaMaskAction*) pAction; + Rectangle aRect( pAct->GetPoint(), aMapVDev.PixelToLogic( pAct->GetBitmap().GetSizePixel() ) ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_MASKSCALE_ACTION ): - { - MetaMaskScalePartAction* pAct = (MetaMaskScalePartAction*) pAction; - Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaMaskScalePartAction* pAct = (MetaMaskScalePartAction*) pAction; + Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_MASKSCALEPART_ACTION ): - { - MetaMaskScalePartAction* pAct = (MetaMaskScalePartAction*) pAction; - Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaMaskScalePartAction* pAct = (MetaMaskScalePartAction*) pAction; + Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_WALLPAPER_ACTION ): - { - MetaWallpaperAction* pAct = (MetaWallpaperAction*) pAction; - Rectangle aRect( pAct->GetRect() ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaWallpaperAction* pAct = (MetaWallpaperAction*) pAction; + Rectangle aRect( pAct->GetRect() ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_TEXTRECT_ACTION ): - { - MetaTextRectAction* pAct = (MetaTextRectAction*) pAction; - Rectangle aRect( pAct->GetRect() ); - ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); - } - break; + { + MetaTextRectAction* pAct = (MetaTextRectAction*) pAction; + Rectangle aRect( pAct->GetRect() ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; case( META_MOVECLIPREGION_ACTION ): + { + MetaMoveClipRegionAction* pAct = (MetaMoveClipRegionAction*) pAction; + if( ! aClipStack.back().IsEmpty() ) { - MetaMoveClipRegionAction* pAct = (MetaMoveClipRegionAction*) pAction; - if( ! aClipStack.back().IsEmpty() ) - { - Size aDelta( pAct->GetHorzMove(), pAct->GetVertMove() ); - aDelta = aMapVDev.LogicToLogic( aDelta, aMapVDev.GetMapMode(), GetPrefMapMode() ); - aClipStack.back().Move( aDelta.Width(), aDelta.Width() ); - } + Size aDelta( pAct->GetHorzMove(), pAct->GetVertMove() ); + aDelta = aMapVDev.LogicToLogic( aDelta, aMapVDev.GetMapMode(), GetPrefMapMode() ); + aClipStack.back().Move( aDelta.Width(), aDelta.Width() ); } - break; + } + break; + + case( META_RENDERGRAPHIC_ACTION ): + { + MetaRenderGraphicAction* pAct = (MetaRenderGraphicAction*) pAction; + Rectangle aRect( pAct->GetPoint(), pAct->GetSize() ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack ); + } + break; default: { @@ -2269,6 +2286,15 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol } break; + case( META_RENDERGRAPHIC_ACTION ): + { + OSL_TRACE( "ExchangeColors not supported for RenderGraphic MetaActions yet" ); + + pAction->Duplicate(); + aMtf.Insert( pAction, LIST_APPEND ); + } + break; + default: { pAction->Duplicate(); @@ -2454,11 +2480,13 @@ ULONG GDIMetaFile::GetChecksum() const { GDIMetaFile aMtf; SvMemoryStream aMemStm( 65535, 65535 ); - ImplMetaWriteData aWriteData; aWriteData.meActualCharSet = aMemStm.GetStreamCharSet(); + ImplMetaWriteData aWriteData; SVBT16 aBT16; SVBT32 aBT32; ULONG nCrc = 0; + aWriteData.meActualCharSet = aMemStm.GetStreamCharSet(); + for( ULONG i = 0, nObjCount = GetActionCount(); i < nObjCount; i++ ) { MetaAction* pAction = GetAction( i ); @@ -2715,6 +2743,30 @@ ULONG GDIMetaFile::GetChecksum() const } break; + case( META_RENDERGRAPHIC_ACTION ): + { + MetaRenderGraphicAction* pAct = (MetaRenderGraphicAction*) pAction; + const ::vcl::RenderGraphic& rRenderGraphic = pAct->GetRenderGraphic(); + + ShortToSVBT16( pAct->GetType(), aBT16 ); + nCrc = rtl_crc32( nCrc, aBT16, 2 ); + + nCrc = rtl_crc32( nCrc, rRenderGraphic.GetGraphicData().get(), rRenderGraphic.GetGraphicDataLength() ); + + UInt32ToSVBT32( pAct->GetPoint().X(), aBT32 ); + nCrc = rtl_crc32( nCrc, aBT32, 4 ); + + UInt32ToSVBT32( pAct->GetPoint().Y(), aBT32 ); + nCrc = rtl_crc32( nCrc, aBT32, 4 ); + + UInt32ToSVBT32( pAct->GetSize().Width(), aBT32 ); + nCrc = rtl_crc32( nCrc, aBT32, 4 ); + + UInt32ToSVBT32( pAct->GetSize().Height(), aBT32 ); + nCrc = rtl_crc32( nCrc, aBT32, 4 ); + } + break; + default: { pAction->Write( aMemStm, &aWriteData ); @@ -2781,8 +2833,7 @@ ULONG GDIMetaFile::GetSizeBytes() const } break; - default: - break; + case( META_RENDERGRAPHIC_ACTION ): nSizeBytes += ( ( (MetaRenderGraphicAction*) pAction )->GetRenderGraphic() ).GetGraphicDataLength(); break; } } @@ -2812,25 +2863,61 @@ SvStream& operator>>( SvStream& rIStm, GDIMetaFile& rGDIMetaFile ) MetaAction* pAction; UINT32 nStmCompressMode = 0; UINT32 nCount = 0; + sal_uInt8 bRenderGraphicReplacements = 0; pCompat = new VersionCompat( rIStm, STREAM_READ ); + { + // version 1 + rIStm >> nStmCompressMode; + rIStm >> rGDIMetaFile.aPrefMapMode; + rIStm >> rGDIMetaFile.aPrefSize; + rIStm >> nCount; - rIStm >> nStmCompressMode; - rIStm >> rGDIMetaFile.aPrefMapMode; - rIStm >> rGDIMetaFile.aPrefSize; - rIStm >> nCount; + if( pCompat->GetVersion() >= 2 ) + { + // version 2 + // ========= + // contains an additional flag to indicate that RenderGraphic + // actions are immediately followed by a replacement image, that + // needs to be skipped in case the flag is set (KA 01/2011) + rIStm >> bRenderGraphicReplacements; + } + } delete pCompat; ImplMetaReadData aReadData; aReadData.meActualCharSet = rIStm.GetStreamCharSet(); - for( UINT32 nAction = 0UL; ( nAction < nCount ) && !rIStm.IsEof(); nAction++ ) + for( UINT32 nAction = 0UL; ( nAction < nCount ) && !rIStm.IsEof(); ++nAction ) { pAction = MetaAction::ReadMetaAction( rIStm, &aReadData ); if( pAction ) + { rGDIMetaFile.AddAction( pAction ); + + // if the MetaFile was written in RenderGraphics replacement mode + // and we just read a RenderGraphic action, skip the following + // META_BMPEXSCALE_ACTION, since this is the replacement image, + // just needed for old implementations; don't forget to increment + // the action read counter! (KA 01/2011) + if( bRenderGraphicReplacements && + ( META_RENDERGRAPHIC_ACTION == pAction->GetType() ) && + ( ++nAction < nCount ) && !rIStm.IsEof() ) + { + UINT16 nFollowingType; + + // dummy read of the next following META_BMPEXSCALE_ACTION + // RenderGraphic replacement action (KA 01/2011) + rIStm >> nFollowingType; + delete ( new VersionCompat( rIStm, STREAM_READ ) ); + + OSL_ENSURE( META_BMPEXSCALE_ACTION == nFollowingType, \ +"META_RENDERGRAPHIC_ACTION read in RenderGraphic replacement mode \ +without following META_BMPEXSCALE_ACTION replacement" ); + } + } } } else @@ -2859,10 +2946,27 @@ SvStream& operator<<( SvStream& rOStm, const GDIMetaFile& rGDIMetaFile ) { if( !rOStm.GetError() ) { - if( rOStm.GetVersion() >= SOFFICE_FILEFORMAT_50 ) - ((GDIMetaFile&) rGDIMetaFile ).Write( rOStm ); + static const char* pEnableSVM1 = getenv( "SAL_ENABLE_SVM1" ); + static const bool bNoSVM1 = (NULL == pEnableSVM1 ) || ( '0' == *pEnableSVM1 ); + + if( bNoSVM1 || rOStm.GetVersion() >= SOFFICE_FILEFORMAT_50 ) + { + const_cast< GDIMetaFile& >( rGDIMetaFile ).Write( rOStm ); + } else - delete( new SVMConverter( rOStm, (GDIMetaFile&) rGDIMetaFile, CONVERT_TO_SVM1 ) ); + { + delete( new SVMConverter( rOStm, const_cast< GDIMetaFile& >( rGDIMetaFile ), CONVERT_TO_SVM1 ) ); + } + +#ifdef DEBUG + if( !bNoSVM1 && rOStm.GetVersion() < SOFFICE_FILEFORMAT_50 ) + { +OSL_TRACE( \ +"GDIMetaFile would normally be written in old SVM1 format by this call. \ +The current implementation always writes in VCLMTF format. \ +Please set environment variable SAL_ENABLE_SVM1 to '1' to reenable old behavior" ); + } +#endif // DEBUG } return rOStm; @@ -2880,32 +2984,90 @@ SvStream& GDIMetaFile::Read( SvStream& rIStm ) // ------------------------------------------------------------------------ -SvStream& GDIMetaFile::Write( SvStream& rOStm ) +SvStream& GDIMetaFile::Write( SvStream& rOStm, GDIMetaFileWriteFlags nWriteFlags ) { VersionCompat* pCompat; const UINT32 nStmCompressMode = rOStm.GetCompressMode(); USHORT nOldFormat = rOStm.GetNumberFormatInt(); + const sal_uInt8 bRenderGraphicReplacements = + ( ( ( GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC & nWriteFlags ) != 0 ) ? 1 : 0 ); + + // With the introduction of the META_RENDERGRAPHIC_ACTION, it is neccessary + // to provide some kind of document backward compatibility: + // + // If the flag GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC is set in + // parameter nWriteFlags, each META_RENDERGRAPHIC_ACTION is followed by + // an additional META_BMPEXSCALE_ACTION, that contains a replacement + // image for the new RenderGraphic action. + // + // Old implementations, not knowing anything about META_RENDERGRAPHIC_ACTION, + // will skip this new action and read the META_BMPEXSCALE_ACTION instead + // + // Since the current implementation is able to handle the new action, the + // then following image replacement action needs to be skipped by this + // implementation, if the metafile was written in the RenderGraphic + // replacement mode. + // + // To be able to detect this compatibility mode, the header needs to + // be extended by a corresponding flag, resulting in version 2 of + // the header. The surrounding VersionCompat of the header + // allows to add such new data without any problems (KA 01/2011) rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); rOStm.Write( "VCLMTF", 6 ); - pCompat = new VersionCompat( rOStm, STREAM_WRITE, 1 ); + pCompat = new VersionCompat( rOStm, STREAM_WRITE, 2 ); - rOStm << nStmCompressMode; - rOStm << aPrefMapMode; - rOStm << aPrefSize; - rOStm << (UINT32) GetActionCount(); + { + // version 1 + UINT32 nActionCount = 0; + + // calculate correct action count and watch for + // additional RenderGraphic replacement actions, if the + // GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC is set + // and META_RENDERGRAPHIC_ACTION are encountered (KA 01/2011) + for( MetaAction* pAct = static_cast< MetaAction* >( First() ); pAct; pAct = static_cast< MetaAction* >( Next() ) ) + { + nActionCount += ( bRenderGraphicReplacements && ( META_RENDERGRAPHIC_ACTION == pAct->GetType() ) ? 2 : 1 ); + } + + rOStm << nStmCompressMode << aPrefMapMode << aPrefSize << nActionCount; + + { + // version 2 + // ========= + // since version 2, a GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC flag + // is written, to indicate that each META_BMPEXSCALE_ACTION following + // a META_RENDERGRAPHIC_ACTION needs to be skipped, in case the flag is + // set (KA 01/2011) + rOStm << bRenderGraphicReplacements; + } + } delete pCompat; ImplMetaWriteData aWriteData; + aWriteData.meActualCharSet = rOStm.GetStreamCharSet(); + aWriteData.mnWriteFlags = nWriteFlags; - MetaAction* pAct = (MetaAction*)First(); - while ( pAct ) + for( MetaAction* pAct = static_cast< MetaAction* >( First() ); pAct; pAct = static_cast< MetaAction* >( Next() ) ) { pAct->Write( rOStm, &aWriteData ); - pAct = (MetaAction*)Next(); + + // write the RenderGraphic replacement image, if the + // GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC flag is set + // and if a META_RENDERGRAPHIC_ACTION is encountered (KA 01/2011) + if( bRenderGraphicReplacements && ( META_RENDERGRAPHIC_ACTION == pAct->GetType() ) ) + { + MetaRenderGraphicAction* pRenderAction = static_cast< MetaRenderGraphicAction* >( pAct ); + MetaBmpExScaleAction* pBmpExScaleAction = new MetaBmpExScaleAction( + pRenderAction->GetPoint(), pRenderAction->GetSize(), + pRenderAction->GetRenderGraphic().GetReplacement() ); + + pBmpExScaleAction->Write( rOStm, &aWriteData ); + pBmpExScaleAction->Delete(); + } } rOStm.SetNumberFormatInt( nOldFormat ); diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx index 60ad94a63273..130fc7ae1c99 100644 --- a/vcl/source/gdi/gfxlink.cxx +++ b/vcl/source/gdi/gfxlink.cxx @@ -258,6 +258,7 @@ BOOL GfxLink::LoadNative( Graphic& rGraphic ) case( GFX_LINK_TYPE_NATIVE_WMF ): nCvtType = CVT_WMF; break; case( GFX_LINK_TYPE_NATIVE_MET ): nCvtType = CVT_MET; break; case( GFX_LINK_TYPE_NATIVE_PCT ): nCvtType = CVT_PCT; break; + case( GFX_LINK_TYPE_NATIVE_SVG ): nCvtType = CVT_SVG; break; default: nCvtType = CVT_UNKNOWN; break; } diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index 790c3d43bb85..4e24a14e2f05 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -427,6 +427,27 @@ BOOL Graphic::IsAnimated() const // ------------------------------------------------------------------------ +BOOL Graphic::IsEPS() const +{ + return mpImpGraphic->ImplIsEPS(); +} + +// ------------------------------------------------------------------------ + +BOOL Graphic::IsRenderGraphic() const +{ + return mpImpGraphic->ImplIsRenderGraphic(); +} + +// ------------------------------------------------------------------------ + +BOOL Graphic::HasRenderGraphic() const +{ + return mpImpGraphic->ImplHasRenderGraphic(); +} + +// ------------------------------------------------------------------------ + Bitmap Graphic::GetBitmap(const GraphicConversionParameters& rParameters) const { return mpImpGraphic->ImplGetBitmap(rParameters); @@ -455,6 +476,13 @@ const GDIMetaFile& Graphic::GetGDIMetaFile() const // ------------------------------------------------------------------------ +::vcl::RenderGraphic Graphic::GetRenderGraphic() const +{ + return mpImpGraphic->ImplGetRenderGraphic(); +} + +// ------------------------------------------------------------------------ + uno::Reference< graphic::XGraphic > Graphic::GetXGraphic() const { uno::Reference< graphic::XGraphic > xRet; diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 397a5d6b704a..f40ea98de342 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -480,6 +480,48 @@ BOOL ImpGraphic::ImplIsAnimated() const // ------------------------------------------------------------------------ +BOOL ImpGraphic::ImplIsEPS() const +{ + return( ( meType == GRAPHIC_GDIMETAFILE ) && + ( maMetaFile.GetActionCount() > 0 ) && + ( maMetaFile.GetAction( 0 )->GetType() == META_EPS_ACTION ) ); +} + +// ------------------------------------------------------------------------ + +BOOL ImpGraphic::ImplIsRenderGraphic() const +{ + return( ( GRAPHIC_GDIMETAFILE == meType ) && + ( 1 == maMetaFile.GetActionCount() ) && + ( META_RENDERGRAPHIC_ACTION == maMetaFile.GetAction( 0 )->GetType() ) ); +} + +// ------------------------------------------------------------------------ + +BOOL ImpGraphic::ImplHasRenderGraphic() const +{ + BOOL bRet = FALSE; + + if( GRAPHIC_GDIMETAFILE == meType ) + { + GDIMetaFile& rMtf = const_cast< ImpGraphic* >( this )->maMetaFile; + + for( MetaAction* pAct = rMtf.FirstAction(); pAct && !bRet; pAct = rMtf.NextAction() ) + { + if( META_RENDERGRAPHIC_ACTION == pAct->GetType() ) + { + bRet = TRUE; + } + } + + rMtf.WindStart(); + } + + return( bRet ); +} + +// ------------------------------------------------------------------------ + Bitmap ImpGraphic::ImplGetBitmap(const GraphicConversionParameters& rParameters) const { Bitmap aRetBmp; @@ -592,6 +634,18 @@ Animation ImpGraphic::ImplGetAnimation() const // ------------------------------------------------------------------------ +::vcl::RenderGraphic ImpGraphic::ImplGetRenderGraphic() const +{ + ::vcl::RenderGraphic aRet; + + if( ImplIsRenderGraphic() ) + aRet = static_cast< MetaRenderGraphicAction* >( maMetaFile.GetAction( 0 ) )->GetRenderGraphic(); + + return( aRet ); +} + +// ------------------------------------------------------------------------ + const GDIMetaFile& ImpGraphic::ImplGetGDIMetaFile() const { return maMetaFile; diff --git a/vcl/source/gdi/makefile.mk b/vcl/source/gdi/makefile.mk index ac2e586a41cb..ec664cf648a6 100755 --- a/vcl/source/gdi/makefile.mk +++ b/vcl/source/gdi/makefile.mk @@ -47,75 +47,77 @@ CDEFS+=-DENABLE_GRAPHITE # --- Files -------------------------------------------------------- -EXCEPTIONSFILES= $(SLO)$/salmisc.obj \ - $(SLO)$/outdev.obj \ - $(SLO)$/outdev3.obj \ - $(SLO)$/outdevnative.obj \ - $(SLO)$/gfxlink.obj \ - $(SLO)$/print.obj \ - $(SLO)$/print2.obj \ - $(SLO)$/print3.obj \ - $(SLO)$/oldprintadaptor.obj \ - $(SLO)$/configsettings.obj \ - $(SLO)$/sallayout.obj \ - $(SLO)$/image.obj \ - $(SLO)$/impimage.obj \ - $(SLO)$/impgraph.obj \ - $(SLO)$/metric.obj \ - $(SLO)$/pdfwriter_impl.obj \ - $(SLO)$/pdfwriter_impl2.obj \ - $(SLO)$/pdffontcache.obj\ - $(SLO)$/bmpconv.obj \ - $(SLO)$/pdfextoutdevdata.obj \ - $(SLO)$/jobset.obj \ - $(SLO)$/impimagetree.obj \ - $(SLO)$/pngread.obj \ - $(SLO)$/pngwrite.obj \ - $(SLO)$/virdev.obj \ - $(SLO)$/gdimtf.obj \ - $(SLO)$/graphictools.obj \ - $(SLO)$/textlayout.obj \ - $(SLO)$/lineinfo.obj +EXCEPTIONSFILES= $(SLO)$/salmisc.obj \ + $(SLO)$/outdev.obj \ + $(SLO)$/outdev3.obj \ + $(SLO)$/outdevnative.obj \ + $(SLO)$/gfxlink.obj \ + $(SLO)$/print.obj \ + $(SLO)$/print2.obj \ + $(SLO)$/print3.obj \ + $(SLO)$/oldprintadaptor.obj \ + $(SLO)$/configsettings.obj \ + $(SLO)$/sallayout.obj \ + $(SLO)$/image.obj \ + $(SLO)$/impimage.obj \ + $(SLO)$/impgraph.obj \ + $(SLO)$/metric.obj \ + $(SLO)$/pdfwriter_impl.obj \ + $(SLO)$/pdfwriter_impl2.obj \ + $(SLO)$/pdffontcache.obj \ + $(SLO)$/bmpconv.obj \ + $(SLO)$/pdfextoutdevdata.obj \ + $(SLO)$/jobset.obj \ + $(SLO)$/impimagetree.obj \ + $(SLO)$/pngread.obj \ + $(SLO)$/pngwrite.obj \ + $(SLO)$/virdev.obj \ + $(SLO)$/gdimtf.obj \ + $(SLO)$/graphictools.obj \ + $(SLO)$/textlayout.obj \ + $(SLO)$/lineinfo.obj \ + $(SLO)$/svgread.obj \ + $(SLO)$/rendergraphic.obj \ + $(SLO)$/rendergraphicrasterizer.obj -SLOFILES= $(EXCEPTIONSFILES) \ +SLOFILES= $(EXCEPTIONSFILES) \ $(SLO)$/animate.obj \ $(SLO)$/impanmvw.obj \ - $(SLO)$/bitmap.obj \ + $(SLO)$/bitmap.obj \ $(SLO)$/bitmap2.obj \ $(SLO)$/bitmap3.obj \ $(SLO)$/bitmap4.obj \ - $(SLO)$/alpha.obj \ + $(SLO)$/alpha.obj \ $(SLO)$/bitmapex.obj \ $(SLO)$/bmpacc.obj \ $(SLO)$/bmpacc2.obj \ $(SLO)$/bmpacc3.obj \ $(SLO)$/bmpfast.obj \ - $(SLO)$/cvtsvm.obj \ - $(SLO)$/cvtgrf.obj \ - $(SLO)$/font.obj \ + $(SLO)$/cvtsvm.obj \ + $(SLO)$/cvtgrf.obj \ + $(SLO)$/font.obj \ $(SLO)$/gradient.obj \ - $(SLO)$/hatch.obj \ - $(SLO)$/graph.obj \ - $(SLO)$/impbmp.obj \ + $(SLO)$/hatch.obj \ + $(SLO)$/graph.obj \ + $(SLO)$/impbmp.obj \ $(SLO)$/imagerepository.obj \ $(SLO)$/impvect.obj \ - $(SLO)$/mapmod.obj \ + $(SLO)$/mapmod.obj \ $(SLO)$/metaact.obj \ - $(SLO)$/octree.obj \ - $(SLO)$/outmap.obj \ + $(SLO)$/octree.obj \ + $(SLO)$/outmap.obj \ $(SLO)$/outdev2.obj \ $(SLO)$/outdev4.obj \ $(SLO)$/outdev5.obj \ $(SLO)$/outdev6.obj \ $(SLO)$/regband.obj \ - $(SLO)$/region.obj \ - $(SLO)$/wall.obj \ - $(SLO)$/base14.obj \ + $(SLO)$/region.obj \ + $(SLO)$/wall.obj \ + $(SLO)$/base14.obj \ $(SLO)$/pdfwriter.obj \ $(SLO)$/salgdilayout.obj \ $(SLO)$/extoutdevdata.obj \ - $(SLO)$/salnativewidgets-none.obj - + $(SLO)$/salnativewidgets-none.obj # --- Targets ------------------------------------------------------ diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index f398888a33b6..0c6832a1123d 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -38,6 +38,7 @@ #include #include #include +#include // ======================================================================== @@ -235,6 +236,7 @@ MetaAction* MetaAction::ReadMetaAction( SvStream& rIStm, ImplMetaReadData* pData case( META_COMMENT_ACTION ): pAction = new MetaCommentAction; break; case( META_LAYOUTMODE_ACTION ): pAction = new MetaLayoutModeAction; break; case( META_TEXTLANGUAGE_ACTION ): pAction = new MetaTextLanguageAction; break; + case( META_RENDERGRAPHIC_ACTION ): pAction = new MetaRenderGraphicAction; break; default: { @@ -2565,7 +2567,10 @@ MetaGradientExAction::~MetaGradientExAction() void MetaGradientExAction::Execute( OutputDevice* pOut ) { if( pOut->GetConnectMetaFile() ) - pOut->GetConnectMetaFile()->AddAction( Clone() ); + { + Duplicate(); + pOut->GetConnectMetaFile()->AddAction( this ); + } } // ------------------------------------------------------------------------ @@ -4059,7 +4064,10 @@ void MetaCommentAction::ImplInitDynamicData( const BYTE* pData, sal_uInt32 nData void MetaCommentAction::Execute( OutputDevice* pOut ) { if ( pOut->GetConnectMetaFile() ) - pOut->GetConnectMetaFile()->AddAction( Clone() ); + { + Duplicate(); + pOut->GetConnectMetaFile()->AddAction( this ); + } } // ------------------------------------------------------------------------ @@ -4294,3 +4302,81 @@ void MetaTextLanguageAction::Read( SvStream& rIStm, ImplMetaReadData* ) } // ======================================================================== + +IMPL_META_ACTION( RenderGraphic, META_RENDERGRAPHIC_ACTION ) + +// ------------------------------------------------------------------------ + +MetaRenderGraphicAction::MetaRenderGraphicAction( const Point& rPoint, const Size& rSize, + const vcl::RenderGraphic& rRenderGraphic, + double fRotateAngle, double fShearAngleX, double fShearAngleY ) : + MetaAction( META_RENDERGRAPHIC_ACTION ), + maRenderGraphic( rRenderGraphic ), + maPoint( rPoint ), + maSize( rSize ), + mfRotateAngle( fRotateAngle ), + mfShearAngleX( fShearAngleX ), + mfShearAngleY( fShearAngleY ) +{ +} + +// ------------------------------------------------------------------------ + +void MetaRenderGraphicAction::Execute( OutputDevice* pOut ) +{ + pOut->DrawRenderGraphic( maPoint, maSize, maRenderGraphic ); +} + +// ------------------------------------------------------------------------ + +MetaAction* MetaRenderGraphicAction::Clone() +{ + MetaAction* pClone = (MetaAction*) new MetaRenderGraphicAction( *this ); + pClone->ResetRefCount(); + return pClone; +} + +// ------------------------------------------------------------------------ + +void MetaRenderGraphicAction::Move( long nHorzMove, long nVertMove ) +{ + maPoint.Move( nHorzMove, nVertMove ); +} + +// ------------------------------------------------------------------------ + +void MetaRenderGraphicAction::Scale( double fScaleX, double fScaleY ) +{ + Rectangle aRectangle( maPoint, maSize ); + ImplScaleRect( aRectangle, fScaleX, fScaleY ); + maPoint = aRectangle.TopLeft(); + maSize = aRectangle.GetSize(); +} + +// ------------------------------------------------------------------------ + +sal_Bool MetaRenderGraphicAction::Compare( const MetaAction& rMetaAction ) const +{ + return ( maRenderGraphic.IsEqual( ( (MetaRenderGraphicAction&) rMetaAction).maRenderGraphic ) && + ( maPoint == ( (MetaRenderGraphicAction&) rMetaAction).maPoint ) && + ( maSize == ( (MetaRenderGraphicAction&) rMetaAction).maSize ) && + ( mfRotateAngle == ( (MetaRenderGraphicAction&) rMetaAction).mfRotateAngle ) && + ( mfShearAngleX == ( (MetaRenderGraphicAction&) rMetaAction).mfShearAngleX ) && + ( mfShearAngleY == ( (MetaRenderGraphicAction&) rMetaAction).mfShearAngleY ) ); +} + +// ------------------------------------------------------------------------ + +void MetaRenderGraphicAction::Write( SvStream& rOStm, ImplMetaWriteData* pData ) +{ + WRITE_BASE_COMPAT( rOStm, 1, pData ); + rOStm << maRenderGraphic << maPoint << maSize << mfRotateAngle << mfShearAngleX << mfShearAngleY; +} + +// ------------------------------------------------------------------------ + +void MetaRenderGraphicAction::Read( SvStream& rIStm, ImplMetaReadData* ) +{ + COMPAT( rIStm ); + rIStm >> maRenderGraphic >> maPoint >> maSize >> mfRotateAngle >> mfShearAngleX >> mfShearAngleY; +} diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx index 5b8d228bb141..3f0d4dcde9f8 100644 --- a/vcl/source/gdi/outdev6.cxx +++ b/vcl/source/gdi/outdev6.cxx @@ -43,6 +43,7 @@ #include #include #include +#include #include #include @@ -1193,6 +1194,8 @@ void OutputDevice::ImplDraw2ColorFrame( const Rectangle& rRect, bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize, const GfxLink& rGfxLink, GDIMetaFile* pSubst ) { + DBG_TRACE( "OutputDevice::DrawEPS()" ); + bool bDrawn(true); if ( mpMetaFile ) @@ -1211,7 +1214,7 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize, if( mbOutputClipped ) return bDrawn; - Rectangle aRect( ImplLogicToDevicePixel( Rectangle( rPoint, rSize ) ) ); + Rectangle aRect( ImplLogicToDevicePixel( Rectangle( rPoint, rSize ) ) ); if( !aRect.IsEmpty() ) { @@ -1245,3 +1248,26 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize, return bDrawn; } + +// ------------------------------------------------------------------ + +void OutputDevice::DrawRenderGraphic( const Point& rPoint, const Size& rSize, + const ::vcl::RenderGraphic& rRenderGraphic ) +{ + DBG_TRACE( "OutputDevice::DrawRenderGraphic()" ); + + if( mpMetaFile ) + mpMetaFile->AddAction( new MetaRenderGraphicAction( rPoint, rSize, rRenderGraphic ) ); + + if( !rRenderGraphic.IsEmpty() ) + { + ::vcl::RenderGraphicRasterizer aRasterizer( rRenderGraphic ); + BitmapEx aBmpEx; + const Size aSizePixel( LogicToPixel( rSize ) ); + GDIMetaFile* pOldMetaFile = mpMetaFile; + + mpMetaFile = NULL; + DrawBitmapEx( rPoint, rSize, aRasterizer.Rasterize( aSizePixel ) ); + mpMetaFile = pOldMetaFile; + } +} diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index ee1fe1cc6bc5..082e2fa74a20 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -35,6 +35,7 @@ #include "vcl/metaact.hxx" #include "vcl/graph.hxx" #include "vcl/svdata.hxx" +#include "vcl/rendergraphicrasterizer.hxx" #include "unotools/streamwrap.hxx" #include "unotools/processfactory.hxx" #include "comphelper/processfactory.hxx" @@ -1019,6 +1020,17 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa } break; + case( META_RENDERGRAPHIC_ACTION ): + { + const MetaRenderGraphicAction* pA = static_cast< const MetaRenderGraphicAction* >( pAction ); + const ::vcl::RenderGraphicRasterizer aRasterizer( pA->GetRenderGraphic() ); + + implWriteBitmapEx( pA->GetPoint(), pA->GetSize(), + aRasterizer.Rasterize( pDummyVDev->LogicToPixel( pA->GetSize() ) ), + pDummyVDev, i_rContext ); + } + break; + default: // #i24604# Made assertion fire only once per // metafile. The asserted actions here are all diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx index 5c2a742a10ba..796b5838980d 100644 --- a/vcl/source/gdi/print2.cxx +++ b/vcl/source/gdi/print2.cxx @@ -45,6 +45,7 @@ #include #include #include +#include #include "pdfwriter_impl.hxx" @@ -111,6 +112,9 @@ static bool ImplIsActionSpecial( const MetaAction& rAct ) case META_BMPEXSCALEPART_ACTION: return static_cast(rAct).GetBitmapEx().IsTransparent(); + case META_RENDERGRAPHIC_ACTION: + return true; + default: return false; } @@ -198,6 +202,16 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf, aBmpEx = static_cast(rAct).GetBitmapEx(); break; + case META_RENDERGRAPHIC_ACTION: + { + const ::vcl::RenderGraphicRasterizer aRasterizer( static_cast(rAct). + GetRenderGraphic() ); + + aBmpEx = aRasterizer.Rasterize( rStateOutDev.LogicToPixel( + static_cast(rAct).GetSize() ) ); + break; + } + case META_TRANSPARENT_ACTION: default: @@ -265,6 +279,11 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf, static_cast(rAct).GetSrcSize(), aBmp )); break; + case META_RENDERGRAPHIC_ACTION: + o_rMtf.AddAction( new MetaBmpScaleAction( + static_cast(rAct).GetPoint(), + static_cast(rAct).GetSize(), + aBmp )); default: DBG_ERROR("Unexpected case"); break; @@ -377,6 +396,7 @@ static bool ImplIsNotTransparent( const MetaAction& rAct, const OutputDevice& rO case META_TEXTRECT_ACTION: case META_STRETCHTEXT_ACTION: case META_TEXTLINE_ACTION: + case META_RENDERGRAPHIC_ACTION: // all other actions: generate non-transparent output bRet = true; break; @@ -629,7 +649,14 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic case META_TEXTLINE_ACTION: DBG_ERROR("META_TEXTLINE_ACTION not supported"); - break; + break; + + case( META_RENDERGRAPHIC_ACTION ): + { + const MetaRenderGraphicAction& rRenderAct = static_cast(rAct); + aActionBounds = Rectangle( rRenderAct.GetPoint(), rRenderAct.GetSize() ); + } + break; default: break; @@ -656,6 +683,7 @@ static bool ImplIsActionHandlingTransparency( const MetaAction& rAct ) case META_BMPEX_ACTION: case META_BMPEXSCALE_ACTION: case META_BMPEXSCALEPART_ACTION: + case META_RENDERGRAPHIC_ACTION: return true; default: diff --git a/vcl/util/makefile.mk b/vcl/util/makefile.mk index 8d1de2ed30f0..75b3f9f527c1 100644 --- a/vcl/util/makefile.mk +++ b/vcl/util/makefile.mk @@ -99,6 +99,8 @@ HXXDEPNLST= $(INC)$/vcl$/accel.hxx \ $(INC)$/vcl$/print.hxx \ $(INC)$/vcl$/prndlg.hxx \ $(INC)$/vcl$/region.hxx \ + $(INC)$/vcl$/rendergraphic.hxx \ + $(INC)$/vcl$/rendergraphicrasterizer.hxx \ $(INC)$/vcl$/salbtype.hxx \ $(INC)$/vcl$/scrbar.hxx \ $(INC)$/vcl$/slider.hxx \ diff --git a/vcl/util/vcl.component b/vcl/util/vcl.component index da20fc916c32..ea14667d17c1 100644 --- a/vcl/util/vcl.component +++ b/vcl/util/vcl.component @@ -46,4 +46,7 @@ + + + -- cgit v1.2.3 From 710128334ee6f2dd538a67d2ecaf2d7b07bb6868 Mon Sep 17 00:00:00 2001 From: ka Date: Fri, 4 Feb 2011 14:49:25 +0100 Subject: ka102: SVG import implementation --- .../primitive2d/drawinglayer_primitivetypes2d.hxx | 1 + .../drawinglayer/processor2d/canvasprocessor.hxx | 2 + .../drawinglayer/processor2d/vclprocessor2d.hxx | 2 + drawinglayer/prj/d.lst | 1 + .../source/primitive2d/graphicprimitive2d.cxx | 69 ++++++++++++--------- drawinglayer/source/primitive2d/makefile.mk | 1 + .../source/primitive2d/metafileprimitive2d.cxx | 28 +++++++++ .../source/processor2d/hittestprocessor2d.cxx | 2 + .../source/processor2d/linegeometryextractor2d.cxx | 1 + .../processor2d/textaspolygonextractor2d.cxx | 1 + .../source/processor2d/vclmetafileprocessor2d.cxx | 7 +++ .../source/processor2d/vclpixelprocessor2d.cxx | 7 +++ drawinglayer/source/processor2d/vclprocessor2d.cxx | 71 ++++++++++++++++++++++ .../schema/org/openoffice/Office/Common.xcs | 27 ++++++++ svx/inc/svx/svdograf.hxx | 1 + svx/source/dialog/_bmpmask.cxx | 3 + svx/source/gallery2/galtheme.cxx | 1 + svx/source/svdraw/svdedtv.cxx | 6 +- svx/source/svdraw/svdfmtf.cxx | 25 +++++++- svx/source/svdraw/svdfmtf.hxx | 1 + svx/source/svdraw/svdograf.cxx | 18 ++++-- svx/source/xml/xmlgrhlp.cxx | 9 +-- 22 files changed, 243 insertions(+), 41 deletions(-) diff --git a/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx index 87aae8cb768f..5b23c6fcfbc0 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx @@ -103,6 +103,7 @@ #define PRIMITIVE2D_ID_EPSPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 60) #define PRIMITIVE2D_ID_DISCRETESHADOWPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 61) #define PRIMITIVE2D_ID_HIDDENGEOMETRYPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 62) +#define PRIMITIVE2D_ID_RENDERGRAPHICPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 63) ////////////////////////////////////////////////////////////////////////////// diff --git a/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx b/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx index 72ff97076a6c..d218b7737c2b 100644 --- a/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx +++ b/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx @@ -56,6 +56,7 @@ namespace drawinglayer { namespace primitive2d { class MetafilePrimitive2D; class TextSimplePortionPrimitive2D; class BitmapPrimitive2D; + class RenderGraphicPrimitive2D; class TransparencePrimitive2D; class PolygonStrokePrimitive2D; class FillBitmapPrimitive2D; @@ -108,6 +109,7 @@ namespace drawinglayer void impRenderMetafilePrimitive2D(const primitive2d::MetafilePrimitive2D& rMetaCandidate); void impRenderTextSimplePortionPrimitive2D(const primitive2d::TextSimplePortionPrimitive2D& rTextCandidate); void impRenderBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate); + void impRenderRenderGraphicPrimitive2D(const primitive2d::RenderGraphicPrimitive2D& rRenderGraphicCandidate); void impRenderTransparencePrimitive2D(const primitive2d::TransparencePrimitive2D& rTransparenceCandidate); void impRenderPolygonStrokePrimitive2D(const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokePrimitive); void impRenderFillBitmapPrimitive2D(const primitive2d::FillBitmapPrimitive2D& rFillBitmapPrimitive2D); diff --git a/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx index 9db84f3e7e0c..9e9a827d2518 100644 --- a/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx +++ b/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx @@ -41,6 +41,7 @@ namespace drawinglayer { namespace primitive2d { class TextSimplePortionPrimitive2D; class PolygonHairlinePrimitive2D; class BitmapPrimitive2D; + class RenderGraphicPrimitive2D; class FillBitmapPrimitive2D; class PolyPolygonGradientPrimitive2D; class PolyPolygonBitmapPrimitive2D; @@ -97,6 +98,7 @@ namespace drawinglayer void RenderTextSimpleOrDecoratedPortionPrimitive2D(const primitive2d::TextSimplePortionPrimitive2D& rTextCandidate); void RenderPolygonHairlinePrimitive2D(const primitive2d::PolygonHairlinePrimitive2D& rPolygonCandidate, bool bPixelBased); void RenderBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate); + void RenderRenderGraphicPrimitive2D(const primitive2d::RenderGraphicPrimitive2D& rRenderGraphicCandidate); void RenderFillBitmapPrimitive2D(const primitive2d::FillBitmapPrimitive2D& rFillBitmapCandidate); void RenderPolyPolygonGradientPrimitive2D(const primitive2d::PolyPolygonGradientPrimitive2D& rPolygonCandidate); void RenderPolyPolygonBitmapPrimitive2D(const primitive2d::PolyPolygonBitmapPrimitive2D& rPolygonCandidate); diff --git a/drawinglayer/prj/d.lst b/drawinglayer/prj/d.lst index 54f087d317e4..10e692785a81 100644 --- a/drawinglayer/prj/d.lst +++ b/drawinglayer/prj/d.lst @@ -13,6 +13,7 @@ mkdir: %_DEST%\inc%_EXT%\drawinglayer\primitive2d ..\inc\drawinglayer\primitive2d\backgroundcolorprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\backgroundcolorprimitive2d.hxx ..\inc\drawinglayer\primitive2d\baseprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\baseprimitive2d.hxx ..\inc\drawinglayer\primitive2d\bitmapprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\bitmapprimitive2d.hxx +..\inc\drawinglayer\primitive2d\rendergraphicprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\rendergraphicprimitive2d.hxx ..\inc\drawinglayer\primitive2d\borderlineprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\borderlineprimitive2d.hxx ..\inc\drawinglayer\primitive2d\chartprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\chartprimitive2d.hxx ..\inc\drawinglayer\primitive2d\controlprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\controlprimitive2d.hxx diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx index 1e26881c9757..3b52f2340f17 100644 --- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -46,6 +47,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// // includes for testing MetafilePrimitive2D::create2DDecomposition @@ -260,7 +262,9 @@ namespace drawinglayer aSuppressGraphicAttr.SetCrop(0, 0, 0, 0); aSuppressGraphicAttr.SetRotation(0); aSuppressGraphicAttr.SetMirrorFlags(0); - const Graphic aTransformedGraphic(getGraphicObject().GetTransformedGraphic(&aSuppressGraphicAttr)); + + const GraphicObject& rGraphicObject = getGraphicObject(); + const Graphic aTransformedGraphic(rGraphicObject.GetTransformedGraphic(&aSuppressGraphicAttr)); switch(aTransformedGraphic.GetType()) { @@ -743,34 +747,43 @@ namespace drawinglayer { #endif // USE_DEBUG_CODE_TO_TEST_METAFILE_DECOMPOSE // create MetafilePrimitive2D - const Graphic aGraphic(getGraphicObject().GetGraphic()); const GDIMetaFile& rMetafile = aTransformedGraphic.GetGDIMetaFile(); - xPrimitive = Primitive2DReference( - new MetafilePrimitive2D( - aTransform, - rMetafile)); - - // #i100357# find out if clipping is needed for this primitive. Unfortunately, - // there exist Metafiles who's content is bigger than the proposed PrefSize set - // at them. This is an error, but we need to work around this - const Size aMetaFilePrefSize(rMetafile.GetPrefSize()); - const Size aMetaFileRealSize( - const_cast< GDIMetaFile& >(rMetafile).GetBoundRect( - *Application::GetDefaultDevice()).GetSize()); - - if(aMetaFileRealSize.getWidth() > aMetaFilePrefSize.getWidth() - || aMetaFileRealSize.getHeight() > aMetaFilePrefSize.getHeight()) + if( aTransformedGraphic.IsRenderGraphic() ) { - // clipping needed. Embed to MaskPrimitive2D. Create childs and mask polygon - const primitive2d::Primitive2DSequence aChildContent(&xPrimitive, 1); - basegfx::B2DPolygon aMaskPolygon(basegfx::tools::createUnitPolygon()); - aMaskPolygon.transform(aTransform); - xPrimitive = Primitive2DReference( - new MaskPrimitive2D( - basegfx::B2DPolyPolygon(aMaskPolygon), - aChildContent)); + new RenderGraphicPrimitive2D( + static_cast< MetaRenderGraphicAction* >(rMetafile.GetAction(0))->GetRenderGraphic(), + aTransform)); + } + else + { + xPrimitive = Primitive2DReference( + new MetafilePrimitive2D( + aTransform, + rMetafile)); + + // #i100357# find out if clipping is needed for this primitive. Unfortunately, + // there exist Metafiles who's content is bigger than the proposed PrefSize set + // at them. This is an error, but we need to work around this + const Size aMetaFilePrefSize(rMetafile.GetPrefSize()); + const Size aMetaFileRealSize( + const_cast< GDIMetaFile& >(rMetafile).GetBoundRect( + *Application::GetDefaultDevice()).GetSize()); + + if(aMetaFileRealSize.getWidth() > aMetaFilePrefSize.getWidth() + || aMetaFileRealSize.getHeight() > aMetaFilePrefSize.getHeight()) + { + // clipping needed. Embed to MaskPrimitive2D. Create childs and mask polygon + const primitive2d::Primitive2DSequence aChildContent(&xPrimitive, 1); + basegfx::B2DPolygon aMaskPolygon(basegfx::tools::createUnitPolygon()); + aMaskPolygon.transform(aTransform); + + xPrimitive = Primitive2DReference( + new MaskPrimitive2D( + basegfx::B2DPolyPolygon(aMaskPolygon), + aChildContent)); + } } #ifdef USE_DEBUG_CODE_TO_TEST_METAFILE_DECOMPOSE } @@ -808,16 +821,16 @@ namespace drawinglayer { const MapMode aMapMode100thmm(MAP_100TH_MM); - Size aBitmapSize(getGraphicObject().GetPrefSize()); + Size aBitmapSize(rGraphicObject.GetPrefSize()); // #i95968# better support PrefMapMode; special for MAP_PIXEL was missing - if(MAP_PIXEL == getGraphicObject().GetPrefMapMode().GetMapUnit()) + if(MAP_PIXEL == rGraphicObject.GetPrefMapMode().GetMapUnit()) { aBitmapSize = Application::GetDefaultDevice()->PixelToLogic(aBitmapSize, aMapMode100thmm); } else { - aBitmapSize = Application::GetDefaultDevice()->LogicToLogic(aBitmapSize, getGraphicObject().GetPrefMapMode(), aMapMode100thmm); + aBitmapSize = Application::GetDefaultDevice()->LogicToLogic(aBitmapSize, rGraphicObject.GetPrefMapMode(), aMapMode100thmm); } const double fDivX(aBitmapSize.Width() - getGraphicAttr().GetLeftCrop() - getGraphicAttr().GetRightCrop()); diff --git a/drawinglayer/source/primitive2d/makefile.mk b/drawinglayer/source/primitive2d/makefile.mk index 720769a0efd5..77e59dca2469 100644 --- a/drawinglayer/source/primitive2d/makefile.mk +++ b/drawinglayer/source/primitive2d/makefile.mk @@ -42,6 +42,7 @@ SLOFILES= \ $(SLO)$/baseprimitive2d.obj \ $(SLO)$/backgroundcolorprimitive2d.obj \ $(SLO)$/bitmapprimitive2d.obj \ + $(SLO)$/rendergraphicprimitive2d.obj \ $(SLO)$/borderlineprimitive2d.obj \ $(SLO)$/chartprimitive2d.obj \ $(SLO)$/controlprimitive2d.obj \ diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index 893c572a3086..9988eb884679 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -63,6 +63,7 @@ #include #include #include +#include #include ////////////////////////////////////////////////////////////////////////////// @@ -3068,6 +3069,33 @@ namespace break; } + case META_RENDERGRAPHIC_ACTION : + { + const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*)pAction; + const Rectangle aRectangle(pA->GetPoint(), pA->GetSize()); + + if(!aRectangle.IsEmpty()) + { + // create object transform + basegfx::B2DHomMatrix aObjectTransform; + + aObjectTransform.set(0, 0, aRectangle.GetWidth()); + aObjectTransform.set(1, 1, aRectangle.GetHeight()); + aObjectTransform.set(0, 2, aRectangle.Left()); + aObjectTransform.set(1, 2, aRectangle.Top()); + + // add current transformation + aObjectTransform = rPropertyHolders.Current().getTransformation() * aObjectTransform; + + // embed using EpsPrimitive + rTargetHolders.Current().append( + new drawinglayer::primitive2d::RenderGraphicPrimitive2D( + pA->GetRenderGraphic(), + aObjectTransform ) ); + } + + break; + } case META_COMMENT_ACTION : { /** CHECKED, WORKS WELL */ diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx index aaafa42ec44e..74166d4fba33 100644 --- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx +++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx @@ -528,6 +528,8 @@ namespace drawinglayer case PRIMITIVE2D_ID_FILLGRADIENTPRIMITIVE2D : case PRIMITIVE2D_ID_FILLHATCHPRIMITIVE2D : case PRIMITIVE2D_ID_PAGEPREVIEWPRIMITIVE2D : + case PRIMITIVE2D_ID_MEDIAPRIMITIVE2D: + case PRIMITIVE2D_ID_RENDERGRAPHICPRIMITIVE2D: { if(!getHitTextOnly()) { diff --git a/drawinglayer/source/processor2d/linegeometryextractor2d.cxx b/drawinglayer/source/processor2d/linegeometryextractor2d.cxx index be3601dd0024..6eac340a7aab 100644 --- a/drawinglayer/source/processor2d/linegeometryextractor2d.cxx +++ b/drawinglayer/source/processor2d/linegeometryextractor2d.cxx @@ -123,6 +123,7 @@ namespace drawinglayer case PRIMITIVE2D_ID_MARKERARRAYPRIMITIVE2D : case PRIMITIVE2D_ID_POINTARRAYPRIMITIVE2D : case PRIMITIVE2D_ID_BITMAPPRIMITIVE2D : + case PRIMITIVE2D_ID_RENDERGRAPHICPRIMITIVE2D : case PRIMITIVE2D_ID_METAFILEPRIMITIVE2D : case PRIMITIVE2D_ID_MASKPRIMITIVE2D : { diff --git a/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx b/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx index b9ad83373923..73b5189979ff 100644 --- a/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx +++ b/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx @@ -214,6 +214,7 @@ namespace drawinglayer case PRIMITIVE2D_ID_MARKERARRAYPRIMITIVE2D : case PRIMITIVE2D_ID_POINTARRAYPRIMITIVE2D : case PRIMITIVE2D_ID_BITMAPPRIMITIVE2D : + case PRIMITIVE2D_ID_RENDERGRAPHICPRIMITIVE2D : case PRIMITIVE2D_ID_METAFILEPRIMITIVE2D : case PRIMITIVE2D_ID_MASKPRIMITIVE2D : { diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 263cdeede4f8..96ccc30a8f9a 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -1287,6 +1288,12 @@ namespace drawinglayer RenderBitmapPrimitive2D(static_cast< const primitive2d::BitmapPrimitive2D& >(rCandidate)); break; } + case PRIMITIVE2D_ID_RENDERGRAPHICPRIMITIVE2D : + { + // direct draw of transformed RenderGraphic primitive; use default processing + RenderRenderGraphicPrimitive2D(static_cast< const primitive2d::RenderGraphicPrimitive2D& >(rCandidate)); + break; + } case PRIMITIVE2D_ID_POLYPOLYGONBITMAPPRIMITIVE2D : { // need to handle PolyPolygonBitmapPrimitive2D here to support XPATHFILL_SEQ_BEGIN/XPATHFILL_SEQ_END diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 6a280fcad95e..a08f718e4283 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -193,6 +194,12 @@ namespace drawinglayer RenderBitmapPrimitive2D(static_cast< const primitive2d::BitmapPrimitive2D& >(rCandidate)); break; } + case PRIMITIVE2D_ID_RENDERGRAPHICPRIMITIVE2D : + { + // direct draw of transformed BitmapEx primitive + RenderRenderGraphicPrimitive2D(static_cast< const primitive2d::RenderGraphicPrimitive2D& >(rCandidate)); + break; + } case PRIMITIVE2D_ID_FILLBITMAPPRIMITIVE2D : { // direct draw of fillBitmapPrimitive diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index e49e54fb751c..bcfa4b6776a3 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -60,6 +61,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// // control support @@ -421,6 +423,75 @@ namespace drawinglayer } } + void VclProcessor2D::RenderRenderGraphicPrimitive2D(const primitive2d::RenderGraphicPrimitive2D& rRenderGraphicCandidate) + { + // create local transform + basegfx::B2DHomMatrix aLocalTransform(maCurrentTransformation * rRenderGraphicCandidate.getTransform()); + vcl::RenderGraphic aRenderGraphic(rRenderGraphicCandidate.getRenderGraphic()); + bool bPainted(false); + + if(maBColorModifierStack.count()) + { + // !!! TODO + // aRenderGraphic = impModifyRenderGraphic(maBColorModifierStack, aRenderGraphic); + + if(aRenderGraphic.IsEmpty()) + { + // color gets completely replaced, get it + const basegfx::BColor aModifiedColor(maBColorModifierStack.getModifiedColor(basegfx::BColor())); + basegfx::B2DPolygon aPolygon(basegfx::tools::createUnitPolygon()); + aPolygon.transform(aLocalTransform); + + mpOutputDevice->SetFillColor(Color(aModifiedColor)); + mpOutputDevice->SetLineColor(); + mpOutputDevice->DrawPolygon(aPolygon); + + bPainted = true; + } + } + + if(!bPainted) + { + // decompose matrix to check for shear, rotate and mirroring + basegfx::B2DVector aScale, aTranslate; + double fRotate, fShearX; + aLocalTransform.decompose(aScale, aTranslate, fRotate, fShearX); + + basegfx::B2DRange aOutlineRange(0.0, 0.0, 1.0, 1.0); + + if( basegfx::fTools::equalZero( fRotate ) ) + { + aOutlineRange.transform( aLocalTransform ); + } + else + { + // !!! TODO + // if rotated, create the unrotated output rectangle for the GraphicManager paint + /* + const basegfx::B2DHomMatrix aSimpleObjectMatrix(basegfx::tools::createScaleTranslateB2DHomMatrix( + fabs(aScale.getX()), fabs(aScale.getY()), + aTranslate.getX(), aTranslate.getY())); + + aOutlineRange.transform(aSimpleObjectMatrix); + */ + } + + // prepare dest coordinates + const Point aPoint( basegfx::fround(aOutlineRange.getMinX() ), + basegfx::fround(aOutlineRange.getMinY() ) ); + const Size aSize( basegfx::fround(aOutlineRange.getWidth() ), + basegfx::fround(aOutlineRange.getHeight() ) ); + const Size aSizePixel( mpOutputDevice->LogicToPixel( aSize ) ); + const vcl::RenderGraphicRasterizer aRasterizer( aRenderGraphic ); + const BitmapEx aBitmapEx( aRasterizer.Rasterize( aSizePixel, fRotate, fShearX ) ); + + if( !aBitmapEx.IsEmpty() ) + { + mpOutputDevice->DrawBitmapEx( aPoint, aSize, aBitmapEx ); + } + } + } + void VclProcessor2D::RenderFillBitmapPrimitive2D(const primitive2d::FillBitmapPrimitive2D& rFillBitmapCandidate) { const attribute::FillBitmapAttribute& rFillBitmapAttribute(rFillBitmapCandidate.getFillBitmap()); diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index ae171230dd13..2475bd6f35ba 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -4833,6 +4833,33 @@ 1 + + + KA + Specifies default settings of SVG export dialog. + + + + KA + Specifies if SVG Tiny profile should be used for export. + + false + + + + KA + Specifies if fonts should be embedded into SVG file. + + true + + + + KA + Specifies if text decoration like underlining and strike-through be drawm by using SVG attributes (true) or by drawing SVG primitives (false). + + true + + diff --git a/svx/inc/svx/svdograf.hxx b/svx/inc/svx/svdograf.hxx index 1eba8822402a..c76c77ec325a 100644 --- a/svx/inc/svx/svdograf.hxx +++ b/svx/inc/svx/svdograf.hxx @@ -148,6 +148,7 @@ public: // Keep ATM for SD. sal_Bool IsAnimated() const; sal_Bool IsEPS() const; + sal_Bool IsRenderGraphic() const; sal_Bool IsSwappedOut() const; const MapMode& GetGrafPrefMapMode() const; diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index d010109d34b3..71b50a93f894 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -1001,6 +1001,9 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf ) default: { + OSL_ENSURE( pAction->GetType() != META_RENDERGRAPHIC_ACTION, + "META_RENDERGRAPHIC_ACTION currently not supported at masking" ); + pAction->Duplicate(); aMtf.AddAction( pAction ); } diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 730c1179a07e..9e34e463c805 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -901,6 +901,7 @@ BOOL GalleryTheme::InsertGraphic( const Graphic& rGraphic, ULONG nInsertPos ) case( GFX_LINK_TYPE_NATIVE_WMF ): nExportFormat = CVT_WMF; break; case( GFX_LINK_TYPE_NATIVE_MET ): nExportFormat = CVT_MET; break; case( GFX_LINK_TYPE_NATIVE_PCT ): nExportFormat = CVT_PCT; break; + case( GFX_LINK_TYPE_NATIVE_SVG ): nExportFormat = CVT_SVG; break; default: break; } diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index d2c1e7bc52ef..05d7c7711430 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -644,8 +644,12 @@ void SdrEditView::CheckPossibilities() BOOL bGraf=HAS_BASE(SdrGrafObj,pObj); BOOL bOle2=HAS_BASE(SdrOle2Obj,pObj); - if( bGraf && ((SdrGrafObj*)pObj)->HasGDIMetaFile() && !((SdrGrafObj*)pObj)->IsEPS() ) + if( bGraf && + ((SdrGrafObj*)pObj)->HasGDIMetaFile() && + !( ((SdrGrafObj*)pObj)->IsEPS() || ((SdrGrafObj*)pObj)->IsRenderGraphic() ) ) + { bImportMtfPossible = TRUE; + } if (bOle2) bImportMtfPossible=((SdrOle2Obj*)pObj)->GetObjRef().is(); diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index f10610317578..cf282aab3dc7 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -195,7 +195,7 @@ ULONG ImpSdrGDIMetaFileImport::DoImport(const GDIMetaFile& rMtf, case META_POP_ACTION : DoAction((MetaPopAction &)*pAct); break; case META_HATCH_ACTION : DoAction((MetaHatchAction &)*pAct); break; case META_COMMENT_ACTION : DoAction((MetaCommentAction &)*pAct, pMtf); break; - + case META_RENDERGRAPHIC_ACTION : DoAction((MetaRenderGraphicAction &)*pAct); break; } if(pProgrInfo != NULL) @@ -272,7 +272,7 @@ void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, FASTBOOL bForceText { bNoLine = FALSE; bNoFill = FALSE; FASTBOOL bLine=TRUE && !bForceTextAttr; - FASTBOOL bFill=pObj==NULL || pObj->IsClosedObj() && !bForceTextAttr; + FASTBOOL bFill=pObj==NULL || ( pObj->IsClosedObj() && !bForceTextAttr ); FASTBOOL bText=bForceTextAttr || (pObj!=NULL && pObj->GetOutlinerParaObject()!=NULL); if ( bLine ) @@ -1025,4 +1025,25 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaCommentAction& rAct, GDIMetaFile* pM } } +//////////////////////////////////////////////////////////////////////////////////////////////////// + +void ImpSdrGDIMetaFileImport::DoAction(MetaRenderGraphicAction& rAct) +{ + GDIMetaFile aMtf; + const ::vcl::RenderGraphic& rRenderGraphic = rAct.GetRenderGraphic(); + Rectangle aRect( rAct.GetPoint(), rAct.GetSize() ); + const Point aPos; + const Size aPrefSize( rRenderGraphic.GetPrefSize() ); + + aRect.Right()++; aRect.Bottom()++; + + aMtf.SetPrefMapMode( rRenderGraphic.GetPrefMapMode() ); + aMtf.SetPrefSize( aPrefSize ); + aMtf.AddAction( new MetaRenderGraphicAction( aPos, aPrefSize, rRenderGraphic ) ); + aMtf.WindStart(); + + SdrGrafObj* pGraf=new SdrGrafObj( aMtf, aRect ); + InsertObj( pGraf ); +} + // eof diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx index 2562b81efa8d..494e43dbadfc 100644 --- a/svx/source/svdraw/svdfmtf.hxx +++ b/svx/source/svdraw/svdfmtf.hxx @@ -140,6 +140,7 @@ protected: void DoAction(MetaISectRectClipRegionAction& rAct) { rAct.Execute(&aVD); } void DoAction(MetaISectRegionClipRegionAction& rAct) { rAct.Execute(&aVD); } void DoAction(MetaCommentAction& rAct, GDIMetaFile* pMtf); + void DoAction(MetaRenderGraphicAction& rAct); void ImportText( const Point& rPos, const XubString& rStr, const MetaAction& rAct ); void SetAttributes(SdrObject* pObj, FASTBOOL bForceTextAttr=FALSE); diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index b299d4c7a2ef..e95e3bf5296e 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -504,6 +504,11 @@ sal_Bool SdrGrafObj::IsEPS() const return pGraphic->IsEPS(); } +sal_Bool SdrGrafObj::IsRenderGraphic() const +{ + return pGraphic->IsRenderGraphic(); +} + sal_Bool SdrGrafObj::IsSwappedOut() const { return mbIsPreview ? sal_True : pGraphic->IsSwappedOut(); @@ -658,6 +663,7 @@ void SdrGrafObj::ReleaseGraphicLink() void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const { FASTBOOL bAnim = pGraphic->IsAnimated(); + FASTBOOL bRenderGraphic = pGraphic->HasRenderGraphic(); FASTBOOL bNoPresGrf = ( pGraphic->GetType() != GRAPHIC_NONE ) && !bEmptyPresObj; rInfo.bResizeFreeAllowed = aGeo.nDrehWink % 9000 == 0 || @@ -665,11 +671,11 @@ void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const aGeo.nDrehWink % 27000 == 0; rInfo.bResizePropAllowed = TRUE; - rInfo.bRotateFreeAllowed = bNoPresGrf && !bAnim; - rInfo.bRotate90Allowed = bNoPresGrf && !bAnim; - rInfo.bMirrorFreeAllowed = bNoPresGrf && !bAnim; - rInfo.bMirror45Allowed = bNoPresGrf && !bAnim; - rInfo.bMirror90Allowed = !bEmptyPresObj; + rInfo.bRotateFreeAllowed = bNoPresGrf && !bAnim && !bRenderGraphic; + rInfo.bRotate90Allowed = bNoPresGrf && !bAnim && !bRenderGraphic; + rInfo.bMirrorFreeAllowed = bNoPresGrf && !bAnim && !bRenderGraphic; + rInfo.bMirror45Allowed = bNoPresGrf && !bAnim && !bRenderGraphic; + rInfo.bMirror90Allowed = !bEmptyPresObj && !bRenderGraphic; rInfo.bTransparenceAllowed = FALSE; rInfo.bGradientAllowed = FALSE; rInfo.bShearAllowed = FALSE; @@ -677,7 +683,7 @@ void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const rInfo.bCanConvToPath = FALSE; rInfo.bCanConvToPathLineToArea = FALSE; rInfo.bCanConvToPolyLineToArea = FALSE; - rInfo.bCanConvToPoly = !IsEPS(); + rInfo.bCanConvToPoly = !IsEPS() && !bRenderGraphic; rInfo.bCanConvToContour = (rInfo.bCanConvToPoly || LineGeometryUsageIsNecessary()); } diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index a1a7565f314d..548224991b19 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -153,7 +153,7 @@ SvXMLGraphicInputStream::SvXMLGraphicInputStream( const ::rtl::OUString& rGraphi { pStm->SetVersion( SOFFICE_FILEFORMAT_8 ); pStm->SetCompressMode( COMPRESSMODE_ZBITMAP ); - ( (GDIMetaFile&) aGraphic.GetGDIMetaFile() ).Write( *pStm ); + ( (GDIMetaFile&) aGraphic.GetGDIMetaFile() ).Write( *pStm, GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC ); bRet = ( pStm->GetError() == 0 ); } } @@ -543,7 +543,8 @@ String SvXMLGraphicHelper::ImplGetGraphicMimeType( const String& rFileName ) con { "gif", "image/gif" }, { "png", "image/png" }, { "jpg", "image/jpeg" }, - { "tif", "image/tiff" } + { "tif", "image/tiff" }, + { "svg", "image/svg+xml" } }; String aMimeType; @@ -648,7 +649,7 @@ sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const ::rtl::OUString& rPictureSt pStream->Write( rLink.GetData(), rLink.GetDataSize() ); } else - rMtf.Write( *pStream ); + rMtf.Write( *pStream, GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC ); bRet = ( pStream->GetError() == 0 ); } @@ -728,6 +729,7 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s case( GFX_LINK_TYPE_NATIVE_WMF ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".wmf" ) ); break; case( GFX_LINK_TYPE_NATIVE_MET ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".met" ) ); break; case( GFX_LINK_TYPE_NATIVE_PCT ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".pct" ) ); break; + case( GFX_LINK_TYPE_NATIVE_SVG ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".svg" ) ); break; default: aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".grf" ) ); @@ -1160,4 +1162,3 @@ Sequence< ::rtl::OUString > SAL_CALL SvXMLGraphicExportHelper_getSupportedServic } } // namespace svx - -- cgit v1.2.3 From b40b6a312b76e3e2b7b570fd500db11507134590 Mon Sep 17 00:00:00 2001 From: ka Date: Fri, 4 Feb 2011 14:49:25 +0100 Subject: ka102: SVG import implementation --- extensions/prj/build.lst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/extensions/prj/build.lst b/extensions/prj/build.lst index f283da39a4af..9c35067b667d 100644 --- a/extensions/prj/build.lst +++ b/extensions/prj/build.lst @@ -17,9 +17,8 @@ ex extensions\source\plugin\unx nmake - u ex_plunx ex_inc ex extensions\source\plugin\util nmake - all ex_plutil ex_plbase ex_plunx.u ex_plwin.w ex_plaqua.u ex_inc NULL ex extensions\source\macosx\spotlight nmake - u ex_mxspotlight NULL ex extensions\source\scanner nmake - all ex_scan ex_resrc ex_inc NULL -ex extensions\source\svg nmake - all ex_svg ex_scan ex_inc NULL ex extensions\source\bibliography nmake - all ex_bib ex_inc NULL -ex extensions\source\xmlextract nmake - all ex_xmlextr ex_svg ex_inc NULL +ex extensions\source\xmlextract nmake - all ex_xmlextr ex_inc NULL ex extensions\source\propctrlr nmake - all ex_propctrlr ex_bib ex_inc NULL ex extensions\source\dbpilots nmake - all ex_dbpilots ex_inc NULL ex extensions\source\abpilot nmake - all ex_abpilot ex_inc NULL -- cgit v1.2.3 From 741d6b3b5aac228e8d9c86b8df6aa43fc9bb9826 Mon Sep 17 00:00:00 2001 From: ka Date: Fri, 4 Feb 2011 14:49:25 +0100 Subject: ka102: SVG import implementation --- offapi/com/sun/star/graphic/XGraphic.idl | 2 ++ offapi/com/sun/star/graphic/makefile.mk | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/offapi/com/sun/star/graphic/XGraphic.idl b/offapi/com/sun/star/graphic/XGraphic.idl index 999d815be2ae..9cb351da156b 100755 --- a/offapi/com/sun/star/graphic/XGraphic.idl +++ b/offapi/com/sun/star/graphic/XGraphic.idl @@ -63,3 +63,5 @@ published interface XGraphic : ::com::sun::star::uno::XInterface } ; } ; } ; } ; #endif + + diff --git a/offapi/com/sun/star/graphic/makefile.mk b/offapi/com/sun/star/graphic/makefile.mk index 4ee0031ab5db..6e4a0187c15c 100755 --- a/offapi/com/sun/star/graphic/makefile.mk +++ b/offapi/com/sun/star/graphic/makefile.mk @@ -42,7 +42,9 @@ IDLFILES= \ Graphic.idl \ GraphicColorMode.idl \ GraphicDescriptor.idl \ + GraphicObject.idl \ GraphicProvider.idl \ + GraphicRasterizer.idl \ GraphicRendererVCL.idl \ GraphicType.idl \ MediaProperties.idl \ @@ -51,9 +53,9 @@ IDLFILES= \ XPrimitiveFactory2D.idl \ XGraphic.idl \ XGraphicProvider.idl \ + XGraphicRasterizer.idl \ XGraphicRenderer.idl \ XGraphicObject.idl \ - GraphicObject.idl \ XGraphicTransformer.idl # --- Targets ------------------------------------------------------ -- cgit v1.2.3 From 4fd0369d3877ab9617ee2bf4381ac03898ded01d Mon Sep 17 00:00:00 2001 From: ka Date: Fri, 4 Feb 2011 14:49:25 +0100 Subject: ka102: SVG import implementation --- sw/source/ui/shells/grfsh.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx index 037758450081..c0d869e77ae4 100644 --- a/sw/source/ui/shells/grfsh.cxx +++ b/sw/source/ui/shells/grfsh.cxx @@ -519,6 +519,8 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) rSh.GetCurAttr( aCoreSet ); BOOL bParentCntProt = 0 != rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ); BOOL bIsGrfCntnt = CNT_GRF == GetShell().GetCntType(); + const GraphicObject* pGrfObj = ( bIsGrfCntnt ? rSh.GetGraphicObj() : NULL ); + BOOL bIsRenderGraphicGrfCntnt = ( pGrfObj && pGrfObj->IsRenderGraphic() ); // --> OD 2006-11-03 #i59688# // BOOL bSwappedOut = rSh.IsGrfSwapOut( TRUE ); // BOOL bBitmapType = !bSwappedOut && GRAPHIC_BITMAP == rSh.GetGraphicType(); @@ -701,7 +703,3 @@ SwGrfShell::SwGrfShell(SwView &_rView) : SetName(String::CreateFromAscii("Graphic")); SetHelpId(SW_GRFSHELL); } - - - - -- cgit v1.2.3 From 5728aaf9106ff05b15dbace10654592bbbc5c897 Mon Sep 17 00:00:00 2001 From: ka Date: Fri, 4 Feb 2011 14:49:25 +0100 Subject: ka102: SVG import implementation --- configure | 27707 +++++++++++++++++++++++------------------------------------- 1 file changed, 10380 insertions(+), 17327 deletions(-) diff --git a/configure b/configure index e47fd5f11059..1ee857c03789 100755 --- a/configure +++ b/configure @@ -1,82 +1,416 @@ #! /bin/sh # From configure.in Revision: 1.290 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59. +# Generated by GNU Autoconf 2.67. +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# # -# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac fi -DUALCASE=1; export DUALCASE # for MKS sh -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false + +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' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +# 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 PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME +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 do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var + 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." else - $as_unset $as_var + $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 -done + 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 STATUS 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=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` - -# PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -84,146 +418,107 @@ 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 - # 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 | + 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 | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } + 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; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +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';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file else - as_expr=false + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -232,38 +527,25 @@ 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 - +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/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= @@ -271,50 +553,664 @@ PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= +PACKAGE_URL= # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS EGREP AWK SED LOCAL_SOLENV _solenv UPD SOURCEVERSION build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os GNUTAR OSVERSION PTHREAD_CFLAGS PTHREAD_LIBS ENABLE_CRASHDUMP VC_STANDARD ENABLE_WERROR ENABLE_DEBUG PRODUCT PROFULLSWITCH PROEXT ENABLE_SYMBOLS DISABLE_STRIP ENABLE_CUPS ENABLE_FONTCONFIG TARFILE_LOCATION DO_FETCH_TARBALLS WITH_BINFILTER ENABLE_DIRECTX DISABLE_ACTIVEX DISABLE_ATL ENABLE_RPATH WITH_MYSPELL_DICTS SYSTEM_DICTS DICT_SYSTEM_DIR HYPH_SYSTEM_DIR THES_SYSTEM_DIR WITH_MINGWIN SHELLPATH GCC_HOME CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT COMPATH GCCVER HAVE_LD_BSYMBOLIC_FUNCTIONS ENABLE_PCH GNUMAKE _cc HAVE_LD_HASH_STYLE PERL MSPDB_PATH COMEX USE_MINGW MIDL_PATH CSC_PATH FRAME_HOME CPP CXX CXXFLAGS ac_ct_CXX CXXCPP SIZEOF_LONG WORDS_BIGENDIAN LFS_CFLAGS ENABLE_VBA VBA_EXTENSION PAM NEW_SHADOW_API PAM_LINK CRYPT_LINK GXX_INCLUDE_PATH MINGW_LIB_INCLUDE_PATH MINGW_BACKWARD_INCLUDE_PATH MINGW_CLIB_DIR MINGW_SHARED_GCCLIB MINGW_GCCLIB_EH MINGW_SHARED_GXXLIB MINGW_SHARED_LIBSTDCPP MINGW_GCCDLL MINGW_GXXDLL EXCEPTIONS STLPORT4 STLPORT_VER USE_SYSTEM_STL USE_CCACHE CCACHE HAVE_GCC_VISIBILITY_FEATURE ALLOC BUILD_VER_STRING SOLAR_JAVA JAVAINTERPRETER JAVACOMPILER JAVACISGCJ JAVADOC AWTLIB JAVAAOTCOMPILER JAVA_HOME JDK JAVAFLAGS JAVAIFLAGS DMAKE BUILD_DMAKE EPM DPKG PKGMK BUILD_EPM RPM PKGFORMAT GPERF BUILD_STAX MINGWCXX ac_ct_MINGWCXX MINGWSTRIP ac_ct_MINGWSTRIP BUILD_UNOWINREG SYSTEM_STDLIBS SYSTEM_ZLIB SYSTEM_JPEG SYSTEM_EXPAT PKG_CONFIG LIBWPD_CFLAGS LIBWPD_LIBS SYSTEM_LIBWPD CPPUNIT_CFLAGS CPPUNIT_LIBS SYSTEM_CPPUNIT FREETYPE_CFLAGS FREETYPE_LIBS USE_FT_EMBOLDEN LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC SYSTEM_LIBXSLT LIBXML_CFLAGS LIBXML_LIBS SYSTEM_LIBXML PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir BZIP2 SYSTEM_PYTHON PYTHON_CFLAGS PYTHON_LIBS HOME SYSTEM_DB DB_VERSION DB_INCLUDES DB_JAR SYSTEM_LUCENE LUCENE_CORE_JAR LUCENE_ANALYZERS_JAR ENABLE_MYSQLC MYSQLCONFIG SYSTEM_MYSQL MYSQL_INC MYSQL_LIB MYSQL_DEFINES LIBMYSQL_PATH SYSTEM_MYSQL_CPPCONN SYSTEM_HSQLDB HSQLDB_JAR SYSTEM_BSH BSH_JAR SERIALIZER_JAR SYSTEM_SAXON SAXON_JAR CURLCONFIG SYSTEM_CURL CURL_CFLAGS CURL_LIBS SYSTEM_MDDS SYSTEM_BOOST SYSTEM_VIGRA SYSTEM_ODBC_HEADERS WITH_MOZILLA WITH_LDAP WITH_OPENLDAP MOZ_NSS_CFLAGS MOZ_NSS_LIBS NSS_LIB MOZ_NSPR_CFLAGS MOZ_NSPR_LIBS NSPR_LIB MOZILLAXPCOM_CFLAGS MOZILLAXPCOM_LIBS MOZILLA_VERSION MOZILLA_TOOLKIT MOZGTK2_CFLAGS MOZGTK2_LIBS MOZLIBREQ_CFLAGS MOZLIBREQ_LIBS BUILD_MOZAB ENABLE_NSS_MODULE MOZILLABUILD SYSTEM_MOZILLA MOZ_FLAVOUR MOZ_INC MOZ_LIB MOZ_LIB_XPCOM MOZ_LDAP_CFLAGS SYSTEM_SANE_HEADER SYSTEM_GENBRK SYSTEM_GENCCODE SYSTEM_GENCMN SYSTEM_ICU GRAPHITE_CFLAGS GRAPHITE_LIBS ENABLE_GRAPHITE SYSTEM_GRAPHITE X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XINC XLIB XAU_LIBS DISABLE_XAW SYSTEM_XRENDER_HEADERS XRENDER_LINK XRANDR_CFLAGS XRANDR_LIBS XRANDR_DLOPEN ENABLE_RANDR DISABLE_NEON NEON_CFLAGS NEON_LIBS SYSTEM_NEON NEON_VERSION OPENSSL_CFLAGS OPENSSL_LIBS SYSTEM_OPENSSL ENABLE_AGG AGG_CFLAGS AGG_LIBS SYSTEM_AGG AGG_VERSION REDLAND_CFLAGS REDLAND_LIBS SYSTEM_REDLAND HUNSPELL_CFLAGS HUNSPELL_LIBS SYSTEM_HUNSPELL SYSTEM_HYPH HYPHEN_LIB MYTHES_CFLAGS MYTHES_LIBS SYSTEM_MYTHES SYSTEM_LPSOLVE SYSTEM_LIBTEXTCAT SYSTEM_LIBTEXTCAT_DATA HAVE_GETOPT HAVE_READDIR_R SYSTEM_LIBC PSDK_HOME WINDOWS_VISTA_PSDK DIRECTXSDK_HOME DIRECTXSDK_LIB NSIS_PATH BISON FLEX PATCH GNUCP GNUPATCH CYGWIN_PATH ML_EXE ASM_HOME ZIP UNZIP ZIP_HOME ENABLE_GTK ENABLE_KDE ENABLE_KDE4 GCONF_CFLAGS GCONF_LIBS ENABLE_GCONF GNOMEVFS_CFLAGS GNOMEVFS_LIBS ENABLE_GNOMEVFS GTK_CFLAGS GTK_LIBS DBUS_CFLAGS DBUS_LIBS GIO_CFLAGS GIO_LIBS ENABLE_GIO ENABLE_DBUS ENABLE_SYSTRAY_GTK GSTREAMER_CFLAGS GSTREAMER_LIBS ENABLE_GSTREAMER CAIRO_CFLAGS CAIRO_LIBS ENABLE_CAIRO BUILD_PIXMAN SYSTEM_CAIRO ENABLE_OPENGL ENABLE_PRESENTER_EXTRA_UI ENABLE_MINIMIZER ENABLE_PRESENTER_SCREEN POPPLER_CFLAGS POPPLER_LIBS ENABLE_PDFIMPORT SYSTEM_POPPLER ENABLE_MEDIAWIKI SYSTEM_SERVLETAPI SERVLETAPI_JAR ENABLE_REPORTBUILDER SYSTEM_JFREEREPORT SAC_JAR LIBXML_JAR FLUTE_JAR JFREEREPORT_JAR LIBBASE_JAR LIBLAYOUT_JAR LIBLOADER_JAR LIBFORMULA_JAR LIBREPOSITORY_JAR LIBFONTS_JAR LIBSERIALIZER_JAR SYSTEM_APACHE_COMMONS COMMONS_CODEC_JAR COMMONS_LANG_JAR COMMONS_HTTPCLIENT_JAR COMMONS_LOGGING_JAR MOC KDE_CFLAGS KDE_LIBS MOC4 KDE4_CFLAGS KDE4_LIBS ENABLE_LOCKDOWN GOBJECT_CFLAGS GOBJECT_LIBS ENABLE_EVOAB2 ENABLE_KAB WITH_FONTS WITHOUT_PPDS WITHOUT_AFMS SCPDEFS USE_XINERAMA XINERAMA_LINK ANT ANT_HOME ANT_LIB OOO_JUNIT_JAR WITH_LANG WITH_POOR_HELP_LOCALIZATIONS WITH_DICT INTRO_BITMAPS ABOUT_BITMAPS OOO_VENDOR UNIXWRAPPERNAME ENABLE_STATIC_GTK ENABLE_LAYOUT VERBOSE nodep LOCAL_SOLVER BUILD_TYPE LIBOBJS LTLIBOBJS' +ac_subst_vars='LTLIBOBJS +LIBOBJS +BUILD_TYPE +LOCAL_SOLVER +nodep +VERBOSE +ENABLE_LAYOUT +ENABLE_STATIC_GTK +UNIXWRAPPERNAME +OOO_VENDOR +ABOUT_BITMAPS +INTRO_BITMAPS +WITH_DICT +WITH_POOR_HELP_LOCALIZATIONS +WITH_LANG +OOO_JUNIT_JAR +ANT_LIB +ANT_HOME +ANT +XINERAMA_LINK +USE_XINERAMA +SCPDEFS +WITHOUT_AFMS +WITHOUT_PPDS +WITH_FONTS +ENABLE_KAB +ENABLE_EVOAB2 +GOBJECT_LIBS +GOBJECT_CFLAGS +ENABLE_LOCKDOWN +KDE4_LIBS +KDE4_CFLAGS +MOC4 +KDE_LIBS +KDE_CFLAGS +MOC +COMMONS_LOGGING_JAR +COMMONS_HTTPCLIENT_JAR +COMMONS_LANG_JAR +COMMONS_CODEC_JAR +SYSTEM_APACHE_COMMONS +LIBSERIALIZER_JAR +LIBFONTS_JAR +LIBREPOSITORY_JAR +LIBFORMULA_JAR +LIBLOADER_JAR +LIBLAYOUT_JAR +LIBBASE_JAR +JFREEREPORT_JAR +FLUTE_JAR +LIBXML_JAR +SAC_JAR +SYSTEM_JFREEREPORT +ENABLE_REPORTBUILDER +SERVLETAPI_JAR +SYSTEM_SERVLETAPI +ENABLE_MEDIAWIKI +SYSTEM_POPPLER +ENABLE_PDFIMPORT +POPPLER_LIBS +POPPLER_CFLAGS +ENABLE_PRESENTER_SCREEN +ENABLE_MINIMIZER +ENABLE_PRESENTER_EXTRA_UI +ENABLE_OPENGL +SYSTEM_CAIRO +BUILD_PIXMAN +ENABLE_CAIRO +CAIRO_LIBS +CAIRO_CFLAGS +ENABLE_GSTREAMER +GSTREAMER_LIBS +GSTREAMER_CFLAGS +ENABLE_SYSTRAY_GTK +ENABLE_DBUS +ENABLE_GIO +GIO_LIBS +GIO_CFLAGS +DBUS_LIBS +DBUS_CFLAGS +GTK_LIBS +GTK_CFLAGS +ENABLE_GNOMEVFS +GNOMEVFS_LIBS +GNOMEVFS_CFLAGS +ENABLE_GCONF +GCONF_LIBS +GCONF_CFLAGS +ENABLE_KDE4 +ENABLE_KDE +ENABLE_GTK +ZIP_HOME +UNZIP +ZIP +ASM_HOME +ML_EXE +CYGWIN_PATH +GNUPATCH +GNUCP +PATCH +FLEX +BISON +NSIS_PATH +DIRECTXSDK_LIB +DIRECTXSDK_HOME +WINDOWS_VISTA_PSDK +PSDK_HOME +SYSTEM_LIBC +HAVE_READDIR_R +HAVE_GETOPT +SYSTEM_LIBTEXTCAT_DATA +SYSTEM_LIBTEXTCAT +SYSTEM_LPSOLVE +SYSTEM_MYTHES +MYTHES_LIBS +MYTHES_CFLAGS +HYPHEN_LIB +SYSTEM_HYPH +SYSTEM_HUNSPELL +HUNSPELL_LIBS +HUNSPELL_CFLAGS +SYSTEM_REDLAND +REDLAND_LIBS +REDLAND_CFLAGS +AGG_VERSION +SYSTEM_AGG +AGG_LIBS +AGG_CFLAGS +ENABLE_AGG +SYSTEM_OPENSSL +OPENSSL_LIBS +OPENSSL_CFLAGS +NEON_VERSION +SYSTEM_NEON +NEON_LIBS +NEON_CFLAGS +DISABLE_NEON +ENABLE_RANDR +XRANDR_DLOPEN +XRANDR_LIBS +XRANDR_CFLAGS +XRENDER_LINK +SYSTEM_XRENDER_HEADERS +DISABLE_XAW +XAU_LIBS +XLIB +XINC +X_EXTRA_LIBS +X_LIBS +X_PRE_LIBS +X_CFLAGS +XMKMF +SYSTEM_GRAPHITE +ENABLE_GRAPHITE +GRAPHITE_LIBS +GRAPHITE_CFLAGS +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 +SYSTEM_MDDS +CURL_LIBS +CURL_CFLAGS +SYSTEM_CURL +CURLCONFIG +SAXON_JAR +SYSTEM_SAXON +SERIALIZER_JAR +BSH_JAR +SYSTEM_BSH +HSQLDB_JAR +SYSTEM_HSQLDB +SYSTEM_MYSQL_CPPCONN +LIBMYSQL_PATH +MYSQL_DEFINES +MYSQL_LIB +MYSQL_INC +SYSTEM_MYSQL +MYSQLCONFIG +ENABLE_MYSQLC +LUCENE_ANALYZERS_JAR +LUCENE_CORE_JAR +SYSTEM_LUCENE +DB_JAR +DB_INCLUDES +DB_VERSION +SYSTEM_DB +HOME +PYTHON_LIBS +PYTHON_CFLAGS +SYSTEM_PYTHON +BZIP2 +pkgpyexecdir +pyexecdir +pkgpythondir +pythondir +PYTHON_PLATFORM +PYTHON_EXEC_PREFIX +PYTHON_PREFIX +PYTHON_VERSION +PYTHON +SYSTEM_LIBXML +LIBXML_LIBS +LIBXML_CFLAGS +SYSTEM_LIBXSLT +XSLTPROC +LIBXSLT_LIBS +LIBXSLT_CFLAGS +USE_FT_EMBOLDEN +FREETYPE_LIBS +FREETYPE_CFLAGS +SYSTEM_CPPUNIT +CPPUNIT_LIBS +CPPUNIT_CFLAGS +SYSTEM_LIBWPD +LIBWPD_LIBS +LIBWPD_CFLAGS +PKG_CONFIG +SYSTEM_EXPAT +SYSTEM_JPEG +SYSTEM_ZLIB +SYSTEM_STDLIBS +BUILD_UNOWINREG +MINGWSTRIP +MINGWCXX +BUILD_STAX +GPERF +PKGFORMAT +RPM +BUILD_EPM +PKGMK +DPKG +EPM +BUILD_DMAKE +DMAKE +JAVAIFLAGS +JAVAFLAGS +JDK +JAVA_HOME +JAVAAOTCOMPILER +AWTLIB +JAVADOC +JAVACISGCJ +JAVACOMPILER +JAVAINTERPRETER +SOLAR_JAVA +BUILD_VER_STRING +ALLOC +HAVE_GCC_VISIBILITY_FEATURE +CCACHE +USE_CCACHE +USE_SYSTEM_STL +STLPORT_VER +STLPORT4 +EXCEPTIONS +MINGW_GXXDLL +MINGW_GCCDLL +MINGW_SHARED_LIBSTDCPP +MINGW_SHARED_GXXLIB +MINGW_GCCLIB_EH +MINGW_SHARED_GCCLIB +MINGW_CLIB_DIR +MINGW_BACKWARD_INCLUDE_PATH +MINGW_LIB_INCLUDE_PATH +GXX_INCLUDE_PATH +CRYPT_LINK +PAM_LINK +NEW_SHADOW_API +PAM +VBA_EXTENSION +ENABLE_VBA +LFS_CFLAGS +WORDS_BIGENDIAN +SIZEOF_LONG +CXXCPP +ac_ct_CXX +CXXFLAGS +CXX +CPP +FRAME_HOME +CSC_PATH +MIDL_PATH +USE_MINGW +COMEX +MSPDB_PATH +PERL +HAVE_LD_HASH_STYLE +_cc +GNUMAKE +ENABLE_PCH +HAVE_LD_BSYMBOLIC_FUNCTIONS +GCCVER +COMPATH +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +GCC_HOME +SHELLPATH +WITH_MINGWIN +THES_SYSTEM_DIR +HYPH_SYSTEM_DIR +DICT_SYSTEM_DIR +SYSTEM_DICTS +WITH_MYSPELL_DICTS +ENABLE_RPATH +DISABLE_ATL +DISABLE_ACTIVEX +ENABLE_DIRECTX +WITH_BINFILTER +DO_FETCH_TARBALLS +TARFILE_LOCATION +ENABLE_FONTCONFIG +ENABLE_CUPS +DISABLE_STRIP +ENABLE_SYMBOLS +PROEXT +PROFULLSWITCH +PRODUCT +ENABLE_DEBUG +ENABLE_WERROR +VC_STANDARD +ENABLE_CRASHDUMP +PTHREAD_LIBS +PTHREAD_CFLAGS +OSVERSION +GNUTAR +target_os +target_vendor +target_cpu +target +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +SOURCEVERSION +UPD +_solenv +LOCAL_SOLENV +SED +AWK +EGREP +GREP +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' +ac_user_opts=' +enable_option_checking +with_gnu_patch +with_agg +with_gnu_cp +enable_graphite +with_system_graphite +enable_ldap +enable_fetch_external +with_external_tar +with_openldap +enable_lockdown +enable_vba +with_vba_package_format +enable_pch +enable_mozilla +with_fonts +with_ppds +with_afms +enable_epm +with_epm +with_package_format +enable_odk +enable_mathmldtd +enable_evolution2 +with_system_stdlibs +enable_cups +enable_fontconfig +enable_directx +enable_activex +enable_atl +enable_symbols +enable_strip_solver +enable_werror +enable_debug +enable_dbgutil +enable_crashdump +enable_cl_standard +enable_gtk +enable_gstreamer +enable_systray +enable_cairo +with_system_cairo +enable_opengl +enable_dbus +enable_gconf +enable_gnome_vfs +enable_gio +enable_static_gtk +enable_layout +enable_build_mozilla +with_mozilla_version +with_mozilla_toolkit +enable_nss_module +enable_kde +enable_kdeab +enable_kde4 +enable_binfilter +enable_rpath +enable_pam +enable_pam_link +enable_crypt_link +enable_xrender_link +enable_randr +enable_randr_link +with_myspell_dicts +with_system_dicts +with_external_dict_dir +with_external_hyph_dir +with_external_thes_dir +with_system_libs +with_system_headers +with_system_jars +with_system_zlib +with_system_openssl +with_system_jpeg +with_system_expat +with_system_libwpd +with_system_libxml +with_system_python +with_system_icu +with_system_poppler +with_system_db +with_system_lucene +with_lucene_core_jar +with_lucene_analyzers_jar +enable_mysql_connector +with_system_mysql +with_libmysql_path +with_system_mysql_cppconn +with_system_hsqldb +with_hsqldb_jar +with_system_beanshell +with_beanshell_jar +enable_presenter_extra_ui +enable_minimizer +enable_presenter_console +enable_pdfimport +enable_wiki_publisher +with_commons_codec_jar +with_commons_lang_jar +with_commons_httpclient_jar +with_commons_logging_jar +with_servlet_api_jar +enable_report_builder +with_system_jfreereport +with_sac_jar +with_libxml_jar +with_flute_jar +with_jfreereport_jar +with_liblayout_jar +with_libloader_jar +with_libformula_jar +with_librepository_jar +with_libfonts_jar +with_libserializer_jar +with_libbase_jar +with_system_saxon +with_saxon_jar +with_system_libxslt +with_system_odbc +with_system_sane +with_system_xrender +with_system_curl +with_system_boost +with_system_mdds +with_system_vigra +enable_neon +enable_Xaw +with_system_neon +with_system_agg +with_system_hunspell +with_system_mythes +with_system_altlinuxhyph +with_system_lpsolve +with_system_libtextcat +with_external_libtextcat_data +with_system_cppunit +with_system_redland +with_system_mozilla +with_stlport +with_jdk_home +with_gxx_include_path +with_java +enable_gcjaot +with_ant_home +with_junit +with_perl_home +with_cl_home +with_mspdb_path +with_midl_path +with_csc_path +with_nsis_path +with_frame_home +with_psdk_home +with_directx_home +with_mozilla_build +with_local_solenv +with_local_solver +enable_check_only +enable_ccache_skip +with_lang +with_poor_help_localizations +with_dict +with_intro_bitmaps +with_about_bitmaps +with_vendor +with_unix_wrapper +with_asm_home +with_os_version +with_unzip_home +with_zip_home +with_mingwin +with_build_version +with_alloc +enable_verbose +enable_dependency_tracking +enable_largefile +with_x +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +CXX +CXXFLAGS +CCC +CXXCPP +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 @@ -337,34 +1233,49 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -386,33 +1297,59 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_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 ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_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=', ';; esac - eval "enable_$ac_feature='$ac_optarg'" ;; + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -439,6 +1376,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -463,13 +1406,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -534,6 +1480,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -584,26 +1540,36 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_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=', ';; esac - eval "with_$ac_package='$ac_optarg'" ;; + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_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 ;; --x) # Obsolete; use --with-x. @@ -623,26 +1589,25 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -651,31 +1616,36 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "missing argument to $ac_option" fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac -done +fi -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; 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' @@ -689,8 +1659,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -702,86 +1672,72 @@ 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 its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 - { (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 +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 # # Report the --help message. @@ -804,20 +1760,17 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -827,18 +1780,25 @@ for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -859,6 +1819,7 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-graphite Enables the compilation of Graphite smart font rendering @@ -1460,170 +2421,980 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) 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 || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac -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 +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF +configure +generated by GNU Autoconf 2.67 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -It was created by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was - - $ $0 $@ +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## -_ACEOF +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () { -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` + 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 -/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_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval -/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_fn_c_try_compile -_ASUNAME +# 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 -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_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 -} >&5 +} # ac_fn_c_try_link -cat >&5 <<_ACEOF +# 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; } > conftest.i && { + 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 + 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 -## ----------- ## -## Core tests. ## -## ----------- ## +} # 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; } > conftest.i && { + 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 eval "test \"\${$3+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 eval "test \"\${$3+set}\"" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+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.i 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 eval "test \"\${$3+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 eval "test \"\${$3+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 eval "test \"\${$3+set}\"" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+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.i 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 eval "test \"\${$3+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 eval "test \"\${$4+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.67. 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 + + +## ----------- ## +## Core tests. ## +## ----------- ## _ACEOF @@ -1636,7 +3407,6 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1647,13 +3417,13 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" + as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -1669,104 +3439,115 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done -$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; } +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset 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: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_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 `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## -_ASBOX + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. @@ -1774,112 +3555,137 @@ 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" +_ACEOF + # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +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 $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;} +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;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5 ; } 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. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -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. 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 - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:${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;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:${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;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${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;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } + { $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 fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -1888,1104 +3694,1087 @@ 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 or --without-gnu-patch was given. -if test "${with_gnu_patch+set}" = set; then - withval="$with_gnu_patch" - -fi; +# Check whether --with-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" -fi; -# Check whether --enable-graphite or --disable-graphite was given. -if test "${enable_graphite+set}" = set; then - enableval="$enable_graphite" +# 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 was given. +if test "${enable_graphite+set}" = set; then : + enableval=$enable_graphite; +fi -# Check whether --with-system-graphite or --without-system-graphite was given. -if test "${with_system_graphite+set}" = set; then - withval="$with_system_graphite" -fi; -# Check whether --enable-ldap or --disable-ldap was given. -if test "${enable_ldap+set}" = set; then - enableval="$enable_ldap" +# Check whether --with-system-graphite was given. +if test "${with_system_graphite+set}" = set; then : + withval=$with_system_graphite; +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" +# Check whether --enable-ldap was given. +if test "${enable_ldap+set}" = set; then : + enableval=$enable_ldap; +fi -fi; +# Check whether --enable-fetch-external was given. +if test "${enable_fetch_external+set}" = set; then : + enableval=$enable_fetch_external; +fi -# 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; +# 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-openldap or --without-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" -fi; -# Check whether --enable-vba or --disable-vba was given. -if test "${enable_vba+set}" = set; then - enableval="$enable_vba" +# Check whether --with-openldap was given. +if test "${with_openldap+set}" = set; then : + withval=$with_openldap; +fi -fi; +# Check whether --enable-lockdown was given. +if test "${enable_lockdown+set}" = set; then : + enableval=$enable_lockdown; +fi + +# Check whether --enable-vba was given. +if test "${enable_vba+set}" = set; then : + enableval=$enable_vba; +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" -fi; -# Check whether --enable-pch or --disable-pch was given. -if test "${enable_pch+set}" = set; then - enableval="$enable_pch" +# 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-mozilla or --disable-mozilla was given. -if test "${enable_mozilla+set}" = set; then - enableval="$enable_mozilla" +# Check whether --enable-pch was given. +if test "${enable_pch+set}" = set; then : + enableval=$enable_pch; +fi +# 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" -fi; +# Check whether --with-fonts was given. +if test "${with_fonts+set}" = set; then : + withval=$with_fonts; +fi -# Check whether --with-ppds or --without-ppds was given. -if test "${with_ppds+set}" = set; then - withval="$with_ppds" -fi; +# Check whether --with-ppds was given. +if test "${with_ppds+set}" = set; then : + withval=$with_ppds; +fi -# Check whether --with-afms or --without-afms was given. -if test "${with_afms+set}" = set; then - withval="$with_afms" -fi; -# Check whether --enable-epm or --disable-epm was given. -if test "${enable_epm+set}" = set; then - enableval="$enable_epm" +# Check whether --with-afms was given. +if test "${with_afms+set}" = set; then : + withval=$with_afms; +fi +# 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" -fi; +# Check whether --with-epm was given. +if test "${with_epm+set}" = set; then : + withval=$with_epm; +fi -# Check whether --with-package-format or --without-package-format was given. -if test "${with_package_format+set}" = set; then - withval="$with_package_format" -fi; -# Check whether --enable-odk or --disable-odk was given. -if test "${enable_odk+set}" = set; then - enableval="$enable_odk" +# Check whether --with-package-format was given. +if test "${with_package_format+set}" = set; then : + withval=$with_package_format; +fi +# Check whether --enable-odk was given. +if test "${enable_odk+set}" = set; then : + enableval=$enable_odk; else enable_odk="yes" -fi; -# Check whether --enable-mathmldtd or --disable-mathmldtd was given. -if test "${enable_mathmldtd+set}" = set; then - enableval="$enable_mathmldtd" +fi +# Check whether --enable-mathmldtd was given. +if test "${enable_mathmldtd+set}" = set; then : + enableval=$enable_mathmldtd; else enable_mathmldtd="yes" -fi; -# Check whether --enable-evolution2 or --disable-evolution2 was given. -if test "${enable_evolution2+set}" = set; then - enableval="$enable_evolution2" +fi -fi; +# Check whether --enable-evolution2 was given. +if test "${enable_evolution2+set}" = set; then : + enableval=$enable_evolution2; +fi -# Check whether --with-system-stdlibs or --without-system-stdlibs was given. -if test "${with_system_stdlibs+set}" = set; then - withval="$with_system_stdlibs" -fi; -# Check whether --enable-cups or --disable-cups was given. -if test "${enable_cups+set}" = set; then - enableval="$enable_cups" +# Check whether --with-system-stdlibs was given. +if test "${with_system_stdlibs+set}" = set; then : + withval=$with_system_stdlibs; +fi +# Check whether --enable-cups was given. +if test "${enable_cups+set}" = set; then : + enableval=$enable_cups; else enable_cups=yes -fi; -# Check whether --enable-fontconfig or --disable-fontconfig was given. -if test "${enable_fontconfig+set}" = set; then - enableval="$enable_fontconfig" +fi +# Check whether --enable-fontconfig was given. +if test "${enable_fontconfig+set}" = set; then : + enableval=$enable_fontconfig; else enable_fontconfig=yes -fi; -# Check whether --enable-directx or --disable-directx was given. -if test "${enable_directx+set}" = set; then - enableval="$enable_directx" +fi +# Check whether --enable-directx was given. +if test "${enable_directx+set}" = set; then : + enableval=$enable_directx; else enable_directx=yes -fi; -# Check whether --enable-activex or --disable-activex was given. -if test "${enable_activex+set}" = set; then - enableval="$enable_activex" +fi -fi; +# Check whether --enable-activex was given. +if test "${enable_activex+set}" = set; then : + enableval=$enable_activex; +fi -# Check whether --enable-atl or --disable-atl was given. -if test "${enable_atl+set}" = set; then - enableval="$enable_atl" -fi; +# Check whether --enable-atl was given. +if test "${enable_atl+set}" = set; then : + enableval=$enable_atl; +fi -# Check whether --enable-symbols or --disable-symbols was given. -if test "${enable_symbols+set}" = set; then - enableval="$enable_symbols" -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-symbols was given. +if test "${enable_symbols+set}" = set; then : + enableval=$enable_symbols; +fi -fi; -# Check whether --enable-werror or --disable-werror was given. -if test "${enable_werror+set}" = set; then - enableval="$enable_werror" +# Check whether --enable-strip-solver was given. +if test "${enable_strip_solver+set}" = set; then : + enableval=$enable_strip_solver; +fi -fi; -# Check whether --enable-debug or --disable-debug was given. -if test "${enable_debug+set}" = set; then - enableval="$enable_debug" +# Check whether --enable-werror was given. +if test "${enable_werror+set}" = set; then : + enableval=$enable_werror; +fi -fi; -# Check whether --enable-dbgutil or --disable-dbgutil was given. -if test "${enable_dbgutil+set}" = set; then - enableval="$enable_dbgutil" +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then : + enableval=$enable_debug; +fi -fi; -# Check whether --enable-crashdump or --disable-crashdump was given. -if test "${enable_crashdump+set}" = set; then - enableval="$enable_crashdump" +# Check whether --enable-dbgutil was given. +if test "${enable_dbgutil+set}" = set; then : + enableval=$enable_dbgutil; +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-crashdump was given. +if test "${enable_crashdump+set}" = set; then : + enableval=$enable_crashdump; +fi -fi; -# Check whether --enable-gtk or --disable-gtk was given. -if test "${enable_gtk+set}" = set; then - enableval="$enable_gtk" +# Check whether --enable-cl-standard was given. +if test "${enable_cl_standard+set}" = set; then : + enableval=$enable_cl_standard; +fi +# Check whether --enable-gtk was given. +if test "${enable_gtk+set}" = set; then : + enableval=$enable_gtk; else enable_gtk=yes -fi; -# Check whether --enable-gstreamer or --disable-gstreamer was given. -if test "${enable_gstreamer+set}" = set; then - enableval="$enable_gstreamer" +fi +# Check whether --enable-gstreamer was given. +if test "${enable_gstreamer+set}" = set; then : + enableval=$enable_gstreamer; else enable_gstreamer=yes -fi; -# Check whether --enable-systray or --disable-systray was given. -if test "${enable_systray+set}" = set; then - enableval="$enable_systray" +fi +# Check whether --enable-systray was given. +if test "${enable_systray+set}" = set; then : + enableval=$enable_systray; else enable_systray=yes -fi; -# Check whether --enable-cairo or --disable-cairo was given. -if test "${enable_cairo+set}" = set; then - enableval="$enable_cairo" +fi +# Check whether --enable-cairo was given. +if test "${enable_cairo+set}" = set; then : + enableval=$enable_cairo; else enable_cairo=no -fi; +fi -# Check whether --with-system-cairo or --without-system-cairo was given. -if test "${with_system_cairo+set}" = set; then - withval="$with_system_cairo" -fi; -# Check whether --enable-opengl or --disable-opengl was given. -if test "${enable_opengl+set}" = set; then - enableval="$enable_opengl" +# Check whether --with-system-cairo was given. +if test "${with_system_cairo+set}" = set; then : + withval=$with_system_cairo; +fi +# Check whether --enable-opengl was given. +if test "${enable_opengl+set}" = set; then : + enableval=$enable_opengl; else enable_opengl=no -fi; -# Check whether --enable-dbus or --disable-dbus was given. -if test "${enable_dbus+set}" = set; then - enableval="$enable_dbus" +fi +# Check whether --enable-dbus was given. +if test "${enable_dbus+set}" = set; then : + enableval=$enable_dbus; else enable_dbus=no -fi; -# Check whether --enable-gconf or --disable-gconf was given. -if test "${enable_gconf+set}" = set; then - enableval="$enable_gconf" +fi +# Check whether --enable-gconf was given. +if test "${enable_gconf+set}" = set; then : + enableval=$enable_gconf; else enable_gconf=yes -fi; -# Check whether --enable-gnome-vfs or --disable-gnome-vfs was given. -if test "${enable_gnome_vfs+set}" = set; then - enableval="$enable_gnome_vfs" +fi +# Check whether --enable-gnome-vfs was given. +if test "${enable_gnome_vfs+set}" = set; then : + enableval=$enable_gnome_vfs; else enable_gnome_vfs=yes -fi; -# Check whether --enable-gio or --disable-gio was given. -if test "${enable_gio+set}" = set; then - enableval="$enable_gio" +fi +# Check whether --enable-gio was given. +if test "${enable_gio+set}" = set; then : + enableval=$enable_gio; else enable_gio=no -fi; -# Check whether --enable-static-gtk or --disable-static-gtk was given. -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-static-gtk was given. +if test "${enable_static_gtk+set}" = set; then : + enableval=$enable_static_gtk; +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-layout was given. +if test "${enable_layout+set}" = set; then : + enableval=$enable_layout; +fi -fi; +# Check whether --enable-build-mozilla was given. +if test "${enable_build_mozilla+set}" = set; then : + enableval=$enable_build_mozilla; +fi -# Check whether --with-mozilla-version or --without-mozilla-version was given. -if test "${with_mozilla_version+set}" = set; then - withval="$with_mozilla_version" -fi; +# Check whether --with-mozilla-version was given. +if test "${with_mozilla_version+set}" = set; then : + withval=$with_mozilla_version; +fi -# Check whether --with-mozilla-toolkit or --without-mozilla-toolkit was given. -if test "${with_mozilla_toolkit+set}" = set; then - withval="$with_mozilla_toolkit" -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 --with-mozilla-toolkit was given. +if test "${with_mozilla_toolkit+set}" = set; then : + withval=$with_mozilla_toolkit; +fi +# 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; -# Check whether --enable-kde or --disable-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-kde was given. +if test "${enable_kde+set}" = set; then : + enableval=$enable_kde; +fi +# 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; -# Check whether --enable-kde4 or --disable-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-kde4 was given. +if test "${enable_kde4+set}" = set; then : + enableval=$enable_kde4; +fi +# 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; -# Check whether --enable-rpath or --disable-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-rpath was given. +if test "${enable_rpath+set}" = set; then : + enableval=$enable_rpath; +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 was given. +if test "${enable_pam+set}" = set; then : + enableval=$enable_pam; +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-pam-link was given. +if test "${enable_pam_link+set}" = set; then : + enableval=$enable_pam_link; +fi +# 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; -# Check whether --enable-xrender-link or --disable-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-xrender-link was given. +if test "${enable_xrender_link+set}" = set; then : + enableval=$enable_xrender_link; +fi +# Check whether --enable-randr was given. +if test "${enable_randr+set}" = set; then : + enableval=$enable_randr; else enable_randr=yes -fi; -# Check whether --enable-randr-link or --disable-randr-link was given. -if test "${enable_randr_link+set}" = set; then - enableval="$enable_randr_link" +fi +# Check whether --enable-randr-link was given. +if test "${enable_randr_link+set}" = set; then : + enableval=$enable_randr_link; else enable_randr_link=yes -fi; +fi + + +# Check whether --with-myspell-dicts 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 -# Check whether --with-myspell-dicts or --without-myspell-dicts was given. -if test "${with_myspell_dicts+set}" = set; then - withval="$with_myspell_dicts" -fi; +# Check whether --with-external-dict-dir was given. +if test "${with_external_dict_dir+set}" = set; then : + withval=$with_external_dict_dir; +fi -# Check whether --with-system-dicts or --without-system-dicts was given. -if test "${with_system_dicts+set}" = set; then - withval="$with_system_dicts" -fi; +# Check whether --with-external-hyph-dir was given. +if test "${with_external_hyph_dir+set}" = set; then : + withval=$with_external_hyph_dir; +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" -fi; +# Check whether --with-external-thes-dir was given. +if test "${with_external_thes_dir+set}" = set; then : + withval=$with_external_thes_dir; +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" -fi; +# Check whether --with-system-libs was given. +if test "${with_system_libs+set}" = set; then : + withval=$with_system_libs; +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" -fi; +# Check whether --with-system-headers was given. +if test "${with_system_headers+set}" = set; then : + withval=$with_system_headers; +fi -# Check whether --with-system-libs or --without-system-libs was given. -if test "${with_system_libs+set}" = set; then - withval="$with_system_libs" -fi; +# Check whether --with-system-jars was given. +if test "${with_system_jars+set}" = set; then : + withval=$with_system_jars; +fi -# Check whether --with-system-headers or --without-system-headers was given. -if test "${with_system_headers+set}" = set; then - withval="$with_system_headers" -fi; +# Check whether --with-system-zlib was given. +if test "${with_system_zlib+set}" = set; then : + withval=$with_system_zlib; +fi -# Check whether --with-system-jars or --without-system-jars was given. -if test "${with_system_jars+set}" = set; then - withval="$with_system_jars" -fi; +# Check whether --with-system-openssl was given. +if test "${with_system_openssl+set}" = set; then : + withval=$with_system_openssl; +fi -# Check whether --with-system-zlib or --without-system-zlib was given. -if test "${with_system_zlib+set}" = set; then - withval="$with_system_zlib" -fi; +# Check whether --with-system-jpeg was given. +if test "${with_system_jpeg+set}" = set; then : + withval=$with_system_jpeg; +fi -# Check whether --with-system-openssl or --without-system-openssl was given. -if test "${with_system_openssl+set}" = set; then - withval="$with_system_openssl" -fi; +# Check whether --with-system-expat was given. +if test "${with_system_expat+set}" = set; then : + withval=$with_system_expat; +fi -# Check whether --with-system-jpeg or --without-system-jpeg was given. -if test "${with_system_jpeg+set}" = set; then - withval="$with_system_jpeg" -fi; +# Check whether --with-system-libwpd was given. +if test "${with_system_libwpd+set}" = set; then : + withval=$with_system_libwpd; +fi -# Check whether --with-system-expat or --without-system-expat was given. -if test "${with_system_expat+set}" = set; then - withval="$with_system_expat" -fi; +# Check whether --with-system-libxml was given. +if test "${with_system_libxml+set}" = set; then : + withval=$with_system_libxml; +fi -# Check whether --with-system-libwpd or --without-system-libwpd was given. -if test "${with_system_libwpd+set}" = set; then - withval="$with_system_libwpd" -fi; +# Check whether --with-system-python was given. +if test "${with_system_python+set}" = set; then : + withval=$with_system_python; +fi -# Check whether --with-system-libxml or --without-system-libxml was given. -if test "${with_system_libxml+set}" = set; then - withval="$with_system_libxml" -fi; +# Check whether --with-system-icu was given. +if test "${with_system_icu+set}" = set; then : + withval=$with_system_icu; +fi -# Check whether --with-system-python or --without-system-python was given. -if test "${with_system_python+set}" = set; then - withval="$with_system_python" -fi; +# Check whether --with-system-poppler was given. +if test "${with_system_poppler+set}" = set; then : + withval=$with_system_poppler; +fi -# Check whether --with-system-icu or --without-system-icu was given. -if test "${with_system_icu+set}" = set; then - withval="$with_system_icu" -fi; +# Check whether --with-system-db was given. +if test "${with_system_db+set}" = set; then : + withval=$with_system_db; +fi -# Check whether --with-system-poppler or --without-system-poppler was given. -if test "${with_system_poppler+set}" = set; then - withval="$with_system_poppler" -fi; +# Check whether --with-system-lucene was given. +if test "${with_system_lucene+set}" = set; then : + withval=$with_system_lucene; +fi -# Check whether --with-system-db or --without-system-db was given. -if test "${with_system_db+set}" = set; then - withval="$with_system_db" -fi; +# 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" -# Check whether --with-system-lucene or --without-system-lucene was given. -if test "${with_system_lucene+set}" = set; then - withval="$with_system_lucene" +fi -fi; -# 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" +# 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" -fi; +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" +# Check whether --enable-mysql-connector was given. +if test "${enable_mysql_connector+set}" = set; then : + enableval=$enable_mysql_connector; +fi -fi; -# Check whether --enable-mysql-connector or --disable-mysql-connector was given. -if test "${enable_mysql_connector+set}" = set; then - enableval="$enable_mysql_connector" -fi; +# Check whether --with-system-mysql was given. +if test "${with_system_mysql+set}" = set; then : + withval=$with_system_mysql; +fi -# Check whether --with-system-mysql or --without-system-mysql was given. -if test "${with_system_mysql+set}" = set; then - withval="$with_system_mysql" -fi; +# Check whether --with-libmysql-path was given. +if test "${with_libmysql_path+set}" = set; then : + withval=$with_libmysql_path; +fi -# Check whether --with-libmysql-path or --without-libmysql-path was given. -if test "${with_libmysql_path+set}" = set; then - withval="$with_libmysql_path" -fi; +# Check whether --with-system-mysql-cppconn was given. +if test "${with_system_mysql_cppconn+set}" = set; then : + withval=$with_system_mysql_cppconn; +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" -fi; +# Check whether --with-system-hsqldb was given. +if test "${with_system_hsqldb+set}" = set; then : + withval=$with_system_hsqldb; +fi -# Check whether --with-system-hsqldb or --without-system-hsqldb was given. -if test "${with_system_hsqldb+set}" = set; then - withval="$with_system_hsqldb" -fi; +# Check whether --with-hsqldb-jar was given. +if test "${with_hsqldb_jar+set}" = set; then : + withval=$with_hsqldb_jar; HSQLDB_JAR="$withval" -# 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 -fi; -# Check whether --with-system-beanshell or --without-system-beanshell was given. -if test "${with_system_beanshell+set}" = set; then - withval="$with_system_beanshell" +# Check whether --with-system-beanshell was given. +if test "${with_system_beanshell+set}" = set; then : + withval=$with_system_beanshell; +fi -fi; -# 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" +# Check whether --with-beanshell-jar was given. +if test "${with_beanshell_jar+set}" = set; then : + withval=$with_beanshell_jar; BSH_JAR="$withval" -fi; -# Check whether --enable-presenter-extra-ui or --disable-presenter-extra-ui was given. -if test "${enable_presenter_extra_ui+set}" = set; then - enableval="$enable_presenter_extra_ui" +fi +# Check whether --enable-presenter-extra-ui was given. +if test "${enable_presenter_extra_ui+set}" = set; then : + enableval=$enable_presenter_extra_ui; else enable_presenter_extra_ui=no -fi; -# Check whether --enable-minimizer or --disable-minimizer was given. -if test "${enable_minimizer+set}" = set; then - enableval="$enable_minimizer" +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 + + +# 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 -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 --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-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" +# Check whether --with-sac-jar was given. +if test "${with_sac_jar+set}" = set; then : + withval=$with_sac_jar; SAC_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" -fi; +# Check whether --with-libxml-jar was given. +if test "${with_libxml_jar+set}" = set; then : + withval=$with_libxml_jar; LIBXML_JAR="$withval" -# 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 -fi; -# 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" +# Check whether --with-flute-jar was given. +if test "${with_flute_jar+set}" = set; then : + withval=$with_flute_jar; FLUTE_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" -fi; -# Check whether --enable-report-builder or --disable-report-builder was given. -if test "${enable_report_builder+set}" = set; then - enableval="$enable_report_builder" +# Check whether --with-jfreereport-jar was given. +if test "${with_jfreereport_jar+set}" = set; then : + withval=$with_jfreereport_jar; JFREEREPORT_JAR="$withval" -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" -fi; +# Check whether --with-liblayout-jar was given. +if test "${with_liblayout_jar+set}" = set; then : + withval=$with_liblayout_jar; LIBLAYOUT_JAR="$withval" -# 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 -fi; -# 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" +# 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-flute-jar or --without-flute-jar was given. -if test "${with_flute_jar+set}" = set; then - withval="$with_flute_jar" - FLUTE_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-jfreereport-jar or --without-jfreereport-jar was given. -if test "${with_jfreereport_jar+set}" = set; then - withval="$with_jfreereport_jar" - JFREEREPORT_JAR="$withval" +fi -fi; -# 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" +# Check whether --with-libformula-jar was given. +if test "${with_libformula_jar+set}" = set; then : + withval=$with_libformula_jar; LIBFORMULA_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-librepository-jar was given. +if test "${with_librepository_jar+set}" = set; then : + withval=$with_librepository_jar; LIBREPOSITORY_JAR="$withval" -# 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 -fi; -# 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" +# Check whether --with-libfonts-jar was given. +if test "${with_libfonts_jar+set}" = set; then : + withval=$with_libfonts_jar; LIBFONTS_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" -fi; +# Check whether --with-libserializer-jar was given. +if test "${with_libserializer_jar+set}" = set; then : + withval=$with_libserializer_jar; LIBSERIALIZER_JAR="$withval" -# 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 -fi; -# 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" +# Check whether --with-libbase-jar was given. +if test "${with_libbase_jar+set}" = set; then : + withval=$with_libbase_jar; LIBBASE_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" -fi; +# Check whether --with-system-saxon was given. +if test "${with_system_saxon+set}" = set; then : + withval=$with_system_saxon; +fi -# Check whether --with-system-saxon or --without-system-saxon was given. -if test "${with_system_saxon+set}" = set; then - withval="$with_system_saxon" -fi; +# Check whether --with-saxon-jar was given. +if test "${with_saxon_jar+set}" = set; then : + withval=$with_saxon_jar; SAXON_JAR="$withval" -# 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 -fi; -# Check whether --with-system-libxslt or --without-system-libxslt was given. -if test "${with_system_libxslt+set}" = set; then - withval="$with_system_libxslt" +# Check whether --with-system-libxslt was given. +if test "${with_system_libxslt+set}" = set; then : + withval=$with_system_libxslt; +fi -fi; -# Check whether --with-system-odbc or --without-system-odbc was given. -if test "${with_system_odbc+set}" = set; then - withval="$with_system_odbc" +# Check whether --with-system-odbc was given. +if test "${with_system_odbc+set}" = set; then : + withval=$with_system_odbc; +fi -fi; -# Check whether --with-system-sane or --without-system-sane was given. -if test "${with_system_sane+set}" = set; then - withval="$with_system_sane" +# Check whether --with-system-sane was given. +if test "${with_system_sane+set}" = set; then : + withval=$with_system_sane; +fi -fi; -# Check whether --with-system-xrender or --without-system-xrender was given. -if test "${with_system_xrender+set}" = set; then - withval="$with_system_xrender" +# Check whether --with-system-xrender was given. +if test "${with_system_xrender+set}" = set; then : + withval=$with_system_xrender; +fi -fi; -# Check whether --with-system-curl or --without-system-curl was given. -if test "${with_system_curl+set}" = set; then - withval="$with_system_curl" +# Check whether --with-system-curl was given. +if test "${with_system_curl+set}" = set; then : + withval=$with_system_curl; +fi -fi; -# Check whether --with-system-boost or --without-system-boost was given. -if test "${with_system_boost+set}" = set; then - withval="$with_system_boost" +# Check whether --with-system-boost was given. +if test "${with_system_boost+set}" = set; then : + withval=$with_system_boost; +fi -fi; -# Check whether --with-system-mdds or --without-system-mdds was given. -if test "${with_system_mdds+set}" = set; then - withval="$with_system_mdds" +# Check whether --with-system-mdds was given. +if test "${with_system_mdds+set}" = set; then : + withval=$with_system_mdds; +fi -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 --with-system-vigra was given. +if test "${with_system_vigra+set}" = set; then : + withval=$with_system_vigra; +fi -fi; -# Check whether --enable-neon or --disable-neon was given. -if test "${enable_neon+set}" = set; then - enableval="$enable_neon" +# Check whether --enable-neon was given. +if test "${enable_neon+set}" = set; then : + enableval=$enable_neon; +fi -fi; -# Check whether --enable-Xaw or --disable-Xaw was given. -if test "${enable_Xaw+set}" = set; then - enableval="$enable_Xaw" +# Check whether --enable-Xaw was given. +if test "${enable_Xaw+set}" = set; then : + enableval=$enable_Xaw; +fi -fi; -# Check whether --with-system-neon or --without-system-neon was given. -if test "${with_system_neon+set}" = set; then - withval="$with_system_neon" +# Check whether --with-system-neon was given. +if test "${with_system_neon+set}" = set; then : + withval=$with_system_neon; +fi -fi; -# Check whether --with-system-agg or --without-system-agg was given. -if test "${with_system_agg+set}" = set; then - withval="$with_system_agg" +# Check whether --with-system-agg was given. +if test "${with_system_agg+set}" = set; then : + withval=$with_system_agg; +fi -fi; -# Check whether --with-system-hunspell or --without-system-hunspell was given. -if test "${with_system_hunspell+set}" = set; then - withval="$with_system_hunspell" +# Check whether --with-system-hunspell was given. +if test "${with_system_hunspell+set}" = set; then : + withval=$with_system_hunspell; +fi -fi; -# Check whether --with-system-mythes or --without-system-mythes was given. -if test "${with_system_mythes+set}" = set; then - withval="$with_system_mythes" +# Check whether --with-system-mythes was given. +if test "${with_system_mythes+set}" = set; then : + withval=$with_system_mythes; +fi -fi; -# Check whether --with-system-altlinuxhyph or --without-system-altlinuxhyph was given. -if test "${with_system_altlinuxhyph+set}" = set; then - withval="$with_system_altlinuxhyph" +# Check whether --with-system-altlinuxhyph was given. +if test "${with_system_altlinuxhyph+set}" = set; then : + withval=$with_system_altlinuxhyph; +fi -fi; -# Check whether --with-system-lpsolve or --without-system-lpsolve was given. -if test "${with_system_lpsolve+set}" = set; then - withval="$with_system_lpsolve" +# Check whether --with-system-lpsolve was given. +if test "${with_system_lpsolve+set}" = set; then : + withval=$with_system_lpsolve; +fi -fi; -# Check whether --with-system-libtextcat or --without-system-libtextcat was given. -if test "${with_system_libtextcat+set}" = set; then - withval="$with_system_libtextcat" +# Check whether --with-system-libtextcat was given. +if test "${with_system_libtextcat+set}" = set; then : + withval=$with_system_libtextcat; +fi -fi; -# Check whether --with-external-libtextcat-data or --without-external-libtextcat-data was given. -if test "${with_external_libtextcat_data+set}" = set; then - withval="$with_external_libtextcat_data" +# Check whether --with-external-libtextcat-data was given. +if test "${with_external_libtextcat_data+set}" = set; then : + withval=$with_external_libtextcat_data; +fi -fi; -# Check whether --with-system-cppunit or --without-system-cppunit was given. -if test "${with_system_cppunit+set}" = set; then - withval="$with_system_cppunit" +# Check whether --with-system-cppunit was given. +if test "${with_system_cppunit+set}" = set; then : + withval=$with_system_cppunit; +fi -fi; -# Check whether --with-system-redland or --without-system-redland was given. -if test "${with_system_redland+set}" = set; then - withval="$with_system_redland" +# Check whether --with-system-redland was given. +if test "${with_system_redland+set}" = set; then : + withval=$with_system_redland; +fi -fi; -# 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 +# Check whether --with-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 or --without-stlport was given. -if test "${with_stlport+set}" = set; then - withval="$with_stlport" - WITH_STLPORT=$withval + +# Check whether --with-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" -fi; +# Check whether --with-jdk-home was given. +if test "${with_jdk_home+set}" = set; then : + withval=$with_jdk_home; +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" +# Check whether --with-gxx_include_path was given. +if test "${with_gxx_include_path+set}" = set; then : + withval=$with_gxx_include_path; +fi -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 +# 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 else WITH_JAVA=java -fi; -# Check whether --enable-gcjaot or --disable-gcjaot was given. -if test "${enable_gcjaot+set}" = set; then - enableval="$enable_gcjaot" +fi -fi; +# Check whether --enable-gcjaot was given. +if test "${enable_gcjaot+set}" = set; then : + enableval=$enable_gcjaot; +fi -# Check whether --with-ant-home or --without-ant-home was given. -if test "${with_ant_home+set}" = set; then - withval="$with_ant_home" -fi; +# Check whether --with-ant-home was given. +if test "${with_ant_home+set}" = set; then : + withval=$with_ant_home; +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 or --without-perl-home was given. -if test "${with_perl_home+set}" = set; then - withval="$with_perl_home" +# Check whether --with-perl-home was given. +if test "${with_perl_home+set}" = set; then : + withval=$with_perl_home; +fi -fi; -# Check whether --with-cl-home or --without-cl-home was given. -if test "${with_cl_home+set}" = set; then - withval="$with_cl_home" +# Check whether --with-cl-home was given. +if test "${with_cl_home+set}" = set; then : + withval=$with_cl_home; +fi -fi; -# Check whether --with-mspdb-path or --without-mspdb-path was given. -if test "${with_mspdb_path+set}" = set; then - withval="$with_mspdb_path" +# Check whether --with-mspdb-path was given. +if test "${with_mspdb_path+set}" = set; then : + withval=$with_mspdb_path; +fi -fi; -# Check whether --with-midl-path or --without-midl-path was given. -if test "${with_midl_path+set}" = set; then - withval="$with_midl_path" +# Check whether --with-midl-path was given. +if test "${with_midl_path+set}" = set; then : + withval=$with_midl_path; +fi -fi; -# Check whether --with-csc-path or --without-csc-path was given. -if test "${with_csc_path+set}" = set; then - withval="$with_csc_path" +# Check whether --with-csc-path was given. +if test "${with_csc_path+set}" = set; then : + withval=$with_csc_path; +fi -fi; -# Check whether --with-nsis-path or --without-nsis-path was given. -if test "${with_nsis_path+set}" = set; then - withval="$with_nsis_path" +# Check whether --with-nsis-path was given. +if test "${with_nsis_path+set}" = set; then : + withval=$with_nsis_path; +fi -fi; -# Check whether --with-frame-home or --without-frame-home was given. -if test "${with_frame_home+set}" = set; then - withval="$with_frame_home" +# Check whether --with-frame-home was given. +if test "${with_frame_home+set}" = set; then : + withval=$with_frame_home; +fi -fi; -# Check whether --with-psdk-home or --without-psdk-home was given. -if test "${with_psdk_home+set}" = set; then - withval="$with_psdk_home" +# Check whether --with-psdk-home was given. +if test "${with_psdk_home+set}" = set; then : + withval=$with_psdk_home; +fi -fi; -# Check whether --with-directx-home or --without-directx-home was given. -if test "${with_directx_home+set}" = set; then - withval="$with_directx_home" +# Check whether --with-directx-home was given. +if test "${with_directx_home+set}" = set; then : + withval=$with_directx_home; +fi -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-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" -fi; +# Check whether --with-local-solenv was given. +if test "${with_local_solenv+set}" = set; then : + withval=$with_local_solenv; +fi -# Check whether --with-local-solver or --without-local-solver was given. -if test "${with_local_solver+set}" = set; then - withval="$with_local_solver" -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 --with-local-solver was given. +if test "${with_local_solver+set}" = set; then : + withval=$with_local_solver; +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-check-only was given. +if test "${enable_check_only+set}" = set; then : + enableval=$enable_check_only; +fi +# 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" -fi; +# Check whether --with-lang was given. +if test "${with_lang+set}" = set; then : + withval=$with_lang; +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" +# Check whether --with-poor-help-localizations was given. +if test "${with_poor_help_localizations+set}" = set; then : + withval=$with_poor_help_localizations; +fi -fi; -# Check whether --with-dict or --without-dict was given. -if test "${with_dict+set}" = set; then - withval="$with_dict" +# Check whether --with-dict was given. +if test "${with_dict+set}" = set; then : + withval=$with_dict; +fi -fi; -# Check whether --with-intro-bitmaps or --without-intro-bitmaps was given. -if test "${with_intro_bitmaps+set}" = set; then - withval="$with_intro_bitmaps" +# Check whether --with-intro-bitmaps was given. +if test "${with_intro_bitmaps+set}" = set; then : + withval=$with_intro_bitmaps; +fi -fi; -# Check whether --with-about-bitmaps or --without-about-bitmaps was given. -if test "${with_about_bitmaps+set}" = set; then - withval="$with_about_bitmaps" +# Check whether --with-about-bitmaps was given. +if test "${with_about_bitmaps+set}" = set; then : + withval=$with_about_bitmaps; +fi -fi; -# Check whether --with-vendor or --without-vendor was given. -if test "${with_vendor+set}" = set; then - withval="$with_vendor" +# Check whether --with-vendor was given. +if test "${with_vendor+set}" = set; then : + withval=$with_vendor; +fi -fi; -# Check whether --with-unix-wrapper or --without-unix-wrapper was given. -if test "${with_unix_wrapper+set}" = set; then - withval="$with_unix_wrapper" +# Check whether --with-unix-wrapper was given. +if test "${with_unix_wrapper+set}" = set; then : + withval=$with_unix_wrapper; +fi -fi; -# Check whether --with-asm-home or --without-asm-home was given. -if test "${with_asm_home+set}" = set; then - withval="$with_asm_home" +# Check whether --with-asm-home was given. +if test "${with_asm_home+set}" = set; then : + withval=$with_asm_home; +fi -fi; -# Check whether --with-os-version or --without-os-version was given. -if test "${with_os_version+set}" = set; then - withval="$with_os_version" +# Check whether --with-os-version was given. +if test "${with_os_version+set}" = set; then : + withval=$with_os_version; +fi -fi; -# Check whether --with-unzip-home or --without-unzip-home was given. -if test "${with_unzip_home+set}" = set; then - withval="$with_unzip_home" +# Check whether --with-unzip-home was given. +if test "${with_unzip_home+set}" = set; then : + withval=$with_unzip_home; +fi -fi; -# Check whether --with-zip-home or --without-zip-home was given. -if test "${with_zip_home+set}" = set; then - withval="$with_zip_home" +# Check whether --with-zip-home was given. +if test "${with_zip_home+set}" = set; then : + withval=$with_zip_home; +fi -fi; -# Check whether --with-mingwin or --without-mingwin was given. -if test "${with_mingwin+set}" = set; then - withval="$with_mingwin" - WITH_MINGWIN=$withval +# Check whether --with-mingwin was given. +if test "${with_mingwin+set}" = set; then : + withval=$with_mingwin; WITH_MINGWIN=$withval else WITH_MINGWIN=0 -fi; +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 -# 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 or --without-alloc was given. -if test "${with_alloc+set}" = set; then - withval="$with_alloc" +# Check whether --with-alloc was given. +if test "${with_alloc+set}" = set; then : + withval=$with_alloc; +fi -fi; -# Check whether --enable-verbose or --disable-verbose was given. -if test "${enable_verbose+set}" = set; then - enableval="$enable_verbose" +# Check whether --enable-verbose was given. +if test "${enable_verbose+set}" = set; then : + enableval=$enable_verbose; +fi -fi; -# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then - enableval="$enable_dependency_tracking" +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi -fi; BUILD_TYPE="OOo" @@ -3012,29 +4801,144 @@ echo "* *" echo "********************************************************************" echo "" cat /dev/null > warn -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' +{ $as_echo "$as_me:${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 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 -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. @@ -3044,35 +4948,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$AWK" && break done # Extract the first word of "$AWK", so it can be a program name with args. set dummy $AWK; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $AWK in [\\/]* | ?:[\\/]*) @@ -3084,42 +4990,41 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi AWK=$ac_cv_path_AWK - if test -n "$AWK"; then - echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$AWK"; then - { { echo "$as_me:$LINENO: error: install awk to run this script" >&5 -echo "$as_me: error: install awk to run this script" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "install awk to run this script" "$LINENO" 5 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 -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 +{ $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 else case $SED in [\\/]* | ?:[\\/]*) @@ -3131,47 +5036,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi SED=$ac_cv_path_SED - if test -n "$SED"; then - echo "$as_me:$LINENO: result: $SED" >&5 -echo "${ECHO_T}$SED" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5 +$as_echo "$SED" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$SED" && break done if test -z "$SED"; then - { { echo "$as_me:$LINENO: error: install sed to run this script" >&5 -echo "$as_me: error: install sed to run this script" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "install sed to run this script" "$LINENO" 5 fi -echo "$as_me:$LINENO: checking for solenv environment" >&5 -echo $ECHO_N "checking for solenv environment... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for solenv environment" >&5 +$as_echo_n "checking for solenv environment... " >&6; } if test -z "$with_local_solenv"; then LOCAL_SOLENV="DEFAULT" - echo "$as_me:$LINENO: result: default" >&5 -echo "${ECHO_T}default" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5 +$as_echo "default" >&6; } else LOCAL_SOLENV=$with_local_solenv - echo "$as_me:$LINENO: result: $with_local_solenv" >&5 -echo "${ECHO_T}$with_local_solenv" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_local_solenv" >&5 +$as_echo "$with_local_solenv" >&6; } fi @@ -3189,110 +5093,140 @@ if test -e $_solenv/inc/minor.mk; then SOURCEVERSION="`grep SOURCEVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`" else - { { echo "$as_me:$LINENO: error: $_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation..." >&5 -echo "$as_me: error: $_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation..." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation..." "$LINENO" 5 fi ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break - elif test -f $ac_dir/install.sh; then + elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break - elif test -f $ac_dir/shtool; then + elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + # Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} - { (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 +$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 build=$ac_cv_build -build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +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 -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 +{ $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 else - ac_cv_host_alias=$host_alias -test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias -ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} - { (exit 1); exit 1; }; } + 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 fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 +{ $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 host=$ac_cv_host -host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +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 -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 +{ $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 else - ac_cv_target_alias=$target_alias -test "x$ac_cv_target_alias" = "x" && - ac_cv_target_alias=$ac_cv_host_alias -ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} - { (exit 1); exit 1; }; } + 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 fi -echo "$as_me:$LINENO: result: $ac_cv_target" >&5 -echo "${ECHO_T}$ac_cv_target" >&6 +{ $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 target=$ac_cv_target -target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. @@ -3301,23 +5235,22 @@ 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 - { echo "$as_me:$LINENO: WARNING: cross-compiling by any means is not supported (yet)!" >&5 -echo "$as_me: WARNING: cross-compiling by any means is not supported (yet)!" >&2;} + { $as_echo "$as_me:${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 "cross-compiling by any means is not supported (yet)!" >> warn fi if echo "$build_os" | grep cygwin; then - echo "$as_me:$LINENO: checking Cygwin version" >&5 -echo $ECHO_N "checking Cygwin version... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Cygwin version" >&5 +$as_echo_n "checking Cygwin version... " >&6; } CygwinVer=`uname -r` - echo "$as_me:$LINENO: result: $CygwinVer" >&5 -echo "${ECHO_T}$CygwinVer" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CygwinVer" >&5 +$as_echo "$CygwinVer" >&6; } if test "`echo $CygwinVer | $AWK -F . '{ print $1$2 }'`" -lt "15"; then - { { echo "$as_me:$LINENO: error: You need at least Cygwin V1.5.x" >&5 -echo "$as_me: error: You need at least Cygwin V1.5.x" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "You need at least Cygwin V1.5.x" "$LINENO" 5 fi else CygwinVer="false" @@ -3335,10 +5268,10 @@ case "$build_os" in _os=SunOS # Extract the first word of "gtar", so it can be a program name with args. set dummy gtar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_GNUTAR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $GNUTAR in [\\/]* | ?:[\\/]*) @@ -3351,56 +5284,51 @@ 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GNUTAR="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi GNUTAR=$ac_cv_path_GNUTAR - if test -n "$GNUTAR"; then - echo "$as_me:$LINENO: result: $GNUTAR" >&5 -echo "${ECHO_T}$GNUTAR" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNUTAR" >&5 +$as_echo "$GNUTAR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$GNUTAR"; then - { { echo "$as_me:$LINENO: error: gtar (gnu tar) not found but needed. Install it (SUN Freeware package)." >&5 -echo "$as_me: error: gtar (gnu tar) not found but needed. Install it (SUN Freeware package)." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "gtar (gnu tar) not found but needed. Install it (SUN Freeware package)." "$LINENO" 5 fi - echo "$as_me:$LINENO: checking the Solaris operating system release" >&5 -echo $ECHO_N "checking the Solaris operating system release... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the Solaris operating system release" >&5 +$as_echo_n "checking the Solaris operating system release... " >&6; } _os_release=`echo $build_os | $SED -e s/solaris2\.//` if test "$_os_release" -lt "6"; then - { { echo "$as_me:$LINENO: error: use solaris >= 6 to build OpenOffice.org" >&5 -echo "$as_me: error: use solaris >= 6 to build OpenOffice.org" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "use solaris >= 6 to build OpenOffice.org" "$LINENO" 5 else - echo "$as_me:$LINENO: result: ok ($_os_release)" >&5 -echo "${ECHO_T}ok ($_os_release)" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok ($_os_release)" >&5 +$as_echo "ok ($_os_release)" >&6; } fi - echo "$as_me:$LINENO: checking the processor type" >&5 -echo $ECHO_N "checking the processor type... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the processor type" >&5 +$as_echo_n "checking the processor type... " >&6; } if test "$build_cpu" = "sparc" -o "$build_cpu" = "i386"; then - echo "$as_me:$LINENO: result: ok ($build_cpu)" >&5 -echo "${ECHO_T}ok ($build_cpu)" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok ($build_cpu)" >&5 +$as_echo "ok ($build_cpu)" >&6; } else - { { echo "$as_me:$LINENO: error: only sparc and i386 processors are supported" >&5 -echo "$as_me: error: only sparc and i386 processors are supported" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "only sparc and i386 processors are supported" "$LINENO" 5 fi ;; linux-gnu*|k*bsd*-gnu*) @@ -3434,8 +5362,8 @@ echo "$as_me: error: only sparc and i386 processors are supported" >&2;} test_gstreamer=no _os=Darwin if test "$enable_systray" = "yes" && test "$enable_gtk" != "no"; then - { echo "$as_me:$LINENO: WARNING: Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >&5 -echo "$as_me: WARNING: Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >&2;} + { $as_echo "$as_me:${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 "Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >>warn enable_systray=no fi @@ -3458,17 +5386,17 @@ echo "$as_me: WARNING: Disabling gtk-quickstarter - not supported on Mac. Use -- test_randr=yes test_freetype=yes test_gstreamer=yes - echo "$as_me:$LINENO: checking the FreeBSD operating system release" >&5 -echo $ECHO_N "checking the FreeBSD operating system release... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the FreeBSD operating system release" >&5 +$as_echo_n "checking the FreeBSD operating system release... " >&6; } if test -n "$with_os_version"; then OSVERSION="$with_os_version" else OSVERSION=`/sbin/sysctl -n kern.osreldate` fi - echo "$as_me:$LINENO: result: found OSVERSION=$OSVERSION" >&5 -echo "${ECHO_T}found OSVERSION=$OSVERSION" >&6 - echo "$as_me:$LINENO: checking which thread library to use" >&5 -echo $ECHO_N "checking which thread library to use... $ECHO_C" >&6 + { $as_echo "$as_me:${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; } if test "$OSVERSION" -lt "500016"; then PTHREAD_CFLAGS="-D_THREAD_SAFE" PTHREAD_LIBS="-pthread" @@ -3479,8 +5407,8 @@ echo $ECHO_N "checking which thread library to use... $ECHO_C" >&6 PTHREAD_CFLAGS="" PTHREAD_LIBS="-pthread" fi - echo "$as_me:$LINENO: result: $PTHREAD_LIBS" >&5 -echo "${ECHO_T}$PTHREAD_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_LIBS" >&5 +$as_echo "$PTHREAD_LIBS" >&6; } _os=FreeBSD ;; osf) @@ -3511,9 +5439,7 @@ echo "${ECHO_T}$PTHREAD_LIBS" >&6 _os=AIX ;; *) - { { echo "$as_me:$LINENO: error: $_os operating system is not suitable to build OpenOffice.org!" >&5 -echo "$as_me: error: $_os operating system is not suitable to build OpenOffice.org!" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$_os operating system is not suitable to build OpenOffice.org!" "$LINENO" 5 ;; esac @@ -3521,17 +5447,17 @@ esac -echo "$as_me:$LINENO: checking whether to enable crashdump feature" >&5 -echo $ECHO_N "checking whether to enable crashdump feature... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable crashdump feature" >&5 +$as_echo_n "checking whether to enable crashdump feature... " >&6; } if test "$enable_crashdump" = "yes"; then ENABLE_CRASHDUMP="TRUE" BUILD_TYPE="$BUILD_TYPE CRASHREP" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else ENABLE_CRASHDUMP="" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3540,90 +5466,88 @@ if test "$_os" = "WINNT"; then fi if test "$_os" = "WINNT"; then - echo "$as_me:$LINENO: checking whether to use the standard non-optimizing compiler" >&5 -echo $ECHO_N "checking whether to use the standard non-optimizing compiler... $ECHO_C" >&6 + { $as_echo "$as_me:${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; } if test "$enable_cl_standard" = "" -o "$enable_cl_standard" = "no"; then VC_STANDARD="" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } else VC_STANDARD="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi fi -echo "$as_me:$LINENO: checking whether to turn warnings to errors" >&5 -echo $ECHO_N "checking whether to turn warnings to errors... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to turn warnings to errors" >&5 +$as_echo_n "checking whether to turn warnings to errors... " >&6; } if test -n "$enable_werror" && test "$enable_werror" != "no"; then ENABLE_WERROR="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - { echo "$as_me:$LINENO: WARNING: Turning warnings to errors has no effect in modules or" >&5 -echo "$as_me: WARNING: Turning warnings to errors has no effect in modules or" >&2;} - { echo "$as_me:$LINENO: WARNING: on platforms where it has been disabled explicitely" >&5 -echo "$as_me: WARNING: on platforms where it has been disabled explicitely" >&2;} + { $as_echo "$as_me:${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 "Turning warnings to errors has no effect in modules or on platforms where it has been disabled explicitely" >> warn else ENABLE_WERROR="FALSE" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to do a debug build" >&5 -echo $ECHO_N "checking whether to do a debug build... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to do a debug build" >&5 +$as_echo_n "checking whether to do a debug build... " >&6; } if test -n "$enable_debug" && test "$enable_debug" != "no"; then ENABLE_DEBUG="TRUE" if test -z "$enable_symbols"; then enable_symbols="yes" fi - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else ENABLE_DEBUG="FALSE" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to build with additional debug utilities" >&5 -echo $ECHO_N "checking whether to build with additional debug utilities... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with additional debug utilities" >&5 +$as_echo_n "checking whether to build with additional debug utilities... " >&6; } if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then PROEXT="" PRODUCT="" PROFULLSWITCH="" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else PRODUCT="full" PROFULLSWITCH="product=full" PROEXT=".pro" - echo "$as_me:$LINENO: result: no, full product build" >&5 -echo "${ECHO_T}no, full product build" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, full product build" >&5 +$as_echo "no, full product build" >&6; } fi -echo "$as_me:$LINENO: checking whether to include symbols into final build" >&5 -echo $ECHO_N "checking whether to include symbols into final build... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include symbols into final build" >&5 +$as_echo_n "checking whether to include symbols into final build... " >&6; } if test -n "$enable_symbols" && test "$enable_symbols" != "no"; then if test "$enable_symbols" = "yes" -o "$enable_symbols" = "TRUE"; then ENABLE_SYMBOLS="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else if test "$enable_symbols" = "SMALL" -o "$enable_symbols" = "small"; then ENABLE_SYMBOLS="SMALL" - echo "$as_me:$LINENO: result: yes, small ones" >&5 -echo "${ECHO_T}yes, small ones" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, small ones" >&5 +$as_echo "yes, small ones" >&6; } else if test "$enable_symbols" != "no" ; then echo enable symbols is: $enable_symbols - { { echo "$as_me:$LINENO: error: --enable-symbols only accepts yes, TRUE or SMALL as parameter." >&5 -echo "$as_me: error: --enable-symbols only accepts yes, TRUE or SMALL as parameter." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-symbols only accepts yes, TRUE or SMALL as parameter." "$LINENO" 5 else ENABLE_SYMBOLS= fi @@ -3631,22 +5555,20 @@ echo "$as_me: error: --enable-symbols only accepts yes, TRUE or SMALL as paramet fi else ENABLE_SYMBOLS= - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to strip the solver or not." >&5 -echo $ECHO_N "checking whether to strip the solver or not.... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to strip the solver or not." >&5 +$as_echo_n "checking whether to strip the solver or not.... " >&6; } if test -n "$enable_strip_solver"; then if test "$enable_strip_solver" = "yes"; then DISABLE_STRIP= else if test "$enable_strip_solver" = "no"; then DISABLE_STRIP="TRUE" else - { { echo "$as_me:$LINENO: error: --disable-strip-solver only accepts yes or no as parameter." >&5 -echo "$as_me: error: --disable-strip-solver only accepts yes or no as parameter." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--disable-strip-solver only accepts yes or no as parameter." "$LINENO" 5 fi fi else @@ -3658,29 +5580,29 @@ else fi -echo "$as_me:$LINENO: checking whether to enable native CUPS support" >&5 -echo $ECHO_N "checking whether to enable native CUPS support... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable native CUPS support" >&5 +$as_echo_n "checking whether to enable native CUPS support... " >&6; } if test "$test_cups" = "yes" -a \( "$enable_cups" = "yes" -o "$enable_cups" = "TRUE" \) ; then ENABLE_CUPS="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else ENABLE_CUPS="" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to enable fontconfig support" >&5 -echo $ECHO_N "checking whether to enable fontconfig support... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable fontconfig support" >&5 +$as_echo_n "checking whether to enable fontconfig support... " >&6; } if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a \( "$enable_fontconfig" = "yes" -o "$enable_fontconfig" = "TRUE" \); then ENABLE_FONTCONFIG="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else ENABLE_FONTCONFIG="" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3695,124 +5617,124 @@ if test -z "$enable_fetch_external" || test "$enable_fetch_external" = "yes" \ fi -echo "$as_me:$LINENO: checking whether to enable filters for legacy binary file formats (StarOffice 5.2)" >&5 -echo $ECHO_N "checking whether to enable filters for legacy binary file formats (StarOffice 5.2)... $ECHO_C" >&6 +{ $as_echo "$as_me:${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; } if test "$enable_binfilter" = "no"; then WITH_BINFILTER="NO" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } else WITH_BINFILTER="YES" BUILD_TYPE="$BUILD_TYPE BINFILTER" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi if test "$_os" = "WINNT"; then - echo "$as_me:$LINENO: checking whether to use DirectX" >&5 -echo $ECHO_N "checking whether to use DirectX... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use DirectX" >&5 +$as_echo_n "checking whether to use DirectX... " >&6; } if test "$enable_directx" = "yes" -o "$enable_directx" = "TRUE" -o "$enable_directx" = ""; then ENABLE_DIRECTX="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else ENABLE_DIRECTX="" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - echo "$as_me:$LINENO: checking whether to use ActiveX" >&5 -echo $ECHO_N "checking whether to use ActiveX... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use ActiveX" >&5 +$as_echo_n "checking whether to use ActiveX... " >&6; } if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then DISABLE_ACTIVEX="" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else DISABLE_ACTIVEX="TRUE" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - echo "$as_me:$LINENO: checking whether to use ATL" >&5 -echo $ECHO_N "checking whether to use ATL... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use ATL" >&5 +$as_echo_n "checking whether to use ATL... " >&6; } if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE" -o "$enable_atl" = ""; then DISABLE_ATL="" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else DISABLE_ATL="TRUE" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi fi -echo "$as_me:$LINENO: checking whether to use RPATH in shared libraries" >&5 -echo $ECHO_N "checking whether to use RPATH in shared libraries... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use RPATH in shared libraries" >&5 +$as_echo_n "checking whether to use RPATH in shared libraries... " >&6; } if test "$enable_rpath" = "no"; then ENABLE_RPATH="no" else ENABLE_RPATH="yes" fi -echo "$as_me:$LINENO: result: $ENABLE_RPATH" >&5 -echo "${ECHO_T}$ENABLE_RPATH" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_RPATH" >&5 +$as_echo "$ENABLE_RPATH" >&6; } -echo "$as_me:$LINENO: checking whether to include MySpell dictionaries" >&5 -echo $ECHO_N "checking whether to include MySpell dictionaries... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include MySpell dictionaries" >&5 +$as_echo_n "checking whether to include MySpell dictionaries... " >&6; } if test -z "$with_myspell_dicts" || test "$with_myspell_dicts" = "yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } WITH_MYSPELL_DICTS=YES BUILD_TYPE="$BUILD_TYPE DICTIONARIES" else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } WITH_MYSPELL_DICTS=NO fi if test "$WITH_MYSPELL_DICTS" = "NO"; then - echo "$as_me:$LINENO: checking whether to use dicts from external paths" >&5 -echo $ECHO_N "checking whether to use dicts from external paths... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use dicts from external paths" >&5 +$as_echo_n "checking whether to use dicts from external paths... " >&6; } if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } SYSTEM_DICTS=YES - echo "$as_me:$LINENO: checking for spelling dictionary directory" >&5 -echo $ECHO_N "checking for spelling dictionary directory... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for spelling dictionary directory" >&5 +$as_echo_n "checking for spelling dictionary directory... " >&6; } if test -n "$with_external_dict_dir"; then DICT_SYSTEM_DIR=file://$with_external_dict_dir else DICT_SYSTEM_DIR=file:///usr/share/hunspell fi - echo "$as_me:$LINENO: result: $DICT_SYSTEM_DIR" >&5 -echo "${ECHO_T}$DICT_SYSTEM_DIR" >&6 - echo "$as_me:$LINENO: checking for hyphenation patterns directory" >&5 -echo $ECHO_N "checking for hyphenation patterns directory... $ECHO_C" >&6 + { $as_echo "$as_me:${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; } if test -n "$with_external_hyph_dir"; then HYPH_SYSTEM_DIR=file://$with_external_hyph_dir else HYPH_SYSTEM_DIR=file:///usr/share/hyphen fi - echo "$as_me:$LINENO: result: $HYPH_SYSTEM_DIR" >&5 -echo "${ECHO_T}$HYPH_SYSTEM_DIR" >&6 - echo "$as_me:$LINENO: checking for thesaurus directory" >&5 -echo $ECHO_N "checking for thesaurus directory... $ECHO_C" >&6 + { $as_echo "$as_me:${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; } if test -n "$with_external_thes_dir"; then THES_SYSTEM_DIR=file://$with_external_thes_dir else THES_SYSTEM_DIR=file:///usr/share/mythes fi - echo "$as_me:$LINENO: result: $THES_SYSTEM_DIR" >&5 -echo "${ECHO_T}$THES_SYSTEM_DIR" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THES_SYSTEM_DIR" >&5 +$as_echo "$THES_SYSTEM_DIR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } SYSTEM_DICTS=NO fi fi @@ -3822,16 +5744,12 @@ fi if test $_os = "WINNT"; then - echo "$as_me:$LINENO: checking Windows build environment sanity" >&5 -echo $ECHO_N "checking Windows build environment sanity... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Windows build environment sanity" >&5 +$as_echo_n "checking Windows build environment sanity... " >&6; } if test -L $AWK -o -L `which awk` -o -L `which tar` -o -L `which gunzip` ; then - { { echo "$as_me:$LINENO: error: $AWK, awk, tar or gunzip is a cygwin symlink! -Native windows programs cannot use cygwin symlinks. Remove the symbolic -link, and copy the program to the name of the link." >&5 -echo "$as_me: error: $AWK, awk, tar or gunzip is a cygwin symlink! + as_fn_error $? "$AWK, awk, tar or gunzip is a cygwin symlink! Native windows programs cannot use cygwin symlinks. Remove the symbolic -link, and copy the program to the name of the link." >&2;} - { (exit 1); exit 1; }; } +link, and copy the program to the name of the link." "$LINENO" 5 fi CC=`echo $CC | $SED "s/^guw.exe //"` CXX=`echo $CXX | $SED "s/^guw.exe //"` @@ -3846,31 +5764,29 @@ link, and copy the program to the name of the link." >&2;} CXX="g++ -mno-cygwin" fi fi - echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } fi if test "$_os" = "WINNT" ; then - echo "$as_me:$LINENO: checking for cygwin gcc/g++" >&5 -echo $ECHO_N "checking for cygwin gcc/g++... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin gcc/g++" >&5 +$as_echo_n "checking for cygwin gcc/g++... " >&6; } if which gcc > /dev/null && which g++ > /dev/null ; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } else - { { echo "$as_me:$LINENO: error: cygwin gcc and g++ are needed, please install them." >&5 -echo "$as_me: error: cygwin gcc and g++ are needed, please install them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cygwin gcc and g++ are needed, please install them." "$LINENO" 5 fi fi # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_SHELLPATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $SHELLPATH in [\\/]* | ?:[\\/]*) @@ -3882,46 +5798,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SHELLPATH="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi SHELLPATH=$ac_cv_path_SHELLPATH - if test -n "$SHELLPATH"; then - echo "$as_me:$LINENO: result: $SHELLPATH" >&5 -echo "${ECHO_T}$SHELLPATH" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHELLPATH" >&5 +$as_echo "$SHELLPATH" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$SHELLPATH"; then - { { echo "$as_me:$LINENO: error: bash not found in \$PATH" >&5 -echo "$as_me: error: bash not found in \$PATH" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "bash not found in \$PATH" "$LINENO" 5 else SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/bash$//p"` fi -echo "$as_me:$LINENO: checking gcc home" >&5 -echo $ECHO_N "checking gcc home... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking gcc home" >&5 +$as_echo_n "checking gcc home... " >&6; } if test -z "$with_gcc_home"; then GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,` else GCC_HOME="$with_gcc_home" fi -echo "$as_me:$LINENO: result: $GCC_HOME" >&5 -echo "${ECHO_T}$GCC_HOME" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCC_HOME" >&5 +$as_echo "$GCC_HOME" >&6; } save_CC=$CC @@ -3942,10 +5857,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -3955,35 +5870,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -3993,39 +5910,50 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${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 else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -4035,77 +5963,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -4116,18 +6004,19 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -4145,24 +6034,25 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -4172,39 +6062,41 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -4214,66 +6106,78 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${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 fi fi -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; }; } +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 ; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - 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); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +$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 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $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 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4285,112 +6189,108 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 - 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 +{ $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 '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else - echo "$as_me: failed program was:" >&5 + ac_file='' +fi +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 sed 's/^/| /' conftest.$ac_ext >&5 -{ { 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; }; } +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "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 -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 a.out a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ $as_echo "$as_me:${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 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; 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 @@ -4398,38 +6298,90 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac done else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -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; }; } + { { $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 ; } fi - -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 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 -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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +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 -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_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 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4441,45 +6393,46 @@ main () } _ACEOF rm -f conftest.o conftest.obj -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 +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; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -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; }; } +{ { $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 ; } fi - rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4493,55 +6446,34 @@ main () 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 +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:${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 ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 -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 -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +{ $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 @@ -4552,39 +6484,49 @@ main () 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 +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ -ac_cv_prog_cc_g=no + ; + 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 fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -4600,18 +6542,14 @@ else CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -4639,12 +6577,17 @@ 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 -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -4659,205 +6602,37 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (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 - + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg fi -rm -f conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# 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; } ;; *) - 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" ;; + 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; } ;; 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' @@ -4872,10 +6647,10 @@ if test "$COMPATH" = "." ; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_COMPATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $COMPATH in [\\/]* | ?:[\\/]*) @@ -4887,28 +6662,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_COMPATH="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi COMPATH=$ac_cv_path_COMPATH - if test -n "$COMPATH"; then - echo "$as_me:$LINENO: result: $COMPATH" >&5 -echo "${ECHO_T}$COMPATH" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPATH" >&5 +$as_echo "$COMPATH" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$COMPATH" && break done @@ -4918,22 +6694,18 @@ COMPATH=`echo $COMPATH | $SED "s@/[Bb][Ii][Nn]\\\$@@"`; GCCVER=20995 if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then - echo "$as_me:$LINENO: checking the GNU gcc compiler version" >&5 -echo $ECHO_N "checking the GNU gcc compiler version... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the GNU gcc compiler version" >&5 +$as_echo_n "checking the GNU gcc compiler version... " >&6; } _gcc_version=`$CC -dumpversion` _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'` GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` if test "$_gcc_major" -lt "3"; then - { { echo "$as_me:$LINENO: error: found version \"$_gcc_version\", use version 3+ of the gcc compiler" >&5 -echo "$as_me: error: found version \"$_gcc_version\", use version 3+ of the gcc compiler" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "found version \"$_gcc_version\", use version 3+ of the gcc compiler" "$LINENO" 5 else if test "$GCCVER" -eq "030203"; then if test "$ENABLE_SYMBOLS" = "SMALL"; then - { { echo "$as_me:$LINENO: error: version \"$_gcc_version\" gives internal error with small." >&5 -echo "$as_me: error: version \"$_gcc_version\" gives internal error with small." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "version \"$_gcc_version\" gives internal error with small." "$LINENO" 5 fi fi fi @@ -4946,43 +6718,35 @@ echo "$as_me: error: version \"$_gcc_version\" gives internal error with small." fi fi if test "$GCCVER" -ge "040100" ; then - { { echo "$as_me:$LINENO: error: You need to use the gcc-4.0 compiler (gcc $_gcc_version won't work with the MacOSX10.4u.sdk) - set CC accordingly" >&5 -echo "$as_me: error: You need to use the gcc-4.0 compiler (gcc $_gcc_version won't work with the MacOSX10.4u.sdk) - set CC accordingly" >&2;} - { (exit 1); exit 1; }; } + 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 else - echo "$as_me:$LINENO: result: implicitly using CC=$CC" >&5 -echo "${ECHO_T}implicitly using CC=$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: implicitly using CC=$CC" >&5 +$as_echo "implicitly using CC=$CC" >&6; } fi else - echo "$as_me:$LINENO: result: checked (gcc $_gcc_version)" >&5 -echo "${ECHO_T}checked (gcc $_gcc_version)" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked (gcc $_gcc_version)" >&5 +$as_echo "checked (gcc $_gcc_version)" >&6; } fi if test "$_os" = "SunOS"; then - echo "$as_me:$LINENO: checking gcc linker" >&5 -echo $ECHO_N "checking gcc linker... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking gcc linker" >&5 +$as_echo_n "checking gcc linker... " >&6; } if $CC -Wl,--version 2>&1 |head -n 1| grep -v GNU > /dev/null;then - { { echo "$as_me:$LINENO: error: failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris" >&5 -echo "$as_me: error: failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris" "$LINENO" 5 fi - echo "$as_me:$LINENO: result: ok (GNU ld)" >&5 -echo "${ECHO_T}ok (GNU ld)" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (GNU ld)" >&5 +$as_echo "ok (GNU ld)" >&6; } fi fi HAVE_LD_BSYMBOLIC_FUNCTIONS= if test "$GCC" = "yes"; then - echo "$as_me:$LINENO: checking for -Bsymbolic-functions linker support " >&5 -echo $ECHO_N "checking for -Bsymbolic-functions linker support ... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Bsymbolic-functions linker support " >&5 +$as_echo_n "checking for -Bsymbolic-functions linker support ... " >&6; } bsymbolic_functions_ldflags_save=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -4997,72 +6761,47 @@ 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_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 +if ac_fn_c_try_link "$LINENO"; then : HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then - echo "$as_me:$LINENO: result: found " >&5 -echo "${ECHO_T}found " >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found " >&5 +$as_echo "found " >&6; } else - echo "$as_me:$LINENO: result: not found " >&5 -echo "${ECHO_T}not found " >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found " >&5 +$as_echo "not found " >&6; } fi LDFLAGS=$bsymbolic_functions_ldflags_save fi -echo "$as_me:$LINENO: checking whether to enable pch feature" >&5 -echo $ECHO_N "checking whether to enable pch feature... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable pch feature" >&5 +$as_echo_n "checking whether to enable pch feature... " >&6; } if test -n "$enable_pch" && test "$enable_pch" != "no"; then if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then ENABLE_PCH="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } elif test "$GCC" = "yes" -a "$GCCVER" -gt "030400"; then ENABLE_PCH="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else ENABLE_PCH="" - { echo "$as_me:$LINENO: WARNING: Precompiled header not yet supported for your platform/compiler" >&5 -echo "$as_me: WARNING: Precompiled header not yet supported for your platform/compiler" >&2;} + { $as_echo "$as_me:${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;} fi else ENABLE_PCH="" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking for GNU make" >&5 -echo $ECHO_N "checking for GNU make... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 +$as_echo_n "checking for GNU make... " >&6; } for a in "$MAKE" $GNUMAKE make gmake gnumake; do $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null if test $? -eq 0; then @@ -5070,30 +6809,26 @@ for a in "$MAKE" $GNUMAKE make gmake gnumake; do break fi done -echo "$as_me:$LINENO: result: $GNUMAKE" >&5 -echo "${ECHO_T}$GNUMAKE" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNUMAKE" >&5 +$as_echo "$GNUMAKE" >&6; } if test -z "$GNUMAKE"; then - { { echo "$as_me:$LINENO: error: not found. install GNU make." >&5 -echo "$as_me: error: not found. install GNU make." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "not found. install GNU make." "$LINENO" 5 fi -echo "$as_me:$LINENO: checking the GNU make version" >&5 -echo $ECHO_N "checking the GNU make version... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the GNU make version" >&5 +$as_echo_n "checking the GNU make version... " >&6; } _make_version=`$GNUMAKE --version | grep GNU | $SED -e 's@^[^0-9]*@@' -e 's@ .*@@' -e 's@,.*@@'`; _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` if test "$_make_longver" -ge "038100" ; then - echo "$as_me:$LINENO: result: $GNUMAKE $_make_version" >&5 -echo "${ECHO_T}$GNUMAKE $_make_version" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNUMAKE $_make_version" >&5 +$as_echo "$GNUMAKE $_make_version" >&6; } else - { { echo "$as_me:$LINENO: error: failed ($GNUMAKE version >= 3.81 needed" >&5 -echo "$as_me: error: failed ($GNUMAKE version >= 3.81 needed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "failed ($GNUMAKE version >= 3.81 needed" "$LINENO" 5 fi -echo "$as_me:$LINENO: checking for GNU tar" >&5 -echo $ECHO_N "checking for GNU tar... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU tar" >&5 +$as_echo_n "checking for GNU tar... " >&6; } for a in $GNUTAR gtar gnutar tar; do $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null if test $? -eq 0; then @@ -5101,12 +6836,10 @@ for a in $GNUTAR gtar gnutar tar; do break fi done -echo "$as_me:$LINENO: result: $GNUTAR" >&5 -echo "${ECHO_T}$GNUTAR" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNUTAR" >&5 +$as_echo "$GNUTAR" >&6; } if test -z "$GNUTAR"; then - { { echo "$as_me:$LINENO: error: not found. install GNU tar." >&5 -echo "$as_me: error: not found. install GNU tar." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "not found. install GNU tar." "$LINENO" 5 fi @@ -5117,10 +6850,10 @@ if test "$_os" = "SunOS"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path__cc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $_cc in [\\/]* | ?:[\\/]*) @@ -5132,65 +6865,58 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path__cc="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi _cc=$ac_cv_path__cc - if test -n "$_cc"; then - echo "$as_me:$LINENO: result: $_cc" >&5 -echo "${ECHO_T}$_cc" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cc" >&5 +$as_echo "$_cc" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$_cc" && break done COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"` - echo "$as_me:$LINENO: checking the SunStudio C/C++ compiler version" >&5 -echo $ECHO_N "checking the SunStudio C/C++ compiler version... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the SunStudio C/C++ compiler version" >&5 +$as_echo_n "checking the SunStudio C/C++ compiler version... " >&6; } _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | sed -e 's/.* C //'` _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'` _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'` if test "$_sunstudio_major" != "5"; then - { { echo "$as_me:$LINENO: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&5 -echo "$as_me: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&2;} - { (exit 1); exit 1; }; } + 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 else _sunstudio_minor=`echo $_sunstudio_version | $AWK -F. '{ if ($2 == 5) print "true"; else if ($2 == 7) print "true"; else if ($2 == 8) print "true"; else if ($2 == 9) print "true"; else print "false" }'` if test "$_sunstudio_minor" = "false"; then - { { echo "$as_me:$LINENO: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&5 -echo "$as_me: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&2;} - { (exit 1); exit 1; }; } + 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 else - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 +$as_echo "checked" >&6; } fi fi fi fi if test "$GCC" = "yes"; then - echo "$as_me:$LINENO: checking for --hash-style=both linker support " >&5 -echo $ECHO_N "checking for --hash-style=both linker support ... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --hash-style=both linker support " >&5 +$as_echo_n "checking for --hash-style=both linker support ... " >&6; } hash_style_ldflags_save=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,--hash-style=both" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -5205,43 +6931,19 @@ 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_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 +if ac_fn_c_try_link "$LINENO"; then : HAVE_LD_HASH_STYLE=TRUE else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -HAVE_LD_HASH_STYLE=FALSE + HAVE_LD_HASH_STYLE=FALSE fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "z$HAVE_LD_HASH_STYLE" = "zTRUE"; then - echo "$as_me:$LINENO: result: found " >&5 -echo "${ECHO_T}found " >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found " >&5 +$as_echo "found " >&6; } else - echo "$as_me:$LINENO: result: not found " >&5 -echo "${ECHO_T}not found " >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found " >&5 +$as_echo "not found " >&6; } fi LDFLAGS=$hash_style_ldflags_save fi @@ -5253,10 +6955,10 @@ if test "$_os" = "OSF1"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path__cc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $_cc in [\\/]* | ?:[\\/]*) @@ -5268,45 +6970,44 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path__cc="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi _cc=$ac_cv_path__cc - if test -n "$_cc"; then - echo "$as_me:$LINENO: result: $_cc" >&5 -echo "${ECHO_T}$_cc" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cc" >&5 +$as_echo "$_cc" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$_cc" && break done COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"` - { echo "$as_me:$LINENO: WARNING: ******* $_cc , $COMPATH" >&5 -echo "$as_me: WARNING: ******* $_cc , $COMPATH" >&2;} - echo "$as_me:$LINENO: checking the Compaq C compiler version" >&5 -echo $ECHO_N "checking the Compaq C compiler version... $ECHO_C" >&6 + { $as_echo "$as_me:${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; } _compaqc_version=`$CC -V 2>&1 | $AWK '{ print $3 }'` _compaqc_major=`echo $_compaqc_version | $AWK -F. '{ print $1 }'` if test "$_compaqc_major" != "T6"; then - { { echo "$as_me:$LINENO: error: found version \"$_compaqc_version\", use version 6 of the Compaq C compiler" >&5 -echo "$as_me: error: found version \"$_compaqc_version\", use version 6 of the Compaq C compiler" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "found version \"$_compaqc_version\", use version 6 of the Compaq C compiler" "$LINENO" 5 else - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 +$as_echo "checked" >&6; } fi fi fi @@ -5314,10 +7015,10 @@ fi if test -z "$with_perl_home"; then # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PERL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $PERL in [\\/]* | ?:[\\/]*) @@ -5329,28 +7030,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi PERL=$ac_cv_path_PERL - if test -n "$PERL"; then - echo "$as_me:$LINENO: result: $PERL" >&5 -echo "${ECHO_T}$PERL" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 +$as_echo "$PERL" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + else if test "$_os" = "WINNT"; then with_perl_home=`cygpath -u "$with_perl_home"` @@ -5359,46 +7061,38 @@ else if test -x "$_perl_path"; then PERL=$_perl_path else - { { echo "$as_me:$LINENO: error: $_perl_path not found" >&5 -echo "$as_me: error: $_perl_path not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$_perl_path not found" "$LINENO" 5 fi fi if test "$PERL"; then - echo "$as_me:$LINENO: checking the Perl version" >&5 -echo $ECHO_N "checking the Perl version... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the Perl version" >&5 +$as_echo_n "checking the Perl version... " >&6; } ${PERL} -e "exit($]);" _perl_version=$? if test "$_perl_version" -lt 5; then - { { echo "$as_me:$LINENO: error: found Perl version \"$_perl_version\", use version 5 of Perl" >&5 -echo "$as_me: error: found Perl version \"$_perl_version\", use version 5 of Perl" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "found Perl version \"$_perl_version\", use version 5 of Perl" "$LINENO" 5 fi - echo "$as_me:$LINENO: result: checked (perl $_perl_version)" >&5 -echo "${ECHO_T}checked (perl $_perl_version)" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked (perl $_perl_version)" >&5 +$as_echo "checked (perl $_perl_version)" >&6; } else - { { echo "$as_me:$LINENO: error: Perl not found, install version 5 of Perl" >&5 -echo "$as_me: error: Perl not found, install version 5 of Perl" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Perl not found, install version 5 of Perl" "$LINENO" 5 fi -echo "$as_me:$LINENO: checking for required Perl modules" >&5 -echo $ECHO_N "checking for required Perl modules... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for required Perl modules" >&5 +$as_echo_n "checking for required Perl modules... " >&6; } if `$PERL -e 'use Archive::Zip;'`; then - echo "$as_me:$LINENO: result: all modules found" >&5 -echo "${ECHO_T}all modules found" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: all modules found" >&5 +$as_echo "all modules found" >&6; } else - { { echo "$as_me:$LINENO: error: Failed to find some modules" >&5 -echo "$as_me: error: Failed to find some modules" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Failed to find some modules" "$LINENO" 5 fi if test "$_os" = "WINNT"; then if test "$WITH_MINGWIN" != "yes"; then - echo "$as_me:$LINENO: checking for friendly registry keys" >&5 -echo $ECHO_N "checking for friendly registry keys... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for friendly registry keys" >&5 +$as_echo_n "checking for friendly registry keys... " >&6; } # VS.Net 2003, VS.Net 2005 if test -z "$with_cl_home"; then vctest=`./oowintool --msvc-productdir`; @@ -5408,8 +7102,8 @@ echo $ECHO_N "checking for friendly registry keys... $ECHO_C" >&6 else with_cl_home=`cygpath -u "$with_cl_home"` fi - echo "$as_me:$LINENO: result: done" >&5 -echo "${ECHO_T}done" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -n "$with_mspdb_path";then with_mspdb_path=`cygpath -u "$with_mspdb_path"` @@ -5430,10 +7124,10 @@ echo "${ECHO_T}done" >&6 if test -z "$MSPDB_PATH";then # Extract the first word of "mspdb80.dll", so it can be a program name with args. set dummy mspdb80.dll; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_MSPDB_PATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $MSPDB_PATH in [\\/]* | ?:[\\/]*) @@ -5445,34 +7139,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MSPDB_PATH="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi MSPDB_PATH=$ac_cv_path_MSPDB_PATH - if test -n "$MSPDB_PATH"; then - echo "$as_me:$LINENO: result: $MSPDB_PATH" >&5 -echo "${ECHO_T}$MSPDB_PATH" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSPDB_PATH" >&5 +$as_echo "$MSPDB_PATH" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + # Extract the first word of "mspdb71.dll", so it can be a program name with args. set dummy mspdb71.dll; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_MSPDB_PATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $MSPDB_PATH in [\\/]* | ?:[\\/]*) @@ -5484,51 +7179,50 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MSPDB_PATH="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi MSPDB_PATH=$ac_cv_path_MSPDB_PATH - if test -n "$MSPDB_PATH"; then - echo "$as_me:$LINENO: result: $MSPDB_PATH" >&5 -echo "${ECHO_T}$MSPDB_PATH" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSPDB_PATH" >&5 +$as_echo "$MSPDB_PATH" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + MSPDB_PATH=`dirname "$MSPDB_PATH"` fi if test -z "$MSPDB_PATH"; then - { { echo "$as_me:$LINENO: error: You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path" >&5 -echo "$as_me: error: You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path" "$LINENO" 5 fi MSPDB_PATH=`cygpath -d "$MSPDB_PATH"` MSPDB_PATH=`cygpath -u "$MSPDB_PATH"` PATH="$MSPDB_PATH:$PATH" - echo "$as_me:$LINENO: checking the Microsoft C/C++ Compiler" >&5 -echo $ECHO_N "checking the Microsoft C/C++ Compiler... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the Microsoft C/C++ Compiler" >&5 +$as_echo_n "checking the Microsoft C/C++ Compiler... " >&6; } if test -x "$with_cl_home/bin/cl.exe"; then CC="$with_cl_home/bin/cl.exe" else # Extract the first word of "cl.exe", so it can be a program name with args. set dummy cl.exe; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $CC in [\\/]* | ?:[\\/]*) @@ -5540,40 +7234,41 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CC="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi CC=$ac_cv_path_CC - if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -e "$CC"; then # This gives us a posix path with 8.3 filename restrictions CC=`cygpath -d "$CC"` CC=`cygpath -u "$CC"` # Remove /cl.exe from CC case insensitive - echo "$as_me:$LINENO: result: found ($CC)" >&5 -echo "${ECHO_T}found ($CC)" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ($CC)" >&5 +$as_echo "found ($CC)" >&6; } COMPATH=`echo $CC | $SED 's@\/[Bb][Ii][Nn]\/[cC][lL]\.[eE][xX][eE]@@'` export INCLUDE=`cygpath -d "$COMPATH/Include"` - echo "$as_me:$LINENO: checking the Version of Microsoft C/C++ Compiler" >&5 -echo $ECHO_N "checking the Version of Microsoft C/C++ Compiler... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the Version of Microsoft C/C++ Compiler" >&5 +$as_echo_n "checking the Version of Microsoft C/C++ Compiler... " >&6; } CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ { x = match( \\\$0, /..\\...\\...../ ) CCversion = substr( \\\$0, RSTART, RLENGTH) @@ -5582,48 +7277,42 @@ echo $ECHO_N "checking the Version of Microsoft C/C++ Compiler... $ECHO_C" >&6 printf (\"%04d\",vertoken[i] ) } }"` - echo "$as_me:$LINENO: result: found Compiler version $CCNUMVER." >&5 -echo "${ECHO_T}found Compiler version $CCNUMVER." >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found Compiler version $CCNUMVER." >&5 +$as_echo "found Compiler version $CCNUMVER." >&6; } if test "$CCNUMVER" -ge "001500000000"; then COMEX=12 MSVSVER=2008 - echo "$as_me:$LINENO: result: found .NET 2008 / VS 9.0." >&5 -echo "${ECHO_T}found .NET 2008 / VS 9.0." >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found .NET 2008 / VS 9.0." >&5 +$as_echo "found .NET 2008 / VS 9.0." >&6; } elif test "$CCNUMVER" -ge "001400000000"; then COMEX=11 MSVSVER=2005 - echo "$as_me:$LINENO: result: found .NET 2005." >&5 -echo "${ECHO_T}found .NET 2005." >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found .NET 2005." >&5 +$as_echo "found .NET 2005." >&6; } elif test "$CCNUMVER" -ge "001300102240"; then COMEX=10 MSVSVER=2003 - echo "$as_me:$LINENO: result: found .NET 2003." >&5 -echo "${ECHO_T}found .NET 2003." >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found .NET 2003." >&5 +$as_echo "found .NET 2003." >&6; } else - { { echo "$as_me:$LINENO: error: Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler." >&5 -echo "$as_me: error: Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler." "$LINENO" 5 fi else - { { echo "$as_me:$LINENO: error: Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe." >&5 -echo "$as_me: error: Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe." "$LINENO" 5 fi else - echo "$as_me:$LINENO: checking the Mingwin32 C++ Compiler" >&5 -echo $ECHO_N "checking the Mingwin32 C++ Compiler... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the Mingwin32 C++ Compiler" >&5 +$as_echo_n "checking the Mingwin32 C++ Compiler... " >&6; } if test `$CC -dumpmachine | $SED -e 's/^.*-//'` = "mingw32"; then - echo "$as_me:$LINENO: result: found." >&5 -echo "${ECHO_T}found." >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found." >&5 +$as_echo "found." >&6; } if $CC -dumpspecs | grep -q "mno-cygwin"; then USE_MINGW="cygwin" else USE_MINGW="pure-mingw" fi else - { { echo "$as_me:$LINENO: error: Mingwin32 C++ Compiler not found." >&5 -echo "$as_me: error: Mingwin32 C++ Compiler not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Mingwin32 C++ Compiler not found." "$LINENO" 5 fi fi fi @@ -5635,10 +7324,10 @@ if test "$_os" = "WINNT"; then if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then # Extract the first word of "midl.exe", so it can be a program name with args. set dummy midl.exe; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_MIDL_PATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $MIDL_PATH in [\\/]* | ?:[\\/]*) @@ -5650,28 +7339,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MIDL_PATH="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi MIDL_PATH=$ac_cv_path_MIDL_PATH - if test -n "$MIDL_PATH"; then - echo "$as_me:$LINENO: result: $MIDL_PATH" >&5 -echo "${ECHO_T}$MIDL_PATH" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIDL_PATH" >&5 +$as_echo "$MIDL_PATH" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test -n "$MIDL_PATH";then MIDL_PATH=`dirname "$MIDL_PATH"` fi @@ -5697,9 +7387,7 @@ fi fi fi if test ! -x "$MIDL_PATH/midl.exe"; then - { { echo "$as_me:$LINENO: error: midl.exe not found. Make sure it's in the path or use --with-midl-path" >&5 -echo "$as_me: error: midl.exe not found. Make sure it's in the path or use --with-midl-path" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "midl.exe not found. Make sure it's in the path or use --with-midl-path" "$LINENO" 5 fi # Convert to posix path with 8.3 filename restrictions ( No spaces ) MIDL_PATH=`cygpath -d "$MIDL_PATH"` @@ -5707,10 +7395,10 @@ echo "$as_me: error: midl.exe not found. Make sure it's in the path or use --wit # Extract the first word of "csc.exe", so it can be a program name with args. set dummy csc.exe; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_CSC_PATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $CSC_PATH in [\\/]* | ?:[\\/]*) @@ -5722,28 +7410,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CSC_PATH="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi CSC_PATH=$ac_cv_path_CSC_PATH - if test -n "$CSC_PATH"; then - echo "$as_me:$LINENO: result: $CSC_PATH" >&5 -echo "${ECHO_T}$CSC_PATH" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CSC_PATH" >&5 +$as_echo "$CSC_PATH" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test -n "$CSC_PATH";then CSC_PATH=`dirname "$CSC_PATH"` fi @@ -5759,16 +7448,14 @@ fi fi fi if test ! -x "$CSC_PATH/csc.exe"; then - { { echo "$as_me:$LINENO: error: csc.exe not found. Make sure it's in the path or use --with-csc-path" >&5 -echo "$as_me: error: csc.exe not found. Make sure it's in the path or use --with-csc-path" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "csc.exe not found. Make sure it's in the path or use --with-csc-path" "$LINENO" 5 fi # Convert to posix path with 8.3 filename restrictions ( No spaces ) CSC_PATH=`cygpath -d "$CSC_PATH"` CSC_PATH=`cygpath -u "$CSC_PATH"` - echo "$as_me:$LINENO: checking .NET Framework" >&5 -echo $ECHO_N "checking .NET Framework... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking .NET Framework" >&5 +$as_echo_n "checking .NET Framework... " >&6; } if test -n "$with_frame_home"; then with_frame_home=`cygpath -u "$with_frame_home"` fi @@ -5790,12 +7477,10 @@ echo $ECHO_N "checking .NET Framework... $ECHO_C" >&6 fi fi if test ! -f "$FRAME_HOME/lib/mscoree.lib"; then - { { echo "$as_me:$LINENO: error: mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home" >&5 -echo "$as_me: error: mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home" "$LINENO" 5 fi - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } # Convert to posix path with 8.3 filename restrictions ( No spaces ) FRAME_HOME=`cygpath -d "$FRAME_HOME"` FRAME_HOME=`cygpath -u "$FRAME_HOME"` @@ -5811,15 +7496,15 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -5833,11 +7518,7 @@ 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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -5846,78 +7527,34 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - 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 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 +if ac_fn_c_try_cpp "$LINENO"; 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 fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i 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 +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : break fi @@ -5929,8 +7566,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -5940,11 +7577,7 @@ 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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -5953,85 +7586,40 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - 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 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 +if ac_fn_c_try_cpp "$LINENO"; 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 fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i 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 - : +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + else - { { 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; }; } + { { $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 ; } fi ac_ext=c @@ -6041,16 +7629,12 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -6065,51 +7649,23 @@ main () 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 +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 @@ -6119,18 +7675,14 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 @@ -6140,16 +7692,13 @@ 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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -6169,61 +7718,50 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - 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 - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_run "$LINENO"; then : -( exit $ac_status ) -ac_cv_header_stdc=no +else + ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi fi if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then - ac_ext=cc + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. @@ -6233,39 +7771,41 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. @@ -6275,64 +7815,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$ac_ct_CXX" && break done -test -n "$ac_ct_CXX" || ac_ct_CXX="g++" - CXX=$ac_ct_CXX + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${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 fi - + fi +fi # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C++ compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - 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); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +$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 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $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: 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 +{ $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 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -6346,55 +7899,34 @@ main () 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_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 +if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 -GXX=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:${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 ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -CXXFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 -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 +{ $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 /* end confdefs.h. */ int @@ -6405,176 +7937,80 @@ main () 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_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 +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else - 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 + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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_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 - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_cxx_try_compile "$LINENO"; then : -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 +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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_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 - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:${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 +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi fi - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_ext=cc +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 -echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test "${ac_cv_prog_CXXCPP+set}" = set; then : + $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" @@ -6588,11 +8024,7 @@ 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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -6601,78 +8033,34 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - 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 +if ac_fn_cxx_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 +if ac_fn_cxx_try_cpp "$LINENO"; 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 fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i 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 +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : break fi @@ -6684,8 +8072,8 @@ fi else ac_cv_prog_CXXCPP=$CXXCPP fi -echo "$as_me:$LINENO: result: $CXXCPP" >&5 -echo "${ECHO_T}$CXXCPP" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do @@ -6695,11 +8083,7 @@ 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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -6708,85 +8092,40 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - 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 +if ac_fn_cxx_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 +if ac_fn_cxx_try_cpp "$LINENO"; 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 fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i 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 - : +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + else - { { 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; }; } + { { $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 ; } fi ac_ext=c @@ -6804,15 +8143,15 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -6826,11 +8165,7 @@ 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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -6839,78 +8174,34 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - 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 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 +if ac_fn_c_try_cpp "$LINENO"; 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 fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i 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 +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : break fi @@ -6922,8 +8213,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -6933,11 +8224,7 @@ 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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -6946,85 +8233,40 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - 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 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; 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 fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i 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 - : +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + else - { { 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; }; } + { { $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 ; } fi ac_ext=c @@ -7037,70 +8279,15 @@ 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=`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 +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 +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -7108,678 +8295,287 @@ fi done -echo "$as_me:$LINENO: checking for long" >&5 -echo $ECHO_N "checking for long... $ECHO_C" >&6 -if test "${ac_cv_type_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((long *) 0) - return 0; -if (sizeof (long)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_long=yes +# 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 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_long=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 -echo "${ECHO_T}$ac_cv_type_long" >&6 + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : -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 - # 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 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long) +See \`config.log' for more details" "$LINENO" 5 ; } + else + ac_cv_sizeof_long=0 + fi +fi - ; - 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 +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_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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long _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 - ; - 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 +SIZEOF_LONG=$ac_cv_sizeof_long -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 + { $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 else - 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 + 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 fi -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 +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 /* end confdefs.h. */ -$ac_includes_default +#include + #include + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; -test_array [0] = 0 +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +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. */ -$ac_includes_default -long longval () { return (long) (sizeof (long)); } -unsigned long ulongval () { return (long) (sizeof (long)); } -#include -#include +#include + #include + int main () { - - 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); +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_long=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -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 *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -rm -f conftest.val +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes else - ac_cv_sizeof_long=0 + ac_cv_c_bigendian=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 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 +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 /* end confdefs.h. */ -#include -#include +#include int main () { -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros -#endif +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +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 +#include int main () { -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif +#ifndef _BIG_ENDIAN + not big endian + #endif ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -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 +rm -f core conftest.err 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 + # 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 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; } +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + int main () { - _ascii (); _ebcdic (); +return use_ascii (foo) == use_ebcdic (foo); ; 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 - if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then - ac_cv_c_bigendian=yes -fi -if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +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 fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +$ac_includes_default int main () { - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long l; - char c[sizeof (long)]; - } u; - u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (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 +if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no 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 ) -ac_cv_c_bigendian=yes -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + 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 fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + fi 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_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) -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 +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + ;; #( + *) + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac WORDS_BIGENDIAN=$ac_cv_c_bigendian -# Check whether --enable-largefile or --disable-largefile was given. -if test "${enable_largefile+set}" = set; then - enableval="$enable_largefile" +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +fi -fi; if test "$enable_largefile" != no; then - 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 + { $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 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + # 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 /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -7798,89 +8594,34 @@ main () 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 + if ac_fn_c_try_compile "$LINENO"; then : break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - fi -rm -f conftest.err conftest.$ac_objext - CC="$CC -n32" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; 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 conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi -echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 -echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi - echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 -if test "${ac_cv_sys_file_offset_bits+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else while :; do - 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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -7899,40 +8640,11 @@ main () 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 - +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break 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 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include @@ -7952,60 +8664,33 @@ main () 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 +if ac_fn_c_try_compile "$LINENO"; 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 conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown break done fi -echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 -echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 -if test "$ac_cv_sys_file_offset_bits" != no; then - +{ $as_echo "$as_me:${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) ;; + *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF - -fi -rm -f conftest* - echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 -echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6 -if test "${ac_cv_sys_large_files+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +;; +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 else while :; do - 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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -8024,40 +8709,11 @@ main () 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 - +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break 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 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include @@ -8077,48 +8733,26 @@ main () 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 +if ac_fn_c_try_compile "$LINENO"; 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 conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown break done fi -echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 -echo "${ECHO_T}$ac_cv_sys_large_files" >&6 -if test "$ac_cv_sys_large_files" != no; then - +{ $as_echo "$as_me:${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) ;; + *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF - -fi -rm -f conftest* +;; +esac +rm -rf conftest* + fi fi if test -n "$ac_cv_sys_file_offset_bits"; then @@ -8129,44 +8763,42 @@ if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; th fi -echo "$as_me:$LINENO: checking whether to disable vba feature" >&5 -echo $ECHO_N "checking whether to disable vba feature... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to disable vba feature" >&5 +$as_echo_n "checking whether to disable vba feature... " >&6; } if test -n "$enable_vba" && test "$enable_vba" = "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ENABLE_VBA=NO else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ENABLE_VBA=YES fi if test "$ENABLE_VBA" = "YES"; then - echo "$as_me:$LINENO: checking how to package the vba compatibility api" >&5 -echo $ECHO_N "checking how to package the vba compatibility api... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to package the vba compatibility api" >&5 +$as_echo_n "checking how to package the vba compatibility api... " >&6; } if test -n "$with_vba_package_format"; then if test "$with_vba_package_format" = "extn"; then VBA_EXTENSION=YES - echo "$as_me:$LINENO: result: uno extension" >&5 -echo "${ECHO_T}uno extension" >&6 - { echo "$as_me:$LINENO: WARNING: --with-vba-package-format=extn can cause problems" >&5 -echo "$as_me: WARNING: --with-vba-package-format=extn can cause problems" >&2;} + { $as_echo "$as_me:${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;} else if test "$with_vba_package_format" = "builtin"; then VBA_EXTENSION=NO - echo "$as_me:$LINENO: result: build into installset" >&5 -echo "${ECHO_T}build into installset" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: build into installset" >&5 +$as_echo "build into installset" >&6; } else - { { echo "$as_me:$LINENO: error: unknown packaging method" >&5 -echo "$as_me: error: unknown packaging method" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "unknown packaging method" "$LINENO" 5 fi fi else VBA_EXTENSION=NO - echo "$as_me:$LINENO: result: defaulting to build into installset" >&5 -echo "${ECHO_T}defaulting to build into installset" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to build into installset" >&5 +$as_echo "defaulting to build into installset" >&6; } fi else VBA_EXTENSION=NO @@ -8176,379 +8808,74 @@ fi if test "$test_cups" = "yes" -a "$ENABLE_CUPS" = "TRUE" ; then - if test "${ac_cv_header_cups_cups_h+set}" = set; then - echo "$as_me:$LINENO: checking for cups/cups.h" >&5 -echo $ECHO_N "checking for cups/cups.h... $ECHO_C" >&6 -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 + 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 : -fi -if test $ac_cv_header_cups_cups_h = yes; then - : else - { { echo "$as_me:$LINENO: error: cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?" >&5 -echo "$as_me: error: cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?" "$LINENO" 5 fi fi if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "GNU"; then - echo "$as_me:$LINENO: checking whether to enable pam support" >&5 -echo $ECHO_N "checking whether to enable pam support... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable pam support" >&5 +$as_echo_n "checking whether to enable pam support... " >&6; } if test -z "$enable_pam" || test "$enable_pam" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } PAM=YES - if test "${ac_cv_header_security_pam_appl_h+set}" = set; then - echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5 -echo $ECHO_N "checking for security/pam_appl.h... $ECHO_C" >&6 -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 + 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 : -fi -if test $ac_cv_header_security_pam_appl_h = yes; then - : else - { { echo "$as_me:$LINENO: error: pam_appl.h could not be found. libpam-dev or pam-devel missing?" >&5 -echo "$as_me: error: pam_appl.h could not be found. libpam-dev or pam-devel missing?" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "pam_appl.h could not be found. libpam-dev or pam-devel missing?" "$LINENO" 5 fi - echo "$as_me:$LINENO: checking whether to link to libpam" >&5 -echo $ECHO_N "checking whether to link to libpam... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to link to libpam" >&5 +$as_echo_n "checking whether to link to libpam... " >&6; } if test -n "$enable_pam_link" -a "$enable_pam_link" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } PAM_LINK=YES - -echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5 -echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6 -if test "${ac_cv_lib_pam_pam_start+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpam $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pam_start (); int main () { -pam_start (); +return pam_start (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pam_pam_start=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_pam_pam_start=no + ac_cv_lib_pam_pam_start=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_pam_pam_start" >&5 -echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6 -if test $ac_cv_lib_pam_pam_start = yes; then +{ $as_echo "$as_me:${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 : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPAM 1 _ACEOF @@ -8556,19 +8883,17 @@ _ACEOF LIBS="-lpam $LIBS" else - { { echo "$as_me:$LINENO: error: libpam not found or functional" >&5 -echo "$as_me: error: libpam not found or functional" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libpam not found or functional" "$LINENO" 5 fi else - echo "$as_me:$LINENO: result: no, dynamically open it" >&5 -echo "${ECHO_T}no, dynamically open it" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, dynamically open it" >&5 +$as_echo "no, dynamically open it" >&6; } PAM_LINK=NO fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } PAM=NO PAM_LINK=NO @@ -8579,11 +8904,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - echo "$as_me:$LINENO: checking how many arguments getspnam_r() takes" >&5 -echo $ECHO_N "checking how many arguments getspnam_r() takes... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how many arguments getspnam_r() takes" >&5 +$as_echo_n "checking how many arguments getspnam_r() takes... " >&6; } - if test "${ac_cv_func_which_getspnam_r+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test "${ac_cv_func_which_getspnam_r+set}" = set; then : + $as_echo_n "(cached) " >&6 else @@ -8600,11 +8925,7 @@ 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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -8621,35 +8942,10 @@ main () 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 +if ac_fn_c_try_compile "$LINENO"; 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 conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # # FIVE ARGUMENTS @@ -8657,11 +8953,7 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test "$ac_cv_func_which_getspnam_r" = "unknown"; then -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -8680,35 +8972,10 @@ main () 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 +if ac_fn_c_try_compile "$LINENO"; 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 conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -8718,11 +8985,7 @@ fi if test "$ac_cv_func_which_getspnam_r" = "unknown"; then -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -8741,35 +9004,10 @@ main () 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 +if ac_fn_c_try_compile "$LINENO"; 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 conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -8780,30 +9018,28 @@ fi case "$ac_cv_func_which_getspnam_r" in five) - echo "$as_me:$LINENO: result: five" >&5 -echo "${ECHO_T}five" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: five" >&5 +$as_echo "five" >&6; } NEW_SHADOW_API=YES ;; four) - echo "$as_me:$LINENO: result: four" >&5 -echo "${ECHO_T}four" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: four" >&5 +$as_echo "four" >&6; } ;; no) - echo "$as_me:$LINENO: result: cannot find function declaration in shadow.h" >&5 -echo "${ECHO_T}cannot find function declaration in shadow.h" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot find function declaration in shadow.h" >&5 +$as_echo "cannot find function declaration in shadow.h" >&6; } ;; unknown) - echo "$as_me:$LINENO: result: can't tell" >&5 -echo "${ECHO_T}can't tell" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: can't tell" >&5 +$as_echo "can't tell" >&6; } ;; *) - { { echo "$as_me:$LINENO: error: internal error" >&5 -echo "$as_me: error: internal error" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "internal error" "$LINENO" 5 ;; esac @@ -8822,78 +9058,49 @@ fi if test "$_os" = "Linux"; then - echo "$as_me:$LINENO: checking whether to link to libcrypt" >&5 -echo $ECHO_N "checking whether to link to libcrypt... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to link to libcrypt" >&5 +$as_echo_n "checking whether to link to libcrypt... " >&6; } if test -n "$enable_crypt_link" -a "$enable_crypt_link" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } CRYPT_LINK=YES - -echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 -echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6 -if test "${ac_cv_lib_crypt_crypt+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypt $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char crypt (); int main () { -crypt (); +return crypt (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_crypt_crypt=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_crypt_crypt=no + ac_cv_lib_crypt_crypt=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_crypt_crypt" >&5 -echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6 -if test $ac_cv_lib_crypt_crypt = yes; then +{ $as_echo "$as_me:${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 : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCRYPT 1 _ACEOF @@ -8901,14 +9108,12 @@ _ACEOF LIBS="-lcrypt $LIBS" else - { { echo "$as_me:$LINENO: error: libcrypt not found or functional" >&5 -echo "$as_me: error: libcrypt not found or functional" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libcrypt not found or functional" "$LINENO" 5 fi else - echo "$as_me:$LINENO: result: no, dynamically open it" >&5 -echo "${ECHO_T}no, dynamically open it" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, dynamically open it" >&5 +$as_echo "no, dynamically open it" >&6; } CRYPT_LINK=NO fi fi @@ -8927,20 +9132,24 @@ if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then fi if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then - ac_ext=cc + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. @@ -8950,39 +9159,41 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. @@ -8992,64 +9203,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$ac_ct_CXX" && break done -test -n "$ac_ct_CXX" || ac_ct_CXX="g++" - CXX=$ac_ct_CXX + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${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 fi - + fi +fi # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C++ compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - 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); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +$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 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $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: 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 +{ $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 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9063,55 +9287,34 @@ main () 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_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 +if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 -GXX=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:${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 ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -CXXFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 -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 +{ $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 /* end confdefs.h. */ int @@ -9122,160 +9325,64 @@ main () 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_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 +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else - 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 + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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_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 - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_cxx_try_compile "$LINENO"; then : -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 +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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_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 - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:${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 +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi fi - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -9285,8 +9392,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi if test "$GXX" = "yes"; then - echo "$as_me:$LINENO: checking the GNU C++ compiler version" >&5 -echo $ECHO_N "checking the GNU C++ compiler version... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the GNU C++ compiler version" >&5 +$as_echo_n "checking the GNU C++ compiler version... " >&6; } _gpp_version=`$CXX -dumpversion` _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'` @@ -9300,33 +9407,26 @@ echo $ECHO_N "checking the GNU C++ compiler version... $ECHO_C" >&6 fi fi if test "$_gpp_majmin" -ge "401" ; then - { { echo "$as_me:$LINENO: error: You need to use the g++-4.0 compiler (g++ $_gpp_version won't work with the MacOSX10.4u.sdk) - set CXX accordingly" >&5 -echo "$as_me: error: You need to use the g++-4.0 compiler (g++ $_gpp_version won't work with the MacOSX10.4u.sdk) - set CXX accordingly" >&2;} - { (exit 1); exit 1; }; } + 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 else - echo "$as_me:$LINENO: result: implicitly using CXX=$CXX" >&5 -echo "${ECHO_T}implicitly using CXX=$CXX" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: implicitly using CXX=$CXX" >&5 +$as_echo "implicitly using CXX=$CXX" >&6; } fi else - echo "$as_me:$LINENO: result: checked (g++ $_gpp_version)" >&5 -echo "${ECHO_T}checked (g++ $_gpp_version)" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked (g++ $_gpp_version)" >&5 +$as_echo "checked (g++ $_gpp_version)" >&6; } fi if test "$_gpp_majmin" = "304"; then - echo "$as_me:$LINENO: checking whether $CXX has the enum bug" >&5 -echo $ECHO_N "checking whether $CXX has the enum bug... $ECHO_C" >&6 -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 + { $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 /* end confdefs.h. */ extern "C" void abort (void); @@ -9351,39 +9451,24 @@ main (void) } _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - { { echo "$as_me:$LINENO: 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 +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; } fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi fi # Removed the special FreeBSD treatment. The problem was that with_gxx_include_path # often contains an i386 which is expanded as a macro. Solved in stlport. if test "$GXX" = "yes"; then - echo "$as_me:$LINENO: checking for g++ include path" >&5 -echo $ECHO_N "checking for g++ include path... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for g++ include path" >&5 +$as_echo_n "checking for g++ include path... " >&6; } if test -z "$with_gxx_include_path"; then with_gxx_include_path=`echo "#include " | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1` if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then @@ -9401,18 +9486,18 @@ echo $ECHO_N "checking for g++ include path... $ECHO_C" >&6 fi if test -z "$with_gxx_include_path"; then with_gxx_include_path="NO_GXX_INCLUDE" - echo "$as_me:$LINENO: result: no g++ includes" >&5 -echo "${ECHO_T}no g++ includes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no g++ includes" >&5 +$as_echo "no g++ includes" >&6; } else - echo "$as_me:$LINENO: result: $with_gxx_include_path" >&5 -echo "${ECHO_T}$with_gxx_include_path" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gxx_include_path" >&5 +$as_echo "$with_gxx_include_path" >&6; } fi GXX_INCLUDE_PATH="$with_gxx_include_path" if test "$WITH_MINGWIN" = "yes"; then - echo "$as_me:$LINENO: checking for mingwin runtime include path" >&5 -echo $ECHO_N "checking for mingwin runtime include path... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mingwin runtime include path" >&5 +$as_echo_n "checking for mingwin runtime include path... " >&6; } cat >conftest.$ac_ext <<_ACEOF #include #include @@ -9430,16 +9515,16 @@ _ACEOF fi if test -z "$_mingw_lib_include_path"; then _mingw_lib_include_path="NO_LIB_INCLUDE" - echo "$as_me:$LINENO: result: no mingwin runtime includes" >&5 -echo "${ECHO_T}no mingwin runtime includes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no mingwin runtime includes" >&5 +$as_echo "no mingwin runtime includes" >&6; } else - echo "$as_me:$LINENO: result: $_mingw_lib_include_path" >&5 -echo "${ECHO_T}$_mingw_lib_include_path" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_mingw_lib_include_path" >&5 +$as_echo "$_mingw_lib_include_path" >&6; } fi MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path" - echo "$as_me:$LINENO: checking for mingwin c++ backward include path" >&5 -echo $ECHO_N "checking for mingwin c++ backward include path... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mingwin c++ backward include path" >&5 +$as_echo_n "checking for mingwin c++ backward include path... " >&6; } cat >conftest.$ac_ext <<_ACEOF #include _ACEOF @@ -9448,41 +9533,41 @@ _ACEOF if test -n "$_mingw_backward_include_path"; then _mingw_backward_include_path=`cygpath -d $_mingw_backward_include_path` _mingw_backward_include_path=`cygpath -u $_mingw_backward_include_path` - echo "$as_me:$LINENO: result: $_mingw_backward_include_path" >&5 -echo "${ECHO_T}$_mingw_backward_include_path" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_mingw_backward_include_path" >&5 +$as_echo "$_mingw_backward_include_path" >&6; } else _mingw_backward_include_path="NO_BACKWARD_INCLUDE" - echo "$as_me:$LINENO: result: no mingwin c++ backward includes" >&5 -echo "${ECHO_T}no mingwin c++ backward includes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no mingwin c++ backward includes" >&5 +$as_echo "no mingwin c++ backward includes" >&6; } fi MINGW_BACKWARD_INCLUDE_PATH="$_mingw_backward_include_path" mingw_crtbegin=`$CC -print-file-name=crtbegin.o` MINGW_CLIB_DIR=`dirname $mingw_crtbegin` - echo "$as_me:$LINENO: checking whether to use dynamic libgcc" >&5 -echo $ECHO_N "checking whether to use dynamic libgcc... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use dynamic libgcc" >&5 +$as_echo_n "checking whether to use dynamic libgcc... " >&6; } if test -e "$MINGW_CLIB_DIR/libgcc_s.a"; then - echo "$as_me:$LINENO: checking dynamic libgcc name" >&5 -echo $ECHO_N "checking dynamic libgcc name... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic libgcc name" >&5 +$as_echo_n "checking dynamic libgcc name... " >&6; } MINGW_GCCDLL_pattern=`nm $MINGW_CLIB_DIR/libgcc_s.a | sed -ne 's@.* _libgcc\(.*\)_dll_iname@libgcc\1.dll@p' | uniq | sed -e 's@_@?@g'` MINGW_GCCDLL=`cd $COMPATH/bin && ls $MINGW_GCCDLL_pattern 2>/dev/null` if test -n "$MINGW_GCCDLL"; then MINGW_SHARED_GCCLIB=YES - echo "$as_me:$LINENO: result: use $MINGW_GCCDLL" >&5 -echo "${ECHO_T}use $MINGW_GCCDLL" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: use $MINGW_GCCDLL" >&5 +$as_echo "use $MINGW_GCCDLL" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test -e "$MINGW_CLIB_DIR/libgcc_eh.a"; then MINGW_GCCLIB_EH=YES fi - echo "$as_me:$LINENO: checking whether to use dynamic libstdc++" >&5 -echo $ECHO_N "checking whether to use dynamic libstdc++... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use dynamic libstdc++" >&5 +$as_echo_n "checking whether to use dynamic libstdc++... " >&6; } MINGW_SHARED_LIBSTDCPP= if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then MINGW_SHARED_LIBSTDCPP=stdc++_s @@ -9491,23 +9576,23 @@ echo $ECHO_N "checking whether to use dynamic libstdc++... $ECHO_C" >&6 MINGW_SHARED_LIBSTDCPP=stdc++.dll fi if test -n "$MINGW_SHARED_LIBSTDCPP" ; then - echo "$as_me:$LINENO: checking dynamic libstdc++ name" >&5 -echo $ECHO_N "checking dynamic libstdc++ name... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic libstdc++ name" >&5 +$as_echo_n "checking dynamic libstdc++ name... " >&6; } MINGW_GXXDLL_pattern=`nm $MINGW_CLIB_DIR/lib$MINGW_SHARED_LIBSTDCPP.a | sed -ne 's@.* _libstdc__\(.*\)_dll_iname@libstdc++\1.dll@p' | uniq | sed -e 's@_@?@g'` MINGW_GXXDLL=`cd $COMPATH/bin && ls $MINGW_GXXDLL_pattern 2>/dev/null` if test -n "$MINGW_GXXDLL"; then MINGW_SHARED_LIBSTDCPP=-l$MINGW_SHARED_LIBSTDCPP MINGW_SHARED_GXXLIB=YES - echo "$as_me:$LINENO: result: use $MINGW_GXXDLL" >&5 -echo "${ECHO_T}use $MINGW_GXXDLL" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: use $MINGW_GXXDLL" >&5 +$as_echo "use $MINGW_GXXDLL" >&6; } else MINGW_SHARED_LIBSTDCPP= - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi MINGW_CLIB_DIR=`cygpath $MINGW_CLIB_DIR` @@ -9521,36 +9606,36 @@ fi if test "$_os" = "SunOS"; then if test "$CC" = "cc"; then - echo "$as_me:$LINENO: checking SunStudio C++ Compiler" >&5 -echo $ECHO_N "checking SunStudio C++ Compiler... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking SunStudio C++ Compiler" >&5 +$as_echo_n "checking SunStudio C++ Compiler... " >&6; } if test "$CXX" != "CC"; then - { echo "$as_me:$LINENO: WARNING: SunStudio C++ was not found" >&5 -echo "$as_me: WARNING: SunStudio C++ was not found" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SunStudio C++ was not found" >&5 +$as_echo "$as_me: WARNING: SunStudio C++ was not found" >&2;} echo "SunStudio C++ was not found" >> warn else - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 +$as_echo "checked" >&6; } fi fi fi if test "$_os" = "OSF1"; then - echo "$as_me:$LINENO: checking Compaq C++ compiler version" >&5 -echo $ECHO_N "checking Compaq C++ compiler version... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Compaq C++ compiler version" >&5 +$as_echo_n "checking Compaq C++ compiler version... " >&6; } _compaqcxx_version=`$CXX -V 2>&1 | $AWK '{ print $3 }'` _compaqcxx_major=`echo $_compaqcxx_version | $AWK -F. '{ print $1 }'` if test "$_compaqcxx_major" != "V6"; then - { echo "$as_me:$LINENO: WARNING: found version \"$_compaqc_version\", use version 6 of the Compaq C++ compiler" >&5 -echo "$as_me: WARNING: found version \"$_compaqc_version\", use version 6 of the Compaq C++ compiler" >&2;} + { $as_echo "$as_me:${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 "found version $_compaqc_version, use version 6 of the Compaq C++ compiler" >> warn else - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 +$as_echo "checked" >&6; } fi fi -echo "$as_me:$LINENO: checking exception type" >&5 -echo $ECHO_N "checking exception type... $ECHO_C" >&6 -ac_ext=cc +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking exception type" >&5 +$as_echo_n "checking exception type... " >&6; } +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -9558,11 +9643,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "$WITH_MINGWIN" = "yes"; then -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -9577,42 +9658,18 @@ _Unwind_SjLj_RaiseException() 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 +if ac_fn_cxx_try_link "$LINENO"; then : exceptions_type="sjlj" else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -exceptions_type="dwarf2" + exceptions_type="dwarf2" fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $exceptions_type" >&5 -echo "${ECHO_T}$exceptions_type" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $exceptions_type" >&5 +$as_echo "$exceptions_type" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -9625,8 +9682,8 @@ EXCEPTIONS="$exceptions_type" if test "$_os" = "SunOS"; then _temp=`showrev -p | $AWK -F" " '{ print $2 }'` if test "$_os_release" = "7"; then - echo "$as_me:$LINENO: checking for patch 106327-06 or greater" >&5 -echo $ECHO_N "checking for patch 106327-06 or greater... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for patch 106327-06 or greater" >&5 +$as_echo_n "checking for patch 106327-06 or greater... " >&6; } _patch=`echo $_temp | $AWK '/106327-06/ { print "found" }'` _patch="false" for i in $_temp @@ -9640,15 +9697,15 @@ echo $ECHO_N "checking for patch 106327-06 or greater... $ECHO_C" >&6 fi done if test "$_patch" = "found"; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } else - { echo "$as_me:$LINENO: WARNING: patch 106327-06 not found, please install compiler patch 106327-06 or greater" >&5 -echo "$as_me: WARNING: patch 106327-06 not found, please install compiler patch 106327-06 or greater" >&2;} + { $as_echo "$as_me:${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 "patch 106327-06 not found, please install compiler patch 106327-06 or greater" >> warn fi - echo "$as_me:$LINENO: checking for patch 106950-11 or greater" >&5 -echo $ECHO_N "checking for patch 106950-11 or greater... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for patch 106950-11 or greater" >&5 +$as_echo_n "checking for patch 106950-11 or greater... " >&6; } _patch=`echo $_temp | $AWK '/106950-11/ { print "found" }'` _patch="false" for i in $_temp @@ -9662,17 +9719,17 @@ echo $ECHO_N "checking for patch 106950-11 or greater... $ECHO_C" >&6 fi done if test "$_patch" = "found"; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } else - { echo "$as_me:$LINENO: WARNING: patch 106950-11 not found, please install linker patch 106950-11 or greater" >&5 -echo "$as_me: WARNING: patch 106950-11 not found, please install linker patch 106950-11 or greater" >&2;} + { $as_echo "$as_me:${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 "patch 106950-11 not found, please install linker patch 106950-11 or greater" >> warn fi else if test "$_os_release" = "6"; then - echo "$as_me:$LINENO: checking for patch 105591-09 or greater" >&5 -echo $ECHO_N "checking for patch 105591-09 or greater... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for patch 105591-09 or greater" >&5 +$as_echo_n "checking for patch 105591-09 or greater... " >&6; } _patch=`echo $_temp | $AWK '/105591-09/ { print "found" }'` _patch="false" for i in $_temp @@ -9686,15 +9743,15 @@ echo $ECHO_N "checking for patch 105591-09 or greater... $ECHO_C" >&6 fi done if test "$_patch" = "found"; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } else - { echo "$as_me:$LINENO: WARNING: patch 105591-09 not found, please install compiler patch 105591-09 or greater" >&5 -echo "$as_me: WARNING: patch 105591-09 not found, please install compiler patch 105591-09 or greater" >&2;} + { $as_echo "$as_me:${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 "patch 105591-09 not found, please install compiler patch 105591-09 or greater" >> warn fi - echo "$as_me:$LINENO: checking for patch 107733-08 or greater" >&5 -echo $ECHO_N "checking for patch 107733-08 or greater... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for patch 107733-08 or greater" >&5 +$as_echo_n "checking for patch 107733-08 or greater... " >&6; } _patch=`echo $_temp | $AWK '/107733-08/ { print "found" }'` _patch="false" for i in $_temp @@ -9708,19 +9765,19 @@ echo $ECHO_N "checking for patch 107733-08 or greater... $ECHO_C" >&6 fi done if test "$_patch" = "found"; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } else - { echo "$as_me:$LINENO: WARNING: patch 107733-06 not found, please install linker patch 107733-08 or greater" >&5 -echo "$as_me: WARNING: patch 107733-06 not found, please install linker patch 107733-08 or greater" >&2;} + { $as_echo "$as_me:${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 "patch 107733-06 not found, please install linker patch 107733-08 or greater" >> warn fi fi fi fi - echo "$as_me:$LINENO: checking what the default STL should be" >&5 -echo $ECHO_N "checking what the default STL should be... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking what the default STL should be" >&5 +$as_echo_n "checking what the default STL should be... " >&6; } DEFAULT_TO_STLPORT="no" if test "$_os" = "Linux"; then case "$build_cpu" in @@ -9747,134 +9804,100 @@ echo $ECHO_N "checking what the default STL should be... $ECHO_C" >&6 DEFAULT_TO_STLPORT="yes" fi if test "$DEFAULT_TO_STLPORT" = "yes"; then - echo "$as_me:$LINENO: result: stlport" >&5 -echo "${ECHO_T}stlport" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: stlport" >&5 +$as_echo "stlport" >&6; } else - echo "$as_me:$LINENO: result: system" >&5 -echo "${ECHO_T}system" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5 +$as_echo "system" >&6; } fi if test "$WITH_STLPORT" = "auto"; then WITH_STLPORT=$DEFAULT_TO_STLPORT fi - echo "$as_me:$LINENO: checking for STL providing headers" >&5 -echo $ECHO_N "checking for STL providing headers... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STL providing headers" >&5 +$as_echo_n "checking for STL providing headers... " >&6; } STLPORT4="" USE_SYSTEM_STL="" if test "$WITH_STLPORT" = "yes"; then - echo "$as_me:$LINENO: result: using internal stlport." >&5 -echo "${ECHO_T}using internal stlport." >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using internal stlport." >&5 +$as_echo "using internal stlport." >&6; } if test "$DEFAULT_TO_STLPORT" != "yes"; then - { echo "$as_me:$LINENO: WARNING: using stlport. Warning, breaks your ABI compatability!" >&5 -echo "$as_me: WARNING: using stlport. Warning, breaks your ABI compatability!" >&2;} + { $as_echo "$as_me:${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 "using stlport. Warning, breaks your ABI compatability!" >>warn fi elif test "$WITH_STLPORT" = "no"; then - echo "$as_me:$LINENO: result: using system STL" >&5 -echo "${ECHO_T}using system STL" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using system STL" >&5 +$as_echo "using system STL" >&6; } USE_SYSTEM_STL="YES" if test "$DEFAULT_TO_STLPORT" != "no"; then - { echo "$as_me:$LINENO: WARNING: using system STL. Warning, breaks your ABI compatability!" >&5 -echo "$as_me: WARNING: using system STL. Warning, breaks your ABI compatability!" >&2;} + { $as_echo "$as_me:${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 "using system STL. Warning, breaks your ABI compatability!" >>warn fi else STLPORT4=$WITH_STLPORT if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $STLPORT4/stlport/hash_map _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - 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 +if ac_fn_c_try_cpp "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked." >&5 +$as_echo "checked." >&6; } else - 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; }; } + as_fn_error $? "STLport headers not found." "$LINENO" 5 fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext else if test -f "$STLPORT4/stlport/hash_map"; then - echo "$as_me:$LINENO: result: checked." >&5 -echo "${ECHO_T}checked." >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked." >&5 +$as_echo "checked." >&6; } else - { { echo "$as_me:$LINENO: error: STLport headers not found." >&5 -echo "$as_me: error: STLport headers not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "STLport headers not found." "$LINENO" 5 fi fi if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then - echo "$as_me:$LINENO: checking for STLport libraries" >&5 -echo $ECHO_N "checking for STLport libraries... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STLport libraries" >&5 +$as_echo_n "checking for STLport libraries... " >&6; } if test "$_os" = "SunOS"; then if test -f "$STLPORT4/lib/libstlport_sunpro.so"; then - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 +$as_echo "checked" >&6; } elif test -f "$STLPORT4/lib/libstlport.so"; then - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 +$as_echo "checked" >&6; } STLPORT_VER=500 else - { { echo "$as_me:$LINENO: error: STLport libraries not found" >&5 -echo "$as_me: error: STLport libraries not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "STLport libraries not found" "$LINENO" 5 fi elif test "$_os" = "Darwin"; then if test -f "$STLPORT4/lib/libstlport_gcc.dylib"; then - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 +$as_echo "checked" >&6; } elif test -f "$STLPORT4/lib/libstlport.dylib"; then - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 +$as_echo "checked" >&6; } STLPORT_VER=500 else - { { echo "$as_me:$LINENO: error: STLport libraries not found" >&5 -echo "$as_me: error: STLport libraries not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "STLport libraries not found" "$LINENO" 5 fi else if test -f "$STLPORT4/lib/libstlport_gcc.so"; then - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 +$as_echo "checked" >&6; } elif test -f "$STLPORT4/lib/libstlport.so"; then - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 +$as_echo "checked" >&6; } STLPORT_VER=500 else - { { echo "$as_me:$LINENO: error: STLport libraries not found" >&5 -echo "$as_me: error: STLport libraries not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "STLport libraries not found" "$LINENO" 5 fi fi fi if test "$DEFAULT_TO_STLPORT" != "yes"; then - { echo "$as_me:$LINENO: WARNING: using stlport. Warning, breaks your ABI compatability!" >&5 -echo "$as_me: WARNING: using stlport. Warning, breaks your ABI compatability!" >&2;} + { $as_echo "$as_me:${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 "using stlport. Warning, breaks your ABI compatability!" >>warn fi fi @@ -9890,15 +9913,11 @@ fi if test "$GCC" = "yes"; then - echo "$as_me:$LINENO: checking whether $CC supports -fvisibility=hidden" >&5 -echo $ECHO_N "checking whether $CC supports -fvisibility=hidden... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fvisibility=hidden" >&5 +$as_echo_n "checking whether $CC supports -fvisibility=hidden... " >&6; } save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -fvisibility=hidden" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9909,72 +9928,47 @@ 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_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 +if ac_fn_c_try_link "$LINENO"; then : HAVE_GCC_VISIBILITY_FEATURE=TRUE -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext CFLAGS=$save_CFLAGS if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi fi # =================================================================== # use --ccache-skip? # =================================================================== -echo "$as_me:$LINENO: checking whether we are allowed and able to use --ccache-skip" >&5 -echo $ECHO_N "checking whether we are allowed and able to use --ccache-skip... $ECHO_C" >&6 +{ $as_echo "$as_me:${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; } if test "$_os" != "Darwin" ; then - echo "$as_me:$LINENO: result: only used on Mac currently, skipping" >&5 -echo "${ECHO_T}only used on Mac currently, skipping" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: only used on Mac currently, skipping" >&5 +$as_echo "only used on Mac currently, skipping" >&6; } elif test "$enable_ccache_skip" = "no" ; then - echo "$as_me:$LINENO: result: no - diabled explicitly" >&5 -echo "${ECHO_T}no - diabled explicitly" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - diabled explicitly" >&5 +$as_echo "no - diabled explicitly" >&6; } elif test "$enable_ccache_skip" = "yes" ; then - echo "$as_me:$LINENO: result: yes - enabled explicitly, skipping checks" >&5 -echo "${ECHO_T}yes - enabled explicitly, skipping checks" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - enabled explicitly, skipping checks" >&5 +$as_echo "yes - enabled explicitly, skipping checks" >&6; } USE_CCACHE=YES elif test "$enable_ccache_skip" = "auto" ; then # checking for ccache presence/version - echo "$as_me:$LINENO: result: probing..." >&5 -echo "${ECHO_T}probing..." >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: probing..." >&5 +$as_echo "probing..." >&6; } # Extract the first word of "ccache", so it can be a program name with args. set dummy ccache; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_CCACHE+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $CCACHE in [\\/]* | ?:[\\/]*) @@ -9986,43 +9980,44 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_CCACHE" && ac_cv_path_CCACHE="not_found" ;; esac fi CCACHE=$ac_cv_path_CCACHE - if test -n "$CCACHE"; then - echo "$as_me:$LINENO: result: $CCACHE" >&5 -echo "${ECHO_T}$CCACHE" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5 +$as_echo "$CCACHE" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test "$CCACHE" = "not_found" ; then - { echo "$as_me:$LINENO: not enabling --ccache-skip (ccache not found)" >&5 -echo "$as_me: not enabling --ccache-skip (ccache not found)" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: not enabling --ccache-skip (ccache not found)" >&5 +$as_echo "$as_me: not enabling --ccache-skip (ccache not found)" >&6;} else # check ccache version - echo "$as_me:$LINENO: checking whether version of ccache is suitable" >&5 -echo $ECHO_N "checking whether version of ccache is suitable... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether version of ccache is suitable" >&5 +$as_echo_n "checking whether version of ccache is suitable... " >&6; } CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'` if test "$CCACHE_VERSION" = "2.4_OOo"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - echo "$as_me:$LINENO: checking whether ccache is actually used for the build" >&5 -echo $ECHO_N "checking whether ccache is actually used for the build... $ECHO_C" >&6 - ac_ext=cc + { $as_echo "$as_me:${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 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' @@ -10030,11 +10025,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu save_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS --ccache-skip -O2" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -10045,44 +10036,20 @@ main () 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_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 +if ac_fn_cxx_try_compile "$LINENO"; then : use_ccache=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -use_ccache=no + use_ccache=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $use_ccache = yes ; then - echo "$as_me:$LINENO: result: yes, will enable --ccache-skip" >&5 -echo "${ECHO_T}yes, will enable --ccache-skip" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will enable --ccache-skip" >&5 +$as_echo "yes, will enable --ccache-skip" >&6; } USE_CCACHE=YES else - echo "$as_me:$LINENO: result: no, will not enable --ccache-skip" >&5 -echo "${ECHO_T}no, will not enable --ccache-skip" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, will not enable --ccache-skip" >&5 +$as_echo "no, will not enable --ccache-skip" >&6; } fi CXXFLAGS=$save_CXXFLAGS ac_ext=c @@ -10092,33 +10059,27 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - { echo "$as_me:$LINENO: ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip" >&5 -echo "$as_me: ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip" >&6;} + { $as_echo "$as_me:${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;} fi fi else - { { echo "$as_me:$LINENO: error: invalid option to --enable-ccache-skip. Valid values are \"auto\", \"yes\" and \"no\"" >&5 -echo "$as_me: error: invalid option to --enable-ccache-skip. Valid values are \"auto\", \"yes\" and \"no\"" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "invalid option to --enable-ccache-skip. Valid values are \"auto\", \"yes\" and \"no\"" "$LINENO" 5 fi if test "$USE_SYSTEM_STL" = "YES"; then - echo "$as_me:$LINENO: checking if hash_map will be in __gnu_cxx namespace" >&5 -echo $ECHO_N "checking if hash_map will be in __gnu_cxx namespace... $ECHO_C" >&6 - ac_ext=cc + { $as_echo "$as_me:${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 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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include using namespace __gnu_cxx; @@ -10131,72 +10092,42 @@ hash_map t; 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_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 +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_cxx_have_ext_hash_map=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_cxx_have_ext_hash_map=no + ac_cv_cxx_have_ext_hash_map=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$ac_cv_cxx_have_ext_hash_map" = "no"; then - { { echo "$as_me:$LINENO: error: Can't find hash_map. Try with --with-stlport" >&5 -echo "$as_me: error: Can't find hash_map. Try with --with-stlport" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Can't find hash_map. Try with --with-stlport" "$LINENO" 5 else - echo "$as_me:$LINENO: result: $ac_cv_cxx_have_ext_hash_map" >&5 -echo "${ECHO_T}$ac_cv_cxx_have_ext_hash_map" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_have_ext_hash_map" >&5 +$as_echo "$ac_cv_cxx_have_ext_hash_map" >&6; } fi if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then - echo "$as_me:$LINENO: checking if STL headers are visibility safe" >&5 -echo $ECHO_N "checking if STL headers are visibility safe... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if STL headers are visibility safe" >&5 +$as_echo_n "checking if STL headers are visibility safe... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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* - echo "$as_me:$LINENO: result: $stlvisok" >&5 -echo "${ECHO_T}$stlvisok" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $stlvisok" >&5 +$as_echo "$stlvisok" >&6; } if test "$stlvisok" = "no"; then - { echo "$as_me:$LINENO: WARNING: Your gcc STL headers are not visibility safe. Disabling visibility" >&5 -echo "$as_me: WARNING: Your gcc STL headers are not visibility safe. Disabling visibility" >&2;} + { $as_echo "$as_me:${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 "Your gcc STL headers are not visibility safe. Disabling visibility" >> warn unset HAVE_GCC_VISIBILITY_FEATURE fi @@ -10206,13 +10137,9 @@ echo "$as_me: WARNING: Your gcc STL headers are not visibility safe. Disabling v sharedlink_ldflags_save=$LDFLAGS LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared" - echo "$as_me:$LINENO: checking if gcc is -fvisibility-inlines-hidden safe with STL headers" >&5 -echo $ECHO_N "checking if gcc is -fvisibility-inlines-hidden safe with STL headers... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $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 /* end confdefs.h. */ #include using namespace std; @@ -10225,43 +10152,19 @@ istringstream strm( "test" ); return 0; 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 +if ac_fn_cxx_try_link "$LINENO"; then : $EGREP -q unresolvable conftest.err; if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -gccvisok=no + gccvisok=no fi -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 +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; } if test "$gccvisok" = "no"; then - { echo "$as_me:$LINENO: WARNING: Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >&5 -echo "$as_me: WARNING: Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >&2;} + { $as_echo "$as_me:${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 "Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >> warn unset HAVE_GCC_VISIBILITY_FEATURE fi @@ -10270,8 +10173,8 @@ echo "$as_me: WARNING: Your gcc is not -fvisibility-inlines-hidden safe. Disabli fi if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then - echo "$as_me:$LINENO: checking if gcc has a visibility bug with class-level attributes (GCC bug 26905)" >&5 -echo $ECHO_N "checking if gcc has a visibility bug with class-level attributes (GCC bug 26905)... $ECHO_C" >&6 + { $as_echo "$as_me:${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; } cat >visibility.cxx <<_ACEOF #pragma GCC visibility push(hidden) struct __attribute__ ((visibility ("default"))) TestStruct { @@ -10299,11 +10202,11 @@ _ACEOF fi rm -f visibility.s - echo "$as_me:$LINENO: result: $gccvisbroken" >&5 -echo "${ECHO_T}$gccvisbroken" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gccvisbroken" >&5 +$as_echo "$gccvisbroken" >&6; } if test "$gccvisbroken" = "yes"; then - { echo "$as_me:$LINENO: WARNING: Your gcc is not -fvisibility=hidden safe. Disabling visibility" >&5 -echo "$as_me: WARNING: Your gcc is not -fvisibility=hidden safe. Disabling visibility" >&2;} + { $as_echo "$as_me:${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 "Your gcc is not -fvisibility=hidden safe. Disabling visibility" >> warn unset HAVE_GCC_VISIBILITY_FEATURE fi @@ -10319,112 +10222,19 @@ fi -echo "$as_me:$LINENO: checking which memory allocator to use" >&5 -echo $ECHO_N "checking which memory allocator to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which memory allocator to use" >&5 +$as_echo_n "checking which memory allocator to use... " >&6; } if test "$with_alloc" = "system"; then - echo "$as_me:$LINENO: result: system" >&5 -echo "${ECHO_T}system" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5 +$as_echo "system" >&6; } ALLOC="SYS_ALLOC"; - - - - -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 + 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" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -10432,79 +10242,48 @@ done fi if test "$with_alloc" = "tcmalloc"; then - echo "$as_me:$LINENO: result: tcmalloc" >&5 -echo "${ECHO_T}tcmalloc" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: tcmalloc" >&5 +$as_echo "tcmalloc" >&6; } if ! echo $build_cpu | grep -E 'i[3456]86' 2>/dev/null >/dev/null; then - { { echo "$as_me:$LINENO: error: tcmalloc only available/usable on ix86" >&5 -echo "$as_me: error: tcmalloc only available/usable on ix86" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "tcmalloc only available/usable on ix86" "$LINENO" 5 fi - -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 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltcmalloc $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char malloc (); int main () { -malloc (); +return malloc (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_tcmalloc_malloc=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_tcmalloc_malloc=no + ac_cv_lib_tcmalloc_malloc=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_tcmalloc_malloc" >&5 -echo "${ECHO_T}$ac_cv_lib_tcmalloc_malloc" >&6 -if test $ac_cv_lib_tcmalloc_malloc = yes; then +{ $as_echo "$as_me:${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 : cat >>confdefs.h <<_ACEOF #define HAVE_LIBTCMALLOC 1 _ACEOF @@ -10512,85 +10291,54 @@ _ACEOF LIBS="-ltcmalloc $LIBS" else - { { echo "$as_me:$LINENO: error: tcmalloc not found or functional. Install the Google Profiling Tools" >&5 -echo "$as_me: error: tcmalloc not found or functional. Install the Google Profiling Tools" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "tcmalloc not found or functional. Install the Google Profiling Tools" "$LINENO" 5 fi ALLOC="TCMALLOC"; fi if test "$with_alloc" = "jemalloc"; then if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then - echo "$as_me:$LINENO: result: jemalloc" >&5 -echo "${ECHO_T}jemalloc" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: jemalloc" >&5 +$as_echo "jemalloc" >&6; } save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -pthread" - -echo "$as_me:$LINENO: checking for malloc in -ljemalloc" >&5 -echo $ECHO_N "checking for malloc in -ljemalloc... $ECHO_C" >&6 -if test "${ac_cv_lib_jemalloc_malloc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc in -ljemalloc" >&5 +$as_echo_n "checking for malloc in -ljemalloc... " >&6; } +if test "${ac_cv_lib_jemalloc_malloc+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljemalloc $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char malloc (); int main () { -malloc (); +return malloc (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_jemalloc_malloc=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_jemalloc_malloc=no + ac_cv_lib_jemalloc_malloc=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_jemalloc_malloc" >&5 -echo "${ECHO_T}$ac_cv_lib_jemalloc_malloc" >&6 -if test $ac_cv_lib_jemalloc_malloc = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jemalloc_malloc" >&5 +$as_echo "$ac_cv_lib_jemalloc_malloc" >&6; } +if test "x$ac_cv_lib_jemalloc_malloc" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBJEMALLOC 1 _ACEOF @@ -10598,117 +10346,22 @@ _ACEOF LIBS="-ljemalloc $LIBS" else - { { echo "$as_me:$LINENO: error: jemalloc not found or functional. Install the jemalloc allocator." >&5 -echo "$as_me: error: jemalloc not found or functional. Install the jemalloc allocator." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "jemalloc not found or functional. Install the jemalloc allocator." "$LINENO" 5 fi ALLOC="JEMALLOC"; CFLAGS=$save_CFLAGS else - echo "$as_me:$LINENO: result: system" >&5 -echo "${ECHO_T}system" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5 +$as_echo "system" >&6; } ALLOC="SYS_ALLOC"; - - - - -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 + 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" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -10717,38 +10370,38 @@ done fi fi if test "$with_alloc" = "internal" -o -z "$with_alloc"; then - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } fi -echo "$as_me:$LINENO: checking whether to add custom build version" >&5 -echo $ECHO_N "checking whether to add custom build version... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to add custom build version" >&5 +$as_echo_n "checking whether to add custom build version... " >&6; } if test "z$with_build_version" != "z"; then BUILD_VER_STRING=$with_build_version - echo "$as_me:$LINENO: result: yes, $BUILD_VER_STRING" >&5 -echo "${ECHO_T}yes, $BUILD_VER_STRING" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $BUILD_VER_STRING" >&5 +$as_echo "yes, $BUILD_VER_STRING" >&6; } else BUILD_VER_STRING= - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to build with Java support" >&5 -echo $ECHO_N "checking whether to build with Java support... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Java support" >&5 +$as_echo_n "checking whether to build with Java support... " >&6; } if test "$WITH_JAVA" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } SOLAR_JAVA="TRUE" else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } SOLAR_JAVA="" - { echo "$as_me:$LINENO: WARNING: building without java will mean some features will not be available" >&5 -echo "$as_me: WARNING: building without java will mean some features will not be available" >&2;} + { $as_echo "$as_me:${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 "building without java will mean some features will not be available" >>warn fi @@ -10775,10 +10428,10 @@ if test "$SOLAR_JAVA" != ""; then if test -z "$with_jdk_home"; then # Extract the first word of "$WITH_JAVA", so it can be a program name with args. set dummy $WITH_JAVA; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_JAVAINTERPRETER+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $JAVAINTERPRETER in [\\/]* | ?:[\\/]*) @@ -10790,36 +10443,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAVAINTERPRETER="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi JAVAINTERPRETER=$ac_cv_path_JAVAINTERPRETER - if test -n "$JAVAINTERPRETER"; then - echo "$as_me:$LINENO: result: $JAVAINTERPRETER" >&5 -echo "${ECHO_T}$JAVAINTERPRETER" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAINTERPRETER" >&5 +$as_echo "$JAVAINTERPRETER" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + else _java_path="$with_jdk_home/bin/$WITH_JAVA" if test -x "$_java_path"; then JAVAINTERPRETER=$_java_path else - { { echo "$as_me:$LINENO: error: $_java_path not found set with_jdk_home" >&5 -echo "$as_me: error: $_java_path not found set with_jdk_home" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$_java_path not found set with_jdk_home" "$LINENO" 5 fi fi if test "$_os" = "WINNT"; then @@ -10829,28 +10481,26 @@ echo "$as_me: error: $_java_path not found set with_jdk_home" >&2;} JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"` JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"` elif test "$_os" = "Darwin"; then - echo "$as_me:$LINENO: checking whether to pass -d32 to Java interpreter" >&5 -echo $ECHO_N "checking whether to pass -d32 to Java interpreter... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to pass -d32 to Java interpreter" >&5 +$as_echo_n "checking whether to pass -d32 to Java interpreter... " >&6; } if "$JAVAINTERPRETER" -d32 >&5 2>&5; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } JAVAIFLAGS=-d32 else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi fi fi if test "$SOLAR_JAVA" != ""; then _gij_longver=0 - echo "$as_me:$LINENO: checking the installed JDK" >&5 -echo $ECHO_N "checking the installed JDK... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the installed JDK" >&5 +$as_echo_n "checking the installed JDK... " >&6; } if test -n "$JAVAINTERPRETER"; then if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then - { { echo "$as_me:$LINENO: error: No valid check available. Please check the block for your desired java in configure.in" >&5 -echo "$as_me: error: No valid check available. Please check the block for your desired java in configure.in" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "No valid check available. Please check the block for your desired java in configure.in" "$LINENO" 5 # 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 @@ -10870,15 +10520,13 @@ echo "$as_me: error: No valid check available. Please check the block for your d # JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"` elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then JDK=gcj - echo "$as_me:$LINENO: result: checked (gcj)" >&5 -echo "${ECHO_T}checked (gcj)" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked (gcj)" >&5 +$as_echo "checked (gcj)" >&6; } _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[^0-9]*@@' -e 's@ .*@@' -e 's@,.*@@'`; _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "BEA"` -gt 0; then - { { echo "$as_me:$LINENO: error: No valid check available. Please check the block for your desired java in configure.in" >&5 -echo "$as_me: error: No valid check available. Please check the block for your desired java in configure.in" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "No valid check available. Please check the block for your desired java in configure.in" "$LINENO" 5 # JDK=bea # # dnl BEA JDK specific tests @@ -10908,20 +10556,15 @@ echo "$as_me: error: No valid check available. Please check the block for your d _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` if test "$_jdk_ver" -lt 10500; then - { { echo "$as_me:$LINENO: error: IBM JDK is too old, you need at least 1.5" >&5 -echo "$as_me: error: IBM JDK is too old, you need at least 1.5" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "IBM JDK is too old, you need at least 1.5" "$LINENO" 5 fi - echo "$as_me:$LINENO: result: checked (IBM JDK $_jdk)" >&5 -echo "${ECHO_T}checked (IBM JDK $_jdk)" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked (IBM JDK $_jdk)" >&5 +$as_echo "checked (IBM JDK $_jdk)" >&6; } if test "$with_jdk_home" = ""; then - { { echo "$as_me:$LINENO: error: In order to successfully build OpenOffice.org using the IBM JDK, -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; }; } + 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 fi JAVA_HOME=$with_jdk_home @@ -10933,12 +10576,10 @@ you must use the \"--with-jdk-home\" configure option explicitly" >&2;} _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` if test "$_jdk_ver" -lt 10500; then - { { echo "$as_me:$LINENO: error: JDK is too old, you need at least 1.5" >&5 -echo "$as_me: error: JDK is too old, you need at least 1.5" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "JDK is too old, you need at least 1.5" "$LINENO" 5 fi - echo "$as_me:$LINENO: result: checked (JDK $_jdk)" >&5 -echo "${ECHO_T}checked (JDK $_jdk)" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked (JDK $_jdk)" >&5 +$as_echo "checked (JDK $_jdk)" >&6; } JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"` if test "$_os" = "WINNT"; then JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[eE][xX][eE]$,,"` @@ -10948,9 +10589,7 @@ echo "${ECHO_T}checked (JDK $_jdk)" >&6 fi fi else - { { echo "$as_me:$LINENO: error: JAVA not found. You need at least jdk-1.5, or gcj-4" >&5 -echo "$as_me: error: JAVA not found. You need at least jdk-1.5, or gcj-4" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "JAVA not found. You need at least jdk-1.5, or gcj-4" "$LINENO" 5 fi else JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME @@ -10970,10 +10609,10 @@ if test "$SOLAR_JAVA" != ""; then if test -z "$with_jdk_home"; then # Extract the first word of "$javacompiler", so it can be a program name with args. set dummy $javacompiler; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_JAVACOMPILER+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $JAVACOMPILER in [\\/]* | ?:[\\/]*) @@ -10985,28 +10624,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAVACOMPILER="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi JAVACOMPILER=$ac_cv_path_JAVACOMPILER - if test -n "$JAVACOMPILER"; then - echo "$as_me:$LINENO: result: $JAVACOMPILER" >&5 -echo "${ECHO_T}$JAVACOMPILER" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVACOMPILER" >&5 +$as_echo "$JAVACOMPILER" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + else _javac_path="$with_jdk_home/bin/$javacompiler" if test -x "$_javac_path"; then @@ -11014,9 +10654,7 @@ fi fi fi if test -z "$JAVACOMPILER"; then - { { echo "$as_me:$LINENO: error: $javacompiler not found set with_jdk_home" >&5 -echo "$as_me: error: $javacompiler not found set with_jdk_home" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$javacompiler not found set with_jdk_home" "$LINENO" 5 fi if test "$_os" = "WINNT"; then if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then @@ -11032,11 +10670,11 @@ echo "$as_me: error: $javacompiler not found set with_jdk_home" >&2;} fi if test `$JAVACOMPILER -version 2>&1 | grep -c "Eclipse Java Compiler"` -gt 0; then - echo "$as_me:$LINENO: checking re-checking JDK" >&5 -echo $ECHO_N "checking re-checking JDK... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking re-checking JDK" >&5 +$as_echo_n "checking re-checking JDK... " >&6; } JDK=gcj - echo "$as_me:$LINENO: result: checked (ecj)" >&5 -echo "${ECHO_T}checked (ecj)" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked (ecj)" >&5 +$as_echo "checked (ecj)" >&6; } #TODO: what's to do here? some switch to do 1.5 compiling? JAVAFLAGS="-source 1.5 -target 1.5" _gij_longver="40200" @@ -11055,10 +10693,10 @@ if test "$SOLAR_JAVA" != ""; then if test -z "$with_jdk_home"; then # Extract the first word of "javadoc", so it can be a program name with args. set dummy javadoc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_JAVADOC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $JAVADOC in [\\/]* | ?:[\\/]*) @@ -11070,28 +10708,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAVADOC="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi JAVADOC=$ac_cv_path_JAVADOC - if test -n "$JAVADOC"; then - echo "$as_me:$LINENO: result: $JAVADOC" >&5 -echo "${ECHO_T}$JAVADOC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVADOC" >&5 +$as_echo "$JAVADOC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + else _javadoc_path="$with_jdk_home/bin/javadoc" if test "$_os" = "OS2"; then @@ -11104,10 +10743,10 @@ fi else # Extract the first word of "javadoc", so it can be a program name with args. set dummy javadoc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_JAVADOC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $JAVADOC in [\\/]* | ?:[\\/]*) @@ -11119,34 +10758,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAVADOC="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi JAVADOC=$ac_cv_path_JAVADOC - if test -n "$JAVADOC"; then - echo "$as_me:$LINENO: result: $JAVADOC" >&5 -echo "${ECHO_T}$JAVADOC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVADOC" >&5 +$as_echo "$JAVADOC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi fi if test -z "$JAVADOC"; then - { { echo "$as_me:$LINENO: error: $_javadoc_path not found set with_jdk_home" >&5 -echo "$as_me: error: $_javadoc_path not found set with_jdk_home" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$_javadoc_path not found set with_jdk_home" "$LINENO" 5 fi if test "$_os" = "WINNT"; then if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then @@ -11178,37 +10816,33 @@ class findhome } } _ACEOF - echo "$as_me:$LINENO: checking if javac works" >&5 -echo $ECHO_N "checking if javac works... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if javac works" >&5 +$as_echo_n "checking if javac works... " >&6; } javac_cmd="$JAVACOMPILER findhome.java 1>&2" - { (eval echo "$as_me:$LINENO: \"$javac_cmd\"") >&5 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$javac_cmd\""; } >&5 (eval $javac_cmd) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } if test $? = 0 && test -f ./findhome.class ; then - echo "$as_me:$LINENO: result: javac works" >&5 -echo "${ECHO_T}javac works" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: javac works" >&5 +$as_echo "javac works" >&6; } else echo "configure: javac test failed" >&5 cat findhome.java >&5 - { { echo "$as_me:$LINENO: error: javac does not work - java projects will not build!" >&5 -echo "$as_me: error: javac does not work - java projects will not build!" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "javac does not work - java projects will not build!" "$LINENO" 5 fi - echo "$as_me:$LINENO: checking if gij knows its java.home" >&5 -echo $ECHO_N "checking if gij knows its java.home... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gij knows its java.home" >&5 +$as_echo_n "checking if gij knows its java.home... " >&6; } JAVA_HOME=`$JAVAINTERPRETER findhome` if test $? = 0 && test "$JAVA_HOME" != "" ; then - echo "$as_me:$LINENO: result: $JAVA_HOME" >&5 -echo "${ECHO_T}$JAVA_HOME" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_HOME" >&5 +$as_echo "$JAVA_HOME" >&6; } else echo "configure: java test failed" >&5 cat findhome.java >&5 - { { echo "$as_me:$LINENO: error: gij does not know its java.home - use --with-jdk-home" >&5 -echo "$as_me: error: gij does not know its java.home - use --with-jdk-home" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "gij does not know its java.home - use --with-jdk-home" "$LINENO" 5 fi else JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$WITH_JAVA,,p"` @@ -11230,10 +10864,10 @@ echo "$as_me: error: gij does not know its java.home - use --with-jdk-home" >&2; JAVA_HOME=$(readlink $JAVACOMPILER) else # else warn - { echo "$as_me:$LINENO: WARNING: JAVA_HOME is set to /usr - this is very likely to be incorrect" >&5 -echo "$as_me: WARNING: JAVA_HOME is set to /usr - this is very likely to be incorrect" >&2;} - { echo "$as_me:$LINENO: WARNING: if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >&5 -echo "$as_me: WARNING: if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >&2;} + { $as_echo "$as_me:${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 "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 @@ -11255,243 +10889,77 @@ echo "$as_me: WARNING: if this is the case, please inform the correct JAVA_HOME JAVA_HOME_OK="NO" fi if test "$JAVA_HOME_OK" = "NO"; then - { echo "$as_me:$LINENO: WARNING: JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >&5 -echo "$as_me: WARNING: JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >&2;} - { echo "$as_me:$LINENO: WARNING: attempted to find JAVA_HOME automatically, but apparently it failed" >&5 -echo "$as_me: WARNING: attempted to find JAVA_HOME automatically, but apparently it failed" >&2;} - { echo "$as_me:$LINENO: WARNING: in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >&5 -echo "$as_me: WARNING: in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >&2;} + { $as_echo "$as_me:${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 "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 -# if test "$JDK" = "gcj"; then -# echo "e.g. install java-1.4.2-gcj-compat-devel and use --with-jdk-home=/usr/lib/jvm/java-1.4.2-gcj" >> warn -# fi - fi - fi -fi - -AWTLIB= -if test "$SOLAR_JAVA" != ""; then - echo "$as_me:$LINENO: checking for jawt lib name" >&5 -echo $ECHO_N "checking for jawt lib name... $ECHO_C" >&6 - 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 - 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 + echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn +# if test "$JDK" = "gcj"; then +# echo "e.g. install java-1.4.2-gcj-compat-devel and use --with-jdk-home=/usr/lib/jvm/java-1.4.2-gcj" >> warn +# fi + fi + fi 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 +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; } + 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 : -fi -if test $ac_cv_header_jni_h = yes; then - : else - { { echo "$as_me:$LINENO: error: jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?" >&5 -echo "$as_me: error: jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?" "$LINENO" 5 fi - 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 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgcjawt $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char JAWT_GetAWT (); int main () { -JAWT_GetAWT (); +return JAWT_GetAWT (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gcjawt_JAWT_GetAWT=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_gcjawt_JAWT_GetAWT=no + ac_cv_lib_gcjawt_JAWT_GetAWT=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_gcjawt_JAWT_GetAWT" >&5 -echo "${ECHO_T}$ac_cv_lib_gcjawt_JAWT_GetAWT" >&6 -if test $ac_cv_lib_gcjawt_JAWT_GetAWT = yes; then +{ $as_echo "$as_me:${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 : AWTLIB="-lgcjawt -lgcj" fi @@ -11510,287 +10978,93 @@ 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 - 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 + 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 : -fi -if test $ac_cv_header_jni_h = yes; then - : else - { { echo "$as_me:$LINENO: error: jni.h could not be found." >&5 -echo "$as_me: error: jni.h could not be found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "jni.h could not be found." "$LINENO" 5 fi - 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 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljawt $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char JAWT_GetAWT (); int main () { -JAWT_GetAWT (); +return JAWT_GetAWT (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_jawt_JAWT_GetAWT=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_jawt_JAWT_GetAWT=no + ac_cv_lib_jawt_JAWT_GetAWT=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_jawt_JAWT_GetAWT" >&5 -echo "${ECHO_T}$ac_cv_lib_jawt_JAWT_GetAWT" >&6 -if test $ac_cv_lib_jawt_JAWT_GetAWT = yes; then +{ $as_echo "$as_me:${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 : AWTLIB="-ljawt" fi if test -z "$AWTLIB"; then LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt" - echo "$as_me:$LINENO: checking for JAWT_GetAWT in -lmawt" >&5 -echo $ECHO_N "checking for JAWT_GetAWT in -lmawt... $ECHO_C" >&6 -if test "${ac_cv_lib_mawt_JAWT_GetAWT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmawt $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char JAWT_GetAWT (); int main () { -JAWT_GetAWT (); +return JAWT_GetAWT (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_mawt_JAWT_GetAWT=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_mawt_JAWT_GetAWT=no + ac_cv_lib_mawt_JAWT_GetAWT=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_mawt_JAWT_GetAWT" >&5 -echo "${ECHO_T}$ac_cv_lib_mawt_JAWT_GetAWT" >&6 -if test $ac_cv_lib_mawt_JAWT_GetAWT = yes; then +{ $as_echo "$as_me:${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 : AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt" fi @@ -11803,24 +11077,24 @@ fi if test -z "$AWTLIB"; then AWTLIB=-ljawt fi - echo "$as_me:$LINENO: result: $AWTLIB" >&5 -echo "${ECHO_T}$AWTLIB" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWTLIB" >&5 +$as_echo "$AWTLIB" >&6; } fi if test "$SOLAR_JAVA" != ""; then - echo "$as_me:$LINENO: checking whether to enable gcj aot compilation" >&5 -echo $ECHO_N "checking whether to enable gcj aot compilation... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable gcj aot compilation" >&5 +$as_echo_n "checking whether to enable gcj aot compilation... " >&6; } if test -n "$enable_gcjaot" && test "$enable_gcjaot" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } if test `echo $WITH_JAVA | grep -c "gij"` -eq 0; then gcjaot="gcj" else gcjaot=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g"` fi - echo "$as_me:$LINENO: result: $gcjaot" >&5 -echo "${ECHO_T}$gcjaot" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcjaot" >&5 +$as_echo "$gcjaot" >&6; } if test -n "$with_jdk_home"; then _javac_path="$with_jdk_home/bin/$gcjaot" if test -x "$_javac_path"; then @@ -11830,10 +11104,10 @@ echo "${ECHO_T}$gcjaot" >&6 if test -z "$JAVAAOTCOMPILER"; then # Extract the first word of "$gcjaot", so it can be a program name with args. set dummy $gcjaot; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_JAVAAOTCOMPILER+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $JAVAAOTCOMPILER in [\\/]* | ?:[\\/]*) @@ -11845,36 +11119,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAVAAOTCOMPILER="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi JAVAAOTCOMPILER=$ac_cv_path_JAVAAOTCOMPILER - if test -n "$JAVAAOTCOMPILER"; then - echo "$as_me:$LINENO: result: $JAVAAOTCOMPILER" >&5 -echo "${ECHO_T}$JAVAAOTCOMPILER" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAAOTCOMPILER" >&5 +$as_echo "$JAVAAOTCOMPILER" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$JAVAAOTCOMPILER"; then - { echo "$as_me:$LINENO: WARNING: $gcjaot not found, set with_jdk_home" >&5 -echo "$as_me: WARNING: $gcjaot not found, set with_jdk_home" >&2;} + { $as_echo "$as_me:${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;} fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi fi @@ -11891,10 +11166,10 @@ fi # Extract the first word of "dmake", so it can be a program name with args. set dummy dmake; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_DMAKE+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $DMAKE in [\\/]* | ?:[\\/]*) @@ -11906,35 +11181,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DMAKE="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_DMAKE" && ac_cv_path_DMAKE="no" ;; esac fi DMAKE=$ac_cv_path_DMAKE - if test -n "$DMAKE"; then - echo "$as_me:$LINENO: result: $DMAKE" >&5 -echo "${ECHO_T}$DMAKE" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DMAKE" >&5 +$as_echo "$DMAKE" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test "$DMAKE" = "no"; then BUILD_DMAKE=YES echo "dmake will be built on ./bootstrap" else - echo "$as_me:$LINENO: checking whether the found dmake is the right dmake" >&5 -echo $ECHO_N "checking whether the found dmake is the right dmake... $ECHO_C" >&6 + { $as_echo "$as_me:${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; } # 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 @@ -11943,48 +11219,48 @@ echo $ECHO_N "checking whether the found dmake is the right dmake... $ECHO_C" >& $DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null if test $? -eq 0; then BUILD_DMAKE=NO - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - echo "$as_me:$LINENO: checking the dmake version" >&5 -echo $ECHO_N "checking the dmake version... $ECHO_C" >&6 + { $as_echo "$as_me:${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; } DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'` if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then - echo "$as_me:$LINENO: result: OK, >= 4.11" >&5 -echo "${ECHO_T}OK, >= 4.11" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK, >= 4.11" >&5 +$as_echo "OK, >= 4.11" >&6; } elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \ test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then - echo "$as_me:$LINENO: result: OK, >= 4.11" >&5 -echo "${ECHO_T}OK, >= 4.11" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK, >= 4.11" >&5 +$as_echo "OK, >= 4.11" >&6; } else - echo "$as_me:$LINENO: result: too old. >= 4.11 is needed" >&5 -echo "${ECHO_T}too old. >= 4.11 is needed" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: too old. >= 4.11 is needed" >&5 +$as_echo "too old. >= 4.11 is needed" >&6; } echo "A newer dmake will be built on ./bootstrap" BUILD_DMAKE=YES fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } echo "dmake will be built on ./bootstrap" BUILD_DMAKE=YES fi fi -echo "$as_me:$LINENO: checking whether to enable EPM for packing" >&5 -echo $ECHO_N "checking whether to enable EPM for packing... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable EPM for packing" >&5 +$as_echo_n "checking whether to enable EPM for packing... " >&6; } if test "$enable_epm" = "yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } if test "$_os" != "WINNT"; then if test -n "$with_epm"; then EPM=$with_epm else # Extract the first word of "epm", so it can be a program name with args. set dummy epm; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_EPM+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $EPM in [\\/]* | ?:[\\/]*) @@ -11996,29 +11272,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_EPM="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_EPM" && ac_cv_path_EPM="no" ;; esac fi EPM=$ac_cv_path_EPM - if test -n "$EPM"; then - echo "$as_me:$LINENO: result: $EPM" >&5 -echo "${ECHO_T}$EPM" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EPM" >&5 +$as_echo "$EPM" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$EPM" = "no" || test "$EPM" = "internal"; then echo "EPM will be built." @@ -12026,44 +11303,38 @@ fi BUILD_TYPE="$BUILD_TYPE EPM" else # Gentoo has some epm which is something different... - echo "$as_me:$LINENO: checking whether the found epm is the right epm" >&5 -echo $ECHO_N "checking whether the found epm is the right epm... $ECHO_C" >&6 + { $as_echo "$as_me:${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; } if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { { echo "$as_me:$LINENO: error: no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm" >&5 -echo "$as_me: error: no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm" "$LINENO" 5 fi - echo "$as_me:$LINENO: checking epm version" >&5 -echo $ECHO_N "checking epm version... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking epm version" >&5 +$as_echo_n "checking epm version... " >&6; } EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//` if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \ test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then - echo "$as_me:$LINENO: result: OK, >= 3.7" >&5 -echo "${ECHO_T}OK, >= 3.7" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK, >= 3.7" >&5 +$as_echo "OK, >= 3.7" >&6; } BUILD_EPM=NO if test "$_os" = "Darwin"; then - echo "$as_me:$LINENO: checking which PackageMaker EPM thinks to use" >&5 -echo $ECHO_N "checking which PackageMaker EPM thinks to use... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which PackageMaker EPM thinks to use" >&5 +$as_echo_n "checking which PackageMaker EPM thinks to use... " >&6; } _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1` if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then - { { echo "$as_me:$LINENO: error: $_pm; PackageMaker expected in wrong path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&5 -echo "$as_me: error: $_pm; PackageMaker expected in wrong path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&2;} - { (exit 1); exit 1; }; } + 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 elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then - echo "$as_me:$LINENO: result: $_pm, ok" >&5 -echo "${ECHO_T}$_pm, ok" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_pm, ok" >&5 +$as_echo "$_pm, ok" >&6; } else # we never should get here, but go safe - { { echo "$as_me:$LINENO: error: $_pm; PackageMaker expected in unknown path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&5 -echo "$as_me: error: $_pm; PackageMaker expected in unknown path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&2;} - { (exit 1); exit 1; }; } + 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 fi fi else - echo "$as_me:$LINENO: result: too old. epm >= 3.7 is required." >&5 -echo "${ECHO_T}too old. epm >= 3.7 is required." >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: too old. epm >= 3.7 is required." >&5 +$as_echo "too old. epm >= 3.7 is required." >&6; } echo "EPM will be built." BUILD_EPM=YES BUILD_TYPE="$BUILD_TYPE EPM" @@ -12072,8 +11343,8 @@ echo "${ECHO_T}too old. epm >= 3.7 is required." >&6 fi # test which package format to use - echo "$as_me:$LINENO: checking which package format to use" >&5 -echo $ECHO_N "checking which package format to use... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which package format to use" >&5 +$as_echo_n "checking which package format to use... " >&6; } # defaults case "$_os" in @@ -12109,9 +11380,7 @@ echo $ECHO_N "checking which package format to use... $ECHO_C" >&6 # we never should get here since we check the arciecture/os at the beginning, # but go sure... *) - { { echo "$as_me:$LINENO: error: unknown system" >&5 -echo "$as_me: error: unknown system" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "unknown system" "$LINENO" 5 esac if test -n "$with_package_format"; then for i in $with_package_format; do @@ -12119,25 +11388,7 @@ echo "$as_me: error: unknown system" >&2;} aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable | archive | dmg | installed | msi) ;; *) - { { echo "$as_me:$LINENO: error: unsupported format $i. Supported by EPM are: -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: + as_fn_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 @@ -12154,18 +11405,17 @@ archive - .tar.gz or .zip dmg - Mac OS X .dmg installed - installation tree msi - Windows .msi - " >&2;} - { (exit 1); exit 1; }; } + " "$LINENO" 5 ;; esac done PKGFORMAT="$with_package_format" fi - echo "$as_me:$LINENO: result: $PKGFORMAT" >&5 -echo "${ECHO_T}$PKGFORMAT" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGFORMAT" >&5 +$as_echo "$PKGFORMAT" >&6; } if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then - echo "$as_me:$LINENO: checking for rpm" >&5 -echo $ECHO_N "checking for rpm... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rpm" >&5 +$as_echo_n "checking for rpm... " >&6; } for a in "$RPM" rpmbuild rpm; do $a --usage >/dev/null 2> /dev/null if test $? -eq 0; then @@ -12180,26 +11430,22 @@ echo $ECHO_N "checking for rpm... $ECHO_C" >&6 fi done if test -z "$RPM" ; then - { { echo "$as_me:$LINENO: error: not found" >&5 -echo "$as_me: error: not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "not found" "$LINENO" 5 elif "$RPM" --usage 2>&1 | $EGREP -- -bb >/dev/null; then RPM_PATH=`which $RPM` - echo "$as_me:$LINENO: result: $RPM_PATH" >&5 -echo "${ECHO_T}$RPM_PATH" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RPM_PATH" >&5 +$as_echo "$RPM_PATH" >&6; } else - { { echo "$as_me:$LINENO: error: cannot build packages. Try installing rpmbuild." >&5 -echo "$as_me: error: cannot build packages. Try installing rpmbuild." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot build packages. Try installing rpmbuild." "$LINENO" 5 fi fi if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then # Extract the first word of "dpkg", so it can be a program name with args. set dummy dpkg; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_DPKG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $DPKG in [\\/]* | ?:[\\/]*) @@ -12211,81 +11457,76 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DPKG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_DPKG" && ac_cv_path_DPKG="no" ;; esac fi DPKG=$ac_cv_path_DPKG - if test -n "$DPKG"; then - echo "$as_me:$LINENO: result: $DPKG" >&5 -echo "${ECHO_T}$DPKG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DPKG" >&5 +$as_echo "$DPKG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test "$DPKG" = "no"; then - { { echo "$as_me:$LINENO: error: dpkg needed for deb creation. Install dpkg." >&5 -echo "$as_me: error: dpkg needed for deb creation. Install dpkg." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "dpkg needed for deb creation. Install dpkg." "$LINENO" 5 fi fi if echo "PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then if test "$_os" = "Darwin"; then - echo "$as_me:$LINENO: checking for PackageMaker availability" >&5 -echo $ECHO_N "checking for PackageMaker availability... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PackageMaker availability" >&5 +$as_echo_n "checking for PackageMaker availability... " >&6; } if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then - { { echo "$as_me:$LINENO: error: not installed. Please install Apples Dev Tools" >&5 -echo "$as_me: error: not installed. Please install Apples Dev Tools" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "not installed. Please install Apples Dev Tools" "$LINENO" 5 else - echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } fi else - { { echo "$as_me:$LINENO: error: PackageMaker needed to build OSX packages and you are not on OSX..." >&5 -echo "$as_me: error: PackageMaker needed to build OSX packages and you are not on OSX..." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "PackageMaker needed to build OSX packages and you are not on OSX..." "$LINENO" 5 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 - echo "$as_me:$LINENO: checking whether epm is patched for OOos needs" >&5 -echo $ECHO_N "checking whether epm is patched for OOos needs... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether epm is patched for OOos needs" >&5 +$as_echo_n "checking whether epm is patched for OOos needs... " >&6; } if grep "Patched for OpenOffice.org" $EPM >/dev/null 2>/dev/null; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if echo "$PKGFORMAT" | grep -q rpm; then _pt="rpm" - { echo "$as_me:$LINENO: WARNING: the rpms will need to be installed with --nodeps" >&5 -echo "$as_me: WARNING: the rpms will need to be installed with --nodeps" >&2;} + { $as_echo "$as_me:${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 "the rpms will need to be installed with --nodeps" >> warn else _pt="pkg" fi - { echo "$as_me:$LINENO: WARNING: the ${_pt}s will not be relocateable" >&5 -echo "$as_me: WARNING: the ${_pt}s will not be relocateable" >&2;} + { $as_echo "$as_me:${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 "the ${_pt}s will not be relocateable" >> warn - { echo "$as_me:$LINENO: WARNING: if you want to make sure installation without --nodeps and + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: if you want to make sure installation without --nodeps and relocation will work, you need to patch your epm with the patch in epm/epm-3.7.patch or build with --with-epm=internal which will build a suitable epm" >&5 -echo "$as_me: WARNING: if you want to make sure installation without --nodeps and +$as_echo "$as_me: WARNING: if you want to make sure installation without --nodeps and relocation will work, you need to patch your epm with the patch in epm/epm-3.7.patch or build with --with-epm=internal which will build a suitable epm" >&2;} @@ -12296,10 +11537,10 @@ echo "$as_me: WARNING: if you want to make sure installation without --nodeps an if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then # Extract the first word of "pkgmk", so it can be a program name with args. set dummy pkgmk; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKGMK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $PKGMK in [\\/]* | ?:[\\/]*) @@ -12311,33 +11552,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKGMK="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKGMK" && ac_cv_path_PKGMK="no" ;; esac fi PKGMK=$ac_cv_path_PKGMK - if test -n "$PKGMK"; then - echo "$as_me:$LINENO: result: $PKGMK" >&5 -echo "${ECHO_T}$PKGMK" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGMK" >&5 +$as_echo "$PKGMK" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test "$PKGMK" = "no"; then - { { echo "$as_me:$LINENO: error: pkgmk needed for Solaris pkg creation. Install it." >&5 -echo "$as_me: error: pkgmk needed for Solaris pkg creation. Install it." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "pkgmk needed for Solaris pkg creation. Install it." "$LINENO" 5 fi fi @@ -12345,8 +11585,8 @@ echo "$as_me: error: pkgmk needed for Solaris pkg creation. Install it." >&2;} else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } EPM=NO PKGFORMAT=native fi @@ -12355,10 +11595,10 @@ fi # Extract the first word of "gperf", so it can be a program name with args. set dummy gperf; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_GPERF+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $GPERF in [\\/]* | ?:[\\/]*) @@ -12370,95 +11610,87 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GPERF="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi GPERF=$ac_cv_path_GPERF - if test -n "$GPERF"; then - echo "$as_me:$LINENO: result: $GPERF" >&5 -echo "${ECHO_T}$GPERF" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GPERF" >&5 +$as_echo "$GPERF" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$GPERF"; then - { { echo "$as_me:$LINENO: error: gperf not found but needed. Install it." >&5 -echo "$as_me: error: gperf not found but needed. Install it." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "gperf not found but needed. Install it." "$LINENO" 5 fi -echo "$as_me:$LINENO: checking gperf version" >&5 -echo $ECHO_N "checking gperf version... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking gperf version" >&5 +$as_echo_n "checking gperf version... " >&6; } if test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then - echo "$as_me:$LINENO: result: OK" >&5 -echo "${ECHO_T}OK" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 +$as_echo "OK" >&6; } else - { { echo "$as_me:$LINENO: error: too old, you need at least 3.0.0" >&5 -echo "$as_me: error: too old, you need at least 3.0.0" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "too old, you need at least 3.0.0" "$LINENO" 5 fi -echo "$as_me:$LINENO: checking whether to build the stax" >&5 -echo $ECHO_N "checking whether to build the stax... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the stax" >&5 +$as_echo_n "checking whether to build the stax... " >&6; } if test -f "./stax/download/jsr173_1.0_api.jar"; then BUILD_STAX=NO - echo "$as_me:$LINENO: result: no, will use the prebuilt stax/download/jsr173_1.0_api.jar" >&5 -echo "${ECHO_T}no, will use the prebuilt stax/download/jsr173_1.0_api.jar" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, will use the prebuilt stax/download/jsr173_1.0_api.jar" >&5 +$as_echo "no, will use the prebuilt stax/download/jsr173_1.0_api.jar" >&6; } else BUILD_STAX=YES - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi -echo "$as_me:$LINENO: checking whether to build the ODK" >&5 -echo $ECHO_N "checking whether to build the ODK... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the ODK" >&5 +$as_echo_n "checking whether to build the ODK... " >&6; } if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } if test "$WITH_JAVA" != "no"; then - echo "$as_me:$LINENO: checking for external/unowinreg/unowinreg.dll" >&5 -echo $ECHO_N "checking for external/unowinreg/unowinreg.dll... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for external/unowinreg/unowinreg.dll" >&5 +$as_echo_n "checking for external/unowinreg/unowinreg.dll... " >&6; } if ! test -f "./external/unowinreg/unowinreg.dll"; then HAVE_UNOWINREG_DLL=no else HAVE_UNOWINREG_DLL=yes fi if test "$HAVE_UNOWINREG_DLL" = "yes"; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } BUILD_UNOWINREG=NO else if test "$_os" = "WINNT"; then - echo "$as_me:$LINENO: result: not found, will be built" >&5 -echo "${ECHO_T}not found, will be built" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, will be built" >&5 +$as_echo "not found, will be built" >&6; } else - { echo "$as_me:$LINENO: WARNING: not found, will be cross-built using mingw32" >&5 -echo "$as_me: WARNING: not found, will be cross-built using mingw32" >&2;} + { $as_echo "$as_me:${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;} fi BUILD_UNOWINREG=YES fi if test "$_os" != "WINNT" && test "$BUILD_UNOWINREG" = "YES"; then if test -z "$WITH_MINGWIN" || test "$WITH_MINGWIN" = "0"; then - { { echo "$as_me:$LINENO: error: for rebuilding unowinreg.dll you need the mingw32 C++ compiler. - Specify mingw32 g++ executable name with --with-mingwin. - Or use prebuilt one from http://tools.openoffice.org/unowinreg_prebuild/680/ and - put it into external/unowinreg" >&5 -echo "$as_me: error: for rebuilding unowinreg.dll you need the mingw32 C++ compiler. + as_fn_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; }; } + put it into external/unowinreg" "$LINENO" 5 fi if echo "$WITH_MINGWIN" | $EGREP -q "/"; then if ! test -x "$WITH_MINGWIN"; then MINGWCXX=false; else MINGWCXX=`basename $WITH_MINGWIN`; fi @@ -12466,10 +11698,10 @@ echo "$as_me: error: for rebuilding unowinreg.dll you need the mingw32 C++ compi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}$WITH_MINGWIN", so it can be a program name with args. set dummy ${ac_tool_prefix}$WITH_MINGWIN; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_MINGWCXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else if test -n "$MINGWCXX"; then ac_cv_prog_MINGWCXX="$MINGWCXX" # Let the user override the test. @@ -12479,35 +11711,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MINGWCXX="${ac_tool_prefix}$WITH_MINGWIN" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi MINGWCXX=$ac_cv_prog_MINGWCXX if test -n "$MINGWCXX"; then - echo "$as_me:$LINENO: result: $MINGWCXX" >&5 -echo "${ECHO_T}$MINGWCXX" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MINGWCXX" >&5 +$as_echo "$MINGWCXX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_MINGWCXX"; then ac_ct_MINGWCXX=$MINGWCXX # Extract the first word of "$WITH_MINGWIN", so it can be a program name with args. set dummy $WITH_MINGWIN; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_MINGWCXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else if test -n "$ac_ct_MINGWCXX"; then ac_cv_prog_ac_ct_MINGWCXX="$ac_ct_MINGWCXX" # Let the user override the test. @@ -12517,47 +11751,53 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_MINGWCXX="$WITH_MINGWIN" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_MINGWCXX" && ac_cv_prog_ac_ct_MINGWCXX="false" fi fi ac_ct_MINGWCXX=$ac_cv_prog_ac_ct_MINGWCXX if test -n "$ac_ct_MINGWCXX"; then - echo "$as_me:$LINENO: result: $ac_ct_MINGWCXX" >&5 -echo "${ECHO_T}$ac_ct_MINGWCXX" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MINGWCXX" >&5 +$as_echo "$ac_ct_MINGWCXX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - MINGWCXX=$ac_ct_MINGWCXX + if test "x$ac_ct_MINGWCXX" = x; then + MINGWCXX="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${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 else MINGWCXX="$ac_cv_prog_MINGWCXX" fi fi if test "$MINGWCXX" = "false"; then - { { echo "$as_me:$LINENO: error: specified MinGW32 C++ cross-compiler not found. Install it or correct name." >&5 -echo "$as_me: error: specified MinGW32 C++ cross-compiler not found. Install it or correct name." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "specified MinGW32 C++ cross-compiler not found. Install it or correct name." "$LINENO" 5 fi - echo "$as_me:$LINENO: checking whether we are using the MinGW32 cross C++ compiler" >&5 -echo $ECHO_N "checking whether we are using the MinGW32 cross C++ compiler... $ECHO_C" >&6 + { $as_echo "$as_me:${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; } if ! echo "`$MINGWCXX -dumpmachine`" | grep -q mingw32; then - { { echo "$as_me:$LINENO: error: no" >&5 -echo "$as_me: error: no" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no" "$LINENO" 5 else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi if echo "$WITH_MINGWIN" | $EGREP -q "/"; then if ! test -x "`echo $WITH_MINGWIN | $SED -e s/g++/strip/`"; then MINGSTRIP=false; else MINGWSTRIP=$(basename $(echo $WITH_MINGWIN | $SED -e s/g++/strip/)); fi @@ -12565,10 +11805,10 @@ echo "${ECHO_T}yes" >&6 if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}`echo $WITH_MINGWIN | $SED -e s/g++/strip/`", so it can be a program name with args. set dummy ${ac_tool_prefix}`echo $WITH_MINGWIN | $SED -e s/g++/strip/`; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_MINGWSTRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else if test -n "$MINGWSTRIP"; then ac_cv_prog_MINGWSTRIP="$MINGWSTRIP" # Let the user override the test. @@ -12578,35 +11818,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MINGWSTRIP="${ac_tool_prefix}`echo $WITH_MINGWIN | $SED -e s/g++/strip/`" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi MINGWSTRIP=$ac_cv_prog_MINGWSTRIP if test -n "$MINGWSTRIP"; then - echo "$as_me:$LINENO: result: $MINGWSTRIP" >&5 -echo "${ECHO_T}$MINGWSTRIP" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MINGWSTRIP" >&5 +$as_echo "$MINGWSTRIP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_MINGWSTRIP"; then ac_ct_MINGWSTRIP=$MINGWSTRIP # Extract the first word of "`echo $WITH_MINGWIN | $SED -e s/g++/strip/`", so it can be a program name with args. set dummy `echo $WITH_MINGWIN | $SED -e s/g++/strip/`; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_MINGWSTRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else if test -n "$ac_ct_MINGWSTRIP"; then ac_cv_prog_ac_ct_MINGWSTRIP="$ac_ct_MINGWSTRIP" # Let the user override the test. @@ -12616,39 +11858,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_MINGWSTRIP="`echo $WITH_MINGWIN | $SED -e s/g++/strip/`" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_MINGWSTRIP" && ac_cv_prog_ac_ct_MINGWSTRIP="false" fi fi ac_ct_MINGWSTRIP=$ac_cv_prog_ac_ct_MINGWSTRIP if test -n "$ac_ct_MINGWSTRIP"; then - echo "$as_me:$LINENO: result: $ac_ct_MINGWSTRIP" >&5 -echo "${ECHO_T}$ac_ct_MINGWSTRIP" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MINGWSTRIP" >&5 +$as_echo "$ac_ct_MINGWSTRIP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - MINGWSTRIP=$ac_ct_MINGWSTRIP + if test "x$ac_ct_MINGWSTRIP" = x; then + MINGWSTRIP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${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 else MINGWSTRIP="$ac_cv_prog_MINGWSTRIP" fi fi if test "$MINGWSTRIP" = "false"; then - { { echo "$as_me:$LINENO: error: MinGW32 binutils needed. Install them." >&5 -echo "$as_me: error: MinGW32 binutils needed. Install them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "MinGW32 binutils needed. Install them." "$LINENO" 5 fi - ac_ext=cc + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -12666,66 +11916,37 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # do not make sense here (and 'd make the check fail) save_LIBS=$LIBS LIBS="" - -echo "$as_me:$LINENO: checking for main in -lkernel32" >&5 -echo $ECHO_N "checking for main in -lkernel32... $ECHO_C" >&6 -if test "${ac_cv_lib_kernel32_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lkernel32 $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { -main (); +return main (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_kernel32_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_kernel32_main=no + ac_cv_lib_kernel32_main=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_kernel32_main" >&5 -echo "${ECHO_T}$ac_cv_lib_kernel32_main" >&6 -if test $ac_cv_lib_kernel32_main = yes; then +{ $as_echo "$as_me:${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 : cat >>confdefs.h <<_ACEOF #define HAVE_LIBKERNEL32 1 _ACEOF @@ -12735,66 +11956,37 @@ _ACEOF fi ac_cv_lib_kernel32=ac_cv_lib_kernel32_main - -echo "$as_me:$LINENO: checking for main in -ladvapi32" >&5 -echo $ECHO_N "checking for main in -ladvapi32... $ECHO_C" >&6 -if test "${ac_cv_lib_advapi32_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-ladvapi32 $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { -main (); +return main (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_advapi32_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_advapi32_main=no + ac_cv_lib_advapi32_main=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_advapi32_main" >&5 -echo "${ECHO_T}$ac_cv_lib_advapi32_main" >&6 -if test $ac_cv_lib_advapi32_main = yes; then +{ $as_echo "$as_me:${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 : cat >>confdefs.h <<_ACEOF #define HAVE_LIBADVAPI32 1 _ACEOF @@ -12804,149 +11996,11 @@ _ACEOF fi ac_cv_lib_advapi32=ac_cv_lib_advapi32_main - if test "${ac_cv_header_windows_h+set}" = set; then - echo "$as_me:$LINENO: checking for windows.h" >&5 -echo $ECHO_N "checking for windows.h... $ECHO_C" >&6 -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 + 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 : -fi -if test $ac_cv_header_windows_h = yes; then - : else - { { echo "$as_me:$LINENO: error: windows.h missing" >&5 -echo "$as_me: error: windows.h missing" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "windows.h missing" "$LINENO" 5 fi @@ -12962,718 +12016,217 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi - fi - BUILD_TYPE="$BUILD_TYPE ODK" -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - BUILD_UNOWINREG=NO -fi - - - - -echo "$as_me:$LINENO: checking whether to provide libstdc++/libgcc_s in the installset" >&5 -echo $ECHO_N "checking whether to provide libstdc++/libgcc_s in the installset... $ECHO_C" >&6 -if test -n "$with_system_stdlibs" -o -n "$with_system_libs" && \ - test "$with_system_stdlibs" != "no"; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - SYSTEM_STDLIBS=YES -else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - SYSTEM_STDLIBS=NO -fi - - -if test "$_os" = "Darwin" && test "$with_system_zlib" != "no"; then - with_system_zlib=yes -fi -echo "$as_me:$LINENO: checking which zlib to use" >&5 -echo $ECHO_N "checking which zlib to use... $ECHO_C" >&6 -if test -n "$with_system_zlib" -o -n "$with_system_libs" && \ - test "$with_system_zlib" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 - SYSTEM_ZLIB=YES - if test "${ac_cv_header_zlib_h+set}" = set; then - echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 -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 + fi + BUILD_TYPE="$BUILD_TYPE ODK" else - ac_cpp_err=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + BUILD_UNOWINREG=NO 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 + + +{ $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; } +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; } + SYSTEM_STDLIBS=YES else - ac_cv_header_zlib_h=$ac_header_preproc + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SYSTEM_STDLIBS=NO fi -echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 + +if test "$_os" = "Darwin" && test "$with_system_zlib" != "no"; then + with_system_zlib=yes fi -if test $ac_cv_header_zlib_h = yes; then - : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which zlib to use" >&5 +$as_echo_n "checking which zlib to use... " >&6; } +if test -n "$with_system_zlib" -o -n "$with_system_libs" && \ + test "$with_system_zlib" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "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 : + else - { { 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; }; } + as_fn_error $? "zlib.h not found. install zlib" "$LINENO" 5 fi - 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 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char deflate (); int main () { -deflate (); +return deflate (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_z_deflate=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_z_deflate=no + ac_cv_lib_z_deflate=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_z_deflate" >&5 -echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6 -if test $ac_cv_lib_z_deflate = yes; then +{ $as_echo "$as_me:${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 : ZLIB=-lz else - { { 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; }; } + as_fn_error $? "zlib not found or functional" "$LINENO" 5 fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_ZLIB=NO BUILD_TYPE="$BUILD_TYPE ZLIB" fi -echo "$as_me:$LINENO: checking which jpeg to use" >&5 -echo $ECHO_N "checking which jpeg to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${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 - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_JPEG=YES - if test "${ac_cv_header_jpeglib_h+set}" = set; then - echo "$as_me:$LINENO: checking for jpeglib.h" >&5 -echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6 -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 + 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 : -fi -if test $ac_cv_header_jpeglib_h = yes; then - : else - { { echo "$as_me:$LINENO: error: jpeg.h not found. install libjpeg" >&5 -echo "$as_me: error: jpeg.h not found. install libjpeg" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "jpeg.h not found. install libjpeg" "$LINENO" 5 fi - echo "$as_me:$LINENO: checking for jpeg_resync_to_restart in -ljpeg" >&5 -echo $ECHO_N "checking for jpeg_resync_to_restart in -ljpeg... $ECHO_C" >&6 -if test "${ac_cv_lib_jpeg_jpeg_resync_to_restart+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljpeg $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char jpeg_resync_to_restart (); int main () { -jpeg_resync_to_restart (); +return jpeg_resync_to_restart (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_jpeg_jpeg_resync_to_restart=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_jpeg_jpeg_resync_to_restart=no + ac_cv_lib_jpeg_jpeg_resync_to_restart=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_jpeg_jpeg_resync_to_restart" >&5 -echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_resync_to_restart" >&6 -if test $ac_cv_lib_jpeg_jpeg_resync_to_restart = yes; then +{ $as_echo "$as_me:${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 : JPEG3RDLIB=-ljpeg else - echo "$as_me:$LINENO: checking jpeg library not found or fuctional" >&5 -echo $ECHO_N "checking jpeg library not found or fuctional... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking jpeg library not found or fuctional" >&5 +$as_echo_n "checking jpeg library not found or fuctional... " >&6; } fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_JPEG=NO BUILD_TYPE="$BUILD_TYPE JPEG" fi -echo "$as_me:$LINENO: checking which expat to use" >&5 -echo $ECHO_N "checking which expat to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which expat to use" >&5 +$as_echo_n "checking which expat to use... " >&6; } if test -n "$with_system_expat" -o -n "$with_system_libs" && \ test "$with_system_expat" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_EXPAT=YES - if test "${ac_cv_header_expat_h+set}" = set; then - echo "$as_me:$LINENO: checking for expat.h" >&5 -echo $ECHO_N "checking for expat.h... $ECHO_C" >&6 -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 + 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 : -fi -if test $ac_cv_header_expat_h = yes; then - : else - { { echo "$as_me:$LINENO: error: expat.h not found. install expat" >&5 -echo "$as_me: error: expat.h not found. install expat" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "expat.h not found. install expat" "$LINENO" 5 fi - -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 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lexpat $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char XML_ParserCreate (); int main () { -XML_ParserCreate (); +return XML_ParserCreate (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_expat_XML_ParserCreate=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_expat_XML_ParserCreate=no + ac_cv_lib_expat_XML_ParserCreate=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_expat_XML_ParserCreate" >&5 -echo "${ECHO_T}$ac_cv_lib_expat_XML_ParserCreate" >&6 -if test $ac_cv_lib_expat_XML_ParserCreate = yes; then +{ $as_echo "$as_me:${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 : cat >>confdefs.h <<_ACEOF #define HAVE_LIBEXPAT 1 _ACEOF @@ -13681,24 +12234,24 @@ _ACEOF LIBS="-lexpat $LIBS" else - echo "$as_me:$LINENO: result: expat library not found or functional." >&5 -echo "${ECHO_T}expat library not found or functional." >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: expat library not found or functional." >&5 +$as_echo "expat library not found or functional." >&6; } fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_EXPAT=NO BUILD_TYPE="$BUILD_TYPE EXPAT" fi -echo "$as_me:$LINENO: checking which libwpd to use" >&5 -echo $ECHO_N "checking which libwpd to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which libwpd to use" >&5 +$as_echo_n "checking which libwpd to use... " >&6; } if test -n "$with_system_libwpd" -o -n "$with_system_libs" && \ test "$with_system_libwpd" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_LIBWPD=YES succeeded=no @@ -13706,10 +12259,10 @@ echo "${ECHO_T}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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -13721,29 +12274,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -13754,25 +12308,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for libwpd-0.8 " >&5 -echo $ECHO_N "checking for libwpd-0.8 ... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libwpd-0.8 " >&5 +$as_echo_n "checking for libwpd-0.8 ... " >&6; } if $PKG_CONFIG --exists "libwpd-0.8 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking LIBWPD_CFLAGS" >&5 -echo $ECHO_N "checking LIBWPD_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBWPD_CFLAGS" >&5 +$as_echo_n "checking LIBWPD_CFLAGS... " >&6; } LIBWPD_CFLAGS=`$PKG_CONFIG --cflags "libwpd-0.8 "` - echo "$as_me:$LINENO: result: $LIBWPD_CFLAGS" >&5 -echo "${ECHO_T}$LIBWPD_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBWPD_CFLAGS" >&5 +$as_echo "$LIBWPD_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking LIBWPD_LIBS" >&5 -echo $ECHO_N "checking LIBWPD_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBWPD_LIBS" >&5 +$as_echo_n "checking LIBWPD_LIBS... " >&6; } LIBWPD_LIBS=`$PKG_CONFIG --libs "libwpd-0.8 "` - echo "$as_me:$LINENO: result: $LIBWPD_LIBS" >&5 -echo "${ECHO_T}$LIBWPD_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBWPD_LIBS" >&5 +$as_echo "$LIBWPD_LIBS" >&6; } else LIBWPD_CFLAGS="" LIBWPD_LIBS="" @@ -13793,14 +12347,12 @@ echo "${ECHO_T}$LIBWPD_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements (libwpd-0.8 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (libwpd-0.8 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + 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 fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_LIBWPD=NO BUILD_TYPE="$BUILD_TYPE LIBWPD" fi @@ -13808,12 +12360,12 @@ fi -echo "$as_me:$LINENO: checking which cppunit to use" >&5 -echo $ECHO_N "checking which cppunit to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which cppunit to use" >&5 +$as_echo_n "checking which cppunit to use... " >&6; } if test -n "$with_system_cppunit" -o -n "$with_system_libs" && \ test "$with_system_cppunit" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_CPPUNIT=YES # might work for earlier, too but go sure: @@ -13822,10 +12374,10 @@ echo "${ECHO_T}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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -13837,29 +12389,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -13870,25 +12423,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for cppunit >= 1.12.0 " >&5 -echo $ECHO_N "checking for cppunit >= 1.12.0 ... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cppunit >= 1.12.0 " >&5 +$as_echo_n "checking for cppunit >= 1.12.0 ... " >&6; } if $PKG_CONFIG --exists "cppunit >= 1.12.0 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking CPPUNIT_CFLAGS" >&5 -echo $ECHO_N "checking CPPUNIT_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking CPPUNIT_CFLAGS" >&5 +$as_echo_n "checking CPPUNIT_CFLAGS... " >&6; } CPPUNIT_CFLAGS=`$PKG_CONFIG --cflags "cppunit >= 1.12.0 "` - echo "$as_me:$LINENO: result: $CPPUNIT_CFLAGS" >&5 -echo "${ECHO_T}$CPPUNIT_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPPUNIT_CFLAGS" >&5 +$as_echo "$CPPUNIT_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking CPPUNIT_LIBS" >&5 -echo $ECHO_N "checking CPPUNIT_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking CPPUNIT_LIBS" >&5 +$as_echo_n "checking CPPUNIT_LIBS... " >&6; } CPPUNIT_LIBS=`$PKG_CONFIG --libs "cppunit >= 1.12.0 "` - echo "$as_me:$LINENO: result: $CPPUNIT_LIBS" >&5 -echo "${ECHO_T}$CPPUNIT_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPPUNIT_LIBS" >&5 +$as_echo "$CPPUNIT_LIBS" >&6; } else CPPUNIT_CFLAGS="" CPPUNIT_LIBS="" @@ -13909,14 +12462,12 @@ echo "${ECHO_T}$CPPUNIT_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements (cppunit >= 1.12.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (cppunit >= 1.12.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Library requirements (cppunit >= 1.12.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_CPPUNIT=NO BUILD_TYPE="$BUILD_TYPE CPPUNIT" fi @@ -13925,18 +12476,18 @@ fi if test "$test_freetype" = "yes"; then - echo "$as_me:$LINENO: checking whether freetype is available" >&5 -echo $ECHO_N "checking whether freetype is available... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether freetype is available" >&5 +$as_echo_n "checking whether freetype is available... " >&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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -13948,29 +12499,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -13981,25 +12533,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for freetype2 >= 2.0 " >&5 -echo $ECHO_N "checking for freetype2 >= 2.0 ... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2 >= 2.0 " >&5 +$as_echo_n "checking for freetype2 >= 2.0 ... " >&6; } if $PKG_CONFIG --exists "freetype2 >= 2.0 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking FREETYPE_CFLAGS" >&5 -echo $ECHO_N "checking FREETYPE_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking FREETYPE_CFLAGS" >&5 +$as_echo_n "checking FREETYPE_CFLAGS... " >&6; } FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2 >= 2.0 "` - echo "$as_me:$LINENO: result: $FREETYPE_CFLAGS" >&5 -echo "${ECHO_T}$FREETYPE_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_CFLAGS" >&5 +$as_echo "$FREETYPE_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking FREETYPE_LIBS" >&5 -echo $ECHO_N "checking FREETYPE_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking FREETYPE_LIBS" >&5 +$as_echo_n "checking FREETYPE_LIBS... " >&6; } FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2 >= 2.0 "` - echo "$as_me:$LINENO: result: $FREETYPE_LIBS" >&5 -echo "${ECHO_T}$FREETYPE_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIBS" >&5 +$as_echo "$FREETYPE_LIBS" >&6; } else FREETYPE_CFLAGS="" FREETYPE_LIBS="" @@ -14020,9 +12572,7 @@ echo "${ECHO_T}$FREETYPE_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements (freetype2 >= 2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (freetype2 >= 2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + 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 fi fi @@ -14035,71 +12585,43 @@ if test "$test_freetype" = "yes"; then save_LIBS="$LIBS" CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" LDFLAGS="$LDFLAGS $FREETYPE_LIBS" - echo "$as_me:$LINENO: checking for FT_GlyphSlot_Embolden in -lfreetype" >&5 -echo $ECHO_N "checking for FT_GlyphSlot_Embolden in -lfreetype... $ECHO_C" >&6 -if test "${ac_cv_lib_freetype_FT_GlyphSlot_Embolden+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfreetype $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char FT_GlyphSlot_Embolden (); int main () { -FT_GlyphSlot_Embolden (); +return FT_GlyphSlot_Embolden (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_freetype_FT_GlyphSlot_Embolden=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_freetype_FT_GlyphSlot_Embolden=no + ac_cv_lib_freetype_FT_GlyphSlot_Embolden=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_freetype_FT_GlyphSlot_Embolden" >&5 -echo "${ECHO_T}$ac_cv_lib_freetype_FT_GlyphSlot_Embolden" >&6 -if test $ac_cv_lib_freetype_FT_GlyphSlot_Embolden = yes; then +{ $as_echo "$as_me:${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 : USE_FT_EMBOLDEN="YES" else USE_FT_EMBOLDEN="NO" @@ -14132,26 +12654,26 @@ if test -n "$with_system_libxml" -o -n "$with_system_libs" && \ fi fi -echo "$as_me:$LINENO: checking which libxslt to use" >&5 -echo $ECHO_N "checking which libxslt to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which libxslt to use" >&5 +$as_echo_n "checking which libxslt to use... " >&6; } if test -n "$with_system_libxslt" -o -n "$with_system_libs" -o \ "$_os" = "Darwin" && \ test "$with_system_libxslt" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_LIBXSLT=YES if test "$_os" = "Darwin"; then - echo "$as_me:$LINENO: checking LIBXSLT_CFLAGS" >&5 -echo $ECHO_N "checking LIBXSLT_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXSLT_CFLAGS" >&5 +$as_echo_n "checking LIBXSLT_CFLAGS... " >&6; } LIBXSLT_CFLAGS=`xslt-config --cflags` - echo "$as_me:$LINENO: result: $LIBXSLT_CFLAGS" >&5 -echo "${ECHO_T}$LIBXSLT_CFLAGS" >&6 - echo "$as_me:$LINENO: checking LIBXSLT_LIBS" >&5 -echo $ECHO_N "checking LIBXSLT_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${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; } LIBXSLT_LIBS=`xslt-config --libs` - echo "$as_me:$LINENO: result: $LIBXSLT_LIBS" >&5 -echo "${ECHO_T}$LIBXSLT_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXSLT_LIBS" >&5 +$as_echo "$LIBXSLT_LIBS" >&6; } else @@ -14161,10 +12683,10 @@ echo "${ECHO_T}$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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -14176,29 +12698,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -14209,25 +12732,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for libxslt" >&5 -echo $ECHO_N "checking for libxslt... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxslt" >&5 +$as_echo_n "checking for libxslt... " >&6; } if $PKG_CONFIG --exists "libxslt" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking LIBXSLT_CFLAGS" >&5 -echo $ECHO_N "checking LIBXSLT_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXSLT_CFLAGS" >&5 +$as_echo_n "checking LIBXSLT_CFLAGS... " >&6; } LIBXSLT_CFLAGS=`$PKG_CONFIG --cflags "libxslt"` - echo "$as_me:$LINENO: result: $LIBXSLT_CFLAGS" >&5 -echo "${ECHO_T}$LIBXSLT_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXSLT_CFLAGS" >&5 +$as_echo "$LIBXSLT_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking LIBXSLT_LIBS" >&5 -echo $ECHO_N "checking LIBXSLT_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXSLT_LIBS" >&5 +$as_echo_n "checking LIBXSLT_LIBS... " >&6; } LIBXSLT_LIBS=`$PKG_CONFIG --libs "libxslt"` - echo "$as_me:$LINENO: result: $LIBXSLT_LIBS" >&5 -echo "${ECHO_T}$LIBXSLT_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXSLT_LIBS" >&5 +$as_echo "$LIBXSLT_LIBS" >&6; } else LIBXSLT_CFLAGS="" LIBXSLT_LIBS="" @@ -14248,9 +12771,7 @@ echo "${ECHO_T}$LIBXSLT_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements (libxslt) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (libxslt) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + 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 fi fi @@ -14258,10 +12779,10 @@ echo "$as_me: error: Library requirements (libxslt) not met; consider adjusting # Extract the first word of "xsltproc", so it can be a program name with args. set dummy xsltproc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_XSLTPROC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $XSLTPROC in [\\/]* | ?:[\\/]*) @@ -14273,37 +12794,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_XSLTPROC" && ac_cv_path_XSLTPROC="no" ;; esac fi XSLTPROC=$ac_cv_path_XSLTPROC - if test -n "$XSLTPROC"; then - echo "$as_me:$LINENO: result: $XSLTPROC" >&5 -echo "${ECHO_T}$XSLTPROC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 +$as_echo "$XSLTPROC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test "$XSLTPROC" = "no"; then - { { echo "$as_me:$LINENO: error: xsltproc is required" >&5 -echo "$as_me: error: xsltproc is required" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "xsltproc is required" "$LINENO" 5 fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_LIBXSLT=NO BUILD_TYPE="$BUILD_TYPE LIBXSLT" fi @@ -14312,25 +12832,25 @@ fi -echo "$as_me:$LINENO: checking which libxml to use" >&5 -echo $ECHO_N "checking which libxml to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which libxml to use" >&5 +$as_echo_n "checking which libxml to use... " >&6; } if test -n "$with_system_libxml" -o -n "$with_system_libs" -o \ "$_os" = "Darwin" && \ test "$with_system_libxml" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_LIBXML=YES if test "$_os" = "Darwin"; then - echo "$as_me:$LINENO: checking LIBXML_CFLAGS" >&5 -echo $ECHO_N "checking LIBXML_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML_CFLAGS" >&5 +$as_echo_n "checking LIBXML_CFLAGS... " >&6; } LIBXML_CFLAGS=`xml2-config --cflags` - echo "$as_me:$LINENO: result: $LIBXML_CFLAGS" >&5 -echo "${ECHO_T}$LIBXML_CFLAGS" >&6 - echo "$as_me:$LINENO: checking LIBXML_LIBS" >&5 -echo $ECHO_N "checking LIBXML_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${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; } LIBXML_LIBS=`xml2-config --libs` - echo "$as_me:$LINENO: result: $LIBXML_LIBS" >&5 -echo "${ECHO_T}$LIBXML_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML_LIBS" >&5 +$as_echo "$LIBXML_LIBS" >&6; } else @@ -14340,10 +12860,10 @@ echo "${ECHO_T}$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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -14355,29 +12875,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -14388,25 +12909,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for libxml-2.0 >= 2.0" >&5 -echo $ECHO_N "checking for libxml-2.0 >= 2.0... $ECHO_C" >&6 + { $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; } if $PKG_CONFIG --exists "libxml-2.0 >= 2.0" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking LIBXML_CFLAGS" >&5 -echo $ECHO_N "checking LIBXML_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML_CFLAGS" >&5 +$as_echo_n "checking LIBXML_CFLAGS... " >&6; } LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.0"` - echo "$as_me:$LINENO: result: $LIBXML_CFLAGS" >&5 -echo "${ECHO_T}$LIBXML_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML_CFLAGS" >&5 +$as_echo "$LIBXML_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking LIBXML_LIBS" >&5 -echo $ECHO_N "checking LIBXML_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML_LIBS" >&5 +$as_echo_n "checking LIBXML_LIBS... " >&6; } LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.0"` - echo "$as_me:$LINENO: result: $LIBXML_LIBS" >&5 -echo "${ECHO_T}$LIBXML_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML_LIBS" >&5 +$as_echo "$LIBXML_LIBS" >&6; } else LIBXML_CFLAGS="" LIBXML_LIBS="" @@ -14427,17 +12948,15 @@ echo "${ECHO_T}$LIBXML_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements (libxml-2.0 >= 2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (libxml-2.0 >= 2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + 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 fi fi BUILD_TYPE="$BUILD_TYPE LIBXMLSEC" else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_LIBXML=NO BUILD_TYPE="$BUILD_TYPE LIBXML2 LIBXMLSEC" fi @@ -14445,27 +12964,27 @@ fi -echo "$as_me:$LINENO: checking which python to use" >&5 -echo $ECHO_N "checking which python to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which python to use" >&5 +$as_echo_n "checking which python to use... " >&6; } if test "$_os" = "Darwin" && test "$with_system_python" != "no"; then with_system_python=yes - echo "$as_me:$LINENO: result: compiling against MacOSX10.4u.sdk (python version 2.3)" >&5 -echo "${ECHO_T}compiling against MacOSX10.4u.sdk (python version 2.3)" >&6 + { $as_echo "$as_me:${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; } PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3" PYTHON_LIBS="-framework Python" elif test -n "$with_system_python" -o -n "$with_system_libs" && \ test "$with_system_python" != "no"; then with_system_python=yes - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. - echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.2" >&5 -echo $ECHO_N "checking whether $PYTHON version >= 2.2... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version >= 2.2" >&5 +$as_echo_n "checking whether $PYTHON version >= 2.2... " >&6; } prog="import sys, string # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. @@ -14477,23 +12996,20 @@ sys.exit(sys.hexversion < minverhex)" ($PYTHON -c "$prog") >&5 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 + (exit $ac_status); }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { { echo "$as_me:$LINENO: error: too old" >&5 -echo "$as_me: error: too old" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "too old" "$LINENO" 5 fi - am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. - echo "$as_me:$LINENO: checking for a Python interpreter with version >= 2.2" >&5 -echo $ECHO_N "checking for a Python interpreter with version >= 2.2... $ECHO_C" >&6 -if test "${am_cv_pathless_PYTHON+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 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 @@ -14509,24 +13025,23 @@ 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 -echo "$as_me:$LINENO: result: $am_cv_pathless_PYTHON" >&5 -echo "${ECHO_T}$am_cv_pathless_PYTHON" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5 +$as_echo "$am_cv_pathless_PYTHON" >&6; } # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. set dummy $am_cv_pathless_PYTHON; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PYTHON+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $PYTHON in [\\/]* | ?:[\\/]*) @@ -14538,49 +13053,48 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi PYTHON=$ac_cv_path_PYTHON - if test -n "$PYTHON"; then - echo "$as_me:$LINENO: result: $PYTHON" >&5 -echo "${ECHO_T}$PYTHON" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi am_display_PYTHON=$am_cv_pathless_PYTHON fi if test "$PYTHON" = :; then - { { echo "$as_me:$LINENO: error: no suitable Python interpreter found" >&5 -echo "$as_me: error: no suitable Python interpreter found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5 else - 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 + { $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 else am_cv_python_version=`$PYTHON -c "import sys; print sys.version[:3]"` fi -echo "$as_me:$LINENO: result: $am_cv_python_version" >&5 -echo "${ECHO_T}$am_cv_python_version" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 +$as_echo "$am_cv_python_version" >&6; } PYTHON_VERSION=$am_cv_python_version @@ -14591,30 +13105,30 @@ echo "${ECHO_T}$am_cv_python_version" >&6 - echo "$as_me:$LINENO: checking for $am_display_PYTHON platform" >&5 -echo $ECHO_N "checking for $am_display_PYTHON platform... $ECHO_C" >&6 -if test "${am_cv_python_platform+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 else am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"` fi -echo "$as_me:$LINENO: result: $am_cv_python_platform" >&5 -echo "${ECHO_T}$am_cv_python_platform" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 +$as_echo "$am_cv_python_platform" >&6; } PYTHON_PLATFORM=$am_cv_python_platform - echo "$as_me:$LINENO: checking for $am_display_PYTHON script directory" >&5 -echo $ECHO_N "checking for $am_display_PYTHON script directory... $ECHO_C" >&6 -if test "${am_cv_python_pythondir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 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 -echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5 -echo "${ECHO_T}$am_cv_python_pythondir" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 +$as_echo "$am_cv_python_pythondir" >&6; } pythondir=$am_cv_python_pythondir @@ -14622,16 +13136,16 @@ echo "${ECHO_T}$am_cv_python_pythondir" >&6 pkgpythondir=\${pythondir}/$PACKAGE - echo "$as_me:$LINENO: checking for $am_display_PYTHON extension module directory" >&5 -echo $ECHO_N "checking for $am_display_PYTHON extension module directory... $ECHO_C" >&6 -if test "${am_cv_python_pyexecdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 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 -echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5 -echo "${ECHO_T}$am_cv_python_pyexecdir" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 +$as_echo "$am_cv_python_pyexecdir" >&6; } pyexecdir=$am_cv_python_pyexecdir @@ -14653,149 +13167,11 @@ if test "$with_system_python" = "yes" ; then SYSTEM_PYTHON=YES save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS" - if test "${ac_cv_header_Python_h+set}" = set; then - echo "$as_me:$LINENO: checking for Python.h" >&5 -echo $ECHO_N "checking for Python.h... $ECHO_C" >&6 -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 + 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 : -fi -if test $ac_cv_header_Python_h = yes; then - : else - { { echo "$as_me:$LINENO: error: Python headers not found" >&5 -echo "$as_me: error: Python headers not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Python headers not found" "$LINENO" 5 fi @@ -14803,8 +13179,8 @@ fi else SYSTEM_PYTHON=NO BUILD_TYPE="$BUILD_TYPE PYTHON" - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } # Embedded python dies without Home set if test "z$HOME" = "z"; then export HOME=""; @@ -14813,10 +13189,10 @@ echo "${ECHO_T}internal" >&6 if test -z "$BZIP2"; then # Extract the first word of "bzip2", so it can be a program name with args. set dummy bzip2; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_BZIP2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $BZIP2 in [\\/]* | ?:[\\/]*) @@ -14828,32 +13204,31 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_BZIP2="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi BZIP2=$ac_cv_path_BZIP2 - if test -n "$BZIP2"; then - echo "$as_me:$LINENO: result: $BZIP2" >&5 -echo "${ECHO_T}$BZIP2" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BZIP2" >&5 +$as_echo "$BZIP2" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$BZIP2"; then - { { echo "$as_me:$LINENO: error: the internal Python module has a .tar.bz2. You need bzip2" >&5 -echo "$as_me: error: the internal Python module has a .tar.bz2. You need bzip2" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "the internal Python module has a .tar.bz2. You need bzip2" "$LINENO" 5 fi fi fi @@ -14863,121 +13238,27 @@ fi HOME=`echo $HOME | sed 's:\\\\:/:g'` -echo "$as_me:$LINENO: checking which db to use" >&5 -echo $ECHO_N "checking which db to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which db to use" >&5 +$as_echo_n "checking which db to use... " >&6; } if test -n "$with_system_db" -o -n "$with_system_libs" && \ test "$with_system_db" != "no"; then - SYSTEM_DB=YES - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 - echo "$as_me:$LINENO: checking for db.h" >&5 -echo $ECHO_N "checking for db.h... $ECHO_C" >&6 -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 - -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 - 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 + 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" " + +" +if test "x$ac_cv_header_db_h" = x""yes; then : + DB_INCLUDES=/usr/include 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 + 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 : DB_INCLUDES=/usr/include/db4 else - { { echo "$as_me:$LINENO: error: no. install the db4 libraries" >&5 -echo "$as_me: error: no. install the db4 libraries" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no. install the db4 libraries" "$LINENO" 5 fi @@ -14985,20 +13266,15 @@ fi fi - echo "$as_me:$LINENO: checking whether db is at least 4.1" >&5 -echo $ECHO_N "checking whether db is at least 4.1... $ECHO_C" >&6 - 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; }; } + { $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 ; } else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -15009,91 +13285,47 @@ int main(int argc, char **argv) { } _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - 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 +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -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; }; } + as_fn_error $? "no. you need at least db 4.1" "$LINENO" 5 fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -echo "$as_me:$LINENO: checking for main in -ldb" >&5 -echo $ECHO_N "checking for main in -ldb... $ECHO_C" >&6 -if test "${ac_cv_lib_db_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldb $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { -main (); +return main (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_db_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_db_main=no + ac_cv_lib_db_main=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_db_main" >&5 -echo "${ECHO_T}$ac_cv_lib_db_main" >&6 -if test $ac_cv_lib_db_main = yes; then +{ $as_echo "$as_me:${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 : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDB 1 _ACEOF @@ -15101,16 +13333,14 @@ _ACEOF LIBS="-ldb $LIBS" else - { { echo "$as_me:$LINENO: error: db not installed or functional" >&5 -echo "$as_me: error: db not installed or functional" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "db not installed or functional" "$LINENO" 5 fi ac_cv_lib_db=ac_cv_lib_db_main SCPDEFS="$SCPDEFS -DSYSTEM_DB" else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_DB=NO BUILD_TYPE="$BUILD_TYPE BERKELEYDB" fi @@ -15119,78 +13349,70 @@ fi -echo "$as_me:$LINENO: checking which lucene to use" >&5 -echo $ECHO_N "checking which lucene to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which lucene to use" >&5 +$as_echo_n "checking which lucene to use... " >&6; } if test -n "$with_system_lucene" -o -n "$with_system_libs" && \ test "$with_system_lucene" != "no" && test "$with_system_jars" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_LUCENE=YES if test -z $LUCENE_CORE_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/lucene-core-2.3.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/lucene-core-2.3.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_lucene_core_2_3_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_core_2_3_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_lucene_core_2_3_jar" >&6 -if test $ac_cv_file__usr_share_java_lucene_core_2_3_jar = yes; then +{ $as_echo "$as_me:${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 : LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.3.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/lucene-core.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/lucene-core.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_lucene_core_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/lucene-core.jar" >&5 +$as_echo_n "checking for /usr/share/java/lucene-core.jar... " >&6; } +if test "${ac_cv_file__usr_share_java_lucene_core_jar+set}" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/lucene-core.jar"; then ac_cv_file__usr_share_java_lucene_core_jar=yes else ac_cv_file__usr_share_java_lucene_core_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_core_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_lucene_core_jar" >&6 -if test $ac_cv_file__usr_share_java_lucene_core_jar = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_lucene_core_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_lucene_core_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_lucene_core_jar" = x""yes; then : LUCENE_CORE_JAR=/usr/share/java/lucene-core.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/lucene.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/lucene.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_lucene_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_lucene_jar" >&6 -if test $ac_cv_file__usr_share_java_lucene_jar = yes; then +{ $as_echo "$as_me:${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 : LUCENE_CORE_JAR=/usr/share/java/lucene.jar else - { { echo "$as_me:$LINENO: error: lucene-core.jar replacement not found" >&5 -echo "$as_me: error: lucene-core.jar replacement not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "lucene-core.jar replacement not found" "$LINENO" 5 fi @@ -15203,79 +13425,70 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$LUCENE_CORE_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $LUCENE_CORE_JAR" >&5 -echo $ECHO_N "checking for $LUCENE_CORE_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$LUCENE_CORE_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LUCENE_CORE_JAR" >&5 +$as_echo_n "checking for $LUCENE_CORE_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$LUCENE_CORE_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: lucene-core.jar not found." >&5 -echo "$as_me: error: lucene-core.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "lucene-core.jar not found." "$LINENO" 5 fi fi if test -z $LUCENE_ANALYZERS_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/lucene-analyzers-2.3.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/lucene-analyzers-2.3.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar" >&6 -if test $ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar = yes; then +{ $as_echo "$as_me:${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 : LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers-2.3.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/lucene-contrib/lucene-analyzers.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/lucene-contrib/lucene-analyzers.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar" >&6 -if test $ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar = yes; then +{ $as_echo "$as_me:${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 : LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar else - { { echo "$as_me:$LINENO: error: lucene-analyzers.jar replacement not found." >&5 -echo "$as_me: error: lucene-analyzers.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "lucene-analyzers.jar replacement not found." "$LINENO" 5 fi @@ -15284,35 +13497,32 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$LUCENE_CORE_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $LUCENE_CORE_JAR" >&5 -echo $ECHO_N "checking for $LUCENE_CORE_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$LUCENE_CORE_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LUCENE_CORE_JAR" >&5 +$as_echo_n "checking for $LUCENE_CORE_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$LUCENE_CORE_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: lucene-analyzers.jar not found." >&5 -echo "$as_me: error: lucene-analyzers.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "lucene-analyzers.jar not found." "$LINENO" 5 fi fi - echo "$as_me:$LINENO: checking whether lucene is version 2.x" >&5 -echo $ECHO_N "checking whether lucene is version 2.x... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lucene is version 2.x" >&5 +$as_echo_n "checking whether lucene is version 2.x... " >&6; } export LUCENE_CORE_JAR if $PERL -e 'use Archive::Zip; my $file = "$ENV{'LUCENE_CORE_JAR'}"; @@ -15323,17 +13533,15 @@ echo $ECHO_N "checking whether lucene is version 2.x... $ECHO_C" >&6 } else { exit 1; }'; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { { echo "$as_me:$LINENO: error: no, you need lucene 2" >&5 -echo "$as_me: error: no, you need lucene 2" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no, you need lucene 2" "$LINENO" 5 fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_LUCENE=NO BUILD_TYPE="$BUILD_TYPE LUCENE" fi @@ -15341,44 +13549,42 @@ fi -echo "$as_me:$LINENO: checking whether to build the MySQL Connector extension" >&5 -echo $ECHO_N "checking whether to build the MySQL Connector extension... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the MySQL Connector extension" >&5 +$as_echo_n "checking whether to build the MySQL Connector extension... " >&6; } if test -n "$enable_mysql_connector" -a "$enable_mysql_connector" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ENABLE_MYSQLC=YES - echo "$as_me:$LINENO: checking for mysqlc module" >&5 -echo $ECHO_N "checking for mysqlc module... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysqlc module" >&5 +$as_echo_n "checking for mysqlc module... " >&6; } if test -d mysqlc; then - echo "$as_me:$LINENO: result: OK" >&5 -echo "${ECHO_T}OK" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 +$as_echo "OK" >&6; } else - { { echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "not existing. get it (did you get the -extensions tarball?)" "$LINENO" 5 fi BUILD_TYPE="$BUILD_TYPE MYSQLC" else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ENABLE_MYSQLC=NO fi if test "$ENABLE_MYSQLC" = "YES"; then -echo "$as_me:$LINENO: checking for mysql pre-requisites" >&5 -echo $ECHO_N "checking for mysql pre-requisites... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql pre-requisites" >&5 +$as_echo_n "checking for mysql pre-requisites... " >&6; } if test -n "$with_system_mysql" -o -n "$with_system_libs" && \ test "$with_system_mysql" != "no" && test "$with_system_libs" != "no"; then - echo "$as_me:$LINENO: result: external MySQL" >&5 -echo "${ECHO_T}external MySQL" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external MySQL" >&5 +$as_echo "external MySQL" >&6; } SYSTEM_MYSQL=YES # Extract the first word of "mysql_config", so it can be a program name with args. set dummy mysql_config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_MYSQLCONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $MYSQLCONFIG in [\\/]* | ?:[\\/]*) @@ -15390,73 +13596,68 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MYSQLCONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi MYSQLCONFIG=$ac_cv_path_MYSQLCONFIG - if test -n "$MYSQLCONFIG"; then - echo "$as_me:$LINENO: result: $MYSQLCONFIG" >&5 -echo "${ECHO_T}$MYSQLCONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQLCONFIG" >&5 +$as_echo "$MYSQLCONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - echo "$as_me:$LINENO: checking MySQL version" >&5 -echo $ECHO_N "checking MySQL version... $ECHO_C" >&6 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MySQL version" >&5 +$as_echo_n "checking MySQL version... " >&6; } MYSQL_VERSION=`$MYSQLCONFIG --version` MYSQL_MAJOR=`$MYSQLCONFIG --version | cut -d"." -f1` if test "$MYSQL_MAJOR" -ge "5"; then - echo "$as_me:$LINENO: result: OK" >&5 -echo "${ECHO_T}OK" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 +$as_echo "OK" >&6; } else - { { echo "$as_me:$LINENO: error: too old, use 5.0.x or 5.1.x" >&5 -echo "$as_me: error: too old, use 5.0.x or 5.1.x" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "too old, use 5.0.x or 5.1.x" "$LINENO" 5 fi - echo "$as_me:$LINENO: checking for MySQL Client library" >&5 -echo $ECHO_N "checking for MySQL Client library... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MySQL Client library" >&5 +$as_echo_n "checking for MySQL Client library... " >&6; } MYSQL_INC=`$MYSQLCONFIG --include` MYSQL_LIB=`$MYSQLCONFIG --libs` MYSQL_DEFINES=`$MYSQLCONFIG --cflags | sed -e s,$MYSQL_INC,,` - echo "$as_me:$LINENO: result: includes $MYSQL_INC, libraries $MYSQL_LIB" >&5 -echo "${ECHO_T}includes $MYSQL_INC, libraries $MYSQL_LIB" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: includes $MYSQL_INC, libraries $MYSQL_LIB" >&5 +$as_echo "includes $MYSQL_INC, libraries $MYSQL_LIB" >&6; } else SYSTEM_MYSQL=NO if test -n "$with_libmysql_path"; then - echo "$as_me:$LINENO: result: external Connector/C (libmysql)" >&5 -echo "${ECHO_T}external Connector/C (libmysql)" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external Connector/C (libmysql)" >&5 +$as_echo "external Connector/C (libmysql)" >&6; } LIBMYSQL=libmysql.so if test "$_os" = "Darwin"; then LIBMYSQL=libmysql.dylib elif test "$_os" = "WINNT"; then LIBMYSQL=libmysql.dll fi - echo "$as_me:$LINENO: checking for $LIBMYSQL" >&5 -echo $ECHO_N "checking for $LIBMYSQL... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBMYSQL" >&5 +$as_echo_n "checking for $LIBMYSQL... " >&6; } if test -e "$with_libmysql_path/lib/$LIBMYSQL"; then - echo "$as_me:$LINENO: result: found." >&5 -echo "${ECHO_T}found." >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found." >&5 +$as_echo "found." >&6; } LIBMYSQL_PATH=$with_libmysql_path else - { { echo "$as_me:$LINENO: error: not found. Please specify proper path in --with-libmysql-path." >&5 -echo "$as_me: error: not found. Please specify proper path in --with-libmysql-path." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "not found. Please specify proper path in --with-libmysql-path." "$LINENO" 5 fi else - { { echo "$as_me:$LINENO: error: not given. Please specify either --with-system-mysql or --with-libmysql-path" >&5 -echo "$as_me: error: not given. Please specify either --with-system-mysql or --with-libmysql-path" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "not given. Please specify either --with-system-mysql or --with-libmysql-path" "$LINENO" 5 fi fi @@ -15465,7 +13666,7 @@ fi -ac_ext=cc +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -15473,225 +13674,58 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # FIXME! # who thought this too-generic cppconn dir was a good idea? -echo "$as_me:$LINENO: checking MySQL Connector/C++" >&5 -echo $ECHO_N "checking MySQL Connector/C++... $ECHO_C" >&6 +{ $as_echo "$as_me:${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 - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_MYSQL_CPPCONN=YES - ac_ext=cc + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - if test "${ac_cv_header_mysql_driver_h+set}" = set; then - echo "$as_me:$LINENO: checking for mysql_driver.h" >&5 -echo $ECHO_N "checking for mysql_driver.h... $ECHO_C" >&6 -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 + 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 : -fi -if test $ac_cv_header_mysql_driver_h = yes; then - : else - { { echo "$as_me:$LINENO: error: mysql_driver.h not found. install MySQL C++ Connectivity" >&5 -echo "$as_me: error: mysql_driver.h not found. install MySQL C++ Connectivity" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "mysql_driver.h not found. install MySQL C++ Connectivity" "$LINENO" 5 fi - -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 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmysqlcppconn $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { -main (); +return main (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_mysqlcppconn_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_mysqlcppconn_main=no + ac_cv_lib_mysqlcppconn_main=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_mysqlcppconn_main" >&5 -echo "${ECHO_T}$ac_cv_lib_mysqlcppconn_main" >&6 -if test $ac_cv_lib_mysqlcppconn_main = yes; then +{ $as_echo "$as_me:${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 : cat >>confdefs.h <<_ACEOF #define HAVE_LIBMYSQLCPPCONN 1 _ACEOF @@ -15699,25 +13733,18 @@ _ACEOF LIBS="-lmysqlcppconn $LIBS" else - { { echo "$as_me:$LINENO: error: MySQL C++ Connectivity lib not found or functional" >&5 -echo "$as_me: error: MySQL C++ Connectivity lib not found or functional" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "MySQL C++ Connectivity lib not found or functional" "$LINENO" 5 fi - 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; }; } + { $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 ; } else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -15734,32 +13761,17 @@ int main(int argc, char **argv) { } _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - 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 +if ac_fn_cxx_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 +$as_echo "OK" >&6; } else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -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; }; } + as_fn_error $? "not suitable, we need >= 1.0.6" "$LINENO" 5 fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - ac_ext=cc + + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -15767,17 +13779,15 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 - echo "$as_me:$LINENO: checking for mysqlcppconn module" >&5 -echo $ECHO_N "checking for mysqlcppconn module... $ECHO_C" >&6 + { $as_echo "$as_me:${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; } if test -d mysqlcppconn; then - echo "$as_me:$LINENO: result: OK" >&5 -echo "${ECHO_T}OK" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 +$as_echo "OK" >&6; } else - { { echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "not existing. get it (did you get the -extensions tarball?)" "$LINENO" 5 fi BUILD_TYPE="$BUILD_TYPE MYSQLCPPCONN" SYSTEM_MYSQL_CPPCONN=NO @@ -15791,44 +13801,41 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -echo "$as_me:$LINENO: checking which hsqldb to use" >&5 -echo $ECHO_N "checking which hsqldb to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which hsqldb to use" >&5 +$as_echo_n "checking which hsqldb to use... " >&6; } if test -n "$with_system_hsqldb" -o -n "$with_system_libs" && \ test "$with_system_hsqldb" != "no" && test "$with_system_jars" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_HSQLDB=YES if test -z $HSQLDB_JAR; then HSQLDB_JAR=/usr/share/java/hsqldb.jar fi - as_ac_File=`echo "ac_cv_file_$HSQLDB_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $HSQLDB_JAR" >&5 -echo $ECHO_N "checking for $HSQLDB_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$HSQLDB_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $HSQLDB_JAR" >&5 +$as_echo_n "checking for $HSQLDB_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$HSQLDB_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: hsqldb.jar not found." >&5 -echo "$as_me: error: hsqldb.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "hsqldb.jar not found." "$LINENO" 5 fi - echo "$as_me:$LINENO: checking whether hsqldb is 1.8.0.x" >&5 -echo $ECHO_N "checking whether hsqldb is 1.8.0.x... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether hsqldb is 1.8.0.x" >&5 +$as_echo_n "checking whether hsqldb is 1.8.0.x... " >&6; } export HSQLDB_JAR if $PERL -e 'use Archive::Zip; my $file = "$ENV{'HSQLDB_JAR'}"; @@ -15851,61 +13858,56 @@ echo $ECHO_N "checking whether hsqldb is 1.8.0.x... $ECHO_C" >&6 } else { exit 1; }'; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { { echo "$as_me:$LINENO: error: no, you need hsqldb >= 1.8.0.9 but < 1.8.1" >&5 -echo "$as_me: error: no, you need hsqldb >= 1.8.0.9 but < 1.8.1" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no, you need hsqldb >= 1.8.0.9 but < 1.8.1" "$LINENO" 5 fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_HSQLDB=NO BUILD_TYPE="$BUILD_TYPE HSQLDB" fi -echo "$as_me:$LINENO: checking which beanshell to use" >&5 -echo $ECHO_N "checking which beanshell to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which beanshell to use" >&5 +$as_echo_n "checking which beanshell to use... " >&6; } if test -n "$with_system_beanshell" -o -n "$with_system_libs" && \ test "$with_system_beanshell" != "no" && test "$with_system_jars" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_BSH=YES if test -z $BSH_JAR; then BSH_JAR=/usr/share/java/bsh.jar fi - as_ac_File=`echo "ac_cv_file_$BSH_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $BSH_JAR" >&5 -echo $ECHO_N "checking for $BSH_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$BSH_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $BSH_JAR" >&5 +$as_echo_n "checking for $BSH_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$BSH_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: bsh.jar not found." >&5 -echo "$as_me: error: bsh.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "bsh.jar not found." "$LINENO" 5 fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_BSH=NO BUILD_TYPE="$BUILD_TYPE BSH" fi @@ -15913,78 +13915,70 @@ fi -echo "$as_me:$LINENO: checking which saxon to use" >&5 -echo $ECHO_N "checking which saxon to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which saxon to use" >&5 +$as_echo_n "checking which saxon to use... " >&6; } if test -n "$with_system_saxon" -o -n "$with_system_libs" && \ test "$with_system_saxon" != "no" && test "$with_system_jars" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_SAXON=YES if test -z $SAXON_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/saxon9.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/saxon9.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_saxon9_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_saxon9_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_saxon9_jar" >&6 -if test $ac_cv_file__usr_share_java_saxon9_jar = yes; then +{ $as_echo "$as_me:${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 : SAXON_JAR=/usr/share/java/saxon9.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/saxon.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/saxon.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_saxon_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_saxon_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_saxon_jar" >&6 -if test $ac_cv_file__usr_share_java_saxon_jar = yes; then +{ $as_echo "$as_me:${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 : SAXON_JAR=/usr/share/java/saxon.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/saxon9.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/saxon9.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_saxon9_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_saxon9_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_saxon9_jar" >&6 -if test $ac_cv_file__usr_share_java_saxon9_jar = yes; then +{ $as_echo "$as_me:${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 : SAXON_JAR=/usr/share/java/saxon9.jar else - { { echo "$as_me:$LINENO: error: saxon.jar replacement not found" >&5 -echo "$as_me: error: saxon.jar replacement not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "saxon.jar replacement not found" "$LINENO" 5 fi @@ -15997,66 +13991,60 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$SAXON_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $SAXON_JAR" >&5 -echo $ECHO_N "checking for $SAXON_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$SAXON_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $SAXON_JAR" >&5 +$as_echo_n "checking for $SAXON_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$SAXON_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: saxon.jar replacement not found." >&5 -echo "$as_me: error: saxon.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "saxon.jar replacement not found." "$LINENO" 5 fi fi if test -n "$SERIALIZER_JAR"; then - as_ac_File=`echo "ac_cv_file_$SERIALIZER_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $SERIALIZER_JAR" >&5 -echo $ECHO_N "checking for $SERIALIZER_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$SERIALIZER_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $SERIALIZER_JAR" >&5 +$as_echo_n "checking for $SERIALIZER_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$SERIALIZER_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: serializer.jar not found." >&5 -echo "$as_me: error: serializer.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "serializer.jar not found." "$LINENO" 5 fi fi - echo "$as_me:$LINENO: checking if saxon works" >&5 -echo $ECHO_N "checking if saxon works... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if saxon works" >&5 +$as_echo_n "checking if saxon works... " >&6; } cat > saxontest.java <<_ACEOF import javax.xml.transform.TransformerFactory; import javax.xml.transform.Transformer; @@ -16097,40 +14085,36 @@ _ACEOF _ACEOF javac_cmd="$JAVACOMPILER -cp $SAXON_JAR saxontest.java 1>&2" - { (eval echo "$as_me:$LINENO: \"$javac_cmd\"") >&5 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$javac_cmd\""; } >&5 (eval $javac_cmd) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } if test $? = 0 && test -f ./saxontest.class ; then java_cmd="$JAVAINTERPRETER -cp $SAXON_JAR:. saxontest saxontest.xsl 1>&2" - { (eval echo "$as_me:$LINENO: \"$java_cmd\"") >&5 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$java_cmd\""; } >&5 (eval $java_cmd) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } if test $? = 0; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else cat saxontest.java >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb" >&5 -echo "$as_me: error: Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb" >&2;} - { (exit 1); exit 1; }; } + { $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 fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } cat saxontest.java >&5 - { { echo "$as_me:$LINENO: error: saxontest could not be compiled, non-functional saxon jar" >&5 -echo "$as_me: error: saxontest could not be compiled, non-functional saxon jar" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "saxontest could not be compiled, non-functional saxon jar" "$LINENO" 5 fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_SAXON=NO NEED_SAXON=TRUE fi @@ -16144,20 +14128,20 @@ fi if test "$_os" = "Darwin" && test "$with_system_curl" != "no"; then with_system_curl=yes fi -echo "$as_me:$LINENO: checking which curl to use" >&5 -echo $ECHO_N "checking which curl to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which curl to use" >&5 +$as_echo_n "checking which curl to use... " >&6; } if test -n "$with_system_curl" -o -n "$with_system_libs" && \ test "$with_system_curl" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_CURL=YES # Extract the first word of "curl-config", so it can be a program name with args. set dummy curl-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_CURLCONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $CURLCONFIG in [\\/]* | ?:[\\/]*) @@ -16169,693 +14153,134 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CURLCONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi CURLCONFIG=$ac_cv_path_CURLCONFIG - if test -n "$CURLCONFIG"; then - echo "$as_me:$LINENO: result: $CURLCONFIG" >&5 -echo "${ECHO_T}$CURLCONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURLCONFIG" >&5 +$as_echo "$CURLCONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$CURLCONFIG"; then - { { echo "$as_me:$LINENO: error: install curl to run this script" >&5 -echo "$as_me: error: install curl to run this script" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "install curl to run this script" "$LINENO" 5 fi # check curl version - echo "$as_me:$LINENO: checking whether curl is >= 7.13.1" >&5 -echo $ECHO_N "checking whether curl is >= 7.13.1... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether curl is >= 7.13.1" >&5 +$as_echo_n "checking whether curl is >= 7.13.1... " >&6; } if test "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $1 }'`" -gt "7" -a \ "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $2 }'`" -gt "13" -a \ "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $3 }'`" -gt "1"; then - { { echo "$as_me:$LINENO: error: no, you need at least curl 7.13,1" >&5 -echo "$as_me: error: no, you need at least curl 7.13,1" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no, you need at least curl 7.13,1" "$LINENO" 5 else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi CURL_LIBS=`$CURLCONFIG --libs` - CURL_CFLAGS=`$CURLCONFIG --cflags` -else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 - SYSTEM_CURL=NO - BUILD_TYPE="$BUILD_TYPE CURL" -fi - - - - -echo "$as_me:$LINENO: checking which mdds to use" >&5 -echo $ECHO_N "checking which mdds to use... $ECHO_C" >&6 -if test -n "$with_system_mdds" -o -n "$with_system_headers" && \ - test "$with_system_mdds" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 - SYSTEM_MDDS=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_mdds_flat_segment_tree_hpp+set}" = set; then - echo "$as_me:$LINENO: checking for mdds/flat_segment_tree.hpp" >&5 -echo $ECHO_N "checking for mdds/flat_segment_tree.hpp... $ECHO_C" >&6 -if test "${ac_cv_header_mdds_flat_segment_tree_hpp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_mdds_flat_segment_tree_hpp" >&5 -echo "${ECHO_T}$ac_cv_header_mdds_flat_segment_tree_hpp" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking mdds/flat_segment_tree.hpp usability" >&5 -echo $ECHO_N "checking mdds/flat_segment_tree.hpp usability... $ECHO_C" >&6 -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 mdds/flat_segment_tree.hpp presence" >&5 -echo $ECHO_N "checking mdds/flat_segment_tree.hpp presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -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: mdds/flat_segment_tree.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: present but cannot be compiled" >&5 -echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for mdds/flat_segment_tree.hpp" >&5 -echo $ECHO_N "checking for mdds/flat_segment_tree.hpp... $ECHO_C" >&6 -if test "${ac_cv_header_mdds_flat_segment_tree_hpp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_mdds_flat_segment_tree_hpp=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_mdds_flat_segment_tree_hpp" >&5 -echo "${ECHO_T}$ac_cv_header_mdds_flat_segment_tree_hpp" >&6 - -fi -if test $ac_cv_header_mdds_flat_segment_tree_hpp = yes; then - : -else - { { echo "$as_me:$LINENO: error: mdds/flat_segment_tree.hpp not found. install mdds" >&5 -echo "$as_me: error: mdds/flat_segment_tree.hpp not found. install mdds" >&2;} - { (exit 1); exit 1; }; } -fi - - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 - BUILD_TYPE="$BUILD_TYPE MDDS" - SYSTEM_MDDS=NO -fi - - -echo "$as_me:$LINENO: checking which boost to use" >&5 -echo $ECHO_N "checking which boost to use... $ECHO_C" >&6 -if test -n "$with_system_boost" -o -n "$with_system_headers" && \ - test "$with_system_boost" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 - SYSTEM_BOOST=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_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 + CURL_CFLAGS=`$CURLCONFIG --cflags` else - ac_cpp_err=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } + SYSTEM_CURL=NO + BUILD_TYPE="$BUILD_TYPE CURL" 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 + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which mdds to use" >&5 +$as_echo_n "checking which mdds to use... " >&6; } +if test -n "$with_system_mdds" -o -n "$with_system_headers" && \ + test "$with_system_mdds" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } + SYSTEM_MDDS=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" "mdds/flat_segment_tree.hpp" "ac_cv_header_mdds_flat_segment_tree_hpp" "$ac_includes_default" +if test "x$ac_cv_header_mdds_flat_segment_tree_hpp" = x""yes; then : + else - ac_cv_header_boost_spirit_include_classic_core_hpp=$ac_header_preproc + as_fn_error $? "mdds/flat_segment_tree.hpp not found. install mdds" "$LINENO" 5 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 - : + + 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: error: boost/spirit/include/classic_core.hpp not found. install boost >= 1.36" >&5 -echo "$as_me: error: boost/spirit/include/classic_core.hpp not found. install boost >= 1.36" >&2;} - { (exit 1); exit 1; }; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } + BUILD_TYPE="$BUILD_TYPE MDDS" + SYSTEM_MDDS=NO fi - if test "${ac_cv_header_boost_function_hpp+set}" = set; then - echo "$as_me:$LINENO: checking for boost/function.hpp" >&5 -echo $ECHO_N "checking for boost/function.hpp... $ECHO_C" >&6 -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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which boost to use" >&5 +$as_echo_n "checking which boost to use... " >&6; } +if test -n "$with_system_boost" -o -n "$with_system_headers" && \ + test "$with_system_boost" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } + SYSTEM_BOOST=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_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 + 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 : -# 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 - ac_cpp_err=yes + as_fn_error $? "boost/shared_ptr.hpp not found. install boost" "$LINENO" 5 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/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 + 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 : + else - ac_cv_header_boost_function_hpp=$ac_header_preproc + as_fn_error $? "boost/spirit/include/classic_core.hpp not found. install boost >= 1.36" "$LINENO" 5 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 - : + + 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 : + else - { { echo "$as_me:$LINENO: error: boost/function.hpp not found. install boost" >&5 -echo "$as_me: error: boost/function.hpp not found. install boost" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "boost/function.hpp not found. install boost" "$LINENO" 5 fi save_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS -fno-exceptions" - echo "$as_me:$LINENO: checking whether boost/function.hpp compiles with -fno-exceptions" >&5 -echo $ECHO_N "checking whether boost/function.hpp compiles with -fno-exceptions... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $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 /* end confdefs.h. */ #include @@ -16867,44 +14292,18 @@ main () 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_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 +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_cxx_boost_no_exceptons_broken=no else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_cxx_boost_no_exceptons_broken=yes + ac_cv_cxx_boost_no_exceptons_broken=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$ac_cv_cxx_boost_no_exceptons_broken" = "yes"; then - { { echo "$as_me:$LINENO: error: no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131" >&5 -echo "$as_me: error: no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131" "$LINENO" 5 else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi CXXFLAGS=$save_CXXFLAGS ac_ext=c @@ -16914,169 +14313,31 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } BUILD_TYPE="$BUILD_TYPE BOOST" SYSTEM_BOOST=NO fi -echo "$as_me:$LINENO: checking which vigra to use" >&5 -echo $ECHO_N "checking which vigra to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${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 - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_VIGRA=YES - ac_ext=cc + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - if test "${ac_cv_header_vigra_copyimage_hxx+set}" = set; then - echo "$as_me:$LINENO: checking for vigra/copyimage.hxx" >&5 -echo $ECHO_N "checking for vigra/copyimage.hxx... $ECHO_C" >&6 -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 + 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 - { { 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; }; } + as_fn_error $? "vigra/copyimage.hxx not found. install vigra" "$LINENO" 5 fi @@ -17087,457 +14348,150 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } BUILD_TYPE="$BUILD_TYPE VIGRA" SYSTEM_VIGRA=NO fi -echo "$as_me:$LINENO: checking which odbc headers to use" >&5 -echo $ECHO_N "checking which odbc headers to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which odbc headers to use" >&5 +$as_echo_n "checking which odbc headers to use... " >&6; } if test -n "$with_system_odbc_headers" -o -n "$with_system_headers" && \ test "$with_system_odbc_headers" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_ODBC_HEADERS=YES - if test "${ac_cv_header_sqlext_h+set}" = set; then - echo "$as_me:$LINENO: checking for sqlext.h" >&5 -echo $ECHO_N "checking for sqlext.h... $ECHO_C" >&6 -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 + 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 : -fi -if test $ac_cv_header_sqlext_h = yes; then - : else - { { 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; }; } + as_fn_error $? "odbc not found. install odbc" "$LINENO" 5 fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_ODBC_HEADERS=NO BUILD_TYPE="$BUILD_TYPE UNIXODBC" fi -echo "$as_me:$LINENO: checking whether to enable build of Mozilla/Mozilla NSS-using components" >&5 -echo $ECHO_N "checking whether to enable build of Mozilla/Mozilla NSS-using components... $ECHO_C" >&6 +{ $as_echo "$as_me:${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; } if test "$enable_mozilla" = "no"; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } WITH_MOZILLA=NO ENABLE_NSS_MODULE=NO else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } WITH_MOZILLA=YES fi -echo "$as_me:$LINENO: checking whether to build Mozilla addressbook connectivity" >&5 -echo $ECHO_N "checking whether to build Mozilla addressbook connectivity... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Mozilla addressbook connectivity" >&5 +$as_echo_n "checking whether to build Mozilla addressbook connectivity... " >&6; } if test "$enable_mozilla" = "no"; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } elif test "$with_system_mozilla" = "yes"; then - echo "$as_me:$LINENO: result: no, not possible with system-mozilla" >&5 -echo "${ECHO_T}no, not possible with system-mozilla" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not possible with system-mozilla" >&5 +$as_echo "no, not possible with system-mozilla" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi -echo "$as_me:$LINENO: checking whether to build XML Security support" >&5 -echo $ECHO_N "checking whether to build XML Security support... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build XML Security support" >&5 +$as_echo_n "checking whether to build XML Security support... " >&6; } if test "$enable_mozilla" = "no"; then - echo "$as_me:$LINENO: result: no, since Mozilla (NSS) disabled but needed" >&5 -echo "${ECHO_T}no, since Mozilla (NSS) disabled but needed" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, since Mozilla (NSS) disabled but needed" >&5 +$as_echo "no, since Mozilla (NSS) disabled but needed" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi -echo "$as_me:$LINENO: checking whether to build LDAP configuration backend" >&5 -echo $ECHO_N "checking whether to build LDAP configuration backend... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build LDAP configuration backend" >&5 +$as_echo_n "checking whether to build LDAP configuration backend... " >&6; } if test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then if test "$enable_mozilla" = "yes" || test "$with_openldap" = "yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } WITH_LDAP=YES else - echo "$as_me:$LINENO: result: no. Either Mozilla or OpenLDAP needed" >&5 -echo "${ECHO_T}no. Either Mozilla or OpenLDAP needed" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Either Mozilla or OpenLDAP needed" >&5 +$as_echo "no. Either Mozilla or OpenLDAP needed" >&6; } WITH_LDAP=NO fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } WITH_LDAP=NO fi if test "$WITH_LDAP" = "YES"; then - echo "$as_me:$LINENO: checking which LDAP SDK to use" >&5 -echo $ECHO_N "checking which LDAP SDK to use... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which LDAP SDK to use" >&5 +$as_echo_n "checking which LDAP SDK to use... " >&6; } if test -n "$with_openldap" && test "$with_openldap" != "no"; then - echo "$as_me:$LINENO: result: OpenLDAP" >&5 -echo "${ECHO_T}OpenLDAP" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenLDAP" >&5 +$as_echo "OpenLDAP" >&6; } WITH_OPENLDAP=YES - -for ac_header in ldap.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -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 + 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 : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_LDAP_H 1 _ACEOF else - { { echo "$as_me:$LINENO: error: ldap.h not found. install openldap libs" >&5 -echo "$as_me: error: ldap.h not found. install openldap libs" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "ldap.h not found. install openldap libs" "$LINENO" 5 fi done - -echo "$as_me:$LINENO: checking for ldap_simple_bind_s in -lldap" >&5 -echo $ECHO_N "checking for ldap_simple_bind_s in -lldap... $ECHO_C" >&6 -if test "${ac_cv_lib_ldap_ldap_simple_bind_s+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lldap $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char ldap_simple_bind_s (); int main () { -ldap_simple_bind_s (); +return ldap_simple_bind_s (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ldap_ldap_simple_bind_s=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_ldap_ldap_simple_bind_s=no + ac_cv_lib_ldap_ldap_simple_bind_s=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_ldap_ldap_simple_bind_s" >&5 -echo "${ECHO_T}$ac_cv_lib_ldap_ldap_simple_bind_s" >&6 -if test $ac_cv_lib_ldap_ldap_simple_bind_s = yes; then +{ $as_echo "$as_me:${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 : cat >>confdefs.h <<_ACEOF #define HAVE_LIBLDAP 1 _ACEOF @@ -17545,79 +14499,48 @@ _ACEOF LIBS="-lldap $LIBS" else - { { echo "$as_me:$LINENO: error: openldap lib not found or functional" >&5 -echo "$as_me: error: openldap lib not found or functional" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "openldap lib not found or functional" "$LINENO" 5 fi # rumours say that OpenLDAP doesn't have that function. I looked and # it has it. Test for it to be sure - -echo "$as_me:$LINENO: checking for ldap_set_option in -lldap" >&5 -echo $ECHO_N "checking for ldap_set_option in -lldap... $ECHO_C" >&6 -if test "${ac_cv_lib_ldap_ldap_set_option+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lldap $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char ldap_set_option (); int main () { -ldap_set_option (); +return ldap_set_option (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ldap_ldap_set_option=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_ldap_ldap_set_option=no + ac_cv_lib_ldap_ldap_set_option=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_ldap_ldap_set_option" >&5 -echo "${ECHO_T}$ac_cv_lib_ldap_ldap_set_option" >&6 -if test $ac_cv_lib_ldap_ldap_set_option = yes; then +{ $as_echo "$as_me:${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 : cat >>confdefs.h <<_ACEOF #define HAVE_LIBLDAP 1 _ACEOF @@ -17625,14 +14548,12 @@ _ACEOF LIBS="-lldap $LIBS" else - { { echo "$as_me:$LINENO: error: openldap lib not found or functional" >&5 -echo "$as_me: error: openldap lib not found or functional" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "openldap lib not found or functional" "$LINENO" 5 fi else - echo "$as_me:$LINENO: result: Netscape/Mozilla" >&5 -echo "${ECHO_T}Netscape/Mozilla" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Netscape/Mozilla" >&5 +$as_echo "Netscape/Mozilla" >&6; } # TODO. Actually do a sanity check and check for # LDAP_OPT_SIZELIMIT and LDAP_X_OPT_CONNECT_TIMEOUT WITH_OPENLDAP=NO @@ -17641,16 +14562,16 @@ fi -echo "$as_me:$LINENO: checking which mozilla to use" >&5 -echo $ECHO_N "checking which mozilla to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which mozilla to use" >&5 +$as_echo_n "checking which mozilla to use... " >&6; } if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_MOZILLA=YES ENABLE_NSS_MODULE=NO enable_nss_module=no - echo "$as_me:$LINENO: checking which Mozilla flavour to use" >&5 -echo $ECHO_N "checking which Mozilla flavour to use... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which Mozilla flavour to use" >&5 +$as_echo_n "checking which Mozilla flavour to use... " >&6; } if test -n "$with_system_mozilla" && test "$with_system_mozilla" = "libxul"; then MOZ_FLAVOUR=libxul elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "xulrunner"; then @@ -17665,8 +14586,8 @@ echo $ECHO_N "checking which Mozilla flavour to use... $ECHO_C" >&6 MOZ_FLAVOUR=libxul fi tmp=`echo $MOZ_FLAVOUR | $PERL -e 'print ucfirst();'` - echo "$as_me:$LINENO: result: $tmp" >&5 -echo "${ECHO_T}$tmp" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tmp" >&5 +$as_echo "$tmp" >&6; } succeeded=no @@ -17674,10 +14595,10 @@ echo "${ECHO_T}$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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -17689,29 +14610,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -17722,25 +14644,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for nss" >&5 -echo $ECHO_N "checking for nss... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nss" >&5 +$as_echo_n "checking for nss... " >&6; } if $PKG_CONFIG --exists "nss" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking MOZ_NSS_CFLAGS" >&5 -echo $ECHO_N "checking MOZ_NSS_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZ_NSS_CFLAGS" >&5 +$as_echo_n "checking MOZ_NSS_CFLAGS... " >&6; } MOZ_NSS_CFLAGS=`$PKG_CONFIG --cflags "nss"` - echo "$as_me:$LINENO: result: $MOZ_NSS_CFLAGS" >&5 -echo "${ECHO_T}$MOZ_NSS_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZ_NSS_CFLAGS" >&5 +$as_echo "$MOZ_NSS_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking MOZ_NSS_LIBS" >&5 -echo $ECHO_N "checking MOZ_NSS_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZ_NSS_LIBS" >&5 +$as_echo_n "checking MOZ_NSS_LIBS... " >&6; } MOZ_NSS_LIBS=`$PKG_CONFIG --libs "nss"` - echo "$as_me:$LINENO: result: $MOZ_NSS_LIBS" >&5 -echo "${ECHO_T}$MOZ_NSS_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZ_NSS_LIBS" >&5 +$as_echo "$MOZ_NSS_LIBS" >&6; } else MOZ_NSS_CFLAGS="" MOZ_NSS_LIBS="" @@ -17771,10 +14693,10 @@ echo "${ECHO_T}$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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -17786,29 +14708,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -17819,25 +14742,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for $MOZ_FLAVOUR-nss " >&5 -echo $ECHO_N "checking for $MOZ_FLAVOUR-nss ... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MOZ_FLAVOUR-nss " >&5 +$as_echo_n "checking for $MOZ_FLAVOUR-nss ... " >&6; } if $PKG_CONFIG --exists "$MOZ_FLAVOUR-nss " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking MOZ_NSS_CFLAGS" >&5 -echo $ECHO_N "checking MOZ_NSS_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZ_NSS_CFLAGS" >&5 +$as_echo_n "checking MOZ_NSS_CFLAGS... " >&6; } MOZ_NSS_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-nss "` - echo "$as_me:$LINENO: result: $MOZ_NSS_CFLAGS" >&5 -echo "${ECHO_T}$MOZ_NSS_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZ_NSS_CFLAGS" >&5 +$as_echo "$MOZ_NSS_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking MOZ_NSS_LIBS" >&5 -echo $ECHO_N "checking MOZ_NSS_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZ_NSS_LIBS" >&5 +$as_echo_n "checking MOZ_NSS_LIBS... " >&6; } MOZ_NSS_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-nss "` - echo "$as_me:$LINENO: result: $MOZ_NSS_LIBS" >&5 -echo "${ECHO_T}$MOZ_NSS_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZ_NSS_LIBS" >&5 +$as_echo "$MOZ_NSS_LIBS" >&6; } else MOZ_NSS_CFLAGS="" MOZ_NSS_LIBS="" @@ -17858,9 +14781,7 @@ echo "${ECHO_T}$MOZ_NSS_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements ($MOZ_FLAVOUR-nss ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-nss ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + 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 fi else @@ -17875,10 +14796,10 @@ echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-nss ) not met; consider if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -17890,29 +14811,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -17923,25 +14845,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for nspr " >&5 -echo $ECHO_N "checking for nspr ... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nspr " >&5 +$as_echo_n "checking for nspr ... " >&6; } if $PKG_CONFIG --exists "nspr " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking MOZ_NSPR_CFLAGS" >&5 -echo $ECHO_N "checking MOZ_NSPR_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZ_NSPR_CFLAGS" >&5 +$as_echo_n "checking MOZ_NSPR_CFLAGS... " >&6; } MOZ_NSPR_CFLAGS=`$PKG_CONFIG --cflags "nspr "` - echo "$as_me:$LINENO: result: $MOZ_NSPR_CFLAGS" >&5 -echo "${ECHO_T}$MOZ_NSPR_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZ_NSPR_CFLAGS" >&5 +$as_echo "$MOZ_NSPR_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking MOZ_NSPR_LIBS" >&5 -echo $ECHO_N "checking MOZ_NSPR_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZ_NSPR_LIBS" >&5 +$as_echo_n "checking MOZ_NSPR_LIBS... " >&6; } MOZ_NSPR_LIBS=`$PKG_CONFIG --libs "nspr "` - echo "$as_me:$LINENO: result: $MOZ_NSPR_LIBS" >&5 -echo "${ECHO_T}$MOZ_NSPR_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZ_NSPR_LIBS" >&5 +$as_echo "$MOZ_NSPR_LIBS" >&6; } else MOZ_NSPR_CFLAGS="" MOZ_NSPR_LIBS="" @@ -17962,9 +14884,7 @@ echo "${ECHO_T}$MOZ_NSPR_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements (nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + 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 fi NSPR_LIB="-L`$PKG_CONFIG --variable=libdir nspr`" @@ -17976,10 +14896,10 @@ echo "$as_me: error: Library requirements (nspr ) not met; consider adjusting th if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -17991,29 +14911,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -18024,25 +14945,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for $MOZ_FLAVOUR-nspr " >&5 -echo $ECHO_N "checking for $MOZ_FLAVOUR-nspr ... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MOZ_FLAVOUR-nspr " >&5 +$as_echo_n "checking for $MOZ_FLAVOUR-nspr ... " >&6; } if $PKG_CONFIG --exists "$MOZ_FLAVOUR-nspr " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking MOZ_NSPR_CFLAGS" >&5 -echo $ECHO_N "checking MOZ_NSPR_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZ_NSPR_CFLAGS" >&5 +$as_echo_n "checking MOZ_NSPR_CFLAGS... " >&6; } MOZ_NSPR_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-nspr "` - echo "$as_me:$LINENO: result: $MOZ_NSPR_CFLAGS" >&5 -echo "${ECHO_T}$MOZ_NSPR_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZ_NSPR_CFLAGS" >&5 +$as_echo "$MOZ_NSPR_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking MOZ_NSPR_LIBS" >&5 -echo $ECHO_N "checking MOZ_NSPR_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZ_NSPR_LIBS" >&5 +$as_echo_n "checking MOZ_NSPR_LIBS... " >&6; } MOZ_NSPR_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-nspr "` - echo "$as_me:$LINENO: result: $MOZ_NSPR_LIBS" >&5 -echo "${ECHO_T}$MOZ_NSPR_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZ_NSPR_LIBS" >&5 +$as_echo "$MOZ_NSPR_LIBS" >&6; } else MOZ_NSPR_CFLAGS="" MOZ_NSPR_LIBS="" @@ -18063,9 +14984,7 @@ echo "${ECHO_T}$MOZ_NSPR_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements ($MOZ_FLAVOUR-nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + 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 fi fi @@ -18077,10 +14996,10 @@ echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-nspr ) not met; consider if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -18092,29 +15011,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -18125,25 +15045,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for $MOZ_FLAVOUR-xpcom" >&5 -echo $ECHO_N "checking for $MOZ_FLAVOUR-xpcom... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MOZ_FLAVOUR-xpcom" >&5 +$as_echo_n "checking for $MOZ_FLAVOUR-xpcom... " >&6; } if $PKG_CONFIG --exists "$MOZ_FLAVOUR-xpcom" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking MOZILLAXPCOM_CFLAGS" >&5 -echo $ECHO_N "checking MOZILLAXPCOM_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZILLAXPCOM_CFLAGS" >&5 +$as_echo_n "checking MOZILLAXPCOM_CFLAGS... " >&6; } MOZILLAXPCOM_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-xpcom"` - echo "$as_me:$LINENO: result: $MOZILLAXPCOM_CFLAGS" >&5 -echo "${ECHO_T}$MOZILLAXPCOM_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZILLAXPCOM_CFLAGS" >&5 +$as_echo "$MOZILLAXPCOM_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking MOZILLAXPCOM_LIBS" >&5 -echo $ECHO_N "checking MOZILLAXPCOM_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZILLAXPCOM_LIBS" >&5 +$as_echo_n "checking MOZILLAXPCOM_LIBS... " >&6; } MOZILLAXPCOM_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-xpcom"` - echo "$as_me:$LINENO: result: $MOZILLAXPCOM_LIBS" >&5 -echo "${ECHO_T}$MOZILLAXPCOM_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZILLAXPCOM_LIBS" >&5 +$as_echo "$MOZILLAXPCOM_LIBS" >&6; } else MOZILLAXPCOM_CFLAGS="" MOZILLAXPCOM_LIBS="" @@ -18178,10 +15098,10 @@ echo "${ECHO_T}$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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -18193,29 +15113,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -18226,25 +15147,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for libxul " >&5 -echo $ECHO_N "checking for libxul ... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxul " >&5 +$as_echo_n "checking for libxul ... " >&6; } if $PKG_CONFIG --exists "libxul " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking MOZILLAXPCOM_CFLAGS" >&5 -echo $ECHO_N "checking MOZILLAXPCOM_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZILLAXPCOM_CFLAGS" >&5 +$as_echo_n "checking MOZILLAXPCOM_CFLAGS... " >&6; } MOZILLAXPCOM_CFLAGS=`$PKG_CONFIG --cflags "libxul "` - echo "$as_me:$LINENO: result: $MOZILLAXPCOM_CFLAGS" >&5 -echo "${ECHO_T}$MOZILLAXPCOM_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZILLAXPCOM_CFLAGS" >&5 +$as_echo "$MOZILLAXPCOM_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking MOZILLAXPCOM_LIBS" >&5 -echo $ECHO_N "checking MOZILLAXPCOM_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZILLAXPCOM_LIBS" >&5 +$as_echo_n "checking MOZILLAXPCOM_LIBS... " >&6; } MOZILLAXPCOM_LIBS=`$PKG_CONFIG --libs "libxul "` - echo "$as_me:$LINENO: result: $MOZILLAXPCOM_LIBS" >&5 -echo "${ECHO_T}$MOZILLAXPCOM_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZILLAXPCOM_LIBS" >&5 +$as_echo "$MOZILLAXPCOM_LIBS" >&6; } else MOZILLAXPCOM_CFLAGS="" MOZILLAXPCOM_LIBS="" @@ -18265,9 +15186,7 @@ echo "${ECHO_T}$MOZILLAXPCOM_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements (libxul ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (libxul ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + 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 fi MOZ_INC=`$PKG_CONFIG --variable=includedir libxul` @@ -18285,72 +15204,43 @@ echo "$as_me: error: Library requirements (libxul ) not met; consider adjusting save_LIBS="$LIBS" CPPFLAGS="$CPPFLAGS $MOZ_NSS_CFLAGS" LDFLAGS="$LDFLAGS $MOZ_NSS_LIBS" - -echo "$as_me:$LINENO: checking for PK11_GetCertFromPrivateKey in -lnss3" >&5 -echo $ECHO_N "checking for PK11_GetCertFromPrivateKey in -lnss3... $ECHO_C" >&6 -if test "${ac_cv_lib_nss3_PK11_GetCertFromPrivateKey+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnss3 $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char PK11_GetCertFromPrivateKey (); int main () { -PK11_GetCertFromPrivateKey (); +return PK11_GetCertFromPrivateKey (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nss3_PK11_GetCertFromPrivateKey=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_nss3_PK11_GetCertFromPrivateKey=no + ac_cv_lib_nss3_PK11_GetCertFromPrivateKey=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_nss3_PK11_GetCertFromPrivateKey" >&5 -echo "${ECHO_T}$ac_cv_lib_nss3_PK11_GetCertFromPrivateKey" >&6 -if test $ac_cv_lib_nss3_PK11_GetCertFromPrivateKey = yes; then +{ $as_echo "$as_me:${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 : cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSS3 1 _ACEOF @@ -18358,13 +15248,9 @@ _ACEOF LIBS="-lnss3 $LIBS" else - { { echo "$as_me:$LINENO: error: PK11_GetCertFromPrivateKey missing but needed. -See https://bugzilla.mozilla.org/show_bug.cgi?id=262274. -Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5)" >&5 -echo "$as_me: error: PK11_GetCertFromPrivateKey missing but needed. + as_fn_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; }; } +Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5)" "$LINENO" 5 fi LDFLAGS="$save_LDFLAGS" @@ -18373,20 +15259,16 @@ fi MOZ_LIB_XPCOM=$MOZILLAXPCOM_LIBS if test "$WITH_LDAP" != "NO" && test "$WITH_OPENLDAP" != "YES"; then - echo "$as_me:$LINENO: checking whether $tmp was compiled with --enable-ldap" >&5 -echo $ECHO_N "checking whether $tmp was compiled with --enable-ldap... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $tmp was compiled with --enable-ldap" >&5 +$as_echo_n "checking whether $tmp was compiled with --enable-ldap... " >&6; } if test -d "$MOZ_INC/ldap"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } MOZ_LDAP_CFLAGS="-I$MOZ_INC" else - { { echo "$as_me:$LINENO: error: no. + as_fn_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." >&2;} - { (exit 1); exit 1; }; } +Please recompile $tmp with --enable-ldap or use --with-openldap." "$LINENO" 5 fi fi @@ -18397,48 +15279,48 @@ Please recompile $tmp with --enable-ldap or use --with-openldap." >&2;} fi elif test "$enable_mozilla" = "no"; then - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } WITH_MOZILLA=NO ENABLE_NSS_MODULE=NO enable_nss_module=no else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_MOZILLA=NO BUILD_TYPE="$BUILD_TYPE MOZ" if test -z "$with_mozilla_version"; then MOZILLA_VERSION= else - echo "$as_me:$LINENO: checking which mozilla version to build" >&5 -echo $ECHO_N "checking which mozilla version to build... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which mozilla version to build" >&5 +$as_echo_n "checking which mozilla version to build... " >&6; } MOZILLA_VERSION=$with_mozilla_version enable_build_mozilla=1 - echo "$as_me:$LINENO: result: $MOZILLA_VERSION" >&5 -echo "${ECHO_T}$MOZILLA_VERSION" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZILLA_VERSION" >&5 +$as_echo "$MOZILLA_VERSION" >&6; } fi -echo "$as_me:$LINENO: checking for toolkit mozilla should use" >&5 -echo $ECHO_N "checking for toolkit mozilla should use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolkit mozilla should use" >&5 +$as_echo_n "checking for toolkit mozilla should use... " >&6; } if test -z "$with_mozilla_toolkit"; then if test "$_os" != "WINNT" ; then if test "$_os" = "Darwin" ; then MOZILLA_TOOLKIT=mac - echo "$as_me:$LINENO: result: mac" >&5 -echo "${ECHO_T}mac" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: mac" >&5 +$as_echo "mac" >&6; } else MOZILLA_TOOLKIT=gtk2 - echo "$as_me:$LINENO: result: gtk2" >&5 -echo "${ECHO_T}gtk2" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk2" >&5 +$as_echo "gtk2" >&6; } fi fi else MOZILLA_TOOLKIT=$with_mozilla_toolkit enable_build_mozilla=1 - echo "$as_me:$LINENO: result: $MOZILLA_TOOLKIT" >&5 -echo "${ECHO_T}$MOZILLA_TOOLKIT" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZILLA_TOOLKIT" >&5 +$as_echo "$MOZILLA_TOOLKIT" >&6; } fi #if test "$_os" = "Darwin" && test "$MOZILLA_TOOLKIT" != "gtk2"; then # #only gtk2 toolkit supported - xlib or cocoa nees glib1 and libIDL1 - the latter is not @@ -18455,63 +15337,55 @@ else enable_build_mozilla= fi -echo "$as_me:$LINENO: checking whether to build Mozilla/SeaMonkey" >&5 -echo $ECHO_N "checking whether to build Mozilla/SeaMonkey... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Mozilla/SeaMonkey" >&5 +$as_echo_n "checking whether to build Mozilla/SeaMonkey... " >&6; } if test -n "$enable_build_mozilla"; then BUILD_MOZAB="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else BUILD_MOZAB="" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to build provided NSS module" >&5 -echo $ECHO_N "checking whether to build provided NSS module... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build provided NSS module" >&5 +$as_echo_n "checking whether to build provided NSS module... " >&6; } if test "$enable_nss_module" != "no"; then ENABLE_NSS_MODULE="YES" BUILD_TYPE="$BUILD_TYPE NSS" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } if test "$_os" = "WINNT"; then - echo "$as_me:$LINENO: checking for Mozilla build tooling" >&5 -echo $ECHO_N "checking for Mozilla build tooling... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mozilla build tooling" >&5 +$as_echo_n "checking for Mozilla build tooling... " >&6; } if test -z "$MOZILLABUILD" ; then -{ { echo "$as_me:$LINENO: error: Mozilla build tooling not found. -Use the --with-mozilla-build option after installling the tools obtained -from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32" >&5 -echo "$as_me: error: Mozilla build tooling not found. +as_fn_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; }; } +from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32" "$LINENO" 5 else if test \( "$WITH_MINGWIN" = "yes" \) ; then if test ! -d "$MOZILLABUILD" ; then -{ { echo "$as_me:$LINENO: error: Mozilla build tooling incomplete!" >&5 -echo "$as_me: error: Mozilla build tooling incomplete!" >&2;} - { (exit 1); exit 1; }; } +as_fn_error $? "Mozilla build tooling incomplete!" "$LINENO" 5 else - echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } fi else if test ! -d "$MOZILLABUILD/moztools" \ -o ! -d "$MOZILLABUILD/msys" ; then -{ { echo "$as_me:$LINENO: error: Mozilla build tooling incomplete!" >&5 -echo "$as_me: error: Mozilla build tooling incomplete!" >&2;} - { (exit 1); exit 1; }; } +as_fn_error $? "Mozilla build tooling incomplete!" "$LINENO" 5 else - echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } fi fi fi fi else ENABLE_NSS_MODULE="NO" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "$BUILD_MOZAB" = "TRUE"; then @@ -18519,13 +15393,11 @@ if test "$BUILD_MOZAB" = "TRUE"; then if test "$WITH_MINGWIN" != "yes"; then # compiling with MSVC. Only supported platform here is MSVS2005 at the moment. if test "$MSVSVER" != "2005"; then - { { echo "$as_me:$LINENO: error: Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only." >&5 -echo "$as_me: error: Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only." "$LINENO" 5 fi else - { echo "$as_me:$LINENO: WARNING: Building SeaMonkey with mingwin is not tested, and likely to break." >&5 -echo "$as_me: WARNING: Building SeaMonkey with mingwin is not tested, and likely to break." >&2;} + { $as_echo "$as_me:${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 "Building SeaMonkey with mingwin is not tested, and likely to break." >> warn fi fi @@ -18535,65 +15407,59 @@ echo "$as_me: WARNING: Building SeaMonkey with mingwin is not tested, and likely fi MOZILLA_SOURCE_VERSION="seamonkey-${MOZILLA_VERSION}.source" MOZILLA_FETCH_FILE=`grep $MOZILLA_SOURCE_VERSION ooo.lst` - echo "$as_me:$LINENO: checking for mozilla sources" >&5 -echo $ECHO_N "checking for mozilla sources... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mozilla sources" >&5 +$as_echo_n "checking for mozilla sources... " >&6; } if test -z "$MOZILLA_FETCH_FILE"; then - echo "$as_me:$LINENO: result: not found" >&5 -echo "${ECHO_T}not found" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } HAVE_MOZILLA_TARBALL=n else - echo "$as_me:$LINENO: checking for $MOZILLA_FETCH_FILE" >&5 -echo $ECHO_N "checking for $MOZILLA_FETCH_FILE... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MOZILLA_FETCH_FILE" >&5 +$as_echo_n "checking for $MOZILLA_FETCH_FILE... " >&6; } if test ! -e "$TARFILE_LOCATION/$MOZILLA_FETCH_FILE"; then if test -z "$DO_FETCH"; then - echo "$as_me:$LINENO: result: will be fetched" >&5 -echo "${ECHO_T}will be fetched" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: will be fetched" >&5 +$as_echo "will be fetched" >&6; } HAVE_MOZILLA_TARBALL=y else - echo "$as_me:$LINENO: result: not found" >&5 -echo "${ECHO_T}not found" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } HAVE_MOZILLA_TARBALL=n fi else - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } HAVE_MOZILLA_TARBALL=y fi fi if test "$HAVE_MOZILLA_TARBALL" != "y"; then - { { echo "$as_me:$LINENO: error: Mozilla/SeaMonkey source archive not found. -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; }; } + as_fn_error $? "Mozilla/SeaMonkey source archive not found. +Use \"./fetch_tarballs.sh ooo.lst\" to download." "$LINENO" 5 fi if test "$_os" = "WINNT"; then - echo "$as_me:$LINENO: checking for moztools binaries" >&5 -echo $ECHO_N "checking for moztools binaries... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for moztools binaries" >&5 +$as_echo_n "checking for moztools binaries... " >&6; } if test ! -e "$TARFILE_LOCATION/vc8-moztools.zip" ; then - { { echo "$as_me:$LINENO: error: The following file is missing in $TARFILE_LOCATION: vc8-moztools.zip -(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; }; } + 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 else - echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } fi elif test "$_os" = "Darwin"; then if test "$MOZILLA_TOOLKIT" = "gtk2"; then - { echo "$as_me:$LINENO: checking whether mozilla can be built..." >&5 -echo "$as_me: checking whether mozilla can be built..." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mozilla can be built..." >&5 +$as_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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -18605,29 +15471,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -18638,25 +15505,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8" >&5 -echo $ECHO_N "checking for gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8... $ECHO_C" >&6 + { $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; } if $PKG_CONFIG --exists "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking MOZGTK2_CFLAGS" >&5 -echo $ECHO_N "checking MOZGTK2_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZGTK2_CFLAGS" >&5 +$as_echo_n "checking MOZGTK2_CFLAGS... " >&6; } MOZGTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8"` - echo "$as_me:$LINENO: result: $MOZGTK2_CFLAGS" >&5 -echo "${ECHO_T}$MOZGTK2_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZGTK2_CFLAGS" >&5 +$as_echo "$MOZGTK2_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking MOZGTK2_LIBS" >&5 -echo $ECHO_N "checking MOZGTK2_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZGTK2_LIBS" >&5 +$as_echo_n "checking MOZGTK2_LIBS... " >&6; } MOZGTK2_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8"` - echo "$as_me:$LINENO: result: $MOZGTK2_LIBS" >&5 -echo "${ECHO_T}$MOZGTK2_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZGTK2_LIBS" >&5 +$as_echo "$MOZGTK2_LIBS" >&6; } else MOZGTK2_CFLAGS="" MOZGTK2_LIBS="" @@ -18675,12 +15542,10 @@ echo "${ECHO_T}$MOZGTK2_LIBS" >&6 fi if test $succeeded = yes; then - { echo "$as_me:$LINENO: OK - can build mozilla" >&5 -echo "$as_me: OK - can build mozilla" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: OK - can build mozilla" >&5 +$as_echo "$as_me: OK - can build mozilla" >&6;} else - { { echo "$as_me:$LINENO: error: Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" >&5 -echo "$as_me: error: Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" "$LINENO" 5 fi else @@ -18690,10 +15555,10 @@ echo "$as_me: error: Prerequisites to build mozilla not met. Either use the prec if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -18705,29 +15570,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -18738,25 +15604,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for libIDL-2.0 >= 0.6.3" >&5 -echo $ECHO_N "checking for libIDL-2.0 >= 0.6.3... $ECHO_C" >&6 + { $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; } if $PKG_CONFIG --exists "libIDL-2.0 >= 0.6.3" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 -echo $ECHO_N "checking MOZLIBREQ_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZLIBREQ_CFLAGS" >&5 +$as_echo_n "checking MOZLIBREQ_CFLAGS... " >&6; } MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.6.3"` - echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 -echo "${ECHO_T}$MOZLIBREQ_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZLIBREQ_CFLAGS" >&5 +$as_echo "$MOZLIBREQ_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 -echo $ECHO_N "checking MOZLIBREQ_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZLIBREQ_LIBS" >&5 +$as_echo_n "checking MOZLIBREQ_LIBS... " >&6; } MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libIDL-2.0 >= 0.6.3"` - echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 -echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZLIBREQ_LIBS" >&5 +$as_echo "$MOZLIBREQ_LIBS" >&6; } else MOZLIBREQ_CFLAGS="" MOZLIBREQ_LIBS="" @@ -18781,9 +15647,7 @@ echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6 fi if test -z "$MOZIDL"; then - { { echo "$as_me:$LINENO: error: libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit." >&5 -echo "$as_me: error: libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit." "$LINENO" 5 fi fi else @@ -18795,10 +15659,10 @@ echo "$as_me: error: libIDL 0.6.3 or newer is needed to build mozilla with mac t if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -18810,29 +15674,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -18843,25 +15708,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gtk+-2.0" >&5 -echo $ECHO_N "checking for gtk+-2.0... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk+-2.0" >&5 +$as_echo_n "checking for gtk+-2.0... " >&6; } if $PKG_CONFIG --exists "gtk+-2.0" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 -echo $ECHO_N "checking MOZLIBREQ_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZLIBREQ_CFLAGS" >&5 +$as_echo_n "checking MOZLIBREQ_CFLAGS... " >&6; } MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0"` - echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 -echo "${ECHO_T}$MOZLIBREQ_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZLIBREQ_CFLAGS" >&5 +$as_echo "$MOZLIBREQ_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 -echo $ECHO_N "checking MOZLIBREQ_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZLIBREQ_LIBS" >&5 +$as_echo_n "checking MOZLIBREQ_LIBS... " >&6; } MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "gtk+-2.0"` - echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 -echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZLIBREQ_LIBS" >&5 +$as_echo "$MOZLIBREQ_LIBS" >&6; } else MOZLIBREQ_CFLAGS="" MOZLIBREQ_LIBS="" @@ -18886,9 +15751,7 @@ echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6 fi if test -z "$MOZGTK"; then - { { echo "$as_me:$LINENO: error: GTK2 is needed to build mozilla." >&5 -echo "$as_me: error: GTK2 is needed to build mozilla." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "GTK2 is needed to build mozilla." "$LINENO" 5 fi succeeded=no @@ -18896,10 +15759,10 @@ echo "$as_me: error: GTK2 is needed to build mozilla." >&2;} if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -18911,29 +15774,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -18944,25 +15808,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for libIDL-2.0 >= 0.8.0" >&5 -echo $ECHO_N "checking for libIDL-2.0 >= 0.8.0... $ECHO_C" >&6 + { $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; } if $PKG_CONFIG --exists "libIDL-2.0 >= 0.8.0" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 -echo $ECHO_N "checking MOZLIBREQ_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZLIBREQ_CFLAGS" >&5 +$as_echo_n "checking MOZLIBREQ_CFLAGS... " >&6; } MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.8.0"` - echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 -echo "${ECHO_T}$MOZLIBREQ_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZLIBREQ_CFLAGS" >&5 +$as_echo "$MOZLIBREQ_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 -echo $ECHO_N "checking MOZLIBREQ_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZLIBREQ_LIBS" >&5 +$as_echo_n "checking MOZLIBREQ_LIBS... " >&6; } MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libIDL-2.0 >= 0.8.0"` - echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 -echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZLIBREQ_LIBS" >&5 +$as_echo "$MOZLIBREQ_LIBS" >&6; } else MOZLIBREQ_CFLAGS="" MOZLIBREQ_LIBS="" @@ -18987,9 +15851,7 @@ echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6 fi if test -z "$MOZIDL"; then - { { echo "$as_me:$LINENO: error: libIDL >= 0.8.0 is needed when using GTK2 to build mozilla." >&5 -echo "$as_me: error: libIDL >= 0.8.0 is needed when using GTK2 to build mozilla." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libIDL >= 0.8.0 is needed when using GTK2 to build mozilla." "$LINENO" 5 fi else @@ -18998,10 +15860,10 @@ echo "$as_me: error: libIDL >= 0.8.0 is needed when using GTK2 to build mozilla. if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -19013,29 +15875,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -19046,25 +15909,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gtk+ >= 1.2.3" >&5 -echo $ECHO_N "checking for gtk+ >= 1.2.3... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk+ >= 1.2.3" >&5 +$as_echo_n "checking for gtk+ >= 1.2.3... " >&6; } if $PKG_CONFIG --exists "gtk+ >= 1.2.3" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 -echo $ECHO_N "checking MOZLIBREQ_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZLIBREQ_CFLAGS" >&5 +$as_echo_n "checking MOZLIBREQ_CFLAGS... " >&6; } MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "gtk+ >= 1.2.3"` - echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 -echo "${ECHO_T}$MOZLIBREQ_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZLIBREQ_CFLAGS" >&5 +$as_echo "$MOZLIBREQ_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 -echo $ECHO_N "checking MOZLIBREQ_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZLIBREQ_LIBS" >&5 +$as_echo_n "checking MOZLIBREQ_LIBS... " >&6; } MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "gtk+ >= 1.2.3"` - echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 -echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZLIBREQ_LIBS" >&5 +$as_echo "$MOZLIBREQ_LIBS" >&6; } else MOZLIBREQ_CFLAGS="" MOZLIBREQ_LIBS="" @@ -19089,9 +15952,7 @@ echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6 fi if test -z "$MOZGTK"; then - { { echo "$as_me:$LINENO: error: gtk 1.2 is needed when not using GTK2 to build mozilla." >&5 -echo "$as_me: error: gtk 1.2 is needed when not using GTK2 to build mozilla." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "gtk 1.2 is needed when not using GTK2 to build mozilla." "$LINENO" 5 fi succeeded=no @@ -19099,10 +15960,10 @@ echo "$as_me: error: gtk 1.2 is needed when not using GTK2 to build mozilla." >& if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -19114,29 +15975,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -19147,25 +16009,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for libidl >= 0.6.3 libidl <= 0.6.8" >&5 -echo $ECHO_N "checking for libidl >= 0.6.3 libidl <= 0.6.8... $ECHO_C" >&6 + { $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; } if $PKG_CONFIG --exists "libidl >= 0.6.3 libidl <= 0.6.8" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 -echo $ECHO_N "checking MOZLIBREQ_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZLIBREQ_CFLAGS" >&5 +$as_echo_n "checking MOZLIBREQ_CFLAGS... " >&6; } MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libidl >= 0.6.3 libidl <= 0.6.8"` - echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 -echo "${ECHO_T}$MOZLIBREQ_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZLIBREQ_CFLAGS" >&5 +$as_echo "$MOZLIBREQ_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 -echo $ECHO_N "checking MOZLIBREQ_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZLIBREQ_LIBS" >&5 +$as_echo_n "checking MOZLIBREQ_LIBS... " >&6; } MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libidl >= 0.6.3 libidl <= 0.6.8"` - echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 -echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZLIBREQ_LIBS" >&5 +$as_echo "$MOZLIBREQ_LIBS" >&6; } else MOZLIBREQ_CFLAGS="" MOZLIBREQ_LIBS="" @@ -19190,9 +16052,7 @@ echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6 fi if test -z "$MOZIDL"; then - { { echo "$as_me:$LINENO: error: libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla." >&5 -echo "$as_me: error: libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla." "$LINENO" 5 fi fi fi @@ -19212,225 +16072,61 @@ fi -echo "$as_me:$LINENO: checking which sane header to use" >&5 -echo $ECHO_N "checking which sane header to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which sane header to use" >&5 +$as_echo_n "checking which sane header to use... " >&6; } if test -n "$with_system_sane_header" -o -n "$with_system_headers" && \ test "$with_system_sane_header" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_SANE_HEADER=YES - if test "${ac_cv_header_sane_sane_h+set}" = set; then - echo "$as_me:$LINENO: checking for sane/sane.h" >&5 -echo $ECHO_N "checking for sane/sane.h... $ECHO_C" >&6 -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 + 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 : -# 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 - { { 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; }; } + as_fn_error $? "sane not found. install sane" "$LINENO" 5 fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_SANE_HEADER=NO BUILD_TYPE="$BUILD_TYPE SANE" fi -echo "$as_me:$LINENO: checking which icu to use" >&5 -echo $ECHO_N "checking which icu to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which icu to use" >&5 +$as_echo_n "checking which icu to use... " >&6; } if test -n "$with_system_icu" -o -n "$with_system_libs" && \ test "$with_system_icu" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_ICU=YES - ac_ext=cc + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - echo "$as_me:$LINENO: checking for unicode/rbbi.h" >&5 -echo $ECHO_N "checking for unicode/rbbi.h... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $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 /* end confdefs.h. */ unicode/rbbi.h _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - 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 +if ac_fn_cxx_try_cpp "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked." >&5 +$as_echo "checked." >&6; } else - 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; }; } + as_fn_error $? "icu headers not found." "$LINENO" 5 fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # Extract the first word of "genbrk", so it can be a program name with args. set dummy genbrk; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_SYSTEM_GENBRK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $SYSTEM_GENBRK in [\\/]* | ?:[\\/]*) @@ -19443,39 +16139,38 @@ 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SYSTEM_GENBRK="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi SYSTEM_GENBRK=$ac_cv_path_SYSTEM_GENBRK - if test -n "$SYSTEM_GENBRK"; then - echo "$as_me:$LINENO: result: $SYSTEM_GENBRK" >&5 -echo "${ECHO_T}$SYSTEM_GENBRK" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSTEM_GENBRK" >&5 +$as_echo "$SYSTEM_GENBRK" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$SYSTEM_GENBRK"; then - { { echo "$as_me:$LINENO: error: \\"genbrk\\" not found in \$PATH, install the icu development tool \\"genbrk\"\" >&5 -echo "$as_me: error: \\"genbrk\\" not found in \$PATH, install the icu development tool \\"genbrk\"\" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "\\"genbrk\\" not found in \$PATH, install the icu development tool \\"genbrk\"\" "$LINENO" 5 fi # Extract the first word of "genccode", so it can be a program name with args. set dummy genccode; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_SYSTEM_GENCCODE+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $SYSTEM_GENCCODE in [\\/]* | ?:[\\/]*) @@ -19488,39 +16183,38 @@ 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SYSTEM_GENCCODE="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi SYSTEM_GENCCODE=$ac_cv_path_SYSTEM_GENCCODE - if test -n "$SYSTEM_GENCCODE"; then - echo "$as_me:$LINENO: result: $SYSTEM_GENCCODE" >&5 -echo "${ECHO_T}$SYSTEM_GENCCODE" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSTEM_GENCCODE" >&5 +$as_echo "$SYSTEM_GENCCODE" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$SYSTEM_GENCCODE"; then - { { echo "$as_me:$LINENO: error: \\"genccode\\" not found in \$PATH, install the icu development tool \\"genccode\"\" >&5 -echo "$as_me: error: \\"genccode\\" not found in \$PATH, install the icu development tool \\"genccode\"\" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "\\"genccode\\" not found in \$PATH, install the icu development tool \\"genccode\"\" "$LINENO" 5 fi # Extract the first word of "gencmn", so it can be a program name with args. set dummy gencmn; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_SYSTEM_GENCMN+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $SYSTEM_GENCMN in [\\/]* | ?:[\\/]*) @@ -19533,47 +16227,41 @@ 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SYSTEM_GENCMN="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi SYSTEM_GENCMN=$ac_cv_path_SYSTEM_GENCMN - if test -n "$SYSTEM_GENCMN"; then - echo "$as_me:$LINENO: result: $SYSTEM_GENCMN" >&5 -echo "${ECHO_T}$SYSTEM_GENCMN" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSTEM_GENCMN" >&5 +$as_echo "$SYSTEM_GENCMN" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$SYSTEM_GENCMN"; then - { { echo "$as_me:$LINENO: error: \\"gencmn\\" not found in \$PATH, install the icu development tool \\"gencmn\"\" >&5 -echo "$as_me: error: \\"gencmn\\" not found in \$PATH, install the icu development tool \\"gencmn\"\" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "\\"gencmn\\" not found in \$PATH, install the icu development tool \\"gencmn\"\" "$LINENO" 5 fi - echo "$as_me:$LINENO: checking ICU version" >&5 -echo $ECHO_N "checking ICU version... $ECHO_C" >&6 - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $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 /* end confdefs.h. */ #include @@ -19586,31 +16274,16 @@ int main(int argc, char **argv) { } _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - 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 +if ac_fn_cxx_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 +$as_echo "OK" >&6; } else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -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; }; } + as_fn_error $? "not suitable, only >= 4.0 supported currently" "$LINENO" 5 fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -19618,8 +16291,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_ICU=NO BUILD_TYPE="$BUILD_TYPE ICU" fi @@ -19629,18 +16302,18 @@ fi -echo "$as_me:$LINENO: checking whether to enable graphite support" >&5 -echo $ECHO_N "checking whether to enable graphite support... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable graphite support" >&5 +$as_echo_n "checking whether to enable graphite support... " >&6; } if test "$_os" = "WINNT" -o "$_os" = "Linux" && test "z$enable_graphite" = "z" -o "$enable_graphite" != "no" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ENABLE_GRAPHITE="TRUE" - echo "$as_me:$LINENO: checking which graphite to use" >&5 -echo $ECHO_N "checking which graphite to use... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which graphite to use" >&5 +$as_echo_n "checking which graphite to use... " >&6; } if test -n "$with_system_graphite" -o -n "$with_system_libs" && \ test "$with_system_graphite" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_GRAPHITE=YES succeeded=no @@ -19648,10 +16321,10 @@ echo "${ECHO_T}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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -19663,29 +16336,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -19696,25 +16370,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for silgraphite " >&5 -echo $ECHO_N "checking for silgraphite ... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for silgraphite " >&5 +$as_echo_n "checking for silgraphite ... " >&6; } if $PKG_CONFIG --exists "silgraphite " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking GRAPHITE_CFLAGS" >&5 -echo $ECHO_N "checking GRAPHITE_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GRAPHITE_CFLAGS" >&5 +$as_echo_n "checking GRAPHITE_CFLAGS... " >&6; } GRAPHITE_CFLAGS=`$PKG_CONFIG --cflags "silgraphite "` - echo "$as_me:$LINENO: result: $GRAPHITE_CFLAGS" >&5 -echo "${ECHO_T}$GRAPHITE_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GRAPHITE_CFLAGS" >&5 +$as_echo "$GRAPHITE_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking GRAPHITE_LIBS" >&5 -echo $ECHO_N "checking GRAPHITE_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GRAPHITE_LIBS" >&5 +$as_echo_n "checking GRAPHITE_LIBS... " >&6; } GRAPHITE_LIBS=`$PKG_CONFIG --libs "silgraphite "` - echo "$as_me:$LINENO: result: $GRAPHITE_LIBS" >&5 -echo "${ECHO_T}$GRAPHITE_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GRAPHITE_LIBS" >&5 +$as_echo "$GRAPHITE_LIBS" >&6; } else GRAPHITE_CFLAGS="" GRAPHITE_LIBS="" @@ -19735,20 +16409,18 @@ echo "${ECHO_T}$GRAPHITE_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements (silgraphite ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (silgraphite ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + 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 fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_GRAPHITE=NO BUILD_TYPE="$BUILD_TYPE GRAPHITE" fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -19758,15 +16430,13 @@ fi if test "$_os" = "Darwin"; then if test "x$with_x" = "xyes"; then - { { echo "$as_me:$LINENO: error: X11 build is no longer supported on MacOSX, please use the native aqua build" >&5 -echo "$as_me: error: X11 build is no longer supported on MacOSX, please use the native aqua build" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "X11 build is no longer supported on MacOSX, please use the native aqua build" "$LINENO" 5 else - echo "$as_me:$LINENO: checking for /System/Library/Frameworks/AppKit.framework" >&5 -echo $ECHO_N "checking for /System/Library/Frameworks/AppKit.framework... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /System/Library/Frameworks/AppKit.framework" >&5 +$as_echo_n "checking for /System/Library/Frameworks/AppKit.framework... " >&6; } if test -d "/System/Library/Frameworks/AppKit.framework/"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } x_includes="no_x_includes" x_libraries="no_x_libraries" enable_gtk=no @@ -19774,9 +16444,7 @@ echo "${ECHO_T}yes" >&6 ENABLE_CUPS="" else - { { echo "$as_me:$LINENO: error: No AppKit.framewrok found" >&5 -echo "$as_me: error: No AppKit.framewrok found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "No AppKit.framewrok found" "$LINENO" 5 fi fi fi @@ -19788,44 +16456,47 @@ elif test "$_os" = "OS2" ; then echo "Do Nothing for _os = OS2. Don't check for X11." : elif test "$_os" != "WINNT" ; then - echo "$as_me:$LINENO: checking for X" >&5 -echo $ECHO_N "checking for X... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 +$as_echo_n "checking for X... " >&6; } -# Check whether --with-x or --without-x was given. -if test "${with_x+set}" = set; then - withval="$with_x" +# Check whether --with-x was given. +if test "${with_x+set}" = set; then : + withval=$with_x; +fi -fi; # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else - if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then - # Both variables are already set. - have_x=yes - else - if test "${ac_cv_have_x+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + case $x_includes,$x_libraries in #( + *\'*) as_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 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no -rm -fr conftest.dir +rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir - # Make sure to not put "make" in the Imakefile rules, since we grep it out. cat >Imakefile <<'_ACEOF' -acfindx: - @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' -_ACEOF - if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` +incroot: + @echo incroot='${INCROOT}' +usrlibdir: + @echo usrlibdir='${USRLIBDIR}' +libdir: + @echo libdir='${LIBDIR}' +_ACEOF + if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. + for ac_var in incroot usrlibdir libdir; do + eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" + done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. - for ac_extension in a so sl; do - if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && - test -f $ac_im_libdir/libX11.$ac_extension; then + for ac_extension in a so sl dylib la dll; do + if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && + test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done @@ -19833,37 +16504,41 @@ _ACEOF # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in - /usr/include) ;; + /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in - /usr/lib | /lib) ;; + /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. - rm -fr conftest.dir + rm -f -r conftest.dir fi # Standard set of common directories for X headers. # 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 @@ -19883,48 +16558,24 @@ ac_x_header_dirs=' /usr/openwin/share/include' if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Intrinsic.h. + # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - 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 +if ac_fn_c_try_cpp "$LINENO"; 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/Intrinsic.h"; then + if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then @@ -19932,102 +16583,76 @@ if test "$ac_x_libraries" = no; then # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS - LIBS="-lXt $LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + LIBS="-lX11 $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include int main () { -XtMalloc (0) +XrmInitialize () ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -LIBS=$ac_save_LIBS -for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` + LIBS=$ac_save_LIBS +for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! - for ac_extension in a so sl; do - if test -r $ac_dir/libXt.$ac_extension; then + for ac_extension in a so sl dylib la dll; do + if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no -if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then - # Didn't find X anywhere. Cache the known absence of X. - ac_cv_have_x="have_x=no" -else - # Record where we found X for the cache. - ac_cv_have_x="have_x=yes \ - ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" -fi +case $ac_x_includes,$ac_x_libraries in #( + no,* | *,no | *\'*) + # Didn't find X, or a directory has "'" in its name. + ac_cv_have_x="have_x=no";; #( + *) + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes\ + ac_x_includes='$ac_x_includes'\ + ac_x_libraries='$ac_x_libraries'" +esac fi - - fi +;; #( + *) have_x=yes;; + esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then - echo "$as_me:$LINENO: result: $have_x" >&5 -echo "${ECHO_T}$have_x" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 +$as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. - ac_cv_have_x="have_x=yes \ - ac_x_includes=$x_includes ac_x_libraries=$x_libraries" - echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 -echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 + ac_cv_have_x="have_x=yes\ + ac_x_includes='$x_includes'\ + ac_x_libraries='$x_libraries'" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 +$as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. -cat >>confdefs.h <<\_ACEOF -#define X_DISPLAY_MISSING 1 -_ACEOF +$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else @@ -20040,16 +16665,12 @@ else X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . - case `(uname -sr) 2>/dev/null` in - "SunOS 5"*) - echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 -echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6 - ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $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 /* end confdefs.h. */ int @@ -20060,48 +16681,13 @@ 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_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 +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" else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_R_nospace=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test $ac_R_nospace = yes; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - X_LIBS="$X_LIBS -R$x_libraries" - else - LIBS="$ac_xsave_LIBS -R $x_libraries" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -20112,48 +16698,21 @@ 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_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 +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" else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_R_space=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 +$as_echo "neither works" >&6; } fi -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 +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +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 fi # Check for system-dependent libraries X programs must link with. @@ -20167,432 +16726,206 @@ echo "${ECHO_T}neither works" >&6 # 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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char XOpenDisplay (); int main () { -XOpenDisplay (); +return XOpenDisplay (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_link "$LINENO"; then : -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 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dnet_ntoa (); int main () { -dnet_ntoa (); +return dnet_ntoa (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_dnet_ntoa=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dnet_dnet_ntoa=no + ac_cv_lib_dnet_dnet_ntoa=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_dnet_dnet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6 -if test $ac_cv_lib_dnet_dnet_ntoa = yes; then +{ $as_echo "$as_me:${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 : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then - echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 -echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6 -if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* 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 +/* 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. */ -char dnet_ntoa (); -int -main () -{ -dnet_ntoa (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dnet_stub_dnet_ntoa=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_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 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, - # to get the SysV transport functions. - # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) - # needs -lnsl. - # The nsl library prevents programs from opening the X display - # on Irix 5.2, according to T.E. Dickey. - # The functions gethostbyname, getservbyname, and inet_addr are - # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. - echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 -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 - +char dnet_ntoa (); int main () { -return f != gethostbyname; +return dnet_ntoa (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dnet_stub_dnet_ntoa=yes else - 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 +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 : + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" +fi -ac_cv_func_gethostbyname=no + fi fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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, + # to get the SysV transport functions. + # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) + # needs -lnsl. + # The nsl library prevents programs from opening the X display + # 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 : + 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 - 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 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -gethostbyname (); +return gethostbyname (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_nsl_gethostbyname=no + ac_cv_lib_nsl_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 -if test $ac_cv_lib_nsl_gethostbyname = yes; then +{ $as_echo "$as_me:${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 : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then - echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 -echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6 -if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -gethostbyname (); +return gethostbyname (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsd_gethostbyname=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_bsd_gethostbyname=no + ac_cv_lib_bsd_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_bsd_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6 -if test $ac_cv_lib_bsd_gethostbyname = yes; then +{ $as_echo "$as_me:${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 : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi @@ -20606,489 +16939,147 @@ fi # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. - echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6 -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_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" +if test "x$ac_cv_func_connect" = x""yes; then : -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 - 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 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char connect (); int main () { -connect (); +return connect (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_connect=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_socket_connect=no + ac_cv_lib_socket_connect=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_socket_connect" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 -if test $ac_cv_lib_socket_connect = yes; then +{ $as_echo "$as_me:${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 : X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. - echo "$as_me:$LINENO: checking for remove" >&5 -echo $ECHO_N "checking for remove... $ECHO_C" >&6 -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_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" +if test "x$ac_cv_func_remove" = x""yes; then : -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 - 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 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char remove (); int main () { -remove (); +return remove (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_posix_remove=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_posix_remove=no + ac_cv_lib_posix_remove=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_posix_remove" >&5 -echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6 -if test $ac_cv_lib_posix_remove = yes; then +{ $as_echo "$as_me:${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 : X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - echo "$as_me:$LINENO: checking for shmat" >&5 -echo $ECHO_N "checking for shmat... $ECHO_C" >&6 -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 + ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" +if test "x$ac_cv_func_shmat" = x""yes; then : -#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 - 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 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shmat (); int main () { -shmat (); +return shmat (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ipc_shmat=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_ipc_shmat=no + ac_cv_lib_ipc_shmat=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_ipc_shmat" >&5 -echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6 -if test $ac_cv_lib_ipc_shmat = yes; then +{ $as_echo "$as_me:${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 : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi @@ -21104,71 +17095,43 @@ fi # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry - echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 -echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6 -if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char IceConnectionNumber (); int main () { -IceConnectionNumber (); +return IceConnectionNumber (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ICE_IceConnectionNumber=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_ICE_IceConnectionNumber=no + ac_cv_lib_ICE_IceConnectionNumber=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_ICE_IceConnectionNumber" >&5 -echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6 -if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then +{ $as_echo "$as_me:${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 : X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi @@ -21185,154 +17148,92 @@ fi x_libraries="default_x_libraries" fi if test -z "$x_libraries"; then - { { echo "$as_me:$LINENO: error: No X libraries found" >&5 -echo "$as_me: error: No X libraries found" >&2;} - { (exit 1); exit 1; }; } # Exit + as_fn_error $? "No X libraries found" "$LINENO" 5 # Exit fi if test -z "$x_includes"; then - { { echo "$as_me:$LINENO: error: No X includes found" >&5 -echo "$as_me: error: No X includes found" >&2;} - { (exit 1); exit 1; }; } # Exit + as_fn_error $? "No X includes found" "$LINENO" 5 # Exit fi CFLAGS=$X_CFLAGS LDFLAGS="$X_LDFLAGS $X_LIBS" - echo "$as_me:$LINENO: checking for XOpenDisplay in -lX11" >&5 -echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6 -if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lX11 $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char XOpenDisplay (); int main () { -XOpenDisplay (); +return XOpenDisplay (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_X11_XOpenDisplay=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_X11_XOpenDisplay=no + ac_cv_lib_X11_XOpenDisplay=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_X11_XOpenDisplay" >&5 -echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6 -if test $ac_cv_lib_X11_XOpenDisplay = yes; then +{ $as_echo "$as_me:${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 : x_libs="-lX11 $X_EXTRA_LIBS" else - { { echo "$as_me:$LINENO: error: X Development libraries not found" >&5 -echo "$as_me: error: X Development libraries not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "X Development libraries not found" "$LINENO" 5 fi - 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 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXau $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char XauDisposeAuth (); int main () { -XauDisposeAuth (); +return XauDisposeAuth (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xau_XauDisposeAuth=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_Xau_XauDisposeAuth=no + ac_cv_lib_Xau_XauDisposeAuth=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_Xau_XauDisposeAuth" >&5 -echo "${ECHO_T}$ac_cv_lib_Xau_XauDisposeAuth" >&6 -if test $ac_cv_lib_Xau_XauDisposeAuth = yes; then +{ $as_echo "$as_me:${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 : XAU_LIBS="-lXau" fi @@ -21364,205 +17265,76 @@ fi if test "$_os" != "WINNT" -a "$_os" != "OS2" -a "$_os" != "Darwin"; then - echo "$as_me:$LINENO: checking whether to use Xaw" >&5 -echo $ECHO_N "checking whether to use Xaw... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use Xaw" >&5 +$as_echo_n "checking whether to use Xaw... " >&6; } if test "$enable_Xaw" = "no"; then DISABLE_XAW=TRUE - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - -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 + { $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 : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_X11_COMPOSITE_H 1 _ACEOF else - { { 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; }; } + as_fn_error $? "Xt include headers not found" "$LINENO" 5 fi done else - 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 + { $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 : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_X11_XAW_LABEL_H 1 _ACEOF else - { { 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; }; } + as_fn_error $? "Xaw include headers not found" "$LINENO" 5 fi done - -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 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXaw $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { -main (); +return main (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xaw_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_Xaw_main=no + ac_cv_lib_Xaw_main=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_Xaw_main" >&5 -echo "${ECHO_T}$ac_cv_lib_Xaw_main" >&6 -if test $ac_cv_lib_Xaw_main = yes; then +{ $as_echo "$as_me:${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 : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXAW 1 _ACEOF @@ -21570,9 +17342,7 @@ _ACEOF LIBS="-lXaw $LIBS" else - { { echo "$as_me:$LINENO: error: Xaw library not found or functional" >&5 -echo "$as_me: error: Xaw library not found or functional" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Xaw library not found or functional" "$LINENO" 5 fi fi @@ -21582,166 +17352,23 @@ fi if test "$ENABLE_FONTCONFIG" = "TRUE" ; then - if test "${ac_cv_header_fontconfig_fontconfig_h+set}" = set; then - echo "$as_me:$LINENO: checking for fontconfig/fontconfig.h" >&5 -echo $ECHO_N "checking for fontconfig/fontconfig.h... $ECHO_C" >&6 -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 + 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 : -fi -if test $ac_cv_header_fontconfig_fontconfig_h = yes; then - : else - { { echo "$as_me:$LINENO: error: fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?" >&5 -echo "$as_me: error: fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?" "$LINENO" 5 fi - echo "$as_me:$LINENO: checking whether fontconfig is >= 2.2.0" >&5 -echo $ECHO_N "checking whether fontconfig is >= 2.2.0... $ECHO_C" >&6 - 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; }; } + { $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 ; } else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -21752,271 +17379,89 @@ int main(int argc, char **argv) { } _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - 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 +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -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; }; } + as_fn_error $? "no, fontconfig >= 2.2.0 needed" "$LINENO" 5 fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi -echo "$as_me:$LINENO: checking whether to link to Xrender" >&5 -echo $ECHO_N "checking whether to link to Xrender... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to link to Xrender" >&5 +$as_echo_n "checking whether to link to Xrender... " >&6; } if test -n "$enable_xrender_link" -a "$enable_xrender_link" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } XRENDER_LINK=YES with_system_xrender_headers=yes else - echo "$as_me:$LINENO: result: no, dynamically open it" >&5 -echo "${ECHO_T}no, dynamically open it" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, dynamically open it" >&5 +$as_echo "no, dynamically open it" >&6; } XRENDER_LINK=NO fi -echo "$as_me:$LINENO: checking which Xrender headers to use" >&5 -echo $ECHO_N "checking which Xrender headers to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which Xrender headers to use" >&5 +$as_echo_n "checking which Xrender headers to use... " >&6; } if test -n "$with_system_xrender_headers" -o -n "$with_system_headers" && \ test "$with_system_xrender_headers" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_XRENDER_HEADERS=YES - if test "${ac_cv_header_X11_extensions_Xrender_h+set}" = set; then - echo "$as_me:$LINENO: checking for X11/extensions/Xrender.h" >&5 -echo $ECHO_N "checking for X11/extensions/Xrender.h... $ECHO_C" >&6 -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 + 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 : -fi -if test $ac_cv_header_X11_extensions_Xrender_h = yes; then - : else - { { 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; }; } + as_fn_error $? "Xrender not found. install X" "$LINENO" 5 fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_XRENDER_HEADERS=NO BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS" fi if test "$XRENDER_LINK" = "YES"; then - -echo "$as_me:$LINENO: checking for XRenderQueryVersion in -lXrender" >&5 -echo $ECHO_N "checking for XRenderQueryVersion in -lXrender... $ECHO_C" >&6 -if test "${ac_cv_lib_Xrender_XRenderQueryVersion+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXrender $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char XRenderQueryVersion (); int main () { -XRenderQueryVersion (); +return XRenderQueryVersion (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xrender_XRenderQueryVersion=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_Xrender_XRenderQueryVersion=no + ac_cv_lib_Xrender_XRenderQueryVersion=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_Xrender_XRenderQueryVersion" >&5 -echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderQueryVersion" >&6 -if test $ac_cv_lib_Xrender_XRenderQueryVersion = yes; then +{ $as_echo "$as_me:${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 : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXRENDER 1 _ACEOF @@ -22024,22 +17469,20 @@ _ACEOF LIBS="-lXrender $LIBS" else - { { echo "$as_me:$LINENO: error: libXrender not found or functional" >&5 -echo "$as_me: error: libXrender not found or functional" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libXrender not found or functional" "$LINENO" 5 fi fi -echo "$as_me:$LINENO: checking whether to enable RandR support" >&5 -echo $ECHO_N "checking whether to enable RandR support... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable RandR support" >&5 +$as_echo_n "checking whether to enable RandR support... " >&6; } if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then XRANDR_DLOPEN="TRUE" - echo "$as_me:$LINENO: result: resorting to dlopen libXrandr at runtime" >&5 -echo "${ECHO_T}resorting to dlopen libXrandr at runtime" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: resorting to dlopen libXrandr at runtime" >&5 +$as_echo "resorting to dlopen libXrandr at runtime" >&6; } else XRANDR_DLOPEN="FALSE" @@ -22048,10 +17491,10 @@ echo "${ECHO_T}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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -22063,29 +17506,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -22096,25 +17540,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for xrandr >= 1.2" >&5 -echo $ECHO_N "checking for xrandr >= 1.2... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xrandr >= 1.2" >&5 +$as_echo_n "checking for xrandr >= 1.2... " >&6; } if $PKG_CONFIG --exists "xrandr >= 1.2" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking XRANDR_CFLAGS" >&5 -echo $ECHO_N "checking XRANDR_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking XRANDR_CFLAGS" >&5 +$as_echo_n "checking XRANDR_CFLAGS... " >&6; } XRANDR_CFLAGS=`$PKG_CONFIG --cflags "xrandr >= 1.2"` - echo "$as_me:$LINENO: result: $XRANDR_CFLAGS" >&5 -echo "${ECHO_T}$XRANDR_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XRANDR_CFLAGS" >&5 +$as_echo "$XRANDR_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking XRANDR_LIBS" >&5 -echo $ECHO_N "checking XRANDR_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking XRANDR_LIBS" >&5 +$as_echo_n "checking XRANDR_LIBS... " >&6; } XRANDR_LIBS=`$PKG_CONFIG --libs "xrandr >= 1.2"` - echo "$as_me:$LINENO: result: $XRANDR_LIBS" >&5 -echo "${ECHO_T}$XRANDR_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XRANDR_LIBS" >&5 +$as_echo "$XRANDR_LIBS" >&6; } else XRANDR_CFLAGS="" XRANDR_LIBS="" @@ -22139,219 +17583,52 @@ echo "${ECHO_T}$XRANDR_LIBS" >&6 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 + 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 : -# 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 - 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/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 - { { 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; }; } + as_fn_error $? "X11/extensions/Xrandr.h could not be found. X11 dev missing?" "$LINENO" 5 fi XRANDR_CFLAGS=" " - -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 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXrandr $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char XRRQueryExtension (); int main () { -XRRQueryExtension (); +return XRRQueryExtension (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xrandr_XRRQueryExtension=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_Xrandr_XRRQueryExtension=no + ac_cv_lib_Xrandr_XRRQueryExtension=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_Xrandr_XRRQueryExtension" >&5 -echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRQueryExtension" >&6 -if test $ac_cv_lib_Xrandr_XRRQueryExtension = yes; then +{ $as_echo "$as_me:${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 : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXRANDR 1 _ACEOF @@ -22359,53 +17636,51 @@ _ACEOF LIBS="-lXrandr $LIBS" else - { { echo "$as_me:$LINENO: error: libXrandr not found or functional" >&5 -echo "$as_me: error: libXrandr not found or functional" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libXrandr not found or functional" "$LINENO" 5 fi XRANDR_LIBS="-lXrandr " ENABLE_RANDR="TRUE" - echo "$as_me:$LINENO: result: enabling RandR support" >&5 -echo "${ECHO_T}enabling RandR support" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling RandR support" >&5 +$as_echo "enabling RandR support" >&6; } fi fi else ENABLE_RANDR="" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to use neon" >&5 -echo $ECHO_N "checking whether to use neon... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use neon" >&5 +$as_echo_n "checking whether to use neon... " >&6; } if test "$enable_neon" = "no"; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } DISABLE_NEON=TRUE else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -echo "$as_me:$LINENO: checking which neon to use" >&5 -echo $ECHO_N "checking which neon to use... $ECHO_C" >&6 + { $as_echo "$as_me:${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; } if test -n "$with_system_neon" -o -n "$with_system_libs" && \ test "$with_system_neon" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -22417,29 +17692,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -22450,25 +17726,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for neon >= 0.26.0" >&5 -echo $ECHO_N "checking for neon >= 0.26.0... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for neon >= 0.26.0" >&5 +$as_echo_n "checking for neon >= 0.26.0... " >&6; } if $PKG_CONFIG --exists "neon >= 0.26.0" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking NEON_CFLAGS" >&5 -echo $ECHO_N "checking NEON_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking NEON_CFLAGS" >&5 +$as_echo_n "checking NEON_CFLAGS... " >&6; } NEON_CFLAGS=`$PKG_CONFIG --cflags "neon >= 0.26.0"` - echo "$as_me:$LINENO: result: $NEON_CFLAGS" >&5 -echo "${ECHO_T}$NEON_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEON_CFLAGS" >&5 +$as_echo "$NEON_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking NEON_LIBS" >&5 -echo $ECHO_N "checking NEON_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking NEON_LIBS" >&5 +$as_echo_n "checking NEON_LIBS... " >&6; } NEON_LIBS=`$PKG_CONFIG --libs "neon >= 0.26.0"` - echo "$as_me:$LINENO: result: $NEON_LIBS" >&5 -echo "${ECHO_T}$NEON_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEON_LIBS" >&5 +$as_echo "$NEON_LIBS" >&6; } else NEON_CFLAGS="" NEON_LIBS="" @@ -22489,17 +17765,15 @@ echo "${ECHO_T}$NEON_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: you need neon >= 0.26.x for system-neon" >&5 -echo "$as_me: error: you need neon >= 0.26.x for system-neon" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "you need neon >= 0.26.x for system-neon" "$LINENO" 5 fi NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`" NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1" SYSTEM_NEON=YES else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_NEON=NO NEON_LIBS=-lneon NEON_CFLAGS= @@ -22514,12 +17788,12 @@ fi if test "$_os" = "Darwin" && test "$with_system_openssl" != "no"; then with_system_openssl=yes fi -echo "$as_me:$LINENO: checking which libssl to use" >&5 -echo $ECHO_N "checking which libssl to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which libssl to use" >&5 +$as_echo_n "checking which libssl to use... " >&6; } if test -n "$with_system_openssl" -o -n "$with_system_libs" && \ test "$with_system_openssl" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } # Mac OS builds should get out without extra stuff is the Mac porters' # wish. And pkg-config is although Xcode ships a .pc for openssl if test "$_os" = "Darwin"; then @@ -22532,10 +17806,10 @@ echo "${ECHO_T}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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -22547,29 +17821,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -22580,25 +17855,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for openssl " >&5 -echo $ECHO_N "checking for openssl ... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl " >&5 +$as_echo_n "checking for openssl ... " >&6; } if $PKG_CONFIG --exists "openssl " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking OPENSSL_CFLAGS" >&5 -echo $ECHO_N "checking OPENSSL_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking OPENSSL_CFLAGS" >&5 +$as_echo_n "checking OPENSSL_CFLAGS... " >&6; } OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl "` - echo "$as_me:$LINENO: result: $OPENSSL_CFLAGS" >&5 -echo "${ECHO_T}$OPENSSL_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL_CFLAGS" >&5 +$as_echo "$OPENSSL_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking OPENSSL_LIBS" >&5 -echo $ECHO_N "checking OPENSSL_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking OPENSSL_LIBS" >&5 +$as_echo_n "checking OPENSSL_LIBS... " >&6; } OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl "` - echo "$as_me:$LINENO: result: $OPENSSL_LIBS" >&5 -echo "${ECHO_T}$OPENSSL_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL_LIBS" >&5 +$as_echo "$OPENSSL_LIBS" >&6; } else OPENSSL_CFLAGS="" OPENSSL_LIBS="" @@ -22619,16 +17894,14 @@ echo "${ECHO_T}$OPENSSL_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements (openssl ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (openssl ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + 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 fi fi SYSTEM_OPENSSL=YES else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_OPENSSL=NO BUILD_TYPE="$BUILD_TYPE OPENSSL" fi @@ -22636,33 +17909,33 @@ fi -echo "$as_me:$LINENO: checking whether to enable agg" >&5 -echo $ECHO_N "checking whether to enable agg... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable agg" >&5 +$as_echo_n "checking whether to enable agg... " >&6; } if test "$with_agg" = "no"; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ENABLE_AGG=YES - echo "$as_me:$LINENO: checking which AGG to use" >&5 -echo $ECHO_N "checking which AGG to use... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which AGG to use" >&5 +$as_echo_n "checking which AGG to use... " >&6; } if test -n "$with_system_agg" -o -n "$with_system_libs" && \ test "$with_system_agg" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -22674,29 +17947,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -22707,25 +17981,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for libagg >= 2.3" >&5 -echo $ECHO_N "checking for libagg >= 2.3... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libagg >= 2.3" >&5 +$as_echo_n "checking for libagg >= 2.3... " >&6; } if $PKG_CONFIG --exists "libagg >= 2.3" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking AGG_CFLAGS" >&5 -echo $ECHO_N "checking AGG_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking AGG_CFLAGS" >&5 +$as_echo_n "checking AGG_CFLAGS... " >&6; } AGG_CFLAGS=`$PKG_CONFIG --cflags "libagg >= 2.3"` - echo "$as_me:$LINENO: result: $AGG_CFLAGS" >&5 -echo "${ECHO_T}$AGG_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AGG_CFLAGS" >&5 +$as_echo "$AGG_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking AGG_LIBS" >&5 -echo $ECHO_N "checking AGG_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking AGG_LIBS" >&5 +$as_echo_n "checking AGG_LIBS... " >&6; } AGG_LIBS=`$PKG_CONFIG --libs "libagg >= 2.3"` - echo "$as_me:$LINENO: result: $AGG_LIBS" >&5 -echo "${ECHO_T}$AGG_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AGG_LIBS" >&5 +$as_echo "$AGG_LIBS" >&6; } else AGG_CFLAGS="" AGG_LIBS="" @@ -22746,13 +18020,11 @@ echo "${ECHO_T}$AGG_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements (libagg >= 2.3) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (libagg >= 2.3) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + 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 fi - echo "$as_me:$LINENO: checking agg version" >&5 -echo $ECHO_N "checking agg version... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking agg version" >&5 +$as_echo_n "checking agg version... " >&6; } # workaround; if AGG_CFLAGS is empty (broken libagg.pc in 2.3), add /usr/include/agg2 anyway # (/usr/include gets stripped from pkg-config output) if test -z "$AGG_CFLAGS" || test "$AGG_CFLAGS" = " "; then @@ -22764,23 +18036,21 @@ echo $ECHO_N "checking agg version... $ECHO_C" >&6 $PKG_CONFIG --modversion libagg | grep -q 2.4; then # 2.4's libagg.pc.in still contains 2.3 :/ if $EGREP -q "Version 2.4" `echo $AGG_INCDIR`/agg_basics.h; then - echo "$as_me:$LINENO: result: 2.4" >&5 -echo "${ECHO_T}2.4" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.4" >&5 +$as_echo "2.4" >&6; } AGG_VERSION=2400 else - echo "$as_me:$LINENO: result: 2.3" >&5 -echo "${ECHO_T}2.3" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.3" >&5 +$as_echo "2.3" >&6; } AGG_VERSION=2300 fi SYSTEM_AGG=YES else - { { echo "$as_me:$LINENO: error: only agg 2.3 and 2.4 are supported" >&5 -echo "$as_me: error: only agg 2.3 and 2.4 are supported" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "only agg 2.3 and 2.4 are supported" "$LINENO" 5 fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_AGG=NO AGG_VERSION=2300 BUILD_TYPE="$BUILD_TYPE AGG" @@ -22789,12 +18059,12 @@ echo "${ECHO_T}internal" >&6 fi -echo "$as_me:$LINENO: checking which redland library to use" >&5 -echo $ECHO_N "checking which redland library to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which redland library to use" >&5 +$as_echo_n "checking which redland library to use... " >&6; } if test -n "$with_system_redland" -o -n "$with_system_libs" && \ test "$with_system_redland" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_REDLAND=YES succeeded=no @@ -22802,10 +18072,10 @@ echo "${ECHO_T}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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -22817,29 +18087,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -22850,25 +18121,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for redland >= 1.0.8" >&5 -echo $ECHO_N "checking for redland >= 1.0.8... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for redland >= 1.0.8" >&5 +$as_echo_n "checking for redland >= 1.0.8... " >&6; } if $PKG_CONFIG --exists "redland >= 1.0.8" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking REDLAND_CFLAGS" >&5 -echo $ECHO_N "checking REDLAND_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking REDLAND_CFLAGS" >&5 +$as_echo_n "checking REDLAND_CFLAGS... " >&6; } REDLAND_CFLAGS=`$PKG_CONFIG --cflags "redland >= 1.0.8"` - echo "$as_me:$LINENO: result: $REDLAND_CFLAGS" >&5 -echo "${ECHO_T}$REDLAND_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $REDLAND_CFLAGS" >&5 +$as_echo "$REDLAND_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking REDLAND_LIBS" >&5 -echo $ECHO_N "checking REDLAND_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking REDLAND_LIBS" >&5 +$as_echo_n "checking REDLAND_LIBS... " >&6; } REDLAND_LIBS=`$PKG_CONFIG --libs "redland >= 1.0.8"` - echo "$as_me:$LINENO: result: $REDLAND_LIBS" >&5 -echo "${ECHO_T}$REDLAND_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $REDLAND_LIBS" >&5 +$as_echo "$REDLAND_LIBS" >&6; } else REDLAND_CFLAGS="" REDLAND_LIBS="" @@ -22889,14 +18160,12 @@ echo "${ECHO_T}$REDLAND_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements (redland >= 1.0.8) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (redland >= 1.0.8) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + 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 fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } BUILD_TYPE="$BUILD_TYPE REDLAND" SYSTEM_REDLAND=NO fi @@ -22904,14 +18173,14 @@ fi -echo "$as_me:$LINENO: checking which libhunspell to use" >&5 -echo $ECHO_N "checking which libhunspell to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which libhunspell to use" >&5 +$as_echo_n "checking which libhunspell to use... " >&6; } if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \ test "$with_system_hunspell" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_HUNSPELL=YES - ac_ext=cc + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -22923,10 +18192,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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -22938,29 +18207,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -22971,25 +18241,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for hunspell" >&5 -echo $ECHO_N "checking for hunspell... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hunspell" >&5 +$as_echo_n "checking for hunspell... " >&6; } if $PKG_CONFIG --exists "hunspell" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking HUNSPELL_CFLAGS" >&5 -echo $ECHO_N "checking HUNSPELL_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking HUNSPELL_CFLAGS" >&5 +$as_echo_n "checking HUNSPELL_CFLAGS... " >&6; } HUNSPELL_CFLAGS=`$PKG_CONFIG --cflags "hunspell"` - echo "$as_me:$LINENO: result: $HUNSPELL_CFLAGS" >&5 -echo "${ECHO_T}$HUNSPELL_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HUNSPELL_CFLAGS" >&5 +$as_echo "$HUNSPELL_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking HUNSPELL_LIBS" >&5 -echo $ECHO_N "checking HUNSPELL_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking HUNSPELL_LIBS" >&5 +$as_echo_n "checking HUNSPELL_LIBS... " >&6; } HUNSPELL_LIBS=`$PKG_CONFIG --libs "hunspell"` - echo "$as_me:$LINENO: result: $HUNSPELL_LIBS" >&5 -echo "${ECHO_T}$HUNSPELL_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HUNSPELL_LIBS" >&5 +$as_echo "$HUNSPELL_LIBS" >&6; } else HUNSPELL_CFLAGS="" HUNSPELL_LIBS="" @@ -23007,297 +18277,23 @@ echo "${ECHO_T}$HUNSPELL_LIBS" >&6 fi fi - if test $succeeded = yes; then - HUNSPELL_PC="TRUE" - else - HUNSPELL_PC="" - fi - - if test "$HUNSPELL_PC" != "TRUE"; then - if test "${ac_cv_header_hunspell_hxx+set}" = set; then - 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 + if test $succeeded = yes; then + HUNSPELL_PC="TRUE" else - ac_cpp_err= + HUNSPELL_PC="" 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 + 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 : -# 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 -fi -if test $ac_cv_header_hunspell_hunspell_hxx = yes; then + 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 : HUNSPELL_CFLAGS=-I/usr/include/hunspell else - { { echo "$as_me:$LINENO: error: hunspell headers not found." >&5 -echo "$as_me: error: hunspell headers not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "hunspell headers not found." "$LINENO" 5 fi @@ -23305,66 +18301,37 @@ 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 + { $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 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 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { -main (); +return main (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_cxx_try_link "$LINENO"; 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 + ac_cv_lib_hunspell_main=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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 +{ $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 @@ -23372,9 +18339,7 @@ _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; }; } + as_fn_error $? "hunspell library not found." "$LINENO" 5 fi HUNSPELL_LIBS=-lhunspell @@ -23386,8 +18351,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_HUNSPELL=NO BUILD_TYPE="$BUILD_TYPE HUNSPELL" fi @@ -23395,506 +18360,175 @@ fi -echo "$as_me:$LINENO: checking which altlinuxhyph to use" >&5 -echo $ECHO_N "checking which altlinuxhyph to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${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 - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_HYPH=YES - if test "${ac_cv_header_hyphen_h+set}" = set; then - echo "$as_me:$LINENO: checking for hyphen.h" >&5 -echo $ECHO_N "checking for hyphen.h... $ECHO_C" >&6 -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 + 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 : -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; }; } + as_fn_error $? "altlinuxhyph headers not found." "$LINENO" 5 fi - 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 - 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 (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 - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -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 - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + 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 : -ac_cv_member_struct__HyphenDict_cset=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -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 - { { 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; }; } + as_fn_error $? "no. You are sure you have altlinuyhyph headers?" "$LINENO" 5 fi - echo "$as_me:$LINENO: checking for hnj_hyphen_hyphenate2 in -lhyphen" >&5 -echo $ECHO_N "checking for hnj_hyphen_hyphenate2 in -lhyphen... $ECHO_C" >&6 -if test "${ac_cv_lib_hyphen_hnj_hyphen_hyphenate2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhyphen $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char hnj_hyphen_hyphenate2 (); int main () { -hnj_hyphen_hyphenate2 (); +return hnj_hyphen_hyphenate2 (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_hyphen_hnj_hyphen_hyphenate2=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_hyphen_hnj_hyphen_hyphenate2=no + ac_cv_lib_hyphen_hnj_hyphen_hyphenate2=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_hyphen_hnj_hyphen_hyphenate2" >&5 -echo "${ECHO_T}$ac_cv_lib_hyphen_hnj_hyphen_hyphenate2" >&6 -if test $ac_cv_lib_hyphen_hnj_hyphen_hyphenate2 = yes; then +{ $as_echo "$as_me:${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 : HYPHEN_LIB=-lhyphen else - { { echo "$as_me:$LINENO: error: altlinuxhyph library not found or too old." >&5 -echo "$as_me: error: altlinuxhyph library not found or too old." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "altlinuxhyph library not found or too old." "$LINENO" 5 fi if test -z "$HYPHEN_LIB"; then - echo "$as_me:$LINENO: checking for hnj_hyphen_hyphenate2 in -lhyph" >&5 -echo $ECHO_N "checking for hnj_hyphen_hyphenate2 in -lhyph... $ECHO_C" >&6 -if test "${ac_cv_lib_hyph_hnj_hyphen_hyphenate2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhyph $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char hnj_hyphen_hyphenate2 (); int main () { -hnj_hyphen_hyphenate2 (); +return hnj_hyphen_hyphenate2 (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_hyph_hnj_hyphen_hyphenate2=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_hyph_hnj_hyphen_hyphenate2=no + ac_cv_lib_hyph_hnj_hyphen_hyphenate2=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_hyph_hnj_hyphen_hyphenate2" >&5 -echo "${ECHO_T}$ac_cv_lib_hyph_hnj_hyphen_hyphenate2" >&6 -if test $ac_cv_lib_hyph_hnj_hyphen_hyphenate2 = yes; then +{ $as_echo "$as_me:${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 : HYPHEN_LIB=-lhyph else - { { echo "$as_me:$LINENO: error: altlinuxhyph library not found or too old." >&5 -echo "$as_me: error: altlinuxhyph library not found or too old." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "altlinuxhyph library not found or too old." "$LINENO" 5 fi fi if test -z "$HYPHEN_LIB"; then - echo "$as_me:$LINENO: checking for hnj_hyphen_hyphenate2 in -lhnj" >&5 -echo $ECHO_N "checking for hnj_hyphen_hyphenate2 in -lhnj... $ECHO_C" >&6 -if test "${ac_cv_lib_hnj_hnj_hyphen_hyphenate2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhnj $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char hnj_hyphen_hyphenate2 (); int main () { -hnj_hyphen_hyphenate2 (); +return hnj_hyphen_hyphenate2 (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_hnj_hnj_hyphen_hyphenate2=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_hnj_hnj_hyphen_hyphenate2=no + ac_cv_lib_hnj_hnj_hyphen_hyphenate2=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_hnj_hnj_hyphen_hyphenate2" >&5 -echo "${ECHO_T}$ac_cv_lib_hnj_hnj_hyphen_hyphenate2" >&6 -if test $ac_cv_lib_hnj_hnj_hyphen_hyphenate2 = yes; then +{ $as_echo "$as_me:${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 : HYPHEN_LIB=-lhnj else - { { echo "$as_me:$LINENO: error: altlinuxhyph library not found or too old." >&5 -echo "$as_me: error: altlinuxhyph library not found or too old." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "altlinuxhyph library not found or too old." "$LINENO" 5 fi fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_HYPH=NO BUILD_TYPE="$BUILD_TYPE HYPHEN" fi -echo "$as_me:$LINENO: checking which mythes to use" >&5 -echo $ECHO_N "checking which mythes to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which mythes to use" >&5 +$as_echo_n "checking which mythes to use... " >&6; } if test -n "$with_system_mythes" && test "$with_system_mythes" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_MYTHES=YES - ac_ext=cc + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -23906,10 +18540,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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -23921,29 +18555,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -23954,25 +18589,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for mythes" >&5 -echo $ECHO_N "checking for mythes... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mythes" >&5 +$as_echo_n "checking for mythes... " >&6; } if $PKG_CONFIG --exists "mythes" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking MYTHES_CFLAGS" >&5 -echo $ECHO_N "checking MYTHES_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MYTHES_CFLAGS" >&5 +$as_echo_n "checking MYTHES_CFLAGS... " >&6; } MYTHES_CFLAGS=`$PKG_CONFIG --cflags "mythes"` - echo "$as_me:$LINENO: result: $MYTHES_CFLAGS" >&5 -echo "${ECHO_T}$MYTHES_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYTHES_CFLAGS" >&5 +$as_echo "$MYTHES_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking MYTHES_LIBS" >&5 -echo $ECHO_N "checking MYTHES_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MYTHES_LIBS" >&5 +$as_echo_n "checking MYTHES_LIBS... " >&6; } MYTHES_LIBS=`$PKG_CONFIG --libs "mythes"` - echo "$as_me:$LINENO: result: $MYTHES_LIBS" >&5 -echo "${ECHO_T}$MYTHES_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYTHES_LIBS" >&5 +$as_echo "$MYTHES_LIBS" >&6; } else MYTHES_CFLAGS="" MYTHES_LIBS="" @@ -23997,212 +18632,45 @@ echo "${ECHO_T}$MYTHES_LIBS" >&6 fi if test "$MYTHES_PKGCONFIG" = "no"; then - if test "${ac_cv_header_mythes_hxx+set}" = set; then - echo "$as_me:$LINENO: checking for mythes.hxx" >&5 -echo $ECHO_N "checking for mythes.hxx... $ECHO_C" >&6 -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_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 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_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: 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 + ac_fn_cxx_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 : -fi -if test $ac_cv_header_mythes_hxx = yes; then - : else - { { 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; }; } + as_fn_error $? "mythes.hxx headers not found." "$LINENO" 5 fi - -echo "$as_me:$LINENO: checking for main in -lmythes-1.2" >&5 -echo $ECHO_N "checking for main in -lmythes-1.2... $ECHO_C" >&6 -if test "${ac_cv_lib_mythes_1_2_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmythes-1.2" >&5 +$as_echo_n "checking for main in -lmythes-1.2... " >&6; } +if test "${ac_cv_lib_mythes_1_2_main+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmythes-1.2 $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { -main (); +return main (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_mythes_1_2_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_mythes_1_2_main=no + ac_cv_lib_mythes_1_2_main=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_mythes_1_2_main" >&5 -echo "${ECHO_T}$ac_cv_lib_mythes_1_2_main" >&6 -if test $ac_cv_lib_mythes_1_2_main = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mythes_1_2_main" >&5 +$as_echo "$ac_cv_lib_mythes_1_2_main" >&6; } +if test "x$ac_cv_lib_mythes_1_2_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBMYTHES_1_2 1 _ACEOF @@ -24214,313 +18682,116 @@ else fi if test "$MYTHES_FOUND" = "no"; then - echo "$as_me:$LINENO: checking for main in -lmythes" >&5 -echo $ECHO_N "checking for main in -lmythes... $ECHO_C" >&6 -if test "${ac_cv_lib_mythes_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmythes $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { -main (); +return main (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_mythes_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_mythes_main=no + ac_cv_lib_mythes_main=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_mythes_main" >&5 -echo "${ECHO_T}$ac_cv_lib_mythes_main" >&6 -if test $ac_cv_lib_mythes_main = yes; then +{ $as_echo "$as_me:${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 : MYTHES_FOUND=yes -else - MYTHES_FOUND=no -fi - - fi - if test "$MYTHES_FOUND" = "no"; then - { { echo "$as_me:$LINENO: error: mythes library not found!." >&5 -echo "$as_me: error: mythes library not found!." >&2;} - { (exit 1); exit 1; }; } - fi - fi - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 - SYSTEM_MYTHES=NO - BUILD_TYPE="$BUILD_TYPE MYTHES" -fi - - - - -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 - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 - SYSTEM_LPSOLVE=YES - if test "${ac_cv_header_lpsolve_lp_lib_h+set}" = set; then - 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 +else + MYTHES_FOUND=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 + fi + if test "$MYTHES_FOUND" = "no"; then + as_fn_error $? "mythes library not found!." "$LINENO" 5 + fi + fi + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + else - ac_cv_header_lpsolve_lp_lib_h=$ac_header_preproc + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } + SYSTEM_MYTHES=NO + BUILD_TYPE="$BUILD_TYPE MYTHES" 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 - : + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which lpsolve to use" >&5 +$as_echo_n "checking which lpsolve to use... " >&6; } +if test -n "$with_system_lpsolve" -o -n "$with_system_libs" && \ + test "$with_system_lpsolve" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "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 : + else - { { echo "$as_me:$LINENO: error: lpsolve headers not found." >&5 -echo "$as_me: error: lpsolve headers not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "lpsolve headers not found." "$LINENO" 5 fi # some systems need this. Like Ubuntu.... - -echo "$as_me:$LINENO: checking for floor in -lm" >&5 -echo $ECHO_N "checking for floor in -lm... $ECHO_C" >&6 -if test "${ac_cv_lib_m_floor+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for floor in -lm" >&5 +$as_echo_n "checking for floor in -lm... " >&6; } +if test "${ac_cv_lib_m_floor+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char floor (); int main () { -floor (); +return floor (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_floor=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_m_floor=no + ac_cv_lib_m_floor=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_m_floor" >&5 -echo "${ECHO_T}$ac_cv_lib_m_floor" >&6 -if test $ac_cv_lib_m_floor = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_floor" >&5 +$as_echo "$ac_cv_lib_m_floor" >&6; } +if test "x$ac_cv_lib_m_floor" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF @@ -24529,72 +18800,43 @@ _ACEOF fi - -echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF @@ -24603,72 +18845,43 @@ _ACEOF fi - -echo "$as_me:$LINENO: checking for make_lp in -llpsolve55" >&5 -echo $ECHO_N "checking for make_lp in -llpsolve55... $ECHO_C" >&6 -if test "${ac_cv_lib_lpsolve55_make_lp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-llpsolve55 $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char make_lp (); int main () { -make_lp (); +return make_lp (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_lpsolve55_make_lp=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_lpsolve55_make_lp=no + ac_cv_lib_lpsolve55_make_lp=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_lpsolve55_make_lp" >&5 -echo "${ECHO_T}$ac_cv_lib_lpsolve55_make_lp" >&6 -if test $ac_cv_lib_lpsolve55_make_lp = yes; then +{ $as_echo "$as_me:${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 : cat >>confdefs.h <<_ACEOF #define HAVE_LIBLPSOLVE55 1 _ACEOF @@ -24676,237 +18889,68 @@ _ACEOF LIBS="-llpsolve55 $LIBS" else - { { echo "$as_me:$LINENO: error: lpsolve library not found or too old." >&5 -echo "$as_me: error: lpsolve library not found or too old." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "lpsolve library not found or too old." "$LINENO" 5 fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_LPSOLVE=NO BUILD_TYPE="$BUILD_TYPE LPSOLVE" fi -echo "$as_me:$LINENO: checking which libtextcat to use" >&5 -echo $ECHO_N "checking which libtextcat to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which libtextcat to use" >&5 +$as_echo_n "checking which libtextcat to use... " >&6; } if test -n "$with_system_libtextcat" && test "$with_system_libtextcat" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_LIBTEXTCAT=YES - if test "${ac_cv_header_libtextcat_textcat_h+set}" = set; then - echo "$as_me:$LINENO: checking for libtextcat/textcat.h" >&5 -echo $ECHO_N "checking for libtextcat/textcat.h... $ECHO_C" >&6 -if test "${ac_cv_header_libtextcat_textcat_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_libtextcat_textcat_h" >&5 -echo "${ECHO_T}$ac_cv_header_libtextcat_textcat_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking libtextcat/textcat.h usability" >&5 -echo $ECHO_N "checking libtextcat/textcat.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -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 libtextcat/textcat.h presence" >&5 -echo $ECHO_N "checking libtextcat/textcat.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: libtextcat/textcat.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: libtextcat/textcat.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: libtextcat/textcat.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: libtextcat/textcat.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: libtextcat/textcat.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: libtextcat/textcat.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: libtextcat/textcat.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: libtextcat/textcat.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: libtextcat/textcat.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for libtextcat/textcat.h" >&5 -echo $ECHO_N "checking for libtextcat/textcat.h... $ECHO_C" >&6 -if test "${ac_cv_header_libtextcat_textcat_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_libtextcat_textcat_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_libtextcat_textcat_h" >&5 -echo "${ECHO_T}$ac_cv_header_libtextcat_textcat_h" >&6 + ac_fn_c_check_header_mongrel "$LINENO" "libtextcat/textcat.h" "ac_cv_header_libtextcat_textcat_h" "$ac_includes_default" +if test "x$ac_cv_header_libtextcat_textcat_h" = x""yes; then : -fi -if test $ac_cv_header_libtextcat_textcat_h = yes; then - : else - { { echo "$as_me:$LINENO: error: libtextcat headers not found." >&5 -echo "$as_me: error: libtextcat headers not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libtextcat headers not found." "$LINENO" 5 fi - -echo "$as_me:$LINENO: checking for special_textcat_Init in -ltextcat" >&5 -echo $ECHO_N "checking for special_textcat_Init in -ltextcat... $ECHO_C" >&6 -if test "${ac_cv_lib_textcat_special_textcat_Init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special_textcat_Init in -ltextcat" >&5 +$as_echo_n "checking for special_textcat_Init in -ltextcat... " >&6; } +if test "${ac_cv_lib_textcat_special_textcat_Init+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltextcat $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char special_textcat_Init (); int main () { -special_textcat_Init (); +return special_textcat_Init (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_textcat_special_textcat_Init=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_textcat_special_textcat_Init=no + ac_cv_lib_textcat_special_textcat_Init=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_textcat_special_textcat_Init" >&5 -echo "${ECHO_T}$ac_cv_lib_textcat_special_textcat_Init" >&6 -if test $ac_cv_lib_textcat_special_textcat_Init = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_textcat_special_textcat_Init" >&5 +$as_echo "$ac_cv_lib_textcat_special_textcat_Init" >&6; } +if test "x$ac_cv_lib_textcat_special_textcat_Init" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBTEXTCAT 1 _ACEOF @@ -24914,217 +18958,94 @@ _ACEOF LIBS="-ltextcat $LIBS" else - { { echo "$as_me:$LINENO: error: libtextcat library not found or not suitable. libtextcat typically needs to be patched" >&5 -echo "$as_me: error: libtextcat library not found or not suitable. libtextcat typically needs to be patched" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libtextcat library not found or not suitable. libtextcat typically needs to be patched" "$LINENO" 5 fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_LIBTEXTCAT=NO BUILD_TYPE="$BUILD_TYPE LIBTEXTCAT" fi -echo "$as_me:$LINENO: checking which libtextcat data directory to use" >&5 -echo $ECHO_N "checking which libtextcat data directory to use... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which libtextcat data directory to use" >&5 +$as_echo_n "checking which libtextcat data directory to use... " >&6; } if test -n "$with_system_libtextcat_data" && test "$with_system_libtextcat_data" != "no"; then if test "$with_system_libtextcat_data" = "yes"; then SYSTEM_LIBTEXTCAT_DATA=file:///usr/share/libtextcat else SYSTEM_LIBTEXTCAT_DATA=file://$with_system_libtextcat_data fi - echo "$as_me:$LINENO: result: $SYSTEM_LIBTEXTCAT_DATA" >&5 -echo "${ECHO_T}$SYSTEM_LIBTEXTCAT_DATA" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSTEM_LIBTEXTCAT_DATA" >&5 +$as_echo "$SYSTEM_LIBTEXTCAT_DATA" >&6; } else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } BUILD_TYPE="$BUILD_TYPE LIBTEXTCATDATA" fi if test "$_os" = "Linux"; then - echo "$as_me:$LINENO: checking whether libc is >= 2.1.1" >&5 -echo $ECHO_N "checking whether libc is >= 2.1.1... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libc is >= 2.1.1" >&5 +$as_echo_n "checking whether libc is >= 2.1.1... " >&6; } exec 6>/dev/null # no output - echo "$as_me:$LINENO: checking for gnu_get_libc_version in -lc" >&5 -echo $ECHO_N "checking for gnu_get_libc_version in -lc... $ECHO_C" >&6 -if test "${ac_cv_lib_c_gnu_get_libc_version+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gnu_get_libc_version (); int main () { -gnu_get_libc_version (); +return gnu_get_libc_version (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_c_gnu_get_libc_version=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_c_gnu_get_libc_version=no + ac_cv_lib_c_gnu_get_libc_version=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_c_gnu_get_libc_version" >&5 -echo "${ECHO_T}$ac_cv_lib_c_gnu_get_libc_version" >&6 -if test $ac_cv_lib_c_gnu_get_libc_version = yes; then +{ $as_echo "$as_me:${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 : HAVE_LIBC=yes; export HAVE_LIBC fi exec 6>&1 # output on again if test "$HAVE_LIBC"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { { echo "$as_me:$LINENO: error: no, upgrade libc" >&5 -echo "$as_me: error: no, upgrade libc" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no, upgrade libc" "$LINENO" 5 fi fi if test "$_os" != "WNT"; then - -for ac_func in getopt -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -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 + for ac_func in getopt +do : + ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt" +if test "x$ac_cv_func_getopt" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_GETOPT 1 _ACEOF HAVE_GETOPT=YES else @@ -25132,103 +19053,12 @@ else fi done - -for ac_func in readdir_r -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -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 + for ac_func in readdir_r +do : + ac_fn_c_check_func "$LINENO" "readdir_r" "ac_cv_func_readdir_r" +if test "x$ac_cv_func_readdir_r" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_READDIR_R 1 _ACEOF HAVE_READDIR_R=YES else @@ -25249,8 +19079,8 @@ fi if test \( "$_os" = "WINNT" \) ; then - echo "$as_me:$LINENO: checking for PSDK files" >&5 -echo $ECHO_N "checking for PSDK files... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PSDK files" >&5 +$as_echo_n "checking for PSDK files... " >&6; } if test -z "$with_psdk_home"; then # This first line will detect a February 2003 Microsoft Platform SDK PSDK_HOME=`./oowintool --psdk-home` @@ -25271,19 +19101,12 @@ echo $ECHO_N "checking for PSDK files... $ECHO_C" >&6 PSDK_HOME=`echo $PSDK_HOME | $SED 's/\/$//'` # Problem with current PSDK (iz 49865) if test -f "$PSDK_HOME/Lib/libcp.lib"; then - { { echo "$as_me:$LINENO: error: - -Some modules do not build correctly with MS Platform SDK - April 2005 -Edition if the library ($PSDK_HOME/Lib/libcp.lib) is found. -Remove/rename/backup that file and restart configure. Details about this -problem can be found in issue 49856." >&5 -echo "$as_me: error: + as_fn_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." >&2;} - { (exit 1); exit 1; }; } +problem can be found in issue 49856." "$LINENO" 5 fi # WIndows SDK has different headers if test \( -f "$PSDK_HOME/Include/adoint.h" \) \ @@ -25299,41 +19122,36 @@ problem can be found in issue 49856." >&2;} HAVE_PSDK_LIB="no" fi if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then - { { echo "$as_me:$LINENO: error: Some (all?) PSDK files not found, please check if all needed Platform SDKs -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; }; } + 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 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 - { { 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; }; } + as_fn_error $? "Some (all) files of the Windows Installer SDK are missing, please install." "$LINENO" 5 fi - echo "$as_me:$LINENO: result: SDK files found ...)" >&5 -echo "${ECHO_T}SDK files found ...)" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: SDK files found ...)" >&5 +$as_echo "SDK files found ...)" >&6; } if echo $PSDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then - echo "$as_me:$LINENO: result: Found Windows SDK 6.1 ($PSDK_HOME)" >&5 -echo "${ECHO_T}Found Windows SDK 6.1 ($PSDK_HOME)" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Found Windows SDK 6.1 ($PSDK_HOME)" >&5 +$as_echo "Found Windows SDK 6.1 ($PSDK_HOME)" >&6; } WINDOWS_VISTA_PSDK=TRUE elif echo $PSDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then - echo "$as_me:$LINENO: result: Found Windows SDK 6.0 ($PSDK_HOME)" >&5 -echo "${ECHO_T}Found Windows SDK 6.0 ($PSDK_HOME)" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Found Windows SDK 6.0 ($PSDK_HOME)" >&5 +$as_echo "Found Windows SDK 6.0 ($PSDK_HOME)" >&6; } WINDOWS_VISTA_PSDK=TRUE else - echo "$as_me:$LINENO: result: Found Legacy Windows Platform SDK ($PSDK_HOME)" >&5 -echo "${ECHO_T}Found Legacy Windows Platform SDK ($PSDK_HOME)" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Found Legacy Windows Platform SDK ($PSDK_HOME)" >&5 +$as_echo "Found Legacy Windows Platform SDK ($PSDK_HOME)" >&6; } fi fi if test \( "$_os" = "WINNT" \) ; then - echo "$as_me:$LINENO: checking for DirectX SDK files" >&5 -echo $ECHO_N "checking for DirectX SDK files... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK files" >&5 +$as_echo_n "checking for DirectX SDK files... " >&6; } if test -z "$with_directx_home"; then if test -n "$DXSDK_DIR"; then DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"` @@ -25365,17 +19183,15 @@ echo $ECHO_N "checking for DirectX SDK files... $ECHO_C" >&6 fi if test -n "$ENABLE_DIRECTX"; then if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } else - { { echo "$as_me:$LINENO: error: DirectX SDK files not found, please use --with-directx-home or -disable-directx." >&5 -echo "$as_me: error: DirectX SDK files not found, please use --with-directx-home or -disable-directx." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "DirectX SDK files not found, please use --with-directx-home or -disable-directx." "$LINENO" 5 fi else DIRECTXSDK_HOME="" - echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi fi @@ -25383,14 +19199,14 @@ fi NSIS_PATH="" if test "$_os" = "WINNT" ; then - echo "$as_me:$LINENO: checking for NSIS" >&5 -echo $ECHO_N "checking for NSIS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSIS" >&5 +$as_echo_n "checking for NSIS... " >&6; } # Extract the first word of "nsis.exe", so it can be a program name with args. set dummy nsis.exe; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_NSIS_PATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $NSIS_PATH in [\\/]* | ?:[\\/]*) @@ -25402,28 +19218,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_NSIS_PATH="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi NSIS_PATH=$ac_cv_path_NSIS_PATH - if test -n "$NSIS_PATH"; then - echo "$as_me:$LINENO: result: $NSIS_PATH" >&5 -echo "${ECHO_T}$NSIS_PATH" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSIS_PATH" >&5 +$as_echo "$NSIS_PATH" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test -n "$NSIS_PATH"; then NSIS_PATH=`dirname "$NSIS_PATH"` fi @@ -25438,24 +19255,24 @@ fi NSIS_PATH="$nsistest" fi if test -z "$NSIS_PATH"; then - { echo "$as_me:$LINENO: WARNING: NSIS not found, no self contained installer will be build." >&5 -echo "$as_me: WARNING: NSIS not found, no self contained installer will be build." >&2;} + { $as_echo "$as_me:${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 "NSIS not found, no self contained installer will be build." >> warn else NSIS_PATH=`cygpath -d "$NSIS_PATH"` NSIS_PATH=`cygpath -u "$NSIS_PATH"` - echo "$as_me:$LINENO: result: found ($NSIS_PATH)" >&5 -echo "${ECHO_T}found ($NSIS_PATH)" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ($NSIS_PATH)" >&5 +$as_echo "found ($NSIS_PATH)" >&6; } fi fi # Extract the first word of "bison", so it can be a program name with args. set dummy bison; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_BISON+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $BISON in [\\/]* | ?:[\\/]*) @@ -25467,59 +19284,56 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi BISON=$ac_cv_path_BISON - if test -n "$BISON"; then - echo "$as_me:$LINENO: result: $BISON" >&5 -echo "${ECHO_T}$BISON" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5 +$as_echo "$BISON" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$BISON"; then - { { echo "$as_me:$LINENO: error: no bison found in \$PATH, install bison" >&5 -echo "$as_me: error: no bison found in \$PATH, install bison" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no bison found in \$PATH, install bison" "$LINENO" 5 else - echo "$as_me:$LINENO: checking the bison version" >&5 -echo $ECHO_N "checking the bison version... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the bison version" >&5 +$as_echo_n "checking the bison version... " >&6; } _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[^0-9]*@@' -e 's@ .*@@' -e 's@,.*@@'`; _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'` # Accept newer than 1.875 or older(equal) than 1.75 if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then if test "$_bison_version" = "1.875" ; then - { echo "$as_me:$LINENO: WARNING: suspect ($BISON $_bison_version)" >&5 -echo "$as_me: WARNING: suspect ($BISON $_bison_version)" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: suspect ($BISON $_bison_version)" >&5 +$as_echo "$as_me: WARNING: suspect ($BISON $_bison_version)" >&2;} echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn else - echo "$as_me:$LINENO: result: checked ($BISON $_bison_version)" >&5 -echo "${ECHO_T}checked ($BISON $_bison_version)" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked ($BISON $_bison_version)" >&5 +$as_echo "checked ($BISON $_bison_version)" >&6; } fi else - { { echo "$as_me:$LINENO: error: failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))" >&5 -echo "$as_me: error: failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))" "$LINENO" 5 fi fi # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_FLEX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $FLEX in [\\/]* | ?:[\\/]*) @@ -25531,39 +19345,38 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_FLEX="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi FLEX=$ac_cv_path_FLEX - if test -n "$FLEX"; then - echo "$as_me:$LINENO: result: $FLEX" >&5 -echo "${ECHO_T}$FLEX" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLEX" >&5 +$as_echo "$FLEX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$FLEX"; then - { { echo "$as_me:$LINENO: error: no flex found in \$PATH, install flex" >&5 -echo "$as_me: error: no flex found in \$PATH, install flex" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no flex found in \$PATH, install flex" "$LINENO" 5 fi # Extract the first word of "patch", so it can be a program name with args. set dummy patch; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PATCH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $PATCH in [\\/]* | ?:[\\/]*) @@ -25575,32 +19388,31 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi PATCH=$ac_cv_path_PATCH - if test -n "$PATCH"; then - echo "$as_me:$LINENO: result: $PATCH" >&5 -echo "${ECHO_T}$PATCH" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5 +$as_echo "$PATCH" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$PATCH"; then - { { echo "$as_me:$LINENO: error: \\"patch\\" not found in \$PATH, install the development tool named\\"patch\"\" >&5 -echo "$as_me: error: \\"patch\\" not found in \$PATH, install the development tool named\\"patch\"\" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "\\"patch\\" not found in \$PATH, install the development tool named\\"patch\"\" "$LINENO" 5 fi if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then @@ -25610,21 +19422,17 @@ if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then if test -x "$with_gnu_patch"; then GNUPATCH=$with_gnu_patch else - { { echo "$as_me:$LINENO: error: --with-gnu-patch did not point to an executable" >&5 -echo "$as_me: error: --with-gnu-patch did not point to an executable" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--with-gnu-patch did not point to an executable" "$LINENO" 5 fi fi - echo "$as_me:$LINENO: checking whether $GNUPATCH is GNU patch" >&5 -echo $ECHO_N "checking whether $GNUPATCH is GNU patch... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GNUPATCH is GNU patch" >&5 +$as_echo_n "checking whether $GNUPATCH is GNU patch... " >&6; } if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { { echo "$as_me:$LINENO: error: no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it" >&5 -echo "$as_me: error: no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it" "$LINENO" 5 fi fi @@ -25634,10 +19442,10 @@ if test -z "$with_gnu_cp"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_GNUCP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $GNUCP in [\\/]* | ?:[\\/]*) @@ -25649,64 +19457,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GNUCP="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi GNUCP=$ac_cv_path_GNUCP - if test -n "$GNUCP"; then - echo "$as_me:$LINENO: result: $GNUCP" >&5 -echo "${ECHO_T}$GNUCP" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNUCP" >&5 +$as_echo "$GNUCP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$GNUCP" && break done if test -z $GNUCP; then - { { echo "$as_me:$LINENO: error: Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it" >&5 -echo "$as_me: error: Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it" "$LINENO" 5 fi else if test -x "$with_gnu_cp"; then GNUCP=$with_gnu_cp else - { { echo "$as_me:$LINENO: error: --with-gnu-cp did not point to an executable" >&5 -echo "$as_me: error: --with-gnu-cp did not point to an executable" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--with-gnu-cp did not point to an executable" "$LINENO" 5 fi fi -echo "$as_me:$LINENO: checking whether $GNUCP is GNU cp" >&5 -echo $ECHO_N "checking whether $GNUCP is GNU cp... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GNUCP is GNU cp" >&5 +$as_echo_n "checking whether $GNUCP is GNU cp... " >&6; } if $GNUCP --version 2>/dev/null | grep "Free Software Foundation" >/dev/null 2>/dev/null; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else if $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else if test "$_os" = "SunOS" -o "$_os" = "FreeBSD"; then - { { echo "$as_me:$LINENO: error: no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it" >&5 -echo "$as_me: error: no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it" "$LINENO" 5 else GNUCP='' - echo "$as_me:$LINENO: result: no gnucp found - using the system's cp command" >&5 -echo "${ECHO_T}no gnucp found - using the system's cp command" >&6 + { $as_echo "$as_me:${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; } fi fi fi @@ -25718,10 +19521,10 @@ if test "$_os" = "WINNT"; then CYGWIN_PATH="" # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_CYGWIN_PATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $CYGWIN_PATH in [\\/]* | ?:[\\/]*) @@ -25733,28 +19536,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CYGWIN_PATH="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi CYGWIN_PATH=$ac_cv_path_CYGWIN_PATH - if test -n "$CYGWIN_PATH"; then - echo "$as_me:$LINENO: result: $CYGWIN_PATH" >&5 -echo "${ECHO_T}$CYGWIN_PATH" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_PATH" >&5 +$as_echo "$CYGWIN_PATH" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + CYGWIN_PATH=`dirname "$CYGWIN_PATH"` fi if test -z "$CYGWIN_PATH"; then @@ -25763,18 +19567,18 @@ fi if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then - echo "$as_me:$LINENO: checking ml.exe assembler path" >&5 -echo $ECHO_N "checking ml.exe assembler path... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking ml.exe assembler path" >&5 +$as_echo_n "checking ml.exe assembler path... " >&6; } if test -n "$with_asm_home"; then with_asm_home=`cygpath -u "$with_asm_home"` fi if test ! -x "$with_asm_home/ml.exe"; then # Extract the first word of "ml.exe", so it can be a program name with args. set dummy ml.exe; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_ML_EXE+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $ML_EXE in [\\/]* | ?:[\\/]*) @@ -25786,44 +19590,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ML_EXE="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi ML_EXE=$ac_cv_path_ML_EXE - if test -n "$ML_EXE"; then - echo "$as_me:$LINENO: result: $ML_EXE" >&5 -echo "${ECHO_T}$ML_EXE" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ML_EXE" >&5 +$as_echo "$ML_EXE" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$ML_EXE"; then if test -x "$with_cl_home/bin/ml.exe"; then with_asm_home=$with_cl_home/bin - echo "$as_me:$LINENO: result: found ($with_asm_home)" >&5 -echo "${ECHO_T}found ($with_asm_home)" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ($with_asm_home)" >&5 +$as_echo "found ($with_asm_home)" >&6; } else - { { echo "$as_me:$LINENO: error: Configure did not find ml.exe assembler." >&5 -echo "$as_me: error: Configure did not find ml.exe assembler." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Configure did not find ml.exe assembler." "$LINENO" 5 fi else with_asm_home="ASM_IN_PATH" fi fi - echo "$as_me:$LINENO: result: $ASM_HOME" >&5 -echo "${ECHO_T}$ASM_HOME" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ASM_HOME" >&5 +$as_echo "$ASM_HOME" >&6; } else with_asm_home="NO_ASM_HOME" fi @@ -25843,10 +19646,10 @@ if test -n "$with_zip_home" ; then else # Extract the first word of "zip", so it can be a program name with args. set dummy zip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_ZIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $ZIP in [\\/]* | ?:[\\/]*) @@ -25858,34 +19661,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi ZIP=$ac_cv_path_ZIP - if test -n "$ZIP"; then - echo "$as_me:$LINENO: result: $ZIP" >&5 -echo "${ECHO_T}$ZIP" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5 +$as_echo "$ZIP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + # Extract the first word of "unzip", so it can be a program name with args. set dummy unzip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_UNZIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $UNZIP in [\\/]* | ?:[\\/]*) @@ -25897,84 +19701,69 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi UNZIP=$ac_cv_path_UNZIP - if test -n "$UNZIP"; then - echo "$as_me:$LINENO: result: $UNZIP" >&5 -echo "${ECHO_T}$UNZIP" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5 +$as_echo "$UNZIP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + ZIP_HOME=`dirname "$ZIP"` fi if test -z "$ZIP" -o -z "$UNZIP"; then - { { echo "$as_me:$LINENO: error: Zip/Unzip are required to build, please install or use --with-zip-home" >&5 -echo "$as_me: error: Zip/Unzip are required to build, please install or use --with-zip-home" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Zip/Unzip are required to build, please install or use --with-zip-home" "$LINENO" 5 fi if test "$_os" = "WINNT"; then if test -n "`$ZIP -h | grep -i WinNT`" ; then -{ { echo "$as_me:$LINENO: error: $ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe." >&5 -echo "$as_me: error: $ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe." >&2;} - { (exit 1); exit 1; }; } +as_fn_error $? "$ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe." "$LINENO" 5 fi fi if test "$_os" = "WINNT"; then - echo "$as_me:$LINENO: checking for unicows.dll" >&5 -echo $ECHO_N "checking for unicows.dll... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unicows.dll" >&5 +$as_echo_n "checking for unicows.dll... " >&6; } if test -x ./external/unicows/unicows.dll; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 - else - { { echo "$as_me:$LINENO: error: The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/. -Get it from the Microsoft site and put it into external/unicows. -(Note: Microsoft seems to enjoy changing the exact location of this file. You -may have to search Microsoft's website.) Last time it was seen at: -." >&5 -echo "$as_me: error: The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + else + as_fn_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: -." >&2;} - { (exit 1); exit 1; }; } +." "$LINENO" 5 fi fi if test "$_os" = "WINNT"; then - echo "$as_me:$LINENO: checking for dbghelp.dll" >&5 -echo $ECHO_N "checking for dbghelp.dll... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbghelp.dll" >&5 +$as_echo_n "checking for dbghelp.dll... " >&6; } if test -x ./external/dbghelp/dbghelp.dll; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } else - { { echo "$as_me:$LINENO: error: dbghelp.dll is missing in external/dbghelp/. -Get it from the Microsoft site and put it into external/dbghelp. -(Note: Microsoft seems to enjoy changing the exact location of this file. You -may have to search Microsoft's website.) Last time it was seen at: -." >&5 -echo "$as_me: error: dbghelp.dll is missing in external/dbghelp/. + as_fn_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: -." >&2;} - { (exit 1); exit 1; }; } +." "$LINENO" 5 fi fi @@ -25982,28 +19771,21 @@ if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then if ./oowintool --msvc-copy-dlls ./external/msvcp ; then : else - { { echo "$as_me:$LINENO: error: oowintool failed to copy CRT" >&5 -echo "$as_me: error: oowintool failed to copy CRT" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "oowintool failed to copy CRT" "$LINENO" 5 fi fi if test "$_os" = "WINNT"; then - echo "$as_me:$LINENO: checking for gdiplus.dll" >&5 -echo $ECHO_N "checking for gdiplus.dll... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdiplus.dll" >&5 +$as_echo_n "checking for gdiplus.dll... " >&6; } if test -x ./external/gdiplus/gdiplus.dll; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } else - { { echo "$as_me:$LINENO: error: gdiplus.dll is missing in external/gdiplus/. + as_fn_error $? "gdiplus.dll is missing in external/gdiplus/. Get it from the Microsoft site and put it into external/gdiplus. You may have to search Microsoft's website. Last time it was seen at: -." >&5 -echo "$as_me: error: gdiplus.dll is missing in external/gdiplus/. -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; }; } +." "$LINENO" 5 fi fi @@ -26013,11 +19795,11 @@ fi if test "$_os" = "WINNT"; then if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then - echo "$as_me:$LINENO: checking for instmsia.exe/instmsiw.exe" >&5 -echo $ECHO_N "checking for instmsia.exe/instmsiw.exe... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for instmsia.exe/instmsiw.exe" >&5 +$as_echo_n "checking for instmsia.exe/instmsiw.exe... " >&6; } if test -x ./external/msi/instmsia.exe -a -x ./external/msi/instmsiw.exe; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } else MSIAPATH=`/bin/find "$COMPATH/.." -iname instmsia.exe | head -n 1` MSIWPATH=`/bin/find "$COMPATH/.." -iname instmsiw.exe | head -n 1` @@ -26026,27 +19808,21 @@ echo "${ECHO_T}found" >&6 cp "$MSIWPATH" ./external/msi/ && chmod +x ./external/msi/instmsiw.exe && MSIWCOPY="OK" fi if test -z "$MSIACOPY" -o -z "$MSIWCOPY"; then - { { echo "$as_me:$LINENO: error: instmsia.exe and/or instmsiw.exe are/is missing in the default location. -These programs are part of the Visual Studio installation and should be found in a -directory similar to: -\"c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\Tools\\Deployment\\MsiRedist\\\" -As the automatic detection fails please copy the files to external/msi/." >&5 -echo "$as_me: error: instmsia.exe and/or instmsiw.exe are/is missing in the default location. + as_fn_error $? "instmsia.exe and/or instmsiw.exe are/is missing in the default location. These programs are part of the Visual Studio installation and should be found in a directory similar to: \"c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\Tools\\Deployment\\MsiRedist\\\" -As the automatic detection fails please copy the files to external/msi/." >&2;} - { (exit 1); exit 1; }; } +As the automatic detection fails please copy the files to external/msi/." "$LINENO" 5 else - echo "$as_me:$LINENO: result: found and copied" >&5 -echo "${ECHO_T}found and copied" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found and copied" >&5 +$as_echo "found and copied" >&6; } fi fi fi fi -echo "$as_me:$LINENO: checking which VCLplugs shall be built" >&5 -echo $ECHO_N "checking which VCLplugs shall be built... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which VCLplugs shall be built" >&5 +$as_echo_n "checking which VCLplugs shall be built... " >&6; } ENABLE_GTK="" if test "x$enable_gtk" = "xyes"; then ENABLE_GTK="TRUE" @@ -26069,31 +19845,31 @@ fi if test -z "$R"; then - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } else - echo "$as_me:$LINENO: result: $R" >&5 -echo "${ECHO_T}$R" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $R" >&5 +$as_echo "$R" >&6; } fi ENABLE_GCONF="" -echo "$as_me:$LINENO: checking whether to enable GConf support" >&5 -echo $ECHO_N "checking whether to enable GConf support... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable GConf support" >&5 +$as_echo_n "checking whether to enable GConf support... " >&6; } if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "OS2" -a "$enable_gconf" = "yes"; then ENABLE_GCONF="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -26105,29 +19881,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -26138,25 +19915,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gconf-2.0 " >&5 -echo $ECHO_N "checking for gconf-2.0 ... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 " >&5 +$as_echo_n "checking for gconf-2.0 ... " >&6; } if $PKG_CONFIG --exists "gconf-2.0 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking GCONF_CFLAGS" >&5 -echo $ECHO_N "checking GCONF_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5 +$as_echo_n "checking GCONF_CFLAGS... " >&6; } GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 "` - echo "$as_me:$LINENO: result: $GCONF_CFLAGS" >&5 -echo "${ECHO_T}$GCONF_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5 +$as_echo "$GCONF_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking GCONF_LIBS" >&5 -echo $ECHO_N "checking GCONF_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5 +$as_echo_n "checking GCONF_LIBS... " >&6; } GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 "` - echo "$as_me:$LINENO: result: $GCONF_LIBS" >&5 -echo "${ECHO_T}$GCONF_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5 +$as_echo "$GCONF_LIBS" >&6; } else GCONF_CFLAGS="" GCONF_LIBS="" @@ -26177,35 +19954,33 @@ echo "${ECHO_T}$GCONF_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + 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 fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi ENABLE_GNOMEVFS="" -echo "$as_me:$LINENO: checking whether to enable GNOME VFS support" >&5 -echo $ECHO_N "checking whether to enable GNOME VFS support... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable GNOME VFS support" >&5 +$as_echo_n "checking whether to enable GNOME VFS support... " >&6; } if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes"; then ENABLE_GNOMEVFS="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -26217,29 +19992,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -26250,25 +20026,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gnome-vfs-2.0 >= 2.6.0 " >&5 -echo $ECHO_N "checking for gnome-vfs-2.0 >= 2.6.0 ... $ECHO_C" >&6 + { $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; } if $PKG_CONFIG --exists "gnome-vfs-2.0 >= 2.6.0 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking GNOMEVFS_CFLAGS" >&5 -echo $ECHO_N "checking GNOMEVFS_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNOMEVFS_CFLAGS" >&5 +$as_echo_n "checking GNOMEVFS_CFLAGS... " >&6; } GNOMEVFS_CFLAGS=`$PKG_CONFIG --cflags "gnome-vfs-2.0 >= 2.6.0 "` - echo "$as_me:$LINENO: result: $GNOMEVFS_CFLAGS" >&5 -echo "${ECHO_T}$GNOMEVFS_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNOMEVFS_CFLAGS" >&5 +$as_echo "$GNOMEVFS_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking GNOMEVFS_LIBS" >&5 -echo $ECHO_N "checking GNOMEVFS_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNOMEVFS_LIBS" >&5 +$as_echo_n "checking GNOMEVFS_LIBS... " >&6; } GNOMEVFS_LIBS=`$PKG_CONFIG --libs "gnome-vfs-2.0 >= 2.6.0 "` - echo "$as_me:$LINENO: result: $GNOMEVFS_LIBS" >&5 -echo "${ECHO_T}$GNOMEVFS_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNOMEVFS_LIBS" >&5 +$as_echo "$GNOMEVFS_LIBS" >&6; } else GNOMEVFS_CFLAGS="" GNOMEVFS_LIBS="" @@ -26289,9 +20065,7 @@ echo "${ECHO_T}$GNOMEVFS_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements (gnome-vfs-2.0 >= 2.6.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (gnome-vfs-2.0 >= 2.6.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + 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 fi if test "$ENABLE_GCONF" != "TRUE"; then @@ -26301,10 +20075,10 @@ echo "$as_me: error: Library requirements (gnome-vfs-2.0 >= 2.6.0 ) not met; con if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -26316,29 +20090,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -26349,25 +20124,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gconf-2.0 " >&5 -echo $ECHO_N "checking for gconf-2.0 ... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 " >&5 +$as_echo_n "checking for gconf-2.0 ... " >&6; } if $PKG_CONFIG --exists "gconf-2.0 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking GCONF_CFLAGS" >&5 -echo $ECHO_N "checking GCONF_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5 +$as_echo_n "checking GCONF_CFLAGS... " >&6; } GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 "` - echo "$as_me:$LINENO: result: $GCONF_CFLAGS" >&5 -echo "${ECHO_T}$GCONF_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5 +$as_echo "$GCONF_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking GCONF_LIBS" >&5 -echo $ECHO_N "checking GCONF_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5 +$as_echo_n "checking GCONF_LIBS... " >&6; } GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 "` - echo "$as_me:$LINENO: result: $GCONF_LIBS" >&5 -echo "${ECHO_T}$GCONF_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5 +$as_echo "$GCONF_LIBS" >&6; } else GCONF_CFLAGS="" GCONF_LIBS="" @@ -26388,15 +20163,13 @@ echo "${ECHO_T}$GCONF_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + 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 fi fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -26414,10 +20187,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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -26429,29 +20202,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -26462,25 +20236,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 " >&5 -echo $ECHO_N "checking for gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 ... $ECHO_C" >&6 + { $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; } if $PKG_CONFIG --exists "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5 -echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 +$as_echo_n "checking GTK_CFLAGS... " >&6; } GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 "` - echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5 -echo "${ECHO_T}$GTK_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 +$as_echo "$GTK_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking GTK_LIBS" >&5 -echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 +$as_echo_n "checking GTK_LIBS... " >&6; } GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 "` - echo "$as_me:$LINENO: result: $GTK_LIBS" >&5 -echo "${ECHO_T}$GTK_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 +$as_echo "$GTK_LIBS" >&6; } else GTK_CFLAGS="" GTK_LIBS="" @@ -26501,9 +20275,7 @@ echo "${ECHO_T}$GTK_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" >&5 -echo "$as_me: error: requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" "$LINENO" 5 fi BUILD_TYPE="$BUILD_TYPE GTK" @@ -26513,22 +20285,22 @@ echo "$as_me: error: requirements to build the gtk-plugin not met. Use --disable BUILD_TYPE="$BUILD_TYPE SYSTRAY_GTK" fi - echo "$as_me:$LINENO: checking whether to enable DBUS support" >&5 -echo $ECHO_N "checking whether to enable DBUS support... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable DBUS support" >&5 +$as_echo_n "checking whether to enable DBUS support... " >&6; } if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then ENABLE_DBUS="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -26540,29 +20312,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -26573,25 +20346,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for dbus-glib-1 >= 0.70 " >&5 -echo $ECHO_N "checking for dbus-glib-1 >= 0.70 ... $ECHO_C" >&6 + { $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; } if $PKG_CONFIG --exists "dbus-glib-1 >= 0.70 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking DBUS_CFLAGS" >&5 -echo $ECHO_N "checking DBUS_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_CFLAGS" >&5 +$as_echo_n "checking DBUS_CFLAGS... " >&6; } DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-glib-1 >= 0.70 "` - echo "$as_me:$LINENO: result: $DBUS_CFLAGS" >&5 -echo "${ECHO_T}$DBUS_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_CFLAGS" >&5 +$as_echo "$DBUS_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking DBUS_LIBS" >&5 -echo $ECHO_N "checking DBUS_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_LIBS" >&5 +$as_echo_n "checking DBUS_LIBS... " >&6; } DBUS_LIBS=`$PKG_CONFIG --libs "dbus-glib-1 >= 0.70 "` - echo "$as_me:$LINENO: result: $DBUS_LIBS" >&5 -echo "${ECHO_T}$DBUS_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LIBS" >&5 +$as_echo "$DBUS_LIBS" >&6; } else DBUS_CFLAGS="" DBUS_LIBS="" @@ -26612,37 +20385,33 @@ echo "${ECHO_T}$DBUS_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements (dbus-glib-1 >= 0.70 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (dbus-glib-1 >= 0.70 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + 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 fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - echo "$as_me:$LINENO: checking whether to enable GIO support" >&5 -echo $ECHO_N "checking whether to enable GIO support... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable GIO support" >&5 +$as_echo_n "checking whether to enable GIO support... " >&6; } if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then if test "$ENABLE_GNOMEVFS" = "TRUE" ; then - { { echo "$as_me:$LINENO: error: please use --enable-gio only together with --disable-gnome-vfs." >&5 -echo "$as_me: error: please use --enable-gio only together with --disable-gnome-vfs." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "please use --enable-gio only together with --disable-gnome-vfs." "$LINENO" 5 fi ENABLE_GIO="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -26654,29 +20423,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -26687,25 +20457,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gio-2.0 " >&5 -echo $ECHO_N "checking for gio-2.0 ... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 " >&5 +$as_echo_n "checking for gio-2.0 ... " >&6; } if $PKG_CONFIG --exists "gio-2.0 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking GIO_CFLAGS" >&5 -echo $ECHO_N "checking GIO_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GIO_CFLAGS" >&5 +$as_echo_n "checking GIO_CFLAGS... " >&6; } GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 "` - echo "$as_me:$LINENO: result: $GIO_CFLAGS" >&5 -echo "${ECHO_T}$GIO_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIO_CFLAGS" >&5 +$as_echo "$GIO_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking GIO_LIBS" >&5 -echo $ECHO_N "checking GIO_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GIO_LIBS" >&5 +$as_echo_n "checking GIO_LIBS... " >&6; } GIO_LIBS=`$PKG_CONFIG --libs "gio-2.0 "` - echo "$as_me:$LINENO: result: $GIO_LIBS" >&5 -echo "${ECHO_T}$GIO_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIO_LIBS" >&5 +$as_echo "$GIO_LIBS" >&6; } else GIO_CFLAGS="" GIO_LIBS="" @@ -26726,14 +20496,12 @@ echo "${ECHO_T}$GIO_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements (gio-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (gio-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + 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 fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi fi @@ -26751,8 +20519,8 @@ GSTREAMER_LIBS="" ENABLE_GSTREAMER="" if test "$test_gstreamer" = "yes"; then - echo "$as_me:$LINENO: checking whether to build the GStreamer media backend" >&5 -echo $ECHO_N "checking whether to build the GStreamer media backend... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the GStreamer media backend" >&5 +$as_echo_n "checking whether to build the GStreamer media backend... " >&6; } if test "x$enable_gstreamer" != "xno" ; then succeeded=no @@ -26760,10 +20528,10 @@ echo $ECHO_N "checking whether to build the GStreamer media backend... $ECHO_C" if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -26775,29 +20543,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -26808,25 +20577,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 " >&5 -echo $ECHO_N "checking for gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 ... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 " >&5 +$as_echo_n "checking for gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 ... " >&6; } if $PKG_CONFIG --exists "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking GSTREAMER_CFLAGS" >&5 -echo $ECHO_N "checking GSTREAMER_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GSTREAMER_CFLAGS" >&5 +$as_echo_n "checking GSTREAMER_CFLAGS... " >&6; } GSTREAMER_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 "` - echo "$as_me:$LINENO: result: $GSTREAMER_CFLAGS" >&5 -echo "${ECHO_T}$GSTREAMER_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSTREAMER_CFLAGS" >&5 +$as_echo "$GSTREAMER_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking GSTREAMER_LIBS" >&5 -echo $ECHO_N "checking GSTREAMER_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GSTREAMER_LIBS" >&5 +$as_echo_n "checking GSTREAMER_LIBS... " >&6; } GSTREAMER_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 "` - echo "$as_me:$LINENO: result: $GSTREAMER_LIBS" >&5 -echo "${ECHO_T}$GSTREAMER_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSTREAMER_LIBS" >&5 +$as_echo "$GSTREAMER_LIBS" >&6; } else GSTREAMER_CFLAGS="" GSTREAMER_LIBS="" @@ -26847,17 +20616,15 @@ echo "${ECHO_T}$GSTREAMER_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" >&5 -echo "$as_me: error: requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" "$LINENO" 5 fi ENABLE_GSTREAMER="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi fi @@ -26872,18 +20639,18 @@ SYSTEM_CAIRO="" if test "$test_cairo" = "yes"; then - echo "$as_me:$LINENO: checking whether to use cairo" >&5 -echo $ECHO_N "checking whether to use cairo... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use cairo" >&5 +$as_echo_n "checking whether to use cairo... " >&6; } if test "x$enable_cairo" != "xno" ; then ENABLE_CAIRO="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - echo "$as_me:$LINENO: checking which cairo to use" >&5 -echo $ECHO_N "checking which cairo to use... $ECHO_C" >&6 + { $as_echo "$as_me:${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; } if test -n "$with_system_cairo" -o -n "$with_system_libs" && \ test "$with_system_cairo" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_CAIRO=YES @@ -26892,10 +20659,10 @@ echo "${ECHO_T}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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -26907,29 +20674,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -26940,25 +20708,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for cairo >= 1.0.2 " >&5 -echo $ECHO_N "checking for cairo >= 1.0.2 ... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cairo >= 1.0.2 " >&5 +$as_echo_n "checking for cairo >= 1.0.2 ... " >&6; } if $PKG_CONFIG --exists "cairo >= 1.0.2 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking CAIRO_CFLAGS" >&5 -echo $ECHO_N "checking CAIRO_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking CAIRO_CFLAGS" >&5 +$as_echo_n "checking CAIRO_CFLAGS... " >&6; } CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= 1.0.2 "` - echo "$as_me:$LINENO: result: $CAIRO_CFLAGS" >&5 -echo "${ECHO_T}$CAIRO_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAIRO_CFLAGS" >&5 +$as_echo "$CAIRO_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking CAIRO_LIBS" >&5 -echo $ECHO_N "checking CAIRO_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking CAIRO_LIBS" >&5 +$as_echo_n "checking CAIRO_LIBS... " >&6; } CAIRO_LIBS=`$PKG_CONFIG --libs "cairo >= 1.0.2 "` - echo "$as_me:$LINENO: result: $CAIRO_LIBS" >&5 -echo "${ECHO_T}$CAIRO_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAIRO_LIBS" >&5 +$as_echo "$CAIRO_LIBS" >&6; } else CAIRO_CFLAGS="" CAIRO_LIBS="" @@ -26979,31 +20747,22 @@ echo "${ECHO_T}$CAIRO_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements (cairo >= 1.0.2 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (cairo >= 1.0.2 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + 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 fi if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$ENABLE_FONTCONFIG" != "TRUE" ; then - { { echo "$as_me:$LINENO: error: Cairo library requires fontconfig." >&5 -echo "$as_me: error: Cairo library requires fontconfig." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Cairo library requires fontconfig." "$LINENO" 5 fi if test "$with_system_xrender_headers" = "yes"; then - echo "$as_me:$LINENO: checking whether Xrender.h defines PictStandardA8" >&5 -echo $ECHO_N "checking whether Xrender.h defines PictStandardA8... $ECHO_C" >&6 - 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 + { $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 /* end confdefs.h. */ #include @@ -27017,43 +20776,28 @@ int main(int argc, char **argv) { } _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - 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 +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -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; }; } + as_fn_error $? "no, X headers too old." "$LINENO" 5 fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi else BUILD_TYPE="$BUILD_TYPE CAIRO" if test "$build_cpu" != "x86_64"; then BUILD_PIXMAN=YES fi - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi fi @@ -27064,219 +20808,52 @@ fi -echo "$as_me:$LINENO: checking whether to build the OpenGL Transitions component" >&5 -echo $ECHO_N "checking whether to build the OpenGL Transitions component... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the OpenGL Transitions component" >&5 +$as_echo_n "checking whether to build the OpenGL Transitions component... " >&6; } ENABLE_OPENGL= if test "x$enable_opengl" != "xno" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - 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 + { $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 : -fi -if test $ac_cv_header_GL_gl_h = yes; then - : else - { { echo "$as_me:$LINENO: error: OpenGL headers not found" >&5 -echo "$as_me: error: OpenGL headers not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "OpenGL headers not found" "$LINENO" 5 fi - -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 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lGL $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { -main (); +return main (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_GL_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_GL_main=no + ac_cv_lib_GL_main=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_GL_main" >&5 -echo "${ECHO_T}$ac_cv_lib_GL_main" >&6 -if test $ac_cv_lib_GL_main = yes; then +{ $as_echo "$as_me:${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 : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGL 1 _ACEOF @@ -27284,71 +20861,40 @@ _ACEOF LIBS="-lGL $LIBS" else - { { echo "$as_me:$LINENO: error: libGL not installed or functional" >&5 -echo "$as_me: error: libGL not installed or functional" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libGL not installed or functional" "$LINENO" 5 fi - -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 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lGLU $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { -main (); +return main (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_GLU_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_GLU_main=no + ac_cv_lib_GLU_main=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_GLU_main" >&5 -echo "${ECHO_T}$ac_cv_lib_GLU_main" >&6 -if test $ac_cv_lib_GLU_main = yes; then +{ $as_echo "$as_me:${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 : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGLU 1 _ACEOF @@ -27356,71 +20902,69 @@ _ACEOF LIBS="-lGLU $LIBS" else - { { echo "$as_me:$LINENO: error: libGLU not installed or functional" >&5 -echo "$as_me: error: libGLU not installed or functional" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libGLU not installed or functional" "$LINENO" 5 fi ENABLE_OPENGL=TRUE else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to build extra presenter ui" >&5 -echo $ECHO_N "checking whether to build extra presenter ui... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build extra presenter ui" >&5 +$as_echo_n "checking whether to build extra presenter ui... " >&6; } if test -n "$enable_presenter_extra_ui" -a "$enable_presenter_extra_ui" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ENABLE_PRESENTER_EXTRA_UI=YES else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ENABLE_PRESENTER_EXTRA_UI=NO fi -echo "$as_me:$LINENO: checking whether to build the Presentation Minimizer extension" >&5 -echo $ECHO_N "checking whether to build the Presentation Minimizer extension... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the Presentation Minimizer extension" >&5 +$as_echo_n "checking whether to build the Presentation Minimizer extension... " >&6; } if test -n "$enable_minimizer" -a "$enable_minimizer" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ENABLE_MINIMIZER=YES else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ENABLE_MINIMIZER=NO fi -echo "$as_me:$LINENO: checking whether to build the Presenter Screen extension" >&5 -echo $ECHO_N "checking whether to build the Presenter Screen extension... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the Presenter Screen extension" >&5 +$as_echo_n "checking whether to build the Presenter Screen extension... " >&6; } if test -n "$enable_presenter_console" -a "$enable_presenter_screen" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ENABLE_PRESENTER_SCREEN=YES else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ENABLE_PRESENTER_SCREEN=NO fi -echo "$as_me:$LINENO: checking whether to build the PDF Import extension" >&5 -echo $ECHO_N "checking whether to build the PDF Import extension... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the PDF Import extension" >&5 +$as_echo_n "checking whether to build the PDF Import extension... " >&6; } if test -n "$enable_pdfimport" -a "$enable_pdfimport" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ENABLE_PDFIMPORT=YES - echo "$as_me:$LINENO: checking which pdf backend to use" >&5 -echo $ECHO_N "checking which pdf backend to use... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which pdf backend to use" >&5 +$as_echo_n "checking which pdf backend to use... " >&6; } if test -n "$with_system_poppler" -o -n "$with_system_libs" && \ test "$with_system_poppler" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_POPPLER=YES succeeded=no @@ -27428,10 +20972,10 @@ echo "${ECHO_T}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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -27443,29 +20987,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -27476,25 +21021,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for poppler >= 0.8.0 " >&5 -echo $ECHO_N "checking for poppler >= 0.8.0 ... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for poppler >= 0.8.0 " >&5 +$as_echo_n "checking for poppler >= 0.8.0 ... " >&6; } if $PKG_CONFIG --exists "poppler >= 0.8.0 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking POPPLER_CFLAGS" >&5 -echo $ECHO_N "checking POPPLER_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking POPPLER_CFLAGS" >&5 +$as_echo_n "checking POPPLER_CFLAGS... " >&6; } POPPLER_CFLAGS=`$PKG_CONFIG --cflags "poppler >= 0.8.0 "` - echo "$as_me:$LINENO: result: $POPPLER_CFLAGS" >&5 -echo "${ECHO_T}$POPPLER_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POPPLER_CFLAGS" >&5 +$as_echo "$POPPLER_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking POPPLER_LIBS" >&5 -echo $ECHO_N "checking POPPLER_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking POPPLER_LIBS" >&5 +$as_echo_n "checking POPPLER_LIBS... " >&6; } POPPLER_LIBS=`$PKG_CONFIG --libs "poppler >= 0.8.0 "` - echo "$as_me:$LINENO: result: $POPPLER_LIBS" >&5 -echo "${ECHO_T}$POPPLER_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POPPLER_LIBS" >&5 +$as_echo "$POPPLER_LIBS" >&6; } else POPPLER_CFLAGS="" POPPLER_LIBS="" @@ -27515,30 +21060,26 @@ echo "${ECHO_T}$POPPLER_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements (poppler >= 0.8.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (poppler >= 0.8.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + 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 fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_POPPLER=NO BUILD_TYPE="$BUILD_TYPE XPDF" - echo "$as_me:$LINENO: checking for xpdf module" >&5 -echo $ECHO_N "checking for xpdf module... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xpdf module" >&5 +$as_echo_n "checking for xpdf module... " >&6; } if test -d ./xpdf; then - echo "$as_me:$LINENO: result: OK" >&5 -echo "${ECHO_T}OK" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 +$as_echo "OK" >&6; } else - { { echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "not existing. get it (did you get the -extensions tarball?)" "$LINENO" 5 fi fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ENABLE_PDFIMPORT=NO fi @@ -27547,82 +21088,75 @@ fi if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then - echo "$as_me:$LINENO: checking for sdext module" >&5 -echo $ECHO_N "checking for sdext module... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdext module" >&5 +$as_echo_n "checking for sdext module... " >&6; } if test -d ./sdext; then - echo "$as_me:$LINENO: result: OK" >&5 -echo "${ECHO_T}OK" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 +$as_echo "OK" >&6; } else - { { echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "not existing. get it (did you get the -extensions tarball?)" "$LINENO" 5 fi BUILD_TYPE="$BUILD_TYPE SDEXT" fi -echo "$as_me:$LINENO: checking whether to build the Wiki Publisher extension" >&5 -echo $ECHO_N "checking whether to build the Wiki Publisher extension... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the Wiki Publisher extension" >&5 +$as_echo_n "checking whether to build the Wiki Publisher extension... " >&6; } if test -n "$enable_wiki_publisher" -a "$enable_wiki_publisher" != "no" && test "$WITH_JAVA" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - echo "$as_me:$LINENO: checking for swext module" >&5 -echo $ECHO_N "checking for swext module... $ECHO_C" >&6 + { $as_echo "$as_me:${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; } if test -d ./swext; then - echo "$as_me:$LINENO: result: OK" >&5 -echo "${ECHO_T}OK" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 +$as_echo "OK" >&6; } else - { { echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "not existing. get it (did you get the -extensions tarball?)" "$LINENO" 5 fi ENABLE_MEDIAWIKI=YES BUILD_TYPE="$BUILD_TYPE SWEXT" else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ENABLE_MEDIAWIKI=NO fi if test "$ENABLE_MEDIAWIKI" = "YES"; then - echo "$as_me:$LINENO: checking which Servlet API Jar to use" >&5 -echo $ECHO_N "checking which Servlet API Jar to use... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which Servlet API Jar to use" >&5 +$as_echo_n "checking which Servlet API Jar to use... " >&6; } if test -n "$with_system_servlet_api"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_SERVLETAPI=YES if test -z "$SERVLETAPI_JAR"; then SERVLETAPI_JAR=/usr/share/java/servlet-api.jar fi - as_ac_File=`echo "ac_cv_file_$SERVLETAPI_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $SERVLETAPI_JAR" >&5 -echo $ECHO_N "checking for $SERVLETAPI_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$SERVLETAPI_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $SERVLETAPI_JAR" >&5 +$as_echo_n "checking for $SERVLETAPI_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$SERVLETAPI_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: servlet-api.jar not found." >&5 -echo "$as_me: error: servlet-api.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "servlet-api.jar not found." "$LINENO" 5 fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_SERVLETAPI=NO BUILD_TYPE="$BUILD_TYPE TOMCAT" fi @@ -27630,103 +21164,92 @@ fi -echo "$as_me:$LINENO: checking whether to build the Report Builder extension" >&5 -echo $ECHO_N "checking whether to build the Report Builder extension... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the Report Builder extension" >&5 +$as_echo_n "checking whether to build the Report Builder extension... " >&6; } if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test "$WITH_JAVA" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ENABLE_REPORTBUILDER=YES - echo "$as_me:$LINENO: checking for reportbuilder module" >&5 -echo $ECHO_N "checking for reportbuilder module... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for reportbuilder module" >&5 +$as_echo_n "checking for reportbuilder module... " >&6; } if test -d ./reportbuilder; then - echo "$as_me:$LINENO: result: OK" >&5 -echo "${ECHO_T}OK" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 +$as_echo "OK" >&6; } else - { { echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "not existing. get it (did you get the -extensions tarball?)" "$LINENO" 5 fi - echo "$as_me:$LINENO: checking which jfreereport libs to use" >&5 -echo $ECHO_N "checking which jfreereport libs to use... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which jfreereport libs to use" >&5 +$as_echo_n "checking which jfreereport libs to use... " >&6; } if test "$with_system_jfreereport" = "yes"; then SYSTEM_JFREEREPORT=YES - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } if test -z $SAC_JAR; then SAC_JAR=/usr/share/java/sac.jar fi - as_ac_File=`echo "ac_cv_file_$SAC_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $SAC_JAR" >&5 -echo $ECHO_N "checking for $SAC_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$SAC_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $SAC_JAR" >&5 +$as_echo_n "checking for $SAC_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$SAC_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: sac.jar not found." >&5 -echo "$as_me: error: sac.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "sac.jar not found." "$LINENO" 5 fi if test -z $LIBXML_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/libxml-1.0.0.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libxml-1.0.0.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_libxml_1_0_0_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libxml_1_0_0_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libxml_1_0_0_jar" >&6 -if test $ac_cv_file__usr_share_java_libxml_1_0_0_jar = yes; then +{ $as_echo "$as_me:${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 : LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/libxml.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libxml.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_libxml_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libxml_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libxml_jar" >&6 -if test $ac_cv_file__usr_share_java_libxml_jar = yes; then +{ $as_echo "$as_me:${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 : LIBXML_JAR=/usr/share/java/libxml.jar else - { { echo "$as_me:$LINENO: error: libxml.jar replacement not found." >&5 -echo "$as_me: error: libxml.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libxml.jar replacement not found." "$LINENO" 5 fi @@ -27735,79 +21258,70 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$LIBXML_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $LIBXML_JAR" >&5 -echo $ECHO_N "checking for $LIBXML_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$LIBXML_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBXML_JAR" >&5 +$as_echo_n "checking for $LIBXML_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$LIBXML_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: libxml.jar not found." >&5 -echo "$as_me: error: libxml.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libxml.jar not found." "$LINENO" 5 fi fi if test -z $FLUTE_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/flute-1.3.0.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/flute-1.3.0.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_flute_1_3_0_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flute_1_3_0_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_flute_1_3_0_jar" >&6 -if test $ac_cv_file__usr_share_java_flute_1_3_0_jar = yes; then +{ $as_echo "$as_me:${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 : FLUTE_JAR=/usr/share/java/flute-1.3.0.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/flute.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/flute.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_flute_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flute_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_flute_jar" >&6 -if test $ac_cv_file__usr_share_java_flute_jar = yes; then +{ $as_echo "$as_me:${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 : FLUTE_JAR=/usr/share/java/flute.jar else - { { echo "$as_me:$LINENO: error: flute-1.3.0.jar replacement not found." >&5 -echo "$as_me: error: flute-1.3.0.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "flute-1.3.0.jar replacement not found." "$LINENO" 5 fi @@ -27816,79 +21330,70 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$FLUTE_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $FLUTE_JAR" >&5 -echo $ECHO_N "checking for $FLUTE_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$FLUTE_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $FLUTE_JAR" >&5 +$as_echo_n "checking for $FLUTE_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$FLUTE_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: flute-1.3.0.jar not found." >&5 -echo "$as_me: error: flute-1.3.0.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "flute-1.3.0.jar not found." "$LINENO" 5 fi fi if test -z $JFREEREPORT_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/flow-engine-0.9.2.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/flow-engine-0.9.2.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_flow_engine_0_9_2_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flow_engine_0_9_2_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_flow_engine_0_9_2_jar" >&6 -if test $ac_cv_file__usr_share_java_flow_engine_0_9_2_jar = yes; then +{ $as_echo "$as_me:${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 : JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/flow-engine.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/flow-engine.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_flow_engine_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flow_engine_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_flow_engine_jar" >&6 -if test $ac_cv_file__usr_share_java_flow_engine_jar = yes; then +{ $as_echo "$as_me:${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 : JFREEREPORT_JAR=/usr/share/java/flow-engine.jar else - { { echo "$as_me:$LINENO: error: jfreereport.jar replacement not found." >&5 -echo "$as_me: error: jfreereport.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "jfreereport.jar replacement not found." "$LINENO" 5 fi @@ -27897,79 +21402,70 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$JFREEREPORT_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $JFREEREPORT_JAR" >&5 -echo $ECHO_N "checking for $JFREEREPORT_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$JFREEREPORT_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $JFREEREPORT_JAR" >&5 +$as_echo_n "checking for $JFREEREPORT_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$JFREEREPORT_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: jfreereport.jar not found." >&5 -echo "$as_me: error: jfreereport.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "jfreereport.jar not found." "$LINENO" 5 fi fi if test -z $LIBLAYOUT_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/liblayout-0.2.9.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/liblayout-0.2.9.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_liblayout_0_2_9_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_liblayout_0_2_9_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_liblayout_0_2_9_jar" >&6 -if test $ac_cv_file__usr_share_java_liblayout_0_2_9_jar = yes; then +{ $as_echo "$as_me:${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 : LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/liblayout.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/liblayout.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_liblayout_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_liblayout_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_liblayout_jar" >&6 -if test $ac_cv_file__usr_share_java_liblayout_jar = yes; then +{ $as_echo "$as_me:${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 : LIBLAYOUT_JAR=/usr/share/java/liblayout.jar else - { { echo "$as_me:$LINENO: error: liblayout.jar replacement not found." >&5 -echo "$as_me: error: liblayout.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "liblayout.jar replacement not found." "$LINENO" 5 fi @@ -27978,79 +21474,70 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$LIBLAYOUT_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $LIBLAYOUT_JAR" >&5 -echo $ECHO_N "checking for $LIBLAYOUT_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$LIBLAYOUT_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBLAYOUT_JAR" >&5 +$as_echo_n "checking for $LIBLAYOUT_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$LIBLAYOUT_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: liblayout.jar not found." >&5 -echo "$as_me: error: liblayout.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "liblayout.jar not found." "$LINENO" 5 fi fi if test -z $LIBLOADER_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/libloader-1.0.0.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libloader-1.0.0.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_libloader_1_0_0_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libloader_1_0_0_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libloader_1_0_0_jar" >&6 -if test $ac_cv_file__usr_share_java_libloader_1_0_0_jar = yes; then +{ $as_echo "$as_me:${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 : LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/libloader.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libloader.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_libloader_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libloader_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libloader_jar" >&6 -if test $ac_cv_file__usr_share_java_libloader_jar = yes; then +{ $as_echo "$as_me:${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 : LIBLOADER_JAR=/usr/share/java/libloader.jar else - { { echo "$as_me:$LINENO: error: libloader.jar replacement not found." >&5 -echo "$as_me: error: libloader.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libloader.jar replacement not found." "$LINENO" 5 fi @@ -28059,79 +21546,70 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$LIBLOADER_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $LIBLOADER_JAR" >&5 -echo $ECHO_N "checking for $LIBLOADER_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$LIBLOADER_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBLOADER_JAR" >&5 +$as_echo_n "checking for $LIBLOADER_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$LIBLOADER_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: libloader.jar not found." >&5 -echo "$as_me: error: libloader.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libloader.jar not found." "$LINENO" 5 fi fi if test -z $LIBFORMULA_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/libformula-0.2.0.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libformula-0.2.0.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_libformula_0_2_0_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libformula_0_2_0_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libformula_0_2_0_jar" >&6 -if test $ac_cv_file__usr_share_java_libformula_0_2_0_jar = yes; then +{ $as_echo "$as_me:${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 : LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/libformula.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libformula.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_libformula_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libformula_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libformula_jar" >&6 -if test $ac_cv_file__usr_share_java_libformula_jar = yes; then +{ $as_echo "$as_me:${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 : LIBFORMULA_JAR=/usr/share/java/libformula.jar else - { { echo "$as_me:$LINENO: error: libformula.jar replacement not found." >&5 -echo "$as_me: error: libformula.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libformula.jar replacement not found." "$LINENO" 5 fi @@ -28140,79 +21618,70 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$LIBFORMULA_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $LIBFORMULA_JAR" >&5 -echo $ECHO_N "checking for $LIBFORMULA_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$LIBFORMULA_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBFORMULA_JAR" >&5 +$as_echo_n "checking for $LIBFORMULA_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$LIBFORMULA_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: libformula.jar not found." >&5 -echo "$as_me: error: libformula.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libformula.jar not found." "$LINENO" 5 fi fi if test -z $LIBREPOSITORY_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/librepository-1.0.0.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/librepository-1.0.0.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_librepository_1_0_0_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_librepository_1_0_0_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_librepository_1_0_0_jar" >&6 -if test $ac_cv_file__usr_share_java_librepository_1_0_0_jar = yes; then +{ $as_echo "$as_me:${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 : LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/librepository.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/librepository.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_librepository_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_librepository_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_librepository_jar" >&6 -if test $ac_cv_file__usr_share_java_librepository_jar = yes; then +{ $as_echo "$as_me:${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 : LIBREPOSITORY_JAR=/usr/share/java/librepository.jar else - { { echo "$as_me:$LINENO: error: librepository.jar replacement not found." >&5 -echo "$as_me: error: librepository.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "librepository.jar replacement not found." "$LINENO" 5 fi @@ -28221,79 +21690,70 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$LIBREPOSITORY_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $LIBREPOSITORY_JAR" >&5 -echo $ECHO_N "checking for $LIBREPOSITORY_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$LIBREPOSITORY_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBREPOSITORY_JAR" >&5 +$as_echo_n "checking for $LIBREPOSITORY_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$LIBREPOSITORY_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: librepository.jar not found." >&5 -echo "$as_me: error: librepository.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "librepository.jar not found." "$LINENO" 5 fi fi if test -z $LIBFONTS_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/libfonts-1.0.0.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libfonts-1.0.0.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_libfonts_1_0_0_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libfonts_1_0_0_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libfonts_1_0_0_jar" >&6 -if test $ac_cv_file__usr_share_java_libfonts_1_0_0_jar = yes; then +{ $as_echo "$as_me:${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 : LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/libfonts.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libfonts.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_libfonts_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libfonts_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libfonts_jar" >&6 -if test $ac_cv_file__usr_share_java_libfonts_jar = yes; then +{ $as_echo "$as_me:${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 : LIBFONTS_JAR=/usr/share/java/libfonts.jar else - { { echo "$as_me:$LINENO: error: libfonts.jar replacement not found." >&5 -echo "$as_me: error: libfonts.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libfonts.jar replacement not found." "$LINENO" 5 fi @@ -28302,79 +21762,70 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$LIBFONTS_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $LIBFONTS_JAR" >&5 -echo $ECHO_N "checking for $LIBFONTS_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$LIBFONTS_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBFONTS_JAR" >&5 +$as_echo_n "checking for $LIBFONTS_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$LIBFONTS_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: libfonts.jar not found." >&5 -echo "$as_me: error: libfonts.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libfonts.jar not found." "$LINENO" 5 fi fi if test -z $LIBSERIALIZER_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/libserializer-1.0.0.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libserializer-1.0.0.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_libserializer_1_0_0_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libserializer_1_0_0_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libserializer_1_0_0_jar" >&6 -if test $ac_cv_file__usr_share_java_libserializer_1_0_0_jar = yes; then +{ $as_echo "$as_me:${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 : LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/libserializer.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libserializer.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_libserializer_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libserializer_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libserializer_jar" >&6 -if test $ac_cv_file__usr_share_java_libserializer_jar = yes; then +{ $as_echo "$as_me:${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 : LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar else - { { echo "$as_me:$LINENO: error: libserializer.jar replacement not found." >&5 -echo "$as_me: error: libserializer.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libserializer.jar replacement not found." "$LINENO" 5 fi @@ -28383,80 +21834,71 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$LIBSERIALIZER_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $LIBSERIALIZER_JAR" >&5 -echo $ECHO_N "checking for $LIBSERIALIZER_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$LIBSERIALIZER_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBSERIALIZER_JAR" >&5 +$as_echo_n "checking for $LIBSERIALIZER_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$LIBSERIALIZER_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: libserializer.jar not found." >&5 -echo "$as_me: error: libserializer.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libserializer.jar not found." "$LINENO" 5 fi fi if test -z $LIBBASE_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/libbase-1.0.0.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libbase-1.0.0.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_libbase_1_0_0_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libbase_1_0_0_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libbase_1_0_0_jar" >&6 -if test $ac_cv_file__usr_share_java_libbase_1_0_0_jar = yes; then +{ $as_echo "$as_me:${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 : LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/libbase.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libbase.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_libbase_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libbase_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libbase_jar" >&6 -if test $ac_cv_file__usr_share_java_libbase_jar = yes; then +{ $as_echo "$as_me:${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 : LIBBASE_JAR=/usr/share/java/libbase.jar else - { { echo "$as_me:$LINENO: error: libbase.jar replacement not found." >&5 -echo "$as_me: error: libbase.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libbase.jar replacement not found." "$LINENO" 5 fi @@ -28465,54 +21907,49 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$LIBBASE_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $LIBBASE_JAR" >&5 -echo $ECHO_N "checking for $LIBBASE_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$LIBBASE_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBBASE_JAR" >&5 +$as_echo_n "checking for $LIBBASE_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$LIBBASE_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: libbase.jar not found." >&5 -echo "$as_me: error: libbase.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "libbase.jar not found." "$LINENO" 5 fi fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 - echo "$as_me:$LINENO: checking for jfreereport module" >&5 -echo $ECHO_N "checking for jfreereport module... $ECHO_C" >&6 + { $as_echo "$as_me:${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; } if test -d ./jfreereport; then - echo "$as_me:$LINENO: result: OK" >&5 -echo "${ECHO_T}OK" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 +$as_echo "OK" >&6; } else - { { echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "not existing. get it (did you get the -extensions tarball?)" "$LINENO" 5 fi SYSTEM_JFREEREPORT=NO BUILD_TYPE="$BUILD_TYPE JFREEREPORT" fi BUILD_TYPE="$BUILD_TYPE REPORTBUILDER" else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ENABLE_REPORTBUILDER=NO SYSTEM_JFREEREPORT=NO fi @@ -28533,58 +21970,52 @@ fi # this has to be here because both the wiki publisher and the SRB use # commons-logging if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then - echo "$as_me:$LINENO: checking which Apache commons-* libs to use" >&5 -echo $ECHO_N "checking which Apache commons-* libs to use... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which Apache commons-* libs to use" >&5 +$as_echo_n "checking which Apache commons-* libs to use... " >&6; } if test "$with_system_apache_commons" = "yes"; then SYSTEM_APACHE_COMMONS=YES - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } if test "$ENABLE_MEDIAWIKI" = "YES"; then if test -z $COMMONS_CODEC_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/commons-codec-1.3.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/commons-codec-1.3.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_commons_codec_1_3_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_codec_1_3_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_codec_1_3_jar" >&6 -if test $ac_cv_file__usr_share_java_commons_codec_1_3_jar = yes; then +{ $as_echo "$as_me:${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 : COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/commons-codec.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/commons-codec.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_commons_codec_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_codec_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_codec_jar" >&6 -if test $ac_cv_file__usr_share_java_commons_codec_jar = yes; then +{ $as_echo "$as_me:${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 : COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar else - { { echo "$as_me:$LINENO: error: commons-codec.jar replacement not found." >&5 -echo "$as_me: error: commons-codec.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "commons-codec.jar replacement not found." "$LINENO" 5 fi @@ -28593,79 +22024,70 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$COMMONS_CODEC_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $COMMONS_CODEC_JAR" >&5 -echo $ECHO_N "checking for $COMMONS_CODEC_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$COMMONS_CODEC_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $COMMONS_CODEC_JAR" >&5 +$as_echo_n "checking for $COMMONS_CODEC_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$COMMONS_CODEC_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: commons-codec.jar not found." >&5 -echo "$as_me: error: commons-codec.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "commons-codec.jar not found." "$LINENO" 5 fi fi if test -z $COMMONS_LANG_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/commons-lang-2.3.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/commons-lang-2.3.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_commons_lang_2_3_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_lang_2_3_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_lang_2_3_jar" >&6 -if test $ac_cv_file__usr_share_java_commons_lang_2_3_jar = yes; then +{ $as_echo "$as_me:${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 : COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/commons-lang.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/commons-lang.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_commons_lang_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_lang_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_lang_jar" >&6 -if test $ac_cv_file__usr_share_java_commons_lang_jar = yes; then +{ $as_echo "$as_me:${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 : COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar else - { { echo "$as_me:$LINENO: error: commons-lang.jar replacement not found." >&5 -echo "$as_me: error: commons-lang.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "commons-lang.jar replacement not found." "$LINENO" 5 fi @@ -28674,79 +22096,70 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$COMMONS_LANG_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $COMMONS_LANG_JAR" >&5 -echo $ECHO_N "checking for $COMMONS_LANG_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$COMMONS_LANG_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $COMMONS_LANG_JAR" >&5 +$as_echo_n "checking for $COMMONS_LANG_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$COMMONS_LANG_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: commons-lang.jar not found." >&5 -echo "$as_me: error: commons-lang.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "commons-lang.jar not found." "$LINENO" 5 fi fi if test -z $COMMONS_HTTPCLIENT_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/commons-httpclient-3.1.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/commons-httpclient-3.1.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_commons_httpclient_3_1_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_httpclient_3_1_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_httpclient_3_1_jar" >&6 -if test $ac_cv_file__usr_share_java_commons_httpclient_3_1_jar = yes; then +{ $as_echo "$as_me:${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 : COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/commons-httpclient.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/commons-httpclient.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_commons_httpclient_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_httpclient_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_httpclient_jar" >&6 -if test $ac_cv_file__usr_share_java_commons_httpclient_jar = yes; then +{ $as_echo "$as_me:${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 : COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar else - { { echo "$as_me:$LINENO: error: commons-httpclient.jar replacement not found." >&5 -echo "$as_me: error: commons-httpclient.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "commons-httpclient.jar replacement not found." "$LINENO" 5 fi @@ -28755,80 +22168,71 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$COMMONS_HTTPCLIENT_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $COMMONS_HTTPCLIENT_JAR" >&5 -echo $ECHO_N "checking for $COMMONS_HTTPCLIENT_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$COMMONS_HTTPCLIENT_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $COMMONS_HTTPCLIENT_JAR" >&5 +$as_echo_n "checking for $COMMONS_HTTPCLIENT_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$COMMONS_HTTPCLIENT_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: commons-httpclient.jar not found." >&5 -echo "$as_me: error: commons-httpclient.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "commons-httpclient.jar not found." "$LINENO" 5 fi fi fi if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then if test -z $COMMONS_LOGGING_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/commons-logging-1.1.1.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/commons-logging-1.1.1.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_commons_logging_1_1_1_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_logging_1_1_1_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_logging_1_1_1_jar" >&6 -if test $ac_cv_file__usr_share_java_commons_logging_1_1_1_jar = yes; then +{ $as_echo "$as_me:${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 : COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/commons-logging.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/commons-logging.jar... $ECHO_C" >&6 -if test "${ac_cv_file__usr_share_java_commons_logging_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 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 -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_logging_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_logging_jar" >&6 -if test $ac_cv_file__usr_share_java_commons_logging_jar = yes; then +{ $as_echo "$as_me:${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 : COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar else - { { echo "$as_me:$LINENO: error: commons-logging.jar replacement not found." >&5 -echo "$as_me: error: commons-logging.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "commons-logging.jar replacement not found." "$LINENO" 5 fi @@ -28837,37 +22241,34 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$COMMONS_LOGGING_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $COMMONS_LOGGING_JAR" >&5 -echo $ECHO_N "checking for $COMMONS_LOGGING_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$COMMONS_LOGGING_JAR" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $COMMONS_LOGGING_JAR" >&5 +$as_echo_n "checking for $COMMONS_LOGGING_JAR... " >&6; } +if eval "test \"\${$as_ac_File+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$COMMONS_LOGGING_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then - : +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + else - { { echo "$as_me:$LINENO: error: commons-logging.jar not found." >&5 -echo "$as_me: error: commons-logging.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "commons-logging.jar not found." "$LINENO" 5 fi fi fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_APACHE_COMMONS=NO BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT" fi @@ -28919,8 +22320,8 @@ if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then kde_test_include="ksharedptr.h" kde_test_library="libkdeui.so" - echo "$as_me:$LINENO: checking for Qt headers" >&5 -echo $ECHO_N "checking for Qt headers... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt headers" >&5 +$as_echo_n "checking for Qt headers... " >&6; } qt_incdir="no" for kde_check in $qt_incdirs ; do if test -r "$kde_check/$qt_test_include" ; then @@ -28928,18 +22329,15 @@ echo $ECHO_N "checking for Qt headers... $ECHO_C" >&6 break fi done - echo "$as_me:$LINENO: result: $qt_incdir" >&5 -echo "${ECHO_T}$qt_incdir" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $qt_incdir" >&5 +$as_echo "$qt_incdir" >&6; } if test "x$qt_incdir" = "xno" ; then - { { echo "$as_me:$LINENO: error: Qt headers not found. Please specify the root of -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; }; } + as_fn_error $? "Qt headers not found. Please specify the root of +your Qt installation by exporting QTDIR before running \"configure\"." "$LINENO" 5 fi - echo "$as_me:$LINENO: checking for Qt libraries" >&5 -echo $ECHO_N "checking for Qt libraries... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt libraries" >&5 +$as_echo_n "checking for Qt libraries... " >&6; } qt_libdir="no" for qt_check in $qt_libdirs ; do if test -r "$qt_check/$qt_test_library" ; then @@ -28947,22 +22345,19 @@ echo $ECHO_N "checking for Qt libraries... $ECHO_C" >&6 break fi done - echo "$as_me:$LINENO: result: $qt_libdir" >&5 -echo "${ECHO_T}$qt_libdir" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $qt_libdir" >&5 +$as_echo "$qt_libdir" >&6; } if test "x$qt_libdir" = "xno" ; then - { { echo "$as_me:$LINENO: error: Qt libraries not found. Please specify the root of -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; }; } + as_fn_error $? "Qt libraries not found. Please specify the root of +your Qt installation by exporting QTDIR before running \"configure\"." "$LINENO" 5 fi # Extract the first word of "moc", so it can be a program name with args. set dummy moc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_MOC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $MOC in [\\/]* | ?:[\\/]*) @@ -28975,39 +22370,37 @@ 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MOC="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_MOC" && ac_cv_path_MOC="no" ;; esac fi MOC=$ac_cv_path_MOC - if test -n "$MOC"; then - echo "$as_me:$LINENO: result: $MOC" >&5 -echo "${ECHO_T}$MOC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOC" >&5 +$as_echo "$MOC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test "$MOC" = "no" ; then - { { echo "$as_me:$LINENO: error: Qt Meta Object Compiler not found. Please specify -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; }; } + 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 fi - echo "$as_me:$LINENO: checking for KDE headers" >&5 -echo $ECHO_N "checking for KDE headers... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for KDE headers" >&5 +$as_echo_n "checking for KDE headers... " >&6; } kde_incdir="no" for kde_check in $kde_incdirs ; do if test -r "$kde_check/$kde_test_include" ; then @@ -29015,18 +22408,15 @@ echo $ECHO_N "checking for KDE headers... $ECHO_C" >&6 break fi done - echo "$as_me:$LINENO: result: $kde_incdir" >&5 -echo "${ECHO_T}$kde_incdir" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kde_incdir" >&5 +$as_echo "$kde_incdir" >&6; } if test "x$kde_incdir" = "xno" ; then - { { echo "$as_me:$LINENO: error: KDE headers not found. Please specify the root of -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; }; } + as_fn_error $? "KDE headers not found. Please specify the root of +your KDE installation by exporting KDEDIR before running \"configure\"." "$LINENO" 5 fi - echo "$as_me:$LINENO: checking for KDE libraries" >&5 -echo $ECHO_N "checking for KDE libraries... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for KDE libraries" >&5 +$as_echo_n "checking for KDE libraries... " >&6; } kde_libdir="no" for kde_check in $kde_libdirs ; do if test -r "$kde_check/$kde_test_library" ; then @@ -29034,14 +22424,11 @@ echo $ECHO_N "checking for KDE libraries... $ECHO_C" >&6 break fi done - echo "$as_me:$LINENO: result: $kde_libdir" >&5 -echo "${ECHO_T}$kde_libdir" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kde_libdir" >&5 +$as_echo "$kde_libdir" >&6; } if test "x$kde_libdir" = "xno" ; then - { { echo "$as_me:$LINENO: error: KDE libraries not found. Please specify the root of -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; }; } + as_fn_error $? "KDE libraries not found. Please specify the root of +your KDE installation by exporting KDEDIR before running \"configure\"." "$LINENO" 5 fi KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT" @@ -29081,8 +22468,8 @@ if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then kde_test_include="ksharedptr.h" kde_test_library="libkdeui.so" - echo "$as_me:$LINENO: checking for Qt4 headers" >&5 -echo $ECHO_N "checking for Qt4 headers... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt4 headers" >&5 +$as_echo_n "checking for Qt4 headers... " >&6; } qt_header_dir="no" for inc_dir in $qt_incdirs ; do if test -r "$inc_dir/$qt_test_include" ; then @@ -29091,16 +22478,14 @@ echo $ECHO_N "checking for Qt4 headers... $ECHO_C" >&6 fi done - echo "$as_me:$LINENO: result: $qt_header_dir" >&5 -echo "${ECHO_T}$qt_header_dir" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $qt_header_dir" >&5 +$as_echo "$qt_header_dir" >&6; } if test "x$qt_header_dir" = "xno" ; then - { { echo "$as_me:$LINENO: error: Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&5 -echo "$as_me: error: Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." "$LINENO" 5 fi - echo "$as_me:$LINENO: checking for Qt4 libraries" >&5 -echo $ECHO_N "checking for Qt4 libraries... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt4 libraries" >&5 +$as_echo_n "checking for Qt4 libraries... " >&6; } qt_lib_dir="no" for lib_dir in $qt_libdirs ; do if test -r "$lib_dir/$qt_test_library" ; then @@ -29109,21 +22494,19 @@ echo $ECHO_N "checking for Qt4 libraries... $ECHO_C" >&6 fi done - echo "$as_me:$LINENO: result: $qt_lib_dir" >&5 -echo "${ECHO_T}$qt_lib_dir" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $qt_lib_dir" >&5 +$as_echo "$qt_lib_dir" >&6; } if test "x$qt_lib_dir" = "xno" ; then - { { echo "$as_me:$LINENO: error: Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&5 -echo "$as_me: error: Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." "$LINENO" 5 fi # Extract the first word of "moc", so it can be a program name with args. set dummy moc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_MOC4+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $MOC4 in [\\/]* | ?:[\\/]*) @@ -29136,39 +22519,37 @@ 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MOC4="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_MOC4" && ac_cv_path_MOC4="no" ;; esac fi MOC4=$ac_cv_path_MOC4 - if test -n "$MOC4"; then - echo "$as_me:$LINENO: result: $MOC4" >&5 -echo "${ECHO_T}$MOC4" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOC4" >&5 +$as_echo "$MOC4" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test "$MOC4" = "no" ; then - { { echo "$as_me:$LINENO: error: Qt Meta Object Compiler not found. Please specify -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; }; } + 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 fi - echo "$as_me:$LINENO: checking for KDE4 headers" >&5 -echo $ECHO_N "checking for KDE4 headers... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for KDE4 headers" >&5 +$as_echo_n "checking for KDE4 headers... " >&6; } kde_incdir="no" for kde_check in $kde_incdirs ; do if test -r "$kde_check/$kde_test_include" ; then @@ -29176,16 +22557,14 @@ echo $ECHO_N "checking for KDE4 headers... $ECHO_C" >&6 break fi done - echo "$as_me:$LINENO: result: $kde_incdir" >&5 -echo "${ECHO_T}$kde_incdir" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kde_incdir" >&5 +$as_echo "$kde_incdir" >&6; } if test "x$kde_incdir" = "xno" ; then - { { echo "$as_me:$LINENO: error: KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&5 -echo "$as_me: error: KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." "$LINENO" 5 fi - echo "$as_me:$LINENO: checking for KDE4 libraries" >&5 -echo $ECHO_N "checking for KDE4 libraries... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for KDE4 libraries" >&5 +$as_echo_n "checking for KDE4 libraries... " >&6; } kde_libdir="no" for kde_check in $kde_libdirs ; do if test -r "$kde_check/$kde_test_library" ; then @@ -29194,12 +22573,10 @@ echo $ECHO_N "checking for KDE4 libraries... $ECHO_C" >&6 fi done - echo "$as_me:$LINENO: result: $kde_libdir" >&5 -echo "${ECHO_T}$kde_libdir" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kde_libdir" >&5 +$as_echo "$kde_libdir" >&6; } if test "x$kde_libdir" = "xno" ; then - { { echo "$as_me:$LINENO: error: KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&5 -echo "$as_me: error: KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." "$LINENO" 5 fi KDE4_CFLAGS="`pkg-config --cflags QtCore` `pkg-config --cflags QtGui` -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT" @@ -29209,34 +22586,34 @@ fi -echo "$as_me:$LINENO: checking whether to enable the lockdown pieces" >&5 -echo $ECHO_N "checking whether to enable the lockdown pieces... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable the lockdown pieces" >&5 +$as_echo_n "checking whether to enable the lockdown pieces... " >&6; } ENABLE_LOCKDOWN="" if test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then ENABLE_LOCKDOWN=YES - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to enable evolution 2 support" >&5 -echo $ECHO_N "checking whether to enable evolution 2 support... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable evolution 2 support" >&5 +$as_echo_n "checking whether to enable evolution 2 support... " >&6; } if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${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 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -29248,29 +22625,30 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$PKG_CONFIG" = "no" ; then @@ -29281,25 +22659,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gobject-2.0" >&5 -echo $ECHO_N "checking for gobject-2.0... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0" >&5 +$as_echo_n "checking for gobject-2.0... " >&6; } if $PKG_CONFIG --exists "gobject-2.0" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } succeeded=yes - echo "$as_me:$LINENO: checking GOBJECT_CFLAGS" >&5 -echo $ECHO_N "checking GOBJECT_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GOBJECT_CFLAGS" >&5 +$as_echo_n "checking GOBJECT_CFLAGS... " >&6; } GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0"` - echo "$as_me:$LINENO: result: $GOBJECT_CFLAGS" >&5 -echo "${ECHO_T}$GOBJECT_CFLAGS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GOBJECT_CFLAGS" >&5 +$as_echo "$GOBJECT_CFLAGS" >&6; } - echo "$as_me:$LINENO: checking GOBJECT_LIBS" >&5 -echo $ECHO_N "checking GOBJECT_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GOBJECT_LIBS" >&5 +$as_echo_n "checking GOBJECT_LIBS... " >&6; } GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0"` - echo "$as_me:$LINENO: result: $GOBJECT_LIBS" >&5 -echo "${ECHO_T}$GOBJECT_LIBS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GOBJECT_LIBS" >&5 +$as_echo "$GOBJECT_LIBS" >&6; } else GOBJECT_CFLAGS="" GOBJECT_LIBS="" @@ -29320,27 +22698,25 @@ echo "${ECHO_T}$GOBJECT_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements (gobject-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (gobject-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + 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 fi ENABLE_EVOAB2="TRUE" else ENABLE_EVOAB2="" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to enable KDE address book support" >&5 -echo $ECHO_N "checking whether to enable KDE address book support... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable KDE address book support" >&5 +$as_echo_n "checking whether to enable KDE address book support... " >&6; } if test "$enable_kdeab" = "yes" && test "$enable_kde" = "yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - ac_ext=cc + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -29348,20 +22724,15 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu save_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS $KDE_CFLAGS" - echo "$as_me:$LINENO: checking whether KDE is between 3.2 and 3.6" >&5 -echo $ECHO_N "checking whether KDE is between 3.2 and 3.6... $ECHO_C" >&6 - 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 + { $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 /* end confdefs.h. */ #include @@ -29372,31 +22743,16 @@ int main(int argc, char **argv) { } _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - 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 +if ac_fn_cxx_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -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; }; } + as_fn_error $? "KDE version too old or too recent, please use another version of KDE or disable KDE address book support" "$LINENO" 5 fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi + CXXFLAGS=$save_CXXFLAGS ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -29406,67 +22762,67 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ENABLE_KAB=TRUE else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ENABLE_KAB= fi -echo "$as_me:$LINENO: checking whether to include MathMLDTD" >&5 -echo $ECHO_N "checking whether to include MathMLDTD... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include MathMLDTD" >&5 +$as_echo_n "checking whether to include MathMLDTD... " >&6; } if test -n "$enable_mathmldtd"; then if test "$enable_mathmldtd" = "no"; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD" else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } BUILD_TYPE="$BUILD_TYPE MATHMLDTD" fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD" fi -echo "$as_me:$LINENO: checking whether to include third-party fonts" >&5 -echo $ECHO_N "checking whether to include third-party fonts... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include third-party fonts" >&5 +$as_echo_n "checking whether to include third-party fonts... " >&6; } if test "$with_fonts" != "no" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } WITH_FONTS=YES BUILD_TYPE="$BUILD_TYPE MORE_FONTS" else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } WITH_FONTS=NO SCPDEFS="$SCPDEFS -DWITHOUT_FONTS" fi -echo "$as_me:$LINENO: checking whether to include PPDs" >&5 -echo $ECHO_N "checking whether to include PPDs... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include PPDs" >&5 +$as_echo_n "checking whether to include PPDs... " >&6; } if test "$with_ppds" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } WITHOUT_PPDS=YES SCPDEFS="$SCPDEFS -DWITHOUT_PPDS" fi -echo "$as_me:$LINENO: checking whether to include AFMs" >&5 -echo $ECHO_N "checking whether to include AFMs... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include AFMs" >&5 +$as_echo_n "checking whether to include AFMs... " >&6; } if test "$with_afms" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } BUILD_TYPE="$BUILD_TYPE AFMS" else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } WITHOUT_AFMS=YES SCPDEFS="$SCPDEFS -DWITHOUT_AFMS" fi @@ -29474,13 +22830,13 @@ fi -echo "$as_me:$LINENO: checking whether and how to use Xinerama" >&5 -echo $ECHO_N "checking whether and how to use Xinerama... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether and how to use Xinerama" >&5 +$as_echo_n "checking whether and how to use Xinerama... " >&6; } if test "$_os" = "Darwin"; then USE_XINERAMA=YES XINERAMA_LINK=dynamic - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then # we have both versions, let the user decide but use the dynamic one @@ -29510,151 +22866,13 @@ elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then XINERAMA_LINK=none fi if test "$USE_XINERAMA" = "YES"; then - echo "$as_me:$LINENO: result: yes, with $XINERAMA_LINK linking" >&5 -echo "${ECHO_T}yes, with $XINERAMA_LINK linking" >&6 - 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 + { $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 : -fi -if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then - : else - { { echo "$as_me:$LINENO: error: Xinerama header not found." >&5 -echo "$as_me: error: Xinerama header not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Xinerama header not found." "$LINENO" 5 fi @@ -29665,72 +22883,43 @@ fi if test "$_os" = "Linux"; then XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl" fi - -echo "$as_me:$LINENO: checking for XineramaIsActive in -lXinerama" >&5 -echo $ECHO_N "checking for XineramaIsActive in -lXinerama... $ECHO_C" >&6 -if test "${ac_cv_lib_Xinerama_XineramaIsActive+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $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 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXinerama $XINERAMA_EXTRA_LIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char XineramaIsActive (); int main () { -XineramaIsActive (); +return XineramaIsActive (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.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 +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xinerama_XineramaIsActive=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_Xinerama_XineramaIsActive=no + ac_cv_lib_Xinerama_XineramaIsActive=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core 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_Xinerama_XineramaIsActive" >&5 -echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaIsActive" >&6 -if test $ac_cv_lib_Xinerama_XineramaIsActive = yes; then +{ $as_echo "$as_me:${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 : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXINERAMA 1 _ACEOF @@ -29738,18 +22927,16 @@ _ACEOF LIBS="-lXinerama $LIBS" else - { { echo "$as_me:$LINENO: error: Xinerama not functional?" >&5 -echo "$as_me: error: Xinerama not functional?" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Xinerama not functional?" "$LINENO" 5 fi else - echo "$as_me:$LINENO: result: no, libXinerama not found or wrong architecture." >&5 -echo "${ECHO_T}no, libXinerama not found or wrong architecture." >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, libXinerama not found or wrong architecture." >&5 +$as_echo "no, libXinerama not found or wrong architecture." >&6; } fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -29763,10 +22950,10 @@ if test -z "$with_ant_home"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_ANT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $ANT in [\\/]* | ?:[\\/]*) @@ -29778,28 +22965,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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi ANT=$ac_cv_path_ANT - if test -n "$ANT"; then - echo "$as_me:$LINENO: result: $ANT" >&5 -echo "${ECHO_T}$ANT" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANT" >&5 +$as_echo "$ANT" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$ANT" && break done @@ -29811,10 +22999,10 @@ else do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_ANT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $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 else case $ANT in [\\/]* | ?:[\\/]*) @@ -29827,28 +23015,29 @@ 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi ANT=$ac_cv_path_ANT - if test -n "$ANT"; then - echo "$as_me:$LINENO: result: $ANT" >&5 -echo "${ECHO_T}$ANT" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANT" >&5 +$as_echo "$ANT" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$ANT" && break done @@ -29857,9 +23046,7 @@ done fi if test -z "$ANT"; then - { { echo "$as_me:$LINENO: error: Ant not found - Make sure it's in the path or use --with-ant-home" >&5 -echo "$as_me: error: Ant not found - Make sure it's in the path or use --with-ant-home" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Ant not found - Make sure it's in the path or use --with-ant-home" "$LINENO" 5 else # resolve relative or absolute symlink while test -h "$ANT"; do @@ -29877,8 +23064,8 @@ else export ANT_HOME fi - echo "$as_me:$LINENO: checking if $ANT works" >&5 -echo $ECHO_N "checking if $ANT works... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $ANT works" >&5 +$as_echo_n "checking if $ANT works... " >&6; } cat > conftest.java << EOF public class conftest { int testmethod(int a, int b) { @@ -29902,14 +23089,14 @@ EOF else ant_cmd="$ANT -buildfile conftest.xml 1>&2" fi - { (eval echo "$as_me:$LINENO: \"$ant_cmd\"") >&5 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ant_cmd\""; } >&5 (eval $ant_cmd) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } if test $? = 0 && test -f ./conftest.class ; then - echo "$as_me:$LINENO: result: Ant works" >&5 -echo "${ECHO_T}Ant works" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Ant works" >&5 +$as_echo "Ant works" >&6; } if test -z "$WITH_ANT_HOME"; then ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"` if test -z "$ANT_HOME"; then @@ -29922,8 +23109,8 @@ echo "${ECHO_T}Ant works" >&6 echo "configure: Ant test failed" >&5 cat conftest.java >&5 cat conftest.xml >&5 - { echo "$as_me:$LINENO: WARNING: Ant does not work - Some Java projects will not build!" >&5 -echo "$as_me: WARNING: Ant does not work - Some Java projects will not build!" >&2;} + { $as_echo "$as_me:${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;} ANT_HOME="" echo "Ant does not work - Some Java projects will not build!" >>warn fi @@ -29936,8 +23123,8 @@ fi if test "$ANT_HOME" != "NO_ANT_HOME"; then - echo "$as_me:$LINENO: checking Ant lib directory" >&5 -echo $ECHO_N "checking Ant lib directory... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ant lib directory" >&5 +$as_echo_n "checking Ant lib directory... " >&6; } if test -f $ANT_HOME/lib/ant.jar; then ANT_LIB="$ANT_HOME/lib" else @@ -29953,16 +23140,14 @@ echo $ECHO_N "checking Ant lib directory... $ECHO_C" >&6 if test -f $ANT_HOME/lib/ant/ant.jar; then ANT_LIB="$ANT_HOME/lib/ant" else - { { echo "$as_me:$LINENO: error: Ant libraries not found!" >&5 -echo "$as_me: error: Ant libraries not found!" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Ant libraries not found!" "$LINENO" 5 fi fi fi fi fi - echo "$as_me:$LINENO: result: Ant lib directory found." >&5 -echo "${ECHO_T}Ant lib directory found." >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Ant lib directory found." >&5 +$as_echo "Ant lib directory found." >&6; } fi fi @@ -29974,8 +23159,8 @@ if test "$ENABLE_MEDIAWIKI" = "YES"; then fi ant_minminor1=`echo $ant_minver | cut -d"." -f2` -echo "$as_me:$LINENO: checking whether ant is >= $ant_minver" >&5 -echo $ECHO_N "checking whether ant is >= $ant_minver... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ant is >= $ant_minver" >&5 +$as_echo_n "checking whether ant is >= $ant_minver... " >&6; } ant_version=`$ANT -version | $AWK '{ print $4; }'` ant_version_major=`echo $ant_version | cut -d. -f1` ant_version_minor=`echo $ant_version | cut -d. -f2` @@ -29983,20 +23168,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 - echo "$as_me:$LINENO: result: yes, $ant_version" >&5 -echo "${ECHO_T}yes, $ant_version" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $ant_version" >&5 +$as_echo "yes, $ant_version" >&6; } elif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then - echo "$as_me:$LINENO: result: yes, $ant_version" >&5 -echo "${ECHO_T}yes, $ant_version" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $ant_version" >&5 +$as_echo "yes, $ant_version" >&6; } else - { { echo "$as_me:$LINENO: error: no, you need at least ant >= $ant_minver" >&5 -echo "$as_me: error: no, you need at least ant >= $ant_minver" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no, you need at least ant >= $ant_minver" "$LINENO" 5 fi if test "$ENABLE_MEDIAWIKI" = "YES"; then -echo "$as_me:$LINENO: checking whether ant supports mapper type=\"regexp\"" >&5 -echo $ECHO_N "checking whether ant supports mapper type=\"regexp\"... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ant supports mapper type=\"regexp\"" >&5 +$as_echo_n "checking whether ant supports mapper type=\"regexp\"... " >&6; } rm -rf confdir mkdir confdir cat > conftest.java << EOF @@ -30028,31 +23211,29 @@ EOF else ant_cmd="$ANT -buildfile conftest.xml 1>&2" fi - { (eval echo "$as_me:$LINENO: \"$ant_cmd\"") >&5 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ant_cmd\""; } >&5 (eval $ant_cmd) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } if test $? = 0 && test -f ./conftest.class ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } rm -rf confdir else echo "configure: Ant test failed" >&5 cat conftest.java >&5 cat conftest.xml >&5 rm -rf confdir - { { echo "$as_me:$LINENO: error: no. Did you install ant-apache-regexp?" >&5 -echo "$as_me: error: no. Did you install ant-apache-regexp?" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no. Did you install ant-apache-regexp?" "$LINENO" 5 fi fi rm -f conftest* core core.* *.core OOO_JUNIT_JAR= if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then - echo "$as_me:$LINENO: checking for JUnit 4" >&5 -echo $ECHO_N "checking for JUnit 4... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JUnit 4" >&5 +$as_echo_n "checking for JUnit 4... " >&6; } if test "$with_junit" == "yes"; then if test -e /usr/share/java/junit4.jar; then OOO_JUNIT_JAR=/usr/share/java/junit4.jar @@ -30068,188 +23249,184 @@ echo $ECHO_N "checking for JUnit 4... $ECHO_C" >&6 "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" 2>&5 | \ grep org/junit/Before.class > /dev/null 2>&5 if test $? -eq 0; then - echo "$as_me:$LINENO: result: $OOO_JUNIT_JAR" >&5 -echo "${ECHO_T}$OOO_JUNIT_JAR" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OOO_JUNIT_JAR" >&5 +$as_echo "$OOO_JUNIT_JAR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: cannot find JUnit 4 jar; please install one in the default + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "cannot find JUnit 4 jar; please install one in the default location (/usr/share/java), specify its pathname via ---with-junit=..., or disable it via --without-junit" >&5 -echo "$as_me: error: cannot find JUnit 4 jar; please install one in the default -location (/usr/share/java), specify its pathname via ---with-junit=..., or disable it via --without-junit" >&2;} - { (exit 1); exit 1; }; } +--with-junit=..., or disable it via --without-junit" "$LINENO" 5 fi fi -echo "$as_me:$LINENO: checking which languages to be built" >&5 -echo $ECHO_N "checking which languages to be built... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which languages to be built" >&5 +$as_echo_n "checking which languages to be built... " >&6; } WITH_LANG="$with_lang" if test -z "$WITH_LANG"; then - echo "$as_me:$LINENO: result: en-US" >&5 -echo "${ECHO_T}en-US" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: en-US" >&5 +$as_echo "en-US" >&6; } else - echo "$as_me:$LINENO: result: $WITH_LANG" >&5 -echo "${ECHO_T}$WITH_LANG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WITH_LANG" >&5 +$as_echo "$WITH_LANG" >&6; } fi -echo "$as_me:$LINENO: checking which languages have poor help localizations" >&5 -echo $ECHO_N "checking which languages have poor help localizations... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which languages have poor help localizations" >&5 +$as_echo_n "checking which languages have poor help localizations... " >&6; } WITH_POOR_HELP_LOCALIZATIONS="$with_poor_help_localizations" if test -z "$WITH_POOR_HELP_LOCALIZATIONS"; then - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } else - echo "$as_me:$LINENO: result: $WITH_POOR_HELP_LOCALIZATIONS" >&5 -echo "${ECHO_T}$WITH_POOR_HELP_LOCALIZATIONS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WITH_POOR_HELP_LOCALIZATIONS" >&5 +$as_echo "$WITH_POOR_HELP_LOCALIZATIONS" >&6; } fi -echo "$as_me:$LINENO: checking which dictionaries to include" >&5 -echo $ECHO_N "checking which dictionaries to include... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which dictionaries to include" >&5 +$as_echo_n "checking which dictionaries to include... " >&6; } if test -z "$with_dict"; then WITH_DICT=,ALL, - echo "$as_me:$LINENO: result: ALL" >&5 -echo "${ECHO_T}ALL" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ALL" >&5 +$as_echo "ALL" >&6; } else WITH_DICT=","$with_dict"," - echo "$as_me:$LINENO: result: $with_dict" >&5 -echo "${ECHO_T}$with_dict" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dict" >&5 +$as_echo "$with_dict" >&6; } fi -echo "$as_me:$LINENO: checking for additional 'intro' bitmaps" >&5 -echo $ECHO_N "checking for additional 'intro' bitmaps... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for additional 'intro' bitmaps" >&5 +$as_echo_n "checking for additional 'intro' bitmaps... " >&6; } INTRO_BITMAPS= if test -z "$with_intro_bitmaps" -o "$with_intro_bitmaps" = "no" ; then INTRO_BITMAPS= - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } else for bitmap in `echo $with_intro_bitmaps | tr ',' ' '` ; do case "$bitmap" in *.bmp) ;; - *) bitmap= ; { echo "$as_me:$LINENO: WARNING: Intro bitmaps should be .bmp files!" >&5 -echo "$as_me: WARNING: Intro bitmaps should be .bmp files!" >&2;} ;; + *) bitmap= ; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intro bitmaps should be .bmp files!" >&5 +$as_echo "$as_me: WARNING: Intro bitmaps should be .bmp files!" >&2;} ;; esac if test -n "$bitmap" ; then INTRO_BITMAPS="$INTRO_BITMAPS $bitmap" fi done - echo "$as_me:$LINENO: result: $INTRO_BITMAPS" >&5 -echo "${ECHO_T}$INTRO_BITMAPS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTRO_BITMAPS" >&5 +$as_echo "$INTRO_BITMAPS" >&6; } fi -echo "$as_me:$LINENO: checking for additional 'about' bitmaps" >&5 -echo $ECHO_N "checking for additional 'about' bitmaps... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for additional 'about' bitmaps" >&5 +$as_echo_n "checking for additional 'about' bitmaps... " >&6; } ABOUT_BITMAPS= if test -z "$with_about_bitmaps" -o "$with_about_bitmaps" = "no" ; then ABOUT_BITMAPS= - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } else for bitmap in `echo $with_about_bitmaps | tr ',' ' '` ; do case "$bitmap" in *.bmp) ;; - *) bitmap= ; { echo "$as_me:$LINENO: WARNING: About bitmaps should be .bmp files!" >&5 -echo "$as_me: WARNING: About bitmaps should be .bmp files!" >&2;} ;; + *) bitmap= ; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: About bitmaps should be .bmp files!" >&5 +$as_echo "$as_me: WARNING: About bitmaps should be .bmp files!" >&2;} ;; esac if test -n "$bitmap" ; then ABOUT_BITMAPS="$ABOUT_BITMAPS $bitmap" fi done - echo "$as_me:$LINENO: result: $ABOUT_BITMAPS" >&5 -echo "${ECHO_T}$ABOUT_BITMAPS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABOUT_BITMAPS" >&5 +$as_echo "$ABOUT_BITMAPS" >&6; } fi OOO_VENDOR= -echo "$as_me:$LINENO: checking for vendor" >&5 -echo $ECHO_N "checking for vendor... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for vendor" >&5 +$as_echo_n "checking for vendor... " >&6; } if test -z "$with_vendor" -o "$with_vendor" = "no" ; then - echo "$as_me:$LINENO: result: not set" >&5 -echo "${ECHO_T}not set" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5 +$as_echo "not set" >&6; } else OOO_VENDOR="$with_vendor" - echo "$as_me:$LINENO: result: $OOO_VENDOR" >&5 -echo "${ECHO_T}$OOO_VENDOR" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OOO_VENDOR" >&5 +$as_echo "$OOO_VENDOR" >&6; } fi UNIXWRAPPERNAME= -echo "$as_me:$LINENO: checking for UNIX wrapper name" >&5 -echo $ECHO_N "checking for UNIX wrapper name... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIX wrapper name" >&5 +$as_echo_n "checking for UNIX wrapper name... " >&6; } if test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes" ; then - echo "$as_me:$LINENO: result: not set" >&5 -echo "${ECHO_T}not set" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5 +$as_echo "not set" >&6; } else UNIXWRAPPERNAME="$with_unix_wrapper" - echo "$as_me:$LINENO: result: $UNIXWRAPPERNAME" >&5 -echo "${ECHO_T}$UNIXWRAPPERNAME" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIXWRAPPERNAME" >&5 +$as_echo "$UNIXWRAPPERNAME" >&6; } fi -echo "$as_me:$LINENO: checking whether to statically link to Gtk" >&5 -echo $ECHO_N "checking whether to statically link to Gtk... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to statically link to Gtk" >&5 +$as_echo_n "checking whether to statically link to Gtk... " >&6; } if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then ENABLE_STATIC_GTK="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else ENABLE_STATIC_GTK="FALSE" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to use layout dialogs" >&5 -echo $ECHO_N "checking whether to use layout dialogs... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use layout dialogs" >&5 +$as_echo_n "checking whether to use layout dialogs... " >&6; } if test -n "$enable_layout" && test "$enable_layout" != "no"; then ENABLE_LAYOUT="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else ENABLE_LAYOUT="FALSE" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # =================================================================== # De- or increase default verbosity of build process # =================================================================== -echo "$as_me:$LINENO: checking build verbosity" >&5 -echo $ECHO_N "checking build verbosity... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build verbosity" >&5 +$as_echo_n "checking build verbosity... " >&6; } if test -n "$enable_verbose"; then if test "$enable_verbose" = "yes"; then VERBOSE="TRUE" - echo "$as_me:$LINENO: result: high" >&5 -echo "${ECHO_T}high" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: high" >&5 +$as_echo "high" >&6; } fi if test "$enable_verbose" = "no"; then VERBOSE="FALSE" - echo "$as_me:$LINENO: result: low" >&5 -echo "${ECHO_T}low" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: low" >&5 +$as_echo "low" >&6; } fi else - echo "$as_me:$LINENO: result: not set" >&5 -echo "${ECHO_T}not set" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5 +$as_echo "not set" >&6; } fi -echo "$as_me:$LINENO: checking whether to enable dependency tracking" >&5 -echo $ECHO_N "checking whether to enable dependency tracking... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable dependency tracking" >&5 +$as_echo_n "checking whether to enable dependency tracking... " >&6; } if test "$enable_dependency_tracking" = "no"; then nodep=TRUE - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi @@ -30260,22 +23437,20 @@ echo "* *" echo "********************************************************************" if test -z "$COMPATH"; then - { { echo "$as_me:$LINENO: error: No compiler found." >&5 -echo "$as_me: error: No compiler found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "No compiler found." "$LINENO" 5 fi -echo "$as_me:$LINENO: checking solver path" >&5 -echo $ECHO_N "checking solver path... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking solver path" >&5 +$as_echo_n "checking solver path... " >&6; } if test -z "$with_local_solver"; then LOCAL_SOLVER="DEFAULT" - echo "$as_me:$LINENO: result: default" >&5 -echo "${ECHO_T}default" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5 +$as_echo "default" >&6; } else LOCAL_SOLVER=$with_local_solver - echo "$as_me:$LINENO: result: $with_local_solver" >&5 -echo "${ECHO_T}$with_local_solver" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_local_solver" >&5 +$as_echo "$with_local_solver" >&6; } fi @@ -30284,7 +23459,8 @@ fi # make sure config.guess is +x; we execute config.guess, so it has to be so; chmod +x ./config.guess - ac_config_files="$ac_config_files set_soenv Makefile" +ac_config_files="$ac_config_files set_soenv Makefile" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -30303,39 +23479,59 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${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 `(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 \). + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -30344,63 +23540,55 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, +# take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -30408,12 +23596,15 @@ LTLIBOBJS=$ac_ltlibobjs + : ${CONFIG_STATUS=./config.status} +ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:${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 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -30423,81 +23614,252 @@ cat >$CONFIG_STATUS <<_ACEOF debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +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 : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +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' fi -DUALCASE=1; export DUALCASE # for MKS sh -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +# 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 PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS 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=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi -done + $as_echo "$as_me: error: $2" >&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 -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -# PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -30505,148 +23867,123 @@ 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:$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= ;; +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';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file else - as_expr=false + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# 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 if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -30655,31 +23992,20 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 - -# Open the log real soon, to keep \$[0] and so on meaningful, and to +## ----------------------------------- ## +## 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 # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -30687,124 +24013,117 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF -# Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" -cat >>$CONFIG_STATUS <<\_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$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. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE Configuration files: $config_files -Report bugs to ." -_ACEOF +Report bugs to the package provider." -cat >>$CONFIG_STATUS <<_ACEOF +_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.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.67, + with options \\"\$ac_cs_config\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +AWK='$AWK' +test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; } ;; + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; esac shift @@ -30818,31 +24137,45 @@ if $ac_cs_silent; then fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - - -cat >>$CONFIG_STATUS <<\_ACEOF +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "set_soenv" ) CONFIG_FILES="$CONFIG_FILES set_soenv" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + 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 ;; 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 @@ -30852,695 +24185,411 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + 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 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) -} || + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || 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 = "" + +} { - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries 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[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi -# -# CONFIG_FILES section. -# +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@EGREP@,$EGREP,;t t -s,@AWK@,$AWK,;t t -s,@SED@,$SED,;t t -s,@LOCAL_SOLENV@,$LOCAL_SOLENV,;t t -s,@_solenv@,$_solenv,;t t -s,@UPD@,$UPD,;t t -s,@SOURCEVERSION@,$SOURCEVERSION,;t t -s,@build@,$build,;t t -s,@build_cpu@,$build_cpu,;t t -s,@build_vendor@,$build_vendor,;t t -s,@build_os@,$build_os,;t t -s,@host@,$host,;t t -s,@host_cpu@,$host_cpu,;t t -s,@host_vendor@,$host_vendor,;t t -s,@host_os@,$host_os,;t t -s,@target@,$target,;t t -s,@target_cpu@,$target_cpu,;t t -s,@target_vendor@,$target_vendor,;t t -s,@target_os@,$target_os,;t t -s,@GNUTAR@,$GNUTAR,;t t -s,@OSVERSION@,$OSVERSION,;t t -s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t -s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t -s,@ENABLE_CRASHDUMP@,$ENABLE_CRASHDUMP,;t t -s,@VC_STANDARD@,$VC_STANDARD,;t t -s,@ENABLE_WERROR@,$ENABLE_WERROR,;t t -s,@ENABLE_DEBUG@,$ENABLE_DEBUG,;t t -s,@PRODUCT@,$PRODUCT,;t t -s,@PROFULLSWITCH@,$PROFULLSWITCH,;t t -s,@PROEXT@,$PROEXT,;t t -s,@ENABLE_SYMBOLS@,$ENABLE_SYMBOLS,;t t -s,@DISABLE_STRIP@,$DISABLE_STRIP,;t t -s,@ENABLE_CUPS@,$ENABLE_CUPS,;t t -s,@ENABLE_FONTCONFIG@,$ENABLE_FONTCONFIG,;t t -s,@TARFILE_LOCATION@,$TARFILE_LOCATION,;t t -s,@DO_FETCH_TARBALLS@,$DO_FETCH_TARBALLS,;t t -s,@WITH_BINFILTER@,$WITH_BINFILTER,;t t -s,@ENABLE_DIRECTX@,$ENABLE_DIRECTX,;t t -s,@DISABLE_ACTIVEX@,$DISABLE_ACTIVEX,;t t -s,@DISABLE_ATL@,$DISABLE_ATL,;t t -s,@ENABLE_RPATH@,$ENABLE_RPATH,;t t -s,@WITH_MYSPELL_DICTS@,$WITH_MYSPELL_DICTS,;t t -s,@SYSTEM_DICTS@,$SYSTEM_DICTS,;t t -s,@DICT_SYSTEM_DIR@,$DICT_SYSTEM_DIR,;t t -s,@HYPH_SYSTEM_DIR@,$HYPH_SYSTEM_DIR,;t t -s,@THES_SYSTEM_DIR@,$THES_SYSTEM_DIR,;t t -s,@WITH_MINGWIN@,$WITH_MINGWIN,;t t -s,@SHELLPATH@,$SHELLPATH,;t t -s,@GCC_HOME@,$GCC_HOME,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@COMPATH@,$COMPATH,;t t -s,@GCCVER@,$GCCVER,;t t -s,@HAVE_LD_BSYMBOLIC_FUNCTIONS@,$HAVE_LD_BSYMBOLIC_FUNCTIONS,;t t -s,@ENABLE_PCH@,$ENABLE_PCH,;t t -s,@GNUMAKE@,$GNUMAKE,;t t -s,@_cc@,$_cc,;t t -s,@HAVE_LD_HASH_STYLE@,$HAVE_LD_HASH_STYLE,;t t -s,@PERL@,$PERL,;t t -s,@MSPDB_PATH@,$MSPDB_PATH,;t t -s,@COMEX@,$COMEX,;t t -s,@USE_MINGW@,$USE_MINGW,;t t -s,@MIDL_PATH@,$MIDL_PATH,;t t -s,@CSC_PATH@,$CSC_PATH,;t t -s,@FRAME_HOME@,$FRAME_HOME,;t t -s,@CPP@,$CPP,;t t -s,@CXX@,$CXX,;t t -s,@CXXFLAGS@,$CXXFLAGS,;t t -s,@ac_ct_CXX@,$ac_ct_CXX,;t t -s,@CXXCPP@,$CXXCPP,;t t -s,@SIZEOF_LONG@,$SIZEOF_LONG,;t t -s,@WORDS_BIGENDIAN@,$WORDS_BIGENDIAN,;t t -s,@LFS_CFLAGS@,$LFS_CFLAGS,;t t -s,@ENABLE_VBA@,$ENABLE_VBA,;t t -s,@VBA_EXTENSION@,$VBA_EXTENSION,;t t -s,@PAM@,$PAM,;t t -s,@NEW_SHADOW_API@,$NEW_SHADOW_API,;t t -s,@PAM_LINK@,$PAM_LINK,;t t -s,@CRYPT_LINK@,$CRYPT_LINK,;t t -s,@GXX_INCLUDE_PATH@,$GXX_INCLUDE_PATH,;t t -s,@MINGW_LIB_INCLUDE_PATH@,$MINGW_LIB_INCLUDE_PATH,;t t -s,@MINGW_BACKWARD_INCLUDE_PATH@,$MINGW_BACKWARD_INCLUDE_PATH,;t t -s,@MINGW_CLIB_DIR@,$MINGW_CLIB_DIR,;t t -s,@MINGW_SHARED_GCCLIB@,$MINGW_SHARED_GCCLIB,;t t -s,@MINGW_GCCLIB_EH@,$MINGW_GCCLIB_EH,;t t -s,@MINGW_SHARED_GXXLIB@,$MINGW_SHARED_GXXLIB,;t t -s,@MINGW_SHARED_LIBSTDCPP@,$MINGW_SHARED_LIBSTDCPP,;t t -s,@MINGW_GCCDLL@,$MINGW_GCCDLL,;t t -s,@MINGW_GXXDLL@,$MINGW_GXXDLL,;t t -s,@EXCEPTIONS@,$EXCEPTIONS,;t t -s,@STLPORT4@,$STLPORT4,;t t -s,@STLPORT_VER@,$STLPORT_VER,;t t -s,@USE_SYSTEM_STL@,$USE_SYSTEM_STL,;t t -s,@USE_CCACHE@,$USE_CCACHE,;t t -s,@CCACHE@,$CCACHE,;t t -s,@HAVE_GCC_VISIBILITY_FEATURE@,$HAVE_GCC_VISIBILITY_FEATURE,;t t -s,@ALLOC@,$ALLOC,;t t -s,@BUILD_VER_STRING@,$BUILD_VER_STRING,;t t -s,@SOLAR_JAVA@,$SOLAR_JAVA,;t t -s,@JAVAINTERPRETER@,$JAVAINTERPRETER,;t t -s,@JAVACOMPILER@,$JAVACOMPILER,;t t -s,@JAVACISGCJ@,$JAVACISGCJ,;t t -s,@JAVADOC@,$JAVADOC,;t t -s,@AWTLIB@,$AWTLIB,;t t -s,@JAVAAOTCOMPILER@,$JAVAAOTCOMPILER,;t t -s,@JAVA_HOME@,$JAVA_HOME,;t t -s,@JDK@,$JDK,;t t -s,@JAVAFLAGS@,$JAVAFLAGS,;t t -s,@JAVAIFLAGS@,$JAVAIFLAGS,;t t -s,@DMAKE@,$DMAKE,;t t -s,@BUILD_DMAKE@,$BUILD_DMAKE,;t t -s,@EPM@,$EPM,;t t -s,@DPKG@,$DPKG,;t t -s,@PKGMK@,$PKGMK,;t t -s,@BUILD_EPM@,$BUILD_EPM,;t t -s,@RPM@,$RPM,;t t -s,@PKGFORMAT@,$PKGFORMAT,;t t -s,@GPERF@,$GPERF,;t t -s,@BUILD_STAX@,$BUILD_STAX,;t t -s,@MINGWCXX@,$MINGWCXX,;t t -s,@ac_ct_MINGWCXX@,$ac_ct_MINGWCXX,;t t -s,@MINGWSTRIP@,$MINGWSTRIP,;t t -s,@ac_ct_MINGWSTRIP@,$ac_ct_MINGWSTRIP,;t t -s,@BUILD_UNOWINREG@,$BUILD_UNOWINREG,;t t -s,@SYSTEM_STDLIBS@,$SYSTEM_STDLIBS,;t t -s,@SYSTEM_ZLIB@,$SYSTEM_ZLIB,;t t -s,@SYSTEM_JPEG@,$SYSTEM_JPEG,;t t -s,@SYSTEM_EXPAT@,$SYSTEM_EXPAT,;t t -s,@PKG_CONFIG@,$PKG_CONFIG,;t t -s,@LIBWPD_CFLAGS@,$LIBWPD_CFLAGS,;t t -s,@LIBWPD_LIBS@,$LIBWPD_LIBS,;t t -s,@SYSTEM_LIBWPD@,$SYSTEM_LIBWPD,;t t -s,@CPPUNIT_CFLAGS@,$CPPUNIT_CFLAGS,;t t -s,@CPPUNIT_LIBS@,$CPPUNIT_LIBS,;t t -s,@SYSTEM_CPPUNIT@,$SYSTEM_CPPUNIT,;t t -s,@FREETYPE_CFLAGS@,$FREETYPE_CFLAGS,;t t -s,@FREETYPE_LIBS@,$FREETYPE_LIBS,;t t -s,@USE_FT_EMBOLDEN@,$USE_FT_EMBOLDEN,;t t -s,@LIBXSLT_CFLAGS@,$LIBXSLT_CFLAGS,;t t -s,@LIBXSLT_LIBS@,$LIBXSLT_LIBS,;t t -s,@XSLTPROC@,$XSLTPROC,;t t -s,@SYSTEM_LIBXSLT@,$SYSTEM_LIBXSLT,;t t -s,@LIBXML_CFLAGS@,$LIBXML_CFLAGS,;t t -s,@LIBXML_LIBS@,$LIBXML_LIBS,;t t -s,@SYSTEM_LIBXML@,$SYSTEM_LIBXML,;t t -s,@PYTHON@,$PYTHON,;t t -s,@PYTHON_VERSION@,$PYTHON_VERSION,;t t -s,@PYTHON_PREFIX@,$PYTHON_PREFIX,;t t -s,@PYTHON_EXEC_PREFIX@,$PYTHON_EXEC_PREFIX,;t t -s,@PYTHON_PLATFORM@,$PYTHON_PLATFORM,;t t -s,@pythondir@,$pythondir,;t t -s,@pkgpythondir@,$pkgpythondir,;t t -s,@pyexecdir@,$pyexecdir,;t t -s,@pkgpyexecdir@,$pkgpyexecdir,;t t -s,@BZIP2@,$BZIP2,;t t -s,@SYSTEM_PYTHON@,$SYSTEM_PYTHON,;t t -s,@PYTHON_CFLAGS@,$PYTHON_CFLAGS,;t t -s,@PYTHON_LIBS@,$PYTHON_LIBS,;t t -s,@HOME@,$HOME,;t t -s,@SYSTEM_DB@,$SYSTEM_DB,;t t -s,@DB_VERSION@,$DB_VERSION,;t t -s,@DB_INCLUDES@,$DB_INCLUDES,;t t -s,@DB_JAR@,$DB_JAR,;t t -s,@SYSTEM_LUCENE@,$SYSTEM_LUCENE,;t t -s,@LUCENE_CORE_JAR@,$LUCENE_CORE_JAR,;t t -s,@LUCENE_ANALYZERS_JAR@,$LUCENE_ANALYZERS_JAR,;t t -s,@ENABLE_MYSQLC@,$ENABLE_MYSQLC,;t t -s,@MYSQLCONFIG@,$MYSQLCONFIG,;t t -s,@SYSTEM_MYSQL@,$SYSTEM_MYSQL,;t t -s,@MYSQL_INC@,$MYSQL_INC,;t t -s,@MYSQL_LIB@,$MYSQL_LIB,;t t -s,@MYSQL_DEFINES@,$MYSQL_DEFINES,;t t -s,@LIBMYSQL_PATH@,$LIBMYSQL_PATH,;t t -s,@SYSTEM_MYSQL_CPPCONN@,$SYSTEM_MYSQL_CPPCONN,;t t -s,@SYSTEM_HSQLDB@,$SYSTEM_HSQLDB,;t t -s,@HSQLDB_JAR@,$HSQLDB_JAR,;t t -s,@SYSTEM_BSH@,$SYSTEM_BSH,;t t -s,@BSH_JAR@,$BSH_JAR,;t t -s,@SERIALIZER_JAR@,$SERIALIZER_JAR,;t t -s,@SYSTEM_SAXON@,$SYSTEM_SAXON,;t t -s,@SAXON_JAR@,$SAXON_JAR,;t t -s,@CURLCONFIG@,$CURLCONFIG,;t t -s,@SYSTEM_CURL@,$SYSTEM_CURL,;t t -s,@CURL_CFLAGS@,$CURL_CFLAGS,;t t -s,@CURL_LIBS@,$CURL_LIBS,;t t -s,@SYSTEM_MDDS@,$SYSTEM_MDDS,;t t -s,@SYSTEM_BOOST@,$SYSTEM_BOOST,;t t -s,@SYSTEM_VIGRA@,$SYSTEM_VIGRA,;t t -s,@SYSTEM_ODBC_HEADERS@,$SYSTEM_ODBC_HEADERS,;t t -s,@WITH_MOZILLA@,$WITH_MOZILLA,;t t -s,@WITH_LDAP@,$WITH_LDAP,;t t -s,@WITH_OPENLDAP@,$WITH_OPENLDAP,;t t -s,@MOZ_NSS_CFLAGS@,$MOZ_NSS_CFLAGS,;t t -s,@MOZ_NSS_LIBS@,$MOZ_NSS_LIBS,;t t -s,@NSS_LIB@,$NSS_LIB,;t t -s,@MOZ_NSPR_CFLAGS@,$MOZ_NSPR_CFLAGS,;t t -s,@MOZ_NSPR_LIBS@,$MOZ_NSPR_LIBS,;t t -s,@NSPR_LIB@,$NSPR_LIB,;t t -s,@MOZILLAXPCOM_CFLAGS@,$MOZILLAXPCOM_CFLAGS,;t t -s,@MOZILLAXPCOM_LIBS@,$MOZILLAXPCOM_LIBS,;t t -s,@MOZILLA_VERSION@,$MOZILLA_VERSION,;t t -s,@MOZILLA_TOOLKIT@,$MOZILLA_TOOLKIT,;t t -s,@MOZGTK2_CFLAGS@,$MOZGTK2_CFLAGS,;t t -s,@MOZGTK2_LIBS@,$MOZGTK2_LIBS,;t t -s,@MOZLIBREQ_CFLAGS@,$MOZLIBREQ_CFLAGS,;t t -s,@MOZLIBREQ_LIBS@,$MOZLIBREQ_LIBS,;t t -s,@BUILD_MOZAB@,$BUILD_MOZAB,;t t -s,@ENABLE_NSS_MODULE@,$ENABLE_NSS_MODULE,;t t -s,@MOZILLABUILD@,$MOZILLABUILD,;t t -s,@SYSTEM_MOZILLA@,$SYSTEM_MOZILLA,;t t -s,@MOZ_FLAVOUR@,$MOZ_FLAVOUR,;t t -s,@MOZ_INC@,$MOZ_INC,;t t -s,@MOZ_LIB@,$MOZ_LIB,;t t -s,@MOZ_LIB_XPCOM@,$MOZ_LIB_XPCOM,;t t -s,@MOZ_LDAP_CFLAGS@,$MOZ_LDAP_CFLAGS,;t t -s,@SYSTEM_SANE_HEADER@,$SYSTEM_SANE_HEADER,;t t -s,@SYSTEM_GENBRK@,$SYSTEM_GENBRK,;t t -s,@SYSTEM_GENCCODE@,$SYSTEM_GENCCODE,;t t -s,@SYSTEM_GENCMN@,$SYSTEM_GENCMN,;t t -s,@SYSTEM_ICU@,$SYSTEM_ICU,;t t -s,@GRAPHITE_CFLAGS@,$GRAPHITE_CFLAGS,;t t -s,@GRAPHITE_LIBS@,$GRAPHITE_LIBS,;t t -s,@ENABLE_GRAPHITE@,$ENABLE_GRAPHITE,;t t -s,@SYSTEM_GRAPHITE@,$SYSTEM_GRAPHITE,;t t -s,@X_CFLAGS@,$X_CFLAGS,;t t -s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t -s,@X_LIBS@,$X_LIBS,;t t -s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t -s,@XINC@,$XINC,;t t -s,@XLIB@,$XLIB,;t t -s,@XAU_LIBS@,$XAU_LIBS,;t t -s,@DISABLE_XAW@,$DISABLE_XAW,;t t -s,@SYSTEM_XRENDER_HEADERS@,$SYSTEM_XRENDER_HEADERS,;t t -s,@XRENDER_LINK@,$XRENDER_LINK,;t t -s,@XRANDR_CFLAGS@,$XRANDR_CFLAGS,;t t -s,@XRANDR_LIBS@,$XRANDR_LIBS,;t t -s,@XRANDR_DLOPEN@,$XRANDR_DLOPEN,;t t -s,@ENABLE_RANDR@,$ENABLE_RANDR,;t t -s,@DISABLE_NEON@,$DISABLE_NEON,;t t -s,@NEON_CFLAGS@,$NEON_CFLAGS,;t t -s,@NEON_LIBS@,$NEON_LIBS,;t t -s,@SYSTEM_NEON@,$SYSTEM_NEON,;t t -s,@NEON_VERSION@,$NEON_VERSION,;t t -s,@OPENSSL_CFLAGS@,$OPENSSL_CFLAGS,;t t -s,@OPENSSL_LIBS@,$OPENSSL_LIBS,;t t -s,@SYSTEM_OPENSSL@,$SYSTEM_OPENSSL,;t t -s,@ENABLE_AGG@,$ENABLE_AGG,;t t -s,@AGG_CFLAGS@,$AGG_CFLAGS,;t t -s,@AGG_LIBS@,$AGG_LIBS,;t t -s,@SYSTEM_AGG@,$SYSTEM_AGG,;t t -s,@AGG_VERSION@,$AGG_VERSION,;t t -s,@REDLAND_CFLAGS@,$REDLAND_CFLAGS,;t t -s,@REDLAND_LIBS@,$REDLAND_LIBS,;t t -s,@SYSTEM_REDLAND@,$SYSTEM_REDLAND,;t t -s,@HUNSPELL_CFLAGS@,$HUNSPELL_CFLAGS,;t t -s,@HUNSPELL_LIBS@,$HUNSPELL_LIBS,;t t -s,@SYSTEM_HUNSPELL@,$SYSTEM_HUNSPELL,;t t -s,@SYSTEM_HYPH@,$SYSTEM_HYPH,;t t -s,@HYPHEN_LIB@,$HYPHEN_LIB,;t t -s,@MYTHES_CFLAGS@,$MYTHES_CFLAGS,;t t -s,@MYTHES_LIBS@,$MYTHES_LIBS,;t t -s,@SYSTEM_MYTHES@,$SYSTEM_MYTHES,;t t -s,@SYSTEM_LPSOLVE@,$SYSTEM_LPSOLVE,;t t -s,@SYSTEM_LIBTEXTCAT@,$SYSTEM_LIBTEXTCAT,;t t -s,@SYSTEM_LIBTEXTCAT_DATA@,$SYSTEM_LIBTEXTCAT_DATA,;t t -s,@HAVE_GETOPT@,$HAVE_GETOPT,;t t -s,@HAVE_READDIR_R@,$HAVE_READDIR_R,;t t -s,@SYSTEM_LIBC@,$SYSTEM_LIBC,;t t -s,@PSDK_HOME@,$PSDK_HOME,;t t -s,@WINDOWS_VISTA_PSDK@,$WINDOWS_VISTA_PSDK,;t t -s,@DIRECTXSDK_HOME@,$DIRECTXSDK_HOME,;t t -s,@DIRECTXSDK_LIB@,$DIRECTXSDK_LIB,;t t -s,@NSIS_PATH@,$NSIS_PATH,;t t -s,@BISON@,$BISON,;t t -s,@FLEX@,$FLEX,;t t -s,@PATCH@,$PATCH,;t t -s,@GNUCP@,$GNUCP,;t t -s,@GNUPATCH@,$GNUPATCH,;t t -s,@CYGWIN_PATH@,$CYGWIN_PATH,;t t -s,@ML_EXE@,$ML_EXE,;t t -s,@ASM_HOME@,$ASM_HOME,;t t -s,@ZIP@,$ZIP,;t t -s,@UNZIP@,$UNZIP,;t t -s,@ZIP_HOME@,$ZIP_HOME,;t t -s,@ENABLE_GTK@,$ENABLE_GTK,;t t -s,@ENABLE_KDE@,$ENABLE_KDE,;t t -s,@ENABLE_KDE4@,$ENABLE_KDE4,;t t -s,@GCONF_CFLAGS@,$GCONF_CFLAGS,;t t -s,@GCONF_LIBS@,$GCONF_LIBS,;t t -s,@ENABLE_GCONF@,$ENABLE_GCONF,;t t -s,@GNOMEVFS_CFLAGS@,$GNOMEVFS_CFLAGS,;t t -s,@GNOMEVFS_LIBS@,$GNOMEVFS_LIBS,;t t -s,@ENABLE_GNOMEVFS@,$ENABLE_GNOMEVFS,;t t -s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t -s,@GTK_LIBS@,$GTK_LIBS,;t t -s,@DBUS_CFLAGS@,$DBUS_CFLAGS,;t t -s,@DBUS_LIBS@,$DBUS_LIBS,;t t -s,@GIO_CFLAGS@,$GIO_CFLAGS,;t t -s,@GIO_LIBS@,$GIO_LIBS,;t t -s,@ENABLE_GIO@,$ENABLE_GIO,;t t -s,@ENABLE_DBUS@,$ENABLE_DBUS,;t t -s,@ENABLE_SYSTRAY_GTK@,$ENABLE_SYSTRAY_GTK,;t t -s,@GSTREAMER_CFLAGS@,$GSTREAMER_CFLAGS,;t t -s,@GSTREAMER_LIBS@,$GSTREAMER_LIBS,;t t -s,@ENABLE_GSTREAMER@,$ENABLE_GSTREAMER,;t t -s,@CAIRO_CFLAGS@,$CAIRO_CFLAGS,;t t -s,@CAIRO_LIBS@,$CAIRO_LIBS,;t t -s,@ENABLE_CAIRO@,$ENABLE_CAIRO,;t t -s,@BUILD_PIXMAN@,$BUILD_PIXMAN,;t t -s,@SYSTEM_CAIRO@,$SYSTEM_CAIRO,;t t -s,@ENABLE_OPENGL@,$ENABLE_OPENGL,;t t -s,@ENABLE_PRESENTER_EXTRA_UI@,$ENABLE_PRESENTER_EXTRA_UI,;t t -s,@ENABLE_MINIMIZER@,$ENABLE_MINIMIZER,;t t -s,@ENABLE_PRESENTER_SCREEN@,$ENABLE_PRESENTER_SCREEN,;t t -s,@POPPLER_CFLAGS@,$POPPLER_CFLAGS,;t t -s,@POPPLER_LIBS@,$POPPLER_LIBS,;t t -s,@ENABLE_PDFIMPORT@,$ENABLE_PDFIMPORT,;t t -s,@SYSTEM_POPPLER@,$SYSTEM_POPPLER,;t t -s,@ENABLE_MEDIAWIKI@,$ENABLE_MEDIAWIKI,;t t -s,@SYSTEM_SERVLETAPI@,$SYSTEM_SERVLETAPI,;t t -s,@SERVLETAPI_JAR@,$SERVLETAPI_JAR,;t t -s,@ENABLE_REPORTBUILDER@,$ENABLE_REPORTBUILDER,;t t -s,@SYSTEM_JFREEREPORT@,$SYSTEM_JFREEREPORT,;t t -s,@SAC_JAR@,$SAC_JAR,;t t -s,@LIBXML_JAR@,$LIBXML_JAR,;t t -s,@FLUTE_JAR@,$FLUTE_JAR,;t t -s,@JFREEREPORT_JAR@,$JFREEREPORT_JAR,;t t -s,@LIBBASE_JAR@,$LIBBASE_JAR,;t t -s,@LIBLAYOUT_JAR@,$LIBLAYOUT_JAR,;t t -s,@LIBLOADER_JAR@,$LIBLOADER_JAR,;t t -s,@LIBFORMULA_JAR@,$LIBFORMULA_JAR,;t t -s,@LIBREPOSITORY_JAR@,$LIBREPOSITORY_JAR,;t t -s,@LIBFONTS_JAR@,$LIBFONTS_JAR,;t t -s,@LIBSERIALIZER_JAR@,$LIBSERIALIZER_JAR,;t t -s,@SYSTEM_APACHE_COMMONS@,$SYSTEM_APACHE_COMMONS,;t t -s,@COMMONS_CODEC_JAR@,$COMMONS_CODEC_JAR,;t t -s,@COMMONS_LANG_JAR@,$COMMONS_LANG_JAR,;t t -s,@COMMONS_HTTPCLIENT_JAR@,$COMMONS_HTTPCLIENT_JAR,;t t -s,@COMMONS_LOGGING_JAR@,$COMMONS_LOGGING_JAR,;t t -s,@MOC@,$MOC,;t t -s,@KDE_CFLAGS@,$KDE_CFLAGS,;t t -s,@KDE_LIBS@,$KDE_LIBS,;t t -s,@MOC4@,$MOC4,;t t -s,@KDE4_CFLAGS@,$KDE4_CFLAGS,;t t -s,@KDE4_LIBS@,$KDE4_LIBS,;t t -s,@ENABLE_LOCKDOWN@,$ENABLE_LOCKDOWN,;t t -s,@GOBJECT_CFLAGS@,$GOBJECT_CFLAGS,;t t -s,@GOBJECT_LIBS@,$GOBJECT_LIBS,;t t -s,@ENABLE_EVOAB2@,$ENABLE_EVOAB2,;t t -s,@ENABLE_KAB@,$ENABLE_KAB,;t t -s,@WITH_FONTS@,$WITH_FONTS,;t t -s,@WITHOUT_PPDS@,$WITHOUT_PPDS,;t t -s,@WITHOUT_AFMS@,$WITHOUT_AFMS,;t t -s,@SCPDEFS@,$SCPDEFS,;t t -s,@USE_XINERAMA@,$USE_XINERAMA,;t t -s,@XINERAMA_LINK@,$XINERAMA_LINK,;t t -s,@ANT@,$ANT,;t t -s,@ANT_HOME@,$ANT_HOME,;t t -s,@ANT_LIB@,$ANT_LIB,;t t -s,@OOO_JUNIT_JAR@,$OOO_JUNIT_JAR,;t t -s,@WITH_LANG@,$WITH_LANG,;t t -s,@WITH_POOR_HELP_LOCALIZATIONS@,$WITH_POOR_HELP_LOCALIZATIONS,;t t -s,@WITH_DICT@,$WITH_DICT,;t t -s,@INTRO_BITMAPS@,$INTRO_BITMAPS,;t t -s,@ABOUT_BITMAPS@,$ABOUT_BITMAPS,;t t -s,@OOO_VENDOR@,$OOO_VENDOR,;t t -s,@UNIXWRAPPERNAME@,$UNIXWRAPPERNAME,;t t -s,@ENABLE_STATIC_GTK@,$ENABLE_STATIC_GTK,;t t -s,@ENABLE_LAYOUT@,$ENABLE_LAYOUT,;t t -s,@VERBOSE@,$VERBOSE,;t t -s,@nodep@,$nodep,;t t -s,@LOCAL_SOLVER@,$LOCAL_SOLVER,;t t -s,@BUILD_TYPE@,$BUILD_TYPE,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF -_ACEOF +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 - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` + 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 1 "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 + + # 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;} fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat - fi -fi # test -n "$CONFIG_FILES" + # 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 -_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 ;; + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; esac - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - 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; }; }; } - + 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 ac_builddir=. -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${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 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || as_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 + ;; -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -{ (exit 0); exit 0; } + esac + +done # for ac_tag + + +as_fn_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. @@ -31560,7 +24609,11 @@ 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 || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit 1 +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;} fi -- cgit v1.2.3 From 78a83ae536b338c37fa4dfe11c4d9a738cd23ad7 Mon Sep 17 00:00:00 2001 From: ka Date: Fri, 4 Feb 2011 14:49:25 +0100 Subject: ka102: SVG import implementation --- sd/source/ui/view/drviews6.cxx | 6 +++++- sd/source/ui/view/sdview3.cxx | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx index 681192ff351b..fa06b5c6522d 100755 --- a/sd/source/ui/view/drviews6.cxx +++ b/sd/source/ui/view/drviews6.cxx @@ -449,8 +449,12 @@ void DrawViewShell::GetBmpMaskState( SfxItemSet& rSet ) pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); // valid graphic object? - if( pObj && pObj->ISA( SdrGrafObj ) && !( (SdrGrafObj*) pObj )->IsEPS() && !mpDrawView->IsTextEdit() ) + if( pObj && pObj->ISA( SdrGrafObj ) && + !( ((SdrGrafObj*) pObj)->IsEPS() || ((SdrGrafObj*) pObj)->IsRenderGraphic() ) && + !mpDrawView->IsTextEdit() ) + { bEnable = TRUE; + } // put value rSet.Put( SfxBoolItem( SID_BMPMASK_EXEC, bEnable ) ); diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index fd709dc22038..ba9b0cb0c003 100755 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -223,6 +223,7 @@ if( aPreviewSizePixel.Width() && aPreviewSizePixel.Height() ) case META_GRADIENTEX_ACTION: case META_BMPSCALEPART_ACTION: case META_BMPEXSCALEPART_ACTION: + case META_RENDERGRAPHIC_ACTION: bVector = true; break; case META_BMP_ACTION: -- cgit v1.2.3 From 6456f1d81090dd5fe44455c09ae3ede7ec6ac38a Mon Sep 17 00:00:00 2001 From: ka Date: Fri, 4 Feb 2011 14:52:54 +0100 Subject: ka102: added/removed files for SVG import and module cleanup --- .../filters/SVG___Scalable_Vector_Graphics.xcu | 13 + .../internalgraphicfilters/svg_Import.xcu | 10 + filter/source/svg/impsvgdialog.cxx | 150 +++++++++++ filter/source/svg/impsvgdialog.hxx | 96 +++++++ filter/source/svg/svgdialog.cxx | 275 +++++++++++++++++++++ filter/source/svg/svgdialog.hxx | 118 +++++++++ 6 files changed, 662 insertions(+) create mode 100644 filter/source/config/fragments/filters/SVG___Scalable_Vector_Graphics.xcu create mode 100644 filter/source/config/fragments/internalgraphicfilters/svg_Import.xcu create mode 100644 filter/source/svg/impsvgdialog.cxx create mode 100644 filter/source/svg/impsvgdialog.hxx create mode 100644 filter/source/svg/svgdialog.cxx create mode 100644 filter/source/svg/svgdialog.hxx diff --git a/filter/source/config/fragments/filters/SVG___Scalable_Vector_Graphics.xcu b/filter/source/config/fragments/filters/SVG___Scalable_Vector_Graphics.xcu new file mode 100644 index 000000000000..69ad0d0cbca2 --- /dev/null +++ b/filter/source/config/fragments/filters/SVG___Scalable_Vector_Graphics.xcu @@ -0,0 +1,13 @@ + + IMPORT ALIEN + + + + + SVG - Scalable Vector Graphics + + 0 + svg_Scalable_Vector_Graphics + + com.sun.star.drawing.DrawingDocument + diff --git a/filter/source/config/fragments/internalgraphicfilters/svg_Import.xcu b/filter/source/config/fragments/internalgraphicfilters/svg_Import.xcu new file mode 100644 index 000000000000..5e21c033947f --- /dev/null +++ b/filter/source/config/fragments/internalgraphicfilters/svg_Import.xcu @@ -0,0 +1,10 @@ + + svg_Scalable_Vector_Graphics + SVISVG + SVG - Scalable Vector Graphics + + + SVG - Scalable Vector Graphics + + IMPORT + diff --git a/filter/source/svg/impsvgdialog.cxx b/filter/source/svg/impsvgdialog.cxx new file mode 100644 index 000000000000..2f1c5cf53b15 --- /dev/null +++ b/filter/source/svg/impsvgdialog.cxx @@ -0,0 +1,150 @@ + /************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: impsvgdialog.cxx,v $ + * + * $Revision: 1.1.2.3 $ + * + * last change: $Author: ka $ $Date: 2007/06/15 14:36:19 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include "impsvgdialog.hxx" +#include + +using namespace rtl; +using namespace com::sun::star::uno; +using namespace com::sun::star::beans; + +inline sal_Int32 implMap( Window& /*rWnd*/, sal_Int32 nVal ) +{ + //return( rWnd.LogicToLogic( Size( nVal, nVal ) ).Height(), MAP_APPFONT, MAP_APPFONT ); + return( nVal << 1 ); +} + +// ---------------- +// - ImpSVGDialog - +// ---------------- + +ImpSVGDialog::ImpSVGDialog( Window* pParent/*, ResMgr& rResMgr*/, Sequence< PropertyValue >& rFilterData ) : + ModalDialog( pParent/*KA, ResId( DLG_OPTIONS, &rResMgr*/ ), + maFI( this ), + maCBTinyProfile( this ), + maCBEmbedFonts( this ), + maCBUseNativeDecoration( this ), + maBTOK( this, WB_DEF_OK ), + maBTCancel( this ), + maBTHelp( this ), + maConfigItem( String( RTL_CONSTASCII_USTRINGPARAM( SVG_EXPORTFILTER_CONFIGPATH ) ), &rFilterData ), + mbOldNativeDecoration( false ) +{ + SetText( String( RTL_CONSTASCII_USTRINGPARAM( "SVG Export Options" ) ) ); + SetOutputSizePixel( Size( implMap( *this, 177 ), implMap( *this, 77 ) ) ); + + maFI.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Export" ) ) ); + maFI.SetPosSizePixel( Point( implMap( *this, 6 ), implMap( *this, 3 ) ), + Size( implMap( *this, 165 ), implMap( *this, 8 ) ) ); + + maCBTinyProfile.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Use SVG Tiny profile" ) ) ); + maCBTinyProfile.SetPosSizePixel( Point( implMap( *this, 12 ), implMap( *this, 14 ) ), + Size( implMap( *this, 142 ), implMap( *this, 10 ) ) ); + + maCBEmbedFonts.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Embed fonts" ) ) ); + maCBEmbedFonts.SetPosSizePixel( Point( implMap( *this, 12 ), implMap( *this, 27 ) ), + Size( implMap( *this, 142 ), implMap( *this, 10 ) ) ); + + maCBUseNativeDecoration.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Use SVG native text decoration" ) ) ); + maCBUseNativeDecoration.SetPosSizePixel( Point( implMap( *this, 12 ), implMap( *this, 41 ) ), + Size( implMap( *this, 142 ), implMap( *this, 10 ) ) ); + + maCBTinyProfile.Check( maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( SVG_PROP_TINYPROFILE ) ), false ) ); + maCBEmbedFonts.Check( maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( SVG_PROP_EMBEDFONTS ) ), true ) ); + maCBUseNativeDecoration.Check( maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( SVG_PROP_NATIVEDECORATION ) ), true ) ); + + maBTOK.SetPosSizePixel( Point( implMap( *this, 12 ), implMap( *this, 57 ) ), + Size( implMap( *this, 50 ), implMap( *this, 14 ) ) ); + maBTCancel.SetPosSizePixel( Point( implMap( *this, 65 ), implMap( *this, 57 ) ), + Size( implMap( *this, 50 ), implMap( *this, 14 ) ) ); + maBTHelp.SetPosSizePixel( Point( implMap( *this, 121 ), implMap( *this, 57 ) ), + Size( implMap( *this, 50 ), implMap( *this, 14 ) ) ); + + maCBTinyProfile.SetToggleHdl( LINK( this, ImpSVGDialog, OnToggleCheckbox ) ); + OnToggleCheckbox( &maCBTinyProfile ); + + maFI.Show(); + + maCBTinyProfile.Show(); + maCBEmbedFonts.Show(); + maCBUseNativeDecoration.Show(); + + maBTOK.Show(); + maBTCancel.Show(); + maBTHelp.Show(); +} + +// ----------------------------------------------------------------------------- + +ImpSVGDialog::~ImpSVGDialog() +{ +} + +// ----------------------------------------------------------------------------- + +Sequence< PropertyValue > ImpSVGDialog::GetFilterData() +{ + maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( SVG_PROP_TINYPROFILE ) ), maCBTinyProfile.IsChecked() ); + maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( SVG_PROP_EMBEDFONTS ) ), maCBEmbedFonts.IsChecked() ); + maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( SVG_PROP_NATIVEDECORATION ) ), maCBUseNativeDecoration.IsChecked() ); + + return( maConfigItem.GetFilterData() ); +} + +// ----------------------------------------------------------------------------- + +IMPL_LINK( ImpSVGDialog, OnToggleCheckbox, CheckBox*, pBox ) +{ + if( pBox == &maCBTinyProfile ) + { + if( pBox->IsChecked() ) + { + mbOldNativeDecoration = maCBUseNativeDecoration.IsChecked(); + + maCBUseNativeDecoration.Check( false ); + maCBUseNativeDecoration.Disable(); + } + else + { + maCBUseNativeDecoration.Enable(); + maCBUseNativeDecoration.Check( mbOldNativeDecoration ); + } + } + + return 0; +} diff --git a/filter/source/svg/impsvgdialog.hxx b/filter/source/svg/impsvgdialog.hxx new file mode 100644 index 000000000000..faf8b9e3f154 --- /dev/null +++ b/filter/source/svg/impsvgdialog.hxx @@ -0,0 +1,96 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: impsvgdialog.hxx,v $ + * + * $Revision: 1.1.2.5 $ + * + * last change: $Author: ka $ $Date: 2006/03/24 10:57:24 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef IMPSVGDIALOG_HXX +#define IMPSVGDIALOG_HXX + +#ifndef _COM_SUN_STAR_UNO_SEQUENCE_H_ +#include +#endif + +#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_ +#include +#endif + +#include +#include +#include +#include +#include +#include + +#define SVG_EXPORTFILTER_CONFIGPATH "Office.Common/Filter/SVG/Export/" +#define SVG_PROP_TINYPROFILE "TinyMode" +#define SVG_PROP_EMBEDFONTS "EmbedFonts" +#define SVG_PROP_NATIVEDECORATION "UseNativeTextDecoration" +#define SVG_PROP_GLYPHPLACEMENT "GlyphPlacement" +#define SVG_PROP_OPACITY "Opacity" +#define SVG_PROP_GRADIENT "Gradient" + +// ---------------- +// - ImpSVGDialog - +// ---------------- + +class ResMgr; +class Window; + +class ImpSVGDialog : public ModalDialog +{ +private: + + FixedLine maFI; + CheckBox maCBTinyProfile; + CheckBox maCBEmbedFonts; + CheckBox maCBUseNativeDecoration; + + OKButton maBTOK; + CancelButton maBTCancel; + HelpButton maBTHelp; + + FilterConfigItem maConfigItem; + bool mbOldNativeDecoration; + + DECL_LINK( OnToggleCheckbox, CheckBox* ); + +public: + + ImpSVGDialog( Window* pParent, /*ResMgr& rResMgr,*/ + com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rFilterData ); + ~ImpSVGDialog(); + + com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > GetFilterData(); +}; + +#endif // IMPSVGDIALOG_HXX diff --git a/filter/source/svg/svgdialog.cxx b/filter/source/svg/svgdialog.cxx new file mode 100644 index 000000000000..a3054537b7b4 --- /dev/null +++ b/filter/source/svg/svgdialog.cxx @@ -0,0 +1,275 @@ + /************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svgdialog.cxx,v $ + * + * $Revision: 1.1.2.3 $ + * + * last change: $Author: ka $ $Date: 2008/05/19 10:12:43 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include "svgdialog.hxx" +#include "impsvgdialog.hxx" + +#include +#include + +#ifndef _COM_SUN_STAR_VIEW_XRENDERABLE_HPP_ +#include +#endif +#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_ +#include +#endif +#ifndef _COM_SUN_STAR_VIEW_XSELECTIONSUPPLIER_HPP_ +#include +#endif + +#define SVG_DIALOG_SERVICE_NAME "com.sun.star.comp.Draw.SVGFilterDialog" +#define SVG_DIALOG_IMPLEMENTATION_NAME SVG_DIALOG_SERVICE_NAME +#define SVG_FILTER_DATA_NAME "FilterData" + +using namespace ::rtl; +using namespace ::vcl; +using namespace ::com::sun::star; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::frame; +using namespace ::com::sun::star::view; +using namespace ::com::sun::star::document; + +// ----------------------- +// - SVGDialog functions - +// ----------------------- + +OUString SVGDialog_getImplementationName () + throw (RuntimeException) +{ + return OUString ( RTL_CONSTASCII_USTRINGPARAM ( SVG_DIALOG_IMPLEMENTATION_NAME ) ); +} + +// ----------------------------------------------------------------------------- + +Sequence< sal_Int8 > SAL_CALL SVGDialog_getImplementationId() + throw(RuntimeException) +{ + static const ::cppu::OImplementationId aId; + + return( aId.getImplementationId() ); +} + +// ----------------------------------------------------------------------------- + +Sequence< OUString > SAL_CALL SVGDialog_getSupportedServiceNames() + throw (RuntimeException) +{ + Sequence< OUString > aRet( 1 ); + + aRet.getArray()[ 0 ] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SVG_DIALOG_SERVICE_NAME ) ); + + return aRet; +} + +// ----------------------------------------------------------------------------- + +Reference< XInterface > SAL_CALL SVGDialog_createInstance( const Reference< XMultiServiceFactory > & rSMgr ) + throw( Exception ) +{ + return( static_cast< cppu::OWeakObject* >( new SVGDialog( rSMgr ) ) ); +} + +// ------------- +// - SVGDialog - +// ------------- + +SVGDialog::SVGDialog( const Reference< XMultiServiceFactory > &rxMSF ) : + OGenericUnoDialog( rxMSF ) +{ + ByteString aResMgrName( "svgfilter" ); + + aResMgrName.Append( ByteString::CreateFromInt32( 0/*SOLARUPD*/ ) ); + + // !!! KA: enable ResMgr + // mapResMgr.reset( ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ) ); +} + +// ----------------------------------------------------------------------------- + +SVGDialog::~SVGDialog() +{ +} + +// ----------------------------------------------------------------------------- + +Any SAL_CALL SVGDialog::queryInterface( const Type& rType ) + throw (RuntimeException) +{ + Any aReturn( OGenericUnoDialog::queryInterface( rType ) ); + + if( !aReturn.hasValue() ) + { + aReturn = ::cppu::queryInterface( rType, static_cast< XPropertyAccess* >( this ), + static_cast< XExporter* >( this ) ); + } + + return( aReturn ); +} + +// ----------------------------------------------------------------------------- + +void SAL_CALL SVGDialog::acquire() + throw () +{ + OWeakObject::acquire(); +} + +// ----------------------------------------------------------------------------- + +void SAL_CALL SVGDialog::release() + throw () +{ + OWeakObject::release(); +} + +// ----------------------------------------------------------------------------- + +Sequence< sal_Int8 > SAL_CALL SVGDialog::getImplementationId() + throw(RuntimeException) +{ + return SVGDialog_getImplementationId(); +} + +// ----------------------------------------------------------------------------- + +OUString SAL_CALL SVGDialog::getImplementationName() + throw (RuntimeException) +{ + return SVGDialog_getImplementationName(); +} + +// ----------------------------------------------------------------------------- + +Sequence< OUString > SAL_CALL SVGDialog::getSupportedServiceNames() + throw (RuntimeException) +{ + return SVGDialog_getSupportedServiceNames(); +} + +// ----------------------------------------------------------------------------- + +Dialog* SVGDialog::createDialog( Window* pParent ) +{ + return( ( /*KA: *mapResMgr.get() &&*/ mxSrcDoc.is() ) ? + new ImpSVGDialog( pParent/*KA: , *mapResMgr*/, maFilterData ) : + NULL ); +} + +// ----------------------------------------------------------------------------- + +void SVGDialog::executedDialog( sal_Int16 nExecutionResult ) +{ + if( nExecutionResult && m_pDialog ) + maFilterData = static_cast< ImpSVGDialog* >( m_pDialog )->GetFilterData(); + + destroyDialog(); +} + +// ----------------------------------------------------------------------------- + +Reference< XPropertySetInfo > SAL_CALL SVGDialog::getPropertySetInfo() + throw(RuntimeException) +{ + return( Reference< XPropertySetInfo >( createPropertySetInfo( getInfoHelper() ) ) ); +} + +//------------------------------------------------------------------------- +::cppu::IPropertyArrayHelper& SVGDialog::getInfoHelper() +{ + return( *const_cast< SVGDialog *>(this)->getArrayHelper() ); +} + +//------------------------------------------------------------------------------ +::cppu::IPropertyArrayHelper* SVGDialog::createArrayHelper() const +{ + Sequence< Property > aProps; + + describeProperties(aProps); + + return new ::cppu::OPropertyArrayHelper( aProps ); +} + +// ----------------------------------------------------------------------------- + +Sequence< PropertyValue > SAL_CALL SVGDialog::getPropertyValues() + throw ( RuntimeException ) +{ + sal_Int32 i, nCount; + + for( i = 0, nCount = maMediaDescriptor.getLength(); i < nCount; ++i ) + { + if( maMediaDescriptor[ i ].Name.equalsAscii( SVG_FILTER_DATA_NAME ) ) + break; + } + + if( i == nCount ) + { + maMediaDescriptor.realloc( ++nCount ); + maMediaDescriptor[ i ].Name = String( RTL_CONSTASCII_USTRINGPARAM( SVG_FILTER_DATA_NAME ) ); + } + + maMediaDescriptor[ i ].Value <<= maFilterData; + + return( maMediaDescriptor ); +} + +// ----------------------------------------------------------------------------- + +void SAL_CALL SVGDialog::setPropertyValues( const Sequence< PropertyValue >& rProps ) + throw ( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException ) +{ + maMediaDescriptor = rProps; + + for( sal_Int32 i = 0, nCount = maMediaDescriptor.getLength(); i < nCount; i++ ) + { + if( maMediaDescriptor[ i ].Name.equalsAscii( SVG_FILTER_DATA_NAME ) ) + { + maMediaDescriptor[ i ].Value >>= maFilterData; + break; + } + } +} + +// ----------------------------------------------------------------------------- + +void SAL_CALL SVGDialog::setSourceDocument( const Reference< XComponent >& xDoc ) + throw(IllegalArgumentException, RuntimeException) +{ + mxSrcDoc = xDoc; +} diff --git a/filter/source/svg/svgdialog.hxx b/filter/source/svg/svgdialog.hxx new file mode 100644 index 000000000000..b91ac44e3fab --- /dev/null +++ b/filter/source/svg/svgdialog.hxx @@ -0,0 +1,118 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svgdialog.hxx,v $ + * + * $Revision: 1.1.2.1 $ + * + * last change: $Author: ka $ $Date: 2006/03/08 08:18:10 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef SVGDIALOG_HXX +#define SVGDIALOG_HXX + +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYACCESS_HPP_ +#include +#endif +#ifndef _COM_SUN_STAR_DOCUMENT_XEXPORTER_HPP_ +#include +#endif + +#include +#include + +// ------------- +// - SVGDialog - +// ------------- + +class ResMgr; + +class SVGDialog : public ::svt::OGenericUnoDialog, + public ::comphelper::OPropertyArrayUsageHelper< SVGDialog >, + public ::com::sun::star::beans::XPropertyAccess, + public ::com::sun::star::document::XExporter +{ +private: + + ::std::auto_ptr< ResMgr > mapResMgr; + com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > maMediaDescriptor; + com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > maFilterData; + com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > mxSrcDoc; + +protected: + + // XInterface + virtual com::sun::star::uno::Any SAL_CALL queryInterface( const com::sun::star::uno::Type& aType ) throw (com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw (); + virtual void SAL_CALL release() throw (); + + // OGenericUnoDialog + virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(com::sun::star::uno::RuntimeException); + virtual rtl::OUString SAL_CALL getImplementationName() throw (com::sun::star::uno::RuntimeException); + virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() throw (com::sun::star::uno::RuntimeException); + virtual Dialog* createDialog( Window* pParent ); + virtual void executedDialog( sal_Int16 nExecutionResult ); + virtual com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(com::sun::star::uno::RuntimeException); + virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); + virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; + + // XPropertyAccess + virtual com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getPropertyValues( ) throw (com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValues( const com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aProps ) throw (com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException, com::sun::star::uno::RuntimeException); + + // XExporter + virtual void SAL_CALL setSourceDocument( const com::sun::star::uno::Reference< com::sun::star::lang::XComponent >& xDoc ) throw(com::sun::star::lang::IllegalArgumentException, com::sun::star::uno::RuntimeException); + +public: + + SVGDialog( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxMSF ); + virtual ~SVGDialog(); +}; + +// ----------------------------------------------------------------------------- + +::rtl::OUString SVGDialog_getImplementationName () + throw ( ::com::sun::star::uno::RuntimeException ); + +// ----------------------------------------------------------------------------- + +sal_Bool SAL_CALL SVGDialog_supportsService( const ::rtl::OUString& ServiceName ) + throw ( ::com::sun::star::uno::RuntimeException ); + +// ----------------------------------------------------------------------------- + +::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL SVGDialog_getSupportedServiceNames( ) + throw ( ::com::sun::star::uno::RuntimeException ); + +// ----------------------------------------------------------------------------- + +::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > + SAL_CALL SVGDialog_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) + throw ( ::com::sun::star::uno::Exception ); + +#endif // SVGDialog_HXX -- cgit v1.2.3 From 5c9af0b9251b767d88e4c191120e2eb2d7066a93 Mon Sep 17 00:00:00 2001 From: ka Date: Fri, 4 Feb 2011 14:52:54 +0100 Subject: ka102: added/removed files for SVG import and module cleanup --- .../source/mtfrenderer/rendergraphicaction.cxx | 201 ++ .../source/mtfrenderer/rendergraphicaction.hxx | 77 + .../source/filter.vcl/filter/FilterConfigCache.cxx | 596 ------ .../source/filter.vcl/filter/FilterConfigCache.hxx | 145 -- .../source/filter.vcl/filter/FilterConfigItem.cxx | 623 ------ .../filter.vcl/filter/SvFilterOptionsDialog.cxx | 270 --- .../filter.vcl/filter/SvFilterOptionsDialog.hxx | 105 - svtools/source/filter.vcl/filter/exportdialog.cxx | 1513 ------------- svtools/source/filter.vcl/filter/exportdialog.hrc | 99 - svtools/source/filter.vcl/filter/exportdialog.hxx | 216 -- svtools/source/filter.vcl/filter/exportdialog.src | 529 ----- svtools/source/filter.vcl/filter/filter.cxx | 2199 ------------------- svtools/source/filter.vcl/filter/filter2.cxx | 1339 ------------ svtools/source/filter.vcl/filter/sgf.ini | 118 - svtools/source/filter.vcl/filter/sgfbram.cxx | 662 ------ svtools/source/filter.vcl/filter/sgvmain.cxx | 1130 ---------- svtools/source/filter.vcl/filter/sgvspln.cxx | 890 -------- svtools/source/filter.vcl/filter/sgvtext.cxx | 1334 ------------ svtools/source/filter.vcl/igif/decode.cxx | 215 -- svtools/source/filter.vcl/igif/decode.hxx | 68 - svtools/source/filter.vcl/igif/gifread.cxx | 858 -------- svtools/source/filter.vcl/ixbm/xbmread.cxx | 398 ---- svtools/source/filter.vcl/ixpm/rgbtable.hxx | 695 ------ svtools/source/filter.vcl/ixpm/xpmread.cxx | 702 ------ svtools/source/filter.vcl/jpeg/jpeg.cxx | 779 ------- svtools/source/filter.vcl/jpeg/jpeg.h | 71 - svtools/source/filter.vcl/jpeg/jpegc.c | 284 --- svtools/source/filter.vcl/wmf/emfwr.cxx | 1415 ------------ svtools/source/filter.vcl/wmf/emfwr.hxx | 100 - svtools/source/filter.vcl/wmf/enhwmf.cxx | 1343 ------------ svtools/source/filter.vcl/wmf/winmtf.cxx | 2203 ------------------- svtools/source/filter.vcl/wmf/winmtf.hxx | 777 ------- svtools/source/filter.vcl/wmf/winwmf.cxx | 1431 ------------- svtools/source/filter.vcl/wmf/wmf.cxx | 114 - svtools/source/filter.vcl/wmf/wmfwr.cxx | 2096 ------------------ svtools/source/filter.vcl/wmf/wmfwr.hxx | 229 -- svtools/source/filter/FilterConfigCache.cxx | 597 ++++++ svtools/source/filter/FilterConfigCache.hxx | 145 ++ svtools/source/filter/FilterConfigItem.cxx | 623 ++++++ svtools/source/filter/SvFilterOptionsDialog.cxx | 270 +++ svtools/source/filter/SvFilterOptionsDialog.hxx | 105 + svtools/source/filter/exportdialog.cxx | 1513 +++++++++++++ svtools/source/filter/exportdialog.hrc | 99 + svtools/source/filter/exportdialog.hxx | 216 ++ svtools/source/filter/exportdialog.src | 529 +++++ svtools/source/filter/filter.cxx | 2260 ++++++++++++++++++++ svtools/source/filter/filter2.cxx | 1354 ++++++++++++ svtools/source/filter/igif/decode.cxx | 215 ++ svtools/source/filter/igif/decode.hxx | 68 + svtools/source/filter/igif/gifread.cxx | 858 ++++++++ svtools/source/filter/ixbm/xbmread.cxx | 398 ++++ svtools/source/filter/ixpm/rgbtable.hxx | 695 ++++++ svtools/source/filter/ixpm/xpmread.cxx | 702 ++++++ svtools/source/filter/jpeg/jpeg.cxx | 779 +++++++ svtools/source/filter/jpeg/jpeg.h | 71 + svtools/source/filter/jpeg/jpegc.c | 284 +++ svtools/source/filter/sgf.ini | 118 + svtools/source/filter/sgfbram.cxx | 662 ++++++ svtools/source/filter/sgvmain.cxx | 1130 ++++++++++ svtools/source/filter/sgvspln.cxx | 890 ++++++++ svtools/source/filter/sgvtext.cxx | 1334 ++++++++++++ svtools/source/filter/wmf/emfwr.cxx | 1436 +++++++++++++ svtools/source/filter/wmf/emfwr.hxx | 100 + svtools/source/filter/wmf/enhwmf.cxx | 1343 ++++++++++++ svtools/source/filter/wmf/winmtf.cxx | 2203 +++++++++++++++++++ svtools/source/filter/wmf/winmtf.hxx | 777 +++++++ svtools/source/filter/wmf/winwmf.cxx | 1431 +++++++++++++ svtools/source/filter/wmf/wmf.cxx | 114 + svtools/source/filter/wmf/wmfwr.cxx | 2124 ++++++++++++++++++ svtools/source/filter/wmf/wmfwr.hxx | 229 ++ vcl/inc/vcl/rendergraphic.hxx | 124 ++ vcl/inc/vcl/rendergraphicrasterizer.hxx | 111 + vcl/inc/vcl/svgread.hxx | 80 + vcl/source/components/rasterizer_rsvg.cxx | 633 ++++++ vcl/source/gdi/rendergraphic.cxx | 240 +++ vcl/source/gdi/rendergraphicrasterizer.cxx | 400 ++++ vcl/source/gdi/svgread.cxx | 131 ++ 77 files changed, 27669 insertions(+), 25546 deletions(-) create mode 100644 cppcanvas/source/mtfrenderer/rendergraphicaction.cxx create mode 100644 cppcanvas/source/mtfrenderer/rendergraphicaction.hxx delete mode 100644 svtools/source/filter.vcl/filter/FilterConfigCache.cxx delete mode 100644 svtools/source/filter.vcl/filter/FilterConfigCache.hxx delete mode 100644 svtools/source/filter.vcl/filter/FilterConfigItem.cxx delete mode 100644 svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx delete mode 100644 svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx delete mode 100644 svtools/source/filter.vcl/filter/exportdialog.cxx delete mode 100755 svtools/source/filter.vcl/filter/exportdialog.hrc delete mode 100755 svtools/source/filter.vcl/filter/exportdialog.hxx delete mode 100644 svtools/source/filter.vcl/filter/exportdialog.src delete mode 100644 svtools/source/filter.vcl/filter/filter.cxx delete mode 100644 svtools/source/filter.vcl/filter/filter2.cxx delete mode 100644 svtools/source/filter.vcl/filter/sgf.ini delete mode 100644 svtools/source/filter.vcl/filter/sgfbram.cxx delete mode 100644 svtools/source/filter.vcl/filter/sgvmain.cxx delete mode 100644 svtools/source/filter.vcl/filter/sgvspln.cxx delete mode 100644 svtools/source/filter.vcl/filter/sgvtext.cxx delete mode 100644 svtools/source/filter.vcl/igif/decode.cxx delete mode 100644 svtools/source/filter.vcl/igif/decode.hxx delete mode 100644 svtools/source/filter.vcl/igif/gifread.cxx delete mode 100644 svtools/source/filter.vcl/ixbm/xbmread.cxx delete mode 100644 svtools/source/filter.vcl/ixpm/rgbtable.hxx delete mode 100644 svtools/source/filter.vcl/ixpm/xpmread.cxx delete mode 100644 svtools/source/filter.vcl/jpeg/jpeg.cxx delete mode 100644 svtools/source/filter.vcl/jpeg/jpeg.h delete mode 100644 svtools/source/filter.vcl/jpeg/jpegc.c delete mode 100644 svtools/source/filter.vcl/wmf/emfwr.cxx delete mode 100644 svtools/source/filter.vcl/wmf/emfwr.hxx delete mode 100644 svtools/source/filter.vcl/wmf/enhwmf.cxx delete mode 100644 svtools/source/filter.vcl/wmf/winmtf.cxx delete mode 100644 svtools/source/filter.vcl/wmf/winmtf.hxx delete mode 100644 svtools/source/filter.vcl/wmf/winwmf.cxx delete mode 100644 svtools/source/filter.vcl/wmf/wmf.cxx delete mode 100644 svtools/source/filter.vcl/wmf/wmfwr.cxx delete mode 100644 svtools/source/filter.vcl/wmf/wmfwr.hxx create mode 100644 svtools/source/filter/FilterConfigCache.cxx create mode 100644 svtools/source/filter/FilterConfigCache.hxx create mode 100644 svtools/source/filter/FilterConfigItem.cxx create mode 100644 svtools/source/filter/SvFilterOptionsDialog.cxx create mode 100644 svtools/source/filter/SvFilterOptionsDialog.hxx create mode 100644 svtools/source/filter/exportdialog.cxx create mode 100644 svtools/source/filter/exportdialog.hrc create mode 100644 svtools/source/filter/exportdialog.hxx create mode 100644 svtools/source/filter/exportdialog.src create mode 100644 svtools/source/filter/filter.cxx create mode 100644 svtools/source/filter/filter2.cxx create mode 100644 svtools/source/filter/igif/decode.cxx create mode 100644 svtools/source/filter/igif/decode.hxx create mode 100644 svtools/source/filter/igif/gifread.cxx create mode 100644 svtools/source/filter/ixbm/xbmread.cxx create mode 100644 svtools/source/filter/ixpm/rgbtable.hxx create mode 100644 svtools/source/filter/ixpm/xpmread.cxx create mode 100644 svtools/source/filter/jpeg/jpeg.cxx create mode 100644 svtools/source/filter/jpeg/jpeg.h create mode 100644 svtools/source/filter/jpeg/jpegc.c create mode 100644 svtools/source/filter/sgf.ini create mode 100644 svtools/source/filter/sgfbram.cxx create mode 100644 svtools/source/filter/sgvmain.cxx create mode 100644 svtools/source/filter/sgvspln.cxx create mode 100644 svtools/source/filter/sgvtext.cxx create mode 100644 svtools/source/filter/wmf/emfwr.cxx create mode 100644 svtools/source/filter/wmf/emfwr.hxx create mode 100644 svtools/source/filter/wmf/enhwmf.cxx create mode 100644 svtools/source/filter/wmf/winmtf.cxx create mode 100644 svtools/source/filter/wmf/winmtf.hxx create mode 100644 svtools/source/filter/wmf/winwmf.cxx create mode 100644 svtools/source/filter/wmf/wmf.cxx create mode 100644 svtools/source/filter/wmf/wmfwr.cxx create mode 100644 svtools/source/filter/wmf/wmfwr.hxx create mode 100644 vcl/inc/vcl/rendergraphic.hxx create mode 100644 vcl/inc/vcl/rendergraphicrasterizer.hxx create mode 100644 vcl/inc/vcl/svgread.hxx create mode 100644 vcl/source/components/rasterizer_rsvg.cxx create mode 100644 vcl/source/gdi/rendergraphic.cxx create mode 100644 vcl/source/gdi/rendergraphicrasterizer.cxx create mode 100644 vcl/source/gdi/svgread.cxx diff --git a/cppcanvas/source/mtfrenderer/rendergraphicaction.cxx b/cppcanvas/source/mtfrenderer/rendergraphicaction.cxx new file mode 100644 index 000000000000..764d3eabc6af --- /dev/null +++ b/cppcanvas/source/mtfrenderer/rendergraphicaction.cxx @@ -0,0 +1,201 @@ +/************************************************************************* + * + * 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_cppcanvas.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "cachedprimitivebase.hxx" +#include "rendergraphicaction.hxx" +#include "outdevstate.hxx" +#include "mtftools.hxx" +#include + + +using namespace ::com::sun::star; + +namespace cppcanvas +{ + namespace internal + { + namespace + { + + class RenderGraphicAction : public CachedPrimitiveBase + { + public: + RenderGraphicAction( const ::vcl::RenderGraphic& rRenderGraphic, + const ::basegfx::B2DPoint& rDstPoint, + const ::basegfx::B2DVector& rDstSize, + const CanvasSharedPtr&, + const OutDevState& ); + + virtual bool render( const ::basegfx::B2DHomMatrix& rTransformation, + const Subset& rSubset ) const; + + virtual ::basegfx::B2DRange getBounds( const ::basegfx::B2DHomMatrix& rTransformation ) const; + virtual ::basegfx::B2DRange getBounds( const ::basegfx::B2DHomMatrix& rTransformation, + const Subset& rSubset ) const; + + virtual sal_Int32 getActionCount() const; + + private: + using Action::render; + virtual bool render( uno::Reference< rendering::XCachedPrimitive >& rCachedPrimitive, + const ::basegfx::B2DHomMatrix& rTransformation ) const; + + ::vcl::RenderGraphic maRenderGraphic; + uno::Reference< rendering::XBitmap > mxBitmap; + CanvasSharedPtr mpCanvas; + rendering::RenderState maState; + }; + + RenderGraphicAction::RenderGraphicAction( const ::vcl::RenderGraphic& rRenderGraphic, + const ::basegfx::B2DPoint& rDstPoint, + const ::basegfx::B2DVector& rDstSize, + const CanvasSharedPtr& rCanvas, + const OutDevState& rState ) : + CachedPrimitiveBase( rCanvas, true ), + maRenderGraphic( rRenderGraphic ), + mpCanvas( rCanvas ) + { + tools::initRenderState( maState,rState ); + + const ::vcl::RenderGraphicRasterizer aRasterizer( rRenderGraphic ); + const BitmapEx aBmpEx( aRasterizer.Rasterize( ::vcl::unotools::sizeFromB2DSize( rDstSize ) ) ); + const Size aRasteredSizePixel( aBmpEx.GetSizePixel() ); + + if( aRasteredSizePixel.Width() && aRasteredSizePixel.Height() ) + { + const ::basegfx::B2DVector aScale( rDstSize.getX() / aRasteredSizePixel.Width(), + rDstSize.getY() / aRasteredSizePixel.Height() ); + const basegfx::B2DHomMatrix aLocalTransformation( + basegfx::tools::createScaleTranslateB2DHomMatrix( aScale, rDstPoint)) ; + + ::canvas::tools::appendToRenderState( maState, aLocalTransformation ); + + // correct clip (which is relative to original transform) + tools::modifyClip( maState, rState, rCanvas, rDstPoint, &aScale, NULL ); + + mxBitmap = ::vcl::unotools::xBitmapFromBitmapEx( rCanvas->getUNOCanvas()->getDevice(), aBmpEx ); + } + } + + bool RenderGraphicAction::render( uno::Reference< rendering::XCachedPrimitive >& rCachedPrimitive, + const ::basegfx::B2DHomMatrix& rTransformation ) const + { + RTL_LOGFILE_CONTEXT( aLog, "::cppcanvas::internal::RenderGraphicAction::render()" ); + RTL_LOGFILE_CONTEXT_TRACE1( aLog, "::cppcanvas::internal::RenderGraphicAction: 0x%X", this ); + + if( mxBitmap.is() ) + { + rendering::RenderState aLocalState( maState ); + ::canvas::tools::prependToRenderState(aLocalState, rTransformation); + + rCachedPrimitive = mpCanvas->getUNOCanvas()->drawBitmap( mxBitmap, + mpCanvas->getViewState(), + aLocalState ); + } + + return true; + } + + bool RenderGraphicAction::render( const ::basegfx::B2DHomMatrix& rTransformation, + const Subset& rSubset ) const + { + // rendergraphic only contains a single action, fail if subset + // requests different range + if( rSubset.mnSubsetBegin != 0 || + rSubset.mnSubsetEnd != 1 ) + return false; + + return CachedPrimitiveBase::render( rTransformation ); + } + + ::basegfx::B2DRange RenderGraphicAction::getBounds( const ::basegfx::B2DHomMatrix& rTransformation ) const + { + ::basegfx::B2DRange aRet; + + if( mxBitmap.is() ) + { + rendering::RenderState aLocalState( maState ); + ::canvas::tools::prependToRenderState(aLocalState, rTransformation); + + geometry::IntegerSize2D aSize( mxBitmap->getSize() ); + + aRet = tools::calcDevicePixelBounds( ::basegfx::B2DRange( 0, 0, aSize.Width, aSize.Height ), + mpCanvas->getViewState(), aLocalState ); + } + + return( aRet ); + } + + ::basegfx::B2DRange RenderGraphicAction::getBounds( const ::basegfx::B2DHomMatrix& rTransformation, + const Subset& rSubset ) const + { + // rendergraphic only contains a single action, empty bounds + // if subset requests different range + if( rSubset.mnSubsetBegin != 0 || + rSubset.mnSubsetEnd != 1 ) + return ::basegfx::B2DRange(); + + return getBounds( rTransformation ); + } + + sal_Int32 RenderGraphicAction::getActionCount() const + { + return 1; + } + } + + ActionSharedPtr RenderGraphicActionFactory::createRenderGraphicAction( const ::vcl::RenderGraphic& rRenderGraphic, + const ::basegfx::B2DPoint& rDstPoint, + const ::basegfx::B2DVector& rDstSize, + const CanvasSharedPtr& rCanvas, + const OutDevState& rState ) + { + return ActionSharedPtr( new RenderGraphicAction(rRenderGraphic, + rDstPoint, + rDstSize, + rCanvas, + rState ) ); + } + } +} diff --git a/cppcanvas/source/mtfrenderer/rendergraphicaction.hxx b/cppcanvas/source/mtfrenderer/rendergraphicaction.hxx new file mode 100644 index 000000000000..f1e2dccdfe0d --- /dev/null +++ b/cppcanvas/source/mtfrenderer/rendergraphicaction.hxx @@ -0,0 +1,77 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _CPPCANVAS_RENDERGRAPHICACTION_HXX +#define _CPPCANVAS_RENDERGRAPHICACTION_HXX + +#include +#include + +namespace basegfx { + class B2DPoint; + class B2DVector; +} +namespace vcl { + class RenderGraphic; +} + +/* Definition of internal::RenderGraphicActionFactory class */ + +namespace cppcanvas +{ + namespace internal + { + struct OutDevState; + + /** Creates encapsulated converters between GDIMetaFile and + XCanvas. The Canvas argument is deliberately placed at the + constructor, to force reconstruction of this object for a + new canvas. This considerably eases internal state + handling, since a lot of the internal state (e.g. fonts, + text layout) is Canvas-dependent. + */ + class RenderGraphicActionFactory + { + public: + /// Scaled rendergraphic action, dest point and dest size + static ActionSharedPtr createRenderGraphicAction( const ::vcl::RenderGraphic& rRenderGraphic, + const ::basegfx::B2DPoint& rDstPoint, + const ::basegfx::B2DVector& rDstSize, + const CanvasSharedPtr&, + const OutDevState& ); + + private: + // static factory, disable big four + RenderGraphicActionFactory(); + ~RenderGraphicActionFactory(); + RenderGraphicActionFactory(const RenderGraphicActionFactory&); + RenderGraphicActionFactory& operator=( const RenderGraphicActionFactory& ); + }; + } +} + +#endif /*_CPPCANVAS_RENDERGRAPHICACTION_HXX */ diff --git a/svtools/source/filter.vcl/filter/FilterConfigCache.cxx b/svtools/source/filter.vcl/filter/FilterConfigCache.cxx deleted file mode 100644 index 48408609cf98..000000000000 --- a/svtools/source/filter.vcl/filter/FilterConfigCache.cxx +++ /dev/null @@ -1,596 +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_svtools.hxx" -#include "FilterConfigCache.hxx" -#include -#include -#include -#include -#include -#include -#include - -#define TOKEN_COUNT_FOR_OWN_FILTER 3 -// #define TOKEN_INDEX_FOR_IDENT 0 -#define TOKEN_INDEX_FOR_FILTER 1 -// #define TOKEN_INDEX_FOR_HASDIALOG 2 - -using namespace ::com::sun::star::lang ; // XMultiServiceFactory -using namespace ::com::sun::star::container ; // XNameAccess -using namespace ::com::sun::star::uno ; // Reference -using namespace ::com::sun::star::beans ; // PropertyValue -using namespace ::utl ; // getProcessServiceFactory(); -using ::rtl::OUString; - -const char* FilterConfigCache::FilterConfigCacheEntry::InternalPixelFilterNameList[] = -{ - IMP_BMP, IMP_GIF, IMP_PNG,IMP_JPEG, IMP_XBM, IMP_XPM, - EXP_BMP, EXP_JPEG, EXP_PNG, NULL -}; - -const char* FilterConfigCache::FilterConfigCacheEntry::InternalVectorFilterNameList[] = -{ - IMP_SVMETAFILE, IMP_WMF, IMP_EMF, IMP_SVSGF, IMP_SVSGV, - EXP_SVMETAFILE, EXP_WMF, EXP_EMF, EXP_SVG, NULL -}; - -const char* FilterConfigCache::FilterConfigCacheEntry::ExternalPixelFilterNameList[] = -{ - "egi", "icd", "ipd", "ipx", "ipb", "epb", "epg", - "epp", "ira", "era", "itg", "iti", "eti", "exp", NULL -}; - -sal_Bool FilterConfigCache::FilterConfigCacheEntry::IsValid() -{ - return sFilterName.Len() != 0; -} - -sal_Bool FilterConfigCache::bInitialized = sal_False; -sal_Int32 FilterConfigCache::nIndType = -1; -sal_Int32 FilterConfigCache::nIndUIName = -1; -sal_Int32 FilterConfigCache::nIndDocumentService = -1; -sal_Int32 FilterConfigCache::nIndFilterService = -1; -sal_Int32 FilterConfigCache::nIndFlags = -1; -sal_Int32 FilterConfigCache::nIndUserData = -1; -sal_Int32 FilterConfigCache::nIndFileFormatVersion = -1; -sal_Int32 FilterConfigCache::nIndTemplateName = -1; - -sal_Bool FilterConfigCache::FilterConfigCacheEntry::CreateFilterName( const OUString& rUserDataEntry ) -{ - bIsPixelFormat = bIsInternalFilter = sal_False; - sFilterName = String( rUserDataEntry ); - const char** pPtr; - for ( pPtr = InternalPixelFilterNameList; *pPtr && ( bIsInternalFilter == sal_False ); pPtr++ ) - { - if ( sFilterName.EqualsIgnoreCaseAscii( *pPtr ) ) - { - bIsInternalFilter = sal_True; - bIsPixelFormat = sal_True; - } - } - for ( pPtr = InternalVectorFilterNameList; *pPtr && ( bIsInternalFilter == sal_False ); pPtr++ ) - { - if ( sFilterName.EqualsIgnoreCaseAscii( *pPtr ) ) - bIsInternalFilter = sal_True; - } - if ( !bIsInternalFilter ) - { - for ( pPtr = ExternalPixelFilterNameList; *pPtr && ( bIsPixelFormat == sal_False ); pPtr++ ) - { - if ( sFilterName.EqualsIgnoreCaseAscii( *pPtr ) ) - bIsPixelFormat = sal_True; - } - String aTemp( OUString::createFromAscii( SVLIBRARY( "?" ) ) ); - xub_StrLen nIndex = aTemp.Search( (sal_Unicode)'?' ); - aTemp.Replace( nIndex, 1, sFilterName ); - sFilterName = aTemp; - } - return sFilterName.Len() != 0; -} - -String FilterConfigCache::FilterConfigCacheEntry::GetShortName() -{ - String aShortName; - if ( lExtensionList.getLength() ) - { - aShortName = lExtensionList[ 0 ]; - if ( aShortName.SearchAscii( "*.", 0 ) == 0 ) - aShortName.Erase( 0, 2 ); - } - return aShortName; -} - -/** helper to open the configuration root of the underlying - config package - - @param sPackage - specify, which config package should be opened. - Must be one of the defined static values TYPEPKG or FILTERPKG. - - @return A valid object if open was successfull. The access on opened - data will be readonly. It returns NULL in case open failed. - - @throws It let pass RuntimeExceptions only. - */ -Reference< XInterface > openConfig(const char* sPackage) - throw(RuntimeException) -{ - static OUString TYPEPKG( RTL_CONSTASCII_USTRINGPARAM( "types" ) ); - static OUString FILTERPKG( RTL_CONSTASCII_USTRINGPARAM( "filters" ) ); - - Reference< XMultiServiceFactory > xSMGR = getProcessServiceFactory(); - Reference< XInterface > xCfg; - try - { - // get access to config API (not to file!) - Reference< XMultiServiceFactory > xConfigProvider( xSMGR->createInstance( - OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider")), UNO_QUERY); - - if (xConfigProvider.is()) - { - Sequence< Any > lParams(1); - PropertyValue aParam ; - - // define cfg path for open - aParam.Name = OUString::createFromAscii("nodepath"); - if (TYPEPKG.equalsIgnoreAsciiCaseAscii(sPackage)) - aParam.Value <<= OUString::createFromAscii("/org.openoffice.TypeDetection.Types/Types"); - if (FILTERPKG.equalsIgnoreAsciiCaseAscii(sPackage)) - aParam.Value <<= OUString::createFromAscii("/org.openoffice.TypeDetection.GraphicFilter/Filters"); - lParams[0] = makeAny(aParam); - - // get access to file - xCfg = xConfigProvider->createInstanceWithArguments( - OUString::createFromAscii("com.sun.star.configuration.ConfigurationAccess"), lParams); - } - } - catch(const RuntimeException&) - { throw; } - catch(const Exception&) - { xCfg.clear(); } - - return xCfg; -} - -void FilterConfigCache::ImplInit() -{ - static OUString STYPE ( RTL_CONSTASCII_USTRINGPARAM( "Type" ) ); - static OUString SUINAME ( RTL_CONSTASCII_USTRINGPARAM( "UIName" ) ); - static OUString SDOCUMENTSERVICE ( RTL_CONSTASCII_USTRINGPARAM( "DocumentService" ) ); - static OUString SFILTERSERVICE ( RTL_CONSTASCII_USTRINGPARAM( "FilterService" ) ); - static OUString STEMPLATENAME ( RTL_CONSTASCII_USTRINGPARAM( "TemplateName" ) ); - static OUString SFILEFORMATVERSION ( RTL_CONSTASCII_USTRINGPARAM( "FileFormatVersion" ) ); - static OUString SUICOMPONENT ( RTL_CONSTASCII_USTRINGPARAM( "UIComponent" ) ); - static OUString SFLAGS ( RTL_CONSTASCII_USTRINGPARAM( "Flags" ) ); - static OUString SUSERDATA ( RTL_CONSTASCII_USTRINGPARAM( "UserData" ) ); - static OUString SMEDIATYPE ( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) ); - static OUString SEXTENSIONS ( RTL_CONSTASCII_USTRINGPARAM( "Extensions" ) ); - static OUString SFORMATNAME ( RTL_CONSTASCII_USTRINGPARAM( "FormatName" ) ); - static OUString SREALFILTERNAME ( RTL_CONSTASCII_USTRINGPARAM( "RealFilterName" ) ); - - // get access to config - Reference< XNameAccess > xTypeAccess ( openConfig("types" ), UNO_QUERY ); - Reference< XNameAccess > xFilterAccess( openConfig("filters"), UNO_QUERY ); - - if ( xTypeAccess.is() && xFilterAccess.is() ) - { - Sequence< OUString > lAllFilter = xFilterAccess->getElementNames(); - sal_Int32 nAllFilterCount = lAllFilter.getLength(); - - for ( sal_Int32 i = 0; i < nAllFilterCount; i++ ) - { - OUString sInternalFilterName = lAllFilter[ i ]; - Reference< XPropertySet > xFilterSet; - xFilterAccess->getByName( sInternalFilterName ) >>= xFilterSet; - if (!xFilterSet.is()) - continue; - - FilterConfigCacheEntry aEntry; - - aEntry.sInternalFilterName = sInternalFilterName; - xFilterSet->getPropertyValue(STYPE) >>= aEntry.sType; - xFilterSet->getPropertyValue(SUINAME) >>= aEntry.sUIName; - xFilterSet->getPropertyValue(SREALFILTERNAME) >>= aEntry.sFilterType; - Sequence< OUString > lFlags; - xFilterSet->getPropertyValue(SFLAGS) >>= lFlags; - if (lFlags.getLength()!=1 || !lFlags[0].getLength()) - continue; - if (lFlags[0].equalsIgnoreAsciiCaseAscii("import")) - aEntry.nFlags = 1; - else - if (lFlags[0].equalsIgnoreAsciiCaseAscii("export")) - aEntry.nFlags = 2; - - OUString sUIComponent; - xFilterSet->getPropertyValue(SUICOMPONENT) >>= sUIComponent; - aEntry.bHasDialog = sUIComponent.getLength(); - - ::rtl::OUString sFormatName; - xFilterSet->getPropertyValue(SFORMATNAME) >>= sFormatName; - aEntry.CreateFilterName( sFormatName ); - - Reference< XPropertySet > xTypeSet; - xTypeAccess->getByName( aEntry.sType ) >>= xTypeSet; - if (!xTypeSet.is()) - continue; - - xTypeSet->getPropertyValue(SMEDIATYPE) >>= aEntry.sMediaType; - xTypeSet->getPropertyValue(SEXTENSIONS) >>= aEntry.lExtensionList; - - // The first extension will be used - // to generate our internal FilterType ( BMP, WMF ... ) - String aExtension( aEntry.GetShortName() ); - if (aExtension.Len() != 3) - continue; - - if ( aEntry.nFlags & 1 ) - aImport.push_back( aEntry ); - if ( aEntry.nFlags & 2 ) - aExport.push_back( aEntry ); - - // bFilterEntryCreated!? - if (!( aEntry.nFlags & 3 )) - continue; //? Entry was already inserted ... but following code will be supressed?! - } - } -}; - -const char* FilterConfigCache::InternalFilterListForSvxLight[] = -{ - "bmp","1","SVBMP", - "bmp","2","SVBMP", - "dxf","1","idx", - "eps","1","ips", - "eps","2","eps", - "gif","1","SVIGIF", - "gif","2","egi", - "jpg","1","SVIJPEG", - "jpg","2","SVEJPEG", - "sgv","1","SVSGV", - "sgf","1","SVSGF", - "met","1","ime", - "met","2","eme", - "png","1","SVIPNG", - "png","2","SVEPNG", - "pct","1","ipt", - "pct","2","ept", - "pcd","1","icd", - "psd","1","ipd", - "pcx","1","ipx", - "pbm","1","ipb", - "pbm","2","epb", - "pgm","1","ipb", - "pgm","2","epg", - "ppm","1","ipb", - "ppm","2","epp", - "ras","1","ira", - "ras","2","era", - "svm","1","SVMETAFILE", - "svm","2","SVMETAFILE", - "tga","1","itg", - "tif","1","iti", - "tif","2","eti", - "emf","1","SVEMF", - "emf","2","SVEMF", - "wmf","1","SVWMF", - "wmf","2","SVWMF", - "xbm","1","SVIXBM", - "xpm","1","SVIXPM", - "xpm","2","exp", - "svg","2","SVESVG", - NULL -}; - -void FilterConfigCache::ImplInitSmart() -{ - const char** pPtr; - for ( pPtr = InternalFilterListForSvxLight; *pPtr; pPtr++ ) - { - FilterConfigCacheEntry aEntry; - - OUString sExtension( OUString::createFromAscii( *pPtr++ ) ); - - aEntry.lExtensionList.realloc( 1 ); - aEntry.lExtensionList[ 0 ] = sExtension; - - aEntry.sType = sExtension; - aEntry.sUIName = sExtension; - - ByteString sFlags( *pPtr++ ); - aEntry.nFlags = sFlags.ToInt32(); - - OUString sUserData( OUString::createFromAscii( *pPtr ) ); - aEntry.CreateFilterName( sUserData ); - - if ( aEntry.nFlags & 1 ) - aImport.push_back( aEntry ); - if ( aEntry.nFlags & 2 ) - aExport.push_back( aEntry ); - } -} - -// ------------------------------------------------------------------------ - -FilterConfigCache::FilterConfigCache( sal_Bool bConfig ) : - bUseConfig ( bConfig ) -{ - if ( bUseConfig ) - ImplInit(); - else - ImplInitSmart(); -} - -FilterConfigCache::~FilterConfigCache() -{ - -} - -String FilterConfigCache::GetImportFilterName( sal_uInt16 nFormat ) -{ - if( nFormat < aImport.size() ) - return aImport[ nFormat ].sFilterName; - return String::EmptyString(); -} - -sal_uInt16 FilterConfigCache::GetImportFormatNumber( const String& rFormatName ) -{ - CacheVector::iterator aIter( aImport.begin() ); - while ( aIter != aImport.end() ) - { - if ( aIter->sUIName.equalsIgnoreAsciiCase( rFormatName ) ) - break; - aIter++; - } - return sal::static_int_cast< sal_uInt16 >(aIter == aImport.end() ? GRFILTER_FORMAT_NOTFOUND : aIter - aImport.begin()); -} - -sal_uInt16 FilterConfigCache::GetImportFormatNumberForMediaType( const String& rMediaType ) -{ - CacheVector::iterator aIter( aImport.begin() ); - while ( aIter != aImport.end() ) - { - if ( aIter->sMediaType.equalsIgnoreAsciiCase( rMediaType ) ) - break; - aIter++; - } - return sal::static_int_cast< sal_uInt16 >(aIter == aImport.end() ? GRFILTER_FORMAT_NOTFOUND : aIter - aImport.begin()); -} - -sal_uInt16 FilterConfigCache::GetImportFormatNumberForShortName( const String& rShortName ) -{ - CacheVector::iterator aIter( aImport.begin() ); - while ( aIter != aImport.end() ) - { - if ( aIter->GetShortName().EqualsIgnoreCaseAscii( rShortName ) ) - break; - aIter++; - } - return sal::static_int_cast< sal_uInt16 >(aIter == aImport.end() ? GRFILTER_FORMAT_NOTFOUND : aIter - aImport.begin()); -} - -sal_uInt16 FilterConfigCache::GetImportFormatNumberForTypeName( const String& rType ) -{ - CacheVector::iterator aIter( aImport.begin() ); - while ( aIter != aImport.end() ) - { - if ( aIter->sType.equalsIgnoreAsciiCase( rType ) ) - break; - aIter++; - } - return sal::static_int_cast< sal_uInt16 >(aIter == aImport.end() ? GRFILTER_FORMAT_NOTFOUND : aIter - aImport.begin()); -} - -String FilterConfigCache::GetImportFormatName( sal_uInt16 nFormat ) -{ - if( nFormat < aImport.size() ) - return aImport[ nFormat ].sUIName; - return String::EmptyString(); -} - -String FilterConfigCache::GetImportFormatMediaType( sal_uInt16 nFormat ) -{ - if( nFormat < aImport.size() ) - return aImport[ nFormat ].sMediaType; - return String::EmptyString(); -} - -String FilterConfigCache::GetImportFormatShortName( sal_uInt16 nFormat ) -{ - if( nFormat < aImport.size() ) - return aImport[ nFormat ].GetShortName(); - return String::EmptyString(); -} - -String FilterConfigCache::GetImportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry ) -{ - if ( (nFormat < aImport.size()) && (nEntry < aImport[ nFormat ].lExtensionList.getLength()) ) - return aImport[ nFormat ].lExtensionList[ nEntry ]; - return String::EmptyString(); -} - -String FilterConfigCache::GetImportFilterType( sal_uInt16 nFormat ) -{ - if( nFormat < aImport.size() ) - return aImport[ nFormat ].sType; - return String::EmptyString(); -} - -String FilterConfigCache::GetImportFilterTypeName( sal_uInt16 nFormat ) -{ - if( nFormat < aImport.size() ) - return aImport[ nFormat ].sFilterType; - return String::EmptyString(); -} - -String FilterConfigCache::GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry ) -{ - String aWildcard( GetImportFormatExtension( nFormat, nEntry ) ); - if ( aWildcard.Len() ) - aWildcard.Insert( UniString::CreateFromAscii( "*.", 2 ), 0 ); - return aWildcard; -} - -sal_Bool FilterConfigCache::IsImportInternalFilter( sal_uInt16 nFormat ) -{ - return (nFormat < aImport.size()) && aImport[ nFormat ].bIsInternalFilter; -} - -sal_Bool FilterConfigCache::IsImportPixelFormat( sal_uInt16 nFormat ) -{ - return (nFormat < aImport.size()) && aImport[ nFormat ].bIsPixelFormat; -} - -sal_Bool FilterConfigCache::IsImportDialog( sal_uInt16 nFormat ) -{ - return (nFormat < aImport.size()) && aImport[ nFormat ].bHasDialog; -} - -// ------------------------------------------------------------------------ - -String FilterConfigCache::GetExportFilterName( sal_uInt16 nFormat ) -{ - if( nFormat < aExport.size() ) - return aExport[ nFormat ].sFilterName; - return String::EmptyString(); -} - -sal_uInt16 FilterConfigCache::GetExportFormatNumber( const String& rFormatName ) -{ - CacheVector::iterator aIter( aExport.begin() ); - while ( aIter != aExport.end() ) - { - if ( aIter->sUIName.equalsIgnoreAsciiCase( rFormatName ) ) - break; - aIter++; - } - return sal::static_int_cast< sal_uInt16 >(aIter == aExport.end() ? GRFILTER_FORMAT_NOTFOUND : aIter - aExport.begin()); -} - -sal_uInt16 FilterConfigCache::GetExportFormatNumberForMediaType( const String& rMediaType ) -{ - CacheVector::iterator aIter( aExport.begin() ); - while ( aIter != aExport.end() ) - { - if ( aIter->sMediaType.equalsIgnoreAsciiCase( rMediaType ) ) - break; - aIter++; - } - return sal::static_int_cast< sal_uInt16 >(aIter == aExport.end() ? GRFILTER_FORMAT_NOTFOUND : aIter - aExport.begin()); -} - -sal_uInt16 FilterConfigCache::GetExportFormatNumberForShortName( const String& rShortName ) -{ - CacheVector::iterator aIter( aExport.begin() ); - while ( aIter != aExport.end() ) - { - if ( aIter->GetShortName().EqualsIgnoreCaseAscii( rShortName ) ) - break; - aIter++; - } - return sal::static_int_cast< sal_uInt16 >(aIter == aExport.end() ? GRFILTER_FORMAT_NOTFOUND : aIter - aExport.begin()); -} - -sal_uInt16 FilterConfigCache::GetExportFormatNumberForTypeName( const String& rType ) -{ - CacheVector::iterator aIter( aExport.begin() ); - while ( aIter != aExport.end() ) - { - if ( aIter->sType.equalsIgnoreAsciiCase( rType ) ) - break; - aIter++; - } - return sal::static_int_cast< sal_uInt16 >(aIter == aExport.end() ? GRFILTER_FORMAT_NOTFOUND : aIter - aExport.begin()); -} - -String FilterConfigCache::GetExportFormatName( sal_uInt16 nFormat ) -{ - if( nFormat < aExport.size() ) - return aExport[ nFormat ].sUIName; - return String::EmptyString(); -} - -String FilterConfigCache::GetExportFormatMediaType( sal_uInt16 nFormat ) -{ - if( nFormat < aExport.size() ) - return aExport[ nFormat ].sMediaType; - return String::EmptyString(); -} - -String FilterConfigCache::GetExportFormatShortName( sal_uInt16 nFormat ) -{ - if( nFormat < aExport.size() ) - return aExport[ nFormat ].GetShortName(); - return String::EmptyString(); -} - -String FilterConfigCache::GetExportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry ) -{ - if ( (nFormat < aExport.size()) && (nEntry < aExport[ nFormat ].lExtensionList.getLength()) ) - return aExport[ nFormat ].lExtensionList[ nEntry ]; - return String::EmptyString(); -} - -String FilterConfigCache::GetExportFilterTypeName( sal_uInt16 nFormat ) -{ - if( nFormat < aExport.size() ) - return aExport[ nFormat ].sFilterType; - return String::EmptyString(); -} - -String FilterConfigCache::GetExportInternalFilterName( sal_uInt16 nFormat ) -{ - if( nFormat < aExport.size() ) - return aExport[ nFormat ].sInternalFilterName; - return String::EmptyString(); -} - -String FilterConfigCache::GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry ) -{ - String aWildcard( GetExportFormatExtension( nFormat, nEntry ) ); - if ( aWildcard.Len() ) - aWildcard.Insert( UniString::CreateFromAscii( "*.", 2 ), 0 ); - return aWildcard; -} - -sal_Bool FilterConfigCache::IsExportInternalFilter( sal_uInt16 nFormat ) -{ - return (nFormat < aExport.size()) && aExport[ nFormat ].bIsInternalFilter; -} - -sal_Bool FilterConfigCache::IsExportPixelFormat( sal_uInt16 nFormat ) -{ - return (nFormat < aExport.size()) && aExport[ nFormat ].bIsPixelFormat; -} - -sal_Bool FilterConfigCache::IsExportDialog( sal_uInt16 nFormat ) -{ - return (nFormat < aExport.size()) && aExport[ nFormat ].bHasDialog; -} - -// ------------------------------------------------------------------------ diff --git a/svtools/source/filter.vcl/filter/FilterConfigCache.hxx b/svtools/source/filter.vcl/filter/FilterConfigCache.hxx deleted file mode 100644 index 2c6b7361e540..000000000000 --- a/svtools/source/filter.vcl/filter/FilterConfigCache.hxx +++ /dev/null @@ -1,145 +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 _FILTER_CONFIG_CACHE_HXX_ -#define _FILTER_CONFIG_CACHE_HXX_ - -#include "svtools/svtdllapi.h" -#include -#include -#include -#include -#include - -#ifndef INCLUDED_VECTOR -#include -#define INCLUDED_VECTOR -#endif - -class SVT_DLLPUBLIC FilterConfigCache -{ - struct FilterConfigCacheEntry - { - ::rtl::OUString sInternalFilterName; - ::rtl::OUString sType; - ::com::sun::star::uno::Sequence< ::rtl::OUString > lExtensionList; - ::rtl::OUString sUIName; - ::rtl::OUString sDocumentService; - ::rtl::OUString sFilterService; - ::rtl::OUString sTemplateName; - - ::rtl::OUString sMediaType; - ::rtl::OUString sFilterType; - - sal_Int32 nFlags; - sal_Int32 nFileFormatVersion; - - // user data - String sFilterName; - sal_Bool bHasDialog : 1; - sal_Bool bIsInternalFilter : 1; - sal_Bool bIsPixelFormat : 1; - - sal_Bool IsValid(); - sal_Bool CreateFilterName( const ::rtl::OUString& rUserDataEntry ); - String GetShortName( ); - - static const char* InternalPixelFilterNameList[]; - static const char* InternalVectorFilterNameList[]; - static const char* ExternalPixelFilterNameList[]; - }; - - typedef std::vector< FilterConfigCacheEntry > CacheVector; - - - CacheVector aImport; - CacheVector aExport; - sal_Bool bUseConfig; - - static sal_Bool bInitialized; - static sal_Int32 nIndType; - static sal_Int32 nIndUIName; - static sal_Int32 nIndDocumentService; - static sal_Int32 nIndFilterService; - static sal_Int32 nIndFlags; - static sal_Int32 nIndUserData; - static sal_Int32 nIndFileFormatVersion; - static sal_Int32 nIndTemplateName; - - static const char* InternalFilterListForSvxLight[]; - - SVT_DLLPRIVATE void ImplInit(); - SVT_DLLPRIVATE void ImplInitSmart(); - - public : - - sal_uInt16 GetImportFormatCount() const - { return sal::static_int_cast< sal_uInt16 >(aImport.size()); }; - sal_uInt16 GetImportFormatNumber( const String& rFormatName ); - sal_uInt16 GetImportFormatNumberForMediaType( const String& rMediaType ); - sal_uInt16 GetImportFormatNumberForShortName( const String& rShortName ); - sal_uInt16 GetImportFormatNumberForTypeName( const String& rType ); - String GetImportFilterName( sal_uInt16 nFormat ); - String GetImportFormatName( sal_uInt16 nFormat ); - String GetImportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0); - String GetImportFormatMediaType( sal_uInt16 nFormat ); - String GetImportFormatShortName( sal_uInt16 nFormat ); - String GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry ); - String GetImportFilterType( sal_uInt16 nFormat ); - String GetImportFilterTypeName( sal_uInt16 nFormat ); - - sal_Bool IsImportInternalFilter( sal_uInt16 nFormat ); - sal_Bool IsImportPixelFormat( sal_uInt16 nFormat ); - sal_Bool IsImportDialog( sal_uInt16 nFormat ); - - sal_uInt16 GetExportFormatCount() const - { return sal::static_int_cast< sal_uInt16 >(aExport.size()); }; - sal_uInt16 GetExportFormatNumber( const String& rFormatName ); - sal_uInt16 GetExportFormatNumberForMediaType( const String& rMediaType ); - sal_uInt16 GetExportFormatNumberForShortName( const String& rShortName ); - sal_uInt16 GetExportFormatNumberForTypeName( const String& rType ); - String GetExportFilterName( sal_uInt16 nFormat ); - String GetExportFormatName( sal_uInt16 nFormat ); - String GetExportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0 ); - String GetExportFormatMediaType( sal_uInt16 nFormat ); - String GetExportFormatShortName( sal_uInt16 nFormat ); - String GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry ); - String GetExportFilterTypeName( sal_uInt16 nFormat ); - String GetExportInternalFilterName( sal_uInt16 nFormat ); - - sal_Bool IsExportInternalFilter( sal_uInt16 nFormat ); - sal_Bool IsExportPixelFormat( sal_uInt16 nFormat ); - sal_Bool IsExportDialog( sal_uInt16 nFormat ); - - FilterConfigCache( sal_Bool bUseConfig ); - ~FilterConfigCache(); - -}; - -#endif // _FILTER_CONFIG_CACHE_HXX_ - diff --git a/svtools/source/filter.vcl/filter/FilterConfigItem.cxx b/svtools/source/filter.vcl/filter/FilterConfigItem.cxx deleted file mode 100644 index 312f62af9d84..000000000000 --- a/svtools/source/filter.vcl/filter/FilterConfigItem.cxx +++ /dev/null @@ -1,623 +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_svtools.hxx" -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -using ::rtl::OUString; -using namespace ::utl ; // getProcessServiceFactory -using namespace ::com::sun::star::lang ; // XMultiServiceFactory -using namespace ::com::sun::star::beans ; // PropertyValue -using namespace ::com::sun::star::uno ; // Reference -using namespace ::com::sun::star::util ; // XChangesBatch -using namespace ::com::sun::star::awt ; // Size -using namespace ::com::sun::star::container ; // -using namespace ::com::sun::star::task ; // XStatusIndicator - -static sal_Bool ImpIsTreeAvailable( Reference< XMultiServiceFactory >& rXCfgProv, const String& rTree ) -{ - sal_Bool bAvailable = rTree.Len() != 0; - if ( bAvailable ) - { - xub_StrLen nTokenCount = rTree.GetTokenCount( (sal_Unicode)'/' ); - xub_StrLen i = 0; - - if ( rTree.GetChar( 0 ) == (sal_Unicode)'/' ) - i++; - if ( rTree.GetChar( rTree.Len() - 1 ) == (sal_Unicode)'/' ) - nTokenCount--; - - Any aAny; - aAny <<= (OUString)rTree.GetToken( i++, (sal_Unicode)'/' ); - - // creation arguments: nodepath - PropertyValue aPathArgument; - aPathArgument.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) ); - aPathArgument.Value = aAny; - - Sequence< Any > aArguments( 1 ); - aArguments[ 0 ] <<= aPathArgument; - - Reference< XInterface > xReadAccess; - try - { - xReadAccess = rXCfgProv->createInstanceWithArguments( - OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationAccess" ) ), - aArguments ); - } - catch ( ::com::sun::star::uno::Exception& ) - { - bAvailable = sal_False; - } - if ( xReadAccess.is() ) - { - for ( ; bAvailable && ( i < nTokenCount ); i++ ) - { - Reference< XHierarchicalNameAccess > xHierarchicalNameAccess - ( xReadAccess, UNO_QUERY ); - - if ( !xHierarchicalNameAccess.is() ) - bAvailable = sal_False; - else - { - String aNode( rTree.GetToken( i, (sal_Unicode)'/' ) ); - if ( !xHierarchicalNameAccess->hasByHierarchicalName( aNode ) ) - bAvailable = sal_False; - else - { - Any a( xHierarchicalNameAccess->getByHierarchicalName( aNode ) ); - try - { - a >>= xReadAccess; - } - catch ( ::com::sun::star::uno::Exception& ) - { - bAvailable = sal_False; - } - } - } - } - } - } - return bAvailable; -} - -void FilterConfigItem::ImpInitTree( const String& rSubTree ) -{ - bModified = sal_False; - - OUString sTree( ConfigManager::GetConfigBaseURL() ); - sTree += rSubTree; - Reference< XMultiServiceFactory > xSMGR = getProcessServiceFactory(); // get global uno service manager - - Reference< XMultiServiceFactory > xCfgProv( - xSMGR->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationProvider" ) ) ), - UNO_QUERY ); - - if ( xCfgProv.is() ) - { - if ( ImpIsTreeAvailable( xCfgProv, String( sTree ) ) ) - { - Any aAny; - // creation arguments: nodepath - PropertyValue aPathArgument; - aAny <<= sTree; - aPathArgument.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) ); - aPathArgument.Value = aAny; - - // creation arguments: commit mode - PropertyValue aModeArgument; - sal_Bool bAsyncron = sal_True; - aAny <<= bAsyncron; - aModeArgument.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "lazywrite" ) ); - aModeArgument.Value = aAny; - - Sequence< Any > aArguments( 2 ); - aArguments[ 0 ] <<= aPathArgument; - aArguments[ 1 ] <<= aModeArgument; - - try - { - xUpdatableView = xCfgProv->createInstanceWithArguments( - OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationUpdateAccess" ) ), - aArguments ); - if ( xUpdatableView.is() ) - xPropSet = Reference< XPropertySet >( xUpdatableView, UNO_QUERY ); - } - catch ( ::com::sun::star::uno::Exception& ) - { - DBG_ERROR( "FilterConfigItem::FilterConfigItem - Could not access configuration Key" ); - } - } - } -} - -FilterConfigItem::FilterConfigItem( const OUString& rSubTree ) -{ - ImpInitTree( rSubTree ); -} - -FilterConfigItem::FilterConfigItem( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData ) -{ - if ( pFilterData ) - aFilterData = *pFilterData; -} - -FilterConfigItem::FilterConfigItem( const OUString& rSubTree, - ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData ) -{ - ImpInitTree( rSubTree ); - - if ( pFilterData ) - aFilterData = *pFilterData; -}; - -FilterConfigItem::~FilterConfigItem() -{ - if ( xUpdatableView.is() ) - { - if ( xPropSet.is() && bModified ) - { - Reference< XChangesBatch > xUpdateControl( xUpdatableView, UNO_QUERY ); - if ( xUpdateControl.is() ) - { - try - { - xUpdateControl->commitChanges(); - } - catch ( ::com::sun::star::uno::Exception& ) - { - DBG_ERROR( "FilterConfigItem::FilterConfigItem - Could not update configuration data" ); - } - } - } - } -} - -sal_Bool FilterConfigItem::ImplGetPropertyValue( Any& rAny, const Reference< XPropertySet >& rXPropSet, const OUString& rString, sal_Bool bTestPropertyAvailability ) -{ - sal_Bool bRetValue = sal_True; - - if ( rXPropSet.is() ) - { - if ( bTestPropertyAvailability ) - { - bRetValue = sal_False; - try - { - Reference< XPropertySetInfo > - aXPropSetInfo( rXPropSet->getPropertySetInfo() ); - if ( aXPropSetInfo.is() ) - bRetValue = aXPropSetInfo->hasPropertyByName( rString ); - } - catch( ::com::sun::star::uno::Exception& ) - { - // - } - } - if ( bRetValue ) - { - try - { - rAny = rXPropSet->getPropertyValue( rString ); - if ( !rAny.hasValue() ) - bRetValue = sal_False; - } - catch( ::com::sun::star::uno::Exception& ) - { - bRetValue = sal_False; - } - } - } - else - bRetValue = sal_False; - return bRetValue; -} - - -// if property is available it returns a pointer, -// otherwise the result is null -PropertyValue* FilterConfigItem::GetPropertyValue( Sequence< PropertyValue >& rPropSeq, const OUString& rName ) -{ - PropertyValue* pPropValue = NULL; - - sal_Int32 i, nCount; - for ( i = 0, nCount = rPropSeq.getLength(); i < nCount; i++ ) - { - if ( rPropSeq[ i ].Name == rName ) - { - pPropValue = &rPropSeq[ i ]; - break; - } - } - return pPropValue; -} - -/* if PropertySequence already includes a PropertyValue using the same name, the - corresponding PropertyValue is replaced, otherwise the given PropertyValue - will be appended */ - -sal_Bool FilterConfigItem::WritePropertyValue( Sequence< PropertyValue >& rPropSeq, const PropertyValue& rPropValue ) -{ - sal_Bool bRet = sal_False; - if ( rPropValue.Name.getLength() ) - { - sal_Int32 i, nCount; - for ( i = 0, nCount = rPropSeq.getLength(); i < nCount; i++ ) - { - if ( rPropSeq[ i ].Name == rPropValue.Name ) - break; - } - if ( i == nCount ) - rPropSeq.realloc( ++nCount ); - - rPropSeq[ i ] = rPropValue; - - bRet = sal_True; - } - return bRet; -} - -sal_Bool FilterConfigItem::ReadBool( const OUString& rKey, sal_Bool bDefault ) -{ - Any aAny; - sal_Bool bRetValue = bDefault; - PropertyValue* pPropVal = GetPropertyValue( aFilterData, rKey ); - if ( pPropVal ) - { - pPropVal->Value >>= bRetValue; - } - else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) - { - aAny >>= bRetValue; - } - PropertyValue aBool; - aBool.Name = rKey; - aBool.Value <<= bRetValue; - WritePropertyValue( aFilterData, aBool ); - return bRetValue; -} - -sal_Int32 FilterConfigItem::ReadInt32( const OUString& rKey, sal_Int32 nDefault ) -{ - Any aAny; - sal_Int32 nRetValue = nDefault; - PropertyValue* pPropVal = GetPropertyValue( aFilterData, rKey ); - if ( pPropVal ) - { - pPropVal->Value >>= nRetValue; - } - else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) - { - aAny >>= nRetValue; - } - PropertyValue aInt32; - aInt32.Name = rKey; - aInt32.Value <<= nRetValue; - WritePropertyValue( aFilterData, aInt32 ); - return nRetValue; -} - - -Size FilterConfigItem::ReadSize( const OUString& rKey, const Size& rDefault ) -{ - Any aAny; - Size aRetValue( rDefault ); - - const OUString sWidth( RTL_CONSTASCII_USTRINGPARAM( "LogicalWidth" ) ); - const OUString sHeight( RTL_CONSTASCII_USTRINGPARAM( "LogicalHeight" ) ); - - Reference< XPropertySet > aXPropSet; - try - { - PropertyValue* pPropWidth = GetPropertyValue( aFilterData, sWidth ); - PropertyValue* pPropHeight= GetPropertyValue( aFilterData, sHeight ); - if ( pPropWidth && pPropHeight ) - { - pPropWidth->Value >>= aRetValue.Width; - pPropHeight->Value >>= aRetValue.Height; - } - else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) - { - if ( aAny >>= aXPropSet ) - { - if ( ImplGetPropertyValue( aAny, aXPropSet, sWidth, sal_True ) ) - aAny >>= aRetValue.Width; - if ( ImplGetPropertyValue( aAny, aXPropSet, sHeight, sal_True ) ) - aAny >>= aRetValue.Height; - } - } - } - catch ( ::com::sun::star::uno::Exception& ) - { - DBG_ERROR( "FilterConfigItem::ReadSize - could not read PropertyValue" ); - } - PropertyValue aWidth; - aWidth.Name = sWidth; - aWidth.Value <<= aRetValue.Width; - WritePropertyValue( aFilterData, aWidth ); - PropertyValue aHeight; - aHeight.Name = sHeight; - aHeight.Value <<= aRetValue.Height; - WritePropertyValue( aFilterData, aHeight ); - return aRetValue; -} - -OUString FilterConfigItem::ReadString( const OUString& rKey, const OUString& rDefault ) -{ - Any aAny; - OUString aRetValue( rDefault ); - PropertyValue* pPropVal = GetPropertyValue( aFilterData, rKey ); - if ( pPropVal ) - { - pPropVal->Value >>= aRetValue; - } - else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) - { - aAny >>= aRetValue; - } - PropertyValue aString; - aString.Name = rKey; - aString.Value <<= aRetValue; - WritePropertyValue( aFilterData, aString ); - return aRetValue; -} - -Any FilterConfigItem::ReadAny( const ::rtl::OUString& rKey, const Any& rDefault ) -{ - Any aAny, aRetValue( rDefault ); - PropertyValue* pPropVal = GetPropertyValue( aFilterData, rKey ); - if ( pPropVal ) - { - aRetValue = pPropVal->Value; - } - else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) - { - aRetValue = aAny; - } - PropertyValue aPropValue; - aPropValue.Name = rKey; - aPropValue.Value = aRetValue; - WritePropertyValue( aFilterData, aPropValue ); - return aRetValue; -} - -void FilterConfigItem::WriteBool( const OUString& rKey, sal_Bool bNewValue ) -{ - PropertyValue aBool; - aBool.Name = rKey; - aBool.Value <<= bNewValue; - WritePropertyValue( aFilterData, aBool ); - - if ( xPropSet.is() ) - { - Any aAny; - if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) - { - sal_Bool bOldValue; - if ( aAny >>= bOldValue ) - { - if ( bOldValue != bNewValue ) - { - aAny <<= bNewValue; - try - { - xPropSet->setPropertyValue( rKey, aAny ); - bModified = sal_True; - } - catch ( ::com::sun::star::uno::Exception& ) - { - DBG_ERROR( "FilterConfigItem::WriteBool - could not set PropertyValue" ); - } - } - } - } - } -} - -void FilterConfigItem::WriteInt32( const OUString& rKey, sal_Int32 nNewValue ) -{ - PropertyValue aInt32; - aInt32.Name = rKey; - aInt32.Value <<= nNewValue; - WritePropertyValue( aFilterData, aInt32 ); - - if ( xPropSet.is() ) - { - Any aAny; - - if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) - { - sal_Int32 nOldValue; - if ( aAny >>= nOldValue ) - { - if ( nOldValue != nNewValue ) - { - aAny <<= nNewValue; - try - { - xPropSet->setPropertyValue( rKey, aAny ); - bModified = sal_True; - } - catch ( ::com::sun::star::uno::Exception& ) - { - DBG_ERROR( "FilterConfigItem::WriteInt32 - could not set PropertyValue" ); - } - } - } - } - } -} - -void FilterConfigItem::WriteSize( const OUString& rKey, const Size& rNewValue ) -{ - const OUString sWidth( RTL_CONSTASCII_USTRINGPARAM( "LogicalWidth" ) ); - const OUString sHeight( RTL_CONSTASCII_USTRINGPARAM( "LogicalHeight" ) ); - - PropertyValue aWidth; - aWidth.Name = sWidth; - aWidth.Value <<= rNewValue.Width; - WritePropertyValue( aFilterData, aWidth ); - - PropertyValue aHeight; - aHeight.Name = sHeight; - aHeight.Value <<= rNewValue.Height; - WritePropertyValue( aFilterData, aHeight ); - - if ( xPropSet.is() ) - { - Any aAny; - sal_Int32 nOldWidth = rNewValue.Width; - sal_Int32 nOldHeight = rNewValue.Height; - - if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) - { - try - { - Reference< XPropertySet > aXPropSet; - if ( aAny >>= aXPropSet ) - { - if ( ImplGetPropertyValue( aAny, aXPropSet, sWidth, sal_True ) ) - aAny >>= nOldWidth; - if ( ImplGetPropertyValue( aAny, aXPropSet, sHeight, sal_True ) ) - aAny >>= nOldHeight; - } - if ( ( nOldWidth != rNewValue.Width ) || ( nOldHeight != rNewValue.Height ) ) - { - aAny <<= rNewValue.Width; - aXPropSet->setPropertyValue( sWidth, aAny ); - aAny <<= rNewValue.Height; - aXPropSet->setPropertyValue( sHeight, aAny ); - bModified = sal_True; - } - } - catch ( ::com::sun::star::uno::Exception& ) - { - DBG_ERROR( "FilterConfigItem::WriteSize - could not read PropertyValue" ); - } - } - } -} - -void FilterConfigItem::WriteString( const OUString& rKey, const OUString& rNewValue ) -{ - PropertyValue aString; - aString.Name = rKey; - aString.Value <<= rNewValue; - WritePropertyValue( aFilterData, aString ); - - if ( xPropSet.is() ) - { - Any aAny; - - if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) - { - OUString aOldValue; - if ( aAny >>= aOldValue ) - { - if ( aOldValue != rNewValue ) - { - aAny <<= rNewValue; - try - { - xPropSet->setPropertyValue( rKey, aAny ); - bModified = sal_True; - } - catch ( ::com::sun::star::uno::Exception& ) - { - DBG_ERROR( "FilterConfigItem::WriteInt32 - could not set PropertyValue" ); - } - } - } - } - } -} - -void FilterConfigItem::WriteAny( const OUString& rKey, const Any& rNewAny ) -{ - PropertyValue aPropValue; - aPropValue.Name = rKey; - aPropValue.Value = rNewAny; - WritePropertyValue( aFilterData, aPropValue ); - if ( xPropSet.is() ) - { - Any aAny; - if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) - { - if ( aAny != rNewAny ) - { - try - { - xPropSet->setPropertyValue( rKey, rNewAny ); - bModified = sal_True; - } - catch ( com::sun::star::uno::Exception& ) - { - DBG_ERROR( "FilterConfigItem::WriteAny - could not set PropertyValue" ); - - } - } - } - } -} - -// ------------------------------------------------------------------------ - -Sequence< PropertyValue > FilterConfigItem::GetFilterData() const -{ - return aFilterData; -} - -// ------------------------------------------------------------------------ - -Reference< XStatusIndicator > FilterConfigItem::GetStatusIndicator() const -{ - Reference< XStatusIndicator > xStatusIndicator; - const rtl::OUString sStatusIndicator( RTL_CONSTASCII_USTRINGPARAM( "StatusIndicator" ) ); - - sal_Int32 i, nCount = aFilterData.getLength(); - for ( i = 0; i < nCount; i++ ) - { - if ( aFilterData[ i ].Name == sStatusIndicator ) - { - aFilterData[ i ].Value >>= xStatusIndicator; - break; - } - } - return xStatusIndicator; -} - diff --git a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx deleted file mode 100644 index 1c4eeeff1bbf..000000000000 --- a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx +++ /dev/null @@ -1,270 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" - -#include "SvFilterOptionsDialog.hxx" -#include -#include -#include "FilterConfigCache.hxx" -#include -#include -#include -#include -#include "exportdialog.hxx" -#include -#include -#include -#include -#include -#include -#include -#include -#include "vcl/svapp.hxx" - -using namespace ::rtl; -using namespace ::com::sun::star; - -// ------------------------- -// - SvFilterOptionsDialog - -// ------------------------- - -uno::Reference< uno::XInterface > - SAL_CALL SvFilterOptionsDialog_CreateInstance( - const uno::Reference< lang::XMultiServiceFactory > & _rxFactory ) -{ - return static_cast< ::cppu::OWeakObject* > ( new SvFilterOptionsDialog( _rxFactory ) ); -} - -OUString SvFilterOptionsDialog_getImplementationName() - throw( uno::RuntimeException ) -{ - return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svtools.SvFilterOptionsDialog" ) ); -} -#define SERVICE_NAME "com.sun.star.ui.dialog.FilterOptionsDialog" -sal_Bool SAL_CALL SvFilterOptionsDialog_supportsService( const OUString& ServiceName ) - throw( uno::RuntimeException ) -{ - return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SERVICE_NAME ) ); -} - -uno::Sequence< OUString > SAL_CALL SvFilterOptionsDialog_getSupportedServiceNames() - throw( uno::RuntimeException ) -{ - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICE_NAME ) ); - return aRet; -} -#undef SERVICE_NAME - -// ----------------------------------------------------------------------------- - -SvFilterOptionsDialog::SvFilterOptionsDialog( const uno::Reference< lang::XMultiServiceFactory > xMgr ) : - mxMgr ( xMgr ), - meFieldUnit ( FUNIT_CM ), - mbExportSelection ( sal_False ) -{ -} - -// ----------------------------------------------------------------------------- - -SvFilterOptionsDialog::~SvFilterOptionsDialog() -{ -} - -// ----------------------------------------------------------------------------- - -void SAL_CALL SvFilterOptionsDialog::acquire() throw() -{ - OWeakObject::acquire(); -} - -// ----------------------------------------------------------------------------- - -void SAL_CALL SvFilterOptionsDialog::release() throw() -{ - OWeakObject::release(); -} - -// XInitialization -void SAL_CALL SvFilterOptionsDialog::initialize( const uno::Sequence< uno::Any > & ) - throw ( uno::Exception, uno::RuntimeException ) -{ -} - -// XServiceInfo -OUString SAL_CALL SvFilterOptionsDialog::getImplementationName() - throw( uno::RuntimeException ) -{ - return SvFilterOptionsDialog_getImplementationName(); -} -sal_Bool SAL_CALL SvFilterOptionsDialog::supportsService( const OUString& rServiceName ) - throw( uno::RuntimeException ) -{ - return SvFilterOptionsDialog_supportsService( rServiceName ); -} -uno::Sequence< OUString > SAL_CALL SvFilterOptionsDialog::getSupportedServiceNames() - throw ( uno::RuntimeException ) -{ - return SvFilterOptionsDialog_getSupportedServiceNames(); -} - - -// XPropertyAccess -uno::Sequence< beans::PropertyValue > SvFilterOptionsDialog::getPropertyValues() - throw ( uno::RuntimeException ) -{ - sal_Int32 i, nCount; - for ( i = 0, nCount = maMediaDescriptor.getLength(); i < nCount; i++ ) - { - if ( maMediaDescriptor[ i ].Name.equalsAscii( "FilterData" ) ) - break; - } - if ( i == nCount ) - maMediaDescriptor.realloc( ++nCount ); - - // the "FilterData" Property is an Any that will contain our PropertySequence of Values - maMediaDescriptor[ i ].Name = String( RTL_CONSTASCII_USTRINGPARAM( "FilterData" ) ); - maMediaDescriptor[ i ].Value <<= maFilterDataSequence; - return maMediaDescriptor; -} - -void SvFilterOptionsDialog::setPropertyValues( const uno::Sequence< beans::PropertyValue > & aProps ) - throw ( beans::UnknownPropertyException, beans::PropertyVetoException, - lang::IllegalArgumentException, lang::WrappedTargetException, - uno::RuntimeException ) -{ - maMediaDescriptor = aProps; - - sal_Int32 i, nCount; - for ( i = 0, nCount = maMediaDescriptor.getLength(); i < nCount; i++ ) - { - if ( maMediaDescriptor[ i ].Name.equalsAscii( "FilterData" ) ) - { - maMediaDescriptor[ i ].Value >>= maFilterDataSequence; - } - else if ( maMediaDescriptor[ i ].Name.equalsAscii( "SelectionOnly" ) ) - { - maMediaDescriptor[ i ].Value >>= mbExportSelection; - } - } -} - -// XExecutableDialog -void SvFilterOptionsDialog::setTitle( const OUString& aTitle ) - throw ( uno::RuntimeException ) -{ - maDialogTitle = aTitle; -} - -sal_Int16 SvFilterOptionsDialog::execute() - throw ( uno::RuntimeException ) -{ - sal_Int16 nRet = ui::dialogs::ExecutableDialogResults::CANCEL; - - String aFilterNameStr( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ) ); - String aInternalFilterName; - sal_Int32 j, nCount = maMediaDescriptor.getLength(); - for ( j = 0; j < nCount; j++ ) - { - if ( maMediaDescriptor[ j ].Name.equals( aFilterNameStr ) ) - { - OUString aStr; - maMediaDescriptor[ j ].Value >>= aStr; - aInternalFilterName = aStr; - aInternalFilterName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "draw_" ) ), String(), 0 ); - aInternalFilterName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "impress_" ) ), String(), 0 ); - break; - } - } - if ( aInternalFilterName.Len() ) - { - GraphicFilter aGraphicFilter( sal_True ); - - sal_uInt16 nFormat, nFilterCount = aGraphicFilter.pConfig->GetExportFormatCount(); - for ( nFormat = 0; nFormat < nFilterCount; nFormat++ ) - { - if ( aGraphicFilter.pConfig->GetExportInternalFilterName( nFormat ) == aInternalFilterName ) - break; - } - if ( nFormat < nFilterCount ) - { - FltCallDialogParameter aFltCallDlgPara( Application::GetDefDialogParent(), NULL, meFieldUnit ); - aFltCallDlgPara.aFilterData = maFilterDataSequence; - - ByteString aResMgrName( "svt", 3 ); - ResMgr* pResMgr; - - pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); - aFltCallDlgPara.pResMgr = pResMgr; - - aFltCallDlgPara.aFilterExt = aGraphicFilter.pConfig->GetExportFormatShortName( nFormat ); - sal_Bool bIsPixelFormat( aGraphicFilter.pConfig->IsExportPixelFormat( nFormat ) ); - if ( ExportDialog( aFltCallDlgPara, mxMgr, mxSourceDocument, mbExportSelection, bIsPixelFormat ).Execute() == RET_OK ) - nRet = ui::dialogs::ExecutableDialogResults::OK; - - delete pResMgr; - - // taking the out parameter from the dialog - maFilterDataSequence = aFltCallDlgPara.aFilterData; - } - } - return nRet; -} - -// XEmporter -void SvFilterOptionsDialog::setSourceDocument( const uno::Reference< lang::XComponent >& xDoc ) - throw ( lang::IllegalArgumentException, uno::RuntimeException ) -{ - mxSourceDocument = xDoc; - - // try to set the corresponding metric unit - String aConfigPath; - uno::Reference< lang::XServiceInfo > xServiceInfo - ( xDoc, uno::UNO_QUERY ); - if ( xServiceInfo.is() ) - { - if ( xServiceInfo->supportsService( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ) ) ) - aConfigPath = String( RTL_CONSTASCII_USTRINGPARAM( "Office.Impress/Layout/Other/MeasureUnit" ) ); - else if ( xServiceInfo->supportsService( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ) ) ) - aConfigPath = String( RTL_CONSTASCII_USTRINGPARAM( "Office.Draw/Layout/Other/MeasureUnit" ) ); - if ( aConfigPath.Len() ) - { - FilterConfigItem aConfigItem( aConfigPath ); - String aPropertyName; - SvtSysLocale aSysLocale; - if ( aSysLocale.GetLocaleDataPtr()->getMeasurementSystemEnum() == MEASURE_METRIC ) - aPropertyName = String( RTL_CONSTASCII_USTRINGPARAM( "Metric" ) ); - else - aPropertyName = String( RTL_CONSTASCII_USTRINGPARAM( "NonMetric" ) ); - meFieldUnit = (FieldUnit)aConfigItem.ReadInt32( aPropertyName, FUNIT_CM ); - } - } -} - diff --git a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx deleted file mode 100644 index 027fac99c2e8..000000000000 --- a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx +++ /dev/null @@ -1,105 +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 _SV_FILTER_OPTIONS_DIALOG_HXX_ -#define _SV_FILTER_OPTIONS_DIALOG_HXX_ - -#include -#include -#include -#include -#include -#include -#include -#include - -class SvFilterOptionsDialog : public cppu::WeakImplHelper5 -< - com::sun::star::document::XExporter, - com::sun::star::ui::dialogs::XExecutableDialog, - com::sun::star::beans::XPropertyAccess, - com::sun::star::lang::XInitialization, - com::sun::star::lang::XServiceInfo -> -{ - const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > - mxMgr; - com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > - maMediaDescriptor; - com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > - maFilterDataSequence; - com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > - mxSourceDocument; - - rtl::OUString maDialogTitle; - FieldUnit meFieldUnit; - sal_Bool mbExportSelection; - -public: - - SvFilterOptionsDialog( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > _rxORB ); - ~SvFilterOptionsDialog(); - - // XInterface - virtual void SAL_CALL acquire() throw(); - virtual void SAL_CALL release() throw(); - - // XInitialization - virtual void SAL_CALL initialize( const com::sun::star::uno::Sequence< com::sun::star::uno::Any > & aArguments ) - throw ( com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException ); - - // XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName() - throw ( com::sun::star::uno::RuntimeException ); - virtual sal_Bool SAL_CALL supportsService( const rtl::OUString& ServiceName ) - throw ( com::sun::star::uno::RuntimeException ); - virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() - throw ( com::sun::star::uno::RuntimeException ); - - // XPropertyAccess - virtual com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getPropertyValues() - throw ( com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & aProps ) - throw ( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, - ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException ); - - // XExecuteDialog - virtual sal_Int16 SAL_CALL execute() - throw ( com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle ) - throw ( ::com::sun::star::uno::RuntimeException ); - - // XExporter - virtual void SAL_CALL setSourceDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc ) - throw ( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - -}; - - -#endif // _SV_FILTER_OPTIONS_DIALOG_HXX_ - diff --git a/svtools/source/filter.vcl/filter/exportdialog.cxx b/svtools/source/filter.vcl/filter/exportdialog.cxx deleted file mode 100644 index 20cc46a30ab5..000000000000 --- a/svtools/source/filter.vcl/filter/exportdialog.cxx +++ /dev/null @@ -1,1513 +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_svtools.hxx" - -#ifndef GCC -# pragma hdrstop -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "exportdialog.hxx" -#include "exportdialog.hrc" - -#define FORMAT_UNKNOWN 0 -#define FORMAT_JPG 1 -#define FORMAT_PNG 2 -#define FORMAT_BMP 3 -#define FORMAT_GIF 4 -#define FORMAT_PBM 5 -#define FORMAT_PGM 6 -#define FORMAT_PPM 7 -#define FORMAT_PCT 8 -#define FORMAT_RAS 9 -#define FORMAT_TIF 10 -#define FORMAT_XPM 11 -#define FORMAT_WMF 12 -#define FORMAT_EMF 13 -#define FORMAT_EPS 14 -#define FORMAT_MET 15 -#define FORMAT_SVG 16 -#define FORMAT_SVM 17 - -#define UNIT_DEFAULT -1 -#define UNIT_INCH 0 -#define UNIT_CM 1 -#define UNIT_MM 2 -#define UNIT_POINT 3 -#define UNIT_PIXEL 4 -#define UNIT_MAX_ID UNIT_PIXEL - -using namespace ::com::sun::star; - -static sal_Int16 GetFilterFormat( String& rExt ) -{ - sal_Int16 nFormat = FORMAT_UNKNOWN; - ByteString aExt( rExt, RTL_TEXTENCODING_UTF8 ); - if ( aExt.Equals( "JPG" ) ) - nFormat = FORMAT_JPG; - else if ( aExt.Equals( "PNG" ) ) - nFormat = FORMAT_PNG; - else if ( aExt.Equals( "BMP" ) ) - nFormat = FORMAT_BMP; - else if ( aExt.Equals( "GIF" ) ) - nFormat = FORMAT_GIF; - else if ( aExt.Equals( "PBM" ) ) - nFormat = FORMAT_PBM; - else if ( aExt.Equals( "PGM" ) ) - nFormat = FORMAT_PGM; - else if ( aExt.Equals( "PPM" ) ) - nFormat = FORMAT_PPM; - else if ( aExt.Equals( "PCT" ) ) - nFormat = FORMAT_PCT; - else if ( aExt.Equals( "RAS" ) ) - nFormat = FORMAT_RAS; - else if ( aExt.Equals( "TIF" ) ) - nFormat = FORMAT_TIF; - else if ( aExt.Equals( "XPM" ) ) - nFormat = FORMAT_XPM; - else if ( aExt.Equals( "WMF" ) ) - nFormat = FORMAT_WMF; - else if ( aExt.Equals( "EMF" ) ) - nFormat = FORMAT_EMF; - else if ( aExt.Equals( "EPS" ) ) - nFormat = FORMAT_EPS; - else if ( aExt.Equals( "MET" ) ) - nFormat = FORMAT_MET; - else if ( aExt.Equals( "SVG" ) ) - nFormat = FORMAT_SVG; - else if ( aExt.Equals( "SVM" ) ) - nFormat = FORMAT_SVM; - return nFormat; -} - -static MapUnit GetMapUnit( sal_Int32 nUnit ) -{ - MapUnit aMapUnit( MAP_PIXEL ); - switch( nUnit ) - { - case UNIT_INCH : aMapUnit = MAP_INCH; break; - case UNIT_CM : aMapUnit = MAP_CM; break; - case UNIT_MM : aMapUnit = MAP_MM; break; - case UNIT_POINT : aMapUnit = MAP_POINT; break; - case UNIT_PIXEL : aMapUnit = MAP_PIXEL; break; - } - return aMapUnit; -} - -sal_Int32 ExportDialog::GetDefaultUnit() -{ - sal_Int32 nDefaultUnit = UNIT_CM; - switch( mrFltCallPara.eFieldUnit ) - { -// case FUNIT_NONE : -// case FUNIT_PERCENT : -// case FUNIT_CUSTOM : - default: nDefaultUnit = UNIT_CM; break; - - case FUNIT_MILE : // PASSTHROUGH INTENDED - case FUNIT_FOOT : - case FUNIT_TWIP : - case FUNIT_PICA : nDefaultUnit = UNIT_INCH; break; - - case FUNIT_KM : // PASSTHROUGH INTENDED - case FUNIT_M : - case FUNIT_100TH_MM : nDefaultUnit = UNIT_CM; break; - - case FUNIT_INCH : nDefaultUnit = UNIT_INCH; break; - case FUNIT_CM : nDefaultUnit = UNIT_CM; break; - case FUNIT_MM : nDefaultUnit = UNIT_MM; break; - case FUNIT_POINT : nDefaultUnit = UNIT_POINT; break; - } - return nDefaultUnit; -} - -static basegfx::B2DRange GetShapeRangeForXShape( const uno::Reference< drawing::XShape >& rxShape, - const uno::Reference< graphic::XPrimitiveFactory2D >& rxPrimitiveFactory2D, const uno::Sequence< beans::PropertyValue >& rViewInformation ) -{ - basegfx::B2DRange aShapeRange; - - const uno::Sequence< beans::PropertyValue > aParams; - const uno::Sequence< uno::Reference< graphic::XPrimitive2D > > aPrimitiveSequence( rxPrimitiveFactory2D->createPrimitivesFromXShape( rxShape, aParams ) ); - - const sal_Int32 nCount = aPrimitiveSequence.getLength(); - for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ ) - { - const geometry::RealRectangle2D aRect( aPrimitiveSequence[ nIndex ]->getRange( rViewInformation ) ); - aShapeRange.expand( basegfx::B2DTuple( aRect.X1, aRect.Y1 ) ); - aShapeRange.expand( basegfx::B2DTuple( aRect.X2, aRect.Y2 ) ); - } - return aShapeRange; -} - -uno::Sequence< beans::PropertyValue > ExportDialog::GetFilterData( sal_Bool bUpdateConfig ) -{ - if ( bUpdateConfig ) - { - sal_Int32 nUnit = maLbSizeX.GetSelectEntryPos(); - if ( nUnit < 0 ) - nUnit = UNIT_CM; - - if ( ( mnInitialResolutionUnit == UNIT_DEFAULT ) && ( nUnit == GetDefaultUnit() ) ) - nUnit = UNIT_DEFAULT; - - // updating ui configuration - if ( mbIsPixelFormat ) - { - if ( nUnit > UNIT_MAX_ID ) - nUnit = UNIT_PIXEL; - - sal_Int32 nResolution = maNfResolution.GetValue(); - if ( nResolution < 1 ) - nResolution = 96; - - mpOptionsItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportUnit" ) ), nUnit ); - mpOptionsItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolution" ) ), nResolution ); - mpOptionsItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolutionUnit" ) ), maLbResolution.GetSelectEntryPos() ); - } - else - { - if ( nUnit >= UNIT_PIXEL ) - nUnit = UNIT_CM; - - mpOptionsItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "VectorExportUnit" ) ), nUnit ); - } - } - - FilterConfigItem* pFilterOptions; - if ( bUpdateConfig ) - pFilterOptions = mpFilterOptionsItem; - else - { - uno::Sequence< beans::PropertyValue > aFilterData( mpFilterOptionsItem->GetFilterData() ); - pFilterOptions = new FilterConfigItem( &aFilterData ); - } - - const String sLogicalWidth( String( RTL_CONSTASCII_USTRINGPARAM( "LogicalWidth" ) ) ); - const String sLogicalHeight( String( RTL_CONSTASCII_USTRINGPARAM( "LogicalHeight" ) ) ); - if ( mbIsPixelFormat ) - { - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelWidth" ) ), static_cast< sal_Int32 >( maSize.Width ) ); - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelHeight" ) ), static_cast< sal_Int32 >( maSize.Height ) ); - if ( maResolution.Width && maResolution.Height ) - { - const double f100thmmPerPixelX = 100000.0 / maResolution.Width; - const double f100thmmPerPixelY = 100000.0 / maResolution.Height; - sal_Int32 nLogicalWidth = static_cast< sal_Int32 >( f100thmmPerPixelX * maSize.Width ); - sal_Int32 nLogicalHeight= static_cast< sal_Int32 >( f100thmmPerPixelY * maSize.Height ); - if ( nLogicalWidth && nLogicalHeight ) - { - pFilterOptions->WriteInt32( sLogicalWidth, nLogicalWidth ); - pFilterOptions->WriteInt32( sLogicalHeight, nLogicalHeight ); - } - } - } - else - { - pFilterOptions->WriteInt32( sLogicalWidth, static_cast< sal_Int32 >( maSize.Width ) ); - pFilterOptions->WriteInt32( sLogicalHeight, static_cast< sal_Int32 >( maSize.Height ) ); - } - switch ( mnFormat ) - { - case FORMAT_JPG : - { - sal_Int32 nColor = maLbColorDepth.GetSelectEntryPos(); - if ( nColor == 1 ) - nColor = 0; - else - nColor = 1; - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorMode" ) ), nColor ); - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Quality" ) ), static_cast< sal_Int32 >( maSbCompression.GetThumbPos() ) ); - } - break; - - case FORMAT_PNG : - { - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Compression" ) ), static_cast< sal_Int32 >( maSbCompression.GetThumbPos() ) ); - sal_Int32 nInterlace = 0; - if ( maCbInterlaced.IsChecked() ) - nInterlace++; - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), nInterlace ); - } - break; - - case FORMAT_BMP : - { - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Color" ) ), maLbColorDepth.GetSelectEntryPos() + 1 ); - pFilterOptions->WriteBool( String( RTL_CONSTASCII_USTRINGPARAM( "RLE_Coding" ) ), maCbRLEEncoding.IsChecked() ); - } - break; - - case FORMAT_GIF : - { - sal_Int32 nValue = 0; - if ( maCbInterlaced.IsChecked() ) - nValue++; - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), nValue ); - - nValue = 0; - if ( maCbSaveTransparency.IsChecked() ) - nValue++; - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Translucent" ) ), nValue ); - } - break; - - case FORMAT_PBM : - case FORMAT_PGM : - case FORMAT_PPM : - { - sal_Int32 nFormat = 0; - if ( maRbText.IsChecked() ) - nFormat++; - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "FileFormat" ) ), nFormat ); - } - break; - - case FORMAT_EPS : - { - sal_Int32 nCheck = 0; - if ( maCbEPSPreviewTIFF.IsChecked() ) - nCheck++; - if ( maCbEPSPreviewEPSI.IsChecked() ) - nCheck += 2; - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Preview" ) ), nCheck ); - - nCheck = 1; - if ( maRbEPSLevel2.IsChecked() ) - nCheck++; - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ), nCheck ); - - nCheck = 1; - if ( maRbEPSColorFormat2.IsChecked() ) - nCheck++; - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorFormat" ) ), nCheck ); - - nCheck = 1; - if ( maRbEPSCompressionNone.IsChecked() ) - nCheck++; - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "CompressionMode" ) ), nCheck ); - } - break; - } - - uno::Sequence< beans::PropertyValue > aRet( pFilterOptions->GetFilterData() ); - if ( bUpdateConfig == sal_False ) - delete pFilterOptions; - return aRet; -} - -// -awt::Size ExportDialog::GetOriginalSize() -{ - basegfx::B2DRange aShapesRange; - - if ( mxPage.is () ) - { - uno::Reference< beans::XPropertySet > xPagePropSet( mxPage, uno::UNO_QUERY ); - if ( xPagePropSet.is() ) - { - sal_Int32 nWidth = 0; - sal_Int32 nHeight= 0; - com::sun::star::uno::Any aAny; - aAny = xPagePropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" ) ) ); - aAny >>= nWidth; - aAny = xPagePropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Height" ) ) ); - aAny >>= nHeight; - aShapesRange = basegfx::B2DRange( 0, 0, nWidth, nHeight ); - } - } - else - { - uno::Reference< graphic::XPrimitiveFactory2D > xPrimitiveFactory( - mxMgr->createInstance( String( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.graphic.PrimitiveFactory2D" ) ) ), uno::UNO_QUERY ); - if ( xPrimitiveFactory.is() ) - { - basegfx::B2DHomMatrix aViewTransformation( Application::GetDefaultDevice()->GetViewTransformation() ); - com::sun::star::geometry::AffineMatrix2D aTransformation; - aTransformation.m00 = aViewTransformation.get(0,0); - aTransformation.m01 = aViewTransformation.get(0,1); - aTransformation.m02 = aViewTransformation.get(0,2); - aTransformation.m10 = aViewTransformation.get(1,0); - aTransformation.m11 = aViewTransformation.get(1,1); - aTransformation.m12 = aViewTransformation.get(1,2); - - const rtl::OUString sViewTransformation( RTL_CONSTASCII_USTRINGPARAM( "ViewTransformation" ) ); - uno::Sequence< beans::PropertyValue > aViewInformation( 1 ); - aViewInformation[ 0 ].Value <<= aTransformation; - aViewInformation[ 0 ].Name = sViewTransformation; - - if ( mxShape.is() ) - aShapesRange = GetShapeRangeForXShape( mxShape, xPrimitiveFactory, aViewInformation ); - else if ( mxShapes.is() ) - { - const sal_Int32 nCount = mxShapes->getCount(); - for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ ) - { - uno::Reference< drawing::XShape > xShape; - mxShapes->getByIndex( nIndex ) >>= xShape; - aShapesRange.expand( GetShapeRangeForXShape( xShape, xPrimitiveFactory, aViewInformation ) ); - } - } - } - } - return awt::Size( static_cast(aShapesRange.getWidth()), static_cast(aShapesRange.getHeight()) ); -} - -void ExportDialog::GetGraphicSource() -{ - if ( mxSourceDocument.is() ) - { - uno::Reference< frame::XModel > xModel( mxSourceDocument, uno::UNO_QUERY ); - if ( xModel.is() ) - { - uno::Reference< frame::XController > xController( xModel->getCurrentController() ); - if ( xController.is() ) - { - if ( mbExportSelection ) // check if there is a selection - { - uno::Reference< view::XSelectionSupplier > xSelectionSupplier( xController, uno::UNO_QUERY ); - if ( xSelectionSupplier.is() ) - { - uno::Any aAny( xSelectionSupplier->getSelection() ); - if ( ! ( aAny >>= mxShapes ) ) - aAny >>= mxShape; - } - } - if ( !mxShape.is() && !mxShapes.is() ) - { - uno::Reference< drawing::XDrawView > xDrawView( xController, uno::UNO_QUERY ); - if ( xDrawView.is() ) - { - uno::Reference< drawing::XDrawPage > xCurrentPage( xDrawView->getCurrentPage() ); - if ( xCurrentPage.is() ) - { - mxPage = xCurrentPage; // exporting whole page - } - } - } - } - } - } -} - -sal_Bool ExportDialog::GetGraphicStream() -{ - sal_Bool bRet = sal_False; - - if ( !IsTempExportAvailable() ) - { - delete mpTempStream, mpTempStream = new SvMemoryStream(); - maBitmap = Bitmap(); - return bRet; - } - - sal_Bool bRecreateOutputStream = mpTempStream->Tell() == 0; - - static uno::Sequence< beans::PropertyValue > aOldFilterData; - uno::Sequence< beans::PropertyValue > aNewFilterData( GetFilterData( sal_False ) ); - if ( aOldFilterData != aNewFilterData ) - { - aOldFilterData = aNewFilterData; - bRecreateOutputStream = sal_True; - } - try - { - if ( bRecreateOutputStream ) - { - delete mpTempStream, mpTempStream = new SvMemoryStream(); - maBitmap = Bitmap(); - - uno::Reference < io::XStream > xStream( new utl::OStreamWrapper( *mpTempStream ) ); - uno::Reference < io::XOutputStream > xOutputStream( xStream->getOutputStream() ); - - uno::Reference< document::XExporter > xGraphicExporter( - mxMgr->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GraphicExportFilter") ) ), uno::UNO_QUERY_THROW ); - uno::Reference< document::XFilter > xFilter( xGraphicExporter, uno::UNO_QUERY_THROW ); - - sal_Int32 nProperties = 2; - uno::Sequence< beans::PropertyValue > aFilterData( nProperties ); - - - rtl::OUString sFormat( maExt ); - uno::Sequence< beans::PropertyValue > aDescriptor( 3 ); - aDescriptor[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OutputStream") ); - aDescriptor[0].Value <<= xOutputStream; - aDescriptor[1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FilterName") ); - aDescriptor[1].Value <<= sFormat; - aDescriptor[2].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FilterData") ); - aDescriptor[2].Value <<= aNewFilterData; - - uno::Reference< lang::XComponent > xSourceDoc; - if ( mxPage.is() ) - xSourceDoc = uno::Reference< lang::XComponent >( mxPage, uno::UNO_QUERY_THROW ); - else if ( mxShapes.is() ) - xSourceDoc = uno::Reference< lang::XComponent >( mxShapes, uno::UNO_QUERY_THROW ); - else if ( mxShape.is() ) - xSourceDoc = uno::Reference< lang::XComponent >( mxShape, uno::UNO_QUERY_THROW );; - if ( xSourceDoc.is() ) - { - xGraphicExporter->setSourceDocument( xSourceDoc ); - xFilter->filter( aDescriptor ); - bRet = sal_True; - - if ( mnFormat == FORMAT_JPG ) - { - mpTempStream->Seek( STREAM_SEEK_TO_BEGIN ); - maBitmap = GetGraphicBitmap( *mpTempStream ); - mpTempStream->Seek( STREAM_SEEK_TO_END ); - } - } - } - else - bRet = sal_True; - } - catch( uno::Exception& ) - { - - // ups - - } - return bRet; -} - -Bitmap ExportDialog::GetGraphicBitmap( SvStream& rInputStream ) -{ - Bitmap aRet; - Graphic aGraphic; - GraphicFilter aFilter( sal_False ); - if ( aFilter.ImportGraphic( aGraphic, String(), rInputStream, GRFILTER_FORMAT_NOTFOUND, NULL, 0, NULL ) == GRFILTER_OK ) - { - aRet = aGraphic.GetBitmap(); - } - return aRet; -} - -sal_uInt32 ExportDialog::GetRawFileSize() const -{ - sal_uInt64 nRawFileSize = 0; - if ( mbIsPixelFormat ) - { - sal_Int32 nBitsPerPixel = 24; - String aEntry( maLbColorDepth.GetSelectEntry() ); - if ( ms1BitTreshold == aEntry ) - nBitsPerPixel = 1; - else if ( ms1BitDithered == aEntry ) - nBitsPerPixel = 1; - else if ( ms4BitGrayscale == aEntry ) - nBitsPerPixel = 4; - else if ( ms4BitColorPalette == aEntry ) - nBitsPerPixel = 8; - else if ( ms8BitGrayscale == aEntry ) - nBitsPerPixel = 8; - else if ( ms8BitColorPalette == aEntry ) - nBitsPerPixel = 8; - else if ( ms24BitColor == aEntry ) - nBitsPerPixel = 24; - - if ( mbIsPixelFormat ) - { - nRawFileSize = ( maSize.Width * nBitsPerPixel + 7 ) &~ 7; // rounding up to 8 bits - nRawFileSize /= 8; // in bytes - nRawFileSize *= maSize.Height; - } - if ( nRawFileSize > SAL_MAX_UINT32 ) - nRawFileSize = 0; - } - return static_cast< sal_uInt32 >( nRawFileSize ); -} - -// checks if the source dimension/resolution is not too big -// to determine the exact graphic output size and preview for jpg -sal_Bool ExportDialog::IsTempExportAvailable() const -{ - return GetRawFileSize() < static_cast< sal_uInt32 >( mnMaxFilesizeForRealtimePreview ); -} - -ExportDialog::ExportDialog( FltCallDialogParameter& rPara, - const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > rxMgr, - const com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& rxSourceDocument, - sal_Bool bExportSelection, sal_Bool bIsPixelFormat ) : - ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT, *rPara.pResMgr ) ), - mrFltCallPara ( rPara ), - mpMgr ( rPara.pResMgr ), - mxMgr ( rxMgr ), - mxSourceDocument ( rxSourceDocument ), - maFlExportSize ( this, ResId( FL_EXPORT_SIZE, *rPara.pResMgr ) ), - maFtSizeX ( this, ResId( FT_SIZEX, *rPara.pResMgr ) ), - maMfSizeX ( this, ResId( MF_SIZEX, *rPara.pResMgr ) ), - maLbSizeX ( this, ResId( LB_SIZEX, *rPara.pResMgr ) ), - maFtSizeY ( this, ResId( FT_SIZEY, *rPara.pResMgr ) ), - maMfSizeY ( this, ResId( MF_SIZEY, *rPara.pResMgr ) ), - maLbSizeY ( this, ResId( LB_SIZEY, *rPara.pResMgr ) ), - maFtResolution ( this, ResId( FT_RESOLUTION, *rPara.pResMgr ) ), - maNfResolution ( this, ResId( NF_RESOLUTION, *rPara.pResMgr ) ), - maLbResolution ( this, ResId( LB_RESOLUTION, *rPara.pResMgr ) ), - maFlColorDepth ( this, ResId( FL_COLOR_DEPTH, *rPara.pResMgr ) ), - maLbColorDepth ( this, ResId( LB_COLOR_DEPTH, *rPara.pResMgr ) ), - maFlJPGQuality ( this, ResId( FL_JPG_QUALITY, *rPara.pResMgr ) ), - maFlMode ( this, ResId( FL_MODE, *rPara.pResMgr ) ), - maFlPBMOptions ( this, ResId( FL_PBM_OPTIONS, *rPara.pResMgr ) ), - maSbCompression ( this, ResId( SB_COMPRESSION, *rPara.pResMgr ) ), - maNfCompression ( this, ResId( NF_COMPRESSION, *rPara.pResMgr ) ), - maFtJPGMin ( this, ResId( FT_JPG_MIN, *rPara.pResMgr ) ), - maFtJPGMax ( this, ResId( FT_JPG_MAX, *rPara.pResMgr ) ), - maFtPNGMin ( this, ResId( FT_PNG_MIN, *rPara.pResMgr ) ), - maFtPNGMax ( this, ResId( FT_PNG_MAX, *rPara.pResMgr ) ), - maCbJPGPreview ( this, ResId( CB_JPG_PREVIEW, *rPara.pResMgr ) ), - maCbInterlaced ( this, ResId( CB_INTERLACED, *rPara.pResMgr ) ), - maCbRLEEncoding ( this, ResId( CB_RLE_ENCODING, *rPara.pResMgr ) ), - maFlGIFDrawingObjects ( this, ResId( FL_GIF_DRAWING_OBJECTS, *rPara.pResMgr ) ), - maCbSaveTransparency ( this, ResId( CB_SAVE_TRANSPARENCY, *rPara.pResMgr ) ), - maRbBinary ( this, ResId( RB_BINARY, *rPara.pResMgr ) ), - maRbText ( this, ResId( RB_TEXT, *rPara.pResMgr ) ), - maFlEPSPreview ( this, ResId( FL_EPS_PREVIEW, *rPara.pResMgr ) ), - maCbEPSPreviewTIFF ( this, ResId( CB_EPS_PREVIEW_TIFF, *rPara.pResMgr ) ), - maCbEPSPreviewEPSI ( this, ResId( CB_EPS_PREVIEW_EPSI, *rPara.pResMgr ) ), - maFlEPSVersion ( this, ResId( FL_EPS_VERSION, *rPara.pResMgr ) ), - maRbEPSLevel1 ( this, ResId( RB_EPS_LEVEL1, *rPara.pResMgr ) ), - maRbEPSLevel2 ( this, ResId( RB_EPS_LEVEL2, *rPara.pResMgr ) ), - maFlEPSColorFormat ( this, ResId( FL_EPS_COLOR_FORMAT, *rPara.pResMgr ) ), - maRbEPSColorFormat1 ( this, ResId( RB_EPS_COLOR_FORMAT1, *rPara.pResMgr ) ), - maRbEPSColorFormat2 ( this, ResId( RB_EPS_COLOR_FORMAT2, *rPara.pResMgr ) ), - maFlCompression ( this, ResId( FL_COMPRESSION, *rPara.pResMgr ) ), - maRbEPSCompressionLZW ( this, ResId( RB_EPS_COMPRESSION_LZW, *rPara.pResMgr ) ), - maRbEPSCompressionNone ( this, ResId( RB_EPS_COMPRESSION_NONE, *rPara.pResMgr ) ), - maFlEstimatedSize ( this, ResId( FL_ESTIMATED_SIZE, *rPara.pResMgr ) ), - maFtEstimatedSize ( this, ResId( FT_ESTIMATED_SIZE, *rPara.pResMgr ) ), - msEstimatedSizePix1 ( ResId( STR_ESTIMATED_SIZE_PIX_1, *rPara.pResMgr ) ), - msEstimatedSizePix2 ( ResId( STR_ESTIMATED_SIZE_PIX_2, *rPara.pResMgr ) ), - msEstimatedSizeVec ( ResId( STR_ESTIMATED_SIZE_VEC, *rPara.pResMgr ) ), - maFlButtons ( this, ResId( FL_BUTTONS, *rPara.pResMgr ) ), - maFbJPGPreview ( this, ResId( FB_JPG_PREVIEW, *rPara.pResMgr ) ), - maSbZoom ( this, ResId( SB_ZOOM, *rPara.pResMgr ) ), - maNfZoom ( this, ResId( NF_ZOOM, *rPara.pResMgr ) ), - maSbJPGPreviewHorz ( this, ResId( SB_JPG_PREVIEW_HORZ, *rPara.pResMgr ) ), - maSbJPGPreviewVert ( this, ResId( SB_JPG_PREVIEW_VERT, *rPara.pResMgr ) ), - maBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ), - maBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ), - maBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ), - ms1BitTreshold ( ResId( STR_1BIT_THRESHOLD, *rPara.pResMgr ) ), - ms1BitDithered ( ResId( STR_1BIT_DITHERED, *rPara.pResMgr ) ), - ms4BitGrayscale ( ResId( STR_4BIT_GRAYSCALE, *rPara.pResMgr ) ), - ms4BitColorPalette ( ResId( STR_4BIT_COLOR_PALETTE, *rPara.pResMgr ) ), - ms8BitGrayscale ( ResId( STR_8BIT_GRAYSCALE, *rPara.pResMgr ) ), - ms8BitColorPalette ( ResId( STR_8BIT_COLOR_PALETTE, *rPara.pResMgr ) ), - ms24BitColor ( ResId( STR_24BIT_TRUE_COLOR, *rPara.pResMgr ) ), - maExt ( rPara.aFilterExt ), - mnFormat ( FORMAT_UNKNOWN ), - mnMaxFilesizeForRealtimePreview( 0 ), - mpTempStream ( new SvMemoryStream() ), - maOriginalSize ( awt::Size( 0, 0 ) ), - mbPreview ( sal_False ), - mbIsPixelFormat ( bIsPixelFormat ), - mbExportSelection ( bExportSelection ), - mbPreserveAspectRatio ( sal_True ) -{ - GetGraphicSource(); - - maExt.ToUpperAscii(); - - String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/" ) ); - mpOptionsItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData ); - aFilterConfigPath.Append( maExt ); - mpFilterOptionsItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData ); - - mnInitialResolutionUnit = mbIsPixelFormat - ? mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportUnit" ) ), UNIT_DEFAULT ) - : mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "VectorExportUnit" ) ), UNIT_DEFAULT ); - - mnMaxFilesizeForRealtimePreview = mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "MaxFilesizeForRealtimePreview" ) ), 0 ); - maFtEstimatedSize.SetText( String( RTL_CONSTASCII_USTRINGPARAM( " \n " ) ) ); - - String aTitle( maExt ); - aTitle += String( ResId( DLG_EXPORT_TITLE, *mpMgr ) ); - SetText( aTitle ); - - mnFormat = GetFilterFormat( maExt ); - - Size aResolution( Application::GetDefaultDevice()->LogicToPixel( Size( 100, 100 ), MAP_CM ) ); - maResolution.Width = aResolution.Width(); - maResolution.Height= aResolution.Height(); - maOriginalSize = GetOriginalSize(); - if ( bIsPixelFormat ) - { - double fPixelsPer100thmm = static_cast< double >( maResolution.Width ) / 100000.0; - maSize = awt::Size( static_cast< sal_Int32 >( ( fPixelsPer100thmm * maOriginalSize.Width ) + 0.5 ), - static_cast< sal_Int32 >( ( fPixelsPer100thmm * maOriginalSize.Height ) + 0.5 ) ); - } - else - { - maSize = maOriginalSize; - } - - // Size - maLbSizeX.SetSelectHdl( LINK( this, ExportDialog, UpdateHdl ) ); - - maSbCompression.SetScrollHdl( LINK( this, ExportDialog, SbCompressionUpdateHdl ) ); - maNfCompression.SetModifyHdl( LINK( this, ExportDialog, UpdateHdl ) ); - - maMfSizeX.SetModifyHdl( LINK( this, ExportDialog, UpdateHdlMtfSizeX ) ); - maMfSizeY.SetModifyHdl( LINK( this, ExportDialog, UpdateHdlMtfSizeY ) ); - - maNfResolution.SetModifyHdl( LINK( this, ExportDialog, UpdateHdlNfResolution ) ); - maLbResolution.SetSelectHdl( LINK( this, ExportDialog, UpdateHdl ) ); - - maLbColorDepth.SetSelectHdl( LINK( this, ExportDialog, UpdateHdl ) ); - - maCbInterlaced.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); - - maCbSaveTransparency.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); - - maCbEPSPreviewTIFF.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); - maCbEPSPreviewEPSI.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); - - maRbEPSCompressionLZW.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); - maRbEPSCompressionNone.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); - - maRbBinary.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); - maRbText.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); - - - // JPG Preview -// maCbJPGPreview.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); -maCbJPGPreview.Enable( sal_False ); - - maSbJPGPreviewVert.SetScrollHdl( LINK( this, ExportDialog, UpdateHdl ) ); - maSbJPGPreviewHorz.SetScrollHdl( LINK( this, ExportDialog, UpdateHdl ) ); - maSbZoom.SetScrollHdl( LINK( this, ExportDialog, UpdateHdl ) ); - - // BMP - maCbRLEEncoding.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); - - // EPS - maRbEPSLevel1.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); - maRbEPSLevel2.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); - - maBtnOK.SetClickHdl( LINK( this, ExportDialog, OK ) ); - - setupLayout(); - updateControls(); - - FreeResource(); -} - -void ExportDialog::createSizeControls( vcl::RowOrColumn& rLayout ) -{ - size_t nIndex; - Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) ); - long nIndent = aBorder.Width(); - - // Size controls - rLayout.addWindow( &maFlExportSize ); - - Size aLbMax( maLbSizeX.GetSizePixel() ); - aLbMax.Width() = Max( aLbMax.Width(), maLbResolution.GetSizePixel().Width() ); - - boost::shared_ptr< vcl::LabelColumn > xSizeColumns( new vcl::LabelColumn( &rLayout ) ); - rLayout.addChild( xSizeColumns ); - - // row 1 - boost::shared_ptr< vcl::RowOrColumn > xColumn( new vcl::RowOrColumn( xSizeColumns.get(), false ) ); - xSizeColumns->addRow( &maFtSizeX, xColumn, nIndent ); - Size aMinSize( maMfSizeX.GetSizePixel() ); - nIndex = xColumn->addWindow( &maMfSizeX ); - xColumn->setMinimumSize( nIndex, aMinSize ); - nIndex = xColumn->addWindow( &maLbSizeX ); - xColumn->setMinimumSize( nIndex, aLbMax ); - - // row 2 - xColumn = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xSizeColumns.get(), false ) ); - xSizeColumns->addRow( &maFtSizeY, xColumn, nIndent ); - nIndex = xColumn->addWindow( &maMfSizeY ); - xColumn->setMinimumSize( nIndex, aMinSize ); - nIndex = xColumn->addWindow( &maLbSizeY ); - xColumn->setMinimumSize( nIndex, aLbMax ); - - // row 3 - if ( mbIsPixelFormat ) // TODO: (metafileresolutionsupport) - { - xColumn = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xSizeColumns.get(), false ) ); - xSizeColumns->addRow( &maFtResolution, xColumn, nIndent ); - nIndex = xColumn->addWindow( &maNfResolution ); - xColumn->setMinimumSize( nIndex, aMinSize ); - nIndex = xColumn->addWindow( &maLbResolution ); - xColumn->setMinimumSize( nIndex, aLbMax ); - } - - sal_Int32 nUnit = mnInitialResolutionUnit; - if ( nUnit == UNIT_DEFAULT ) - nUnit = GetDefaultUnit(); - - if ( !mbIsPixelFormat ) - { - maLbSizeX.RemoveEntry( UNIT_PIXEL ); // removing pixel - if ( nUnit >= UNIT_PIXEL ) - nUnit = UNIT_CM; - } - else if ( nUnit > UNIT_MAX_ID ) - nUnit = UNIT_PIXEL; - if ( nUnit < 0 ) - nUnit = UNIT_CM; - maLbSizeX.SelectEntryPos( static_cast< USHORT >( nUnit ) ); - - if ( mbIsPixelFormat ) // TODO: (metafileresolutionsupport) should be supported for vector formats also... this makes - { // sense eg for bitmap fillings in metafiles, to preserve high dpi output - // (atm without special vector support the bitmaps are rendered with 96dpi) - sal_Int32 nResolution = mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolution" ) ), 96 ); - if ( nResolution < 1 ) - nResolution = 96; - maNfResolution.SetValue( nResolution ); - - sal_Int32 nResolutionUnit = mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolutionUnit" ) ), 1 ); - if ( ( nResolutionUnit < 0 ) || ( nResolutionUnit > 2 ) ) - nResolutionUnit = 1; - maLbResolution.SelectEntryPos( static_cast< USHORT >( nResolutionUnit ) ); - } - - boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); -} - -void ExportDialog::createColorDepthControls( vcl::RowOrColumn& rLayout ) -{ - // Color Depth - Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) ); - long nIndent = aBorder.Width(); - - boost::shared_ptr< vcl::RowOrColumn > xRow( new vcl::RowOrColumn( &rLayout, false ) ); - rLayout.addChild( xRow ); - xRow->addWindow( &maFlColorDepth ); - - xRow = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( &rLayout, false ) ); - rLayout.addChild( xRow ); - boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); - xRow->addChild( xIndenter ); - boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); - xIndenter->setChild( xRows ); - xRows->addWindow( &maLbColorDepth ); - - boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); -} - -void ExportDialog::createScrollBar( vcl::RowOrColumn& rLayout ) -{ - boost::shared_ptr< vcl::RowOrColumn > xRow( new vcl::RowOrColumn( &rLayout, false ) ); - rLayout.addChild( xRow ); - - Size aMinSize( maSbCompression.GetSizePixel() ); - size_t nIndex = xRow->addWindow( &maSbCompression ); - xRow->setMinimumSize( nIndex, aMinSize ); - aMinSize = maNfCompression.GetSizePixel(); - nIndex = xRow->addWindow( &maNfCompression ); - xRow->setMinimumSize( nIndex, aMinSize ); -} - -void ExportDialog::createFilterOptions( vcl::RowOrColumn& rLayout ) -{ - Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) ); - long nIndent = aBorder.Width(); - - switch( mnFormat ) - { - case FORMAT_JPG : - { - sal_Int32 nColor = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorMode" ) ), 0 ); - if ( nColor == 1 ) - nColor = 0; - else - nColor = 1; - maLbColorDepth.InsertEntry( ms8BitGrayscale ); - maLbColorDepth.InsertEntry( ms24BitColor ); - maLbColorDepth.SelectEntryPos( nColor ); - createColorDepthControls( maLayout ); - - rLayout.addWindow( &maFlJPGQuality ); - - // Quality - boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); - rLayout.addChild( xIndenter ); - boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); - xIndenter->setChild( xRows ); - createScrollBar( *xRows.get() ); - xRows->addWindow( &maFtJPGMin ); - xRows->addWindow( &maFtJPGMax ); - if ( maCbJPGPreview.IsEnabled() ) - xRows->addWindow( &maCbJPGPreview ); - - boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); - - sal_Int32 nQuality = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Quality" ) ), 75 ); - if ( ( nQuality < 1 ) || ( nQuality > 100 ) ) - nQuality = 75; - - maSbCompression.SetRangeMin( 1 ); - maSbCompression.SetRangeMax( 100 ); - maNfCompression.SetMin( 1 ); - maNfCompression.SetMax( 100 ); - maNfCompression.SetValue( nQuality ); - maNfCompression.SetStrictFormat( sal_True ); - if ( maCbJPGPreview.IsEnabled() ) - maCbJPGPreview.Check( sal_False ); - } - break; - case FORMAT_PNG : - { - rLayout.addWindow( &maFlCompression ); - - // Compression 1..9 - boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); - rLayout.addChild( xIndenter ); - boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); - xIndenter->setChild( xRows ); - createScrollBar( *xRows.get() ); - xRows->addWindow( &maFtPNGMin ); - xRows->addWindow( &maFtPNGMax ); - boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); - - // Interlaced - rLayout.addWindow( &maFlMode ); - xIndenter.reset( new vcl::Indenter( &rLayout, nIndent ) ); - rLayout.addChild( xIndenter ); - xRows.reset( new vcl::RowOrColumn( &rLayout, true ) ); - xIndenter->setChild( xRows ); - xRows->addWindow( &maCbInterlaced ); - - xSpacer.reset( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); - - sal_Int32 nCompression = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Compression" ) ), 6 ); - if ( ( nCompression < 1 ) || ( nCompression > 9 ) ) - nCompression = 6; - maSbCompression.SetRangeMin( 1 ); - maSbCompression.SetRangeMax( 9 ); - maNfCompression.SetMin( 1 ); - maNfCompression.SetMax( 9 ); - maNfCompression.SetValue( 9 ); - maNfCompression.SetStrictFormat( sal_True ); - - maCbInterlaced.Check( mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), 0 ) != 0 ); - } - break; - case FORMAT_BMP : - { - sal_Int32 nColor = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Color" ) ), 0 ); - if ( nColor == 0 ) - nColor = 6; - else - nColor--; - maLbColorDepth.InsertEntry( ms1BitTreshold ); - maLbColorDepth.InsertEntry( ms1BitDithered ); - maLbColorDepth.InsertEntry( ms4BitGrayscale ); - maLbColorDepth.InsertEntry( ms4BitColorPalette ); - maLbColorDepth.InsertEntry( ms8BitGrayscale ); - maLbColorDepth.InsertEntry( ms8BitColorPalette ); - maLbColorDepth.InsertEntry( ms24BitColor ); - maLbColorDepth.SelectEntryPos( nColor ); - createColorDepthControls( maLayout ); - - rLayout.addWindow( &maFlCompression ); - // RLE coding - boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); - rLayout.addChild( xIndenter ); - boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); - xIndenter->setChild( xRows ); - xRows->addWindow( &maCbRLEEncoding ); - boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); - - maCbRLEEncoding.Check( mpFilterOptionsItem->ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( "RLE_Coding" ) ), sal_True ) ); - } - break; - case FORMAT_GIF : - { - rLayout.addWindow( &maFlMode ); - boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); - rLayout.addChild( xIndenter ); - boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); - xIndenter->setChild( xRows ); - xRows->addWindow( &maCbInterlaced ); - boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); - - rLayout.addWindow( &maFlGIFDrawingObjects ); - xIndenter = boost::shared_ptr< vcl::Indenter >( new vcl::Indenter( &rLayout, nIndent ) ); - rLayout.addChild( xIndenter ); - xRows = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( &rLayout, true ) ); - xIndenter->setChild( xRows ); - xRows->addWindow( &maCbSaveTransparency ); - xSpacer.reset( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); - - maCbInterlaced.Check( mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), 1 ) != 0 ); - maCbSaveTransparency.Check( mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Translucent" ) ), 1 ) != 0 ); - } - break; - case FORMAT_PBM : - case FORMAT_PGM : - case FORMAT_PPM : - { - rLayout.addWindow( &maFlJPGQuality ); - - // RB Binary / Text - boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); - rLayout.addChild( xIndenter ); - boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); - xIndenter->setChild( xRows ); - xRows->addWindow( &maRbBinary ); - xRows->addWindow( &maRbText ); - boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); - - sal_Int32 nFormat = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "FileFormat" ) ), 1 ); - maRbBinary.Check( nFormat == 0 ); - maRbText.Check( nFormat != 0 ); - } - break; - case FORMAT_EPS : - { - boost::shared_ptr< vcl::RowOrColumn > xColumns( new vcl::RowOrColumn( &rLayout, false ) ); - rLayout.addChild( xColumns ); - boost::shared_ptr< vcl::RowOrColumn > xLeft( new vcl::RowOrColumn( &rLayout, true ) ); - xColumns->addChild( xLeft ); - - xLeft->addWindow( &maFlEPSPreview ); - boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( xLeft.get(), nIndent ) ); - xLeft->addChild( xIndenter ); - boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( xLeft.get(), true ) ); - xIndenter->setChild( xRows ); - xRows->addWindow( &maCbEPSPreviewTIFF ); - xRows->addWindow( &maCbEPSPreviewEPSI ); - boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( xLeft.get(), 2 ) ); - xLeft->addChild( xSpacer ); - - xLeft->addWindow( &maFlEPSVersion ); - xIndenter = boost::shared_ptr< vcl::Indenter >( new vcl::Indenter( xLeft.get(), nIndent ) ); - xLeft->addChild( xIndenter ); - xRows = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xLeft.get(), true ) ); - xIndenter->setChild( xRows ); - xRows->addWindow( &maRbEPSLevel1 ); - xRows->addWindow( &maRbEPSLevel2 ); - xSpacer.reset( new vcl::Spacer( xLeft.get(), 2 ) ); - xLeft->addChild( xSpacer ); - - boost::shared_ptr< vcl::RowOrColumn > xRight( new vcl::RowOrColumn( &rLayout, true ) ); - xColumns->addChild( xRight ); - - xRight->addWindow( &maFlEPSColorFormat ); - xIndenter = boost::shared_ptr< vcl::Indenter >( new vcl::Indenter( xRight.get(), nIndent ) ); - xRight->addChild( xIndenter ); - xRows = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xRight.get(), true ) ); - xIndenter->setChild( xRows ); - xRows->addWindow( &maRbEPSColorFormat1 ); - xRows->addWindow( &maRbEPSColorFormat2 ); - xSpacer.reset( new vcl::Spacer( xRight.get(), 2 ) ); - xRight->addChild( xSpacer ); - - xRight->addWindow( &maFlCompression ); - xIndenter = boost::shared_ptr< vcl::Indenter >( new vcl::Indenter( xRight.get(), nIndent ) ); - xRight->addChild( xIndenter ); - xRows = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xRight.get(), true ) ); - xIndenter->setChild( xRows ); - xRows->addWindow( &maRbEPSCompressionLZW ); - xRows->addWindow( &maRbEPSCompressionNone ); - - xSpacer.reset( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); - - sal_Int32 nPreview = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Preview" ) ), 0 ); - sal_Int32 nVersion = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ), 2 ); - sal_Int32 nColor = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorFormat" ) ), 0 ); - sal_Int32 nCompr = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "CompressionMode" ) ), 2 ); - - mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "TextMode" ) ), 0 ); - - maCbEPSPreviewTIFF.Check( ( nPreview & 1 ) != 0 ); - maCbEPSPreviewEPSI.Check( ( nPreview & 2 ) != 0 ); - - maRbEPSLevel1.Check( nVersion == 1 ); - maRbEPSLevel2.Check( nVersion == 2 ); - - maRbEPSColorFormat1.Check( nColor == 1 ); - maRbEPSColorFormat2.Check( nColor != 1 ); - - maRbEPSCompressionLZW.Check( nCompr == 1 ); - maRbEPSCompressionNone.Check( nCompr != 1 ); - } - break; - } -} - -void ExportDialog::createButtons( vcl::RowOrColumn& rLayout ) -{ - rLayout.addWindow( &maFlButtons ); - boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); - - Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) ); - - boost::shared_ptr< vcl::RowOrColumn > xButtons( new vcl::RowOrColumn( &rLayout, false ) ); - size_t nIndex = rLayout.addChild( xButtons ); - rLayout.setBorders( nIndex, aBorder.Width(), 0, aBorder.Width(), aBorder.Width() ); - - Size aMinSize( maBtnCancel.GetSizePixel() ); - // insert help button - xButtons->setMinimumSize( xButtons->addWindow( &maBtnHelp ), aMinSize ); - - // insert a spacer, cancel and OK buttons are right aligned - - xSpacer.reset( new vcl::Spacer( xButtons.get(), 2 ) ); - xButtons->addChild( xSpacer ); - xButtons->setMinimumSize( xButtons->addWindow( &maBtnOK ), aMinSize ); - xButtons->setMinimumSize( xButtons->addWindow( &maBtnCancel ), aMinSize ); -} - -void ExportDialog::setupLayout() -{ - Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) ); - maLayout.setParentWindow( this ); - maLayout.setOuterBorder( aBorder.Width() ); - - createSizeControls( maLayout ); - createFilterOptions( maLayout ); - - if ( mnMaxFilesizeForRealtimePreview || mbIsPixelFormat ) - { - maLayout.addWindow( &maFlEstimatedSize ); - maLayout.addWindow( &maFtEstimatedSize ); - } - createButtons( maLayout ); - - maLayout.show(); - maDialogSize = maLayout.getOptimalSize( WINDOWSIZE_PREFERRED ); - maLayout.setManagedArea( Rectangle( Point(), maDialogSize ) ); - SetOutputSizePixel( Size( mbPreview ? maDialogSize.Width() * 2 : maDialogSize.Width(), maDialogSize.Height() ) ); - - maRectFlButtons = Rectangle( maFlButtons.GetPosPixel(), maFlButtons.GetSizePixel() ); - maRectBtnHelp = Rectangle( maBtnHelp.GetPosPixel(), maBtnHelp.GetSizePixel() ); - maRectBtnOK = Rectangle( maBtnOK.GetPosPixel(), maBtnOK.GetSizePixel() ); - maRectBtnCancel = Rectangle( maBtnCancel.GetPosPixel(), maBtnOK.GetSizePixel() ); - - maLbSizeY.Hide(); -} - -static rtl::OUString ImpValueOfInKB( const sal_Int64& rVal ) -{ - double fVal( static_cast( rVal ) ); - fVal /= ( 1 << 10 ); - fVal += 0.05; - rtl::OUStringBuffer aVal( rtl::OUString::valueOf( fVal ) ); - sal_Int32 nX( rtl::OUString( aVal.getStr() ).indexOf( '.', 0 ) ); - if ( nX > 0 ) - aVal.setLength( nX + 2 ); - return aVal.makeStringAndClear(); -} - -sal_Int32 static GetZoomValueFromThumbPos( sal_Int32 nThumbPos ) -{ - sal_Int32 nProz = 0; - if ( nThumbPos <= 50 ) - nProz = nThumbPos * 2; // so a range of 50 represents 100% - else - nProz = ( ( nThumbPos - 50 ) * 60 ) + 100; // we want to scale up to 3000% - return nProz; -} - -void ExportDialog::updatePreview() -{ - // JPG -// maCbJPGPreview.Enable( IsTempExportAvailable() ); - -// if ( maCbJPGPreview.IsEnabled() && maCbJPGPreview.IsChecked() ) - if ( mbPreview ) - { - long nScrollBarSize = Application::GetSettings().GetStyleSettings().GetScrollBarSize(); - - Point aPreviewPos( maDialogSize.Width(), 0 ); - Size aPreviewSize( maDialogSize.Width(), maFlButtons.GetPosPixel().Y() ); - - Point aFixedBitmapPos( aPreviewPos ); - Size aFixedBitmapSize( aPreviewSize ); - - maSbZoom.Show( sal_False ); - maSbZoom.SetPosPixel( Point( aPreviewPos.X(), aPreviewPos.Y() ) ); - maSbZoom.SetSizePixel( Size( aPreviewSize.Width() / 4, nScrollBarSize ) ); - maNfZoom.Show( sal_False ); - maNfZoom.SetPosPixel( Point( aPreviewPos.X() + aPreviewSize.Width() / 4, aPreviewPos.Y() ) ); - maNfZoom.SetSizePixel( Size( aPreviewSize.Width() / 6, nScrollBarSize ) ); - maNfZoom.SetValue( GetZoomValueFromThumbPos( maSbZoom.GetThumbPos() ) ); - maFbJPGPreview.Show( sal_True ); - - sal_Int32 nZoom = GetZoomValueFromThumbPos( maSbZoom.GetThumbPos() ); - double fSizePixelX = static_cast< double >( maSize.Width * nZoom ) / 100.0; - double fSizePixelY = static_cast< double >( maSize.Height * nZoom ) / 100.0; - - double fXRatio = fSizePixelX / maSize.Width; // the size of each pixel - double fYRatio = fSizePixelY / maSize.Height; - - sal_Bool bHorzSb = fSizePixelX > aFixedBitmapSize.Width(); - sal_Bool bVertSb = fSizePixelY > aFixedBitmapSize.Height(); - if ( bHorzSb ) - { - aFixedBitmapSize.Height() -= nScrollBarSize; - - maSbJPGPreviewHorz.Show( sal_True ); - maSbJPGPreviewHorz.SetPosPixel( Point( aFixedBitmapPos.X(), aFixedBitmapPos.Y() + aFixedBitmapSize.Height() ) ); - maSbJPGPreviewHorz.SetSizePixel( Size( aFixedBitmapSize.Width(), nScrollBarSize ) ); - } - else - { - maSbJPGPreviewHorz.Show( sal_False ); - } - - - if ( bVertSb ) - { - aFixedBitmapSize.Width() -= nScrollBarSize; - - maSbJPGPreviewVert.Show( sal_True ); - maSbJPGPreviewVert.SetPosPixel( Point( aFixedBitmapPos.X() + aFixedBitmapSize.Width(), aFixedBitmapPos.Y() ) ); - maSbJPGPreviewVert.SetSizePixel( Size( nScrollBarSize, aFixedBitmapSize.Height() ) ); - } - else - { - maSbJPGPreviewVert.Show( sal_False ); - } - - Point aPos( 0, 0 ); - Size aSize; - if ( fXRatio > 1.0 ) - { - aSize.Width() = maSize.Width > aFixedBitmapSize.Width() ? maSize.Width : aFixedBitmapSize.Width(); - aSize.Width() /= static_cast(fXRatio); - } - else - { - aSize.Width() = maSize.Width < aFixedBitmapSize.Width() ? maSize.Width : aFixedBitmapSize.Width(); - aSize.Width() /= static_cast(fXRatio); - } - - if ( fYRatio > 1.0 ) - { - aSize.Height() = maSize.Height > aFixedBitmapSize.Height() ? maSize.Height : aFixedBitmapSize.Height(); - aSize.Height() /= static_cast(fYRatio); - } - else - { - aSize.Height() = maSize.Height < aFixedBitmapSize.Height() ? maSize.Height : aFixedBitmapSize.Height(); - aSize.Height() /= static_cast(fYRatio); - } - - if ( aSize.Width() < maSize.Width ) - { - sal_Int32 nXDiff = static_cast< sal_Int32 >( ( ( ( maSize.Width - aSize.Width() ) * maSbJPGPreviewHorz.GetThumbPos() ) / 100.0 ) ); - aPos.X() += nXDiff; - } - if ( aSize.Height() < maSize.Height ) - { - sal_Int32 nYDiff = static_cast< sal_Int32 >( ( ( ( maSize.Height - aSize.Height() ) * maSbJPGPreviewVert.GetThumbPos() ) / 100.0 ) ); - aPos.Y() += nYDiff; - } - - Bitmap aCroppedBitmap( maBitmap ); - aCroppedBitmap.Crop( Rectangle( aPos, aSize ) ); - aSize = aCroppedBitmap.GetSizePixel(); - aSize = Size( static_cast(aSize.Width() * fXRatio), static_cast(aSize.Height() * fYRatio) ); - aCroppedBitmap.Scale( aSize ); - - if ( aSize.Width() > aFixedBitmapSize.Width() ) - aSize.Width() = aFixedBitmapSize.Width(); - if ( aSize.Height() > aFixedBitmapSize.Height() ) - aSize.Height() = aFixedBitmapSize.Height(); - Point aPoint( aFixedBitmapPos ); - if ( aSize.Width() < aFixedBitmapSize.Width() ) - aPoint.X() += ( aFixedBitmapSize.Width() - aSize.Width() ) / 2; - if ( aSize.Height() < aFixedBitmapSize.Height() ) - aPoint.Y() += ( aFixedBitmapSize.Height() - aSize.Height() ) / 2; - - maFbJPGPreview.SetPosPixel( aPoint ); - maFbJPGPreview.SetSizePixel( aSize ); - maFbJPGPreview.SetBitmap( aCroppedBitmap ); - - SetOutputSizePixel( Size( maDialogSize.Width() * 2, maDialogSize.Height() ) ); - - maFlButtons.SetSizePixel( Size( maRectFlButtons.GetWidth() * 2, maRectFlButtons.GetHeight() ) ); - maBtnHelp.SetPosPixel( Point( maRectBtnHelp.Left() + maDialogSize.Width(), maRectBtnHelp.Top() ) ); - maBtnOK.SetPosPixel( Point( maRectBtnOK.Left() + maDialogSize.Width(), maRectBtnOK.Top() ) ); - maBtnCancel.SetPosPixel( Point( maRectBtnCancel.Left() + maDialogSize.Width(), maRectBtnCancel.Top() ) ); - } - else - { - maSbZoom.Show( sal_False ); - maNfZoom.Show( sal_False ); - maFbJPGPreview.Show( sal_False ); - maSbJPGPreviewHorz.Show( sal_False ); - maSbJPGPreviewVert.Show( sal_False ); - - SetOutputSizePixel( maDialogSize ); - - maFlButtons.SetSizePixel( Size( maRectFlButtons.GetWidth(), maRectFlButtons.GetHeight() ) ); - maBtnHelp.SetPosPixel( Point( maRectBtnHelp.Left(), maRectBtnHelp.Top() ) ); - maBtnOK.SetPosPixel( Point( maRectBtnOK.Left(), maRectBtnOK.Top() ) ); - maBtnCancel.SetPosPixel( Point( maRectBtnCancel.Left(), maRectBtnCancel.Top() ) ); - } -} - -void ExportDialog::updateControls() -{ - GetGraphicStream(); - - // Size Controls - if ( !mbIsPixelFormat ) - { - awt::Size aSize100thmm( maSize ); - Size aSize( LogicToLogic( Size( aSize100thmm.Width * 100, aSize100thmm.Height * 100 ), MAP_100TH_MM, - MapMode( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) ) ) ); - maMfSizeX.SetValue( aSize.Width() ); - maMfSizeY.SetValue( aSize.Height() ); - } - else - { - MapUnit aMapUnit( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) ); - if ( aMapUnit == MAP_PIXEL ) - { // calculating pixel count via resolution and original graphic size - maMfSizeX.SetDecimalDigits( 0 ); - maMfSizeY.SetDecimalDigits( 0 ); - maMfSizeX.SetValue( maSize.Width ); - maMfSizeY.SetValue( maSize.Height ); - } - else - { - maMfSizeX.SetDecimalDigits( 2 ); - maMfSizeY.SetDecimalDigits( 2 ); - double fRatio; - switch( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) ) - { - case MAP_INCH : fRatio = static_cast< double >( maResolution.Width ) * 0.0254; break; - case MAP_MM : fRatio = static_cast< double >( maResolution.Width ) * 0.001; break; - case MAP_POINT :fRatio = ( static_cast< double >( maResolution.Width ) * 0.0254 ) / 72.0; break; - default: - case MAP_CM : fRatio = static_cast< double >( maResolution.Width ) * 0.01; break; - } - maMfSizeX.SetValue( static_cast< sal_Int32 >( ( static_cast< double >( maSize.Width * 100 ) / fRatio ) + 0.5 ) ); - maMfSizeY.SetValue( static_cast< sal_Int32 >( ( static_cast< double >( maSize.Height * 100 ) / fRatio ) + 0.5 ) ); - } - } - sal_Int32 nResolution = 0; - switch( maLbResolution.GetSelectEntryPos() ) - { - case 0 : nResolution = maResolution.Width / 100; break; // pixels / cm - case 2 : nResolution = maResolution.Width; break; // pixels / meter - default: - case 1 : nResolution = static_cast< sal_Int32 >(maResolution.Width * 0.0254); break; // pixels / inch - } - maNfResolution.SetValue( nResolution ); - - if ( maSbCompression.IsVisible() ) - maSbCompression.SetThumbPos( maNfCompression.GetValue() ); - - // updating estimated size - sal_Int64 nRealFileSize( mpTempStream->Tell() ); - if ( mbIsPixelFormat ) - { - String aEst( nRealFileSize ? msEstimatedSizePix2 : msEstimatedSizePix1 ); - sal_Int64 nRawFileSize( GetRawFileSize() ); - xub_StrLen nInd = aEst.Search( '%' ); - aEst.Replace( nInd, 2, ImpValueOfInKB( nRawFileSize ) ); - - if ( nRealFileSize ) - { - nInd = aEst.Search( '%', nInd ); - aEst.Replace( nInd, 2, ImpValueOfInKB( nRealFileSize ) ); - } - maFtEstimatedSize.SetText( aEst ); - } - else - { - if ( mnMaxFilesizeForRealtimePreview ) - { - String aEst( msEstimatedSizeVec ); - xub_StrLen nInd = aEst.Search( '%', 0 ); - aEst.Replace( nInd, 2, ImpValueOfInKB( nRealFileSize ) ); - maFtEstimatedSize.SetText( aEst ); - } - } - updatePreview(); - - // EPS - if ( maRbEPSLevel1.IsVisible() ) - { - sal_Bool bEnabled = maRbEPSLevel1.IsChecked() == sal_False; - maRbEPSColorFormat1.Enable( bEnabled ); - maRbEPSColorFormat2.Enable( bEnabled ); - maRbEPSCompressionLZW.Enable( bEnabled ); - maRbEPSCompressionNone.Enable( bEnabled ); - } -} - -ExportDialog::~ExportDialog() -{ - delete mpFilterOptionsItem; - delete mpOptionsItem; -} - - -/************************************************************************* -|* -|* Speichert eingestellte Werte in ini-Datei -|* -\************************************************************************/ -IMPL_LINK( ExportDialog, UpdateHdl, void *, EMPTYARG ) -{ - updateControls(); - return 0; -} - -IMPL_LINK( ExportDialog, UpdateHdlMtfSizeX, void *, EMPTYARG ) -{ - double fRatio = static_cast< double >( maOriginalSize.Height ) / maOriginalSize.Width; - - if ( mbIsPixelFormat ) - { - switch( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) ) - { - case MAP_INCH : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.0254 * maMfSizeX.GetValue() / 100.0 + 0.5 ); break; - case MAP_CM : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.01 * maMfSizeX.GetValue() / 100.0 + 0.5 ); break; - case MAP_MM : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.001 * maMfSizeX.GetValue() / 100.0 + 0.5 ); break; - case MAP_POINT : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.0254 * maMfSizeX.GetValue() / 100.0 * 72 + 0.5 ); break; - default: - case MAP_PIXEL : maSize.Width = maMfSizeX.GetValue(); break; - } - maSize.Height = static_cast< sal_Int32 >( fRatio * maSize.Width + 0.5 ); - } - else - { - Fraction aFract( 1, 100 ); - sal_Int32 nWidth = maMfSizeX.GetValue(); - sal_Int32 nHeight= static_cast< sal_Int32 >( nWidth * fRatio ); - const Size aSource( static_cast< sal_Int32 >( nWidth ), static_cast< sal_Int32 >( nHeight ) ); - MapMode aSourceMapMode( GetMapUnit( maLbSizeX.GetSelectEntryPos() ),Point(), aFract, aFract ); - Size aDest( LogicToLogic( aSource, aSourceMapMode, MAP_100TH_MM ) ); - - maSize.Width = aDest.Width(); - if ( mbPreserveAspectRatio ) - maSize.Height = aDest.Height(); - } - updateControls(); - return 0; -} - -IMPL_LINK( ExportDialog, UpdateHdlMtfSizeY, void *, EMPTYARG ) -{ - double fRatio = static_cast< double >( maOriginalSize.Width ) / maOriginalSize.Height; - - if ( mbIsPixelFormat ) - { - switch( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) ) - { - case MAP_INCH : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.0254 * maMfSizeY.GetValue() / 100.0 + 0.5 ); break; - case MAP_CM : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.01 * maMfSizeY.GetValue() / 100.0 + 0.5 ); break; - case MAP_MM : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.001 * maMfSizeY.GetValue() / 100.0 + 0.5 ); break; - case MAP_POINT : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.0254 * maMfSizeY.GetValue() / 100.0 * 72 + 0.5 ); break; - default: - case MAP_PIXEL : maSize.Height = maMfSizeY.GetValue(); break; - } - maSize.Width = static_cast< sal_Int32 >( fRatio * maSize.Height + 0.5 ); - } - else - { - Fraction aFract( 1, 100 ); - sal_Int32 nHeight= maMfSizeY.GetValue(); - sal_Int32 nWidth = static_cast< sal_Int32 >( nHeight * fRatio ); - const Size aSource( static_cast< sal_Int32 >( nWidth ), static_cast< sal_Int32 >( nHeight ) ); - MapMode aSourceMapMode( GetMapUnit( maLbSizeX.GetSelectEntryPos() ),Point(), aFract, aFract ); - Size aDest( LogicToLogic( aSource, aSourceMapMode, MAP_100TH_MM ) ); - - maSize.Height = aDest.Height(); - if ( mbPreserveAspectRatio ) - maSize.Width = aDest.Width(); - } - updateControls(); - return 0; -} - -IMPL_LINK( ExportDialog, UpdateHdlNfResolution, void *, EMPTYARG ) -{ - sal_Int32 nResolution = maNfResolution.GetValue(); - if ( maLbResolution.GetSelectEntryPos() == 0 ) // pixels / cm - nResolution *= 100; - else if ( maLbResolution.GetSelectEntryPos() == 1 ) // pixels / inch - nResolution = static_cast< sal_Int32 >( ( ( static_cast< double >( nResolution ) + 0.5 ) / 0.0254 ) ); - maResolution.Width = nResolution; - maResolution.Height= nResolution; - - updateControls(); - return 0; -} - -IMPL_LINK( ExportDialog, SbCompressionUpdateHdl, void *, EMPTYARG ) -{ - maNfCompression.SetValue( maSbCompression.GetThumbPos() ); - updateControls(); - return 0; -} - -IMPL_LINK( ExportDialog, OK, void *, EMPTYARG ) -{ - // writing config parameter - - - mrFltCallPara.aFilterData = GetFilterData( sal_True ); - EndDialog( RET_OK ); - - return 0; -} - diff --git a/svtools/source/filter.vcl/filter/exportdialog.hrc b/svtools/source/filter.vcl/filter/exportdialog.hrc deleted file mode 100755 index e230bcd2c5c3..000000000000 --- a/svtools/source/filter.vcl/filter/exportdialog.hrc +++ /dev/null @@ -1,99 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include - -#define BTN_OK 1 -#define BTN_CANCEL 1 -#define BTN_HELP 1 - -#define FL_EXPORT_SIZE 1 -#define FL_COLOR_DEPTH 2 -#define FL_JPG_QUALITY 3 -#define FL_COMPRESSION 4 -#define FL_MODE 5 -#define FL_GIF_DRAWING_OBJECTS 6 -#define FL_PBM_OPTIONS 7 -#define FL_EPS_PREVIEW 8 -#define FL_EPS_VERSION 9 -#define FL_EPS_COLOR_FORMAT 10 -#define FL_ESTIMATED_SIZE 11 -#define FL_BUTTONS 12 - -#define FT_SIZEX 1 -#define FT_SIZEY 2 -#define FT_RESOLUTION 3 -#define FT_JPG_MIN 4 -#define FT_JPG_MAX 5 -#define FT_PNG_MIN 6 -#define FT_PNG_MAX 7 -#define FT_ESTIMATED_SIZE 8 - -#define NF_RESOLUTION 1 -#define NF_COMPRESSION 2 -#define NF_ZOOM 3 - -#define MF_SIZEX 1 -#define MF_SIZEY 2 - -#define LB_SIZEX 1 -#define LB_SIZEY 2 -#define LB_RESOLUTION 3 -#define LB_COLOR_DEPTH 4 - -#define RB_BINARY 1 -#define RB_TEXT 2 -#define RB_EPS_LEVEL1 3 -#define RB_EPS_LEVEL2 4 -#define RB_EPS_COLOR_FORMAT1 5 -#define RB_EPS_COLOR_FORMAT2 6 -#define RB_EPS_COMPRESSION_LZW 7 -#define RB_EPS_COMPRESSION_NONE 8 - -#define CB_JPG_PREVIEW 1 -#define CB_INTERLACED 2 -#define CB_RLE_ENCODING 3 -#define CB_SAVE_TRANSPARENCY 4 -#define CB_EPS_PREVIEW_TIFF 5 -#define CB_EPS_PREVIEW_EPSI 6 - -#define FB_JPG_PREVIEW 1 - -#define SB_COMPRESSION 1 -#define SB_JPG_PREVIEW_HORZ 2 -#define SB_JPG_PREVIEW_VERT 3 -#define SB_ZOOM 4 - -#define STR_1BIT_THRESHOLD 1 -#define STR_1BIT_DITHERED 2 -#define STR_4BIT_GRAYSCALE 3 -#define STR_4BIT_COLOR_PALETTE 4 -#define STR_8BIT_GRAYSCALE 5 -#define STR_8BIT_COLOR_PALETTE 6 -#define STR_24BIT_TRUE_COLOR 7 -#define STR_ESTIMATED_SIZE_PIX_1 8 -#define STR_ESTIMATED_SIZE_PIX_2 9 -#define STR_ESTIMATED_SIZE_VEC 10 diff --git a/svtools/source/filter.vcl/filter/exportdialog.hxx b/svtools/source/filter.vcl/filter/exportdialog.hxx deleted file mode 100755 index 20a9ac3ea832..000000000000 --- a/svtools/source/filter.vcl/filter/exportdialog.hxx +++ /dev/null @@ -1,216 +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 _EXPORTDIALOG_HXX_ -#define _EXPORTDIALOG_HXX_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/************************************************************************* -|* -|* Dialog zum Einstellen von Filteroptionen bei Pixelformaten -|* -\************************************************************************/ - -class FilterConfigItem; -class ExportDialog : public ModalDialog -{ -private: - - FltCallDialogParameter& - mrFltCallPara; - - ResMgr* mpMgr; - - const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > - mxMgr; - const com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& - mxSourceDocument; - - FixedLine maFlExportSize; - FixedText maFtSizeX; - MetricField maMfSizeX; - ListBox maLbSizeX; - FixedText maFtSizeY; - MetricField maMfSizeY; - ListBox maLbSizeY; - FixedText maFtResolution; - NumericField maNfResolution; - ListBox maLbResolution; - FixedLine maFlColorDepth; - ListBox maLbColorDepth; - FixedLine maFlJPGQuality; - FixedLine maFlMode; - FixedLine maFlPBMOptions; - ScrollBar maSbCompression; - NumericField maNfCompression; - FixedText maFtJPGMin; - FixedText maFtJPGMax; - FixedText maFtPNGMin; - FixedText maFtPNGMax; - CheckBox maCbJPGPreview; - CheckBox maCbInterlaced; - CheckBox maCbRLEEncoding; - FixedLine maFlGIFDrawingObjects; - CheckBox maCbSaveTransparency; - RadioButton maRbBinary; - RadioButton maRbText; - FixedLine maFlEPSPreview; - CheckBox maCbEPSPreviewTIFF; - CheckBox maCbEPSPreviewEPSI; - FixedLine maFlEPSVersion; - RadioButton maRbEPSLevel1; - RadioButton maRbEPSLevel2; - FixedLine maFlEPSColorFormat; - RadioButton maRbEPSColorFormat1; - RadioButton maRbEPSColorFormat2; - FixedLine maFlCompression; - RadioButton maRbEPSCompressionLZW; - RadioButton maRbEPSCompressionNone; - FixedLine maFlEstimatedSize; - FixedText maFtEstimatedSize; - String msEstimatedSizePix1; - String msEstimatedSizePix2; - String msEstimatedSizeVec; - FixedLine maFlButtons; - FixedBitmap maFbJPGPreview; - ScrollBar maSbZoom; - NumericField maNfZoom; - ScrollBar maSbJPGPreviewHorz; - ScrollBar maSbJPGPreviewVert; - OKButton maBtnOK; - CancelButton maBtnCancel; - HelpButton maBtnHelp; - - String ms1BitTreshold; - String ms1BitDithered; - String ms4BitGrayscale; - String ms4BitColorPalette; - String ms8BitGrayscale; - String ms8BitColorPalette; - String ms24BitColor; - - vcl::RowOrColumn maLayout; - Size maDialogSize; - - FilterConfigItem* mpOptionsItem; - FilterConfigItem* mpFilterOptionsItem; - - String maExt; - String maEstimatedSizeText; - sal_Int16 mnFormat; - sal_Int32 mnMaxFilesizeForRealtimePreview; - - Rectangle maRectFlButtons; - Rectangle maRectBtnHelp; - Rectangle maRectBtnOK; - Rectangle maRectBtnCancel; - - SvStream* mpTempStream; - Bitmap maBitmap; - - com::sun::star::awt::Size - maOriginalSize; // the original graphic size in 1/100mm - com::sun::star::awt::Size - maSize; // for vector graphics it always contains the logical size in 1/100mm - - sal_Bool mbPreview; - sal_Bool mbIsPixelFormat; - sal_Bool mbExportSelection; - sal_Bool mbPreserveAspectRatio; - - sal_Int32 mnInitialResolutionUnit; - - // for pixel graphics it always contains the pixel count - com::sun::star::awt::Size - maResolution; // it always contains the number of pixels per meter - - com::sun::star::uno::Reference< com::sun::star::drawing::XShape > - mxShape; - com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > - mxShapes; - com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > - mxPage; - - - DECL_LINK( UpdateHdl,void* p ); - DECL_LINK( UpdateHdlMtfSizeX,void* p ); - DECL_LINK( UpdateHdlMtfSizeY,void* p ); - DECL_LINK( UpdateHdlNfResolution,void* p ); - DECL_LINK( SbCompressionUpdateHdl,void* p ); - DECL_LINK( NfCompressionUpdateHdlX,void* p ); - - DECL_LINK( OK, void* p ); - - void createSizeControls( vcl::RowOrColumn& ); - void createColorDepthControls( vcl::RowOrColumn& ); - void createFilterOptions( vcl::RowOrColumn& ); - void createButtons( vcl::RowOrColumn& ); - void createScrollBar( vcl::RowOrColumn& ); - void setupLayout(); - void updatePreview(); - void updateControls(); - - void GetGraphicSource(); - sal_Bool GetGraphicStream(); - Bitmap GetGraphicBitmap( SvStream& rStream ); - ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > - GetFilterData( sal_Bool bUpdateConfig ); - - sal_uInt32 GetRawFileSize() const; - sal_Bool IsTempExportAvailable() const; - - com::sun::star::awt::Size - GetOriginalSize(); - - sal_Int32 GetDefaultUnit(); - -public: - ExportDialog( FltCallDialogParameter& rPara, - const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > rxMgr, - const com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& rxSourceDocument, - sal_Bool bExportSelection, sal_Bool bIsExportVectorFormat ); - ~ExportDialog(); -}; - - - -#endif // _EXPORTDIALOG_HXX_ - diff --git a/svtools/source/filter.vcl/filter/exportdialog.src b/svtools/source/filter.vcl/filter/exportdialog.src deleted file mode 100644 index c9e87989a314..000000000000 --- a/svtools/source/filter.vcl/filter/exportdialog.src +++ /dev/null @@ -1,529 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "exportdialog.hrc" - -String DLG_EXPORT_TITLE -{ - Text [ en-US ] = " Options" ; -}; - -ModalDialog DLG_EXPORT -{ - HelpID = "svtools:ModalDialog:DLG_EXPORT"; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 178 , 135 ) ; - Moveable = TRUE ; - Closeable = TRUE ; - - FixedLine FL_EXPORT_SIZE - { - Hide = TRUE; - Size = MAP_APPFONT ( 110 , 8 ) ; - Text [ en-US ] = "Size" ; - }; - FixedText FT_SIZEX - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - Text [ en-US ] = "Width:" ; - }; - MetricField MF_SIZEX - { - HelpID = "svtools:MetricField:DLG_EXPORT:MF_SIZEX"; - Hide = TRUE; - Border = TRUE; - Size = MAP_APPFONT ( 30, 12 ) ; - TabStop = TRUE; - Repeat = TRUE; - Spin = FALSE; - StrictFormat = TRUE; - DecimalDigits = 2; - Unit = FUNIT_NONE; - Maximum = 99999; - Last = 255; - }; - ListBox LB_SIZEX - { - HelpID = "svtools:ListBox:DLG_EXPORT:LB_SIZEX"; - Hide = TRUE; - Border = TRUE ; - Size = MAP_APPFONT ( 60, 80 ) ; - DropDown = TRUE ; - Sort = FALSE ; - StringList [ en-US ] = - { - < "inches" ; > ; - < "cm" ; Default ; > ; - < "mm" ; > ; - < "points" ; > ; - < "pixels" ; > ; - }; - }; - FixedText FT_SIZEY - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - Text [ en-US ] = "Height:" ; - }; - MetricField MF_SIZEY - { - HelpID = "svtools:MetricField:DLG_EXPORT:MF_SIZEY"; - Hide = TRUE; - Border = TRUE; - Size = MAP_APPFONT ( 30, 12 ); - TabStop = TRUE; - Repeat = TRUE; - Spin = FALSE; - StrictFormat = TRUE; - DecimalDigits = 2; - Unit = FUNIT_NONE; - Maximum = 99999; - Last = 255 ; - }; - ListBox LB_SIZEY - { - HelpID = "svtools:ListBox:DLG_EXPORT:LB_SIZEY"; - Hide = TRUE; - Border = TRUE ; - Size = MAP_APPFONT ( 60, 80 ) ; - DropDown = TRUE ; - Sort = FALSE ; - StringList [ en-US ] = - { - < "inches" ; > ; - < "cm" ; Default ; > ; - < "mm" ; > ; - < "points" ; > ; - < "pixels" ; > ; - }; - }; - FixedText FT_RESOLUTION - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - Text [ en-US ] = "Resolution:" ; - }; - NumericField NF_RESOLUTION - { - HelpID = "svtools:NumericField:DLG_EXPORT:NF_RESOLUTION"; - Hide = TRUE; - Border = TRUE ; - Size = MAP_APPFONT ( 30, 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = FALSE ; - Maximum = 99999; - Last = 255 ; - }; - ListBox LB_RESOLUTION - { - HelpID = "svtools:ListBox:DLG_EXPORT:LB_RESOLUTION"; - Hide = TRUE; - Border = TRUE ; - Size = MAP_APPFONT ( 60, 80 ) ; - DropDown = TRUE ; - Sort = FALSE ; - StringList [ en-US ] = - { - < "pixels/cm" ; > ; - < "pixels/inch" ; Default ; > ; - < "pixels/meter" ; > ; - }; - }; - FixedLine FL_COLOR_DEPTH - { - Hide = TRUE; - Size = MAP_APPFONT ( 110 , 8 ) ; - Text [ en-US ] = "Color Depth" ; - }; - ListBox LB_COLOR_DEPTH - { - HelpID = "svtools:ListBox:DLG_EXPORT:LB_COLOR_DEPTH"; - Hide = TRUE; - Border = TRUE ; - Size = MAP_APPFONT ( 60, 80 ) ; - DropDown = TRUE ; - Sort = FALSE ; - }; - String STR_1BIT_THRESHOLD - { - Text [ en-US ] = "1 bit threshold"; - }; - String STR_1BIT_DITHERED - { - Text [ en-US ] = "1 bit dithered"; - }; - String STR_4BIT_GRAYSCALE - { - Text [ en-US ] = "4 bit grayscale"; - }; - String STR_4BIT_COLOR_PALETTE - { - Text [ en-US ] = "4 bit color"; - }; - String STR_8BIT_GRAYSCALE - { - Text [ en-US ] = "8 bit grayscale"; - }; - String STR_8BIT_COLOR_PALETTE - { - Text [ en-US ] = "8 bit color"; - }; - String STR_24BIT_TRUE_COLOR - { - Text [ en-US ] = "24 bit true color"; - }; - FixedLine FL_JPG_QUALITY - { - Hide = TRUE; - Size = MAP_APPFONT ( 110 , 8 ) ; - Text [ en-US ] = "Quality" ; - }; - FixedLine FL_COMPRESSION - { - Hide = TRUE; - Size = MAP_APPFONT ( 110 , 8 ) ; - Text [ en-US ] = "Compression" ; - }; - FixedLine FL_MODE - { - Hide = TRUE; - Size = MAP_APPFONT ( 110 , 8 ) ; - Text [ en-US ] = "Mode" ; - }; - FixedLine FL_PBM_OPTIONS - { - Hide = TRUE; - Size = MAP_APPFONT ( 110 , 8 ) ; - Text [ en-US ] = "File Format" ; - }; - ScrollBar SB_COMPRESSION - { - Hide = TRUE; - Size = MAP_APPFONT ( 48, 10 ) ; - VScroll = FALSE ; - HScroll = TRUE; - Drag = TRUE ; - }; - NumericField NF_COMPRESSION - { - HelpID = "svtools:NumericField:DLG_EXPORT:NF_COMPRESSION"; - Hide = TRUE; - Border = TRUE ; - Size = MAP_APPFONT ( 30, 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = FALSE ; - Maximum = 99999; - Last = 255 ; - }; - FixedText FT_JPG_MIN - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - Text [ en-US ] = "1 is minimum Quality and smallest file size." ; - }; - FixedText FT_JPG_MAX - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - Text [ en-US ] = "100 is maximum Quality and biggest file size." ; - }; - FixedText FT_PNG_MIN - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - Text [ en-US ] = "0 is biggest file size and fastest loading." ; - }; - FixedText FT_PNG_MAX - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - Text [ en-US ] = "9 is smallest file size and slowest loading." ; - }; - CheckBox CB_JPG_PREVIEW - { - HelpID = "svtools:CheckBox:DLG_EXPORT:CB_JPG_PREVIEW"; - Hide = TRUE; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "Preview" ; - }; - CheckBox CB_INTERLACED - { - HelpID = "svtools:CheckBox:DLG_EXPORT:CB_INTERLACED"; - Hide = TRUE; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "Interlaced" ; - }; - CheckBox CB_RLE_ENCODING - { - HelpID = "svtools:CheckBox:DLG_EXPORT:CB_RLE_ENCODING"; - Hide = TRUE; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "RLE encoding" ; - }; - FixedLine FL_GIF_DRAWING_OBJECTS - { - Hide = TRUE; - Size = MAP_APPFONT ( 110 , 8 ) ; - Text [ en-US ] = "Drawing Objects" ; - }; - CheckBox CB_SAVE_TRANSPARENCY - { - HelpID = "svtools:CheckBox:DLG_EXPORT:CB_SAVE_TRANSPARENCY"; - Hide = TRUE; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "Save transparency" ; - }; - RadioButton RB_BINARY - { - HelpID = "svtools:RadioButton:DLG_EXPORT:RB_BINARY"; - Hide = TRUE; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "Binary" ; - }; - RadioButton RB_TEXT - { - HelpID = "svtools:RadioButton:DLG_EXPORT:RB_TEXT"; - Hide = TRUE; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "Text" ; - }; - FixedLine FL_EPS_PREVIEW - { - Hide = TRUE; - Size = MAP_APPFONT ( 110 , 8 ) ; - Text [ en-US ] = "Preview" ; - }; - CheckBox CB_EPS_PREVIEW_TIFF - { - HelpID = "svtools:CheckBox:DLG_EXPORT:CB_EPS_PREVIEW_TIFF"; - Hide = TRUE; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "Image Preview (TIFF)" ; - }; - CheckBox CB_EPS_PREVIEW_EPSI - { - HelpID = "svtools:CheckBox:DLG_EXPORT:CB_EPS_PREVIEW_EPSI"; - Hide = TRUE; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "Interchange (EPSI)" ; - }; - FixedLine FL_EPS_VERSION - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - Text [ en-US ] = "Version" ; - }; - RadioButton RB_EPS_LEVEL1 - { - HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_LEVEL1"; - Hide = TRUE; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "Level 1" ; - }; - RadioButton RB_EPS_LEVEL2 - { - HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_LEVEL2"; - Hide = TRUE; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "Level 2" ; - }; - FixedLine FL_EPS_COLOR_FORMAT - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - Text [ en-US ] = "Color format" ; - }; - RadioButton RB_EPS_COLOR_FORMAT1 - { - HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_COLOR_FORMAT1"; - Hide = TRUE; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "Color" ; - }; - RadioButton RB_EPS_COLOR_FORMAT2 - { - HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_COLOR_FORMAT2"; - Hide = TRUE; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "Grayscale" ; - }; - RadioButton RB_EPS_COMPRESSION_LZW - { - HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_COMPRESSION_LZW"; - Hide = TRUE; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "LZW encoding" ; - }; - RadioButton RB_EPS_COMPRESSION_NONE - { - HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_COMPRESSION_NONE"; - Hide = TRUE; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "None" ; - }; - FixedLine FL_ESTIMATED_SIZE - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - }; - FixedText FT_ESTIMATED_SIZE - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - }; - String STR_ESTIMATED_SIZE_PIX_1 - { - Text [ en-US ] = "The picture needs about %1 KB of memory."; - }; - String STR_ESTIMATED_SIZE_PIX_2 - { - Text [ en-US ] = "The picture needs about %1 KB of memory,\n the file size is %2 KB."; - }; - String STR_ESTIMATED_SIZE_VEC - { - Text [ en-US ] = "The file size is %1 KB."; - }; - FixedLine FL_BUTTONS - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - }; - FixedBitmap FB_JPG_PREVIEW - { - Hide = TRUE; - OutputSize = TRUE ; - Scale = TRUE; - Border = TRUE; - }; - ScrollBar SB_ZOOM - { - Hide = TRUE; - Size = MAP_APPFONT ( 48, 10 ); - VScroll = FALSE; - HScroll = TRUE; - Drag = TRUE; - MinPos = 5; - MaxPos = 100; - ThumbPos = 50; - }; - NumericField NF_ZOOM - { - HelpID = "svtools:NumericField:DLG_EXPORT:NF_ZOOM"; - Hide = TRUE; - Border = TRUE ; - Size = MAP_APPFONT ( 30, 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = FALSE ; - Maximum = 3000; - Last = 255 ; - }; - ScrollBar SB_JPG_PREVIEW_HORZ - { - Hide = TRUE; - Size = MAP_APPFONT ( 48, 10 ); - VScroll = FALSE; - HScroll = TRUE; - Drag = TRUE; - MinPos = 0; - MaxPos = 100; - ThumbPos = 50; - }; - ScrollBar SB_JPG_PREVIEW_VERT - { - Hide = TRUE; - Size = MAP_APPFONT ( 48, 10 ); - VScroll = TRUE; - HScroll = FALSE; - Drag = TRUE; - MinPos = 0; - MaxPos = 100; - ThumbPos = 50; - }; - OKButton BTN_OK - { - Hide = TRUE; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL - { - Hide = TRUE; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_HELP - { - Hide = TRUE; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svtools/source/filter.vcl/filter/filter.cxx b/svtools/source/filter.vcl/filter/filter.cxx deleted file mode 100644 index 7e0729082841..000000000000 --- a/svtools/source/filter.vcl/filter/filter.cxx +++ /dev/null @@ -1,2199 +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_svtools.hxx" - -#if defined UNX && defined ALPHA -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "FilterConfigCache.hxx" -#include -#include -#include -#include "gifread.hxx" -#include "jpeg.hxx" -#include "xbmread.hxx" -#include "xpmread.hxx" -#include -#include -#include "sgffilt.hxx" -#include "osl/module.hxx" -#include -#include -#include -#include -#include -#ifndef _COM_SUN_STAR_UNO_XTYPEPROVIDER_HPP_ -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "SvFilterOptionsDialog.hxx" - -#define PMGCHUNG_msOG 0x6d734f47 // Microsoft Office Animated GIF - -#if (defined OS2 && !defined ICC) - -#define IMPORT_FUNCTION_NAME "_GraphicImport" -#define EXPORT_FUNCTION_NAME "_GraphicExport" -#define IMPDLG_FUNCTION_NAME "_DoImportDialog" -#define EXPDLG_FUNCTION_NAME "_DoExportDialog" - -#else - -#define IMPORT_FUNCTION_NAME "GraphicImport" -#define EXPORT_FUNCTION_NAME "GraphicExport" -#define IMPDLG_FUNCTION_NAME "DoImportDialog" -#define EXPDLG_FUNCTION_NAME "DoExportDialog" - -#endif - - -// ----------- -// - statics - -// ----------- - -using namespace ::rtl; -using namespace ::com::sun::star; - -static List* pFilterHdlList = NULL; - -static ::osl::Mutex& getListMutex() -{ - static ::osl::Mutex s_aListProtection; - return s_aListProtection; -} - -static GraphicFilter* pGraphicFilter=0; - -// ------------------------- -// - ImpFilterOutputStream - -// ------------------------- - -class ImpFilterOutputStream : public ::cppu::WeakImplHelper1< ::com::sun::star::io::XOutputStream > -{ -protected: - - SvStream& mrStm; - - virtual void SAL_CALL writeBytes( const ::com::sun::star::uno::Sequence< sal_Int8 >& rData ) throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) { mrStm.Write( rData.getConstArray(), rData.getLength() ); } - virtual void SAL_CALL flush() throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) { mrStm.Flush(); } - virtual void SAL_CALL closeOutput() throw() {} - -public: - - ImpFilterOutputStream( SvStream& rStm ) : mrStm( rStm ) {} - ~ImpFilterOutputStream() {} -}; - -BOOL ImplDirEntryHelper::Exists( const INetURLObject& rObj ) -{ - BOOL bExists = FALSE; - - try - { - ::rtl::OUString aTitle; - ::ucbhelper::Content aCnt( rObj.GetMainURL( INetURLObject::NO_DECODE ), - ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >() ); - - bExists = aCnt.isDocument(); - } - catch( ::com::sun::star::ucb::CommandAbortedException& ) - { - DBG_ERRORFILE( "CommandAbortedException" ); - } - catch( ::com::sun::star::ucb::ContentCreationException& ) - { - DBG_ERRORFILE( "ContentCreationException" ); - } - catch( ... ) - { -// DBG_ERRORFILE( "Any other exception" ); - } - return bExists; -} - -// ----------------------------------------------------------------------------- - -void ImplDirEntryHelper::Kill( const String& rMainUrl ) -{ - try - { - ::ucbhelper::Content aCnt( rMainUrl, - ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >() ); - - aCnt.executeCommand( ::rtl::OUString::createFromAscii( "delete" ), - ::com::sun::star::uno::makeAny( sal_Bool( sal_True ) ) ); - } - catch( ::com::sun::star::ucb::CommandAbortedException& ) - { - DBG_ERRORFILE( "CommandAbortedException" ); - } - catch( ... ) - { - DBG_ERRORFILE( "Any other exception" ); - } -} - -// -------------------- -// - Helper functions - -// -------------------- - -//-------------------------------------------------------------------------- - -BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG nSize ) -{ - while ( nComp-- >= nSize ) - { - ULONG i; - for ( i = 0; i < nSize; i++ ) - { - if ( ( pSource[i]&~0x20 ) != ( pDest[i]&~0x20 ) ) - break; - } - if ( i == nSize ) - return pSource; - pSource++; - } - return NULL; -} - -//-------------------------------------------------------------------------- - -inline String ImpGetExtension( const String &rPath ) -{ - String aExt; - INetURLObject aURL( rPath ); - aExt = aURL.GetFileExtension().toAsciiUpperCase(); - return aExt; -} - -/************************************************************************* -|* -|* ImpPeekGraphicFormat() -|* -|* Beschreibung: -|* Diese Funktion kann zweierlei: -|* 1.) Datei anlesen, Dateiformat ermitteln -|* Eingabe-prarameter: -|* rPath - Dateipfad -|* rFormatExtension - Inhalt egal -|* bTest - setze FALSE -|* Ausgabe-parameter: -|* Funkionswert - TRUE wenn Erfolg -|* rFormatExtension - Bei Erfolg: uebliche Dateiendung -|* des Formats (Grossbuchstaben) -|* 2.) Datei anlesen, Dateiformat ueberpruefen -|* Eingabe-prarameter: -|* rPath - Dateipfad -|* rFormatExtension - uebliche Dateiendung des Formats -|* (Grossbuchstaben) -|* bTest - setze TRUE -|* Ausgabe-parameter: -|* Funkionswert - FALSE, wenn die Datei bestimmt nicht -|* vom uebgebenen Format ist. -|* TRUE, wenn die Datei WAHRSCHEINLICH von -|* dem Format ist, ODER WENN DAS FORMAT -|* DIESER FUNKTION NICHT BEKANNT IST! -|* -|* Ersterstellung OH 26.05.95 -|* Letzte Aenderung OH 07.08.95 -|* -*************************************************************************/ - -static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, BOOL bTest ) -{ - USHORT i; - BYTE sFirstBytes[ 256 ]; - ULONG nFirstLong,nSecondLong; - ULONG nStreamPos = rStream.Tell(); - - rStream.Seek( STREAM_SEEK_TO_END ); - ULONG nStreamLen = rStream.Tell() - nStreamPos; - rStream.Seek( nStreamPos ); - - if ( !nStreamLen ) - { - SvLockBytes* pLockBytes = rStream.GetLockBytes(); - if ( pLockBytes ) - pLockBytes->SetSynchronMode( TRUE ); - - rStream.Seek( STREAM_SEEK_TO_END ); - nStreamLen = rStream.Tell() - nStreamPos; - rStream.Seek( nStreamPos ); - } - // Die ersten 256 Bytes in einen Buffer laden: - if( nStreamLen >= 256 ) - rStream.Read( sFirstBytes, 256 ); - else - { - rStream.Read( sFirstBytes, nStreamLen ); - - for( i = (USHORT) nStreamLen; i < 256; i++ ) - sFirstBytes[ i ]=0; - } - - if( rStream.GetError() ) - return FALSE; - - // Die ersten 8 Bytes in nFirstLong, nSecondLong unterbringen, - // Big-Endian: - for( i = 0, nFirstLong = 0L, nSecondLong = 0L; i < 4; i++ ) - { - nFirstLong=(nFirstLong<<8)|(ULONG)sFirstBytes[i]; - nSecondLong=(nSecondLong<<8)|(ULONG)sFirstBytes[i+4]; - } - - // Folgende Variable ist nur bei bTest==TRUE interessant. Sie - // bleibt FALSE, wenn das Format (rFormatExtension) hier noch nicht - // einprogrammiert wurde. - BOOL bSomethingTested = FALSE; - - // Nun werden die verschieden Formate ueberprueft. Dabei ist die - // Reihenfolge nicht egal. Z.b. koennte eine MET-Datei auch durch - // den BMP-Test gehen, umgekehrt kann eine BMP-Datei kaum durch den - // MET-Test gehen. Also sollte MET vor BMP getestet werden. - // Theoretisch waere aber vielleicht auch eine BMP-Datei denkbar, - // die durch den MET-Test geht. - // Diese Probleme gibt es natuerlich nicht nur bei MET und BMP. - // Deshalb wird im Falle der Uberpruefung eines Formats (bTest==TRUE) - // nur genau dieses eine Format getestet. Alles andere koennte fatale - // Folgen haben, z.B. wenn der Benutzer sagt, es sei BMP-Datei (und es - // ist BMP-Datei), und hier wuerde die Datei durch den MET-Test gehen... - - //--------------------------- MET ------------------------------------ - if( !bTest || ( rFormatExtension.CompareToAscii( "MET", 3 ) == COMPARE_EQUAL ) ) - { - bSomethingTested=TRUE; - if( sFirstBytes[2] == 0xd3 ) - { - rStream.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); - rStream.Seek( nStreamPos ); - USHORT nFieldSize; - BYTE nMagic; - BOOL bOK=TRUE; - rStream >> nFieldSize >> nMagic; - for (i=0; i<3; i++) { - if (nFieldSize<6) { bOK=FALSE; break; } - if (nStreamLen < rStream.Tell() + nFieldSize ) { bOK=FALSE; break; } - rStream.SeekRel(nFieldSize-3); - rStream >> nFieldSize >> nMagic; - if (nMagic!=0xd3) { bOK=FALSE; break; } - } - rStream.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); - if (bOK && !rStream.GetError()) { - rFormatExtension= UniString::CreateFromAscii( "MET", 3 ); - return TRUE; - } - } - } - - //--------------------------- BMP ------------------------------------ - if( !bTest || ( rFormatExtension.CompareToAscii( "BMP", 3 ) == COMPARE_EQUAL ) ) - { - BYTE nOffs; - - bSomethingTested=TRUE; - - // OS/2-Bitmaparray ('BA') koennen wir evtl. auch lesen, - // dementspr. muessen wir den Offset anpassen, - // um auf die erste Bitmap im Array zu stossen - if ( sFirstBytes[0] == 0x42 && sFirstBytes[1] == 0x41 ) - nOffs = 14; - else - nOffs = 0; - - // Jetzt testen wir zunaechst auf 'BM' - if ( sFirstBytes[0+nOffs]==0x42 && sFirstBytes[1+nOffs]==0x4d ) - { - // unter OS/2 koennen die Reserved-Flags != 0 sein - // (was sie eigentlich nicht duerften); - // in diesem Fall testen wir die Groesse des BmpInfoHeaders - if ( ( sFirstBytes[6+nOffs]==0x00 && - sFirstBytes[7+nOffs]==0x00 && - sFirstBytes[8+nOffs]==0x00 && - sFirstBytes[9+nOffs]==0x00 ) || - sFirstBytes[14+nOffs] == 0x28 || - sFirstBytes[14+nOffs] == 0x0c ) - { - rFormatExtension = UniString::CreateFromAscii( "BMP", 3 ); - return TRUE; - } - } - } - - //--------------------------- WMF/EMF ------------------------------------ - - if( !bTest || - ( rFormatExtension.CompareToAscii( "WMF", 3 ) == COMPARE_EQUAL ) || - ( rFormatExtension.CompareToAscii( "EMF", 3 ) == COMPARE_EQUAL ) ) - { - bSomethingTested = TRUE; - - if ( nFirstLong==0xd7cdc69a || nFirstLong==0x01000900 ) - { - rFormatExtension = UniString::CreateFromAscii( "WMF", 3 ); - return TRUE; - } - else if( nFirstLong == 0x01000000 && sFirstBytes[ 40 ] == 0x20 && sFirstBytes[ 41 ] == 0x45 && - sFirstBytes[ 42 ] == 0x4d && sFirstBytes[ 43 ] == 0x46 ) - { - rFormatExtension = UniString::CreateFromAscii( "EMF", 3 ); - return TRUE; - } - } - - //--------------------------- PCX ------------------------------------ - if( !bTest || ( rFormatExtension.CompareToAscii( "PCX", 3 ) == COMPARE_EQUAL ) ) - { - bSomethingTested=TRUE; - if (sFirstBytes[0]==0x0a) - { - BYTE nVersion=sFirstBytes[1]; - BYTE nEncoding=sFirstBytes[2]; - if( ( nVersion==0 || nVersion==2 || nVersion==3 || nVersion==5 ) && nEncoding<=1 ) - { - rFormatExtension = UniString::CreateFromAscii( "PCX", 3 ); - return TRUE; - } - } - } - - //--------------------------- TIF ------------------------------------ - if( !bTest || ( rFormatExtension.CompareToAscii( "TIF", 3 ) == COMPARE_EQUAL ) ) - { - bSomethingTested=TRUE; - if ( nFirstLong==0x49492a00 || nFirstLong==0x4d4d002a ) - { - rFormatExtension=UniString::CreateFromAscii( "TIF", 3 ); - return TRUE; - } - } - - //--------------------------- GIF ------------------------------------ - if( !bTest || ( rFormatExtension.CompareToAscii( "GIF", 3 ) == COMPARE_EQUAL ) ) - { - bSomethingTested=TRUE; - if ( nFirstLong==0x47494638 && (sFirstBytes[4]==0x37 || sFirstBytes[4]==0x39) && sFirstBytes[5]==0x61 ) - { - rFormatExtension = UniString::CreateFromAscii( "GIF", 3 ); - return TRUE; - } - } - - //--------------------------- PNG ------------------------------------ - if( !bTest || ( rFormatExtension.CompareToAscii( "PNG", 3 ) == COMPARE_EQUAL ) ) - { - bSomethingTested=TRUE; - if (nFirstLong==0x89504e47 && nSecondLong==0x0d0a1a0a) - { - rFormatExtension = UniString::CreateFromAscii( "PNG", 3 ); - return TRUE; - } - } - - //--------------------------- JPG ------------------------------------ - if( !bTest || ( rFormatExtension.CompareToAscii( "JPG", 3 ) == COMPARE_EQUAL ) ) - { - bSomethingTested=TRUE; - if ( ( nFirstLong==0xffd8ffe0 && sFirstBytes[6]==0x4a && sFirstBytes[7]==0x46 && sFirstBytes[8]==0x49 && sFirstBytes[9]==0x46 ) || - ( nFirstLong==0xffd8fffe ) || ( 0xffd8ff00 == ( nFirstLong & 0xffffff00 ) ) ) - { - rFormatExtension = UniString::CreateFromAscii( "JPG", 3 ); - return TRUE; - } - } - - //--------------------------- SVM ------------------------------------ - if( !bTest || ( rFormatExtension.CompareToAscii( "SVM", 3 ) == COMPARE_EQUAL ) ) - { - bSomethingTested=TRUE; - if( nFirstLong==0x53564744 && sFirstBytes[4]==0x49 ) - { - rFormatExtension = UniString::CreateFromAscii( "SVM", 3 ); - return TRUE; - } - else if( sFirstBytes[0]==0x56 && sFirstBytes[1]==0x43 && sFirstBytes[2]==0x4C && - sFirstBytes[3]==0x4D && sFirstBytes[4]==0x54 && sFirstBytes[5]==0x46 ) - { - rFormatExtension = UniString::CreateFromAscii( "SVM", 3 ); - return TRUE; - } - } - - //--------------------------- PCD ------------------------------------ - if( !bTest || ( rFormatExtension.CompareToAscii( "PCD", 3 ) == COMPARE_EQUAL ) ) - { - bSomethingTested = TRUE; - if( nStreamLen >= 2055 ) - { - char sBuf[8]; - rStream.Seek( nStreamPos + 2048 ); - rStream.Read( sBuf, 7 ); - - if( strncmp( sBuf, "PCD_IPI", 7 ) == 0 ) - { - rFormatExtension = UniString::CreateFromAscii( "PCD", 3 ); - return TRUE; - } - } - } - - //--------------------------- PSD ------------------------------------ - if( !bTest || ( rFormatExtension.CompareToAscii( "PSD", 3 ) == COMPARE_EQUAL ) ) - { - bSomethingTested = TRUE; - if ( ( nFirstLong == 0x38425053 ) && ( (nSecondLong >> 16 ) == 1 ) ) - { - rFormatExtension = UniString::CreateFromAscii( "PSD", 3 ); - return TRUE; - } - } - - //--------------------------- EPS ------------------------------------ - if( !bTest || ( rFormatExtension.CompareToAscii( "EPS", 3 ) == COMPARE_EQUAL ) ) - { - bSomethingTested = TRUE; - if ( ( nFirstLong == 0xC5D0D3C6 ) || ( ImplSearchEntry( sFirstBytes, (BYTE*)"%!PS-Adobe", 10, 10 ) && - ImplSearchEntry( &sFirstBytes[15], (BYTE*)"EPS", 3, 3 ) ) ) - { - rFormatExtension = UniString::CreateFromAscii( "EPS", 3 ); - return TRUE; - } - } - - //--------------------------- DXF ------------------------------------ - if( !bTest || ( rFormatExtension.CompareToAscii( "DXF", 3 ) == COMPARE_EQUAL ) ) - { - bSomethingTested=TRUE; - - i=0; - while (i<256 && sFirstBytes[i]<=32) - i++; - - if (i<256) - { - if( sFirstBytes[i]=='0' ) - i++; - else - i=256; - } - while( i<256 && sFirstBytes[i]<=32 ) - i++; - - if (i+7<256) - { - if (strncmp((char*)(sFirstBytes+i),"SECTION",7)==0) - { - rFormatExtension = UniString::CreateFromAscii( "DXF", 3 ); - return TRUE; - } - } - - if( strncmp( (char*) sFirstBytes, "AutoCAD Binary DXF", 18 ) == 0 ) - { - rFormatExtension = UniString::CreateFromAscii( "DXF", 3 ); - return TRUE; - } - } - - //--------------------------- PCT ------------------------------------ - if( !bTest || ( rFormatExtension.CompareToAscii( "PCT", 3 ) == COMPARE_EQUAL ) ) - { - bSomethingTested = TRUE; - BYTE sBuf[3]; - // store number format - sal_uInt16 oldNumberFormat = rStream.GetNumberFormatInt(); - sal_uInt32 nOffset; // in ms documents the pict format is used without the first 512 bytes - for ( nOffset = 0; ( nOffset <= 512 ) && ( ( nStreamPos + nOffset + 14 ) <= nStreamLen ); nOffset += 512 ) - { - short y1,x1,y2,x2; - bool bdBoxOk = true; - - rStream.Seek( nStreamPos + nOffset); - // size of the pict in version 1 pict ( 2bytes) : ignored - rStream.SeekRel(2); - // bounding box (bytes 2 -> 9) - rStream.SetNumberFormatInt(NUMBERFORMAT_INT_BIGENDIAN); - rStream >> y1 >> x1 >> y2 >> x2; - rStream.SetNumberFormatInt(oldNumberFormat); // reset format - - if (x1 > x2 || y1 > y2 || // bad bdbox - (x1 == x2 && y1 == y2) || // 1 pixel picture - x2-x1 > 2048 || y2-y1 > 2048 ) // picture anormaly big - bdBoxOk = false; - - // read version op - rStream.Read( sBuf,3 ); - // see http://developer.apple.com/legacy/mac/library/documentation/mac/pdf/Imaging_With_QuickDraw/Appendix_A.pdf - // normal version 2 - page A23 and A24 - if ( sBuf[ 0 ] == 0x00 && sBuf[ 1 ] == 0x11 && sBuf[ 2 ] == 0x02) - { - rFormatExtension = UniString::CreateFromAscii( "PCT", 3 ); - return TRUE; - } - // normal version 1 - page A25 - else if (sBuf[ 0 ] == 0x11 && sBuf[ 1 ] == 0x01 && bdBoxOk) { - rFormatExtension = UniString::CreateFromAscii( "PCT", 3 ); - return TRUE; - } - // previous code kept in order to do not break any compatibility - // probably eroneous - else if ( sBuf[ 0 ] == 0x00 && sBuf[ 1 ] == 0x11 && sBuf[ 2 ] == 0x01 && bdBoxOk) - { - rFormatExtension = UniString::CreateFromAscii( "PCT", 3 ); - return TRUE; - } - } - } - - //------------------------- PBM + PGM + PPM --------------------------- - if( !bTest || - ( rFormatExtension.CompareToAscii( "PBM", 3 ) == COMPARE_EQUAL ) || - ( rFormatExtension.CompareToAscii( "PGM", 3 ) == COMPARE_EQUAL ) || - ( rFormatExtension.CompareToAscii( "PPM", 3 ) == COMPARE_EQUAL ) ) - { - bSomethingTested=TRUE; - if ( sFirstBytes[ 0 ] == 'P' ) - { - switch( sFirstBytes[ 1 ] ) - { - case '1' : - case '4' : - rFormatExtension = UniString::CreateFromAscii( "PBM", 3 ); - return TRUE; - - case '2' : - case '5' : - rFormatExtension = UniString::CreateFromAscii( "PGM", 3 ); - return TRUE; - - case '3' : - case '6' : - rFormatExtension = UniString::CreateFromAscii( "PPM", 3 ); - return TRUE; - } - } - } - - //--------------------------- RAS( SUN RasterFile )------------------ - if( !bTest || ( rFormatExtension.CompareToAscii( "RAS", 3 ) == COMPARE_EQUAL ) ) - { - bSomethingTested=TRUE; - if( nFirstLong == 0x59a66a95 ) - { - rFormatExtension = UniString::CreateFromAscii( "RAS", 3 ); - return TRUE; - } - } - - //--------------------------- XPM ------------------------------------ - if( !bTest ) - { - bSomethingTested = TRUE; - if( ImplSearchEntry( sFirstBytes, (BYTE*)"/* XPM */", 256, 9 ) ) - { - rFormatExtension = UniString::CreateFromAscii( "XPM", 3 ); - return TRUE; - } - } - else if( rFormatExtension.CompareToAscii( "XPM", 3 ) == COMPARE_EQUAL ) - { - bSomethingTested = TRUE; - return TRUE; - } - - //--------------------------- XBM ------------------------------------ - if( !bTest ) - { - ULONG nSize = ( nStreamLen > 2048 ) ? 2048 : nStreamLen; - BYTE* pBuf = new BYTE [ nSize ]; - - rStream.Seek( nStreamPos ); - rStream.Read( pBuf, nSize ); - BYTE* pPtr = ImplSearchEntry( pBuf, (BYTE*)"#define", nSize, 7 ); - - if( pPtr ) - { - if( ImplSearchEntry( pPtr, (BYTE*)"_width", pBuf + nSize - pPtr, 6 ) ) - { - rFormatExtension = UniString::CreateFromAscii( "XBM", 3 ); - delete[] pBuf; - return TRUE; - } - } - delete[] pBuf; - } - else if( rFormatExtension.CompareToAscii( "XBM", 3 ) == COMPARE_EQUAL ) - { - bSomethingTested = TRUE; - return TRUE; - } - - //--------------------------- TGA ------------------------------------ - if( !bTest || ( rFormatExtension.CompareToAscii( "TGA", 3 ) == COMPARE_EQUAL ) ) - { - bSomethingTested = TRUE; - if( rFormatExtension.CompareToAscii( "TGA", 3 ) == COMPARE_EQUAL ) - return TRUE; - } - - //--------------------------- SGV ------------------------------------ - if( !bTest || ( rFormatExtension.CompareToAscii( "SGV", 3 ) == COMPARE_EQUAL ) ) - { - bSomethingTested = TRUE; - if( rFormatExtension.CompareToAscii( "SGV", 3 ) == COMPARE_EQUAL ) - return TRUE; - } - - //--------------------------- SGF ------------------------------------ - if( !bTest || ( rFormatExtension.CompareToAscii( "SGF", 3 ) == COMPARE_EQUAL ) ) - { - bSomethingTested=TRUE; - if( sFirstBytes[ 0 ] == 'J' && sFirstBytes[ 1 ] == 'J' ) - { - rFormatExtension = UniString::CreateFromAscii( "SGF", 3 ); - return TRUE; - } - } - - return bTest && !bSomethingTested; -} - -//-------------------------------------------------------------------------- - -sal_uInt16 GraphicFilter::ImpTestOrFindFormat( const String& rPath, SvStream& rStream, sal_uInt16& rFormat ) -{ - sal_uInt16 n = pConfig->GetImportFormatCount(); - - // ggf. Filter bzw. Format durch anlesen ermitteln, - // oder durch anlesen zusichern, dass das Format stimmt: - if( rFormat == GRFILTER_FORMAT_DONTKNOW ) - { - String aFormatExt; - if( ImpPeekGraphicFormat( rStream, aFormatExt, FALSE ) ) - { - for( sal_uInt16 i = 0; i < n; i++ ) - { - if( pConfig->GetImportFormatExtension( i ).EqualsIgnoreCaseAscii( aFormatExt ) ) - { - rFormat = i; - return GRFILTER_OK; - } - } - } - // ggf. Filter anhand der Datei-Endung raussuchen: - if( rPath.Len() ) - { - String aExt( ImpGetExtension( rPath ) ); - for( sal_uInt16 i = 0; i < n; i++ ) - { - if( pConfig->GetImportFormatExtension( i ).EqualsIgnoreCaseAscii( aExt ) ) - { - rFormat = i; - return GRFILTER_OK; - } - } - } - return GRFILTER_FORMATERROR; - } - else - { - String aTmpStr( pConfig->GetImportFormatExtension( rFormat ) ); - if( !ImpPeekGraphicFormat( rStream, aTmpStr, TRUE ) ) - return GRFILTER_FORMATERROR; - if ( pConfig->GetImportFormatExtension( rFormat ).EqualsIgnoreCaseAscii( "pcd" ) ) - { - sal_Int32 nBase = 2; // default Base0 - if ( pConfig->GetImportFilterType( rFormat ).EqualsIgnoreCaseAscii( "pcd_Photo_CD_Base4" ) ) - nBase = 1; - else if ( pConfig->GetImportFilterType( rFormat ).EqualsIgnoreCaseAscii( "pcd_Photo_CD_Base16" ) ) - nBase = 0; - String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Import/PCD" ) ); - FilterConfigItem aFilterConfigItem( aFilterConfigPath ); - aFilterConfigItem.WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Resolution" ) ), nBase ); - } - } - - return GRFILTER_OK; -} - -//-------------------------------------------------------------------------- - -static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& rConfigItem ) -{ - Graphic aGraphic; - ByteString aResMgrName( "svt", 3 ); - ResMgr* pResMgr; - - pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); - - sal_Int32 nLogicalWidth = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "LogicalWidth" ) ), 0 ); - sal_Int32 nLogicalHeight = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "LogicalHeight" ) ), 0 ); - - if ( rGraphic.GetType() != GRAPHIC_NONE ) - { - sal_Int32 nMode = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ExportMode" ) ), -1 ); - - if ( nMode == -1 ) // the property is not there, this is possible, if the graphic filter - { // is called via UnoGraphicExporter and not from a graphic export Dialog - nMode = 0; // then we are defaulting this mode to 0 - if ( nLogicalWidth || nLogicalHeight ) - nMode = 2; - } - - - Size aOriginalSize; - Size aPrefSize( rGraphic.GetPrefSize() ); - MapMode aPrefMapMode( rGraphic.GetPrefMapMode() ); - if ( aPrefMapMode == MAP_PIXEL ) - aOriginalSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MAP_100TH_MM ); - else - aOriginalSize = Application::GetDefaultDevice()->LogicToLogic( aPrefSize, aPrefMapMode, MAP_100TH_MM ); - if ( !nLogicalWidth ) - nLogicalWidth = aOriginalSize.Width(); - if ( !nLogicalHeight ) - nLogicalHeight = aOriginalSize.Height(); - if( rGraphic.GetType() == GRAPHIC_BITMAP ) - { - - // Aufloesung wird eingestellt - if( nMode == 1 ) - { - Bitmap aBitmap( rGraphic.GetBitmap() ); - MapMode aMap( MAP_100TH_INCH ); - - sal_Int32 nDPI = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Resolution" ) ), 75 ); - Fraction aFrac( 1, Min( Max( nDPI, sal_Int32( 75 ) ), sal_Int32( 600 ) ) ); - - aMap.SetScaleX( aFrac ); - aMap.SetScaleY( aFrac ); - - Size aOldSize = aBitmap.GetSizePixel(); - aBitmap.SetPrefMapMode( aMap ); - aBitmap.SetPrefSize( Size( aOldSize.Width() * 100, - aOldSize.Height() * 100 ) ); - - aGraphic = Graphic( aBitmap ); - } - // Groesse wird eingestellt - else if( nMode == 2 ) - { - BitmapEx aBitmapEx( rGraphic.GetBitmapEx() ); - aBitmapEx.SetPrefMapMode( MapMode( MAP_100TH_MM ) ); - aBitmapEx.SetPrefSize( Size( nLogicalWidth, nLogicalHeight ) ); - aGraphic = Graphic( aBitmapEx ); - } - else - aGraphic = rGraphic; - - sal_Int32 nColors = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Color" ) ), 0 ); // #92767# - if ( nColors ) // graphic conversion necessary ? - { - BitmapEx aBmpEx( aGraphic.GetBitmapEx() ); - aBmpEx.Convert( (BmpConversion)nColors ); // the entries in the xml section have the same meaning as - aGraphic = aBmpEx; // they have in the BmpConversion enum, so it should be - } // allowed to cast them - } - else - { - if( ( nMode == 1 ) || ( nMode == 2 ) ) - { - GDIMetaFile aMtf( rGraphic.GetGDIMetaFile() ); - ::com::sun::star::awt::Size aDefaultSize( 10000, 10000 ); - Size aNewSize( OutputDevice::LogicToLogic( Size( nLogicalWidth, nLogicalHeight ), MAP_100TH_MM, aMtf.GetPrefMapMode() ) ); - - if( aNewSize.Width() && aNewSize.Height() ) - { - const Size aPreferredSize( aMtf.GetPrefSize() ); - aMtf.Scale( Fraction( aNewSize.Width(), aPreferredSize.Width() ), - Fraction( aNewSize.Height(), aPreferredSize.Height() ) ); - } - aGraphic = Graphic( aMtf ); - } - else - aGraphic = rGraphic; - } - - } - else - aGraphic = rGraphic; - - delete pResMgr; - - return aGraphic; -} - -static String ImpCreateFullFilterPath( const String& rPath, const String& rFilterName ) -{ - ::rtl::OUString aPathURL; - - ::osl::FileBase::getFileURLFromSystemPath( rPath, aPathURL ); - aPathURL += String( '/' ); - - ::rtl::OUString aSystemPath; - ::osl::FileBase::getSystemPathFromFileURL( aPathURL, aSystemPath ); - aSystemPath += ::rtl::OUString( rFilterName ); - - return String( aSystemPath ); -} - - -// -------------------------- -// - ImpFilterLibCacheEntry - -// -------------------------- - -class ImpFilterLibCache; - -struct ImpFilterLibCacheEntry -{ - ImpFilterLibCacheEntry* mpNext; - osl::Module maLibrary; - String maFiltername; - PFilterCall mpfnImport; - PFilterDlgCall mpfnImportDlg; - - ImpFilterLibCacheEntry( const String& rPathname, const String& rFiltername ); - int operator==( const String& rFiltername ) const { return maFiltername == rFiltername; } - - PFilterCall GetImportFunction(); - PFilterDlgCall GetImportDlgFunction(); - PFilterCall GetExportFunction() { return (PFilterCall) maLibrary.getFunctionSymbol( UniString::CreateFromAscii( EXPORT_FUNCTION_NAME ) ); } - PFilterDlgCall GetExportDlgFunction() { return (PFilterDlgCall) maLibrary.getFunctionSymbol( UniString::CreateFromAscii( EXPDLG_FUNCTION_NAME ) ); } -}; - -// ------------------------------------------------------------------------ - -ImpFilterLibCacheEntry::ImpFilterLibCacheEntry( const String& rPathname, const String& rFiltername ) : - mpNext ( NULL ), - maLibrary ( rPathname ), - maFiltername ( rFiltername ), - mpfnImport ( NULL ), - mpfnImportDlg ( NULL ) -{ -} - -// ------------------------------------------------------------------------ - -PFilterCall ImpFilterLibCacheEntry::GetImportFunction() -{ - if( !mpfnImport ) - mpfnImport = (PFilterCall) maLibrary.getFunctionSymbol( UniString::CreateFromAscii( IMPORT_FUNCTION_NAME ) ); - - return mpfnImport; -} - -// ------------------------------------------------------------------------ - -PFilterDlgCall ImpFilterLibCacheEntry::GetImportDlgFunction() -{ - if( !mpfnImportDlg ) - mpfnImportDlg = (PFilterDlgCall)maLibrary.getFunctionSymbol( UniString::CreateFromAscii( IMPDLG_FUNCTION_NAME ) ); - - return mpfnImportDlg; -} - -// --------------------- -// - ImpFilterLibCache - -// --------------------- - -class ImpFilterLibCache -{ - ImpFilterLibCacheEntry* mpFirst; - ImpFilterLibCacheEntry* mpLast; - -public: - ImpFilterLibCache(); - ~ImpFilterLibCache(); - - ImpFilterLibCacheEntry* GetFilter( const String& rFilterPath, const String& rFiltername ); -}; - -// ------------------------------------------------------------------------ - -ImpFilterLibCache::ImpFilterLibCache() : - mpFirst ( NULL ), - mpLast ( NULL ) -{ -} - -// ------------------------------------------------------------------------ - -ImpFilterLibCache::~ImpFilterLibCache() -{ - ImpFilterLibCacheEntry* pEntry = mpFirst; - while( pEntry ) - { - ImpFilterLibCacheEntry* pNext = pEntry->mpNext; - delete pEntry; - pEntry = pNext; - } -} - -// ------------------------------------------------------------------------ - -ImpFilterLibCacheEntry* ImpFilterLibCache::GetFilter( const String& rFilterPath, const String& rFilterName ) -{ - ImpFilterLibCacheEntry* pEntry = mpFirst; - - while( pEntry ) - { - if( *pEntry == rFilterName ) - break; - else - pEntry = pEntry->mpNext; - } - if( !pEntry ) - { - String aPhysicalName( ImpCreateFullFilterPath( rFilterPath, rFilterName ) ); - pEntry = new ImpFilterLibCacheEntry( aPhysicalName, rFilterName ); - - if ( pEntry->maLibrary.is() ) - { - if( !mpFirst ) - mpFirst = mpLast = pEntry; - else - mpLast = mpLast->mpNext = pEntry; - } - else - { - delete pEntry; - pEntry = NULL; - } - } - return pEntry; -}; - -// ------------------------------------------------------------------------ - -namespace { struct Cache : public rtl::Static {}; } - -// ----------------- -// - GraphicFilter - -// ----------------- - -GraphicFilter::GraphicFilter( sal_Bool bConfig ) : - bUseConfig ( bConfig ), - nExpGraphHint ( 0 ) -{ - ImplInit(); -} - -// ------------------------------------------------------------------------ - -GraphicFilter::~GraphicFilter() -{ - { - ::osl::MutexGuard aGuard( getListMutex() ); - pFilterHdlList->Remove( (void*)this ); - if ( !pFilterHdlList->Count() ) - { - delete pFilterHdlList, pFilterHdlList = NULL; - delete pConfig; - } - } - - - delete pErrorEx; -} - -// ------------------------------------------------------------------------ - -void GraphicFilter::ImplInit() -{ - { - ::osl::MutexGuard aGuard( getListMutex() ); - - if ( !pFilterHdlList ) - { - pFilterHdlList = new List; - pConfig = new FilterConfigCache( bUseConfig ); - } - else - pConfig = ((GraphicFilter*)pFilterHdlList->First())->pConfig; - - pFilterHdlList->Insert( (void*)this ); - } - - if( bUseConfig ) - { -#if defined WNT - rtl::OUString url(RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR/program")); -#else - rtl::OUString url(RTL_CONSTASCII_USTRINGPARAM("$OOO_BASE_DIR/program")); -#endif - rtl::Bootstrap::expandMacros(url); //TODO: detect failure - utl::LocalFileHelper::ConvertURLToPhysicalName(url, aFilterPath); - } - - pErrorEx = new FilterErrorEx; - bAbort = sal_False; -} - -// ------------------------------------------------------------------------ - -ULONG GraphicFilter::ImplSetError( ULONG nError, const SvStream* pStm ) -{ - pErrorEx->nFilterError = nError; - pErrorEx->nStreamError = pStm ? pStm->GetError() : ERRCODE_NONE; - return nError; -} -// ------------------------------------------------------------------------ - -USHORT GraphicFilter::GetImportFormatCount() -{ - return pConfig->GetImportFormatCount(); -} - -// ------------------------------------------------------------------------ - -USHORT GraphicFilter::GetImportFormatNumber( const String& rFormatName ) -{ - return pConfig->GetImportFormatNumber( rFormatName ); -} - -// ------------------------------------------------------------------------ - -USHORT GraphicFilter::GetImportFormatNumberForMediaType( const String& rMediaType ) -{ - return pConfig->GetImportFormatNumberForMediaType( rMediaType ); -} - -// ------------------------------------------------------------------------ - -USHORT GraphicFilter::GetImportFormatNumberForShortName( const String& rShortName ) -{ - return pConfig->GetImportFormatNumberForShortName( rShortName ); -} - -// ------------------------------------------------------------------------ - -sal_uInt16 GraphicFilter::GetImportFormatNumberForTypeName( const String& rType ) -{ - return pConfig->GetImportFormatNumberForTypeName( rType ); -} - -// ------------------------------------------------------------------------ - -String GraphicFilter::GetImportFormatName( USHORT nFormat ) -{ - return pConfig->GetImportFormatName( nFormat ); -} - -// ------------------------------------------------------------------------ - -String GraphicFilter::GetImportFormatTypeName( USHORT nFormat ) -{ - return pConfig->GetImportFilterTypeName( nFormat ); -} - -// ------------------------------------------------------------------------ - -String GraphicFilter::GetImportFormatMediaType( USHORT nFormat ) -{ - return pConfig->GetImportFormatMediaType( nFormat ); -} - -// ------------------------------------------------------------------------ - -String GraphicFilter::GetImportFormatShortName( USHORT nFormat ) -{ - return pConfig->GetImportFormatShortName( nFormat ); -} - -// ------------------------------------------------------------------------ - -String GraphicFilter::GetImportOSFileType( USHORT ) -{ - String aOSFileType; - return aOSFileType; -} - -// ------------------------------------------------------------------------ - -String GraphicFilter::GetImportWildcard( USHORT nFormat, sal_Int32 nEntry ) -{ - return pConfig->GetImportWildcard( nFormat, nEntry ); -} - -// ------------------------------------------------------------------------ - -BOOL GraphicFilter::IsImportPixelFormat( USHORT nFormat ) -{ - return pConfig->IsImportPixelFormat( nFormat ); -} - -// ------------------------------------------------------------------------ - -USHORT GraphicFilter::GetExportFormatCount() -{ - return pConfig->GetExportFormatCount(); -} - -// ------------------------------------------------------------------------ - -USHORT GraphicFilter::GetExportFormatNumber( const String& rFormatName ) -{ - return pConfig->GetExportFormatNumber( rFormatName ); -} - -// ------------------------------------------------------------------------ - -USHORT GraphicFilter::GetExportFormatNumberForMediaType( const String& rMediaType ) -{ - return pConfig->GetExportFormatNumberForMediaType( rMediaType ); -} - -// ------------------------------------------------------------------------ - -USHORT GraphicFilter::GetExportFormatNumberForShortName( const String& rShortName ) -{ - return pConfig->GetExportFormatNumberForShortName( rShortName ); -} - -// ------------------------------------------------------------------------ - -sal_uInt16 GraphicFilter::GetExportFormatNumberForTypeName( const String& rType ) -{ - return pConfig->GetExportFormatNumberForTypeName( rType ); -} - -// ------------------------------------------------------------------------ - -String GraphicFilter::GetExportFormatName( USHORT nFormat ) -{ - return pConfig->GetExportFormatName( nFormat ); -} - -// ------------------------------------------------------------------------ - -String GraphicFilter::GetExportFormatTypeName( USHORT nFormat ) -{ - return pConfig->GetExportFilterTypeName( nFormat ); -} - -// ------------------------------------------------------------------------ - -String GraphicFilter::GetExportFormatMediaType( USHORT nFormat ) -{ - return pConfig->GetExportFormatMediaType( nFormat ); -} - -// ------------------------------------------------------------------------ - -String GraphicFilter::GetExportFormatShortName( USHORT nFormat ) -{ - return pConfig->GetExportFormatShortName( nFormat ); -} - -// ------------------------------------------------------------------------ - -String GraphicFilter::GetExportOSFileType( USHORT ) -{ - String aOSFileType; - return aOSFileType; -} - -// ------------------------------------------------------------------------ - -String GraphicFilter::GetExportWildcard( USHORT nFormat, sal_Int32 nEntry ) -{ - return pConfig->GetExportWildcard( nFormat, nEntry ); -} - -// ------------------------------------------------------------------------ - -BOOL GraphicFilter::IsExportPixelFormat( USHORT nFormat ) -{ - return pConfig->IsExportPixelFormat( nFormat ); -} - -// ------------------------------------------------------------------------ - -USHORT GraphicFilter::CanImportGraphic( const INetURLObject& rPath, - USHORT nFormat, USHORT* pDeterminedFormat ) -{ - sal_uInt16 nRetValue = GRFILTER_FORMATERROR; - DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::CanImportGraphic() : ProtType == INET_PROT_NOT_VALID" ); - - String aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) ); - SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aMainUrl, STREAM_READ | STREAM_SHARE_DENYNONE ); - if ( pStream ) - { - nRetValue = CanImportGraphic( aMainUrl, *pStream, nFormat, pDeterminedFormat ); - delete pStream; - } - return nRetValue; -} - -// ------------------------------------------------------------------------ - -USHORT GraphicFilter::CanImportGraphic( const String& rMainUrl, SvStream& rIStream, - USHORT nFormat, USHORT* pDeterminedFormat ) -{ - ULONG nStreamPos = rIStream.Tell(); - sal_uInt16 nRes = ImpTestOrFindFormat( rMainUrl, rIStream, nFormat ); - - rIStream.Seek(nStreamPos); - - if( nRes==GRFILTER_OK && pDeterminedFormat!=NULL ) - *pDeterminedFormat = nFormat; - - return (USHORT) ImplSetError( nRes, &rIStream ); -} - -// ------------------------------------------------------------------------ -//SJ: TODO, we need to create a GraphicImporter component -USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const INetURLObject& rPath, - USHORT nFormat, USHORT * pDeterminedFormat, sal_uInt32 nImportFlags ) -{ - sal_uInt16 nRetValue = GRFILTER_FORMATERROR; - DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::ImportGraphic() : ProtType == INET_PROT_NOT_VALID" ); - - String aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) ); - SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aMainUrl, STREAM_READ | STREAM_SHARE_DENYNONE ); - if ( pStream ) - { - nRetValue = ImportGraphic( rGraphic, aMainUrl, *pStream, nFormat, pDeterminedFormat, nImportFlags ); - delete pStream; - } - return nRetValue; -} - -USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvStream& rIStream, - USHORT nFormat, USHORT* pDeterminedFormat, sal_uInt32 nImportFlags ) -{ - return ImportGraphic( rGraphic, rPath, rIStream, nFormat, pDeterminedFormat, nImportFlags, NULL ); -} - -//------------------------------------------------------------------------- - -USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvStream& rIStream, - USHORT nFormat, USHORT* pDeterminedFormat, sal_uInt32 nImportFlags, - com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData ) -{ - String aFilterName; - ULONG nStmBegin; - USHORT nStatus; - GraphicReader* pContext = rGraphic.GetContext(); - GfxLinkType eLinkType = GFX_LINK_TYPE_NONE; - BOOL bDummyContext = ( pContext == (GraphicReader*) 1 ); - const BOOL bLinkSet = rGraphic.IsLink(); - FilterConfigItem* pFilterConfigItem = NULL; - - Size aPreviewSizeHint( 0, 0 ); - sal_Bool bAllowPartialStreamRead = sal_False; - sal_Bool bCreateNativeLink = sal_True; - - ResetLastError(); - - if ( pFilterData ) - { - sal_Int32 i; - for ( i = 0; i < pFilterData->getLength(); i++ ) - { - if ( (*pFilterData)[ i ].Name.equalsAscii( "PreviewSizeHint" ) ) - { - awt::Size aSize; - if ( (*pFilterData)[ i ].Value >>= aSize ) - { - aPreviewSizeHint = Size( aSize.Width, aSize.Height ); - if ( aSize.Width || aSize.Height ) - nImportFlags |= GRFILTER_I_FLAGS_FOR_PREVIEW; - else - nImportFlags &=~GRFILTER_I_FLAGS_FOR_PREVIEW; - } - } - else if ( (*pFilterData)[ i ].Name.equalsAscii( "AllowPartialStreamRead" ) ) - { - (*pFilterData)[ i ].Value >>= bAllowPartialStreamRead; - if ( bAllowPartialStreamRead ) - nImportFlags |= GRFILTER_I_FLAGS_ALLOW_PARTIAL_STREAMREAD; - else - nImportFlags &=~GRFILTER_I_FLAGS_ALLOW_PARTIAL_STREAMREAD; - } - else if ( (*pFilterData)[ i ].Name.equalsAscii( "CreateNativeLink" ) ) - { - (*pFilterData)[ i ].Value >>= bCreateNativeLink; - } - } - } - - if( !pContext || bDummyContext ) - { - if( bDummyContext ) - { - rGraphic.SetContext( NULL ); - nStmBegin = 0; - } - else - nStmBegin = rIStream.Tell(); - - bAbort = FALSE; - nStatus = ImpTestOrFindFormat( rPath, rIStream, nFormat ); - // Falls Pending, geben wir GRFILTER_OK zurueck, - // um mehr Bytes anzufordern - if( rIStream.GetError() == ERRCODE_IO_PENDING ) - { - rGraphic.SetContext( (GraphicReader*) 1 ); - rIStream.ResetError(); - rIStream.Seek( nStmBegin ); - return (USHORT) ImplSetError( GRFILTER_OK ); - } - - rIStream.Seek( nStmBegin ); - - if( ( nStatus != GRFILTER_OK ) || rIStream.GetError() ) - return (USHORT) ImplSetError( ( nStatus != GRFILTER_OK ) ? nStatus : GRFILTER_OPENERROR, &rIStream ); - - if( pDeterminedFormat ) - *pDeterminedFormat = nFormat; - - aFilterName = pConfig->GetImportFilterName( nFormat ); - } - else - { - if( pContext && !bDummyContext ) - aFilterName = pContext->GetUpperFilterName(); - - nStmBegin = 0; - nStatus = GRFILTER_OK; - } - - // read graphic - if ( pConfig->IsImportInternalFilter( nFormat ) ) - { - if( aFilterName.EqualsIgnoreCaseAscii( IMP_GIF ) ) - { - if( rGraphic.GetContext() == (GraphicReader*) 1 ) - rGraphic.SetContext( NULL ); - - if( !ImportGIF( rIStream, rGraphic ) ) - nStatus = GRFILTER_FILTERERROR; - else - eLinkType = GFX_LINK_TYPE_NATIVE_GIF; - } - else if( aFilterName.EqualsIgnoreCaseAscii( IMP_PNG ) ) - { - if ( rGraphic.GetContext() == (GraphicReader*) 1 ) - rGraphic.SetContext( NULL ); - - vcl::PNGReader aPNGReader( rIStream ); - - // ignore animation for previews and set preview size - if( aPreviewSizeHint.Width() || aPreviewSizeHint.Height() ) - { - // position the stream at the end of the image if requested - if( !bAllowPartialStreamRead ) - aPNGReader.GetChunks(); - } - else - { - // check if this PNG contains a GIF chunk! - const std::vector< vcl::PNGReader::ChunkData >& rChunkData = aPNGReader.GetChunks(); - std::vector< vcl::PNGReader::ChunkData >::const_iterator aIter( rChunkData.begin() ); - std::vector< vcl::PNGReader::ChunkData >::const_iterator aEnd ( rChunkData.end() ); - while( aIter != aEnd ) - { - // Microsoft Office is storing Animated GIFs in following chunk - if ( aIter->nType == PMGCHUNG_msOG ) - { - sal_uInt32 nChunkSize = aIter->aData.size(); - if ( nChunkSize > 11 ) - { - const std::vector< sal_uInt8 >& rData = aIter->aData; - SvMemoryStream aIStrm( (void*)&rData[ 11 ], nChunkSize - 11, STREAM_READ ); - ImportGIF( aIStrm, rGraphic ); - eLinkType = GFX_LINK_TYPE_NATIVE_PNG; - break; - } - } - aIter++; - } - } - - if ( eLinkType == GFX_LINK_TYPE_NONE ) - { - BitmapEx aBmpEx( aPNGReader.Read( aPreviewSizeHint ) ); - if ( aBmpEx.IsEmpty() ) - nStatus = GRFILTER_FILTERERROR; - else - { - rGraphic = aBmpEx; - eLinkType = GFX_LINK_TYPE_NATIVE_PNG; - } - } - } - else if( aFilterName.EqualsIgnoreCaseAscii( IMP_JPEG ) ) - { - if( rGraphic.GetContext() == (GraphicReader*) 1 ) - rGraphic.SetContext( NULL ); - - // set LOGSIZE flag always, if not explicitly disabled - // (see #90508 and #106763) - if( 0 == ( nImportFlags & GRFILTER_I_FLAGS_DONT_SET_LOGSIZE_FOR_JPEG ) ) - nImportFlags |= GRFILTER_I_FLAGS_SET_LOGSIZE_FOR_JPEG; - - if( !ImportJPEG( rIStream, rGraphic, NULL, nImportFlags ) ) - nStatus = GRFILTER_FILTERERROR; - else - eLinkType = GFX_LINK_TYPE_NATIVE_JPG; - } - else if( aFilterName.EqualsIgnoreCaseAscii( IMP_XBM ) ) - { - if( rGraphic.GetContext() == (GraphicReader*) 1 ) - rGraphic.SetContext( NULL ); - - if( !ImportXBM( rIStream, rGraphic ) ) - nStatus = GRFILTER_FILTERERROR; - } - else if( aFilterName.EqualsIgnoreCaseAscii( IMP_XPM ) ) - { - if( rGraphic.GetContext() == (GraphicReader*) 1 ) - rGraphic.SetContext( NULL ); - - if( !ImportXPM( rIStream, rGraphic ) ) - nStatus = GRFILTER_FILTERERROR; - } - else if( aFilterName.EqualsIgnoreCaseAscii( IMP_BMP ) || - aFilterName.EqualsIgnoreCaseAscii( IMP_SVMETAFILE ) ) - { - // SV interne Importfilter fuer Bitmaps und MetaFiles - rIStream >> rGraphic; - if( rIStream.GetError() ) - nStatus = GRFILTER_FORMATERROR; - } - else if( aFilterName.EqualsIgnoreCaseAscii( IMP_WMF ) || - aFilterName.EqualsIgnoreCaseAscii( IMP_EMF ) ) - { - GDIMetaFile aMtf; - if( !ConvertWMFToGDIMetaFile( rIStream, aMtf, NULL ) ) - nStatus = GRFILTER_FORMATERROR; - else - { - rGraphic = aMtf; - eLinkType = GFX_LINK_TYPE_NATIVE_WMF; - } - } - else if( aFilterName.EqualsIgnoreCaseAscii( IMP_SVSGF ) - || aFilterName.EqualsIgnoreCaseAscii( IMP_SVSGV ) ) - { - USHORT nVersion; - unsigned char nTyp = CheckSgfTyp( rIStream, nVersion ); - - switch( nTyp ) - { - case SGF_BITIMAGE: - { - SvMemoryStream aTempStream; - if( aTempStream.GetError() ) - return GRFILTER_OPENERROR; - - if( !SgfBMapFilter( rIStream, aTempStream ) ) - nStatus = GRFILTER_FILTERERROR; - else - { - aTempStream.Seek( 0L ); - aTempStream >> rGraphic; - - if( aTempStream.GetError() ) - nStatus = GRFILTER_FILTERERROR; - } - } - break; - - case SGF_SIMPVECT: - { - GDIMetaFile aMtf; - if( !SgfVectFilter( rIStream, aMtf ) ) - nStatus = GRFILTER_FILTERERROR; - else - rGraphic = Graphic( aMtf ); - } - break; - - case SGF_STARDRAW: - { - if( nVersion != SGV_VERSION ) - nStatus = GRFILTER_VERSIONERROR; - else - { - GDIMetaFile aMtf; - if( !SgfSDrwFilter( rIStream, aMtf, - INetURLObject(aFilterPath) ) ) - { - nStatus = GRFILTER_FILTERERROR; - } - else - rGraphic = Graphic( aMtf ); - } - } - break; - - default: - { - nStatus = GRFILTER_FORMATERROR; - } - break; - } - } - else - nStatus = GRFILTER_FILTERERROR; - } - else - { - ImpFilterLibCacheEntry* pFilter = NULL; - - // find first filter in filter pathes - xub_StrLen i, nTokenCount = aFilterPath.GetTokenCount( ';' ); - ImpFilterLibCache &rCache = Cache::get(); - for( i = 0; ( i < nTokenCount ) && ( pFilter == NULL ); i++ ) - pFilter = rCache.GetFilter( aFilterPath.GetToken(i), aFilterName ); - if( !pFilter ) - nStatus = GRFILTER_FILTERERROR; - else - { - PFilterCall pFunc = pFilter->GetImportFunction(); - - if( !pFunc ) - nStatus = GRFILTER_FILTERERROR; - else - { - String aShortName; - if( nFormat != GRFILTER_FORMAT_DONTKNOW ) - { - aShortName = GetImportFormatShortName( nFormat ).ToUpperAscii(); - if ( ( pFilterConfigItem == NULL ) && aShortName.EqualsAscii( "PCD" ) ) - { - String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Import/PCD" ) ); - pFilterConfigItem = new FilterConfigItem( aFilterConfigPath ); - } - } - if( !(*pFunc)( rIStream, rGraphic, pFilterConfigItem, sal_False ) ) - nStatus = GRFILTER_FORMATERROR; - else - { - // try to set link type if format matches - if( nFormat != GRFILTER_FORMAT_DONTKNOW ) - { - if( aShortName.CompareToAscii( TIF_SHORTNAME ) == COMPARE_EQUAL ) - eLinkType = GFX_LINK_TYPE_NATIVE_TIF; - else if( aShortName.CompareToAscii( MET_SHORTNAME ) == COMPARE_EQUAL ) - eLinkType = GFX_LINK_TYPE_NATIVE_MET; - else if( aShortName.CompareToAscii( PCT_SHORTNAME ) == COMPARE_EQUAL ) - eLinkType = GFX_LINK_TYPE_NATIVE_PCT; - } - } - } - } - } - - if( nStatus == GRFILTER_OK && bCreateNativeLink && ( eLinkType != GFX_LINK_TYPE_NONE ) && !rGraphic.GetContext() && !bLinkSet ) - { - const ULONG nStmEnd = rIStream.Tell(); - const ULONG nBufSize = nStmEnd - nStmBegin; - - if( nBufSize ) - { - BYTE* pBuf=0; - try - { - pBuf = new BYTE[ nBufSize ]; - } - catch (std::bad_alloc) - { - nStatus = GRFILTER_TOOBIG; - } - - if( nStatus == GRFILTER_OK ) - { - rIStream.Seek( nStmBegin ); - rIStream.Read( pBuf, nBufSize ); - rGraphic.SetLink( GfxLink( pBuf, nBufSize, eLinkType, TRUE ) ); - } - } - } - - // Set error code or try to set native buffer - if( nStatus != GRFILTER_OK ) - { - if( bAbort ) - nStatus = GRFILTER_ABORT; - - ImplSetError( nStatus, &rIStream ); - rIStream.Seek( nStmBegin ); - rGraphic.Clear(); - } - - delete pFilterConfigItem; - return nStatus; -} - - -// ------------------------------------------------------------------------ - -USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const INetURLObject& rPath, - sal_uInt16 nFormat, const uno::Sequence< beans::PropertyValue >* pFilterData ) -{ - sal_uInt16 nRetValue = GRFILTER_FORMATERROR; - DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::ExportGraphic() : ProtType == INET_PROT_NOT_VALID" ); - BOOL bAlreadyExists = ImplDirEntryHelper::Exists( rPath ); - - String aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) ); - SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aMainUrl, STREAM_WRITE | STREAM_TRUNC ); - if ( pStream ) - { - nRetValue = ExportGraphic( rGraphic, aMainUrl, *pStream, nFormat, pFilterData ); - delete pStream; - - if( ( GRFILTER_OK != nRetValue ) && !bAlreadyExists ) - ImplDirEntryHelper::Kill( aMainUrl ); - } - return nRetValue; -} - -// ------------------------------------------------------------------------ - -USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPath, - SvStream& rOStm, sal_uInt16 nFormat, const uno::Sequence< beans::PropertyValue >* pFilterData ) -{ - USHORT nFormatCount = GetExportFormatCount(); - - ResetLastError(); - nExpGraphHint = 0; - - if( nFormat == GRFILTER_FORMAT_DONTKNOW ) - { - INetURLObject aURL( rPath ); - String aExt( aURL.GetFileExtension().toAsciiUpperCase() ); - - - for( USHORT i = 0; i < nFormatCount; i++ ) - { - if ( pConfig->GetExportFormatExtension( i ).EqualsIgnoreCaseAscii( aExt ) ) - { - nFormat=i; - break; - } - } - } - if( nFormat >= nFormatCount ) - return (USHORT) ImplSetError( GRFILTER_FORMATERROR ); - - FilterConfigItem aConfigItem( (uno::Sequence< beans::PropertyValue >*)pFilterData ); - String aFilterName( pConfig->GetExportFilterName( nFormat ) ); - - bAbort = FALSE; - USHORT nStatus = GRFILTER_OK; - GraphicType eType; - Graphic aGraphic( rGraphic ); - - aGraphic = ImpGetScaledGraphic( rGraphic, aConfigItem ); - eType = aGraphic.GetType(); - - if( pConfig->IsExportPixelFormat( nFormat ) ) - { - if( eType != GRAPHIC_BITMAP ) - { - Size aSizePixel; - ULONG nColorCount,nBitsPerPixel,nNeededMem,nMaxMem; - VirtualDevice aVirDev; - - // Maximalen Speicherbedarf fuer das Bildes holen: -// if( GetOptionsConfig() ) -// nMaxMem = (UINT32)GetOptionsConfig()->ReadKey( "VEC-TO-PIX-MAX-KB", "1024" ).ToInt32(); -// else - nMaxMem = 1024; - - nMaxMem *= 1024; // In Bytes - - // Berechnen, wie gross das Bild normalerweise werden wuerde: - aSizePixel=aVirDev.LogicToPixel(aGraphic.GetPrefSize(),aGraphic.GetPrefMapMode()); - - // Berechnen, wieviel Speicher das Bild benoetigen wuerde: - nColorCount=aVirDev.GetColorCount(); - if (nColorCount<=2) nBitsPerPixel=1; - else if (nColorCount<=4) nBitsPerPixel=2; - else if (nColorCount<=16) nBitsPerPixel=4; - else if (nColorCount<=256) nBitsPerPixel=8; - else if (nColorCount<=65536) nBitsPerPixel=16; - else nBitsPerPixel=24; - nNeededMem=((ULONG)aSizePixel.Width()*(ULONG)aSizePixel.Height()*nBitsPerPixel+7)/8; - - // ggf. Groesse des Bildes einschraenken: - if (nMaxMemIsExportInternalFilter( nFormat ) ) - { - if( aFilterName.EqualsIgnoreCaseAscii( EXP_BMP ) ) - { - Bitmap aBmp( aGraphic.GetBitmap() ); - sal_Int32 nColorRes = aConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Colors" ) ), 0 ); - if ( nColorRes && ( nColorRes <= (USHORT)BMP_CONVERSION_24BIT) ) - { - if( !aBmp.Convert( (BmpConversion) nColorRes ) ) - aBmp = aGraphic.GetBitmap(); - } - ResMgr* pResMgr = CREATERESMGR( svt ); - sal_Bool bRleCoding = aConfigItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( "RLE_Coding" ) ), sal_True ); - // Wollen wir RLE-Kodiert speichern? - aBmp.Write( rOStm, bRleCoding ); - delete pResMgr; - - if( rOStm.GetError() ) - nStatus = GRFILTER_IOERROR; - } - else if( aFilterName.EqualsIgnoreCaseAscii( EXP_SVMETAFILE ) ) - { - sal_Int32 nVersion = aConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ), 0 ) ; - if ( nVersion ) - rOStm.SetVersion( nVersion ); - GDIMetaFile aMTF; - - if ( eType != GRAPHIC_BITMAP ) - aMTF = aGraphic.GetGDIMetaFile(); - else - { - VirtualDevice aVirDev; - - aMTF.Record( &aVirDev ); - aGraphic.Draw( &aVirDev, Point(), aGraphic.GetPrefSize() ); - aMTF.Stop(); - aMTF.SetPrefSize( aGraphic.GetPrefSize() ); - aMTF.SetPrefMapMode( aGraphic.GetPrefMapMode() ); - } - rOStm << aMTF; - if( rOStm.GetError() ) - nStatus = GRFILTER_IOERROR; - } - else if ( aFilterName.EqualsIgnoreCaseAscii( EXP_WMF ) ) - { - if( eType == GRAPHIC_GDIMETAFILE ) - { - if ( !ConvertGDIMetaFileToWMF( aGraphic.GetGDIMetaFile(), rOStm, &aConfigItem ) ) - nStatus = GRFILTER_FORMATERROR; - } - else - { - Bitmap aBmp( aGraphic.GetBitmap() ); - GDIMetaFile aMTF; - VirtualDevice aVirDev; - - aMTF.Record( &aVirDev ); - aVirDev.DrawBitmap( Point(), aBmp ); - aMTF.Stop(); - aMTF.SetPrefSize( aBmp.GetSizePixel() ); - - if( !ConvertGDIMetaFileToWMF( aMTF, rOStm, &aConfigItem ) ) - nStatus = GRFILTER_FORMATERROR; - } - if( rOStm.GetError() ) - nStatus = GRFILTER_IOERROR; - } - else if ( aFilterName.EqualsIgnoreCaseAscii( EXP_EMF ) ) - { - if( eType == GRAPHIC_GDIMETAFILE ) - { - if ( !ConvertGDIMetaFileToEMF( aGraphic.GetGDIMetaFile(), rOStm, &aConfigItem ) ) - nStatus = GRFILTER_FORMATERROR; - } - else - { - Bitmap aBmp( aGraphic.GetBitmap() ); - GDIMetaFile aMTF; - VirtualDevice aVirDev; - - aMTF.Record( &aVirDev ); - aVirDev.DrawBitmap( Point(), aBmp ); - aMTF.Stop(); - aMTF.SetPrefSize( aBmp.GetSizePixel() ); - - if( !ConvertGDIMetaFileToEMF( aMTF, rOStm, &aConfigItem ) ) - nStatus = GRFILTER_FORMATERROR; - } - if( rOStm.GetError() ) - nStatus = GRFILTER_IOERROR; - } - else if( aFilterName.EqualsIgnoreCaseAscii( EXP_JPEG ) ) - { - bool bExportedGrayJPEG = false; - if( !ExportJPEG( rOStm, aGraphic, pFilterData, &bExportedGrayJPEG ) ) - nStatus = GRFILTER_FORMATERROR; - nExpGraphHint = bExportedGrayJPEG ? GRFILTER_OUTHINT_GREY : 0; - - if( rOStm.GetError() ) - nStatus = GRFILTER_IOERROR; - } - else if ( aFilterName.EqualsIgnoreCaseAscii( EXP_PNG ) ) - { - vcl::PNGWriter aPNGWriter( aGraphic.GetBitmapEx(), pFilterData ); - if ( pFilterData ) - { - sal_Int32 k, j, i = 0; - for ( i = 0; i < pFilterData->getLength(); i++ ) - { - if ( (*pFilterData)[ i ].Name.equalsAscii( "AdditionalChunks" ) ) - { - com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > aAdditionalChunkSequence; - if ( (*pFilterData)[ i ].Value >>= aAdditionalChunkSequence ) - { - for ( j = 0; j < aAdditionalChunkSequence.getLength(); j++ ) - { - if ( aAdditionalChunkSequence[ j ].Name.getLength() == 4 ) - { - sal_uInt32 nChunkType = 0; - for ( k = 0; k < 4; k++ ) - { - nChunkType <<= 8; - nChunkType |= (sal_uInt8)aAdditionalChunkSequence[ j ].Name[ k ]; - } - com::sun::star::uno::Sequence< sal_Int8 > aByteSeq; - if ( aAdditionalChunkSequence[ j ].Value >>= aByteSeq ) - { - std::vector< vcl::PNGWriter::ChunkData >& rChunkData = aPNGWriter.GetChunks(); - if ( rChunkData.size() ) - { - sal_uInt32 nChunkLen = aByteSeq.getLength(); - - vcl::PNGWriter::ChunkData aChunkData; - aChunkData.nType = nChunkType; - if ( nChunkLen ) - { - aChunkData.aData.resize( nChunkLen ); - rtl_copyMemory( &aChunkData.aData[ 0 ], aByteSeq.getConstArray(), nChunkLen ); - } - std::vector< vcl::PNGWriter::ChunkData >::iterator aIter = rChunkData.end() - 1; - rChunkData.insert( aIter, aChunkData ); - } - } - } - } - } - } - } - } - aPNGWriter.Write( rOStm ); - - if( rOStm.GetError() ) - nStatus = GRFILTER_IOERROR; - } - else if( aFilterName.EqualsIgnoreCaseAscii( EXP_SVG ) ) - { - try - { - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() ); - - if( xMgr.is() ) - { - ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > xSaxWriter( xMgr->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.xml.sax.Writer" ) ), ::com::sun::star::uno::UNO_QUERY ); - - ::com::sun::star::uno::Reference< ::com::sun::star::svg::XSVGWriter > xSVGWriter( xMgr->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.svg.SVGWriter" ) ), ::com::sun::star::uno::UNO_QUERY ); - - if( xSaxWriter.is() && xSVGWriter.is() ) - { - ::com::sun::star::uno::Reference< ::com::sun::star::io::XActiveDataSource > xActiveDataSource( - xSaxWriter, ::com::sun::star::uno::UNO_QUERY ); - - if( xActiveDataSource.is() ) - { - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xStmIf( - static_cast< ::cppu::OWeakObject* >( new ImpFilterOutputStream( rOStm ) ) ); - - SvMemoryStream aMemStm( 65535, 65535 ); - - aMemStm.SetCompressMode( COMPRESSMODE_FULL ); - ( (GDIMetaFile&) aGraphic.GetGDIMetaFile() ).Write( aMemStm ); - - xActiveDataSource->setOutputStream( ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >( - xStmIf, ::com::sun::star::uno::UNO_QUERY ) ); - ::com::sun::star::uno::Sequence< sal_Int8 > aMtfSeq( (sal_Int8*) aMemStm.GetData(), aMemStm.Tell() ); - xSVGWriter->write( xSaxWriter, aMtfSeq ); - } - } - } - } - catch( ::com::sun::star::uno::Exception& ) - { - nStatus = GRFILTER_IOERROR; - } - } - else - nStatus = GRFILTER_FILTERERROR; - } - else - { - xub_StrLen i, nTokenCount = aFilterPath.GetTokenCount( ';' ); - for ( i = 0; i < nTokenCount; i++ ) - { - String aPhysicalName( ImpCreateFullFilterPath( aFilterPath.GetToken( i ), aFilterName ) ); - osl::Module aLibrary( aPhysicalName ); - - PFilterCall pFunc = (PFilterCall) aLibrary.getFunctionSymbol( UniString::CreateFromAscii( EXPORT_FUNCTION_NAME ) ); - // Dialog in DLL ausfuehren - if( pFunc ) - { - if ( !(*pFunc)( rOStm, aGraphic, &aConfigItem, sal_False ) ) - nStatus = GRFILTER_FORMATERROR; - break; - } - else - nStatus = GRFILTER_FILTERERROR; - } - } - } - if( nStatus != GRFILTER_OK ) - { - if( bAbort ) - nStatus = GRFILTER_ABORT; - - ImplSetError( nStatus, &rOStm ); - } - return nStatus; -} - -// ------------------------------------------------------------------------ - -BOOL GraphicFilter::Setup( USHORT ) -{ - return FALSE; -} - -/* ------------------------------------------------------------------------ - No Import filter has a dialog, so - the following two methods are obsolete */ - -BOOL GraphicFilter::HasImportDialog( USHORT ) -{ - return sal_True; -// return pConfig->IsImportDialog( nFormat ); -} - -// ------------------------------------------------------------------------ - -BOOL GraphicFilter::DoImportDialog( Window*, USHORT ) -{ - return sal_True; -} - -// ------------------------------------------------------------------------ - -BOOL GraphicFilter::HasExportDialog( USHORT nFormat ) -{ - return pConfig->IsExportDialog( nFormat ); -} - -// ------------------------------------------------------------------------ - -BOOL GraphicFilter::DoExportDialog( Window* pWindow, USHORT nFormat ) -{ - return DoExportDialog( pWindow, nFormat, FUNIT_MM ); -} - -BOOL GraphicFilter::DoExportDialog( Window*, USHORT nFormat, FieldUnit ) -{ - sal_Bool bRet = sal_False; - com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > - xSMgr( ::comphelper::getProcessServiceFactory() ); - - uno::Reference< com::sun::star::uno::XInterface > xFilterOptionsDialog - ( xSMgr->createInstance( rtl::OUString::createFromAscii( "com.sun.star.svtools.SvFilterOptionsDialog" ) ), - com::sun::star::uno::UNO_QUERY ); - if ( xFilterOptionsDialog.is() ) - { - com::sun::star::uno::Reference< com::sun::star::ui::dialogs::XExecutableDialog > xExecutableDialog - ( xFilterOptionsDialog, ::com::sun::star::uno::UNO_QUERY ); - com::sun::star::uno::Reference< com::sun::star::beans::XPropertyAccess > xPropertyAccess - ( xFilterOptionsDialog, ::com::sun::star::uno::UNO_QUERY ); - if ( xExecutableDialog.is() && xPropertyAccess.is() ) - { - com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aMediaDescriptor( 1 ); - aMediaDescriptor[ 0 ].Name = String( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ) ); - rtl::OUString aStr( pConfig->GetExportInternalFilterName( nFormat ) ); - aMediaDescriptor[ 0 ].Value <<= aStr; - xPropertyAccess->setPropertyValues( aMediaDescriptor ); - bRet = xExecutableDialog->execute() == com::sun::star::ui::dialogs::ExecutableDialogResults::OK; - } - } - return bRet; -} - -// ------------------------------------------------------------------------ - -const FilterErrorEx& GraphicFilter::GetLastError() const -{ - return *pErrorEx; -} - -// ------------------------------------------------------------------------ - -void GraphicFilter::ResetLastError() -{ - pErrorEx->nFilterError = pErrorEx->nStreamError = 0UL; -} - -// ------------------------------------------------------------------------ - -const Link GraphicFilter::GetFilterCallback() const -{ - const Link aLink( LINK( this, GraphicFilter, FilterCallback ) ); - return aLink; -} - -// ------------------------------------------------------------------------ - -IMPL_LINK( GraphicFilter, FilterCallback, ConvertData*, pData ) -{ - long nRet = 0L; - - if( pData ) - { - USHORT nFormat = GRFILTER_FORMAT_DONTKNOW; - ByteString aShortName; - switch( pData->mnFormat ) - { - case( CVT_BMP ): aShortName = BMP_SHORTNAME; break; - case( CVT_GIF ): aShortName = GIF_SHORTNAME; break; - case( CVT_JPG ): aShortName = JPG_SHORTNAME; break; - case( CVT_MET ): aShortName = MET_SHORTNAME; break; - case( CVT_PCT ): aShortName = PCT_SHORTNAME; break; - case( CVT_PNG ): aShortName = PNG_SHORTNAME; break; - case( CVT_SVM ): aShortName = SVM_SHORTNAME; break; - case( CVT_TIF ): aShortName = TIF_SHORTNAME; break; - case( CVT_WMF ): aShortName = WMF_SHORTNAME; break; - case( CVT_EMF ): aShortName = EMF_SHORTNAME; break; - - default: - break; - } - if( GRAPHIC_NONE == pData->maGraphic.GetType() || pData->maGraphic.GetContext() ) // Import - { - // Import - nFormat = GetImportFormatNumberForShortName( String( aShortName.GetBuffer(), RTL_TEXTENCODING_UTF8 ) ); - nRet = ImportGraphic( pData->maGraphic, String(), pData->mrStm ) == 0; - } - else if( aShortName.Len() ) - { - // Export - nFormat = GetExportFormatNumberForShortName( String( aShortName.GetBuffer(), RTL_TEXTENCODING_UTF8 ) ); - nRet = ExportGraphic( pData->maGraphic, String(), pData->mrStm, nFormat ) == 0; - } - } - return nRet; -} - -// ------------------------------------------------------------------------ - -GraphicFilter* GraphicFilter::GetGraphicFilter() -{ - if( !pGraphicFilter ) - { - pGraphicFilter = new GraphicFilter; - pGraphicFilter->GetImportFormatCount(); - } - return pGraphicFilter; -} - -int GraphicFilter::LoadGraphic( const String &rPath, const String &rFilterName, - Graphic& rGraphic, GraphicFilter* pFilter, - USHORT* pDeterminedFormat ) -{ - if ( !pFilter ) - pFilter = GetGraphicFilter(); - - const USHORT nFilter = rFilterName.Len() && pFilter->GetImportFormatCount() - ? pFilter->GetImportFormatNumber( rFilterName ) - : GRFILTER_FORMAT_DONTKNOW; - - 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() ) - { - pStream = ::utl::UcbStreamHelper::CreateStream( rPath, STREAM_READ ); - } - - int nRes = GRFILTER_OK; - if ( !pStream ) - nRes = pFilter->ImportGraphic( rGraphic, aURL, nFilter, pDeterminedFormat ); - else - nRes = pFilter->ImportGraphic( rGraphic, rPath, *pStream, nFilter, pDeterminedFormat ); - -#ifdef DBG_UTIL - if( nRes ) - DBG_WARNING2( "GrafikFehler [%d] - [%s]", nRes, rPath.GetBuffer() ); -#endif - - return nRes; -} - diff --git a/svtools/source/filter.vcl/filter/filter2.cxx b/svtools/source/filter.vcl/filter/filter2.cxx deleted file mode 100644 index d91ec1a19772..000000000000 --- a/svtools/source/filter.vcl/filter/filter2.cxx +++ /dev/null @@ -1,1339 +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_svtools.hxx" - -#include -#include -#include -#include -#include -#include -#include -#include "FilterConfigCache.hxx" -#include - -#define DATA_SIZE 640 - -BYTE* ImplSearchEntry( BYTE* , BYTE* , ULONG , ULONG ); - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -GraphicDescriptor::GraphicDescriptor( const INetURLObject& rPath ) : - pFileStm( ::utl::UcbStreamHelper::CreateStream( rPath.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ ) ), - aPathExt( rPath.GetFileExtension().toAsciiLowerCase() ), - bOwnStream( TRUE ) -{ - ImpConstruct(); -} - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -GraphicDescriptor::GraphicDescriptor( SvStream& rInStream, const String* pPath) : - pFileStm ( &rInStream ), - bOwnStream ( FALSE ) -{ - ImpConstruct(); - - if ( pPath ) - { - INetURLObject aURL( *pPath ); - aPathExt = aURL.GetFileExtension().toAsciiLowerCase(); - } -} - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -GraphicDescriptor::~GraphicDescriptor() -{ - if ( bOwnStream ) - delete pFileStm; -} - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::Detect( BOOL bExtendedInfo ) -{ - BOOL bRet = FALSE; - if ( pFileStm && !pFileStm->GetError() ) - { - SvStream& rStm = *pFileStm; - UINT16 nOldFormat = rStm.GetNumberFormatInt(); - - if ( ImpDetectGIF( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectJPG( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectBMP( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPNG( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectTIF( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPCX( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectDXF( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectMET( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectSGF( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectSGV( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectSVM( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectWMF( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectEMF( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPCT( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectXBM( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectXPM( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPBM( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPGM( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPPM( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectRAS( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectTGA( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPSD( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectEPS( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPCD( rStm, bExtendedInfo ) ) bRet = TRUE; - - rStm.SetNumberFormatInt( nOldFormat ); - } - return bRet; -} - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -void GraphicDescriptor::ImpConstruct() -{ - nFormat = GFF_NOT; - nBitsPerPixel = 0; - nPlanes = 0; - bCompressed = FALSE; -} - - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectBMP( SvStream& rStm, BOOL bExtendedInfo ) -{ - UINT16 nTemp16; - BOOL bRet = FALSE; - sal_Int32 nStmPos = rStm.Tell(); - - rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); - rStm >> nTemp16; - - // OS/2-BitmapArray - if ( nTemp16 == 0x4142 ) - { - rStm.SeekRel( 0x0c ); - rStm >> nTemp16; - } - - // Bitmap - if ( nTemp16 == 0x4d42 ) - { - nFormat = GFF_BMP; - bRet = TRUE; - - if ( bExtendedInfo ) - { - UINT32 nTemp32; - UINT32 nCompression; - - // bis zur ersten Information - rStm.SeekRel( 0x10 ); - - // PixelBreite auslesen - rStm >> nTemp32; - aPixSize.Width() = nTemp32; - - // PixelHoehe auslesen - rStm >> nTemp32; - aPixSize.Height() = nTemp32; - - // Planes auslesen - rStm >> nTemp16; - nPlanes = nTemp16; - - // BitCount auslesen - rStm >> nTemp16; - nBitsPerPixel = nTemp16; - - // Compression auslesen - rStm >> nTemp32; - bCompressed = ( ( nCompression = nTemp32 ) > 0 ); - - // logische Breite - rStm.SeekRel( 4 ); - rStm >> nTemp32; - if ( nTemp32 ) - aLogSize.Width() = ( aPixSize.Width() * 100000 ) / nTemp32; - - // logische Hoehe - rStm >> nTemp32; - if ( nTemp32 ) - aLogSize.Height() = ( aPixSize.Height() * 100000 ) / nTemp32; - - // Wir wollen noch etwas feiner differenzieren und - // auf sinnvolle Werte ueberpruefen ( Bug-Id #29001 ) - if ( ( nBitsPerPixel > 24 ) || ( nCompression > 3 ) ) - { - nFormat = GFF_NOT; - bRet = FALSE; - } - } - } - rStm.Seek( nStmPos ); - return bRet; -} - - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectGIF( SvStream& rStm, BOOL bExtendedInfo ) -{ - UINT32 n32; - UINT16 n16; - BOOL bRet = FALSE; - BYTE cByte; - - sal_Int32 nStmPos = rStm.Tell(); - rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); - rStm >> n32; - - if ( n32 == 0x38464947 ) - { - rStm >> n16; - if ( ( n16 == 0x6137 ) || ( n16 == 0x6139 ) ) - { - nFormat = GFF_GIF; - bRet = TRUE; - - if ( bExtendedInfo ) - { - UINT16 nTemp16; - - // PixelBreite auslesen - rStm >> nTemp16; - aPixSize.Width() = nTemp16; - - // PixelHoehe auslesen - rStm >> nTemp16; - aPixSize.Height() = nTemp16; - - // Bits/Pixel auslesen - rStm >> cByte; - nBitsPerPixel = ( ( cByte & 112 ) >> 4 ) + 1; - } - } - } - rStm.Seek( nStmPos ); - return bRet; -} - - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -// returns the next jpeg marker, a return value of 0 represents an error -sal_uInt8 ImpDetectJPG_GetNextMarker( SvStream& rStm ) -{ - sal_uInt8 nByte; - do - { - do - { - rStm >> nByte; - if ( rStm.IsEof() || rStm.GetError() ) // as 0 is not allowed as marker, - return 0; // we can use it as errorcode - } - while ( nByte != 0xff ); - do - { - rStm >> nByte; - if ( rStm.IsEof() || rStm.GetError() ) - return 0; - } - while( nByte == 0xff ); - } - while( nByte == 0 ); // 0xff00 represents 0xff and not a marker, - // the marker detection has to be restartet. - return nByte; -} - -BOOL GraphicDescriptor::ImpDetectJPG( SvStream& rStm, BOOL bExtendedInfo ) -{ - UINT32 nTemp32; - BOOL bRet = FALSE; - - sal_Int32 nStmPos = rStm.Tell(); - - rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); - rStm >> nTemp32; - - // compare upper 24 bits - if( 0xffd8ff00 == ( nTemp32 & 0xffffff00 ) ) - { - nFormat = GFF_JPG; - bRet = TRUE; - - if ( bExtendedInfo ) - { - rStm.SeekRel( -2 ); - - sal_uInt32 nError( rStm.GetError() ); - - sal_Bool bScanFailure = sal_False; - sal_Bool bScanFinished = sal_False; - - while( !bScanFailure && !bScanFinished && !rStm.IsEof() && !rStm.GetError() ) - { - sal_uInt8 nMarker = ImpDetectJPG_GetNextMarker( rStm ); - switch( nMarker ) - { - // fixed size marker, not having a two byte length parameter - case 0xd0 : // RST0 - case 0xd1 : - case 0xd2 : - case 0xd3 : - case 0xd4 : - case 0xd5 : - case 0xd6 : - case 0xd7 : // RST7 - case 0x01 : // TEM - break; - - case 0xd8 : // SOI (has already been checked, there should not be a second one) - case 0x00 : // marker is invalid, we should stop now - bScanFailure = sal_True; - break; - - case 0xd9 : // EOI - bScanFinished = sal_True; - break; - - // per default we assume marker segments conaining a length parameter - default : - { - sal_uInt16 nLength; - rStm >> nLength; - - if ( nLength < 2 ) - bScanFailure = sal_True; - else - { - sal_uInt32 nNextMarkerPos = rStm.Tell() + nLength - 2; - switch( nMarker ) - { - case 0xe0 : // APP0 Marker - { - if ( nLength == 16 ) - { - sal_Int32 nIdentifier; - rStm >> nIdentifier; - if ( nIdentifier == 0x4a464946 ) // JFIF Identifier - { - sal_uInt8 nStringTerminator; - sal_uInt8 nMajorRevision; - sal_uInt8 nMinorRevision; - sal_uInt8 nUnits; - sal_uInt16 nHorizontalResolution; - sal_uInt16 nVerticalResolution; - sal_uInt8 nHorzThumbnailPixelCount; - sal_uInt8 nVertThumbnailPixelCount; - - rStm >> nStringTerminator - >> nMajorRevision - >> nMinorRevision - >> nUnits - >> nHorizontalResolution - >> nVerticalResolution - >> nHorzThumbnailPixelCount - >> nVertThumbnailPixelCount; - - // setting the logical size - if ( nUnits && nHorizontalResolution && nVerticalResolution ) - { - MapMode aMap; - aMap.SetMapUnit( nUnits == 1 ? MAP_INCH : MAP_CM ); - aMap.SetScaleX( Fraction( 1, nHorizontalResolution ) ); - aMap.SetScaleY( Fraction( 1, nVerticalResolution ) ); - aLogSize = OutputDevice::LogicToLogic( aPixSize, aMap, MapMode( MAP_100TH_MM ) ); - } - } - } - } - break; - - // Start of Frame Markers - case 0xc0 : // SOF0 - case 0xc1 : // SOF1 - case 0xc2 : // SOF2 - case 0xc3 : // SOF3 - case 0xc5 : // SOF5 - case 0xc6 : // SOF6 - case 0xc7 : // SOF7 - case 0xc9 : // SOF9 - case 0xca : // SOF10 - case 0xcb : // SOF11 - case 0xcd : // SOF13 - case 0xce : // SOF14 - case 0xcf : // SOF15 - { - sal_uInt8 nSamplePrecision; - sal_uInt16 nNumberOfLines; - sal_uInt16 nSamplesPerLine; - sal_uInt8 nNumberOfImageComponents; - sal_uInt8 nComponentsIdentifier; - sal_uInt8 nHorizontalSamplingFactor; - sal_uInt8 nVerticalSamplingFactor; - sal_uInt8 nQuantizationTableDestinationSelector; - rStm >> nSamplePrecision - >> nNumberOfLines - >> nSamplesPerLine - >> nNumberOfImageComponents - >> nComponentsIdentifier - >> nHorizontalSamplingFactor - >> nQuantizationTableDestinationSelector; - nVerticalSamplingFactor = nHorizontalSamplingFactor & 0xf; - nHorizontalSamplingFactor >>= 4; - - aPixSize.Height() = nNumberOfLines; - aPixSize.Width() = nSamplesPerLine; - nBitsPerPixel = ( nNumberOfImageComponents == 3 ? 24 : nNumberOfImageComponents == 1 ? 8 : 0 ); - nPlanes = 1; - - bScanFinished = sal_True; - } - break; - } - rStm.Seek( nNextMarkerPos ); - } - } - break; - } - } - rStm.SetError( nError ); - } - } - rStm.Seek( nStmPos ); - return bRet; -} - - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectPCD( SvStream& rStm, BOOL ) -{ - BOOL bRet = FALSE; - - sal_Int32 nStmPos = rStm.Tell(); - rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); - - UINT32 nTemp32; - UINT16 nTemp16; - BYTE cByte; - - rStm.SeekRel( 2048 ); - rStm >> nTemp32; - rStm >> nTemp16; - rStm >> cByte; - - if ( ( nTemp32 == 0x5f444350 ) && - ( nTemp16 == 0x5049 ) && - ( cByte == 0x49 ) ) - { - nFormat = GFF_PCD; - bRet = TRUE; - } - rStm.Seek( nStmPos ); - return bRet; -} - - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectPCX( SvStream& rStm, BOOL bExtendedInfo ) -{ - // ! Because 0x0a can be interpreted as LF too ... - // we cant be shure that this special sign represent a PCX file only. - // Every Ascii file is possible here :-( - // We must detect the whole header. - bExtendedInfo = TRUE; - - BOOL bRet = FALSE; - BYTE cByte; - - sal_Int32 nStmPos = rStm.Tell(); - rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); - rStm >> cByte; - - if ( cByte == 0x0a ) - { - nFormat = GFF_PCX; - bRet = TRUE; - - if ( bExtendedInfo ) - { - UINT16 nTemp16; - USHORT nXmin; - USHORT nXmax; - USHORT nYmin; - USHORT nYmax; - USHORT nDPIx; - USHORT nDPIy; - - - rStm.SeekRel( 1 ); - - // Kompression lesen - rStm >> cByte; - bCompressed = ( cByte > 0 ); - - bRet = (cByte==0 || cByte ==1); - - // Bits/Pixel lesen - rStm >> cByte; - nBitsPerPixel = cByte; - - // Bildabmessungen - rStm >> nTemp16; - nXmin = nTemp16; - rStm >> nTemp16; - nYmin = nTemp16; - rStm >> nTemp16; - nXmax = nTemp16; - rStm >> nTemp16; - nYmax = nTemp16; - - aPixSize.Width() = nXmax - nXmin + 1; - aPixSize.Height() = nYmax - nYmin + 1; - - // Aufloesung - rStm >> nTemp16; - nDPIx = nTemp16; - rStm >> nTemp16; - nDPIy = nTemp16; - - // logische Groesse setzen - MapMode aMap( MAP_INCH, Point(), - Fraction( 1, nDPIx ), Fraction( 1, nDPIy ) ); - aLogSize = OutputDevice::LogicToLogic( aPixSize, aMap, - MapMode( MAP_100TH_MM ) ); - - - // Anzahl Farbebenen - rStm.SeekRel( 49 ); - rStm >> cByte; - nPlanes = cByte; - - bRet = (nPlanes<=4); - } - } - - rStm.Seek( nStmPos ); - return bRet; -} - - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectPNG( SvStream& rStm, BOOL bExtendedInfo ) -{ - UINT32 nTemp32; - BOOL bRet = FALSE; - - sal_Int32 nStmPos = rStm.Tell(); - rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); - rStm >> nTemp32; - - if ( nTemp32 == 0x89504e47 ) - { - rStm >> nTemp32; - if ( nTemp32 == 0x0d0a1a0a ) - { - nFormat = GFF_PNG; - bRet = TRUE; - - if ( bExtendedInfo ) - { - BYTE cByte; - - // IHDR-Chunk - rStm.SeekRel( 8 ); - - // Breite einlesen - rStm >> nTemp32; - aPixSize.Width() = nTemp32; - - // Hoehe einlesen - rStm >> nTemp32; - aPixSize.Height() = nTemp32; - - // Bits/Pixel einlesen - rStm >> cByte; - nBitsPerPixel = cByte; - - // Planes immer 1; - // Kompression immer - nPlanes = 1; - bCompressed = TRUE; - - UINT32 nLen32; - - rStm.SeekRel( 8 ); - - // so lange ueberlesen, bis wir den pHYs-Chunk haben oder - // den Anfang der Bilddaten - rStm >> nLen32; - rStm >> nTemp32; - while( ( nTemp32 != 0x70485973 ) && ( nTemp32 != 0x49444154 ) ) - { - rStm.SeekRel( 4 + nLen32 ); - rStm >> nLen32; - rStm >> nTemp32; - } - - if ( nTemp32 == 0x70485973 ) - { - ULONG nXRes; - ULONG nYRes; - - // horizontale Aufloesung - rStm >> nTemp32; - nXRes = nTemp32; - - // vertikale Aufloesung - rStm >> nTemp32; - nYRes = nTemp32; - - // Unit einlesen - rStm >> cByte; - - if ( cByte ) - { - if ( nXRes ) - aLogSize.Width() = ( aPixSize.Width() * 100000 ) / - nTemp32; - - if ( nYRes ) - aLogSize.Height() = ( aPixSize.Height() * 100000 ) / - nTemp32; - } - } - } - } - } - rStm.Seek( nStmPos ); - return bRet; -} - - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectTIF( SvStream& rStm, BOOL bExtendedInfo ) -{ - BOOL bDetectOk = FALSE; - BOOL bRet = FALSE; - BYTE cByte1; - BYTE cByte2; - - sal_Int32 nStmPos = rStm.Tell(); - rStm >> cByte1; - rStm >> cByte2; - if ( cByte1 == cByte2 ) - { - if ( cByte1 == 0x49 ) - { - rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); - bDetectOk = TRUE; - } - else if ( cByte1 == 0x4d ) - { - rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); - bDetectOk = TRUE; - } - - if ( bDetectOk ) - { - UINT16 nTemp16; - - rStm >> nTemp16; - if ( nTemp16 == 0x2a ) - { - nFormat = GFF_TIF; - bRet = TRUE; - - if ( bExtendedInfo ) - { - ULONG nCount; - ULONG nMax = DATA_SIZE - 48; - UINT32 nTemp32; - BOOL bOk = FALSE; - - // Offset des ersten IFD einlesen - rStm >> nTemp32; - rStm.SeekRel( ( nCount = ( nTemp32 + 2 ) ) - 0x08 ); - - if ( nCount < nMax ) - { - // Tag's lesen, bis wir auf Tag256 ( Width ) treffen - // nicht mehr Bytes als DATA_SIZE lesen - rStm >> nTemp16; - while ( nTemp16 != 256 ) - { - bOk = nCount < nMax; - if ( !bOk ) - { - break; - } - rStm.SeekRel( 10 ); - rStm >> nTemp16; - nCount += 12; - } - - if ( bOk ) - { - // Breite lesen - rStm >> nTemp16; - rStm.SeekRel( 4 ); - if ( nTemp16 == 3 ) - { - rStm >> nTemp16; - aPixSize.Width() = nTemp16; - rStm.SeekRel( 2 ); - } - else - { - rStm >> nTemp32; - aPixSize.Width() = nTemp32; - } - nCount += 12; - - // Hoehe lesen - rStm.SeekRel( 2 ); - rStm >> nTemp16; - rStm.SeekRel( 4 ); - if ( nTemp16 == 3 ) - { - rStm >> nTemp16; - aPixSize.Height() = nTemp16; - rStm.SeekRel( 2 ); - } - else - { - rStm >> nTemp32; - aPixSize.Height() = nTemp32; - } - nCount += 12; - - // ggf. Bits/Pixel lesen - rStm >> nTemp16; - if ( nTemp16 == 258 ) - { - rStm.SeekRel( 6 ); - rStm >> nTemp16; - nBitsPerPixel = nTemp16; - rStm.SeekRel( 2 ); - nCount += 12; - } - else - rStm.SeekRel( -2 ); - - // ggf. Compression lesen - rStm >> nTemp16; - if ( nTemp16 == 259 ) - { - rStm.SeekRel( 6 ); - rStm >> nTemp16; - bCompressed = ( nTemp16 > 1 ); - rStm.SeekRel( 2 ); - nCount += 12; - } - else - rStm.SeekRel( -2 ); - } - } - } - } - } - } - rStm.Seek( nStmPos ); - return bRet; -} - - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectXBM( SvStream&, BOOL ) -{ - BOOL bRet = aPathExt.CompareToAscii( "xbm", 3 ) == COMPARE_EQUAL; - if (bRet) - nFormat = GFF_XBM; - - return bRet; -} - - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectXPM( SvStream&, BOOL ) -{ - BOOL bRet = aPathExt.CompareToAscii( "xpm", 3 ) == COMPARE_EQUAL; - if (bRet) - nFormat = GFF_XPM; - - return bRet; -} - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectPBM( SvStream& rStm, BOOL ) -{ - BOOL bRet = FALSE; - - // erst auf Datei Extension pruefen, da diese aussagekraeftiger ist - // als die 2 ID Bytes - - if ( aPathExt.CompareToAscii( "pbm", 3 ) == COMPARE_EQUAL ) - bRet = TRUE; - else - { - sal_Int32 nStmPos = rStm.Tell(); - BYTE nFirst, nSecond; - rStm >> nFirst >> nSecond; - if ( nFirst == 'P' && ( ( nSecond == '1' ) || ( nSecond == '4' ) ) ) - bRet = TRUE; - rStm.Seek( nStmPos ); - } - - if ( bRet ) - nFormat = GFF_PBM; - - return bRet; -} - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectPGM( SvStream& rStm, BOOL ) -{ - BOOL bRet = FALSE; - - if ( aPathExt.CompareToAscii( "pgm", 3 ) == COMPARE_EQUAL ) - bRet = TRUE; - else - { - BYTE nFirst, nSecond; - sal_Int32 nStmPos = rStm.Tell(); - rStm >> nFirst >> nSecond; - if ( nFirst == 'P' && ( ( nSecond == '2' ) || ( nSecond == '5' ) ) ) - bRet = TRUE; - rStm.Seek( nStmPos ); - } - - if ( bRet ) - nFormat = GFF_PGM; - - return bRet; -} - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectPPM( SvStream& rStm, BOOL ) -{ - BOOL bRet = FALSE; - - if ( aPathExt.CompareToAscii( "ppm", 3 ) == COMPARE_EQUAL ) - bRet = TRUE; - else - { - BYTE nFirst, nSecond; - sal_Int32 nStmPos = rStm.Tell(); - rStm >> nFirst >> nSecond; - if ( nFirst == 'P' && ( ( nSecond == '3' ) || ( nSecond == '6' ) ) ) - bRet = TRUE; - rStm.Seek( nStmPos ); - } - - if ( bRet ) - nFormat = GFF_PPM; - - return bRet; -} - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectRAS( SvStream& rStm, BOOL ) -{ - UINT32 nMagicNumber; - BOOL bRet = FALSE; - sal_Int32 nStmPos = rStm.Tell(); - rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); - rStm >> nMagicNumber; - if ( nMagicNumber == 0x59a66a95 ) - { - nFormat = GFF_RAS; - bRet = TRUE; - } - rStm.Seek( nStmPos ); - return bRet; -} - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectTGA( SvStream&, BOOL ) -{ - BOOL bRet = aPathExt.CompareToAscii( "tga", 3 ) == COMPARE_EQUAL; - if (bRet) - nFormat = GFF_TGA; - - return bRet; -} - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectPSD( SvStream& rStm, BOOL bExtendedInfo ) -{ - BOOL bRet = FALSE; - - UINT32 nMagicNumber; - sal_Int32 nStmPos = rStm.Tell(); - rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); - rStm >> nMagicNumber; - if ( nMagicNumber == 0x38425053 ) - { - UINT16 nVersion; - rStm >> nVersion; - if ( nVersion == 1 ) - { - bRet = TRUE; - if ( bExtendedInfo ) - { - UINT16 nChannels; - UINT32 nRows; - UINT32 nColumns; - UINT16 nDepth; - UINT16 nMode; - rStm.SeekRel( 6 ); // Pad - rStm >> nChannels >> nRows >> nColumns >> nDepth >> nMode; - if ( ( nDepth == 1 ) || ( nDepth == 8 ) || ( nDepth == 16 ) ) - { - nBitsPerPixel = ( nDepth == 16 ) ? 8 : nDepth; - switch ( nChannels ) - { - case 4 : - case 3 : - nBitsPerPixel = 24; - case 2 : - case 1 : - aPixSize.Width() = nColumns; - aPixSize.Height() = nRows; - break; - default: - bRet = FALSE; - } - } - else - bRet = FALSE; - } - } - } - - if ( bRet ) - nFormat = GFF_PSD; - rStm.Seek( nStmPos ); - return bRet; -} - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectEPS( SvStream& rStm, BOOL ) -{ - // es wird die EPS mit Vorschaubild Variante und die Extensionuebereinstimmung - // geprueft - - sal_uInt32 nFirstLong; - sal_uInt8 nFirstBytes[20]; - BOOL bRet = FALSE; - - sal_Int32 nStmPos = rStm.Tell(); - rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); - rStm >> nFirstLong; - rStm.SeekRel( -4 ); - rStm.Read( &nFirstBytes, 20 ); - - if ( ( nFirstLong == 0xC5D0D3C6 ) || ( aPathExt.CompareToAscii( "eps", 3 ) == COMPARE_EQUAL ) || - ( ImplSearchEntry( nFirstBytes, (sal_uInt8*)"%!PS-Adobe", 10, 10 ) - && ImplSearchEntry( &nFirstBytes[15], (sal_uInt8*)"EPS", 3, 3 ) ) ) - { - nFormat = GFF_EPS; - bRet = TRUE; - } - rStm.Seek( nStmPos ); - return bRet; -} - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectDXF( SvStream&, BOOL ) -{ - BOOL bRet = aPathExt.CompareToAscii( "dxf", 3 ) == COMPARE_EQUAL; - if (bRet) - nFormat = GFF_DXF; - - return bRet; -} - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectMET( SvStream&, BOOL ) -{ - BOOL bRet = aPathExt.CompareToAscii( "met", 3 ) == COMPARE_EQUAL; - if (bRet) - nFormat = GFF_MET; - - return bRet; -} - - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectPCT( SvStream& rStm, BOOL ) -{ - BOOL bRet = aPathExt.CompareToAscii( "pct", 3 ) == COMPARE_EQUAL; - if (bRet) - nFormat = GFF_PCT; - else - { - sal_Int32 nStmPos = rStm.Tell(); - - BYTE sBuf[4]; - - rStm.SeekRel( 522 ); - rStm.Read( sBuf, 3 ); - - if( !rStm.GetError() ) - { - if ( ( sBuf[0] == 0x00 ) && ( sBuf[1] == 0x11 ) && - ( ( sBuf[2] == 0x01 ) || ( sBuf[2] == 0x02 ) ) ) - { - bRet = TRUE; - nFormat = GFF_PCT; - } - } - rStm.Seek( nStmPos ); - } - - return bRet; -} - - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectSGF( SvStream& rStm, BOOL ) -{ - BOOL bRet = FALSE; - if( aPathExt.CompareToAscii( "sgf", 3 ) == COMPARE_EQUAL ) - bRet = TRUE; - else - { - sal_Int32 nStmPos = rStm.Tell(); - - BYTE nFirst, nSecond; - - rStm >> nFirst >> nSecond; - - if( nFirst == 'J' && nSecond == 'J' ) - bRet = TRUE; - - rStm.Seek( nStmPos ); - } - - if( bRet ) - nFormat = GFF_SGF; - - return bRet; -} - - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectSGV( SvStream&, BOOL ) -{ - BOOL bRet = aPathExt.CompareToAscii( "sgv", 3 ) == COMPARE_EQUAL; - if (bRet) - nFormat = GFF_SGV; - - return bRet; -} - - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectSVM( SvStream& rStm, BOOL bExtendedInfo ) -{ - UINT32 n32; - BOOL bRet = FALSE; - BYTE cByte; - - sal_Int32 nStmPos = rStm.Tell(); - rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); - rStm >> n32; - if ( n32 == 0x44475653 ) - { - rStm >> cByte; - if ( cByte == 0x49 ) - { - nFormat = GFF_SVM; - bRet = TRUE; - - if ( bExtendedInfo ) - { - UINT32 nTemp32; - UINT16 nTemp16; - - rStm.SeekRel( 0x04 ); - - // Breite auslesen - rStm >> nTemp32; - aLogSize.Width() = nTemp32; - - // Hoehe auslesen - rStm >> nTemp32; - aLogSize.Height() = nTemp32; - - // Map-Unit auslesen und PrefSize ermitteln - rStm >> nTemp16; - aLogSize = OutputDevice::LogicToLogic( aLogSize, - MapMode( (MapUnit) nTemp16 ), - MapMode( MAP_100TH_MM ) ); - } - } - } - else - { - rStm.SeekRel( -4L ); - rStm >> n32; - - if( n32 == 0x4D4C4356 ) - { - UINT16 nTmp16; - - rStm >> nTmp16; - - if( nTmp16 == 0x4654 ) - { - nFormat = GFF_SVM; - bRet = TRUE; - - if( bExtendedInfo ) - { - MapMode aMapMode; - - rStm.SeekRel( 0x06 ); - rStm >> aMapMode; - rStm >> aLogSize; - aLogSize = OutputDevice::LogicToLogic( aLogSize, aMapMode, MapMode( MAP_100TH_MM ) ); - } - } - } - } - rStm.Seek( nStmPos ); - return bRet; -} - - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectWMF( SvStream&, BOOL ) -{ - BOOL bRet = aPathExt.CompareToAscii( "wmf",3 ) == COMPARE_EQUAL; - if (bRet) - nFormat = GFF_WMF; - - return bRet; -} - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::ImpDetectEMF( SvStream&, BOOL ) -{ - BOOL bRet = aPathExt.CompareToAscii( "emf", 3 ) == COMPARE_EQUAL; - if (bRet) - nFormat = GFF_EMF; - - return bRet; -} - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -String GraphicDescriptor::GetImportFormatShortName( sal_uInt16 nFormat ) -{ - ByteString aKeyName; - - switch( nFormat ) - { - case( GFF_BMP ) : aKeyName = "bmp"; break; - case( GFF_GIF ) : aKeyName = "gif"; break; - case( GFF_JPG ) : aKeyName = "jpg"; break; - case( GFF_PCD ) : aKeyName = "pcd"; break; - case( GFF_PCX ) : aKeyName = "pcx"; break; - case( GFF_PNG ) : aKeyName = "png"; break; - case( GFF_XBM ) : aKeyName = "xbm"; break; - case( GFF_XPM ) : aKeyName = "xpm"; break; - case( GFF_PBM ) : aKeyName = "pbm"; break; - case( GFF_PGM ) : aKeyName = "pgm"; break; - case( GFF_PPM ) : aKeyName = "ppm"; break; - case( GFF_RAS ) : aKeyName = "ras"; break; - case( GFF_TGA ) : aKeyName = "tga"; break; - case( GFF_PSD ) : aKeyName = "psd"; break; - case( GFF_EPS ) : aKeyName = "eps"; break; - case( GFF_TIF ) : aKeyName = "tif"; break; - case( GFF_DXF ) : aKeyName = "dxf"; break; - case( GFF_MET ) : aKeyName = "met"; break; - case( GFF_PCT ) : aKeyName = "pct"; break; - case( GFF_SGF ) : aKeyName = "sgf"; break; - case( GFF_SGV ) : aKeyName = "sgv"; break; - case( GFF_SVM ) : aKeyName = "svm"; break; - case( GFF_WMF ) : aKeyName = "wmf"; break; - case( GFF_EMF ) : aKeyName = "emf"; break; - } - - return String( aKeyName, RTL_TEXTENCODING_ASCII_US ); -} - - diff --git a/svtools/source/filter.vcl/filter/sgf.ini b/svtools/source/filter.vcl/filter/sgf.ini deleted file mode 100644 index 7444e40c8836..000000000000 --- a/svtools/source/filter.vcl/filter/sgf.ini +++ /dev/null @@ -1,118 +0,0 @@ -#Family : (Roman,Swiss,Modern,Script,Decora); -#CharSet : (Ansi,IBMPC,Mac,Symbol,System); Default is System -#Attribute: (Bold,Ital,Sans,Serf,Fixd); - -[SGV Fonts fuer StarView] -#IF-ID Fontname Attribute SV-Fam ChSet Width FontName - 3848=(ITC Zapf Dingbats) Decora () - 5720=(Symbol) Serf Decora Symbol () - 5721=(Symbol) Bold Serf Decora Symbol () - 5723=(Symbol Sans) Sans Decora Symbol () - 5724=(Symbol Sans) Bold Sans Decora Symbol () - 90133=(Dom Casual) Sans Script () - 90326=(Brush) Bold Ital Serf Script () - 90349=(Park Avenue) Ital Serf Script () - 90508=(Uncial) Sans Roman () - 91118=(Antique Olive) Bold Sans Swiss () - 91119=(Antique Olive) Sans Swiss () - 91120=(Antique Olive Compact) Bold Sans Swiss () - 91335=(ITC Benguiat) Bold Serf Roman () - 91336=(ITC Benguiat) Bold Ital Serf Roman () - 91846=(Antique Olive) Ital Sans Roman () -#92500=(CG Times) Serf Roman () -#92501=(CG Times) Ital Serf Roman () -#92504=(CG Times) Bold Serf Roman () -#92505=(CG Times) Bold Ital Serf Roman () -#93950=(Courier) Serf Fixd Modern () -#93951=(Courier) Ital Serf Fixd Modern () -#93952=(Courier) Bold Serf Fixd Modern () -#93953=(Courier) Bold Ital Serf Fixd Modern () -#94021=(Univers) Sans Swiss () -#94022=(Univers) Ital Sans Swiss () -#94023=(Univers) Bold Sans Swiss () -#94024=(Univers) Bold Ital Sans Swiss () -102004=(Avanti) Bold Ital Sans Swiss () -102005=(Avanti) Ital Sans Swiss () -102007=(Booklet) Bold Sans Roman () -102008=(Booklet) Bold Ital Sans Roman () -102009=(Booklet) Ital Sans Roman () -102010=(Centuri) Sans Roman () -102011=(Centuri) Bold Sans Roman () -102012=(Centuri) Bold Ital Sans Roman () -102013=(Centuri) Ital Sans Roman () -102014=(Paltus) Bold Sans Roman () -102015=(Paltus) Sans Roman () -102016=(Paltus) Bold Ital Sans Roman () -102017=(Paltus) Ital Sans Roman () -102018=(Sans) Sans Swiss () -102019=(Sans) Bold Sans Swiss () -102020=(Sans) Bold Ital Sans Swiss () -102021=(Sans) Ital Sans Swiss () -102022=(SansCondensed) Sans Swiss () -102023=(SansCondensed) Bold Sans Swiss () -102024=(SansCondensed) Bold Ital Sans Swiss () -102025=(SansCondensed) Ital Sans Swiss () -102026=(PS-Roman) Sans Roman () -102027=(PS-Roman) Bold Sans Roman () -102028=(PS-Roman) Bold Ital Sans Roman () -102029=(PS-Roman) Ital Sans Roman () -200111=(Chalenge) Sans () -200112=(Chalenge) Bold Sans () -200113=(Chalenge) Ital Sans () -200114=(Chalenge) Bold Ital Sans () -200121=(Office) Sans () -200122=(Office) Bold Sans () -200123=(Office) Ital Sans () -200124=(Office) Bold Ital Sans () -200131=(Milano) Sans () -200132=(Milano) Bold Sans () -200133=(Milano) Ital Sans () -200134=(Milano) Bold Ital Sans () -200141=(Atlantic) Sans Roman () -200142=(Atlantic) Bold Sans Roman () -200143=(Atlantic) Ital Sans Roman () -200144=(Atlantic) Bold Ital Sans Roman () -200151=(Pentagon) Sans () -200152=(Pentagon) Bold Sans () -200153=(Pentagon) Ital Sans () -200154=(Pentagon) Bold Ital Sans () -200161=(Classico) Sans () -200162=(Classico) Bold Sans () -200163=(Classico) Ital Sans () -200164=(Classico) Bold Ital Sans () -200211=(Westcost) Sans () -200212=(Westcost) Bold Sans () -200213=(Westcost) Ital Sans () -200214=(Westcost) Bold Ital Sans () -200221=(Finish) Sans () -200222=(Finish) Bold Sans () -200223=(Finish) Ital Sans () -200224=(Finish) Bold Ital Sans () -200231=(Classic) Sans () -200232=(Classic) Bold Sans () -200233=(Classic) Ital Sans () -200234=(Classic) Bold Ital Sans () -200241=(Hilton) Sans () -200242=(Hilton) Bold Sans () -200243=(Hilton) Ital Sans () -200244=(Hilton) Bold Ital Sans () -200251=(Progress) Sans () -200252=(Progress) Bold Sans () -200253=(Progress) Ital Sans () -200254=(Progress) Bold Ital Sans () -200261=(PrestigeElite) Sans () -200262=(PrestigeElite) Bold Sans () -200263=(PrestigeElite) Ital Sans () -200271=(Ovetti) Bold Sans () -200272=(Ovetti) Sans () -200301=(Cescendo) Sans () -200302=(Funky) Sans Decora () -200303=(Speed) Sans Decora () -200304=(Skyline) Sans Decora () -200305=(Calculator) Sans Decora () -200306=(Xpress) Sans Decora () -200307=(Console) Sans Decora () -200308=(Paisley) Sans () -200309=(Nova) Sans () -200310=(New York) Sans Decora () -200311=(Shanghai) Sans Decora () diff --git a/svtools/source/filter.vcl/filter/sgfbram.cxx b/svtools/source/filter.vcl/filter/sgfbram.cxx deleted file mode 100644 index 3d1a71f5a2db..000000000000 --- a/svtools/source/filter.vcl/filter/sgfbram.cxx +++ /dev/null @@ -1,662 +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_svtools.hxx" - -#include -#include -#include -#include -#include -#include -#include "sgffilt.hxx" -#include "sgfbram.hxx" - -/************************************************************************* -|* -|* operator>>( SvStream&, SgfHeader& ) -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -SvStream& operator>>(SvStream& rIStream, SgfHeader& rHead) -{ - rIStream.Read((char*)&rHead.Magic,SgfHeaderSize); -#if defined OSL_BIGENDIAN - rHead.Magic =SWAPSHORT(rHead.Magic ); - rHead.Version=SWAPSHORT(rHead.Version); - rHead.Typ =SWAPSHORT(rHead.Typ ); - rHead.Xsize =SWAPSHORT(rHead.Xsize ); - rHead.Ysize =SWAPSHORT(rHead.Ysize ); - rHead.Xoffs =SWAPSHORT(rHead.Xoffs ); - rHead.Yoffs =SWAPSHORT(rHead.Yoffs ); - rHead.Planes =SWAPSHORT(rHead.Planes ); - rHead.SwGrCol=SWAPSHORT(rHead.SwGrCol); - rHead.OfsLo =SWAPSHORT(rHead.OfsLo ); - rHead.OfsHi =SWAPSHORT(rHead.OfsHi ); -#endif - return rIStream; -} - - -/************************************************************************* -|* -|* SgfHeader::ChkMagic() -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -BOOL SgfHeader::ChkMagic() -{ return Magic=='J'*256+'J'; } - -UINT32 SgfHeader::GetOffset() -{ return UINT32(OfsLo)+0x00010000*UINT32(OfsHi); } - - -/************************************************************************* -|* -|* operator>>( SvStream&, SgfEntry& ) -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -SvStream& operator>>(SvStream& rIStream, SgfEntry& rEntr) -{ - rIStream.Read((char*)&rEntr.Typ,SgfEntrySize); -#if defined OSL_BIGENDIAN - rEntr.Typ =SWAPSHORT(rEntr.Typ ); - rEntr.iFrei=SWAPSHORT(rEntr.iFrei); - rEntr.lFreiLo=SWAPSHORT (rEntr.lFreiLo); - rEntr.lFreiHi=SWAPSHORT (rEntr.lFreiHi); - rEntr.OfsLo=SWAPSHORT(rEntr.OfsLo); - rEntr.OfsHi=SWAPSHORT(rEntr.OfsHi); -#endif - return rIStream; -} - -UINT32 SgfEntry::GetOffset() -{ return UINT32(OfsLo)+0x00010000*UINT32(OfsHi); } - - -/************************************************************************* -|* -|* operator>>( SvStream&, SgfVector& ) -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -SvStream& operator>>(SvStream& rIStream, SgfVector& rVect) -{ - rIStream.Read((char*)&rVect,sizeof(rVect)); -#if defined OSL_BIGENDIAN - rVect.Flag =SWAPSHORT(rVect.Flag ); - rVect.x =SWAPSHORT(rVect.x ); - rVect.y =SWAPSHORT(rVect.y ); - rVect.OfsLo=SWAPLONG (rVect.OfsLo); - rVect.OfsHi=SWAPLONG (rVect.OfsHi); -#endif - return rIStream; -} - - -/************************************************************************* -|* -|* operator<<( SvStream&, BmpFileHeader& ) -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -SvStream& operator<<(SvStream& rOStream, BmpFileHeader& rHead) -{ -#if defined OSL_BIGENDIAN - rHead.Typ =SWAPSHORT(rHead.Typ ); - rHead.SizeLo =SWAPSHORT(rHead.SizeLo ); - rHead.SizeHi =SWAPSHORT(rHead.SizeHi ); - rHead.Reserve1=SWAPSHORT(rHead.Reserve1); - rHead.Reserve2=SWAPSHORT(rHead.Reserve2); - rHead.OfsLo =SWAPSHORT(rHead.OfsLo ); - rHead.OfsHi =SWAPSHORT(rHead.OfsHi ); -#endif - rOStream.Write((char*)&rHead,sizeof(rHead)); -#if defined OSL_BIGENDIAN - rHead.Typ =SWAPSHORT(rHead.Typ ); - rHead.SizeLo =SWAPSHORT(rHead.SizeLo ); - rHead.SizeHi =SWAPSHORT(rHead.SizeHi ); - rHead.Reserve1=SWAPSHORT(rHead.Reserve1); - rHead.Reserve2=SWAPSHORT(rHead.Reserve2); - rHead.OfsLo =SWAPSHORT(rHead.OfsLo ); - rHead.OfsHi =SWAPSHORT(rHead.OfsHi ); -#endif - return rOStream; -} - -void BmpFileHeader::SetSize(UINT32 Size) -{ - SizeLo=UINT16(Size & 0x0000FFFF); - SizeHi=UINT16((Size & 0xFFFF0000)>>16); -} - -void BmpFileHeader::SetOfs(UINT32 Ofs) -{ - OfsLo=UINT16(Ofs & 0x0000FFFF); - OfsHi=UINT16((Ofs & 0xFFFF0000)>>16); -} - -UINT32 BmpFileHeader::GetOfs() -{ - return UINT32(OfsLo)+0x00010000*UINT32(OfsHi); -} - -/************************************************************************* -|* -|* operator<<( SvStream&, BmpInfoHeader& ) -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -SvStream& operator<<(SvStream& rOStream, BmpInfoHeader& rInfo) -{ -#if defined OSL_BIGENDIAN - rInfo.Size =SWAPLONG (rInfo.Size ); - rInfo.Width =SWAPLONG (rInfo.Width ); - rInfo.Hight =SWAPLONG (rInfo.Hight ); - rInfo.Planes =SWAPSHORT(rInfo.Planes ); - rInfo.PixBits =SWAPSHORT(rInfo.PixBits ); - rInfo.Compress=SWAPLONG (rInfo.Compress); - rInfo.ImgSize =SWAPLONG (rInfo.ImgSize ); - rInfo.xDpmm =SWAPLONG (rInfo.xDpmm ); - rInfo.yDpmm =SWAPLONG (rInfo.yDpmm ); - rInfo.ColUsed =SWAPLONG (rInfo.ColUsed ); - rInfo.ColMust =SWAPLONG (rInfo.ColMust ); -#endif - rOStream.Write((char*)&rInfo,sizeof(rInfo)); -#if defined OSL_BIGENDIAN - rInfo.Size =SWAPLONG (rInfo.Size ); - rInfo.Width =SWAPLONG (rInfo.Width ); - rInfo.Hight =SWAPLONG (rInfo.Hight ); - rInfo.Planes =SWAPSHORT(rInfo.Planes ); - rInfo.PixBits =SWAPSHORT(rInfo.PixBits ); - rInfo.Compress=SWAPLONG (rInfo.Compress); - rInfo.ImgSize =SWAPLONG (rInfo.ImgSize ); - rInfo.xDpmm =SWAPLONG (rInfo.xDpmm ); - rInfo.yDpmm =SWAPLONG (rInfo.yDpmm ); - rInfo.ColUsed =SWAPLONG (rInfo.ColUsed ); - rInfo.ColMust =SWAPLONG (rInfo.ColMust ); -#endif - return rOStream; -} - - -/************************************************************************* -|* -|* operator<<( SvStream&, RGBQuad& ) -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -SvStream& operator<<(SvStream& rOStream, const RGBQuad& rQuad) -{ - rOStream.Write((char*)&rQuad,sizeof(rQuad)); - return rOStream; -} - - -//////////////////////////////////////////////////////////////////////////////////////////////////// -// PcxExpand /////////////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////////////////////// - -class PcxExpand -{ -private: - USHORT Count; - BYTE Data; -public: - PcxExpand() { Count=0; } - BYTE GetByte(SvStream& rInp); -}; - -BYTE PcxExpand::GetByte(SvStream& rInp) -{ - if (Count>0) { - Count--; - } else { - rInp.Read((char*)&Data,1); - if ((Data & 0xC0) == 0xC0) { - Count=(Data & 0x3F) -1; - rInp.Read((char*)&Data,1); - } - } - return Data; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////// -// SgfBMapFilter /////////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////////////////////// - - -/************************************************************************* -|* -|* SgfFilterBmp() -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -BOOL SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&) -{ - BmpFileHeader aBmpHead; - BmpInfoHeader aBmpInfo; - USHORT nWdtInp=(rHead.Xsize+7)/8; // Breite der Input-Bitmap in Bytes - USHORT nWdtOut; // Breite der Output-Bitmap in Bytes - USHORT nColors; // Anzahl der Farben (1,16,256) - USHORT nColBits; // Anzahl der Bits/Pixel (2, 4, 8) - USHORT i,j,k; // Spaltenzaehler, Zeilenzaehler, Planezaehler - USHORT a,b; // Hilfsvariable - BYTE pl1 = 0,pl2= 0; // Masken fuer die Planes - BYTE* pBuf=NULL; // Buffer fuer eine Pixelzeile - PcxExpand aPcx; - ULONG nOfs; - BYTE cRGB[4]; - - if (rHead.Planes<=1) nColBits=1; else nColBits=4; if (rHead.Typ==4) nColBits=8; - nColors=1<>aHead; - if (aHead.ChkMagic() && (aHead.Typ==SgfBitImag0 || aHead.Typ==SgfBitImag1 || - aHead.Typ==SgfBitImag2 || aHead.Typ==SgfBitImgMo)) { - nNext=aHead.GetOffset(); - while (nNext && !bRdFlag && !rInp.GetError() && !rOut.GetError()) { - rInp.Seek(nFileStart+nNext); - rInp>>aEntr; - nNext=aEntr.GetOffset(); - if (aEntr.Typ==aHead.Typ) { - bRdFlag=TRUE; - switch(aEntr.Typ) { - case SgfBitImag0: - case SgfBitImag1: - case SgfBitImag2: - case SgfBitImgMo: bRet=SgfFilterBMap(rInp,rOut,aHead,aEntr); break; - } - } - } // while(nNext) - } - if (rInp.GetError()) bRet=FALSE; - return(bRet); -} - - -//////////////////////////////////////////////////////////////////////////////////////////////////// -// SgfVectFilter /////////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////////////////////// - -// Fuer StarDraw Embedded SGF-Vector -long SgfVectXofs=0; -long SgfVectYofs=0; -long SgfVectXmul=0; -long SgfVectYmul=0; -long SgfVectXdiv=0; -long SgfVectYdiv=0; -BOOL SgfVectScal=FALSE; - -//////////////////////////////////////////////////////////// -// Hpgl2SvFarbe //////////////////////////////////////////// -//////////////////////////////////////////////////////////// - -Color Hpgl2SvFarbe( BYTE nFarb ) -{ - ULONG nColor = COL_BLACK; - - switch (nFarb & 0x07) { - case 0: nColor=COL_WHITE; break; - case 1: nColor=COL_YELLOW; break; - case 2: nColor=COL_LIGHTMAGENTA; break; - case 3: nColor=COL_LIGHTRED; break; - case 4: nColor=COL_LIGHTCYAN; break; - case 5: nColor=COL_LIGHTGREEN; break; - case 6: nColor=COL_LIGHTBLUE; break; - case 7: nColor=COL_BLACK; break; - } - Color aColor( nColor ); - return aColor; -} - -/************************************************************************* -|* -|* SgfFilterVect() -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -BOOL SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMtf) -{ - VirtualDevice aOutDev; - SgfVector aVect; - BYTE nFarb; - BYTE nFrb0=7; - BYTE nLTyp; - BYTE nOTyp; - BOOL bEoDt=FALSE; - BOOL bPDwn=FALSE; - Point aP0(0,0); - Point aP1(0,0); - String Msg; - USHORT RecNr=0; - - rMtf.Record(&aOutDev); - aOutDev.SetLineColor(Color(COL_BLACK)); - aOutDev.SetFillColor(Color(COL_BLACK)); - - while (!bEoDt && !rInp.GetError()) { - rInp>>aVect; RecNr++; - nFarb=(BYTE) (aVect.Flag & 0x000F); - nLTyp=(BYTE)((aVect.Flag & 0x00F0) >>4); - nOTyp=(BYTE)((aVect.Flag & 0x0F00) >>8); - bEoDt=(aVect.Flag & 0x4000) !=0; - bPDwn=(aVect.Flag & 0x8000) !=0; - - long x=aVect.x-rHead.Xoffs; - long y=rHead.Ysize-(aVect.y-rHead.Yoffs); - if (SgfVectScal) { - if (SgfVectXdiv==0) SgfVectXdiv=rHead.Xsize; - if (SgfVectYdiv==0) SgfVectYdiv=rHead.Ysize; - if (SgfVectXdiv==0) SgfVectXdiv=1; - if (SgfVectYdiv==0) SgfVectYdiv=1; - x=SgfVectXofs+ x *SgfVectXmul /SgfVectXdiv; - y=SgfVectYofs+ y *SgfVectXmul /SgfVectYdiv; - } - aP1=Point(x,y); - if (!bEoDt && !rInp.GetError()) { - if (bPDwn && nLTyp<=6) { - switch(nOTyp) { - case 1: if (nFarb!=nFrb0) { - switch(rHead.SwGrCol) { - case SgfVectFarb: aOutDev.SetLineColor(Hpgl2SvFarbe(nFarb)); break; - case SgfVectGray: break; - case SgfVectWdth: break; - } - } - aOutDev.DrawLine(aP0,aP1); break; // Linie - case 2: break; // Kreis - case 3: break; // Text - case 5: aOutDev.DrawRect(Rectangle(aP0,aP1)); break; // Rechteck (solid) - } - } - aP0=aP1; - nFrb0=nFarb; - } - } - rMtf.Stop(); - rMtf.WindStart(); - MapMode aMap( MAP_10TH_MM, Point(), - Fraction( 1, 4 ), Fraction( 1, 4 ) ); - rMtf.SetPrefMapMode( aMap ); - rMtf.SetPrefSize( Size( (short)rHead.Xsize, (short)rHead.Ysize ) ); - return TRUE; -} - - -/************************************************************************* -|* -|* SgfVectFilter() -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -BOOL SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf) -{ - ULONG nFileStart; // Offset des SgfHeaders. Im allgemeinen 0. - SgfHeader aHead; - SgfEntry aEntr; - ULONG nNext; - BOOL bRdFlag=FALSE; // Grafikentry gelesen ? - BOOL bRet=FALSE; // Returncode - - nFileStart=rInp.Tell(); - rInp>>aHead; - if (aHead.ChkMagic() && aHead.Typ==SGF_SIMPVECT) { - nNext=aHead.GetOffset(); - while (nNext && !bRdFlag && !rInp.GetError()) { - rInp.Seek(nFileStart+nNext); - rInp>>aEntr; - nNext=aEntr.GetOffset(); - if (aEntr.Typ==aHead.Typ) { - bRet=SgfFilterVect(rInp,aHead,aEntr,rMtf); - } - } // while(nNext) - if (bRdFlag) { - if (!rInp.GetError()) bRet=TRUE; // Scheinbar Ok - } - } - return(bRet); -} - - -/************************************************************************* -|* -|* SgfFilterPScr() -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -BOOL SgfFilterPScr(SvStream&, SgfHeader&, SgfEntry&) -{ - return FALSE; // PostSrcipt wird noch nicht unterstuetzt ! -} - - -/************************************************************************* -|* -|* CheckSgfTyp() -|* -|* Beschreibung Feststellen, um was fuer ein SGF/SGV es sich handelt. -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -BYTE CheckSgfTyp(SvStream& rInp, USHORT& nVersion) -{ -#if OSL_DEBUG_LEVEL > 1 // Recordgroessen checken. Neuer Compiler hat vielleichte anderes Allignment! - if (sizeof(SgfHeader)!=SgfHeaderSize || - sizeof(SgfEntry) !=SgfEntrySize || - sizeof(SgfVector)!=SgfVectorSize || - sizeof(BmpFileHeader)!=BmpFileHeaderSize || - sizeof(BmpInfoHeader)!=BmpInfoHeaderSize || - sizeof(RGBQuad )!=RGBQuadSize ) return SGF_DONTKNOW; -#endif - - ULONG nPos; - SgfHeader aHead; - nVersion=0; - nPos=rInp.Tell(); - rInp>>aHead; - rInp.Seek(nPos); - if (aHead.ChkMagic()) { - nVersion=aHead.Version; - switch(aHead.Typ) { - case SgfBitImag0: - case SgfBitImag1: - case SgfBitImag2: - case SgfBitImgMo: return SGF_BITIMAGE; - case SgfSimpVect: return SGF_SIMPVECT; - case SgfPostScrp: return SGF_POSTSCRP; - case SgfStarDraw: return SGF_STARDRAW; - default : return SGF_DONTKNOW; - } - } else { - return SGF_DONTKNOW; - } -} diff --git a/svtools/source/filter.vcl/filter/sgvmain.cxx b/svtools/source/filter.vcl/filter/sgvmain.cxx deleted file mode 100644 index 293c6dab7964..000000000000 --- a/svtools/source/filter.vcl/filter/sgvmain.cxx +++ /dev/null @@ -1,1130 +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_svtools.hxx" - -#include -#include -#include -#include -#include -#include "sgffilt.hxx" -#include "sgfbram.hxx" -#include "sgvmain.hxx" -#include "sgvspln.hxx" -#include - -//#if OSL_DEBUG_LEVEL > 1 -//#include "Debug.c" -//#endif - -#define SWAPPOINT(p) { \ - p.x=SWAPSHORT(p.x); \ - p.y=SWAPSHORT(p.y); } - -#define SWAPPAGE(p) { \ - p.Next =SWAPLONG (p.Next ); \ - p.nList =SWAPLONG (p.nList ); \ - p.ListEnd=SWAPLONG (p.ListEnd); \ - p.Paper.Size.x=SWAPSHORT(p.Paper.Size.x); \ - p.Paper.Size.y=SWAPSHORT(p.Paper.Size.y); \ - p.Paper.RandL =SWAPSHORT(p.Paper.RandL ); \ - p.Paper.RandR =SWAPSHORT(p.Paper.RandR ); \ - p.Paper.RandO =SWAPSHORT(p.Paper.RandO ); \ - p.Paper.RandU =SWAPSHORT(p.Paper.RandU ); \ - SWAPPOINT(p.U); \ - UINT16 iTemp; \ - for (iTemp=0;iTemp<20;iTemp++) { \ - rPage.HlpLnH[iTemp]=SWAPSHORT(rPage.HlpLnH[iTemp]); \ - rPage.HlpLnV[iTemp]=SWAPSHORT(rPage.HlpLnV[iTemp]); }} - -#define SWAPOBJK(o) { \ - o.Last =SWAPLONG (o.Last ); \ - o.Next =SWAPLONG (o.Next ); \ - o.MemSize =SWAPSHORT(o.MemSize ); \ - SWAPPOINT(o.ObjMin); \ - SWAPPOINT(o.ObjMax); } - -#define SWAPLINE(l) { \ - l.LMSize=SWAPSHORT(l.LMSize); \ - l.LDicke=SWAPSHORT(l.LDicke); } - -#define SWAPAREA(a) { \ - a.FDummy2=SWAPSHORT(a.FDummy2); \ - a.FMuster=SWAPSHORT(a.FMuster); } - -#define SWAPTEXT(t) { \ - SWAPLINE(t.L); \ - SWAPAREA(t.F); \ - t.FontLo =SWAPSHORT(t.FontLo ); \ - t.FontHi =SWAPSHORT(t.FontHi ); \ - t.Grad =SWAPSHORT(t.Grad ); \ - t.Breite =SWAPSHORT(t.Breite ); \ - t.Schnitt=SWAPSHORT(t.Schnitt); \ - t.LnFeed =SWAPSHORT(t.LnFeed ); \ - t.Slant =SWAPSHORT(t.Slant ); \ - SWAPLINE(t.ShdL); \ - SWAPAREA(t.ShdF); \ - SWAPPOINT(t.ShdVers); \ - SWAPAREA(t.BackF); } - - -//////////////////////////////////////////////////////////////////////////////////////////////////// -// -// Einschraenkungen: -// -// - Flaechenmuster werden den unter StarView verfuegbaren Mustern angenaehert. -// - Linienenden werden unter StarView immer rund dargestellt und gehen ueber -// den Endpunkt der Linie hinaus. -// - Linienmuster werden den unter StarView verfuegbaren Mustern angenaehert. -// Transparent/Opak wird zur Zeit noch nicht beruecksichtigt. -// - Keine gedrehten Ellipsen -// -// -// -// -//////////////////////////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////////////////////////// -// Fuer Fontuebersetzung /////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////////////////////// -SgfFontLst* pSgfFonts = 0; - -//////////////////////////////////////////////////////////////////////////////////////////////////// -// Fuer Kreisunterarten, Text und gedrehte Rechtecke /////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////////////////////// -void RotatePoint(PointType& P, INT16 cx, INT16 cy, double sn, double cs) -{ - INT16 dx,dy; - double x1,y1; - dx=P.x-cx; - dy=P.y-cy; - x1=dx*cs-dy*sn; - y1=dy*cs+dx*sn; - P.x=cx+INT16(x1); - P.y=cy+INT16(y1); -} - -void RotatePoint(Point& P, INT16 cx, INT16 cy, double sn, double cs) -{ - INT16 dx,dy; - double x1,y1; - dx=(INT16)(P.X()-cx); - dy=(INT16)(P.Y()-cy); - x1=dx*cs-dy*sn; - y1=dy*cs+dx*sn; - P=Point(cx+INT16(x1),cy+INT16(y1)); -} - -INT16 iMulDiv(INT16 a, INT16 Mul, INT16 Div) -{ - INT32 Temp; - Temp=INT32(a)*INT32(Mul)/INT32(Div); - return INT16(Temp); -} - -UINT16 MulDiv(UINT16 a, UINT16 Mul, UINT16 Div) -{ - UINT32 Temp; - Temp=UINT32(a)*UINT32(Mul)/UINT32(Div); - return UINT16(Temp); -} - -//////////////////////////////////////////////////////////////////////////////////////////////////// -// SgfFilterSDrw /////////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////////////////////// - -SvStream& operator>>(SvStream& rIStream, DtHdType& rDtHd) -{ - rIStream.Read((char*)&rDtHd.Reserved[0],DtHdSize); - return rIStream; -} - -void DtHdOverSeek(SvStream& rInp) -{ - ULONG FPos=rInp.Tell(); - FPos+=(ULONG)DtHdSize; - rInp.Seek(FPos); -// rInp.seekg(rInp.tellg()+(ULONG)DtHdSize); -} - - -SvStream& operator>>(SvStream& rIStream, PageType& rPage) -{ - rIStream.Read((char*)&rPage.Next,PageSize); -#if defined OSL_BIGENDIAN - SWAPPAGE(rPage); -#endif - return rIStream; -} - -void ObjkOverSeek(SvStream& rInp, ObjkType& rObjk) -{ - ULONG Siz; - Siz=(ULONG)rObjk.MemSize+rObjk.Last; // ObjSize+ObjAnhSize - rInp.Seek(rInp.Tell()+Siz); -} - -SvStream& operator>>(SvStream& rInp, ObjkType& rObjk) -{ // Die Fileposition im Stream bleibt unveraendert! - ULONG nPos; - nPos=rInp.Tell(); - rInp.Read((char*)&rObjk.Last,ObjkSize); -#if defined OSL_BIGENDIAN - SWAPOBJK(rObjk); -#endif -#ifdef InArbeit - ULONG nPos1=rInp.Tell(); - if(nPos == nPos1) InfoBox( NULL, "tellg funkt nich" ).Execute(); -#endif - rInp.Seek(nPos); -#ifdef InArbeit - if (rInp.Tell() != nPos) InfoBox( NULL, "seekg funkt nich" ).Execute(); -#endif - return rInp; -} -SvStream& operator>>(SvStream& rInp, StrkType& rStrk) -{ - rInp.Read((char*)&rStrk.Last,StrkSize); -#if defined OSL_BIGENDIAN - SWAPOBJK (rStrk); - SWAPLINE (rStrk.L); - SWAPPOINT(rStrk.Pos1); - SWAPPOINT(rStrk.Pos2); -#endif - return rInp; -} -SvStream& operator>>(SvStream& rInp, RectType& rRect) -{ - rInp.Read((char*)&rRect.Last,RectSize); -#if defined OSL_BIGENDIAN - SWAPOBJK (rRect); - SWAPLINE (rRect.L); - SWAPAREA (rRect.F); - SWAPPOINT(rRect.Pos1); - SWAPPOINT(rRect.Pos2); - rRect.Radius =SWAPSHORT(rRect.Radius ); - rRect.DrehWink=SWAPSHORT(rRect.DrehWink); - rRect.Slant =SWAPSHORT(rRect.Slant ); -#endif - return rInp; -} -SvStream& operator>>(SvStream& rInp, PolyType& rPoly) -{ - rInp.Read((char*)&rPoly.Last,PolySize); -#if defined OSL_BIGENDIAN - SWAPOBJK (rPoly); - SWAPLINE (rPoly.L); - SWAPAREA (rPoly.F); - // rPoly.EckP=SWAPLONG(rPoly.EckP); -#endif - return rInp; -} -SvStream& operator>>(SvStream& rInp, SplnType& rSpln) -{ - rInp.Read((char*)&rSpln.Last,SplnSize); -#if defined OSL_BIGENDIAN - SWAPOBJK (rSpln); - SWAPLINE (rSpln.L); - SWAPAREA (rSpln.F); - // rSpln.EckP=SWAPLONG(rSpln.EckP); -#endif - return rInp; -} -SvStream& operator>>(SvStream& rInp, CircType& rCirc) -{ - rInp.Read((char*)&rCirc.Last,CircSize); -#if defined OSL_BIGENDIAN - SWAPOBJK (rCirc); - SWAPLINE (rCirc.L); - SWAPAREA (rCirc.F); - SWAPPOINT(rCirc.Radius); - SWAPPOINT(rCirc.Center); - rCirc.DrehWink =SWAPSHORT(rCirc.DrehWink ); - rCirc.StartWink=SWAPSHORT(rCirc.StartWink); - rCirc.RelWink =SWAPSHORT(rCirc.RelWink ); -#endif - return rInp; -} -SvStream& operator>>(SvStream& rInp, TextType& rText) -{ - rInp.Read((char*)&rText.Last,TextSize); -#if defined OSL_BIGENDIAN - SWAPOBJK (rText); - SWAPTEXT (rText.T); - SWAPPOINT(rText.Pos1); - SWAPPOINT(rText.Pos2); - rText.TopOfs =SWAPSHORT(rText.TopOfs ); - rText.DrehWink=SWAPSHORT(rText.DrehWink); - rText.BoxSlant=SWAPSHORT(rText.BoxSlant); - rText.BufSize =SWAPSHORT(rText.BufSize ); - //rText.Buf =SWAPLONG (rText.Buf ); - //rText.Ext =SWAPLONG (rText.Ext ); - SWAPPOINT(rText.FitSize); - rText.FitBreit=SWAPSHORT(rText.FitBreit); -#endif - rText.Buffer=NULL; - return rInp; -} -SvStream& operator>>(SvStream& rInp, BmapType& rBmap) -{ - rInp.Read((char*)&rBmap.Last,BmapSize); -#if defined OSL_BIGENDIAN - SWAPOBJK (rBmap); - SWAPAREA (rBmap.F); - SWAPPOINT(rBmap.Pos1); - SWAPPOINT(rBmap.Pos2); - rBmap.DrehWink=SWAPSHORT(rBmap.DrehWink); - rBmap.Slant =SWAPSHORT(rBmap.Slant ); - SWAPPOINT(rBmap.PixSize); -#endif - return rInp; -} -SvStream& operator>>(SvStream& rInp, GrupType& rGrup) -{ - rInp.Read((char*)&rGrup.Last,GrupSize); -#if defined OSL_BIGENDIAN - SWAPOBJK (rGrup); - rGrup.SbLo =SWAPSHORT(rGrup.SbLo ); - rGrup.SbHi =SWAPSHORT(rGrup.SbHi ); - rGrup.UpLo =SWAPSHORT(rGrup.UpLo ); - rGrup.UpHi =SWAPSHORT(rGrup.UpHi ); - rGrup.ChartSize=SWAPSHORT(rGrup.ChartSize); - rGrup.ChartPtr =SWAPLONG (rGrup.ChartPtr ); -#endif - return rInp; -} - - - -/************************************************************************* -|* -|* Sgv2SvFarbe() -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -Color Sgv2SvFarbe(BYTE nFrb1, BYTE nFrb2, BYTE nInts) -{ - UINT16 r1=0,g1=0,b1=0,r2=0,g2=0,b2=0; - BYTE nInt2=100-nInts; - switch(nFrb1 & 0x07) { - case 0: r1=0xFF; g1=0xFF; b1=0xFF; break; - case 1: r1=0xFF; g1=0xFF; break; - case 2: g1=0xFF; b1=0xFF; break; - case 3: g1=0xFF; break; - case 4: r1=0xFF; b1=0xFF; break; - case 5: r1=0xFF; break; - case 6: b1=0xFF; break; - case 7: break; - } - switch(nFrb2 & 0x07) { - case 0: r2=0xFF; g2=0xFF; b2=0xFF; break; - case 1: r2=0xFF; g2=0xFF; break; - case 2: g2=0xFF; b2=0xFF; break; - case 3: g2=0xFF; break; - case 4: r2=0xFF; b2=0xFF; break; - case 5: r2=0xFF; break; - case 6: b2=0xFF; break; - case 7: break; - } - r1=(UINT16)((UINT32)r1*nInts/100+(UINT32)r2*nInt2/100); - g1=(UINT16)((UINT32)g1*nInts/100+(UINT32)g2*nInt2/100); - b1=(UINT16)((UINT32)b1*nInts/100+(UINT32)b2*nInt2/100); - Color aColor( (sal_uInt8)r1, (sal_uInt8)g1, (sal_uInt8)b1 ); - return aColor; -} - -void SetLine(ObjLineType& rLine, OutputDevice& rOut) -{ -/* !!! - PenStyle aStyle=PEN_SOLID; - switch(rLine.LMuster & 0x07) { - case 0: aStyle=PEN_NULL; break; - case 1: aStyle=PEN_SOLID; break; - case 2: aStyle=PEN_DOT; break; // . . . . . . . . . . . . . . - case 3: aStyle=PEN_DASH; break; // __ __ __ __ __ __ __ __ __ - case 4: aStyle=PEN_DASH; break; // ___ ___ ___ ___ ___ ___ ___ - case 5: aStyle=PEN_DASHDOT; break; // __ . __ . __ . __ . __ . __ - case 6: aStyle=PEN_DASHDOT; break; // __ _ __ _ __ _ __ _ __ _ __ - case 7: aStyle=PEN_DASHDOT; break; // ___ _ _ ___ _ _ ___ _ _ ___ - } - Pen aPen(Sgv2SvFarbe(rLine.LFarbe,rLine.LBFarbe,rLine.LIntens),rLine.LDicke,aStyle); - SetPen(aPen,rOut); -*/ - if( 0 == ( rLine.LMuster & 0x07 ) ) - rOut.SetLineColor(); - else - rOut.SetLineColor( Sgv2SvFarbe(rLine.LFarbe,rLine.LBFarbe,rLine.LIntens) ); -} - -void SetArea(ObjAreaType& rArea, OutputDevice& rOut) -{ -/* - BrushStyle aStyle=BRUSH_SOLID; - switch(rArea.FMuster & 0x00FF) { - case 0: aStyle=BRUSH_NULL; break; - case 1: aStyle=BRUSH_SOLID; break; - case 2: case 4: case 6: case 8: - case 10: case 12: case 14: case 16: - case 43: case 45: aStyle=BRUSH_VERT; break; - case 3: case 5: case 7: case 9: - case 11: case 13: case 15: case 17: - case 42: case 44: aStyle=BRUSH_HORZ; break; - case 18: case 20: case 22: case 24: - case 26: case 28: case 30: case 32: - case 46: case 48: aStyle=BRUSH_UPDIAG; break; - case 19: case 21: case 23: case 25: - case 27: case 29: case 31: case 33: - case 47: case 49: aStyle=BRUSH_DOWNDIAG; break; - case 34: case 35: case 36: case 37: aStyle=BRUSH_CROSS; break; - case 38: case 39: case 40: case 41: aStyle=BRUSH_DIAGCROSS; break; - default: aStyle=BRUSH_DIAGCROSS; break; - } - Brush aBrush(Sgv2SvFarbe(rArea.FFarbe,rArea.FBFarbe,rArea.FIntens),aStyle); - aBrush.SetTransparent((rArea.FMuster & 0x80) !=0L); - SetBrush(aBrush,rOut); -*/ - if( 0 == ( rArea.FMuster & 0x00FF ) ) - rOut.SetFillColor(); - else - rOut.SetFillColor( Sgv2SvFarbe( rArea.FFarbe,rArea.FBFarbe,rArea.FIntens ) ); -} - -/************************************************************************* -|* -|* ObjkType::DrawObjekt() -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -void ObjkType::Draw(OutputDevice&) -{ -// ShowSDObjk(*this); -} - -void Obj0Type::Draw(OutputDevice&) {} - -/************************************************************************* -|* -|* StrkType::DrawObjekt() -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -void StrkType::Draw(OutputDevice& rOut) -{ - SetLine(L,rOut); - rOut.DrawLine(Point(Pos1.x,Pos1.y),Point(Pos2.x,Pos2.y)); // !!! -} - -/************************************************************************* -|* -|* RectType::DrawObjekt() -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -void SgfAreaColorIntens(UINT16 Muster, BYTE Col1, BYTE Col2, BYTE Int, OutputDevice& rOut) -{ - ObjAreaType F; - F.FMuster=Muster; - F.FFarbe=Col2; - F.FBFarbe=Col1; - F.FIntens=Int; - SetArea(F,rOut); -} - -void DrawSlideRect(INT16 x1, INT16 y1, INT16 x2, INT16 y2, ObjAreaType& F, OutputDevice& rOut) -{ - INT16 i,i0,b,b0; - INT16 Int1,Int2; - INT16 Col1,Col2; - // ClipMerk: HgdClipRec; - INT16 cx,cy; - INT16 MaxR; - INT32 dx,dy; - - rOut.SetLineColor(); - if (x1>x2) { i=x1; x1=x2; x2=i; } - if (y1>y2) { i=y1; y1=y2; y2=i; } - Col1=F.FBFarbe & 0x87; Col2=F.FFarbe & 0x87; - Int1=100-F.FIntens; Int2=F.FIntens; - if (Int1==Int2) { - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut); - rOut.DrawRect(Rectangle(x1,y1,x2,y2)); - } else { - b0=Int1; - switch (F.FBFarbe & 0x38) { - case 0x08: { // vertikal - i0=y1; - i=y1; - while (i<=y2) { - b=Int1+INT16((INT32)(Int2-Int1)*(INT32)(i-y1) /(INT32)(y2-y1+1)); - if (b!=b0) { - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut); - rOut.DrawRect(Rectangle(x1,i0,x2,i-1)); - i0=i; b0=b; - } - i++; - } - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut); - rOut.DrawRect(Rectangle(x1,i0,x2,y2)); - } break; - case 0x28: { // horizontal - i0=x1; - i=x1; - while (i<=x2) { - b=Int1+INT16((INT32)(Int2-Int1)*(INT32)(i-x1) /(INT32)(x2-x1+1)); - if (b!=b0) { - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut); - rOut.DrawRect(Rectangle(i0,y1,i-1,y2)); - i0=i; b0=b; - } - i++; - } - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut); - rOut.DrawRect(Rectangle(i0,y1,x2,y2)); - } break; - - case 0x18: case 0x38: { // Kreis - Region ClipMerk=rOut.GetClipRegion(); - double a; - - rOut.SetClipRegion(Region(Rectangle(x1,y1,x2,y2))); - cx=(x1+x2) /2; - cy=(y1+y2) /2; - dx=x2-x1+1; - dy=y2-y1+1; - a=sqrt((double)(dx*dx+dy*dy)); - MaxR=INT16(a) /2 +1; - b0=Int2; - i0=MaxR; if (MaxR<1) MaxR=1; - i=MaxR; - while (i>=0) { - b=Int1+INT16((INT32(Int2-Int1)*INT32(i)) /INT32(MaxR)); - if (b!=b0) { - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut); - //if (i0>200 || (Col1 & $80)!=0 || (Col2 & $80)!=0) { - // then begin { Fallunterscheidung fuer etwas bessere Performance } - // s2:=i0-i+2; - // SetPenSize(s2); - // s2:=s2 div 2; - // Circle(cx,cy,i0-s2,i0-s2);{} - // else - rOut.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0)); - i0=i; b0=b; - } - i--; - } - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int1,rOut); - rOut.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0)); - rOut.SetClipRegion(ClipMerk); - } break; // Kreis - } - } -} - - -void RectType::Draw(OutputDevice& rOut) -{ - if (L.LMuster!=0) L.LMuster=1; // keine Linienmuster hier, nur an oder aus - SetArea(F,rOut); - if (DrehWink==0) { - if ((F.FBFarbe & 0x38)==0 || Radius!=0) { - SetLine(L,rOut); - rOut.DrawRect(Rectangle(Pos1.x,Pos1.y,Pos2.x,Pos2.y),Radius,Radius); - } else { - DrawSlideRect(Pos1.x,Pos1.y,Pos2.x,Pos2.y,F,rOut); - if (L.LMuster!=0) { - SetLine(L,rOut); - rOut.SetFillColor(); - rOut.DrawRect(Rectangle(Pos1.x,Pos1.y,Pos2.x,Pos2.y)); - } - } - } else { - Point aPts[4]; - USHORT i; - double sn,cs; - sn=sin(double(DrehWink)*3.14159265359/18000); - cs=cos(double(DrehWink)*3.14159265359/18000); - aPts[0]=Point(Pos1.x,Pos1.y); - aPts[1]=Point(Pos2.x,Pos1.y); - aPts[2]=Point(Pos2.x,Pos2.y); - aPts[3]=Point(Pos1.x,Pos2.y); - for (i=0;i<4;i++) { - RotatePoint(aPts[i],Pos1.x,Pos1.y,sn,cs); - } - SetLine(L,rOut); - Polygon aPoly(4,aPts); - rOut.DrawPolygon(aPoly); - } -} - -/************************************************************************* -|* -|* PolyType::Draw() -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -void PolyType::Draw(OutputDevice& rOut) -{ - if ((Flags & PolyClosBit) !=0) SetArea(F,rOut); - SetLine(L,rOut); - Polygon aPoly(nPoints); - USHORT i; - for(i=0;i0) rOut.DrawPolygon(aPoly); - } else { - Spline2Poly(aSpln,FALSE,aPoly); - if (aPoly.GetSize()>0) rOut.DrawPolyLine(aPoly); - } -} - -/************************************************************************* -|* -|* CircType::Draw() -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -void DrawSlideCirc(INT16 cx, INT16 cy, INT16 rx, INT16 ry, ObjAreaType& F, OutputDevice& rOut) -{ - INT16 x1=cx-rx; - INT16 y1=cy-ry; - INT16 x2=cx+rx; - INT16 y2=cy+ry; - - INT16 i,i0,b,b0; - INT16 Int1,Int2; - INT16 Col1,Col2; - - rOut.SetLineColor(); - Col1=F.FBFarbe & 0x87; Col2=F.FFarbe & 0x87; - Int1=100-F.FIntens; Int2=F.FIntens; - if (Int1==Int2) { - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut); - rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); - } else { - b0=Int1; - switch (F.FBFarbe & 0x38) { - case 0x08: { // vertikal - Region ClipMerk=rOut.GetClipRegion(); - i0=y1; - i=y1; - while (i<=y2) { - b=Int1+INT16((INT32)(Int2-Int1)*(INT32)(i-y1) /(INT32)(y2-y1+1)); - if (b!=b0) { - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut); - rOut.SetClipRegion(Rectangle(x1,i0,x2,i-1)); - rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); - i0=i; b0=b; - } - i++; - } - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut); - rOut.SetClipRegion(Rectangle(x1,i0,x2,y2)); - rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); - rOut.SetClipRegion(ClipMerk); - } break; - case 0x28: { // horizontal - Region ClipMerk=rOut.GetClipRegion(); - i0=x1; - i=x1; - while (i<=x2) { - b=Int1+INT16((INT32)(Int2-Int1)*(INT32)(i-x1) /(INT32)(x2-x1+1)); - if (b!=b0) { - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut); - rOut.SetClipRegion(Rectangle(i0,y1,i-1,y2)); - rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); - i0=i; b0=b; - } - i++; - } - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut); - rOut.SetClipRegion(Rectangle(i0,y1,x2,y2)); - rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); - rOut.SetClipRegion(ClipMerk); - } break; - - case 0x18: case 0x38: { // Kreis - INT16 MaxR; - - if (rx<1) rx=1; - if (ry<1) ry=1; - MaxR=rx; - b0=Int2; - i0=MaxR; if (MaxR<1) MaxR=1; - i=MaxR; - while (i>=0) { - b=Int1+INT16((INT32(Int2-Int1)*INT32(i)) /INT32(MaxR)); - if (b!=b0) { - INT32 temp=INT32(i0)*INT32(ry)/INT32(rx); - INT16 j0=INT16(temp); - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut); - rOut.DrawEllipse(Rectangle(cx-i0,cy-j0,cx+i0,cy+j0)); - i0=i; b0=b; - } - i--; - } - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int1,rOut); - rOut.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0)); - } break; // Kreis - } - } -} - - -void CircType::Draw(OutputDevice& rOut) -{ - Rectangle aRect(Center.x-Radius.x,Center.y-Radius.y,Center.x+Radius.x,Center.y+Radius.y); - - if (L.LMuster!=0) L.LMuster=1; // keine Linienmuster hier, nur an oder aus - SetArea(F,rOut); - if ((Flags & 0x03)==CircFull) { - if ((F.FBFarbe & 0x38)==0) { - SetLine(L,rOut); - rOut.DrawEllipse(aRect); - } else { - DrawSlideCirc(Center.x,Center.y,Radius.x,Radius.y,F,rOut); - if (L.LMuster!=0) { - SetLine(L,rOut); - rOut.SetFillColor(); - rOut.DrawEllipse(aRect); - } - } - } else { - PointType a,b; - Point aStrt,aEnde; - double sn,cs; - - a.x=Center.x+Radius.x; a.y=Center.y; b=a; - sn=sin(double(StartWink)*3.14159265359/18000); - cs=cos(double(StartWink)*3.14159265359/18000); - RotatePoint(a,Center.x,Center.y,sn,cs); - sn=sin(double(StartWink+RelWink)*3.14159265359/18000); - cs=cos(double(StartWink+RelWink)*3.14159265359/18000); - RotatePoint(b,Center.x,Center.y,sn,cs); - if (Radius.x!=Radius.y) { - if (Radius.x<1) Radius.x=1; - if (Radius.y<1) Radius.y=1; - a.y = a.y - Center.y; - b.y = b.y - Center.y; - a.y=iMulDiv(a.y,Radius.y,Radius.x); - b.y=iMulDiv(b.y,Radius.y,Radius.x); - a.y = a.y + Center.y; - b.y = b.y + Center.y; - } - aStrt=Point(a.x,a.y); - aEnde=Point(b.x,b.y); - SetLine(L,rOut); - switch (Flags & 0x03) { - case CircArc : rOut.DrawArc(aRect,aEnde,aStrt); break; - case CircSect: - case CircAbsn: rOut.DrawPie(aRect,aEnde,aStrt); break; - } - } -} - -/************************************************************************* -|* -|* BmapType::Draw() -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ - -void BmapType::Draw(OutputDevice& rOut) -{ - //ifstream aInp; - unsigned char nSgfTyp; - USHORT nVersion; - String aStr( - reinterpret_cast< char const * >(&Filename[ 1 ]), - (xub_StrLen)Filename[ 0 ], RTL_TEXTENCODING_UTF8 ); - INetURLObject aFNam( aStr ); - - SvStream* pInp = ::utl::UcbStreamHelper::CreateStream( aFNam.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ ); - if ( pInp ) - { - nSgfTyp=CheckSgfTyp( *pInp,nVersion); - switch(nSgfTyp) { - case SGF_BITIMAGE: { - GraphicFilter aFlt; - Graphic aGrf; - USHORT nRet; - nRet=aFlt.ImportGraphic(aGrf,aFNam); - aGrf.Draw(&rOut,Point(Pos1.x,Pos1.y),Size(Pos2.x-Pos1.x,Pos2.y-Pos1.y)); - } break; - case SGF_SIMPVECT: { - GDIMetaFile aMtf; - SgfVectXofs=Pos1.x; - SgfVectYofs=Pos1.y; - SgfVectXmul=Pos2.x-Pos1.x; - SgfVectYmul=Pos2.y-Pos1.y; - SgfVectXdiv=0; - SgfVectYdiv=0; - SgfVectScal=TRUE; - SgfVectFilter(*pInp,aMtf); - SgfVectXofs=0; - SgfVectYofs=0; - SgfVectXmul=0; - SgfVectYmul=0; - SgfVectXdiv=0; - SgfVectYdiv=0; - SgfVectScal=FALSE; - aMtf.Play(&rOut); - } break; - } - delete pInp; - } -} - - -/************************************************************************* -|* -|* GrupType::... -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -UINT32 GrupType::GetSubPtr() -{ - return UINT32(SbLo)+0x00010000*UINT32(SbHi); -} - -/************************************************************************* -|* -|* DrawObjkList() -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -void DrawObjkList( SvStream& rInp, OutputDevice& rOut ) -{ - ObjkType aObjk; - USHORT nGrpCnt=0; - BOOL bEnde=FALSE; - do { - rInp>>aObjk; - if (!rInp.GetError()) { - switch(aObjk.Art) { - case ObjStrk: { StrkType aStrk; rInp>>aStrk; if (!rInp.GetError()) aStrk.Draw(rOut); } break; - case ObjRect: { RectType aRect; rInp>>aRect; if (!rInp.GetError()) aRect.Draw(rOut); } break; - case ObjCirc: { CircType aCirc; rInp>>aCirc; if (!rInp.GetError()) aCirc.Draw(rOut); } break; - case ObjText: { - TextType aText; - rInp>>aText; - if (!rInp.GetError()) { - aText.Buffer=new UCHAR[aText.BufSize+1]; // Ein mehr fuer LookAhead bei CK-Trennung - rInp.Read((char* )aText.Buffer,aText.BufSize); - if (!rInp.GetError()) aText.Draw(rOut); - delete[] aText.Buffer; - } - } break; - case ObjBmap: { - BmapType aBmap; - rInp>>aBmap; - if (!rInp.GetError()) { - aBmap.Draw(rOut); - } - } break; - case ObjPoly: { - PolyType aPoly; - rInp>>aPoly; - if (!rInp.GetError()) { - aPoly.EckP=new PointType[aPoly.nPoints]; - rInp.Read((char*)aPoly.EckP,4*aPoly.nPoints); -#if defined OSL_BIGENDIAN - for(short i=0;i>aSpln; - if (!rInp.GetError()) { - aSpln.EckP=new PointType[aSpln.nPoints]; - rInp.Read((char*)aSpln.EckP,4*aSpln.nPoints); -#if defined OSL_BIGENDIAN - for(short i=0;i>aGrup; - if (!rInp.GetError()) { - rInp.Seek(rInp.Tell()+aGrup.Last); // Obj-Anhaengsel - if(aGrup.GetSubPtr()!=0L) nGrpCnt++;// DrawObjkList(rInp,rOut ); - } - } break; - default: { - aObjk.Draw(rOut); // Objektbezeichnung auf 2. Screen - ObjkOverSeek(rInp,aObjk); // zum naechsten Objekt - } - } - } // if rInp - if (!rInp.GetError()) { - if (aObjk.Next==0L) { - if (nGrpCnt==0) bEnde=TRUE; - else nGrpCnt--; - } - } else { - bEnde=TRUE; // Lesefehler - } - } while (!bEnde); -} - -/************************************************************************* -|* -|* SkipObjkList() -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -void SkipObjkList(SvStream& rInp) -{ - ObjkType aObjk; - do - { - rInp>>aObjk; - if(aObjk.Art==ObjGrup) { - GrupType aGrup; - rInp>>aGrup; - rInp.Seek(rInp.Tell()+aGrup.Last); // Obj-Anhaengsel - if(aGrup.GetSubPtr()!=0L) SkipObjkList(rInp); - } else { - ObjkOverSeek(rInp,aObjk); // zum naechsten Objekt - } - } while (aObjk.Next!=0L && !rInp.GetError()); -} - -/************************************************************************* -|* -|* SgfFilterSDrw() -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -BOOL SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) -{ - BOOL bRet = FALSE; - PageType aPage; - VirtualDevice aOutDev; - OutputDevice* pOutDev; - ULONG nStdPos; - ULONG nZchPos; - USHORT Num; - - pOutDev=&aOutDev; - DtHdOverSeek(rInp); // DataHeader weglesen - - nStdPos=rInp.Tell(); - do { // Standardseiten weglesen - rInp>>aPage; - if (aPage.nList!=0) SkipObjkList(rInp); - } while (aPage.Next!=0L && !rInp.GetError()); - -// ShowMsg("Zeichnungseite(n)\n"); - nZchPos=rInp.Tell(); - rInp>>aPage; - - rMtf.Record(pOutDev); - Num=aPage.StdPg; - if (Num!=0) { - rInp.Seek(nStdPos); - while(Num>1 && aPage.Next!=0L && !rInp.GetError()) { // Standardseite suchen - rInp>>aPage; - if (aPage.nList!=0) SkipObjkList(rInp); - Num--; - } - rInp>>aPage; - if(Num==1 && aPage.nList!=0L) DrawObjkList( rInp,*pOutDev ); - rInp.Seek(nZchPos); - nZchPos=rInp.Tell(); - rInp>>aPage; - } - if (aPage.nList!=0L) DrawObjkList(rInp,*pOutDev ); - - rMtf.Stop(); - rMtf.WindStart(); - MapMode aMap(MAP_10TH_MM,Point(),Fraction(1,4),Fraction(1,4)); - rMtf.SetPrefMapMode(aMap); - rMtf.SetPrefSize(Size((INT16)aPage.Paper.Size.x,(INT16)aPage.Paper.Size.y)); - bRet=TRUE; - return bRet; -} - - - -/************************************************************************* -|* -|* SgfSDrwFilter() -|* -|* Beschreibung -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -BOOL SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath ) -{ -#if OSL_DEBUG_LEVEL > 1 // Recordgroessen checken. Neuer Compiler hat vielleichte anderes Alignment! - if (sizeof(ObjTextType)!=ObjTextTypeSize) return FALSE; -#endif - - ULONG nFileStart; // Offset des SgfHeaders. Im allgemeinen 0. - SgfHeader aHead; - SgfEntry aEntr; - ULONG nNext; - BOOL bRdFlag=FALSE; // Grafikentry gelesen ? - BOOL bRet=FALSE; // Returncode - - aIniPath.Append( String::CreateFromAscii( "sgf.ini", 7 ) ); -// aIniPath.ToAbs(); - - pSgfFonts = new SgfFontLst; - - pSgfFonts->AssignFN( aIniPath.GetMainURL( INetURLObject::NO_DECODE ) ); - nFileStart=rInp.Tell(); - rInp>>aHead; - if (aHead.ChkMagic() && aHead.Typ==SgfStarDraw && aHead.Version==SGV_VERSION) { - nNext=aHead.GetOffset(); - while (nNext && !bRdFlag && !rInp.GetError()) { - rInp.Seek(nFileStart+nNext); - rInp>>aEntr; - nNext=aEntr.GetOffset(); - if (aEntr.Typ==aHead.Typ) { - bRet=SgfFilterSDrw( rInp,aHead,aEntr,rMtf ); - } - } // while(nNext) - if (bRdFlag) { - if (!rInp.GetError()) bRet=TRUE; // Scheinbar Ok - } - } - delete pSgfFonts; - return(bRet); -} - -/* -Bitmap Dither(BYTE Intens) -{ - Bitmap aBmp; - BmpInfoHeader Info; - - -const dmatrix: array[0..7,0..7] of byte = - (( 0, 48, 12, 60, 3, 51, 15, 63 ), - ( 32, 16, 44, 28, 35, 19, 47, 31 ), - ( 8, 56, 4, 52, 11, 59, 7, 55 ), - ( 40, 24, 36, 20, 43, 27, 39, 23 ), - ( 2, 50, 14, 62, 1, 49, 13, 61 ), - ( 34, 18, 46, 30, 33, 17, 45, 29 ), - ( 10, 58, 6, 54, 9, 57, 5, 53 ), - ( 42, 26, 38, 22, 41, 25, 37, 21 )); - - - cmatrix: array[0..7,0..7] of byte; - dmatrixn,dmatrixi: array[0..7] of byte; - - -procedure SetColorIntens(col0,col1,bal: integer); -var cmatrix0: array[0..63] of byte absolute cmatrix; - dmatrix0: array[0..63] of byte absolute dmatrix; - n,i: integer; - b,bit: byte; -begin -if col0=col1 then bal:=0; -if bal<=32 then - begin - plotcolor0:=col0 and $1F; plotcolor1:=col1 and $1F; - plotbal:=bal; - end -else - begin - plotcolor0:=col1 and $1F; plotcolor1:=col0 and $1F; - plotbal:=64-bal; - end; -for n:=0 to 63 do - if plotbal<=dmatrix0[n] then cmatrix0[n]:=col0 else cmatrix0[n]:=col1; -end; -*/ - diff --git a/svtools/source/filter.vcl/filter/sgvspln.cxx b/svtools/source/filter.vcl/filter/sgvspln.cxx deleted file mode 100644 index d695e171a194..000000000000 --- a/svtools/source/filter.vcl/filter/sgvspln.cxx +++ /dev/null @@ -1,890 +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_svtools.hxx" - -#include - - -#include - -#if defined( PM2 ) && defined( __BORLANDC__ ) -#pragma option -Od -#endif - -extern "C" { - -/*.pn 277 */ -/*.hlAnhang: C - Programme*/ -/*.hrKonstanten- und Macro-Definitionen*/ -/*.fe Die Include-Datei u_const.h ist in das Verzeichnis zu stellen, */ -/*.fe wo der Compiler nach Include-Dateien sucht. */ - - -/*----------------------- FILE u_const.h ---------------------------*/ - -#define IEEE - -/* IEEE - Norm fuer die Darstellung von Gleitkommazahlen: - - 8 Byte lange Gleitkommazahlen, mit - - 53 Bit Mantisse ==> Mantissenbereich: 2 hoch 52 versch. Zahlen - mit 0.1 <= Zahl < 1.0, - 1 Vorzeichen-Bit - 11 Bit Exponent ==> Exponentenbereich: -1024...+1023 - - Die 1. Zeile ( #define IEEE ) ist zu loeschen, falls die Maschine - bzw. der Compiler keine Gleitpunktzahlen gemaess der IEEE-Norm - benutzt. Zusaetzlich muessen die Zahlen MAXEXPON, MINEXPON - (s.u.) angepasst werden. - */ - -#ifdef IEEE /*----------- Falls IEEE Norm --------------------*/ - -#define MACH_EPS 2.220446049250313e-016 /* Maschinengenauigkeit */ - /* IBM-AT: = 2 hoch -52 */ -/* MACH_EPS ist die kleinste positive, auf der Maschine darstellbare - Zahl x, die der Bedingung genuegt: 1.0 + x > 1.0 */ - -#define EPSQUAD 4.930380657631324e-032 -#define EPSROOT 1.490116119384766e-008 - -#define POSMAX 8.98846567431158e+307 /* groesste positive Zahl */ -#define POSMIN 5.56268464626800e-309 /* kleinste positive Zahl */ -#define MAXROOT 9.48075190810918e+153 - -#define BASIS 2 /* Basis der Zahlendarst. */ -#ifndef PI -#define PI 3.141592653589793e+000 -#endif -#define EXP_1 2.718281828459045e+000 - -#else /*------------------ sonst -----------------------*/ - -double exp (double); -double atan (double); -double pow (double,double); -double sqrt (double); - -double masch() /* MACH_EPS maschinenunabhaengig bestimmen */ -{ - double eps = 1.0, x = 2.0, y = 1.0; - while ( y < x ) - { eps *= 0.5; - x = 1.0 + eps; - } - eps *= 2.0; return (eps); -} - -short basis() /* BASIS maschinenunabhaengig bestimmen */ -{ - double x = 1.0, one = 1.0, b = 1.0; - - while ( (x + one) - x == one ) x *= 2.0; - while ( (x + b) == x ) b *= 2.0; - - return ( (short) ((x + b) - x) ); -} - -#define BASIS basis() /* Basis der Zahlendarst. */ - -/* Falls die Maschine (der Compiler) keine IEEE-Darstellung fuer - Gleitkommazahlen nutzt, muessen die folgenden 2 Konstanten an- - gepasst werden. - */ - -#define MAXEXPON 1023.0 /* groesster Exponent */ -#define MINEXPON -1024.0 /* kleinster Exponent */ - - -#define MACH_EPS masch() -#define EPSQUAD MACH_EPS * MACH_EPS -#define EPSROOT sqrt(MACH_EPS) - -#define POSMAX pow ((double) BASIS, MAXEXPON) -#define POSMIN pow ((double) BASIS, MINEXPON) -#define MAXROOT sqrt(POSMAX) - -#define PI 4.0 * atan (1.0) -#define EXP_1 exp(1.0) - -#endif /*-------------- ENDE ifdef ----------------------*/ - - -#define NEGMAX -POSMIN /* groesste negative Zahl */ -#define NEGMIN -POSMAX /* kleinste negative Zahl */ - -#define TRUE 1 -#define FALSE 0 - - -/* Definition von Funktionsmakros: - */ - -#define abs(X) ((X) >= 0 ? (X) : -(X)) /* Absolutbetrag von X */ -#define sign(X, Y) (Y < 0 ? -abs(X) : abs(X)) /* Vorzeichen von */ - /* Y mal abs(X) */ -#define sqr(X) ((X) * (X)) /* Quadrat von X */ - -/*------------------- ENDE FILE u_const.h --------------------------*/ - - - - - - - - - -/*.HL Anhang: C - Programme*/ -/*.HRGleichungssysteme fuer Tridiagonalmatrizen*/ - -/*.FE P 3.7 TRIDIAGONALE GLEICHUNGSSYSTEME*/ - - -/*---------------------- MODUL TRIDIAGONAL ------------------------*/ - -USHORT TriDiagGS(BOOL rep, USHORT n, double* lower, - double* diag, double* upper, double* b) - /************************/ - /* GAUSS-Verfahren fuer */ - /* Tridiagonalmatrizen */ - /************************/ - -/*====================================================================*/ -/* */ -/* trdiag bestimmt die Loesung x des linearen Gleichungssystems */ -/* A * x = b mit tridiagonaler n x n Koeffizientenmatrix A, die in */ -/* den 3 Vektoren lower, upper und diag wie folgt abgespeichert ist: */ -/* */ -/* ( diag[0] upper[0] 0 0 . . . 0 ) */ -/* ( lower[1] diag[1] upper[1] 0 . . . ) */ -/* ( 0 lower[2] diag[2] upper[2] 0 . ) */ -/* A = ( . 0 lower[3] . . . ) */ -/* ( . . . . . 0 ) */ -/* ( . . . . . ) */ -/* ( . . . upper[n-2] ) */ -/* ( 0 . . . 0 lower[n-1] diag[n-1] ) */ -/* */ -/*====================================================================*/ -/* */ -/* Anwendung: */ -/* ========= */ -/* Vorwiegend fuer diagonaldominante Tridiagonalmatrizen, wie */ -/* sie bei der Spline-Interpolation auftreten. */ -/* Fuer diagonaldominante Matrizen existiert immer eine LU- */ -/* Zerlegung; fuer nicht diagonaldominante Tridiagonalmatrizen */ -/* sollte die Funktion band vorgezogen werden, da diese mit */ -/* Spaltenpivotsuche arbeitet und daher numerisch stabiler ist. */ -/* */ -/*====================================================================*/ -/* */ -/* Eingabeparameter: */ -/* ================ */ -/* n Dimension der Matrix ( > 1 ) USHORT n */ -/* */ -/* lower untere Nebendiagonale double lower[n] */ -/* diag Hauptdiagonale double diag[n] */ -/* upper obere Nebendiagonale double upper[n] */ -/* */ -/* bei rep != 0 enthalten lower, diag und upper die */ -/* Dreieckzerlegung der Ausgangsmatrix. */ -/* */ -/* b rechte Seite des Systems double b[n] */ -/* rep = 0 erstmaliger Aufruf BOOL rep */ -/* !=0 wiederholter Aufruf */ -/* fuer gleiche Matrix, */ -/* aber verschiedenes b. */ -/* */ -/* Ausgabeparameter: */ -/* ================ */ -/* b Loesungsvektor des Systems; double b[n] */ -/* die urspruengliche rechte Seite wird ueberspeichert */ -/* */ -/* lower ) enthalten bei rep = 0 die Zerlegung der Matrix; */ -/* diag ) die urspruenglichen Werte von lower u. diag werden */ -/* upper ) ueberschrieben */ -/* */ -/* Die Determinante der Matrix ist bei rep = 0 durch */ -/* det A = diag[0] * ... * diag[n-1] bestimmt. */ -/* */ -/* Rueckgabewert: */ -/* ============= */ -/* = 0 alles ok */ -/* = 1 n < 2 gewaehlt */ -/* = 2 Die Dreieckzerlegung der Matrix existiert nicht */ -/* */ -/*====================================================================*/ -/* */ -/* Benutzte Funktionen: */ -/* =================== */ -/* */ -/* Aus der C Bibliothek: fabs() */ -/* */ -/*====================================================================*/ - -/*.cp 5 */ -{ - USHORT i; - short j; - -// double fabs(double); - - if ( n < 2 ) return(1); /* n mindestens 2 */ - - /* Wenn rep = 0 ist, */ - /* Dreieckzerlegung der */ - if (rep == 0) /* Matrix u. det be- */ - { /* stimmen */ - for (i = 1; i < n; i++) - { if ( fabs(diag[i-1]) < MACH_EPS ) /* Wenn ein diag[i] = 0 */ - return(2); /* ist, ex. keine Zerle- */ - lower[i] /= diag[i-1]; /* gung. */ - diag[i] -= lower[i] * upper[i-1]; - } - } - - if ( fabs(diag[n-1]) < MACH_EPS ) return(2); - - for (i = 1; i < n; i++) /* Vorwaertselimination */ - b[i] -= lower[i] * b[i-1]; - - b[n-1] /= diag[n-1]; /* Rueckwaertselimination */ - for (j = n-2; j >= 0; j--) { - i=j; - b[i] = ( b[i] - upper[i] * b[i+1] ) / diag[i]; - } - return(0); -} - -/*----------------------- ENDE TRIDIAGONAL -------------------------*/ - - - - - - - - - -/*.HL Anhang: C - Programme*/ -/*.HRGleichungssysteme mit zyklisch tridiagonalen Matrizen*/ - -/*.FE P 3.8 SYSTEME MIT ZYKLISCHEN TRIDIAGONALMATRIZEN */ - - -/*---------------- MODUL ZYKLISCH TRIDIAGONAL ----------------------*/ - - -USHORT ZyklTriDiagGS(BOOL rep, USHORT n, double* lower, double* diag, - double* upper, double* lowrow, double* ricol, double* b) - /******************************/ - /* Systeme mit zyklisch tri- */ - /* diagonalen Matrizen */ - /******************************/ - -/*====================================================================*/ -/* */ -/* tzdiag bestimmt die Loesung x des linearen Gleichungssystems */ -/* A * x = b mit zyklisch tridiagonaler n x n Koeffizienten- */ -/* matrix A, die in den 5 Vektoren lower, upper, diag, lowrow und */ -/* ricol wie folgt abgespeichert ist: */ -/* */ -/* ( diag[0] upper[0] 0 0 . . 0 ricol[0] ) */ -/* ( lower[1] diag[1] upper[1] 0 . . 0 ) */ -/* ( 0 lower[2] diag[2] upper[2] 0 . ) */ -/* A = ( . 0 lower[3] . . . . ) */ -/* ( . . . . . 0 ) */ -/* ( . . . . . ) */ -/* ( 0 . . . upper[n-2] ) */ -/* ( lowrow[0] 0 . . 0 lower[n-1] diag[n-1] ) */ -/* */ -/* Speicherplatz fuer lowrow[1],..,lowrow[n-3] und ricol[1],..., */ -/* ricol[n-3] muss zusaetzlich bereitgestellt werden, da dieser */ -/* fuer die Aufnahme der Zerlegungsmatrix verfuegbar sein muss, die */ -/* auf die 5 genannten Vektoren ueberspeichert wird. */ -/* */ -/*====================================================================*/ -/* */ -/* Anwendung: */ -/* ========= */ -/* Vorwiegend fuer diagonaldominante zyklische Tridiagonalmatri- */ -/* zen wie sie bei der Spline-Interpolation auftreten. */ -/* Fuer diagonaldominante Matrizen existiert immer eine LU- */ -/* Zerlegung. */ -/* */ -/*====================================================================*/ -/* */ -/* Eingabeparameter: */ -/* ================ */ -/* n Dimension der Matrix ( > 2 ) USHORT n */ -/* lower untere Nebendiagonale double lower[n] */ -/* diag Hauptdiagonale double diag[n] */ -/* upper obere Nebendiagonale double upper[n] */ -/* b rechte Seite des Systems double b[n] */ -/* rep = 0 erstmaliger Aufruf BOOL rep */ -/* !=0 wiederholter Aufruf */ -/* fuer gleiche Matrix, */ -/* aber verschiedenes b. */ -/* */ -/* Ausgabeparameter: */ -/* ================ */ -/* b Loesungsvektor des Systems, double b[n] */ -/* die urspruengliche rechte Seite wird ueberspeichert */ -/* */ -/* lower ) enthalten bei rep = 0 die Zerlegung der Matrix; */ -/* diag ) die urspruenglichen Werte von lower u. diag werden */ -/* upper ) ueberschrieben */ -/* lowrow ) double lowrow[n-2] */ -/* ricol ) double ricol[n-2] */ -/* */ -/* Die Determinante der Matrix ist bei rep = 0 durch */ -/* det A = diag[0] * ... * diag[n-1] bestimmt. */ -/* */ -/* Rueckgabewert: */ -/* ============= */ -/* = 0 alles ok */ -/* = 1 n < 3 gewaehlt */ -/* = 2 Die Zerlegungsmatrix existiert nicht */ -/* */ -/*====================================================================*/ -/* */ -/* Benutzte Funktionen: */ -/* =================== */ -/* */ -/* Aus der C Bibliothek: fabs() */ -/* */ -/*====================================================================*/ - -/*.cp 5 */ -{ - double temp; // fabs(double); - USHORT i; - short j; - - if ( n < 3 ) return(1); - - if (rep == 0) /* Wenn rep = 0 ist, */ - { /* Zerlegung der */ - lower[0] = upper[n-1] = 0.0; /* Matrix berechnen. */ - - if ( fabs (diag[0]) < MACH_EPS ) return(2); - /* Ist ein Diagonalelement */ - temp = 1.0 / diag[0]; /* betragsmaessig kleiner */ - upper[0] *= temp; /* MACH_EPS, so ex. keine */ - ricol[0] *= temp; /* Zerlegung. */ - - for (i = 1; i < n-2; i++) - { diag[i] -= lower[i] * upper[i-1]; - if ( fabs(diag[i]) < MACH_EPS ) return(2); - temp = 1.0 / diag[i]; - upper[i] *= temp; - ricol[i] = -lower[i] * ricol[i-1] * temp; - } - - diag[n-2] -= lower[n-2] * upper[n-3]; - if ( fabs(diag[n-2]) < MACH_EPS ) return(2); - - for (i = 1; i < n-2; i++) - lowrow[i] = -lowrow[i-1] * upper[i-1]; - - lower[n-1] -= lowrow[n-3] * upper[n-3]; - upper[n-2] = ( upper[n-2] - lower[n-2] * ricol[n-3] ) / diag[n-2]; - - for (temp = 0.0, i = 0; i < n-2; i++) - temp -= lowrow[i] * ricol[i]; - diag[n-1] += temp - lower[n-1] * upper[n-2]; - - if ( fabs(diag[n-1]) < MACH_EPS ) return(2); - } /* end if ( rep == 0 ) */ - - b[0] /= diag[0]; /* Vorwaertselemination */ - for (i = 1; i < n-1; i++) - b[i] = ( b[i] - b[i-1] * lower[i] ) / diag[i]; - - for (temp = 0.0, i = 0; i < n-2; i++) - temp -= lowrow[i] * b[i]; - - b[n-1] = ( b[n-1] + temp - lower[n-1] * b[n-2] ) / diag[n-1]; - - b[n-2] -= b[n-1] * upper[n-2]; /* Rueckwaertselimination */ - for (j = n-3; j >= 0; j--) { - i=j; - b[i] -= upper[i] * b[i+1] + ricol[i] * b[n-1]; - } - return(0); -} - -/*------------------ ENDE ZYKLISCH TRIDIAGONAL ---------------------*/ - - -} // extern "C" - - -/************************************************************************* -|* -|* NaturalSpline() -|* -|* Beschreibung Berechnet die Koeffizienten eines natuerlichen -|* kubischen Polynomsplines mit n Stuetzstellen. -|* Ersterstellung JOE 17-08.93 -|* Letzte Aenderung JOE 17-08.93 -|* -*************************************************************************/ - -USHORT NaturalSpline(USHORT n, double* x, double* y, - double Marg0, double MargN, - BYTE MargCond, - double* b, double* c, double* d) -{ - USHORT i; - double* a; - double* h; - USHORT error; - - if (n<2) return 1; - if ( (MargCond & ~3) ) return 2; - a=new double[n+1]; - h=new double[n+1]; - for (i=0;i=MAXROOT) { - alphX=0.0; - alphY=sign(1.0,y[1]-y[0]); - } else { - alphX=sign(sqrt(1.0/(1.0+Marg01*Marg01)),x[1]-x[0]); - alphY=alphX*Marg01; - } - if (abs(MargN1)>=MAXROOT) { - betX=0.0; - betY=sign(1.0,y[n]-y[n-1]); - } else { - betX=sign(sqrt(1.0/(1.0+MargN1*MargN1)),x[n]-x[n-1]); - betY=betX*MargN1; - } - } - } // switch MargCond - if (MargCond==3) { - Error=PeriodicSpline(n,T,x,bx,cx,dx); - if (Error!=0) return(Error+4); - Error=PeriodicSpline(n,T,y,by,cy,dy); - if (Error!=0) return(Error+10); - } else { - Error=NaturalSpline(n,T,x,alphX,betX,MargCond,bx,cx,dx); - if (Error!=0) return(Error+4); - Error=NaturalSpline(n,T,y,alphY,betY,MargCond,by,cy,dy); - if (Error!=0) return(Error+9); - } - return 0; -} - - - -/************************************************************************* -|* -|* CalcSpline() -|* -|* Beschreibung Berechnet die Koeffizienten eines parametrischen -|* natuerlichen oder periodischen kubischen -|* Polynomsplines. Die Eckpunkte des uebergebenen -|* Polygons werden als Stuetzstellen angenommen. -|* n liefert die Anzahl der Teilpolynome. -|* Ist die Berechnung fehlerfrei verlaufen, so -|* liefert die Funktion TRUE. Nur in diesem Fall -|* ist Speicher fuer die Koeffizientenarrays -|* allokiert, der dann spaeter vom Aufrufer mittels -|* delete freizugeben ist. -|* Ersterstellung JOE 17-08.93 -|* Letzte Aenderung JOE 17-08.93 -|* -*************************************************************************/ - -BOOL CalcSpline(Polygon& rPoly, BOOL Periodic, USHORT& n, - double*& ax, double*& ay, double*& bx, double*& by, - double*& cx, double*& cy, double*& dx, double*& dy, double*& T) -{ - BYTE Marg; - double Marg01,Marg02; - double MargN1,MargN2; - USHORT i; - Point P0(-32768,-32768); - Point Pt; - - n=rPoly.GetSize(); - ax=new double[rPoly.GetSize()+2]; - ay=new double[rPoly.GetSize()+2]; - - n=0; - for (i=0;i0) n--; // n Korregieren (Anzahl der Teilpolynome) - - BOOL bRet = FALSE; - if ( ( Marg == 3 && n >= 3 ) || ( Marg == 2 && n >= 2 ) ) - { - bRet = ParaSpline(n,ax,ay,Marg,Marg01,Marg01,MargN1,MargN2,FALSE,T,bx,cx,dx,by,cy,dy) == 0; - } - if ( bRet == FALSE ) - { - delete[] ax; - delete[] ay; - delete[] bx; - delete[] by; - delete[] cx; - delete[] cy; - delete[] dx; - delete[] dy; - delete[] T; - n=0; - } - return bRet; -} - - -/************************************************************************* -|* -|* Spline2Poly() -|* -|* Beschreibung Konvertiert einen parametrichen kubischen -|* Polynomspline Spline (natuerlich oder periodisch) -|* in ein angenaehertes Polygon. -|* Die Funktion liefert FALSE, wenn ein Fehler bei -|* der Koeffizientenberechnung aufgetreten ist oder -|* das Polygon zu gross wird (>PolyMax=16380). Im 1. -|* Fall hat das Polygon 0, im 2. Fall PolyMax Punkte. -|* Um Koordinatenueberlaeufe zu vermeiden werden diese -|* auf +/-32000 begrenzt. -|* Ersterstellung JOE 23.06.93 -|* Letzte Aenderung JOE 23.06.93 -|* -*************************************************************************/ -BOOL Spline2Poly(Polygon& rSpln, BOOL Periodic, Polygon& rPoly) -{ - short MinKoord=-32000; // zur Vermeidung - short MaxKoord=32000; // von Ueberlaeufen - - double* ax; // Koeffizienten der Polynome - double* ay; - double* bx; - double* by; - double* cx; - double* cy; - double* dx; - double* dy; - double* tv; - - double Step; // Schrittweite fuer t - double dt1,dt2,dt3; // Delta t, y, ^3 - double t; - BOOL bEnde; // Teilpolynom zu Ende? - USHORT n; // Anzahl der zu zeichnenden Teilpolynome - USHORT i; // aktuelles Teilpolynom - BOOL bOk; // noch alles ok? - USHORT PolyMax=16380;// Maximale Anzahl von Polygonpunkten - long x,y; - - bOk=CalcSpline(rSpln,Periodic,n,ax,ay,bx,by,cx,cy,dx,dy,tv); - if (bOk) { - Step =10; - - rPoly.SetSize(1); - rPoly.SetPoint(Point(short(ax[0]),short(ay[0])),0); // erster Punkt - i=0; - while (i=tv[i+1]; - if (bEnde) t=tv[i+1]; - dt1=t-tv[i]; dt2=dt1*dt1; dt3=dt2*dt1; - x=long(ax[i]+bx[i]*dt1+cx[i]*dt2+dx[i]*dt3); - y=long(ay[i]+by[i]*dt1+cy[i]*dt2+dy[i]*dt3); - if (xMaxKoord) x=MaxKoord; - if (yMaxKoord) y=MaxKoord; - if (rPoly.GetSize() - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" - -#include -#include -#include -#include "sgffilt.hxx" -#include "sgfbram.hxx" -#include "sgvmain.hxx" -// #include "Debug.c" - -extern SgfFontLst* pSgfFonts; - -#ifndef abs -#define abs(x) ((x)<0 ? -(x) : (x)) -#endif - - -//////////////////////////////////////////////////////////////////////////////////////////////////// -// -// Einschraenkungen: Schatten nur grau, 2D und mit fixem Abstand. -// -// -// -// -//////////////////////////////////////////////////////////////////////////////////////////////////// - -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// -// AbsBase.Pas - -// die folgenden Werte sind in % vom maximalen Schriftgrad der Zeile */ -#define UndlSpace 5 /* Untersteichungsabstand von der Baseline */ -#define UndlWidth 6 /* Untersteichungsdicke */ -#define UndlSpac2 7 /* Zwischenraum bei doppelter Unterstreichung */ -#define StrkSpace 25 /* Abstand der Durchstreichlinie von der Baseline*/ -#define StrkWidth 5 /* Durchstreichungsliniendicke */ -#define StrkSpac2 7 /* Zwischenraum bei doppelter Durchstreichung */ -#define OutlWidth 2 /* Strichstaerke ist 2% vom Schriftgrad */ - -// vvv Sonderzeichen im TextBuffer vvv -#define TextEnd 0 /* ^@ Ende der Zeichenkette */ -#define HardSpace 6 /* ^F Hartspace (wird nicht umbrochen) ,' ' */ -#define GrafText 7 /* ^G Im Text eingebundene Grafik (future) */ -#define Tabulator 9 /* ^I Tabulatorzeichen, Pfeil */ -#define LineFeed 10 /* ^J Neue Zeile */ -#define SoftTrennK 11 /* ^K Zeichen fuer k-c-Austausch bei Trennung, 'k' */ -#define AbsatzEnd 13 /* ^M Neuer Absatz =CR */ -#define HardTrenn 16 /* ^P Hartes Trennzeichen (wird nicht umbrochen), '-' */ -#define SoftTrennAdd 19 /* ^S Zusatz-Zeichen Trennung von z.b."Schiff-fahrt" */ -#define Paragraf 21 /* ^U Zeichen welches fuer Paragraf-Zeichen */ -#define Escape 27 /* ^[ Escapesequenz einleiten */ -#define SoftTrenn 31 /* ^_ Weiches Trennzeichen, '-' nur Zeilenende */ -#define MaxEscValLen 8 -#define MaxEscLen (MaxEscValLen+3) - -//============================================================================== -// Escapesequenzen: [Esc][Esc] also mind. 4 Char -// Max. Laenge von Value soll sein: 8 Char (7+Vorzeichen). Demnach max. Laenge -// einer Escapesequenz: 11 Char. -// Identifer: - -#define EscFont 'F' /* FontID, z.B. 92500 fuer CG Times */ -#define EscGrad 'G' /* Schriftgrad 1..255 fuer <0)) || - ((F.FBFarbe!=L.LBFarbe) && (F.FIntens<100)); -} - - -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// -// Misc.Pas - -short hPoint2Sgf(short a) -{ - long b; - b=long(a)*127*SgfDpmm/(144*5); - return short(b); -} - -short Sgf2hPoint(short a) -{ - long b; - b=long(a)*5*144/(127*SgfDpmm); - return short(b); -} - -// End of Misc.Pas -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// - - - -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// -// AbsRead.Pas - -// ====================================================================== -// Function GetTopToBaseLine() Function GetBaseLineToBtm() -// -// Abstand von Zeilenoberkante bis BaseLine bzw. von BaseLine bis -// Unterkante berechnen. Alles in SGF-Units. -// ====================================================================== - -USHORT GetTopToBaseLine(USHORT MaxGrad) -{ - long ret; - ret=long(MaxGrad)*long(CharTopToBase) /long(100); - return USHORT(ret); -} - -// ====================================================================== -// Function GetTextChar() Function GetTextCharConv() -// -// Liest ein Zeichen aus dem Textbuffer, wertet dabei eventuell -// auftretende Escapesequenzen aus und setzt dementsprechend den -// Ein-/Ausgabeparameter AktAtr. Index wird entsprechend erhoeht. -// Der Parameter Rest muss immer die Anzahl der Zeichen beinhalten, -// den angeforderten Zeichen in der aktuellen Zeile noch folgen. -// Ansonsten funktioniert die Silbentrennung nicht richtig. Gibt man -// stattdessen die Konstante NoTrenn an, wird in keinem Fall -// getrennt, die Konstante DoTrenn bewirkt dagegen, dass ueberall dort -// getrennt wird, wo ein SoftTrenner vorkommt. -// -// SoftTrenner werden immer in ein Minuszeichen konvertiert. -// GetTextCharConv() konvertiert zusaetzlich HardSpace und AbsatzEnde -// in Spaces sowie HardTrenner in Minuszeichen. TextEnde wird immer -// als Char(0) geliefert. -// ====================================================================== - - - -UCHAR ConvertTextChar(UCHAR c) -{ - if (c<32) { - switch (c) { - case HardSpace : c=' '; break; - case AbsatzEnd : c=' '; break; - case SoftTrenn : c='-'; break; - case HardTrenn : c='-'; break; - case SoftTrennK : c='-'; break; - case SoftTrennAdd: c='-'; - } - } - return c; -} - - - -USHORT GetSchnittBit(UCHAR c) -{ - USHORT r=0; - switch (c) { - case EscBold : r=TextBoldBit; break; - case EscRSlnt: r=TextRSlnBit; break; - case EscUndln: r=TextUndlBit; break; - case EscStrik: r=TextStrkBit; break; - case EscDbUnd: r=TextDbUnBit; break; - case EscDbStk: r=TextDbStBit; break; - case EscSupSc: r=TextSupSBit; break; - case EscSubSc: r=TextSubSBit; break; - case EscKaptF: r=TextKaptBit; break; - case EscLSlnt: r=TextLSlnBit; break; - case Esc2DShd: r=TextSh2DBit; break; - case Esc3DShd: r=TextSh3DBit; break; - case Esc4DShd: r=TextSh4DBit; break; - case EscEbShd: r=TextShEbBit; - } - return r; -} - - - -long ChgValue(long Def, long Min, long Max, UCHAR FlgVal, long NumVal) -{ - long r=0; - - if (FlgVal==EscDeflt) { - r=Def; // zurueck auf Default - } else { - if (NumVal!=EscNoVal) r=NumVal; // Hart setzen - } - - if (Min!=0 || Max!=0) { - if (r>Max) r=Max; - if (r'9'); - if (EoVal==FALSE) { c=TBuf[Index]; Index++; } - i--; - } while (i>0 && EoVal==FALSE); - NumVal=Sgn*NumVal; - } - q=!CheckTextOutl(AktAtr.F,AktAtr.L); - - switch (Ident) { - case EscFont : AktAtr.SetFont(ULONG (ChgValue(Atr0.GetFont(),0,0 ,FlgVal,NumVal)));break; - case EscGrad : AktAtr.Grad =USHORT(ChgValue(Atr0.Grad, 2,2000 ,FlgVal,NumVal)); break; - case EscBreit: AktAtr.Breite =USHORT(ChgValue(Atr0.Breite, 1,1000 ,FlgVal,NumVal)); break; - case EscKaptS: AktAtr.Kapit =(BYTE)(ChgValue(Atr0.Kapit, 1,255 ,FlgVal,NumVal)); break; - case EscLFeed: AktAtr.LnFeed =USHORT(ChgValue(Atr0.LnFeed, 1,65535 ,FlgVal,NumVal)); break; - case EscSlant: AktAtr.Slant =USHORT(ChgValue(Atr0.Slant, 1,MaxCharSlant ,FlgVal,NumVal)); break; - case EscVPos : AktAtr.ChrVPos=char (ChgValue(Atr0.ChrVPos,-128,127 ,FlgVal,NumVal)); break; - case EscZAbst: AktAtr.ZAbst =(BYTE)(ChgValue(Atr0.ZAbst, 1,255 ,FlgVal,NumVal)); break; - case EscHJust: AktAtr.Justify=(BYTE)(ChgValue(Atr0.Justify & 0x0F,0,5 ,FlgVal,NumVal)); break; - case EscFarbe: { AktAtr.L.LFarbe =(BYTE)(ChgValue(Atr0.L.LFarbe,0,7 ,FlgVal,NumVal)); if (q) AktAtr.F.FFarbe =AktAtr.L.LFarbe; } break; - case EscBFarb: { AktAtr.L.LBFarbe=(BYTE)(ChgValue(Atr0.L.LBFarbe,0,255,FlgVal,NumVal)); if (q) AktAtr.F.FBFarbe=AktAtr.L.LBFarbe; } break; - case EscInts : { AktAtr.L.LIntens=(BYTE)(ChgValue(Atr0.L.LIntens,0,100,FlgVal,NumVal)); if (q) AktAtr.F.FIntens=AktAtr.L.LIntens; } break; - - case EscMustr: { AktAtr.F.FMuster=USHORT(ChgValue(Atr0.F.FMuster,0,65535,FlgVal,NumVal)); } break; - case EscMFarb: { AktAtr.F.FFarbe =(BYTE)(ChgValue(Atr0.F.FFarbe,0,7 ,FlgVal,NumVal)); } break; - case EscMBFrb: { AktAtr.F.FBFarbe=(BYTE)(ChgValue(Atr0.F.FBFarbe,0,255,FlgVal,NumVal)); } break; - case EscMInts: { AktAtr.F.FIntens=(BYTE)(ChgValue(Atr0.F.FIntens,0,100,FlgVal,NumVal)); } break; - - case EscSMstr: { AktAtr.ShdF.FMuster=USHORT(ChgValue(Atr0.ShdF.FMuster,0,65535,FlgVal,NumVal)); } break; - case EscSFarb: { AktAtr.ShdL.LFarbe =(BYTE)(ChgValue(Atr0.ShdL.LFarbe,0,7 ,FlgVal,NumVal)); AktAtr.ShdF.FFarbe =AktAtr.ShdL.LFarbe; } break; - case EscSBFrb: { AktAtr.ShdL.LBFarbe=(BYTE)(ChgValue(Atr0.ShdL.LBFarbe,0,255,FlgVal,NumVal)); AktAtr.ShdF.FBFarbe=AktAtr.ShdL.LBFarbe; } break; - case EscSInts: { AktAtr.ShdL.LIntens=(BYTE)(ChgValue(Atr0.ShdL.LIntens,0,100,FlgVal,NumVal)); AktAtr.ShdF.FIntens=AktAtr.ShdL.LIntens; } break; - case EscSDist: { AktAtr.ShdVers.x=(short)ChgValue(Atr0.ShdVers.x,0,30000,FlgVal,NumVal); AktAtr.ShdVers.y=AktAtr.ShdVers.x; } break; - case EscSXDst: { AktAtr.ShdVers.x=(short)ChgValue(Atr0.ShdVers.x,0,30000,FlgVal,NumVal); } break; - case EscSYDst: { AktAtr.ShdVers.y=(short)ChgValue(Atr0.ShdVers.y,0,30000,FlgVal,NumVal); } break; - - case EscBold : ChgSchnittBit(TextBoldBit,0,0,0 ,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; - case EscRSlnt: ChgSchnittBit(TextRSlnBit,TextLSlnBit,0,0 ,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; - case EscUndln: ChgSchnittBit(TextUndlBit,TextDbUnBit,0,0 ,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; - case EscStrik: ChgSchnittBit(TextStrkBit,TextDbStBit,0,0 ,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; - case EscDbUnd: ChgSchnittBit(TextDbUnBit,TextUndlBit,0,0 ,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; - case EscDbStk: ChgSchnittBit(TextDbStBit,TextStrkBit,0,0 ,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; - case EscSupSc: ChgSchnittBit(TextSupSBit,TextSubSBit,0,0 ,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; - case EscSubSc: ChgSchnittBit(TextSubSBit,TextSupSBit,0,0 ,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; - case EscKaptF: ChgSchnittBit(TextKaptBit,0,0,0 ,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; - case EscLSlnt: ChgSchnittBit(TextLSlnBit,TextRSlnBit,0,0 ,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; - case Esc2DShd: ChgSchnittBit(TextSh2DBit,TextSh3DBit,TextSh4DBit,TextShEbBit,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; - case Esc3DShd: ChgSchnittBit(TextSh3DBit,TextSh2DBit,TextSh4DBit,TextShEbBit,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; - case Esc4DShd: ChgSchnittBit(TextSh4DBit,TextSh2DBit,TextSh3DBit,TextShEbBit,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; - case EscEbShd: ChgSchnittBit(TextShEbBit,TextSh2DBit,TextSh3DBit,TextSh4DBit,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; - } //endcase - if (TBuf[Index]==Escape) Index++; // zweites Esc weglesen } - } // if Ende==FALSE - } while (Ende==FALSE && ScanEsc==FALSE); - if (Ende==FALSE) c=Escape; - return c; -} // end of ProcessOne - - -UCHAR GetTextChar(UCHAR* TBuf, USHORT& Index, - ObjTextType& Atr0, ObjTextType& AktAtr, - USHORT Rest, BOOL ScanEsc) -{ - UCHAR c,c0,nc; - - c=ProcessOne(TBuf,Index,Atr0,AktAtr,ScanEsc); - if (ScanEsc==FALSE) { - if (c==SoftTrennAdd || c==SoftTrennK || c==SoftTrenn) { - nc=GetNextChar(TBuf,Index); - c0=c; - if (Rest==0 || Rest==DoTrenn || - nc==' ' || nc==AbsatzEnd || nc==TextEnd) c='-'; - else { - c=ProcessOne(TBuf,Index,Atr0,AktAtr,ScanEsc); // den Trenner ueberspringen - if (c0==SoftTrennAdd) { - if (c>=32) c=ProcessOne(TBuf,Index,Atr0,AktAtr,ScanEsc); // und hier noch 'nen Buchstaben ueberspringen - } - } - } - if ((Rest==1 || Rest==DoTrenn) && GetNextChar(TBuf,Index)==SoftTrennK) { - if (c=='c') c='k'; - else if (c=='C') c='K'; - } - } - return c; -} - - // HardSpace und HardTrenn muessen explizit konvertiert werden ! } - // if AktAtr.Schnitt and TextKaptBit =TextKaptBit then c:=UpCase(c);(explizit) } - - // Bei der Trennmethode SoftTrennAdd wird davon ausgegangen, dass der zu } - // trennende Konsonant bereits 3x mal im TextBuf vorhanden ist, z.b.: } - // "Schiff-fahrt". Wenn nicht getrennt, dann wird "-f" entfernt. } - - - -UCHAR GetTextCharConv(UCHAR* TBuf, USHORT& Index, - ObjTextType& Atr0, ObjTextType& AktAtr, - USHORT Rest, BOOL ScanEsc) -{ - UCHAR c; - - c=GetTextChar(TBuf,Index,Atr0,AktAtr,Rest,ScanEsc); - if (c<32) { - switch (c) { - case HardSpace : c=' '; break; - case AbsatzEnd : c=' '; break; - case HardTrenn : c='-'; - } - } - return c; -} - - -// ====================================================================== -// Function GetLineFeed() -// -// Benoetigter Zeilenabstand in SGF-Units. ChrVPos wird beruecksichtigt. -// ====================================================================== -USHORT GetLineFeed(UCHAR* TBuf, USHORT Index, ObjTextType Atr0, ObjTextType AktAtr, - USHORT nChar, USHORT& LF, USHORT& MaxGrad) -{ - UCHAR c=0; - BOOL AbsEnd=FALSE; - ULONG LF100=0; - ULONG MaxLF100=0; - BOOL LFauto=0; - BOOL First=TRUE; - USHORT Grad; - USHORT i=0; - USHORT r=1; - - MaxGrad=0; - while (!AbsEnd && nChar>0) { - nChar--; - c=GetTextChar(TBuf,Index,Atr0,AktAtr,nChar,FALSE); - i++; - AbsEnd=(c==TextEnd || c==AbsatzEnd); - if (First || (!AbsEnd && c!=' ' && c!=HardTrenn)) { - LFauto=(AktAtr.LnFeed & 0x8000)==0; - LF100=AktAtr.LnFeed & 0x7FFF; - if (LFauto) LF100=LF100*AktAtr.Grad; else LF100*=LF100; - if (AktAtr.ChrVPos>0) LF100-=AktAtr.ChrVPos*100; - if (LF100>MaxLF100) MaxLF100=LF100; - Grad=AktAtr.Grad; - if (AktAtr.ChrVPos>0) Grad=Grad-AktAtr.ChrVPos; - if (Grad>MaxGrad) MaxGrad=Grad; - First=FALSE; - } - if (!AbsEnd && c!=' ') r=i; - } - MaxGrad=hPoint2Sgf(MaxGrad); - if (MaxLF100<=4000) { // sonst Overflowgefahr - LF=USHORT(hPoint2Sgf(short(MaxLF100)) /100); - } else { - LF=USHORT(hPoint2Sgf(short(MaxLF100) /100)); - } - - return r; -} - -// End of AbsRead.Pas -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// - - - -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// -// iFont.Pas - -#define DefaultSlant 1500 /* Default: Italic ist 15deg */ -#define SuperSubFact 60 /* SuperScript/SubScript: 60% vom Schriftgrad */ -#define DefaultSpace 40 /* Default: Space ist 40% vom SchriftGrad */ - -USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dreh, - USHORT FitXMul, USHORT FitXDiv, USHORT FitYMul, USHORT FitYDiv) -{ - SgfFontOne* pSgfFont; // Font aus dem IniFile - Font aFont; - Color aColor; - ULONG Grad; - ULONG Brei; - String FNam; - USHORT StdBrei=50; // Durchschnittliche Zeichenbreite in % von Schriftgrad - BOOL bFit=(FitXMul!=1 || FitXDiv!=1 || FitYMul!=1 || FitYDiv!=1); - - pSgfFont = pSgfFonts->GetFontDesc(Atr.GetFont()); - - if ( pSgfFont!=NULL ) - { - FNam =pSgfFont->SVFName; - StdBrei=pSgfFont->SVWidth; - if (pSgfFont->Fixd) aFont.SetPitch(PITCH_FIXED); else aFont.SetPitch(PITCH_VARIABLE); - aFont.SetFamily(pSgfFont->SVFamil); - aFont.SetCharSet(pSgfFont->SVChSet); - aFont.SetName(FNam); - } - else - { // Falls nich im Inifile, sind hier einige Fonts hart kodiert - aFont.SetPitch(PITCH_VARIABLE); - switch (Atr.GetFont()) { - case 92500: case 92501: case 92504: case 92505: - { -#if defined(WNT) || defined(PM2) - FNam=String::CreateFromAscii( "Times New Roman" ); // CG Times ist unter Windows und OS/2 Times New Roman -#else - FNam=String::CreateFromAscii( "Times" ); // ansonsten ist das einfach Times -#endif - StdBrei=40; - aFont.SetFamily(FAMILY_ROMAN); - } break; - case 94021: case 94022: case 94023: case 94024: { -#if defined(WNT) - FNam=String::CreateFromAscii( "Arial", 5 ); // Univers ist unter Windows Arial -#else - FNam=String::CreateFromAscii( "Helvetica" ); // und ansonsten Helvetica -#endif - aFont.SetFamily(FAMILY_SWISS); - StdBrei=47; - } break; - case 93950: case 93951: case 93952: case 93953: { -#if defined(WNT) - FNam=String::CreateFromAscii( "Courier New" ); // Der Vector-Courierfont unter Windows heisst Courier New -#else - FNam=String::CreateFromAscii( "Courier" ); // ansonsten ist und bleibt Courier immer Courier -#endif - aFont.SetFamily(FAMILY_ROMAN); - aFont.SetPitch(PITCH_FIXED); - } break; - default: FNam=String::CreateFromAscii( "Helvetica", 9 ); - } - aFont.SetName(FNam); - //aFont.SetCharSet(CHARSET_SYSTEM); - } - - Grad=ULONG(Atr.Grad); - if ((Atr.Schnitt & TextKaptBit) !=0 && Kapt) Grad=Grad*ULONG(Atr.Kapit)/100; - if ((Atr.Schnitt & TextSupSBit) !=0 || (Atr.Schnitt & TextSubSBit) !=0) Grad=Grad*SuperSubFact/100; - Brei=Grad; - if (Atr.Breite!=100 || bFit) { - if (bFit) { - Grad=Grad*ULONG(FitYMul)/ULONG(FitYDiv); - Brei=Brei*ULONG(FitXMul)/ULONG(FitXDiv); - } - Brei=Brei*ULONG(Atr.Breite)/100; - Brei=Brei*ULONG(StdBrei)/100; - aFont.SetSize(Size(hPoint2Sgf(USHORT(Brei)),hPoint2Sgf(USHORT(Grad)))); - } else { - aFont.SetSize(Size(0,hPoint2Sgf(USHORT(Grad)))); - } - - aColor=Sgv2SvFarbe(Atr.L.LFarbe,Atr.L.LBFarbe,Atr.L.LIntens); aFont.SetColor(aColor); - aColor=Sgv2SvFarbe(Atr.F.FFarbe,Atr.F.FBFarbe,Atr.F.FIntens); aFont.SetFillColor(aColor); - aFont.SetTransparent(TRUE); - aFont.SetAlign(ALIGN_BASELINE); - - Dreh/=10; Dreh=3600-Dreh; if (Dreh==3600) Dreh=0; - aFont.SetOrientation(Dreh); - - if ((Atr.Schnitt & TextBoldBit) !=0) aFont.SetWeight(WEIGHT_BOLD); - if ((Atr.Schnitt & TextRSlnBit) !=0) aFont.SetItalic(ITALIC_NORMAL); - if ((Atr.Schnitt & TextUndlBit) !=0) aFont.SetUnderline(UNDERLINE_SINGLE); - if ((Atr.Schnitt & TextDbUnBit) !=0) aFont.SetUnderline(UNDERLINE_DOUBLE); - if ((Atr.Schnitt & TextStrkBit) !=0) aFont.SetStrikeout(STRIKEOUT_SINGLE); - if ((Atr.Schnitt & TextDbStBit) !=0) aFont.SetStrikeout(STRIKEOUT_DOUBLE); - if ((Atr.Schnitt & TextSh2DBit) !=0) aFont.SetShadow(TRUE); - if ((Atr.Schnitt & TextSh3DBit) !=0) aFont.SetShadow(TRUE); - if ((Atr.Schnitt & TextSh4DBit) !=0) aFont.SetShadow(TRUE); - if ((Atr.Schnitt & TextShEbBit) !=0) aFont.SetShadow(TRUE); - if (CheckTextOutl(Atr.F,Atr.L)) aFont.SetOutline(TRUE); - - if (aFont!=rOut.GetFont()) rOut.SetFont(aFont); - - return 0; -} - -// iFont.Pas -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// -// Absatz.Pas - -struct ProcChrSta { - USHORT Index; - USHORT ChrXP; - UCHAR OutCh; - BOOL Kapt; - ObjTextType Attrib; -}; - -void InitProcessCharState(ProcChrSta& State, ObjTextType& AktAtr, USHORT IndexA) -{ - State.Attrib=AktAtr; - State.OutCh=0; - State.Index=IndexA; - State.ChrXP=0; - State.Kapt=FALSE; -} - -BOOL UpcasePossible(UCHAR c) -{ - if ((c>='a' && c<='z') || c == 0xe4 || c == 0xf6 || c == 0xfc ) return TRUE; - else return FALSE; -} - -UCHAR Upcase(UCHAR c) -{ - if ((c>=(UCHAR)'a' && c<=(UCHAR)'z')) c=(c-(UCHAR)'a')+(UCHAR)'A'; - else if ( c == 0xe4 ) c = 0xc4; - else if ( c == 0xf6 ) c = 0xd6; - else if ( c == 0xfc ) c = 0xdc; - return c; -} - -USHORT GetCharWidth(OutputDevice& rOut, UCHAR c) -{ - UCHAR c1; - USHORT ChrWidth; - - c1 = ByteString::Convert((char)c,RTL_TEXTENCODING_IBM_437, gsl_getSystemTextEncoding() ); - if (c==' ') - { - ChrWidth=(USHORT)rOut.GetTextWidth( String('A') ); - if (rOut.GetFont().GetPitch()!=PITCH_FIXED) { - ChrWidth=MulDiv(ChrWidth,DefaultSpace,100); - } - } else { - // with MaxChar == 255 c cannot be greater than MaxChar - // assert if MaxChar is ever changed - OSL_ENSURE( MaxChar == 255, "MaxChar not 255" ); - if (c>=MinChar /*&& c<=MaxChar*/) - { - ChrWidth=(USHORT)rOut.GetTextWidth(String((char)c1)); - } - else - { - ChrWidth=(USHORT)rOut.GetTextWidth(String('A')); - } - } - return ChrWidth; -} - -UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, ProcChrSta& R, ObjTextType& Atr0, - USHORT& nChars, USHORT Rest, - short* Line, UCHAR* cLine) -{ - USHORT KernDist=0; // Wert fuer Kerning - USHORT ChrWidth; - UCHAR c; - UCHAR c1; - BOOL AbsEnd; - - c=GetTextChar(TBuf,R.Index,Atr0,R.Attrib,Rest,FALSE); // versucht evtl. zu trennen, wenn Rest entsprechenden Wert besitzt - - AbsEnd=(c==AbsatzEnd || c==TextEnd); - if (AbsEnd==FALSE) { - R.OutCh=ConvertTextChar(c); // von HardTrenn nach '-', ... - R.Kapt=(R.Attrib.Schnitt & TextKaptBit) !=0 && UpcasePossible(R.OutCh); - if (R.Kapt) R.OutCh=Upcase(R.OutCh); - SetTextContext(rOut,R.Attrib,R.Kapt,0,1,1,1,1); - - if (R.Kapt) c1=Upcase(c); else c1=c; - ChrWidth=GetCharWidth(rOut,c1); - - if (R.Attrib.ZAbst!=100) { // Spezial-Zeichenabstand ? - ULONG Temp; - Temp=ULONG(ChrWidth)*ULONG(R.Attrib.ZAbst)/100; - ChrWidth=USHORT(Temp); - } - nChars++; - if (R.ChrXP>32000) R.ChrXP=32000; - Line[nChars]=R.ChrXP-KernDist; - cLine[nChars]=c; - R.ChrXP+=ChrWidth-KernDist; // Position fuer den naechsten Character - } - return c; -} - -void FormatLine(UCHAR* TBuf, USHORT& Index, ObjTextType& Atr0, ObjTextType& AktAtr, - USHORT UmbWdt, USHORT AdjWdt, - short* Line, USHORT& nChars, - double, double, - UCHAR* cLine, BOOL TextFit) -{ - VirtualDevice vOut; - UCHAR c,c0; - UCHAR ct; - BOOL First; // erster Char ? - BYTE Just = 0; // Absatzformatierung - BOOL Border; // Rand der Box erreicht ? - BOOL Border0; - BOOL AbsEnd; // Ende des Absatzes erreicht ? - ProcChrSta* R=new ProcChrSta; - ProcChrSta* R0=new ProcChrSta; - ProcChrSta* WErec=new ProcChrSta; - USHORT WEnChar; - ProcChrSta* WErec0=new ProcChrSta; - USHORT WEnChar0; - ProcChrSta* TRrec=new ProcChrSta; - USHORT TRnChar; - - USHORT WordEndCnt; // Justieren und Trennen - BOOL WordEnd; - BOOL Trenn; - - short BoxRest; // zum Quetschen und formatieren - USHORT i,j,k,h; - USHORT re,li; - - vOut.SetMapMode(MapMode(MAP_10TH_MM,Point(),Fraction(1,4),Fraction(1,4))); - - nChars=0; - SetTextContext(vOut,AktAtr,FALSE,0,1,1,1,1); - InitProcessCharState(*R,AktAtr,Index); - (*R0)=(*R); (*WErec)=(*R); WEnChar=0; c0=0; Border0=FALSE; - Border=FALSE; First=TRUE; - WordEndCnt=0; - - do { // mal schauen, wieviele Worte so in die Zeile passen - if (Border) c=ProcessChar(vOut,TBuf,*R,Atr0,nChars,DoTrenn,Line,cLine); - else c=ProcessChar(vOut,TBuf,*R,Atr0,nChars,NoTrenn,Line,cLine); - AbsEnd=(c==AbsatzEnd || c==TextEnd); - //if not AbsEnd then - { - if (First) { - Just=R->Attrib.Justify & 0x0F; // Absatzformat steht wenn, dann am Anfang - } - Border=R->ChrXP>UmbWdt; - WordEnd=(AbsEnd || (c==' ')) && (c0!=' ') && (c0!=0); - Trenn=c=='-'; - if (WordEnd && !Border0) { - WordEndCnt++; - (*WErec)=(*R0); - WEnChar=nChars-1; - } - if (Trenn && !Border) { - WordEndCnt++; - (*WErec)=(*R); - WEnChar=nChars; - } - } - (*R0)=(*R); c0=c; - Border0=Border; - First=FALSE; - AbsEnd=AbsEnd || (nChars>=MaxLineChars); - } while (!(AbsEnd || (Border && ((WordEndCnt>0) || WordEnd || Trenn)))); - - if (Border) { // Trennen und Quetschen - (*WErec0)=(*WErec); WEnChar0=WEnChar; - AbsEnd=FALSE; c0=0; - (*R)=(*WErec); nChars=WEnChar; - (*TRrec)=(*R); TRnChar=nChars; - Border0=FALSE; Border=FALSE; - do { // erst mal gucken wieviele Silben noch reinpassen - ct=ProcessChar(vOut,TBuf,*TRrec,Atr0,TRnChar,DoTrenn,Line,cLine); - c=ProcessChar(vOut,TBuf,*R,Atr0,nChars,NoTrenn,Line,cLine); - AbsEnd=(ct==AbsatzEnd) || (ct==TextEnd) || (nChars>=MaxLineChars); - - Border=TRrec->ChrXP>UmbWdt; - WordEnd=AbsEnd || ((AbsEnd || (c==' ')) && (c0!=' ') && (c0!=0)); - Trenn=ct=='-'; - if (WordEnd && (!Border0 || (WordEndCnt==0))) { - WordEndCnt++; - (*WErec)=(*R0); - if (AbsEnd) WEnChar=nChars; else WEnChar=nChars-1; - (*TRrec)=(*R); TRnChar=nChars; // zum weitersuchen - } - if (Trenn && (!Border || (WordEndCnt==0))) { - WordEndCnt++; // merken, dass man hier trennen kann - (*WErec)=(*TRrec); - WEnChar=TRnChar; - (*TRrec)=(*R); TRnChar=nChars; // zum weitersuchen - } - (*R0)=(*R); c0=c; - Border0=Border; - Border=R->ChrXP>UmbWdt; - } while (!(AbsEnd || (Border && ((WordEndCnt>0) || WordEnd || Trenn)))); - - while (WErec0->IndexIndex) { // damit Line[] auch garantiert stimmt } - c=ProcessChar(vOut,TBuf,*WErec0,Atr0,WEnChar0,WEnChar-WEnChar0-1,Line,cLine); - } - - (*R)=(*WErec); nChars=WEnChar; - - if (UmbWdt>=R->ChrXP) { - BoxRest=UmbWdt-R->ChrXP; - } else { // Zusammenquetschen - BoxRest=R->ChrXP-UmbWdt; // um soviel muss gequetscht werden - for (i=2;i<=nChars;i++) { // 1. CharPosition bleibt ! - Line[i]-=(i-1)*(BoxRest) /(nChars-1); - } - R->ChrXP=UmbWdt; - Line[nChars+1]=UmbWdt; - } - } - - if (!AbsEnd) { - do { // Leerzeichen weglesen - (*WErec)=(*R); - c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,FALSE); - nChars++; - Line[nChars]=R->ChrXP; - cLine[nChars]=c; - } while (c==' '); - if (c!=' ' && c!=AbsatzEnd && c!=TextEnd) { - nChars--; - (*R)=(*WErec); - } - } - - if (AbsEnd && nCharsChrXP; // Damit AbsatzEnde auch weggelesen wird - Line[nChars+1]=R->ChrXP; // denn die Breite von CR oder #0 ist nun mal sehr klein - if (TBuf[R->Index-1]!=AbsatzEnd && TBuf[R->Index-1]!=TextEnd) { - c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,FALSE); // Kleine Korrektur. Notig, wenn nur 1 Wort in - } - } - - BoxRest=AdjWdt-R->ChrXP; - if (TextFit) Just=THJustLeft; - - switch (Just) { - case THJustLeft: break; // Links - case THJustCenter: { - BoxRest=BoxRest /2; // Mitte - for (i=1;i<=nChars;i++) Line[i]=Line[i]+BoxRest; - } break; - case THJustRight: { // Rechts - for (i=1;i<=nChars;i++) Line[i]=Line[i]+BoxRest; - } break; - case THJustDrvOut: - case THJustBlock: { // Block und Austreibend - re=nChars; - if (Just==THJustDrvOut) re--; - while (re>=1 && (cLine[re]==' ' || cLine[re]==TextEnd || cLine[re]==AbsatzEnd)) re--; - li=1; - while (li<=re && (cLine[li]==' ' || cLine[li]==TextEnd || cLine[li]==AbsatzEnd)) li++; - if (Just==THJustDrvOut) BoxRest=AdjWdt-Line[re+1]; - - j=0; // Anzahl der Spaces ermitteln - for (i=li;i<=re;i++) { - if (cLine[i]==' ') { - j++; - } - } - - if (j==0) { // nur 1 Wort ? -> Strecken ! - for (i=li+1;i<=re;i++) { // von links nach rechts - Line[i]=Line[i]+MulDiv(i-li,BoxRest,re-li+1-1); - } - } else { - k=0; h=0; - for (i=li;i<=re;i++) { // j Spaces aufbohren ! - if (cLine[i]==' ') { // Space gefunden ! - k++; - h=MulDiv(k,BoxRest,j); - } - Line[i]=Line[i]+h; - } - } - for (i=re+1;i<=nChars;i++) Line[i]=Line[i]+BoxRest; // und den Rest anpassen - Line[nChars+1]=AdjWdt; - } break; - case THJustLocked: { //Gesperrt - re=nChars-1; - while (re>=1 && (cLine[re]==' ' || cLine[re]==TextEnd || cLine[re]==AbsatzEnd)) re--; - li=1; - while (li<=re && (cLine[li]==' ' || cLine[li]==TextEnd || cLine[li]==AbsatzEnd)) li++; - BoxRest=AdjWdt-Line[re+1]; - for (i=li+1;i<=re;i++) { // Strecken von links nach rechts - Line[i]=Line[i]+MulDiv(i-li,BoxRest,re-li+1-1); - } - for (i=re+1;i<=nChars;i++) Line[i]=Line[i]+BoxRest; // und den Rest anpassen - Line[nChars+1]=AdjWdt; - } break; - } - Index=R->Index; - AktAtr=R->Attrib; - delete R; - delete R0; - delete WErec; - delete WErec0; - delete TRrec; -} - - - -// End of Absatz.Pas -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// -// DrawText.Pas - -void DrawChar(OutputDevice& rOut, UCHAR c, ObjTextType T, PointType Pos, USHORT DrehWink, - USHORT FitXMul, USHORT FitXDiv, USHORT FitYMul, USHORT FitYDiv) -{ - SetTextContext(rOut,T,UpcasePossible(c),DrehWink,FitXMul,FitXDiv,FitYMul,FitYDiv); - if ((T.Schnitt & TextKaptBit)!=0 && UpcasePossible(c)) c=Upcase(c); - String s( (char)c, RTL_TEXTENCODING_IBM_437 ); - rOut.DrawText( Point( Pos.x, Pos.y ), s ); -} - -/************************************************************************* -|* -|* TextType::Draw() -|* -|* Beschreibung -|* Ersterstellung JOE 09.08.93 -|* Letzte Aenderung JOE 09.08.93 -|* -*************************************************************************/ -void TextType::Draw(OutputDevice& rOut) -{ - if ((Flags & TextOutlBit)!=0) return; // Sourcetext fuer Outliner !! - - ObjTextType T1,T2; - USHORT Index1; - USHORT Index2; - UCHAR c = TextEnd; - USHORT l; // Anzahl der Zeichen in der Zeile - USHORT i; - short yPos0; - short xPos; - short yPos; - USHORT LF; - USHORT MaxGrad; - short xSize; - short xSAdj; - short ySize; - double sn,cs; - USHORT TopToBase; - BOOL Ende = 0; - USHORT lc; - BOOL LineFit; // FitSize.x=0? oder Flags -> jede Zeile stretchen - BOOL TextFit; - short* xLine; - UCHAR* cLine; // Buffer fuer FormatLine - USHORT FitXMul; - USHORT FitXDiv; - USHORT FitYMul; - USHORT FitYDiv; - BOOL Fehler; - UCHAR* Buf=Buffer; // Zeiger auf die Buchstaben - - pSgfFonts->ReadList(); - xLine=new short[ChrXPosArrSize]; - cLine=new UCHAR[CharLineSize]; - - TextFit=(Flags & TextFitBits)!=0; - LineFit=FALSE; - LineFit=((Flags & TextFitZBit)!=0); - if (TextFit && FitSize.x==0) LineFit=TRUE; - - if (DrehWink==0) { - sn=0.0; - cs=1.0; - } else { - sn=sin(double(DrehWink)*3.14159265359/18000); - cs=cos(double(DrehWink)*3.14159265359/18000); - } - - T1=T; Index1=0; yPos=0; xPos=0; - if (TextFit) { - ySize=Pos2.y-Pos1.y; - xSize=32000 /2; // Umbruch - xSAdj=Pos2.x-Pos1.x; // zum Ausrichten bei Zentriert/Blocksatz - //if (xSize<=0) { xSize=32000 /2; LineFit=TRUE; } - FitXMul=sal::static_int_cast< USHORT >(abs(Pos2.x-Pos1.x)); FitXDiv=FitSize.x; if (FitXDiv==0) FitXDiv=1; - FitYMul=sal::static_int_cast< USHORT >(abs(Pos2.y-Pos1.y)); FitYDiv=FitSize.y; if (FitYDiv==0) FitYDiv=1; - } else { - xSize=Pos2.x-Pos1.x; - xSAdj=xSize; - ySize=Pos2.y-Pos1.y; - FitXMul=1; FitXDiv=1; - FitYMul=1; FitYDiv=1; - } - if (xSize<0) xSize=0; - if (xSAdj<0) xSAdj=0; - - do { - T2=T1; Index2=Index1; - FormatLine(Buf,Index2,T,T2,xSize,xSAdj,xLine,l,sn,cs,cLine,LineFit); - Fehler=(Index2==Index1); - if (!Fehler) { - lc=GetLineFeed(Buf,Index1,T,T1,l,LF,MaxGrad); - if (TextFit) { - if (LineFit) FitXDiv=xLine[lc+1]; - if (FitXDiv>0) { - long Temp; - for (i=1;i<=l+1;i++) { - Temp=long(xLine[i])*long(FitXMul) /long(FitXDiv); - xLine[i]=short(Temp); - } - LF=MulDiv(LF,FitYMul,FitYDiv); - MaxGrad=MulDiv(MaxGrad,FitYMul,FitYDiv); - } else { - FitXDiv=1; // 0 gibts nicht - } - } - yPos0=yPos; - TopToBase=GetTopToBaseLine(MaxGrad); - yPos=yPos+TopToBase; - Ende=(yPos0+short(MulDiv(MaxGrad,CharTopToBtm,100))>ySize) && !TextFit; - if (!Ende) { - T2=T1; Index2=Index1; - i=1; - while (i<=l) { - c=GetTextCharConv(Buf,Index2,T,T2,l-i,FALSE); - long xp1,yp1; // wegen Overflowgefahr - PointType Pos; - xp1=long(Pos1.x)+xPos+long(xLine[i]); - yp1=long(Pos1.y)+yPos; - if (xp1>32000) xp1=32000; if (xp1<-12000) xp1=-12000; - if (yp1>32000) yp1=32000; if (yp1<-12000) yp1=-12000; - Pos.x=short(xp1); - Pos.y=short(yp1); - - if (DrehWink!=0) RotatePoint(Pos,Pos1.x,Pos1.y,sn,cs); - DrawChar(rOut,c,T2,Pos,DrehWink,FitXMul,FitXDiv,FitYMul,FitYDiv); - i++; - } // while i<=l - yPos=yPos0+LF; - T1=T2; Index1=Index2; // Fuer die naechste Zeile - } // if ObjMin.y+yPos<=Obj_Max.y - } // if !Fehler - } while (c!=TextEnd && !Ende && !Fehler); - delete[] cLine; - delete[] xLine; -} - -// End of DrawText.Pas -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// - -// nicht mehr benoetigt, da der Pointer nun extra gefuehrt wird -// (DEC Alpha hat naemlich 64Bit-Pointer!) -//UCHAR* TextType::GetBufPtr() -//{ -// ULONG Temp; -// Temp=ULONG(BufLo)+0x00010000*ULONG(BufHi); -// return (UCHAR*)Temp; -//} -// -//void TextType::SetBufPtr(UCHAR* Ptr) -//{ -// ULONG Temp=(ULONG)Ptr; -// BufLo=USHORT(Temp & 0x0000FFFF); -// BufHi=USHORT((Temp & 0xFFFF0000)>>16); -//} - -UINT32 ObjTextType::GetFont() -{ - return ULONG(FontLo)+0x00010000*ULONG(FontHi); -} - -void ObjTextType::SetFont(UINT32 FontID) -{ - FontLo=USHORT(FontID & 0x0000FFFF); - FontHi=USHORT((FontID & 0xFFFF0000)>>16); -} - - -///////////////////////////////////////////////////////////////////////////////// -// SGF.Ini lesen //////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////// -SgfFontOne::SgfFontOne() -{ - Next=NULL; - IFID=0; - Bold=FALSE; - Ital=FALSE; - Sans=FALSE; - Serf=FALSE; - Fixd=FALSE; - SVFamil=FAMILY_DONTKNOW; - SVChSet=RTL_TEXTENCODING_DONTKNOW; - SVWidth=40; -} - -void SgfFontOne::ReadOne( ByteString& ID, ByteString& Dsc ) -{ - USHORT i,j,n; - ByteString s; - - if ( Dsc.Len() < 4 || ( Dsc.GetChar( 0 ) != '(' ) ) - return; - i=1; // Erster Buchstabe des IF-Fontnamen. Davor ist eine '(' - while ( i < Dsc.Len() && ( Dsc.GetChar( i ) !=')' ) ) - i++; - Dsc.Erase(0,i+1); // IF-Fontname loeschen inkl. () - - if ( Dsc.Len() < 2 || ( Dsc.GetChar( Dsc.Len() - 1 ) !=')' ) ) - return; - i=Dsc.Len()-2; // hier ist die ')' des SV-Fontnames - j=0; - while ( i > 0 && ( Dsc.GetChar( i ) != '(' ) ) - { - i--; - j++; - } - SVFName=String(Dsc,i+1,j); // SV-Fontname rausholen - Dsc.Erase(i,j); - - IFID = (UINT32)ID.ToInt32(); - n=Dsc.GetTokenCount(' '); - for (i=0;i(s.ToInt32()); - } - } -} - -///////////////////////////////////////////////////////////////////////////////// - -SgfFontLst::SgfFontLst() -{ - pList=NULL; - Last=NULL; - LastID=0; - LastLn=NULL; - Tried=FALSE; -} - -SgfFontLst::~SgfFontLst() -{ - RausList(); -} - -void SgfFontLst::RausList() -{ - SgfFontOne* P; - SgfFontOne* P1; - P=pList; - while (P!=NULL) { - P1=P->Next; - delete P; - P=P1; - } - pList=NULL; - Last=NULL; - Tried=FALSE; - LastID=0; - LastLn=NULL; -} - -void SgfFontLst::AssignFN(const String& rFName) -{ FNam=rFName; } - -void SgfFontLst::ReadList() -{ - if (!Tried) { - Tried=TRUE; - LastID=0; - LastLn=NULL; - SgfFontOne* P,P1; - Config aCfg(FNam); - aCfg.SetGroup("SGV Fonts fuer StarView"); - USHORT Anz=aCfg.GetKeyCount(); - USHORT i; - ByteString FID,Dsc; - - for (i=0;iNext=P; else pList=P; Last=P; // einklinken - P->ReadOne(FID,Dsc); // und Zeile interpretieren - } - } - } -} - -SgfFontOne* SgfFontLst::GetFontDesc(UINT32 ID) -{ - if (ID!=LastID) { - SgfFontOne* P; - P=pList; - while (P!=NULL && P->IFID!=ID) P=P->Next; - LastID=ID; - LastLn=P; - } - return LastLn; -} diff --git a/svtools/source/filter.vcl/igif/decode.cxx b/svtools/source/filter.vcl/igif/decode.cxx deleted file mode 100644 index bfe77319b81a..000000000000 --- a/svtools/source/filter.vcl/igif/decode.cxx +++ /dev/null @@ -1,215 +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_svtools.hxx" - -#include "decode.hxx" - -// ------------------------------------------------------------------------ - -struct GIFLZWTableEntry -{ - GIFLZWTableEntry* pPrev; - GIFLZWTableEntry* pFirst; - BYTE nData; -}; - -// ------------------------------------------------------------------------ - -GIFLZWDecompressor::GIFLZWDecompressor( BYTE cDataSize ) : - nInputBitsBuf ( 0 ), - nOutBufDataLen ( 0 ), - nInputBitsBufSize ( 0 ), - bEOIFound ( FALSE ), - nDataSize ( cDataSize ) -{ - pOutBuf = new BYTE[ 4096 ]; - - nClearCode = 1 << nDataSize; - nEOICode = nClearCode + 1; - nTableSize = nEOICode + 1; - nCodeSize = nDataSize + 1; - nOldCode = 0xffff; - pOutBufData = pOutBuf + 4096; - - pTable = new GIFLZWTableEntry[ 4098 ]; - - for( USHORT i = 0; i < nTableSize; i++ ) - { - pTable[i].pPrev = NULL; - pTable[i].pFirst = pTable + i; - pTable[i].nData = (BYTE) i; - } -} - -// ------------------------------------------------------------------------ - -GIFLZWDecompressor::~GIFLZWDecompressor() -{ - delete[] pOutBuf; - delete[] pTable; -} - -// ------------------------------------------------------------------------ - -HPBYTE GIFLZWDecompressor::DecompressBlock( HPBYTE pSrc, BYTE cBufSize, - ULONG& rCount, BOOL& rEOI ) -{ - ULONG nTargetSize = 4096; - ULONG nCount = 0; - HPBYTE pTarget = (HPBYTE) rtl_allocateMemory( nTargetSize ); - HPBYTE pTmpTarget = pTarget; - - nBlockBufSize = cBufSize; - nBlockBufPos = 0; - pBlockBuf = pSrc; - - while( ProcessOneCode() ) - { - nCount += nOutBufDataLen; - - if( nCount > nTargetSize ) - { - ULONG nNewSize = nTargetSize << 1; - ULONG nOffset = pTmpTarget - pTarget; - HPBYTE pTmp = (HPBYTE) rtl_allocateMemory( nNewSize ); - - memcpy( pTmp, pTarget, nTargetSize ); - rtl_freeMemory( pTarget ); - - nTargetSize = nNewSize; - pTmpTarget = ( pTarget = pTmp ) + nOffset; - } - - memcpy( pTmpTarget, pOutBufData, nOutBufDataLen ); - pTmpTarget += nOutBufDataLen; - pOutBufData += nOutBufDataLen; - nOutBufDataLen = 0; - - if ( bEOIFound ) - break; - } - - rCount = nCount; - rEOI = bEOIFound; - - return pTarget; -} - -// ------------------------------------------------------------------------ - -void GIFLZWDecompressor::AddToTable( USHORT nPrevCode, USHORT nCodeFirstData ) -{ - GIFLZWTableEntry* pE; - - if( nTableSize < 4096 ) - { - pE = pTable + nTableSize; - pE->pPrev = pTable + nPrevCode; - pE->pFirst = pE->pPrev->pFirst; - pE->nData = pTable[ nCodeFirstData ].pFirst->nData; - nTableSize++; - - if ( ( nTableSize == (USHORT) (1 << nCodeSize) ) && ( nTableSize < 4096 ) ) - nCodeSize++; - } -} - -// ------------------------------------------------------------------------ - -BOOL GIFLZWDecompressor::ProcessOneCode() -{ - GIFLZWTableEntry* pE; - USHORT nCode; - BOOL bRet = FALSE; - BOOL bEndOfBlock = FALSE; - - while( nInputBitsBufSize < nCodeSize ) - { - if( nBlockBufPos >= nBlockBufSize ) - { - bEndOfBlock = TRUE; - break; - } - - nInputBitsBuf |= ( (ULONG) pBlockBuf[ nBlockBufPos++ ] ) << nInputBitsBufSize; - nInputBitsBufSize += 8; - } - - if ( !bEndOfBlock ) - { - // Einen Code aus dem Eingabe-Buffer holen: - nCode = sal::static_int_cast< USHORT >( - ( (USHORT) nInputBitsBuf ) & ( ~( 0xffff << nCodeSize ) )); - nInputBitsBuf >>= nCodeSize; - nInputBitsBufSize = nInputBitsBufSize - nCodeSize; - - if ( nCode < nClearCode ) - { - if ( nOldCode != 0xffff ) - AddToTable( nOldCode, nCode ); - } - else if ( ( nCode > nEOICode ) && ( nCode <= nTableSize ) ) - { - if ( nCode == nTableSize ) - AddToTable( nOldCode, nOldCode ); - else - AddToTable( nOldCode, nCode ); - } - else - { - if ( nCode == nClearCode ) - { - nTableSize = nEOICode + 1; - nCodeSize = nDataSize + 1; - nOldCode = 0xffff; - nOutBufDataLen = 0; - } - else - bEOIFound = TRUE; - - return TRUE; - } - - nOldCode = nCode; - - // Zeichen(/-folge) des Codes nCode in den Ausgabe-Buffer schreiben: - pE = pTable + nCode; - do - { - nOutBufDataLen++; - *(--pOutBufData) = pE->nData; - pE = pE->pPrev; - } - while( pE ); - - bRet = TRUE; - } - - return bRet; -} diff --git a/svtools/source/filter.vcl/igif/decode.hxx b/svtools/source/filter.vcl/igif/decode.hxx deleted file mode 100644 index 3c6a61e7508d..000000000000 --- a/svtools/source/filter.vcl/igif/decode.hxx +++ /dev/null @@ -1,68 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _DECODE_HXX -#define _DECODE_HXX - -#ifndef _BMPACC_HXX -#include -#endif - -struct GIFLZWTableEntry; - -class GIFLZWDecompressor -{ - GIFLZWTableEntry* pTable; - HPBYTE pOutBuf; - HPBYTE pOutBufData; - HPBYTE pBlockBuf; - ULONG nInputBitsBuf; - USHORT nTableSize; - USHORT nClearCode; - USHORT nEOICode; - USHORT nCodeSize; - USHORT nOldCode; - USHORT nOutBufDataLen; - USHORT nInputBitsBufSize; - BOOL bEOIFound; - BYTE nDataSize; - BYTE nBlockBufSize; - BYTE nBlockBufPos; - - void AddToTable(USHORT nPrevCode, USHORT nCodeFirstData); - BOOL ProcessOneCode(); - - -public: - - GIFLZWDecompressor( BYTE cDataSize ); - ~GIFLZWDecompressor(); - - HPBYTE DecompressBlock( HPBYTE pSrc, BYTE cBufSize, ULONG& rCount, BOOL& rEOI ); -}; - -#endif diff --git a/svtools/source/filter.vcl/igif/gifread.cxx b/svtools/source/filter.vcl/igif/gifread.cxx deleted file mode 100644 index e4020c727ff4..000000000000 --- a/svtools/source/filter.vcl/igif/gifread.cxx +++ /dev/null @@ -1,858 +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_svtools.hxx" - -#define _GIFPRIVATE - -#include "decode.hxx" -#include "gifread.hxx" - -// ----------- -// - Defines - -// ----------- - -#define NO_PENDING( rStm ) ( ( rStm ).GetError() != ERRCODE_IO_PENDING ) - -// ------------- -// - GIFReader - -// ------------- - -GIFReader::GIFReader( SvStream& rStm ) : - aGPalette ( 256 ), - aLPalette ( 256 ), - rIStm ( rStm ), - pAcc8 ( NULL ), - pAcc1 ( NULL ), - nLastPos ( rStm.Tell() ), - nLogWidth100 ( 0UL ), - nLogHeight100 ( 0UL ), - nLoops ( 1 ), - eActAction ( GLOBAL_HEADER_READING ), - bGCTransparent ( FALSE ), - bImGraphicReady ( FALSE ) -{ - maUpperName = UniString::CreateFromAscii( "SVIGIF", 6 ); - pSrcBuf = new BYTE[ 256 ]; - ClearImageExtensions(); -} - -// ------------------------------------------------------------------------ - -GIFReader::~GIFReader() -{ - aImGraphic.SetContext( NULL ); - - if( pAcc1 ) - aBmp1.ReleaseAccess( pAcc1 ); - - if( pAcc8 ) - aBmp8.ReleaseAccess( pAcc8 ); - - delete[] pSrcBuf; -} - -// ------------------------------------------------------------------------ - -void GIFReader::ClearImageExtensions() -{ - nGCDisposalMethod = 0; - bGCTransparent = FALSE; - nTimer = 0; -} - -// ------------------------------------------------------------------------ - -BOOL GIFReader::CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal, - BOOL bWatchForBackgroundColor ) -{ - const Size aSize( nWidth, nHeight ); - - if( bGCTransparent ) - { - const Color aWhite( COL_WHITE ); - - aBmp1 = Bitmap( aSize, 1 ); - - if( !aAnimation.Count() ) - aBmp1.Erase( aWhite ); - - pAcc1 = aBmp1.AcquireWriteAccess(); - - if( pAcc1 ) - { - cTransIndex1 = (BYTE) pAcc1->GetBestPaletteIndex( aWhite ); - cNonTransIndex1 = cTransIndex1 ? 0 : 1; - } - else - bStatus = FALSE; - } - - if( bStatus ) - { - aBmp8 = Bitmap( aSize, 8, pPal ); - - if( !!aBmp8 && bWatchForBackgroundColor && aAnimation.Count() ) - aBmp8.Erase( (*pPal)[ nBackgroundColor ] ); - else - aBmp8.Erase( Color( COL_WHITE ) ); - - pAcc8 = aBmp8.AcquireWriteAccess(); - bStatus = ( pAcc8 != NULL ); - } - - return bStatus; -} - -// ------------------------------------------------------------------------ - -BOOL GIFReader::ReadGlobalHeader() -{ - char pBuf[ 7 ]; - BYTE nRF; - BYTE nAspect; - BOOL bRet = FALSE; - - rIStm.Read( pBuf, 6 ); - if( NO_PENDING( rIStm ) ) - { - pBuf[ 6 ] = 0; - if( !strcmp( pBuf, "GIF87a" ) || !strcmp( pBuf, "GIF89a" ) ) - { - rIStm.Read( pBuf, 7 ); - if( NO_PENDING( rIStm ) ) - { - SvMemoryStream aMemStm; - - aMemStm.SetBuffer( pBuf, 7, FALSE, 7 ); - aMemStm >> nGlobalWidth; - aMemStm >> nGlobalHeight; - aMemStm >> nRF; - aMemStm >> nBackgroundColor; - aMemStm >> nAspect; - - bGlobalPalette = (BOOL) ( nRF & 0x80 ); - - if( bGlobalPalette ) - ReadPaletteEntries( &aGPalette, 1 << ( ( nRF & 7 ) + 1 ) ); - else - nBackgroundColor = 0; - - if( NO_PENDING( rIStm ) ) - bRet = TRUE; - } - } - else - bStatus = FALSE; - } - - return bRet; -} - -// ------------------------------------------------------------------------ - -void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, ULONG nCount ) -{ - const ULONG nLen = 3UL * nCount; - BYTE* pBuf = new BYTE[ nLen ]; - - rIStm.Read( pBuf, nLen ); - if( NO_PENDING( rIStm ) ) - { - BYTE* pTmp = pBuf; - - for( ULONG i = 0UL; i < nCount; ) - { - BitmapColor& rColor = (*pPal)[ (USHORT) i++ ]; - - rColor.SetRed( *pTmp++ ); - rColor.SetGreen( *pTmp++ ); - rColor.SetBlue( *pTmp++ ); - } - - // nach Moeglichkeit noch einige Standardfarben unterbringen - if( nCount < 256UL ) - { - (*pPal)[ 255UL ] = Color( COL_WHITE ); - - if( nCount < 255UL ) - (*pPal)[ 254UL ] = Color( COL_BLACK ); - } - } - - delete[] pBuf; -} - -// ------------------------------------------------------------------------ - -BOOL GIFReader::ReadExtension() -{ - BYTE cFunction; - BYTE cSize; - BYTE cByte; - BOOL bRet = FALSE; - BOOL bOverreadDataBlocks = FALSE; - - // Extension-Label - rIStm >> cFunction; - if( NO_PENDING( rIStm ) ) - { - // Block-Laenge - rIStm >> cSize; - - switch( cFunction ) - { - // 'Graphic Control Extension' - case( 0xf9 ) : - { - BYTE cFlags; - - rIStm >> cFlags; - rIStm >> nTimer; - rIStm >> nGCTransparentIndex; - rIStm >> cByte; - - if ( NO_PENDING( rIStm ) ) - { - nGCDisposalMethod = ( cFlags >> 2) & 7; - bGCTransparent = ( cFlags & 1 ) ? TRUE : FALSE; - bStatus = ( cSize == 4 ) && ( cByte == 0 ); - bRet = TRUE; - } - } - break; - - // Application-Extension - case ( 0xff ) : - { - if ( NO_PENDING( rIStm ) ) - { - // default diese Extension ueberlesen - bOverreadDataBlocks = TRUE; - - // Appl.-Extension hat Laenge 11 - if ( cSize == 0x0b ) - { - ByteString aAppId; - ByteString aAppCode; - - rIStm.Read( aAppId.AllocBuffer( 8 ), 8 ); - rIStm.Read( aAppCode.AllocBuffer( 3 ), 3 ); - rIStm >> cSize; - - // NetScape-Extension - if( aAppId == "NETSCAPE" && aAppCode == "2.0" && cSize == 3 ) - { - rIStm >> cByte; - - // Loop-Extension - if ( cByte == 0x01 ) - { - rIStm >> cByte; - nLoops = cByte; - rIStm >> cByte; - nLoops |= ( (USHORT) cByte << 8 ); - rIStm >> cByte; - - bStatus = ( cByte == 0 ); - bRet = NO_PENDING( rIStm ); - bOverreadDataBlocks = FALSE; - - // Netscape interpretiert den LoopCount - // als reine Anzahl der _Wiederholungen_; - // bei uns ist es die Gesamtanzahl der - // Durchlaeufe - if( nLoops ) - nLoops++; - } - else - rIStm.SeekRel( -1 ); - } - else if ( aAppId == "STARDIV " && aAppCode == "5.0" && cSize == 9 ) - { - rIStm >> cByte; - - // Loop-Extension - if ( cByte == 0x01 ) - { - rIStm >> nLogWidth100 >> nLogHeight100; - rIStm >> cByte; - bStatus = ( cByte == 0 ); - bRet = NO_PENDING( rIStm ); - bOverreadDataBlocks = FALSE; - } - else - rIStm.SeekRel( -1 ); - } - - } - } - } - break; - - // alles andere ueberlesen - default: - bOverreadDataBlocks = TRUE; - break; - } - - // Sub-Blocks ueberlesen - if ( bOverreadDataBlocks ) - { - bRet = TRUE; - while( cSize && bStatus && !rIStm.IsEof() ) - { - USHORT nCount = (USHORT) cSize + 1; - char* pBuffer = new char[ nCount ]; - - bRet = FALSE; - rIStm.Read( pBuffer, nCount ); - if( NO_PENDING( rIStm ) ) - { - cSize = (BYTE) pBuffer[ cSize ]; - bRet = TRUE; - } - else - cSize = 0; - - delete[] pBuffer; - } - } - } - - return bRet; -} - -// ------------------------------------------------------------------------ - -BOOL GIFReader::ReadLocalHeader() -{ - BYTE pBuf[ 9 ]; - BOOL bRet = FALSE; - - rIStm.Read( pBuf, 9 ); - if( NO_PENDING( rIStm ) ) - { - SvMemoryStream aMemStm; - BitmapPalette* pPal; - BYTE nFlags; - - aMemStm.SetBuffer( (char*) pBuf, 9, FALSE, 9 ); - aMemStm >> nImagePosX; - aMemStm >> nImagePosY; - aMemStm >> nImageWidth; - aMemStm >> nImageHeight; - aMemStm >> nFlags; - - // Falls Interlaced, ersten Startwert vorgeben - bInterlaced = ( ( nFlags & 0x40 ) == 0x40 ); - nLastInterCount = 7; - nLastImageY = 0; - - if( nFlags & 0x80 ) - { - pPal = &aLPalette; - ReadPaletteEntries( pPal, 1 << ( (nFlags & 7 ) + 1 ) ); - } - else - pPal = &aGPalette; - - // Falls alles soweit eingelesen werden konnte, kann - // nun das lokale Bild angelegt werden; - // es wird uebergeben, ob der BackgroundColorIndex evtl. - // beruecksichtigt werden soll ( wenn Globale Farbtab. und - // diese auch fuer dieses Bild gilt ) - if( NO_PENDING( rIStm ) ) - { - CreateBitmaps( nImageWidth, nImageHeight, pPal, bGlobalPalette && ( pPal == &aGPalette ) ); - bRet = TRUE; - } - } - - return bRet; -} - -// ------------------------------------------------------------------------ - -ULONG GIFReader::ReadNextBlock() -{ - ULONG nRet = 0UL; - ULONG nRead; - BYTE cBlockSize; - - rIStm >> cBlockSize; - - if ( rIStm.IsEof() ) - nRet = 4UL; - else if ( NO_PENDING( rIStm ) ) - { - if ( cBlockSize == 0 ) - nRet = 2UL; - else - { - rIStm.Read( pSrcBuf, cBlockSize ); - - if( NO_PENDING( rIStm ) ) - { - if( bOverreadBlock ) - nRet = 3UL; - else - { - BOOL bEOI; - HPBYTE pTarget = pDecomp->DecompressBlock( pSrcBuf, cBlockSize, nRead, bEOI ); - - nRet = ( bEOI ? 3 : 1 ); - - if( nRead && !bOverreadBlock ) - FillImages( pTarget, nRead ); - - rtl_freeMemory( pTarget ); - } - } - } - } - - return nRet; -} - -// ------------------------------------------------------------------------ - -void GIFReader::FillImages( HPBYTE pBytes, ULONG nCount ) -{ - for( ULONG i = 0UL; i < nCount; i++ ) - { - if( nImageX >= nImageWidth ) - { - if( bInterlaced ) - { - long nT1, nT2; - - // falls Interlaced, werden die Zeilen kopiert - if( nLastInterCount ) - { - long nMinY = Min( (long) nLastImageY + 1, (long) nImageHeight - 1 ); - long nMaxY = Min( (long) nLastImageY + nLastInterCount, (long) nImageHeight - 1 ); - - // letzte gelesene Zeile kopieren, wenn Zeilen - // nicht zusanmmenfallen ( kommt vorm wenn wir am Ende des Bildes sind ) - if( ( nMinY > nLastImageY ) && ( nLastImageY < ( nImageHeight - 1 ) ) ) - { - HPBYTE pScanline8 = pAcc8->GetScanline( nYAcc ); - ULONG nSize8 = pAcc8->GetScanlineSize(); - HPBYTE pScanline1 = 0; - ULONG nSize1 = 0; - - if( bGCTransparent ) - { - pScanline1 = pAcc1->GetScanline( nYAcc ); - nSize1 = pAcc1->GetScanlineSize(); - } - - for( long j = nMinY; j <= nMaxY; j++ ) - { - memcpy( pAcc8->GetScanline( j ), pScanline8, nSize8 ); - - if( bGCTransparent ) - memcpy( pAcc1->GetScanline( j ), pScanline1, nSize1 ); - } - } - } - - nT1 = ( ++nImageY ) << 3; - nLastInterCount = 7; - - if( nT1 >= nImageHeight ) - { - nT2 = nImageY - ( ( nImageHeight + 7 ) >> 3 ); - nT1 = ( nT2 << 3 ) + 4; - nLastInterCount = 3; - - if( nT1 >= nImageHeight ) - { - nT2 -= ( nImageHeight + 3 ) >> 3; - nT1 = ( nT2 << 2 ) + 2; - nLastInterCount = 1; - - if( nT1 >= nImageHeight ) - { - nT2 -= ( nImageHeight + 1 ) >> 2; - nT1 = ( nT2 << 1 ) + 1; - nLastInterCount = 0; - } - } - } - - nLastImageY = (USHORT) nT1; - nYAcc = nT1; - } - else - { - nLastImageY = ++nImageY; - nYAcc = nImageY; - } - - // Zeile faengt von vorne an - nImageX = 0; - } - - if( nImageY < nImageHeight ) - { - const BYTE cTmp = pBytes[ i ]; - - if( bGCTransparent ) - { - if( cTmp == nGCTransparentIndex ) - pAcc1->SetPixel( nYAcc, nImageX++, cTransIndex1 ); - else - { - pAcc8->SetPixel( nYAcc, nImageX, cTmp ); - pAcc1->SetPixel( nYAcc, nImageX++, cNonTransIndex1 ); - } - } - else - pAcc8->SetPixel( nYAcc, nImageX++, cTmp ); - } - else - { - bOverreadBlock = TRUE; - break; - } - } -} - -// ------------------------------------------------------------------------ - -void GIFReader::CreateNewBitmaps() -{ - AnimationBitmap aAnimBmp; - - aBmp8.ReleaseAccess( pAcc8 ); - pAcc8 = NULL; - - if( bGCTransparent ) - { - aBmp1.ReleaseAccess( pAcc1 ); - pAcc1 = NULL; - aAnimBmp.aBmpEx = BitmapEx( aBmp8, aBmp1 ); - } - else - aAnimBmp.aBmpEx = BitmapEx( aBmp8 ); - - aAnimBmp.aPosPix = Point( nImagePosX, nImagePosY ); - aAnimBmp.aSizePix = Size( nImageWidth, nImageHeight ); - aAnimBmp.nWait = ( nTimer != 65535 ) ? nTimer : ANIMATION_TIMEOUT_ON_CLICK; - aAnimBmp.bUserInput = FALSE; - - if( nGCDisposalMethod == 2 ) - aAnimBmp.eDisposal = DISPOSE_BACK; - else if( nGCDisposalMethod == 3 ) - aAnimBmp.eDisposal = DISPOSE_PREVIOUS; - else - aAnimBmp.eDisposal = DISPOSE_NOT; - - aAnimation.Insert( aAnimBmp ); - - if( aAnimation.Count() == 1 ) - { - aAnimation.SetDisplaySizePixel( Size( nGlobalWidth, nGlobalHeight ) ); - aAnimation.SetLoopCount( nLoops ); - } -} - -// ------------------------------------------------------------------------ - -const Graphic& GIFReader::GetIntermediateGraphic() -{ - // Intermediate-Graphic nur erzeugen, wenn schon - // Daten vorliegen, aber die Graphic noch nicht - // vollstaendig eingelesen wurde - if ( bImGraphicReady && !aAnimation.Count() ) - { - Bitmap aBmp; - - aBmp8.ReleaseAccess( pAcc8 ); - - if ( bGCTransparent ) - { - aBmp1.ReleaseAccess( pAcc1 ); - aImGraphic = BitmapEx( aBmp8, aBmp1 ); - - pAcc1 = aBmp1.AcquireWriteAccess(); - bStatus = bStatus && ( pAcc1 != NULL ); - } - else - aImGraphic = aBmp8; - - pAcc8 = aBmp8.AcquireWriteAccess(); - bStatus = bStatus && ( pAcc8 != NULL ); - } - - return aImGraphic; -} - -// ------------------------------------------------------------------------ - -BOOL GIFReader::ProcessGIF() -{ - BOOL bRead = FALSE; - BOOL bEnd = FALSE; - - if ( !bStatus ) - eActAction = ABORT_READING; - - // Stream an die richtige Stelle bringen - rIStm.Seek( nLastPos ); - - switch( eActAction ) - { - // naechsten Marker lesen - case( MARKER_READING ): - { - BYTE cByte; - - rIStm >> cByte; - - if( rIStm.IsEof() ) - eActAction = END_READING; - else if( NO_PENDING( rIStm ) ) - { - bRead = TRUE; - - if( cByte == '!' ) - eActAction = EXTENSION_READING; - else if( cByte == ',' ) - eActAction = LOCAL_HEADER_READING; - else if( cByte == ';' ) - eActAction = END_READING; - else - eActAction = ABORT_READING; - } - } - break; - - // ScreenDescriptor lesen - case( GLOBAL_HEADER_READING ): - { - if( ( bRead = ReadGlobalHeader() ) == TRUE ) - { - ClearImageExtensions(); - eActAction = MARKER_READING; - } - } - break; - - - // Extension lesen - case( EXTENSION_READING ): - { - if( ( bRead = ReadExtension() ) == TRUE ) - eActAction = MARKER_READING; - } - break; - - - // Image-Descriptor lesen - case( LOCAL_HEADER_READING ): - { - if( ( bRead = ReadLocalHeader() ) == TRUE ) - { - nYAcc = nImageX = nImageY = 0; - eActAction = FIRST_BLOCK_READING; - } - } - break; - - - // ersten Datenblock lesen - case( FIRST_BLOCK_READING ): - { - BYTE cDataSize; - - rIStm >> cDataSize; - - if( rIStm.IsEof() ) - eActAction = ABORT_READING; - else if( cDataSize > 12 ) - bStatus = FALSE; - else if( NO_PENDING( rIStm ) ) - { - bRead = TRUE; - pDecomp = new GIFLZWDecompressor( cDataSize ); - eActAction = NEXT_BLOCK_READING; - bOverreadBlock = FALSE; - } - else - eActAction = FIRST_BLOCK_READING; - } - break; - - // naechsten Datenblock lesen - case( NEXT_BLOCK_READING ): - { - USHORT nLastX = nImageX; - USHORT nLastY = nImageY; - ULONG nRet = ReadNextBlock(); - - // Return: 0:Pending / 1:OK; / 2:OK und letzter Block: / 3:EOI / 4:HardAbort - if( nRet ) - { - bRead = TRUE; - - if ( nRet == 1UL ) - { - bImGraphicReady = TRUE; - eActAction = NEXT_BLOCK_READING; - bOverreadBlock = FALSE; - } - else - { - if( nRet == 2UL ) - { - delete pDecomp; - CreateNewBitmaps(); - eActAction = MARKER_READING; - ClearImageExtensions(); - } - else if( nRet == 3UL ) - { - eActAction = NEXT_BLOCK_READING; - bOverreadBlock = TRUE; - } - else - { - delete pDecomp; - CreateNewBitmaps(); - eActAction = ABORT_READING; - ClearImageExtensions(); - } - } - } - else - { - nImageX = nLastX; - nImageY = nLastY; - } - } - break; - - // ein Fehler trat auf - case( ABORT_READING ): - { - bEnd = TRUE; - eActAction = END_READING; - } - break; - - default: - break; - } - - // Stream an die richtige Stelle bringen, - // falls Daten gelesen werden konnten - // entweder alte Position oder aktuelle Position - if( bRead || bEnd ) - nLastPos = rIStm.Tell(); - - return bRead; -} - -// ------------------------------------------------------------------------ - -ReadState GIFReader::ReadGIF( Graphic& rGraphic ) -{ - ReadState eReadState; - - bStatus = TRUE; - - while( ProcessGIF() && ( eActAction != END_READING ) ) {} - - if( !bStatus ) - eReadState = GIFREAD_ERROR; - else if( eActAction == END_READING ) - eReadState = GIFREAD_OK; - else - { - if ( rIStm.GetError() == ERRCODE_IO_PENDING ) - rIStm.ResetError(); - - eReadState = GIFREAD_NEED_MORE; - } - - if( aAnimation.Count() == 1 ) - { - rGraphic = aAnimation.Get( 0 ).aBmpEx; - - if( nLogWidth100 && nLogHeight100 ) - { - rGraphic.SetPrefSize( Size( nLogWidth100, nLogHeight100 ) ); - rGraphic.SetPrefMapMode( MAP_100TH_MM ); - } - } - else - rGraphic = aAnimation; - - return eReadState; -} - - -// ------------- -// - ImportGIF - -// ------------- - -BOOL ImportGIF( SvStream & rStm, Graphic& rGraphic ) -{ - GIFReader* pGIFReader = (GIFReader*) rGraphic.GetContext(); - USHORT nOldFormat = rStm.GetNumberFormatInt(); - ReadState eReadState; - BOOL bRet = TRUE; - - rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); - - if( !pGIFReader ) - pGIFReader = new GIFReader( rStm ); - - rGraphic.SetContext( NULL ); - eReadState = pGIFReader->ReadGIF( rGraphic ); - - if( eReadState == GIFREAD_ERROR ) - { - bRet = FALSE; - delete pGIFReader; - } - else if( eReadState == GIFREAD_OK ) - delete pGIFReader; - else - { - rGraphic = pGIFReader->GetIntermediateGraphic(); - rGraphic.SetContext( pGIFReader ); - } - - rStm.SetNumberFormatInt( nOldFormat ); - - return bRet; -} diff --git a/svtools/source/filter.vcl/ixbm/xbmread.cxx b/svtools/source/filter.vcl/ixbm/xbmread.cxx deleted file mode 100644 index 9c7faaafa88c..000000000000 --- a/svtools/source/filter.vcl/ixbm/xbmread.cxx +++ /dev/null @@ -1,398 +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_svtools.hxx" - -#define XBMMINREAD 512 - -#define _XBMPRIVATE -#include -#include "xbmread.hxx" - -// ------------- -// - XBMReader - -// ------------- - -XBMReader::XBMReader( SvStream& rStm ) : - rIStm ( rStm ), - pAcc1 ( NULL ), - nLastPos ( rStm.Tell() ), - nWidth ( 0 ), - nHeight ( 0 ), - bStatus ( TRUE ) -{ - pHexTable = new short[ 256 ]; - maUpperName = String::CreateFromAscii( "SVIXBM", 6 ); - InitTable(); -} - -// ------------------------------------------------------------------------ - -XBMReader::~XBMReader() -{ - delete[] pHexTable; - - if( pAcc1 ) - aBmp1.ReleaseAccess( pAcc1 ); -} - -// ------------------------------------------------------------------------ - -void XBMReader::InitTable() -{ - memset( pHexTable, 0, sizeof( short ) ); - - pHexTable['0'] = 0; - pHexTable['1'] = 1; - pHexTable['2'] = 2; - pHexTable['3'] = 3; - pHexTable['4'] = 4; - pHexTable['5'] = 5; - pHexTable['6'] = 6; - pHexTable['7'] = 7; - pHexTable['8'] = 8; - pHexTable['9'] = 9; - pHexTable['A'] = 10; - pHexTable['B'] = 11; - pHexTable['C'] = 12; - pHexTable['D'] = 13; - pHexTable['E'] = 14; - pHexTable['F'] = 15; - pHexTable['X'] = 0; - pHexTable['a'] = 10; - pHexTable['b'] = 11; - pHexTable['c'] = 12; - pHexTable['d'] = 13; - pHexTable['e'] = 14; - pHexTable['f'] = 15; - pHexTable['x'] = 0; - pHexTable[' '] = -1; - pHexTable[','] = -1; - pHexTable['}'] = -1; - pHexTable['\n'] = -1; - pHexTable['\t'] = -1; - pHexTable['\0'] = -1; -} - -// ------------------------------------------------------------------------ - -ByteString XBMReader::FindTokenLine( SvStream* pInStm, const char* pTok1, - const char* pTok2, const char* pTok3 ) -{ - ByteString aRet; - long nPos1; - long nPos2; - long nPos3; - - bStatus = FALSE; - - do - { - if( !pInStm->ReadLine( aRet ) ) - break; - - if( pTok1 ) - { - if( ( nPos1 = aRet.Search( pTok1 ) ) != STRING_NOTFOUND ) - { - bStatus = TRUE; - - if( pTok2 ) - { - bStatus = FALSE; - - if( ( ( nPos2 = aRet.Search( pTok2 ) ) != STRING_NOTFOUND ) && - ( nPos2 > nPos1 ) ) - { - bStatus = TRUE; - - if( pTok3 ) - { - bStatus = FALSE; - - if( ( ( nPos3 = aRet.Search( pTok3 ) ) != STRING_NOTFOUND ) && ( nPos3 > nPos2 ) ) - bStatus = TRUE; - } - } - } - } - } - } - while( !bStatus ); - - return aRet; -} - -// ------------------------------------------------------------------------ - -long XBMReader::ParseDefine( const sal_Char* pDefine ) -{ - long nRet = 0; - char* pTmp = (char*) pDefine; - unsigned char cTmp; - - // bis zum Ende gehen - pTmp += ( strlen( pDefine ) - 1 ); - cTmp = *pTmp--; - - // letzte Ziffer suchen - while( pHexTable[ cTmp ] == -1 ) - cTmp = *pTmp--; - - // bis vor die Zahl laufen - while( pHexTable[ cTmp ] != -1 ) - cTmp = *pTmp--; - - // auf Anfang der Zahl gehen - pTmp += 2; - - // Hex lesen - if( ( pTmp[0] == '0' ) && ( ( pTmp[1] == 'X' ) || ( pTmp[1] == 'x' ) ) ) - { - pTmp += 2; - cTmp = *pTmp++; - - while ( pHexTable[ cTmp ] != -1 ) - { - nRet = ( nRet << 4 ) + pHexTable[ cTmp ]; - cTmp = *pTmp++; - } - } - // Dezimal lesen - else - { - cTmp = *pTmp++; - while( ( cTmp >= '0' ) && ( cTmp <= '9' ) ) - { - nRet = nRet * 10 + ( cTmp - '0' ); - cTmp = *pTmp++; - } - } - - return nRet; -} - -// ------------------------------------------------------------------------ - -BOOL XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFormat eFormat ) -{ - ByteString aLine; - long nRow = 0; - long nCol = 0; - long nBits = ( eFormat == XBM10 ) ? 16 : 8; - long nBit; - USHORT nValue; - USHORT nDigits; - BOOL bFirstLine = TRUE; - - while( nRow < nHeight ) - { - if( bFirstLine ) - { - xub_StrLen nPos; - - // einfuehrende geschweifte Klammer loeschen - if( (nPos = ( aLine = aLastLine ).Search( '{' ) ) != STRING_NOTFOUND ) - aLine.Erase( 0, nPos + 1 ); - - bFirstLine = FALSE; - } - else if( !pInStm->ReadLine( aLine ) ) - break; - - if( aLine.Len() ) - { - const USHORT nCount = aLine.GetTokenCount( ',' ); - - for( USHORT i = 0; ( i < nCount ) && ( nRow < nHeight ); i++ ) - { - const ByteString aToken( aLine.GetToken( i, ',' ) ); - const xub_StrLen nLen = aToken.Len(); - BOOL bProcessed = FALSE; - - nBit = nDigits = nValue = 0; - - for( xub_StrLen n = 0UL; n < nLen; n++ ) - { - const unsigned char cChar = aToken.GetChar( n ); - const short nTable = pHexTable[ cChar ]; - - if( isxdigit( cChar ) || !nTable ) - { - nValue = ( nValue << 4 ) + nTable; - nDigits++; - bProcessed = TRUE; - } - else if( ( nTable < 0 ) && nDigits ) - { - bProcessed = TRUE; - break; - } - } - - if( bProcessed ) - { - while( ( nCol < nWidth ) && ( nBit < nBits ) ) - pAcc1->SetPixel( nRow, nCol++, ( nValue & ( 1 << nBit++ ) ) ? aBlack : aWhite ); - - if( nCol == nWidth ) - nCol = 0, nRow++; - } - } - } - } - - return TRUE; -} - -// ------------------------------------------------------------------------ - -ReadState XBMReader::ReadXBM( Graphic& rGraphic ) -{ - ReadState eReadState; - BYTE cDummy; - - // sehen, ob wir _alles_ lesen koennen - rIStm.Seek( STREAM_SEEK_TO_END ); - rIStm >> cDummy; - - // falls wir nicht alles lesen koennen - // kehren wir zurueck und warten auf neue Daten - if ( rIStm.GetError() != ERRCODE_IO_PENDING ) - { - ByteString aLine; - int nValue; - - rIStm.Seek( nLastPos ); - bStatus = FALSE; - aLine = FindTokenLine( &rIStm, "#define", "_width" ); - - if ( bStatus ) - { - if ( ( nValue = (int) ParseDefine( aLine.GetBuffer() ) ) > 0 ) - { - nWidth = nValue; - aLine = FindTokenLine( &rIStm, "#define", "_height" ); - - // Falls die Hoehe nicht folgt, suchen wir noch - // einmal vom Anfang der Datei an - if ( !bStatus ) - { - rIStm.Seek( nLastPos ); - aLine = FindTokenLine( &rIStm, "#define", "_height" ); - } - } - else - bStatus = FALSE; - - if ( bStatus ) - { - if ( ( nValue = (int) ParseDefine( aLine.GetBuffer() ) ) > 0 ) - { - nHeight = nValue; - aLine = FindTokenLine( &rIStm, "static", "_bits" ); - - if ( bStatus ) - { - XBMFormat eFormat = XBM10; - - if ( aLine.Search( "short" ) != STRING_NOTFOUND ) - eFormat = XBM10; - else if ( aLine.Search( "char" ) != STRING_NOTFOUND ) - eFormat = XBM11; - else - bStatus = FALSE; - - if ( bStatus && nWidth && nHeight ) - { - aBmp1 = Bitmap( Size( nWidth, nHeight ), 1 ); - pAcc1 = aBmp1.AcquireWriteAccess(); - - if( pAcc1 ) - { - aWhite = pAcc1->GetBestMatchingColor( Color( COL_WHITE ) ); - aBlack = pAcc1->GetBestMatchingColor( Color( COL_BLACK ) ); - bStatus = ParseData( &rIStm, aLine, eFormat ); - } - else - bStatus = FALSE; - } - } - } - } - } - - if( bStatus ) - { - Bitmap aBlackBmp( Size( pAcc1->Width(), pAcc1->Height() ), 1 ); - - aBmp1.ReleaseAccess( pAcc1 ), pAcc1 = NULL; - aBlackBmp.Erase( Color( COL_BLACK ) ); - rGraphic = BitmapEx( aBlackBmp, aBmp1 ); - eReadState = XBMREAD_OK; - } - else - eReadState = XBMREAD_ERROR; - } - else - { - rIStm.ResetError(); - eReadState = XBMREAD_NEED_MORE; - } - - return eReadState; -} - -// ------------- -// - ImportXBM - -// ------------- - -BOOL ImportXBM( SvStream& rStm, Graphic& rGraphic ) -{ - XBMReader* pXBMReader = (XBMReader*) rGraphic.GetContext(); - ReadState eReadState; - BOOL bRet = TRUE; - - if( !pXBMReader ) - pXBMReader = new XBMReader( rStm ); - - rGraphic.SetContext( NULL ); - eReadState = pXBMReader->ReadXBM( rGraphic ); - - if( eReadState == XBMREAD_ERROR ) - { - bRet = FALSE; - delete pXBMReader; - } - else if( eReadState == XBMREAD_OK ) - delete pXBMReader; - else - rGraphic.SetContext( pXBMReader ); - - return bRet; -} diff --git a/svtools/source/filter.vcl/ixpm/rgbtable.hxx b/svtools/source/filter.vcl/ixpm/rgbtable.hxx deleted file mode 100644 index afdab883b369..000000000000 --- a/svtools/source/filter.vcl/ixpm/rgbtable.hxx +++ /dev/null @@ -1,695 +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. - * - ************************************************************************/ - -struct XPMRGBTab -{ - const char* name; - BYTE red; - BYTE green; - BYTE blue; -}; - -static XPMRGBTab pRGBTable[] = { -{ "white", 255, 255, 255 }, -{ "black", 0, 0, 0 }, -{ "snow", 255, 250, 250 }, -{ "GhostWhite", 248, 248, 255 }, -{ "WhiteSmoke", 245, 245, 245 }, -{ "gainsboro", 220, 220, 220 }, -{ "FloralWhite", 255, 250, 240 }, -{ "OldLace", 253, 245, 230 }, -{ "linen", 250, 240, 230 }, -{ "AntiqueWhite", 250, 235, 215 }, -{ "PapayaWhip", 255, 239, 213 }, -{ "BlanchedAlmond", 255, 235, 205 }, -{ "bisque", 255, 228, 196 }, -{ "PeachPuff", 255, 218, 185 }, -{ "NavajoWhite", 255, 222, 173 }, -{ "moccasin", 255, 228, 181 }, -{ "cornsilk", 255, 248, 220 }, -{ "ivory", 255, 255, 240 }, -{ "LemonChiffon", 255, 250, 205 }, -{ "seashell", 255, 245, 238 }, -{ "honeydew", 240, 255, 240 }, -{ "MintCream", 245, 255, 250 }, -{ "azure", 240, 255, 255 }, -{ "AliceBlue", 240, 248, 255 }, -{ "lavender", 230, 230, 250 }, -{ "LavenderBlush", 255, 240, 245 }, -{ "MistyRose", 255, 228, 225 }, -{ "DarkSlateGray", 47, 79, 79 }, -{ "DarkSlateGrey", 47, 79, 79 }, -{ "DimGray", 105, 105, 105 }, -{ "DimGrey", 105, 105, 105 }, -{ "SlateGray", 112, 128, 144 }, -{ "SlateGrey", 112, 128, 144 }, -{ "LightSlateGray", 119, 136, 153 }, -{ "LightSlateGrey", 119, 136, 153 }, -{ "gray", 190, 190, 190 }, -{ "grey", 190, 190, 190 }, -{ "LightGrey", 211, 211, 211 }, -{ "LightGray", 211, 211, 211 }, -{ "MidnightBlue", 25, 25, 112 }, -{ "navy", 0, 0, 128 }, -{ "NavyBlue", 0, 0, 128 }, -{ "CornflowerBlue", 100, 149, 237 }, -{ "DarkSlateBlue", 72, 61, 139 }, -{ "SlateBlue", 106, 90, 205 }, -{ "MediumSlateBlue", 123, 104, 238 }, -{ "LightSlateBlue", 132, 112, 255 }, -{ "MediumBlue", 0, 0, 205 }, -{ "RoyalBlue", 65, 105, 225 }, -{ "blue", 0, 0, 255 }, -{ "DodgerBlue", 30, 144, 255 }, -{ "DeepSkyBlue", 0, 191, 255 }, -{ "SkyBlue", 135, 206, 235 }, -{ "LightSkyBlue", 135, 206, 250 }, -{ "SteelBlue", 70, 130, 180 }, -{ "LightSteelBlue", 176, 196, 222 }, -{ "LightBlue", 173, 216, 230 }, -{ "PowderBlue", 176, 224, 230 }, -{ "PaleTurquoise", 175, 238, 238 }, -{ "DarkTurquoise", 0, 206, 209 }, -{ "MediumTurquoise", 72, 209, 204 }, -{ "turquoise", 64, 224, 208 }, -{ "cyan", 0, 255, 255 }, -{ "LightCyan", 224, 255, 255 }, -{ "CadetBlue", 95, 158, 160 }, -{ "MediumAquamarine", 102, 205, 170 }, -{ "aquamarine", 127, 255, 212 }, -{ "DarkGreen", 0, 100, 0 }, -{ "DarkOliveGreen", 85, 107, 47 }, -{ "DarkSeaGreen", 143, 188, 143 }, -{ "SeaGreen", 46, 139, 87 }, -{ "MediumSeaGreen", 60, 179, 113 }, -{ "LightSeaGreen", 32, 178, 170 }, -{ "PaleGreen", 152, 251, 152 }, -{ "SpringGreen", 0, 255, 127 }, -{ "LawnGreen", 124, 252, 0 }, -{ "green", 0, 255, 0 }, -{ "chartreuse", 127, 255, 0 }, -{ "MediumSpringGreen", 0, 250, 154 }, -{ "GreenYellow", 173, 255 , 47 }, -{ "LimeGreen", 50, 205, 50 }, -{ "YellowGreen", 154, 205, 50 }, -{ "ForestGreen", 34, 139, 34 }, -{ "OliveDrab", 107, 142, 35 }, -{ "DarkKhaki", 189, 183, 107 }, -{ "khaki", 240, 230, 140 }, -{ "PaleGoldenrod", 238, 232, 170 }, -{ "LightGoldenrodYellow", 250, 250, 210 }, -{ "LightYellow", 255, 255, 224 }, -{ "yellow", 255, 255, 0 }, -{ "gold", 255, 215, 0 }, -{ "LightGoldenrod", 238, 221, 130 }, -{ "goldenrod", 218, 165, 32 }, -{ "DarkGoldenrod", 184, 134, 11 }, -{ "RosyBrown", 188, 143, 143 }, -{ "IndianRed", 205, 92, 92 }, -{ "SaddleBrown", 139, 69, 19 }, -{ "sienna", 160, 82, 45 }, -{ "peru", 205, 133, 63 }, -{ "burlywood", 222, 184, 135 }, -{ "beige", 245, 245, 220 }, -{ "wheat", 245, 222, 179 }, -{ "SandyBrown", 244, 164, 96 }, -{ "tan", 210, 180, 140 }, -{ "chocolate", 210, 105, 30 }, -{ "firebrick", 178, 34, 34 }, -{ "brown", 165, 42, 42 }, -{ "DarkSalmon", 233, 150, 122 }, -{ "salmon", 250, 128, 114 }, -{ "LightSalmon", 255, 160, 122 }, -{ "orange", 255, 165, 0 }, -{ "DarkOrange", 255, 140, 0 }, -{ "coral", 255, 127, 80 }, -{ "LightCoral", 240, 128, 128 }, -{ "tomato", 255, 99, 71 }, -{ "OrangeRed", 255, 69, 0 }, -{ "red", 255, 0, 0 }, -{ "HotPink", 255, 105, 180 }, -{ "DeepPink", 255, 20, 147 }, -{ "pink", 255, 192, 203 }, -{ "LightPink", 255, 182, 193 }, -{ "PaleVioletRed", 219, 112, 147 }, -{ "maroon", 176, 48, 96 }, -{ "MediumVioletRed", 199, 21, 133 }, -{ "VioletRed", 208, 32, 144 }, -{ "magenta", 255, 0, 255 }, -{ "violet", 238, 130, 238 }, -{ "plum", 221, 160, 221 }, -{ "orchid", 218, 112, 214 }, -{ "MediumOrchid", 186, 85, 211 }, -{ "DarkOrchid", 153, 50, 204 }, -{ "DarkViolet", 148, 0, 211 }, -{ "BlueViolet", 138, 43, 226 }, -{ "purple", 160, 32, 240 }, -{ "MediumPurple", 147, 112, 219 }, -{ "thistle", 216, 191, 216 }, -{ "snow1", 255, 250, 250 }, -{ "snow2", 238, 233, 233 }, -{ "snow3", 205, 201, 201 }, -{ "snow4", 139, 137, 137 }, -{ "seashell1", 255, 245, 238 }, -{ "seashell2", 238, 229, 222 }, -{ "seashell3", 205, 197, 191 }, -{ "seashell4", 139, 134, 130 }, -{ "AntiqueWhite1", 255, 239, 219 }, -{ "AntiqueWhite2", 238, 223, 204 }, -{ "AntiqueWhite3", 205, 192, 176 }, -{ "AntiqueWhite4", 139, 131, 120 }, -{ "bisque1", 255, 228, 196 }, -{ "bisque2", 238, 213, 183 }, -{ "bisque3", 205, 183, 158 }, -{ "bisque4", 139, 125, 107 }, -{ "PeachPuff1", 255, 218, 185 }, -{ "PeachPuff2", 238, 203, 173 }, -{ "PeachPuff3", 205, 175, 149 }, -{ "PeachPuff4", 139, 119, 101 }, -{ "NavajoWhite1", 255, 222, 173 }, -{ "NavajoWhite2", 238, 207, 161 }, -{ "NavajoWhite3", 205, 179, 139 }, -{ "NavajoWhite4", 139, 121, 94 }, -{ "LemonChiffon1", 255, 250, 205 }, -{ "LemonChiffon2", 238, 233, 191 }, -{ "LemonChiffon3", 205, 201, 165 }, -{ "LemonChiffon4", 139, 137, 112 }, -{ "cornsilk1", 255, 248, 220 }, -{ "cornsilk2", 238, 232, 205 }, -{ "cornsilk3", 205, 200, 177 }, -{ "cornsilk4", 139, 136, 120 }, -{ "ivory1", 255, 255, 240 }, -{ "ivory2", 238, 238, 224 }, -{ "ivory3", 205, 205, 193 }, -{ "ivory4", 139, 139, 131 }, -{ "honeydew1", 240, 255, 240 }, -{ "honeydew2", 224, 238, 224 }, -{ "honeydew3", 193, 205, 193 }, -{ "honeydew4", 131, 139, 131 }, -{ "LavenderBlush1", 255, 240, 245 }, -{ "LavenderBlush2", 238, 224, 229 }, -{ "LavenderBlush3", 205, 193, 197 }, -{ "LavenderBlush4", 139, 131, 134 }, -{ "MistyRose1", 255, 228, 225 }, -{ "MistyRose2", 238, 213, 210 }, -{ "MistyRose3", 205, 183, 181 }, -{ "MistyRose4", 139, 125, 123 }, -{ "azure1", 240, 255, 255 }, -{ "azure2", 224, 238, 238 }, -{ "azure3", 193, 205, 205 }, -{ "azure4", 131, 139, 139 }, -{ "SlateBlue1", 131, 111, 255 }, -{ "SlateBlue2", 122, 103, 238 }, -{ "SlateBlue3", 105, 89, 205 }, -{ "SlateBlue4", 71, 60, 139 }, -{ "RoyalBlue1", 72, 118, 255 }, -{ "RoyalBlue2", 67, 110, 238 }, -{ "RoyalBlue3", 58, 95, 205 }, -{ "RoyalBlue4", 39, 64, 139 }, -{ "blue1", 0, 0, 255 }, -{ "blue2", 0, 0, 238 }, -{ "blue3", 0, 0, 205 }, -{ "blue4", 0, 0, 139 }, -{ "DodgerBlue1", 30, 144, 255 }, -{ "DodgerBlue2", 28, 134, 238 }, -{ "DodgerBlue3", 24, 116, 205 }, -{ "DodgerBlue4", 16, 78, 139 }, -{ "SteelBlue1", 99, 184, 255 }, -{ "SteelBlue2", 92, 172, 238 }, -{ "SteelBlue3", 79, 148, 205 }, -{ "SteelBlue4", 54, 100, 139 }, -{ "DeepSkyBlue1", 0, 191, 255 }, -{ "DeepSkyBlue2", 0, 178, 238 }, -{ "DeepSkyBlue3", 0, 154, 205 }, -{ "DeepSkyBlue4", 0, 104, 139 }, -{ "SkyBlue1", 135, 206, 255 }, -{ "SkyBlue2", 126, 192, 238 }, -{ "SkyBlue3", 108, 166, 205 }, -{ "SkyBlue4", 74, 112, 139 }, -{ "LightSkyBlue1", 176, 226, 255 }, -{ "LightSkyBlue2", 164, 211, 238 }, -{ "LightSkyBlue3", 141, 182, 205 }, -{ "LightSkyBlue4", 96, 123, 139 }, -{ "SlateGray1", 198, 226, 255 }, -{ "SlateGray2", 185, 211, 238 }, -{ "SlateGray3", 159, 182, 205 }, -{ "SlateGray4", 108, 123, 139 }, -{ "LightSteelBlue1", 202, 225, 255 }, -{ "LightSteelBlue2", 188, 210, 238 }, -{ "LightSteelBlue3", 162, 181, 205 }, -{ "LightSteelBlue4", 110, 123, 139 }, -{ "LightBlue1", 191, 239, 255 }, -{ "LightBlue2", 178, 223, 238 }, -{ "LightBlue3", 154, 192, 205 }, -{ "LightBlue4", 104, 131, 139 }, -{ "LightCyan1", 224, 255, 255 }, -{ "LightCyan2", 209, 238, 238 }, -{ "LightCyan3", 180, 205, 205 }, -{ "LightCyan4", 122, 139, 139 }, -{ "PaleTurquoise1", 187, 255, 255 }, -{ "PaleTurquoise2", 174, 238, 238 }, -{ "PaleTurquoise3", 150, 205, 205 }, -{ "PaleTurquoise4", 102, 139, 139 }, -{ "CadetBlue1", 152, 245, 255 }, -{ "CadetBlue2", 142, 229, 238 }, -{ "CadetBlue3", 122, 197, 205 }, -{ "CadetBlue4", 83, 134, 139 }, -{ "turquoise1", 0, 245, 255 }, -{ "turquoise2", 0, 229, 238 }, -{ "turquoise3", 0, 197, 205 }, -{ "turquoise4", 0, 134, 139 }, -{ "cyan1", 0, 255, 255 }, -{ "cyan2", 0, 238, 238 }, -{ "cyan3", 0, 205, 205 }, -{ "cyan4", 0, 139, 139 }, -{ "DarkSlateGray1", 151, 255, 255 }, -{ "DarkSlateGray2", 141, 238, 238 }, -{ "DarkSlateGray3", 121, 205, 205 }, -{ "DarkSlateGray4", 82, 139, 139 }, -{ "aquamarine1", 127, 255, 212 }, -{ "aquamarine2", 118, 238, 198 }, -{ "aquamarine3", 102, 205, 170 }, -{ "aquamarine4", 69, 139, 116 }, -{ "DarkSeaGreen1", 193, 255, 193 }, -{ "DarkSeaGreen2", 180, 238, 180 }, -{ "DarkSeaGreen3", 155, 205, 155 }, -{ "DarkSeaGreen4", 105, 139, 105 }, -{ "SeaGreen1", 84, 255, 159 }, -{ "SeaGreen2", 78, 238, 148 }, -{ "SeaGreen3", 67, 205, 128 }, -{ "SeaGreen4", 46, 139, 87 }, -{ "PaleGreen1", 154, 255, 154 }, -{ "PaleGreen2", 144, 238, 144 }, -{ "PaleGreen3", 124, 205, 124 }, -{ "PaleGreen4", 84, 139, 84 }, -{ "SpringGreen1", 0, 255, 127 }, -{ "SpringGreen2", 0, 238, 118 }, -{ "SpringGreen3", 0, 205, 102 }, -{ "SpringGreen4", 0, 139, 69 }, -{ "green1", 0, 255, 0 }, -{ "green2", 0, 238, 0 }, -{ "green3", 0, 205, 0 }, -{ "green4", 0, 139, 0 }, -{ "chartreuse1", 127, 255, 0 }, -{ "chartreuse2", 118, 238, 0 }, -{ "chartreuse3", 102, 205, 0 }, -{ "chartreuse4", 69, 139, 0 }, -{ "OliveDrab1", 192, 255, 62 }, -{ "OliveDrab2", 179, 238, 58 }, -{ "OliveDrab3", 154, 205, 50 }, -{ "OliveDrab4", 105, 139, 34 }, -{ "DarkOliveGreen1", 202, 255, 112 }, -{ "DarkOliveGreen2", 188, 238, 104 }, -{ "DarkOliveGreen3", 162, 205, 90 }, -{ "DarkOliveGreen4", 110, 139, 61 }, -{ "khaki1", 255, 246, 143 }, -{ "khaki2", 238, 230, 133 }, -{ "khaki3", 205, 198, 115 }, -{ "khaki4", 139, 134, 78 }, -{ "LightGoldenrod1", 255, 236, 139 }, -{ "LightGoldenrod2", 238, 220, 130 }, -{ "LightGoldenrod3", 205, 190, 112 }, -{ "LightGoldenrod4", 139, 129, 76 }, -{ "LightYellow1", 255, 255, 224 }, -{ "LightYellow2", 238, 238, 209 }, -{ "LightYellow3", 205, 205, 180 }, -{ "LightYellow4", 139, 139, 122 }, -{ "yellow1", 255, 255, 0 }, -{ "yellow2", 238, 238, 0 }, -{ "yellow3", 205, 205, 0 }, -{ "yellow4", 139, 139, 0 }, -{ "gold1", 255, 215, 0 }, -{ "gold2", 238, 201, 0 }, -{ "gold3", 205, 173, 0 }, -{ "gold4", 139, 117, 0 }, -{ "goldenrod1", 255, 193, 37 }, -{ "goldenrod2", 238, 180, 34 }, -{ "goldenrod3", 205, 155, 29 }, -{ "goldenrod4", 139, 105, 20 }, -{ "DarkGoldenrod1", 255, 185, 15 }, -{ "DarkGoldenrod2", 238, 173, 14 }, -{ "DarkGoldenrod3", 205, 149, 12 }, -{ "DarkGoldenrod4", 139, 101, 8 }, -{ "RosyBrown1", 255, 193, 193 }, -{ "RosyBrown2", 238, 180, 180 }, -{ "RosyBrown3", 205, 155, 155 }, -{ "RosyBrown4", 139, 105, 105 }, -{ "IndianRed1", 255, 106, 106 }, -{ "IndianRed2", 238, 99, 99 }, -{ "IndianRed3", 205, 85, 85 }, -{ "IndianRed4", 139, 58, 58 }, -{ "sienna1", 255, 130, 71 }, -{ "sienna2", 238, 121, 66 }, -{ "sienna3", 205, 104, 57 }, -{ "sienna4", 139, 71, 38 }, -{ "burlywood1", 255, 211, 155 }, -{ "burlywood2", 238, 197, 145 }, -{ "burlywood3", 205, 170, 125 }, -{ "burlywood4", 139, 115, 85 }, -{ "wheat1", 255, 231, 186 }, -{ "wheat2", 238, 216, 174 }, -{ "wheat3", 205, 186, 150 }, -{ "wheat4", 139, 126, 102 }, -{ "tan1", 255, 165, 79 }, -{ "tan2", 238, 154, 73 }, -{ "tan3", 205, 133, 63 }, -{ "tan4", 139 , 90, 43 }, -{ "chocolate1", 255, 127, 36 }, -{ "chocolate2", 238, 118, 33 }, -{ "chocolate3", 205, 102, 29 }, -{ "chocolate4", 139, 69, 19 }, -{ "firebrick1", 255, 48, 48 }, -{ "firebrick2", 238, 44, 44 }, -{ "firebrick3", 205, 38, 38 }, -{ "firebrick4", 139, 26, 26 }, -{ "brown1", 255, 64, 64 }, -{ "brown2", 238, 59, 59 }, -{ "brown3", 205, 51, 51 }, -{ "brown4", 139, 35, 35 }, -{ "salmon1", 255, 140, 105 }, -{ "salmon2", 238, 130, 98 }, -{ "salmon3", 205, 112, 84 }, -{ "salmon4", 139, 76, 57 }, -{ "LightSalmon1", 255, 160, 122 }, -{ "LightSalmon2", 238, 149, 114 }, -{ "LightSalmon3", 205, 129, 98 }, -{ "LightSalmon4", 139, 87, 66 }, -{ "orange1", 255, 165, 0 }, -{ "orange2", 238, 154, 0 }, -{ "orange3", 205, 133, 0 }, -{ "orange4", 139 , 90, 0 }, -{ "DarkOrange1", 255, 127, 0 }, -{ "DarkOrange2", 238, 118, 0 }, -{ "DarkOrange3", 205, 102, 0 }, -{ "DarkOrange4", 139 , 69, 0 }, -{ "coral1", 255, 114, 86 }, -{ "coral2", 238, 106, 80 }, -{ "coral3", 205, 91, 69 }, -{ "coral4", 139, 62, 47 }, -{ "tomato1", 255, 99, 71 }, -{ "tomato2", 238, 92, 66 }, -{ "tomato3", 205, 79, 57 }, -{ "tomato4", 139, 54, 38 }, -{ "OrangeRed1", 255, 69, 0 }, -{ "OrangeRed2", 238, 64, 0 }, -{ "OrangeRed3", 205, 55, 0 }, -{ "OrangeRed4", 139, 37, 0 }, -{ "red1", 255, 0, 0 }, -{ "red2", 238, 0, 0 }, -{ "red3", 205, 0, 0 }, -{ "red4", 139, 0, 0 }, -{ "DeepPink1", 255, 20, 147 }, -{ "DeepPink2", 238, 18, 137 }, -{ "DeepPink3", 205, 16, 118 }, -{ "DeepPink4", 139, 10, 80 }, -{ "HotPink1", 255, 110, 180 }, -{ "HotPink2", 238, 106, 167 }, -{ "HotPink3", 205, 96, 144 }, -{ "HotPink4", 139, 58, 98 }, -{ "pink1", 255, 181, 197 }, -{ "pink2", 238, 169, 184 }, -{ "pink3", 205, 145, 158 }, -{ "pink4", 139, 99, 108 }, -{ "LightPink1", 255, 174, 185 }, -{ "LightPink2", 238, 162, 173 }, -{ "LightPink3", 205, 140, 149 }, -{ "LightPink4", 139, 95, 101 }, -{ "PaleVioletRed1", 255, 130, 171 }, -{ "PaleVioletRed2", 238, 121, 159 }, -{ "PaleVioletRed3", 205, 104, 137 }, -{ "PaleVioletRed4", 139, 71, 93 }, -{ "maroon1", 255, 52, 179 }, -{ "maroon2", 238, 48, 167 }, -{ "maroon3", 205, 41, 144 }, -{ "maroon4", 139, 28, 98 }, -{ "VioletRed1", 255, 62, 150 }, -{ "VioletRed2", 238, 58, 140 }, -{ "VioletRed3", 205, 50, 120 }, -{ "VioletRed4", 139, 34, 82 }, -{ "magenta1", 255, 0, 255 }, -{ "magenta2", 238, 0, 238 }, -{ "magenta3", 205, 0, 205 }, -{ "magenta4", 139, 0, 139 }, -{ "orchid1", 255, 131, 250 }, -{ "orchid2", 238, 122, 233 }, -{ "orchid3", 205, 105, 201 }, -{ "orchid4", 139, 71, 137 }, -{ "plum1", 255, 187, 255 }, -{ "plum2", 238, 174, 238 }, -{ "plum3", 205, 150, 205 }, -{ "plum4", 139, 102, 139 }, -{ "MediumOrchid1", 224, 102, 255 }, -{ "MediumOrchid2", 209, 95, 238 }, -{ "MediumOrchid3", 180, 82, 205 }, -{ "MediumOrchid4", 122, 55, 139 }, -{ "DarkOrchid1", 191, 62, 255 }, -{ "DarkOrchid2", 178, 58, 238 }, -{ "DarkOrchid3", 154, 50, 205 }, -{ "DarkOrchid4", 104, 34, 139 }, -{ "purple1", 155, 48, 255 }, -{ "purple2", 145, 44, 238 }, -{ "purple3", 125, 38, 205 }, -{ "purple4", 85, 26, 139 }, -{ "MediumPurple1", 171, 130, 255 }, -{ "MediumPurple2", 159, 121, 238 }, -{ "MediumPurple3", 137, 104, 205 }, -{ "MediumPurple4", 93, 71, 139 }, -{ "thistle1", 255, 225, 255 }, -{ "thistle2", 238, 210, 238 }, -{ "thistle3", 205, 181, 205 }, -{ "thistle4", 139, 123, 139 }, -{ "gray0", 0, 0, 0 }, -{ "grey0", 0, 0, 0 }, -{ "gray1", 3, 3, 3 }, -{ "grey1", 3, 3, 3 }, -{ "gray2", 5, 5, 5 }, -{ "grey2", 5, 5, 5 }, -{ "gray3", 8, 8, 8 }, -{ "grey3", 8, 8, 8 }, -{ "gray4", 10, 10, 10 }, -{ "grey4", 10, 10, 10 }, -{ "gray5", 13, 13, 13 }, -{ "grey5", 13, 13, 13 }, -{ "gray6", 15, 15, 15 }, -{ "grey6", 15, 15, 15 }, -{ "gray7", 18, 18, 18 }, -{ "grey7", 18, 18, 18 }, -{ "gray8", 20, 20, 20 }, -{ "grey8", 20, 20, 20 }, -{ "gray9", 23, 23, 23 }, -{ "grey9", 23, 23, 23 }, -{ "gray10", 26, 26, 26 }, -{ "grey10", 26, 26, 26 }, -{ "gray11", 28, 28, 28 }, -{ "grey11", 28, 28, 28 }, -{ "gray12", 31, 31, 31 }, -{ "grey12", 31, 31, 31 }, -{ "gray13", 33, 33, 33 }, -{ "grey13", 33, 33, 33 }, -{ "gray14", 36, 36, 36 }, -{ "grey14", 36, 36, 36 }, -{ "gray15", 38, 38, 38 }, -{ "grey15", 38, 38, 38 }, -{ "gray16", 41, 41, 41 }, -{ "grey16", 41, 41, 41 }, -{ "gray17", 43, 43, 43 }, -{ "grey17", 43, 43, 43 }, -{ "gray18", 46, 46, 46 }, -{ "grey18", 46, 46, 46 }, -{ "gray19", 48, 48, 48 }, -{ "grey19", 48, 48, 48 }, -{ "gray20", 51, 51, 51 }, -{ "grey20", 51, 51, 51 }, -{ "gray21", 54, 54, 54 }, -{ "grey21", 54, 54, 54 }, -{ "gray22", 56, 56, 56 }, -{ "grey22", 56, 56, 56 }, -{ "gray23", 59, 59, 59 }, -{ "grey23", 59, 59, 59 }, -{ "gray24", 61, 61, 61 }, -{ "grey24", 61, 61, 61 }, -{ "gray25", 64, 64, 64 }, -{ "grey25", 64, 64, 64 }, -{ "gray26", 66, 66, 66 }, -{ "grey26", 66, 66, 66 }, -{ "gray27", 69, 69, 69 }, -{ "grey27", 69, 69, 69 }, -{ "gray28", 71, 71, 71 }, -{ "grey28", 71, 71, 71 }, -{ "gray29", 74, 74, 74 }, -{ "grey29", 74, 74, 74 }, -{ "gray30", 77, 77, 77 }, -{ "grey30", 77, 77, 77 }, -{ "gray31", 79, 79, 79 }, -{ "grey31", 79, 79, 79 }, -{ "gray32", 82, 82, 82 }, -{ "grey32", 82, 82, 82 }, -{ "gray33", 84, 84, 84 }, -{ "grey33", 84, 84, 84 }, -{ "gray34", 87, 87, 87 }, -{ "grey34", 87, 87, 87 }, -{ "gray35", 89, 89, 89 }, -{ "grey35", 89, 89, 89 }, -{ "gray36", 92, 92, 92 }, -{ "grey36", 92, 92, 92 }, -{ "gray37", 94, 94, 94 }, -{ "grey37", 94, 94, 94 }, -{ "gray38", 97, 97, 97 }, -{ "grey38", 97, 97, 97 }, -{ "gray39", 99, 99, 99 }, -{ "grey39", 99, 99, 99 }, -{ "gray40", 102, 102, 102 }, -{ "grey40", 102, 102, 102 }, -{ "gray41", 105, 105, 105 }, -{ "grey41", 105, 105, 105 }, -{ "gray42", 107, 107, 107 }, -{ "grey42", 107, 107, 107 }, -{ "gray43", 110, 110, 110 }, -{ "grey43", 110, 110, 110 }, -{ "gray44", 112, 112, 112 }, -{ "grey44", 112, 112, 112 }, -{ "gray45", 115, 115, 115 }, -{ "grey45", 115, 115, 115 }, -{ "gray46", 117, 117, 117 }, -{ "grey46", 117, 117, 117 }, -{ "gray47", 120, 120, 120 }, -{ "grey47", 120, 120, 120 }, -{ "gray48", 122, 122, 122 }, -{ "grey48", 122, 122, 122 }, -{ "gray49", 125, 125, 125 }, -{ "grey49", 125, 125, 125 }, -{ "gray50", 127, 127, 127 }, -{ "grey50", 127, 127, 127 }, -{ "gray51", 130, 130, 130 }, -{ "grey51", 130, 130, 130 }, -{ "gray52", 133, 133, 133 }, -{ "grey52", 133, 133, 133 }, -{ "gray53", 135, 135, 135 }, -{ "grey53", 135, 135, 135 }, -{ "gray54", 138, 138, 138 }, -{ "grey54", 138, 138, 138 }, -{ "gray55", 140, 140, 140 }, -{ "grey55", 140, 140, 140 }, -{ "gray56", 143, 143, 143 }, -{ "grey56", 143, 143, 143 }, -{ "gray57", 145, 145, 145 }, -{ "grey57", 145, 145, 145 }, -{ "gray58", 148, 148, 148 }, -{ "grey58", 148, 148, 148 }, -{ "gray59", 150, 150, 150 }, -{ "grey59", 150, 150, 150 }, -{ "gray60", 153, 153, 153 }, -{ "grey60", 153, 153, 153 }, -{ "gray61", 156, 156, 156 }, -{ "grey61", 156, 156, 156 }, -{ "gray62", 158, 158, 158 }, -{ "grey62", 158, 158, 158 }, -{ "gray63", 161, 161, 161 }, -{ "grey63", 161, 161, 161 }, -{ "gray64", 163, 163, 163 }, -{ "grey64", 163, 163, 163 }, -{ "gray65", 166, 166, 166 }, -{ "grey65", 166, 166, 166 }, -{ "gray66", 168, 168, 168 }, -{ "grey66", 168, 168, 168 }, -{ "gray67", 171, 171, 171 }, -{ "grey67", 171, 171, 171 }, -{ "gray68", 173, 173, 173 }, -{ "grey68", 173, 173, 173 }, -{ "gray69", 176, 176, 176 }, -{ "grey69", 176, 176, 176 }, -{ "gray70", 179, 179, 179 }, -{ "grey70", 179, 179, 179 }, -{ "gray71", 181, 181, 181 }, -{ "grey71", 181, 181, 181 }, -{ "gray72", 184, 184, 184 }, -{ "grey72", 184, 184, 184 }, -{ "gray73", 186, 186, 186 }, -{ "grey73", 186, 186, 186 }, -{ "gray74", 189, 189, 189 }, -{ "grey74", 189, 189, 189 }, -{ "gray75", 191, 191, 191 }, -{ "grey75", 191, 191, 191 }, -{ "gray76", 194, 194, 194 }, -{ "grey76", 194, 194, 194 }, -{ "gray77", 196, 196, 196 }, -{ "grey77", 196, 196, 196 }, -{ "gray78", 199, 199, 199 }, -{ "grey78", 199, 199, 199 }, -{ "gray79", 201, 201, 201 }, -{ "grey79", 201, 201, 201 }, -{ "gray80", 204, 204, 204 }, -{ "grey80", 204, 204, 204 }, -{ "gray81", 207, 207, 207 }, -{ "grey81", 207, 207, 207 }, -{ "gray82", 209, 209, 209 }, -{ "grey82", 209, 209, 209 }, -{ "gray83", 212, 212, 212 }, -{ "grey83", 212, 212, 212 }, -{ "gray84", 214, 214, 214 }, -{ "grey84", 214, 214, 214 }, -{ "gray85", 217, 217, 217 }, -{ "grey85", 217, 217, 217 }, -{ "gray86", 219, 219, 219 }, -{ "grey86", 219, 219, 219 }, -{ "gray87", 222, 222, 222 }, -{ "grey87", 222, 222, 222 }, -{ "gray88", 224, 224, 224 }, -{ "grey88", 224, 224, 224 }, -{ "gray89", 227, 227, 227 }, -{ "grey89", 227, 227, 227 }, -{ "gray90", 229, 229, 229 }, -{ "grey90", 229, 229, 229 }, -{ "gray91", 232, 232, 232 }, -{ "grey91", 232, 232, 232 }, -{ "gray92", 235, 235, 235 }, -{ "grey92", 235, 235, 235 }, -{ "gray93", 237, 237, 237 }, -{ "grey93", 237, 237, 237 }, -{ "gray94", 240, 240, 240 }, -{ "grey94", 240, 240, 240 }, -{ "gray95", 242, 242, 242 }, -{ "grey95", 242, 242, 242 }, -{ "gray96", 245, 245, 245 }, -{ "grey96", 245, 245, 245 }, -{ "gray97", 247, 247, 247 }, -{ "grey97", 247, 247, 247 }, -{ "gray98", 250, 250, 250 }, -{ "grey98", 250, 250, 250 }, -{ "gray99", 252, 252, 252 }, -{ "grey99", 252, 252, 252 }, -{ "gray100", 255, 255, 255 }, -{ "grey100", 255, 255, 255 }, -{ "DarkGrey", 169, 169, 169 }, -{ "DarkGray", 169, 169, 169 }, -{ "DarkBlue", 0, 0, 139 }, -{ "DarkCyan", 0, 139, 139 }, -{ "DarkMagenta", 139, 0, 139 }, -{ "DarkRed", 139, 0, 0 }, -{ "LightGreen", 144, 238, 144 }, -{ NULL, 0 , 0, 0} -}; diff --git a/svtools/source/filter.vcl/ixpm/xpmread.cxx b/svtools/source/filter.vcl/ixpm/xpmread.cxx deleted file mode 100644 index 7575c94e3ed9..000000000000 --- a/svtools/source/filter.vcl/ixpm/xpmread.cxx +++ /dev/null @@ -1,702 +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_svtools.hxx" - -#ifndef _BMPACC_HXX -#include -#endif -#ifndef _GRAPH_HXX -#include -#endif -#include "rgbtable.hxx" -#define _XPMPRIVATE -#include "xpmread.hxx" - -// ------------- -// - XPMReader - -// ------------- - -XPMReader::XPMReader( SvStream& rStm ) : - mrIStm ( rStm ), - mpAcc ( NULL ), - mpMaskAcc ( NULL ), - mnLastPos ( rStm.Tell() ), - mnWidth ( 0 ), - mnHeight ( 0 ), - mnColors ( 0 ), - mnCpp ( 0 ), - mbTransparent ( FALSE ), - mbStatus ( TRUE ), - mnStatus ( 0 ), - mnIdentifier ( XPMIDENTIFIER ), - mcThisByte ( 0 ), - mnTempAvail ( 0 ), - mpFastColorTable( NULL ), - mpColMap ( NULL ) -{ - -} - -// ------------------------------------------------------------------------ - -XPMReader::~XPMReader() -{ - if( mpAcc ) - maBmp.ReleaseAccess( mpAcc ); -} - -// ------------------------------------------------------------------------ - -#ifdef _MSC_VER -#pragma optimize ("",off) -#endif - -ReadState XPMReader::ReadXPM( Graphic& rGraphic ) -{ - ReadState eReadState; - BYTE cDummy; - - // sehen, ob wir _alles_ lesen koennen - mrIStm.Seek( STREAM_SEEK_TO_END ); - mrIStm >> cDummy; - - // falls wir nicht alles lesen koennen - // kehren wir zurueck und warten auf neue Daten - if ( mrIStm.GetError() != ERRCODE_IO_PENDING ) - { - mrIStm.Seek( mnLastPos ); - mbStatus = TRUE; - - if ( mbStatus ) - { - mpStringBuf = new BYTE [ XPMSTRINGBUF ]; - mpTempBuf = new BYTE [ XPMTEMPBUFSIZE ]; - - if ( ( mbStatus = ImplGetString() ) == TRUE ) - { - mnIdentifier = XPMVALUES; // Bitmap informationen einholen - mnWidth = ImplGetULONG( 0 ); - mnHeight = ImplGetULONG( 1 ); - mnColors = ImplGetULONG( 2 ); - mnCpp = ImplGetULONG( 3 ); - } - if ( mnColors > ( SAL_MAX_UINT32 / ( 4 + mnCpp ) ) ) - mbStatus = sal_False; - if ( ( mnWidth * mnCpp ) >= XPMSTRINGBUF ) - mbStatus = sal_False; - if ( mbStatus && mnWidth && mnHeight && mnColors && mnCpp ) - { - mnIdentifier = XPMCOLORS; - - // mpColMap beinhaltet fuer jede vorhandene - // Farbe: ( mnCpp )Byte(s)-> ASCII Eintrag der der Farbe zugeordnet ist - // 1 Byte -> 0xff wenn Farbe transparent ist - // 3 Bytes -> RGB Wert der Farbe - mpColMap = new BYTE[ mnColors * ( 4 + mnCpp ) ]; - if ( mpColMap ) - { - for ( ULONG i = 0; i < mnColors; i++ ) - { - if ( ImplGetColor( i ) == FALSE ) - { - mbStatus = FALSE; - break; - } - } - } - else - mbStatus = sal_False; - - if ( mbStatus ) - { - // bei mehr als 256 Farben wird eine 24 Bit Grafik erstellt - sal_uInt16 nBits = 1; - if ( mnColors > 256 ) - nBits = 24; - else if ( mnColors > 16 ) - nBits = 8; - else if ( mnColors > 2 ) - nBits = 4; - else - nBits = 1; - - maBmp = Bitmap( Size( mnWidth, mnHeight ), nBits ); - mpAcc = maBmp.AcquireWriteAccess(); - - // mbTransparent ist TRUE wenn mindestens eine Farbe Transparent ist - if ( mbTransparent ) - { - maMaskBmp = Bitmap( Size( mnWidth, mnHeight ), 1 ); - if ( ( mpMaskAcc = maMaskBmp.AcquireWriteAccess() ) == NULL ) - mbStatus = FALSE; - } - if( mpAcc && mbStatus ) - { - ULONG i; - if ( mnColors <=256 ) // palette is only needed by using less than 257 - { // colors - - BYTE* pPtr = &mpColMap[mnCpp]; - - for ( i = 0; i < mnColors; i++ ) - { - mpAcc->SetPaletteColor( (BYTE)i, Color( pPtr[1], pPtr[2], pPtr[3] ) ); - pPtr += ( mnCpp + 4 ); - } - // using 2 charakters per pixel and less than 257 Colors we speed up - if ( mnCpp == 2 ) // by using a 64kb indexing table - { - mpFastColorTable = new BYTE[ 256 * 256 ]; - for ( pPtr = mpColMap, i = 0; i < mnColors; i++, pPtr += mnCpp + 4 ) - { - ULONG j = pPtr[ 0 ] << 8; - j += pPtr[ 1 ]; - mpFastColorTable[ j ] = (BYTE)i; - } - } - } - // now we get the bitmap data - mnIdentifier = XPMPIXELS; - for ( i = 0; i < mnHeight; i++ ) - { - if ( ImplGetScanLine( i ) == FALSE ) - { - mbStatus = FALSE; - break; - } - } - mnIdentifier = XPMEXTENSIONS; - } - } - } - - delete[] mpFastColorTable; - delete[] mpColMap; - delete[] mpStringBuf; - delete[] mpTempBuf; - - } - if( mbStatus ) - { - if ( mpMaskAcc ) - { - maMaskBmp.ReleaseAccess ( mpMaskAcc), mpMaskAcc = NULL; - maBmp.ReleaseAccess( mpAcc ), mpAcc = NULL; - rGraphic = Graphic( BitmapEx( maBmp, maMaskBmp ) ); - } - else - { - maBmp.ReleaseAccess( mpAcc ), mpAcc = NULL; - rGraphic = maBmp; - } - eReadState = XPMREAD_OK; - } - else - { - if ( mpMaskAcc ) maMaskBmp.ReleaseAccess ( mpMaskAcc), mpMaskAcc = NULL; - if ( mpAcc ) maBmp.ReleaseAccess( mpAcc ), mpAcc = NULL; - eReadState = XPMREAD_ERROR; - } - } - else - { - mrIStm.ResetError(); - eReadState = XPMREAD_NEED_MORE; - } - return eReadState; -} - -#ifdef _MSC_VER -#pragma optimize ("",on) -#endif - -// ------------------------------------------------------------------------ -// ImplGetColor ermittelt saemtliche Farbwerte, -// die Rueckgabe ist TRUE wenn saemtliche Farben zugeordnet werden konnten - -BOOL XPMReader::ImplGetColor( ULONG nNumb ) -{ - BYTE* pString = mpStringBuf; - BYTE* pPtr = ( mpColMap + nNumb * ( 4 + mnCpp ) ); - BOOL bStatus = ImplGetString(); - - if ( bStatus ) - { - for ( ULONG i = 0; i < mnCpp; i++ ) - *pPtr++ = *pString++; - bStatus = ImplGetColSub ( pPtr ); - } - return bStatus; -} - -// ------------------------------------------------------------------------ -// ImpGetScanLine liest den String mpBufSize aus und schreibt die Pixel in die -// Bitmap. Der Parameter nY gibt die horizontale Position an. - -BOOL XPMReader::ImplGetScanLine( ULONG nY ) -{ - BOOL bStatus = ImplGetString(); - BYTE* pString = mpStringBuf; - BYTE* pColor; - BitmapColor aWhite; - BitmapColor aBlack; - - if ( bStatus ) - { - if ( mpMaskAcc ) - { - aWhite = mpMaskAcc->GetBestMatchingColor( Color( COL_WHITE ) ); - aBlack = mpMaskAcc->GetBestMatchingColor( Color( COL_BLACK ) ); - } - if ( mnStringSize != ( mnWidth * mnCpp )) - bStatus = FALSE; - else - { - ULONG i, j; - if ( mpFastColorTable ) - { - for ( i = 0; i < mnWidth; i++ ) - { - j = (*pString++) << 8; - j += *pString++; - BYTE k = (BYTE)mpFastColorTable[ j ]; - mpAcc->SetPixel( nY, i, BitmapColor( (BYTE)k ) ); - - if ( mpMaskAcc ) - mpMaskAcc->SetPixel( nY, i, - ( mpColMap[ k * (mnCpp + 4) + mnCpp] ) ? aWhite : aBlack ); - } - } - else for ( i = 0; i < mnWidth; i++ ) - { - pColor = mpColMap; - for ( j = 0; j < mnColors; j++ ) - { - if ( ImplCompare( pString, pColor, mnCpp, XPMCASESENSITIVE ) == TRUE ) - { - if ( mnColors > 256 ) - mpAcc->SetPixel( nY, i, Color ( pColor[3], pColor[4], pColor[5] ) ); - else - mpAcc->SetPixel( nY, i, BitmapColor( (BYTE) j ) ); - - if ( mpMaskAcc ) - mpMaskAcc->SetPixel( nY, i, ( - pColor[ mnCpp ] ) ? aWhite : aBlack ); - - break; - } - pColor += ( mnCpp + 4 ); - } - pString += mnCpp; - } - - } - } - return bStatus; -} - -// ------------------------------------------------------------------------ -// versucht aus mpStringBuf einen Farbwert zu uebermitteln -// wurde eine Farbe gefunden wird an pDest[1]..pDest[2] der RGB wert geschrieben -// pDest[0] enthaelt 0xff wenn die Farbe transparent ist sonst 0 - -BOOL XPMReader::ImplGetColSub( BYTE* pDest ) -{ - unsigned char cTransparent[] = "None"; - - BOOL bColStatus = FALSE; - - if ( ImplGetColKey( 'c' ) || ImplGetColKey( 'm' ) || ImplGetColKey( 'g' ) ) - { - // hexentry for RGB or HSV color ? - if ( *mpPara == '#' ) - { - *pDest++ = 0; - bColStatus = TRUE; - switch ( mnParaSize ) - { - case 25 : - ImplGetRGBHex ( pDest, 6 ); - break; - case 13 : - ImplGetRGBHex ( pDest, 2 ); - break; - case 7 : - ImplGetRGBHex ( pDest, 0 ); - break; - default: - bColStatus = FALSE; - break; - } - } - // maybe pixel is transparent - else if ( ImplCompare( &cTransparent[0], mpPara, 4 )) - { - *pDest++ = 0xff; - bColStatus = TRUE; - mbTransparent = TRUE; - } - // last we will try to get the colorname - else if ( mnParaSize > 2 ) // name must enlarge the minimum size - { - ULONG i = 0; - while ( TRUE ) - { - if ( pRGBTable[ i ].name == NULL ) - break; - if ( pRGBTable[ i ].name[ mnParaSize ] == 0 ) - { - if ( ImplCompare ( (unsigned char*)pRGBTable[ i ].name, - mpPara, mnParaSize, XPMCASENONSENSITIVE ) ) - { - bColStatus = TRUE; - *pDest++ = 0; - *pDest++ = pRGBTable[ i ].red; - *pDest++ = pRGBTable[ i ].green; - *pDest++ = pRGBTable[ i ].blue; - } - } - i++; - } - } - } - return bColStatus; -} - -// ------------------------------------------------------------------------ -// ImplGetColKey durchsuch den String mpStringBuf nach einem Parameter 'nKey' -// und gibt einen BOOL zurueck. ( wenn TRUE werden mpPara und mnParaSize gesetzt ) - -BOOL XPMReader::ImplGetColKey( BYTE nKey ) -{ - BYTE nTemp, nPrev = ' '; - - mpPara = mpStringBuf + mnCpp + 1; - mnParaSize = 0; - - while ( *mpPara != 0 ) - { - if ( *mpPara == nKey ) - { - nTemp = *( mpPara + 1 ); - if ( nTemp == ' ' || nTemp == 0x09 ) - { - if ( nPrev == ' ' || nPrev == 0x09 ) - break; - } - } - nPrev = *mpPara; - mpPara++; - } - if ( *mpPara ) - { - mpPara++; - while ( (*mpPara == ' ') || (*mpPara == 0x09) ) - { - mpPara++; - } - if ( *mpPara != 0 ) - { - while ( *(mpPara+mnParaSize) != ' ' && *(mpPara+mnParaSize) != 0x09 && - *(mpPara+mnParaSize) != 0 ) - { - mnParaSize++; - } - } - } - return ( mnParaSize ) ? TRUE : FALSE; -} - -// ------------------------------------------------------------------------ -// ImplGetRGBHex uebersetzt den ASCII-Hexadezimalwert der sich bei mpPara befindet -// in einen RGB wert und schreibt diesen nach pDest -// folgende Formate muessen sich bei mpPara befinden: -// wenn nAdd = 0 : '#12ab12' -> RGB = 0x12, 0xab, 0x12 -// 2 : '#1234abcd1234' " " " " -// 6 : '#12345678abcdefab12345678' " " " " - - -void XPMReader::ImplGetRGBHex( BYTE* pDest,ULONG nAdd ) -{ - BYTE* pPtr = mpPara+1; - BYTE nHex, nTemp; - - for ( ULONG i = 0; i < 3; i++ ) - { - nHex = (*pPtr++) - '0'; - if ( nHex > 9 ) - nHex = ((nHex - 'A' + '0') & 7) + 10; - - nTemp = (*pPtr++) - '0'; - if ( nTemp > 9 ) - nTemp = ((nTemp - 'A' + '0') & 7) + 10; - nHex = ( nHex << 4 ) + nTemp; - - pPtr += nAdd; - *pDest++ = (BYTE)nHex; - } -} - -// ------------------------------------------------------------------------ -// ImplGetUlong gibt den wert einer bis zu 6stelligen ASCII-Dezimalzahl zurueck. - -ULONG XPMReader::ImplGetULONG( ULONG nPara ) -{ - if ( ImplGetPara ( nPara ) ) - { - ULONG nRetValue = 0; - BYTE* pPtr = mpPara; - - if ( ( mnParaSize > 6 ) || ( mnParaSize == 0 ) ) return 0; - for ( ULONG i = 0; i < mnParaSize; i++ ) - { - BYTE j = (*pPtr++) - 48; - if ( j > 9 ) return 0; // ascii is invalid - nRetValue*=10; - nRetValue+=j; - } - return nRetValue; - } - else return 0; -} - -// ------------------------------------------------------------------------ - -BOOL XPMReader::ImplCompare( BYTE* pSource, BYTE* pDest, ULONG nSize, ULONG nMode ) -{ - BOOL bRet = TRUE; - - if ( nMode == XPMCASENONSENSITIVE ) - { - for ( ULONG i = 0; i < nSize; i++ ) - { - if ( ( pSource[i]&~0x20 ) != ( pDest[i]&~0x20 ) ) - { - bRet = FALSE; - break; - } - } - } - else - { - for ( ULONG i = 0; i < nSize; i++ ) - { - if ( pSource[i] != pDest[i] ) - { - bRet = FALSE; - break; - } - } - } - return bRet; -} - -// ------------------------------------------------------------------------ -// ImplGetPara versucht den nNumb ( 0...x ) Parameter aus mpStringBuf zu ermitteln. -// Ein Parameter ist durch Spaces oder Tabs von den anderen getrennt. -// Konnte der Parameter gefunden werden ist der Rueckgabewert TRUE und mpPara + mnParaSize -// werden gesetzt. - -BOOL XPMReader::ImplGetPara ( ULONG nNumb ) -{ - BYTE nByte; - ULONG pSize = 0; - BYTE* pPtr = mpStringBuf; - ULONG nCount = 0; - - if ( ( *pPtr != ' ' ) && ( *pPtr != 0x09 ) ) - { - mpPara = pPtr; - mnParaSize = 0; - nCount = 0; - } - else - { - mpPara = NULL; - nCount = 0xffffffff; - } - - while ( pSize < mnStringSize ) - { - nByte = *pPtr; - - if ( mpPara ) - { - if ( ( nByte == ' ' ) || ( nByte == 0x09 ) ) - { - if ( nCount == nNumb ) - break; - else - mpPara = NULL; - } - else - mnParaSize++; - } - else - { - if ( ( nByte != ' ' ) && ( nByte != 0x09 ) ) - { - mpPara = pPtr; - mnParaSize = 1; - nCount++; - } - } - pSize++; - pPtr++; - } - return ( ( nCount == nNumb ) && ( mpPara ) ) ? TRUE : FALSE; -} - -// ------------------------------------------------------------------------ -// Der naechste String wird ausgelesen und in mpStringBuf (mit 0 abgeschlossen) abgelegt; -// mnStringSize enthaelt die Groesse des gelesenen Strings. -// Bemerkungen wie '//' und '/*.....*/' werden uebersprungen. - -BOOL XPMReader::ImplGetString( void ) -{ - BYTE sID[] = "/* XPM */"; - BYTE* pString = mpStringBuf; - - mnStringSize = 0; - mpStringBuf[0] = 0; - - while( mbStatus && ( mnStatus != XPMFINISHED ) ) - { - if ( mnTempAvail == 0 ) - { - mnTempAvail = mrIStm.Read( mpTempBuf, XPMTEMPBUFSIZE ); - if ( mnTempAvail == 0 ) - break; - - mpTempPtr = mpTempBuf; - - if ( mnIdentifier == XPMIDENTIFIER ) - { - if ( mnTempAvail <= 50 ) - { - mbStatus = FALSE; // file is too short to be a correct XPM format - break; - } - for ( int i = 0; i < 9; i++ ) // searching for "/* XPM */" - if ( *mpTempPtr++ != sID[i] ) - { - mbStatus = FALSE; - break; - } - mnTempAvail-=9; - mnIdentifier++; - } - } - mcLastByte = mcThisByte; - mcThisByte = *mpTempPtr++; - mnTempAvail--; - - if ( mnStatus & XPMDOUBLE ) - { - if ( mcThisByte == 0x0a ) - mnStatus &=~XPMDOUBLE; - continue; - } - if ( mnStatus & XPMREMARK ) - { - if ( ( mcThisByte == '/' ) && ( mcLastByte == '*' ) ) - mnStatus &=~XPMREMARK; - continue; - } - if ( mnStatus & XPMSTRING ) // characters in string - { - if ( mcThisByte == '"' ) - { - mnStatus &=~XPMSTRING; // end of parameter by eol - break; - } - if ( mnStringSize >= ( XPMSTRINGBUF - 1 ) ) - { - mbStatus = FALSE; - break; - } - *pString++ = mcThisByte; - pString[0] = 0; - mnStringSize++; - continue; - } - else - { // characters beside string - switch ( mcThisByte ) - { - case '*' : - if ( mcLastByte == '/' ) mnStatus |= XPMREMARK; - break; - case '/' : - if ( mcLastByte == '/' ) mnStatus |= XPMDOUBLE; - break; - case '"' : mnStatus |= XPMSTRING; - break; - case '{' : - if ( mnIdentifier == XPMDEFINITION ) - mnIdentifier++; - break; - case '}' : - if ( mnIdentifier == XPMENDEXT ) - mnStatus = XPMFINISHED; - break; - } - } - } - return mbStatus; -} - -// ------------- -// - ImportXPM - -// ------------- - -BOOL ImportXPM( SvStream& rStm, Graphic& rGraphic ) -{ - XPMReader* pXPMReader = (XPMReader*) rGraphic.GetContext(); - ReadState eReadState; - BOOL bRet = TRUE; - - if( !pXPMReader ) - pXPMReader = new XPMReader( rStm ); - - rGraphic.SetContext( NULL ); - eReadState = pXPMReader->ReadXPM( rGraphic ); - - if( eReadState == XPMREAD_ERROR ) - { - bRet = FALSE; - delete pXPMReader; - } - else if( eReadState == XPMREAD_OK ) - delete pXPMReader; - else - rGraphic.SetContext( pXPMReader ); - - return bRet; -} diff --git a/svtools/source/filter.vcl/jpeg/jpeg.cxx b/svtools/source/filter.vcl/jpeg/jpeg.cxx deleted file mode 100644 index a2de92171af3..000000000000 --- a/svtools/source/filter.vcl/jpeg/jpeg.cxx +++ /dev/null @@ -1,779 +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_svtools.hxx" - -#include - -extern "C" -{ - #define INT32 JPEG_INT32 - #include "stdio.h" - #include "jpeg.h" - #include "jpeglib.h" - #include "jerror.h" - #undef INT32 -} - -#define _JPEGPRIVATE -#include -#include "jpeg.hxx" -#include -#include - -// ----------- -// - Defines - -// ----------- - -using namespace ::com::sun::star; - -#define JPEGMINREAD 512 - -// ------------- -// - (C-Calls) - -// ------------- - -// ------------------------------------------------------------------------ - -extern "C" void* CreateBitmap( void* pJPEGReader, void* pJPEGCreateBitmapParam ) -{ - return ( (JPEGReader*) pJPEGReader )->CreateBitmap( pJPEGCreateBitmapParam ); -} - -// ------------------------------------------------------------------------ - -extern "C" void* GetScanline( void* pJPEGWriter, long nY ) -{ - return ( (JPEGWriter*) pJPEGWriter )->GetScanline( nY ); -} - -// ------------------------------------------------------------------------ - -struct JPEGCallbackStruct -{ - uno::Reference< task::XStatusIndicator > xStatusIndicator; -}; - -extern "C" long JPEGCallback( void* pCallbackData, long nPercent ) -{ - JPEGCallbackStruct* pS = (JPEGCallbackStruct*)pCallbackData; - if ( pS && pS->xStatusIndicator.is() ) - { - pS->xStatusIndicator->setValue( nPercent ); - } - return 0L; -} - -#define BUF_SIZE 4096 - -typedef struct -{ - struct jpeg_destination_mgr pub; /* public fields */ - - SvStream* outfile; /* target stream */ - JOCTET * buffer; /* start of buffer */ -} my_destination_mgr; - -typedef my_destination_mgr * my_dest_ptr; - -extern "C" void init_destination (j_compress_ptr cinfo) -{ - my_dest_ptr dest = (my_dest_ptr) cinfo->dest; - - /* Allocate the output buffer --- it will be released when done with image */ - dest->buffer = (JOCTET *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - BUF_SIZE * sizeof(JOCTET)); - - dest->pub.next_output_byte = dest->buffer; - dest->pub.free_in_buffer = BUF_SIZE; -} - -extern "C" int empty_output_buffer (j_compress_ptr cinfo) -{ - my_dest_ptr dest = (my_dest_ptr) cinfo->dest; - - if (dest->outfile->Write(dest->buffer, BUF_SIZE) != - (size_t) BUF_SIZE) - ERREXIT(cinfo, JERR_FILE_WRITE); - - dest->pub.next_output_byte = dest->buffer; - dest->pub.free_in_buffer = BUF_SIZE; - - return TRUE; -} - -extern "C" void term_destination (j_compress_ptr cinfo) -{ - my_dest_ptr dest = (my_dest_ptr) cinfo->dest; - size_t datacount = BUF_SIZE - dest->pub.free_in_buffer; - - /* Write any data remaining in the buffer */ - if (datacount > 0) { - if (dest->outfile->Write(dest->buffer, datacount) != datacount) - ERREXIT(cinfo, JERR_FILE_WRITE); - } -} - -extern "C" void jpeg_svstream_dest (j_compress_ptr cinfo, void* out) -{ - SvStream * outfile = (SvStream*)out; - my_dest_ptr dest; - - /* The destination object is made permanent so that multiple JPEG images - * can be written to the same file without re-executing jpeg_svstream_dest. - * This makes it dangerous to use this manager and a different destination - * manager serially with the same JPEG object, because their private object - * sizes may be different. Caveat programmer. - */ - if (cinfo->dest == NULL) { /* first time for this JPEG object? */ - cinfo->dest = (struct jpeg_destination_mgr *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - sizeof(my_destination_mgr)); - } - - dest = (my_dest_ptr) cinfo->dest; - dest->pub.init_destination = init_destination; - dest->pub.empty_output_buffer = empty_output_buffer; - dest->pub.term_destination = term_destination; - dest->outfile = outfile; -} - -/* Expanded data source object for stdio input */ - -typedef struct { - struct jpeg_source_mgr pub; /* public fields */ - - SvStream * infile; /* source stream */ - JOCTET * buffer; /* start of buffer */ - boolean start_of_file; /* have we gotten any data yet? */ -} my_source_mgr; - -typedef my_source_mgr * my_src_ptr; - -/* - * Initialize source --- called by jpeg_read_header - * before any data is actually read. - */ - -extern "C" void init_source (j_decompress_ptr cinfo) -{ - my_src_ptr src = (my_src_ptr) cinfo->src; - - /* We reset the empty-input-file flag for each image, - * but we don't clear the input buffer. - * This is correct behavior for reading a series of images from one source. - */ - src->start_of_file = TRUE; -} - -long StreamRead( SvStream* pSvStm, void* pBuffer, long nBufferSize ) -{ - long nRead; - - if( pSvStm->GetError() != ERRCODE_IO_PENDING ) - { - long nActPos = pSvStm->Tell(); - - nRead = (long) pSvStm->Read( pBuffer, nBufferSize ); - - if( pSvStm->GetError() == ERRCODE_IO_PENDING ) - { - nRead = 0; - - // Damit wir wieder an die alte Position - // seeken koennen, setzen wir den Error temp.zurueck - pSvStm->ResetError(); - pSvStm->Seek( nActPos ); - pSvStm->SetError( ERRCODE_IO_PENDING ); - } - } - else - nRead = 0; - - return nRead; -} - -extern "C" int fill_input_buffer (j_decompress_ptr cinfo) -{ - my_src_ptr src = (my_src_ptr) cinfo->src; - size_t nbytes; - - nbytes = StreamRead(src->infile, src->buffer, BUF_SIZE); - - if (nbytes <= 0) { - if (src->start_of_file) /* Treat empty input file as fatal error */ - ERREXIT(cinfo, JERR_INPUT_EMPTY); - WARNMS(cinfo, JWRN_JPEG_EOF); - /* Insert a fake EOI marker */ - src->buffer[0] = (JOCTET) 0xFF; - src->buffer[1] = (JOCTET) JPEG_EOI; - nbytes = 2; - } - - src->pub.next_input_byte = src->buffer; - src->pub.bytes_in_buffer = nbytes; - src->start_of_file = FALSE; - - return TRUE; -} - -extern "C" void skip_input_data (j_decompress_ptr cinfo, long num_bytes) -{ - my_src_ptr src = (my_src_ptr) cinfo->src; - - /* Just a dumb implementation for now. Could use fseek() except - * it doesn't work on pipes. Not clear that being smart is worth - * any trouble anyway --- large skips are infrequent. - */ - if (num_bytes > 0) { - while (num_bytes > (long) src->pub.bytes_in_buffer) { - num_bytes -= (long) src->pub.bytes_in_buffer; - (void) fill_input_buffer(cinfo); - /* note we assume that fill_input_buffer will never return FALSE, - * so suspension need not be handled. - */ - } - src->pub.next_input_byte += (size_t) num_bytes; - src->pub.bytes_in_buffer -= (size_t) num_bytes; - } -} - -extern "C" void term_source (j_decompress_ptr) -{ - /* no work necessary here */ -} - -extern "C" void jpeg_svstream_src (j_decompress_ptr cinfo, void * in) -{ - my_src_ptr src; - SvStream * infile = (SvStream*)in; - - /* The source object and input buffer are made permanent so that a series - * of JPEG images can be read from the same file by calling jpeg_stdio_src - * only before the first one. (If we discarded the buffer at the end of - * one image, we'd likely lose the start of the next one.) - * This makes it unsafe to use this manager and a different source - * manager serially with the same JPEG object. Caveat programmer. - */ - if (cinfo->src == NULL) { /* first time for this JPEG object? */ - cinfo->src = (struct jpeg_source_mgr *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - sizeof(my_source_mgr)); - src = (my_src_ptr) cinfo->src; - src->buffer = (JOCTET *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - BUF_SIZE * sizeof(JOCTET)); - } - - src = (my_src_ptr) cinfo->src; - src->pub.init_source = init_source; - src->pub.fill_input_buffer = fill_input_buffer; - src->pub.skip_input_data = skip_input_data; - src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */ - src->pub.term_source = term_source; - src->infile = infile; - src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */ - src->pub.next_input_byte = NULL; /* until buffer loaded */ -} - -// -------------- -// - JPEGReader - -// -------------- - -JPEGReader::JPEGReader( SvStream& rStm, void* /*pCallData*/, sal_Bool bSetLS ) : - rIStm ( rStm ), - pAcc ( NULL ), - pAcc1 ( NULL ), - pBuffer ( NULL ), - nLastPos ( rStm.Tell() ), - nLastLines ( 0 ), - bSetLogSize ( bSetLS ) -{ - maUpperName = String::CreateFromAscii( "SVIJPEG", 7 ); - nFormerPos = nLastPos; -} - -// ------------------------------------------------------------------------ - -JPEGReader::~JPEGReader() -{ - if( pBuffer ) - rtl_freeMemory( pBuffer ); - - if( pAcc ) - aBmp.ReleaseAccess( pAcc ); - - if( pAcc1 ) - aBmp1.ReleaseAccess( pAcc1 ); -} - -// ------------------------------------------------------------------------ - -void* JPEGReader::CreateBitmap( void* pParam ) -{ - Size aSize( ((JPEGCreateBitmapParam*)pParam)->nWidth, - ((JPEGCreateBitmapParam*)pParam)->nHeight ); - sal_Bool bGray = ((JPEGCreateBitmapParam*)pParam)->bGray != 0; - - void* pBmpBuf = NULL; - - if( pAcc ) - aBmp.ReleaseAccess( pAcc ); - - if( bGray ) - { - BitmapPalette aGrayPal( 256 ); - - for( USHORT n = 0; n < 256; n++ ) - { - const BYTE cGray = (BYTE) n; - aGrayPal[ n ] = BitmapColor( cGray, cGray, cGray ); - } - - aBmp = Bitmap( aSize, 8, &aGrayPal ); - } - else - aBmp = Bitmap( aSize, 24 ); - - if ( bSetLogSize ) - { - unsigned long nUnit = ((JPEGCreateBitmapParam*)pParam)->density_unit; - - if( ( ( 1 == nUnit ) || ( 2 == nUnit ) ) && - ( (JPEGCreateBitmapParam*) pParam )->X_density && - ( (JPEGCreateBitmapParam*) pParam )->Y_density ) - { - Point aEmptyPoint; - Fraction aFractX( 1, ((JPEGCreateBitmapParam*)pParam)->X_density ); - Fraction aFractY( 1, ((JPEGCreateBitmapParam*)pParam)->Y_density ); - MapMode aMapMode( nUnit == 1 ? MAP_INCH : MAP_CM, aEmptyPoint, aFractX, aFractY ); - Size aPrefSize = OutputDevice::LogicToLogic( aSize, aMapMode, MAP_100TH_MM ); - - aBmp.SetPrefSize( aPrefSize ); - aBmp.SetPrefMapMode( MapMode( MAP_100TH_MM ) ); - } - } - - pAcc = aBmp.AcquireWriteAccess(); - - if( pAcc ) - { - long nAlignedWidth; - - const ULONG nFormat = pAcc->GetScanlineFormat(); - - if( - ( bGray && ( BMP_FORMAT_8BIT_PAL == nFormat ) ) || - ( !bGray && ( BMP_FORMAT_24BIT_TC_RGB == nFormat ) ) - ) - { - pBmpBuf = pAcc->GetBuffer(); - nAlignedWidth = pAcc->GetScanlineSize(); - ((JPEGCreateBitmapParam*)pParam)->bTopDown = pAcc->IsTopDown(); - } - else - { - nAlignedWidth = AlignedWidth4Bytes( aSize.Width() * ( bGray ? 8 : 24 ) ); - ((JPEGCreateBitmapParam*)pParam)->bTopDown = TRUE; - pBmpBuf = pBuffer = rtl_allocateMemory( nAlignedWidth * aSize.Height() ); - } - ((JPEGCreateBitmapParam*)pParam)->nAlignedWidth = nAlignedWidth; - } - - return pBmpBuf; -} - -// ------------------------------------------------------------------------ - -void JPEGReader::FillBitmap() -{ - if( pBuffer && pAcc ) - { - HPBYTE pTmp; - BitmapColor aColor; - long nAlignedWidth; - long nWidth = pAcc->Width(); - long nHeight = pAcc->Height(); - - if( pAcc->GetBitCount() == 8 ) - { - BitmapColor* pCols = new BitmapColor[ 256 ]; - - for( USHORT n = 0; n < 256; n++ ) - { - const BYTE cGray = (BYTE) n; - pCols[ n ] = pAcc->GetBestMatchingColor( BitmapColor( cGray, cGray, cGray ) ); - } - - nAlignedWidth = AlignedWidth4Bytes( pAcc->Width() * 8L ); - - for( long nY = 0L; nY < nHeight; nY++ ) - { - pTmp = (BYTE*) pBuffer + nY * nAlignedWidth; - - for( long nX = 0L; nX < nWidth; nX++ ) - pAcc->SetPixel( nY, nX, pCols[ *pTmp++ ] ); - } - - delete[] pCols; - } - else - { - nAlignedWidth = AlignedWidth4Bytes( pAcc->Width() * 24L ); - - for( long nY = 0L; nY < nHeight; nY++ ) - { - pTmp = (BYTE*) pBuffer + nY * nAlignedWidth; - - for( long nX = 0L; nX < nWidth; nX++ ) - { - aColor.SetRed( *pTmp++ ); - aColor.SetGreen( *pTmp++ ); - aColor.SetBlue( *pTmp++ ); - pAcc->SetPixel( nY, nX, aColor ); - } - } - } - } -} - -// ------------------------------------------------------------------------ - -Graphic JPEGReader::CreateIntermediateGraphic( const Bitmap& rBitmap, long nLines ) -{ - Graphic aGraphic; - const Size aSizePix( rBitmap.GetSizePixel() ); - - if( !nLastLines ) - { - if( pAcc1 ) - aBmp1.ReleaseAccess( pAcc1 ); - - aBmp1 = Bitmap( rBitmap.GetSizePixel(), 1 ); - aBmp1.Erase( Color( COL_WHITE ) ); - pAcc1 = aBmp1.AcquireWriteAccess(); - } - - if( nLines && ( nLines < aSizePix.Height() ) ) - { - if( pAcc1 ) - { - const long nNewLines = nLines - nLastLines; - - if( nNewLines ) - { - pAcc1->SetFillColor( Color( COL_BLACK ) ); - pAcc1->FillRect( Rectangle( Point( 0, nLastLines ), - Size( pAcc1->Width(), nNewLines ) ) ); - } - - aBmp1.ReleaseAccess( pAcc1 ); - aGraphic = BitmapEx( rBitmap, aBmp1 ); - pAcc1 = aBmp1.AcquireWriteAccess(); - } - else - aGraphic = rBitmap; - } - else - aGraphic = rBitmap; - - nLastLines = nLines; - - return aGraphic; -} - -// ------------------------------------------------------------------------ - -ReadState JPEGReader::Read( Graphic& rGraphic ) -{ - long nEndPos; - long nLines; - ReadState eReadState; - BOOL bRet = FALSE; - BYTE cDummy; - -#if 1 // TODO: is it possible to get rid of this seek to the end? - // check if the stream's end is already available - rIStm.Seek( STREAM_SEEK_TO_END ); - rIStm >> cDummy; - nEndPos = rIStm.Tell(); - - // else check if at least JPEGMINREAD bytes can be read - if( rIStm.GetError() == ERRCODE_IO_PENDING ) - { - rIStm.ResetError(); - if( ( nEndPos - nFormerPos ) < JPEGMINREAD ) - { - rIStm.Seek( nLastPos ); - return JPEGREAD_NEED_MORE; - } - } - - // seek back to the original position - rIStm.Seek( nLastPos ); -#endif - - Size aPreviewSize = GetPreviewSize(); - SetJpegPreviewSizeHint( aPreviewSize.Width(), aPreviewSize.Height() ); - - // read the (partial) image - ReadJPEG( this, &rIStm, &nLines ); - - if( pAcc ) - { - if( pBuffer ) - { - FillBitmap(); - rtl_freeMemory( pBuffer ); - pBuffer = NULL; - } - - aBmp.ReleaseAccess( pAcc ); - pAcc = NULL; - - if( rIStm.GetError() == ERRCODE_IO_PENDING ) - rGraphic = CreateIntermediateGraphic( aBmp, nLines ); - else - rGraphic = aBmp; - - bRet = TRUE; - } - else if( rIStm.GetError() == ERRCODE_IO_PENDING ) - bRet = TRUE; - - // Status setzen ( Pending hat immer Vorrang ) - if( rIStm.GetError() == ERRCODE_IO_PENDING ) - { - eReadState = JPEGREAD_NEED_MORE; - rIStm.ResetError(); - nFormerPos = rIStm.Tell(); - } - else - { - if( bRet ) - eReadState = JPEGREAD_OK; - else - eReadState = JPEGREAD_ERROR; - } - - return eReadState; -} - - -// -------------- -// - JPEGWriter - -// -------------- - -JPEGWriter::JPEGWriter( SvStream& rStm, const uno::Sequence< beans::PropertyValue >* pFilterData, bool* pExportWasGrey ) : - rOStm ( rStm ), - pAcc ( NULL ), - pBuffer ( NULL ), - pExpWasGrey ( pExportWasGrey ) -{ - FilterConfigItem aConfigItem( (uno::Sequence< beans::PropertyValue >*)pFilterData ); - bGreys = aConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorMode" ) ), 0 ) != 0; - nQuality = aConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Quality" ) ), 75 ); - - if ( pFilterData ) - { - int nArgs = pFilterData->getLength(); - const beans::PropertyValue* pValues = pFilterData->getConstArray(); - while( nArgs-- ) - { - if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StatusIndicator" ) ) ) - { - pValues->Value >>= xStatusIndicator; - } - pValues++; - } - } -} - -// ------------------------------------------------------------------------ - -void* JPEGWriter::GetScanline( long nY ) -{ - void* pScanline = NULL; - - if( pAcc ) - { - if( bNative ) - pScanline = pAcc->GetScanline( nY ); - else if( pBuffer ) - { - BitmapColor aColor; - long nWidth = pAcc->Width(); - BYTE* pTmp = pBuffer; - - if( pAcc->HasPalette() ) - { - for( long nX = 0L; nX < nWidth; nX++ ) - { - aColor = pAcc->GetPaletteColor( (BYTE) pAcc->GetPixel( nY, nX ) ); - *pTmp++ = aColor.GetRed(); - if ( bGreys ) - continue; - *pTmp++ = aColor.GetGreen(); - *pTmp++ = aColor.GetBlue(); - } - } - else - { - for( long nX = 0L; nX < nWidth; nX++ ) - { - aColor = pAcc->GetPixel( nY, nX ); - *pTmp++ = aColor.GetRed(); - if ( bGreys ) - continue; - *pTmp++ = aColor.GetGreen(); - *pTmp++ = aColor.GetBlue(); - } - } - - pScanline = pBuffer; - } - } - - return pScanline; -} - -// ------------------------------------------------------------------------ - -BOOL JPEGWriter::Write( const Graphic& rGraphic ) -{ - BOOL bRet = FALSE; - - if ( xStatusIndicator.is() ) - { - rtl::OUString aMsg; - xStatusIndicator->start( aMsg, 100 ); - } - - Bitmap aGraphicBmp( rGraphic.GetBitmap() ); - - if ( bGreys ) - { - if ( !aGraphicBmp.Convert( BMP_CONVERSION_8BIT_GREYS ) ) - aGraphicBmp = rGraphic.GetBitmap(); - } - - pAcc = aGraphicBmp.AcquireReadAccess(); - - if ( !bGreys ) // bitmap was not explicitely converted into greyscale, - { // check if source is greyscale only - - sal_Bool bIsGrey = sal_True; - - long nWidth = pAcc->Width(); - for ( long nY = 0; bIsGrey && ( nY < pAcc->Height() ); nY++ ) - { - BitmapColor aColor; - for( long nX = 0L; bIsGrey && ( nX < nWidth ); nX++ ) - { - aColor = pAcc->HasPalette() ? pAcc->GetPaletteColor( (BYTE) pAcc->GetPixel( nY, nX ) ) - : pAcc->GetPixel( nY, nX ); - bIsGrey = ( aColor.GetRed() == aColor.GetGreen() ) && ( aColor.GetRed() == aColor.GetBlue() ); - } - } - if ( bIsGrey ) - bGreys = sal_True; - } - - if( pExpWasGrey ) - *pExpWasGrey = bGreys; - - if( pAcc ) - { - bNative = ( pAcc->GetScanlineFormat() == BMP_FORMAT_24BIT_TC_RGB ); - - if( !bNative ) - pBuffer = new BYTE[ AlignedWidth4Bytes( bGreys ? pAcc->Width() * 8L : pAcc->Width() * 24L ) ]; - - JPEGCallbackStruct aCallbackData; - aCallbackData.xStatusIndicator = xStatusIndicator; - bRet = (BOOL) WriteJPEG( this, &rOStm, pAcc->Width(), pAcc->Height(), bGreys, nQuality, &aCallbackData ); - - delete[] pBuffer; - pBuffer = NULL; - - aGraphicBmp.ReleaseAccess( pAcc ); - pAcc = NULL; - } - if ( xStatusIndicator.is() ) - xStatusIndicator->end(); - - return bRet; -} - -// -------------- -// - ImportJPEG - -// -------------- - -BOOL ImportJPEG( SvStream& rStm, Graphic& rGraphic, void* pCallerData, sal_Int32 nImportFlags ) -{ - JPEGReader* pJPEGReader = (JPEGReader*) rGraphic.GetContext(); - ReadState eReadState; - BOOL bRet = TRUE; - - if( !pJPEGReader ) - pJPEGReader = new JPEGReader( rStm, pCallerData, ( nImportFlags & GRFILTER_I_FLAGS_SET_LOGSIZE_FOR_JPEG ) != 0 ); - - if( nImportFlags & GRFILTER_I_FLAGS_FOR_PREVIEW ) - pJPEGReader->SetPreviewSize( Size(128,128) ); - else - pJPEGReader->DisablePreviewMode(); - - rGraphic.SetContext( NULL ); - eReadState = pJPEGReader->Read( rGraphic ); - - if( eReadState == JPEGREAD_ERROR ) - { - bRet = FALSE; - delete pJPEGReader; - } - else if( eReadState == JPEGREAD_OK ) - delete pJPEGReader; - else - rGraphic.SetContext( pJPEGReader ); - - return bRet; -} - -// -------------- -// - ExportJPEG - -// -------------- - -BOOL ExportJPEG( SvStream& rOStm, const Graphic& rGraphic, - const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData, - bool* pExportWasGrey - ) -{ - JPEGWriter aJPEGWriter( rOStm, pFilterData, pExportWasGrey ); - return aJPEGWriter.Write( rGraphic ); -} diff --git a/svtools/source/filter.vcl/jpeg/jpeg.h b/svtools/source/filter.vcl/jpeg/jpeg.h deleted file mode 100644 index 82a2f80a838c..000000000000 --- a/svtools/source/filter.vcl/jpeg/jpeg.h +++ /dev/null @@ -1,71 +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 _JPEG_H -#define _JPEG_H - -#if defined( ICC ) -#include -#endif - -#if defined (UNX) || defined(__MINGW32__) -#include -#endif - -struct JPEGCreateBitmapParam -{ - unsigned long nWidth; - unsigned long nHeight; - unsigned long density_unit; - unsigned long X_density; - unsigned long Y_density; - long bGray; - - long nAlignedWidth; // these members will be filled by the - long bTopDown; // CreateBitmap method in svtools -}; - -typedef struct my_error_mgr* my_error_ptr; -typedef unsigned char BYTE; -typedef unsigned char* HPBYTE; - -void* JPEGMalloc( size_t size ); -void JPEGFree( void *ptr ); -long JPEGCallback( void* pCallbackData, long nPercent ); - -long WriteJPEG( void* pJPEGWriter, void* pOStm, long nWidth, long nHeight, long bGreyScale, - long nQualityPercent, void* pCallbackData ); -void* GetScanline( void* pJPEGWriter, long nY ); - -void ReadJPEG( void* pJPEGReader, void* pIStm, long* pLines ); -void* CreateBitmap( void* pJPEGReader, void* pJPEGCreateBitmapParam ); - -/* TODO: when incompatible changes are possible again - the preview size hint should be redone */ -void SetJpegPreviewSizeHint( int nWidth, int nHeight ); - -#endif diff --git a/svtools/source/filter.vcl/jpeg/jpegc.c b/svtools/source/filter.vcl/jpeg/jpegc.c deleted file mode 100644 index 29b4749a7b51..000000000000 --- a/svtools/source/filter.vcl/jpeg/jpegc.c +++ /dev/null @@ -1,284 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include -#include -#include "setjmp.h" -#include "jpeglib.h" -#include "jerror.h" -#include "jpeg.h" -#include "rtl/alloc.h" -#include "osl/diagnose.h" - -struct my_error_mgr -{ - struct jpeg_error_mgr pub; - jmp_buf setjmp_buffer; -}; - -void jpeg_svstream_src (j_decompress_ptr cinfo, void* infile); -void jpeg_svstream_dest (j_compress_ptr cinfo, void* outfile); - -METHODDEF( void ) -my_error_exit (j_common_ptr cinfo) -{ - my_error_ptr myerr = (my_error_ptr) cinfo->err; - (*cinfo->err->output_message) (cinfo); - longjmp(myerr->setjmp_buffer, 1); -} - - -METHODDEF( void ) -my_output_message (j_common_ptr cinfo) -{ - char buffer[JMSG_LENGTH_MAX]; - (*cinfo->err->format_message) (cinfo, buffer); -} - -/* TODO: when incompatible changes are possible again - the preview size hint should be redone */ -static int nPreviewWidth = 0; -static int nPreviewHeight = 0; -void SetJpegPreviewSizeHint( int nWidth, int nHeight ) -{ - nPreviewWidth = nWidth; - nPreviewHeight = nHeight; -} - -void ReadJPEG( void* pJPEGReader, void* pIStm, long* pLines ) -{ - struct jpeg_decompress_struct cinfo; - struct my_error_mgr jerr; - struct JPEGCreateBitmapParam aCreateBitmapParam; - HPBYTE pDIB; - HPBYTE pTmp; - long nWidth; - long nHeight; - long nAlignedWidth; - JSAMPLE * range_limit; - HPBYTE pScanLineBuffer = NULL; - long nScanLineBufferComponents = 0; - // declare bDecompCreated volatile because of gcc - // warning: variable 'bDecompCreated' might be clobbered by `longjmp' or `vfork' - volatile long bDecompCreated = 0; - - /* Falls der Stream nicht ausreicht (IO_PENDING) - wird ueber ein longjmp in der Schleife nach Exit - gesprungen, wir geben dann die Anzahl - der bisher bearbeiteten Scanlines zurueck*/ - if ( setjmp( jerr.setjmp_buffer ) ) - goto Exit; - - cinfo.err = jpeg_std_error( &jerr.pub ); - jerr.pub.error_exit = my_error_exit; - jerr.pub.output_message = my_output_message; - - jpeg_create_decompress( &cinfo ); - bDecompCreated = 1; - jpeg_svstream_src( &cinfo, pIStm ); - jpeg_read_header( &cinfo, TRUE ); - - cinfo.scale_num = 1; - cinfo.scale_denom = 1; - cinfo.output_gamma = 1.0; - cinfo.raw_data_out = FALSE; - cinfo.quantize_colors = FALSE; - if ( cinfo.jpeg_color_space == JCS_YCbCr ) - cinfo.out_color_space = JCS_RGB; - else if ( cinfo.jpeg_color_space == JCS_YCCK ) - cinfo.out_color_space = JCS_CMYK; - - OSL_ASSERT(cinfo.out_color_space == JCS_CMYK || cinfo.out_color_space == JCS_GRAYSCALE || cinfo.out_color_space == JCS_RGB); - - /* change scale for preview import */ - if( nPreviewWidth || nPreviewHeight ) - { - if( nPreviewWidth == 0 ) { - nPreviewWidth = ( cinfo.image_width*nPreviewHeight )/cinfo.image_height; - if( nPreviewWidth <= 0 ) - nPreviewWidth = 1; - } else if( nPreviewHeight == 0 ) { - nPreviewHeight = ( cinfo.image_height*nPreviewWidth )/cinfo.image_width; - if( nPreviewHeight <= 0 ) - nPreviewHeight = 1; - } - - for( cinfo.scale_denom = 1; cinfo.scale_denom < 8; cinfo.scale_denom *= 2 ) - { - if( cinfo.image_width < nPreviewWidth * cinfo.scale_denom ) - break; - if( cinfo.image_height < nPreviewHeight * cinfo.scale_denom ) - break; - } - - if( cinfo.scale_denom > 1 ) - { - cinfo.dct_method = JDCT_FASTEST; - cinfo.do_fancy_upsampling = FALSE; - cinfo.do_block_smoothing = FALSE; - } - } - - jpeg_start_decompress( &cinfo ); - - nWidth = cinfo.output_width; - nHeight = cinfo.output_height; - aCreateBitmapParam.nWidth = nWidth; - aCreateBitmapParam.nHeight = nHeight; - - aCreateBitmapParam.density_unit = cinfo.density_unit; - aCreateBitmapParam.X_density = cinfo.X_density; - aCreateBitmapParam.Y_density = cinfo.Y_density; - aCreateBitmapParam.bGray = cinfo.output_components == 1; - pDIB = CreateBitmap( pJPEGReader, &aCreateBitmapParam ); - nAlignedWidth = aCreateBitmapParam.nAlignedWidth; - range_limit=cinfo.sample_range_limit; - - if ( cinfo.out_color_space == JCS_CMYK ) - { - nScanLineBufferComponents = cinfo.output_width * 4; - pScanLineBuffer = rtl_allocateMemory( nScanLineBufferComponents ); - } - - if( pDIB ) - { - if( aCreateBitmapParam.bTopDown ) - pTmp = pDIB; - else - { - pTmp = pDIB + ( nHeight - 1 ) * nAlignedWidth; - nAlignedWidth = -nAlignedWidth; - } - - for ( *pLines = 0; *pLines < nHeight; (*pLines)++ ) - { - if (pScanLineBuffer!=NULL) { // in other words cinfo.out_color_space == JCS_CMYK - int i; - int j; - jpeg_read_scanlines( &cinfo, (JSAMPARRAY) &pScanLineBuffer, 1 ); - // convert CMYK to RGB - for( i=0, j=0; i < nScanLineBufferComponents; i+=4, j+=3 ) - { - int c_=255-pScanLineBuffer[i+0]; - int m_=255-pScanLineBuffer[i+1]; - int y_=255-pScanLineBuffer[i+2]; - int k_=255-pScanLineBuffer[i+3]; - pTmp[j+0]=range_limit[ 255L - ( c_ + k_ ) ]; - pTmp[j+1]=range_limit[ 255L - ( m_ + k_ ) ]; - pTmp[j+2]=range_limit[ 255L - ( y_ + k_ ) ]; - } - } else { - jpeg_read_scanlines( &cinfo, (JSAMPARRAY) &pTmp, 1 ); - } - /* PENDING ??? */ - if ( cinfo.err->msg_code == 113 ) - break; - - pTmp += nAlignedWidth; - } - } - - jpeg_finish_decompress( &cinfo ); - if (pScanLineBuffer!=NULL) { - rtl_freeMemory( pScanLineBuffer ); - pScanLineBuffer=NULL; - } - -Exit: - - if( bDecompCreated ) - jpeg_destroy_decompress( &cinfo ); -} - -long WriteJPEG( void* pJPEGWriter, void* pOStm, - long nWidth, long nHeight, long bGreys, - long nQualityPercent, void* pCallbackData ) -{ - struct jpeg_compress_struct cinfo; - struct my_error_mgr jerr; - void* pScanline; - long nY; - // declare bCompCreated, bRet volatile because of gcc - // warning: variable 'bCompCreated' might be clobbered by `longjmp' or `vfork' - volatile long bCompCreated = 0; - volatile long bRet = 0; - - if ( setjmp( jerr.setjmp_buffer ) ) - goto Exit; - - cinfo.err = jpeg_std_error( &jerr.pub ); - jerr.pub.error_exit = my_error_exit; - jerr.pub.output_message = my_output_message; - - jpeg_create_compress( &cinfo ); - bCompCreated = 1; - - jpeg_svstream_dest( &cinfo, pOStm ); - - cinfo.image_width = (JDIMENSION) nWidth; - cinfo.image_height = (JDIMENSION) nHeight; - if ( bGreys ) - { - cinfo.input_components = 1; - cinfo.in_color_space = JCS_GRAYSCALE; - } - else - { - cinfo.input_components = 3; - cinfo.in_color_space = JCS_RGB; - } - - jpeg_set_defaults( &cinfo ); - jpeg_set_quality( &cinfo, (int) nQualityPercent, FALSE ); - - if ( ( nWidth > 128 ) || ( nHeight > 128 ) ) - jpeg_simple_progression( &cinfo ); - - jpeg_start_compress( &cinfo, TRUE ); - - for( nY = 0; nY < nHeight; nY++ ) - { - pScanline = GetScanline( pJPEGWriter, nY ); - - if( pScanline ) - jpeg_write_scanlines( &cinfo, (JSAMPARRAY) &pScanline, 1 ); - - if( JPEGCallback( pCallbackData, nY * 100L / nHeight ) ) - goto Exit; - } - - bRet = 1; - - jpeg_finish_compress(&cinfo); - -Exit: - - if ( bCompCreated ) - jpeg_destroy_compress( &cinfo ); - - return bRet; -} diff --git a/svtools/source/filter.vcl/wmf/emfwr.cxx b/svtools/source/filter.vcl/wmf/emfwr.cxx deleted file mode 100644 index f31fd4439e9f..000000000000 --- a/svtools/source/filter.vcl/wmf/emfwr.cxx +++ /dev/null @@ -1,1415 +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_svtools.hxx" - -#include "emfwr.hxx" -#include -#include -#include -#include - -// ----------- -// - Defines - -// ----------- - -#define WIN_EMR_HEADER 1 -#define WIN_EMR_POLYBEZIER 2 -#define WIN_EMR_POLYGON 3 -#define WIN_EMR_POLYLINE 4 -#define WIN_EMR_POLYBEZIERTO 5 -#define WIN_EMR_POLYLINETO 6 -#define WIN_EMR_POLYPOLYLINE 7 -#define WIN_EMR_POLYPOLYGON 8 -#define WIN_EMR_SETWINDOWEXTEX 9 -#define WIN_EMR_SETWINDOWORGEX 10 -#define WIN_EMR_SETVIEWPORTEXTEX 11 -#define WIN_EMR_SETVIEWPORTORGEX 12 -#define WIN_EMR_SETBRUSHORGEX 13 -#define WIN_EMR_EOF 14 -#define WIN_EMR_SETPIXELV 15 -#define WIN_EMR_SETMAPPERFLAGS 16 -#define WIN_EMR_SETMAPMODE 17 -#define WIN_EMR_SETBKMODE 18 -#define WIN_EMR_SETPOLYFILLMODE 19 -#define WIN_EMR_SETROP2 20 -#define WIN_EMR_SETSTRETCHBLTMODE 21 -#define WIN_EMR_SETTEXTALIGN 22 -#define WIN_EMR_SETCOLORADJUSTMENT 23 -#define WIN_EMR_SETTEXTCOLOR 24 -#define WIN_EMR_SETBKCOLOR 25 -#define WIN_EMR_OFFSETCLIPRGN 26 -#define WIN_EMR_MOVETOEX 27 -#define WIN_EMR_SETMETARGN 28 -#define WIN_EMR_EXCLUDECLIPRECT 29 -#define WIN_EMR_INTERSECTCLIPRECT 30 -#define WIN_EMR_SCALEVIEWPORTEXTEX 31 -#define WIN_EMR_SCALEWINDOWEXTEX 32 -#define WIN_EMR_SAVEDC 33 -#define WIN_EMR_RESTOREDC 34 -#define WIN_EMR_SETWORLDTRANSFORM 35 -#define WIN_EMR_MODIFYWORLDTRANSFORM 36 -#define WIN_EMR_SELECTOBJECT 37 -#define WIN_EMR_CREATEPEN 38 -#define WIN_EMR_CREATEBRUSHINDIRECT 39 -#define WIN_EMR_DELETEOBJECT 40 -#define WIN_EMR_ANGLEARC 41 -#define WIN_EMR_ELLIPSE 42 -#define WIN_EMR_RECTANGLE 43 -#define WIN_EMR_ROUNDRECT 44 -#define WIN_EMR_ARC 45 -#define WIN_EMR_CHORD 46 -#define WIN_EMR_PIE 47 -#define WIN_EMR_SELECTPALETTE 48 -#define WIN_EMR_CREATEPALETTE 49 -#define WIN_EMR_SETPALETTEENTRIES 50 -#define WIN_EMR_RESIZEPALETTE 51 -#define WIN_EMR_REALIZEPALETTE 52 -#define WIN_EMR_EXTFLOODFILL 53 -#define WIN_EMR_LINETO 54 -#define WIN_EMR_ARCTO 55 -#define WIN_EMR_POLYDRAW 56 -#define WIN_EMR_SETARCDIRECTION 57 -#define WIN_EMR_SETMITERLIMIT 58 -#define WIN_EMR_BEGINPATH 59 -#define WIN_EMR_ENDPATH 60 -#define WIN_EMR_CLOSEFIGURE 61 -#define WIN_EMR_FILLPATH 62 -#define WIN_EMR_STROKEANDFILLPATH 63 -#define WIN_EMR_STROKEPATH 64 -#define WIN_EMR_FLATTENPATH 65 -#define WIN_EMR_WIDENPATH 66 -#define WIN_EMR_SELECTCLIPPATH 67 -#define WIN_EMR_ABORTPATH 68 - -#define WIN_EMR_GDICOMMENT 70 -#define WIN_EMR_FILLRGN 71 -#define WIN_EMR_FRAMERGN 72 -#define WIN_EMR_INVERTRGN 73 -#define WIN_EMR_PAINTRGN 74 -#define WIN_EMR_EXTSELECTCLIPRGN 75 -#define WIN_EMR_BITBLT 76 -#define WIN_EMR_STRETCHBLT 77 -#define WIN_EMR_MASKBLT 78 -#define WIN_EMR_PLGBLT 79 -#define WIN_EMR_SETDIBITSTODEVICE 80 -#define WIN_EMR_STRETCHDIBITS 81 -#define WIN_EMR_EXTCREATEFONTINDIRECTW 82 -#define WIN_EMR_EXTTEXTOUTA 83 -#define WIN_EMR_EXTTEXTOUTW 84 -#define WIN_EMR_POLYBEZIER16 85 -#define WIN_EMR_POLYGON16 86 -#define WIN_EMR_POLYLINE16 87 -#define WIN_EMR_POLYBEZIERTO16 88 -#define WIN_EMR_POLYLINETO16 89 -#define WIN_EMR_POLYPOLYLINE16 90 -#define WIN_EMR_POLYPOLYGON16 91 -#define WIN_EMR_POLYDRAW16 92 -#define WIN_EMR_CREATEMONOBRUSH 93 -#define WIN_EMR_CREATEDIBPATTERNBRUSHPT 94 -#define WIN_EMR_EXTCREATEPEN 95 -#define WIN_EMR_POLYTEXTOUTA 96 -#define WIN_EMR_POLYTEXTOUTW 97 - -#define WIN_SRCCOPY 0x00CC0020L -#define WIN_SRCPAINT 0x00EE0086L -#define WIN_SRCAND 0x008800C6L -#define WIN_SRCINVERT 0x00660046L - -#define HANDLE_INVALID 0xffffffff -#define MAXHANDLES 65000 - -#define LINE_SELECT 0x00000001 -#define FILL_SELECT 0x00000002 -#define TEXT_SELECT 0x00000004 - -/* Text Alignment Options */ -#define TA_NOUPDATECP 0 -#define TA_UPDATECP 1 - -#define TA_LEFT 0 -#define TA_RIGHT 2 -#define TA_CENTER 6 - -#define TA_TOP 0 -#define TA_BOTTOM 8 -#define TA_BASELINE 24 -#define TA_RTLREADING 256 -#define TA_MASK (TA_BASELINE+TA_CENTER+TA_UPDATECP+TA_RTLREADING) - -#define MM_ANISOTROPIC 8 - -// ------------- -// - EMFWriter - -// ------------- - -BOOL EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfigItem* pFilterConfigItem ) -{ - const ULONG nHeaderPos = rOStm.Tell(); - - mpHandlesUsed = new BOOL[ MAXHANDLES ]; - memset( mpHandlesUsed, 0, MAXHANDLES * sizeof( BOOL ) ); - mnHorTextAlign = mnHandleCount = mnLastPercent = mnRecordPos = mnRecordCount = 0; - mnLineHandle = mnFillHandle = mnTextHandle = HANDLE_INVALID; - mbRecordOpen = FALSE; - - mpStm = &rOStm; - maVDev.EnableOutput( FALSE ); - maVDev.SetMapMode( rMtf.GetPrefMapMode() ); - mpFilterConfigItem = pFilterConfigItem; - - // don't work with pixel as destination map mode -> higher resolution preferrable - maDestMapMode.SetMapUnit( MAP_100TH_MM ); - - const Size aMtfSizePix( maVDev.LogicToPixel( rMtf.GetPrefSize(), rMtf.GetPrefMapMode() ) ); - const Size aMtfSizeLog( maVDev.LogicToLogic( rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MAP_100TH_MM ) ); - - // seek over header - // use [MS-EMF 2.2.11] HeaderExtension2 Object, otherwise resulting EMF cannot be converted with GetWinMetaFileBits() - rOStm.SeekRel( 108 ); - - // write initial values - - // set 100th mm map mode in EMF - ImplBeginRecord( WIN_EMR_SETMAPMODE ); - (*mpStm) << (INT32) MM_ANISOTROPIC; - ImplEndRecord(); - - ImplBeginRecord( WIN_EMR_SETVIEWPORTEXTEX ); - (*mpStm) << (INT32) maVDev.ImplGetDPIX() << (INT32) maVDev.ImplGetDPIY(); - ImplEndRecord(); - - ImplBeginRecord( WIN_EMR_SETWINDOWEXTEX ); - (*mpStm) << (INT32) 2540 << (INT32) 2540; - ImplEndRecord(); - - ImplBeginRecord( WIN_EMR_SETVIEWPORTORGEX ); - (*mpStm) << (INT32) 0 << (INT32) 0; - ImplEndRecord(); - - ImplBeginRecord( WIN_EMR_SETWINDOWORGEX ); - (*mpStm) << (INT32) 0 << (INT32) 0; - ImplEndRecord(); - - ImplWriteRasterOp( ROP_OVERPAINT ); - - ImplBeginRecord( WIN_EMR_SETBKMODE ); - (*mpStm) << (UINT32) 1; // TRANSPARENT - ImplEndRecord(); - - // write emf data - ImplWrite( rMtf ); - - ImplBeginRecord( WIN_EMR_EOF ); - (*mpStm)<< (sal_uInt32)0 // nPalEntries - << (sal_uInt32)0x10 // offPalEntries - << (sal_uInt32)0x14; // nSizeLast - ImplEndRecord(); - - - // write header - const ULONG nEndPos = mpStm->Tell(); mpStm->Seek( nHeaderPos ); - - (*mpStm) << (UINT32) 0x00000001 << (UINT32) 108 //use [MS-EMF 2.2.11] HeaderExtension2 Object - << (INT32) 0 << (INT32) 0 << (INT32) ( aMtfSizePix.Width() - 1 ) << (INT32) ( aMtfSizePix.Height() - 1 ) - << (INT32) 0 << (INT32) 0 << (INT32) ( aMtfSizeLog.Width() - 1 ) << (INT32) ( aMtfSizeLog.Height() - 1 ) - << (UINT32) 0x464d4520 << (UINT32) 0x10000 << (UINT32) ( nEndPos - nHeaderPos ) - << (UINT32) mnRecordCount << (UINT16) ( mnHandleCount + 1 ) << (UINT16) 0 << (UINT32) 0 << (UINT32) 0 << (UINT32) 0 - << (INT32) aMtfSizePix.Width() << (INT32) aMtfSizePix.Height() - << (INT32) ( aMtfSizeLog.Width() / 100 ) << (INT32) ( aMtfSizeLog.Height() / 100 ) - << (UINT32) 0 << (UINT32) 0 << (UINT32) 0 - << (INT32) ( aMtfSizeLog.Width() * 10 ) << (INT32) ( aMtfSizeLog.Height() * 10 ); //use [MS-EMF 2.2.11] HeaderExtension2 Object - - mpStm->Seek( nEndPos ); - delete[] mpHandlesUsed; - - return( mpStm->GetError() == ERRCODE_NONE ); -} - -// ----------------------------------------------------------------------------- - -ULONG EMFWriter::ImplAcquireHandle() -{ - ULONG nHandle = HANDLE_INVALID; - - for( ULONG i = 0; i < MAXHANDLES && ( HANDLE_INVALID == nHandle ); i++ ) - { - if( !mpHandlesUsed[ i ] ) - { - mpHandlesUsed[ i ] = TRUE; - - if( ( nHandle = i ) == mnHandleCount ) - mnHandleCount++; - } - } - - DBG_ASSERT( nHandle != HANDLE_INVALID, "No more handles available" ); - return( nHandle != HANDLE_INVALID ? nHandle + 1 : HANDLE_INVALID ); -} - -// ----------------------------------------------------------------------------- - -void EMFWriter::ImplReleaseHandle( ULONG nHandle ) -{ - DBG_ASSERT( nHandle && ( nHandle < MAXHANDLES ), "Handle out of range" ); - mpHandlesUsed[ nHandle - 1 ] = FALSE; -} - -// ----------------------------------------------------------------------------- - -void EMFWriter::ImplBeginRecord( sal_uInt32 nType ) -{ - DBG_ASSERT( !mbRecordOpen, "Another record is already opened!" ); - - if( !mbRecordOpen ) - { - mbRecordOpen = TRUE; - mnRecordPos = mpStm->Tell(); - - (*mpStm) << nType; - mpStm->SeekRel( 4 ); - } -} - -// ----------------------------------------------------------------------------- - -void EMFWriter::ImplEndRecord() -{ - DBG_ASSERT( mbRecordOpen, "Record was not opened!" ); - - if( mbRecordOpen ) - { - sal_Int32 nFillBytes, nActPos = mpStm->Tell(); - mpStm->Seek( mnRecordPos + 4 ); - nFillBytes = nActPos - mnRecordPos; - nFillBytes += 3; // each record has to be dword aligned - nFillBytes ^= 3; - nFillBytes &= 3; - *mpStm << (sal_uInt32)( ( nActPos - mnRecordPos ) + nFillBytes ); - mpStm->Seek( nActPos ); - while( nFillBytes-- ) - *mpStm << (sal_uInt8)0; - mnRecordCount++; - mbRecordOpen = FALSE; - } -} - -// ----------------------------------------------------------------------------- - -BOOL EMFWriter::ImplPrepareHandleSelect( sal_uInt32& rHandle, ULONG nSelectType ) -{ - if( rHandle != HANDLE_INVALID ) - { - UINT32 nStockObject = 0x80000000; - - if( LINE_SELECT == nSelectType ) - nStockObject |= 0x00000007; - else if( FILL_SELECT == nSelectType ) - nStockObject |= 0x00000001; - else if( TEXT_SELECT == nSelectType ) - nStockObject |= 0x0000000a; - - // select stock object first - ImplBeginRecord( WIN_EMR_SELECTOBJECT ); - ( *mpStm ) << nStockObject; - ImplEndRecord(); - - // destroy handle of created object - ImplBeginRecord( WIN_EMR_DELETEOBJECT ); - ( *mpStm ) << rHandle; - ImplEndRecord(); - - // mark handle as free - ImplReleaseHandle( rHandle ); - } - - rHandle = ImplAcquireHandle(); - - return( HANDLE_INVALID != rHandle ); -} - -// ----------------------------------------------------------------------------- - -void EMFWriter::ImplCheckLineAttr() -{ - if( mbLineChanged && ImplPrepareHandleSelect( mnLineHandle, LINE_SELECT ) ) - { - sal_uInt32 nStyle = maVDev.IsLineColor() ? 0 : 5; - sal_uInt32 nWidth = 0, nHeight = 0; - - ImplBeginRecord( WIN_EMR_CREATEPEN ); - (*mpStm) << mnLineHandle << nStyle << nWidth << nHeight; - ImplWriteColor( maVDev.GetLineColor() ); - ImplEndRecord(); - - ImplBeginRecord( WIN_EMR_SELECTOBJECT ); - (*mpStm) << mnLineHandle; - ImplEndRecord(); - } -} - -// ----------------------------------------------------------------------------- - -void EMFWriter::ImplCheckFillAttr() -{ - if( mbFillChanged && ImplPrepareHandleSelect( mnFillHandle, FILL_SELECT ) ) - { - sal_uInt32 nStyle = maVDev.IsFillColor() ? 0 : 1; - sal_uInt32 nPatternStyle = 0; - - ImplBeginRecord( WIN_EMR_CREATEBRUSHINDIRECT ); - (*mpStm) << mnFillHandle << nStyle; - ImplWriteColor( maVDev.GetFillColor() ); - (*mpStm) << nPatternStyle; - ImplEndRecord(); - - ImplBeginRecord( WIN_EMR_SELECTOBJECT ); - (*mpStm) << mnFillHandle; - ImplEndRecord(); - } -} - -// ----------------------------------------------------------------------------- - -void EMFWriter::ImplCheckTextAttr() -{ - if( mbTextChanged && ImplPrepareHandleSelect( mnTextHandle, TEXT_SELECT ) ) - { - const Font& rFont = maVDev.GetFont(); - String aFontName( rFont.GetName() ); - sal_Int32 nWeight; - sal_uInt16 i; - sal_uInt8 nPitchAndFamily; - - ImplBeginRecord( WIN_EMR_EXTCREATEFONTINDIRECTW ); - (*mpStm) << mnTextHandle; - ImplWriteExtent( -rFont.GetSize().Height() ); - ImplWriteExtent( rFont.GetSize().Width() ); - (*mpStm) << (INT32) rFont.GetOrientation() << (INT32) rFont.GetOrientation(); - - switch( rFont.GetWeight() ) - { - case WEIGHT_THIN: nWeight = 100; break; - case WEIGHT_ULTRALIGHT: nWeight = 200; break; - case WEIGHT_LIGHT: nWeight = 300; break; - case WEIGHT_SEMILIGHT: nWeight = 300; break; - case WEIGHT_NORMAL: nWeight = 400; break; - case WEIGHT_MEDIUM: nWeight = 500; break; - case WEIGHT_SEMIBOLD: nWeight = 600; break; - case WEIGHT_BOLD: nWeight = 700; break; - case WEIGHT_ULTRABOLD: nWeight = 800; break; - case WEIGHT_BLACK: nWeight = 900; break; - default: nWeight = 0; break; - } - - (*mpStm) << nWeight; - (*mpStm) << (BYTE) ( ( ITALIC_NONE == rFont.GetItalic() ) ? 0 : 1 ); - (*mpStm) << (BYTE) ( ( UNDERLINE_NONE == rFont.GetUnderline() ) ? 0 : 1 ); - (*mpStm) << (BYTE) ( ( STRIKEOUT_NONE == rFont.GetStrikeout() ) ? 0 : 1 ); - (*mpStm) << (BYTE) ( ( RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet() ) ? 2 : 0 ); - (*mpStm) << (BYTE) 0 << (BYTE) 0 << (BYTE) 0; - - switch( rFont.GetPitch() ) - { - case PITCH_FIXED: nPitchAndFamily = 0x01; break; - case PITCH_VARIABLE: nPitchAndFamily = 0x02; break; - default: nPitchAndFamily = 0x00; break; - } - - switch( rFont.GetFamily() ) - { - case FAMILY_DECORATIVE: nPitchAndFamily |= 0x50; break; - case FAMILY_MODERN: nPitchAndFamily |= 0x30; break; - case FAMILY_ROMAN: nPitchAndFamily |= 0x10; break; - case FAMILY_SCRIPT: nPitchAndFamily |= 0x40; break; - case FAMILY_SWISS: nPitchAndFamily |= 0x20; break; - default: break; - } - - (*mpStm) << nPitchAndFamily; - - for( i = 0; i < 32; i++ ) - (*mpStm) << (sal_Unicode) ( ( i < aFontName.Len() ) ? aFontName.GetChar( i ) : 0 ); - - // dummy elfFullName - for( i = 0; i < 64; i++ ) - (*mpStm) << (sal_Unicode) 0; - - // dummy elfStyle - for( i = 0; i < 32; i++ ) - (*mpStm) << (sal_Unicode) 0; - - // dummy elfVersion, elfStyleSize, elfMatch, elfReserved - (*mpStm) << (UINT32) 0 << (UINT32) 0 << (UINT32) 0 << (UINT32) 0 ; - - // dummy elfVendorId - (*mpStm) << (UINT32) 0; - - // dummy elfCulture - (*mpStm) << (UINT32) 0; - - // dummy elfPanose - (*mpStm) << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0; - - // fill record to get a record size divideable by 4 - (*mpStm) << (UINT16) 0; - - ImplEndRecord(); - - // TextAlign - UINT32 nTextAlign; - - switch( rFont.GetAlign() ) - { - case ALIGN_TOP: nTextAlign = TA_TOP; break; - case ALIGN_BOTTOM: nTextAlign = TA_BOTTOM; break; - default: nTextAlign = TA_BASELINE; break; - } - nTextAlign |= mnHorTextAlign; - - ImplBeginRecord( WIN_EMR_SETTEXTALIGN ); - (*mpStm) << nTextAlign; - ImplEndRecord(); - - // Text color - ImplBeginRecord( WIN_EMR_SETTEXTCOLOR ); - ImplWriteColor( maVDev.GetTextColor() ); - ImplEndRecord(); - - ImplBeginRecord( WIN_EMR_SELECTOBJECT ); - (*mpStm) << mnTextHandle; - ImplEndRecord(); - } -} - -// ----------------------------------------------------------------------------- - -void EMFWriter::ImplWriteColor( const Color& rColor ) -{ - UINT32 nCol = rColor.GetRed(); - - nCol |= ( (UINT32) rColor.GetGreen() ) << 8; - nCol |= ( (UINT32) rColor.GetBlue() ) << 16; - - (*mpStm) << nCol; -} - -// ----------------------------------------------------------------------------- - -void EMFWriter::ImplWriteRasterOp( RasterOp eRop ) -{ - UINT32 nROP2; - - switch( eRop ) - { - case ROP_INVERT: nROP2 = 6; break; - case ROP_XOR: nROP2 = 7; break; - default: nROP2 = 13;break; - } - - ImplBeginRecord( WIN_EMR_SETROP2 ); - (*mpStm) << nROP2; - ImplEndRecord(); -} - -// ----------------------------------------------------------------------------- - -void EMFWriter::ImplWriteExtent( long nExtent ) -{ - nExtent = maVDev.LogicToLogic( Size( nExtent, 0 ), maVDev.GetMapMode(), maDestMapMode ).Width(); - (*mpStm) << (INT32) nExtent; -} - -// ----------------------------------------------------------------------------- - -void EMFWriter::ImplWritePoint( const Point& rPoint ) -{ - const Point aPoint( maVDev.LogicToLogic( rPoint, maVDev.GetMapMode(), maDestMapMode )); - (*mpStm) << (INT32) aPoint.X() << (INT32) aPoint.Y(); -} - -// ----------------------------------------------------------------------------- - -void EMFWriter::ImplWriteSize( const Size& rSize) -{ - const Size aSize( maVDev.LogicToLogic( rSize, maVDev.GetMapMode(), maDestMapMode )); - (*mpStm) << (INT32) aSize.Width() << (INT32) aSize.Height(); -} - -// ----------------------------------------------------------------------------- - -void EMFWriter::ImplWriteRect( const Rectangle& rRect ) -{ - const Rectangle aRect( maVDev.LogicToLogic ( rRect, maVDev.GetMapMode(), maDestMapMode )); - (*mpStm) << aRect.Left() << aRect.Top() << aRect.Right() << aRect.Bottom(); -} - -// ----------------------------------------------------------------------------- - -void EMFWriter::ImplWritePolygonRecord( const Polygon& rPoly, BOOL bClose ) -{ - if( rPoly.GetSize() ) - { - if( rPoly.HasFlags() ) - ImplWritePath( rPoly, bClose ); - else - { - if( bClose ) - ImplCheckFillAttr(); - - ImplCheckLineAttr(); - - ImplBeginRecord( bClose ? WIN_EMR_POLYGON : WIN_EMR_POLYLINE ); - ImplWriteRect( rPoly.GetBoundRect() ); - (*mpStm) << (UINT32) rPoly.GetSize(); - - for( USHORT i = 0; i < rPoly.GetSize(); i++ ) - ImplWritePoint( rPoly[ i ] ); - - ImplEndRecord(); - } - } -} - -// ----------------------------------------------------------------------------- - -void EMFWriter::ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly ) -{ - sal_uInt16 n, i, nPolyCount = rPolyPoly.Count(); - - if( nPolyCount ) - { - if( 1 == nPolyCount ) - ImplWritePolygonRecord( rPolyPoly[ 0 ], TRUE ); - else - { - sal_Bool bHasFlags = sal_False; - sal_uInt32 nTotalPoints = 0; - - for( i = 0; i < nPolyCount; i++ ) - { - nTotalPoints += rPolyPoly[ i ].GetSize(); - if ( rPolyPoly[ i ].HasFlags() ) - bHasFlags = sal_True; - } - if( nTotalPoints ) - { - if ( bHasFlags ) - ImplWritePath( rPolyPoly, sal_True ); - else - { - ImplCheckFillAttr(); - ImplCheckLineAttr(); - - ImplBeginRecord( WIN_EMR_POLYPOLYGON ); - ImplWriteRect( rPolyPoly.GetBoundRect() ); - (*mpStm) << (sal_uInt32)nPolyCount << nTotalPoints; - - for( i = 0; i < nPolyCount; i++ ) - (*mpStm) << (sal_uInt32)rPolyPoly[ i ].GetSize(); - - for( i = 0; i < nPolyCount; i++ ) - { - const Polygon& rPoly = rPolyPoly[ i ]; - - for( n = 0; n < rPoly.GetSize(); n++ ) - ImplWritePoint( rPoly[ n ] ); - } - ImplEndRecord(); - } - } - } - } -} - -// ----------------------------------------------------------------------------- - -void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClosed ) -{ - if ( bClosed ) - ImplCheckFillAttr(); - ImplCheckLineAttr(); - - ImplBeginRecord( WIN_EMR_BEGINPATH ); - ImplEndRecord(); - - sal_uInt16 i, n, o, nPolyCount = rPolyPoly.Count(); - for ( i = 0; i < nPolyCount; i++ ) - { - n = 0; - const Polygon& rPoly = rPolyPoly[ i ]; - while ( n < rPoly.GetSize() ) - { - if( n == 0 ) - { - ImplBeginRecord( WIN_EMR_MOVETOEX ); - ImplWritePoint( rPoly[ 0 ] ); - ImplEndRecord(); - n++; - continue; - } - - sal_uInt16 nBezPoints = 0; - - while ( ( ( nBezPoints + n + 2 ) < rPoly.GetSize() ) && ( rPoly.GetFlags( nBezPoints + n ) == POLY_CONTROL ) ) - nBezPoints += 3; - - if ( nBezPoints ) - { - ImplBeginRecord( WIN_EMR_POLYBEZIERTO ); - Polygon aNewPoly( nBezPoints + 1 ); - aNewPoly[ 0 ] = rPoly[ n - 1 ]; - for ( o = 0; o < nBezPoints; o++ ) - aNewPoly[ o + 1 ] = rPoly[ n + o ]; - ImplWriteRect( aNewPoly.GetBoundRect() ); - (*mpStm) << (sal_uInt32)nBezPoints; - for( o = 1; o < aNewPoly.GetSize(); o++ ) - ImplWritePoint( aNewPoly[ o ] ); - ImplEndRecord(); - n = n + nBezPoints; - } - else - { - sal_uInt16 nPoints = 1; - while( ( nPoints + n ) < rPoly.GetSize() && ( rPoly.GetFlags( nPoints + n ) != POLY_CONTROL ) ) - nPoints++; - - if ( nPoints > 1 ) - { - ImplBeginRecord( WIN_EMR_POLYLINETO ); - Polygon aNewPoly( nPoints + 1 ); - aNewPoly[ 0 ] = rPoly[ n - 1]; - for ( o = 1; o <= nPoints; o++ ) - aNewPoly[ o ] = rPoly[ n - 1 + o ]; - ImplWriteRect( aNewPoly.GetBoundRect() ); - (*mpStm) << (sal_uInt32)( nPoints ); - for( o = 1; o < aNewPoly.GetSize(); o++ ) - ImplWritePoint( aNewPoly[ o ] ); - ImplEndRecord(); - } - else - { - ImplBeginRecord( WIN_EMR_LINETO ); - ImplWritePoint( rPoly[ n ] ); - ImplEndRecord(); - } - n = n + nPoints; - } - if ( bClosed && ( n == rPoly.GetSize() ) ) - { - ImplBeginRecord( WIN_EMR_CLOSEFIGURE ); - ImplEndRecord(); - } - } - } - ImplBeginRecord( WIN_EMR_ENDPATH ); - ImplEndRecord(); - ImplBeginRecord( bClosed ? WIN_EMR_FILLPATH : WIN_EMR_STROKEPATH ); - ImplWriteRect( rPolyPoly.GetBoundRect() ); - ImplEndRecord(); -} - -// ----------------------------------------------------------------------------- - -void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, - const Size& rSz, UINT32 nROP ) -{ - if( !!rBmp ) - { - SvMemoryStream aMemStm( 65535, 65535 ); - const Size aBmpSizePixel( rBmp.GetSizePixel() ); - - ImplBeginRecord( WIN_EMR_STRETCHDIBITS ); - ImplWriteRect( Rectangle( rPt, rSz ) ); - ImplWritePoint( rPt ); - (*mpStm) << (INT32) 0 << (INT32) 0 << (INT32) aBmpSizePixel.Width() << (INT32) aBmpSizePixel.Height(); - - // write offset positions and sizes later - const ULONG nOffPos = mpStm->Tell(); - mpStm->SeekRel( 16 ); - - (*mpStm) << (UINT32) 0 << ( ( ROP_XOR == maVDev.GetRasterOp() && WIN_SRCCOPY == nROP ) ? WIN_SRCINVERT : nROP ); - ImplWriteSize( rSz ); - - rBmp.Write( aMemStm, TRUE, FALSE ); - - UINT32 nDIBSize = aMemStm.Tell(), nHeaderSize, nCompression, nColsUsed, nPalCount, nImageSize; - UINT16 nBitCount; - - // get DIB parameters - aMemStm.Seek( 0 ); - aMemStm >> nHeaderSize; - aMemStm.SeekRel( 10 ); - aMemStm >> nBitCount >> nCompression >> nImageSize; - aMemStm.SeekRel( 8 ); - aMemStm >> nColsUsed; - - nPalCount = ( nBitCount <= 8 ) ? ( nColsUsed ? nColsUsed : ( 1 << (UINT32) nBitCount ) ) : - ( ( 3 == nCompression ) ? 12 : 0 ); - - mpStm->Write( aMemStm.GetData(), nDIBSize ); - - const ULONG nEndPos = mpStm->Tell(); - mpStm->Seek( nOffPos ); - (*mpStm) << (UINT32) 80 << (UINT32)( nHeaderSize + ( nPalCount << 2 ) ); - (*mpStm) << (UINT32)( 80 + ( nHeaderSize + ( nPalCount << 2 ) ) ) << nImageSize; - mpStm->Seek( nEndPos ); - - ImplEndRecord(); - } -} - -// ----------------------------------------------------------------------------- - -void EMFWriter::ImplWriteTextRecord( const Point& rPos, const String rText, const sal_Int32* pDXArray, sal_uInt32 nWidth ) -{ - xub_StrLen nLen = rText.Len(), i; - - if( nLen ) - { - sal_uInt32 nNormWidth; - sal_Int32* pOwnArray; - sal_Int32* pDX; - - // get text sizes - if( pDXArray ) - { - pOwnArray = NULL; - nNormWidth = maVDev.GetTextWidth( rText ); - pDX = (sal_Int32*) pDXArray; - } - else - { - pOwnArray = new sal_Int32[ nLen ]; - nNormWidth = maVDev.GetTextArray( rText, pOwnArray ); - pDX = pOwnArray; - } - - if( nLen > 1 ) - { - nNormWidth = pDX[ nLen - 2 ] + maVDev.GetTextWidth( rText.GetChar( nLen - 1 ) ); - - if( nWidth && nNormWidth && ( nWidth != nNormWidth ) ) - { - const double fFactor = (double) nWidth / nNormWidth; - - for( i = 0; i < ( nLen - 1 ); i++ ) - pDX[ i ] = FRound( pDX[ i ] * fFactor ); - } - } - - // write text record - ImplBeginRecord( WIN_EMR_EXTTEXTOUTW ); - - ImplWriteRect( Rectangle( rPos, Size( nNormWidth, maVDev.GetTextHeight() ) ) ); - (*mpStm) << (UINT32)1; - (*mpStm) << (INT32) 0 << (INT32) 0; - ImplWritePoint( rPos ); - (*mpStm) << (UINT32) nLen << (UINT32) 76 << (UINT32) 2; - (*mpStm) << (INT32) 0 << (INT32) 0 << (INT32) 0 << (INT32) 0; - (*mpStm) << (UINT32) ( 76 + ( nLen << 1 ) + ( (nLen & 1 ) ? 2 : 0 ) ); - - // write text - for( i = 0; i < nLen; i++ ) - (*mpStm) << (sal_Unicode)rText.GetChar( i ); - - // padding word - if( nLen & 1 ) - (*mpStm) << (UINT16) 0; - - // write DX array - ImplWriteExtent( pDX[ 0 ] ); - - if( nLen > 1 ) - { - for( i = 1; i < ( nLen - 1 ); i++ ) - ImplWriteExtent( pDX[ i ] - pDX[ i - 1 ] ); - - ImplWriteExtent( pDX[ nLen - 2 ] / ( nLen - 1 ) ); - } - - ImplEndRecord(); - delete[] pOwnArray; - } -} - -// ----------------------------------------------------------------------------- - -void EMFWriter::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon) -{ - if(rLinePolygon.count()) - { - basegfx::B2DPolyPolygon aLinePolyPolygon(rLinePolygon); - basegfx::B2DPolyPolygon aFillPolyPolygon; - - rInfo.applyToB2DPolyPolygon(aLinePolyPolygon, aFillPolyPolygon); - - if(aLinePolyPolygon.count()) - { - for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++) - { - const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a)); - ImplWritePolygonRecord( Polygon(aCandidate), FALSE ); - } - } - - if(aFillPolyPolygon.count()) - { - const Color aOldLineColor(maVDev.GetLineColor()); - const Color aOldFillColor(maVDev.GetFillColor()); - - maVDev.SetLineColor(); - maVDev.SetFillColor(aOldLineColor); - - for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++) - { - const Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a)); - ImplWritePolyPolygonRecord(PolyPolygon(Polygon(aPolygon))); - } - - maVDev.SetLineColor(aOldLineColor); - maVDev.SetFillColor(aOldFillColor); - } - } -} - -// ----------------------------------------------------------------------------- - -void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) -{ - for( ULONG j = 0, nActionCount = rMtf.GetActionCount(); j < nActionCount; j++ ) - { - const MetaAction* pAction = rMtf.GetAction( j ); - const USHORT nType = pAction->GetType(); - - switch( nType ) - { - case( META_PIXEL_ACTION ): - { - const MetaPixelAction* pA = (const MetaPixelAction*) pAction; - - ImplCheckLineAttr(); - ImplBeginRecord( WIN_EMR_SETPIXELV ); - ImplWritePoint( pA->GetPoint() ); - ImplWriteColor( pA->GetColor() ); - ImplEndRecord(); - } - break; - - case( META_POINT_ACTION ): - { - if( maVDev.IsLineColor() ) - { - const MetaPointAction* pA = (const MetaPointAction*) pAction; - - ImplCheckLineAttr(); - ImplBeginRecord( WIN_EMR_SETPIXELV ); - ImplWritePoint( pA->GetPoint() ); - ImplWriteColor( maVDev.GetLineColor() ); - ImplEndRecord(); - } - } - break; - - case( META_LINE_ACTION ): - { - if( maVDev.IsLineColor() ) - { - const MetaLineAction* pA = (const MetaLineAction*) pAction; - - if(pA->GetLineInfo().IsDefault()) - { - ImplCheckLineAttr(); - - ImplBeginRecord( WIN_EMR_MOVETOEX ); - ImplWritePoint( pA->GetStartPoint() ); - ImplEndRecord(); - - ImplBeginRecord( WIN_EMR_LINETO ); - ImplWritePoint( pA->GetEndPoint() ); - ImplEndRecord(); - - ImplBeginRecord( WIN_EMR_SETPIXELV ); - ImplWritePoint( pA->GetEndPoint() ); - ImplWriteColor( maVDev.GetLineColor() ); - ImplEndRecord(); - } - else - { - // LineInfo used; handle Dash/Dot and fat lines - basegfx::B2DPolygon aPolygon; - aPolygon.append(basegfx::B2DPoint(pA->GetStartPoint().X(), pA->GetStartPoint().Y())); - aPolygon.append(basegfx::B2DPoint(pA->GetEndPoint().X(), pA->GetEndPoint().Y())); - Impl_handleLineInfoPolyPolygons(pA->GetLineInfo(), aPolygon); - } - } - } - break; - - case( META_RECT_ACTION ): - { - if( maVDev.IsLineColor() || maVDev.IsFillColor() ) - { - const MetaRectAction* pA = (const MetaRectAction*) pAction; - - ImplCheckFillAttr(); - ImplCheckLineAttr(); - - ImplBeginRecord( WIN_EMR_RECTANGLE ); - ImplWriteRect( pA->GetRect() ); - ImplEndRecord(); - } - } - break; - - case( META_ROUNDRECT_ACTION ): - { - if( maVDev.IsLineColor() || maVDev.IsFillColor() ) - { - const MetaRoundRectAction* pA = (const MetaRoundRectAction*) pAction; - - ImplCheckFillAttr(); - ImplCheckLineAttr(); - - ImplBeginRecord( WIN_EMR_ROUNDRECT ); - ImplWriteRect( pA->GetRect() ); - ImplWriteSize( Size( pA->GetHorzRound(), pA->GetVertRound() ) ); - ImplEndRecord(); - } - } - break; - - case( META_ELLIPSE_ACTION ): - { - if( maVDev.IsLineColor() || maVDev.IsFillColor() ) - { - const MetaEllipseAction* pA = (const MetaEllipseAction*) pAction; - - ImplCheckFillAttr(); - ImplCheckLineAttr(); - - ImplBeginRecord( WIN_EMR_ELLIPSE ); - ImplWriteRect( pA->GetRect() ); - ImplEndRecord(); - } - } - break; - - case( META_ARC_ACTION ): - case( META_PIE_ACTION ): - case( META_CHORD_ACTION ): - case( META_POLYGON_ACTION ): - { - if( maVDev.IsLineColor() || maVDev.IsFillColor() ) - { - Polygon aPoly; - - switch( nType ) - { - case( META_ARC_ACTION ): - { - const MetaArcAction* pA = (const MetaArcAction*) pAction; - aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_ARC ); - } - break; - - case( META_PIE_ACTION ): - { - const MetaPieAction* pA = (const MetaPieAction*) pAction; - aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_PIE ); - } - break; - - case( META_CHORD_ACTION ): - { - const MetaChordAction* pA = (const MetaChordAction*) pAction; - aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_CHORD ); - } - break; - - case( META_POLYGON_ACTION ): - aPoly = ( (const MetaPolygonAction*) pAction )->GetPolygon(); - break; - } - - ImplWritePolygonRecord( aPoly, nType != META_ARC_ACTION ); - } - } - break; - - case( META_POLYLINE_ACTION ): - { - if( maVDev.IsLineColor() ) - { - const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pAction; - const Polygon& rPoly = pA->GetPolygon(); - - if( rPoly.GetSize() ) - { - if(pA->GetLineInfo().IsDefault()) - { - ImplWritePolygonRecord( rPoly, FALSE ); - } - else - { - // LineInfo used; handle Dash/Dot and fat lines - Impl_handleLineInfoPolyPolygons(pA->GetLineInfo(), rPoly.getB2DPolygon()); - } - } - } - } - break; - - case( META_POLYPOLYGON_ACTION ): - { - if( maVDev.IsLineColor() || maVDev.IsFillColor() ) - ImplWritePolyPolygonRecord( ( (const MetaPolyPolygonAction*) pAction )->GetPolyPolygon() ); - } - break; - - case( META_GRADIENT_ACTION ): - { - const MetaGradientAction* pA = (const MetaGradientAction*) pAction; - GDIMetaFile aTmpMtf; - - maVDev.AddGradientActions( pA->GetRect(), pA->GetGradient(), aTmpMtf ); - ImplWrite( aTmpMtf ); - } - break; - - case META_HATCH_ACTION: - { - const MetaHatchAction* pA = (const MetaHatchAction*) pAction; - GDIMetaFile aTmpMtf; - - maVDev.AddHatchActions( pA->GetPolyPolygon(), pA->GetHatch(), aTmpMtf ); - ImplWrite( aTmpMtf ); - } - break; - - case META_TRANSPARENT_ACTION: - { - ImplCheckFillAttr(); - ImplCheckLineAttr(); - ImplWritePolyPolygonRecord( ( (MetaTransparentAction*) pAction )->GetPolyPolygon() ); - } - break; - - case META_FLOATTRANSPARENT_ACTION: - { - const MetaFloatTransparentAction* pA = (const MetaFloatTransparentAction*) pAction; - - GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() ); - Point aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() ); - const Size aSrcSize( aTmpMtf.GetPrefSize() ); - const Point aDestPt( pA->GetPoint() ); - const Size aDestSize( pA->GetSize() ); - const double fScaleX = aSrcSize.Width() ? (double) aDestSize.Width() / aSrcSize.Width() : 1.0; - const double fScaleY = aSrcSize.Height() ? (double) aDestSize.Height() / aSrcSize.Height() : 1.0; - long nMoveX, nMoveY; - - if( fScaleX != 1.0 || fScaleY != 1.0 ) - { - aTmpMtf.Scale( fScaleX, fScaleY ); - aSrcPt.X() = FRound( aSrcPt.X() * fScaleX ), aSrcPt.Y() = FRound( aSrcPt.Y() * fScaleY ); - } - - nMoveX = aDestPt.X() - aSrcPt.X(), nMoveY = aDestPt.Y() - aSrcPt.Y(); - - if( nMoveX || nMoveY ) - aTmpMtf.Move( nMoveX, nMoveY ); - - ImplCheckFillAttr(); - ImplCheckLineAttr(); - ImplCheckTextAttr(); - ImplWrite( aTmpMtf ); - } - break; - - case( META_EPS_ACTION ): - { - const MetaEPSAction* pA = (const MetaEPSAction*) pAction; - const GDIMetaFile aSubstitute( pA->GetSubstitute() ); - - for( ULONG i = 0, nCount = aSubstitute.GetActionCount(); i < nCount; i++ ) - { - const MetaAction* pSubstAct = aSubstitute.GetAction( i ); - if( pSubstAct->GetType() == META_BMPSCALE_ACTION ) - { - maVDev.Push( PUSH_ALL ); - ImplBeginRecord( WIN_EMR_SAVEDC ); - ImplEndRecord(); - - MapMode aMapMode( aSubstitute.GetPrefMapMode() ); - Size aOutSize( maVDev.LogicToLogic( pA->GetSize(), maVDev.GetMapMode(), aMapMode ) ); - aMapMode.SetScaleX( Fraction( aOutSize.Width(), aSubstitute.GetPrefSize().Width() ) ); - aMapMode.SetScaleY( Fraction( aOutSize.Height(), aSubstitute.GetPrefSize().Height() ) ); - aMapMode.SetOrigin( maVDev.LogicToLogic( pA->GetPoint(), maVDev.GetMapMode(), aMapMode ) ); - maVDev.SetMapMode( aMapMode ); - ImplWrite( aSubstitute ); - - maVDev.Pop(); - ImplBeginRecord( WIN_EMR_RESTOREDC ); - (*mpStm) << (INT32) -1; - ImplEndRecord(); - break; - } - } - } - break; - - case META_BMP_ACTION: - { - const MetaBmpAction* pA = (const MetaBmpAction *) pAction; - ImplWriteBmpRecord( pA->GetBitmap(), pA->GetPoint(), pA->GetBitmap().GetSizePixel(), WIN_SRCCOPY ); - } - break; - - case META_BMPSCALE_ACTION: - { - const MetaBmpScaleAction* pA = (const MetaBmpScaleAction*) pAction; - ImplWriteBmpRecord( pA->GetBitmap(), pA->GetPoint(), pA->GetSize(), WIN_SRCCOPY ); - } - break; - - case META_BMPSCALEPART_ACTION: - { - const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*) pAction; - Bitmap aTmp( pA->GetBitmap() ); - - if( aTmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ) ) - ImplWriteBmpRecord( aTmp, pA->GetDestPoint(), pA->GetDestSize(), WIN_SRCCOPY ); - } - break; - - case META_BMPEX_ACTION: - { - const MetaBmpExAction* pA = (const MetaBmpExAction *) pAction; - Bitmap aBmp( pA->GetBitmapEx().GetBitmap() ); - Bitmap aMsk( pA->GetBitmapEx().GetMask() ); - - if( !!aMsk ) - { - aBmp.Replace( aMsk, COL_WHITE ); - aMsk.Invert(); - ImplWriteBmpRecord( aMsk, pA->GetPoint(), aMsk.GetSizePixel(), WIN_SRCPAINT ); - ImplWriteBmpRecord( aBmp, pA->GetPoint(), aBmp.GetSizePixel(), WIN_SRCAND ); - } - else - ImplWriteBmpRecord( aBmp, pA->GetPoint(), aBmp.GetSizePixel(), WIN_SRCCOPY ); - } - break; - - case META_BMPEXSCALE_ACTION: - { - const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pAction; - Bitmap aBmp( pA->GetBitmapEx().GetBitmap() ); - Bitmap aMsk( pA->GetBitmapEx().GetMask() ); - - if( !!aMsk ) - { - aBmp.Replace( aMsk, COL_WHITE ); - aMsk.Invert(); - ImplWriteBmpRecord( aMsk, pA->GetPoint(), pA->GetSize(), WIN_SRCPAINT ); - ImplWriteBmpRecord( aBmp, pA->GetPoint(), pA->GetSize(), WIN_SRCAND ); - } - else - ImplWriteBmpRecord( aBmp, pA->GetPoint(), pA->GetSize(), WIN_SRCCOPY ); - } - break; - - case META_BMPEXSCALEPART_ACTION: - { - const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pAction; - BitmapEx aBmpEx( pA->GetBitmapEx() ); - aBmpEx.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); - Bitmap aBmp( aBmpEx.GetBitmap() ); - Bitmap aMsk( aBmpEx.GetMask() ); - - if( !!aMsk ) - { - aBmp.Replace( aMsk, COL_WHITE ); - aMsk.Invert(); - ImplWriteBmpRecord( aMsk, pA->GetDestPoint(), pA->GetDestSize(), WIN_SRCPAINT ); - ImplWriteBmpRecord( aBmp, pA->GetDestPoint(), pA->GetDestSize(), WIN_SRCAND ); - } - else - ImplWriteBmpRecord( aBmp, pA->GetDestPoint(), pA->GetDestSize(), WIN_SRCCOPY ); - } - break; - - case META_TEXT_ACTION: - { - const MetaTextAction* pA = (const MetaTextAction*) pAction; - const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() ); - - ImplCheckTextAttr(); - ImplWriteTextRecord( pA->GetPoint(), aText, NULL, 0 ); - } - break; - - case META_TEXTRECT_ACTION: - { - const MetaTextRectAction* pA = (const MetaTextRectAction*) pAction; - const String aText( pA->GetText() ); - - ImplCheckTextAttr(); - ImplWriteTextRecord( pA->GetRect().TopLeft(), aText, NULL, 0 ); - } - break; - - case META_TEXTARRAY_ACTION: - { - const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pAction; - const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() ); - - ImplCheckTextAttr(); - ImplWriteTextRecord( pA->GetPoint(), aText, pA->GetDXArray(), 0 ); - } - break; - - case META_STRETCHTEXT_ACTION: - { - const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pAction; - const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() ); - - ImplCheckTextAttr(); - ImplWriteTextRecord( pA->GetPoint(), aText, NULL, pA->GetWidth() ); - } - break; - - case( META_LINECOLOR_ACTION ): - { - ( (MetaAction*) pAction )->Execute( &maVDev ); - mbLineChanged = TRUE; - } - break; - - case( META_FILLCOLOR_ACTION ): - { - ( (MetaAction*) pAction )->Execute( &maVDev ); - mbFillChanged = TRUE; - } - break; - - case( META_TEXTCOLOR_ACTION ): - case( META_TEXTLINECOLOR_ACTION ): - case( META_TEXTFILLCOLOR_ACTION ): - case( META_TEXTALIGN_ACTION ): - case( META_FONT_ACTION ): - { - ( (MetaAction*) pAction )->Execute( &maVDev ); - mbTextChanged = TRUE; - } - break; - - case( META_ISECTRECTCLIPREGION_ACTION ): - { - ( (MetaAction*) pAction )->Execute( &maVDev ); - - ImplBeginRecord( WIN_EMR_INTERSECTCLIPRECT ); - ImplWriteRect( ( (MetaISectRectClipRegionAction*) pAction )->GetRect() ); - ImplEndRecord(); - } - break; - - case( META_CLIPREGION_ACTION ): - case( META_ISECTREGIONCLIPREGION_ACTION ): - case( META_MOVECLIPREGION_ACTION ): - { - ( (MetaAction*) pAction )->Execute( &maVDev ); - } - break; - - case( META_REFPOINT_ACTION ): - case( META_MAPMODE_ACTION ): - ( (MetaAction*) pAction )->Execute( &maVDev ); - break; - - case( META_PUSH_ACTION ): - { - ( (MetaAction*) pAction )->Execute( &maVDev ); - - ImplBeginRecord( WIN_EMR_SAVEDC ); - ImplEndRecord(); - } - break; - - case( META_POP_ACTION ): - { - ( (MetaAction*) pAction )->Execute( &maVDev ); - - ImplBeginRecord( WIN_EMR_RESTOREDC ); - (*mpStm) << (INT32) -1; - ImplEndRecord(); - - ImplWriteRasterOp( maVDev.GetRasterOp() ); - mbLineChanged = mbFillChanged = mbTextChanged = TRUE; - } - break; - - case( META_RASTEROP_ACTION ): - { - ( (MetaAction*) pAction )->Execute( &maVDev ); - ImplWriteRasterOp( ( (MetaRasterOpAction*) pAction )->GetRasterOp() ); - } - break; - - case( META_LAYOUTMODE_ACTION ): - { - sal_uInt32 nLayoutMode = ( (MetaLayoutModeAction*) pAction )->GetLayoutMode(); - mnHorTextAlign = 0; - if (nLayoutMode & TEXT_LAYOUT_BIDI_RTL) - { - mnHorTextAlign = TA_RIGHT | TA_RTLREADING; - } - if (nLayoutMode & TEXT_LAYOUT_TEXTORIGIN_RIGHT) - mnHorTextAlign |= TA_RIGHT; - else if (nLayoutMode & TEXT_LAYOUT_TEXTORIGIN_LEFT) - mnHorTextAlign &= ~TA_RIGHT; - break; - } - - case( META_MASK_ACTION ): - case( META_MASKSCALE_ACTION ): - case( META_MASKSCALEPART_ACTION ): - case( META_WALLPAPER_ACTION ): - case( META_TEXTLINE_ACTION ): - case( META_COMMENT_ACTION ): - case( META_GRADIENTEX_ACTION ): - { - // !!! >>> we don't want to support these actions - } - break; - - default: - DBG_ERROR( ( ByteString( "EMFWriter::ImplWriteActions: unsupported MetaAction #" ) += ByteString::CreateFromInt32( nType ) ).GetBuffer() ); - break; - } - } -} diff --git a/svtools/source/filter.vcl/wmf/emfwr.hxx b/svtools/source/filter.vcl/wmf/emfwr.hxx deleted file mode 100644 index 6334b5dfe16f..000000000000 --- a/svtools/source/filter.vcl/wmf/emfwr.hxx +++ /dev/null @@ -1,100 +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 _EMFWR_HXX -#define _EMFWR_HXX - -#include -#include -#include -#include -#include -#include - -// ------------- -// - EMFWriter - -// ------------- - -class LineInfo; -namespace basegfx { class B2DPolygon; } - -class EMFWriter -{ -private: - - VirtualDevice maVDev; - MapMode maDestMapMode; - FilterConfigItem* mpFilterConfigItem; - SvStream* mpStm; - BOOL* mpHandlesUsed; - ULONG mnHandleCount; - ULONG mnLastPercent; - ULONG mnRecordCount; - ULONG mnRecordPos; - BOOL mbRecordOpen; - BOOL mbLineChanged; - sal_uInt32 mnLineHandle; - BOOL mbFillChanged; - sal_uInt32 mnFillHandle; - BOOL mbTextChanged; - sal_uInt32 mnTextHandle; - sal_uInt32 mnHorTextAlign; - - void ImplBeginRecord( sal_uInt32 nType ); - void ImplEndRecord(); - - ULONG ImplAcquireHandle(); - void ImplReleaseHandle( ULONG nHandle ); - - BOOL ImplPrepareHandleSelect( sal_uInt32& rHandle, ULONG nSelectType ); - void ImplCheckLineAttr(); - void ImplCheckFillAttr(); - void ImplCheckTextAttr(); - - void ImplWriteColor( const Color& rColor ); - void ImplWriteRasterOp( RasterOp eRop ); - void ImplWriteExtent( long nExtent ); - void ImplWritePoint( const Point& rPoint ); - void ImplWriteSize( const Size& rSize); - void ImplWriteRect( const Rectangle& rRect ); - void ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClose ); - void ImplWritePolygonRecord( const Polygon& rPoly, BOOL bClose ); - void ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly ); - void ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const Size& rSz, UINT32 nROP ); - void ImplWriteTextRecord( const Point& rPos, const String rText, const sal_Int32* pDXArray, sal_uInt32 nWidth ); - - void Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon); - void ImplWrite( const GDIMetaFile& rMtf ); - -public: - - EMFWriter() {} - - BOOL WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfigItem* pConfigItem = NULL ); -}; - -#endif // _EMFWR_HXX diff --git a/svtools/source/filter.vcl/wmf/enhwmf.cxx b/svtools/source/filter.vcl/wmf/enhwmf.cxx deleted file mode 100644 index 1e49e0d61446..000000000000 --- a/svtools/source/filter.vcl/wmf/enhwmf.cxx +++ /dev/null @@ -1,1343 +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_svtools.hxx" - -#include "winmtf.hxx" -#include - -//=========================== GDI-Array =================================== - -#define EMR_HEADER 1 -#define EMR_POLYBEZIER 2 -#define EMR_POLYGON 3 -#define EMR_POLYLINE 4 -#define EMR_POLYBEZIERTO 5 -#define EMR_POLYLINETO 6 -#define EMR_POLYPOLYLINE 7 -#define EMR_POLYPOLYGON 8 -#define EMR_SETWINDOWEXTEX 9 -#define EMR_SETWINDOWORGEX 10 -#define EMR_SETVIEWPORTEXTEX 11 -#define EMR_SETVIEWPORTORGEX 12 -#define EMR_SETBRUSHORGEX 13 -#define EMR_EOF 14 -#define EMR_SETPIXELV 15 -#define EMR_SETMAPPERFLAGS 16 -#define EMR_SETMAPMODE 17 -#define EMR_SETBKMODE 18 -#define EMR_SETPOLYFILLMODE 19 -#define EMR_SETROP2 20 -#define EMR_SETSTRETCHBLTMODE 21 -#define EMR_SETTEXTALIGN 22 -#define EMR_SETCOLORADJUSTMENT 23 -#define EMR_SETTEXTCOLOR 24 -#define EMR_SETBKCOLOR 25 -#define EMR_OFFSETCLIPRGN 26 -#define EMR_MOVETOEX 27 -#define EMR_SETMETARGN 28 -#define EMR_EXCLUDECLIPRECT 29 -#define EMR_INTERSECTCLIPRECT 30 -#define EMR_SCALEVIEWPORTEXTEX 31 -#define EMR_SCALEWINDOWEXTEX 32 -#define EMR_SAVEDC 33 -#define EMR_RESTOREDC 34 -#define EMR_SETWORLDTRANSFORM 35 -#define EMR_MODIFYWORLDTRANSFORM 36 -#define EMR_SELECTOBJECT 37 -#define EMR_CREATEPEN 38 -#define EMR_CREATEBRUSHINDIRECT 39 -#define EMR_DELETEOBJECT 40 -#define EMR_ANGLEARC 41 -#define EMR_ELLIPSE 42 -#define EMR_RECTANGLE 43 -#define EMR_ROUNDRECT 44 -#define EMR_ARC 45 -#define EMR_CHORD 46 -#define EMR_PIE 47 -#define EMR_SELECTPALETTE 48 -#define EMR_CREATEPALETTE 49 -#define EMR_SETPALETTEENTRIES 50 -#define EMR_RESIZEPALETTE 51 -#define EMR_REALIZEPALETTE 52 -#define EMR_EXTFLOODFILL 53 -#define EMR_LINETO 54 -#define EMR_ARCTO 55 -#define EMR_POLYDRAW 56 -#define EMR_SETARCDIRECTION 57 -#define EMR_SETMITERLIMIT 58 -#define EMR_BEGINPATH 59 -#define EMR_ENDPATH 60 -#define EMR_CLOSEFIGURE 61 -#define EMR_FILLPATH 62 -#define EMR_STROKEANDFILLPATH 63 -#define EMR_STROKEPATH 64 -#define EMR_FLATTENPATH 65 -#define EMR_WIDENPATH 66 -#define EMR_SELECTCLIPPATH 67 -#define EMR_ABORTPATH 68 - -#define EMR_GDICOMMENT 70 -#define EMR_FILLRGN 71 -#define EMR_FRAMERGN 72 -#define EMR_INVERTRGN 73 -#define EMR_PAINTRGN 74 -#define EMR_EXTSELECTCLIPRGN 75 -#define EMR_BITBLT 76 -#define EMR_STRETCHBLT 77 -#define EMR_MASKBLT 78 -#define EMR_PLGBLT 79 -#define EMR_SETDIBITSTODEVICE 80 -#define EMR_STRETCHDIBITS 81 -#define EMR_EXTCREATEFONTINDIRECTW 82 -#define EMR_EXTTEXTOUTA 83 -#define EMR_EXTTEXTOUTW 84 -#define EMR_POLYBEZIER16 85 -#define EMR_POLYGON16 86 -#define EMR_POLYLINE16 87 -#define EMR_POLYBEZIERTO16 88 -#define EMR_POLYLINETO16 89 -#define EMR_POLYPOLYLINE16 90 -#define EMR_POLYPOLYGON16 91 -#define EMR_POLYDRAW16 92 -#define EMR_CREATEMONOBRUSH 93 -#define EMR_CREATEDIBPATTERNBRUSHPT 94 -#define EMR_EXTCREATEPEN 95 -#define EMR_POLYTEXTOUTA 96 -#define EMR_POLYTEXTOUTW 97 - -// WINDOWS VERSION >= 0x400 -#define EMR_SETICMMODE 98 -#define EMR_CREATECOLORSPACE 99 -#define EMR_SETCOLORSPACE 100 -#define EMR_DELETECOLORSPACE 101 -#define EMR_GLSRECORD 102 -#define EMR_GLSBOUNDEDRECORD 103 -#define EMR_PIXELFORMAT 104 - -// WINDOWS VERSION >= 0x500 -#define EMR_DRAWESCAPE 105 -#define EMR_EXTESCAPE 106 -#define EMR_STARTDOC 107 -#define EMR_SMALLTEXTOUT 108 -#define EMR_FORCEUFIMAPPING 109 -#define EMR_NAMEDESCAPE 110 -#define EMR_COLORCORRECTPALETTE 111 -#define EMR_SETICMPROFILEA 112 -#define EMR_SETICMPROFILEW 113 -#define EMR_ALPHABLEND 114 -#define EMR_ALPHADIBBLEND 115 -#define EMR_TRANSPARENTBLT 116 -#define EMR_TRANSPARENTDIB 117 -#define EMR_GRADIENTFILL 118 -#define EMR_SETLINKEDUFIS 119 -#define EMR_SETTEXTJUSTIFICATION 120 - - -//----------------------------------------------------------------------------------- - -#ifdef OSL_BIGENDIAN -// currently unused -static float GetSwapFloat( SvStream& rSt ) -{ - float fTmp; - sal_Int8* pPtr = (sal_Int8*)&fTmp; - rSt >> pPtr[3] >> pPtr[2] >> pPtr[1] >> pPtr[0]; // Little Endian <-> Big Endian switch - return fTmp; -} -#endif - -SvStream& operator>>( SvStream& rIn, XForm& rXForm ) -{ - if ( sizeof( float ) != 4 ) - { - DBG_ERROR( "EnhWMFReader::sizeof( float ) != 4" ); - rXForm = XForm(); - } - else - { -#ifdef OSL_BIGENDIAN - rXForm.eM11 = GetSwapFloat( rIn ); - rXForm.eM12 = GetSwapFloat( rIn ); - rXForm.eM21 = GetSwapFloat( rIn ); - rXForm.eM22 = GetSwapFloat( rIn ); - rXForm.eDx = GetSwapFloat( rIn ); - rXForm.eDy = GetSwapFloat( rIn ); -#else - rIn >> rXForm.eM11 >> rXForm.eM12 >> rXForm.eM21 >> rXForm.eM22 - >> rXForm.eDx >> rXForm.eDy; -#endif - } - return rIn; -} - -static sal_Bool ImplReadRegion( PolyPolygon& rPolyPoly, SvStream& rSt, sal_uInt32 nLen ) -{ - sal_Bool bOk = sal_False; - if ( nLen ) - { - sal_uInt32 nHdSize, nType, nCount, nRgnSize, i; - rSt >> nHdSize - >> nType - >> nCount - >> nRgnSize; - - if ( nCount && ( nType == RDH_RECTANGLES ) && - ( nLen >= ( ( nCount << 4 ) + ( nHdSize - 16 ) ) ) ) - { - sal_Int32 nx1, ny1, nx2, ny2; - - for ( i = 0; i < nCount; i++ ) - { - rSt >> nx1 >> ny1 >> nx2 >> ny2; - - Rectangle aRect( Point( nx1, ny1 ), Point( nx2, ny2 ) ); - Polygon aPolygon( aRect ); - PolyPolygon aPolyPolyOr1( aPolygon ); - PolyPolygon aPolyPolyOr2( rPolyPoly ); - rPolyPoly.GetUnion( aPolyPolyOr1, aPolyPolyOr2 ); - rPolyPoly = aPolyPolyOr2; - } - bOk = sal_True; - } - } - return bOk; -} - -BOOL EnhWMFReader::ReadEnhWMF() -{ - sal_uInt32 nStretchBltMode = 0; - sal_uInt32 nRecType, nRecSize, nNextPos, - nW, nH, nPoints, nColor, nIndex, - nDat32, nNom1, nDen1, nNom2, nDen2; - sal_Int32 nX32, nY32, nx32, ny32; - sal_Int16 nX16, nY16; - - sal_Bool bFlag, bStatus = ReadHeader(); - - while( bStatus && nRecordCount-- ) - { - *pWMF >> nRecType >> nRecSize; - - if ( ( nRecSize < 8 ) || ( nRecSize & 3 ) ) // Parameter sind immer durch 4 teilbar - { - bStatus = FALSE; - break; - } - - nNextPos = pWMF->Tell() + ( nRecSize - 8 ); - - if ( nNextPos > nEndPos ) - { - bStatus = FALSE; - break; - } - - if( aBmpSaveList.Count() && ( nRecType != EMR_STRETCHBLT ) && ( nRecType != EMR_STRETCHDIBITS ) ) - pOut->ResolveBitmapActions( aBmpSaveList ); - - bFlag = sal_False; - - switch( nRecType ) - { - case EMR_POLYBEZIERTO : - bFlag = sal_True; - case EMR_POLYBEZIER : - { - pWMF->SeekRel( 16 ); - *pWMF >> nPoints; - sal_uInt16 i = 0; - if ( bFlag ) - { - i++; - nPoints++; - } - Polygon aPoly( (sal_uInt16)nPoints ); - for( ; i < (sal_uInt16)nPoints; i++ ) - { - *pWMF >> nX32 >> nY32; - aPoly[ i ] = Point( nX32, nY32 ); - } - pOut->DrawPolyBezier( aPoly, bFlag, bRecordPath ); - } - break; - - case EMR_POLYGON : - { - pWMF->SeekRel( 16 ); - *pWMF >> nPoints; - Polygon aPoly( (UINT16)nPoints ); - for( UINT16 k = 0; k < (UINT16)nPoints; k++ ) - { - *pWMF >> nX32 >> nY32; - aPoly[ k ] = Point( nX32, nY32 ); - } - pOut->DrawPolygon( aPoly, bRecordPath ); - } - break; - - case EMR_POLYLINETO : - bFlag = sal_True; - case EMR_POLYLINE : - { - pWMF->SeekRel( 0x10 ); - *pWMF >> nPoints; - UINT16 i = 0; - if ( bFlag ) - { - i++; - nPoints++; - } - Polygon aPolygon( (UINT16)nPoints ); - for ( ; i < (UINT16)nPoints; i++ ) - { - *pWMF >> nX32 >> nY32; - aPolygon[ i ] = Point( nX32, nY32 ); - } - pOut->DrawPolyLine( aPolygon, bFlag, bRecordPath ); - } - break; - - case EMR_POLYPOLYLINE : - { - UINT16* pnPoints; - - INT32 i, nPoly; - pWMF->SeekRel( 0x10 ); - - // Anzahl der Polygone: - *pWMF >> nPoly >> i; - - // taking the amount of points of each polygon, retrieving the total number of points - if ( static_cast< sal_uInt32 >(nPoly) < SAL_MAX_UINT32 / sizeof(UINT16) ) - { - if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof(UINT16) ) <= ( nEndPos - pWMF->Tell() ) ) - { - pnPoints = new UINT16[ nPoly ]; - - for ( i = 0; i < nPoly; i++ ) - { - *pWMF >> nPoints; - pnPoints[ i ] = (UINT16)nPoints; - } - - // Polygonpunkte holen: - - for ( i = 0; ( i < nPoly ) && !pWMF->IsEof(); i++ ) - { - Polygon aPoly( pnPoints[ i ] ); - for( UINT16 k = 0; k < pnPoints[ i ]; k++ ) - { - *pWMF >> nX32 >> nY32; - aPoly[ k ] = Point( nX32, nY32 ); - } - pOut->DrawPolyLine( aPoly, sal_False, bRecordPath ); - } - delete[] pnPoints; - } - } - } - break; - - case EMR_POLYPOLYGON : - { - UINT16* pnPoints; - Point* pPtAry; - - UINT32 i, nPoly, nGesPoints; - pWMF->SeekRel( 0x10 ); - - // Anzahl der Polygone: - *pWMF >> nPoly >> nGesPoints; - - if ( ( nGesPoints < SAL_MAX_UINT32 / sizeof(Point) ) && ( nPoly < SAL_MAX_UINT32 / sizeof(UINT16) ) ) - { - if ( ( nPoly * sizeof(UINT16) ) <= ( nEndPos - pWMF->Tell() ) ) - { - pnPoints = new UINT16[ nPoly ]; - - for ( i = 0; i < nPoly; i++ ) - { - *pWMF >> nPoints; - pnPoints[ i ] = (UINT16)nPoints; - } - - if ( ( nGesPoints * (sizeof(sal_uInt32)+sizeof(sal_uInt32)) ) <= ( nEndPos - pWMF->Tell() ) ) - { - // Polygonpunkte holen: - pPtAry = new Point[ nGesPoints ]; - - for ( i = 0; i < nGesPoints; i++ ) - { - *pWMF >> nX32 >> nY32; - pPtAry[ i ] = Point( nX32, nY32 ); - } - // PolyPolygon Actions erzeugen - PolyPolygon aPolyPoly( (UINT16)nPoly, pnPoints, pPtAry ); - pOut->DrawPolyPolygon( aPolyPoly, bRecordPath ); - delete[] pPtAry; - } - delete[] pnPoints; - } - } - } - break; - - case EMR_SETWINDOWEXTEX : - { // #75383# - *pWMF >> nW >> nH; - pOut->SetWinExt( Size( nW, nH ) ); - } - break; - - case EMR_SETWINDOWORGEX : - { - *pWMF >> nX32 >> nY32; - pOut->SetWinOrg( Point( nX32, nY32 ) ); - } - break; - - case EMR_SCALEWINDOWEXTEX : - { - *pWMF >> nNom1 >> nDen1 >> nNom2 >> nDen2; - pOut->ScaleWinExt( (double)nNom1 / nDen1, (double)nNom2 / nDen2 ); - } - break; - - case EMR_SETVIEWPORTORGEX : - { - *pWMF >> nX32 >> nY32; - pOut->SetDevOrg( Point( nX32, nY32 ) ); - } - break; - - case EMR_SCALEVIEWPORTEXTEX : - { - *pWMF >> nNom1 >> nDen1 >> nNom2 >> nDen2; - pOut->ScaleDevExt( (double)nNom1 / nDen1, (double)nNom2 / nDen2 ); - } - break; - - case EMR_SETVIEWPORTEXTEX : - { - *pWMF >> nW >> nH; - pOut->SetDevExt( Size( nW, nH ) ); - } - break; - - case EMR_EOF : - nRecordCount = 0; // #76846# - break; - - case EMR_SETPIXELV : - { - *pWMF >> nX32 >> nY32; - pOut->DrawPixel( Point( nX32, nY32 ), ReadColor() ); - } - break; - - case EMR_SETMAPMODE : - { - sal_uInt32 nMapMode; - *pWMF >> nMapMode; - pOut->SetMapMode( nMapMode ); - } - break; - - case EMR_SETBKMODE : - { - *pWMF >> nDat32; - pOut->SetBkMode( nDat32 ); - } - break; - - case EMR_SETPOLYFILLMODE : - break; - - case EMR_SETROP2 : - { - *pWMF >> nDat32; - pOut->SetRasterOp( nDat32 ); - } - break; - - case EMR_SETSTRETCHBLTMODE : - { - *pWMF >> nStretchBltMode; - } - break; - - case EMR_SETTEXTALIGN : - { - *pWMF >> nDat32; - pOut->SetTextAlign( nDat32 ); - } - break; - - case EMR_SETTEXTCOLOR : - { - pOut->SetTextColor( ReadColor() ); - } - break; - - case EMR_SETBKCOLOR : - { - pOut->SetBkColor( ReadColor() ); - } - break; - - case EMR_OFFSETCLIPRGN : - { - *pWMF >> nX32 >> nY32; - pOut->MoveClipRegion( Size( nX32, nY32 ) ); - } - break; - - case EMR_MOVETOEX : - { - *pWMF >> nX32 >> nY32; - pOut->MoveTo( Point( nX32, nY32 ), bRecordPath ); - } - break; - - case EMR_INTERSECTCLIPRECT : - { - *pWMF >> nX32 >> nY32 >> nx32 >> ny32; - pOut->IntersectClipRect( ReadRectangle( nX32, nY32, nx32, ny32 ) ); - } - break; - - case EMR_SAVEDC : - { - pOut->Push(); - } - break; - - case EMR_RESTOREDC : - { - pOut->Pop(); - } - break; - - case EMR_SETWORLDTRANSFORM : - { - XForm aTempXForm; - *pWMF >> aTempXForm; - pOut->SetWorldTransform( aTempXForm ); - } - break; - - case EMR_MODIFYWORLDTRANSFORM : - { - UINT32 nMode; - XForm aTempXForm; - *pWMF >> aTempXForm >> nMode; - pOut->ModifyWorldTransform( aTempXForm, nMode ); - } - break; - - case EMR_SELECTOBJECT : - { - *pWMF >> nIndex; - pOut->SelectObject( nIndex ); - } - break; - - case EMR_CREATEPEN : - { - *pWMF >> nIndex; - if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) - { - - LineInfo aLineInfo; - UINT32 nStyle; - Size aSize; - - *pWMF >> nStyle >> aSize.Width() >> aSize.Height(); - - if ( aSize.Width() ) - aLineInfo.SetWidth( aSize.Width() ); - - BOOL bTransparent = FALSE; - UINT16 nDashCount = 0; - UINT16 nDotCount = 0; - switch( nStyle ) - { - case PS_DASHDOTDOT : - nDotCount++; - case PS_DASHDOT : - nDashCount++; - case PS_DOT : - nDotCount++; - break; - case PS_DASH : - nDashCount++; - break; - case PS_NULL : - bTransparent = TRUE; - aLineInfo.SetStyle( LINE_NONE ); - break; - default : - case PS_INSIDEFRAME : - case PS_SOLID : - aLineInfo.SetStyle( LINE_SOLID ); - } - if ( nDashCount | nDotCount ) - { - aLineInfo.SetStyle( LINE_DASH ); - aLineInfo.SetDashCount( nDashCount ); - aLineInfo.SetDotCount( nDotCount ); - } - pOut->CreateObject( nIndex, GDI_PEN, new WinMtfLineStyle( ReadColor(), aLineInfo, bTransparent ) ); - } - } - break; - - case EMR_EXTCREATEPEN : - { - sal_Int32 elpHatch; - sal_uInt32 offBmi, cbBmi, offBits, cbBits, nStyle, nWidth, nBrushStyle, elpNumEntries; - Color aColorRef; - - *pWMF >> nIndex; - if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) - { - *pWMF >> offBmi >> cbBmi >> offBits >> cbBits >> nStyle >> nWidth >> nBrushStyle; - aColorRef = ReadColor(); - *pWMF >> elpHatch >> elpNumEntries; - - LineInfo aLineInfo; - if ( nWidth ) - aLineInfo.SetWidth( nWidth ); - - sal_Bool bTransparent = sal_False; - sal_uInt16 nDashCount = 0; - sal_uInt16 nDotCount = 0; - - switch( nStyle & PS_STYLE_MASK ) - { - case PS_DASHDOTDOT : - nDotCount++; - case PS_DASHDOT : - nDashCount++; - case PS_DOT : - nDotCount++; - break; - case PS_DASH : - nDashCount++; - break; - case PS_NULL : - bTransparent = sal_True; - aLineInfo.SetStyle( LINE_NONE ); - break; - - default : - case PS_INSIDEFRAME : - case PS_SOLID : - aLineInfo.SetStyle( LINE_SOLID ); - } - if ( nDashCount | nDotCount ) - { - aLineInfo.SetStyle( LINE_DASH ); - aLineInfo.SetDashCount( nDashCount ); - aLineInfo.SetDotCount( nDotCount ); - } - pOut->CreateObject( nIndex, GDI_PEN, new WinMtfLineStyle( aColorRef, aLineInfo, bTransparent ) ); - } - } - break; - - case EMR_CREATEBRUSHINDIRECT : - { - UINT32 nStyle; - *pWMF >> nIndex; - if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) - { - *pWMF >> nStyle; - pOut->CreateObject( nIndex, GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? TRUE : FALSE ) ); - } - } - break; - - case EMR_DELETEOBJECT : - { - *pWMF >> nIndex; - if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) - pOut->DeleteObject( nIndex ); - } - break; - - case EMR_ELLIPSE : - { - *pWMF >> nX32 >> nY32 >> nx32 >> ny32; - pOut->DrawEllipse( ReadRectangle( nX32, nY32, nx32, ny32 ) ); - } - break; - - case EMR_RECTANGLE : - { - *pWMF >> nX32 >> nY32 >> nx32 >> ny32; - pOut->DrawRect( ReadRectangle( nX32, nY32, nx32, ny32 ) ); - } - break; - - case EMR_ROUNDRECT : - { - *pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nW >> nH; - Size aSize( Size( nW, nH ) ); - pOut->DrawRoundRect( ReadRectangle( nX32, nY32, nx32, ny32 ), aSize ); - } - break; - - case EMR_ARC : - { - UINT32 nStartX, nStartY, nEndX, nEndY; - *pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY; - pOut->DrawArc( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ) ); - } - break; - - case EMR_CHORD : - { - UINT32 nStartX, nStartY, nEndX, nEndY; - *pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY; - pOut->DrawChord( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ) ); - } - break; - - case EMR_PIE : - { - UINT32 nStartX, nStartY, nEndX, nEndY; - *pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY; - const Rectangle aRect( ReadRectangle( nX32, nY32, nx32, ny32 )); - - // #i73608# OutputDevice deviates from WMF - // semantics. start==end means full ellipse here. - if( nStartX == nEndX && nStartY == nEndY ) - pOut->DrawEllipse( aRect ); - else - pOut->DrawPie( aRect, Point( nStartX, nStartY ), Point( nEndX, nEndY ) ); - } - break; - - case EMR_LINETO : - { - *pWMF >> nX32 >> nY32; - pOut->LineTo( Point( nX32, nY32 ), bRecordPath ); - } - break; - - case EMR_ARCTO : - { - UINT32 nStartX, nStartY, nEndX, nEndY; - *pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY; - pOut->DrawArc( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ), TRUE ); - } - break; - - case EMR_BEGINPATH : - { - pOut->ClearPath(); - bRecordPath = sal_True; - } - break; - - case EMR_ABORTPATH : - pOut->ClearPath(); - case EMR_ENDPATH : - bRecordPath = sal_False; - break; - - case EMR_CLOSEFIGURE : - pOut->ClosePath(); - break; - - case EMR_FILLPATH : - pOut->StrokeAndFillPath( sal_False, sal_True ); - break; - - case EMR_STROKEANDFILLPATH : - pOut->StrokeAndFillPath( sal_True, sal_True ); - break; - - case EMR_STROKEPATH : - pOut->StrokeAndFillPath( sal_True, sal_False ); - break; - - case EMR_SELECTCLIPPATH : - { - sal_Int32 nClippingMode; - *pWMF >> nClippingMode; - pOut->SetClipPath( pOut->GetPathObj(), nClippingMode, sal_True ); - } - break; - - case EMR_EXTSELECTCLIPRGN : - { - sal_Int32 iMode, cbRgnData; - *pWMF >> cbRgnData - >> iMode; - - PolyPolygon aPolyPoly; - if ( cbRgnData ) - ImplReadRegion( aPolyPoly, *pWMF, nRecSize ); - pOut->SetClipPath( aPolyPoly, iMode, sal_False ); - } - break; - - case EMR_BITBLT : // PASSTHROUGH INTENDED - case EMR_STRETCHBLT : - { - INT32 xDest, yDest, cxDest, cyDest, xSrc, ySrc, cxSrc, cySrc; - UINT32 dwRop, iUsageSrc, offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc; - XForm xformSrc; - - UINT32 nStart = pWMF->Tell() - 8; - - pWMF->SeekRel( 0x10 ); - *pWMF >> xDest >> yDest >> cxDest >> cyDest >> dwRop >> xSrc >> ySrc - >> xformSrc >> nColor >> iUsageSrc >> offBmiSrc >> cbBmiSrc - >> offBitsSrc >> cbBitsSrc; - - if ( nRecType == EMR_STRETCHBLT ) - *pWMF >> cxSrc >> cySrc; - else - cxSrc = cySrc = 0; - - Bitmap aBitmap; - Rectangle aRect( Point( xDest, yDest ), Size( cxDest+1, cyDest+1 ) ); - - cxDest = abs( (int)cxDest ); // sj: i37894, size can be negative - cyDest = abs( (int)cyDest ); // and also 122889 - - if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) ) - bStatus = FALSE; - else - { - UINT32 nSize = cbBmiSrc + cbBitsSrc + 14; - if ( nSize <= ( nEndPos - nStartPos ) ) - { - char* pBuf = new char[ nSize ]; - SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE ); - aTmp.ObjectOwnsMemory( TRUE ); - aTmp << (BYTE)'B' - << (BYTE)'M' - << (UINT32)cbBitsSrc - << (UINT16)0 - << (UINT16)0 - << (UINT32)cbBmiSrc + 14; - pWMF->Seek( nStart + offBmiSrc ); - pWMF->Read( pBuf + 14, cbBmiSrc ); - pWMF->Seek( nStart + offBitsSrc ); - pWMF->Read( pBuf + 14 + cbBmiSrc, cbBitsSrc ); - aTmp.Seek( 0 ); - aBitmap.Read( aTmp, TRUE ); - - // test if it is sensible to crop - if ( ( cxSrc > 0 ) && ( cySrc > 0 ) && - ( xSrc >= 0 ) && ( ySrc >= 0 ) && - ( xSrc + cxSrc <= aBitmap.GetSizePixel().Width() ) && - ( ySrc + cySrc <= aBitmap.GetSizePixel().Height() ) ) - { - Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) ); - aBitmap.Crop( aCropRect ); - } - aBmpSaveList.Insert( new BSaveStruct( aBitmap, aRect, dwRop ), LIST_APPEND ); - } - } - } - break; - - case EMR_STRETCHDIBITS : - { - INT32 xDest, yDest, xSrc, ySrc, cxSrc, cySrc, cxDest, cyDest; - UINT32 offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc, iUsageSrc, dwRop; - UINT32 nStart = pWMF->Tell() - 8; - - pWMF->SeekRel( 0x10 ); - *pWMF >> xDest >> yDest >> xSrc >> ySrc >> cxSrc >> cySrc >> offBmiSrc >> cbBmiSrc >> offBitsSrc - >> cbBitsSrc >> iUsageSrc >> dwRop >> cxDest >> cyDest; - - Bitmap aBitmap; - Rectangle aRect( Point( xDest, yDest ), Size( cxDest+1, cyDest+1 ) ); - - cxDest = abs( (int)cxDest ); // sj: i37894, size can be negative - cyDest = abs( (int)cyDest ); // and also 122889 - - if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) ) - bStatus = FALSE; - else - { - UINT32 nSize = cbBmiSrc + cbBitsSrc + 14; - if ( nSize <= ( nEndPos - nStartPos ) ) - { - char* pBuf = new char[ nSize ]; - SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE ); - aTmp.ObjectOwnsMemory( TRUE ); - aTmp << (BYTE)'B' - << (BYTE)'M' - << (UINT32)cbBitsSrc - << (UINT16)0 - << (UINT16)0 - << (UINT32)cbBmiSrc + 14; - pWMF->Seek( nStart + offBmiSrc ); - pWMF->Read( pBuf + 14, cbBmiSrc ); - pWMF->Seek( nStart + offBitsSrc ); - pWMF->Read( pBuf + 14 + cbBmiSrc, cbBitsSrc ); - aTmp.Seek( 0 ); - aBitmap.Read( aTmp, TRUE ); - - // test if it is sensible to crop - if ( ( cxSrc > 0 ) && ( cySrc > 0 ) && - ( xSrc >= 0 ) && ( ySrc >= 0 ) && - ( xSrc + cxSrc <= aBitmap.GetSizePixel().Width() ) && - ( ySrc + cySrc <= aBitmap.GetSizePixel().Height() ) ) - { - Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) ); - aBitmap.Crop( aCropRect ); - } - aBmpSaveList.Insert( new BSaveStruct( aBitmap, aRect, dwRop ), LIST_APPEND ); - } - } - } - break; - - case EMR_EXTCREATEFONTINDIRECTW : - { - *pWMF >> nIndex; - if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) - { - LOGFONTW aLogFont; - *pWMF >> aLogFont.lfHeight >> aLogFont.lfWidth >> aLogFont.lfEscapement >> aLogFont.lfOrientation >> aLogFont.lfWeight >> aLogFont.lfItalic - >> aLogFont.lfUnderline >> aLogFont.lfStrikeOut >> aLogFont.lfCharSet >> aLogFont.lfOutPrecision >> aLogFont.lfClipPrecision - >> aLogFont.lfQuality >> aLogFont.lfPitchAndFamily; - - sal_Unicode lfFaceName[ LF_FACESIZE ]; - - for ( int i = 0; i < LF_FACESIZE; i++ ) - { - UINT16 nChar; - *pWMF >> nChar; - lfFaceName[ i ] = nChar; - } - aLogFont.alfFaceName = UniString( lfFaceName ); - pOut->CreateObject( nIndex, GDI_FONT, new WinMtfFontStyle( aLogFont ) ); - } - } - break; - - case EMR_EXTTEXTOUTA : - bFlag = sal_True; - case EMR_EXTTEXTOUTW : - { - sal_Int32 nLeft, nTop, nRight, nBottom, ptlReferenceX, ptlReferenceY, nGfxMode, nXScale, nYScale; - sal_uInt32 nCurPos, nLen, nOffString, nOptions, offDx; - sal_Int32* pDX = NULL; - - nCurPos = pWMF->Tell() - 8; - - *pWMF >> nLeft >> nTop >> nRight >> nBottom >> nGfxMode >> nXScale >> nYScale - >> ptlReferenceX >> ptlReferenceY >> nLen >> nOffString >> nOptions; - - pWMF->SeekRel( 0x10 ); - *pWMF >> offDx; - - sal_Int32 nTextLayoutMode = TEXT_LAYOUT_DEFAULT; - if ( nOptions & ETO_RTLREADING ) - nTextLayoutMode = TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT; - pOut->SetTextLayoutMode( nTextLayoutMode ); - DBG_ASSERT( ( nOptions & ( ETO_PDY | ETO_GLYPH_INDEX ) ) == 0, "SJ: ETO_PDY || ETO_GLYPH_INDEX in EMF" ); - - Point aPos( ptlReferenceX, ptlReferenceY ); - if ( nLen && ( nLen < SAL_MAX_UINT32 / sizeof(sal_Int32) ) ) - { - if ( offDx && (( nCurPos + offDx + nLen * 4 ) <= nNextPos ) ) - { - pWMF->Seek( nCurPos + offDx ); - if ( ( nLen * sizeof(sal_uInt32) ) <= ( nEndPos - pWMF->Tell() ) ) - { - pDX = new sal_Int32[ nLen ]; - sal_uInt32 i; - for ( i = 0; i < nLen; i++ ) - *pWMF >> pDX[ i ]; - } - } - pWMF->Seek( nCurPos + nOffString ); - String aText; - if ( bFlag ) - { - if ( nLen <= ( nEndPos - pWMF->Tell() ) ) - { - sal_Char* pBuf = new sal_Char[ nLen ]; - pWMF->Read( pBuf, nLen ); - aText = String( pBuf, (sal_uInt16)nLen, pOut->GetCharSet() ); - delete[] pBuf; - - if ( aText.Len() != nLen ) - { - sal_uInt16 i, j, k; - sal_Int32* pOldDx = pDX; - pDX = new sal_Int32[ aText.Len() ]; - for ( i = 0, j = 0; i < aText.Len(); i++ ) - { - ByteString aCharacter( aText.GetChar( i ), pOut->GetCharSet() ); - pDX[ i ] = 0; - for ( k = 0; ( k < aCharacter.Len() ) && ( j < nLen ) && ( i < aText.Len() ); k++ ) - pDX[ i ] += pOldDx[ j++ ]; - } - delete[] pOldDx; - } - } - } - else - { - if ( ( nLen * sizeof(sal_Unicode) ) <= ( nEndPos - pWMF->Tell() ) ) - { - sal_Unicode* pBuf = new sal_Unicode[ nLen ]; - pWMF->Read( pBuf, nLen << 1 ); -#ifdef OSL_BIGENDIAN - sal_Char nTmp, *pTmp = (sal_Char*)( pBuf + nLen ); - while ( pTmp-- != (sal_Char*)pBuf ) - { - nTmp = *pTmp--; - pTmp[ 1 ] = *pTmp; - *pTmp = nTmp; - } -#endif - aText = String( pBuf, (xub_StrLen)nLen ); - delete[] pBuf; - } - } - pOut->DrawText( aPos, aText, pDX, bRecordPath, nGfxMode ); - } - delete[] pDX; - } - break; - - case EMR_POLYBEZIERTO16 : - bFlag = sal_True; - case EMR_POLYBEZIER16 : - { - pWMF->SeekRel( 16 ); - *pWMF >> nPoints; - UINT16 i = 0; - if ( bFlag ) - { - i++; - nPoints++; - } - Polygon aPoly( (UINT16)nPoints ); - for( ; i < (UINT16)nPoints; i++ ) - { - *pWMF >> nX16 >> nY16; - aPoly[ i ] = Point( nX16, nY16 ); - } - pOut->DrawPolyBezier( aPoly, bFlag, bRecordPath ); // Line( aPoly, bFlag ); - } - break; - - case EMR_POLYGON16 : - { - pWMF->SeekRel( 16 ); - *pWMF >> nPoints; - Polygon aPoly( (UINT16)nPoints ); - for( UINT16 k = 0; k < (UINT16)nPoints; k++ ) - { - *pWMF >> nX16 >> nY16; - aPoly[ k ] = Point( nX16, nY16 ); - } - pOut->DrawPolygon( aPoly, bRecordPath ); - } - break; - - case EMR_POLYLINETO16 : - bFlag = sal_True; - case EMR_POLYLINE16 : - { - pWMF->SeekRel( 16 ); - *pWMF >> nPoints; - UINT16 i = 0; - if ( bFlag ) - { - i++; - nPoints++; - } - - Polygon aPoly( (UINT16)nPoints ); - for( ; i < (UINT16)nPoints; i++ ) - { - *pWMF >> nX16 >> nY16; - aPoly[ i ] = Point( nX16, nY16 ); - } - pOut->DrawPolyLine( aPoly, bFlag, bRecordPath ); - } - break; - - case EMR_POLYPOLYLINE16 : - { - UINT16* pnPoints; - - INT32 i, nPoly, nGesPoints; - pWMF->SeekRel( 0x10 ); - // Anzahl der Polygone: - *pWMF >> nPoly >> nGesPoints; - - // taking the amount of points of each polygon, retrieving the total number of points - if ( static_cast< sal_uInt32 >(nPoly) < SAL_MAX_UINT32 / sizeof(UINT16) ) - { - if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof(UINT16) ) <= ( nEndPos - pWMF->Tell() ) ) - { - pnPoints = new UINT16[ nPoly ]; - for ( i = 0; i < nPoly; i++ ) - { - *pWMF >> nPoints; - pnPoints[ i ] = (UINT16)nPoints; - } - // Polygonpunkte holen: - for ( i = 0; ( i < nPoly ) && !pWMF->IsEof(); i++ ) - { - Polygon aPolygon( pnPoints[ i ] ); - for ( UINT16 k = 0; k < pnPoints[ i ]; k++ ) - { - *pWMF >> nX16 >> nY16; - aPolygon[ k ] = Point( nX16, nY16 ); - } - pOut->DrawPolyLine( aPolygon, sal_False, bRecordPath ); - } - delete[] pnPoints; - } - } - } - break; - - case EMR_POLYPOLYGON16 : - { - UINT16* pnPoints; - Point* pPtAry; - - UINT32 i, nPoly, nGesPoints; - pWMF->SeekRel( 0x10 ); - // Anzahl der Polygone: - *pWMF >> nPoly >> nGesPoints; - if ( ( nGesPoints < SAL_MAX_UINT32 / sizeof(Point) ) && ( nPoly < SAL_MAX_UINT32 / sizeof(UINT16) ) ) - { - if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof( UINT16 ) ) <= ( nEndPos - pWMF->Tell() ) ) - { - pnPoints = new UINT16[ nPoly ]; - for ( i = 0; i < nPoly; i++ ) - { - *pWMF >> nPoints; - pnPoints[ i ] = (UINT16)nPoints; - } - if ( ( nGesPoints * (sizeof(sal_uInt16)+sizeof(sal_uInt16)) ) <= ( nEndPos - pWMF->Tell() ) ) - { - // Polygonpunkte holen: - pPtAry = new Point[ nGesPoints ]; - for ( i = 0; i < nGesPoints; i++ ) - { - *pWMF >> nX16 >> nY16; - pPtAry[ i ] = Point( nX16, nY16 ); - } - - // PolyPolygon Actions erzeugen - PolyPolygon aPolyPoly( (UINT16)nPoly, pnPoints, pPtAry ); - pOut->DrawPolyPolygon( aPolyPoly, bRecordPath ); - delete[] pPtAry; - } - delete[] pnPoints; - } - } - } - break; - - case EMR_FILLRGN : - { - sal_uInt32 nLen; - PolyPolygon aPolyPoly; - pWMF->SeekRel( 0x10 ); - *pWMF >> nLen >> nIndex; - - if ( ImplReadRegion( aPolyPoly, *pWMF, nRecSize ) ) - { - pOut->Push(); - pOut->SelectObject( nIndex ); - pOut->DrawPolyPolygon( aPolyPoly, sal_False ); - pOut->Pop(); - } - } - break; - - -#ifdef WIN_MTF_ASSERT - default : WinMtfAssertHandler( "Unknown Meta Action" ); break; - case EMR_MASKBLT : WinMtfAssertHandler( "MaskBlt" ); break; - case EMR_PLGBLT : WinMtfAssertHandler( "PlgBlt" ); break; - case EMR_SETDIBITSTODEVICE : WinMtfAssertHandler( "SetDIBitsToDevice" ); break; - case EMR_FRAMERGN : WinMtfAssertHandler( "FrameRgn" ); break; - case EMR_INVERTRGN : WinMtfAssertHandler( "InvertRgn" ); break; - case EMR_PAINTRGN : WinMtfAssertHandler( "PaintRgn" ); break; - case EMR_FLATTENPATH : WinMtfAssertHandler( "FlattenPath" ); break; - case EMR_WIDENPATH : WinMtfAssertHandler( "WidenPath" ); break; - case EMR_POLYDRAW : WinMtfAssertHandler( "Polydraw" ); break; - case EMR_SETARCDIRECTION : WinMtfAssertHandler( "SetArcDirection" ); break; - case EMR_SETPALETTEENTRIES : WinMtfAssertHandler( "SetPaletteEntries" ); break; - case EMR_RESIZEPALETTE : WinMtfAssertHandler( "ResizePalette" ); break; - case EMR_EXTFLOODFILL : WinMtfAssertHandler( "ExtFloodFill" ); break; - case EMR_ANGLEARC : WinMtfAssertHandler( "AngleArc" ); break; - case EMR_SETCOLORADJUSTMENT : WinMtfAssertHandler( "SetColorAdjustment" ); break; - case EMR_POLYDRAW16 : WinMtfAssertHandler( "PolyDraw16" ); break; - case EMR_CREATEDIBPATTERNBRUSHPT : WinMtfAssertHandler( "CreateDibPatternBrushPt" ); break; - case EMR_POLYTEXTOUTA : WinMtfAssertHandler( "PolyTextOutA" ); break; - case EMR_POLYTEXTOUTW : WinMtfAssertHandler( "PolyTextOutW" ); break; - case EMR_CREATECOLORSPACE : WinMtfAssertHandler( "CreateColorSpace" ); break; - case EMR_SETCOLORSPACE : WinMtfAssertHandler( "SetColorSpace" ); break; - case EMR_DELETECOLORSPACE : WinMtfAssertHandler( "DeleteColorSpace" ); break; - case EMR_GLSRECORD : WinMtfAssertHandler( "GlsRecord" ); break; - case EMR_GLSBOUNDEDRECORD : WinMtfAssertHandler( "GlsBoundRecord" ); break; - case EMR_PIXELFORMAT : WinMtfAssertHandler( "PixelFormat" ); break; - case EMR_DRAWESCAPE : WinMtfAssertHandler( "DrawEscape" ); break; - case EMR_EXTESCAPE : WinMtfAssertHandler( "ExtEscape" ); break; - case EMR_STARTDOC : WinMtfAssertHandler( "StartDoc" ); break; - case EMR_SMALLTEXTOUT : WinMtfAssertHandler( "SmallTextOut" ); break; - case EMR_FORCEUFIMAPPING : WinMtfAssertHandler( "ForceUFIMapping" ); break; - case EMR_NAMEDESCAPE : WinMtfAssertHandler( "NamedEscape" ); break; - case EMR_COLORCORRECTPALETTE : WinMtfAssertHandler( "ColorCorrectPalette" ); break; - case EMR_SETICMPROFILEA : WinMtfAssertHandler( "SetICMProfileA" ); break; - case EMR_SETICMPROFILEW : WinMtfAssertHandler( "SetICMProfileW" ); break; - case EMR_ALPHABLEND : WinMtfAssertHandler( "Alphablend" ); break; - case EMR_TRANSPARENTBLT : WinMtfAssertHandler( "TransparenBlt" ); break; - case EMR_TRANSPARENTDIB : WinMtfAssertHandler( "TransparenDib" ); break; - case EMR_GRADIENTFILL : WinMtfAssertHandler( "GradientFill" ); break; - case EMR_SETLINKEDUFIS : WinMtfAssertHandler( "SetLinkedUFIS" ); break; - - case EMR_SETMAPPERFLAGS : WinMtfAssertHandler( "SetMapperFlags", 0 ); break; - case EMR_SETICMMODE : WinMtfAssertHandler( "SetICMMode", 0 ); break; - case EMR_CREATEMONOBRUSH : WinMtfAssertHandler( "CreateMonoBrush", 0 ); break; - case EMR_SETBRUSHORGEX : WinMtfAssertHandler( "SetBrushOrgEx", 0 ); break; - case EMR_SETMETARGN : WinMtfAssertHandler( "SetMetArgn", 0 ); break; - case EMR_SETMITERLIMIT : WinMtfAssertHandler( "SetMiterLimit", 0 ); break; - case EMR_EXCLUDECLIPRECT : WinMtfAssertHandler( "ExcludeClipRect", 0 ); break; - case EMR_REALIZEPALETTE : WinMtfAssertHandler( "RealizePalette", 0 ); break; - case EMR_SELECTPALETTE : WinMtfAssertHandler( "SelectPalette", 0 ); break; - case EMR_CREATEPALETTE : WinMtfAssertHandler( "CreatePalette", 0 ); break; - case EMR_ALPHADIBBLEND : WinMtfAssertHandler( "AlphaDibBlend", 0 ); break; - case EMR_SETTEXTJUSTIFICATION : WinMtfAssertHandler( "SetTextJustification", 0 ); break; - - case EMR_GDICOMMENT : - case EMR_HEADER : // has already been read at ReadHeader() - break; -#endif - } - pWMF->Seek( nNextPos ); - } - if( aBmpSaveList.Count() ) - pOut->ResolveBitmapActions( aBmpSaveList ); - - if ( bStatus ) - pWMF->Seek(nEndPos); - - return bStatus; -}; - -//----------------------------------------------------------------------------------- - -BOOL EnhWMFReader::ReadHeader() -{ - UINT32 nUINT32, nHeaderSize, nPalEntries; - INT32 nLeft, nTop, nRight, nBottom; - - // METAFILEHEADER SPARE ICH MIR HIER - // Einlesen des METAHEADER - *pWMF >> nUINT32 >> nHeaderSize; - if ( nUINT32 != 1 ) // Typ - return FALSE; - - // bound size - Rectangle rclBounds; // rectangle in logical units 1/100th mm - *pWMF >> nLeft >> nTop >> nRight >> nBottom; - rclBounds.Left() = nLeft; - rclBounds.Top() = nTop; - rclBounds.Right() = nRight; - rclBounds.Bottom() = nBottom; - - // picture frame size - Rectangle rclFrame; // rectangle in device units - *pWMF >> nLeft >> nTop >> nRight >> nBottom; - rclFrame.Left() = nLeft; - rclFrame.Top() = nTop; - rclFrame.Right() = nRight; - rclFrame.Bottom() = nBottom; - - *pWMF >> nUINT32; // signature - - if ( nUINT32 != 0x464d4520 ) - return FALSE; - - *pWMF >> nUINT32; // nVersion - *pWMF >> nEndPos; // size of metafile - nEndPos += nStartPos; - - sal_uInt32 nStrmPos = pWMF->Tell(); // checking if nEndPos is valid - pWMF->Seek( STREAM_SEEK_TO_END ); - if ( pWMF->Tell() < nEndPos ) - nEndPos = pWMF->Tell(); - pWMF->Seek( nStrmPos ); - - *pWMF >> nRecordCount; - - if ( !nRecordCount ) - return FALSE; - - pWMF->SeekRel( 0xc ); - - sal_Int32 nPixX, nPixY, nMillX, nMillY; - *pWMF >> nPalEntries >> nPixX >> nPixY >> nMillX >> nMillY; - - pOut->SetrclFrame( rclFrame ); - pOut->SetrclBounds( rclBounds ); - pOut->SetRefPix( Size( nPixX, nPixY ) ); - pOut->SetRefMill( Size( nMillX, nMillY ) ); - - pWMF->Seek( nStartPos + nHeaderSize ); - return TRUE; -} - -//----------------------------------------------------------------------------------- - -Rectangle EnhWMFReader::ReadRectangle( INT32 x1, INT32 y1, INT32 x2, INT32 y2 ) -{ - Point aTL ( Point( x1, y1 ) ); - Point aBR( Point( --x2, --y2 ) ); - return Rectangle( aTL, aBR ); -} - -EnhWMFReader::~EnhWMFReader() -{ - -}; - diff --git a/svtools/source/filter.vcl/wmf/winmtf.cxx b/svtools/source/filter.vcl/wmf/winmtf.cxx deleted file mode 100644 index 787e6522b890..000000000000 --- a/svtools/source/filter.vcl/wmf/winmtf.cxx +++ /dev/null @@ -1,2203 +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_svtools.hxx" - - -#include "winmtf.hxx" -#include -#include -#include - -// ------------------------------------------------------------------------ - -#define WIN_MTF_MAX_CLIP_DEPTH 16 - -void WinMtfClipPath::ImpUpdateType() -{ - if ( !aPolyPoly.Count() ) - eType = EMPTY; - else if ( aPolyPoly.IsRect() ) - eType = RECTANGLE; - else - eType = COMPLEX; - - bNeedsUpdate = sal_True; -} - -void WinMtfClipPath::IntersectClipRect( const Rectangle& rRect ) -{ - if ( !aPolyPoly.Count() ) - aPolyPoly = Polygon( rRect ); - else if ( nDepth < WIN_MTF_MAX_CLIP_DEPTH ) - { - Polygon aPolygon( rRect ); - PolyPolygon aIntersection; - PolyPolygon aPolyPolyRect( aPolygon ); - aPolyPoly.GetIntersection( aPolyPolyRect, aIntersection ); - aPolyPoly = aIntersection; - nDepth++; - } - ImpUpdateType(); -} - -void WinMtfClipPath::ExcludeClipRect( const Rectangle& rRect ) -{ - if ( aPolyPoly.Count() && ( nDepth < WIN_MTF_MAX_CLIP_DEPTH ) ) - { - Polygon aPolygon( rRect ); - PolyPolygon aPolyPolyRect( aPolygon ); - PolyPolygon aDifference; - aPolyPoly.GetDifference( aPolyPolyRect, aDifference ); - aPolyPoly = aDifference; - nDepth++; - } - ImpUpdateType(); -} - -void WinMtfClipPath::SetClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode ) -{ - if ( !rPolyPolygon.Count() ) - aPolyPoly = rPolyPolygon; - else if ( nDepth < WIN_MTF_MAX_CLIP_DEPTH ) - { - nDepth++; - - PolyPolygon aNewClipPath; - - // #115345# Watch out for empty aPolyPoly here - conceptually, - // an empty clip path is a rectangle of infinite size, but it - // is represented by an empty aPolyPoly. When intersecting - // rPolyPolygon with this _empty_ aPolyPoly, set algebra - // guarantees wrong results. - switch ( nClippingMode ) - { - case RGN_OR : - // #115345# clip stays empty, when ORing an arbitrary - // rPolyPolygon. Thus, we can save us the unnecessary - // clipper call. - if( aPolyPoly.Count() ) - aPolyPoly.GetUnion( rPolyPolygon, aNewClipPath ); - break; - case RGN_XOR : - // TODO: - // #115345# Cannot handle this case, for the time being - aPolyPoly.GetXOR( rPolyPolygon, aNewClipPath ); - break; - case RGN_DIFF : - // TODO: - // #115345# Cannot handle this case, for the time being - aPolyPoly.GetDifference( rPolyPolygon, aNewClipPath ); - break; - case RGN_AND : - // #115345# Clip becomes rPolyPolygon, when ANDing - // with an arbitrary rPolyPolygon - if( aPolyPoly.Count() ) - aPolyPoly.GetIntersection( rPolyPolygon, aNewClipPath ); - else - aNewClipPath = rPolyPolygon; - break; - case RGN_COPY : - aNewClipPath = rPolyPolygon; - break; - } - aPolyPoly = aNewClipPath; - } - ImpUpdateType(); -} - -void WinMtfClipPath::MoveClipRegion( const Size& rSize ) -{ - aPolyPoly.Move( rSize.Width(), rSize.Height() ); - bNeedsUpdate = sal_True; -} - -// ------------------------------------------------------------------------ - -void WinMtfPathObj::AddPoint( const Point& rPoint ) -{ - if ( bClosed ) - Insert( Polygon(), POLYPOLY_APPEND ); - Polygon& rPoly = ((PolyPolygon&)*this)[ Count() - 1 ]; - rPoly.Insert( rPoly.GetSize(), rPoint, POLY_NORMAL ); - bClosed = sal_False; -} - -void WinMtfPathObj::AddPolyLine( const Polygon& rPolyLine ) -{ - if ( bClosed ) - Insert( Polygon(), POLYPOLY_APPEND ); - Polygon& rPoly = ((PolyPolygon&)*this)[ Count() - 1 ]; - rPoly.Insert( rPoly.GetSize(), rPolyLine ); - bClosed = sal_False; -} - -void WinMtfPathObj::AddPolygon( const Polygon& rPoly ) -{ - Insert( rPoly, POLYPOLY_APPEND ); - bClosed = sal_True; -} - -void WinMtfPathObj::AddPolyPolygon( const PolyPolygon& rPolyPoly ) -{ - sal_uInt16 i, nCount = rPolyPoly.Count(); - for ( i = 0; i < nCount; i++ ) - Insert( rPolyPoly[ i ], POLYPOLY_APPEND ); - bClosed = sal_True; -} - -void WinMtfPathObj::ClosePath() -{ - if ( Count() ) - { - Polygon& rPoly = ((PolyPolygon&)*this)[ Count() - 1 ]; - if ( rPoly.GetSize() > 2 ) - { - Point aFirst( rPoly[ 0 ] ); - if ( aFirst != rPoly[ rPoly.GetSize() - 1 ] ) - rPoly.Insert( rPoly.GetSize(), aFirst, POLY_NORMAL ); - } - } - bClosed = sal_True; -} - -// ------------------------------------------------------------------------ - -WinMtfFontStyle::WinMtfFontStyle( LOGFONTW& rFont ) -{ - CharSet eCharSet; - if ( ( rFont.lfCharSet == OEM_CHARSET ) || ( rFont.lfCharSet == DEFAULT_CHARSET ) ) - eCharSet = gsl_getSystemTextEncoding(); - else - eCharSet = rtl_getTextEncodingFromWindowsCharset( rFont.lfCharSet ); - if ( eCharSet == RTL_TEXTENCODING_DONTKNOW ) - eCharSet = gsl_getSystemTextEncoding(); - aFont.SetCharSet( eCharSet ); - aFont.SetName( rFont.alfFaceName ); - FontFamily eFamily; - switch ( rFont.lfPitchAndFamily & 0xf0 ) - { - case FF_ROMAN: - eFamily = FAMILY_ROMAN; - break; - - case FF_SWISS: - eFamily = FAMILY_SWISS; - break; - - case FF_MODERN: - eFamily = FAMILY_MODERN; - break; - - case FF_SCRIPT: - eFamily = FAMILY_SCRIPT; - break; - - case FF_DECORATIVE: - eFamily = FAMILY_DECORATIVE; - break; - - default: - eFamily = FAMILY_DONTKNOW; - break; - } - aFont.SetFamily( eFamily ); - - FontPitch ePitch; - switch ( rFont.lfPitchAndFamily & 0x0f ) - { - case FIXED_PITCH: - ePitch = PITCH_FIXED; - break; - - case DEFAULT_PITCH: - case VARIABLE_PITCH: - default: - ePitch = PITCH_VARIABLE; - break; - } - aFont.SetPitch( ePitch ); - - FontWeight eWeight; - if( rFont.lfWeight <= FW_THIN ) - eWeight = WEIGHT_THIN; - else if( rFont.lfWeight <= FW_ULTRALIGHT ) - eWeight = WEIGHT_ULTRALIGHT; - else if( rFont.lfWeight <= FW_LIGHT ) - eWeight = WEIGHT_LIGHT; - else if( rFont.lfWeight < FW_MEDIUM ) - eWeight = WEIGHT_NORMAL; - else if( rFont.lfWeight == FW_MEDIUM ) - eWeight = WEIGHT_MEDIUM; - else if( rFont.lfWeight <= FW_SEMIBOLD ) - eWeight = WEIGHT_SEMIBOLD; - else if( rFont.lfWeight <= FW_BOLD ) - eWeight = WEIGHT_BOLD; - else if( rFont.lfWeight <= FW_ULTRABOLD ) - eWeight = WEIGHT_ULTRABOLD; - else - eWeight = WEIGHT_BLACK; - aFont.SetWeight( eWeight ); - - if( rFont.lfItalic ) - aFont.SetItalic( ITALIC_NORMAL ); - - if( rFont.lfUnderline ) - aFont.SetUnderline( UNDERLINE_SINGLE ); - - if( rFont.lfStrikeOut ) - aFont.SetStrikeout( STRIKEOUT_SINGLE ); - - if ( rFont.lfOrientation ) - aFont.SetOrientation( (short)rFont.lfOrientation ); - else - aFont.SetOrientation( (short)rFont.lfEscapement ); - - Size aFontSize( Size( rFont.lfWidth, rFont.lfHeight ) ); - if ( rFont.lfHeight > 0 ) - { - // converting the cell height into a font height - VirtualDevice aVDev; - aFont.SetSize( aFontSize ); - aVDev.SetFont( aFont ); - FontMetric aMetric( aVDev.GetFontMetric() ); - long nHeight = aMetric.GetAscent() + aMetric.GetDescent(); - if ( nHeight ) - { - double fHeight = ((double)aFontSize.Height() * rFont.lfHeight ) / nHeight; - aFontSize.Height() = (sal_Int32)( fHeight + 0.5 ); - } - } - else if ( aFontSize.Height() < 0 ) - aFontSize.Height() *= -1; - - if ( !rFont.lfWidth ) - { - VirtualDevice aVDev; - aFont.SetSize( aFontSize ); - aVDev.SetFont( aFont ); - FontMetric aMetric( aVDev.GetFontMetric() ); - aFontSize.Width() = aMetric.GetWidth(); - } - - aFont.SetSize( aFontSize ); -}; - -// ------------------------------------------------------------------------ - -#ifdef WIN_MTF_ASSERT -void WinMtfAssertHandler( const sal_Char* pAction, sal_uInt32 nFlags ) -{ - static sal_Bool bOnlyOnce; - static sal_Int32 nAssertCount; - - if ( nFlags & WIN_MTF_ASSERT_INIT ) - nAssertCount = 0; - if ( nFlags & WIN_MTF_ASSERT_ONCE ) - bOnlyOnce = sal_True; - if ( nFlags & WIN_MTF_ASSERT_MIFE ) - { - if ( ( nAssertCount == 0 ) || ( bOnlyOnce == sal_False ) ) - { - ByteString aText( "WMF/EMF Import: " ); - if ( pAction ) - { - ByteString aAction( pAction ); - aText.Append( aAction ); - } - aText.Append( " needs to be implemented (SJ)" ); - DBG_ASSERT( 0, aText.GetBuffer() ); - } - nAssertCount++; - } -} -#endif - -// ------------------------------------------------------------------------ - -WinMtf::WinMtf( WinMtfOutput* pWinMtfOutput, SvStream& rStreamWMF, FilterConfigItem* pConfigItem ) : - pOut ( pWinMtfOutput ), - pWMF ( &rStreamWMF ), - pFilterConfigItem ( pConfigItem ) -{ -#ifdef WIN_MTF_ASSERT - // we want to assert not implemented features, but we do this - // only once, so that nobody is handicaped by getting too much assertions - // I hope this will bring more testdocuments, without support of these - // testdocuments the implementation of missing features won't be possible. (SJ) - WinMtfAssertHandler( NULL, WIN_MTF_ASSERT_INIT | WIN_MTF_ASSERT_ONCE ); -#endif - - SvLockBytes *pLB = pWMF->GetLockBytes(); - if ( pLB ) - pLB->SetSynchronMode( TRUE ); - - nStartPos = pWMF->Tell(); - - pOut->SetDevOrg( Point() ); - if ( pFilterConfigItem ) - { - xStatusIndicator = pFilterConfigItem->GetStatusIndicator(); - if ( xStatusIndicator.is() ) - { - rtl::OUString aMsg; - xStatusIndicator->start( aMsg, 100 ); - } - } -} - -// ------------------------------------------------------------------------ - -WinMtf::~WinMtf() -{ - delete pOut; - - if ( xStatusIndicator.is() ) - xStatusIndicator->end(); -} - -// ------------------------------------------------------------------------ - -void WinMtf::Callback( USHORT nPercent ) -{ - if ( xStatusIndicator.is() ) - xStatusIndicator->setValue( nPercent ); -} - -// ------------------------------------------------------------------------ - -Color WinMtf::ReadColor() -{ - UINT32 nColor; - *pWMF >> nColor; - return Color( (BYTE)nColor, (BYTE)( nColor >> 8 ), (BYTE)( nColor >> 16 ) ); -}; - -//----------------------------------------------------------------------------------- -//----------------------------------------------------------------------------------- -//----------------------------------------------------------------------------------- - -Point WinMtfOutput::ImplMap( const Point& rPt ) -{ - if ( mnWinExtX && mnWinExtY ) - { - double fX2, fX = rPt.X(); - double fY2, fY = rPt.Y(); - - fX2 = fX * maXForm.eM11 + fY * maXForm.eM21 + maXForm.eDx; - fY2 = fX * maXForm.eM12 + fY * maXForm.eM22 + maXForm.eDy; - - if ( mnGfxMode == GM_COMPATIBLE ) - { - switch( mnMapMode ) - { - case MM_LOENGLISH : - { - fX2 -= mnWinOrgX; - fY2 = mnWinOrgY-fY2; - fX2 *= 25.40; - fY2 *= 25.40; - fX2 += mnDevOrgX; - fY2 += mnDevOrgY; - } - break; - case MM_HIENGLISH : - { - fX2 -= mnWinOrgX; - fY2 = mnWinOrgY-fY2; - fX2 *= 2.540; - fY2 *= 2.540; - fX2 += mnDevOrgX; - fY2 += mnDevOrgY; - } - break; - case MM_LOMETRIC : - { - fX2 -= mnWinOrgX; - fY2 = mnWinOrgY-fY2; - fX2 *= 10; - fY2 *= 10; - fX2 += mnDevOrgX; - fY2 += mnDevOrgY; - } - break; - case MM_HIMETRIC : - { - fX2 -= mnWinOrgX; - fY2 = mnWinOrgY-fY2; - fX2 += mnDevOrgX; - fY2 += mnDevOrgY; - } - break; - default : - { - fX2 -= mnWinOrgX; - fY2 -= mnWinOrgY; - fX2 /= mnWinExtX; - fY2 /= mnWinExtY; - fX2 *= mnDevWidth; - fY2 *= mnDevHeight; - fX2 += mnDevOrgX; - fY2 += mnDevOrgY; // fX2, fY2 now in device units - fX2 *= (double)mnMillX * 100.0 / (double)mnPixX; - fY2 *= (double)mnMillY * 100.0 / (double)mnPixY; - } - break; - } - fX2 -= mrclFrame.Left(); - fY2 -= mrclFrame.Top(); - } - return Point( FRound( fX2 ), FRound( fY2 ) ); - } - else - return Point(); -}; - -// ------------------------------------------------------------------------ - -Size WinMtfOutput::ImplMap( const Size& rSz ) -{ - if ( mnWinExtX && mnWinExtY ) - { - double fWidth = rSz.Width() * maXForm.eM11; - double fHeight = rSz.Height() * maXForm.eM22; - - if ( mnGfxMode == GM_COMPATIBLE ) - { - switch( mnMapMode ) - { - case MM_LOENGLISH : - { - fWidth *= 25.40; - fHeight*=-25.40; - } - break; - case MM_HIENGLISH : - { - fWidth *= 2.540; - fHeight*=-2.540; - } - break; - case MM_LOMETRIC : - { - fWidth *= 10; - fHeight*=-10; - } - break; - case MM_HIMETRIC : - { - fHeight *= -1; - } - break; - default : - { - fWidth /= mnWinExtX; - fHeight /= mnWinExtY; - fWidth *= mnDevWidth; - fHeight *= mnDevHeight; - fWidth *= (double)mnMillX * 100 / (double)mnPixX; - fHeight *= (double)mnMillY * 100 / (double)mnPixY; - } - break; - } - } - return Size( FRound( fWidth ), FRound( fHeight ) ); - } - else - return Size(); -} - -//----------------------------------------------------------------------------------- - -Rectangle WinMtfOutput::ImplMap( const Rectangle& rRect ) -{ - return Rectangle( ImplMap( rRect.TopLeft() ), ImplMap( rRect.GetSize() ) ); -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::ImplMap( Font& rFont ) -{ - // !!! HACK: Wir setzen die Breite jetzt immer auf Null, - // da OS die Breite unterschiedlich interpretieren; - // muss spaeter in SV portabel gemacht werden ( KA 08.02.96 ) - Size aFontSize = ImplMap ( rFont.GetSize() ); - - if( aFontSize.Height() < 0 ) - aFontSize.Height() *= -1; - - rFont.SetSize( aFontSize ); - - if( ( mnWinExtX * mnWinExtY ) < 0 ) - rFont.SetOrientation( 3600 - rFont.GetOrientation() ); -} - -//----------------------------------------------------------------------------------- - -Polygon& WinMtfOutput::ImplMap( Polygon& rPolygon ) -{ - UINT16 nPoints = rPolygon.GetSize(); - for ( UINT16 i = 0; i < nPoints; i++ ) - { - rPolygon[ i ] = ImplMap( rPolygon[ i ] ); - } - return rPolygon; -} - -//----------------------------------------------------------------------------------- - -PolyPolygon& WinMtfOutput::ImplMap( PolyPolygon& rPolyPolygon ) -{ - UINT16 nPolys = rPolyPolygon.Count(); - for ( UINT16 i = 0; i < nPolys; ImplMap( rPolyPolygon[ i++ ] ) ) ; - return rPolyPolygon; -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::SelectObject( INT32 nIndex ) -{ - GDIObj* pGDIObj = NULL; - - if ( nIndex & ENHMETA_STOCK_OBJECT ) - pGDIObj = new GDIObj(); - else - { - nIndex &= 0xffff; // zur Sicherheit: mehr als 65535 nicht zulassen - - if ( (UINT32)nIndex < vGDIObj.size() ) - pGDIObj = vGDIObj[ nIndex ]; - } - - if( pGDIObj == NULL ) - return; - - if ( nIndex & ENHMETA_STOCK_OBJECT ) - { - UINT16 nStockId = (BYTE)nIndex; - switch( nStockId ) - { - case WHITE_BRUSH : - { - pGDIObj->Set( GDI_BRUSH, new WinMtfFillStyle( Color( COL_WHITE ) ) ); - } - break; - case LTGRAY_BRUSH : - { - pGDIObj->Set( GDI_BRUSH, new WinMtfFillStyle( Color( COL_LIGHTGRAY ) ) ); - } - break; - case GRAY_BRUSH : - case DKGRAY_BRUSH : - { - pGDIObj->Set( GDI_BRUSH, new WinMtfFillStyle( Color( COL_GRAY ) ) ); - } - break; - case BLACK_BRUSH : - { - pGDIObj->Set( GDI_BRUSH, new WinMtfFillStyle( Color( COL_BLACK ) ) ); - } - break; - case NULL_BRUSH : - { - pGDIObj->Set( GDI_BRUSH, new WinMtfFillStyle( Color( COL_TRANSPARENT ), TRUE ) ); - } - break; - case WHITE_PEN : - { - pGDIObj->Set( GDI_PEN, new WinMtfLineStyle( Color( COL_WHITE ) ) ); - } - break; - case BLACK_PEN : - { - pGDIObj->Set( GDI_PEN, new WinMtfLineStyle( Color( COL_BLACK ) ) ); - } - break; - case NULL_PEN : - { - pGDIObj->Set( GDI_PEN, new WinMtfLineStyle( Color( COL_TRANSPARENT ), TRUE ) ); - } - break; - default: - break; - } - } - if ( pGDIObj->pStyle ) - { - switch( pGDIObj->eType ) - { - case GDI_PEN : - maLineStyle = (WinMtfLineStyle*)pGDIObj->pStyle; - break; - case GDI_BRUSH : - { - maFillStyle = (WinMtfFillStyle*)pGDIObj->pStyle; - mbFillStyleSelected = sal_True; - } - break; - case GDI_FONT : - maFont = ((WinMtfFontStyle*)pGDIObj->pStyle)->aFont; - break; - default: - break; // -Wall many options not handled. - } - } - if ( nIndex & ENHMETA_STOCK_OBJECT ) - delete pGDIObj; -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::SetFont( const Font& rFont ) -{ - maFont = rFont; -} - -//----------------------------------------------------------------------------------- - -const Font& WinMtfOutput::GetFont() const -{ - return maFont; -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::SetTextLayoutMode( const sal_uInt32 nTextLayoutMode ) -{ - mnTextLayoutMode = nTextLayoutMode; -} - -//----------------------------------------------------------------------------------- - -sal_uInt32 WinMtfOutput::GetTextLayoutMode() const -{ - return mnTextLayoutMode; -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::SetBkMode( UINT32 nMode ) -{ - mnBkMode = nMode; -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::SetBkColor( const Color& rColor ) -{ - maBkColor = rColor; -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::SetTextColor( const Color& rColor ) -{ - maTextColor = rColor; -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::SetTextAlign( UINT32 nAlign ) -{ - mnTextAlign = nAlign; -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::ImplResizeObjectArry( UINT32 nNewEntrys ) -{ - sal_uInt32 i = vGDIObj.size(); - vGDIObj.resize( nNewEntrys ); - for ( ; i < nNewEntrys ; i++ ) - vGDIObj[ i ] = NULL; -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::ImplDrawClippedPolyPolygon( const PolyPolygon& rPolyPoly ) -{ - if ( rPolyPoly.Count() ) - { - ImplSetNonPersistentLineColorTransparenz(); - if ( rPolyPoly.Count() == 1 ) - { - if ( rPolyPoly.IsRect() ) - mpGDIMetaFile->AddAction( new MetaRectAction( rPolyPoly.GetBoundRect() ) ); - else - { - Polygon aPoly( rPolyPoly[ 0 ] ); - sal_uInt16 nCount = aPoly.GetSize(); - if ( nCount ) - { - if ( aPoly[ nCount - 1 ] != aPoly[ 0 ] ) - { - Point aPoint( aPoly[ 0 ] ); - aPoly.Insert( nCount, aPoint ); - } - mpGDIMetaFile->AddAction( new MetaPolygonAction( aPoly ) ); - } - } - } - else - mpGDIMetaFile->AddAction( new MetaPolyPolygonAction( rPolyPoly ) ); - } -} - - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::CreateObject( GDIObjectType eType, void* pStyle ) -{ - if ( pStyle ) - { - if ( eType == GDI_FONT ) - { - ImplMap( ((WinMtfFontStyle*)pStyle)->aFont ); - if (!((WinMtfFontStyle*)pStyle)->aFont.GetHeight() ) - ((WinMtfFontStyle*)pStyle)->aFont.SetHeight( 423 ); // defaulting to 12pt - } - else if ( eType == GDI_PEN ) - { - Size aSize( ((WinMtfLineStyle*)pStyle)->aLineInfo.GetWidth(), 0 ); - ((WinMtfLineStyle*)pStyle)->aLineInfo.SetWidth( ImplMap( aSize ).Width() ); - if ( ((WinMtfLineStyle*)pStyle)->aLineInfo.GetStyle() == LINE_DASH ) - { - aSize.Width() += 1; - long nDotLen = ImplMap( aSize ).Width(); - ((WinMtfLineStyle*)pStyle)->aLineInfo.SetDistance( nDotLen ); - ((WinMtfLineStyle*)pStyle)->aLineInfo.SetDotLen( nDotLen ); - ((WinMtfLineStyle*)pStyle)->aLineInfo.SetDashLen( nDotLen * 4 ); - } - } - } - UINT32 nIndex; - for ( nIndex = 0; nIndex < vGDIObj.size(); nIndex++ ) - { - if ( vGDIObj[ nIndex ] == NULL ) - break; - } - if ( nIndex == vGDIObj.size() ) - ImplResizeObjectArry( vGDIObj.size() + 16 ); - - vGDIObj[ nIndex ] = new GDIObj( eType, pStyle ); -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::CreateObject( INT32 nIndex, GDIObjectType eType, void* pStyle ) -{ - if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) - { - nIndex &= 0xffff; // zur Sicherheit: mehr als 65535 nicht zulassen - if ( pStyle ) - { - if ( eType == GDI_FONT ) - ImplMap( ((WinMtfFontStyle*)pStyle)->aFont ); - else if ( eType == GDI_PEN ) - { - Size aSize( ((WinMtfLineStyle*)pStyle)->aLineInfo.GetWidth(), 0 ); - ((WinMtfLineStyle*)pStyle)->aLineInfo.SetWidth( ImplMap( aSize ).Width() ); - if ( ((WinMtfLineStyle*)pStyle)->aLineInfo.GetStyle() == LINE_DASH ) - { - aSize.Width() += 1; - long nDotLen = ImplMap( aSize ).Width(); - ((WinMtfLineStyle*)pStyle)->aLineInfo.SetDistance( nDotLen ); - ((WinMtfLineStyle*)pStyle)->aLineInfo.SetDotLen( nDotLen ); - ((WinMtfLineStyle*)pStyle)->aLineInfo.SetDashLen( nDotLen * 4 ); - } - } - } - if ( (UINT32)nIndex >= vGDIObj.size() ) - ImplResizeObjectArry( nIndex + 16 ); - - if ( vGDIObj[ nIndex ] != NULL ) - delete vGDIObj[ nIndex ]; - - vGDIObj[ nIndex ] = new GDIObj( eType, pStyle ); - } - else - { - switch ( eType ) - { - case GDI_PEN : - delete (WinMtfLineStyle*)pStyle; - break; - case GDI_BRUSH : - delete (WinMtfFillStyle*)pStyle; - break; - case GDI_FONT : - delete (WinMtfFontStyle*)pStyle; - break; - - default: - DBG_ERROR( "unsupported style not deleted" ); - break; - } - } -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::DeleteObject( sal_Int32 nIndex ) -{ - if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) - { - if ( (sal_uInt32)nIndex < vGDIObj.size() ) - { - delete vGDIObj[ nIndex ]; - vGDIObj[ nIndex ] = NULL; - } - } -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::IntersectClipRect( const Rectangle& rRect ) -{ - aClipPath.IntersectClipRect( ImplMap( rRect ) ); -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::ExcludeClipRect( const Rectangle& rRect ) -{ - aClipPath.ExcludeClipRect( ImplMap( rRect ) ); -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::MoveClipRegion( const Size& rSize ) -{ - aClipPath.MoveClipRegion( ImplMap( rSize ) ); -} - -void WinMtfOutput::SetClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode, sal_Bool bIsMapped ) -{ - if ( bIsMapped ) - aClipPath.SetClipPath( rPolyPolygon, nClippingMode ); - else - { - PolyPolygon aPP( rPolyPolygon ); - aClipPath.SetClipPath( ImplMap( aPP ), nClippingMode ); - } -} - -//----------------------------------------------------------------------------------- -//----------------------------------------------------------------------------------- -//----------------------------------------------------------------------------------- - -WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) : - mnLatestTextAlign ( 0 ), - mnTextAlign ( TA_LEFT | TA_TOP | TA_NOUPDATECP ), - maLatestBkColor ( 0x12345678 ), - maBkColor ( COL_WHITE ), - mnLatestTextLayoutMode( TEXT_LAYOUT_DEFAULT ), - mnTextLayoutMode ( TEXT_LAYOUT_DEFAULT ), - mnLatestBkMode ( 0 ), - mnBkMode ( OPAQUE ), - meLatestRasterOp ( ROP_INVERT ), - meRasterOp ( ROP_OVERPAINT ), - maActPos ( Point() ), - mbNopMode ( sal_False ), - mbFillStyleSelected ( sal_False ), - mnGfxMode ( GM_COMPATIBLE ), - mnMapMode ( MM_TEXT ), - mnDevOrgX ( 0 ), - mnDevOrgY ( 0 ), - mnDevWidth ( 1 ), - mnDevHeight ( 1 ), - mnWinOrgX ( 0 ), - mnWinOrgY ( 0 ), - mnWinExtX ( 1 ), - mnWinExtY ( 1 ), - mnPixX ( 100 ), - mnPixY ( 100 ), - mnMillX ( 1 ), - mnMillY ( 1 ), - mpGDIMetaFile ( &rGDIMetaFile ) -{ - mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_CLIPREGION ) ); // The original clipregion has to be on top - // of the stack so it can always be restored - // this is necessary to be able to support - // SetClipRgn( NULL ) and similar ClipRgn actions (SJ) - - maFont.SetName( String( RTL_CONSTASCII_USTRINGPARAM( "Arial" )) ); // sj: #i57205#, we do have some scaling problems if using - maFont.SetCharSet( gsl_getSystemTextEncoding() ); // the default font then most times a x11 font is used, we - maFont.SetHeight( 423 ); // will prevent this defining a font - - maLatestLineStyle.aLineColor = Color( 0x12, 0x34, 0x56 ); - maLatestFillStyle.aFillColor = Color( 0x12, 0x34, 0x56 ); - - mnRop = R2_BLACK + 1; - SetRasterOp( R2_BLACK ); -}; - -//----------------------------------------------------------------------------------- - -WinMtfOutput::~WinMtfOutput() -{ - mpGDIMetaFile->AddAction( new MetaPopAction() ); - mpGDIMetaFile->SetPrefMapMode( MAP_100TH_MM ); - if ( mrclFrame.IsEmpty() ) - mpGDIMetaFile->SetPrefSize( Size( mnDevWidth, mnDevHeight ) ); - else - mpGDIMetaFile->SetPrefSize( mrclFrame.GetSize() ); - - for ( UINT32 i = 0; i < vGDIObj.size(); i++ ) - delete vGDIObj[ i ]; -}; - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::UpdateClipRegion() -{ - if ( aClipPath.bNeedsUpdate ) - { - aClipPath.bNeedsUpdate = sal_False; - - mpGDIMetaFile->AddAction( new MetaPopAction() ); // taking the orignal clipregion - mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_CLIPREGION ) ); // - - switch ( aClipPath.GetType() ) - { - case RECTANGLE : - case COMPLEX : - { -// we will not generate a RegionClipRegion Action, because this action -// cannot be saved to the wmf format - saving to wmf always happens -// if the placeholder graphic for ole objects is generated. (SJ) - -// Region aClipRegion( aClipPath.GetClipPath() ); -// mpGDIMetaFile->AddAction( new MetaISectRegionClipRegionAction( aClipRegion ) ); - - Rectangle aClipRect( aClipPath.GetClipPath().GetBoundRect() ); - mpGDIMetaFile->AddAction( new MetaISectRectClipRegionAction( aClipRect ) ); - } - break; - case EMPTY: - break; // -Wall not handled. - } - } -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::ImplSetNonPersistentLineColorTransparenz() -{ - Color aColor( COL_TRANSPARENT); - WinMtfLineStyle aTransparentLine( aColor, TRUE ); - if ( ! ( maLatestLineStyle == aTransparentLine ) ) - { - maLatestLineStyle = aTransparentLine; - mpGDIMetaFile->AddAction( new MetaLineColorAction( aTransparentLine.aLineColor, !aTransparentLine.bTransparent ) ); - } -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::UpdateLineStyle() -{ - if (!( maLatestLineStyle == maLineStyle ) ) - { - maLatestLineStyle = maLineStyle; - mpGDIMetaFile->AddAction( new MetaLineColorAction( maLineStyle.aLineColor, !maLineStyle.bTransparent ) ); - } -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::UpdateFillStyle() -{ - if ( !mbFillStyleSelected ) // SJ: #i57205# taking care of bkcolor if no brush is selected - maFillStyle = WinMtfFillStyle( maBkColor, mnBkMode == TRANSPARENT ); - if (!( maLatestFillStyle == maFillStyle ) ) - { - maLatestFillStyle = maFillStyle; - mpGDIMetaFile->AddAction( new MetaFillColorAction( maFillStyle.aFillColor, !maFillStyle.bTransparent ) ); - } -} - -//----------------------------------------------------------------------------------- - -sal_uInt32 WinMtfOutput::SetRasterOp( UINT32 nRasterOp ) -{ - sal_uInt32 nRetROP = mnRop; - if ( nRasterOp != mnRop ) - { - mnRop = nRasterOp; - static WinMtfFillStyle aNopFillStyle; - static WinMtfLineStyle aNopLineStyle; - - if ( mbNopMode && ( nRasterOp != R2_NOP ) ) - { // beim uebergang von R2_NOP auf anderen Modus - // gesetzten Pen und Brush aktivieren - maFillStyle = aNopFillStyle; - maLineStyle = aNopLineStyle; - mbNopMode = sal_False; - } - switch( nRasterOp ) - { - case R2_NOT: - meRasterOp = ROP_INVERT; - break; - - case R2_XORPEN: - meRasterOp = ROP_XOR; - break; - - case R2_NOP: - { - meRasterOp = ROP_OVERPAINT; - if( mbNopMode == sal_False ) - { - aNopFillStyle = maFillStyle; - aNopLineStyle = maLineStyle; - maFillStyle = WinMtfFillStyle( Color( COL_TRANSPARENT ), TRUE ); - maLineStyle = WinMtfLineStyle( Color( COL_TRANSPARENT ), TRUE ); - mbNopMode = sal_True; - } - } - break; - - default: - meRasterOp = ROP_OVERPAINT; - break; - } - } - if ( nRetROP != nRasterOp ) - mpGDIMetaFile->AddAction( new MetaRasterOpAction( meRasterOp ) ); - return nRetROP; -}; - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill ) -{ - if ( aPathObj.Count() ) - { - UpdateClipRegion(); - UpdateLineStyle(); - UpdateFillStyle(); - if ( bFill ) - { - if ( !bStroke ) - { - mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_LINECOLOR ) ); - mpGDIMetaFile->AddAction( new MetaLineColorAction( Color(), FALSE ) ); - } - if ( aPathObj.Count() == 1 ) - mpGDIMetaFile->AddAction( new MetaPolygonAction( aPathObj.GetObject( 0 ) ) ); - else - mpGDIMetaFile->AddAction( new MetaPolyPolygonAction( aPathObj ) ); - - if ( !bStroke ) - mpGDIMetaFile->AddAction( new MetaPopAction() ); - } - else - { - sal_uInt16 i, nCount = aPathObj.Count(); - for ( i = 0; i < nCount; i++ ) - mpGDIMetaFile->AddAction( new MetaPolyLineAction( aPathObj[ i ], maLineStyle.aLineInfo ) ); - } - ClearPath(); - } -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::DrawPixel( const Point& rSource, const Color& rColor ) -{ - mpGDIMetaFile->AddAction( new MetaPixelAction( ImplMap( rSource), rColor ) ); -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::MoveTo( const Point& rPoint, sal_Bool bRecordPath ) -{ - Point aDest( ImplMap( rPoint ) ); - if ( bRecordPath ) - aPathObj.AddPoint( aDest ); - maActPos = aDest; -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::LineTo( const Point& rPoint, sal_Bool bRecordPath ) -{ - UpdateClipRegion(); - - Point aDest( ImplMap( rPoint ) ); - if ( bRecordPath ) - aPathObj.AddPoint( aDest ); - else - { - UpdateLineStyle(); - mpGDIMetaFile->AddAction( new MetaLineAction( maActPos, aDest, maLineStyle.aLineInfo ) ); - } - maActPos = aDest; -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::DrawLine( const Point& rSource, const Point& rDest ) -{ - UpdateClipRegion(); - UpdateLineStyle(); - mpGDIMetaFile->AddAction( new MetaLineAction( ImplMap( rSource), ImplMap( rDest ), maLineStyle.aLineInfo ) ); -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::DrawRect( const Rectangle& rRect, BOOL bEdge ) -{ - UpdateClipRegion(); - UpdateFillStyle(); - - if ( aClipPath.GetType() == COMPLEX ) - { - Polygon aPoly( ImplMap( rRect ) ); - PolyPolygon aPolyPolyRect( aPoly ); - PolyPolygon aDest; - aClipPath.GetClipPath().GetIntersection( aPolyPolyRect, aDest ); - ImplDrawClippedPolyPolygon( aDest ); - } - else - { - if ( bEdge ) - { - if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) - { - ImplSetNonPersistentLineColorTransparenz(); - mpGDIMetaFile->AddAction( new MetaRectAction( ImplMap( rRect ) ) ); - UpdateLineStyle(); - mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( ImplMap( rRect ) ),maLineStyle.aLineInfo ) ); - } - else - { - UpdateLineStyle(); - mpGDIMetaFile->AddAction( new MetaRectAction( ImplMap( rRect ) ) ); - } - } - else - { - ImplSetNonPersistentLineColorTransparenz(); - mpGDIMetaFile->AddAction( new MetaRectAction( ImplMap( rRect ) ) ); - } - } -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::DrawRoundRect( const Rectangle& rRect, const Size& rSize ) -{ - UpdateClipRegion(); - UpdateLineStyle(); - UpdateFillStyle(); - mpGDIMetaFile->AddAction( new MetaRoundRectAction( ImplMap( rRect ), labs( ImplMap( rSize ).Width() ), labs( ImplMap( rSize ).Height() ) ) ); -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::DrawEllipse( const Rectangle& rRect ) -{ - UpdateClipRegion(); - UpdateFillStyle(); - - if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) - { - Point aCenter( ImplMap( rRect.Center() ) ); - Size aRad( ImplMap( Size( rRect.GetWidth() / 2, rRect.GetHeight() / 2 ) ) ); - - ImplSetNonPersistentLineColorTransparenz(); - mpGDIMetaFile->AddAction( new MetaEllipseAction( ImplMap( rRect ) ) ); - UpdateLineStyle(); - mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aCenter, aRad.Width(), aRad.Height() ), maLineStyle.aLineInfo ) ); - } - else - { - UpdateLineStyle(); - mpGDIMetaFile->AddAction( new MetaEllipseAction( ImplMap( rRect ) ) ); - } -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, BOOL bTo ) -{ - UpdateClipRegion(); - UpdateLineStyle(); - UpdateFillStyle(); - - Rectangle aRect( ImplMap( rRect ) ); - Point aStart( ImplMap( rStart ) ); - Point aEnd( ImplMap( rEnd ) ); - - if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) - { - if ( aStart == aEnd ) - { // SJ: #i53768# if start & end is identical, then we have to draw a full ellipse - Point aCenter( aRect.Center() ); - Size aRad( aRect.GetWidth() / 2, aRect.GetHeight() / 2 ); - - mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aCenter, aRad.Width(), aRad.Height() ), maLineStyle.aLineInfo ) ); - } - else - mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aRect, aStart, aEnd, POLY_ARC ), maLineStyle.aLineInfo ) ); - } - else - mpGDIMetaFile->AddAction( new MetaArcAction( aRect, aStart, aEnd ) ); - - if ( bTo ) - maActPos = aEnd; -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::DrawPie( const Rectangle& rRect, const Point& rStart, const Point& rEnd ) -{ - UpdateClipRegion(); - UpdateFillStyle(); - - Rectangle aRect( ImplMap( rRect ) ); - Point aStart( ImplMap( rStart ) ); - Point aEnd( ImplMap( rEnd ) ); - - if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) - { - ImplSetNonPersistentLineColorTransparenz(); - mpGDIMetaFile->AddAction( new MetaPieAction( aRect, aStart, aEnd ) ); - UpdateLineStyle(); - mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aRect, aStart, aEnd, POLY_PIE ), maLineStyle.aLineInfo ) ); - } - else - { - UpdateLineStyle(); - mpGDIMetaFile->AddAction( new MetaPieAction( aRect, aStart, aEnd ) ); - } -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::DrawChord( const Rectangle& rRect, const Point& rStart, const Point& rEnd ) -{ - UpdateClipRegion(); - UpdateFillStyle(); - - Rectangle aRect( ImplMap( rRect ) ); - Point aStart( ImplMap( rStart ) ); - Point aEnd( ImplMap( rEnd ) ); - - if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) - { - ImplSetNonPersistentLineColorTransparenz(); - mpGDIMetaFile->AddAction( new MetaChordAction( aRect, aStart, aEnd ) ); - UpdateLineStyle(); - mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aRect, aStart, aEnd, POLY_CHORD ), maLineStyle.aLineInfo ) ); - } - else - { - UpdateLineStyle(); - mpGDIMetaFile->AddAction( new MetaChordAction( aRect, aStart, aEnd ) ); - } -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath ) -{ - UpdateClipRegion(); - ImplMap( rPolygon ); - if ( bRecordPath ) - aPathObj.AddPolygon( rPolygon ); - else - { - UpdateFillStyle(); - - if ( aClipPath.GetType() == COMPLEX ) - { - PolyPolygon aPolyPoly( rPolygon ); - PolyPolygon aDest; - aClipPath.GetClipPath().GetIntersection( aPolyPoly, aDest ); - ImplDrawClippedPolyPolygon( aDest ); - } - else - { - if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) - { - USHORT nCount = rPolygon.GetSize(); - if ( nCount ) - { - if ( rPolygon[ nCount - 1 ] != rPolygon[ 0 ] ) - { - Point aPoint( rPolygon[ 0 ] ); - rPolygon.Insert( nCount, aPoint ); - } - } - ImplSetNonPersistentLineColorTransparenz(); - mpGDIMetaFile->AddAction( new MetaPolygonAction( rPolygon ) ); - UpdateLineStyle(); - mpGDIMetaFile->AddAction( new MetaPolyLineAction( rPolygon, maLineStyle.aLineInfo ) ); - } - else - { - UpdateLineStyle(); - mpGDIMetaFile->AddAction( new MetaPolygonAction( rPolygon ) ); - } - } - } -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::DrawPolyPolygon( PolyPolygon& rPolyPolygon, sal_Bool bRecordPath ) -{ - UpdateClipRegion(); - - ImplMap( rPolyPolygon ); - - if ( bRecordPath ) - aPathObj.AddPolyPolygon( rPolyPolygon ); - else - { - UpdateFillStyle(); - - if ( aClipPath.GetType() == COMPLEX ) - { - PolyPolygon aDest; - aClipPath.GetClipPath().GetIntersection( rPolyPolygon, aDest ); - ImplDrawClippedPolyPolygon( aDest ); - } - else - { - UpdateLineStyle(); - mpGDIMetaFile->AddAction( new MetaPolyPolygonAction( rPolyPolygon ) ); - } - } -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::DrawPolyLine( Polygon& rPolygon, sal_Bool bTo, sal_Bool bRecordPath ) -{ - UpdateClipRegion(); - - ImplMap( rPolygon ); - if ( bTo ) - { - rPolygon[ 0 ] = maActPos; - maActPos = rPolygon[ rPolygon.GetSize() - 1 ]; - } - if ( bRecordPath ) - aPathObj.AddPolyLine( rPolygon ); - else - { - UpdateLineStyle(); - mpGDIMetaFile->AddAction( new MetaPolyLineAction( rPolygon, maLineStyle.aLineInfo ) ); - } -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::DrawPolyBezier( Polygon& rPolygon, sal_Bool bTo, sal_Bool bRecordPath ) -{ - UpdateClipRegion(); - - sal_uInt16 nPoints = rPolygon.GetSize(); - if ( ( nPoints >= 4 ) && ( ( ( nPoints - 4 ) % 3 ) == 0 ) ) - { - ImplMap( rPolygon ); - if ( bTo ) - { - rPolygon[ 0 ] = maActPos; - maActPos = rPolygon[ nPoints - 1 ]; - } - sal_uInt16 i; - for ( i = 0; ( i + 2 ) < nPoints; ) - { - rPolygon.SetFlags( i++, POLY_NORMAL ); - rPolygon.SetFlags( i++, POLY_CONTROL ); - rPolygon.SetFlags( i++, POLY_CONTROL ); - } - if ( bRecordPath ) - aPathObj.AddPolyLine( rPolygon ); - else - { - UpdateLineStyle(); - mpGDIMetaFile->AddAction( new MetaPolyLineAction( rPolygon, maLineStyle.aLineInfo ) ); - } - } -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry, sal_Bool bRecordPath, sal_Int32 nGfxMode ) -{ - UpdateClipRegion(); - - VirtualDevice* pVDev = NULL; - - rPosition = ImplMap( rPosition ); - - sal_Int32 nOldGfxMode = GetGfxMode(); - SetGfxMode( GM_COMPATIBLE ); - if ( pDXArry ) - { - sal_Int32 i, nSum, nLen = rText.Len(); - - for( i = 0, nSum = 0; i < nLen; i++ ) - { - sal_Int32 nTemp = ImplMap( Size( pDXArry[ i ], 0 ) ).Width(); - nSum += nTemp; - pDXArry[ i ] = nSum; - } - } - if ( mnLatestTextLayoutMode != mnTextLayoutMode ) - { - mnLatestTextLayoutMode = mnTextLayoutMode; - mpGDIMetaFile->AddAction( new MetaLayoutModeAction( mnTextLayoutMode ) ); - } - SetGfxMode( nGfxMode ); - sal_Bool bChangeFont = sal_False; - if ( mnLatestTextAlign != mnTextAlign ) - { - bChangeFont = sal_True; - mnLatestTextAlign = mnTextAlign; - TextAlign eTextAlign; - if ( ( mnTextAlign & TA_BASELINE) == TA_BASELINE ) - eTextAlign = ALIGN_BASELINE; - else if( ( mnTextAlign & TA_BOTTOM) == TA_BOTTOM ) - eTextAlign = ALIGN_BOTTOM; - else - eTextAlign = ALIGN_TOP; - mpGDIMetaFile->AddAction( new MetaTextAlignAction( eTextAlign ) ); - } - if ( maLatestTextColor != maTextColor ) - { - bChangeFont = sal_True; - maLatestTextColor = maTextColor; - mpGDIMetaFile->AddAction( new MetaTextColorAction( maTextColor ) ); - } - sal_Bool bChangeFillColor = sal_False; - if ( maLatestBkColor != maBkColor ) - { - bChangeFillColor = sal_True; - maLatestBkColor = maBkColor; - } - if ( mnLatestBkMode != mnBkMode ) - { - bChangeFillColor = sal_True; - mnLatestBkMode = mnBkMode; - } - if ( bChangeFillColor ) - { - bChangeFont = sal_True; - mpGDIMetaFile->AddAction( new MetaTextFillColorAction( maFont.GetFillColor(), !maFont.IsTransparent() ) ); - } - Font aTmp( maFont ); - aTmp.SetColor( maTextColor ); - aTmp.SetFillColor( maBkColor ); - - if( mnBkMode == TRANSPARENT ) - aTmp.SetTransparent( sal_True ); - else - aTmp.SetTransparent( sal_False ); - - if ( ( mnTextAlign & TA_BASELINE) == TA_BASELINE ) - aTmp.SetAlign( ALIGN_BASELINE ); - else if( ( mnTextAlign & TA_BOTTOM) == TA_BOTTOM ) - aTmp.SetAlign( ALIGN_BOTTOM ); - else - aTmp.SetAlign( ALIGN_TOP ); - - if ( nGfxMode == GM_ADVANCED ) - { - // check whether there is a font rotation applied via transformation - Point aP1( ImplMap( Point() ) ); - Point aP2( ImplMap( Point( 0, 100 ) ) ); - aP2.X() -= aP1.X(); - aP2.Y() -= aP1.Y(); - double fX = aP2.X(); - double fY = aP2.Y(); - if ( fX ) - { - double fOrientation = acos( fX / sqrt( fX * fX + fY * fY ) ) * 57.29577951308; - if ( fY > 0 ) - fOrientation = 360 - fOrientation; - fOrientation += 90; - fOrientation *= 10; - fOrientation += aTmp.GetOrientation(); - aTmp.SetOrientation( sal_Int16( fOrientation ) ); - } - } - - if( mnTextAlign & ( TA_UPDATECP | TA_RIGHT_CENTER ) ) - { - if ( !pVDev ) - pVDev = new VirtualDevice; - sal_Int32 nTextWidth; - pVDev->SetMapMode( MapMode( MAP_100TH_MM ) ); - pVDev->SetFont( maFont ); - if( pDXArry ) - { - UINT32 nLen = rText.Len(); - nTextWidth = pVDev->GetTextWidth( rText.GetChar( (sal_uInt16)( nLen - 1 ) ) ); - if( nLen > 1 ) - nTextWidth += pDXArry[ nLen - 2 ]; - } - else - nTextWidth = pVDev->GetTextWidth( rText ); - - if( mnTextAlign & TA_UPDATECP ) - rPosition = maActPos; - - if ( mnTextAlign & TA_RIGHT_CENTER ) - { - double fLenght = ( ( mnTextAlign & TA_RIGHT_CENTER ) == TA_RIGHT ) ? nTextWidth : nTextWidth >> 1; - rPosition.X() -= (sal_Int32)( fLenght * cos( maFont.GetOrientation() * F_PI1800 ) ); - rPosition.Y() -= (sal_Int32)(-( fLenght * sin( maFont.GetOrientation() * F_PI1800 ) ) ); - } - - if( mnTextAlign & TA_UPDATECP ) - maActPos.X() = rPosition.X() + nTextWidth; - } - if ( bChangeFont || ( maLatestFont != aTmp ) ) - { - maLatestFont = aTmp; - mpGDIMetaFile->AddAction( new MetaFontAction( aTmp ) ); - mpGDIMetaFile->AddAction( new MetaTextAlignAction( aTmp.GetAlign() ) ); - mpGDIMetaFile->AddAction( new MetaTextColorAction( aTmp.GetColor() ) ); - mpGDIMetaFile->AddAction( new MetaTextFillColorAction( aTmp.GetFillColor(), !aTmp.IsTransparent() ) ); - } - if ( bRecordPath ) - { - // ToDo - } - else - { - /* because text without dx array is badly scaled, we - will create such an array if necessary */ - sal_Int32* pDX = pDXArry; - if ( !pDXArry ) - { - pDX = new sal_Int32[ rText.Len() ]; - if ( !pVDev ) - pVDev = new VirtualDevice; - pVDev->SetMapMode( MAP_100TH_MM ); - pVDev->SetFont( maLatestFont ); - pVDev->GetTextArray( rText, pDX, 0, STRING_LEN ); - } - mpGDIMetaFile->AddAction( new MetaTextArrayAction( rPosition, rText, pDX, 0, STRING_LEN ) ); - if ( !pDXArry ) // this means we have created our own array - delete[] pDX; // which must be deleted - } - SetGfxMode( nOldGfxMode ); - delete pVDev; -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::ImplDrawBitmap( const Point& rPos, const Size& rSize, const BitmapEx rBitmap ) -{ - BitmapEx aBmpEx( rBitmap ); - if ( aClipPath.GetType() == COMPLEX ) - { - VirtualDevice aVDev; - MapMode aMapMode( MAP_100TH_MM ); - aMapMode.SetOrigin( Point( -rPos.X(), -rPos.Y() ) ); - const Size aOutputSizePixel( aVDev.LogicToPixel( rSize, aMapMode ) ); - const Size aSizePixel( rBitmap.GetSizePixel() ); - if ( aOutputSizePixel.Width() && aOutputSizePixel.Height() ) - { - aMapMode.SetScaleX( Fraction( aSizePixel.Width(), aOutputSizePixel.Width() ) ); - aMapMode.SetScaleY( Fraction( aSizePixel.Height(), aOutputSizePixel.Height() ) ); - } - aVDev.SetMapMode( aMapMode ); - aVDev.SetOutputSizePixel( aSizePixel ); - aVDev.SetFillColor( Color( COL_BLACK ) ); - const PolyPolygon aClip( aClipPath.GetClipPath() ); - aVDev.DrawPolyPolygon( aClip ); - const Point aEmptyPoint; - - // #i50672# Extract whole VDev content (to match size of rBitmap) - aVDev.EnableMapMode( FALSE ); - Bitmap aMask( aVDev.GetBitmap( aEmptyPoint, aSizePixel ).CreateMask( Color( COL_WHITE ) ) ); - - if ( aBmpEx.IsTransparent() ) - { - if ( rBitmap.GetTransparentColor() == Color( COL_WHITE ) ) - aMask.CombineSimple( rBitmap.GetMask(), BMP_COMBINE_OR ); - else - aMask.CombineSimple( rBitmap.GetMask(), BMP_COMBINE_AND ); - aBmpEx = BitmapEx( rBitmap.GetBitmap(), aMask ); - } - else - aBmpEx = BitmapEx( rBitmap.GetBitmap(), aMask ); - } - if ( aBmpEx.IsTransparent() ) - mpGDIMetaFile->AddAction( new MetaBmpExScaleAction( rPos, rSize, aBmpEx ) ); - else - mpGDIMetaFile->AddAction( new MetaBmpScaleAction( rPos, rSize, aBmpEx.GetBitmap() ) ); -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) -{ - UpdateClipRegion(); - - sal_uInt32 nObjects = rSaveList.Count(); - sal_uInt32 nObjectsLeft = nObjects; - - while ( nObjectsLeft ) - { - sal_uInt32 i, nObjectsOfSameSize = 0; - sal_uInt32 nObjectStartIndex = nObjects - nObjectsLeft; - - BSaveStruct* pSave = (BSaveStruct*)rSaveList.GetObject( nObjectStartIndex ); - Rectangle aRect( pSave->aOutRect ); - - for ( i = nObjectStartIndex; i < nObjects; ) - { - nObjectsOfSameSize++; - if ( ++i < nObjects ) - { - pSave = (BSaveStruct*)rSaveList.GetObject( i ); - if ( pSave->aOutRect != aRect ) - break; - } - } - Point aPos( ImplMap( aRect.TopLeft() ) ); - Size aSize( ImplMap( aRect.GetSize() ) ); - - for ( i = nObjectStartIndex; i < ( nObjectStartIndex + nObjectsOfSameSize ); i++ ) - { - pSave = (BSaveStruct*)rSaveList.GetObject( i ); - - sal_uInt32 nWinRop = pSave->nWinRop; - sal_uInt8 nRasterOperation = (sal_uInt8)( nWinRop >> 16 ); - - sal_uInt32 nUsed = 0; - if ( ( nRasterOperation & 0xf ) != ( nRasterOperation >> 4 ) ) - nUsed |= 1; // pattern is used - if ( ( nRasterOperation & 0x33 ) != ( ( nRasterOperation & 0xcc ) >> 2 ) ) - nUsed |= 2; // source is used - if ( ( nRasterOperation & 0xaa ) != ( ( nRasterOperation & 0x55 ) << 1 ) ) - nUsed |= 4; // destination is used - - if ( (nUsed & 1) && (( nUsed & 2 ) == 0) ) - { // patterns aren't well supported yet - sal_uInt32 nOldRop = SetRasterOp( ROP_OVERPAINT ); // in this case nRasterOperation is either 0 or 0xff - UpdateFillStyle(); - DrawRect( aRect, FALSE ); - SetRasterOp( nOldRop ); - } - else - { - sal_Bool bDrawn = sal_False; - - if ( i == nObjectStartIndex ) // optimizing, sometimes it is possible to create just one transparent bitmap - { - if ( nObjectsOfSameSize == 2 ) - { - BSaveStruct* pSave2 = (BSaveStruct*)rSaveList.GetObject( i + 1 ); - if ( ( pSave->aBmp.GetPrefSize() == pSave2->aBmp.GetPrefSize() ) && - ( pSave->aBmp.GetPrefMapMode() == pSave2->aBmp.GetPrefMapMode() ) ) - { - // TODO: Strictly speaking, we should - // check whether mask is monochrome, and - // whether image is black (upper branch) - // or white (lower branch). Otherwise, the - // effect is not the same as a masked - // bitmap. - if ( ( nWinRop == SRCPAINT ) && ( pSave2->nWinRop == SRCAND ) ) - { - Bitmap aMask( pSave->aBmp ); aMask.Invert(); - BitmapEx aBmpEx( pSave2->aBmp, aMask ); - ImplDrawBitmap( aPos, aSize, aBmpEx ); - bDrawn = sal_True; - i++; - } - // #i20085# This is just the other way - // around as above. Only difference: mask - // is inverted - else if ( ( nWinRop == SRCAND ) && ( pSave2->nWinRop == SRCPAINT ) ) - { - Bitmap aMask( pSave->aBmp ); - BitmapEx aBmpEx( pSave2->aBmp, aMask ); - ImplDrawBitmap( aPos, aSize, aBmpEx ); - bDrawn = sal_True; - i++; - } - } - } - } - - if ( !bDrawn ) - { - Push(); - sal_uInt32 nOldRop = SetRasterOp( R2_COPYPEN ); - Bitmap aBitmap( pSave->aBmp ); - sal_uInt32 nOperation = ( nRasterOperation & 0xf ); - switch( nOperation ) - { - case 0x1 : - case 0xe : - { - SetRasterOp( R2_XORPEN ); - ImplDrawBitmap( aPos, aSize, aBitmap ); - SetRasterOp( R2_COPYPEN ); - Bitmap aMask( aBitmap ); - aMask.Invert(); - BitmapEx aBmpEx( aBitmap, aMask ); - ImplDrawBitmap( aPos, aSize, aBmpEx ); - if ( nOperation == 0x1 ) - { - SetRasterOp( R2_NOT ); - DrawRect( aRect, FALSE ); - } - } - break; - case 0x7 : - case 0x8 : - { - Bitmap aMask( aBitmap ); - if ( ( nUsed & 1 ) && ( nRasterOperation & 0xb0 ) == 0xb0 ) // pattern used - { - aBitmap.Convert( BMP_CONVERSION_24BIT ); - aBitmap.Erase( maFillStyle.aFillColor ); - } - BitmapEx aBmpEx( aBitmap, aMask ); - ImplDrawBitmap( aPos, aSize, aBmpEx ); - if ( nOperation == 0x7 ) - { - SetRasterOp( R2_NOT ); - DrawRect( aRect, FALSE ); - } - } - break; - - case 0x4 : - case 0xb : - { - SetRasterOp( R2_NOT ); - DrawRect( aRect, FALSE ); - SetRasterOp( R2_COPYPEN ); - Bitmap aMask( aBitmap ); - aBitmap.Invert(); - BitmapEx aBmpEx( aBitmap, aMask ); - ImplDrawBitmap( aPos, aSize, aBmpEx ); - SetRasterOp( R2_XORPEN ); - ImplDrawBitmap( aPos, aSize, aBitmap ); - if ( nOperation == 0xb ) - { - SetRasterOp( R2_NOT ); - DrawRect( aRect, FALSE ); - } - } - break; - - case 0x2 : - case 0xd : - { - Bitmap aMask( aBitmap ); - aMask.Invert(); - BitmapEx aBmpEx( aBitmap, aMask ); - ImplDrawBitmap( aPos, aSize, aBmpEx ); - SetRasterOp( R2_XORPEN ); - ImplDrawBitmap( aPos, aSize, aBitmap ); - if ( nOperation == 0xd ) - { - SetRasterOp( R2_NOT ); - DrawRect( aRect, FALSE ); - } - } - break; - case 0x6 : - case 0x9 : - { - SetRasterOp( R2_XORPEN ); - ImplDrawBitmap( aPos, aSize, aBitmap ); - if ( nOperation == 0x9 ) - { - SetRasterOp( R2_NOT ); - DrawRect( aRect, FALSE ); - } - } - break; - - case 0x0 : // WHITENESS - case 0xf : // BLACKNESS - { // in this case nRasterOperation is either 0 or 0xff - maFillStyle = WinMtfFillStyle( Color( nRasterOperation, nRasterOperation, nRasterOperation ) ); - UpdateFillStyle(); - DrawRect( aRect, FALSE ); - } - break; - - case 0x3 : // only source is used - case 0xc : - { - if ( nRasterOperation == 0x33 ) - aBitmap.Invert(); - ImplDrawBitmap( aPos, aSize, aBitmap ); - } - break; - - case 0x5 : // only destination is used - { - SetRasterOp( R2_NOT ); - DrawRect( aRect, FALSE ); - } - case 0xa : // no operation - break; - } - SetRasterOp( nOldRop ); - Pop(); - } - } - } - nObjectsLeft -= nObjectsOfSameSize; - } - - void* pPtr; - for ( pPtr = rSaveList.First(); pPtr; pPtr = rSaveList.Next() ) - delete (BSaveStruct*)pPtr; - rSaveList.Clear(); -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::SetDevOrg( const Point& rPoint ) -{ - mnDevOrgX = rPoint.X(); - mnDevOrgY = rPoint.Y(); -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::SetDevOrgOffset( INT32 nXAdd, INT32 nYAdd ) -{ - mnDevOrgX += nXAdd; - mnDevOrgY += nYAdd; -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::SetDevExt( const Size& rSize ) -{ - if ( rSize.Width() && rSize.Height() ) - { - switch( mnMapMode ) - { - case MM_ISOTROPIC : - case MM_ANISOTROPIC : - { - mnDevWidth = rSize.Width(); - mnDevHeight = rSize.Height(); - } - } - } -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::ScaleDevExt( double fX, double fY ) -{ - mnDevWidth = FRound( mnDevWidth * fX ); - mnDevHeight = FRound( mnDevHeight * fY ); -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::SetWinOrg( const Point& rPoint ) -{ - mnWinOrgX = rPoint.X(); - mnWinOrgY = rPoint.Y(); -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::SetWinOrgOffset( INT32 nXAdd, INT32 nYAdd ) -{ - mnWinOrgX += nXAdd; - mnWinOrgY += nYAdd; -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::SetWinExt( const Size& rSize ) -{ - - if( rSize.Width() && rSize.Height() ) - { - switch( mnMapMode ) - { - case MM_ISOTROPIC : - case MM_ANISOTROPIC : - { - mnWinExtX = rSize.Width(); - mnWinExtY = rSize.Height(); - } - } - } -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::ScaleWinExt( double fX, double fY ) -{ - mnWinExtX = FRound( mnWinExtX * fX ); - mnWinExtY = FRound( mnWinExtY * fY ); -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::SetrclBounds( const Rectangle& rRect ) -{ - mrclBounds = rRect; -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::SetrclFrame( const Rectangle& rRect ) -{ - mrclFrame = rRect; -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::SetRefPix( const Size& rSize ) -{ - mnPixX = rSize.Width(); - mnPixY = rSize.Height(); -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::SetRefMill( const Size& rSize ) -{ - mnMillX = rSize.Width(); - mnMillY = rSize.Height(); -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::SetMapMode( sal_uInt32 nMapMode ) -{ - mnMapMode = nMapMode; - if ( nMapMode == MM_TEXT ) - { - mnWinExtX = mnDevWidth; - mnWinExtY = mnDevHeight; - } - else if ( mnMapMode == MM_HIMETRIC ) - { - mnWinExtX = mnMillX * 100; - mnWinExtY = mnMillY * 100; - } -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::SetWorldTransform( const XForm& rXForm ) -{ - maXForm.eM11 = rXForm.eM11; - maXForm.eM12 = rXForm.eM12; - maXForm.eM21 = rXForm.eM21; - maXForm.eM22 = rXForm.eM22; - maXForm.eDx = rXForm.eDx; - maXForm.eDy = rXForm.eDy; -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::ModifyWorldTransform( const XForm& rXForm, UINT32 nMode ) -{ - switch( nMode ) - { - case MWT_IDENTITY : - { - maXForm.eM11 = maXForm.eM12 = maXForm.eM21 = maXForm.eM22 = 1.0f; - maXForm.eDx = maXForm.eDy = 0.0f; - } - break; - - case MWT_RIGHTMULTIPLY : - case MWT_LEFTMULTIPLY : - { - const XForm* pLeft; - const XForm* pRight; - - if ( nMode == MWT_LEFTMULTIPLY ) - { - pLeft = &rXForm; - pRight = &maXForm; - } - else - { - pLeft = &maXForm; - pRight = &rXForm; - } - - float aF[3][3]; - float bF[3][3]; - float cF[3][3]; - - aF[0][0] = pLeft->eM11; - aF[0][1] = pLeft->eM12; - aF[0][2] = 0; - aF[1][0] = pLeft->eM21; - aF[1][1] = pLeft->eM22; - aF[1][2] = 0; - aF[2][0] = pLeft->eDx; - aF[2][1] = pLeft->eDy; - aF[2][2] = 1; - - bF[0][0] = pRight->eM11; - bF[0][1] = pRight->eM12; - bF[0][2] = 0; - bF[1][0] = pRight->eM21; - bF[1][1] = pRight->eM22; - bF[1][2] = 0; - bF[2][0] = pRight->eDx; - bF[2][1] = pRight->eDy; - bF[2][2] = 1; - - int i, j, k; - for ( i = 0; i < 3; i++ ) - { - for ( j = 0; j < 3; j++ ) - { - cF[i][j] = 0; - for ( k = 0; k < 3; k++ ) - cF[i][j] += aF[i][k] * bF[k][j]; - } - } - maXForm.eM11 = cF[0][0]; - maXForm.eM12 = cF[0][1]; - maXForm.eM21 = cF[1][0]; - maXForm.eM22 = cF[1][1]; - maXForm.eDx = cF[2][0]; - maXForm.eDy = cF[2][1]; - } - break; - } - } - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::Push() // !! to be able to access the original ClipRegion it -{ // is not allowed to use the MetaPushAction() - UpdateClipRegion(); // (the original clip region is on top of the stack) (SJ) - SaveStructPtr pSave( new SaveStruct ); - - pSave->aLineStyle = maLineStyle; - pSave->aFillStyle = maFillStyle; - - pSave->aFont = maFont; - pSave->aTextColor = maTextColor; - pSave->nTextAlign = mnTextAlign; - pSave->nTextLayoutMode = mnTextLayoutMode; - pSave->nMapMode = mnMapMode; - pSave->nGfxMode = mnGfxMode; - pSave->nBkMode = mnBkMode; - pSave->aBkColor = maBkColor; - pSave->bFillStyleSelected = mbFillStyleSelected; - - pSave->aActPos = maActPos; - pSave->aXForm = maXForm; - pSave->eRasterOp = meRasterOp; - - pSave->nWinOrgX = mnWinOrgX; - pSave->nWinOrgY = mnWinOrgY; - pSave->nWinExtX = mnWinExtX; - pSave->nWinExtY = mnWinExtY; - pSave->nDevOrgX = mnDevOrgX; - pSave->nDevOrgY = mnDevOrgY; - pSave->nDevWidth = mnDevWidth; - pSave->nDevHeight = mnDevHeight; - - pSave->aPathObj = aPathObj; - pSave->aClipPath = aClipPath; - - vSaveStack.push_back( pSave ); -} - -//----------------------------------------------------------------------------------- - -void WinMtfOutput::Pop() -{ - // Die aktuellen Daten vom Stack holen - if( vSaveStack.size() ) - { - // Die aktuelle Daten auf dem Stack sichern - SaveStructPtr pSave( vSaveStack.back() ); - - maLineStyle = pSave->aLineStyle; - maFillStyle = pSave->aFillStyle; - - maFont = pSave->aFont; - maTextColor = pSave->aTextColor; - mnTextAlign = pSave->nTextAlign; - mnTextLayoutMode = pSave->nTextLayoutMode; - mnBkMode = pSave->nBkMode; - mnGfxMode = pSave->nGfxMode; - mnMapMode = pSave->nMapMode; - maBkColor = pSave->aBkColor; - mbFillStyleSelected = pSave->bFillStyleSelected; - - maActPos = pSave->aActPos; - maXForm = pSave->aXForm; - meRasterOp = pSave->eRasterOp; - - mnWinOrgX = pSave->nWinOrgX; - mnWinOrgY = pSave->nWinOrgY; - mnWinExtX = pSave->nWinExtX; - mnWinExtY = pSave->nWinExtY; - mnDevOrgX = pSave->nDevOrgX; - mnDevOrgY = pSave->nDevOrgY; - mnDevWidth = pSave->nDevWidth; - mnDevHeight = pSave->nDevHeight; - - aPathObj = pSave->aPathObj; - if ( ! ( aClipPath == pSave->aClipPath ) ) - { - aClipPath = pSave->aClipPath; - aClipPath.bNeedsUpdate = sal_True; - } - if ( meLatestRasterOp != meRasterOp ) - mpGDIMetaFile->AddAction( new MetaRasterOpAction( meRasterOp ) ); - vSaveStack.pop_back(); - } -} - -void WinMtfOutput::AddFromGDIMetaFile( GDIMetaFile& rGDIMetaFile ) -{ - rGDIMetaFile.Play( *mpGDIMetaFile, 0xFFFFFFFF ); -} - diff --git a/svtools/source/filter.vcl/wmf/winmtf.hxx b/svtools/source/filter.vcl/wmf/winmtf.hxx deleted file mode 100644 index fb4fd2fe0c57..000000000000 --- a/svtools/source/filter.vcl/wmf/winmtf.hxx +++ /dev/null @@ -1,777 +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 _WINMTF_HXX -#define _WINMTF_HXX - -#ifdef DBG_UTIL -#define WIN_MTF_ASSERT -#endif - -#include -#ifndef BOOST_SHARED_PTR_HPP_INCLUDED -#include -#endif -#ifndef _TOOL_DEBUG_HXX -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define ERROR 0 -#define NULLREGION 1 -#define SIMPLEREGION 2 -#define COMPLEXREGION 3 - -#define RGN_AND 1 -#define RGN_OR 2 -#define RGN_XOR 3 -#define RGN_DIFF 4 -#define RGN_COPY 5 - -#define TRANSPARENT 1 -#define OPAQUE 2 -#define BKMODE_LAST 2 - -/* xform stuff */ -#define MWT_IDENTITY 1 -#define MWT_LEFTMULTIPLY 2 -#define MWT_RIGHTMULTIPLY 3 - -#define ENHMETA_STOCK_OBJECT 0x80000000 - -/* Stock Logical Objects */ -#define WHITE_BRUSH 0 -#define LTGRAY_BRUSH 1 -#define GRAY_BRUSH 2 -#define DKGRAY_BRUSH 3 -#define BLACK_BRUSH 4 -#define NULL_BRUSH 5 -#define HOLLOW_BRUSH NULL_BRUSH -#define WHITE_PEN 6 -#define BLACK_PEN 7 -#define NULL_PEN 8 -#define OEM_FIXED_FONT 10 -#define ANSI_FIXED_FONT 11 -#define ANSI_VAR_FONT 12 -#define SYSTEM_FONT 13 -#define DEVICE_DEFAULT_FONT 14 -#define DEFAULT_PALETTE 15 -#define SYSTEM_FIXED_FONT 16 - - -#define R2_BLACK 1 -#define R2_NOTMERGEPEN 2 -#define R2_MASKNOTPEN 3 -#define R2_NOTCOPYPEN 4 -#define R2_MASKPENNOT 5 -#define R2_NOT 6 -#define R2_XORPEN 7 -#define R2_NOTMASKPEN 8 -#define R2_MASKPEN 9 -#define R2_NOTXORPEN 10 -#define R2_NOP 11 -#define R2_MERGENOTPEN 12 -#define R2_COPYPEN 13 -#define R2_MERGEPENNOT 14 -#define R2_MERGEPEN 15 -#define R2_WHITE 16 - -/* Mapping Modes */ -#define MM_TEXT 1 -#define MM_LOMETRIC 2 -#define MM_HIMETRIC 3 -#define MM_LOENGLISH 4 -#define MM_HIENGLISH 5 -#define MM_TWIPS 6 -#define MM_ISOTROPIC 7 -#define MM_ANISOTROPIC 8 - - -/* Graphics Modes */ -#define GM_COMPATIBLE 1 -#define GM_ADVANCED 2 -#define GM_LAST 2 - -/* StretchBlt() Modes */ -#define BLACKONWHITE 1 -#define WHITEONBLACK 2 -#define COLORONCOLOR 3 -#define HALFTONE 4 -#define MAXSTRETCHBLTMODE 4 -#define STRETCH_ANDSCANS BLACKONWHITE -#define STRETCH_ORSCANS WHITEONBLACK -#define STRETCH_DELETESCANS COLORONCOLOR -#define STRETCH_HALFTONE HALFTONE - -#define LF_FACESIZE 32 - -struct LOGFONTW -{ - INT32 lfHeight; - INT32 lfWidth; - INT32 lfEscapement; - INT32 lfOrientation; - INT32 lfWeight; - BYTE lfItalic; - BYTE lfUnderline; - BYTE lfStrikeOut; - BYTE lfCharSet; - BYTE lfOutPrecision; - BYTE lfClipPrecision; - BYTE lfQuality; - BYTE lfPitchAndFamily; - String alfFaceName; -}; - -#define TA_NOUPDATECP 0x0000 -#define TA_UPDATECP 0x0001 -#define TA_LEFT 0x0000 -#define TA_RIGHT 0x0002 -#define TA_CENTER 0x0006 -#define TA_RIGHT_CENTER (TA_RIGHT | TA_CENTER) -#define TA_TOP 0x0000 -#define TA_BOTTOM 0x0008 -#define TA_BASELINE 0x0018 - -#define SRCCOPY 0x00CC0020L -#define SRCPAINT 0x00EE0086L -#define SRCAND 0x008800C6L -#define SRCINVERT 0x00660046L -#define SRCERASE 0x00440328L -#define NOTSRCCOPY 0x00330008L -#define NOTSRCERASE 0x001100A6L -#define MERGECOPY 0x00C000CAL -#define MERGEPAINT 0x00BB0226L -#define PATCOPY 0x00F00021L -#define PATPAINT 0x00FB0A09L -#define PATINVERT 0x005A0049L -#define DSTINVERT 0x00550009L -#define BLACKNESS 0x00000042L -#define WHITENESS 0x00FF0062L - -#define PS_SOLID 0 -#define PS_DASH 1 -#define PS_DOT 2 -#define PS_DASHDOT 3 -#define PS_DASHDOTDOT 4 -#define PS_NULL 5 -#define PS_INSIDEFRAME 6 -#define PS_USERSTYLE 7 -#define PS_ALTERNATE 8 -#define PS_STYLE_MASK 15 - -#define PS_ENDCAP_ROUND 0x000 -#define PS_ENDCAP_SQUARE 0x100 -#define PS_ENDCAP_FLAT 0x200 -#define PS_ENDCAP_MASK 0xF00 - -#define PS_JOIN_ROUND 0x0000 -#define PS_JOIN_BEVEL 0x1000 -#define PS_JOIN_MITER 0x2000 -#define PS_JOIN_MASK 0xF000 - -#define PS_COSMETIC 0x00000 -#define PS_GEOMETRIC 0x10000 -#define PS_TYPE_MASK 0xF0000 - -#define ANSI_CHARSET 0 -#define DEFAULT_CHARSET 1 -#define SYMBOL_CHARSET 2 -#define SHIFTJIS_CHARSET 128 -#define HANGEUL_CHARSET 129 -#define GB2312_CHARSET 134 -#define CHINESEBIG5_CHARSET 136 -#define OEM_CHARSET 255 -/*WINVER >= 0x0400*/ -#define JOHAB_CHARSET 130 -#define HEBREW_CHARSET 177 -#define ARABIC_CHARSET 178 -#define GREEK_CHARSET 161 -#define TURKISH_CHARSET 162 -#define VIETNAMESE_CHARSET 163 -#define THAI_CHARSET 222 -#define EASTEUROPE_CHARSET 238 -#define RUSSIAN_CHARSET 204 -#define MAC_CHARSET 77 -#define BALTIC_CHARSET 186 - -#define ETO_OPAQUE 0x0002 -#define ETO_CLIPPED 0x0004 -/*WINVER >= 0x0400*/ -#define ETO_GLYPH_INDEX 0x0010 -#define ETO_RTLREADING 0x0080 -#define ETO_NUMERICSLOCAL 0x0400 -#define ETO_NUMERICSLATIN 0x0800 -#define ETO_IGNORELANGUAGE 0x1000 -/*_WIN32_WINNT >= 0x0500*/ -#define ETO_PDY 0x2000 - - -#define DEFAULT_PITCH 0x00 -#define FIXED_PITCH 0x01 -#define VARIABLE_PITCH 0x02 - -/* Font Families */ -#define FF_DONTCARE 0x00 -#define FF_ROMAN 0x10 -#define FF_SWISS 0x20 -#define FF_MODERN 0x30 -#define FF_SCRIPT 0x40 -#define FF_DECORATIVE 0x50 - -#define FW_DONTCARE 0 -#define FW_THIN 100 -#define FW_EXTRALIGHT 200 -#define FW_LIGHT 300 -#define FW_NORMAL 400 -#define FW_MEDIUM 500 -#define FW_SEMIBOLD 600 -#define FW_BOLD 700 -#define FW_EXTRABOLD 800 -#define FW_HEAVY 900 -#define FW_ULTRALIGHT 200 -#define FW_REGULAR 400 -#define FW_DEMIBOLD 600 -#define FW_ULTRABOLD 800 -#define FW_BLACK 900 - -#define BS_SOLID 0 -#define BS_NULL 1 -#define BS_HOLLOW 1 -#define BS_HATCHED 2 -#define BS_PATTERN 3 -#define BS_INDEXED 4 -#define BS_DIBPATTERN 5 -#define BS_DIBPATTERNPT 6 -#define BS_PATTERN8X8 7 -#define BS_DIBPATTERN8X8 8 -#define BS_MONOPATTERN 9 - -#define W_HS_HORIZONTAL 0 -#define W_HS_VERTICAL 1 -#define W_HS_FDIAGONAL 2 -#define W_HS_BDIAGONAL 3 -#define W_HS_CROSS 4 -#define W_HS_DIAGCROSS 5 - -#define RDH_RECTANGLES 1 - -#define W_MFCOMMENT 15 - -#define PRIVATE_ESCAPE_UNICODE 2 - -//============================ WMFReader ================================== - - -#ifdef WIN_MTF_ASSERT -#define WIN_MTF_ASSERT_INIT 0x80000000 -#define WIN_MTF_ASSERT_ONCE 0x40000000 -#define WIN_MTF_ASSERT_MIFE 0x20000000 - -void WinMtfAssertHandler( const sal_Char*, sal_uInt32 nFlags = WIN_MTF_ASSERT_MIFE ); -#endif - -enum WinMtfClipPathType{ EMPTY, RECTANGLE, COMPLEX }; - -class WinMtfClipPath -{ - PolyPolygon aPolyPoly; - WinMtfClipPathType eType; - sal_Int32 nDepth; - - void ImpUpdateType(); - - public : - - sal_Bool bNeedsUpdate; - - WinMtfClipPath(): eType(EMPTY), nDepth( 0 ), bNeedsUpdate( sal_False ){}; - - void SetClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode ); - void IntersectClipRect( const Rectangle& rRect ); - void ExcludeClipRect( const Rectangle& rRect ); - void MoveClipRegion( const Size& rSize ); - - WinMtfClipPathType GetType() const { return eType; }; - const PolyPolygon& GetClipPath() const { return aPolyPoly; }; - - sal_Bool operator==( const WinMtfClipPath& rPath ) - { - return ( rPath.eType == eType ) && - ( rPath.aPolyPoly == aPolyPoly ); - }; -}; - -class WinMtfPathObj : public PolyPolygon -{ - sal_Bool bClosed; - - public : - - WinMtfPathObj() { bClosed = sal_True; } - void Init() { Clear(); bClosed = sal_True; }; - void ClosePath(); - - void AddPoint( const Point& rPoint ); - void AddPolygon( const Polygon& rPoly ); - void AddPolyLine( const Polygon& rPoly ); - void AddPolyPolygon( const PolyPolygon& rPolyPolygon ); -}; - -struct WinMtfFontStyle -{ - Font aFont; - - WinMtfFontStyle( LOGFONTW& rLogFont ); -}; - -// ----------------------------------------------------------------------------- - -struct WinMtfFillStyle -{ - Color aFillColor; - BOOL bTransparent; - - WinMtfFillStyle() : - aFillColor ( Color( COL_BLACK ) ), - bTransparent( FALSE ) - { - }; - - WinMtfFillStyle( const Color& rColor, BOOL bTrans = FALSE ) : - aFillColor ( rColor ), - bTransparent( bTrans ) - { - }; - - BOOL operator==( const WinMtfFillStyle& rStyle ) - { return ( ( aFillColor == rStyle.aFillColor ) && ( bTransparent == rStyle.bTransparent ) ); }; - BOOL operator==( WinMtfFillStyle* pStyle ) - { return ( ( aFillColor == pStyle->aFillColor ) && ( bTransparent == pStyle->bTransparent ) ); }; - void operator=( const WinMtfFillStyle& rStyle ) { aFillColor = rStyle.aFillColor; bTransparent = rStyle.bTransparent; }; - void operator=( WinMtfFillStyle* pStyle ) { aFillColor = pStyle->aFillColor; bTransparent = pStyle->bTransparent; }; -}; - -// ----------------------------------------------------------------------------- - -struct WinMtfLineStyle -{ - Color aLineColor; - LineInfo aLineInfo; - BOOL bTransparent; - - WinMtfLineStyle() : - aLineColor ( COL_BLACK ), - bTransparent( FALSE ) {}; - - WinMtfLineStyle( const Color& rColor, BOOL bTrans = FALSE ) : - aLineColor ( rColor ), - bTransparent( bTrans ) {}; - - WinMtfLineStyle( const Color& rColor, const LineInfo rStyle, BOOL bTrans = FALSE ) : - aLineColor ( rColor ), - aLineInfo ( rStyle ), - bTransparent( bTrans ) {}; - - BOOL operator==( const WinMtfLineStyle& rStyle ) { return ( ( aLineColor == rStyle.aLineColor ) && ( bTransparent == rStyle.bTransparent ) && ( aLineInfo == rStyle.aLineInfo ) ); }; - BOOL operator==( WinMtfLineStyle* pStyle ) { return ( ( aLineColor == pStyle->aLineColor ) && ( bTransparent == pStyle->bTransparent ) && ( aLineInfo == pStyle->aLineInfo ) ); }; - void operator=( const WinMtfLineStyle& rStyle ) - { - aLineColor = rStyle.aLineColor; - bTransparent = rStyle.bTransparent; - aLineInfo = rStyle.aLineInfo; - }; - - void operator=( WinMtfLineStyle* pStyle ) - { - aLineColor = pStyle->aLineColor; - bTransparent = pStyle->bTransparent; - aLineInfo = pStyle->aLineInfo; - }; -}; - -// ----------------------------------------------------------------------------- - -struct XForm -{ - float eM11; - float eM12; - float eM21; - float eM22; - float eDx; - float eDy; - XForm() - { - eM11 = eM22 = 1.0f; - eDx = eDy = eM12 = eM21 = 0.0f; - }; - - friend SvStream& operator>>( SvStream& rIn, XForm& rXForm ); -}; - -// ----------------------------------------------------------------------------- - -struct SaveStruct -{ - sal_uInt32 nBkMode, nMapMode, nGfxMode, nTextLayoutMode; - sal_Int32 nWinOrgX, nWinOrgY, nWinExtX, nWinExtY; - sal_Int32 nDevOrgX, nDevOrgY, nDevWidth, nDevHeight; - - WinMtfLineStyle aLineStyle; - WinMtfFillStyle aFillStyle; - - Font aFont; - Color aBkColor; - Color aTextColor; - sal_uInt32 nTextAlign; - RasterOp eRasterOp; - - Point aActPos; - WinMtfPathObj aPathObj; - WinMtfClipPath aClipPath; - XForm aXForm; - - sal_Bool bRecordPath; - sal_Bool bFillStyleSelected; -}; - -typedef ::boost::shared_ptr< SaveStruct > SaveStructPtr; - -// ----------------------------------------------------------------------------- - -struct BSaveStruct -{ - Bitmap aBmp; - Rectangle aOutRect; - UINT32 nWinRop; - - BSaveStruct( const Bitmap& rBmp, const Rectangle& rOutRect, UINT32 nRop ) : - aBmp( rBmp ), aOutRect( rOutRect ), nWinRop( nRop ){}; -}; - -// ----------------------------------------------------------------------------- - -enum GDIObjectType { GDI_DUMMY = 0, GDI_PEN = 1, GDI_BRUSH = 2, GDI_FONT = 3, GDI_PALETTE = 4, GDI_BITMAP = 5, GDI_REGION = 6 }; - -struct GDIObj -{ - void* pStyle; - GDIObjectType eType; - - GDIObj() : - pStyle ( NULL ), - eType ( GDI_DUMMY ) - { - }; - - GDIObj( GDIObjectType eT, void* pS ) { pStyle = pS; eType = eT; }; - void Set( GDIObjectType eT, void* pS ) { pStyle = pS; eType = eT; }; - void Delete() - { - if ( pStyle ) - { - switch ( eType ) - { - case GDI_PEN : - delete (WinMtfLineStyle*)pStyle; - break; - case GDI_BRUSH : - delete (WinMtfFillStyle*)pStyle; - break; - case GDI_FONT : - delete (WinMtfFontStyle*)pStyle; - break; - - default: - DBG_ERROR( "unsupported style deleted" ); - break; - } - pStyle = NULL; - } - }; - - ~GDIObj() - { - Delete(); - } -}; - -// ----------------------------------------------------------------------------- - -class WinMtfOutput -{ - - WinMtfPathObj aPathObj; - WinMtfClipPath aClipPath; - - WinMtfLineStyle maLatestLineStyle; - WinMtfLineStyle maLineStyle; - WinMtfFillStyle maLatestFillStyle; - WinMtfFillStyle maFillStyle; - Font maLatestFont; - Font maFont; - sal_uInt32 mnLatestTextAlign; - sal_uInt32 mnTextAlign; - Color maLatestTextColor; - Color maTextColor; - Color maLatestBkColor; - Color maBkColor; - sal_uInt32 mnLatestTextLayoutMode; - sal_uInt32 mnTextLayoutMode; - sal_uInt32 mnLatestBkMode; - sal_uInt32 mnBkMode; - RasterOp meLatestRasterOp; - RasterOp meRasterOp; - - std::vector< GDIObj* > vGDIObj; - - Point maActPos; - - sal_uInt32 mnRop; - sal_Bool mbNopMode; - sal_Bool mbFillStyleSelected; - - std::vector< SaveStructPtr > vSaveStack; - - sal_uInt32 mnGfxMode; - sal_uInt32 mnMapMode; - XForm maXForm; - sal_Int32 mnDevOrgX, mnDevOrgY; - sal_Int32 mnDevWidth, mnDevHeight; - sal_Int32 mnWinOrgX, mnWinOrgY; // aktuelles Window-Origin - sal_Int32 mnWinExtX, mnWinExtY; // aktuelles Window-Extent - - sal_Int32 mnPixX, mnPixY; // Reference Device in pixel - sal_Int32 mnMillX, mnMillY; // Reference Device in Mill - Rectangle mrclFrame; // rectangle in logical units 1/100th mm - Rectangle mrclBounds; - - GDIMetaFile* mpGDIMetaFile; - - void UpdateLineStyle(); - void UpdateFillStyle(); - - Point ImplMap( const Point& rPt ); - Size ImplMap( const Size& rSz ); - Rectangle ImplMap( const Rectangle& rRectangle ); - void ImplMap( Font& rFont ); - Polygon& ImplMap( Polygon& rPolygon ); - PolyPolygon& ImplMap( PolyPolygon& rPolyPolygon ); - void ImplResizeObjectArry( UINT32 nNewEntry ); - void ImplSetNonPersistentLineColorTransparenz(); - void ImplDrawClippedPolyPolygon( const PolyPolygon& rPolyPoly ); - void ImplDrawBitmap( const Point& rPos, const Size& rSize, const BitmapEx rBitmap ); - - public: - - void SetDevOrg( const Point& rPoint ); - void SetDevOrgOffset( INT32 nXAdd, INT32 nYAdd ); - void SetDevExt( const Size& rSize ); - void ScaleDevExt( double fX, double fY ); - - void SetWinOrg( const Point& rPoint ); - void SetWinOrgOffset( INT32 nX, INT32 nY ); - void SetWinExt( const Size& rSize ); - void ScaleWinExt( double fX, double fY ); - - void SetrclBounds( const Rectangle& rRect ); - void SetrclFrame( const Rectangle& rRect ); - void SetRefPix( const Size& rSize ); - void SetRefMill( const Size& rSize ); - - sal_uInt32 GetMapMode() const { return mnMapMode; }; - void SetMapMode( sal_uInt32 mnMapMode ); - void SetWorldTransform( const XForm& rXForm ); - void ModifyWorldTransform( const XForm& rXForm, UINT32 nMode ); - - void Push(); - void Pop(); - - UINT32 SetRasterOp( UINT32 nRasterOp ); - void StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill ); - - void SetGfxMode( sal_Int32 nGfxMode ){ mnGfxMode = nGfxMode; }; - sal_Int32 GetGfxMode() const { return mnGfxMode; }; - void SetBkMode( UINT32 nMode ); - void SetBkColor( const Color& rColor ); - void SetTextColor( const Color& rColor ); - void SetTextAlign( UINT32 nAlign ); - void CreateObject( GDIObjectType, void* pStyle = NULL ); - void CreateObject( INT32 nIndex, GDIObjectType, void* pStyle = NULL ); - void DeleteObject( INT32 nIndex ); - void SelectObject( INT32 nIndex ); - CharSet GetCharSet(){ return maFont.GetCharSet(); }; - void SetFont( const Font& rFont ); - const Font& GetFont() const; - void SetTextLayoutMode( const sal_uInt32 nLayoutMode ); - sal_uInt32 GetTextLayoutMode() const; - - void ClearPath(){ aPathObj.Init(); }; - void ClosePath(){ aPathObj.ClosePath(); }; - const PolyPolygon& GetPathObj(){ return aPathObj; }; - - void MoveTo( const Point& rPoint, sal_Bool bRecordPath = sal_False ); - void LineTo( const Point& rPoint, sal_Bool bRecordPath = sal_False ); - void DrawPixel( const Point& rSource, const Color& rColor ); - void DrawLine( const Point& rSource, const Point& rDest ); - void DrawRect( const Rectangle& rRect, BOOL bEdge = TRUE ); - void DrawRoundRect( const Rectangle& rRect, const Size& rSize ); - void DrawEllipse( const Rectangle& rRect ); - void DrawArc( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle, BOOL bDrawTo = FALSE ); - void DrawPie( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle ); - void DrawChord( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle ); - void DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath = sal_False ); - void DrawPolyPolygon( PolyPolygon& rPolyPolygon, sal_Bool bRecordPath = sal_False ); - void DrawPolyLine( Polygon& rPolygon, sal_Bool bDrawTo = sal_False, sal_Bool bRecordPath = sal_False ); - void DrawPolyBezier( Polygon& rPolygin, sal_Bool bDrawTo = sal_False, sal_Bool bRecordPath = sal_False ); - void DrawText( Point& rPosition, String& rString, sal_Int32* pDXArry = NULL, sal_Bool bRecordPath = sal_False, - sal_Int32 nGraphicsMode = GM_COMPATIBLE ); - void ResolveBitmapActions( List& rSaveList ); - - void IntersectClipRect( const Rectangle& rRect ); - void ExcludeClipRect( const Rectangle& rRect ); - void MoveClipRegion( const Size& rSize ); - void SetClipPath( const PolyPolygon& rPolyPoly, sal_Int32 nClippingMode, sal_Bool bIsMapped ); - void UpdateClipRegion(); - void AddFromGDIMetaFile( GDIMetaFile& rGDIMetaFile ); - - WinMtfOutput( GDIMetaFile& rGDIMetaFile ); - virtual ~WinMtfOutput(); -}; - -// ----------------------------------------------------------------------------- - -class WinMtf -{ - protected: - - WinMtfOutput* pOut; // - SvStream* pWMF; // Die einzulesende WMF/EMF-Datei - - UINT32 nStartPos, nEndPos; - List aBmpSaveList; - - FilterConfigItem* pFilterConfigItem; - - com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator; - - // Sorgt dafuer, das aSampledBrush der aktuelle Brush des GDIMetaFiles ist. - - Color ReadColor(); - void Callback( USHORT nPercent ); - - WinMtf( WinMtfOutput* pOut, SvStream& rStreamWMF, FilterConfigItem* pConfigItem = NULL ); - ~WinMtf(); - - public: - -}; - -//============================ EMFReader ================================== - -class EnhWMFReader : public WinMtf -{ - sal_Bool bRecordPath; - sal_Int32 nRecordCount; - - BOOL ReadHeader(); - Rectangle ReadRectangle( INT32, INT32, INT32, INT32 ); // Liesst und konvertiert ein Rechteck - void ImplExtTextOut( BOOL bWideCharakter ); - -public: - EnhWMFReader( SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = NULL ) - : WinMtf( new WinMtfOutput( rGDIMetaFile ), rStreamWMF, pConfigItem ), bRecordPath( sal_False ) {}; - ~EnhWMFReader(); - - BOOL ReadEnhWMF(); -}; - -//============================ WMFReader ================================== - -class WMFReader : public WinMtf -{ -private: - - VirtualDevice aVDev; // just for the purpose of "IsFontAvailable" - UINT16 nUnitsPerInch; - sal_uInt32 nRecSize; - - // embedded EMF data - SvMemoryStream* pEMFStream; - - // total number of comment records containing EMF data - sal_uInt32 nEMFRecCount; - - // number of EMF records read - sal_uInt32 nEMFRec; - - // total size of embedded EMF data - sal_uInt32 nEMFSize; - - sal_uInt32 nSkipActions; - sal_uInt32 nCurrentAction; - sal_uInt32 nUnicodeEscapeAction; - - // Liesst den Kopf der WMF-Datei - BOOL ReadHeader(); - - // Liesst die Parameter des Rocords mit der Funktionsnummer nFunction. - void ReadRecordParams( USHORT nFunction ); - - Point ReadPoint(); // Liesst und konvertiert einen Punkt (erst X dann Y) - Point ReadYX(); // Liesst und konvertiert einen Punkt (erst Y dann X) - Rectangle ReadRectangle(); // Liesst und konvertiert ein Rechteck - Size ReadYXExt(); - sal_Bool GetPlaceableBound( Rectangle& rSize, SvStream* pStrm ); - -public: - - WMFReader( SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = NULL ) - : WinMtf( new WinMtfOutput( rGDIMetaFile ), rStreamWMF, pConfigItem ) {}; - - ~WMFReader(); - - // Liesst aus dem Stream eine WMF-Datei und fuellt das GDIMetaFile - void ReadWMF(); -}; - -#endif - - diff --git a/svtools/source/filter.vcl/wmf/winwmf.cxx b/svtools/source/filter.vcl/wmf/winwmf.cxx deleted file mode 100644 index cea1ab490b04..000000000000 --- a/svtools/source/filter.vcl/wmf/winwmf.cxx +++ /dev/null @@ -1,1431 +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_svtools.hxx" - -#include "winmtf.hxx" -#include -#include -#include -#include - -//====================== MS-Windows-defines =============================== - -#define W_META_SETBKCOLOR 0x0201 -#define W_META_SETBKMODE 0x0102 -#define W_META_SETMAPMODE 0x0103 -#define W_META_SETROP2 0x0104 -#define W_META_SETRELABS 0x0105 -#define W_META_SETPOLYFILLMODE 0x0106 -#define W_META_SETSTRETCHBLTMODE 0x0107 -#define W_META_SETTEXTCHAREXTRA 0x0108 -#define W_META_SETTEXTCOLOR 0x0209 -#define W_META_SETTEXTJUSTIFICATION 0x020A -#define W_META_SETWINDOWORG 0x020B -#define W_META_SETWINDOWEXT 0x020C -#define W_META_SETVIEWPORTORG 0x020D -#define W_META_SETVIEWPORTEXT 0x020E -#define W_META_OFFSETWINDOWORG 0x020F -#define W_META_SCALEWINDOWEXT 0x0410 -#define W_META_OFFSETVIEWPORTORG 0x0211 -#define W_META_SCALEVIEWPORTEXT 0x0412 -#define W_META_LINETO 0x0213 -#define W_META_MOVETO 0x0214 -#define W_META_EXCLUDECLIPRECT 0x0415 -#define W_META_INTERSECTCLIPRECT 0x0416 -#define W_META_ARC 0x0817 -#define W_META_ELLIPSE 0x0418 -#define W_META_FLOODFILL 0x0419 -#define W_META_PIE 0x081A -#define W_META_RECTANGLE 0x041B -#define W_META_ROUNDRECT 0x061C -#define W_META_PATBLT 0x061D -#define W_META_SAVEDC 0x001E -#define W_META_SETPIXEL 0x041F -#define W_META_OFFSETCLIPRGN 0x0220 -#define W_META_TEXTOUT 0x0521 -#define W_META_BITBLT 0x0922 -#define W_META_STRETCHBLT 0x0B23 -#define W_META_POLYGON 0x0324 -#define W_META_POLYLINE 0x0325 -#define W_META_ESCAPE 0x0626 -#define W_META_RESTOREDC 0x0127 -#define W_META_FILLREGION 0x0228 -#define W_META_FRAMEREGION 0x0429 -#define W_META_INVERTREGION 0x012A -#define W_META_PAINTREGION 0x012B -#define W_META_SELECTCLIPREGION 0x012C -#define W_META_SELECTOBJECT 0x012D -#define W_META_SETTEXTALIGN 0x012E -#define W_META_DRAWTEXT 0x062F -#define W_META_CHORD 0x0830 -#define W_META_SETMAPPERFLAGS 0x0231 -#define W_META_EXTTEXTOUT 0x0a32 -#define W_META_SETDIBTODEV 0x0d33 -#define W_META_SELECTPALETTE 0x0234 -#define W_META_REALIZEPALETTE 0x0035 -#define W_META_ANIMATEPALETTE 0x0436 -#define W_META_SETPALENTRIES 0x0037 -#define W_META_POLYPOLYGON 0x0538 -#define W_META_RESIZEPALETTE 0x0139 -#define W_META_DIBBITBLT 0x0940 -#define W_META_DIBSTRETCHBLT 0x0b41 -#define W_META_DIBCREATEPATTERNBRUSH 0x0142 -#define W_META_STRETCHDIB 0x0f43 -#define W_META_EXTFLOODFILL 0x0548 -#define W_META_RESETDC 0x014C -#define W_META_STARTDOC 0x014D -#define W_META_STARTPAGE 0x004F -#define W_META_ENDPAGE 0x0050 -#define W_META_ABORTDOC 0x0052 -#define W_META_ENDDOC 0x005E -#define W_META_DELETEOBJECT 0x01f0 -#define W_META_CREATEPALETTE 0x00f7 -#define W_META_CREATEBRUSH 0x00F8 -#define W_META_CREATEPATTERNBRUSH 0x01F9 -#define W_META_CREATEPENINDIRECT 0x02FA -#define W_META_CREATEFONTINDIRECT 0x02FB -#define W_META_CREATEBRUSHINDIRECT 0x02FC -#define W_META_CREATEBITMAPINDIRECT 0x02FD -#define W_META_CREATEBITMAP 0x06FE -#define W_META_CREATEREGION 0x06FF - -//=================== Methoden von WMFReader ============================== - -inline Point WMFReader::ReadPoint() -{ - short nX, nY; - *pWMF >> nX >> nY; - return Point( nX, nY ); -} - -// ------------------------------------------------------------------------ - -inline Point WMFReader::ReadYX() -{ - short nX, nY; - *pWMF >> nY >> nX; - return Point( nX, nY ); -} - -// ------------------------------------------------------------------------ - -Rectangle WMFReader::ReadRectangle() -{ - Point aBR, aTL; - aBR = ReadYX(); - aTL = ReadYX(); - aBR.X()--; - aBR.Y()--; - return Rectangle( aTL, aBR ); -} - -// ------------------------------------------------------------------------ - -Size WMFReader::ReadYXExt() -{ - short nW, nH; - *pWMF >> nH >> nW; - return Size( nW, nH ); -} - -// ------------------------------------------------------------------------ - -void WMFReader::ReadRecordParams( USHORT nFunc ) -{ - switch( nFunc ) - { - case W_META_SETBKCOLOR: - { - pOut->SetBkColor( ReadColor() ); - } - break; - - case W_META_SETBKMODE: - { - USHORT nDat; - *pWMF >> nDat; - pOut->SetBkMode( nDat ); - } - break; - - // !!! - case W_META_SETMAPMODE: - { - sal_Int16 nMapMode; - *pWMF >> nMapMode; - pOut->SetMapMode( nMapMode ); - } - break; - - case W_META_SETROP2: - { - UINT16 nROP2; - *pWMF >> nROP2; - pOut->SetRasterOp( nROP2 ); - } - break; - - case W_META_SETTEXTCOLOR: - { - pOut->SetTextColor( ReadColor() ); - } - break; - - case W_META_SETWINDOWORG: - { - pOut->SetWinOrg( ReadYX() ); - } - break; - - case W_META_SETWINDOWEXT: - { - short nWidth, nHeight; - *pWMF >> nHeight >> nWidth; - pOut->SetWinExt( Size( nWidth, nHeight ) ); - } - break; - - case W_META_OFFSETWINDOWORG: - { - short nXAdd, nYAdd; - *pWMF >> nYAdd >> nXAdd; - pOut->SetWinOrgOffset( nXAdd, nYAdd ); - } - break; - - case W_META_SCALEWINDOWEXT: - { - short nXNum, nXDenom, nYNum, nYDenom; - *pWMF >> nYDenom >> nYNum >> nXDenom >> nXNum; - pOut->ScaleWinExt( (double)nXNum / nXDenom, (double)nYNum / nYDenom ); - } - break; - - case W_META_SETVIEWPORTORG: - case W_META_SETVIEWPORTEXT: - break; - - case W_META_OFFSETVIEWPORTORG: - { - short nXAdd, nYAdd; - *pWMF >> nYAdd >> nXAdd; - pOut->SetDevOrgOffset( nXAdd, nYAdd ); - } - break; - - case W_META_SCALEVIEWPORTEXT: - { - short nXNum, nXDenom, nYNum, nYDenom; - *pWMF >> nYDenom >> nYNum >> nXDenom >> nXNum; - pOut->ScaleDevExt( (double)nXNum / nXDenom, (double)nYNum / nYDenom ); - } - break; - - case W_META_LINETO: - { - pOut->LineTo( ReadYX() ); - } - break; - - case W_META_MOVETO: - { - pOut->MoveTo( ReadYX() ); - } - break; - - case W_META_INTERSECTCLIPRECT: - { - pOut->IntersectClipRect( ReadRectangle() ); - } - break; - - case W_META_RECTANGLE: - { - pOut->DrawRect( ReadRectangle() ); - } - break; - - case W_META_ROUNDRECT: - { - Size aSize( ReadYXExt() ); - pOut->DrawRoundRect( ReadRectangle(), Size( aSize.Width() / 2, aSize.Height() / 2 ) ); - } - break; - - case W_META_ELLIPSE: - { - pOut->DrawEllipse( ReadRectangle() ); - } - break; - - case W_META_ARC: - { - Point aEnd( ReadYX() ); - Point aStart( ReadYX() ); - Rectangle aRect( ReadRectangle() ); - aRect.Justify(); - pOut->DrawArc( aRect, aStart, aEnd ); - } - break; - - case W_META_PIE: - { - Point aEnd( ReadYX() ); - Point aStart( ReadYX() ); - Rectangle aRect( ReadRectangle() ); - aRect.Justify(); - - // #i73608# OutputDevice deviates from WMF - // semantics. start==end means full ellipse here. - if( aStart == aEnd ) - pOut->DrawEllipse( aRect ); - else - pOut->DrawPie( aRect, aStart, aEnd ); - } - break; - - case W_META_CHORD: - { - Point aEnd( ReadYX() ); - Point aStart( ReadYX() ); - Rectangle aRect( ReadRectangle() ); - aRect.Justify(); - pOut->DrawChord( aRect, aStart, aEnd ); - } - break; - - case W_META_POLYGON: - { - USHORT i,nPoints; - *pWMF >> nPoints; - Polygon aPoly( nPoints ); - for( i = 0; i < nPoints; i++ ) - aPoly[ i ] = ReadPoint(); - pOut->DrawPolygon( aPoly ); - } - break; - - case W_META_POLYPOLYGON: - { - USHORT i, nPoly, nPoints; - USHORT* pnPoints; - Point* pPtAry; - // Anzahl der Polygone: - *pWMF >> nPoly; - // Anzahl der Punkte eines jeden Polygons holen, Gesammtzahl der Punkte ermitteln: - pnPoints = new USHORT[ nPoly ]; - nPoints = 0; - for( i = 0; i < nPoly; i++ ) - { - *pWMF >> pnPoints[i]; - nPoints = nPoints + pnPoints[i]; - } - // Polygonpunkte holen: - pPtAry = (Point*) new char[ nPoints * sizeof(Point) ]; - for ( i = 0; i < nPoints; i++ ) - pPtAry[ i ] = ReadPoint(); - // PolyPolygon Actions erzeugen - PolyPolygon aPolyPoly( nPoly, pnPoints, pPtAry ); - pOut->DrawPolyPolygon( aPolyPoly ); - delete[] (char*) pPtAry; - delete[] pnPoints; - } - break; - - case W_META_POLYLINE: - { - USHORT i,nPoints; - *pWMF >> nPoints; - Polygon aPoly( nPoints ); - for( i = 0; i < nPoints; i++ ) - aPoly[ i ] = ReadPoint(); - pOut->DrawPolyLine( aPoly ); - } - break; - - case W_META_SAVEDC: - { - pOut->Push(); - } - break; - - case W_META_RESTOREDC: - { - pOut->Pop(); - } - break; - - case W_META_SETPIXEL: - { - const Color aColor = ReadColor(); - pOut->DrawPixel( ReadYX(), aColor ); - } - break; - - case W_META_OFFSETCLIPRGN: - { - pOut->MoveClipRegion( ReadYXExt() ); - } - break; - - case W_META_TEXTOUT: - { - USHORT nLength; - *pWMF >> nLength; - if ( nLength ) - { - char* pChar = new char[ ( nLength + 1 ) &~ 1 ]; - pWMF->Read( pChar, ( nLength + 1 ) &~ 1 ); - String aText( pChar, nLength, pOut->GetCharSet() ); - delete[] pChar; - Point aPosition( ReadYX() ); - pOut->DrawText( aPosition, aText ); - } - } - break; - - case W_META_EXTTEXTOUT: - { - sal_Int16 nDx, nDxTmp; - sal_uInt16 i, nLen, nOptions; - sal_Int32 nRecordPos, nRecordSize, nOriginalTextLen, nNewTextLen; - Point aPosition; - Rectangle aRect; - sal_Int32* pDXAry = NULL; - - pWMF->SeekRel(-6); - nRecordPos = pWMF->Tell(); - *pWMF >> nRecordSize; - pWMF->SeekRel(2); - aPosition = ReadYX(); - *pWMF >> nLen >> nOptions; - - sal_Int32 nTextLayoutMode = TEXT_LAYOUT_DEFAULT; - if ( nOptions & ETO_RTLREADING ) - nTextLayoutMode = TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT; - pOut->SetTextLayoutMode( nTextLayoutMode ); - DBG_ASSERT( ( nOptions & ( ETO_PDY | ETO_GLYPH_INDEX ) ) == 0, "SJ: ETO_PDY || ETO_GLYPH_INDEX in WMF" ); - - // Nur wenn der Text auch Zeichen enthaelt, macht die Ausgabe Sinn - if( nLen ) - { - nOriginalTextLen = nLen; - if( nOptions & ETO_CLIPPED ) - { - const Point aPt1( ReadPoint() ); - const Point aPt2( ReadPoint() ); - aRect = Rectangle( aPt1, aPt2 ); - } - char* pChar = new char[ ( nOriginalTextLen + 1 ) &~ 1 ]; - pWMF->Read( pChar, ( nOriginalTextLen + 1 ) &~ 1 ); - String aText( pChar, (sal_uInt16)nOriginalTextLen, pOut->GetCharSet() );// after this conversion the text may contain - nNewTextLen = aText.Len(); // less character (japanese version), so the - delete[] pChar; // dxAry will not fit - - if ( nNewTextLen ) - { - sal_uInt32 nMaxStreamPos = nRecordPos + ( nRecordSize << 1 ); - sal_Int32 nDxArySize = nMaxStreamPos - pWMF->Tell(); - sal_Int32 nDxAryEntries = nDxArySize >> 1; - sal_Bool bUseDXAry = FALSE; - - if ( ( ( nDxAryEntries % nOriginalTextLen ) == 0 ) && ( nNewTextLen <= nOriginalTextLen ) ) - { - pDXAry = new sal_Int32[ nNewTextLen ]; - for ( i = 0; i < nNewTextLen; i++ ) - { - if ( pWMF->Tell() >= nMaxStreamPos ) - break; - *pWMF >> nDx; - if ( nNewTextLen != nOriginalTextLen ) - { - ByteString aTmp( aText.GetChar( i ), pOut->GetCharSet() ); - if ( aTmp.Len() > 1 ) - { - sal_Int32 nDxCount = aTmp.Len() - 1; - if ( ( ( nDxCount * 2 ) + pWMF->Tell() ) > nMaxStreamPos ) - break; - while ( nDxCount-- ) - { - *pWMF >> nDxTmp; - nDx = nDx + nDxTmp; - } - } - } - pDXAry[ i ] = nDx; - } - if ( i == nNewTextLen ) - bUseDXAry = TRUE; - } - if ( pDXAry && bUseDXAry ) - pOut->DrawText( aPosition, aText, pDXAry ); - else - pOut->DrawText( aPosition, aText ); - } - } - delete[] pDXAry; - - } - break; - - case W_META_SELECTOBJECT: - { - INT16 nObjIndex; - *pWMF >> nObjIndex; - pOut->SelectObject( nObjIndex ); - } - break; - - case W_META_SETTEXTALIGN: - { - UINT16 nAlign; - *pWMF >> nAlign; - pOut->SetTextAlign( nAlign ); - } - break; - - case W_META_BITBLT: - { - // 0-3 : nWinROP #93454# - // 4-5 : y offset of source bitmap - // 6-7 : x offset of source bitmap - // 8-9 : used height of source bitmap - // 10-11 : used width of source bitmap - // 12-13 : destination position y (in pixel) - // 14-15 : destination position x (in pixel) - // 16-17 : dont know - // 18-19 : Width Bitmap in Pixel - // 20-21 : Height Bitmap in Pixel - // 22-23 : bytes per scanline - // 24 : planes - // 25 : bitcount - - sal_Int32 nWinROP; - sal_uInt16 nSx, nSy, nSxe, nSye, nDontKnow, nWidth, nHeight, nBytesPerScan; - sal_uInt8 nPlanes, nBitCount; - - *pWMF >> nWinROP - >> nSy >> nSx >> nSye >> nSxe; - Point aPoint( ReadYX() ); - *pWMF >> nDontKnow >> nWidth >> nHeight >> nBytesPerScan >> nPlanes >> nBitCount; - - if ( nWidth && nHeight && ( nPlanes == 1 ) && ( nBitCount == 1 ) ) - { - Bitmap aBmp( Size( nWidth, nHeight ), nBitCount ); - BitmapWriteAccess* pAcc; - pAcc = aBmp.AcquireWriteAccess(); - if ( pAcc ) - { - sal_uInt16 y, x, scan; - sal_Int8 i, nEightPixels; - for ( y = 0; y < nHeight; y++ ) - { - x = 0; - for ( scan = 0; scan < nBytesPerScan; scan++ ) - { - *pWMF >> nEightPixels; - for ( i = 7; i >= 0; i-- ) - { - if ( x < nWidth ) - { - pAcc->SetPixel( y, x, (nEightPixels>>i)&1 ); - } - x++; - } - } - } - aBmp.ReleaseAccess( pAcc ); - if ( nSye && nSxe && - ( ( nSx + nSxe ) <= aBmp.GetSizePixel().Width() ) && - ( ( nSy + nSye <= aBmp.GetSizePixel().Height() ) ) ) - { - Rectangle aCropRect( Point( nSx, nSy ), Size( nSxe, nSye ) ); - aBmp.Crop( aCropRect ); - } - Rectangle aDestRect( aPoint, Size( nSxe, nSye ) ); - aBmpSaveList.Insert( new BSaveStruct( aBmp, aDestRect, nWinROP ), LIST_APPEND ); - } - } - } - break; - - case W_META_STRETCHBLT: - case W_META_DIBBITBLT: - case W_META_DIBSTRETCHBLT: - case W_META_STRETCHDIB: - { - sal_Int32 nWinROP; - sal_uInt16 nSx, nSy, nSxe, nSye, nUsage; - Bitmap aBmp; - - *pWMF >> nWinROP; - - if( nFunc == W_META_STRETCHDIB ) - *pWMF >> nUsage; - - // nSye and nSxe is the number of pixels that has to been used - if( nFunc == W_META_STRETCHDIB || nFunc == W_META_STRETCHBLT || nFunc == W_META_DIBSTRETCHBLT ) - *pWMF >> nSye >> nSxe; - else - nSye = nSxe = 0; // set this to zero as indicator not to scale the bitmap later - - // nSy and nx is the offset of the first pixel - *pWMF >> nSy >> nSx; - - if( nFunc == W_META_STRETCHDIB || nFunc == W_META_DIBBITBLT || nFunc == W_META_DIBSTRETCHBLT ) - { - if ( nWinROP == PATCOPY ) - *pWMF >> nUsage; // i don't know anything of this parameter, so its called nUsage - // pOut->DrawRect( Rectangle( ReadYX(), aDestSize ), FALSE ); - - Size aDestSize( ReadYXExt() ); - if ( aDestSize.Width() && aDestSize.Height() ) // #92623# do not try to read buggy bitmaps - { - Rectangle aDestRect( ReadYX(), aDestSize ); - if ( nWinROP != PATCOPY ) - aBmp.Read( *pWMF, FALSE ); - - // test if it is sensible to crop - if ( nSye && nSxe && - ( ( nSx + nSxe ) <= aBmp.GetSizePixel().Width() ) && - ( ( nSy + nSye <= aBmp.GetSizePixel().Height() ) ) ) - { - Rectangle aCropRect( Point( nSx, nSy ), Size( nSxe, nSye ) ); - aBmp.Crop( aCropRect ); - } - aBmpSaveList.Insert( new BSaveStruct( aBmp, aDestRect, nWinROP ), LIST_APPEND ); - } - } - } - break; - - case W_META_DIBCREATEPATTERNBRUSH: - { - Bitmap aBmp; - BitmapReadAccess* pBmp; - UINT32 nRed = 0, nGreen = 0, nBlue = 0, nCount = 1; - UINT16 nFunction; - - *pWMF >> nFunction >> nFunction; - - aBmp.Read( *pWMF, FALSE ); - pBmp = aBmp.AcquireReadAccess(); - if ( pBmp ) - { - for ( INT32 y = 0; y < pBmp->Height(); y++ ) - { - for ( INT32 x = 0; x < pBmp->Width(); x++ ) - { - const BitmapColor aColor( pBmp->GetColor( y, x ) ); - - nRed += aColor.GetRed(); - nGreen += aColor.GetGreen(); - nBlue += aColor.GetBlue(); - } - } - nCount = pBmp->Height() * pBmp->Width(); - if ( !nCount ) - nCount++; - aBmp.ReleaseAccess( pBmp ); - } - Color aColor( (BYTE)( nRed / nCount ), (BYTE)( nGreen / nCount ), (BYTE)( nBlue / nCount ) ); - pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( aColor, FALSE ) ); - } - break; - - case W_META_DELETEOBJECT: - { - INT16 nIndex; - *pWMF >> nIndex; - pOut->DeleteObject( nIndex ); - } - break; - - case W_META_CREATEPALETTE: - { - pOut->CreateObject( GDI_DUMMY ); - } - break; - - case W_META_CREATEBRUSH: - { - pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( Color( COL_WHITE ), FALSE ) ); - } - break; - - case W_META_CREATEPATTERNBRUSH: - { - pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( Color( COL_WHITE ), FALSE ) ); - } - break; - - case W_META_CREATEPENINDIRECT: - { - LineInfo aLineInfo; - USHORT nStyle, nWidth, nHeight; - - *pWMF >> nStyle >> nWidth >> nHeight; - - if ( nWidth ) - aLineInfo.SetWidth( nWidth ); - - BOOL bTransparent = FALSE; - UINT16 nDashCount = 0; - UINT16 nDotCount = 0; - switch( nStyle ) - { - case PS_DASHDOTDOT : - nDotCount++; - case PS_DASHDOT : - nDashCount++; - case PS_DOT : - nDotCount++; - break; - case PS_DASH : - nDashCount++; - break; - case PS_NULL : - bTransparent = TRUE; - aLineInfo.SetStyle( LINE_NONE ); - break; - default : - case PS_INSIDEFRAME : - case PS_SOLID : - aLineInfo.SetStyle( LINE_SOLID ); - } - if ( nDashCount | nDotCount ) - { - aLineInfo.SetStyle( LINE_DASH ); - aLineInfo.SetDashCount( nDashCount ); - aLineInfo.SetDotCount( nDotCount ); - } - pOut->CreateObject( GDI_PEN, new WinMtfLineStyle( ReadColor(), aLineInfo, bTransparent ) ); - } - break; - - case W_META_CREATEBRUSHINDIRECT: - { - USHORT nStyle; - *pWMF >> nStyle; - pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? TRUE : FALSE ) ); - } - break; - - case W_META_CREATEFONTINDIRECT: - { - Size aFontSize; - char lfFaceName[ LF_FACESIZE ]; - INT16 lfEscapement, lfOrientation, lfWeight; // ( ehemals USHORT ) - - LOGFONTW aLogFont; - aFontSize = ReadYXExt(); - *pWMF >> lfEscapement >> lfOrientation >> lfWeight - >> aLogFont.lfItalic >> aLogFont.lfUnderline >> aLogFont.lfStrikeOut >> aLogFont.lfCharSet >> aLogFont.lfOutPrecision - >> aLogFont.lfClipPrecision >> aLogFont.lfQuality >> aLogFont.lfPitchAndFamily; - pWMF->Read( lfFaceName, LF_FACESIZE ); - aLogFont.lfWidth = aFontSize.Width(); - aLogFont.lfHeight = aFontSize.Height(); - aLogFont.lfEscapement = lfEscapement; - aLogFont.lfOrientation = lfOrientation; - aLogFont.lfWeight = lfWeight; - - CharSet eCharSet; - if ( ( aLogFont.lfCharSet == OEM_CHARSET ) || ( aLogFont.lfCharSet == DEFAULT_CHARSET ) ) - eCharSet = gsl_getSystemTextEncoding(); - else - eCharSet = rtl_getTextEncodingFromWindowsCharset( aLogFont.lfCharSet ); - if ( eCharSet == RTL_TEXTENCODING_DONTKNOW ) - eCharSet = gsl_getSystemTextEncoding(); - if ( eCharSet == RTL_TEXTENCODING_SYMBOL ) - eCharSet = RTL_TEXTENCODING_MS_1252; - aLogFont.alfFaceName = UniString( lfFaceName, eCharSet ); - - pOut->CreateObject( GDI_FONT, new WinMtfFontStyle( aLogFont ) ); - } - break; - - case W_META_CREATEBITMAPINDIRECT: - { - pOut->CreateObject( GDI_DUMMY ); - } - break; - - case W_META_CREATEBITMAP: - { - pOut->CreateObject( GDI_DUMMY ); - } - break; - - case W_META_CREATEREGION: - { - pOut->CreateObject( GDI_DUMMY ); - } - break; - - case W_META_EXCLUDECLIPRECT : - { - pOut->ExcludeClipRect( ReadRectangle() ); - } - break; - - case W_META_PATBLT: - { - UINT32 nROP, nOldROP; - *pWMF >> nROP; - Size aSize = ReadYXExt(); - nOldROP = pOut->SetRasterOp( nROP ); - pOut->DrawRect( Rectangle( ReadYX(), aSize ), FALSE ); - pOut->SetRasterOp( nOldROP ); - } - break; - - case W_META_SELECTCLIPREGION: - { - sal_Int16 nObjIndex; - *pWMF >> nObjIndex; - if ( !nObjIndex ) - { - PolyPolygon aEmptyPolyPoly; - pOut->SetClipPath( aEmptyPolyPoly, RGN_COPY, sal_True ); - } - } - break; - - case W_META_ESCAPE : - { - // nRecSize has been checked previously to be greater than 3 - sal_uInt64 nMetaRecSize = static_cast< sal_uInt64 >( nRecSize - 2 ) * 2; - sal_uInt64 nMetaRecEndPos = pWMF->Tell() + nMetaRecSize; - - // taking care that nRecSize does not exceed the maximal stream position - if ( nMetaRecEndPos > nEndPos ) - { - pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR ); - break; - } - if ( nRecSize >= 4 ) // minimal escape lenght - { - sal_uInt16 nMode, nLen; - *pWMF >> nMode - >> nLen; - if ( ( nMode == W_MFCOMMENT ) && ( nLen >= 4 ) ) - { - sal_uInt32 nNewMagic; // we have to read int32 for - *pWMF >> nNewMagic; // META_ESCAPE_ENHANCED_METAFILE CommentIdentifier - - if( nNewMagic == 0x2c2a4f4f && nLen >= 14 ) - { - sal_uInt16 nMagic2; - *pWMF >> nMagic2; - if( nMagic2 == 0x0a ) // 2nd half of magic - { // continue with private escape - sal_uInt32 nCheck, nEsc; - *pWMF >> nCheck - >> nEsc; - - sal_uInt32 nEscLen = nLen - 14; - if ( nEscLen <= ( nRecSize * 2 ) ) - { -#ifdef OSL_BIGENDIAN - sal_uInt32 nTmp = SWAPLONG( nEsc ); - sal_uInt32 nCheckSum = rtl_crc32( 0, &nTmp, 4 ); -#else - sal_uInt32 nCheckSum = rtl_crc32( 0, &nEsc, 4 ); -#endif - sal_Int8* pData = NULL; - - if ( ( static_cast< sal_uInt64 >( nEscLen ) + pWMF->Tell() ) > nMetaRecEndPos ) - { - pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR ); - break; - } - if ( nEscLen > 0 ) - { - pData = new sal_Int8[ nEscLen ]; - pWMF->Read( pData, nEscLen ); - nCheckSum = rtl_crc32( nCheckSum, pData, nEscLen ); - } - if ( nCheck == nCheckSum ) - { - switch( nEsc ) - { - case PRIVATE_ESCAPE_UNICODE : - { // we will use text instead of polygons only if we have the correct font - if ( aVDev.IsFontAvailable( pOut->GetFont().GetName() ) ) - { - Point aPt; - String aString; - sal_uInt32 i, nStringLen, nDXCount; - sal_Int32* pDXAry = NULL; - SvMemoryStream aMemoryStream( nEscLen ); - aMemoryStream.Write( pData, nEscLen ); - aMemoryStream.Seek( STREAM_SEEK_TO_BEGIN ); - aMemoryStream >> aPt.X() - >> aPt.Y() - >> nStringLen; - - if ( ( static_cast< sal_uInt64 >( nStringLen ) * sizeof( sal_Unicode ) ) < ( nEscLen - aMemoryStream.Tell() ) ) - { - sal_Unicode* pBuf = aString.AllocBuffer( (xub_StrLen)nStringLen ); - for ( i = 0; i < nStringLen; i++ ) - aMemoryStream >> pBuf[ i ]; - aMemoryStream >> nDXCount; - if ( ( static_cast< sal_uInt64 >( nDXCount ) * sizeof( sal_Int32 ) ) >= ( nEscLen - aMemoryStream.Tell() ) ) - nDXCount = 0; - if ( nDXCount ) - pDXAry = new sal_Int32[ nDXCount ]; - for ( i = 0; i < nDXCount; i++ ) - aMemoryStream >> pDXAry[ i ]; - aMemoryStream >> nSkipActions; - pOut->DrawText( aPt, aString, pDXAry ); - delete[] pDXAry; - } - } - } - break; - } - } - delete[] pData; - } - } - } - else if ( (nNewMagic == static_cast< sal_uInt32 >(0x43464D57)) && (nLen >= 34) && ( (sal_Int32)(nLen + 10) <= (sal_Int32)(nRecSize * 2) )) - { - sal_uInt32 nComType, nVersion, nFlags, nComRecCount, - nCurRecSize, nRemainingSize, nEMFTotalSize; - sal_uInt16 nCheck; - - *pWMF >> nComType >> nVersion >> nCheck >> nFlags - >> nComRecCount >> nCurRecSize - >> nRemainingSize >> nEMFTotalSize; // the nRemainingSize is not mentioned in MSDN documentation - // but it seems to be required to read in data produced by OLE - - if( nComType == 0x01 && nVersion == 0x10000 && nComRecCount ) - { - if( !nEMFRec ) - { // first EMF comment - nEMFRecCount = nComRecCount; - nEMFSize = nEMFTotalSize; - pEMFStream = new SvMemoryStream( nEMFSize ); - } - else if( ( nEMFRecCount != nComRecCount ) || ( nEMFSize != nEMFTotalSize ) ) // add additional checks here - { - // total records should be the same as in previous comments - nEMFRecCount = 0xFFFFFFFF; - delete pEMFStream; - pEMFStream = NULL; - } - nEMFRec++; - - if( pEMFStream && nCurRecSize + 34 > nLen ) - { - nEMFRecCount = 0xFFFFFFFF; - delete pEMFStream; - pEMFStream = NULL; - } - - if( pEMFStream ) - { - sal_Int8* pBuf = new sal_Int8[ nCurRecSize ]; - sal_uInt32 nCount = pWMF->Read( pBuf, nCurRecSize ); - if( nCount == nCurRecSize ) - pEMFStream->Write( pBuf, nCount ); - delete[] pBuf; - } - } - } - } - } - } - break; - - case W_META_SETRELABS: - case W_META_SETPOLYFILLMODE: - case W_META_SETSTRETCHBLTMODE: - case W_META_SETTEXTCHAREXTRA: - case W_META_SETTEXTJUSTIFICATION: - case W_META_FLOODFILL : - case W_META_FILLREGION: - case W_META_FRAMEREGION: - case W_META_INVERTREGION: - case W_META_PAINTREGION: - case W_META_DRAWTEXT: - case W_META_SETMAPPERFLAGS: - case W_META_SETDIBTODEV: - case W_META_SELECTPALETTE: - case W_META_REALIZEPALETTE: - case W_META_ANIMATEPALETTE: - case W_META_SETPALENTRIES: - case W_META_RESIZEPALETTE: - case W_META_EXTFLOODFILL: - case W_META_RESETDC: - case W_META_STARTDOC: - case W_META_STARTPAGE: - case W_META_ENDPAGE: - case W_META_ABORTDOC: - case W_META_ENDDOC: - break; - } -} - -// ------------------------------------------------------------------------ - -BOOL WMFReader::ReadHeader() -{ - Rectangle aPlaceableBound; - sal_uInt32 nl, nStrmPos = pWMF->Tell(); - - // Einlesen des METAFILEHEADER, falls vorhanden - *pWMF >> nl; - - Size aWMFSize; - if ( nl == 0x9ac6cdd7L ) - { - INT16 nVal; - - // hmf (Unused) ueberlesen wir - pWMF->SeekRel(2); - - // BoundRect - *pWMF >> nVal; aPlaceableBound.Left() = nVal; - *pWMF >> nVal; aPlaceableBound.Top() = nVal; - *pWMF >> nVal; aPlaceableBound.Right() = nVal; - *pWMF >> nVal; aPlaceableBound.Bottom() = nVal; - - // inch - *pWMF >> nUnitsPerInch; - - // reserved - pWMF->SeekRel( 4 ); - - // checksum pruefen wir lieber nicht - pWMF->SeekRel( 2 ); - } - else - { - nUnitsPerInch = 96; - pWMF->Seek( nStrmPos + 18 ); // set the streampos to the start of the the metaactions - GetPlaceableBound( aPlaceableBound, pWMF ); - pWMF->Seek( nStrmPos ); - } - - pOut->SetWinOrg( aPlaceableBound.TopLeft() ); - aWMFSize = Size( labs( aPlaceableBound.GetWidth() ), labs( aPlaceableBound.GetHeight() ) ); - pOut->SetWinExt( aWMFSize ); - - Size aDevExt( 10000, 10000 ); - if( ( labs( aWMFSize.Width() ) > 1 ) && ( labs( aWMFSize.Height() ) > 1 ) ) - { - const Fraction aFrac( 1, nUnitsPerInch ); - MapMode aWMFMap( MAP_INCH, Point(), aFrac, aFrac ); - Size aSize100( OutputDevice::LogicToLogic( aWMFSize, aWMFMap, MAP_100TH_MM ) ); - aDevExt = Size( labs( aSize100.Width() ), labs( aSize100.Height() ) ); - } - pOut->SetDevExt( aDevExt ); - - // Einlesen des METAHEADER - *pWMF >> nl; // Typ und Headergroesse - - if( nl != 0x00090001 ) - { - pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR ); - return FALSE; - } - - pWMF->SeekRel( 2 ); // Version (von Windows) - pWMF->SeekRel( 4 ); // Size (der Datei in Words) - pWMF->SeekRel( 2 ); // NoObjects (Maximale Anzahl der gleichzeitigen Objekte) - pWMF->SeekRel( 4 ); // MaxRecord (Groesse des groessten Records in Words) - pWMF->SeekRel( 2 ); // NoParameters (Unused - - return TRUE; -} - -void WMFReader::ReadWMF() -{ - USHORT nFunction; - ULONG nPos, nPercent, nLastPercent; - - nSkipActions = 0; - nCurrentAction = 0; - nUnicodeEscapeAction = 0; - - pEMFStream = NULL; - nEMFRecCount = 0; - nEMFRec = 0; - nEMFSize = 0; - - sal_Bool bEMFAvailable = sal_False; - - pOut->SetMapMode( MM_ANISOTROPIC ); - pOut->SetWinOrg( Point() ); - pOut->SetWinExt( Size( 1, 1 ) ); - pOut->SetDevExt( Size( 10000, 10000 ) ); - - nEndPos=pWMF->Seek( STREAM_SEEK_TO_END ); - pWMF->Seek( nStartPos ); - Callback( (USHORT) ( nLastPercent = 0 ) ); - - if ( ReadHeader() ) - { - - nPos = pWMF->Tell(); - - if( nEndPos - nStartPos ) - { - while( TRUE ) - { - nCurrentAction++; - nPercent = ( nPos - nStartPos ) * 100 / ( nEndPos - nStartPos ); - - if( nLastPercent + 4 <= nPercent ) - { - Callback( (USHORT) nPercent ); - nLastPercent = nPercent; - } - *pWMF >> nRecSize >> nFunction; - - if( pWMF->GetError() || ( nRecSize < 3 ) || ( nRecSize==3 && nFunction==0 ) || pWMF->IsEof() ) - { - - if( pWMF->IsEof() ) - pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR ); - - break; - } - if ( !bEMFAvailable ) - { - if( aBmpSaveList.Count() && - ( nFunction != W_META_STRETCHDIB ) && - ( nFunction != W_META_DIBBITBLT ) && - ( nFunction != W_META_DIBSTRETCHBLT ) ) - { - pOut->ResolveBitmapActions( aBmpSaveList ); - } - if ( !nSkipActions ) - ReadRecordParams( nFunction ); - else - nSkipActions--; - - if( pEMFStream && nEMFRecCount == nEMFRec ) - { - GDIMetaFile aMeta; - pEMFStream->Seek( 0 ); - EnhWMFReader* pEMFReader = new EnhWMFReader ( *pEMFStream, aMeta ); - bEMFAvailable = pEMFReader->ReadEnhWMF(); - delete pEMFReader; // destroy first!!! - - if( bEMFAvailable ) - { - pOut->AddFromGDIMetaFile( aMeta ); - pOut->SetrclFrame( Rectangle(0, 0, aMeta.GetPrefSize().Width(), aMeta.GetPrefSize().Height() )); - - // the stream needs to be set to the wmf end position, - // otherwise the GfxLink that is created will be incorrect - // (leading to graphic loss after swapout/swapin). - // so we will proceed normally, but are ignoring further wmf - // records - } - else - { - // something went wrong - // continue with WMF, don't try this again - delete pEMFStream; - pEMFStream = NULL; - } - } - } - nPos += nRecSize * 2; - if ( nPos <= nEndPos ) - pWMF->Seek( nPos ); - else - pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR ); - } - } - else - pWMF->SetError( SVSTREAM_GENERALERROR ); - - if( !pWMF->GetError() && aBmpSaveList.Count() ) - pOut->ResolveBitmapActions( aBmpSaveList ); - } - if ( pWMF->GetError() ) - pWMF->Seek( nStartPos ); -} - -// ------------------------------------------------------------------------ - -static void GetWinExtMax( const Point& rSource, Rectangle& rPlaceableBound, const sal_Int16 nMapMode ) -{ - Point aSource( rSource ); - if ( nMapMode == MM_HIMETRIC ) - aSource.Y() = -rSource.Y(); - if ( aSource.X() < rPlaceableBound.Left() ) - rPlaceableBound.Left() = aSource.X(); - if ( aSource.X() > rPlaceableBound.Right() ) - rPlaceableBound.Right() = aSource.X(); - if ( aSource.Y() < rPlaceableBound.Top() ) - rPlaceableBound.Top() = aSource.Y(); - if ( aSource.Y() > rPlaceableBound.Bottom() ) - rPlaceableBound.Bottom() = aSource.Y(); -} - -static void GetWinExtMax( const Rectangle& rSource, Rectangle& rPlaceableBound, const sal_Int16 nMapMode ) -{ - GetWinExtMax( rSource.TopLeft(), rPlaceableBound, nMapMode ); - GetWinExtMax( rSource.BottomRight(), rPlaceableBound, nMapMode ); -} - -sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pStm ) -{ - sal_Bool bRet = sal_True; - - rPlaceableBound.Left() = (sal_Int32)0x7fffffff; - rPlaceableBound.Top() = (sal_Int32)0x7fffffff; - rPlaceableBound.Right() = (sal_Int32)0x80000000; - rPlaceableBound.Bottom() = (sal_Int32)0x80000000; - - sal_Int16 nMapMode = MM_ANISOTROPIC; - - sal_uInt16 nFunction; - sal_uInt32 nRSize; - sal_uInt32 nPos = pStm->Tell(); - sal_uInt32 nEnd = pStm->Seek( STREAM_SEEK_TO_END ); - - pStm->Seek( nPos ); - - if( nEnd - nPos ) - { - while( bRet ) - { - *pStm >> nRSize >> nFunction; - - if( pStm->GetError() || ( nRSize < 3 ) || ( nRSize==3 && nFunction==0 ) || pStm->IsEof() ) - { - if( pStm->IsEof() ) - { - pStm->SetError( SVSTREAM_FILEFORMAT_ERROR ); - bRet = sal_False; - } - break; - } - switch( nFunction ) - { - case W_META_SETWINDOWORG: - { - Point aWinOrg; - aWinOrg = ReadYX(); - rPlaceableBound.SetPos( aWinOrg ); - } - break; - - case W_META_SETWINDOWEXT: - { - Point aPos0( 0, 0 ); - sal_Int16 nWidth, nHeight; - *pStm >> nHeight >> nWidth; - rPlaceableBound.SetSize( Size( nWidth, nHeight ) ); - } - break; - - case W_META_SETMAPMODE : - *pStm >> nMapMode; - break; - - case W_META_MOVETO: - case W_META_LINETO: - GetWinExtMax( ReadYX(), rPlaceableBound, nMapMode ); - break; - - case W_META_RECTANGLE: - case W_META_INTERSECTCLIPRECT: - case W_META_EXCLUDECLIPRECT : - case W_META_ELLIPSE: - GetWinExtMax( ReadRectangle(), rPlaceableBound, nMapMode ); - break; - - case W_META_ROUNDRECT: - { - Size aSize( ReadYXExt() ); - GetWinExtMax( ReadRectangle(), rPlaceableBound, nMapMode ); - } - break; - - case W_META_ARC: - case W_META_PIE: - case W_META_CHORD: - { - Point aEnd( ReadYX() ); - Point aStart( ReadYX() ); - GetWinExtMax( ReadRectangle(), rPlaceableBound, nMapMode ); - } - break; - - case W_META_POLYGON: - { - USHORT i,nPoints; - *pStm >> nPoints; - for( i = 0; i < nPoints; i++ ) - GetWinExtMax( ReadPoint(), rPlaceableBound, nMapMode ); - } - break; - - case W_META_POLYPOLYGON: - { - USHORT i, nPoly, nPoints = 0; - *pStm >> nPoly; - for( i = 0; i < nPoly; i++ ) - { - sal_uInt16 nP; - *pStm >> nP; - nPoints = nPoints + nP; - } - for ( i = 0; i < nPoints; i++ ) - GetWinExtMax( ReadPoint(), rPlaceableBound, nMapMode ); - } - break; - - case W_META_POLYLINE: - { - USHORT i,nPoints; - *pStm >> nPoints; - for( i = 0; i < nPoints; i++ ) - GetWinExtMax( ReadPoint(), rPlaceableBound, nMapMode ); - } - break; - - case W_META_SETPIXEL: - { - const Color aColor = ReadColor(); - GetWinExtMax( ReadYX(), rPlaceableBound, nMapMode ); - } - break; - - case W_META_TEXTOUT: - { - USHORT nLength; - *pStm >> nLength; - // todo: we also have to take care of the text width - if ( nLength ) - { - pStm->SeekRel( ( nLength + 1 ) &~ 1 ); - GetWinExtMax( ReadYX(), rPlaceableBound, nMapMode ); - } - } - break; - - case W_META_EXTTEXTOUT: - { - sal_uInt16 nLen, nOptions; - sal_Int32 nRecordPos, nRecordSize; - Point aPosition; - Rectangle aRect; - - pStm->SeekRel(-6); - nRecordPos = pStm->Tell(); - *pStm >> nRecordSize; - pStm->SeekRel(2); - aPosition = ReadYX(); - *pStm >> nLen >> nOptions; - // todo: we also have to take care of the text width - if( nLen ) - GetWinExtMax( aPosition, rPlaceableBound, nMapMode ); - } - break; - case W_META_BITBLT: - case W_META_STRETCHBLT: - case W_META_DIBBITBLT: - case W_META_DIBSTRETCHBLT: - case W_META_STRETCHDIB: - { - sal_Int32 nWinROP; - sal_uInt16 nSx, nSy, nSxe, nSye, nUsage; - *pStm >> nWinROP; - - if( nFunction == W_META_STRETCHDIB ) - *pStm >> nUsage; - - // nSye and nSxe is the number of pixels that has to been used - if( nFunction == W_META_STRETCHDIB || nFunction == W_META_STRETCHBLT || nFunction == W_META_DIBSTRETCHBLT ) - *pStm >> nSye >> nSxe; - else - nSye = nSxe = 0; // set this to zero as indicator not to scale the bitmap later - - // nSy and nx is the offset of the first pixel - *pStm >> nSy >> nSx; - - if( nFunction == W_META_STRETCHDIB || nFunction == W_META_DIBBITBLT || nFunction == W_META_DIBSTRETCHBLT ) - { - if ( nWinROP == PATCOPY ) - *pStm >> nUsage; // i don't know anything of this parameter, so its called nUsage - // pOut->DrawRect( Rectangle( ReadYX(), aDestSize ), FALSE ); - - Size aDestSize( ReadYXExt() ); - if ( aDestSize.Width() && aDestSize.Height() ) // #92623# do not try to read buggy bitmaps - { - Rectangle aDestRect( ReadYX(), aDestSize ); - GetWinExtMax( aDestRect, rPlaceableBound, nMapMode ); - } - } - } - break; - - case W_META_PATBLT: - { - UINT32 nROP; - *pStm >> nROP; - Size aSize = ReadYXExt(); - GetWinExtMax( Rectangle( ReadYX(), aSize ), rPlaceableBound, nMapMode ); - } - break; - } - nPos += nRSize * 2; - if ( nPos <= nEnd ) - pStm->Seek( nPos ); - else - { - pStm->SetError( SVSTREAM_FILEFORMAT_ERROR ); - bRet = sal_False; - } - - } - } - else - { - pStm->SetError( SVSTREAM_GENERALERROR ); - bRet = sal_False; - } - return bRet; -} - -WMFReader::~WMFReader() -{ - if( pEMFStream ) - delete pEMFStream; -} - diff --git a/svtools/source/filter.vcl/wmf/wmf.cxx b/svtools/source/filter.vcl/wmf/wmf.cxx deleted file mode 100644 index 25ca9f721b33..000000000000 --- a/svtools/source/filter.vcl/wmf/wmf.cxx +++ /dev/null @@ -1,114 +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_svtools.hxx" - -#include "winmtf.hxx" -#include "emfwr.hxx" -#include "wmfwr.hxx" -#include - -// ----------------------------------------------------------------------------- - -BOOL ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, FilterConfigItem* pConfigItem ) -{ - UINT32 nMetaType; - UINT32 nOrgPos = rStreamWMF.Tell(); - UINT16 nOrigNumberFormat = rStreamWMF.GetNumberFormatInt(); - rStreamWMF.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); - rStreamWMF.Seek( 0x28 ); - rStreamWMF >> nMetaType; - rStreamWMF.Seek( nOrgPos ); - if ( nMetaType == 0x464d4520 ) - { - if ( EnhWMFReader( rStreamWMF, rGDIMetaFile, pConfigItem ).ReadEnhWMF() == FALSE ) - rStreamWMF.SetError( SVSTREAM_FILEFORMAT_ERROR ); - } - else - { - WMFReader( rStreamWMF, rGDIMetaFile, pConfigItem ).ReadWMF(); - } - rStreamWMF.SetNumberFormatInt( nOrigNumberFormat ); - return !rStreamWMF.GetError(); -} - -// ----------------------------------------------------------------------------- - -BOOL ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pFilterConfigItem ) -{ - UINT32 nMetaType; - UINT32 nOrgPos = rStream.Tell(); - UINT16 nOrigNumberFormat = rStream.GetNumberFormatInt(); - rStream.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); - rStream.Seek( 0x28 ); - rStream >> nMetaType; - rStream.Seek( nOrgPos ); - if ( nMetaType == 0x464d4520 ) - { - if ( EnhWMFReader( rStream, rMTF, NULL ).ReadEnhWMF() == FALSE ) - rStream.SetError( SVSTREAM_FILEFORMAT_ERROR ); - } - else - { - WMFReader( rStream, rMTF, pFilterConfigItem ).ReadWMF(); - } - rStream.SetNumberFormatInt( nOrigNumberFormat ); - return !rStream.GetError(); -} - -// ----------------------------------------------------------------------------- - -BOOL ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, - FilterConfigItem* pConfigItem, BOOL bPlaceable) -{ - WMFWriter aWMFWriter; - return aWMFWriter.WriteWMF( rMTF, rTargetStream, pConfigItem, bPlaceable ); -} - -// ----------------------------------------------------------------------------- - -BOOL ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, - FilterConfigItem* pConfigItem ) -{ - EMFWriter aEMFWriter; - return aEMFWriter.WriteEMF( rMTF, rTargetStream, pConfigItem ); -} - -// ----------------------------------------------------------------------------- - -BOOL WriteWindowMetafile( SvStream& rStream, const GDIMetaFile& rMTF ) -{ - return WMFWriter().WriteWMF( rMTF, rStream, NULL ); -} - -// ----------------------------------------------------------------------------- - -BOOL WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF ) -{ - return WMFWriter().WriteWMF( rMTF, rStream, NULL, FALSE ); -} diff --git a/svtools/source/filter.vcl/wmf/wmfwr.cxx b/svtools/source/filter.vcl/wmf/wmfwr.cxx deleted file mode 100644 index 4dff9732c7d0..000000000000 --- a/svtools/source/filter.vcl/wmf/wmfwr.cxx +++ /dev/null @@ -1,2096 +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_svtools.hxx" - -#include -#include "wmfwr.hxx" -#include -#include "emfwr.hxx" -#include -#include -#include -#include -#ifndef INCLUDED_I18NUTIL_UNICODE_HXX -#include //unicode::getUnicodeScriptType -#endif - -#include -#include -#include - -//====================== MS-Windows-defines =============================== - -#define W_META_SETBKCOLOR 0x0201 -#define W_META_SETBKMODE 0x0102 -#define W_META_SETMAPMODE 0x0103 -#define W_META_SETROP2 0x0104 -#define W_META_SETRELABS 0x0105 -#define W_META_SETPOLYFILLMODE 0x0106 -#define W_META_SETSTRETCHBLTMODE 0x0107 -#define W_META_SETTEXTCHAREXTRA 0x0108 -#define W_META_SETTEXTCOLOR 0x0209 -#define W_META_SETTEXTJUSTIFICATION 0x020A -#define W_META_SETWINDOWORG 0x020B -#define W_META_SETWINDOWEXT 0x020C -#define W_META_SETVIEWPORTORG 0x020D -#define W_META_SETVIEWPORTEXT 0x020E -#define W_META_OFFSETWINDOWORG 0x020F -#define W_META_SCALEWINDOWEXT 0x0410 -#define W_META_OFFSETVIEWPORTORG 0x0211 -#define W_META_SCALEVIEWPORTEXT 0x0412 -#define W_META_LINETO 0x0213 -#define W_META_MOVETO 0x0214 -#define W_META_EXCLUDECLIPRECT 0x0415 -#define W_META_INTERSECTCLIPRECT 0x0416 -#define W_META_ARC 0x0817 -#define W_META_ELLIPSE 0x0418 -#define W_META_FLOODFILL 0x0419 -#define W_META_PIE 0x081A -#define W_META_RECTANGLE 0x041B -#define W_META_ROUNDRECT 0x061C -#define W_META_PATBLT 0x061D -#define W_META_SAVEDC 0x001E -#define W_META_SETPIXEL 0x041F -#define W_META_OFFSETCLIPRGN 0x0220 -#define W_META_TEXTOUT 0x0521 -#define W_META_BITBLT 0x0922 -#define W_META_STRETCHBLT 0x0B23 -#define W_META_POLYGON 0x0324 -#define W_META_POLYLINE 0x0325 -#define W_META_ESCAPE 0x0626 -#define W_META_RESTOREDC 0x0127 -#define W_META_FILLREGION 0x0228 -#define W_META_FRAMEREGION 0x0429 -#define W_META_INVERTREGION 0x012A -#define W_META_PAINTREGION 0x012B -#define W_META_SELECTCLIPREGION 0x012C -#define W_META_SELECTOBJECT 0x012D -#define W_META_SETTEXTALIGN 0x012E -#define W_META_DRAWTEXT 0x062F -#define W_META_CHORD 0x0830 -#define W_META_SETMAPPERFLAGS 0x0231 -#define W_META_EXTTEXTOUT 0x0a32 -#define W_META_SETDIBTODEV 0x0d33 -#define W_META_SELECTPALETTE 0x0234 -#define W_META_REALIZEPALETTE 0x0035 -#define W_META_ANIMATEPALETTE 0x0436 -#define W_META_SETPALENTRIES 0x0037 -#define W_META_POLYPOLYGON 0x0538 -#define W_META_RESIZEPALETTE 0x0139 -#define W_META_DIBBITBLT 0x0940 -#define W_META_DIBSTRETCHBLT 0x0b41 -#define W_META_DIBCREATEPATTERNBRUSH 0x0142 -#define W_META_STRETCHDIB 0x0f43 -#define W_META_EXTFLOODFILL 0x0548 -#define W_META_RESETDC 0x014C -#define W_META_STARTDOC 0x014D -#define W_META_STARTPAGE 0x004F -#define W_META_ENDPAGE 0x0050 -#define W_META_ABORTDOC 0x0052 -#define W_META_ENDDOC 0x005E -#define W_META_DELETEOBJECT 0x01f0 -#define W_META_CREATEPALETTE 0x00f7 -#define W_META_CREATEBRUSH 0x00F8 -#define W_META_CREATEPATTERNBRUSH 0x01F9 -#define W_META_CREATEPENINDIRECT 0x02FA -#define W_META_CREATEFONTINDIRECT 0x02FB -#define W_META_CREATEBRUSHINDIRECT 0x02FC -#define W_META_CREATEBITMAPINDIRECT 0x02FD -#define W_META_CREATEBITMAP 0x06FE -#define W_META_CREATEREGION 0x06FF - -#define W_TRANSPARENT 1 -#define W_OPAQUE 2 - -#define W_R2_BLACK 1 -#define W_R2_NOTMERGEPEN 2 -#define W_R2_MASKNOTPEN 3 -#define W_R2_NOTCOPYPEN 4 -#define W_R2_MASKPENNOT 5 -#define W_R2_NOT 6 -#define W_R2_XORPEN 7 -#define W_R2_NOTMASKPEN 8 -#define W_R2_MASKPEN 9 -#define W_R2_NOTXORPEN 10 -#define W_R2_NOP 11 -#define W_R2_MERGENOTPEN 12 -#define W_R2_COPYPEN 13 -#define W_R2_MERGEPENNOT 14 -#define W_R2_MERGEPEN 15 -#define W_R2_WHITE 16 - -#define W_TA_NOUPDATECP 0x0000 -#define W_TA_UPDATECP 0x0001 -#define W_TA_LEFT 0x0000 -#define W_TA_RIGHT 0x0002 -#define W_TA_CENTER 0x0006 -#define W_TA_TOP 0x0000 -#define W_TA_BOTTOM 0x0008 -#define W_TA_BASELINE 0x0018 -#define W_TA_RTLREADING 0x0100 - -#define W_SRCCOPY 0x00CC0020L -#define W_SRCPAINT 0x00EE0086L -#define W_SRCAND 0x008800C6L -#define W_SRCINVERT 0x00660046L -#define W_SRCERASE 0x00440328L -#define W_NOTSRCCOPY 0x00330008L -#define W_NOTSRCERASE 0x001100A6L -#define W_MERGECOPY 0x00C000CAL -#define W_MERGEPAINT 0x00BB0226L -#define W_PATCOPY 0x00F00021L -#define W_PATPAINT 0x00FB0A09L -#define W_PATINVERT 0x005A0049L -#define W_DSTINVERT 0x00550009L -#define W_BLACKNESS 0x00000042L -#define W_WHITENESS 0x00FF0062L - -#define W_PS_SOLID 0 -#define W_PS_DASH 1 -#define W_PS_DOT 2 -#define W_PS_DASHDOT 3 -#define W_PS_DASHDOTDOT 4 -#define W_PS_NULL 5 -#define W_PS_INSIDEFRAME 6 - -#define W_LF_FACESIZE 32 - -#define W_ANSI_CHARSET 0 -#define W_DEFAULT_CHARSET 1 -#define W_SYMBOL_CHARSET 2 -#define W_SHIFTJIS_CHARSET 128 -#define W_HANGEUL_CHARSET 129 -#define W_GB2312_CHARSET 134 -#define W_CHINESEBIG5_CHARSET 136 -#define W_OEM_CHARSET 255 -/*WINVER >= 0x0400*/ -#define W_JOHAB_CHARSET 130 -#define W_HEBREW_CHARSET 177 -#define W_ARABIC_CHARSET 178 -#define W_GREEK_CHARSET 161 -#define W_TURKISH_CHARSET 162 -#define W_VIETNAMESE_CHARSET 163 -#define W_THAI_CHARSET 222 -#define W_EASTEUROPE_CHARSET 238 -#define W_RUSSIAN_CHARSET 204 -#define W_MAC_CHARSET 77 -#define W_BALTIC_CHARSET 186 - -#define W_DEFAULT_PITCH 0x00 -#define W_FIXED_PITCH 0x01 -#define W_VARIABLE_PITCH 0x02 - -#define W_FF_DONTCARE 0x00 -#define W_FF_ROMAN 0x10 -#define W_FF_SWISS 0x20 -#define W_FF_MODERN 0x30 -#define W_FF_SCRIPT 0x40 -#define W_FF_DECORATIVE 0x50 - -#define W_FW_DONTCARE 0 -#define W_FW_THIN 100 -#define W_FW_EXTRALIGHT 200 -#define W_FW_LIGHT 300 -#define W_FW_NORMAL 400 -#define W_FW_MEDIUM 500 -#define W_FW_SEMIBOLD 600 -#define W_FW_BOLD 700 -#define W_FW_EXTRABOLD 800 -#define W_FW_HEAVY 900 -#define W_FW_ULTRALIGHT 200 -#define W_FW_REGULAR 400 -#define W_FW_DEMIBOLD 600 -#define W_FW_ULTRABOLD 800 -#define W_FW_BLACK 900 - -#define W_BS_SOLID 0 -#define W_BS_HOLLOW 1 -#define W_BS_HATCHED 2 -#define W_BS_PATTERN 3 -#define W_BS_INDEXED 4 -#define W_BS_DIBPATTERN 5 - -#define W_HS_HORIZONTAL 0 -#define W_HS_VERTICAL 1 -#define W_HS_FDIAGONAL 2 -#define W_HS_BDIAGONAL 3 -#define W_HS_CROSS 4 -#define W_HS_DIAGCROSS 5 - -#define W_MFCOMMENT 15 - -#define PRIVATE_ESCAPE_UNICODE 2 - -/// copied from writerwordglue.cxx - -/* - Utility to categorize unicode characters into the best fit windows charset - range for exporting to ww6, or as a hint to non \u unicode token aware rtf - readers -*/ -rtl_TextEncoding getScriptClass(sal_Unicode cChar) -{ - using namespace com::sun::star::i18n; - - static ScriptTypeList aScripts[] = - { - { UnicodeScript_kBasicLatin, UnicodeScript_kBasicLatin, RTL_TEXTENCODING_MS_1252}, - { UnicodeScript_kLatin1Supplement, UnicodeScript_kLatin1Supplement, RTL_TEXTENCODING_MS_1252}, - { UnicodeScript_kLatinExtendedA, UnicodeScript_kLatinExtendedA, RTL_TEXTENCODING_MS_1250}, - { UnicodeScript_kLatinExtendedB, UnicodeScript_kLatinExtendedB, RTL_TEXTENCODING_MS_1257}, - { UnicodeScript_kGreek, UnicodeScript_kGreek, RTL_TEXTENCODING_MS_1253}, - { UnicodeScript_kCyrillic, UnicodeScript_kCyrillic, RTL_TEXTENCODING_MS_1251}, - { UnicodeScript_kHebrew, UnicodeScript_kHebrew, RTL_TEXTENCODING_MS_1255}, - { UnicodeScript_kArabic, UnicodeScript_kArabic, RTL_TEXTENCODING_MS_1256}, - { UnicodeScript_kThai, UnicodeScript_kThai, RTL_TEXTENCODING_MS_1258}, - { UnicodeScript_kScriptCount, UnicodeScript_kScriptCount, RTL_TEXTENCODING_MS_1252} - }; - return unicode::getUnicodeScriptType(cChar, aScripts, - RTL_TEXTENCODING_MS_1252); -} - -//========================== Methoden von WMFWriter ========================== - -void WMFWriter::MayCallback() -{ - if ( xStatusIndicator.is() ) - { - ULONG nPercent; - - // Wir gehen mal einfach so davon aus, dass 16386 Actions einer Bitmap entsprechen - // (in der Regel wird ein Metafile entweder nur Actions oder einige Bitmaps und fast - // keine Actions enthalten. Dann ist das Verhaeltnis ziemlich unwichtig) - - nPercent=((nWrittenBitmaps<<14)+(nActBitmapPercent<<14)/100+nWrittenActions) - *100 - /((nNumberOfBitmaps<<14)+nNumberOfActions); - - if ( nPercent >= nLastPercent + 3 ) - { - nLastPercent = nPercent; - if( nPercent <= 100 ) - xStatusIndicator->setValue( nPercent ); - } - } -} - -void WMFWriter::CountActionsAndBitmaps( const GDIMetaFile & rMTF ) -{ - ULONG nAction, nActionCount; - - nActionCount = rMTF.GetActionCount(); - - for ( nAction=0; nActionGetType() ) - { - case META_BMP_ACTION: - case META_BMPSCALE_ACTION: - case META_BMPSCALEPART_ACTION: - case META_BMPEX_ACTION: - case META_BMPEXSCALE_ACTION: - case META_BMPEXSCALEPART_ACTION: - nNumberOfBitmaps++; - break; - } - nNumberOfActions++; - } -} - - -void WMFWriter::WritePointXY(const Point & rPoint) -{ - Point aPt( pVirDev->LogicToLogic(rPoint,aSrcMapMode,aTargetMapMode) ); - *pWMF << ((short)aPt.X()) << ((short)aPt.Y()); -} - - -void WMFWriter::WritePointYX(const Point & rPoint) -{ - Point aPt( pVirDev->LogicToLogic(rPoint,aSrcMapMode,aTargetMapMode) ); - *pWMF << ((short)aPt.Y()) << ((short)aPt.X()); -} - - -sal_Int32 WMFWriter::ScaleWidth( sal_Int32 nDX ) -{ - Size aSz( pVirDev->LogicToLogic(Size(nDX,0),aSrcMapMode,aTargetMapMode) ); - return aSz.Width(); -} - - -void WMFWriter::WriteSize(const Size & rSize) -{ - Size aSz( pVirDev->LogicToLogic(rSize,aSrcMapMode,aTargetMapMode) ); - *pWMF << ((short)aSz.Width()) << ((short)aSz.Height()); -} - - -void WMFWriter::WriteHeightWidth(const Size & rSize) -{ - Size aSz( pVirDev->LogicToLogic(rSize,aSrcMapMode,aTargetMapMode) ); - *pWMF << ((short)aSz.Height()) << ((short)aSz.Width()); -} - - -void WMFWriter::WriteRectangle(const Rectangle & rRect) -{ - WritePointYX(Point(rRect.Right()+1,rRect.Bottom()+1)); - WritePointYX(rRect.TopLeft()); -} - - -void WMFWriter::WriteColor(const Color & rColor) -{ - *pWMF << (BYTE) rColor.GetRed() << (BYTE) rColor.GetGreen() << (BYTE) rColor.GetBlue() << (BYTE) 0; -} - - -void WMFWriter::WriteRecordHeader(sal_uInt32 nSizeWords, sal_uInt16 nType) -{ - nActRecordPos=pWMF->Tell(); - if (nSizeWords>nMaxRecordSize) nMaxRecordSize=nSizeWords; - *pWMF << nSizeWords << nType; -} - - -void WMFWriter::UpdateRecordHeader() -{ - ULONG nPos; - sal_uInt32 nSize; - - nPos=pWMF->Tell(); nSize=nPos-nActRecordPos; - if ((nSize & 1)!=0) { - *pWMF << (BYTE)0; - nPos++; nSize++; - } - nSize/=2; - if (nSize>nMaxRecordSize) nMaxRecordSize=nSize; - pWMF->Seek(nActRecordPos); - *pWMF << nSize; - pWMF->Seek(nPos); -} - - -void WMFWriter::WMFRecord_Arc(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt) -{ - WriteRecordHeader(0x0000000b,W_META_ARC); - WritePointYX(rEndPt); - WritePointYX(rStartPt); - WriteRectangle(rRect); -} - -void WMFWriter::WMFRecord_Chord(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt) -{ - WriteRecordHeader(0x0000000b,W_META_CHORD); - WritePointYX(rEndPt); - WritePointYX(rStartPt); - WriteRectangle(rRect); -} - - -void WMFWriter::WMFRecord_CreateBrushIndirect(const Color& rColor) -{ - WriteRecordHeader(0x00000007,W_META_CREATEBRUSHINDIRECT); - - if( rColor==Color(COL_TRANSPARENT) ) - *pWMF << (UINT16) W_BS_HOLLOW; - else - *pWMF << (UINT16) W_BS_SOLID; - - WriteColor( rColor ); - *pWMF << (UINT16) 0; -} - - -void WMFWriter::WMFRecord_CreateFontIndirect(const Font & rFont) -{ - USHORT nWeight,i; - BYTE nPitchFamily; - - WriteRecordHeader(0x00000000,W_META_CREATEFONTINDIRECT); - WriteHeightWidth(Size(rFont.GetSize().Width(),-rFont.GetSize().Height())); - *pWMF << (short)rFont.GetOrientation() << (short)rFont.GetOrientation(); - - switch (rFont.GetWeight()) { - case WEIGHT_THIN: nWeight=W_FW_THIN; break; - case WEIGHT_ULTRALIGHT: nWeight=W_FW_ULTRALIGHT; break; - case WEIGHT_LIGHT: nWeight=W_FW_LIGHT; break; - case WEIGHT_SEMILIGHT: nWeight=W_FW_LIGHT; break; - case WEIGHT_NORMAL: nWeight=W_FW_NORMAL; break; - case WEIGHT_MEDIUM: nWeight=W_FW_MEDIUM; break; - case WEIGHT_SEMIBOLD: nWeight=W_FW_SEMIBOLD; break; - case WEIGHT_BOLD: nWeight=W_FW_BOLD; break; - case WEIGHT_ULTRABOLD: nWeight=W_FW_ULTRABOLD; break; - case WEIGHT_BLACK: nWeight=W_FW_BLACK; break; - default: nWeight=W_FW_DONTCARE; - } - *pWMF << nWeight; - - if (rFont.GetItalic()==ITALIC_NONE) *pWMF << (BYTE)0; else *pWMF << (BYTE)1; - if (rFont.GetUnderline()==UNDERLINE_NONE) *pWMF << (BYTE)0; else *pWMF << (BYTE)1; - if (rFont.GetStrikeout()==STRIKEOUT_NONE) *pWMF << (BYTE)0; else *pWMF << (BYTE)1; - - CharSet eFontNameEncoding = rFont.GetCharSet(); - sal_uInt8 nCharSet = rtl_getBestWindowsCharsetFromTextEncoding( eFontNameEncoding ); - if ( eFontNameEncoding == RTL_TEXTENCODING_SYMBOL ) - eFontNameEncoding = RTL_TEXTENCODING_MS_1252; - if ( nCharSet == 1 ) - nCharSet = W_ANSI_CHARSET; - *pWMF << nCharSet; - - *pWMF << (BYTE)0 << (BYTE)0 << (BYTE)0; - - switch (rFont.GetPitch()) { - case PITCH_FIXED: nPitchFamily=W_FIXED_PITCH; break; - case PITCH_VARIABLE: nPitchFamily=W_VARIABLE_PITCH; break; - default: nPitchFamily=W_DEFAULT_PITCH; - } - switch (rFont.GetFamily()) { - case FAMILY_DECORATIVE: nPitchFamily|=W_FF_DECORATIVE; break; - case FAMILY_MODERN: nPitchFamily|=W_FF_MODERN; break; - case FAMILY_ROMAN: nPitchFamily|=W_FF_ROMAN; break; - case FAMILY_SCRIPT: nPitchFamily|=W_FF_SCRIPT; break; - case FAMILY_SWISS: nPitchFamily|=W_FF_SWISS; break; - default: nPitchFamily|=W_FF_DONTCARE; - } - *pWMF << nPitchFamily; - - ByteString aFontName( rFont.GetName(), eFontNameEncoding ); - for ( i = 0; i < W_LF_FACESIZE; i++ ) - { - sal_Char nChar = ( i < aFontName.Len() ) ? aFontName.GetChar( i ) : 0; - *pWMF << nChar; - } - UpdateRecordHeader(); -} - -void WMFWriter::WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo& rLineInfo ) -{ - WriteRecordHeader(0x00000008,W_META_CREATEPENINDIRECT); - USHORT nStyle = rColor == Color( COL_TRANSPARENT ) ? W_PS_NULL : W_PS_SOLID; - switch( rLineInfo.GetStyle() ) - { - case LINE_DASH : - { - if ( rLineInfo.GetDotCount() ) - { - if ( !rLineInfo.GetDashCount() ) - nStyle = W_PS_DOT; - else - { - if ( !rLineInfo.GetDotCount() == 1 ) - nStyle = W_PS_DASHDOT; - else - nStyle = W_PS_DASHDOTDOT; - } - } - else - nStyle = W_PS_DASH; - } - break; - case LINE_NONE : - nStyle = W_PS_NULL; - break; - default: - break; - } - *pWMF << nStyle; - - WriteSize( Size( rLineInfo.GetWidth(), 0 ) ); - WriteColor( rColor ); -} - -void WMFWriter::WMFRecord_DeleteObject(USHORT nObjectHandle) -{ - WriteRecordHeader(0x00000004,W_META_DELETEOBJECT); - *pWMF << nObjectHandle; -} - - -void WMFWriter::WMFRecord_Ellipse(const Rectangle & rRect) -{ - WriteRecordHeader(0x00000007,W_META_ELLIPSE); - WriteRectangle(rRect); -} - -bool IsStarSymbol(const String &rStr) -{ - return rStr.EqualsIgnoreCaseAscii("starsymbol") || - rStr.EqualsIgnoreCaseAscii("opensymbol"); -} - -void WMFWriter::WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_Int8* pData ) -{ -#ifdef OSL_BIGENDIAN - sal_uInt32 nTmp = SWAPLONG( nEsc ); - sal_uInt32 nCheckSum = rtl_crc32( 0, &nTmp, 4 ); -#else - sal_uInt32 nCheckSum = rtl_crc32( 0, &nEsc, 4 ); -#endif - if ( nLen ) - nCheckSum = rtl_crc32( nCheckSum, pData, nLen ); - - WriteRecordHeader( 3 + 9 + ( ( nLen + 1 ) >> 1 ), W_META_ESCAPE ); - *pWMF << (sal_uInt16)W_MFCOMMENT - << (sal_uInt16)( nLen + 14 ) // we will always have a fourteen byte escape header: - << (sal_uInt16)0x4f4f // OO - << (sal_uInt32)0xa2c2a // evil magic number - << (sal_uInt32)nCheckSum // crc32 checksum about nEsc & pData - << (sal_uInt32)nEsc; // escape number - pWMF->Write( pData, nLen ); - if ( nLen & 1 ) - *pWMF << (sal_uInt8)0; // pad byte -} - -/* if return value is true, then a complete unicode string and also a polygon replacement has been written, - so there is no more action necessary -*/ -sal_Bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const String& rUniStr, const sal_Int32* pDXAry ) -{ - sal_Bool bEscapeUsed = sal_False; - - sal_uInt32 i, nStringLen = rUniStr.Len(); - if ( nStringLen ) - { - // first we will check if a comment is necessary - if ( aSrcFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL ) // symbol is always byte character, so there is no unicode loss - { - const sal_Unicode* pBuf = rUniStr.GetBuffer(); - const rtl_TextEncoding aTextEncodingOrg = aSrcFont.GetCharSet(); - ByteString aByteStr( rUniStr, aTextEncodingOrg ); - String aUniStr2( aByteStr, aTextEncodingOrg ); - const sal_Unicode* pConversion = aUniStr2.GetBuffer(); // this is the unicode array after bytestring <-> unistring conversion - for ( i = 0; i < nStringLen; i++ ) - { - if ( *pBuf++ != *pConversion++ ) - break; - } - - if ( i != nStringLen ) // after conversion the characters are not original, - { // try again, with determining a better charset from unicode char - pBuf = rUniStr.GetBuffer(); - const sal_Unicode* pCheckChar = pBuf; - rtl_TextEncoding aTextEncoding = getScriptClass (*pCheckChar); // try the first character - for ( i = 1; i < nStringLen; i++) - { - if (aTextEncoding != aTextEncodingOrg) // found something - break; - pCheckChar++; - aTextEncoding = getScriptClass (*pCheckChar); // try the next character - } - - aByteStr = ByteString ( rUniStr, aTextEncoding ); - aUniStr2 = String ( aByteStr, aTextEncoding ); - pConversion = aUniStr2.GetBuffer(); // this is the unicode array after bytestring <-> unistring conversion - for ( i = 0; i < nStringLen; i++ ) - { - if ( *pBuf++ != *pConversion++ ) - break; - } - if (i == nStringLen) - { - aSrcFont.SetCharSet (aTextEncoding); - SetAllAttr(); - } - } - - if ( ( i != nStringLen ) || IsStarSymbol( aSrcFont.GetName() ) ) // after conversion the characters are not original, so we - { // will store the unicode string and a polypoly replacement - Color aOldFillColor( aSrcFillColor ); - Color aOldLineColor( aSrcLineColor ); - aSrcLineInfo = LineInfo(); - aSrcFillColor = aSrcTextColor; - aSrcLineColor = Color( COL_TRANSPARENT ); - SetLineAndFillAttr(); - pVirDev->SetFont( aSrcFont ); - std::vector aPolyPolyVec; - if ( pVirDev->GetTextOutlines( aPolyPolyVec, rUniStr ) ) - { - sal_uInt32 nDXCount = pDXAry ? nStringLen : 0; - sal_uInt32 nSkipActions = aPolyPolyVec.size(); - sal_Int32 nStrmLen = 8 + - + sizeof( nStringLen ) + ( nStringLen * 2 ) - + sizeof( nDXCount ) + ( nDXCount * 4 ) - + sizeof( nSkipActions ); - - SvMemoryStream aMemoryStream( nStrmLen ); - Point aPt( pVirDev->LogicToLogic( rPoint, aSrcMapMode, aTargetMapMode ) ); - aMemoryStream << aPt.X() - << aPt.Y() - << nStringLen; - for ( i = 0; i < nStringLen; i++ ) - aMemoryStream << rUniStr.GetChar( (sal_uInt16)i ); - aMemoryStream << nDXCount; - for ( i = 0; i < nDXCount; i++ ) - aMemoryStream << pDXAry[ i ]; - aMemoryStream << nSkipActions; - WMFRecord_Escape( PRIVATE_ESCAPE_UNICODE, nStrmLen, (const sal_Int8*)aMemoryStream.GetData() ); - - std::vector::iterator aIter( aPolyPolyVec.begin() ); - while ( aIter != aPolyPolyVec.end() ) - { - PolyPolygon aPolyPoly( *aIter++ ); - aPolyPoly.Move( rPoint.X(), rPoint.Y() ); - WMFRecord_PolyPolygon( aPolyPoly ); - } - aSrcFillColor = aOldFillColor; - aSrcLineColor = aOldLineColor; - bEscapeUsed = sal_True; - } - } - } - } - return bEscapeUsed; -} - -void WMFWriter::WMFRecord_ExtTextOut( const Point & rPoint, - const String & rString, const sal_Int32 * pDXAry ) -{ - sal_uInt16 nOriginalTextLen = rString.Len(); - - if ( (nOriginalTextLen <= 1) || (pDXAry == NULL) ) - { - WMFRecord_TextOut(rPoint, rString); - return; - } - rtl_TextEncoding eChrSet = aSrcFont.GetCharSet(); - ByteString aByteString(rString, eChrSet); - TrueExtTextOut(rPoint,rString,aByteString,pDXAry); -} - -void WMFWriter::TrueExtTextOut( const Point & rPoint, const String & rString, - const ByteString & rByteString, const sal_Int32 * pDXAry ) -{ - WriteRecordHeader( 0, W_META_EXTTEXTOUT ); - WritePointYX( rPoint ); - sal_uInt16 nNewTextLen = rByteString.Len(); - *pWMF << nNewTextLen << (sal_uInt16)0; - - sal_uInt16 i; - for ( i = 0; i < nNewTextLen; i++ ) - *pWMF << (sal_uInt8)rByteString.GetChar( i ); - if ( nNewTextLen & 1 ) - *pWMF << (sal_uInt8)0; - - sal_uInt16 nOriginalTextLen = rString.Len(); - sal_Int16* pConvertedDXAry = new sal_Int16[ nOriginalTextLen ]; - sal_Int32 j = 0; - pConvertedDXAry[ j++ ] = (sal_Int16)ScaleWidth( pDXAry[ 0 ] ); - for ( i = 1; i < ( nOriginalTextLen - 1 ); i++ ) - pConvertedDXAry[ j++ ] = (sal_Int16)ScaleWidth( pDXAry[ i ] - pDXAry[ i - 1 ] ); - pConvertedDXAry[ j ] = (sal_Int16)ScaleWidth( pDXAry[ nOriginalTextLen - 2 ] / ( nOriginalTextLen - 1 ) ); - - for ( i = 0; i < nOriginalTextLen; i++ ) - { - sal_Int16 nDx = pConvertedDXAry[ i ]; - *pWMF << nDx; - if ( nOriginalTextLen < nNewTextLen ) - { - ByteString aTemp( rString.GetChar( i ), aSrcFont.GetCharSet()); - j = aTemp.Len(); - while ( --j > 0 ) - *pWMF << (sal_uInt16)0; - } - } - delete[] pConvertedDXAry; - UpdateRecordHeader(); -} - -void WMFWriter::WMFRecord_LineTo(const Point & rPoint) -{ - WriteRecordHeader(0x00000005,W_META_LINETO); - WritePointYX(rPoint); -} - - -void WMFWriter::WMFRecord_MoveTo(const Point & rPoint) -{ - WriteRecordHeader(0x00000005,W_META_MOVETO); - WritePointYX(rPoint); -} - - -void WMFWriter::WMFRecord_Pie(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt) -{ - WriteRecordHeader(0x0000000b,W_META_PIE); - WritePointYX(rEndPt); - WritePointYX(rStartPt); - WriteRectangle(rRect); -} - - -void WMFWriter::WMFRecord_Polygon(const Polygon & rPoly) -{ - USHORT nSize,i; - - Polygon aSimplePoly; - if ( rPoly.HasFlags() ) - rPoly.AdaptiveSubdivide( aSimplePoly ); - else - aSimplePoly = rPoly; - nSize = aSimplePoly.GetSize(); - WriteRecordHeader(((ULONG)nSize)*2+4,W_META_POLYGON); - *pWMF << nSize; - for (i=0; iGetSize(); - for (j=0; jGetPoint(j)); - } - UpdateRecordHeader(); -} - - -void WMFWriter::WMFRecord_Rectangle(const Rectangle & rRect) -{ - WriteRecordHeader( 0x00000007,W_META_RECTANGLE ); - WriteRectangle( rRect ); -} - - -void WMFWriter::WMFRecord_RestoreDC() -{ - WriteRecordHeader(0x00000004,W_META_RESTOREDC); - *pWMF << (short)-1; -} - - -void WMFWriter::WMFRecord_RoundRect(const Rectangle & rRect, long nHorzRound, long nVertRound) -{ - WriteRecordHeader(0x00000009,W_META_ROUNDRECT); - WriteHeightWidth(Size(nHorzRound,nVertRound)); - WriteRectangle(rRect); -} - - -void WMFWriter::WMFRecord_SaveDC() -{ - WriteRecordHeader(0x00000003,W_META_SAVEDC); -} - - -void WMFWriter::WMFRecord_SelectObject(USHORT nObjectHandle) -{ - WriteRecordHeader(0x00000004,W_META_SELECTOBJECT); - *pWMF << nObjectHandle; -} - - -void WMFWriter::WMFRecord_SetBkColor(const Color & rColor) -{ - WriteRecordHeader(0x00000005,W_META_SETBKCOLOR); - WriteColor(rColor); -} - - -void WMFWriter::WMFRecord_SetBkMode(BOOL bTransparent) -{ - WriteRecordHeader(0x00000004,W_META_SETBKMODE); - if (bTransparent==TRUE) *pWMF << (USHORT)W_TRANSPARENT; - else *pWMF << (USHORT)W_OPAQUE; -} - -void WMFWriter::WMFRecord_SetStretchBltMode() -{ - WriteRecordHeader( 0x00000004, W_META_SETSTRETCHBLTMODE ); - *pWMF << (USHORT) 3; // STRETCH_DELETESCANS -} - -void WMFWriter::WMFRecord_SetPixel(const Point & rPoint, const Color & rColor) -{ - WriteRecordHeader(0x00000007,W_META_SETPIXEL); - WriteColor(rColor); - WritePointYX(rPoint); -} - - -void WMFWriter::WMFRecord_SetROP2(RasterOp eROP) -{ - USHORT nROP2; - - switch (eROP) { - case ROP_INVERT: nROP2=W_R2_NOT; break; - case ROP_XOR: nROP2=W_R2_XORPEN; break; - default: nROP2=W_R2_COPYPEN; - } - WriteRecordHeader(0x00000004,W_META_SETROP2); - *pWMF << nROP2; -} - - -void WMFWriter::WMFRecord_SetTextAlign(FontAlign eFontAlign, UINT32 eHorTextAlign) -{ - USHORT nAlign; - - switch (eFontAlign) { - case ALIGN_TOP: nAlign=W_TA_TOP; break; - case ALIGN_BOTTOM: nAlign=W_TA_BOTTOM; break; - default: nAlign=W_TA_BASELINE; - } - nAlign|=eHorTextAlign; - nAlign|=W_TA_NOUPDATECP; - - WriteRecordHeader(0x00000004,W_META_SETTEXTALIGN); - *pWMF << nAlign; -} - - -void WMFWriter::WMFRecord_SetTextColor(const Color & rColor) -{ - WriteRecordHeader(0x00000005,W_META_SETTEXTCOLOR); - WriteColor(rColor); -} - - -void WMFWriter::WMFRecord_SetWindowExt(const Size & rSize) -{ - WriteRecordHeader(0x00000005,W_META_SETWINDOWEXT); - WriteHeightWidth(rSize); -} - - -void WMFWriter::WMFRecord_SetWindowOrg(const Point & rPoint) -{ - WriteRecordHeader(0x00000005,W_META_SETWINDOWORG); - WritePointYX(rPoint); -} - - -void WMFWriter::WMFRecord_StretchDIB( const Point & rPoint, const Size & rSize, - const Bitmap & rBitmap, sal_uInt32 nROP ) -{ - ULONG nPosAnf,nPosEnd; - - nActBitmapPercent=50; - MayCallback(); - - WriteRecordHeader(0x00000000,W_META_STRETCHDIB); - - // Die Reihenfolge im Metafile soll jetzt sein: - // einige Parameter (laenge 22), dann die Bitmap ohne FILEHEADER. - // Da aber *pWMF << rBitmap einen FILEHEADER der Laenge 14 - // erzeugt, schreiben wir zuerst die Bitmap an die richtige Position - // Und ueberschreiben hinterher den FILEHEADER mit den Parametern. - nPosAnf=pWMF->Tell(); // Position merken, wo Parameter hin sollen - *pWMF << (long)0 << (long)0; // 8 bytes auffuellen (diese 8 bytes + - // 14 bytes ueberfluessigen FILEHEADER - // = 22 bytes Parameter) - *pWMF << rBitmap; // Bitmap schreiben - - // Parameter schreiben: - nPosEnd=pWMF->Tell(); - pWMF->Seek(nPosAnf); - - // Raster-Op bestimmen, falls nichts uebergeben wurde - if( !nROP ) - { - switch( eSrcRasterOp ) - { - case ROP_INVERT: nROP = W_DSTINVERT; break; - case ROP_XOR: nROP = W_SRCINVERT; break; - default: nROP = W_SRCCOPY; - } - } - - *pWMF << nROP << - (short) 0 << - (short) rBitmap.GetSizePixel().Height() << - (short) rBitmap.GetSizePixel().Width() << - (short) 0 << - (short) 0; - - WriteHeightWidth(rSize); - WritePointYX(rPoint); - pWMF->Seek(nPosEnd); - - UpdateRecordHeader(); - - nWrittenBitmaps++; - nActBitmapPercent=0; -} - - -void WMFWriter::WMFRecord_TextOut(const Point & rPoint, const String & rStr) -{ - rtl_TextEncoding eChrSet = aSrcFont.GetCharSet(); - ByteString aString( rStr, eChrSet ); - TrueTextOut(rPoint, aString); -} - -void WMFWriter::TrueTextOut(const Point & rPoint, const ByteString& rString) -{ - USHORT nLen,i; - - WriteRecordHeader(0,W_META_TEXTOUT); - nLen=rString.Len(); - *pWMF << nLen; - for ( i = 0; i < nLen; i++ ) - *pWMF << (BYTE)rString.GetChar( i ); - if ((nLen&1)!=0) *pWMF << (BYTE)0; - WritePointYX(rPoint); - UpdateRecordHeader(); -} - -void WMFWriter::WMFRecord_EndOfFile() -{ - WriteRecordHeader(0x00000003,0x0000); -} - - -void WMFWriter::WMFRecord_IntersectClipRect( const Rectangle& rRect ) -{ - WriteRecordHeader( 0x00000007, W_META_INTERSECTCLIPRECT ); - WriteRectangle(rRect); -} - - -USHORT WMFWriter::AllocHandle() -{ - USHORT i; - - for (i=0; iSetFont(aSrcFont); - if ( aDstFont.GetName() != aSrcFont.GetName() ) - { - FontCharMap aFontCharMap; - if ( pVirDev->GetFontCharMap( aFontCharMap ) ) - { - if ( ( aFontCharMap.GetFirstChar() & 0xff00 ) == 0xf000 ) - aSrcFont.SetCharSet( RTL_TEXTENCODING_SYMBOL ); - else if ( aSrcFont.GetCharSet() == RTL_TEXTENCODING_SYMBOL ) - aSrcFont.SetCharSet( RTL_TEXTENCODING_MS_1252 ); - } - } - aDstFont = aSrcFont; - CreateSelectDeleteFont(aDstFont); - } -} - - -void WMFWriter::HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon) -{ - if(rLinePolygon.count()) - { - basegfx::B2DPolyPolygon aLinePolyPolygon(rLinePolygon); - basegfx::B2DPolyPolygon aFillPolyPolygon; - - rInfo.applyToB2DPolyPolygon(aLinePolyPolygon, aFillPolyPolygon); - - if(aLinePolyPolygon.count()) - { - aSrcLineInfo = rInfo; - SetLineAndFillAttr(); - - for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++) - { - const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a)); - WMFRecord_PolyLine(Polygon(aCandidate)); - } - } - - if(aFillPolyPolygon.count()) - { - const Color aOldLineColor(aSrcLineColor); - const Color aOldFillColor(aSrcFillColor); - - aSrcLineColor = Color( COL_TRANSPARENT ); - aSrcFillColor = aOldLineColor; - SetLineAndFillAttr(); - - for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++) - { - const Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a)); - WMFRecord_Polygon(Polygon(aPolygon)); - } - - aSrcLineColor = aOldLineColor; - aSrcFillColor = aOldFillColor; - SetLineAndFillAttr(); - } - } -} - -void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) -{ - ULONG nA, nACount; - MetaAction* pMA; - - if( bStatus ) - { - nACount = rMTF.GetActionCount(); - - WMFRecord_SetStretchBltMode(); - - for( nA=0; nAGetType() ) - { - case META_PIXEL_ACTION: - { - const MetaPixelAction* pA = (const MetaPixelAction *) pMA; - aSrcLineInfo = LineInfo(); - SetLineAndFillAttr(); - WMFRecord_SetPixel( pA->GetPoint(), pA->GetColor() ); - } - break; - - case META_POINT_ACTION: - { - const MetaPointAction* pA = (const MetaPointAction*) pMA; - const Point& rPt = pA->GetPoint(); - aSrcLineInfo = LineInfo(); - SetLineAndFillAttr(); - WMFRecord_MoveTo( rPt); - WMFRecord_LineTo( rPt ); - } - break; - - case META_LINE_ACTION: - { - const MetaLineAction* pA = (const MetaLineAction *) pMA; - if(pA->GetLineInfo().IsDefault()) - { - aSrcLineInfo = pA->GetLineInfo(); - SetLineAndFillAttr(); - WMFRecord_MoveTo( pA->GetStartPoint() ); - WMFRecord_LineTo( pA->GetEndPoint() ); - } - else - { - // LineInfo used; handle Dash/Dot and fat lines - basegfx::B2DPolygon aPolygon; - aPolygon.append(basegfx::B2DPoint(pA->GetStartPoint().X(), pA->GetStartPoint().Y())); - aPolygon.append(basegfx::B2DPoint(pA->GetEndPoint().X(), pA->GetEndPoint().Y())); - HandleLineInfoPolyPolygons(pA->GetLineInfo(), aPolygon); - } - } - break; - - case META_RECT_ACTION: - { - const MetaRectAction* pA = (const MetaRectAction*) pMA; - aSrcLineInfo = LineInfo(); - SetLineAndFillAttr(); - WMFRecord_Rectangle( pA->GetRect() ); - } - break; - - case META_ROUNDRECT_ACTION: - { - const MetaRoundRectAction* pA = (const MetaRoundRectAction*) pMA; - aSrcLineInfo = LineInfo(); - SetLineAndFillAttr(); - WMFRecord_RoundRect( pA->GetRect(), pA->GetHorzRound(), pA->GetVertRound() ); - } - break; - - case META_ELLIPSE_ACTION: - { - const MetaEllipseAction* pA = (const MetaEllipseAction*) pMA; - aSrcLineInfo = LineInfo(); - SetLineAndFillAttr(); - WMFRecord_Ellipse( pA->GetRect() ); - } - break; - - case META_ARC_ACTION: - { - const MetaArcAction* pA = (const MetaArcAction*) pMA; - aSrcLineInfo = LineInfo(); - SetLineAndFillAttr(); - WMFRecord_Arc( pA->GetRect(),pA->GetStartPoint(),pA->GetEndPoint() ); - } - break; - - case META_PIE_ACTION: - { - const MetaPieAction* pA = (const MetaPieAction*) pMA; - aSrcLineInfo = LineInfo(); - SetLineAndFillAttr(); - WMFRecord_Pie( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint() ); - } - break; - - - case META_CHORD_ACTION: - { - const MetaChordAction* pA = (const MetaChordAction*) pMA; - aSrcLineInfo = LineInfo(); - SetLineAndFillAttr(); - WMFRecord_Chord( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint() ); - } - break; - - case META_POLYLINE_ACTION: - { - const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pMA; - const Polygon& rPoly = pA->GetPolygon(); - - if( rPoly.GetSize() ) - { - if(pA->GetLineInfo().IsDefault()) - { - aSrcLineInfo = pA->GetLineInfo(); - SetLineAndFillAttr(); - WMFRecord_PolyLine( rPoly ); - } - else - { - // LineInfo used; handle Dash/Dot and fat lines - HandleLineInfoPolyPolygons(pA->GetLineInfo(), rPoly.getB2DPolygon()); - } - } - } - break; - - case META_POLYGON_ACTION: - { - const MetaPolygonAction* pA = (const MetaPolygonAction*) pMA; - aSrcLineInfo = LineInfo(); - SetLineAndFillAttr(); - WMFRecord_Polygon( pA->GetPolygon() ); - } - break; - - case META_POLYPOLYGON_ACTION: - { - const MetaPolyPolygonAction* pA = (const MetaPolyPolygonAction*) pMA; - aSrcLineInfo = LineInfo(); - SetLineAndFillAttr(); - WMFRecord_PolyPolygon( pA->GetPolyPolygon() ); - } - break; - - case META_TEXTRECT_ACTION: - { - const MetaTextRectAction * pA = (const MetaTextRectAction*)pMA; - String aTemp( pA->GetText() ); - aSrcLineInfo = LineInfo(); - SetAllAttr(); - - Point aPos( pA->GetRect().TopLeft() ); - if ( !WMFRecord_Escape_Unicode( aPos, aTemp, NULL ) ) - WMFRecord_TextOut( aPos, aTemp ); - } - break; - - case META_TEXT_ACTION: - { - const MetaTextAction * pA = (const MetaTextAction*) pMA; - String aTemp( pA->GetText(), pA->GetIndex(), pA->GetLen() ); - aSrcLineInfo = LineInfo(); - SetAllAttr(); - if ( !WMFRecord_Escape_Unicode( pA->GetPoint(), aTemp, NULL ) ) - WMFRecord_TextOut( pA->GetPoint(), aTemp ); - } - break; - - case META_TEXTARRAY_ACTION: - { - const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pMA; - - String aTemp( pA->GetText(), pA->GetIndex(), pA->GetLen() ); - aSrcLineInfo = LineInfo(); - SetAllAttr(); - if ( !WMFRecord_Escape_Unicode( pA->GetPoint(), aTemp, pA->GetDXArray() ) ) - WMFRecord_ExtTextOut( pA->GetPoint(), aTemp, pA->GetDXArray() ); - } - break; - - case META_STRETCHTEXT_ACTION: - { - const MetaStretchTextAction* pA = (const MetaStretchTextAction *) pMA; - String aTemp( pA->GetText(), pA->GetIndex(), pA->GetLen() ); - - sal_uInt16 nLen,i; - sal_Int32 nNormSize; - - pVirDev->SetFont( aSrcFont ); - nLen = aTemp.Len(); - sal_Int32* pDXAry = nLen ? new sal_Int32[ nLen ] : NULL; - nNormSize = pVirDev->GetTextArray( aTemp, pDXAry ); - for ( i = 0; i < ( nLen - 1 ); i++ ) - pDXAry[ i ] = pDXAry[ i ] * (sal_Int32)pA->GetWidth() / nNormSize; - if ( ( nLen <= 1 ) || ( (sal_Int32)pA->GetWidth() == nNormSize ) ) - delete[] pDXAry, pDXAry = NULL; - aSrcLineInfo = LineInfo(); - SetAllAttr(); - if ( !WMFRecord_Escape_Unicode( pA->GetPoint(), aTemp, pDXAry ) ) - WMFRecord_ExtTextOut( pA->GetPoint(), aTemp, pDXAry ); - delete[] pDXAry; - } - break; - - case META_BMP_ACTION: - { - const MetaBmpAction* pA = (const MetaBmpAction *) pMA; - WMFRecord_StretchDIB( pA->GetPoint(), pA->GetBitmap().GetSizePixel(), pA->GetBitmap() ); - } - break; - - case META_BMPSCALE_ACTION: - { - const MetaBmpScaleAction* pA = (const MetaBmpScaleAction*) pMA; - WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), pA->GetBitmap() ); - } - break; - - case META_BMPSCALEPART_ACTION: - { - const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*) pMA; - Bitmap aTmp( pA->GetBitmap() ); - - if( aTmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ) ) - WMFRecord_StretchDIB( pA->GetDestPoint(), pA->GetDestSize(), aTmp ); - } - break; - - case META_BMPEX_ACTION: - { - const MetaBmpExAction* pA = (const MetaBmpExAction *) pMA; - Bitmap aBmp( pA->GetBitmapEx().GetBitmap() ); - Bitmap aMsk( pA->GetBitmapEx().GetMask() ); - - if( !!aMsk ) - { - aBmp.Replace( aMsk, COL_WHITE ); - aMsk.Invert(); - WMFRecord_StretchDIB( pA->GetPoint(), aMsk.GetSizePixel(), aBmp, W_SRCPAINT ); - WMFRecord_StretchDIB( pA->GetPoint(), aBmp.GetSizePixel(), aBmp, W_SRCAND ); - } - else - WMFRecord_StretchDIB( pA->GetPoint(), aBmp.GetSizePixel(), aBmp ); - } - break; - - case META_BMPEXSCALE_ACTION: - { - const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pMA; - Bitmap aBmp( pA->GetBitmapEx().GetBitmap() ); - Bitmap aMsk( pA->GetBitmapEx().GetMask() ); - - if( !!aMsk ) - { - aBmp.Replace( aMsk, COL_WHITE ); - aMsk.Invert(); - WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), aMsk, W_SRCPAINT ); - WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), aBmp, W_SRCAND ); - } - else - WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), aBmp ); - } - break; - - case META_BMPEXSCALEPART_ACTION: - { - const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pMA; - BitmapEx aBmpEx( pA->GetBitmapEx() ); - aBmpEx.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); - Bitmap aBmp( aBmpEx.GetBitmap() ); - Bitmap aMsk( aBmpEx.GetMask() ); - - if( !!aMsk ) - { - aBmp.Replace( aMsk, COL_WHITE ); - aMsk.Invert(); - WMFRecord_StretchDIB( pA->GetDestPoint(), pA->GetDestSize(), aMsk, W_SRCPAINT ); - WMFRecord_StretchDIB( pA->GetDestPoint(), pA->GetDestSize(), aBmp, W_SRCAND ); - } - else - WMFRecord_StretchDIB( pA->GetDestPoint(), pA->GetDestSize(), aBmp ); - } - break; - - case META_GRADIENT_ACTION: - { - const MetaGradientAction* pA = (const MetaGradientAction*) pMA; - GDIMetaFile aTmpMtf; - - pVirDev->AddGradientActions( pA->GetRect(), pA->GetGradient(), aTmpMtf ); - WriteRecords( aTmpMtf ); - } - break; - - case META_HATCH_ACTION: - { - const MetaHatchAction* pA = (const MetaHatchAction*) pMA; - GDIMetaFile aTmpMtf; - - pVirDev->AddHatchActions( pA->GetPolyPolygon(), pA->GetHatch(), aTmpMtf ); - WriteRecords( aTmpMtf ); - } - break; - - case META_WALLPAPER_ACTION: - { - const MetaWallpaperAction* pA = (const MetaWallpaperAction*) pMA; - const Color& rColor = pA->GetWallpaper().GetColor(); - const Color aOldLineColor( aSrcLineColor ); - const Color aOldFillColor( aSrcFillColor ); - - aSrcLineColor = rColor; - aSrcFillColor = rColor; - aSrcLineInfo = LineInfo(); - SetLineAndFillAttr(); - WMFRecord_Rectangle( pA->GetRect() ); - aSrcLineColor = aOldLineColor; - aSrcFillColor = aOldFillColor; - } - break; - - case META_ISECTRECTCLIPREGION_ACTION: - { - const MetaISectRectClipRegionAction* pA = (const MetaISectRectClipRegionAction*) pMA; - WMFRecord_IntersectClipRect( pA->GetRect() ); - } - break; - - case META_LINECOLOR_ACTION: - { - const MetaLineColorAction* pA = (const MetaLineColorAction*) pMA; - - if( pA->IsSetting() ) - aSrcLineColor = pA->GetColor(); - else - aSrcLineColor = Color( COL_TRANSPARENT ); - } - break; - - case META_FILLCOLOR_ACTION: - { - const MetaFillColorAction* pA = (const MetaFillColorAction*) pMA; - - if( pA->IsSetting() ) - aSrcFillColor = pA->GetColor(); - else - aSrcFillColor = Color( COL_TRANSPARENT ); - } - break; - - case META_TEXTCOLOR_ACTION: - { - const MetaTextColorAction* pA = (const MetaTextColorAction*) pMA; - aSrcTextColor = pA->GetColor(); - } - break; - - case META_TEXTFILLCOLOR_ACTION: - { - const MetaTextFillColorAction* pA = (const MetaTextFillColorAction*) pMA; - if( pA->IsSetting() ) - aSrcFont.SetFillColor( pA->GetColor() ); - else - aSrcFont.SetFillColor( Color( COL_TRANSPARENT ) ); - } - break; - - case META_TEXTALIGN_ACTION: - { - const MetaTextAlignAction* pA = (const MetaTextAlignAction*) pMA; - eSrcTextAlign = pA->GetTextAlign(); - } - break; - - case META_MAPMODE_ACTION: - { - const MetaMapModeAction* pA = (const MetaMapModeAction*) pMA; - - if (aSrcMapMode!=pA->GetMapMode()) - { - if( pA->GetMapMode().GetMapUnit() == MAP_RELATIVE ) - { - MapMode aMM = pA->GetMapMode(); - Fraction aScaleX = aMM.GetScaleX(); - Fraction aScaleY = aMM.GetScaleY(); - - Point aOrigin = aSrcMapMode.GetOrigin(); - BigInt aX( aOrigin.X() ); - aX *= BigInt( aScaleX.GetDenominator() ); - if( aOrigin.X() >= 0 ) - if( aScaleX.GetNumerator() >= 0 ) - aX += BigInt( aScaleX.GetNumerator()/2 ); - else - aX -= BigInt( (aScaleX.GetNumerator()+1)/2 ); - else - if( aScaleX.GetNumerator() >= 0 ) - aX -= BigInt( (aScaleX.GetNumerator()-1)/2 ); - else - aX += BigInt( aScaleX.GetNumerator()/2 ); - aX /= BigInt( aScaleX.GetNumerator() ); - aOrigin.X() = (long)aX + aMM.GetOrigin().X(); - BigInt aY( aOrigin.Y() ); - aY *= BigInt( aScaleY.GetDenominator() ); - if( aOrigin.Y() >= 0 ) - if( aScaleY.GetNumerator() >= 0 ) - aY += BigInt( aScaleY.GetNumerator()/2 ); - else - aY -= BigInt( (aScaleY.GetNumerator()+1)/2 ); - else - if( aScaleY.GetNumerator() >= 0 ) - aY -= BigInt( (aScaleY.GetNumerator()-1)/2 ); - else - aY += BigInt( aScaleY.GetNumerator()/2 ); - aY /= BigInt( aScaleY.GetNumerator() ); - aOrigin.Y() = (long)aY + aMM.GetOrigin().Y(); - aSrcMapMode.SetOrigin( aOrigin ); - - aScaleX *= aSrcMapMode.GetScaleX(); - aScaleY *= aSrcMapMode.GetScaleY(); - aSrcMapMode.SetScaleX( aScaleX ); - aSrcMapMode.SetScaleY( aScaleY ); - } - else - aSrcMapMode=pA->GetMapMode(); - } - } - break; - - case META_FONT_ACTION: - { - const MetaFontAction* pA = (const MetaFontAction*) pMA; - aSrcFont = pA->GetFont(); - - if ( aSrcFont.GetCharSet() == RTL_TEXTENCODING_DONTKNOW ) - aSrcFont.SetCharSet( GetExtendedTextEncoding( gsl_getSystemTextEncoding() ) ); - if ( aSrcFont.GetCharSet() == RTL_TEXTENCODING_UNICODE ) - aSrcFont.SetCharSet( RTL_TEXTENCODING_MS_1252 ); - eSrcTextAlign = aSrcFont.GetAlign(); - aSrcTextColor = aSrcFont.GetColor(); - aSrcFont.SetAlign( ALIGN_BASELINE ); - aSrcFont.SetColor( COL_WHITE ); - } - break; - - case META_PUSH_ACTION: - { - const MetaPushAction* pA = (const MetaPushAction*)pMA; - - WMFWriterAttrStackMember* pAt = new WMFWriterAttrStackMember; - pAt->nFlags = pA->GetFlags(); - pAt->aClipRegion = aSrcClipRegion; - pAt->aLineColor=aSrcLineColor; - pAt->aFillColor=aSrcFillColor; - pAt->eRasterOp=eSrcRasterOp; - pAt->aFont=aSrcFont; - pAt->eTextAlign=eSrcTextAlign; - pAt->aTextColor=aSrcTextColor; - pAt->aMapMode=aSrcMapMode; - pAt->aLineInfo=aDstLineInfo; - pAt->pSucc=pAttrStack; - pAttrStack=pAt; - - SetAllAttr(); // update ( now all source attributes are equal to the destination attributes ) - WMFRecord_SaveDC(); - - } - break; - - case META_POP_ACTION: - { - WMFWriterAttrStackMember * pAt=pAttrStack; - - if( pAt ) - { - aDstLineInfo = pAt->aLineInfo; - aDstLineColor = pAt->aLineColor; - if ( pAt->nFlags & PUSH_LINECOLOR ) - aSrcLineColor = pAt->aLineColor; - aDstFillColor = pAt->aFillColor; - if ( pAt->nFlags & PUSH_FILLCOLOR ) - aSrcFillColor = pAt->aFillColor; - eDstROP2 = pAt->eRasterOp; - if ( pAt->nFlags & PUSH_RASTEROP ) - eSrcRasterOp = pAt->eRasterOp; - aDstFont = pAt->aFont; - if ( pAt->nFlags & PUSH_FONT ) - aSrcFont = pAt->aFont; - eDstTextAlign = pAt->eTextAlign; - if ( pAt->nFlags & ( PUSH_FONT | PUSH_TEXTALIGN ) ) - eSrcTextAlign = pAt->eTextAlign; - aDstTextColor = pAt->aTextColor; - if ( pAt->nFlags & ( PUSH_FONT | PUSH_TEXTCOLOR ) ) - aSrcTextColor = pAt->aTextColor; - if ( pAt->nFlags & PUSH_MAPMODE ) - aSrcMapMode = pAt->aMapMode; - aDstClipRegion = pAt->aClipRegion; - if ( pAt->nFlags & PUSH_CLIPREGION ) - aSrcClipRegion = pAt->aClipRegion; - - WMFRecord_RestoreDC(); - pAttrStack = pAt->pSucc; - delete pAt; - } - } - break; - - case META_EPS_ACTION : - { - const MetaEPSAction* pA = (const MetaEPSAction*)pMA; - const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() ); - - INT32 nCount = aGDIMetaFile.GetActionCount(); - for ( INT32 i = 0; i < nCount; i++ ) - { - const MetaAction* pMetaAct = aGDIMetaFile.GetAction( i ); - if ( pMetaAct->GetType() == META_BMPSCALE_ACTION ) - { - const MetaBmpScaleAction* pBmpScaleAction = (const MetaBmpScaleAction*)pMetaAct; - WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), pBmpScaleAction->GetBitmap() ); - break; - } - } - } - break; - - case META_RASTEROP_ACTION: - { - const MetaRasterOpAction* pA = (const MetaRasterOpAction*) pMA; - eSrcRasterOp=pA->GetRasterOp(); - } - break; - - case META_TRANSPARENT_ACTION: - { - aSrcLineInfo = LineInfo(); - SetLineAndFillAttr(); - WMFRecord_PolyPolygon( ( (MetaTransparentAction*) pMA )->GetPolyPolygon() ); - } - break; - - case META_FLOATTRANSPARENT_ACTION: - { - const MetaFloatTransparentAction* pA = (const MetaFloatTransparentAction*) pMA; - - GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() ); - Point aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() ); - const Size aSrcSize( aTmpMtf.GetPrefSize() ); - const Point aDestPt( pA->GetPoint() ); - const Size aDestSize( pA->GetSize() ); - const double fScaleX = aSrcSize.Width() ? (double) aDestSize.Width() / aSrcSize.Width() : 1.0; - const double fScaleY = aSrcSize.Height() ? (double) aDestSize.Height() / aSrcSize.Height() : 1.0; - long nMoveX, nMoveY; - - aSrcLineInfo = LineInfo(); - SetAllAttr(); - - if( fScaleX != 1.0 || fScaleY != 1.0 ) - { - aTmpMtf.Scale( fScaleX, fScaleY ); - aSrcPt.X() = FRound( aSrcPt.X() * fScaleX ), aSrcPt.Y() = FRound( aSrcPt.Y() * fScaleY ); - } - - nMoveX = aDestPt.X() - aSrcPt.X(), nMoveY = aDestPt.Y() - aSrcPt.Y(); - - if( nMoveX || nMoveY ) - aTmpMtf.Move( nMoveX, nMoveY ); - - WriteRecords( aTmpMtf ); - } - break; - - case( META_LAYOUTMODE_ACTION ): - { - sal_uInt32 nLayoutMode = ( (MetaLayoutModeAction*) pMA )->GetLayoutMode(); - eSrcHorTextAlign = 0; // TA_LEFT - if (nLayoutMode & TEXT_LAYOUT_BIDI_RTL) - { - eSrcHorTextAlign = W_TA_RIGHT | W_TA_RTLREADING; - } - if (nLayoutMode & TEXT_LAYOUT_TEXTORIGIN_RIGHT) - eSrcHorTextAlign |= W_TA_RIGHT; - else if (nLayoutMode & TEXT_LAYOUT_TEXTORIGIN_LEFT) - eSrcHorTextAlign &= ~W_TA_RIGHT; - break; - } - - // Unsupported Actions - case META_MASK_ACTION: - case META_MASKSCALE_ACTION: - case META_MASKSCALEPART_ACTION: - { - DBG_ERROR( "Unsupported action: MetaMask...Action!" ); - } - break; - - case META_CLIPREGION_ACTION: - break; - - case META_ISECTREGIONCLIPREGION_ACTION: - { - DBG_ERROR( "Unsupported action: MetaISectRegionClipRegionAction!" ); - } - break; - - case META_MOVECLIPREGION_ACTION: - { - DBG_ERROR( "Unsupported action: MetaMoveClipRegionAction!" ); - } - break; - } - - nWrittenActions++; - MayCallback(); - - if (pWMF->GetError()) - bStatus=FALSE; - - if(bStatus==FALSE) - break; - } - } -} - -// ------------------------------------------------------------------------ - -void WMFWriter::WriteHeader( const GDIMetaFile &, BOOL bPlaceable ) -{ - if( bPlaceable ) - { - USHORT nCheckSum, nValue; - Size aSize( pVirDev->LogicToLogic(Size(1,1),MapMode(MAP_INCH), aTargetMapMode) ); - USHORT nUnitsPerInch = (USHORT) ( ( aSize.Width() + aSize.Height() ) >> 1 ); - - nCheckSum=0; - nValue=0xcdd7; nCheckSum^=nValue; *pWMF << nValue; - nValue=0x9ac6; nCheckSum^=nValue; *pWMF << nValue; - nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue; - nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue; - nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue; - nValue=(USHORT) aTargetSize.Width(); nCheckSum^=nValue; *pWMF << nValue; - nValue=(USHORT) aTargetSize.Height(); nCheckSum^=nValue; *pWMF << nValue; - nValue=nUnitsPerInch; nCheckSum^=nValue; *pWMF << nValue; - nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue; - nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue; - *pWMF << nCheckSum; - } - - nMetafileHeaderPos=pWMF->Tell(); - *pWMF << (sal_uInt16)0x0001 // Typ: Datei - << (sal_uInt16)0x0009 // Headerlaenge in Worten - << (sal_uInt16)0x0300 // Version als BCD-Zahl - << (sal_uInt32) 0x00000000 // Dateilaenge (ohne 1. Header), wird spaeter durch UpdateHeader() berichtigt - << (sal_uInt16)MAXOBJECTHANDLES // Maximalezahl der gleichzeitigen Objekte - << (sal_uInt32) 0x00000000 // Maximale Record-laenge, wird spaeter durch UpdateHeader() berichtigt - << (sal_uInt16)0x0000; // Reserved -} - -// ------------------------------------------------------------------------ - -void WMFWriter::UpdateHeader() -{ - ULONG nPos; - sal_uInt32 nFileSize; - - nPos=pWMF->Tell(); // Endposition = Gesammtgroesse der Datei - nFileSize=nPos-nMetafileHeaderPos; // Groesse des 1. Headers abziehen - if ((nFileSize&1)!=0) { // ggf. auf ganze Worte aufrunden - *pWMF << (BYTE)0; - nPos++; - nFileSize++; - } - nFileSize>>=1; // In Anzahl Worte umrechnen - pWMF->Seek(nMetafileHeaderPos+6); // Zum Dateigroessen-Eintrag im zweiten Header - *pWMF << nFileSize; // Dateigroesse berichtigen - pWMF->SeekRel(2); // Zum Max-Record-Laenge-Eintrag im zweiten Header - *pWMF << nMaxRecordSize; // und berichtigen - pWMF->Seek(nPos); -} - -// ------------------------------------------------------------------------ - -BOOL WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream, - FilterConfigItem* pFConfigItem, BOOL bPlaceable ) -{ - WMFWriterAttrStackMember * pAt; - - bEmbedEMF = TRUE; - bStatus=TRUE; - pConvert = 0; - pVirDev = new VirtualDevice; - - pFilterConfigItem = pFConfigItem; - if ( pFilterConfigItem ) - { - xStatusIndicator = pFilterConfigItem->GetStatusIndicator(); - if ( xStatusIndicator.is() ) - { - rtl::OUString aMsg; - xStatusIndicator->start( aMsg, 100 ); - } - } - nLastPercent=0; - - pWMF=&rTargetStream; - pWMF->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); - - nMaxRecordSize=0; - - aSrcMapMode=rMTF.GetPrefMapMode(); - - if( bPlaceable ) - { - aTargetMapMode = aSrcMapMode; - aTargetSize = rMTF.GetPrefSize(); - nTargetDivisor = CalcSaveTargetMapMode(aTargetMapMode, aTargetSize); - aTargetSize.Width() /= nTargetDivisor; - aTargetSize.Height() /= nTargetDivisor; - } - else - { - aTargetMapMode = MapMode( MAP_INCH ); - - const long nUnit = pVirDev->LogicToPixel( Size( 1, 1 ), aTargetMapMode ).Width(); - const Fraction aFrac( 1, nUnit ); - - aTargetMapMode.SetScaleX( aFrac ); - aTargetMapMode.SetScaleY( aFrac ); - aTargetSize = pVirDev->LogicToLogic( rMTF.GetPrefSize(), aSrcMapMode, aTargetMapMode ); - } - - pVirDev->SetMapMode( aTargetMapMode ); - - pAttrStack=NULL; - - for (USHORT i=0; ipSucc; - delete pAt; - } - - delete pVirDev; - delete pConvert; - - if ( xStatusIndicator.is() ) - xStatusIndicator->end(); - - return bStatus; -} - -// ------------------------------------------------------------------------ - -USHORT WMFWriter::CalcSaveTargetMapMode(MapMode& rMapMode, - const Size& rPrefSize) -{ - Fraction aDivFrac(2, 1); - USHORT nDivisor = 1; - - Size aSize = pVirDev->LogicToLogic( rPrefSize, aSrcMapMode, rMapMode ); - - while( nDivisor <= 64 && (aSize.Width() > 32767 || aSize.Height() > 32767) ) - { - Fraction aFrac = rMapMode.GetScaleX(); - - aFrac *= aDivFrac; - rMapMode.SetScaleX(aFrac); - aFrac = rMapMode.GetScaleY(); - aFrac *= aDivFrac; - rMapMode.SetScaleY(aFrac); - nDivisor <<= 1; - aSize = pVirDev->LogicToLogic( rPrefSize, aSrcMapMode, rMapMode ); - } - - return nDivisor; -} - -// ------------------------------------------------------------------------ - -void WMFWriter::WriteEmbeddedEMF( const GDIMetaFile& rMTF ) -{ - EMFWriter aEMFWriter; - SvMemoryStream aStream; - - if( aEMFWriter.WriteEMF( rMTF, aStream ) ) - { - sal_Size nTotalSize = aStream.Tell(); - if( nTotalSize > SAL_MAX_UINT32 ) - return; - aStream.Seek( 0 ); - sal_uInt32 nRemainingSize = static_cast< sal_uInt32 >( nTotalSize ); - sal_uInt32 nRecCounts = ( (nTotalSize - 1) / 0x2000 ) + 1; - sal_uInt16 nCheckSum = 0, nWord; - - sal_uInt32 nPos = 0; - - while( nPos + 1 < nTotalSize ) - { - aStream >> nWord; - nCheckSum ^= nWord; - nPos += 2; - } - - nCheckSum = static_cast< sal_uInt16 >( nCheckSum * -1 ); - - aStream.Seek( 0 ); - while( nRemainingSize > 0 ) - { - sal_uInt32 nCurSize; - if( nRemainingSize > 0x2000 ) - { - nCurSize = 0x2000; - nRemainingSize -= 0x2000; - } - else - { - nCurSize = nRemainingSize; - nRemainingSize = 0; - } - WriteEMFRecord( aStream, - nCurSize, - nRemainingSize, - nTotalSize, - nRecCounts, - nCheckSum ); - nCheckSum = 0; - } - } -} - -// ------------------------------------------------------------------------ - -void WMFWriter::WriteEMFRecord( SvMemoryStream& rStream, sal_uInt32 nCurSize, sal_uInt32 nRemainingSize, - sal_uInt32 nTotalSize, sal_uInt32 nRecCounts, sal_uInt16 nCheckSum ) -{ - // according to http://msdn.microsoft.com/en-us/library/dd366152%28PROT.13%29.aspx - WriteRecordHeader( 0, W_META_ESCAPE ); - *pWMF << (sal_uInt16)W_MFCOMMENT // same as META_ESCAPE_ENHANCED_METAFILE - << (sal_uInt16)( nCurSize + 34 ) // we will always have a 34 byte escape header: - << (sal_uInt32) 0x43464D57 // WMFC - << (sal_uInt32) 0x00000001 // Comment type - << (sal_uInt32) 0x00010000 // version - << nCheckSum // check sum - << (sal_uInt32) 0 // flags = 0 - << nRecCounts // total number of records - << nCurSize // size of this record's data - << nRemainingSize // remaining size of data in following records, missing in MSDN documentation - << nTotalSize; // total size of EMF stream - - pWMF->Write( static_cast< const sal_Char* >( rStream.GetData() ) + rStream.Tell(), nCurSize ); - rStream.SeekRel( nCurSize ); - UpdateRecordHeader(); -} diff --git a/svtools/source/filter.vcl/wmf/wmfwr.hxx b/svtools/source/filter.vcl/wmf/wmfwr.hxx deleted file mode 100644 index 9fe698b22c2e..000000000000 --- a/svtools/source/filter.vcl/wmf/wmfwr.hxx +++ /dev/null @@ -1,229 +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 _WMFWR_HXX -#define _WMFWR_HXX - -#include -#include -#include -#include -#include -#include -#include - -// ----------------------------------------------------------------------------- - -#define MAXOBJECTHANDLES 16 - -// ----------------------------------------------------------------------------- - -struct WMFWriterAttrStackMember -{ - struct WMFWriterAttrStackMember * pSucc; - Color aLineColor; - Color aFillColor; - Color aTextColor; - LineInfo aLineInfo; - TextAlign eTextAlign; - RasterOp eRasterOp; - Font aFont; - MapMode aMapMode; - Region aClipRegion; - sal_uInt16 nFlags; -}; - -// ------------- -// - WMFWriter - -// ------------- - -class StarSymbolToMSMultiFont; -class LineInfo; -namespace basegfx { class B2DPolygon; } - -class WMFWriter -{ -private: - - BOOL bStatus; - - ULONG nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde. - FilterConfigItem* pFilterConfigItem; - - com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator; - - SvStream* pWMF; - VirtualDevice* pVirDev; - StarSymbolToMSMultiFont *pConvert; - MapMode aTargetMapMode; - Size aTargetSize; - USHORT nTargetDivisor; - - ULONG nMetafileHeaderPos; - sal_uInt32 nMaxRecordSize; // in Worten - ULONG nActRecordPos; - - // Aktuelle Attribute im Quell-Metafile: - Color aSrcLineColor; - Color aSrcFillColor; - Color aSrcTextColor; - LineInfo aSrcLineInfo; - RasterOp eSrcRasterOp; - FontAlign eSrcTextAlign; - Font aSrcFont; - MapMode aSrcMapMode; - BOOL bSrcIsClipping; - Region aSrcClipRegion; - WMFWriterAttrStackMember * pAttrStack; - - UINT32 eSrcHorTextAlign; - - // Aktuelle Attribute im Ziel-Metafile: - Color aDstLineColor; - Color aDstFillColor; - Color aDstTextColor; - LineInfo aDstLineInfo; - RasterOp eDstROP2; - FontAlign eDstTextAlign; - Font aDstFont; - - UINT32 eDstHorTextAlign; - - BOOL bDstIsClipping; // ???: derzeit unberuecksichtigt - Region aDstClipRegion; // ???: derzeit unberuecksichtigt - BOOL bHandleAllocated[MAXOBJECTHANDLES]; // Welche Handles vergeben sind - USHORT nDstPenHandle,nDstFontHandle,nDstBrushHandle; // Welche Handles die jeweiligen - // Selected-Objects besitzen - // 0xffff = keines: - - // Damit nicht bei jeder Operation alle Attribute verglichen werden muessen: - - ULONG nNumberOfActions; // Anzahl der Actions im GDIMetafile - ULONG nNumberOfBitmaps; // Anzahl der Bitmaps - ULONG nWrittenActions; // Anzahl der bereits verarbeiteten Actions beim Schreiben der Orders - ULONG nWrittenBitmaps; // Anzahl der bereits geschriebenen Bitmaps - ULONG nActBitmapPercent; // Wieviel Prozent die naechste Bitmap schon geschrieben ist. - - BOOL bEmbedEMF; // optionally embedd EMF data into WMF - - void MayCallback(); - // Berechnet anhand der obigen 5 Parameter eine Prozentzahl - // und macht dann ggf. einen Callback. Setzt bStatus auf FALSE wenn User abbrechen - // moechte. - - void CountActionsAndBitmaps(const GDIMetaFile & rMTF); - // Zaehlt die Bitmaps und Actions (nNumberOfActions und nNumberOfBitmaps muessen - // zu Anfang auf 0 gesetzt werden, weil diese Methode rekursiv ist) - - void WritePointXY(const Point & rPoint); - void WritePointYX(const Point & rPoint); - sal_Int32 ScaleWidth( sal_Int32 nDX ); - void WriteSize(const Size & rSize); - void WriteHeightWidth(const Size & rSize); - void WriteRectangle(const Rectangle & rRect); - void WriteColor(const Color & rColor); - - void WriteRecordHeader(sal_uInt32 nSizeWords, sal_uInt16 nType); - // nSizeWords ist die Groesse des gesammten Records in Anzahl Worte. - // Wenn nSizeWords unbekannt ist, dann 0 einsetzen (siehe UpdateRecordHeader()). - - void UpdateRecordHeader(); - // berichtig die Groesse des Records nach dem Schreiben der Parameter, wenn - // nSizeWords bei Aufruf von WriteRecordHeader(..) unbekannt war. - // fuegt ggf. noch ein BYTE 0 ein damit Anzahl Bytes immer gerade. - - void WMFRecord_Arc(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt); - void WMFRecord_Chord(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt); - void WMFRecord_CreateBrushIndirect(const Color& rColor); - void WMFRecord_CreateFontIndirect(const Font & rFont); - void WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo& rLineInfo ); - void WMFRecord_DeleteObject(USHORT nObjectHandle); - void WMFRecord_Ellipse(const Rectangle & rRect); - void WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_Int8* pData ); - sal_Bool WMFRecord_Escape_Unicode( const Point& rPoint, const String& rStr, const sal_Int32 * pDXAry ); - void WMFRecord_ExtTextOut(const Point & rPoint, const String & rString, const sal_Int32 * pDXAry); - - void TrueExtTextOut(const Point & rPoint, const String & rString, - const ByteString & rByteString, const sal_Int32 * pDXAry); - void TrueTextOut(const Point & rPoint, const ByteString& rString); - void WMFRecord_LineTo(const Point & rPoint); - void WMFRecord_MoveTo(const Point & rPoint); - void WMFRecord_Pie(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt); - void WMFRecord_Polygon(const Polygon & rPoly); - void WMFRecord_PolyLine(const Polygon & rPoly); - void WMFRecord_PolyPolygon(const PolyPolygon & rPolyPoly); - void WMFRecord_Rectangle(const Rectangle & rRect); - void WMFRecord_RestoreDC(); - void WMFRecord_RoundRect(const Rectangle & rRect, long nHorzRound, long nVertRound); - void WMFRecord_SaveDC(); - void WMFRecord_SelectObject(USHORT nObjectHandle); - void WMFRecord_SetBkColor(const Color & rColor); - void WMFRecord_SetBkMode(BOOL bTransparent); - void WMFRecord_SetStretchBltMode(); - void WMFRecord_SetPixel(const Point & rPoint, const Color & rColor); - void WMFRecord_SetROP2(RasterOp eROP); - void WMFRecord_SetTextAlign(FontAlign eFontAlign, UINT32 eHorTextAlign); - void WMFRecord_SetTextColor(const Color & rColor); - void WMFRecord_SetWindowExt(const Size & rSize); - void WMFRecord_SetWindowOrg(const Point & rPoint); - void WMFRecord_StretchDIB(const Point & rPoint, const Size & rSize, const Bitmap & rBitmap, sal_uInt32 nROP = 0UL ); - void WMFRecord_TextOut(const Point & rPoint, const String & rString); - void WMFRecord_EndOfFile(); - void WMFRecord_IntersectClipRect( const Rectangle& rRect); - - USHORT AllocHandle(); - void FreeHandle(USHORT nObjectHandle); - void CreateSelectDeletePen( const Color& rColor, const LineInfo& rLineInfo ); - void CreateSelectDeleteFont(const Font & rFont); - void CreateSelectDeleteBrush(const Color& rColor); - - void SetLineAndFillAttr(); - void SetAllAttr(); - - void HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon); - void WriteRecords(const GDIMetaFile & rMTF); - - void WriteHeader(const GDIMetaFile & rMTF, BOOL bPlaceable); - void UpdateHeader(); - - void WriteEmbeddedEMF( const GDIMetaFile& rMTF ); - void WriteEMFRecord( SvMemoryStream& rStream, sal_uInt32 nCurSize, - sal_uInt32 nRemainingSize, - sal_uInt32 nTotalSize, - sal_uInt32 nRecCounts, - sal_uInt16 nCheckSum ); - - USHORT CalcSaveTargetMapMode(MapMode& rMapMode, const Size& rPrefSize); - -public: - - WMFWriter() {} - - BOOL WriteWMF(const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pFilterConfigItem, BOOL bPlaceable=TRUE); -}; - -#endif diff --git a/svtools/source/filter/FilterConfigCache.cxx b/svtools/source/filter/FilterConfigCache.cxx new file mode 100644 index 000000000000..979eba91767d --- /dev/null +++ b/svtools/source/filter/FilterConfigCache.cxx @@ -0,0 +1,597 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" +#include "FilterConfigCache.hxx" +#include +#include +#include +#include +#include +#include +#include + +#define TOKEN_COUNT_FOR_OWN_FILTER 3 +// #define TOKEN_INDEX_FOR_IDENT 0 +#define TOKEN_INDEX_FOR_FILTER 1 +// #define TOKEN_INDEX_FOR_HASDIALOG 2 + +using namespace ::com::sun::star::lang ; // XMultiServiceFactory +using namespace ::com::sun::star::container ; // XNameAccess +using namespace ::com::sun::star::uno ; // Reference +using namespace ::com::sun::star::beans ; // PropertyValue +using namespace ::utl ; // getProcessServiceFactory(); +using ::rtl::OUString; + +const char* FilterConfigCache::FilterConfigCacheEntry::InternalPixelFilterNameList[] = +{ + IMP_BMP, IMP_GIF, IMP_PNG,IMP_JPEG, IMP_XBM, IMP_XPM, + EXP_BMP, EXP_JPEG, EXP_PNG, NULL +}; + +const char* FilterConfigCache::FilterConfigCacheEntry::InternalVectorFilterNameList[] = +{ + IMP_SVMETAFILE, IMP_WMF, IMP_EMF, IMP_SVSGF, IMP_SVSGV, IMP_SVG, + EXP_SVMETAFILE, EXP_WMF, EXP_EMF, EXP_SVG, NULL +}; + +const char* FilterConfigCache::FilterConfigCacheEntry::ExternalPixelFilterNameList[] = +{ + "egi", "icd", "ipd", "ipx", "ipb", "epb", "epg", + "epp", "ira", "era", "itg", "iti", "eti", "exp", NULL +}; + +sal_Bool FilterConfigCache::FilterConfigCacheEntry::IsValid() +{ + return sFilterName.Len() != 0; +} + +sal_Bool FilterConfigCache::bInitialized = sal_False; +sal_Int32 FilterConfigCache::nIndType = -1; +sal_Int32 FilterConfigCache::nIndUIName = -1; +sal_Int32 FilterConfigCache::nIndDocumentService = -1; +sal_Int32 FilterConfigCache::nIndFilterService = -1; +sal_Int32 FilterConfigCache::nIndFlags = -1; +sal_Int32 FilterConfigCache::nIndUserData = -1; +sal_Int32 FilterConfigCache::nIndFileFormatVersion = -1; +sal_Int32 FilterConfigCache::nIndTemplateName = -1; + +sal_Bool FilterConfigCache::FilterConfigCacheEntry::CreateFilterName( const OUString& rUserDataEntry ) +{ + bIsPixelFormat = bIsInternalFilter = sal_False; + sFilterName = String( rUserDataEntry ); + const char** pPtr; + for ( pPtr = InternalPixelFilterNameList; *pPtr && ( bIsInternalFilter == sal_False ); pPtr++ ) + { + if ( sFilterName.EqualsIgnoreCaseAscii( *pPtr ) ) + { + bIsInternalFilter = sal_True; + bIsPixelFormat = sal_True; + } + } + for ( pPtr = InternalVectorFilterNameList; *pPtr && ( bIsInternalFilter == sal_False ); pPtr++ ) + { + if ( sFilterName.EqualsIgnoreCaseAscii( *pPtr ) ) + bIsInternalFilter = sal_True; + } + if ( !bIsInternalFilter ) + { + for ( pPtr = ExternalPixelFilterNameList; *pPtr && ( bIsPixelFormat == sal_False ); pPtr++ ) + { + if ( sFilterName.EqualsIgnoreCaseAscii( *pPtr ) ) + bIsPixelFormat = sal_True; + } + String aTemp( OUString::createFromAscii( SVLIBRARY( "?" ) ) ); + xub_StrLen nIndex = aTemp.Search( (sal_Unicode)'?' ); + aTemp.Replace( nIndex, 1, sFilterName ); + sFilterName = aTemp; + } + return sFilterName.Len() != 0; +} + +String FilterConfigCache::FilterConfigCacheEntry::GetShortName() +{ + String aShortName; + if ( lExtensionList.getLength() ) + { + aShortName = lExtensionList[ 0 ]; + if ( aShortName.SearchAscii( "*.", 0 ) == 0 ) + aShortName.Erase( 0, 2 ); + } + return aShortName; +} + +/** helper to open the configuration root of the underlying + config package + + @param sPackage + specify, which config package should be opened. + Must be one of the defined static values TYPEPKG or FILTERPKG. + + @return A valid object if open was successfull. The access on opened + data will be readonly. It returns NULL in case open failed. + + @throws It let pass RuntimeExceptions only. + */ +Reference< XInterface > openConfig(const char* sPackage) + throw(RuntimeException) +{ + static OUString TYPEPKG( RTL_CONSTASCII_USTRINGPARAM( "types" ) ); + static OUString FILTERPKG( RTL_CONSTASCII_USTRINGPARAM( "filters" ) ); + + Reference< XMultiServiceFactory > xSMGR = getProcessServiceFactory(); + Reference< XInterface > xCfg; + try + { + // get access to config API (not to file!) + Reference< XMultiServiceFactory > xConfigProvider( xSMGR->createInstance( + OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider")), UNO_QUERY); + + if (xConfigProvider.is()) + { + Sequence< Any > lParams(1); + PropertyValue aParam ; + + // define cfg path for open + aParam.Name = OUString::createFromAscii("nodepath"); + if (TYPEPKG.equalsIgnoreAsciiCaseAscii(sPackage)) + aParam.Value <<= OUString::createFromAscii("/org.openoffice.TypeDetection.Types/Types"); + if (FILTERPKG.equalsIgnoreAsciiCaseAscii(sPackage)) + aParam.Value <<= OUString::createFromAscii("/org.openoffice.TypeDetection.GraphicFilter/Filters"); + lParams[0] = makeAny(aParam); + + // get access to file + xCfg = xConfigProvider->createInstanceWithArguments( + OUString::createFromAscii("com.sun.star.configuration.ConfigurationAccess"), lParams); + } + } + catch(const RuntimeException&) + { throw; } + catch(const Exception&) + { xCfg.clear(); } + + return xCfg; +} + +void FilterConfigCache::ImplInit() +{ + static OUString STYPE ( RTL_CONSTASCII_USTRINGPARAM( "Type" ) ); + static OUString SUINAME ( RTL_CONSTASCII_USTRINGPARAM( "UIName" ) ); + static OUString SDOCUMENTSERVICE ( RTL_CONSTASCII_USTRINGPARAM( "DocumentService" ) ); + static OUString SFILTERSERVICE ( RTL_CONSTASCII_USTRINGPARAM( "FilterService" ) ); + static OUString STEMPLATENAME ( RTL_CONSTASCII_USTRINGPARAM( "TemplateName" ) ); + static OUString SFILEFORMATVERSION ( RTL_CONSTASCII_USTRINGPARAM( "FileFormatVersion" ) ); + static OUString SUICOMPONENT ( RTL_CONSTASCII_USTRINGPARAM( "UIComponent" ) ); + static OUString SFLAGS ( RTL_CONSTASCII_USTRINGPARAM( "Flags" ) ); + static OUString SUSERDATA ( RTL_CONSTASCII_USTRINGPARAM( "UserData" ) ); + static OUString SMEDIATYPE ( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) ); + static OUString SEXTENSIONS ( RTL_CONSTASCII_USTRINGPARAM( "Extensions" ) ); + static OUString SFORMATNAME ( RTL_CONSTASCII_USTRINGPARAM( "FormatName" ) ); + static OUString SREALFILTERNAME ( RTL_CONSTASCII_USTRINGPARAM( "RealFilterName" ) ); + + // get access to config + Reference< XNameAccess > xTypeAccess ( openConfig("types" ), UNO_QUERY ); + Reference< XNameAccess > xFilterAccess( openConfig("filters"), UNO_QUERY ); + + if ( xTypeAccess.is() && xFilterAccess.is() ) + { + Sequence< OUString > lAllFilter = xFilterAccess->getElementNames(); + sal_Int32 nAllFilterCount = lAllFilter.getLength(); + + for ( sal_Int32 i = 0; i < nAllFilterCount; i++ ) + { + OUString sInternalFilterName = lAllFilter[ i ]; + Reference< XPropertySet > xFilterSet; + xFilterAccess->getByName( sInternalFilterName ) >>= xFilterSet; + if (!xFilterSet.is()) + continue; + + FilterConfigCacheEntry aEntry; + + aEntry.sInternalFilterName = sInternalFilterName; + xFilterSet->getPropertyValue(STYPE) >>= aEntry.sType; + xFilterSet->getPropertyValue(SUINAME) >>= aEntry.sUIName; + xFilterSet->getPropertyValue(SREALFILTERNAME) >>= aEntry.sFilterType; + Sequence< OUString > lFlags; + xFilterSet->getPropertyValue(SFLAGS) >>= lFlags; + if (lFlags.getLength()!=1 || !lFlags[0].getLength()) + continue; + if (lFlags[0].equalsIgnoreAsciiCaseAscii("import")) + aEntry.nFlags = 1; + else + if (lFlags[0].equalsIgnoreAsciiCaseAscii("export")) + aEntry.nFlags = 2; + + OUString sUIComponent; + xFilterSet->getPropertyValue(SUICOMPONENT) >>= sUIComponent; + aEntry.bHasDialog = sUIComponent.getLength(); + + ::rtl::OUString sFormatName; + xFilterSet->getPropertyValue(SFORMATNAME) >>= sFormatName; + aEntry.CreateFilterName( sFormatName ); + + Reference< XPropertySet > xTypeSet; + xTypeAccess->getByName( aEntry.sType ) >>= xTypeSet; + if (!xTypeSet.is()) + continue; + + xTypeSet->getPropertyValue(SMEDIATYPE) >>= aEntry.sMediaType; + xTypeSet->getPropertyValue(SEXTENSIONS) >>= aEntry.lExtensionList; + + // The first extension will be used + // to generate our internal FilterType ( BMP, WMF ... ) + String aExtension( aEntry.GetShortName() ); + if (aExtension.Len() != 3) + continue; + + if ( aEntry.nFlags & 1 ) + aImport.push_back( aEntry ); + if ( aEntry.nFlags & 2 ) + aExport.push_back( aEntry ); + + // bFilterEntryCreated!? + if (!( aEntry.nFlags & 3 )) + continue; //? Entry was already inserted ... but following code will be supressed?! + } + } +}; + +const char* FilterConfigCache::InternalFilterListForSvxLight[] = +{ + "bmp","1","SVBMP", + "bmp","2","SVBMP", + "dxf","1","idx", + "eps","1","ips", + "eps","2","eps", + "gif","1","SVIGIF", + "gif","2","egi", + "jpg","1","SVIJPEG", + "jpg","2","SVEJPEG", + "sgv","1","SVSGV", + "sgf","1","SVSGF", + "met","1","ime", + "met","2","eme", + "png","1","SVIPNG", + "png","2","SVEPNG", + "pct","1","ipt", + "pct","2","ept", + "pcd","1","icd", + "psd","1","ipd", + "pcx","1","ipx", + "pbm","1","ipb", + "pbm","2","epb", + "pgm","1","ipb", + "pgm","2","epg", + "ppm","1","ipb", + "ppm","2","epp", + "ras","1","ira", + "ras","2","era", + "svm","1","SVMETAFILE", + "svm","2","SVMETAFILE", + "tga","1","itg", + "tif","1","iti", + "tif","2","eti", + "emf","1","SVEMF", + "emf","2","SVEMF", + "wmf","1","SVWMF", + "wmf","2","SVWMF", + "xbm","1","SVIXBM", + "xpm","1","SVIXPM", + "xpm","2","exp", + "svg","1","SVISVG", + "svg","2","SVESVG", + NULL +}; + +void FilterConfigCache::ImplInitSmart() +{ + const char** pPtr; + for ( pPtr = InternalFilterListForSvxLight; *pPtr; pPtr++ ) + { + FilterConfigCacheEntry aEntry; + + OUString sExtension( OUString::createFromAscii( *pPtr++ ) ); + + aEntry.lExtensionList.realloc( 1 ); + aEntry.lExtensionList[ 0 ] = sExtension; + + aEntry.sType = sExtension; + aEntry.sUIName = sExtension; + + ByteString sFlags( *pPtr++ ); + aEntry.nFlags = sFlags.ToInt32(); + + OUString sUserData( OUString::createFromAscii( *pPtr ) ); + aEntry.CreateFilterName( sUserData ); + + if ( aEntry.nFlags & 1 ) + aImport.push_back( aEntry ); + if ( aEntry.nFlags & 2 ) + aExport.push_back( aEntry ); + } +} + +// ------------------------------------------------------------------------ + +FilterConfigCache::FilterConfigCache( sal_Bool bConfig ) : + bUseConfig ( bConfig ) +{ + if ( bUseConfig ) + ImplInit(); + else + ImplInitSmart(); +} + +FilterConfigCache::~FilterConfigCache() +{ + +} + +String FilterConfigCache::GetImportFilterName( sal_uInt16 nFormat ) +{ + if( nFormat < aImport.size() ) + return aImport[ nFormat ].sFilterName; + return String::EmptyString(); +} + +sal_uInt16 FilterConfigCache::GetImportFormatNumber( const String& rFormatName ) +{ + CacheVector::iterator aIter( aImport.begin() ); + while ( aIter != aImport.end() ) + { + if ( aIter->sUIName.equalsIgnoreAsciiCase( rFormatName ) ) + break; + aIter++; + } + return sal::static_int_cast< sal_uInt16 >(aIter == aImport.end() ? GRFILTER_FORMAT_NOTFOUND : aIter - aImport.begin()); +} + +sal_uInt16 FilterConfigCache::GetImportFormatNumberForMediaType( const String& rMediaType ) +{ + CacheVector::iterator aIter( aImport.begin() ); + while ( aIter != aImport.end() ) + { + if ( aIter->sMediaType.equalsIgnoreAsciiCase( rMediaType ) ) + break; + aIter++; + } + return sal::static_int_cast< sal_uInt16 >(aIter == aImport.end() ? GRFILTER_FORMAT_NOTFOUND : aIter - aImport.begin()); +} + +sal_uInt16 FilterConfigCache::GetImportFormatNumberForShortName( const String& rShortName ) +{ + CacheVector::iterator aIter( aImport.begin() ); + while ( aIter != aImport.end() ) + { + if ( aIter->GetShortName().EqualsIgnoreCaseAscii( rShortName ) ) + break; + aIter++; + } + return sal::static_int_cast< sal_uInt16 >(aIter == aImport.end() ? GRFILTER_FORMAT_NOTFOUND : aIter - aImport.begin()); +} + +sal_uInt16 FilterConfigCache::GetImportFormatNumberForTypeName( const String& rType ) +{ + CacheVector::iterator aIter( aImport.begin() ); + while ( aIter != aImport.end() ) + { + if ( aIter->sType.equalsIgnoreAsciiCase( rType ) ) + break; + aIter++; + } + return sal::static_int_cast< sal_uInt16 >(aIter == aImport.end() ? GRFILTER_FORMAT_NOTFOUND : aIter - aImport.begin()); +} + +String FilterConfigCache::GetImportFormatName( sal_uInt16 nFormat ) +{ + if( nFormat < aImport.size() ) + return aImport[ nFormat ].sUIName; + return String::EmptyString(); +} + +String FilterConfigCache::GetImportFormatMediaType( sal_uInt16 nFormat ) +{ + if( nFormat < aImport.size() ) + return aImport[ nFormat ].sMediaType; + return String::EmptyString(); +} + +String FilterConfigCache::GetImportFormatShortName( sal_uInt16 nFormat ) +{ + if( nFormat < aImport.size() ) + return aImport[ nFormat ].GetShortName(); + return String::EmptyString(); +} + +String FilterConfigCache::GetImportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry ) +{ + if ( (nFormat < aImport.size()) && (nEntry < aImport[ nFormat ].lExtensionList.getLength()) ) + return aImport[ nFormat ].lExtensionList[ nEntry ]; + return String::EmptyString(); +} + +String FilterConfigCache::GetImportFilterType( sal_uInt16 nFormat ) +{ + if( nFormat < aImport.size() ) + return aImport[ nFormat ].sType; + return String::EmptyString(); +} + +String FilterConfigCache::GetImportFilterTypeName( sal_uInt16 nFormat ) +{ + if( nFormat < aImport.size() ) + return aImport[ nFormat ].sFilterType; + return String::EmptyString(); +} + +String FilterConfigCache::GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry ) +{ + String aWildcard( GetImportFormatExtension( nFormat, nEntry ) ); + if ( aWildcard.Len() ) + aWildcard.Insert( UniString::CreateFromAscii( "*.", 2 ), 0 ); + return aWildcard; +} + +sal_Bool FilterConfigCache::IsImportInternalFilter( sal_uInt16 nFormat ) +{ + return (nFormat < aImport.size()) && aImport[ nFormat ].bIsInternalFilter; +} + +sal_Bool FilterConfigCache::IsImportPixelFormat( sal_uInt16 nFormat ) +{ + return (nFormat < aImport.size()) && aImport[ nFormat ].bIsPixelFormat; +} + +sal_Bool FilterConfigCache::IsImportDialog( sal_uInt16 nFormat ) +{ + return (nFormat < aImport.size()) && aImport[ nFormat ].bHasDialog; +} + +// ------------------------------------------------------------------------ + +String FilterConfigCache::GetExportFilterName( sal_uInt16 nFormat ) +{ + if( nFormat < aExport.size() ) + return aExport[ nFormat ].sFilterName; + return String::EmptyString(); +} + +sal_uInt16 FilterConfigCache::GetExportFormatNumber( const String& rFormatName ) +{ + CacheVector::iterator aIter( aExport.begin() ); + while ( aIter != aExport.end() ) + { + if ( aIter->sUIName.equalsIgnoreAsciiCase( rFormatName ) ) + break; + aIter++; + } + return sal::static_int_cast< sal_uInt16 >(aIter == aExport.end() ? GRFILTER_FORMAT_NOTFOUND : aIter - aExport.begin()); +} + +sal_uInt16 FilterConfigCache::GetExportFormatNumberForMediaType( const String& rMediaType ) +{ + CacheVector::iterator aIter( aExport.begin() ); + while ( aIter != aExport.end() ) + { + if ( aIter->sMediaType.equalsIgnoreAsciiCase( rMediaType ) ) + break; + aIter++; + } + return sal::static_int_cast< sal_uInt16 >(aIter == aExport.end() ? GRFILTER_FORMAT_NOTFOUND : aIter - aExport.begin()); +} + +sal_uInt16 FilterConfigCache::GetExportFormatNumberForShortName( const String& rShortName ) +{ + CacheVector::iterator aIter( aExport.begin() ); + while ( aIter != aExport.end() ) + { + if ( aIter->GetShortName().EqualsIgnoreCaseAscii( rShortName ) ) + break; + aIter++; + } + return sal::static_int_cast< sal_uInt16 >(aIter == aExport.end() ? GRFILTER_FORMAT_NOTFOUND : aIter - aExport.begin()); +} + +sal_uInt16 FilterConfigCache::GetExportFormatNumberForTypeName( const String& rType ) +{ + CacheVector::iterator aIter( aExport.begin() ); + while ( aIter != aExport.end() ) + { + if ( aIter->sType.equalsIgnoreAsciiCase( rType ) ) + break; + aIter++; + } + return sal::static_int_cast< sal_uInt16 >(aIter == aExport.end() ? GRFILTER_FORMAT_NOTFOUND : aIter - aExport.begin()); +} + +String FilterConfigCache::GetExportFormatName( sal_uInt16 nFormat ) +{ + if( nFormat < aExport.size() ) + return aExport[ nFormat ].sUIName; + return String::EmptyString(); +} + +String FilterConfigCache::GetExportFormatMediaType( sal_uInt16 nFormat ) +{ + if( nFormat < aExport.size() ) + return aExport[ nFormat ].sMediaType; + return String::EmptyString(); +} + +String FilterConfigCache::GetExportFormatShortName( sal_uInt16 nFormat ) +{ + if( nFormat < aExport.size() ) + return aExport[ nFormat ].GetShortName(); + return String::EmptyString(); +} + +String FilterConfigCache::GetExportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry ) +{ + if ( (nFormat < aExport.size()) && (nEntry < aExport[ nFormat ].lExtensionList.getLength()) ) + return aExport[ nFormat ].lExtensionList[ nEntry ]; + return String::EmptyString(); +} + +String FilterConfigCache::GetExportFilterTypeName( sal_uInt16 nFormat ) +{ + if( nFormat < aExport.size() ) + return aExport[ nFormat ].sFilterType; + return String::EmptyString(); +} + +String FilterConfigCache::GetExportInternalFilterName( sal_uInt16 nFormat ) +{ + if( nFormat < aExport.size() ) + return aExport[ nFormat ].sInternalFilterName; + return String::EmptyString(); +} + +String FilterConfigCache::GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry ) +{ + String aWildcard( GetExportFormatExtension( nFormat, nEntry ) ); + if ( aWildcard.Len() ) + aWildcard.Insert( UniString::CreateFromAscii( "*.", 2 ), 0 ); + return aWildcard; +} + +sal_Bool FilterConfigCache::IsExportInternalFilter( sal_uInt16 nFormat ) +{ + return (nFormat < aExport.size()) && aExport[ nFormat ].bIsInternalFilter; +} + +sal_Bool FilterConfigCache::IsExportPixelFormat( sal_uInt16 nFormat ) +{ + return (nFormat < aExport.size()) && aExport[ nFormat ].bIsPixelFormat; +} + +sal_Bool FilterConfigCache::IsExportDialog( sal_uInt16 nFormat ) +{ + return (nFormat < aExport.size()) && aExport[ nFormat ].bHasDialog; +} + +// ------------------------------------------------------------------------ diff --git a/svtools/source/filter/FilterConfigCache.hxx b/svtools/source/filter/FilterConfigCache.hxx new file mode 100644 index 000000000000..2c6b7361e540 --- /dev/null +++ b/svtools/source/filter/FilterConfigCache.hxx @@ -0,0 +1,145 @@ +/************************************************************************* + * + * 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 _FILTER_CONFIG_CACHE_HXX_ +#define _FILTER_CONFIG_CACHE_HXX_ + +#include "svtools/svtdllapi.h" +#include +#include +#include +#include +#include + +#ifndef INCLUDED_VECTOR +#include +#define INCLUDED_VECTOR +#endif + +class SVT_DLLPUBLIC FilterConfigCache +{ + struct FilterConfigCacheEntry + { + ::rtl::OUString sInternalFilterName; + ::rtl::OUString sType; + ::com::sun::star::uno::Sequence< ::rtl::OUString > lExtensionList; + ::rtl::OUString sUIName; + ::rtl::OUString sDocumentService; + ::rtl::OUString sFilterService; + ::rtl::OUString sTemplateName; + + ::rtl::OUString sMediaType; + ::rtl::OUString sFilterType; + + sal_Int32 nFlags; + sal_Int32 nFileFormatVersion; + + // user data + String sFilterName; + sal_Bool bHasDialog : 1; + sal_Bool bIsInternalFilter : 1; + sal_Bool bIsPixelFormat : 1; + + sal_Bool IsValid(); + sal_Bool CreateFilterName( const ::rtl::OUString& rUserDataEntry ); + String GetShortName( ); + + static const char* InternalPixelFilterNameList[]; + static const char* InternalVectorFilterNameList[]; + static const char* ExternalPixelFilterNameList[]; + }; + + typedef std::vector< FilterConfigCacheEntry > CacheVector; + + + CacheVector aImport; + CacheVector aExport; + sal_Bool bUseConfig; + + static sal_Bool bInitialized; + static sal_Int32 nIndType; + static sal_Int32 nIndUIName; + static sal_Int32 nIndDocumentService; + static sal_Int32 nIndFilterService; + static sal_Int32 nIndFlags; + static sal_Int32 nIndUserData; + static sal_Int32 nIndFileFormatVersion; + static sal_Int32 nIndTemplateName; + + static const char* InternalFilterListForSvxLight[]; + + SVT_DLLPRIVATE void ImplInit(); + SVT_DLLPRIVATE void ImplInitSmart(); + + public : + + sal_uInt16 GetImportFormatCount() const + { return sal::static_int_cast< sal_uInt16 >(aImport.size()); }; + sal_uInt16 GetImportFormatNumber( const String& rFormatName ); + sal_uInt16 GetImportFormatNumberForMediaType( const String& rMediaType ); + sal_uInt16 GetImportFormatNumberForShortName( const String& rShortName ); + sal_uInt16 GetImportFormatNumberForTypeName( const String& rType ); + String GetImportFilterName( sal_uInt16 nFormat ); + String GetImportFormatName( sal_uInt16 nFormat ); + String GetImportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0); + String GetImportFormatMediaType( sal_uInt16 nFormat ); + String GetImportFormatShortName( sal_uInt16 nFormat ); + String GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry ); + String GetImportFilterType( sal_uInt16 nFormat ); + String GetImportFilterTypeName( sal_uInt16 nFormat ); + + sal_Bool IsImportInternalFilter( sal_uInt16 nFormat ); + sal_Bool IsImportPixelFormat( sal_uInt16 nFormat ); + sal_Bool IsImportDialog( sal_uInt16 nFormat ); + + sal_uInt16 GetExportFormatCount() const + { return sal::static_int_cast< sal_uInt16 >(aExport.size()); }; + sal_uInt16 GetExportFormatNumber( const String& rFormatName ); + sal_uInt16 GetExportFormatNumberForMediaType( const String& rMediaType ); + sal_uInt16 GetExportFormatNumberForShortName( const String& rShortName ); + sal_uInt16 GetExportFormatNumberForTypeName( const String& rType ); + String GetExportFilterName( sal_uInt16 nFormat ); + String GetExportFormatName( sal_uInt16 nFormat ); + String GetExportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0 ); + String GetExportFormatMediaType( sal_uInt16 nFormat ); + String GetExportFormatShortName( sal_uInt16 nFormat ); + String GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry ); + String GetExportFilterTypeName( sal_uInt16 nFormat ); + String GetExportInternalFilterName( sal_uInt16 nFormat ); + + sal_Bool IsExportInternalFilter( sal_uInt16 nFormat ); + sal_Bool IsExportPixelFormat( sal_uInt16 nFormat ); + sal_Bool IsExportDialog( sal_uInt16 nFormat ); + + FilterConfigCache( sal_Bool bUseConfig ); + ~FilterConfigCache(); + +}; + +#endif // _FILTER_CONFIG_CACHE_HXX_ + diff --git a/svtools/source/filter/FilterConfigItem.cxx b/svtools/source/filter/FilterConfigItem.cxx new file mode 100644 index 000000000000..312f62af9d84 --- /dev/null +++ b/svtools/source/filter/FilterConfigItem.cxx @@ -0,0 +1,623 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +using ::rtl::OUString; +using namespace ::utl ; // getProcessServiceFactory +using namespace ::com::sun::star::lang ; // XMultiServiceFactory +using namespace ::com::sun::star::beans ; // PropertyValue +using namespace ::com::sun::star::uno ; // Reference +using namespace ::com::sun::star::util ; // XChangesBatch +using namespace ::com::sun::star::awt ; // Size +using namespace ::com::sun::star::container ; // +using namespace ::com::sun::star::task ; // XStatusIndicator + +static sal_Bool ImpIsTreeAvailable( Reference< XMultiServiceFactory >& rXCfgProv, const String& rTree ) +{ + sal_Bool bAvailable = rTree.Len() != 0; + if ( bAvailable ) + { + xub_StrLen nTokenCount = rTree.GetTokenCount( (sal_Unicode)'/' ); + xub_StrLen i = 0; + + if ( rTree.GetChar( 0 ) == (sal_Unicode)'/' ) + i++; + if ( rTree.GetChar( rTree.Len() - 1 ) == (sal_Unicode)'/' ) + nTokenCount--; + + Any aAny; + aAny <<= (OUString)rTree.GetToken( i++, (sal_Unicode)'/' ); + + // creation arguments: nodepath + PropertyValue aPathArgument; + aPathArgument.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) ); + aPathArgument.Value = aAny; + + Sequence< Any > aArguments( 1 ); + aArguments[ 0 ] <<= aPathArgument; + + Reference< XInterface > xReadAccess; + try + { + xReadAccess = rXCfgProv->createInstanceWithArguments( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationAccess" ) ), + aArguments ); + } + catch ( ::com::sun::star::uno::Exception& ) + { + bAvailable = sal_False; + } + if ( xReadAccess.is() ) + { + for ( ; bAvailable && ( i < nTokenCount ); i++ ) + { + Reference< XHierarchicalNameAccess > xHierarchicalNameAccess + ( xReadAccess, UNO_QUERY ); + + if ( !xHierarchicalNameAccess.is() ) + bAvailable = sal_False; + else + { + String aNode( rTree.GetToken( i, (sal_Unicode)'/' ) ); + if ( !xHierarchicalNameAccess->hasByHierarchicalName( aNode ) ) + bAvailable = sal_False; + else + { + Any a( xHierarchicalNameAccess->getByHierarchicalName( aNode ) ); + try + { + a >>= xReadAccess; + } + catch ( ::com::sun::star::uno::Exception& ) + { + bAvailable = sal_False; + } + } + } + } + } + } + return bAvailable; +} + +void FilterConfigItem::ImpInitTree( const String& rSubTree ) +{ + bModified = sal_False; + + OUString sTree( ConfigManager::GetConfigBaseURL() ); + sTree += rSubTree; + Reference< XMultiServiceFactory > xSMGR = getProcessServiceFactory(); // get global uno service manager + + Reference< XMultiServiceFactory > xCfgProv( + xSMGR->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationProvider" ) ) ), + UNO_QUERY ); + + if ( xCfgProv.is() ) + { + if ( ImpIsTreeAvailable( xCfgProv, String( sTree ) ) ) + { + Any aAny; + // creation arguments: nodepath + PropertyValue aPathArgument; + aAny <<= sTree; + aPathArgument.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) ); + aPathArgument.Value = aAny; + + // creation arguments: commit mode + PropertyValue aModeArgument; + sal_Bool bAsyncron = sal_True; + aAny <<= bAsyncron; + aModeArgument.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "lazywrite" ) ); + aModeArgument.Value = aAny; + + Sequence< Any > aArguments( 2 ); + aArguments[ 0 ] <<= aPathArgument; + aArguments[ 1 ] <<= aModeArgument; + + try + { + xUpdatableView = xCfgProv->createInstanceWithArguments( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationUpdateAccess" ) ), + aArguments ); + if ( xUpdatableView.is() ) + xPropSet = Reference< XPropertySet >( xUpdatableView, UNO_QUERY ); + } + catch ( ::com::sun::star::uno::Exception& ) + { + DBG_ERROR( "FilterConfigItem::FilterConfigItem - Could not access configuration Key" ); + } + } + } +} + +FilterConfigItem::FilterConfigItem( const OUString& rSubTree ) +{ + ImpInitTree( rSubTree ); +} + +FilterConfigItem::FilterConfigItem( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData ) +{ + if ( pFilterData ) + aFilterData = *pFilterData; +} + +FilterConfigItem::FilterConfigItem( const OUString& rSubTree, + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData ) +{ + ImpInitTree( rSubTree ); + + if ( pFilterData ) + aFilterData = *pFilterData; +}; + +FilterConfigItem::~FilterConfigItem() +{ + if ( xUpdatableView.is() ) + { + if ( xPropSet.is() && bModified ) + { + Reference< XChangesBatch > xUpdateControl( xUpdatableView, UNO_QUERY ); + if ( xUpdateControl.is() ) + { + try + { + xUpdateControl->commitChanges(); + } + catch ( ::com::sun::star::uno::Exception& ) + { + DBG_ERROR( "FilterConfigItem::FilterConfigItem - Could not update configuration data" ); + } + } + } + } +} + +sal_Bool FilterConfigItem::ImplGetPropertyValue( Any& rAny, const Reference< XPropertySet >& rXPropSet, const OUString& rString, sal_Bool bTestPropertyAvailability ) +{ + sal_Bool bRetValue = sal_True; + + if ( rXPropSet.is() ) + { + if ( bTestPropertyAvailability ) + { + bRetValue = sal_False; + try + { + Reference< XPropertySetInfo > + aXPropSetInfo( rXPropSet->getPropertySetInfo() ); + if ( aXPropSetInfo.is() ) + bRetValue = aXPropSetInfo->hasPropertyByName( rString ); + } + catch( ::com::sun::star::uno::Exception& ) + { + // + } + } + if ( bRetValue ) + { + try + { + rAny = rXPropSet->getPropertyValue( rString ); + if ( !rAny.hasValue() ) + bRetValue = sal_False; + } + catch( ::com::sun::star::uno::Exception& ) + { + bRetValue = sal_False; + } + } + } + else + bRetValue = sal_False; + return bRetValue; +} + + +// if property is available it returns a pointer, +// otherwise the result is null +PropertyValue* FilterConfigItem::GetPropertyValue( Sequence< PropertyValue >& rPropSeq, const OUString& rName ) +{ + PropertyValue* pPropValue = NULL; + + sal_Int32 i, nCount; + for ( i = 0, nCount = rPropSeq.getLength(); i < nCount; i++ ) + { + if ( rPropSeq[ i ].Name == rName ) + { + pPropValue = &rPropSeq[ i ]; + break; + } + } + return pPropValue; +} + +/* if PropertySequence already includes a PropertyValue using the same name, the + corresponding PropertyValue is replaced, otherwise the given PropertyValue + will be appended */ + +sal_Bool FilterConfigItem::WritePropertyValue( Sequence< PropertyValue >& rPropSeq, const PropertyValue& rPropValue ) +{ + sal_Bool bRet = sal_False; + if ( rPropValue.Name.getLength() ) + { + sal_Int32 i, nCount; + for ( i = 0, nCount = rPropSeq.getLength(); i < nCount; i++ ) + { + if ( rPropSeq[ i ].Name == rPropValue.Name ) + break; + } + if ( i == nCount ) + rPropSeq.realloc( ++nCount ); + + rPropSeq[ i ] = rPropValue; + + bRet = sal_True; + } + return bRet; +} + +sal_Bool FilterConfigItem::ReadBool( const OUString& rKey, sal_Bool bDefault ) +{ + Any aAny; + sal_Bool bRetValue = bDefault; + PropertyValue* pPropVal = GetPropertyValue( aFilterData, rKey ); + if ( pPropVal ) + { + pPropVal->Value >>= bRetValue; + } + else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) + { + aAny >>= bRetValue; + } + PropertyValue aBool; + aBool.Name = rKey; + aBool.Value <<= bRetValue; + WritePropertyValue( aFilterData, aBool ); + return bRetValue; +} + +sal_Int32 FilterConfigItem::ReadInt32( const OUString& rKey, sal_Int32 nDefault ) +{ + Any aAny; + sal_Int32 nRetValue = nDefault; + PropertyValue* pPropVal = GetPropertyValue( aFilterData, rKey ); + if ( pPropVal ) + { + pPropVal->Value >>= nRetValue; + } + else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) + { + aAny >>= nRetValue; + } + PropertyValue aInt32; + aInt32.Name = rKey; + aInt32.Value <<= nRetValue; + WritePropertyValue( aFilterData, aInt32 ); + return nRetValue; +} + + +Size FilterConfigItem::ReadSize( const OUString& rKey, const Size& rDefault ) +{ + Any aAny; + Size aRetValue( rDefault ); + + const OUString sWidth( RTL_CONSTASCII_USTRINGPARAM( "LogicalWidth" ) ); + const OUString sHeight( RTL_CONSTASCII_USTRINGPARAM( "LogicalHeight" ) ); + + Reference< XPropertySet > aXPropSet; + try + { + PropertyValue* pPropWidth = GetPropertyValue( aFilterData, sWidth ); + PropertyValue* pPropHeight= GetPropertyValue( aFilterData, sHeight ); + if ( pPropWidth && pPropHeight ) + { + pPropWidth->Value >>= aRetValue.Width; + pPropHeight->Value >>= aRetValue.Height; + } + else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) + { + if ( aAny >>= aXPropSet ) + { + if ( ImplGetPropertyValue( aAny, aXPropSet, sWidth, sal_True ) ) + aAny >>= aRetValue.Width; + if ( ImplGetPropertyValue( aAny, aXPropSet, sHeight, sal_True ) ) + aAny >>= aRetValue.Height; + } + } + } + catch ( ::com::sun::star::uno::Exception& ) + { + DBG_ERROR( "FilterConfigItem::ReadSize - could not read PropertyValue" ); + } + PropertyValue aWidth; + aWidth.Name = sWidth; + aWidth.Value <<= aRetValue.Width; + WritePropertyValue( aFilterData, aWidth ); + PropertyValue aHeight; + aHeight.Name = sHeight; + aHeight.Value <<= aRetValue.Height; + WritePropertyValue( aFilterData, aHeight ); + return aRetValue; +} + +OUString FilterConfigItem::ReadString( const OUString& rKey, const OUString& rDefault ) +{ + Any aAny; + OUString aRetValue( rDefault ); + PropertyValue* pPropVal = GetPropertyValue( aFilterData, rKey ); + if ( pPropVal ) + { + pPropVal->Value >>= aRetValue; + } + else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) + { + aAny >>= aRetValue; + } + PropertyValue aString; + aString.Name = rKey; + aString.Value <<= aRetValue; + WritePropertyValue( aFilterData, aString ); + return aRetValue; +} + +Any FilterConfigItem::ReadAny( const ::rtl::OUString& rKey, const Any& rDefault ) +{ + Any aAny, aRetValue( rDefault ); + PropertyValue* pPropVal = GetPropertyValue( aFilterData, rKey ); + if ( pPropVal ) + { + aRetValue = pPropVal->Value; + } + else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) + { + aRetValue = aAny; + } + PropertyValue aPropValue; + aPropValue.Name = rKey; + aPropValue.Value = aRetValue; + WritePropertyValue( aFilterData, aPropValue ); + return aRetValue; +} + +void FilterConfigItem::WriteBool( const OUString& rKey, sal_Bool bNewValue ) +{ + PropertyValue aBool; + aBool.Name = rKey; + aBool.Value <<= bNewValue; + WritePropertyValue( aFilterData, aBool ); + + if ( xPropSet.is() ) + { + Any aAny; + if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) + { + sal_Bool bOldValue; + if ( aAny >>= bOldValue ) + { + if ( bOldValue != bNewValue ) + { + aAny <<= bNewValue; + try + { + xPropSet->setPropertyValue( rKey, aAny ); + bModified = sal_True; + } + catch ( ::com::sun::star::uno::Exception& ) + { + DBG_ERROR( "FilterConfigItem::WriteBool - could not set PropertyValue" ); + } + } + } + } + } +} + +void FilterConfigItem::WriteInt32( const OUString& rKey, sal_Int32 nNewValue ) +{ + PropertyValue aInt32; + aInt32.Name = rKey; + aInt32.Value <<= nNewValue; + WritePropertyValue( aFilterData, aInt32 ); + + if ( xPropSet.is() ) + { + Any aAny; + + if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) + { + sal_Int32 nOldValue; + if ( aAny >>= nOldValue ) + { + if ( nOldValue != nNewValue ) + { + aAny <<= nNewValue; + try + { + xPropSet->setPropertyValue( rKey, aAny ); + bModified = sal_True; + } + catch ( ::com::sun::star::uno::Exception& ) + { + DBG_ERROR( "FilterConfigItem::WriteInt32 - could not set PropertyValue" ); + } + } + } + } + } +} + +void FilterConfigItem::WriteSize( const OUString& rKey, const Size& rNewValue ) +{ + const OUString sWidth( RTL_CONSTASCII_USTRINGPARAM( "LogicalWidth" ) ); + const OUString sHeight( RTL_CONSTASCII_USTRINGPARAM( "LogicalHeight" ) ); + + PropertyValue aWidth; + aWidth.Name = sWidth; + aWidth.Value <<= rNewValue.Width; + WritePropertyValue( aFilterData, aWidth ); + + PropertyValue aHeight; + aHeight.Name = sHeight; + aHeight.Value <<= rNewValue.Height; + WritePropertyValue( aFilterData, aHeight ); + + if ( xPropSet.is() ) + { + Any aAny; + sal_Int32 nOldWidth = rNewValue.Width; + sal_Int32 nOldHeight = rNewValue.Height; + + if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) + { + try + { + Reference< XPropertySet > aXPropSet; + if ( aAny >>= aXPropSet ) + { + if ( ImplGetPropertyValue( aAny, aXPropSet, sWidth, sal_True ) ) + aAny >>= nOldWidth; + if ( ImplGetPropertyValue( aAny, aXPropSet, sHeight, sal_True ) ) + aAny >>= nOldHeight; + } + if ( ( nOldWidth != rNewValue.Width ) || ( nOldHeight != rNewValue.Height ) ) + { + aAny <<= rNewValue.Width; + aXPropSet->setPropertyValue( sWidth, aAny ); + aAny <<= rNewValue.Height; + aXPropSet->setPropertyValue( sHeight, aAny ); + bModified = sal_True; + } + } + catch ( ::com::sun::star::uno::Exception& ) + { + DBG_ERROR( "FilterConfigItem::WriteSize - could not read PropertyValue" ); + } + } + } +} + +void FilterConfigItem::WriteString( const OUString& rKey, const OUString& rNewValue ) +{ + PropertyValue aString; + aString.Name = rKey; + aString.Value <<= rNewValue; + WritePropertyValue( aFilterData, aString ); + + if ( xPropSet.is() ) + { + Any aAny; + + if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) + { + OUString aOldValue; + if ( aAny >>= aOldValue ) + { + if ( aOldValue != rNewValue ) + { + aAny <<= rNewValue; + try + { + xPropSet->setPropertyValue( rKey, aAny ); + bModified = sal_True; + } + catch ( ::com::sun::star::uno::Exception& ) + { + DBG_ERROR( "FilterConfigItem::WriteInt32 - could not set PropertyValue" ); + } + } + } + } + } +} + +void FilterConfigItem::WriteAny( const OUString& rKey, const Any& rNewAny ) +{ + PropertyValue aPropValue; + aPropValue.Name = rKey; + aPropValue.Value = rNewAny; + WritePropertyValue( aFilterData, aPropValue ); + if ( xPropSet.is() ) + { + Any aAny; + if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) + { + if ( aAny != rNewAny ) + { + try + { + xPropSet->setPropertyValue( rKey, rNewAny ); + bModified = sal_True; + } + catch ( com::sun::star::uno::Exception& ) + { + DBG_ERROR( "FilterConfigItem::WriteAny - could not set PropertyValue" ); + + } + } + } + } +} + +// ------------------------------------------------------------------------ + +Sequence< PropertyValue > FilterConfigItem::GetFilterData() const +{ + return aFilterData; +} + +// ------------------------------------------------------------------------ + +Reference< XStatusIndicator > FilterConfigItem::GetStatusIndicator() const +{ + Reference< XStatusIndicator > xStatusIndicator; + const rtl::OUString sStatusIndicator( RTL_CONSTASCII_USTRINGPARAM( "StatusIndicator" ) ); + + sal_Int32 i, nCount = aFilterData.getLength(); + for ( i = 0; i < nCount; i++ ) + { + if ( aFilterData[ i ].Name == sStatusIndicator ) + { + aFilterData[ i ].Value >>= xStatusIndicator; + break; + } + } + return xStatusIndicator; +} + diff --git a/svtools/source/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter/SvFilterOptionsDialog.cxx new file mode 100644 index 000000000000..1c4eeeff1bbf --- /dev/null +++ b/svtools/source/filter/SvFilterOptionsDialog.cxx @@ -0,0 +1,270 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#include "SvFilterOptionsDialog.hxx" +#include +#include +#include "FilterConfigCache.hxx" +#include +#include +#include +#include +#include "exportdialog.hxx" +#include +#include +#include +#include +#include +#include +#include +#include +#include "vcl/svapp.hxx" + +using namespace ::rtl; +using namespace ::com::sun::star; + +// ------------------------- +// - SvFilterOptionsDialog - +// ------------------------- + +uno::Reference< uno::XInterface > + SAL_CALL SvFilterOptionsDialog_CreateInstance( + const uno::Reference< lang::XMultiServiceFactory > & _rxFactory ) +{ + return static_cast< ::cppu::OWeakObject* > ( new SvFilterOptionsDialog( _rxFactory ) ); +} + +OUString SvFilterOptionsDialog_getImplementationName() + throw( uno::RuntimeException ) +{ + return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svtools.SvFilterOptionsDialog" ) ); +} +#define SERVICE_NAME "com.sun.star.ui.dialog.FilterOptionsDialog" +sal_Bool SAL_CALL SvFilterOptionsDialog_supportsService( const OUString& ServiceName ) + throw( uno::RuntimeException ) +{ + return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SERVICE_NAME ) ); +} + +uno::Sequence< OUString > SAL_CALL SvFilterOptionsDialog_getSupportedServiceNames() + throw( uno::RuntimeException ) +{ + uno::Sequence< OUString > aRet(1); + OUString* pArray = aRet.getArray(); + pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICE_NAME ) ); + return aRet; +} +#undef SERVICE_NAME + +// ----------------------------------------------------------------------------- + +SvFilterOptionsDialog::SvFilterOptionsDialog( const uno::Reference< lang::XMultiServiceFactory > xMgr ) : + mxMgr ( xMgr ), + meFieldUnit ( FUNIT_CM ), + mbExportSelection ( sal_False ) +{ +} + +// ----------------------------------------------------------------------------- + +SvFilterOptionsDialog::~SvFilterOptionsDialog() +{ +} + +// ----------------------------------------------------------------------------- + +void SAL_CALL SvFilterOptionsDialog::acquire() throw() +{ + OWeakObject::acquire(); +} + +// ----------------------------------------------------------------------------- + +void SAL_CALL SvFilterOptionsDialog::release() throw() +{ + OWeakObject::release(); +} + +// XInitialization +void SAL_CALL SvFilterOptionsDialog::initialize( const uno::Sequence< uno::Any > & ) + throw ( uno::Exception, uno::RuntimeException ) +{ +} + +// XServiceInfo +OUString SAL_CALL SvFilterOptionsDialog::getImplementationName() + throw( uno::RuntimeException ) +{ + return SvFilterOptionsDialog_getImplementationName(); +} +sal_Bool SAL_CALL SvFilterOptionsDialog::supportsService( const OUString& rServiceName ) + throw( uno::RuntimeException ) +{ + return SvFilterOptionsDialog_supportsService( rServiceName ); +} +uno::Sequence< OUString > SAL_CALL SvFilterOptionsDialog::getSupportedServiceNames() + throw ( uno::RuntimeException ) +{ + return SvFilterOptionsDialog_getSupportedServiceNames(); +} + + +// XPropertyAccess +uno::Sequence< beans::PropertyValue > SvFilterOptionsDialog::getPropertyValues() + throw ( uno::RuntimeException ) +{ + sal_Int32 i, nCount; + for ( i = 0, nCount = maMediaDescriptor.getLength(); i < nCount; i++ ) + { + if ( maMediaDescriptor[ i ].Name.equalsAscii( "FilterData" ) ) + break; + } + if ( i == nCount ) + maMediaDescriptor.realloc( ++nCount ); + + // the "FilterData" Property is an Any that will contain our PropertySequence of Values + maMediaDescriptor[ i ].Name = String( RTL_CONSTASCII_USTRINGPARAM( "FilterData" ) ); + maMediaDescriptor[ i ].Value <<= maFilterDataSequence; + return maMediaDescriptor; +} + +void SvFilterOptionsDialog::setPropertyValues( const uno::Sequence< beans::PropertyValue > & aProps ) + throw ( beans::UnknownPropertyException, beans::PropertyVetoException, + lang::IllegalArgumentException, lang::WrappedTargetException, + uno::RuntimeException ) +{ + maMediaDescriptor = aProps; + + sal_Int32 i, nCount; + for ( i = 0, nCount = maMediaDescriptor.getLength(); i < nCount; i++ ) + { + if ( maMediaDescriptor[ i ].Name.equalsAscii( "FilterData" ) ) + { + maMediaDescriptor[ i ].Value >>= maFilterDataSequence; + } + else if ( maMediaDescriptor[ i ].Name.equalsAscii( "SelectionOnly" ) ) + { + maMediaDescriptor[ i ].Value >>= mbExportSelection; + } + } +} + +// XExecutableDialog +void SvFilterOptionsDialog::setTitle( const OUString& aTitle ) + throw ( uno::RuntimeException ) +{ + maDialogTitle = aTitle; +} + +sal_Int16 SvFilterOptionsDialog::execute() + throw ( uno::RuntimeException ) +{ + sal_Int16 nRet = ui::dialogs::ExecutableDialogResults::CANCEL; + + String aFilterNameStr( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ) ); + String aInternalFilterName; + sal_Int32 j, nCount = maMediaDescriptor.getLength(); + for ( j = 0; j < nCount; j++ ) + { + if ( maMediaDescriptor[ j ].Name.equals( aFilterNameStr ) ) + { + OUString aStr; + maMediaDescriptor[ j ].Value >>= aStr; + aInternalFilterName = aStr; + aInternalFilterName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "draw_" ) ), String(), 0 ); + aInternalFilterName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "impress_" ) ), String(), 0 ); + break; + } + } + if ( aInternalFilterName.Len() ) + { + GraphicFilter aGraphicFilter( sal_True ); + + sal_uInt16 nFormat, nFilterCount = aGraphicFilter.pConfig->GetExportFormatCount(); + for ( nFormat = 0; nFormat < nFilterCount; nFormat++ ) + { + if ( aGraphicFilter.pConfig->GetExportInternalFilterName( nFormat ) == aInternalFilterName ) + break; + } + if ( nFormat < nFilterCount ) + { + FltCallDialogParameter aFltCallDlgPara( Application::GetDefDialogParent(), NULL, meFieldUnit ); + aFltCallDlgPara.aFilterData = maFilterDataSequence; + + ByteString aResMgrName( "svt", 3 ); + ResMgr* pResMgr; + + pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); + aFltCallDlgPara.pResMgr = pResMgr; + + aFltCallDlgPara.aFilterExt = aGraphicFilter.pConfig->GetExportFormatShortName( nFormat ); + sal_Bool bIsPixelFormat( aGraphicFilter.pConfig->IsExportPixelFormat( nFormat ) ); + if ( ExportDialog( aFltCallDlgPara, mxMgr, mxSourceDocument, mbExportSelection, bIsPixelFormat ).Execute() == RET_OK ) + nRet = ui::dialogs::ExecutableDialogResults::OK; + + delete pResMgr; + + // taking the out parameter from the dialog + maFilterDataSequence = aFltCallDlgPara.aFilterData; + } + } + return nRet; +} + +// XEmporter +void SvFilterOptionsDialog::setSourceDocument( const uno::Reference< lang::XComponent >& xDoc ) + throw ( lang::IllegalArgumentException, uno::RuntimeException ) +{ + mxSourceDocument = xDoc; + + // try to set the corresponding metric unit + String aConfigPath; + uno::Reference< lang::XServiceInfo > xServiceInfo + ( xDoc, uno::UNO_QUERY ); + if ( xServiceInfo.is() ) + { + if ( xServiceInfo->supportsService( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ) ) ) + aConfigPath = String( RTL_CONSTASCII_USTRINGPARAM( "Office.Impress/Layout/Other/MeasureUnit" ) ); + else if ( xServiceInfo->supportsService( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ) ) ) + aConfigPath = String( RTL_CONSTASCII_USTRINGPARAM( "Office.Draw/Layout/Other/MeasureUnit" ) ); + if ( aConfigPath.Len() ) + { + FilterConfigItem aConfigItem( aConfigPath ); + String aPropertyName; + SvtSysLocale aSysLocale; + if ( aSysLocale.GetLocaleDataPtr()->getMeasurementSystemEnum() == MEASURE_METRIC ) + aPropertyName = String( RTL_CONSTASCII_USTRINGPARAM( "Metric" ) ); + else + aPropertyName = String( RTL_CONSTASCII_USTRINGPARAM( "NonMetric" ) ); + meFieldUnit = (FieldUnit)aConfigItem.ReadInt32( aPropertyName, FUNIT_CM ); + } + } +} + diff --git a/svtools/source/filter/SvFilterOptionsDialog.hxx b/svtools/source/filter/SvFilterOptionsDialog.hxx new file mode 100644 index 000000000000..027fac99c2e8 --- /dev/null +++ b/svtools/source/filter/SvFilterOptionsDialog.hxx @@ -0,0 +1,105 @@ +/************************************************************************* + * + * 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 _SV_FILTER_OPTIONS_DIALOG_HXX_ +#define _SV_FILTER_OPTIONS_DIALOG_HXX_ + +#include +#include +#include +#include +#include +#include +#include +#include + +class SvFilterOptionsDialog : public cppu::WeakImplHelper5 +< + com::sun::star::document::XExporter, + com::sun::star::ui::dialogs::XExecutableDialog, + com::sun::star::beans::XPropertyAccess, + com::sun::star::lang::XInitialization, + com::sun::star::lang::XServiceInfo +> +{ + const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > + mxMgr; + com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > + maMediaDescriptor; + com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > + maFilterDataSequence; + com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > + mxSourceDocument; + + rtl::OUString maDialogTitle; + FieldUnit meFieldUnit; + sal_Bool mbExportSelection; + +public: + + SvFilterOptionsDialog( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > _rxORB ); + ~SvFilterOptionsDialog(); + + // XInterface + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + + // XInitialization + virtual void SAL_CALL initialize( const com::sun::star::uno::Sequence< com::sun::star::uno::Any > & aArguments ) + throw ( com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException ); + + // XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName() + throw ( com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL supportsService( const rtl::OUString& ServiceName ) + throw ( com::sun::star::uno::RuntimeException ); + virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() + throw ( com::sun::star::uno::RuntimeException ); + + // XPropertyAccess + virtual com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getPropertyValues() + throw ( com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & aProps ) + throw ( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException ); + + // XExecuteDialog + virtual sal_Int16 SAL_CALL execute() + throw ( com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle ) + throw ( ::com::sun::star::uno::RuntimeException ); + + // XExporter + virtual void SAL_CALL setSourceDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc ) + throw ( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + +}; + + +#endif // _SV_FILTER_OPTIONS_DIALOG_HXX_ + diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx new file mode 100644 index 000000000000..20cc46a30ab5 --- /dev/null +++ b/svtools/source/filter/exportdialog.cxx @@ -0,0 +1,1513 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#ifndef GCC +# pragma hdrstop +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "exportdialog.hxx" +#include "exportdialog.hrc" + +#define FORMAT_UNKNOWN 0 +#define FORMAT_JPG 1 +#define FORMAT_PNG 2 +#define FORMAT_BMP 3 +#define FORMAT_GIF 4 +#define FORMAT_PBM 5 +#define FORMAT_PGM 6 +#define FORMAT_PPM 7 +#define FORMAT_PCT 8 +#define FORMAT_RAS 9 +#define FORMAT_TIF 10 +#define FORMAT_XPM 11 +#define FORMAT_WMF 12 +#define FORMAT_EMF 13 +#define FORMAT_EPS 14 +#define FORMAT_MET 15 +#define FORMAT_SVG 16 +#define FORMAT_SVM 17 + +#define UNIT_DEFAULT -1 +#define UNIT_INCH 0 +#define UNIT_CM 1 +#define UNIT_MM 2 +#define UNIT_POINT 3 +#define UNIT_PIXEL 4 +#define UNIT_MAX_ID UNIT_PIXEL + +using namespace ::com::sun::star; + +static sal_Int16 GetFilterFormat( String& rExt ) +{ + sal_Int16 nFormat = FORMAT_UNKNOWN; + ByteString aExt( rExt, RTL_TEXTENCODING_UTF8 ); + if ( aExt.Equals( "JPG" ) ) + nFormat = FORMAT_JPG; + else if ( aExt.Equals( "PNG" ) ) + nFormat = FORMAT_PNG; + else if ( aExt.Equals( "BMP" ) ) + nFormat = FORMAT_BMP; + else if ( aExt.Equals( "GIF" ) ) + nFormat = FORMAT_GIF; + else if ( aExt.Equals( "PBM" ) ) + nFormat = FORMAT_PBM; + else if ( aExt.Equals( "PGM" ) ) + nFormat = FORMAT_PGM; + else if ( aExt.Equals( "PPM" ) ) + nFormat = FORMAT_PPM; + else if ( aExt.Equals( "PCT" ) ) + nFormat = FORMAT_PCT; + else if ( aExt.Equals( "RAS" ) ) + nFormat = FORMAT_RAS; + else if ( aExt.Equals( "TIF" ) ) + nFormat = FORMAT_TIF; + else if ( aExt.Equals( "XPM" ) ) + nFormat = FORMAT_XPM; + else if ( aExt.Equals( "WMF" ) ) + nFormat = FORMAT_WMF; + else if ( aExt.Equals( "EMF" ) ) + nFormat = FORMAT_EMF; + else if ( aExt.Equals( "EPS" ) ) + nFormat = FORMAT_EPS; + else if ( aExt.Equals( "MET" ) ) + nFormat = FORMAT_MET; + else if ( aExt.Equals( "SVG" ) ) + nFormat = FORMAT_SVG; + else if ( aExt.Equals( "SVM" ) ) + nFormat = FORMAT_SVM; + return nFormat; +} + +static MapUnit GetMapUnit( sal_Int32 nUnit ) +{ + MapUnit aMapUnit( MAP_PIXEL ); + switch( nUnit ) + { + case UNIT_INCH : aMapUnit = MAP_INCH; break; + case UNIT_CM : aMapUnit = MAP_CM; break; + case UNIT_MM : aMapUnit = MAP_MM; break; + case UNIT_POINT : aMapUnit = MAP_POINT; break; + case UNIT_PIXEL : aMapUnit = MAP_PIXEL; break; + } + return aMapUnit; +} + +sal_Int32 ExportDialog::GetDefaultUnit() +{ + sal_Int32 nDefaultUnit = UNIT_CM; + switch( mrFltCallPara.eFieldUnit ) + { +// case FUNIT_NONE : +// case FUNIT_PERCENT : +// case FUNIT_CUSTOM : + default: nDefaultUnit = UNIT_CM; break; + + case FUNIT_MILE : // PASSTHROUGH INTENDED + case FUNIT_FOOT : + case FUNIT_TWIP : + case FUNIT_PICA : nDefaultUnit = UNIT_INCH; break; + + case FUNIT_KM : // PASSTHROUGH INTENDED + case FUNIT_M : + case FUNIT_100TH_MM : nDefaultUnit = UNIT_CM; break; + + case FUNIT_INCH : nDefaultUnit = UNIT_INCH; break; + case FUNIT_CM : nDefaultUnit = UNIT_CM; break; + case FUNIT_MM : nDefaultUnit = UNIT_MM; break; + case FUNIT_POINT : nDefaultUnit = UNIT_POINT; break; + } + return nDefaultUnit; +} + +static basegfx::B2DRange GetShapeRangeForXShape( const uno::Reference< drawing::XShape >& rxShape, + const uno::Reference< graphic::XPrimitiveFactory2D >& rxPrimitiveFactory2D, const uno::Sequence< beans::PropertyValue >& rViewInformation ) +{ + basegfx::B2DRange aShapeRange; + + const uno::Sequence< beans::PropertyValue > aParams; + const uno::Sequence< uno::Reference< graphic::XPrimitive2D > > aPrimitiveSequence( rxPrimitiveFactory2D->createPrimitivesFromXShape( rxShape, aParams ) ); + + const sal_Int32 nCount = aPrimitiveSequence.getLength(); + for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ ) + { + const geometry::RealRectangle2D aRect( aPrimitiveSequence[ nIndex ]->getRange( rViewInformation ) ); + aShapeRange.expand( basegfx::B2DTuple( aRect.X1, aRect.Y1 ) ); + aShapeRange.expand( basegfx::B2DTuple( aRect.X2, aRect.Y2 ) ); + } + return aShapeRange; +} + +uno::Sequence< beans::PropertyValue > ExportDialog::GetFilterData( sal_Bool bUpdateConfig ) +{ + if ( bUpdateConfig ) + { + sal_Int32 nUnit = maLbSizeX.GetSelectEntryPos(); + if ( nUnit < 0 ) + nUnit = UNIT_CM; + + if ( ( mnInitialResolutionUnit == UNIT_DEFAULT ) && ( nUnit == GetDefaultUnit() ) ) + nUnit = UNIT_DEFAULT; + + // updating ui configuration + if ( mbIsPixelFormat ) + { + if ( nUnit > UNIT_MAX_ID ) + nUnit = UNIT_PIXEL; + + sal_Int32 nResolution = maNfResolution.GetValue(); + if ( nResolution < 1 ) + nResolution = 96; + + mpOptionsItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportUnit" ) ), nUnit ); + mpOptionsItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolution" ) ), nResolution ); + mpOptionsItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolutionUnit" ) ), maLbResolution.GetSelectEntryPos() ); + } + else + { + if ( nUnit >= UNIT_PIXEL ) + nUnit = UNIT_CM; + + mpOptionsItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "VectorExportUnit" ) ), nUnit ); + } + } + + FilterConfigItem* pFilterOptions; + if ( bUpdateConfig ) + pFilterOptions = mpFilterOptionsItem; + else + { + uno::Sequence< beans::PropertyValue > aFilterData( mpFilterOptionsItem->GetFilterData() ); + pFilterOptions = new FilterConfigItem( &aFilterData ); + } + + const String sLogicalWidth( String( RTL_CONSTASCII_USTRINGPARAM( "LogicalWidth" ) ) ); + const String sLogicalHeight( String( RTL_CONSTASCII_USTRINGPARAM( "LogicalHeight" ) ) ); + if ( mbIsPixelFormat ) + { + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelWidth" ) ), static_cast< sal_Int32 >( maSize.Width ) ); + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelHeight" ) ), static_cast< sal_Int32 >( maSize.Height ) ); + if ( maResolution.Width && maResolution.Height ) + { + const double f100thmmPerPixelX = 100000.0 / maResolution.Width; + const double f100thmmPerPixelY = 100000.0 / maResolution.Height; + sal_Int32 nLogicalWidth = static_cast< sal_Int32 >( f100thmmPerPixelX * maSize.Width ); + sal_Int32 nLogicalHeight= static_cast< sal_Int32 >( f100thmmPerPixelY * maSize.Height ); + if ( nLogicalWidth && nLogicalHeight ) + { + pFilterOptions->WriteInt32( sLogicalWidth, nLogicalWidth ); + pFilterOptions->WriteInt32( sLogicalHeight, nLogicalHeight ); + } + } + } + else + { + pFilterOptions->WriteInt32( sLogicalWidth, static_cast< sal_Int32 >( maSize.Width ) ); + pFilterOptions->WriteInt32( sLogicalHeight, static_cast< sal_Int32 >( maSize.Height ) ); + } + switch ( mnFormat ) + { + case FORMAT_JPG : + { + sal_Int32 nColor = maLbColorDepth.GetSelectEntryPos(); + if ( nColor == 1 ) + nColor = 0; + else + nColor = 1; + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorMode" ) ), nColor ); + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Quality" ) ), static_cast< sal_Int32 >( maSbCompression.GetThumbPos() ) ); + } + break; + + case FORMAT_PNG : + { + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Compression" ) ), static_cast< sal_Int32 >( maSbCompression.GetThumbPos() ) ); + sal_Int32 nInterlace = 0; + if ( maCbInterlaced.IsChecked() ) + nInterlace++; + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), nInterlace ); + } + break; + + case FORMAT_BMP : + { + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Color" ) ), maLbColorDepth.GetSelectEntryPos() + 1 ); + pFilterOptions->WriteBool( String( RTL_CONSTASCII_USTRINGPARAM( "RLE_Coding" ) ), maCbRLEEncoding.IsChecked() ); + } + break; + + case FORMAT_GIF : + { + sal_Int32 nValue = 0; + if ( maCbInterlaced.IsChecked() ) + nValue++; + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), nValue ); + + nValue = 0; + if ( maCbSaveTransparency.IsChecked() ) + nValue++; + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Translucent" ) ), nValue ); + } + break; + + case FORMAT_PBM : + case FORMAT_PGM : + case FORMAT_PPM : + { + sal_Int32 nFormat = 0; + if ( maRbText.IsChecked() ) + nFormat++; + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "FileFormat" ) ), nFormat ); + } + break; + + case FORMAT_EPS : + { + sal_Int32 nCheck = 0; + if ( maCbEPSPreviewTIFF.IsChecked() ) + nCheck++; + if ( maCbEPSPreviewEPSI.IsChecked() ) + nCheck += 2; + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Preview" ) ), nCheck ); + + nCheck = 1; + if ( maRbEPSLevel2.IsChecked() ) + nCheck++; + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ), nCheck ); + + nCheck = 1; + if ( maRbEPSColorFormat2.IsChecked() ) + nCheck++; + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorFormat" ) ), nCheck ); + + nCheck = 1; + if ( maRbEPSCompressionNone.IsChecked() ) + nCheck++; + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "CompressionMode" ) ), nCheck ); + } + break; + } + + uno::Sequence< beans::PropertyValue > aRet( pFilterOptions->GetFilterData() ); + if ( bUpdateConfig == sal_False ) + delete pFilterOptions; + return aRet; +} + +// +awt::Size ExportDialog::GetOriginalSize() +{ + basegfx::B2DRange aShapesRange; + + if ( mxPage.is () ) + { + uno::Reference< beans::XPropertySet > xPagePropSet( mxPage, uno::UNO_QUERY ); + if ( xPagePropSet.is() ) + { + sal_Int32 nWidth = 0; + sal_Int32 nHeight= 0; + com::sun::star::uno::Any aAny; + aAny = xPagePropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" ) ) ); + aAny >>= nWidth; + aAny = xPagePropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Height" ) ) ); + aAny >>= nHeight; + aShapesRange = basegfx::B2DRange( 0, 0, nWidth, nHeight ); + } + } + else + { + uno::Reference< graphic::XPrimitiveFactory2D > xPrimitiveFactory( + mxMgr->createInstance( String( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.graphic.PrimitiveFactory2D" ) ) ), uno::UNO_QUERY ); + if ( xPrimitiveFactory.is() ) + { + basegfx::B2DHomMatrix aViewTransformation( Application::GetDefaultDevice()->GetViewTransformation() ); + com::sun::star::geometry::AffineMatrix2D aTransformation; + aTransformation.m00 = aViewTransformation.get(0,0); + aTransformation.m01 = aViewTransformation.get(0,1); + aTransformation.m02 = aViewTransformation.get(0,2); + aTransformation.m10 = aViewTransformation.get(1,0); + aTransformation.m11 = aViewTransformation.get(1,1); + aTransformation.m12 = aViewTransformation.get(1,2); + + const rtl::OUString sViewTransformation( RTL_CONSTASCII_USTRINGPARAM( "ViewTransformation" ) ); + uno::Sequence< beans::PropertyValue > aViewInformation( 1 ); + aViewInformation[ 0 ].Value <<= aTransformation; + aViewInformation[ 0 ].Name = sViewTransformation; + + if ( mxShape.is() ) + aShapesRange = GetShapeRangeForXShape( mxShape, xPrimitiveFactory, aViewInformation ); + else if ( mxShapes.is() ) + { + const sal_Int32 nCount = mxShapes->getCount(); + for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ ) + { + uno::Reference< drawing::XShape > xShape; + mxShapes->getByIndex( nIndex ) >>= xShape; + aShapesRange.expand( GetShapeRangeForXShape( xShape, xPrimitiveFactory, aViewInformation ) ); + } + } + } + } + return awt::Size( static_cast(aShapesRange.getWidth()), static_cast(aShapesRange.getHeight()) ); +} + +void ExportDialog::GetGraphicSource() +{ + if ( mxSourceDocument.is() ) + { + uno::Reference< frame::XModel > xModel( mxSourceDocument, uno::UNO_QUERY ); + if ( xModel.is() ) + { + uno::Reference< frame::XController > xController( xModel->getCurrentController() ); + if ( xController.is() ) + { + if ( mbExportSelection ) // check if there is a selection + { + uno::Reference< view::XSelectionSupplier > xSelectionSupplier( xController, uno::UNO_QUERY ); + if ( xSelectionSupplier.is() ) + { + uno::Any aAny( xSelectionSupplier->getSelection() ); + if ( ! ( aAny >>= mxShapes ) ) + aAny >>= mxShape; + } + } + if ( !mxShape.is() && !mxShapes.is() ) + { + uno::Reference< drawing::XDrawView > xDrawView( xController, uno::UNO_QUERY ); + if ( xDrawView.is() ) + { + uno::Reference< drawing::XDrawPage > xCurrentPage( xDrawView->getCurrentPage() ); + if ( xCurrentPage.is() ) + { + mxPage = xCurrentPage; // exporting whole page + } + } + } + } + } + } +} + +sal_Bool ExportDialog::GetGraphicStream() +{ + sal_Bool bRet = sal_False; + + if ( !IsTempExportAvailable() ) + { + delete mpTempStream, mpTempStream = new SvMemoryStream(); + maBitmap = Bitmap(); + return bRet; + } + + sal_Bool bRecreateOutputStream = mpTempStream->Tell() == 0; + + static uno::Sequence< beans::PropertyValue > aOldFilterData; + uno::Sequence< beans::PropertyValue > aNewFilterData( GetFilterData( sal_False ) ); + if ( aOldFilterData != aNewFilterData ) + { + aOldFilterData = aNewFilterData; + bRecreateOutputStream = sal_True; + } + try + { + if ( bRecreateOutputStream ) + { + delete mpTempStream, mpTempStream = new SvMemoryStream(); + maBitmap = Bitmap(); + + uno::Reference < io::XStream > xStream( new utl::OStreamWrapper( *mpTempStream ) ); + uno::Reference < io::XOutputStream > xOutputStream( xStream->getOutputStream() ); + + uno::Reference< document::XExporter > xGraphicExporter( + mxMgr->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GraphicExportFilter") ) ), uno::UNO_QUERY_THROW ); + uno::Reference< document::XFilter > xFilter( xGraphicExporter, uno::UNO_QUERY_THROW ); + + sal_Int32 nProperties = 2; + uno::Sequence< beans::PropertyValue > aFilterData( nProperties ); + + + rtl::OUString sFormat( maExt ); + uno::Sequence< beans::PropertyValue > aDescriptor( 3 ); + aDescriptor[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OutputStream") ); + aDescriptor[0].Value <<= xOutputStream; + aDescriptor[1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FilterName") ); + aDescriptor[1].Value <<= sFormat; + aDescriptor[2].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FilterData") ); + aDescriptor[2].Value <<= aNewFilterData; + + uno::Reference< lang::XComponent > xSourceDoc; + if ( mxPage.is() ) + xSourceDoc = uno::Reference< lang::XComponent >( mxPage, uno::UNO_QUERY_THROW ); + else if ( mxShapes.is() ) + xSourceDoc = uno::Reference< lang::XComponent >( mxShapes, uno::UNO_QUERY_THROW ); + else if ( mxShape.is() ) + xSourceDoc = uno::Reference< lang::XComponent >( mxShape, uno::UNO_QUERY_THROW );; + if ( xSourceDoc.is() ) + { + xGraphicExporter->setSourceDocument( xSourceDoc ); + xFilter->filter( aDescriptor ); + bRet = sal_True; + + if ( mnFormat == FORMAT_JPG ) + { + mpTempStream->Seek( STREAM_SEEK_TO_BEGIN ); + maBitmap = GetGraphicBitmap( *mpTempStream ); + mpTempStream->Seek( STREAM_SEEK_TO_END ); + } + } + } + else + bRet = sal_True; + } + catch( uno::Exception& ) + { + + // ups + + } + return bRet; +} + +Bitmap ExportDialog::GetGraphicBitmap( SvStream& rInputStream ) +{ + Bitmap aRet; + Graphic aGraphic; + GraphicFilter aFilter( sal_False ); + if ( aFilter.ImportGraphic( aGraphic, String(), rInputStream, GRFILTER_FORMAT_NOTFOUND, NULL, 0, NULL ) == GRFILTER_OK ) + { + aRet = aGraphic.GetBitmap(); + } + return aRet; +} + +sal_uInt32 ExportDialog::GetRawFileSize() const +{ + sal_uInt64 nRawFileSize = 0; + if ( mbIsPixelFormat ) + { + sal_Int32 nBitsPerPixel = 24; + String aEntry( maLbColorDepth.GetSelectEntry() ); + if ( ms1BitTreshold == aEntry ) + nBitsPerPixel = 1; + else if ( ms1BitDithered == aEntry ) + nBitsPerPixel = 1; + else if ( ms4BitGrayscale == aEntry ) + nBitsPerPixel = 4; + else if ( ms4BitColorPalette == aEntry ) + nBitsPerPixel = 8; + else if ( ms8BitGrayscale == aEntry ) + nBitsPerPixel = 8; + else if ( ms8BitColorPalette == aEntry ) + nBitsPerPixel = 8; + else if ( ms24BitColor == aEntry ) + nBitsPerPixel = 24; + + if ( mbIsPixelFormat ) + { + nRawFileSize = ( maSize.Width * nBitsPerPixel + 7 ) &~ 7; // rounding up to 8 bits + nRawFileSize /= 8; // in bytes + nRawFileSize *= maSize.Height; + } + if ( nRawFileSize > SAL_MAX_UINT32 ) + nRawFileSize = 0; + } + return static_cast< sal_uInt32 >( nRawFileSize ); +} + +// checks if the source dimension/resolution is not too big +// to determine the exact graphic output size and preview for jpg +sal_Bool ExportDialog::IsTempExportAvailable() const +{ + return GetRawFileSize() < static_cast< sal_uInt32 >( mnMaxFilesizeForRealtimePreview ); +} + +ExportDialog::ExportDialog( FltCallDialogParameter& rPara, + const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > rxMgr, + const com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& rxSourceDocument, + sal_Bool bExportSelection, sal_Bool bIsPixelFormat ) : + ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT, *rPara.pResMgr ) ), + mrFltCallPara ( rPara ), + mpMgr ( rPara.pResMgr ), + mxMgr ( rxMgr ), + mxSourceDocument ( rxSourceDocument ), + maFlExportSize ( this, ResId( FL_EXPORT_SIZE, *rPara.pResMgr ) ), + maFtSizeX ( this, ResId( FT_SIZEX, *rPara.pResMgr ) ), + maMfSizeX ( this, ResId( MF_SIZEX, *rPara.pResMgr ) ), + maLbSizeX ( this, ResId( LB_SIZEX, *rPara.pResMgr ) ), + maFtSizeY ( this, ResId( FT_SIZEY, *rPara.pResMgr ) ), + maMfSizeY ( this, ResId( MF_SIZEY, *rPara.pResMgr ) ), + maLbSizeY ( this, ResId( LB_SIZEY, *rPara.pResMgr ) ), + maFtResolution ( this, ResId( FT_RESOLUTION, *rPara.pResMgr ) ), + maNfResolution ( this, ResId( NF_RESOLUTION, *rPara.pResMgr ) ), + maLbResolution ( this, ResId( LB_RESOLUTION, *rPara.pResMgr ) ), + maFlColorDepth ( this, ResId( FL_COLOR_DEPTH, *rPara.pResMgr ) ), + maLbColorDepth ( this, ResId( LB_COLOR_DEPTH, *rPara.pResMgr ) ), + maFlJPGQuality ( this, ResId( FL_JPG_QUALITY, *rPara.pResMgr ) ), + maFlMode ( this, ResId( FL_MODE, *rPara.pResMgr ) ), + maFlPBMOptions ( this, ResId( FL_PBM_OPTIONS, *rPara.pResMgr ) ), + maSbCompression ( this, ResId( SB_COMPRESSION, *rPara.pResMgr ) ), + maNfCompression ( this, ResId( NF_COMPRESSION, *rPara.pResMgr ) ), + maFtJPGMin ( this, ResId( FT_JPG_MIN, *rPara.pResMgr ) ), + maFtJPGMax ( this, ResId( FT_JPG_MAX, *rPara.pResMgr ) ), + maFtPNGMin ( this, ResId( FT_PNG_MIN, *rPara.pResMgr ) ), + maFtPNGMax ( this, ResId( FT_PNG_MAX, *rPara.pResMgr ) ), + maCbJPGPreview ( this, ResId( CB_JPG_PREVIEW, *rPara.pResMgr ) ), + maCbInterlaced ( this, ResId( CB_INTERLACED, *rPara.pResMgr ) ), + maCbRLEEncoding ( this, ResId( CB_RLE_ENCODING, *rPara.pResMgr ) ), + maFlGIFDrawingObjects ( this, ResId( FL_GIF_DRAWING_OBJECTS, *rPara.pResMgr ) ), + maCbSaveTransparency ( this, ResId( CB_SAVE_TRANSPARENCY, *rPara.pResMgr ) ), + maRbBinary ( this, ResId( RB_BINARY, *rPara.pResMgr ) ), + maRbText ( this, ResId( RB_TEXT, *rPara.pResMgr ) ), + maFlEPSPreview ( this, ResId( FL_EPS_PREVIEW, *rPara.pResMgr ) ), + maCbEPSPreviewTIFF ( this, ResId( CB_EPS_PREVIEW_TIFF, *rPara.pResMgr ) ), + maCbEPSPreviewEPSI ( this, ResId( CB_EPS_PREVIEW_EPSI, *rPara.pResMgr ) ), + maFlEPSVersion ( this, ResId( FL_EPS_VERSION, *rPara.pResMgr ) ), + maRbEPSLevel1 ( this, ResId( RB_EPS_LEVEL1, *rPara.pResMgr ) ), + maRbEPSLevel2 ( this, ResId( RB_EPS_LEVEL2, *rPara.pResMgr ) ), + maFlEPSColorFormat ( this, ResId( FL_EPS_COLOR_FORMAT, *rPara.pResMgr ) ), + maRbEPSColorFormat1 ( this, ResId( RB_EPS_COLOR_FORMAT1, *rPara.pResMgr ) ), + maRbEPSColorFormat2 ( this, ResId( RB_EPS_COLOR_FORMAT2, *rPara.pResMgr ) ), + maFlCompression ( this, ResId( FL_COMPRESSION, *rPara.pResMgr ) ), + maRbEPSCompressionLZW ( this, ResId( RB_EPS_COMPRESSION_LZW, *rPara.pResMgr ) ), + maRbEPSCompressionNone ( this, ResId( RB_EPS_COMPRESSION_NONE, *rPara.pResMgr ) ), + maFlEstimatedSize ( this, ResId( FL_ESTIMATED_SIZE, *rPara.pResMgr ) ), + maFtEstimatedSize ( this, ResId( FT_ESTIMATED_SIZE, *rPara.pResMgr ) ), + msEstimatedSizePix1 ( ResId( STR_ESTIMATED_SIZE_PIX_1, *rPara.pResMgr ) ), + msEstimatedSizePix2 ( ResId( STR_ESTIMATED_SIZE_PIX_2, *rPara.pResMgr ) ), + msEstimatedSizeVec ( ResId( STR_ESTIMATED_SIZE_VEC, *rPara.pResMgr ) ), + maFlButtons ( this, ResId( FL_BUTTONS, *rPara.pResMgr ) ), + maFbJPGPreview ( this, ResId( FB_JPG_PREVIEW, *rPara.pResMgr ) ), + maSbZoom ( this, ResId( SB_ZOOM, *rPara.pResMgr ) ), + maNfZoom ( this, ResId( NF_ZOOM, *rPara.pResMgr ) ), + maSbJPGPreviewHorz ( this, ResId( SB_JPG_PREVIEW_HORZ, *rPara.pResMgr ) ), + maSbJPGPreviewVert ( this, ResId( SB_JPG_PREVIEW_VERT, *rPara.pResMgr ) ), + maBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ), + maBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ), + maBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ), + ms1BitTreshold ( ResId( STR_1BIT_THRESHOLD, *rPara.pResMgr ) ), + ms1BitDithered ( ResId( STR_1BIT_DITHERED, *rPara.pResMgr ) ), + ms4BitGrayscale ( ResId( STR_4BIT_GRAYSCALE, *rPara.pResMgr ) ), + ms4BitColorPalette ( ResId( STR_4BIT_COLOR_PALETTE, *rPara.pResMgr ) ), + ms8BitGrayscale ( ResId( STR_8BIT_GRAYSCALE, *rPara.pResMgr ) ), + ms8BitColorPalette ( ResId( STR_8BIT_COLOR_PALETTE, *rPara.pResMgr ) ), + ms24BitColor ( ResId( STR_24BIT_TRUE_COLOR, *rPara.pResMgr ) ), + maExt ( rPara.aFilterExt ), + mnFormat ( FORMAT_UNKNOWN ), + mnMaxFilesizeForRealtimePreview( 0 ), + mpTempStream ( new SvMemoryStream() ), + maOriginalSize ( awt::Size( 0, 0 ) ), + mbPreview ( sal_False ), + mbIsPixelFormat ( bIsPixelFormat ), + mbExportSelection ( bExportSelection ), + mbPreserveAspectRatio ( sal_True ) +{ + GetGraphicSource(); + + maExt.ToUpperAscii(); + + String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/" ) ); + mpOptionsItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData ); + aFilterConfigPath.Append( maExt ); + mpFilterOptionsItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData ); + + mnInitialResolutionUnit = mbIsPixelFormat + ? mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportUnit" ) ), UNIT_DEFAULT ) + : mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "VectorExportUnit" ) ), UNIT_DEFAULT ); + + mnMaxFilesizeForRealtimePreview = mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "MaxFilesizeForRealtimePreview" ) ), 0 ); + maFtEstimatedSize.SetText( String( RTL_CONSTASCII_USTRINGPARAM( " \n " ) ) ); + + String aTitle( maExt ); + aTitle += String( ResId( DLG_EXPORT_TITLE, *mpMgr ) ); + SetText( aTitle ); + + mnFormat = GetFilterFormat( maExt ); + + Size aResolution( Application::GetDefaultDevice()->LogicToPixel( Size( 100, 100 ), MAP_CM ) ); + maResolution.Width = aResolution.Width(); + maResolution.Height= aResolution.Height(); + maOriginalSize = GetOriginalSize(); + if ( bIsPixelFormat ) + { + double fPixelsPer100thmm = static_cast< double >( maResolution.Width ) / 100000.0; + maSize = awt::Size( static_cast< sal_Int32 >( ( fPixelsPer100thmm * maOriginalSize.Width ) + 0.5 ), + static_cast< sal_Int32 >( ( fPixelsPer100thmm * maOriginalSize.Height ) + 0.5 ) ); + } + else + { + maSize = maOriginalSize; + } + + // Size + maLbSizeX.SetSelectHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + maSbCompression.SetScrollHdl( LINK( this, ExportDialog, SbCompressionUpdateHdl ) ); + maNfCompression.SetModifyHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + maMfSizeX.SetModifyHdl( LINK( this, ExportDialog, UpdateHdlMtfSizeX ) ); + maMfSizeY.SetModifyHdl( LINK( this, ExportDialog, UpdateHdlMtfSizeY ) ); + + maNfResolution.SetModifyHdl( LINK( this, ExportDialog, UpdateHdlNfResolution ) ); + maLbResolution.SetSelectHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + maLbColorDepth.SetSelectHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + maCbInterlaced.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + maCbSaveTransparency.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + maCbEPSPreviewTIFF.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + maCbEPSPreviewEPSI.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + maRbEPSCompressionLZW.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + maRbEPSCompressionNone.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + maRbBinary.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + maRbText.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + + // JPG Preview +// maCbJPGPreview.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); +maCbJPGPreview.Enable( sal_False ); + + maSbJPGPreviewVert.SetScrollHdl( LINK( this, ExportDialog, UpdateHdl ) ); + maSbJPGPreviewHorz.SetScrollHdl( LINK( this, ExportDialog, UpdateHdl ) ); + maSbZoom.SetScrollHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + // BMP + maCbRLEEncoding.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + // EPS + maRbEPSLevel1.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + maRbEPSLevel2.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + maBtnOK.SetClickHdl( LINK( this, ExportDialog, OK ) ); + + setupLayout(); + updateControls(); + + FreeResource(); +} + +void ExportDialog::createSizeControls( vcl::RowOrColumn& rLayout ) +{ + size_t nIndex; + Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) ); + long nIndent = aBorder.Width(); + + // Size controls + rLayout.addWindow( &maFlExportSize ); + + Size aLbMax( maLbSizeX.GetSizePixel() ); + aLbMax.Width() = Max( aLbMax.Width(), maLbResolution.GetSizePixel().Width() ); + + boost::shared_ptr< vcl::LabelColumn > xSizeColumns( new vcl::LabelColumn( &rLayout ) ); + rLayout.addChild( xSizeColumns ); + + // row 1 + boost::shared_ptr< vcl::RowOrColumn > xColumn( new vcl::RowOrColumn( xSizeColumns.get(), false ) ); + xSizeColumns->addRow( &maFtSizeX, xColumn, nIndent ); + Size aMinSize( maMfSizeX.GetSizePixel() ); + nIndex = xColumn->addWindow( &maMfSizeX ); + xColumn->setMinimumSize( nIndex, aMinSize ); + nIndex = xColumn->addWindow( &maLbSizeX ); + xColumn->setMinimumSize( nIndex, aLbMax ); + + // row 2 + xColumn = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xSizeColumns.get(), false ) ); + xSizeColumns->addRow( &maFtSizeY, xColumn, nIndent ); + nIndex = xColumn->addWindow( &maMfSizeY ); + xColumn->setMinimumSize( nIndex, aMinSize ); + nIndex = xColumn->addWindow( &maLbSizeY ); + xColumn->setMinimumSize( nIndex, aLbMax ); + + // row 3 + if ( mbIsPixelFormat ) // TODO: (metafileresolutionsupport) + { + xColumn = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xSizeColumns.get(), false ) ); + xSizeColumns->addRow( &maFtResolution, xColumn, nIndent ); + nIndex = xColumn->addWindow( &maNfResolution ); + xColumn->setMinimumSize( nIndex, aMinSize ); + nIndex = xColumn->addWindow( &maLbResolution ); + xColumn->setMinimumSize( nIndex, aLbMax ); + } + + sal_Int32 nUnit = mnInitialResolutionUnit; + if ( nUnit == UNIT_DEFAULT ) + nUnit = GetDefaultUnit(); + + if ( !mbIsPixelFormat ) + { + maLbSizeX.RemoveEntry( UNIT_PIXEL ); // removing pixel + if ( nUnit >= UNIT_PIXEL ) + nUnit = UNIT_CM; + } + else if ( nUnit > UNIT_MAX_ID ) + nUnit = UNIT_PIXEL; + if ( nUnit < 0 ) + nUnit = UNIT_CM; + maLbSizeX.SelectEntryPos( static_cast< USHORT >( nUnit ) ); + + if ( mbIsPixelFormat ) // TODO: (metafileresolutionsupport) should be supported for vector formats also... this makes + { // sense eg for bitmap fillings in metafiles, to preserve high dpi output + // (atm without special vector support the bitmaps are rendered with 96dpi) + sal_Int32 nResolution = mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolution" ) ), 96 ); + if ( nResolution < 1 ) + nResolution = 96; + maNfResolution.SetValue( nResolution ); + + sal_Int32 nResolutionUnit = mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolutionUnit" ) ), 1 ); + if ( ( nResolutionUnit < 0 ) || ( nResolutionUnit > 2 ) ) + nResolutionUnit = 1; + maLbResolution.SelectEntryPos( static_cast< USHORT >( nResolutionUnit ) ); + } + + boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); +} + +void ExportDialog::createColorDepthControls( vcl::RowOrColumn& rLayout ) +{ + // Color Depth + Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) ); + long nIndent = aBorder.Width(); + + boost::shared_ptr< vcl::RowOrColumn > xRow( new vcl::RowOrColumn( &rLayout, false ) ); + rLayout.addChild( xRow ); + xRow->addWindow( &maFlColorDepth ); + + xRow = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( &rLayout, false ) ); + rLayout.addChild( xRow ); + boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); + xRow->addChild( xIndenter ); + boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); + xIndenter->setChild( xRows ); + xRows->addWindow( &maLbColorDepth ); + + boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); +} + +void ExportDialog::createScrollBar( vcl::RowOrColumn& rLayout ) +{ + boost::shared_ptr< vcl::RowOrColumn > xRow( new vcl::RowOrColumn( &rLayout, false ) ); + rLayout.addChild( xRow ); + + Size aMinSize( maSbCompression.GetSizePixel() ); + size_t nIndex = xRow->addWindow( &maSbCompression ); + xRow->setMinimumSize( nIndex, aMinSize ); + aMinSize = maNfCompression.GetSizePixel(); + nIndex = xRow->addWindow( &maNfCompression ); + xRow->setMinimumSize( nIndex, aMinSize ); +} + +void ExportDialog::createFilterOptions( vcl::RowOrColumn& rLayout ) +{ + Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) ); + long nIndent = aBorder.Width(); + + switch( mnFormat ) + { + case FORMAT_JPG : + { + sal_Int32 nColor = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorMode" ) ), 0 ); + if ( nColor == 1 ) + nColor = 0; + else + nColor = 1; + maLbColorDepth.InsertEntry( ms8BitGrayscale ); + maLbColorDepth.InsertEntry( ms24BitColor ); + maLbColorDepth.SelectEntryPos( nColor ); + createColorDepthControls( maLayout ); + + rLayout.addWindow( &maFlJPGQuality ); + + // Quality + boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); + rLayout.addChild( xIndenter ); + boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); + xIndenter->setChild( xRows ); + createScrollBar( *xRows.get() ); + xRows->addWindow( &maFtJPGMin ); + xRows->addWindow( &maFtJPGMax ); + if ( maCbJPGPreview.IsEnabled() ) + xRows->addWindow( &maCbJPGPreview ); + + boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); + + sal_Int32 nQuality = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Quality" ) ), 75 ); + if ( ( nQuality < 1 ) || ( nQuality > 100 ) ) + nQuality = 75; + + maSbCompression.SetRangeMin( 1 ); + maSbCompression.SetRangeMax( 100 ); + maNfCompression.SetMin( 1 ); + maNfCompression.SetMax( 100 ); + maNfCompression.SetValue( nQuality ); + maNfCompression.SetStrictFormat( sal_True ); + if ( maCbJPGPreview.IsEnabled() ) + maCbJPGPreview.Check( sal_False ); + } + break; + case FORMAT_PNG : + { + rLayout.addWindow( &maFlCompression ); + + // Compression 1..9 + boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); + rLayout.addChild( xIndenter ); + boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); + xIndenter->setChild( xRows ); + createScrollBar( *xRows.get() ); + xRows->addWindow( &maFtPNGMin ); + xRows->addWindow( &maFtPNGMax ); + boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); + + // Interlaced + rLayout.addWindow( &maFlMode ); + xIndenter.reset( new vcl::Indenter( &rLayout, nIndent ) ); + rLayout.addChild( xIndenter ); + xRows.reset( new vcl::RowOrColumn( &rLayout, true ) ); + xIndenter->setChild( xRows ); + xRows->addWindow( &maCbInterlaced ); + + xSpacer.reset( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); + + sal_Int32 nCompression = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Compression" ) ), 6 ); + if ( ( nCompression < 1 ) || ( nCompression > 9 ) ) + nCompression = 6; + maSbCompression.SetRangeMin( 1 ); + maSbCompression.SetRangeMax( 9 ); + maNfCompression.SetMin( 1 ); + maNfCompression.SetMax( 9 ); + maNfCompression.SetValue( 9 ); + maNfCompression.SetStrictFormat( sal_True ); + + maCbInterlaced.Check( mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), 0 ) != 0 ); + } + break; + case FORMAT_BMP : + { + sal_Int32 nColor = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Color" ) ), 0 ); + if ( nColor == 0 ) + nColor = 6; + else + nColor--; + maLbColorDepth.InsertEntry( ms1BitTreshold ); + maLbColorDepth.InsertEntry( ms1BitDithered ); + maLbColorDepth.InsertEntry( ms4BitGrayscale ); + maLbColorDepth.InsertEntry( ms4BitColorPalette ); + maLbColorDepth.InsertEntry( ms8BitGrayscale ); + maLbColorDepth.InsertEntry( ms8BitColorPalette ); + maLbColorDepth.InsertEntry( ms24BitColor ); + maLbColorDepth.SelectEntryPos( nColor ); + createColorDepthControls( maLayout ); + + rLayout.addWindow( &maFlCompression ); + // RLE coding + boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); + rLayout.addChild( xIndenter ); + boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); + xIndenter->setChild( xRows ); + xRows->addWindow( &maCbRLEEncoding ); + boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); + + maCbRLEEncoding.Check( mpFilterOptionsItem->ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( "RLE_Coding" ) ), sal_True ) ); + } + break; + case FORMAT_GIF : + { + rLayout.addWindow( &maFlMode ); + boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); + rLayout.addChild( xIndenter ); + boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); + xIndenter->setChild( xRows ); + xRows->addWindow( &maCbInterlaced ); + boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); + + rLayout.addWindow( &maFlGIFDrawingObjects ); + xIndenter = boost::shared_ptr< vcl::Indenter >( new vcl::Indenter( &rLayout, nIndent ) ); + rLayout.addChild( xIndenter ); + xRows = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( &rLayout, true ) ); + xIndenter->setChild( xRows ); + xRows->addWindow( &maCbSaveTransparency ); + xSpacer.reset( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); + + maCbInterlaced.Check( mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), 1 ) != 0 ); + maCbSaveTransparency.Check( mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Translucent" ) ), 1 ) != 0 ); + } + break; + case FORMAT_PBM : + case FORMAT_PGM : + case FORMAT_PPM : + { + rLayout.addWindow( &maFlJPGQuality ); + + // RB Binary / Text + boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); + rLayout.addChild( xIndenter ); + boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); + xIndenter->setChild( xRows ); + xRows->addWindow( &maRbBinary ); + xRows->addWindow( &maRbText ); + boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); + + sal_Int32 nFormat = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "FileFormat" ) ), 1 ); + maRbBinary.Check( nFormat == 0 ); + maRbText.Check( nFormat != 0 ); + } + break; + case FORMAT_EPS : + { + boost::shared_ptr< vcl::RowOrColumn > xColumns( new vcl::RowOrColumn( &rLayout, false ) ); + rLayout.addChild( xColumns ); + boost::shared_ptr< vcl::RowOrColumn > xLeft( new vcl::RowOrColumn( &rLayout, true ) ); + xColumns->addChild( xLeft ); + + xLeft->addWindow( &maFlEPSPreview ); + boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( xLeft.get(), nIndent ) ); + xLeft->addChild( xIndenter ); + boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( xLeft.get(), true ) ); + xIndenter->setChild( xRows ); + xRows->addWindow( &maCbEPSPreviewTIFF ); + xRows->addWindow( &maCbEPSPreviewEPSI ); + boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( xLeft.get(), 2 ) ); + xLeft->addChild( xSpacer ); + + xLeft->addWindow( &maFlEPSVersion ); + xIndenter = boost::shared_ptr< vcl::Indenter >( new vcl::Indenter( xLeft.get(), nIndent ) ); + xLeft->addChild( xIndenter ); + xRows = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xLeft.get(), true ) ); + xIndenter->setChild( xRows ); + xRows->addWindow( &maRbEPSLevel1 ); + xRows->addWindow( &maRbEPSLevel2 ); + xSpacer.reset( new vcl::Spacer( xLeft.get(), 2 ) ); + xLeft->addChild( xSpacer ); + + boost::shared_ptr< vcl::RowOrColumn > xRight( new vcl::RowOrColumn( &rLayout, true ) ); + xColumns->addChild( xRight ); + + xRight->addWindow( &maFlEPSColorFormat ); + xIndenter = boost::shared_ptr< vcl::Indenter >( new vcl::Indenter( xRight.get(), nIndent ) ); + xRight->addChild( xIndenter ); + xRows = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xRight.get(), true ) ); + xIndenter->setChild( xRows ); + xRows->addWindow( &maRbEPSColorFormat1 ); + xRows->addWindow( &maRbEPSColorFormat2 ); + xSpacer.reset( new vcl::Spacer( xRight.get(), 2 ) ); + xRight->addChild( xSpacer ); + + xRight->addWindow( &maFlCompression ); + xIndenter = boost::shared_ptr< vcl::Indenter >( new vcl::Indenter( xRight.get(), nIndent ) ); + xRight->addChild( xIndenter ); + xRows = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xRight.get(), true ) ); + xIndenter->setChild( xRows ); + xRows->addWindow( &maRbEPSCompressionLZW ); + xRows->addWindow( &maRbEPSCompressionNone ); + + xSpacer.reset( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); + + sal_Int32 nPreview = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Preview" ) ), 0 ); + sal_Int32 nVersion = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ), 2 ); + sal_Int32 nColor = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorFormat" ) ), 0 ); + sal_Int32 nCompr = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "CompressionMode" ) ), 2 ); + + mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "TextMode" ) ), 0 ); + + maCbEPSPreviewTIFF.Check( ( nPreview & 1 ) != 0 ); + maCbEPSPreviewEPSI.Check( ( nPreview & 2 ) != 0 ); + + maRbEPSLevel1.Check( nVersion == 1 ); + maRbEPSLevel2.Check( nVersion == 2 ); + + maRbEPSColorFormat1.Check( nColor == 1 ); + maRbEPSColorFormat2.Check( nColor != 1 ); + + maRbEPSCompressionLZW.Check( nCompr == 1 ); + maRbEPSCompressionNone.Check( nCompr != 1 ); + } + break; + } +} + +void ExportDialog::createButtons( vcl::RowOrColumn& rLayout ) +{ + rLayout.addWindow( &maFlButtons ); + boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); + + Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) ); + + boost::shared_ptr< vcl::RowOrColumn > xButtons( new vcl::RowOrColumn( &rLayout, false ) ); + size_t nIndex = rLayout.addChild( xButtons ); + rLayout.setBorders( nIndex, aBorder.Width(), 0, aBorder.Width(), aBorder.Width() ); + + Size aMinSize( maBtnCancel.GetSizePixel() ); + // insert help button + xButtons->setMinimumSize( xButtons->addWindow( &maBtnHelp ), aMinSize ); + + // insert a spacer, cancel and OK buttons are right aligned + + xSpacer.reset( new vcl::Spacer( xButtons.get(), 2 ) ); + xButtons->addChild( xSpacer ); + xButtons->setMinimumSize( xButtons->addWindow( &maBtnOK ), aMinSize ); + xButtons->setMinimumSize( xButtons->addWindow( &maBtnCancel ), aMinSize ); +} + +void ExportDialog::setupLayout() +{ + Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) ); + maLayout.setParentWindow( this ); + maLayout.setOuterBorder( aBorder.Width() ); + + createSizeControls( maLayout ); + createFilterOptions( maLayout ); + + if ( mnMaxFilesizeForRealtimePreview || mbIsPixelFormat ) + { + maLayout.addWindow( &maFlEstimatedSize ); + maLayout.addWindow( &maFtEstimatedSize ); + } + createButtons( maLayout ); + + maLayout.show(); + maDialogSize = maLayout.getOptimalSize( WINDOWSIZE_PREFERRED ); + maLayout.setManagedArea( Rectangle( Point(), maDialogSize ) ); + SetOutputSizePixel( Size( mbPreview ? maDialogSize.Width() * 2 : maDialogSize.Width(), maDialogSize.Height() ) ); + + maRectFlButtons = Rectangle( maFlButtons.GetPosPixel(), maFlButtons.GetSizePixel() ); + maRectBtnHelp = Rectangle( maBtnHelp.GetPosPixel(), maBtnHelp.GetSizePixel() ); + maRectBtnOK = Rectangle( maBtnOK.GetPosPixel(), maBtnOK.GetSizePixel() ); + maRectBtnCancel = Rectangle( maBtnCancel.GetPosPixel(), maBtnOK.GetSizePixel() ); + + maLbSizeY.Hide(); +} + +static rtl::OUString ImpValueOfInKB( const sal_Int64& rVal ) +{ + double fVal( static_cast( rVal ) ); + fVal /= ( 1 << 10 ); + fVal += 0.05; + rtl::OUStringBuffer aVal( rtl::OUString::valueOf( fVal ) ); + sal_Int32 nX( rtl::OUString( aVal.getStr() ).indexOf( '.', 0 ) ); + if ( nX > 0 ) + aVal.setLength( nX + 2 ); + return aVal.makeStringAndClear(); +} + +sal_Int32 static GetZoomValueFromThumbPos( sal_Int32 nThumbPos ) +{ + sal_Int32 nProz = 0; + if ( nThumbPos <= 50 ) + nProz = nThumbPos * 2; // so a range of 50 represents 100% + else + nProz = ( ( nThumbPos - 50 ) * 60 ) + 100; // we want to scale up to 3000% + return nProz; +} + +void ExportDialog::updatePreview() +{ + // JPG +// maCbJPGPreview.Enable( IsTempExportAvailable() ); + +// if ( maCbJPGPreview.IsEnabled() && maCbJPGPreview.IsChecked() ) + if ( mbPreview ) + { + long nScrollBarSize = Application::GetSettings().GetStyleSettings().GetScrollBarSize(); + + Point aPreviewPos( maDialogSize.Width(), 0 ); + Size aPreviewSize( maDialogSize.Width(), maFlButtons.GetPosPixel().Y() ); + + Point aFixedBitmapPos( aPreviewPos ); + Size aFixedBitmapSize( aPreviewSize ); + + maSbZoom.Show( sal_False ); + maSbZoom.SetPosPixel( Point( aPreviewPos.X(), aPreviewPos.Y() ) ); + maSbZoom.SetSizePixel( Size( aPreviewSize.Width() / 4, nScrollBarSize ) ); + maNfZoom.Show( sal_False ); + maNfZoom.SetPosPixel( Point( aPreviewPos.X() + aPreviewSize.Width() / 4, aPreviewPos.Y() ) ); + maNfZoom.SetSizePixel( Size( aPreviewSize.Width() / 6, nScrollBarSize ) ); + maNfZoom.SetValue( GetZoomValueFromThumbPos( maSbZoom.GetThumbPos() ) ); + maFbJPGPreview.Show( sal_True ); + + sal_Int32 nZoom = GetZoomValueFromThumbPos( maSbZoom.GetThumbPos() ); + double fSizePixelX = static_cast< double >( maSize.Width * nZoom ) / 100.0; + double fSizePixelY = static_cast< double >( maSize.Height * nZoom ) / 100.0; + + double fXRatio = fSizePixelX / maSize.Width; // the size of each pixel + double fYRatio = fSizePixelY / maSize.Height; + + sal_Bool bHorzSb = fSizePixelX > aFixedBitmapSize.Width(); + sal_Bool bVertSb = fSizePixelY > aFixedBitmapSize.Height(); + if ( bHorzSb ) + { + aFixedBitmapSize.Height() -= nScrollBarSize; + + maSbJPGPreviewHorz.Show( sal_True ); + maSbJPGPreviewHorz.SetPosPixel( Point( aFixedBitmapPos.X(), aFixedBitmapPos.Y() + aFixedBitmapSize.Height() ) ); + maSbJPGPreviewHorz.SetSizePixel( Size( aFixedBitmapSize.Width(), nScrollBarSize ) ); + } + else + { + maSbJPGPreviewHorz.Show( sal_False ); + } + + + if ( bVertSb ) + { + aFixedBitmapSize.Width() -= nScrollBarSize; + + maSbJPGPreviewVert.Show( sal_True ); + maSbJPGPreviewVert.SetPosPixel( Point( aFixedBitmapPos.X() + aFixedBitmapSize.Width(), aFixedBitmapPos.Y() ) ); + maSbJPGPreviewVert.SetSizePixel( Size( nScrollBarSize, aFixedBitmapSize.Height() ) ); + } + else + { + maSbJPGPreviewVert.Show( sal_False ); + } + + Point aPos( 0, 0 ); + Size aSize; + if ( fXRatio > 1.0 ) + { + aSize.Width() = maSize.Width > aFixedBitmapSize.Width() ? maSize.Width : aFixedBitmapSize.Width(); + aSize.Width() /= static_cast(fXRatio); + } + else + { + aSize.Width() = maSize.Width < aFixedBitmapSize.Width() ? maSize.Width : aFixedBitmapSize.Width(); + aSize.Width() /= static_cast(fXRatio); + } + + if ( fYRatio > 1.0 ) + { + aSize.Height() = maSize.Height > aFixedBitmapSize.Height() ? maSize.Height : aFixedBitmapSize.Height(); + aSize.Height() /= static_cast(fYRatio); + } + else + { + aSize.Height() = maSize.Height < aFixedBitmapSize.Height() ? maSize.Height : aFixedBitmapSize.Height(); + aSize.Height() /= static_cast(fYRatio); + } + + if ( aSize.Width() < maSize.Width ) + { + sal_Int32 nXDiff = static_cast< sal_Int32 >( ( ( ( maSize.Width - aSize.Width() ) * maSbJPGPreviewHorz.GetThumbPos() ) / 100.0 ) ); + aPos.X() += nXDiff; + } + if ( aSize.Height() < maSize.Height ) + { + sal_Int32 nYDiff = static_cast< sal_Int32 >( ( ( ( maSize.Height - aSize.Height() ) * maSbJPGPreviewVert.GetThumbPos() ) / 100.0 ) ); + aPos.Y() += nYDiff; + } + + Bitmap aCroppedBitmap( maBitmap ); + aCroppedBitmap.Crop( Rectangle( aPos, aSize ) ); + aSize = aCroppedBitmap.GetSizePixel(); + aSize = Size( static_cast(aSize.Width() * fXRatio), static_cast(aSize.Height() * fYRatio) ); + aCroppedBitmap.Scale( aSize ); + + if ( aSize.Width() > aFixedBitmapSize.Width() ) + aSize.Width() = aFixedBitmapSize.Width(); + if ( aSize.Height() > aFixedBitmapSize.Height() ) + aSize.Height() = aFixedBitmapSize.Height(); + Point aPoint( aFixedBitmapPos ); + if ( aSize.Width() < aFixedBitmapSize.Width() ) + aPoint.X() += ( aFixedBitmapSize.Width() - aSize.Width() ) / 2; + if ( aSize.Height() < aFixedBitmapSize.Height() ) + aPoint.Y() += ( aFixedBitmapSize.Height() - aSize.Height() ) / 2; + + maFbJPGPreview.SetPosPixel( aPoint ); + maFbJPGPreview.SetSizePixel( aSize ); + maFbJPGPreview.SetBitmap( aCroppedBitmap ); + + SetOutputSizePixel( Size( maDialogSize.Width() * 2, maDialogSize.Height() ) ); + + maFlButtons.SetSizePixel( Size( maRectFlButtons.GetWidth() * 2, maRectFlButtons.GetHeight() ) ); + maBtnHelp.SetPosPixel( Point( maRectBtnHelp.Left() + maDialogSize.Width(), maRectBtnHelp.Top() ) ); + maBtnOK.SetPosPixel( Point( maRectBtnOK.Left() + maDialogSize.Width(), maRectBtnOK.Top() ) ); + maBtnCancel.SetPosPixel( Point( maRectBtnCancel.Left() + maDialogSize.Width(), maRectBtnCancel.Top() ) ); + } + else + { + maSbZoom.Show( sal_False ); + maNfZoom.Show( sal_False ); + maFbJPGPreview.Show( sal_False ); + maSbJPGPreviewHorz.Show( sal_False ); + maSbJPGPreviewVert.Show( sal_False ); + + SetOutputSizePixel( maDialogSize ); + + maFlButtons.SetSizePixel( Size( maRectFlButtons.GetWidth(), maRectFlButtons.GetHeight() ) ); + maBtnHelp.SetPosPixel( Point( maRectBtnHelp.Left(), maRectBtnHelp.Top() ) ); + maBtnOK.SetPosPixel( Point( maRectBtnOK.Left(), maRectBtnOK.Top() ) ); + maBtnCancel.SetPosPixel( Point( maRectBtnCancel.Left(), maRectBtnCancel.Top() ) ); + } +} + +void ExportDialog::updateControls() +{ + GetGraphicStream(); + + // Size Controls + if ( !mbIsPixelFormat ) + { + awt::Size aSize100thmm( maSize ); + Size aSize( LogicToLogic( Size( aSize100thmm.Width * 100, aSize100thmm.Height * 100 ), MAP_100TH_MM, + MapMode( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) ) ) ); + maMfSizeX.SetValue( aSize.Width() ); + maMfSizeY.SetValue( aSize.Height() ); + } + else + { + MapUnit aMapUnit( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) ); + if ( aMapUnit == MAP_PIXEL ) + { // calculating pixel count via resolution and original graphic size + maMfSizeX.SetDecimalDigits( 0 ); + maMfSizeY.SetDecimalDigits( 0 ); + maMfSizeX.SetValue( maSize.Width ); + maMfSizeY.SetValue( maSize.Height ); + } + else + { + maMfSizeX.SetDecimalDigits( 2 ); + maMfSizeY.SetDecimalDigits( 2 ); + double fRatio; + switch( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) ) + { + case MAP_INCH : fRatio = static_cast< double >( maResolution.Width ) * 0.0254; break; + case MAP_MM : fRatio = static_cast< double >( maResolution.Width ) * 0.001; break; + case MAP_POINT :fRatio = ( static_cast< double >( maResolution.Width ) * 0.0254 ) / 72.0; break; + default: + case MAP_CM : fRatio = static_cast< double >( maResolution.Width ) * 0.01; break; + } + maMfSizeX.SetValue( static_cast< sal_Int32 >( ( static_cast< double >( maSize.Width * 100 ) / fRatio ) + 0.5 ) ); + maMfSizeY.SetValue( static_cast< sal_Int32 >( ( static_cast< double >( maSize.Height * 100 ) / fRatio ) + 0.5 ) ); + } + } + sal_Int32 nResolution = 0; + switch( maLbResolution.GetSelectEntryPos() ) + { + case 0 : nResolution = maResolution.Width / 100; break; // pixels / cm + case 2 : nResolution = maResolution.Width; break; // pixels / meter + default: + case 1 : nResolution = static_cast< sal_Int32 >(maResolution.Width * 0.0254); break; // pixels / inch + } + maNfResolution.SetValue( nResolution ); + + if ( maSbCompression.IsVisible() ) + maSbCompression.SetThumbPos( maNfCompression.GetValue() ); + + // updating estimated size + sal_Int64 nRealFileSize( mpTempStream->Tell() ); + if ( mbIsPixelFormat ) + { + String aEst( nRealFileSize ? msEstimatedSizePix2 : msEstimatedSizePix1 ); + sal_Int64 nRawFileSize( GetRawFileSize() ); + xub_StrLen nInd = aEst.Search( '%' ); + aEst.Replace( nInd, 2, ImpValueOfInKB( nRawFileSize ) ); + + if ( nRealFileSize ) + { + nInd = aEst.Search( '%', nInd ); + aEst.Replace( nInd, 2, ImpValueOfInKB( nRealFileSize ) ); + } + maFtEstimatedSize.SetText( aEst ); + } + else + { + if ( mnMaxFilesizeForRealtimePreview ) + { + String aEst( msEstimatedSizeVec ); + xub_StrLen nInd = aEst.Search( '%', 0 ); + aEst.Replace( nInd, 2, ImpValueOfInKB( nRealFileSize ) ); + maFtEstimatedSize.SetText( aEst ); + } + } + updatePreview(); + + // EPS + if ( maRbEPSLevel1.IsVisible() ) + { + sal_Bool bEnabled = maRbEPSLevel1.IsChecked() == sal_False; + maRbEPSColorFormat1.Enable( bEnabled ); + maRbEPSColorFormat2.Enable( bEnabled ); + maRbEPSCompressionLZW.Enable( bEnabled ); + maRbEPSCompressionNone.Enable( bEnabled ); + } +} + +ExportDialog::~ExportDialog() +{ + delete mpFilterOptionsItem; + delete mpOptionsItem; +} + + +/************************************************************************* +|* +|* Speichert eingestellte Werte in ini-Datei +|* +\************************************************************************/ +IMPL_LINK( ExportDialog, UpdateHdl, void *, EMPTYARG ) +{ + updateControls(); + return 0; +} + +IMPL_LINK( ExportDialog, UpdateHdlMtfSizeX, void *, EMPTYARG ) +{ + double fRatio = static_cast< double >( maOriginalSize.Height ) / maOriginalSize.Width; + + if ( mbIsPixelFormat ) + { + switch( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) ) + { + case MAP_INCH : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.0254 * maMfSizeX.GetValue() / 100.0 + 0.5 ); break; + case MAP_CM : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.01 * maMfSizeX.GetValue() / 100.0 + 0.5 ); break; + case MAP_MM : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.001 * maMfSizeX.GetValue() / 100.0 + 0.5 ); break; + case MAP_POINT : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.0254 * maMfSizeX.GetValue() / 100.0 * 72 + 0.5 ); break; + default: + case MAP_PIXEL : maSize.Width = maMfSizeX.GetValue(); break; + } + maSize.Height = static_cast< sal_Int32 >( fRatio * maSize.Width + 0.5 ); + } + else + { + Fraction aFract( 1, 100 ); + sal_Int32 nWidth = maMfSizeX.GetValue(); + sal_Int32 nHeight= static_cast< sal_Int32 >( nWidth * fRatio ); + const Size aSource( static_cast< sal_Int32 >( nWidth ), static_cast< sal_Int32 >( nHeight ) ); + MapMode aSourceMapMode( GetMapUnit( maLbSizeX.GetSelectEntryPos() ),Point(), aFract, aFract ); + Size aDest( LogicToLogic( aSource, aSourceMapMode, MAP_100TH_MM ) ); + + maSize.Width = aDest.Width(); + if ( mbPreserveAspectRatio ) + maSize.Height = aDest.Height(); + } + updateControls(); + return 0; +} + +IMPL_LINK( ExportDialog, UpdateHdlMtfSizeY, void *, EMPTYARG ) +{ + double fRatio = static_cast< double >( maOriginalSize.Width ) / maOriginalSize.Height; + + if ( mbIsPixelFormat ) + { + switch( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) ) + { + case MAP_INCH : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.0254 * maMfSizeY.GetValue() / 100.0 + 0.5 ); break; + case MAP_CM : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.01 * maMfSizeY.GetValue() / 100.0 + 0.5 ); break; + case MAP_MM : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.001 * maMfSizeY.GetValue() / 100.0 + 0.5 ); break; + case MAP_POINT : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.0254 * maMfSizeY.GetValue() / 100.0 * 72 + 0.5 ); break; + default: + case MAP_PIXEL : maSize.Height = maMfSizeY.GetValue(); break; + } + maSize.Width = static_cast< sal_Int32 >( fRatio * maSize.Height + 0.5 ); + } + else + { + Fraction aFract( 1, 100 ); + sal_Int32 nHeight= maMfSizeY.GetValue(); + sal_Int32 nWidth = static_cast< sal_Int32 >( nHeight * fRatio ); + const Size aSource( static_cast< sal_Int32 >( nWidth ), static_cast< sal_Int32 >( nHeight ) ); + MapMode aSourceMapMode( GetMapUnit( maLbSizeX.GetSelectEntryPos() ),Point(), aFract, aFract ); + Size aDest( LogicToLogic( aSource, aSourceMapMode, MAP_100TH_MM ) ); + + maSize.Height = aDest.Height(); + if ( mbPreserveAspectRatio ) + maSize.Width = aDest.Width(); + } + updateControls(); + return 0; +} + +IMPL_LINK( ExportDialog, UpdateHdlNfResolution, void *, EMPTYARG ) +{ + sal_Int32 nResolution = maNfResolution.GetValue(); + if ( maLbResolution.GetSelectEntryPos() == 0 ) // pixels / cm + nResolution *= 100; + else if ( maLbResolution.GetSelectEntryPos() == 1 ) // pixels / inch + nResolution = static_cast< sal_Int32 >( ( ( static_cast< double >( nResolution ) + 0.5 ) / 0.0254 ) ); + maResolution.Width = nResolution; + maResolution.Height= nResolution; + + updateControls(); + return 0; +} + +IMPL_LINK( ExportDialog, SbCompressionUpdateHdl, void *, EMPTYARG ) +{ + maNfCompression.SetValue( maSbCompression.GetThumbPos() ); + updateControls(); + return 0; +} + +IMPL_LINK( ExportDialog, OK, void *, EMPTYARG ) +{ + // writing config parameter + + + mrFltCallPara.aFilterData = GetFilterData( sal_True ); + EndDialog( RET_OK ); + + return 0; +} + diff --git a/svtools/source/filter/exportdialog.hrc b/svtools/source/filter/exportdialog.hrc new file mode 100644 index 000000000000..e230bcd2c5c3 --- /dev/null +++ b/svtools/source/filter/exportdialog.hrc @@ -0,0 +1,99 @@ +/************************************************************************* + * + * 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 + +#define BTN_OK 1 +#define BTN_CANCEL 1 +#define BTN_HELP 1 + +#define FL_EXPORT_SIZE 1 +#define FL_COLOR_DEPTH 2 +#define FL_JPG_QUALITY 3 +#define FL_COMPRESSION 4 +#define FL_MODE 5 +#define FL_GIF_DRAWING_OBJECTS 6 +#define FL_PBM_OPTIONS 7 +#define FL_EPS_PREVIEW 8 +#define FL_EPS_VERSION 9 +#define FL_EPS_COLOR_FORMAT 10 +#define FL_ESTIMATED_SIZE 11 +#define FL_BUTTONS 12 + +#define FT_SIZEX 1 +#define FT_SIZEY 2 +#define FT_RESOLUTION 3 +#define FT_JPG_MIN 4 +#define FT_JPG_MAX 5 +#define FT_PNG_MIN 6 +#define FT_PNG_MAX 7 +#define FT_ESTIMATED_SIZE 8 + +#define NF_RESOLUTION 1 +#define NF_COMPRESSION 2 +#define NF_ZOOM 3 + +#define MF_SIZEX 1 +#define MF_SIZEY 2 + +#define LB_SIZEX 1 +#define LB_SIZEY 2 +#define LB_RESOLUTION 3 +#define LB_COLOR_DEPTH 4 + +#define RB_BINARY 1 +#define RB_TEXT 2 +#define RB_EPS_LEVEL1 3 +#define RB_EPS_LEVEL2 4 +#define RB_EPS_COLOR_FORMAT1 5 +#define RB_EPS_COLOR_FORMAT2 6 +#define RB_EPS_COMPRESSION_LZW 7 +#define RB_EPS_COMPRESSION_NONE 8 + +#define CB_JPG_PREVIEW 1 +#define CB_INTERLACED 2 +#define CB_RLE_ENCODING 3 +#define CB_SAVE_TRANSPARENCY 4 +#define CB_EPS_PREVIEW_TIFF 5 +#define CB_EPS_PREVIEW_EPSI 6 + +#define FB_JPG_PREVIEW 1 + +#define SB_COMPRESSION 1 +#define SB_JPG_PREVIEW_HORZ 2 +#define SB_JPG_PREVIEW_VERT 3 +#define SB_ZOOM 4 + +#define STR_1BIT_THRESHOLD 1 +#define STR_1BIT_DITHERED 2 +#define STR_4BIT_GRAYSCALE 3 +#define STR_4BIT_COLOR_PALETTE 4 +#define STR_8BIT_GRAYSCALE 5 +#define STR_8BIT_COLOR_PALETTE 6 +#define STR_24BIT_TRUE_COLOR 7 +#define STR_ESTIMATED_SIZE_PIX_1 8 +#define STR_ESTIMATED_SIZE_PIX_2 9 +#define STR_ESTIMATED_SIZE_VEC 10 diff --git a/svtools/source/filter/exportdialog.hxx b/svtools/source/filter/exportdialog.hxx new file mode 100644 index 000000000000..20a9ac3ea832 --- /dev/null +++ b/svtools/source/filter/exportdialog.hxx @@ -0,0 +1,216 @@ +/************************************************************************* + * + * 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 _EXPORTDIALOG_HXX_ +#define _EXPORTDIALOG_HXX_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/************************************************************************* +|* +|* Dialog zum Einstellen von Filteroptionen bei Pixelformaten +|* +\************************************************************************/ + +class FilterConfigItem; +class ExportDialog : public ModalDialog +{ +private: + + FltCallDialogParameter& + mrFltCallPara; + + ResMgr* mpMgr; + + const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > + mxMgr; + const com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& + mxSourceDocument; + + FixedLine maFlExportSize; + FixedText maFtSizeX; + MetricField maMfSizeX; + ListBox maLbSizeX; + FixedText maFtSizeY; + MetricField maMfSizeY; + ListBox maLbSizeY; + FixedText maFtResolution; + NumericField maNfResolution; + ListBox maLbResolution; + FixedLine maFlColorDepth; + ListBox maLbColorDepth; + FixedLine maFlJPGQuality; + FixedLine maFlMode; + FixedLine maFlPBMOptions; + ScrollBar maSbCompression; + NumericField maNfCompression; + FixedText maFtJPGMin; + FixedText maFtJPGMax; + FixedText maFtPNGMin; + FixedText maFtPNGMax; + CheckBox maCbJPGPreview; + CheckBox maCbInterlaced; + CheckBox maCbRLEEncoding; + FixedLine maFlGIFDrawingObjects; + CheckBox maCbSaveTransparency; + RadioButton maRbBinary; + RadioButton maRbText; + FixedLine maFlEPSPreview; + CheckBox maCbEPSPreviewTIFF; + CheckBox maCbEPSPreviewEPSI; + FixedLine maFlEPSVersion; + RadioButton maRbEPSLevel1; + RadioButton maRbEPSLevel2; + FixedLine maFlEPSColorFormat; + RadioButton maRbEPSColorFormat1; + RadioButton maRbEPSColorFormat2; + FixedLine maFlCompression; + RadioButton maRbEPSCompressionLZW; + RadioButton maRbEPSCompressionNone; + FixedLine maFlEstimatedSize; + FixedText maFtEstimatedSize; + String msEstimatedSizePix1; + String msEstimatedSizePix2; + String msEstimatedSizeVec; + FixedLine maFlButtons; + FixedBitmap maFbJPGPreview; + ScrollBar maSbZoom; + NumericField maNfZoom; + ScrollBar maSbJPGPreviewHorz; + ScrollBar maSbJPGPreviewVert; + OKButton maBtnOK; + CancelButton maBtnCancel; + HelpButton maBtnHelp; + + String ms1BitTreshold; + String ms1BitDithered; + String ms4BitGrayscale; + String ms4BitColorPalette; + String ms8BitGrayscale; + String ms8BitColorPalette; + String ms24BitColor; + + vcl::RowOrColumn maLayout; + Size maDialogSize; + + FilterConfigItem* mpOptionsItem; + FilterConfigItem* mpFilterOptionsItem; + + String maExt; + String maEstimatedSizeText; + sal_Int16 mnFormat; + sal_Int32 mnMaxFilesizeForRealtimePreview; + + Rectangle maRectFlButtons; + Rectangle maRectBtnHelp; + Rectangle maRectBtnOK; + Rectangle maRectBtnCancel; + + SvStream* mpTempStream; + Bitmap maBitmap; + + com::sun::star::awt::Size + maOriginalSize; // the original graphic size in 1/100mm + com::sun::star::awt::Size + maSize; // for vector graphics it always contains the logical size in 1/100mm + + sal_Bool mbPreview; + sal_Bool mbIsPixelFormat; + sal_Bool mbExportSelection; + sal_Bool mbPreserveAspectRatio; + + sal_Int32 mnInitialResolutionUnit; + + // for pixel graphics it always contains the pixel count + com::sun::star::awt::Size + maResolution; // it always contains the number of pixels per meter + + com::sun::star::uno::Reference< com::sun::star::drawing::XShape > + mxShape; + com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > + mxShapes; + com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > + mxPage; + + + DECL_LINK( UpdateHdl,void* p ); + DECL_LINK( UpdateHdlMtfSizeX,void* p ); + DECL_LINK( UpdateHdlMtfSizeY,void* p ); + DECL_LINK( UpdateHdlNfResolution,void* p ); + DECL_LINK( SbCompressionUpdateHdl,void* p ); + DECL_LINK( NfCompressionUpdateHdlX,void* p ); + + DECL_LINK( OK, void* p ); + + void createSizeControls( vcl::RowOrColumn& ); + void createColorDepthControls( vcl::RowOrColumn& ); + void createFilterOptions( vcl::RowOrColumn& ); + void createButtons( vcl::RowOrColumn& ); + void createScrollBar( vcl::RowOrColumn& ); + void setupLayout(); + void updatePreview(); + void updateControls(); + + void GetGraphicSource(); + sal_Bool GetGraphicStream(); + Bitmap GetGraphicBitmap( SvStream& rStream ); + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > + GetFilterData( sal_Bool bUpdateConfig ); + + sal_uInt32 GetRawFileSize() const; + sal_Bool IsTempExportAvailable() const; + + com::sun::star::awt::Size + GetOriginalSize(); + + sal_Int32 GetDefaultUnit(); + +public: + ExportDialog( FltCallDialogParameter& rPara, + const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > rxMgr, + const com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& rxSourceDocument, + sal_Bool bExportSelection, sal_Bool bIsExportVectorFormat ); + ~ExportDialog(); +}; + + + +#endif // _EXPORTDIALOG_HXX_ + diff --git a/svtools/source/filter/exportdialog.src b/svtools/source/filter/exportdialog.src new file mode 100644 index 000000000000..c9e87989a314 --- /dev/null +++ b/svtools/source/filter/exportdialog.src @@ -0,0 +1,529 @@ +/************************************************************************* + * + * 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 "exportdialog.hrc" + +String DLG_EXPORT_TITLE +{ + Text [ en-US ] = " Options" ; +}; + +ModalDialog DLG_EXPORT +{ + HelpID = "svtools:ModalDialog:DLG_EXPORT"; + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 178 , 135 ) ; + Moveable = TRUE ; + Closeable = TRUE ; + + FixedLine FL_EXPORT_SIZE + { + Hide = TRUE; + Size = MAP_APPFONT ( 110 , 8 ) ; + Text [ en-US ] = "Size" ; + }; + FixedText FT_SIZEX + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + Text [ en-US ] = "Width:" ; + }; + MetricField MF_SIZEX + { + HelpID = "svtools:MetricField:DLG_EXPORT:MF_SIZEX"; + Hide = TRUE; + Border = TRUE; + Size = MAP_APPFONT ( 30, 12 ) ; + TabStop = TRUE; + Repeat = TRUE; + Spin = FALSE; + StrictFormat = TRUE; + DecimalDigits = 2; + Unit = FUNIT_NONE; + Maximum = 99999; + Last = 255; + }; + ListBox LB_SIZEX + { + HelpID = "svtools:ListBox:DLG_EXPORT:LB_SIZEX"; + Hide = TRUE; + Border = TRUE ; + Size = MAP_APPFONT ( 60, 80 ) ; + DropDown = TRUE ; + Sort = FALSE ; + StringList [ en-US ] = + { + < "inches" ; > ; + < "cm" ; Default ; > ; + < "mm" ; > ; + < "points" ; > ; + < "pixels" ; > ; + }; + }; + FixedText FT_SIZEY + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + Text [ en-US ] = "Height:" ; + }; + MetricField MF_SIZEY + { + HelpID = "svtools:MetricField:DLG_EXPORT:MF_SIZEY"; + Hide = TRUE; + Border = TRUE; + Size = MAP_APPFONT ( 30, 12 ); + TabStop = TRUE; + Repeat = TRUE; + Spin = FALSE; + StrictFormat = TRUE; + DecimalDigits = 2; + Unit = FUNIT_NONE; + Maximum = 99999; + Last = 255 ; + }; + ListBox LB_SIZEY + { + HelpID = "svtools:ListBox:DLG_EXPORT:LB_SIZEY"; + Hide = TRUE; + Border = TRUE ; + Size = MAP_APPFONT ( 60, 80 ) ; + DropDown = TRUE ; + Sort = FALSE ; + StringList [ en-US ] = + { + < "inches" ; > ; + < "cm" ; Default ; > ; + < "mm" ; > ; + < "points" ; > ; + < "pixels" ; > ; + }; + }; + FixedText FT_RESOLUTION + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + Text [ en-US ] = "Resolution:" ; + }; + NumericField NF_RESOLUTION + { + HelpID = "svtools:NumericField:DLG_EXPORT:NF_RESOLUTION"; + Hide = TRUE; + Border = TRUE ; + Size = MAP_APPFONT ( 30, 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = FALSE ; + Maximum = 99999; + Last = 255 ; + }; + ListBox LB_RESOLUTION + { + HelpID = "svtools:ListBox:DLG_EXPORT:LB_RESOLUTION"; + Hide = TRUE; + Border = TRUE ; + Size = MAP_APPFONT ( 60, 80 ) ; + DropDown = TRUE ; + Sort = FALSE ; + StringList [ en-US ] = + { + < "pixels/cm" ; > ; + < "pixels/inch" ; Default ; > ; + < "pixels/meter" ; > ; + }; + }; + FixedLine FL_COLOR_DEPTH + { + Hide = TRUE; + Size = MAP_APPFONT ( 110 , 8 ) ; + Text [ en-US ] = "Color Depth" ; + }; + ListBox LB_COLOR_DEPTH + { + HelpID = "svtools:ListBox:DLG_EXPORT:LB_COLOR_DEPTH"; + Hide = TRUE; + Border = TRUE ; + Size = MAP_APPFONT ( 60, 80 ) ; + DropDown = TRUE ; + Sort = FALSE ; + }; + String STR_1BIT_THRESHOLD + { + Text [ en-US ] = "1 bit threshold"; + }; + String STR_1BIT_DITHERED + { + Text [ en-US ] = "1 bit dithered"; + }; + String STR_4BIT_GRAYSCALE + { + Text [ en-US ] = "4 bit grayscale"; + }; + String STR_4BIT_COLOR_PALETTE + { + Text [ en-US ] = "4 bit color"; + }; + String STR_8BIT_GRAYSCALE + { + Text [ en-US ] = "8 bit grayscale"; + }; + String STR_8BIT_COLOR_PALETTE + { + Text [ en-US ] = "8 bit color"; + }; + String STR_24BIT_TRUE_COLOR + { + Text [ en-US ] = "24 bit true color"; + }; + FixedLine FL_JPG_QUALITY + { + Hide = TRUE; + Size = MAP_APPFONT ( 110 , 8 ) ; + Text [ en-US ] = "Quality" ; + }; + FixedLine FL_COMPRESSION + { + Hide = TRUE; + Size = MAP_APPFONT ( 110 , 8 ) ; + Text [ en-US ] = "Compression" ; + }; + FixedLine FL_MODE + { + Hide = TRUE; + Size = MAP_APPFONT ( 110 , 8 ) ; + Text [ en-US ] = "Mode" ; + }; + FixedLine FL_PBM_OPTIONS + { + Hide = TRUE; + Size = MAP_APPFONT ( 110 , 8 ) ; + Text [ en-US ] = "File Format" ; + }; + ScrollBar SB_COMPRESSION + { + Hide = TRUE; + Size = MAP_APPFONT ( 48, 10 ) ; + VScroll = FALSE ; + HScroll = TRUE; + Drag = TRUE ; + }; + NumericField NF_COMPRESSION + { + HelpID = "svtools:NumericField:DLG_EXPORT:NF_COMPRESSION"; + Hide = TRUE; + Border = TRUE ; + Size = MAP_APPFONT ( 30, 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = FALSE ; + Maximum = 99999; + Last = 255 ; + }; + FixedText FT_JPG_MIN + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + Text [ en-US ] = "1 is minimum Quality and smallest file size." ; + }; + FixedText FT_JPG_MAX + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + Text [ en-US ] = "100 is maximum Quality and biggest file size." ; + }; + FixedText FT_PNG_MIN + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + Text [ en-US ] = "0 is biggest file size and fastest loading." ; + }; + FixedText FT_PNG_MAX + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + Text [ en-US ] = "9 is smallest file size and slowest loading." ; + }; + CheckBox CB_JPG_PREVIEW + { + HelpID = "svtools:CheckBox:DLG_EXPORT:CB_JPG_PREVIEW"; + Hide = TRUE; + Size = MAP_APPFONT ( 60 , 10 ) ; + Text [ en-US ] = "Preview" ; + }; + CheckBox CB_INTERLACED + { + HelpID = "svtools:CheckBox:DLG_EXPORT:CB_INTERLACED"; + Hide = TRUE; + Size = MAP_APPFONT ( 60 , 10 ) ; + Text [ en-US ] = "Interlaced" ; + }; + CheckBox CB_RLE_ENCODING + { + HelpID = "svtools:CheckBox:DLG_EXPORT:CB_RLE_ENCODING"; + Hide = TRUE; + Size = MAP_APPFONT ( 60 , 10 ) ; + Text [ en-US ] = "RLE encoding" ; + }; + FixedLine FL_GIF_DRAWING_OBJECTS + { + Hide = TRUE; + Size = MAP_APPFONT ( 110 , 8 ) ; + Text [ en-US ] = "Drawing Objects" ; + }; + CheckBox CB_SAVE_TRANSPARENCY + { + HelpID = "svtools:CheckBox:DLG_EXPORT:CB_SAVE_TRANSPARENCY"; + Hide = TRUE; + Size = MAP_APPFONT ( 60 , 10 ) ; + Text [ en-US ] = "Save transparency" ; + }; + RadioButton RB_BINARY + { + HelpID = "svtools:RadioButton:DLG_EXPORT:RB_BINARY"; + Hide = TRUE; + Size = MAP_APPFONT ( 105 , 10 ) ; + Text [ en-US ] = "Binary" ; + }; + RadioButton RB_TEXT + { + HelpID = "svtools:RadioButton:DLG_EXPORT:RB_TEXT"; + Hide = TRUE; + Size = MAP_APPFONT ( 105 , 10 ) ; + Text [ en-US ] = "Text" ; + }; + FixedLine FL_EPS_PREVIEW + { + Hide = TRUE; + Size = MAP_APPFONT ( 110 , 8 ) ; + Text [ en-US ] = "Preview" ; + }; + CheckBox CB_EPS_PREVIEW_TIFF + { + HelpID = "svtools:CheckBox:DLG_EXPORT:CB_EPS_PREVIEW_TIFF"; + Hide = TRUE; + Size = MAP_APPFONT ( 60 , 10 ) ; + Text [ en-US ] = "Image Preview (TIFF)" ; + }; + CheckBox CB_EPS_PREVIEW_EPSI + { + HelpID = "svtools:CheckBox:DLG_EXPORT:CB_EPS_PREVIEW_EPSI"; + Hide = TRUE; + Size = MAP_APPFONT ( 60 , 10 ) ; + Text [ en-US ] = "Interchange (EPSI)" ; + }; + FixedLine FL_EPS_VERSION + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + Text [ en-US ] = "Version" ; + }; + RadioButton RB_EPS_LEVEL1 + { + HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_LEVEL1"; + Hide = TRUE; + Size = MAP_APPFONT ( 105 , 10 ) ; + Text [ en-US ] = "Level 1" ; + }; + RadioButton RB_EPS_LEVEL2 + { + HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_LEVEL2"; + Hide = TRUE; + Size = MAP_APPFONT ( 105 , 10 ) ; + Text [ en-US ] = "Level 2" ; + }; + FixedLine FL_EPS_COLOR_FORMAT + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + Text [ en-US ] = "Color format" ; + }; + RadioButton RB_EPS_COLOR_FORMAT1 + { + HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_COLOR_FORMAT1"; + Hide = TRUE; + Size = MAP_APPFONT ( 105 , 10 ) ; + Text [ en-US ] = "Color" ; + }; + RadioButton RB_EPS_COLOR_FORMAT2 + { + HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_COLOR_FORMAT2"; + Hide = TRUE; + Size = MAP_APPFONT ( 105 , 10 ) ; + Text [ en-US ] = "Grayscale" ; + }; + RadioButton RB_EPS_COMPRESSION_LZW + { + HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_COMPRESSION_LZW"; + Hide = TRUE; + Size = MAP_APPFONT ( 105 , 10 ) ; + Text [ en-US ] = "LZW encoding" ; + }; + RadioButton RB_EPS_COMPRESSION_NONE + { + HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_COMPRESSION_NONE"; + Hide = TRUE; + Size = MAP_APPFONT ( 105 , 10 ) ; + Text [ en-US ] = "None" ; + }; + FixedLine FL_ESTIMATED_SIZE + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + }; + FixedText FT_ESTIMATED_SIZE + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + }; + String STR_ESTIMATED_SIZE_PIX_1 + { + Text [ en-US ] = "The picture needs about %1 KB of memory."; + }; + String STR_ESTIMATED_SIZE_PIX_2 + { + Text [ en-US ] = "The picture needs about %1 KB of memory,\n the file size is %2 KB."; + }; + String STR_ESTIMATED_SIZE_VEC + { + Text [ en-US ] = "The file size is %1 KB."; + }; + FixedLine FL_BUTTONS + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + }; + FixedBitmap FB_JPG_PREVIEW + { + Hide = TRUE; + OutputSize = TRUE ; + Scale = TRUE; + Border = TRUE; + }; + ScrollBar SB_ZOOM + { + Hide = TRUE; + Size = MAP_APPFONT ( 48, 10 ); + VScroll = FALSE; + HScroll = TRUE; + Drag = TRUE; + MinPos = 5; + MaxPos = 100; + ThumbPos = 50; + }; + NumericField NF_ZOOM + { + HelpID = "svtools:NumericField:DLG_EXPORT:NF_ZOOM"; + Hide = TRUE; + Border = TRUE ; + Size = MAP_APPFONT ( 30, 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = FALSE ; + Maximum = 3000; + Last = 255 ; + }; + ScrollBar SB_JPG_PREVIEW_HORZ + { + Hide = TRUE; + Size = MAP_APPFONT ( 48, 10 ); + VScroll = FALSE; + HScroll = TRUE; + Drag = TRUE; + MinPos = 0; + MaxPos = 100; + ThumbPos = 50; + }; + ScrollBar SB_JPG_PREVIEW_VERT + { + Hide = TRUE; + Size = MAP_APPFONT ( 48, 10 ); + VScroll = TRUE; + HScroll = FALSE; + Drag = TRUE; + MinPos = 0; + MaxPos = 100; + ThumbPos = 50; + }; + OKButton BTN_OK + { + Hide = TRUE; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + DefButton = TRUE ; + }; + CancelButton BTN_CANCEL + { + Hide = TRUE; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + HelpButton BTN_HELP + { + Hide = TRUE; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/svtools/source/filter/filter.cxx b/svtools/source/filter/filter.cxx new file mode 100644 index 000000000000..086f57061d7a --- /dev/null +++ b/svtools/source/filter/filter.cxx @@ -0,0 +1,2260 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#if defined UNX && defined ALPHA +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FilterConfigCache.hxx" +#include +#include +#include +#include "gifread.hxx" +#include "jpeg.hxx" +#include "xbmread.hxx" +#include "xpmread.hxx" +#include +#include +#include "sgffilt.hxx" +#include "osl/module.hxx" +#include +#include +#include +#include +#include +#ifndef _COM_SUN_STAR_UNO_XTYPEPROVIDER_HPP_ +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "SvFilterOptionsDialog.hxx" + +#define PMGCHUNG_msOG 0x6d734f47 // Microsoft Office Animated GIF + +#if (defined OS2 && !defined ICC) + +#define IMPORT_FUNCTION_NAME "_GraphicImport" +#define EXPORT_FUNCTION_NAME "_GraphicExport" +#define IMPDLG_FUNCTION_NAME "_DoImportDialog" +#define EXPDLG_FUNCTION_NAME "_DoExportDialog" + +#else + +#define IMPORT_FUNCTION_NAME "GraphicImport" +#define EXPORT_FUNCTION_NAME "GraphicExport" +#define IMPDLG_FUNCTION_NAME "DoImportDialog" +#define EXPDLG_FUNCTION_NAME "DoExportDialog" + +#endif + + +// ----------- +// - statics - +// ----------- + +using namespace ::rtl; +using namespace ::com::sun::star; + +static List* pFilterHdlList = NULL; + +static ::osl::Mutex& getListMutex() +{ + static ::osl::Mutex s_aListProtection; + return s_aListProtection; +} + +static GraphicFilter* pGraphicFilter=0; + +// ------------------------- +// - ImpFilterOutputStream - +// ------------------------- + +class ImpFilterOutputStream : public ::cppu::WeakImplHelper1< ::com::sun::star::io::XOutputStream > +{ +protected: + + SvStream& mrStm; + + virtual void SAL_CALL writeBytes( const ::com::sun::star::uno::Sequence< sal_Int8 >& rData ) throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) { mrStm.Write( rData.getConstArray(), rData.getLength() ); } + virtual void SAL_CALL flush() throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) { mrStm.Flush(); } + virtual void SAL_CALL closeOutput() throw() {} + +public: + + ImpFilterOutputStream( SvStream& rStm ) : mrStm( rStm ) {} + ~ImpFilterOutputStream() {} +}; + +BOOL ImplDirEntryHelper::Exists( const INetURLObject& rObj ) +{ + BOOL bExists = FALSE; + + try + { + ::rtl::OUString aTitle; + ::ucbhelper::Content aCnt( rObj.GetMainURL( INetURLObject::NO_DECODE ), + ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >() ); + + bExists = aCnt.isDocument(); + } + catch( ::com::sun::star::ucb::CommandAbortedException& ) + { + DBG_ERRORFILE( "CommandAbortedException" ); + } + catch( ::com::sun::star::ucb::ContentCreationException& ) + { + DBG_ERRORFILE( "ContentCreationException" ); + } + catch( ... ) + { +// DBG_ERRORFILE( "Any other exception" ); + } + return bExists; +} + +// ----------------------------------------------------------------------------- + +void ImplDirEntryHelper::Kill( const String& rMainUrl ) +{ + try + { + ::ucbhelper::Content aCnt( rMainUrl, + ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >() ); + + aCnt.executeCommand( ::rtl::OUString::createFromAscii( "delete" ), + ::com::sun::star::uno::makeAny( sal_Bool( sal_True ) ) ); + } + catch( ::com::sun::star::ucb::CommandAbortedException& ) + { + DBG_ERRORFILE( "CommandAbortedException" ); + } + catch( ... ) + { + DBG_ERRORFILE( "Any other exception" ); + } +} + +// -------------------- +// - Helper functions - +// -------------------- + +//-------------------------------------------------------------------------- + +BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG nSize ) +{ + while ( nComp-- >= nSize ) + { + ULONG i; + for ( i = 0; i < nSize; i++ ) + { + if ( ( pSource[i]&~0x20 ) != ( pDest[i]&~0x20 ) ) + break; + } + if ( i == nSize ) + return pSource; + pSource++; + } + return NULL; +} + +//-------------------------------------------------------------------------- + +inline String ImpGetExtension( const String &rPath ) +{ + String aExt; + INetURLObject aURL( rPath ); + aExt = aURL.GetFileExtension().toAsciiUpperCase(); + return aExt; +} + +/************************************************************************* +|* +|* ImpPeekGraphicFormat() +|* +|* Beschreibung: +|* Diese Funktion kann zweierlei: +|* 1.) Datei anlesen, Dateiformat ermitteln +|* Eingabe-prarameter: +|* rPath - Dateipfad +|* rFormatExtension - Inhalt egal +|* bTest - setze FALSE +|* Ausgabe-parameter: +|* Funkionswert - TRUE wenn Erfolg +|* rFormatExtension - Bei Erfolg: uebliche Dateiendung +|* des Formats (Grossbuchstaben) +|* 2.) Datei anlesen, Dateiformat ueberpruefen +|* Eingabe-prarameter: +|* rPath - Dateipfad +|* rFormatExtension - uebliche Dateiendung des Formats +|* (Grossbuchstaben) +|* bTest - setze TRUE +|* Ausgabe-parameter: +|* Funkionswert - FALSE, wenn die Datei bestimmt nicht +|* vom uebgebenen Format ist. +|* TRUE, wenn die Datei WAHRSCHEINLICH von +|* dem Format ist, ODER WENN DAS FORMAT +|* DIESER FUNKTION NICHT BEKANNT IST! +|* +|* Ersterstellung OH 26.05.95 +|* Letzte Aenderung OH 07.08.95 +|* +*************************************************************************/ + +static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, BOOL bTest ) +{ + USHORT i; + BYTE sFirstBytes[ 256 ]; + ULONG nFirstLong,nSecondLong; + ULONG nStreamPos = rStream.Tell(); + + rStream.Seek( STREAM_SEEK_TO_END ); + ULONG nStreamLen = rStream.Tell() - nStreamPos; + rStream.Seek( nStreamPos ); + + if ( !nStreamLen ) + { + SvLockBytes* pLockBytes = rStream.GetLockBytes(); + if ( pLockBytes ) + pLockBytes->SetSynchronMode( TRUE ); + + rStream.Seek( STREAM_SEEK_TO_END ); + nStreamLen = rStream.Tell() - nStreamPos; + rStream.Seek( nStreamPos ); + } + // Die ersten 256 Bytes in einen Buffer laden: + if( nStreamLen >= 256 ) + rStream.Read( sFirstBytes, 256 ); + else + { + rStream.Read( sFirstBytes, nStreamLen ); + + for( i = (USHORT) nStreamLen; i < 256; i++ ) + sFirstBytes[ i ]=0; + } + + if( rStream.GetError() ) + return FALSE; + + // Die ersten 8 Bytes in nFirstLong, nSecondLong unterbringen, + // Big-Endian: + for( i = 0, nFirstLong = 0L, nSecondLong = 0L; i < 4; i++ ) + { + nFirstLong=(nFirstLong<<8)|(ULONG)sFirstBytes[i]; + nSecondLong=(nSecondLong<<8)|(ULONG)sFirstBytes[i+4]; + } + + // Folgende Variable ist nur bei bTest==TRUE interessant. Sie + // bleibt FALSE, wenn das Format (rFormatExtension) hier noch nicht + // einprogrammiert wurde. + BOOL bSomethingTested = FALSE; + + // Nun werden die verschieden Formate ueberprueft. Dabei ist die + // Reihenfolge nicht egal. Z.b. koennte eine MET-Datei auch durch + // den BMP-Test gehen, umgekehrt kann eine BMP-Datei kaum durch den + // MET-Test gehen. Also sollte MET vor BMP getestet werden. + // Theoretisch waere aber vielleicht auch eine BMP-Datei denkbar, + // die durch den MET-Test geht. + // Diese Probleme gibt es natuerlich nicht nur bei MET und BMP. + // Deshalb wird im Falle der Uberpruefung eines Formats (bTest==TRUE) + // nur genau dieses eine Format getestet. Alles andere koennte fatale + // Folgen haben, z.B. wenn der Benutzer sagt, es sei BMP-Datei (und es + // ist BMP-Datei), und hier wuerde die Datei durch den MET-Test gehen... + + //--------------------------- MET ------------------------------------ + if( !bTest || ( rFormatExtension.CompareToAscii( "MET", 3 ) == COMPARE_EQUAL ) ) + { + bSomethingTested=TRUE; + if( sFirstBytes[2] == 0xd3 ) + { + rStream.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + rStream.Seek( nStreamPos ); + USHORT nFieldSize; + BYTE nMagic; + BOOL bOK=TRUE; + rStream >> nFieldSize >> nMagic; + for (i=0; i<3; i++) { + if (nFieldSize<6) { bOK=FALSE; break; } + if (nStreamLen < rStream.Tell() + nFieldSize ) { bOK=FALSE; break; } + rStream.SeekRel(nFieldSize-3); + rStream >> nFieldSize >> nMagic; + if (nMagic!=0xd3) { bOK=FALSE; break; } + } + rStream.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + if (bOK && !rStream.GetError()) { + rFormatExtension= UniString::CreateFromAscii( "MET", 3 ); + return TRUE; + } + } + } + + //--------------------------- BMP ------------------------------------ + if( !bTest || ( rFormatExtension.CompareToAscii( "BMP", 3 ) == COMPARE_EQUAL ) ) + { + BYTE nOffs; + + bSomethingTested=TRUE; + + // OS/2-Bitmaparray ('BA') koennen wir evtl. auch lesen, + // dementspr. muessen wir den Offset anpassen, + // um auf die erste Bitmap im Array zu stossen + if ( sFirstBytes[0] == 0x42 && sFirstBytes[1] == 0x41 ) + nOffs = 14; + else + nOffs = 0; + + // Jetzt testen wir zunaechst auf 'BM' + if ( sFirstBytes[0+nOffs]==0x42 && sFirstBytes[1+nOffs]==0x4d ) + { + // unter OS/2 koennen die Reserved-Flags != 0 sein + // (was sie eigentlich nicht duerften); + // in diesem Fall testen wir die Groesse des BmpInfoHeaders + if ( ( sFirstBytes[6+nOffs]==0x00 && + sFirstBytes[7+nOffs]==0x00 && + sFirstBytes[8+nOffs]==0x00 && + sFirstBytes[9+nOffs]==0x00 ) || + sFirstBytes[14+nOffs] == 0x28 || + sFirstBytes[14+nOffs] == 0x0c ) + { + rFormatExtension = UniString::CreateFromAscii( "BMP", 3 ); + return TRUE; + } + } + } + + //--------------------------- WMF/EMF ------------------------------------ + + if( !bTest || + ( rFormatExtension.CompareToAscii( "WMF", 3 ) == COMPARE_EQUAL ) || + ( rFormatExtension.CompareToAscii( "EMF", 3 ) == COMPARE_EQUAL ) ) + { + bSomethingTested = TRUE; + + if ( nFirstLong==0xd7cdc69a || nFirstLong==0x01000900 ) + { + rFormatExtension = UniString::CreateFromAscii( "WMF", 3 ); + return TRUE; + } + else if( nFirstLong == 0x01000000 && sFirstBytes[ 40 ] == 0x20 && sFirstBytes[ 41 ] == 0x45 && + sFirstBytes[ 42 ] == 0x4d && sFirstBytes[ 43 ] == 0x46 ) + { + rFormatExtension = UniString::CreateFromAscii( "EMF", 3 ); + return TRUE; + } + } + + //--------------------------- PCX ------------------------------------ + if( !bTest || ( rFormatExtension.CompareToAscii( "PCX", 3 ) == COMPARE_EQUAL ) ) + { + bSomethingTested=TRUE; + if (sFirstBytes[0]==0x0a) + { + BYTE nVersion=sFirstBytes[1]; + BYTE nEncoding=sFirstBytes[2]; + if( ( nVersion==0 || nVersion==2 || nVersion==3 || nVersion==5 ) && nEncoding<=1 ) + { + rFormatExtension = UniString::CreateFromAscii( "PCX", 3 ); + return TRUE; + } + } + } + + //--------------------------- TIF ------------------------------------ + if( !bTest || ( rFormatExtension.CompareToAscii( "TIF", 3 ) == COMPARE_EQUAL ) ) + { + bSomethingTested=TRUE; + if ( nFirstLong==0x49492a00 || nFirstLong==0x4d4d002a ) + { + rFormatExtension=UniString::CreateFromAscii( "TIF", 3 ); + return TRUE; + } + } + + //--------------------------- GIF ------------------------------------ + if( !bTest || ( rFormatExtension.CompareToAscii( "GIF", 3 ) == COMPARE_EQUAL ) ) + { + bSomethingTested=TRUE; + if ( nFirstLong==0x47494638 && (sFirstBytes[4]==0x37 || sFirstBytes[4]==0x39) && sFirstBytes[5]==0x61 ) + { + rFormatExtension = UniString::CreateFromAscii( "GIF", 3 ); + return TRUE; + } + } + + //--------------------------- PNG ------------------------------------ + if( !bTest || ( rFormatExtension.CompareToAscii( "PNG", 3 ) == COMPARE_EQUAL ) ) + { + bSomethingTested=TRUE; + if (nFirstLong==0x89504e47 && nSecondLong==0x0d0a1a0a) + { + rFormatExtension = UniString::CreateFromAscii( "PNG", 3 ); + return TRUE; + } + } + + //--------------------------- JPG ------------------------------------ + if( !bTest || ( rFormatExtension.CompareToAscii( "JPG", 3 ) == COMPARE_EQUAL ) ) + { + bSomethingTested=TRUE; + if ( ( nFirstLong==0xffd8ffe0 && sFirstBytes[6]==0x4a && sFirstBytes[7]==0x46 && sFirstBytes[8]==0x49 && sFirstBytes[9]==0x46 ) || + ( nFirstLong==0xffd8fffe ) || ( 0xffd8ff00 == ( nFirstLong & 0xffffff00 ) ) ) + { + rFormatExtension = UniString::CreateFromAscii( "JPG", 3 ); + return TRUE; + } + } + + //--------------------------- SVM ------------------------------------ + if( !bTest || ( rFormatExtension.CompareToAscii( "SVM", 3 ) == COMPARE_EQUAL ) ) + { + bSomethingTested=TRUE; + if( nFirstLong==0x53564744 && sFirstBytes[4]==0x49 ) + { + rFormatExtension = UniString::CreateFromAscii( "SVM", 3 ); + return TRUE; + } + else if( sFirstBytes[0]==0x56 && sFirstBytes[1]==0x43 && sFirstBytes[2]==0x4C && + sFirstBytes[3]==0x4D && sFirstBytes[4]==0x54 && sFirstBytes[5]==0x46 ) + { + rFormatExtension = UniString::CreateFromAscii( "SVM", 3 ); + return TRUE; + } + } + + //--------------------------- PCD ------------------------------------ + if( !bTest || ( rFormatExtension.CompareToAscii( "PCD", 3 ) == COMPARE_EQUAL ) ) + { + bSomethingTested = TRUE; + if( nStreamLen >= 2055 ) + { + char sBuf[8]; + rStream.Seek( nStreamPos + 2048 ); + rStream.Read( sBuf, 7 ); + + if( strncmp( sBuf, "PCD_IPI", 7 ) == 0 ) + { + rFormatExtension = UniString::CreateFromAscii( "PCD", 3 ); + return TRUE; + } + } + } + + //--------------------------- PSD ------------------------------------ + if( !bTest || ( rFormatExtension.CompareToAscii( "PSD", 3 ) == COMPARE_EQUAL ) ) + { + bSomethingTested = TRUE; + if ( ( nFirstLong == 0x38425053 ) && ( (nSecondLong >> 16 ) == 1 ) ) + { + rFormatExtension = UniString::CreateFromAscii( "PSD", 3 ); + return TRUE; + } + } + + //--------------------------- EPS ------------------------------------ + if( !bTest || ( rFormatExtension.CompareToAscii( "EPS", 3 ) == COMPARE_EQUAL ) ) + { + bSomethingTested = TRUE; + if ( ( nFirstLong == 0xC5D0D3C6 ) || ( ImplSearchEntry( sFirstBytes, (BYTE*)"%!PS-Adobe", 10, 10 ) && + ImplSearchEntry( &sFirstBytes[15], (BYTE*)"EPS", 3, 3 ) ) ) + { + rFormatExtension = UniString::CreateFromAscii( "EPS", 3 ); + return TRUE; + } + } + + //--------------------------- DXF ------------------------------------ + if( !bTest || ( rFormatExtension.CompareToAscii( "DXF", 3 ) == COMPARE_EQUAL ) ) + { + bSomethingTested=TRUE; + + i=0; + while (i<256 && sFirstBytes[i]<=32) + i++; + + if (i<256) + { + if( sFirstBytes[i]=='0' ) + i++; + else + i=256; + } + while( i<256 && sFirstBytes[i]<=32 ) + i++; + + if (i+7<256) + { + if (strncmp((char*)(sFirstBytes+i),"SECTION",7)==0) + { + rFormatExtension = UniString::CreateFromAscii( "DXF", 3 ); + return TRUE; + } + } + + if( strncmp( (char*) sFirstBytes, "AutoCAD Binary DXF", 18 ) == 0 ) + { + rFormatExtension = UniString::CreateFromAscii( "DXF", 3 ); + return TRUE; + } + } + + //--------------------------- PCT ------------------------------------ + if( !bTest || ( rFormatExtension.CompareToAscii( "PCT", 3 ) == COMPARE_EQUAL ) ) + { + bSomethingTested = TRUE; + BYTE sBuf[3]; + // store number format + sal_uInt16 oldNumberFormat = rStream.GetNumberFormatInt(); + sal_uInt32 nOffset; // in ms documents the pict format is used without the first 512 bytes + for ( nOffset = 0; ( nOffset <= 512 ) && ( ( nStreamPos + nOffset + 14 ) <= nStreamLen ); nOffset += 512 ) + { + short y1,x1,y2,x2; + bool bdBoxOk = true; + + rStream.Seek( nStreamPos + nOffset); + // size of the pict in version 1 pict ( 2bytes) : ignored + rStream.SeekRel(2); + // bounding box (bytes 2 -> 9) + rStream.SetNumberFormatInt(NUMBERFORMAT_INT_BIGENDIAN); + rStream >> y1 >> x1 >> y2 >> x2; + rStream.SetNumberFormatInt(oldNumberFormat); // reset format + + if (x1 > x2 || y1 > y2 || // bad bdbox + (x1 == x2 && y1 == y2) || // 1 pixel picture + x2-x1 > 2048 || y2-y1 > 2048 ) // picture anormaly big + bdBoxOk = false; + + // read version op + rStream.Read( sBuf,3 ); + // see http://developer.apple.com/legacy/mac/library/documentation/mac/pdf/Imaging_With_QuickDraw/Appendix_A.pdf + // normal version 2 - page A23 and A24 + if ( sBuf[ 0 ] == 0x00 && sBuf[ 1 ] == 0x11 && sBuf[ 2 ] == 0x02) + { + rFormatExtension = UniString::CreateFromAscii( "PCT", 3 ); + return TRUE; + } + // normal version 1 - page A25 + else if (sBuf[ 0 ] == 0x11 && sBuf[ 1 ] == 0x01 && bdBoxOk) { + rFormatExtension = UniString::CreateFromAscii( "PCT", 3 ); + return TRUE; + } + // previous code kept in order to do not break any compatibility + // probably eroneous + else if ( sBuf[ 0 ] == 0x00 && sBuf[ 1 ] == 0x11 && sBuf[ 2 ] == 0x01 && bdBoxOk) + { + rFormatExtension = UniString::CreateFromAscii( "PCT", 3 ); + return TRUE; + } + } + } + + //------------------------- PBM + PGM + PPM --------------------------- + if( !bTest || + ( rFormatExtension.CompareToAscii( "PBM", 3 ) == COMPARE_EQUAL ) || + ( rFormatExtension.CompareToAscii( "PGM", 3 ) == COMPARE_EQUAL ) || + ( rFormatExtension.CompareToAscii( "PPM", 3 ) == COMPARE_EQUAL ) ) + { + bSomethingTested=TRUE; + if ( sFirstBytes[ 0 ] == 'P' ) + { + switch( sFirstBytes[ 1 ] ) + { + case '1' : + case '4' : + rFormatExtension = UniString::CreateFromAscii( "PBM", 3 ); + return TRUE; + + case '2' : + case '5' : + rFormatExtension = UniString::CreateFromAscii( "PGM", 3 ); + return TRUE; + + case '3' : + case '6' : + rFormatExtension = UniString::CreateFromAscii( "PPM", 3 ); + return TRUE; + } + } + } + + //--------------------------- RAS( SUN RasterFile )------------------ + if( !bTest || ( rFormatExtension.CompareToAscii( "RAS", 3 ) == COMPARE_EQUAL ) ) + { + bSomethingTested=TRUE; + if( nFirstLong == 0x59a66a95 ) + { + rFormatExtension = UniString::CreateFromAscii( "RAS", 3 ); + return TRUE; + } + } + + //--------------------------- XPM ------------------------------------ + if( !bTest ) + { + bSomethingTested = TRUE; + if( ImplSearchEntry( sFirstBytes, (BYTE*)"/* XPM */", 256, 9 ) ) + { + rFormatExtension = UniString::CreateFromAscii( "XPM", 3 ); + return TRUE; + } + } + else if( rFormatExtension.CompareToAscii( "XPM", 3 ) == COMPARE_EQUAL ) + { + bSomethingTested = TRUE; + return TRUE; + } + + //--------------------------- XBM ------------------------------------ + if( !bTest ) + { + ULONG nSize = ( nStreamLen > 2048 ) ? 2048 : nStreamLen; + BYTE* pBuf = new BYTE [ nSize ]; + + rStream.Seek( nStreamPos ); + rStream.Read( pBuf, nSize ); + BYTE* pPtr = ImplSearchEntry( pBuf, (BYTE*)"#define", nSize, 7 ); + + if( pPtr ) + { + if( ImplSearchEntry( pPtr, (BYTE*)"_width", pBuf + nSize - pPtr, 6 ) ) + { + rFormatExtension = UniString::CreateFromAscii( "XBM", 3 ); + delete[] pBuf; + return TRUE; + } + } + delete[] pBuf; + } + else if( rFormatExtension.CompareToAscii( "XBM", 3 ) == COMPARE_EQUAL ) + { + bSomethingTested = TRUE; + return TRUE; + } + + //--------------------------- SVG ------------------------------------ + if( !bTest || ( rFormatExtension.CompareToAscii( "SVG", 3 ) == COMPARE_EQUAL ) ) + { + bSomethingTested=TRUE; + + // just a simple test for the extension + if( rFormatExtension.CompareToAscii( "SVG", 3 ) == COMPARE_EQUAL ) + return TRUE; + } + + //--------------------------- TGA ------------------------------------ + if( !bTest || ( rFormatExtension.CompareToAscii( "TGA", 3 ) == COMPARE_EQUAL ) ) + { + bSomethingTested = TRUE; + + // just a simple test for the extension + if( rFormatExtension.CompareToAscii( "TGA", 3 ) == COMPARE_EQUAL ) + return TRUE; + } + + //--------------------------- SGV ------------------------------------ + if( !bTest || ( rFormatExtension.CompareToAscii( "SGV", 3 ) == COMPARE_EQUAL ) ) + { + bSomethingTested = TRUE; + + // just a simple test for the extension + if( rFormatExtension.CompareToAscii( "SGV", 3 ) == COMPARE_EQUAL ) + return TRUE; + } + + //--------------------------- SGF ------------------------------------ + if( !bTest || ( rFormatExtension.CompareToAscii( "SGF", 3 ) == COMPARE_EQUAL ) ) + { + bSomethingTested=TRUE; + if( sFirstBytes[ 0 ] == 'J' && sFirstBytes[ 1 ] == 'J' ) + { + rFormatExtension = UniString::CreateFromAscii( "SGF", 3 ); + return TRUE; + } + } + + return bTest && !bSomethingTested; +} + +//-------------------------------------------------------------------------- + +sal_uInt16 GraphicFilter::ImpTestOrFindFormat( const String& rPath, SvStream& rStream, sal_uInt16& rFormat ) +{ + sal_uInt16 n = pConfig->GetImportFormatCount(); + + // ggf. Filter bzw. Format durch anlesen ermitteln, + // oder durch anlesen zusichern, dass das Format stimmt: + if( rFormat == GRFILTER_FORMAT_DONTKNOW ) + { + String aFormatExt; + if( ImpPeekGraphicFormat( rStream, aFormatExt, FALSE ) ) + { + for( sal_uInt16 i = 0; i < n; i++ ) + { + if( pConfig->GetImportFormatExtension( i ).EqualsIgnoreCaseAscii( aFormatExt ) ) + { + rFormat = i; + return GRFILTER_OK; + } + } + } + // ggf. Filter anhand der Datei-Endung raussuchen: + if( rPath.Len() ) + { + String aExt( ImpGetExtension( rPath ) ); + for( sal_uInt16 i = 0; i < n; i++ ) + { + if( pConfig->GetImportFormatExtension( i ).EqualsIgnoreCaseAscii( aExt ) ) + { + rFormat = i; + return GRFILTER_OK; + } + } + } + return GRFILTER_FORMATERROR; + } + else + { + String aTmpStr( pConfig->GetImportFormatExtension( rFormat ) ); + if( !ImpPeekGraphicFormat( rStream, aTmpStr, TRUE ) ) + return GRFILTER_FORMATERROR; + if ( pConfig->GetImportFormatExtension( rFormat ).EqualsIgnoreCaseAscii( "pcd" ) ) + { + sal_Int32 nBase = 2; // default Base0 + if ( pConfig->GetImportFilterType( rFormat ).EqualsIgnoreCaseAscii( "pcd_Photo_CD_Base4" ) ) + nBase = 1; + else if ( pConfig->GetImportFilterType( rFormat ).EqualsIgnoreCaseAscii( "pcd_Photo_CD_Base16" ) ) + nBase = 0; + String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Import/PCD" ) ); + FilterConfigItem aFilterConfigItem( aFilterConfigPath ); + aFilterConfigItem.WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Resolution" ) ), nBase ); + } + } + + return GRFILTER_OK; +} + +//-------------------------------------------------------------------------- + +static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& rConfigItem ) +{ + Graphic aGraphic; + ByteString aResMgrName( "svt", 3 ); + ResMgr* pResMgr; + + pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); + + sal_Int32 nLogicalWidth = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "LogicalWidth" ) ), 0 ); + sal_Int32 nLogicalHeight = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "LogicalHeight" ) ), 0 ); + + if ( rGraphic.GetType() != GRAPHIC_NONE ) + { + sal_Int32 nMode = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ExportMode" ) ), -1 ); + + if ( nMode == -1 ) // the property is not there, this is possible, if the graphic filter + { // is called via UnoGraphicExporter and not from a graphic export Dialog + nMode = 0; // then we are defaulting this mode to 0 + if ( nLogicalWidth || nLogicalHeight ) + nMode = 2; + } + + + Size aOriginalSize; + Size aPrefSize( rGraphic.GetPrefSize() ); + MapMode aPrefMapMode( rGraphic.GetPrefMapMode() ); + if ( aPrefMapMode == MAP_PIXEL ) + aOriginalSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MAP_100TH_MM ); + else + aOriginalSize = Application::GetDefaultDevice()->LogicToLogic( aPrefSize, aPrefMapMode, MAP_100TH_MM ); + if ( !nLogicalWidth ) + nLogicalWidth = aOriginalSize.Width(); + if ( !nLogicalHeight ) + nLogicalHeight = aOriginalSize.Height(); + if( rGraphic.GetType() == GRAPHIC_BITMAP ) + { + + // Aufloesung wird eingestellt + if( nMode == 1 ) + { + Bitmap aBitmap( rGraphic.GetBitmap() ); + MapMode aMap( MAP_100TH_INCH ); + + sal_Int32 nDPI = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Resolution" ) ), 75 ); + Fraction aFrac( 1, Min( Max( nDPI, sal_Int32( 75 ) ), sal_Int32( 600 ) ) ); + + aMap.SetScaleX( aFrac ); + aMap.SetScaleY( aFrac ); + + Size aOldSize = aBitmap.GetSizePixel(); + aBitmap.SetPrefMapMode( aMap ); + aBitmap.SetPrefSize( Size( aOldSize.Width() * 100, + aOldSize.Height() * 100 ) ); + + aGraphic = Graphic( aBitmap ); + } + // Groesse wird eingestellt + else if( nMode == 2 ) + { + BitmapEx aBitmapEx( rGraphic.GetBitmapEx() ); + aBitmapEx.SetPrefMapMode( MapMode( MAP_100TH_MM ) ); + aBitmapEx.SetPrefSize( Size( nLogicalWidth, nLogicalHeight ) ); + aGraphic = Graphic( aBitmapEx ); + } + else + aGraphic = rGraphic; + + sal_Int32 nColors = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Color" ) ), 0 ); // #92767# + if ( nColors ) // graphic conversion necessary ? + { + BitmapEx aBmpEx( aGraphic.GetBitmapEx() ); + aBmpEx.Convert( (BmpConversion)nColors ); // the entries in the xml section have the same meaning as + aGraphic = aBmpEx; // they have in the BmpConversion enum, so it should be + } // allowed to cast them + } + else + { + if( ( nMode == 1 ) || ( nMode == 2 ) ) + { + GDIMetaFile aMtf( rGraphic.GetGDIMetaFile() ); + ::com::sun::star::awt::Size aDefaultSize( 10000, 10000 ); + Size aNewSize( OutputDevice::LogicToLogic( Size( nLogicalWidth, nLogicalHeight ), MAP_100TH_MM, aMtf.GetPrefMapMode() ) ); + + if( aNewSize.Width() && aNewSize.Height() ) + { + const Size aPreferredSize( aMtf.GetPrefSize() ); + aMtf.Scale( Fraction( aNewSize.Width(), aPreferredSize.Width() ), + Fraction( aNewSize.Height(), aPreferredSize.Height() ) ); + } + aGraphic = Graphic( aMtf ); + } + else + aGraphic = rGraphic; + } + + } + else + aGraphic = rGraphic; + + delete pResMgr; + + return aGraphic; +} + +static String ImpCreateFullFilterPath( const String& rPath, const String& rFilterName ) +{ + ::rtl::OUString aPathURL; + + ::osl::FileBase::getFileURLFromSystemPath( rPath, aPathURL ); + aPathURL += String( '/' ); + + ::rtl::OUString aSystemPath; + ::osl::FileBase::getSystemPathFromFileURL( aPathURL, aSystemPath ); + aSystemPath += ::rtl::OUString( rFilterName ); + + return String( aSystemPath ); +} + + +// -------------------------- +// - ImpFilterLibCacheEntry - +// -------------------------- + +class ImpFilterLibCache; + +struct ImpFilterLibCacheEntry +{ + ImpFilterLibCacheEntry* mpNext; + osl::Module maLibrary; + String maFiltername; + PFilterCall mpfnImport; + PFilterDlgCall mpfnImportDlg; + + ImpFilterLibCacheEntry( const String& rPathname, const String& rFiltername ); + int operator==( const String& rFiltername ) const { return maFiltername == rFiltername; } + + PFilterCall GetImportFunction(); + PFilterDlgCall GetImportDlgFunction(); + PFilterCall GetExportFunction() { return (PFilterCall) maLibrary.getFunctionSymbol( UniString::CreateFromAscii( EXPORT_FUNCTION_NAME ) ); } + PFilterDlgCall GetExportDlgFunction() { return (PFilterDlgCall) maLibrary.getFunctionSymbol( UniString::CreateFromAscii( EXPDLG_FUNCTION_NAME ) ); } +}; + +// ------------------------------------------------------------------------ + +ImpFilterLibCacheEntry::ImpFilterLibCacheEntry( const String& rPathname, const String& rFiltername ) : + mpNext ( NULL ), + maLibrary ( rPathname ), + maFiltername ( rFiltername ), + mpfnImport ( NULL ), + mpfnImportDlg ( NULL ) +{ +} + +// ------------------------------------------------------------------------ + +PFilterCall ImpFilterLibCacheEntry::GetImportFunction() +{ + if( !mpfnImport ) + mpfnImport = (PFilterCall) maLibrary.getFunctionSymbol( UniString::CreateFromAscii( IMPORT_FUNCTION_NAME ) ); + + return mpfnImport; +} + +// ------------------------------------------------------------------------ + +PFilterDlgCall ImpFilterLibCacheEntry::GetImportDlgFunction() +{ + if( !mpfnImportDlg ) + mpfnImportDlg = (PFilterDlgCall)maLibrary.getFunctionSymbol( UniString::CreateFromAscii( IMPDLG_FUNCTION_NAME ) ); + + return mpfnImportDlg; +} + +// --------------------- +// - ImpFilterLibCache - +// --------------------- + +class ImpFilterLibCache +{ + ImpFilterLibCacheEntry* mpFirst; + ImpFilterLibCacheEntry* mpLast; + +public: + ImpFilterLibCache(); + ~ImpFilterLibCache(); + + ImpFilterLibCacheEntry* GetFilter( const String& rFilterPath, const String& rFiltername ); +}; + +// ------------------------------------------------------------------------ + +ImpFilterLibCache::ImpFilterLibCache() : + mpFirst ( NULL ), + mpLast ( NULL ) +{ +} + +// ------------------------------------------------------------------------ + +ImpFilterLibCache::~ImpFilterLibCache() +{ + ImpFilterLibCacheEntry* pEntry = mpFirst; + while( pEntry ) + { + ImpFilterLibCacheEntry* pNext = pEntry->mpNext; + delete pEntry; + pEntry = pNext; + } +} + +// ------------------------------------------------------------------------ + +ImpFilterLibCacheEntry* ImpFilterLibCache::GetFilter( const String& rFilterPath, const String& rFilterName ) +{ + ImpFilterLibCacheEntry* pEntry = mpFirst; + + while( pEntry ) + { + if( *pEntry == rFilterName ) + break; + else + pEntry = pEntry->mpNext; + } + if( !pEntry ) + { + String aPhysicalName( ImpCreateFullFilterPath( rFilterPath, rFilterName ) ); + pEntry = new ImpFilterLibCacheEntry( aPhysicalName, rFilterName ); + + if ( pEntry->maLibrary.is() ) + { + if( !mpFirst ) + mpFirst = mpLast = pEntry; + else + mpLast = mpLast->mpNext = pEntry; + } + else + { + delete pEntry; + pEntry = NULL; + } + } + return pEntry; +}; + +// ------------------------------------------------------------------------ + +namespace { struct Cache : public rtl::Static {}; } + +// ----------------- +// - GraphicFilter - +// ----------------- + +GraphicFilter::GraphicFilter( sal_Bool bConfig ) : + bUseConfig ( bConfig ), + nExpGraphHint ( 0 ) +{ + ImplInit(); +} + +// ------------------------------------------------------------------------ + +GraphicFilter::~GraphicFilter() +{ + { + ::osl::MutexGuard aGuard( getListMutex() ); + pFilterHdlList->Remove( (void*)this ); + if ( !pFilterHdlList->Count() ) + { + delete pFilterHdlList, pFilterHdlList = NULL; + delete pConfig; + } + } + + + delete pErrorEx; +} + +// ------------------------------------------------------------------------ + +void GraphicFilter::ImplInit() +{ + { + ::osl::MutexGuard aGuard( getListMutex() ); + + if ( !pFilterHdlList ) + { + pFilterHdlList = new List; + pConfig = new FilterConfigCache( bUseConfig ); + } + else + pConfig = ((GraphicFilter*)pFilterHdlList->First())->pConfig; + + pFilterHdlList->Insert( (void*)this ); + } + + if( bUseConfig ) + { +#if defined WNT + rtl::OUString url(RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR/program")); +#else + rtl::OUString url(RTL_CONSTASCII_USTRINGPARAM("$OOO_BASE_DIR/program")); +#endif + rtl::Bootstrap::expandMacros(url); //TODO: detect failure + utl::LocalFileHelper::ConvertURLToPhysicalName(url, aFilterPath); + } + + pErrorEx = new FilterErrorEx; + bAbort = sal_False; +} + +// ------------------------------------------------------------------------ + +ULONG GraphicFilter::ImplSetError( ULONG nError, const SvStream* pStm ) +{ + pErrorEx->nFilterError = nError; + pErrorEx->nStreamError = pStm ? pStm->GetError() : ERRCODE_NONE; + return nError; +} +// ------------------------------------------------------------------------ + +USHORT GraphicFilter::GetImportFormatCount() +{ + return pConfig->GetImportFormatCount(); +} + +// ------------------------------------------------------------------------ + +USHORT GraphicFilter::GetImportFormatNumber( const String& rFormatName ) +{ + return pConfig->GetImportFormatNumber( rFormatName ); +} + +// ------------------------------------------------------------------------ + +USHORT GraphicFilter::GetImportFormatNumberForMediaType( const String& rMediaType ) +{ + return pConfig->GetImportFormatNumberForMediaType( rMediaType ); +} + +// ------------------------------------------------------------------------ + +USHORT GraphicFilter::GetImportFormatNumberForShortName( const String& rShortName ) +{ + return pConfig->GetImportFormatNumberForShortName( rShortName ); +} + +// ------------------------------------------------------------------------ + +sal_uInt16 GraphicFilter::GetImportFormatNumberForTypeName( const String& rType ) +{ + return pConfig->GetImportFormatNumberForTypeName( rType ); +} + +// ------------------------------------------------------------------------ + +String GraphicFilter::GetImportFormatName( USHORT nFormat ) +{ + return pConfig->GetImportFormatName( nFormat ); +} + +// ------------------------------------------------------------------------ + +String GraphicFilter::GetImportFormatTypeName( USHORT nFormat ) +{ + return pConfig->GetImportFilterTypeName( nFormat ); +} + +// ------------------------------------------------------------------------ + +String GraphicFilter::GetImportFormatMediaType( USHORT nFormat ) +{ + return pConfig->GetImportFormatMediaType( nFormat ); +} + +// ------------------------------------------------------------------------ + +String GraphicFilter::GetImportFormatShortName( USHORT nFormat ) +{ + return pConfig->GetImportFormatShortName( nFormat ); +} + +// ------------------------------------------------------------------------ + +String GraphicFilter::GetImportOSFileType( USHORT ) +{ + String aOSFileType; + return aOSFileType; +} + +// ------------------------------------------------------------------------ + +String GraphicFilter::GetImportWildcard( USHORT nFormat, sal_Int32 nEntry ) +{ + return pConfig->GetImportWildcard( nFormat, nEntry ); +} + +// ------------------------------------------------------------------------ + +BOOL GraphicFilter::IsImportPixelFormat( USHORT nFormat ) +{ + return pConfig->IsImportPixelFormat( nFormat ); +} + +// ------------------------------------------------------------------------ + +USHORT GraphicFilter::GetExportFormatCount() +{ + return pConfig->GetExportFormatCount(); +} + +// ------------------------------------------------------------------------ + +USHORT GraphicFilter::GetExportFormatNumber( const String& rFormatName ) +{ + return pConfig->GetExportFormatNumber( rFormatName ); +} + +// ------------------------------------------------------------------------ + +USHORT GraphicFilter::GetExportFormatNumberForMediaType( const String& rMediaType ) +{ + return pConfig->GetExportFormatNumberForMediaType( rMediaType ); +} + +// ------------------------------------------------------------------------ + +USHORT GraphicFilter::GetExportFormatNumberForShortName( const String& rShortName ) +{ + return pConfig->GetExportFormatNumberForShortName( rShortName ); +} + +// ------------------------------------------------------------------------ + +sal_uInt16 GraphicFilter::GetExportFormatNumberForTypeName( const String& rType ) +{ + return pConfig->GetExportFormatNumberForTypeName( rType ); +} + +// ------------------------------------------------------------------------ + +String GraphicFilter::GetExportFormatName( USHORT nFormat ) +{ + return pConfig->GetExportFormatName( nFormat ); +} + +// ------------------------------------------------------------------------ + +String GraphicFilter::GetExportFormatTypeName( USHORT nFormat ) +{ + return pConfig->GetExportFilterTypeName( nFormat ); +} + +// ------------------------------------------------------------------------ + +String GraphicFilter::GetExportFormatMediaType( USHORT nFormat ) +{ + return pConfig->GetExportFormatMediaType( nFormat ); +} + +// ------------------------------------------------------------------------ + +String GraphicFilter::GetExportFormatShortName( USHORT nFormat ) +{ + return pConfig->GetExportFormatShortName( nFormat ); +} + +// ------------------------------------------------------------------------ + +String GraphicFilter::GetExportOSFileType( USHORT ) +{ + String aOSFileType; + return aOSFileType; +} + +// ------------------------------------------------------------------------ + +String GraphicFilter::GetExportWildcard( USHORT nFormat, sal_Int32 nEntry ) +{ + return pConfig->GetExportWildcard( nFormat, nEntry ); +} + +// ------------------------------------------------------------------------ + +BOOL GraphicFilter::IsExportPixelFormat( USHORT nFormat ) +{ + return pConfig->IsExportPixelFormat( nFormat ); +} + +// ------------------------------------------------------------------------ + +USHORT GraphicFilter::CanImportGraphic( const INetURLObject& rPath, + USHORT nFormat, USHORT* pDeterminedFormat ) +{ + sal_uInt16 nRetValue = GRFILTER_FORMATERROR; + DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::CanImportGraphic() : ProtType == INET_PROT_NOT_VALID" ); + + String aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) ); + SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aMainUrl, STREAM_READ | STREAM_SHARE_DENYNONE ); + if ( pStream ) + { + nRetValue = CanImportGraphic( aMainUrl, *pStream, nFormat, pDeterminedFormat ); + delete pStream; + } + return nRetValue; +} + +// ------------------------------------------------------------------------ + +USHORT GraphicFilter::CanImportGraphic( const String& rMainUrl, SvStream& rIStream, + USHORT nFormat, USHORT* pDeterminedFormat ) +{ + ULONG nStreamPos = rIStream.Tell(); + sal_uInt16 nRes = ImpTestOrFindFormat( rMainUrl, rIStream, nFormat ); + + rIStream.Seek(nStreamPos); + + if( nRes==GRFILTER_OK && pDeterminedFormat!=NULL ) + *pDeterminedFormat = nFormat; + + return (USHORT) ImplSetError( nRes, &rIStream ); +} + +// ------------------------------------------------------------------------ +//SJ: TODO, we need to create a GraphicImporter component +USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const INetURLObject& rPath, + USHORT nFormat, USHORT * pDeterminedFormat, sal_uInt32 nImportFlags ) +{ + sal_uInt16 nRetValue = GRFILTER_FORMATERROR; + DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::ImportGraphic() : ProtType == INET_PROT_NOT_VALID" ); + + String aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) ); + SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aMainUrl, STREAM_READ | STREAM_SHARE_DENYNONE ); + if ( pStream ) + { + nRetValue = ImportGraphic( rGraphic, aMainUrl, *pStream, nFormat, pDeterminedFormat, nImportFlags ); + delete pStream; + } + return nRetValue; +} + +USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvStream& rIStream, + USHORT nFormat, USHORT* pDeterminedFormat, sal_uInt32 nImportFlags ) +{ + return ImportGraphic( rGraphic, rPath, rIStream, nFormat, pDeterminedFormat, nImportFlags, NULL ); +} + +//------------------------------------------------------------------------- + +USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvStream& rIStream, + USHORT nFormat, USHORT* pDeterminedFormat, sal_uInt32 nImportFlags, + com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData ) +{ + String aFilterName; + ULONG nStmBegin; + USHORT nStatus; + GraphicReader* pContext = rGraphic.GetContext(); + GfxLinkType eLinkType = GFX_LINK_TYPE_NONE; + BOOL bDummyContext = ( pContext == (GraphicReader*) 1 ); + const BOOL bLinkSet = rGraphic.IsLink(); + FilterConfigItem* pFilterConfigItem = NULL; + + Size aPreviewSizeHint( 0, 0 ); + sal_Bool bAllowPartialStreamRead = sal_False; + sal_Bool bCreateNativeLink = sal_True; + + ResetLastError(); + + if ( pFilterData ) + { + sal_Int32 i; + for ( i = 0; i < pFilterData->getLength(); i++ ) + { + if ( (*pFilterData)[ i ].Name.equalsAscii( "PreviewSizeHint" ) ) + { + awt::Size aSize; + if ( (*pFilterData)[ i ].Value >>= aSize ) + { + aPreviewSizeHint = Size( aSize.Width, aSize.Height ); + if ( aSize.Width || aSize.Height ) + nImportFlags |= GRFILTER_I_FLAGS_FOR_PREVIEW; + else + nImportFlags &=~GRFILTER_I_FLAGS_FOR_PREVIEW; + } + } + else if ( (*pFilterData)[ i ].Name.equalsAscii( "AllowPartialStreamRead" ) ) + { + (*pFilterData)[ i ].Value >>= bAllowPartialStreamRead; + if ( bAllowPartialStreamRead ) + nImportFlags |= GRFILTER_I_FLAGS_ALLOW_PARTIAL_STREAMREAD; + else + nImportFlags &=~GRFILTER_I_FLAGS_ALLOW_PARTIAL_STREAMREAD; + } + else if ( (*pFilterData)[ i ].Name.equalsAscii( "CreateNativeLink" ) ) + { + (*pFilterData)[ i ].Value >>= bCreateNativeLink; + } + } + } + + if( !pContext || bDummyContext ) + { + if( bDummyContext ) + { + rGraphic.SetContext( NULL ); + nStmBegin = 0; + } + else + nStmBegin = rIStream.Tell(); + + bAbort = FALSE; + nStatus = ImpTestOrFindFormat( rPath, rIStream, nFormat ); + // Falls Pending, geben wir GRFILTER_OK zurueck, + // um mehr Bytes anzufordern + if( rIStream.GetError() == ERRCODE_IO_PENDING ) + { + rGraphic.SetContext( (GraphicReader*) 1 ); + rIStream.ResetError(); + rIStream.Seek( nStmBegin ); + return (USHORT) ImplSetError( GRFILTER_OK ); + } + + rIStream.Seek( nStmBegin ); + + if( ( nStatus != GRFILTER_OK ) || rIStream.GetError() ) + return (USHORT) ImplSetError( ( nStatus != GRFILTER_OK ) ? nStatus : GRFILTER_OPENERROR, &rIStream ); + + if( pDeterminedFormat ) + *pDeterminedFormat = nFormat; + + aFilterName = pConfig->GetImportFilterName( nFormat ); + } + else + { + if( pContext && !bDummyContext ) + aFilterName = pContext->GetUpperFilterName(); + + nStmBegin = 0; + nStatus = GRFILTER_OK; + } + + // read graphic + if ( pConfig->IsImportInternalFilter( nFormat ) ) + { + if( aFilterName.EqualsIgnoreCaseAscii( IMP_GIF ) ) + { + if( rGraphic.GetContext() == (GraphicReader*) 1 ) + rGraphic.SetContext( NULL ); + + if( !ImportGIF( rIStream, rGraphic ) ) + nStatus = GRFILTER_FILTERERROR; + else + eLinkType = GFX_LINK_TYPE_NATIVE_GIF; + } + else if( aFilterName.EqualsIgnoreCaseAscii( IMP_PNG ) ) + { + if ( rGraphic.GetContext() == (GraphicReader*) 1 ) + rGraphic.SetContext( NULL ); + + vcl::PNGReader aPNGReader( rIStream ); + + // ignore animation for previews and set preview size + if( aPreviewSizeHint.Width() || aPreviewSizeHint.Height() ) + { + // position the stream at the end of the image if requested + if( !bAllowPartialStreamRead ) + aPNGReader.GetChunks(); + } + else + { + // check if this PNG contains a GIF chunk! + const std::vector< vcl::PNGReader::ChunkData >& rChunkData = aPNGReader.GetChunks(); + std::vector< vcl::PNGReader::ChunkData >::const_iterator aIter( rChunkData.begin() ); + std::vector< vcl::PNGReader::ChunkData >::const_iterator aEnd ( rChunkData.end() ); + while( aIter != aEnd ) + { + // Microsoft Office is storing Animated GIFs in following chunk + if ( aIter->nType == PMGCHUNG_msOG ) + { + sal_uInt32 nChunkSize = aIter->aData.size(); + if ( nChunkSize > 11 ) + { + const std::vector< sal_uInt8 >& rData = aIter->aData; + SvMemoryStream aIStrm( (void*)&rData[ 11 ], nChunkSize - 11, STREAM_READ ); + ImportGIF( aIStrm, rGraphic ); + eLinkType = GFX_LINK_TYPE_NATIVE_PNG; + break; + } + } + aIter++; + } + } + + if ( eLinkType == GFX_LINK_TYPE_NONE ) + { + BitmapEx aBmpEx( aPNGReader.Read( aPreviewSizeHint ) ); + if ( aBmpEx.IsEmpty() ) + nStatus = GRFILTER_FILTERERROR; + else + { + rGraphic = aBmpEx; + eLinkType = GFX_LINK_TYPE_NATIVE_PNG; + } + } + } + else if( aFilterName.EqualsIgnoreCaseAscii( IMP_JPEG ) ) + { + if( rGraphic.GetContext() == (GraphicReader*) 1 ) + rGraphic.SetContext( NULL ); + + // set LOGSIZE flag always, if not explicitly disabled + // (see #90508 and #106763) + if( 0 == ( nImportFlags & GRFILTER_I_FLAGS_DONT_SET_LOGSIZE_FOR_JPEG ) ) + nImportFlags |= GRFILTER_I_FLAGS_SET_LOGSIZE_FOR_JPEG; + + if( !ImportJPEG( rIStream, rGraphic, NULL, nImportFlags ) ) + nStatus = GRFILTER_FILTERERROR; + else + eLinkType = GFX_LINK_TYPE_NATIVE_JPG; + } + else if( aFilterName.EqualsIgnoreCaseAscii( IMP_SVG ) ) + { + if( rGraphic.GetContext() == (GraphicReader*) 1 ) + rGraphic.SetContext( NULL ); + + vcl::SVGReader aSVGReader( rIStream ); + GDIMetaFile aSVGMtf; + + if( 0 == aSVGReader.Read( aSVGMtf ).GetActionCount() ) + nStatus = GRFILTER_FILTERERROR; + else + rGraphic = Graphic( aSVGMtf ); + + // Dont set any GfxLink here, since the MetaRenderGraphicAction + // inside the just read MetaFile contains excatly this native data; + // setting a Ç´fxLink would also affect other program parts, since + // GfxLinks are preferably written to the file format in general, + // which would be a bad idea in case of SVG files, since earlier + // implementations are not able to handle native SVG data in any + // case. (KA 01/19/2011) + } + else if( aFilterName.EqualsIgnoreCaseAscii( IMP_XBM ) ) + { + if( rGraphic.GetContext() == (GraphicReader*) 1 ) + rGraphic.SetContext( NULL ); + + if( !ImportXBM( rIStream, rGraphic ) ) + nStatus = GRFILTER_FILTERERROR; + } + else if( aFilterName.EqualsIgnoreCaseAscii( IMP_XPM ) ) + { + if( rGraphic.GetContext() == (GraphicReader*) 1 ) + rGraphic.SetContext( NULL ); + + if( !ImportXPM( rIStream, rGraphic ) ) + nStatus = GRFILTER_FILTERERROR; + } + else if( aFilterName.EqualsIgnoreCaseAscii( IMP_BMP ) || + aFilterName.EqualsIgnoreCaseAscii( IMP_SVMETAFILE ) ) + { + // SV interne Importfilter fuer Bitmaps und MetaFiles + rIStream >> rGraphic; + if( rIStream.GetError() ) + nStatus = GRFILTER_FORMATERROR; + } + else if( aFilterName.EqualsIgnoreCaseAscii( IMP_WMF ) || + aFilterName.EqualsIgnoreCaseAscii( IMP_EMF ) ) + { + GDIMetaFile aMtf; + if( !ConvertWMFToGDIMetaFile( rIStream, aMtf, NULL ) ) + nStatus = GRFILTER_FORMATERROR; + else + { + rGraphic = aMtf; + eLinkType = GFX_LINK_TYPE_NATIVE_WMF; + } + } + else if( aFilterName.EqualsIgnoreCaseAscii( IMP_SVSGF ) + || aFilterName.EqualsIgnoreCaseAscii( IMP_SVSGV ) ) + { + USHORT nVersion; + unsigned char nTyp = CheckSgfTyp( rIStream, nVersion ); + + switch( nTyp ) + { + case SGF_BITIMAGE: + { + SvMemoryStream aTempStream; + if( aTempStream.GetError() ) + return GRFILTER_OPENERROR; + + if( !SgfBMapFilter( rIStream, aTempStream ) ) + nStatus = GRFILTER_FILTERERROR; + else + { + aTempStream.Seek( 0L ); + aTempStream >> rGraphic; + + if( aTempStream.GetError() ) + nStatus = GRFILTER_FILTERERROR; + } + } + break; + + case SGF_SIMPVECT: + { + GDIMetaFile aMtf; + if( !SgfVectFilter( rIStream, aMtf ) ) + nStatus = GRFILTER_FILTERERROR; + else + rGraphic = Graphic( aMtf ); + } + break; + + case SGF_STARDRAW: + { + if( nVersion != SGV_VERSION ) + nStatus = GRFILTER_VERSIONERROR; + else + { + GDIMetaFile aMtf; + if( !SgfSDrwFilter( rIStream, aMtf, + INetURLObject(aFilterPath) ) ) + { + nStatus = GRFILTER_FILTERERROR; + } + else + rGraphic = Graphic( aMtf ); + } + } + break; + + default: + { + nStatus = GRFILTER_FORMATERROR; + } + break; + } + } + else + nStatus = GRFILTER_FILTERERROR; + } + else + { + ImpFilterLibCacheEntry* pFilter = NULL; + + // find first filter in filter pathes + xub_StrLen i, nTokenCount = aFilterPath.GetTokenCount( ';' ); + ImpFilterLibCache &rCache = Cache::get(); + for( i = 0; ( i < nTokenCount ) && ( pFilter == NULL ); i++ ) + pFilter = rCache.GetFilter( aFilterPath.GetToken(i), aFilterName ); + if( !pFilter ) + nStatus = GRFILTER_FILTERERROR; + else + { + PFilterCall pFunc = pFilter->GetImportFunction(); + + if( !pFunc ) + nStatus = GRFILTER_FILTERERROR; + else + { + String aShortName; + if( nFormat != GRFILTER_FORMAT_DONTKNOW ) + { + aShortName = GetImportFormatShortName( nFormat ).ToUpperAscii(); + if ( ( pFilterConfigItem == NULL ) && aShortName.EqualsAscii( "PCD" ) ) + { + String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Import/PCD" ) ); + pFilterConfigItem = new FilterConfigItem( aFilterConfigPath ); + } + } + if( !(*pFunc)( rIStream, rGraphic, pFilterConfigItem, sal_False ) ) + nStatus = GRFILTER_FORMATERROR; + else + { + // try to set link type if format matches + if( nFormat != GRFILTER_FORMAT_DONTKNOW ) + { + if( aShortName.CompareToAscii( TIF_SHORTNAME ) == COMPARE_EQUAL ) + eLinkType = GFX_LINK_TYPE_NATIVE_TIF; + else if( aShortName.CompareToAscii( MET_SHORTNAME ) == COMPARE_EQUAL ) + eLinkType = GFX_LINK_TYPE_NATIVE_MET; + else if( aShortName.CompareToAscii( PCT_SHORTNAME ) == COMPARE_EQUAL ) + eLinkType = GFX_LINK_TYPE_NATIVE_PCT; + } + } + } + } + } + + if( nStatus == GRFILTER_OK && bCreateNativeLink && ( eLinkType != GFX_LINK_TYPE_NONE ) && !rGraphic.GetContext() && !bLinkSet ) + { + const ULONG nStmEnd = rIStream.Tell(); + const ULONG nBufSize = nStmEnd - nStmBegin; + + if( nBufSize ) + { + BYTE* pBuf=0; + try + { + pBuf = new BYTE[ nBufSize ]; + } + catch (std::bad_alloc) + { + nStatus = GRFILTER_TOOBIG; + } + + if( nStatus == GRFILTER_OK ) + { + rIStream.Seek( nStmBegin ); + rIStream.Read( pBuf, nBufSize ); + rGraphic.SetLink( GfxLink( pBuf, nBufSize, eLinkType, TRUE ) ); + } + } + } + + // Set error code or try to set native buffer + if( nStatus != GRFILTER_OK ) + { + if( bAbort ) + nStatus = GRFILTER_ABORT; + + ImplSetError( nStatus, &rIStream ); + rIStream.Seek( nStmBegin ); + rGraphic.Clear(); + } + + delete pFilterConfigItem; + return nStatus; +} + + +// ------------------------------------------------------------------------ + +USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const INetURLObject& rPath, + sal_uInt16 nFormat, const uno::Sequence< beans::PropertyValue >* pFilterData ) +{ + sal_uInt16 nRetValue = GRFILTER_FORMATERROR; + DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::ExportGraphic() : ProtType == INET_PROT_NOT_VALID" ); + BOOL bAlreadyExists = ImplDirEntryHelper::Exists( rPath ); + + String aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) ); + SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aMainUrl, STREAM_WRITE | STREAM_TRUNC ); + if ( pStream ) + { + nRetValue = ExportGraphic( rGraphic, aMainUrl, *pStream, nFormat, pFilterData ); + delete pStream; + + if( ( GRFILTER_OK != nRetValue ) && !bAlreadyExists ) + ImplDirEntryHelper::Kill( aMainUrl ); + } + return nRetValue; +} + +// ------------------------------------------------------------------------ + +USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPath, + SvStream& rOStm, sal_uInt16 nFormat, const uno::Sequence< beans::PropertyValue >* pFilterData ) +{ + USHORT nFormatCount = GetExportFormatCount(); + + ResetLastError(); + nExpGraphHint = 0; + + if( nFormat == GRFILTER_FORMAT_DONTKNOW ) + { + INetURLObject aURL( rPath ); + String aExt( aURL.GetFileExtension().toAsciiUpperCase() ); + + + for( USHORT i = 0; i < nFormatCount; i++ ) + { + if ( pConfig->GetExportFormatExtension( i ).EqualsIgnoreCaseAscii( aExt ) ) + { + nFormat=i; + break; + } + } + } + if( nFormat >= nFormatCount ) + return (USHORT) ImplSetError( GRFILTER_FORMATERROR ); + + FilterConfigItem aConfigItem( (uno::Sequence< beans::PropertyValue >*)pFilterData ); + String aFilterName( pConfig->GetExportFilterName( nFormat ) ); + + bAbort = FALSE; + USHORT nStatus = GRFILTER_OK; + GraphicType eType; + Graphic aGraphic( rGraphic ); + + aGraphic = ImpGetScaledGraphic( rGraphic, aConfigItem ); + eType = aGraphic.GetType(); + + if( pConfig->IsExportPixelFormat( nFormat ) ) + { + if( eType != GRAPHIC_BITMAP ) + { + Size aSizePixel; + ULONG nColorCount,nBitsPerPixel,nNeededMem,nMaxMem; + VirtualDevice aVirDev; + + // Maximalen Speicherbedarf fuer das Bildes holen: +// if( GetOptionsConfig() ) +// nMaxMem = (UINT32)GetOptionsConfig()->ReadKey( "VEC-TO-PIX-MAX-KB", "1024" ).ToInt32(); +// else + nMaxMem = 1024; + + nMaxMem *= 1024; // In Bytes + + // Berechnen, wie gross das Bild normalerweise werden wuerde: + aSizePixel=aVirDev.LogicToPixel(aGraphic.GetPrefSize(),aGraphic.GetPrefMapMode()); + + // Berechnen, wieviel Speicher das Bild benoetigen wuerde: + nColorCount=aVirDev.GetColorCount(); + if (nColorCount<=2) nBitsPerPixel=1; + else if (nColorCount<=4) nBitsPerPixel=2; + else if (nColorCount<=16) nBitsPerPixel=4; + else if (nColorCount<=256) nBitsPerPixel=8; + else if (nColorCount<=65536) nBitsPerPixel=16; + else nBitsPerPixel=24; + nNeededMem=((ULONG)aSizePixel.Width()*(ULONG)aSizePixel.Height()*nBitsPerPixel+7)/8; + + // ggf. Groesse des Bildes einschraenken: + if (nMaxMemIsExportInternalFilter( nFormat ) ) + { + if( aFilterName.EqualsIgnoreCaseAscii( EXP_BMP ) ) + { + Bitmap aBmp( aGraphic.GetBitmap() ); + sal_Int32 nColorRes = aConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Colors" ) ), 0 ); + if ( nColorRes && ( nColorRes <= (USHORT)BMP_CONVERSION_24BIT) ) + { + if( !aBmp.Convert( (BmpConversion) nColorRes ) ) + aBmp = aGraphic.GetBitmap(); + } + ResMgr* pResMgr = CREATERESMGR( svt ); + sal_Bool bRleCoding = aConfigItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( "RLE_Coding" ) ), sal_True ); + // Wollen wir RLE-Kodiert speichern? + aBmp.Write( rOStm, bRleCoding ); + delete pResMgr; + + if( rOStm.GetError() ) + nStatus = GRFILTER_IOERROR; + } + else if( aFilterName.EqualsIgnoreCaseAscii( EXP_SVMETAFILE ) ) + { + sal_Int32 nVersion = aConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ), 0 ) ; + if ( nVersion ) + rOStm.SetVersion( nVersion ); + GDIMetaFile aMTF; + + if ( eType != GRAPHIC_BITMAP ) + aMTF = aGraphic.GetGDIMetaFile(); + else + { + VirtualDevice aVirDev; + + aMTF.Record( &aVirDev ); + aGraphic.Draw( &aVirDev, Point(), aGraphic.GetPrefSize() ); + aMTF.Stop(); + aMTF.SetPrefSize( aGraphic.GetPrefSize() ); + aMTF.SetPrefMapMode( aGraphic.GetPrefMapMode() ); + } + aMTF.Write( rOStm, GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC ); + if( rOStm.GetError() ) + nStatus = GRFILTER_IOERROR; + } + else if ( aFilterName.EqualsIgnoreCaseAscii( EXP_WMF ) ) + { + if( eType == GRAPHIC_GDIMETAFILE ) + { + if ( !ConvertGDIMetaFileToWMF( aGraphic.GetGDIMetaFile(), rOStm, &aConfigItem ) ) + nStatus = GRFILTER_FORMATERROR; + } + else + { + Bitmap aBmp( aGraphic.GetBitmap() ); + GDIMetaFile aMTF; + VirtualDevice aVirDev; + + aMTF.Record( &aVirDev ); + aVirDev.DrawBitmap( Point(), aBmp ); + aMTF.Stop(); + aMTF.SetPrefSize( aBmp.GetSizePixel() ); + + if( !ConvertGDIMetaFileToWMF( aMTF, rOStm, &aConfigItem ) ) + nStatus = GRFILTER_FORMATERROR; + } + if( rOStm.GetError() ) + nStatus = GRFILTER_IOERROR; + } + else if ( aFilterName.EqualsIgnoreCaseAscii( EXP_EMF ) ) + { + if( eType == GRAPHIC_GDIMETAFILE ) + { + if ( !ConvertGDIMetaFileToEMF( aGraphic.GetGDIMetaFile(), rOStm, &aConfigItem ) ) + nStatus = GRFILTER_FORMATERROR; + } + else + { + Bitmap aBmp( aGraphic.GetBitmap() ); + GDIMetaFile aMTF; + VirtualDevice aVirDev; + + aMTF.Record( &aVirDev ); + aVirDev.DrawBitmap( Point(), aBmp ); + aMTF.Stop(); + aMTF.SetPrefSize( aBmp.GetSizePixel() ); + + if( !ConvertGDIMetaFileToEMF( aMTF, rOStm, &aConfigItem ) ) + nStatus = GRFILTER_FORMATERROR; + } + if( rOStm.GetError() ) + nStatus = GRFILTER_IOERROR; + } + else if( aFilterName.EqualsIgnoreCaseAscii( EXP_JPEG ) ) + { + bool bExportedGrayJPEG = false; + if( !ExportJPEG( rOStm, aGraphic, pFilterData, &bExportedGrayJPEG ) ) + nStatus = GRFILTER_FORMATERROR; + nExpGraphHint = bExportedGrayJPEG ? GRFILTER_OUTHINT_GREY : 0; + + if( rOStm.GetError() ) + nStatus = GRFILTER_IOERROR; + } + else if ( aFilterName.EqualsIgnoreCaseAscii( EXP_PNG ) ) + { + vcl::PNGWriter aPNGWriter( aGraphic.GetBitmapEx(), pFilterData ); + if ( pFilterData ) + { + sal_Int32 k, j, i = 0; + for ( i = 0; i < pFilterData->getLength(); i++ ) + { + if ( (*pFilterData)[ i ].Name.equalsAscii( "AdditionalChunks" ) ) + { + com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > aAdditionalChunkSequence; + if ( (*pFilterData)[ i ].Value >>= aAdditionalChunkSequence ) + { + for ( j = 0; j < aAdditionalChunkSequence.getLength(); j++ ) + { + if ( aAdditionalChunkSequence[ j ].Name.getLength() == 4 ) + { + sal_uInt32 nChunkType = 0; + for ( k = 0; k < 4; k++ ) + { + nChunkType <<= 8; + nChunkType |= (sal_uInt8)aAdditionalChunkSequence[ j ].Name[ k ]; + } + com::sun::star::uno::Sequence< sal_Int8 > aByteSeq; + if ( aAdditionalChunkSequence[ j ].Value >>= aByteSeq ) + { + std::vector< vcl::PNGWriter::ChunkData >& rChunkData = aPNGWriter.GetChunks(); + if ( rChunkData.size() ) + { + sal_uInt32 nChunkLen = aByteSeq.getLength(); + + vcl::PNGWriter::ChunkData aChunkData; + aChunkData.nType = nChunkType; + if ( nChunkLen ) + { + aChunkData.aData.resize( nChunkLen ); + rtl_copyMemory( &aChunkData.aData[ 0 ], aByteSeq.getConstArray(), nChunkLen ); + } + std::vector< vcl::PNGWriter::ChunkData >::iterator aIter = rChunkData.end() - 1; + rChunkData.insert( aIter, aChunkData ); + } + } + } + } + } + } + } + } + aPNGWriter.Write( rOStm ); + + if( rOStm.GetError() ) + nStatus = GRFILTER_IOERROR; + } + else if( aFilterName.EqualsIgnoreCaseAscii( EXP_SVG ) ) + { + bool bDone = false; + + // do we have a native SVG RenderGraphic, whose data can be written directly? + if( ( GRAPHIC_GDIMETAFILE == eType ) && aGraphic.IsRenderGraphic() ) + { + const ::vcl::RenderGraphic aRenderGraphic( aGraphic.GetRenderGraphic() ); + + if( aRenderGraphic.GetGraphicDataLength() && + aRenderGraphic.GetGraphicDataMimeType().equalsIgnoreAsciiCase( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "image/svg+xml" ) ) ) ) + { + rOStm.Write( aRenderGraphic.GetGraphicData().get(), + aRenderGraphic.GetGraphicDataLength() ); + + if( rOStm.GetError() ) + { + nStatus = GRFILTER_IOERROR; + } + } + } + + if( !bDone ) + { + // do the normal GDIMetaFile export instead + try + { + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() ); + + if( xMgr.is() ) + { + ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > xSaxWriter( xMgr->createInstance( + ::rtl::OUString::createFromAscii( "com.sun.star.xml.sax.Writer" ) ), ::com::sun::star::uno::UNO_QUERY ); + + ::com::sun::star::uno::Reference< ::com::sun::star::svg::XSVGWriter > xSVGWriter( xMgr->createInstance( + ::rtl::OUString::createFromAscii( "com.sun.star.svg.SVGWriter" ) ), ::com::sun::star::uno::UNO_QUERY ); + + if( xSaxWriter.is() && xSVGWriter.is() ) + { + ::com::sun::star::uno::Reference< ::com::sun::star::io::XActiveDataSource > xActiveDataSource( + xSaxWriter, ::com::sun::star::uno::UNO_QUERY ); + + if( xActiveDataSource.is() ) + { + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xStmIf( + static_cast< ::cppu::OWeakObject* >( new ImpFilterOutputStream( rOStm ) ) ); + + SvMemoryStream aMemStm( 65535, 65535 ); + + aMemStm.SetCompressMode( COMPRESSMODE_FULL ); + ( (GDIMetaFile&) aGraphic.GetGDIMetaFile() ).Write( aMemStm ); + + xActiveDataSource->setOutputStream( ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >( + xStmIf, ::com::sun::star::uno::UNO_QUERY ) ); + ::com::sun::star::uno::Sequence< sal_Int8 > aMtfSeq( (sal_Int8*) aMemStm.GetData(), aMemStm.Tell() ); + xSVGWriter->write( xSaxWriter, aMtfSeq ); + } + } + } + } + catch( ::com::sun::star::uno::Exception& ) + { + nStatus = GRFILTER_IOERROR; + } + } + } + else + nStatus = GRFILTER_FILTERERROR; + } + else + { + xub_StrLen i, nTokenCount = aFilterPath.GetTokenCount( ';' ); + for ( i = 0; i < nTokenCount; i++ ) + { + String aPhysicalName( ImpCreateFullFilterPath( aFilterPath.GetToken( i ), aFilterName ) ); + osl::Module aLibrary( aPhysicalName ); + + PFilterCall pFunc = (PFilterCall) aLibrary.getFunctionSymbol( UniString::CreateFromAscii( EXPORT_FUNCTION_NAME ) ); + // Dialog in DLL ausfuehren + if( pFunc ) + { + if ( !(*pFunc)( rOStm, aGraphic, &aConfigItem, sal_False ) ) + nStatus = GRFILTER_FORMATERROR; + break; + } + else + nStatus = GRFILTER_FILTERERROR; + } + } + } + if( nStatus != GRFILTER_OK ) + { + if( bAbort ) + nStatus = GRFILTER_ABORT; + + ImplSetError( nStatus, &rOStm ); + } + return nStatus; +} + +// ------------------------------------------------------------------------ + +BOOL GraphicFilter::Setup( USHORT ) +{ + return FALSE; +} + +/* ------------------------------------------------------------------------ + No Import filter has a dialog, so + the following two methods are obsolete */ + +BOOL GraphicFilter::HasImportDialog( USHORT ) +{ + return sal_True; +// return pConfig->IsImportDialog( nFormat ); +} + +// ------------------------------------------------------------------------ + +BOOL GraphicFilter::DoImportDialog( Window*, USHORT ) +{ + return sal_True; +} + +// ------------------------------------------------------------------------ + +BOOL GraphicFilter::HasExportDialog( USHORT nFormat ) +{ + return pConfig->IsExportDialog( nFormat ); +} + +// ------------------------------------------------------------------------ + +BOOL GraphicFilter::DoExportDialog( Window* pWindow, USHORT nFormat ) +{ + return DoExportDialog( pWindow, nFormat, FUNIT_MM ); +} + +BOOL GraphicFilter::DoExportDialog( Window*, USHORT nFormat, FieldUnit ) +{ + sal_Bool bRet = sal_False; + com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > + xSMgr( ::comphelper::getProcessServiceFactory() ); + + uno::Reference< com::sun::star::uno::XInterface > xFilterOptionsDialog + ( xSMgr->createInstance( rtl::OUString::createFromAscii( "com.sun.star.svtools.SvFilterOptionsDialog" ) ), + com::sun::star::uno::UNO_QUERY ); + if ( xFilterOptionsDialog.is() ) + { + com::sun::star::uno::Reference< com::sun::star::ui::dialogs::XExecutableDialog > xExecutableDialog + ( xFilterOptionsDialog, ::com::sun::star::uno::UNO_QUERY ); + com::sun::star::uno::Reference< com::sun::star::beans::XPropertyAccess > xPropertyAccess + ( xFilterOptionsDialog, ::com::sun::star::uno::UNO_QUERY ); + if ( xExecutableDialog.is() && xPropertyAccess.is() ) + { + com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aMediaDescriptor( 1 ); + aMediaDescriptor[ 0 ].Name = String( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ) ); + rtl::OUString aStr( pConfig->GetExportInternalFilterName( nFormat ) ); + aMediaDescriptor[ 0 ].Value <<= aStr; + xPropertyAccess->setPropertyValues( aMediaDescriptor ); + bRet = xExecutableDialog->execute() == com::sun::star::ui::dialogs::ExecutableDialogResults::OK; + } + } + return bRet; +} + +// ------------------------------------------------------------------------ + +const FilterErrorEx& GraphicFilter::GetLastError() const +{ + return *pErrorEx; +} + +// ------------------------------------------------------------------------ + +void GraphicFilter::ResetLastError() +{ + pErrorEx->nFilterError = pErrorEx->nStreamError = 0UL; +} + +// ------------------------------------------------------------------------ + +const Link GraphicFilter::GetFilterCallback() const +{ + const Link aLink( LINK( this, GraphicFilter, FilterCallback ) ); + return aLink; +} + +// ------------------------------------------------------------------------ + +IMPL_LINK( GraphicFilter, FilterCallback, ConvertData*, pData ) +{ + long nRet = 0L; + + if( pData ) + { + USHORT nFormat = GRFILTER_FORMAT_DONTKNOW; + ByteString aShortName; + switch( pData->mnFormat ) + { + case( CVT_BMP ): aShortName = BMP_SHORTNAME; break; + case( CVT_GIF ): aShortName = GIF_SHORTNAME; break; + case( CVT_JPG ): aShortName = JPG_SHORTNAME; break; + case( CVT_MET ): aShortName = MET_SHORTNAME; break; + case( CVT_PCT ): aShortName = PCT_SHORTNAME; break; + case( CVT_PNG ): aShortName = PNG_SHORTNAME; break; + case( CVT_SVM ): aShortName = SVM_SHORTNAME; break; + case( CVT_TIF ): aShortName = TIF_SHORTNAME; break; + case( CVT_WMF ): aShortName = WMF_SHORTNAME; break; + case( CVT_EMF ): aShortName = EMF_SHORTNAME; break; + case( CVT_SVG ): aShortName = SVG_SHORTNAME; break; + + default: + break; + } + if( GRAPHIC_NONE == pData->maGraphic.GetType() || pData->maGraphic.GetContext() ) // Import + { + // Import + nFormat = GetImportFormatNumberForShortName( String( aShortName.GetBuffer(), RTL_TEXTENCODING_UTF8 ) ); + nRet = ImportGraphic( pData->maGraphic, String(), pData->mrStm ) == 0; + } + else if( aShortName.Len() ) + { + // Export + nFormat = GetExportFormatNumberForShortName( String( aShortName.GetBuffer(), RTL_TEXTENCODING_UTF8 ) ); + nRet = ExportGraphic( pData->maGraphic, String(), pData->mrStm, nFormat ) == 0; + } + } + return nRet; +} + +// ------------------------------------------------------------------------ + +GraphicFilter* GraphicFilter::GetGraphicFilter() +{ + if( !pGraphicFilter ) + { + pGraphicFilter = new GraphicFilter; + pGraphicFilter->GetImportFormatCount(); + } + return pGraphicFilter; +} + +int GraphicFilter::LoadGraphic( const String &rPath, const String &rFilterName, + Graphic& rGraphic, GraphicFilter* pFilter, + USHORT* pDeterminedFormat ) +{ + if ( !pFilter ) + pFilter = GetGraphicFilter(); + + const USHORT nFilter = rFilterName.Len() && pFilter->GetImportFormatCount() + ? pFilter->GetImportFormatNumber( rFilterName ) + : GRFILTER_FORMAT_DONTKNOW; + + 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() ) + { + pStream = ::utl::UcbStreamHelper::CreateStream( rPath, STREAM_READ ); + } + + int nRes = GRFILTER_OK; + if ( !pStream ) + nRes = pFilter->ImportGraphic( rGraphic, aURL, nFilter, pDeterminedFormat ); + else + nRes = pFilter->ImportGraphic( rGraphic, rPath, *pStream, nFilter, pDeterminedFormat ); + +#ifdef DBG_UTIL + if( nRes ) + DBG_WARNING2( "GrafikFehler [%d] - [%s]", nRes, rPath.GetBuffer() ); +#endif + + return nRes; +} diff --git a/svtools/source/filter/filter2.cxx b/svtools/source/filter/filter2.cxx new file mode 100644 index 000000000000..15bdc5c5d080 --- /dev/null +++ b/svtools/source/filter/filter2.cxx @@ -0,0 +1,1354 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include "FilterConfigCache.hxx" +#include + +#define DATA_SIZE 640 + +BYTE* ImplSearchEntry( BYTE* , BYTE* , ULONG , ULONG ); + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +GraphicDescriptor::GraphicDescriptor( const INetURLObject& rPath ) : + pFileStm( ::utl::UcbStreamHelper::CreateStream( rPath.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ ) ), + aPathExt( rPath.GetFileExtension().toAsciiLowerCase() ), + bOwnStream( TRUE ) +{ + ImpConstruct(); +} + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +GraphicDescriptor::GraphicDescriptor( SvStream& rInStream, const String* pPath) : + pFileStm ( &rInStream ), + bOwnStream ( FALSE ) +{ + ImpConstruct(); + + if ( pPath ) + { + INetURLObject aURL( *pPath ); + aPathExt = aURL.GetFileExtension().toAsciiLowerCase(); + } +} + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +GraphicDescriptor::~GraphicDescriptor() +{ + if ( bOwnStream ) + delete pFileStm; +} + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::Detect( BOOL bExtendedInfo ) +{ + BOOL bRet = FALSE; + if ( pFileStm && !pFileStm->GetError() ) + { + SvStream& rStm = *pFileStm; + UINT16 nOldFormat = rStm.GetNumberFormatInt(); + + if ( ImpDetectGIF( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectJPG( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectBMP( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectPNG( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectTIF( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectPCX( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectDXF( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectMET( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectSGF( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectSGV( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectSVM( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectWMF( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectEMF( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectSVG( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectPCT( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectXBM( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectXPM( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectPBM( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectPGM( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectPPM( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectRAS( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectTGA( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectPSD( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectEPS( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectPCD( rStm, bExtendedInfo ) ) bRet = TRUE; + + rStm.SetNumberFormatInt( nOldFormat ); + } + return bRet; +} + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +void GraphicDescriptor::ImpConstruct() +{ + nFormat = GFF_NOT; + nBitsPerPixel = 0; + nPlanes = 0; + bCompressed = FALSE; +} + + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectBMP( SvStream& rStm, BOOL bExtendedInfo ) +{ + UINT16 nTemp16; + BOOL bRet = FALSE; + sal_Int32 nStmPos = rStm.Tell(); + + rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + rStm >> nTemp16; + + // OS/2-BitmapArray + if ( nTemp16 == 0x4142 ) + { + rStm.SeekRel( 0x0c ); + rStm >> nTemp16; + } + + // Bitmap + if ( nTemp16 == 0x4d42 ) + { + nFormat = GFF_BMP; + bRet = TRUE; + + if ( bExtendedInfo ) + { + UINT32 nTemp32; + UINT32 nCompression; + + // bis zur ersten Information + rStm.SeekRel( 0x10 ); + + // PixelBreite auslesen + rStm >> nTemp32; + aPixSize.Width() = nTemp32; + + // PixelHoehe auslesen + rStm >> nTemp32; + aPixSize.Height() = nTemp32; + + // Planes auslesen + rStm >> nTemp16; + nPlanes = nTemp16; + + // BitCount auslesen + rStm >> nTemp16; + nBitsPerPixel = nTemp16; + + // Compression auslesen + rStm >> nTemp32; + bCompressed = ( ( nCompression = nTemp32 ) > 0 ); + + // logische Breite + rStm.SeekRel( 4 ); + rStm >> nTemp32; + if ( nTemp32 ) + aLogSize.Width() = ( aPixSize.Width() * 100000 ) / nTemp32; + + // logische Hoehe + rStm >> nTemp32; + if ( nTemp32 ) + aLogSize.Height() = ( aPixSize.Height() * 100000 ) / nTemp32; + + // Wir wollen noch etwas feiner differenzieren und + // auf sinnvolle Werte ueberpruefen ( Bug-Id #29001 ) + if ( ( nBitsPerPixel > 24 ) || ( nCompression > 3 ) ) + { + nFormat = GFF_NOT; + bRet = FALSE; + } + } + } + rStm.Seek( nStmPos ); + return bRet; +} + + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectGIF( SvStream& rStm, BOOL bExtendedInfo ) +{ + UINT32 n32; + UINT16 n16; + BOOL bRet = FALSE; + BYTE cByte; + + sal_Int32 nStmPos = rStm.Tell(); + rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + rStm >> n32; + + if ( n32 == 0x38464947 ) + { + rStm >> n16; + if ( ( n16 == 0x6137 ) || ( n16 == 0x6139 ) ) + { + nFormat = GFF_GIF; + bRet = TRUE; + + if ( bExtendedInfo ) + { + UINT16 nTemp16; + + // PixelBreite auslesen + rStm >> nTemp16; + aPixSize.Width() = nTemp16; + + // PixelHoehe auslesen + rStm >> nTemp16; + aPixSize.Height() = nTemp16; + + // Bits/Pixel auslesen + rStm >> cByte; + nBitsPerPixel = ( ( cByte & 112 ) >> 4 ) + 1; + } + } + } + rStm.Seek( nStmPos ); + return bRet; +} + + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +// returns the next jpeg marker, a return value of 0 represents an error +sal_uInt8 ImpDetectJPG_GetNextMarker( SvStream& rStm ) +{ + sal_uInt8 nByte; + do + { + do + { + rStm >> nByte; + if ( rStm.IsEof() || rStm.GetError() ) // as 0 is not allowed as marker, + return 0; // we can use it as errorcode + } + while ( nByte != 0xff ); + do + { + rStm >> nByte; + if ( rStm.IsEof() || rStm.GetError() ) + return 0; + } + while( nByte == 0xff ); + } + while( nByte == 0 ); // 0xff00 represents 0xff and not a marker, + // the marker detection has to be restartet. + return nByte; +} + +BOOL GraphicDescriptor::ImpDetectJPG( SvStream& rStm, BOOL bExtendedInfo ) +{ + UINT32 nTemp32; + BOOL bRet = FALSE; + + sal_Int32 nStmPos = rStm.Tell(); + + rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + rStm >> nTemp32; + + // compare upper 24 bits + if( 0xffd8ff00 == ( nTemp32 & 0xffffff00 ) ) + { + nFormat = GFF_JPG; + bRet = TRUE; + + if ( bExtendedInfo ) + { + rStm.SeekRel( -2 ); + + sal_uInt32 nError( rStm.GetError() ); + + sal_Bool bScanFailure = sal_False; + sal_Bool bScanFinished = sal_False; + + while( !bScanFailure && !bScanFinished && !rStm.IsEof() && !rStm.GetError() ) + { + sal_uInt8 nMarker = ImpDetectJPG_GetNextMarker( rStm ); + switch( nMarker ) + { + // fixed size marker, not having a two byte length parameter + case 0xd0 : // RST0 + case 0xd1 : + case 0xd2 : + case 0xd3 : + case 0xd4 : + case 0xd5 : + case 0xd6 : + case 0xd7 : // RST7 + case 0x01 : // TEM + break; + + case 0xd8 : // SOI (has already been checked, there should not be a second one) + case 0x00 : // marker is invalid, we should stop now + bScanFailure = sal_True; + break; + + case 0xd9 : // EOI + bScanFinished = sal_True; + break; + + // per default we assume marker segments conaining a length parameter + default : + { + sal_uInt16 nLength; + rStm >> nLength; + + if ( nLength < 2 ) + bScanFailure = sal_True; + else + { + sal_uInt32 nNextMarkerPos = rStm.Tell() + nLength - 2; + switch( nMarker ) + { + case 0xe0 : // APP0 Marker + { + if ( nLength == 16 ) + { + sal_Int32 nIdentifier; + rStm >> nIdentifier; + if ( nIdentifier == 0x4a464946 ) // JFIF Identifier + { + sal_uInt8 nStringTerminator; + sal_uInt8 nMajorRevision; + sal_uInt8 nMinorRevision; + sal_uInt8 nUnits; + sal_uInt16 nHorizontalResolution; + sal_uInt16 nVerticalResolution; + sal_uInt8 nHorzThumbnailPixelCount; + sal_uInt8 nVertThumbnailPixelCount; + + rStm >> nStringTerminator + >> nMajorRevision + >> nMinorRevision + >> nUnits + >> nHorizontalResolution + >> nVerticalResolution + >> nHorzThumbnailPixelCount + >> nVertThumbnailPixelCount; + + // setting the logical size + if ( nUnits && nHorizontalResolution && nVerticalResolution ) + { + MapMode aMap; + aMap.SetMapUnit( nUnits == 1 ? MAP_INCH : MAP_CM ); + aMap.SetScaleX( Fraction( 1, nHorizontalResolution ) ); + aMap.SetScaleY( Fraction( 1, nVerticalResolution ) ); + aLogSize = OutputDevice::LogicToLogic( aPixSize, aMap, MapMode( MAP_100TH_MM ) ); + } + } + } + } + break; + + // Start of Frame Markers + case 0xc0 : // SOF0 + case 0xc1 : // SOF1 + case 0xc2 : // SOF2 + case 0xc3 : // SOF3 + case 0xc5 : // SOF5 + case 0xc6 : // SOF6 + case 0xc7 : // SOF7 + case 0xc9 : // SOF9 + case 0xca : // SOF10 + case 0xcb : // SOF11 + case 0xcd : // SOF13 + case 0xce : // SOF14 + case 0xcf : // SOF15 + { + sal_uInt8 nSamplePrecision; + sal_uInt16 nNumberOfLines; + sal_uInt16 nSamplesPerLine; + sal_uInt8 nNumberOfImageComponents; + sal_uInt8 nComponentsIdentifier; + sal_uInt8 nHorizontalSamplingFactor; + sal_uInt8 nVerticalSamplingFactor; + sal_uInt8 nQuantizationTableDestinationSelector; + rStm >> nSamplePrecision + >> nNumberOfLines + >> nSamplesPerLine + >> nNumberOfImageComponents + >> nComponentsIdentifier + >> nHorizontalSamplingFactor + >> nQuantizationTableDestinationSelector; + nVerticalSamplingFactor = nHorizontalSamplingFactor & 0xf; + nHorizontalSamplingFactor >>= 4; + + aPixSize.Height() = nNumberOfLines; + aPixSize.Width() = nSamplesPerLine; + nBitsPerPixel = ( nNumberOfImageComponents == 3 ? 24 : nNumberOfImageComponents == 1 ? 8 : 0 ); + nPlanes = 1; + + bScanFinished = sal_True; + } + break; + } + rStm.Seek( nNextMarkerPos ); + } + } + break; + } + } + rStm.SetError( nError ); + } + } + rStm.Seek( nStmPos ); + return bRet; +} + + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectPCD( SvStream& rStm, BOOL ) +{ + BOOL bRet = FALSE; + + sal_Int32 nStmPos = rStm.Tell(); + rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + + UINT32 nTemp32; + UINT16 nTemp16; + BYTE cByte; + + rStm.SeekRel( 2048 ); + rStm >> nTemp32; + rStm >> nTemp16; + rStm >> cByte; + + if ( ( nTemp32 == 0x5f444350 ) && + ( nTemp16 == 0x5049 ) && + ( cByte == 0x49 ) ) + { + nFormat = GFF_PCD; + bRet = TRUE; + } + rStm.Seek( nStmPos ); + return bRet; +} + + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectPCX( SvStream& rStm, BOOL bExtendedInfo ) +{ + // ! Because 0x0a can be interpreted as LF too ... + // we cant be shure that this special sign represent a PCX file only. + // Every Ascii file is possible here :-( + // We must detect the whole header. + bExtendedInfo = TRUE; + + BOOL bRet = FALSE; + BYTE cByte; + + sal_Int32 nStmPos = rStm.Tell(); + rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + rStm >> cByte; + + if ( cByte == 0x0a ) + { + nFormat = GFF_PCX; + bRet = TRUE; + + if ( bExtendedInfo ) + { + UINT16 nTemp16; + USHORT nXmin; + USHORT nXmax; + USHORT nYmin; + USHORT nYmax; + USHORT nDPIx; + USHORT nDPIy; + + + rStm.SeekRel( 1 ); + + // Kompression lesen + rStm >> cByte; + bCompressed = ( cByte > 0 ); + + bRet = (cByte==0 || cByte ==1); + + // Bits/Pixel lesen + rStm >> cByte; + nBitsPerPixel = cByte; + + // Bildabmessungen + rStm >> nTemp16; + nXmin = nTemp16; + rStm >> nTemp16; + nYmin = nTemp16; + rStm >> nTemp16; + nXmax = nTemp16; + rStm >> nTemp16; + nYmax = nTemp16; + + aPixSize.Width() = nXmax - nXmin + 1; + aPixSize.Height() = nYmax - nYmin + 1; + + // Aufloesung + rStm >> nTemp16; + nDPIx = nTemp16; + rStm >> nTemp16; + nDPIy = nTemp16; + + // logische Groesse setzen + MapMode aMap( MAP_INCH, Point(), + Fraction( 1, nDPIx ), Fraction( 1, nDPIy ) ); + aLogSize = OutputDevice::LogicToLogic( aPixSize, aMap, + MapMode( MAP_100TH_MM ) ); + + + // Anzahl Farbebenen + rStm.SeekRel( 49 ); + rStm >> cByte; + nPlanes = cByte; + + bRet = (nPlanes<=4); + } + } + + rStm.Seek( nStmPos ); + return bRet; +} + + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectPNG( SvStream& rStm, BOOL bExtendedInfo ) +{ + UINT32 nTemp32; + BOOL bRet = FALSE; + + sal_Int32 nStmPos = rStm.Tell(); + rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + rStm >> nTemp32; + + if ( nTemp32 == 0x89504e47 ) + { + rStm >> nTemp32; + if ( nTemp32 == 0x0d0a1a0a ) + { + nFormat = GFF_PNG; + bRet = TRUE; + + if ( bExtendedInfo ) + { + BYTE cByte; + + // IHDR-Chunk + rStm.SeekRel( 8 ); + + // Breite einlesen + rStm >> nTemp32; + aPixSize.Width() = nTemp32; + + // Hoehe einlesen + rStm >> nTemp32; + aPixSize.Height() = nTemp32; + + // Bits/Pixel einlesen + rStm >> cByte; + nBitsPerPixel = cByte; + + // Planes immer 1; + // Kompression immer + nPlanes = 1; + bCompressed = TRUE; + + UINT32 nLen32; + + rStm.SeekRel( 8 ); + + // so lange ueberlesen, bis wir den pHYs-Chunk haben oder + // den Anfang der Bilddaten + rStm >> nLen32; + rStm >> nTemp32; + while( ( nTemp32 != 0x70485973 ) && ( nTemp32 != 0x49444154 ) ) + { + rStm.SeekRel( 4 + nLen32 ); + rStm >> nLen32; + rStm >> nTemp32; + } + + if ( nTemp32 == 0x70485973 ) + { + ULONG nXRes; + ULONG nYRes; + + // horizontale Aufloesung + rStm >> nTemp32; + nXRes = nTemp32; + + // vertikale Aufloesung + rStm >> nTemp32; + nYRes = nTemp32; + + // Unit einlesen + rStm >> cByte; + + if ( cByte ) + { + if ( nXRes ) + aLogSize.Width() = ( aPixSize.Width() * 100000 ) / + nTemp32; + + if ( nYRes ) + aLogSize.Height() = ( aPixSize.Height() * 100000 ) / + nTemp32; + } + } + } + } + } + rStm.Seek( nStmPos ); + return bRet; +} + + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectTIF( SvStream& rStm, BOOL bExtendedInfo ) +{ + BOOL bDetectOk = FALSE; + BOOL bRet = FALSE; + BYTE cByte1; + BYTE cByte2; + + sal_Int32 nStmPos = rStm.Tell(); + rStm >> cByte1; + rStm >> cByte2; + if ( cByte1 == cByte2 ) + { + if ( cByte1 == 0x49 ) + { + rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + bDetectOk = TRUE; + } + else if ( cByte1 == 0x4d ) + { + rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + bDetectOk = TRUE; + } + + if ( bDetectOk ) + { + UINT16 nTemp16; + + rStm >> nTemp16; + if ( nTemp16 == 0x2a ) + { + nFormat = GFF_TIF; + bRet = TRUE; + + if ( bExtendedInfo ) + { + ULONG nCount; + ULONG nMax = DATA_SIZE - 48; + UINT32 nTemp32; + BOOL bOk = FALSE; + + // Offset des ersten IFD einlesen + rStm >> nTemp32; + rStm.SeekRel( ( nCount = ( nTemp32 + 2 ) ) - 0x08 ); + + if ( nCount < nMax ) + { + // Tag's lesen, bis wir auf Tag256 ( Width ) treffen + // nicht mehr Bytes als DATA_SIZE lesen + rStm >> nTemp16; + while ( nTemp16 != 256 ) + { + bOk = nCount < nMax; + if ( !bOk ) + { + break; + } + rStm.SeekRel( 10 ); + rStm >> nTemp16; + nCount += 12; + } + + if ( bOk ) + { + // Breite lesen + rStm >> nTemp16; + rStm.SeekRel( 4 ); + if ( nTemp16 == 3 ) + { + rStm >> nTemp16; + aPixSize.Width() = nTemp16; + rStm.SeekRel( 2 ); + } + else + { + rStm >> nTemp32; + aPixSize.Width() = nTemp32; + } + nCount += 12; + + // Hoehe lesen + rStm.SeekRel( 2 ); + rStm >> nTemp16; + rStm.SeekRel( 4 ); + if ( nTemp16 == 3 ) + { + rStm >> nTemp16; + aPixSize.Height() = nTemp16; + rStm.SeekRel( 2 ); + } + else + { + rStm >> nTemp32; + aPixSize.Height() = nTemp32; + } + nCount += 12; + + // ggf. Bits/Pixel lesen + rStm >> nTemp16; + if ( nTemp16 == 258 ) + { + rStm.SeekRel( 6 ); + rStm >> nTemp16; + nBitsPerPixel = nTemp16; + rStm.SeekRel( 2 ); + nCount += 12; + } + else + rStm.SeekRel( -2 ); + + // ggf. Compression lesen + rStm >> nTemp16; + if ( nTemp16 == 259 ) + { + rStm.SeekRel( 6 ); + rStm >> nTemp16; + bCompressed = ( nTemp16 > 1 ); + rStm.SeekRel( 2 ); + nCount += 12; + } + else + rStm.SeekRel( -2 ); + } + } + } + } + } + } + rStm.Seek( nStmPos ); + return bRet; +} + + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectXBM( SvStream&, BOOL ) +{ + BOOL bRet = aPathExt.CompareToAscii( "xbm", 3 ) == COMPARE_EQUAL; + if (bRet) + nFormat = GFF_XBM; + + return bRet; +} + + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectXPM( SvStream&, BOOL ) +{ + BOOL bRet = aPathExt.CompareToAscii( "xpm", 3 ) == COMPARE_EQUAL; + if (bRet) + nFormat = GFF_XPM; + + return bRet; +} + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectPBM( SvStream& rStm, BOOL ) +{ + BOOL bRet = FALSE; + + // erst auf Datei Extension pruefen, da diese aussagekraeftiger ist + // als die 2 ID Bytes + + if ( aPathExt.CompareToAscii( "pbm", 3 ) == COMPARE_EQUAL ) + bRet = TRUE; + else + { + sal_Int32 nStmPos = rStm.Tell(); + BYTE nFirst, nSecond; + rStm >> nFirst >> nSecond; + if ( nFirst == 'P' && ( ( nSecond == '1' ) || ( nSecond == '4' ) ) ) + bRet = TRUE; + rStm.Seek( nStmPos ); + } + + if ( bRet ) + nFormat = GFF_PBM; + + return bRet; +} + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectPGM( SvStream& rStm, BOOL ) +{ + BOOL bRet = FALSE; + + if ( aPathExt.CompareToAscii( "pgm", 3 ) == COMPARE_EQUAL ) + bRet = TRUE; + else + { + BYTE nFirst, nSecond; + sal_Int32 nStmPos = rStm.Tell(); + rStm >> nFirst >> nSecond; + if ( nFirst == 'P' && ( ( nSecond == '2' ) || ( nSecond == '5' ) ) ) + bRet = TRUE; + rStm.Seek( nStmPos ); + } + + if ( bRet ) + nFormat = GFF_PGM; + + return bRet; +} + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectPPM( SvStream& rStm, BOOL ) +{ + BOOL bRet = FALSE; + + if ( aPathExt.CompareToAscii( "ppm", 3 ) == COMPARE_EQUAL ) + bRet = TRUE; + else + { + BYTE nFirst, nSecond; + sal_Int32 nStmPos = rStm.Tell(); + rStm >> nFirst >> nSecond; + if ( nFirst == 'P' && ( ( nSecond == '3' ) || ( nSecond == '6' ) ) ) + bRet = TRUE; + rStm.Seek( nStmPos ); + } + + if ( bRet ) + nFormat = GFF_PPM; + + return bRet; +} + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectRAS( SvStream& rStm, BOOL ) +{ + UINT32 nMagicNumber; + BOOL bRet = FALSE; + sal_Int32 nStmPos = rStm.Tell(); + rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + rStm >> nMagicNumber; + if ( nMagicNumber == 0x59a66a95 ) + { + nFormat = GFF_RAS; + bRet = TRUE; + } + rStm.Seek( nStmPos ); + return bRet; +} + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectTGA( SvStream&, BOOL ) +{ + BOOL bRet = aPathExt.CompareToAscii( "tga", 3 ) == COMPARE_EQUAL; + if (bRet) + nFormat = GFF_TGA; + + return bRet; +} + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectPSD( SvStream& rStm, BOOL bExtendedInfo ) +{ + BOOL bRet = FALSE; + + UINT32 nMagicNumber; + sal_Int32 nStmPos = rStm.Tell(); + rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + rStm >> nMagicNumber; + if ( nMagicNumber == 0x38425053 ) + { + UINT16 nVersion; + rStm >> nVersion; + if ( nVersion == 1 ) + { + bRet = TRUE; + if ( bExtendedInfo ) + { + UINT16 nChannels; + UINT32 nRows; + UINT32 nColumns; + UINT16 nDepth; + UINT16 nMode; + rStm.SeekRel( 6 ); // Pad + rStm >> nChannels >> nRows >> nColumns >> nDepth >> nMode; + if ( ( nDepth == 1 ) || ( nDepth == 8 ) || ( nDepth == 16 ) ) + { + nBitsPerPixel = ( nDepth == 16 ) ? 8 : nDepth; + switch ( nChannels ) + { + case 4 : + case 3 : + nBitsPerPixel = 24; + case 2 : + case 1 : + aPixSize.Width() = nColumns; + aPixSize.Height() = nRows; + break; + default: + bRet = FALSE; + } + } + else + bRet = FALSE; + } + } + } + + if ( bRet ) + nFormat = GFF_PSD; + rStm.Seek( nStmPos ); + return bRet; +} + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectEPS( SvStream& rStm, BOOL ) +{ + // es wird die EPS mit Vorschaubild Variante und die Extensionuebereinstimmung + // geprueft + + sal_uInt32 nFirstLong; + sal_uInt8 nFirstBytes[20]; + BOOL bRet = FALSE; + + sal_Int32 nStmPos = rStm.Tell(); + rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + rStm >> nFirstLong; + rStm.SeekRel( -4 ); + rStm.Read( &nFirstBytes, 20 ); + + if ( ( nFirstLong == 0xC5D0D3C6 ) || ( aPathExt.CompareToAscii( "eps", 3 ) == COMPARE_EQUAL ) || + ( ImplSearchEntry( nFirstBytes, (sal_uInt8*)"%!PS-Adobe", 10, 10 ) + && ImplSearchEntry( &nFirstBytes[15], (sal_uInt8*)"EPS", 3, 3 ) ) ) + { + nFormat = GFF_EPS; + bRet = TRUE; + } + rStm.Seek( nStmPos ); + return bRet; +} + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectDXF( SvStream&, BOOL ) +{ + BOOL bRet = aPathExt.CompareToAscii( "dxf", 3 ) == COMPARE_EQUAL; + if (bRet) + nFormat = GFF_DXF; + + return bRet; +} + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectMET( SvStream&, BOOL ) +{ + BOOL bRet = aPathExt.CompareToAscii( "met", 3 ) == COMPARE_EQUAL; + if (bRet) + nFormat = GFF_MET; + + return bRet; +} + + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectPCT( SvStream& rStm, BOOL ) +{ + BOOL bRet = aPathExt.CompareToAscii( "pct", 3 ) == COMPARE_EQUAL; + if (bRet) + nFormat = GFF_PCT; + else + { + sal_Int32 nStmPos = rStm.Tell(); + + BYTE sBuf[4]; + + rStm.SeekRel( 522 ); + rStm.Read( sBuf, 3 ); + + if( !rStm.GetError() ) + { + if ( ( sBuf[0] == 0x00 ) && ( sBuf[1] == 0x11 ) && + ( ( sBuf[2] == 0x01 ) || ( sBuf[2] == 0x02 ) ) ) + { + bRet = TRUE; + nFormat = GFF_PCT; + } + } + rStm.Seek( nStmPos ); + } + + return bRet; +} + + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectSGF( SvStream& rStm, BOOL ) +{ + BOOL bRet = FALSE; + if( aPathExt.CompareToAscii( "sgf", 3 ) == COMPARE_EQUAL ) + bRet = TRUE; + else + { + sal_Int32 nStmPos = rStm.Tell(); + + BYTE nFirst, nSecond; + + rStm >> nFirst >> nSecond; + + if( nFirst == 'J' && nSecond == 'J' ) + bRet = TRUE; + + rStm.Seek( nStmPos ); + } + + if( bRet ) + nFormat = GFF_SGF; + + return bRet; +} + + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectSGV( SvStream&, BOOL ) +{ + BOOL bRet = aPathExt.CompareToAscii( "sgv", 3 ) == COMPARE_EQUAL; + if (bRet) + nFormat = GFF_SGV; + + return bRet; +} + + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectSVM( SvStream& rStm, BOOL bExtendedInfo ) +{ + UINT32 n32; + BOOL bRet = FALSE; + BYTE cByte; + + sal_Int32 nStmPos = rStm.Tell(); + rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + rStm >> n32; + if ( n32 == 0x44475653 ) + { + rStm >> cByte; + if ( cByte == 0x49 ) + { + nFormat = GFF_SVM; + bRet = TRUE; + + if ( bExtendedInfo ) + { + UINT32 nTemp32; + UINT16 nTemp16; + + rStm.SeekRel( 0x04 ); + + // Breite auslesen + rStm >> nTemp32; + aLogSize.Width() = nTemp32; + + // Hoehe auslesen + rStm >> nTemp32; + aLogSize.Height() = nTemp32; + + // Map-Unit auslesen und PrefSize ermitteln + rStm >> nTemp16; + aLogSize = OutputDevice::LogicToLogic( aLogSize, + MapMode( (MapUnit) nTemp16 ), + MapMode( MAP_100TH_MM ) ); + } + } + } + else + { + rStm.SeekRel( -4L ); + rStm >> n32; + + if( n32 == 0x4D4C4356 ) + { + UINT16 nTmp16; + + rStm >> nTmp16; + + if( nTmp16 == 0x4654 ) + { + nFormat = GFF_SVM; + bRet = TRUE; + + if( bExtendedInfo ) + { + MapMode aMapMode; + + rStm.SeekRel( 0x06 ); + rStm >> aMapMode; + rStm >> aLogSize; + aLogSize = OutputDevice::LogicToLogic( aLogSize, aMapMode, MapMode( MAP_100TH_MM ) ); + } + } + } + } + rStm.Seek( nStmPos ); + return bRet; +} + + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectWMF( SvStream&, BOOL ) +{ + BOOL bRet = aPathExt.CompareToAscii( "wmf",3 ) == COMPARE_EQUAL; + if (bRet) + nFormat = GFF_WMF; + + return bRet; +} + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectEMF( SvStream&, BOOL ) +{ + BOOL bRet = aPathExt.CompareToAscii( "emf", 3 ) == COMPARE_EQUAL; + if (bRet) + nFormat = GFF_EMF; + + return bRet; +} + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +BOOL GraphicDescriptor::ImpDetectSVG( SvStream& rStm, BOOL bExtendedInfo ) +{ + BOOL bRet = aPathExt.CompareToAscii( "svg", 3 ) == COMPARE_EQUAL; + if (bRet) + nFormat = GFF_SVG; + + return bRet; +} + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +String GraphicDescriptor::GetImportFormatShortName( sal_uInt16 nFormat ) +{ + ByteString aKeyName; + + switch( nFormat ) + { + case( GFF_BMP ) : aKeyName = "bmp"; break; + case( GFF_GIF ) : aKeyName = "gif"; break; + case( GFF_JPG ) : aKeyName = "jpg"; break; + case( GFF_PCD ) : aKeyName = "pcd"; break; + case( GFF_PCX ) : aKeyName = "pcx"; break; + case( GFF_PNG ) : aKeyName = "png"; break; + case( GFF_XBM ) : aKeyName = "xbm"; break; + case( GFF_XPM ) : aKeyName = "xpm"; break; + case( GFF_PBM ) : aKeyName = "pbm"; break; + case( GFF_PGM ) : aKeyName = "pgm"; break; + case( GFF_PPM ) : aKeyName = "ppm"; break; + case( GFF_RAS ) : aKeyName = "ras"; break; + case( GFF_TGA ) : aKeyName = "tga"; break; + case( GFF_PSD ) : aKeyName = "psd"; break; + case( GFF_EPS ) : aKeyName = "eps"; break; + case( GFF_TIF ) : aKeyName = "tif"; break; + case( GFF_DXF ) : aKeyName = "dxf"; break; + case( GFF_MET ) : aKeyName = "met"; break; + case( GFF_PCT ) : aKeyName = "pct"; break; + case( GFF_SGF ) : aKeyName = "sgf"; break; + case( GFF_SGV ) : aKeyName = "sgv"; break; + case( GFF_SVM ) : aKeyName = "svm"; break; + case( GFF_WMF ) : aKeyName = "wmf"; break; + case( GFF_EMF ) : aKeyName = "emf"; break; + case( GFF_SVG ) : aKeyName = "svg"; break; + } + + return String( aKeyName, RTL_TEXTENCODING_ASCII_US ); +} diff --git a/svtools/source/filter/igif/decode.cxx b/svtools/source/filter/igif/decode.cxx new file mode 100644 index 000000000000..bfe77319b81a --- /dev/null +++ b/svtools/source/filter/igif/decode.cxx @@ -0,0 +1,215 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#include "decode.hxx" + +// ------------------------------------------------------------------------ + +struct GIFLZWTableEntry +{ + GIFLZWTableEntry* pPrev; + GIFLZWTableEntry* pFirst; + BYTE nData; +}; + +// ------------------------------------------------------------------------ + +GIFLZWDecompressor::GIFLZWDecompressor( BYTE cDataSize ) : + nInputBitsBuf ( 0 ), + nOutBufDataLen ( 0 ), + nInputBitsBufSize ( 0 ), + bEOIFound ( FALSE ), + nDataSize ( cDataSize ) +{ + pOutBuf = new BYTE[ 4096 ]; + + nClearCode = 1 << nDataSize; + nEOICode = nClearCode + 1; + nTableSize = nEOICode + 1; + nCodeSize = nDataSize + 1; + nOldCode = 0xffff; + pOutBufData = pOutBuf + 4096; + + pTable = new GIFLZWTableEntry[ 4098 ]; + + for( USHORT i = 0; i < nTableSize; i++ ) + { + pTable[i].pPrev = NULL; + pTable[i].pFirst = pTable + i; + pTable[i].nData = (BYTE) i; + } +} + +// ------------------------------------------------------------------------ + +GIFLZWDecompressor::~GIFLZWDecompressor() +{ + delete[] pOutBuf; + delete[] pTable; +} + +// ------------------------------------------------------------------------ + +HPBYTE GIFLZWDecompressor::DecompressBlock( HPBYTE pSrc, BYTE cBufSize, + ULONG& rCount, BOOL& rEOI ) +{ + ULONG nTargetSize = 4096; + ULONG nCount = 0; + HPBYTE pTarget = (HPBYTE) rtl_allocateMemory( nTargetSize ); + HPBYTE pTmpTarget = pTarget; + + nBlockBufSize = cBufSize; + nBlockBufPos = 0; + pBlockBuf = pSrc; + + while( ProcessOneCode() ) + { + nCount += nOutBufDataLen; + + if( nCount > nTargetSize ) + { + ULONG nNewSize = nTargetSize << 1; + ULONG nOffset = pTmpTarget - pTarget; + HPBYTE pTmp = (HPBYTE) rtl_allocateMemory( nNewSize ); + + memcpy( pTmp, pTarget, nTargetSize ); + rtl_freeMemory( pTarget ); + + nTargetSize = nNewSize; + pTmpTarget = ( pTarget = pTmp ) + nOffset; + } + + memcpy( pTmpTarget, pOutBufData, nOutBufDataLen ); + pTmpTarget += nOutBufDataLen; + pOutBufData += nOutBufDataLen; + nOutBufDataLen = 0; + + if ( bEOIFound ) + break; + } + + rCount = nCount; + rEOI = bEOIFound; + + return pTarget; +} + +// ------------------------------------------------------------------------ + +void GIFLZWDecompressor::AddToTable( USHORT nPrevCode, USHORT nCodeFirstData ) +{ + GIFLZWTableEntry* pE; + + if( nTableSize < 4096 ) + { + pE = pTable + nTableSize; + pE->pPrev = pTable + nPrevCode; + pE->pFirst = pE->pPrev->pFirst; + pE->nData = pTable[ nCodeFirstData ].pFirst->nData; + nTableSize++; + + if ( ( nTableSize == (USHORT) (1 << nCodeSize) ) && ( nTableSize < 4096 ) ) + nCodeSize++; + } +} + +// ------------------------------------------------------------------------ + +BOOL GIFLZWDecompressor::ProcessOneCode() +{ + GIFLZWTableEntry* pE; + USHORT nCode; + BOOL bRet = FALSE; + BOOL bEndOfBlock = FALSE; + + while( nInputBitsBufSize < nCodeSize ) + { + if( nBlockBufPos >= nBlockBufSize ) + { + bEndOfBlock = TRUE; + break; + } + + nInputBitsBuf |= ( (ULONG) pBlockBuf[ nBlockBufPos++ ] ) << nInputBitsBufSize; + nInputBitsBufSize += 8; + } + + if ( !bEndOfBlock ) + { + // Einen Code aus dem Eingabe-Buffer holen: + nCode = sal::static_int_cast< USHORT >( + ( (USHORT) nInputBitsBuf ) & ( ~( 0xffff << nCodeSize ) )); + nInputBitsBuf >>= nCodeSize; + nInputBitsBufSize = nInputBitsBufSize - nCodeSize; + + if ( nCode < nClearCode ) + { + if ( nOldCode != 0xffff ) + AddToTable( nOldCode, nCode ); + } + else if ( ( nCode > nEOICode ) && ( nCode <= nTableSize ) ) + { + if ( nCode == nTableSize ) + AddToTable( nOldCode, nOldCode ); + else + AddToTable( nOldCode, nCode ); + } + else + { + if ( nCode == nClearCode ) + { + nTableSize = nEOICode + 1; + nCodeSize = nDataSize + 1; + nOldCode = 0xffff; + nOutBufDataLen = 0; + } + else + bEOIFound = TRUE; + + return TRUE; + } + + nOldCode = nCode; + + // Zeichen(/-folge) des Codes nCode in den Ausgabe-Buffer schreiben: + pE = pTable + nCode; + do + { + nOutBufDataLen++; + *(--pOutBufData) = pE->nData; + pE = pE->pPrev; + } + while( pE ); + + bRet = TRUE; + } + + return bRet; +} diff --git a/svtools/source/filter/igif/decode.hxx b/svtools/source/filter/igif/decode.hxx new file mode 100644 index 000000000000..3c6a61e7508d --- /dev/null +++ b/svtools/source/filter/igif/decode.hxx @@ -0,0 +1,68 @@ +/************************************************************************* + * + * 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 _DECODE_HXX +#define _DECODE_HXX + +#ifndef _BMPACC_HXX +#include +#endif + +struct GIFLZWTableEntry; + +class GIFLZWDecompressor +{ + GIFLZWTableEntry* pTable; + HPBYTE pOutBuf; + HPBYTE pOutBufData; + HPBYTE pBlockBuf; + ULONG nInputBitsBuf; + USHORT nTableSize; + USHORT nClearCode; + USHORT nEOICode; + USHORT nCodeSize; + USHORT nOldCode; + USHORT nOutBufDataLen; + USHORT nInputBitsBufSize; + BOOL bEOIFound; + BYTE nDataSize; + BYTE nBlockBufSize; + BYTE nBlockBufPos; + + void AddToTable(USHORT nPrevCode, USHORT nCodeFirstData); + BOOL ProcessOneCode(); + + +public: + + GIFLZWDecompressor( BYTE cDataSize ); + ~GIFLZWDecompressor(); + + HPBYTE DecompressBlock( HPBYTE pSrc, BYTE cBufSize, ULONG& rCount, BOOL& rEOI ); +}; + +#endif diff --git a/svtools/source/filter/igif/gifread.cxx b/svtools/source/filter/igif/gifread.cxx new file mode 100644 index 000000000000..e4020c727ff4 --- /dev/null +++ b/svtools/source/filter/igif/gifread.cxx @@ -0,0 +1,858 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#define _GIFPRIVATE + +#include "decode.hxx" +#include "gifread.hxx" + +// ----------- +// - Defines - +// ----------- + +#define NO_PENDING( rStm ) ( ( rStm ).GetError() != ERRCODE_IO_PENDING ) + +// ------------- +// - GIFReader - +// ------------- + +GIFReader::GIFReader( SvStream& rStm ) : + aGPalette ( 256 ), + aLPalette ( 256 ), + rIStm ( rStm ), + pAcc8 ( NULL ), + pAcc1 ( NULL ), + nLastPos ( rStm.Tell() ), + nLogWidth100 ( 0UL ), + nLogHeight100 ( 0UL ), + nLoops ( 1 ), + eActAction ( GLOBAL_HEADER_READING ), + bGCTransparent ( FALSE ), + bImGraphicReady ( FALSE ) +{ + maUpperName = UniString::CreateFromAscii( "SVIGIF", 6 ); + pSrcBuf = new BYTE[ 256 ]; + ClearImageExtensions(); +} + +// ------------------------------------------------------------------------ + +GIFReader::~GIFReader() +{ + aImGraphic.SetContext( NULL ); + + if( pAcc1 ) + aBmp1.ReleaseAccess( pAcc1 ); + + if( pAcc8 ) + aBmp8.ReleaseAccess( pAcc8 ); + + delete[] pSrcBuf; +} + +// ------------------------------------------------------------------------ + +void GIFReader::ClearImageExtensions() +{ + nGCDisposalMethod = 0; + bGCTransparent = FALSE; + nTimer = 0; +} + +// ------------------------------------------------------------------------ + +BOOL GIFReader::CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal, + BOOL bWatchForBackgroundColor ) +{ + const Size aSize( nWidth, nHeight ); + + if( bGCTransparent ) + { + const Color aWhite( COL_WHITE ); + + aBmp1 = Bitmap( aSize, 1 ); + + if( !aAnimation.Count() ) + aBmp1.Erase( aWhite ); + + pAcc1 = aBmp1.AcquireWriteAccess(); + + if( pAcc1 ) + { + cTransIndex1 = (BYTE) pAcc1->GetBestPaletteIndex( aWhite ); + cNonTransIndex1 = cTransIndex1 ? 0 : 1; + } + else + bStatus = FALSE; + } + + if( bStatus ) + { + aBmp8 = Bitmap( aSize, 8, pPal ); + + if( !!aBmp8 && bWatchForBackgroundColor && aAnimation.Count() ) + aBmp8.Erase( (*pPal)[ nBackgroundColor ] ); + else + aBmp8.Erase( Color( COL_WHITE ) ); + + pAcc8 = aBmp8.AcquireWriteAccess(); + bStatus = ( pAcc8 != NULL ); + } + + return bStatus; +} + +// ------------------------------------------------------------------------ + +BOOL GIFReader::ReadGlobalHeader() +{ + char pBuf[ 7 ]; + BYTE nRF; + BYTE nAspect; + BOOL bRet = FALSE; + + rIStm.Read( pBuf, 6 ); + if( NO_PENDING( rIStm ) ) + { + pBuf[ 6 ] = 0; + if( !strcmp( pBuf, "GIF87a" ) || !strcmp( pBuf, "GIF89a" ) ) + { + rIStm.Read( pBuf, 7 ); + if( NO_PENDING( rIStm ) ) + { + SvMemoryStream aMemStm; + + aMemStm.SetBuffer( pBuf, 7, FALSE, 7 ); + aMemStm >> nGlobalWidth; + aMemStm >> nGlobalHeight; + aMemStm >> nRF; + aMemStm >> nBackgroundColor; + aMemStm >> nAspect; + + bGlobalPalette = (BOOL) ( nRF & 0x80 ); + + if( bGlobalPalette ) + ReadPaletteEntries( &aGPalette, 1 << ( ( nRF & 7 ) + 1 ) ); + else + nBackgroundColor = 0; + + if( NO_PENDING( rIStm ) ) + bRet = TRUE; + } + } + else + bStatus = FALSE; + } + + return bRet; +} + +// ------------------------------------------------------------------------ + +void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, ULONG nCount ) +{ + const ULONG nLen = 3UL * nCount; + BYTE* pBuf = new BYTE[ nLen ]; + + rIStm.Read( pBuf, nLen ); + if( NO_PENDING( rIStm ) ) + { + BYTE* pTmp = pBuf; + + for( ULONG i = 0UL; i < nCount; ) + { + BitmapColor& rColor = (*pPal)[ (USHORT) i++ ]; + + rColor.SetRed( *pTmp++ ); + rColor.SetGreen( *pTmp++ ); + rColor.SetBlue( *pTmp++ ); + } + + // nach Moeglichkeit noch einige Standardfarben unterbringen + if( nCount < 256UL ) + { + (*pPal)[ 255UL ] = Color( COL_WHITE ); + + if( nCount < 255UL ) + (*pPal)[ 254UL ] = Color( COL_BLACK ); + } + } + + delete[] pBuf; +} + +// ------------------------------------------------------------------------ + +BOOL GIFReader::ReadExtension() +{ + BYTE cFunction; + BYTE cSize; + BYTE cByte; + BOOL bRet = FALSE; + BOOL bOverreadDataBlocks = FALSE; + + // Extension-Label + rIStm >> cFunction; + if( NO_PENDING( rIStm ) ) + { + // Block-Laenge + rIStm >> cSize; + + switch( cFunction ) + { + // 'Graphic Control Extension' + case( 0xf9 ) : + { + BYTE cFlags; + + rIStm >> cFlags; + rIStm >> nTimer; + rIStm >> nGCTransparentIndex; + rIStm >> cByte; + + if ( NO_PENDING( rIStm ) ) + { + nGCDisposalMethod = ( cFlags >> 2) & 7; + bGCTransparent = ( cFlags & 1 ) ? TRUE : FALSE; + bStatus = ( cSize == 4 ) && ( cByte == 0 ); + bRet = TRUE; + } + } + break; + + // Application-Extension + case ( 0xff ) : + { + if ( NO_PENDING( rIStm ) ) + { + // default diese Extension ueberlesen + bOverreadDataBlocks = TRUE; + + // Appl.-Extension hat Laenge 11 + if ( cSize == 0x0b ) + { + ByteString aAppId; + ByteString aAppCode; + + rIStm.Read( aAppId.AllocBuffer( 8 ), 8 ); + rIStm.Read( aAppCode.AllocBuffer( 3 ), 3 ); + rIStm >> cSize; + + // NetScape-Extension + if( aAppId == "NETSCAPE" && aAppCode == "2.0" && cSize == 3 ) + { + rIStm >> cByte; + + // Loop-Extension + if ( cByte == 0x01 ) + { + rIStm >> cByte; + nLoops = cByte; + rIStm >> cByte; + nLoops |= ( (USHORT) cByte << 8 ); + rIStm >> cByte; + + bStatus = ( cByte == 0 ); + bRet = NO_PENDING( rIStm ); + bOverreadDataBlocks = FALSE; + + // Netscape interpretiert den LoopCount + // als reine Anzahl der _Wiederholungen_; + // bei uns ist es die Gesamtanzahl der + // Durchlaeufe + if( nLoops ) + nLoops++; + } + else + rIStm.SeekRel( -1 ); + } + else if ( aAppId == "STARDIV " && aAppCode == "5.0" && cSize == 9 ) + { + rIStm >> cByte; + + // Loop-Extension + if ( cByte == 0x01 ) + { + rIStm >> nLogWidth100 >> nLogHeight100; + rIStm >> cByte; + bStatus = ( cByte == 0 ); + bRet = NO_PENDING( rIStm ); + bOverreadDataBlocks = FALSE; + } + else + rIStm.SeekRel( -1 ); + } + + } + } + } + break; + + // alles andere ueberlesen + default: + bOverreadDataBlocks = TRUE; + break; + } + + // Sub-Blocks ueberlesen + if ( bOverreadDataBlocks ) + { + bRet = TRUE; + while( cSize && bStatus && !rIStm.IsEof() ) + { + USHORT nCount = (USHORT) cSize + 1; + char* pBuffer = new char[ nCount ]; + + bRet = FALSE; + rIStm.Read( pBuffer, nCount ); + if( NO_PENDING( rIStm ) ) + { + cSize = (BYTE) pBuffer[ cSize ]; + bRet = TRUE; + } + else + cSize = 0; + + delete[] pBuffer; + } + } + } + + return bRet; +} + +// ------------------------------------------------------------------------ + +BOOL GIFReader::ReadLocalHeader() +{ + BYTE pBuf[ 9 ]; + BOOL bRet = FALSE; + + rIStm.Read( pBuf, 9 ); + if( NO_PENDING( rIStm ) ) + { + SvMemoryStream aMemStm; + BitmapPalette* pPal; + BYTE nFlags; + + aMemStm.SetBuffer( (char*) pBuf, 9, FALSE, 9 ); + aMemStm >> nImagePosX; + aMemStm >> nImagePosY; + aMemStm >> nImageWidth; + aMemStm >> nImageHeight; + aMemStm >> nFlags; + + // Falls Interlaced, ersten Startwert vorgeben + bInterlaced = ( ( nFlags & 0x40 ) == 0x40 ); + nLastInterCount = 7; + nLastImageY = 0; + + if( nFlags & 0x80 ) + { + pPal = &aLPalette; + ReadPaletteEntries( pPal, 1 << ( (nFlags & 7 ) + 1 ) ); + } + else + pPal = &aGPalette; + + // Falls alles soweit eingelesen werden konnte, kann + // nun das lokale Bild angelegt werden; + // es wird uebergeben, ob der BackgroundColorIndex evtl. + // beruecksichtigt werden soll ( wenn Globale Farbtab. und + // diese auch fuer dieses Bild gilt ) + if( NO_PENDING( rIStm ) ) + { + CreateBitmaps( nImageWidth, nImageHeight, pPal, bGlobalPalette && ( pPal == &aGPalette ) ); + bRet = TRUE; + } + } + + return bRet; +} + +// ------------------------------------------------------------------------ + +ULONG GIFReader::ReadNextBlock() +{ + ULONG nRet = 0UL; + ULONG nRead; + BYTE cBlockSize; + + rIStm >> cBlockSize; + + if ( rIStm.IsEof() ) + nRet = 4UL; + else if ( NO_PENDING( rIStm ) ) + { + if ( cBlockSize == 0 ) + nRet = 2UL; + else + { + rIStm.Read( pSrcBuf, cBlockSize ); + + if( NO_PENDING( rIStm ) ) + { + if( bOverreadBlock ) + nRet = 3UL; + else + { + BOOL bEOI; + HPBYTE pTarget = pDecomp->DecompressBlock( pSrcBuf, cBlockSize, nRead, bEOI ); + + nRet = ( bEOI ? 3 : 1 ); + + if( nRead && !bOverreadBlock ) + FillImages( pTarget, nRead ); + + rtl_freeMemory( pTarget ); + } + } + } + } + + return nRet; +} + +// ------------------------------------------------------------------------ + +void GIFReader::FillImages( HPBYTE pBytes, ULONG nCount ) +{ + for( ULONG i = 0UL; i < nCount; i++ ) + { + if( nImageX >= nImageWidth ) + { + if( bInterlaced ) + { + long nT1, nT2; + + // falls Interlaced, werden die Zeilen kopiert + if( nLastInterCount ) + { + long nMinY = Min( (long) nLastImageY + 1, (long) nImageHeight - 1 ); + long nMaxY = Min( (long) nLastImageY + nLastInterCount, (long) nImageHeight - 1 ); + + // letzte gelesene Zeile kopieren, wenn Zeilen + // nicht zusanmmenfallen ( kommt vorm wenn wir am Ende des Bildes sind ) + if( ( nMinY > nLastImageY ) && ( nLastImageY < ( nImageHeight - 1 ) ) ) + { + HPBYTE pScanline8 = pAcc8->GetScanline( nYAcc ); + ULONG nSize8 = pAcc8->GetScanlineSize(); + HPBYTE pScanline1 = 0; + ULONG nSize1 = 0; + + if( bGCTransparent ) + { + pScanline1 = pAcc1->GetScanline( nYAcc ); + nSize1 = pAcc1->GetScanlineSize(); + } + + for( long j = nMinY; j <= nMaxY; j++ ) + { + memcpy( pAcc8->GetScanline( j ), pScanline8, nSize8 ); + + if( bGCTransparent ) + memcpy( pAcc1->GetScanline( j ), pScanline1, nSize1 ); + } + } + } + + nT1 = ( ++nImageY ) << 3; + nLastInterCount = 7; + + if( nT1 >= nImageHeight ) + { + nT2 = nImageY - ( ( nImageHeight + 7 ) >> 3 ); + nT1 = ( nT2 << 3 ) + 4; + nLastInterCount = 3; + + if( nT1 >= nImageHeight ) + { + nT2 -= ( nImageHeight + 3 ) >> 3; + nT1 = ( nT2 << 2 ) + 2; + nLastInterCount = 1; + + if( nT1 >= nImageHeight ) + { + nT2 -= ( nImageHeight + 1 ) >> 2; + nT1 = ( nT2 << 1 ) + 1; + nLastInterCount = 0; + } + } + } + + nLastImageY = (USHORT) nT1; + nYAcc = nT1; + } + else + { + nLastImageY = ++nImageY; + nYAcc = nImageY; + } + + // Zeile faengt von vorne an + nImageX = 0; + } + + if( nImageY < nImageHeight ) + { + const BYTE cTmp = pBytes[ i ]; + + if( bGCTransparent ) + { + if( cTmp == nGCTransparentIndex ) + pAcc1->SetPixel( nYAcc, nImageX++, cTransIndex1 ); + else + { + pAcc8->SetPixel( nYAcc, nImageX, cTmp ); + pAcc1->SetPixel( nYAcc, nImageX++, cNonTransIndex1 ); + } + } + else + pAcc8->SetPixel( nYAcc, nImageX++, cTmp ); + } + else + { + bOverreadBlock = TRUE; + break; + } + } +} + +// ------------------------------------------------------------------------ + +void GIFReader::CreateNewBitmaps() +{ + AnimationBitmap aAnimBmp; + + aBmp8.ReleaseAccess( pAcc8 ); + pAcc8 = NULL; + + if( bGCTransparent ) + { + aBmp1.ReleaseAccess( pAcc1 ); + pAcc1 = NULL; + aAnimBmp.aBmpEx = BitmapEx( aBmp8, aBmp1 ); + } + else + aAnimBmp.aBmpEx = BitmapEx( aBmp8 ); + + aAnimBmp.aPosPix = Point( nImagePosX, nImagePosY ); + aAnimBmp.aSizePix = Size( nImageWidth, nImageHeight ); + aAnimBmp.nWait = ( nTimer != 65535 ) ? nTimer : ANIMATION_TIMEOUT_ON_CLICK; + aAnimBmp.bUserInput = FALSE; + + if( nGCDisposalMethod == 2 ) + aAnimBmp.eDisposal = DISPOSE_BACK; + else if( nGCDisposalMethod == 3 ) + aAnimBmp.eDisposal = DISPOSE_PREVIOUS; + else + aAnimBmp.eDisposal = DISPOSE_NOT; + + aAnimation.Insert( aAnimBmp ); + + if( aAnimation.Count() == 1 ) + { + aAnimation.SetDisplaySizePixel( Size( nGlobalWidth, nGlobalHeight ) ); + aAnimation.SetLoopCount( nLoops ); + } +} + +// ------------------------------------------------------------------------ + +const Graphic& GIFReader::GetIntermediateGraphic() +{ + // Intermediate-Graphic nur erzeugen, wenn schon + // Daten vorliegen, aber die Graphic noch nicht + // vollstaendig eingelesen wurde + if ( bImGraphicReady && !aAnimation.Count() ) + { + Bitmap aBmp; + + aBmp8.ReleaseAccess( pAcc8 ); + + if ( bGCTransparent ) + { + aBmp1.ReleaseAccess( pAcc1 ); + aImGraphic = BitmapEx( aBmp8, aBmp1 ); + + pAcc1 = aBmp1.AcquireWriteAccess(); + bStatus = bStatus && ( pAcc1 != NULL ); + } + else + aImGraphic = aBmp8; + + pAcc8 = aBmp8.AcquireWriteAccess(); + bStatus = bStatus && ( pAcc8 != NULL ); + } + + return aImGraphic; +} + +// ------------------------------------------------------------------------ + +BOOL GIFReader::ProcessGIF() +{ + BOOL bRead = FALSE; + BOOL bEnd = FALSE; + + if ( !bStatus ) + eActAction = ABORT_READING; + + // Stream an die richtige Stelle bringen + rIStm.Seek( nLastPos ); + + switch( eActAction ) + { + // naechsten Marker lesen + case( MARKER_READING ): + { + BYTE cByte; + + rIStm >> cByte; + + if( rIStm.IsEof() ) + eActAction = END_READING; + else if( NO_PENDING( rIStm ) ) + { + bRead = TRUE; + + if( cByte == '!' ) + eActAction = EXTENSION_READING; + else if( cByte == ',' ) + eActAction = LOCAL_HEADER_READING; + else if( cByte == ';' ) + eActAction = END_READING; + else + eActAction = ABORT_READING; + } + } + break; + + // ScreenDescriptor lesen + case( GLOBAL_HEADER_READING ): + { + if( ( bRead = ReadGlobalHeader() ) == TRUE ) + { + ClearImageExtensions(); + eActAction = MARKER_READING; + } + } + break; + + + // Extension lesen + case( EXTENSION_READING ): + { + if( ( bRead = ReadExtension() ) == TRUE ) + eActAction = MARKER_READING; + } + break; + + + // Image-Descriptor lesen + case( LOCAL_HEADER_READING ): + { + if( ( bRead = ReadLocalHeader() ) == TRUE ) + { + nYAcc = nImageX = nImageY = 0; + eActAction = FIRST_BLOCK_READING; + } + } + break; + + + // ersten Datenblock lesen + case( FIRST_BLOCK_READING ): + { + BYTE cDataSize; + + rIStm >> cDataSize; + + if( rIStm.IsEof() ) + eActAction = ABORT_READING; + else if( cDataSize > 12 ) + bStatus = FALSE; + else if( NO_PENDING( rIStm ) ) + { + bRead = TRUE; + pDecomp = new GIFLZWDecompressor( cDataSize ); + eActAction = NEXT_BLOCK_READING; + bOverreadBlock = FALSE; + } + else + eActAction = FIRST_BLOCK_READING; + } + break; + + // naechsten Datenblock lesen + case( NEXT_BLOCK_READING ): + { + USHORT nLastX = nImageX; + USHORT nLastY = nImageY; + ULONG nRet = ReadNextBlock(); + + // Return: 0:Pending / 1:OK; / 2:OK und letzter Block: / 3:EOI / 4:HardAbort + if( nRet ) + { + bRead = TRUE; + + if ( nRet == 1UL ) + { + bImGraphicReady = TRUE; + eActAction = NEXT_BLOCK_READING; + bOverreadBlock = FALSE; + } + else + { + if( nRet == 2UL ) + { + delete pDecomp; + CreateNewBitmaps(); + eActAction = MARKER_READING; + ClearImageExtensions(); + } + else if( nRet == 3UL ) + { + eActAction = NEXT_BLOCK_READING; + bOverreadBlock = TRUE; + } + else + { + delete pDecomp; + CreateNewBitmaps(); + eActAction = ABORT_READING; + ClearImageExtensions(); + } + } + } + else + { + nImageX = nLastX; + nImageY = nLastY; + } + } + break; + + // ein Fehler trat auf + case( ABORT_READING ): + { + bEnd = TRUE; + eActAction = END_READING; + } + break; + + default: + break; + } + + // Stream an die richtige Stelle bringen, + // falls Daten gelesen werden konnten + // entweder alte Position oder aktuelle Position + if( bRead || bEnd ) + nLastPos = rIStm.Tell(); + + return bRead; +} + +// ------------------------------------------------------------------------ + +ReadState GIFReader::ReadGIF( Graphic& rGraphic ) +{ + ReadState eReadState; + + bStatus = TRUE; + + while( ProcessGIF() && ( eActAction != END_READING ) ) {} + + if( !bStatus ) + eReadState = GIFREAD_ERROR; + else if( eActAction == END_READING ) + eReadState = GIFREAD_OK; + else + { + if ( rIStm.GetError() == ERRCODE_IO_PENDING ) + rIStm.ResetError(); + + eReadState = GIFREAD_NEED_MORE; + } + + if( aAnimation.Count() == 1 ) + { + rGraphic = aAnimation.Get( 0 ).aBmpEx; + + if( nLogWidth100 && nLogHeight100 ) + { + rGraphic.SetPrefSize( Size( nLogWidth100, nLogHeight100 ) ); + rGraphic.SetPrefMapMode( MAP_100TH_MM ); + } + } + else + rGraphic = aAnimation; + + return eReadState; +} + + +// ------------- +// - ImportGIF - +// ------------- + +BOOL ImportGIF( SvStream & rStm, Graphic& rGraphic ) +{ + GIFReader* pGIFReader = (GIFReader*) rGraphic.GetContext(); + USHORT nOldFormat = rStm.GetNumberFormatInt(); + ReadState eReadState; + BOOL bRet = TRUE; + + rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + + if( !pGIFReader ) + pGIFReader = new GIFReader( rStm ); + + rGraphic.SetContext( NULL ); + eReadState = pGIFReader->ReadGIF( rGraphic ); + + if( eReadState == GIFREAD_ERROR ) + { + bRet = FALSE; + delete pGIFReader; + } + else if( eReadState == GIFREAD_OK ) + delete pGIFReader; + else + { + rGraphic = pGIFReader->GetIntermediateGraphic(); + rGraphic.SetContext( pGIFReader ); + } + + rStm.SetNumberFormatInt( nOldFormat ); + + return bRet; +} diff --git a/svtools/source/filter/ixbm/xbmread.cxx b/svtools/source/filter/ixbm/xbmread.cxx new file mode 100644 index 000000000000..9c7faaafa88c --- /dev/null +++ b/svtools/source/filter/ixbm/xbmread.cxx @@ -0,0 +1,398 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#define XBMMINREAD 512 + +#define _XBMPRIVATE +#include +#include "xbmread.hxx" + +// ------------- +// - XBMReader - +// ------------- + +XBMReader::XBMReader( SvStream& rStm ) : + rIStm ( rStm ), + pAcc1 ( NULL ), + nLastPos ( rStm.Tell() ), + nWidth ( 0 ), + nHeight ( 0 ), + bStatus ( TRUE ) +{ + pHexTable = new short[ 256 ]; + maUpperName = String::CreateFromAscii( "SVIXBM", 6 ); + InitTable(); +} + +// ------------------------------------------------------------------------ + +XBMReader::~XBMReader() +{ + delete[] pHexTable; + + if( pAcc1 ) + aBmp1.ReleaseAccess( pAcc1 ); +} + +// ------------------------------------------------------------------------ + +void XBMReader::InitTable() +{ + memset( pHexTable, 0, sizeof( short ) ); + + pHexTable['0'] = 0; + pHexTable['1'] = 1; + pHexTable['2'] = 2; + pHexTable['3'] = 3; + pHexTable['4'] = 4; + pHexTable['5'] = 5; + pHexTable['6'] = 6; + pHexTable['7'] = 7; + pHexTable['8'] = 8; + pHexTable['9'] = 9; + pHexTable['A'] = 10; + pHexTable['B'] = 11; + pHexTable['C'] = 12; + pHexTable['D'] = 13; + pHexTable['E'] = 14; + pHexTable['F'] = 15; + pHexTable['X'] = 0; + pHexTable['a'] = 10; + pHexTable['b'] = 11; + pHexTable['c'] = 12; + pHexTable['d'] = 13; + pHexTable['e'] = 14; + pHexTable['f'] = 15; + pHexTable['x'] = 0; + pHexTable[' '] = -1; + pHexTable[','] = -1; + pHexTable['}'] = -1; + pHexTable['\n'] = -1; + pHexTable['\t'] = -1; + pHexTable['\0'] = -1; +} + +// ------------------------------------------------------------------------ + +ByteString XBMReader::FindTokenLine( SvStream* pInStm, const char* pTok1, + const char* pTok2, const char* pTok3 ) +{ + ByteString aRet; + long nPos1; + long nPos2; + long nPos3; + + bStatus = FALSE; + + do + { + if( !pInStm->ReadLine( aRet ) ) + break; + + if( pTok1 ) + { + if( ( nPos1 = aRet.Search( pTok1 ) ) != STRING_NOTFOUND ) + { + bStatus = TRUE; + + if( pTok2 ) + { + bStatus = FALSE; + + if( ( ( nPos2 = aRet.Search( pTok2 ) ) != STRING_NOTFOUND ) && + ( nPos2 > nPos1 ) ) + { + bStatus = TRUE; + + if( pTok3 ) + { + bStatus = FALSE; + + if( ( ( nPos3 = aRet.Search( pTok3 ) ) != STRING_NOTFOUND ) && ( nPos3 > nPos2 ) ) + bStatus = TRUE; + } + } + } + } + } + } + while( !bStatus ); + + return aRet; +} + +// ------------------------------------------------------------------------ + +long XBMReader::ParseDefine( const sal_Char* pDefine ) +{ + long nRet = 0; + char* pTmp = (char*) pDefine; + unsigned char cTmp; + + // bis zum Ende gehen + pTmp += ( strlen( pDefine ) - 1 ); + cTmp = *pTmp--; + + // letzte Ziffer suchen + while( pHexTable[ cTmp ] == -1 ) + cTmp = *pTmp--; + + // bis vor die Zahl laufen + while( pHexTable[ cTmp ] != -1 ) + cTmp = *pTmp--; + + // auf Anfang der Zahl gehen + pTmp += 2; + + // Hex lesen + if( ( pTmp[0] == '0' ) && ( ( pTmp[1] == 'X' ) || ( pTmp[1] == 'x' ) ) ) + { + pTmp += 2; + cTmp = *pTmp++; + + while ( pHexTable[ cTmp ] != -1 ) + { + nRet = ( nRet << 4 ) + pHexTable[ cTmp ]; + cTmp = *pTmp++; + } + } + // Dezimal lesen + else + { + cTmp = *pTmp++; + while( ( cTmp >= '0' ) && ( cTmp <= '9' ) ) + { + nRet = nRet * 10 + ( cTmp - '0' ); + cTmp = *pTmp++; + } + } + + return nRet; +} + +// ------------------------------------------------------------------------ + +BOOL XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFormat eFormat ) +{ + ByteString aLine; + long nRow = 0; + long nCol = 0; + long nBits = ( eFormat == XBM10 ) ? 16 : 8; + long nBit; + USHORT nValue; + USHORT nDigits; + BOOL bFirstLine = TRUE; + + while( nRow < nHeight ) + { + if( bFirstLine ) + { + xub_StrLen nPos; + + // einfuehrende geschweifte Klammer loeschen + if( (nPos = ( aLine = aLastLine ).Search( '{' ) ) != STRING_NOTFOUND ) + aLine.Erase( 0, nPos + 1 ); + + bFirstLine = FALSE; + } + else if( !pInStm->ReadLine( aLine ) ) + break; + + if( aLine.Len() ) + { + const USHORT nCount = aLine.GetTokenCount( ',' ); + + for( USHORT i = 0; ( i < nCount ) && ( nRow < nHeight ); i++ ) + { + const ByteString aToken( aLine.GetToken( i, ',' ) ); + const xub_StrLen nLen = aToken.Len(); + BOOL bProcessed = FALSE; + + nBit = nDigits = nValue = 0; + + for( xub_StrLen n = 0UL; n < nLen; n++ ) + { + const unsigned char cChar = aToken.GetChar( n ); + const short nTable = pHexTable[ cChar ]; + + if( isxdigit( cChar ) || !nTable ) + { + nValue = ( nValue << 4 ) + nTable; + nDigits++; + bProcessed = TRUE; + } + else if( ( nTable < 0 ) && nDigits ) + { + bProcessed = TRUE; + break; + } + } + + if( bProcessed ) + { + while( ( nCol < nWidth ) && ( nBit < nBits ) ) + pAcc1->SetPixel( nRow, nCol++, ( nValue & ( 1 << nBit++ ) ) ? aBlack : aWhite ); + + if( nCol == nWidth ) + nCol = 0, nRow++; + } + } + } + } + + return TRUE; +} + +// ------------------------------------------------------------------------ + +ReadState XBMReader::ReadXBM( Graphic& rGraphic ) +{ + ReadState eReadState; + BYTE cDummy; + + // sehen, ob wir _alles_ lesen koennen + rIStm.Seek( STREAM_SEEK_TO_END ); + rIStm >> cDummy; + + // falls wir nicht alles lesen koennen + // kehren wir zurueck und warten auf neue Daten + if ( rIStm.GetError() != ERRCODE_IO_PENDING ) + { + ByteString aLine; + int nValue; + + rIStm.Seek( nLastPos ); + bStatus = FALSE; + aLine = FindTokenLine( &rIStm, "#define", "_width" ); + + if ( bStatus ) + { + if ( ( nValue = (int) ParseDefine( aLine.GetBuffer() ) ) > 0 ) + { + nWidth = nValue; + aLine = FindTokenLine( &rIStm, "#define", "_height" ); + + // Falls die Hoehe nicht folgt, suchen wir noch + // einmal vom Anfang der Datei an + if ( !bStatus ) + { + rIStm.Seek( nLastPos ); + aLine = FindTokenLine( &rIStm, "#define", "_height" ); + } + } + else + bStatus = FALSE; + + if ( bStatus ) + { + if ( ( nValue = (int) ParseDefine( aLine.GetBuffer() ) ) > 0 ) + { + nHeight = nValue; + aLine = FindTokenLine( &rIStm, "static", "_bits" ); + + if ( bStatus ) + { + XBMFormat eFormat = XBM10; + + if ( aLine.Search( "short" ) != STRING_NOTFOUND ) + eFormat = XBM10; + else if ( aLine.Search( "char" ) != STRING_NOTFOUND ) + eFormat = XBM11; + else + bStatus = FALSE; + + if ( bStatus && nWidth && nHeight ) + { + aBmp1 = Bitmap( Size( nWidth, nHeight ), 1 ); + pAcc1 = aBmp1.AcquireWriteAccess(); + + if( pAcc1 ) + { + aWhite = pAcc1->GetBestMatchingColor( Color( COL_WHITE ) ); + aBlack = pAcc1->GetBestMatchingColor( Color( COL_BLACK ) ); + bStatus = ParseData( &rIStm, aLine, eFormat ); + } + else + bStatus = FALSE; + } + } + } + } + } + + if( bStatus ) + { + Bitmap aBlackBmp( Size( pAcc1->Width(), pAcc1->Height() ), 1 ); + + aBmp1.ReleaseAccess( pAcc1 ), pAcc1 = NULL; + aBlackBmp.Erase( Color( COL_BLACK ) ); + rGraphic = BitmapEx( aBlackBmp, aBmp1 ); + eReadState = XBMREAD_OK; + } + else + eReadState = XBMREAD_ERROR; + } + else + { + rIStm.ResetError(); + eReadState = XBMREAD_NEED_MORE; + } + + return eReadState; +} + +// ------------- +// - ImportXBM - +// ------------- + +BOOL ImportXBM( SvStream& rStm, Graphic& rGraphic ) +{ + XBMReader* pXBMReader = (XBMReader*) rGraphic.GetContext(); + ReadState eReadState; + BOOL bRet = TRUE; + + if( !pXBMReader ) + pXBMReader = new XBMReader( rStm ); + + rGraphic.SetContext( NULL ); + eReadState = pXBMReader->ReadXBM( rGraphic ); + + if( eReadState == XBMREAD_ERROR ) + { + bRet = FALSE; + delete pXBMReader; + } + else if( eReadState == XBMREAD_OK ) + delete pXBMReader; + else + rGraphic.SetContext( pXBMReader ); + + return bRet; +} diff --git a/svtools/source/filter/ixpm/rgbtable.hxx b/svtools/source/filter/ixpm/rgbtable.hxx new file mode 100644 index 000000000000..afdab883b369 --- /dev/null +++ b/svtools/source/filter/ixpm/rgbtable.hxx @@ -0,0 +1,695 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ + +struct XPMRGBTab +{ + const char* name; + BYTE red; + BYTE green; + BYTE blue; +}; + +static XPMRGBTab pRGBTable[] = { +{ "white", 255, 255, 255 }, +{ "black", 0, 0, 0 }, +{ "snow", 255, 250, 250 }, +{ "GhostWhite", 248, 248, 255 }, +{ "WhiteSmoke", 245, 245, 245 }, +{ "gainsboro", 220, 220, 220 }, +{ "FloralWhite", 255, 250, 240 }, +{ "OldLace", 253, 245, 230 }, +{ "linen", 250, 240, 230 }, +{ "AntiqueWhite", 250, 235, 215 }, +{ "PapayaWhip", 255, 239, 213 }, +{ "BlanchedAlmond", 255, 235, 205 }, +{ "bisque", 255, 228, 196 }, +{ "PeachPuff", 255, 218, 185 }, +{ "NavajoWhite", 255, 222, 173 }, +{ "moccasin", 255, 228, 181 }, +{ "cornsilk", 255, 248, 220 }, +{ "ivory", 255, 255, 240 }, +{ "LemonChiffon", 255, 250, 205 }, +{ "seashell", 255, 245, 238 }, +{ "honeydew", 240, 255, 240 }, +{ "MintCream", 245, 255, 250 }, +{ "azure", 240, 255, 255 }, +{ "AliceBlue", 240, 248, 255 }, +{ "lavender", 230, 230, 250 }, +{ "LavenderBlush", 255, 240, 245 }, +{ "MistyRose", 255, 228, 225 }, +{ "DarkSlateGray", 47, 79, 79 }, +{ "DarkSlateGrey", 47, 79, 79 }, +{ "DimGray", 105, 105, 105 }, +{ "DimGrey", 105, 105, 105 }, +{ "SlateGray", 112, 128, 144 }, +{ "SlateGrey", 112, 128, 144 }, +{ "LightSlateGray", 119, 136, 153 }, +{ "LightSlateGrey", 119, 136, 153 }, +{ "gray", 190, 190, 190 }, +{ "grey", 190, 190, 190 }, +{ "LightGrey", 211, 211, 211 }, +{ "LightGray", 211, 211, 211 }, +{ "MidnightBlue", 25, 25, 112 }, +{ "navy", 0, 0, 128 }, +{ "NavyBlue", 0, 0, 128 }, +{ "CornflowerBlue", 100, 149, 237 }, +{ "DarkSlateBlue", 72, 61, 139 }, +{ "SlateBlue", 106, 90, 205 }, +{ "MediumSlateBlue", 123, 104, 238 }, +{ "LightSlateBlue", 132, 112, 255 }, +{ "MediumBlue", 0, 0, 205 }, +{ "RoyalBlue", 65, 105, 225 }, +{ "blue", 0, 0, 255 }, +{ "DodgerBlue", 30, 144, 255 }, +{ "DeepSkyBlue", 0, 191, 255 }, +{ "SkyBlue", 135, 206, 235 }, +{ "LightSkyBlue", 135, 206, 250 }, +{ "SteelBlue", 70, 130, 180 }, +{ "LightSteelBlue", 176, 196, 222 }, +{ "LightBlue", 173, 216, 230 }, +{ "PowderBlue", 176, 224, 230 }, +{ "PaleTurquoise", 175, 238, 238 }, +{ "DarkTurquoise", 0, 206, 209 }, +{ "MediumTurquoise", 72, 209, 204 }, +{ "turquoise", 64, 224, 208 }, +{ "cyan", 0, 255, 255 }, +{ "LightCyan", 224, 255, 255 }, +{ "CadetBlue", 95, 158, 160 }, +{ "MediumAquamarine", 102, 205, 170 }, +{ "aquamarine", 127, 255, 212 }, +{ "DarkGreen", 0, 100, 0 }, +{ "DarkOliveGreen", 85, 107, 47 }, +{ "DarkSeaGreen", 143, 188, 143 }, +{ "SeaGreen", 46, 139, 87 }, +{ "MediumSeaGreen", 60, 179, 113 }, +{ "LightSeaGreen", 32, 178, 170 }, +{ "PaleGreen", 152, 251, 152 }, +{ "SpringGreen", 0, 255, 127 }, +{ "LawnGreen", 124, 252, 0 }, +{ "green", 0, 255, 0 }, +{ "chartreuse", 127, 255, 0 }, +{ "MediumSpringGreen", 0, 250, 154 }, +{ "GreenYellow", 173, 255 , 47 }, +{ "LimeGreen", 50, 205, 50 }, +{ "YellowGreen", 154, 205, 50 }, +{ "ForestGreen", 34, 139, 34 }, +{ "OliveDrab", 107, 142, 35 }, +{ "DarkKhaki", 189, 183, 107 }, +{ "khaki", 240, 230, 140 }, +{ "PaleGoldenrod", 238, 232, 170 }, +{ "LightGoldenrodYellow", 250, 250, 210 }, +{ "LightYellow", 255, 255, 224 }, +{ "yellow", 255, 255, 0 }, +{ "gold", 255, 215, 0 }, +{ "LightGoldenrod", 238, 221, 130 }, +{ "goldenrod", 218, 165, 32 }, +{ "DarkGoldenrod", 184, 134, 11 }, +{ "RosyBrown", 188, 143, 143 }, +{ "IndianRed", 205, 92, 92 }, +{ "SaddleBrown", 139, 69, 19 }, +{ "sienna", 160, 82, 45 }, +{ "peru", 205, 133, 63 }, +{ "burlywood", 222, 184, 135 }, +{ "beige", 245, 245, 220 }, +{ "wheat", 245, 222, 179 }, +{ "SandyBrown", 244, 164, 96 }, +{ "tan", 210, 180, 140 }, +{ "chocolate", 210, 105, 30 }, +{ "firebrick", 178, 34, 34 }, +{ "brown", 165, 42, 42 }, +{ "DarkSalmon", 233, 150, 122 }, +{ "salmon", 250, 128, 114 }, +{ "LightSalmon", 255, 160, 122 }, +{ "orange", 255, 165, 0 }, +{ "DarkOrange", 255, 140, 0 }, +{ "coral", 255, 127, 80 }, +{ "LightCoral", 240, 128, 128 }, +{ "tomato", 255, 99, 71 }, +{ "OrangeRed", 255, 69, 0 }, +{ "red", 255, 0, 0 }, +{ "HotPink", 255, 105, 180 }, +{ "DeepPink", 255, 20, 147 }, +{ "pink", 255, 192, 203 }, +{ "LightPink", 255, 182, 193 }, +{ "PaleVioletRed", 219, 112, 147 }, +{ "maroon", 176, 48, 96 }, +{ "MediumVioletRed", 199, 21, 133 }, +{ "VioletRed", 208, 32, 144 }, +{ "magenta", 255, 0, 255 }, +{ "violet", 238, 130, 238 }, +{ "plum", 221, 160, 221 }, +{ "orchid", 218, 112, 214 }, +{ "MediumOrchid", 186, 85, 211 }, +{ "DarkOrchid", 153, 50, 204 }, +{ "DarkViolet", 148, 0, 211 }, +{ "BlueViolet", 138, 43, 226 }, +{ "purple", 160, 32, 240 }, +{ "MediumPurple", 147, 112, 219 }, +{ "thistle", 216, 191, 216 }, +{ "snow1", 255, 250, 250 }, +{ "snow2", 238, 233, 233 }, +{ "snow3", 205, 201, 201 }, +{ "snow4", 139, 137, 137 }, +{ "seashell1", 255, 245, 238 }, +{ "seashell2", 238, 229, 222 }, +{ "seashell3", 205, 197, 191 }, +{ "seashell4", 139, 134, 130 }, +{ "AntiqueWhite1", 255, 239, 219 }, +{ "AntiqueWhite2", 238, 223, 204 }, +{ "AntiqueWhite3", 205, 192, 176 }, +{ "AntiqueWhite4", 139, 131, 120 }, +{ "bisque1", 255, 228, 196 }, +{ "bisque2", 238, 213, 183 }, +{ "bisque3", 205, 183, 158 }, +{ "bisque4", 139, 125, 107 }, +{ "PeachPuff1", 255, 218, 185 }, +{ "PeachPuff2", 238, 203, 173 }, +{ "PeachPuff3", 205, 175, 149 }, +{ "PeachPuff4", 139, 119, 101 }, +{ "NavajoWhite1", 255, 222, 173 }, +{ "NavajoWhite2", 238, 207, 161 }, +{ "NavajoWhite3", 205, 179, 139 }, +{ "NavajoWhite4", 139, 121, 94 }, +{ "LemonChiffon1", 255, 250, 205 }, +{ "LemonChiffon2", 238, 233, 191 }, +{ "LemonChiffon3", 205, 201, 165 }, +{ "LemonChiffon4", 139, 137, 112 }, +{ "cornsilk1", 255, 248, 220 }, +{ "cornsilk2", 238, 232, 205 }, +{ "cornsilk3", 205, 200, 177 }, +{ "cornsilk4", 139, 136, 120 }, +{ "ivory1", 255, 255, 240 }, +{ "ivory2", 238, 238, 224 }, +{ "ivory3", 205, 205, 193 }, +{ "ivory4", 139, 139, 131 }, +{ "honeydew1", 240, 255, 240 }, +{ "honeydew2", 224, 238, 224 }, +{ "honeydew3", 193, 205, 193 }, +{ "honeydew4", 131, 139, 131 }, +{ "LavenderBlush1", 255, 240, 245 }, +{ "LavenderBlush2", 238, 224, 229 }, +{ "LavenderBlush3", 205, 193, 197 }, +{ "LavenderBlush4", 139, 131, 134 }, +{ "MistyRose1", 255, 228, 225 }, +{ "MistyRose2", 238, 213, 210 }, +{ "MistyRose3", 205, 183, 181 }, +{ "MistyRose4", 139, 125, 123 }, +{ "azure1", 240, 255, 255 }, +{ "azure2", 224, 238, 238 }, +{ "azure3", 193, 205, 205 }, +{ "azure4", 131, 139, 139 }, +{ "SlateBlue1", 131, 111, 255 }, +{ "SlateBlue2", 122, 103, 238 }, +{ "SlateBlue3", 105, 89, 205 }, +{ "SlateBlue4", 71, 60, 139 }, +{ "RoyalBlue1", 72, 118, 255 }, +{ "RoyalBlue2", 67, 110, 238 }, +{ "RoyalBlue3", 58, 95, 205 }, +{ "RoyalBlue4", 39, 64, 139 }, +{ "blue1", 0, 0, 255 }, +{ "blue2", 0, 0, 238 }, +{ "blue3", 0, 0, 205 }, +{ "blue4", 0, 0, 139 }, +{ "DodgerBlue1", 30, 144, 255 }, +{ "DodgerBlue2", 28, 134, 238 }, +{ "DodgerBlue3", 24, 116, 205 }, +{ "DodgerBlue4", 16, 78, 139 }, +{ "SteelBlue1", 99, 184, 255 }, +{ "SteelBlue2", 92, 172, 238 }, +{ "SteelBlue3", 79, 148, 205 }, +{ "SteelBlue4", 54, 100, 139 }, +{ "DeepSkyBlue1", 0, 191, 255 }, +{ "DeepSkyBlue2", 0, 178, 238 }, +{ "DeepSkyBlue3", 0, 154, 205 }, +{ "DeepSkyBlue4", 0, 104, 139 }, +{ "SkyBlue1", 135, 206, 255 }, +{ "SkyBlue2", 126, 192, 238 }, +{ "SkyBlue3", 108, 166, 205 }, +{ "SkyBlue4", 74, 112, 139 }, +{ "LightSkyBlue1", 176, 226, 255 }, +{ "LightSkyBlue2", 164, 211, 238 }, +{ "LightSkyBlue3", 141, 182, 205 }, +{ "LightSkyBlue4", 96, 123, 139 }, +{ "SlateGray1", 198, 226, 255 }, +{ "SlateGray2", 185, 211, 238 }, +{ "SlateGray3", 159, 182, 205 }, +{ "SlateGray4", 108, 123, 139 }, +{ "LightSteelBlue1", 202, 225, 255 }, +{ "LightSteelBlue2", 188, 210, 238 }, +{ "LightSteelBlue3", 162, 181, 205 }, +{ "LightSteelBlue4", 110, 123, 139 }, +{ "LightBlue1", 191, 239, 255 }, +{ "LightBlue2", 178, 223, 238 }, +{ "LightBlue3", 154, 192, 205 }, +{ "LightBlue4", 104, 131, 139 }, +{ "LightCyan1", 224, 255, 255 }, +{ "LightCyan2", 209, 238, 238 }, +{ "LightCyan3", 180, 205, 205 }, +{ "LightCyan4", 122, 139, 139 }, +{ "PaleTurquoise1", 187, 255, 255 }, +{ "PaleTurquoise2", 174, 238, 238 }, +{ "PaleTurquoise3", 150, 205, 205 }, +{ "PaleTurquoise4", 102, 139, 139 }, +{ "CadetBlue1", 152, 245, 255 }, +{ "CadetBlue2", 142, 229, 238 }, +{ "CadetBlue3", 122, 197, 205 }, +{ "CadetBlue4", 83, 134, 139 }, +{ "turquoise1", 0, 245, 255 }, +{ "turquoise2", 0, 229, 238 }, +{ "turquoise3", 0, 197, 205 }, +{ "turquoise4", 0, 134, 139 }, +{ "cyan1", 0, 255, 255 }, +{ "cyan2", 0, 238, 238 }, +{ "cyan3", 0, 205, 205 }, +{ "cyan4", 0, 139, 139 }, +{ "DarkSlateGray1", 151, 255, 255 }, +{ "DarkSlateGray2", 141, 238, 238 }, +{ "DarkSlateGray3", 121, 205, 205 }, +{ "DarkSlateGray4", 82, 139, 139 }, +{ "aquamarine1", 127, 255, 212 }, +{ "aquamarine2", 118, 238, 198 }, +{ "aquamarine3", 102, 205, 170 }, +{ "aquamarine4", 69, 139, 116 }, +{ "DarkSeaGreen1", 193, 255, 193 }, +{ "DarkSeaGreen2", 180, 238, 180 }, +{ "DarkSeaGreen3", 155, 205, 155 }, +{ "DarkSeaGreen4", 105, 139, 105 }, +{ "SeaGreen1", 84, 255, 159 }, +{ "SeaGreen2", 78, 238, 148 }, +{ "SeaGreen3", 67, 205, 128 }, +{ "SeaGreen4", 46, 139, 87 }, +{ "PaleGreen1", 154, 255, 154 }, +{ "PaleGreen2", 144, 238, 144 }, +{ "PaleGreen3", 124, 205, 124 }, +{ "PaleGreen4", 84, 139, 84 }, +{ "SpringGreen1", 0, 255, 127 }, +{ "SpringGreen2", 0, 238, 118 }, +{ "SpringGreen3", 0, 205, 102 }, +{ "SpringGreen4", 0, 139, 69 }, +{ "green1", 0, 255, 0 }, +{ "green2", 0, 238, 0 }, +{ "green3", 0, 205, 0 }, +{ "green4", 0, 139, 0 }, +{ "chartreuse1", 127, 255, 0 }, +{ "chartreuse2", 118, 238, 0 }, +{ "chartreuse3", 102, 205, 0 }, +{ "chartreuse4", 69, 139, 0 }, +{ "OliveDrab1", 192, 255, 62 }, +{ "OliveDrab2", 179, 238, 58 }, +{ "OliveDrab3", 154, 205, 50 }, +{ "OliveDrab4", 105, 139, 34 }, +{ "DarkOliveGreen1", 202, 255, 112 }, +{ "DarkOliveGreen2", 188, 238, 104 }, +{ "DarkOliveGreen3", 162, 205, 90 }, +{ "DarkOliveGreen4", 110, 139, 61 }, +{ "khaki1", 255, 246, 143 }, +{ "khaki2", 238, 230, 133 }, +{ "khaki3", 205, 198, 115 }, +{ "khaki4", 139, 134, 78 }, +{ "LightGoldenrod1", 255, 236, 139 }, +{ "LightGoldenrod2", 238, 220, 130 }, +{ "LightGoldenrod3", 205, 190, 112 }, +{ "LightGoldenrod4", 139, 129, 76 }, +{ "LightYellow1", 255, 255, 224 }, +{ "LightYellow2", 238, 238, 209 }, +{ "LightYellow3", 205, 205, 180 }, +{ "LightYellow4", 139, 139, 122 }, +{ "yellow1", 255, 255, 0 }, +{ "yellow2", 238, 238, 0 }, +{ "yellow3", 205, 205, 0 }, +{ "yellow4", 139, 139, 0 }, +{ "gold1", 255, 215, 0 }, +{ "gold2", 238, 201, 0 }, +{ "gold3", 205, 173, 0 }, +{ "gold4", 139, 117, 0 }, +{ "goldenrod1", 255, 193, 37 }, +{ "goldenrod2", 238, 180, 34 }, +{ "goldenrod3", 205, 155, 29 }, +{ "goldenrod4", 139, 105, 20 }, +{ "DarkGoldenrod1", 255, 185, 15 }, +{ "DarkGoldenrod2", 238, 173, 14 }, +{ "DarkGoldenrod3", 205, 149, 12 }, +{ "DarkGoldenrod4", 139, 101, 8 }, +{ "RosyBrown1", 255, 193, 193 }, +{ "RosyBrown2", 238, 180, 180 }, +{ "RosyBrown3", 205, 155, 155 }, +{ "RosyBrown4", 139, 105, 105 }, +{ "IndianRed1", 255, 106, 106 }, +{ "IndianRed2", 238, 99, 99 }, +{ "IndianRed3", 205, 85, 85 }, +{ "IndianRed4", 139, 58, 58 }, +{ "sienna1", 255, 130, 71 }, +{ "sienna2", 238, 121, 66 }, +{ "sienna3", 205, 104, 57 }, +{ "sienna4", 139, 71, 38 }, +{ "burlywood1", 255, 211, 155 }, +{ "burlywood2", 238, 197, 145 }, +{ "burlywood3", 205, 170, 125 }, +{ "burlywood4", 139, 115, 85 }, +{ "wheat1", 255, 231, 186 }, +{ "wheat2", 238, 216, 174 }, +{ "wheat3", 205, 186, 150 }, +{ "wheat4", 139, 126, 102 }, +{ "tan1", 255, 165, 79 }, +{ "tan2", 238, 154, 73 }, +{ "tan3", 205, 133, 63 }, +{ "tan4", 139 , 90, 43 }, +{ "chocolate1", 255, 127, 36 }, +{ "chocolate2", 238, 118, 33 }, +{ "chocolate3", 205, 102, 29 }, +{ "chocolate4", 139, 69, 19 }, +{ "firebrick1", 255, 48, 48 }, +{ "firebrick2", 238, 44, 44 }, +{ "firebrick3", 205, 38, 38 }, +{ "firebrick4", 139, 26, 26 }, +{ "brown1", 255, 64, 64 }, +{ "brown2", 238, 59, 59 }, +{ "brown3", 205, 51, 51 }, +{ "brown4", 139, 35, 35 }, +{ "salmon1", 255, 140, 105 }, +{ "salmon2", 238, 130, 98 }, +{ "salmon3", 205, 112, 84 }, +{ "salmon4", 139, 76, 57 }, +{ "LightSalmon1", 255, 160, 122 }, +{ "LightSalmon2", 238, 149, 114 }, +{ "LightSalmon3", 205, 129, 98 }, +{ "LightSalmon4", 139, 87, 66 }, +{ "orange1", 255, 165, 0 }, +{ "orange2", 238, 154, 0 }, +{ "orange3", 205, 133, 0 }, +{ "orange4", 139 , 90, 0 }, +{ "DarkOrange1", 255, 127, 0 }, +{ "DarkOrange2", 238, 118, 0 }, +{ "DarkOrange3", 205, 102, 0 }, +{ "DarkOrange4", 139 , 69, 0 }, +{ "coral1", 255, 114, 86 }, +{ "coral2", 238, 106, 80 }, +{ "coral3", 205, 91, 69 }, +{ "coral4", 139, 62, 47 }, +{ "tomato1", 255, 99, 71 }, +{ "tomato2", 238, 92, 66 }, +{ "tomato3", 205, 79, 57 }, +{ "tomato4", 139, 54, 38 }, +{ "OrangeRed1", 255, 69, 0 }, +{ "OrangeRed2", 238, 64, 0 }, +{ "OrangeRed3", 205, 55, 0 }, +{ "OrangeRed4", 139, 37, 0 }, +{ "red1", 255, 0, 0 }, +{ "red2", 238, 0, 0 }, +{ "red3", 205, 0, 0 }, +{ "red4", 139, 0, 0 }, +{ "DeepPink1", 255, 20, 147 }, +{ "DeepPink2", 238, 18, 137 }, +{ "DeepPink3", 205, 16, 118 }, +{ "DeepPink4", 139, 10, 80 }, +{ "HotPink1", 255, 110, 180 }, +{ "HotPink2", 238, 106, 167 }, +{ "HotPink3", 205, 96, 144 }, +{ "HotPink4", 139, 58, 98 }, +{ "pink1", 255, 181, 197 }, +{ "pink2", 238, 169, 184 }, +{ "pink3", 205, 145, 158 }, +{ "pink4", 139, 99, 108 }, +{ "LightPink1", 255, 174, 185 }, +{ "LightPink2", 238, 162, 173 }, +{ "LightPink3", 205, 140, 149 }, +{ "LightPink4", 139, 95, 101 }, +{ "PaleVioletRed1", 255, 130, 171 }, +{ "PaleVioletRed2", 238, 121, 159 }, +{ "PaleVioletRed3", 205, 104, 137 }, +{ "PaleVioletRed4", 139, 71, 93 }, +{ "maroon1", 255, 52, 179 }, +{ "maroon2", 238, 48, 167 }, +{ "maroon3", 205, 41, 144 }, +{ "maroon4", 139, 28, 98 }, +{ "VioletRed1", 255, 62, 150 }, +{ "VioletRed2", 238, 58, 140 }, +{ "VioletRed3", 205, 50, 120 }, +{ "VioletRed4", 139, 34, 82 }, +{ "magenta1", 255, 0, 255 }, +{ "magenta2", 238, 0, 238 }, +{ "magenta3", 205, 0, 205 }, +{ "magenta4", 139, 0, 139 }, +{ "orchid1", 255, 131, 250 }, +{ "orchid2", 238, 122, 233 }, +{ "orchid3", 205, 105, 201 }, +{ "orchid4", 139, 71, 137 }, +{ "plum1", 255, 187, 255 }, +{ "plum2", 238, 174, 238 }, +{ "plum3", 205, 150, 205 }, +{ "plum4", 139, 102, 139 }, +{ "MediumOrchid1", 224, 102, 255 }, +{ "MediumOrchid2", 209, 95, 238 }, +{ "MediumOrchid3", 180, 82, 205 }, +{ "MediumOrchid4", 122, 55, 139 }, +{ "DarkOrchid1", 191, 62, 255 }, +{ "DarkOrchid2", 178, 58, 238 }, +{ "DarkOrchid3", 154, 50, 205 }, +{ "DarkOrchid4", 104, 34, 139 }, +{ "purple1", 155, 48, 255 }, +{ "purple2", 145, 44, 238 }, +{ "purple3", 125, 38, 205 }, +{ "purple4", 85, 26, 139 }, +{ "MediumPurple1", 171, 130, 255 }, +{ "MediumPurple2", 159, 121, 238 }, +{ "MediumPurple3", 137, 104, 205 }, +{ "MediumPurple4", 93, 71, 139 }, +{ "thistle1", 255, 225, 255 }, +{ "thistle2", 238, 210, 238 }, +{ "thistle3", 205, 181, 205 }, +{ "thistle4", 139, 123, 139 }, +{ "gray0", 0, 0, 0 }, +{ "grey0", 0, 0, 0 }, +{ "gray1", 3, 3, 3 }, +{ "grey1", 3, 3, 3 }, +{ "gray2", 5, 5, 5 }, +{ "grey2", 5, 5, 5 }, +{ "gray3", 8, 8, 8 }, +{ "grey3", 8, 8, 8 }, +{ "gray4", 10, 10, 10 }, +{ "grey4", 10, 10, 10 }, +{ "gray5", 13, 13, 13 }, +{ "grey5", 13, 13, 13 }, +{ "gray6", 15, 15, 15 }, +{ "grey6", 15, 15, 15 }, +{ "gray7", 18, 18, 18 }, +{ "grey7", 18, 18, 18 }, +{ "gray8", 20, 20, 20 }, +{ "grey8", 20, 20, 20 }, +{ "gray9", 23, 23, 23 }, +{ "grey9", 23, 23, 23 }, +{ "gray10", 26, 26, 26 }, +{ "grey10", 26, 26, 26 }, +{ "gray11", 28, 28, 28 }, +{ "grey11", 28, 28, 28 }, +{ "gray12", 31, 31, 31 }, +{ "grey12", 31, 31, 31 }, +{ "gray13", 33, 33, 33 }, +{ "grey13", 33, 33, 33 }, +{ "gray14", 36, 36, 36 }, +{ "grey14", 36, 36, 36 }, +{ "gray15", 38, 38, 38 }, +{ "grey15", 38, 38, 38 }, +{ "gray16", 41, 41, 41 }, +{ "grey16", 41, 41, 41 }, +{ "gray17", 43, 43, 43 }, +{ "grey17", 43, 43, 43 }, +{ "gray18", 46, 46, 46 }, +{ "grey18", 46, 46, 46 }, +{ "gray19", 48, 48, 48 }, +{ "grey19", 48, 48, 48 }, +{ "gray20", 51, 51, 51 }, +{ "grey20", 51, 51, 51 }, +{ "gray21", 54, 54, 54 }, +{ "grey21", 54, 54, 54 }, +{ "gray22", 56, 56, 56 }, +{ "grey22", 56, 56, 56 }, +{ "gray23", 59, 59, 59 }, +{ "grey23", 59, 59, 59 }, +{ "gray24", 61, 61, 61 }, +{ "grey24", 61, 61, 61 }, +{ "gray25", 64, 64, 64 }, +{ "grey25", 64, 64, 64 }, +{ "gray26", 66, 66, 66 }, +{ "grey26", 66, 66, 66 }, +{ "gray27", 69, 69, 69 }, +{ "grey27", 69, 69, 69 }, +{ "gray28", 71, 71, 71 }, +{ "grey28", 71, 71, 71 }, +{ "gray29", 74, 74, 74 }, +{ "grey29", 74, 74, 74 }, +{ "gray30", 77, 77, 77 }, +{ "grey30", 77, 77, 77 }, +{ "gray31", 79, 79, 79 }, +{ "grey31", 79, 79, 79 }, +{ "gray32", 82, 82, 82 }, +{ "grey32", 82, 82, 82 }, +{ "gray33", 84, 84, 84 }, +{ "grey33", 84, 84, 84 }, +{ "gray34", 87, 87, 87 }, +{ "grey34", 87, 87, 87 }, +{ "gray35", 89, 89, 89 }, +{ "grey35", 89, 89, 89 }, +{ "gray36", 92, 92, 92 }, +{ "grey36", 92, 92, 92 }, +{ "gray37", 94, 94, 94 }, +{ "grey37", 94, 94, 94 }, +{ "gray38", 97, 97, 97 }, +{ "grey38", 97, 97, 97 }, +{ "gray39", 99, 99, 99 }, +{ "grey39", 99, 99, 99 }, +{ "gray40", 102, 102, 102 }, +{ "grey40", 102, 102, 102 }, +{ "gray41", 105, 105, 105 }, +{ "grey41", 105, 105, 105 }, +{ "gray42", 107, 107, 107 }, +{ "grey42", 107, 107, 107 }, +{ "gray43", 110, 110, 110 }, +{ "grey43", 110, 110, 110 }, +{ "gray44", 112, 112, 112 }, +{ "grey44", 112, 112, 112 }, +{ "gray45", 115, 115, 115 }, +{ "grey45", 115, 115, 115 }, +{ "gray46", 117, 117, 117 }, +{ "grey46", 117, 117, 117 }, +{ "gray47", 120, 120, 120 }, +{ "grey47", 120, 120, 120 }, +{ "gray48", 122, 122, 122 }, +{ "grey48", 122, 122, 122 }, +{ "gray49", 125, 125, 125 }, +{ "grey49", 125, 125, 125 }, +{ "gray50", 127, 127, 127 }, +{ "grey50", 127, 127, 127 }, +{ "gray51", 130, 130, 130 }, +{ "grey51", 130, 130, 130 }, +{ "gray52", 133, 133, 133 }, +{ "grey52", 133, 133, 133 }, +{ "gray53", 135, 135, 135 }, +{ "grey53", 135, 135, 135 }, +{ "gray54", 138, 138, 138 }, +{ "grey54", 138, 138, 138 }, +{ "gray55", 140, 140, 140 }, +{ "grey55", 140, 140, 140 }, +{ "gray56", 143, 143, 143 }, +{ "grey56", 143, 143, 143 }, +{ "gray57", 145, 145, 145 }, +{ "grey57", 145, 145, 145 }, +{ "gray58", 148, 148, 148 }, +{ "grey58", 148, 148, 148 }, +{ "gray59", 150, 150, 150 }, +{ "grey59", 150, 150, 150 }, +{ "gray60", 153, 153, 153 }, +{ "grey60", 153, 153, 153 }, +{ "gray61", 156, 156, 156 }, +{ "grey61", 156, 156, 156 }, +{ "gray62", 158, 158, 158 }, +{ "grey62", 158, 158, 158 }, +{ "gray63", 161, 161, 161 }, +{ "grey63", 161, 161, 161 }, +{ "gray64", 163, 163, 163 }, +{ "grey64", 163, 163, 163 }, +{ "gray65", 166, 166, 166 }, +{ "grey65", 166, 166, 166 }, +{ "gray66", 168, 168, 168 }, +{ "grey66", 168, 168, 168 }, +{ "gray67", 171, 171, 171 }, +{ "grey67", 171, 171, 171 }, +{ "gray68", 173, 173, 173 }, +{ "grey68", 173, 173, 173 }, +{ "gray69", 176, 176, 176 }, +{ "grey69", 176, 176, 176 }, +{ "gray70", 179, 179, 179 }, +{ "grey70", 179, 179, 179 }, +{ "gray71", 181, 181, 181 }, +{ "grey71", 181, 181, 181 }, +{ "gray72", 184, 184, 184 }, +{ "grey72", 184, 184, 184 }, +{ "gray73", 186, 186, 186 }, +{ "grey73", 186, 186, 186 }, +{ "gray74", 189, 189, 189 }, +{ "grey74", 189, 189, 189 }, +{ "gray75", 191, 191, 191 }, +{ "grey75", 191, 191, 191 }, +{ "gray76", 194, 194, 194 }, +{ "grey76", 194, 194, 194 }, +{ "gray77", 196, 196, 196 }, +{ "grey77", 196, 196, 196 }, +{ "gray78", 199, 199, 199 }, +{ "grey78", 199, 199, 199 }, +{ "gray79", 201, 201, 201 }, +{ "grey79", 201, 201, 201 }, +{ "gray80", 204, 204, 204 }, +{ "grey80", 204, 204, 204 }, +{ "gray81", 207, 207, 207 }, +{ "grey81", 207, 207, 207 }, +{ "gray82", 209, 209, 209 }, +{ "grey82", 209, 209, 209 }, +{ "gray83", 212, 212, 212 }, +{ "grey83", 212, 212, 212 }, +{ "gray84", 214, 214, 214 }, +{ "grey84", 214, 214, 214 }, +{ "gray85", 217, 217, 217 }, +{ "grey85", 217, 217, 217 }, +{ "gray86", 219, 219, 219 }, +{ "grey86", 219, 219, 219 }, +{ "gray87", 222, 222, 222 }, +{ "grey87", 222, 222, 222 }, +{ "gray88", 224, 224, 224 }, +{ "grey88", 224, 224, 224 }, +{ "gray89", 227, 227, 227 }, +{ "grey89", 227, 227, 227 }, +{ "gray90", 229, 229, 229 }, +{ "grey90", 229, 229, 229 }, +{ "gray91", 232, 232, 232 }, +{ "grey91", 232, 232, 232 }, +{ "gray92", 235, 235, 235 }, +{ "grey92", 235, 235, 235 }, +{ "gray93", 237, 237, 237 }, +{ "grey93", 237, 237, 237 }, +{ "gray94", 240, 240, 240 }, +{ "grey94", 240, 240, 240 }, +{ "gray95", 242, 242, 242 }, +{ "grey95", 242, 242, 242 }, +{ "gray96", 245, 245, 245 }, +{ "grey96", 245, 245, 245 }, +{ "gray97", 247, 247, 247 }, +{ "grey97", 247, 247, 247 }, +{ "gray98", 250, 250, 250 }, +{ "grey98", 250, 250, 250 }, +{ "gray99", 252, 252, 252 }, +{ "grey99", 252, 252, 252 }, +{ "gray100", 255, 255, 255 }, +{ "grey100", 255, 255, 255 }, +{ "DarkGrey", 169, 169, 169 }, +{ "DarkGray", 169, 169, 169 }, +{ "DarkBlue", 0, 0, 139 }, +{ "DarkCyan", 0, 139, 139 }, +{ "DarkMagenta", 139, 0, 139 }, +{ "DarkRed", 139, 0, 0 }, +{ "LightGreen", 144, 238, 144 }, +{ NULL, 0 , 0, 0} +}; diff --git a/svtools/source/filter/ixpm/xpmread.cxx b/svtools/source/filter/ixpm/xpmread.cxx new file mode 100644 index 000000000000..7575c94e3ed9 --- /dev/null +++ b/svtools/source/filter/ixpm/xpmread.cxx @@ -0,0 +1,702 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#ifndef _BMPACC_HXX +#include +#endif +#ifndef _GRAPH_HXX +#include +#endif +#include "rgbtable.hxx" +#define _XPMPRIVATE +#include "xpmread.hxx" + +// ------------- +// - XPMReader - +// ------------- + +XPMReader::XPMReader( SvStream& rStm ) : + mrIStm ( rStm ), + mpAcc ( NULL ), + mpMaskAcc ( NULL ), + mnLastPos ( rStm.Tell() ), + mnWidth ( 0 ), + mnHeight ( 0 ), + mnColors ( 0 ), + mnCpp ( 0 ), + mbTransparent ( FALSE ), + mbStatus ( TRUE ), + mnStatus ( 0 ), + mnIdentifier ( XPMIDENTIFIER ), + mcThisByte ( 0 ), + mnTempAvail ( 0 ), + mpFastColorTable( NULL ), + mpColMap ( NULL ) +{ + +} + +// ------------------------------------------------------------------------ + +XPMReader::~XPMReader() +{ + if( mpAcc ) + maBmp.ReleaseAccess( mpAcc ); +} + +// ------------------------------------------------------------------------ + +#ifdef _MSC_VER +#pragma optimize ("",off) +#endif + +ReadState XPMReader::ReadXPM( Graphic& rGraphic ) +{ + ReadState eReadState; + BYTE cDummy; + + // sehen, ob wir _alles_ lesen koennen + mrIStm.Seek( STREAM_SEEK_TO_END ); + mrIStm >> cDummy; + + // falls wir nicht alles lesen koennen + // kehren wir zurueck und warten auf neue Daten + if ( mrIStm.GetError() != ERRCODE_IO_PENDING ) + { + mrIStm.Seek( mnLastPos ); + mbStatus = TRUE; + + if ( mbStatus ) + { + mpStringBuf = new BYTE [ XPMSTRINGBUF ]; + mpTempBuf = new BYTE [ XPMTEMPBUFSIZE ]; + + if ( ( mbStatus = ImplGetString() ) == TRUE ) + { + mnIdentifier = XPMVALUES; // Bitmap informationen einholen + mnWidth = ImplGetULONG( 0 ); + mnHeight = ImplGetULONG( 1 ); + mnColors = ImplGetULONG( 2 ); + mnCpp = ImplGetULONG( 3 ); + } + if ( mnColors > ( SAL_MAX_UINT32 / ( 4 + mnCpp ) ) ) + mbStatus = sal_False; + if ( ( mnWidth * mnCpp ) >= XPMSTRINGBUF ) + mbStatus = sal_False; + if ( mbStatus && mnWidth && mnHeight && mnColors && mnCpp ) + { + mnIdentifier = XPMCOLORS; + + // mpColMap beinhaltet fuer jede vorhandene + // Farbe: ( mnCpp )Byte(s)-> ASCII Eintrag der der Farbe zugeordnet ist + // 1 Byte -> 0xff wenn Farbe transparent ist + // 3 Bytes -> RGB Wert der Farbe + mpColMap = new BYTE[ mnColors * ( 4 + mnCpp ) ]; + if ( mpColMap ) + { + for ( ULONG i = 0; i < mnColors; i++ ) + { + if ( ImplGetColor( i ) == FALSE ) + { + mbStatus = FALSE; + break; + } + } + } + else + mbStatus = sal_False; + + if ( mbStatus ) + { + // bei mehr als 256 Farben wird eine 24 Bit Grafik erstellt + sal_uInt16 nBits = 1; + if ( mnColors > 256 ) + nBits = 24; + else if ( mnColors > 16 ) + nBits = 8; + else if ( mnColors > 2 ) + nBits = 4; + else + nBits = 1; + + maBmp = Bitmap( Size( mnWidth, mnHeight ), nBits ); + mpAcc = maBmp.AcquireWriteAccess(); + + // mbTransparent ist TRUE wenn mindestens eine Farbe Transparent ist + if ( mbTransparent ) + { + maMaskBmp = Bitmap( Size( mnWidth, mnHeight ), 1 ); + if ( ( mpMaskAcc = maMaskBmp.AcquireWriteAccess() ) == NULL ) + mbStatus = FALSE; + } + if( mpAcc && mbStatus ) + { + ULONG i; + if ( mnColors <=256 ) // palette is only needed by using less than 257 + { // colors + + BYTE* pPtr = &mpColMap[mnCpp]; + + for ( i = 0; i < mnColors; i++ ) + { + mpAcc->SetPaletteColor( (BYTE)i, Color( pPtr[1], pPtr[2], pPtr[3] ) ); + pPtr += ( mnCpp + 4 ); + } + // using 2 charakters per pixel and less than 257 Colors we speed up + if ( mnCpp == 2 ) // by using a 64kb indexing table + { + mpFastColorTable = new BYTE[ 256 * 256 ]; + for ( pPtr = mpColMap, i = 0; i < mnColors; i++, pPtr += mnCpp + 4 ) + { + ULONG j = pPtr[ 0 ] << 8; + j += pPtr[ 1 ]; + mpFastColorTable[ j ] = (BYTE)i; + } + } + } + // now we get the bitmap data + mnIdentifier = XPMPIXELS; + for ( i = 0; i < mnHeight; i++ ) + { + if ( ImplGetScanLine( i ) == FALSE ) + { + mbStatus = FALSE; + break; + } + } + mnIdentifier = XPMEXTENSIONS; + } + } + } + + delete[] mpFastColorTable; + delete[] mpColMap; + delete[] mpStringBuf; + delete[] mpTempBuf; + + } + if( mbStatus ) + { + if ( mpMaskAcc ) + { + maMaskBmp.ReleaseAccess ( mpMaskAcc), mpMaskAcc = NULL; + maBmp.ReleaseAccess( mpAcc ), mpAcc = NULL; + rGraphic = Graphic( BitmapEx( maBmp, maMaskBmp ) ); + } + else + { + maBmp.ReleaseAccess( mpAcc ), mpAcc = NULL; + rGraphic = maBmp; + } + eReadState = XPMREAD_OK; + } + else + { + if ( mpMaskAcc ) maMaskBmp.ReleaseAccess ( mpMaskAcc), mpMaskAcc = NULL; + if ( mpAcc ) maBmp.ReleaseAccess( mpAcc ), mpAcc = NULL; + eReadState = XPMREAD_ERROR; + } + } + else + { + mrIStm.ResetError(); + eReadState = XPMREAD_NEED_MORE; + } + return eReadState; +} + +#ifdef _MSC_VER +#pragma optimize ("",on) +#endif + +// ------------------------------------------------------------------------ +// ImplGetColor ermittelt saemtliche Farbwerte, +// die Rueckgabe ist TRUE wenn saemtliche Farben zugeordnet werden konnten + +BOOL XPMReader::ImplGetColor( ULONG nNumb ) +{ + BYTE* pString = mpStringBuf; + BYTE* pPtr = ( mpColMap + nNumb * ( 4 + mnCpp ) ); + BOOL bStatus = ImplGetString(); + + if ( bStatus ) + { + for ( ULONG i = 0; i < mnCpp; i++ ) + *pPtr++ = *pString++; + bStatus = ImplGetColSub ( pPtr ); + } + return bStatus; +} + +// ------------------------------------------------------------------------ +// ImpGetScanLine liest den String mpBufSize aus und schreibt die Pixel in die +// Bitmap. Der Parameter nY gibt die horizontale Position an. + +BOOL XPMReader::ImplGetScanLine( ULONG nY ) +{ + BOOL bStatus = ImplGetString(); + BYTE* pString = mpStringBuf; + BYTE* pColor; + BitmapColor aWhite; + BitmapColor aBlack; + + if ( bStatus ) + { + if ( mpMaskAcc ) + { + aWhite = mpMaskAcc->GetBestMatchingColor( Color( COL_WHITE ) ); + aBlack = mpMaskAcc->GetBestMatchingColor( Color( COL_BLACK ) ); + } + if ( mnStringSize != ( mnWidth * mnCpp )) + bStatus = FALSE; + else + { + ULONG i, j; + if ( mpFastColorTable ) + { + for ( i = 0; i < mnWidth; i++ ) + { + j = (*pString++) << 8; + j += *pString++; + BYTE k = (BYTE)mpFastColorTable[ j ]; + mpAcc->SetPixel( nY, i, BitmapColor( (BYTE)k ) ); + + if ( mpMaskAcc ) + mpMaskAcc->SetPixel( nY, i, + ( mpColMap[ k * (mnCpp + 4) + mnCpp] ) ? aWhite : aBlack ); + } + } + else for ( i = 0; i < mnWidth; i++ ) + { + pColor = mpColMap; + for ( j = 0; j < mnColors; j++ ) + { + if ( ImplCompare( pString, pColor, mnCpp, XPMCASESENSITIVE ) == TRUE ) + { + if ( mnColors > 256 ) + mpAcc->SetPixel( nY, i, Color ( pColor[3], pColor[4], pColor[5] ) ); + else + mpAcc->SetPixel( nY, i, BitmapColor( (BYTE) j ) ); + + if ( mpMaskAcc ) + mpMaskAcc->SetPixel( nY, i, ( + pColor[ mnCpp ] ) ? aWhite : aBlack ); + + break; + } + pColor += ( mnCpp + 4 ); + } + pString += mnCpp; + } + + } + } + return bStatus; +} + +// ------------------------------------------------------------------------ +// versucht aus mpStringBuf einen Farbwert zu uebermitteln +// wurde eine Farbe gefunden wird an pDest[1]..pDest[2] der RGB wert geschrieben +// pDest[0] enthaelt 0xff wenn die Farbe transparent ist sonst 0 + +BOOL XPMReader::ImplGetColSub( BYTE* pDest ) +{ + unsigned char cTransparent[] = "None"; + + BOOL bColStatus = FALSE; + + if ( ImplGetColKey( 'c' ) || ImplGetColKey( 'm' ) || ImplGetColKey( 'g' ) ) + { + // hexentry for RGB or HSV color ? + if ( *mpPara == '#' ) + { + *pDest++ = 0; + bColStatus = TRUE; + switch ( mnParaSize ) + { + case 25 : + ImplGetRGBHex ( pDest, 6 ); + break; + case 13 : + ImplGetRGBHex ( pDest, 2 ); + break; + case 7 : + ImplGetRGBHex ( pDest, 0 ); + break; + default: + bColStatus = FALSE; + break; + } + } + // maybe pixel is transparent + else if ( ImplCompare( &cTransparent[0], mpPara, 4 )) + { + *pDest++ = 0xff; + bColStatus = TRUE; + mbTransparent = TRUE; + } + // last we will try to get the colorname + else if ( mnParaSize > 2 ) // name must enlarge the minimum size + { + ULONG i = 0; + while ( TRUE ) + { + if ( pRGBTable[ i ].name == NULL ) + break; + if ( pRGBTable[ i ].name[ mnParaSize ] == 0 ) + { + if ( ImplCompare ( (unsigned char*)pRGBTable[ i ].name, + mpPara, mnParaSize, XPMCASENONSENSITIVE ) ) + { + bColStatus = TRUE; + *pDest++ = 0; + *pDest++ = pRGBTable[ i ].red; + *pDest++ = pRGBTable[ i ].green; + *pDest++ = pRGBTable[ i ].blue; + } + } + i++; + } + } + } + return bColStatus; +} + +// ------------------------------------------------------------------------ +// ImplGetColKey durchsuch den String mpStringBuf nach einem Parameter 'nKey' +// und gibt einen BOOL zurueck. ( wenn TRUE werden mpPara und mnParaSize gesetzt ) + +BOOL XPMReader::ImplGetColKey( BYTE nKey ) +{ + BYTE nTemp, nPrev = ' '; + + mpPara = mpStringBuf + mnCpp + 1; + mnParaSize = 0; + + while ( *mpPara != 0 ) + { + if ( *mpPara == nKey ) + { + nTemp = *( mpPara + 1 ); + if ( nTemp == ' ' || nTemp == 0x09 ) + { + if ( nPrev == ' ' || nPrev == 0x09 ) + break; + } + } + nPrev = *mpPara; + mpPara++; + } + if ( *mpPara ) + { + mpPara++; + while ( (*mpPara == ' ') || (*mpPara == 0x09) ) + { + mpPara++; + } + if ( *mpPara != 0 ) + { + while ( *(mpPara+mnParaSize) != ' ' && *(mpPara+mnParaSize) != 0x09 && + *(mpPara+mnParaSize) != 0 ) + { + mnParaSize++; + } + } + } + return ( mnParaSize ) ? TRUE : FALSE; +} + +// ------------------------------------------------------------------------ +// ImplGetRGBHex uebersetzt den ASCII-Hexadezimalwert der sich bei mpPara befindet +// in einen RGB wert und schreibt diesen nach pDest +// folgende Formate muessen sich bei mpPara befinden: +// wenn nAdd = 0 : '#12ab12' -> RGB = 0x12, 0xab, 0x12 +// 2 : '#1234abcd1234' " " " " +// 6 : '#12345678abcdefab12345678' " " " " + + +void XPMReader::ImplGetRGBHex( BYTE* pDest,ULONG nAdd ) +{ + BYTE* pPtr = mpPara+1; + BYTE nHex, nTemp; + + for ( ULONG i = 0; i < 3; i++ ) + { + nHex = (*pPtr++) - '0'; + if ( nHex > 9 ) + nHex = ((nHex - 'A' + '0') & 7) + 10; + + nTemp = (*pPtr++) - '0'; + if ( nTemp > 9 ) + nTemp = ((nTemp - 'A' + '0') & 7) + 10; + nHex = ( nHex << 4 ) + nTemp; + + pPtr += nAdd; + *pDest++ = (BYTE)nHex; + } +} + +// ------------------------------------------------------------------------ +// ImplGetUlong gibt den wert einer bis zu 6stelligen ASCII-Dezimalzahl zurueck. + +ULONG XPMReader::ImplGetULONG( ULONG nPara ) +{ + if ( ImplGetPara ( nPara ) ) + { + ULONG nRetValue = 0; + BYTE* pPtr = mpPara; + + if ( ( mnParaSize > 6 ) || ( mnParaSize == 0 ) ) return 0; + for ( ULONG i = 0; i < mnParaSize; i++ ) + { + BYTE j = (*pPtr++) - 48; + if ( j > 9 ) return 0; // ascii is invalid + nRetValue*=10; + nRetValue+=j; + } + return nRetValue; + } + else return 0; +} + +// ------------------------------------------------------------------------ + +BOOL XPMReader::ImplCompare( BYTE* pSource, BYTE* pDest, ULONG nSize, ULONG nMode ) +{ + BOOL bRet = TRUE; + + if ( nMode == XPMCASENONSENSITIVE ) + { + for ( ULONG i = 0; i < nSize; i++ ) + { + if ( ( pSource[i]&~0x20 ) != ( pDest[i]&~0x20 ) ) + { + bRet = FALSE; + break; + } + } + } + else + { + for ( ULONG i = 0; i < nSize; i++ ) + { + if ( pSource[i] != pDest[i] ) + { + bRet = FALSE; + break; + } + } + } + return bRet; +} + +// ------------------------------------------------------------------------ +// ImplGetPara versucht den nNumb ( 0...x ) Parameter aus mpStringBuf zu ermitteln. +// Ein Parameter ist durch Spaces oder Tabs von den anderen getrennt. +// Konnte der Parameter gefunden werden ist der Rueckgabewert TRUE und mpPara + mnParaSize +// werden gesetzt. + +BOOL XPMReader::ImplGetPara ( ULONG nNumb ) +{ + BYTE nByte; + ULONG pSize = 0; + BYTE* pPtr = mpStringBuf; + ULONG nCount = 0; + + if ( ( *pPtr != ' ' ) && ( *pPtr != 0x09 ) ) + { + mpPara = pPtr; + mnParaSize = 0; + nCount = 0; + } + else + { + mpPara = NULL; + nCount = 0xffffffff; + } + + while ( pSize < mnStringSize ) + { + nByte = *pPtr; + + if ( mpPara ) + { + if ( ( nByte == ' ' ) || ( nByte == 0x09 ) ) + { + if ( nCount == nNumb ) + break; + else + mpPara = NULL; + } + else + mnParaSize++; + } + else + { + if ( ( nByte != ' ' ) && ( nByte != 0x09 ) ) + { + mpPara = pPtr; + mnParaSize = 1; + nCount++; + } + } + pSize++; + pPtr++; + } + return ( ( nCount == nNumb ) && ( mpPara ) ) ? TRUE : FALSE; +} + +// ------------------------------------------------------------------------ +// Der naechste String wird ausgelesen und in mpStringBuf (mit 0 abgeschlossen) abgelegt; +// mnStringSize enthaelt die Groesse des gelesenen Strings. +// Bemerkungen wie '//' und '/*.....*/' werden uebersprungen. + +BOOL XPMReader::ImplGetString( void ) +{ + BYTE sID[] = "/* XPM */"; + BYTE* pString = mpStringBuf; + + mnStringSize = 0; + mpStringBuf[0] = 0; + + while( mbStatus && ( mnStatus != XPMFINISHED ) ) + { + if ( mnTempAvail == 0 ) + { + mnTempAvail = mrIStm.Read( mpTempBuf, XPMTEMPBUFSIZE ); + if ( mnTempAvail == 0 ) + break; + + mpTempPtr = mpTempBuf; + + if ( mnIdentifier == XPMIDENTIFIER ) + { + if ( mnTempAvail <= 50 ) + { + mbStatus = FALSE; // file is too short to be a correct XPM format + break; + } + for ( int i = 0; i < 9; i++ ) // searching for "/* XPM */" + if ( *mpTempPtr++ != sID[i] ) + { + mbStatus = FALSE; + break; + } + mnTempAvail-=9; + mnIdentifier++; + } + } + mcLastByte = mcThisByte; + mcThisByte = *mpTempPtr++; + mnTempAvail--; + + if ( mnStatus & XPMDOUBLE ) + { + if ( mcThisByte == 0x0a ) + mnStatus &=~XPMDOUBLE; + continue; + } + if ( mnStatus & XPMREMARK ) + { + if ( ( mcThisByte == '/' ) && ( mcLastByte == '*' ) ) + mnStatus &=~XPMREMARK; + continue; + } + if ( mnStatus & XPMSTRING ) // characters in string + { + if ( mcThisByte == '"' ) + { + mnStatus &=~XPMSTRING; // end of parameter by eol + break; + } + if ( mnStringSize >= ( XPMSTRINGBUF - 1 ) ) + { + mbStatus = FALSE; + break; + } + *pString++ = mcThisByte; + pString[0] = 0; + mnStringSize++; + continue; + } + else + { // characters beside string + switch ( mcThisByte ) + { + case '*' : + if ( mcLastByte == '/' ) mnStatus |= XPMREMARK; + break; + case '/' : + if ( mcLastByte == '/' ) mnStatus |= XPMDOUBLE; + break; + case '"' : mnStatus |= XPMSTRING; + break; + case '{' : + if ( mnIdentifier == XPMDEFINITION ) + mnIdentifier++; + break; + case '}' : + if ( mnIdentifier == XPMENDEXT ) + mnStatus = XPMFINISHED; + break; + } + } + } + return mbStatus; +} + +// ------------- +// - ImportXPM - +// ------------- + +BOOL ImportXPM( SvStream& rStm, Graphic& rGraphic ) +{ + XPMReader* pXPMReader = (XPMReader*) rGraphic.GetContext(); + ReadState eReadState; + BOOL bRet = TRUE; + + if( !pXPMReader ) + pXPMReader = new XPMReader( rStm ); + + rGraphic.SetContext( NULL ); + eReadState = pXPMReader->ReadXPM( rGraphic ); + + if( eReadState == XPMREAD_ERROR ) + { + bRet = FALSE; + delete pXPMReader; + } + else if( eReadState == XPMREAD_OK ) + delete pXPMReader; + else + rGraphic.SetContext( pXPMReader ); + + return bRet; +} diff --git a/svtools/source/filter/jpeg/jpeg.cxx b/svtools/source/filter/jpeg/jpeg.cxx new file mode 100644 index 000000000000..a2de92171af3 --- /dev/null +++ b/svtools/source/filter/jpeg/jpeg.cxx @@ -0,0 +1,779 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#include + +extern "C" +{ + #define INT32 JPEG_INT32 + #include "stdio.h" + #include "jpeg.h" + #include "jpeglib.h" + #include "jerror.h" + #undef INT32 +} + +#define _JPEGPRIVATE +#include +#include "jpeg.hxx" +#include +#include + +// ----------- +// - Defines - +// ----------- + +using namespace ::com::sun::star; + +#define JPEGMINREAD 512 + +// ------------- +// - (C-Calls) - +// ------------- + +// ------------------------------------------------------------------------ + +extern "C" void* CreateBitmap( void* pJPEGReader, void* pJPEGCreateBitmapParam ) +{ + return ( (JPEGReader*) pJPEGReader )->CreateBitmap( pJPEGCreateBitmapParam ); +} + +// ------------------------------------------------------------------------ + +extern "C" void* GetScanline( void* pJPEGWriter, long nY ) +{ + return ( (JPEGWriter*) pJPEGWriter )->GetScanline( nY ); +} + +// ------------------------------------------------------------------------ + +struct JPEGCallbackStruct +{ + uno::Reference< task::XStatusIndicator > xStatusIndicator; +}; + +extern "C" long JPEGCallback( void* pCallbackData, long nPercent ) +{ + JPEGCallbackStruct* pS = (JPEGCallbackStruct*)pCallbackData; + if ( pS && pS->xStatusIndicator.is() ) + { + pS->xStatusIndicator->setValue( nPercent ); + } + return 0L; +} + +#define BUF_SIZE 4096 + +typedef struct +{ + struct jpeg_destination_mgr pub; /* public fields */ + + SvStream* outfile; /* target stream */ + JOCTET * buffer; /* start of buffer */ +} my_destination_mgr; + +typedef my_destination_mgr * my_dest_ptr; + +extern "C" void init_destination (j_compress_ptr cinfo) +{ + my_dest_ptr dest = (my_dest_ptr) cinfo->dest; + + /* Allocate the output buffer --- it will be released when done with image */ + dest->buffer = (JOCTET *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + BUF_SIZE * sizeof(JOCTET)); + + dest->pub.next_output_byte = dest->buffer; + dest->pub.free_in_buffer = BUF_SIZE; +} + +extern "C" int empty_output_buffer (j_compress_ptr cinfo) +{ + my_dest_ptr dest = (my_dest_ptr) cinfo->dest; + + if (dest->outfile->Write(dest->buffer, BUF_SIZE) != + (size_t) BUF_SIZE) + ERREXIT(cinfo, JERR_FILE_WRITE); + + dest->pub.next_output_byte = dest->buffer; + dest->pub.free_in_buffer = BUF_SIZE; + + return TRUE; +} + +extern "C" void term_destination (j_compress_ptr cinfo) +{ + my_dest_ptr dest = (my_dest_ptr) cinfo->dest; + size_t datacount = BUF_SIZE - dest->pub.free_in_buffer; + + /* Write any data remaining in the buffer */ + if (datacount > 0) { + if (dest->outfile->Write(dest->buffer, datacount) != datacount) + ERREXIT(cinfo, JERR_FILE_WRITE); + } +} + +extern "C" void jpeg_svstream_dest (j_compress_ptr cinfo, void* out) +{ + SvStream * outfile = (SvStream*)out; + my_dest_ptr dest; + + /* The destination object is made permanent so that multiple JPEG images + * can be written to the same file without re-executing jpeg_svstream_dest. + * This makes it dangerous to use this manager and a different destination + * manager serially with the same JPEG object, because their private object + * sizes may be different. Caveat programmer. + */ + if (cinfo->dest == NULL) { /* first time for this JPEG object? */ + cinfo->dest = (struct jpeg_destination_mgr *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + sizeof(my_destination_mgr)); + } + + dest = (my_dest_ptr) cinfo->dest; + dest->pub.init_destination = init_destination; + dest->pub.empty_output_buffer = empty_output_buffer; + dest->pub.term_destination = term_destination; + dest->outfile = outfile; +} + +/* Expanded data source object for stdio input */ + +typedef struct { + struct jpeg_source_mgr pub; /* public fields */ + + SvStream * infile; /* source stream */ + JOCTET * buffer; /* start of buffer */ + boolean start_of_file; /* have we gotten any data yet? */ +} my_source_mgr; + +typedef my_source_mgr * my_src_ptr; + +/* + * Initialize source --- called by jpeg_read_header + * before any data is actually read. + */ + +extern "C" void init_source (j_decompress_ptr cinfo) +{ + my_src_ptr src = (my_src_ptr) cinfo->src; + + /* We reset the empty-input-file flag for each image, + * but we don't clear the input buffer. + * This is correct behavior for reading a series of images from one source. + */ + src->start_of_file = TRUE; +} + +long StreamRead( SvStream* pSvStm, void* pBuffer, long nBufferSize ) +{ + long nRead; + + if( pSvStm->GetError() != ERRCODE_IO_PENDING ) + { + long nActPos = pSvStm->Tell(); + + nRead = (long) pSvStm->Read( pBuffer, nBufferSize ); + + if( pSvStm->GetError() == ERRCODE_IO_PENDING ) + { + nRead = 0; + + // Damit wir wieder an die alte Position + // seeken koennen, setzen wir den Error temp.zurueck + pSvStm->ResetError(); + pSvStm->Seek( nActPos ); + pSvStm->SetError( ERRCODE_IO_PENDING ); + } + } + else + nRead = 0; + + return nRead; +} + +extern "C" int fill_input_buffer (j_decompress_ptr cinfo) +{ + my_src_ptr src = (my_src_ptr) cinfo->src; + size_t nbytes; + + nbytes = StreamRead(src->infile, src->buffer, BUF_SIZE); + + if (nbytes <= 0) { + if (src->start_of_file) /* Treat empty input file as fatal error */ + ERREXIT(cinfo, JERR_INPUT_EMPTY); + WARNMS(cinfo, JWRN_JPEG_EOF); + /* Insert a fake EOI marker */ + src->buffer[0] = (JOCTET) 0xFF; + src->buffer[1] = (JOCTET) JPEG_EOI; + nbytes = 2; + } + + src->pub.next_input_byte = src->buffer; + src->pub.bytes_in_buffer = nbytes; + src->start_of_file = FALSE; + + return TRUE; +} + +extern "C" void skip_input_data (j_decompress_ptr cinfo, long num_bytes) +{ + my_src_ptr src = (my_src_ptr) cinfo->src; + + /* Just a dumb implementation for now. Could use fseek() except + * it doesn't work on pipes. Not clear that being smart is worth + * any trouble anyway --- large skips are infrequent. + */ + if (num_bytes > 0) { + while (num_bytes > (long) src->pub.bytes_in_buffer) { + num_bytes -= (long) src->pub.bytes_in_buffer; + (void) fill_input_buffer(cinfo); + /* note we assume that fill_input_buffer will never return FALSE, + * so suspension need not be handled. + */ + } + src->pub.next_input_byte += (size_t) num_bytes; + src->pub.bytes_in_buffer -= (size_t) num_bytes; + } +} + +extern "C" void term_source (j_decompress_ptr) +{ + /* no work necessary here */ +} + +extern "C" void jpeg_svstream_src (j_decompress_ptr cinfo, void * in) +{ + my_src_ptr src; + SvStream * infile = (SvStream*)in; + + /* The source object and input buffer are made permanent so that a series + * of JPEG images can be read from the same file by calling jpeg_stdio_src + * only before the first one. (If we discarded the buffer at the end of + * one image, we'd likely lose the start of the next one.) + * This makes it unsafe to use this manager and a different source + * manager serially with the same JPEG object. Caveat programmer. + */ + if (cinfo->src == NULL) { /* first time for this JPEG object? */ + cinfo->src = (struct jpeg_source_mgr *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + sizeof(my_source_mgr)); + src = (my_src_ptr) cinfo->src; + src->buffer = (JOCTET *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + BUF_SIZE * sizeof(JOCTET)); + } + + src = (my_src_ptr) cinfo->src; + src->pub.init_source = init_source; + src->pub.fill_input_buffer = fill_input_buffer; + src->pub.skip_input_data = skip_input_data; + src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */ + src->pub.term_source = term_source; + src->infile = infile; + src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */ + src->pub.next_input_byte = NULL; /* until buffer loaded */ +} + +// -------------- +// - JPEGReader - +// -------------- + +JPEGReader::JPEGReader( SvStream& rStm, void* /*pCallData*/, sal_Bool bSetLS ) : + rIStm ( rStm ), + pAcc ( NULL ), + pAcc1 ( NULL ), + pBuffer ( NULL ), + nLastPos ( rStm.Tell() ), + nLastLines ( 0 ), + bSetLogSize ( bSetLS ) +{ + maUpperName = String::CreateFromAscii( "SVIJPEG", 7 ); + nFormerPos = nLastPos; +} + +// ------------------------------------------------------------------------ + +JPEGReader::~JPEGReader() +{ + if( pBuffer ) + rtl_freeMemory( pBuffer ); + + if( pAcc ) + aBmp.ReleaseAccess( pAcc ); + + if( pAcc1 ) + aBmp1.ReleaseAccess( pAcc1 ); +} + +// ------------------------------------------------------------------------ + +void* JPEGReader::CreateBitmap( void* pParam ) +{ + Size aSize( ((JPEGCreateBitmapParam*)pParam)->nWidth, + ((JPEGCreateBitmapParam*)pParam)->nHeight ); + sal_Bool bGray = ((JPEGCreateBitmapParam*)pParam)->bGray != 0; + + void* pBmpBuf = NULL; + + if( pAcc ) + aBmp.ReleaseAccess( pAcc ); + + if( bGray ) + { + BitmapPalette aGrayPal( 256 ); + + for( USHORT n = 0; n < 256; n++ ) + { + const BYTE cGray = (BYTE) n; + aGrayPal[ n ] = BitmapColor( cGray, cGray, cGray ); + } + + aBmp = Bitmap( aSize, 8, &aGrayPal ); + } + else + aBmp = Bitmap( aSize, 24 ); + + if ( bSetLogSize ) + { + unsigned long nUnit = ((JPEGCreateBitmapParam*)pParam)->density_unit; + + if( ( ( 1 == nUnit ) || ( 2 == nUnit ) ) && + ( (JPEGCreateBitmapParam*) pParam )->X_density && + ( (JPEGCreateBitmapParam*) pParam )->Y_density ) + { + Point aEmptyPoint; + Fraction aFractX( 1, ((JPEGCreateBitmapParam*)pParam)->X_density ); + Fraction aFractY( 1, ((JPEGCreateBitmapParam*)pParam)->Y_density ); + MapMode aMapMode( nUnit == 1 ? MAP_INCH : MAP_CM, aEmptyPoint, aFractX, aFractY ); + Size aPrefSize = OutputDevice::LogicToLogic( aSize, aMapMode, MAP_100TH_MM ); + + aBmp.SetPrefSize( aPrefSize ); + aBmp.SetPrefMapMode( MapMode( MAP_100TH_MM ) ); + } + } + + pAcc = aBmp.AcquireWriteAccess(); + + if( pAcc ) + { + long nAlignedWidth; + + const ULONG nFormat = pAcc->GetScanlineFormat(); + + if( + ( bGray && ( BMP_FORMAT_8BIT_PAL == nFormat ) ) || + ( !bGray && ( BMP_FORMAT_24BIT_TC_RGB == nFormat ) ) + ) + { + pBmpBuf = pAcc->GetBuffer(); + nAlignedWidth = pAcc->GetScanlineSize(); + ((JPEGCreateBitmapParam*)pParam)->bTopDown = pAcc->IsTopDown(); + } + else + { + nAlignedWidth = AlignedWidth4Bytes( aSize.Width() * ( bGray ? 8 : 24 ) ); + ((JPEGCreateBitmapParam*)pParam)->bTopDown = TRUE; + pBmpBuf = pBuffer = rtl_allocateMemory( nAlignedWidth * aSize.Height() ); + } + ((JPEGCreateBitmapParam*)pParam)->nAlignedWidth = nAlignedWidth; + } + + return pBmpBuf; +} + +// ------------------------------------------------------------------------ + +void JPEGReader::FillBitmap() +{ + if( pBuffer && pAcc ) + { + HPBYTE pTmp; + BitmapColor aColor; + long nAlignedWidth; + long nWidth = pAcc->Width(); + long nHeight = pAcc->Height(); + + if( pAcc->GetBitCount() == 8 ) + { + BitmapColor* pCols = new BitmapColor[ 256 ]; + + for( USHORT n = 0; n < 256; n++ ) + { + const BYTE cGray = (BYTE) n; + pCols[ n ] = pAcc->GetBestMatchingColor( BitmapColor( cGray, cGray, cGray ) ); + } + + nAlignedWidth = AlignedWidth4Bytes( pAcc->Width() * 8L ); + + for( long nY = 0L; nY < nHeight; nY++ ) + { + pTmp = (BYTE*) pBuffer + nY * nAlignedWidth; + + for( long nX = 0L; nX < nWidth; nX++ ) + pAcc->SetPixel( nY, nX, pCols[ *pTmp++ ] ); + } + + delete[] pCols; + } + else + { + nAlignedWidth = AlignedWidth4Bytes( pAcc->Width() * 24L ); + + for( long nY = 0L; nY < nHeight; nY++ ) + { + pTmp = (BYTE*) pBuffer + nY * nAlignedWidth; + + for( long nX = 0L; nX < nWidth; nX++ ) + { + aColor.SetRed( *pTmp++ ); + aColor.SetGreen( *pTmp++ ); + aColor.SetBlue( *pTmp++ ); + pAcc->SetPixel( nY, nX, aColor ); + } + } + } + } +} + +// ------------------------------------------------------------------------ + +Graphic JPEGReader::CreateIntermediateGraphic( const Bitmap& rBitmap, long nLines ) +{ + Graphic aGraphic; + const Size aSizePix( rBitmap.GetSizePixel() ); + + if( !nLastLines ) + { + if( pAcc1 ) + aBmp1.ReleaseAccess( pAcc1 ); + + aBmp1 = Bitmap( rBitmap.GetSizePixel(), 1 ); + aBmp1.Erase( Color( COL_WHITE ) ); + pAcc1 = aBmp1.AcquireWriteAccess(); + } + + if( nLines && ( nLines < aSizePix.Height() ) ) + { + if( pAcc1 ) + { + const long nNewLines = nLines - nLastLines; + + if( nNewLines ) + { + pAcc1->SetFillColor( Color( COL_BLACK ) ); + pAcc1->FillRect( Rectangle( Point( 0, nLastLines ), + Size( pAcc1->Width(), nNewLines ) ) ); + } + + aBmp1.ReleaseAccess( pAcc1 ); + aGraphic = BitmapEx( rBitmap, aBmp1 ); + pAcc1 = aBmp1.AcquireWriteAccess(); + } + else + aGraphic = rBitmap; + } + else + aGraphic = rBitmap; + + nLastLines = nLines; + + return aGraphic; +} + +// ------------------------------------------------------------------------ + +ReadState JPEGReader::Read( Graphic& rGraphic ) +{ + long nEndPos; + long nLines; + ReadState eReadState; + BOOL bRet = FALSE; + BYTE cDummy; + +#if 1 // TODO: is it possible to get rid of this seek to the end? + // check if the stream's end is already available + rIStm.Seek( STREAM_SEEK_TO_END ); + rIStm >> cDummy; + nEndPos = rIStm.Tell(); + + // else check if at least JPEGMINREAD bytes can be read + if( rIStm.GetError() == ERRCODE_IO_PENDING ) + { + rIStm.ResetError(); + if( ( nEndPos - nFormerPos ) < JPEGMINREAD ) + { + rIStm.Seek( nLastPos ); + return JPEGREAD_NEED_MORE; + } + } + + // seek back to the original position + rIStm.Seek( nLastPos ); +#endif + + Size aPreviewSize = GetPreviewSize(); + SetJpegPreviewSizeHint( aPreviewSize.Width(), aPreviewSize.Height() ); + + // read the (partial) image + ReadJPEG( this, &rIStm, &nLines ); + + if( pAcc ) + { + if( pBuffer ) + { + FillBitmap(); + rtl_freeMemory( pBuffer ); + pBuffer = NULL; + } + + aBmp.ReleaseAccess( pAcc ); + pAcc = NULL; + + if( rIStm.GetError() == ERRCODE_IO_PENDING ) + rGraphic = CreateIntermediateGraphic( aBmp, nLines ); + else + rGraphic = aBmp; + + bRet = TRUE; + } + else if( rIStm.GetError() == ERRCODE_IO_PENDING ) + bRet = TRUE; + + // Status setzen ( Pending hat immer Vorrang ) + if( rIStm.GetError() == ERRCODE_IO_PENDING ) + { + eReadState = JPEGREAD_NEED_MORE; + rIStm.ResetError(); + nFormerPos = rIStm.Tell(); + } + else + { + if( bRet ) + eReadState = JPEGREAD_OK; + else + eReadState = JPEGREAD_ERROR; + } + + return eReadState; +} + + +// -------------- +// - JPEGWriter - +// -------------- + +JPEGWriter::JPEGWriter( SvStream& rStm, const uno::Sequence< beans::PropertyValue >* pFilterData, bool* pExportWasGrey ) : + rOStm ( rStm ), + pAcc ( NULL ), + pBuffer ( NULL ), + pExpWasGrey ( pExportWasGrey ) +{ + FilterConfigItem aConfigItem( (uno::Sequence< beans::PropertyValue >*)pFilterData ); + bGreys = aConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorMode" ) ), 0 ) != 0; + nQuality = aConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Quality" ) ), 75 ); + + if ( pFilterData ) + { + int nArgs = pFilterData->getLength(); + const beans::PropertyValue* pValues = pFilterData->getConstArray(); + while( nArgs-- ) + { + if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StatusIndicator" ) ) ) + { + pValues->Value >>= xStatusIndicator; + } + pValues++; + } + } +} + +// ------------------------------------------------------------------------ + +void* JPEGWriter::GetScanline( long nY ) +{ + void* pScanline = NULL; + + if( pAcc ) + { + if( bNative ) + pScanline = pAcc->GetScanline( nY ); + else if( pBuffer ) + { + BitmapColor aColor; + long nWidth = pAcc->Width(); + BYTE* pTmp = pBuffer; + + if( pAcc->HasPalette() ) + { + for( long nX = 0L; nX < nWidth; nX++ ) + { + aColor = pAcc->GetPaletteColor( (BYTE) pAcc->GetPixel( nY, nX ) ); + *pTmp++ = aColor.GetRed(); + if ( bGreys ) + continue; + *pTmp++ = aColor.GetGreen(); + *pTmp++ = aColor.GetBlue(); + } + } + else + { + for( long nX = 0L; nX < nWidth; nX++ ) + { + aColor = pAcc->GetPixel( nY, nX ); + *pTmp++ = aColor.GetRed(); + if ( bGreys ) + continue; + *pTmp++ = aColor.GetGreen(); + *pTmp++ = aColor.GetBlue(); + } + } + + pScanline = pBuffer; + } + } + + return pScanline; +} + +// ------------------------------------------------------------------------ + +BOOL JPEGWriter::Write( const Graphic& rGraphic ) +{ + BOOL bRet = FALSE; + + if ( xStatusIndicator.is() ) + { + rtl::OUString aMsg; + xStatusIndicator->start( aMsg, 100 ); + } + + Bitmap aGraphicBmp( rGraphic.GetBitmap() ); + + if ( bGreys ) + { + if ( !aGraphicBmp.Convert( BMP_CONVERSION_8BIT_GREYS ) ) + aGraphicBmp = rGraphic.GetBitmap(); + } + + pAcc = aGraphicBmp.AcquireReadAccess(); + + if ( !bGreys ) // bitmap was not explicitely converted into greyscale, + { // check if source is greyscale only + + sal_Bool bIsGrey = sal_True; + + long nWidth = pAcc->Width(); + for ( long nY = 0; bIsGrey && ( nY < pAcc->Height() ); nY++ ) + { + BitmapColor aColor; + for( long nX = 0L; bIsGrey && ( nX < nWidth ); nX++ ) + { + aColor = pAcc->HasPalette() ? pAcc->GetPaletteColor( (BYTE) pAcc->GetPixel( nY, nX ) ) + : pAcc->GetPixel( nY, nX ); + bIsGrey = ( aColor.GetRed() == aColor.GetGreen() ) && ( aColor.GetRed() == aColor.GetBlue() ); + } + } + if ( bIsGrey ) + bGreys = sal_True; + } + + if( pExpWasGrey ) + *pExpWasGrey = bGreys; + + if( pAcc ) + { + bNative = ( pAcc->GetScanlineFormat() == BMP_FORMAT_24BIT_TC_RGB ); + + if( !bNative ) + pBuffer = new BYTE[ AlignedWidth4Bytes( bGreys ? pAcc->Width() * 8L : pAcc->Width() * 24L ) ]; + + JPEGCallbackStruct aCallbackData; + aCallbackData.xStatusIndicator = xStatusIndicator; + bRet = (BOOL) WriteJPEG( this, &rOStm, pAcc->Width(), pAcc->Height(), bGreys, nQuality, &aCallbackData ); + + delete[] pBuffer; + pBuffer = NULL; + + aGraphicBmp.ReleaseAccess( pAcc ); + pAcc = NULL; + } + if ( xStatusIndicator.is() ) + xStatusIndicator->end(); + + return bRet; +} + +// -------------- +// - ImportJPEG - +// -------------- + +BOOL ImportJPEG( SvStream& rStm, Graphic& rGraphic, void* pCallerData, sal_Int32 nImportFlags ) +{ + JPEGReader* pJPEGReader = (JPEGReader*) rGraphic.GetContext(); + ReadState eReadState; + BOOL bRet = TRUE; + + if( !pJPEGReader ) + pJPEGReader = new JPEGReader( rStm, pCallerData, ( nImportFlags & GRFILTER_I_FLAGS_SET_LOGSIZE_FOR_JPEG ) != 0 ); + + if( nImportFlags & GRFILTER_I_FLAGS_FOR_PREVIEW ) + pJPEGReader->SetPreviewSize( Size(128,128) ); + else + pJPEGReader->DisablePreviewMode(); + + rGraphic.SetContext( NULL ); + eReadState = pJPEGReader->Read( rGraphic ); + + if( eReadState == JPEGREAD_ERROR ) + { + bRet = FALSE; + delete pJPEGReader; + } + else if( eReadState == JPEGREAD_OK ) + delete pJPEGReader; + else + rGraphic.SetContext( pJPEGReader ); + + return bRet; +} + +// -------------- +// - ExportJPEG - +// -------------- + +BOOL ExportJPEG( SvStream& rOStm, const Graphic& rGraphic, + const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData, + bool* pExportWasGrey + ) +{ + JPEGWriter aJPEGWriter( rOStm, pFilterData, pExportWasGrey ); + return aJPEGWriter.Write( rGraphic ); +} diff --git a/svtools/source/filter/jpeg/jpeg.h b/svtools/source/filter/jpeg/jpeg.h new file mode 100644 index 000000000000..82a2f80a838c --- /dev/null +++ b/svtools/source/filter/jpeg/jpeg.h @@ -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. + * + ************************************************************************/ + +#ifndef _JPEG_H +#define _JPEG_H + +#if defined( ICC ) +#include +#endif + +#if defined (UNX) || defined(__MINGW32__) +#include +#endif + +struct JPEGCreateBitmapParam +{ + unsigned long nWidth; + unsigned long nHeight; + unsigned long density_unit; + unsigned long X_density; + unsigned long Y_density; + long bGray; + + long nAlignedWidth; // these members will be filled by the + long bTopDown; // CreateBitmap method in svtools +}; + +typedef struct my_error_mgr* my_error_ptr; +typedef unsigned char BYTE; +typedef unsigned char* HPBYTE; + +void* JPEGMalloc( size_t size ); +void JPEGFree( void *ptr ); +long JPEGCallback( void* pCallbackData, long nPercent ); + +long WriteJPEG( void* pJPEGWriter, void* pOStm, long nWidth, long nHeight, long bGreyScale, + long nQualityPercent, void* pCallbackData ); +void* GetScanline( void* pJPEGWriter, long nY ); + +void ReadJPEG( void* pJPEGReader, void* pIStm, long* pLines ); +void* CreateBitmap( void* pJPEGReader, void* pJPEGCreateBitmapParam ); + +/* TODO: when incompatible changes are possible again + the preview size hint should be redone */ +void SetJpegPreviewSizeHint( int nWidth, int nHeight ); + +#endif diff --git a/svtools/source/filter/jpeg/jpegc.c b/svtools/source/filter/jpeg/jpegc.c new file mode 100644 index 000000000000..29b4749a7b51 --- /dev/null +++ b/svtools/source/filter/jpeg/jpegc.c @@ -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. + * + ************************************************************************/ + +#include +#include +#include "setjmp.h" +#include "jpeglib.h" +#include "jerror.h" +#include "jpeg.h" +#include "rtl/alloc.h" +#include "osl/diagnose.h" + +struct my_error_mgr +{ + struct jpeg_error_mgr pub; + jmp_buf setjmp_buffer; +}; + +void jpeg_svstream_src (j_decompress_ptr cinfo, void* infile); +void jpeg_svstream_dest (j_compress_ptr cinfo, void* outfile); + +METHODDEF( void ) +my_error_exit (j_common_ptr cinfo) +{ + my_error_ptr myerr = (my_error_ptr) cinfo->err; + (*cinfo->err->output_message) (cinfo); + longjmp(myerr->setjmp_buffer, 1); +} + + +METHODDEF( void ) +my_output_message (j_common_ptr cinfo) +{ + char buffer[JMSG_LENGTH_MAX]; + (*cinfo->err->format_message) (cinfo, buffer); +} + +/* TODO: when incompatible changes are possible again + the preview size hint should be redone */ +static int nPreviewWidth = 0; +static int nPreviewHeight = 0; +void SetJpegPreviewSizeHint( int nWidth, int nHeight ) +{ + nPreviewWidth = nWidth; + nPreviewHeight = nHeight; +} + +void ReadJPEG( void* pJPEGReader, void* pIStm, long* pLines ) +{ + struct jpeg_decompress_struct cinfo; + struct my_error_mgr jerr; + struct JPEGCreateBitmapParam aCreateBitmapParam; + HPBYTE pDIB; + HPBYTE pTmp; + long nWidth; + long nHeight; + long nAlignedWidth; + JSAMPLE * range_limit; + HPBYTE pScanLineBuffer = NULL; + long nScanLineBufferComponents = 0; + // declare bDecompCreated volatile because of gcc + // warning: variable 'bDecompCreated' might be clobbered by `longjmp' or `vfork' + volatile long bDecompCreated = 0; + + /* Falls der Stream nicht ausreicht (IO_PENDING) + wird ueber ein longjmp in der Schleife nach Exit + gesprungen, wir geben dann die Anzahl + der bisher bearbeiteten Scanlines zurueck*/ + if ( setjmp( jerr.setjmp_buffer ) ) + goto Exit; + + cinfo.err = jpeg_std_error( &jerr.pub ); + jerr.pub.error_exit = my_error_exit; + jerr.pub.output_message = my_output_message; + + jpeg_create_decompress( &cinfo ); + bDecompCreated = 1; + jpeg_svstream_src( &cinfo, pIStm ); + jpeg_read_header( &cinfo, TRUE ); + + cinfo.scale_num = 1; + cinfo.scale_denom = 1; + cinfo.output_gamma = 1.0; + cinfo.raw_data_out = FALSE; + cinfo.quantize_colors = FALSE; + if ( cinfo.jpeg_color_space == JCS_YCbCr ) + cinfo.out_color_space = JCS_RGB; + else if ( cinfo.jpeg_color_space == JCS_YCCK ) + cinfo.out_color_space = JCS_CMYK; + + OSL_ASSERT(cinfo.out_color_space == JCS_CMYK || cinfo.out_color_space == JCS_GRAYSCALE || cinfo.out_color_space == JCS_RGB); + + /* change scale for preview import */ + if( nPreviewWidth || nPreviewHeight ) + { + if( nPreviewWidth == 0 ) { + nPreviewWidth = ( cinfo.image_width*nPreviewHeight )/cinfo.image_height; + if( nPreviewWidth <= 0 ) + nPreviewWidth = 1; + } else if( nPreviewHeight == 0 ) { + nPreviewHeight = ( cinfo.image_height*nPreviewWidth )/cinfo.image_width; + if( nPreviewHeight <= 0 ) + nPreviewHeight = 1; + } + + for( cinfo.scale_denom = 1; cinfo.scale_denom < 8; cinfo.scale_denom *= 2 ) + { + if( cinfo.image_width < nPreviewWidth * cinfo.scale_denom ) + break; + if( cinfo.image_height < nPreviewHeight * cinfo.scale_denom ) + break; + } + + if( cinfo.scale_denom > 1 ) + { + cinfo.dct_method = JDCT_FASTEST; + cinfo.do_fancy_upsampling = FALSE; + cinfo.do_block_smoothing = FALSE; + } + } + + jpeg_start_decompress( &cinfo ); + + nWidth = cinfo.output_width; + nHeight = cinfo.output_height; + aCreateBitmapParam.nWidth = nWidth; + aCreateBitmapParam.nHeight = nHeight; + + aCreateBitmapParam.density_unit = cinfo.density_unit; + aCreateBitmapParam.X_density = cinfo.X_density; + aCreateBitmapParam.Y_density = cinfo.Y_density; + aCreateBitmapParam.bGray = cinfo.output_components == 1; + pDIB = CreateBitmap( pJPEGReader, &aCreateBitmapParam ); + nAlignedWidth = aCreateBitmapParam.nAlignedWidth; + range_limit=cinfo.sample_range_limit; + + if ( cinfo.out_color_space == JCS_CMYK ) + { + nScanLineBufferComponents = cinfo.output_width * 4; + pScanLineBuffer = rtl_allocateMemory( nScanLineBufferComponents ); + } + + if( pDIB ) + { + if( aCreateBitmapParam.bTopDown ) + pTmp = pDIB; + else + { + pTmp = pDIB + ( nHeight - 1 ) * nAlignedWidth; + nAlignedWidth = -nAlignedWidth; + } + + for ( *pLines = 0; *pLines < nHeight; (*pLines)++ ) + { + if (pScanLineBuffer!=NULL) { // in other words cinfo.out_color_space == JCS_CMYK + int i; + int j; + jpeg_read_scanlines( &cinfo, (JSAMPARRAY) &pScanLineBuffer, 1 ); + // convert CMYK to RGB + for( i=0, j=0; i < nScanLineBufferComponents; i+=4, j+=3 ) + { + int c_=255-pScanLineBuffer[i+0]; + int m_=255-pScanLineBuffer[i+1]; + int y_=255-pScanLineBuffer[i+2]; + int k_=255-pScanLineBuffer[i+3]; + pTmp[j+0]=range_limit[ 255L - ( c_ + k_ ) ]; + pTmp[j+1]=range_limit[ 255L - ( m_ + k_ ) ]; + pTmp[j+2]=range_limit[ 255L - ( y_ + k_ ) ]; + } + } else { + jpeg_read_scanlines( &cinfo, (JSAMPARRAY) &pTmp, 1 ); + } + /* PENDING ??? */ + if ( cinfo.err->msg_code == 113 ) + break; + + pTmp += nAlignedWidth; + } + } + + jpeg_finish_decompress( &cinfo ); + if (pScanLineBuffer!=NULL) { + rtl_freeMemory( pScanLineBuffer ); + pScanLineBuffer=NULL; + } + +Exit: + + if( bDecompCreated ) + jpeg_destroy_decompress( &cinfo ); +} + +long WriteJPEG( void* pJPEGWriter, void* pOStm, + long nWidth, long nHeight, long bGreys, + long nQualityPercent, void* pCallbackData ) +{ + struct jpeg_compress_struct cinfo; + struct my_error_mgr jerr; + void* pScanline; + long nY; + // declare bCompCreated, bRet volatile because of gcc + // warning: variable 'bCompCreated' might be clobbered by `longjmp' or `vfork' + volatile long bCompCreated = 0; + volatile long bRet = 0; + + if ( setjmp( jerr.setjmp_buffer ) ) + goto Exit; + + cinfo.err = jpeg_std_error( &jerr.pub ); + jerr.pub.error_exit = my_error_exit; + jerr.pub.output_message = my_output_message; + + jpeg_create_compress( &cinfo ); + bCompCreated = 1; + + jpeg_svstream_dest( &cinfo, pOStm ); + + cinfo.image_width = (JDIMENSION) nWidth; + cinfo.image_height = (JDIMENSION) nHeight; + if ( bGreys ) + { + cinfo.input_components = 1; + cinfo.in_color_space = JCS_GRAYSCALE; + } + else + { + cinfo.input_components = 3; + cinfo.in_color_space = JCS_RGB; + } + + jpeg_set_defaults( &cinfo ); + jpeg_set_quality( &cinfo, (int) nQualityPercent, FALSE ); + + if ( ( nWidth > 128 ) || ( nHeight > 128 ) ) + jpeg_simple_progression( &cinfo ); + + jpeg_start_compress( &cinfo, TRUE ); + + for( nY = 0; nY < nHeight; nY++ ) + { + pScanline = GetScanline( pJPEGWriter, nY ); + + if( pScanline ) + jpeg_write_scanlines( &cinfo, (JSAMPARRAY) &pScanline, 1 ); + + if( JPEGCallback( pCallbackData, nY * 100L / nHeight ) ) + goto Exit; + } + + bRet = 1; + + jpeg_finish_compress(&cinfo); + +Exit: + + if ( bCompCreated ) + jpeg_destroy_compress( &cinfo ); + + return bRet; +} diff --git a/svtools/source/filter/sgf.ini b/svtools/source/filter/sgf.ini new file mode 100644 index 000000000000..7444e40c8836 --- /dev/null +++ b/svtools/source/filter/sgf.ini @@ -0,0 +1,118 @@ +#Family : (Roman,Swiss,Modern,Script,Decora); +#CharSet : (Ansi,IBMPC,Mac,Symbol,System); Default is System +#Attribute: (Bold,Ital,Sans,Serf,Fixd); + +[SGV Fonts fuer StarView] +#IF-ID Fontname Attribute SV-Fam ChSet Width FontName + 3848=(ITC Zapf Dingbats) Decora () + 5720=(Symbol) Serf Decora Symbol () + 5721=(Symbol) Bold Serf Decora Symbol () + 5723=(Symbol Sans) Sans Decora Symbol () + 5724=(Symbol Sans) Bold Sans Decora Symbol () + 90133=(Dom Casual) Sans Script () + 90326=(Brush) Bold Ital Serf Script () + 90349=(Park Avenue) Ital Serf Script () + 90508=(Uncial) Sans Roman () + 91118=(Antique Olive) Bold Sans Swiss () + 91119=(Antique Olive) Sans Swiss () + 91120=(Antique Olive Compact) Bold Sans Swiss () + 91335=(ITC Benguiat) Bold Serf Roman () + 91336=(ITC Benguiat) Bold Ital Serf Roman () + 91846=(Antique Olive) Ital Sans Roman () +#92500=(CG Times) Serf Roman () +#92501=(CG Times) Ital Serf Roman () +#92504=(CG Times) Bold Serf Roman () +#92505=(CG Times) Bold Ital Serf Roman () +#93950=(Courier) Serf Fixd Modern () +#93951=(Courier) Ital Serf Fixd Modern () +#93952=(Courier) Bold Serf Fixd Modern () +#93953=(Courier) Bold Ital Serf Fixd Modern () +#94021=(Univers) Sans Swiss () +#94022=(Univers) Ital Sans Swiss () +#94023=(Univers) Bold Sans Swiss () +#94024=(Univers) Bold Ital Sans Swiss () +102004=(Avanti) Bold Ital Sans Swiss () +102005=(Avanti) Ital Sans Swiss () +102007=(Booklet) Bold Sans Roman () +102008=(Booklet) Bold Ital Sans Roman () +102009=(Booklet) Ital Sans Roman () +102010=(Centuri) Sans Roman () +102011=(Centuri) Bold Sans Roman () +102012=(Centuri) Bold Ital Sans Roman () +102013=(Centuri) Ital Sans Roman () +102014=(Paltus) Bold Sans Roman () +102015=(Paltus) Sans Roman () +102016=(Paltus) Bold Ital Sans Roman () +102017=(Paltus) Ital Sans Roman () +102018=(Sans) Sans Swiss () +102019=(Sans) Bold Sans Swiss () +102020=(Sans) Bold Ital Sans Swiss () +102021=(Sans) Ital Sans Swiss () +102022=(SansCondensed) Sans Swiss () +102023=(SansCondensed) Bold Sans Swiss () +102024=(SansCondensed) Bold Ital Sans Swiss () +102025=(SansCondensed) Ital Sans Swiss () +102026=(PS-Roman) Sans Roman () +102027=(PS-Roman) Bold Sans Roman () +102028=(PS-Roman) Bold Ital Sans Roman () +102029=(PS-Roman) Ital Sans Roman () +200111=(Chalenge) Sans () +200112=(Chalenge) Bold Sans () +200113=(Chalenge) Ital Sans () +200114=(Chalenge) Bold Ital Sans () +200121=(Office) Sans () +200122=(Office) Bold Sans () +200123=(Office) Ital Sans () +200124=(Office) Bold Ital Sans () +200131=(Milano) Sans () +200132=(Milano) Bold Sans () +200133=(Milano) Ital Sans () +200134=(Milano) Bold Ital Sans () +200141=(Atlantic) Sans Roman () +200142=(Atlantic) Bold Sans Roman () +200143=(Atlantic) Ital Sans Roman () +200144=(Atlantic) Bold Ital Sans Roman () +200151=(Pentagon) Sans () +200152=(Pentagon) Bold Sans () +200153=(Pentagon) Ital Sans () +200154=(Pentagon) Bold Ital Sans () +200161=(Classico) Sans () +200162=(Classico) Bold Sans () +200163=(Classico) Ital Sans () +200164=(Classico) Bold Ital Sans () +200211=(Westcost) Sans () +200212=(Westcost) Bold Sans () +200213=(Westcost) Ital Sans () +200214=(Westcost) Bold Ital Sans () +200221=(Finish) Sans () +200222=(Finish) Bold Sans () +200223=(Finish) Ital Sans () +200224=(Finish) Bold Ital Sans () +200231=(Classic) Sans () +200232=(Classic) Bold Sans () +200233=(Classic) Ital Sans () +200234=(Classic) Bold Ital Sans () +200241=(Hilton) Sans () +200242=(Hilton) Bold Sans () +200243=(Hilton) Ital Sans () +200244=(Hilton) Bold Ital Sans () +200251=(Progress) Sans () +200252=(Progress) Bold Sans () +200253=(Progress) Ital Sans () +200254=(Progress) Bold Ital Sans () +200261=(PrestigeElite) Sans () +200262=(PrestigeElite) Bold Sans () +200263=(PrestigeElite) Ital Sans () +200271=(Ovetti) Bold Sans () +200272=(Ovetti) Sans () +200301=(Cescendo) Sans () +200302=(Funky) Sans Decora () +200303=(Speed) Sans Decora () +200304=(Skyline) Sans Decora () +200305=(Calculator) Sans Decora () +200306=(Xpress) Sans Decora () +200307=(Console) Sans Decora () +200308=(Paisley) Sans () +200309=(Nova) Sans () +200310=(New York) Sans Decora () +200311=(Shanghai) Sans Decora () diff --git a/svtools/source/filter/sgfbram.cxx b/svtools/source/filter/sgfbram.cxx new file mode 100644 index 000000000000..3d1a71f5a2db --- /dev/null +++ b/svtools/source/filter/sgfbram.cxx @@ -0,0 +1,662 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#include +#include +#include +#include +#include +#include +#include "sgffilt.hxx" +#include "sgfbram.hxx" + +/************************************************************************* +|* +|* operator>>( SvStream&, SgfHeader& ) +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +SvStream& operator>>(SvStream& rIStream, SgfHeader& rHead) +{ + rIStream.Read((char*)&rHead.Magic,SgfHeaderSize); +#if defined OSL_BIGENDIAN + rHead.Magic =SWAPSHORT(rHead.Magic ); + rHead.Version=SWAPSHORT(rHead.Version); + rHead.Typ =SWAPSHORT(rHead.Typ ); + rHead.Xsize =SWAPSHORT(rHead.Xsize ); + rHead.Ysize =SWAPSHORT(rHead.Ysize ); + rHead.Xoffs =SWAPSHORT(rHead.Xoffs ); + rHead.Yoffs =SWAPSHORT(rHead.Yoffs ); + rHead.Planes =SWAPSHORT(rHead.Planes ); + rHead.SwGrCol=SWAPSHORT(rHead.SwGrCol); + rHead.OfsLo =SWAPSHORT(rHead.OfsLo ); + rHead.OfsHi =SWAPSHORT(rHead.OfsHi ); +#endif + return rIStream; +} + + +/************************************************************************* +|* +|* SgfHeader::ChkMagic() +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +BOOL SgfHeader::ChkMagic() +{ return Magic=='J'*256+'J'; } + +UINT32 SgfHeader::GetOffset() +{ return UINT32(OfsLo)+0x00010000*UINT32(OfsHi); } + + +/************************************************************************* +|* +|* operator>>( SvStream&, SgfEntry& ) +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +SvStream& operator>>(SvStream& rIStream, SgfEntry& rEntr) +{ + rIStream.Read((char*)&rEntr.Typ,SgfEntrySize); +#if defined OSL_BIGENDIAN + rEntr.Typ =SWAPSHORT(rEntr.Typ ); + rEntr.iFrei=SWAPSHORT(rEntr.iFrei); + rEntr.lFreiLo=SWAPSHORT (rEntr.lFreiLo); + rEntr.lFreiHi=SWAPSHORT (rEntr.lFreiHi); + rEntr.OfsLo=SWAPSHORT(rEntr.OfsLo); + rEntr.OfsHi=SWAPSHORT(rEntr.OfsHi); +#endif + return rIStream; +} + +UINT32 SgfEntry::GetOffset() +{ return UINT32(OfsLo)+0x00010000*UINT32(OfsHi); } + + +/************************************************************************* +|* +|* operator>>( SvStream&, SgfVector& ) +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +SvStream& operator>>(SvStream& rIStream, SgfVector& rVect) +{ + rIStream.Read((char*)&rVect,sizeof(rVect)); +#if defined OSL_BIGENDIAN + rVect.Flag =SWAPSHORT(rVect.Flag ); + rVect.x =SWAPSHORT(rVect.x ); + rVect.y =SWAPSHORT(rVect.y ); + rVect.OfsLo=SWAPLONG (rVect.OfsLo); + rVect.OfsHi=SWAPLONG (rVect.OfsHi); +#endif + return rIStream; +} + + +/************************************************************************* +|* +|* operator<<( SvStream&, BmpFileHeader& ) +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +SvStream& operator<<(SvStream& rOStream, BmpFileHeader& rHead) +{ +#if defined OSL_BIGENDIAN + rHead.Typ =SWAPSHORT(rHead.Typ ); + rHead.SizeLo =SWAPSHORT(rHead.SizeLo ); + rHead.SizeHi =SWAPSHORT(rHead.SizeHi ); + rHead.Reserve1=SWAPSHORT(rHead.Reserve1); + rHead.Reserve2=SWAPSHORT(rHead.Reserve2); + rHead.OfsLo =SWAPSHORT(rHead.OfsLo ); + rHead.OfsHi =SWAPSHORT(rHead.OfsHi ); +#endif + rOStream.Write((char*)&rHead,sizeof(rHead)); +#if defined OSL_BIGENDIAN + rHead.Typ =SWAPSHORT(rHead.Typ ); + rHead.SizeLo =SWAPSHORT(rHead.SizeLo ); + rHead.SizeHi =SWAPSHORT(rHead.SizeHi ); + rHead.Reserve1=SWAPSHORT(rHead.Reserve1); + rHead.Reserve2=SWAPSHORT(rHead.Reserve2); + rHead.OfsLo =SWAPSHORT(rHead.OfsLo ); + rHead.OfsHi =SWAPSHORT(rHead.OfsHi ); +#endif + return rOStream; +} + +void BmpFileHeader::SetSize(UINT32 Size) +{ + SizeLo=UINT16(Size & 0x0000FFFF); + SizeHi=UINT16((Size & 0xFFFF0000)>>16); +} + +void BmpFileHeader::SetOfs(UINT32 Ofs) +{ + OfsLo=UINT16(Ofs & 0x0000FFFF); + OfsHi=UINT16((Ofs & 0xFFFF0000)>>16); +} + +UINT32 BmpFileHeader::GetOfs() +{ + return UINT32(OfsLo)+0x00010000*UINT32(OfsHi); +} + +/************************************************************************* +|* +|* operator<<( SvStream&, BmpInfoHeader& ) +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +SvStream& operator<<(SvStream& rOStream, BmpInfoHeader& rInfo) +{ +#if defined OSL_BIGENDIAN + rInfo.Size =SWAPLONG (rInfo.Size ); + rInfo.Width =SWAPLONG (rInfo.Width ); + rInfo.Hight =SWAPLONG (rInfo.Hight ); + rInfo.Planes =SWAPSHORT(rInfo.Planes ); + rInfo.PixBits =SWAPSHORT(rInfo.PixBits ); + rInfo.Compress=SWAPLONG (rInfo.Compress); + rInfo.ImgSize =SWAPLONG (rInfo.ImgSize ); + rInfo.xDpmm =SWAPLONG (rInfo.xDpmm ); + rInfo.yDpmm =SWAPLONG (rInfo.yDpmm ); + rInfo.ColUsed =SWAPLONG (rInfo.ColUsed ); + rInfo.ColMust =SWAPLONG (rInfo.ColMust ); +#endif + rOStream.Write((char*)&rInfo,sizeof(rInfo)); +#if defined OSL_BIGENDIAN + rInfo.Size =SWAPLONG (rInfo.Size ); + rInfo.Width =SWAPLONG (rInfo.Width ); + rInfo.Hight =SWAPLONG (rInfo.Hight ); + rInfo.Planes =SWAPSHORT(rInfo.Planes ); + rInfo.PixBits =SWAPSHORT(rInfo.PixBits ); + rInfo.Compress=SWAPLONG (rInfo.Compress); + rInfo.ImgSize =SWAPLONG (rInfo.ImgSize ); + rInfo.xDpmm =SWAPLONG (rInfo.xDpmm ); + rInfo.yDpmm =SWAPLONG (rInfo.yDpmm ); + rInfo.ColUsed =SWAPLONG (rInfo.ColUsed ); + rInfo.ColMust =SWAPLONG (rInfo.ColMust ); +#endif + return rOStream; +} + + +/************************************************************************* +|* +|* operator<<( SvStream&, RGBQuad& ) +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +SvStream& operator<<(SvStream& rOStream, const RGBQuad& rQuad) +{ + rOStream.Write((char*)&rQuad,sizeof(rQuad)); + return rOStream; +} + + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// PcxExpand /////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class PcxExpand +{ +private: + USHORT Count; + BYTE Data; +public: + PcxExpand() { Count=0; } + BYTE GetByte(SvStream& rInp); +}; + +BYTE PcxExpand::GetByte(SvStream& rInp) +{ + if (Count>0) { + Count--; + } else { + rInp.Read((char*)&Data,1); + if ((Data & 0xC0) == 0xC0) { + Count=(Data & 0x3F) -1; + rInp.Read((char*)&Data,1); + } + } + return Data; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// SgfBMapFilter /////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + + +/************************************************************************* +|* +|* SgfFilterBmp() +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +BOOL SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&) +{ + BmpFileHeader aBmpHead; + BmpInfoHeader aBmpInfo; + USHORT nWdtInp=(rHead.Xsize+7)/8; // Breite der Input-Bitmap in Bytes + USHORT nWdtOut; // Breite der Output-Bitmap in Bytes + USHORT nColors; // Anzahl der Farben (1,16,256) + USHORT nColBits; // Anzahl der Bits/Pixel (2, 4, 8) + USHORT i,j,k; // Spaltenzaehler, Zeilenzaehler, Planezaehler + USHORT a,b; // Hilfsvariable + BYTE pl1 = 0,pl2= 0; // Masken fuer die Planes + BYTE* pBuf=NULL; // Buffer fuer eine Pixelzeile + PcxExpand aPcx; + ULONG nOfs; + BYTE cRGB[4]; + + if (rHead.Planes<=1) nColBits=1; else nColBits=4; if (rHead.Typ==4) nColBits=8; + nColors=1<>aHead; + if (aHead.ChkMagic() && (aHead.Typ==SgfBitImag0 || aHead.Typ==SgfBitImag1 || + aHead.Typ==SgfBitImag2 || aHead.Typ==SgfBitImgMo)) { + nNext=aHead.GetOffset(); + while (nNext && !bRdFlag && !rInp.GetError() && !rOut.GetError()) { + rInp.Seek(nFileStart+nNext); + rInp>>aEntr; + nNext=aEntr.GetOffset(); + if (aEntr.Typ==aHead.Typ) { + bRdFlag=TRUE; + switch(aEntr.Typ) { + case SgfBitImag0: + case SgfBitImag1: + case SgfBitImag2: + case SgfBitImgMo: bRet=SgfFilterBMap(rInp,rOut,aHead,aEntr); break; + } + } + } // while(nNext) + } + if (rInp.GetError()) bRet=FALSE; + return(bRet); +} + + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// SgfVectFilter /////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// Fuer StarDraw Embedded SGF-Vector +long SgfVectXofs=0; +long SgfVectYofs=0; +long SgfVectXmul=0; +long SgfVectYmul=0; +long SgfVectXdiv=0; +long SgfVectYdiv=0; +BOOL SgfVectScal=FALSE; + +//////////////////////////////////////////////////////////// +// Hpgl2SvFarbe //////////////////////////////////////////// +//////////////////////////////////////////////////////////// + +Color Hpgl2SvFarbe( BYTE nFarb ) +{ + ULONG nColor = COL_BLACK; + + switch (nFarb & 0x07) { + case 0: nColor=COL_WHITE; break; + case 1: nColor=COL_YELLOW; break; + case 2: nColor=COL_LIGHTMAGENTA; break; + case 3: nColor=COL_LIGHTRED; break; + case 4: nColor=COL_LIGHTCYAN; break; + case 5: nColor=COL_LIGHTGREEN; break; + case 6: nColor=COL_LIGHTBLUE; break; + case 7: nColor=COL_BLACK; break; + } + Color aColor( nColor ); + return aColor; +} + +/************************************************************************* +|* +|* SgfFilterVect() +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +BOOL SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMtf) +{ + VirtualDevice aOutDev; + SgfVector aVect; + BYTE nFarb; + BYTE nFrb0=7; + BYTE nLTyp; + BYTE nOTyp; + BOOL bEoDt=FALSE; + BOOL bPDwn=FALSE; + Point aP0(0,0); + Point aP1(0,0); + String Msg; + USHORT RecNr=0; + + rMtf.Record(&aOutDev); + aOutDev.SetLineColor(Color(COL_BLACK)); + aOutDev.SetFillColor(Color(COL_BLACK)); + + while (!bEoDt && !rInp.GetError()) { + rInp>>aVect; RecNr++; + nFarb=(BYTE) (aVect.Flag & 0x000F); + nLTyp=(BYTE)((aVect.Flag & 0x00F0) >>4); + nOTyp=(BYTE)((aVect.Flag & 0x0F00) >>8); + bEoDt=(aVect.Flag & 0x4000) !=0; + bPDwn=(aVect.Flag & 0x8000) !=0; + + long x=aVect.x-rHead.Xoffs; + long y=rHead.Ysize-(aVect.y-rHead.Yoffs); + if (SgfVectScal) { + if (SgfVectXdiv==0) SgfVectXdiv=rHead.Xsize; + if (SgfVectYdiv==0) SgfVectYdiv=rHead.Ysize; + if (SgfVectXdiv==0) SgfVectXdiv=1; + if (SgfVectYdiv==0) SgfVectYdiv=1; + x=SgfVectXofs+ x *SgfVectXmul /SgfVectXdiv; + y=SgfVectYofs+ y *SgfVectXmul /SgfVectYdiv; + } + aP1=Point(x,y); + if (!bEoDt && !rInp.GetError()) { + if (bPDwn && nLTyp<=6) { + switch(nOTyp) { + case 1: if (nFarb!=nFrb0) { + switch(rHead.SwGrCol) { + case SgfVectFarb: aOutDev.SetLineColor(Hpgl2SvFarbe(nFarb)); break; + case SgfVectGray: break; + case SgfVectWdth: break; + } + } + aOutDev.DrawLine(aP0,aP1); break; // Linie + case 2: break; // Kreis + case 3: break; // Text + case 5: aOutDev.DrawRect(Rectangle(aP0,aP1)); break; // Rechteck (solid) + } + } + aP0=aP1; + nFrb0=nFarb; + } + } + rMtf.Stop(); + rMtf.WindStart(); + MapMode aMap( MAP_10TH_MM, Point(), + Fraction( 1, 4 ), Fraction( 1, 4 ) ); + rMtf.SetPrefMapMode( aMap ); + rMtf.SetPrefSize( Size( (short)rHead.Xsize, (short)rHead.Ysize ) ); + return TRUE; +} + + +/************************************************************************* +|* +|* SgfVectFilter() +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +BOOL SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf) +{ + ULONG nFileStart; // Offset des SgfHeaders. Im allgemeinen 0. + SgfHeader aHead; + SgfEntry aEntr; + ULONG nNext; + BOOL bRdFlag=FALSE; // Grafikentry gelesen ? + BOOL bRet=FALSE; // Returncode + + nFileStart=rInp.Tell(); + rInp>>aHead; + if (aHead.ChkMagic() && aHead.Typ==SGF_SIMPVECT) { + nNext=aHead.GetOffset(); + while (nNext && !bRdFlag && !rInp.GetError()) { + rInp.Seek(nFileStart+nNext); + rInp>>aEntr; + nNext=aEntr.GetOffset(); + if (aEntr.Typ==aHead.Typ) { + bRet=SgfFilterVect(rInp,aHead,aEntr,rMtf); + } + } // while(nNext) + if (bRdFlag) { + if (!rInp.GetError()) bRet=TRUE; // Scheinbar Ok + } + } + return(bRet); +} + + +/************************************************************************* +|* +|* SgfFilterPScr() +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +BOOL SgfFilterPScr(SvStream&, SgfHeader&, SgfEntry&) +{ + return FALSE; // PostSrcipt wird noch nicht unterstuetzt ! +} + + +/************************************************************************* +|* +|* CheckSgfTyp() +|* +|* Beschreibung Feststellen, um was fuer ein SGF/SGV es sich handelt. +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +BYTE CheckSgfTyp(SvStream& rInp, USHORT& nVersion) +{ +#if OSL_DEBUG_LEVEL > 1 // Recordgroessen checken. Neuer Compiler hat vielleichte anderes Allignment! + if (sizeof(SgfHeader)!=SgfHeaderSize || + sizeof(SgfEntry) !=SgfEntrySize || + sizeof(SgfVector)!=SgfVectorSize || + sizeof(BmpFileHeader)!=BmpFileHeaderSize || + sizeof(BmpInfoHeader)!=BmpInfoHeaderSize || + sizeof(RGBQuad )!=RGBQuadSize ) return SGF_DONTKNOW; +#endif + + ULONG nPos; + SgfHeader aHead; + nVersion=0; + nPos=rInp.Tell(); + rInp>>aHead; + rInp.Seek(nPos); + if (aHead.ChkMagic()) { + nVersion=aHead.Version; + switch(aHead.Typ) { + case SgfBitImag0: + case SgfBitImag1: + case SgfBitImag2: + case SgfBitImgMo: return SGF_BITIMAGE; + case SgfSimpVect: return SGF_SIMPVECT; + case SgfPostScrp: return SGF_POSTSCRP; + case SgfStarDraw: return SGF_STARDRAW; + default : return SGF_DONTKNOW; + } + } else { + return SGF_DONTKNOW; + } +} diff --git a/svtools/source/filter/sgvmain.cxx b/svtools/source/filter/sgvmain.cxx new file mode 100644 index 000000000000..293c6dab7964 --- /dev/null +++ b/svtools/source/filter/sgvmain.cxx @@ -0,0 +1,1130 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#include +#include +#include +#include +#include +#include "sgffilt.hxx" +#include "sgfbram.hxx" +#include "sgvmain.hxx" +#include "sgvspln.hxx" +#include + +//#if OSL_DEBUG_LEVEL > 1 +//#include "Debug.c" +//#endif + +#define SWAPPOINT(p) { \ + p.x=SWAPSHORT(p.x); \ + p.y=SWAPSHORT(p.y); } + +#define SWAPPAGE(p) { \ + p.Next =SWAPLONG (p.Next ); \ + p.nList =SWAPLONG (p.nList ); \ + p.ListEnd=SWAPLONG (p.ListEnd); \ + p.Paper.Size.x=SWAPSHORT(p.Paper.Size.x); \ + p.Paper.Size.y=SWAPSHORT(p.Paper.Size.y); \ + p.Paper.RandL =SWAPSHORT(p.Paper.RandL ); \ + p.Paper.RandR =SWAPSHORT(p.Paper.RandR ); \ + p.Paper.RandO =SWAPSHORT(p.Paper.RandO ); \ + p.Paper.RandU =SWAPSHORT(p.Paper.RandU ); \ + SWAPPOINT(p.U); \ + UINT16 iTemp; \ + for (iTemp=0;iTemp<20;iTemp++) { \ + rPage.HlpLnH[iTemp]=SWAPSHORT(rPage.HlpLnH[iTemp]); \ + rPage.HlpLnV[iTemp]=SWAPSHORT(rPage.HlpLnV[iTemp]); }} + +#define SWAPOBJK(o) { \ + o.Last =SWAPLONG (o.Last ); \ + o.Next =SWAPLONG (o.Next ); \ + o.MemSize =SWAPSHORT(o.MemSize ); \ + SWAPPOINT(o.ObjMin); \ + SWAPPOINT(o.ObjMax); } + +#define SWAPLINE(l) { \ + l.LMSize=SWAPSHORT(l.LMSize); \ + l.LDicke=SWAPSHORT(l.LDicke); } + +#define SWAPAREA(a) { \ + a.FDummy2=SWAPSHORT(a.FDummy2); \ + a.FMuster=SWAPSHORT(a.FMuster); } + +#define SWAPTEXT(t) { \ + SWAPLINE(t.L); \ + SWAPAREA(t.F); \ + t.FontLo =SWAPSHORT(t.FontLo ); \ + t.FontHi =SWAPSHORT(t.FontHi ); \ + t.Grad =SWAPSHORT(t.Grad ); \ + t.Breite =SWAPSHORT(t.Breite ); \ + t.Schnitt=SWAPSHORT(t.Schnitt); \ + t.LnFeed =SWAPSHORT(t.LnFeed ); \ + t.Slant =SWAPSHORT(t.Slant ); \ + SWAPLINE(t.ShdL); \ + SWAPAREA(t.ShdF); \ + SWAPPOINT(t.ShdVers); \ + SWAPAREA(t.BackF); } + + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// Einschraenkungen: +// +// - Flaechenmuster werden den unter StarView verfuegbaren Mustern angenaehert. +// - Linienenden werden unter StarView immer rund dargestellt und gehen ueber +// den Endpunkt der Linie hinaus. +// - Linienmuster werden den unter StarView verfuegbaren Mustern angenaehert. +// Transparent/Opak wird zur Zeit noch nicht beruecksichtigt. +// - Keine gedrehten Ellipsen +// +// +// +// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Fuer Fontuebersetzung /////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +SgfFontLst* pSgfFonts = 0; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Fuer Kreisunterarten, Text und gedrehte Rechtecke /////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +void RotatePoint(PointType& P, INT16 cx, INT16 cy, double sn, double cs) +{ + INT16 dx,dy; + double x1,y1; + dx=P.x-cx; + dy=P.y-cy; + x1=dx*cs-dy*sn; + y1=dy*cs+dx*sn; + P.x=cx+INT16(x1); + P.y=cy+INT16(y1); +} + +void RotatePoint(Point& P, INT16 cx, INT16 cy, double sn, double cs) +{ + INT16 dx,dy; + double x1,y1; + dx=(INT16)(P.X()-cx); + dy=(INT16)(P.Y()-cy); + x1=dx*cs-dy*sn; + y1=dy*cs+dx*sn; + P=Point(cx+INT16(x1),cy+INT16(y1)); +} + +INT16 iMulDiv(INT16 a, INT16 Mul, INT16 Div) +{ + INT32 Temp; + Temp=INT32(a)*INT32(Mul)/INT32(Div); + return INT16(Temp); +} + +UINT16 MulDiv(UINT16 a, UINT16 Mul, UINT16 Div) +{ + UINT32 Temp; + Temp=UINT32(a)*UINT32(Mul)/UINT32(Div); + return UINT16(Temp); +} + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// SgfFilterSDrw /////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +SvStream& operator>>(SvStream& rIStream, DtHdType& rDtHd) +{ + rIStream.Read((char*)&rDtHd.Reserved[0],DtHdSize); + return rIStream; +} + +void DtHdOverSeek(SvStream& rInp) +{ + ULONG FPos=rInp.Tell(); + FPos+=(ULONG)DtHdSize; + rInp.Seek(FPos); +// rInp.seekg(rInp.tellg()+(ULONG)DtHdSize); +} + + +SvStream& operator>>(SvStream& rIStream, PageType& rPage) +{ + rIStream.Read((char*)&rPage.Next,PageSize); +#if defined OSL_BIGENDIAN + SWAPPAGE(rPage); +#endif + return rIStream; +} + +void ObjkOverSeek(SvStream& rInp, ObjkType& rObjk) +{ + ULONG Siz; + Siz=(ULONG)rObjk.MemSize+rObjk.Last; // ObjSize+ObjAnhSize + rInp.Seek(rInp.Tell()+Siz); +} + +SvStream& operator>>(SvStream& rInp, ObjkType& rObjk) +{ // Die Fileposition im Stream bleibt unveraendert! + ULONG nPos; + nPos=rInp.Tell(); + rInp.Read((char*)&rObjk.Last,ObjkSize); +#if defined OSL_BIGENDIAN + SWAPOBJK(rObjk); +#endif +#ifdef InArbeit + ULONG nPos1=rInp.Tell(); + if(nPos == nPos1) InfoBox( NULL, "tellg funkt nich" ).Execute(); +#endif + rInp.Seek(nPos); +#ifdef InArbeit + if (rInp.Tell() != nPos) InfoBox( NULL, "seekg funkt nich" ).Execute(); +#endif + return rInp; +} +SvStream& operator>>(SvStream& rInp, StrkType& rStrk) +{ + rInp.Read((char*)&rStrk.Last,StrkSize); +#if defined OSL_BIGENDIAN + SWAPOBJK (rStrk); + SWAPLINE (rStrk.L); + SWAPPOINT(rStrk.Pos1); + SWAPPOINT(rStrk.Pos2); +#endif + return rInp; +} +SvStream& operator>>(SvStream& rInp, RectType& rRect) +{ + rInp.Read((char*)&rRect.Last,RectSize); +#if defined OSL_BIGENDIAN + SWAPOBJK (rRect); + SWAPLINE (rRect.L); + SWAPAREA (rRect.F); + SWAPPOINT(rRect.Pos1); + SWAPPOINT(rRect.Pos2); + rRect.Radius =SWAPSHORT(rRect.Radius ); + rRect.DrehWink=SWAPSHORT(rRect.DrehWink); + rRect.Slant =SWAPSHORT(rRect.Slant ); +#endif + return rInp; +} +SvStream& operator>>(SvStream& rInp, PolyType& rPoly) +{ + rInp.Read((char*)&rPoly.Last,PolySize); +#if defined OSL_BIGENDIAN + SWAPOBJK (rPoly); + SWAPLINE (rPoly.L); + SWAPAREA (rPoly.F); + // rPoly.EckP=SWAPLONG(rPoly.EckP); +#endif + return rInp; +} +SvStream& operator>>(SvStream& rInp, SplnType& rSpln) +{ + rInp.Read((char*)&rSpln.Last,SplnSize); +#if defined OSL_BIGENDIAN + SWAPOBJK (rSpln); + SWAPLINE (rSpln.L); + SWAPAREA (rSpln.F); + // rSpln.EckP=SWAPLONG(rSpln.EckP); +#endif + return rInp; +} +SvStream& operator>>(SvStream& rInp, CircType& rCirc) +{ + rInp.Read((char*)&rCirc.Last,CircSize); +#if defined OSL_BIGENDIAN + SWAPOBJK (rCirc); + SWAPLINE (rCirc.L); + SWAPAREA (rCirc.F); + SWAPPOINT(rCirc.Radius); + SWAPPOINT(rCirc.Center); + rCirc.DrehWink =SWAPSHORT(rCirc.DrehWink ); + rCirc.StartWink=SWAPSHORT(rCirc.StartWink); + rCirc.RelWink =SWAPSHORT(rCirc.RelWink ); +#endif + return rInp; +} +SvStream& operator>>(SvStream& rInp, TextType& rText) +{ + rInp.Read((char*)&rText.Last,TextSize); +#if defined OSL_BIGENDIAN + SWAPOBJK (rText); + SWAPTEXT (rText.T); + SWAPPOINT(rText.Pos1); + SWAPPOINT(rText.Pos2); + rText.TopOfs =SWAPSHORT(rText.TopOfs ); + rText.DrehWink=SWAPSHORT(rText.DrehWink); + rText.BoxSlant=SWAPSHORT(rText.BoxSlant); + rText.BufSize =SWAPSHORT(rText.BufSize ); + //rText.Buf =SWAPLONG (rText.Buf ); + //rText.Ext =SWAPLONG (rText.Ext ); + SWAPPOINT(rText.FitSize); + rText.FitBreit=SWAPSHORT(rText.FitBreit); +#endif + rText.Buffer=NULL; + return rInp; +} +SvStream& operator>>(SvStream& rInp, BmapType& rBmap) +{ + rInp.Read((char*)&rBmap.Last,BmapSize); +#if defined OSL_BIGENDIAN + SWAPOBJK (rBmap); + SWAPAREA (rBmap.F); + SWAPPOINT(rBmap.Pos1); + SWAPPOINT(rBmap.Pos2); + rBmap.DrehWink=SWAPSHORT(rBmap.DrehWink); + rBmap.Slant =SWAPSHORT(rBmap.Slant ); + SWAPPOINT(rBmap.PixSize); +#endif + return rInp; +} +SvStream& operator>>(SvStream& rInp, GrupType& rGrup) +{ + rInp.Read((char*)&rGrup.Last,GrupSize); +#if defined OSL_BIGENDIAN + SWAPOBJK (rGrup); + rGrup.SbLo =SWAPSHORT(rGrup.SbLo ); + rGrup.SbHi =SWAPSHORT(rGrup.SbHi ); + rGrup.UpLo =SWAPSHORT(rGrup.UpLo ); + rGrup.UpHi =SWAPSHORT(rGrup.UpHi ); + rGrup.ChartSize=SWAPSHORT(rGrup.ChartSize); + rGrup.ChartPtr =SWAPLONG (rGrup.ChartPtr ); +#endif + return rInp; +} + + + +/************************************************************************* +|* +|* Sgv2SvFarbe() +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +Color Sgv2SvFarbe(BYTE nFrb1, BYTE nFrb2, BYTE nInts) +{ + UINT16 r1=0,g1=0,b1=0,r2=0,g2=0,b2=0; + BYTE nInt2=100-nInts; + switch(nFrb1 & 0x07) { + case 0: r1=0xFF; g1=0xFF; b1=0xFF; break; + case 1: r1=0xFF; g1=0xFF; break; + case 2: g1=0xFF; b1=0xFF; break; + case 3: g1=0xFF; break; + case 4: r1=0xFF; b1=0xFF; break; + case 5: r1=0xFF; break; + case 6: b1=0xFF; break; + case 7: break; + } + switch(nFrb2 & 0x07) { + case 0: r2=0xFF; g2=0xFF; b2=0xFF; break; + case 1: r2=0xFF; g2=0xFF; break; + case 2: g2=0xFF; b2=0xFF; break; + case 3: g2=0xFF; break; + case 4: r2=0xFF; b2=0xFF; break; + case 5: r2=0xFF; break; + case 6: b2=0xFF; break; + case 7: break; + } + r1=(UINT16)((UINT32)r1*nInts/100+(UINT32)r2*nInt2/100); + g1=(UINT16)((UINT32)g1*nInts/100+(UINT32)g2*nInt2/100); + b1=(UINT16)((UINT32)b1*nInts/100+(UINT32)b2*nInt2/100); + Color aColor( (sal_uInt8)r1, (sal_uInt8)g1, (sal_uInt8)b1 ); + return aColor; +} + +void SetLine(ObjLineType& rLine, OutputDevice& rOut) +{ +/* !!! + PenStyle aStyle=PEN_SOLID; + switch(rLine.LMuster & 0x07) { + case 0: aStyle=PEN_NULL; break; + case 1: aStyle=PEN_SOLID; break; + case 2: aStyle=PEN_DOT; break; // . . . . . . . . . . . . . . + case 3: aStyle=PEN_DASH; break; // __ __ __ __ __ __ __ __ __ + case 4: aStyle=PEN_DASH; break; // ___ ___ ___ ___ ___ ___ ___ + case 5: aStyle=PEN_DASHDOT; break; // __ . __ . __ . __ . __ . __ + case 6: aStyle=PEN_DASHDOT; break; // __ _ __ _ __ _ __ _ __ _ __ + case 7: aStyle=PEN_DASHDOT; break; // ___ _ _ ___ _ _ ___ _ _ ___ + } + Pen aPen(Sgv2SvFarbe(rLine.LFarbe,rLine.LBFarbe,rLine.LIntens),rLine.LDicke,aStyle); + SetPen(aPen,rOut); +*/ + if( 0 == ( rLine.LMuster & 0x07 ) ) + rOut.SetLineColor(); + else + rOut.SetLineColor( Sgv2SvFarbe(rLine.LFarbe,rLine.LBFarbe,rLine.LIntens) ); +} + +void SetArea(ObjAreaType& rArea, OutputDevice& rOut) +{ +/* + BrushStyle aStyle=BRUSH_SOLID; + switch(rArea.FMuster & 0x00FF) { + case 0: aStyle=BRUSH_NULL; break; + case 1: aStyle=BRUSH_SOLID; break; + case 2: case 4: case 6: case 8: + case 10: case 12: case 14: case 16: + case 43: case 45: aStyle=BRUSH_VERT; break; + case 3: case 5: case 7: case 9: + case 11: case 13: case 15: case 17: + case 42: case 44: aStyle=BRUSH_HORZ; break; + case 18: case 20: case 22: case 24: + case 26: case 28: case 30: case 32: + case 46: case 48: aStyle=BRUSH_UPDIAG; break; + case 19: case 21: case 23: case 25: + case 27: case 29: case 31: case 33: + case 47: case 49: aStyle=BRUSH_DOWNDIAG; break; + case 34: case 35: case 36: case 37: aStyle=BRUSH_CROSS; break; + case 38: case 39: case 40: case 41: aStyle=BRUSH_DIAGCROSS; break; + default: aStyle=BRUSH_DIAGCROSS; break; + } + Brush aBrush(Sgv2SvFarbe(rArea.FFarbe,rArea.FBFarbe,rArea.FIntens),aStyle); + aBrush.SetTransparent((rArea.FMuster & 0x80) !=0L); + SetBrush(aBrush,rOut); +*/ + if( 0 == ( rArea.FMuster & 0x00FF ) ) + rOut.SetFillColor(); + else + rOut.SetFillColor( Sgv2SvFarbe( rArea.FFarbe,rArea.FBFarbe,rArea.FIntens ) ); +} + +/************************************************************************* +|* +|* ObjkType::DrawObjekt() +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +void ObjkType::Draw(OutputDevice&) +{ +// ShowSDObjk(*this); +} + +void Obj0Type::Draw(OutputDevice&) {} + +/************************************************************************* +|* +|* StrkType::DrawObjekt() +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +void StrkType::Draw(OutputDevice& rOut) +{ + SetLine(L,rOut); + rOut.DrawLine(Point(Pos1.x,Pos1.y),Point(Pos2.x,Pos2.y)); // !!! +} + +/************************************************************************* +|* +|* RectType::DrawObjekt() +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +void SgfAreaColorIntens(UINT16 Muster, BYTE Col1, BYTE Col2, BYTE Int, OutputDevice& rOut) +{ + ObjAreaType F; + F.FMuster=Muster; + F.FFarbe=Col2; + F.FBFarbe=Col1; + F.FIntens=Int; + SetArea(F,rOut); +} + +void DrawSlideRect(INT16 x1, INT16 y1, INT16 x2, INT16 y2, ObjAreaType& F, OutputDevice& rOut) +{ + INT16 i,i0,b,b0; + INT16 Int1,Int2; + INT16 Col1,Col2; + // ClipMerk: HgdClipRec; + INT16 cx,cy; + INT16 MaxR; + INT32 dx,dy; + + rOut.SetLineColor(); + if (x1>x2) { i=x1; x1=x2; x2=i; } + if (y1>y2) { i=y1; y1=y2; y2=i; } + Col1=F.FBFarbe & 0x87; Col2=F.FFarbe & 0x87; + Int1=100-F.FIntens; Int2=F.FIntens; + if (Int1==Int2) { + SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut); + rOut.DrawRect(Rectangle(x1,y1,x2,y2)); + } else { + b0=Int1; + switch (F.FBFarbe & 0x38) { + case 0x08: { // vertikal + i0=y1; + i=y1; + while (i<=y2) { + b=Int1+INT16((INT32)(Int2-Int1)*(INT32)(i-y1) /(INT32)(y2-y1+1)); + if (b!=b0) { + SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut); + rOut.DrawRect(Rectangle(x1,i0,x2,i-1)); + i0=i; b0=b; + } + i++; + } + SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut); + rOut.DrawRect(Rectangle(x1,i0,x2,y2)); + } break; + case 0x28: { // horizontal + i0=x1; + i=x1; + while (i<=x2) { + b=Int1+INT16((INT32)(Int2-Int1)*(INT32)(i-x1) /(INT32)(x2-x1+1)); + if (b!=b0) { + SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut); + rOut.DrawRect(Rectangle(i0,y1,i-1,y2)); + i0=i; b0=b; + } + i++; + } + SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut); + rOut.DrawRect(Rectangle(i0,y1,x2,y2)); + } break; + + case 0x18: case 0x38: { // Kreis + Region ClipMerk=rOut.GetClipRegion(); + double a; + + rOut.SetClipRegion(Region(Rectangle(x1,y1,x2,y2))); + cx=(x1+x2) /2; + cy=(y1+y2) /2; + dx=x2-x1+1; + dy=y2-y1+1; + a=sqrt((double)(dx*dx+dy*dy)); + MaxR=INT16(a) /2 +1; + b0=Int2; + i0=MaxR; if (MaxR<1) MaxR=1; + i=MaxR; + while (i>=0) { + b=Int1+INT16((INT32(Int2-Int1)*INT32(i)) /INT32(MaxR)); + if (b!=b0) { + SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut); + //if (i0>200 || (Col1 & $80)!=0 || (Col2 & $80)!=0) { + // then begin { Fallunterscheidung fuer etwas bessere Performance } + // s2:=i0-i+2; + // SetPenSize(s2); + // s2:=s2 div 2; + // Circle(cx,cy,i0-s2,i0-s2);{} + // else + rOut.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0)); + i0=i; b0=b; + } + i--; + } + SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int1,rOut); + rOut.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0)); + rOut.SetClipRegion(ClipMerk); + } break; // Kreis + } + } +} + + +void RectType::Draw(OutputDevice& rOut) +{ + if (L.LMuster!=0) L.LMuster=1; // keine Linienmuster hier, nur an oder aus + SetArea(F,rOut); + if (DrehWink==0) { + if ((F.FBFarbe & 0x38)==0 || Radius!=0) { + SetLine(L,rOut); + rOut.DrawRect(Rectangle(Pos1.x,Pos1.y,Pos2.x,Pos2.y),Radius,Radius); + } else { + DrawSlideRect(Pos1.x,Pos1.y,Pos2.x,Pos2.y,F,rOut); + if (L.LMuster!=0) { + SetLine(L,rOut); + rOut.SetFillColor(); + rOut.DrawRect(Rectangle(Pos1.x,Pos1.y,Pos2.x,Pos2.y)); + } + } + } else { + Point aPts[4]; + USHORT i; + double sn,cs; + sn=sin(double(DrehWink)*3.14159265359/18000); + cs=cos(double(DrehWink)*3.14159265359/18000); + aPts[0]=Point(Pos1.x,Pos1.y); + aPts[1]=Point(Pos2.x,Pos1.y); + aPts[2]=Point(Pos2.x,Pos2.y); + aPts[3]=Point(Pos1.x,Pos2.y); + for (i=0;i<4;i++) { + RotatePoint(aPts[i],Pos1.x,Pos1.y,sn,cs); + } + SetLine(L,rOut); + Polygon aPoly(4,aPts); + rOut.DrawPolygon(aPoly); + } +} + +/************************************************************************* +|* +|* PolyType::Draw() +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +void PolyType::Draw(OutputDevice& rOut) +{ + if ((Flags & PolyClosBit) !=0) SetArea(F,rOut); + SetLine(L,rOut); + Polygon aPoly(nPoints); + USHORT i; + for(i=0;i0) rOut.DrawPolygon(aPoly); + } else { + Spline2Poly(aSpln,FALSE,aPoly); + if (aPoly.GetSize()>0) rOut.DrawPolyLine(aPoly); + } +} + +/************************************************************************* +|* +|* CircType::Draw() +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +void DrawSlideCirc(INT16 cx, INT16 cy, INT16 rx, INT16 ry, ObjAreaType& F, OutputDevice& rOut) +{ + INT16 x1=cx-rx; + INT16 y1=cy-ry; + INT16 x2=cx+rx; + INT16 y2=cy+ry; + + INT16 i,i0,b,b0; + INT16 Int1,Int2; + INT16 Col1,Col2; + + rOut.SetLineColor(); + Col1=F.FBFarbe & 0x87; Col2=F.FFarbe & 0x87; + Int1=100-F.FIntens; Int2=F.FIntens; + if (Int1==Int2) { + SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut); + rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); + } else { + b0=Int1; + switch (F.FBFarbe & 0x38) { + case 0x08: { // vertikal + Region ClipMerk=rOut.GetClipRegion(); + i0=y1; + i=y1; + while (i<=y2) { + b=Int1+INT16((INT32)(Int2-Int1)*(INT32)(i-y1) /(INT32)(y2-y1+1)); + if (b!=b0) { + SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut); + rOut.SetClipRegion(Rectangle(x1,i0,x2,i-1)); + rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); + i0=i; b0=b; + } + i++; + } + SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut); + rOut.SetClipRegion(Rectangle(x1,i0,x2,y2)); + rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); + rOut.SetClipRegion(ClipMerk); + } break; + case 0x28: { // horizontal + Region ClipMerk=rOut.GetClipRegion(); + i0=x1; + i=x1; + while (i<=x2) { + b=Int1+INT16((INT32)(Int2-Int1)*(INT32)(i-x1) /(INT32)(x2-x1+1)); + if (b!=b0) { + SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut); + rOut.SetClipRegion(Rectangle(i0,y1,i-1,y2)); + rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); + i0=i; b0=b; + } + i++; + } + SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut); + rOut.SetClipRegion(Rectangle(i0,y1,x2,y2)); + rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); + rOut.SetClipRegion(ClipMerk); + } break; + + case 0x18: case 0x38: { // Kreis + INT16 MaxR; + + if (rx<1) rx=1; + if (ry<1) ry=1; + MaxR=rx; + b0=Int2; + i0=MaxR; if (MaxR<1) MaxR=1; + i=MaxR; + while (i>=0) { + b=Int1+INT16((INT32(Int2-Int1)*INT32(i)) /INT32(MaxR)); + if (b!=b0) { + INT32 temp=INT32(i0)*INT32(ry)/INT32(rx); + INT16 j0=INT16(temp); + SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut); + rOut.DrawEllipse(Rectangle(cx-i0,cy-j0,cx+i0,cy+j0)); + i0=i; b0=b; + } + i--; + } + SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int1,rOut); + rOut.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0)); + } break; // Kreis + } + } +} + + +void CircType::Draw(OutputDevice& rOut) +{ + Rectangle aRect(Center.x-Radius.x,Center.y-Radius.y,Center.x+Radius.x,Center.y+Radius.y); + + if (L.LMuster!=0) L.LMuster=1; // keine Linienmuster hier, nur an oder aus + SetArea(F,rOut); + if ((Flags & 0x03)==CircFull) { + if ((F.FBFarbe & 0x38)==0) { + SetLine(L,rOut); + rOut.DrawEllipse(aRect); + } else { + DrawSlideCirc(Center.x,Center.y,Radius.x,Radius.y,F,rOut); + if (L.LMuster!=0) { + SetLine(L,rOut); + rOut.SetFillColor(); + rOut.DrawEllipse(aRect); + } + } + } else { + PointType a,b; + Point aStrt,aEnde; + double sn,cs; + + a.x=Center.x+Radius.x; a.y=Center.y; b=a; + sn=sin(double(StartWink)*3.14159265359/18000); + cs=cos(double(StartWink)*3.14159265359/18000); + RotatePoint(a,Center.x,Center.y,sn,cs); + sn=sin(double(StartWink+RelWink)*3.14159265359/18000); + cs=cos(double(StartWink+RelWink)*3.14159265359/18000); + RotatePoint(b,Center.x,Center.y,sn,cs); + if (Radius.x!=Radius.y) { + if (Radius.x<1) Radius.x=1; + if (Radius.y<1) Radius.y=1; + a.y = a.y - Center.y; + b.y = b.y - Center.y; + a.y=iMulDiv(a.y,Radius.y,Radius.x); + b.y=iMulDiv(b.y,Radius.y,Radius.x); + a.y = a.y + Center.y; + b.y = b.y + Center.y; + } + aStrt=Point(a.x,a.y); + aEnde=Point(b.x,b.y); + SetLine(L,rOut); + switch (Flags & 0x03) { + case CircArc : rOut.DrawArc(aRect,aEnde,aStrt); break; + case CircSect: + case CircAbsn: rOut.DrawPie(aRect,aEnde,aStrt); break; + } + } +} + +/************************************************************************* +|* +|* BmapType::Draw() +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ + +void BmapType::Draw(OutputDevice& rOut) +{ + //ifstream aInp; + unsigned char nSgfTyp; + USHORT nVersion; + String aStr( + reinterpret_cast< char const * >(&Filename[ 1 ]), + (xub_StrLen)Filename[ 0 ], RTL_TEXTENCODING_UTF8 ); + INetURLObject aFNam( aStr ); + + SvStream* pInp = ::utl::UcbStreamHelper::CreateStream( aFNam.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ ); + if ( pInp ) + { + nSgfTyp=CheckSgfTyp( *pInp,nVersion); + switch(nSgfTyp) { + case SGF_BITIMAGE: { + GraphicFilter aFlt; + Graphic aGrf; + USHORT nRet; + nRet=aFlt.ImportGraphic(aGrf,aFNam); + aGrf.Draw(&rOut,Point(Pos1.x,Pos1.y),Size(Pos2.x-Pos1.x,Pos2.y-Pos1.y)); + } break; + case SGF_SIMPVECT: { + GDIMetaFile aMtf; + SgfVectXofs=Pos1.x; + SgfVectYofs=Pos1.y; + SgfVectXmul=Pos2.x-Pos1.x; + SgfVectYmul=Pos2.y-Pos1.y; + SgfVectXdiv=0; + SgfVectYdiv=0; + SgfVectScal=TRUE; + SgfVectFilter(*pInp,aMtf); + SgfVectXofs=0; + SgfVectYofs=0; + SgfVectXmul=0; + SgfVectYmul=0; + SgfVectXdiv=0; + SgfVectYdiv=0; + SgfVectScal=FALSE; + aMtf.Play(&rOut); + } break; + } + delete pInp; + } +} + + +/************************************************************************* +|* +|* GrupType::... +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +UINT32 GrupType::GetSubPtr() +{ + return UINT32(SbLo)+0x00010000*UINT32(SbHi); +} + +/************************************************************************* +|* +|* DrawObjkList() +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +void DrawObjkList( SvStream& rInp, OutputDevice& rOut ) +{ + ObjkType aObjk; + USHORT nGrpCnt=0; + BOOL bEnde=FALSE; + do { + rInp>>aObjk; + if (!rInp.GetError()) { + switch(aObjk.Art) { + case ObjStrk: { StrkType aStrk; rInp>>aStrk; if (!rInp.GetError()) aStrk.Draw(rOut); } break; + case ObjRect: { RectType aRect; rInp>>aRect; if (!rInp.GetError()) aRect.Draw(rOut); } break; + case ObjCirc: { CircType aCirc; rInp>>aCirc; if (!rInp.GetError()) aCirc.Draw(rOut); } break; + case ObjText: { + TextType aText; + rInp>>aText; + if (!rInp.GetError()) { + aText.Buffer=new UCHAR[aText.BufSize+1]; // Ein mehr fuer LookAhead bei CK-Trennung + rInp.Read((char* )aText.Buffer,aText.BufSize); + if (!rInp.GetError()) aText.Draw(rOut); + delete[] aText.Buffer; + } + } break; + case ObjBmap: { + BmapType aBmap; + rInp>>aBmap; + if (!rInp.GetError()) { + aBmap.Draw(rOut); + } + } break; + case ObjPoly: { + PolyType aPoly; + rInp>>aPoly; + if (!rInp.GetError()) { + aPoly.EckP=new PointType[aPoly.nPoints]; + rInp.Read((char*)aPoly.EckP,4*aPoly.nPoints); +#if defined OSL_BIGENDIAN + for(short i=0;i>aSpln; + if (!rInp.GetError()) { + aSpln.EckP=new PointType[aSpln.nPoints]; + rInp.Read((char*)aSpln.EckP,4*aSpln.nPoints); +#if defined OSL_BIGENDIAN + for(short i=0;i>aGrup; + if (!rInp.GetError()) { + rInp.Seek(rInp.Tell()+aGrup.Last); // Obj-Anhaengsel + if(aGrup.GetSubPtr()!=0L) nGrpCnt++;// DrawObjkList(rInp,rOut ); + } + } break; + default: { + aObjk.Draw(rOut); // Objektbezeichnung auf 2. Screen + ObjkOverSeek(rInp,aObjk); // zum naechsten Objekt + } + } + } // if rInp + if (!rInp.GetError()) { + if (aObjk.Next==0L) { + if (nGrpCnt==0) bEnde=TRUE; + else nGrpCnt--; + } + } else { + bEnde=TRUE; // Lesefehler + } + } while (!bEnde); +} + +/************************************************************************* +|* +|* SkipObjkList() +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +void SkipObjkList(SvStream& rInp) +{ + ObjkType aObjk; + do + { + rInp>>aObjk; + if(aObjk.Art==ObjGrup) { + GrupType aGrup; + rInp>>aGrup; + rInp.Seek(rInp.Tell()+aGrup.Last); // Obj-Anhaengsel + if(aGrup.GetSubPtr()!=0L) SkipObjkList(rInp); + } else { + ObjkOverSeek(rInp,aObjk); // zum naechsten Objekt + } + } while (aObjk.Next!=0L && !rInp.GetError()); +} + +/************************************************************************* +|* +|* SgfFilterSDrw() +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +BOOL SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) +{ + BOOL bRet = FALSE; + PageType aPage; + VirtualDevice aOutDev; + OutputDevice* pOutDev; + ULONG nStdPos; + ULONG nZchPos; + USHORT Num; + + pOutDev=&aOutDev; + DtHdOverSeek(rInp); // DataHeader weglesen + + nStdPos=rInp.Tell(); + do { // Standardseiten weglesen + rInp>>aPage; + if (aPage.nList!=0) SkipObjkList(rInp); + } while (aPage.Next!=0L && !rInp.GetError()); + +// ShowMsg("Zeichnungseite(n)\n"); + nZchPos=rInp.Tell(); + rInp>>aPage; + + rMtf.Record(pOutDev); + Num=aPage.StdPg; + if (Num!=0) { + rInp.Seek(nStdPos); + while(Num>1 && aPage.Next!=0L && !rInp.GetError()) { // Standardseite suchen + rInp>>aPage; + if (aPage.nList!=0) SkipObjkList(rInp); + Num--; + } + rInp>>aPage; + if(Num==1 && aPage.nList!=0L) DrawObjkList( rInp,*pOutDev ); + rInp.Seek(nZchPos); + nZchPos=rInp.Tell(); + rInp>>aPage; + } + if (aPage.nList!=0L) DrawObjkList(rInp,*pOutDev ); + + rMtf.Stop(); + rMtf.WindStart(); + MapMode aMap(MAP_10TH_MM,Point(),Fraction(1,4),Fraction(1,4)); + rMtf.SetPrefMapMode(aMap); + rMtf.SetPrefSize(Size((INT16)aPage.Paper.Size.x,(INT16)aPage.Paper.Size.y)); + bRet=TRUE; + return bRet; +} + + + +/************************************************************************* +|* +|* SgfSDrwFilter() +|* +|* Beschreibung +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +BOOL SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath ) +{ +#if OSL_DEBUG_LEVEL > 1 // Recordgroessen checken. Neuer Compiler hat vielleichte anderes Alignment! + if (sizeof(ObjTextType)!=ObjTextTypeSize) return FALSE; +#endif + + ULONG nFileStart; // Offset des SgfHeaders. Im allgemeinen 0. + SgfHeader aHead; + SgfEntry aEntr; + ULONG nNext; + BOOL bRdFlag=FALSE; // Grafikentry gelesen ? + BOOL bRet=FALSE; // Returncode + + aIniPath.Append( String::CreateFromAscii( "sgf.ini", 7 ) ); +// aIniPath.ToAbs(); + + pSgfFonts = new SgfFontLst; + + pSgfFonts->AssignFN( aIniPath.GetMainURL( INetURLObject::NO_DECODE ) ); + nFileStart=rInp.Tell(); + rInp>>aHead; + if (aHead.ChkMagic() && aHead.Typ==SgfStarDraw && aHead.Version==SGV_VERSION) { + nNext=aHead.GetOffset(); + while (nNext && !bRdFlag && !rInp.GetError()) { + rInp.Seek(nFileStart+nNext); + rInp>>aEntr; + nNext=aEntr.GetOffset(); + if (aEntr.Typ==aHead.Typ) { + bRet=SgfFilterSDrw( rInp,aHead,aEntr,rMtf ); + } + } // while(nNext) + if (bRdFlag) { + if (!rInp.GetError()) bRet=TRUE; // Scheinbar Ok + } + } + delete pSgfFonts; + return(bRet); +} + +/* +Bitmap Dither(BYTE Intens) +{ + Bitmap aBmp; + BmpInfoHeader Info; + + +const dmatrix: array[0..7,0..7] of byte = + (( 0, 48, 12, 60, 3, 51, 15, 63 ), + ( 32, 16, 44, 28, 35, 19, 47, 31 ), + ( 8, 56, 4, 52, 11, 59, 7, 55 ), + ( 40, 24, 36, 20, 43, 27, 39, 23 ), + ( 2, 50, 14, 62, 1, 49, 13, 61 ), + ( 34, 18, 46, 30, 33, 17, 45, 29 ), + ( 10, 58, 6, 54, 9, 57, 5, 53 ), + ( 42, 26, 38, 22, 41, 25, 37, 21 )); + + + cmatrix: array[0..7,0..7] of byte; + dmatrixn,dmatrixi: array[0..7] of byte; + + +procedure SetColorIntens(col0,col1,bal: integer); +var cmatrix0: array[0..63] of byte absolute cmatrix; + dmatrix0: array[0..63] of byte absolute dmatrix; + n,i: integer; + b,bit: byte; +begin +if col0=col1 then bal:=0; +if bal<=32 then + begin + plotcolor0:=col0 and $1F; plotcolor1:=col1 and $1F; + plotbal:=bal; + end +else + begin + plotcolor0:=col1 and $1F; plotcolor1:=col0 and $1F; + plotbal:=64-bal; + end; +for n:=0 to 63 do + if plotbal<=dmatrix0[n] then cmatrix0[n]:=col0 else cmatrix0[n]:=col1; +end; +*/ + diff --git a/svtools/source/filter/sgvspln.cxx b/svtools/source/filter/sgvspln.cxx new file mode 100644 index 000000000000..d695e171a194 --- /dev/null +++ b/svtools/source/filter/sgvspln.cxx @@ -0,0 +1,890 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#include + + +#include + +#if defined( PM2 ) && defined( __BORLANDC__ ) +#pragma option -Od +#endif + +extern "C" { + +/*.pn 277 */ +/*.hlAnhang: C - Programme*/ +/*.hrKonstanten- und Macro-Definitionen*/ +/*.fe Die Include-Datei u_const.h ist in das Verzeichnis zu stellen, */ +/*.fe wo der Compiler nach Include-Dateien sucht. */ + + +/*----------------------- FILE u_const.h ---------------------------*/ + +#define IEEE + +/* IEEE - Norm fuer die Darstellung von Gleitkommazahlen: + + 8 Byte lange Gleitkommazahlen, mit + + 53 Bit Mantisse ==> Mantissenbereich: 2 hoch 52 versch. Zahlen + mit 0.1 <= Zahl < 1.0, + 1 Vorzeichen-Bit + 11 Bit Exponent ==> Exponentenbereich: -1024...+1023 + + Die 1. Zeile ( #define IEEE ) ist zu loeschen, falls die Maschine + bzw. der Compiler keine Gleitpunktzahlen gemaess der IEEE-Norm + benutzt. Zusaetzlich muessen die Zahlen MAXEXPON, MINEXPON + (s.u.) angepasst werden. + */ + +#ifdef IEEE /*----------- Falls IEEE Norm --------------------*/ + +#define MACH_EPS 2.220446049250313e-016 /* Maschinengenauigkeit */ + /* IBM-AT: = 2 hoch -52 */ +/* MACH_EPS ist die kleinste positive, auf der Maschine darstellbare + Zahl x, die der Bedingung genuegt: 1.0 + x > 1.0 */ + +#define EPSQUAD 4.930380657631324e-032 +#define EPSROOT 1.490116119384766e-008 + +#define POSMAX 8.98846567431158e+307 /* groesste positive Zahl */ +#define POSMIN 5.56268464626800e-309 /* kleinste positive Zahl */ +#define MAXROOT 9.48075190810918e+153 + +#define BASIS 2 /* Basis der Zahlendarst. */ +#ifndef PI +#define PI 3.141592653589793e+000 +#endif +#define EXP_1 2.718281828459045e+000 + +#else /*------------------ sonst -----------------------*/ + +double exp (double); +double atan (double); +double pow (double,double); +double sqrt (double); + +double masch() /* MACH_EPS maschinenunabhaengig bestimmen */ +{ + double eps = 1.0, x = 2.0, y = 1.0; + while ( y < x ) + { eps *= 0.5; + x = 1.0 + eps; + } + eps *= 2.0; return (eps); +} + +short basis() /* BASIS maschinenunabhaengig bestimmen */ +{ + double x = 1.0, one = 1.0, b = 1.0; + + while ( (x + one) - x == one ) x *= 2.0; + while ( (x + b) == x ) b *= 2.0; + + return ( (short) ((x + b) - x) ); +} + +#define BASIS basis() /* Basis der Zahlendarst. */ + +/* Falls die Maschine (der Compiler) keine IEEE-Darstellung fuer + Gleitkommazahlen nutzt, muessen die folgenden 2 Konstanten an- + gepasst werden. + */ + +#define MAXEXPON 1023.0 /* groesster Exponent */ +#define MINEXPON -1024.0 /* kleinster Exponent */ + + +#define MACH_EPS masch() +#define EPSQUAD MACH_EPS * MACH_EPS +#define EPSROOT sqrt(MACH_EPS) + +#define POSMAX pow ((double) BASIS, MAXEXPON) +#define POSMIN pow ((double) BASIS, MINEXPON) +#define MAXROOT sqrt(POSMAX) + +#define PI 4.0 * atan (1.0) +#define EXP_1 exp(1.0) + +#endif /*-------------- ENDE ifdef ----------------------*/ + + +#define NEGMAX -POSMIN /* groesste negative Zahl */ +#define NEGMIN -POSMAX /* kleinste negative Zahl */ + +#define TRUE 1 +#define FALSE 0 + + +/* Definition von Funktionsmakros: + */ + +#define abs(X) ((X) >= 0 ? (X) : -(X)) /* Absolutbetrag von X */ +#define sign(X, Y) (Y < 0 ? -abs(X) : abs(X)) /* Vorzeichen von */ + /* Y mal abs(X) */ +#define sqr(X) ((X) * (X)) /* Quadrat von X */ + +/*------------------- ENDE FILE u_const.h --------------------------*/ + + + + + + + + + +/*.HL Anhang: C - Programme*/ +/*.HRGleichungssysteme fuer Tridiagonalmatrizen*/ + +/*.FE P 3.7 TRIDIAGONALE GLEICHUNGSSYSTEME*/ + + +/*---------------------- MODUL TRIDIAGONAL ------------------------*/ + +USHORT TriDiagGS(BOOL rep, USHORT n, double* lower, + double* diag, double* upper, double* b) + /************************/ + /* GAUSS-Verfahren fuer */ + /* Tridiagonalmatrizen */ + /************************/ + +/*====================================================================*/ +/* */ +/* trdiag bestimmt die Loesung x des linearen Gleichungssystems */ +/* A * x = b mit tridiagonaler n x n Koeffizientenmatrix A, die in */ +/* den 3 Vektoren lower, upper und diag wie folgt abgespeichert ist: */ +/* */ +/* ( diag[0] upper[0] 0 0 . . . 0 ) */ +/* ( lower[1] diag[1] upper[1] 0 . . . ) */ +/* ( 0 lower[2] diag[2] upper[2] 0 . ) */ +/* A = ( . 0 lower[3] . . . ) */ +/* ( . . . . . 0 ) */ +/* ( . . . . . ) */ +/* ( . . . upper[n-2] ) */ +/* ( 0 . . . 0 lower[n-1] diag[n-1] ) */ +/* */ +/*====================================================================*/ +/* */ +/* Anwendung: */ +/* ========= */ +/* Vorwiegend fuer diagonaldominante Tridiagonalmatrizen, wie */ +/* sie bei der Spline-Interpolation auftreten. */ +/* Fuer diagonaldominante Matrizen existiert immer eine LU- */ +/* Zerlegung; fuer nicht diagonaldominante Tridiagonalmatrizen */ +/* sollte die Funktion band vorgezogen werden, da diese mit */ +/* Spaltenpivotsuche arbeitet und daher numerisch stabiler ist. */ +/* */ +/*====================================================================*/ +/* */ +/* Eingabeparameter: */ +/* ================ */ +/* n Dimension der Matrix ( > 1 ) USHORT n */ +/* */ +/* lower untere Nebendiagonale double lower[n] */ +/* diag Hauptdiagonale double diag[n] */ +/* upper obere Nebendiagonale double upper[n] */ +/* */ +/* bei rep != 0 enthalten lower, diag und upper die */ +/* Dreieckzerlegung der Ausgangsmatrix. */ +/* */ +/* b rechte Seite des Systems double b[n] */ +/* rep = 0 erstmaliger Aufruf BOOL rep */ +/* !=0 wiederholter Aufruf */ +/* fuer gleiche Matrix, */ +/* aber verschiedenes b. */ +/* */ +/* Ausgabeparameter: */ +/* ================ */ +/* b Loesungsvektor des Systems; double b[n] */ +/* die urspruengliche rechte Seite wird ueberspeichert */ +/* */ +/* lower ) enthalten bei rep = 0 die Zerlegung der Matrix; */ +/* diag ) die urspruenglichen Werte von lower u. diag werden */ +/* upper ) ueberschrieben */ +/* */ +/* Die Determinante der Matrix ist bei rep = 0 durch */ +/* det A = diag[0] * ... * diag[n-1] bestimmt. */ +/* */ +/* Rueckgabewert: */ +/* ============= */ +/* = 0 alles ok */ +/* = 1 n < 2 gewaehlt */ +/* = 2 Die Dreieckzerlegung der Matrix existiert nicht */ +/* */ +/*====================================================================*/ +/* */ +/* Benutzte Funktionen: */ +/* =================== */ +/* */ +/* Aus der C Bibliothek: fabs() */ +/* */ +/*====================================================================*/ + +/*.cp 5 */ +{ + USHORT i; + short j; + +// double fabs(double); + + if ( n < 2 ) return(1); /* n mindestens 2 */ + + /* Wenn rep = 0 ist, */ + /* Dreieckzerlegung der */ + if (rep == 0) /* Matrix u. det be- */ + { /* stimmen */ + for (i = 1; i < n; i++) + { if ( fabs(diag[i-1]) < MACH_EPS ) /* Wenn ein diag[i] = 0 */ + return(2); /* ist, ex. keine Zerle- */ + lower[i] /= diag[i-1]; /* gung. */ + diag[i] -= lower[i] * upper[i-1]; + } + } + + if ( fabs(diag[n-1]) < MACH_EPS ) return(2); + + for (i = 1; i < n; i++) /* Vorwaertselimination */ + b[i] -= lower[i] * b[i-1]; + + b[n-1] /= diag[n-1]; /* Rueckwaertselimination */ + for (j = n-2; j >= 0; j--) { + i=j; + b[i] = ( b[i] - upper[i] * b[i+1] ) / diag[i]; + } + return(0); +} + +/*----------------------- ENDE TRIDIAGONAL -------------------------*/ + + + + + + + + + +/*.HL Anhang: C - Programme*/ +/*.HRGleichungssysteme mit zyklisch tridiagonalen Matrizen*/ + +/*.FE P 3.8 SYSTEME MIT ZYKLISCHEN TRIDIAGONALMATRIZEN */ + + +/*---------------- MODUL ZYKLISCH TRIDIAGONAL ----------------------*/ + + +USHORT ZyklTriDiagGS(BOOL rep, USHORT n, double* lower, double* diag, + double* upper, double* lowrow, double* ricol, double* b) + /******************************/ + /* Systeme mit zyklisch tri- */ + /* diagonalen Matrizen */ + /******************************/ + +/*====================================================================*/ +/* */ +/* tzdiag bestimmt die Loesung x des linearen Gleichungssystems */ +/* A * x = b mit zyklisch tridiagonaler n x n Koeffizienten- */ +/* matrix A, die in den 5 Vektoren lower, upper, diag, lowrow und */ +/* ricol wie folgt abgespeichert ist: */ +/* */ +/* ( diag[0] upper[0] 0 0 . . 0 ricol[0] ) */ +/* ( lower[1] diag[1] upper[1] 0 . . 0 ) */ +/* ( 0 lower[2] diag[2] upper[2] 0 . ) */ +/* A = ( . 0 lower[3] . . . . ) */ +/* ( . . . . . 0 ) */ +/* ( . . . . . ) */ +/* ( 0 . . . upper[n-2] ) */ +/* ( lowrow[0] 0 . . 0 lower[n-1] diag[n-1] ) */ +/* */ +/* Speicherplatz fuer lowrow[1],..,lowrow[n-3] und ricol[1],..., */ +/* ricol[n-3] muss zusaetzlich bereitgestellt werden, da dieser */ +/* fuer die Aufnahme der Zerlegungsmatrix verfuegbar sein muss, die */ +/* auf die 5 genannten Vektoren ueberspeichert wird. */ +/* */ +/*====================================================================*/ +/* */ +/* Anwendung: */ +/* ========= */ +/* Vorwiegend fuer diagonaldominante zyklische Tridiagonalmatri- */ +/* zen wie sie bei der Spline-Interpolation auftreten. */ +/* Fuer diagonaldominante Matrizen existiert immer eine LU- */ +/* Zerlegung. */ +/* */ +/*====================================================================*/ +/* */ +/* Eingabeparameter: */ +/* ================ */ +/* n Dimension der Matrix ( > 2 ) USHORT n */ +/* lower untere Nebendiagonale double lower[n] */ +/* diag Hauptdiagonale double diag[n] */ +/* upper obere Nebendiagonale double upper[n] */ +/* b rechte Seite des Systems double b[n] */ +/* rep = 0 erstmaliger Aufruf BOOL rep */ +/* !=0 wiederholter Aufruf */ +/* fuer gleiche Matrix, */ +/* aber verschiedenes b. */ +/* */ +/* Ausgabeparameter: */ +/* ================ */ +/* b Loesungsvektor des Systems, double b[n] */ +/* die urspruengliche rechte Seite wird ueberspeichert */ +/* */ +/* lower ) enthalten bei rep = 0 die Zerlegung der Matrix; */ +/* diag ) die urspruenglichen Werte von lower u. diag werden */ +/* upper ) ueberschrieben */ +/* lowrow ) double lowrow[n-2] */ +/* ricol ) double ricol[n-2] */ +/* */ +/* Die Determinante der Matrix ist bei rep = 0 durch */ +/* det A = diag[0] * ... * diag[n-1] bestimmt. */ +/* */ +/* Rueckgabewert: */ +/* ============= */ +/* = 0 alles ok */ +/* = 1 n < 3 gewaehlt */ +/* = 2 Die Zerlegungsmatrix existiert nicht */ +/* */ +/*====================================================================*/ +/* */ +/* Benutzte Funktionen: */ +/* =================== */ +/* */ +/* Aus der C Bibliothek: fabs() */ +/* */ +/*====================================================================*/ + +/*.cp 5 */ +{ + double temp; // fabs(double); + USHORT i; + short j; + + if ( n < 3 ) return(1); + + if (rep == 0) /* Wenn rep = 0 ist, */ + { /* Zerlegung der */ + lower[0] = upper[n-1] = 0.0; /* Matrix berechnen. */ + + if ( fabs (diag[0]) < MACH_EPS ) return(2); + /* Ist ein Diagonalelement */ + temp = 1.0 / diag[0]; /* betragsmaessig kleiner */ + upper[0] *= temp; /* MACH_EPS, so ex. keine */ + ricol[0] *= temp; /* Zerlegung. */ + + for (i = 1; i < n-2; i++) + { diag[i] -= lower[i] * upper[i-1]; + if ( fabs(diag[i]) < MACH_EPS ) return(2); + temp = 1.0 / diag[i]; + upper[i] *= temp; + ricol[i] = -lower[i] * ricol[i-1] * temp; + } + + diag[n-2] -= lower[n-2] * upper[n-3]; + if ( fabs(diag[n-2]) < MACH_EPS ) return(2); + + for (i = 1; i < n-2; i++) + lowrow[i] = -lowrow[i-1] * upper[i-1]; + + lower[n-1] -= lowrow[n-3] * upper[n-3]; + upper[n-2] = ( upper[n-2] - lower[n-2] * ricol[n-3] ) / diag[n-2]; + + for (temp = 0.0, i = 0; i < n-2; i++) + temp -= lowrow[i] * ricol[i]; + diag[n-1] += temp - lower[n-1] * upper[n-2]; + + if ( fabs(diag[n-1]) < MACH_EPS ) return(2); + } /* end if ( rep == 0 ) */ + + b[0] /= diag[0]; /* Vorwaertselemination */ + for (i = 1; i < n-1; i++) + b[i] = ( b[i] - b[i-1] * lower[i] ) / diag[i]; + + for (temp = 0.0, i = 0; i < n-2; i++) + temp -= lowrow[i] * b[i]; + + b[n-1] = ( b[n-1] + temp - lower[n-1] * b[n-2] ) / diag[n-1]; + + b[n-2] -= b[n-1] * upper[n-2]; /* Rueckwaertselimination */ + for (j = n-3; j >= 0; j--) { + i=j; + b[i] -= upper[i] * b[i+1] + ricol[i] * b[n-1]; + } + return(0); +} + +/*------------------ ENDE ZYKLISCH TRIDIAGONAL ---------------------*/ + + +} // extern "C" + + +/************************************************************************* +|* +|* NaturalSpline() +|* +|* Beschreibung Berechnet die Koeffizienten eines natuerlichen +|* kubischen Polynomsplines mit n Stuetzstellen. +|* Ersterstellung JOE 17-08.93 +|* Letzte Aenderung JOE 17-08.93 +|* +*************************************************************************/ + +USHORT NaturalSpline(USHORT n, double* x, double* y, + double Marg0, double MargN, + BYTE MargCond, + double* b, double* c, double* d) +{ + USHORT i; + double* a; + double* h; + USHORT error; + + if (n<2) return 1; + if ( (MargCond & ~3) ) return 2; + a=new double[n+1]; + h=new double[n+1]; + for (i=0;i=MAXROOT) { + alphX=0.0; + alphY=sign(1.0,y[1]-y[0]); + } else { + alphX=sign(sqrt(1.0/(1.0+Marg01*Marg01)),x[1]-x[0]); + alphY=alphX*Marg01; + } + if (abs(MargN1)>=MAXROOT) { + betX=0.0; + betY=sign(1.0,y[n]-y[n-1]); + } else { + betX=sign(sqrt(1.0/(1.0+MargN1*MargN1)),x[n]-x[n-1]); + betY=betX*MargN1; + } + } + } // switch MargCond + if (MargCond==3) { + Error=PeriodicSpline(n,T,x,bx,cx,dx); + if (Error!=0) return(Error+4); + Error=PeriodicSpline(n,T,y,by,cy,dy); + if (Error!=0) return(Error+10); + } else { + Error=NaturalSpline(n,T,x,alphX,betX,MargCond,bx,cx,dx); + if (Error!=0) return(Error+4); + Error=NaturalSpline(n,T,y,alphY,betY,MargCond,by,cy,dy); + if (Error!=0) return(Error+9); + } + return 0; +} + + + +/************************************************************************* +|* +|* CalcSpline() +|* +|* Beschreibung Berechnet die Koeffizienten eines parametrischen +|* natuerlichen oder periodischen kubischen +|* Polynomsplines. Die Eckpunkte des uebergebenen +|* Polygons werden als Stuetzstellen angenommen. +|* n liefert die Anzahl der Teilpolynome. +|* Ist die Berechnung fehlerfrei verlaufen, so +|* liefert die Funktion TRUE. Nur in diesem Fall +|* ist Speicher fuer die Koeffizientenarrays +|* allokiert, der dann spaeter vom Aufrufer mittels +|* delete freizugeben ist. +|* Ersterstellung JOE 17-08.93 +|* Letzte Aenderung JOE 17-08.93 +|* +*************************************************************************/ + +BOOL CalcSpline(Polygon& rPoly, BOOL Periodic, USHORT& n, + double*& ax, double*& ay, double*& bx, double*& by, + double*& cx, double*& cy, double*& dx, double*& dy, double*& T) +{ + BYTE Marg; + double Marg01,Marg02; + double MargN1,MargN2; + USHORT i; + Point P0(-32768,-32768); + Point Pt; + + n=rPoly.GetSize(); + ax=new double[rPoly.GetSize()+2]; + ay=new double[rPoly.GetSize()+2]; + + n=0; + for (i=0;i0) n--; // n Korregieren (Anzahl der Teilpolynome) + + BOOL bRet = FALSE; + if ( ( Marg == 3 && n >= 3 ) || ( Marg == 2 && n >= 2 ) ) + { + bRet = ParaSpline(n,ax,ay,Marg,Marg01,Marg01,MargN1,MargN2,FALSE,T,bx,cx,dx,by,cy,dy) == 0; + } + if ( bRet == FALSE ) + { + delete[] ax; + delete[] ay; + delete[] bx; + delete[] by; + delete[] cx; + delete[] cy; + delete[] dx; + delete[] dy; + delete[] T; + n=0; + } + return bRet; +} + + +/************************************************************************* +|* +|* Spline2Poly() +|* +|* Beschreibung Konvertiert einen parametrichen kubischen +|* Polynomspline Spline (natuerlich oder periodisch) +|* in ein angenaehertes Polygon. +|* Die Funktion liefert FALSE, wenn ein Fehler bei +|* der Koeffizientenberechnung aufgetreten ist oder +|* das Polygon zu gross wird (>PolyMax=16380). Im 1. +|* Fall hat das Polygon 0, im 2. Fall PolyMax Punkte. +|* Um Koordinatenueberlaeufe zu vermeiden werden diese +|* auf +/-32000 begrenzt. +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +BOOL Spline2Poly(Polygon& rSpln, BOOL Periodic, Polygon& rPoly) +{ + short MinKoord=-32000; // zur Vermeidung + short MaxKoord=32000; // von Ueberlaeufen + + double* ax; // Koeffizienten der Polynome + double* ay; + double* bx; + double* by; + double* cx; + double* cy; + double* dx; + double* dy; + double* tv; + + double Step; // Schrittweite fuer t + double dt1,dt2,dt3; // Delta t, y, ^3 + double t; + BOOL bEnde; // Teilpolynom zu Ende? + USHORT n; // Anzahl der zu zeichnenden Teilpolynome + USHORT i; // aktuelles Teilpolynom + BOOL bOk; // noch alles ok? + USHORT PolyMax=16380;// Maximale Anzahl von Polygonpunkten + long x,y; + + bOk=CalcSpline(rSpln,Periodic,n,ax,ay,bx,by,cx,cy,dx,dy,tv); + if (bOk) { + Step =10; + + rPoly.SetSize(1); + rPoly.SetPoint(Point(short(ax[0]),short(ay[0])),0); // erster Punkt + i=0; + while (i=tv[i+1]; + if (bEnde) t=tv[i+1]; + dt1=t-tv[i]; dt2=dt1*dt1; dt3=dt2*dt1; + x=long(ax[i]+bx[i]*dt1+cx[i]*dt2+dx[i]*dt3); + y=long(ay[i]+by[i]*dt1+cy[i]*dt2+dy[i]*dt3); + if (xMaxKoord) x=MaxKoord; + if (yMaxKoord) y=MaxKoord; + if (rPoly.GetSize() + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#include +#include +#include +#include "sgffilt.hxx" +#include "sgfbram.hxx" +#include "sgvmain.hxx" +// #include "Debug.c" + +extern SgfFontLst* pSgfFonts; + +#ifndef abs +#define abs(x) ((x)<0 ? -(x) : (x)) +#endif + + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// Einschraenkungen: Schatten nur grau, 2D und mit fixem Abstand. +// +// +// +// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +// AbsBase.Pas + +// die folgenden Werte sind in % vom maximalen Schriftgrad der Zeile */ +#define UndlSpace 5 /* Untersteichungsabstand von der Baseline */ +#define UndlWidth 6 /* Untersteichungsdicke */ +#define UndlSpac2 7 /* Zwischenraum bei doppelter Unterstreichung */ +#define StrkSpace 25 /* Abstand der Durchstreichlinie von der Baseline*/ +#define StrkWidth 5 /* Durchstreichungsliniendicke */ +#define StrkSpac2 7 /* Zwischenraum bei doppelter Durchstreichung */ +#define OutlWidth 2 /* Strichstaerke ist 2% vom Schriftgrad */ + +// vvv Sonderzeichen im TextBuffer vvv +#define TextEnd 0 /* ^@ Ende der Zeichenkette */ +#define HardSpace 6 /* ^F Hartspace (wird nicht umbrochen) ,' ' */ +#define GrafText 7 /* ^G Im Text eingebundene Grafik (future) */ +#define Tabulator 9 /* ^I Tabulatorzeichen, Pfeil */ +#define LineFeed 10 /* ^J Neue Zeile */ +#define SoftTrennK 11 /* ^K Zeichen fuer k-c-Austausch bei Trennung, 'k' */ +#define AbsatzEnd 13 /* ^M Neuer Absatz =CR */ +#define HardTrenn 16 /* ^P Hartes Trennzeichen (wird nicht umbrochen), '-' */ +#define SoftTrennAdd 19 /* ^S Zusatz-Zeichen Trennung von z.b."Schiff-fahrt" */ +#define Paragraf 21 /* ^U Zeichen welches fuer Paragraf-Zeichen */ +#define Escape 27 /* ^[ Escapesequenz einleiten */ +#define SoftTrenn 31 /* ^_ Weiches Trennzeichen, '-' nur Zeilenende */ +#define MaxEscValLen 8 +#define MaxEscLen (MaxEscValLen+3) + +//============================================================================== +// Escapesequenzen: [Esc][Esc] also mind. 4 Char +// Max. Laenge von Value soll sein: 8 Char (7+Vorzeichen). Demnach max. Laenge +// einer Escapesequenz: 11 Char. +// Identifer: + +#define EscFont 'F' /* FontID, z.B. 92500 fuer CG Times */ +#define EscGrad 'G' /* Schriftgrad 1..255 fuer <0)) || + ((F.FBFarbe!=L.LBFarbe) && (F.FIntens<100)); +} + + +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +// Misc.Pas + +short hPoint2Sgf(short a) +{ + long b; + b=long(a)*127*SgfDpmm/(144*5); + return short(b); +} + +short Sgf2hPoint(short a) +{ + long b; + b=long(a)*5*144/(127*SgfDpmm); + return short(b); +} + +// End of Misc.Pas +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// + + + +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +// AbsRead.Pas + +// ====================================================================== +// Function GetTopToBaseLine() Function GetBaseLineToBtm() +// +// Abstand von Zeilenoberkante bis BaseLine bzw. von BaseLine bis +// Unterkante berechnen. Alles in SGF-Units. +// ====================================================================== + +USHORT GetTopToBaseLine(USHORT MaxGrad) +{ + long ret; + ret=long(MaxGrad)*long(CharTopToBase) /long(100); + return USHORT(ret); +} + +// ====================================================================== +// Function GetTextChar() Function GetTextCharConv() +// +// Liest ein Zeichen aus dem Textbuffer, wertet dabei eventuell +// auftretende Escapesequenzen aus und setzt dementsprechend den +// Ein-/Ausgabeparameter AktAtr. Index wird entsprechend erhoeht. +// Der Parameter Rest muss immer die Anzahl der Zeichen beinhalten, +// den angeforderten Zeichen in der aktuellen Zeile noch folgen. +// Ansonsten funktioniert die Silbentrennung nicht richtig. Gibt man +// stattdessen die Konstante NoTrenn an, wird in keinem Fall +// getrennt, die Konstante DoTrenn bewirkt dagegen, dass ueberall dort +// getrennt wird, wo ein SoftTrenner vorkommt. +// +// SoftTrenner werden immer in ein Minuszeichen konvertiert. +// GetTextCharConv() konvertiert zusaetzlich HardSpace und AbsatzEnde +// in Spaces sowie HardTrenner in Minuszeichen. TextEnde wird immer +// als Char(0) geliefert. +// ====================================================================== + + + +UCHAR ConvertTextChar(UCHAR c) +{ + if (c<32) { + switch (c) { + case HardSpace : c=' '; break; + case AbsatzEnd : c=' '; break; + case SoftTrenn : c='-'; break; + case HardTrenn : c='-'; break; + case SoftTrennK : c='-'; break; + case SoftTrennAdd: c='-'; + } + } + return c; +} + + + +USHORT GetSchnittBit(UCHAR c) +{ + USHORT r=0; + switch (c) { + case EscBold : r=TextBoldBit; break; + case EscRSlnt: r=TextRSlnBit; break; + case EscUndln: r=TextUndlBit; break; + case EscStrik: r=TextStrkBit; break; + case EscDbUnd: r=TextDbUnBit; break; + case EscDbStk: r=TextDbStBit; break; + case EscSupSc: r=TextSupSBit; break; + case EscSubSc: r=TextSubSBit; break; + case EscKaptF: r=TextKaptBit; break; + case EscLSlnt: r=TextLSlnBit; break; + case Esc2DShd: r=TextSh2DBit; break; + case Esc3DShd: r=TextSh3DBit; break; + case Esc4DShd: r=TextSh4DBit; break; + case EscEbShd: r=TextShEbBit; + } + return r; +} + + + +long ChgValue(long Def, long Min, long Max, UCHAR FlgVal, long NumVal) +{ + long r=0; + + if (FlgVal==EscDeflt) { + r=Def; // zurueck auf Default + } else { + if (NumVal!=EscNoVal) r=NumVal; // Hart setzen + } + + if (Min!=0 || Max!=0) { + if (r>Max) r=Max; + if (r'9'); + if (EoVal==FALSE) { c=TBuf[Index]; Index++; } + i--; + } while (i>0 && EoVal==FALSE); + NumVal=Sgn*NumVal; + } + q=!CheckTextOutl(AktAtr.F,AktAtr.L); + + switch (Ident) { + case EscFont : AktAtr.SetFont(ULONG (ChgValue(Atr0.GetFont(),0,0 ,FlgVal,NumVal)));break; + case EscGrad : AktAtr.Grad =USHORT(ChgValue(Atr0.Grad, 2,2000 ,FlgVal,NumVal)); break; + case EscBreit: AktAtr.Breite =USHORT(ChgValue(Atr0.Breite, 1,1000 ,FlgVal,NumVal)); break; + case EscKaptS: AktAtr.Kapit =(BYTE)(ChgValue(Atr0.Kapit, 1,255 ,FlgVal,NumVal)); break; + case EscLFeed: AktAtr.LnFeed =USHORT(ChgValue(Atr0.LnFeed, 1,65535 ,FlgVal,NumVal)); break; + case EscSlant: AktAtr.Slant =USHORT(ChgValue(Atr0.Slant, 1,MaxCharSlant ,FlgVal,NumVal)); break; + case EscVPos : AktAtr.ChrVPos=char (ChgValue(Atr0.ChrVPos,-128,127 ,FlgVal,NumVal)); break; + case EscZAbst: AktAtr.ZAbst =(BYTE)(ChgValue(Atr0.ZAbst, 1,255 ,FlgVal,NumVal)); break; + case EscHJust: AktAtr.Justify=(BYTE)(ChgValue(Atr0.Justify & 0x0F,0,5 ,FlgVal,NumVal)); break; + case EscFarbe: { AktAtr.L.LFarbe =(BYTE)(ChgValue(Atr0.L.LFarbe,0,7 ,FlgVal,NumVal)); if (q) AktAtr.F.FFarbe =AktAtr.L.LFarbe; } break; + case EscBFarb: { AktAtr.L.LBFarbe=(BYTE)(ChgValue(Atr0.L.LBFarbe,0,255,FlgVal,NumVal)); if (q) AktAtr.F.FBFarbe=AktAtr.L.LBFarbe; } break; + case EscInts : { AktAtr.L.LIntens=(BYTE)(ChgValue(Atr0.L.LIntens,0,100,FlgVal,NumVal)); if (q) AktAtr.F.FIntens=AktAtr.L.LIntens; } break; + + case EscMustr: { AktAtr.F.FMuster=USHORT(ChgValue(Atr0.F.FMuster,0,65535,FlgVal,NumVal)); } break; + case EscMFarb: { AktAtr.F.FFarbe =(BYTE)(ChgValue(Atr0.F.FFarbe,0,7 ,FlgVal,NumVal)); } break; + case EscMBFrb: { AktAtr.F.FBFarbe=(BYTE)(ChgValue(Atr0.F.FBFarbe,0,255,FlgVal,NumVal)); } break; + case EscMInts: { AktAtr.F.FIntens=(BYTE)(ChgValue(Atr0.F.FIntens,0,100,FlgVal,NumVal)); } break; + + case EscSMstr: { AktAtr.ShdF.FMuster=USHORT(ChgValue(Atr0.ShdF.FMuster,0,65535,FlgVal,NumVal)); } break; + case EscSFarb: { AktAtr.ShdL.LFarbe =(BYTE)(ChgValue(Atr0.ShdL.LFarbe,0,7 ,FlgVal,NumVal)); AktAtr.ShdF.FFarbe =AktAtr.ShdL.LFarbe; } break; + case EscSBFrb: { AktAtr.ShdL.LBFarbe=(BYTE)(ChgValue(Atr0.ShdL.LBFarbe,0,255,FlgVal,NumVal)); AktAtr.ShdF.FBFarbe=AktAtr.ShdL.LBFarbe; } break; + case EscSInts: { AktAtr.ShdL.LIntens=(BYTE)(ChgValue(Atr0.ShdL.LIntens,0,100,FlgVal,NumVal)); AktAtr.ShdF.FIntens=AktAtr.ShdL.LIntens; } break; + case EscSDist: { AktAtr.ShdVers.x=(short)ChgValue(Atr0.ShdVers.x,0,30000,FlgVal,NumVal); AktAtr.ShdVers.y=AktAtr.ShdVers.x; } break; + case EscSXDst: { AktAtr.ShdVers.x=(short)ChgValue(Atr0.ShdVers.x,0,30000,FlgVal,NumVal); } break; + case EscSYDst: { AktAtr.ShdVers.y=(short)ChgValue(Atr0.ShdVers.y,0,30000,FlgVal,NumVal); } break; + + case EscBold : ChgSchnittBit(TextBoldBit,0,0,0 ,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; + case EscRSlnt: ChgSchnittBit(TextRSlnBit,TextLSlnBit,0,0 ,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; + case EscUndln: ChgSchnittBit(TextUndlBit,TextDbUnBit,0,0 ,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; + case EscStrik: ChgSchnittBit(TextStrkBit,TextDbStBit,0,0 ,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; + case EscDbUnd: ChgSchnittBit(TextDbUnBit,TextUndlBit,0,0 ,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; + case EscDbStk: ChgSchnittBit(TextDbStBit,TextStrkBit,0,0 ,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; + case EscSupSc: ChgSchnittBit(TextSupSBit,TextSubSBit,0,0 ,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; + case EscSubSc: ChgSchnittBit(TextSubSBit,TextSupSBit,0,0 ,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; + case EscKaptF: ChgSchnittBit(TextKaptBit,0,0,0 ,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; + case EscLSlnt: ChgSchnittBit(TextLSlnBit,TextRSlnBit,0,0 ,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; + case Esc2DShd: ChgSchnittBit(TextSh2DBit,TextSh3DBit,TextSh4DBit,TextShEbBit,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; + case Esc3DShd: ChgSchnittBit(TextSh3DBit,TextSh2DBit,TextSh4DBit,TextShEbBit,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; + case Esc4DShd: ChgSchnittBit(TextSh4DBit,TextSh2DBit,TextSh3DBit,TextShEbBit,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; + case EscEbShd: ChgSchnittBit(TextShEbBit,TextSh2DBit,TextSh3DBit,TextSh4DBit,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; + } //endcase + if (TBuf[Index]==Escape) Index++; // zweites Esc weglesen } + } // if Ende==FALSE + } while (Ende==FALSE && ScanEsc==FALSE); + if (Ende==FALSE) c=Escape; + return c; +} // end of ProcessOne + + +UCHAR GetTextChar(UCHAR* TBuf, USHORT& Index, + ObjTextType& Atr0, ObjTextType& AktAtr, + USHORT Rest, BOOL ScanEsc) +{ + UCHAR c,c0,nc; + + c=ProcessOne(TBuf,Index,Atr0,AktAtr,ScanEsc); + if (ScanEsc==FALSE) { + if (c==SoftTrennAdd || c==SoftTrennK || c==SoftTrenn) { + nc=GetNextChar(TBuf,Index); + c0=c; + if (Rest==0 || Rest==DoTrenn || + nc==' ' || nc==AbsatzEnd || nc==TextEnd) c='-'; + else { + c=ProcessOne(TBuf,Index,Atr0,AktAtr,ScanEsc); // den Trenner ueberspringen + if (c0==SoftTrennAdd) { + if (c>=32) c=ProcessOne(TBuf,Index,Atr0,AktAtr,ScanEsc); // und hier noch 'nen Buchstaben ueberspringen + } + } + } + if ((Rest==1 || Rest==DoTrenn) && GetNextChar(TBuf,Index)==SoftTrennK) { + if (c=='c') c='k'; + else if (c=='C') c='K'; + } + } + return c; +} + + // HardSpace und HardTrenn muessen explizit konvertiert werden ! } + // if AktAtr.Schnitt and TextKaptBit =TextKaptBit then c:=UpCase(c);(explizit) } + + // Bei der Trennmethode SoftTrennAdd wird davon ausgegangen, dass der zu } + // trennende Konsonant bereits 3x mal im TextBuf vorhanden ist, z.b.: } + // "Schiff-fahrt". Wenn nicht getrennt, dann wird "-f" entfernt. } + + + +UCHAR GetTextCharConv(UCHAR* TBuf, USHORT& Index, + ObjTextType& Atr0, ObjTextType& AktAtr, + USHORT Rest, BOOL ScanEsc) +{ + UCHAR c; + + c=GetTextChar(TBuf,Index,Atr0,AktAtr,Rest,ScanEsc); + if (c<32) { + switch (c) { + case HardSpace : c=' '; break; + case AbsatzEnd : c=' '; break; + case HardTrenn : c='-'; + } + } + return c; +} + + +// ====================================================================== +// Function GetLineFeed() +// +// Benoetigter Zeilenabstand in SGF-Units. ChrVPos wird beruecksichtigt. +// ====================================================================== +USHORT GetLineFeed(UCHAR* TBuf, USHORT Index, ObjTextType Atr0, ObjTextType AktAtr, + USHORT nChar, USHORT& LF, USHORT& MaxGrad) +{ + UCHAR c=0; + BOOL AbsEnd=FALSE; + ULONG LF100=0; + ULONG MaxLF100=0; + BOOL LFauto=0; + BOOL First=TRUE; + USHORT Grad; + USHORT i=0; + USHORT r=1; + + MaxGrad=0; + while (!AbsEnd && nChar>0) { + nChar--; + c=GetTextChar(TBuf,Index,Atr0,AktAtr,nChar,FALSE); + i++; + AbsEnd=(c==TextEnd || c==AbsatzEnd); + if (First || (!AbsEnd && c!=' ' && c!=HardTrenn)) { + LFauto=(AktAtr.LnFeed & 0x8000)==0; + LF100=AktAtr.LnFeed & 0x7FFF; + if (LFauto) LF100=LF100*AktAtr.Grad; else LF100*=LF100; + if (AktAtr.ChrVPos>0) LF100-=AktAtr.ChrVPos*100; + if (LF100>MaxLF100) MaxLF100=LF100; + Grad=AktAtr.Grad; + if (AktAtr.ChrVPos>0) Grad=Grad-AktAtr.ChrVPos; + if (Grad>MaxGrad) MaxGrad=Grad; + First=FALSE; + } + if (!AbsEnd && c!=' ') r=i; + } + MaxGrad=hPoint2Sgf(MaxGrad); + if (MaxLF100<=4000) { // sonst Overflowgefahr + LF=USHORT(hPoint2Sgf(short(MaxLF100)) /100); + } else { + LF=USHORT(hPoint2Sgf(short(MaxLF100) /100)); + } + + return r; +} + +// End of AbsRead.Pas +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// + + + +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +// iFont.Pas + +#define DefaultSlant 1500 /* Default: Italic ist 15deg */ +#define SuperSubFact 60 /* SuperScript/SubScript: 60% vom Schriftgrad */ +#define DefaultSpace 40 /* Default: Space ist 40% vom SchriftGrad */ + +USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dreh, + USHORT FitXMul, USHORT FitXDiv, USHORT FitYMul, USHORT FitYDiv) +{ + SgfFontOne* pSgfFont; // Font aus dem IniFile + Font aFont; + Color aColor; + ULONG Grad; + ULONG Brei; + String FNam; + USHORT StdBrei=50; // Durchschnittliche Zeichenbreite in % von Schriftgrad + BOOL bFit=(FitXMul!=1 || FitXDiv!=1 || FitYMul!=1 || FitYDiv!=1); + + pSgfFont = pSgfFonts->GetFontDesc(Atr.GetFont()); + + if ( pSgfFont!=NULL ) + { + FNam =pSgfFont->SVFName; + StdBrei=pSgfFont->SVWidth; + if (pSgfFont->Fixd) aFont.SetPitch(PITCH_FIXED); else aFont.SetPitch(PITCH_VARIABLE); + aFont.SetFamily(pSgfFont->SVFamil); + aFont.SetCharSet(pSgfFont->SVChSet); + aFont.SetName(FNam); + } + else + { // Falls nich im Inifile, sind hier einige Fonts hart kodiert + aFont.SetPitch(PITCH_VARIABLE); + switch (Atr.GetFont()) { + case 92500: case 92501: case 92504: case 92505: + { +#if defined(WNT) || defined(PM2) + FNam=String::CreateFromAscii( "Times New Roman" ); // CG Times ist unter Windows und OS/2 Times New Roman +#else + FNam=String::CreateFromAscii( "Times" ); // ansonsten ist das einfach Times +#endif + StdBrei=40; + aFont.SetFamily(FAMILY_ROMAN); + } break; + case 94021: case 94022: case 94023: case 94024: { +#if defined(WNT) + FNam=String::CreateFromAscii( "Arial", 5 ); // Univers ist unter Windows Arial +#else + FNam=String::CreateFromAscii( "Helvetica" ); // und ansonsten Helvetica +#endif + aFont.SetFamily(FAMILY_SWISS); + StdBrei=47; + } break; + case 93950: case 93951: case 93952: case 93953: { +#if defined(WNT) + FNam=String::CreateFromAscii( "Courier New" ); // Der Vector-Courierfont unter Windows heisst Courier New +#else + FNam=String::CreateFromAscii( "Courier" ); // ansonsten ist und bleibt Courier immer Courier +#endif + aFont.SetFamily(FAMILY_ROMAN); + aFont.SetPitch(PITCH_FIXED); + } break; + default: FNam=String::CreateFromAscii( "Helvetica", 9 ); + } + aFont.SetName(FNam); + //aFont.SetCharSet(CHARSET_SYSTEM); + } + + Grad=ULONG(Atr.Grad); + if ((Atr.Schnitt & TextKaptBit) !=0 && Kapt) Grad=Grad*ULONG(Atr.Kapit)/100; + if ((Atr.Schnitt & TextSupSBit) !=0 || (Atr.Schnitt & TextSubSBit) !=0) Grad=Grad*SuperSubFact/100; + Brei=Grad; + if (Atr.Breite!=100 || bFit) { + if (bFit) { + Grad=Grad*ULONG(FitYMul)/ULONG(FitYDiv); + Brei=Brei*ULONG(FitXMul)/ULONG(FitXDiv); + } + Brei=Brei*ULONG(Atr.Breite)/100; + Brei=Brei*ULONG(StdBrei)/100; + aFont.SetSize(Size(hPoint2Sgf(USHORT(Brei)),hPoint2Sgf(USHORT(Grad)))); + } else { + aFont.SetSize(Size(0,hPoint2Sgf(USHORT(Grad)))); + } + + aColor=Sgv2SvFarbe(Atr.L.LFarbe,Atr.L.LBFarbe,Atr.L.LIntens); aFont.SetColor(aColor); + aColor=Sgv2SvFarbe(Atr.F.FFarbe,Atr.F.FBFarbe,Atr.F.FIntens); aFont.SetFillColor(aColor); + aFont.SetTransparent(TRUE); + aFont.SetAlign(ALIGN_BASELINE); + + Dreh/=10; Dreh=3600-Dreh; if (Dreh==3600) Dreh=0; + aFont.SetOrientation(Dreh); + + if ((Atr.Schnitt & TextBoldBit) !=0) aFont.SetWeight(WEIGHT_BOLD); + if ((Atr.Schnitt & TextRSlnBit) !=0) aFont.SetItalic(ITALIC_NORMAL); + if ((Atr.Schnitt & TextUndlBit) !=0) aFont.SetUnderline(UNDERLINE_SINGLE); + if ((Atr.Schnitt & TextDbUnBit) !=0) aFont.SetUnderline(UNDERLINE_DOUBLE); + if ((Atr.Schnitt & TextStrkBit) !=0) aFont.SetStrikeout(STRIKEOUT_SINGLE); + if ((Atr.Schnitt & TextDbStBit) !=0) aFont.SetStrikeout(STRIKEOUT_DOUBLE); + if ((Atr.Schnitt & TextSh2DBit) !=0) aFont.SetShadow(TRUE); + if ((Atr.Schnitt & TextSh3DBit) !=0) aFont.SetShadow(TRUE); + if ((Atr.Schnitt & TextSh4DBit) !=0) aFont.SetShadow(TRUE); + if ((Atr.Schnitt & TextShEbBit) !=0) aFont.SetShadow(TRUE); + if (CheckTextOutl(Atr.F,Atr.L)) aFont.SetOutline(TRUE); + + if (aFont!=rOut.GetFont()) rOut.SetFont(aFont); + + return 0; +} + +// iFont.Pas +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +// Absatz.Pas + +struct ProcChrSta { + USHORT Index; + USHORT ChrXP; + UCHAR OutCh; + BOOL Kapt; + ObjTextType Attrib; +}; + +void InitProcessCharState(ProcChrSta& State, ObjTextType& AktAtr, USHORT IndexA) +{ + State.Attrib=AktAtr; + State.OutCh=0; + State.Index=IndexA; + State.ChrXP=0; + State.Kapt=FALSE; +} + +BOOL UpcasePossible(UCHAR c) +{ + if ((c>='a' && c<='z') || c == 0xe4 || c == 0xf6 || c == 0xfc ) return TRUE; + else return FALSE; +} + +UCHAR Upcase(UCHAR c) +{ + if ((c>=(UCHAR)'a' && c<=(UCHAR)'z')) c=(c-(UCHAR)'a')+(UCHAR)'A'; + else if ( c == 0xe4 ) c = 0xc4; + else if ( c == 0xf6 ) c = 0xd6; + else if ( c == 0xfc ) c = 0xdc; + return c; +} + +USHORT GetCharWidth(OutputDevice& rOut, UCHAR c) +{ + UCHAR c1; + USHORT ChrWidth; + + c1 = ByteString::Convert((char)c,RTL_TEXTENCODING_IBM_437, gsl_getSystemTextEncoding() ); + if (c==' ') + { + ChrWidth=(USHORT)rOut.GetTextWidth( String('A') ); + if (rOut.GetFont().GetPitch()!=PITCH_FIXED) { + ChrWidth=MulDiv(ChrWidth,DefaultSpace,100); + } + } else { + // with MaxChar == 255 c cannot be greater than MaxChar + // assert if MaxChar is ever changed + OSL_ENSURE( MaxChar == 255, "MaxChar not 255" ); + if (c>=MinChar /*&& c<=MaxChar*/) + { + ChrWidth=(USHORT)rOut.GetTextWidth(String((char)c1)); + } + else + { + ChrWidth=(USHORT)rOut.GetTextWidth(String('A')); + } + } + return ChrWidth; +} + +UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, ProcChrSta& R, ObjTextType& Atr0, + USHORT& nChars, USHORT Rest, + short* Line, UCHAR* cLine) +{ + USHORT KernDist=0; // Wert fuer Kerning + USHORT ChrWidth; + UCHAR c; + UCHAR c1; + BOOL AbsEnd; + + c=GetTextChar(TBuf,R.Index,Atr0,R.Attrib,Rest,FALSE); // versucht evtl. zu trennen, wenn Rest entsprechenden Wert besitzt + + AbsEnd=(c==AbsatzEnd || c==TextEnd); + if (AbsEnd==FALSE) { + R.OutCh=ConvertTextChar(c); // von HardTrenn nach '-', ... + R.Kapt=(R.Attrib.Schnitt & TextKaptBit) !=0 && UpcasePossible(R.OutCh); + if (R.Kapt) R.OutCh=Upcase(R.OutCh); + SetTextContext(rOut,R.Attrib,R.Kapt,0,1,1,1,1); + + if (R.Kapt) c1=Upcase(c); else c1=c; + ChrWidth=GetCharWidth(rOut,c1); + + if (R.Attrib.ZAbst!=100) { // Spezial-Zeichenabstand ? + ULONG Temp; + Temp=ULONG(ChrWidth)*ULONG(R.Attrib.ZAbst)/100; + ChrWidth=USHORT(Temp); + } + nChars++; + if (R.ChrXP>32000) R.ChrXP=32000; + Line[nChars]=R.ChrXP-KernDist; + cLine[nChars]=c; + R.ChrXP+=ChrWidth-KernDist; // Position fuer den naechsten Character + } + return c; +} + +void FormatLine(UCHAR* TBuf, USHORT& Index, ObjTextType& Atr0, ObjTextType& AktAtr, + USHORT UmbWdt, USHORT AdjWdt, + short* Line, USHORT& nChars, + double, double, + UCHAR* cLine, BOOL TextFit) +{ + VirtualDevice vOut; + UCHAR c,c0; + UCHAR ct; + BOOL First; // erster Char ? + BYTE Just = 0; // Absatzformatierung + BOOL Border; // Rand der Box erreicht ? + BOOL Border0; + BOOL AbsEnd; // Ende des Absatzes erreicht ? + ProcChrSta* R=new ProcChrSta; + ProcChrSta* R0=new ProcChrSta; + ProcChrSta* WErec=new ProcChrSta; + USHORT WEnChar; + ProcChrSta* WErec0=new ProcChrSta; + USHORT WEnChar0; + ProcChrSta* TRrec=new ProcChrSta; + USHORT TRnChar; + + USHORT WordEndCnt; // Justieren und Trennen + BOOL WordEnd; + BOOL Trenn; + + short BoxRest; // zum Quetschen und formatieren + USHORT i,j,k,h; + USHORT re,li; + + vOut.SetMapMode(MapMode(MAP_10TH_MM,Point(),Fraction(1,4),Fraction(1,4))); + + nChars=0; + SetTextContext(vOut,AktAtr,FALSE,0,1,1,1,1); + InitProcessCharState(*R,AktAtr,Index); + (*R0)=(*R); (*WErec)=(*R); WEnChar=0; c0=0; Border0=FALSE; + Border=FALSE; First=TRUE; + WordEndCnt=0; + + do { // mal schauen, wieviele Worte so in die Zeile passen + if (Border) c=ProcessChar(vOut,TBuf,*R,Atr0,nChars,DoTrenn,Line,cLine); + else c=ProcessChar(vOut,TBuf,*R,Atr0,nChars,NoTrenn,Line,cLine); + AbsEnd=(c==AbsatzEnd || c==TextEnd); + //if not AbsEnd then + { + if (First) { + Just=R->Attrib.Justify & 0x0F; // Absatzformat steht wenn, dann am Anfang + } + Border=R->ChrXP>UmbWdt; + WordEnd=(AbsEnd || (c==' ')) && (c0!=' ') && (c0!=0); + Trenn=c=='-'; + if (WordEnd && !Border0) { + WordEndCnt++; + (*WErec)=(*R0); + WEnChar=nChars-1; + } + if (Trenn && !Border) { + WordEndCnt++; + (*WErec)=(*R); + WEnChar=nChars; + } + } + (*R0)=(*R); c0=c; + Border0=Border; + First=FALSE; + AbsEnd=AbsEnd || (nChars>=MaxLineChars); + } while (!(AbsEnd || (Border && ((WordEndCnt>0) || WordEnd || Trenn)))); + + if (Border) { // Trennen und Quetschen + (*WErec0)=(*WErec); WEnChar0=WEnChar; + AbsEnd=FALSE; c0=0; + (*R)=(*WErec); nChars=WEnChar; + (*TRrec)=(*R); TRnChar=nChars; + Border0=FALSE; Border=FALSE; + do { // erst mal gucken wieviele Silben noch reinpassen + ct=ProcessChar(vOut,TBuf,*TRrec,Atr0,TRnChar,DoTrenn,Line,cLine); + c=ProcessChar(vOut,TBuf,*R,Atr0,nChars,NoTrenn,Line,cLine); + AbsEnd=(ct==AbsatzEnd) || (ct==TextEnd) || (nChars>=MaxLineChars); + + Border=TRrec->ChrXP>UmbWdt; + WordEnd=AbsEnd || ((AbsEnd || (c==' ')) && (c0!=' ') && (c0!=0)); + Trenn=ct=='-'; + if (WordEnd && (!Border0 || (WordEndCnt==0))) { + WordEndCnt++; + (*WErec)=(*R0); + if (AbsEnd) WEnChar=nChars; else WEnChar=nChars-1; + (*TRrec)=(*R); TRnChar=nChars; // zum weitersuchen + } + if (Trenn && (!Border || (WordEndCnt==0))) { + WordEndCnt++; // merken, dass man hier trennen kann + (*WErec)=(*TRrec); + WEnChar=TRnChar; + (*TRrec)=(*R); TRnChar=nChars; // zum weitersuchen + } + (*R0)=(*R); c0=c; + Border0=Border; + Border=R->ChrXP>UmbWdt; + } while (!(AbsEnd || (Border && ((WordEndCnt>0) || WordEnd || Trenn)))); + + while (WErec0->IndexIndex) { // damit Line[] auch garantiert stimmt } + c=ProcessChar(vOut,TBuf,*WErec0,Atr0,WEnChar0,WEnChar-WEnChar0-1,Line,cLine); + } + + (*R)=(*WErec); nChars=WEnChar; + + if (UmbWdt>=R->ChrXP) { + BoxRest=UmbWdt-R->ChrXP; + } else { // Zusammenquetschen + BoxRest=R->ChrXP-UmbWdt; // um soviel muss gequetscht werden + for (i=2;i<=nChars;i++) { // 1. CharPosition bleibt ! + Line[i]-=(i-1)*(BoxRest) /(nChars-1); + } + R->ChrXP=UmbWdt; + Line[nChars+1]=UmbWdt; + } + } + + if (!AbsEnd) { + do { // Leerzeichen weglesen + (*WErec)=(*R); + c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,FALSE); + nChars++; + Line[nChars]=R->ChrXP; + cLine[nChars]=c; + } while (c==' '); + if (c!=' ' && c!=AbsatzEnd && c!=TextEnd) { + nChars--; + (*R)=(*WErec); + } + } + + if (AbsEnd && nCharsChrXP; // Damit AbsatzEnde auch weggelesen wird + Line[nChars+1]=R->ChrXP; // denn die Breite von CR oder #0 ist nun mal sehr klein + if (TBuf[R->Index-1]!=AbsatzEnd && TBuf[R->Index-1]!=TextEnd) { + c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,FALSE); // Kleine Korrektur. Notig, wenn nur 1 Wort in + } + } + + BoxRest=AdjWdt-R->ChrXP; + if (TextFit) Just=THJustLeft; + + switch (Just) { + case THJustLeft: break; // Links + case THJustCenter: { + BoxRest=BoxRest /2; // Mitte + for (i=1;i<=nChars;i++) Line[i]=Line[i]+BoxRest; + } break; + case THJustRight: { // Rechts + for (i=1;i<=nChars;i++) Line[i]=Line[i]+BoxRest; + } break; + case THJustDrvOut: + case THJustBlock: { // Block und Austreibend + re=nChars; + if (Just==THJustDrvOut) re--; + while (re>=1 && (cLine[re]==' ' || cLine[re]==TextEnd || cLine[re]==AbsatzEnd)) re--; + li=1; + while (li<=re && (cLine[li]==' ' || cLine[li]==TextEnd || cLine[li]==AbsatzEnd)) li++; + if (Just==THJustDrvOut) BoxRest=AdjWdt-Line[re+1]; + + j=0; // Anzahl der Spaces ermitteln + for (i=li;i<=re;i++) { + if (cLine[i]==' ') { + j++; + } + } + + if (j==0) { // nur 1 Wort ? -> Strecken ! + for (i=li+1;i<=re;i++) { // von links nach rechts + Line[i]=Line[i]+MulDiv(i-li,BoxRest,re-li+1-1); + } + } else { + k=0; h=0; + for (i=li;i<=re;i++) { // j Spaces aufbohren ! + if (cLine[i]==' ') { // Space gefunden ! + k++; + h=MulDiv(k,BoxRest,j); + } + Line[i]=Line[i]+h; + } + } + for (i=re+1;i<=nChars;i++) Line[i]=Line[i]+BoxRest; // und den Rest anpassen + Line[nChars+1]=AdjWdt; + } break; + case THJustLocked: { //Gesperrt + re=nChars-1; + while (re>=1 && (cLine[re]==' ' || cLine[re]==TextEnd || cLine[re]==AbsatzEnd)) re--; + li=1; + while (li<=re && (cLine[li]==' ' || cLine[li]==TextEnd || cLine[li]==AbsatzEnd)) li++; + BoxRest=AdjWdt-Line[re+1]; + for (i=li+1;i<=re;i++) { // Strecken von links nach rechts + Line[i]=Line[i]+MulDiv(i-li,BoxRest,re-li+1-1); + } + for (i=re+1;i<=nChars;i++) Line[i]=Line[i]+BoxRest; // und den Rest anpassen + Line[nChars+1]=AdjWdt; + } break; + } + Index=R->Index; + AktAtr=R->Attrib; + delete R; + delete R0; + delete WErec; + delete WErec0; + delete TRrec; +} + + + +// End of Absatz.Pas +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +// DrawText.Pas + +void DrawChar(OutputDevice& rOut, UCHAR c, ObjTextType T, PointType Pos, USHORT DrehWink, + USHORT FitXMul, USHORT FitXDiv, USHORT FitYMul, USHORT FitYDiv) +{ + SetTextContext(rOut,T,UpcasePossible(c),DrehWink,FitXMul,FitXDiv,FitYMul,FitYDiv); + if ((T.Schnitt & TextKaptBit)!=0 && UpcasePossible(c)) c=Upcase(c); + String s( (char)c, RTL_TEXTENCODING_IBM_437 ); + rOut.DrawText( Point( Pos.x, Pos.y ), s ); +} + +/************************************************************************* +|* +|* TextType::Draw() +|* +|* Beschreibung +|* Ersterstellung JOE 09.08.93 +|* Letzte Aenderung JOE 09.08.93 +|* +*************************************************************************/ +void TextType::Draw(OutputDevice& rOut) +{ + if ((Flags & TextOutlBit)!=0) return; // Sourcetext fuer Outliner !! + + ObjTextType T1,T2; + USHORT Index1; + USHORT Index2; + UCHAR c = TextEnd; + USHORT l; // Anzahl der Zeichen in der Zeile + USHORT i; + short yPos0; + short xPos; + short yPos; + USHORT LF; + USHORT MaxGrad; + short xSize; + short xSAdj; + short ySize; + double sn,cs; + USHORT TopToBase; + BOOL Ende = 0; + USHORT lc; + BOOL LineFit; // FitSize.x=0? oder Flags -> jede Zeile stretchen + BOOL TextFit; + short* xLine; + UCHAR* cLine; // Buffer fuer FormatLine + USHORT FitXMul; + USHORT FitXDiv; + USHORT FitYMul; + USHORT FitYDiv; + BOOL Fehler; + UCHAR* Buf=Buffer; // Zeiger auf die Buchstaben + + pSgfFonts->ReadList(); + xLine=new short[ChrXPosArrSize]; + cLine=new UCHAR[CharLineSize]; + + TextFit=(Flags & TextFitBits)!=0; + LineFit=FALSE; + LineFit=((Flags & TextFitZBit)!=0); + if (TextFit && FitSize.x==0) LineFit=TRUE; + + if (DrehWink==0) { + sn=0.0; + cs=1.0; + } else { + sn=sin(double(DrehWink)*3.14159265359/18000); + cs=cos(double(DrehWink)*3.14159265359/18000); + } + + T1=T; Index1=0; yPos=0; xPos=0; + if (TextFit) { + ySize=Pos2.y-Pos1.y; + xSize=32000 /2; // Umbruch + xSAdj=Pos2.x-Pos1.x; // zum Ausrichten bei Zentriert/Blocksatz + //if (xSize<=0) { xSize=32000 /2; LineFit=TRUE; } + FitXMul=sal::static_int_cast< USHORT >(abs(Pos2.x-Pos1.x)); FitXDiv=FitSize.x; if (FitXDiv==0) FitXDiv=1; + FitYMul=sal::static_int_cast< USHORT >(abs(Pos2.y-Pos1.y)); FitYDiv=FitSize.y; if (FitYDiv==0) FitYDiv=1; + } else { + xSize=Pos2.x-Pos1.x; + xSAdj=xSize; + ySize=Pos2.y-Pos1.y; + FitXMul=1; FitXDiv=1; + FitYMul=1; FitYDiv=1; + } + if (xSize<0) xSize=0; + if (xSAdj<0) xSAdj=0; + + do { + T2=T1; Index2=Index1; + FormatLine(Buf,Index2,T,T2,xSize,xSAdj,xLine,l,sn,cs,cLine,LineFit); + Fehler=(Index2==Index1); + if (!Fehler) { + lc=GetLineFeed(Buf,Index1,T,T1,l,LF,MaxGrad); + if (TextFit) { + if (LineFit) FitXDiv=xLine[lc+1]; + if (FitXDiv>0) { + long Temp; + for (i=1;i<=l+1;i++) { + Temp=long(xLine[i])*long(FitXMul) /long(FitXDiv); + xLine[i]=short(Temp); + } + LF=MulDiv(LF,FitYMul,FitYDiv); + MaxGrad=MulDiv(MaxGrad,FitYMul,FitYDiv); + } else { + FitXDiv=1; // 0 gibts nicht + } + } + yPos0=yPos; + TopToBase=GetTopToBaseLine(MaxGrad); + yPos=yPos+TopToBase; + Ende=(yPos0+short(MulDiv(MaxGrad,CharTopToBtm,100))>ySize) && !TextFit; + if (!Ende) { + T2=T1; Index2=Index1; + i=1; + while (i<=l) { + c=GetTextCharConv(Buf,Index2,T,T2,l-i,FALSE); + long xp1,yp1; // wegen Overflowgefahr + PointType Pos; + xp1=long(Pos1.x)+xPos+long(xLine[i]); + yp1=long(Pos1.y)+yPos; + if (xp1>32000) xp1=32000; if (xp1<-12000) xp1=-12000; + if (yp1>32000) yp1=32000; if (yp1<-12000) yp1=-12000; + Pos.x=short(xp1); + Pos.y=short(yp1); + + if (DrehWink!=0) RotatePoint(Pos,Pos1.x,Pos1.y,sn,cs); + DrawChar(rOut,c,T2,Pos,DrehWink,FitXMul,FitXDiv,FitYMul,FitYDiv); + i++; + } // while i<=l + yPos=yPos0+LF; + T1=T2; Index1=Index2; // Fuer die naechste Zeile + } // if ObjMin.y+yPos<=Obj_Max.y + } // if !Fehler + } while (c!=TextEnd && !Ende && !Fehler); + delete[] cLine; + delete[] xLine; +} + +// End of DrawText.Pas +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// + +// nicht mehr benoetigt, da der Pointer nun extra gefuehrt wird +// (DEC Alpha hat naemlich 64Bit-Pointer!) +//UCHAR* TextType::GetBufPtr() +//{ +// ULONG Temp; +// Temp=ULONG(BufLo)+0x00010000*ULONG(BufHi); +// return (UCHAR*)Temp; +//} +// +//void TextType::SetBufPtr(UCHAR* Ptr) +//{ +// ULONG Temp=(ULONG)Ptr; +// BufLo=USHORT(Temp & 0x0000FFFF); +// BufHi=USHORT((Temp & 0xFFFF0000)>>16); +//} + +UINT32 ObjTextType::GetFont() +{ + return ULONG(FontLo)+0x00010000*ULONG(FontHi); +} + +void ObjTextType::SetFont(UINT32 FontID) +{ + FontLo=USHORT(FontID & 0x0000FFFF); + FontHi=USHORT((FontID & 0xFFFF0000)>>16); +} + + +///////////////////////////////////////////////////////////////////////////////// +// SGF.Ini lesen //////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +SgfFontOne::SgfFontOne() +{ + Next=NULL; + IFID=0; + Bold=FALSE; + Ital=FALSE; + Sans=FALSE; + Serf=FALSE; + Fixd=FALSE; + SVFamil=FAMILY_DONTKNOW; + SVChSet=RTL_TEXTENCODING_DONTKNOW; + SVWidth=40; +} + +void SgfFontOne::ReadOne( ByteString& ID, ByteString& Dsc ) +{ + USHORT i,j,n; + ByteString s; + + if ( Dsc.Len() < 4 || ( Dsc.GetChar( 0 ) != '(' ) ) + return; + i=1; // Erster Buchstabe des IF-Fontnamen. Davor ist eine '(' + while ( i < Dsc.Len() && ( Dsc.GetChar( i ) !=')' ) ) + i++; + Dsc.Erase(0,i+1); // IF-Fontname loeschen inkl. () + + if ( Dsc.Len() < 2 || ( Dsc.GetChar( Dsc.Len() - 1 ) !=')' ) ) + return; + i=Dsc.Len()-2; // hier ist die ')' des SV-Fontnames + j=0; + while ( i > 0 && ( Dsc.GetChar( i ) != '(' ) ) + { + i--; + j++; + } + SVFName=String(Dsc,i+1,j); // SV-Fontname rausholen + Dsc.Erase(i,j); + + IFID = (UINT32)ID.ToInt32(); + n=Dsc.GetTokenCount(' '); + for (i=0;i(s.ToInt32()); + } + } +} + +///////////////////////////////////////////////////////////////////////////////// + +SgfFontLst::SgfFontLst() +{ + pList=NULL; + Last=NULL; + LastID=0; + LastLn=NULL; + Tried=FALSE; +} + +SgfFontLst::~SgfFontLst() +{ + RausList(); +} + +void SgfFontLst::RausList() +{ + SgfFontOne* P; + SgfFontOne* P1; + P=pList; + while (P!=NULL) { + P1=P->Next; + delete P; + P=P1; + } + pList=NULL; + Last=NULL; + Tried=FALSE; + LastID=0; + LastLn=NULL; +} + +void SgfFontLst::AssignFN(const String& rFName) +{ FNam=rFName; } + +void SgfFontLst::ReadList() +{ + if (!Tried) { + Tried=TRUE; + LastID=0; + LastLn=NULL; + SgfFontOne* P,P1; + Config aCfg(FNam); + aCfg.SetGroup("SGV Fonts fuer StarView"); + USHORT Anz=aCfg.GetKeyCount(); + USHORT i; + ByteString FID,Dsc; + + for (i=0;iNext=P; else pList=P; Last=P; // einklinken + P->ReadOne(FID,Dsc); // und Zeile interpretieren + } + } + } +} + +SgfFontOne* SgfFontLst::GetFontDesc(UINT32 ID) +{ + if (ID!=LastID) { + SgfFontOne* P; + P=pList; + while (P!=NULL && P->IFID!=ID) P=P->Next; + LastID=ID; + LastLn=P; + } + return LastLn; +} diff --git a/svtools/source/filter/wmf/emfwr.cxx b/svtools/source/filter/wmf/emfwr.cxx new file mode 100644 index 000000000000..4405db28966a --- /dev/null +++ b/svtools/source/filter/wmf/emfwr.cxx @@ -0,0 +1,1436 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#include "emfwr.hxx" +#include +#include +#include +#include +#include + +// ----------- +// - Defines - +// ----------- + +#define WIN_EMR_HEADER 1 +#define WIN_EMR_POLYBEZIER 2 +#define WIN_EMR_POLYGON 3 +#define WIN_EMR_POLYLINE 4 +#define WIN_EMR_POLYBEZIERTO 5 +#define WIN_EMR_POLYLINETO 6 +#define WIN_EMR_POLYPOLYLINE 7 +#define WIN_EMR_POLYPOLYGON 8 +#define WIN_EMR_SETWINDOWEXTEX 9 +#define WIN_EMR_SETWINDOWORGEX 10 +#define WIN_EMR_SETVIEWPORTEXTEX 11 +#define WIN_EMR_SETVIEWPORTORGEX 12 +#define WIN_EMR_SETBRUSHORGEX 13 +#define WIN_EMR_EOF 14 +#define WIN_EMR_SETPIXELV 15 +#define WIN_EMR_SETMAPPERFLAGS 16 +#define WIN_EMR_SETMAPMODE 17 +#define WIN_EMR_SETBKMODE 18 +#define WIN_EMR_SETPOLYFILLMODE 19 +#define WIN_EMR_SETROP2 20 +#define WIN_EMR_SETSTRETCHBLTMODE 21 +#define WIN_EMR_SETTEXTALIGN 22 +#define WIN_EMR_SETCOLORADJUSTMENT 23 +#define WIN_EMR_SETTEXTCOLOR 24 +#define WIN_EMR_SETBKCOLOR 25 +#define WIN_EMR_OFFSETCLIPRGN 26 +#define WIN_EMR_MOVETOEX 27 +#define WIN_EMR_SETMETARGN 28 +#define WIN_EMR_EXCLUDECLIPRECT 29 +#define WIN_EMR_INTERSECTCLIPRECT 30 +#define WIN_EMR_SCALEVIEWPORTEXTEX 31 +#define WIN_EMR_SCALEWINDOWEXTEX 32 +#define WIN_EMR_SAVEDC 33 +#define WIN_EMR_RESTOREDC 34 +#define WIN_EMR_SETWORLDTRANSFORM 35 +#define WIN_EMR_MODIFYWORLDTRANSFORM 36 +#define WIN_EMR_SELECTOBJECT 37 +#define WIN_EMR_CREATEPEN 38 +#define WIN_EMR_CREATEBRUSHINDIRECT 39 +#define WIN_EMR_DELETEOBJECT 40 +#define WIN_EMR_ANGLEARC 41 +#define WIN_EMR_ELLIPSE 42 +#define WIN_EMR_RECTANGLE 43 +#define WIN_EMR_ROUNDRECT 44 +#define WIN_EMR_ARC 45 +#define WIN_EMR_CHORD 46 +#define WIN_EMR_PIE 47 +#define WIN_EMR_SELECTPALETTE 48 +#define WIN_EMR_CREATEPALETTE 49 +#define WIN_EMR_SETPALETTEENTRIES 50 +#define WIN_EMR_RESIZEPALETTE 51 +#define WIN_EMR_REALIZEPALETTE 52 +#define WIN_EMR_EXTFLOODFILL 53 +#define WIN_EMR_LINETO 54 +#define WIN_EMR_ARCTO 55 +#define WIN_EMR_POLYDRAW 56 +#define WIN_EMR_SETARCDIRECTION 57 +#define WIN_EMR_SETMITERLIMIT 58 +#define WIN_EMR_BEGINPATH 59 +#define WIN_EMR_ENDPATH 60 +#define WIN_EMR_CLOSEFIGURE 61 +#define WIN_EMR_FILLPATH 62 +#define WIN_EMR_STROKEANDFILLPATH 63 +#define WIN_EMR_STROKEPATH 64 +#define WIN_EMR_FLATTENPATH 65 +#define WIN_EMR_WIDENPATH 66 +#define WIN_EMR_SELECTCLIPPATH 67 +#define WIN_EMR_ABORTPATH 68 + +#define WIN_EMR_GDICOMMENT 70 +#define WIN_EMR_FILLRGN 71 +#define WIN_EMR_FRAMERGN 72 +#define WIN_EMR_INVERTRGN 73 +#define WIN_EMR_PAINTRGN 74 +#define WIN_EMR_EXTSELECTCLIPRGN 75 +#define WIN_EMR_BITBLT 76 +#define WIN_EMR_STRETCHBLT 77 +#define WIN_EMR_MASKBLT 78 +#define WIN_EMR_PLGBLT 79 +#define WIN_EMR_SETDIBITSTODEVICE 80 +#define WIN_EMR_STRETCHDIBITS 81 +#define WIN_EMR_EXTCREATEFONTINDIRECTW 82 +#define WIN_EMR_EXTTEXTOUTA 83 +#define WIN_EMR_EXTTEXTOUTW 84 +#define WIN_EMR_POLYBEZIER16 85 +#define WIN_EMR_POLYGON16 86 +#define WIN_EMR_POLYLINE16 87 +#define WIN_EMR_POLYBEZIERTO16 88 +#define WIN_EMR_POLYLINETO16 89 +#define WIN_EMR_POLYPOLYLINE16 90 +#define WIN_EMR_POLYPOLYGON16 91 +#define WIN_EMR_POLYDRAW16 92 +#define WIN_EMR_CREATEMONOBRUSH 93 +#define WIN_EMR_CREATEDIBPATTERNBRUSHPT 94 +#define WIN_EMR_EXTCREATEPEN 95 +#define WIN_EMR_POLYTEXTOUTA 96 +#define WIN_EMR_POLYTEXTOUTW 97 + +#define WIN_SRCCOPY 0x00CC0020L +#define WIN_SRCPAINT 0x00EE0086L +#define WIN_SRCAND 0x008800C6L +#define WIN_SRCINVERT 0x00660046L + +#define HANDLE_INVALID 0xffffffff +#define MAXHANDLES 65000 + +#define LINE_SELECT 0x00000001 +#define FILL_SELECT 0x00000002 +#define TEXT_SELECT 0x00000004 + +/* Text Alignment Options */ +#define TA_NOUPDATECP 0 +#define TA_UPDATECP 1 + +#define TA_LEFT 0 +#define TA_RIGHT 2 +#define TA_CENTER 6 + +#define TA_TOP 0 +#define TA_BOTTOM 8 +#define TA_BASELINE 24 +#define TA_RTLREADING 256 +#define TA_MASK (TA_BASELINE+TA_CENTER+TA_UPDATECP+TA_RTLREADING) + +#define MM_ANISOTROPIC 8 + +// ------------- +// - EMFWriter - +// ------------- + +BOOL EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfigItem* pFilterConfigItem ) +{ + const ULONG nHeaderPos = rOStm.Tell(); + + mpHandlesUsed = new BOOL[ MAXHANDLES ]; + memset( mpHandlesUsed, 0, MAXHANDLES * sizeof( BOOL ) ); + mnHorTextAlign = mnHandleCount = mnLastPercent = mnRecordPos = mnRecordCount = 0; + mnLineHandle = mnFillHandle = mnTextHandle = HANDLE_INVALID; + mbRecordOpen = FALSE; + + mpStm = &rOStm; + maVDev.EnableOutput( FALSE ); + maVDev.SetMapMode( rMtf.GetPrefMapMode() ); + mpFilterConfigItem = pFilterConfigItem; + + // don't work with pixel as destination map mode -> higher resolution preferrable + maDestMapMode.SetMapUnit( MAP_100TH_MM ); + + const Size aMtfSizePix( maVDev.LogicToPixel( rMtf.GetPrefSize(), rMtf.GetPrefMapMode() ) ); + const Size aMtfSizeLog( maVDev.LogicToLogic( rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MAP_100TH_MM ) ); + + // seek over header + // use [MS-EMF 2.2.11] HeaderExtension2 Object, otherwise resulting EMF cannot be converted with GetWinMetaFileBits() + rOStm.SeekRel( 108 ); + + // write initial values + + // set 100th mm map mode in EMF + ImplBeginRecord( WIN_EMR_SETMAPMODE ); + (*mpStm) << (INT32) MM_ANISOTROPIC; + ImplEndRecord(); + + ImplBeginRecord( WIN_EMR_SETVIEWPORTEXTEX ); + (*mpStm) << (INT32) maVDev.ImplGetDPIX() << (INT32) maVDev.ImplGetDPIY(); + ImplEndRecord(); + + ImplBeginRecord( WIN_EMR_SETWINDOWEXTEX ); + (*mpStm) << (INT32) 2540 << (INT32) 2540; + ImplEndRecord(); + + ImplBeginRecord( WIN_EMR_SETVIEWPORTORGEX ); + (*mpStm) << (INT32) 0 << (INT32) 0; + ImplEndRecord(); + + ImplBeginRecord( WIN_EMR_SETWINDOWORGEX ); + (*mpStm) << (INT32) 0 << (INT32) 0; + ImplEndRecord(); + + ImplWriteRasterOp( ROP_OVERPAINT ); + + ImplBeginRecord( WIN_EMR_SETBKMODE ); + (*mpStm) << (UINT32) 1; // TRANSPARENT + ImplEndRecord(); + + // write emf data + ImplWrite( rMtf ); + + ImplBeginRecord( WIN_EMR_EOF ); + (*mpStm)<< (sal_uInt32)0 // nPalEntries + << (sal_uInt32)0x10 // offPalEntries + << (sal_uInt32)0x14; // nSizeLast + ImplEndRecord(); + + + // write header + const ULONG nEndPos = mpStm->Tell(); mpStm->Seek( nHeaderPos ); + + (*mpStm) << (UINT32) 0x00000001 << (UINT32) 108 //use [MS-EMF 2.2.11] HeaderExtension2 Object + << (INT32) 0 << (INT32) 0 << (INT32) ( aMtfSizePix.Width() - 1 ) << (INT32) ( aMtfSizePix.Height() - 1 ) + << (INT32) 0 << (INT32) 0 << (INT32) ( aMtfSizeLog.Width() - 1 ) << (INT32) ( aMtfSizeLog.Height() - 1 ) + << (UINT32) 0x464d4520 << (UINT32) 0x10000 << (UINT32) ( nEndPos - nHeaderPos ) + << (UINT32) mnRecordCount << (UINT16) ( mnHandleCount + 1 ) << (UINT16) 0 << (UINT32) 0 << (UINT32) 0 << (UINT32) 0 + << (INT32) aMtfSizePix.Width() << (INT32) aMtfSizePix.Height() + << (INT32) ( aMtfSizeLog.Width() / 100 ) << (INT32) ( aMtfSizeLog.Height() / 100 ) + << (UINT32) 0 << (UINT32) 0 << (UINT32) 0 + << (INT32) ( aMtfSizeLog.Width() * 10 ) << (INT32) ( aMtfSizeLog.Height() * 10 ); //use [MS-EMF 2.2.11] HeaderExtension2 Object + + mpStm->Seek( nEndPos ); + delete[] mpHandlesUsed; + + return( mpStm->GetError() == ERRCODE_NONE ); +} + +// ----------------------------------------------------------------------------- + +ULONG EMFWriter::ImplAcquireHandle() +{ + ULONG nHandle = HANDLE_INVALID; + + for( ULONG i = 0; i < MAXHANDLES && ( HANDLE_INVALID == nHandle ); i++ ) + { + if( !mpHandlesUsed[ i ] ) + { + mpHandlesUsed[ i ] = TRUE; + + if( ( nHandle = i ) == mnHandleCount ) + mnHandleCount++; + } + } + + DBG_ASSERT( nHandle != HANDLE_INVALID, "No more handles available" ); + return( nHandle != HANDLE_INVALID ? nHandle + 1 : HANDLE_INVALID ); +} + +// ----------------------------------------------------------------------------- + +void EMFWriter::ImplReleaseHandle( ULONG nHandle ) +{ + DBG_ASSERT( nHandle && ( nHandle < MAXHANDLES ), "Handle out of range" ); + mpHandlesUsed[ nHandle - 1 ] = FALSE; +} + +// ----------------------------------------------------------------------------- + +void EMFWriter::ImplBeginRecord( sal_uInt32 nType ) +{ + DBG_ASSERT( !mbRecordOpen, "Another record is already opened!" ); + + if( !mbRecordOpen ) + { + mbRecordOpen = TRUE; + mnRecordPos = mpStm->Tell(); + + (*mpStm) << nType; + mpStm->SeekRel( 4 ); + } +} + +// ----------------------------------------------------------------------------- + +void EMFWriter::ImplEndRecord() +{ + DBG_ASSERT( mbRecordOpen, "Record was not opened!" ); + + if( mbRecordOpen ) + { + sal_Int32 nFillBytes, nActPos = mpStm->Tell(); + mpStm->Seek( mnRecordPos + 4 ); + nFillBytes = nActPos - mnRecordPos; + nFillBytes += 3; // each record has to be dword aligned + nFillBytes ^= 3; + nFillBytes &= 3; + *mpStm << (sal_uInt32)( ( nActPos - mnRecordPos ) + nFillBytes ); + mpStm->Seek( nActPos ); + while( nFillBytes-- ) + *mpStm << (sal_uInt8)0; + mnRecordCount++; + mbRecordOpen = FALSE; + } +} + +// ----------------------------------------------------------------------------- + +BOOL EMFWriter::ImplPrepareHandleSelect( sal_uInt32& rHandle, ULONG nSelectType ) +{ + if( rHandle != HANDLE_INVALID ) + { + UINT32 nStockObject = 0x80000000; + + if( LINE_SELECT == nSelectType ) + nStockObject |= 0x00000007; + else if( FILL_SELECT == nSelectType ) + nStockObject |= 0x00000001; + else if( TEXT_SELECT == nSelectType ) + nStockObject |= 0x0000000a; + + // select stock object first + ImplBeginRecord( WIN_EMR_SELECTOBJECT ); + ( *mpStm ) << nStockObject; + ImplEndRecord(); + + // destroy handle of created object + ImplBeginRecord( WIN_EMR_DELETEOBJECT ); + ( *mpStm ) << rHandle; + ImplEndRecord(); + + // mark handle as free + ImplReleaseHandle( rHandle ); + } + + rHandle = ImplAcquireHandle(); + + return( HANDLE_INVALID != rHandle ); +} + +// ----------------------------------------------------------------------------- + +void EMFWriter::ImplCheckLineAttr() +{ + if( mbLineChanged && ImplPrepareHandleSelect( mnLineHandle, LINE_SELECT ) ) + { + sal_uInt32 nStyle = maVDev.IsLineColor() ? 0 : 5; + sal_uInt32 nWidth = 0, nHeight = 0; + + ImplBeginRecord( WIN_EMR_CREATEPEN ); + (*mpStm) << mnLineHandle << nStyle << nWidth << nHeight; + ImplWriteColor( maVDev.GetLineColor() ); + ImplEndRecord(); + + ImplBeginRecord( WIN_EMR_SELECTOBJECT ); + (*mpStm) << mnLineHandle; + ImplEndRecord(); + } +} + +// ----------------------------------------------------------------------------- + +void EMFWriter::ImplCheckFillAttr() +{ + if( mbFillChanged && ImplPrepareHandleSelect( mnFillHandle, FILL_SELECT ) ) + { + sal_uInt32 nStyle = maVDev.IsFillColor() ? 0 : 1; + sal_uInt32 nPatternStyle = 0; + + ImplBeginRecord( WIN_EMR_CREATEBRUSHINDIRECT ); + (*mpStm) << mnFillHandle << nStyle; + ImplWriteColor( maVDev.GetFillColor() ); + (*mpStm) << nPatternStyle; + ImplEndRecord(); + + ImplBeginRecord( WIN_EMR_SELECTOBJECT ); + (*mpStm) << mnFillHandle; + ImplEndRecord(); + } +} + +// ----------------------------------------------------------------------------- + +void EMFWriter::ImplCheckTextAttr() +{ + if( mbTextChanged && ImplPrepareHandleSelect( mnTextHandle, TEXT_SELECT ) ) + { + const Font& rFont = maVDev.GetFont(); + String aFontName( rFont.GetName() ); + sal_Int32 nWeight; + sal_uInt16 i; + sal_uInt8 nPitchAndFamily; + + ImplBeginRecord( WIN_EMR_EXTCREATEFONTINDIRECTW ); + (*mpStm) << mnTextHandle; + ImplWriteExtent( -rFont.GetSize().Height() ); + ImplWriteExtent( rFont.GetSize().Width() ); + (*mpStm) << (INT32) rFont.GetOrientation() << (INT32) rFont.GetOrientation(); + + switch( rFont.GetWeight() ) + { + case WEIGHT_THIN: nWeight = 100; break; + case WEIGHT_ULTRALIGHT: nWeight = 200; break; + case WEIGHT_LIGHT: nWeight = 300; break; + case WEIGHT_SEMILIGHT: nWeight = 300; break; + case WEIGHT_NORMAL: nWeight = 400; break; + case WEIGHT_MEDIUM: nWeight = 500; break; + case WEIGHT_SEMIBOLD: nWeight = 600; break; + case WEIGHT_BOLD: nWeight = 700; break; + case WEIGHT_ULTRABOLD: nWeight = 800; break; + case WEIGHT_BLACK: nWeight = 900; break; + default: nWeight = 0; break; + } + + (*mpStm) << nWeight; + (*mpStm) << (BYTE) ( ( ITALIC_NONE == rFont.GetItalic() ) ? 0 : 1 ); + (*mpStm) << (BYTE) ( ( UNDERLINE_NONE == rFont.GetUnderline() ) ? 0 : 1 ); + (*mpStm) << (BYTE) ( ( STRIKEOUT_NONE == rFont.GetStrikeout() ) ? 0 : 1 ); + (*mpStm) << (BYTE) ( ( RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet() ) ? 2 : 0 ); + (*mpStm) << (BYTE) 0 << (BYTE) 0 << (BYTE) 0; + + switch( rFont.GetPitch() ) + { + case PITCH_FIXED: nPitchAndFamily = 0x01; break; + case PITCH_VARIABLE: nPitchAndFamily = 0x02; break; + default: nPitchAndFamily = 0x00; break; + } + + switch( rFont.GetFamily() ) + { + case FAMILY_DECORATIVE: nPitchAndFamily |= 0x50; break; + case FAMILY_MODERN: nPitchAndFamily |= 0x30; break; + case FAMILY_ROMAN: nPitchAndFamily |= 0x10; break; + case FAMILY_SCRIPT: nPitchAndFamily |= 0x40; break; + case FAMILY_SWISS: nPitchAndFamily |= 0x20; break; + default: break; + } + + (*mpStm) << nPitchAndFamily; + + for( i = 0; i < 32; i++ ) + (*mpStm) << (sal_Unicode) ( ( i < aFontName.Len() ) ? aFontName.GetChar( i ) : 0 ); + + // dummy elfFullName + for( i = 0; i < 64; i++ ) + (*mpStm) << (sal_Unicode) 0; + + // dummy elfStyle + for( i = 0; i < 32; i++ ) + (*mpStm) << (sal_Unicode) 0; + + // dummy elfVersion, elfStyleSize, elfMatch, elfReserved + (*mpStm) << (UINT32) 0 << (UINT32) 0 << (UINT32) 0 << (UINT32) 0 ; + + // dummy elfVendorId + (*mpStm) << (UINT32) 0; + + // dummy elfCulture + (*mpStm) << (UINT32) 0; + + // dummy elfPanose + (*mpStm) << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0; + + // fill record to get a record size divideable by 4 + (*mpStm) << (UINT16) 0; + + ImplEndRecord(); + + // TextAlign + UINT32 nTextAlign; + + switch( rFont.GetAlign() ) + { + case ALIGN_TOP: nTextAlign = TA_TOP; break; + case ALIGN_BOTTOM: nTextAlign = TA_BOTTOM; break; + default: nTextAlign = TA_BASELINE; break; + } + nTextAlign |= mnHorTextAlign; + + ImplBeginRecord( WIN_EMR_SETTEXTALIGN ); + (*mpStm) << nTextAlign; + ImplEndRecord(); + + // Text color + ImplBeginRecord( WIN_EMR_SETTEXTCOLOR ); + ImplWriteColor( maVDev.GetTextColor() ); + ImplEndRecord(); + + ImplBeginRecord( WIN_EMR_SELECTOBJECT ); + (*mpStm) << mnTextHandle; + ImplEndRecord(); + } +} + +// ----------------------------------------------------------------------------- + +void EMFWriter::ImplWriteColor( const Color& rColor ) +{ + UINT32 nCol = rColor.GetRed(); + + nCol |= ( (UINT32) rColor.GetGreen() ) << 8; + nCol |= ( (UINT32) rColor.GetBlue() ) << 16; + + (*mpStm) << nCol; +} + +// ----------------------------------------------------------------------------- + +void EMFWriter::ImplWriteRasterOp( RasterOp eRop ) +{ + UINT32 nROP2; + + switch( eRop ) + { + case ROP_INVERT: nROP2 = 6; break; + case ROP_XOR: nROP2 = 7; break; + default: nROP2 = 13;break; + } + + ImplBeginRecord( WIN_EMR_SETROP2 ); + (*mpStm) << nROP2; + ImplEndRecord(); +} + +// ----------------------------------------------------------------------------- + +void EMFWriter::ImplWriteExtent( long nExtent ) +{ + nExtent = maVDev.LogicToLogic( Size( nExtent, 0 ), maVDev.GetMapMode(), maDestMapMode ).Width(); + (*mpStm) << (INT32) nExtent; +} + +// ----------------------------------------------------------------------------- + +void EMFWriter::ImplWritePoint( const Point& rPoint ) +{ + const Point aPoint( maVDev.LogicToLogic( rPoint, maVDev.GetMapMode(), maDestMapMode )); + (*mpStm) << (INT32) aPoint.X() << (INT32) aPoint.Y(); +} + +// ----------------------------------------------------------------------------- + +void EMFWriter::ImplWriteSize( const Size& rSize) +{ + const Size aSize( maVDev.LogicToLogic( rSize, maVDev.GetMapMode(), maDestMapMode )); + (*mpStm) << (INT32) aSize.Width() << (INT32) aSize.Height(); +} + +// ----------------------------------------------------------------------------- + +void EMFWriter::ImplWriteRect( const Rectangle& rRect ) +{ + const Rectangle aRect( maVDev.LogicToLogic ( rRect, maVDev.GetMapMode(), maDestMapMode )); + (*mpStm) << aRect.Left() << aRect.Top() << aRect.Right() << aRect.Bottom(); +} + +// ----------------------------------------------------------------------------- + +void EMFWriter::ImplWritePolygonRecord( const Polygon& rPoly, BOOL bClose ) +{ + if( rPoly.GetSize() ) + { + if( rPoly.HasFlags() ) + ImplWritePath( rPoly, bClose ); + else + { + if( bClose ) + ImplCheckFillAttr(); + + ImplCheckLineAttr(); + + ImplBeginRecord( bClose ? WIN_EMR_POLYGON : WIN_EMR_POLYLINE ); + ImplWriteRect( rPoly.GetBoundRect() ); + (*mpStm) << (UINT32) rPoly.GetSize(); + + for( USHORT i = 0; i < rPoly.GetSize(); i++ ) + ImplWritePoint( rPoly[ i ] ); + + ImplEndRecord(); + } + } +} + +// ----------------------------------------------------------------------------- + +void EMFWriter::ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly ) +{ + sal_uInt16 n, i, nPolyCount = rPolyPoly.Count(); + + if( nPolyCount ) + { + if( 1 == nPolyCount ) + ImplWritePolygonRecord( rPolyPoly[ 0 ], TRUE ); + else + { + sal_Bool bHasFlags = sal_False; + sal_uInt32 nTotalPoints = 0; + + for( i = 0; i < nPolyCount; i++ ) + { + nTotalPoints += rPolyPoly[ i ].GetSize(); + if ( rPolyPoly[ i ].HasFlags() ) + bHasFlags = sal_True; + } + if( nTotalPoints ) + { + if ( bHasFlags ) + ImplWritePath( rPolyPoly, sal_True ); + else + { + ImplCheckFillAttr(); + ImplCheckLineAttr(); + + ImplBeginRecord( WIN_EMR_POLYPOLYGON ); + ImplWriteRect( rPolyPoly.GetBoundRect() ); + (*mpStm) << (sal_uInt32)nPolyCount << nTotalPoints; + + for( i = 0; i < nPolyCount; i++ ) + (*mpStm) << (sal_uInt32)rPolyPoly[ i ].GetSize(); + + for( i = 0; i < nPolyCount; i++ ) + { + const Polygon& rPoly = rPolyPoly[ i ]; + + for( n = 0; n < rPoly.GetSize(); n++ ) + ImplWritePoint( rPoly[ n ] ); + } + ImplEndRecord(); + } + } + } + } +} + +// ----------------------------------------------------------------------------- + +void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClosed ) +{ + if ( bClosed ) + ImplCheckFillAttr(); + ImplCheckLineAttr(); + + ImplBeginRecord( WIN_EMR_BEGINPATH ); + ImplEndRecord(); + + sal_uInt16 i, n, o, nPolyCount = rPolyPoly.Count(); + for ( i = 0; i < nPolyCount; i++ ) + { + n = 0; + const Polygon& rPoly = rPolyPoly[ i ]; + while ( n < rPoly.GetSize() ) + { + if( n == 0 ) + { + ImplBeginRecord( WIN_EMR_MOVETOEX ); + ImplWritePoint( rPoly[ 0 ] ); + ImplEndRecord(); + n++; + continue; + } + + sal_uInt16 nBezPoints = 0; + + while ( ( ( nBezPoints + n + 2 ) < rPoly.GetSize() ) && ( rPoly.GetFlags( nBezPoints + n ) == POLY_CONTROL ) ) + nBezPoints += 3; + + if ( nBezPoints ) + { + ImplBeginRecord( WIN_EMR_POLYBEZIERTO ); + Polygon aNewPoly( nBezPoints + 1 ); + aNewPoly[ 0 ] = rPoly[ n - 1 ]; + for ( o = 0; o < nBezPoints; o++ ) + aNewPoly[ o + 1 ] = rPoly[ n + o ]; + ImplWriteRect( aNewPoly.GetBoundRect() ); + (*mpStm) << (sal_uInt32)nBezPoints; + for( o = 1; o < aNewPoly.GetSize(); o++ ) + ImplWritePoint( aNewPoly[ o ] ); + ImplEndRecord(); + n = n + nBezPoints; + } + else + { + sal_uInt16 nPoints = 1; + while( ( nPoints + n ) < rPoly.GetSize() && ( rPoly.GetFlags( nPoints + n ) != POLY_CONTROL ) ) + nPoints++; + + if ( nPoints > 1 ) + { + ImplBeginRecord( WIN_EMR_POLYLINETO ); + Polygon aNewPoly( nPoints + 1 ); + aNewPoly[ 0 ] = rPoly[ n - 1]; + for ( o = 1; o <= nPoints; o++ ) + aNewPoly[ o ] = rPoly[ n - 1 + o ]; + ImplWriteRect( aNewPoly.GetBoundRect() ); + (*mpStm) << (sal_uInt32)( nPoints ); + for( o = 1; o < aNewPoly.GetSize(); o++ ) + ImplWritePoint( aNewPoly[ o ] ); + ImplEndRecord(); + } + else + { + ImplBeginRecord( WIN_EMR_LINETO ); + ImplWritePoint( rPoly[ n ] ); + ImplEndRecord(); + } + n = n + nPoints; + } + if ( bClosed && ( n == rPoly.GetSize() ) ) + { + ImplBeginRecord( WIN_EMR_CLOSEFIGURE ); + ImplEndRecord(); + } + } + } + ImplBeginRecord( WIN_EMR_ENDPATH ); + ImplEndRecord(); + ImplBeginRecord( bClosed ? WIN_EMR_FILLPATH : WIN_EMR_STROKEPATH ); + ImplWriteRect( rPolyPoly.GetBoundRect() ); + ImplEndRecord(); +} + +// ----------------------------------------------------------------------------- + +void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, + const Size& rSz, UINT32 nROP ) +{ + if( !!rBmp ) + { + SvMemoryStream aMemStm( 65535, 65535 ); + const Size aBmpSizePixel( rBmp.GetSizePixel() ); + + ImplBeginRecord( WIN_EMR_STRETCHDIBITS ); + ImplWriteRect( Rectangle( rPt, rSz ) ); + ImplWritePoint( rPt ); + (*mpStm) << (INT32) 0 << (INT32) 0 << (INT32) aBmpSizePixel.Width() << (INT32) aBmpSizePixel.Height(); + + // write offset positions and sizes later + const ULONG nOffPos = mpStm->Tell(); + mpStm->SeekRel( 16 ); + + (*mpStm) << (UINT32) 0 << ( ( ROP_XOR == maVDev.GetRasterOp() && WIN_SRCCOPY == nROP ) ? WIN_SRCINVERT : nROP ); + ImplWriteSize( rSz ); + + rBmp.Write( aMemStm, TRUE, FALSE ); + + UINT32 nDIBSize = aMemStm.Tell(), nHeaderSize, nCompression, nColsUsed, nPalCount, nImageSize; + UINT16 nBitCount; + + // get DIB parameters + aMemStm.Seek( 0 ); + aMemStm >> nHeaderSize; + aMemStm.SeekRel( 10 ); + aMemStm >> nBitCount >> nCompression >> nImageSize; + aMemStm.SeekRel( 8 ); + aMemStm >> nColsUsed; + + nPalCount = ( nBitCount <= 8 ) ? ( nColsUsed ? nColsUsed : ( 1 << (UINT32) nBitCount ) ) : + ( ( 3 == nCompression ) ? 12 : 0 ); + + mpStm->Write( aMemStm.GetData(), nDIBSize ); + + const ULONG nEndPos = mpStm->Tell(); + mpStm->Seek( nOffPos ); + (*mpStm) << (UINT32) 80 << (UINT32)( nHeaderSize + ( nPalCount << 2 ) ); + (*mpStm) << (UINT32)( 80 + ( nHeaderSize + ( nPalCount << 2 ) ) ) << nImageSize; + mpStm->Seek( nEndPos ); + + ImplEndRecord(); + } +} + +// ----------------------------------------------------------------------------- + +void EMFWriter::ImplWriteTextRecord( const Point& rPos, const String rText, const sal_Int32* pDXArray, sal_uInt32 nWidth ) +{ + xub_StrLen nLen = rText.Len(), i; + + if( nLen ) + { + sal_uInt32 nNormWidth; + sal_Int32* pOwnArray; + sal_Int32* pDX; + + // get text sizes + if( pDXArray ) + { + pOwnArray = NULL; + nNormWidth = maVDev.GetTextWidth( rText ); + pDX = (sal_Int32*) pDXArray; + } + else + { + pOwnArray = new sal_Int32[ nLen ]; + nNormWidth = maVDev.GetTextArray( rText, pOwnArray ); + pDX = pOwnArray; + } + + if( nLen > 1 ) + { + nNormWidth = pDX[ nLen - 2 ] + maVDev.GetTextWidth( rText.GetChar( nLen - 1 ) ); + + if( nWidth && nNormWidth && ( nWidth != nNormWidth ) ) + { + const double fFactor = (double) nWidth / nNormWidth; + + for( i = 0; i < ( nLen - 1 ); i++ ) + pDX[ i ] = FRound( pDX[ i ] * fFactor ); + } + } + + // write text record + ImplBeginRecord( WIN_EMR_EXTTEXTOUTW ); + + ImplWriteRect( Rectangle( rPos, Size( nNormWidth, maVDev.GetTextHeight() ) ) ); + (*mpStm) << (UINT32)1; + (*mpStm) << (INT32) 0 << (INT32) 0; + ImplWritePoint( rPos ); + (*mpStm) << (UINT32) nLen << (UINT32) 76 << (UINT32) 2; + (*mpStm) << (INT32) 0 << (INT32) 0 << (INT32) 0 << (INT32) 0; + (*mpStm) << (UINT32) ( 76 + ( nLen << 1 ) + ( (nLen & 1 ) ? 2 : 0 ) ); + + // write text + for( i = 0; i < nLen; i++ ) + (*mpStm) << (sal_Unicode)rText.GetChar( i ); + + // padding word + if( nLen & 1 ) + (*mpStm) << (UINT16) 0; + + // write DX array + ImplWriteExtent( pDX[ 0 ] ); + + if( nLen > 1 ) + { + for( i = 1; i < ( nLen - 1 ); i++ ) + ImplWriteExtent( pDX[ i ] - pDX[ i - 1 ] ); + + ImplWriteExtent( pDX[ nLen - 2 ] / ( nLen - 1 ) ); + } + + ImplEndRecord(); + delete[] pOwnArray; + } +} + +// ----------------------------------------------------------------------------- + +void EMFWriter::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon) +{ + if(rLinePolygon.count()) + { + basegfx::B2DPolyPolygon aLinePolyPolygon(rLinePolygon); + basegfx::B2DPolyPolygon aFillPolyPolygon; + + rInfo.applyToB2DPolyPolygon(aLinePolyPolygon, aFillPolyPolygon); + + if(aLinePolyPolygon.count()) + { + for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++) + { + const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a)); + ImplWritePolygonRecord( Polygon(aCandidate), FALSE ); + } + } + + if(aFillPolyPolygon.count()) + { + const Color aOldLineColor(maVDev.GetLineColor()); + const Color aOldFillColor(maVDev.GetFillColor()); + + maVDev.SetLineColor(); + maVDev.SetFillColor(aOldLineColor); + + for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++) + { + const Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a)); + ImplWritePolyPolygonRecord(PolyPolygon(Polygon(aPolygon))); + } + + maVDev.SetLineColor(aOldLineColor); + maVDev.SetFillColor(aOldFillColor); + } + } +} + +// ----------------------------------------------------------------------------- + +void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) +{ + for( ULONG j = 0, nActionCount = rMtf.GetActionCount(); j < nActionCount; j++ ) + { + const MetaAction* pAction = rMtf.GetAction( j ); + const USHORT nType = pAction->GetType(); + + switch( nType ) + { + case( META_PIXEL_ACTION ): + { + const MetaPixelAction* pA = (const MetaPixelAction*) pAction; + + ImplCheckLineAttr(); + ImplBeginRecord( WIN_EMR_SETPIXELV ); + ImplWritePoint( pA->GetPoint() ); + ImplWriteColor( pA->GetColor() ); + ImplEndRecord(); + } + break; + + case( META_POINT_ACTION ): + { + if( maVDev.IsLineColor() ) + { + const MetaPointAction* pA = (const MetaPointAction*) pAction; + + ImplCheckLineAttr(); + ImplBeginRecord( WIN_EMR_SETPIXELV ); + ImplWritePoint( pA->GetPoint() ); + ImplWriteColor( maVDev.GetLineColor() ); + ImplEndRecord(); + } + } + break; + + case( META_LINE_ACTION ): + { + if( maVDev.IsLineColor() ) + { + const MetaLineAction* pA = (const MetaLineAction*) pAction; + + if(pA->GetLineInfo().IsDefault()) + { + ImplCheckLineAttr(); + + ImplBeginRecord( WIN_EMR_MOVETOEX ); + ImplWritePoint( pA->GetStartPoint() ); + ImplEndRecord(); + + ImplBeginRecord( WIN_EMR_LINETO ); + ImplWritePoint( pA->GetEndPoint() ); + ImplEndRecord(); + + ImplBeginRecord( WIN_EMR_SETPIXELV ); + ImplWritePoint( pA->GetEndPoint() ); + ImplWriteColor( maVDev.GetLineColor() ); + ImplEndRecord(); + } + else + { + // LineInfo used; handle Dash/Dot and fat lines + basegfx::B2DPolygon aPolygon; + aPolygon.append(basegfx::B2DPoint(pA->GetStartPoint().X(), pA->GetStartPoint().Y())); + aPolygon.append(basegfx::B2DPoint(pA->GetEndPoint().X(), pA->GetEndPoint().Y())); + Impl_handleLineInfoPolyPolygons(pA->GetLineInfo(), aPolygon); + } + } + } + break; + + case( META_RECT_ACTION ): + { + if( maVDev.IsLineColor() || maVDev.IsFillColor() ) + { + const MetaRectAction* pA = (const MetaRectAction*) pAction; + + ImplCheckFillAttr(); + ImplCheckLineAttr(); + + ImplBeginRecord( WIN_EMR_RECTANGLE ); + ImplWriteRect( pA->GetRect() ); + ImplEndRecord(); + } + } + break; + + case( META_ROUNDRECT_ACTION ): + { + if( maVDev.IsLineColor() || maVDev.IsFillColor() ) + { + const MetaRoundRectAction* pA = (const MetaRoundRectAction*) pAction; + + ImplCheckFillAttr(); + ImplCheckLineAttr(); + + ImplBeginRecord( WIN_EMR_ROUNDRECT ); + ImplWriteRect( pA->GetRect() ); + ImplWriteSize( Size( pA->GetHorzRound(), pA->GetVertRound() ) ); + ImplEndRecord(); + } + } + break; + + case( META_ELLIPSE_ACTION ): + { + if( maVDev.IsLineColor() || maVDev.IsFillColor() ) + { + const MetaEllipseAction* pA = (const MetaEllipseAction*) pAction; + + ImplCheckFillAttr(); + ImplCheckLineAttr(); + + ImplBeginRecord( WIN_EMR_ELLIPSE ); + ImplWriteRect( pA->GetRect() ); + ImplEndRecord(); + } + } + break; + + case( META_ARC_ACTION ): + case( META_PIE_ACTION ): + case( META_CHORD_ACTION ): + case( META_POLYGON_ACTION ): + { + if( maVDev.IsLineColor() || maVDev.IsFillColor() ) + { + Polygon aPoly; + + switch( nType ) + { + case( META_ARC_ACTION ): + { + const MetaArcAction* pA = (const MetaArcAction*) pAction; + aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_ARC ); + } + break; + + case( META_PIE_ACTION ): + { + const MetaPieAction* pA = (const MetaPieAction*) pAction; + aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_PIE ); + } + break; + + case( META_CHORD_ACTION ): + { + const MetaChordAction* pA = (const MetaChordAction*) pAction; + aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_CHORD ); + } + break; + + case( META_POLYGON_ACTION ): + aPoly = ( (const MetaPolygonAction*) pAction )->GetPolygon(); + break; + } + + ImplWritePolygonRecord( aPoly, nType != META_ARC_ACTION ); + } + } + break; + + case( META_POLYLINE_ACTION ): + { + if( maVDev.IsLineColor() ) + { + const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pAction; + const Polygon& rPoly = pA->GetPolygon(); + + if( rPoly.GetSize() ) + { + if(pA->GetLineInfo().IsDefault()) + { + ImplWritePolygonRecord( rPoly, FALSE ); + } + else + { + // LineInfo used; handle Dash/Dot and fat lines + Impl_handleLineInfoPolyPolygons(pA->GetLineInfo(), rPoly.getB2DPolygon()); + } + } + } + } + break; + + case( META_POLYPOLYGON_ACTION ): + { + if( maVDev.IsLineColor() || maVDev.IsFillColor() ) + ImplWritePolyPolygonRecord( ( (const MetaPolyPolygonAction*) pAction )->GetPolyPolygon() ); + } + break; + + case( META_GRADIENT_ACTION ): + { + const MetaGradientAction* pA = (const MetaGradientAction*) pAction; + GDIMetaFile aTmpMtf; + + maVDev.AddGradientActions( pA->GetRect(), pA->GetGradient(), aTmpMtf ); + ImplWrite( aTmpMtf ); + } + break; + + case META_HATCH_ACTION: + { + const MetaHatchAction* pA = (const MetaHatchAction*) pAction; + GDIMetaFile aTmpMtf; + + maVDev.AddHatchActions( pA->GetPolyPolygon(), pA->GetHatch(), aTmpMtf ); + ImplWrite( aTmpMtf ); + } + break; + + case META_TRANSPARENT_ACTION: + { + ImplCheckFillAttr(); + ImplCheckLineAttr(); + ImplWritePolyPolygonRecord( ( (MetaTransparentAction*) pAction )->GetPolyPolygon() ); + } + break; + + case META_FLOATTRANSPARENT_ACTION: + { + const MetaFloatTransparentAction* pA = (const MetaFloatTransparentAction*) pAction; + + GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() ); + Point aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() ); + const Size aSrcSize( aTmpMtf.GetPrefSize() ); + const Point aDestPt( pA->GetPoint() ); + const Size aDestSize( pA->GetSize() ); + const double fScaleX = aSrcSize.Width() ? (double) aDestSize.Width() / aSrcSize.Width() : 1.0; + const double fScaleY = aSrcSize.Height() ? (double) aDestSize.Height() / aSrcSize.Height() : 1.0; + long nMoveX, nMoveY; + + if( fScaleX != 1.0 || fScaleY != 1.0 ) + { + aTmpMtf.Scale( fScaleX, fScaleY ); + aSrcPt.X() = FRound( aSrcPt.X() * fScaleX ), aSrcPt.Y() = FRound( aSrcPt.Y() * fScaleY ); + } + + nMoveX = aDestPt.X() - aSrcPt.X(), nMoveY = aDestPt.Y() - aSrcPt.Y(); + + if( nMoveX || nMoveY ) + aTmpMtf.Move( nMoveX, nMoveY ); + + ImplCheckFillAttr(); + ImplCheckLineAttr(); + ImplCheckTextAttr(); + ImplWrite( aTmpMtf ); + } + break; + + case( META_EPS_ACTION ): + { + const MetaEPSAction* pA = (const MetaEPSAction*) pAction; + const GDIMetaFile aSubstitute( pA->GetSubstitute() ); + + for( ULONG i = 0, nCount = aSubstitute.GetActionCount(); i < nCount; i++ ) + { + const MetaAction* pSubstAct = aSubstitute.GetAction( i ); + if( pSubstAct->GetType() == META_BMPSCALE_ACTION ) + { + maVDev.Push( PUSH_ALL ); + ImplBeginRecord( WIN_EMR_SAVEDC ); + ImplEndRecord(); + + MapMode aMapMode( aSubstitute.GetPrefMapMode() ); + Size aOutSize( maVDev.LogicToLogic( pA->GetSize(), maVDev.GetMapMode(), aMapMode ) ); + aMapMode.SetScaleX( Fraction( aOutSize.Width(), aSubstitute.GetPrefSize().Width() ) ); + aMapMode.SetScaleY( Fraction( aOutSize.Height(), aSubstitute.GetPrefSize().Height() ) ); + aMapMode.SetOrigin( maVDev.LogicToLogic( pA->GetPoint(), maVDev.GetMapMode(), aMapMode ) ); + maVDev.SetMapMode( aMapMode ); + ImplWrite( aSubstitute ); + + maVDev.Pop(); + ImplBeginRecord( WIN_EMR_RESTOREDC ); + (*mpStm) << (INT32) -1; + ImplEndRecord(); + break; + } + } + } + break; + + case META_BMP_ACTION: + { + const MetaBmpAction* pA = (const MetaBmpAction *) pAction; + ImplWriteBmpRecord( pA->GetBitmap(), pA->GetPoint(), maVDev.PixelToLogic( pA->GetBitmap().GetSizePixel() ), WIN_SRCCOPY ); + } + break; + + case META_BMPSCALE_ACTION: + { + const MetaBmpScaleAction* pA = (const MetaBmpScaleAction*) pAction; + ImplWriteBmpRecord( pA->GetBitmap(), pA->GetPoint(), pA->GetSize(), WIN_SRCCOPY ); + } + break; + + case META_BMPSCALEPART_ACTION: + { + const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*) pAction; + Bitmap aTmp( pA->GetBitmap() ); + + if( aTmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ) ) + ImplWriteBmpRecord( aTmp, pA->GetDestPoint(), pA->GetDestSize(), WIN_SRCCOPY ); + } + break; + + case META_BMPEX_ACTION: + { + const MetaBmpExAction* pA = (const MetaBmpExAction *) pAction; + Bitmap aBmp( pA->GetBitmapEx().GetBitmap() ); + Bitmap aMsk( pA->GetBitmapEx().GetMask() ); + + if( !!aMsk ) + { + aBmp.Replace( aMsk, COL_WHITE ); + aMsk.Invert(); + ImplWriteBmpRecord( aMsk, pA->GetPoint(), maVDev.PixelToLogic( aMsk.GetSizePixel() ), WIN_SRCPAINT ); + ImplWriteBmpRecord( aBmp, pA->GetPoint(), maVDev.PixelToLogic( aBmp.GetSizePixel() ), WIN_SRCAND ); + } + else + ImplWriteBmpRecord( aBmp, pA->GetPoint(), aBmp.GetSizePixel(), WIN_SRCCOPY ); + } + break; + + case META_BMPEXSCALE_ACTION: + { + const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pAction; + Bitmap aBmp( pA->GetBitmapEx().GetBitmap() ); + Bitmap aMsk( pA->GetBitmapEx().GetMask() ); + + if( !!aMsk ) + { + aBmp.Replace( aMsk, COL_WHITE ); + aMsk.Invert(); + ImplWriteBmpRecord( aMsk, pA->GetPoint(), pA->GetSize(), WIN_SRCPAINT ); + ImplWriteBmpRecord( aBmp, pA->GetPoint(), pA->GetSize(), WIN_SRCAND ); + } + else + ImplWriteBmpRecord( aBmp, pA->GetPoint(), pA->GetSize(), WIN_SRCCOPY ); + } + break; + + case META_BMPEXSCALEPART_ACTION: + { + const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pAction; + BitmapEx aBmpEx( pA->GetBitmapEx() ); + aBmpEx.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); + Bitmap aBmp( aBmpEx.GetBitmap() ); + Bitmap aMsk( aBmpEx.GetMask() ); + + if( !!aMsk ) + { + aBmp.Replace( aMsk, COL_WHITE ); + aMsk.Invert(); + ImplWriteBmpRecord( aMsk, pA->GetDestPoint(), pA->GetDestSize(), WIN_SRCPAINT ); + ImplWriteBmpRecord( aBmp, pA->GetDestPoint(), pA->GetDestSize(), WIN_SRCAND ); + } + else + ImplWriteBmpRecord( aBmp, pA->GetDestPoint(), pA->GetDestSize(), WIN_SRCCOPY ); + } + break; + + case META_TEXT_ACTION: + { + const MetaTextAction* pA = (const MetaTextAction*) pAction; + const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() ); + + ImplCheckTextAttr(); + ImplWriteTextRecord( pA->GetPoint(), aText, NULL, 0 ); + } + break; + + case META_TEXTRECT_ACTION: + { + const MetaTextRectAction* pA = (const MetaTextRectAction*) pAction; + const String aText( pA->GetText() ); + + ImplCheckTextAttr(); + ImplWriteTextRecord( pA->GetRect().TopLeft(), aText, NULL, 0 ); + } + break; + + case META_TEXTARRAY_ACTION: + { + const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pAction; + const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() ); + + ImplCheckTextAttr(); + ImplWriteTextRecord( pA->GetPoint(), aText, pA->GetDXArray(), 0 ); + } + break; + + case META_STRETCHTEXT_ACTION: + { + const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pAction; + const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() ); + + ImplCheckTextAttr(); + ImplWriteTextRecord( pA->GetPoint(), aText, NULL, pA->GetWidth() ); + } + break; + + case( META_LINECOLOR_ACTION ): + { + ( (MetaAction*) pAction )->Execute( &maVDev ); + mbLineChanged = TRUE; + } + break; + + case( META_FILLCOLOR_ACTION ): + { + ( (MetaAction*) pAction )->Execute( &maVDev ); + mbFillChanged = TRUE; + } + break; + + case( META_TEXTCOLOR_ACTION ): + case( META_TEXTLINECOLOR_ACTION ): + case( META_TEXTFILLCOLOR_ACTION ): + case( META_TEXTALIGN_ACTION ): + case( META_FONT_ACTION ): + { + ( (MetaAction*) pAction )->Execute( &maVDev ); + mbTextChanged = TRUE; + } + break; + + case( META_ISECTRECTCLIPREGION_ACTION ): + { + ( (MetaAction*) pAction )->Execute( &maVDev ); + + ImplBeginRecord( WIN_EMR_INTERSECTCLIPRECT ); + ImplWriteRect( ( (MetaISectRectClipRegionAction*) pAction )->GetRect() ); + ImplEndRecord(); + } + break; + + case( META_CLIPREGION_ACTION ): + case( META_ISECTREGIONCLIPREGION_ACTION ): + case( META_MOVECLIPREGION_ACTION ): + { + ( (MetaAction*) pAction )->Execute( &maVDev ); + } + break; + + case( META_REFPOINT_ACTION ): + case( META_MAPMODE_ACTION ): + ( (MetaAction*) pAction )->Execute( &maVDev ); + break; + + case( META_PUSH_ACTION ): + { + ( (MetaAction*) pAction )->Execute( &maVDev ); + + ImplBeginRecord( WIN_EMR_SAVEDC ); + ImplEndRecord(); + } + break; + + case( META_POP_ACTION ): + { + ( (MetaAction*) pAction )->Execute( &maVDev ); + + ImplBeginRecord( WIN_EMR_RESTOREDC ); + (*mpStm) << (INT32) -1; + ImplEndRecord(); + + ImplWriteRasterOp( maVDev.GetRasterOp() ); + mbLineChanged = mbFillChanged = mbTextChanged = TRUE; + } + break; + + case( META_RASTEROP_ACTION ): + { + ( (MetaAction*) pAction )->Execute( &maVDev ); + ImplWriteRasterOp( ( (MetaRasterOpAction*) pAction )->GetRasterOp() ); + } + break; + + case( META_LAYOUTMODE_ACTION ): + { + sal_uInt32 nLayoutMode = ( (MetaLayoutModeAction*) pAction )->GetLayoutMode(); + mnHorTextAlign = 0; + if (nLayoutMode & TEXT_LAYOUT_BIDI_RTL) + { + mnHorTextAlign = TA_RIGHT | TA_RTLREADING; + } + if (nLayoutMode & TEXT_LAYOUT_TEXTORIGIN_RIGHT) + mnHorTextAlign |= TA_RIGHT; + else if (nLayoutMode & TEXT_LAYOUT_TEXTORIGIN_LEFT) + mnHorTextAlign &= ~TA_RIGHT; + break; + } + + case( META_MASK_ACTION ): + case( META_MASKSCALE_ACTION ): + case( META_MASKSCALEPART_ACTION ): + case( META_WALLPAPER_ACTION ): + case( META_TEXTLINE_ACTION ): + case( META_COMMENT_ACTION ): + case( META_GRADIENTEX_ACTION ): + { + // !!! >>> we don't want to support these actions + } + break; + + case( META_RENDERGRAPHIC_ACTION ): + { + const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pAction; + const ::vcl::RenderGraphicRasterizer aRasterizer( pA->GetRenderGraphic() ); + const BitmapEx aBmpEx( aRasterizer.Rasterize( maVDev.LogicToPixel( pA->GetSize() ) ) ); + Bitmap aBmp( aBmpEx.GetBitmap() ); + Bitmap aMsk( aBmpEx.GetMask() ); + + if( !!aMsk ) + { + aBmp.Replace( aMsk, COL_WHITE ); + aMsk.Invert(); + ImplWriteBmpRecord( aMsk, pA->GetPoint(), pA->GetSize(), WIN_SRCPAINT ); + ImplWriteBmpRecord( aBmp, pA->GetPoint(), pA->GetSize(), WIN_SRCAND ); + } + else + ImplWriteBmpRecord( aBmp, pA->GetPoint(), pA->GetSize(), WIN_SRCCOPY ); + } + break; + + default: + DBG_ERROR( ( ByteString( "EMFWriter::ImplWriteActions: unsupported MetaAction #" ) += ByteString::CreateFromInt32( nType ) ).GetBuffer() ); + break; + } + } +} diff --git a/svtools/source/filter/wmf/emfwr.hxx b/svtools/source/filter/wmf/emfwr.hxx new file mode 100644 index 000000000000..6334b5dfe16f --- /dev/null +++ b/svtools/source/filter/wmf/emfwr.hxx @@ -0,0 +1,100 @@ +/************************************************************************* + * + * 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 _EMFWR_HXX +#define _EMFWR_HXX + +#include +#include +#include +#include +#include +#include + +// ------------- +// - EMFWriter - +// ------------- + +class LineInfo; +namespace basegfx { class B2DPolygon; } + +class EMFWriter +{ +private: + + VirtualDevice maVDev; + MapMode maDestMapMode; + FilterConfigItem* mpFilterConfigItem; + SvStream* mpStm; + BOOL* mpHandlesUsed; + ULONG mnHandleCount; + ULONG mnLastPercent; + ULONG mnRecordCount; + ULONG mnRecordPos; + BOOL mbRecordOpen; + BOOL mbLineChanged; + sal_uInt32 mnLineHandle; + BOOL mbFillChanged; + sal_uInt32 mnFillHandle; + BOOL mbTextChanged; + sal_uInt32 mnTextHandle; + sal_uInt32 mnHorTextAlign; + + void ImplBeginRecord( sal_uInt32 nType ); + void ImplEndRecord(); + + ULONG ImplAcquireHandle(); + void ImplReleaseHandle( ULONG nHandle ); + + BOOL ImplPrepareHandleSelect( sal_uInt32& rHandle, ULONG nSelectType ); + void ImplCheckLineAttr(); + void ImplCheckFillAttr(); + void ImplCheckTextAttr(); + + void ImplWriteColor( const Color& rColor ); + void ImplWriteRasterOp( RasterOp eRop ); + void ImplWriteExtent( long nExtent ); + void ImplWritePoint( const Point& rPoint ); + void ImplWriteSize( const Size& rSize); + void ImplWriteRect( const Rectangle& rRect ); + void ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClose ); + void ImplWritePolygonRecord( const Polygon& rPoly, BOOL bClose ); + void ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly ); + void ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const Size& rSz, UINT32 nROP ); + void ImplWriteTextRecord( const Point& rPos, const String rText, const sal_Int32* pDXArray, sal_uInt32 nWidth ); + + void Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon); + void ImplWrite( const GDIMetaFile& rMtf ); + +public: + + EMFWriter() {} + + BOOL WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfigItem* pConfigItem = NULL ); +}; + +#endif // _EMFWR_HXX diff --git a/svtools/source/filter/wmf/enhwmf.cxx b/svtools/source/filter/wmf/enhwmf.cxx new file mode 100644 index 000000000000..1e49e0d61446 --- /dev/null +++ b/svtools/source/filter/wmf/enhwmf.cxx @@ -0,0 +1,1343 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#include "winmtf.hxx" +#include + +//=========================== GDI-Array =================================== + +#define EMR_HEADER 1 +#define EMR_POLYBEZIER 2 +#define EMR_POLYGON 3 +#define EMR_POLYLINE 4 +#define EMR_POLYBEZIERTO 5 +#define EMR_POLYLINETO 6 +#define EMR_POLYPOLYLINE 7 +#define EMR_POLYPOLYGON 8 +#define EMR_SETWINDOWEXTEX 9 +#define EMR_SETWINDOWORGEX 10 +#define EMR_SETVIEWPORTEXTEX 11 +#define EMR_SETVIEWPORTORGEX 12 +#define EMR_SETBRUSHORGEX 13 +#define EMR_EOF 14 +#define EMR_SETPIXELV 15 +#define EMR_SETMAPPERFLAGS 16 +#define EMR_SETMAPMODE 17 +#define EMR_SETBKMODE 18 +#define EMR_SETPOLYFILLMODE 19 +#define EMR_SETROP2 20 +#define EMR_SETSTRETCHBLTMODE 21 +#define EMR_SETTEXTALIGN 22 +#define EMR_SETCOLORADJUSTMENT 23 +#define EMR_SETTEXTCOLOR 24 +#define EMR_SETBKCOLOR 25 +#define EMR_OFFSETCLIPRGN 26 +#define EMR_MOVETOEX 27 +#define EMR_SETMETARGN 28 +#define EMR_EXCLUDECLIPRECT 29 +#define EMR_INTERSECTCLIPRECT 30 +#define EMR_SCALEVIEWPORTEXTEX 31 +#define EMR_SCALEWINDOWEXTEX 32 +#define EMR_SAVEDC 33 +#define EMR_RESTOREDC 34 +#define EMR_SETWORLDTRANSFORM 35 +#define EMR_MODIFYWORLDTRANSFORM 36 +#define EMR_SELECTOBJECT 37 +#define EMR_CREATEPEN 38 +#define EMR_CREATEBRUSHINDIRECT 39 +#define EMR_DELETEOBJECT 40 +#define EMR_ANGLEARC 41 +#define EMR_ELLIPSE 42 +#define EMR_RECTANGLE 43 +#define EMR_ROUNDRECT 44 +#define EMR_ARC 45 +#define EMR_CHORD 46 +#define EMR_PIE 47 +#define EMR_SELECTPALETTE 48 +#define EMR_CREATEPALETTE 49 +#define EMR_SETPALETTEENTRIES 50 +#define EMR_RESIZEPALETTE 51 +#define EMR_REALIZEPALETTE 52 +#define EMR_EXTFLOODFILL 53 +#define EMR_LINETO 54 +#define EMR_ARCTO 55 +#define EMR_POLYDRAW 56 +#define EMR_SETARCDIRECTION 57 +#define EMR_SETMITERLIMIT 58 +#define EMR_BEGINPATH 59 +#define EMR_ENDPATH 60 +#define EMR_CLOSEFIGURE 61 +#define EMR_FILLPATH 62 +#define EMR_STROKEANDFILLPATH 63 +#define EMR_STROKEPATH 64 +#define EMR_FLATTENPATH 65 +#define EMR_WIDENPATH 66 +#define EMR_SELECTCLIPPATH 67 +#define EMR_ABORTPATH 68 + +#define EMR_GDICOMMENT 70 +#define EMR_FILLRGN 71 +#define EMR_FRAMERGN 72 +#define EMR_INVERTRGN 73 +#define EMR_PAINTRGN 74 +#define EMR_EXTSELECTCLIPRGN 75 +#define EMR_BITBLT 76 +#define EMR_STRETCHBLT 77 +#define EMR_MASKBLT 78 +#define EMR_PLGBLT 79 +#define EMR_SETDIBITSTODEVICE 80 +#define EMR_STRETCHDIBITS 81 +#define EMR_EXTCREATEFONTINDIRECTW 82 +#define EMR_EXTTEXTOUTA 83 +#define EMR_EXTTEXTOUTW 84 +#define EMR_POLYBEZIER16 85 +#define EMR_POLYGON16 86 +#define EMR_POLYLINE16 87 +#define EMR_POLYBEZIERTO16 88 +#define EMR_POLYLINETO16 89 +#define EMR_POLYPOLYLINE16 90 +#define EMR_POLYPOLYGON16 91 +#define EMR_POLYDRAW16 92 +#define EMR_CREATEMONOBRUSH 93 +#define EMR_CREATEDIBPATTERNBRUSHPT 94 +#define EMR_EXTCREATEPEN 95 +#define EMR_POLYTEXTOUTA 96 +#define EMR_POLYTEXTOUTW 97 + +// WINDOWS VERSION >= 0x400 +#define EMR_SETICMMODE 98 +#define EMR_CREATECOLORSPACE 99 +#define EMR_SETCOLORSPACE 100 +#define EMR_DELETECOLORSPACE 101 +#define EMR_GLSRECORD 102 +#define EMR_GLSBOUNDEDRECORD 103 +#define EMR_PIXELFORMAT 104 + +// WINDOWS VERSION >= 0x500 +#define EMR_DRAWESCAPE 105 +#define EMR_EXTESCAPE 106 +#define EMR_STARTDOC 107 +#define EMR_SMALLTEXTOUT 108 +#define EMR_FORCEUFIMAPPING 109 +#define EMR_NAMEDESCAPE 110 +#define EMR_COLORCORRECTPALETTE 111 +#define EMR_SETICMPROFILEA 112 +#define EMR_SETICMPROFILEW 113 +#define EMR_ALPHABLEND 114 +#define EMR_ALPHADIBBLEND 115 +#define EMR_TRANSPARENTBLT 116 +#define EMR_TRANSPARENTDIB 117 +#define EMR_GRADIENTFILL 118 +#define EMR_SETLINKEDUFIS 119 +#define EMR_SETTEXTJUSTIFICATION 120 + + +//----------------------------------------------------------------------------------- + +#ifdef OSL_BIGENDIAN +// currently unused +static float GetSwapFloat( SvStream& rSt ) +{ + float fTmp; + sal_Int8* pPtr = (sal_Int8*)&fTmp; + rSt >> pPtr[3] >> pPtr[2] >> pPtr[1] >> pPtr[0]; // Little Endian <-> Big Endian switch + return fTmp; +} +#endif + +SvStream& operator>>( SvStream& rIn, XForm& rXForm ) +{ + if ( sizeof( float ) != 4 ) + { + DBG_ERROR( "EnhWMFReader::sizeof( float ) != 4" ); + rXForm = XForm(); + } + else + { +#ifdef OSL_BIGENDIAN + rXForm.eM11 = GetSwapFloat( rIn ); + rXForm.eM12 = GetSwapFloat( rIn ); + rXForm.eM21 = GetSwapFloat( rIn ); + rXForm.eM22 = GetSwapFloat( rIn ); + rXForm.eDx = GetSwapFloat( rIn ); + rXForm.eDy = GetSwapFloat( rIn ); +#else + rIn >> rXForm.eM11 >> rXForm.eM12 >> rXForm.eM21 >> rXForm.eM22 + >> rXForm.eDx >> rXForm.eDy; +#endif + } + return rIn; +} + +static sal_Bool ImplReadRegion( PolyPolygon& rPolyPoly, SvStream& rSt, sal_uInt32 nLen ) +{ + sal_Bool bOk = sal_False; + if ( nLen ) + { + sal_uInt32 nHdSize, nType, nCount, nRgnSize, i; + rSt >> nHdSize + >> nType + >> nCount + >> nRgnSize; + + if ( nCount && ( nType == RDH_RECTANGLES ) && + ( nLen >= ( ( nCount << 4 ) + ( nHdSize - 16 ) ) ) ) + { + sal_Int32 nx1, ny1, nx2, ny2; + + for ( i = 0; i < nCount; i++ ) + { + rSt >> nx1 >> ny1 >> nx2 >> ny2; + + Rectangle aRect( Point( nx1, ny1 ), Point( nx2, ny2 ) ); + Polygon aPolygon( aRect ); + PolyPolygon aPolyPolyOr1( aPolygon ); + PolyPolygon aPolyPolyOr2( rPolyPoly ); + rPolyPoly.GetUnion( aPolyPolyOr1, aPolyPolyOr2 ); + rPolyPoly = aPolyPolyOr2; + } + bOk = sal_True; + } + } + return bOk; +} + +BOOL EnhWMFReader::ReadEnhWMF() +{ + sal_uInt32 nStretchBltMode = 0; + sal_uInt32 nRecType, nRecSize, nNextPos, + nW, nH, nPoints, nColor, nIndex, + nDat32, nNom1, nDen1, nNom2, nDen2; + sal_Int32 nX32, nY32, nx32, ny32; + sal_Int16 nX16, nY16; + + sal_Bool bFlag, bStatus = ReadHeader(); + + while( bStatus && nRecordCount-- ) + { + *pWMF >> nRecType >> nRecSize; + + if ( ( nRecSize < 8 ) || ( nRecSize & 3 ) ) // Parameter sind immer durch 4 teilbar + { + bStatus = FALSE; + break; + } + + nNextPos = pWMF->Tell() + ( nRecSize - 8 ); + + if ( nNextPos > nEndPos ) + { + bStatus = FALSE; + break; + } + + if( aBmpSaveList.Count() && ( nRecType != EMR_STRETCHBLT ) && ( nRecType != EMR_STRETCHDIBITS ) ) + pOut->ResolveBitmapActions( aBmpSaveList ); + + bFlag = sal_False; + + switch( nRecType ) + { + case EMR_POLYBEZIERTO : + bFlag = sal_True; + case EMR_POLYBEZIER : + { + pWMF->SeekRel( 16 ); + *pWMF >> nPoints; + sal_uInt16 i = 0; + if ( bFlag ) + { + i++; + nPoints++; + } + Polygon aPoly( (sal_uInt16)nPoints ); + for( ; i < (sal_uInt16)nPoints; i++ ) + { + *pWMF >> nX32 >> nY32; + aPoly[ i ] = Point( nX32, nY32 ); + } + pOut->DrawPolyBezier( aPoly, bFlag, bRecordPath ); + } + break; + + case EMR_POLYGON : + { + pWMF->SeekRel( 16 ); + *pWMF >> nPoints; + Polygon aPoly( (UINT16)nPoints ); + for( UINT16 k = 0; k < (UINT16)nPoints; k++ ) + { + *pWMF >> nX32 >> nY32; + aPoly[ k ] = Point( nX32, nY32 ); + } + pOut->DrawPolygon( aPoly, bRecordPath ); + } + break; + + case EMR_POLYLINETO : + bFlag = sal_True; + case EMR_POLYLINE : + { + pWMF->SeekRel( 0x10 ); + *pWMF >> nPoints; + UINT16 i = 0; + if ( bFlag ) + { + i++; + nPoints++; + } + Polygon aPolygon( (UINT16)nPoints ); + for ( ; i < (UINT16)nPoints; i++ ) + { + *pWMF >> nX32 >> nY32; + aPolygon[ i ] = Point( nX32, nY32 ); + } + pOut->DrawPolyLine( aPolygon, bFlag, bRecordPath ); + } + break; + + case EMR_POLYPOLYLINE : + { + UINT16* pnPoints; + + INT32 i, nPoly; + pWMF->SeekRel( 0x10 ); + + // Anzahl der Polygone: + *pWMF >> nPoly >> i; + + // taking the amount of points of each polygon, retrieving the total number of points + if ( static_cast< sal_uInt32 >(nPoly) < SAL_MAX_UINT32 / sizeof(UINT16) ) + { + if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof(UINT16) ) <= ( nEndPos - pWMF->Tell() ) ) + { + pnPoints = new UINT16[ nPoly ]; + + for ( i = 0; i < nPoly; i++ ) + { + *pWMF >> nPoints; + pnPoints[ i ] = (UINT16)nPoints; + } + + // Polygonpunkte holen: + + for ( i = 0; ( i < nPoly ) && !pWMF->IsEof(); i++ ) + { + Polygon aPoly( pnPoints[ i ] ); + for( UINT16 k = 0; k < pnPoints[ i ]; k++ ) + { + *pWMF >> nX32 >> nY32; + aPoly[ k ] = Point( nX32, nY32 ); + } + pOut->DrawPolyLine( aPoly, sal_False, bRecordPath ); + } + delete[] pnPoints; + } + } + } + break; + + case EMR_POLYPOLYGON : + { + UINT16* pnPoints; + Point* pPtAry; + + UINT32 i, nPoly, nGesPoints; + pWMF->SeekRel( 0x10 ); + + // Anzahl der Polygone: + *pWMF >> nPoly >> nGesPoints; + + if ( ( nGesPoints < SAL_MAX_UINT32 / sizeof(Point) ) && ( nPoly < SAL_MAX_UINT32 / sizeof(UINT16) ) ) + { + if ( ( nPoly * sizeof(UINT16) ) <= ( nEndPos - pWMF->Tell() ) ) + { + pnPoints = new UINT16[ nPoly ]; + + for ( i = 0; i < nPoly; i++ ) + { + *pWMF >> nPoints; + pnPoints[ i ] = (UINT16)nPoints; + } + + if ( ( nGesPoints * (sizeof(sal_uInt32)+sizeof(sal_uInt32)) ) <= ( nEndPos - pWMF->Tell() ) ) + { + // Polygonpunkte holen: + pPtAry = new Point[ nGesPoints ]; + + for ( i = 0; i < nGesPoints; i++ ) + { + *pWMF >> nX32 >> nY32; + pPtAry[ i ] = Point( nX32, nY32 ); + } + // PolyPolygon Actions erzeugen + PolyPolygon aPolyPoly( (UINT16)nPoly, pnPoints, pPtAry ); + pOut->DrawPolyPolygon( aPolyPoly, bRecordPath ); + delete[] pPtAry; + } + delete[] pnPoints; + } + } + } + break; + + case EMR_SETWINDOWEXTEX : + { // #75383# + *pWMF >> nW >> nH; + pOut->SetWinExt( Size( nW, nH ) ); + } + break; + + case EMR_SETWINDOWORGEX : + { + *pWMF >> nX32 >> nY32; + pOut->SetWinOrg( Point( nX32, nY32 ) ); + } + break; + + case EMR_SCALEWINDOWEXTEX : + { + *pWMF >> nNom1 >> nDen1 >> nNom2 >> nDen2; + pOut->ScaleWinExt( (double)nNom1 / nDen1, (double)nNom2 / nDen2 ); + } + break; + + case EMR_SETVIEWPORTORGEX : + { + *pWMF >> nX32 >> nY32; + pOut->SetDevOrg( Point( nX32, nY32 ) ); + } + break; + + case EMR_SCALEVIEWPORTEXTEX : + { + *pWMF >> nNom1 >> nDen1 >> nNom2 >> nDen2; + pOut->ScaleDevExt( (double)nNom1 / nDen1, (double)nNom2 / nDen2 ); + } + break; + + case EMR_SETVIEWPORTEXTEX : + { + *pWMF >> nW >> nH; + pOut->SetDevExt( Size( nW, nH ) ); + } + break; + + case EMR_EOF : + nRecordCount = 0; // #76846# + break; + + case EMR_SETPIXELV : + { + *pWMF >> nX32 >> nY32; + pOut->DrawPixel( Point( nX32, nY32 ), ReadColor() ); + } + break; + + case EMR_SETMAPMODE : + { + sal_uInt32 nMapMode; + *pWMF >> nMapMode; + pOut->SetMapMode( nMapMode ); + } + break; + + case EMR_SETBKMODE : + { + *pWMF >> nDat32; + pOut->SetBkMode( nDat32 ); + } + break; + + case EMR_SETPOLYFILLMODE : + break; + + case EMR_SETROP2 : + { + *pWMF >> nDat32; + pOut->SetRasterOp( nDat32 ); + } + break; + + case EMR_SETSTRETCHBLTMODE : + { + *pWMF >> nStretchBltMode; + } + break; + + case EMR_SETTEXTALIGN : + { + *pWMF >> nDat32; + pOut->SetTextAlign( nDat32 ); + } + break; + + case EMR_SETTEXTCOLOR : + { + pOut->SetTextColor( ReadColor() ); + } + break; + + case EMR_SETBKCOLOR : + { + pOut->SetBkColor( ReadColor() ); + } + break; + + case EMR_OFFSETCLIPRGN : + { + *pWMF >> nX32 >> nY32; + pOut->MoveClipRegion( Size( nX32, nY32 ) ); + } + break; + + case EMR_MOVETOEX : + { + *pWMF >> nX32 >> nY32; + pOut->MoveTo( Point( nX32, nY32 ), bRecordPath ); + } + break; + + case EMR_INTERSECTCLIPRECT : + { + *pWMF >> nX32 >> nY32 >> nx32 >> ny32; + pOut->IntersectClipRect( ReadRectangle( nX32, nY32, nx32, ny32 ) ); + } + break; + + case EMR_SAVEDC : + { + pOut->Push(); + } + break; + + case EMR_RESTOREDC : + { + pOut->Pop(); + } + break; + + case EMR_SETWORLDTRANSFORM : + { + XForm aTempXForm; + *pWMF >> aTempXForm; + pOut->SetWorldTransform( aTempXForm ); + } + break; + + case EMR_MODIFYWORLDTRANSFORM : + { + UINT32 nMode; + XForm aTempXForm; + *pWMF >> aTempXForm >> nMode; + pOut->ModifyWorldTransform( aTempXForm, nMode ); + } + break; + + case EMR_SELECTOBJECT : + { + *pWMF >> nIndex; + pOut->SelectObject( nIndex ); + } + break; + + case EMR_CREATEPEN : + { + *pWMF >> nIndex; + if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) + { + + LineInfo aLineInfo; + UINT32 nStyle; + Size aSize; + + *pWMF >> nStyle >> aSize.Width() >> aSize.Height(); + + if ( aSize.Width() ) + aLineInfo.SetWidth( aSize.Width() ); + + BOOL bTransparent = FALSE; + UINT16 nDashCount = 0; + UINT16 nDotCount = 0; + switch( nStyle ) + { + case PS_DASHDOTDOT : + nDotCount++; + case PS_DASHDOT : + nDashCount++; + case PS_DOT : + nDotCount++; + break; + case PS_DASH : + nDashCount++; + break; + case PS_NULL : + bTransparent = TRUE; + aLineInfo.SetStyle( LINE_NONE ); + break; + default : + case PS_INSIDEFRAME : + case PS_SOLID : + aLineInfo.SetStyle( LINE_SOLID ); + } + if ( nDashCount | nDotCount ) + { + aLineInfo.SetStyle( LINE_DASH ); + aLineInfo.SetDashCount( nDashCount ); + aLineInfo.SetDotCount( nDotCount ); + } + pOut->CreateObject( nIndex, GDI_PEN, new WinMtfLineStyle( ReadColor(), aLineInfo, bTransparent ) ); + } + } + break; + + case EMR_EXTCREATEPEN : + { + sal_Int32 elpHatch; + sal_uInt32 offBmi, cbBmi, offBits, cbBits, nStyle, nWidth, nBrushStyle, elpNumEntries; + Color aColorRef; + + *pWMF >> nIndex; + if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) + { + *pWMF >> offBmi >> cbBmi >> offBits >> cbBits >> nStyle >> nWidth >> nBrushStyle; + aColorRef = ReadColor(); + *pWMF >> elpHatch >> elpNumEntries; + + LineInfo aLineInfo; + if ( nWidth ) + aLineInfo.SetWidth( nWidth ); + + sal_Bool bTransparent = sal_False; + sal_uInt16 nDashCount = 0; + sal_uInt16 nDotCount = 0; + + switch( nStyle & PS_STYLE_MASK ) + { + case PS_DASHDOTDOT : + nDotCount++; + case PS_DASHDOT : + nDashCount++; + case PS_DOT : + nDotCount++; + break; + case PS_DASH : + nDashCount++; + break; + case PS_NULL : + bTransparent = sal_True; + aLineInfo.SetStyle( LINE_NONE ); + break; + + default : + case PS_INSIDEFRAME : + case PS_SOLID : + aLineInfo.SetStyle( LINE_SOLID ); + } + if ( nDashCount | nDotCount ) + { + aLineInfo.SetStyle( LINE_DASH ); + aLineInfo.SetDashCount( nDashCount ); + aLineInfo.SetDotCount( nDotCount ); + } + pOut->CreateObject( nIndex, GDI_PEN, new WinMtfLineStyle( aColorRef, aLineInfo, bTransparent ) ); + } + } + break; + + case EMR_CREATEBRUSHINDIRECT : + { + UINT32 nStyle; + *pWMF >> nIndex; + if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) + { + *pWMF >> nStyle; + pOut->CreateObject( nIndex, GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? TRUE : FALSE ) ); + } + } + break; + + case EMR_DELETEOBJECT : + { + *pWMF >> nIndex; + if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) + pOut->DeleteObject( nIndex ); + } + break; + + case EMR_ELLIPSE : + { + *pWMF >> nX32 >> nY32 >> nx32 >> ny32; + pOut->DrawEllipse( ReadRectangle( nX32, nY32, nx32, ny32 ) ); + } + break; + + case EMR_RECTANGLE : + { + *pWMF >> nX32 >> nY32 >> nx32 >> ny32; + pOut->DrawRect( ReadRectangle( nX32, nY32, nx32, ny32 ) ); + } + break; + + case EMR_ROUNDRECT : + { + *pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nW >> nH; + Size aSize( Size( nW, nH ) ); + pOut->DrawRoundRect( ReadRectangle( nX32, nY32, nx32, ny32 ), aSize ); + } + break; + + case EMR_ARC : + { + UINT32 nStartX, nStartY, nEndX, nEndY; + *pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY; + pOut->DrawArc( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ) ); + } + break; + + case EMR_CHORD : + { + UINT32 nStartX, nStartY, nEndX, nEndY; + *pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY; + pOut->DrawChord( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ) ); + } + break; + + case EMR_PIE : + { + UINT32 nStartX, nStartY, nEndX, nEndY; + *pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY; + const Rectangle aRect( ReadRectangle( nX32, nY32, nx32, ny32 )); + + // #i73608# OutputDevice deviates from WMF + // semantics. start==end means full ellipse here. + if( nStartX == nEndX && nStartY == nEndY ) + pOut->DrawEllipse( aRect ); + else + pOut->DrawPie( aRect, Point( nStartX, nStartY ), Point( nEndX, nEndY ) ); + } + break; + + case EMR_LINETO : + { + *pWMF >> nX32 >> nY32; + pOut->LineTo( Point( nX32, nY32 ), bRecordPath ); + } + break; + + case EMR_ARCTO : + { + UINT32 nStartX, nStartY, nEndX, nEndY; + *pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY; + pOut->DrawArc( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ), TRUE ); + } + break; + + case EMR_BEGINPATH : + { + pOut->ClearPath(); + bRecordPath = sal_True; + } + break; + + case EMR_ABORTPATH : + pOut->ClearPath(); + case EMR_ENDPATH : + bRecordPath = sal_False; + break; + + case EMR_CLOSEFIGURE : + pOut->ClosePath(); + break; + + case EMR_FILLPATH : + pOut->StrokeAndFillPath( sal_False, sal_True ); + break; + + case EMR_STROKEANDFILLPATH : + pOut->StrokeAndFillPath( sal_True, sal_True ); + break; + + case EMR_STROKEPATH : + pOut->StrokeAndFillPath( sal_True, sal_False ); + break; + + case EMR_SELECTCLIPPATH : + { + sal_Int32 nClippingMode; + *pWMF >> nClippingMode; + pOut->SetClipPath( pOut->GetPathObj(), nClippingMode, sal_True ); + } + break; + + case EMR_EXTSELECTCLIPRGN : + { + sal_Int32 iMode, cbRgnData; + *pWMF >> cbRgnData + >> iMode; + + PolyPolygon aPolyPoly; + if ( cbRgnData ) + ImplReadRegion( aPolyPoly, *pWMF, nRecSize ); + pOut->SetClipPath( aPolyPoly, iMode, sal_False ); + } + break; + + case EMR_BITBLT : // PASSTHROUGH INTENDED + case EMR_STRETCHBLT : + { + INT32 xDest, yDest, cxDest, cyDest, xSrc, ySrc, cxSrc, cySrc; + UINT32 dwRop, iUsageSrc, offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc; + XForm xformSrc; + + UINT32 nStart = pWMF->Tell() - 8; + + pWMF->SeekRel( 0x10 ); + *pWMF >> xDest >> yDest >> cxDest >> cyDest >> dwRop >> xSrc >> ySrc + >> xformSrc >> nColor >> iUsageSrc >> offBmiSrc >> cbBmiSrc + >> offBitsSrc >> cbBitsSrc; + + if ( nRecType == EMR_STRETCHBLT ) + *pWMF >> cxSrc >> cySrc; + else + cxSrc = cySrc = 0; + + Bitmap aBitmap; + Rectangle aRect( Point( xDest, yDest ), Size( cxDest+1, cyDest+1 ) ); + + cxDest = abs( (int)cxDest ); // sj: i37894, size can be negative + cyDest = abs( (int)cyDest ); // and also 122889 + + if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) ) + bStatus = FALSE; + else + { + UINT32 nSize = cbBmiSrc + cbBitsSrc + 14; + if ( nSize <= ( nEndPos - nStartPos ) ) + { + char* pBuf = new char[ nSize ]; + SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE ); + aTmp.ObjectOwnsMemory( TRUE ); + aTmp << (BYTE)'B' + << (BYTE)'M' + << (UINT32)cbBitsSrc + << (UINT16)0 + << (UINT16)0 + << (UINT32)cbBmiSrc + 14; + pWMF->Seek( nStart + offBmiSrc ); + pWMF->Read( pBuf + 14, cbBmiSrc ); + pWMF->Seek( nStart + offBitsSrc ); + pWMF->Read( pBuf + 14 + cbBmiSrc, cbBitsSrc ); + aTmp.Seek( 0 ); + aBitmap.Read( aTmp, TRUE ); + + // test if it is sensible to crop + if ( ( cxSrc > 0 ) && ( cySrc > 0 ) && + ( xSrc >= 0 ) && ( ySrc >= 0 ) && + ( xSrc + cxSrc <= aBitmap.GetSizePixel().Width() ) && + ( ySrc + cySrc <= aBitmap.GetSizePixel().Height() ) ) + { + Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) ); + aBitmap.Crop( aCropRect ); + } + aBmpSaveList.Insert( new BSaveStruct( aBitmap, aRect, dwRop ), LIST_APPEND ); + } + } + } + break; + + case EMR_STRETCHDIBITS : + { + INT32 xDest, yDest, xSrc, ySrc, cxSrc, cySrc, cxDest, cyDest; + UINT32 offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc, iUsageSrc, dwRop; + UINT32 nStart = pWMF->Tell() - 8; + + pWMF->SeekRel( 0x10 ); + *pWMF >> xDest >> yDest >> xSrc >> ySrc >> cxSrc >> cySrc >> offBmiSrc >> cbBmiSrc >> offBitsSrc + >> cbBitsSrc >> iUsageSrc >> dwRop >> cxDest >> cyDest; + + Bitmap aBitmap; + Rectangle aRect( Point( xDest, yDest ), Size( cxDest+1, cyDest+1 ) ); + + cxDest = abs( (int)cxDest ); // sj: i37894, size can be negative + cyDest = abs( (int)cyDest ); // and also 122889 + + if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) ) + bStatus = FALSE; + else + { + UINT32 nSize = cbBmiSrc + cbBitsSrc + 14; + if ( nSize <= ( nEndPos - nStartPos ) ) + { + char* pBuf = new char[ nSize ]; + SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE ); + aTmp.ObjectOwnsMemory( TRUE ); + aTmp << (BYTE)'B' + << (BYTE)'M' + << (UINT32)cbBitsSrc + << (UINT16)0 + << (UINT16)0 + << (UINT32)cbBmiSrc + 14; + pWMF->Seek( nStart + offBmiSrc ); + pWMF->Read( pBuf + 14, cbBmiSrc ); + pWMF->Seek( nStart + offBitsSrc ); + pWMF->Read( pBuf + 14 + cbBmiSrc, cbBitsSrc ); + aTmp.Seek( 0 ); + aBitmap.Read( aTmp, TRUE ); + + // test if it is sensible to crop + if ( ( cxSrc > 0 ) && ( cySrc > 0 ) && + ( xSrc >= 0 ) && ( ySrc >= 0 ) && + ( xSrc + cxSrc <= aBitmap.GetSizePixel().Width() ) && + ( ySrc + cySrc <= aBitmap.GetSizePixel().Height() ) ) + { + Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) ); + aBitmap.Crop( aCropRect ); + } + aBmpSaveList.Insert( new BSaveStruct( aBitmap, aRect, dwRop ), LIST_APPEND ); + } + } + } + break; + + case EMR_EXTCREATEFONTINDIRECTW : + { + *pWMF >> nIndex; + if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) + { + LOGFONTW aLogFont; + *pWMF >> aLogFont.lfHeight >> aLogFont.lfWidth >> aLogFont.lfEscapement >> aLogFont.lfOrientation >> aLogFont.lfWeight >> aLogFont.lfItalic + >> aLogFont.lfUnderline >> aLogFont.lfStrikeOut >> aLogFont.lfCharSet >> aLogFont.lfOutPrecision >> aLogFont.lfClipPrecision + >> aLogFont.lfQuality >> aLogFont.lfPitchAndFamily; + + sal_Unicode lfFaceName[ LF_FACESIZE ]; + + for ( int i = 0; i < LF_FACESIZE; i++ ) + { + UINT16 nChar; + *pWMF >> nChar; + lfFaceName[ i ] = nChar; + } + aLogFont.alfFaceName = UniString( lfFaceName ); + pOut->CreateObject( nIndex, GDI_FONT, new WinMtfFontStyle( aLogFont ) ); + } + } + break; + + case EMR_EXTTEXTOUTA : + bFlag = sal_True; + case EMR_EXTTEXTOUTW : + { + sal_Int32 nLeft, nTop, nRight, nBottom, ptlReferenceX, ptlReferenceY, nGfxMode, nXScale, nYScale; + sal_uInt32 nCurPos, nLen, nOffString, nOptions, offDx; + sal_Int32* pDX = NULL; + + nCurPos = pWMF->Tell() - 8; + + *pWMF >> nLeft >> nTop >> nRight >> nBottom >> nGfxMode >> nXScale >> nYScale + >> ptlReferenceX >> ptlReferenceY >> nLen >> nOffString >> nOptions; + + pWMF->SeekRel( 0x10 ); + *pWMF >> offDx; + + sal_Int32 nTextLayoutMode = TEXT_LAYOUT_DEFAULT; + if ( nOptions & ETO_RTLREADING ) + nTextLayoutMode = TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT; + pOut->SetTextLayoutMode( nTextLayoutMode ); + DBG_ASSERT( ( nOptions & ( ETO_PDY | ETO_GLYPH_INDEX ) ) == 0, "SJ: ETO_PDY || ETO_GLYPH_INDEX in EMF" ); + + Point aPos( ptlReferenceX, ptlReferenceY ); + if ( nLen && ( nLen < SAL_MAX_UINT32 / sizeof(sal_Int32) ) ) + { + if ( offDx && (( nCurPos + offDx + nLen * 4 ) <= nNextPos ) ) + { + pWMF->Seek( nCurPos + offDx ); + if ( ( nLen * sizeof(sal_uInt32) ) <= ( nEndPos - pWMF->Tell() ) ) + { + pDX = new sal_Int32[ nLen ]; + sal_uInt32 i; + for ( i = 0; i < nLen; i++ ) + *pWMF >> pDX[ i ]; + } + } + pWMF->Seek( nCurPos + nOffString ); + String aText; + if ( bFlag ) + { + if ( nLen <= ( nEndPos - pWMF->Tell() ) ) + { + sal_Char* pBuf = new sal_Char[ nLen ]; + pWMF->Read( pBuf, nLen ); + aText = String( pBuf, (sal_uInt16)nLen, pOut->GetCharSet() ); + delete[] pBuf; + + if ( aText.Len() != nLen ) + { + sal_uInt16 i, j, k; + sal_Int32* pOldDx = pDX; + pDX = new sal_Int32[ aText.Len() ]; + for ( i = 0, j = 0; i < aText.Len(); i++ ) + { + ByteString aCharacter( aText.GetChar( i ), pOut->GetCharSet() ); + pDX[ i ] = 0; + for ( k = 0; ( k < aCharacter.Len() ) && ( j < nLen ) && ( i < aText.Len() ); k++ ) + pDX[ i ] += pOldDx[ j++ ]; + } + delete[] pOldDx; + } + } + } + else + { + if ( ( nLen * sizeof(sal_Unicode) ) <= ( nEndPos - pWMF->Tell() ) ) + { + sal_Unicode* pBuf = new sal_Unicode[ nLen ]; + pWMF->Read( pBuf, nLen << 1 ); +#ifdef OSL_BIGENDIAN + sal_Char nTmp, *pTmp = (sal_Char*)( pBuf + nLen ); + while ( pTmp-- != (sal_Char*)pBuf ) + { + nTmp = *pTmp--; + pTmp[ 1 ] = *pTmp; + *pTmp = nTmp; + } +#endif + aText = String( pBuf, (xub_StrLen)nLen ); + delete[] pBuf; + } + } + pOut->DrawText( aPos, aText, pDX, bRecordPath, nGfxMode ); + } + delete[] pDX; + } + break; + + case EMR_POLYBEZIERTO16 : + bFlag = sal_True; + case EMR_POLYBEZIER16 : + { + pWMF->SeekRel( 16 ); + *pWMF >> nPoints; + UINT16 i = 0; + if ( bFlag ) + { + i++; + nPoints++; + } + Polygon aPoly( (UINT16)nPoints ); + for( ; i < (UINT16)nPoints; i++ ) + { + *pWMF >> nX16 >> nY16; + aPoly[ i ] = Point( nX16, nY16 ); + } + pOut->DrawPolyBezier( aPoly, bFlag, bRecordPath ); // Line( aPoly, bFlag ); + } + break; + + case EMR_POLYGON16 : + { + pWMF->SeekRel( 16 ); + *pWMF >> nPoints; + Polygon aPoly( (UINT16)nPoints ); + for( UINT16 k = 0; k < (UINT16)nPoints; k++ ) + { + *pWMF >> nX16 >> nY16; + aPoly[ k ] = Point( nX16, nY16 ); + } + pOut->DrawPolygon( aPoly, bRecordPath ); + } + break; + + case EMR_POLYLINETO16 : + bFlag = sal_True; + case EMR_POLYLINE16 : + { + pWMF->SeekRel( 16 ); + *pWMF >> nPoints; + UINT16 i = 0; + if ( bFlag ) + { + i++; + nPoints++; + } + + Polygon aPoly( (UINT16)nPoints ); + for( ; i < (UINT16)nPoints; i++ ) + { + *pWMF >> nX16 >> nY16; + aPoly[ i ] = Point( nX16, nY16 ); + } + pOut->DrawPolyLine( aPoly, bFlag, bRecordPath ); + } + break; + + case EMR_POLYPOLYLINE16 : + { + UINT16* pnPoints; + + INT32 i, nPoly, nGesPoints; + pWMF->SeekRel( 0x10 ); + // Anzahl der Polygone: + *pWMF >> nPoly >> nGesPoints; + + // taking the amount of points of each polygon, retrieving the total number of points + if ( static_cast< sal_uInt32 >(nPoly) < SAL_MAX_UINT32 / sizeof(UINT16) ) + { + if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof(UINT16) ) <= ( nEndPos - pWMF->Tell() ) ) + { + pnPoints = new UINT16[ nPoly ]; + for ( i = 0; i < nPoly; i++ ) + { + *pWMF >> nPoints; + pnPoints[ i ] = (UINT16)nPoints; + } + // Polygonpunkte holen: + for ( i = 0; ( i < nPoly ) && !pWMF->IsEof(); i++ ) + { + Polygon aPolygon( pnPoints[ i ] ); + for ( UINT16 k = 0; k < pnPoints[ i ]; k++ ) + { + *pWMF >> nX16 >> nY16; + aPolygon[ k ] = Point( nX16, nY16 ); + } + pOut->DrawPolyLine( aPolygon, sal_False, bRecordPath ); + } + delete[] pnPoints; + } + } + } + break; + + case EMR_POLYPOLYGON16 : + { + UINT16* pnPoints; + Point* pPtAry; + + UINT32 i, nPoly, nGesPoints; + pWMF->SeekRel( 0x10 ); + // Anzahl der Polygone: + *pWMF >> nPoly >> nGesPoints; + if ( ( nGesPoints < SAL_MAX_UINT32 / sizeof(Point) ) && ( nPoly < SAL_MAX_UINT32 / sizeof(UINT16) ) ) + { + if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof( UINT16 ) ) <= ( nEndPos - pWMF->Tell() ) ) + { + pnPoints = new UINT16[ nPoly ]; + for ( i = 0; i < nPoly; i++ ) + { + *pWMF >> nPoints; + pnPoints[ i ] = (UINT16)nPoints; + } + if ( ( nGesPoints * (sizeof(sal_uInt16)+sizeof(sal_uInt16)) ) <= ( nEndPos - pWMF->Tell() ) ) + { + // Polygonpunkte holen: + pPtAry = new Point[ nGesPoints ]; + for ( i = 0; i < nGesPoints; i++ ) + { + *pWMF >> nX16 >> nY16; + pPtAry[ i ] = Point( nX16, nY16 ); + } + + // PolyPolygon Actions erzeugen + PolyPolygon aPolyPoly( (UINT16)nPoly, pnPoints, pPtAry ); + pOut->DrawPolyPolygon( aPolyPoly, bRecordPath ); + delete[] pPtAry; + } + delete[] pnPoints; + } + } + } + break; + + case EMR_FILLRGN : + { + sal_uInt32 nLen; + PolyPolygon aPolyPoly; + pWMF->SeekRel( 0x10 ); + *pWMF >> nLen >> nIndex; + + if ( ImplReadRegion( aPolyPoly, *pWMF, nRecSize ) ) + { + pOut->Push(); + pOut->SelectObject( nIndex ); + pOut->DrawPolyPolygon( aPolyPoly, sal_False ); + pOut->Pop(); + } + } + break; + + +#ifdef WIN_MTF_ASSERT + default : WinMtfAssertHandler( "Unknown Meta Action" ); break; + case EMR_MASKBLT : WinMtfAssertHandler( "MaskBlt" ); break; + case EMR_PLGBLT : WinMtfAssertHandler( "PlgBlt" ); break; + case EMR_SETDIBITSTODEVICE : WinMtfAssertHandler( "SetDIBitsToDevice" ); break; + case EMR_FRAMERGN : WinMtfAssertHandler( "FrameRgn" ); break; + case EMR_INVERTRGN : WinMtfAssertHandler( "InvertRgn" ); break; + case EMR_PAINTRGN : WinMtfAssertHandler( "PaintRgn" ); break; + case EMR_FLATTENPATH : WinMtfAssertHandler( "FlattenPath" ); break; + case EMR_WIDENPATH : WinMtfAssertHandler( "WidenPath" ); break; + case EMR_POLYDRAW : WinMtfAssertHandler( "Polydraw" ); break; + case EMR_SETARCDIRECTION : WinMtfAssertHandler( "SetArcDirection" ); break; + case EMR_SETPALETTEENTRIES : WinMtfAssertHandler( "SetPaletteEntries" ); break; + case EMR_RESIZEPALETTE : WinMtfAssertHandler( "ResizePalette" ); break; + case EMR_EXTFLOODFILL : WinMtfAssertHandler( "ExtFloodFill" ); break; + case EMR_ANGLEARC : WinMtfAssertHandler( "AngleArc" ); break; + case EMR_SETCOLORADJUSTMENT : WinMtfAssertHandler( "SetColorAdjustment" ); break; + case EMR_POLYDRAW16 : WinMtfAssertHandler( "PolyDraw16" ); break; + case EMR_CREATEDIBPATTERNBRUSHPT : WinMtfAssertHandler( "CreateDibPatternBrushPt" ); break; + case EMR_POLYTEXTOUTA : WinMtfAssertHandler( "PolyTextOutA" ); break; + case EMR_POLYTEXTOUTW : WinMtfAssertHandler( "PolyTextOutW" ); break; + case EMR_CREATECOLORSPACE : WinMtfAssertHandler( "CreateColorSpace" ); break; + case EMR_SETCOLORSPACE : WinMtfAssertHandler( "SetColorSpace" ); break; + case EMR_DELETECOLORSPACE : WinMtfAssertHandler( "DeleteColorSpace" ); break; + case EMR_GLSRECORD : WinMtfAssertHandler( "GlsRecord" ); break; + case EMR_GLSBOUNDEDRECORD : WinMtfAssertHandler( "GlsBoundRecord" ); break; + case EMR_PIXELFORMAT : WinMtfAssertHandler( "PixelFormat" ); break; + case EMR_DRAWESCAPE : WinMtfAssertHandler( "DrawEscape" ); break; + case EMR_EXTESCAPE : WinMtfAssertHandler( "ExtEscape" ); break; + case EMR_STARTDOC : WinMtfAssertHandler( "StartDoc" ); break; + case EMR_SMALLTEXTOUT : WinMtfAssertHandler( "SmallTextOut" ); break; + case EMR_FORCEUFIMAPPING : WinMtfAssertHandler( "ForceUFIMapping" ); break; + case EMR_NAMEDESCAPE : WinMtfAssertHandler( "NamedEscape" ); break; + case EMR_COLORCORRECTPALETTE : WinMtfAssertHandler( "ColorCorrectPalette" ); break; + case EMR_SETICMPROFILEA : WinMtfAssertHandler( "SetICMProfileA" ); break; + case EMR_SETICMPROFILEW : WinMtfAssertHandler( "SetICMProfileW" ); break; + case EMR_ALPHABLEND : WinMtfAssertHandler( "Alphablend" ); break; + case EMR_TRANSPARENTBLT : WinMtfAssertHandler( "TransparenBlt" ); break; + case EMR_TRANSPARENTDIB : WinMtfAssertHandler( "TransparenDib" ); break; + case EMR_GRADIENTFILL : WinMtfAssertHandler( "GradientFill" ); break; + case EMR_SETLINKEDUFIS : WinMtfAssertHandler( "SetLinkedUFIS" ); break; + + case EMR_SETMAPPERFLAGS : WinMtfAssertHandler( "SetMapperFlags", 0 ); break; + case EMR_SETICMMODE : WinMtfAssertHandler( "SetICMMode", 0 ); break; + case EMR_CREATEMONOBRUSH : WinMtfAssertHandler( "CreateMonoBrush", 0 ); break; + case EMR_SETBRUSHORGEX : WinMtfAssertHandler( "SetBrushOrgEx", 0 ); break; + case EMR_SETMETARGN : WinMtfAssertHandler( "SetMetArgn", 0 ); break; + case EMR_SETMITERLIMIT : WinMtfAssertHandler( "SetMiterLimit", 0 ); break; + case EMR_EXCLUDECLIPRECT : WinMtfAssertHandler( "ExcludeClipRect", 0 ); break; + case EMR_REALIZEPALETTE : WinMtfAssertHandler( "RealizePalette", 0 ); break; + case EMR_SELECTPALETTE : WinMtfAssertHandler( "SelectPalette", 0 ); break; + case EMR_CREATEPALETTE : WinMtfAssertHandler( "CreatePalette", 0 ); break; + case EMR_ALPHADIBBLEND : WinMtfAssertHandler( "AlphaDibBlend", 0 ); break; + case EMR_SETTEXTJUSTIFICATION : WinMtfAssertHandler( "SetTextJustification", 0 ); break; + + case EMR_GDICOMMENT : + case EMR_HEADER : // has already been read at ReadHeader() + break; +#endif + } + pWMF->Seek( nNextPos ); + } + if( aBmpSaveList.Count() ) + pOut->ResolveBitmapActions( aBmpSaveList ); + + if ( bStatus ) + pWMF->Seek(nEndPos); + + return bStatus; +}; + +//----------------------------------------------------------------------------------- + +BOOL EnhWMFReader::ReadHeader() +{ + UINT32 nUINT32, nHeaderSize, nPalEntries; + INT32 nLeft, nTop, nRight, nBottom; + + // METAFILEHEADER SPARE ICH MIR HIER + // Einlesen des METAHEADER + *pWMF >> nUINT32 >> nHeaderSize; + if ( nUINT32 != 1 ) // Typ + return FALSE; + + // bound size + Rectangle rclBounds; // rectangle in logical units 1/100th mm + *pWMF >> nLeft >> nTop >> nRight >> nBottom; + rclBounds.Left() = nLeft; + rclBounds.Top() = nTop; + rclBounds.Right() = nRight; + rclBounds.Bottom() = nBottom; + + // picture frame size + Rectangle rclFrame; // rectangle in device units + *pWMF >> nLeft >> nTop >> nRight >> nBottom; + rclFrame.Left() = nLeft; + rclFrame.Top() = nTop; + rclFrame.Right() = nRight; + rclFrame.Bottom() = nBottom; + + *pWMF >> nUINT32; // signature + + if ( nUINT32 != 0x464d4520 ) + return FALSE; + + *pWMF >> nUINT32; // nVersion + *pWMF >> nEndPos; // size of metafile + nEndPos += nStartPos; + + sal_uInt32 nStrmPos = pWMF->Tell(); // checking if nEndPos is valid + pWMF->Seek( STREAM_SEEK_TO_END ); + if ( pWMF->Tell() < nEndPos ) + nEndPos = pWMF->Tell(); + pWMF->Seek( nStrmPos ); + + *pWMF >> nRecordCount; + + if ( !nRecordCount ) + return FALSE; + + pWMF->SeekRel( 0xc ); + + sal_Int32 nPixX, nPixY, nMillX, nMillY; + *pWMF >> nPalEntries >> nPixX >> nPixY >> nMillX >> nMillY; + + pOut->SetrclFrame( rclFrame ); + pOut->SetrclBounds( rclBounds ); + pOut->SetRefPix( Size( nPixX, nPixY ) ); + pOut->SetRefMill( Size( nMillX, nMillY ) ); + + pWMF->Seek( nStartPos + nHeaderSize ); + return TRUE; +} + +//----------------------------------------------------------------------------------- + +Rectangle EnhWMFReader::ReadRectangle( INT32 x1, INT32 y1, INT32 x2, INT32 y2 ) +{ + Point aTL ( Point( x1, y1 ) ); + Point aBR( Point( --x2, --y2 ) ); + return Rectangle( aTL, aBR ); +} + +EnhWMFReader::~EnhWMFReader() +{ + +}; + diff --git a/svtools/source/filter/wmf/winmtf.cxx b/svtools/source/filter/wmf/winmtf.cxx new file mode 100644 index 000000000000..787e6522b890 --- /dev/null +++ b/svtools/source/filter/wmf/winmtf.cxx @@ -0,0 +1,2203 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + + +#include "winmtf.hxx" +#include +#include +#include + +// ------------------------------------------------------------------------ + +#define WIN_MTF_MAX_CLIP_DEPTH 16 + +void WinMtfClipPath::ImpUpdateType() +{ + if ( !aPolyPoly.Count() ) + eType = EMPTY; + else if ( aPolyPoly.IsRect() ) + eType = RECTANGLE; + else + eType = COMPLEX; + + bNeedsUpdate = sal_True; +} + +void WinMtfClipPath::IntersectClipRect( const Rectangle& rRect ) +{ + if ( !aPolyPoly.Count() ) + aPolyPoly = Polygon( rRect ); + else if ( nDepth < WIN_MTF_MAX_CLIP_DEPTH ) + { + Polygon aPolygon( rRect ); + PolyPolygon aIntersection; + PolyPolygon aPolyPolyRect( aPolygon ); + aPolyPoly.GetIntersection( aPolyPolyRect, aIntersection ); + aPolyPoly = aIntersection; + nDepth++; + } + ImpUpdateType(); +} + +void WinMtfClipPath::ExcludeClipRect( const Rectangle& rRect ) +{ + if ( aPolyPoly.Count() && ( nDepth < WIN_MTF_MAX_CLIP_DEPTH ) ) + { + Polygon aPolygon( rRect ); + PolyPolygon aPolyPolyRect( aPolygon ); + PolyPolygon aDifference; + aPolyPoly.GetDifference( aPolyPolyRect, aDifference ); + aPolyPoly = aDifference; + nDepth++; + } + ImpUpdateType(); +} + +void WinMtfClipPath::SetClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode ) +{ + if ( !rPolyPolygon.Count() ) + aPolyPoly = rPolyPolygon; + else if ( nDepth < WIN_MTF_MAX_CLIP_DEPTH ) + { + nDepth++; + + PolyPolygon aNewClipPath; + + // #115345# Watch out for empty aPolyPoly here - conceptually, + // an empty clip path is a rectangle of infinite size, but it + // is represented by an empty aPolyPoly. When intersecting + // rPolyPolygon with this _empty_ aPolyPoly, set algebra + // guarantees wrong results. + switch ( nClippingMode ) + { + case RGN_OR : + // #115345# clip stays empty, when ORing an arbitrary + // rPolyPolygon. Thus, we can save us the unnecessary + // clipper call. + if( aPolyPoly.Count() ) + aPolyPoly.GetUnion( rPolyPolygon, aNewClipPath ); + break; + case RGN_XOR : + // TODO: + // #115345# Cannot handle this case, for the time being + aPolyPoly.GetXOR( rPolyPolygon, aNewClipPath ); + break; + case RGN_DIFF : + // TODO: + // #115345# Cannot handle this case, for the time being + aPolyPoly.GetDifference( rPolyPolygon, aNewClipPath ); + break; + case RGN_AND : + // #115345# Clip becomes rPolyPolygon, when ANDing + // with an arbitrary rPolyPolygon + if( aPolyPoly.Count() ) + aPolyPoly.GetIntersection( rPolyPolygon, aNewClipPath ); + else + aNewClipPath = rPolyPolygon; + break; + case RGN_COPY : + aNewClipPath = rPolyPolygon; + break; + } + aPolyPoly = aNewClipPath; + } + ImpUpdateType(); +} + +void WinMtfClipPath::MoveClipRegion( const Size& rSize ) +{ + aPolyPoly.Move( rSize.Width(), rSize.Height() ); + bNeedsUpdate = sal_True; +} + +// ------------------------------------------------------------------------ + +void WinMtfPathObj::AddPoint( const Point& rPoint ) +{ + if ( bClosed ) + Insert( Polygon(), POLYPOLY_APPEND ); + Polygon& rPoly = ((PolyPolygon&)*this)[ Count() - 1 ]; + rPoly.Insert( rPoly.GetSize(), rPoint, POLY_NORMAL ); + bClosed = sal_False; +} + +void WinMtfPathObj::AddPolyLine( const Polygon& rPolyLine ) +{ + if ( bClosed ) + Insert( Polygon(), POLYPOLY_APPEND ); + Polygon& rPoly = ((PolyPolygon&)*this)[ Count() - 1 ]; + rPoly.Insert( rPoly.GetSize(), rPolyLine ); + bClosed = sal_False; +} + +void WinMtfPathObj::AddPolygon( const Polygon& rPoly ) +{ + Insert( rPoly, POLYPOLY_APPEND ); + bClosed = sal_True; +} + +void WinMtfPathObj::AddPolyPolygon( const PolyPolygon& rPolyPoly ) +{ + sal_uInt16 i, nCount = rPolyPoly.Count(); + for ( i = 0; i < nCount; i++ ) + Insert( rPolyPoly[ i ], POLYPOLY_APPEND ); + bClosed = sal_True; +} + +void WinMtfPathObj::ClosePath() +{ + if ( Count() ) + { + Polygon& rPoly = ((PolyPolygon&)*this)[ Count() - 1 ]; + if ( rPoly.GetSize() > 2 ) + { + Point aFirst( rPoly[ 0 ] ); + if ( aFirst != rPoly[ rPoly.GetSize() - 1 ] ) + rPoly.Insert( rPoly.GetSize(), aFirst, POLY_NORMAL ); + } + } + bClosed = sal_True; +} + +// ------------------------------------------------------------------------ + +WinMtfFontStyle::WinMtfFontStyle( LOGFONTW& rFont ) +{ + CharSet eCharSet; + if ( ( rFont.lfCharSet == OEM_CHARSET ) || ( rFont.lfCharSet == DEFAULT_CHARSET ) ) + eCharSet = gsl_getSystemTextEncoding(); + else + eCharSet = rtl_getTextEncodingFromWindowsCharset( rFont.lfCharSet ); + if ( eCharSet == RTL_TEXTENCODING_DONTKNOW ) + eCharSet = gsl_getSystemTextEncoding(); + aFont.SetCharSet( eCharSet ); + aFont.SetName( rFont.alfFaceName ); + FontFamily eFamily; + switch ( rFont.lfPitchAndFamily & 0xf0 ) + { + case FF_ROMAN: + eFamily = FAMILY_ROMAN; + break; + + case FF_SWISS: + eFamily = FAMILY_SWISS; + break; + + case FF_MODERN: + eFamily = FAMILY_MODERN; + break; + + case FF_SCRIPT: + eFamily = FAMILY_SCRIPT; + break; + + case FF_DECORATIVE: + eFamily = FAMILY_DECORATIVE; + break; + + default: + eFamily = FAMILY_DONTKNOW; + break; + } + aFont.SetFamily( eFamily ); + + FontPitch ePitch; + switch ( rFont.lfPitchAndFamily & 0x0f ) + { + case FIXED_PITCH: + ePitch = PITCH_FIXED; + break; + + case DEFAULT_PITCH: + case VARIABLE_PITCH: + default: + ePitch = PITCH_VARIABLE; + break; + } + aFont.SetPitch( ePitch ); + + FontWeight eWeight; + if( rFont.lfWeight <= FW_THIN ) + eWeight = WEIGHT_THIN; + else if( rFont.lfWeight <= FW_ULTRALIGHT ) + eWeight = WEIGHT_ULTRALIGHT; + else if( rFont.lfWeight <= FW_LIGHT ) + eWeight = WEIGHT_LIGHT; + else if( rFont.lfWeight < FW_MEDIUM ) + eWeight = WEIGHT_NORMAL; + else if( rFont.lfWeight == FW_MEDIUM ) + eWeight = WEIGHT_MEDIUM; + else if( rFont.lfWeight <= FW_SEMIBOLD ) + eWeight = WEIGHT_SEMIBOLD; + else if( rFont.lfWeight <= FW_BOLD ) + eWeight = WEIGHT_BOLD; + else if( rFont.lfWeight <= FW_ULTRABOLD ) + eWeight = WEIGHT_ULTRABOLD; + else + eWeight = WEIGHT_BLACK; + aFont.SetWeight( eWeight ); + + if( rFont.lfItalic ) + aFont.SetItalic( ITALIC_NORMAL ); + + if( rFont.lfUnderline ) + aFont.SetUnderline( UNDERLINE_SINGLE ); + + if( rFont.lfStrikeOut ) + aFont.SetStrikeout( STRIKEOUT_SINGLE ); + + if ( rFont.lfOrientation ) + aFont.SetOrientation( (short)rFont.lfOrientation ); + else + aFont.SetOrientation( (short)rFont.lfEscapement ); + + Size aFontSize( Size( rFont.lfWidth, rFont.lfHeight ) ); + if ( rFont.lfHeight > 0 ) + { + // converting the cell height into a font height + VirtualDevice aVDev; + aFont.SetSize( aFontSize ); + aVDev.SetFont( aFont ); + FontMetric aMetric( aVDev.GetFontMetric() ); + long nHeight = aMetric.GetAscent() + aMetric.GetDescent(); + if ( nHeight ) + { + double fHeight = ((double)aFontSize.Height() * rFont.lfHeight ) / nHeight; + aFontSize.Height() = (sal_Int32)( fHeight + 0.5 ); + } + } + else if ( aFontSize.Height() < 0 ) + aFontSize.Height() *= -1; + + if ( !rFont.lfWidth ) + { + VirtualDevice aVDev; + aFont.SetSize( aFontSize ); + aVDev.SetFont( aFont ); + FontMetric aMetric( aVDev.GetFontMetric() ); + aFontSize.Width() = aMetric.GetWidth(); + } + + aFont.SetSize( aFontSize ); +}; + +// ------------------------------------------------------------------------ + +#ifdef WIN_MTF_ASSERT +void WinMtfAssertHandler( const sal_Char* pAction, sal_uInt32 nFlags ) +{ + static sal_Bool bOnlyOnce; + static sal_Int32 nAssertCount; + + if ( nFlags & WIN_MTF_ASSERT_INIT ) + nAssertCount = 0; + if ( nFlags & WIN_MTF_ASSERT_ONCE ) + bOnlyOnce = sal_True; + if ( nFlags & WIN_MTF_ASSERT_MIFE ) + { + if ( ( nAssertCount == 0 ) || ( bOnlyOnce == sal_False ) ) + { + ByteString aText( "WMF/EMF Import: " ); + if ( pAction ) + { + ByteString aAction( pAction ); + aText.Append( aAction ); + } + aText.Append( " needs to be implemented (SJ)" ); + DBG_ASSERT( 0, aText.GetBuffer() ); + } + nAssertCount++; + } +} +#endif + +// ------------------------------------------------------------------------ + +WinMtf::WinMtf( WinMtfOutput* pWinMtfOutput, SvStream& rStreamWMF, FilterConfigItem* pConfigItem ) : + pOut ( pWinMtfOutput ), + pWMF ( &rStreamWMF ), + pFilterConfigItem ( pConfigItem ) +{ +#ifdef WIN_MTF_ASSERT + // we want to assert not implemented features, but we do this + // only once, so that nobody is handicaped by getting too much assertions + // I hope this will bring more testdocuments, without support of these + // testdocuments the implementation of missing features won't be possible. (SJ) + WinMtfAssertHandler( NULL, WIN_MTF_ASSERT_INIT | WIN_MTF_ASSERT_ONCE ); +#endif + + SvLockBytes *pLB = pWMF->GetLockBytes(); + if ( pLB ) + pLB->SetSynchronMode( TRUE ); + + nStartPos = pWMF->Tell(); + + pOut->SetDevOrg( Point() ); + if ( pFilterConfigItem ) + { + xStatusIndicator = pFilterConfigItem->GetStatusIndicator(); + if ( xStatusIndicator.is() ) + { + rtl::OUString aMsg; + xStatusIndicator->start( aMsg, 100 ); + } + } +} + +// ------------------------------------------------------------------------ + +WinMtf::~WinMtf() +{ + delete pOut; + + if ( xStatusIndicator.is() ) + xStatusIndicator->end(); +} + +// ------------------------------------------------------------------------ + +void WinMtf::Callback( USHORT nPercent ) +{ + if ( xStatusIndicator.is() ) + xStatusIndicator->setValue( nPercent ); +} + +// ------------------------------------------------------------------------ + +Color WinMtf::ReadColor() +{ + UINT32 nColor; + *pWMF >> nColor; + return Color( (BYTE)nColor, (BYTE)( nColor >> 8 ), (BYTE)( nColor >> 16 ) ); +}; + +//----------------------------------------------------------------------------------- +//----------------------------------------------------------------------------------- +//----------------------------------------------------------------------------------- + +Point WinMtfOutput::ImplMap( const Point& rPt ) +{ + if ( mnWinExtX && mnWinExtY ) + { + double fX2, fX = rPt.X(); + double fY2, fY = rPt.Y(); + + fX2 = fX * maXForm.eM11 + fY * maXForm.eM21 + maXForm.eDx; + fY2 = fX * maXForm.eM12 + fY * maXForm.eM22 + maXForm.eDy; + + if ( mnGfxMode == GM_COMPATIBLE ) + { + switch( mnMapMode ) + { + case MM_LOENGLISH : + { + fX2 -= mnWinOrgX; + fY2 = mnWinOrgY-fY2; + fX2 *= 25.40; + fY2 *= 25.40; + fX2 += mnDevOrgX; + fY2 += mnDevOrgY; + } + break; + case MM_HIENGLISH : + { + fX2 -= mnWinOrgX; + fY2 = mnWinOrgY-fY2; + fX2 *= 2.540; + fY2 *= 2.540; + fX2 += mnDevOrgX; + fY2 += mnDevOrgY; + } + break; + case MM_LOMETRIC : + { + fX2 -= mnWinOrgX; + fY2 = mnWinOrgY-fY2; + fX2 *= 10; + fY2 *= 10; + fX2 += mnDevOrgX; + fY2 += mnDevOrgY; + } + break; + case MM_HIMETRIC : + { + fX2 -= mnWinOrgX; + fY2 = mnWinOrgY-fY2; + fX2 += mnDevOrgX; + fY2 += mnDevOrgY; + } + break; + default : + { + fX2 -= mnWinOrgX; + fY2 -= mnWinOrgY; + fX2 /= mnWinExtX; + fY2 /= mnWinExtY; + fX2 *= mnDevWidth; + fY2 *= mnDevHeight; + fX2 += mnDevOrgX; + fY2 += mnDevOrgY; // fX2, fY2 now in device units + fX2 *= (double)mnMillX * 100.0 / (double)mnPixX; + fY2 *= (double)mnMillY * 100.0 / (double)mnPixY; + } + break; + } + fX2 -= mrclFrame.Left(); + fY2 -= mrclFrame.Top(); + } + return Point( FRound( fX2 ), FRound( fY2 ) ); + } + else + return Point(); +}; + +// ------------------------------------------------------------------------ + +Size WinMtfOutput::ImplMap( const Size& rSz ) +{ + if ( mnWinExtX && mnWinExtY ) + { + double fWidth = rSz.Width() * maXForm.eM11; + double fHeight = rSz.Height() * maXForm.eM22; + + if ( mnGfxMode == GM_COMPATIBLE ) + { + switch( mnMapMode ) + { + case MM_LOENGLISH : + { + fWidth *= 25.40; + fHeight*=-25.40; + } + break; + case MM_HIENGLISH : + { + fWidth *= 2.540; + fHeight*=-2.540; + } + break; + case MM_LOMETRIC : + { + fWidth *= 10; + fHeight*=-10; + } + break; + case MM_HIMETRIC : + { + fHeight *= -1; + } + break; + default : + { + fWidth /= mnWinExtX; + fHeight /= mnWinExtY; + fWidth *= mnDevWidth; + fHeight *= mnDevHeight; + fWidth *= (double)mnMillX * 100 / (double)mnPixX; + fHeight *= (double)mnMillY * 100 / (double)mnPixY; + } + break; + } + } + return Size( FRound( fWidth ), FRound( fHeight ) ); + } + else + return Size(); +} + +//----------------------------------------------------------------------------------- + +Rectangle WinMtfOutput::ImplMap( const Rectangle& rRect ) +{ + return Rectangle( ImplMap( rRect.TopLeft() ), ImplMap( rRect.GetSize() ) ); +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::ImplMap( Font& rFont ) +{ + // !!! HACK: Wir setzen die Breite jetzt immer auf Null, + // da OS die Breite unterschiedlich interpretieren; + // muss spaeter in SV portabel gemacht werden ( KA 08.02.96 ) + Size aFontSize = ImplMap ( rFont.GetSize() ); + + if( aFontSize.Height() < 0 ) + aFontSize.Height() *= -1; + + rFont.SetSize( aFontSize ); + + if( ( mnWinExtX * mnWinExtY ) < 0 ) + rFont.SetOrientation( 3600 - rFont.GetOrientation() ); +} + +//----------------------------------------------------------------------------------- + +Polygon& WinMtfOutput::ImplMap( Polygon& rPolygon ) +{ + UINT16 nPoints = rPolygon.GetSize(); + for ( UINT16 i = 0; i < nPoints; i++ ) + { + rPolygon[ i ] = ImplMap( rPolygon[ i ] ); + } + return rPolygon; +} + +//----------------------------------------------------------------------------------- + +PolyPolygon& WinMtfOutput::ImplMap( PolyPolygon& rPolyPolygon ) +{ + UINT16 nPolys = rPolyPolygon.Count(); + for ( UINT16 i = 0; i < nPolys; ImplMap( rPolyPolygon[ i++ ] ) ) ; + return rPolyPolygon; +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::SelectObject( INT32 nIndex ) +{ + GDIObj* pGDIObj = NULL; + + if ( nIndex & ENHMETA_STOCK_OBJECT ) + pGDIObj = new GDIObj(); + else + { + nIndex &= 0xffff; // zur Sicherheit: mehr als 65535 nicht zulassen + + if ( (UINT32)nIndex < vGDIObj.size() ) + pGDIObj = vGDIObj[ nIndex ]; + } + + if( pGDIObj == NULL ) + return; + + if ( nIndex & ENHMETA_STOCK_OBJECT ) + { + UINT16 nStockId = (BYTE)nIndex; + switch( nStockId ) + { + case WHITE_BRUSH : + { + pGDIObj->Set( GDI_BRUSH, new WinMtfFillStyle( Color( COL_WHITE ) ) ); + } + break; + case LTGRAY_BRUSH : + { + pGDIObj->Set( GDI_BRUSH, new WinMtfFillStyle( Color( COL_LIGHTGRAY ) ) ); + } + break; + case GRAY_BRUSH : + case DKGRAY_BRUSH : + { + pGDIObj->Set( GDI_BRUSH, new WinMtfFillStyle( Color( COL_GRAY ) ) ); + } + break; + case BLACK_BRUSH : + { + pGDIObj->Set( GDI_BRUSH, new WinMtfFillStyle( Color( COL_BLACK ) ) ); + } + break; + case NULL_BRUSH : + { + pGDIObj->Set( GDI_BRUSH, new WinMtfFillStyle( Color( COL_TRANSPARENT ), TRUE ) ); + } + break; + case WHITE_PEN : + { + pGDIObj->Set( GDI_PEN, new WinMtfLineStyle( Color( COL_WHITE ) ) ); + } + break; + case BLACK_PEN : + { + pGDIObj->Set( GDI_PEN, new WinMtfLineStyle( Color( COL_BLACK ) ) ); + } + break; + case NULL_PEN : + { + pGDIObj->Set( GDI_PEN, new WinMtfLineStyle( Color( COL_TRANSPARENT ), TRUE ) ); + } + break; + default: + break; + } + } + if ( pGDIObj->pStyle ) + { + switch( pGDIObj->eType ) + { + case GDI_PEN : + maLineStyle = (WinMtfLineStyle*)pGDIObj->pStyle; + break; + case GDI_BRUSH : + { + maFillStyle = (WinMtfFillStyle*)pGDIObj->pStyle; + mbFillStyleSelected = sal_True; + } + break; + case GDI_FONT : + maFont = ((WinMtfFontStyle*)pGDIObj->pStyle)->aFont; + break; + default: + break; // -Wall many options not handled. + } + } + if ( nIndex & ENHMETA_STOCK_OBJECT ) + delete pGDIObj; +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::SetFont( const Font& rFont ) +{ + maFont = rFont; +} + +//----------------------------------------------------------------------------------- + +const Font& WinMtfOutput::GetFont() const +{ + return maFont; +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::SetTextLayoutMode( const sal_uInt32 nTextLayoutMode ) +{ + mnTextLayoutMode = nTextLayoutMode; +} + +//----------------------------------------------------------------------------------- + +sal_uInt32 WinMtfOutput::GetTextLayoutMode() const +{ + return mnTextLayoutMode; +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::SetBkMode( UINT32 nMode ) +{ + mnBkMode = nMode; +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::SetBkColor( const Color& rColor ) +{ + maBkColor = rColor; +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::SetTextColor( const Color& rColor ) +{ + maTextColor = rColor; +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::SetTextAlign( UINT32 nAlign ) +{ + mnTextAlign = nAlign; +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::ImplResizeObjectArry( UINT32 nNewEntrys ) +{ + sal_uInt32 i = vGDIObj.size(); + vGDIObj.resize( nNewEntrys ); + for ( ; i < nNewEntrys ; i++ ) + vGDIObj[ i ] = NULL; +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::ImplDrawClippedPolyPolygon( const PolyPolygon& rPolyPoly ) +{ + if ( rPolyPoly.Count() ) + { + ImplSetNonPersistentLineColorTransparenz(); + if ( rPolyPoly.Count() == 1 ) + { + if ( rPolyPoly.IsRect() ) + mpGDIMetaFile->AddAction( new MetaRectAction( rPolyPoly.GetBoundRect() ) ); + else + { + Polygon aPoly( rPolyPoly[ 0 ] ); + sal_uInt16 nCount = aPoly.GetSize(); + if ( nCount ) + { + if ( aPoly[ nCount - 1 ] != aPoly[ 0 ] ) + { + Point aPoint( aPoly[ 0 ] ); + aPoly.Insert( nCount, aPoint ); + } + mpGDIMetaFile->AddAction( new MetaPolygonAction( aPoly ) ); + } + } + } + else + mpGDIMetaFile->AddAction( new MetaPolyPolygonAction( rPolyPoly ) ); + } +} + + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::CreateObject( GDIObjectType eType, void* pStyle ) +{ + if ( pStyle ) + { + if ( eType == GDI_FONT ) + { + ImplMap( ((WinMtfFontStyle*)pStyle)->aFont ); + if (!((WinMtfFontStyle*)pStyle)->aFont.GetHeight() ) + ((WinMtfFontStyle*)pStyle)->aFont.SetHeight( 423 ); // defaulting to 12pt + } + else if ( eType == GDI_PEN ) + { + Size aSize( ((WinMtfLineStyle*)pStyle)->aLineInfo.GetWidth(), 0 ); + ((WinMtfLineStyle*)pStyle)->aLineInfo.SetWidth( ImplMap( aSize ).Width() ); + if ( ((WinMtfLineStyle*)pStyle)->aLineInfo.GetStyle() == LINE_DASH ) + { + aSize.Width() += 1; + long nDotLen = ImplMap( aSize ).Width(); + ((WinMtfLineStyle*)pStyle)->aLineInfo.SetDistance( nDotLen ); + ((WinMtfLineStyle*)pStyle)->aLineInfo.SetDotLen( nDotLen ); + ((WinMtfLineStyle*)pStyle)->aLineInfo.SetDashLen( nDotLen * 4 ); + } + } + } + UINT32 nIndex; + for ( nIndex = 0; nIndex < vGDIObj.size(); nIndex++ ) + { + if ( vGDIObj[ nIndex ] == NULL ) + break; + } + if ( nIndex == vGDIObj.size() ) + ImplResizeObjectArry( vGDIObj.size() + 16 ); + + vGDIObj[ nIndex ] = new GDIObj( eType, pStyle ); +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::CreateObject( INT32 nIndex, GDIObjectType eType, void* pStyle ) +{ + if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) + { + nIndex &= 0xffff; // zur Sicherheit: mehr als 65535 nicht zulassen + if ( pStyle ) + { + if ( eType == GDI_FONT ) + ImplMap( ((WinMtfFontStyle*)pStyle)->aFont ); + else if ( eType == GDI_PEN ) + { + Size aSize( ((WinMtfLineStyle*)pStyle)->aLineInfo.GetWidth(), 0 ); + ((WinMtfLineStyle*)pStyle)->aLineInfo.SetWidth( ImplMap( aSize ).Width() ); + if ( ((WinMtfLineStyle*)pStyle)->aLineInfo.GetStyle() == LINE_DASH ) + { + aSize.Width() += 1; + long nDotLen = ImplMap( aSize ).Width(); + ((WinMtfLineStyle*)pStyle)->aLineInfo.SetDistance( nDotLen ); + ((WinMtfLineStyle*)pStyle)->aLineInfo.SetDotLen( nDotLen ); + ((WinMtfLineStyle*)pStyle)->aLineInfo.SetDashLen( nDotLen * 4 ); + } + } + } + if ( (UINT32)nIndex >= vGDIObj.size() ) + ImplResizeObjectArry( nIndex + 16 ); + + if ( vGDIObj[ nIndex ] != NULL ) + delete vGDIObj[ nIndex ]; + + vGDIObj[ nIndex ] = new GDIObj( eType, pStyle ); + } + else + { + switch ( eType ) + { + case GDI_PEN : + delete (WinMtfLineStyle*)pStyle; + break; + case GDI_BRUSH : + delete (WinMtfFillStyle*)pStyle; + break; + case GDI_FONT : + delete (WinMtfFontStyle*)pStyle; + break; + + default: + DBG_ERROR( "unsupported style not deleted" ); + break; + } + } +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::DeleteObject( sal_Int32 nIndex ) +{ + if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) + { + if ( (sal_uInt32)nIndex < vGDIObj.size() ) + { + delete vGDIObj[ nIndex ]; + vGDIObj[ nIndex ] = NULL; + } + } +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::IntersectClipRect( const Rectangle& rRect ) +{ + aClipPath.IntersectClipRect( ImplMap( rRect ) ); +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::ExcludeClipRect( const Rectangle& rRect ) +{ + aClipPath.ExcludeClipRect( ImplMap( rRect ) ); +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::MoveClipRegion( const Size& rSize ) +{ + aClipPath.MoveClipRegion( ImplMap( rSize ) ); +} + +void WinMtfOutput::SetClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode, sal_Bool bIsMapped ) +{ + if ( bIsMapped ) + aClipPath.SetClipPath( rPolyPolygon, nClippingMode ); + else + { + PolyPolygon aPP( rPolyPolygon ); + aClipPath.SetClipPath( ImplMap( aPP ), nClippingMode ); + } +} + +//----------------------------------------------------------------------------------- +//----------------------------------------------------------------------------------- +//----------------------------------------------------------------------------------- + +WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) : + mnLatestTextAlign ( 0 ), + mnTextAlign ( TA_LEFT | TA_TOP | TA_NOUPDATECP ), + maLatestBkColor ( 0x12345678 ), + maBkColor ( COL_WHITE ), + mnLatestTextLayoutMode( TEXT_LAYOUT_DEFAULT ), + mnTextLayoutMode ( TEXT_LAYOUT_DEFAULT ), + mnLatestBkMode ( 0 ), + mnBkMode ( OPAQUE ), + meLatestRasterOp ( ROP_INVERT ), + meRasterOp ( ROP_OVERPAINT ), + maActPos ( Point() ), + mbNopMode ( sal_False ), + mbFillStyleSelected ( sal_False ), + mnGfxMode ( GM_COMPATIBLE ), + mnMapMode ( MM_TEXT ), + mnDevOrgX ( 0 ), + mnDevOrgY ( 0 ), + mnDevWidth ( 1 ), + mnDevHeight ( 1 ), + mnWinOrgX ( 0 ), + mnWinOrgY ( 0 ), + mnWinExtX ( 1 ), + mnWinExtY ( 1 ), + mnPixX ( 100 ), + mnPixY ( 100 ), + mnMillX ( 1 ), + mnMillY ( 1 ), + mpGDIMetaFile ( &rGDIMetaFile ) +{ + mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_CLIPREGION ) ); // The original clipregion has to be on top + // of the stack so it can always be restored + // this is necessary to be able to support + // SetClipRgn( NULL ) and similar ClipRgn actions (SJ) + + maFont.SetName( String( RTL_CONSTASCII_USTRINGPARAM( "Arial" )) ); // sj: #i57205#, we do have some scaling problems if using + maFont.SetCharSet( gsl_getSystemTextEncoding() ); // the default font then most times a x11 font is used, we + maFont.SetHeight( 423 ); // will prevent this defining a font + + maLatestLineStyle.aLineColor = Color( 0x12, 0x34, 0x56 ); + maLatestFillStyle.aFillColor = Color( 0x12, 0x34, 0x56 ); + + mnRop = R2_BLACK + 1; + SetRasterOp( R2_BLACK ); +}; + +//----------------------------------------------------------------------------------- + +WinMtfOutput::~WinMtfOutput() +{ + mpGDIMetaFile->AddAction( new MetaPopAction() ); + mpGDIMetaFile->SetPrefMapMode( MAP_100TH_MM ); + if ( mrclFrame.IsEmpty() ) + mpGDIMetaFile->SetPrefSize( Size( mnDevWidth, mnDevHeight ) ); + else + mpGDIMetaFile->SetPrefSize( mrclFrame.GetSize() ); + + for ( UINT32 i = 0; i < vGDIObj.size(); i++ ) + delete vGDIObj[ i ]; +}; + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::UpdateClipRegion() +{ + if ( aClipPath.bNeedsUpdate ) + { + aClipPath.bNeedsUpdate = sal_False; + + mpGDIMetaFile->AddAction( new MetaPopAction() ); // taking the orignal clipregion + mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_CLIPREGION ) ); // + + switch ( aClipPath.GetType() ) + { + case RECTANGLE : + case COMPLEX : + { +// we will not generate a RegionClipRegion Action, because this action +// cannot be saved to the wmf format - saving to wmf always happens +// if the placeholder graphic for ole objects is generated. (SJ) + +// Region aClipRegion( aClipPath.GetClipPath() ); +// mpGDIMetaFile->AddAction( new MetaISectRegionClipRegionAction( aClipRegion ) ); + + Rectangle aClipRect( aClipPath.GetClipPath().GetBoundRect() ); + mpGDIMetaFile->AddAction( new MetaISectRectClipRegionAction( aClipRect ) ); + } + break; + case EMPTY: + break; // -Wall not handled. + } + } +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::ImplSetNonPersistentLineColorTransparenz() +{ + Color aColor( COL_TRANSPARENT); + WinMtfLineStyle aTransparentLine( aColor, TRUE ); + if ( ! ( maLatestLineStyle == aTransparentLine ) ) + { + maLatestLineStyle = aTransparentLine; + mpGDIMetaFile->AddAction( new MetaLineColorAction( aTransparentLine.aLineColor, !aTransparentLine.bTransparent ) ); + } +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::UpdateLineStyle() +{ + if (!( maLatestLineStyle == maLineStyle ) ) + { + maLatestLineStyle = maLineStyle; + mpGDIMetaFile->AddAction( new MetaLineColorAction( maLineStyle.aLineColor, !maLineStyle.bTransparent ) ); + } +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::UpdateFillStyle() +{ + if ( !mbFillStyleSelected ) // SJ: #i57205# taking care of bkcolor if no brush is selected + maFillStyle = WinMtfFillStyle( maBkColor, mnBkMode == TRANSPARENT ); + if (!( maLatestFillStyle == maFillStyle ) ) + { + maLatestFillStyle = maFillStyle; + mpGDIMetaFile->AddAction( new MetaFillColorAction( maFillStyle.aFillColor, !maFillStyle.bTransparent ) ); + } +} + +//----------------------------------------------------------------------------------- + +sal_uInt32 WinMtfOutput::SetRasterOp( UINT32 nRasterOp ) +{ + sal_uInt32 nRetROP = mnRop; + if ( nRasterOp != mnRop ) + { + mnRop = nRasterOp; + static WinMtfFillStyle aNopFillStyle; + static WinMtfLineStyle aNopLineStyle; + + if ( mbNopMode && ( nRasterOp != R2_NOP ) ) + { // beim uebergang von R2_NOP auf anderen Modus + // gesetzten Pen und Brush aktivieren + maFillStyle = aNopFillStyle; + maLineStyle = aNopLineStyle; + mbNopMode = sal_False; + } + switch( nRasterOp ) + { + case R2_NOT: + meRasterOp = ROP_INVERT; + break; + + case R2_XORPEN: + meRasterOp = ROP_XOR; + break; + + case R2_NOP: + { + meRasterOp = ROP_OVERPAINT; + if( mbNopMode == sal_False ) + { + aNopFillStyle = maFillStyle; + aNopLineStyle = maLineStyle; + maFillStyle = WinMtfFillStyle( Color( COL_TRANSPARENT ), TRUE ); + maLineStyle = WinMtfLineStyle( Color( COL_TRANSPARENT ), TRUE ); + mbNopMode = sal_True; + } + } + break; + + default: + meRasterOp = ROP_OVERPAINT; + break; + } + } + if ( nRetROP != nRasterOp ) + mpGDIMetaFile->AddAction( new MetaRasterOpAction( meRasterOp ) ); + return nRetROP; +}; + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill ) +{ + if ( aPathObj.Count() ) + { + UpdateClipRegion(); + UpdateLineStyle(); + UpdateFillStyle(); + if ( bFill ) + { + if ( !bStroke ) + { + mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_LINECOLOR ) ); + mpGDIMetaFile->AddAction( new MetaLineColorAction( Color(), FALSE ) ); + } + if ( aPathObj.Count() == 1 ) + mpGDIMetaFile->AddAction( new MetaPolygonAction( aPathObj.GetObject( 0 ) ) ); + else + mpGDIMetaFile->AddAction( new MetaPolyPolygonAction( aPathObj ) ); + + if ( !bStroke ) + mpGDIMetaFile->AddAction( new MetaPopAction() ); + } + else + { + sal_uInt16 i, nCount = aPathObj.Count(); + for ( i = 0; i < nCount; i++ ) + mpGDIMetaFile->AddAction( new MetaPolyLineAction( aPathObj[ i ], maLineStyle.aLineInfo ) ); + } + ClearPath(); + } +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::DrawPixel( const Point& rSource, const Color& rColor ) +{ + mpGDIMetaFile->AddAction( new MetaPixelAction( ImplMap( rSource), rColor ) ); +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::MoveTo( const Point& rPoint, sal_Bool bRecordPath ) +{ + Point aDest( ImplMap( rPoint ) ); + if ( bRecordPath ) + aPathObj.AddPoint( aDest ); + maActPos = aDest; +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::LineTo( const Point& rPoint, sal_Bool bRecordPath ) +{ + UpdateClipRegion(); + + Point aDest( ImplMap( rPoint ) ); + if ( bRecordPath ) + aPathObj.AddPoint( aDest ); + else + { + UpdateLineStyle(); + mpGDIMetaFile->AddAction( new MetaLineAction( maActPos, aDest, maLineStyle.aLineInfo ) ); + } + maActPos = aDest; +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::DrawLine( const Point& rSource, const Point& rDest ) +{ + UpdateClipRegion(); + UpdateLineStyle(); + mpGDIMetaFile->AddAction( new MetaLineAction( ImplMap( rSource), ImplMap( rDest ), maLineStyle.aLineInfo ) ); +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::DrawRect( const Rectangle& rRect, BOOL bEdge ) +{ + UpdateClipRegion(); + UpdateFillStyle(); + + if ( aClipPath.GetType() == COMPLEX ) + { + Polygon aPoly( ImplMap( rRect ) ); + PolyPolygon aPolyPolyRect( aPoly ); + PolyPolygon aDest; + aClipPath.GetClipPath().GetIntersection( aPolyPolyRect, aDest ); + ImplDrawClippedPolyPolygon( aDest ); + } + else + { + if ( bEdge ) + { + if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) + { + ImplSetNonPersistentLineColorTransparenz(); + mpGDIMetaFile->AddAction( new MetaRectAction( ImplMap( rRect ) ) ); + UpdateLineStyle(); + mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( ImplMap( rRect ) ),maLineStyle.aLineInfo ) ); + } + else + { + UpdateLineStyle(); + mpGDIMetaFile->AddAction( new MetaRectAction( ImplMap( rRect ) ) ); + } + } + else + { + ImplSetNonPersistentLineColorTransparenz(); + mpGDIMetaFile->AddAction( new MetaRectAction( ImplMap( rRect ) ) ); + } + } +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::DrawRoundRect( const Rectangle& rRect, const Size& rSize ) +{ + UpdateClipRegion(); + UpdateLineStyle(); + UpdateFillStyle(); + mpGDIMetaFile->AddAction( new MetaRoundRectAction( ImplMap( rRect ), labs( ImplMap( rSize ).Width() ), labs( ImplMap( rSize ).Height() ) ) ); +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::DrawEllipse( const Rectangle& rRect ) +{ + UpdateClipRegion(); + UpdateFillStyle(); + + if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) + { + Point aCenter( ImplMap( rRect.Center() ) ); + Size aRad( ImplMap( Size( rRect.GetWidth() / 2, rRect.GetHeight() / 2 ) ) ); + + ImplSetNonPersistentLineColorTransparenz(); + mpGDIMetaFile->AddAction( new MetaEllipseAction( ImplMap( rRect ) ) ); + UpdateLineStyle(); + mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aCenter, aRad.Width(), aRad.Height() ), maLineStyle.aLineInfo ) ); + } + else + { + UpdateLineStyle(); + mpGDIMetaFile->AddAction( new MetaEllipseAction( ImplMap( rRect ) ) ); + } +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, BOOL bTo ) +{ + UpdateClipRegion(); + UpdateLineStyle(); + UpdateFillStyle(); + + Rectangle aRect( ImplMap( rRect ) ); + Point aStart( ImplMap( rStart ) ); + Point aEnd( ImplMap( rEnd ) ); + + if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) + { + if ( aStart == aEnd ) + { // SJ: #i53768# if start & end is identical, then we have to draw a full ellipse + Point aCenter( aRect.Center() ); + Size aRad( aRect.GetWidth() / 2, aRect.GetHeight() / 2 ); + + mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aCenter, aRad.Width(), aRad.Height() ), maLineStyle.aLineInfo ) ); + } + else + mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aRect, aStart, aEnd, POLY_ARC ), maLineStyle.aLineInfo ) ); + } + else + mpGDIMetaFile->AddAction( new MetaArcAction( aRect, aStart, aEnd ) ); + + if ( bTo ) + maActPos = aEnd; +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::DrawPie( const Rectangle& rRect, const Point& rStart, const Point& rEnd ) +{ + UpdateClipRegion(); + UpdateFillStyle(); + + Rectangle aRect( ImplMap( rRect ) ); + Point aStart( ImplMap( rStart ) ); + Point aEnd( ImplMap( rEnd ) ); + + if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) + { + ImplSetNonPersistentLineColorTransparenz(); + mpGDIMetaFile->AddAction( new MetaPieAction( aRect, aStart, aEnd ) ); + UpdateLineStyle(); + mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aRect, aStart, aEnd, POLY_PIE ), maLineStyle.aLineInfo ) ); + } + else + { + UpdateLineStyle(); + mpGDIMetaFile->AddAction( new MetaPieAction( aRect, aStart, aEnd ) ); + } +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::DrawChord( const Rectangle& rRect, const Point& rStart, const Point& rEnd ) +{ + UpdateClipRegion(); + UpdateFillStyle(); + + Rectangle aRect( ImplMap( rRect ) ); + Point aStart( ImplMap( rStart ) ); + Point aEnd( ImplMap( rEnd ) ); + + if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) + { + ImplSetNonPersistentLineColorTransparenz(); + mpGDIMetaFile->AddAction( new MetaChordAction( aRect, aStart, aEnd ) ); + UpdateLineStyle(); + mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aRect, aStart, aEnd, POLY_CHORD ), maLineStyle.aLineInfo ) ); + } + else + { + UpdateLineStyle(); + mpGDIMetaFile->AddAction( new MetaChordAction( aRect, aStart, aEnd ) ); + } +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath ) +{ + UpdateClipRegion(); + ImplMap( rPolygon ); + if ( bRecordPath ) + aPathObj.AddPolygon( rPolygon ); + else + { + UpdateFillStyle(); + + if ( aClipPath.GetType() == COMPLEX ) + { + PolyPolygon aPolyPoly( rPolygon ); + PolyPolygon aDest; + aClipPath.GetClipPath().GetIntersection( aPolyPoly, aDest ); + ImplDrawClippedPolyPolygon( aDest ); + } + else + { + if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) + { + USHORT nCount = rPolygon.GetSize(); + if ( nCount ) + { + if ( rPolygon[ nCount - 1 ] != rPolygon[ 0 ] ) + { + Point aPoint( rPolygon[ 0 ] ); + rPolygon.Insert( nCount, aPoint ); + } + } + ImplSetNonPersistentLineColorTransparenz(); + mpGDIMetaFile->AddAction( new MetaPolygonAction( rPolygon ) ); + UpdateLineStyle(); + mpGDIMetaFile->AddAction( new MetaPolyLineAction( rPolygon, maLineStyle.aLineInfo ) ); + } + else + { + UpdateLineStyle(); + mpGDIMetaFile->AddAction( new MetaPolygonAction( rPolygon ) ); + } + } + } +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::DrawPolyPolygon( PolyPolygon& rPolyPolygon, sal_Bool bRecordPath ) +{ + UpdateClipRegion(); + + ImplMap( rPolyPolygon ); + + if ( bRecordPath ) + aPathObj.AddPolyPolygon( rPolyPolygon ); + else + { + UpdateFillStyle(); + + if ( aClipPath.GetType() == COMPLEX ) + { + PolyPolygon aDest; + aClipPath.GetClipPath().GetIntersection( rPolyPolygon, aDest ); + ImplDrawClippedPolyPolygon( aDest ); + } + else + { + UpdateLineStyle(); + mpGDIMetaFile->AddAction( new MetaPolyPolygonAction( rPolyPolygon ) ); + } + } +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::DrawPolyLine( Polygon& rPolygon, sal_Bool bTo, sal_Bool bRecordPath ) +{ + UpdateClipRegion(); + + ImplMap( rPolygon ); + if ( bTo ) + { + rPolygon[ 0 ] = maActPos; + maActPos = rPolygon[ rPolygon.GetSize() - 1 ]; + } + if ( bRecordPath ) + aPathObj.AddPolyLine( rPolygon ); + else + { + UpdateLineStyle(); + mpGDIMetaFile->AddAction( new MetaPolyLineAction( rPolygon, maLineStyle.aLineInfo ) ); + } +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::DrawPolyBezier( Polygon& rPolygon, sal_Bool bTo, sal_Bool bRecordPath ) +{ + UpdateClipRegion(); + + sal_uInt16 nPoints = rPolygon.GetSize(); + if ( ( nPoints >= 4 ) && ( ( ( nPoints - 4 ) % 3 ) == 0 ) ) + { + ImplMap( rPolygon ); + if ( bTo ) + { + rPolygon[ 0 ] = maActPos; + maActPos = rPolygon[ nPoints - 1 ]; + } + sal_uInt16 i; + for ( i = 0; ( i + 2 ) < nPoints; ) + { + rPolygon.SetFlags( i++, POLY_NORMAL ); + rPolygon.SetFlags( i++, POLY_CONTROL ); + rPolygon.SetFlags( i++, POLY_CONTROL ); + } + if ( bRecordPath ) + aPathObj.AddPolyLine( rPolygon ); + else + { + UpdateLineStyle(); + mpGDIMetaFile->AddAction( new MetaPolyLineAction( rPolygon, maLineStyle.aLineInfo ) ); + } + } +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry, sal_Bool bRecordPath, sal_Int32 nGfxMode ) +{ + UpdateClipRegion(); + + VirtualDevice* pVDev = NULL; + + rPosition = ImplMap( rPosition ); + + sal_Int32 nOldGfxMode = GetGfxMode(); + SetGfxMode( GM_COMPATIBLE ); + if ( pDXArry ) + { + sal_Int32 i, nSum, nLen = rText.Len(); + + for( i = 0, nSum = 0; i < nLen; i++ ) + { + sal_Int32 nTemp = ImplMap( Size( pDXArry[ i ], 0 ) ).Width(); + nSum += nTemp; + pDXArry[ i ] = nSum; + } + } + if ( mnLatestTextLayoutMode != mnTextLayoutMode ) + { + mnLatestTextLayoutMode = mnTextLayoutMode; + mpGDIMetaFile->AddAction( new MetaLayoutModeAction( mnTextLayoutMode ) ); + } + SetGfxMode( nGfxMode ); + sal_Bool bChangeFont = sal_False; + if ( mnLatestTextAlign != mnTextAlign ) + { + bChangeFont = sal_True; + mnLatestTextAlign = mnTextAlign; + TextAlign eTextAlign; + if ( ( mnTextAlign & TA_BASELINE) == TA_BASELINE ) + eTextAlign = ALIGN_BASELINE; + else if( ( mnTextAlign & TA_BOTTOM) == TA_BOTTOM ) + eTextAlign = ALIGN_BOTTOM; + else + eTextAlign = ALIGN_TOP; + mpGDIMetaFile->AddAction( new MetaTextAlignAction( eTextAlign ) ); + } + if ( maLatestTextColor != maTextColor ) + { + bChangeFont = sal_True; + maLatestTextColor = maTextColor; + mpGDIMetaFile->AddAction( new MetaTextColorAction( maTextColor ) ); + } + sal_Bool bChangeFillColor = sal_False; + if ( maLatestBkColor != maBkColor ) + { + bChangeFillColor = sal_True; + maLatestBkColor = maBkColor; + } + if ( mnLatestBkMode != mnBkMode ) + { + bChangeFillColor = sal_True; + mnLatestBkMode = mnBkMode; + } + if ( bChangeFillColor ) + { + bChangeFont = sal_True; + mpGDIMetaFile->AddAction( new MetaTextFillColorAction( maFont.GetFillColor(), !maFont.IsTransparent() ) ); + } + Font aTmp( maFont ); + aTmp.SetColor( maTextColor ); + aTmp.SetFillColor( maBkColor ); + + if( mnBkMode == TRANSPARENT ) + aTmp.SetTransparent( sal_True ); + else + aTmp.SetTransparent( sal_False ); + + if ( ( mnTextAlign & TA_BASELINE) == TA_BASELINE ) + aTmp.SetAlign( ALIGN_BASELINE ); + else if( ( mnTextAlign & TA_BOTTOM) == TA_BOTTOM ) + aTmp.SetAlign( ALIGN_BOTTOM ); + else + aTmp.SetAlign( ALIGN_TOP ); + + if ( nGfxMode == GM_ADVANCED ) + { + // check whether there is a font rotation applied via transformation + Point aP1( ImplMap( Point() ) ); + Point aP2( ImplMap( Point( 0, 100 ) ) ); + aP2.X() -= aP1.X(); + aP2.Y() -= aP1.Y(); + double fX = aP2.X(); + double fY = aP2.Y(); + if ( fX ) + { + double fOrientation = acos( fX / sqrt( fX * fX + fY * fY ) ) * 57.29577951308; + if ( fY > 0 ) + fOrientation = 360 - fOrientation; + fOrientation += 90; + fOrientation *= 10; + fOrientation += aTmp.GetOrientation(); + aTmp.SetOrientation( sal_Int16( fOrientation ) ); + } + } + + if( mnTextAlign & ( TA_UPDATECP | TA_RIGHT_CENTER ) ) + { + if ( !pVDev ) + pVDev = new VirtualDevice; + sal_Int32 nTextWidth; + pVDev->SetMapMode( MapMode( MAP_100TH_MM ) ); + pVDev->SetFont( maFont ); + if( pDXArry ) + { + UINT32 nLen = rText.Len(); + nTextWidth = pVDev->GetTextWidth( rText.GetChar( (sal_uInt16)( nLen - 1 ) ) ); + if( nLen > 1 ) + nTextWidth += pDXArry[ nLen - 2 ]; + } + else + nTextWidth = pVDev->GetTextWidth( rText ); + + if( mnTextAlign & TA_UPDATECP ) + rPosition = maActPos; + + if ( mnTextAlign & TA_RIGHT_CENTER ) + { + double fLenght = ( ( mnTextAlign & TA_RIGHT_CENTER ) == TA_RIGHT ) ? nTextWidth : nTextWidth >> 1; + rPosition.X() -= (sal_Int32)( fLenght * cos( maFont.GetOrientation() * F_PI1800 ) ); + rPosition.Y() -= (sal_Int32)(-( fLenght * sin( maFont.GetOrientation() * F_PI1800 ) ) ); + } + + if( mnTextAlign & TA_UPDATECP ) + maActPos.X() = rPosition.X() + nTextWidth; + } + if ( bChangeFont || ( maLatestFont != aTmp ) ) + { + maLatestFont = aTmp; + mpGDIMetaFile->AddAction( new MetaFontAction( aTmp ) ); + mpGDIMetaFile->AddAction( new MetaTextAlignAction( aTmp.GetAlign() ) ); + mpGDIMetaFile->AddAction( new MetaTextColorAction( aTmp.GetColor() ) ); + mpGDIMetaFile->AddAction( new MetaTextFillColorAction( aTmp.GetFillColor(), !aTmp.IsTransparent() ) ); + } + if ( bRecordPath ) + { + // ToDo + } + else + { + /* because text without dx array is badly scaled, we + will create such an array if necessary */ + sal_Int32* pDX = pDXArry; + if ( !pDXArry ) + { + pDX = new sal_Int32[ rText.Len() ]; + if ( !pVDev ) + pVDev = new VirtualDevice; + pVDev->SetMapMode( MAP_100TH_MM ); + pVDev->SetFont( maLatestFont ); + pVDev->GetTextArray( rText, pDX, 0, STRING_LEN ); + } + mpGDIMetaFile->AddAction( new MetaTextArrayAction( rPosition, rText, pDX, 0, STRING_LEN ) ); + if ( !pDXArry ) // this means we have created our own array + delete[] pDX; // which must be deleted + } + SetGfxMode( nOldGfxMode ); + delete pVDev; +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::ImplDrawBitmap( const Point& rPos, const Size& rSize, const BitmapEx rBitmap ) +{ + BitmapEx aBmpEx( rBitmap ); + if ( aClipPath.GetType() == COMPLEX ) + { + VirtualDevice aVDev; + MapMode aMapMode( MAP_100TH_MM ); + aMapMode.SetOrigin( Point( -rPos.X(), -rPos.Y() ) ); + const Size aOutputSizePixel( aVDev.LogicToPixel( rSize, aMapMode ) ); + const Size aSizePixel( rBitmap.GetSizePixel() ); + if ( aOutputSizePixel.Width() && aOutputSizePixel.Height() ) + { + aMapMode.SetScaleX( Fraction( aSizePixel.Width(), aOutputSizePixel.Width() ) ); + aMapMode.SetScaleY( Fraction( aSizePixel.Height(), aOutputSizePixel.Height() ) ); + } + aVDev.SetMapMode( aMapMode ); + aVDev.SetOutputSizePixel( aSizePixel ); + aVDev.SetFillColor( Color( COL_BLACK ) ); + const PolyPolygon aClip( aClipPath.GetClipPath() ); + aVDev.DrawPolyPolygon( aClip ); + const Point aEmptyPoint; + + // #i50672# Extract whole VDev content (to match size of rBitmap) + aVDev.EnableMapMode( FALSE ); + Bitmap aMask( aVDev.GetBitmap( aEmptyPoint, aSizePixel ).CreateMask( Color( COL_WHITE ) ) ); + + if ( aBmpEx.IsTransparent() ) + { + if ( rBitmap.GetTransparentColor() == Color( COL_WHITE ) ) + aMask.CombineSimple( rBitmap.GetMask(), BMP_COMBINE_OR ); + else + aMask.CombineSimple( rBitmap.GetMask(), BMP_COMBINE_AND ); + aBmpEx = BitmapEx( rBitmap.GetBitmap(), aMask ); + } + else + aBmpEx = BitmapEx( rBitmap.GetBitmap(), aMask ); + } + if ( aBmpEx.IsTransparent() ) + mpGDIMetaFile->AddAction( new MetaBmpExScaleAction( rPos, rSize, aBmpEx ) ); + else + mpGDIMetaFile->AddAction( new MetaBmpScaleAction( rPos, rSize, aBmpEx.GetBitmap() ) ); +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) +{ + UpdateClipRegion(); + + sal_uInt32 nObjects = rSaveList.Count(); + sal_uInt32 nObjectsLeft = nObjects; + + while ( nObjectsLeft ) + { + sal_uInt32 i, nObjectsOfSameSize = 0; + sal_uInt32 nObjectStartIndex = nObjects - nObjectsLeft; + + BSaveStruct* pSave = (BSaveStruct*)rSaveList.GetObject( nObjectStartIndex ); + Rectangle aRect( pSave->aOutRect ); + + for ( i = nObjectStartIndex; i < nObjects; ) + { + nObjectsOfSameSize++; + if ( ++i < nObjects ) + { + pSave = (BSaveStruct*)rSaveList.GetObject( i ); + if ( pSave->aOutRect != aRect ) + break; + } + } + Point aPos( ImplMap( aRect.TopLeft() ) ); + Size aSize( ImplMap( aRect.GetSize() ) ); + + for ( i = nObjectStartIndex; i < ( nObjectStartIndex + nObjectsOfSameSize ); i++ ) + { + pSave = (BSaveStruct*)rSaveList.GetObject( i ); + + sal_uInt32 nWinRop = pSave->nWinRop; + sal_uInt8 nRasterOperation = (sal_uInt8)( nWinRop >> 16 ); + + sal_uInt32 nUsed = 0; + if ( ( nRasterOperation & 0xf ) != ( nRasterOperation >> 4 ) ) + nUsed |= 1; // pattern is used + if ( ( nRasterOperation & 0x33 ) != ( ( nRasterOperation & 0xcc ) >> 2 ) ) + nUsed |= 2; // source is used + if ( ( nRasterOperation & 0xaa ) != ( ( nRasterOperation & 0x55 ) << 1 ) ) + nUsed |= 4; // destination is used + + if ( (nUsed & 1) && (( nUsed & 2 ) == 0) ) + { // patterns aren't well supported yet + sal_uInt32 nOldRop = SetRasterOp( ROP_OVERPAINT ); // in this case nRasterOperation is either 0 or 0xff + UpdateFillStyle(); + DrawRect( aRect, FALSE ); + SetRasterOp( nOldRop ); + } + else + { + sal_Bool bDrawn = sal_False; + + if ( i == nObjectStartIndex ) // optimizing, sometimes it is possible to create just one transparent bitmap + { + if ( nObjectsOfSameSize == 2 ) + { + BSaveStruct* pSave2 = (BSaveStruct*)rSaveList.GetObject( i + 1 ); + if ( ( pSave->aBmp.GetPrefSize() == pSave2->aBmp.GetPrefSize() ) && + ( pSave->aBmp.GetPrefMapMode() == pSave2->aBmp.GetPrefMapMode() ) ) + { + // TODO: Strictly speaking, we should + // check whether mask is monochrome, and + // whether image is black (upper branch) + // or white (lower branch). Otherwise, the + // effect is not the same as a masked + // bitmap. + if ( ( nWinRop == SRCPAINT ) && ( pSave2->nWinRop == SRCAND ) ) + { + Bitmap aMask( pSave->aBmp ); aMask.Invert(); + BitmapEx aBmpEx( pSave2->aBmp, aMask ); + ImplDrawBitmap( aPos, aSize, aBmpEx ); + bDrawn = sal_True; + i++; + } + // #i20085# This is just the other way + // around as above. Only difference: mask + // is inverted + else if ( ( nWinRop == SRCAND ) && ( pSave2->nWinRop == SRCPAINT ) ) + { + Bitmap aMask( pSave->aBmp ); + BitmapEx aBmpEx( pSave2->aBmp, aMask ); + ImplDrawBitmap( aPos, aSize, aBmpEx ); + bDrawn = sal_True; + i++; + } + } + } + } + + if ( !bDrawn ) + { + Push(); + sal_uInt32 nOldRop = SetRasterOp( R2_COPYPEN ); + Bitmap aBitmap( pSave->aBmp ); + sal_uInt32 nOperation = ( nRasterOperation & 0xf ); + switch( nOperation ) + { + case 0x1 : + case 0xe : + { + SetRasterOp( R2_XORPEN ); + ImplDrawBitmap( aPos, aSize, aBitmap ); + SetRasterOp( R2_COPYPEN ); + Bitmap aMask( aBitmap ); + aMask.Invert(); + BitmapEx aBmpEx( aBitmap, aMask ); + ImplDrawBitmap( aPos, aSize, aBmpEx ); + if ( nOperation == 0x1 ) + { + SetRasterOp( R2_NOT ); + DrawRect( aRect, FALSE ); + } + } + break; + case 0x7 : + case 0x8 : + { + Bitmap aMask( aBitmap ); + if ( ( nUsed & 1 ) && ( nRasterOperation & 0xb0 ) == 0xb0 ) // pattern used + { + aBitmap.Convert( BMP_CONVERSION_24BIT ); + aBitmap.Erase( maFillStyle.aFillColor ); + } + BitmapEx aBmpEx( aBitmap, aMask ); + ImplDrawBitmap( aPos, aSize, aBmpEx ); + if ( nOperation == 0x7 ) + { + SetRasterOp( R2_NOT ); + DrawRect( aRect, FALSE ); + } + } + break; + + case 0x4 : + case 0xb : + { + SetRasterOp( R2_NOT ); + DrawRect( aRect, FALSE ); + SetRasterOp( R2_COPYPEN ); + Bitmap aMask( aBitmap ); + aBitmap.Invert(); + BitmapEx aBmpEx( aBitmap, aMask ); + ImplDrawBitmap( aPos, aSize, aBmpEx ); + SetRasterOp( R2_XORPEN ); + ImplDrawBitmap( aPos, aSize, aBitmap ); + if ( nOperation == 0xb ) + { + SetRasterOp( R2_NOT ); + DrawRect( aRect, FALSE ); + } + } + break; + + case 0x2 : + case 0xd : + { + Bitmap aMask( aBitmap ); + aMask.Invert(); + BitmapEx aBmpEx( aBitmap, aMask ); + ImplDrawBitmap( aPos, aSize, aBmpEx ); + SetRasterOp( R2_XORPEN ); + ImplDrawBitmap( aPos, aSize, aBitmap ); + if ( nOperation == 0xd ) + { + SetRasterOp( R2_NOT ); + DrawRect( aRect, FALSE ); + } + } + break; + case 0x6 : + case 0x9 : + { + SetRasterOp( R2_XORPEN ); + ImplDrawBitmap( aPos, aSize, aBitmap ); + if ( nOperation == 0x9 ) + { + SetRasterOp( R2_NOT ); + DrawRect( aRect, FALSE ); + } + } + break; + + case 0x0 : // WHITENESS + case 0xf : // BLACKNESS + { // in this case nRasterOperation is either 0 or 0xff + maFillStyle = WinMtfFillStyle( Color( nRasterOperation, nRasterOperation, nRasterOperation ) ); + UpdateFillStyle(); + DrawRect( aRect, FALSE ); + } + break; + + case 0x3 : // only source is used + case 0xc : + { + if ( nRasterOperation == 0x33 ) + aBitmap.Invert(); + ImplDrawBitmap( aPos, aSize, aBitmap ); + } + break; + + case 0x5 : // only destination is used + { + SetRasterOp( R2_NOT ); + DrawRect( aRect, FALSE ); + } + case 0xa : // no operation + break; + } + SetRasterOp( nOldRop ); + Pop(); + } + } + } + nObjectsLeft -= nObjectsOfSameSize; + } + + void* pPtr; + for ( pPtr = rSaveList.First(); pPtr; pPtr = rSaveList.Next() ) + delete (BSaveStruct*)pPtr; + rSaveList.Clear(); +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::SetDevOrg( const Point& rPoint ) +{ + mnDevOrgX = rPoint.X(); + mnDevOrgY = rPoint.Y(); +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::SetDevOrgOffset( INT32 nXAdd, INT32 nYAdd ) +{ + mnDevOrgX += nXAdd; + mnDevOrgY += nYAdd; +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::SetDevExt( const Size& rSize ) +{ + if ( rSize.Width() && rSize.Height() ) + { + switch( mnMapMode ) + { + case MM_ISOTROPIC : + case MM_ANISOTROPIC : + { + mnDevWidth = rSize.Width(); + mnDevHeight = rSize.Height(); + } + } + } +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::ScaleDevExt( double fX, double fY ) +{ + mnDevWidth = FRound( mnDevWidth * fX ); + mnDevHeight = FRound( mnDevHeight * fY ); +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::SetWinOrg( const Point& rPoint ) +{ + mnWinOrgX = rPoint.X(); + mnWinOrgY = rPoint.Y(); +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::SetWinOrgOffset( INT32 nXAdd, INT32 nYAdd ) +{ + mnWinOrgX += nXAdd; + mnWinOrgY += nYAdd; +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::SetWinExt( const Size& rSize ) +{ + + if( rSize.Width() && rSize.Height() ) + { + switch( mnMapMode ) + { + case MM_ISOTROPIC : + case MM_ANISOTROPIC : + { + mnWinExtX = rSize.Width(); + mnWinExtY = rSize.Height(); + } + } + } +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::ScaleWinExt( double fX, double fY ) +{ + mnWinExtX = FRound( mnWinExtX * fX ); + mnWinExtY = FRound( mnWinExtY * fY ); +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::SetrclBounds( const Rectangle& rRect ) +{ + mrclBounds = rRect; +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::SetrclFrame( const Rectangle& rRect ) +{ + mrclFrame = rRect; +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::SetRefPix( const Size& rSize ) +{ + mnPixX = rSize.Width(); + mnPixY = rSize.Height(); +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::SetRefMill( const Size& rSize ) +{ + mnMillX = rSize.Width(); + mnMillY = rSize.Height(); +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::SetMapMode( sal_uInt32 nMapMode ) +{ + mnMapMode = nMapMode; + if ( nMapMode == MM_TEXT ) + { + mnWinExtX = mnDevWidth; + mnWinExtY = mnDevHeight; + } + else if ( mnMapMode == MM_HIMETRIC ) + { + mnWinExtX = mnMillX * 100; + mnWinExtY = mnMillY * 100; + } +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::SetWorldTransform( const XForm& rXForm ) +{ + maXForm.eM11 = rXForm.eM11; + maXForm.eM12 = rXForm.eM12; + maXForm.eM21 = rXForm.eM21; + maXForm.eM22 = rXForm.eM22; + maXForm.eDx = rXForm.eDx; + maXForm.eDy = rXForm.eDy; +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::ModifyWorldTransform( const XForm& rXForm, UINT32 nMode ) +{ + switch( nMode ) + { + case MWT_IDENTITY : + { + maXForm.eM11 = maXForm.eM12 = maXForm.eM21 = maXForm.eM22 = 1.0f; + maXForm.eDx = maXForm.eDy = 0.0f; + } + break; + + case MWT_RIGHTMULTIPLY : + case MWT_LEFTMULTIPLY : + { + const XForm* pLeft; + const XForm* pRight; + + if ( nMode == MWT_LEFTMULTIPLY ) + { + pLeft = &rXForm; + pRight = &maXForm; + } + else + { + pLeft = &maXForm; + pRight = &rXForm; + } + + float aF[3][3]; + float bF[3][3]; + float cF[3][3]; + + aF[0][0] = pLeft->eM11; + aF[0][1] = pLeft->eM12; + aF[0][2] = 0; + aF[1][0] = pLeft->eM21; + aF[1][1] = pLeft->eM22; + aF[1][2] = 0; + aF[2][0] = pLeft->eDx; + aF[2][1] = pLeft->eDy; + aF[2][2] = 1; + + bF[0][0] = pRight->eM11; + bF[0][1] = pRight->eM12; + bF[0][2] = 0; + bF[1][0] = pRight->eM21; + bF[1][1] = pRight->eM22; + bF[1][2] = 0; + bF[2][0] = pRight->eDx; + bF[2][1] = pRight->eDy; + bF[2][2] = 1; + + int i, j, k; + for ( i = 0; i < 3; i++ ) + { + for ( j = 0; j < 3; j++ ) + { + cF[i][j] = 0; + for ( k = 0; k < 3; k++ ) + cF[i][j] += aF[i][k] * bF[k][j]; + } + } + maXForm.eM11 = cF[0][0]; + maXForm.eM12 = cF[0][1]; + maXForm.eM21 = cF[1][0]; + maXForm.eM22 = cF[1][1]; + maXForm.eDx = cF[2][0]; + maXForm.eDy = cF[2][1]; + } + break; + } + } + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::Push() // !! to be able to access the original ClipRegion it +{ // is not allowed to use the MetaPushAction() + UpdateClipRegion(); // (the original clip region is on top of the stack) (SJ) + SaveStructPtr pSave( new SaveStruct ); + + pSave->aLineStyle = maLineStyle; + pSave->aFillStyle = maFillStyle; + + pSave->aFont = maFont; + pSave->aTextColor = maTextColor; + pSave->nTextAlign = mnTextAlign; + pSave->nTextLayoutMode = mnTextLayoutMode; + pSave->nMapMode = mnMapMode; + pSave->nGfxMode = mnGfxMode; + pSave->nBkMode = mnBkMode; + pSave->aBkColor = maBkColor; + pSave->bFillStyleSelected = mbFillStyleSelected; + + pSave->aActPos = maActPos; + pSave->aXForm = maXForm; + pSave->eRasterOp = meRasterOp; + + pSave->nWinOrgX = mnWinOrgX; + pSave->nWinOrgY = mnWinOrgY; + pSave->nWinExtX = mnWinExtX; + pSave->nWinExtY = mnWinExtY; + pSave->nDevOrgX = mnDevOrgX; + pSave->nDevOrgY = mnDevOrgY; + pSave->nDevWidth = mnDevWidth; + pSave->nDevHeight = mnDevHeight; + + pSave->aPathObj = aPathObj; + pSave->aClipPath = aClipPath; + + vSaveStack.push_back( pSave ); +} + +//----------------------------------------------------------------------------------- + +void WinMtfOutput::Pop() +{ + // Die aktuellen Daten vom Stack holen + if( vSaveStack.size() ) + { + // Die aktuelle Daten auf dem Stack sichern + SaveStructPtr pSave( vSaveStack.back() ); + + maLineStyle = pSave->aLineStyle; + maFillStyle = pSave->aFillStyle; + + maFont = pSave->aFont; + maTextColor = pSave->aTextColor; + mnTextAlign = pSave->nTextAlign; + mnTextLayoutMode = pSave->nTextLayoutMode; + mnBkMode = pSave->nBkMode; + mnGfxMode = pSave->nGfxMode; + mnMapMode = pSave->nMapMode; + maBkColor = pSave->aBkColor; + mbFillStyleSelected = pSave->bFillStyleSelected; + + maActPos = pSave->aActPos; + maXForm = pSave->aXForm; + meRasterOp = pSave->eRasterOp; + + mnWinOrgX = pSave->nWinOrgX; + mnWinOrgY = pSave->nWinOrgY; + mnWinExtX = pSave->nWinExtX; + mnWinExtY = pSave->nWinExtY; + mnDevOrgX = pSave->nDevOrgX; + mnDevOrgY = pSave->nDevOrgY; + mnDevWidth = pSave->nDevWidth; + mnDevHeight = pSave->nDevHeight; + + aPathObj = pSave->aPathObj; + if ( ! ( aClipPath == pSave->aClipPath ) ) + { + aClipPath = pSave->aClipPath; + aClipPath.bNeedsUpdate = sal_True; + } + if ( meLatestRasterOp != meRasterOp ) + mpGDIMetaFile->AddAction( new MetaRasterOpAction( meRasterOp ) ); + vSaveStack.pop_back(); + } +} + +void WinMtfOutput::AddFromGDIMetaFile( GDIMetaFile& rGDIMetaFile ) +{ + rGDIMetaFile.Play( *mpGDIMetaFile, 0xFFFFFFFF ); +} + diff --git a/svtools/source/filter/wmf/winmtf.hxx b/svtools/source/filter/wmf/winmtf.hxx new file mode 100644 index 000000000000..fb4fd2fe0c57 --- /dev/null +++ b/svtools/source/filter/wmf/winmtf.hxx @@ -0,0 +1,777 @@ +/************************************************************************* + * + * 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 _WINMTF_HXX +#define _WINMTF_HXX + +#ifdef DBG_UTIL +#define WIN_MTF_ASSERT +#endif + +#include +#ifndef BOOST_SHARED_PTR_HPP_INCLUDED +#include +#endif +#ifndef _TOOL_DEBUG_HXX +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define ERROR 0 +#define NULLREGION 1 +#define SIMPLEREGION 2 +#define COMPLEXREGION 3 + +#define RGN_AND 1 +#define RGN_OR 2 +#define RGN_XOR 3 +#define RGN_DIFF 4 +#define RGN_COPY 5 + +#define TRANSPARENT 1 +#define OPAQUE 2 +#define BKMODE_LAST 2 + +/* xform stuff */ +#define MWT_IDENTITY 1 +#define MWT_LEFTMULTIPLY 2 +#define MWT_RIGHTMULTIPLY 3 + +#define ENHMETA_STOCK_OBJECT 0x80000000 + +/* Stock Logical Objects */ +#define WHITE_BRUSH 0 +#define LTGRAY_BRUSH 1 +#define GRAY_BRUSH 2 +#define DKGRAY_BRUSH 3 +#define BLACK_BRUSH 4 +#define NULL_BRUSH 5 +#define HOLLOW_BRUSH NULL_BRUSH +#define WHITE_PEN 6 +#define BLACK_PEN 7 +#define NULL_PEN 8 +#define OEM_FIXED_FONT 10 +#define ANSI_FIXED_FONT 11 +#define ANSI_VAR_FONT 12 +#define SYSTEM_FONT 13 +#define DEVICE_DEFAULT_FONT 14 +#define DEFAULT_PALETTE 15 +#define SYSTEM_FIXED_FONT 16 + + +#define R2_BLACK 1 +#define R2_NOTMERGEPEN 2 +#define R2_MASKNOTPEN 3 +#define R2_NOTCOPYPEN 4 +#define R2_MASKPENNOT 5 +#define R2_NOT 6 +#define R2_XORPEN 7 +#define R2_NOTMASKPEN 8 +#define R2_MASKPEN 9 +#define R2_NOTXORPEN 10 +#define R2_NOP 11 +#define R2_MERGENOTPEN 12 +#define R2_COPYPEN 13 +#define R2_MERGEPENNOT 14 +#define R2_MERGEPEN 15 +#define R2_WHITE 16 + +/* Mapping Modes */ +#define MM_TEXT 1 +#define MM_LOMETRIC 2 +#define MM_HIMETRIC 3 +#define MM_LOENGLISH 4 +#define MM_HIENGLISH 5 +#define MM_TWIPS 6 +#define MM_ISOTROPIC 7 +#define MM_ANISOTROPIC 8 + + +/* Graphics Modes */ +#define GM_COMPATIBLE 1 +#define GM_ADVANCED 2 +#define GM_LAST 2 + +/* StretchBlt() Modes */ +#define BLACKONWHITE 1 +#define WHITEONBLACK 2 +#define COLORONCOLOR 3 +#define HALFTONE 4 +#define MAXSTRETCHBLTMODE 4 +#define STRETCH_ANDSCANS BLACKONWHITE +#define STRETCH_ORSCANS WHITEONBLACK +#define STRETCH_DELETESCANS COLORONCOLOR +#define STRETCH_HALFTONE HALFTONE + +#define LF_FACESIZE 32 + +struct LOGFONTW +{ + INT32 lfHeight; + INT32 lfWidth; + INT32 lfEscapement; + INT32 lfOrientation; + INT32 lfWeight; + BYTE lfItalic; + BYTE lfUnderline; + BYTE lfStrikeOut; + BYTE lfCharSet; + BYTE lfOutPrecision; + BYTE lfClipPrecision; + BYTE lfQuality; + BYTE lfPitchAndFamily; + String alfFaceName; +}; + +#define TA_NOUPDATECP 0x0000 +#define TA_UPDATECP 0x0001 +#define TA_LEFT 0x0000 +#define TA_RIGHT 0x0002 +#define TA_CENTER 0x0006 +#define TA_RIGHT_CENTER (TA_RIGHT | TA_CENTER) +#define TA_TOP 0x0000 +#define TA_BOTTOM 0x0008 +#define TA_BASELINE 0x0018 + +#define SRCCOPY 0x00CC0020L +#define SRCPAINT 0x00EE0086L +#define SRCAND 0x008800C6L +#define SRCINVERT 0x00660046L +#define SRCERASE 0x00440328L +#define NOTSRCCOPY 0x00330008L +#define NOTSRCERASE 0x001100A6L +#define MERGECOPY 0x00C000CAL +#define MERGEPAINT 0x00BB0226L +#define PATCOPY 0x00F00021L +#define PATPAINT 0x00FB0A09L +#define PATINVERT 0x005A0049L +#define DSTINVERT 0x00550009L +#define BLACKNESS 0x00000042L +#define WHITENESS 0x00FF0062L + +#define PS_SOLID 0 +#define PS_DASH 1 +#define PS_DOT 2 +#define PS_DASHDOT 3 +#define PS_DASHDOTDOT 4 +#define PS_NULL 5 +#define PS_INSIDEFRAME 6 +#define PS_USERSTYLE 7 +#define PS_ALTERNATE 8 +#define PS_STYLE_MASK 15 + +#define PS_ENDCAP_ROUND 0x000 +#define PS_ENDCAP_SQUARE 0x100 +#define PS_ENDCAP_FLAT 0x200 +#define PS_ENDCAP_MASK 0xF00 + +#define PS_JOIN_ROUND 0x0000 +#define PS_JOIN_BEVEL 0x1000 +#define PS_JOIN_MITER 0x2000 +#define PS_JOIN_MASK 0xF000 + +#define PS_COSMETIC 0x00000 +#define PS_GEOMETRIC 0x10000 +#define PS_TYPE_MASK 0xF0000 + +#define ANSI_CHARSET 0 +#define DEFAULT_CHARSET 1 +#define SYMBOL_CHARSET 2 +#define SHIFTJIS_CHARSET 128 +#define HANGEUL_CHARSET 129 +#define GB2312_CHARSET 134 +#define CHINESEBIG5_CHARSET 136 +#define OEM_CHARSET 255 +/*WINVER >= 0x0400*/ +#define JOHAB_CHARSET 130 +#define HEBREW_CHARSET 177 +#define ARABIC_CHARSET 178 +#define GREEK_CHARSET 161 +#define TURKISH_CHARSET 162 +#define VIETNAMESE_CHARSET 163 +#define THAI_CHARSET 222 +#define EASTEUROPE_CHARSET 238 +#define RUSSIAN_CHARSET 204 +#define MAC_CHARSET 77 +#define BALTIC_CHARSET 186 + +#define ETO_OPAQUE 0x0002 +#define ETO_CLIPPED 0x0004 +/*WINVER >= 0x0400*/ +#define ETO_GLYPH_INDEX 0x0010 +#define ETO_RTLREADING 0x0080 +#define ETO_NUMERICSLOCAL 0x0400 +#define ETO_NUMERICSLATIN 0x0800 +#define ETO_IGNORELANGUAGE 0x1000 +/*_WIN32_WINNT >= 0x0500*/ +#define ETO_PDY 0x2000 + + +#define DEFAULT_PITCH 0x00 +#define FIXED_PITCH 0x01 +#define VARIABLE_PITCH 0x02 + +/* Font Families */ +#define FF_DONTCARE 0x00 +#define FF_ROMAN 0x10 +#define FF_SWISS 0x20 +#define FF_MODERN 0x30 +#define FF_SCRIPT 0x40 +#define FF_DECORATIVE 0x50 + +#define FW_DONTCARE 0 +#define FW_THIN 100 +#define FW_EXTRALIGHT 200 +#define FW_LIGHT 300 +#define FW_NORMAL 400 +#define FW_MEDIUM 500 +#define FW_SEMIBOLD 600 +#define FW_BOLD 700 +#define FW_EXTRABOLD 800 +#define FW_HEAVY 900 +#define FW_ULTRALIGHT 200 +#define FW_REGULAR 400 +#define FW_DEMIBOLD 600 +#define FW_ULTRABOLD 800 +#define FW_BLACK 900 + +#define BS_SOLID 0 +#define BS_NULL 1 +#define BS_HOLLOW 1 +#define BS_HATCHED 2 +#define BS_PATTERN 3 +#define BS_INDEXED 4 +#define BS_DIBPATTERN 5 +#define BS_DIBPATTERNPT 6 +#define BS_PATTERN8X8 7 +#define BS_DIBPATTERN8X8 8 +#define BS_MONOPATTERN 9 + +#define W_HS_HORIZONTAL 0 +#define W_HS_VERTICAL 1 +#define W_HS_FDIAGONAL 2 +#define W_HS_BDIAGONAL 3 +#define W_HS_CROSS 4 +#define W_HS_DIAGCROSS 5 + +#define RDH_RECTANGLES 1 + +#define W_MFCOMMENT 15 + +#define PRIVATE_ESCAPE_UNICODE 2 + +//============================ WMFReader ================================== + + +#ifdef WIN_MTF_ASSERT +#define WIN_MTF_ASSERT_INIT 0x80000000 +#define WIN_MTF_ASSERT_ONCE 0x40000000 +#define WIN_MTF_ASSERT_MIFE 0x20000000 + +void WinMtfAssertHandler( const sal_Char*, sal_uInt32 nFlags = WIN_MTF_ASSERT_MIFE ); +#endif + +enum WinMtfClipPathType{ EMPTY, RECTANGLE, COMPLEX }; + +class WinMtfClipPath +{ + PolyPolygon aPolyPoly; + WinMtfClipPathType eType; + sal_Int32 nDepth; + + void ImpUpdateType(); + + public : + + sal_Bool bNeedsUpdate; + + WinMtfClipPath(): eType(EMPTY), nDepth( 0 ), bNeedsUpdate( sal_False ){}; + + void SetClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode ); + void IntersectClipRect( const Rectangle& rRect ); + void ExcludeClipRect( const Rectangle& rRect ); + void MoveClipRegion( const Size& rSize ); + + WinMtfClipPathType GetType() const { return eType; }; + const PolyPolygon& GetClipPath() const { return aPolyPoly; }; + + sal_Bool operator==( const WinMtfClipPath& rPath ) + { + return ( rPath.eType == eType ) && + ( rPath.aPolyPoly == aPolyPoly ); + }; +}; + +class WinMtfPathObj : public PolyPolygon +{ + sal_Bool bClosed; + + public : + + WinMtfPathObj() { bClosed = sal_True; } + void Init() { Clear(); bClosed = sal_True; }; + void ClosePath(); + + void AddPoint( const Point& rPoint ); + void AddPolygon( const Polygon& rPoly ); + void AddPolyLine( const Polygon& rPoly ); + void AddPolyPolygon( const PolyPolygon& rPolyPolygon ); +}; + +struct WinMtfFontStyle +{ + Font aFont; + + WinMtfFontStyle( LOGFONTW& rLogFont ); +}; + +// ----------------------------------------------------------------------------- + +struct WinMtfFillStyle +{ + Color aFillColor; + BOOL bTransparent; + + WinMtfFillStyle() : + aFillColor ( Color( COL_BLACK ) ), + bTransparent( FALSE ) + { + }; + + WinMtfFillStyle( const Color& rColor, BOOL bTrans = FALSE ) : + aFillColor ( rColor ), + bTransparent( bTrans ) + { + }; + + BOOL operator==( const WinMtfFillStyle& rStyle ) + { return ( ( aFillColor == rStyle.aFillColor ) && ( bTransparent == rStyle.bTransparent ) ); }; + BOOL operator==( WinMtfFillStyle* pStyle ) + { return ( ( aFillColor == pStyle->aFillColor ) && ( bTransparent == pStyle->bTransparent ) ); }; + void operator=( const WinMtfFillStyle& rStyle ) { aFillColor = rStyle.aFillColor; bTransparent = rStyle.bTransparent; }; + void operator=( WinMtfFillStyle* pStyle ) { aFillColor = pStyle->aFillColor; bTransparent = pStyle->bTransparent; }; +}; + +// ----------------------------------------------------------------------------- + +struct WinMtfLineStyle +{ + Color aLineColor; + LineInfo aLineInfo; + BOOL bTransparent; + + WinMtfLineStyle() : + aLineColor ( COL_BLACK ), + bTransparent( FALSE ) {}; + + WinMtfLineStyle( const Color& rColor, BOOL bTrans = FALSE ) : + aLineColor ( rColor ), + bTransparent( bTrans ) {}; + + WinMtfLineStyle( const Color& rColor, const LineInfo rStyle, BOOL bTrans = FALSE ) : + aLineColor ( rColor ), + aLineInfo ( rStyle ), + bTransparent( bTrans ) {}; + + BOOL operator==( const WinMtfLineStyle& rStyle ) { return ( ( aLineColor == rStyle.aLineColor ) && ( bTransparent == rStyle.bTransparent ) && ( aLineInfo == rStyle.aLineInfo ) ); }; + BOOL operator==( WinMtfLineStyle* pStyle ) { return ( ( aLineColor == pStyle->aLineColor ) && ( bTransparent == pStyle->bTransparent ) && ( aLineInfo == pStyle->aLineInfo ) ); }; + void operator=( const WinMtfLineStyle& rStyle ) + { + aLineColor = rStyle.aLineColor; + bTransparent = rStyle.bTransparent; + aLineInfo = rStyle.aLineInfo; + }; + + void operator=( WinMtfLineStyle* pStyle ) + { + aLineColor = pStyle->aLineColor; + bTransparent = pStyle->bTransparent; + aLineInfo = pStyle->aLineInfo; + }; +}; + +// ----------------------------------------------------------------------------- + +struct XForm +{ + float eM11; + float eM12; + float eM21; + float eM22; + float eDx; + float eDy; + XForm() + { + eM11 = eM22 = 1.0f; + eDx = eDy = eM12 = eM21 = 0.0f; + }; + + friend SvStream& operator>>( SvStream& rIn, XForm& rXForm ); +}; + +// ----------------------------------------------------------------------------- + +struct SaveStruct +{ + sal_uInt32 nBkMode, nMapMode, nGfxMode, nTextLayoutMode; + sal_Int32 nWinOrgX, nWinOrgY, nWinExtX, nWinExtY; + sal_Int32 nDevOrgX, nDevOrgY, nDevWidth, nDevHeight; + + WinMtfLineStyle aLineStyle; + WinMtfFillStyle aFillStyle; + + Font aFont; + Color aBkColor; + Color aTextColor; + sal_uInt32 nTextAlign; + RasterOp eRasterOp; + + Point aActPos; + WinMtfPathObj aPathObj; + WinMtfClipPath aClipPath; + XForm aXForm; + + sal_Bool bRecordPath; + sal_Bool bFillStyleSelected; +}; + +typedef ::boost::shared_ptr< SaveStruct > SaveStructPtr; + +// ----------------------------------------------------------------------------- + +struct BSaveStruct +{ + Bitmap aBmp; + Rectangle aOutRect; + UINT32 nWinRop; + + BSaveStruct( const Bitmap& rBmp, const Rectangle& rOutRect, UINT32 nRop ) : + aBmp( rBmp ), aOutRect( rOutRect ), nWinRop( nRop ){}; +}; + +// ----------------------------------------------------------------------------- + +enum GDIObjectType { GDI_DUMMY = 0, GDI_PEN = 1, GDI_BRUSH = 2, GDI_FONT = 3, GDI_PALETTE = 4, GDI_BITMAP = 5, GDI_REGION = 6 }; + +struct GDIObj +{ + void* pStyle; + GDIObjectType eType; + + GDIObj() : + pStyle ( NULL ), + eType ( GDI_DUMMY ) + { + }; + + GDIObj( GDIObjectType eT, void* pS ) { pStyle = pS; eType = eT; }; + void Set( GDIObjectType eT, void* pS ) { pStyle = pS; eType = eT; }; + void Delete() + { + if ( pStyle ) + { + switch ( eType ) + { + case GDI_PEN : + delete (WinMtfLineStyle*)pStyle; + break; + case GDI_BRUSH : + delete (WinMtfFillStyle*)pStyle; + break; + case GDI_FONT : + delete (WinMtfFontStyle*)pStyle; + break; + + default: + DBG_ERROR( "unsupported style deleted" ); + break; + } + pStyle = NULL; + } + }; + + ~GDIObj() + { + Delete(); + } +}; + +// ----------------------------------------------------------------------------- + +class WinMtfOutput +{ + + WinMtfPathObj aPathObj; + WinMtfClipPath aClipPath; + + WinMtfLineStyle maLatestLineStyle; + WinMtfLineStyle maLineStyle; + WinMtfFillStyle maLatestFillStyle; + WinMtfFillStyle maFillStyle; + Font maLatestFont; + Font maFont; + sal_uInt32 mnLatestTextAlign; + sal_uInt32 mnTextAlign; + Color maLatestTextColor; + Color maTextColor; + Color maLatestBkColor; + Color maBkColor; + sal_uInt32 mnLatestTextLayoutMode; + sal_uInt32 mnTextLayoutMode; + sal_uInt32 mnLatestBkMode; + sal_uInt32 mnBkMode; + RasterOp meLatestRasterOp; + RasterOp meRasterOp; + + std::vector< GDIObj* > vGDIObj; + + Point maActPos; + + sal_uInt32 mnRop; + sal_Bool mbNopMode; + sal_Bool mbFillStyleSelected; + + std::vector< SaveStructPtr > vSaveStack; + + sal_uInt32 mnGfxMode; + sal_uInt32 mnMapMode; + XForm maXForm; + sal_Int32 mnDevOrgX, mnDevOrgY; + sal_Int32 mnDevWidth, mnDevHeight; + sal_Int32 mnWinOrgX, mnWinOrgY; // aktuelles Window-Origin + sal_Int32 mnWinExtX, mnWinExtY; // aktuelles Window-Extent + + sal_Int32 mnPixX, mnPixY; // Reference Device in pixel + sal_Int32 mnMillX, mnMillY; // Reference Device in Mill + Rectangle mrclFrame; // rectangle in logical units 1/100th mm + Rectangle mrclBounds; + + GDIMetaFile* mpGDIMetaFile; + + void UpdateLineStyle(); + void UpdateFillStyle(); + + Point ImplMap( const Point& rPt ); + Size ImplMap( const Size& rSz ); + Rectangle ImplMap( const Rectangle& rRectangle ); + void ImplMap( Font& rFont ); + Polygon& ImplMap( Polygon& rPolygon ); + PolyPolygon& ImplMap( PolyPolygon& rPolyPolygon ); + void ImplResizeObjectArry( UINT32 nNewEntry ); + void ImplSetNonPersistentLineColorTransparenz(); + void ImplDrawClippedPolyPolygon( const PolyPolygon& rPolyPoly ); + void ImplDrawBitmap( const Point& rPos, const Size& rSize, const BitmapEx rBitmap ); + + public: + + void SetDevOrg( const Point& rPoint ); + void SetDevOrgOffset( INT32 nXAdd, INT32 nYAdd ); + void SetDevExt( const Size& rSize ); + void ScaleDevExt( double fX, double fY ); + + void SetWinOrg( const Point& rPoint ); + void SetWinOrgOffset( INT32 nX, INT32 nY ); + void SetWinExt( const Size& rSize ); + void ScaleWinExt( double fX, double fY ); + + void SetrclBounds( const Rectangle& rRect ); + void SetrclFrame( const Rectangle& rRect ); + void SetRefPix( const Size& rSize ); + void SetRefMill( const Size& rSize ); + + sal_uInt32 GetMapMode() const { return mnMapMode; }; + void SetMapMode( sal_uInt32 mnMapMode ); + void SetWorldTransform( const XForm& rXForm ); + void ModifyWorldTransform( const XForm& rXForm, UINT32 nMode ); + + void Push(); + void Pop(); + + UINT32 SetRasterOp( UINT32 nRasterOp ); + void StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill ); + + void SetGfxMode( sal_Int32 nGfxMode ){ mnGfxMode = nGfxMode; }; + sal_Int32 GetGfxMode() const { return mnGfxMode; }; + void SetBkMode( UINT32 nMode ); + void SetBkColor( const Color& rColor ); + void SetTextColor( const Color& rColor ); + void SetTextAlign( UINT32 nAlign ); + void CreateObject( GDIObjectType, void* pStyle = NULL ); + void CreateObject( INT32 nIndex, GDIObjectType, void* pStyle = NULL ); + void DeleteObject( INT32 nIndex ); + void SelectObject( INT32 nIndex ); + CharSet GetCharSet(){ return maFont.GetCharSet(); }; + void SetFont( const Font& rFont ); + const Font& GetFont() const; + void SetTextLayoutMode( const sal_uInt32 nLayoutMode ); + sal_uInt32 GetTextLayoutMode() const; + + void ClearPath(){ aPathObj.Init(); }; + void ClosePath(){ aPathObj.ClosePath(); }; + const PolyPolygon& GetPathObj(){ return aPathObj; }; + + void MoveTo( const Point& rPoint, sal_Bool bRecordPath = sal_False ); + void LineTo( const Point& rPoint, sal_Bool bRecordPath = sal_False ); + void DrawPixel( const Point& rSource, const Color& rColor ); + void DrawLine( const Point& rSource, const Point& rDest ); + void DrawRect( const Rectangle& rRect, BOOL bEdge = TRUE ); + void DrawRoundRect( const Rectangle& rRect, const Size& rSize ); + void DrawEllipse( const Rectangle& rRect ); + void DrawArc( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle, BOOL bDrawTo = FALSE ); + void DrawPie( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle ); + void DrawChord( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle ); + void DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath = sal_False ); + void DrawPolyPolygon( PolyPolygon& rPolyPolygon, sal_Bool bRecordPath = sal_False ); + void DrawPolyLine( Polygon& rPolygon, sal_Bool bDrawTo = sal_False, sal_Bool bRecordPath = sal_False ); + void DrawPolyBezier( Polygon& rPolygin, sal_Bool bDrawTo = sal_False, sal_Bool bRecordPath = sal_False ); + void DrawText( Point& rPosition, String& rString, sal_Int32* pDXArry = NULL, sal_Bool bRecordPath = sal_False, + sal_Int32 nGraphicsMode = GM_COMPATIBLE ); + void ResolveBitmapActions( List& rSaveList ); + + void IntersectClipRect( const Rectangle& rRect ); + void ExcludeClipRect( const Rectangle& rRect ); + void MoveClipRegion( const Size& rSize ); + void SetClipPath( const PolyPolygon& rPolyPoly, sal_Int32 nClippingMode, sal_Bool bIsMapped ); + void UpdateClipRegion(); + void AddFromGDIMetaFile( GDIMetaFile& rGDIMetaFile ); + + WinMtfOutput( GDIMetaFile& rGDIMetaFile ); + virtual ~WinMtfOutput(); +}; + +// ----------------------------------------------------------------------------- + +class WinMtf +{ + protected: + + WinMtfOutput* pOut; // + SvStream* pWMF; // Die einzulesende WMF/EMF-Datei + + UINT32 nStartPos, nEndPos; + List aBmpSaveList; + + FilterConfigItem* pFilterConfigItem; + + com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator; + + // Sorgt dafuer, das aSampledBrush der aktuelle Brush des GDIMetaFiles ist. + + Color ReadColor(); + void Callback( USHORT nPercent ); + + WinMtf( WinMtfOutput* pOut, SvStream& rStreamWMF, FilterConfigItem* pConfigItem = NULL ); + ~WinMtf(); + + public: + +}; + +//============================ EMFReader ================================== + +class EnhWMFReader : public WinMtf +{ + sal_Bool bRecordPath; + sal_Int32 nRecordCount; + + BOOL ReadHeader(); + Rectangle ReadRectangle( INT32, INT32, INT32, INT32 ); // Liesst und konvertiert ein Rechteck + void ImplExtTextOut( BOOL bWideCharakter ); + +public: + EnhWMFReader( SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = NULL ) + : WinMtf( new WinMtfOutput( rGDIMetaFile ), rStreamWMF, pConfigItem ), bRecordPath( sal_False ) {}; + ~EnhWMFReader(); + + BOOL ReadEnhWMF(); +}; + +//============================ WMFReader ================================== + +class WMFReader : public WinMtf +{ +private: + + VirtualDevice aVDev; // just for the purpose of "IsFontAvailable" + UINT16 nUnitsPerInch; + sal_uInt32 nRecSize; + + // embedded EMF data + SvMemoryStream* pEMFStream; + + // total number of comment records containing EMF data + sal_uInt32 nEMFRecCount; + + // number of EMF records read + sal_uInt32 nEMFRec; + + // total size of embedded EMF data + sal_uInt32 nEMFSize; + + sal_uInt32 nSkipActions; + sal_uInt32 nCurrentAction; + sal_uInt32 nUnicodeEscapeAction; + + // Liesst den Kopf der WMF-Datei + BOOL ReadHeader(); + + // Liesst die Parameter des Rocords mit der Funktionsnummer nFunction. + void ReadRecordParams( USHORT nFunction ); + + Point ReadPoint(); // Liesst und konvertiert einen Punkt (erst X dann Y) + Point ReadYX(); // Liesst und konvertiert einen Punkt (erst Y dann X) + Rectangle ReadRectangle(); // Liesst und konvertiert ein Rechteck + Size ReadYXExt(); + sal_Bool GetPlaceableBound( Rectangle& rSize, SvStream* pStrm ); + +public: + + WMFReader( SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = NULL ) + : WinMtf( new WinMtfOutput( rGDIMetaFile ), rStreamWMF, pConfigItem ) {}; + + ~WMFReader(); + + // Liesst aus dem Stream eine WMF-Datei und fuellt das GDIMetaFile + void ReadWMF(); +}; + +#endif + + diff --git a/svtools/source/filter/wmf/winwmf.cxx b/svtools/source/filter/wmf/winwmf.cxx new file mode 100644 index 000000000000..cea1ab490b04 --- /dev/null +++ b/svtools/source/filter/wmf/winwmf.cxx @@ -0,0 +1,1431 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#include "winmtf.hxx" +#include +#include +#include +#include + +//====================== MS-Windows-defines =============================== + +#define W_META_SETBKCOLOR 0x0201 +#define W_META_SETBKMODE 0x0102 +#define W_META_SETMAPMODE 0x0103 +#define W_META_SETROP2 0x0104 +#define W_META_SETRELABS 0x0105 +#define W_META_SETPOLYFILLMODE 0x0106 +#define W_META_SETSTRETCHBLTMODE 0x0107 +#define W_META_SETTEXTCHAREXTRA 0x0108 +#define W_META_SETTEXTCOLOR 0x0209 +#define W_META_SETTEXTJUSTIFICATION 0x020A +#define W_META_SETWINDOWORG 0x020B +#define W_META_SETWINDOWEXT 0x020C +#define W_META_SETVIEWPORTORG 0x020D +#define W_META_SETVIEWPORTEXT 0x020E +#define W_META_OFFSETWINDOWORG 0x020F +#define W_META_SCALEWINDOWEXT 0x0410 +#define W_META_OFFSETVIEWPORTORG 0x0211 +#define W_META_SCALEVIEWPORTEXT 0x0412 +#define W_META_LINETO 0x0213 +#define W_META_MOVETO 0x0214 +#define W_META_EXCLUDECLIPRECT 0x0415 +#define W_META_INTERSECTCLIPRECT 0x0416 +#define W_META_ARC 0x0817 +#define W_META_ELLIPSE 0x0418 +#define W_META_FLOODFILL 0x0419 +#define W_META_PIE 0x081A +#define W_META_RECTANGLE 0x041B +#define W_META_ROUNDRECT 0x061C +#define W_META_PATBLT 0x061D +#define W_META_SAVEDC 0x001E +#define W_META_SETPIXEL 0x041F +#define W_META_OFFSETCLIPRGN 0x0220 +#define W_META_TEXTOUT 0x0521 +#define W_META_BITBLT 0x0922 +#define W_META_STRETCHBLT 0x0B23 +#define W_META_POLYGON 0x0324 +#define W_META_POLYLINE 0x0325 +#define W_META_ESCAPE 0x0626 +#define W_META_RESTOREDC 0x0127 +#define W_META_FILLREGION 0x0228 +#define W_META_FRAMEREGION 0x0429 +#define W_META_INVERTREGION 0x012A +#define W_META_PAINTREGION 0x012B +#define W_META_SELECTCLIPREGION 0x012C +#define W_META_SELECTOBJECT 0x012D +#define W_META_SETTEXTALIGN 0x012E +#define W_META_DRAWTEXT 0x062F +#define W_META_CHORD 0x0830 +#define W_META_SETMAPPERFLAGS 0x0231 +#define W_META_EXTTEXTOUT 0x0a32 +#define W_META_SETDIBTODEV 0x0d33 +#define W_META_SELECTPALETTE 0x0234 +#define W_META_REALIZEPALETTE 0x0035 +#define W_META_ANIMATEPALETTE 0x0436 +#define W_META_SETPALENTRIES 0x0037 +#define W_META_POLYPOLYGON 0x0538 +#define W_META_RESIZEPALETTE 0x0139 +#define W_META_DIBBITBLT 0x0940 +#define W_META_DIBSTRETCHBLT 0x0b41 +#define W_META_DIBCREATEPATTERNBRUSH 0x0142 +#define W_META_STRETCHDIB 0x0f43 +#define W_META_EXTFLOODFILL 0x0548 +#define W_META_RESETDC 0x014C +#define W_META_STARTDOC 0x014D +#define W_META_STARTPAGE 0x004F +#define W_META_ENDPAGE 0x0050 +#define W_META_ABORTDOC 0x0052 +#define W_META_ENDDOC 0x005E +#define W_META_DELETEOBJECT 0x01f0 +#define W_META_CREATEPALETTE 0x00f7 +#define W_META_CREATEBRUSH 0x00F8 +#define W_META_CREATEPATTERNBRUSH 0x01F9 +#define W_META_CREATEPENINDIRECT 0x02FA +#define W_META_CREATEFONTINDIRECT 0x02FB +#define W_META_CREATEBRUSHINDIRECT 0x02FC +#define W_META_CREATEBITMAPINDIRECT 0x02FD +#define W_META_CREATEBITMAP 0x06FE +#define W_META_CREATEREGION 0x06FF + +//=================== Methoden von WMFReader ============================== + +inline Point WMFReader::ReadPoint() +{ + short nX, nY; + *pWMF >> nX >> nY; + return Point( nX, nY ); +} + +// ------------------------------------------------------------------------ + +inline Point WMFReader::ReadYX() +{ + short nX, nY; + *pWMF >> nY >> nX; + return Point( nX, nY ); +} + +// ------------------------------------------------------------------------ + +Rectangle WMFReader::ReadRectangle() +{ + Point aBR, aTL; + aBR = ReadYX(); + aTL = ReadYX(); + aBR.X()--; + aBR.Y()--; + return Rectangle( aTL, aBR ); +} + +// ------------------------------------------------------------------------ + +Size WMFReader::ReadYXExt() +{ + short nW, nH; + *pWMF >> nH >> nW; + return Size( nW, nH ); +} + +// ------------------------------------------------------------------------ + +void WMFReader::ReadRecordParams( USHORT nFunc ) +{ + switch( nFunc ) + { + case W_META_SETBKCOLOR: + { + pOut->SetBkColor( ReadColor() ); + } + break; + + case W_META_SETBKMODE: + { + USHORT nDat; + *pWMF >> nDat; + pOut->SetBkMode( nDat ); + } + break; + + // !!! + case W_META_SETMAPMODE: + { + sal_Int16 nMapMode; + *pWMF >> nMapMode; + pOut->SetMapMode( nMapMode ); + } + break; + + case W_META_SETROP2: + { + UINT16 nROP2; + *pWMF >> nROP2; + pOut->SetRasterOp( nROP2 ); + } + break; + + case W_META_SETTEXTCOLOR: + { + pOut->SetTextColor( ReadColor() ); + } + break; + + case W_META_SETWINDOWORG: + { + pOut->SetWinOrg( ReadYX() ); + } + break; + + case W_META_SETWINDOWEXT: + { + short nWidth, nHeight; + *pWMF >> nHeight >> nWidth; + pOut->SetWinExt( Size( nWidth, nHeight ) ); + } + break; + + case W_META_OFFSETWINDOWORG: + { + short nXAdd, nYAdd; + *pWMF >> nYAdd >> nXAdd; + pOut->SetWinOrgOffset( nXAdd, nYAdd ); + } + break; + + case W_META_SCALEWINDOWEXT: + { + short nXNum, nXDenom, nYNum, nYDenom; + *pWMF >> nYDenom >> nYNum >> nXDenom >> nXNum; + pOut->ScaleWinExt( (double)nXNum / nXDenom, (double)nYNum / nYDenom ); + } + break; + + case W_META_SETVIEWPORTORG: + case W_META_SETVIEWPORTEXT: + break; + + case W_META_OFFSETVIEWPORTORG: + { + short nXAdd, nYAdd; + *pWMF >> nYAdd >> nXAdd; + pOut->SetDevOrgOffset( nXAdd, nYAdd ); + } + break; + + case W_META_SCALEVIEWPORTEXT: + { + short nXNum, nXDenom, nYNum, nYDenom; + *pWMF >> nYDenom >> nYNum >> nXDenom >> nXNum; + pOut->ScaleDevExt( (double)nXNum / nXDenom, (double)nYNum / nYDenom ); + } + break; + + case W_META_LINETO: + { + pOut->LineTo( ReadYX() ); + } + break; + + case W_META_MOVETO: + { + pOut->MoveTo( ReadYX() ); + } + break; + + case W_META_INTERSECTCLIPRECT: + { + pOut->IntersectClipRect( ReadRectangle() ); + } + break; + + case W_META_RECTANGLE: + { + pOut->DrawRect( ReadRectangle() ); + } + break; + + case W_META_ROUNDRECT: + { + Size aSize( ReadYXExt() ); + pOut->DrawRoundRect( ReadRectangle(), Size( aSize.Width() / 2, aSize.Height() / 2 ) ); + } + break; + + case W_META_ELLIPSE: + { + pOut->DrawEllipse( ReadRectangle() ); + } + break; + + case W_META_ARC: + { + Point aEnd( ReadYX() ); + Point aStart( ReadYX() ); + Rectangle aRect( ReadRectangle() ); + aRect.Justify(); + pOut->DrawArc( aRect, aStart, aEnd ); + } + break; + + case W_META_PIE: + { + Point aEnd( ReadYX() ); + Point aStart( ReadYX() ); + Rectangle aRect( ReadRectangle() ); + aRect.Justify(); + + // #i73608# OutputDevice deviates from WMF + // semantics. start==end means full ellipse here. + if( aStart == aEnd ) + pOut->DrawEllipse( aRect ); + else + pOut->DrawPie( aRect, aStart, aEnd ); + } + break; + + case W_META_CHORD: + { + Point aEnd( ReadYX() ); + Point aStart( ReadYX() ); + Rectangle aRect( ReadRectangle() ); + aRect.Justify(); + pOut->DrawChord( aRect, aStart, aEnd ); + } + break; + + case W_META_POLYGON: + { + USHORT i,nPoints; + *pWMF >> nPoints; + Polygon aPoly( nPoints ); + for( i = 0; i < nPoints; i++ ) + aPoly[ i ] = ReadPoint(); + pOut->DrawPolygon( aPoly ); + } + break; + + case W_META_POLYPOLYGON: + { + USHORT i, nPoly, nPoints; + USHORT* pnPoints; + Point* pPtAry; + // Anzahl der Polygone: + *pWMF >> nPoly; + // Anzahl der Punkte eines jeden Polygons holen, Gesammtzahl der Punkte ermitteln: + pnPoints = new USHORT[ nPoly ]; + nPoints = 0; + for( i = 0; i < nPoly; i++ ) + { + *pWMF >> pnPoints[i]; + nPoints = nPoints + pnPoints[i]; + } + // Polygonpunkte holen: + pPtAry = (Point*) new char[ nPoints * sizeof(Point) ]; + for ( i = 0; i < nPoints; i++ ) + pPtAry[ i ] = ReadPoint(); + // PolyPolygon Actions erzeugen + PolyPolygon aPolyPoly( nPoly, pnPoints, pPtAry ); + pOut->DrawPolyPolygon( aPolyPoly ); + delete[] (char*) pPtAry; + delete[] pnPoints; + } + break; + + case W_META_POLYLINE: + { + USHORT i,nPoints; + *pWMF >> nPoints; + Polygon aPoly( nPoints ); + for( i = 0; i < nPoints; i++ ) + aPoly[ i ] = ReadPoint(); + pOut->DrawPolyLine( aPoly ); + } + break; + + case W_META_SAVEDC: + { + pOut->Push(); + } + break; + + case W_META_RESTOREDC: + { + pOut->Pop(); + } + break; + + case W_META_SETPIXEL: + { + const Color aColor = ReadColor(); + pOut->DrawPixel( ReadYX(), aColor ); + } + break; + + case W_META_OFFSETCLIPRGN: + { + pOut->MoveClipRegion( ReadYXExt() ); + } + break; + + case W_META_TEXTOUT: + { + USHORT nLength; + *pWMF >> nLength; + if ( nLength ) + { + char* pChar = new char[ ( nLength + 1 ) &~ 1 ]; + pWMF->Read( pChar, ( nLength + 1 ) &~ 1 ); + String aText( pChar, nLength, pOut->GetCharSet() ); + delete[] pChar; + Point aPosition( ReadYX() ); + pOut->DrawText( aPosition, aText ); + } + } + break; + + case W_META_EXTTEXTOUT: + { + sal_Int16 nDx, nDxTmp; + sal_uInt16 i, nLen, nOptions; + sal_Int32 nRecordPos, nRecordSize, nOriginalTextLen, nNewTextLen; + Point aPosition; + Rectangle aRect; + sal_Int32* pDXAry = NULL; + + pWMF->SeekRel(-6); + nRecordPos = pWMF->Tell(); + *pWMF >> nRecordSize; + pWMF->SeekRel(2); + aPosition = ReadYX(); + *pWMF >> nLen >> nOptions; + + sal_Int32 nTextLayoutMode = TEXT_LAYOUT_DEFAULT; + if ( nOptions & ETO_RTLREADING ) + nTextLayoutMode = TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT; + pOut->SetTextLayoutMode( nTextLayoutMode ); + DBG_ASSERT( ( nOptions & ( ETO_PDY | ETO_GLYPH_INDEX ) ) == 0, "SJ: ETO_PDY || ETO_GLYPH_INDEX in WMF" ); + + // Nur wenn der Text auch Zeichen enthaelt, macht die Ausgabe Sinn + if( nLen ) + { + nOriginalTextLen = nLen; + if( nOptions & ETO_CLIPPED ) + { + const Point aPt1( ReadPoint() ); + const Point aPt2( ReadPoint() ); + aRect = Rectangle( aPt1, aPt2 ); + } + char* pChar = new char[ ( nOriginalTextLen + 1 ) &~ 1 ]; + pWMF->Read( pChar, ( nOriginalTextLen + 1 ) &~ 1 ); + String aText( pChar, (sal_uInt16)nOriginalTextLen, pOut->GetCharSet() );// after this conversion the text may contain + nNewTextLen = aText.Len(); // less character (japanese version), so the + delete[] pChar; // dxAry will not fit + + if ( nNewTextLen ) + { + sal_uInt32 nMaxStreamPos = nRecordPos + ( nRecordSize << 1 ); + sal_Int32 nDxArySize = nMaxStreamPos - pWMF->Tell(); + sal_Int32 nDxAryEntries = nDxArySize >> 1; + sal_Bool bUseDXAry = FALSE; + + if ( ( ( nDxAryEntries % nOriginalTextLen ) == 0 ) && ( nNewTextLen <= nOriginalTextLen ) ) + { + pDXAry = new sal_Int32[ nNewTextLen ]; + for ( i = 0; i < nNewTextLen; i++ ) + { + if ( pWMF->Tell() >= nMaxStreamPos ) + break; + *pWMF >> nDx; + if ( nNewTextLen != nOriginalTextLen ) + { + ByteString aTmp( aText.GetChar( i ), pOut->GetCharSet() ); + if ( aTmp.Len() > 1 ) + { + sal_Int32 nDxCount = aTmp.Len() - 1; + if ( ( ( nDxCount * 2 ) + pWMF->Tell() ) > nMaxStreamPos ) + break; + while ( nDxCount-- ) + { + *pWMF >> nDxTmp; + nDx = nDx + nDxTmp; + } + } + } + pDXAry[ i ] = nDx; + } + if ( i == nNewTextLen ) + bUseDXAry = TRUE; + } + if ( pDXAry && bUseDXAry ) + pOut->DrawText( aPosition, aText, pDXAry ); + else + pOut->DrawText( aPosition, aText ); + } + } + delete[] pDXAry; + + } + break; + + case W_META_SELECTOBJECT: + { + INT16 nObjIndex; + *pWMF >> nObjIndex; + pOut->SelectObject( nObjIndex ); + } + break; + + case W_META_SETTEXTALIGN: + { + UINT16 nAlign; + *pWMF >> nAlign; + pOut->SetTextAlign( nAlign ); + } + break; + + case W_META_BITBLT: + { + // 0-3 : nWinROP #93454# + // 4-5 : y offset of source bitmap + // 6-7 : x offset of source bitmap + // 8-9 : used height of source bitmap + // 10-11 : used width of source bitmap + // 12-13 : destination position y (in pixel) + // 14-15 : destination position x (in pixel) + // 16-17 : dont know + // 18-19 : Width Bitmap in Pixel + // 20-21 : Height Bitmap in Pixel + // 22-23 : bytes per scanline + // 24 : planes + // 25 : bitcount + + sal_Int32 nWinROP; + sal_uInt16 nSx, nSy, nSxe, nSye, nDontKnow, nWidth, nHeight, nBytesPerScan; + sal_uInt8 nPlanes, nBitCount; + + *pWMF >> nWinROP + >> nSy >> nSx >> nSye >> nSxe; + Point aPoint( ReadYX() ); + *pWMF >> nDontKnow >> nWidth >> nHeight >> nBytesPerScan >> nPlanes >> nBitCount; + + if ( nWidth && nHeight && ( nPlanes == 1 ) && ( nBitCount == 1 ) ) + { + Bitmap aBmp( Size( nWidth, nHeight ), nBitCount ); + BitmapWriteAccess* pAcc; + pAcc = aBmp.AcquireWriteAccess(); + if ( pAcc ) + { + sal_uInt16 y, x, scan; + sal_Int8 i, nEightPixels; + for ( y = 0; y < nHeight; y++ ) + { + x = 0; + for ( scan = 0; scan < nBytesPerScan; scan++ ) + { + *pWMF >> nEightPixels; + for ( i = 7; i >= 0; i-- ) + { + if ( x < nWidth ) + { + pAcc->SetPixel( y, x, (nEightPixels>>i)&1 ); + } + x++; + } + } + } + aBmp.ReleaseAccess( pAcc ); + if ( nSye && nSxe && + ( ( nSx + nSxe ) <= aBmp.GetSizePixel().Width() ) && + ( ( nSy + nSye <= aBmp.GetSizePixel().Height() ) ) ) + { + Rectangle aCropRect( Point( nSx, nSy ), Size( nSxe, nSye ) ); + aBmp.Crop( aCropRect ); + } + Rectangle aDestRect( aPoint, Size( nSxe, nSye ) ); + aBmpSaveList.Insert( new BSaveStruct( aBmp, aDestRect, nWinROP ), LIST_APPEND ); + } + } + } + break; + + case W_META_STRETCHBLT: + case W_META_DIBBITBLT: + case W_META_DIBSTRETCHBLT: + case W_META_STRETCHDIB: + { + sal_Int32 nWinROP; + sal_uInt16 nSx, nSy, nSxe, nSye, nUsage; + Bitmap aBmp; + + *pWMF >> nWinROP; + + if( nFunc == W_META_STRETCHDIB ) + *pWMF >> nUsage; + + // nSye and nSxe is the number of pixels that has to been used + if( nFunc == W_META_STRETCHDIB || nFunc == W_META_STRETCHBLT || nFunc == W_META_DIBSTRETCHBLT ) + *pWMF >> nSye >> nSxe; + else + nSye = nSxe = 0; // set this to zero as indicator not to scale the bitmap later + + // nSy and nx is the offset of the first pixel + *pWMF >> nSy >> nSx; + + if( nFunc == W_META_STRETCHDIB || nFunc == W_META_DIBBITBLT || nFunc == W_META_DIBSTRETCHBLT ) + { + if ( nWinROP == PATCOPY ) + *pWMF >> nUsage; // i don't know anything of this parameter, so its called nUsage + // pOut->DrawRect( Rectangle( ReadYX(), aDestSize ), FALSE ); + + Size aDestSize( ReadYXExt() ); + if ( aDestSize.Width() && aDestSize.Height() ) // #92623# do not try to read buggy bitmaps + { + Rectangle aDestRect( ReadYX(), aDestSize ); + if ( nWinROP != PATCOPY ) + aBmp.Read( *pWMF, FALSE ); + + // test if it is sensible to crop + if ( nSye && nSxe && + ( ( nSx + nSxe ) <= aBmp.GetSizePixel().Width() ) && + ( ( nSy + nSye <= aBmp.GetSizePixel().Height() ) ) ) + { + Rectangle aCropRect( Point( nSx, nSy ), Size( nSxe, nSye ) ); + aBmp.Crop( aCropRect ); + } + aBmpSaveList.Insert( new BSaveStruct( aBmp, aDestRect, nWinROP ), LIST_APPEND ); + } + } + } + break; + + case W_META_DIBCREATEPATTERNBRUSH: + { + Bitmap aBmp; + BitmapReadAccess* pBmp; + UINT32 nRed = 0, nGreen = 0, nBlue = 0, nCount = 1; + UINT16 nFunction; + + *pWMF >> nFunction >> nFunction; + + aBmp.Read( *pWMF, FALSE ); + pBmp = aBmp.AcquireReadAccess(); + if ( pBmp ) + { + for ( INT32 y = 0; y < pBmp->Height(); y++ ) + { + for ( INT32 x = 0; x < pBmp->Width(); x++ ) + { + const BitmapColor aColor( pBmp->GetColor( y, x ) ); + + nRed += aColor.GetRed(); + nGreen += aColor.GetGreen(); + nBlue += aColor.GetBlue(); + } + } + nCount = pBmp->Height() * pBmp->Width(); + if ( !nCount ) + nCount++; + aBmp.ReleaseAccess( pBmp ); + } + Color aColor( (BYTE)( nRed / nCount ), (BYTE)( nGreen / nCount ), (BYTE)( nBlue / nCount ) ); + pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( aColor, FALSE ) ); + } + break; + + case W_META_DELETEOBJECT: + { + INT16 nIndex; + *pWMF >> nIndex; + pOut->DeleteObject( nIndex ); + } + break; + + case W_META_CREATEPALETTE: + { + pOut->CreateObject( GDI_DUMMY ); + } + break; + + case W_META_CREATEBRUSH: + { + pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( Color( COL_WHITE ), FALSE ) ); + } + break; + + case W_META_CREATEPATTERNBRUSH: + { + pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( Color( COL_WHITE ), FALSE ) ); + } + break; + + case W_META_CREATEPENINDIRECT: + { + LineInfo aLineInfo; + USHORT nStyle, nWidth, nHeight; + + *pWMF >> nStyle >> nWidth >> nHeight; + + if ( nWidth ) + aLineInfo.SetWidth( nWidth ); + + BOOL bTransparent = FALSE; + UINT16 nDashCount = 0; + UINT16 nDotCount = 0; + switch( nStyle ) + { + case PS_DASHDOTDOT : + nDotCount++; + case PS_DASHDOT : + nDashCount++; + case PS_DOT : + nDotCount++; + break; + case PS_DASH : + nDashCount++; + break; + case PS_NULL : + bTransparent = TRUE; + aLineInfo.SetStyle( LINE_NONE ); + break; + default : + case PS_INSIDEFRAME : + case PS_SOLID : + aLineInfo.SetStyle( LINE_SOLID ); + } + if ( nDashCount | nDotCount ) + { + aLineInfo.SetStyle( LINE_DASH ); + aLineInfo.SetDashCount( nDashCount ); + aLineInfo.SetDotCount( nDotCount ); + } + pOut->CreateObject( GDI_PEN, new WinMtfLineStyle( ReadColor(), aLineInfo, bTransparent ) ); + } + break; + + case W_META_CREATEBRUSHINDIRECT: + { + USHORT nStyle; + *pWMF >> nStyle; + pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? TRUE : FALSE ) ); + } + break; + + case W_META_CREATEFONTINDIRECT: + { + Size aFontSize; + char lfFaceName[ LF_FACESIZE ]; + INT16 lfEscapement, lfOrientation, lfWeight; // ( ehemals USHORT ) + + LOGFONTW aLogFont; + aFontSize = ReadYXExt(); + *pWMF >> lfEscapement >> lfOrientation >> lfWeight + >> aLogFont.lfItalic >> aLogFont.lfUnderline >> aLogFont.lfStrikeOut >> aLogFont.lfCharSet >> aLogFont.lfOutPrecision + >> aLogFont.lfClipPrecision >> aLogFont.lfQuality >> aLogFont.lfPitchAndFamily; + pWMF->Read( lfFaceName, LF_FACESIZE ); + aLogFont.lfWidth = aFontSize.Width(); + aLogFont.lfHeight = aFontSize.Height(); + aLogFont.lfEscapement = lfEscapement; + aLogFont.lfOrientation = lfOrientation; + aLogFont.lfWeight = lfWeight; + + CharSet eCharSet; + if ( ( aLogFont.lfCharSet == OEM_CHARSET ) || ( aLogFont.lfCharSet == DEFAULT_CHARSET ) ) + eCharSet = gsl_getSystemTextEncoding(); + else + eCharSet = rtl_getTextEncodingFromWindowsCharset( aLogFont.lfCharSet ); + if ( eCharSet == RTL_TEXTENCODING_DONTKNOW ) + eCharSet = gsl_getSystemTextEncoding(); + if ( eCharSet == RTL_TEXTENCODING_SYMBOL ) + eCharSet = RTL_TEXTENCODING_MS_1252; + aLogFont.alfFaceName = UniString( lfFaceName, eCharSet ); + + pOut->CreateObject( GDI_FONT, new WinMtfFontStyle( aLogFont ) ); + } + break; + + case W_META_CREATEBITMAPINDIRECT: + { + pOut->CreateObject( GDI_DUMMY ); + } + break; + + case W_META_CREATEBITMAP: + { + pOut->CreateObject( GDI_DUMMY ); + } + break; + + case W_META_CREATEREGION: + { + pOut->CreateObject( GDI_DUMMY ); + } + break; + + case W_META_EXCLUDECLIPRECT : + { + pOut->ExcludeClipRect( ReadRectangle() ); + } + break; + + case W_META_PATBLT: + { + UINT32 nROP, nOldROP; + *pWMF >> nROP; + Size aSize = ReadYXExt(); + nOldROP = pOut->SetRasterOp( nROP ); + pOut->DrawRect( Rectangle( ReadYX(), aSize ), FALSE ); + pOut->SetRasterOp( nOldROP ); + } + break; + + case W_META_SELECTCLIPREGION: + { + sal_Int16 nObjIndex; + *pWMF >> nObjIndex; + if ( !nObjIndex ) + { + PolyPolygon aEmptyPolyPoly; + pOut->SetClipPath( aEmptyPolyPoly, RGN_COPY, sal_True ); + } + } + break; + + case W_META_ESCAPE : + { + // nRecSize has been checked previously to be greater than 3 + sal_uInt64 nMetaRecSize = static_cast< sal_uInt64 >( nRecSize - 2 ) * 2; + sal_uInt64 nMetaRecEndPos = pWMF->Tell() + nMetaRecSize; + + // taking care that nRecSize does not exceed the maximal stream position + if ( nMetaRecEndPos > nEndPos ) + { + pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR ); + break; + } + if ( nRecSize >= 4 ) // minimal escape lenght + { + sal_uInt16 nMode, nLen; + *pWMF >> nMode + >> nLen; + if ( ( nMode == W_MFCOMMENT ) && ( nLen >= 4 ) ) + { + sal_uInt32 nNewMagic; // we have to read int32 for + *pWMF >> nNewMagic; // META_ESCAPE_ENHANCED_METAFILE CommentIdentifier + + if( nNewMagic == 0x2c2a4f4f && nLen >= 14 ) + { + sal_uInt16 nMagic2; + *pWMF >> nMagic2; + if( nMagic2 == 0x0a ) // 2nd half of magic + { // continue with private escape + sal_uInt32 nCheck, nEsc; + *pWMF >> nCheck + >> nEsc; + + sal_uInt32 nEscLen = nLen - 14; + if ( nEscLen <= ( nRecSize * 2 ) ) + { +#ifdef OSL_BIGENDIAN + sal_uInt32 nTmp = SWAPLONG( nEsc ); + sal_uInt32 nCheckSum = rtl_crc32( 0, &nTmp, 4 ); +#else + sal_uInt32 nCheckSum = rtl_crc32( 0, &nEsc, 4 ); +#endif + sal_Int8* pData = NULL; + + if ( ( static_cast< sal_uInt64 >( nEscLen ) + pWMF->Tell() ) > nMetaRecEndPos ) + { + pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR ); + break; + } + if ( nEscLen > 0 ) + { + pData = new sal_Int8[ nEscLen ]; + pWMF->Read( pData, nEscLen ); + nCheckSum = rtl_crc32( nCheckSum, pData, nEscLen ); + } + if ( nCheck == nCheckSum ) + { + switch( nEsc ) + { + case PRIVATE_ESCAPE_UNICODE : + { // we will use text instead of polygons only if we have the correct font + if ( aVDev.IsFontAvailable( pOut->GetFont().GetName() ) ) + { + Point aPt; + String aString; + sal_uInt32 i, nStringLen, nDXCount; + sal_Int32* pDXAry = NULL; + SvMemoryStream aMemoryStream( nEscLen ); + aMemoryStream.Write( pData, nEscLen ); + aMemoryStream.Seek( STREAM_SEEK_TO_BEGIN ); + aMemoryStream >> aPt.X() + >> aPt.Y() + >> nStringLen; + + if ( ( static_cast< sal_uInt64 >( nStringLen ) * sizeof( sal_Unicode ) ) < ( nEscLen - aMemoryStream.Tell() ) ) + { + sal_Unicode* pBuf = aString.AllocBuffer( (xub_StrLen)nStringLen ); + for ( i = 0; i < nStringLen; i++ ) + aMemoryStream >> pBuf[ i ]; + aMemoryStream >> nDXCount; + if ( ( static_cast< sal_uInt64 >( nDXCount ) * sizeof( sal_Int32 ) ) >= ( nEscLen - aMemoryStream.Tell() ) ) + nDXCount = 0; + if ( nDXCount ) + pDXAry = new sal_Int32[ nDXCount ]; + for ( i = 0; i < nDXCount; i++ ) + aMemoryStream >> pDXAry[ i ]; + aMemoryStream >> nSkipActions; + pOut->DrawText( aPt, aString, pDXAry ); + delete[] pDXAry; + } + } + } + break; + } + } + delete[] pData; + } + } + } + else if ( (nNewMagic == static_cast< sal_uInt32 >(0x43464D57)) && (nLen >= 34) && ( (sal_Int32)(nLen + 10) <= (sal_Int32)(nRecSize * 2) )) + { + sal_uInt32 nComType, nVersion, nFlags, nComRecCount, + nCurRecSize, nRemainingSize, nEMFTotalSize; + sal_uInt16 nCheck; + + *pWMF >> nComType >> nVersion >> nCheck >> nFlags + >> nComRecCount >> nCurRecSize + >> nRemainingSize >> nEMFTotalSize; // the nRemainingSize is not mentioned in MSDN documentation + // but it seems to be required to read in data produced by OLE + + if( nComType == 0x01 && nVersion == 0x10000 && nComRecCount ) + { + if( !nEMFRec ) + { // first EMF comment + nEMFRecCount = nComRecCount; + nEMFSize = nEMFTotalSize; + pEMFStream = new SvMemoryStream( nEMFSize ); + } + else if( ( nEMFRecCount != nComRecCount ) || ( nEMFSize != nEMFTotalSize ) ) // add additional checks here + { + // total records should be the same as in previous comments + nEMFRecCount = 0xFFFFFFFF; + delete pEMFStream; + pEMFStream = NULL; + } + nEMFRec++; + + if( pEMFStream && nCurRecSize + 34 > nLen ) + { + nEMFRecCount = 0xFFFFFFFF; + delete pEMFStream; + pEMFStream = NULL; + } + + if( pEMFStream ) + { + sal_Int8* pBuf = new sal_Int8[ nCurRecSize ]; + sal_uInt32 nCount = pWMF->Read( pBuf, nCurRecSize ); + if( nCount == nCurRecSize ) + pEMFStream->Write( pBuf, nCount ); + delete[] pBuf; + } + } + } + } + } + } + break; + + case W_META_SETRELABS: + case W_META_SETPOLYFILLMODE: + case W_META_SETSTRETCHBLTMODE: + case W_META_SETTEXTCHAREXTRA: + case W_META_SETTEXTJUSTIFICATION: + case W_META_FLOODFILL : + case W_META_FILLREGION: + case W_META_FRAMEREGION: + case W_META_INVERTREGION: + case W_META_PAINTREGION: + case W_META_DRAWTEXT: + case W_META_SETMAPPERFLAGS: + case W_META_SETDIBTODEV: + case W_META_SELECTPALETTE: + case W_META_REALIZEPALETTE: + case W_META_ANIMATEPALETTE: + case W_META_SETPALENTRIES: + case W_META_RESIZEPALETTE: + case W_META_EXTFLOODFILL: + case W_META_RESETDC: + case W_META_STARTDOC: + case W_META_STARTPAGE: + case W_META_ENDPAGE: + case W_META_ABORTDOC: + case W_META_ENDDOC: + break; + } +} + +// ------------------------------------------------------------------------ + +BOOL WMFReader::ReadHeader() +{ + Rectangle aPlaceableBound; + sal_uInt32 nl, nStrmPos = pWMF->Tell(); + + // Einlesen des METAFILEHEADER, falls vorhanden + *pWMF >> nl; + + Size aWMFSize; + if ( nl == 0x9ac6cdd7L ) + { + INT16 nVal; + + // hmf (Unused) ueberlesen wir + pWMF->SeekRel(2); + + // BoundRect + *pWMF >> nVal; aPlaceableBound.Left() = nVal; + *pWMF >> nVal; aPlaceableBound.Top() = nVal; + *pWMF >> nVal; aPlaceableBound.Right() = nVal; + *pWMF >> nVal; aPlaceableBound.Bottom() = nVal; + + // inch + *pWMF >> nUnitsPerInch; + + // reserved + pWMF->SeekRel( 4 ); + + // checksum pruefen wir lieber nicht + pWMF->SeekRel( 2 ); + } + else + { + nUnitsPerInch = 96; + pWMF->Seek( nStrmPos + 18 ); // set the streampos to the start of the the metaactions + GetPlaceableBound( aPlaceableBound, pWMF ); + pWMF->Seek( nStrmPos ); + } + + pOut->SetWinOrg( aPlaceableBound.TopLeft() ); + aWMFSize = Size( labs( aPlaceableBound.GetWidth() ), labs( aPlaceableBound.GetHeight() ) ); + pOut->SetWinExt( aWMFSize ); + + Size aDevExt( 10000, 10000 ); + if( ( labs( aWMFSize.Width() ) > 1 ) && ( labs( aWMFSize.Height() ) > 1 ) ) + { + const Fraction aFrac( 1, nUnitsPerInch ); + MapMode aWMFMap( MAP_INCH, Point(), aFrac, aFrac ); + Size aSize100( OutputDevice::LogicToLogic( aWMFSize, aWMFMap, MAP_100TH_MM ) ); + aDevExt = Size( labs( aSize100.Width() ), labs( aSize100.Height() ) ); + } + pOut->SetDevExt( aDevExt ); + + // Einlesen des METAHEADER + *pWMF >> nl; // Typ und Headergroesse + + if( nl != 0x00090001 ) + { + pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR ); + return FALSE; + } + + pWMF->SeekRel( 2 ); // Version (von Windows) + pWMF->SeekRel( 4 ); // Size (der Datei in Words) + pWMF->SeekRel( 2 ); // NoObjects (Maximale Anzahl der gleichzeitigen Objekte) + pWMF->SeekRel( 4 ); // MaxRecord (Groesse des groessten Records in Words) + pWMF->SeekRel( 2 ); // NoParameters (Unused + + return TRUE; +} + +void WMFReader::ReadWMF() +{ + USHORT nFunction; + ULONG nPos, nPercent, nLastPercent; + + nSkipActions = 0; + nCurrentAction = 0; + nUnicodeEscapeAction = 0; + + pEMFStream = NULL; + nEMFRecCount = 0; + nEMFRec = 0; + nEMFSize = 0; + + sal_Bool bEMFAvailable = sal_False; + + pOut->SetMapMode( MM_ANISOTROPIC ); + pOut->SetWinOrg( Point() ); + pOut->SetWinExt( Size( 1, 1 ) ); + pOut->SetDevExt( Size( 10000, 10000 ) ); + + nEndPos=pWMF->Seek( STREAM_SEEK_TO_END ); + pWMF->Seek( nStartPos ); + Callback( (USHORT) ( nLastPercent = 0 ) ); + + if ( ReadHeader() ) + { + + nPos = pWMF->Tell(); + + if( nEndPos - nStartPos ) + { + while( TRUE ) + { + nCurrentAction++; + nPercent = ( nPos - nStartPos ) * 100 / ( nEndPos - nStartPos ); + + if( nLastPercent + 4 <= nPercent ) + { + Callback( (USHORT) nPercent ); + nLastPercent = nPercent; + } + *pWMF >> nRecSize >> nFunction; + + if( pWMF->GetError() || ( nRecSize < 3 ) || ( nRecSize==3 && nFunction==0 ) || pWMF->IsEof() ) + { + + if( pWMF->IsEof() ) + pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR ); + + break; + } + if ( !bEMFAvailable ) + { + if( aBmpSaveList.Count() && + ( nFunction != W_META_STRETCHDIB ) && + ( nFunction != W_META_DIBBITBLT ) && + ( nFunction != W_META_DIBSTRETCHBLT ) ) + { + pOut->ResolveBitmapActions( aBmpSaveList ); + } + if ( !nSkipActions ) + ReadRecordParams( nFunction ); + else + nSkipActions--; + + if( pEMFStream && nEMFRecCount == nEMFRec ) + { + GDIMetaFile aMeta; + pEMFStream->Seek( 0 ); + EnhWMFReader* pEMFReader = new EnhWMFReader ( *pEMFStream, aMeta ); + bEMFAvailable = pEMFReader->ReadEnhWMF(); + delete pEMFReader; // destroy first!!! + + if( bEMFAvailable ) + { + pOut->AddFromGDIMetaFile( aMeta ); + pOut->SetrclFrame( Rectangle(0, 0, aMeta.GetPrefSize().Width(), aMeta.GetPrefSize().Height() )); + + // the stream needs to be set to the wmf end position, + // otherwise the GfxLink that is created will be incorrect + // (leading to graphic loss after swapout/swapin). + // so we will proceed normally, but are ignoring further wmf + // records + } + else + { + // something went wrong + // continue with WMF, don't try this again + delete pEMFStream; + pEMFStream = NULL; + } + } + } + nPos += nRecSize * 2; + if ( nPos <= nEndPos ) + pWMF->Seek( nPos ); + else + pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR ); + } + } + else + pWMF->SetError( SVSTREAM_GENERALERROR ); + + if( !pWMF->GetError() && aBmpSaveList.Count() ) + pOut->ResolveBitmapActions( aBmpSaveList ); + } + if ( pWMF->GetError() ) + pWMF->Seek( nStartPos ); +} + +// ------------------------------------------------------------------------ + +static void GetWinExtMax( const Point& rSource, Rectangle& rPlaceableBound, const sal_Int16 nMapMode ) +{ + Point aSource( rSource ); + if ( nMapMode == MM_HIMETRIC ) + aSource.Y() = -rSource.Y(); + if ( aSource.X() < rPlaceableBound.Left() ) + rPlaceableBound.Left() = aSource.X(); + if ( aSource.X() > rPlaceableBound.Right() ) + rPlaceableBound.Right() = aSource.X(); + if ( aSource.Y() < rPlaceableBound.Top() ) + rPlaceableBound.Top() = aSource.Y(); + if ( aSource.Y() > rPlaceableBound.Bottom() ) + rPlaceableBound.Bottom() = aSource.Y(); +} + +static void GetWinExtMax( const Rectangle& rSource, Rectangle& rPlaceableBound, const sal_Int16 nMapMode ) +{ + GetWinExtMax( rSource.TopLeft(), rPlaceableBound, nMapMode ); + GetWinExtMax( rSource.BottomRight(), rPlaceableBound, nMapMode ); +} + +sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pStm ) +{ + sal_Bool bRet = sal_True; + + rPlaceableBound.Left() = (sal_Int32)0x7fffffff; + rPlaceableBound.Top() = (sal_Int32)0x7fffffff; + rPlaceableBound.Right() = (sal_Int32)0x80000000; + rPlaceableBound.Bottom() = (sal_Int32)0x80000000; + + sal_Int16 nMapMode = MM_ANISOTROPIC; + + sal_uInt16 nFunction; + sal_uInt32 nRSize; + sal_uInt32 nPos = pStm->Tell(); + sal_uInt32 nEnd = pStm->Seek( STREAM_SEEK_TO_END ); + + pStm->Seek( nPos ); + + if( nEnd - nPos ) + { + while( bRet ) + { + *pStm >> nRSize >> nFunction; + + if( pStm->GetError() || ( nRSize < 3 ) || ( nRSize==3 && nFunction==0 ) || pStm->IsEof() ) + { + if( pStm->IsEof() ) + { + pStm->SetError( SVSTREAM_FILEFORMAT_ERROR ); + bRet = sal_False; + } + break; + } + switch( nFunction ) + { + case W_META_SETWINDOWORG: + { + Point aWinOrg; + aWinOrg = ReadYX(); + rPlaceableBound.SetPos( aWinOrg ); + } + break; + + case W_META_SETWINDOWEXT: + { + Point aPos0( 0, 0 ); + sal_Int16 nWidth, nHeight; + *pStm >> nHeight >> nWidth; + rPlaceableBound.SetSize( Size( nWidth, nHeight ) ); + } + break; + + case W_META_SETMAPMODE : + *pStm >> nMapMode; + break; + + case W_META_MOVETO: + case W_META_LINETO: + GetWinExtMax( ReadYX(), rPlaceableBound, nMapMode ); + break; + + case W_META_RECTANGLE: + case W_META_INTERSECTCLIPRECT: + case W_META_EXCLUDECLIPRECT : + case W_META_ELLIPSE: + GetWinExtMax( ReadRectangle(), rPlaceableBound, nMapMode ); + break; + + case W_META_ROUNDRECT: + { + Size aSize( ReadYXExt() ); + GetWinExtMax( ReadRectangle(), rPlaceableBound, nMapMode ); + } + break; + + case W_META_ARC: + case W_META_PIE: + case W_META_CHORD: + { + Point aEnd( ReadYX() ); + Point aStart( ReadYX() ); + GetWinExtMax( ReadRectangle(), rPlaceableBound, nMapMode ); + } + break; + + case W_META_POLYGON: + { + USHORT i,nPoints; + *pStm >> nPoints; + for( i = 0; i < nPoints; i++ ) + GetWinExtMax( ReadPoint(), rPlaceableBound, nMapMode ); + } + break; + + case W_META_POLYPOLYGON: + { + USHORT i, nPoly, nPoints = 0; + *pStm >> nPoly; + for( i = 0; i < nPoly; i++ ) + { + sal_uInt16 nP; + *pStm >> nP; + nPoints = nPoints + nP; + } + for ( i = 0; i < nPoints; i++ ) + GetWinExtMax( ReadPoint(), rPlaceableBound, nMapMode ); + } + break; + + case W_META_POLYLINE: + { + USHORT i,nPoints; + *pStm >> nPoints; + for( i = 0; i < nPoints; i++ ) + GetWinExtMax( ReadPoint(), rPlaceableBound, nMapMode ); + } + break; + + case W_META_SETPIXEL: + { + const Color aColor = ReadColor(); + GetWinExtMax( ReadYX(), rPlaceableBound, nMapMode ); + } + break; + + case W_META_TEXTOUT: + { + USHORT nLength; + *pStm >> nLength; + // todo: we also have to take care of the text width + if ( nLength ) + { + pStm->SeekRel( ( nLength + 1 ) &~ 1 ); + GetWinExtMax( ReadYX(), rPlaceableBound, nMapMode ); + } + } + break; + + case W_META_EXTTEXTOUT: + { + sal_uInt16 nLen, nOptions; + sal_Int32 nRecordPos, nRecordSize; + Point aPosition; + Rectangle aRect; + + pStm->SeekRel(-6); + nRecordPos = pStm->Tell(); + *pStm >> nRecordSize; + pStm->SeekRel(2); + aPosition = ReadYX(); + *pStm >> nLen >> nOptions; + // todo: we also have to take care of the text width + if( nLen ) + GetWinExtMax( aPosition, rPlaceableBound, nMapMode ); + } + break; + case W_META_BITBLT: + case W_META_STRETCHBLT: + case W_META_DIBBITBLT: + case W_META_DIBSTRETCHBLT: + case W_META_STRETCHDIB: + { + sal_Int32 nWinROP; + sal_uInt16 nSx, nSy, nSxe, nSye, nUsage; + *pStm >> nWinROP; + + if( nFunction == W_META_STRETCHDIB ) + *pStm >> nUsage; + + // nSye and nSxe is the number of pixels that has to been used + if( nFunction == W_META_STRETCHDIB || nFunction == W_META_STRETCHBLT || nFunction == W_META_DIBSTRETCHBLT ) + *pStm >> nSye >> nSxe; + else + nSye = nSxe = 0; // set this to zero as indicator not to scale the bitmap later + + // nSy and nx is the offset of the first pixel + *pStm >> nSy >> nSx; + + if( nFunction == W_META_STRETCHDIB || nFunction == W_META_DIBBITBLT || nFunction == W_META_DIBSTRETCHBLT ) + { + if ( nWinROP == PATCOPY ) + *pStm >> nUsage; // i don't know anything of this parameter, so its called nUsage + // pOut->DrawRect( Rectangle( ReadYX(), aDestSize ), FALSE ); + + Size aDestSize( ReadYXExt() ); + if ( aDestSize.Width() && aDestSize.Height() ) // #92623# do not try to read buggy bitmaps + { + Rectangle aDestRect( ReadYX(), aDestSize ); + GetWinExtMax( aDestRect, rPlaceableBound, nMapMode ); + } + } + } + break; + + case W_META_PATBLT: + { + UINT32 nROP; + *pStm >> nROP; + Size aSize = ReadYXExt(); + GetWinExtMax( Rectangle( ReadYX(), aSize ), rPlaceableBound, nMapMode ); + } + break; + } + nPos += nRSize * 2; + if ( nPos <= nEnd ) + pStm->Seek( nPos ); + else + { + pStm->SetError( SVSTREAM_FILEFORMAT_ERROR ); + bRet = sal_False; + } + + } + } + else + { + pStm->SetError( SVSTREAM_GENERALERROR ); + bRet = sal_False; + } + return bRet; +} + +WMFReader::~WMFReader() +{ + if( pEMFStream ) + delete pEMFStream; +} + diff --git a/svtools/source/filter/wmf/wmf.cxx b/svtools/source/filter/wmf/wmf.cxx new file mode 100644 index 000000000000..25ca9f721b33 --- /dev/null +++ b/svtools/source/filter/wmf/wmf.cxx @@ -0,0 +1,114 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#include "winmtf.hxx" +#include "emfwr.hxx" +#include "wmfwr.hxx" +#include + +// ----------------------------------------------------------------------------- + +BOOL ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, FilterConfigItem* pConfigItem ) +{ + UINT32 nMetaType; + UINT32 nOrgPos = rStreamWMF.Tell(); + UINT16 nOrigNumberFormat = rStreamWMF.GetNumberFormatInt(); + rStreamWMF.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + rStreamWMF.Seek( 0x28 ); + rStreamWMF >> nMetaType; + rStreamWMF.Seek( nOrgPos ); + if ( nMetaType == 0x464d4520 ) + { + if ( EnhWMFReader( rStreamWMF, rGDIMetaFile, pConfigItem ).ReadEnhWMF() == FALSE ) + rStreamWMF.SetError( SVSTREAM_FILEFORMAT_ERROR ); + } + else + { + WMFReader( rStreamWMF, rGDIMetaFile, pConfigItem ).ReadWMF(); + } + rStreamWMF.SetNumberFormatInt( nOrigNumberFormat ); + return !rStreamWMF.GetError(); +} + +// ----------------------------------------------------------------------------- + +BOOL ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pFilterConfigItem ) +{ + UINT32 nMetaType; + UINT32 nOrgPos = rStream.Tell(); + UINT16 nOrigNumberFormat = rStream.GetNumberFormatInt(); + rStream.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + rStream.Seek( 0x28 ); + rStream >> nMetaType; + rStream.Seek( nOrgPos ); + if ( nMetaType == 0x464d4520 ) + { + if ( EnhWMFReader( rStream, rMTF, NULL ).ReadEnhWMF() == FALSE ) + rStream.SetError( SVSTREAM_FILEFORMAT_ERROR ); + } + else + { + WMFReader( rStream, rMTF, pFilterConfigItem ).ReadWMF(); + } + rStream.SetNumberFormatInt( nOrigNumberFormat ); + return !rStream.GetError(); +} + +// ----------------------------------------------------------------------------- + +BOOL ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, + FilterConfigItem* pConfigItem, BOOL bPlaceable) +{ + WMFWriter aWMFWriter; + return aWMFWriter.WriteWMF( rMTF, rTargetStream, pConfigItem, bPlaceable ); +} + +// ----------------------------------------------------------------------------- + +BOOL ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, + FilterConfigItem* pConfigItem ) +{ + EMFWriter aEMFWriter; + return aEMFWriter.WriteEMF( rMTF, rTargetStream, pConfigItem ); +} + +// ----------------------------------------------------------------------------- + +BOOL WriteWindowMetafile( SvStream& rStream, const GDIMetaFile& rMTF ) +{ + return WMFWriter().WriteWMF( rMTF, rStream, NULL ); +} + +// ----------------------------------------------------------------------------- + +BOOL WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF ) +{ + return WMFWriter().WriteWMF( rMTF, rStream, NULL, FALSE ); +} diff --git a/svtools/source/filter/wmf/wmfwr.cxx b/svtools/source/filter/wmf/wmfwr.cxx new file mode 100644 index 000000000000..82d4101b48c9 --- /dev/null +++ b/svtools/source/filter/wmf/wmfwr.cxx @@ -0,0 +1,2124 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#include +#include +#include "wmfwr.hxx" +#include +#include "emfwr.hxx" +#include +#include +#include +#include +#ifndef INCLUDED_I18NUTIL_UNICODE_HXX +#include //unicode::getUnicodeScriptType +#endif + +#include +#include +#include + +//====================== MS-Windows-defines =============================== + +#define W_META_SETBKCOLOR 0x0201 +#define W_META_SETBKMODE 0x0102 +#define W_META_SETMAPMODE 0x0103 +#define W_META_SETROP2 0x0104 +#define W_META_SETRELABS 0x0105 +#define W_META_SETPOLYFILLMODE 0x0106 +#define W_META_SETSTRETCHBLTMODE 0x0107 +#define W_META_SETTEXTCHAREXTRA 0x0108 +#define W_META_SETTEXTCOLOR 0x0209 +#define W_META_SETTEXTJUSTIFICATION 0x020A +#define W_META_SETWINDOWORG 0x020B +#define W_META_SETWINDOWEXT 0x020C +#define W_META_SETVIEWPORTORG 0x020D +#define W_META_SETVIEWPORTEXT 0x020E +#define W_META_OFFSETWINDOWORG 0x020F +#define W_META_SCALEWINDOWEXT 0x0410 +#define W_META_OFFSETVIEWPORTORG 0x0211 +#define W_META_SCALEVIEWPORTEXT 0x0412 +#define W_META_LINETO 0x0213 +#define W_META_MOVETO 0x0214 +#define W_META_EXCLUDECLIPRECT 0x0415 +#define W_META_INTERSECTCLIPRECT 0x0416 +#define W_META_ARC 0x0817 +#define W_META_ELLIPSE 0x0418 +#define W_META_FLOODFILL 0x0419 +#define W_META_PIE 0x081A +#define W_META_RECTANGLE 0x041B +#define W_META_ROUNDRECT 0x061C +#define W_META_PATBLT 0x061D +#define W_META_SAVEDC 0x001E +#define W_META_SETPIXEL 0x041F +#define W_META_OFFSETCLIPRGN 0x0220 +#define W_META_TEXTOUT 0x0521 +#define W_META_BITBLT 0x0922 +#define W_META_STRETCHBLT 0x0B23 +#define W_META_POLYGON 0x0324 +#define W_META_POLYLINE 0x0325 +#define W_META_ESCAPE 0x0626 +#define W_META_RESTOREDC 0x0127 +#define W_META_FILLREGION 0x0228 +#define W_META_FRAMEREGION 0x0429 +#define W_META_INVERTREGION 0x012A +#define W_META_PAINTREGION 0x012B +#define W_META_SELECTCLIPREGION 0x012C +#define W_META_SELECTOBJECT 0x012D +#define W_META_SETTEXTALIGN 0x012E +#define W_META_DRAWTEXT 0x062F +#define W_META_CHORD 0x0830 +#define W_META_SETMAPPERFLAGS 0x0231 +#define W_META_EXTTEXTOUT 0x0a32 +#define W_META_SETDIBTODEV 0x0d33 +#define W_META_SELECTPALETTE 0x0234 +#define W_META_REALIZEPALETTE 0x0035 +#define W_META_ANIMATEPALETTE 0x0436 +#define W_META_SETPALENTRIES 0x0037 +#define W_META_POLYPOLYGON 0x0538 +#define W_META_RESIZEPALETTE 0x0139 +#define W_META_DIBBITBLT 0x0940 +#define W_META_DIBSTRETCHBLT 0x0b41 +#define W_META_DIBCREATEPATTERNBRUSH 0x0142 +#define W_META_STRETCHDIB 0x0f43 +#define W_META_EXTFLOODFILL 0x0548 +#define W_META_RESETDC 0x014C +#define W_META_STARTDOC 0x014D +#define W_META_STARTPAGE 0x004F +#define W_META_ENDPAGE 0x0050 +#define W_META_ABORTDOC 0x0052 +#define W_META_ENDDOC 0x005E +#define W_META_DELETEOBJECT 0x01f0 +#define W_META_CREATEPALETTE 0x00f7 +#define W_META_CREATEBRUSH 0x00F8 +#define W_META_CREATEPATTERNBRUSH 0x01F9 +#define W_META_CREATEPENINDIRECT 0x02FA +#define W_META_CREATEFONTINDIRECT 0x02FB +#define W_META_CREATEBRUSHINDIRECT 0x02FC +#define W_META_CREATEBITMAPINDIRECT 0x02FD +#define W_META_CREATEBITMAP 0x06FE +#define W_META_CREATEREGION 0x06FF + +#define W_TRANSPARENT 1 +#define W_OPAQUE 2 + +#define W_R2_BLACK 1 +#define W_R2_NOTMERGEPEN 2 +#define W_R2_MASKNOTPEN 3 +#define W_R2_NOTCOPYPEN 4 +#define W_R2_MASKPENNOT 5 +#define W_R2_NOT 6 +#define W_R2_XORPEN 7 +#define W_R2_NOTMASKPEN 8 +#define W_R2_MASKPEN 9 +#define W_R2_NOTXORPEN 10 +#define W_R2_NOP 11 +#define W_R2_MERGENOTPEN 12 +#define W_R2_COPYPEN 13 +#define W_R2_MERGEPENNOT 14 +#define W_R2_MERGEPEN 15 +#define W_R2_WHITE 16 + +#define W_TA_NOUPDATECP 0x0000 +#define W_TA_UPDATECP 0x0001 +#define W_TA_LEFT 0x0000 +#define W_TA_RIGHT 0x0002 +#define W_TA_CENTER 0x0006 +#define W_TA_TOP 0x0000 +#define W_TA_BOTTOM 0x0008 +#define W_TA_BASELINE 0x0018 +#define W_TA_RTLREADING 0x0100 + +#define W_SRCCOPY 0x00CC0020L +#define W_SRCPAINT 0x00EE0086L +#define W_SRCAND 0x008800C6L +#define W_SRCINVERT 0x00660046L +#define W_SRCERASE 0x00440328L +#define W_NOTSRCCOPY 0x00330008L +#define W_NOTSRCERASE 0x001100A6L +#define W_MERGECOPY 0x00C000CAL +#define W_MERGEPAINT 0x00BB0226L +#define W_PATCOPY 0x00F00021L +#define W_PATPAINT 0x00FB0A09L +#define W_PATINVERT 0x005A0049L +#define W_DSTINVERT 0x00550009L +#define W_BLACKNESS 0x00000042L +#define W_WHITENESS 0x00FF0062L + +#define W_PS_SOLID 0 +#define W_PS_DASH 1 +#define W_PS_DOT 2 +#define W_PS_DASHDOT 3 +#define W_PS_DASHDOTDOT 4 +#define W_PS_NULL 5 +#define W_PS_INSIDEFRAME 6 + +#define W_LF_FACESIZE 32 + +#define W_ANSI_CHARSET 0 +#define W_DEFAULT_CHARSET 1 +#define W_SYMBOL_CHARSET 2 +#define W_SHIFTJIS_CHARSET 128 +#define W_HANGEUL_CHARSET 129 +#define W_GB2312_CHARSET 134 +#define W_CHINESEBIG5_CHARSET 136 +#define W_OEM_CHARSET 255 +/*WINVER >= 0x0400*/ +#define W_JOHAB_CHARSET 130 +#define W_HEBREW_CHARSET 177 +#define W_ARABIC_CHARSET 178 +#define W_GREEK_CHARSET 161 +#define W_TURKISH_CHARSET 162 +#define W_VIETNAMESE_CHARSET 163 +#define W_THAI_CHARSET 222 +#define W_EASTEUROPE_CHARSET 238 +#define W_RUSSIAN_CHARSET 204 +#define W_MAC_CHARSET 77 +#define W_BALTIC_CHARSET 186 + +#define W_DEFAULT_PITCH 0x00 +#define W_FIXED_PITCH 0x01 +#define W_VARIABLE_PITCH 0x02 + +#define W_FF_DONTCARE 0x00 +#define W_FF_ROMAN 0x10 +#define W_FF_SWISS 0x20 +#define W_FF_MODERN 0x30 +#define W_FF_SCRIPT 0x40 +#define W_FF_DECORATIVE 0x50 + +#define W_FW_DONTCARE 0 +#define W_FW_THIN 100 +#define W_FW_EXTRALIGHT 200 +#define W_FW_LIGHT 300 +#define W_FW_NORMAL 400 +#define W_FW_MEDIUM 500 +#define W_FW_SEMIBOLD 600 +#define W_FW_BOLD 700 +#define W_FW_EXTRABOLD 800 +#define W_FW_HEAVY 900 +#define W_FW_ULTRALIGHT 200 +#define W_FW_REGULAR 400 +#define W_FW_DEMIBOLD 600 +#define W_FW_ULTRABOLD 800 +#define W_FW_BLACK 900 + +#define W_BS_SOLID 0 +#define W_BS_HOLLOW 1 +#define W_BS_HATCHED 2 +#define W_BS_PATTERN 3 +#define W_BS_INDEXED 4 +#define W_BS_DIBPATTERN 5 + +#define W_HS_HORIZONTAL 0 +#define W_HS_VERTICAL 1 +#define W_HS_FDIAGONAL 2 +#define W_HS_BDIAGONAL 3 +#define W_HS_CROSS 4 +#define W_HS_DIAGCROSS 5 + +#define W_MFCOMMENT 15 + +#define PRIVATE_ESCAPE_UNICODE 2 + +/// copied from writerwordglue.cxx + +/* + Utility to categorize unicode characters into the best fit windows charset + range for exporting to ww6, or as a hint to non \u unicode token aware rtf + readers +*/ +rtl_TextEncoding getScriptClass(sal_Unicode cChar) +{ + using namespace com::sun::star::i18n; + + static ScriptTypeList aScripts[] = + { + { UnicodeScript_kBasicLatin, UnicodeScript_kBasicLatin, RTL_TEXTENCODING_MS_1252}, + { UnicodeScript_kLatin1Supplement, UnicodeScript_kLatin1Supplement, RTL_TEXTENCODING_MS_1252}, + { UnicodeScript_kLatinExtendedA, UnicodeScript_kLatinExtendedA, RTL_TEXTENCODING_MS_1250}, + { UnicodeScript_kLatinExtendedB, UnicodeScript_kLatinExtendedB, RTL_TEXTENCODING_MS_1257}, + { UnicodeScript_kGreek, UnicodeScript_kGreek, RTL_TEXTENCODING_MS_1253}, + { UnicodeScript_kCyrillic, UnicodeScript_kCyrillic, RTL_TEXTENCODING_MS_1251}, + { UnicodeScript_kHebrew, UnicodeScript_kHebrew, RTL_TEXTENCODING_MS_1255}, + { UnicodeScript_kArabic, UnicodeScript_kArabic, RTL_TEXTENCODING_MS_1256}, + { UnicodeScript_kThai, UnicodeScript_kThai, RTL_TEXTENCODING_MS_1258}, + { UnicodeScript_kScriptCount, UnicodeScript_kScriptCount, RTL_TEXTENCODING_MS_1252} + }; + return unicode::getUnicodeScriptType(cChar, aScripts, + RTL_TEXTENCODING_MS_1252); +} + +//========================== Methoden von WMFWriter ========================== + +void WMFWriter::MayCallback() +{ + if ( xStatusIndicator.is() ) + { + ULONG nPercent; + + // Wir gehen mal einfach so davon aus, dass 16386 Actions einer Bitmap entsprechen + // (in der Regel wird ein Metafile entweder nur Actions oder einige Bitmaps und fast + // keine Actions enthalten. Dann ist das Verhaeltnis ziemlich unwichtig) + + nPercent=((nWrittenBitmaps<<14)+(nActBitmapPercent<<14)/100+nWrittenActions) + *100 + /((nNumberOfBitmaps<<14)+nNumberOfActions); + + if ( nPercent >= nLastPercent + 3 ) + { + nLastPercent = nPercent; + if( nPercent <= 100 ) + xStatusIndicator->setValue( nPercent ); + } + } +} + +void WMFWriter::CountActionsAndBitmaps( const GDIMetaFile & rMTF ) +{ + ULONG nAction, nActionCount; + + nActionCount = rMTF.GetActionCount(); + + for ( nAction=0; nActionGetType() ) + { + case META_BMP_ACTION: + case META_BMPSCALE_ACTION: + case META_BMPSCALEPART_ACTION: + case META_BMPEX_ACTION: + case META_BMPEXSCALE_ACTION: + case META_BMPEXSCALEPART_ACTION: + case META_RENDERGRAPHIC_ACTION: + nNumberOfBitmaps++; + break; + } + nNumberOfActions++; + } +} + + +void WMFWriter::WritePointXY(const Point & rPoint) +{ + Point aPt( pVirDev->LogicToLogic(rPoint,aSrcMapMode,aTargetMapMode) ); + *pWMF << ((short)aPt.X()) << ((short)aPt.Y()); +} + + +void WMFWriter::WritePointYX(const Point & rPoint) +{ + Point aPt( pVirDev->LogicToLogic(rPoint,aSrcMapMode,aTargetMapMode) ); + *pWMF << ((short)aPt.Y()) << ((short)aPt.X()); +} + + +sal_Int32 WMFWriter::ScaleWidth( sal_Int32 nDX ) +{ + Size aSz( pVirDev->LogicToLogic(Size(nDX,0),aSrcMapMode,aTargetMapMode) ); + return aSz.Width(); +} + + +void WMFWriter::WriteSize(const Size & rSize) +{ + Size aSz( pVirDev->LogicToLogic(rSize,aSrcMapMode,aTargetMapMode) ); + *pWMF << ((short)aSz.Width()) << ((short)aSz.Height()); +} + + +void WMFWriter::WriteHeightWidth(const Size & rSize) +{ + Size aSz( pVirDev->LogicToLogic(rSize,aSrcMapMode,aTargetMapMode) ); + *pWMF << ((short)aSz.Height()) << ((short)aSz.Width()); +} + + +void WMFWriter::WriteRectangle(const Rectangle & rRect) +{ + WritePointYX(Point(rRect.Right()+1,rRect.Bottom()+1)); + WritePointYX(rRect.TopLeft()); +} + + +void WMFWriter::WriteColor(const Color & rColor) +{ + *pWMF << (BYTE) rColor.GetRed() << (BYTE) rColor.GetGreen() << (BYTE) rColor.GetBlue() << (BYTE) 0; +} + + +void WMFWriter::WriteRecordHeader(sal_uInt32 nSizeWords, sal_uInt16 nType) +{ + nActRecordPos=pWMF->Tell(); + if (nSizeWords>nMaxRecordSize) nMaxRecordSize=nSizeWords; + *pWMF << nSizeWords << nType; +} + + +void WMFWriter::UpdateRecordHeader() +{ + ULONG nPos; + sal_uInt32 nSize; + + nPos=pWMF->Tell(); nSize=nPos-nActRecordPos; + if ((nSize & 1)!=0) { + *pWMF << (BYTE)0; + nPos++; nSize++; + } + nSize/=2; + if (nSize>nMaxRecordSize) nMaxRecordSize=nSize; + pWMF->Seek(nActRecordPos); + *pWMF << nSize; + pWMF->Seek(nPos); +} + + +void WMFWriter::WMFRecord_Arc(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt) +{ + WriteRecordHeader(0x0000000b,W_META_ARC); + WritePointYX(rEndPt); + WritePointYX(rStartPt); + WriteRectangle(rRect); +} + +void WMFWriter::WMFRecord_Chord(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt) +{ + WriteRecordHeader(0x0000000b,W_META_CHORD); + WritePointYX(rEndPt); + WritePointYX(rStartPt); + WriteRectangle(rRect); +} + + +void WMFWriter::WMFRecord_CreateBrushIndirect(const Color& rColor) +{ + WriteRecordHeader(0x00000007,W_META_CREATEBRUSHINDIRECT); + + if( rColor==Color(COL_TRANSPARENT) ) + *pWMF << (UINT16) W_BS_HOLLOW; + else + *pWMF << (UINT16) W_BS_SOLID; + + WriteColor( rColor ); + *pWMF << (UINT16) 0; +} + + +void WMFWriter::WMFRecord_CreateFontIndirect(const Font & rFont) +{ + USHORT nWeight,i; + BYTE nPitchFamily; + + WriteRecordHeader(0x00000000,W_META_CREATEFONTINDIRECT); + WriteHeightWidth(Size(rFont.GetSize().Width(),-rFont.GetSize().Height())); + *pWMF << (short)rFont.GetOrientation() << (short)rFont.GetOrientation(); + + switch (rFont.GetWeight()) { + case WEIGHT_THIN: nWeight=W_FW_THIN; break; + case WEIGHT_ULTRALIGHT: nWeight=W_FW_ULTRALIGHT; break; + case WEIGHT_LIGHT: nWeight=W_FW_LIGHT; break; + case WEIGHT_SEMILIGHT: nWeight=W_FW_LIGHT; break; + case WEIGHT_NORMAL: nWeight=W_FW_NORMAL; break; + case WEIGHT_MEDIUM: nWeight=W_FW_MEDIUM; break; + case WEIGHT_SEMIBOLD: nWeight=W_FW_SEMIBOLD; break; + case WEIGHT_BOLD: nWeight=W_FW_BOLD; break; + case WEIGHT_ULTRABOLD: nWeight=W_FW_ULTRABOLD; break; + case WEIGHT_BLACK: nWeight=W_FW_BLACK; break; + default: nWeight=W_FW_DONTCARE; + } + *pWMF << nWeight; + + if (rFont.GetItalic()==ITALIC_NONE) *pWMF << (BYTE)0; else *pWMF << (BYTE)1; + if (rFont.GetUnderline()==UNDERLINE_NONE) *pWMF << (BYTE)0; else *pWMF << (BYTE)1; + if (rFont.GetStrikeout()==STRIKEOUT_NONE) *pWMF << (BYTE)0; else *pWMF << (BYTE)1; + + CharSet eFontNameEncoding = rFont.GetCharSet(); + sal_uInt8 nCharSet = rtl_getBestWindowsCharsetFromTextEncoding( eFontNameEncoding ); + if ( eFontNameEncoding == RTL_TEXTENCODING_SYMBOL ) + eFontNameEncoding = RTL_TEXTENCODING_MS_1252; + if ( nCharSet == 1 ) + nCharSet = W_ANSI_CHARSET; + *pWMF << nCharSet; + + *pWMF << (BYTE)0 << (BYTE)0 << (BYTE)0; + + switch (rFont.GetPitch()) { + case PITCH_FIXED: nPitchFamily=W_FIXED_PITCH; break; + case PITCH_VARIABLE: nPitchFamily=W_VARIABLE_PITCH; break; + default: nPitchFamily=W_DEFAULT_PITCH; + } + switch (rFont.GetFamily()) { + case FAMILY_DECORATIVE: nPitchFamily|=W_FF_DECORATIVE; break; + case FAMILY_MODERN: nPitchFamily|=W_FF_MODERN; break; + case FAMILY_ROMAN: nPitchFamily|=W_FF_ROMAN; break; + case FAMILY_SCRIPT: nPitchFamily|=W_FF_SCRIPT; break; + case FAMILY_SWISS: nPitchFamily|=W_FF_SWISS; break; + default: nPitchFamily|=W_FF_DONTCARE; + } + *pWMF << nPitchFamily; + + ByteString aFontName( rFont.GetName(), eFontNameEncoding ); + for ( i = 0; i < W_LF_FACESIZE; i++ ) + { + sal_Char nChar = ( i < aFontName.Len() ) ? aFontName.GetChar( i ) : 0; + *pWMF << nChar; + } + UpdateRecordHeader(); +} + +void WMFWriter::WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo& rLineInfo ) +{ + WriteRecordHeader(0x00000008,W_META_CREATEPENINDIRECT); + USHORT nStyle = rColor == Color( COL_TRANSPARENT ) ? W_PS_NULL : W_PS_SOLID; + switch( rLineInfo.GetStyle() ) + { + case LINE_DASH : + { + if ( rLineInfo.GetDotCount() ) + { + if ( !rLineInfo.GetDashCount() ) + nStyle = W_PS_DOT; + else + { + if ( !rLineInfo.GetDotCount() == 1 ) + nStyle = W_PS_DASHDOT; + else + nStyle = W_PS_DASHDOTDOT; + } + } + else + nStyle = W_PS_DASH; + } + break; + case LINE_NONE : + nStyle = W_PS_NULL; + break; + default: + break; + } + *pWMF << nStyle; + + WriteSize( Size( rLineInfo.GetWidth(), 0 ) ); + WriteColor( rColor ); +} + +void WMFWriter::WMFRecord_DeleteObject(USHORT nObjectHandle) +{ + WriteRecordHeader(0x00000004,W_META_DELETEOBJECT); + *pWMF << nObjectHandle; +} + + +void WMFWriter::WMFRecord_Ellipse(const Rectangle & rRect) +{ + WriteRecordHeader(0x00000007,W_META_ELLIPSE); + WriteRectangle(rRect); +} + +bool IsStarSymbol(const String &rStr) +{ + return rStr.EqualsIgnoreCaseAscii("starsymbol") || + rStr.EqualsIgnoreCaseAscii("opensymbol"); +} + +void WMFWriter::WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_Int8* pData ) +{ +#ifdef OSL_BIGENDIAN + sal_uInt32 nTmp = SWAPLONG( nEsc ); + sal_uInt32 nCheckSum = rtl_crc32( 0, &nTmp, 4 ); +#else + sal_uInt32 nCheckSum = rtl_crc32( 0, &nEsc, 4 ); +#endif + if ( nLen ) + nCheckSum = rtl_crc32( nCheckSum, pData, nLen ); + + WriteRecordHeader( 3 + 9 + ( ( nLen + 1 ) >> 1 ), W_META_ESCAPE ); + *pWMF << (sal_uInt16)W_MFCOMMENT + << (sal_uInt16)( nLen + 14 ) // we will always have a fourteen byte escape header: + << (sal_uInt16)0x4f4f // OO + << (sal_uInt32)0xa2c2a // evil magic number + << (sal_uInt32)nCheckSum // crc32 checksum about nEsc & pData + << (sal_uInt32)nEsc; // escape number + pWMF->Write( pData, nLen ); + if ( nLen & 1 ) + *pWMF << (sal_uInt8)0; // pad byte +} + +/* if return value is true, then a complete unicode string and also a polygon replacement has been written, + so there is no more action necessary +*/ +sal_Bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const String& rUniStr, const sal_Int32* pDXAry ) +{ + sal_Bool bEscapeUsed = sal_False; + + sal_uInt32 i, nStringLen = rUniStr.Len(); + if ( nStringLen ) + { + // first we will check if a comment is necessary + if ( aSrcFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL ) // symbol is always byte character, so there is no unicode loss + { + const sal_Unicode* pBuf = rUniStr.GetBuffer(); + const rtl_TextEncoding aTextEncodingOrg = aSrcFont.GetCharSet(); + ByteString aByteStr( rUniStr, aTextEncodingOrg ); + String aUniStr2( aByteStr, aTextEncodingOrg ); + const sal_Unicode* pConversion = aUniStr2.GetBuffer(); // this is the unicode array after bytestring <-> unistring conversion + for ( i = 0; i < nStringLen; i++ ) + { + if ( *pBuf++ != *pConversion++ ) + break; + } + + if ( i != nStringLen ) // after conversion the characters are not original, + { // try again, with determining a better charset from unicode char + pBuf = rUniStr.GetBuffer(); + const sal_Unicode* pCheckChar = pBuf; + rtl_TextEncoding aTextEncoding = getScriptClass (*pCheckChar); // try the first character + for ( i = 1; i < nStringLen; i++) + { + if (aTextEncoding != aTextEncodingOrg) // found something + break; + pCheckChar++; + aTextEncoding = getScriptClass (*pCheckChar); // try the next character + } + + aByteStr = ByteString ( rUniStr, aTextEncoding ); + aUniStr2 = String ( aByteStr, aTextEncoding ); + pConversion = aUniStr2.GetBuffer(); // this is the unicode array after bytestring <-> unistring conversion + for ( i = 0; i < nStringLen; i++ ) + { + if ( *pBuf++ != *pConversion++ ) + break; + } + if (i == nStringLen) + { + aSrcFont.SetCharSet (aTextEncoding); + SetAllAttr(); + } + } + + if ( ( i != nStringLen ) || IsStarSymbol( aSrcFont.GetName() ) ) // after conversion the characters are not original, so we + { // will store the unicode string and a polypoly replacement + Color aOldFillColor( aSrcFillColor ); + Color aOldLineColor( aSrcLineColor ); + aSrcLineInfo = LineInfo(); + aSrcFillColor = aSrcTextColor; + aSrcLineColor = Color( COL_TRANSPARENT ); + SetLineAndFillAttr(); + pVirDev->SetFont( aSrcFont ); + std::vector aPolyPolyVec; + if ( pVirDev->GetTextOutlines( aPolyPolyVec, rUniStr ) ) + { + sal_uInt32 nDXCount = pDXAry ? nStringLen : 0; + sal_uInt32 nSkipActions = aPolyPolyVec.size(); + sal_Int32 nStrmLen = 8 + + + sizeof( nStringLen ) + ( nStringLen * 2 ) + + sizeof( nDXCount ) + ( nDXCount * 4 ) + + sizeof( nSkipActions ); + + SvMemoryStream aMemoryStream( nStrmLen ); + Point aPt( pVirDev->LogicToLogic( rPoint, aSrcMapMode, aTargetMapMode ) ); + aMemoryStream << aPt.X() + << aPt.Y() + << nStringLen; + for ( i = 0; i < nStringLen; i++ ) + aMemoryStream << rUniStr.GetChar( (sal_uInt16)i ); + aMemoryStream << nDXCount; + for ( i = 0; i < nDXCount; i++ ) + aMemoryStream << pDXAry[ i ]; + aMemoryStream << nSkipActions; + WMFRecord_Escape( PRIVATE_ESCAPE_UNICODE, nStrmLen, (const sal_Int8*)aMemoryStream.GetData() ); + + std::vector::iterator aIter( aPolyPolyVec.begin() ); + while ( aIter != aPolyPolyVec.end() ) + { + PolyPolygon aPolyPoly( *aIter++ ); + aPolyPoly.Move( rPoint.X(), rPoint.Y() ); + WMFRecord_PolyPolygon( aPolyPoly ); + } + aSrcFillColor = aOldFillColor; + aSrcLineColor = aOldLineColor; + bEscapeUsed = sal_True; + } + } + } + } + return bEscapeUsed; +} + +void WMFWriter::WMFRecord_ExtTextOut( const Point & rPoint, + const String & rString, const sal_Int32 * pDXAry ) +{ + sal_uInt16 nOriginalTextLen = rString.Len(); + + if ( (nOriginalTextLen <= 1) || (pDXAry == NULL) ) + { + WMFRecord_TextOut(rPoint, rString); + return; + } + rtl_TextEncoding eChrSet = aSrcFont.GetCharSet(); + ByteString aByteString(rString, eChrSet); + TrueExtTextOut(rPoint,rString,aByteString,pDXAry); +} + +void WMFWriter::TrueExtTextOut( const Point & rPoint, const String & rString, + const ByteString & rByteString, const sal_Int32 * pDXAry ) +{ + WriteRecordHeader( 0, W_META_EXTTEXTOUT ); + WritePointYX( rPoint ); + sal_uInt16 nNewTextLen = rByteString.Len(); + *pWMF << nNewTextLen << (sal_uInt16)0; + + sal_uInt16 i; + for ( i = 0; i < nNewTextLen; i++ ) + *pWMF << (sal_uInt8)rByteString.GetChar( i ); + if ( nNewTextLen & 1 ) + *pWMF << (sal_uInt8)0; + + sal_uInt16 nOriginalTextLen = rString.Len(); + sal_Int16* pConvertedDXAry = new sal_Int16[ nOriginalTextLen ]; + sal_Int32 j = 0; + pConvertedDXAry[ j++ ] = (sal_Int16)ScaleWidth( pDXAry[ 0 ] ); + for ( i = 1; i < ( nOriginalTextLen - 1 ); i++ ) + pConvertedDXAry[ j++ ] = (sal_Int16)ScaleWidth( pDXAry[ i ] - pDXAry[ i - 1 ] ); + pConvertedDXAry[ j ] = (sal_Int16)ScaleWidth( pDXAry[ nOriginalTextLen - 2 ] / ( nOriginalTextLen - 1 ) ); + + for ( i = 0; i < nOriginalTextLen; i++ ) + { + sal_Int16 nDx = pConvertedDXAry[ i ]; + *pWMF << nDx; + if ( nOriginalTextLen < nNewTextLen ) + { + ByteString aTemp( rString.GetChar( i ), aSrcFont.GetCharSet()); + j = aTemp.Len(); + while ( --j > 0 ) + *pWMF << (sal_uInt16)0; + } + } + delete[] pConvertedDXAry; + UpdateRecordHeader(); +} + +void WMFWriter::WMFRecord_LineTo(const Point & rPoint) +{ + WriteRecordHeader(0x00000005,W_META_LINETO); + WritePointYX(rPoint); +} + + +void WMFWriter::WMFRecord_MoveTo(const Point & rPoint) +{ + WriteRecordHeader(0x00000005,W_META_MOVETO); + WritePointYX(rPoint); +} + + +void WMFWriter::WMFRecord_Pie(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt) +{ + WriteRecordHeader(0x0000000b,W_META_PIE); + WritePointYX(rEndPt); + WritePointYX(rStartPt); + WriteRectangle(rRect); +} + + +void WMFWriter::WMFRecord_Polygon(const Polygon & rPoly) +{ + USHORT nSize,i; + + Polygon aSimplePoly; + if ( rPoly.HasFlags() ) + rPoly.AdaptiveSubdivide( aSimplePoly ); + else + aSimplePoly = rPoly; + nSize = aSimplePoly.GetSize(); + WriteRecordHeader(((ULONG)nSize)*2+4,W_META_POLYGON); + *pWMF << nSize; + for (i=0; iGetSize(); + for (j=0; jGetPoint(j)); + } + UpdateRecordHeader(); +} + + +void WMFWriter::WMFRecord_Rectangle(const Rectangle & rRect) +{ + WriteRecordHeader( 0x00000007,W_META_RECTANGLE ); + WriteRectangle( rRect ); +} + + +void WMFWriter::WMFRecord_RestoreDC() +{ + WriteRecordHeader(0x00000004,W_META_RESTOREDC); + *pWMF << (short)-1; +} + + +void WMFWriter::WMFRecord_RoundRect(const Rectangle & rRect, long nHorzRound, long nVertRound) +{ + WriteRecordHeader(0x00000009,W_META_ROUNDRECT); + WriteHeightWidth(Size(nHorzRound,nVertRound)); + WriteRectangle(rRect); +} + + +void WMFWriter::WMFRecord_SaveDC() +{ + WriteRecordHeader(0x00000003,W_META_SAVEDC); +} + + +void WMFWriter::WMFRecord_SelectObject(USHORT nObjectHandle) +{ + WriteRecordHeader(0x00000004,W_META_SELECTOBJECT); + *pWMF << nObjectHandle; +} + + +void WMFWriter::WMFRecord_SetBkColor(const Color & rColor) +{ + WriteRecordHeader(0x00000005,W_META_SETBKCOLOR); + WriteColor(rColor); +} + + +void WMFWriter::WMFRecord_SetBkMode(BOOL bTransparent) +{ + WriteRecordHeader(0x00000004,W_META_SETBKMODE); + if (bTransparent==TRUE) *pWMF << (USHORT)W_TRANSPARENT; + else *pWMF << (USHORT)W_OPAQUE; +} + +void WMFWriter::WMFRecord_SetStretchBltMode() +{ + WriteRecordHeader( 0x00000004, W_META_SETSTRETCHBLTMODE ); + *pWMF << (USHORT) 3; // STRETCH_DELETESCANS +} + +void WMFWriter::WMFRecord_SetPixel(const Point & rPoint, const Color & rColor) +{ + WriteRecordHeader(0x00000007,W_META_SETPIXEL); + WriteColor(rColor); + WritePointYX(rPoint); +} + + +void WMFWriter::WMFRecord_SetROP2(RasterOp eROP) +{ + USHORT nROP2; + + switch (eROP) { + case ROP_INVERT: nROP2=W_R2_NOT; break; + case ROP_XOR: nROP2=W_R2_XORPEN; break; + default: nROP2=W_R2_COPYPEN; + } + WriteRecordHeader(0x00000004,W_META_SETROP2); + *pWMF << nROP2; +} + + +void WMFWriter::WMFRecord_SetTextAlign(FontAlign eFontAlign, UINT32 eHorTextAlign) +{ + USHORT nAlign; + + switch (eFontAlign) { + case ALIGN_TOP: nAlign=W_TA_TOP; break; + case ALIGN_BOTTOM: nAlign=W_TA_BOTTOM; break; + default: nAlign=W_TA_BASELINE; + } + nAlign|=eHorTextAlign; + nAlign|=W_TA_NOUPDATECP; + + WriteRecordHeader(0x00000004,W_META_SETTEXTALIGN); + *pWMF << nAlign; +} + + +void WMFWriter::WMFRecord_SetTextColor(const Color & rColor) +{ + WriteRecordHeader(0x00000005,W_META_SETTEXTCOLOR); + WriteColor(rColor); +} + + +void WMFWriter::WMFRecord_SetWindowExt(const Size & rSize) +{ + WriteRecordHeader(0x00000005,W_META_SETWINDOWEXT); + WriteHeightWidth(rSize); +} + + +void WMFWriter::WMFRecord_SetWindowOrg(const Point & rPoint) +{ + WriteRecordHeader(0x00000005,W_META_SETWINDOWORG); + WritePointYX(rPoint); +} + + +void WMFWriter::WMFRecord_StretchDIB( const Point & rPoint, const Size & rSize, + const Bitmap & rBitmap, sal_uInt32 nROP ) +{ + ULONG nPosAnf,nPosEnd; + + nActBitmapPercent=50; + MayCallback(); + + WriteRecordHeader(0x00000000,W_META_STRETCHDIB); + + // Die Reihenfolge im Metafile soll jetzt sein: + // einige Parameter (laenge 22), dann die Bitmap ohne FILEHEADER. + // Da aber *pWMF << rBitmap einen FILEHEADER der Laenge 14 + // erzeugt, schreiben wir zuerst die Bitmap an die richtige Position + // Und ueberschreiben hinterher den FILEHEADER mit den Parametern. + nPosAnf=pWMF->Tell(); // Position merken, wo Parameter hin sollen + *pWMF << (long)0 << (long)0; // 8 bytes auffuellen (diese 8 bytes + + // 14 bytes ueberfluessigen FILEHEADER + // = 22 bytes Parameter) + *pWMF << rBitmap; // Bitmap schreiben + + // Parameter schreiben: + nPosEnd=pWMF->Tell(); + pWMF->Seek(nPosAnf); + + // Raster-Op bestimmen, falls nichts uebergeben wurde + if( !nROP ) + { + switch( eSrcRasterOp ) + { + case ROP_INVERT: nROP = W_DSTINVERT; break; + case ROP_XOR: nROP = W_SRCINVERT; break; + default: nROP = W_SRCCOPY; + } + } + + *pWMF << nROP << + (short) 0 << + (short) rBitmap.GetSizePixel().Height() << + (short) rBitmap.GetSizePixel().Width() << + (short) 0 << + (short) 0; + + WriteHeightWidth(rSize); + WritePointYX(rPoint); + pWMF->Seek(nPosEnd); + + UpdateRecordHeader(); + + nWrittenBitmaps++; + nActBitmapPercent=0; +} + + +void WMFWriter::WMFRecord_TextOut(const Point & rPoint, const String & rStr) +{ + rtl_TextEncoding eChrSet = aSrcFont.GetCharSet(); + ByteString aString( rStr, eChrSet ); + TrueTextOut(rPoint, aString); +} + +void WMFWriter::TrueTextOut(const Point & rPoint, const ByteString& rString) +{ + USHORT nLen,i; + + WriteRecordHeader(0,W_META_TEXTOUT); + nLen=rString.Len(); + *pWMF << nLen; + for ( i = 0; i < nLen; i++ ) + *pWMF << (BYTE)rString.GetChar( i ); + if ((nLen&1)!=0) *pWMF << (BYTE)0; + WritePointYX(rPoint); + UpdateRecordHeader(); +} + +void WMFWriter::WMFRecord_EndOfFile() +{ + WriteRecordHeader(0x00000003,0x0000); +} + + +void WMFWriter::WMFRecord_IntersectClipRect( const Rectangle& rRect ) +{ + WriteRecordHeader( 0x00000007, W_META_INTERSECTCLIPRECT ); + WriteRectangle(rRect); +} + + +USHORT WMFWriter::AllocHandle() +{ + USHORT i; + + for (i=0; iSetFont(aSrcFont); + if ( aDstFont.GetName() != aSrcFont.GetName() ) + { + FontCharMap aFontCharMap; + if ( pVirDev->GetFontCharMap( aFontCharMap ) ) + { + if ( ( aFontCharMap.GetFirstChar() & 0xff00 ) == 0xf000 ) + aSrcFont.SetCharSet( RTL_TEXTENCODING_SYMBOL ); + else if ( aSrcFont.GetCharSet() == RTL_TEXTENCODING_SYMBOL ) + aSrcFont.SetCharSet( RTL_TEXTENCODING_MS_1252 ); + } + } + aDstFont = aSrcFont; + CreateSelectDeleteFont(aDstFont); + } +} + + +void WMFWriter::HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon) +{ + if(rLinePolygon.count()) + { + basegfx::B2DPolyPolygon aLinePolyPolygon(rLinePolygon); + basegfx::B2DPolyPolygon aFillPolyPolygon; + + rInfo.applyToB2DPolyPolygon(aLinePolyPolygon, aFillPolyPolygon); + + if(aLinePolyPolygon.count()) + { + aSrcLineInfo = rInfo; + SetLineAndFillAttr(); + + for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++) + { + const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a)); + WMFRecord_PolyLine(Polygon(aCandidate)); + } + } + + if(aFillPolyPolygon.count()) + { + const Color aOldLineColor(aSrcLineColor); + const Color aOldFillColor(aSrcFillColor); + + aSrcLineColor = Color( COL_TRANSPARENT ); + aSrcFillColor = aOldLineColor; + SetLineAndFillAttr(); + + for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++) + { + const Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a)); + WMFRecord_Polygon(Polygon(aPolygon)); + } + + aSrcLineColor = aOldLineColor; + aSrcFillColor = aOldFillColor; + SetLineAndFillAttr(); + } + } +} + +void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) +{ + ULONG nA, nACount; + MetaAction* pMA; + + if( bStatus ) + { + nACount = rMTF.GetActionCount(); + + WMFRecord_SetStretchBltMode(); + + for( nA=0; nAGetType() ) + { + case META_PIXEL_ACTION: + { + const MetaPixelAction* pA = (const MetaPixelAction *) pMA; + aSrcLineInfo = LineInfo(); + SetLineAndFillAttr(); + WMFRecord_SetPixel( pA->GetPoint(), pA->GetColor() ); + } + break; + + case META_POINT_ACTION: + { + const MetaPointAction* pA = (const MetaPointAction*) pMA; + const Point& rPt = pA->GetPoint(); + aSrcLineInfo = LineInfo(); + SetLineAndFillAttr(); + WMFRecord_MoveTo( rPt); + WMFRecord_LineTo( rPt ); + } + break; + + case META_LINE_ACTION: + { + const MetaLineAction* pA = (const MetaLineAction *) pMA; + if(pA->GetLineInfo().IsDefault()) + { + aSrcLineInfo = pA->GetLineInfo(); + SetLineAndFillAttr(); + WMFRecord_MoveTo( pA->GetStartPoint() ); + WMFRecord_LineTo( pA->GetEndPoint() ); + } + else + { + // LineInfo used; handle Dash/Dot and fat lines + basegfx::B2DPolygon aPolygon; + aPolygon.append(basegfx::B2DPoint(pA->GetStartPoint().X(), pA->GetStartPoint().Y())); + aPolygon.append(basegfx::B2DPoint(pA->GetEndPoint().X(), pA->GetEndPoint().Y())); + HandleLineInfoPolyPolygons(pA->GetLineInfo(), aPolygon); + } + } + break; + + case META_RECT_ACTION: + { + const MetaRectAction* pA = (const MetaRectAction*) pMA; + aSrcLineInfo = LineInfo(); + SetLineAndFillAttr(); + WMFRecord_Rectangle( pA->GetRect() ); + } + break; + + case META_ROUNDRECT_ACTION: + { + const MetaRoundRectAction* pA = (const MetaRoundRectAction*) pMA; + aSrcLineInfo = LineInfo(); + SetLineAndFillAttr(); + WMFRecord_RoundRect( pA->GetRect(), pA->GetHorzRound(), pA->GetVertRound() ); + } + break; + + case META_ELLIPSE_ACTION: + { + const MetaEllipseAction* pA = (const MetaEllipseAction*) pMA; + aSrcLineInfo = LineInfo(); + SetLineAndFillAttr(); + WMFRecord_Ellipse( pA->GetRect() ); + } + break; + + case META_ARC_ACTION: + { + const MetaArcAction* pA = (const MetaArcAction*) pMA; + aSrcLineInfo = LineInfo(); + SetLineAndFillAttr(); + WMFRecord_Arc( pA->GetRect(),pA->GetStartPoint(),pA->GetEndPoint() ); + } + break; + + case META_PIE_ACTION: + { + const MetaPieAction* pA = (const MetaPieAction*) pMA; + aSrcLineInfo = LineInfo(); + SetLineAndFillAttr(); + WMFRecord_Pie( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint() ); + } + break; + + + case META_CHORD_ACTION: + { + const MetaChordAction* pA = (const MetaChordAction*) pMA; + aSrcLineInfo = LineInfo(); + SetLineAndFillAttr(); + WMFRecord_Chord( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint() ); + } + break; + + case META_POLYLINE_ACTION: + { + const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pMA; + const Polygon& rPoly = pA->GetPolygon(); + + if( rPoly.GetSize() ) + { + if(pA->GetLineInfo().IsDefault()) + { + aSrcLineInfo = pA->GetLineInfo(); + SetLineAndFillAttr(); + WMFRecord_PolyLine( rPoly ); + } + else + { + // LineInfo used; handle Dash/Dot and fat lines + HandleLineInfoPolyPolygons(pA->GetLineInfo(), rPoly.getB2DPolygon()); + } + } + } + break; + + case META_POLYGON_ACTION: + { + const MetaPolygonAction* pA = (const MetaPolygonAction*) pMA; + aSrcLineInfo = LineInfo(); + SetLineAndFillAttr(); + WMFRecord_Polygon( pA->GetPolygon() ); + } + break; + + case META_POLYPOLYGON_ACTION: + { + const MetaPolyPolygonAction* pA = (const MetaPolyPolygonAction*) pMA; + aSrcLineInfo = LineInfo(); + SetLineAndFillAttr(); + WMFRecord_PolyPolygon( pA->GetPolyPolygon() ); + } + break; + + case META_TEXTRECT_ACTION: + { + const MetaTextRectAction * pA = (const MetaTextRectAction*)pMA; + String aTemp( pA->GetText() ); + aSrcLineInfo = LineInfo(); + SetAllAttr(); + + Point aPos( pA->GetRect().TopLeft() ); + if ( !WMFRecord_Escape_Unicode( aPos, aTemp, NULL ) ) + WMFRecord_TextOut( aPos, aTemp ); + } + break; + + case META_TEXT_ACTION: + { + const MetaTextAction * pA = (const MetaTextAction*) pMA; + String aTemp( pA->GetText(), pA->GetIndex(), pA->GetLen() ); + aSrcLineInfo = LineInfo(); + SetAllAttr(); + if ( !WMFRecord_Escape_Unicode( pA->GetPoint(), aTemp, NULL ) ) + WMFRecord_TextOut( pA->GetPoint(), aTemp ); + } + break; + + case META_TEXTARRAY_ACTION: + { + const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pMA; + + String aTemp( pA->GetText(), pA->GetIndex(), pA->GetLen() ); + aSrcLineInfo = LineInfo(); + SetAllAttr(); + if ( !WMFRecord_Escape_Unicode( pA->GetPoint(), aTemp, pA->GetDXArray() ) ) + WMFRecord_ExtTextOut( pA->GetPoint(), aTemp, pA->GetDXArray() ); + } + break; + + case META_STRETCHTEXT_ACTION: + { + const MetaStretchTextAction* pA = (const MetaStretchTextAction *) pMA; + String aTemp( pA->GetText(), pA->GetIndex(), pA->GetLen() ); + + sal_uInt16 nLen,i; + sal_Int32 nNormSize; + + pVirDev->SetFont( aSrcFont ); + nLen = aTemp.Len(); + sal_Int32* pDXAry = nLen ? new sal_Int32[ nLen ] : NULL; + nNormSize = pVirDev->GetTextArray( aTemp, pDXAry ); + for ( i = 0; i < ( nLen - 1 ); i++ ) + pDXAry[ i ] = pDXAry[ i ] * (sal_Int32)pA->GetWidth() / nNormSize; + if ( ( nLen <= 1 ) || ( (sal_Int32)pA->GetWidth() == nNormSize ) ) + delete[] pDXAry, pDXAry = NULL; + aSrcLineInfo = LineInfo(); + SetAllAttr(); + if ( !WMFRecord_Escape_Unicode( pA->GetPoint(), aTemp, pDXAry ) ) + WMFRecord_ExtTextOut( pA->GetPoint(), aTemp, pDXAry ); + delete[] pDXAry; + } + break; + + case META_BMP_ACTION: + { + const MetaBmpAction* pA = (const MetaBmpAction *) pMA; + WMFRecord_StretchDIB( pA->GetPoint(), pA->GetBitmap().GetSizePixel(), pA->GetBitmap() ); + } + break; + + case META_BMPSCALE_ACTION: + { + const MetaBmpScaleAction* pA = (const MetaBmpScaleAction*) pMA; + WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), pA->GetBitmap() ); + } + break; + + case META_BMPSCALEPART_ACTION: + { + const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*) pMA; + Bitmap aTmp( pA->GetBitmap() ); + + if( aTmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ) ) + WMFRecord_StretchDIB( pA->GetDestPoint(), pA->GetDestSize(), aTmp ); + } + break; + + case META_BMPEX_ACTION: + { + const MetaBmpExAction* pA = (const MetaBmpExAction *) pMA; + Bitmap aBmp( pA->GetBitmapEx().GetBitmap() ); + Bitmap aMsk( pA->GetBitmapEx().GetMask() ); + + if( !!aMsk ) + { + aBmp.Replace( aMsk, COL_WHITE ); + aMsk.Invert(); + WMFRecord_StretchDIB( pA->GetPoint(), aMsk.GetSizePixel(), aBmp, W_SRCPAINT ); + WMFRecord_StretchDIB( pA->GetPoint(), aBmp.GetSizePixel(), aBmp, W_SRCAND ); + } + else + WMFRecord_StretchDIB( pA->GetPoint(), aBmp.GetSizePixel(), aBmp ); + } + break; + + case META_BMPEXSCALE_ACTION: + { + const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pMA; + Bitmap aBmp( pA->GetBitmapEx().GetBitmap() ); + Bitmap aMsk( pA->GetBitmapEx().GetMask() ); + + if( !!aMsk ) + { + aBmp.Replace( aMsk, COL_WHITE ); + aMsk.Invert(); + WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), aMsk, W_SRCPAINT ); + WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), aBmp, W_SRCAND ); + } + else + WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), aBmp ); + } + break; + + case META_BMPEXSCALEPART_ACTION: + { + const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pMA; + BitmapEx aBmpEx( pA->GetBitmapEx() ); + aBmpEx.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); + Bitmap aBmp( aBmpEx.GetBitmap() ); + Bitmap aMsk( aBmpEx.GetMask() ); + + if( !!aMsk ) + { + aBmp.Replace( aMsk, COL_WHITE ); + aMsk.Invert(); + WMFRecord_StretchDIB( pA->GetDestPoint(), pA->GetDestSize(), aMsk, W_SRCPAINT ); + WMFRecord_StretchDIB( pA->GetDestPoint(), pA->GetDestSize(), aBmp, W_SRCAND ); + } + else + WMFRecord_StretchDIB( pA->GetDestPoint(), pA->GetDestSize(), aBmp ); + } + break; + + case META_GRADIENT_ACTION: + { + const MetaGradientAction* pA = (const MetaGradientAction*) pMA; + GDIMetaFile aTmpMtf; + + pVirDev->AddGradientActions( pA->GetRect(), pA->GetGradient(), aTmpMtf ); + WriteRecords( aTmpMtf ); + } + break; + + case META_HATCH_ACTION: + { + const MetaHatchAction* pA = (const MetaHatchAction*) pMA; + GDIMetaFile aTmpMtf; + + pVirDev->AddHatchActions( pA->GetPolyPolygon(), pA->GetHatch(), aTmpMtf ); + WriteRecords( aTmpMtf ); + } + break; + + case META_WALLPAPER_ACTION: + { + const MetaWallpaperAction* pA = (const MetaWallpaperAction*) pMA; + const Color& rColor = pA->GetWallpaper().GetColor(); + const Color aOldLineColor( aSrcLineColor ); + const Color aOldFillColor( aSrcFillColor ); + + aSrcLineColor = rColor; + aSrcFillColor = rColor; + aSrcLineInfo = LineInfo(); + SetLineAndFillAttr(); + WMFRecord_Rectangle( pA->GetRect() ); + aSrcLineColor = aOldLineColor; + aSrcFillColor = aOldFillColor; + } + break; + + case META_ISECTRECTCLIPREGION_ACTION: + { + const MetaISectRectClipRegionAction* pA = (const MetaISectRectClipRegionAction*) pMA; + WMFRecord_IntersectClipRect( pA->GetRect() ); + } + break; + + case META_LINECOLOR_ACTION: + { + const MetaLineColorAction* pA = (const MetaLineColorAction*) pMA; + + if( pA->IsSetting() ) + aSrcLineColor = pA->GetColor(); + else + aSrcLineColor = Color( COL_TRANSPARENT ); + } + break; + + case META_FILLCOLOR_ACTION: + { + const MetaFillColorAction* pA = (const MetaFillColorAction*) pMA; + + if( pA->IsSetting() ) + aSrcFillColor = pA->GetColor(); + else + aSrcFillColor = Color( COL_TRANSPARENT ); + } + break; + + case META_TEXTCOLOR_ACTION: + { + const MetaTextColorAction* pA = (const MetaTextColorAction*) pMA; + aSrcTextColor = pA->GetColor(); + } + break; + + case META_TEXTFILLCOLOR_ACTION: + { + const MetaTextFillColorAction* pA = (const MetaTextFillColorAction*) pMA; + if( pA->IsSetting() ) + aSrcFont.SetFillColor( pA->GetColor() ); + else + aSrcFont.SetFillColor( Color( COL_TRANSPARENT ) ); + } + break; + + case META_TEXTALIGN_ACTION: + { + const MetaTextAlignAction* pA = (const MetaTextAlignAction*) pMA; + eSrcTextAlign = pA->GetTextAlign(); + } + break; + + case META_MAPMODE_ACTION: + { + const MetaMapModeAction* pA = (const MetaMapModeAction*) pMA; + + if (aSrcMapMode!=pA->GetMapMode()) + { + if( pA->GetMapMode().GetMapUnit() == MAP_RELATIVE ) + { + MapMode aMM = pA->GetMapMode(); + Fraction aScaleX = aMM.GetScaleX(); + Fraction aScaleY = aMM.GetScaleY(); + + Point aOrigin = aSrcMapMode.GetOrigin(); + BigInt aX( aOrigin.X() ); + aX *= BigInt( aScaleX.GetDenominator() ); + if( aOrigin.X() >= 0 ) + if( aScaleX.GetNumerator() >= 0 ) + aX += BigInt( aScaleX.GetNumerator()/2 ); + else + aX -= BigInt( (aScaleX.GetNumerator()+1)/2 ); + else + if( aScaleX.GetNumerator() >= 0 ) + aX -= BigInt( (aScaleX.GetNumerator()-1)/2 ); + else + aX += BigInt( aScaleX.GetNumerator()/2 ); + aX /= BigInt( aScaleX.GetNumerator() ); + aOrigin.X() = (long)aX + aMM.GetOrigin().X(); + BigInt aY( aOrigin.Y() ); + aY *= BigInt( aScaleY.GetDenominator() ); + if( aOrigin.Y() >= 0 ) + if( aScaleY.GetNumerator() >= 0 ) + aY += BigInt( aScaleY.GetNumerator()/2 ); + else + aY -= BigInt( (aScaleY.GetNumerator()+1)/2 ); + else + if( aScaleY.GetNumerator() >= 0 ) + aY -= BigInt( (aScaleY.GetNumerator()-1)/2 ); + else + aY += BigInt( aScaleY.GetNumerator()/2 ); + aY /= BigInt( aScaleY.GetNumerator() ); + aOrigin.Y() = (long)aY + aMM.GetOrigin().Y(); + aSrcMapMode.SetOrigin( aOrigin ); + + aScaleX *= aSrcMapMode.GetScaleX(); + aScaleY *= aSrcMapMode.GetScaleY(); + aSrcMapMode.SetScaleX( aScaleX ); + aSrcMapMode.SetScaleY( aScaleY ); + } + else + aSrcMapMode=pA->GetMapMode(); + } + } + break; + + case META_FONT_ACTION: + { + const MetaFontAction* pA = (const MetaFontAction*) pMA; + aSrcFont = pA->GetFont(); + + if ( aSrcFont.GetCharSet() == RTL_TEXTENCODING_DONTKNOW ) + aSrcFont.SetCharSet( GetExtendedTextEncoding( gsl_getSystemTextEncoding() ) ); + if ( aSrcFont.GetCharSet() == RTL_TEXTENCODING_UNICODE ) + aSrcFont.SetCharSet( RTL_TEXTENCODING_MS_1252 ); + eSrcTextAlign = aSrcFont.GetAlign(); + aSrcTextColor = aSrcFont.GetColor(); + aSrcFont.SetAlign( ALIGN_BASELINE ); + aSrcFont.SetColor( COL_WHITE ); + } + break; + + case META_PUSH_ACTION: + { + const MetaPushAction* pA = (const MetaPushAction*)pMA; + + WMFWriterAttrStackMember* pAt = new WMFWriterAttrStackMember; + pAt->nFlags = pA->GetFlags(); + pAt->aClipRegion = aSrcClipRegion; + pAt->aLineColor=aSrcLineColor; + pAt->aFillColor=aSrcFillColor; + pAt->eRasterOp=eSrcRasterOp; + pAt->aFont=aSrcFont; + pAt->eTextAlign=eSrcTextAlign; + pAt->aTextColor=aSrcTextColor; + pAt->aMapMode=aSrcMapMode; + pAt->aLineInfo=aDstLineInfo; + pAt->pSucc=pAttrStack; + pAttrStack=pAt; + + SetAllAttr(); // update ( now all source attributes are equal to the destination attributes ) + WMFRecord_SaveDC(); + + } + break; + + case META_POP_ACTION: + { + WMFWriterAttrStackMember * pAt=pAttrStack; + + if( pAt ) + { + aDstLineInfo = pAt->aLineInfo; + aDstLineColor = pAt->aLineColor; + if ( pAt->nFlags & PUSH_LINECOLOR ) + aSrcLineColor = pAt->aLineColor; + aDstFillColor = pAt->aFillColor; + if ( pAt->nFlags & PUSH_FILLCOLOR ) + aSrcFillColor = pAt->aFillColor; + eDstROP2 = pAt->eRasterOp; + if ( pAt->nFlags & PUSH_RASTEROP ) + eSrcRasterOp = pAt->eRasterOp; + aDstFont = pAt->aFont; + if ( pAt->nFlags & PUSH_FONT ) + aSrcFont = pAt->aFont; + eDstTextAlign = pAt->eTextAlign; + if ( pAt->nFlags & ( PUSH_FONT | PUSH_TEXTALIGN ) ) + eSrcTextAlign = pAt->eTextAlign; + aDstTextColor = pAt->aTextColor; + if ( pAt->nFlags & ( PUSH_FONT | PUSH_TEXTCOLOR ) ) + aSrcTextColor = pAt->aTextColor; + if ( pAt->nFlags & PUSH_MAPMODE ) + aSrcMapMode = pAt->aMapMode; + aDstClipRegion = pAt->aClipRegion; + if ( pAt->nFlags & PUSH_CLIPREGION ) + aSrcClipRegion = pAt->aClipRegion; + + WMFRecord_RestoreDC(); + pAttrStack = pAt->pSucc; + delete pAt; + } + } + break; + + case META_EPS_ACTION : + { + const MetaEPSAction* pA = (const MetaEPSAction*)pMA; + const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() ); + + INT32 nCount = aGDIMetaFile.GetActionCount(); + for ( INT32 i = 0; i < nCount; i++ ) + { + const MetaAction* pMetaAct = aGDIMetaFile.GetAction( i ); + if ( pMetaAct->GetType() == META_BMPSCALE_ACTION ) + { + const MetaBmpScaleAction* pBmpScaleAction = (const MetaBmpScaleAction*)pMetaAct; + WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), pBmpScaleAction->GetBitmap() ); + break; + } + } + } + break; + + case META_RASTEROP_ACTION: + { + const MetaRasterOpAction* pA = (const MetaRasterOpAction*) pMA; + eSrcRasterOp=pA->GetRasterOp(); + } + break; + + case META_TRANSPARENT_ACTION: + { + aSrcLineInfo = LineInfo(); + SetLineAndFillAttr(); + WMFRecord_PolyPolygon( ( (MetaTransparentAction*) pMA )->GetPolyPolygon() ); + } + break; + + case META_FLOATTRANSPARENT_ACTION: + { + const MetaFloatTransparentAction* pA = (const MetaFloatTransparentAction*) pMA; + + GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() ); + Point aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() ); + const Size aSrcSize( aTmpMtf.GetPrefSize() ); + const Point aDestPt( pA->GetPoint() ); + const Size aDestSize( pA->GetSize() ); + const double fScaleX = aSrcSize.Width() ? (double) aDestSize.Width() / aSrcSize.Width() : 1.0; + const double fScaleY = aSrcSize.Height() ? (double) aDestSize.Height() / aSrcSize.Height() : 1.0; + long nMoveX, nMoveY; + + aSrcLineInfo = LineInfo(); + SetAllAttr(); + + if( fScaleX != 1.0 || fScaleY != 1.0 ) + { + aTmpMtf.Scale( fScaleX, fScaleY ); + aSrcPt.X() = FRound( aSrcPt.X() * fScaleX ), aSrcPt.Y() = FRound( aSrcPt.Y() * fScaleY ); + } + + nMoveX = aDestPt.X() - aSrcPt.X(), nMoveY = aDestPt.Y() - aSrcPt.Y(); + + if( nMoveX || nMoveY ) + aTmpMtf.Move( nMoveX, nMoveY ); + + WriteRecords( aTmpMtf ); + } + break; + + case( META_LAYOUTMODE_ACTION ): + { + sal_uInt32 nLayoutMode = ( (MetaLayoutModeAction*) pMA )->GetLayoutMode(); + eSrcHorTextAlign = 0; // TA_LEFT + if (nLayoutMode & TEXT_LAYOUT_BIDI_RTL) + { + eSrcHorTextAlign = W_TA_RIGHT | W_TA_RTLREADING; + } + if (nLayoutMode & TEXT_LAYOUT_TEXTORIGIN_RIGHT) + eSrcHorTextAlign |= W_TA_RIGHT; + else if (nLayoutMode & TEXT_LAYOUT_TEXTORIGIN_LEFT) + eSrcHorTextAlign &= ~W_TA_RIGHT; + break; + } + + // Unsupported Actions + case META_MASK_ACTION: + case META_MASKSCALE_ACTION: + case META_MASKSCALEPART_ACTION: + { + DBG_ERROR( "Unsupported action: MetaMask...Action!" ); + } + break; + + case META_CLIPREGION_ACTION: + break; + + case META_ISECTREGIONCLIPREGION_ACTION: + { + DBG_ERROR( "Unsupported action: MetaISectRegionClipRegionAction!" ); + } + break; + + case META_MOVECLIPREGION_ACTION: + { + DBG_ERROR( "Unsupported action: MetaMoveClipRegionAction!" ); + } + break; + + case( META_RENDERGRAPHIC_ACTION ): + { + const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pMA; + const ::vcl::RenderGraphicRasterizer aRasterizer( pA->GetRenderGraphic() ); + const BitmapEx aBmpEx( aRasterizer.Rasterize( pVirDev->LogicToPixel( pA->GetSize(), aSrcMapMode ) ) ); + Bitmap aBmp( aBmpEx.GetBitmap() ); + Bitmap aMsk( aBmpEx.GetMask() ); + + if( !!aMsk ) + { + aBmp.Replace( aMsk, COL_WHITE ); + aMsk.Invert(); + WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), aMsk, W_SRCPAINT ); + WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), aBmp, W_SRCAND ); + } + else + WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), aBmp ); + } + break; + + default: + { + DBG_ERROR( "Unsupported meta action!" ); + } + break; + } + + nWrittenActions++; + MayCallback(); + + if (pWMF->GetError()) + bStatus=FALSE; + + if(bStatus==FALSE) + break; + } + } +} + +// ------------------------------------------------------------------------ + +void WMFWriter::WriteHeader( const GDIMetaFile &, BOOL bPlaceable ) +{ + if( bPlaceable ) + { + USHORT nCheckSum, nValue; + Size aSize( pVirDev->LogicToLogic(Size(1,1),MapMode(MAP_INCH), aTargetMapMode) ); + USHORT nUnitsPerInch = (USHORT) ( ( aSize.Width() + aSize.Height() ) >> 1 ); + + nCheckSum=0; + nValue=0xcdd7; nCheckSum^=nValue; *pWMF << nValue; + nValue=0x9ac6; nCheckSum^=nValue; *pWMF << nValue; + nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue; + nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue; + nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue; + nValue=(USHORT) aTargetSize.Width(); nCheckSum^=nValue; *pWMF << nValue; + nValue=(USHORT) aTargetSize.Height(); nCheckSum^=nValue; *pWMF << nValue; + nValue=nUnitsPerInch; nCheckSum^=nValue; *pWMF << nValue; + nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue; + nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue; + *pWMF << nCheckSum; + } + + nMetafileHeaderPos=pWMF->Tell(); + *pWMF << (sal_uInt16)0x0001 // Typ: Datei + << (sal_uInt16)0x0009 // Headerlaenge in Worten + << (sal_uInt16)0x0300 // Version als BCD-Zahl + << (sal_uInt32) 0x00000000 // Dateilaenge (ohne 1. Header), wird spaeter durch UpdateHeader() berichtigt + << (sal_uInt16)MAXOBJECTHANDLES // Maximalezahl der gleichzeitigen Objekte + << (sal_uInt32) 0x00000000 // Maximale Record-laenge, wird spaeter durch UpdateHeader() berichtigt + << (sal_uInt16)0x0000; // Reserved +} + +// ------------------------------------------------------------------------ + +void WMFWriter::UpdateHeader() +{ + ULONG nPos; + sal_uInt32 nFileSize; + + nPos=pWMF->Tell(); // Endposition = Gesammtgroesse der Datei + nFileSize=nPos-nMetafileHeaderPos; // Groesse des 1. Headers abziehen + if ((nFileSize&1)!=0) { // ggf. auf ganze Worte aufrunden + *pWMF << (BYTE)0; + nPos++; + nFileSize++; + } + nFileSize>>=1; // In Anzahl Worte umrechnen + pWMF->Seek(nMetafileHeaderPos+6); // Zum Dateigroessen-Eintrag im zweiten Header + *pWMF << nFileSize; // Dateigroesse berichtigen + pWMF->SeekRel(2); // Zum Max-Record-Laenge-Eintrag im zweiten Header + *pWMF << nMaxRecordSize; // und berichtigen + pWMF->Seek(nPos); +} + +// ------------------------------------------------------------------------ + +BOOL WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream, + FilterConfigItem* pFConfigItem, BOOL bPlaceable ) +{ + WMFWriterAttrStackMember * pAt; + + bEmbedEMF = TRUE; + bStatus=TRUE; + pConvert = 0; + pVirDev = new VirtualDevice; + + pFilterConfigItem = pFConfigItem; + if ( pFilterConfigItem ) + { + xStatusIndicator = pFilterConfigItem->GetStatusIndicator(); + if ( xStatusIndicator.is() ) + { + rtl::OUString aMsg; + xStatusIndicator->start( aMsg, 100 ); + } + } + nLastPercent=0; + + pWMF=&rTargetStream; + pWMF->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); + + nMaxRecordSize=0; + + aSrcMapMode=rMTF.GetPrefMapMode(); + + if( bPlaceable ) + { + aTargetMapMode = aSrcMapMode; + aTargetSize = rMTF.GetPrefSize(); + nTargetDivisor = CalcSaveTargetMapMode(aTargetMapMode, aTargetSize); + aTargetSize.Width() /= nTargetDivisor; + aTargetSize.Height() /= nTargetDivisor; + } + else + { + aTargetMapMode = MapMode( MAP_INCH ); + + const long nUnit = pVirDev->LogicToPixel( Size( 1, 1 ), aTargetMapMode ).Width(); + const Fraction aFrac( 1, nUnit ); + + aTargetMapMode.SetScaleX( aFrac ); + aTargetMapMode.SetScaleY( aFrac ); + aTargetSize = pVirDev->LogicToLogic( rMTF.GetPrefSize(), aSrcMapMode, aTargetMapMode ); + } + + pVirDev->SetMapMode( aTargetMapMode ); + + pAttrStack=NULL; + + for (USHORT i=0; ipSucc; + delete pAt; + } + + delete pVirDev; + delete pConvert; + + if ( xStatusIndicator.is() ) + xStatusIndicator->end(); + + return bStatus; +} + +// ------------------------------------------------------------------------ + +USHORT WMFWriter::CalcSaveTargetMapMode(MapMode& rMapMode, + const Size& rPrefSize) +{ + Fraction aDivFrac(2, 1); + USHORT nDivisor = 1; + + Size aSize = pVirDev->LogicToLogic( rPrefSize, aSrcMapMode, rMapMode ); + + while( nDivisor <= 64 && (aSize.Width() > 32767 || aSize.Height() > 32767) ) + { + Fraction aFrac = rMapMode.GetScaleX(); + + aFrac *= aDivFrac; + rMapMode.SetScaleX(aFrac); + aFrac = rMapMode.GetScaleY(); + aFrac *= aDivFrac; + rMapMode.SetScaleY(aFrac); + nDivisor <<= 1; + aSize = pVirDev->LogicToLogic( rPrefSize, aSrcMapMode, rMapMode ); + } + + return nDivisor; +} + +// ------------------------------------------------------------------------ + +void WMFWriter::WriteEmbeddedEMF( const GDIMetaFile& rMTF ) +{ + EMFWriter aEMFWriter; + SvMemoryStream aStream; + + if( aEMFWriter.WriteEMF( rMTF, aStream ) ) + { + sal_Size nTotalSize = aStream.Tell(); + if( nTotalSize > SAL_MAX_UINT32 ) + return; + aStream.Seek( 0 ); + sal_uInt32 nRemainingSize = static_cast< sal_uInt32 >( nTotalSize ); + sal_uInt32 nRecCounts = ( (nTotalSize - 1) / 0x2000 ) + 1; + sal_uInt16 nCheckSum = 0, nWord; + + sal_uInt32 nPos = 0; + + while( nPos + 1 < nTotalSize ) + { + aStream >> nWord; + nCheckSum ^= nWord; + nPos += 2; + } + + nCheckSum = static_cast< sal_uInt16 >( nCheckSum * -1 ); + + aStream.Seek( 0 ); + while( nRemainingSize > 0 ) + { + sal_uInt32 nCurSize; + if( nRemainingSize > 0x2000 ) + { + nCurSize = 0x2000; + nRemainingSize -= 0x2000; + } + else + { + nCurSize = nRemainingSize; + nRemainingSize = 0; + } + WriteEMFRecord( aStream, + nCurSize, + nRemainingSize, + nTotalSize, + nRecCounts, + nCheckSum ); + nCheckSum = 0; + } + } +} + +// ------------------------------------------------------------------------ + +void WMFWriter::WriteEMFRecord( SvMemoryStream& rStream, sal_uInt32 nCurSize, sal_uInt32 nRemainingSize, + sal_uInt32 nTotalSize, sal_uInt32 nRecCounts, sal_uInt16 nCheckSum ) +{ + // according to http://msdn.microsoft.com/en-us/library/dd366152%28PROT.13%29.aspx + WriteRecordHeader( 0, W_META_ESCAPE ); + *pWMF << (sal_uInt16)W_MFCOMMENT // same as META_ESCAPE_ENHANCED_METAFILE + << (sal_uInt16)( nCurSize + 34 ) // we will always have a 34 byte escape header: + << (sal_uInt32) 0x43464D57 // WMFC + << (sal_uInt32) 0x00000001 // Comment type + << (sal_uInt32) 0x00010000 // version + << nCheckSum // check sum + << (sal_uInt32) 0 // flags = 0 + << nRecCounts // total number of records + << nCurSize // size of this record's data + << nRemainingSize // remaining size of data in following records, missing in MSDN documentation + << nTotalSize; // total size of EMF stream + + pWMF->Write( static_cast< const sal_Char* >( rStream.GetData() ) + rStream.Tell(), nCurSize ); + rStream.SeekRel( nCurSize ); + UpdateRecordHeader(); +} diff --git a/svtools/source/filter/wmf/wmfwr.hxx b/svtools/source/filter/wmf/wmfwr.hxx new file mode 100644 index 000000000000..9fe698b22c2e --- /dev/null +++ b/svtools/source/filter/wmf/wmfwr.hxx @@ -0,0 +1,229 @@ +/************************************************************************* + * + * 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 _WMFWR_HXX +#define _WMFWR_HXX + +#include +#include +#include +#include +#include +#include +#include + +// ----------------------------------------------------------------------------- + +#define MAXOBJECTHANDLES 16 + +// ----------------------------------------------------------------------------- + +struct WMFWriterAttrStackMember +{ + struct WMFWriterAttrStackMember * pSucc; + Color aLineColor; + Color aFillColor; + Color aTextColor; + LineInfo aLineInfo; + TextAlign eTextAlign; + RasterOp eRasterOp; + Font aFont; + MapMode aMapMode; + Region aClipRegion; + sal_uInt16 nFlags; +}; + +// ------------- +// - WMFWriter - +// ------------- + +class StarSymbolToMSMultiFont; +class LineInfo; +namespace basegfx { class B2DPolygon; } + +class WMFWriter +{ +private: + + BOOL bStatus; + + ULONG nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde. + FilterConfigItem* pFilterConfigItem; + + com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator; + + SvStream* pWMF; + VirtualDevice* pVirDev; + StarSymbolToMSMultiFont *pConvert; + MapMode aTargetMapMode; + Size aTargetSize; + USHORT nTargetDivisor; + + ULONG nMetafileHeaderPos; + sal_uInt32 nMaxRecordSize; // in Worten + ULONG nActRecordPos; + + // Aktuelle Attribute im Quell-Metafile: + Color aSrcLineColor; + Color aSrcFillColor; + Color aSrcTextColor; + LineInfo aSrcLineInfo; + RasterOp eSrcRasterOp; + FontAlign eSrcTextAlign; + Font aSrcFont; + MapMode aSrcMapMode; + BOOL bSrcIsClipping; + Region aSrcClipRegion; + WMFWriterAttrStackMember * pAttrStack; + + UINT32 eSrcHorTextAlign; + + // Aktuelle Attribute im Ziel-Metafile: + Color aDstLineColor; + Color aDstFillColor; + Color aDstTextColor; + LineInfo aDstLineInfo; + RasterOp eDstROP2; + FontAlign eDstTextAlign; + Font aDstFont; + + UINT32 eDstHorTextAlign; + + BOOL bDstIsClipping; // ???: derzeit unberuecksichtigt + Region aDstClipRegion; // ???: derzeit unberuecksichtigt + BOOL bHandleAllocated[MAXOBJECTHANDLES]; // Welche Handles vergeben sind + USHORT nDstPenHandle,nDstFontHandle,nDstBrushHandle; // Welche Handles die jeweiligen + // Selected-Objects besitzen + // 0xffff = keines: + + // Damit nicht bei jeder Operation alle Attribute verglichen werden muessen: + + ULONG nNumberOfActions; // Anzahl der Actions im GDIMetafile + ULONG nNumberOfBitmaps; // Anzahl der Bitmaps + ULONG nWrittenActions; // Anzahl der bereits verarbeiteten Actions beim Schreiben der Orders + ULONG nWrittenBitmaps; // Anzahl der bereits geschriebenen Bitmaps + ULONG nActBitmapPercent; // Wieviel Prozent die naechste Bitmap schon geschrieben ist. + + BOOL bEmbedEMF; // optionally embedd EMF data into WMF + + void MayCallback(); + // Berechnet anhand der obigen 5 Parameter eine Prozentzahl + // und macht dann ggf. einen Callback. Setzt bStatus auf FALSE wenn User abbrechen + // moechte. + + void CountActionsAndBitmaps(const GDIMetaFile & rMTF); + // Zaehlt die Bitmaps und Actions (nNumberOfActions und nNumberOfBitmaps muessen + // zu Anfang auf 0 gesetzt werden, weil diese Methode rekursiv ist) + + void WritePointXY(const Point & rPoint); + void WritePointYX(const Point & rPoint); + sal_Int32 ScaleWidth( sal_Int32 nDX ); + void WriteSize(const Size & rSize); + void WriteHeightWidth(const Size & rSize); + void WriteRectangle(const Rectangle & rRect); + void WriteColor(const Color & rColor); + + void WriteRecordHeader(sal_uInt32 nSizeWords, sal_uInt16 nType); + // nSizeWords ist die Groesse des gesammten Records in Anzahl Worte. + // Wenn nSizeWords unbekannt ist, dann 0 einsetzen (siehe UpdateRecordHeader()). + + void UpdateRecordHeader(); + // berichtig die Groesse des Records nach dem Schreiben der Parameter, wenn + // nSizeWords bei Aufruf von WriteRecordHeader(..) unbekannt war. + // fuegt ggf. noch ein BYTE 0 ein damit Anzahl Bytes immer gerade. + + void WMFRecord_Arc(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt); + void WMFRecord_Chord(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt); + void WMFRecord_CreateBrushIndirect(const Color& rColor); + void WMFRecord_CreateFontIndirect(const Font & rFont); + void WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo& rLineInfo ); + void WMFRecord_DeleteObject(USHORT nObjectHandle); + void WMFRecord_Ellipse(const Rectangle & rRect); + void WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_Int8* pData ); + sal_Bool WMFRecord_Escape_Unicode( const Point& rPoint, const String& rStr, const sal_Int32 * pDXAry ); + void WMFRecord_ExtTextOut(const Point & rPoint, const String & rString, const sal_Int32 * pDXAry); + + void TrueExtTextOut(const Point & rPoint, const String & rString, + const ByteString & rByteString, const sal_Int32 * pDXAry); + void TrueTextOut(const Point & rPoint, const ByteString& rString); + void WMFRecord_LineTo(const Point & rPoint); + void WMFRecord_MoveTo(const Point & rPoint); + void WMFRecord_Pie(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt); + void WMFRecord_Polygon(const Polygon & rPoly); + void WMFRecord_PolyLine(const Polygon & rPoly); + void WMFRecord_PolyPolygon(const PolyPolygon & rPolyPoly); + void WMFRecord_Rectangle(const Rectangle & rRect); + void WMFRecord_RestoreDC(); + void WMFRecord_RoundRect(const Rectangle & rRect, long nHorzRound, long nVertRound); + void WMFRecord_SaveDC(); + void WMFRecord_SelectObject(USHORT nObjectHandle); + void WMFRecord_SetBkColor(const Color & rColor); + void WMFRecord_SetBkMode(BOOL bTransparent); + void WMFRecord_SetStretchBltMode(); + void WMFRecord_SetPixel(const Point & rPoint, const Color & rColor); + void WMFRecord_SetROP2(RasterOp eROP); + void WMFRecord_SetTextAlign(FontAlign eFontAlign, UINT32 eHorTextAlign); + void WMFRecord_SetTextColor(const Color & rColor); + void WMFRecord_SetWindowExt(const Size & rSize); + void WMFRecord_SetWindowOrg(const Point & rPoint); + void WMFRecord_StretchDIB(const Point & rPoint, const Size & rSize, const Bitmap & rBitmap, sal_uInt32 nROP = 0UL ); + void WMFRecord_TextOut(const Point & rPoint, const String & rString); + void WMFRecord_EndOfFile(); + void WMFRecord_IntersectClipRect( const Rectangle& rRect); + + USHORT AllocHandle(); + void FreeHandle(USHORT nObjectHandle); + void CreateSelectDeletePen( const Color& rColor, const LineInfo& rLineInfo ); + void CreateSelectDeleteFont(const Font & rFont); + void CreateSelectDeleteBrush(const Color& rColor); + + void SetLineAndFillAttr(); + void SetAllAttr(); + + void HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon); + void WriteRecords(const GDIMetaFile & rMTF); + + void WriteHeader(const GDIMetaFile & rMTF, BOOL bPlaceable); + void UpdateHeader(); + + void WriteEmbeddedEMF( const GDIMetaFile& rMTF ); + void WriteEMFRecord( SvMemoryStream& rStream, sal_uInt32 nCurSize, + sal_uInt32 nRemainingSize, + sal_uInt32 nTotalSize, + sal_uInt32 nRecCounts, + sal_uInt16 nCheckSum ); + + USHORT CalcSaveTargetMapMode(MapMode& rMapMode, const Size& rPrefSize); + +public: + + WMFWriter() {} + + BOOL WriteWMF(const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pFilterConfigItem, BOOL bPlaceable=TRUE); +}; + +#endif diff --git a/vcl/inc/vcl/rendergraphic.hxx b/vcl/inc/vcl/rendergraphic.hxx new file mode 100644 index 000000000000..0a0f475decd6 --- /dev/null +++ b/vcl/inc/vcl/rendergraphic.hxx @@ -0,0 +1,124 @@ +/************************************************************************* + * + * 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 _SV_RENDERGRAPHIC_HXX +#define _SV_RENDERGRAPHIC_HXX + +#include +#include +#include +#include + +class SvStream; +class MapMode; +class Size; +class BitmapEx; + +namespace vcl +{ + // ----------------- + // - RenderGraphic - + // ----------------- + class VCL_DLLPUBLIC RenderGraphic + { + public: + + typedef boost::shared_array< sal_uInt8 > GraphicData; + + friend VCL_DLLPUBLIC ::SvStream& operator>>( ::SvStream& rIStm, RenderGraphic& rRenderGraphic ); + friend VCL_DLLPUBLIC ::SvStream& operator<<( ::SvStream& rOStm, const RenderGraphic& rRenderGraphic ); + + public: + + RenderGraphic( ); + + RenderGraphic( const RenderGraphic& rRenderGraphic ); + + RenderGraphic( const GraphicData& rGraphicData, + sal_uInt32 nGraphicDataLength, + const rtl::OUString& rGraphicDataMimeType ); + + RenderGraphic( const rtl::OUString& rGraphicDataMimeType, + sal_uInt32 nGraphicDataLength, + const sal_uInt8* pGraphicData = NULL ); + + virtual ~RenderGraphic(); + + RenderGraphic& operator=(const RenderGraphic& rRenderGraphic ); + + bool operator==(const RenderGraphic& rRenderGraphic ) const; + + inline bool operator!=(const RenderGraphic& rRenderGraphic ) const + { + return( !( rRenderGraphic == *this ) ); + } + + bool IsEqual( const RenderGraphic& rRenderGraphic ) const; + + bool operator!() const; + + inline bool IsEmpty( ) const + { + return( !( *this ) ); + } + + inline const GraphicData& GetGraphicData( ) const + { + return( maGraphicData ); + } + + inline sal_uInt32 GetGraphicDataLength( ) const + { + return( mnGraphicDataLength ); + } + + inline const rtl::OUString& GetGraphicDataMimeType( ) const + { + return( maGraphicDataMimeType ); + } + + const MapMode& GetPrefMapMode() const; + const Size& GetPrefSize() const; + + BitmapEx GetReplacement() const; + + private: + + void ImplCheckData(); + void ImplGetDefaults() const; + + private: + + GraphicData maGraphicData; + sal_uInt32 mnGraphicDataLength; + rtl::OUString maGraphicDataMimeType; + mutable ::std::auto_ptr< MapMode > mapPrefMapMode; + mutable ::std::auto_ptr< Size > mapPrefSize; + }; +} + +#endif // _SV_RENDERHRAPHIC_HXX diff --git a/vcl/inc/vcl/rendergraphicrasterizer.hxx b/vcl/inc/vcl/rendergraphicrasterizer.hxx new file mode 100644 index 000000000000..f2166b03ffb3 --- /dev/null +++ b/vcl/inc/vcl/rendergraphicrasterizer.hxx @@ -0,0 +1,111 @@ +/************************************************************************* + * + * 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 _SV_RENDERGRAPHICRASTERIZER_HXX +#define _SV_RENDERGRAPHICRASTERIZER_HXX + +#include +#include + +#include + +#include +#include + +#define VCL_RASTERIZER_UNLIMITED_EXTENT 0x00000000 +#define VCL_RASTERIZER_DEFAULT_EXTENT 0xffffffff + +namespace vcl +{ + // --------------------------- + // - RenderGraphicRasterizer - + // --------------------------- + + class VCL_DLLPUBLIC RenderGraphicRasterizer + { + public: + + RenderGraphicRasterizer( const RenderGraphic& rData ); + + + RenderGraphicRasterizer( const RenderGraphicRasterizer& rRenderGraphicRasterizer ); + + virtual ~RenderGraphicRasterizer(); + + RenderGraphicRasterizer& operator=( const RenderGraphicRasterizer& rRenderGraphicRasterizer ); + + inline const RenderGraphic& GetRenderGraphic() const + { + return( maRenderGraphic ); + } + + const Size& GetDefaultSizePixel() const; + + BitmapEx GetReplacement() const; + + virtual Size GetPrefSize() const; + + virtual MapMode GetPrefMapMode() const; + + virtual const BitmapEx& Rasterize( const Size& rSizePixel_UnrotatedUnsheared, + double fRotateAngle = 0.0, + double fShearAngleX = 0.0, + double fShearAngleY = 0.0, + sal_uInt32 nMaxExtent = VCL_RASTERIZER_DEFAULT_EXTENT ) const; + + protected: + + RenderGraphic maRenderGraphic; + mutable com::sun::star::uno::Reference< com::sun::star::graphic::XGraphicRasterizer > mxRasterizer; + + virtual void InitializeRasterizer(); + + private: + + RenderGraphicRasterizer(); + + mutable BitmapEx maBitmapEx; + mutable Size maDefaultSizePixel; + mutable double mfRotateAngle; + mutable double mfShearAngleX; + mutable double mfShearAngleY; + + private: + + typedef ::std::deque< RenderGraphicRasterizer > RenderGraphicRasterizerCache; + + static RenderGraphicRasterizerCache& ImplGetCache(); + + static bool ImplInitializeFromCache( RenderGraphicRasterizer& rRasterizer ); + static bool ImplRasterizeFromCache( RenderGraphicRasterizer& rRasterizer, + const Size& rSizePixel, double fRotateAngle, + double fShearAngleX, double fShearAngleY ); + static void ImplUpdateCache( const RenderGraphicRasterizer& rRasterizer ); +}; +} + +#endif // _SV_RENDERGRAPHICRASTERIZER_HXX diff --git a/vcl/inc/vcl/svgread.hxx b/vcl/inc/vcl/svgread.hxx new file mode 100644 index 000000000000..ea4388767d02 --- /dev/null +++ b/vcl/inc/vcl/svgread.hxx @@ -0,0 +1,80 @@ +/************************************************************************* + * + * 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 _SV_SVGREAD_HXX +#define _SV_SVGREAD_HXX + +#include +#include + +// ------------- +// - SVGReader - +// ------------- + +class SvStream; +class GDIMetaFile; + +namespace vcl +{ + class SVGReaderImpl; + + class VCL_DLLPUBLIC SVGReader + { + public: + + SVGReader( SvStream& rStm ); + ~SVGReader(); + + /* rSVGMtf is an output parameter, that is also returned + by the method as well. + + In case of a failure, the GDIMetaFile will not contain + any actions at all and thus GDIMetaFile::GetActionCount + will return 0. + + In case of success, the GDIMetaFile will contain a + META_RENDERGRAPHIC_ACTION, containing the SVG raw data. The + data can be rendered by using the standard ways to output a + GDIMetaFile, e.g. calling GDIMetaFile::Play + + */ + GDIMetaFile& Read( GDIMetaFile& rSVGMtf ); + + private: + + SVGReader(); + SVGReader( const SVGReader& rReader ); + + inline SVGReader& operator=( const SVGReader& /* rReader */ ) { return( *this ); } + + private: + + std::auto_ptr< SVGReaderImpl > mapImpl; + }; +} + +#endif // _SV_SVGREAD_HXX diff --git a/vcl/source/components/rasterizer_rsvg.cxx b/vcl/source/components/rasterizer_rsvg.cxx new file mode 100644 index 000000000000..52a550220923 --- /dev/null +++ b/vcl/source/components/rasterizer_rsvg.cxx @@ -0,0 +1,633 @@ +/************************************************************************* + * + * 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_vcl.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#if defined MACOSX + #define VCL_RSVG_GOBJECT_LIBNAME "libgobject-2.0.0.dylib" + #define VCL_RSVG_CAIRO_LIBNAME "libcairo.2.dylib" + #define VCL_RSVG_LIBRSVG_LIBNAME "librsvg-2.2.dylib" +#elif defined UNX + #define VCL_RSVG_GOBJECT_LIBNAME "libgobject-2.0.so" + #define VCL_RSVG_CAIRO_LIBNAME "libcairo.so" + #define VCL_RSVG_LIBRSVG_LIBNAME "librsvg-2.so" +#elif defined WNT + #define VCL_RSVG_GOBJECT_LIBNAME "libgobject-2.0-0.dll" + #define VCL_RSVG_CAIRO_LIBNAME "libcairo-2.dll" + #define VCL_RSVG_LIBRSVG_LIBNAME "librsvg-2-2.dll" +#else + #define VCL_RSVG_GOBJECT_LIBNAME "nogobjectlib" + #define VCL_RSVG_CAIRO_LIBNAME "nocairolib" + #define VCL_RSVG_LIBRSVG_LIBNAME "nolibrsvglib" +#endif + +#define VCL_RSVG_DEFAULT_DPI 72 + +using namespace ::com::sun::star; + +// ----------------------------------------------------- +// - external stuff for dynamic library function calls - +// ----------------------------------------------------- + +typedef int gboolean; +typedef unsigned char guint8; +typedef sal_Size gsize; +typedef void* gpointer; + +struct GError; + +enum cairo_format_t { CAIRO_FORMAT_ARGB32 = 0 }; +enum cairo_status_t { CAIRO_STATUS_SUCCESS = 0 }; + +struct cairo_surface_t; +struct cairo_t; +struct cairo_matrix_t +{ + double xx; double yx; + double xy; double yy; + double x0; double y0; +}; + +struct RsvgHandle; +struct RsvgDimensionData +{ + int width; + int height; + double em; + double ex; +}; + +namespace vcl +{ +namespace rsvg +{ +// ----------------- +// - Uno functions - +// ---------------- + +uno::Sequence< ::rtl::OUString > Rasterizer_getSupportedServiceNames() +{ + static ::rtl::OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.graphic.GraphicRasterizer_RSVG" ) ); + static uno::Sequence< ::rtl::OUString > aServiceNames( &aServiceName, 1 ); + + return( aServiceNames ); +} + +// ----------------------------------------------------------------------------- + +::rtl::OUString Rasterizer_getImplementationName() +{ + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "vcl::rsvg::Rasterizer" ) ); +} + +// ------------------ +// - LibraryWrapper - +// ------------------ + +class LibraryWrapper +{ +public: + + static LibraryWrapper& get(); + + bool isValid() const { return( ( mpGObjectLib != NULL ) && ( mpCairoLib != NULL ) && ( mpRSVGLib != NULL ) ); } + + // G-Object + gpointer g_object_unref( gpointer pointer ) { return( (*mp_g_object_unref)( pointer ) ); }; + + // LibRSVG + + // Cairo + cairo_surface_t* image_surface_create( cairo_format_t format, int width, int height ) { return( (*mp_image_surface_create)( format, width, height ) ); } + void surface_destroy( cairo_surface_t* surface ) { (*mp_surface_destroy)( surface ); } + cairo_status_t surface_status( cairo_surface_t* surface ) { return( (*mp_surface_status)( surface ) ); } + cairo_t* create( cairo_surface_t* surface ) { return( (*mp_create)( surface ) ); } + void destroy( cairo_t* cairo ) { (*mp_destroy )( cairo ); } + void matrix_init_identity( cairo_matrix_t* matrix ){ (*mp_matrix_init_identity)( matrix ); } + void matrix_translate( cairo_matrix_t* matrix, double nx, double ny ) { (*mp_matrix_translate)( matrix, nx, ny ); } + void matrix_scale( cairo_matrix_t* matrix, double sx, double sy ) {( *mp_matrix_scale )( matrix, sx, sy ); } + void matrix_rotate( cairo_matrix_t* matrix, double radians ) { ( *mp_matrix_rotate )( matrix, radians ); } + void transform( cairo_t* cairo, cairo_matrix_t *matrix ) { (*mp_transform)( cairo, matrix ); } + unsigned char* image_surface_get_data(cairo_surface_t* surface) { return( (*mp_image_surface_get_data)( surface ) ); } + int image_surface_get_width(cairo_surface_t* surface) { return( (*mp_image_surface_get_width)( surface ) ); } + int image_surface_get_height(cairo_surface_t* surface) { return( (*mp_image_surface_get_height)( surface ) ); } + int image_surface_get_stride(cairo_surface_t* surface) { return( (*mp_image_surface_get_stride)( surface ) ); } + + // LibRSVG + void rsvg_init() { (*mp_rsvg_init)(); } + RsvgHandle* rsvg_handle_new_from_data( const guint8* data, gsize size, GError** error) { return( (*mp_rsvg_handle_new_from_data)( data, size, error ) ); } + gboolean rsvg_handle_close( RsvgHandle* handle, GError** error ) { return( (*mp_rsvg_handle_close)( handle, error ) ); } + void rsvg_handle_set_dpi_x_y( RsvgHandle* handle, double dpix, double dpiy ) { (*mp_rsvg_handle_set_dpi_x_y)( handle, dpix, dpiy ); } + void rsvg_handle_get_dimensions( RsvgHandle* handle, RsvgDimensionData* dimensions ) { (*mp_rsvg_handle_get_dimensions)( handle, dimensions ); } + gboolean rsvg_handle_render_cairo( RsvgHandle* handle, cairo_t* cairo ) { return( (*mp_rsvg_handle_render_cairo)( handle, cairo ) ); } + +private: + + LibraryWrapper(); + +private: + + oslModule mpGObjectLib; + oslModule mpCairoLib; + oslModule mpRSVGLib; + + // GObject + gpointer (*mp_g_object_unref)( gpointer ); + + // Cairo + cairo_surface_t* (*mp_image_surface_create)(cairo_format_t,int,int); + void (*mp_surface_destroy )(cairo_surface_t*); + cairo_status_t (*mp_surface_status)(cairo_surface_t*); + cairo_t* (*mp_create)(cairo_surface_t*); + void (*mp_destroy)(cairo_t*); + void (*mp_matrix_init_identity)(cairo_matrix_t*); + void (*mp_matrix_translate)( cairo_matrix_t*, double, double); + void (*mp_matrix_scale )( cairo_matrix_t*, double, double); + void (*mp_matrix_rotate)( cairo_matrix_t*, double); + void (*mp_transform)( cairo_t*, cairo_matrix_t*); + unsigned char* (*mp_image_surface_get_data)( cairo_surface_t* ); + int (*mp_image_surface_get_width)(cairo_surface_t* surface); + int (*mp_image_surface_get_height)(cairo_surface_t* surface); + int (*mp_image_surface_get_stride)(cairo_surface_t* surface); + + // LibRSVG + void (*mp_rsvg_init)( void ); + RsvgHandle* (*mp_rsvg_handle_new_from_data)( const guint8*, gsize, GError** ); + gboolean (*mp_rsvg_handle_close)( RsvgHandle*, GError** ); + void (*mp_rsvg_handle_set_dpi_x_y)( RsvgHandle*, double, double ); + void (*mp_rsvg_handle_get_dimensions)( RsvgHandle*, RsvgDimensionData* ); + gboolean (*mp_rsvg_handle_render_cairo)( RsvgHandle*, cairo_t* ); +}; + +// ----------------------------------------------------------------------------- + +LibraryWrapper& LibraryWrapper::get() +{ + static LibraryWrapper* pLibraryInstance = NULL; + + if( !pLibraryInstance ) + pLibraryInstance = new LibraryWrapper; + + return( *pLibraryInstance ); +} + +// ----------------------------------------------------------------------------- + +LibraryWrapper::LibraryWrapper() : + mpGObjectLib( NULL ), + mpCairoLib( NULL ), + mpRSVGLib( NULL ) +{ + const ::rtl::OUString aGObjectLibName( RTL_CONSTASCII_USTRINGPARAM( VCL_RSVG_GOBJECT_LIBNAME ) ); + const ::rtl::OUString aCairoLibName( RTL_CONSTASCII_USTRINGPARAM( VCL_RSVG_CAIRO_LIBNAME ) ); + const ::rtl::OUString aRSVGLibName( RTL_CONSTASCII_USTRINGPARAM( VCL_RSVG_LIBRSVG_LIBNAME ) ); + bool bCont = true; + + // GObject + if( bCont && ( NULL != ( mpGObjectLib = osl_loadModule( aGObjectLibName.pData, SAL_LOADMODULE_DEFAULT ) ) ) ) + { + mp_g_object_unref = ( gpointer (*)( gpointer ) ) osl_getAsciiFunctionSymbol( mpGObjectLib, "g_object_unref" ); + + if( !( mp_g_object_unref ) ) + { + OSL_TRACE( "not all needed symbols were found in g-object library" ); + bCont = false; + } + } + + // Cairo + if( bCont && ( NULL != ( mpCairoLib = osl_loadModule( aCairoLibName.pData, SAL_LOADMODULE_DEFAULT ) ) ) ) + { + mp_image_surface_create = ( cairo_surface_t* (*)( cairo_format_t, int, int ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_image_surface_create" ); + mp_surface_destroy = ( void (*)( cairo_surface_t* ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_surface_destroy" ); + mp_surface_status = ( cairo_status_t (*)( cairo_surface_t* ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_surface_status" ); + mp_create = ( cairo_t* (*)( cairo_surface_t* ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_create" ); + mp_destroy = ( void (*)( cairo_t* ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_destroy" ); + mp_matrix_init_identity = ( void (*)( cairo_matrix_t* ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_matrix_init_identity" ); + mp_matrix_translate = ( void (*)( cairo_matrix_t*, double, double ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_matrix_translate" ); + mp_matrix_scale = ( void (*)( cairo_matrix_t*, double, double ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_matrix_scale" ); + mp_matrix_rotate = ( void (*)( cairo_matrix_t*, double ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_matrix_rotate" ); + mp_transform = ( void (*)( cairo_t*, cairo_matrix_t* ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_transform" ); + mp_image_surface_get_data = ( unsigned char* (*)( cairo_surface_t* ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_image_surface_get_data" ); + mp_image_surface_get_width = ( int (*)( cairo_surface_t* ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_image_surface_get_width" ); + mp_image_surface_get_height = ( int (*)( cairo_surface_t* ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_image_surface_get_height" ); + mp_image_surface_get_stride = ( int (*)( cairo_surface_t* ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_image_surface_get_stride" ); + + if( !( mp_image_surface_create && + mp_surface_destroy && + mp_surface_status && + mp_create && + mp_destroy && + mp_matrix_init_identity && + mp_matrix_translate && + mp_matrix_scale && + mp_matrix_rotate && + mp_transform && + mp_image_surface_get_data && + mp_image_surface_get_width && + mp_image_surface_get_height && + mp_image_surface_get_stride ) ) + { + OSL_TRACE( "not all needed symbols were found in cairo library" ); + bCont = false; + } + } + + // LibRSVG + if( bCont && ( NULL != ( mpRSVGLib = osl_loadModule( aRSVGLibName.pData, SAL_LOADMODULE_DEFAULT ) ) ) ) + { + mp_rsvg_init = ( void (*)( void ) ) osl_getAsciiFunctionSymbol( mpRSVGLib, "rsvg_init" ); + mp_rsvg_handle_new_from_data = ( RsvgHandle* (*)( const guint8*, gsize, GError** ) ) osl_getAsciiFunctionSymbol( mpRSVGLib, "rsvg_handle_new_from_data" ); + mp_rsvg_handle_close = ( gboolean (*)( RsvgHandle*, GError** ) ) osl_getAsciiFunctionSymbol( mpRSVGLib, "rsvg_handle_close" ); + mp_rsvg_handle_set_dpi_x_y = ( void (*)( RsvgHandle*, double, double ) ) osl_getAsciiFunctionSymbol( mpRSVGLib, "rsvg_handle_set_dpi_x_y" ); + mp_rsvg_handle_get_dimensions = ( void (*)( RsvgHandle*, RsvgDimensionData* ) ) osl_getAsciiFunctionSymbol( mpRSVGLib, "rsvg_handle_get_dimensions" ); + mp_rsvg_handle_render_cairo = ( gboolean (*)( RsvgHandle*, cairo_t* ) ) osl_getAsciiFunctionSymbol( mpRSVGLib, "rsvg_handle_render_cairo" ); + + if( !( mp_rsvg_init && + mp_rsvg_handle_new_from_data && + mp_rsvg_handle_close && + mp_rsvg_handle_set_dpi_x_y && + mp_rsvg_handle_get_dimensions && + mp_rsvg_handle_render_cairo ) ) + { + OSL_TRACE( "not all needed symbols were found in librsvg library" ); + bCont = false; + } + } + + OSL_ENSURE( mpGObjectLib, "g-object library could not be loaded" ); + OSL_ENSURE( mpCairoLib, "cairo library could not be loaded" ); + OSL_ENSURE( mpRSVGLib, "librsvg library could not be loaded" ); + + // unload all libraries in case of failure + if( !bCont ) + { + if( mpRSVGLib ) + { + osl_unloadModule( mpRSVGLib ); + mpRSVGLib = NULL; + } + + if( mpCairoLib ) + { + osl_unloadModule( mpCairoLib ); + mpCairoLib = NULL; + } + + if( mpGObjectLib ) + { + osl_unloadModule( mpGObjectLib ); + mpGObjectLib = NULL; + } + } +} + +// --------------------------- +// - ::vcl::rsvg::Rasterizer - +// --------------------------- + +class Rasterizer : public ::cppu::WeakAggImplHelper2< graphic::XGraphicRasterizer, lang::XServiceInfo > +{ +public: + Rasterizer(); + virtual ~Rasterizer(); + + // XGraphicRasterizer + virtual ::sal_Bool SAL_CALL initializeData( const uno::Reference< io::XInputStream >& DataStream, + ::sal_uInt32 DPI_X, ::sal_uInt32 DPI_Y, + awt::Size& DefaultSizePixel ) + throw ( uno::RuntimeException ); + + virtual uno::Reference< graphic::XGraphic > SAL_CALL rasterize( ::sal_uInt32 Width, + ::sal_uInt32 Height, + double RotateAngle, + double ShearAngle_X, + double ShearAngle_Y, + const uno::Sequence< beans::PropertyValue >& RasterizeProperties ) + throw (uno::RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() + throw( uno::RuntimeException); + + virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ) + throw( uno::RuntimeException ); + + virtual uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() + throw( uno::RuntimeException ); + +protected: + + void implFreeRsvgHandle(); + + uno::Reference< graphic::XGraphic > implGetXGraphicFromSurface( cairo_surface_t* pSurface ) const; + +private: + + Rasterizer( const Rasterizer& ); + Rasterizer& operator=( const Rasterizer& ); + +private: + + RsvgHandle* mpRsvgHandle; + sal_Int32 mnDefaultWidth; + sal_Int32 mnDefaultHeight; + bool mbLibInit; +}; + +// ----------------------------------------------------------------------------- + +Rasterizer::Rasterizer() : + mpRsvgHandle( NULL ), + mnDefaultWidth( 0 ), + mnDefaultHeight( 0 ), + mbLibInit( true ) +{ + static bool bLibInitialized = false; + + if( !bLibInitialized ) + { + try + { + LibraryWrapper& rLib = LibraryWrapper::get(); + rLib.rsvg_init(); + } + catch( ... ) + { + mbLibInit = false; + } + + bLibInitialized = true; + } +} + +// ----------------------------------------------------------------------------- + +Rasterizer::~Rasterizer() +{ + implFreeRsvgHandle(); +} + +// ----------------------------------------------------------------------------- + +void Rasterizer::implFreeRsvgHandle() +{ + if( mpRsvgHandle ) + { + LibraryWrapper::get().g_object_unref( static_cast< gpointer >( mpRsvgHandle ) ); + mpRsvgHandle = NULL; + } +} + +// ----------------------------------------------------------------------------- + +uno::Reference< graphic::XGraphic > Rasterizer::implGetXGraphicFromSurface( cairo_surface_t* pSurface ) const +{ + LibraryWrapper& rLib = LibraryWrapper::get(); + unsigned char* pData = rLib.image_surface_get_data( pSurface ); + const sal_Int32 nWidth = rLib.image_surface_get_width( pSurface ); + const sal_Int32 nHeight =rLib.image_surface_get_height( pSurface ); + const sal_Int32 nStride = rLib.image_surface_get_stride( pSurface ); + + uno::Reference< graphic::XGraphic > xRet; + + if( pData && nWidth && nHeight && nStride ) + { + Size aSize( nWidth, nHeight ); + Bitmap aBmp( aSize, 24 ); + AlphaMask aAlphaMask( aSize ); + BitmapWriteAccess* pBmpAcc = aBmp.AcquireWriteAccess(); + BitmapWriteAccess* pAlpAcc = aAlphaMask.AcquireWriteAccess(); + + if( pBmpAcc && pAlpAcc ) + { + BitmapColor aPixel, aWhitePixel( 255, 255, 255 ), aAlpha( 0 ), aFullAlpha( 255 ); + sal_uInt32* pRow = reinterpret_cast< sal_uInt32* >( pData ); + + for( sal_Int32 nY = 0; nY < nHeight; ++nY, pRow = reinterpret_cast< sal_uInt32* >( pData += nStride ) ) + { + for( sal_Int32 nX = 0; nX < nWidth; ++nX ) + { + const register sal_uInt32 nPixel = *pRow++; + const register sal_uInt32 nAlpha = nPixel >> 24; + + if( !nAlpha ) + { + pBmpAcc->SetPixel( nY, nX, aWhitePixel ); + pAlpAcc->SetPixel( nY, nX, aFullAlpha ); + } + else + { + aPixel.SetRed( static_cast< sal_uInt8 >( ( ( ( nPixel & 0x00ff0000 ) >> 16 ) * 255 ) / nAlpha ) ); + aPixel.SetGreen( static_cast< sal_uInt8 >( ( ( ( nPixel & 0x0000ff00 ) >> 8 ) * 255 ) / nAlpha ) ); + aPixel.SetBlue( static_cast< sal_uInt8 >( ( ( nPixel & 0x000000ff ) * 255 ) / nAlpha ) ); + pBmpAcc->SetPixel( nY, nX, aPixel ); + + aAlpha.SetIndex( static_cast< sal_uInt8 >( 255 - nAlpha ) ); + pAlpAcc->SetPixel( nY, nX, aAlpha ); + } + } + } + + aBmp.ReleaseAccess( pBmpAcc ); + aAlphaMask.ReleaseAccess( pAlpAcc ); + + const Graphic aGraphic( BitmapEx( aBmp, aAlphaMask ) ); + xRet.set( aGraphic.GetXGraphic(), uno::UNO_QUERY ); + } + else + { + aBmp.ReleaseAccess( pBmpAcc ); + aAlphaMask.ReleaseAccess( pAlpAcc ); + } + } + + return( xRet ); +} + +// ----------------------------------------------------------------------------- + +::sal_Bool SAL_CALL Rasterizer::initializeData( const uno::Reference< io::XInputStream >& rDataStream, + ::sal_uInt32 nDPI_X, ::sal_uInt32 nDPI_Y, + awt::Size& rDefaultSizePixel ) + throw ( uno::RuntimeException ) +{ + LibraryWrapper& rLib = LibraryWrapper::get(); + + implFreeRsvgHandle(); + + if( mbLibInit && rDataStream.is() ) + { + ::std::vector< sal_Int8 > aDataBuffer; + uno::Reference< io::XSeekable > xSeekable( rDataStream, uno::UNO_QUERY ); + sal_Int32 nReadSize, nBlockSize = ( xSeekable.is() ? xSeekable->getLength() : 65536 ); + uno::Sequence< sal_Int8 > aStmBuffer( nBlockSize ); + + do + { + nReadSize = rDataStream->readBytes( aStmBuffer, nBlockSize ); + + if( nReadSize > 0 ) + { + const sal_Int8* pArray = aStmBuffer.getArray(); + aDataBuffer.insert( aDataBuffer.end(), pArray, pArray + nReadSize ); + } + } + while( nReadSize == nBlockSize ); + + if( aDataBuffer.size() && + ( NULL != ( mpRsvgHandle = rLib.rsvg_handle_new_from_data( reinterpret_cast< sal_uInt8* >( &aDataBuffer[ 0 ] ), + aDataBuffer.size(), NULL ) ) ) && + !rLib.rsvg_handle_close( mpRsvgHandle, NULL ) ) + { + implFreeRsvgHandle(); + } + } + + // get default dimensions of image + mnDefaultWidth = mnDefaultHeight = 0; + + if( mpRsvgHandle ) + { + RsvgDimensionData aDefaultDimension = { 0, 0, 0.0, 0.0 }; + + rLib.rsvg_handle_set_dpi_x_y( mpRsvgHandle, nDPI_X ? nDPI_X: 72, nDPI_Y ? nDPI_Y : 72 ); + rLib.rsvg_handle_get_dimensions( mpRsvgHandle, &aDefaultDimension ); + + mnDefaultWidth = aDefaultDimension.width; + mnDefaultHeight = aDefaultDimension.height; + } + + rDefaultSizePixel.Width = mnDefaultWidth; + rDefaultSizePixel.Height = mnDefaultHeight; + + return( mpRsvgHandle != NULL ); +} + +// ----------------------------------------------------------------------------- + +uno::Reference< graphic::XGraphic > SAL_CALL Rasterizer::rasterize( ::sal_uInt32 nWidth, + ::sal_uInt32 nHeight, + double /*fRotateAngle*/, + double /*fShearAngle_X*/, + double /*ShearAngle_Y*/, + const uno::Sequence< beans::PropertyValue >& + /*rRasterizeProperties*/ ) + throw ( uno::RuntimeException ) +{ + LibraryWrapper& rLib = LibraryWrapper::get(); + uno::Reference< graphic::XGraphic > xRet; + + if( mpRsvgHandle && rLib.isValid() && nWidth && nHeight && mnDefaultWidth && mnDefaultHeight ) + { + cairo_surface_t* pSurface = rLib.image_surface_create( CAIRO_FORMAT_ARGB32, nWidth, nHeight ); + + if( pSurface && ( CAIRO_STATUS_SUCCESS == rLib.surface_status( pSurface ) ) ) + { + cairo_t* pCr = rLib.create( pSurface ); + + if( pCr ) + { + cairo_matrix_t aMatrix; + + rLib.matrix_init_identity( &aMatrix ); + rLib.matrix_scale( &aMatrix, + static_cast< double >( nWidth ) / mnDefaultWidth, + static_cast< double >( nHeight ) / mnDefaultHeight ); + rLib.transform( pCr, &aMatrix ); + + if( rLib.rsvg_handle_render_cairo( mpRsvgHandle, pCr ) ) + { + xRet = implGetXGraphicFromSurface( pSurface ); + } + + rLib.destroy( pCr ); + } + + rLib.surface_destroy( pSurface ); + OSL_ENSURE( xRet.is(), "SVG *not* rendered successfully" ); + } + } + + return( xRet ); +} + +// ----------------------------------------------------------------------------- + +::rtl::OUString SAL_CALL Rasterizer::getImplementationName() + throw( uno::RuntimeException ) +{ + return( Rasterizer_getImplementationName() ); +} + +// ----------------------------------------------------------------------------- + +sal_Bool SAL_CALL Rasterizer::supportsService( const ::rtl::OUString& rServiceName ) + throw( uno::RuntimeException ) +{ + const uno::Sequence< ::rtl::OUString > aServices( Rasterizer_getSupportedServiceNames() ); + + for( sal_Int32 nService = 0; nService < aServices.getLength(); ++nService ) + { + if( rServiceName == aServices[ nService ] ) + return sal_True; + } + + return sal_False; +} + +// ----------------------------------------------------------------------------- + +uno::Sequence< ::rtl::OUString > SAL_CALL Rasterizer::getSupportedServiceNames() + throw( uno::RuntimeException ) +{ + return( Rasterizer_getSupportedServiceNames() ); +} + +// ------------------------------ +// - Uno instantiation function - +// ------------------------------ + +uno::Reference< uno::XInterface > SAL_CALL Rasterizer_createInstance( const uno::Reference< lang::XMultiServiceFactory >& ) +{ + return static_cast< ::cppu::OWeakObject* >( new rsvg::Rasterizer ); +} + +} // namespace rsvg +} // namespace vcl diff --git a/vcl/source/gdi/rendergraphic.cxx b/vcl/source/gdi/rendergraphic.cxx new file mode 100644 index 000000000000..10b6064cc57c --- /dev/null +++ b/vcl/source/gdi/rendergraphic.cxx @@ -0,0 +1,240 @@ +/************************************************************************* + * + * 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 + +namespace vcl +{ + +// ----------------- +// - RenderGraphic - +// ----------------- +RenderGraphic::RenderGraphic( ) : + mnGraphicDataLength( 0 ) +{ +} + +// ------------------------------------------------------------------------- + +RenderGraphic::RenderGraphic( const RenderGraphic& rRenderGraphic ) : + maGraphicData( rRenderGraphic.maGraphicData ), + mnGraphicDataLength( rRenderGraphic.mnGraphicDataLength ), + maGraphicDataMimeType( rRenderGraphic.maGraphicDataMimeType ), + mapPrefMapMode( rRenderGraphic.mapPrefMapMode.get() ? new MapMode( *rRenderGraphic.mapPrefMapMode ) : NULL ), + mapPrefSize( rRenderGraphic.mapPrefSize.get() ? new Size( *rRenderGraphic.mapPrefSize ) : NULL ) +{ +} + +// ------------------------------------------------------------------------- + +RenderGraphic::RenderGraphic( const GraphicData& rGraphicData, + sal_uInt32 nGraphicDataLength, + const rtl::OUString& rGraphicDataMimeType ) : + maGraphicData( rGraphicData ), + mnGraphicDataLength( nGraphicDataLength ), + maGraphicDataMimeType( rGraphicDataMimeType ) +{ + ImplCheckData( ); +} + +// ------------------------------------------------------------------------- + +RenderGraphic::RenderGraphic( const rtl::OUString& rGraphicDataMimeType, + sal_uInt32 nGraphicDataLength, + const sal_uInt8* pGraphicData ) : + maGraphicData(), + mnGraphicDataLength( nGraphicDataLength ), + maGraphicDataMimeType( rGraphicDataMimeType ) +{ + if( rGraphicDataMimeType.getLength( ) && nGraphicDataLength ) + { + maGraphicData.reset( new sal_uInt8[ nGraphicDataLength ] ); + + if( pGraphicData ) + { + memcpy( maGraphicData.get(), pGraphicData, nGraphicDataLength ); + } + } + else + { + ImplCheckData( ); + } +} + +// ------------------------------------------------------------------------- + +RenderGraphic::~RenderGraphic( ) +{ +} + +// ------------------------------------------------------------------------- + +RenderGraphic& RenderGraphic::operator=(const RenderGraphic& rRenderGraphic ) +{ + maGraphicData = rRenderGraphic.maGraphicData; + mnGraphicDataLength = rRenderGraphic.mnGraphicDataLength; + maGraphicDataMimeType = rRenderGraphic.maGraphicDataMimeType; + mapPrefMapMode.reset( rRenderGraphic.mapPrefMapMode.get() ? new MapMode( *rRenderGraphic.mapPrefMapMode ) : NULL ); + mapPrefSize.reset( rRenderGraphic.mapPrefSize.get() ? new Size( *rRenderGraphic.mapPrefSize ) : NULL ); + + return( *this ); +} + +// ------------------------------------------------------------------------- + +bool RenderGraphic::operator==(const RenderGraphic& rRenderGraphic ) const +{ + return( ( rRenderGraphic.mnGraphicDataLength == mnGraphicDataLength ) && + ( rRenderGraphic.maGraphicData == maGraphicData ) && + ( rRenderGraphic.maGraphicDataMimeType.equalsIgnoreAsciiCase( maGraphicDataMimeType ) ) ); +} + +// ------------------------------------------------------------------------- + +bool RenderGraphic::operator!() const +{ + return( ( 0 == maGraphicDataMimeType.getLength( ) ) || + ( 0 == mnGraphicDataLength ) || + !maGraphicData.get( ) ); +} + +// ------------------------------------------------------------------------- + +bool RenderGraphic::IsEqual( const RenderGraphic& rRenderGraphic ) const +{ + bool bRet = ( rRenderGraphic.mnGraphicDataLength == mnGraphicDataLength ) && + ( rRenderGraphic.maGraphicDataMimeType.equalsIgnoreAsciiCase( maGraphicDataMimeType ) ); + + if( bRet && mnGraphicDataLength && ( rRenderGraphic.maGraphicData != maGraphicData ) ) + { + bRet = ( 0 == memcmp( rRenderGraphic.maGraphicData.get( ), + maGraphicData.get( ), + mnGraphicDataLength ) ); + } + + return( bRet ); +} + +// ------------------------------------------------------------------------- + +const MapMode& RenderGraphic::GetPrefMapMode() const +{ + ImplGetDefaults(); + return( *mapPrefMapMode ); +} + +// ------------------------------------------------------------------------- + +const Size& RenderGraphic::GetPrefSize() const +{ + ImplGetDefaults(); + return( *mapPrefSize ); +} + +// ------------------------------------------------------------------------- + +BitmapEx RenderGraphic::GetReplacement() const +{ + const RenderGraphicRasterizer aRasterizer( *this ); + + return( aRasterizer.GetReplacement() ); +} + +// ------------------------------------------------------------------------- + +void RenderGraphic::ImplCheckData( ) +{ + if( !( *this ) ) + { + maGraphicData.reset( ); + mnGraphicDataLength = 0; + maGraphicDataMimeType = ::rtl::OUString(); + mapPrefMapMode.reset(); + mapPrefSize.reset(); + } +} + +// ------------------------------------------------------------------------- + +void RenderGraphic::ImplGetDefaults() const +{ + if( !mapPrefMapMode.get() || !mapPrefSize.get() ) + { + const RenderGraphicRasterizer aRasterizer( *this ); + + mapPrefMapMode.reset( new MapMode( aRasterizer.GetPrefMapMode() ) ); + mapPrefSize.reset( new Size( aRasterizer.GetPrefSize() ) ); + } +} + +// ------------------------------------------------------------------------- + +::SvStream& operator>>( ::SvStream& rIStm, RenderGraphic& rRenderGraphic ) +{ + ::VersionCompat aVCompat( rIStm, STREAM_READ ); + String aGraphicDataMimeType; + sal_uInt32 nGraphicDataLength = 0; + + rIStm.ReadByteString( aGraphicDataMimeType, RTL_TEXTENCODING_ASCII_US ); + rIStm >> nGraphicDataLength; + + rRenderGraphic = RenderGraphic( aGraphicDataMimeType, nGraphicDataLength ); + + if( !rRenderGraphic.IsEmpty() ) + { + rIStm.Read( rRenderGraphic.GetGraphicData().get(), nGraphicDataLength ); + } + + return rIStm; +} + +// ------------------------------------------------------------------ + +::SvStream& operator<<( ::SvStream& rOStm, const RenderGraphic& rRenderGraphic ) +{ + ::VersionCompat aVCompat( rOStm, STREAM_WRITE, 1 ); + const sal_uInt32 nGraphicDataLength = rRenderGraphic.GetGraphicDataLength(); + + rOStm.WriteByteString( rRenderGraphic.GetGraphicDataMimeType(), RTL_TEXTENCODING_ASCII_US ); + rOStm << nGraphicDataLength; + + if( nGraphicDataLength ) + { + rOStm.Write( rRenderGraphic.GetGraphicData().get(), nGraphicDataLength ); + } + + return rOStm; +} + +} // VCL diff --git a/vcl/source/gdi/rendergraphicrasterizer.cxx b/vcl/source/gdi/rendergraphicrasterizer.cxx new file mode 100644 index 000000000000..b9bcdcee89e5 --- /dev/null +++ b/vcl/source/gdi/rendergraphicrasterizer.cxx @@ -0,0 +1,400 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define VCL_SERVICENAME_RASTERIZER_SVG "com.sun.star.graphic.GraphicRasterizer_RSVG" + +using namespace com::sun::star; + +namespace vcl +{ +// --------------------------------------------------------- +// - maximum extent in pixel for graphics to be rasterized - +// --------------------------------------------------------- + +static const sal_uInt32 nRasterizerDefaultExtent = 4096; + +// --------------------------- +// - RenderGraphicRasterizer - +// --------------------------- + +RenderGraphicRasterizer::RenderGraphicRasterizer( const RenderGraphic& rRenderGraphic ) : + maRenderGraphic( rRenderGraphic ), + mfRotateAngle( 0.0 ), + mfShearAngleX( 0.0 ), + mfShearAngleY( 0.0 ) +{ +} + +// ------------------------------------------------------------------------- + +RenderGraphicRasterizer::RenderGraphicRasterizer( const RenderGraphicRasterizer& rRenderGraphicRasterizer ) : + maRenderGraphic( rRenderGraphicRasterizer.maRenderGraphic ), + mxRasterizer( rRenderGraphicRasterizer.mxRasterizer ), + maBitmapEx( rRenderGraphicRasterizer.maBitmapEx ), + maDefaultSizePixel( rRenderGraphicRasterizer.maDefaultSizePixel ), + mfRotateAngle( rRenderGraphicRasterizer.mfRotateAngle ), + mfShearAngleX( rRenderGraphicRasterizer.mfShearAngleX ), + mfShearAngleY( rRenderGraphicRasterizer.mfShearAngleY ) +{ +} + +// ------------------------------------------------------------------------- + +RenderGraphicRasterizer::~RenderGraphicRasterizer() +{ +} + +// ------------------------------------------------------------------------- + +RenderGraphicRasterizer::RenderGraphicRasterizer& RenderGraphicRasterizer::operator=( + const RenderGraphicRasterizer& rRenderGraphicRasterizer ) +{ + maRenderGraphic = rRenderGraphicRasterizer.maRenderGraphic; + maBitmapEx = rRenderGraphicRasterizer.maBitmapEx; + maDefaultSizePixel = rRenderGraphicRasterizer.maDefaultSizePixel; + mfRotateAngle = rRenderGraphicRasterizer.mfRotateAngle; + mfShearAngleX = rRenderGraphicRasterizer.mfShearAngleX; + mfShearAngleY = rRenderGraphicRasterizer.mfShearAngleY; + mxRasterizer = rRenderGraphicRasterizer.mxRasterizer; + + return( *this ); +} + +// ------------------------------------------------------------------------- + +const Size& RenderGraphicRasterizer::GetDefaultSizePixel() const +{ + const_cast< RenderGraphicRasterizer* >( this )->InitializeRasterizer(); + + return( maDefaultSizePixel ); +} + +// ------------------------------------------------------------------------- + +BitmapEx RenderGraphicRasterizer::GetReplacement() const +{ + BitmapEx aRet( Rasterize( GetDefaultSizePixel() ) ); + + aRet.SetPrefSize( GetPrefSize() ); + aRet.SetPrefMapMode( GetPrefMapMode() ); + + return( aRet ); +} + +// ------------------------------------------------------------------------- + +Size RenderGraphicRasterizer::GetPrefSize() const +{ + const Size aSizePixel( GetDefaultSizePixel() ); + std::auto_ptr< VirtualDevice > apCompVDev; + OutputDevice* pCompDev = NULL; + +#ifndef NO_GETAPPWINDOW + pCompDev = Application::GetAppWindow(); +#endif + + if( !pCompDev ) + { + apCompVDev.reset( new VirtualDevice ); + pCompDev = apCompVDev.get(); + } + + return( pCompDev->PixelToLogic( aSizePixel, GetPrefMapMode() ) ); +} + +// ------------------------------------------------------------------------- + +MapMode RenderGraphicRasterizer::GetPrefMapMode() const +{ + return( MapMode( MAP_100TH_MM ) ); +} + +// ------------------------------------------------------------------------- + +const BitmapEx& RenderGraphicRasterizer::Rasterize( const Size& rSizePixel, + double fRotateAngle, + double fShearAngleX, + double fShearAngleY, + sal_uInt32 nMaxExtent ) const +{ + const bool bRasterize = !maRenderGraphic.IsEmpty() && + rSizePixel.Width() && rSizePixel.Height() && + ( maBitmapEx.IsEmpty() || + ( rSizePixel != maBitmapEx.GetSizePixel() ) || + ( fRotateAngle != mfRotateAngle ) || + ( fShearAngleX != mfShearAngleX ) || + ( fShearAngleY != mfShearAngleY ) ); + + if( bRasterize ) + { + const_cast< RenderGraphicRasterizer* >( this )->InitializeRasterizer(); + + if( mxRasterizer.is() ) + { + sal_uInt32 nWidth = labs( rSizePixel.Width() ); + sal_uInt32 nHeight = labs( rSizePixel.Height() ); + + // limiting the extent of the rastered bitmap + if( VCL_RASTERIZER_UNLIMITED_EXTENT != nMaxExtent ) + { + if( VCL_RASTERIZER_DEFAULT_EXTENT == nMaxExtent ) + { + nMaxExtent = nRasterizerDefaultExtent; + } + + if( ( nWidth > nMaxExtent ) || ( nHeight > nMaxExtent ) ) + { + const double fScale = static_cast< double >( nMaxExtent ) / ::std::max( nWidth, nHeight ); + + nWidth = FRound( nWidth * fScale ); + nHeight = FRound( nHeight * fScale ); + } + } + + if( !ImplRasterizeFromCache( const_cast< RenderGraphicRasterizer& >( *this ), + Size( nWidth, nHeight ), fRotateAngle, fShearAngleX, fShearAngleY ) ) + { + try + { + const uno::Sequence< beans::PropertyValue > aPropertySeq; + const Graphic aRasteredGraphic( mxRasterizer->rasterize( nWidth, + nHeight, + fRotateAngle, + fShearAngleX, + fShearAngleY, + aPropertySeq ) ); + + maBitmapEx = aRasteredGraphic.GetBitmapEx(); + mfRotateAngle = fRotateAngle; + mfShearAngleX = fShearAngleX; + mfShearAngleY = fShearAngleY; + + ImplUpdateCache( *this ); + +// OSL_TRACE( "Wanted: %d x %d / Got: %d x %d", rSizePixel.Width(), rSizePixel.Height(), maBitmapEx.GetSizePixel().Width(), maBitmapEx.GetSizePixel().Height() ); + } + catch( ... ) + { + OSL_TRACE( "caught exception during rasterization" ); + } + } + } + } + + return( maBitmapEx ); +} + +// ------------------------------------------------------------------------- + +void RenderGraphicRasterizer::InitializeRasterizer() +{ + if( !mxRasterizer.is() && !ImplInitializeFromCache( *this ) ) + { + uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); + + maDefaultSizePixel.Width() = maDefaultSizePixel.Height() = 0; + + if( !maRenderGraphic.IsEmpty() ) + { + rtl::OUString aServiceName; + + if( 0 == maRenderGraphic.GetGraphicDataMimeType().compareToAscii( "image/svg+xml" ) ) + { + aServiceName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VCL_SERVICENAME_RASTERIZER_SVG ) ); + } + + if( aServiceName.getLength() ) + { + mxRasterizer.set( xFactory->createInstance( aServiceName ), uno::UNO_QUERY ); + + if( mxRasterizer.is() ) + { + std::auto_ptr< VirtualDevice > apCompVDev; + OutputDevice* pCompDev = NULL; + +#ifndef NO_GETAPPWINDOW + pCompDev = Application::GetAppWindow(); +#endif + + if( !pCompDev ) + { + apCompVDev.reset( new VirtualDevice ); + pCompDev = apCompVDev.get(); + } + + const Size aDPI( pCompDev->LogicToPixel( Size( 1, 1 ), MAP_INCH ) ); + awt::Size aSizePixel; + SvMemoryStream aMemStm( maRenderGraphic.GetGraphicData().get(), + maRenderGraphic.GetGraphicDataLength(), + STREAM_READ ); + + uno::Reference< io::XInputStream > xIStm( new utl::OSeekableInputStreamWrapper( aMemStm ) ); + + try + { + if( !xIStm.is() || !mxRasterizer->initializeData( xIStm, aDPI.Width(), aDPI.Height(), aSizePixel ) ) + { + mxRasterizer.clear(); + } + else + { + maDefaultSizePixel.Width() = aSizePixel.Width; + maDefaultSizePixel.Height() = aSizePixel.Height; + } + } + catch( ... ) + { + OSL_TRACE( "caught exception during initialization of SVG rasterizer component" ); + mxRasterizer.clear(); + } + } + } + } + } +} + +// ------------------------------------------------------------------------------ + +RenderGraphicRasterizer::RenderGraphicRasterizerCache& RenderGraphicRasterizer::ImplGetCache() +{ + static RenderGraphicRasterizerCache* pCache = NULL; + + if( !pCache ) + { + pCache = new RenderGraphicRasterizerCache; + } + + return( *pCache ); +} + +// ------------------------------------------------------------------------------ + +bool RenderGraphicRasterizer::ImplInitializeFromCache( RenderGraphicRasterizer& rRasterizer ) +{ + RenderGraphicRasterizerCache& rCache = ImplGetCache(); + bool bRet = false; + + for( sal_uInt32 i = 0; i < rCache.size(); ++i ) + { + const RenderGraphicRasterizer* pCheck = &rCache[ i ]; + + if( pCheck && pCheck->mxRasterizer.is() && ( pCheck->maRenderGraphic == rRasterizer.maRenderGraphic ) ) + { +// OSL_TRACE( "Hit RenderGraphicRasterizer cache for initialization" ); + + rRasterizer.mxRasterizer = pCheck->mxRasterizer; + rRasterizer.maDefaultSizePixel = pCheck->maDefaultSizePixel; + + // put found Rasterizer at begin of deque + const RenderGraphicRasterizer aFound( rCache[ i ] ); + + rCache.erase( rCache.begin() + i ); + rCache.push_front( aFound ); + + + bRet = true; + } + } + + return( bRet ); +} + +// ------------------------------------------------------------------------------ + +bool RenderGraphicRasterizer::ImplRasterizeFromCache( RenderGraphicRasterizer& rRasterizer, + const Size& rSizePixel, + double fRotateAngle, + double fShearAngleX, + double fShearAngleY ) +{ + RenderGraphicRasterizerCache& rCache = ImplGetCache(); + bool bRet = false; + + for( sal_uInt32 i = 0; i < rCache.size(); ++i ) + { + const RenderGraphicRasterizer& rCheck = rCache[ i ]; + + if( rCheck.mxRasterizer.is() && rRasterizer.mxRasterizer.is() && + ( ( rCheck.mxRasterizer == rRasterizer.mxRasterizer ) || + ( rRasterizer.maRenderGraphic == rCheck.maRenderGraphic ) ) && + ( rCheck.maBitmapEx.GetSizePixel() == rSizePixel ) && + ( rCheck.mfRotateAngle == fRotateAngle ) && + ( rCheck.mfShearAngleX == fShearAngleX ) && + ( rCheck.mfShearAngleY == fShearAngleY ) ) + { +// OSL_TRACE( "Hit RenderGraphicRasterizer cache for rasterizing" ); + + rRasterizer.maBitmapEx = rCheck.maBitmapEx; + rRasterizer.mfRotateAngle = fRotateAngle; + rRasterizer.mfShearAngleX = fShearAngleX; + rRasterizer.mfShearAngleY = fShearAngleY; + + // put found Rasterizer at begin of deque + const RenderGraphicRasterizer aFound( rCache[ i ] ); + + rCache.erase( rCache.begin() + i ); + rCache.push_front( aFound ); + + bRet = true; + } + } + + return( bRet ); +} + +// ------------------------------------------------------------------------------ + +void RenderGraphicRasterizer::ImplUpdateCache( const RenderGraphicRasterizer& rRasterizer ) +{ + RenderGraphicRasterizerCache& rCache = ImplGetCache(); + const sal_uInt32 nMaxCacheSize = 8; + + if( rCache.size() < nMaxCacheSize ) + { + rCache.push_front( rRasterizer ); + } + else + { + rCache.pop_back(); + rCache.push_front( rRasterizer ); + } +} + +} // VCL diff --git a/vcl/source/gdi/svgread.cxx b/vcl/source/gdi/svgread.cxx new file mode 100644 index 000000000000..47ef39c37f20 --- /dev/null +++ b/vcl/source/gdi/svgread.cxx @@ -0,0 +1,131 @@ +/************************************************************************* + * + * 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 +#include +#include +#include +#include + +// ----------- +// - Defines - +// ----------- + +namespace vcl +{ + // ----------------- + // - SVGReaderImpl - + // ----------------- + + class SVGReaderImpl + { + public: + + SVGReaderImpl( SvStream& rStm ); + ~SVGReaderImpl(); + + GDIMetaFile& ImplRead( GDIMetaFile& rSVGMtf ); + + private: + + SvStream& mrStm; + }; + + // ------------------------------------------------------------------------------ + + SVGReaderImpl::SVGReaderImpl( SvStream& rStm ) : + mrStm( rStm ) + { + } + + // ------------------------------------------------------------------------ + + SVGReaderImpl::~SVGReaderImpl() + { + } + + // ------------------------------------------------------------------------ + + GDIMetaFile& SVGReaderImpl::ImplRead( GDIMetaFile& rSVGMtf ) + { + const sal_uInt32 nStmPos = mrStm.Tell(); + const sal_uInt32 nStmLen = mrStm.Seek( STREAM_SEEK_TO_END ) - nStmPos; + + if( nStmLen ) + { + const vcl::RenderGraphic aSVGGraphic( ::rtl::OUString::createFromAscii( "image/svg+xml" ), nStmLen ); + + mrStm.Seek( nStmPos ); + mrStm.Read( aSVGGraphic.GetGraphicData().get(), nStmLen ); + + if( !mrStm.GetError() ) + { + const vcl::RenderGraphicRasterizer aRasterizer( aSVGGraphic ); + const Size aDefaultSizePixel( aRasterizer.GetDefaultSizePixel() ); + + if( aDefaultSizePixel.Width() && aDefaultSizePixel.Height() ) + { + const Point aPos; + const Size aPrefSize( aRasterizer.GetPrefSize() ); + + rSVGMtf.SetPrefMapMode( aRasterizer.GetPrefMapMode() ); + rSVGMtf.SetPrefSize( aPrefSize ); + rSVGMtf.AddAction( new MetaRenderGraphicAction( aPos, aPrefSize, aSVGGraphic ) ); + rSVGMtf.WindStart(); + } + } + } + + return( rSVGMtf ); + } + + // ------------- + // - SVGReader - + // ------------- + + SVGReader::SVGReader( SvStream& rIStm ) : + mapImpl( new ::vcl::SVGReaderImpl( rIStm ) ) + { + } + + // ------------------------------------------------------------------------ + + SVGReader::~SVGReader() + { + } + + // ------------------------------------------------------------------------ + + GDIMetaFile& SVGReader::Read( GDIMetaFile& rSVGMtf ) + { + rSVGMtf = GDIMetaFile(); + + return( mapImpl.get() ? mapImpl->ImplRead( rSVGMtf ) : rSVGMtf ); + } + +} // namespace vcl -- cgit v1.2.3 From 514ab7f3cbf2ea48cf88f1579d8fc7c0e5a5df48 Mon Sep 17 00:00:00 2001 From: ka Date: Fri, 4 Feb 2011 14:52:54 +0100 Subject: ka102: added/removed files for SVG import and module cleanup --- .../primitive2d/rendergraphicprimitive2d.hxx | 95 ++++++++++++++++++++++ .../primitive2d/rendergraphicprimitive2d.cxx | 92 +++++++++++++++++++++ 2 files changed, 187 insertions(+) create mode 100644 drawinglayer/inc/drawinglayer/primitive2d/rendergraphicprimitive2d.hxx create mode 100644 drawinglayer/source/primitive2d/rendergraphicprimitive2d.cxx diff --git a/drawinglayer/inc/drawinglayer/primitive2d/rendergraphicprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/rendergraphicprimitive2d.hxx new file mode 100644 index 000000000000..190439442917 --- /dev/null +++ b/drawinglayer/inc/drawinglayer/primitive2d/rendergraphicprimitive2d.hxx @@ -0,0 +1,95 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_RENDERGRAPHICPRIMITIVE2D_HXX +#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_RENDERGRAPHICPRIMITIVE2D_HXX + +#include +#include +#include +#include + +////////////////////////////////////////////////////////////////////////////// +// RenderGraphicPrimitive2D class + +namespace vcl { class RenderGraphicRasterizer; } + +namespace drawinglayer +{ + namespace primitive2d + { + /** RenderGraphicPrimitive2D class + + This class is the central primitive for RenderGraphic-based primitives. + */ + class RenderGraphicPrimitive2D : public BasePrimitive2D + { + private: + /// the RenderGraphic data + vcl::RenderGraphic maRenderGraphic; + mutable std::auto_ptr< vcl::RenderGraphicRasterizer > mapCurrentRasterizer; + + /** the object transformation from unit coordinates, defining + size, shear, rotate and position + */ + basegfx::B2DHomMatrix maTransform; + + public: + /// constructor + RenderGraphicPrimitive2D( + const vcl::RenderGraphic& rRenderGraphic, + const basegfx::B2DHomMatrix& rTransform); + + /// data read access + inline const vcl::RenderGraphic& getRenderGraphic() const { return maRenderGraphic; } + inline const basegfx::B2DHomMatrix& getTransform() const { return maTransform; } + + // access to latest used vcl::GraphicRasterizer for possibly reusing + // an already rendered vcl::RenderGraphic with the same transform + // properties during the next rendering process + void setCurrentRasterizer() const; + void setCurrentRasterizer( const vcl::RenderGraphicRasterizer& rCurrentGraphicRasterizer ) const; + inline const vcl::RenderGraphicRasterizer* getCurrentRasterizer() const { return( mapCurrentRasterizer.get() ); } + + /// compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + /// get range + virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; + + /// provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif // INCLUDED_DRAWINGLAYER_PRIMITIVE2D_RENDERGRAPHICPRIMITIVE2D_HXX + +////////////////////////////////////////////////////////////////////////////// +// eof diff --git a/drawinglayer/source/primitive2d/rendergraphicprimitive2d.cxx b/drawinglayer/source/primitive2d/rendergraphicprimitive2d.cxx new file mode 100644 index 000000000000..439937f5d0f5 --- /dev/null +++ b/drawinglayer/source/primitive2d/rendergraphicprimitive2d.cxx @@ -0,0 +1,92 @@ +/************************************************************************* + * + * 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_drawinglayer.hxx" + +#include +#include +#include +#include + +////////////////////////////////////////////////////////////////////////////// + +using namespace com::sun::star; + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + RenderGraphicPrimitive2D::RenderGraphicPrimitive2D( + const vcl::RenderGraphic& rRenderGraphic, + const basegfx::B2DHomMatrix& rTransform) + : BasePrimitive2D(), + maRenderGraphic(rRenderGraphic), + maTransform(rTransform) + { + } + + void RenderGraphicPrimitive2D::setCurrentRasterizer() const + { + mapCurrentRasterizer.reset(); + } + + void RenderGraphicPrimitive2D::setCurrentRasterizer( const vcl::RenderGraphicRasterizer& rCurrentRasterizer ) const + { + mapCurrentRasterizer.reset( new vcl::RenderGraphicRasterizer( rCurrentRasterizer ) ); + } + + bool RenderGraphicPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const + { + if(BasePrimitive2D::operator==(rPrimitive)) + { + const RenderGraphicPrimitive2D& rCompare = (RenderGraphicPrimitive2D&)rPrimitive; + + return (getRenderGraphic() == rCompare.getRenderGraphic() + && getTransform() == rCompare.getTransform()); + } + + return false; + } + + basegfx::B2DRange RenderGraphicPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const + { + basegfx::B2DRange aRetval(0.0, 0.0, 1.0, 1.0); + aRetval.transform(maTransform); + return aRetval; + } + + // provide unique ID + ImplPrimitrive2DIDBlock(RenderGraphicPrimitive2D, PRIMITIVE2D_ID_RENDERGRAPHICPRIMITIVE2D) + + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// +// eof -- cgit v1.2.3 From 348b8b51feb29156391a0dc3a21c5e2d73f959f7 Mon Sep 17 00:00:00 2001 From: ka Date: Fri, 4 Feb 2011 14:52:54 +0100 Subject: ka102: added/removed files for SVG import and module cleanup --- extensions/source/svg/makefile.mk | 67 -- extensions/source/svg/svgaction.cxx | 1458 ---------------------------------- extensions/source/svg/svgaction.hxx | 164 ---- extensions/source/svg/svgcom.hxx | 82 -- extensions/source/svg/svgprinter.cxx | 328 -------- extensions/source/svg/svgprinter.hxx | 67 -- extensions/source/svg/svguno.cxx | 98 --- extensions/source/svg/svgwriter.cxx | 175 ---- extensions/source/svg/svgwriter.hxx | 60 -- 9 files changed, 2499 deletions(-) delete mode 100644 extensions/source/svg/makefile.mk delete mode 100644 extensions/source/svg/svgaction.cxx delete mode 100644 extensions/source/svg/svgaction.hxx delete mode 100644 extensions/source/svg/svgcom.hxx delete mode 100644 extensions/source/svg/svgprinter.cxx delete mode 100644 extensions/source/svg/svgprinter.hxx delete mode 100644 extensions/source/svg/svguno.cxx delete mode 100644 extensions/source/svg/svgwriter.cxx delete mode 100644 extensions/source/svg/svgwriter.hxx diff --git a/extensions/source/svg/makefile.mk b/extensions/source/svg/makefile.mk deleted file mode 100644 index c46aede54920..000000000000 --- a/extensions/source/svg/makefile.mk +++ /dev/null @@ -1,67 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=extensions -TARGET=svg - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files ------------------------------------- - -SLOFILES= $(SLO)$/svgprinter.obj \ - $(SLO)$/svguno.obj \ - $(SLO)$/svgwriter.obj \ - $(SLO)$/svgaction.obj - -# --- Library ----------------------------------- - -SHL1TARGET=$(TARGET)$(DLLPOSTFIX) -SHL1IMPLIB=i$(SHL1TARGET) - -SHL1VERSIONMAP=$(SOLARENV)/src/component.map -SHL1DEF=$(MISC)$/$(SHL1TARGET).def -DEF1NAME=$(SHL1TARGET) - -SHL1STDLIBS=\ - $(XMLOFFLIB) \ - $(VCLLIB) \ - $(TOOLSLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) - -SHL1LIBS= $(SLB)$/$(TARGET).lib - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/extensions/source/svg/svgaction.cxx b/extensions/source/svg/svgaction.cxx deleted file mode 100644 index dc2c47ecb937..000000000000 --- a/extensions/source/svg/svgaction.cxx +++ /dev/null @@ -1,1458 +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_extensions.hxx" - -#include "svgaction.hxx" -#include -#include -#include - -#undef _SVG_USE_NATIVE_TEXTDECORATION -#undef _SVG_USE_TSPANS - -// ----------- -// - statics - -// ----------- - -static const char aXMLElemSVG[] = "svg"; -static const char aXMLElemG[] = "g"; -static const char aXMLElemDefs[] = "defs"; -static const char aXMLElemClipPath[] = "clipPath"; -static const char aXMLElemLine[] = "line"; -static const char aXMLElemRect[] = "rect"; -static const char aXMLElemEllipse[] = "ellipse"; -static const char aXMLElemPath[] = "path"; -static const char aXMLElemPolygon[] = "polygon"; -static const char aXMLElemPolyLine[] = "polyline"; -static const char aXMLElemText[] = "text"; -static const char aXMLElemTSpan[] = "tspan"; -static const char aXMLElemImage[] = "image"; - -static const char aXMLAttrTransform[] = "transform"; -static const char aXMLAttrStyle[] = "style"; -static const char aXMLAttrId[] = "id"; - -static const char aXMLAttrD[] = "d"; -static const char aXMLAttrX[] = "x"; -static const char aXMLAttrY[] = "y"; -static const char aXMLAttrX1[] = "x1"; -static const char aXMLAttrY1[] = "y1"; -static const char aXMLAttrX2[] = "x2"; -static const char aXMLAttrY2[] = "y2"; -static const char aXMLAttrCX[] = "cx"; -static const char aXMLAttrCY[] = "cy"; -static const char aXMLAttrRX[] = "rx"; -static const char aXMLAttrRY[] = "ry"; -static const char aXMLAttrWidth[] = "width"; -static const char aXMLAttrHeight[] = "height"; -static const char aXMLAttrPoints[] = "points"; -static const char aXMLAttrXLinkHRef[] = "xlink:href"; - -static const sal_Unicode pBase64[] = -{ - //0 1 2 3 4 5 6 7 - 'A','B','C','D','E','F','G','H', // 0 - 'I','J','K','L','M','N','O','P', // 1 - 'Q','R','S','T','U','V','W','X', // 2 - 'Y','Z','a','b','c','d','e','f', // 3 - 'g','h','i','j','k','l','m','n', // 4 - 'o','p','q','r','s','t','u','v', // 5 - 'w','x','y','z','0','1','2','3', // 6 - '4','5','6','7','8','9','+','/' // 7 -}; - -// -------------- -// - FastString - -// -------------- - -FastString::FastString( sal_uInt32 nInitLen, sal_uInt32 nIncrement ) : - mpBuffer( new sal_Unicode[ nInitLen * sizeof( sal_Unicode ) ] ), - mnBufLen( nInitLen ), - mnCurLen( 0 ), - mnBufInc( nIncrement ), - mnPartPos( 0 ) -{ - DBG_ASSERT( nInitLen, "invalid initial length" ); - DBG_ASSERT( nIncrement, "invalid increment" ); -} - -// ----------------------------------------------------------------------------- - -FastString::FastString( sal_Char* pBufferForBase64Encoding, sal_uInt32 nBufLen ) : - mnBufInc( 2048 ), - mnPartPos( 0 ) -{ - DBG_ASSERT( pBufferForBase64Encoding && nBufLen, "invalid arguments" ); - - const sal_uInt32 nQuadCount = nBufLen / 3; - const sal_uInt32 nRest = nBufLen % 3; - - if( nQuadCount || nRest ) - { - mnBufLen = mnCurLen = ( ( nQuadCount + ( nRest ? 1 : 0 ) ) << 2 ); - mpBuffer = new sal_Unicode[ mnBufLen * sizeof( sal_Unicode ) ]; - - sal_Char* pTmpSrc = pBufferForBase64Encoding; - sal_Unicode* pTmpDst = mpBuffer; - - for( sal_uInt32 i = 0; i < nQuadCount; i++ ) - { - const sal_Int32 nA = *pTmpSrc++; - const sal_Int32 nB = *pTmpSrc++; - const sal_Int32 nC = *pTmpSrc++; - - *pTmpDst++ = pBase64[ ( nA >> 2 ) & 0x3f ]; - *pTmpDst++ = pBase64[ ( ( nA << 4 ) & 0x30 ) + ( ( nB >> 4 ) & 0xf ) ]; - *pTmpDst++ = pBase64[ ( ( nB << 2 ) & 0x3c ) + ( ( nC >> 6 ) & 0x3 ) ]; - *pTmpDst++ = pBase64[ nC & 0x3f ]; - } - - if( 1 == nRest ) - { - const sal_Int32 nA = *pTmpSrc; - - *pTmpDst++ = pBase64[ ( nA >> 2 ) & 0x3f ]; - *pTmpDst++ = pBase64[ ( nA << 4 ) & 0x30 ]; - *pTmpDst++ = '='; - *pTmpDst = '='; - } - else if( 2 == nRest ) - { - const sal_Int32 nA = *pTmpSrc++; - const sal_Int32 nB = *pTmpSrc; - - *pTmpDst++ = pBase64[ ( nA >> 2 ) & 0x3f ]; - *pTmpDst++ = pBase64[ ( ( nA << 4 ) & 0x30 ) + ( ( nB >> 4 ) & 0xf ) ]; - *pTmpDst++ = pBase64[ ( nB << 2 ) & 0x3c ]; - *pTmpDst = '='; - } - } - else - { - mpBuffer = new sal_Unicode[ ( mnBufLen = 1 ) * sizeof( sal_Unicode ) ]; - mnCurLen = 0; - } -} - -// ----------------------------------------------------------------------------- - -FastString::~FastString() -{ - delete[] mpBuffer; -} - -// ----------------------------------------------------------------------------- - -FastString& FastString::operator+=( const NMSP_RTL::OUString& rStr ) -{ - if( rStr.getLength() ) - { - if( ( mnCurLen + rStr.getLength() ) > mnBufLen ) - { - const sal_uInt32 nNewBufLen = ( mnBufLen + ( ( ( mnCurLen + rStr.getLength() ) - mnBufLen ) / mnBufInc + 1 ) * mnBufInc ); - sal_Unicode* pNewBuffer = new sal_Unicode[ nNewBufLen * sizeof( sal_Unicode ) ]; - - memcpy( pNewBuffer, mpBuffer, mnBufLen * sizeof( sal_Unicode ) ); - delete[] mpBuffer; - mpBuffer = pNewBuffer; - mnBufLen = nNewBufLen; - } - - memcpy( mpBuffer + mnCurLen, rStr.getStr(), rStr.getLength() * sizeof( sal_Unicode ) ); - mnCurLen += rStr.getLength(); - - if( maString.getLength() ) - maString = NMSP_RTL::OUString(); - } - - return *this; -} - -// ----------------------------------------------------------------------------- - -const NMSP_RTL::OUString& FastString::GetString() const -{ - if( !maString.getLength() && mnCurLen ) - ( (FastString*) this )->maString = NMSP_RTL::OUString( mpBuffer, mnCurLen ); - - return maString; -} - -// ----------------------------------------------------------------------------- - -sal_Bool FastString::GetFirstPartString( const sal_uInt32 nPartLen, NMSP_RTL::OUString& rPartString ) -{ - const sal_uInt32 nLength = Min( mnCurLen, nPartLen ); - - mnPartPos = 0; - - if( nLength ) - { - rPartString = NMSP_RTL::OUString( mpBuffer, nLength ); - mnPartPos = nLength; - } - - return( rPartString.getLength() > 0 ); -} - -// ----------------------------------------------------------------------------- - -sal_Bool FastString::GetNextPartString( const sal_uInt32 nPartLen, NMSP_RTL::OUString& rPartString ) -{ - if( mnPartPos < mnCurLen ) - { - const sal_uInt32 nLength = Min( mnCurLen - mnPartPos, nPartLen ); - rPartString = NMSP_RTL::OUString( mpBuffer + mnPartPos, nLength ); - mnPartPos += nLength; - } - else - rPartString = NMSP_RTL::OUString(); - - return( rPartString.getLength() > 0 ); -} - -// ---------------------- -// - SVGAttributeWriter - -// ---------------------- - -SVGAttributeWriter::SVGAttributeWriter( SVGActionWriter& rParent, SvXMLExport& rExport ) : - mrParent( rParent ), - mrExport( rExport ), - mpElemFont( NULL ), - mpElemPaint( NULL ) -{ -} - -// ----------------------------------------------------------------------------- - -SVGAttributeWriter::~SVGAttributeWriter() -{ - delete mpElemPaint; - delete mpElemFont; -} - -// ----------------------------------------------------------------------------- - -NMSP_RTL::OUString SVGAttributeWriter::GetFontStyle( const Font& rFont ) -{ - FastString aStyle; - - // font family - aStyle += B2UCONST( "font-family:" ); - aStyle += NMSP_RTL::OUString( rFont.GetName().GetToken( 0, ';' ) ); - - // font size - aStyle += B2UCONST( ";" ); - aStyle += B2UCONST( "font-size:" ); - aStyle += mrParent.GetValueString( mrParent.ImplMap( Size( 0, rFont.GetHeight() ) ).Height(), mrParent.HasDoublePoints() ); - - // font style - if( rFont.GetItalic() != ITALIC_NONE ) - { - aStyle += B2UCONST( ";" ); - aStyle += B2UCONST( "font-style:" ); - - if( rFont.GetItalic() == ITALIC_OBLIQUE ) - aStyle += B2UCONST( "oblique" ); - else - aStyle += B2UCONST( "italic" ); - } - - // font weight - sal_Int32 nFontWeight; - - switch( rFont.GetWeight() ) - { - case WEIGHT_THIN: nFontWeight = 100; break; - case WEIGHT_ULTRALIGHT: nFontWeight = 200; break; - case WEIGHT_LIGHT: nFontWeight = 300; break; - case WEIGHT_SEMILIGHT: nFontWeight = 400; break; - case WEIGHT_NORMAL: nFontWeight = 400; break; - case WEIGHT_MEDIUM: nFontWeight = 500; break; - case WEIGHT_SEMIBOLD: nFontWeight = 600; break; - case WEIGHT_BOLD: nFontWeight = 700; break; - case WEIGHT_ULTRABOLD: nFontWeight = 800; break; - case WEIGHT_BLACK: nFontWeight = 900; break; - default: nFontWeight = 400; break; - } - - aStyle += B2UCONST( ";" ); - aStyle += B2UCONST( "font-weight:" ); - aStyle += NMSP_RTL::OUString::valueOf( nFontWeight ); - - // !!! - // font-variant - // font-stretch - // font-size-adjust - -#ifdef _SVG_USE_NATIVE_TEXTDECORATION - - if( rFont.GetUnderline() != UNDERLINE_NONE || rFont.GetStrikeout() != STRIKEOUT_NONE ) - { - aStyle += B2UCONST( ";" ); - aStyle += B2UCONST( "text-decoration:" ); - - if( rFont.GetUnderline() != UNDERLINE_NONE ) - aStyle += B2UCONST( " underline" ); - - if( rFont.GetStrikeout() != STRIKEOUT_NONE ) - aStyle += B2UCONST( " line-through" ); - } - -#endif // _SVG_USE_NATIVE_TEXTDECORATION - - return aStyle.GetString(); -} - -// ----------------------------------------------------------------------------- - -NMSP_RTL::OUString SVGAttributeWriter::GetPaintStyle( const Color& rLineColor, const Color& rFillColor ) -{ - FastString aStyle; - - // line color - aStyle += B2UCONST( "stroke:" ); - - if( rLineColor.GetTransparency() == 255 ) - aStyle += B2UCONST( "none" ); - else - { - // line color value in rgb - aStyle += B2UCONST( "rgb(" ); - aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) rLineColor.GetRed() ); - aStyle += B2UCONST( "," ); - aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) rLineColor.GetGreen() ); - aStyle += B2UCONST( "," ); - aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) rLineColor.GetBlue() ); - aStyle += B2UCONST( ")" ); - - // line color opacity in percent if neccessary - if( rLineColor.GetTransparency() ) - { - aStyle += B2UCONST( ";" ); - aStyle += B2UCONST( "stroke-opacity:" ); - aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) ( ( 255 - (double) rLineColor.GetTransparency() ) / 2.55 ) ); - aStyle += B2UCONST( "%" ); - } - } - - // fill color - aStyle += B2UCONST( ";" ); - aStyle += B2UCONST( "fill:" ); - - if( rFillColor.GetTransparency() == 255 ) - aStyle += B2UCONST( "none" ); - else - { - // fill color value in rgb - aStyle += B2UCONST( "rgb(" ); - aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) rFillColor.GetRed() ); - aStyle += B2UCONST( "," ); - aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) rFillColor.GetGreen() ); - aStyle += B2UCONST( "," ); - aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) rFillColor.GetBlue() ); - aStyle += B2UCONST( ")" ); - - // fill color opacity in percent if neccessary - if( rFillColor.GetTransparency() ) - { - aStyle += B2UCONST( ";" ); - aStyle += B2UCONST( "fill-opacity:" ); - aStyle += NMSP_RTL::OUString::valueOf( (sal_Int32) ( ( 255 - (double) rFillColor.GetTransparency() ) / 2.55 ) ); - aStyle += B2UCONST( "%" ); - } - } - - return aStyle.GetString(); -} - -// ----------------------------------------------------------------------------- - -void SVGAttributeWriter::SetFontAttr( const Font& rFont ) -{ - if( !mpElemFont || ( rFont != maCurFont ) ) - { - delete mpElemPaint, mpElemPaint = NULL; - delete mpElemFont; - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, GetFontStyle( maCurFont = rFont ) ); - mpElemFont = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ); - } -} - -// ----------------------------------------------------------------------------- - -void SVGAttributeWriter::SetPaintAttr( const Color& rLineColor, const Color& rFillColor ) -{ - if( !mpElemPaint || ( rLineColor != maCurLineColor ) || ( rFillColor != maCurFillColor ) ) - { - delete mpElemPaint; - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, GetPaintStyle( maCurLineColor = rLineColor, maCurFillColor = rFillColor ) ); - mpElemPaint = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ); - } -} - -// ------------------- -// - SVGActionWriter - -// ------------------- - -SVGActionWriter::SVGActionWriter( SvXMLExport& rExport, const GDIMetaFile& rMtf, - VirtualDevice* pParentVDev, sal_Bool bWriteDoublePoints ) : - mrExport( rExport ), - mrMtf( rMtf ), - mpContext( NULL ), - mnCurClipId( 1 ), - mbClipAttrChanged( sal_False ), - mbDoublePoints( bWriteDoublePoints ) -{ - if( pParentVDev ) - { - mpVDev = pParentVDev; - mbDestroyVDev = sal_False; - maTargetMapMode = mpVDev->GetMapMode(); - } - else - { - mpVDev = new VirtualDevice; - mpVDev->EnableOutput( sal_False ); - mbDestroyVDev = sal_True; - maTargetMapMode = MAP_100TH_MM; - } - - mpVDev->Push(); - mpVDev->SetMapMode( mrMtf.GetPrefMapMode() ); - ImplWriteActions( mrMtf ); - mpVDev->Pop(); -} - -// ----------------------------------------------------------------------------- - -SVGActionWriter::~SVGActionWriter() -{ - DBG_ASSERT( !mpContext, "Not all contexts are closed" ); - - if( mbDestroyVDev ) - delete mpVDev; -} - -// ----------------------------------------------------------------------------- - -long SVGActionWriter::ImplMap( sal_Int32 nVal ) const -{ - return ImplMap( Size( nVal, nVal ) ).Width(); -} - -// ----------------------------------------------------------------------------- - -Point SVGActionWriter::ImplMap( const Point& rPt ) const -{ - return mpVDev->LogicToLogic( rPt, mpVDev->GetMapMode(), maTargetMapMode ); -} - -// ----------------------------------------------------------------------------- - -Size SVGActionWriter::ImplMap( const Size& rSz ) const -{ - return mpVDev->LogicToLogic( rSz, mpVDev->GetMapMode(), maTargetMapMode ); -} - -// ----------------------------------------------------------------------------- - -NMSP_RTL::OUString SVGActionWriter::GetValueString( sal_Int32 nVal, sal_Bool bDoublePoints ) -{ - if( !bDoublePoints ) - return NMSP_RTL::OUString::valueOf( nVal ); - else - { - const double fPoints = nVal * 72.0 / 2540.0; - const sal_Int32 nInt = (sal_Int32) fPoints; - - return( ( NMSP_RTL::OUString::valueOf( nInt ) += - NMSP_RTL::OUString::valueOf( (sal_Unicode) '.' ) ) += - NMSP_RTL::OUString::valueOf( labs( (sal_Int32) ( ( fPoints - nInt ) * 100.0 ) ) ) ); - } -} - -// ----------------------------------------------------------------------------- - -void SVGActionWriter::ImplWriteLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor, - const NMSP_RTL::OUString* pStyle ) -{ - const Point aPt1( ImplMap( rPt1 ) ); - const Point aPt2( ImplMap( rPt2 ) ); - - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX1, GetValueString( aPt1.X(), mbDoublePoints ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY1, GetValueString( aPt1.Y(), mbDoublePoints ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX2, GetValueString( aPt2.X(), mbDoublePoints ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY2, GetValueString( aPt2.Y(), mbDoublePoints ) ); - - // add additional style if requested - if( pStyle ) - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, *pStyle ); - - if( pLineColor ) - { - // !!! mrExport.AddAttribute( XML_NAMESPACE_NONE, ... ) - DBG_ERROR( "SVGActionWriter::ImplWriteLine: Line color not implemented" ); - } - - { - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemLine, TRUE, TRUE ); - } -} - -// ----------------------------------------------------------------------------- - -void SVGActionWriter::ImplWriteRect( const Rectangle& rRect, long nRadX, long nRadY, - const NMSP_RTL::OUString* pStyle ) -{ - const Rectangle aRect( ImplMap( rRect ) ); - - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, GetValueString( aRect.Left(), mbDoublePoints ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, GetValueString( aRect.Top(), mbDoublePoints ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrWidth, GetValueString( aRect.GetWidth(), mbDoublePoints ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrHeight, GetValueString( aRect.GetHeight(), mbDoublePoints ) ); - - if( nRadX ) - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRX, GetValueString( ImplMap( nRadX ), mbDoublePoints ) ); - - if( nRadY ) - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRY, GetValueString( ImplMap( nRadY ), mbDoublePoints ) ); - - // add additional style if requested - if( pStyle ) - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, *pStyle ); - - { - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemRect, TRUE, TRUE ); - } -} - -// ----------------------------------------------------------------------------- - -void SVGActionWriter::ImplWriteEllipse( const Point& rCenter, long nRadX, long nRadY, - const NMSP_RTL::OUString* pStyle ) -{ - const Point aCenter( ImplMap( rCenter ) ); - - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrCX, GetValueString( aCenter.X(), mbDoublePoints ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrCY, GetValueString( aCenter.Y(), mbDoublePoints ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRX, GetValueString( ImplMap( nRadX ), mbDoublePoints ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRY, GetValueString( ImplMap( nRadY ), mbDoublePoints ) ); - - // add additional style if requested - if( pStyle ) - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, *pStyle ); - - { - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemEllipse, TRUE, TRUE ); - } -} - -// ----------------------------------------------------------------------------- - -void SVGActionWriter::ImplWritePolygon( const Polygon& rPoly, sal_Bool bLineOnly, - const NMSP_RTL::OUString* pStyle ) -{ - if( rPoly.GetSize() ) - { - if( rPoly.HasFlags() ) - ImplWritePolyPolygon( rPoly, bLineOnly, pStyle ); - else - { - FastString aStyle; - FastString aPoints; - USHORT i = 0, nSize = rPoly.GetSize(); - const NMSP_RTL::OUString aBlank( B2UCONST( " " ) ); - - // points - while( i < nSize ) - { - const Point aPolyPoint( ImplMap( rPoly[ i ] ) ); - - aPoints += GetValueString( aPolyPoint.X(), mbDoublePoints ); - aPoints += B2UCONST( "," ); - aPoints += GetValueString( aPolyPoint.Y(), mbDoublePoints ); - - if( ++i < nSize ) - aPoints += aBlank; - } - - // style - if( bLineOnly ) - { - aStyle += B2UCONST( "fill:none" ); - - if( pStyle ) - { - aStyle += B2UCONST( ";" ); - aStyle += *pStyle; - } - } - else if( pStyle ) - aStyle += *pStyle; - - // add point attribute - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrPoints, aPoints.GetString() ); - - // add style attribute - if( aStyle.GetLength() ) - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, aStyle.GetString() ); - - { - // write polyline/polygon element - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, bLineOnly ? aXMLElemPolyLine : aXMLElemPolygon, TRUE, TRUE ); - } - } - } -} - -// ----------------------------------------------------------------------------- - -void SVGActionWriter::ImplWritePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bool bLineOnly, - const NMSP_RTL::OUString* pStyle ) -{ - if( rPolyPoly.Count() ) - { - if( ( rPolyPoly.Count() == 1 ) && ( rPolyPoly[ 0 ].HasFlags() == sal_False ) ) - ImplWritePolygon( rPolyPoly[ 0 ], bLineOnly, pStyle ); - else - { - FastString aStyle; - FastString aPathData; - const NMSP_RTL::OUString aBlank( B2UCONST( " " ) ); - const NMSP_RTL::OUString aComma( B2UCONST( "," ) ); - Point aPolyPoint; - - for( long i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ ) - { - const Polygon& rPoly = rPolyPoly[ (USHORT) i ]; - USHORT n = 1, nSize = rPoly.GetSize(); - - if( nSize > 1 ) - { - aPathData += B2UCONST( "M " ); - aPathData += GetValueString( ( aPolyPoint = ImplMap( rPoly[ 0 ] ) ).X(), mbDoublePoints ); - aPathData += aComma; - aPathData += GetValueString( aPolyPoint.Y(), mbDoublePoints ); - sal_Char nCurrentMode = 0; - - while( n < nSize ) - { - aPathData += aBlank; - if ( ( rPoly.GetFlags( n ) == POLY_CONTROL ) && ( ( n + 2 ) < nSize ) ) - { - if ( nCurrentMode != 'C' ) - { - nCurrentMode = 'C'; - aPathData += B2UCONST( "C " ); - } - for ( int j = 0; j < 3; j++ ) - { - if ( j ) - aPathData += aBlank; - aPathData += GetValueString( ( aPolyPoint = ImplMap( rPoly[ n++ ] ) ).X(), mbDoublePoints ); - aPathData += aComma; - aPathData += GetValueString( aPolyPoint.Y(), mbDoublePoints ); - } - } - else - { - if ( nCurrentMode != 'L' ) - { - nCurrentMode = 'L'; - aPathData += B2UCONST( "L " ); - } - aPathData += GetValueString( ( aPolyPoint = ImplMap( rPoly[ n++ ] ) ).X(), mbDoublePoints ); - aPathData += aComma; - aPathData += GetValueString( aPolyPoint.Y(), mbDoublePoints ); - } - } - aPathData += B2UCONST( " Z" ); - - if( i < ( nCount - 1 ) ) - aPathData += aBlank; - } - } - if( bLineOnly ) - { - aStyle += B2UCONST( "fill:none" ); - if( pStyle ) - aStyle += B2UCONST( ";" ); - } - if( pStyle ) - aStyle += *pStyle; - - // add style attribute - if( aStyle.GetLength() ) - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, aStyle.GetString() ); - - // add path data attribute - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrD, aPathData.GetString() ); - { - // write polyline/polygon element - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemPath, TRUE, TRUE ); - } - } - } -} - -// ----------------------------------------------------------------------------- - -void SVGActionWriter::ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const Gradient& rGradient, - const NMSP_RTL::OUString* pStyle ) -{ - if( rPolyPoly.Count() ) - { - SvXMLElementExport aElemG( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ); - FastString aClipId; - FastString aClipStyle; - - aClipId += B2UCONST( "clip" ); - aClipId += NMSP_RTL::OUString::valueOf( ImplGetNextClipId() ); - - { - SvXMLElementExport aElemDefs( mrExport, XML_NAMESPACE_NONE, aXMLElemDefs, TRUE, TRUE ); - - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrId, aClipId.GetString() ); - - { - SvXMLElementExport aElemClipPath( mrExport, XML_NAMESPACE_NONE, aXMLElemClipPath, TRUE, TRUE ); - ImplWritePolyPolygon( rPolyPoly, sal_False ); - } - } - - // create new context with clippath set - aClipStyle += B2UCONST( "clip-path:URL(#" ); - aClipStyle += aClipId.GetString(); - aClipStyle += B2UCONST( ")" ); - - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, aClipStyle.GetString() ); - - { - GDIMetaFile aTmpMtf; - SvXMLElementExport aElemG2( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ); - - mpVDev->AddGradientActions( rPolyPoly.GetBoundRect(), rGradient, aTmpMtf ); - ImplWriteActions( aTmpMtf, pStyle ); - } - } -} - -// ----------------------------------------------------------------------------- - -void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, - const sal_Int32* pDXArray, long nWidth, - const NMSP_RTL::OUString* pStyle ) -{ - String aText( rText ); aText.EraseLeadingChars( ' ' ); - UINT32 nLen = aText.Len(), i; - - if( nLen ) - { - Size aNormSize; - sal_Int32* pOwnArray; - sal_Int32* pDX; - - // get text sizes - if( pDXArray ) - { - pOwnArray = NULL; - aNormSize = Size( mpVDev->GetTextWidth( aText ), 0 ); - pDX = const_cast< sal_Int32* >( pDXArray ); - } - else - { - pOwnArray = new sal_Int32[ nLen ]; - aNormSize = Size( mpVDev->GetTextArray( aText, pOwnArray ), 0 ); - pDX = pOwnArray; - } - - if( nLen > 1 ) - { - aNormSize.Width() = pDX[ nLen - 2 ] + mpVDev->GetTextWidth( aText.GetChar( (USHORT) nLen - 1 ) ); - - if( nWidth && aNormSize.Width() && ( nWidth != aNormSize.Width() ) ) - { - const double fFactor = (double) nWidth / aNormSize.Width(); - - for( i = 0; i < ( nLen - 1 ); i++ ) - pDX[ i ] = FRound( pDX[ i ] * fFactor ); - } - } - - FastString aStyle; - const Font& rFont = mpVDev->GetFont(); - const FontMetric aMetric( mpVDev->GetFontMetric() ); - Point aBaseLinePos( rPos ); - SvXMLElementExport* pTransform = NULL; - - // leading whitespaces erased? => adjust position - if( nLen < rText.Len() ) - { - aBaseLinePos.X() += mpVDev->GetTextWidth( ' ' ) * ( rText.Len() - nLen ); - } - - // always adjust text position to match baseline alignment - switch( rFont.GetAlign() ) - { - case( ALIGN_TOP ): - aBaseLinePos.Y() += aMetric.GetAscent(); - break; - - case( ALIGN_BOTTOM ): - aBaseLinePos.Y() -= aMetric.GetDescent(); - break; - - default: - break; - } - - // get mapped text position - const Point aPt( ImplMap( aBaseLinePos ) ); - - // if text is rotated, set transform at new g element - if( rFont.GetOrientation() ) - { - String aTransform; - - aTransform = NMSP_RTL::OUString::createFromAscii( "translate" ); - aTransform += '('; - aTransform += String( GetValueString( aPt.X(), mbDoublePoints ) ); - aTransform += ','; - aTransform += String( GetValueString( aPt.Y(), mbDoublePoints ) ); - aTransform += ')'; - - aTransform += String( NMSP_RTL::OUString::createFromAscii( " rotate" ) ); - aTransform += '('; - aTransform += String( NMSP_RTL::OUString::valueOf( rFont.GetOrientation() * -0.1 ) ); - aTransform += ')'; - - aTransform += String( NMSP_RTL::OUString::createFromAscii( " translate" ) ); - aTransform += '('; - aTransform += String( GetValueString( -aPt.X(), mbDoublePoints ) ); - aTransform += ','; - aTransform += String( GetValueString( -aPt.Y(), mbDoublePoints ) ); - aTransform += ')'; - - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrTransform, aTransform ); - pTransform = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ); - } - - // add additional style if requested - if( pStyle && pStyle->getLength() ) - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, *pStyle ); - - // write text element -#ifdef _SVG_USE_TSPANS - if( pDXArray ) - { - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemText, TRUE, TRUE ); - FastString aTSpanX; - const NMSP_RTL::OUString aSpace( ' ' ); - long i, nX, nCount; - - aTSpanX += GetValueString( aPt.X(), mbDoublePoints ); - aTSpanX += aSpace; - - for( i = 0, nX = aPt.X(), nCount = ( nLen - 1 ); i < nCount; ) - { - aTSpanX += GetValueString( aPt.X() + pDX[ i++ ], mbDoublePoints ); - aTSpanX += aSpace; - } - - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, aTSpanX.GetString() ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, GetValueString( aPt.Y(), mbDoublePoints ) ); - - { - try - { - try - { - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemTSpan, TRUE, TRUE ); - mrExport.GetDocHandler()->characters( NMSP_RTL::OUString( UniString( aText ) ) ); - } - catch( ::com::sun::star::xml::sax::SAXException& ) - { - // string seems to contain invalid characters - } - } - } - } - else -#endif - { - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, GetValueString( aPt.X(), mbDoublePoints ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, GetValueString( aPt.Y(), mbDoublePoints ) ); - - try - { - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemText, TRUE, TRUE ); - mrExport.GetDocHandler()->characters( NMSP_RTL::OUString( UniString( aText ) ) ); - } - catch( ::com::sun::star::xml::sax::SAXException& ) - { - // string seems to contain invalid characters - } - } - -#ifndef _SVG_USE_NATIVE_TEXTDECORATION - - // write strikeout if neccessary - if( ( rFont.GetStrikeout() != STRIKEOUT_NONE ) || ( rFont.GetUnderline() != UNDERLINE_NONE ) ) - { - Polygon aPoly( 4 ); - const long nLineHeight = Max( (long) FRound( aMetric.GetLineHeight() * 0.05 ), (long) 1 ); - - if( rFont.GetStrikeout() ) - { - const long nYLinePos = aBaseLinePos.Y() - FRound( aMetric.GetAscent() * 0.26 ); - - aPoly[ 0 ].X() = aBaseLinePos.X(); aPoly[ 0 ].Y() = nYLinePos - ( nLineHeight >> 1 ); - aPoly[ 1 ].X() = aBaseLinePos.X() + aNormSize.Width() - 1; aPoly[ 1 ].Y() = aPoly[ 0 ].Y(); - aPoly[ 2 ].X() = aPoly[ 1 ].X(); aPoly[ 2 ].Y() = aPoly[ 0 ].Y() + nLineHeight - 1; - aPoly[ 3 ].X() = aPoly[ 0 ].X(); aPoly[ 3 ].Y() = aPoly[ 2 ].Y(); - - ImplWritePolygon( aPoly, FALSE ); - } - - if( rFont.GetUnderline() ) - { - const long nYLinePos = aBaseLinePos.Y() + ( nLineHeight << 1 ); - - aPoly[ 0 ].X() = aBaseLinePos.X(); aPoly[ 0 ].Y() = nYLinePos - ( nLineHeight >> 1 ); - aPoly[ 1 ].X() = aBaseLinePos.X() + aNormSize.Width() - 1; aPoly[ 1 ].Y() = aPoly[ 0 ].Y(); - aPoly[ 2 ].X() = aPoly[ 1 ].X(); aPoly[ 2 ].Y() = aPoly[ 0 ].Y() + nLineHeight - 1; - aPoly[ 3 ].X() = aPoly[ 0 ].X(); aPoly[ 3 ].Y() = aPoly[ 2 ].Y(); - - ImplWritePolygon( aPoly, FALSE ); - } - } - -#endif // _SVG_USE_NATIVE_TEXTDECORATION - - delete[] pOwnArray; - delete pTransform; - } -} - -// ----------------------------------------------------------------------------- - -void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx, - const Point& rPt, const Size& rSz, - const Point& rSrcPt, const Size& rSrcSz, - const NMSP_RTL::OUString* /*pStyle*/ ) -{ - if( !!rBmpEx ) - { - BitmapEx aBmpEx( rBmpEx ); - Point aPoint = Point(); - const Rectangle aBmpRect( aPoint, rBmpEx.GetSizePixel() ); - const Rectangle aSrcRect( rSrcPt, rSrcSz ); - - if( aSrcRect != aBmpRect ) - aBmpEx.Crop( aSrcRect ); - - if( !!aBmpEx ) - { - SvMemoryStream aOStm( 65535, 65535 ); - - if( GraphicConverter::Export( aOStm, rBmpEx, CVT_PNG ) == ERRCODE_NONE ) - { - const Point aPt( ImplMap( rPt ) ); - const Size aSz( ImplMap( rSz ) ); - FastString aImageData( (sal_Char*) aOStm.GetData(), aOStm.Tell() ); - REF( NMSP_SAX::XExtendedDocumentHandler ) xExtDocHandler( mrExport.GetDocHandler(), NMSP_UNO::UNO_QUERY ); - - if( xExtDocHandler.is() ) - { - static const sal_uInt32 nPartLen = 64; - const NMSP_RTL::OUString aSpace( ' ' ); - const NMSP_RTL::OUString aLineFeed( NMSP_RTL::OUString::valueOf( (sal_Unicode) 0x0a ) ); - NMSP_RTL::OUString aString; - NMSP_RTL::OUString aImageString; - - aString = aLineFeed; - aString += B2UCONST( "<" ); - aString += NMSP_RTL::OUString::createFromAscii( aXMLElemImage ); - aString += aSpace; - - aString += NMSP_RTL::OUString::createFromAscii( aXMLAttrX ); - aString += B2UCONST( "=\"" ); - aString += GetValueString( aPt.X(), mbDoublePoints ); - aString += B2UCONST( "\" " ); - - aString += NMSP_RTL::OUString::createFromAscii( aXMLAttrY ); - aString += B2UCONST( "=\"" ); - aString += GetValueString( aPt.Y(), mbDoublePoints ); - aString += B2UCONST( "\" " ); - - aString += NMSP_RTL::OUString::createFromAscii( aXMLAttrWidth ); - aString += B2UCONST( "=\"" ); - aString += GetValueString( aSz.Width(), mbDoublePoints ); - aString += B2UCONST( "\" " ); - - aString += NMSP_RTL::OUString::createFromAscii( aXMLAttrHeight ); - aString += B2UCONST( "=\"" ); - aString += GetValueString( aSz.Height(), mbDoublePoints ); - aString += B2UCONST( "\" " ); - - aString += NMSP_RTL::OUString::createFromAscii( aXMLAttrXLinkHRef ); - aString += B2UCONST( "=\"data:image/png;base64," ); - - if( aImageData.GetFirstPartString( nPartLen, aImageString ) ) - { - xExtDocHandler->unknown( aString += aImageString ); - - while( aImageData.GetNextPartString( nPartLen, aImageString ) ) - { - xExtDocHandler->unknown( aLineFeed ); - xExtDocHandler->unknown( aImageString ); - } - } - - xExtDocHandler->unknown( B2UCONST( "\"/>" ) ); - } - } - } - } -} - -// ----------------------------------------------------------------------------- - -void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL::OUString* pStyle ) -{ - ImplAcquireContext(); - - for( ULONG i = 0, nCount = rMtf.GetActionCount(); i < nCount; i++ ) - { - const MetaAction* pAction = rMtf.GetAction( i ); - const USHORT nType = pAction->GetType(); - - switch( nType ) - { - case( META_PIXEL_ACTION ): - { - const MetaPixelAction* pA = (const MetaPixelAction*) pAction; - - mpContext->SetPaintAttr( pA->GetColor(), pA->GetColor() ); - ImplWriteLine( pA->GetPoint(), pA->GetPoint(), &pA->GetColor(), pStyle ); - } - break; - - case( META_POINT_ACTION ): - { - const MetaPointAction* pA = (const MetaPointAction*) pAction; - - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetLineColor() ); - ImplWriteLine( pA->GetPoint(), pA->GetPoint(), NULL, pStyle ); - } - break; - - case( META_LINE_ACTION ): - { - const MetaLineAction* pA = (const MetaLineAction*) pAction; - - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetLineColor() ); - ImplWriteLine( pA->GetStartPoint(), pA->GetEndPoint(), NULL, pStyle ); - } - break; - - case( META_RECT_ACTION ): - { - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWriteRect( ( (const MetaRectAction*) pAction )->GetRect(), 0, 0, pStyle ); - } - break; - - case( META_ROUNDRECT_ACTION ): - { - const MetaRoundRectAction* pA = (const MetaRoundRectAction*) pAction; - - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWriteRect( pA->GetRect(), pA->GetHorzRound(), pA->GetVertRound(), pStyle ); - } - break; - - case( META_ELLIPSE_ACTION ): - { - const MetaEllipseAction* pA = (const MetaEllipseAction*) pAction; - const Rectangle& rRect = pA->GetRect(); - - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWriteEllipse( rRect.Center(), rRect.GetWidth() >> 1, rRect.GetHeight() >> 1, pStyle ); - } - break; - - case( META_ARC_ACTION ): - case( META_PIE_ACTION ): - case( META_CHORD_ACTION ): - case( META_POLYGON_ACTION ): - { - Polygon aPoly; - - switch( nType ) - { - case( META_ARC_ACTION ): - { - const MetaArcAction* pA = (const MetaArcAction*) pAction; - aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_ARC ); - } - break; - - case( META_PIE_ACTION ): - { - const MetaPieAction* pA = (const MetaPieAction*) pAction; - aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_PIE ); - } - break; - - case( META_CHORD_ACTION ): - { - const MetaChordAction* pA = (const MetaChordAction*) pAction; - aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_CHORD ); - } - break; - - case( META_POLYGON_ACTION ): - aPoly = ( (const MetaPolygonAction*) pAction )->GetPolygon(); - break; - } - - if( aPoly.GetSize() ) - { - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWritePolygon( aPoly, sal_False, pStyle ); - } - } - break; - - case( META_POLYLINE_ACTION ): - { - const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pAction; - const Polygon& rPoly = pA->GetPolygon(); - - if( rPoly.GetSize() ) - { - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWritePolygon( rPoly, sal_True, pStyle ); - } - } - break; - - case( META_POLYPOLYGON_ACTION ): - { - const MetaPolyPolygonAction* pA = (const MetaPolyPolygonAction*) pAction; - const PolyPolygon& rPolyPoly = pA->GetPolyPolygon(); - - if( rPolyPoly.Count() ) - { - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWritePolyPolygon( rPolyPoly, sal_False, pStyle ); - } - } - break; - - case( META_GRADIENT_ACTION ): - { - const MetaGradientAction* pA = (const MetaGradientAction*) pAction; - GDIMetaFile aTmpMtf; - - mpVDev->AddGradientActions( pA->GetRect(), pA->GetGradient(), aTmpMtf ); - ImplWriteActions( aTmpMtf, pStyle ); - } - break; - - case( META_GRADIENTEX_ACTION ): - { - const MetaGradientExAction* pA = (const MetaGradientExAction*) pAction; - ImplWriteGradientEx( pA->GetPolyPolygon(), pA->GetGradient(), pStyle ); - } - break; - - case META_HATCH_ACTION: - { - const MetaHatchAction* pA = (const MetaHatchAction*) pAction; - GDIMetaFile aTmpMtf; - - mpVDev->AddHatchActions( pA->GetPolyPolygon(), pA->GetHatch(), aTmpMtf ); - ImplWriteActions( aTmpMtf, pStyle ); - } - break; - - case( META_TRANSPARENT_ACTION ): - { - const MetaTransparentAction* pA = (const MetaTransparentAction*) pAction; - const PolyPolygon& rPolyPoly = pA->GetPolyPolygon(); - - if( rPolyPoly.Count() ) - { - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWritePolyPolygon( rPolyPoly, sal_False, pStyle ); - } - } - break; - - case( META_FLOATTRANSPARENT_ACTION ): - { - const MetaFloatTransparentAction* pA = (const MetaFloatTransparentAction*) pAction; - GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() ); - Point aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() ); - const Size aSrcSize( aTmpMtf.GetPrefSize() ); - const Point aDestPt( pA->GetPoint() ); - const Size aDestSize( pA->GetSize() ); - const double fScaleX = aSrcSize.Width() ? (double) aDestSize.Width() / aSrcSize.Width() : 1.0; - const double fScaleY = aSrcSize.Height() ? (double) aDestSize.Height() / aSrcSize.Height() : 1.0; - long nMoveX, nMoveY; - - if( fScaleX != 1.0 || fScaleY != 1.0 ) - { - aTmpMtf.Scale( fScaleX, fScaleY ); - aSrcPt.X() = FRound( aSrcPt.X() * fScaleX ), aSrcPt.Y() = FRound( aSrcPt.Y() * fScaleY ); - } - - nMoveX = aDestPt.X() - aSrcPt.X(), nMoveY = aDestPt.Y() - aSrcPt.Y(); - - if( nMoveX || nMoveY ) - aTmpMtf.Move( nMoveX, nMoveY ); - - mpVDev->Push(); - ImplWriteActions( aTmpMtf, pStyle ); - mpVDev->Pop(); - } - break; - - case( META_EPS_ACTION ): - { - const MetaEPSAction* pA = (const MetaEPSAction*) pAction; - const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() ); - sal_Bool bFound = sal_False; - - for( ULONG j = 0, nCount2 = aGDIMetaFile.GetActionCount(); ( j < nCount2 ) && !bFound; j++ ) - { - const MetaAction* pSubstAct = aGDIMetaFile.GetAction( j ); - - if( pSubstAct->GetType() == META_BMPSCALE_ACTION ) - { - bFound = sal_True; - const MetaBmpScaleAction* pBmpScaleAction = (const MetaBmpScaleAction*) pSubstAct; - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWriteBmp( pBmpScaleAction->GetBitmap(), - pA->GetPoint(), pA->GetSize(), - Point(), pBmpScaleAction->GetBitmap().GetSizePixel(), pStyle ); - } - } - } - break; - - case( META_COMMENT_ACTION ): - { - const MetaCommentAction* pA = (const MetaCommentAction*) pAction; - String aSkipComment; - - if( pA->GetComment().CompareIgnoreCaseToAscii( "XGRAD_SEQ_BEGIN" ) == COMPARE_EQUAL ) - { - const MetaGradientExAction* pGradAction = NULL; - sal_Bool bDone = sal_False; - - while( !bDone && ( ++i < nCount ) ) - { - pAction = rMtf.GetAction( i ); - - if( pAction->GetType() == META_GRADIENTEX_ACTION ) - pGradAction = (const MetaGradientExAction*) pAction; - else if( ( pAction->GetType() == META_COMMENT_ACTION ) && - ( ( (const MetaCommentAction*) pAction )->GetComment().CompareIgnoreCaseToAscii( "XGRAD_SEQ_END" ) == COMPARE_EQUAL ) ) - { - bDone = sal_True; - } - } - - if( pGradAction ) - ImplWriteGradientEx( pGradAction->GetPolyPolygon(), pGradAction->GetGradient(), pStyle ); - } - } - break; - - case( META_BMP_ACTION ): - { - const MetaBmpAction* pA = (const MetaBmpAction*) pAction; - - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWriteBmp( pA->GetBitmap(), - pA->GetPoint(), mpVDev->PixelToLogic( pA->GetBitmap().GetSizePixel() ), - Point(), pA->GetBitmap().GetSizePixel(), pStyle ); - } - break; - - case( META_BMPSCALE_ACTION ): - { - const MetaBmpScaleAction* pA = (const MetaBmpScaleAction*) pAction; - - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWriteBmp( pA->GetBitmap(), - pA->GetPoint(), pA->GetSize(), - Point(), pA->GetBitmap().GetSizePixel(), pStyle ); - } - break; - - case( META_BMPSCALEPART_ACTION ): - { - const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*) pAction; - - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWriteBmp( pA->GetBitmap(), - pA->GetDestPoint(), pA->GetDestSize(), - pA->GetSrcPoint(), pA->GetSrcSize(), pStyle ); - } - break; - - case( META_BMPEX_ACTION ): - { - const MetaBmpExAction* pA = (const MetaBmpExAction*) pAction; - - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWriteBmp( pA->GetBitmapEx(), - pA->GetPoint(), mpVDev->PixelToLogic( pA->GetBitmapEx().GetSizePixel() ), - Point(), pA->GetBitmapEx().GetSizePixel(), pStyle ); - } - break; - - case( META_BMPEXSCALE_ACTION ): - { - const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pAction; - - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWriteBmp( pA->GetBitmapEx(), - pA->GetPoint(), pA->GetSize(), - Point(), pA->GetBitmapEx().GetSizePixel(), pStyle ); - } - break; - - case( META_BMPEXSCALEPART_ACTION ): - { - const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pAction; - - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWriteBmp( pA->GetBitmapEx(), - pA->GetDestPoint(), pA->GetDestSize(), - pA->GetSrcPoint(), pA->GetSrcSize(), pStyle ); - } - break; - - case( META_TEXT_ACTION ): - { - const MetaTextAction* pA = (const MetaTextAction*) pAction; - - mpContext->SetFontAttr( mpVDev->GetFont() ); - mpContext->SetPaintAttr( COL_TRANSPARENT, mpVDev->GetFont().GetColor() ); - ImplWriteText( pA->GetPoint(), String( pA->GetText(), pA->GetIndex(), pA->GetLen() ), NULL, 0, pStyle ); - } - break; - - case( META_TEXTRECT_ACTION ): - { - const MetaTextRectAction* pA = (const MetaTextRectAction*) pAction; - - mpContext->SetFontAttr( mpVDev->GetFont() ); - mpContext->SetPaintAttr( COL_TRANSPARENT, mpVDev->GetFont().GetColor() ); - ImplWriteText( pA->GetRect().TopLeft(), pA->GetText(), NULL, 0, pStyle ); - } - break; - - case( META_TEXTARRAY_ACTION ): - { - const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pAction; - const Point aPos( ImplMap( pA->GetPoint() ) ); - - mpContext->SetFontAttr( mpVDev->GetFont() ); - mpContext->SetPaintAttr( COL_TRANSPARENT, mpVDev->GetFont().GetColor() ); - ImplWriteText( pA->GetPoint(), String( pA->GetText(), pA->GetIndex(), pA->GetLen() ), pA->GetDXArray(), 0, pStyle ); - } - break; - - case( META_STRETCHTEXT_ACTION ): - { - const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pAction; - - mpContext->SetFontAttr( mpVDev->GetFont() ); - mpContext->SetPaintAttr( COL_TRANSPARENT, mpVDev->GetFont().GetColor() ); - ImplWriteText( pA->GetPoint(), String( pA->GetText(), pA->GetIndex(), pA->GetLen() ), NULL, pA->GetWidth(), pStyle ); - } - break; - - case( META_CLIPREGION_ACTION ): - case( META_ISECTRECTCLIPREGION_ACTION ): - case( META_ISECTREGIONCLIPREGION_ACTION ): - case( META_MOVECLIPREGION_ACTION ): - { - ( (MetaAction*) pAction )->Execute( mpVDev ); - mbClipAttrChanged = sal_True; - } - break; - - case( META_REFPOINT_ACTION ): - case( META_MAPMODE_ACTION ): - case( META_LINECOLOR_ACTION ): - case( META_FILLCOLOR_ACTION ): - case( META_TEXTLINECOLOR_ACTION ): - case( META_TEXTFILLCOLOR_ACTION ): - case( META_TEXTCOLOR_ACTION ): - case( META_TEXTALIGN_ACTION ): - case( META_FONT_ACTION ): - case( META_PUSH_ACTION ): - case( META_POP_ACTION ): - { - ( (MetaAction*) pAction )->Execute( mpVDev ); - } - break; - - case( META_RASTEROP_ACTION ): - case( META_MASK_ACTION ): - case( META_MASKSCALE_ACTION ): - case( META_MASKSCALEPART_ACTION ): - case( META_WALLPAPER_ACTION ): - case( META_TEXTLINE_ACTION ): - case( META_LAYOUTMODE_ACTION ): - { - // !!! >>> we don't want to support these actions - } - break; - -#ifdef DBG_UTIL - default : - ByteString aDbgOut( "SVGActionWriter::ImplWriteActions: unsupported MetaAction #" ); - aDbgOut.Append( ByteString::CreateFromInt32( nType ) ); - DBG_ERROR( aDbgOut.GetBuffer() ); - break; -#endif - } - } - - ImplReleaseContext(); -} diff --git a/extensions/source/svg/svgaction.hxx b/extensions/source/svg/svgaction.hxx deleted file mode 100644 index 8e7bececb87d..000000000000 --- a/extensions/source/svg/svgaction.hxx +++ /dev/null @@ -1,164 +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 _SVGACTION_HXX -#define _SVGACTION_HXX - -#include "svgcom.hxx" - -// -------------- -// - FastString - -// -------------- - -class FastString -{ -private: - - NMSP_RTL::OUString maString; - sal_Unicode* mpBuffer; - sal_uInt32 mnBufLen; - sal_uInt32 mnCurLen; - sal_uInt32 mnBufInc; - sal_uInt32 mnPartPos; - -public: - - FastString( sal_uInt32 nInitLen = 2048, sal_uInt32 nIncrement = 2048 ); - FastString( sal_Char* pBufferForBase64Encoding, sal_uInt32 nBufLen ); - ~FastString(); - - FastString& operator+=( const NMSP_RTL::OUString& rStr ); - - const NMSP_RTL::OUString& GetString() const; - sal_Bool GetFirstPartString( const sal_uInt32 nPartLen, NMSP_RTL::OUString& rPartString ); - sal_Bool GetNextPartString( const sal_uInt32 nPartLen, NMSP_RTL::OUString& rPartString ); - - sal_uInt32 GetLength() const { return mnCurLen; } - void Clear() { mnCurLen = 0, maString = NMSP_RTL::OUString(); } -}; - -// ---------------------- -// - SVGAttributeWriter - -// ---------------------- - -class SVGActionWriter; - -class SVGAttributeWriter -{ -private: - - Font maCurFont; - Color maCurLineColor; - Color maCurFillColor; - SVGActionWriter& mrParent; - SvXMLExport& mrExport; - SvXMLElementExport* mpElemFont; - SvXMLElementExport* mpElemPaint; - - SVGAttributeWriter(); - -public: - - SVGAttributeWriter( SVGActionWriter& rParent, SvXMLExport& rExport ); - virtual ~SVGAttributeWriter(); - - NMSP_RTL::OUString GetFontStyle( const Font& rFont ); - NMSP_RTL::OUString GetPaintStyle( const Color& rLineColor, const Color& rFillColor ); - - void SetFontAttr( const Font& rFont ); - void SetPaintAttr( const Color& rLineColor, const Color& rFillColor ); -}; - -// ------------------- -// - SVGActionWriter - -// ------------------- - -class SVGAttributeWriter; -class SvXMLExport; -class GDIMetaFile; - -class SVGActionWriter -{ - friend class SVGAttributeWriter; - -private: - - Stack maContextStack; - SvXMLExport& mrExport; - const GDIMetaFile& mrMtf; - SVGAttributeWriter* mpContext; - VirtualDevice* mpVDev; - MapMode maTargetMapMode; - sal_Int32 mnCurClipId; - sal_Bool mbDestroyVDev; - sal_Bool mbPaintAttrChanged; - sal_Bool mbFontAttrChanged; - sal_Bool mbClipAttrChanged; - sal_Bool mbDoublePoints; - - SVGAttributeWriter* ImplAcquireContext() { maContextStack.Push( mpContext = new SVGAttributeWriter( *this, mrExport ) ); return mpContext; } - void ImplReleaseContext() { delete (SVGAttributeWriter*) maContextStack.Pop(); mpContext = (SVGAttributeWriter*) maContextStack.Top(); } - - long ImplMap( sal_Int32 nVal ) const; - Point ImplMap( const Point& rPt ) const; - Size ImplMap( const Size& rSz ) const; - inline Rectangle ImplMap( const Rectangle& rRect ) const { return Rectangle( ImplMap( rRect.TopLeft() ), ImplMap( rRect.GetSize() ) ); } - - void ImplWriteLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor = NULL, const NMSP_RTL::OUString* pStyle = NULL ); - void ImplWriteRect( const Rectangle& rRect, long nRadX = 0, long nRadY = 0, const NMSP_RTL::OUString* pStyle = NULL ); - void ImplWriteEllipse( const Point& rCenter, long nRadX, long nRadY, const NMSP_RTL::OUString* pStyle = NULL ); - void ImplWritePolygon( const Polygon& rPoly, sal_Bool bLineOnly, const NMSP_RTL::OUString* pStyle = NULL ); - void ImplWritePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bool bLineOnly, const NMSP_RTL::OUString* pStyle = NULL ); - void ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const Gradient& rGradient, const NMSP_RTL::OUString* pStyle = NULL ); - void ImplWriteText( const Point& rPos, const String& rText, const sal_Int32* pDXArray, long nWidth, const NMSP_RTL::OUString* pStyle = NULL ); - void ImplWriteBmp( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& rSrcPt, const Size& rSrcSz, const NMSP_RTL::OUString* pStyle = NULL ); - - void ImplCheckFontAttributes(); - void ImplCheckPaintAttributes(); - - void ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL::OUString* pStyle = NULL ); - - sal_Int32 ImplGetNextClipId() { return mnCurClipId++; } - - SVGActionWriter(); - -public: - - static NMSP_RTL::OUString GetValueString( sal_Int32 nVal, sal_Bool bDoublePoints ); - -public: - - SVGActionWriter( SvXMLExport& rExport, const GDIMetaFile& rMtf, - VirtualDevice* pParentVDev = NULL, - sal_Bool bWriteDoublePoints = sal_False ); - virtual ~SVGActionWriter(); - - const VirtualDevice& GetVDev() const { return *mpVDev; } - BOOL HasDoublePoints() const { return mbDoublePoints; } -}; - -#endif diff --git a/extensions/source/svg/svgcom.hxx b/extensions/source/svg/svgcom.hxx deleted file mode 100644 index 3e593ff3ccf6..000000000000 --- a/extensions/source/svg/svgcom.hxx +++ /dev/null @@ -1,82 +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 _SVGCOM_HXX -#define _SVGCOM_HXX - -#include -#ifndef __RTL_USTRING_HXX_ -#include -#endif -#include -#include -#include -#include -#include -#ifndef _SALBTYPE_HXX -#include -#endif -#ifndef _GDIMTF_HXX -#include -#endif -#ifndef _METAACT_HXX -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// ----------------------------------------------------------------------------- - -#define NMSP_CPPU cppu -#define NMSP_RTL rtl -#define NMSP_UNO com::sun::star::uno -#define NMSP_LANG com::sun::star::lang -#define NMSP_SAX com::sun::star::xml::sax -#define NMSP_SVG com::sun::star::svg -#define NMSP_REGISTRY com::sun::star::registry - - -#define REF( _def_Obj ) NMSP_UNO::Reference< _def_Obj > -#define SEQ( _def_Obj ) NMSP_UNO::Sequence< _def_Obj > -#define ANY NMSP_UNO::Any -#define B2UCONST( _def_pChar ) (NMSP_RTL::OUString(RTL_CONSTASCII_USTRINGPARAM(_def_pChar ))) -#define SVG_DTD_STRING B2UCONST( "" ) - -#endif // _SYNCCOM_HXX diff --git a/extensions/source/svg/svgprinter.cxx b/extensions/source/svg/svgprinter.cxx deleted file mode 100644 index c7605a8af16d..000000000000 --- a/extensions/source/svg/svgprinter.cxx +++ /dev/null @@ -1,328 +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_extensions.hxx" - -#define _RMPRINTER_EXT - -#include "svgprinter.hxx" -#include "svgaction.hxx" -#include -#include -#include - -static const char aXMLElemSVG[] = "svg"; -static const char aXMLElemMetaSVG[] = "staroffice:svgElementMeta"; -static const char aXMLElemDesc[] = "desc"; -static const char aXMLElemMeta[] = "metadata"; -static const char aXMLElemRect[] = "rect"; - -static const char aXMLAttrMetaSVGOuter[] = "isOuterElement"; -static const char aXMLAttrMetaSVGPage[] = "isPageElement"; -static const char aXMLAttrViewBox[] = "viewBox"; -static const char aXMLAttrX[] = "x"; -static const char aXMLAttrY[] = "y"; -static const char aXMLAttrWidth[] = "width"; -static const char aXMLAttrHeight[] = "height"; - -// ---------------- -// - SVGMtfExport - -// ---------------- - -class SVGPrinterExport : public SvXMLExport -{ -private: - - Printer maPrinter; - VirtualDevice* mpVDev; - SvXMLElementExport* mpOuterElement; - sal_uInt32 mnPage; - - SVGPrinterExport(); - - SvXMLElementExport* ImplCreateSVGElement( const JobSetup& rSetup, Size& rOutputSize ); - void ImplWriteMetaAttr( sal_Bool bOuter, sal_Bool bPage ); - -protected: - - virtual void _ExportMeta() {} - virtual void _ExportStyles( BOOL /*bUsed*/ ) {} - virtual void _ExportAutoStyles() {} - virtual void _ExportContent() {} - virtual void _ExportMasterStyles() {} - virtual sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum eClass = ::xmloff::token::XML_TOKEN_INVALID ) { (void)eClass; return 0; } - -public: - - // #110680# - SVGPrinterExport( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, - const REF( NMSP_SAX::XDocumentHandler )& rxHandler, - const JobSetup& rSetup, - const NMSP_RTL::OUString& rJobName, - sal_uInt32 nCopies, - sal_Bool bCollate ); - - virtual ~SVGPrinterExport(); - - virtual void writePage( const JobSetup& rJobSetup, const GDIMetaFile& rMtf ); -}; - -// ----------------------------------------------------------------------------- - -// #110680# -SVGPrinterExport::SVGPrinterExport( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, - const REF( NMSP_SAX::XDocumentHandler )& rxHandler, - const JobSetup& rSetup, - const NMSP_RTL::OUString& rJobName, - sal_uInt32 /*nCopies*/, - sal_Bool /*bCollate*/ ) -: SvXMLExport( xServiceFactory, NMSP_RTL::OUString(), rxHandler ), - mpVDev( NULL ), - mnPage( 0 ) -{ - maPrinter.SetJobSetup( rSetup ); - - GetDocHandler()->startDocument(); - - REF( NMSP_SAX::XExtendedDocumentHandler ) xExtDocHandler( GetDocHandler(), NMSP_UNO::UNO_QUERY ); - - if( xExtDocHandler.is() ) - { - NMSP_RTL::OUString aString; - const NMSP_RTL::OUString aLineFeed( NMSP_RTL::OUString::valueOf( (sal_Unicode) 0x0a ) ); - - // intro - xExtDocHandler->unknown( ( aString = SVG_DTD_STRING ) += aLineFeed ); - xExtDocHandler->unknown( ( aString = B2UCONST( " " ) += aLineFeed ) ); - xExtDocHandler->unknown( ( aString = B2UCONST( " " ) += aLineFeed ) ); - xExtDocHandler->unknown( ( aString = B2UCONST( "unknown( ( aString = B2UCONST( "isOuterElement (true | false) \"false\" " ) += aLineFeed ) ); - xExtDocHandler->unknown( ( aString = B2UCONST( "isPageElement (true | false) \"true\"" ) += aLineFeed ) ); - - // end of intro - xExtDocHandler->unknown( ( aString = B2UCONST( ">" ) += aLineFeed ) ); - xExtDocHandler->unknown( ( aString = B2UCONST( "]>" ) ) ); - } - - // create outer element - Size aOutputSize; - - mpOuterElement = ImplCreateSVGElement( rSetup, aOutputSize ); - - // write description - SvXMLElementExport* pDescElem = new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemDesc, TRUE, TRUE ); - NMSP_RTL::OUString aDesc( B2UCONST( "document name: " ) ); - - GetDocHandler()->characters( aDesc += rJobName ); - delete pDescElem; - - // write meta attributes - ImplWriteMetaAttr( TRUE, FALSE ); -} - -// ----------------------------------------------------------------------------- - -SVGPrinterExport::~SVGPrinterExport() -{ - delete mpOuterElement; - GetDocHandler()->endDocument(); - delete mpVDev; -} - -// ----------------------------------------------------------------------------- - -SvXMLElementExport* SVGPrinterExport::ImplCreateSVGElement( const JobSetup& rSetup, Size& rOutputSize ) -{ - NMSP_RTL::OUString aAttr; - - delete mpVDev; - mpVDev = new VirtualDevice; - mpVDev->EnableOutput( FALSE ); - mpVDev->SetMapMode( MAP_100TH_MM ); - maPrinter.SetJobSetup( rSetup ); - - rOutputSize = maPrinter.PixelToLogic( maPrinter.GetOutputSizePixel(), mpVDev->GetMapMode() ); - - aAttr = SVGActionWriter::GetValueString( rOutputSize.Width(), sal_True ); - AddAttribute( XML_NAMESPACE_NONE, aXMLAttrWidth, aAttr ); - - aAttr = SVGActionWriter::GetValueString( rOutputSize.Height(), sal_True ); - AddAttribute( XML_NAMESPACE_NONE, aXMLAttrHeight, aAttr ); - - aAttr = B2UCONST( "0.0 0.0 " ); - aAttr += SVGActionWriter::GetValueString( rOutputSize.Width(), sal_True ); - aAttr += B2UCONST( " " ); - aAttr += SVGActionWriter::GetValueString( rOutputSize.Height(), sal_True ); - AddAttribute( XML_NAMESPACE_NONE, aXMLAttrViewBox, aAttr ); - - return( new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemSVG, TRUE, TRUE ) ); -} - -// ----------------------------------------------------------------------------- - -void SVGPrinterExport::ImplWriteMetaAttr( sal_Bool bOuter, sal_Bool bPage ) -{ - SvXMLElementExport aMetaData( *this, XML_NAMESPACE_NONE, aXMLElemMeta, TRUE, TRUE ); - NMSP_RTL::OUString aAttr; - - aAttr = bOuter ? B2UCONST( "true" ) : B2UCONST( "false" ); - AddAttribute( XML_NAMESPACE_NONE, aXMLAttrMetaSVGOuter, aAttr ); - - aAttr = bPage ? B2UCONST( "true" ) : B2UCONST( "false" ); - AddAttribute( XML_NAMESPACE_NONE, aXMLAttrMetaSVGPage, aAttr ); - - { - delete( new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemMetaSVG, TRUE, TRUE ) ); - } -} - -// ----------------------------------------------------------------------------- - -void SVGPrinterExport::writePage( const JobSetup& rSetup, const GDIMetaFile& rMtf ) -{ - Size aOutputSize; - NMSP_RTL::OUString aAttr; - SvXMLElementExport* pPageElem = ImplCreateSVGElement( rSetup, aOutputSize ); - - // write description - SvXMLElementExport* pDescElem = new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemDesc, TRUE, TRUE ); - NMSP_RTL::OUString aDesc( B2UCONST( "page: " ) ); - - GetDocHandler()->characters( aDesc += NMSP_RTL::OUString::valueOf( (sal_Int32) ++mnPage ) ); - delete pDescElem; - - // write meta attributes - ImplWriteMetaAttr( FALSE, TRUE ); - - // write dummy rect element - aAttr = B2UCONST( "0.0" ); - AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, aAttr ); - AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, aAttr ); - - aAttr = SVGActionWriter::GetValueString( aOutputSize.Width(), sal_True ); - AddAttribute( XML_NAMESPACE_NONE, aXMLAttrWidth, aAttr ); - - aAttr = SVGActionWriter::GetValueString( aOutputSize.Height(), sal_True ); - AddAttribute( XML_NAMESPACE_NONE, aXMLAttrHeight, aAttr ); - - delete( new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemRect, TRUE, TRUE ) ); - delete( new SVGActionWriter( *this, rMtf, mpVDev, TRUE ) ); - - delete pPageElem; -} - -// -------------- -// - SVGPrinter - -// -------------- - -SVGPrinter::SVGPrinter( const REF( NMSP_LANG::XMultiServiceFactory )& rxMgr ) : - mxFact( rxMgr ), - mpWriter( NULL ) -{ -} - -// ----------------------------------------------------------------------------- - -SVGPrinter::~SVGPrinter() -{ - delete mpWriter; -} - -// ----------------------------------------------------------------------------- - - -ANY SAL_CALL SVGPrinter::queryInterface( const NMSP_UNO::Type & rType ) throw( NMSP_UNO::RuntimeException ) -{ - const ANY aRet( NMSP_CPPU::queryInterface( rType, static_cast< NMSP_SVG::XSVGPrinter* >( this ) ) ); - - return( aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ) ); -} - -// ----------------------------------------------------------------------------- - -void SAL_CALL SVGPrinter::acquire() throw() -{ - OWeakObject::acquire(); -} - -// ----------------------------------------------------------------------------- - -void SAL_CALL SVGPrinter::release() throw() -{ - OWeakObject::release(); -} - -// ----------------------------------------------------------------------------- - -sal_Bool SAL_CALL SVGPrinter::startJob( const REF( NMSP_SAX::XDocumentHandler )& rxHandler, - const SEQ( sal_Int8 )& rJobSetupSeq, - const NMSP_RTL::OUString& rJobName, - sal_uInt32 nCopies, sal_Bool bCollate ) throw( NMSP_UNO::RuntimeException ) -{ - const sal_Bool bRet = ( mpWriter == NULL ); - - if( bRet ) - { - SvMemoryStream aMemStm( (char*) rJobSetupSeq.getConstArray(), rJobSetupSeq.getLength(), STREAM_READ ); - JobSetup aJobSetup; - - aMemStm.SetCompressMode( COMPRESSMODE_FULL ); - aMemStm >> aJobSetup; - - const REF( NMSP_SAX::XDocumentHandler ) xDocumentHandler( rxHandler ); - - // #110680# - // mpWriter = new SVGPrinterExport( xDocumentHandler, aJobSetup, rJobName, nCopies, bCollate ); - mpWriter = new SVGPrinterExport( mxFact, xDocumentHandler, aJobSetup, rJobName, nCopies, bCollate ); - } - - return bRet; -} - -// ----------------------------------------------------------------------------- - -void SAL_CALL SVGPrinter::printPage( const SEQ( sal_Int8 )& rPrintPage ) throw( NMSP_UNO::RuntimeException ) -{ - SvMemoryStream aMemStm( (char*) rPrintPage.getConstArray(), rPrintPage.getLength(), STREAM_READ ); - PrinterPage aPage; - - aMemStm.SetCompressMode( COMPRESSMODE_FULL ); - aMemStm >> aPage; - mpWriter->writePage( aPage.GetJobSetup(), *aPage.GetGDIMetaFile() ); -} - -// ----------------------------------------------------------------------------- - -void SAL_CALL SVGPrinter::endJob() throw( NMSP_UNO::RuntimeException ) -{ - delete mpWriter, mpWriter = NULL; -} diff --git a/extensions/source/svg/svgprinter.hxx b/extensions/source/svg/svgprinter.hxx deleted file mode 100644 index 743a86bc7a50..000000000000 --- a/extensions/source/svg/svgprinter.hxx +++ /dev/null @@ -1,67 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SVGPRINTER_HXX -#define _SVGPRINTER_HXX - -#include "svgcom.hxx" - -// ------------- -// - SVGWriter - -// ------------- - -class SVGPrinterExport; - -class SVGPrinter : public NMSP_CPPU::OWeakObject, NMSP_SVG::XSVGPrinter -{ -private: - - REF( NMSP_LANG::XMultiServiceFactory ) mxFact; - SVGPrinterExport* mpWriter; - - SVGPrinter(); - -public: - - SVGPrinter( const REF( NMSP_LANG::XMultiServiceFactory )& rxMgr ); - virtual ~SVGPrinter(); - - // XInterface - virtual ANY SAL_CALL queryInterface( const NMSP_UNO::Type & rType ) throw( NMSP_UNO::RuntimeException ); - virtual void SAL_CALL acquire() throw(); - virtual void SAL_CALL release() throw(); - - // XSVGPrinter - virtual sal_Bool SAL_CALL startJob( const REF( NMSP_SAX::XDocumentHandler )& rxHandler, - const SEQ( sal_Int8 )& rJobSetup, - const NMSP_RTL::OUString& rJobName, - sal_uInt32 nCopies, sal_Bool bCollate ) throw( NMSP_UNO::RuntimeException ); - virtual void SAL_CALL printPage( const SEQ( sal_Int8 )& rPrintPage ) throw( NMSP_UNO::RuntimeException ); - virtual void SAL_CALL endJob() throw( NMSP_UNO::RuntimeException ); -}; - -#endif diff --git a/extensions/source/svg/svguno.cxx b/extensions/source/svg/svguno.cxx deleted file mode 100644 index 5e4281ca2e28..000000000000 --- a/extensions/source/svg/svguno.cxx +++ /dev/null @@ -1,98 +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_extensions.hxx" - -#include "svgcom.hxx" -#include "svgwriter.hxx" -#include "svgprinter.hxx" - -#include -#include - -// ------------------- -// - factory methods - -// ------------------- - -static REF( NMSP_UNO::XInterface ) SAL_CALL create_SVGWriter( const REF( NMSP_LANG::XMultiServiceFactory )& rxFact ) -{ - return REF( NMSP_UNO::XInterface )( *new SVGWriter( rxFact ) ); -} - -// ----------------------------------------------------------------------------- - -static REF( NMSP_UNO::XInterface ) SAL_CALL create_SVGPrinter( const REF( NMSP_LANG::XMultiServiceFactory )& rxFact ) -{ - return REF( NMSP_UNO::XInterface )( *new SVGPrinter( rxFact ) ); -} - -// ------------------------------------------ -// - component_getImplementationEnvironment - -// ------------------------------------------ - -extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -// ------------------------ -// - component_getFactory - -// ------------------------ - -extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /*pRegistryKey*/ ) -{ - REF( NMSP_LANG::XSingleServiceFactory ) xFactory; - void* pRet = 0; - - if( rtl_str_compare( pImplName, "com.sun.star.comp.extensions.SVGWriter" ) == 0 ) - { - const NMSP_RTL::OUString aServiceName( B2UCONST( "com.sun.star.svg.SVGWriter" ) ); - - xFactory = REF( NMSP_LANG::XSingleServiceFactory )( NMSP_CPPU::createSingleFactory( - reinterpret_cast< NMSP_LANG::XMultiServiceFactory* >( pServiceManager ), - B2UCONST( "com.sun.star.comp.extensions.SVGWriter" ), - create_SVGWriter, SEQ( NMSP_RTL::OUString )( &aServiceName, 1 ) ) ); - } - else if( rtl_str_compare( pImplName, "com.sun.star.comp.extensions.SVGPrinter" ) == 0 ) - { - const NMSP_RTL::OUString aServiceName( B2UCONST( "com.sun.star.svg.SVGPrinter" ) ); - - xFactory = REF( NMSP_LANG::XSingleServiceFactory )( NMSP_CPPU::createSingleFactory( - reinterpret_cast< NMSP_LANG::XMultiServiceFactory* >( pServiceManager ), - B2UCONST( "com.sun.star.comp.extensions.SVGPrinter" ), - create_SVGPrinter, SEQ( NMSP_RTL::OUString )( &aServiceName, 1 ) ) ); - } - - if( xFactory.is() ) - { - xFactory->acquire(); - pRet = xFactory.get(); - } - - return pRet; -} diff --git a/extensions/source/svg/svgwriter.cxx b/extensions/source/svg/svgwriter.cxx deleted file mode 100644 index 0a2ae22242ff..000000000000 --- a/extensions/source/svg/svgwriter.cxx +++ /dev/null @@ -1,175 +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_extensions.hxx" - -#include "svgwriter.hxx" -#include "svgaction.hxx" -#include - -// ---------------- -// - SVGMtfExport - -// ---------------- - -class SVGMtfExport : public SvXMLExport -{ -private: - - SVGMtfExport(); - -protected: - - virtual void _ExportMeta() {} - virtual void _ExportStyles( BOOL /*bUsed*/ ) {} - virtual void _ExportAutoStyles() {} - virtual void _ExportContent() {} - virtual void _ExportMasterStyles() {} - virtual sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum /*eClass*/ ) { return 0; } - -public: - - // #110680# - SVGMtfExport( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, - const REF( NMSP_SAX::XDocumentHandler )& rxHandler ); - - virtual ~SVGMtfExport(); - - virtual void writeMtf( const GDIMetaFile& rMtf ); -}; - -// ----------------------------------------------------------------------------- - -// #110680# -SVGMtfExport::SVGMtfExport( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, - const REF( NMSP_SAX::XDocumentHandler )& rxHandler ) -: SvXMLExport( xServiceFactory, NMSP_RTL::OUString(), rxHandler ) -{ - GetDocHandler()->startDocument(); -} - -// ----------------------------------------------------------------------------- - -SVGMtfExport::~SVGMtfExport() -{ - GetDocHandler()->endDocument(); -} - -// ----------------------------------------------------------------------------- - -void SVGMtfExport::writeMtf( const GDIMetaFile& rMtf ) -{ - const Size aSize( OutputDevice::LogicToLogic( rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MAP_MM ) ); - NMSP_RTL::OUString aAttr; - REF( NMSP_SAX::XExtendedDocumentHandler ) xExtDocHandler( GetDocHandler(), NMSP_UNO::UNO_QUERY ); - - if( xExtDocHandler.is() ) - xExtDocHandler->unknown( SVG_DTD_STRING ); - - aAttr = NMSP_RTL::OUString::valueOf( aSize.Width() ); - aAttr += B2UCONST( "mm" ); - AddAttribute( XML_NAMESPACE_NONE, "width", aAttr ); - - aAttr = NMSP_RTL::OUString::valueOf( aSize.Height() ); - aAttr += B2UCONST( "mm" ); - AddAttribute( XML_NAMESPACE_NONE, "height", aAttr ); - - aAttr = B2UCONST( "0 0 " ); - aAttr += NMSP_RTL::OUString::valueOf( aSize.Width() * 100L ); - aAttr += B2UCONST( " " ); - aAttr += NMSP_RTL::OUString::valueOf( aSize.Height() * 100L ); - AddAttribute( XML_NAMESPACE_NONE, "viewBox", aAttr ); - - { - SvXMLElementExport aSVG( *this, XML_NAMESPACE_NONE, "svg", TRUE, TRUE ); - SVGActionWriter* pWriter = new SVGActionWriter( *this, rMtf ); - - delete pWriter; - } -} - -// ------------- -// - SVGWriter - -// ------------- - -SVGWriter::SVGWriter( const REF( NMSP_LANG::XMultiServiceFactory )& rxMgr ) : - mxFact( rxMgr ) -{ -} - -// ----------------------------------------------------------------------------- - -SVGWriter::~SVGWriter() -{ -} - -// ----------------------------------------------------------------------------- - - -ANY SAL_CALL SVGWriter::queryInterface( const NMSP_UNO::Type & rType ) throw( NMSP_UNO::RuntimeException ) -{ - const ANY aRet( NMSP_CPPU::queryInterface( rType, static_cast< NMSP_SVG::XSVGWriter* >( this ) ) ); - - return( aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ) ); -} - -// ----------------------------------------------------------------------------- - -void SAL_CALL SVGWriter::acquire() throw() -{ - OWeakObject::acquire(); -} - -// ----------------------------------------------------------------------------- - -void SAL_CALL SVGWriter::release() throw() -{ - OWeakObject::release(); -} - -// ----------------------------------------------------------------------------- - -void SAL_CALL SVGWriter::write( const REF( NMSP_SAX::XDocumentHandler )& rxDocHandler, - const SEQ( sal_Int8 )& rMtfSeq ) throw( NMSP_UNO::RuntimeException ) -{ - SvMemoryStream aMemStm( (char*) rMtfSeq.getConstArray(), rMtfSeq.getLength(), STREAM_READ ); - GDIMetaFile aMtf; - - aMemStm.SetCompressMode( COMPRESSMODE_FULL ); - aMemStm >> aMtf; - - const REF( NMSP_SAX::XDocumentHandler ) xDocumentHandler( rxDocHandler ); - - // #110680# - // SVGMtfExport* pWriter = new SVGMtfExport( xDocumentHandler ); - SVGMtfExport* pWriter = new SVGMtfExport( mxFact, xDocumentHandler ); - - pWriter->writeMtf( aMtf ); - delete pWriter; -} diff --git a/extensions/source/svg/svgwriter.hxx b/extensions/source/svg/svgwriter.hxx deleted file mode 100644 index dc1ea932ebe3..000000000000 --- a/extensions/source/svg/svgwriter.hxx +++ /dev/null @@ -1,60 +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 _SVGWRITER_HXX -#define _SVGWRITER_HXX - -#include "svgcom.hxx" - -// ------------- -// - SVGWriter - -// ------------- - -class SVGWriter : public NMSP_CPPU::OWeakObject, NMSP_SVG::XSVGWriter -{ -private: - - REF( NMSP_LANG::XMultiServiceFactory ) mxFact; - - SVGWriter(); - -public: - - SVGWriter( const REF( NMSP_LANG::XMultiServiceFactory )& rxMgr ); - virtual ~SVGWriter(); - - // XInterface - virtual ANY SAL_CALL queryInterface( const NMSP_UNO::Type & rType ) throw( NMSP_UNO::RuntimeException ); - virtual void SAL_CALL acquire() throw(); - virtual void SAL_CALL release() throw(); - - // XSVGWriter - virtual void SAL_CALL write( const REF( NMSP_SAX::XDocumentHandler )& rxDocHandler, - const SEQ( sal_Int8 )& rMtfSeq ) throw( NMSP_UNO::RuntimeException ); -}; - -#endif -- cgit v1.2.3 From ca08f1794c075b82a17c915442f1c1c979a4ae1b Mon Sep 17 00:00:00 2001 From: ka Date: Fri, 4 Feb 2011 14:52:54 +0100 Subject: ka102: added/removed files for SVG import and module cleanup --- offapi/com/sun/star/graphic/GraphicRasterizer.idl | 52 +++++++ offapi/com/sun/star/graphic/XGraphicRasterizer.idl | 150 +++++++++++++++++++++ 2 files changed, 202 insertions(+) create mode 100644 offapi/com/sun/star/graphic/GraphicRasterizer.idl create mode 100644 offapi/com/sun/star/graphic/XGraphicRasterizer.idl diff --git a/offapi/com/sun/star/graphic/GraphicRasterizer.idl b/offapi/com/sun/star/graphic/GraphicRasterizer.idl new file mode 100644 index 000000000000..ee1214f39055 --- /dev/null +++ b/offapi/com/sun/star/graphic/GraphicRasterizer.idl @@ -0,0 +1,52 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef com_sun_star_graphic_GraphicRasterizer_idl +#define com_sun_star_graphic_GraphicRasterizer_idl + +#include + +module com { module sun { module star { module graphic +{ + +/** Service that describes the necessary interfaces and properties + to convert arbitrary graphic data to a XGraphic + interface containing a pixel graphic, that can be rendered the usual + ways. + */ + +service GraphicRasterizer +{ + /** Interface to initiate the rasterizing process + */ + interface ::com::sun::star::graphic::XGraphicRasterizer; + +}; + +} ; } ; } ; } ; + +#endif diff --git a/offapi/com/sun/star/graphic/XGraphicRasterizer.idl b/offapi/com/sun/star/graphic/XGraphicRasterizer.idl new file mode 100644 index 000000000000..097c4fdfa31e --- /dev/null +++ b/offapi/com/sun/star/graphic/XGraphicRasterizer.idl @@ -0,0 +1,150 @@ +/*/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef com_sun_star_graphic_XGraphicRasterizer_idl +#define com_sun_star_graphic_XGraphicRasterizer_idl + +#include +#include +#include +#include +#include + +module com { module sun { module star { module graphic +{ + +/** This interfaces exposes the initialize and a rasterize method to + rasterize a given data stream to a pixel graphic + */ +interface XGraphicRasterizer : ::com::sun::star::uno::XInterface +{ + /** Initializing the rasterizer + +

This method could also be used to determine, if + the provided data is able to be rasterized by the + implementation. The implementation should take care of + this feature as well as setting the default image size in + pixel within the given output parameter.

+ + @param DataStream + The input stream of data that should be rasterized + + @param DPI_X + The horizontal resolution of the callers device in pixel per inch. This + value is needed to calculate the correct dimensions of the graphic to be + rasterized. If a value of 0 is given, a horizontal default + resolution of 72 DPI is used. + + @param DPI_Y + The vertical resolution of the callers device in pixel per inch. This + value is needed to calculate the correct dimensions of the graphic to be + rasterized. If a value of 0 is given, a vertical default + resolution of 72 DPI is used. + + @param DefaultSizePixel + The default rendering size in pixel of the underlying graphics + data may be available after the call via this output parameter. + + In case no default size can be determined during initialization, + a default pixel size of 0,0 is returned. In this case, the caller + needs to assume a default pixel size, appropriate for the calling + context. + + @returns + A boolean value indicating if rasterizing of the given data is + possible at all and if the initialization process happened + successfully. + + @see com::sun::star::io::XInputStream + @see com::sun::star::awt::Size + */ + boolean initializeData( [in] com::sun::star::io::XInputStream DataStream, + [in] unsigned long DPI_X, + [in] unsigned long DPI_Y, + [out] com::sun::star::awt::Size DefaultSizePixel ); + + /** Rasterizing the initialized data into a XGraphic container. + +

The XGraphic container will contain a pixel + type graphic after a successful rasterization process

+ +

In case of any fault during the rasterization process, + the XGraphic container will be empty afterwards and + the method will return false

+ + @param Width + The width in pixel of the graphic to be rasterized. + This parameter is used without taking other transformation + values into account. + + @param Height + The height in pixel of the graphic to be rasterized. + This parameter is used without taking other transformation + values into account. + + @param RotateAngle + The rotation angle of the graphic to be rasterized. + This parameter is used without taking other transformation + values into account. The rotation is applied after scaling + and shearing the original image. + + @param ShearXAngle + The horizontal shear angle of the graphic to be rasterized. + This parameter is used without taking other transformation + values into account. The shearing is applied after scaling + and before rotation of the image. + + @param ShearYAngle + The vertical shear angle of the graphic to be rasterized. + This parameter is used without taking other transformation + values into account. The shearing is applied after scaling + and before rotation of the image. + + @param RasterizeProperties + Additional properties for special needs (undefined by now) + + @param Graphic + An interface to a graphic container into which the given data + should be rasterized. + + @returns com::sun::star::graphic::XGraphic + An interface to a graphic container that holds the rasterized pixel data + + @see com::sun::star::beans::PropertyValues + @see com::sun::star::graphic::XGraphic + */ + com::sun::star::graphic::XGraphic rasterize( [in] unsigned long Width, + [in] unsigned long Height, + [in] double RotateAngle, + [in] double ShearAngle_X, + [in] double ShearAngle_Y, + [in] com::sun::star::beans::PropertyValues RasterizeProperties ); +}; + +} ; } ; } ; } ; + +#endif -- cgit v1.2.3 From 09d29ca2b6cf134b91365d8541eb20710ed012b5 Mon Sep 17 00:00:00 2001 From: ka Date: Sat, 5 Feb 2011 01:54:11 +0100 Subject: ka102: missing include --- sw/source/core/undo/docundo.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx index 3dce09e66fa9..d11a84d52a1c 100644 --- a/sw/source/core/undo/docundo.cxx +++ b/sw/source/core/undo/docundo.cxx @@ -47,6 +47,7 @@ #include #include #include +#include using namespace ::com::sun::star; -- cgit v1.2.3 From b2e45e37a66d820bf35864ad4dc873a6bfaf1c08 Mon Sep 17 00:00:00 2001 From: ka Date: Sat, 5 Feb 2011 05:12:47 +0100 Subject: ka102: added checks for hashmap / new font export --- filter/source/svg/svgexport.cxx | 17 +------ filter/source/svg/svgfilter.hxx | 3 -- filter/source/svg/svgwriter.cxx | 102 ++++++++++++++++++++++++++++------------ 3 files changed, 73 insertions(+), 49 deletions(-) diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 034fb0018759..c2ee55011308 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -706,10 +706,6 @@ sal_Bool SVGFilter::implExportPages( const Reference< XDrawPages >& rxPages, if( mpObjects->find( xDrawPage ) != mpObjects->end() ) { -#ifdef DEBUG -fprintf( stderr, "Trying to get (Page): %p -- %p\n", xDrawPage.get(), SvxDrawPage::getImplementation( xDrawPage ) ); -#endif - const GDIMetaFile& rMtf = (*mpObjects)[ xDrawPage ].GetRepresentation(); mpSVGWriter->WriteMetaFile( aNullPt, rMtf.GetPrefSize(), rMtf, SVGWRITER_WRITE_FILL ); } @@ -833,10 +829,6 @@ sal_Bool SVGFilter::implExportShape( const Reference< XShape >& rxShape ) { Reference< XText > xText( rxShape, UNO_QUERY ); ::com::sun::star::awt::Rectangle aBoundRect; -#ifdef DEBUG -fprintf( stderr, "Trying to get (Shape): %p -- %p\n", rxShape.get(), SvxShape::getImplementation( rxShape ) ); -#endif - const GDIMetaFile& rMtf = (*mpObjects)[ rxShape ].GetRepresentation(); xShapePropSet->getPropertyValue( B2UCONST( "BoundRect" ) ) >>= aBoundRect; @@ -879,6 +871,7 @@ fprintf( stderr, "Trying to get (Shape): %p -- %p\n", rxShape.get(), SvxShape::g } else { + SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", true, true ); mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf, SVGWRITER_WRITE_FILL | SVGWRITER_WRITE_TEXT, &aId ); } } @@ -1029,10 +1022,6 @@ sal_Bool SVGFilter::implCreateObjectsFromShape( const Reference< XShape >& rxSha else (*mpObjects)[ rxShape ] = ObjectRepresentation( rxShape, aGraphic.GetGDIMetaFile() ); -#ifdef DEBUG -fprintf( stderr, "Put (Shape): %p -- %p\n", rxShape.get(), pObj ); -#endif - bRet = sal_True; } } @@ -1070,10 +1059,6 @@ sal_Bool SVGFilter::implCreateObjectsFromBackground( const Reference< XDrawPage (*mpObjects)[ rxMasterPage ] = ObjectRepresentation( rxMasterPage, aMtf ); -#ifdef DEBUG -fprintf( stderr, "Put (Page): %p -- %p\n", rxMasterPage.get(), SvxDrawPage::getImplementation( rxMasterPage ) ); -#endif - bRet = sal_True; } diff --git a/filter/source/svg/svgfilter.hxx b/filter/source/svg/svgfilter.hxx index 883d1d1615d7..ee6ca1fd2f74 100644 --- a/filter/source/svg/svgfilter.hxx +++ b/filter/source/svg/svgfilter.hxx @@ -192,9 +192,6 @@ struct HashReferenceXInterface { size_t operator()( const Reference< XInterface >& rxIf ) const { -#ifdef DEBUG - fprintf( stderr, "HashCode for %p\n", (void*)rxIf.get() ); -#endif return reinterpret_cast< size_t >( rxIf.get() ); } }; diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 705ad0bbde13..0350e87bd8fa 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -33,6 +33,7 @@ #include "svgfontexport.hxx" #include "svgwriter.hxx" +#include // ----------- // - statics - @@ -742,29 +743,70 @@ void SVGActionWriter::ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const G // ----------------------------------------------------------------------------- -void SVGActionWriter::ImplWriteText( const Point& /*rPos*/, const String& /*rText*/, - const sal_Int32* /*pDXArray*/, long /*nWidth*/, - bool /*bApplyMapping*/ ) +void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, + const sal_Int32* pDXArray, long nWidth, + bool bApplyMapping ) { -/* !!! TODO KA - long nLen = rText.Len(), i; + sal_Int32 nLen = rText.Len(), i; + Size aNormSize; + ::std::auto_ptr< sal_Int32 > apTmpArray; + ::std::auto_ptr< SvXMLElementExport > apTransform; + sal_Int32* pDX; + Point aPos; + Point aBaseLinePos( rPos ); + const FontMetric aMetric( mpVDev->GetFontMetric() ); + const Font& rFont = mpVDev->GetFont(); + + if( rFont.GetAlign() == ALIGN_TOP ) + aBaseLinePos.Y() += aMetric.GetAscent(); + else if( rFont.GetAlign() == ALIGN_BOTTOM ) + aBaseLinePos.Y() -= aMetric.GetDescent(); - Size aNormSize; - sal_Int32* pOwnArray; - sal_Int32* pDX; + if( bApplyMapping ) + ImplMap( rPos, aPos ); + else + aPos = rPos; // get text sizes if( pDXArray ) { - pOwnArray = NULL; aNormSize = Size( mpVDev->GetTextWidth( rText ), 0 ); - pDX = (sal_Int32*) pDXArray; + pDX = const_cast< sal_Int32* >( pDXArray ); } else { - pOwnArray = new sal_Int32[ nLen ]; - aNormSize = Size( mpVDev->GetTextArray( rText, pOwnArray ), 0 ); - pDX = pOwnArray; + apTmpArray.reset( new sal_Int32[ nLen ] ); + aNormSize = Size( mpVDev->GetTextArray( rText, apTmpArray.get() ), 0 ); + pDX = apTmpArray.get(); + } + + // if text is rotated, set transform matrix at new g element + if( rFont.GetOrientation() ) + { + Point aRot( aPos ); + String aTransform; + + aTransform = String( ::rtl::OUString::createFromAscii( "translate" ) ); + aTransform += '('; + aTransform += String( ::rtl::OUString::valueOf( aRot.X() ) ); + aTransform += ','; + aTransform += String( ::rtl::OUString::valueOf( aRot.Y() ) ); + aTransform += ')'; + + aTransform += String( ::rtl::OUString::createFromAscii( " rotate" ) ); + aTransform += '('; + aTransform += String( ::rtl::OUString::valueOf( rFont.GetOrientation() * -0.1 ) ); + aTransform += ')'; + + aTransform += String( ::rtl::OUString::createFromAscii( " translate" ) ); + aTransform += '('; + aTransform += String( ::rtl::OUString::valueOf( -aRot.X() ) ); + aTransform += ','; + aTransform += String( ::rtl::OUString::valueOf( -aRot.Y() ) ); + aTransform += ')'; + + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrTransform, aTransform ); + apTransform.reset( new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ) ); } if( nLen > 1 ) @@ -780,25 +822,29 @@ void SVGActionWriter::ImplWriteText( const Point& /*rPos*/, const String& /*rTex } else { + ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > xBI( ::vcl::unohelper::CreateBreakIterator() ); + const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetLocale(); + sal_Int32 nCurPos = 0, nLastPos = 0, nX = aPos.X(); + // write single glyphs at absolute text positions - while( bCont ) + for( bool bCont = true; bCont; ) { sal_Int32 nCount = 1; nLastPos = nCurPos; - nCurPos = xBI->nextCharacters( aBreakText, nCurPos, rLocale, + nCurPos = xBI->nextCharacters( rText, nCurPos, rLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, nCount, nCount ); nCount = nCurPos - nLastPos; - bCont = ( nCurPos < aBreakText.getLength() ) && nCount; + bCont = ( nCurPos < rText.Len() ) && nCount; if( nCount ) { - const String aGlyph( aBreakText.copy( nLastPos, nCount ) ); + const ::rtl::OUString aGlyph( rText.Copy( nLastPos, nCount ) ); mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, ::rtl::OUString::valueOf( nX ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, ::rtl::OUString::valueOf( aPt.Y() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, ::rtl::OUString::valueOf( aPos.Y() ) ); { SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemText, true, false ); @@ -806,15 +852,15 @@ void SVGActionWriter::ImplWriteText( const Point& /*rPos*/, const String& /*rTex } if( bCont ) - nX = aPt.X() + pDXArray[ nCurPos - 1 ]; + nX = aPos.X() + pDXArray[ nCurPos - 1 ]; } } } } else { - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, ::rtl::OUString::valueOf( aPt.X() ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, ::rtl::OUString::valueOf( aPt.Y() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, ::rtl::OUString::valueOf( aPos.X() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, ::rtl::OUString::valueOf( aPos.Y() ) ); { SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemText, true, false ); @@ -831,7 +877,7 @@ void SVGActionWriter::ImplWriteText( const Point& /*rPos*/, const String& /*rTex if( rFont.GetStrikeout() ) { - const long nYLinePos = aBaseLinePos.Y() - FRound( aMetric.GetAscent() * 0.26 ); + const long nYLinePos = aBaseLinePos.Y() - FRound( aMetric.GetAscent() * 0.26 ); aPoly[ 0 ].X() = aBaseLinePos.X(); aPoly[ 0 ].Y() = nYLinePos - ( nLineHeight >> 1 ); aPoly[ 1 ].X() = aBaseLinePos.X() + aNormSize.Width() - 1; aPoly[ 1 ].Y() = aPoly[ 0 ].Y(); @@ -854,10 +900,6 @@ void SVGActionWriter::ImplWriteText( const Point& /*rPos*/, const String& /*rTex } } } - - delete[] pOwnArray; - delete pTransform; -*/ } // ----------------------------------------------------------------------------- @@ -1547,8 +1589,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, ImplMap( Size( 0, aFont.GetHeight() ), aSz ); aFont.SetHeight( aSz.Height() ); - mpContext->SetFontAttr( aFont ); mpContext->AddPaintAttr( COL_TRANSPARENT, mpVDev->GetTextColor() ); + mpContext->SetFontAttr( aFont ); ImplWriteText( pA->GetPoint(), aText, NULL, 0 ); } } @@ -1569,8 +1611,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, ImplMap( Size( 0, aFont.GetHeight() ), aSz ); aFont.SetHeight( aSz.Height() ); - mpContext->SetFontAttr( aFont ); mpContext->AddPaintAttr( COL_TRANSPARENT, mpVDev->GetTextColor() ); + mpContext->SetFontAttr( aFont ); ImplWriteText( pA->GetRect().TopLeft(), pA->GetText(), NULL, 0 ); } } @@ -1592,8 +1634,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, ImplMap( Size( 0, aFont.GetHeight() ), aSz ); aFont.SetHeight( aSz.Height() ); - mpContext->SetFontAttr( aFont ); mpContext->AddPaintAttr( COL_TRANSPARENT, mpVDev->GetTextColor() ); + mpContext->SetFontAttr( aFont ); ImplWriteText( pA->GetPoint(), aText, pA->GetDXArray(), 0 ); } } @@ -1615,8 +1657,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, ImplMap( Size( 0, aFont.GetHeight() ), aSz ); aFont.SetHeight( aSz.Height() ); - mpContext->SetFontAttr( aFont ); mpContext->AddPaintAttr( COL_TRANSPARENT, mpVDev->GetTextColor() ); + mpContext->SetFontAttr( aFont ); ImplWriteText( pA->GetPoint(), aText, NULL, pA->GetWidth() ); } } -- cgit v1.2.3 From 7e2ded8f9448a44733db667612c3ce1ea0187106 Mon Sep 17 00:00:00 2001 From: ka Date: Sat, 5 Feb 2011 12:28:59 +0100 Subject: ka102: syntax --- vcl/source/gdi/rendergraphicrasterizer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcl/source/gdi/rendergraphicrasterizer.cxx b/vcl/source/gdi/rendergraphicrasterizer.cxx index b9bcdcee89e5..29c9863335b3 100644 --- a/vcl/source/gdi/rendergraphicrasterizer.cxx +++ b/vcl/source/gdi/rendergraphicrasterizer.cxx @@ -83,7 +83,7 @@ RenderGraphicRasterizer::~RenderGraphicRasterizer() // ------------------------------------------------------------------------- -RenderGraphicRasterizer::RenderGraphicRasterizer& RenderGraphicRasterizer::operator=( +RenderGraphicRasterizer& RenderGraphicRasterizer::operator=( const RenderGraphicRasterizer& rRenderGraphicRasterizer ) { maRenderGraphic = rRenderGraphicRasterizer.maRenderGraphic; -- cgit v1.2.3 From 591982d2f398724a74383338dd2268d05423130c Mon Sep 17 00:00:00 2001 From: ka Date: Mon, 7 Feb 2011 03:31:27 +0100 Subject: ka102: disable graphic attributes in case of RenderGraphic content --- svx/inc/svx/svdograf.hxx | 2 +- svx/source/svdraw/svdograf.cxx | 5 ++ svx/source/tbxctrls/grafctrl.cxx | 146 ++++++++++++++++++++++++--------------- 3 files changed, 98 insertions(+), 55 deletions(-) diff --git a/svx/inc/svx/svdograf.hxx b/svx/inc/svx/svdograf.hxx index c76c77ec325a..fa095261c3b2 100644 --- a/svx/inc/svx/svdograf.hxx +++ b/svx/inc/svx/svdograf.hxx @@ -149,6 +149,7 @@ public: sal_Bool IsAnimated() const; sal_Bool IsEPS() const; sal_Bool IsRenderGraphic() const; + sal_Bool HasRenderGraphic() const; sal_Bool IsSwappedOut() const; const MapMode& GetGrafPrefMapMode() const; @@ -226,4 +227,3 @@ public: }; #endif //_SVDOGRAF_HXX - diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index e95e3bf5296e..fd7545dea0c4 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -509,6 +509,11 @@ sal_Bool SdrGrafObj::IsRenderGraphic() const return pGraphic->IsRenderGraphic(); } +sal_Bool SdrGrafObj::HasRenderGraphic() const +{ + return pGraphic->HasRenderGraphic(); +} + sal_Bool SdrGrafObj::IsSwappedOut() const { return mbIsPreview ? sal_True : pGraphic->IsSwappedOut(); diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 9f8c023c3b3d..e60e9ae27e47 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -856,10 +856,8 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) { SfxItemPool& rPool = rView.GetModel()->GetItemPool(); SfxItemSet aSet( rPool, SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST ); - - const bool bUndo = rView.IsUndoEnabled(); - - String aUndoStr; + String aUndoStr; + const bool bUndo = rView.IsUndoEnabled(); if( bUndo ) { @@ -1140,6 +1138,28 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) SfxItemSet aAttrSet( rPool ); SfxWhichIter aIter( rSet ); USHORT nWhich = aIter.FirstWhich(); + const SdrMarkList& rMarkList = rView.GetMarkedObjectList(); + bool bEnableColors = true; + bool bEnableTransparency = true; + bool bEnableCrop = ( 1 == rMarkList.GetMarkCount() ); + + for( int i = 0, nCount = rMarkList.GetMarkCount(); i < nCount; ++i ) + { + SdrGrafObj* pGrafObj = dynamic_cast< SdrGrafObj* >( rMarkList.GetMark( i )->GetMarkedSdrObj() ); + + if( !pGrafObj || + ( pGrafObj->GetGraphicType() == GRAPHIC_NONE ) || + ( pGrafObj->GetGraphicType() == GRAPHIC_DEFAULT ) || + pGrafObj->HasRenderGraphic() ) + { + bEnableColors = bEnableTransparency = bEnableCrop = false; + break; + } + else if( bEnableTransparency && ( pGrafObj->HasGDIMetaFile() || pGrafObj->IsAnimated() ) ) + { + bEnableTransparency = false; + } + } rView.GetAttributes( aAttrSet ); @@ -1153,8 +1173,15 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) { if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFMODE ) ) { - rSet.Put( SfxUInt16Item( nSlotId, - sal::static_int_cast< UINT16 >( ITEMVALUE( aAttrSet, SDRATTR_GRAFMODE, SdrGrafModeItem ) ) ) ); + if( bEnableColors ) + { + rSet.Put( SfxUInt16Item( nSlotId, + sal::static_int_cast< UINT16 >( ITEMVALUE( aAttrSet, SDRATTR_GRAFMODE, SdrGrafModeItem ) ) ) ); + } + else + { + rSet.DisableItem( SID_ATTR_GRAF_MODE ); + } } } break; @@ -1163,8 +1190,15 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) { if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFRED ) ) { - rSet.Put( SfxInt16Item( nSlotId, - ITEMVALUE( aAttrSet, SDRATTR_GRAFRED, SdrGrafRedItem ) ) ); + if( bEnableColors ) + { + rSet.Put( SfxInt16Item( nSlotId, + ITEMVALUE( aAttrSet, SDRATTR_GRAFRED, SdrGrafRedItem ) ) ); + } + else + { + rSet.DisableItem( SID_ATTR_GRAF_RED ); + } } } break; @@ -1173,8 +1207,15 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) { if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFGREEN ) ) { - rSet.Put( SfxInt16Item( nSlotId, - ITEMVALUE( aAttrSet, SDRATTR_GRAFGREEN, SdrGrafGreenItem ) ) ); + if( bEnableColors ) + { + rSet.Put( SfxInt16Item( nSlotId, + ITEMVALUE( aAttrSet, SDRATTR_GRAFGREEN, SdrGrafGreenItem ) ) ); + } + else + { + rSet.DisableItem( SID_ATTR_GRAF_GREEN ); + } } } break; @@ -1183,8 +1224,15 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) { if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFBLUE ) ) { - rSet.Put( SfxInt16Item( nSlotId, - ITEMVALUE( aAttrSet, SDRATTR_GRAFBLUE, SdrGrafBlueItem ) ) ); + if( bEnableColors ) + { + rSet.Put( SfxInt16Item( nSlotId, + ITEMVALUE( aAttrSet, SDRATTR_GRAFBLUE, SdrGrafBlueItem ) ) ); + } + else + { + rSet.DisableItem( SID_ATTR_GRAF_BLUE ); + } } } break; @@ -1193,8 +1241,15 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) { if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFLUMINANCE ) ) { - rSet.Put( SfxInt16Item( nSlotId, - ITEMVALUE( aAttrSet, SDRATTR_GRAFLUMINANCE, SdrGrafLuminanceItem ) ) ); + if( bEnableColors ) + { + rSet.Put( SfxInt16Item( nSlotId, + ITEMVALUE( aAttrSet, SDRATTR_GRAFLUMINANCE, SdrGrafLuminanceItem ) ) ); + } + else + { + rSet.DisableItem( SID_ATTR_GRAF_LUMINANCE ); + } } } break; @@ -1203,8 +1258,15 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) { if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFCONTRAST ) ) { - rSet.Put( SfxInt16Item( nSlotId, - ITEMVALUE( aAttrSet, SDRATTR_GRAFCONTRAST, SdrGrafContrastItem ) ) ); + if( bEnableColors ) + { + rSet.Put( SfxInt16Item( nSlotId, + ITEMVALUE( aAttrSet, SDRATTR_GRAFCONTRAST, SdrGrafContrastItem ) ) ); + } + else + { + rSet.DisableItem( SID_ATTR_GRAF_CONTRAST ); + } } } break; @@ -1213,8 +1275,15 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) { if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFGAMMA ) ) { - rSet.Put( SfxUInt32Item( nSlotId, - ITEMVALUE( aAttrSet, SDRATTR_GRAFGAMMA, SdrGrafGamma100Item ) ) ); + if( bEnableColors ) + { + rSet.Put( SfxUInt32Item( nSlotId, + ITEMVALUE( aAttrSet, SDRATTR_GRAFGAMMA, SdrGrafGamma100Item ) ) ); + } + else + { + rSet.DisableItem( SID_ATTR_GRAF_GAMMA ); + } } } break; @@ -1223,53 +1292,22 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) { if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFTRANSPARENCE ) ) { - const SdrMarkList& rMarkList = rView.GetMarkedObjectList(); - BOOL bEnable = TRUE; - - for( USHORT i = 0, nCount = (USHORT) rMarkList.GetMarkCount(); - ( i < nCount ) && bEnable; i++ ) + if( bEnableTransparency ) { - SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - - if( !pObj || !pObj->ISA( SdrGrafObj ) || - ( (SdrGrafObj*) pObj )->HasGDIMetaFile() || - ( (SdrGrafObj*) pObj )->IsAnimated() ) - { - bEnable = FALSE; - } - } - - if( bEnable ) rSet.Put( SfxUInt16Item( nSlotId, ITEMVALUE( aAttrSet, SDRATTR_GRAFTRANSPARENCE, SdrGrafTransparenceItem ) ) ); + } else + { rSet.DisableItem( SID_ATTR_GRAF_TRANSPARENCE ); + } } } break; case( SID_ATTR_GRAF_CROP ): { - const SdrMarkList& rMarkList = rView.GetMarkedObjectList(); - BOOL bDisable = TRUE; - - if( 1 == rMarkList.GetMarkCount() ) - { - SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - - if( pObj && pObj->ISA( SdrGrafObj ) ) - { - SdrGrafObj* pGrafObj = (SdrGrafObj*) pObj; - - if( ( pGrafObj->GetGraphicType() != GRAPHIC_NONE ) && - ( pGrafObj->GetGraphicType() != GRAPHIC_DEFAULT ) ) - { - bDisable = FALSE; - } - } - } - - if( bDisable ) + if( !bEnableCrop ) rSet.DisableItem( nSlotId ); } break; -- cgit v1.2.3 From 5ab2b21b0a7e63e88737044afcde58659c315790 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 7 Feb 2011 16:11:39 +0100 Subject: ka102: handle load failure case more gracefully, add service on windows and mac --- vcl/source/components/rasterizer_rsvg.cxx | 25 +++++++++++-------------- vcl/util/vcl.macosx.component | 3 +++ vcl/util/vcl.windows.component | 3 +++ 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/vcl/source/components/rasterizer_rsvg.cxx b/vcl/source/components/rasterizer_rsvg.cxx index 52a550220923..19acd33cad8a 100644 --- a/vcl/source/components/rasterizer_rsvg.cxx +++ b/vcl/source/components/rasterizer_rsvg.cxx @@ -295,6 +295,8 @@ LibraryWrapper::LibraryWrapper() : OSL_ENSURE( mpCairoLib, "cairo library could not be loaded" ); OSL_ENSURE( mpRSVGLib, "librsvg library could not be loaded" ); + bCont = bCont && mpGObjectLib != NULL && mpCairoLib != NULL && mpRSVGLib != NULL; + // unload all libraries in case of failure if( !bCont ) { @@ -316,6 +318,8 @@ LibraryWrapper::LibraryWrapper() : mpGObjectLib = NULL; } } + else + rsvg_init(); } // --------------------------- @@ -379,21 +383,14 @@ Rasterizer::Rasterizer() : mnDefaultHeight( 0 ), mbLibInit( true ) { - static bool bLibInitialized = false; - - if( !bLibInitialized ) + try { - try - { - LibraryWrapper& rLib = LibraryWrapper::get(); - rLib.rsvg_init(); - } - catch( ... ) - { - mbLibInit = false; - } - - bLibInitialized = true; + LibraryWrapper& rLib = LibraryWrapper::get(); + mbLibInit = rLib.isValid(); + } + catch( ... ) + { + mbLibInit = false; } } diff --git a/vcl/util/vcl.macosx.component b/vcl/util/vcl.macosx.component index 3aabcd8c7050..023f805672bd 100644 --- a/vcl/util/vcl.macosx.component +++ b/vcl/util/vcl.macosx.component @@ -46,4 +46,7 @@ + + + diff --git a/vcl/util/vcl.windows.component b/vcl/util/vcl.windows.component index 72f7ace9f251..df786c4d832b 100644 --- a/vcl/util/vcl.windows.component +++ b/vcl/util/vcl.windows.component @@ -37,4 +37,7 @@ + + + -- cgit v1.2.3 From 3621ebea13a7c5fe00ac340be48b899ff83ad563 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 8 Feb 2011 15:15:43 +0100 Subject: ka102: try to find libs in system first, then relative to vcl library --- vcl/source/components/rasterizer_rsvg.cxx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/vcl/source/components/rasterizer_rsvg.cxx b/vcl/source/components/rasterizer_rsvg.cxx index 19acd33cad8a..28ae6056fee2 100644 --- a/vcl/source/components/rasterizer_rsvg.cxx +++ b/vcl/source/components/rasterizer_rsvg.cxx @@ -220,7 +220,11 @@ LibraryWrapper::LibraryWrapper() : bool bCont = true; // GObject - if( bCont && ( NULL != ( mpGObjectLib = osl_loadModule( aGObjectLibName.pData, SAL_LOADMODULE_DEFAULT ) ) ) ) + if( bCont && ( NULL != ( mpGObjectLib = osl_loadModule( aGObjectLibName.pData, SAL_LOADMODULE_DEFAULT ) ) || + NULL != ( mpGObjectLib = osl_loadModuleRelative( (oslGenericFunction)LibraryWrapper::get, + aGObjectLibName.pData, SAL_LOADMODULE_DEFAULT ) ) + + ) ) { mp_g_object_unref = ( gpointer (*)( gpointer ) ) osl_getAsciiFunctionSymbol( mpGObjectLib, "g_object_unref" ); @@ -232,7 +236,10 @@ LibraryWrapper::LibraryWrapper() : } // Cairo - if( bCont && ( NULL != ( mpCairoLib = osl_loadModule( aCairoLibName.pData, SAL_LOADMODULE_DEFAULT ) ) ) ) + if( bCont && ( NULL != ( mpCairoLib = osl_loadModule( aCairoLibName.pData, SAL_LOADMODULE_DEFAULT ) ) || + NULL != ( mpCairoLib = osl_loadModuleRelative( (oslGenericFunction)LibraryWrapper::get, + aCairoLibName.pData, SAL_LOADMODULE_DEFAULT ) ) + ) ) { mp_image_surface_create = ( cairo_surface_t* (*)( cairo_format_t, int, int ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_image_surface_create" ); mp_surface_destroy = ( void (*)( cairo_surface_t* ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_surface_destroy" ); @@ -270,7 +277,10 @@ LibraryWrapper::LibraryWrapper() : } // LibRSVG - if( bCont && ( NULL != ( mpRSVGLib = osl_loadModule( aRSVGLibName.pData, SAL_LOADMODULE_DEFAULT ) ) ) ) + if( bCont && ( NULL != ( mpRSVGLib = osl_loadModule( aRSVGLibName.pData, SAL_LOADMODULE_DEFAULT ) ) || + NULL != ( mpRSVGLib = osl_loadModuleRelative( (oslGenericFunction)LibraryWrapper::get, + aRSVGLibName.pData, SAL_LOADMODULE_DEFAULT ) ) + ) ) { mp_rsvg_init = ( void (*)( void ) ) osl_getAsciiFunctionSymbol( mpRSVGLib, "rsvg_init" ); mp_rsvg_handle_new_from_data = ( RsvgHandle* (*)( const guint8*, gsize, GError** ) ) osl_getAsciiFunctionSymbol( mpRSVGLib, "rsvg_handle_new_from_data" ); -- cgit v1.2.3 From d652efa0b870ae1dde675391a067f2db78c9b153 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 9 Feb 2011 11:18:43 +0100 Subject: fix some warnings --- filter/source/svg/svgdialog.hxx | 2 ++ filter/source/svg/svgwriter.cxx | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/filter/source/svg/svgdialog.hxx b/filter/source/svg/svgdialog.hxx index b91ac44e3fab..e0eff6494fb7 100644 --- a/filter/source/svg/svgdialog.hxx +++ b/filter/source/svg/svgdialog.hxx @@ -82,7 +82,9 @@ protected: virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; // XPropertyAccess + using cppu::OPropertySetHelper::getPropertyValues; virtual com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getPropertyValues( ) throw (com::sun::star::uno::RuntimeException); + using cppu::OPropertySetHelper::setPropertyValues; virtual void SAL_CALL setPropertyValues( const com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aProps ) throw (com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException, com::sun::star::uno::RuntimeException); // XExporter diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 0350e87bd8fa..307896a859e5 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -129,7 +129,7 @@ SVGAttributeWriter::~SVGAttributeWriter() double SVGAttributeWriter::ImplRound( double fValue, sal_Int32 nDecs ) { - return( floor( fValue * pow( 10.0, nDecs ) + 0.5 ) / pow( 10.0, nDecs ) ); + return( floor( fValue * pow( 10.0, (int)nDecs ) + 0.5 ) / pow( 10.0, (int)nDecs ) ); } // ----------------------------------------------------------------------------- @@ -870,7 +870,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, if( !mrExport.IsUseNativeTextDecoration() ) { - if( rFont.GetStrikeout() || rFont.GetUnderline() ) + if( rFont.GetStrikeout() != STRIKEOUT_NONE || rFont.GetUnderline() != UNDERLINE_NONE ) { Polygon aPoly( 4 ); const long nLineHeight = Max( (long) FRound( aMetric.GetLineHeight() * 0.05 ), (long) 1 ); -- cgit v1.2.3 From 9a75f47887ed727268c66615860124f5f41dcf9a Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 10 Feb 2011 14:47:51 +0100 Subject: #i116850# initialize m_bDoingQuickSelection --- svtools/source/contnr/svlbox.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/svtools/source/contnr/svlbox.cxx b/svtools/source/contnr/svlbox.cxx index 11e19c6bab3c..abdd1c1889ee 100644 --- a/svtools/source/contnr/svlbox.cxx +++ b/svtools/source/contnr/svlbox.cxx @@ -683,6 +683,7 @@ SvViewDataEntry::~SvViewDataEntry() SvLBox_Impl::SvLBox_Impl( SvLBox& _rBox ) :m_bIsEmptyTextAllowed( true ) ,m_bEntryMnemonicsEnabled( false ) + ,m_bDoingQuickSelection( false ) ,m_pLink( NULL ) ,m_aMnemonicEngine( _rBox ) ,m_aQuickSelectionEngine( _rBox ) -- cgit v1.2.3 From 2275892697742de273abfce1180e5d979ec80af6 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 15 Feb 2011 16:39:25 +0100 Subject: remove a ton of warnings --- vcl/aqua/source/a11y/aqua11ylistener.cxx | 2 +- vcl/aqua/source/app/salinst.cxx | 8 ++-- vcl/aqua/source/dtrans/DataFlavorMapping.cxx | 2 +- vcl/aqua/source/dtrans/DragSource.cxx | 66 +++++++++++++++------------- vcl/aqua/source/dtrans/DropTarget.cxx | 18 ++++---- vcl/aqua/source/dtrans/aqua_clipboard.cxx | 4 +- vcl/aqua/source/gdi/salatslayout.cxx | 4 +- vcl/aqua/source/gdi/salbmp.cxx | 2 +- vcl/aqua/source/gdi/salgdi.cxx | 41 ++++++++--------- vcl/aqua/source/gdi/salgdiutils.cxx | 2 +- vcl/aqua/source/gdi/salnativewidgets.cxx | 12 ++--- vcl/aqua/source/gdi/salprn.cxx | 28 ++++++------ vcl/aqua/source/gdi/salvd.cxx | 2 +- vcl/aqua/source/window/salframe.cxx | 8 ++-- vcl/aqua/source/window/salmenu.cxx | 12 ++--- vcl/aqua/source/window/salobj.cxx | 6 +-- vcl/source/gdi/font.cxx | 4 -- vcl/source/window/syschild.cxx | 1 + 18 files changed, 114 insertions(+), 108 deletions(-) diff --git a/vcl/aqua/source/a11y/aqua11ylistener.cxx b/vcl/aqua/source/a11y/aqua11ylistener.cxx index 4ce39da6c2bf..36e2c7ab2220 100644 --- a/vcl/aqua/source/a11y/aqua11ylistener.cxx +++ b/vcl/aqua/source/a11y/aqua11ylistener.cxx @@ -75,7 +75,7 @@ AquaA11yEventListener::~AquaA11yEventListener() //------------------------------------------------------------------------------ void SAL_CALL -AquaA11yEventListener::disposing( const EventObject& Source ) throw( RuntimeException ) +AquaA11yEventListener::disposing( const EventObject& ) throw( RuntimeException ) { [ AquaA11yFactory removeFromWrapperRepositoryFor: [ (AquaA11yWrapper *) m_wrapperObject accessibleContext ] ]; } diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx index f1a4fc1213c7..7a07718efaac 100644 --- a/vcl/aqua/source/app/salinst.cxx +++ b/vcl/aqua/source/app/salinst.cxx @@ -894,7 +894,7 @@ bool AquaSalInstance::AnyInput( sal_uInt16 nType ) // ----------------------------------------------------------------------- -SalFrame* AquaSalInstance::CreateChildFrame( SystemParentData* pSystemParentData, sal_uLong nSalFrameStyle ) +SalFrame* AquaSalInstance::CreateChildFrame( SystemParentData*, sal_uLong /*nSalFrameStyle*/ ) { return NULL; } @@ -980,7 +980,7 @@ void AquaSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList ) // ----------------------------------------------------------------------- -void AquaSalInstance::GetPrinterQueueState( SalPrinterQueueInfo* pInfo ) +void AquaSalInstance::GetPrinterQueueState( SalPrinterQueueInfo* ) { } @@ -1062,13 +1062,13 @@ void AquaSalInstance::DestroySystem( SalSystem* pSystem ) // ----------------------------------------------------------------------- -void AquaSalInstance::SetEventCallback( void* pInstance, bool(*pCallback)(void*,void*,int) ) +void AquaSalInstance::SetEventCallback( void*, bool(*)(void*,void*,int) ) { } // ----------------------------------------------------------------------- -void AquaSalInstance::SetErrorEventCallback( void* pInstance, bool(*pCallback)(void*,void*,int) ) +void AquaSalInstance::SetErrorEventCallback( void*, bool(*)(void*,void*,int) ) { } diff --git a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx index 01f989cbc1c1..98cbdcc7c5e2 100644 --- a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx +++ b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx @@ -619,7 +619,7 @@ DataProviderPtr_t DataFlavorMapper::getDataProvider(NSString* systemFlavor, Refe return dp; } -DataProviderPtr_t DataFlavorMapper::getDataProvider(const NSString* systemFlavor, NSArray* systemData) const +DataProviderPtr_t DataFlavorMapper::getDataProvider(const NSString* /*systemFlavor*/, NSArray* systemData) const { return DataProviderPtr_t(new FileListDataProvider(systemData)); } diff --git a/vcl/aqua/source/dtrans/DragSource.cxx b/vcl/aqua/source/dtrans/DragSource.cxx index 1db6a3a848e1..f32df699a73b 100644 --- a/vcl/aqua/source/dtrans/DragSource.cxx +++ b/vcl/aqua/source/dtrans/DragSource.cxx @@ -116,44 +116,50 @@ Sequence dragSource_getSupportedServiceNames() -(void)draggedImage:(NSImage*)anImage beganAt:(NSPoint)aPoint { - DragSourceDragEvent dsde(static_cast(mDragSource), - new DragSourceContext(mDragSource), - mDragSource, - DNDConstants::ACTION_COPY, - DNDConstants::ACTION_COPY); - - mDragSource->mXDragSrcListener->dragEnter(dsde); + (void)anImage; + (void)aPoint; + DragSourceDragEvent dsde(static_cast(mDragSource), + new DragSourceContext(mDragSource), + mDragSource, + DNDConstants::ACTION_COPY, + DNDConstants::ACTION_COPY); + + mDragSource->mXDragSrcListener->dragEnter(dsde); } -(void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint operation:(NSDragOperation)operation { - // an internal drop can accept the drop but fail with dropComplete( false ) - // this is different than the Cocoa API - bool bDropSuccess = operation != NSDragOperationNone; - if( DragSource::g_DropSuccessSet ) - bDropSuccess = DragSource::g_DropSuccess; - - DragSourceDropEvent dsde(static_cast(mDragSource), - new DragSourceContext(mDragSource), - static_cast< XDragSource* >(mDragSource), - SystemToOfficeDragActions(operation), - bDropSuccess ); - - mDragSource->mXDragSrcListener->dragDropEnd(dsde); - mDragSource->mXDragSrcListener = Reference(); + (void)anImage; + (void)aPoint; + // an internal drop can accept the drop but fail with dropComplete( false ) + // this is different than the Cocoa API + bool bDropSuccess = operation != NSDragOperationNone; + if( DragSource::g_DropSuccessSet ) + bDropSuccess = DragSource::g_DropSuccess; + + DragSourceDropEvent dsde(static_cast(mDragSource), + new DragSourceContext(mDragSource), + static_cast< XDragSource* >(mDragSource), + SystemToOfficeDragActions(operation), + bDropSuccess ); + + mDragSource->mXDragSrcListener->dragDropEnd(dsde); + mDragSource->mXDragSrcListener = Reference(); } -(void)draggedImage:(NSImage *)draggedImage movedTo:(NSPoint)screenPoint { - DragSourceDragEvent dsde(static_cast(mDragSource), - new DragSourceContext(mDragSource), - mDragSource, - DNDConstants::ACTION_COPY, - DNDConstants::ACTION_COPY); - - mDragSource->mXDragSrcListener->dragOver(dsde); + (void)draggedImage; + (void)screenPoint; + DragSourceDragEvent dsde(static_cast(mDragSource), + new DragSourceContext(mDragSource), + mDragSource, + DNDConstants::ACTION_COPY, + DNDConstants::ACTION_COPY); + + mDragSource->mXDragSrcListener->dragOver(dsde); } @end @@ -243,8 +249,8 @@ sal_Int32 SAL_CALL DragSource::getDefaultCursor( sal_Int8 /*dragAction*/ ) void SAL_CALL DragSource::startDrag(const DragGestureEvent& trigger, sal_Int8 sourceActions, - sal_Int32 cursor, - sal_Int32 image, + sal_Int32 /*cursor*/, + sal_Int32 /*image*/, const Reference& transferable, const Reference& listener ) throw( RuntimeException) diff --git a/vcl/aqua/source/dtrans/DropTarget.cxx b/vcl/aqua/source/dtrans/DropTarget.cxx index 01a58b171b02..2a64fbe77c9c 100644 --- a/vcl/aqua/source/dtrans/DropTarget.cxx +++ b/vcl/aqua/source/dtrans/DropTarget.cxx @@ -311,20 +311,20 @@ NSDragOperation DropTarget::draggingUpdated(id sender) } - void DropTarget::draggingExited(id sender) - { +void DropTarget::draggingExited(id /*sender*/) +{ DropTargetEvent dte(static_cast(this), 0); fire_dragExit(dte); mDragSourceSupportedActions = DNDConstants::ACTION_NONE; mSelectedDropAction = DNDConstants::ACTION_NONE; SetThemeCursor(kThemeArrowCursor); - } +} - BOOL DropTarget::prepareForDragOperation(id sender) - { +BOOL DropTarget::prepareForDragOperation(id /*sender*/) +{ return 1; - } +} BOOL DropTarget::performDragOperation(id sender) @@ -366,13 +366,13 @@ BOOL DropTarget::performDragOperation(id sender) } - void DropTarget::concludeDragOperation(id sender) - { +void DropTarget::concludeDragOperation(id /*sender*/) +{ mDragSourceSupportedActions = DNDConstants::ACTION_NONE; mSelectedDropAction = DNDConstants::ACTION_NONE; mXCurrentDragClipboard = Reference(); SetThemeCursor(kThemeArrowCursor); - } +} // called from WeakComponentImplHelperX::dispose diff --git a/vcl/aqua/source/dtrans/aqua_clipboard.cxx b/vcl/aqua/source/dtrans/aqua_clipboard.cxx index abffeebcb6c1..657211be5dc8 100644 --- a/vcl/aqua/source/dtrans/aqua_clipboard.cxx +++ b/vcl/aqua/source/dtrans/aqua_clipboard.cxx @@ -254,7 +254,7 @@ void SAL_CALL AquaClipboard::removeClipboardListener(const Reference< XClipboard } -void AquaClipboard::applicationDidBecomeActive(NSNotification* aNotification) +void AquaClipboard::applicationDidBecomeActive(NSNotification*) { ClearableMutexGuard aGuard(m_aMutex); @@ -378,7 +378,7 @@ OUString SAL_CALL AquaClipboard::getImplementationName() throw( RuntimeException } -sal_Bool SAL_CALL AquaClipboard::supportsService( const OUString& ServiceName ) throw( RuntimeException ) +sal_Bool SAL_CALL AquaClipboard::supportsService( const OUString& /*ServiceName*/ ) throw( RuntimeException ) { return sal_False; } diff --git a/vcl/aqua/source/gdi/salatslayout.cxx b/vcl/aqua/source/gdi/salatslayout.cxx index 1b505abd60d9..62e783522a88 100755 --- a/vcl/aqua/source/gdi/salatslayout.cxx +++ b/vcl/aqua/source/gdi/salatslayout.cxx @@ -1205,7 +1205,7 @@ void PolyArgs::ClosePolygon() // glyph fallback is supported directly by Aqua // so methods used only by MultiSalLayout can be dummy implementated -bool ATSLayout::GetGlyphOutlines( SalGraphics&, PolyPolyVector& rPPV ) const { return false; } +bool ATSLayout::GetGlyphOutlines( SalGraphics&, PolyPolyVector& ) const { return false; } void ATSLayout::InitFont() {} void ATSLayout::MoveGlyph( int /*nStart*/, long /*nNewXPos*/ ) {} void ATSLayout::DropGlyph( int /*nStart*/ ) {} @@ -1257,7 +1257,7 @@ const ImplFontData* FallbackInfo::GetFallbackFontData( int nFallbackLevel ) cons // ======================================================================= -SalLayout* AquaSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel ) +SalLayout* AquaSalGraphics::GetTextLayout( ImplLayoutArgs&, int /*nFallbackLevel*/ ) { ATSLayout* pATSLayout = new ATSLayout( maATSUStyle, mfFontScale ); return pATSLayout; diff --git a/vcl/aqua/source/gdi/salbmp.cxx b/vcl/aqua/source/gdi/salbmp.cxx index 00ae72b4fa9e..d73b3eb25511 100644 --- a/vcl/aqua/source/gdi/salbmp.cxx +++ b/vcl/aqua/source/gdi/salbmp.cxx @@ -658,7 +658,7 @@ const BitmapPalette& GetDefaultPalette( int mnBits, bool bMonochrome ) return aEmptyPalette; } -BitmapBuffer* AquaSalBitmap::AcquireBuffer( bool bReadOnly ) +BitmapBuffer* AquaSalBitmap::AcquireBuffer( bool /*bReadOnly*/ ) { if( !maUserBuffer.get() ) // || maContextBuffer.get() && (maUserBuffer.get() != maContextBuffer.get()) ) diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx index 6275cfbcef1d..75d0be6d669c 100644 --- a/vcl/aqua/source/gdi/salgdi.cxx +++ b/vcl/aqua/source/gdi/salgdi.cxx @@ -345,7 +345,7 @@ void AquaSalGraphics::updateResolution() initResolution( (mbWindow && mpFrame) ? mpFrame->mpWindow : nil ); } -void AquaSalGraphics::initResolution( NSWindow* pWin ) +void AquaSalGraphics::initResolution( NSWindow* ) { // #i100617# read DPI only once; there is some kind of weird caching going on // if the main screen changes @@ -564,7 +564,7 @@ void AquaSalGraphics::ResetClipRegion() // ----------------------------------------------------------------------- -void AquaSalGraphics::BeginSetClipRegion( sal_uLong nRectCount ) +void AquaSalGraphics::BeginSetClipRegion( sal_uLong ) { // release old clip path if( mxClipPath ) @@ -1054,22 +1054,22 @@ bool AquaSalGraphics::drawPolyLine( const ::basegfx::B2DPolygon& rPolyLine, // ----------------------------------------------------------------------- -sal_Bool AquaSalGraphics::drawPolyLineBezier( sal_uLong nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) +sal_Bool AquaSalGraphics::drawPolyLineBezier( sal_uLong, const SalPoint*, const sal_uInt8* ) { return sal_False; } // ----------------------------------------------------------------------- -sal_Bool AquaSalGraphics::drawPolygonBezier( sal_uLong nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) +sal_Bool AquaSalGraphics::drawPolygonBezier( sal_uLong, const SalPoint*, const sal_uInt8* ) { return sal_False; } // ----------------------------------------------------------------------- -sal_Bool AquaSalGraphics::drawPolyPolygonBezier( sal_uLong nPoly, const sal_uLong* pPoints, - const SalPoint* const* pPtAry, const sal_uInt8* const* pFlgAry ) +sal_Bool AquaSalGraphics::drawPolyPolygonBezier( sal_uLong, const sal_uLong*, + const SalPoint* const*, const sal_uInt8* const* ) { return sal_False; } @@ -1155,7 +1155,7 @@ void AquaSalGraphics::copyBits( const SalTwoRect *pPosAry, SalGraphics *pSrcGrap // ----------------------------------------------------------------------- -void AquaSalGraphics::copyArea( long nDstX, long nDstY,long nSrcX, long nSrcY, long nSrcWidth, long nSrcHeight, sal_uInt16 nFlags ) +void AquaSalGraphics::copyArea( long nDstX, long nDstY,long nSrcX, long nSrcY, long nSrcWidth, long nSrcHeight, sal_uInt16 /*nFlags*/ ) { ApplyXorContext(); @@ -1237,7 +1237,7 @@ void AquaSalGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rS // ----------------------------------------------------------------------- -void AquaSalGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap,SalColor nTransparentColor ) +void AquaSalGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap,SalColor ) { DBG_ERROR("not implemented for color masking!"); drawBitmap( pPosAry, rSalBitmap ); @@ -1339,7 +1339,7 @@ SalColor AquaSalGraphics::getPixel( long nX, long nY ) // ----------------------------------------------------------------------- -static void DrawPattern50( void* info, CGContextRef rContext ) +static void DrawPattern50( void*, CGContextRef rContext ) { static const CGRect aRects[2] = { { {0,0}, { 2, 2 } }, { { 2, 2 }, { 2, 2 } } }; CGContextAddRects( rContext, aRects, 2 ); @@ -1606,7 +1606,7 @@ void AquaSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackL // ----------------------------------------------------------------------- -sal_uLong AquaSalGraphics::GetKernPairs( sal_uLong nPairs, ImplKernPairData* pKernPairs ) +sal_uLong AquaSalGraphics::GetKernPairs( sal_uLong, ImplKernPairData* ) { return 0; } @@ -1703,8 +1703,8 @@ void AquaSalGraphics::GetDevFontList( ImplDevFontList* pFontList ) // ----------------------------------------------------------------------- -bool AquaSalGraphics::AddTempDevFont( ImplDevFontList* pFontList, - const String& rFontFileURL, const String& rFontName ) +bool AquaSalGraphics::AddTempDevFont( ImplDevFontList*, + const String& rFontFileURL, const String& /*rFontName*/ ) { ::rtl::OUString aUSytemPath; OSL_VERIFY( !osl::FileBase::getSystemPathFromFileURL( rFontFileURL, aUSytemPath ) ); @@ -1862,7 +1862,7 @@ void AquaSalGraphics::DrawServerFontLayout( const ServerFontLayout& ) // ----------------------------------------------------------------------- -sal_uInt16 AquaSalGraphics::SetFont( ImplFontSelectData* pReqFont, int nFallbackLevel ) +sal_uInt16 AquaSalGraphics::SetFont( ImplFontSelectData* pReqFont, int /*nFallbackLevel*/ ) { if( !pReqFont ) { @@ -2402,28 +2402,29 @@ void AquaSalGraphics::GetGlyphWidths( const ImplFontData* pFontData, bool bVerti // ----------------------------------------------------------------------- const Ucs2SIntMap* AquaSalGraphics::GetFontEncodingVector( - const ImplFontData* pFontData, const Ucs2OStrMap** ppNonEncoded ) + const ImplFontData*, const Ucs2OStrMap** /*ppNonEncoded*/ ) { return NULL; } // ----------------------------------------------------------------------- -const void* AquaSalGraphics::GetEmbedFontData( const ImplFontData* pFontData, - const sal_Ucs* pUnicodes, - sal_Int32* pWidths, - FontSubsetInfo& rInfo, - long* pDataLen ) +const void* AquaSalGraphics::GetEmbedFontData( const ImplFontData*, + const sal_Ucs* /*pUnicodes*/, + sal_Int32* /*pWidths*/, + FontSubsetInfo&, + long* /*pDataLen*/ ) { return NULL; } // ----------------------------------------------------------------------- -void AquaSalGraphics::FreeEmbedFontData( const void* pData, long nDataLen ) +void AquaSalGraphics::FreeEmbedFontData( const void* pData, long /*nDataLen*/ ) { // TODO: implementing this only makes sense when the implementation of // AquaSalGraphics::GetEmbedFontData() returns non-NULL + (void)pData; DBG_ASSERT( (pData!=NULL), "AquaSalGraphics::FreeEmbedFontData() is not implemented\n"); } diff --git a/vcl/aqua/source/gdi/salgdiutils.cxx b/vcl/aqua/source/gdi/salgdiutils.cxx index 8daa456a03c2..1652dadfbdfb 100755 --- a/vcl/aqua/source/gdi/salgdiutils.cxx +++ b/vcl/aqua/source/gdi/salgdiutils.cxx @@ -271,7 +271,7 @@ CGPoint* AquaSalGraphics::makeCGptArray(sal_uLong nPoints, const SalPoint* pPtA // ----------------------------------------------------------------------- -void AquaSalGraphics::UpdateWindow( NSRect& rRect ) +void AquaSalGraphics::UpdateWindow( NSRect& ) { if( !mpFrame ) return; diff --git a/vcl/aqua/source/gdi/salnativewidgets.cxx b/vcl/aqua/source/gdi/salnativewidgets.cxx index b06bf753e54f..f66c7aa2b32d 100644 --- a/vcl/aqua/source/gdi/salnativewidgets.cxx +++ b/vcl/aqua/source/gdi/salnativewidgets.cxx @@ -475,7 +475,7 @@ sal_Bool AquaSalGraphics::drawNativeControl(ControlType nType, const Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, - const rtl::OUString& aCaption ) + const rtl::OUString& ) { sal_Bool bOK = sal_False; @@ -1228,9 +1228,9 @@ sal_Bool AquaSalGraphics::drawNativeControl(ControlType nType, * aValue: An optional value (tristate/numerical/string) * aCaption: A caption or title string (like button text etc) */ -sal_Bool AquaSalGraphics::drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, - ControlState nState, const ImplControlValue& aValue, - const rtl::OUString& aCaption ) +sal_Bool AquaSalGraphics::drawNativeControlText( ControlType /*nType*/, ControlPart /*nPart*/, const Rectangle& /*rControlRegion*/, + ControlState /*nState*/, const ImplControlValue& /*aValue*/, + const rtl::OUString& ) { return( sal_False ); } @@ -1249,8 +1249,8 @@ sal_Bool AquaSalGraphics::drawNativeControlText( ControlType nType, ControlPart * aValue: An optional value (tristate/numerical/string) * aCaption: A caption or title string (like button text etc) */ -sal_Bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, - const ImplControlValue& aValue, const rtl::OUString& aCaption, +sal_Bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState /*nState*/, + const ImplControlValue& aValue, const rtl::OUString&, Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ) { diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx index 04098f68de67..1e6bc175f355 100644 --- a/vcl/aqua/source/gdi/salprn.cxx +++ b/vcl/aqua/source/gdi/salprn.cxx @@ -178,7 +178,7 @@ void AquaSalInfoPrinter::ReleaseGraphics( SalGraphics* ) // ----------------------------------------------------------------------- -sal_Bool AquaSalInfoPrinter::Setup( SalFrame* i_pFrame, ImplJobSetup* i_pSetupData ) +sal_Bool AquaSalInfoPrinter::Setup( SalFrame*, ImplJobSetup* ) { return sal_False; } @@ -362,14 +362,14 @@ sal_Bool AquaSalInfoPrinter::SetData( sal_uLong i_nFlags, ImplJobSetup* io_pSetu // ----------------------------------------------------------------------- -sal_uLong AquaSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* i_pSetupData ) +sal_uLong AquaSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* ) { return 0; } // ----------------------------------------------------------------------- -XubString AquaSalInfoPrinter::GetPaperBinName( const ImplJobSetup* i_pSetupData, sal_uLong i_nPaperBin ) +XubString AquaSalInfoPrinter::GetPaperBinName( const ImplJobSetup*, sal_uLong ) { return XubString(); } @@ -438,7 +438,7 @@ static bool getUseNativeDialog() return bNative; } -sal_uLong AquaSalInfoPrinter::GetCapabilities( const ImplJobSetup* i_pSetupData, sal_uInt16 i_nType ) +sal_uLong AquaSalInfoPrinter::GetCapabilities( const ImplJobSetup*, sal_uInt16 i_nType ) { switch( i_nType ) { @@ -522,7 +522,7 @@ static Size getPageSize( vcl::PrinterController& i_rController, sal_Int32 i_nPag sal_Bool AquaSalInfoPrinter::StartJob( const String* i_pFileName, const String& i_rJobName, - const String& i_rAppName, + const String& /*i_rAppName*/, ImplJobSetup* i_pSetupData, vcl::PrinterController& i_rController ) @@ -773,13 +773,13 @@ sal_Bool AquaSalPrinter::StartJob( const String* i_pFileName, // ----------------------------------------------------------------------- -sal_Bool AquaSalPrinter::StartJob( const XubString* i_pFileName, - const XubString& i_rJobName, - const XubString& i_rAppName, - sal_uLong i_nCopies, - bool i_bCollate, - bool i_bDirect, - ImplJobSetup* i_pSetupData ) +sal_Bool AquaSalPrinter::StartJob( const XubString* /*i_pFileName*/, + const XubString& /*i_rJobName*/, + const XubString& /*i_rAppName*/, + sal_uLong /*i_nCopies*/, + bool /*i_bCollate*/, + bool /*i_bDirect*/, + ImplJobSetup* ) { DBG_ERROR( "should never be called" ); return sal_False; @@ -820,7 +820,7 @@ sal_uLong AquaSalPrinter::GetErrorCode() return mpInfoPrinter->GetErrorCode(); } -void AquaSalInfoPrinter::InitPaperFormats( const ImplJobSetup* i_pSetupData ) +void AquaSalInfoPrinter::InitPaperFormats( const ImplJobSetup* ) { m_aPaperFormats.clear(); m_bPapersInit = true; @@ -873,7 +873,7 @@ const PaperInfo* AquaSalInfoPrinter::matchPaper( long i_nWidth, long i_nHeight, return pMatch; } -int AquaSalInfoPrinter::GetLandscapeAngle( const ImplJobSetup* i_pSetupData ) +int AquaSalInfoPrinter::GetLandscapeAngle( const ImplJobSetup* ) { return 900; } diff --git a/vcl/aqua/source/gdi/salvd.cxx b/vcl/aqua/source/gdi/salvd.cxx index 6e71fa482b21..8e77c67c7854 100644 --- a/vcl/aqua/source/gdi/salvd.cxx +++ b/vcl/aqua/source/gdi/salvd.cxx @@ -149,7 +149,7 @@ SalGraphics* AquaSalVirtualDevice::GetGraphics() // ----------------------------------------------------------------------- -void AquaSalVirtualDevice::ReleaseGraphics( SalGraphics *pGraphics ) +void AquaSalVirtualDevice::ReleaseGraphics( SalGraphics* ) { mbGraphicsUsed = false; } diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx index 7521dd7cc253..e6cff19c4dd3 100644 --- a/vcl/aqua/source/window/salframe.cxx +++ b/vcl/aqua/source/window/salframe.cxx @@ -481,7 +481,7 @@ void AquaSalFrame::Show(sal_Bool bVisible, sal_Bool bNoActivate) // ----------------------------------------------------------------------- -void AquaSalFrame::Enable( sal_Bool bEnable ) +void AquaSalFrame::Enable( sal_Bool ) { } @@ -866,7 +866,7 @@ void AquaSalFrame::StartPresentation( sal_Bool bStart ) // ----------------------------------------------------------------------- -void AquaSalFrame::SetAlwaysOnTop( sal_Bool bOnTop ) +void AquaSalFrame::SetAlwaysOnTop( sal_Bool ) { } @@ -1038,7 +1038,7 @@ void AquaSalFrame::SetInputContext( SalInputContext* pContext ) // ----------------------------------------------------------------------- -void AquaSalFrame::EndExtTextInput( sal_uInt16 nFlags ) +void AquaSalFrame::EndExtTextInput( sal_uInt16 ) { } @@ -1546,7 +1546,7 @@ SalPointerState AquaSalFrame::GetPointerState() return state; } -bool AquaSalFrame::SetPluginParent( SystemParentData* pNewParent ) +bool AquaSalFrame::SetPluginParent( SystemParentData* ) { // plugin parent may be killed unexpectedly by // plugging process; diff --git a/vcl/aqua/source/window/salmenu.cxx b/vcl/aqua/source/window/salmenu.cxx index fa5026abb245..c237b10f1512 100644 --- a/vcl/aqua/source/window/salmenu.cxx +++ b/vcl/aqua/source/window/salmenu.cxx @@ -81,12 +81,14 @@ const AquaSalMenu* AquaSalMenu::pCurrentMenuBar = NULL; -(void)showPreferences: (id) sender { + (void)sender; YIELD_GUARD; [self showDialog: SHOWDIALOG_ID_PREFERENCES]; } -(void)showAbout: (id) sender { + (void)sender; YIELD_GUARD; [self showDialog: SHOWDIALOG_ID_ABOUT]; @@ -593,7 +595,7 @@ void AquaSalMenu::RemoveItem( unsigned nPos ) [mpMenu removeItemAtIndex: getItemIndexByPos(nPos)]; } -void AquaSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos ) +void AquaSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned /*nPos*/ ) { AquaSalMenuItem *pAquaSalMenuItem = static_cast(pSalMenuItem); AquaSalMenu *subAquaSalMenu = static_cast(pSubMenu); @@ -651,7 +653,7 @@ void AquaSalMenu::EnableItem( unsigned nPos, sal_Bool bEnable ) } } -void AquaSalMenu::SetItemImage( unsigned nPos, SalMenuItem* pSMI, const Image& rImage ) +void AquaSalMenu::SetItemImage( unsigned /*nPos*/, SalMenuItem* pSMI, const Image& rImage ) { AquaSalMenuItem* pSalMenuItem = static_cast( pSMI ); if( ! pSalMenuItem || ! pSalMenuItem->mpMenuItem ) @@ -664,7 +666,7 @@ void AquaSalMenu::SetItemImage( unsigned nPos, SalMenuItem* pSMI, const Image& r [pImage release]; } -void AquaSalMenu::SetItemText( unsigned i_nPos, SalMenuItem* i_pSalMenuItem, const XubString& i_rText ) +void AquaSalMenu::SetItemText( unsigned /*i_nPos*/, SalMenuItem* i_pSalMenuItem, const XubString& i_rText ) { if (!i_pSalMenuItem) return; @@ -701,7 +703,7 @@ void AquaSalMenu::SetItemText( unsigned i_nPos, SalMenuItem* i_pSalMenuItem, con } } -void AquaSalMenu::SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName ) +void AquaSalMenu::SetAccelerator( unsigned /*nPos*/, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& /*rKeyName*/ ) { sal_uInt16 nModifier; sal_Unicode nCommandKey = 0; @@ -784,7 +786,7 @@ void AquaSalMenu::SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, cons [pString release]; } -void AquaSalMenu::GetSystemMenuData( SystemMenuData* pData ) +void AquaSalMenu::GetSystemMenuData( SystemMenuData* ) { } diff --git a/vcl/aqua/source/window/salobj.cxx b/vcl/aqua/source/window/salobj.cxx index bbbb85cd1351..6b5952bee8a1 100644 --- a/vcl/aqua/source/window/salobj.cxx +++ b/vcl/aqua/source/window/salobj.cxx @@ -114,7 +114,7 @@ sal_uInt16 AquaSalObject::GetClipRegionType() // ----------------------------------------------------------------------- -void AquaSalObject::BeginSetClipRegion( sal_uLong nRectCount ) +void AquaSalObject::BeginSetClipRegion( sal_uLong ) { mbClip = false; } @@ -208,7 +208,7 @@ void AquaSalObject::Show( sal_Bool bVisible ) // ----------------------------------------------------------------------- -void AquaSalObject::Enable( sal_Bool bEnable ) +void AquaSalObject::Enable( sal_Bool ) { } @@ -226,7 +226,7 @@ void AquaSalObject::SetBackground() // ----------------------------------------------------------------------- -void AquaSalObject::SetBackground( SalColor nSalColor ) +void AquaSalObject::SetBackground( SalColor ) { } diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx index a77ab0bcba6a..4f1aad4d36cb 100644 --- a/vcl/source/gdi/font.cxx +++ b/vcl/source/gdi/font.cxx @@ -877,9 +877,6 @@ namespace bool identifyTrueTypeFont( const void* i_pBuffer, sal_uInt32 i_nSize, Font& o_rResult ) { bool bResult = false; -// FIXME: This is HACK. We do not build psprint's part on aqua... -// How to solve this? -#ifndef QUARTZ TrueTypeFont* pTTF = NULL; if( OpenTTFontBuffer( const_cast(i_pBuffer), i_nSize, 0, &pTTF ) == SF_OK ) { @@ -953,7 +950,6 @@ namespace // success bResult = true; } -#endif return bResult; } diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx index bddf1f9606ad..25e693ae72a2 100755 --- a/vcl/source/window/syschild.cxx +++ b/vcl/source/window/syschild.cxx @@ -243,6 +243,7 @@ sal_IntPtr SystemChildWindow::GetParentWindowHandle( sal_Bool bUseJava ) { sal_IntPtr nRet = 0; + (void)bUseJava; #if defined WNT nRet = reinterpret_cast< sal_IntPtr >( GetSystemData()->hWnd ); #elif defined QUARTZ -- cgit v1.2.3 From 28be5001011db5d2e59f89790c96cf6b89f4683f Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 15 Feb 2011 18:34:16 +0100 Subject: add new header file --- vcl/Package_inc.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/vcl/Package_inc.mk b/vcl/Package_inc.mk index f3177b01c5dd..421c779fa511 100644 --- a/vcl/Package_inc.mk +++ b/vcl/Package_inc.mk @@ -148,6 +148,7 @@ $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/tabdlg.hxx,vcl/tabdlg.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/tabpage.hxx,vcl/tabpage.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/taskpanelist.hxx,vcl/taskpanelist.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/threadex.hxx,vcl/threadex.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/throbber.hxx,vcl/throbber.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/timer.hxx,vcl/timer.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/toolbox.hxx,vcl/toolbox.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/unohelp2.hxx,vcl/unohelp2.hxx)) -- cgit v1.2.3 From d47d21cb19e3f33b3b9c76aef16fd89802a52c11 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 15 Feb 2011 18:54:16 +0100 Subject: add new source file --- vcl/Library_vcl.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index d2a02a888513..98f84e13600b 100755 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -287,6 +287,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/control/spinbtn \ vcl/source/control/spinfld \ vcl/source/control/tabctrl \ + vcl/source/control/throbber \ vcl/source/fontsubset/cff \ vcl/source/fontsubset/fontsubset \ vcl/source/fontsubset/gsub \ -- cgit v1.2.3 From 5fab49034775c1cadc495a18094f24e97ae40f6c Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Tue, 15 Feb 2011 19:34:31 +0100 Subject: calc66: #i114504# don't assume external references are always file urls --- sc/source/filter/xml/xmltabi.cxx | 28 ++++++++++++++++------------ sc/source/ui/docshell/externalrefmgr.cxx | 31 ++++++++++++++++++++++++++----- 2 files changed, 42 insertions(+), 17 deletions(-) diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx index 1644ad7e7ffe..dd234bb9a76a 100644 --- a/sc/source/filter/xml/xmltabi.cxx +++ b/sc/source/filter/xml/xmltabi.cxx @@ -55,6 +55,8 @@ #include #include +#include + #include #include #include @@ -83,27 +85,29 @@ static bool lcl_isExternalRefCache(const rtl::OUString& rName, rtl::OUString& rU // 'file:///path/to/file's.ods'#Sheet (Notice the quote in the file name. // That's allowed.) - static const sal_Unicode aPrefix[] = { - '\'', 'f', 'i', 'l', 'e', ':', '/', '/' - }; + if ( rName.toChar() != '\'' ) // initial quote + return false; + + // #i114504# Other schemes besides "file:" are also allowed. + // CompareProtocolScheme is quick, only looks at the start of the string. + INetProtocol eProt = INetURLObject::CompareProtocolScheme( rName.copy(1) ); + if ( eProt == INET_PROT_NOT_VALID ) + return false; + + rtl::OUString aPrefix = INetURLObject::GetScheme( eProt ); + sal_Int32 nPrefLen = aPrefix.getLength(); rtl::OUStringBuffer aUrlBuf, aTabNameBuf; - aUrlBuf.appendAscii("file://"); + aUrlBuf.append( aPrefix ); sal_Int32 n = rName.getLength(); const sal_Unicode* p = rName.getStr(); bool bInUrl = true; sal_Unicode cPrev = 0; - for (sal_Int32 i = 0; i < n; ++i) + for (sal_Int32 i = nPrefLen+1; i < n; ++i) // start the loop after quote and prefix { const sal_Unicode c = p[i]; - if (i <= 7) - { - // Checking the prefix 'file://'. - if (c != aPrefix[i]) - return false; - } - else if (bInUrl) + if (bInUrl) { // parsing file URL if (c == '#') diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index e3293a7eed5b..3ad8c551a7af 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -61,6 +61,7 @@ #include "sfx2/linkmgr.hxx" #include "tools/urlobj.hxx" #include "unotools/ucbhelper.hxx" +#include "unotools/localfilehelper.hxx" #include #include @@ -2026,7 +2027,10 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, Stri return NULL; String aOptions( pFileData->maFilterOptions ); - ScDocumentLoader::GetFilterName(aFile, rFilter, aOptions, true, false); + if ( pFileData->maFilterName.Len() ) + rFilter = pFileData->maFilterName; // don't overwrite stored filter with guessed filter + else + ScDocumentLoader::GetFilterName(aFile, rFilter, aOptions, true, false); const SfxFilter* pFilter = ScDocShell::Factory().GetFilterContainer()->GetFilter4FilterName(rFilter); if (!pFileData->maRelativeName.Len()) @@ -2093,10 +2097,18 @@ bool ScExternalRefManager::isFileLoadable(const String& rFile) const if (isOwnDocument(rFile)) return false; - if (utl::UCBContentHelper::IsFolder(rFile)) - return false; + String aPhysical; + if (utl::LocalFileHelper::ConvertURLToPhysicalName(rFile, aPhysical) && aPhysical.Len()) + { + // #i114504# try IsFolder/Exists only for file URLs - return utl::UCBContentHelper::Exists(rFile); + if (utl::UCBContentHelper::IsFolder(rFile)) + return false; + + return utl::UCBContentHelper::Exists(rFile); + } + else + return true; // for http and others, Exists doesn't work, but the URL can still be opened } void ScExternalRefManager::maybeLinkExternalFile(sal_uInt16 nFileId) @@ -2111,7 +2123,16 @@ void ScExternalRefManager::maybeLinkExternalFile(sal_uInt16 nFileId) return; String aFilter, aOptions; - ScDocumentLoader::GetFilterName(*pFileName, aFilter, aOptions, true, false); + const SrcFileData* pFileData = getExternalFileData(nFileId); + if (pFileData) + { + aFilter = pFileData->maFilterName; + aOptions = pFileData->maFilterOptions; + } + // If a filter was already set (for example, loading the cached table), + // don't call GetFilterName which has to access the source file. + if (!aFilter.Len()) + ScDocumentLoader::GetFilterName(*pFileName, aFilter, aOptions, true, false); sfx2::LinkManager* pLinkMgr = mpDoc->GetLinkManager(); ScExternalRefLink* pLink = new ScExternalRefLink(mpDoc, nFileId, aFilter); DBG_ASSERT(pFileName, "ScExternalRefManager::insertExternalFileLink: file name pointer is NULL"); -- cgit v1.2.3 From b6515632228beaf99af1527bdc099ff6ef3ef8d8 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Wed, 16 Feb 2011 13:21:25 +0100 Subject: calc66: #i113411# use first value entry for number format of ScDPTableDataCache --- sc/source/core/data/dptablecache.cxx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/sc/source/core/data/dptablecache.cxx b/sc/source/core/data/dptablecache.cxx index f2cc8d2c1e5c..18c7af81e06c 100644 --- a/sc/source/core/data/dptablecache.cxx +++ b/sc/source/core/data/dptablecache.cxx @@ -209,13 +209,13 @@ ScDPItemData::ScDPItemData( ScDocument* pDoc, SCROW nRow, sal_uInt16 nCol, sal_u else if ( pDoc->HasValueData( nCol, nRow, nDocTab ) ) { double fVal = pDoc->GetValue(ScAddress(nCol, nRow, nDocTab)); + nNumFormat = pDoc->GetNumberFormat( ScAddress( nCol, nRow, nDocTab ) ); sal_uLong nFormat = NUMBERFORMAT_NUMBER; if ( pFormatter ) - nFormat = pFormatter->GetType( pDoc->GetNumberFormat( ScAddress( nCol, nRow, nDocTab ) ) ); + nFormat = pFormatter->GetType( nNumFormat ); aString = aDocStr; fValue = fVal; mbFlag |= MK_VAL|MK_DATA; - nNumFormat = pDoc->GetNumberFormat( ScAddress( nCol, nRow, nDocTab ) ); lcl_isDate( nFormat ) ? ( mbFlag |= MK_DATE ) : (mbFlag &= ~MK_DATE); } else if ( pDoc->HasData( nCol,nRow, nDocTab ) ) @@ -1020,10 +1020,15 @@ sal_uLong ScDPTableDataCache::GetNumberFormat( long nDim ) const { if ( nDim >= mnColumnCount ) return 0; - if ( mpTableDataValues[nDim].size()==0 ) - return 0; - else - return mpTableDataValues[nDim][0]->nNumFormat; + + // #i113411# take the number format from the first value entry + size_t nSize = mpTableDataValues[nDim].size(); + size_t nPos = 0; + while ( nPos < nSize && mpTableDataValues[nDim][nPos]->GetType() != SC_VALTYPE_VALUE ) + ++nPos; + if ( nPos < nSize ) + return mpTableDataValues[nDim][nPos]->nNumFormat; + return 0; } sal_Bool ScDPTableDataCache::IsDateDimension( long nDim ) const -- cgit v1.2.3 From b944bda2f94c86f7807ae7e3ea279eaf63f29753 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 16 Feb 2011 14:19:26 +0100 Subject: dba34d: #i116572# use proper AddressConvention --- sc/source/ui/unoobj/addruno.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sc/source/ui/unoobj/addruno.cxx b/sc/source/ui/unoobj/addruno.cxx index e54c47b6bd64..0dde4fb9e880 100644 --- a/sc/source/ui/unoobj/addruno.cxx +++ b/sc/source/ui/unoobj/addruno.cxx @@ -195,7 +195,7 @@ void SAL_CALL ScAddressConversionObj::setPropertyValue( const rtl::OUString& aPr else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) || aNameStr.EqualsAscii( SC_UNONAME_XLA1REPR ) ) { ::formula::FormulaGrammar::AddressConvention eConv = aNameStr.EqualsAscii( SC_UNONAME_XLA1REPR ) ? - ::formula::FormulaGrammar::CONV_OOO : ::formula::FormulaGrammar::CONV_XL_A1; + ::formula::FormulaGrammar::CONV_XL_A1 : ::formula::FormulaGrammar::CONV_OOO; // parse the file format string rtl::OUString sRepresentation; @@ -273,7 +273,7 @@ uno::Any SAL_CALL ScAddressConversionObj::getPropertyValue( const rtl::OUString& else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) || aNameStr.EqualsAscii( SC_UNONAME_XLA1REPR ) ) { ::formula::FormulaGrammar::AddressConvention eConv = aNameStr.EqualsAscii( SC_UNONAME_XLA1REPR ) ? - ::formula::FormulaGrammar::CONV_OOO : ::formula::FormulaGrammar::CONV_XL_A1; + ::formula::FormulaGrammar::CONV_XL_A1 : ::formula::FormulaGrammar::CONV_OOO; // generate file format string - always include sheet String aFormatStr; -- cgit v1.2.3 From 4c47c0802599e0d24c192ed0cb73b5d64fbfc421 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 16 Feb 2011 14:35:27 +0100 Subject: dba34d: #i116215# de-select all items when the to-be-selected string is invalid or empty --- forms/source/component/Filter.cxx | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index f9f17524756f..a5159679c9de 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -631,19 +631,39 @@ namespace frm if (xListBox.is()) { m_aText = aText; - xListBox->selectItem(m_aText, sal_True); - if ( xListBox->getSelectedItemPos() >= 0 ) + MapString2String::const_iterator itemPos = m_aDisplayItemToValueItem.find( m_aText ); + if ( itemPos == m_aDisplayItemToValueItem.end() ) { - const bool isQuoted = ( aText.getLength() > 0 ) - && ( aText[0] == '\'' ) - && ( aText[aText.getLength() - 1] == '\'' ); + const bool isQuoted = ( m_aText.getLength() > 1 ) + && ( m_aText[0] == '\'' ) + && ( m_aText[ m_aText.getLength() - 1 ] == '\'' ); if ( isQuoted ) { - xListBox->selectItem( aText.copy( 1, aText.getLength() - 2 ), sal_True ); + m_aText = m_aText.copy( 1, m_aText.getLength() - 2 ); + itemPos = m_aDisplayItemToValueItem.find( m_aText ); } } + + OSL_ENSURE( ( itemPos != m_aDisplayItemToValueItem.end() ) || ( m_aText.getLength() == 0 ), + "OFilterControl::setText: this text is not in my display list!" ); + if ( itemPos == m_aDisplayItemToValueItem.end() ) + m_aText = ::rtl::OUString(); + + if ( m_aText.getLength() == 0) + { + while ( xListBox->getSelectedItemPos() >= 0 ) + { + xListBox->selectItemPos( xListBox->getSelectedItemPos(), sal_False ); + } + } + else + { + xListBox->selectItem( m_aText, sal_True ); + } } - } break; + } + break; + default: { Reference< XTextComponent > xText( getPeer(), UNO_QUERY ); -- cgit v1.2.3 From 71214c0f92851b63ab756488e7edba9b2a88d4cc Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 16 Feb 2011 14:35:28 +0100 Subject: dba34d: #i116215# ImplSelectionChangedHdl: when an entry has been de-selected in drop-down-mode, reset mpImplWin to display nothing --- vcl/source/control/lstbox.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index 594b76684a1a..49b949bdefdc 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -290,8 +290,15 @@ IMPL_LINK( ListBox, ImplSelectionChangedHdl, void*, n ) Image aImage = mpImplLB->GetEntryList()->GetEntryImage( nChanged ); mpImplWin->SetImage( aImage ); } - mpImplWin->Invalidate(); } + else + { + mpImplWin->SetItemPos( LISTBOX_ENTRY_NOTFOUND ); + mpImplWin->SetString( ImplGetSVEmptyStr() ); + Image aImage; + mpImplWin->SetImage( aImage ); + } + mpImplWin->Invalidate(); } return 1; } -- cgit v1.2.3 From 5c24799ce51c533e0ea68384ef5aa06785d9a443 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Wed, 16 Feb 2011 18:03:22 +0100 Subject: calc66: #i112034# ScCopyPage/TransferDrawPage: don't copy internal objects (detective) and note captions --- sc/source/core/data/documen9.cxx | 22 +++++++++++++--------- sc/source/core/data/drwlayer.cxx | 24 ++++++++++++++---------- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx index 534c2333bd9b..88532522ce7d 100644 --- a/sc/source/core/data/documen9.cxx +++ b/sc/source/core/data/documen9.cxx @@ -111,17 +111,21 @@ void ScDocument::TransferDrawPage(ScDocument* pSrcDoc, SCTAB nSrcPos, SCTAB nDes SdrObject* pOldObject = aIter.Next(); while (pOldObject) { - // #116235# - SdrObject* pNewObject = pOldObject->Clone(); - // SdrObject* pNewObject = pOldObject->Clone( pNewPage, pDrawLayer ); - pNewObject->SetModel(pDrawLayer); - pNewObject->SetPage(pNewPage); + // #i112034# do not copy internal objects (detective) and note captions + if ( pOldObject->GetLayer() != SC_LAYER_INTERN && !ScDrawLayer::IsNoteCaption( pOldObject ) ) + { + // #116235# + SdrObject* pNewObject = pOldObject->Clone(); + // SdrObject* pNewObject = pOldObject->Clone( pNewPage, pDrawLayer ); + pNewObject->SetModel(pDrawLayer); + pNewObject->SetPage(pNewPage); - pNewObject->NbcMove(Size(0,0)); - pNewPage->InsertObject( pNewObject ); + pNewObject->NbcMove(Size(0,0)); + pNewPage->InsertObject( pNewObject ); - if (pDrawLayer->IsRecording()) - pDrawLayer->AddCalcUndo( new SdrUndoInsertObj( *pNewObject ) ); + if (pDrawLayer->IsRecording()) + pDrawLayer->AddCalcUndo( new SdrUndoInsertObj( *pNewObject ) ); + } pOldObject = aIter.Next(); } diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index e3b75436f72c..6d3989191556 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -430,16 +430,20 @@ void ScDrawLayer::ScCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos, sal_Bool b SdrObject* pOldObject = aIter.Next(); while (pOldObject) { - // #116235# - SdrObject* pNewObject = pOldObject->Clone(); - //SdrObject* pNewObject = pOldObject->Clone( pNewPage, this ); - pNewObject->SetModel(this); - pNewObject->SetPage(pNewPage); - - pNewObject->NbcMove(Size(0,0)); - pNewPage->InsertObject( pNewObject ); - if (bRecording) - AddCalcUndo( new SdrUndoInsertObj( *pNewObject ) ); + // #i112034# do not copy internal objects (detective) and note captions + if ( pOldObject->GetLayer() != SC_LAYER_INTERN && !IsNoteCaption( pOldObject ) ) + { + // #116235# + SdrObject* pNewObject = pOldObject->Clone(); + //SdrObject* pNewObject = pOldObject->Clone( pNewPage, this ); + pNewObject->SetModel(this); + pNewObject->SetPage(pNewPage); + + pNewObject->NbcMove(Size(0,0)); + pNewPage->InsertObject( pNewObject ); + if (bRecording) + AddCalcUndo( new SdrUndoInsertObj( *pNewObject ) ); + } pOldObject = aIter.Next(); } -- cgit v1.2.3 From dd096e1000bda039357dd9206a59489f94e56152 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 17 Feb 2011 08:41:35 +0100 Subject: dba34d: post-rebase fixes --- reportdesign/source/ui/report/EndMarker.cxx | 4 ++-- reportdesign/source/ui/report/ReportSection.cxx | 4 ++-- reportdesign/source/ui/report/SectionWindow.cxx | 4 ++-- reportdesign/source/ui/report/StartMarker.cxx | 4 ++-- reportdesign/source/ui/report/ViewsWindow.cxx | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/reportdesign/source/ui/report/EndMarker.cxx b/reportdesign/source/ui/report/EndMarker.cxx index 7a5e47fef9b7..c8c508d3ddaa 100644 --- a/reportdesign/source/ui/report/EndMarker.cxx +++ b/reportdesign/source/ui/report/EndMarker.cxx @@ -88,9 +88,9 @@ void OEndMarker::Paint( const Rectangle& /*rRect*/ ) // ----------------------------------------------------------------------- void OEndMarker::ImplInitSettings() { - EnableChildTransparentMode( TRUE ); + EnableChildTransparentMode( sal_True ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( TRUE ); + SetPaintTransparent( sal_True ); SetBackground( Wallpaper( svtools::ColorConfig().GetColorValue(::svtools::APPBACKGROUND).nColor) ); SetFillColor( Application::GetSettings().GetStyleSettings().GetShadowColor() ); diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index 9ba3d888be5a..020f7e24ca22 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -105,8 +105,8 @@ OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< re SetHelpId(HID_REPORTSECTION); SetMapMode( MapMode( MAP_100TH_MM ) ); SetParentClipMode( PARENTCLIPMODE_CLIP ); - EnableChildTransparentMode( FALSE ); - SetPaintTransparent( FALSE ); + EnableChildTransparentMode( sal_False ); + SetPaintTransparent( sal_False ); try { diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index 7d5a7f4549e0..ab08c11e0753 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -211,9 +211,9 @@ void OSectionWindow::ImplInitSettings() static bool t = false; if ( t ) { - EnableChildTransparentMode( TRUE ); + EnableChildTransparentMode( sal_True ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( TRUE ); + SetPaintTransparent( sal_True ); } SetBackground( ); } diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx index 289ba8c22fe6..14e884b04015 100644 --- a/reportdesign/source/ui/report/StartMarker.cxx +++ b/reportdesign/source/ui/report/StartMarker.cxx @@ -71,7 +71,7 @@ OStartMarker::OStartMarker(OSectionWindow* _pParent,const ::rtl::OUString& _sCol initDefaultNodeImages(); ImplInitSettings(); m_aText.SetHelpId(HID_RPT_START_TITLE); - m_aText.SetPaintTransparent(TRUE); + m_aText.SetPaintTransparent(sal_True); m_aImage.SetHelpId(HID_RPT_START_IMAGE); m_aText.Show(); m_aImage.Show(); @@ -84,7 +84,7 @@ OStartMarker::OStartMarker(OSectionWindow* _pParent,const ::rtl::OUString& _sCol m_aVRuler.SetMargin2(); const MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum(); m_aVRuler.SetUnit(MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH); - EnableChildTransparentMode( TRUE ); + EnableChildTransparentMode( sal_True ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); SetPaintTransparent( sal_True ); } diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index 2410e317c663..f3706fa786bd 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -294,7 +294,7 @@ void OViewsWindow::Paint( const Rectangle& rRect ) //------------------------------------------------------------------------------ void OViewsWindow::ImplInitSettings() { - EnableChildTransparentMode( TRUE ); + EnableChildTransparentMode( sal_True ); SetBackground( ); SetFillColor( Application::GetSettings().GetStyleSettings().GetDialogColor() ); SetTextFillColor( Application::GetSettings().GetStyleSettings().GetDialogColor() ); -- cgit v1.2.3 From 6953426767ee51c357276b8e5d496074375881e9 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 17 Feb 2011 10:48:20 +0100 Subject: dba34d: #i116991# fix ScriptEventListenerWrapper to report failures in the delegatee creation as assertions only, instead of throwing a RuntimeException which is caught way too late --- svx/source/form/fmundo.cxx | 78 ++++++++++++++++------------------------------ 1 file changed, 26 insertions(+), 52 deletions(-) diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index eee61c5c2dee..8a72cb768d5f 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -66,6 +66,7 @@ #include #include #include +#include using namespace ::com::sun::star::uno; using namespace ::com::sun::star::awt; @@ -88,7 +89,9 @@ typedef cppu::WeakImplHelper1< XScriptListener > ScriptEventListener_BASE; class ScriptEventListenerWrapper : public ScriptEventListener_BASE { public: - ScriptEventListenerWrapper( FmFormModel& _rModel) throw ( RuntimeException ) : pModel(&_rModel) + ScriptEventListenerWrapper( FmFormModel& _rModel) throw ( RuntimeException ) + :m_rModel( _rModel ) + ,m_attemptedListenerCreation( false ) { } @@ -98,7 +101,7 @@ public: // XScriptListener virtual void SAL_CALL firing(const ScriptEvent& evt) throw(RuntimeException) { - setModel(); + attemptListenerCreation(); if ( m_vbaListener.is() ) { m_vbaListener->firing( evt ); @@ -107,7 +110,7 @@ public: virtual Any SAL_CALL approveFiring(const ScriptEvent& evt) throw( com::sun::star::reflection::InvocationTargetException, RuntimeException) { - setModel(); + attemptListenerCreation(); if ( m_vbaListener.is() ) { return m_vbaListener->approveFiring( evt ); @@ -116,61 +119,32 @@ public: } private: - void setModel() + void attemptListenerCreation() { - if ( !m_vbaListener.is() ) - { - Reference < XPropertySet > xProps( - ::comphelper::getProcessServiceFactory(), UNO_QUERY ); - if ( xProps.is() ) - { - Reference< XComponentContext > xCtx( xProps->getPropertyValue( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), UNO_QUERY ); - if ( xCtx.is() ) - { - Reference< XMultiComponentFactory > xMFac( - xCtx->getServiceManager(), UNO_QUERY ); - - // SfxObjectShellRef is good here since the model controls the lifetime of the shell - SfxObjectShellRef xObjSh = pModel->GetObjectShell(); - Reference< XMultiServiceFactory > xDocFac; - if ( xObjSh.Is() ) - xDocFac.set( xObjSh->GetModel(), UNO_QUERY ); + if ( m_attemptedListenerCreation ) + return; + m_attemptedListenerCreation = true; - if ( xMFac.is() ) - { - m_vbaListener.set( xMFac->createInstanceWithContext( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "ooo.vba.EventListener" ) ), xCtx ), - UNO_QUERY_THROW ); - } - } - } + try + { + ::comphelper::ComponentContext const aContext( ::comphelper::getProcessServiceFactory() ); + Reference< XScriptListener > const xScriptListener( aContext.createComponent( "ooo.vba.EventListener" ), UNO_QUERY_THROW ); + Reference< XPropertySet > const xListenerProps( m_vbaListener, UNO_QUERY_THROW ); + // SfxObjectShellRef is good here since the model controls the lifetime of the shell + SfxObjectShellRef const xObjectShell = m_rModel.GetObjectShell(); + ENSURE_OR_THROW( xObjectShell.Is(), "no object shell!" ); + xListenerProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Model" ) ), makeAny( xObjectShell->GetModel() ) ); + + m_vbaListener = xScriptListener; } - Reference< XPropertySet > xProps( m_vbaListener, UNO_QUERY ); - if ( xProps.is() ) + catch( Exception const & ) { - try - { - // SfxObjectShellRef is good here since the model controls the lifetime of the shell - SfxObjectShellRef xObjSh = pModel->GetObjectShell(); - if ( xObjSh.Is() && m_vbaListener.is() ) - { - Any aVal; - aVal <<= xObjSh->GetModel(); - xProps->setPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Model" ) ), - aVal ); - } - } - catch( Exception& ) - { - //swallow any errors - } + DBG_UNHANDLED_EXCEPTION(); } } - FmFormModel* pModel; - Reference< XScriptListener > m_vbaListener; + FmFormModel& m_rModel; + Reference< XScriptListener > m_vbaListener; + bool m_attemptedListenerCreation; }; -- cgit v1.2.3 From 3c8cd6b02ad8ac8c95965c0b4f06285d26226e58 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Thu, 17 Feb 2011 11:19:25 +0100 Subject: calc66: #i112034# also use correct sheet for clip param --- sc/source/ui/view/tabcont.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx index 6e41548dc31f..48de6a0ee731 100644 --- a/sc/source/ui/view/tabcont.cxx +++ b/sc/source/ui/view/tabcont.cxx @@ -458,12 +458,13 @@ void ScTabControl::DoDrag( const Region& /* rRegion */ ) ScDocument* pDoc = pDocSh->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); + ScRange aTabRange( 0, 0, nTab, MAXCOL, MAXROW, nTab ); ScMarkData aTabMark = pViewData->GetMarkData(); aTabMark.ResetMark(); // doesn't change marked table information - aTabMark.SetMarkArea( ScRange(0,0,nTab,MAXCOL,MAXROW,nTab) ); + aTabMark.SetMarkArea( aTabRange ); ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP ); - ScClipParam aClipParam(ScRange(0, 0, 0, MAXCOL, MAXROW, 0), false); + ScClipParam aClipParam(aTabRange, false); pDoc->CopyToClip(aClipParam, pClipDoc, &aTabMark, false); TransferableObjectDescriptor aObjDesc; -- cgit v1.2.3 From 3f7938f0fadde038e036e612d8550e5e0d8a4a4d Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 17 Feb 2011 23:46:23 +0100 Subject: dba34d: #i116995# also register the vbaevents library --- postprocess/packcomponents/makefile.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk index 9fbfc70e11a2..5cd14eb4bfa3 100644 --- a/postprocess/packcomponents/makefile.mk +++ b/postprocess/packcomponents/makefile.mk @@ -171,6 +171,7 @@ my_components = \ utl \ uui \ vbaobj \ + vbaevents \ vcl \ vclcanvas \ wpft \ -- cgit v1.2.3 From a41005410d094f50df54258e30138f36d7175fe0 Mon Sep 17 00:00:00 2001 From: ka Date: Fri, 18 Feb 2011 05:20:51 +0100 Subject: ka102: type changes nneded for DEV300_m100 --- configure | 150 ++++++++++++++++++++++++++++++++++ configure.in | 44 ++++++++++ scp2/source/ooo/file_ooo.scp | 12 +++ scp2/source/ooo/module_hidden_ooo.scp | 5 +- 4 files changed, 208 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 52ee9b42a724..bb73199a1a55 100755 --- a/configure +++ b/configure @@ -656,6 +656,9 @@ ENABLE_PRESENTER_SCREEN ENABLE_MINIMIZER ENABLE_PRESENTER_EXTRA_UI ENABLE_OPENGL +ENABLE_LIBRSVG +LIBRSVG_LIBS +LIBRSVG_CFLAGS SYSTEM_CAIRO BUILD_PIXMAN ENABLE_CAIRO @@ -1051,6 +1054,7 @@ enable_gstreamer enable_systray enable_cairo with_system_cairo +enable_librsvg enable_opengl enable_dbus enable_gconf @@ -1912,6 +1916,19 @@ Optional Features: --enable-cairo Determines whether to use Cairo library on platforms where Cairo is available. + --enable-librsvg Determines whether to use librsvg library on + platforms where librsvg is available. + (actually, it is possible to build with + --disable-librsvg and to still have SVG support + within a running soffice instance, since this + dependency is a runtime only dependency. + To have SVG suppport at runtime, the librsvg, the cairo + and the gobject library - and all depending libraries + as well - need to be accessible by the running soffice + instance. + The intention of defaulting this flag to yes is to + indicate this fact to the build maintainer) + --enable-opengl Determines whether to build the OpenGL 3D slide transitions component @@ -3939,6 +3956,13 @@ if test "${with_system_cairo+set}" = set; then : withval=$with_system_cairo; fi +# Check whether --enable-librsvg was given. +if test "${enable_librsvg+set}" = set; then : + enableval=$enable_librsvg; +else + enable_librsvg=yes +fi + # Check whether --enable-opengl was given. if test "${enable_opengl+set}" = set; then : enableval=$enable_opengl; @@ -5258,6 +5282,7 @@ case "$build_os" in solaris*) test_gtk=yes test_cairo=yes + test_librsvg=yes test_kde=yes test_cups=yes test_randr=yes @@ -5332,6 +5357,7 @@ $as_echo "ok ($build_cpu)" >&6; } linux-gnu*|k*bsd*-gnu*) test_gtk=yes test_cairo=yes + test_librsvg=yes test_kde=yes test_kde4=yes test_cups=yes @@ -5347,6 +5373,7 @@ $as_echo "ok ($build_cpu)" >&6; } cygwin*) # Windows test_cups=no test_cairo=yes + test_librsvg=no test_freetype=no test_gstreamer=no _os=WINNT @@ -5355,6 +5382,7 @@ $as_echo "ok ($build_cpu)" >&6; } test_cups=yes test_gtk=yes test_cairo=yes + test_librsvg=no test_randr=no test_freetype=no test_gstreamer=no @@ -5371,6 +5399,7 @@ $as_echo "$as_me: WARNING: Disabling gtk-quickstarter - not supported on Mac. Us test_cups=no test_randr=no test_gtk=no + test_librsvg=no test_freetype=no test_gstreamer=no _os=OS2 @@ -5378,6 +5407,7 @@ $as_echo "$as_me: WARNING: Disabling gtk-quickstarter - not supported on Mac. Us freebsd*) test_gtk=yes test_cairo=yes + test_librsvg=yes test_kde=yes test_kde4=yes test_cups=yes @@ -5417,6 +5447,7 @@ $as_echo "$PTHREAD_LIBS" >&6; } netbsd) test_gtk=yes test_cairo=yes + test_librsvg=yes test_kde=yes test_kde4=yes test_cups=no @@ -20762,6 +20793,125 @@ fi +ENABLE_LIBRSVG="" +LIBRSVG_CFLAGS="" +LIBRSVG_LIBS="" + +if test "$test_librsvg" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use librsvg" >&5 +$as_echo_n "checking whether to use librsvg... " >&6; } + if test "x$enable_librsvg" != "xno" ; then + + 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 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for librsvg-2.0 >= 2.14" >&5 +$as_echo_n "checking for librsvg-2.0 >= 2.14... " >&6; } + + if $PKG_CONFIG --exists "librsvg-2.0 >= 2.14" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRSVG_CFLAGS" >&5 +$as_echo_n "checking LIBRSVG_CFLAGS... " >&6; } + LIBRSVG_CFLAGS=`$PKG_CONFIG --cflags "librsvg-2.0 >= 2.14"` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRSVG_CFLAGS" >&5 +$as_echo "$LIBRSVG_CFLAGS" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRSVG_LIBS" >&5 +$as_echo_n "checking LIBRSVG_LIBS... " >&6; } + LIBRSVG_LIBS=`$PKG_CONFIG --libs "librsvg-2.0 >= 2.14"` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRSVG_LIBS" >&5 +$as_echo "$LIBRSVG_LIBS" >&6; } + else + LIBRSVG_CFLAGS="" + LIBRSVG_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + LIBRSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "librsvg-2.0 >= 2.14"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + : + else + as_fn_error $? "requirements to build with librsvg support not met. Use --disable-librsvg or install the missing packages" "$LINENO" 5 + fi + + ENABLE_LIBRSVG="TRUE" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi +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; } ENABLE_OPENGL= diff --git a/configure.in b/configure.in index 92add6148851..0a3d5179807d 100644 --- a/configure.in +++ b/configure.in @@ -209,6 +209,20 @@ AC_ARG_ENABLE(cairo, AC_ARG_WITH(system-cairo, [ --with-system-cairo Use Cairo libraries already on system ],,) +AC_ARG_ENABLE(librsvg, +[ --enable-librsvg Determines whether to use librsvg library on + platforms where librsvg is available. + (actually, it is possible to build with + --disable-librsvg and to still have SVG support + within a running soffice instance, since this + dependency is a runtime only dependency. + To have SVG suppport at runtime, the librsvg, the cairo + and the gobject library - and all depending libraries + as well - need to be accessible by the running soffice + instance. + The intention of defaulting this flag to yes is to + indicate this fact to the build maintainer) +],,enable_librsvg=yes) AC_ARG_ENABLE(opengl, [ --enable-opengl Determines whether to build the OpenGL 3D slide transitions component @@ -929,6 +943,7 @@ case "$build_os" in solaris*) test_gtk=yes test_cairo=yes + test_librsvg=yes test_kde=yes test_cups=yes test_randr=yes @@ -963,6 +978,7 @@ case "$build_os" in linux-gnu*|k*bsd*-gnu*) test_gtk=yes test_cairo=yes + test_librsvg=yes test_kde=yes test_kde4=yes test_cups=yes @@ -978,6 +994,7 @@ case "$build_os" in cygwin*) # Windows test_cups=no test_cairo=yes + test_librsvg=no test_freetype=no test_gstreamer=no _os=WINNT @@ -986,6 +1003,7 @@ case "$build_os" in test_cups=yes test_gtk=yes test_cairo=yes + test_librsvg=no test_randr=no test_freetype=no test_gstreamer=no @@ -1001,6 +1019,7 @@ case "$build_os" in test_cups=no test_randr=no test_gtk=no + test_librsvg=no test_freetype=no test_gstreamer=no _os=OS2 @@ -1008,6 +1027,7 @@ case "$build_os" in freebsd*) test_gtk=yes test_cairo=yes + test_librsvg=yes test_kde=yes test_kde4=yes test_cups=yes @@ -1043,6 +1063,7 @@ case "$build_os" in netbsd) test_gtk=yes test_cairo=yes + test_librsvg=yes test_kde=yes test_kde4=yes test_cups=no @@ -5820,6 +5841,29 @@ AC_SUBST(SYSTEM_CAIRO) AC_SUBST(CAIRO_CFLAGS) AC_SUBST(CAIRO_LIBS) +dnl =================================================================== +dnl Check whether the librsvg libraries are available. +dnl =================================================================== + +ENABLE_LIBRSVG="" +LIBRSVG_CFLAGS="" +LIBRSVG_LIBS="" + +if test "$test_librsvg" = "yes"; then + AC_MSG_CHECKING([whether to use librsvg]) + if test "x$enable_librsvg" != "xno" ; then + PKG_CHECK_MODULES( LIBRSVG, librsvg-2.0 >= 2.14,,AC_MSG_ERROR([requirements to build with librsvg support not met. Use --disable-librsvg or install the missing packages])) + ENABLE_LIBRSVG="TRUE" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi +fi + +AC_SUBST(ENABLE_LIBRSVG) +AC_SUBST(LIBRSVG_CFLAGS) +AC_SUBST(LIBRSVG_LIBS) + dnl =================================================================== dnl Check whether the OpenGL libraries are available dnl =================================================================== diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp index eab2ebdf1734..0edada0e426c 100644 --- a/scp2/source/ooo/file_ooo.scp +++ b/scp2/source/ooo/file_ooo.scp @@ -2118,3 +2118,15 @@ End // UnixRights = 444; // End // #endif + +// #if defined WNT || defined MACOSX +// File gid_File_Lib_Librsvg +// Dir = gid_Dir_Program; +// ARCHIVE_TXT_FILE_BODY; +// #if defined WNT +// Name = "librsvg_w32.zip"; +// #else +// Name = "librsvg_mac.zip"; +// #endif +// End +// #endif diff --git a/scp2/source/ooo/module_hidden_ooo.scp b/scp2/source/ooo/module_hidden_ooo.scp index 3810b3126334..5f89b276303e 100644 --- a/scp2/source/ooo/module_hidden_ooo.scp +++ b/scp2/source/ooo/module_hidden_ooo.scp @@ -248,7 +248,8 @@ Module gid_Module_Root_Files_4 gid_File_Lib_Lprxw, gid_File_Lib_Libtextcat, gid_File_Lib_Guesslang, - gid_File_Lib_Tfu); + gid_File_Lib_Tfu, + gid_File_Lib_Librsvg); End Module gid_Module_Root_Files_5 @@ -809,5 +810,3 @@ End // Styles = (HIDDEN_ROOT); // End // #endif - - -- cgit v1.2.3 From f759ad09f5cfd415390ba25aa413cbecb10f047b Mon Sep 17 00:00:00 2001 From: ka Date: Fri, 18 Feb 2011 05:20:51 +0100 Subject: ka102: type changes nneded for DEV300_m100 --- svtools/source/filter/exportdialog.cxx | 5 +- svtools/source/filter/filter.cxx | 192 ++++++++--------- svtools/source/filter/filter2.cxx | 146 ++++++------- svtools/source/filter/igif/decode.cxx | 50 ++--- svtools/source/filter/igif/decode.hxx | 32 +-- svtools/source/filter/igif/gifread.cxx | 170 +++++++-------- svtools/source/filter/ixbm/xbmread.cxx | 52 ++--- svtools/source/filter/ixpm/rgbtable.hxx | 6 +- svtools/source/filter/ixpm/xpmread.cxx | 164 +++++++------- svtools/source/filter/jpeg/jpeg.cxx | 58 +++-- svtools/source/filter/jpeg/jpeg.h | 1 - svtools/source/filter/jpeg/jpegc.c | 14 +- svtools/source/filter/sgfbram.cxx | 132 ++++++------ svtools/source/filter/sgvmain.cxx | 202 +++++++++--------- svtools/source/filter/sgvspln.cxx | 82 ++++--- svtools/source/filter/sgvtext.cxx | 364 ++++++++++++++++---------------- svtools/source/filter/wmf/emfwr.cxx | 168 +++++++-------- svtools/source/filter/wmf/emfwr.hxx | 30 +-- svtools/source/filter/wmf/enhwmf.cxx | 195 +++++++++-------- svtools/source/filter/wmf/winmtf.cxx | 85 ++++---- svtools/source/filter/wmf/winmtf.hxx | 96 +++++---- svtools/source/filter/wmf/winwmf.cxx | 101 +++++---- svtools/source/filter/wmf/wmf.cxx | 32 +-- svtools/source/filter/wmf/wmfwr.cxx | 134 ++++++------ svtools/source/filter/wmf/wmfwr.hxx | 52 ++--- vcl/inc/vcl/graph.hxx | 1 + vcl/inc/vcl/impgraph.hxx | 1 + vcl/source/gdi/gdimtf.cxx | 2 +- vcl/source/gdi/graph.cxx | 6 +- vcl/source/gdi/impgraph.cxx | 10 +- 30 files changed, 1286 insertions(+), 1297 deletions(-) diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx index 20cc46a30ab5..472fe327329d 100644 --- a/svtools/source/filter/exportdialog.cxx +++ b/svtools/source/filter/exportdialog.cxx @@ -794,7 +794,7 @@ void ExportDialog::createSizeControls( vcl::RowOrColumn& rLayout ) nUnit = UNIT_PIXEL; if ( nUnit < 0 ) nUnit = UNIT_CM; - maLbSizeX.SelectEntryPos( static_cast< USHORT >( nUnit ) ); + maLbSizeX.SelectEntryPos( static_cast< sal_uInt16 >( nUnit ) ); if ( mbIsPixelFormat ) // TODO: (metafileresolutionsupport) should be supported for vector formats also... this makes { // sense eg for bitmap fillings in metafiles, to preserve high dpi output @@ -807,7 +807,7 @@ void ExportDialog::createSizeControls( vcl::RowOrColumn& rLayout ) sal_Int32 nResolutionUnit = mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolutionUnit" ) ), 1 ); if ( ( nResolutionUnit < 0 ) || ( nResolutionUnit > 2 ) ) nResolutionUnit = 1; - maLbResolution.SelectEntryPos( static_cast< USHORT >( nResolutionUnit ) ); + maLbResolution.SelectEntryPos( static_cast< sal_uInt16 >( nResolutionUnit ) ); } boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); @@ -1510,4 +1510,3 @@ IMPL_LINK( ExportDialog, OK, void *, EMPTYARG ) return 0; } - diff --git a/svtools/source/filter/filter.cxx b/svtools/source/filter/filter.cxx index e8f6ffddc352..78d97cc25c5c 100644 --- a/svtools/source/filter/filter.cxx +++ b/svtools/source/filter/filter.cxx @@ -136,7 +136,7 @@ public: sal_Bool ImplDirEntryHelper::Exists( const INetURLObject& rObj ) { - sal_Bool bExists = FALSE; + sal_Bool bExists = sal_False; try { @@ -189,7 +189,7 @@ void ImplDirEntryHelper::Kill( const String& rMainUrl ) //-------------------------------------------------------------------------- -BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, sal_uLong nComp, sal_uLong nSize ) +sal_uInt8* ImplSearchEntry( sal_uInt8* pSource, sal_uInt8* pDest, sal_uLong nComp, sal_uLong nSize ) { while ( nComp-- >= nSize ) { @@ -226,9 +226,9 @@ inline String ImpGetExtension( const String &rPath ) |* Eingabe-prarameter: |* rPath - Dateipfad |* rFormatExtension - Inhalt egal -|* bTest - setze FALSE +|* bTest - setze sal_False |* Ausgabe-parameter: -|* Funkionswert - TRUE wenn Erfolg +|* Funkionswert - sal_True wenn Erfolg |* rFormatExtension - Bei Erfolg: uebliche Dateiendung |* des Formats (Grossbuchstaben) |* 2.) Datei anlesen, Dateiformat ueberpruefen @@ -236,11 +236,11 @@ inline String ImpGetExtension( const String &rPath ) |* rPath - Dateipfad |* rFormatExtension - uebliche Dateiendung des Formats |* (Grossbuchstaben) -|* bTest - setze TRUE +|* bTest - setze sal_True |* Ausgabe-parameter: -|* Funkionswert - FALSE, wenn die Datei bestimmt nicht +|* Funkionswert - sal_False, wenn die Datei bestimmt nicht |* vom uebgebenen Format ist. -|* TRUE, wenn die Datei WAHRSCHEINLICH von +|* sal_True, wenn die Datei WAHRSCHEINLICH von |* dem Format ist, ODER WENN DAS FORMAT |* DIESER FUNKTION NICHT BEKANNT IST! |* @@ -249,22 +249,22 @@ inline String ImpGetExtension( const String &rPath ) |* *************************************************************************/ -static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, BOOL bTest ) +static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, sal_Bool bTest ) { sal_uInt16 i; - BYTE sFirstBytes[ 256 ]; + sal_uInt8 sFirstBytes[ 256 ]; sal_uLong nFirstLong,nSecondLong; sal_uLong nStreamPos = rStream.Tell(); rStream.Seek( STREAM_SEEK_TO_END ); - ULONG nStreamLen = rStream.Tell() - nStreamPos; + sal_uLong nStreamLen = rStream.Tell() - nStreamPos; rStream.Seek( nStreamPos ); if ( !nStreamLen ) { SvLockBytes* pLockBytes = rStream.GetLockBytes(); if ( pLockBytes ) - pLockBytes->SetSynchronMode( TRUE ); + pLockBytes->SetSynchronMode( sal_True ); rStream.Seek( STREAM_SEEK_TO_END ); nStreamLen = rStream.Tell() - nStreamPos; @@ -282,20 +282,20 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio } if( rStream.GetError() ) - return FALSE; + return sal_False; // Die ersten 8 Bytes in nFirstLong, nSecondLong unterbringen, // Big-Endian: for( i = 0, nFirstLong = 0L, nSecondLong = 0L; i < 4; i++ ) { - nFirstLong=(nFirstLong<<8)|(ULONG)sFirstBytes[i]; - nSecondLong=(nSecondLong<<8)|(ULONG)sFirstBytes[i+4]; + nFirstLong=(nFirstLong<<8)|(sal_uLong)sFirstBytes[i]; + nSecondLong=(nSecondLong<<8)|(sal_uLong)sFirstBytes[i+4]; } - // Folgende Variable ist nur bei bTest==TRUE interessant. Sie - // bleibt FALSE, wenn das Format (rFormatExtension) hier noch nicht + // Folgende Variable ist nur bei bTest==sal_True interessant. Sie + // bleibt sal_False, wenn das Format (rFormatExtension) hier noch nicht // einprogrammiert wurde. - sal_Bool bSomethingTested = FALSE; + sal_Bool bSomethingTested = sal_False; // Nun werden die verschieden Formate ueberprueft. Dabei ist die // Reihenfolge nicht egal. Z.b. koennte eine MET-Datei auch durch @@ -304,7 +304,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio // Theoretisch waere aber vielleicht auch eine BMP-Datei denkbar, // die durch den MET-Test geht. // Diese Probleme gibt es natuerlich nicht nur bei MET und BMP. - // Deshalb wird im Falle der Uberpruefung eines Formats (bTest==TRUE) + // Deshalb wird im Falle der Uberpruefung eines Formats (bTest==sal_True) // nur genau dieses eine Format getestet. Alles andere koennte fatale // Folgen haben, z.B. wenn der Benutzer sagt, es sei BMP-Datei (und es // ist BMP-Datei), und hier wuerde die Datei durch den MET-Test gehen... @@ -312,26 +312,26 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio //--------------------------- MET ------------------------------------ if( !bTest || ( rFormatExtension.CompareToAscii( "MET", 3 ) == COMPARE_EQUAL ) ) { - bSomethingTested=TRUE; + bSomethingTested=sal_True; if( sFirstBytes[2] == 0xd3 ) { rStream.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); rStream.Seek( nStreamPos ); sal_uInt16 nFieldSize; - BYTE nMagic; - sal_Bool bOK=TRUE; + sal_uInt8 nMagic; + sal_Bool bOK=sal_True; rStream >> nFieldSize >> nMagic; for (i=0; i<3; i++) { - if (nFieldSize<6) { bOK=FALSE; break; } - if (nStreamLen < rStream.Tell() + nFieldSize ) { bOK=FALSE; break; } + if (nFieldSize<6) { bOK=sal_False; break; } + if (nStreamLen < rStream.Tell() + nFieldSize ) { bOK=sal_False; break; } rStream.SeekRel(nFieldSize-3); rStream >> nFieldSize >> nMagic; - if (nMagic!=0xd3) { bOK=FALSE; break; } + if (nMagic!=0xd3) { bOK=sal_False; break; } } rStream.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); if (bOK && !rStream.GetError()) { rFormatExtension= UniString::CreateFromAscii( "MET", 3 ); - return TRUE; + return sal_True; } } } @@ -339,9 +339,9 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio //--------------------------- BMP ------------------------------------ if( !bTest || ( rFormatExtension.CompareToAscii( "BMP", 3 ) == COMPARE_EQUAL ) ) { - BYTE nOffs; + sal_uInt8 nOffs; - bSomethingTested=TRUE; + bSomethingTested=sal_True; // OS/2-Bitmaparray ('BA') koennen wir evtl. auch lesen, // dementspr. muessen wir den Offset anpassen, @@ -365,7 +365,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio sFirstBytes[14+nOffs] == 0x0c ) { rFormatExtension = UniString::CreateFromAscii( "BMP", 3 ); - return TRUE; + return sal_True; } } } @@ -376,33 +376,33 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio ( rFormatExtension.CompareToAscii( "WMF", 3 ) == COMPARE_EQUAL ) || ( rFormatExtension.CompareToAscii( "EMF", 3 ) == COMPARE_EQUAL ) ) { - bSomethingTested = TRUE; + bSomethingTested = sal_True; if ( nFirstLong==0xd7cdc69a || nFirstLong==0x01000900 ) { rFormatExtension = UniString::CreateFromAscii( "WMF", 3 ); - return TRUE; + return sal_True; } else if( nFirstLong == 0x01000000 && sFirstBytes[ 40 ] == 0x20 && sFirstBytes[ 41 ] == 0x45 && sFirstBytes[ 42 ] == 0x4d && sFirstBytes[ 43 ] == 0x46 ) { rFormatExtension = UniString::CreateFromAscii( "EMF", 3 ); - return TRUE; + return sal_True; } } //--------------------------- PCX ------------------------------------ if( !bTest || ( rFormatExtension.CompareToAscii( "PCX", 3 ) == COMPARE_EQUAL ) ) { - bSomethingTested=TRUE; + bSomethingTested=sal_True; if (sFirstBytes[0]==0x0a) { - BYTE nVersion=sFirstBytes[1]; - BYTE nEncoding=sFirstBytes[2]; + sal_uInt8 nVersion=sFirstBytes[1]; + sal_uInt8 nEncoding=sFirstBytes[2]; if( ( nVersion==0 || nVersion==2 || nVersion==3 || nVersion==5 ) && nEncoding<=1 ) { rFormatExtension = UniString::CreateFromAscii( "PCX", 3 ); - return TRUE; + return sal_True; } } } @@ -410,69 +410,69 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio //--------------------------- TIF ------------------------------------ if( !bTest || ( rFormatExtension.CompareToAscii( "TIF", 3 ) == COMPARE_EQUAL ) ) { - bSomethingTested=TRUE; + bSomethingTested=sal_True; if ( nFirstLong==0x49492a00 || nFirstLong==0x4d4d002a ) { rFormatExtension=UniString::CreateFromAscii( "TIF", 3 ); - return TRUE; + return sal_True; } } //--------------------------- GIF ------------------------------------ if( !bTest || ( rFormatExtension.CompareToAscii( "GIF", 3 ) == COMPARE_EQUAL ) ) { - bSomethingTested=TRUE; + bSomethingTested=sal_True; if ( nFirstLong==0x47494638 && (sFirstBytes[4]==0x37 || sFirstBytes[4]==0x39) && sFirstBytes[5]==0x61 ) { rFormatExtension = UniString::CreateFromAscii( "GIF", 3 ); - return TRUE; + return sal_True; } } //--------------------------- PNG ------------------------------------ if( !bTest || ( rFormatExtension.CompareToAscii( "PNG", 3 ) == COMPARE_EQUAL ) ) { - bSomethingTested=TRUE; + bSomethingTested=sal_True; if (nFirstLong==0x89504e47 && nSecondLong==0x0d0a1a0a) { rFormatExtension = UniString::CreateFromAscii( "PNG", 3 ); - return TRUE; + return sal_True; } } //--------------------------- JPG ------------------------------------ if( !bTest || ( rFormatExtension.CompareToAscii( "JPG", 3 ) == COMPARE_EQUAL ) ) { - bSomethingTested=TRUE; + bSomethingTested=sal_True; if ( ( nFirstLong==0xffd8ffe0 && sFirstBytes[6]==0x4a && sFirstBytes[7]==0x46 && sFirstBytes[8]==0x49 && sFirstBytes[9]==0x46 ) || ( nFirstLong==0xffd8fffe ) || ( 0xffd8ff00 == ( nFirstLong & 0xffffff00 ) ) ) { rFormatExtension = UniString::CreateFromAscii( "JPG", 3 ); - return TRUE; + return sal_True; } } //--------------------------- SVM ------------------------------------ if( !bTest || ( rFormatExtension.CompareToAscii( "SVM", 3 ) == COMPARE_EQUAL ) ) { - bSomethingTested=TRUE; + bSomethingTested=sal_True; if( nFirstLong==0x53564744 && sFirstBytes[4]==0x49 ) { rFormatExtension = UniString::CreateFromAscii( "SVM", 3 ); - return TRUE; + return sal_True; } else if( sFirstBytes[0]==0x56 && sFirstBytes[1]==0x43 && sFirstBytes[2]==0x4C && sFirstBytes[3]==0x4D && sFirstBytes[4]==0x54 && sFirstBytes[5]==0x46 ) { rFormatExtension = UniString::CreateFromAscii( "SVM", 3 ); - return TRUE; + return sal_True; } } //--------------------------- PCD ------------------------------------ if( !bTest || ( rFormatExtension.CompareToAscii( "PCD", 3 ) == COMPARE_EQUAL ) ) { - bSomethingTested = TRUE; + bSomethingTested = sal_True; if( nStreamLen >= 2055 ) { char sBuf[8]; @@ -482,7 +482,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio if( strncmp( sBuf, "PCD_IPI", 7 ) == 0 ) { rFormatExtension = UniString::CreateFromAscii( "PCD", 3 ); - return TRUE; + return sal_True; } } } @@ -490,30 +490,30 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio //--------------------------- PSD ------------------------------------ if( !bTest || ( rFormatExtension.CompareToAscii( "PSD", 3 ) == COMPARE_EQUAL ) ) { - bSomethingTested = TRUE; + bSomethingTested = sal_True; if ( ( nFirstLong == 0x38425053 ) && ( (nSecondLong >> 16 ) == 1 ) ) { rFormatExtension = UniString::CreateFromAscii( "PSD", 3 ); - return TRUE; + return sal_True; } } //--------------------------- EPS ------------------------------------ if( !bTest || ( rFormatExtension.CompareToAscii( "EPS", 3 ) == COMPARE_EQUAL ) ) { - bSomethingTested = TRUE; - if ( ( nFirstLong == 0xC5D0D3C6 ) || ( ImplSearchEntry( sFirstBytes, (BYTE*)"%!PS-Adobe", 10, 10 ) && - ImplSearchEntry( &sFirstBytes[15], (BYTE*)"EPS", 3, 3 ) ) ) + bSomethingTested = sal_True; + if ( ( nFirstLong == 0xC5D0D3C6 ) || ( ImplSearchEntry( sFirstBytes, (sal_uInt8*)"%!PS-Adobe", 10, 10 ) && + ImplSearchEntry( &sFirstBytes[15], (sal_uInt8*)"EPS", 3, 3 ) ) ) { rFormatExtension = UniString::CreateFromAscii( "EPS", 3 ); - return TRUE; + return sal_True; } } //--------------------------- DXF ------------------------------------ if( !bTest || ( rFormatExtension.CompareToAscii( "DXF", 3 ) == COMPARE_EQUAL ) ) { - bSomethingTested=TRUE; + bSomethingTested=sal_True; i=0; while (i<256 && sFirstBytes[i]<=32) @@ -534,22 +534,22 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio if (strncmp((char*)(sFirstBytes+i),"SECTION",7)==0) { rFormatExtension = UniString::CreateFromAscii( "DXF", 3 ); - return TRUE; + return sal_True; } } if( strncmp( (char*) sFirstBytes, "AutoCAD Binary DXF", 18 ) == 0 ) { rFormatExtension = UniString::CreateFromAscii( "DXF", 3 ); - return TRUE; + return sal_True; } } //--------------------------- PCT ------------------------------------ if( !bTest || ( rFormatExtension.CompareToAscii( "PCT", 3 ) == COMPARE_EQUAL ) ) { - bSomethingTested = TRUE; - BYTE sBuf[3]; + bSomethingTested = sal_True; + sal_uInt8 sBuf[3]; // store number format sal_uInt16 oldNumberFormat = rStream.GetNumberFormatInt(); sal_uInt32 nOffset; // in ms documents the pict format is used without the first 512 bytes @@ -578,19 +578,19 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio if ( sBuf[ 0 ] == 0x00 && sBuf[ 1 ] == 0x11 && sBuf[ 2 ] == 0x02) { rFormatExtension = UniString::CreateFromAscii( "PCT", 3 ); - return TRUE; + return sal_True; } // normal version 1 - page A25 else if (sBuf[ 0 ] == 0x11 && sBuf[ 1 ] == 0x01 && bdBoxOk) { rFormatExtension = UniString::CreateFromAscii( "PCT", 3 ); - return TRUE; + return sal_True; } // previous code kept in order to do not break any compatibility // probably eroneous else if ( sBuf[ 0 ] == 0x00 && sBuf[ 1 ] == 0x11 && sBuf[ 2 ] == 0x01 && bdBoxOk) { rFormatExtension = UniString::CreateFromAscii( "PCT", 3 ); - return TRUE; + return sal_True; } } } @@ -601,7 +601,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio ( rFormatExtension.CompareToAscii( "PGM", 3 ) == COMPARE_EQUAL ) || ( rFormatExtension.CompareToAscii( "PPM", 3 ) == COMPARE_EQUAL ) ) { - bSomethingTested=TRUE; + bSomethingTested=sal_True; if ( sFirstBytes[ 0 ] == 'P' ) { switch( sFirstBytes[ 1 ] ) @@ -609,17 +609,17 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio case '1' : case '4' : rFormatExtension = UniString::CreateFromAscii( "PBM", 3 ); - return TRUE; + return sal_True; case '2' : case '5' : rFormatExtension = UniString::CreateFromAscii( "PGM", 3 ); - return TRUE; + return sal_True; case '3' : case '6' : rFormatExtension = UniString::CreateFromAscii( "PPM", 3 ); - return TRUE; + return sal_True; } } } @@ -627,95 +627,95 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio //--------------------------- RAS( SUN RasterFile )------------------ if( !bTest || ( rFormatExtension.CompareToAscii( "RAS", 3 ) == COMPARE_EQUAL ) ) { - bSomethingTested=TRUE; + bSomethingTested=sal_True; if( nFirstLong == 0x59a66a95 ) { rFormatExtension = UniString::CreateFromAscii( "RAS", 3 ); - return TRUE; + return sal_True; } } //--------------------------- XPM ------------------------------------ if( !bTest ) { - bSomethingTested = TRUE; - if( ImplSearchEntry( sFirstBytes, (BYTE*)"/* XPM */", 256, 9 ) ) + bSomethingTested = sal_True; + if( ImplSearchEntry( sFirstBytes, (sal_uInt8*)"/* XPM */", 256, 9 ) ) { rFormatExtension = UniString::CreateFromAscii( "XPM", 3 ); - return TRUE; + return sal_True; } } else if( rFormatExtension.CompareToAscii( "XPM", 3 ) == COMPARE_EQUAL ) { - bSomethingTested = TRUE; - return TRUE; + bSomethingTested = sal_True; + return sal_True; } //--------------------------- XBM ------------------------------------ if( !bTest ) { sal_uLong nSize = ( nStreamLen > 2048 ) ? 2048 : nStreamLen; - BYTE* pBuf = new BYTE [ nSize ]; + sal_uInt8* pBuf = new sal_uInt8 [ nSize ]; rStream.Seek( nStreamPos ); rStream.Read( pBuf, nSize ); - BYTE* pPtr = ImplSearchEntry( pBuf, (BYTE*)"#define", nSize, 7 ); + sal_uInt8* pPtr = ImplSearchEntry( pBuf, (sal_uInt8*)"#define", nSize, 7 ); if( pPtr ) { - if( ImplSearchEntry( pPtr, (BYTE*)"_width", pBuf + nSize - pPtr, 6 ) ) + if( ImplSearchEntry( pPtr, (sal_uInt8*)"_width", pBuf + nSize - pPtr, 6 ) ) { rFormatExtension = UniString::CreateFromAscii( "XBM", 3 ); delete[] pBuf; - return TRUE; + return sal_True; } } delete[] pBuf; } else if( rFormatExtension.CompareToAscii( "XBM", 3 ) == COMPARE_EQUAL ) { - bSomethingTested = TRUE; - return TRUE; + bSomethingTested = sal_True; + return sal_True; } //--------------------------- SVG ------------------------------------ if( !bTest || ( rFormatExtension.CompareToAscii( "SVG", 3 ) == COMPARE_EQUAL ) ) { - bSomethingTested=TRUE; + bSomethingTested=sal_True; // just a simple test for the extension if( rFormatExtension.CompareToAscii( "SVG", 3 ) == COMPARE_EQUAL ) - return TRUE; + return sal_True; } //--------------------------- TGA ------------------------------------ if( !bTest || ( rFormatExtension.CompareToAscii( "TGA", 3 ) == COMPARE_EQUAL ) ) { - bSomethingTested = TRUE; + bSomethingTested = sal_True; // just a simple test for the extension if( rFormatExtension.CompareToAscii( "TGA", 3 ) == COMPARE_EQUAL ) - return TRUE; + return sal_True; } //--------------------------- SGV ------------------------------------ if( !bTest || ( rFormatExtension.CompareToAscii( "SGV", 3 ) == COMPARE_EQUAL ) ) { - bSomethingTested = TRUE; + bSomethingTested = sal_True; // just a simple test for the extension if( rFormatExtension.CompareToAscii( "SGV", 3 ) == COMPARE_EQUAL ) - return TRUE; + return sal_True; } //--------------------------- SGF ------------------------------------ if( !bTest || ( rFormatExtension.CompareToAscii( "SGF", 3 ) == COMPARE_EQUAL ) ) { - bSomethingTested=TRUE; + bSomethingTested=sal_True; if( sFirstBytes[ 0 ] == 'J' && sFirstBytes[ 1 ] == 'J' ) { rFormatExtension = UniString::CreateFromAscii( "SGF", 3 ); - return TRUE; + return sal_True; } } @@ -733,7 +733,7 @@ sal_uInt16 GraphicFilter::ImpTestOrFindFormat( const String& rPath, SvStream& rS if( rFormat == GRFILTER_FORMAT_DONTKNOW ) { String aFormatExt; - if( ImpPeekGraphicFormat( rStream, aFormatExt, FALSE ) ) + if( ImpPeekGraphicFormat( rStream, aFormatExt, sal_False ) ) { for( sal_uInt16 i = 0; i < n; i++ ) { @@ -762,7 +762,7 @@ sal_uInt16 GraphicFilter::ImpTestOrFindFormat( const String& rPath, SvStream& rS else { String aTmpStr( pConfig->GetImportFormatExtension( rFormat ) ); - if( !ImpPeekGraphicFormat( rStream, aTmpStr, TRUE ) ) + if( !ImpPeekGraphicFormat( rStream, aTmpStr, sal_True ) ) return GRFILTER_FORMATERROR; if ( pConfig->GetImportFormatExtension( rFormat ).EqualsIgnoreCaseAscii( "pcd" ) ) { @@ -1391,7 +1391,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, else nStmBegin = rIStream.Tell(); - bAbort = FALSE; + bAbort = sal_False; nStatus = ImpTestOrFindFormat( rPath, rIStream, nFormat ); // Falls Pending, geben wir GRFILTER_OK zurueck, // um mehr Bytes anzufordern @@ -1678,10 +1678,10 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, if( nBufSize ) { - BYTE* pBuf=0; + sal_uInt8* pBuf=0; try { - pBuf = new BYTE[ nBufSize ]; + pBuf = new sal_uInt8[ nBufSize ]; } catch (std::bad_alloc) { @@ -1692,7 +1692,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, { rIStream.Seek( nStmBegin ); rIStream.Read( pBuf, nBufSize ); - rGraphic.SetLink( GfxLink( pBuf, nBufSize, eLinkType, TRUE ) ); + rGraphic.SetLink( GfxLink( pBuf, nBufSize, eLinkType, sal_True ) ); } } } @@ -1766,7 +1766,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& FilterConfigItem aConfigItem( (uno::Sequence< beans::PropertyValue >*)pFilterData ); String aFilterName( pConfig->GetExportFilterName( nFormat ) ); - bAbort = FALSE; + bAbort = sal_False; sal_uInt16 nStatus = GRFILTER_OK; GraphicType eType; Graphic aGraphic( rGraphic ); @@ -1916,7 +1916,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& } else if( aFilterName.EqualsIgnoreCaseAscii( EXP_JPEG ) ) { - sal_Bool bExportedGrayJPEG = sal_False; + bool bExportedGrayJPEG = false; if( !ExportJPEG( rOStm, aGraphic, pFilterData, &bExportedGrayJPEG ) ) nStatus = GRFILTER_FORMATERROR; nExpGraphHint = bExportedGrayJPEG ? GRFILTER_OUTHINT_GREY : 0; @@ -2082,7 +2082,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& sal_Bool GraphicFilter::Setup( sal_uInt16 ) { - return FALSE; + return sal_False; } /* ------------------------------------------------------------------------ diff --git a/svtools/source/filter/filter2.cxx b/svtools/source/filter/filter2.cxx index 9bf651790003..58fafc47c0f2 100644 --- a/svtools/source/filter/filter2.cxx +++ b/svtools/source/filter/filter2.cxx @@ -40,7 +40,7 @@ #define DATA_SIZE 640 -BYTE* ImplSearchEntry( BYTE* , BYTE* , sal_uLong , sal_uLong ); +sal_uInt8* ImplSearchEntry( sal_uInt8* , sal_uInt8* , sal_uLong , sal_uLong ); /************************************************************************* |* @@ -99,33 +99,33 @@ sal_Bool GraphicDescriptor::Detect( sal_Bool bExtendedInfo ) if ( pFileStm && !pFileStm->GetError() ) { SvStream& rStm = *pFileStm; - UINT16 nOldFormat = rStm.GetNumberFormatInt(); - - if ( ImpDetectGIF( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectJPG( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectBMP( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPNG( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectTIF( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPCX( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectDXF( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectMET( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectSGF( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectSGV( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectSVM( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectWMF( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectEMF( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectSVG( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPCT( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectXBM( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectXPM( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPBM( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPGM( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPPM( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectRAS( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectTGA( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPSD( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectEPS( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPCD( rStm, bExtendedInfo ) ) bRet = TRUE; + sal_uInt16 nOldFormat = rStm.GetNumberFormatInt(); + + if ( ImpDetectGIF( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectJPG( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectBMP( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectPNG( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectTIF( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectPCX( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectDXF( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectMET( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectSGF( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectSGV( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectSVM( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectWMF( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectEMF( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectSVG( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectPCT( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectXBM( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectXPM( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectPBM( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectPGM( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectPPM( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectRAS( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectTGA( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectPSD( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectEPS( rStm, bExtendedInfo ) ) bRet = sal_True; + else if ( ImpDetectPCD( rStm, bExtendedInfo ) ) bRet = sal_True; rStm.SetNumberFormatInt( nOldFormat ); } @@ -155,7 +155,7 @@ void GraphicDescriptor::ImpConstruct() sal_Bool GraphicDescriptor::ImpDetectBMP( SvStream& rStm, sal_Bool bExtendedInfo ) { - UINT16 nTemp16; + sal_uInt16 nTemp16; sal_Bool bRet = sal_False; sal_Int32 nStmPos = rStm.Tell(); @@ -173,12 +173,12 @@ sal_Bool GraphicDescriptor::ImpDetectBMP( SvStream& rStm, sal_Bool bExtendedInfo if ( nTemp16 == 0x4d42 ) { nFormat = GFF_BMP; - bRet = TRUE; + bRet = sal_True; if ( bExtendedInfo ) { - UINT32 nTemp32; - UINT32 nCompression; + sal_uInt32 nTemp32; + sal_uInt32 nCompression; // bis zur ersten Information rStm.SeekRel( 0x10 ); @@ -236,10 +236,10 @@ sal_Bool GraphicDescriptor::ImpDetectBMP( SvStream& rStm, sal_Bool bExtendedInfo sal_Bool GraphicDescriptor::ImpDetectGIF( SvStream& rStm, sal_Bool bExtendedInfo ) { - UINT32 n32; - UINT16 n16; + sal_uInt32 n32; + sal_uInt16 n16; sal_Bool bRet = sal_False; - BYTE cByte; + sal_uInt8 cByte; sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); @@ -251,11 +251,11 @@ sal_Bool GraphicDescriptor::ImpDetectGIF( SvStream& rStm, sal_Bool bExtendedInfo if ( ( n16 == 0x6137 ) || ( n16 == 0x6139 ) ) { nFormat = GFF_GIF; - bRet = TRUE; + bRet = sal_True; if ( bExtendedInfo ) { - UINT16 nTemp16; + sal_uInt16 nTemp16; // PixelBreite auslesen rStm >> nTemp16; @@ -310,7 +310,7 @@ sal_uInt8 ImpDetectJPG_GetNextMarker( SvStream& rStm ) sal_Bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, sal_Bool bExtendedInfo ) { - UINT32 nTemp32; + sal_uInt32 nTemp32; sal_Bool bRet = sal_False; sal_Int32 nStmPos = rStm.Tell(); @@ -322,7 +322,7 @@ sal_Bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, sal_Bool bExtendedInf if( 0xffd8ff00 == ( nTemp32 & 0xffffff00 ) ) { nFormat = GFF_JPG; - bRet = TRUE; + bRet = sal_True; if ( bExtendedInfo ) { @@ -481,9 +481,9 @@ sal_Bool GraphicDescriptor::ImpDetectPCD( SvStream& rStm, sal_Bool ) sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); - UINT32 nTemp32; - UINT16 nTemp16; - BYTE cByte; + sal_uInt32 nTemp32; + sal_uInt16 nTemp16; + sal_uInt8 cByte; rStm.SeekRel( 2048 ); rStm >> nTemp32; @@ -495,7 +495,7 @@ sal_Bool GraphicDescriptor::ImpDetectPCD( SvStream& rStm, sal_Bool ) ( cByte == 0x49 ) ) { nFormat = GFF_PCD; - bRet = TRUE; + bRet = sal_True; } rStm.Seek( nStmPos ); return bRet; @@ -514,10 +514,10 @@ sal_Bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, sal_Bool bExtendedInfo // we cant be shure that this special sign represent a PCX file only. // Every Ascii file is possible here :-( // We must detect the whole header. - bExtendedInfo = TRUE; + bExtendedInfo = sal_True; sal_Bool bRet = sal_False; - BYTE cByte; + sal_uInt8 cByte; sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); @@ -526,11 +526,11 @@ sal_Bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, sal_Bool bExtendedInfo if ( cByte == 0x0a ) { nFormat = GFF_PCX; - bRet = TRUE; + bRet = sal_True; if ( bExtendedInfo ) { - UINT16 nTemp16; + sal_uInt16 nTemp16; sal_uInt16 nXmin; sal_uInt16 nXmax; sal_uInt16 nYmin; @@ -599,7 +599,7 @@ sal_Bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, sal_Bool bExtendedInfo sal_Bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo ) { - UINT32 nTemp32; + sal_uInt32 nTemp32; sal_Bool bRet = sal_False; sal_Int32 nStmPos = rStm.Tell(); @@ -616,7 +616,7 @@ sal_Bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo if ( bExtendedInfo ) { - BYTE cByte; + sal_uInt8 cByte; // IHDR-Chunk rStm.SeekRel( 8 ); @@ -638,7 +638,7 @@ sal_Bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo nPlanes = 1; bCompressed = sal_True; - UINT32 nLen32; + sal_uInt32 nLen32; rStm.SeekRel( 8 ); @@ -698,8 +698,8 @@ sal_Bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo { sal_Bool bDetectOk = sal_False; sal_Bool bRet = sal_False; - BYTE cByte1; - BYTE cByte2; + sal_uInt8 cByte1; + sal_uInt8 cByte2; sal_Int32 nStmPos = rStm.Tell(); rStm >> cByte1; @@ -719,7 +719,7 @@ sal_Bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo if ( bDetectOk ) { - UINT16 nTemp16; + sal_uInt16 nTemp16; rStm >> nTemp16; if ( nTemp16 == 0x2a ) @@ -731,7 +731,7 @@ sal_Bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo { sal_uLong nCount; sal_uLong nMax = DATA_SIZE - 48; - UINT32 nTemp32; + sal_uInt32 nTemp32; sal_Bool bOk = sal_False; // Offset des ersten IFD einlesen @@ -875,7 +875,7 @@ sal_Bool GraphicDescriptor::ImpDetectPBM( SvStream& rStm, sal_Bool ) else { sal_Int32 nStmPos = rStm.Tell(); - BYTE nFirst, nSecond; + sal_uInt8 nFirst, nSecond; rStm >> nFirst >> nSecond; if ( nFirst == 'P' && ( ( nSecond == '1' ) || ( nSecond == '4' ) ) ) bRet = sal_True; @@ -902,7 +902,7 @@ sal_Bool GraphicDescriptor::ImpDetectPGM( SvStream& rStm, sal_Bool ) bRet = sal_True; else { - BYTE nFirst, nSecond; + sal_uInt8 nFirst, nSecond; sal_Int32 nStmPos = rStm.Tell(); rStm >> nFirst >> nSecond; if ( nFirst == 'P' && ( ( nSecond == '2' ) || ( nSecond == '5' ) ) ) @@ -930,7 +930,7 @@ sal_Bool GraphicDescriptor::ImpDetectPPM( SvStream& rStm, sal_Bool ) bRet = sal_True; else { - BYTE nFirst, nSecond; + sal_uInt8 nFirst, nSecond; sal_Int32 nStmPos = rStm.Tell(); rStm >> nFirst >> nSecond; if ( nFirst == 'P' && ( ( nSecond == '3' ) || ( nSecond == '6' ) ) ) @@ -952,7 +952,7 @@ sal_Bool GraphicDescriptor::ImpDetectPPM( SvStream& rStm, sal_Bool ) sal_Bool GraphicDescriptor::ImpDetectRAS( SvStream& rStm, sal_Bool ) { - UINT32 nMagicNumber; + sal_uInt32 nMagicNumber; sal_Bool bRet = sal_False; sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); @@ -991,24 +991,24 @@ sal_Bool GraphicDescriptor::ImpDetectPSD( SvStream& rStm, sal_Bool bExtendedInfo { sal_Bool bRet = sal_False; - UINT32 nMagicNumber; + sal_uInt32 nMagicNumber; sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); rStm >> nMagicNumber; if ( nMagicNumber == 0x38425053 ) { - UINT16 nVersion; + sal_uInt16 nVersion; rStm >> nVersion; if ( nVersion == 1 ) { bRet = sal_True; if ( bExtendedInfo ) { - UINT16 nChannels; - UINT32 nRows; - UINT32 nColumns; - UINT16 nDepth; - UINT16 nMode; + sal_uInt16 nChannels; + sal_uInt32 nRows; + sal_uInt32 nColumns; + sal_uInt16 nDepth; + sal_uInt16 nMode; rStm.SeekRel( 6 ); // Pad rStm >> nChannels >> nRows >> nColumns >> nDepth >> nMode; if ( ( nDepth == 1 ) || ( nDepth == 8 ) || ( nDepth == 16 ) ) @@ -1118,7 +1118,7 @@ sal_Bool GraphicDescriptor::ImpDetectPCT( SvStream& rStm, sal_Bool ) { sal_Int32 nStmPos = rStm.Tell(); - BYTE sBuf[4]; + sal_uInt8 sBuf[4]; rStm.SeekRel( 522 ); rStm.Read( sBuf, 3 ); @@ -1154,7 +1154,7 @@ sal_Bool GraphicDescriptor::ImpDetectSGF( SvStream& rStm, sal_Bool ) { sal_Int32 nStmPos = rStm.Tell(); - BYTE nFirst, nSecond; + sal_uInt8 nFirst, nSecond; rStm >> nFirst >> nSecond; @@ -1195,9 +1195,9 @@ sal_Bool GraphicDescriptor::ImpDetectSGV( SvStream&, sal_Bool ) sal_Bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo ) { - UINT32 n32; + sal_uInt32 n32; sal_Bool bRet = sal_False; - BYTE cByte; + sal_uInt8 cByte; sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); @@ -1212,8 +1212,8 @@ sal_Bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo if ( bExtendedInfo ) { - UINT32 nTemp32; - UINT16 nTemp16; + sal_uInt32 nTemp32; + sal_uInt16 nTemp16; rStm.SeekRel( 0x04 ); @@ -1240,7 +1240,7 @@ sal_Bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo if( n32 == 0x4D4C4356 ) { - UINT16 nTmp16; + sal_uInt16 nTmp16; rStm >> nTmp16; @@ -1302,7 +1302,7 @@ sal_Bool GraphicDescriptor::ImpDetectEMF( SvStream&, sal_Bool ) |* \************************************************************************/ -sal_Bool GraphicDescriptor::ImpDetectSVG( SvStream& rStm, sal_Bool bExtendedInfo ) +sal_Bool GraphicDescriptor::ImpDetectSVG( SvStream& /*rStm*/, sal_Bool /*bExtendedInfo*/ ) { sal_Bool bRet = aPathExt.CompareToAscii( "svg", 3 ) == COMPARE_EQUAL; if (bRet) diff --git a/svtools/source/filter/igif/decode.cxx b/svtools/source/filter/igif/decode.cxx index bfe77319b81a..ddea94a5555e 100644 --- a/svtools/source/filter/igif/decode.cxx +++ b/svtools/source/filter/igif/decode.cxx @@ -36,19 +36,19 @@ struct GIFLZWTableEntry { GIFLZWTableEntry* pPrev; GIFLZWTableEntry* pFirst; - BYTE nData; + sal_uInt8 nData; }; // ------------------------------------------------------------------------ -GIFLZWDecompressor::GIFLZWDecompressor( BYTE cDataSize ) : +GIFLZWDecompressor::GIFLZWDecompressor( sal_uInt8 cDataSize ) : nInputBitsBuf ( 0 ), nOutBufDataLen ( 0 ), nInputBitsBufSize ( 0 ), - bEOIFound ( FALSE ), + bEOIFound ( sal_False ), nDataSize ( cDataSize ) { - pOutBuf = new BYTE[ 4096 ]; + pOutBuf = new sal_uInt8[ 4096 ]; nClearCode = 1 << nDataSize; nEOICode = nClearCode + 1; @@ -59,11 +59,11 @@ GIFLZWDecompressor::GIFLZWDecompressor( BYTE cDataSize ) : pTable = new GIFLZWTableEntry[ 4098 ]; - for( USHORT i = 0; i < nTableSize; i++ ) + for( sal_uInt16 i = 0; i < nTableSize; i++ ) { pTable[i].pPrev = NULL; pTable[i].pFirst = pTable + i; - pTable[i].nData = (BYTE) i; + pTable[i].nData = (sal_uInt8) i; } } @@ -77,11 +77,11 @@ GIFLZWDecompressor::~GIFLZWDecompressor() // ------------------------------------------------------------------------ -HPBYTE GIFLZWDecompressor::DecompressBlock( HPBYTE pSrc, BYTE cBufSize, - ULONG& rCount, BOOL& rEOI ) +HPBYTE GIFLZWDecompressor::DecompressBlock( HPBYTE pSrc, sal_uInt8 cBufSize, + sal_uLong& rCount, sal_Bool& rEOI ) { - ULONG nTargetSize = 4096; - ULONG nCount = 0; + sal_uLong nTargetSize = 4096; + sal_uLong nCount = 0; HPBYTE pTarget = (HPBYTE) rtl_allocateMemory( nTargetSize ); HPBYTE pTmpTarget = pTarget; @@ -95,8 +95,8 @@ HPBYTE GIFLZWDecompressor::DecompressBlock( HPBYTE pSrc, BYTE cBufSize, if( nCount > nTargetSize ) { - ULONG nNewSize = nTargetSize << 1; - ULONG nOffset = pTmpTarget - pTarget; + sal_uLong nNewSize = nTargetSize << 1; + sal_uLong nOffset = pTmpTarget - pTarget; HPBYTE pTmp = (HPBYTE) rtl_allocateMemory( nNewSize ); memcpy( pTmp, pTarget, nTargetSize ); @@ -123,7 +123,7 @@ HPBYTE GIFLZWDecompressor::DecompressBlock( HPBYTE pSrc, BYTE cBufSize, // ------------------------------------------------------------------------ -void GIFLZWDecompressor::AddToTable( USHORT nPrevCode, USHORT nCodeFirstData ) +void GIFLZWDecompressor::AddToTable( sal_uInt16 nPrevCode, sal_uInt16 nCodeFirstData ) { GIFLZWTableEntry* pE; @@ -135,37 +135,37 @@ void GIFLZWDecompressor::AddToTable( USHORT nPrevCode, USHORT nCodeFirstData ) pE->nData = pTable[ nCodeFirstData ].pFirst->nData; nTableSize++; - if ( ( nTableSize == (USHORT) (1 << nCodeSize) ) && ( nTableSize < 4096 ) ) + if ( ( nTableSize == (sal_uInt16) (1 << nCodeSize) ) && ( nTableSize < 4096 ) ) nCodeSize++; } } // ------------------------------------------------------------------------ -BOOL GIFLZWDecompressor::ProcessOneCode() +sal_Bool GIFLZWDecompressor::ProcessOneCode() { GIFLZWTableEntry* pE; - USHORT nCode; - BOOL bRet = FALSE; - BOOL bEndOfBlock = FALSE; + sal_uInt16 nCode; + sal_Bool bRet = sal_False; + sal_Bool bEndOfBlock = sal_False; while( nInputBitsBufSize < nCodeSize ) { if( nBlockBufPos >= nBlockBufSize ) { - bEndOfBlock = TRUE; + bEndOfBlock = sal_True; break; } - nInputBitsBuf |= ( (ULONG) pBlockBuf[ nBlockBufPos++ ] ) << nInputBitsBufSize; + nInputBitsBuf |= ( (sal_uLong) pBlockBuf[ nBlockBufPos++ ] ) << nInputBitsBufSize; nInputBitsBufSize += 8; } if ( !bEndOfBlock ) { // Einen Code aus dem Eingabe-Buffer holen: - nCode = sal::static_int_cast< USHORT >( - ( (USHORT) nInputBitsBuf ) & ( ~( 0xffff << nCodeSize ) )); + nCode = sal::static_int_cast< sal_uInt16 >( + ( (sal_uInt16) nInputBitsBuf ) & ( ~( 0xffff << nCodeSize ) )); nInputBitsBuf >>= nCodeSize; nInputBitsBufSize = nInputBitsBufSize - nCodeSize; @@ -191,9 +191,9 @@ BOOL GIFLZWDecompressor::ProcessOneCode() nOutBufDataLen = 0; } else - bEOIFound = TRUE; + bEOIFound = sal_True; - return TRUE; + return sal_True; } nOldCode = nCode; @@ -208,7 +208,7 @@ BOOL GIFLZWDecompressor::ProcessOneCode() } while( pE ); - bRet = TRUE; + bRet = sal_True; } return bRet; diff --git a/svtools/source/filter/igif/decode.hxx b/svtools/source/filter/igif/decode.hxx index 3c6a61e7508d..e85cc30eaf9e 100644 --- a/svtools/source/filter/igif/decode.hxx +++ b/svtools/source/filter/igif/decode.hxx @@ -40,29 +40,29 @@ class GIFLZWDecompressor HPBYTE pOutBuf; HPBYTE pOutBufData; HPBYTE pBlockBuf; - ULONG nInputBitsBuf; - USHORT nTableSize; - USHORT nClearCode; - USHORT nEOICode; - USHORT nCodeSize; - USHORT nOldCode; - USHORT nOutBufDataLen; - USHORT nInputBitsBufSize; - BOOL bEOIFound; - BYTE nDataSize; - BYTE nBlockBufSize; - BYTE nBlockBufPos; + sal_uLong nInputBitsBuf; + sal_uInt16 nTableSize; + sal_uInt16 nClearCode; + sal_uInt16 nEOICode; + sal_uInt16 nCodeSize; + sal_uInt16 nOldCode; + sal_uInt16 nOutBufDataLen; + sal_uInt16 nInputBitsBufSize; + sal_Bool bEOIFound; + sal_uInt8 nDataSize; + sal_uInt8 nBlockBufSize; + sal_uInt8 nBlockBufPos; - void AddToTable(USHORT nPrevCode, USHORT nCodeFirstData); - BOOL ProcessOneCode(); + void AddToTable(sal_uInt16 nPrevCode, sal_uInt16 nCodeFirstData); + sal_Bool ProcessOneCode(); public: - GIFLZWDecompressor( BYTE cDataSize ); + GIFLZWDecompressor( sal_uInt8 cDataSize ); ~GIFLZWDecompressor(); - HPBYTE DecompressBlock( HPBYTE pSrc, BYTE cBufSize, ULONG& rCount, BOOL& rEOI ); + HPBYTE DecompressBlock( HPBYTE pSrc, sal_uInt8 cBufSize, sal_uLong& rCount, sal_Bool& rEOI ); }; #endif diff --git a/svtools/source/filter/igif/gifread.cxx b/svtools/source/filter/igif/gifread.cxx index e4020c727ff4..16318e5b143e 100644 --- a/svtools/source/filter/igif/gifread.cxx +++ b/svtools/source/filter/igif/gifread.cxx @@ -54,11 +54,11 @@ GIFReader::GIFReader( SvStream& rStm ) : nLogHeight100 ( 0UL ), nLoops ( 1 ), eActAction ( GLOBAL_HEADER_READING ), - bGCTransparent ( FALSE ), - bImGraphicReady ( FALSE ) + bGCTransparent ( sal_False ), + bImGraphicReady ( sal_False ) { maUpperName = UniString::CreateFromAscii( "SVIGIF", 6 ); - pSrcBuf = new BYTE[ 256 ]; + pSrcBuf = new sal_uInt8[ 256 ]; ClearImageExtensions(); } @@ -82,14 +82,14 @@ GIFReader::~GIFReader() void GIFReader::ClearImageExtensions() { nGCDisposalMethod = 0; - bGCTransparent = FALSE; + bGCTransparent = sal_False; nTimer = 0; } // ------------------------------------------------------------------------ -BOOL GIFReader::CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal, - BOOL bWatchForBackgroundColor ) +sal_Bool GIFReader::CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal, + sal_Bool bWatchForBackgroundColor ) { const Size aSize( nWidth, nHeight ); @@ -106,11 +106,11 @@ BOOL GIFReader::CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal, if( pAcc1 ) { - cTransIndex1 = (BYTE) pAcc1->GetBestPaletteIndex( aWhite ); + cTransIndex1 = (sal_uInt8) pAcc1->GetBestPaletteIndex( aWhite ); cNonTransIndex1 = cTransIndex1 ? 0 : 1; } else - bStatus = FALSE; + bStatus = sal_False; } if( bStatus ) @@ -131,12 +131,12 @@ BOOL GIFReader::CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal, // ------------------------------------------------------------------------ -BOOL GIFReader::ReadGlobalHeader() +sal_Bool GIFReader::ReadGlobalHeader() { char pBuf[ 7 ]; - BYTE nRF; - BYTE nAspect; - BOOL bRet = FALSE; + sal_uInt8 nRF; + sal_uInt8 nAspect; + sal_Bool bRet = sal_False; rIStm.Read( pBuf, 6 ); if( NO_PENDING( rIStm ) ) @@ -149,14 +149,14 @@ BOOL GIFReader::ReadGlobalHeader() { SvMemoryStream aMemStm; - aMemStm.SetBuffer( pBuf, 7, FALSE, 7 ); + aMemStm.SetBuffer( pBuf, 7, sal_False, 7 ); aMemStm >> nGlobalWidth; aMemStm >> nGlobalHeight; aMemStm >> nRF; aMemStm >> nBackgroundColor; aMemStm >> nAspect; - bGlobalPalette = (BOOL) ( nRF & 0x80 ); + bGlobalPalette = (sal_Bool) ( nRF & 0x80 ); if( bGlobalPalette ) ReadPaletteEntries( &aGPalette, 1 << ( ( nRF & 7 ) + 1 ) ); @@ -164,11 +164,11 @@ BOOL GIFReader::ReadGlobalHeader() nBackgroundColor = 0; if( NO_PENDING( rIStm ) ) - bRet = TRUE; + bRet = sal_True; } } else - bStatus = FALSE; + bStatus = sal_False; } return bRet; @@ -176,19 +176,19 @@ BOOL GIFReader::ReadGlobalHeader() // ------------------------------------------------------------------------ -void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, ULONG nCount ) +void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, sal_uLong nCount ) { - const ULONG nLen = 3UL * nCount; - BYTE* pBuf = new BYTE[ nLen ]; + const sal_uLong nLen = 3UL * nCount; + sal_uInt8* pBuf = new sal_uInt8[ nLen ]; rIStm.Read( pBuf, nLen ); if( NO_PENDING( rIStm ) ) { - BYTE* pTmp = pBuf; + sal_uInt8* pTmp = pBuf; - for( ULONG i = 0UL; i < nCount; ) + for( sal_uLong i = 0UL; i < nCount; ) { - BitmapColor& rColor = (*pPal)[ (USHORT) i++ ]; + BitmapColor& rColor = (*pPal)[ (sal_uInt16) i++ ]; rColor.SetRed( *pTmp++ ); rColor.SetGreen( *pTmp++ ); @@ -210,13 +210,13 @@ void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, ULONG nCount ) // ------------------------------------------------------------------------ -BOOL GIFReader::ReadExtension() +sal_Bool GIFReader::ReadExtension() { - BYTE cFunction; - BYTE cSize; - BYTE cByte; - BOOL bRet = FALSE; - BOOL bOverreadDataBlocks = FALSE; + sal_uInt8 cFunction; + sal_uInt8 cSize; + sal_uInt8 cByte; + sal_Bool bRet = sal_False; + sal_Bool bOverreadDataBlocks = sal_False; // Extension-Label rIStm >> cFunction; @@ -230,7 +230,7 @@ BOOL GIFReader::ReadExtension() // 'Graphic Control Extension' case( 0xf9 ) : { - BYTE cFlags; + sal_uInt8 cFlags; rIStm >> cFlags; rIStm >> nTimer; @@ -240,9 +240,9 @@ BOOL GIFReader::ReadExtension() if ( NO_PENDING( rIStm ) ) { nGCDisposalMethod = ( cFlags >> 2) & 7; - bGCTransparent = ( cFlags & 1 ) ? TRUE : FALSE; + bGCTransparent = ( cFlags & 1 ) ? sal_True : sal_False; bStatus = ( cSize == 4 ) && ( cByte == 0 ); - bRet = TRUE; + bRet = sal_True; } } break; @@ -253,7 +253,7 @@ BOOL GIFReader::ReadExtension() if ( NO_PENDING( rIStm ) ) { // default diese Extension ueberlesen - bOverreadDataBlocks = TRUE; + bOverreadDataBlocks = sal_True; // Appl.-Extension hat Laenge 11 if ( cSize == 0x0b ) @@ -276,12 +276,12 @@ BOOL GIFReader::ReadExtension() rIStm >> cByte; nLoops = cByte; rIStm >> cByte; - nLoops |= ( (USHORT) cByte << 8 ); + nLoops |= ( (sal_uInt16) cByte << 8 ); rIStm >> cByte; bStatus = ( cByte == 0 ); bRet = NO_PENDING( rIStm ); - bOverreadDataBlocks = FALSE; + bOverreadDataBlocks = sal_False; // Netscape interpretiert den LoopCount // als reine Anzahl der _Wiederholungen_; @@ -304,7 +304,7 @@ BOOL GIFReader::ReadExtension() rIStm >> cByte; bStatus = ( cByte == 0 ); bRet = NO_PENDING( rIStm ); - bOverreadDataBlocks = FALSE; + bOverreadDataBlocks = sal_False; } else rIStm.SeekRel( -1 ); @@ -317,25 +317,25 @@ BOOL GIFReader::ReadExtension() // alles andere ueberlesen default: - bOverreadDataBlocks = TRUE; + bOverreadDataBlocks = sal_True; break; } // Sub-Blocks ueberlesen if ( bOverreadDataBlocks ) { - bRet = TRUE; + bRet = sal_True; while( cSize && bStatus && !rIStm.IsEof() ) { - USHORT nCount = (USHORT) cSize + 1; + sal_uInt16 nCount = (sal_uInt16) cSize + 1; char* pBuffer = new char[ nCount ]; - bRet = FALSE; + bRet = sal_False; rIStm.Read( pBuffer, nCount ); if( NO_PENDING( rIStm ) ) { - cSize = (BYTE) pBuffer[ cSize ]; - bRet = TRUE; + cSize = (sal_uInt8) pBuffer[ cSize ]; + bRet = sal_True; } else cSize = 0; @@ -350,19 +350,19 @@ BOOL GIFReader::ReadExtension() // ------------------------------------------------------------------------ -BOOL GIFReader::ReadLocalHeader() +sal_Bool GIFReader::ReadLocalHeader() { - BYTE pBuf[ 9 ]; - BOOL bRet = FALSE; + sal_uInt8 pBuf[ 9 ]; + sal_Bool bRet = sal_False; rIStm.Read( pBuf, 9 ); if( NO_PENDING( rIStm ) ) { SvMemoryStream aMemStm; BitmapPalette* pPal; - BYTE nFlags; + sal_uInt8 nFlags; - aMemStm.SetBuffer( (char*) pBuf, 9, FALSE, 9 ); + aMemStm.SetBuffer( (char*) pBuf, 9, sal_False, 9 ); aMemStm >> nImagePosX; aMemStm >> nImagePosY; aMemStm >> nImageWidth; @@ -390,7 +390,7 @@ BOOL GIFReader::ReadLocalHeader() if( NO_PENDING( rIStm ) ) { CreateBitmaps( nImageWidth, nImageHeight, pPal, bGlobalPalette && ( pPal == &aGPalette ) ); - bRet = TRUE; + bRet = sal_True; } } @@ -399,11 +399,11 @@ BOOL GIFReader::ReadLocalHeader() // ------------------------------------------------------------------------ -ULONG GIFReader::ReadNextBlock() +sal_uLong GIFReader::ReadNextBlock() { - ULONG nRet = 0UL; - ULONG nRead; - BYTE cBlockSize; + sal_uLong nRet = 0UL; + sal_uLong nRead; + sal_uInt8 cBlockSize; rIStm >> cBlockSize; @@ -423,7 +423,7 @@ ULONG GIFReader::ReadNextBlock() nRet = 3UL; else { - BOOL bEOI; + sal_Bool bEOI; HPBYTE pTarget = pDecomp->DecompressBlock( pSrcBuf, cBlockSize, nRead, bEOI ); nRet = ( bEOI ? 3 : 1 ); @@ -442,9 +442,9 @@ ULONG GIFReader::ReadNextBlock() // ------------------------------------------------------------------------ -void GIFReader::FillImages( HPBYTE pBytes, ULONG nCount ) +void GIFReader::FillImages( HPBYTE pBytes, sal_uLong nCount ) { - for( ULONG i = 0UL; i < nCount; i++ ) + for( sal_uLong i = 0UL; i < nCount; i++ ) { if( nImageX >= nImageWidth ) { @@ -463,9 +463,9 @@ void GIFReader::FillImages( HPBYTE pBytes, ULONG nCount ) if( ( nMinY > nLastImageY ) && ( nLastImageY < ( nImageHeight - 1 ) ) ) { HPBYTE pScanline8 = pAcc8->GetScanline( nYAcc ); - ULONG nSize8 = pAcc8->GetScanlineSize(); + sal_uLong nSize8 = pAcc8->GetScanlineSize(); HPBYTE pScanline1 = 0; - ULONG nSize1 = 0; + sal_uLong nSize1 = 0; if( bGCTransparent ) { @@ -507,7 +507,7 @@ void GIFReader::FillImages( HPBYTE pBytes, ULONG nCount ) } } - nLastImageY = (USHORT) nT1; + nLastImageY = (sal_uInt16) nT1; nYAcc = nT1; } else @@ -522,7 +522,7 @@ void GIFReader::FillImages( HPBYTE pBytes, ULONG nCount ) if( nImageY < nImageHeight ) { - const BYTE cTmp = pBytes[ i ]; + const sal_uInt8 cTmp = pBytes[ i ]; if( bGCTransparent ) { @@ -539,7 +539,7 @@ void GIFReader::FillImages( HPBYTE pBytes, ULONG nCount ) } else { - bOverreadBlock = TRUE; + bOverreadBlock = sal_True; break; } } @@ -566,7 +566,7 @@ void GIFReader::CreateNewBitmaps() aAnimBmp.aPosPix = Point( nImagePosX, nImagePosY ); aAnimBmp.aSizePix = Size( nImageWidth, nImageHeight ); aAnimBmp.nWait = ( nTimer != 65535 ) ? nTimer : ANIMATION_TIMEOUT_ON_CLICK; - aAnimBmp.bUserInput = FALSE; + aAnimBmp.bUserInput = sal_False; if( nGCDisposalMethod == 2 ) aAnimBmp.eDisposal = DISPOSE_BACK; @@ -617,10 +617,10 @@ const Graphic& GIFReader::GetIntermediateGraphic() // ------------------------------------------------------------------------ -BOOL GIFReader::ProcessGIF() +sal_Bool GIFReader::ProcessGIF() { - BOOL bRead = FALSE; - BOOL bEnd = FALSE; + sal_Bool bRead = sal_False; + sal_Bool bEnd = sal_False; if ( !bStatus ) eActAction = ABORT_READING; @@ -633,7 +633,7 @@ BOOL GIFReader::ProcessGIF() // naechsten Marker lesen case( MARKER_READING ): { - BYTE cByte; + sal_uInt8 cByte; rIStm >> cByte; @@ -641,7 +641,7 @@ BOOL GIFReader::ProcessGIF() eActAction = END_READING; else if( NO_PENDING( rIStm ) ) { - bRead = TRUE; + bRead = sal_True; if( cByte == '!' ) eActAction = EXTENSION_READING; @@ -658,7 +658,7 @@ BOOL GIFReader::ProcessGIF() // ScreenDescriptor lesen case( GLOBAL_HEADER_READING ): { - if( ( bRead = ReadGlobalHeader() ) == TRUE ) + if( ( bRead = ReadGlobalHeader() ) == sal_True ) { ClearImageExtensions(); eActAction = MARKER_READING; @@ -670,7 +670,7 @@ BOOL GIFReader::ProcessGIF() // Extension lesen case( EXTENSION_READING ): { - if( ( bRead = ReadExtension() ) == TRUE ) + if( ( bRead = ReadExtension() ) == sal_True ) eActAction = MARKER_READING; } break; @@ -679,7 +679,7 @@ BOOL GIFReader::ProcessGIF() // Image-Descriptor lesen case( LOCAL_HEADER_READING ): { - if( ( bRead = ReadLocalHeader() ) == TRUE ) + if( ( bRead = ReadLocalHeader() ) == sal_True ) { nYAcc = nImageX = nImageY = 0; eActAction = FIRST_BLOCK_READING; @@ -691,20 +691,20 @@ BOOL GIFReader::ProcessGIF() // ersten Datenblock lesen case( FIRST_BLOCK_READING ): { - BYTE cDataSize; + sal_uInt8 cDataSize; rIStm >> cDataSize; if( rIStm.IsEof() ) eActAction = ABORT_READING; else if( cDataSize > 12 ) - bStatus = FALSE; + bStatus = sal_False; else if( NO_PENDING( rIStm ) ) { - bRead = TRUE; + bRead = sal_True; pDecomp = new GIFLZWDecompressor( cDataSize ); eActAction = NEXT_BLOCK_READING; - bOverreadBlock = FALSE; + bOverreadBlock = sal_False; } else eActAction = FIRST_BLOCK_READING; @@ -714,20 +714,20 @@ BOOL GIFReader::ProcessGIF() // naechsten Datenblock lesen case( NEXT_BLOCK_READING ): { - USHORT nLastX = nImageX; - USHORT nLastY = nImageY; - ULONG nRet = ReadNextBlock(); + sal_uInt16 nLastX = nImageX; + sal_uInt16 nLastY = nImageY; + sal_uLong nRet = ReadNextBlock(); // Return: 0:Pending / 1:OK; / 2:OK und letzter Block: / 3:EOI / 4:HardAbort if( nRet ) { - bRead = TRUE; + bRead = sal_True; if ( nRet == 1UL ) { - bImGraphicReady = TRUE; + bImGraphicReady = sal_True; eActAction = NEXT_BLOCK_READING; - bOverreadBlock = FALSE; + bOverreadBlock = sal_False; } else { @@ -741,7 +741,7 @@ BOOL GIFReader::ProcessGIF() else if( nRet == 3UL ) { eActAction = NEXT_BLOCK_READING; - bOverreadBlock = TRUE; + bOverreadBlock = sal_True; } else { @@ -763,7 +763,7 @@ BOOL GIFReader::ProcessGIF() // ein Fehler trat auf case( ABORT_READING ): { - bEnd = TRUE; + bEnd = sal_True; eActAction = END_READING; } break; @@ -787,7 +787,7 @@ ReadState GIFReader::ReadGIF( Graphic& rGraphic ) { ReadState eReadState; - bStatus = TRUE; + bStatus = sal_True; while( ProcessGIF() && ( eActAction != END_READING ) ) {} @@ -824,12 +824,12 @@ ReadState GIFReader::ReadGIF( Graphic& rGraphic ) // - ImportGIF - // ------------- -BOOL ImportGIF( SvStream & rStm, Graphic& rGraphic ) +sal_Bool ImportGIF( SvStream & rStm, Graphic& rGraphic ) { GIFReader* pGIFReader = (GIFReader*) rGraphic.GetContext(); - USHORT nOldFormat = rStm.GetNumberFormatInt(); + sal_uInt16 nOldFormat = rStm.GetNumberFormatInt(); ReadState eReadState; - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); @@ -841,7 +841,7 @@ BOOL ImportGIF( SvStream & rStm, Graphic& rGraphic ) if( eReadState == GIFREAD_ERROR ) { - bRet = FALSE; + bRet = sal_False; delete pGIFReader; } else if( eReadState == GIFREAD_OK ) diff --git a/svtools/source/filter/ixbm/xbmread.cxx b/svtools/source/filter/ixbm/xbmread.cxx index 9c7faaafa88c..5084f7267e46 100644 --- a/svtools/source/filter/ixbm/xbmread.cxx +++ b/svtools/source/filter/ixbm/xbmread.cxx @@ -44,7 +44,7 @@ XBMReader::XBMReader( SvStream& rStm ) : nLastPos ( rStm.Tell() ), nWidth ( 0 ), nHeight ( 0 ), - bStatus ( TRUE ) + bStatus ( sal_True ) { pHexTable = new short[ 256 ]; maUpperName = String::CreateFromAscii( "SVIXBM", 6 ); @@ -109,7 +109,7 @@ ByteString XBMReader::FindTokenLine( SvStream* pInStm, const char* pTok1, long nPos2; long nPos3; - bStatus = FALSE; + bStatus = sal_False; do { @@ -120,23 +120,23 @@ ByteString XBMReader::FindTokenLine( SvStream* pInStm, const char* pTok1, { if( ( nPos1 = aRet.Search( pTok1 ) ) != STRING_NOTFOUND ) { - bStatus = TRUE; + bStatus = sal_True; if( pTok2 ) { - bStatus = FALSE; + bStatus = sal_False; if( ( ( nPos2 = aRet.Search( pTok2 ) ) != STRING_NOTFOUND ) && ( nPos2 > nPos1 ) ) { - bStatus = TRUE; + bStatus = sal_True; if( pTok3 ) { - bStatus = FALSE; + bStatus = sal_False; if( ( ( nPos3 = aRet.Search( pTok3 ) ) != STRING_NOTFOUND ) && ( nPos3 > nPos2 ) ) - bStatus = TRUE; + bStatus = sal_True; } } } @@ -199,16 +199,16 @@ long XBMReader::ParseDefine( const sal_Char* pDefine ) // ------------------------------------------------------------------------ -BOOL XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFormat eFormat ) +sal_Bool XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFormat eFormat ) { ByteString aLine; long nRow = 0; long nCol = 0; long nBits = ( eFormat == XBM10 ) ? 16 : 8; long nBit; - USHORT nValue; - USHORT nDigits; - BOOL bFirstLine = TRUE; + sal_uInt16 nValue; + sal_uInt16 nDigits; + sal_Bool bFirstLine = sal_True; while( nRow < nHeight ) { @@ -220,20 +220,20 @@ BOOL XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFor if( (nPos = ( aLine = aLastLine ).Search( '{' ) ) != STRING_NOTFOUND ) aLine.Erase( 0, nPos + 1 ); - bFirstLine = FALSE; + bFirstLine = sal_False; } else if( !pInStm->ReadLine( aLine ) ) break; if( aLine.Len() ) { - const USHORT nCount = aLine.GetTokenCount( ',' ); + const sal_uInt16 nCount = aLine.GetTokenCount( ',' ); - for( USHORT i = 0; ( i < nCount ) && ( nRow < nHeight ); i++ ) + for( sal_uInt16 i = 0; ( i < nCount ) && ( nRow < nHeight ); i++ ) { const ByteString aToken( aLine.GetToken( i, ',' ) ); const xub_StrLen nLen = aToken.Len(); - BOOL bProcessed = FALSE; + sal_Bool bProcessed = sal_False; nBit = nDigits = nValue = 0; @@ -246,11 +246,11 @@ BOOL XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFor { nValue = ( nValue << 4 ) + nTable; nDigits++; - bProcessed = TRUE; + bProcessed = sal_True; } else if( ( nTable < 0 ) && nDigits ) { - bProcessed = TRUE; + bProcessed = sal_True; break; } } @@ -267,7 +267,7 @@ BOOL XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFor } } - return TRUE; + return sal_True; } // ------------------------------------------------------------------------ @@ -275,7 +275,7 @@ BOOL XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFor ReadState XBMReader::ReadXBM( Graphic& rGraphic ) { ReadState eReadState; - BYTE cDummy; + sal_uInt8 cDummy; // sehen, ob wir _alles_ lesen koennen rIStm.Seek( STREAM_SEEK_TO_END ); @@ -289,7 +289,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic ) int nValue; rIStm.Seek( nLastPos ); - bStatus = FALSE; + bStatus = sal_False; aLine = FindTokenLine( &rIStm, "#define", "_width" ); if ( bStatus ) @@ -308,7 +308,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic ) } } else - bStatus = FALSE; + bStatus = sal_False; if ( bStatus ) { @@ -326,7 +326,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic ) else if ( aLine.Search( "char" ) != STRING_NOTFOUND ) eFormat = XBM11; else - bStatus = FALSE; + bStatus = sal_False; if ( bStatus && nWidth && nHeight ) { @@ -340,7 +340,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic ) bStatus = ParseData( &rIStm, aLine, eFormat ); } else - bStatus = FALSE; + bStatus = sal_False; } } } @@ -372,11 +372,11 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic ) // - ImportXBM - // ------------- -BOOL ImportXBM( SvStream& rStm, Graphic& rGraphic ) +sal_Bool ImportXBM( SvStream& rStm, Graphic& rGraphic ) { XBMReader* pXBMReader = (XBMReader*) rGraphic.GetContext(); ReadState eReadState; - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; if( !pXBMReader ) pXBMReader = new XBMReader( rStm ); @@ -386,7 +386,7 @@ BOOL ImportXBM( SvStream& rStm, Graphic& rGraphic ) if( eReadState == XBMREAD_ERROR ) { - bRet = FALSE; + bRet = sal_False; delete pXBMReader; } else if( eReadState == XBMREAD_OK ) diff --git a/svtools/source/filter/ixpm/rgbtable.hxx b/svtools/source/filter/ixpm/rgbtable.hxx index afdab883b369..054e1e86b064 100644 --- a/svtools/source/filter/ixpm/rgbtable.hxx +++ b/svtools/source/filter/ixpm/rgbtable.hxx @@ -28,9 +28,9 @@ struct XPMRGBTab { const char* name; - BYTE red; - BYTE green; - BYTE blue; + sal_uInt8 red; + sal_uInt8 green; + sal_uInt8 blue; }; static XPMRGBTab pRGBTable[] = { diff --git a/svtools/source/filter/ixpm/xpmread.cxx b/svtools/source/filter/ixpm/xpmread.cxx index 7575c94e3ed9..425ed6323bcc 100644 --- a/svtools/source/filter/ixpm/xpmread.cxx +++ b/svtools/source/filter/ixpm/xpmread.cxx @@ -51,8 +51,8 @@ XPMReader::XPMReader( SvStream& rStm ) : mnHeight ( 0 ), mnColors ( 0 ), mnCpp ( 0 ), - mbTransparent ( FALSE ), - mbStatus ( TRUE ), + mbTransparent ( sal_False ), + mbStatus ( sal_True ), mnStatus ( 0 ), mnIdentifier ( XPMIDENTIFIER ), mcThisByte ( 0 ), @@ -80,7 +80,7 @@ XPMReader::~XPMReader() ReadState XPMReader::ReadXPM( Graphic& rGraphic ) { ReadState eReadState; - BYTE cDummy; + sal_uInt8 cDummy; // sehen, ob wir _alles_ lesen koennen mrIStm.Seek( STREAM_SEEK_TO_END ); @@ -91,14 +91,14 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic ) if ( mrIStm.GetError() != ERRCODE_IO_PENDING ) { mrIStm.Seek( mnLastPos ); - mbStatus = TRUE; + mbStatus = sal_True; if ( mbStatus ) { - mpStringBuf = new BYTE [ XPMSTRINGBUF ]; - mpTempBuf = new BYTE [ XPMTEMPBUFSIZE ]; + mpStringBuf = new sal_uInt8 [ XPMSTRINGBUF ]; + mpTempBuf = new sal_uInt8 [ XPMTEMPBUFSIZE ]; - if ( ( mbStatus = ImplGetString() ) == TRUE ) + if ( ( mbStatus = ImplGetString() ) == sal_True ) { mnIdentifier = XPMVALUES; // Bitmap informationen einholen mnWidth = ImplGetULONG( 0 ); @@ -118,14 +118,14 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic ) // Farbe: ( mnCpp )Byte(s)-> ASCII Eintrag der der Farbe zugeordnet ist // 1 Byte -> 0xff wenn Farbe transparent ist // 3 Bytes -> RGB Wert der Farbe - mpColMap = new BYTE[ mnColors * ( 4 + mnCpp ) ]; + mpColMap = new sal_uInt8[ mnColors * ( 4 + mnCpp ) ]; if ( mpColMap ) { - for ( ULONG i = 0; i < mnColors; i++ ) + for ( sal_uLong i = 0; i < mnColors; i++ ) { - if ( ImplGetColor( i ) == FALSE ) + if ( ImplGetColor( i ) == sal_False ) { - mbStatus = FALSE; + mbStatus = sal_False; break; } } @@ -149,35 +149,35 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic ) maBmp = Bitmap( Size( mnWidth, mnHeight ), nBits ); mpAcc = maBmp.AcquireWriteAccess(); - // mbTransparent ist TRUE wenn mindestens eine Farbe Transparent ist + // mbTransparent ist sal_True wenn mindestens eine Farbe Transparent ist if ( mbTransparent ) { maMaskBmp = Bitmap( Size( mnWidth, mnHeight ), 1 ); if ( ( mpMaskAcc = maMaskBmp.AcquireWriteAccess() ) == NULL ) - mbStatus = FALSE; + mbStatus = sal_False; } if( mpAcc && mbStatus ) { - ULONG i; + sal_uLong i; if ( mnColors <=256 ) // palette is only needed by using less than 257 { // colors - BYTE* pPtr = &mpColMap[mnCpp]; + sal_uInt8* pPtr = &mpColMap[mnCpp]; for ( i = 0; i < mnColors; i++ ) { - mpAcc->SetPaletteColor( (BYTE)i, Color( pPtr[1], pPtr[2], pPtr[3] ) ); + mpAcc->SetPaletteColor( (sal_uInt8)i, Color( pPtr[1], pPtr[2], pPtr[3] ) ); pPtr += ( mnCpp + 4 ); } // using 2 charakters per pixel and less than 257 Colors we speed up if ( mnCpp == 2 ) // by using a 64kb indexing table { - mpFastColorTable = new BYTE[ 256 * 256 ]; + mpFastColorTable = new sal_uInt8[ 256 * 256 ]; for ( pPtr = mpColMap, i = 0; i < mnColors; i++, pPtr += mnCpp + 4 ) { - ULONG j = pPtr[ 0 ] << 8; + sal_uLong j = pPtr[ 0 ] << 8; j += pPtr[ 1 ]; - mpFastColorTable[ j ] = (BYTE)i; + mpFastColorTable[ j ] = (sal_uInt8)i; } } } @@ -185,9 +185,9 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic ) mnIdentifier = XPMPIXELS; for ( i = 0; i < mnHeight; i++ ) { - if ( ImplGetScanLine( i ) == FALSE ) + if ( ImplGetScanLine( i ) == sal_False ) { - mbStatus = FALSE; + mbStatus = sal_False; break; } } @@ -238,17 +238,17 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic ) // ------------------------------------------------------------------------ // ImplGetColor ermittelt saemtliche Farbwerte, -// die Rueckgabe ist TRUE wenn saemtliche Farben zugeordnet werden konnten +// die Rueckgabe ist sal_True wenn saemtliche Farben zugeordnet werden konnten -BOOL XPMReader::ImplGetColor( ULONG nNumb ) +sal_Bool XPMReader::ImplGetColor( sal_uLong nNumb ) { - BYTE* pString = mpStringBuf; - BYTE* pPtr = ( mpColMap + nNumb * ( 4 + mnCpp ) ); - BOOL bStatus = ImplGetString(); + sal_uInt8* pString = mpStringBuf; + sal_uInt8* pPtr = ( mpColMap + nNumb * ( 4 + mnCpp ) ); + sal_Bool bStatus = ImplGetString(); if ( bStatus ) { - for ( ULONG i = 0; i < mnCpp; i++ ) + for ( sal_uLong i = 0; i < mnCpp; i++ ) *pPtr++ = *pString++; bStatus = ImplGetColSub ( pPtr ); } @@ -259,11 +259,11 @@ BOOL XPMReader::ImplGetColor( ULONG nNumb ) // ImpGetScanLine liest den String mpBufSize aus und schreibt die Pixel in die // Bitmap. Der Parameter nY gibt die horizontale Position an. -BOOL XPMReader::ImplGetScanLine( ULONG nY ) +sal_Bool XPMReader::ImplGetScanLine( sal_uLong nY ) { - BOOL bStatus = ImplGetString(); - BYTE* pString = mpStringBuf; - BYTE* pColor; + sal_Bool bStatus = ImplGetString(); + sal_uInt8* pString = mpStringBuf; + sal_uInt8* pColor; BitmapColor aWhite; BitmapColor aBlack; @@ -275,18 +275,18 @@ BOOL XPMReader::ImplGetScanLine( ULONG nY ) aBlack = mpMaskAcc->GetBestMatchingColor( Color( COL_BLACK ) ); } if ( mnStringSize != ( mnWidth * mnCpp )) - bStatus = FALSE; + bStatus = sal_False; else { - ULONG i, j; + sal_uLong i, j; if ( mpFastColorTable ) { for ( i = 0; i < mnWidth; i++ ) { j = (*pString++) << 8; j += *pString++; - BYTE k = (BYTE)mpFastColorTable[ j ]; - mpAcc->SetPixel( nY, i, BitmapColor( (BYTE)k ) ); + sal_uInt8 k = (sal_uInt8)mpFastColorTable[ j ]; + mpAcc->SetPixel( nY, i, BitmapColor( (sal_uInt8)k ) ); if ( mpMaskAcc ) mpMaskAcc->SetPixel( nY, i, @@ -298,12 +298,12 @@ BOOL XPMReader::ImplGetScanLine( ULONG nY ) pColor = mpColMap; for ( j = 0; j < mnColors; j++ ) { - if ( ImplCompare( pString, pColor, mnCpp, XPMCASESENSITIVE ) == TRUE ) + if ( ImplCompare( pString, pColor, mnCpp, XPMCASESENSITIVE ) == sal_True ) { if ( mnColors > 256 ) mpAcc->SetPixel( nY, i, Color ( pColor[3], pColor[4], pColor[5] ) ); else - mpAcc->SetPixel( nY, i, BitmapColor( (BYTE) j ) ); + mpAcc->SetPixel( nY, i, BitmapColor( (sal_uInt8) j ) ); if ( mpMaskAcc ) mpMaskAcc->SetPixel( nY, i, ( @@ -326,11 +326,11 @@ BOOL XPMReader::ImplGetScanLine( ULONG nY ) // wurde eine Farbe gefunden wird an pDest[1]..pDest[2] der RGB wert geschrieben // pDest[0] enthaelt 0xff wenn die Farbe transparent ist sonst 0 -BOOL XPMReader::ImplGetColSub( BYTE* pDest ) +sal_Bool XPMReader::ImplGetColSub( sal_uInt8* pDest ) { unsigned char cTransparent[] = "None"; - BOOL bColStatus = FALSE; + sal_Bool bColStatus = sal_False; if ( ImplGetColKey( 'c' ) || ImplGetColKey( 'm' ) || ImplGetColKey( 'g' ) ) { @@ -338,7 +338,7 @@ BOOL XPMReader::ImplGetColSub( BYTE* pDest ) if ( *mpPara == '#' ) { *pDest++ = 0; - bColStatus = TRUE; + bColStatus = sal_True; switch ( mnParaSize ) { case 25 : @@ -351,7 +351,7 @@ BOOL XPMReader::ImplGetColSub( BYTE* pDest ) ImplGetRGBHex ( pDest, 0 ); break; default: - bColStatus = FALSE; + bColStatus = sal_False; break; } } @@ -359,14 +359,14 @@ BOOL XPMReader::ImplGetColSub( BYTE* pDest ) else if ( ImplCompare( &cTransparent[0], mpPara, 4 )) { *pDest++ = 0xff; - bColStatus = TRUE; - mbTransparent = TRUE; + bColStatus = sal_True; + mbTransparent = sal_True; } // last we will try to get the colorname else if ( mnParaSize > 2 ) // name must enlarge the minimum size { - ULONG i = 0; - while ( TRUE ) + sal_uLong i = 0; + while ( sal_True ) { if ( pRGBTable[ i ].name == NULL ) break; @@ -375,7 +375,7 @@ BOOL XPMReader::ImplGetColSub( BYTE* pDest ) if ( ImplCompare ( (unsigned char*)pRGBTable[ i ].name, mpPara, mnParaSize, XPMCASENONSENSITIVE ) ) { - bColStatus = TRUE; + bColStatus = sal_True; *pDest++ = 0; *pDest++ = pRGBTable[ i ].red; *pDest++ = pRGBTable[ i ].green; @@ -391,11 +391,11 @@ BOOL XPMReader::ImplGetColSub( BYTE* pDest ) // ------------------------------------------------------------------------ // ImplGetColKey durchsuch den String mpStringBuf nach einem Parameter 'nKey' -// und gibt einen BOOL zurueck. ( wenn TRUE werden mpPara und mnParaSize gesetzt ) +// und gibt einen sal_Bool zurueck. ( wenn sal_True werden mpPara und mnParaSize gesetzt ) -BOOL XPMReader::ImplGetColKey( BYTE nKey ) +sal_Bool XPMReader::ImplGetColKey( sal_uInt8 nKey ) { - BYTE nTemp, nPrev = ' '; + sal_uInt8 nTemp, nPrev = ' '; mpPara = mpStringBuf + mnCpp + 1; mnParaSize = 0; @@ -430,7 +430,7 @@ BOOL XPMReader::ImplGetColKey( BYTE nKey ) } } } - return ( mnParaSize ) ? TRUE : FALSE; + return ( mnParaSize ) ? sal_True : sal_False; } // ------------------------------------------------------------------------ @@ -442,12 +442,12 @@ BOOL XPMReader::ImplGetColKey( BYTE nKey ) // 6 : '#12345678abcdefab12345678' " " " " -void XPMReader::ImplGetRGBHex( BYTE* pDest,ULONG nAdd ) +void XPMReader::ImplGetRGBHex( sal_uInt8* pDest,sal_uLong nAdd ) { - BYTE* pPtr = mpPara+1; - BYTE nHex, nTemp; + sal_uInt8* pPtr = mpPara+1; + sal_uInt8 nHex, nTemp; - for ( ULONG i = 0; i < 3; i++ ) + for ( sal_uLong i = 0; i < 3; i++ ) { nHex = (*pPtr++) - '0'; if ( nHex > 9 ) @@ -459,24 +459,24 @@ void XPMReader::ImplGetRGBHex( BYTE* pDest,ULONG nAdd ) nHex = ( nHex << 4 ) + nTemp; pPtr += nAdd; - *pDest++ = (BYTE)nHex; + *pDest++ = (sal_uInt8)nHex; } } // ------------------------------------------------------------------------ // ImplGetUlong gibt den wert einer bis zu 6stelligen ASCII-Dezimalzahl zurueck. -ULONG XPMReader::ImplGetULONG( ULONG nPara ) +sal_uLong XPMReader::ImplGetULONG( sal_uLong nPara ) { if ( ImplGetPara ( nPara ) ) { - ULONG nRetValue = 0; - BYTE* pPtr = mpPara; + sal_uLong nRetValue = 0; + sal_uInt8* pPtr = mpPara; if ( ( mnParaSize > 6 ) || ( mnParaSize == 0 ) ) return 0; - for ( ULONG i = 0; i < mnParaSize; i++ ) + for ( sal_uLong i = 0; i < mnParaSize; i++ ) { - BYTE j = (*pPtr++) - 48; + sal_uInt8 j = (*pPtr++) - 48; if ( j > 9 ) return 0; // ascii is invalid nRetValue*=10; nRetValue+=j; @@ -488,28 +488,28 @@ ULONG XPMReader::ImplGetULONG( ULONG nPara ) // ------------------------------------------------------------------------ -BOOL XPMReader::ImplCompare( BYTE* pSource, BYTE* pDest, ULONG nSize, ULONG nMode ) +sal_Bool XPMReader::ImplCompare( sal_uInt8* pSource, sal_uInt8* pDest, sal_uLong nSize, sal_uLong nMode ) { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; if ( nMode == XPMCASENONSENSITIVE ) { - for ( ULONG i = 0; i < nSize; i++ ) + for ( sal_uLong i = 0; i < nSize; i++ ) { if ( ( pSource[i]&~0x20 ) != ( pDest[i]&~0x20 ) ) { - bRet = FALSE; + bRet = sal_False; break; } } } else { - for ( ULONG i = 0; i < nSize; i++ ) + for ( sal_uLong i = 0; i < nSize; i++ ) { if ( pSource[i] != pDest[i] ) { - bRet = FALSE; + bRet = sal_False; break; } } @@ -520,15 +520,15 @@ BOOL XPMReader::ImplCompare( BYTE* pSource, BYTE* pDest, ULONG nSize, ULONG nMod // ------------------------------------------------------------------------ // ImplGetPara versucht den nNumb ( 0...x ) Parameter aus mpStringBuf zu ermitteln. // Ein Parameter ist durch Spaces oder Tabs von den anderen getrennt. -// Konnte der Parameter gefunden werden ist der Rueckgabewert TRUE und mpPara + mnParaSize +// Konnte der Parameter gefunden werden ist der Rueckgabewert sal_True und mpPara + mnParaSize // werden gesetzt. -BOOL XPMReader::ImplGetPara ( ULONG nNumb ) +sal_Bool XPMReader::ImplGetPara ( sal_uLong nNumb ) { - BYTE nByte; - ULONG pSize = 0; - BYTE* pPtr = mpStringBuf; - ULONG nCount = 0; + sal_uInt8 nByte; + sal_uLong pSize = 0; + sal_uInt8* pPtr = mpStringBuf; + sal_uLong nCount = 0; if ( ( *pPtr != ' ' ) && ( *pPtr != 0x09 ) ) { @@ -570,7 +570,7 @@ BOOL XPMReader::ImplGetPara ( ULONG nNumb ) pSize++; pPtr++; } - return ( ( nCount == nNumb ) && ( mpPara ) ) ? TRUE : FALSE; + return ( ( nCount == nNumb ) && ( mpPara ) ) ? sal_True : sal_False; } // ------------------------------------------------------------------------ @@ -578,10 +578,10 @@ BOOL XPMReader::ImplGetPara ( ULONG nNumb ) // mnStringSize enthaelt die Groesse des gelesenen Strings. // Bemerkungen wie '//' und '/*.....*/' werden uebersprungen. -BOOL XPMReader::ImplGetString( void ) +sal_Bool XPMReader::ImplGetString( void ) { - BYTE sID[] = "/* XPM */"; - BYTE* pString = mpStringBuf; + sal_uInt8 sID[] = "/* XPM */"; + sal_uInt8* pString = mpStringBuf; mnStringSize = 0; mpStringBuf[0] = 0; @@ -600,13 +600,13 @@ BOOL XPMReader::ImplGetString( void ) { if ( mnTempAvail <= 50 ) { - mbStatus = FALSE; // file is too short to be a correct XPM format + mbStatus = sal_False; // file is too short to be a correct XPM format break; } for ( int i = 0; i < 9; i++ ) // searching for "/* XPM */" if ( *mpTempPtr++ != sID[i] ) { - mbStatus = FALSE; + mbStatus = sal_False; break; } mnTempAvail-=9; @@ -638,7 +638,7 @@ BOOL XPMReader::ImplGetString( void ) } if ( mnStringSize >= ( XPMSTRINGBUF - 1 ) ) { - mbStatus = FALSE; + mbStatus = sal_False; break; } *pString++ = mcThisByte; @@ -676,11 +676,11 @@ BOOL XPMReader::ImplGetString( void ) // - ImportXPM - // ------------- -BOOL ImportXPM( SvStream& rStm, Graphic& rGraphic ) +sal_Bool ImportXPM( SvStream& rStm, Graphic& rGraphic ) { XPMReader* pXPMReader = (XPMReader*) rGraphic.GetContext(); ReadState eReadState; - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; if( !pXPMReader ) pXPMReader = new XPMReader( rStm ); @@ -690,7 +690,7 @@ BOOL ImportXPM( SvStream& rStm, Graphic& rGraphic ) if( eReadState == XPMREAD_ERROR ) { - bRet = FALSE; + bRet = sal_False; delete pXPMReader; } else if( eReadState == XPMREAD_OK ) diff --git a/svtools/source/filter/jpeg/jpeg.cxx b/svtools/source/filter/jpeg/jpeg.cxx index a2de92171af3..dff6ec8ff51f 100644 --- a/svtools/source/filter/jpeg/jpeg.cxx +++ b/svtools/source/filter/jpeg/jpeg.cxx @@ -32,12 +32,10 @@ extern "C" { - #define INT32 JPEG_INT32 #include "stdio.h" #include "jpeg.h" #include "jpeglib.h" #include "jerror.h" - #undef INT32 } #define _JPEGPRIVATE @@ -125,7 +123,7 @@ extern "C" int empty_output_buffer (j_compress_ptr cinfo) dest->pub.next_output_byte = dest->buffer; dest->pub.free_in_buffer = BUF_SIZE; - return TRUE; + return sal_True; } extern "C" void term_destination (j_compress_ptr cinfo) @@ -189,7 +187,7 @@ extern "C" void init_source (j_decompress_ptr cinfo) * but we don't clear the input buffer. * This is correct behavior for reading a series of images from one source. */ - src->start_of_file = TRUE; + src->start_of_file = sal_True; } long StreamRead( SvStream* pSvStm, void* pBuffer, long nBufferSize ) @@ -238,9 +236,9 @@ extern "C" int fill_input_buffer (j_decompress_ptr cinfo) src->pub.next_input_byte = src->buffer; src->pub.bytes_in_buffer = nbytes; - src->start_of_file = FALSE; + src->start_of_file = sal_False; - return TRUE; + return sal_True; } extern "C" void skip_input_data (j_decompress_ptr cinfo, long num_bytes) @@ -255,7 +253,7 @@ extern "C" void skip_input_data (j_decompress_ptr cinfo, long num_bytes) while (num_bytes > (long) src->pub.bytes_in_buffer) { num_bytes -= (long) src->pub.bytes_in_buffer; (void) fill_input_buffer(cinfo); - /* note we assume that fill_input_buffer will never return FALSE, + /* note we assume that fill_input_buffer will never return sal_False, * so suspension need not be handled. */ } @@ -350,9 +348,9 @@ void* JPEGReader::CreateBitmap( void* pParam ) { BitmapPalette aGrayPal( 256 ); - for( USHORT n = 0; n < 256; n++ ) + for( sal_uInt16 n = 0; n < 256; n++ ) { - const BYTE cGray = (BYTE) n; + const sal_uInt8 cGray = (sal_uInt8) n; aGrayPal[ n ] = BitmapColor( cGray, cGray, cGray ); } @@ -386,7 +384,7 @@ void* JPEGReader::CreateBitmap( void* pParam ) { long nAlignedWidth; - const ULONG nFormat = pAcc->GetScanlineFormat(); + const sal_uLong nFormat = pAcc->GetScanlineFormat(); if( ( bGray && ( BMP_FORMAT_8BIT_PAL == nFormat ) ) || @@ -400,7 +398,7 @@ void* JPEGReader::CreateBitmap( void* pParam ) else { nAlignedWidth = AlignedWidth4Bytes( aSize.Width() * ( bGray ? 8 : 24 ) ); - ((JPEGCreateBitmapParam*)pParam)->bTopDown = TRUE; + ((JPEGCreateBitmapParam*)pParam)->bTopDown = sal_True; pBmpBuf = pBuffer = rtl_allocateMemory( nAlignedWidth * aSize.Height() ); } ((JPEGCreateBitmapParam*)pParam)->nAlignedWidth = nAlignedWidth; @@ -425,9 +423,9 @@ void JPEGReader::FillBitmap() { BitmapColor* pCols = new BitmapColor[ 256 ]; - for( USHORT n = 0; n < 256; n++ ) + for( sal_uInt16 n = 0; n < 256; n++ ) { - const BYTE cGray = (BYTE) n; + const sal_uInt8 cGray = (sal_uInt8) n; pCols[ n ] = pAcc->GetBestMatchingColor( BitmapColor( cGray, cGray, cGray ) ); } @@ -435,7 +433,7 @@ void JPEGReader::FillBitmap() for( long nY = 0L; nY < nHeight; nY++ ) { - pTmp = (BYTE*) pBuffer + nY * nAlignedWidth; + pTmp = (sal_uInt8*) pBuffer + nY * nAlignedWidth; for( long nX = 0L; nX < nWidth; nX++ ) pAcc->SetPixel( nY, nX, pCols[ *pTmp++ ] ); @@ -449,7 +447,7 @@ void JPEGReader::FillBitmap() for( long nY = 0L; nY < nHeight; nY++ ) { - pTmp = (BYTE*) pBuffer + nY * nAlignedWidth; + pTmp = (sal_uInt8*) pBuffer + nY * nAlignedWidth; for( long nX = 0L; nX < nWidth; nX++ ) { @@ -515,8 +513,8 @@ ReadState JPEGReader::Read( Graphic& rGraphic ) long nEndPos; long nLines; ReadState eReadState; - BOOL bRet = FALSE; - BYTE cDummy; + sal_Bool bRet = sal_False; + sal_uInt8 cDummy; #if 1 // TODO: is it possible to get rid of this seek to the end? // check if the stream's end is already available @@ -562,10 +560,10 @@ ReadState JPEGReader::Read( Graphic& rGraphic ) else rGraphic = aBmp; - bRet = TRUE; + bRet = sal_True; } else if( rIStm.GetError() == ERRCODE_IO_PENDING ) - bRet = TRUE; + bRet = sal_True; // Status setzen ( Pending hat immer Vorrang ) if( rIStm.GetError() == ERRCODE_IO_PENDING ) @@ -629,13 +627,13 @@ void* JPEGWriter::GetScanline( long nY ) { BitmapColor aColor; long nWidth = pAcc->Width(); - BYTE* pTmp = pBuffer; + sal_uInt8* pTmp = pBuffer; if( pAcc->HasPalette() ) { for( long nX = 0L; nX < nWidth; nX++ ) { - aColor = pAcc->GetPaletteColor( (BYTE) pAcc->GetPixel( nY, nX ) ); + aColor = pAcc->GetPaletteColor( (sal_uInt8) pAcc->GetPixel( nY, nX ) ); *pTmp++ = aColor.GetRed(); if ( bGreys ) continue; @@ -665,9 +663,9 @@ void* JPEGWriter::GetScanline( long nY ) // ------------------------------------------------------------------------ -BOOL JPEGWriter::Write( const Graphic& rGraphic ) +sal_Bool JPEGWriter::Write( const Graphic& rGraphic ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if ( xStatusIndicator.is() ) { @@ -696,7 +694,7 @@ BOOL JPEGWriter::Write( const Graphic& rGraphic ) BitmapColor aColor; for( long nX = 0L; bIsGrey && ( nX < nWidth ); nX++ ) { - aColor = pAcc->HasPalette() ? pAcc->GetPaletteColor( (BYTE) pAcc->GetPixel( nY, nX ) ) + aColor = pAcc->HasPalette() ? pAcc->GetPaletteColor( (sal_uInt8) pAcc->GetPixel( nY, nX ) ) : pAcc->GetPixel( nY, nX ); bIsGrey = ( aColor.GetRed() == aColor.GetGreen() ) && ( aColor.GetRed() == aColor.GetBlue() ); } @@ -713,11 +711,11 @@ BOOL JPEGWriter::Write( const Graphic& rGraphic ) bNative = ( pAcc->GetScanlineFormat() == BMP_FORMAT_24BIT_TC_RGB ); if( !bNative ) - pBuffer = new BYTE[ AlignedWidth4Bytes( bGreys ? pAcc->Width() * 8L : pAcc->Width() * 24L ) ]; + pBuffer = new sal_uInt8[ AlignedWidth4Bytes( bGreys ? pAcc->Width() * 8L : pAcc->Width() * 24L ) ]; JPEGCallbackStruct aCallbackData; aCallbackData.xStatusIndicator = xStatusIndicator; - bRet = (BOOL) WriteJPEG( this, &rOStm, pAcc->Width(), pAcc->Height(), bGreys, nQuality, &aCallbackData ); + bRet = (sal_Bool) WriteJPEG( this, &rOStm, pAcc->Width(), pAcc->Height(), bGreys, nQuality, &aCallbackData ); delete[] pBuffer; pBuffer = NULL; @@ -735,11 +733,11 @@ BOOL JPEGWriter::Write( const Graphic& rGraphic ) // - ImportJPEG - // -------------- -BOOL ImportJPEG( SvStream& rStm, Graphic& rGraphic, void* pCallerData, sal_Int32 nImportFlags ) +sal_Bool ImportJPEG( SvStream& rStm, Graphic& rGraphic, void* pCallerData, sal_Int32 nImportFlags ) { JPEGReader* pJPEGReader = (JPEGReader*) rGraphic.GetContext(); ReadState eReadState; - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; if( !pJPEGReader ) pJPEGReader = new JPEGReader( rStm, pCallerData, ( nImportFlags & GRFILTER_I_FLAGS_SET_LOGSIZE_FOR_JPEG ) != 0 ); @@ -754,7 +752,7 @@ BOOL ImportJPEG( SvStream& rStm, Graphic& rGraphic, void* pCallerData, sal_Int32 if( eReadState == JPEGREAD_ERROR ) { - bRet = FALSE; + bRet = sal_False; delete pJPEGReader; } else if( eReadState == JPEGREAD_OK ) @@ -769,7 +767,7 @@ BOOL ImportJPEG( SvStream& rStm, Graphic& rGraphic, void* pCallerData, sal_Int32 // - ExportJPEG - // -------------- -BOOL ExportJPEG( SvStream& rOStm, const Graphic& rGraphic, +sal_Bool ExportJPEG( SvStream& rOStm, const Graphic& rGraphic, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData, bool* pExportWasGrey ) diff --git a/svtools/source/filter/jpeg/jpeg.h b/svtools/source/filter/jpeg/jpeg.h index 82a2f80a838c..ca9b294d2f9d 100644 --- a/svtools/source/filter/jpeg/jpeg.h +++ b/svtools/source/filter/jpeg/jpeg.h @@ -50,7 +50,6 @@ struct JPEGCreateBitmapParam }; typedef struct my_error_mgr* my_error_ptr; -typedef unsigned char BYTE; typedef unsigned char* HPBYTE; void* JPEGMalloc( size_t size ); diff --git a/svtools/source/filter/jpeg/jpegc.c b/svtools/source/filter/jpeg/jpegc.c index 29b4749a7b51..8d3a82a86ef3 100644 --- a/svtools/source/filter/jpeg/jpegc.c +++ b/svtools/source/filter/jpeg/jpegc.c @@ -100,13 +100,13 @@ void ReadJPEG( void* pJPEGReader, void* pIStm, long* pLines ) jpeg_create_decompress( &cinfo ); bDecompCreated = 1; jpeg_svstream_src( &cinfo, pIStm ); - jpeg_read_header( &cinfo, TRUE ); + jpeg_read_header( &cinfo, sal_True ); cinfo.scale_num = 1; cinfo.scale_denom = 1; cinfo.output_gamma = 1.0; - cinfo.raw_data_out = FALSE; - cinfo.quantize_colors = FALSE; + cinfo.raw_data_out = sal_False; + cinfo.quantize_colors = sal_False; if ( cinfo.jpeg_color_space == JCS_YCbCr ) cinfo.out_color_space = JCS_RGB; else if ( cinfo.jpeg_color_space == JCS_YCCK ) @@ -138,8 +138,8 @@ void ReadJPEG( void* pJPEGReader, void* pIStm, long* pLines ) if( cinfo.scale_denom > 1 ) { cinfo.dct_method = JDCT_FASTEST; - cinfo.do_fancy_upsampling = FALSE; - cinfo.do_block_smoothing = FALSE; + cinfo.do_fancy_upsampling = sal_False; + cinfo.do_block_smoothing = sal_False; } } @@ -253,12 +253,12 @@ long WriteJPEG( void* pJPEGWriter, void* pOStm, } jpeg_set_defaults( &cinfo ); - jpeg_set_quality( &cinfo, (int) nQualityPercent, FALSE ); + jpeg_set_quality( &cinfo, (int) nQualityPercent, sal_False ); if ( ( nWidth > 128 ) || ( nHeight > 128 ) ) jpeg_simple_progression( &cinfo ); - jpeg_start_compress( &cinfo, TRUE ); + jpeg_start_compress( &cinfo, sal_True ); for( nY = 0; nY < nHeight; nY++ ) { diff --git a/svtools/source/filter/sgfbram.cxx b/svtools/source/filter/sgfbram.cxx index 3d1a71f5a2db..9b981f8c0d94 100644 --- a/svtools/source/filter/sgfbram.cxx +++ b/svtools/source/filter/sgfbram.cxx @@ -75,11 +75,11 @@ SvStream& operator>>(SvStream& rIStream, SgfHeader& rHead) |* Letzte Aenderung JOE 23.06.93 |* *************************************************************************/ -BOOL SgfHeader::ChkMagic() +sal_Bool SgfHeader::ChkMagic() { return Magic=='J'*256+'J'; } -UINT32 SgfHeader::GetOffset() -{ return UINT32(OfsLo)+0x00010000*UINT32(OfsHi); } +sal_uInt32 SgfHeader::GetOffset() +{ return sal_uInt32(OfsLo)+0x00010000*sal_uInt32(OfsHi); } /************************************************************************* @@ -105,8 +105,8 @@ SvStream& operator>>(SvStream& rIStream, SgfEntry& rEntr) return rIStream; } -UINT32 SgfEntry::GetOffset() -{ return UINT32(OfsLo)+0x00010000*UINT32(OfsHi); } +sal_uInt32 SgfEntry::GetOffset() +{ return sal_uInt32(OfsLo)+0x00010000*sal_uInt32(OfsHi); } /************************************************************************* @@ -165,21 +165,21 @@ SvStream& operator<<(SvStream& rOStream, BmpFileHeader& rHead) return rOStream; } -void BmpFileHeader::SetSize(UINT32 Size) +void BmpFileHeader::SetSize(sal_uInt32 Size) { - SizeLo=UINT16(Size & 0x0000FFFF); - SizeHi=UINT16((Size & 0xFFFF0000)>>16); + SizeLo=sal_uInt16(Size & 0x0000FFFF); + SizeHi=sal_uInt16((Size & 0xFFFF0000)>>16); } -void BmpFileHeader::SetOfs(UINT32 Ofs) +void BmpFileHeader::SetOfs(sal_uInt32 Ofs) { - OfsLo=UINT16(Ofs & 0x0000FFFF); - OfsHi=UINT16((Ofs & 0xFFFF0000)>>16); + OfsLo=sal_uInt16(Ofs & 0x0000FFFF); + OfsHi=sal_uInt16((Ofs & 0xFFFF0000)>>16); } -UINT32 BmpFileHeader::GetOfs() +sal_uInt32 BmpFileHeader::GetOfs() { - return UINT32(OfsLo)+0x00010000*UINT32(OfsHi); + return sal_uInt32(OfsLo)+0x00010000*sal_uInt32(OfsHi); } /************************************************************************* @@ -247,14 +247,14 @@ SvStream& operator<<(SvStream& rOStream, const RGBQuad& rQuad) class PcxExpand { private: - USHORT Count; - BYTE Data; + sal_uInt16 Count; + sal_uInt8 Data; public: PcxExpand() { Count=0; } - BYTE GetByte(SvStream& rInp); + sal_uInt8 GetByte(SvStream& rInp); }; -BYTE PcxExpand::GetByte(SvStream& rInp) +sal_uInt8 PcxExpand::GetByte(SvStream& rInp) { if (Count>0) { Count--; @@ -282,21 +282,21 @@ BYTE PcxExpand::GetByte(SvStream& rInp) |* Letzte Aenderung JOE 23.06.93 |* *************************************************************************/ -BOOL SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&) +sal_Bool SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&) { BmpFileHeader aBmpHead; BmpInfoHeader aBmpInfo; - USHORT nWdtInp=(rHead.Xsize+7)/8; // Breite der Input-Bitmap in Bytes - USHORT nWdtOut; // Breite der Output-Bitmap in Bytes - USHORT nColors; // Anzahl der Farben (1,16,256) - USHORT nColBits; // Anzahl der Bits/Pixel (2, 4, 8) - USHORT i,j,k; // Spaltenzaehler, Zeilenzaehler, Planezaehler - USHORT a,b; // Hilfsvariable - BYTE pl1 = 0,pl2= 0; // Masken fuer die Planes - BYTE* pBuf=NULL; // Buffer fuer eine Pixelzeile + sal_uInt16 nWdtInp=(rHead.Xsize+7)/8; // Breite der Input-Bitmap in Bytes + sal_uInt16 nWdtOut; // Breite der Output-Bitmap in Bytes + sal_uInt16 nColors; // Anzahl der Farben (1,16,256) + sal_uInt16 nColBits; // Anzahl der Bits/Pixel (2, 4, 8) + sal_uInt16 i,j,k; // Spaltenzaehler, Zeilenzaehler, Planezaehler + sal_uInt16 a,b; // Hilfsvariable + sal_uInt8 pl1 = 0,pl2= 0; // Masken fuer die Planes + sal_uInt8* pBuf=NULL; // Buffer fuer eine Pixelzeile PcxExpand aPcx; - ULONG nOfs; - BYTE cRGB[4]; + sal_uLong nOfs; + sal_uInt8 cRGB[4]; if (rHead.Planes<=1) nColBits=1; else nColBits=4; if (rHead.Typ==4) nColBits=8; nColors=1<>aHead; @@ -438,7 +438,7 @@ BOOL SgfBMapFilter(SvStream& rInp, SvStream& rOut) rInp>>aEntr; nNext=aEntr.GetOffset(); if (aEntr.Typ==aHead.Typ) { - bRdFlag=TRUE; + bRdFlag=sal_True; switch(aEntr.Typ) { case SgfBitImag0: case SgfBitImag1: @@ -448,7 +448,7 @@ BOOL SgfBMapFilter(SvStream& rInp, SvStream& rOut) } } // while(nNext) } - if (rInp.GetError()) bRet=FALSE; + if (rInp.GetError()) bRet=sal_False; return(bRet); } @@ -464,15 +464,15 @@ long SgfVectXmul=0; long SgfVectYmul=0; long SgfVectXdiv=0; long SgfVectYdiv=0; -BOOL SgfVectScal=FALSE; +sal_Bool SgfVectScal=sal_False; //////////////////////////////////////////////////////////// // Hpgl2SvFarbe //////////////////////////////////////////// //////////////////////////////////////////////////////////// -Color Hpgl2SvFarbe( BYTE nFarb ) +Color Hpgl2SvFarbe( sal_uInt8 nFarb ) { - ULONG nColor = COL_BLACK; + sal_uLong nColor = COL_BLACK; switch (nFarb & 0x07) { case 0: nColor=COL_WHITE; break; @@ -497,20 +497,20 @@ Color Hpgl2SvFarbe( BYTE nFarb ) |* Letzte Aenderung JOE 23.06.93 |* *************************************************************************/ -BOOL SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMtf) +sal_Bool SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMtf) { VirtualDevice aOutDev; SgfVector aVect; - BYTE nFarb; - BYTE nFrb0=7; - BYTE nLTyp; - BYTE nOTyp; - BOOL bEoDt=FALSE; - BOOL bPDwn=FALSE; + sal_uInt8 nFarb; + sal_uInt8 nFrb0=7; + sal_uInt8 nLTyp; + sal_uInt8 nOTyp; + sal_Bool bEoDt=sal_False; + sal_Bool bPDwn=sal_False; Point aP0(0,0); Point aP1(0,0); String Msg; - USHORT RecNr=0; + sal_uInt16 RecNr=0; rMtf.Record(&aOutDev); aOutDev.SetLineColor(Color(COL_BLACK)); @@ -518,9 +518,9 @@ BOOL SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMt while (!bEoDt && !rInp.GetError()) { rInp>>aVect; RecNr++; - nFarb=(BYTE) (aVect.Flag & 0x000F); - nLTyp=(BYTE)((aVect.Flag & 0x00F0) >>4); - nOTyp=(BYTE)((aVect.Flag & 0x0F00) >>8); + nFarb=(sal_uInt8) (aVect.Flag & 0x000F); + nLTyp=(sal_uInt8)((aVect.Flag & 0x00F0) >>4); + nOTyp=(sal_uInt8)((aVect.Flag & 0x0F00) >>8); bEoDt=(aVect.Flag & 0x4000) !=0; bPDwn=(aVect.Flag & 0x8000) !=0; @@ -561,7 +561,7 @@ BOOL SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMt Fraction( 1, 4 ), Fraction( 1, 4 ) ); rMtf.SetPrefMapMode( aMap ); rMtf.SetPrefSize( Size( (short)rHead.Xsize, (short)rHead.Ysize ) ); - return TRUE; + return sal_True; } @@ -574,14 +574,14 @@ BOOL SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMt |* Letzte Aenderung JOE 23.06.93 |* *************************************************************************/ -BOOL SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf) +sal_Bool SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf) { - ULONG nFileStart; // Offset des SgfHeaders. Im allgemeinen 0. + sal_uLong nFileStart; // Offset des SgfHeaders. Im allgemeinen 0. SgfHeader aHead; SgfEntry aEntr; - ULONG nNext; - BOOL bRdFlag=FALSE; // Grafikentry gelesen ? - BOOL bRet=FALSE; // Returncode + sal_uLong nNext; + sal_Bool bRdFlag=sal_False; // Grafikentry gelesen ? + sal_Bool bRet=sal_False; // Returncode nFileStart=rInp.Tell(); rInp>>aHead; @@ -596,7 +596,7 @@ BOOL SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf) } } // while(nNext) if (bRdFlag) { - if (!rInp.GetError()) bRet=TRUE; // Scheinbar Ok + if (!rInp.GetError()) bRet=sal_True; // Scheinbar Ok } } return(bRet); @@ -612,9 +612,9 @@ BOOL SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf) |* Letzte Aenderung JOE 23.06.93 |* *************************************************************************/ -BOOL SgfFilterPScr(SvStream&, SgfHeader&, SgfEntry&) +sal_Bool SgfFilterPScr(SvStream&, SgfHeader&, SgfEntry&) { - return FALSE; // PostSrcipt wird noch nicht unterstuetzt ! + return sal_False; // PostSrcipt wird noch nicht unterstuetzt ! } @@ -627,7 +627,7 @@ BOOL SgfFilterPScr(SvStream&, SgfHeader&, SgfEntry&) |* Letzte Aenderung JOE 23.06.93 |* *************************************************************************/ -BYTE CheckSgfTyp(SvStream& rInp, USHORT& nVersion) +sal_uInt8 CheckSgfTyp(SvStream& rInp, sal_uInt16& nVersion) { #if OSL_DEBUG_LEVEL > 1 // Recordgroessen checken. Neuer Compiler hat vielleichte anderes Allignment! if (sizeof(SgfHeader)!=SgfHeaderSize || @@ -638,7 +638,7 @@ BYTE CheckSgfTyp(SvStream& rInp, USHORT& nVersion) sizeof(RGBQuad )!=RGBQuadSize ) return SGF_DONTKNOW; #endif - ULONG nPos; + sal_uLong nPos; SgfHeader aHead; nVersion=0; nPos=rInp.Tell(); diff --git a/svtools/source/filter/sgvmain.cxx b/svtools/source/filter/sgvmain.cxx index 293c6dab7964..3b0f3ebd2912 100644 --- a/svtools/source/filter/sgvmain.cxx +++ b/svtools/source/filter/sgvmain.cxx @@ -58,7 +58,7 @@ p.Paper.RandO =SWAPSHORT(p.Paper.RandO ); \ p.Paper.RandU =SWAPSHORT(p.Paper.RandU ); \ SWAPPOINT(p.U); \ - UINT16 iTemp; \ + sal_uInt16 iTemp; \ for (iTemp=0;iTemp<20;iTemp++) { \ rPage.HlpLnH[iTemp]=SWAPSHORT(rPage.HlpLnH[iTemp]); \ rPage.HlpLnV[iTemp]=SWAPSHORT(rPage.HlpLnV[iTemp]); }} @@ -118,41 +118,41 @@ SgfFontLst* pSgfFonts = 0; //////////////////////////////////////////////////////////////////////////////////////////////////// // Fuer Kreisunterarten, Text und gedrehte Rechtecke /////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// -void RotatePoint(PointType& P, INT16 cx, INT16 cy, double sn, double cs) +void RotatePoint(PointType& P, sal_Int16 cx, sal_Int16 cy, double sn, double cs) { - INT16 dx,dy; + sal_Int16 dx,dy; double x1,y1; dx=P.x-cx; dy=P.y-cy; x1=dx*cs-dy*sn; y1=dy*cs+dx*sn; - P.x=cx+INT16(x1); - P.y=cy+INT16(y1); + P.x=cx+sal_Int16(x1); + P.y=cy+sal_Int16(y1); } -void RotatePoint(Point& P, INT16 cx, INT16 cy, double sn, double cs) +void RotatePoint(Point& P, sal_Int16 cx, sal_Int16 cy, double sn, double cs) { - INT16 dx,dy; + sal_Int16 dx,dy; double x1,y1; - dx=(INT16)(P.X()-cx); - dy=(INT16)(P.Y()-cy); + dx=(sal_Int16)(P.X()-cx); + dy=(sal_Int16)(P.Y()-cy); x1=dx*cs-dy*sn; y1=dy*cs+dx*sn; - P=Point(cx+INT16(x1),cy+INT16(y1)); + P=Point(cx+sal_Int16(x1),cy+sal_Int16(y1)); } -INT16 iMulDiv(INT16 a, INT16 Mul, INT16 Div) +sal_Int16 iMulDiv(sal_Int16 a, sal_Int16 Mul, sal_Int16 Div) { - INT32 Temp; - Temp=INT32(a)*INT32(Mul)/INT32(Div); - return INT16(Temp); + sal_Int32 Temp; + Temp=sal_Int32(a)*sal_Int32(Mul)/sal_Int32(Div); + return sal_Int16(Temp); } -UINT16 MulDiv(UINT16 a, UINT16 Mul, UINT16 Div) +sal_uInt16 MulDiv(sal_uInt16 a, sal_uInt16 Mul, sal_uInt16 Div) { - UINT32 Temp; - Temp=UINT32(a)*UINT32(Mul)/UINT32(Div); - return UINT16(Temp); + sal_uInt32 Temp; + Temp=sal_uInt32(a)*sal_uInt32(Mul)/sal_uInt32(Div); + return sal_uInt16(Temp); } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -167,10 +167,10 @@ SvStream& operator>>(SvStream& rIStream, DtHdType& rDtHd) void DtHdOverSeek(SvStream& rInp) { - ULONG FPos=rInp.Tell(); - FPos+=(ULONG)DtHdSize; + sal_uLong FPos=rInp.Tell(); + FPos+=(sal_uLong)DtHdSize; rInp.Seek(FPos); -// rInp.seekg(rInp.tellg()+(ULONG)DtHdSize); +// rInp.seekg(rInp.tellg()+(sal_uLong)DtHdSize); } @@ -185,21 +185,21 @@ SvStream& operator>>(SvStream& rIStream, PageType& rPage) void ObjkOverSeek(SvStream& rInp, ObjkType& rObjk) { - ULONG Siz; - Siz=(ULONG)rObjk.MemSize+rObjk.Last; // ObjSize+ObjAnhSize + sal_uLong Siz; + Siz=(sal_uLong)rObjk.MemSize+rObjk.Last; // ObjSize+ObjAnhSize rInp.Seek(rInp.Tell()+Siz); } SvStream& operator>>(SvStream& rInp, ObjkType& rObjk) { // Die Fileposition im Stream bleibt unveraendert! - ULONG nPos; + sal_uLong nPos; nPos=rInp.Tell(); rInp.Read((char*)&rObjk.Last,ObjkSize); #if defined OSL_BIGENDIAN SWAPOBJK(rObjk); #endif #ifdef InArbeit - ULONG nPos1=rInp.Tell(); + sal_uLong nPos1=rInp.Tell(); if(nPos == nPos1) InfoBox( NULL, "tellg funkt nich" ).Execute(); #endif rInp.Seek(nPos); @@ -331,10 +331,10 @@ SvStream& operator>>(SvStream& rInp, GrupType& rGrup) |* Letzte Aenderung JOE 23.06.93 |* *************************************************************************/ -Color Sgv2SvFarbe(BYTE nFrb1, BYTE nFrb2, BYTE nInts) +Color Sgv2SvFarbe(sal_uInt8 nFrb1, sal_uInt8 nFrb2, sal_uInt8 nInts) { - UINT16 r1=0,g1=0,b1=0,r2=0,g2=0,b2=0; - BYTE nInt2=100-nInts; + sal_uInt16 r1=0,g1=0,b1=0,r2=0,g2=0,b2=0; + sal_uInt8 nInt2=100-nInts; switch(nFrb1 & 0x07) { case 0: r1=0xFF; g1=0xFF; b1=0xFF; break; case 1: r1=0xFF; g1=0xFF; break; @@ -355,9 +355,9 @@ Color Sgv2SvFarbe(BYTE nFrb1, BYTE nFrb2, BYTE nInts) case 6: b2=0xFF; break; case 7: break; } - r1=(UINT16)((UINT32)r1*nInts/100+(UINT32)r2*nInt2/100); - g1=(UINT16)((UINT32)g1*nInts/100+(UINT32)g2*nInt2/100); - b1=(UINT16)((UINT32)b1*nInts/100+(UINT32)b2*nInt2/100); + r1=(sal_uInt16)((sal_uInt32)r1*nInts/100+(sal_uInt32)r2*nInt2/100); + g1=(sal_uInt16)((sal_uInt32)g1*nInts/100+(sal_uInt32)g2*nInt2/100); + b1=(sal_uInt16)((sal_uInt32)b1*nInts/100+(sal_uInt32)b2*nInt2/100); Color aColor( (sal_uInt8)r1, (sal_uInt8)g1, (sal_uInt8)b1 ); return aColor; } @@ -458,7 +458,7 @@ void StrkType::Draw(OutputDevice& rOut) |* Letzte Aenderung JOE 23.06.93 |* *************************************************************************/ -void SgfAreaColorIntens(UINT16 Muster, BYTE Col1, BYTE Col2, BYTE Int, OutputDevice& rOut) +void SgfAreaColorIntens(sal_uInt16 Muster, sal_uInt8 Col1, sal_uInt8 Col2, sal_uInt8 Int, OutputDevice& rOut) { ObjAreaType F; F.FMuster=Muster; @@ -468,15 +468,15 @@ void SgfAreaColorIntens(UINT16 Muster, BYTE Col1, BYTE Col2, BYTE Int, OutputDev SetArea(F,rOut); } -void DrawSlideRect(INT16 x1, INT16 y1, INT16 x2, INT16 y2, ObjAreaType& F, OutputDevice& rOut) +void DrawSlideRect(sal_Int16 x1, sal_Int16 y1, sal_Int16 x2, sal_Int16 y2, ObjAreaType& F, OutputDevice& rOut) { - INT16 i,i0,b,b0; - INT16 Int1,Int2; - INT16 Col1,Col2; + sal_Int16 i,i0,b,b0; + sal_Int16 Int1,Int2; + sal_Int16 Col1,Col2; // ClipMerk: HgdClipRec; - INT16 cx,cy; - INT16 MaxR; - INT32 dx,dy; + sal_Int16 cx,cy; + sal_Int16 MaxR; + sal_Int32 dx,dy; rOut.SetLineColor(); if (x1>x2) { i=x1; x1=x2; x2=i; } @@ -484,7 +484,7 @@ void DrawSlideRect(INT16 x1, INT16 y1, INT16 x2, INT16 y2, ObjAreaType& F, Outpu Col1=F.FBFarbe & 0x87; Col2=F.FFarbe & 0x87; Int1=100-F.FIntens; Int2=F.FIntens; if (Int1==Int2) { - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut); + SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut); rOut.DrawRect(Rectangle(x1,y1,x2,y2)); } else { b0=Int1; @@ -493,30 +493,30 @@ void DrawSlideRect(INT16 x1, INT16 y1, INT16 x2, INT16 y2, ObjAreaType& F, Outpu i0=y1; i=y1; while (i<=y2) { - b=Int1+INT16((INT32)(Int2-Int1)*(INT32)(i-y1) /(INT32)(y2-y1+1)); + b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-y1) /(sal_Int32)(y2-y1+1)); if (b!=b0) { - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut); + SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut); rOut.DrawRect(Rectangle(x1,i0,x2,i-1)); i0=i; b0=b; } i++; } - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut); + SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut); rOut.DrawRect(Rectangle(x1,i0,x2,y2)); } break; case 0x28: { // horizontal i0=x1; i=x1; while (i<=x2) { - b=Int1+INT16((INT32)(Int2-Int1)*(INT32)(i-x1) /(INT32)(x2-x1+1)); + b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-x1) /(sal_Int32)(x2-x1+1)); if (b!=b0) { - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut); + SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut); rOut.DrawRect(Rectangle(i0,y1,i-1,y2)); i0=i; b0=b; } i++; } - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut); + SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut); rOut.DrawRect(Rectangle(i0,y1,x2,y2)); } break; @@ -530,14 +530,14 @@ void DrawSlideRect(INT16 x1, INT16 y1, INT16 x2, INT16 y2, ObjAreaType& F, Outpu dx=x2-x1+1; dy=y2-y1+1; a=sqrt((double)(dx*dx+dy*dy)); - MaxR=INT16(a) /2 +1; + MaxR=sal_Int16(a) /2 +1; b0=Int2; i0=MaxR; if (MaxR<1) MaxR=1; i=MaxR; while (i>=0) { - b=Int1+INT16((INT32(Int2-Int1)*INT32(i)) /INT32(MaxR)); + b=Int1+sal_Int16((sal_Int32(Int2-Int1)*sal_Int32(i)) /sal_Int32(MaxR)); if (b!=b0) { - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut); + SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut); //if (i0>200 || (Col1 & $80)!=0 || (Col2 & $80)!=0) { // then begin { Fallunterscheidung fuer etwas bessere Performance } // s2:=i0-i+2; @@ -550,7 +550,7 @@ void DrawSlideRect(INT16 x1, INT16 y1, INT16 x2, INT16 y2, ObjAreaType& F, Outpu } i--; } - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int1,rOut); + SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int1,rOut); rOut.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0)); rOut.SetClipRegion(ClipMerk); } break; // Kreis @@ -577,7 +577,7 @@ void RectType::Draw(OutputDevice& rOut) } } else { Point aPts[4]; - USHORT i; + sal_uInt16 i; double sn,cs; sn=sin(double(DrehWink)*3.14159265359/18000); cs=cos(double(DrehWink)*3.14159265359/18000); @@ -608,7 +608,7 @@ void PolyType::Draw(OutputDevice& rOut) if ((Flags & PolyClosBit) !=0) SetArea(F,rOut); SetLine(L,rOut); Polygon aPoly(nPoints); - USHORT i; + sal_uInt16 i; for(i=0;i0) rOut.DrawPolygon(aPoly); } else { - Spline2Poly(aSpln,FALSE,aPoly); + Spline2Poly(aSpln,sal_False,aPoly); if (aPoly.GetSize()>0) rOut.DrawPolyLine(aPoly); } } @@ -652,22 +652,22 @@ void SplnType::Draw(OutputDevice& rOut) |* Letzte Aenderung JOE 23.06.93 |* *************************************************************************/ -void DrawSlideCirc(INT16 cx, INT16 cy, INT16 rx, INT16 ry, ObjAreaType& F, OutputDevice& rOut) +void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAreaType& F, OutputDevice& rOut) { - INT16 x1=cx-rx; - INT16 y1=cy-ry; - INT16 x2=cx+rx; - INT16 y2=cy+ry; + sal_Int16 x1=cx-rx; + sal_Int16 y1=cy-ry; + sal_Int16 x2=cx+rx; + sal_Int16 y2=cy+ry; - INT16 i,i0,b,b0; - INT16 Int1,Int2; - INT16 Col1,Col2; + sal_Int16 i,i0,b,b0; + sal_Int16 Int1,Int2; + sal_Int16 Col1,Col2; rOut.SetLineColor(); Col1=F.FBFarbe & 0x87; Col2=F.FFarbe & 0x87; Int1=100-F.FIntens; Int2=F.FIntens; if (Int1==Int2) { - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut); + SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut); rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); } else { b0=Int1; @@ -677,16 +677,16 @@ void DrawSlideCirc(INT16 cx, INT16 cy, INT16 rx, INT16 ry, ObjAreaType& F, Outpu i0=y1; i=y1; while (i<=y2) { - b=Int1+INT16((INT32)(Int2-Int1)*(INT32)(i-y1) /(INT32)(y2-y1+1)); + b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-y1) /(sal_Int32)(y2-y1+1)); if (b!=b0) { - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut); + SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut); rOut.SetClipRegion(Rectangle(x1,i0,x2,i-1)); rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); i0=i; b0=b; } i++; } - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut); + SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut); rOut.SetClipRegion(Rectangle(x1,i0,x2,y2)); rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); rOut.SetClipRegion(ClipMerk); @@ -696,23 +696,23 @@ void DrawSlideCirc(INT16 cx, INT16 cy, INT16 rx, INT16 ry, ObjAreaType& F, Outpu i0=x1; i=x1; while (i<=x2) { - b=Int1+INT16((INT32)(Int2-Int1)*(INT32)(i-x1) /(INT32)(x2-x1+1)); + b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-x1) /(sal_Int32)(x2-x1+1)); if (b!=b0) { - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut); + SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut); rOut.SetClipRegion(Rectangle(i0,y1,i-1,y2)); rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); i0=i; b0=b; } i++; } - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut); + SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut); rOut.SetClipRegion(Rectangle(i0,y1,x2,y2)); rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); rOut.SetClipRegion(ClipMerk); } break; case 0x18: case 0x38: { // Kreis - INT16 MaxR; + sal_Int16 MaxR; if (rx<1) rx=1; if (ry<1) ry=1; @@ -721,17 +721,17 @@ void DrawSlideCirc(INT16 cx, INT16 cy, INT16 rx, INT16 ry, ObjAreaType& F, Outpu i0=MaxR; if (MaxR<1) MaxR=1; i=MaxR; while (i>=0) { - b=Int1+INT16((INT32(Int2-Int1)*INT32(i)) /INT32(MaxR)); + b=Int1+sal_Int16((sal_Int32(Int2-Int1)*sal_Int32(i)) /sal_Int32(MaxR)); if (b!=b0) { - INT32 temp=INT32(i0)*INT32(ry)/INT32(rx); - INT16 j0=INT16(temp); - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut); + sal_Int32 temp=sal_Int32(i0)*sal_Int32(ry)/sal_Int32(rx); + sal_Int16 j0=sal_Int16(temp); + SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut); rOut.DrawEllipse(Rectangle(cx-i0,cy-j0,cx+i0,cy+j0)); i0=i; b0=b; } i--; } - SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int1,rOut); + SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int1,rOut); rOut.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0)); } break; // Kreis } @@ -804,7 +804,7 @@ void BmapType::Draw(OutputDevice& rOut) { //ifstream aInp; unsigned char nSgfTyp; - USHORT nVersion; + sal_uInt16 nVersion; String aStr( reinterpret_cast< char const * >(&Filename[ 1 ]), (xub_StrLen)Filename[ 0 ], RTL_TEXTENCODING_UTF8 ); @@ -818,7 +818,7 @@ void BmapType::Draw(OutputDevice& rOut) case SGF_BITIMAGE: { GraphicFilter aFlt; Graphic aGrf; - USHORT nRet; + sal_uInt16 nRet; nRet=aFlt.ImportGraphic(aGrf,aFNam); aGrf.Draw(&rOut,Point(Pos1.x,Pos1.y),Size(Pos2.x-Pos1.x,Pos2.y-Pos1.y)); } break; @@ -830,7 +830,7 @@ void BmapType::Draw(OutputDevice& rOut) SgfVectYmul=Pos2.y-Pos1.y; SgfVectXdiv=0; SgfVectYdiv=0; - SgfVectScal=TRUE; + SgfVectScal=sal_True; SgfVectFilter(*pInp,aMtf); SgfVectXofs=0; SgfVectYofs=0; @@ -838,7 +838,7 @@ void BmapType::Draw(OutputDevice& rOut) SgfVectYmul=0; SgfVectXdiv=0; SgfVectYdiv=0; - SgfVectScal=FALSE; + SgfVectScal=sal_False; aMtf.Play(&rOut); } break; } @@ -856,9 +856,9 @@ void BmapType::Draw(OutputDevice& rOut) |* Letzte Aenderung JOE 23.06.93 |* *************************************************************************/ -UINT32 GrupType::GetSubPtr() +sal_uInt32 GrupType::GetSubPtr() { - return UINT32(SbLo)+0x00010000*UINT32(SbHi); + return sal_uInt32(SbLo)+0x00010000*sal_uInt32(SbHi); } /************************************************************************* @@ -873,8 +873,8 @@ UINT32 GrupType::GetSubPtr() void DrawObjkList( SvStream& rInp, OutputDevice& rOut ) { ObjkType aObjk; - USHORT nGrpCnt=0; - BOOL bEnde=FALSE; + sal_uInt16 nGrpCnt=0; + sal_Bool bEnde=sal_False; do { rInp>>aObjk; if (!rInp.GetError()) { @@ -941,11 +941,11 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut ) } // if rInp if (!rInp.GetError()) { if (aObjk.Next==0L) { - if (nGrpCnt==0) bEnde=TRUE; + if (nGrpCnt==0) bEnde=sal_True; else nGrpCnt--; } } else { - bEnde=TRUE; // Lesefehler + bEnde=sal_True; // Lesefehler } } while (!bEnde); } @@ -985,15 +985,15 @@ void SkipObjkList(SvStream& rInp) |* Letzte Aenderung JOE 23.06.93 |* *************************************************************************/ -BOOL SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) +sal_Bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; PageType aPage; VirtualDevice aOutDev; OutputDevice* pOutDev; - ULONG nStdPos; - ULONG nZchPos; - USHORT Num; + sal_uLong nStdPos; + sal_uLong nZchPos; + sal_uInt16 Num; pOutDev=&aOutDev; DtHdOverSeek(rInp); // DataHeader weglesen @@ -1029,8 +1029,8 @@ BOOL SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) rMtf.WindStart(); MapMode aMap(MAP_10TH_MM,Point(),Fraction(1,4),Fraction(1,4)); rMtf.SetPrefMapMode(aMap); - rMtf.SetPrefSize(Size((INT16)aPage.Paper.Size.x,(INT16)aPage.Paper.Size.y)); - bRet=TRUE; + rMtf.SetPrefSize(Size((sal_Int16)aPage.Paper.Size.x,(sal_Int16)aPage.Paper.Size.y)); + bRet=sal_True; return bRet; } @@ -1045,18 +1045,18 @@ BOOL SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) |* Letzte Aenderung JOE 23.06.93 |* *************************************************************************/ -BOOL SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath ) +sal_Bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath ) { #if OSL_DEBUG_LEVEL > 1 // Recordgroessen checken. Neuer Compiler hat vielleichte anderes Alignment! - if (sizeof(ObjTextType)!=ObjTextTypeSize) return FALSE; + if (sizeof(ObjTextType)!=ObjTextTypeSize) return sal_False; #endif - ULONG nFileStart; // Offset des SgfHeaders. Im allgemeinen 0. + sal_uLong nFileStart; // Offset des SgfHeaders. Im allgemeinen 0. SgfHeader aHead; SgfEntry aEntr; - ULONG nNext; - BOOL bRdFlag=FALSE; // Grafikentry gelesen ? - BOOL bRet=FALSE; // Returncode + sal_uLong nNext; + sal_Bool bRdFlag=sal_False; // Grafikentry gelesen ? + sal_Bool bRet=sal_False; // Returncode aIniPath.Append( String::CreateFromAscii( "sgf.ini", 7 ) ); // aIniPath.ToAbs(); @@ -1077,7 +1077,7 @@ BOOL SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath ) } } // while(nNext) if (bRdFlag) { - if (!rInp.GetError()) bRet=TRUE; // Scheinbar Ok + if (!rInp.GetError()) bRet=sal_True; // Scheinbar Ok } } delete pSgfFonts; @@ -1085,7 +1085,7 @@ BOOL SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath ) } /* -Bitmap Dither(BYTE Intens) +Bitmap Dither(sal_uInt8 Intens) { Bitmap aBmp; BmpInfoHeader Info; diff --git a/svtools/source/filter/sgvspln.cxx b/svtools/source/filter/sgvspln.cxx index d695e171a194..aac7e1f04e0a 100644 --- a/svtools/source/filter/sgvspln.cxx +++ b/svtools/source/filter/sgvspln.cxx @@ -140,10 +140,6 @@ short basis() /* BASIS maschinenunabhaengig bestimmen */ #define NEGMAX -POSMIN /* groesste negative Zahl */ #define NEGMIN -POSMAX /* kleinste negative Zahl */ -#define TRUE 1 -#define FALSE 0 - - /* Definition von Funktionsmakros: */ @@ -170,7 +166,7 @@ short basis() /* BASIS maschinenunabhaengig bestimmen */ /*---------------------- MODUL TRIDIAGONAL ------------------------*/ -USHORT TriDiagGS(BOOL rep, USHORT n, double* lower, +sal_uInt16 TriDiagGS(sal_Bool rep, sal_uInt16 n, double* lower, double* diag, double* upper, double* b) /************************/ /* GAUSS-Verfahren fuer */ @@ -207,7 +203,7 @@ USHORT TriDiagGS(BOOL rep, USHORT n, double* lower, /* */ /* Eingabeparameter: */ /* ================ */ -/* n Dimension der Matrix ( > 1 ) USHORT n */ +/* n Dimension der Matrix ( > 1 ) sal_uInt16 n */ /* */ /* lower untere Nebendiagonale double lower[n] */ /* diag Hauptdiagonale double diag[n] */ @@ -217,7 +213,7 @@ USHORT TriDiagGS(BOOL rep, USHORT n, double* lower, /* Dreieckzerlegung der Ausgangsmatrix. */ /* */ /* b rechte Seite des Systems double b[n] */ -/* rep = 0 erstmaliger Aufruf BOOL rep */ +/* rep = 0 erstmaliger Aufruf sal_Bool rep */ /* !=0 wiederholter Aufruf */ /* fuer gleiche Matrix, */ /* aber verschiedenes b. */ @@ -251,7 +247,7 @@ USHORT TriDiagGS(BOOL rep, USHORT n, double* lower, /*.cp 5 */ { - USHORT i; + sal_uInt16 i; short j; // double fabs(double); @@ -302,7 +298,7 @@ USHORT TriDiagGS(BOOL rep, USHORT n, double* lower, /*---------------- MODUL ZYKLISCH TRIDIAGONAL ----------------------*/ -USHORT ZyklTriDiagGS(BOOL rep, USHORT n, double* lower, double* diag, +sal_uInt16 ZyklTriDiagGS(sal_Bool rep, sal_uInt16 n, double* lower, double* diag, double* upper, double* lowrow, double* ricol, double* b) /******************************/ /* Systeme mit zyklisch tri- */ @@ -343,12 +339,12 @@ USHORT ZyklTriDiagGS(BOOL rep, USHORT n, double* lower, double* diag, /* */ /* Eingabeparameter: */ /* ================ */ -/* n Dimension der Matrix ( > 2 ) USHORT n */ +/* n Dimension der Matrix ( > 2 ) sal_uInt16 n */ /* lower untere Nebendiagonale double lower[n] */ /* diag Hauptdiagonale double diag[n] */ /* upper obere Nebendiagonale double upper[n] */ /* b rechte Seite des Systems double b[n] */ -/* rep = 0 erstmaliger Aufruf BOOL rep */ +/* rep = 0 erstmaliger Aufruf sal_Bool rep */ /* !=0 wiederholter Aufruf */ /* fuer gleiche Matrix, */ /* aber verschiedenes b. */ @@ -385,7 +381,7 @@ USHORT ZyklTriDiagGS(BOOL rep, USHORT n, double* lower, double* diag, /*.cp 5 */ { double temp; // fabs(double); - USHORT i; + sal_uInt16 i; short j; if ( n < 3 ) return(1); @@ -458,15 +454,15 @@ USHORT ZyklTriDiagGS(BOOL rep, USHORT n, double* lower, double* diag, |* *************************************************************************/ -USHORT NaturalSpline(USHORT n, double* x, double* y, +sal_uInt16 NaturalSpline(sal_uInt16 n, double* x, double* y, double Marg0, double MargN, - BYTE MargCond, + sal_uInt8 MargCond, double* b, double* c, double* d) { - USHORT i; + sal_uInt16 i; double* a; double* h; - USHORT error; + sal_uInt16 error; if (n<2) return 1; if ( (MargCond & ~3) ) return 2; @@ -516,7 +512,7 @@ USHORT NaturalSpline(USHORT n, double* x, double* y, if (n==2) { c[1]=a[0]/d[0]; } else { - error=TriDiagGS(FALSE,n-1,b,d,c,a); + error=TriDiagGS(sal_False,n-1,b,d,c,a); if (error!=0) { delete[] a; delete[] h; return error+2; } for (i=0;i0) n--; // n Korregieren (Anzahl der Teilpolynome) - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if ( ( Marg == 3 && n >= 3 ) || ( Marg == 2 && n >= 2 ) ) { - bRet = ParaSpline(n,ax,ay,Marg,Marg01,Marg01,MargN1,MargN2,FALSE,T,bx,cx,dx,by,cy,dy) == 0; + bRet = ParaSpline(n,ax,ay,Marg,Marg01,Marg01,MargN1,MargN2,sal_False,T,bx,cx,dx,by,cy,dy) == 0; } - if ( bRet == FALSE ) + if ( bRet == sal_False ) { delete[] ax; delete[] ay; @@ -811,7 +807,7 @@ BOOL CalcSpline(Polygon& rPoly, BOOL Periodic, USHORT& n, |* Beschreibung Konvertiert einen parametrichen kubischen |* Polynomspline Spline (natuerlich oder periodisch) |* in ein angenaehertes Polygon. -|* Die Funktion liefert FALSE, wenn ein Fehler bei +|* Die Funktion liefert sal_False, wenn ein Fehler bei |* der Koeffizientenberechnung aufgetreten ist oder |* das Polygon zu gross wird (>PolyMax=16380). Im 1. |* Fall hat das Polygon 0, im 2. Fall PolyMax Punkte. @@ -821,7 +817,7 @@ BOOL CalcSpline(Polygon& rPoly, BOOL Periodic, USHORT& n, |* Letzte Aenderung JOE 23.06.93 |* *************************************************************************/ -BOOL Spline2Poly(Polygon& rSpln, BOOL Periodic, Polygon& rPoly) +sal_Bool Spline2Poly(Polygon& rSpln, sal_Bool Periodic, Polygon& rPoly) { short MinKoord=-32000; // zur Vermeidung short MaxKoord=32000; // von Ueberlaeufen @@ -839,11 +835,11 @@ BOOL Spline2Poly(Polygon& rSpln, BOOL Periodic, Polygon& rPoly) double Step; // Schrittweite fuer t double dt1,dt2,dt3; // Delta t, y, ^3 double t; - BOOL bEnde; // Teilpolynom zu Ende? - USHORT n; // Anzahl der zu zeichnenden Teilpolynome - USHORT i; // aktuelles Teilpolynom - BOOL bOk; // noch alles ok? - USHORT PolyMax=16380;// Maximale Anzahl von Polygonpunkten + sal_Bool bEnde; // Teilpolynom zu Ende? + sal_uInt16 n; // Anzahl der zu zeichnenden Teilpolynome + sal_uInt16 i; // aktuelles Teilpolynom + sal_Bool bOk; // noch alles ok? + sal_uInt16 PolyMax=16380;// Maximale Anzahl von Polygonpunkten long x,y; bOk=CalcSpline(rSpln,Periodic,n,ax,ay,bx,by,cx,cy,dx,dy,tv); @@ -855,7 +851,7 @@ BOOL Spline2Poly(Polygon& rSpln, BOOL Periodic, Polygon& rPoly) i=0; while (i=tv[i+1]; if (bEnde) t=tv[i+1]; @@ -868,7 +864,7 @@ BOOL Spline2Poly(Polygon& rSpln, BOOL Periodic, Polygon& rPoly) rPoly.SetSize(rPoly.GetSize()+1); rPoly.SetPoint(Point(short(x),short(y)),rPoly.GetSize()-1); } else { - bOk=FALSE; // Fehler: Polygon wird zu gross + bOk=sal_False; // Fehler: Polygon wird zu gross } t=t+Step; } // Ende von Teilpolynom @@ -886,5 +882,5 @@ BOOL Spline2Poly(Polygon& rSpln, BOOL Periodic, Polygon& rPoly) return bOk; } // Ende von if (bOk) rPoly.SetSize(0); - return FALSE; + return sal_False; } diff --git a/svtools/source/filter/sgvtext.cxx b/svtools/source/filter/sgvtext.cxx index 9a82cd486599..f0130b21c9d6 100644 --- a/svtools/source/filter/sgvtext.cxx +++ b/svtools/source/filter/sgvtext.cxx @@ -213,9 +213,9 @@ extern SgfFontLst* pSgfFonts; ///////////////////////////////////////////////////////////////////////////////// -BOOL CheckTextOutl(ObjAreaType& F, ObjLineType& L); +sal_Bool CheckTextOutl(ObjAreaType& F, ObjLineType& L); -BOOL CheckTextOutl(ObjAreaType& F, ObjLineType& L) +sal_Bool CheckTextOutl(ObjAreaType& F, ObjLineType& L) { return (F.FIntens!=L.LIntens) || ((F.FFarbe!=L.LFarbe) && (F.FIntens>0)) || @@ -261,11 +261,11 @@ short Sgf2hPoint(short a) // Unterkante berechnen. Alles in SGF-Units. // ====================================================================== -USHORT GetTopToBaseLine(USHORT MaxGrad) +sal_uInt16 GetTopToBaseLine(sal_uInt16 MaxGrad) { long ret; ret=long(MaxGrad)*long(CharTopToBase) /long(100); - return USHORT(ret); + return sal_uInt16(ret); } // ====================================================================== @@ -306,9 +306,9 @@ UCHAR ConvertTextChar(UCHAR c) -USHORT GetSchnittBit(UCHAR c) +sal_uInt16 GetSchnittBit(UCHAR c) { - USHORT r=0; + sal_uInt16 r=0; switch (c) { case EscBold : r=TextBoldBit; break; case EscRSlnt: r=TextRSlnBit; break; @@ -349,10 +349,10 @@ long ChgValue(long Def, long Min, long Max, UCHAR FlgVal, long NumVal) -void ChgSchnittBit(USHORT Bit, USHORT Radio1, USHORT Radio2, USHORT Radio3, - UCHAR FlgVal, USHORT Schnitt0, USHORT& Schnitt) +void ChgSchnittBit(sal_uInt16 Bit, sal_uInt16 Radio1, sal_uInt16 Radio2, sal_uInt16 Radio3, + UCHAR FlgVal, sal_uInt16 Schnitt0, sal_uInt16& Schnitt) { - USHORT All,Rad; + sal_uInt16 All,Rad; Rad=Radio1 | Radio2 | Radio3; All=Bit | Rad; @@ -367,9 +367,9 @@ void ChgSchnittBit(USHORT Bit, USHORT Radio1, USHORT Radio2, USHORT Radio3, -UCHAR GetNextChar(UCHAR* TBuf, USHORT Index) +UCHAR GetNextChar(UCHAR* TBuf, sal_uInt16 Index) { - USHORT Cnt; + sal_uInt16 Cnt; while (TBuf[Index]==Escape) { Index++; Cnt=0; @@ -382,24 +382,24 @@ UCHAR GetNextChar(UCHAR* TBuf, USHORT Index) -UCHAR ProcessOne(UCHAR* TBuf, USHORT& Index, +UCHAR ProcessOne(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType& AktAtr, - BOOL ScanEsc) + sal_Bool ScanEsc) { UCHAR c; UCHAR Ident; - BOOL Ende; - BOOL q; + sal_Bool Ende; + sal_Bool q; UCHAR FlgVal; long NumVal; long Sgn; short i; - BOOL EoVal; + sal_Bool EoVal; do { c=TBuf[Index]; Index++; Ende=(c!=Escape); - if (Ende==FALSE) { + if (Ende==sal_False) { c=TBuf[Index]; Index++; Ident=c; // Identifer merken FlgVal=EscNoFlg; @@ -413,36 +413,36 @@ UCHAR ProcessOne(UCHAR* TBuf, USHORT& Index, do { NumVal=10*NumVal+c-'0'; EoVal=(TBuf[Index]<'0' || TBuf[Index]>'9'); - if (EoVal==FALSE) { c=TBuf[Index]; Index++; } + if (EoVal==sal_False) { c=TBuf[Index]; Index++; } i--; - } while (i>0 && EoVal==FALSE); + } while (i>0 && EoVal==sal_False); NumVal=Sgn*NumVal; } q=!CheckTextOutl(AktAtr.F,AktAtr.L); switch (Ident) { - case EscFont : AktAtr.SetFont(ULONG (ChgValue(Atr0.GetFont(),0,0 ,FlgVal,NumVal)));break; - case EscGrad : AktAtr.Grad =USHORT(ChgValue(Atr0.Grad, 2,2000 ,FlgVal,NumVal)); break; - case EscBreit: AktAtr.Breite =USHORT(ChgValue(Atr0.Breite, 1,1000 ,FlgVal,NumVal)); break; - case EscKaptS: AktAtr.Kapit =(BYTE)(ChgValue(Atr0.Kapit, 1,255 ,FlgVal,NumVal)); break; - case EscLFeed: AktAtr.LnFeed =USHORT(ChgValue(Atr0.LnFeed, 1,65535 ,FlgVal,NumVal)); break; - case EscSlant: AktAtr.Slant =USHORT(ChgValue(Atr0.Slant, 1,MaxCharSlant ,FlgVal,NumVal)); break; + case EscFont : AktAtr.SetFont(sal_uLong (ChgValue(Atr0.GetFont(),0,0 ,FlgVal,NumVal)));break; + case EscGrad : AktAtr.Grad =sal_uInt16(ChgValue(Atr0.Grad, 2,2000 ,FlgVal,NumVal)); break; + case EscBreit: AktAtr.Breite =sal_uInt16(ChgValue(Atr0.Breite, 1,1000 ,FlgVal,NumVal)); break; + case EscKaptS: AktAtr.Kapit =(sal_uInt8)(ChgValue(Atr0.Kapit, 1,255 ,FlgVal,NumVal)); break; + case EscLFeed: AktAtr.LnFeed =sal_uInt16(ChgValue(Atr0.LnFeed, 1,65535 ,FlgVal,NumVal)); break; + case EscSlant: AktAtr.Slant =sal_uInt16(ChgValue(Atr0.Slant, 1,MaxCharSlant ,FlgVal,NumVal)); break; case EscVPos : AktAtr.ChrVPos=char (ChgValue(Atr0.ChrVPos,-128,127 ,FlgVal,NumVal)); break; - case EscZAbst: AktAtr.ZAbst =(BYTE)(ChgValue(Atr0.ZAbst, 1,255 ,FlgVal,NumVal)); break; - case EscHJust: AktAtr.Justify=(BYTE)(ChgValue(Atr0.Justify & 0x0F,0,5 ,FlgVal,NumVal)); break; - case EscFarbe: { AktAtr.L.LFarbe =(BYTE)(ChgValue(Atr0.L.LFarbe,0,7 ,FlgVal,NumVal)); if (q) AktAtr.F.FFarbe =AktAtr.L.LFarbe; } break; - case EscBFarb: { AktAtr.L.LBFarbe=(BYTE)(ChgValue(Atr0.L.LBFarbe,0,255,FlgVal,NumVal)); if (q) AktAtr.F.FBFarbe=AktAtr.L.LBFarbe; } break; - case EscInts : { AktAtr.L.LIntens=(BYTE)(ChgValue(Atr0.L.LIntens,0,100,FlgVal,NumVal)); if (q) AktAtr.F.FIntens=AktAtr.L.LIntens; } break; - - case EscMustr: { AktAtr.F.FMuster=USHORT(ChgValue(Atr0.F.FMuster,0,65535,FlgVal,NumVal)); } break; - case EscMFarb: { AktAtr.F.FFarbe =(BYTE)(ChgValue(Atr0.F.FFarbe,0,7 ,FlgVal,NumVal)); } break; - case EscMBFrb: { AktAtr.F.FBFarbe=(BYTE)(ChgValue(Atr0.F.FBFarbe,0,255,FlgVal,NumVal)); } break; - case EscMInts: { AktAtr.F.FIntens=(BYTE)(ChgValue(Atr0.F.FIntens,0,100,FlgVal,NumVal)); } break; - - case EscSMstr: { AktAtr.ShdF.FMuster=USHORT(ChgValue(Atr0.ShdF.FMuster,0,65535,FlgVal,NumVal)); } break; - case EscSFarb: { AktAtr.ShdL.LFarbe =(BYTE)(ChgValue(Atr0.ShdL.LFarbe,0,7 ,FlgVal,NumVal)); AktAtr.ShdF.FFarbe =AktAtr.ShdL.LFarbe; } break; - case EscSBFrb: { AktAtr.ShdL.LBFarbe=(BYTE)(ChgValue(Atr0.ShdL.LBFarbe,0,255,FlgVal,NumVal)); AktAtr.ShdF.FBFarbe=AktAtr.ShdL.LBFarbe; } break; - case EscSInts: { AktAtr.ShdL.LIntens=(BYTE)(ChgValue(Atr0.ShdL.LIntens,0,100,FlgVal,NumVal)); AktAtr.ShdF.FIntens=AktAtr.ShdL.LIntens; } break; + case EscZAbst: AktAtr.ZAbst =(sal_uInt8)(ChgValue(Atr0.ZAbst, 1,255 ,FlgVal,NumVal)); break; + case EscHJust: AktAtr.Justify=(sal_uInt8)(ChgValue(Atr0.Justify & 0x0F,0,5 ,FlgVal,NumVal)); break; + case EscFarbe: { AktAtr.L.LFarbe =(sal_uInt8)(ChgValue(Atr0.L.LFarbe,0,7 ,FlgVal,NumVal)); if (q) AktAtr.F.FFarbe =AktAtr.L.LFarbe; } break; + case EscBFarb: { AktAtr.L.LBFarbe=(sal_uInt8)(ChgValue(Atr0.L.LBFarbe,0,255,FlgVal,NumVal)); if (q) AktAtr.F.FBFarbe=AktAtr.L.LBFarbe; } break; + case EscInts : { AktAtr.L.LIntens=(sal_uInt8)(ChgValue(Atr0.L.LIntens,0,100,FlgVal,NumVal)); if (q) AktAtr.F.FIntens=AktAtr.L.LIntens; } break; + + case EscMustr: { AktAtr.F.FMuster=sal_uInt16(ChgValue(Atr0.F.FMuster,0,65535,FlgVal,NumVal)); } break; + case EscMFarb: { AktAtr.F.FFarbe =(sal_uInt8)(ChgValue(Atr0.F.FFarbe,0,7 ,FlgVal,NumVal)); } break; + case EscMBFrb: { AktAtr.F.FBFarbe=(sal_uInt8)(ChgValue(Atr0.F.FBFarbe,0,255,FlgVal,NumVal)); } break; + case EscMInts: { AktAtr.F.FIntens=(sal_uInt8)(ChgValue(Atr0.F.FIntens,0,100,FlgVal,NumVal)); } break; + + case EscSMstr: { AktAtr.ShdF.FMuster=sal_uInt16(ChgValue(Atr0.ShdF.FMuster,0,65535,FlgVal,NumVal)); } break; + case EscSFarb: { AktAtr.ShdL.LFarbe =(sal_uInt8)(ChgValue(Atr0.ShdL.LFarbe,0,7 ,FlgVal,NumVal)); AktAtr.ShdF.FFarbe =AktAtr.ShdL.LFarbe; } break; + case EscSBFrb: { AktAtr.ShdL.LBFarbe=(sal_uInt8)(ChgValue(Atr0.ShdL.LBFarbe,0,255,FlgVal,NumVal)); AktAtr.ShdF.FBFarbe=AktAtr.ShdL.LBFarbe; } break; + case EscSInts: { AktAtr.ShdL.LIntens=(sal_uInt8)(ChgValue(Atr0.ShdL.LIntens,0,100,FlgVal,NumVal)); AktAtr.ShdF.FIntens=AktAtr.ShdL.LIntens; } break; case EscSDist: { AktAtr.ShdVers.x=(short)ChgValue(Atr0.ShdVers.x,0,30000,FlgVal,NumVal); AktAtr.ShdVers.y=AktAtr.ShdVers.x; } break; case EscSXDst: { AktAtr.ShdVers.x=(short)ChgValue(Atr0.ShdVers.x,0,30000,FlgVal,NumVal); } break; case EscSYDst: { AktAtr.ShdVers.y=(short)ChgValue(Atr0.ShdVers.y,0,30000,FlgVal,NumVal); } break; @@ -463,21 +463,21 @@ UCHAR ProcessOne(UCHAR* TBuf, USHORT& Index, case EscEbShd: ChgSchnittBit(TextShEbBit,TextSh2DBit,TextSh3DBit,TextSh4DBit,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break; } //endcase if (TBuf[Index]==Escape) Index++; // zweites Esc weglesen } - } // if Ende==FALSE - } while (Ende==FALSE && ScanEsc==FALSE); - if (Ende==FALSE) c=Escape; + } // if Ende==sal_False + } while (Ende==sal_False && ScanEsc==sal_False); + if (Ende==sal_False) c=Escape; return c; } // end of ProcessOne -UCHAR GetTextChar(UCHAR* TBuf, USHORT& Index, +UCHAR GetTextChar(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType& AktAtr, - USHORT Rest, BOOL ScanEsc) + sal_uInt16 Rest, sal_Bool ScanEsc) { UCHAR c,c0,nc; c=ProcessOne(TBuf,Index,Atr0,AktAtr,ScanEsc); - if (ScanEsc==FALSE) { + if (ScanEsc==sal_False) { if (c==SoftTrennAdd || c==SoftTrennK || c==SoftTrenn) { nc=GetNextChar(TBuf,Index); c0=c; @@ -507,9 +507,9 @@ UCHAR GetTextChar(UCHAR* TBuf, USHORT& Index, -UCHAR GetTextCharConv(UCHAR* TBuf, USHORT& Index, +UCHAR GetTextCharConv(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType& AktAtr, - USHORT Rest, BOOL ScanEsc) + sal_uInt16 Rest, sal_Bool ScanEsc) { UCHAR c; @@ -530,23 +530,23 @@ UCHAR GetTextCharConv(UCHAR* TBuf, USHORT& Index, // // Benoetigter Zeilenabstand in SGF-Units. ChrVPos wird beruecksichtigt. // ====================================================================== -USHORT GetLineFeed(UCHAR* TBuf, USHORT Index, ObjTextType Atr0, ObjTextType AktAtr, - USHORT nChar, USHORT& LF, USHORT& MaxGrad) +sal_uInt16 GetLineFeed(UCHAR* TBuf, sal_uInt16 Index, ObjTextType Atr0, ObjTextType AktAtr, + sal_uInt16 nChar, sal_uInt16& LF, sal_uInt16& MaxGrad) { UCHAR c=0; - BOOL AbsEnd=FALSE; - ULONG LF100=0; - ULONG MaxLF100=0; - BOOL LFauto=0; - BOOL First=TRUE; - USHORT Grad; - USHORT i=0; - USHORT r=1; + sal_Bool AbsEnd=sal_False; + sal_uLong LF100=0; + sal_uLong MaxLF100=0; + sal_Bool LFauto=0; + sal_Bool First=sal_True; + sal_uInt16 Grad; + sal_uInt16 i=0; + sal_uInt16 r=1; MaxGrad=0; while (!AbsEnd && nChar>0) { nChar--; - c=GetTextChar(TBuf,Index,Atr0,AktAtr,nChar,FALSE); + c=GetTextChar(TBuf,Index,Atr0,AktAtr,nChar,sal_False); i++; AbsEnd=(c==TextEnd || c==AbsatzEnd); if (First || (!AbsEnd && c!=' ' && c!=HardTrenn)) { @@ -558,15 +558,15 @@ USHORT GetLineFeed(UCHAR* TBuf, USHORT Index, ObjTextType Atr0, ObjTextType AktA Grad=AktAtr.Grad; if (AktAtr.ChrVPos>0) Grad=Grad-AktAtr.ChrVPos; if (Grad>MaxGrad) MaxGrad=Grad; - First=FALSE; + First=sal_False; } if (!AbsEnd && c!=' ') r=i; } MaxGrad=hPoint2Sgf(MaxGrad); if (MaxLF100<=4000) { // sonst Overflowgefahr - LF=USHORT(hPoint2Sgf(short(MaxLF100)) /100); + LF=sal_uInt16(hPoint2Sgf(short(MaxLF100)) /100); } else { - LF=USHORT(hPoint2Sgf(short(MaxLF100) /100)); + LF=sal_uInt16(hPoint2Sgf(short(MaxLF100) /100)); } return r; @@ -588,17 +588,17 @@ USHORT GetLineFeed(UCHAR* TBuf, USHORT Index, ObjTextType Atr0, ObjTextType AktA #define SuperSubFact 60 /* SuperScript/SubScript: 60% vom Schriftgrad */ #define DefaultSpace 40 /* Default: Space ist 40% vom SchriftGrad */ -USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dreh, - USHORT FitXMul, USHORT FitXDiv, USHORT FitYMul, USHORT FitYDiv) +sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, sal_Bool Kapt, sal_uInt16 Dreh, + sal_uInt16 FitXMul, sal_uInt16 FitXDiv, sal_uInt16 FitYMul, sal_uInt16 FitYDiv) { SgfFontOne* pSgfFont; // Font aus dem IniFile Font aFont; Color aColor; - ULONG Grad; - ULONG Brei; + sal_uLong Grad; + sal_uLong Brei; String FNam; - USHORT StdBrei=50; // Durchschnittliche Zeichenbreite in % von Schriftgrad - BOOL bFit=(FitXMul!=1 || FitXDiv!=1 || FitYMul!=1 || FitYDiv!=1); + sal_uInt16 StdBrei=50; // Durchschnittliche Zeichenbreite in % von Schriftgrad + sal_Bool bFit=(FitXMul!=1 || FitXDiv!=1 || FitYMul!=1 || FitYDiv!=1); pSgfFont = pSgfFonts->GetFontDesc(Atr.GetFont()); @@ -649,25 +649,25 @@ USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dr //aFont.SetCharSet(CHARSET_SYSTEM); } - Grad=ULONG(Atr.Grad); - if ((Atr.Schnitt & TextKaptBit) !=0 && Kapt) Grad=Grad*ULONG(Atr.Kapit)/100; + Grad=sal_uLong(Atr.Grad); + if ((Atr.Schnitt & TextKaptBit) !=0 && Kapt) Grad=Grad*sal_uLong(Atr.Kapit)/100; if ((Atr.Schnitt & TextSupSBit) !=0 || (Atr.Schnitt & TextSubSBit) !=0) Grad=Grad*SuperSubFact/100; Brei=Grad; if (Atr.Breite!=100 || bFit) { if (bFit) { - Grad=Grad*ULONG(FitYMul)/ULONG(FitYDiv); - Brei=Brei*ULONG(FitXMul)/ULONG(FitXDiv); + Grad=Grad*sal_uLong(FitYMul)/sal_uLong(FitYDiv); + Brei=Brei*sal_uLong(FitXMul)/sal_uLong(FitXDiv); } - Brei=Brei*ULONG(Atr.Breite)/100; - Brei=Brei*ULONG(StdBrei)/100; - aFont.SetSize(Size(hPoint2Sgf(USHORT(Brei)),hPoint2Sgf(USHORT(Grad)))); + Brei=Brei*sal_uLong(Atr.Breite)/100; + Brei=Brei*sal_uLong(StdBrei)/100; + aFont.SetSize(Size(hPoint2Sgf(sal_uInt16(Brei)),hPoint2Sgf(sal_uInt16(Grad)))); } else { - aFont.SetSize(Size(0,hPoint2Sgf(USHORT(Grad)))); + aFont.SetSize(Size(0,hPoint2Sgf(sal_uInt16(Grad)))); } aColor=Sgv2SvFarbe(Atr.L.LFarbe,Atr.L.LBFarbe,Atr.L.LIntens); aFont.SetColor(aColor); aColor=Sgv2SvFarbe(Atr.F.FFarbe,Atr.F.FBFarbe,Atr.F.FIntens); aFont.SetFillColor(aColor); - aFont.SetTransparent(TRUE); + aFont.SetTransparent(sal_True); aFont.SetAlign(ALIGN_BASELINE); Dreh/=10; Dreh=3600-Dreh; if (Dreh==3600) Dreh=0; @@ -679,11 +679,11 @@ USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dr if ((Atr.Schnitt & TextDbUnBit) !=0) aFont.SetUnderline(UNDERLINE_DOUBLE); if ((Atr.Schnitt & TextStrkBit) !=0) aFont.SetStrikeout(STRIKEOUT_SINGLE); if ((Atr.Schnitt & TextDbStBit) !=0) aFont.SetStrikeout(STRIKEOUT_DOUBLE); - if ((Atr.Schnitt & TextSh2DBit) !=0) aFont.SetShadow(TRUE); - if ((Atr.Schnitt & TextSh3DBit) !=0) aFont.SetShadow(TRUE); - if ((Atr.Schnitt & TextSh4DBit) !=0) aFont.SetShadow(TRUE); - if ((Atr.Schnitt & TextShEbBit) !=0) aFont.SetShadow(TRUE); - if (CheckTextOutl(Atr.F,Atr.L)) aFont.SetOutline(TRUE); + if ((Atr.Schnitt & TextSh2DBit) !=0) aFont.SetShadow(sal_True); + if ((Atr.Schnitt & TextSh3DBit) !=0) aFont.SetShadow(sal_True); + if ((Atr.Schnitt & TextSh4DBit) !=0) aFont.SetShadow(sal_True); + if ((Atr.Schnitt & TextShEbBit) !=0) aFont.SetShadow(sal_True); + if (CheckTextOutl(Atr.F,Atr.L)) aFont.SetOutline(sal_True); if (aFont!=rOut.GetFont()) rOut.SetFont(aFont); @@ -702,26 +702,26 @@ USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dr // Absatz.Pas struct ProcChrSta { - USHORT Index; - USHORT ChrXP; + sal_uInt16 Index; + sal_uInt16 ChrXP; UCHAR OutCh; - BOOL Kapt; + sal_Bool Kapt; ObjTextType Attrib; }; -void InitProcessCharState(ProcChrSta& State, ObjTextType& AktAtr, USHORT IndexA) +void InitProcessCharState(ProcChrSta& State, ObjTextType& AktAtr, sal_uInt16 IndexA) { State.Attrib=AktAtr; State.OutCh=0; State.Index=IndexA; State.ChrXP=0; - State.Kapt=FALSE; + State.Kapt=sal_False; } -BOOL UpcasePossible(UCHAR c) +sal_Bool UpcasePossible(UCHAR c) { - if ((c>='a' && c<='z') || c == 0xe4 || c == 0xf6 || c == 0xfc ) return TRUE; - else return FALSE; + if ((c>='a' && c<='z') || c == 0xe4 || c == 0xf6 || c == 0xfc ) return sal_True; + else return sal_False; } UCHAR Upcase(UCHAR c) @@ -733,15 +733,15 @@ UCHAR Upcase(UCHAR c) return c; } -USHORT GetCharWidth(OutputDevice& rOut, UCHAR c) +sal_uInt16 GetCharWidth(OutputDevice& rOut, UCHAR c) { UCHAR c1; - USHORT ChrWidth; + sal_uInt16 ChrWidth; c1 = ByteString::Convert((char)c,RTL_TEXTENCODING_IBM_437, gsl_getSystemTextEncoding() ); if (c==' ') { - ChrWidth=(USHORT)rOut.GetTextWidth( String('A') ); + ChrWidth=(sal_uInt16)rOut.GetTextWidth( String('A') ); if (rOut.GetFont().GetPitch()!=PITCH_FIXED) { ChrWidth=MulDiv(ChrWidth,DefaultSpace,100); } @@ -751,30 +751,30 @@ USHORT GetCharWidth(OutputDevice& rOut, UCHAR c) OSL_ENSURE( MaxChar == 255, "MaxChar not 255" ); if (c>=MinChar /*&& c<=MaxChar*/) { - ChrWidth=(USHORT)rOut.GetTextWidth(String((char)c1)); + ChrWidth=(sal_uInt16)rOut.GetTextWidth(String((char)c1)); } else { - ChrWidth=(USHORT)rOut.GetTextWidth(String('A')); + ChrWidth=(sal_uInt16)rOut.GetTextWidth(String('A')); } } return ChrWidth; } UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, ProcChrSta& R, ObjTextType& Atr0, - USHORT& nChars, USHORT Rest, + sal_uInt16& nChars, sal_uInt16 Rest, short* Line, UCHAR* cLine) { - USHORT KernDist=0; // Wert fuer Kerning - USHORT ChrWidth; + sal_uInt16 KernDist=0; // Wert fuer Kerning + sal_uInt16 ChrWidth; UCHAR c; UCHAR c1; - BOOL AbsEnd; + sal_Bool AbsEnd; - c=GetTextChar(TBuf,R.Index,Atr0,R.Attrib,Rest,FALSE); // versucht evtl. zu trennen, wenn Rest entsprechenden Wert besitzt + c=GetTextChar(TBuf,R.Index,Atr0,R.Attrib,Rest,sal_False); // versucht evtl. zu trennen, wenn Rest entsprechenden Wert besitzt AbsEnd=(c==AbsatzEnd || c==TextEnd); - if (AbsEnd==FALSE) { + if (AbsEnd==sal_False) { R.OutCh=ConvertTextChar(c); // von HardTrenn nach '-', ... R.Kapt=(R.Attrib.Schnitt & TextKaptBit) !=0 && UpcasePossible(R.OutCh); if (R.Kapt) R.OutCh=Upcase(R.OutCh); @@ -784,9 +784,9 @@ UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, ProcChrSta& R, ObjTextType& A ChrWidth=GetCharWidth(rOut,c1); if (R.Attrib.ZAbst!=100) { // Spezial-Zeichenabstand ? - ULONG Temp; - Temp=ULONG(ChrWidth)*ULONG(R.Attrib.ZAbst)/100; - ChrWidth=USHORT(Temp); + sal_uLong Temp; + Temp=sal_uLong(ChrWidth)*sal_uLong(R.Attrib.ZAbst)/100; + ChrWidth=sal_uInt16(Temp); } nChars++; if (R.ChrXP>32000) R.ChrXP=32000; @@ -797,44 +797,44 @@ UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, ProcChrSta& R, ObjTextType& A return c; } -void FormatLine(UCHAR* TBuf, USHORT& Index, ObjTextType& Atr0, ObjTextType& AktAtr, - USHORT UmbWdt, USHORT AdjWdt, - short* Line, USHORT& nChars, +void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType& AktAtr, + sal_uInt16 UmbWdt, sal_uInt16 AdjWdt, + short* Line, sal_uInt16& nChars, double, double, - UCHAR* cLine, BOOL TextFit) + UCHAR* cLine, sal_Bool TextFit) { VirtualDevice vOut; UCHAR c,c0; UCHAR ct; - BOOL First; // erster Char ? - BYTE Just = 0; // Absatzformatierung - BOOL Border; // Rand der Box erreicht ? - BOOL Border0; - BOOL AbsEnd; // Ende des Absatzes erreicht ? + sal_Bool First; // erster Char ? + sal_uInt8 Just = 0; // Absatzformatierung + sal_Bool Border; // Rand der Box erreicht ? + sal_Bool Border0; + sal_Bool AbsEnd; // Ende des Absatzes erreicht ? ProcChrSta* R=new ProcChrSta; ProcChrSta* R0=new ProcChrSta; ProcChrSta* WErec=new ProcChrSta; - USHORT WEnChar; + sal_uInt16 WEnChar; ProcChrSta* WErec0=new ProcChrSta; - USHORT WEnChar0; + sal_uInt16 WEnChar0; ProcChrSta* TRrec=new ProcChrSta; - USHORT TRnChar; + sal_uInt16 TRnChar; - USHORT WordEndCnt; // Justieren und Trennen - BOOL WordEnd; - BOOL Trenn; + sal_uInt16 WordEndCnt; // Justieren und Trennen + sal_Bool WordEnd; + sal_Bool Trenn; short BoxRest; // zum Quetschen und formatieren - USHORT i,j,k,h; - USHORT re,li; + sal_uInt16 i,j,k,h; + sal_uInt16 re,li; vOut.SetMapMode(MapMode(MAP_10TH_MM,Point(),Fraction(1,4),Fraction(1,4))); nChars=0; - SetTextContext(vOut,AktAtr,FALSE,0,1,1,1,1); + SetTextContext(vOut,AktAtr,sal_False,0,1,1,1,1); InitProcessCharState(*R,AktAtr,Index); - (*R0)=(*R); (*WErec)=(*R); WEnChar=0; c0=0; Border0=FALSE; - Border=FALSE; First=TRUE; + (*R0)=(*R); (*WErec)=(*R); WEnChar=0; c0=0; Border0=sal_False; + Border=sal_False; First=sal_True; WordEndCnt=0; do { // mal schauen, wieviele Worte so in die Zeile passen @@ -862,16 +862,16 @@ void FormatLine(UCHAR* TBuf, USHORT& Index, ObjTextType& Atr0, ObjTextType& AktA } (*R0)=(*R); c0=c; Border0=Border; - First=FALSE; + First=sal_False; AbsEnd=AbsEnd || (nChars>=MaxLineChars); } while (!(AbsEnd || (Border && ((WordEndCnt>0) || WordEnd || Trenn)))); if (Border) { // Trennen und Quetschen (*WErec0)=(*WErec); WEnChar0=WEnChar; - AbsEnd=FALSE; c0=0; + AbsEnd=sal_False; c0=0; (*R)=(*WErec); nChars=WEnChar; (*TRrec)=(*R); TRnChar=nChars; - Border0=FALSE; Border=FALSE; + Border0=sal_False; Border=sal_False; do { // erst mal gucken wieviele Silben noch reinpassen ct=ProcessChar(vOut,TBuf,*TRrec,Atr0,TRnChar,DoTrenn,Line,cLine); c=ProcessChar(vOut,TBuf,*R,Atr0,nChars,NoTrenn,Line,cLine); @@ -918,7 +918,7 @@ void FormatLine(UCHAR* TBuf, USHORT& Index, ObjTextType& Atr0, ObjTextType& AktA if (!AbsEnd) { do { // Leerzeichen weglesen (*WErec)=(*R); - c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,FALSE); + c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,sal_False); nChars++; Line[nChars]=R->ChrXP; cLine[nChars]=c; @@ -934,7 +934,7 @@ void FormatLine(UCHAR* TBuf, USHORT& Index, ObjTextType& Atr0, ObjTextType& AktA nChars++; Line[nChars]=R->ChrXP; // Damit AbsatzEnde auch weggelesen wird Line[nChars+1]=R->ChrXP; // denn die Breite von CR oder #0 ist nun mal sehr klein if (TBuf[R->Index-1]!=AbsatzEnd && TBuf[R->Index-1]!=TextEnd) { - c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,FALSE); // Kleine Korrektur. Notig, wenn nur 1 Wort in + c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,sal_False); // Kleine Korrektur. Notig, wenn nur 1 Wort in } } @@ -1018,8 +1018,8 @@ void FormatLine(UCHAR* TBuf, USHORT& Index, ObjTextType& Atr0, ObjTextType& AktA ///////////////////////////////////////////////////////////////////////////////// // DrawText.Pas -void DrawChar(OutputDevice& rOut, UCHAR c, ObjTextType T, PointType Pos, USHORT DrehWink, - USHORT FitXMul, USHORT FitXDiv, USHORT FitYMul, USHORT FitYDiv) +void DrawChar(OutputDevice& rOut, UCHAR c, ObjTextType T, PointType Pos, sal_uInt16 DrehWink, + sal_uInt16 FitXMul, sal_uInt16 FitXDiv, sal_uInt16 FitYMul, sal_uInt16 FitYDiv) { SetTextContext(rOut,T,UpcasePossible(c),DrehWink,FitXMul,FitXDiv,FitYMul,FitYDiv); if ((T.Schnitt & TextKaptBit)!=0 && UpcasePossible(c)) c=Upcase(c); @@ -1041,32 +1041,32 @@ void TextType::Draw(OutputDevice& rOut) if ((Flags & TextOutlBit)!=0) return; // Sourcetext fuer Outliner !! ObjTextType T1,T2; - USHORT Index1; - USHORT Index2; + sal_uInt16 Index1; + sal_uInt16 Index2; UCHAR c = TextEnd; - USHORT l; // Anzahl der Zeichen in der Zeile - USHORT i; + sal_uInt16 l; // Anzahl der Zeichen in der Zeile + sal_uInt16 i; short yPos0; short xPos; short yPos; - USHORT LF; - USHORT MaxGrad; + sal_uInt16 LF; + sal_uInt16 MaxGrad; short xSize; short xSAdj; short ySize; double sn,cs; - USHORT TopToBase; - BOOL Ende = 0; - USHORT lc; - BOOL LineFit; // FitSize.x=0? oder Flags -> jede Zeile stretchen - BOOL TextFit; + sal_uInt16 TopToBase; + sal_Bool Ende = 0; + sal_uInt16 lc; + sal_Bool LineFit; // FitSize.x=0? oder Flags -> jede Zeile stretchen + sal_Bool TextFit; short* xLine; UCHAR* cLine; // Buffer fuer FormatLine - USHORT FitXMul; - USHORT FitXDiv; - USHORT FitYMul; - USHORT FitYDiv; - BOOL Fehler; + sal_uInt16 FitXMul; + sal_uInt16 FitXDiv; + sal_uInt16 FitYMul; + sal_uInt16 FitYDiv; + sal_Bool Fehler; UCHAR* Buf=Buffer; // Zeiger auf die Buchstaben pSgfFonts->ReadList(); @@ -1074,9 +1074,9 @@ void TextType::Draw(OutputDevice& rOut) cLine=new UCHAR[CharLineSize]; TextFit=(Flags & TextFitBits)!=0; - LineFit=FALSE; + LineFit=sal_False; LineFit=((Flags & TextFitZBit)!=0); - if (TextFit && FitSize.x==0) LineFit=TRUE; + if (TextFit && FitSize.x==0) LineFit=sal_True; if (DrehWink==0) { sn=0.0; @@ -1091,9 +1091,9 @@ void TextType::Draw(OutputDevice& rOut) ySize=Pos2.y-Pos1.y; xSize=32000 /2; // Umbruch xSAdj=Pos2.x-Pos1.x; // zum Ausrichten bei Zentriert/Blocksatz - //if (xSize<=0) { xSize=32000 /2; LineFit=TRUE; } - FitXMul=sal::static_int_cast< USHORT >(abs(Pos2.x-Pos1.x)); FitXDiv=FitSize.x; if (FitXDiv==0) FitXDiv=1; - FitYMul=sal::static_int_cast< USHORT >(abs(Pos2.y-Pos1.y)); FitYDiv=FitSize.y; if (FitYDiv==0) FitYDiv=1; + //if (xSize<=0) { xSize=32000 /2; LineFit=sal_True; } + FitXMul=sal::static_int_cast< sal_uInt16 >(abs(Pos2.x-Pos1.x)); FitXDiv=FitSize.x; if (FitXDiv==0) FitXDiv=1; + FitYMul=sal::static_int_cast< sal_uInt16 >(abs(Pos2.y-Pos1.y)); FitYDiv=FitSize.y; if (FitYDiv==0) FitYDiv=1; } else { xSize=Pos2.x-Pos1.x; xSAdj=xSize; @@ -1132,7 +1132,7 @@ void TextType::Draw(OutputDevice& rOut) T2=T1; Index2=Index1; i=1; while (i<=l) { - c=GetTextCharConv(Buf,Index2,T,T2,l-i,FALSE); + c=GetTextCharConv(Buf,Index2,T,T2,l-i,sal_False); long xp1,yp1; // wegen Overflowgefahr PointType Pos; xp1=long(Pos1.x)+xPos+long(xLine[i]); @@ -1164,27 +1164,27 @@ void TextType::Draw(OutputDevice& rOut) // (DEC Alpha hat naemlich 64Bit-Pointer!) //UCHAR* TextType::GetBufPtr() //{ -// ULONG Temp; -// Temp=ULONG(BufLo)+0x00010000*ULONG(BufHi); +// sal_uLong Temp; +// Temp=sal_uLong(BufLo)+0x00010000*sal_uLong(BufHi); // return (UCHAR*)Temp; //} // //void TextType::SetBufPtr(UCHAR* Ptr) //{ -// ULONG Temp=(ULONG)Ptr; -// BufLo=USHORT(Temp & 0x0000FFFF); -// BufHi=USHORT((Temp & 0xFFFF0000)>>16); +// sal_uLong Temp=(sal_uLong)Ptr; +// BufLo=sal_uInt16(Temp & 0x0000FFFF); +// BufHi=sal_uInt16((Temp & 0xFFFF0000)>>16); //} -UINT32 ObjTextType::GetFont() +sal_uInt32 ObjTextType::GetFont() { - return ULONG(FontLo)+0x00010000*ULONG(FontHi); + return sal_uLong(FontLo)+0x00010000*sal_uLong(FontHi); } -void ObjTextType::SetFont(UINT32 FontID) +void ObjTextType::SetFont(sal_uInt32 FontID) { - FontLo=USHORT(FontID & 0x0000FFFF); - FontHi=USHORT((FontID & 0xFFFF0000)>>16); + FontLo=sal_uInt16(FontID & 0x0000FFFF); + FontHi=sal_uInt16((FontID & 0xFFFF0000)>>16); } @@ -1195,11 +1195,11 @@ SgfFontOne::SgfFontOne() { Next=NULL; IFID=0; - Bold=FALSE; - Ital=FALSE; - Sans=FALSE; - Serf=FALSE; - Fixd=FALSE; + Bold=sal_False; + Ital=sal_False; + Sans=sal_False; + Serf=sal_False; + Fixd=sal_False; SVFamil=FAMILY_DONTKNOW; SVChSet=RTL_TEXTENCODING_DONTKNOW; SVWidth=40; @@ -1207,7 +1207,7 @@ SgfFontOne::SgfFontOne() void SgfFontOne::ReadOne( ByteString& ID, ByteString& Dsc ) { - USHORT i,j,n; + sal_uInt16 i,j,n; ByteString s; if ( Dsc.Len() < 4 || ( Dsc.GetChar( 0 ) != '(' ) ) @@ -1229,7 +1229,7 @@ void SgfFontOne::ReadOne( ByteString& ID, ByteString& Dsc ) SVFName=String(Dsc,i+1,j); // SV-Fontname rausholen Dsc.Erase(i,j); - IFID = (UINT32)ID.ToInt32(); + IFID = (sal_uInt32)ID.ToInt32(); n=Dsc.GetTokenCount(' '); for (i=0;i(s.ToInt32()); + else if ( s.IsNumericAscii() ) SVWidth=sal::static_int_cast< sal_uInt16 >(s.ToInt32()); } } } @@ -1265,7 +1265,7 @@ SgfFontLst::SgfFontLst() Last=NULL; LastID=0; LastLn=NULL; - Tried=FALSE; + Tried=sal_False; } SgfFontLst::~SgfFontLst() @@ -1285,7 +1285,7 @@ void SgfFontLst::RausList() } pList=NULL; Last=NULL; - Tried=FALSE; + Tried=sal_False; LastID=0; LastLn=NULL; } @@ -1296,14 +1296,14 @@ void SgfFontLst::AssignFN(const String& rFName) void SgfFontLst::ReadList() { if (!Tried) { - Tried=TRUE; + Tried=sal_True; LastID=0; LastLn=NULL; SgfFontOne* P,P1; Config aCfg(FNam); aCfg.SetGroup("SGV Fonts fuer StarView"); - USHORT Anz=aCfg.GetKeyCount(); - USHORT i; + sal_uInt16 Anz=aCfg.GetKeyCount(); + sal_uInt16 i; ByteString FID,Dsc; for (i=0;iTell(); mpStm->Seek( nHeaderPos ); - - (*mpStm) << (UINT32) 0x00000001 << (UINT32) 108 //use [MS-EMF 2.2.11] HeaderExtension2 Object - << (INT32) 0 << (INT32) 0 << (INT32) ( aMtfSizePix.Width() - 1 ) << (INT32) ( aMtfSizePix.Height() - 1 ) - << (INT32) 0 << (INT32) 0 << (INT32) ( aMtfSizeLog.Width() - 1 ) << (INT32) ( aMtfSizeLog.Height() - 1 ) - << (UINT32) 0x464d4520 << (UINT32) 0x10000 << (UINT32) ( nEndPos - nHeaderPos ) - << (UINT32) mnRecordCount << (UINT16) ( mnHandleCount + 1 ) << (UINT16) 0 << (UINT32) 0 << (UINT32) 0 << (UINT32) 0 - << (INT32) aMtfSizePix.Width() << (INT32) aMtfSizePix.Height() - << (INT32) ( aMtfSizeLog.Width() / 100 ) << (INT32) ( aMtfSizeLog.Height() / 100 ) - << (UINT32) 0 << (UINT32) 0 << (UINT32) 0 - << (INT32) ( aMtfSizeLog.Width() * 10 ) << (INT32) ( aMtfSizeLog.Height() * 10 ); //use [MS-EMF 2.2.11] HeaderExtension2 Object + const sal_uLong nEndPos = mpStm->Tell(); mpStm->Seek( nHeaderPos ); + + (*mpStm) << (sal_uInt32) 0x00000001 << (sal_uInt32) 108 //use [MS-EMF 2.2.11] HeaderExtension2 Object + << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) ( aMtfSizePix.Width() - 1 ) << (sal_Int32) ( aMtfSizePix.Height() - 1 ) + << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) ( aMtfSizeLog.Width() - 1 ) << (sal_Int32) ( aMtfSizeLog.Height() - 1 ) + << (sal_uInt32) 0x464d4520 << (sal_uInt32) 0x10000 << (sal_uInt32) ( nEndPos - nHeaderPos ) + << (sal_uInt32) mnRecordCount << (sal_uInt16) ( mnHandleCount + 1 ) << (sal_uInt16) 0 << (sal_uInt32) 0 << (sal_uInt32) 0 << (sal_uInt32) 0 + << (sal_Int32) aMtfSizePix.Width() << (sal_Int32) aMtfSizePix.Height() + << (sal_Int32) ( aMtfSizeLog.Width() / 100 ) << (sal_Int32) ( aMtfSizeLog.Height() / 100 ) + << (sal_uInt32) 0 << (sal_uInt32) 0 << (sal_uInt32) 0 + << (sal_Int32) ( aMtfSizeLog.Width() * 10 ) << (sal_Int32) ( aMtfSizeLog.Height() * 10 ); //use [MS-EMF 2.2.11] HeaderExtension2 Object mpStm->Seek( nEndPos ); delete[] mpHandlesUsed; @@ -254,15 +254,15 @@ BOOL EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfig // ----------------------------------------------------------------------------- -ULONG EMFWriter::ImplAcquireHandle() +sal_uLong EMFWriter::ImplAcquireHandle() { - ULONG nHandle = HANDLE_INVALID; + sal_uLong nHandle = HANDLE_INVALID; - for( ULONG i = 0; i < MAXHANDLES && ( HANDLE_INVALID == nHandle ); i++ ) + for( sal_uLong i = 0; i < MAXHANDLES && ( HANDLE_INVALID == nHandle ); i++ ) { if( !mpHandlesUsed[ i ] ) { - mpHandlesUsed[ i ] = TRUE; + mpHandlesUsed[ i ] = sal_True; if( ( nHandle = i ) == mnHandleCount ) mnHandleCount++; @@ -275,10 +275,10 @@ ULONG EMFWriter::ImplAcquireHandle() // ----------------------------------------------------------------------------- -void EMFWriter::ImplReleaseHandle( ULONG nHandle ) +void EMFWriter::ImplReleaseHandle( sal_uLong nHandle ) { DBG_ASSERT( nHandle && ( nHandle < MAXHANDLES ), "Handle out of range" ); - mpHandlesUsed[ nHandle - 1 ] = FALSE; + mpHandlesUsed[ nHandle - 1 ] = sal_False; } // ----------------------------------------------------------------------------- @@ -289,7 +289,7 @@ void EMFWriter::ImplBeginRecord( sal_uInt32 nType ) if( !mbRecordOpen ) { - mbRecordOpen = TRUE; + mbRecordOpen = sal_True; mnRecordPos = mpStm->Tell(); (*mpStm) << nType; @@ -316,17 +316,17 @@ void EMFWriter::ImplEndRecord() while( nFillBytes-- ) *mpStm << (sal_uInt8)0; mnRecordCount++; - mbRecordOpen = FALSE; + mbRecordOpen = sal_False; } } // ----------------------------------------------------------------------------- -BOOL EMFWriter::ImplPrepareHandleSelect( sal_uInt32& rHandle, ULONG nSelectType ) +sal_Bool EMFWriter::ImplPrepareHandleSelect( sal_uInt32& rHandle, sal_uLong nSelectType ) { if( rHandle != HANDLE_INVALID ) { - UINT32 nStockObject = 0x80000000; + sal_uInt32 nStockObject = 0x80000000; if( LINE_SELECT == nSelectType ) nStockObject |= 0x00000007; @@ -411,7 +411,7 @@ void EMFWriter::ImplCheckTextAttr() (*mpStm) << mnTextHandle; ImplWriteExtent( -rFont.GetSize().Height() ); ImplWriteExtent( rFont.GetSize().Width() ); - (*mpStm) << (INT32) rFont.GetOrientation() << (INT32) rFont.GetOrientation(); + (*mpStm) << (sal_Int32) rFont.GetOrientation() << (sal_Int32) rFont.GetOrientation(); switch( rFont.GetWeight() ) { @@ -429,11 +429,11 @@ void EMFWriter::ImplCheckTextAttr() } (*mpStm) << nWeight; - (*mpStm) << (BYTE) ( ( ITALIC_NONE == rFont.GetItalic() ) ? 0 : 1 ); - (*mpStm) << (BYTE) ( ( UNDERLINE_NONE == rFont.GetUnderline() ) ? 0 : 1 ); - (*mpStm) << (BYTE) ( ( STRIKEOUT_NONE == rFont.GetStrikeout() ) ? 0 : 1 ); - (*mpStm) << (BYTE) ( ( RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet() ) ? 2 : 0 ); - (*mpStm) << (BYTE) 0 << (BYTE) 0 << (BYTE) 0; + (*mpStm) << (sal_uInt8) ( ( ITALIC_NONE == rFont.GetItalic() ) ? 0 : 1 ); + (*mpStm) << (sal_uInt8) ( ( UNDERLINE_NONE == rFont.GetUnderline() ) ? 0 : 1 ); + (*mpStm) << (sal_uInt8) ( ( STRIKEOUT_NONE == rFont.GetStrikeout() ) ? 0 : 1 ); + (*mpStm) << (sal_uInt8) ( ( RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet() ) ? 2 : 0 ); + (*mpStm) << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0; switch( rFont.GetPitch() ) { @@ -466,24 +466,24 @@ void EMFWriter::ImplCheckTextAttr() (*mpStm) << (sal_Unicode) 0; // dummy elfVersion, elfStyleSize, elfMatch, elfReserved - (*mpStm) << (UINT32) 0 << (UINT32) 0 << (UINT32) 0 << (UINT32) 0 ; + (*mpStm) << (sal_uInt32) 0 << (sal_uInt32) 0 << (sal_uInt32) 0 << (sal_uInt32) 0 ; // dummy elfVendorId - (*mpStm) << (UINT32) 0; + (*mpStm) << (sal_uInt32) 0; // dummy elfCulture - (*mpStm) << (UINT32) 0; + (*mpStm) << (sal_uInt32) 0; // dummy elfPanose - (*mpStm) << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0; + (*mpStm) << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0; // fill record to get a record size divideable by 4 - (*mpStm) << (UINT16) 0; + (*mpStm) << (sal_uInt16) 0; ImplEndRecord(); // TextAlign - UINT32 nTextAlign; + sal_uInt32 nTextAlign; switch( rFont.GetAlign() ) { @@ -512,10 +512,10 @@ void EMFWriter::ImplCheckTextAttr() void EMFWriter::ImplWriteColor( const Color& rColor ) { - UINT32 nCol = rColor.GetRed(); + sal_uInt32 nCol = rColor.GetRed(); - nCol |= ( (UINT32) rColor.GetGreen() ) << 8; - nCol |= ( (UINT32) rColor.GetBlue() ) << 16; + nCol |= ( (sal_uInt32) rColor.GetGreen() ) << 8; + nCol |= ( (sal_uInt32) rColor.GetBlue() ) << 16; (*mpStm) << nCol; } @@ -524,7 +524,7 @@ void EMFWriter::ImplWriteColor( const Color& rColor ) void EMFWriter::ImplWriteRasterOp( RasterOp eRop ) { - UINT32 nROP2; + sal_uInt32 nROP2; switch( eRop ) { @@ -543,7 +543,7 @@ void EMFWriter::ImplWriteRasterOp( RasterOp eRop ) void EMFWriter::ImplWriteExtent( long nExtent ) { nExtent = maVDev.LogicToLogic( Size( nExtent, 0 ), maVDev.GetMapMode(), maDestMapMode ).Width(); - (*mpStm) << (INT32) nExtent; + (*mpStm) << (sal_Int32) nExtent; } // ----------------------------------------------------------------------------- @@ -551,7 +551,7 @@ void EMFWriter::ImplWriteExtent( long nExtent ) void EMFWriter::ImplWritePoint( const Point& rPoint ) { const Point aPoint( maVDev.LogicToLogic( rPoint, maVDev.GetMapMode(), maDestMapMode )); - (*mpStm) << (INT32) aPoint.X() << (INT32) aPoint.Y(); + (*mpStm) << (sal_Int32) aPoint.X() << (sal_Int32) aPoint.Y(); } // ----------------------------------------------------------------------------- @@ -559,7 +559,7 @@ void EMFWriter::ImplWritePoint( const Point& rPoint ) void EMFWriter::ImplWriteSize( const Size& rSize) { const Size aSize( maVDev.LogicToLogic( rSize, maVDev.GetMapMode(), maDestMapMode )); - (*mpStm) << (INT32) aSize.Width() << (INT32) aSize.Height(); + (*mpStm) << (sal_Int32) aSize.Width() << (sal_Int32) aSize.Height(); } // ----------------------------------------------------------------------------- @@ -572,7 +572,7 @@ void EMFWriter::ImplWriteRect( const Rectangle& rRect ) // ----------------------------------------------------------------------------- -void EMFWriter::ImplWritePolygonRecord( const Polygon& rPoly, BOOL bClose ) +void EMFWriter::ImplWritePolygonRecord( const Polygon& rPoly, sal_Bool bClose ) { if( rPoly.GetSize() ) { @@ -587,9 +587,9 @@ void EMFWriter::ImplWritePolygonRecord( const Polygon& rPoly, BOOL bClose ) ImplBeginRecord( bClose ? WIN_EMR_POLYGON : WIN_EMR_POLYLINE ); ImplWriteRect( rPoly.GetBoundRect() ); - (*mpStm) << (UINT32) rPoly.GetSize(); + (*mpStm) << (sal_uInt32) rPoly.GetSize(); - for( USHORT i = 0; i < rPoly.GetSize(); i++ ) + for( sal_uInt16 i = 0; i < rPoly.GetSize(); i++ ) ImplWritePoint( rPoly[ i ] ); ImplEndRecord(); @@ -606,7 +606,7 @@ void EMFWriter::ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly ) if( nPolyCount ) { if( 1 == nPolyCount ) - ImplWritePolygonRecord( rPolyPoly[ 0 ], TRUE ); + ImplWritePolygonRecord( rPolyPoly[ 0 ], sal_True ); else { sal_Bool bHasFlags = sal_False; @@ -738,7 +738,7 @@ void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClosed ) // ----------------------------------------------------------------------------- void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, - const Size& rSz, UINT32 nROP ) + const Size& rSz, sal_uInt32 nROP ) { if( !!rBmp ) { @@ -748,19 +748,19 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, ImplBeginRecord( WIN_EMR_STRETCHDIBITS ); ImplWriteRect( Rectangle( rPt, rSz ) ); ImplWritePoint( rPt ); - (*mpStm) << (INT32) 0 << (INT32) 0 << (INT32) aBmpSizePixel.Width() << (INT32) aBmpSizePixel.Height(); + (*mpStm) << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) aBmpSizePixel.Width() << (sal_Int32) aBmpSizePixel.Height(); // write offset positions and sizes later - const ULONG nOffPos = mpStm->Tell(); + const sal_uLong nOffPos = mpStm->Tell(); mpStm->SeekRel( 16 ); - (*mpStm) << (UINT32) 0 << ( ( ROP_XOR == maVDev.GetRasterOp() && WIN_SRCCOPY == nROP ) ? WIN_SRCINVERT : nROP ); + (*mpStm) << (sal_uInt32) 0 << ( ( ROP_XOR == maVDev.GetRasterOp() && WIN_SRCCOPY == nROP ) ? WIN_SRCINVERT : nROP ); ImplWriteSize( rSz ); - rBmp.Write( aMemStm, TRUE, FALSE ); + rBmp.Write( aMemStm, sal_True, sal_False ); - UINT32 nDIBSize = aMemStm.Tell(), nHeaderSize, nCompression, nColsUsed, nPalCount, nImageSize; - UINT16 nBitCount; + sal_uInt32 nDIBSize = aMemStm.Tell(), nHeaderSize, nCompression, nColsUsed, nPalCount, nImageSize; + sal_uInt16 nBitCount; // get DIB parameters aMemStm.Seek( 0 ); @@ -770,15 +770,15 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, aMemStm.SeekRel( 8 ); aMemStm >> nColsUsed; - nPalCount = ( nBitCount <= 8 ) ? ( nColsUsed ? nColsUsed : ( 1 << (UINT32) nBitCount ) ) : + nPalCount = ( nBitCount <= 8 ) ? ( nColsUsed ? nColsUsed : ( 1 << (sal_uInt32) nBitCount ) ) : ( ( 3 == nCompression ) ? 12 : 0 ); mpStm->Write( aMemStm.GetData(), nDIBSize ); - const ULONG nEndPos = mpStm->Tell(); + const sal_uLong nEndPos = mpStm->Tell(); mpStm->Seek( nOffPos ); - (*mpStm) << (UINT32) 80 << (UINT32)( nHeaderSize + ( nPalCount << 2 ) ); - (*mpStm) << (UINT32)( 80 + ( nHeaderSize + ( nPalCount << 2 ) ) ) << nImageSize; + (*mpStm) << (sal_uInt32) 80 << (sal_uInt32)( nHeaderSize + ( nPalCount << 2 ) ); + (*mpStm) << (sal_uInt32)( 80 + ( nHeaderSize + ( nPalCount << 2 ) ) ) << nImageSize; mpStm->Seek( nEndPos ); ImplEndRecord(); @@ -828,12 +828,12 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const String rText, cons ImplBeginRecord( WIN_EMR_EXTTEXTOUTW ); ImplWriteRect( Rectangle( rPos, Size( nNormWidth, maVDev.GetTextHeight() ) ) ); - (*mpStm) << (UINT32)1; - (*mpStm) << (INT32) 0 << (INT32) 0; + (*mpStm) << (sal_uInt32)1; + (*mpStm) << (sal_Int32) 0 << (sal_Int32) 0; ImplWritePoint( rPos ); - (*mpStm) << (UINT32) nLen << (UINT32) 76 << (UINT32) 2; - (*mpStm) << (INT32) 0 << (INT32) 0 << (INT32) 0 << (INT32) 0; - (*mpStm) << (UINT32) ( 76 + ( nLen << 1 ) + ( (nLen & 1 ) ? 2 : 0 ) ); + (*mpStm) << (sal_uInt32) nLen << (sal_uInt32) 76 << (sal_uInt32) 2; + (*mpStm) << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) 0; + (*mpStm) << (sal_uInt32) ( 76 + ( nLen << 1 ) + ( (nLen & 1 ) ? 2 : 0 ) ); // write text for( i = 0; i < nLen; i++ ) @@ -841,7 +841,7 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const String rText, cons // padding word if( nLen & 1 ) - (*mpStm) << (UINT16) 0; + (*mpStm) << (sal_uInt16) 0; // write DX array ImplWriteExtent( pDX[ 0 ] ); @@ -875,7 +875,7 @@ void EMFWriter::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const bas for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++) { const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a)); - ImplWritePolygonRecord( Polygon(aCandidate), FALSE ); + ImplWritePolygonRecord( Polygon(aCandidate), sal_False ); } } @@ -903,10 +903,10 @@ void EMFWriter::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const bas void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) { - for( ULONG j = 0, nActionCount = rMtf.GetActionCount(); j < nActionCount; j++ ) + for( sal_uLong j = 0, nActionCount = rMtf.GetActionCount(); j < nActionCount; j++ ) { const MetaAction* pAction = rMtf.GetAction( j ); - const USHORT nType = pAction->GetType(); + const sal_uInt16 nType = pAction->GetType(); switch( nType ) { @@ -1074,7 +1074,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) { if(pA->GetLineInfo().IsDefault()) { - ImplWritePolygonRecord( rPoly, FALSE ); + ImplWritePolygonRecord( rPoly, sal_False ); } else { @@ -1157,7 +1157,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) const MetaEPSAction* pA = (const MetaEPSAction*) pAction; const GDIMetaFile aSubstitute( pA->GetSubstitute() ); - for( ULONG i = 0, nCount = aSubstitute.GetActionCount(); i < nCount; i++ ) + for( sal_uLong i = 0, nCount = aSubstitute.GetActionCount(); i < nCount; i++ ) { const MetaAction* pSubstAct = aSubstitute.GetAction( i ); if( pSubstAct->GetType() == META_BMPSCALE_ACTION ) @@ -1176,7 +1176,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) maVDev.Pop(); ImplBeginRecord( WIN_EMR_RESTOREDC ); - (*mpStm) << (INT32) -1; + (*mpStm) << (sal_Int32) -1; ImplEndRecord(); break; } @@ -1307,14 +1307,14 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case( META_LINECOLOR_ACTION ): { ( (MetaAction*) pAction )->Execute( &maVDev ); - mbLineChanged = TRUE; + mbLineChanged = sal_True; } break; case( META_FILLCOLOR_ACTION ): { ( (MetaAction*) pAction )->Execute( &maVDev ); - mbFillChanged = TRUE; + mbFillChanged = sal_True; } break; @@ -1325,7 +1325,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case( META_FONT_ACTION ): { ( (MetaAction*) pAction )->Execute( &maVDev ); - mbTextChanged = TRUE; + mbTextChanged = sal_True; } break; @@ -1366,11 +1366,11 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) ( (MetaAction*) pAction )->Execute( &maVDev ); ImplBeginRecord( WIN_EMR_RESTOREDC ); - (*mpStm) << (INT32) -1; + (*mpStm) << (sal_Int32) -1; ImplEndRecord(); ImplWriteRasterOp( maVDev.GetRasterOp() ); - mbLineChanged = mbFillChanged = mbTextChanged = TRUE; + mbLineChanged = mbFillChanged = mbTextChanged = sal_True; } break; diff --git a/svtools/source/filter/wmf/emfwr.hxx b/svtools/source/filter/wmf/emfwr.hxx index 6334b5dfe16f..8c65e91e5f73 100644 --- a/svtools/source/filter/wmf/emfwr.hxx +++ b/svtools/source/filter/wmf/emfwr.hxx @@ -50,27 +50,27 @@ private: MapMode maDestMapMode; FilterConfigItem* mpFilterConfigItem; SvStream* mpStm; - BOOL* mpHandlesUsed; - ULONG mnHandleCount; - ULONG mnLastPercent; - ULONG mnRecordCount; - ULONG mnRecordPos; - BOOL mbRecordOpen; - BOOL mbLineChanged; + sal_Bool* mpHandlesUsed; + sal_uLong mnHandleCount; + sal_uLong mnLastPercent; + sal_uLong mnRecordCount; + sal_uLong mnRecordPos; + sal_Bool mbRecordOpen; + sal_Bool mbLineChanged; sal_uInt32 mnLineHandle; - BOOL mbFillChanged; + sal_Bool mbFillChanged; sal_uInt32 mnFillHandle; - BOOL mbTextChanged; + sal_Bool mbTextChanged; sal_uInt32 mnTextHandle; sal_uInt32 mnHorTextAlign; void ImplBeginRecord( sal_uInt32 nType ); void ImplEndRecord(); - ULONG ImplAcquireHandle(); - void ImplReleaseHandle( ULONG nHandle ); + sal_uLong ImplAcquireHandle(); + void ImplReleaseHandle( sal_uLong nHandle ); - BOOL ImplPrepareHandleSelect( sal_uInt32& rHandle, ULONG nSelectType ); + sal_Bool ImplPrepareHandleSelect( sal_uInt32& rHandle, sal_uLong nSelectType ); void ImplCheckLineAttr(); void ImplCheckFillAttr(); void ImplCheckTextAttr(); @@ -82,9 +82,9 @@ private: void ImplWriteSize( const Size& rSize); void ImplWriteRect( const Rectangle& rRect ); void ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClose ); - void ImplWritePolygonRecord( const Polygon& rPoly, BOOL bClose ); + void ImplWritePolygonRecord( const Polygon& rPoly, sal_Bool bClose ); void ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly ); - void ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const Size& rSz, UINT32 nROP ); + void ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const Size& rSz, sal_uInt32 nROP ); void ImplWriteTextRecord( const Point& rPos, const String rText, const sal_Int32* pDXArray, sal_uInt32 nWidth ); void Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon); @@ -94,7 +94,7 @@ public: EMFWriter() {} - BOOL WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfigItem* pConfigItem = NULL ); + sal_Bool WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfigItem* pConfigItem = NULL ); }; #endif // _EMFWR_HXX diff --git a/svtools/source/filter/wmf/enhwmf.cxx b/svtools/source/filter/wmf/enhwmf.cxx index 1e49e0d61446..ec7fec9fdb1e 100644 --- a/svtools/source/filter/wmf/enhwmf.cxx +++ b/svtools/source/filter/wmf/enhwmf.cxx @@ -229,7 +229,7 @@ static sal_Bool ImplReadRegion( PolyPolygon& rPolyPoly, SvStream& rSt, sal_uInt3 return bOk; } -BOOL EnhWMFReader::ReadEnhWMF() +sal_Bool EnhWMFReader::ReadEnhWMF() { sal_uInt32 nStretchBltMode = 0; sal_uInt32 nRecType, nRecSize, nNextPos, @@ -246,7 +246,7 @@ BOOL EnhWMFReader::ReadEnhWMF() if ( ( nRecSize < 8 ) || ( nRecSize & 3 ) ) // Parameter sind immer durch 4 teilbar { - bStatus = FALSE; + bStatus = sal_False; break; } @@ -254,7 +254,7 @@ BOOL EnhWMFReader::ReadEnhWMF() if ( nNextPos > nEndPos ) { - bStatus = FALSE; + bStatus = sal_False; break; } @@ -291,8 +291,8 @@ BOOL EnhWMFReader::ReadEnhWMF() { pWMF->SeekRel( 16 ); *pWMF >> nPoints; - Polygon aPoly( (UINT16)nPoints ); - for( UINT16 k = 0; k < (UINT16)nPoints; k++ ) + Polygon aPoly( (sal_uInt16)nPoints ); + for( sal_uInt16 k = 0; k < (sal_uInt16)nPoints; k++ ) { *pWMF >> nX32 >> nY32; aPoly[ k ] = Point( nX32, nY32 ); @@ -307,14 +307,14 @@ BOOL EnhWMFReader::ReadEnhWMF() { pWMF->SeekRel( 0x10 ); *pWMF >> nPoints; - UINT16 i = 0; + sal_uInt16 i = 0; if ( bFlag ) { i++; nPoints++; } - Polygon aPolygon( (UINT16)nPoints ); - for ( ; i < (UINT16)nPoints; i++ ) + Polygon aPolygon( (sal_uInt16)nPoints ); + for ( ; i < (sal_uInt16)nPoints; i++ ) { *pWMF >> nX32 >> nY32; aPolygon[ i ] = Point( nX32, nY32 ); @@ -325,25 +325,25 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_POLYPOLYLINE : { - UINT16* pnPoints; + sal_uInt16* pnPoints; - INT32 i, nPoly; + sal_Int32 i, nPoly; pWMF->SeekRel( 0x10 ); // Anzahl der Polygone: *pWMF >> nPoly >> i; // taking the amount of points of each polygon, retrieving the total number of points - if ( static_cast< sal_uInt32 >(nPoly) < SAL_MAX_UINT32 / sizeof(UINT16) ) + if ( static_cast< sal_uInt32 >(nPoly) < SAL_MAX_UINT32 / sizeof(sal_uInt16) ) { - if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof(UINT16) ) <= ( nEndPos - pWMF->Tell() ) ) + if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof(sal_uInt16) ) <= ( nEndPos - pWMF->Tell() ) ) { - pnPoints = new UINT16[ nPoly ]; + pnPoints = new sal_uInt16[ nPoly ]; for ( i = 0; i < nPoly; i++ ) { *pWMF >> nPoints; - pnPoints[ i ] = (UINT16)nPoints; + pnPoints[ i ] = (sal_uInt16)nPoints; } // Polygonpunkte holen: @@ -351,7 +351,7 @@ BOOL EnhWMFReader::ReadEnhWMF() for ( i = 0; ( i < nPoly ) && !pWMF->IsEof(); i++ ) { Polygon aPoly( pnPoints[ i ] ); - for( UINT16 k = 0; k < pnPoints[ i ]; k++ ) + for( sal_uInt16 k = 0; k < pnPoints[ i ]; k++ ) { *pWMF >> nX32 >> nY32; aPoly[ k ] = Point( nX32, nY32 ); @@ -366,25 +366,25 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_POLYPOLYGON : { - UINT16* pnPoints; + sal_uInt16* pnPoints; Point* pPtAry; - UINT32 i, nPoly, nGesPoints; + sal_uInt32 i, nPoly, nGesPoints; pWMF->SeekRel( 0x10 ); // Anzahl der Polygone: *pWMF >> nPoly >> nGesPoints; - if ( ( nGesPoints < SAL_MAX_UINT32 / sizeof(Point) ) && ( nPoly < SAL_MAX_UINT32 / sizeof(UINT16) ) ) + if ( ( nGesPoints < SAL_MAX_UINT32 / sizeof(Point) ) && ( nPoly < SAL_MAX_UINT32 / sizeof(sal_uInt16) ) ) { - if ( ( nPoly * sizeof(UINT16) ) <= ( nEndPos - pWMF->Tell() ) ) + if ( ( nPoly * sizeof(sal_uInt16) ) <= ( nEndPos - pWMF->Tell() ) ) { - pnPoints = new UINT16[ nPoly ]; + pnPoints = new sal_uInt16[ nPoly ]; for ( i = 0; i < nPoly; i++ ) { *pWMF >> nPoints; - pnPoints[ i ] = (UINT16)nPoints; + pnPoints[ i ] = (sal_uInt16)nPoints; } if ( ( nGesPoints * (sizeof(sal_uInt32)+sizeof(sal_uInt32)) ) <= ( nEndPos - pWMF->Tell() ) ) @@ -398,7 +398,7 @@ BOOL EnhWMFReader::ReadEnhWMF() pPtAry[ i ] = Point( nX32, nY32 ); } // PolyPolygon Actions erzeugen - PolyPolygon aPolyPoly( (UINT16)nPoly, pnPoints, pPtAry ); + PolyPolygon aPolyPoly( (sal_uInt16)nPoly, pnPoints, pPtAry ); pOut->DrawPolyPolygon( aPolyPoly, bRecordPath ); delete[] pPtAry; } @@ -554,7 +554,7 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_MODIFYWORLDTRANSFORM : { - UINT32 nMode; + sal_uInt32 nMode; XForm aTempXForm; *pWMF >> aTempXForm >> nMode; pOut->ModifyWorldTransform( aTempXForm, nMode ); @@ -575,7 +575,7 @@ BOOL EnhWMFReader::ReadEnhWMF() { LineInfo aLineInfo; - UINT32 nStyle; + sal_uInt32 nStyle; Size aSize; *pWMF >> nStyle >> aSize.Width() >> aSize.Height(); @@ -583,9 +583,9 @@ BOOL EnhWMFReader::ReadEnhWMF() if ( aSize.Width() ) aLineInfo.SetWidth( aSize.Width() ); - BOOL bTransparent = FALSE; - UINT16 nDashCount = 0; - UINT16 nDotCount = 0; + sal_Bool bTransparent = sal_False; + sal_uInt16 nDashCount = 0; + sal_uInt16 nDotCount = 0; switch( nStyle ) { case PS_DASHDOTDOT : @@ -599,7 +599,7 @@ BOOL EnhWMFReader::ReadEnhWMF() nDashCount++; break; case PS_NULL : - bTransparent = TRUE; + bTransparent = sal_True; aLineInfo.SetStyle( LINE_NONE ); break; default : @@ -674,12 +674,12 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_CREATEBRUSHINDIRECT : { - UINT32 nStyle; + sal_uInt32 nStyle; *pWMF >> nIndex; if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) { *pWMF >> nStyle; - pOut->CreateObject( nIndex, GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? TRUE : FALSE ) ); + pOut->CreateObject( nIndex, GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? sal_True : sal_False ) ); } } break; @@ -716,7 +716,7 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_ARC : { - UINT32 nStartX, nStartY, nEndX, nEndY; + sal_uInt32 nStartX, nStartY, nEndX, nEndY; *pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY; pOut->DrawArc( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ) ); } @@ -724,7 +724,7 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_CHORD : { - UINT32 nStartX, nStartY, nEndX, nEndY; + sal_uInt32 nStartX, nStartY, nEndX, nEndY; *pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY; pOut->DrawChord( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ) ); } @@ -732,7 +732,7 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_PIE : { - UINT32 nStartX, nStartY, nEndX, nEndY; + sal_uInt32 nStartX, nStartY, nEndX, nEndY; *pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY; const Rectangle aRect( ReadRectangle( nX32, nY32, nx32, ny32 )); @@ -754,9 +754,9 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_ARCTO : { - UINT32 nStartX, nStartY, nEndX, nEndY; + sal_uInt32 nStartX, nStartY, nEndX, nEndY; *pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY; - pOut->DrawArc( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ), TRUE ); + pOut->DrawArc( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ), sal_True ); } break; @@ -813,11 +813,11 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_BITBLT : // PASSTHROUGH INTENDED case EMR_STRETCHBLT : { - INT32 xDest, yDest, cxDest, cyDest, xSrc, ySrc, cxSrc, cySrc; - UINT32 dwRop, iUsageSrc, offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc; + sal_Int32 xDest, yDest, cxDest, cyDest, xSrc, ySrc, cxSrc, cySrc; + sal_uInt32 dwRop, iUsageSrc, offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc; XForm xformSrc; - UINT32 nStart = pWMF->Tell() - 8; + sal_uInt32 nStart = pWMF->Tell() - 8; pWMF->SeekRel( 0x10 ); *pWMF >> xDest >> yDest >> cxDest >> cyDest >> dwRop >> xSrc >> ySrc @@ -836,27 +836,27 @@ BOOL EnhWMFReader::ReadEnhWMF() cyDest = abs( (int)cyDest ); // and also 122889 if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) ) - bStatus = FALSE; + bStatus = sal_False; else { - UINT32 nSize = cbBmiSrc + cbBitsSrc + 14; + sal_uInt32 nSize = cbBmiSrc + cbBitsSrc + 14; if ( nSize <= ( nEndPos - nStartPos ) ) { char* pBuf = new char[ nSize ]; SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE ); - aTmp.ObjectOwnsMemory( TRUE ); - aTmp << (BYTE)'B' - << (BYTE)'M' - << (UINT32)cbBitsSrc - << (UINT16)0 - << (UINT16)0 - << (UINT32)cbBmiSrc + 14; + aTmp.ObjectOwnsMemory( sal_True ); + aTmp << (sal_uInt8)'B' + << (sal_uInt8)'M' + << (sal_uInt32)cbBitsSrc + << (sal_uInt16)0 + << (sal_uInt16)0 + << (sal_uInt32)cbBmiSrc + 14; pWMF->Seek( nStart + offBmiSrc ); pWMF->Read( pBuf + 14, cbBmiSrc ); pWMF->Seek( nStart + offBitsSrc ); pWMF->Read( pBuf + 14 + cbBmiSrc, cbBitsSrc ); aTmp.Seek( 0 ); - aBitmap.Read( aTmp, TRUE ); + aBitmap.Read( aTmp, sal_True ); // test if it is sensible to crop if ( ( cxSrc > 0 ) && ( cySrc > 0 ) && @@ -875,9 +875,9 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_STRETCHDIBITS : { - INT32 xDest, yDest, xSrc, ySrc, cxSrc, cySrc, cxDest, cyDest; - UINT32 offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc, iUsageSrc, dwRop; - UINT32 nStart = pWMF->Tell() - 8; + sal_Int32 xDest, yDest, xSrc, ySrc, cxSrc, cySrc, cxDest, cyDest; + sal_uInt32 offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc, iUsageSrc, dwRop; + sal_uInt32 nStart = pWMF->Tell() - 8; pWMF->SeekRel( 0x10 ); *pWMF >> xDest >> yDest >> xSrc >> ySrc >> cxSrc >> cySrc >> offBmiSrc >> cbBmiSrc >> offBitsSrc @@ -890,27 +890,27 @@ BOOL EnhWMFReader::ReadEnhWMF() cyDest = abs( (int)cyDest ); // and also 122889 if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) ) - bStatus = FALSE; + bStatus = sal_False; else { - UINT32 nSize = cbBmiSrc + cbBitsSrc + 14; + sal_uInt32 nSize = cbBmiSrc + cbBitsSrc + 14; if ( nSize <= ( nEndPos - nStartPos ) ) { char* pBuf = new char[ nSize ]; SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE ); - aTmp.ObjectOwnsMemory( TRUE ); - aTmp << (BYTE)'B' - << (BYTE)'M' - << (UINT32)cbBitsSrc - << (UINT16)0 - << (UINT16)0 - << (UINT32)cbBmiSrc + 14; + aTmp.ObjectOwnsMemory( sal_True ); + aTmp << (sal_uInt8)'B' + << (sal_uInt8)'M' + << (sal_uInt32)cbBitsSrc + << (sal_uInt16)0 + << (sal_uInt16)0 + << (sal_uInt32)cbBmiSrc + 14; pWMF->Seek( nStart + offBmiSrc ); pWMF->Read( pBuf + 14, cbBmiSrc ); pWMF->Seek( nStart + offBitsSrc ); pWMF->Read( pBuf + 14 + cbBmiSrc, cbBitsSrc ); aTmp.Seek( 0 ); - aBitmap.Read( aTmp, TRUE ); + aBitmap.Read( aTmp, sal_True ); // test if it is sensible to crop if ( ( cxSrc > 0 ) && ( cySrc > 0 ) && @@ -941,7 +941,7 @@ BOOL EnhWMFReader::ReadEnhWMF() for ( int i = 0; i < LF_FACESIZE; i++ ) { - UINT16 nChar; + sal_uInt16 nChar; *pWMF >> nChar; lfFaceName[ i ] = nChar; } @@ -1045,14 +1045,14 @@ BOOL EnhWMFReader::ReadEnhWMF() { pWMF->SeekRel( 16 ); *pWMF >> nPoints; - UINT16 i = 0; + sal_uInt16 i = 0; if ( bFlag ) { i++; nPoints++; } - Polygon aPoly( (UINT16)nPoints ); - for( ; i < (UINT16)nPoints; i++ ) + Polygon aPoly( (sal_uInt16)nPoints ); + for( ; i < (sal_uInt16)nPoints; i++ ) { *pWMF >> nX16 >> nY16; aPoly[ i ] = Point( nX16, nY16 ); @@ -1065,8 +1065,8 @@ BOOL EnhWMFReader::ReadEnhWMF() { pWMF->SeekRel( 16 ); *pWMF >> nPoints; - Polygon aPoly( (UINT16)nPoints ); - for( UINT16 k = 0; k < (UINT16)nPoints; k++ ) + Polygon aPoly( (sal_uInt16)nPoints ); + for( sal_uInt16 k = 0; k < (sal_uInt16)nPoints; k++ ) { *pWMF >> nX16 >> nY16; aPoly[ k ] = Point( nX16, nY16 ); @@ -1081,15 +1081,15 @@ BOOL EnhWMFReader::ReadEnhWMF() { pWMF->SeekRel( 16 ); *pWMF >> nPoints; - UINT16 i = 0; + sal_uInt16 i = 0; if ( bFlag ) { i++; nPoints++; } - Polygon aPoly( (UINT16)nPoints ); - for( ; i < (UINT16)nPoints; i++ ) + Polygon aPoly( (sal_uInt16)nPoints ); + for( ; i < (sal_uInt16)nPoints; i++ ) { *pWMF >> nX16 >> nY16; aPoly[ i ] = Point( nX16, nY16 ); @@ -1100,29 +1100,29 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_POLYPOLYLINE16 : { - UINT16* pnPoints; + sal_uInt16* pnPoints; - INT32 i, nPoly, nGesPoints; + sal_Int32 i, nPoly, nGesPoints; pWMF->SeekRel( 0x10 ); // Anzahl der Polygone: *pWMF >> nPoly >> nGesPoints; // taking the amount of points of each polygon, retrieving the total number of points - if ( static_cast< sal_uInt32 >(nPoly) < SAL_MAX_UINT32 / sizeof(UINT16) ) + if ( static_cast< sal_uInt32 >(nPoly) < SAL_MAX_UINT32 / sizeof(sal_uInt16) ) { - if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof(UINT16) ) <= ( nEndPos - pWMF->Tell() ) ) + if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof(sal_uInt16) ) <= ( nEndPos - pWMF->Tell() ) ) { - pnPoints = new UINT16[ nPoly ]; + pnPoints = new sal_uInt16[ nPoly ]; for ( i = 0; i < nPoly; i++ ) { *pWMF >> nPoints; - pnPoints[ i ] = (UINT16)nPoints; + pnPoints[ i ] = (sal_uInt16)nPoints; } // Polygonpunkte holen: for ( i = 0; ( i < nPoly ) && !pWMF->IsEof(); i++ ) { Polygon aPolygon( pnPoints[ i ] ); - for ( UINT16 k = 0; k < pnPoints[ i ]; k++ ) + for ( sal_uInt16 k = 0; k < pnPoints[ i ]; k++ ) { *pWMF >> nX16 >> nY16; aPolygon[ k ] = Point( nX16, nY16 ); @@ -1137,22 +1137,22 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_POLYPOLYGON16 : { - UINT16* pnPoints; + sal_uInt16* pnPoints; Point* pPtAry; - UINT32 i, nPoly, nGesPoints; + sal_uInt32 i, nPoly, nGesPoints; pWMF->SeekRel( 0x10 ); // Anzahl der Polygone: *pWMF >> nPoly >> nGesPoints; - if ( ( nGesPoints < SAL_MAX_UINT32 / sizeof(Point) ) && ( nPoly < SAL_MAX_UINT32 / sizeof(UINT16) ) ) + if ( ( nGesPoints < SAL_MAX_UINT32 / sizeof(Point) ) && ( nPoly < SAL_MAX_UINT32 / sizeof(sal_uInt16) ) ) { - if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof( UINT16 ) ) <= ( nEndPos - pWMF->Tell() ) ) + if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof( sal_uInt16 ) ) <= ( nEndPos - pWMF->Tell() ) ) { - pnPoints = new UINT16[ nPoly ]; + pnPoints = new sal_uInt16[ nPoly ]; for ( i = 0; i < nPoly; i++ ) { *pWMF >> nPoints; - pnPoints[ i ] = (UINT16)nPoints; + pnPoints[ i ] = (sal_uInt16)nPoints; } if ( ( nGesPoints * (sizeof(sal_uInt16)+sizeof(sal_uInt16)) ) <= ( nEndPos - pWMF->Tell() ) ) { @@ -1165,7 +1165,7 @@ BOOL EnhWMFReader::ReadEnhWMF() } // PolyPolygon Actions erzeugen - PolyPolygon aPolyPoly( (UINT16)nPoly, pnPoints, pPtAry ); + PolyPolygon aPolyPoly( (sal_uInt16)nPoly, pnPoints, pPtAry ); pOut->DrawPolyPolygon( aPolyPoly, bRecordPath ); delete[] pPtAry; } @@ -1266,16 +1266,16 @@ BOOL EnhWMFReader::ReadEnhWMF() //----------------------------------------------------------------------------------- -BOOL EnhWMFReader::ReadHeader() +sal_Bool EnhWMFReader::ReadHeader() { - UINT32 nUINT32, nHeaderSize, nPalEntries; - INT32 nLeft, nTop, nRight, nBottom; + sal_uInt32 nsal_uInt32, nHeaderSize, nPalEntries; + sal_Int32 nLeft, nTop, nRight, nBottom; // METAFILEHEADER SPARE ICH MIR HIER // Einlesen des METAHEADER - *pWMF >> nUINT32 >> nHeaderSize; - if ( nUINT32 != 1 ) // Typ - return FALSE; + *pWMF >> nsal_uInt32 >> nHeaderSize; + if ( nsal_uInt32 != 1 ) // Typ + return sal_False; // bound size Rectangle rclBounds; // rectangle in logical units 1/100th mm @@ -1293,12 +1293,12 @@ BOOL EnhWMFReader::ReadHeader() rclFrame.Right() = nRight; rclFrame.Bottom() = nBottom; - *pWMF >> nUINT32; // signature + *pWMF >> nsal_uInt32; // signature - if ( nUINT32 != 0x464d4520 ) - return FALSE; + if ( nsal_uInt32 != 0x464d4520 ) + return sal_False; - *pWMF >> nUINT32; // nVersion + *pWMF >> nsal_uInt32; // nVersion *pWMF >> nEndPos; // size of metafile nEndPos += nStartPos; @@ -1311,7 +1311,7 @@ BOOL EnhWMFReader::ReadHeader() *pWMF >> nRecordCount; if ( !nRecordCount ) - return FALSE; + return sal_False; pWMF->SeekRel( 0xc ); @@ -1324,12 +1324,12 @@ BOOL EnhWMFReader::ReadHeader() pOut->SetRefMill( Size( nMillX, nMillY ) ); pWMF->Seek( nStartPos + nHeaderSize ); - return TRUE; + return sal_True; } //----------------------------------------------------------------------------------- -Rectangle EnhWMFReader::ReadRectangle( INT32 x1, INT32 y1, INT32 x2, INT32 y2 ) +Rectangle EnhWMFReader::ReadRectangle( sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 ) { Point aTL ( Point( x1, y1 ) ); Point aBR( Point( --x2, --y2 ) ); @@ -1340,4 +1340,3 @@ EnhWMFReader::~EnhWMFReader() { }; - diff --git a/svtools/source/filter/wmf/winmtf.cxx b/svtools/source/filter/wmf/winmtf.cxx index 787e6522b890..30fc670ac22f 100644 --- a/svtools/source/filter/wmf/winmtf.cxx +++ b/svtools/source/filter/wmf/winmtf.cxx @@ -355,7 +355,7 @@ WinMtf::WinMtf( WinMtfOutput* pWinMtfOutput, SvStream& rStreamWMF, FilterConfigI SvLockBytes *pLB = pWMF->GetLockBytes(); if ( pLB ) - pLB->SetSynchronMode( TRUE ); + pLB->SetSynchronMode( sal_True ); nStartPos = pWMF->Tell(); @@ -383,7 +383,7 @@ WinMtf::~WinMtf() // ------------------------------------------------------------------------ -void WinMtf::Callback( USHORT nPercent ) +void WinMtf::Callback( sal_uInt16 nPercent ) { if ( xStatusIndicator.is() ) xStatusIndicator->setValue( nPercent ); @@ -393,9 +393,9 @@ void WinMtf::Callback( USHORT nPercent ) Color WinMtf::ReadColor() { - UINT32 nColor; + sal_uInt32 nColor; *pWMF >> nColor; - return Color( (BYTE)nColor, (BYTE)( nColor >> 8 ), (BYTE)( nColor >> 16 ) ); + return Color( (sal_uInt8)nColor, (sal_uInt8)( nColor >> 8 ), (sal_uInt8)( nColor >> 16 ) ); }; //----------------------------------------------------------------------------------- @@ -561,8 +561,8 @@ void WinMtfOutput::ImplMap( Font& rFont ) Polygon& WinMtfOutput::ImplMap( Polygon& rPolygon ) { - UINT16 nPoints = rPolygon.GetSize(); - for ( UINT16 i = 0; i < nPoints; i++ ) + sal_uInt16 nPoints = rPolygon.GetSize(); + for ( sal_uInt16 i = 0; i < nPoints; i++ ) { rPolygon[ i ] = ImplMap( rPolygon[ i ] ); } @@ -573,14 +573,14 @@ Polygon& WinMtfOutput::ImplMap( Polygon& rPolygon ) PolyPolygon& WinMtfOutput::ImplMap( PolyPolygon& rPolyPolygon ) { - UINT16 nPolys = rPolyPolygon.Count(); - for ( UINT16 i = 0; i < nPolys; ImplMap( rPolyPolygon[ i++ ] ) ) ; + sal_uInt16 nPolys = rPolyPolygon.Count(); + for ( sal_uInt16 i = 0; i < nPolys; ImplMap( rPolyPolygon[ i++ ] ) ) ; return rPolyPolygon; } //----------------------------------------------------------------------------------- -void WinMtfOutput::SelectObject( INT32 nIndex ) +void WinMtfOutput::SelectObject( sal_Int32 nIndex ) { GDIObj* pGDIObj = NULL; @@ -590,7 +590,7 @@ void WinMtfOutput::SelectObject( INT32 nIndex ) { nIndex &= 0xffff; // zur Sicherheit: mehr als 65535 nicht zulassen - if ( (UINT32)nIndex < vGDIObj.size() ) + if ( (sal_uInt32)nIndex < vGDIObj.size() ) pGDIObj = vGDIObj[ nIndex ]; } @@ -599,7 +599,7 @@ void WinMtfOutput::SelectObject( INT32 nIndex ) if ( nIndex & ENHMETA_STOCK_OBJECT ) { - UINT16 nStockId = (BYTE)nIndex; + sal_uInt16 nStockId = (sal_uInt8)nIndex; switch( nStockId ) { case WHITE_BRUSH : @@ -625,7 +625,7 @@ void WinMtfOutput::SelectObject( INT32 nIndex ) break; case NULL_BRUSH : { - pGDIObj->Set( GDI_BRUSH, new WinMtfFillStyle( Color( COL_TRANSPARENT ), TRUE ) ); + pGDIObj->Set( GDI_BRUSH, new WinMtfFillStyle( Color( COL_TRANSPARENT ), sal_True ) ); } break; case WHITE_PEN : @@ -640,7 +640,7 @@ void WinMtfOutput::SelectObject( INT32 nIndex ) break; case NULL_PEN : { - pGDIObj->Set( GDI_PEN, new WinMtfLineStyle( Color( COL_TRANSPARENT ), TRUE ) ); + pGDIObj->Set( GDI_PEN, new WinMtfLineStyle( Color( COL_TRANSPARENT ), sal_True ) ); } break; default: @@ -701,7 +701,7 @@ sal_uInt32 WinMtfOutput::GetTextLayoutMode() const //----------------------------------------------------------------------------------- -void WinMtfOutput::SetBkMode( UINT32 nMode ) +void WinMtfOutput::SetBkMode( sal_uInt32 nMode ) { mnBkMode = nMode; } @@ -722,14 +722,14 @@ void WinMtfOutput::SetTextColor( const Color& rColor ) //----------------------------------------------------------------------------------- -void WinMtfOutput::SetTextAlign( UINT32 nAlign ) +void WinMtfOutput::SetTextAlign( sal_uInt32 nAlign ) { mnTextAlign = nAlign; } //----------------------------------------------------------------------------------- -void WinMtfOutput::ImplResizeObjectArry( UINT32 nNewEntrys ) +void WinMtfOutput::ImplResizeObjectArry( sal_uInt32 nNewEntrys ) { sal_uInt32 i = vGDIObj.size(); vGDIObj.resize( nNewEntrys ); @@ -795,7 +795,7 @@ void WinMtfOutput::CreateObject( GDIObjectType eType, void* pStyle ) } } } - UINT32 nIndex; + sal_uInt32 nIndex; for ( nIndex = 0; nIndex < vGDIObj.size(); nIndex++ ) { if ( vGDIObj[ nIndex ] == NULL ) @@ -809,7 +809,7 @@ void WinMtfOutput::CreateObject( GDIObjectType eType, void* pStyle ) //----------------------------------------------------------------------------------- -void WinMtfOutput::CreateObject( INT32 nIndex, GDIObjectType eType, void* pStyle ) +void WinMtfOutput::CreateObject( sal_Int32 nIndex, GDIObjectType eType, void* pStyle ) { if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) { @@ -832,7 +832,7 @@ void WinMtfOutput::CreateObject( INT32 nIndex, GDIObjectType eType, void* pStyle } } } - if ( (UINT32)nIndex >= vGDIObj.size() ) + if ( (sal_uInt32)nIndex >= vGDIObj.size() ) ImplResizeObjectArry( nIndex + 16 ); if ( vGDIObj[ nIndex ] != NULL ) @@ -968,7 +968,7 @@ WinMtfOutput::~WinMtfOutput() else mpGDIMetaFile->SetPrefSize( mrclFrame.GetSize() ); - for ( UINT32 i = 0; i < vGDIObj.size(); i++ ) + for ( sal_uInt32 i = 0; i < vGDIObj.size(); i++ ) delete vGDIObj[ i ]; }; @@ -1010,7 +1010,7 @@ void WinMtfOutput::UpdateClipRegion() void WinMtfOutput::ImplSetNonPersistentLineColorTransparenz() { Color aColor( COL_TRANSPARENT); - WinMtfLineStyle aTransparentLine( aColor, TRUE ); + WinMtfLineStyle aTransparentLine( aColor, sal_True ); if ( ! ( maLatestLineStyle == aTransparentLine ) ) { maLatestLineStyle = aTransparentLine; @@ -1044,7 +1044,7 @@ void WinMtfOutput::UpdateFillStyle() //----------------------------------------------------------------------------------- -sal_uInt32 WinMtfOutput::SetRasterOp( UINT32 nRasterOp ) +sal_uInt32 WinMtfOutput::SetRasterOp( sal_uInt32 nRasterOp ) { sal_uInt32 nRetROP = mnRop; if ( nRasterOp != mnRop ) @@ -1077,8 +1077,8 @@ sal_uInt32 WinMtfOutput::SetRasterOp( UINT32 nRasterOp ) { aNopFillStyle = maFillStyle; aNopLineStyle = maLineStyle; - maFillStyle = WinMtfFillStyle( Color( COL_TRANSPARENT ), TRUE ); - maLineStyle = WinMtfLineStyle( Color( COL_TRANSPARENT ), TRUE ); + maFillStyle = WinMtfFillStyle( Color( COL_TRANSPARENT ), sal_True ); + maLineStyle = WinMtfLineStyle( Color( COL_TRANSPARENT ), sal_True ); mbNopMode = sal_True; } } @@ -1108,7 +1108,7 @@ void WinMtfOutput::StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill ) if ( !bStroke ) { mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_LINECOLOR ) ); - mpGDIMetaFile->AddAction( new MetaLineColorAction( Color(), FALSE ) ); + mpGDIMetaFile->AddAction( new MetaLineColorAction( Color(), sal_False ) ); } if ( aPathObj.Count() == 1 ) mpGDIMetaFile->AddAction( new MetaPolygonAction( aPathObj.GetObject( 0 ) ) ); @@ -1173,7 +1173,7 @@ void WinMtfOutput::DrawLine( const Point& rSource, const Point& rDest ) //----------------------------------------------------------------------------------- -void WinMtfOutput::DrawRect( const Rectangle& rRect, BOOL bEdge ) +void WinMtfOutput::DrawRect( const Rectangle& rRect, sal_Bool bEdge ) { UpdateClipRegion(); UpdateFillStyle(); @@ -1247,7 +1247,7 @@ void WinMtfOutput::DrawEllipse( const Rectangle& rRect ) //----------------------------------------------------------------------------------- -void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, BOOL bTo ) +void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, sal_Bool bTo ) { UpdateClipRegion(); UpdateLineStyle(); @@ -1349,7 +1349,7 @@ void WinMtfOutput::DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath ) { if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) { - USHORT nCount = rPolygon.GetSize(); + sal_uInt16 nCount = rPolygon.GetSize(); if ( nCount ) { if ( rPolygon[ nCount - 1 ] != rPolygon[ 0 ] ) @@ -1564,7 +1564,7 @@ void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry pVDev->SetFont( maFont ); if( pDXArry ) { - UINT32 nLen = rText.Len(); + sal_uInt32 nLen = rText.Len(); nTextWidth = pVDev->GetTextWidth( rText.GetChar( (sal_uInt16)( nLen - 1 ) ) ); if( nLen > 1 ) nTextWidth += pDXArry[ nLen - 2 ]; @@ -1644,7 +1644,7 @@ void WinMtfOutput::ImplDrawBitmap( const Point& rPos, const Size& rSize, const B const Point aEmptyPoint; // #i50672# Extract whole VDev content (to match size of rBitmap) - aVDev.EnableMapMode( FALSE ); + aVDev.EnableMapMode( sal_False ); Bitmap aMask( aVDev.GetBitmap( aEmptyPoint, aSizePixel ).CreateMask( Color( COL_WHITE ) ) ); if ( aBmpEx.IsTransparent() ) @@ -1713,7 +1713,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) { // patterns aren't well supported yet sal_uInt32 nOldRop = SetRasterOp( ROP_OVERPAINT ); // in this case nRasterOperation is either 0 or 0xff UpdateFillStyle(); - DrawRect( aRect, FALSE ); + DrawRect( aRect, sal_False ); SetRasterOp( nOldRop ); } else @@ -1778,7 +1778,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) if ( nOperation == 0x1 ) { SetRasterOp( R2_NOT ); - DrawRect( aRect, FALSE ); + DrawRect( aRect, sal_False ); } } break; @@ -1796,7 +1796,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) if ( nOperation == 0x7 ) { SetRasterOp( R2_NOT ); - DrawRect( aRect, FALSE ); + DrawRect( aRect, sal_False ); } } break; @@ -1805,7 +1805,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) case 0xb : { SetRasterOp( R2_NOT ); - DrawRect( aRect, FALSE ); + DrawRect( aRect, sal_False ); SetRasterOp( R2_COPYPEN ); Bitmap aMask( aBitmap ); aBitmap.Invert(); @@ -1816,7 +1816,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) if ( nOperation == 0xb ) { SetRasterOp( R2_NOT ); - DrawRect( aRect, FALSE ); + DrawRect( aRect, sal_False ); } } break; @@ -1833,7 +1833,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) if ( nOperation == 0xd ) { SetRasterOp( R2_NOT ); - DrawRect( aRect, FALSE ); + DrawRect( aRect, sal_False ); } } break; @@ -1845,7 +1845,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) if ( nOperation == 0x9 ) { SetRasterOp( R2_NOT ); - DrawRect( aRect, FALSE ); + DrawRect( aRect, sal_False ); } } break; @@ -1855,7 +1855,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) { // in this case nRasterOperation is either 0 or 0xff maFillStyle = WinMtfFillStyle( Color( nRasterOperation, nRasterOperation, nRasterOperation ) ); UpdateFillStyle(); - DrawRect( aRect, FALSE ); + DrawRect( aRect, sal_False ); } break; @@ -1871,7 +1871,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) case 0x5 : // only destination is used { SetRasterOp( R2_NOT ); - DrawRect( aRect, FALSE ); + DrawRect( aRect, sal_False ); } case 0xa : // no operation break; @@ -1900,7 +1900,7 @@ void WinMtfOutput::SetDevOrg( const Point& rPoint ) //----------------------------------------------------------------------------------- -void WinMtfOutput::SetDevOrgOffset( INT32 nXAdd, INT32 nYAdd ) +void WinMtfOutput::SetDevOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd ) { mnDevOrgX += nXAdd; mnDevOrgY += nYAdd; @@ -1942,7 +1942,7 @@ void WinMtfOutput::SetWinOrg( const Point& rPoint ) //----------------------------------------------------------------------------------- -void WinMtfOutput::SetWinOrgOffset( INT32 nXAdd, INT32 nYAdd ) +void WinMtfOutput::SetWinOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd ) { mnWinOrgX += nXAdd; mnWinOrgY += nYAdd; @@ -2036,7 +2036,7 @@ void WinMtfOutput::SetWorldTransform( const XForm& rXForm ) //----------------------------------------------------------------------------------- -void WinMtfOutput::ModifyWorldTransform( const XForm& rXForm, UINT32 nMode ) +void WinMtfOutput::ModifyWorldTransform( const XForm& rXForm, sal_uInt32 nMode ) { switch( nMode ) { @@ -2200,4 +2200,3 @@ void WinMtfOutput::AddFromGDIMetaFile( GDIMetaFile& rGDIMetaFile ) { rGDIMetaFile.Play( *mpGDIMetaFile, 0xFFFFFFFF ); } - diff --git a/svtools/source/filter/wmf/winmtf.hxx b/svtools/source/filter/wmf/winmtf.hxx index fb4fd2fe0c57..ca7b62b38ef3 100644 --- a/svtools/source/filter/wmf/winmtf.hxx +++ b/svtools/source/filter/wmf/winmtf.hxx @@ -144,19 +144,19 @@ struct LOGFONTW { - INT32 lfHeight; - INT32 lfWidth; - INT32 lfEscapement; - INT32 lfOrientation; - INT32 lfWeight; - BYTE lfItalic; - BYTE lfUnderline; - BYTE lfStrikeOut; - BYTE lfCharSet; - BYTE lfOutPrecision; - BYTE lfClipPrecision; - BYTE lfQuality; - BYTE lfPitchAndFamily; + sal_Int32 lfHeight; + sal_Int32 lfWidth; + sal_Int32 lfEscapement; + sal_Int32 lfOrientation; + sal_Int32 lfWeight; + sal_uInt8 lfItalic; + sal_uInt8 lfUnderline; + sal_uInt8 lfStrikeOut; + sal_uInt8 lfCharSet; + sal_uInt8 lfOutPrecision; + sal_uInt8 lfClipPrecision; + sal_uInt8 lfQuality; + sal_uInt8 lfPitchAndFamily; String alfFaceName; }; @@ -367,23 +367,23 @@ struct WinMtfFontStyle struct WinMtfFillStyle { Color aFillColor; - BOOL bTransparent; + sal_Bool bTransparent; WinMtfFillStyle() : aFillColor ( Color( COL_BLACK ) ), - bTransparent( FALSE ) + bTransparent( sal_False ) { }; - WinMtfFillStyle( const Color& rColor, BOOL bTrans = FALSE ) : + WinMtfFillStyle( const Color& rColor, sal_Bool bTrans = sal_False ) : aFillColor ( rColor ), bTransparent( bTrans ) { }; - BOOL operator==( const WinMtfFillStyle& rStyle ) + sal_Bool operator==( const WinMtfFillStyle& rStyle ) { return ( ( aFillColor == rStyle.aFillColor ) && ( bTransparent == rStyle.bTransparent ) ); }; - BOOL operator==( WinMtfFillStyle* pStyle ) + sal_Bool operator==( WinMtfFillStyle* pStyle ) { return ( ( aFillColor == pStyle->aFillColor ) && ( bTransparent == pStyle->bTransparent ) ); }; void operator=( const WinMtfFillStyle& rStyle ) { aFillColor = rStyle.aFillColor; bTransparent = rStyle.bTransparent; }; void operator=( WinMtfFillStyle* pStyle ) { aFillColor = pStyle->aFillColor; bTransparent = pStyle->bTransparent; }; @@ -395,23 +395,23 @@ struct WinMtfLineStyle { Color aLineColor; LineInfo aLineInfo; - BOOL bTransparent; + sal_Bool bTransparent; WinMtfLineStyle() : aLineColor ( COL_BLACK ), - bTransparent( FALSE ) {}; + bTransparent( sal_False ) {}; - WinMtfLineStyle( const Color& rColor, BOOL bTrans = FALSE ) : + WinMtfLineStyle( const Color& rColor, sal_Bool bTrans = sal_False ) : aLineColor ( rColor ), bTransparent( bTrans ) {}; - WinMtfLineStyle( const Color& rColor, const LineInfo rStyle, BOOL bTrans = FALSE ) : + WinMtfLineStyle( const Color& rColor, const LineInfo rStyle, sal_Bool bTrans = sal_False ) : aLineColor ( rColor ), aLineInfo ( rStyle ), bTransparent( bTrans ) {}; - BOOL operator==( const WinMtfLineStyle& rStyle ) { return ( ( aLineColor == rStyle.aLineColor ) && ( bTransparent == rStyle.bTransparent ) && ( aLineInfo == rStyle.aLineInfo ) ); }; - BOOL operator==( WinMtfLineStyle* pStyle ) { return ( ( aLineColor == pStyle->aLineColor ) && ( bTransparent == pStyle->bTransparent ) && ( aLineInfo == pStyle->aLineInfo ) ); }; + sal_Bool operator==( const WinMtfLineStyle& rStyle ) { return ( ( aLineColor == rStyle.aLineColor ) && ( bTransparent == rStyle.bTransparent ) && ( aLineInfo == rStyle.aLineInfo ) ); }; + sal_Bool operator==( WinMtfLineStyle* pStyle ) { return ( ( aLineColor == pStyle->aLineColor ) && ( bTransparent == pStyle->bTransparent ) && ( aLineInfo == pStyle->aLineInfo ) ); }; void operator=( const WinMtfLineStyle& rStyle ) { aLineColor = rStyle.aLineColor; @@ -480,9 +480,9 @@ struct BSaveStruct { Bitmap aBmp; Rectangle aOutRect; - UINT32 nWinRop; + sal_uInt32 nWinRop; - BSaveStruct( const Bitmap& rBmp, const Rectangle& rOutRect, UINT32 nRop ) : + BSaveStruct( const Bitmap& rBmp, const Rectangle& rOutRect, sal_uInt32 nRop ) : aBmp( rBmp ), aOutRect( rOutRect ), nWinRop( nRop ){}; }; @@ -594,7 +594,7 @@ class WinMtfOutput void ImplMap( Font& rFont ); Polygon& ImplMap( Polygon& rPolygon ); PolyPolygon& ImplMap( PolyPolygon& rPolyPolygon ); - void ImplResizeObjectArry( UINT32 nNewEntry ); + void ImplResizeObjectArry( sal_uInt32 nNewEntry ); void ImplSetNonPersistentLineColorTransparenz(); void ImplDrawClippedPolyPolygon( const PolyPolygon& rPolyPoly ); void ImplDrawBitmap( const Point& rPos, const Size& rSize, const BitmapEx rBitmap ); @@ -602,12 +602,12 @@ class WinMtfOutput public: void SetDevOrg( const Point& rPoint ); - void SetDevOrgOffset( INT32 nXAdd, INT32 nYAdd ); + void SetDevOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd ); void SetDevExt( const Size& rSize ); void ScaleDevExt( double fX, double fY ); void SetWinOrg( const Point& rPoint ); - void SetWinOrgOffset( INT32 nX, INT32 nY ); + void SetWinOrgOffset( sal_Int32 nX, sal_Int32 nY ); void SetWinExt( const Size& rSize ); void ScaleWinExt( double fX, double fY ); @@ -619,24 +619,24 @@ class WinMtfOutput sal_uInt32 GetMapMode() const { return mnMapMode; }; void SetMapMode( sal_uInt32 mnMapMode ); void SetWorldTransform( const XForm& rXForm ); - void ModifyWorldTransform( const XForm& rXForm, UINT32 nMode ); + void ModifyWorldTransform( const XForm& rXForm, sal_uInt32 nMode ); void Push(); void Pop(); - UINT32 SetRasterOp( UINT32 nRasterOp ); + sal_uInt32 SetRasterOp( sal_uInt32 nRasterOp ); void StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill ); void SetGfxMode( sal_Int32 nGfxMode ){ mnGfxMode = nGfxMode; }; sal_Int32 GetGfxMode() const { return mnGfxMode; }; - void SetBkMode( UINT32 nMode ); + void SetBkMode( sal_uInt32 nMode ); void SetBkColor( const Color& rColor ); void SetTextColor( const Color& rColor ); - void SetTextAlign( UINT32 nAlign ); + void SetTextAlign( sal_uInt32 nAlign ); void CreateObject( GDIObjectType, void* pStyle = NULL ); - void CreateObject( INT32 nIndex, GDIObjectType, void* pStyle = NULL ); - void DeleteObject( INT32 nIndex ); - void SelectObject( INT32 nIndex ); + void CreateObject( sal_Int32 nIndex, GDIObjectType, void* pStyle = NULL ); + void DeleteObject( sal_Int32 nIndex ); + void SelectObject( sal_Int32 nIndex ); CharSet GetCharSet(){ return maFont.GetCharSet(); }; void SetFont( const Font& rFont ); const Font& GetFont() const; @@ -651,10 +651,10 @@ class WinMtfOutput void LineTo( const Point& rPoint, sal_Bool bRecordPath = sal_False ); void DrawPixel( const Point& rSource, const Color& rColor ); void DrawLine( const Point& rSource, const Point& rDest ); - void DrawRect( const Rectangle& rRect, BOOL bEdge = TRUE ); + void DrawRect( const Rectangle& rRect, sal_Bool bEdge = sal_True ); void DrawRoundRect( const Rectangle& rRect, const Size& rSize ); void DrawEllipse( const Rectangle& rRect ); - void DrawArc( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle, BOOL bDrawTo = FALSE ); + void DrawArc( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle, sal_Bool bDrawTo = sal_False ); void DrawPie( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle ); void DrawChord( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle ); void DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath = sal_False ); @@ -685,7 +685,7 @@ class WinMtf WinMtfOutput* pOut; // SvStream* pWMF; // Die einzulesende WMF/EMF-Datei - UINT32 nStartPos, nEndPos; + sal_uInt32 nStartPos, nEndPos; List aBmpSaveList; FilterConfigItem* pFilterConfigItem; @@ -695,7 +695,7 @@ class WinMtf // Sorgt dafuer, das aSampledBrush der aktuelle Brush des GDIMetaFiles ist. Color ReadColor(); - void Callback( USHORT nPercent ); + void Callback( sal_uInt16 nPercent ); WinMtf( WinMtfOutput* pOut, SvStream& rStreamWMF, FilterConfigItem* pConfigItem = NULL ); ~WinMtf(); @@ -711,16 +711,16 @@ class EnhWMFReader : public WinMtf sal_Bool bRecordPath; sal_Int32 nRecordCount; - BOOL ReadHeader(); - Rectangle ReadRectangle( INT32, INT32, INT32, INT32 ); // Liesst und konvertiert ein Rechteck - void ImplExtTextOut( BOOL bWideCharakter ); + sal_Bool ReadHeader(); + Rectangle ReadRectangle( sal_Int32, sal_Int32, sal_Int32, sal_Int32 ); // Liesst und konvertiert ein Rechteck + void ImplExtTextOut( sal_Bool bWideCharakter ); public: EnhWMFReader( SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = NULL ) : WinMtf( new WinMtfOutput( rGDIMetaFile ), rStreamWMF, pConfigItem ), bRecordPath( sal_False ) {}; ~EnhWMFReader(); - BOOL ReadEnhWMF(); + sal_Bool ReadEnhWMF(); }; //============================ WMFReader ================================== @@ -730,7 +730,7 @@ class WMFReader : public WinMtf private: VirtualDevice aVDev; // just for the purpose of "IsFontAvailable" - UINT16 nUnitsPerInch; + sal_uInt16 nUnitsPerInch; sal_uInt32 nRecSize; // embedded EMF data @@ -750,10 +750,10 @@ private: sal_uInt32 nUnicodeEscapeAction; // Liesst den Kopf der WMF-Datei - BOOL ReadHeader(); + sal_Bool ReadHeader(); // Liesst die Parameter des Rocords mit der Funktionsnummer nFunction. - void ReadRecordParams( USHORT nFunction ); + void ReadRecordParams( sal_uInt16 nFunction ); Point ReadPoint(); // Liesst und konvertiert einen Punkt (erst X dann Y) Point ReadYX(); // Liesst und konvertiert einen Punkt (erst Y dann X) @@ -773,5 +773,3 @@ public: }; #endif - - diff --git a/svtools/source/filter/wmf/winwmf.cxx b/svtools/source/filter/wmf/winwmf.cxx index cea1ab490b04..feb1a2895793 100644 --- a/svtools/source/filter/wmf/winwmf.cxx +++ b/svtools/source/filter/wmf/winwmf.cxx @@ -156,7 +156,7 @@ Size WMFReader::ReadYXExt() // ------------------------------------------------------------------------ -void WMFReader::ReadRecordParams( USHORT nFunc ) +void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) { switch( nFunc ) { @@ -168,7 +168,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) case W_META_SETBKMODE: { - USHORT nDat; + sal_uInt16 nDat; *pWMF >> nDat; pOut->SetBkMode( nDat ); } @@ -185,7 +185,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) case W_META_SETROP2: { - UINT16 nROP2; + sal_uInt16 nROP2; *pWMF >> nROP2; pOut->SetRasterOp( nROP2 ); } @@ -322,7 +322,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) case W_META_POLYGON: { - USHORT i,nPoints; + sal_uInt16 i,nPoints; *pWMF >> nPoints; Polygon aPoly( nPoints ); for( i = 0; i < nPoints; i++ ) @@ -333,13 +333,13 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) case W_META_POLYPOLYGON: { - USHORT i, nPoly, nPoints; - USHORT* pnPoints; + sal_uInt16 i, nPoly, nPoints; + sal_uInt16* pnPoints; Point* pPtAry; // Anzahl der Polygone: *pWMF >> nPoly; // Anzahl der Punkte eines jeden Polygons holen, Gesammtzahl der Punkte ermitteln: - pnPoints = new USHORT[ nPoly ]; + pnPoints = new sal_uInt16[ nPoly ]; nPoints = 0; for( i = 0; i < nPoly; i++ ) { @@ -360,7 +360,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) case W_META_POLYLINE: { - USHORT i,nPoints; + sal_uInt16 i,nPoints; *pWMF >> nPoints; Polygon aPoly( nPoints ); for( i = 0; i < nPoints; i++ ) @@ -396,7 +396,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) case W_META_TEXTOUT: { - USHORT nLength; + sal_uInt16 nLength; *pWMF >> nLength; if ( nLength ) { @@ -453,7 +453,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) sal_uInt32 nMaxStreamPos = nRecordPos + ( nRecordSize << 1 ); sal_Int32 nDxArySize = nMaxStreamPos - pWMF->Tell(); sal_Int32 nDxAryEntries = nDxArySize >> 1; - sal_Bool bUseDXAry = FALSE; + sal_Bool bUseDXAry = sal_False; if ( ( ( nDxAryEntries % nOriginalTextLen ) == 0 ) && ( nNewTextLen <= nOriginalTextLen ) ) { @@ -481,7 +481,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) pDXAry[ i ] = nDx; } if ( i == nNewTextLen ) - bUseDXAry = TRUE; + bUseDXAry = sal_True; } if ( pDXAry && bUseDXAry ) pOut->DrawText( aPosition, aText, pDXAry ); @@ -496,7 +496,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) case W_META_SELECTOBJECT: { - INT16 nObjIndex; + sal_Int16 nObjIndex; *pWMF >> nObjIndex; pOut->SelectObject( nObjIndex ); } @@ -504,7 +504,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) case W_META_SETTEXTALIGN: { - UINT16 nAlign; + sal_uInt16 nAlign; *pWMF >> nAlign; pOut->SetTextAlign( nAlign ); } @@ -602,14 +602,14 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) { if ( nWinROP == PATCOPY ) *pWMF >> nUsage; // i don't know anything of this parameter, so its called nUsage - // pOut->DrawRect( Rectangle( ReadYX(), aDestSize ), FALSE ); + // pOut->DrawRect( Rectangle( ReadYX(), aDestSize ), sal_False ); Size aDestSize( ReadYXExt() ); if ( aDestSize.Width() && aDestSize.Height() ) // #92623# do not try to read buggy bitmaps { Rectangle aDestRect( ReadYX(), aDestSize ); if ( nWinROP != PATCOPY ) - aBmp.Read( *pWMF, FALSE ); + aBmp.Read( *pWMF, sal_False ); // test if it is sensible to crop if ( nSye && nSxe && @@ -629,18 +629,18 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) { Bitmap aBmp; BitmapReadAccess* pBmp; - UINT32 nRed = 0, nGreen = 0, nBlue = 0, nCount = 1; - UINT16 nFunction; + sal_uInt32 nRed = 0, nGreen = 0, nBlue = 0, nCount = 1; + sal_uInt16 nFunction; *pWMF >> nFunction >> nFunction; - aBmp.Read( *pWMF, FALSE ); + aBmp.Read( *pWMF, sal_False ); pBmp = aBmp.AcquireReadAccess(); if ( pBmp ) { - for ( INT32 y = 0; y < pBmp->Height(); y++ ) + for ( sal_Int32 y = 0; y < pBmp->Height(); y++ ) { - for ( INT32 x = 0; x < pBmp->Width(); x++ ) + for ( sal_Int32 x = 0; x < pBmp->Width(); x++ ) { const BitmapColor aColor( pBmp->GetColor( y, x ) ); @@ -654,14 +654,14 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) nCount++; aBmp.ReleaseAccess( pBmp ); } - Color aColor( (BYTE)( nRed / nCount ), (BYTE)( nGreen / nCount ), (BYTE)( nBlue / nCount ) ); - pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( aColor, FALSE ) ); + Color aColor( (sal_uInt8)( nRed / nCount ), (sal_uInt8)( nGreen / nCount ), (sal_uInt8)( nBlue / nCount ) ); + pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( aColor, sal_False ) ); } break; case W_META_DELETEOBJECT: { - INT16 nIndex; + sal_Int16 nIndex; *pWMF >> nIndex; pOut->DeleteObject( nIndex ); } @@ -675,29 +675,29 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) case W_META_CREATEBRUSH: { - pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( Color( COL_WHITE ), FALSE ) ); + pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( Color( COL_WHITE ), sal_False ) ); } break; case W_META_CREATEPATTERNBRUSH: { - pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( Color( COL_WHITE ), FALSE ) ); + pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( Color( COL_WHITE ), sal_False ) ); } break; case W_META_CREATEPENINDIRECT: { LineInfo aLineInfo; - USHORT nStyle, nWidth, nHeight; + sal_uInt16 nStyle, nWidth, nHeight; *pWMF >> nStyle >> nWidth >> nHeight; if ( nWidth ) aLineInfo.SetWidth( nWidth ); - BOOL bTransparent = FALSE; - UINT16 nDashCount = 0; - UINT16 nDotCount = 0; + sal_Bool bTransparent = sal_False; + sal_uInt16 nDashCount = 0; + sal_uInt16 nDotCount = 0; switch( nStyle ) { case PS_DASHDOTDOT : @@ -711,7 +711,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) nDashCount++; break; case PS_NULL : - bTransparent = TRUE; + bTransparent = sal_True; aLineInfo.SetStyle( LINE_NONE ); break; default : @@ -731,9 +731,9 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) case W_META_CREATEBRUSHINDIRECT: { - USHORT nStyle; + sal_uInt16 nStyle; *pWMF >> nStyle; - pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? TRUE : FALSE ) ); + pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? sal_True : sal_False ) ); } break; @@ -741,7 +741,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) { Size aFontSize; char lfFaceName[ LF_FACESIZE ]; - INT16 lfEscapement, lfOrientation, lfWeight; // ( ehemals USHORT ) + sal_Int16 lfEscapement, lfOrientation, lfWeight; // ( ehemals sal_uInt16 ) LOGFONTW aLogFont; aFontSize = ReadYXExt(); @@ -796,11 +796,11 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) case W_META_PATBLT: { - UINT32 nROP, nOldROP; + sal_uInt32 nROP, nOldROP; *pWMF >> nROP; Size aSize = ReadYXExt(); nOldROP = pOut->SetRasterOp( nROP ); - pOut->DrawRect( Rectangle( ReadYX(), aSize ), FALSE ); + pOut->DrawRect( Rectangle( ReadYX(), aSize ), sal_False ); pOut->SetRasterOp( nOldROP ); } break; @@ -996,7 +996,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) // ------------------------------------------------------------------------ -BOOL WMFReader::ReadHeader() +sal_Bool WMFReader::ReadHeader() { Rectangle aPlaceableBound; sal_uInt32 nl, nStrmPos = pWMF->Tell(); @@ -1007,7 +1007,7 @@ BOOL WMFReader::ReadHeader() Size aWMFSize; if ( nl == 0x9ac6cdd7L ) { - INT16 nVal; + sal_Int16 nVal; // hmf (Unused) ueberlesen wir pWMF->SeekRel(2); @@ -1055,7 +1055,7 @@ BOOL WMFReader::ReadHeader() if( nl != 0x00090001 ) { pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR ); - return FALSE; + return sal_False; } pWMF->SeekRel( 2 ); // Version (von Windows) @@ -1064,13 +1064,13 @@ BOOL WMFReader::ReadHeader() pWMF->SeekRel( 4 ); // MaxRecord (Groesse des groessten Records in Words) pWMF->SeekRel( 2 ); // NoParameters (Unused - return TRUE; + return sal_True; } void WMFReader::ReadWMF() { - USHORT nFunction; - ULONG nPos, nPercent, nLastPercent; + sal_uInt16 nFunction; + sal_uLong nPos, nPercent, nLastPercent; nSkipActions = 0; nCurrentAction = 0; @@ -1090,7 +1090,7 @@ void WMFReader::ReadWMF() nEndPos=pWMF->Seek( STREAM_SEEK_TO_END ); pWMF->Seek( nStartPos ); - Callback( (USHORT) ( nLastPercent = 0 ) ); + Callback( (sal_uInt16) ( nLastPercent = 0 ) ); if ( ReadHeader() ) { @@ -1099,14 +1099,14 @@ void WMFReader::ReadWMF() if( nEndPos - nStartPos ) { - while( TRUE ) + while( sal_True ) { nCurrentAction++; nPercent = ( nPos - nStartPos ) * 100 / ( nEndPos - nStartPos ); if( nLastPercent + 4 <= nPercent ) { - Callback( (USHORT) nPercent ); + Callback( (sal_uInt16) nPercent ); nLastPercent = nPercent; } *pWMF >> nRecSize >> nFunction; @@ -1288,7 +1288,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt case W_META_POLYGON: { - USHORT i,nPoints; + sal_uInt16 i,nPoints; *pStm >> nPoints; for( i = 0; i < nPoints; i++ ) GetWinExtMax( ReadPoint(), rPlaceableBound, nMapMode ); @@ -1297,7 +1297,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt case W_META_POLYPOLYGON: { - USHORT i, nPoly, nPoints = 0; + sal_uInt16 i, nPoly, nPoints = 0; *pStm >> nPoly; for( i = 0; i < nPoly; i++ ) { @@ -1312,7 +1312,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt case W_META_POLYLINE: { - USHORT i,nPoints; + sal_uInt16 i,nPoints; *pStm >> nPoints; for( i = 0; i < nPoints; i++ ) GetWinExtMax( ReadPoint(), rPlaceableBound, nMapMode ); @@ -1328,7 +1328,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt case W_META_TEXTOUT: { - USHORT nLength; + sal_uInt16 nLength; *pStm >> nLength; // todo: we also have to take care of the text width if ( nLength ) @@ -1383,7 +1383,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt { if ( nWinROP == PATCOPY ) *pStm >> nUsage; // i don't know anything of this parameter, so its called nUsage - // pOut->DrawRect( Rectangle( ReadYX(), aDestSize ), FALSE ); + // pOut->DrawRect( Rectangle( ReadYX(), aDestSize ), sal_False ); Size aDestSize( ReadYXExt() ); if ( aDestSize.Width() && aDestSize.Height() ) // #92623# do not try to read buggy bitmaps @@ -1397,7 +1397,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt case W_META_PATBLT: { - UINT32 nROP; + sal_uInt32 nROP; *pStm >> nROP; Size aSize = ReadYXExt(); GetWinExtMax( Rectangle( ReadYX(), aSize ), rPlaceableBound, nMapMode ); @@ -1428,4 +1428,3 @@ WMFReader::~WMFReader() if( pEMFStream ) delete pEMFStream; } - diff --git a/svtools/source/filter/wmf/wmf.cxx b/svtools/source/filter/wmf/wmf.cxx index 25ca9f721b33..4e84cd920b56 100644 --- a/svtools/source/filter/wmf/wmf.cxx +++ b/svtools/source/filter/wmf/wmf.cxx @@ -35,18 +35,18 @@ // ----------------------------------------------------------------------------- -BOOL ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, FilterConfigItem* pConfigItem ) +sal_Bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, FilterConfigItem* pConfigItem ) { - UINT32 nMetaType; - UINT32 nOrgPos = rStreamWMF.Tell(); - UINT16 nOrigNumberFormat = rStreamWMF.GetNumberFormatInt(); + sal_uInt32 nMetaType; + sal_uInt32 nOrgPos = rStreamWMF.Tell(); + sal_uInt16 nOrigNumberFormat = rStreamWMF.GetNumberFormatInt(); rStreamWMF.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); rStreamWMF.Seek( 0x28 ); rStreamWMF >> nMetaType; rStreamWMF.Seek( nOrgPos ); if ( nMetaType == 0x464d4520 ) { - if ( EnhWMFReader( rStreamWMF, rGDIMetaFile, pConfigItem ).ReadEnhWMF() == FALSE ) + if ( EnhWMFReader( rStreamWMF, rGDIMetaFile, pConfigItem ).ReadEnhWMF() == sal_False ) rStreamWMF.SetError( SVSTREAM_FILEFORMAT_ERROR ); } else @@ -59,18 +59,18 @@ BOOL ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, // ----------------------------------------------------------------------------- -BOOL ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pFilterConfigItem ) +sal_Bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pFilterConfigItem ) { - UINT32 nMetaType; - UINT32 nOrgPos = rStream.Tell(); - UINT16 nOrigNumberFormat = rStream.GetNumberFormatInt(); + sal_uInt32 nMetaType; + sal_uInt32 nOrgPos = rStream.Tell(); + sal_uInt16 nOrigNumberFormat = rStream.GetNumberFormatInt(); rStream.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); rStream.Seek( 0x28 ); rStream >> nMetaType; rStream.Seek( nOrgPos ); if ( nMetaType == 0x464d4520 ) { - if ( EnhWMFReader( rStream, rMTF, NULL ).ReadEnhWMF() == FALSE ) + if ( EnhWMFReader( rStream, rMTF, NULL ).ReadEnhWMF() == sal_False ) rStream.SetError( SVSTREAM_FILEFORMAT_ERROR ); } else @@ -83,8 +83,8 @@ BOOL ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* // ----------------------------------------------------------------------------- -BOOL ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, - FilterConfigItem* pConfigItem, BOOL bPlaceable) +sal_Bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, + FilterConfigItem* pConfigItem, sal_Bool bPlaceable) { WMFWriter aWMFWriter; return aWMFWriter.WriteWMF( rMTF, rTargetStream, pConfigItem, bPlaceable ); @@ -92,7 +92,7 @@ BOOL ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream // ----------------------------------------------------------------------------- -BOOL ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, +sal_Bool ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem ) { EMFWriter aEMFWriter; @@ -101,14 +101,14 @@ BOOL ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream // ----------------------------------------------------------------------------- -BOOL WriteWindowMetafile( SvStream& rStream, const GDIMetaFile& rMTF ) +sal_Bool WriteWindowMetafile( SvStream& rStream, const GDIMetaFile& rMTF ) { return WMFWriter().WriteWMF( rMTF, rStream, NULL ); } // ----------------------------------------------------------------------------- -BOOL WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF ) +sal_Bool WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF ) { - return WMFWriter().WriteWMF( rMTF, rStream, NULL, FALSE ); + return WMFWriter().WriteWMF( rMTF, rStream, NULL, sal_False ); } diff --git a/svtools/source/filter/wmf/wmfwr.cxx b/svtools/source/filter/wmf/wmfwr.cxx index 82d4101b48c9..26bda76a11d9 100644 --- a/svtools/source/filter/wmf/wmfwr.cxx +++ b/svtools/source/filter/wmf/wmfwr.cxx @@ -282,7 +282,7 @@ void WMFWriter::MayCallback() { if ( xStatusIndicator.is() ) { - ULONG nPercent; + sal_uLong nPercent; // Wir gehen mal einfach so davon aus, dass 16386 Actions einer Bitmap entsprechen // (in der Regel wird ein Metafile entweder nur Actions oder einige Bitmaps und fast @@ -303,7 +303,7 @@ void WMFWriter::MayCallback() void WMFWriter::CountActionsAndBitmaps( const GDIMetaFile & rMTF ) { - ULONG nAction, nActionCount; + sal_uLong nAction, nActionCount; nActionCount = rMTF.GetActionCount(); @@ -372,7 +372,7 @@ void WMFWriter::WriteRectangle(const Rectangle & rRect) void WMFWriter::WriteColor(const Color & rColor) { - *pWMF << (BYTE) rColor.GetRed() << (BYTE) rColor.GetGreen() << (BYTE) rColor.GetBlue() << (BYTE) 0; + *pWMF << (sal_uInt8) rColor.GetRed() << (sal_uInt8) rColor.GetGreen() << (sal_uInt8) rColor.GetBlue() << (sal_uInt8) 0; } @@ -386,12 +386,12 @@ void WMFWriter::WriteRecordHeader(sal_uInt32 nSizeWords, sal_uInt16 nType) void WMFWriter::UpdateRecordHeader() { - ULONG nPos; + sal_uLong nPos; sal_uInt32 nSize; nPos=pWMF->Tell(); nSize=nPos-nActRecordPos; if ((nSize & 1)!=0) { - *pWMF << (BYTE)0; + *pWMF << (sal_uInt8)0; nPos++; nSize++; } nSize/=2; @@ -424,19 +424,19 @@ void WMFWriter::WMFRecord_CreateBrushIndirect(const Color& rColor) WriteRecordHeader(0x00000007,W_META_CREATEBRUSHINDIRECT); if( rColor==Color(COL_TRANSPARENT) ) - *pWMF << (UINT16) W_BS_HOLLOW; + *pWMF << (sal_uInt16) W_BS_HOLLOW; else - *pWMF << (UINT16) W_BS_SOLID; + *pWMF << (sal_uInt16) W_BS_SOLID; WriteColor( rColor ); - *pWMF << (UINT16) 0; + *pWMF << (sal_uInt16) 0; } void WMFWriter::WMFRecord_CreateFontIndirect(const Font & rFont) { - USHORT nWeight,i; - BYTE nPitchFamily; + sal_uInt16 nWeight,i; + sal_uInt8 nPitchFamily; WriteRecordHeader(0x00000000,W_META_CREATEFONTINDIRECT); WriteHeightWidth(Size(rFont.GetSize().Width(),-rFont.GetSize().Height())); @@ -457,9 +457,9 @@ void WMFWriter::WMFRecord_CreateFontIndirect(const Font & rFont) } *pWMF << nWeight; - if (rFont.GetItalic()==ITALIC_NONE) *pWMF << (BYTE)0; else *pWMF << (BYTE)1; - if (rFont.GetUnderline()==UNDERLINE_NONE) *pWMF << (BYTE)0; else *pWMF << (BYTE)1; - if (rFont.GetStrikeout()==STRIKEOUT_NONE) *pWMF << (BYTE)0; else *pWMF << (BYTE)1; + if (rFont.GetItalic()==ITALIC_NONE) *pWMF << (sal_uInt8)0; else *pWMF << (sal_uInt8)1; + if (rFont.GetUnderline()==UNDERLINE_NONE) *pWMF << (sal_uInt8)0; else *pWMF << (sal_uInt8)1; + if (rFont.GetStrikeout()==STRIKEOUT_NONE) *pWMF << (sal_uInt8)0; else *pWMF << (sal_uInt8)1; CharSet eFontNameEncoding = rFont.GetCharSet(); sal_uInt8 nCharSet = rtl_getBestWindowsCharsetFromTextEncoding( eFontNameEncoding ); @@ -469,7 +469,7 @@ void WMFWriter::WMFRecord_CreateFontIndirect(const Font & rFont) nCharSet = W_ANSI_CHARSET; *pWMF << nCharSet; - *pWMF << (BYTE)0 << (BYTE)0 << (BYTE)0; + *pWMF << (sal_uInt8)0 << (sal_uInt8)0 << (sal_uInt8)0; switch (rFont.GetPitch()) { case PITCH_FIXED: nPitchFamily=W_FIXED_PITCH; break; @@ -498,7 +498,7 @@ void WMFWriter::WMFRecord_CreateFontIndirect(const Font & rFont) void WMFWriter::WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo& rLineInfo ) { WriteRecordHeader(0x00000008,W_META_CREATEPENINDIRECT); - USHORT nStyle = rColor == Color( COL_TRANSPARENT ) ? W_PS_NULL : W_PS_SOLID; + sal_uInt16 nStyle = rColor == Color( COL_TRANSPARENT ) ? W_PS_NULL : W_PS_SOLID; switch( rLineInfo.GetStyle() ) { case LINE_DASH : @@ -531,7 +531,7 @@ void WMFWriter::WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo& WriteColor( rColor ); } -void WMFWriter::WMFRecord_DeleteObject(USHORT nObjectHandle) +void WMFWriter::WMFRecord_DeleteObject(sal_uInt16 nObjectHandle) { WriteRecordHeader(0x00000004,W_META_DELETEOBJECT); *pWMF << nObjectHandle; @@ -752,7 +752,7 @@ void WMFWriter::WMFRecord_Pie(const Rectangle & rRect, const Point & rStartPt, c void WMFWriter::WMFRecord_Polygon(const Polygon & rPoly) { - USHORT nSize,i; + sal_uInt16 nSize,i; Polygon aSimplePoly; if ( rPoly.HasFlags() ) @@ -760,7 +760,7 @@ void WMFWriter::WMFRecord_Polygon(const Polygon & rPoly) else aSimplePoly = rPoly; nSize = aSimplePoly.GetSize(); - WriteRecordHeader(((ULONG)nSize)*2+4,W_META_POLYGON); + WriteRecordHeader(((sal_uLong)nSize)*2+4,W_META_POLYGON); *pWMF << nSize; for (i=0; iGetSize(); @@ -837,7 +837,7 @@ void WMFWriter::WMFRecord_SaveDC() } -void WMFWriter::WMFRecord_SelectObject(USHORT nObjectHandle) +void WMFWriter::WMFRecord_SelectObject(sal_uInt16 nObjectHandle) { WriteRecordHeader(0x00000004,W_META_SELECTOBJECT); *pWMF << nObjectHandle; @@ -851,17 +851,17 @@ void WMFWriter::WMFRecord_SetBkColor(const Color & rColor) } -void WMFWriter::WMFRecord_SetBkMode(BOOL bTransparent) +void WMFWriter::WMFRecord_SetBkMode(sal_Bool bTransparent) { WriteRecordHeader(0x00000004,W_META_SETBKMODE); - if (bTransparent==TRUE) *pWMF << (USHORT)W_TRANSPARENT; - else *pWMF << (USHORT)W_OPAQUE; + if (bTransparent==sal_True) *pWMF << (sal_uInt16)W_TRANSPARENT; + else *pWMF << (sal_uInt16)W_OPAQUE; } void WMFWriter::WMFRecord_SetStretchBltMode() { WriteRecordHeader( 0x00000004, W_META_SETSTRETCHBLTMODE ); - *pWMF << (USHORT) 3; // STRETCH_DELETESCANS + *pWMF << (sal_uInt16) 3; // STRETCH_DELETESCANS } void WMFWriter::WMFRecord_SetPixel(const Point & rPoint, const Color & rColor) @@ -874,7 +874,7 @@ void WMFWriter::WMFRecord_SetPixel(const Point & rPoint, const Color & rColor) void WMFWriter::WMFRecord_SetROP2(RasterOp eROP) { - USHORT nROP2; + sal_uInt16 nROP2; switch (eROP) { case ROP_INVERT: nROP2=W_R2_NOT; break; @@ -886,9 +886,9 @@ void WMFWriter::WMFRecord_SetROP2(RasterOp eROP) } -void WMFWriter::WMFRecord_SetTextAlign(FontAlign eFontAlign, UINT32 eHorTextAlign) +void WMFWriter::WMFRecord_SetTextAlign(FontAlign eFontAlign, sal_uInt32 eHorTextAlign) { - USHORT nAlign; + sal_uInt16 nAlign; switch (eFontAlign) { case ALIGN_TOP: nAlign=W_TA_TOP; break; @@ -927,7 +927,7 @@ void WMFWriter::WMFRecord_SetWindowOrg(const Point & rPoint) void WMFWriter::WMFRecord_StretchDIB( const Point & rPoint, const Size & rSize, const Bitmap & rBitmap, sal_uInt32 nROP ) { - ULONG nPosAnf,nPosEnd; + sal_uLong nPosAnf,nPosEnd; nActBitmapPercent=50; MayCallback(); @@ -987,14 +987,14 @@ void WMFWriter::WMFRecord_TextOut(const Point & rPoint, const String & rStr) void WMFWriter::TrueTextOut(const Point & rPoint, const ByteString& rString) { - USHORT nLen,i; + sal_uInt16 nLen,i; WriteRecordHeader(0,W_META_TEXTOUT); nLen=rString.Len(); *pWMF << nLen; for ( i = 0; i < nLen; i++ ) - *pWMF << (BYTE)rString.GetChar( i ); - if ((nLen&1)!=0) *pWMF << (BYTE)0; + *pWMF << (sal_uInt8)rString.GetChar( i ); + if ((nLen&1)!=0) *pWMF << (sal_uInt8)0; WritePointYX(rPoint); UpdateRecordHeader(); } @@ -1012,30 +1012,30 @@ void WMFWriter::WMFRecord_IntersectClipRect( const Rectangle& rRect ) } -USHORT WMFWriter::AllocHandle() +sal_uInt16 WMFWriter::AllocHandle() { - USHORT i; + sal_uInt16 i; for (i=0; iGetSubstitute() ); - INT32 nCount = aGDIMetaFile.GetActionCount(); - for ( INT32 i = 0; i < nCount; i++ ) + sal_Int32 nCount = aGDIMetaFile.GetActionCount(); + for ( sal_Int32 i = 0; i < nCount; i++ ) { const MetaAction* pMetaAct = aGDIMetaFile.GetAction( i ); if ( pMetaAct->GetType() == META_BMPSCALE_ACTION ) @@ -1830,9 +1830,9 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) MayCallback(); if (pWMF->GetError()) - bStatus=FALSE; + bStatus=sal_False; - if(bStatus==FALSE) + if(bStatus==sal_False) break; } } @@ -1840,13 +1840,13 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) // ------------------------------------------------------------------------ -void WMFWriter::WriteHeader( const GDIMetaFile &, BOOL bPlaceable ) +void WMFWriter::WriteHeader( const GDIMetaFile &, sal_Bool bPlaceable ) { if( bPlaceable ) { - USHORT nCheckSum, nValue; + sal_uInt16 nCheckSum, nValue; Size aSize( pVirDev->LogicToLogic(Size(1,1),MapMode(MAP_INCH), aTargetMapMode) ); - USHORT nUnitsPerInch = (USHORT) ( ( aSize.Width() + aSize.Height() ) >> 1 ); + sal_uInt16 nUnitsPerInch = (sal_uInt16) ( ( aSize.Width() + aSize.Height() ) >> 1 ); nCheckSum=0; nValue=0xcdd7; nCheckSum^=nValue; *pWMF << nValue; @@ -1854,8 +1854,8 @@ void WMFWriter::WriteHeader( const GDIMetaFile &, BOOL bPlaceable ) nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue; nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue; nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue; - nValue=(USHORT) aTargetSize.Width(); nCheckSum^=nValue; *pWMF << nValue; - nValue=(USHORT) aTargetSize.Height(); nCheckSum^=nValue; *pWMF << nValue; + nValue=(sal_uInt16) aTargetSize.Width(); nCheckSum^=nValue; *pWMF << nValue; + nValue=(sal_uInt16) aTargetSize.Height(); nCheckSum^=nValue; *pWMF << nValue; nValue=nUnitsPerInch; nCheckSum^=nValue; *pWMF << nValue; nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue; nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue; @@ -1876,13 +1876,13 @@ void WMFWriter::WriteHeader( const GDIMetaFile &, BOOL bPlaceable ) void WMFWriter::UpdateHeader() { - ULONG nPos; + sal_uLong nPos; sal_uInt32 nFileSize; nPos=pWMF->Tell(); // Endposition = Gesammtgroesse der Datei nFileSize=nPos-nMetafileHeaderPos; // Groesse des 1. Headers abziehen if ((nFileSize&1)!=0) { // ggf. auf ganze Worte aufrunden - *pWMF << (BYTE)0; + *pWMF << (sal_uInt8)0; nPos++; nFileSize++; } @@ -1896,13 +1896,13 @@ void WMFWriter::UpdateHeader() // ------------------------------------------------------------------------ -BOOL WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream, - FilterConfigItem* pFConfigItem, BOOL bPlaceable ) +sal_Bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream, + FilterConfigItem* pFConfigItem, sal_Bool bPlaceable ) { WMFWriterAttrStackMember * pAt; - bEmbedEMF = TRUE; - bStatus=TRUE; + bEmbedEMF = sal_True; + bStatus=sal_True; pConvert = 0; pVirDev = new VirtualDevice; @@ -1949,8 +1949,8 @@ BOOL WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream, pAttrStack=NULL; - for (USHORT i=0; iLogicToLogic( rPrefSize, aSrcMapMode, rMapMode ); diff --git a/svtools/source/filter/wmf/wmfwr.hxx b/svtools/source/filter/wmf/wmfwr.hxx index 9fe698b22c2e..a76b39ad154f 100644 --- a/svtools/source/filter/wmf/wmfwr.hxx +++ b/svtools/source/filter/wmf/wmfwr.hxx @@ -69,9 +69,9 @@ class WMFWriter { private: - BOOL bStatus; + sal_Bool bStatus; - ULONG nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde. + sal_uLong nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde. FilterConfigItem* pFilterConfigItem; com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator; @@ -81,11 +81,11 @@ private: StarSymbolToMSMultiFont *pConvert; MapMode aTargetMapMode; Size aTargetSize; - USHORT nTargetDivisor; + sal_uInt16 nTargetDivisor; - ULONG nMetafileHeaderPos; + sal_uLong nMetafileHeaderPos; sal_uInt32 nMaxRecordSize; // in Worten - ULONG nActRecordPos; + sal_uLong nActRecordPos; // Aktuelle Attribute im Quell-Metafile: Color aSrcLineColor; @@ -96,11 +96,11 @@ private: FontAlign eSrcTextAlign; Font aSrcFont; MapMode aSrcMapMode; - BOOL bSrcIsClipping; + sal_Bool bSrcIsClipping; Region aSrcClipRegion; WMFWriterAttrStackMember * pAttrStack; - UINT32 eSrcHorTextAlign; + sal_uInt32 eSrcHorTextAlign; // Aktuelle Attribute im Ziel-Metafile: Color aDstLineColor; @@ -111,24 +111,24 @@ private: FontAlign eDstTextAlign; Font aDstFont; - UINT32 eDstHorTextAlign; + sal_uInt32 eDstHorTextAlign; - BOOL bDstIsClipping; // ???: derzeit unberuecksichtigt + sal_Bool bDstIsClipping; // ???: derzeit unberuecksichtigt Region aDstClipRegion; // ???: derzeit unberuecksichtigt - BOOL bHandleAllocated[MAXOBJECTHANDLES]; // Welche Handles vergeben sind - USHORT nDstPenHandle,nDstFontHandle,nDstBrushHandle; // Welche Handles die jeweiligen + sal_Bool bHandleAllocated[MAXOBJECTHANDLES]; // Welche Handles vergeben sind + sal_uInt16 nDstPenHandle,nDstFontHandle,nDstBrushHandle; // Welche Handles die jeweiligen // Selected-Objects besitzen // 0xffff = keines: // Damit nicht bei jeder Operation alle Attribute verglichen werden muessen: - ULONG nNumberOfActions; // Anzahl der Actions im GDIMetafile - ULONG nNumberOfBitmaps; // Anzahl der Bitmaps - ULONG nWrittenActions; // Anzahl der bereits verarbeiteten Actions beim Schreiben der Orders - ULONG nWrittenBitmaps; // Anzahl der bereits geschriebenen Bitmaps - ULONG nActBitmapPercent; // Wieviel Prozent die naechste Bitmap schon geschrieben ist. + sal_uLong nNumberOfActions; // Anzahl der Actions im GDIMetafile + sal_uLong nNumberOfBitmaps; // Anzahl der Bitmaps + sal_uLong nWrittenActions; // Anzahl der bereits verarbeiteten Actions beim Schreiben der Orders + sal_uLong nWrittenBitmaps; // Anzahl der bereits geschriebenen Bitmaps + sal_uLong nActBitmapPercent; // Wieviel Prozent die naechste Bitmap schon geschrieben ist. - BOOL bEmbedEMF; // optionally embedd EMF data into WMF + sal_Bool bEmbedEMF; // optionally embedd EMF data into WMF void MayCallback(); // Berechnet anhand der obigen 5 Parameter eine Prozentzahl @@ -161,7 +161,7 @@ private: void WMFRecord_CreateBrushIndirect(const Color& rColor); void WMFRecord_CreateFontIndirect(const Font & rFont); void WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo& rLineInfo ); - void WMFRecord_DeleteObject(USHORT nObjectHandle); + void WMFRecord_DeleteObject(sal_uInt16 nObjectHandle); void WMFRecord_Ellipse(const Rectangle & rRect); void WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_Int8* pData ); sal_Bool WMFRecord_Escape_Unicode( const Point& rPoint, const String& rStr, const sal_Int32 * pDXAry ); @@ -180,13 +180,13 @@ private: void WMFRecord_RestoreDC(); void WMFRecord_RoundRect(const Rectangle & rRect, long nHorzRound, long nVertRound); void WMFRecord_SaveDC(); - void WMFRecord_SelectObject(USHORT nObjectHandle); + void WMFRecord_SelectObject(sal_uInt16 nObjectHandle); void WMFRecord_SetBkColor(const Color & rColor); - void WMFRecord_SetBkMode(BOOL bTransparent); + void WMFRecord_SetBkMode(sal_Bool bTransparent); void WMFRecord_SetStretchBltMode(); void WMFRecord_SetPixel(const Point & rPoint, const Color & rColor); void WMFRecord_SetROP2(RasterOp eROP); - void WMFRecord_SetTextAlign(FontAlign eFontAlign, UINT32 eHorTextAlign); + void WMFRecord_SetTextAlign(FontAlign eFontAlign, sal_uInt32 eHorTextAlign); void WMFRecord_SetTextColor(const Color & rColor); void WMFRecord_SetWindowExt(const Size & rSize); void WMFRecord_SetWindowOrg(const Point & rPoint); @@ -195,8 +195,8 @@ private: void WMFRecord_EndOfFile(); void WMFRecord_IntersectClipRect( const Rectangle& rRect); - USHORT AllocHandle(); - void FreeHandle(USHORT nObjectHandle); + sal_uInt16 AllocHandle(); + void FreeHandle(sal_uInt16 nObjectHandle); void CreateSelectDeletePen( const Color& rColor, const LineInfo& rLineInfo ); void CreateSelectDeleteFont(const Font & rFont); void CreateSelectDeleteBrush(const Color& rColor); @@ -207,7 +207,7 @@ private: void HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon); void WriteRecords(const GDIMetaFile & rMTF); - void WriteHeader(const GDIMetaFile & rMTF, BOOL bPlaceable); + void WriteHeader(const GDIMetaFile & rMTF, sal_Bool bPlaceable); void UpdateHeader(); void WriteEmbeddedEMF( const GDIMetaFile& rMTF ); @@ -217,13 +217,13 @@ private: sal_uInt32 nRecCounts, sal_uInt16 nCheckSum ); - USHORT CalcSaveTargetMapMode(MapMode& rMapMode, const Size& rPrefSize); + sal_uInt16 CalcSaveTargetMapMode(MapMode& rMapMode, const Size& rPrefSize); public: WMFWriter() {} - BOOL WriteWMF(const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pFilterConfigItem, BOOL bPlaceable=TRUE); + sal_Bool WriteWMF(const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pFilterConfigItem, sal_Bool bPlaceable=sal_True); }; #endif diff --git a/vcl/inc/vcl/graph.hxx b/vcl/inc/vcl/graph.hxx index 43703baf642d..31c7b20b9c77 100644 --- a/vcl/inc/vcl/graph.hxx +++ b/vcl/inc/vcl/graph.hxx @@ -123,6 +123,7 @@ public: sal_Bool IsTransparent() const; sal_Bool IsAlpha() const; sal_Bool IsAnimated() const; + sal_Bool IsEPS() const; sal_Bool IsRenderGraphic() const; sal_Bool HasRenderGraphic() const; diff --git a/vcl/inc/vcl/impgraph.hxx b/vcl/inc/vcl/impgraph.hxx index 93336e273fcc..e136fcc06ade 100644 --- a/vcl/inc/vcl/impgraph.hxx +++ b/vcl/inc/vcl/impgraph.hxx @@ -100,6 +100,7 @@ private: sal_Bool ImplIsTransparent() const; sal_Bool ImplIsAlpha() const; sal_Bool ImplIsAnimated() const; + sal_Bool ImplIsEPS() const; sal_Bool ImplIsRenderGraphic() const; sal_Bool ImplHasRenderGraphic() const; diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 7c6d34ea2531..1e99c5c3c04f 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -2906,7 +2906,7 @@ SvStream& operator>>( SvStream& rIStm, GDIMetaFile& rGDIMetaFile ) ( META_RENDERGRAPHIC_ACTION == pAction->GetType() ) && ( ++nAction < nCount ) && !rIStm.IsEof() ) { - UINT16 nFollowingType; + sal_uInt16 nFollowingType; // dummy read of the next following META_BMPEXSCALE_ACTION // RenderGraphic replacement action (KA 01/2011) diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index bd5bed8deb0f..99f82c5d092b 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -427,21 +427,21 @@ sal_Bool Graphic::IsAnimated() const // ------------------------------------------------------------------------ -BOOL Graphic::IsEPS() const +sal_Bool Graphic::IsEPS() const { return mpImpGraphic->ImplIsEPS(); } // ------------------------------------------------------------------------ -BOOL Graphic::IsRenderGraphic() const +sal_Bool Graphic::IsRenderGraphic() const { return mpImpGraphic->ImplIsRenderGraphic(); } // ------------------------------------------------------------------------ -BOOL Graphic::HasRenderGraphic() const +sal_Bool Graphic::HasRenderGraphic() const { return mpImpGraphic->ImplHasRenderGraphic(); } diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index ddb3f42dd039..b4af43cf3556 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -480,7 +480,7 @@ sal_Bool ImpGraphic::ImplIsAnimated() const // ------------------------------------------------------------------------ -BOOL ImpGraphic::ImplIsEPS() const +sal_Bool ImpGraphic::ImplIsEPS() const { return( ( meType == GRAPHIC_GDIMETAFILE ) && ( maMetaFile.GetActionCount() > 0 ) && @@ -489,7 +489,7 @@ BOOL ImpGraphic::ImplIsEPS() const // ------------------------------------------------------------------------ -BOOL ImpGraphic::ImplIsRenderGraphic() const +sal_Bool ImpGraphic::ImplIsRenderGraphic() const { return( ( GRAPHIC_GDIMETAFILE == meType ) && ( 1 == maMetaFile.GetActionCount() ) && @@ -498,9 +498,9 @@ BOOL ImpGraphic::ImplIsRenderGraphic() const // ------------------------------------------------------------------------ -BOOL ImpGraphic::ImplHasRenderGraphic() const +sal_Bool ImpGraphic::ImplHasRenderGraphic() const { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( GRAPHIC_GDIMETAFILE == meType ) { @@ -510,7 +510,7 @@ BOOL ImpGraphic::ImplHasRenderGraphic() const { if( META_RENDERGRAPHIC_ACTION == pAct->GetType() ) { - bRet = TRUE; + bRet = sal_True; } } -- cgit v1.2.3 From cdc86add193ea8670cae19910df816528a1d7ccc Mon Sep 17 00:00:00 2001 From: ka Date: Fri, 18 Feb 2011 05:20:51 +0100 Subject: ka102: type changes nneded for DEV300_m100 --- filter/source/graphicfilter/eos2met/eos2met.cxx | 2 +- filter/source/svg/svgwriter.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx index b647a78f1ffa..7c42aea31518 100644 --- a/filter/source/graphicfilter/eos2met/eos2met.cxx +++ b/filter/source/graphicfilter/eos2met/eos2met.cxx @@ -208,7 +208,7 @@ private: void METSetAndPushLineInfo( const LineInfo& rLineInfo ); void METPopLineInfo( const LineInfo& rLineInfo ); - void METBitBlt(Point aPt, Size aSize, const Bitmap & rBitmap); + void METBitBlt(Point aPt, Size aSize, const Size& rSizePixel); void METBeginArea(sal_Bool bBoundaryLine); void METEndArea(); void METBeginPath(sal_uInt32 nPathId); diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index c8bbe39a2234..9e6ac04188e6 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -806,7 +806,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, aTransform += ')'; mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrTransform, aTransform ); - apTransform.reset( new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ) ); + apTransform.reset( new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, sal_True, sal_True ) ); } if( nLen > 1 ) -- cgit v1.2.3 From df07cfece9bf1392500eba71ee45d116fe91142a Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Sun, 20 Feb 2011 21:02:38 +0100 Subject: dba34d: reverted the previous change. Lib vbaevents is already included in registration when ENABLE_VBA is set, which simply is not the case any more in Oracle-provided builds, since m100. --- postprocess/packcomponents/makefile.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk index 5cd14eb4bfa3..9fbfc70e11a2 100644 --- a/postprocess/packcomponents/makefile.mk +++ b/postprocess/packcomponents/makefile.mk @@ -171,7 +171,6 @@ my_components = \ utl \ uui \ vbaobj \ - vbaevents \ vcl \ vclcanvas \ wpft \ -- cgit v1.2.3 From 1ee91da9264726ad2391052726e7f56f5be39714 Mon Sep 17 00:00:00 2001 From: ka Date: Mon, 21 Feb 2011 02:57:37 +0100 Subject: ka102: #i116970# Write extents of exported SVG / syntax --- scp2/source/ooo/file_ooo.scp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp index 0edada0e426c..a03af848d8aa 100644 --- a/scp2/source/ooo/file_ooo.scp +++ b/scp2/source/ooo/file_ooo.scp @@ -2119,14 +2119,14 @@ End // End // #endif -// #if defined WNT || defined MACOSX -// File gid_File_Lib_Librsvg -// Dir = gid_Dir_Program; -// ARCHIVE_TXT_FILE_BODY; -// #if defined WNT -// Name = "librsvg_w32.zip"; -// #else -// Name = "librsvg_mac.zip"; -// #endif -// End -// #endif +#if defined WNT || defined MACOSX +File gid_File_Lib_Librsvg + Dir = gid_Dir_Program; + ARCHIVE_TXT_FILE_BODY; +#if defined WNT + Name = "librsvg_w32.zip"; +#else + Name = "librsvg_mac.zip"; +#endif +End +#endif -- cgit v1.2.3 From 7f561541162c7f32f4ededb1a7eb9f88b029c610 Mon Sep 17 00:00:00 2001 From: ka Date: Mon, 21 Feb 2011 02:57:37 +0100 Subject: ka102: #i116970# Write extents of exported SVG / syntax --- svtools/source/filter/FilterConfigItem.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svtools/source/filter/FilterConfigItem.cxx b/svtools/source/filter/FilterConfigItem.cxx index 312f62af9d84..1e836cde8785 100644 --- a/svtools/source/filter/FilterConfigItem.cxx +++ b/svtools/source/filter/FilterConfigItem.cxx @@ -428,7 +428,7 @@ void FilterConfigItem::WriteBool( const OUString& rKey, sal_Bool bNewValue ) Any aAny; if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) { - sal_Bool bOldValue; + sal_Bool bOldValue = bNewValue; if ( aAny >>= bOldValue ) { if ( bOldValue != bNewValue ) @@ -462,7 +462,7 @@ void FilterConfigItem::WriteInt32( const OUString& rKey, sal_Int32 nNewValue ) if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) { - sal_Int32 nOldValue; + sal_Int32 nOldValue = nNewValue; if ( aAny >>= nOldValue ) { if ( nOldValue != nNewValue ) -- cgit v1.2.3 From a2e849cee31cdde05df87bb33ccd98ea668fd11f Mon Sep 17 00:00:00 2001 From: ka Date: Mon, 21 Feb 2011 02:57:37 +0100 Subject: ka102: #i116970# Write extents of exported SVG / syntax --- filter/source/svg/svgexport.cxx | 10 +++++----- filter/source/svg/svgfilter.cxx | 2 +- filter/source/svg/svgwriter.hxx | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index c1c19f79e3fd..1d8c437b2e25 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -466,6 +466,11 @@ sal_Bool SVGFilter::implExportDocument( const Reference< XDrawPages >& rxMasterP xExtDocHandler->unknown( SVG_DTD_STRING ); } + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "version", B2UCONST( "1.2" ) ); + + if( mpSVGExport->IsUseTinyProfile() ) + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "baseProfile", B2UCONST( "tiny" ) ); + #ifdef _SVG_WRITE_EXTENTS aAttr = OUString::valueOf( nDocWidth * 0.01 ); aAttr += B2UCONST( "mm" ); @@ -481,11 +486,6 @@ sal_Bool SVGFilter::implExportDocument( const Reference< XDrawPages >& rxMasterP aAttr += B2UCONST( " " ); aAttr += OUString::valueOf( nDocHeight ); - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "version", B2UCONST( "1.2" ) ); - - if( mpSVGExport->IsUseTinyProfile() ) - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "baseProfile", B2UCONST( "tiny" ) ); - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "viewBox", aAttr ); mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "preserveAspectRatio", B2UCONST( "xMidYMid" ) ); mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "fill-rule", B2UCONST( "evenodd" ) ); diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx index f2be5febdc84..3888a4c4b473 100644 --- a/filter/source/svg/svgfilter.cxx +++ b/filter/source/svg/svgfilter.cxx @@ -85,7 +85,7 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescripto #ifdef SOLAR_JAVA if( mxDstDoc.is() ) - sal_Bool bRet = sal_False;//implImport( rDescriptor ); + bRet = sal_False;//implImport( rDescriptor ); else #endif if( mxSrcDoc.is() ) diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx index f654a35b1d71..58ee67538171 100644 --- a/filter/source/svg/svgwriter.hxx +++ b/filter/source/svg/svgwriter.hxx @@ -76,7 +76,7 @@ // ----------------------------------------------------------------------------- -#undef _SVG_WRITE_EXTENTS +#define _SVG_WRITE_EXTENTS 1 #undef _SVG_WRITE_TEXT_DESC #undef _SVG_USE_CONFIG -- cgit v1.2.3 From 399226920e4eb87cf6480a2b2404e4ae08de2e88 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 21 Feb 2011 09:23:19 +0100 Subject: dba34d: #i116995# re-enabled vbaevents lib --- postprocess/packcomponents/makefile.mk | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk index 9fbfc70e11a2..a156ddb7327e 100644 --- a/postprocess/packcomponents/makefile.mk +++ b/postprocess/packcomponents/makefile.mk @@ -170,6 +170,7 @@ my_components = \ updchk.uno \ utl \ uui \ + vbaevents \ vbaobj \ vcl \ vclcanvas \ @@ -231,10 +232,6 @@ my_components += ogltrans my_components += productregistration.jar .END -.IF "$(ENABLE_VBA)" == "YES" -my_components += vbaevents -.END - .IF "$(SOLAR_JAVA)" == "TRUE" my_components += \ LuceneHelpWrapper \ -- cgit v1.2.3 From fcff7c2c402a1cff0f5ed6f90d906a27b9357003 Mon Sep 17 00:00:00 2001 From: "Wolfram Garten [wg]" Date: Mon, 21 Feb 2011 11:15:57 +0100 Subject: i117035: [Automation] adapt automated testscripts to new export format svg --- testautomation/graphics/optional/d_export_graphic_a.bas | 1 + 1 file changed, 1 insertion(+) diff --git a/testautomation/graphics/optional/d_export_graphic_a.bas b/testautomation/graphics/optional/d_export_graphic_a.bas index 45b5ef107409..ebe35387d000 100755 --- a/testautomation/graphics/optional/d_export_graphic_a.bas +++ b/testautomation/graphics/optional/d_export_graphic_a.bas @@ -61,6 +61,7 @@ sub main Call tXPM 'X PixMap Call tGIF 'Graphics Interchange Format Call tJPEG 'Joint Photographic Experts Group + Call tSVG 'Scalable Vector Graphics Call hStatusOut end sub -- cgit v1.2.3 From c2233174f8b55165d104b92510cff1901d56d947 Mon Sep 17 00:00:00 2001 From: "Wolfram Garten [wg]" Date: Mon, 21 Feb 2011 11:16:53 +0100 Subject: i117035: [Automation] adapt automated testscripts to new export format svg --- testautomation/graphics/optional/export_graphic_a.bas | 1 + 1 file changed, 1 insertion(+) diff --git a/testautomation/graphics/optional/export_graphic_a.bas b/testautomation/graphics/optional/export_graphic_a.bas index 1bd3149cf650..b7bb9ad8819c 100755 --- a/testautomation/graphics/optional/export_graphic_a.bas +++ b/testautomation/graphics/optional/export_graphic_a.bas @@ -60,6 +60,7 @@ sub main Call tXPM 'X PixMap Call tGIF 'Graphics Interchange Format Call tJPEG 'Joint Photographic Experts Group + Call tSVG 'Scalable Vector Graphics Call hStatusOut end sub -- cgit v1.2.3 From 7a3b1bdaff2870004c30a5645b54c6559f4fbaea Mon Sep 17 00:00:00 2001 From: "Wolfram Garten [wg]" Date: Mon, 21 Feb 2011 11:17:34 +0100 Subject: i117035: [Automation] adapt automated testscripts to new export format svg --- .../optional/includes/global/g_savepictureas.inc | 166 +++++++++++---------- 1 file changed, 88 insertions(+), 78 deletions(-) diff --git a/testautomation/graphics/optional/includes/global/g_savepictureas.inc b/testautomation/graphics/optional/includes/global/g_savepictureas.inc index bbf9776b7ece..e340308dce0a 100644 --- a/testautomation/graphics/optional/includes/global/g_savepictureas.inc +++ b/testautomation/graphics/optional/includes/global/g_savepictureas.inc @@ -173,88 +173,88 @@ testcase tContextSaveAsPicture Testsize = false SavedOrgPosition = Dateityp.GetSelIndex select case left(lcase(Dateityp.GetSelText),3) 'Filetype - case "png" : if (Filetype = "png") OR (Filetype = "psd") OR (Filetype = "pcx") OR (Filetype = "xbm") OR (Filetype = "ras") OR (Filetype = "pbm") OR (Filetype = "pcd") OR (Filetype = "pgm") OR (Filetype = "bmp") OR (Filetype = "ppm") OR (Filetype = "sgf") OR (Filetype = "xpm") OR (Filetype = "tga") then - printlog " " + Filetype + " will be saved as png, correct." - CounterShouldBe = 17 - else - warnlog "Png should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "svm" : if (Filetype = "svm") OR (Filetype = "dxf") OR (Filetype = "eps") OR (Filetype = "sgv") then - printlog " " + Filetype + " will be saved as Svm, correct." - CounterShouldBe = 17 - else - warnlog "Svm should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "wmf" : if (Filetype = "wmf") OR (Filetype = "emf") then - printlog " " + Filetype + " will be saved as Wmf, correct." - CounterShouldBe = 17 - if Filetype = "wmf" then Testsize = true - else - warnlog "Wmf should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "jpe" : if (Filetype = "jpg") OR Filetype = "jif" OR Filetype = "peg" then - printlog " " + Filetype + " will be saved as Jpg, correct." - CounterShouldBe = 17 - if Filetype = "jpg" then Testsize = true - else - warnlog "Jpg should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "tif" : if Filetype = "tif" OR Filetype = "iff" then - printlog " " + Filetype + " will be saved as Tiff, correct." - CounterShouldBe = 17 - if Filetype = "tif" then Testsize = true - else - warnlog "Tif should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "sgf" : if (Filetype = "sgv") OR (Filetype = "sgf") then - printlog " " + Filetype + " will be saved as Sgf, correct." - CounterShouldBe = 17 - if Filetype = "sgf" then Testsize = true - else - warnlog "Sgf should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "gif" : if (Filetype = "gif") then - printlog " " + Filetype + " will be saved as Gif, correct." - CounterShouldBe = 17 - if Filetype = "gif" then Testsize = true - else - warnlog "Gif should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "met" : if (Filetype = "met") then - printlog " " + Filetype + " will be saved as Met, correct." - CounterShouldBe = 17 - if Filetype = "met" then Testsize = true - else - warnlog "Met should not have been selected when we opened a '" + Filetype + "'-file." - endif - case "pct" : if (Filetype = "pct") OR (Filetype = "ict") then - printlog " " + Filetype + " will be saved as Pct, correct." - CounterShouldBe = 17 - if Filetype = "pct" then Testsize = true - else - warnlog "Pct should not have been selected when we opened a '" + Filetype + "'-file." - endif - case else : qaerrorlog " The test has not yet been fitted for this format ( " + Filetype + "). Contact FHA." - printlog " But will be saved as: " + left(lcase(Dateityp.GetSelText),3) - CounterShouldBe = 18 - Testsize = true - end select + case "png" : if (Filetype = "png") OR (Filetype = "psd") OR (Filetype = "pcx") OR (Filetype = "xbm") OR (Filetype = "ras") OR (Filetype = "pbm") OR (Filetype = "pcd") OR (Filetype = "pgm") OR (Filetype = "bmp") OR (Filetype = "ppm") OR (Filetype = "sgf") OR (Filetype = "xpm") OR (Filetype = "tga") then + printlog " " + Filetype + " will be saved as png, correct." + CounterShouldBe = 17 + else + warnlog "Png should not have been selected when we opened a '" + Filetype + "'-file." + endif + case "svm" : if (Filetype = "svm") OR (Filetype = "svg") OR (Filetype = "dxf") OR (Filetype = "eps") OR (Filetype = "sgv") then + printlog " " + Filetype + " will be saved as Svm, correct." + CounterShouldBe = 17 + else + warnlog "Svm should not have been selected when we opened a '" + Filetype + "'-file." + endif + case "wmf" : if (Filetype = "wmf") OR (Filetype = "emf") then + printlog " " + Filetype + " will be saved as Wmf, correct." + CounterShouldBe = 17 + if Filetype = "wmf" then Testsize = true + else + warnlog "Wmf should not have been selected when we opened a '" + Filetype + "'-file." + endif + case "jpe" : if (Filetype = "jpg") OR Filetype = "jif" OR Filetype = "peg" then + printlog " " + Filetype + " will be saved as Jpg, correct." + CounterShouldBe = 17 + if Filetype = "jpg" then Testsize = true + else + warnlog "Jpg should not have been selected when we opened a '" + Filetype + "'-file." + endif + case "tif" : if Filetype = "tif" OR Filetype = "iff" then + printlog " " + Filetype + " will be saved as Tiff, correct." + CounterShouldBe = 17 + if Filetype = "tif" then Testsize = true + else + warnlog "Tif should not have been selected when we opened a '" + Filetype + "'-file." + endif + case "sgf" : if (Filetype = "sgv") OR (Filetype = "sgf") then + printlog " " + Filetype + " will be saved as Sgf, correct." + CounterShouldBe = 17 + if Filetype = "sgf" then Testsize = true + else + warnlog "Sgf should not have been selected when we opened a '" + Filetype + "'-file." + endif + case "gif" : if (Filetype = "gif") then + printlog " " + Filetype + " will be saved as Gif, correct." + CounterShouldBe = 17 + if Filetype = "gif" then Testsize = true + else + warnlog "Gif should not have been selected when we opened a '" + Filetype + "'-file." + endif + case "met" : if (Filetype = "met") then + printlog " " + Filetype + " will be saved as Met, correct." + CounterShouldBe = 17 + if Filetype = "met" then Testsize = true + else + warnlog "Met should not have been selected when we opened a '" + Filetype + "'-file." + endif + case "pct" : if (Filetype = "pct") OR (Filetype = "ict") then + printlog " " + Filetype + " will be saved as Pct, correct." + CounterShouldBe = 17 + if Filetype = "pct" then Testsize = true + else + warnlog "Pct should not have been selected when we opened a '" + Filetype + "'-file." + endif + case else : qaerrorlog " The test has not yet been fitted for this format ( " + Filetype + "). Contact FHA." + printlog " But will be saved as: " + left(lcase(Dateityp.GetSelText),3) + CounterShouldBe = 18 + Testsize = true + end select '..........................................................................................................................' - Dateityp.TypeKeys "" - if (Dateityp.GetItemCount) = CounterShouldBe then 'Counter - 10 - for q = 1 to CounterShouldBe - 1 - LastFilterName = Dateityp.GetSelIndex - Dateityp.TypeKeys "" - if Dateityp.GetSelIndex = LastFilterName then - warnlog " Check the export-filters when trying to save a " + Filename + "-file. Exiting test." - goto endsub + Dateityp.TypeKeys "" + if (Dateityp.GetItemCount) = CounterShouldBe then 'Counter - 10 + for q = 1 to CounterShouldBe - 1 + LastFilterName = Dateityp.GetSelIndex + Dateityp.TypeKeys "" + if Dateityp.GetSelIndex = LastFilterName then + warnlog " Check the export-filters when trying to save a " + Filename + "-file. Exiting test." + goto endsub + endif + next q + else + warnlog "Dateityp.GetItemCount = " + (Dateityp.GetItemCount) + " CounterShouldBe = " + CounterShouldBe endif - next q - else - warnlog "Dateityp.GetItemCount = " + (Dateityp.GetItemCount) + " CounterShouldBe = " + CounterShouldBe - endif Dateityp.Select SavedOrgPosition @@ -472,6 +472,16 @@ testcase tContextSavePictureLinkAsPicture Found = true SavedOrgPosition = Dateityp.GetSelIndex select case left(lcase(Dateityp.GetSelText),3) 'Filetype + + case "svg" : if (filetype = "svg") then + printlog " " + Filetype + " will be saved as svg, correct." + SavedFileType = "svg" + Testsize = true + CounterShouldBe = 17 + else + warnlog "svg should not have been selected when we opened a '" + Filetype + "'-file." + endif + case "png" : if (Filetype = "png") then printlog " " + Filetype + " will be saved as png, correct." SavedFileType = "png" -- cgit v1.2.3 From 09b77dedb5b2f0aae3bb5646b93e6f234c46f2ac Mon Sep 17 00:00:00 2001 From: "Wolfram Garten [wg]" Date: Mon, 21 Feb 2011 11:17:59 +0100 Subject: i117035: [Automation] adapt automated testscripts to new export format svg --- testautomation/graphics/optional/includes/global/g_load_save.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testautomation/graphics/optional/includes/global/g_load_save.inc b/testautomation/graphics/optional/includes/global/g_load_save.inc index d0d51e8337c7..7e9f9e8320fc 100644 --- a/testautomation/graphics/optional/includes/global/g_load_save.inc +++ b/testautomation/graphics/optional/includes/global/g_load_save.inc @@ -488,6 +488,8 @@ endcase 'tDeletedTemplate '------------------------------------------------------------------------------- testcase tSaveLoadLayoutEmpty +warnlog "#i110054# Empty OOo saved as UOF file comes up read only" +goto endsub Dim NewFileDir as String NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\") -- cgit v1.2.3 From 93a33cf33176b00757991c8b29c955f18b9d1e9e Mon Sep 17 00:00:00 2001 From: "Wolfram Garten [wg]" Date: Mon, 21 Feb 2011 11:18:25 +0100 Subject: i117035: [Automation] adapt automated testscripts to new export format svg --- .../optional/includes/global/export_graphic.inc | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/testautomation/graphics/optional/includes/global/export_graphic.inc b/testautomation/graphics/optional/includes/global/export_graphic.inc index a5ab31c82cdc..ce25c3925bd7 100644 --- a/testautomation/graphics/optional/includes/global/export_graphic.inc +++ b/testautomation/graphics/optional/includes/global/export_graphic.inc @@ -330,6 +330,31 @@ testcase tTIFF endcase 'tTIFF '------------------------------------------------------------------------------ +testcase tSVG + 'warnlog( "#i115138# - Test document freezes draw" ) + 'goto endsub + + dim x as integer + dim i as integer + + const sFilter = "SVG - Scalable Vector Graphics (.svg)" + const sExt = ".svg" + + printlog "Open the document" + hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString )) + + printlog "Save it" + if ( hCallExport (OutputGrafikTBO , sFilter ) ) then + printlog( "Close file and re-insert graphics into new document" ) + hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file + else + warnlog( "No export options dialog was displayed" ) + endif + + call hCloseDocument + +endcase 'tSVG +'------------------------------------------------------------------------------ testcase tXPM warnlog( "#i115138# - Test document freezes draw" ) goto endsub -- cgit v1.2.3 From 93cf848d9f8c79981db263d2aae78ea3939dc764 Mon Sep 17 00:00:00 2001 From: "Wolfram Garten [wg]" Date: Mon, 21 Feb 2011 11:19:16 +0100 Subject: i117035: [Automation] adapt automated testscripts to new export format svg --- .../required/input/SaveAsPicture/SaveAsPicture.svg | 730 +++++++++++++++++++++ 1 file changed, 730 insertions(+) create mode 100644 testautomation/graphics/required/input/SaveAsPicture/SaveAsPicture.svg diff --git a/testautomation/graphics/required/input/SaveAsPicture/SaveAsPicture.svg b/testautomation/graphics/required/input/SaveAsPicture/SaveAsPicture.svg new file mode 100644 index 000000000000..983e57026e4a --- /dev/null +++ b/testautomation/graphics/required/input/SaveAsPicture/SaveAsPicture.svg @@ -0,0 +1,730 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From 32b220f4aa1f44ee1245a52c131f046cadf931ba Mon Sep 17 00:00:00 2001 From: "Wolfram Garten [wg]" Date: Mon, 21 Feb 2011 11:20:04 +0100 Subject: i117035: [Automation] adapt automated testscripts to new export format svg --- testautomation/global/input/filters/graphic_filters.txt | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 testautomation/global/input/filters/graphic_filters.txt diff --git a/testautomation/global/input/filters/graphic_filters.txt b/testautomation/global/input/filters/graphic_filters.txt old mode 100644 new mode 100755 index 9b63e265bec5..e86e1bdea0f2 --- a/testautomation/global/input/filters/graphic_filters.txt +++ b/testautomation/global/input/filters/graphic_filters.txt @@ -18,6 +18,7 @@ PSD - Adobe Photoshop (*.psd) RAS - Sun Raster Image (*.ras) SGF - StarWriter Graphics Format (*.sgf) SGV - StarDraw 2.0 (*.sgv) +SVG - Scalable Vector Graphics (*.svg) SVM - StarView Metafile (*.svm) TGA - Truevision Targa (*.tga) TIFF - Tagged Image File Format (*.tif;*.tiff) -- cgit v1.2.3 From 10bbab7568053dfe357bca6ee01450d03051cfff Mon Sep 17 00:00:00 2001 From: "Wolfram Garten [wg]" Date: Mon, 21 Feb 2011 11:20:31 +0100 Subject: i117035: [Automation] adapt automated testscripts to new export format svg --- testautomation/framework/required/includes/first.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/testautomation/framework/required/includes/first.inc b/testautomation/framework/required/includes/first.inc index 35905c20c39c..4ab2352d07cc 100644 --- a/testautomation/framework/required/includes/first.inc +++ b/testautomation/framework/required/includes/first.inc @@ -304,11 +304,11 @@ testcase tInFilterCountCompare() printlog( "Check filterlist (filterstring) for graphics files" ) const FILE_NAME = "graphic_filters.txt" - const SUFFIX_STRING_LENGTH = 178 + const SUFFIX_STRING_LENGTH = 184 ' List of filter suffixes for verification in case of error ' *.bmp;*.dxf;*.emf;*.eps;*.gif;*.jpg;*.jpeg;*.jfif;*.jif;*.met;*.pbm;*.pcd; -' *.pct;*.pcx;*.pgm;*.png;*.ppm;*.psd;*.ras;*.sgf;*.sgv;*.svm;*.tga;*.tif; +' *.pct;*.pcx;*.pgm;*.png;*.ppm;*.psd;*.ras;*.sgf;*.sgv;*.svg;*.svm;*.tga;*.tif; ' *.tiff;*.wmf;*.xbm;*.xpm;*.pict dim caUIFilters( 30 ) as string @@ -383,6 +383,8 @@ testcase tInFilterCountCompare() endif irc = iEnd - iBegin + printlog irc + printlog SUFFIX_STRING_LENGTH if ( irc <> SUFFIX_STRING_LENGTH ) then warnlog( "The list of file suffixes has changed, please verify" ) printlog( "Found: " & irc & " chars, expected " & SUFFIX_STRING_LENGTH ) -- cgit v1.2.3 From f703b762c8c3f4d2d306e7b393cd4a9fa47d1a79 Mon Sep 17 00:00:00 2001 From: ka Date: Mon, 21 Feb 2011 14:39:40 +0100 Subject: ka102: syntax --- sw/source/ui/shells/grfsh.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx index 77af849e9614..ba6704981b70 100644 --- a/sw/source/ui/shells/grfsh.cxx +++ b/sw/source/ui/shells/grfsh.cxx @@ -519,8 +519,9 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) rSh.GetCurAttr( aCoreSet ); sal_Bool bParentCntProt = 0 != rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ); sal_Bool bIsGrfCntnt = CNT_GRF == GetShell().GetCntType(); - const GraphicObject* pGrfObj = ( bIsGrfCntnt ? rSh.GetGraphicObj() : NULL ); - sal_Bool bIsRenderGraphicGrfCntnt = ( pGrfObj && pGrfObj->IsRenderGraphic() ); +// const GraphicObject* pGrfObj = ( bIsGrfCntnt ? rSh.GetGraphicObj() : NULL ); +// sal_Bool bIsRenderGraphicGrfCntnt = ( pGrfObj && pGrfObj->IsRenderGraphic() ); + // --> OD 2006-11-03 #i59688# // sal_Bool bSwappedOut = rSh.IsGrfSwapOut( sal_True ); // sal_Bool bBitmapType = !bSwappedOut && GRAPHIC_BITMAP == rSh.GetGraphicType(); @@ -615,11 +616,11 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) if( !bParentCntProt ) { // --> OD 2005-02-09 #119353# - robust - const GraphicObject* pGrfObj = rSh.GetGraphicObj(); - if ( pGrfObj ) + const GraphicObject* pGrafObj = rSh.GetGraphicObj(); + if ( pGrafObj ) { - if( pGrfObj->IsAnimated() || - GRAPHIC_GDIMETAFILE == pGrfObj->GetType() ) + if( pGrafObj->IsAnimated() || + GRAPHIC_GDIMETAFILE == pGrafObj->GetType() ) bDisable = sal_True; else rSet.Put( SfxUInt16Item( nWhich, ((SwTransparencyGrf&) -- cgit v1.2.3 From 779936a63a47264312a1703ee6a30dc462702c28 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Mon, 21 Feb 2011 16:27:34 +0100 Subject: calc66: #i116940# update link URLs after CompileXML, count only allocated sheet caches in link API --- sc/inc/externalrefmgr.hxx | 9 ++++--- sc/source/filter/xml/xmlimprt.cxx | 9 +++++++ sc/source/ui/docshell/externalrefmgr.cxx | 46 +++++++++++--------------------- sc/source/ui/unoobj/linkuno.cxx | 37 ++++++++++++++++++------- 4 files changed, 58 insertions(+), 43 deletions(-) diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index 818920885493..3e78232db55a 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -257,8 +257,6 @@ public: void getAllTableNames(sal_uInt16 nFileId, ::std::vector& rTabNames) const; SCsTAB getTabSpan( sal_uInt16 nFileId, const String& rStartTabName, const String& rEndTabName ) const; void getAllNumberFormats(::std::vector& rNumFmts) const; - bool hasCacheTable(sal_uInt16 nFileId, const String& rTabName) const; - size_t getCacheTableCount(sal_uInt16 nFileId) const; /** * Set all tables of a document as referenced, used only during @@ -508,8 +506,6 @@ public: */ void getAllCachedNumberFormats(::std::vector& rNumFmts) const; - bool hasCacheTable(sal_uInt16 nFileId, const String& rTabName) const; - size_t getCacheTableCount(sal_uInt16 nFileId) const; sal_uInt16 getExternalFileCount() const; /** @@ -645,6 +641,11 @@ public: */ void resetSrcFileData(const String& rBaseFileUrl); + /** + * Replace the original URL wirh the real URL that was generated from the relative URL. + */ + void updateAbsAfterLoad(); + /** * Stop tracking a specific formula cell. * diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index d840c39f5939..4721b34cab2d 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -73,6 +73,7 @@ #include "rangeutl.hxx" #include "postit.hxx" #include "formulaparserpool.hxx" +#include "externalrefmgr.hxx" #include #include @@ -2837,8 +2838,16 @@ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeE } GetProgressBarHelper()->End(); // make room for subsequent SfxProgressBars if (pDoc) + { pDoc->CompileXML(); + // After CompileXML, links must be completely changed to the new URLs. + // Otherwise, hasExternalFile for API wouldn't work (#i116940#), + // and typing a new formula would create a second link with the same "real" file name. + if (pDoc->HasExternalRefManager()) + pDoc->GetExternalRefManager()->updateAbsAfterLoad(); + } + if (pDoc && GetModel().is()) { // set "valid stream" flags after loading (before UpdateRowHeights, so changed formula results diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 3ad8c551a7af..a0581ec0d1c3 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -935,26 +935,6 @@ void ScExternalRefCache::getAllNumberFormats(vector& rNumFmts) const rNumFmts.swap(aNumFmts); } -bool ScExternalRefCache::hasCacheTable(sal_uInt16 nFileId, const String& rTabName) const -{ - DocItem* pDoc = getDocItem(nFileId); - if (!pDoc) - return false; - - String aUpperName = ScGlobal::pCharClass->upper(rTabName); - vector::const_iterator itrBeg = pDoc->maTableNames.begin(), itrEnd = pDoc->maTableNames.end(); - vector::const_iterator itr = ::std::find_if( - itrBeg, itrEnd, TabNameSearchPredicate(aUpperName)); - - return itr != itrEnd; -} - -size_t ScExternalRefCache::getCacheTableCount(sal_uInt16 nFileId) const -{ - DocItem* pDoc = getDocItem(nFileId); - return pDoc ? pDoc->maTables.size() : 0; -} - bool ScExternalRefCache::setCacheDocReferenced( sal_uInt16 nFileId ) { DocItem* pDocItem = getDocItem(nFileId); @@ -1577,16 +1557,6 @@ void ScExternalRefManager::getAllCachedNumberFormats(vector& rNumFmt maRefCache.getAllNumberFormats(rNumFmts); } -bool ScExternalRefManager::hasCacheTable(sal_uInt16 nFileId, const String& rTabName) const -{ - return maRefCache.hasCacheTable(nFileId, rTabName); -} - -size_t ScExternalRefManager::getCacheTableCount(sal_uInt16 nFileId) const -{ - return maRefCache.getCacheTableCount(nFileId); -} - sal_uInt16 ScExternalRefManager::getExternalFileCount() const { return static_cast< sal_uInt16 >( maSrcFiles.size() ); @@ -2365,6 +2335,22 @@ void ScExternalRefManager::resetSrcFileData(const String& rBaseFileUrl) } } +void ScExternalRefManager::updateAbsAfterLoad() +{ + String aOwn( getOwnDocumentName() ); + for (vector::iterator itr = maSrcFiles.begin(), itrEnd = maSrcFiles.end(); + itr != itrEnd; ++itr) + { + // update maFileName to the real file name, + // to be called when the original name is no longer needed (after CompileXML) + + itr->maybeCreateRealFileName( aOwn ); + String aReal = itr->maRealFileName; + if (aReal.Len()) + itr->maFileName = aReal; + } +} + void ScExternalRefManager::removeRefCell(ScFormulaCell* pCell) { for_each(maRefCells.begin(), maRefCells.end(), RemoveFormulaCell(pCell)); diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx index ee6c3ff1988a..8b9e1039f085 100644 --- a/sc/source/ui/unoobj/linkuno.cxx +++ b/sc/source/ui/unoobj/linkuno.cxx @@ -1641,10 +1641,17 @@ Sequence< OUString > SAL_CALL ScExternalDocLinkObj::getElementNames() ScUnoGuard aGuard; vector aTabNames; mpRefMgr->getAllCachedTableNames(mnFileId, aTabNames); - size_t n = aTabNames.size(); + + // #i116940# be consistent with getByName: include only table names which have a cache already + vector aValidNames; + for (vector::const_iterator aIter = aTabNames.begin(); aIter != aTabNames.end(); ++aIter) + if (mpRefMgr->getCacheTable(mnFileId, *aIter, false)) + aValidNames.push_back(*aIter); + + size_t n = aValidNames.size(); Sequence aSeq(n); for (size_t i = 0; i < n; ++i) - aSeq[i] = aTabNames[i]; + aSeq[i] = aValidNames[i]; return aSeq; } @@ -1652,25 +1659,35 @@ sal_Bool SAL_CALL ScExternalDocLinkObj::hasByName(const OUString &aName) throw (RuntimeException) { ScUnoGuard aGuard; - return static_cast(mpRefMgr->hasCacheTable(mnFileId, aName)); + + // #i116940# be consistent with getByName: allow only table names which have a cache already + ScExternalRefCache::TableTypeRef pTable = mpRefMgr->getCacheTable(mnFileId, aName, false); + return (pTable.get() != NULL); } sal_Int32 SAL_CALL ScExternalDocLinkObj::getCount() throw (RuntimeException) { ScUnoGuard aGuard; - return static_cast(mpRefMgr->getCacheTableCount(mnFileId)); + + // #i116940# be consistent with getByName: count only table names which have a cache already + return getElementNames().getLength(); } -Any SAL_CALL ScExternalDocLinkObj::getByIndex(sal_Int32 nIndex) +Any SAL_CALL ScExternalDocLinkObj::getByIndex(sal_Int32 nApiIndex) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, RuntimeException) { ScUnoGuard aGuard; - size_t nTabCount = mpRefMgr->getCacheTableCount(mnFileId); - if (nIndex < 0 || nIndex >= static_cast(nTabCount)) + + // #i116940# Can't use nApiIndex as index for the ref manager, because the API counts only + // the entries which have a cache already. Quick solution: Use getElementNames. + + Sequence< OUString > aNames( getElementNames() ); + if (nApiIndex < 0 || nApiIndex >= aNames.getLength()) throw lang::IndexOutOfBoundsException(); - ScExternalRefCache::TableTypeRef pTable = mpRefMgr->getCacheTable(mnFileId, static_cast(nIndex)); + size_t nIndex = 0; + ScExternalRefCache::TableTypeRef pTable = mpRefMgr->getCacheTable(mnFileId, aNames[nApiIndex], false, &nIndex); if (!pTable) throw lang::IndexOutOfBoundsException(); @@ -1702,7 +1719,9 @@ sal_Bool SAL_CALL ScExternalDocLinkObj::hasElements() throw (RuntimeException) { ScUnoGuard aGuard; - return static_cast(mpRefMgr->getCacheTableCount(mnFileId) > 0); + + // #i116940# be consistent with getByName: count only table names which have a cache already + return ( getElementNames().getLength() > 0 ); } sal_Int32 SAL_CALL ScExternalDocLinkObj::getTokenIndex() -- cgit v1.2.3 From 3cc35e61a47a4d41c02eaac1fd7776cc3d963908 Mon Sep 17 00:00:00 2001 From: ka Date: Mon, 21 Feb 2011 23:01:01 +0100 Subject: ka102: no packaging of prebundled librsvg --- scp2/source/ooo/file_ooo.scp | 11 ----------- scp2/source/ooo/module_hidden_ooo.scp | 3 +-- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp index a03af848d8aa..1cc97d8bef12 100644 --- a/scp2/source/ooo/file_ooo.scp +++ b/scp2/source/ooo/file_ooo.scp @@ -2119,14 +2119,3 @@ End // End // #endif -#if defined WNT || defined MACOSX -File gid_File_Lib_Librsvg - Dir = gid_Dir_Program; - ARCHIVE_TXT_FILE_BODY; -#if defined WNT - Name = "librsvg_w32.zip"; -#else - Name = "librsvg_mac.zip"; -#endif -End -#endif diff --git a/scp2/source/ooo/module_hidden_ooo.scp b/scp2/source/ooo/module_hidden_ooo.scp index 5f89b276303e..25c36f714954 100644 --- a/scp2/source/ooo/module_hidden_ooo.scp +++ b/scp2/source/ooo/module_hidden_ooo.scp @@ -248,8 +248,7 @@ Module gid_Module_Root_Files_4 gid_File_Lib_Lprxw, gid_File_Lib_Libtextcat, gid_File_Lib_Guesslang, - gid_File_Lib_Tfu, - gid_File_Lib_Librsvg); + gid_File_Lib_Tfu); End Module gid_Module_Root_Files_5 -- cgit v1.2.3 From 61d2dfb35bb6434551bdefb17730ae65ae78365e Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Tue, 22 Feb 2011 10:00:34 +0100 Subject: dba34d: replace tools types --- reportdesign/source/ui/report/DesignView.cxx | 1 + reportdesign/source/ui/report/EndMarker.cxx | 4 ++-- reportdesign/source/ui/report/ReportSection.cxx | 4 ++-- reportdesign/source/ui/report/ReportWindow.cxx | 1 + reportdesign/source/ui/report/SectionWindow.cxx | 4 ++-- reportdesign/source/ui/report/StartMarker.cxx | 5 +++-- reportdesign/source/ui/report/ViewsWindow.cxx | 2 +- 7 files changed, 12 insertions(+), 9 deletions(-) diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index f806d64112cd..48ec9dc626ca 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -494,6 +494,7 @@ IMPL_LINK( ODesignView, SplitHdl, void*, ) if ( (aOutputSize.Width() - nTest) >= nMinWidth && nTest > m_aScrollWindow.getMaxMarkerWidth(sal_False) ) { long nOldSplitPos = getController().getSplitPos(); + (void)nOldSplitPos; getController().setSplitPos(nTest); } diff --git a/reportdesign/source/ui/report/EndMarker.cxx b/reportdesign/source/ui/report/EndMarker.cxx index 7a5e47fef9b7..c8c508d3ddaa 100644 --- a/reportdesign/source/ui/report/EndMarker.cxx +++ b/reportdesign/source/ui/report/EndMarker.cxx @@ -88,9 +88,9 @@ void OEndMarker::Paint( const Rectangle& /*rRect*/ ) // ----------------------------------------------------------------------- void OEndMarker::ImplInitSettings() { - EnableChildTransparentMode( TRUE ); + EnableChildTransparentMode( sal_True ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( TRUE ); + SetPaintTransparent( sal_True ); SetBackground( Wallpaper( svtools::ColorConfig().GetColorValue(::svtools::APPBACKGROUND).nColor) ); SetFillColor( Application::GetSettings().GetStyleSettings().GetShadowColor() ); diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index 9ba3d888be5a..020f7e24ca22 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -105,8 +105,8 @@ OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< re SetHelpId(HID_REPORTSECTION); SetMapMode( MapMode( MAP_100TH_MM ) ); SetParentClipMode( PARENTCLIPMODE_CLIP ); - EnableChildTransparentMode( FALSE ); - SetPaintTransparent( FALSE ); + EnableChildTransparentMode( sal_False ); + SetPaintTransparent( sal_False ); try { diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx index 628e0028f0d2..35ef356005f5 100644 --- a/reportdesign/source/ui/report/ReportWindow.cxx +++ b/reportdesign/source/ui/report/ReportWindow.cxx @@ -446,6 +446,7 @@ sal_uInt16 OReportWindow::getZoomFactor(SvxZoomType _eType) const // ----------------------------------------------------------------------------- void OReportWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) throw( uno::RuntimeException) { + (void)_rEvent; Resize(); m_aViewsWindow.Resize(); static sal_Int32 nIn = INVALIDATE_TRANSPARENT; diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index 7d5a7f4549e0..ab08c11e0753 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -211,9 +211,9 @@ void OSectionWindow::ImplInitSettings() static bool t = false; if ( t ) { - EnableChildTransparentMode( TRUE ); + EnableChildTransparentMode( sal_True ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( TRUE ); + SetPaintTransparent( sal_True ); } SetBackground( ); } diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx index 289ba8c22fe6..8e00e6654f98 100644 --- a/reportdesign/source/ui/report/StartMarker.cxx +++ b/reportdesign/source/ui/report/StartMarker.cxx @@ -71,7 +71,7 @@ OStartMarker::OStartMarker(OSectionWindow* _pParent,const ::rtl::OUString& _sCol initDefaultNodeImages(); ImplInitSettings(); m_aText.SetHelpId(HID_RPT_START_TITLE); - m_aText.SetPaintTransparent(TRUE); + m_aText.SetPaintTransparent(sal_True); m_aImage.SetHelpId(HID_RPT_START_IMAGE); m_aText.Show(); m_aImage.Show(); @@ -84,7 +84,7 @@ OStartMarker::OStartMarker(OSectionWindow* _pParent,const ::rtl::OUString& _sCol m_aVRuler.SetMargin2(); const MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum(); m_aVRuler.SetUnit(MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH); - EnableChildTransparentMode( TRUE ); + EnableChildTransparentMode( sal_True ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); SetPaintTransparent( sal_True ); } @@ -110,6 +110,7 @@ sal_Int32 OStartMarker::getMinHeight() const // ----------------------------------------------------------------------------- void OStartMarker::Paint( const Rectangle& rRect ) { + (void)rRect; //SetUpdateMode(sal_False); Size aSize = GetOutputSizePixel(); long nSize = aSize.Width(); diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index 2410e317c663..f3706fa786bd 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -294,7 +294,7 @@ void OViewsWindow::Paint( const Rectangle& rRect ) //------------------------------------------------------------------------------ void OViewsWindow::ImplInitSettings() { - EnableChildTransparentMode( TRUE ); + EnableChildTransparentMode( sal_True ); SetBackground( ); SetFillColor( Application::GetSettings().GetStyleSettings().GetDialogColor() ); SetTextFillColor( Application::GetSettings().GetStyleSettings().GetDialogColor() ); -- cgit v1.2.3 From fbd12549299a2fccab00e3f5a9d0bac161170b75 Mon Sep 17 00:00:00 2001 From: "Eike Rathke [er]" Date: Tue, 22 Feb 2011 13:48:40 +0100 Subject: calc66: #i110588# treat external references as 3D again (they are at least 3.5D ;) --- sc/source/core/tool/token.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index a270969e100c..59f055296f75 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -561,6 +561,10 @@ sal_Bool ScToken::Is3DRef() const if ( GetSingleRef().IsFlag3D() ) return sal_True; break; + case svExternalSingleRef: + case svExternalDoubleRef: + return sal_True; + break; default: { // added to avoid warnings @@ -1825,6 +1829,20 @@ void ScTokenArray::ReadjustRelative3DReferences( const ScAddress& rOldPos, } } break; + case svExternalDoubleRef: + { + ScSingleRefData& rRef2 = static_cast(pCode[j])->GetSingleRef2(); + rRef2.CalcAbsIfRel( rOldPos ); + rRef2.CalcRelFromAbs( rNewPos ); + } + //! fallthru + case svExternalSingleRef: + { + ScSingleRefData& rRef1 = static_cast(pCode[j])->GetSingleRef(); + rRef1.CalcAbsIfRel( rOldPos ); + rRef1.CalcRelFromAbs( rNewPos ); + } + break; default: { // added to avoid warnings -- cgit v1.2.3 From 7ac0c9bc14ac38a9c0d3bb3f117208464c719941 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 23 Feb 2011 09:43:22 +0100 Subject: dba34d: fixed attemptListenerCreation --- svx/source/form/fmundo.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index 8a72cb768d5f..ecbfc8afbe1a 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -129,7 +129,7 @@ private: { ::comphelper::ComponentContext const aContext( ::comphelper::getProcessServiceFactory() ); Reference< XScriptListener > const xScriptListener( aContext.createComponent( "ooo.vba.EventListener" ), UNO_QUERY_THROW ); - Reference< XPropertySet > const xListenerProps( m_vbaListener, UNO_QUERY_THROW ); + Reference< XPropertySet > const xListenerProps( xScriptListener, UNO_QUERY_THROW ); // SfxObjectShellRef is good here since the model controls the lifetime of the shell SfxObjectShellRef const xObjectShell = m_rModel.GetObjectShell(); ENSURE_OR_THROW( xObjectShell.Is(), "no object shell!" ); -- cgit v1.2.3 From 471c2f552f7b1410b9b44ef4d0861fa2059d6315 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 23 Feb 2011 16:06:49 +0100 Subject: #i115404# Revert change for i51258 which broke context menu function on right mouse click --- vcl/source/window/seleng.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx index 9d7727493490..c92d9dd4130a 100644 --- a/vcl/source/window/seleng.cxx +++ b/vcl/source/window/seleng.cxx @@ -200,11 +200,7 @@ void SelectionEngine::CursorPosChanging( sal_Bool bShift, sal_Bool bMod1 ) sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) { nFlags &= (~SELENG_CMDEVT); - if ( !pFunctionSet || !pWin ) - return sal_False; - const bool bRightClickCursorPositioning = - rMEvt.IsRight() && rMEvt.GetClicks() == 1 && !IsInSelection(); - if ( (rMEvt.GetClicks() > 1 || rMEvt.IsRight()) && !bRightClickCursorPositioning ) + if ( !pFunctionSet || !pWin || rMEvt.GetClicks() > 1 || rMEvt.IsRight() ) return sal_False; sal_uInt16 nModifier = rMEvt.GetModifier() | nLockedMods; -- cgit v1.2.3 From 8c597c87353e3dc106308ebb93760da0a593b865 Mon Sep 17 00:00:00 2001 From: "Eike Rathke [er]" Date: Wed, 23 Feb 2011 17:04:08 +0100 Subject: calc66: in ADDRESS function handle sheet name of external document - Previously, 'Doc'#Tab was escaped as '''Doc''#Tab' to form one sheet name. + Split 'Doc'#Tab to isolate Tab. * Enquote Tab only if quotes not already present. + Recombine strings to form 'Doc'#'Tab' (or 'Doc'#Tab if Tab wasn't necessary to be enquoted). - A sheet name given as empty string lead to a ''.A1 address. * Use sheet name only if not empty to form A1 in that case. --- sc/inc/compiler.hxx | 6 +++++ sc/source/core/tool/address.cxx | 8 +++---- sc/source/core/tool/compiler.cxx | 47 ++++++++++++++++++++++------------------ sc/source/core/tool/interpr1.cxx | 22 +++++++++++++++++-- 4 files changed, 56 insertions(+), 27 deletions(-) diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx index 27845bbc50cf..e2c863dace7d 100644 --- a/sc/inc/compiler.hxx +++ b/sc/inc/compiler.hxx @@ -361,6 +361,12 @@ public: static void CheckTabQuotes( String& aTabName, const formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO ); + /** Analyzes a string for a 'Doc'#Tab construct, or 'Do''c'#Tab etc.. + + @returns the position of the unquoted # hash mark in 'Doc'#Tab, or + STRING_NOTFOUND if none. */ + static xub_StrLen GetDocTabPos( const String& rString ); + static sal_Bool EnQuote( String& rStr ); sal_Unicode GetNativeAddressSymbol( Convention::SpecialSymbolType eType ) const; diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index 26a194b731ef..e24a4ff4158e 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -1648,8 +1648,8 @@ void ScAddress::Format( String& r, sal_uInt16 nFlags, ScDocument* pDoc, // External Reference, same as in ScCompiler::MakeTabStr() if( aTabName.GetChar(0) == '\'' ) { // "'Doc'#Tab" - xub_StrLen nPos = ScGlobal::FindUnquoted( aTabName, SC_COMPILER_FILE_TAB_SEP); - if (nPos != STRING_NOTFOUND && nPos > 0 && aTabName.GetChar(nPos-1) == '\'') + xub_StrLen nPos = ScCompiler::GetDocTabPos( aTabName); + if (nPos != STRING_NOTFOUND) { aDocName = aTabName.Copy( 0, nPos + 1 ); aTabName.Erase( 0, nPos + 1 ); @@ -1731,8 +1731,8 @@ lcl_Split_DocTab( const ScDocument* pDoc, SCTAB nTab, // External reference, same as in ScCompiler::MakeTabStr() if ( rTabName.GetChar(0) == '\'' ) { // "'Doc'#Tab" - xub_StrLen nPos = ScGlobal::FindUnquoted( rTabName, SC_COMPILER_FILE_TAB_SEP); - if (nPos != STRING_NOTFOUND && nPos > 0 && rTabName.GetChar(nPos-1) == '\'') + xub_StrLen nPos = ScCompiler::GetDocTabPos( rTabName); + if (nPos != STRING_NOTFOUND) { rDocName = rTabName.Copy( 0, nPos + 1 ); rTabName.Erase( 0, nPos + 1 ); diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 3dd25801532f..31964eff34be 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -855,18 +855,14 @@ struct ConventionOOO_A1 : public Convention_A1 aString = ScGlobal::GetRscString(STR_NO_REF_TABLE); else { - if ( aString.GetChar(0) == '\'' ) - { // "'Doc'#Tab" - xub_StrLen nPos = ScGlobal::FindUnquoted( aString, SC_COMPILER_FILE_TAB_SEP); - if (nPos != STRING_NOTFOUND && nPos > 0 && aString.GetChar(nPos-1) == '\'') - { - aDoc = aString.Copy( 0, nPos + 1 ); - aString.Erase( 0, nPos + 1 ); - aDoc = INetURLObject::decode( aDoc, INET_HEX_ESCAPE, + // "'Doc'#Tab" + xub_StrLen nPos = ScCompiler::GetDocTabPos( aString); + if (nPos != STRING_NOTFOUND) + { + aDoc = aString.Copy( 0, nPos + 1 ); + aString.Erase( 0, nPos + 1 ); + aDoc = INetURLObject::decode( aDoc, INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS ); - } - else - aDoc.Erase(); } else aDoc.Erase(); @@ -1203,18 +1199,15 @@ struct ConventionXL } // Cheesy hack to unparse the OOO style "'Doc'#Tab" - if ( rTabName.GetChar(0) == '\'' ) + xub_StrLen nPos = ScCompiler::GetDocTabPos( rTabName); + if (nPos != STRING_NOTFOUND) { - xub_StrLen nPos = ScGlobal::FindUnquoted( rTabName, SC_COMPILER_FILE_TAB_SEP); - if (nPos != STRING_NOTFOUND && nPos > 0 && rTabName.GetChar(nPos-1) == '\'') - { - rDocName = rTabName.Copy( 0, nPos ); - // TODO : More research into how XL escapes the doc path - rDocName = INetURLObject::decode( rDocName, INET_HEX_ESCAPE, + rDocName = rTabName.Copy( 0, nPos ); + // TODO : More research into how XL escapes the doc path + rDocName = INetURLObject::decode( rDocName, INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS ); - rTabName.Erase( 0, nPos + 1 ); - bHasDoc = true; - } + rTabName.Erase( 0, nPos + 1 ); + bHasDoc = true; } // XL uses the same sheet name quoting conventions in both modes @@ -1872,6 +1865,18 @@ void ScCompiler::CheckTabQuotes( String& rString, } } + +xub_StrLen ScCompiler::GetDocTabPos( const String& rString ) +{ + if (rString.GetChar(0) != '\'') + return STRING_NOTFOUND; + xub_StrLen nPos = ScGlobal::FindUnquoted( rString, SC_COMPILER_FILE_TAB_SEP); + // it must be 'Doc'# + if (nPos != STRING_NOTFOUND && rString.GetChar(nPos-1) != '\'') + nPos = STRING_NOTFOUND; + return nPos; +} + //--------------------------------------------------------------------------- void ScCompiler::SetRefConvention( FormulaGrammar::AddressConvention eConv ) diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 23c13331db26..a9ccaa9053af 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -6417,9 +6417,27 @@ void ScInterpreter::ScAddressFunc() const ScAddress aAdr( nCol, nRow, 0); aAdr.Format( aRefStr, nFlags, pDok, aDetails ); - if( nParamCount >= 5 ) + if( nParamCount >= 5 && sTabStr.Len() ) { - ScCompiler::CheckTabQuotes( sTabStr, eConv); + String aDoc; + if (eConv == FormulaGrammar::CONV_OOO) + { + // Isolate Tab from 'Doc'#Tab + xub_StrLen nPos = ScCompiler::GetDocTabPos( sTabStr); + if (nPos != STRING_NOTFOUND) + { + if (sTabStr.GetChar(nPos+1) == '$') + ++nPos; // also split 'Doc'#$Tab + aDoc = sTabStr.Copy( 0, nPos+1); + sTabStr.Erase( 0, nPos+1); + } + } + /* TODO: yet unsupported external reference in CONV_XL_R1C1 syntax may + * need some extra handling to isolate Tab from Doc. */ + if (sTabStr.GetChar(0) != '\'' || sTabStr.GetChar(sTabStr.Len()-1) != '\'') + ScCompiler::CheckTabQuotes( sTabStr, eConv); + if (aDoc.Len()) + sTabStr.Insert( aDoc, 0); sTabStr += static_cast(eConv == FormulaGrammar::CONV_XL_R1C1 ? '!' : '.'); sTabStr += aRefStr; PushString( sTabStr ); -- cgit v1.2.3 From 9830a3b8ed564471f76b0502a8a88a74952582f4 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Wed, 23 Feb 2011 19:15:01 +0100 Subject: calc66: #i116833# invalidate stream positions in ScFormulaCell::UpdateReference --- sc/source/core/data/cell2.cxx | 4 ++++ sc/source/filter/xml/xmlexprt.cxx | 3 +++ sc/source/filter/xml/xmlimprt.cxx | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx index e4631dde2d9a..23b9934564b9 100644 --- a/sc/source/core/data/cell2.cxx +++ b/sc/source/core/data/cell2.cxx @@ -990,6 +990,10 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode, pUndoDoc->PutCell( aUndoPos, pFCell ); } } + // #i116833# If the formula is changed, always invalidate the stream (even if the result is the same). + // If the formula is moved, the change is recognized separately. + if (bValChanged && pDocument->IsStreamValid(aPos.Tab())) + pDocument->SetStreamValid(aPos.Tab(), sal_False); bValChanged = sal_False; if ( pRangeData ) { // Replace shared formula with own formula diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index f8769cc95ffb..14a4f267aaba 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -3255,6 +3255,9 @@ void ScXMLExport::WriteShapes(const ScMyCell& rMyCell) AddAttribute(XML_NAMESPACE_TABLE, XML_END_Y, sBuffer.makeStringAndClear()); } ExportShape(aItr->xShape, &aPoint); + // if there's an error in ExportShape, the attributes from above must be removed + CheckAttrList(); // asserts in non pro if we have attributes left + ClearAttrList(); // clears the attributes } ++aItr; } diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 4721b34cab2d..13a7889d0c99 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -2848,7 +2848,9 @@ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeE pDoc->GetExternalRefManager()->updateAbsAfterLoad(); } - if (pDoc && GetModel().is()) + // If the stream contains cells outside of the current limits, the styles can't be re-created, + // so stream copying is disabled then. + if (pDoc && GetModel().is() && !pDoc->HasRangeOverflow()) { // set "valid stream" flags after loading (before UpdateRowHeights, so changed formula results // in UpdateRowHeights can already clear the flags again) -- cgit v1.2.3 From 74d51c1c542ebbe2312d90ffb60f8f51b2de81a9 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Wed, 23 Feb 2011 19:24:58 +0100 Subject: calc66: use correct sheet for clip param also in MoveBlock, PasteDataFormat (avoid assertions) --- sc/source/ui/docshell/docfunc.cxx | 2 +- sc/source/ui/view/viewfun5.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 152f9f206cbe..62b256ba620c 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -2291,7 +2291,7 @@ sal_Bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos } ScDrawLayer::SetGlobalDrawPersist(aDragShellRef); - ScClipParam aClipParam(ScRange(nStartCol, nStartRow, 0, nEndCol, nEndRow, 0), bCut); + ScClipParam aClipParam(ScRange(nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nStartTab), bCut); pDoc->CopyToClip(aClipParam, pClipDoc, &aSourceMark, false, bScenariosAdded, true); ScDrawLayer::SetGlobalDrawPersist(NULL); diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index 205a0532eb3a..b42bd51b2876 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -165,7 +165,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, nFirstCol = nLastCol = 0; nFirstRow = nLastRow = 0; } - ScClipParam aClipParam(ScRange(nFirstCol, nFirstRow, 0, nLastCol, nLastRow, 0), false); + ScClipParam aClipParam(ScRange(nFirstCol, nFirstRow, nSrcTab, nLastCol, nLastRow, nSrcTab), false); pSrcDoc->CopyToClip(aClipParam, pClipDoc, &aSrcMark); ScGlobal::SetClipDocName( xDocShRef->GetTitle( SFX_TITLE_FULLNAME ) ); -- cgit v1.2.3 From 40053f86ff0830b3ac08df2639575c14c04f8adb Mon Sep 17 00:00:00 2001 From: "Eike Rathke [er]" Date: Thu, 24 Feb 2011 13:45:51 +0100 Subject: calc66: fixed out of bounds access in offset# Sequence of equals() --- i18npool/source/transliteration/transliterationImpl.cxx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/i18npool/source/transliteration/transliterationImpl.cxx b/i18npool/source/transliteration/transliterationImpl.cxx index 2109c310b233..7506ec5c15aa 100644 --- a/i18npool/source/transliteration/transliterationImpl.cxx +++ b/i18npool/source/transliteration/transliterationImpl.cxx @@ -43,6 +43,8 @@ #include #include +#include + #if OSL_DEBUG_LEVEL > 1 #include #endif @@ -474,24 +476,25 @@ TransliterationImpl::equals( OUString tmpStr1 = folding(str1, pos1, nCount1, offset1); OUString tmpStr2 = folding(str2, pos2, nCount2, offset2); + // Length of offset1 and offset2 may still be 0 if there was no folding + // necessary! const sal_Unicode *p1 = tmpStr1.getStr(); const sal_Unicode *p2 = tmpStr2.getStr(); - sal_Int32 i, nLen = (tmpStr1.getLength() < tmpStr1.getLength() ? - tmpStr1.getLength() : tmpStr2.getLength()); + sal_Int32 i, nLen = ::std::min( tmpStr1.getLength(), tmpStr2.getLength()); for (i = 0; i < nLen; ++i, ++p1, ++p2 ) { if (*p1 != *p2) { // return number of matched code points so far - nMatch1 = offset1[i]; - nMatch2 = offset2[i]; + nMatch1 = (i < offset1.getLength()) ? offset1[i] : i; + nMatch2 = (i < offset2.getLength()) ? offset2[i] : i; return sal_False; } } // i==nLen if ( tmpStr1.getLength() != tmpStr2.getLength() ) { // return number of matched code points so far - nMatch1 = offset1[i-1] + 1; - nMatch2 = offset2[i-1] + 1; + nMatch1 = (i <= offset1.getLength()) ? offset1[i-1] + 1 : i; + nMatch2 = (i <= offset2.getLength()) ? offset2[i-1] + 1 : i; return sal_False; } else { nMatch1 = nCount1; -- cgit v1.2.3 From 371f12e8b5f9bea2e22a50e5d7766a186634bb7f Mon Sep 17 00:00:00 2001 From: "Eike Rathke [er]" Date: Thu, 24 Feb 2011 13:55:52 +0100 Subject: calc66: #i113183# in SUMIF and COUNTIF external references treat numeric strings the same as in-document As in ScTable::ValidQuery() match a numeric string for a number query that originated from a string. --- sc/source/core/tool/interpr1.cxx | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index a9ccaa9053af..5439609c7c57 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -653,6 +653,7 @@ double ScInterpreter::CompareFunc( const ScCompare& rComp, ScCompareOptions* pOp if ( !rComp.bEmpty[1] && rComp.bVal[1] && !::rtl::math::isFinite( rComp.nVal[1])) return rComp.nVal[1]; + size_t nStringQuery = 0; // 0:=no, 1:=0, 2:=1 double fRes = 0; if ( rComp.bEmpty[ 0 ] ) { @@ -709,16 +710,22 @@ double ScInterpreter::CompareFunc( const ScCompare& rComp, ScCompareOptions* pOp } } else - fRes = -1; // number is less than string + { + fRes = -1; // number is less than string + nStringQuery = 2; // 1+1 + } } else if( rComp.bVal[ 1 ] ) - fRes = 1; // number is less than string + { + fRes = 1; // string is greater than number + nStringQuery = 1; // 0+1 + } else { // Both strings. if (pOptions) { - // All similar to Sctable::ValidQuery(), *rComp.pVal[1] actually + // All similar to ScTable::ValidQuery(), *rComp.pVal[1] actually // is/must be identical to *rEntry.pStr, which is essential for // regex to work through GetSearchTextPtr(). ScQueryEntry& rEntry = pOptions->aQueryEntry; @@ -768,6 +775,20 @@ double ScInterpreter::CompareFunc( const ScCompare& rComp, ScCompareOptions* pOp fRes = (double) ScGlobal::GetCaseCollator()->compareString( *rComp.pVal[ 0 ], *rComp.pVal[ 1 ] ); } + if (nStringQuery && pOptions) + { + const ScQueryEntry& rEntry = pOptions->aQueryEntry; + if (!rEntry.bQueryByString && rEntry.pStr->Len() && + (rEntry.eOp == SC_EQUAL || rEntry.eOp == SC_NOT_EQUAL)) + { + // As in ScTable::ValidQuery() match a numeric string for a + // number query that originated from a string, e.g. in SUMIF + // and COUNTIF. Transliteration is not needed here. + bool bEqual = rComp.pVal[nStringQuery-1]->Equals( *rEntry.pStr); + // match => fRes=0, else fRes=1 + fRes = (rEntry.eOp == SC_NOT_EQUAL) ? bEqual : !bEqual; + } + } return fRes; } -- cgit v1.2.3 From 5e0ac176cf025f7e070d882f4bba169f6242efa7 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 24 Feb 2011 13:57:59 +0100 Subject: #i117013# Check restart state earlier in startup process to better support extensions with changed configuration settings --- desktop/source/app/app.cxx | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index a2f602082fe4..57adbfdad775 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1729,8 +1729,17 @@ void Desktop::Main() bool bAbort = CheckExtensionDependencies(); if ( bAbort ) return; + + { + ::comphelper::ComponentContext aContext( xSMgr ); + xRestartManager.set( aContext.getSingleton( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.OfficeRestartManager" ) ) ), UNO_QUERY ); + } + + // check whether the shutdown is caused by restart + pExecGlobals->bRestartRequested = ( xRestartManager.is() && xRestartManager->isRestartRequested( sal_True ) ); + // First Start Wizard allowed ? - if ( ! pCmdLineArgs->IsNoFirstStartWizard()) + if ( ! pCmdLineArgs->IsNoFirstStartWizard() && !pExecGlobals->bRestartRequested ) { RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ FirstStartWizard" ); @@ -1782,14 +1791,6 @@ void Desktop::Main() impl_checkRecoveryState(bCrashed, bExistsRecoveryData, bExistsSessionData); RTL_LOGFILE_CONTEXT_TRACE( aLog, "} impl_checkRecoveryState" ); - { - ::comphelper::ComponentContext aContext( xSMgr ); - xRestartManager.set( aContext.getSingleton( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.OfficeRestartManager" ) ) ), UNO_QUERY ); - } - - // check whether the shutdown is caused by restart - pExecGlobals->bRestartRequested = ( xRestartManager.is() && xRestartManager->isRestartRequested( sal_True ) ); - if ( pCmdLineArgs->IsHeadless() ) { // Ensure that we use not the system file dialogs as -- cgit v1.2.3 From e0df9bc3622e63eef384d765e686d3645c27d24c Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 24 Feb 2011 19:30:32 +0100 Subject: rsvglibs: add external gettext dependency for rsvglib --- gettext/makefile.mk | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++ gettext/prj/build.lst | 3 ++ gettext/prj/d.lst | 15 ++++++++++ 3 files changed, 98 insertions(+) create mode 100644 gettext/makefile.mk create mode 100644 gettext/prj/build.lst create mode 100644 gettext/prj/d.lst diff --git a/gettext/makefile.mk b/gettext/makefile.mk new file mode 100644 index 000000000000..60d62ab00f75 --- /dev/null +++ b/gettext/makefile.mk @@ -0,0 +1,80 @@ +#************************************************************************* +# +# 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=gettext +TARGET=so_gettext + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +.IF "$(SYSTEM_GETTEXT)" == "YES" +all: + @echo "An already available installation of gettext should exist on your system." + @echo "Therefore the version provided here does not need to be built in addition." +.ENDIF + +# --- Files -------------------------------------------------------- + +GETTEXTVERSION=0.18.1.1 + +TARFILE_NAME=$(PRJNAME)-$(GETTEXTVERSION) +TARFILE_MD5=3dd55b952826d2b32f51308f2f91aa89 + +PATCH_FILES= + +CONFIGURE_DIR= +CONFIGURE_ACTION=.$/configure --prefix=$(SRC_ROOT)$/$(PRJNAME)$/$(MISC) CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS)" +CONFIGURE_FLAGS=$(eq,$(OS),MACOSX CPPFLAGS="$(EXTRA_CDEFS)" $(NULL)) --disable-curses --without-emacs --without-git --disable-java + +BUILD_ACTION=$(GNUMAKE) +BUILD_DIR=$(CONFIGURE_DIR) + +.IF "$(OS)"=="MACOSX" +OUT2LIB+=gettext-tools$/intl$/.libs$/libintl.*.dylib +OUT2LIB+=gettext-runtime$/libasprintf$/.libs$/libasprintf.*.dylib +OUT2LIB+=gettext-tools$/gnulib-lib$/.libs$/libgettextlib-*.dylib +OUT2LIB+=gettext-tools$/src$/.libs$/libgettextsrc-*.dylib +OUT2LIB+=gettext-tools$/libgettextpo$/.libs$/libgettextpo.*.dylib + +OUT2INC+=gettext-tools$/intl$/libintl.h +OUT2INC+=gettext-runtime$/libasprintf$/autosprintf.h +OUT2INC+=gettext-tools$/libgettextpo$/gettext-po.h + +OUT2BIN+=gettext-tools$/src$/.libs$/msgfmt +.ELIF "$(OS)"=="WNT" +.ELSE +.ENDIF + +# --- Targets ------------------------------------------------------ + +.INCLUDE : set_ext.mk +.INCLUDE : target.mk +.INCLUDE : tg_ext.mk + diff --git a/gettext/prj/build.lst b/gettext/prj/build.lst new file mode 100644 index 000000000000..10d25eb8461f --- /dev/null +++ b/gettext/prj/build.lst @@ -0,0 +1,3 @@ +gt gettext : soltools NULL +gt gettext usr1 - all gt_mkout NULL +gt gettext nmake - all gt_gettext NULL diff --git a/gettext/prj/d.lst b/gettext/prj/d.lst new file mode 100644 index 000000000000..a7df40b0a718 --- /dev/null +++ b/gettext/prj/d.lst @@ -0,0 +1,15 @@ +mkdir: %_DEST%\inc%_EXT%\external +..\%__SRC%\inc\*.h %_DEST%\inc%_EXT%\external\*.h +..\%__SRC%\lib\libasprintf.0.dylib %_DEST%\lib%_EXT%\libasprintf.0.dylib +symlink: %_DEST%\lib%_EXT%\libasprintf.0.dylib %_DEST%\lib%_EXT%\libasprintf.dylib +..\%__SRC%\lib\libgettextpo.0.dylib %_DEST%\lib%_EXT%\libgettextpo.0.dylib +symlink: %_DEST%\lib%_EXT%\libgettextpo.0.dylib %_DEST%\lib%_EXT%\libgettextpo.dylib +..\%__SRC%\lib\libgettextsrc-0.18.1.dylib %_DEST%\lib%_EXT%\libgettextsrc-0.18.1.dylib +symlink: %_DEST%\lib%_EXT%\libgettextsrc-0.18.1.dylib %_DEST%\lib%_EXT%\libgettextsrc.dylib +..\%__SRC%\lib\libintl.8.dylib %_DEST%\lib%_EXT%\libintl.8.dylib +symlink: %_DEST%\lib%_EXT%\libintl.8.dylib %_DEST%\lib%_EXT%\libintl.dylib +..\%__SRC%\lib\libgettextlib-0.18.1.dylib %_DEST%\lib%_EXT%\libgettextlib-0.18.1.dylib +symlink: %_DEST%\lib%_EXT%\libgettextlib-0.18.1.dylib %_DEST%\lib%_EXT%\libgettextlib.dylib +..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT% +..\%__SRC%\bin\msgfmt %_DEST%\bin%_EXT% + -- cgit v1.2.3 From 20755856d6007b9f4316c6ba2a571b26d0de85da Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 28 Feb 2011 10:00:23 +0100 Subject: fwk167: #i70217 No need to assert if the same instance is set. Don't create a fresh VCLXDialog instance if has been created in the window ctor --- toolkit/source/awt/vclxtoolkit.cxx | 9 ++++++++- toolkit/source/helper/unowrapper.cxx | 10 ++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index dd6e28807bc6..1c2df22e56a7 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -786,7 +786,14 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, if ( (pParent == NULL ) && ( rDescriptor.ParentIndex == -1 ) ) pParent = DIALOG_NO_PARENT; pNewWindow = new Dialog( pParent, nWinBits ); - *ppNewComp = new VCLXDialog; + // #i70217# Don't always create a new component object. It's possible that VCL has called + // GetComponentInterface( sal_True ) in the Dialog ctor itself (see Window::IsTopWindow() ) + // which creates a component object. + css::uno::Reference< css::awt::XWindowPeer > xWinPeer = pNewWindow->GetComponentInterface( sal_False ); + if ( xWinPeer.is() ) + *ppNewComp = dynamic_cast< VCLXDialog* >( xWinPeer.get() ); + else + *ppNewComp = new VCLXDialog; } break; case WINDOW_MOREBUTTON: diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx index 1b676ec0edb3..7046f9485d36 100644 --- a/toolkit/source/helper/unowrapper.cxx +++ b/toolkit/source/helper/unowrapper.cxx @@ -180,11 +180,13 @@ void UnoWrapper::SetWindowInterface( Window* pWindow, ::com::sun::star::uno::Ref DBG_ASSERT( pVCLXWindow, "SetComponentInterface - unsupported type" ); if ( pVCLXWindow ) { - if( pWindow->GetWindowPeer() ) + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer> xPeer = pWindow->GetWindowPeer(); + if( xPeer.is() ) { - int i = 0; - i++; - // DBG_ERROR( "UnoWrapper::SetWindowInterface: there already *is* a WindowInterface for this window!" ); + bool bSameInstance( pVCLXWindow == dynamic_cast< VCLXWindow* >( xPeer.get() )); + DBG_ASSERT( bSameInstance, "UnoWrapper::SetWindowInterface: there already *is* a WindowInterface for this window!" ); + if ( bSameInstance ) + return; } pVCLXWindow->SetWindow( pWindow ); pWindow->SetWindowPeer( xIFace, pVCLXWindow ); -- cgit v1.2.3 From a14d776661649daaae4021cfe6fca69136acad1a Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 28 Feb 2011 13:54:22 +0100 Subject: rsvglibs: add glib dependency. --- glib/glib-2.28.1.patch | 41 +++++++ glib/makefile.mk | 293 +++++++++++++++++++++++++++++++++++++++++++++++++ glib/prj/build.lst | 3 + glib/prj/d.lst | 228 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 565 insertions(+) create mode 100644 glib/glib-2.28.1.patch create mode 100644 glib/makefile.mk create mode 100644 glib/prj/build.lst create mode 100644 glib/prj/d.lst diff --git a/glib/glib-2.28.1.patch b/glib/glib-2.28.1.patch new file mode 100644 index 000000000000..cadcc4db2cb8 --- /dev/null +++ b/glib/glib-2.28.1.patch @@ -0,0 +1,41 @@ +--- misc/glib-2.28.1/gio/gzlibcompressor.c 2011-02-11 16:23:12.000000000 +0100 ++++ misc/build/glib-2.28.1/gio/gzlibcompressor.c 2011-02-25 15:59:17.000000000 +0100 +@@ -73,7 +73,7 @@ + g_zlib_compressor_set_gzheader (GZlibCompressor *compressor) + { + /* On win32, these functions were not exported before 1.2.4 */ +-#if !defined (G_OS_WIN32) || ZLIB_VERNUM >= 0x1240 ++#if (!defined (G_OS_WIN32) && ! defined(BUILD_OS_APPLEOSX)) || ZLIB_VERNUM >= 0x1240 + const gchar *filename; + + if (compressor->format != G_ZLIB_COMPRESSOR_FORMAT_GZIP || +--- misc/glib-2.28.1/gio/gzlibdecompressor.c 2011-02-11 16:23:12.000000000 +0100 ++++ misc/build/glib-2.28.1/gio/gzlibdecompressor.c 2011-02-25 16:00:43.000000000 +0100 +@@ -76,7 +76,7 @@ + g_zlib_decompressor_set_gzheader (GZlibDecompressor *decompressor) + { + /* On win32, these functions were not exported before 1.2.4 */ +-#if !defined (G_OS_WIN32) || ZLIB_VERNUM >= 0x1240 ++#if (!defined (G_OS_WIN32) && !defined(BUILD_OS_APPLEOSX)) || ZLIB_VERNUM >= 0x1240 + if (decompressor->format != G_ZLIB_COMPRESSOR_FORMAT_GZIP) + return; + +@@ -376,7 +376,7 @@ + *bytes_read = inbuf_size - decompressor->zstream.avail_in; + *bytes_written = outbuf_size - decompressor->zstream.avail_out; + +-#if !defined (G_OS_WIN32) || ZLIB_VERNUM >= 0x1240 ++#if (!defined (G_OS_WIN32) && !defined(BUILD_OS_APPLEOSX)) || ZLIB_VERNUM >= 0x1240 + if (decompressor->header_data != NULL && + decompressor->header_data->gzheader.done == 1) + { +--- misc/glib-2.28.1/glib/gatomic.c 2011-02-11 16:23:12.000000000 +0100 ++++ misc/build/glib-2.28.1/glib/gatomic.c 2011-02-25 15:51:45.000000000 +0100 +@@ -28,6 +28,7 @@ + #endif + + #include "gatomic.h" ++#include "gthread.h" + #include "gthreadprivate.h" + + /** diff --git a/glib/makefile.mk b/glib/makefile.mk new file mode 100644 index 000000000000..44edca5af323 --- /dev/null +++ b/glib/makefile.mk @@ -0,0 +1,293 @@ +#************************************************************************* +# +# 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=glib +TARGET=so_glib + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +.IF "$(SYSTEM_GLIB)" == "YES" +all: + @echo "An already available installation of glib should exist on your system." + @echo "Therefore the version provided here does not need to be built in addition." +.ENDIF + +# --- Files -------------------------------------------------------- + +GLIBVERSION=2.28.1 + +TARFILE_NAME=$(PRJNAME)-$(GLIBVERSION) +TARFILE_MD5=9f6e85e1e38490c3956f4415bcd33e6e + +PATCH_FILES=glib-2.28.1.patch + +CONFIGURE_LDFLAGS="-L$(SOLARLIBDIR)" +CONFIGURE_DIR= +CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) \ + .$/configure --prefix=$(SRC_ROOT)$/$(PRJNAME)$/$(MISC) \ + CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS) -I$(SOLARINCDIR)$/external" \ + LDFLAGS="$(CONFIGURE_LDFLAGS)" +CONFIGURE_FLAGS=--disable-fam +.IF "$(OS)" == "MACOSX" +CONFIGURE_FLAGS+= CPPFLAGS="$(ARCH_FLAGS) $(EXTRA_CDEFS)" +.ENDIF + +BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) $(GNUMAKE) +BUILD_DIR=$(CONFIGURE_DIR) + + +.IF "$(OS)"=="MACOSX" +OUT2LIB+=gio/.libs/libgio-2.0.0.dylib +OUT2LIB+=glib/.libs/libglib-2.0.0.dylib +OUT2LIB+=gmodule/.libs/libgmodule-2.0.0.dylib +OUT2LIB+=gobject/.libs/libgobject-2.0.0.dylib +OUT2LIB+=gthread/.libs/libgthread-2.0.0.dylib + +OUT2INC+=glib/glib.h +OUT2INC+=glib/glib-object.h +OUT2INC+=gmodule/gmodule.h + +OUT2INC+=gio/gdesktopappinfo.h +OUT2INC+=gio/gunixcredentialsmessage.h +OUT2INC+=gio/gunixinputstream.h +OUT2INC+=gio/gunixsocketaddress.h +OUT2INC+=gio/gfiledescriptorbased.h +OUT2INC+=gio/gunixfdlist.h +OUT2INC+=gio/gunixmounts.h +OUT2INC+=gio/gunixconnection.h +OUT2INC+=gio/gunixfdmessage.h +OUT2INC+=gio/gunixoutputstream.h + + +OUT2INC+=gio/gaction.h +OUT2INC+=gio/gfileicon.h +OUT2INC+=gio/gproxyaddressenumerator.h +OUT2INC+=gio/gactiongroup.h +OUT2INC+=gio/gfileinfo.h +OUT2INC+=gio/gproxyresolver.h +OUT2INC+=gio/gappinfo.h +OUT2INC+=gio/gfileinputstream.h +OUT2INC+=gio/gresolver.h +OUT2INC+=gio/gapplication.h +OUT2INC+=gio/gfileiostream.h +OUT2INC+=gio/gseekable.h +OUT2INC+=gio/gapplicationcommandline.h +OUT2INC+=gio/gfilemonitor.h +OUT2INC+=gio/gsettings.h +OUT2INC+=gio/gasyncinitable.h +OUT2INC+=gio/gfilenamecompleter.h +OUT2INC+=gio/gsettingsbackend.h +OUT2INC+=gio/gasyncresult.h +OUT2INC+=gio/gfileoutputstream.h +OUT2INC+=gio/gsimpleaction.h +OUT2INC+=gio/gbufferedinputstream.h +OUT2INC+=gio/gfilterinputstream.h +OUT2INC+=gio/gsimpleactiongroup.h +OUT2INC+=gio/gbufferedoutputstream.h +OUT2INC+=gio/gfilteroutputstream.h +OUT2INC+=gio/gsimpleasyncresult.h +OUT2INC+=gio/gcancellable.h +OUT2INC+=gio/gicon.h +OUT2INC+=gio/gsimplepermission.h +OUT2INC+=gio/gcharsetconverter.h +OUT2INC+=gio/ginetaddress.h +OUT2INC+=gio/gsocket.h +OUT2INC+=gio/gcontenttype.h +OUT2INC+=gio/ginetsocketaddress.h +OUT2INC+=gio/gsocketaddress.h +OUT2INC+=gio/gconverter.h +OUT2INC+=gio/ginitable.h +OUT2INC+=gio/gsocketaddressenumerator.h +OUT2INC+=gio/gconverterinputstream.h +OUT2INC+=gio/ginputstream.h +OUT2INC+=gio/gsocketclient.h +OUT2INC+=gio/gconverteroutputstream.h +OUT2INC+=gio/gio.h +OUT2INC+=gio/gsocketconnectable.h +OUT2INC+=gio/gcredentials.h +OUT2INC+=gio/gioenums.h +OUT2INC+=gio/gsocketconnection.h +OUT2INC+=gio/gdatainputstream.h +OUT2INC+=gio/gioenumtypes.h +OUT2INC+=gio/gsocketcontrolmessage.h +OUT2INC+=gio/gdataoutputstream.h +OUT2INC+=gio/gioerror.h +OUT2INC+=gio/gsocketlistener.h +OUT2INC+=gio/gdbusaddress.h +OUT2INC+=gio/giomodule.h +OUT2INC+=gio/gsocketservice.h +OUT2INC+=gio/gdbusauthobserver.h +OUT2INC+=gio/gioscheduler.h +OUT2INC+=gio/gsrvtarget.h +OUT2INC+=gio/gdbusconnection.h +OUT2INC+=gio/giostream.h +OUT2INC+=gio/gtcpconnection.h +OUT2INC+=gio/gdbuserror.h +OUT2INC+=gio/giotypes.h +OUT2INC+=gio/gtcpwrapperconnection.h +OUT2INC+=gio/gdbusintrospection.h +OUT2INC+=gio/gloadableicon.h +OUT2INC+=gio/gthemedicon.h +OUT2INC+=gio/gdbusmessage.h +OUT2INC+=gio/gmemoryinputstream.h +OUT2INC+=gio/gthreadedsocketservice.h +OUT2INC+=gio/gdbusmethodinvocation.h +OUT2INC+=gio/gmemoryoutputstream.h +OUT2INC+=gio/gtlsbackend.h +OUT2INC+=gio/gdbusnameowning.h +OUT2INC+=gio/gmount.h +OUT2INC+=gio/gtlscertificate.h +OUT2INC+=gio/gdbusnamewatching.h +OUT2INC+=gio/gmountoperation.h +OUT2INC+=gio/gtlsclientconnection.h +OUT2INC+=gio/gdbusproxy.h +OUT2INC+=gio/gnativevolumemonitor.h +OUT2INC+=gio/gtlsconnection.h +OUT2INC+=gio/gdbusserver.h +OUT2INC+=gio/gnetworkaddress.h +OUT2INC+=gio/gtlsserverconnection.h +OUT2INC+=gio/gdbusutils.h +OUT2INC+=gio/gnetworkservice.h +OUT2INC+=gio/gvfs.h +OUT2INC+=gio/gdrive.h +OUT2INC+=gio/goutputstream.h +OUT2INC+=gio/gvolume.h +OUT2INC+=gio/gemblem.h +OUT2INC+=gio/gpermission.h +OUT2INC+=gio/gvolumemonitor.h +OUT2INC+=gio/gemblemedicon.h +OUT2INC+=gio/gpollableinputstream.h +OUT2INC+=gio/gzlibcompressor.h +OUT2INC+=gio/gfile.h +OUT2INC+=gio/gpollableoutputstream.h +OUT2INC+=gio/gzlibdecompressor.h +OUT2INC+=gio/gfileattribute.h +OUT2INC+=gio/gproxy.h +OUT2INC+=gio/gfileenumerator.h +OUT2INC+=gio/gproxyaddress.h + +OUT2INC+=glib/galloca.h +OUT2INC+=glib/gconvert.h +OUT2INC+=glib/gi18n.h +OUT2INC+=glib/goption.h +OUT2INC+=glib/gscanner.h +OUT2INC+=glib/gthreadpool.h +OUT2INC+=glib/garray.h +OUT2INC+=glib/gdataset.h +OUT2INC+=glib/giochannel.h +OUT2INC+=glib/gpattern.h +OUT2INC+=glib/gsequence.h +OUT2INC+=glib/gtimer.h +OUT2INC+=glib/gasyncqueue.h +OUT2INC+=glib/gdate.h +OUT2INC+=glib/gkeyfile.h +OUT2INC+=glib/gpoll.h +OUT2INC+=glib/gshell.h +OUT2INC+=glib/gtimezone.h +OUT2INC+=glib/gatomic.h +OUT2INC+=glib/gdatetime.h +OUT2INC+=glib/glist.h +OUT2INC+=glib/gprimes.h +OUT2INC+=glib/gslice.h +OUT2INC+=glib/gtree.h +OUT2INC+=glib/gbacktrace.h +OUT2INC+=glib/gdir.h +OUT2INC+=glib/gmacros.h +OUT2INC+=glib/gprintf.h +OUT2INC+=glib/gslist.h +OUT2INC+=glib/gtypes.h +OUT2INC+=glib/gbase64.h +OUT2INC+=glib/gerror.h +OUT2INC+=glib/gmain.h +OUT2INC+=glib/gqsort.h +OUT2INC+=glib/gspawn.h +OUT2INC+=glib/gunicode.h +OUT2INC+=glib/gbitlock.h +OUT2INC+=glib/gfileutils.h +OUT2INC+=glib/gmappedfile.h +OUT2INC+=glib/gquark.h +OUT2INC+=glib/gstdio.h +OUT2INC+=glib/gurifuncs.h +OUT2INC+=glib/gbookmarkfile.h +OUT2INC+=glib/ghash.h +OUT2INC+=glib/gmarkup.h +OUT2INC+=glib/gqueue.h +OUT2INC+=glib/gstrfuncs.h +OUT2INC+=glib/gutils.h +OUT2INC+=glib/gcache.h +OUT2INC+=glib/ghook.h +OUT2INC+=glib/gmem.h +OUT2INC+=glib/grand.h +OUT2INC+=glib/gstring.h +OUT2INC+=glib/gvariant.h +OUT2INC+=glib/gchecksum.h +OUT2INC+=glib/ghostutils.h +OUT2INC+=glib/gmessages.h +OUT2INC+=glib/gregex.h +OUT2INC+=glib/gtestutils.h +OUT2INC+=glib/gvarianttype.h +OUT2INC+=glib/gcompletion.h +OUT2INC+=glib/gi18n-lib.h +OUT2INC+=glib/gnode.h +OUT2INC+=glib/grel.h +OUT2INC+=glib/gthread.h +OUT2INC+=glib/gwin32.h + + +OUT2INC+=gobject/gbinding.h +OUT2INC+=gobject/gmarshal.h +OUT2INC+=gobject/gparamspecs.h +OUT2INC+=gobject/gtypemodule.h +OUT2INC+=gobject/gvaluecollector.h +OUT2INC+=gobject/gboxed.h +OUT2INC+=gobject/gobject.h +OUT2INC+=gobject/gsignal.h +OUT2INC+=gobject/gtypeplugin.h +OUT2INC+=gobject/gvaluetypes.h +OUT2INC+=gobject/gclosure.h +OUT2INC+=gobject/gobjectnotifyqueue.c +OUT2INC+=gobject/gsourceclosure.h +OUT2INC+=gobject/gvalue.h +OUT2INC+=gobject/genums.h +OUT2INC+=gobject/gparam.h +OUT2INC+=gobject/gtype.h +OUT2INC+=gobject/gvaluearray.h + +.ELIF "$(OS)"=="WNT" +.ELSE +.ENDIF + +# --- Targets ------------------------------------------------------ + +.INCLUDE : set_ext.mk +.INCLUDE : target.mk +.INCLUDE : tg_ext.mk + diff --git a/glib/prj/build.lst b/glib/prj/build.lst new file mode 100644 index 000000000000..4ce80753c576 --- /dev/null +++ b/glib/prj/build.lst @@ -0,0 +1,3 @@ +gl glib : gettext NULL +gl glib usr1 - all gl_mkout NULL +gl glib nmake - all gl_glib NULL diff --git a/glib/prj/d.lst b/glib/prj/d.lst new file mode 100644 index 000000000000..617b3363af31 --- /dev/null +++ b/glib/prj/d.lst @@ -0,0 +1,228 @@ +mkdir: %_DEST%\inc%_EXT%\external +..\%__SRC%\lib\libgio-2.0.0.dylib %_DEST%\lib%_EXT%\libgio-2.0.0.dylib +symlink: %_DEST%\lib%_EXT%\libgio-2.0.0.dylib %_DEST%\lib%_EXT%\libgio-2.0.dylib +..\%__SRC%\lib\libgmodule-2.0.0.dylib %_DEST%\lib%_EXT%\libgmodule-2.0.0.dylib +symlink: %_DEST%\lib%_EXT%\libgmodule-2.0.0.dylib %_DEST%\lib%_EXT%\libgmodule-2.0.dylib +..\%__SRC%\lib\libgthread-2.0.0.dylib %_DEST%\lib%_EXT%\libgthread-2.0.0.dylib +symlink: %_DEST%\lib%_EXT%\libgthread-2.0.0.dylib %_DEST%\lib%_EXT%\libgthread-2.0.dylib +..\%__SRC%\lib\libglib-2.0.0.dylib %_DEST%\lib%_EXT%\libglib-2.0.0.dylib +symlink: %_DEST%\lib%_EXT%\libglib-2.0.0.dylib %_DEST%\lib%_EXT%\libglib-2.0.dylib +..\%__SRC%\lib\libgobject-2.0.0.dylib %_DEST%\lib%_EXT%\libgobject-2.0.0.dylib +symlink: %_DEST%\lib%_EXT%\libgobject-2.0.0.dylib %_DEST%\lib%_EXT%\libgobject-2.0.dylib +..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT% + +mkdir: %_DEST%\inc%_EXT%\external\gio-unix-2.0 +mkdir: %_DEST%\inc%_EXT%\external\gio-unix-2.0\gio +..\%__SRC%\inc\gdesktopappinfo.h %_DEST%\inc%_EXT%\external\gio-unix-2.0\gio\gdesktopappinfo.h +..\%__SRC%\inc\gunixcredentialsmessage.h %_DEST%\inc%_EXT%\external\gio-unix-2.0\gio\gunixcredentialsmessage.h +..\%__SRC%\inc\gunixinputstream.h %_DEST%\inc%_EXT%\external\gio-unix-2.0\gio\gunixinputstream.h +..\%__SRC%\inc\gunixsocketaddress.h %_DEST%\inc%_EXT%\external\gio-unix-2.0\gio\gunixsocketaddress.h +..\%__SRC%\inc\gfiledescriptorbased.h %_DEST%\inc%_EXT%\external\gio-unix-2.0\gio\gfiledescriptorbased.h +..\%__SRC%\inc\gunixfdlist.h %_DEST%\inc%_EXT%\external\gio-unix-2.0\gio\gunixfdlist.h +..\%__SRC%\inc\gunixmounts.h %_DEST%\inc%_EXT%\external\gio-unix-2.0\gio\gunixmounts.h +..\%__SRC%\inc\gunixconnection.h %_DEST%\inc%_EXT%\external\gio-unix-2.0\gio\gunixconnection.h +..\%__SRC%\inc\gunixfdmessage.h %_DEST%\inc%_EXT%\external\gio-unix-2.0\gio\gunixfdmessage.h +..\%__SRC%\inc\gunixoutputstream.h %_DEST%\inc%_EXT%\external\gio-unix-2.0\gio\gunixoutputstream.h + +mkdir: %_DEST%\inc%_EXT%\external\glib-2.0 +..\%__SRC%\inc\glib-object.h %_DEST%\inc%_EXT%\external\glib-2.0\glib-object.h +..\%__SRC%\inc\glib.h %_DEST%\inc%_EXT%\external\glib-2.0\glib.h +..\%__SRC%\inc\gmodule.h %_DEST%\inc%_EXT%\external\glib-2.0\gmodule.h + +mkdir: %_DEST%\inc%_EXT%\external\glib-2.0\gio +..\%__SRC%\inc\gaction.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gaction.h +..\%__SRC%\inc\gfileicon.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gfileicon.h +..\%__SRC%\inc\gproxyaddressenumerator.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gproxyaddressenumerator.h +..\%__SRC%\inc\gactiongroup.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gactiongroup.h +..\%__SRC%\inc\gfileinfo.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gfileinfo.h +..\%__SRC%\inc\gproxyresolver.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gproxyresolver.h +..\%__SRC%\inc\gappinfo.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gappinfo.h +..\%__SRC%\inc\gfileinputstream.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gfileinputstream.h +..\%__SRC%\inc\gresolver.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gresolver.h +..\%__SRC%\inc\gapplication.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gapplication.h +..\%__SRC%\inc\gfileiostream.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gfileiostream.h +..\%__SRC%\inc\gseekable.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gseekable.h +..\%__SRC%\inc\gapplicationcommandline.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gapplicationcommandline.h +..\%__SRC%\inc\gfilemonitor.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gfilemonitor.h +..\%__SRC%\inc\gsettings.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gsettings.h +..\%__SRC%\inc\gasyncinitable.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gasyncinitable.h +..\%__SRC%\inc\gfilenamecompleter.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gfilenamecompleter.h +..\%__SRC%\inc\gsettingsbackend.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gsettingsbackend.h +..\%__SRC%\inc\gasyncresult.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gasyncresult.h +..\%__SRC%\inc\gfileoutputstream.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gfileoutputstream.h +..\%__SRC%\inc\gsimpleaction.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gsimpleaction.h +..\%__SRC%\inc\gbufferedinputstream.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gbufferedinputstream.h +..\%__SRC%\inc\gfilterinputstream.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gfilterinputstream.h +..\%__SRC%\inc\gsimpleactiongroup.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gsimpleactiongroup.h +..\%__SRC%\inc\gbufferedoutputstream.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gbufferedoutputstream.h +..\%__SRC%\inc\gfilteroutputstream.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gfilteroutputstream.h +..\%__SRC%\inc\gsimpleasyncresult.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gsimpleasyncresult.h +..\%__SRC%\inc\gcancellable.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gcancellable.h +..\%__SRC%\inc\gicon.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gicon.h +..\%__SRC%\inc\gsimplepermission.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gsimplepermission.h +..\%__SRC%\inc\gcharsetconverter.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gcharsetconverter.h +..\%__SRC%\inc\ginetaddress.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\ginetaddress.h +..\%__SRC%\inc\gsocket.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gsocket.h +..\%__SRC%\inc\gcontenttype.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gcontenttype.h +..\%__SRC%\inc\ginetsocketaddress.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\ginetsocketaddress.h +..\%__SRC%\inc\gsocketaddress.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gsocketaddress.h +..\%__SRC%\inc\gconverter.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gconverter.h +..\%__SRC%\inc\ginitable.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\ginitable.h +..\%__SRC%\inc\gsocketaddressenumerator.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gsocketaddressenumerator.h +..\%__SRC%\inc\gconverterinputstream.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gconverterinputstream.h +..\%__SRC%\inc\ginputstream.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\ginputstream.h +..\%__SRC%\inc\gsocketclient.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gsocketclient.h +..\%__SRC%\inc\gconverteroutputstream.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gconverteroutputstream.h +..\%__SRC%\inc\gio.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gio.h +..\%__SRC%\inc\gsocketconnectable.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gsocketconnectable.h +..\%__SRC%\inc\gcredentials.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gcredentials.h +..\%__SRC%\inc\gioenums.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gioenums.h +..\%__SRC%\inc\gsocketconnection.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gsocketconnection.h +..\%__SRC%\inc\gdatainputstream.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gdatainputstream.h +..\%__SRC%\inc\gioenumtypes.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gioenumtypes.h +..\%__SRC%\inc\gsocketcontrolmessage.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gsocketcontrolmessage.h +..\%__SRC%\inc\gdataoutputstream.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gdataoutputstream.h +..\%__SRC%\inc\gioerror.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gioerror.h +..\%__SRC%\inc\gsocketlistener.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gsocketlistener.h +..\%__SRC%\inc\gdbusaddress.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gdbusaddress.h +..\%__SRC%\inc\giomodule.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\giomodule.h +..\%__SRC%\inc\gsocketservice.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gsocketservice.h +..\%__SRC%\inc\gdbusauthobserver.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gdbusauthobserver.h +..\%__SRC%\inc\gioscheduler.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gioscheduler.h +..\%__SRC%\inc\gsrvtarget.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gsrvtarget.h +..\%__SRC%\inc\gdbusconnection.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gdbusconnection.h +..\%__SRC%\inc\giostream.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\giostream.h +..\%__SRC%\inc\gtcpconnection.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gtcpconnection.h +..\%__SRC%\inc\gdbuserror.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gdbuserror.h +..\%__SRC%\inc\giotypes.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\giotypes.h +..\%__SRC%\inc\gtcpwrapperconnection.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gtcpwrapperconnection.h +..\%__SRC%\inc\gdbusintrospection.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gdbusintrospection.h +..\%__SRC%\inc\gloadableicon.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gloadableicon.h +..\%__SRC%\inc\gthemedicon.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gthemedicon.h +..\%__SRC%\inc\gdbusmessage.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gdbusmessage.h +..\%__SRC%\inc\gmemoryinputstream.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gmemoryinputstream.h +..\%__SRC%\inc\gthreadedsocketservice.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gthreadedsocketservice.h +..\%__SRC%\inc\gdbusmethodinvocation.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gdbusmethodinvocation.h +..\%__SRC%\inc\gmemoryoutputstream.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gmemoryoutputstream.h +..\%__SRC%\inc\gtlsbackend.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gtlsbackend.h +..\%__SRC%\inc\gdbusnameowning.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gdbusnameowning.h +..\%__SRC%\inc\gmount.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gmount.h +..\%__SRC%\inc\gtlscertificate.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gtlscertificate.h +..\%__SRC%\inc\gdbusnamewatching.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gdbusnamewatching.h +..\%__SRC%\inc\gmountoperation.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gmountoperation.h +..\%__SRC%\inc\gtlsclientconnection.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gtlsclientconnection.h +..\%__SRC%\inc\gdbusproxy.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gdbusproxy.h +..\%__SRC%\inc\gnativevolumemonitor.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gnativevolumemonitor.h +..\%__SRC%\inc\gtlsconnection.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gtlsconnection.h +..\%__SRC%\inc\gdbusserver.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gdbusserver.h +..\%__SRC%\inc\gnetworkaddress.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gnetworkaddress.h +..\%__SRC%\inc\gtlsserverconnection.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gtlsserverconnection.h +..\%__SRC%\inc\gdbusutils.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gdbusutils.h +..\%__SRC%\inc\gnetworkservice.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gnetworkservice.h +..\%__SRC%\inc\gvfs.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gvfs.h +..\%__SRC%\inc\gdrive.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gdrive.h +..\%__SRC%\inc\goutputstream.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\goutputstream.h +..\%__SRC%\inc\gvolume.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gvolume.h +..\%__SRC%\inc\gemblem.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gemblem.h +..\%__SRC%\inc\gpermission.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gpermission.h +..\%__SRC%\inc\gvolumemonitor.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gvolumemonitor.h +..\%__SRC%\inc\gemblemedicon.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gemblemedicon.h +..\%__SRC%\inc\gpollableinputstream.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gpollableinputstream.h +..\%__SRC%\inc\gzlibcompressor.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gzlibcompressor.h +..\%__SRC%\inc\gfile.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gfile.h +..\%__SRC%\inc\gpollableoutputstream.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gpollableoutputstream.h +..\%__SRC%\inc\gzlibdecompressor.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gzlibdecompressor.h +..\%__SRC%\inc\gfileattribute.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gfileattribute.h +..\%__SRC%\inc\gproxy.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gproxy.h +..\%__SRC%\inc\gfileenumerator.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gfileenumerator.h +..\%__SRC%\inc\gproxyaddress.h %_DEST%\inc%_EXT%\external\glib-2.0\gio\gproxyaddress.h + +mkdir: %_DEST%\inc%_EXT%\external\glib-2.0\glib + +..\%__SRC%\inc\galloca.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\galloca.h +..\%__SRC%\inc\gconvert.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gconvert.h +..\%__SRC%\inc\gi18n.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gi18n.h +..\%__SRC%\inc\goption.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\goption.h +..\%__SRC%\inc\gscanner.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gscanner.h +..\%__SRC%\inc\gthreadpool.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gthreadpool.h +..\%__SRC%\inc\garray.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\garray.h +..\%__SRC%\inc\gdataset.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gdataset.h +..\%__SRC%\inc\giochannel.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\giochannel.h +..\%__SRC%\inc\gpattern.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gpattern.h +..\%__SRC%\inc\gsequence.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gsequence.h +..\%__SRC%\inc\gtimer.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gtimer.h +..\%__SRC%\inc\gasyncqueue.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gasyncqueue.h +..\%__SRC%\inc\gdate.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gdate.h +..\%__SRC%\inc\gkeyfile.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gkeyfile.h +..\%__SRC%\inc\gpoll.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gpoll.h +..\%__SRC%\inc\gshell.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gshell.h +..\%__SRC%\inc\gtimezone.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gtimezone.h +..\%__SRC%\inc\gatomic.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gatomic.h +..\%__SRC%\inc\gdatetime.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gdatetime.h +..\%__SRC%\inc\glist.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\glist.h +..\%__SRC%\inc\gprimes.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gprimes.h +..\%__SRC%\inc\gslice.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gslice.h +..\%__SRC%\inc\gtree.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gtree.h +..\%__SRC%\inc\gbacktrace.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gbacktrace.h +..\%__SRC%\inc\gdir.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gdir.h +..\%__SRC%\inc\gmacros.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gmacros.h +..\%__SRC%\inc\gprintf.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gprintf.h +..\%__SRC%\inc\gslist.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gslist.h +..\%__SRC%\inc\gtypes.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gtypes.h +..\%__SRC%\inc\gbase64.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gbase64.h +..\%__SRC%\inc\gerror.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gerror.h +..\%__SRC%\inc\gmain.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gmain.h +..\%__SRC%\inc\gqsort.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gqsort.h +..\%__SRC%\inc\gspawn.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gspawn.h +..\%__SRC%\inc\gunicode.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gunicode.h +..\%__SRC%\inc\gbitlock.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gbitlock.h +..\%__SRC%\inc\gfileutils.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gfileutils.h +..\%__SRC%\inc\gmappedfile.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gmappedfile.h +..\%__SRC%\inc\gquark.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gquark.h +..\%__SRC%\inc\gstdio.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gstdio.h +..\%__SRC%\inc\gurifuncs.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gurifuncs.h +..\%__SRC%\inc\gbookmarkfile.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gbookmarkfile.h +..\%__SRC%\inc\ghash.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\ghash.h +..\%__SRC%\inc\gmarkup.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gmarkup.h +..\%__SRC%\inc\gqueue.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gqueue.h +..\%__SRC%\inc\gstrfuncs.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gstrfuncs.h +..\%__SRC%\inc\gutils.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gutils.h +..\%__SRC%\inc\gcache.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gcache.h +..\%__SRC%\inc\ghook.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\ghook.h +..\%__SRC%\inc\gmem.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gmem.h +..\%__SRC%\inc\grand.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\grand.h +..\%__SRC%\inc\gstring.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gstring.h +..\%__SRC%\inc\gvariant.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gvariant.h +..\%__SRC%\inc\gchecksum.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gchecksum.h +..\%__SRC%\inc\ghostutils.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\ghostutils.h +..\%__SRC%\inc\gmessages.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gmessages.h +..\%__SRC%\inc\gregex.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gregex.h +..\%__SRC%\inc\gtestutils.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gtestutils.h +..\%__SRC%\inc\gvarianttype.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gvarianttype.h +..\%__SRC%\inc\gcompletion.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gcompletion.h +..\%__SRC%\inc\gi18n-lib.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gi18n-lib.h +..\%__SRC%\inc\gnode.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gnode.h +..\%__SRC%\inc\grel.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\grel.h +..\%__SRC%\inc\gthread.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gthread.h +..\%__SRC%\inc\gwin32.h %_DEST%\inc%_EXT%\external\glib-2.0\glib\gwin32.h + +mkdir: %_DEST%\inc%_EXT%\external\glib-2.0\gobject +..\%__SRC%\inc\gbinding.h %_DEST%\inc%_EXT%\external\glib-2.0\gobject\gbinding.h +..\%__SRC%\inc\gmarshal.h %_DEST%\inc%_EXT%\external\glib-2.0\gobject\gmarshal.h +..\%__SRC%\inc\gparamspecs.h %_DEST%\inc%_EXT%\external\glib-2.0\gobject\gparamspecs.h +..\%__SRC%\inc\gtypemodule.h %_DEST%\inc%_EXT%\external\glib-2.0\gobject\gtypemodule.h +..\%__SRC%\inc\gvaluecollector.h %_DEST%\inc%_EXT%\external\glib-2.0\gobject\gvaluecollector.h +..\%__SRC%\inc\gboxed.h %_DEST%\inc%_EXT%\external\glib-2.0\gobject\gboxed.h +..\%__SRC%\inc\gobject.h %_DEST%\inc%_EXT%\external\glib-2.0\gobject\gobject.h +..\%__SRC%\inc\gsignal.h %_DEST%\inc%_EXT%\external\glib-2.0\gobject\gsignal.h +..\%__SRC%\inc\gtypeplugin.h %_DEST%\inc%_EXT%\external\glib-2.0\gobject\gtypeplugin.h +..\%__SRC%\inc\gvaluetypes.h %_DEST%\inc%_EXT%\external\glib-2.0\gobject\gvaluetypes.h +..\%__SRC%\inc\gclosure.h %_DEST%\inc%_EXT%\external\glib-2.0\gobject\gclosure.h +..\%__SRC%\inc\gobjectnotifyqueue.c %_DEST%\inc%_EXT%\external\glib-2.0\gobject\gobjectnotifyqueue.c +..\%__SRC%\inc\gsourceclosure.h %_DEST%\inc%_EXT%\external\glib-2.0\gobject\gsourceclosure.h +..\%__SRC%\inc\gvalue.h %_DEST%\inc%_EXT%\external\glib-2.0\gobject\gvalue.h +..\%__SRC%\inc\genums.h %_DEST%\inc%_EXT%\external\glib-2.0\gobject\genums.h +..\%__SRC%\inc\gparam.h %_DEST%\inc%_EXT%\external\glib-2.0\gobject\gparam.h +..\%__SRC%\inc\gtype.h %_DEST%\inc%_EXT%\external\glib-2.0\gobject\gtype.h +..\%__SRC%\inc\gvaluearray.h %_DEST%\inc%_EXT%\external\glib-2.0\gobject\gvaluearray.h + -- cgit v1.2.3 From cd116c549ccf5a3c2d259f8c3b608e1cdf905b76 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 28 Feb 2011 15:13:17 +0100 Subject: rsvglibs: add missing header --- glib/makefile.mk | 1 + glib/prj/d.lst | 1 + 2 files changed, 2 insertions(+) diff --git a/glib/makefile.mk b/glib/makefile.mk index 44edca5af323..99012a7778bd 100644 --- a/glib/makefile.mk +++ b/glib/makefile.mk @@ -73,6 +73,7 @@ OUT2LIB+=gthread/.libs/libgthread-2.0.0.dylib OUT2INC+=glib/glib.h OUT2INC+=glib/glib-object.h +OUT2INC+=glib/glibconfig.h OUT2INC+=gmodule/gmodule.h OUT2INC+=gio/gdesktopappinfo.h diff --git a/glib/prj/d.lst b/glib/prj/d.lst index 617b3363af31..27585318ac6f 100644 --- a/glib/prj/d.lst +++ b/glib/prj/d.lst @@ -27,6 +27,7 @@ mkdir: %_DEST%\inc%_EXT%\external\gio-unix-2.0\gio mkdir: %_DEST%\inc%_EXT%\external\glib-2.0 ..\%__SRC%\inc\glib-object.h %_DEST%\inc%_EXT%\external\glib-2.0\glib-object.h ..\%__SRC%\inc\glib.h %_DEST%\inc%_EXT%\external\glib-2.0\glib.h +..\%__SRC%\inc\glibconfig.h %_DEST%\inc%_EXT%\external\glib-2.0\glibconfig.h ..\%__SRC%\inc\gmodule.h %_DEST%\inc%_EXT%\external\glib-2.0\gmodule.h mkdir: %_DEST%\inc%_EXT%\external\glib-2.0\gio -- cgit v1.2.3 From e53bc0fef9c615804b922c548b64bf9160ebb67f Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 28 Feb 2011 17:55:46 +0100 Subject: fwk167: #i87606# Return correct result from event selection dialog when clicking on Cancel --- cui/source/customize/macropg.cxx | 2 +- extensions/source/propctrlr/eventhandler.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 3d0763b8d378..5030e44832eb 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -954,7 +954,7 @@ IMPL_LINK( SvxMacroAssignSingleTabDialog, OKHdl_Impl, Button *, pButton ) { (void)pButton; //unused pPage->FillItemSet( *pOutSet ); - EndDialog( RET_CANCEL ); + EndDialog( RET_OK ); return 0; } diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx index 24fb4e8b88db..90c3931c60b5 100644 --- a/extensions/source/propctrlr/eventhandler.cxx +++ b/extensions/source/propctrlr/eventhandler.cxx @@ -940,7 +940,7 @@ namespace pcr // DF definite problem here // OK & Cancel seem to be both returning 0 - if ( pDialog->Execute() != 0 ) + if ( pDialog->Execute() == RET_CANCEL ) return InteractiveSelectionResult_Cancelled; try -- cgit v1.2.3 From 292b6263e29f4cd0ac3455900f43f2e38a1972c2 Mon Sep 17 00:00:00 2001 From: ka Date: Tue, 1 Mar 2011 00:53:07 +0100 Subject: rsvglibs: added external library libpng --- libpng/libpng.patch | 53 +++++++++++++++++++++++++++++++++++++++++ libpng/makefile.mk | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++ libpng/prj/build.lst | 3 +++ libpng/prj/d.lst | 12 ++++++++++ 4 files changed, 135 insertions(+) create mode 100644 libpng/libpng.patch create mode 100644 libpng/makefile.mk create mode 100644 libpng/prj/build.lst create mode 100644 libpng/prj/d.lst diff --git a/libpng/libpng.patch b/libpng/libpng.patch new file mode 100644 index 000000000000..c7c8c05d753f --- /dev/null +++ b/libpng/libpng.patch @@ -0,0 +1,53 @@ +--- misc/libpng/makefile.mk 2011-03-01 00:01:58.221734678 +0100 ++++ misc/build/libpng/makefile.mk 2011-02-28 23:52:40.953319424 +0100 +@@ -1 +1,49 @@ +-dummy ++#************************************************************************* ++# ++# Copyright according the GNU Public License. ++# ++#************************************************************************* ++ ++PRJ=..$/..$/..$/.. ++ ++PRJNAME=libpng ++TARGET=libpng ++LIBTARGET=NO ++EXTERNAL_WARNINGS_NOT_ERRORS=TRUE ++VISIBILITY_HIDDEN=TRUE ++ ++# --- Settings ----------------------------------------------------------- ++ ++.INCLUDE : settings.mk ++ ++ ++.IF "$(GUI)$(CPU)"=="WNTP" ++CFLAGS=$(CFLAGS) -Od ++.ENDIF ++ ++# --- Files -------------------------------------------------------- ++ ++SLOFILES= $(SLO)$/png.c \ ++ $(SLO)$/pngerror.c \ ++ $(SLO)$/pngget.c \ ++ $(SLO)$/pngmem.c \ ++ $(SLO)$/pngpread.c \ ++ $(SLO)$/pngread.c \ ++ $(SLO)$/pngrio.c \ ++ $(SLO)$/pngrtran.c \ ++ $(SLO)$/pngrutil.c \ ++ $(SLO)$/pngset.c \ ++ $(SLO)$/pngtest.c \ ++ $(SLO)$/pngtrans.c \ ++ $(SLO)$/pngvalid.c \ ++ $(SLO)$/pngwio.c \ ++ $(SLO)$/pngwrite.c \ ++ $(SLO)$/pngwtran.c \ ++ $(SLO)$/pngwutil.c ++ ++LIB1TARGET=$(SLB)$/$(TARGET).lib ++LIB1ARCHIV=$(LB)$/lib$(TARGET).a ++LIB1OBJFILES=$(SLOFILES) ++ ++.INCLUDE : target.mk ++ diff --git a/libpng/makefile.mk b/libpng/makefile.mk new file mode 100644 index 000000000000..536ad653400f --- /dev/null +++ b/libpng/makefile.mk @@ -0,0 +1,67 @@ +#************************************************************************* +# +# 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=libpng +TARGET=libpng + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +.IF "$(SYSTEM_LIBPNG)" == "YES" +all: + @echo "An already available installation of libpng should exist on your system." + @echo "Therefore the version provided here does not need to be built in addition." +.ENDIF + +# --- Files -------------------------------------------------------- + +LIBPNGVERSION=1.5.1 + +TARFILE_NAME=$(PRJNAME)-$(LIBPNGVERSION) +TARFILE_MD5=220035f111ea045a51e290906025e8b5 + +PATCH_FILES=libpng.patch +ADDITIONAL_FILES=makefile.mk + +#relative to CONFIGURE_DIR + +BUILD_DIR=$(CONFIGURE_DIR) +BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS) + +OUT2INC=png.h \ + pngconfig.h \ + pnglibconfig.h + +# --- Targets ------------------------------------------------------ + +.INCLUDE : set_ext.mk +.INCLUDE : target.mk +.INCLUDE : tg_ext.mk + diff --git a/libpng/prj/build.lst b/libpng/prj/build.lst new file mode 100644 index 000000000000..2b1bdf719e74 --- /dev/null +++ b/libpng/prj/build.lst @@ -0,0 +1,3 @@ +lpng libpng : ZLIB:zlib soltools NULL +lpng libpng usr1 - all lpng_mkout NULL +lpng libpng nmake - all lpng_libpng NULL diff --git a/libpng/prj/d.lst b/libpng/prj/d.lst new file mode 100644 index 000000000000..d6b93628d305 --- /dev/null +++ b/libpng/prj/d.lst @@ -0,0 +1,12 @@ +mkdir: %_DEST%\inc%_EXT%\libpng +..\%__SRC%\inc\png*.h %_DEST%\inc%_EXT%\libpng\png*.h + +..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%\lib*.so +..\%__SRC%\lib\lib*.so.* %_DEST%\lib%_EXT%\lib*.so.* +..\%__SRC%\lib\lib*.dylib %_DEST%\lib%_EXT%\lib*.dylib +..\%__SRC%\lib\lib*.a %_DEST%\lib%_EXT%\lib*.a +..\%__SRC%\lib\lib*.la %_DEST%\lib%_EXT%\lib*.la +..\%__SRC%\lib\*.lib %_DEST%\lib%_EXT%\*.lib +..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll +..\%__SRC%\lib\*.dll %_DEST%\bin%_EXT%\*.dll +..\%__SRC%\bin\*.dll.a %_DEST%\lib%_EXT%\*.a -- cgit v1.2.3 From c5606586d93b4a2b7307e54747922efbe0ebeca7 Mon Sep 17 00:00:00 2001 From: ka Date: Tue, 1 Mar 2011 00:53:07 +0100 Subject: rsvglibs: added external library libpng --- ooo.lst | 1 + 1 file changed, 1 insertion(+) diff --git a/ooo.lst b/ooo.lst index 8ce65c13acfc..1de8da966035 100755 --- a/ooo.lst +++ b/ooo.lst @@ -75,3 +75,4 @@ eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip ff369e69ef0f0143beb5626164e87ae2-neon-0.29.5.tar.gz +220035f111ea045a51e290906025e8b5-libpng-1.5.1.tar.gz -- cgit v1.2.3 From 4a60626eca6de41b6af0084acb387a49d1943390 Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Tue, 1 Mar 2011 09:14:51 +0100 Subject: rsvglibs: add freetype --- freetype/freetype-2.4.4.patch | 70 +++++++++++++++++++++++++++++++++++++++++++ freetype/makefile.mk | 64 +++++++++++++++++++++++++++++++++++++++ freetype/prj/build.lst | 3 ++ freetype/prj/d.lst | 3 ++ 4 files changed, 140 insertions(+) create mode 100644 freetype/freetype-2.4.4.patch create mode 100644 freetype/makefile.mk create mode 100644 freetype/prj/build.lst create mode 100644 freetype/prj/d.lst diff --git a/freetype/freetype-2.4.4.patch b/freetype/freetype-2.4.4.patch new file mode 100644 index 000000000000..6c98960431de --- /dev/null +++ b/freetype/freetype-2.4.4.patch @@ -0,0 +1,70 @@ +--- misc/freetype-2.4.4/config.mk Wed Aug 20 14:33:55 2008 ++++ misc/build/freetype-2.4.4/config.mk Wed Aug 20 14:26:42 2008 +@@ -1 +1,41 @@ +-dummy ++# ++# FreeType 2 configuration rules for a `normal' pseudo ANSI compiler/system ++# ++ ++ ++# Copyright 1996-2000 by ++# David Turner, Robert Wilhelm, and Werner Lemberg. ++# ++# This file is part of the FreeType project, and may only be used, modified, ++# and distributed under the terms of the FreeType project license, ++# LICENSE.TXT. By continuing to use, modify, or distribute this file you ++# indicate that you have read the license and understand and accept it ++# fully. ++all modules: setup ++PLATFORM := win32 ++CPPFLAGS ?= /DNDEBUG /DWIN32 /D_LIB /D_CRT_SECURE_NO_WARNINGS $(SOLARINC) ++ ++include $(TOP_DIR)/builds/win32/win32-def.mk ++ ++DELETE := rm -f ++CAT := cat ++SEP := / ++BUILD_PROJECT := yes ++COPY := cp ++visualc: setup ++ ++include $(TOP_DIR)/builds/compiler/visualc.mk ++include $(TOP_DIR)/builds/$(PROJECT).mk ++LINK_LIBRARY = link /DLL /nologo /out:$(subst /,$(COMPILER_SEP),../../../bin/$(PROJECT).dll $(OBJECTS_LIST)) ++exported_symbols: ++ echo test ++ ++$(PROJECT_LIBRARY): $(OBJECTS_LIST) ++ $(LINK_LIBRARY) ++ ++ ++# include $(TOP_DIR)/builds/link_dos.mk ++ ++ ++# EOF ++ +--- misc/freetype-2.4.4/objs/ftmodule.h Wed Aug 20 14:33:55 2008 ++++ misc/build/freetype-2.4.4/objs/ftmodule.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,21 @@ +-dummy ++/* This is a generated file. */ ++FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) ++FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) ++FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) ++FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) ++FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) ++FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) ++FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) ++FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) ++FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) ++FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) ++FT_USE_MODULE( FT_Module_Class, autofit_module_class ) ++FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) ++FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) ++FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) ++FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class ) ++FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class ) ++FT_USE_MODULE( FT_Module_Class, psaux_module_class ) ++FT_USE_MODULE( FT_Module_Class, psnames_module_class ) ++/* EOF */ ++ diff --git a/freetype/makefile.mk b/freetype/makefile.mk new file mode 100644 index 000000000000..ff7df7e51ec4 --- /dev/null +++ b/freetype/makefile.mk @@ -0,0 +1,64 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ=. + +PRJNAME=so_freetype +TARGET=so_freetype + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +.IF "$(SYSTEM_FREETYPE)" == "YES" +all: + @echo "An already available installation of freetype should exist on your system." + @echo "Therefore the version provided here does not need to be built in addition." +.ENDIF + +# --- Files -------------------------------------------------------- + +TARFILE_NAME=freetype-2.4.4 +TARFILE_MD5=9273efacffb683483e58a9e113efae9f + +CONFIGURE_DIR= +.IF "$(OS)"=="WNT" +CONFIGURE_ACTION= +ADDITIONAL_FILES=config.mk \ + objs/ftmodule.h +PATCH_FILES=freetype-2.4.4.patch +.ELSE +CONFIGURE_ACTION=.$/configure +.ENDIF + +BUILD_ACTION=make + +# --- Targets ------------------------------------------------------ + +.INCLUDE : set_ext.mk +.INCLUDE : target.mk +.INCLUDE : tg_ext.mk diff --git a/freetype/prj/build.lst b/freetype/prj/build.lst new file mode 100644 index 000000000000..fcd927e4d764 --- /dev/null +++ b/freetype/prj/build.lst @@ -0,0 +1,3 @@ +ep freetype : soltools NULL +ep freetype usr1 - all ep_mkout NULL +ep freetype nmake - all ep_freetype NULL diff --git a/freetype/prj/d.lst b/freetype/prj/d.lst new file mode 100644 index 000000000000..2d7792240e92 --- /dev/null +++ b/freetype/prj/d.lst @@ -0,0 +1,3 @@ +mkdir: %_DEST%\inc%_EXT%\external\freetpye +..\%__SRC%\bin\freetype-2.4.4.dll %_DEST%\bin%_EXT%\freetype-2.4.4.dll + -- cgit v1.2.3 From 20dc7550d91515a71646dd3865934c20db8a8b6d Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Tue, 1 Mar 2011 14:05:40 +0100 Subject: calc66: #i114511# don't count cursor movement or clipboard copy as modification when editing a cell --- sc/source/ui/app/inputhdl.cxx | 9 ++++++--- sc/source/ui/inc/inputhdl.hxx | 2 +- sc/source/ui/view/editsh.cxx | 5 ++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index ed4971fa00ee..429ecc4a3445 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -2092,7 +2092,7 @@ sal_Bool ScInputHandler::DataChanging( sal_Unicode cTyped, sal_Bool bFromCommand return sal_False; } -void ScInputHandler::DataChanged( sal_Bool bFromTopNotify ) +void ScInputHandler::DataChanged( sal_Bool bFromTopNotify, sal_Bool bSetModified ) { ImplCreateEditEngine(); @@ -2111,7 +2111,8 @@ void ScInputHandler::DataChanged( sal_Bool bFromTopNotify ) pTopView->ShowCursor(); } - bModified = sal_True; + if (bSetModified) + bModified = sal_True; bSelIsRef = sal_False; if ( pRangeFindList && !bInRangeUpdate ) @@ -3202,7 +3203,9 @@ sal_Bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, sal_Bool bStartEdit /* } } - DataChanged(); // ruft auch UpdateParenthesis() + // #i114511# don't count cursor keys as modification + sal_Bool bSetModified = !bCursorKey; + DataChanged(sal_False, bSetModified); // also calls UpdateParenthesis() InvalidateAttribs(); //! in DataChanged ? } } diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx index 8291877bbc57..9f745b4cd96c 100644 --- a/sc/source/ui/inc/inputhdl.hxx +++ b/sc/source/ui/inc/inputhdl.hxx @@ -211,7 +211,7 @@ public: EditView* GetTopView() { return pTopView; } sal_Bool DataChanging( sal_Unicode cTyped = 0, sal_Bool bFromCommand = sal_False ); - void DataChanged( sal_Bool bFromTopNotify = sal_False ); + void DataChanged( sal_Bool bFromTopNotify = sal_False, sal_Bool bSetModified = sal_True ); sal_Bool TakesReturn() const { return ( nTipVisible != 0 ); } diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index e07e15267198..f75ebcbe770f 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -199,6 +199,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) pHdl->DataChanging(); sal_Bool bSetSelIsRef = sal_False; + sal_Bool bSetModified = sal_True; switch ( nSlot ) { @@ -234,6 +235,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) case SID_COPY: pTableView->Copy(); + bSetModified = sal_False; break; case SID_CUT: @@ -334,6 +336,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) if (pTopView) pTopView->SetSelection(ESelection(0,0,nPar-1,nLen)); } + bSetModified = sal_False; } break; @@ -615,7 +618,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) break; } - pHdl->DataChanged(); + pHdl->DataChanged(sal_False, bSetModified); if (bSetSelIsRef) pHdl->SetSelIsRef(sal_True); } -- cgit v1.2.3 From bb1f58728aba7f2cdc8d0c1178caf13a7f675b4c Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 1 Mar 2011 15:04:30 +0100 Subject: rsvglibs: add gdk-pixbuf dependency --- gdk-pixbuf/gdk-pixbuf-2.23.0.patch | 24 ++++++++++ gdk-pixbuf/makefile.mk | 97 ++++++++++++++++++++++++++++++++++++++ gdk-pixbuf/prj/build.lst | 3 ++ gdk-pixbuf/prj/d.lst | 18 +++++++ gettext/makefile.mk | 1 + glib/makefile.mk | 1 + 6 files changed, 144 insertions(+) create mode 100644 gdk-pixbuf/gdk-pixbuf-2.23.0.patch create mode 100644 gdk-pixbuf/makefile.mk create mode 100644 gdk-pixbuf/prj/build.lst create mode 100644 gdk-pixbuf/prj/d.lst diff --git a/gdk-pixbuf/gdk-pixbuf-2.23.0.patch b/gdk-pixbuf/gdk-pixbuf-2.23.0.patch new file mode 100644 index 000000000000..1bff29333b62 --- /dev/null +++ b/gdk-pixbuf/gdk-pixbuf-2.23.0.patch @@ -0,0 +1,24 @@ +--- misc/gdk-pixbuf-2.23.0/configure 2010-12-23 15:18:11.000000000 +0100 ++++ misc/build/gdk-pixbuf-2.23.0/configure 2011-02-28 18:49:26.000000000 +0100 +@@ -16839,7 +16839,7 @@ + + + +- ++if 0; then + + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then +@@ -17158,7 +17158,11 @@ + + + rm -f conf.glibtest +- ++else ++ GLIB_MKENUMS=glib-mkenums ++ GLIB_GENMARSHAL=glib-genmarshal ++ GOBJECT_QUERY=gobject-query ++fi + + # See if it's safe to turn G_DISABLE_DEPRECATED on. + GLIB_VERSION_MAJOR_MINOR=`$PKG_CONFIG --modversion glib-2.0 | sed "s/\.[^.]*\$//"` diff --git a/gdk-pixbuf/makefile.mk b/gdk-pixbuf/makefile.mk new file mode 100644 index 000000000000..fca747e22c13 --- /dev/null +++ b/gdk-pixbuf/makefile.mk @@ -0,0 +1,97 @@ +#************************************************************************* +# +# 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=gdk-pixbuf +TARGET=so_gdk-pixbuf + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +.IF "$(SYSTEM_GDKPIXBUF)" == "YES" +all: + @echo "An already available installation of gdk-pixbuf should exist on your system." + @echo "Therefore the version provided here does not need to be built in addition." +.ENDIF + +# --- Files -------------------------------------------------------- + +GDKPIXBUFVERSION=2.23.0 + +TARFILE_NAME=$(PRJNAME)-$(GDKPIXBUFVERSION) +TARFILE_MD5=a7d6c5f2fe2d481149ed3ba807b5c043 + +PATCH_FILES=gdk-pixbuf-2.23.0.patch + +CONFIGURE_DIR= +CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) \ + BASE_DEPENDENCIES_CFLAGS="-I$(SOLARINCDIR)$/external -I$(SOLARINCDIR)$/external/glib-2.0" \ + BASE_DEPENDENCIES_LIBS=" " \ + .$/configure \ + --prefix=$(SRC_ROOT)$/$(PRJNAME)$/$(MISC) \ + CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS) -I$(SOLARINCDIR)$/external -I$(SOLARINCDIR)$/external/glib-2.0" \ + LDFLAGS="-L$(SOLARLIBDIR) -lgobject-2.0 -lgio-2.0 -lgthread-2.0 -lgmodule-2.0 -lglib-2.0 -lintl" \ + --disable-glibtest \ + --without-libtiff \ + --without-libjpeg \ + --without-libpng + +## FIXME: libtiff, libjpeg, libpng + +CONFIGURE_FLAGS=$(eq,$(OS),MACOSX CPPFLAGS="$(EXTRA_CDEFS)" $(NULL)) + +BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) \ + $(GNUMAKE) +BUILD_DIR=$(CONFIGURE_DIR) + +.IF "$(OS)"=="MACOSX" +EXTRPATH=LOADER +OUT2LIB+=gdk-pixbuf/.libs/libgdk_pixbuf-2.0.0.dylib + +OUT2INC+=gdk-pixbuf/gdk-pixbuf-animation.h +OUT2INC+=gdk-pixbuf/gdk-pixbuf-features.h +OUT2INC+=gdk-pixbuf/gdk-pixbuf-marshal.h +OUT2INC+=gdk-pixbuf/gdk-pixbuf.h +OUT2INC+=gdk-pixbuf/gdk-pixbuf-core.h +OUT2INC+=gdk-pixbuf/gdk-pixbuf-io.h +OUT2INC+=gdk-pixbuf/gdk-pixbuf-simple-anim.h +OUT2INC+=gdk-pixbuf/gdk-pixdata.h +OUT2INC+=gdk-pixbuf/gdk-pixbuf-enum-types.h +OUT2INC+=gdk-pixbuf/gdk-pixbuf-loader.h +OUT2INC+=gdk-pixbuf/gdk-pixbuf-transform.h +.ELIF "$(OS)"=="WNT" +.ELSE +.ENDIF + +# --- Targets ------------------------------------------------------ + +.INCLUDE : set_ext.mk +.INCLUDE : target.mk +.INCLUDE : tg_ext.mk + diff --git a/gdk-pixbuf/prj/build.lst b/gdk-pixbuf/prj/build.lst new file mode 100644 index 000000000000..fda2c4a0031d --- /dev/null +++ b/gdk-pixbuf/prj/build.lst @@ -0,0 +1,3 @@ +gp gdk-pixbuf : soltools NULL +gp gdk-pixbuf usr1 - all gp_mkout NULL +gp gdk-pixbuf nmake - all gp_gdk-pixbuf NULL diff --git a/gdk-pixbuf/prj/d.lst b/gdk-pixbuf/prj/d.lst new file mode 100644 index 000000000000..1248a8beef48 --- /dev/null +++ b/gdk-pixbuf/prj/d.lst @@ -0,0 +1,18 @@ +mkdir: %_DEST%\inc%_EXT%\external +mkdir: %_DEST%\inc%_EXT%\external\gdk-pixbuf-2.0 +mkdir: %_DEST%\inc%_EXT%\external\gdk-pixbuf-2.0\gdk-pixbuf + +..\%__SRC%\inc\gdk-pixbuf-animation.h %_DEST%\inc%_EXT%\external\gdk-pixbuf-2.0\gdk-pixbuf\gdk-pixbuf-animation.h +..\%__SRC%\inc\gdk-pixbuf-features.h %_DEST%\inc%_EXT%\external\gdk-pixbuf-2.0\gdk-pixbuf\gdk-pixbuf-features.h +..\%__SRC%\inc\gdk-pixbuf-marshal.h %_DEST%\inc%_EXT%\external\gdk-pixbuf-2.0\gdk-pixbuf\gdk-pixbuf-marshal.h +..\%__SRC%\inc\gdk-pixbuf.h %_DEST%\inc%_EXT%\external\gdk-pixbuf-2.0\gdk-pixbuf\gdk-pixbuf.h +..\%__SRC%\inc\gdk-pixbuf-core.h %_DEST%\inc%_EXT%\external\gdk-pixbuf-2.0\gdk-pixbuf\gdk-pixbuf-core.h +..\%__SRC%\inc\gdk-pixbuf-io.h %_DEST%\inc%_EXT%\external\gdk-pixbuf-2.0\gdk-pixbuf\gdk-pixbuf-io.h +..\%__SRC%\inc\gdk-pixbuf-simple-anim.h %_DEST%\inc%_EXT%\external\gdk-pixbuf-2.0\gdk-pixbuf\gdk-pixbuf-simple-anim.h +..\%__SRC%\inc\gdk-pixdata.h %_DEST%\inc%_EXT%\external\gdk-pixbuf-2.0\gdk-pixbuf\gdk-pixdata.h +..\%__SRC%\inc\gdk-pixbuf-enum-types.h %_DEST%\inc%_EXT%\external\gdk-pixbuf-2.0\gdk-pixbuf\gdk-pixbuf-enum-types.h +..\%__SRC%\inc\gdk-pixbuf-loader.h %_DEST%\inc%_EXT%\external\gdk-pixbuf-2.0\gdk-pixbuf\gdk-pixbuf-loader.h +..\%__SRC%\inc\gdk-pixbuf-transform.h %_DEST%\inc%_EXT%\external\gdk-pixbuf-2.0\gdk-pixbuf\gdk-pixbuf-transform.h + +..\%__SRC%\lib\libgdk_pixbuf-2.0.0.dylib %_DEST%\lib%_EXT%\libgdk_pixbuf-2.0.0.dylib + diff --git a/gettext/makefile.mk b/gettext/makefile.mk index 60d62ab00f75..dee6c82d6295 100644 --- a/gettext/makefile.mk +++ b/gettext/makefile.mk @@ -57,6 +57,7 @@ BUILD_ACTION=$(GNUMAKE) BUILD_DIR=$(CONFIGURE_DIR) .IF "$(OS)"=="MACOSX" +EXTRPATH=LOADER OUT2LIB+=gettext-tools$/intl$/.libs$/libintl.*.dylib OUT2LIB+=gettext-runtime$/libasprintf$/.libs$/libasprintf.*.dylib OUT2LIB+=gettext-tools$/gnulib-lib$/.libs$/libgettextlib-*.dylib diff --git a/glib/makefile.mk b/glib/makefile.mk index 99012a7778bd..eefa00315007 100644 --- a/glib/makefile.mk +++ b/glib/makefile.mk @@ -65,6 +65,7 @@ BUILD_DIR=$(CONFIGURE_DIR) .IF "$(OS)"=="MACOSX" +EXTRPATH=LOADER OUT2LIB+=gio/.libs/libgio-2.0.0.dylib OUT2LIB+=glib/.libs/libglib-2.0.0.dylib OUT2LIB+=gmodule/.libs/libgmodule-2.0.0.dylib -- cgit v1.2.3 From 161183678c41a5ba37a2ba43608a165fa91b5e4e Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 1 Mar 2011 15:04:30 +0100 Subject: rsvglibs: add gdk-pixbuf dependency --- solenv/bin/macosx-change-install-names.pl | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/solenv/bin/macosx-change-install-names.pl b/solenv/bin/macosx-change-install-names.pl index d678f05052e7..d6eb83ff99ef 100644 --- a/solenv/bin/macosx-change-install-names.pl +++ b/solenv/bin/macosx-change-install-names.pl @@ -43,6 +43,7 @@ sub action($$$) 'shl/URELIB/URELIB' => '@loader_path', 'shl/OOO/URELIB' => '@loader_path/../ure-link/lib', 'shl/OOO/OOO' => '@loader_path', + 'shl/LOADER/LOADER' => '@loader_path', 'shl/OXT/URELIB' => '@executable_path/urelibs', 'shl/BOXT/URELIB' => '@executable_path/urelibs', 'shl/BOXT/OOO' => '@loader_path/../../../basis-link/program', @@ -56,7 +57,7 @@ sub action($$$) } @ARGV == 3 || @ARGV >= 2 && $ARGV[0] eq "extshl" or die - 'Usage: app|shl|extshl UREBIN|URELIB|OOO|SDK|BRAND|OXT|BOXT|NONE *'; + 'Usage: app|shl|extshl UREBIN|URELIB|OOO|SDK|BRAND|OXT|BOXT|NONE|LOADER *'; $type = shift @ARGV; $loc = shift @ARGV; if ($type eq "SharedLibrary") @@ -84,10 +85,21 @@ if ($type eq "extshl") $change .= " -change $1 " . action($type, $loc, $loc) . "/$2"; $inames{$file} = $2; } - foreach $file (@ARGV) + if( $loc eq "LOADER" ) { - my $call = "install_name_tool$change -id \@__________________________________________________$loc/$inames{$file} $file"; - system($call) == 0 or die "cannot $call"; + foreach $file (@ARGV) + { + my $call = "install_name_tool$change -id \@loader_path/$inames{$file} $file"; + system($call) == 0 or die "cannot $call"; + } + } + else + { + foreach $file (@ARGV) + { + my $call = "install_name_tool$change -id \@__________________________________________________$loc/$inames{$file} $file"; + system($call) == 0 or die "cannot $call"; + } } } foreach $file (@ARGV) -- cgit v1.2.3 From 47fb20932f81725ccc85aa1d57ae4212b61cd222 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 1 Mar 2011 15:20:04 +0100 Subject: rsvglibs: add gdk-pixbuf-query-loaders --- gdk-pixbuf/makefile.mk | 2 ++ gdk-pixbuf/prj/d.lst | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gdk-pixbuf/makefile.mk b/gdk-pixbuf/makefile.mk index fca747e22c13..d723a8c39f78 100644 --- a/gdk-pixbuf/makefile.mk +++ b/gdk-pixbuf/makefile.mk @@ -74,6 +74,8 @@ BUILD_DIR=$(CONFIGURE_DIR) EXTRPATH=LOADER OUT2LIB+=gdk-pixbuf/.libs/libgdk_pixbuf-2.0.0.dylib +OUT2BIN+=gdk-pixbuf/.libs/gdk-pixbuf-query-loaders + OUT2INC+=gdk-pixbuf/gdk-pixbuf-animation.h OUT2INC+=gdk-pixbuf/gdk-pixbuf-features.h OUT2INC+=gdk-pixbuf/gdk-pixbuf-marshal.h diff --git a/gdk-pixbuf/prj/d.lst b/gdk-pixbuf/prj/d.lst index 1248a8beef48..d7dd24b7aba6 100644 --- a/gdk-pixbuf/prj/d.lst +++ b/gdk-pixbuf/prj/d.lst @@ -15,4 +15,5 @@ mkdir: %_DEST%\inc%_EXT%\external\gdk-pixbuf-2.0\gdk-pixbuf ..\%__SRC%\inc\gdk-pixbuf-transform.h %_DEST%\inc%_EXT%\external\gdk-pixbuf-2.0\gdk-pixbuf\gdk-pixbuf-transform.h ..\%__SRC%\lib\libgdk_pixbuf-2.0.0.dylib %_DEST%\lib%_EXT%\libgdk_pixbuf-2.0.0.dylib - +symlink: %_DEST%\lib%_EXT%\libgdk_pixbuf-2.0.0.dylib %_DEST%\lib%_EXT%\libgdk_pixbuf-2.0.dylib +..\%__SRC%\bin\gdk-pixbuf-query-loaders %_DEST%\bin%_EXT%\gdk-pixbuf-query-loaders -- cgit v1.2.3 From 0d9ba0a484e12ea23481ffb8fbb71b84d26e4137 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 1 Mar 2011 18:55:44 +0100 Subject: rsvglibs: add pango dependency --- cairo/cairo/makefile.mk | 1 + pango/makefile.mk | 116 +++++++++++++++++++++++++++++++++++++++++++++++ pango/pango-1.28.3.patch | 37 +++++++++++++++ pango/prj/build.lst | 3 ++ pango/prj/d.lst | 38 ++++++++++++++++ 5 files changed, 195 insertions(+) create mode 100644 pango/makefile.mk create mode 100644 pango/pango-1.28.3.patch create mode 100644 pango/prj/build.lst create mode 100644 pango/prj/d.lst diff --git a/cairo/cairo/makefile.mk b/cairo/cairo/makefile.mk index ceeb18547305..dfe4e643a9d3 100644 --- a/cairo/cairo/makefile.mk +++ b/cairo/cairo/makefile.mk @@ -181,6 +181,7 @@ OUT2INC+=cairo-version.h \ src$/cairo.h .IF "$(OS)"=="MACOSX" +EXTRPATH=LOADER OUT2LIB+=src$/.libs$/libcairo*.dylib .ELIF "$(OS)"=="WNT" .IF "$(COM)"=="GCC" diff --git a/pango/makefile.mk b/pango/makefile.mk new file mode 100644 index 000000000000..c2b18022ced0 --- /dev/null +++ b/pango/makefile.mk @@ -0,0 +1,116 @@ +#************************************************************************* +# +# 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=pango +TARGET=so_pango + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +.IF "$(SYSTEM_PANGO)" == "YES" +all: + @echo "An already available installation of pango should exist on your system." + @echo "Therefore the version provided here does not need to be built in addition." +.ENDIF + +# --- Files -------------------------------------------------------- + +PANGOVERSION=1.28.3 + +TARFILE_NAME=$(PRJNAME)-$(PANGOVERSION) +TARFILE_MD5=22ad1c8d3fda7e73b0798035f3dd96bc + +PATCH_FILES=pango-1.28.3.patch + +CONFIGURE_LDFLAGS="-L$(SOLARLIBDIR)" +CONFIGURE_DIR= +CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) \ + .$/configure --prefix=$(SRC_ROOT)$/$(PRJNAME)$/$(MISC) \ + CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS) $(EXTRA_CDEFS) -I$(SOLARINCDIR) -I$(SOLARINCDIR)$/external -I$(SOLARINCDIR)$/external$/glib-2.0" \ + LDFLAGS="$(CONFIGURE_LDFLAGS)" \ + CAIRO_CFLAGS="-I$(SOLARINCDIR) -I$(SOLARINCDIR)$/cairo" \ + CAIRO_LIBS="-lcairo" \ + GLIB_CFLAGS="-I$(SOLARINCDIR)$/external$/glib-2.0" \ + GLIB_LIBS="-lgthread-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 -lintl" +CONFIGURE_FLAGS=--with-included-modules=yes +.IF "$(OS)" == "MACOSX" +CONFIGURE_FLAGS+= CPPFLAGS="$(ARCH_FLAGS) $(EXTRA_CDEFS)" +CONFIGURE_ACTION+="--without-x" +.ENDIF + +BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) $(GNUMAKE) +BUILD_DIR=$(CONFIGURE_DIR) + + +.IF "$(OS)"=="MACOSX" +EXTRPATH=LOADER +OUT2LIB+=pango/.libs/libpango-1.0.0.dylib +OUT2LIB+=pango/.libs/libpangocairo-1.0.0.dylib + +OUT2BIN+=pango/.libs/pango-querymodules + +OUT2INC+=pango/pango-attributes.h +OUT2INC+=pango/pango-enum-types.h +OUT2INC+=pango/pango-glyph.h +OUT2INC+=pango/pango-modules.h +OUT2INC+=pango/pango.h +OUT2INC+=pango/pango-bidi-type.h +OUT2INC+=pango/pango-features.h +OUT2INC+=pango/pango-gravity.h +OUT2INC+=pango/pango-renderer.h +OUT2INC+=pango/pangoatsui.h +OUT2INC+=pango/pango-break.h +OUT2INC+=pango/pango-font.h +OUT2INC+=pango/pango-item.h +OUT2INC+=pango/pango-script.h +OUT2INC+=pango/pangocairo.h +OUT2INC+=pango/pango-context.h +OUT2INC+=pango/pango-fontmap.h +OUT2INC+=pango/pango-language.h +OUT2INC+=pango/pango-tabs.h +OUT2INC+=pango/pango-coverage.h +OUT2INC+=pango/pango-fontset.h +OUT2INC+=pango/pango-layout.h +OUT2INC+=pango/pango-types.h +OUT2INC+=pango/pango-engine.h +OUT2INC+=pango/pango-glyph-item.h +OUT2INC+=pango/pango-matrix.h +OUT2INC+=pango/pango-utils.h + +.ELIF "$(OS)"=="WNT" +.ELSE +.ENDIF + +# --- Targets ------------------------------------------------------ + +.INCLUDE : set_ext.mk +.INCLUDE : target.mk +.INCLUDE : tg_ext.mk + diff --git a/pango/pango-1.28.3.patch b/pango/pango-1.28.3.patch new file mode 100644 index 000000000000..7da953f28311 --- /dev/null +++ b/pango/pango-1.28.3.patch @@ -0,0 +1,37 @@ +--- misc/pango-1.28.3/configure 2010-09-29 13:02:33.000000000 +0200 ++++ misc/build/pango-1.28.3/configure 2011-03-01 17:56:26.000000000 +0100 +@@ -18596,16 +18596,16 @@ + fi + + if $have_atsui; then +- if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo-quartz-font >= \$cairo_required\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "cairo-quartz-font >= $cairo_required") 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; then ++# if test -n "$PKG_CONFIG" && \ ++# { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo-quartz-font >= \$cairo_required\""; } >&5 ++# ($PKG_CONFIG --exists --print-errors "cairo-quartz-font >= $cairo_required") 2>&5 ++# ac_status=$? ++# $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++# test $ac_status = 0; }; then + have_cairo_atsui=true +-else +- : +-fi ++#else ++# : ++#fi + fi + if $have_cairo_atsui; then + +@@ -18859,7 +18859,7 @@ + + # Setup GLIB_MKENUMS to use glib-mkenums even if GLib is uninstalled. + GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` +- ++GLIB_MKENUMS=glib-mkenums + + + # Add in gthread-2.0 to CFLAGS but not to LIBS so we get any diff --git a/pango/prj/build.lst b/pango/prj/build.lst new file mode 100644 index 000000000000..44c735efe9fd --- /dev/null +++ b/pango/prj/build.lst @@ -0,0 +1,3 @@ +pg pango : gettext NULL +pg pango usr1 - all pg_mkout NULL +pg pango nmake - all pg_pango NULL diff --git a/pango/prj/d.lst b/pango/prj/d.lst new file mode 100644 index 000000000000..a334a657bff1 --- /dev/null +++ b/pango/prj/d.lst @@ -0,0 +1,38 @@ +mkdir: %_DEST%\inc%_EXT%\external +..\%__SRC%\lib\libpango-1.0.0.dylib %_DEST%\lib%_EXT%\libpango-1.0.0.dylib +symlink: %_DEST%\lib%_EXT%\libpango-1.0.0.dylib %_DEST%\lib%_EXT%\libpango-1.0.dylib +..\%__SRC%\lib\libpangocairo-1.0.0.dylib %_DEST%\lib%_EXT%\libpangocairo-1.0.0.dylib +symlink: %_DEST%\lib%_EXT%\libpangocairo-1.0.0.dylib %_DEST%\lib%_EXT%\libpangocairo-1.0.dylib + +..\%__SRC%\bin\pango-querymodules %_DEST%\bin%_EXT%\pango-querymodules + +mkdir: %_DEST%\inc%_EXT%\external\pango-1.0 +mkdir: %_DEST%\inc%_EXT%\external\pango-1.0\pango +..\%__SRC%\inc\pango-attributes.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-attributes.h +..\%__SRC%\inc\pango-enum-types.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-enum-types.h +..\%__SRC%\inc\pango-glyph.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-glyph.h +..\%__SRC%\inc\pango-modules.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-modules.h +..\%__SRC%\inc\pango.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango.h +..\%__SRC%\inc\pango-bidi-type.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-bidi-type.h +..\%__SRC%\inc\pango-features.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-features.h +..\%__SRC%\inc\pango-gravity.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-gravity.h +..\%__SRC%\inc\pango-renderer.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-renderer.h +..\%__SRC%\inc\pangoatsui.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pangoatsui.h +..\%__SRC%\inc\pango-break.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-break.h +..\%__SRC%\inc\pango-font.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-font.h +..\%__SRC%\inc\pango-item.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-item.h +..\%__SRC%\inc\pango-script.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-script.h +..\%__SRC%\inc\pangocairo.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pangocairo.h +..\%__SRC%\inc\pango-context.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-context.h +..\%__SRC%\inc\pango-fontmap.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-fontmap.h +..\%__SRC%\inc\pango-language.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-language.h +..\%__SRC%\inc\pango-tabs.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-tabs.h +..\%__SRC%\inc\pango-coverage.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-coverage.h +..\%__SRC%\inc\pango-fontset.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-fontset.h +..\%__SRC%\inc\pango-layout.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-layout.h +..\%__SRC%\inc\pango-types.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-types.h +..\%__SRC%\inc\pango-engine.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-engine.h +..\%__SRC%\inc\pango-glyph-item.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-glyph-item.h +..\%__SRC%\inc\pango-matrix.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-matrix.h +..\%__SRC%\inc\pango-utils.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-utils.h + -- cgit v1.2.3 From 8ff5911676c853b4b4933f7b89760ad2d775b1a1 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 1 Mar 2011 18:55:44 +0100 Subject: rsvglibs: add pango dependency --- solenv/config/sdev300.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini index c2579cd5b952..cc8f2f0d71e1 100644 --- a/solenv/config/sdev300.ini +++ b/solenv/config/sdev300.ini @@ -1227,6 +1227,7 @@ unxmacxi USE_SYSTEM_STL YES BUILD_PIXMAN YES WITH_MOZILLA YES + ENABLE_CAIRO TRUE } common2 { -- cgit v1.2.3 From 02519a1f0e873dd8774d2efecdecb7b94f2c69ba Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Wed, 2 Mar 2011 10:22:36 +0100 Subject: calc66: #i114839# make sure the output factor is valid for UpdateAllRowHeights after loading --- sc/inc/docuno.hxx | 2 +- sc/source/filter/xml/xmlsubti.cxx | 3 ++- sc/source/ui/unoobj/docuno.cxx | 6 +++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx index e152b4a88f97..f213806762d8 100644 --- a/sc/inc/docuno.hxx +++ b/sc/inc/docuno.hxx @@ -129,7 +129,7 @@ public: ScDocument* GetDocument() const; SfxObjectShell* GetEmbeddedObject() const; - void UpdateAllRowHeights( const ScMarkData* pTabMark = NULL ); + void UpdateAllRowHeights( const ScMarkData* pTabMark = NULL, bool bCalcOutputFactor = false ); void BeforeXMLLoading(); void AfterXMLLoading(sal_Bool bRet); diff --git a/sc/source/filter/xml/xmlsubti.cxx b/sc/source/filter/xml/xmlsubti.cxx index e6cc7b853764..3e182c919032 100644 --- a/sc/source/filter/xml/xmlsubti.cxx +++ b/sc/source/filter/xml/xmlsubti.cxx @@ -614,7 +614,8 @@ void ScMyTables::UpdateRowHeights() if (aUpdateSheets.GetSelectCount()) { pDoc->LockStreamValid( true ); // ignore draw page size (but not formula results) - ScModelObj::getImplementation(rImport.GetModel())->UpdateAllRowHeights(&aUpdateSheets); + // #i114839# make sure the output factor is valid for UpdateAllRowHeights + ScModelObj::getImplementation(rImport.GetModel())->UpdateAllRowHeights(&aUpdateSheets, true); pDoc->LockStreamValid( false ); } } diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 23eb1abd2d82..5f9ca7b7f5bc 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -411,10 +411,14 @@ SfxObjectShell* ScModelObj::GetEmbeddedObject() const return pDocShell; } -void ScModelObj::UpdateAllRowHeights(const ScMarkData* pTabMark) +void ScModelObj::UpdateAllRowHeights(const ScMarkData* pTabMark, bool bCalcOutputFactor) { if (pDocShell) + { + if (bCalcOutputFactor) + pDocShell->CalcOutputFactor(); pDocShell->UpdateAllRowHeights(pTabMark); + } } void ScModelObj::BeforeXMLLoading() -- cgit v1.2.3 From dd89f4622f20251653023f3ad83c788d8e27376e Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Wed, 2 Mar 2011 13:50:37 +0100 Subject: rsvglibs: export symbols --- freetype/freetype-2.4.4.patch | 75 +++++++++++++++++++++++++++++++++++++++---- freetype/makefile.mk | 6 ++-- freetype/prj/d.lst | 55 +++++++++++++++++++++++++++++-- 3 files changed, 126 insertions(+), 10 deletions(-) diff --git a/freetype/freetype-2.4.4.patch b/freetype/freetype-2.4.4.patch index 6c98960431de..14067ae638e2 100644 --- a/freetype/freetype-2.4.4.patch +++ b/freetype/freetype-2.4.4.patch @@ -1,6 +1,6 @@ --- misc/freetype-2.4.4/config.mk Wed Aug 20 14:33:55 2008 +++ misc/build/freetype-2.4.4/config.mk Wed Aug 20 14:26:42 2008 -@@ -1 +1,41 @@ +@@ -1 +1,42 @@ -dummy +# +# FreeType 2 configuration rules for a `normal' pseudo ANSI compiler/system @@ -16,7 +16,7 @@ +# indicate that you have read the license and understand and accept it +# fully. +all modules: setup -+PLATFORM := win32 ++ +CPPFLAGS ?= /DNDEBUG /DWIN32 /D_LIB /D_CRT_SECURE_NO_WARNINGS $(SOLARINC) + +include $(TOP_DIR)/builds/win32/win32-def.mk @@ -25,18 +25,19 @@ +CAT := cat +SEP := / +BUILD_PROJECT := yes -+COPY := cp ++COPY := $(GNUCOPY) +visualc: setup + +include $(TOP_DIR)/builds/compiler/visualc.mk +include $(TOP_DIR)/builds/$(PROJECT).mk -+LINK_LIBRARY = link /DLL /nologo /out:$(subst /,$(COMPILER_SEP),../../../bin/$(PROJECT).dll $(OBJECTS_LIST)) ++LINK_LIBRARY = link /MAP /OPT:NOREF -safeseh -nxcompat -dynamicbase /DLL /SUBSYSTEM:CONSOLE -LIBPATH:$(OUTDIR)/lib -NODEFAULTLIB -RELEASE -INCREMENTAL:NO /nologo -map:../../../misc/$(PROJECT).map -implib:../../../lib/i$(PROJECT).lib -out:$(subst /,$(COMPILER_SEP),../../../bin/$(PROJECT).dll $(OBJECTS_LIST)) kernel32.lib msvcrt.lib ++LIB_LIBRARY = lib -machine:IX86 /IGNORE:4102 /IGNORE:4197 -out:../../../lib/i$(PROJECT).lib -def:$(PROJECT).def +exported_symbols: -+ echo test ++ + +$(PROJECT_LIBRARY): $(OBJECTS_LIST) + $(LINK_LIBRARY) -+ ++ $(LIB_LIBRARY) + +# include $(TOP_DIR)/builds/link_dos.mk + @@ -68,3 +69,65 @@ +FT_USE_MODULE( FT_Module_Class, psnames_module_class ) +/* EOF */ + +--- misc/freetype-2.4.4/freetype.def Wed Aug 20 14:33:55 2008 ++++ misc/build/freetype-2.4.4/freetype.def Wed Aug 20 14:26:42 2008 +@@ -1 +1,58 @@ +-dummy ++LIBRARY "freetype" ++ ++VERSION 2.4.4 ++ ++EXPORTS ++ FT_Init_FreeType @1 ++ FT_Done_FreeType @2 ++ FT_New_Face @3 ++ FT_New_Memory_Face @4 ++ FT_Open_Face @5 ++ FT_Attach_File @6 ++ FT_Attach_Stream @7 ++ FT_Reference_Face @8 ++ FT_Done_Face @9 ++ FT_Select_Size @10 ++ FT_Request_Size @11 ++ FT_Set_Char_Size @12 ++ FT_Set_Pixel_Sizes @13 ++ FT_Load_Glyph @14 ++ FT_Load_Char @15 ++ FT_Set_Transform @16 ++ FT_Render_Glyph @17 ++ FT_Get_Kerning @18 ++ FT_Get_Track_Kerning @19 ++ FT_Get_Glyph_Name @20 ++ FT_Get_Postscript_Name @21 ++ FT_Select_Charmap @22 ++ FT_Set_Charmap @23 ++ FT_Get_Charmap_Index @24 ++ FT_Get_Char_Index @25 ++ FT_Get_First_Char @26 ++ FT_Get_Next_Char @27 ++ FT_Get_Name_Index @28 ++ FT_Get_SubGlyph_Info @29 ++ FT_Get_FSType_Flags @30 ++ FT_Face_GetCharVariantIndex @31 ++ FT_Face_GetCharVariantIsDefault @32 ++ FT_Face_GetVariantSelectors @33 ++ FT_Face_GetVariantsOfChar @34 ++ FT_Face_GetCharsOfVariant @35 ++ FT_MulDiv @36 ++ FT_DivFix @37 ++ FT_RoundFix @38 ++ FT_CeilFix @39 ++ FT_FloorFix @40 ++ FT_Vector_Transform @41 ++ FT_Library_Version @42 ++ FT_Face_CheckTrueTypePatents @43 ++ FT_Face_SetUnpatentedHinting @44 ++ FT_Get_X11_Font_Format @45 ++ FT_Has_PS_Glyph_Names @46 ++ FT_Get_Sfnt_Name_Count @47 ++ FT_Get_PS_Font_Info @48 ++ FT_Get_Sfnt_Name @49 ++ FT_Get_Sfnt_Table @50 ++ FT_Load_Sfnt_Table @51 ++ FT_Get_BDF_Property @52 ++ diff --git a/freetype/makefile.mk b/freetype/makefile.mk index ff7df7e51ec4..a4e085471be9 100644 --- a/freetype/makefile.mk +++ b/freetype/makefile.mk @@ -49,13 +49,15 @@ CONFIGURE_DIR= .IF "$(OS)"=="WNT" CONFIGURE_ACTION= ADDITIONAL_FILES=config.mk \ - objs/ftmodule.h + objs/ftmodule.h \ + freetype.def PATCH_FILES=freetype-2.4.4.patch +LIBS= -l $(STDLIBGUIMT) -l $(LIBSTLPORT) .ELSE CONFIGURE_ACTION=.$/configure .ENDIF -BUILD_ACTION=make +BUILD_ACTION=$(GNUMAKE) # --- Targets ------------------------------------------------------ diff --git a/freetype/prj/d.lst b/freetype/prj/d.lst index 2d7792240e92..b0b19777d2e0 100644 --- a/freetype/prj/d.lst +++ b/freetype/prj/d.lst @@ -1,3 +1,54 @@ -mkdir: %_DEST%\inc%_EXT%\external\freetpye -..\%__SRC%\bin\freetype-2.4.4.dll %_DEST%\bin%_EXT%\freetype-2.4.4.dll +mkdir: %_DEST%\inc%_EXT%\external\freetype +mkdir: %_DEST%\inc%_EXT%\external\freetype\config +..\%__SRC%\bin\freetype.dll %_DEST%\bin%_EXT%\freetype.dll +..\%__SRC%\bin\freetype.lib %_DEST%\lib%_EXT%\freetype.lib +..\%__SRC%\lib\ifreetype.lib %_DEST%\lib%_EXT%\ifreetype.lib +..\%__SRC%\misc\build\freetype-2.4.4\include\ft2build.h %_DEST%\inc%_EXT%\external\freetype\ft2build.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\freetype.h %_DEST%\inc%_EXT%\external\freetype\freetype.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftadvanc.h %_DEST%\inc%_EXT%\external\freetype\ftadvanc.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftbbox.h %_DEST%\inc%_EXT%\external\freetype\ftbbox.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftbdf.h %_DEST%\inc%_EXT%\external\freetype\ftbdf.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftbitmap.h %_DEST%\inc%_EXT%\external\freetype\ftbitmap.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftcache.h %_DEST%\inc%_EXT%\external\freetype\ftcache.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftchapters.h %_DEST%\inc%_EXT%\external\freetype\ftchapters.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftcid.h %_DEST%\inc%_EXT%\external\freetype\ftcid.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\fterrdef.h %_DEST%\inc%_EXT%\external\freetype\fterrdef.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\fterrors.h %_DEST%\inc%_EXT%\external\freetype\fterrors.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftgasp.h %_DEST%\inc%_EXT%\external\freetype\ftgasp.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftglyph.h %_DEST%\inc%_EXT%\external\freetype\ftglyph.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftgxval.h %_DEST%\inc%_EXT%\external\freetype\ftgxval.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftgzip.h %_DEST%\inc%_EXT%\external\freetype\ftgzip.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftimage.h %_DEST%\inc%_EXT%\external\freetype\ftimage.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftincrem.h %_DEST%\inc%_EXT%\external\freetype\ftincrem.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftlcdfil.h %_DEST%\inc%_EXT%\external\freetype\ftlcdfil.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftlist.h %_DEST%\inc%_EXT%\external\freetype\ftlist.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftlzw.h %_DEST%\inc%_EXT%\external\freetype\ftlzw.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftmac.h %_DEST%\inc%_EXT%\external\freetype\ftmac.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftmm.h %_DEST%\inc%_EXT%\external\freetype\ftmm.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftmodapi.h %_DEST%\inc%_EXT%\external\freetype\ftmodapi.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftmoderr.h %_DEST%\inc%_EXT%\external\freetype\ftmoderr.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftotval.h %_DEST%\inc%_EXT%\external\freetype\ftotval.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftoutln.h %_DEST%\inc%_EXT%\external\freetype\ftoutln.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftpfr.h %_DEST%\inc%_EXT%\external\freetype\ftpfr.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftrender.h %_DEST%\inc%_EXT%\external\freetype\ftrender.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftsizes.h %_DEST%\inc%_EXT%\external\freetype\ftsizes.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftsnames.h %_DEST%\inc%_EXT%\external\freetype\ftsnames.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftstroke.h %_DEST%\inc%_EXT%\external\freetype\ftstroke.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftsynth.h %_DEST%\inc%_EXT%\external\freetype\ftsynth.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftsystem.h %_DEST%\inc%_EXT%\external\freetype\ftsystem.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\fttrigon.h %_DEST%\inc%_EXT%\external\freetype\fttrigon.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\fttypes.h %_DEST%\inc%_EXT%\external\freetype\fttypes.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftwinfnt.h %_DEST%\inc%_EXT%\external\freetype\ftwinfnt.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftxf86.h %_DEST%\inc%_EXT%\external\freetype\ftxf86.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\t1tables.h %_DEST%\inc%_EXT%\external\freetype\t1tables.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ttnameid.h %_DEST%\inc%_EXT%\external\freetype\ttnameid.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\tttables.h %_DEST%\inc%_EXT%\external\freetype\tttables.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\tttags.h %_DEST%\inc%_EXT%\external\freetype\tttags.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ttunpat.h %_DEST%\inc%_EXT%\external\freetype\ttunpat.h + +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\config\ftconfig.h %_DEST%\inc%_EXT%\external\freetype\config\ftconfig.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\config\ftheader.h %_DEST%\inc%_EXT%\external\freetype\config\ftheader.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\config\ftmodule.h %_DEST%\inc%_EXT%\external\freetype\config\ftmodule.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\config\ftoption.h %_DEST%\inc%_EXT%\external\freetype\config\ftoption.h +..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\config\ftstdlib.h %_DEST%\inc%_EXT%\external\freetype\config\ftstdlib.h \ No newline at end of file -- cgit v1.2.3 From bc9b606106af846370b50fb7cb2227e2cc8b2035 Mon Sep 17 00:00:00 2001 From: ka Date: Wed, 2 Mar 2011 20:32:58 +0100 Subject: rsvglibs: libpng for Mac and Windows --- libpng/libpng.patch | 263 ++++++++++++++++++++++++++++++++++++++++++++++++---- libpng/makefile.mk | 6 +- libpng/prj/d.lst | 19 ++-- 3 files changed, 254 insertions(+), 34 deletions(-) diff --git a/libpng/libpng.patch b/libpng/libpng.patch index c7c8c05d753f..26b3098d0467 100644 --- a/libpng/libpng.patch +++ b/libpng/libpng.patch @@ -1,5 +1,5 @@ ---- misc/libpng/makefile.mk 2011-03-01 00:01:58.221734678 +0100 -+++ misc/build/libpng/makefile.mk 2011-02-28 23:52:40.953319424 +0100 +--- misc/libpng-1.5.1/makefile.mk 2011-03-01 00:01:58.221734678 +0100 ++++ misc/build/libpng-1.5.1/makefile.mk 2011-02-28 23:52:40.953319424 +0100 @@ -1 +1,49 @@ -dummy +#************************************************************************* @@ -27,23 +27,23 @@ + +# --- Files -------------------------------------------------------- + -+SLOFILES= $(SLO)$/png.c \ -+ $(SLO)$/pngerror.c \ -+ $(SLO)$/pngget.c \ -+ $(SLO)$/pngmem.c \ -+ $(SLO)$/pngpread.c \ -+ $(SLO)$/pngread.c \ -+ $(SLO)$/pngrio.c \ -+ $(SLO)$/pngrtran.c \ -+ $(SLO)$/pngrutil.c \ -+ $(SLO)$/pngset.c \ -+ $(SLO)$/pngtest.c \ -+ $(SLO)$/pngtrans.c \ -+ $(SLO)$/pngvalid.c \ -+ $(SLO)$/pngwio.c \ -+ $(SLO)$/pngwrite.c \ -+ $(SLO)$/pngwtran.c \ -+ $(SLO)$/pngwutil.c ++SLOFILES= $(SLO)$/png.obj \ ++ $(SLO)$/pngerror.obj \ ++ $(SLO)$/pngget.obj \ ++ $(SLO)$/pngmem.obj \ ++ $(SLO)$/pngpread.obj \ ++ $(SLO)$/pngread.obj \ ++ $(SLO)$/pngrio.obj \ ++ $(SLO)$/pngrtran.obj \ ++ $(SLO)$/pngrutil.obj \ ++ $(SLO)$/pngset.obj \ ++ $(SLO)$/pngtest.obj \ ++ $(SLO)$/pngtrans.obj \ ++ $(SLO)$/pngvalid.obj \ ++ $(SLO)$/pngwio.obj \ ++ $(SLO)$/pngwrite.obj \ ++ $(SLO)$/pngwtran.obj \ ++ $(SLO)$/pngwutil.obj + +LIB1TARGET=$(SLB)$/$(TARGET).lib +LIB1ARCHIV=$(LB)$/lib$(TARGET).a @@ -51,3 +51,228 @@ + +.INCLUDE : target.mk + +--- misc/libpng-1.5.1/pnglibconf.h 2011-03-02 15:19:29.537422800 +0100 ++++ misc/build/libpng-1.5.1/pnglibconf.h 2011-03-02 15:18:11.492358700 +0100 +@@ -1 +1,176 @@ +-dummy ++ ++/* libpng STANDARD API DEFINITION */ ++ ++/* pnglibconf.h - library build configuration */ ++ ++/* libpng version 1.5.0 - last changed on January 6, 2011 */ ++ ++/* Copyright (c) 1998-2011 Glenn Randers-Pehrson */ ++ ++/* This code is released under the libpng license. */ ++/* For conditions of distribution and use, see the disclaimer */ ++/* and license in png.h */ ++ ++/* pnglibconf.h */ ++/* Machine generated file: DO NOT EDIT */ ++/* Derived from: scripts/pnglibconf.dfa */ ++#ifndef PNGLCONF_H ++#define PNGLCONF_H ++/* settings */ ++#define PNG_MAX_GAMMA_8 11 ++#define PNG_CALLOC_SUPPORTED ++#define PNG_QUANTIZE_RED_BITS 5 ++#define PNG_USER_WIDTH_MAX 1000000L ++#define PNG_QUANTIZE_GREEN_BITS 5 ++#define PNG_API_RULE 0 ++#define PNG_QUANTIZE_BLUE_BITS 5 ++#define PNG_USER_CHUNK_CACHE_MAX 0 ++#define PNG_USER_HEIGHT_MAX 1000000L ++#define PNG_sCAL_PRECISION 5 ++#define PNG_COST_SHIFT 3 ++#define PNG_WEIGHT_SHIFT 8 ++#define PNG_USER_CHUNK_MALLOC_MAX 0 ++#define PNG_DEFAULT_READ_MACROS 1 ++#define PNG_ZBUF_SIZE 8192 ++#define PNG_GAMMA_THRESHOLD_FIXED 5000 ++/* end of settings */ ++/* options */ ++#define PNG_INFO_IMAGE_SUPPORTED ++#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED ++#define PNG_POINTER_INDEXING_SUPPORTED ++#define PNG_WARNINGS_SUPPORTED ++#define PNG_FLOATING_ARITHMETIC_SUPPORTED ++#define PNG_WRITE_SUPPORTED ++#define PNG_WRITE_INTERLACING_SUPPORTED ++#define PNG_WRITE_16BIT_SUPPORTED ++#define PNG_EASY_ACCESS_SUPPORTED ++#define PNG_ALIGN_MEMORY_SUPPORTED ++#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED ++#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED ++#define PNG_USER_LIMITS_SUPPORTED ++#define PNG_FIXED_POINT_SUPPORTED ++/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/ ++#define PNG_ERROR_TEXT_SUPPORTED ++#define PNG_READ_SUPPORTED ++/*#undef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED*/ ++#define PNG_BENIGN_ERRORS_SUPPORTED ++#define PNG_SETJMP_SUPPORTED ++#define PNG_WRITE_FLUSH_SUPPORTED ++#define PNG_MNG_FEATURES_SUPPORTED ++#define PNG_FLOATING_POINT_SUPPORTED ++#define PNG_INCH_CONVERSIONS_SUPPORTED ++#define PNG_STDIO_SUPPORTED ++#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED ++#define PNG_USER_MEM_SUPPORTED ++#define PNG_IO_STATE_SUPPORTED ++#define PNG_SET_USER_LIMITS_SUPPORTED ++#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED ++#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED ++#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED ++#define PNG_WRITE_FILTER_SUPPORTED ++#define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED ++#define PNG_WRITE_iCCP_SUPPORTED ++#define PNG_READ_TRANSFORMS_SUPPORTED ++#define PNG_READ_GAMMA_SUPPORTED ++#define PNG_READ_bKGD_SUPPORTED ++#define PNG_UNKNOWN_CHUNKS_SUPPORTED ++#define PNG_READ_sCAL_SUPPORTED ++#define PNG_WRITE_hIST_SUPPORTED ++#define PNG_READ_OPT_PLTE_SUPPORTED ++#define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED ++#define PNG_WRITE_gAMA_SUPPORTED ++#define PNG_READ_GRAY_TO_RGB_SUPPORTED ++#define PNG_WRITE_pCAL_SUPPORTED ++#define PNG_READ_INVERT_ALPHA_SUPPORTED ++#define PNG_WRITE_TRANSFORMS_SUPPORTED ++#define PNG_READ_sBIT_SUPPORTED ++#define PNG_READ_PACK_SUPPORTED ++#define PNG_WRITE_SWAP_SUPPORTED ++#define PNG_READ_cHRM_SUPPORTED ++#define PNG_WRITE_tIME_SUPPORTED ++#define PNG_READ_INTERLACING_SUPPORTED ++#define PNG_READ_tRNS_SUPPORTED ++#define PNG_WRITE_pHYs_SUPPORTED ++#define PNG_WRITE_INVERT_SUPPORTED ++#define PNG_READ_RGB_TO_GRAY_SUPPORTED ++#define PNG_WRITE_sRGB_SUPPORTED ++#define PNG_READ_oFFs_SUPPORTED ++#define PNG_WRITE_FILLER_SUPPORTED ++#define PNG_WRITE_TEXT_SUPPORTED ++#define PNG_WRITE_SHIFT_SUPPORTED ++#define PNG_PROGRESSIVE_READ_SUPPORTED ++#define PNG_READ_SHIFT_SUPPORTED ++#define PNG_CONVERT_tIME_SUPPORTED ++#define PNG_READ_USER_TRANSFORM_SUPPORTED ++#define PNG_READ_INT_FUNCTIONS_SUPPORTED ++#define PNG_READ_USER_CHUNKS_SUPPORTED ++#define PNG_READ_hIST_SUPPORTED ++#define PNG_READ_16BIT_SUPPORTED ++#define PNG_READ_SWAP_ALPHA_SUPPORTED ++#define PNG_READ_COMPOSITE_NODIV_SUPPORTED ++#define PNG_SEQUENTIAL_READ_SUPPORTED ++#define PNG_READ_BACKGROUND_SUPPORTED ++#define PNG_READ_QUANTIZE_SUPPORTED ++#define PNG_READ_iCCP_SUPPORTED ++#define PNG_READ_STRIP_ALPHA_SUPPORTED ++#define PNG_READ_PACKSWAP_SUPPORTED ++#define PNG_READ_sRGB_SUPPORTED ++#define PNG_WRITE_tEXt_SUPPORTED ++#define PNG_READ_gAMA_SUPPORTED ++#define PNG_READ_pCAL_SUPPORTED ++#define PNG_READ_EXPAND_SUPPORTED ++#define PNG_WRITE_sPLT_SUPPORTED ++#define PNG_READ_SWAP_SUPPORTED ++#define PNG_READ_tIME_SUPPORTED ++#define PNG_READ_pHYs_SUPPORTED ++#define PNG_WRITE_SWAP_ALPHA_SUPPORTED ++#define PNG_TIME_RFC1123_SUPPORTED ++#define PNG_READ_TEXT_SUPPORTED ++#define PNG_WRITE_BGR_SUPPORTED ++#define PNG_USER_CHUNKS_SUPPORTED ++#define PNG_CONSOLE_IO_SUPPORTED ++#define PNG_WRITE_PACK_SUPPORTED ++#define PNG_READ_FILLER_SUPPORTED ++#define PNG_WRITE_bKGD_SUPPORTED ++#define PNG_WRITE_tRNS_SUPPORTED ++#define PNG_READ_sPLT_SUPPORTED ++#define PNG_WRITE_sCAL_SUPPORTED ++#define PNG_WRITE_oFFs_SUPPORTED ++#define PNG_READ_tEXt_SUPPORTED ++#define PNG_WRITE_sBIT_SUPPORTED ++#define PNG_READ_INVERT_SUPPORTED ++#define PNG_READ_16_TO_8_SUPPORTED ++#define PNG_WRITE_cHRM_SUPPORTED ++#define PNG_16BIT_SUPPORTED ++#define PNG_WRITE_USER_TRANSFORM_SUPPORTED ++#define PNG_READ_BGR_SUPPORTED ++#define PNG_WRITE_PACKSWAP_SUPPORTED ++#define PNG_WRITE_INVERT_ALPHA_SUPPORTED ++#define PNG_sCAL_SUPPORTED ++#define PNG_WRITE_zTXt_SUPPORTED ++#define PNG_sBIT_SUPPORTED ++#define PNG_cHRM_SUPPORTED ++#define PNG_bKGD_SUPPORTED ++#define PNG_tRNS_SUPPORTED ++#define PNG_WRITE_iTXt_SUPPORTED ++#define PNG_oFFs_SUPPORTED ++#define PNG_USER_TRANSFORM_PTR_SUPPORTED ++#define PNG_USER_TRANSFORM_INFO_SUPPORTED ++#define PNG_hIST_SUPPORTED ++#define PNG_iCCP_SUPPORTED ++#define PNG_sRGB_SUPPORTED ++#define PNG_READ_zTXt_SUPPORTED ++#define PNG_gAMA_SUPPORTED ++#define PNG_pCAL_SUPPORTED ++#define PNG_CHECK_cHRM_SUPPORTED ++#define PNG_tIME_SUPPORTED ++#define PNG_pHYs_SUPPORTED ++#define PNG_READ_iTXt_SUPPORTED ++#define PNG_TEXT_SUPPORTED ++#define PNG_SAVE_INT_32_SUPPORTED ++#define PNG_sPLT_SUPPORTED ++#define PNG_tEXt_SUPPORTED ++#define PNG_zTXt_SUPPORTED ++#define PNG_iTXt_SUPPORTED ++/* end of options */ ++#endif /* PNGLCONF_H */ +--- misc/libpng-1.5.1/pngstruct.h 2011-02-03 05:58:17.000000000 +0100 ++++ misc/build/libpng-1.5.1/pngstruct.h 2011-03-02 16:28:53.289801400 +0100 +@@ -24,7 +24,11 @@ + * in this structure and is required for decompressing the LZ compressed + * data in PNG files. + */ ++#if defined MACOSX + #include "zlib.h" ++#else ++#include ++#endif + + struct png_struct_def + { +--- misc/libpng-1.5.1/pngtest.c 2011-02-03 05:58:17.000000000 +0100 ++++ misc/build/libpng-1.5.1/pngtest.c 2011-03-02 16:30:09.881914600 +0100 +@@ -31,7 +31,12 @@ + * of files at once by typing "pngtest -m file1.png file2.png ..." + */ + ++#if defined MACOSX + #include "zlib.h" ++#else ++#include ++#endif ++ + #include "png.h" + /* Copied from pngpriv.h but only used in error messages below. */ + #ifndef PNG_ZBUF_SIZE +--- misc/libpng-1.5.1/pngvalid.c 2011-02-03 05:58:17.000000000 +0100 ++++ misc/build/libpng-1.5.1/pngvalid.c 2011-03-02 19:15:38.583630100 +0100 +@@ -51,7 +51,11 @@ typedef png_byte *png_const_bytep; + #define PNG_READ_16BIT_SUPPORTED + #endif + +-#include "zlib.h" /* For crc32 */ ++#if defined MACOSX ++#include "zlib.h" ++#else ++#include ++#endif + + #include /* For floating point constants */ + #include /* For malloc */ + diff --git a/libpng/makefile.mk b/libpng/makefile.mk index 536ad653400f..7efaffed85e6 100644 --- a/libpng/makefile.mk +++ b/libpng/makefile.mk @@ -48,16 +48,14 @@ TARFILE_NAME=$(PRJNAME)-$(LIBPNGVERSION) TARFILE_MD5=220035f111ea045a51e290906025e8b5 PATCH_FILES=libpng.patch -ADDITIONAL_FILES=makefile.mk +ADDITIONAL_FILES=makefile.mk pnglibconf.h #relative to CONFIGURE_DIR BUILD_DIR=$(CONFIGURE_DIR) BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS) -OUT2INC=png.h \ - pngconfig.h \ - pnglibconfig.h +OUT2INC=png.h pnglibconf.h # --- Targets ------------------------------------------------------ diff --git a/libpng/prj/d.lst b/libpng/prj/d.lst index d6b93628d305..06189e99bbbc 100644 --- a/libpng/prj/d.lst +++ b/libpng/prj/d.lst @@ -1,12 +1,9 @@ -mkdir: %_DEST%\inc%_EXT%\libpng -..\%__SRC%\inc\png*.h %_DEST%\inc%_EXT%\libpng\png*.h +mkdir: %_DEST%\inc%_EXT%\external +mkdir: %_DEST%\inc%_EXT%\external\libpng + +..\%__SRC%\slb\libpng.lib %_DEST%\lib%_EXT%\libpng.lib +..\%__SRC%\lib\libpng.a %_DEST%\lib%_EXT%\libpng.a + +..\%__SRC%\inc\png.h %_DEST%\inc%_EXT%\external\libpng\png.h +..\%__SRC%\inc\pnglibconf.h %_DEST%\inc%_EXT%\external\libpng\pnglibconf.h -..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%\lib*.so -..\%__SRC%\lib\lib*.so.* %_DEST%\lib%_EXT%\lib*.so.* -..\%__SRC%\lib\lib*.dylib %_DEST%\lib%_EXT%\lib*.dylib -..\%__SRC%\lib\lib*.a %_DEST%\lib%_EXT%\lib*.a -..\%__SRC%\lib\lib*.la %_DEST%\lib%_EXT%\lib*.la -..\%__SRC%\lib\*.lib %_DEST%\lib%_EXT%\*.lib -..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll -..\%__SRC%\lib\*.dll %_DEST%\bin%_EXT%\*.dll -..\%__SRC%\bin\*.dll.a %_DEST%\lib%_EXT%\*.a -- cgit v1.2.3 From 6bd28d37ca6311ad2947e41fd8d92270cb77d4a8 Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Thu, 3 Mar 2011 11:22:14 +0100 Subject: rsvglibs: fontconfig added --- fontconfig/fontconfig-2.8.0.patch | 6622 +++++++++++++++++++++++++++++++++++++ fontconfig/makefile.mk | 74 + fontconfig/prj/build.lst | 3 + fontconfig/prj/d.lst | 3 + freetype/prj/d.lst | 1 - 5 files changed, 6702 insertions(+), 1 deletion(-) create mode 100644 fontconfig/fontconfig-2.8.0.patch create mode 100644 fontconfig/makefile.mk create mode 100644 fontconfig/prj/build.lst create mode 100644 fontconfig/prj/d.lst diff --git a/fontconfig/fontconfig-2.8.0.patch b/fontconfig/fontconfig-2.8.0.patch new file mode 100644 index 000000000000..d6d25a7b5557 --- /dev/null +++ b/fontconfig/fontconfig-2.8.0.patch @@ -0,0 +1,6622 @@ +--- misc/fontconfig-2.8.0/fc-cache/fc-cache.c Mon Jan 19 23:26:36 1970 ++++ misc/build/fontconfig-2.8.0/fc-cache/fc-cache.c Mon Jan 19 23:26:36 1970 +@@ -257,6 +257,9 @@ + FcBool remove; + FcCache *cache; + struct stat target_stat; ++#if defined (_WIN32) ++ struct stat aStat; ++#endif + + dir_base = FcStrPlus (dir, (FcChar8 *) "/"); + if (!dir_base) +@@ -264,14 +267,25 @@ + fprintf (stderr, "%s: out of memory\n", dir); + return FcFalse; + } ++#if defined (_WIN32) ++ if (stat ((char *) dir, &aStat) != 0) ++ { ++ if (verbose) ++ printf ("%s: not cleaning %s cache directory\n", dir, ++ access ((char *) dir, F_OK) == 0 ? "unwritable" : "non-existent"); ++ FcStrFree (dir_base); ++ return FcTrue; ++ } ++#else + if (access ((char *) dir, W_OK) != 0) + { +- if (verbose) +- printf ("%s: not cleaning %s cache directory\n", dir, +- access ((char *) dir, F_OK) == 0 ? "unwritable" : "non-existent"); +- FcStrFree (dir_base); +- return FcTrue; ++ if (verbose) ++ printf ("%s: not cleaning %s cache directory\n", dir, ++ access ((char *) dir, F_OK) == 0 ? "unwritable" : "non-existent"); ++ FcStrFree (dir_base); ++ return FcTrue; + } ++#endif + if (verbose) + printf ("%s: cleaning cache directory\n", dir); + d = opendir ((char *) dir); +--- misc/fontconfig-2.8.0/fontconfig/fontconfig.h Mon Jan 19 23:26:36 1970 ++++ misc/build/fontconfig-2.8.0/fontconfig/fontconfig.h Mon Jan 19 23:26:36 1970 +@@ -40,7 +40,7 @@ + #define FcPublic + #endif + +-typedef unsigned char FcChar8; ++typedef char FcChar8; + typedef unsigned short FcChar16; + typedef unsigned int FcChar32; + typedef int FcBool; +--- misc/fontconfig-2.8.0/src/fcatomic.c Mon Jan 19 23:26:36 1970 ++++ misc/build/fontconfig-2.8.0/src/fcatomic.c Mon Jan 19 23:26:36 1970 +@@ -56,7 +56,12 @@ + #include + + #ifdef _WIN32 ++#include ++#include ++#include + #define mkdir(path,mode) _mkdir(path) ++#define rmdir(path) _rmdir(path) ++#define unlink(path) _unlink(path) + #endif + + #define NEW_NAME ".NEW" +--- misc/fontconfig-2.8.0/src/fccache.c Mon Jan 19 23:26:36 1970 ++++ misc/build/fontconfig-2.8.0/src/fccache.c Mon Jan 19 23:26:36 1970 +@@ -22,6 +22,7 @@ + */ + + #include "fcint.h" ++ + #include "../fc-arch/fcarch.h" + #include + #include +@@ -34,9 +35,11 @@ + # include + #elif defined(_WIN32) + # define _WIN32_WINNT 0x0500 +-# include + #endif +- ++#include ++#include ++#include ++#include + #ifndef O_BINARY + #define O_BINARY 0 + #endif +@@ -809,6 +812,7 @@ + + + #ifdef _WIN32 ++#include + #define mkdir(path,mode) _mkdir(path) + #endif + +@@ -817,17 +821,28 @@ + { + FcChar8 *parent; + FcBool ret; ++#ifdef _WIN32 ++ struct stat aStat; ++#endif + + if (strlen ((char *) dir) == 0) + return FcFalse; + + parent = FcStrDirname (dir); + if (!parent) +- return FcFalse; ++ return FcFalse; ++#ifdef _WIN32 ++ if (stat ((char *) parent, &aStat) != 0) ++#else + if (access ((char *) parent, F_OK) == 0) +- ret = mkdir ((char *) dir, 0755) == 0 && chmod ((char *) dir, 0755) == 0; ++#endif ++ ret = mkdir ((char *) dir, 0755) == 0 && chmod ((char *) dir, 0755) == 0; ++#ifdef _WIN32 ++ else if (stat ((char *) parent, &aStat) != 0) ++#else + else if (access ((char *) parent, F_OK) == -1) +- ret = FcMakeDirectory (parent) && (mkdir ((char *) dir, 0755) == 0) && chmod ((char *) dir, 0755) == 0; ++#endif ++ ret = FcMakeDirectory (parent) && (mkdir ((char *) dir, 0755) == 0) && chmod ((char *) dir, 0755) == 0; + else + ret = FcFalse; + FcStrFree (parent); +@@ -850,6 +865,9 @@ + struct stat cache_stat; + int magic; + int written; ++#ifdef _WIN32 ++ struct stat aStat; ++#endif + + /* + * Write it to the first directory in the list which is writable +@@ -857,9 +875,13 @@ + + list = FcStrListCreate (config->cacheDirs); + if (!list) +- return FcFalse; ++ return FcFalse; + while ((test_dir = FcStrListNext (list))) { ++#ifdef _WIN32 ++ if (stat ((char *) test_dir, &aStat) != 0) ++#else + if (access ((char *) test_dir, W_OK|X_OK) == 0) ++#endif + { + cache_dir = test_dir; + break; +@@ -869,7 +891,11 @@ + /* + * If the directory doesn't exist, try to create it + */ ++#ifdef _WIN32 ++ if (stat ((char *) test_dir, &aStat) == -1){ ++#else + if (access ((char *) test_dir, F_OK) == -1) { ++#endif + if (FcMakeDirectory (test_dir)) + { + cache_dir = test_dir; +--- misc/fontconfig-2.8.0/src/fccfg.c Mon Jan 19 23:26:36 1970 ++++ misc/build/fontconfig-2.8.0/src/fccfg.c Mon Jan 19 23:26:36 1970 +@@ -1646,6 +1646,9 @@ + FcConfigFileExists (const FcChar8 *dir, const FcChar8 *file) + { + FcChar8 *path; ++#ifdef _WIN32 ++ struct stat aStat; ++#endif + + if (!dir) + dir = (FcChar8 *) ""; +@@ -1669,8 +1672,12 @@ + strcat ((char *) path, (char *) file); + + FcMemAlloc (FC_MEM_STRING, strlen ((char *) path) + 1); ++#ifdef _WIN32 ++ if (stat ((char *) path, &aStat) == 0) ++#else + if (access ((char *) path, R_OK) == 0) +- return path; ++#endif ++ return path; + + FcStrFree (path); + return 0; +--- misc/fontconfig-2.8.0/src/fcformat.c Mon Jan 19 23:26:36 1970 ++++ misc/build/fontconfig-2.8.0/src/fcformat.c Mon Jan 19 23:26:36 1970 +@@ -26,7 +26,11 @@ + #include + #include + #include ++#include + ++#ifdef _WIN32 ++#define snprintf(a1,a2,a3,a4) _snprintf(a1,a2,a3,a4) ++#endif + + /* The language is documented in doc/fcformat.fncs + * These are the features implemented: +--- misc/fontconfig-2.8.0/src/fcint.h Mon Jan 19 23:26:36 1970 ++++ misc/build/fontconfig-2.8.0/src/fcint.h Mon Jan 19 23:26:36 1970 +@@ -31,6 +31,15 @@ + + #include + #include ++#ifdef _MSC_VER ++ ++typedef __int32 int32_t; ++typedef unsigned __int32 uint32_t; ++typedef __int64 int64_t; ++typedef unsigned __int64 uint64_t; ++typedef __int16 int16_t; ++#define ulink _ulink ++#else + #ifdef HAVE_INTTYPES_H + #include + #elif defined(HAVE_STDINT_H) +@@ -38,6 +47,9 @@ + #else + #error missing C99 integer data types + #endif ++#endif ++ ++ + #include + #include + #include +--- misc/fontconfig-2.8.0/src/fcxml.c Mon Jan 19 23:26:36 1970 ++++ misc/build/fontconfig-2.8.0/src/fcxml.c Mon Jan 19 23:26:36 1970 +@@ -27,6 +27,11 @@ + #include + #include + ++#ifdef _WIN32 ++#include ++#define open(path,oflag) _open(path,oflag) ++#endif ++ + #ifdef ENABLE_LIBXML2 + + #include +--- misc/fontconfig-2.8.0/config.h Wed Aug 20 14:33:55 2008 ++++ misc/build/fontconfig-2.8.0/config.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,202 @@ +-dummy ++/* config.h. Generated from config.h.in by configure. */ ++/* config.h.in. Generated from configure.in by autoheader. */ ++ ++/* Font configuration directory */ ++#define CONFDIR "${sysconfdir}/fonts" ++ ++/* Use libxml2 instead of Expat */ ++#define ENABLE_LIBXML2 1 ++ ++/* Additional font directories */ ++#define FC_ADD_FONTS "yes" ++ ++/* System font directory */ ++#define FC_DEFAULT_FONTS "/usr/share/fonts" ++ ++/* Define to 1 if you have the `chsize' function. */ ++#define HAVE_CHSIZE 1 ++ ++/* Define to 1 if you have the header file, and it defines `DIR'. ++ */ ++#define HAVE_DIRENT_H 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_DLFCN_H */ ++ ++/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ ++/* #undef HAVE_DOPRNT */ ++ ++/* Found a useable expat library */ ++/* #undef HAVE_EXPAT */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_FCNTL_H 1 ++ ++/* Define to 1 if you have the `ftruncate' function. */ ++/* #undef HAVE_FTRUNCATE */ ++ ++/* FT_Bitmap_Size structure includes y_ppem field */ ++#define HAVE_FT_BITMAP_SIZE_Y_PPEM 1 ++ ++/* Define to 1 if you have the `FT_Get_BDF_Property' function. */ ++#define HAVE_FT_GET_BDF_PROPERTY 1 ++ ++/* Define to 1 if you have the `FT_Get_Next_Char' function. */ ++#define HAVE_FT_GET_NEXT_CHAR 1 ++ ++/* Define to 1 if you have the `FT_Get_PS_Font_Info' function. */ ++#define HAVE_FT_GET_PS_FONT_INFO 1 ++ ++/* Define to 1 if you have the `FT_Get_X11_Font_Format' function. */ ++#define HAVE_FT_GET_X11_FONT_FORMAT 1 ++ ++/* Define to 1 if you have the `FT_Has_PS_Glyph_Names' function. */ ++#define HAVE_FT_HAS_PS_GLYPH_NAMES 1 ++ ++/* Define to 1 if you have the `FT_Select_Size' function. */ ++#define HAVE_FT_SELECT_SIZE 1 ++ ++/* Define to 1 if you have the `geteuid' function. */ ++/* #undef HAVE_GETEUID */ ++ ++/* Define to 1 if you have the `getopt' function. */ ++/* #undef HAVE_GETOPT */ ++ ++/* Define to 1 if you have the `getopt_long' function. */ ++/* #undef HAVE_GETOPT_LONG */ ++ ++/* Define to 1 if you have the `getpagesize' function. */ ++/* #undef HAVE_GETPAGESIZE */ ++ ++/* Define to 1 if you have the `getuid' function. */ ++/* #undef HAVE_GETUID */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_INTTYPES_H */ ++ ++/* Define to 1 if you have the `link' function. */ ++/* #undef HAVE_LINK */ ++ ++/* Define to 1 if you have the `lrand48' function. */ ++/* #undef HAVE_LRAND48 */ ++ ++/* Define to 1 if you have the `memmove' function. */ ++#define HAVE_MEMMOVE 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_MEMORY_H 1 ++ ++/* Define to 1 if you have the `memset' function. */ ++#define HAVE_MEMSET 1 ++ ++/* Define to 1 if you have the `mkstemp' function. */ ++/* #undef HAVE_MKSTEMP */ ++ ++/* Define to 1 if you have a working `mmap' system call. */ ++/* #undef HAVE_MMAP */ ++ ++/* Define to 1 if you have the header file, and it defines `DIR'. */ ++/* #undef HAVE_NDIR_H */ ++ ++/* Define to 1 if you have the `rand' function. */ ++#define HAVE_RAND 1 ++ ++/* Define to 1 if you have the `random' function. */ ++/* #undef HAVE_RANDOM */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_STDINT_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STDLIB_H 1 ++ ++/* Define to 1 if you have the `strchr' function. */ ++#define HAVE_STRCHR 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_STRINGS_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STRING_H 1 ++ ++/* Define to 1 if you have the `strrchr' function. */ ++#define HAVE_STRRCHR 1 ++ ++/* Define to 1 if you have the `strtol' function. */ ++#define HAVE_STRTOL 1 ++ ++/* Define to 1 if you have the `sysconf' function. */ ++/* #undef HAVE_SYSCONF */ ++ ++/* Define to 1 if you have the header file, and it defines `DIR'. ++ */ ++/* #undef HAVE_SYS_DIR_H */ ++ ++/* Define to 1 if you have the header file, and it defines `DIR'. ++ */ ++/* #undef HAVE_SYS_NDIR_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_STAT_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_TYPES_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_UNISTD_H 1 ++ ++/* Define to 1 if you have the `vprintf' function. */ ++#define HAVE_VPRINTF 1 ++ ++/* Can use #warning in C files */ ++/* #undef HAVE_WARNING_CPP_DIRECTIVE */ ++ ++/* Use xmlparse.h instead of expat.h */ ++/* #undef HAVE_XMLPARSE_H */ ++ ++/* Define to 1 if you have the `XML_SetDoctypeDeclHandler' function. */ ++/* #undef HAVE_XML_SETDOCTYPEDECLHANDLER */ ++ ++/* Define to the sub-directory in which libtool stores uninstalled libraries. ++ */ ++#define LT_OBJDIR ".libs/" ++ ++/* Name of package */ ++#define PACKAGE "fontconfig" ++ ++/* Define to the address where bug reports for this package should be sent. */ ++#define PACKAGE_BUGREPORT "" ++ ++/* Define to the full name of this package. */ ++#define PACKAGE_NAME "" ++ ++/* Define to the full name and version of this package. */ ++#define PACKAGE_STRING "" ++ ++/* Define to the one symbol short name of this package. */ ++#define PACKAGE_TARNAME "" ++ ++/* Define to the version of this package. */ ++#define PACKAGE_VERSION "" ++ ++/* Define to 1 if you have the ANSI C header files. */ ++#define STDC_HEADERS 1 ++ ++/* Use iconv. */ ++#define USE_ICONV 0 ++ ++/* Version number of package */ ++#define VERSION "2.8.0" ++ ++/* Define to empty if `const' does not conform to ANSI C. */ ++/* #undef const */ ++ ++/* Define to `__inline__' or `__inline' if that's what the C compiler ++ calls it, or to nothing if 'inline' is not supported under any name. */ ++#ifndef __cplusplus ++#define inline __inline ++#endif ++ ++/* Define to `int' if does not define. */ ++#define pid_t int ++ +--- misc/fontconfig-2.8.0/fc-arch/fcalias.h Wed Aug 20 14:33:55 2008 ++++ misc/build/fontconfig-2.8.0/fc-arch/fcalias.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,1 @@ +-dummy ++ +--- misc/fontconfig-2.8.0/fc-arch/fcaliastail.h Wed Aug 20 14:33:55 2008 ++++ misc/build/fontconfig-2.8.0/fc-arch/fcaliastail.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,1 @@ +-dummy ++ +--- misc/fontconfig-2.8.0/fc-arch/fcarch.h Wed Aug 20 14:33:55 2008 ++++ misc/build/fontconfig-2.8.0/fc-arch/fcarch.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,24 @@ +-dummy ++/* ++ * Copyright © 2006 Keith Packard ++ * ++ * Permission to use, copy, modify, distribute, and sell this software and its ++ * documentation for any purpose is hereby granted without fee, provided that ++ * the above copyright notice appear in all copies and that both that ++ * copyright notice and this permission notice appear in supporting ++ * documentation, and that the name of Keith Packard not be used in ++ * advertising or publicity pertaining to distribution of the software without ++ * specific, written prior permission. Keith Packard makes no ++ * representations about the suitability of this software for any purpose. It ++ * is provided "as is" without express or implied warranty. ++ * ++ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, ++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO ++ * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR ++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, ++ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ++ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ++ * PERFORMANCE OF THIS SOFTWARE. ++ */ ++ ++#define FC_ARCHITECTURE "le32d8" ++ +--- misc/fontconfig-2.8.0/fc-glyphname$/fcglyphname.h Wed Aug 20 14:33:55 2008 ++++ misc/build/fontconfig-2.8.0/fc-glyphname/fcglyphname.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,782 @@ +-dummy ++/* ++ * fontconfig/fc-glyphname/fcglyphname.tmpl.h ++ * ++ * Copyright © 2003 Keith Packard ++ * ++ * Permission to use, copy, modify, distribute, and sell this software and its ++ * documentation for any purpose is hereby granted without fee, provided that ++ * the above copyright notice appear in all copies and that both that ++ * copyright notice and this permission notice appear in supporting ++ * documentation, and that the name of Keith Packard not be used in ++ * advertising or publicity pertaining to distribution of the software without ++ * specific, written prior permission. Keith Packard makes no ++ * representations about the suitability of this software for any purpose. It ++ * is provided "as is" without express or implied warranty. ++ * ++ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, ++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO ++ * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR ++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, ++ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ++ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ++ * PERFORMANCE OF THIS SOFTWARE. ++ */ ++ ++/* 201 glyphnames in 271 entries, 74% occupancy */ ++ ++#define FC_GLYPHNAME_HASH 271 ++#define FC_GLYPHNAME_REHASH 269 ++#define FC_GLYPHNAME_MAXLEN 4 ++ ++typedef int16_t FcGlyphId; ++ ++static const struct { const FcChar32 ucs; const FcChar8 name[5]; } _fc_glyph_names[201] = { ++ { 0x2701, "a1" }, ++ { 0x2721, "a10" }, ++ { 0x275e, "a100" }, ++ { 0x2761, "a101" }, ++ { 0x2762, "a102" }, ++ { 0x2763, "a103" }, ++ { 0x2764, "a104" }, ++ { 0x2710, "a105" }, ++ { 0x2765, "a106" }, ++ { 0x2766, "a107" }, ++ { 0x2767, "a108" }, ++ { 0x2660, "a109" }, ++ { 0x261b, "a11" }, ++ { 0x2665, "a110" }, ++ { 0x2666, "a111" }, ++ { 0x2663, "a112" }, ++ { 0x2709, "a117" }, ++ { 0x2708, "a118" }, ++ { 0x2707, "a119" }, ++ { 0x261e, "a12" }, ++ { 0x2460, "a120" }, ++ { 0x2461, "a121" }, ++ { 0x2462, "a122" }, ++ { 0x2463, "a123" }, ++ { 0x2464, "a124" }, ++ { 0x2465, "a125" }, ++ { 0x2466, "a126" }, ++ { 0x2467, "a127" }, ++ { 0x2468, "a128" }, ++ { 0x2469, "a129" }, ++ { 0x270c, "a13" }, ++ { 0x2776, "a130" }, ++ { 0x2777, "a131" }, ++ { 0x2778, "a132" }, ++ { 0x2779, "a133" }, ++ { 0x277a, "a134" }, ++ { 0x277b, "a135" }, ++ { 0x277c, "a136" }, ++ { 0x277d, "a137" }, ++ { 0x277e, "a138" }, ++ { 0x277f, "a139" }, ++ { 0x270d, "a14" }, ++ { 0x2780, "a140" }, ++ { 0x2781, "a141" }, ++ { 0x2782, "a142" }, ++ { 0x2783, "a143" }, ++ { 0x2784, "a144" }, ++ { 0x2785, "a145" }, ++ { 0x2786, "a146" }, ++ { 0x2787, "a147" }, ++ { 0x2788, "a148" }, ++ { 0x2789, "a149" }, ++ { 0x270e, "a15" }, ++ { 0x278a, "a150" }, ++ { 0x278b, "a151" }, ++ { 0x278c, "a152" }, ++ { 0x278d, "a153" }, ++ { 0x278e, "a154" }, ++ { 0x278f, "a155" }, ++ { 0x2790, "a156" }, ++ { 0x2791, "a157" }, ++ { 0x2792, "a158" }, ++ { 0x2793, "a159" }, ++ { 0x270f, "a16" }, ++ { 0x2794, "a160" }, ++ { 0x2192, "a161" }, ++ { 0x27a3, "a162" }, ++ { 0x2194, "a163" }, ++ { 0x2195, "a164" }, ++ { 0x2799, "a165" }, ++ { 0x279b, "a166" }, ++ { 0x279c, "a167" }, ++ { 0x279d, "a168" }, ++ { 0x279e, "a169" }, ++ { 0x2711, "a17" }, ++ { 0x279f, "a170" }, ++ { 0x27a0, "a171" }, ++ { 0x27a1, "a172" }, ++ { 0x27a2, "a173" }, ++ { 0x27a4, "a174" }, ++ { 0x27a5, "a175" }, ++ { 0x27a6, "a176" }, ++ { 0x27a7, "a177" }, ++ { 0x27a8, "a178" }, ++ { 0x27a9, "a179" }, ++ { 0x2712, "a18" }, ++ { 0x27ab, "a180" }, ++ { 0x27ad, "a181" }, ++ { 0x27af, "a182" }, ++ { 0x27b2, "a183" }, ++ { 0x27b3, "a184" }, ++ { 0x27b5, "a185" }, ++ { 0x27b8, "a186" }, ++ { 0x27ba, "a187" }, ++ { 0x27bb, "a188" }, ++ { 0x27bc, "a189" }, ++ { 0x2713, "a19" }, ++ { 0x27bd, "a190" }, ++ { 0x27be, "a191" }, ++ { 0x279a, "a192" }, ++ { 0x27aa, "a193" }, ++ { 0x27b6, "a194" }, ++ { 0x27b9, "a195" }, ++ { 0x2798, "a196" }, ++ { 0x27b4, "a197" }, ++ { 0x27b7, "a198" }, ++ { 0x27ac, "a199" }, ++ { 0x2702, "a2" }, ++ { 0x2714, "a20" }, ++ { 0x27ae, "a200" }, ++ { 0x27b1, "a201" }, ++ { 0x2703, "a202" }, ++ { 0x2750, "a203" }, ++ { 0x2752, "a204" }, ++ { 0x276e, "a205" }, ++ { 0x2770, "a206" }, ++ { 0x2715, "a21" }, ++ { 0x2716, "a22" }, ++ { 0x2717, "a23" }, ++ { 0x2718, "a24" }, ++ { 0x2719, "a25" }, ++ { 0x271a, "a26" }, ++ { 0x271b, "a27" }, ++ { 0x271c, "a28" }, ++ { 0x2722, "a29" }, ++ { 0x2704, "a3" }, ++ { 0x2723, "a30" }, ++ { 0x2724, "a31" }, ++ { 0x2725, "a32" }, ++ { 0x2726, "a33" }, ++ { 0x2727, "a34" }, ++ { 0x2605, "a35" }, ++ { 0x2729, "a36" }, ++ { 0x272a, "a37" }, ++ { 0x272b, "a38" }, ++ { 0x272c, "a39" }, ++ { 0x260e, "a4" }, ++ { 0x272d, "a40" }, ++ { 0x272e, "a41" }, ++ { 0x272f, "a42" }, ++ { 0x2730, "a43" }, ++ { 0x2731, "a44" }, ++ { 0x2732, "a45" }, ++ { 0x2733, "a46" }, ++ { 0x2734, "a47" }, ++ { 0x2735, "a48" }, ++ { 0x2736, "a49" }, ++ { 0x2706, "a5" }, ++ { 0x2737, "a50" }, ++ { 0x2738, "a51" }, ++ { 0x2739, "a52" }, ++ { 0x273a, "a53" }, ++ { 0x273b, "a54" }, ++ { 0x273c, "a55" }, ++ { 0x273d, "a56" }, ++ { 0x273e, "a57" }, ++ { 0x273f, "a58" }, ++ { 0x2740, "a59" }, ++ { 0x271d, "a6" }, ++ { 0x2741, "a60" }, ++ { 0x2742, "a61" }, ++ { 0x2743, "a62" }, ++ { 0x2744, "a63" }, ++ { 0x2745, "a64" }, ++ { 0x2746, "a65" }, ++ { 0x2747, "a66" }, ++ { 0x2748, "a67" }, ++ { 0x2749, "a68" }, ++ { 0x274a, "a69" }, ++ { 0x271e, "a7" }, ++ { 0x274b, "a70" }, ++ { 0x25cf, "a71" }, ++ { 0x274d, "a72" }, ++ { 0x25a0, "a73" }, ++ { 0x274f, "a74" }, ++ { 0x2751, "a75" }, ++ { 0x25b2, "a76" }, ++ { 0x25bc, "a77" }, ++ { 0x25c6, "a78" }, ++ { 0x2756, "a79" }, ++ { 0x271f, "a8" }, ++ { 0x25d7, "a81" }, ++ { 0x2758, "a82" }, ++ { 0x2759, "a83" }, ++ { 0x275a, "a84" }, ++ { 0x276f, "a85" }, ++ { 0x2771, "a86" }, ++ { 0x2772, "a87" }, ++ { 0x2773, "a88" }, ++ { 0x2768, "a89" }, ++ { 0x2720, "a9" }, ++ { 0x2769, "a90" }, ++ { 0x276c, "a91" }, ++ { 0x276d, "a92" }, ++ { 0x276a, "a93" }, ++ { 0x276b, "a94" }, ++ { 0x2774, "a95" }, ++ { 0x2775, "a96" }, ++ { 0x275b, "a97" }, ++ { 0x275c, "a98" }, ++ { 0x275d, "a99" }, ++}; ++static const FcGlyphId _fc_name_to_ucs[271] = { ++ 123, ++ 81, ++ 198, ++ 154, ++ 142, ++ 186, ++ 82, ++ -1, ++ 143, ++ 172, ++ 181, ++ 79, ++ 153, ++ 191, ++ -1, ++ -1, ++ 80, ++ 195, ++ 179, ++ 170, ++ 151, ++ 129, ++ 101, ++ 194, ++ 85, ++ 102, ++ 73, ++ 171, ++ 99, ++ -1, ++ -1, ++ 100, ++ 196, ++ -1, ++ 189, ++ 163, ++ 110, ++ 199, ++ -1, ++ -1, ++ 59, ++ 50, ++ -1, ++ 60, ++ 75, ++ -1, ++ 51, ++ -1, ++ -1, ++ 58, ++ -1, ++ 61, ++ 55, ++ -1, ++ 192, ++ 56, ++ 62, ++ -1, ++ 53, ++ 166, ++ 113, ++ 54, ++ -1, ++ 157, ++ 33, ++ 188, ++ 177, ++ 21, ++ -1, ++ -1, ++ 31, ++ -1, ++ -1, ++ 32, ++ -1, ++ -1, ++ 24, ++ 160, ++ -1, ++ 38, ++ -1, ++ -1, ++ 26, ++ -1, ++ 161, ++ 27, ++ 197, ++ 94, ++ 95, ++ 105, ++ 106, ++ 90, ++ 91, ++ 92, ++ 93, ++ 86, ++ 87, ++ 88, ++ 89, ++ 28, ++ 29, ++ 39, ++ 40, ++ 10, ++ 11, ++ 17, ++ 18, ++ 6, ++ 7, ++ 8, ++ 9, ++ 2, ++ 3, ++ 4, ++ 5, ++ -1, ++ -1, ++ 114, ++ 108, ++ 146, ++ 74, ++ -1, ++ 117, ++ 115, ++ 118, ++ 156, ++ 119, ++ -1, ++ 120, ++ -1, ++ 121, ++ 131, ++ 122, ++ -1, ++ 109, ++ -1, ++ 124, ++ 141, ++ 134, ++ 174, ++ 144, ++ -1, ++ 137, ++ 155, ++ 138, ++ -1, ++ 64, ++ -1, ++ 140, ++ 152, ++ 65, ++ -1, ++ 111, ++ -1, ++ 57, ++ 162, ++ -1, ++ -1, ++ 67, ++ -1, ++ -1, ++ 150, ++ 68, ++ -1, ++ 167, ++ -1, ++ 69, ++ 164, ++ -1, ++ 116, ++ 70, ++ -1, ++ -1, ++ 148, ++ 71, ++ -1, ++ -1, ++ 184, ++ 72, ++ 149, ++ 176, ++ 193, ++ 34, ++ 182, ++ 145, ++ -1, ++ 83, ++ 187, ++ -1, ++ 103, ++ 84, ++ 104, ++ 200, ++ 63, ++ 37, ++ 41, ++ 52, ++ 19, ++ 30, ++ 1, ++ 12, ++ 97, ++ 35, ++ 98, ++ 135, ++ 46, ++ 36, ++ 47, ++ 96, ++ 48, ++ 159, ++ 49, ++ -1, ++ 42, ++ 112, ++ 43, ++ 173, ++ 44, ++ 168, ++ 45, ++ -1, ++ 20, ++ 183, ++ 16, ++ 147, ++ 22, ++ 178, ++ 23, ++ -1, ++ 15, ++ -1, ++ 25, ++ 190, ++ 13, ++ 139, ++ 14, ++ -1, ++ -1, ++ -1, ++ 128, ++ 107, ++ 125, ++ -1, ++ 0, ++ 158, ++ 169, ++ 136, ++ 126, ++ -1, ++ -1, ++ 180, ++ 127, ++ 77, ++ -1, ++ -1, ++ 132, ++ -1, ++ 78, ++ -1, ++ 133, ++ -1, ++ 165, ++ 66, ++ 130, ++ -1, ++ -1, ++ -1, ++ 76, ++ -1, ++ 185, ++ 175, ++}; ++static const FcGlyphId _fc_ucs_to_name[271] = { ++ 56, ++ 135, ++ 19, ++ 138, ++ 58, ++ 140, ++ 59, ++ 142, ++ 60, ++ 144, ++ 61, ++ 146, ++ 62, ++ 149, ++ 64, ++ 151, ++ 152, ++ 153, ++ 154, ++ 155, ++ 156, ++ 157, ++ 159, ++ 160, ++ 161, ++ 162, ++ 163, ++ 131, ++ 165, ++ 166, ++ 167, ++ 168, ++ 170, ++ -1, ++ 172, ++ -1, ++ 174, ++ 112, ++ 175, ++ 113, ++ -1, ++ 173, ++ -1, ++ 179, ++ -1, ++ 182, ++ 183, ++ 158, ++ 198, ++ 199, ++ 200, ++ 2, ++ -1, ++ -1, ++ 3, ++ 4, ++ 5, ++ 6, ++ 8, ++ 9, ++ 10, ++ 189, ++ 164, ++ 194, ++ 195, ++ 192, ++ 193, ++ 114, ++ 11, ++ 115, ++ 186, ++ 15, ++ 188, ++ 13, ++ 14, ++ 31, ++ 32, ++ 33, ++ 34, ++ 35, ++ 36, ++ 37, ++ 38, ++ 39, ++ 40, ++ 42, ++ 43, ++ 44, ++ 45, ++ 46, ++ 47, ++ 48, ++ 49, ++ 50, ++ 51, ++ 53, ++ 54, ++ 55, ++ 20, ++ 21, ++ 22, ++ 23, ++ 24, ++ 25, ++ 26, ++ 27, ++ 28, ++ 29, ++ -1, ++ 103, ++ 69, ++ 99, ++ 70, ++ 71, ++ 72, ++ 73, ++ 75, ++ 76, ++ 77, ++ 78, ++ 66, ++ 79, ++ 80, ++ 81, ++ 82, ++ 83, ++ 84, ++ 100, ++ 86, ++ 106, ++ 87, ++ 109, ++ 88, ++ -1, ++ 110, ++ 89, ++ 90, ++ 104, ++ 91, ++ 101, ++ 105, ++ 92, ++ 102, ++ 93, ++ 94, ++ 95, ++ 97, ++ 98, ++ 196, ++ -1, ++ 134, ++ -1, ++ -1, ++ -1, ++ -1, ++ -1, ++ 137, ++ -1, ++ -1, ++ -1, ++ -1, ++ -1, ++ 139, ++ -1, ++ -1, ++ 176, ++ -1, ++ -1, ++ 141, ++ 184, ++ -1, ++ -1, ++ -1, ++ -1, ++ 143, ++ 177, ++ 57, ++ -1, ++ -1, ++ -1, ++ 145, ++ -1, ++ -1, ++ -1, ++ -1, ++ 178, ++ 148, ++ -1, ++ -1, ++ -1, ++ -1, ++ -1, ++ 150, ++ 65, ++ 171, ++ 67, ++ 68, ++ -1, ++ -1, ++ 191, ++ -1, ++ -1, ++ 181, ++ -1, ++ -1, ++ -1, ++ -1, ++ -1, ++ -1, ++ -1, ++ -1, ++ 185, ++ -1, ++ -1, ++ -1, ++ -1, ++ -1, ++ 187, ++ -1, ++ -1, ++ -1, ++ 133, ++ -1, ++ 197, ++ -1, ++ -1, ++ -1, ++ -1, ++ -1, ++ 0, ++ 107, ++ 111, ++ 125, ++ -1, ++ 147, ++ 18, ++ 17, ++ 16, ++ -1, ++ -1, ++ 30, ++ 41, ++ 52, ++ 63, ++ 7, ++ 74, ++ 85, ++ 96, ++ 108, ++ 116, ++ 117, ++ 118, ++ 119, ++ 120, ++ 121, ++ 122, ++ 123, ++ 136, ++ 169, ++ 180, ++ 190, ++ 1, ++ 124, ++ 126, ++ 127, ++ 128, ++ 129, ++ 130, ++ -1, ++ 132, ++ 12, ++}; ++ +--- misc/fontconfig-2.8.0/fc-lang/fclang.h Wed Aug 20 14:33:55 2008 ++++ misc/build/fontconfig-2.8.0/fc-lang/fclang.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,4086 @@ +-dummy ++/* ++ * fontconfig/fc-lang/fclang.tmpl.h ++ * ++ * Copyright © 2002 Keith Packard ++ * ++ * Permission to use, copy, modify, distribute, and sell this software and its ++ * documentation for any purpose is hereby granted without fee, provided that ++ * the above copyright notice appear in all copies and that both that ++ * copyright notice and this permission notice appear in supporting ++ * documentation, and that the name of Keith Packard not be used in ++ * advertising or publicity pertaining to distribution of the software without ++ * specific, written prior permission. Keith Packard makes no ++ * representations about the suitability of this software for any purpose. It ++ * is provided "as is" without express or implied warranty. ++ * ++ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, ++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO ++ * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR ++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, ++ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ++ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ++ * PERFORMANCE OF THIS SOFTWARE. ++ */ ++ ++/* total size: 903 unique leaves: 608 */ ++ ++#define LEAF0 (238 * sizeof (FcLangCharSet)) ++#define OFF0 (LEAF0 + 608 * sizeof (FcCharLeaf)) ++#define NUM0 (OFF0 + 657 * sizeof (intptr_t)) ++#define SET(n) (n * sizeof (FcLangCharSet) + offsetof (FcLangCharSet, charset)) ++#define OFF(s,o) (OFF0 + o * sizeof (intptr_t) - SET(s)) ++#define NUM(s,n) (NUM0 + n * sizeof (FcChar16) - SET(s)) ++#define LEAF(o,l) (LEAF0 + l * sizeof (FcCharLeaf) - (OFF0 + o * sizeof (intptr_t))) ++#define fcLangCharSets (fcLangData.langCharSets) ++#define fcLangCharSetIndices (fcLangData.langIndices) ++#define fcLangCharSetIndicesInv (fcLangData.langIndicesInv) ++ ++static const struct { ++ FcLangCharSet langCharSets[238]; ++ FcCharLeaf leaves[608]; ++ intptr_t leaf_offsets[657]; ++ FcChar16 numbers[657]; ++ FcChar8 langIndices[238]; ++ FcChar8 langIndicesInv[238]; ++} fcLangData = { ++{ ++ { "aa", { FC_REF_CONSTANT, 1, OFF(0,0), NUM(0,0) } }, /* 0 */ ++ { "ab", { FC_REF_CONSTANT, 1, OFF(1,1), NUM(1,1) } }, /* 1 */ ++ { "af", { FC_REF_CONSTANT, 2, OFF(2,2), NUM(2,2) } }, /* 2 */ ++ { "ak", { FC_REF_CONSTANT, 5, OFF(3,4), NUM(3,4) } }, /* 3 */ ++ { "am", { FC_REF_CONSTANT, 2, OFF(4,9), NUM(4,9) } }, /* 4 */ ++ { "an", { FC_REF_CONSTANT, 1, OFF(5,11), NUM(5,11) } }, /* 5 */ ++ { "ar", { FC_REF_CONSTANT, 1, OFF(6,12), NUM(6,12) } }, /* 6 */ ++ { "as", { FC_REF_CONSTANT, 1, OFF(7,13), NUM(7,13) } }, /* 7 */ ++ { "ast", { FC_REF_CONSTANT, 1, OFF(8,11), NUM(8,11) } }, /* 8 */ ++ { "av", { FC_REF_CONSTANT, 1, OFF(9,14), NUM(9,14) } }, /* 9 */ ++ { "ay", { FC_REF_CONSTANT, 1, OFF(10,15), NUM(10,15) } }, /* 10 */ ++ { "az-az", { FC_REF_CONSTANT, 3, OFF(11,16), NUM(11,16) } }, /* 11 */ ++ { "az-ir", { FC_REF_CONSTANT, 1, OFF(12,19), NUM(12,19) } }, /* 12 */ ++ { "ba", { FC_REF_CONSTANT, 1, OFF(13,20), NUM(13,20) } }, /* 13 */ ++ { "be", { FC_REF_CONSTANT, 1, OFF(14,21), NUM(14,21) } }, /* 14 */ ++ { "ber-dz", { FC_REF_CONSTANT, 4, OFF(15,22), NUM(15,22) } }, /* 15 */ ++ { "ber-ma", { FC_REF_CONSTANT, 1, OFF(16,26), NUM(16,26) } }, /* 16 */ ++ { "bg", { FC_REF_CONSTANT, 1, OFF(17,27), NUM(17,27) } }, /* 17 */ ++ { "bh", { FC_REF_CONSTANT, 1, OFF(18,28), NUM(18,28) } }, /* 18 */ ++ { "bho", { FC_REF_CONSTANT, 1, OFF(19,28), NUM(19,28) } }, /* 19 */ ++ { "bi", { FC_REF_CONSTANT, 1, OFF(20,29), NUM(20,29) } }, /* 20 */ ++ { "bin", { FC_REF_CONSTANT, 3, OFF(21,30), NUM(21,30) } }, /* 21 */ ++ { "bm", { FC_REF_CONSTANT, 3, OFF(22,33), NUM(22,33) } }, /* 22 */ ++ { "bn", { FC_REF_CONSTANT, 1, OFF(23,36), NUM(23,36) } }, /* 23 */ ++ { "bo", { FC_REF_CONSTANT, 1, OFF(24,37), NUM(24,37) } }, /* 24 */ ++ { "br", { FC_REF_CONSTANT, 1, OFF(25,38), NUM(25,38) } }, /* 25 */ ++ { "bs", { FC_REF_CONSTANT, 2, OFF(26,39), NUM(26,39) } }, /* 26 */ ++ { "bua", { FC_REF_CONSTANT, 1, OFF(27,41), NUM(27,41) } }, /* 27 */ ++ { "byn", { FC_REF_CONSTANT, 2, OFF(28,42), NUM(28,42) } }, /* 28 */ ++ { "ca", { FC_REF_CONSTANT, 2, OFF(29,44), NUM(29,44) } }, /* 29 */ ++ { "ce", { FC_REF_CONSTANT, 1, OFF(30,14), NUM(30,14) } }, /* 30 */ ++ { "ch", { FC_REF_CONSTANT, 1, OFF(31,46), NUM(31,46) } }, /* 31 */ ++ { "chm", { FC_REF_CONSTANT, 1, OFF(32,47), NUM(32,47) } }, /* 32 */ ++ { "chr", { FC_REF_CONSTANT, 1, OFF(33,48), NUM(33,48) } }, /* 33 */ ++ { "co", { FC_REF_CONSTANT, 2, OFF(34,49), NUM(34,49) } }, /* 34 */ ++ { "crh", { FC_REF_CONSTANT, 2, OFF(35,51), NUM(35,51) } }, /* 35 */ ++ { "cs", { FC_REF_CONSTANT, 2, OFF(36,53), NUM(36,53) } }, /* 36 */ ++ { "csb", { FC_REF_CONSTANT, 2, OFF(37,55), NUM(37,55) } }, /* 37 */ ++ { "cu", { FC_REF_CONSTANT, 1, OFF(38,57), NUM(38,57) } }, /* 38 */ ++ { "cv", { FC_REF_CONSTANT, 2, OFF(39,58), NUM(39,58) } }, /* 39 */ ++ { "cy", { FC_REF_CONSTANT, 3, OFF(40,60), NUM(40,60) } }, /* 40 */ ++ { "da", { FC_REF_CONSTANT, 1, OFF(41,63), NUM(41,63) } }, /* 41 */ ++ { "de", { FC_REF_CONSTANT, 1, OFF(42,64), NUM(42,64) } }, /* 42 */ ++ { "dv", { FC_REF_CONSTANT, 1, OFF(43,65), NUM(43,65) } }, /* 43 */ ++ { "dz", { FC_REF_CONSTANT, 1, OFF(44,37), NUM(44,37) } }, /* 44 */ ++ { "ee", { FC_REF_CONSTANT, 4, OFF(45,66), NUM(45,66) } }, /* 45 */ ++ { "el", { FC_REF_CONSTANT, 1, OFF(46,70), NUM(46,70) } }, /* 46 */ ++ { "en", { FC_REF_CONSTANT, 1, OFF(47,71), NUM(47,71) } }, /* 47 */ ++ { "eo", { FC_REF_CONSTANT, 2, OFF(48,72), NUM(48,72) } }, /* 48 */ ++ { "es", { FC_REF_CONSTANT, 1, OFF(49,11), NUM(49,11) } }, /* 49 */ ++ { "et", { FC_REF_CONSTANT, 2, OFF(50,74), NUM(50,74) } }, /* 50 */ ++ { "eu", { FC_REF_CONSTANT, 1, OFF(51,76), NUM(51,76) } }, /* 51 */ ++ { "fa", { FC_REF_CONSTANT, 1, OFF(52,19), NUM(52,19) } }, /* 52 */ ++ { "fat", { FC_REF_CONSTANT, 5, OFF(53,4), NUM(53,4) } }, /* 53 */ ++ { "ff", { FC_REF_CONSTANT, 3, OFF(54,77), NUM(54,77) } }, /* 54 */ ++ { "fi", { FC_REF_CONSTANT, 2, OFF(55,80), NUM(55,80) } }, /* 55 */ ++ { "fil", { FC_REF_CONSTANT, 1, OFF(56,82), NUM(56,82) } }, /* 56 */ ++ { "fj", { FC_REF_CONSTANT, 1, OFF(57,83), NUM(57,83) } }, /* 57 */ ++ { "fo", { FC_REF_CONSTANT, 1, OFF(58,84), NUM(58,84) } }, /* 58 */ ++ { "fr", { FC_REF_CONSTANT, 2, OFF(59,49), NUM(59,49) } }, /* 59 */ ++ { "fur", { FC_REF_CONSTANT, 1, OFF(60,85), NUM(60,85) } }, /* 60 */ ++ { "fy", { FC_REF_CONSTANT, 1, OFF(61,86), NUM(61,86) } }, /* 61 */ ++ { "ga", { FC_REF_CONSTANT, 3, OFF(62,87), NUM(62,87) } }, /* 62 */ ++ { "gd", { FC_REF_CONSTANT, 1, OFF(63,90), NUM(63,90) } }, /* 63 */ ++ { "gez", { FC_REF_CONSTANT, 2, OFF(64,91), NUM(64,91) } }, /* 64 */ ++ { "gl", { FC_REF_CONSTANT, 1, OFF(65,11), NUM(65,11) } }, /* 65 */ ++ { "gn", { FC_REF_CONSTANT, 3, OFF(66,93), NUM(66,93) } }, /* 66 */ ++ { "gu", { FC_REF_CONSTANT, 1, OFF(67,96), NUM(67,96) } }, /* 67 */ ++ { "gv", { FC_REF_CONSTANT, 1, OFF(68,97), NUM(68,97) } }, /* 68 */ ++ { "ha", { FC_REF_CONSTANT, 3, OFF(69,98), NUM(69,98) } }, /* 69 */ ++ { "haw", { FC_REF_CONSTANT, 3, OFF(70,101), NUM(70,101) } }, /* 70 */ ++ { "he", { FC_REF_CONSTANT, 1, OFF(71,104), NUM(71,104) } }, /* 71 */ ++ { "hi", { FC_REF_CONSTANT, 1, OFF(72,28), NUM(72,28) } }, /* 72 */ ++ { "hne", { FC_REF_CONSTANT, 1, OFF(73,28), NUM(73,28) } }, /* 73 */ ++ { "ho", { FC_REF_CONSTANT, 1, OFF(74,83), NUM(74,83) } }, /* 74 */ ++ { "hr", { FC_REF_CONSTANT, 2, OFF(75,39), NUM(75,39) } }, /* 75 */ ++ { "hsb", { FC_REF_CONSTANT, 2, OFF(76,105), NUM(76,105) } }, /* 76 */ ++ { "ht", { FC_REF_CONSTANT, 1, OFF(77,107), NUM(77,107) } }, /* 77 */ ++ { "hu", { FC_REF_CONSTANT, 2, OFF(78,108), NUM(78,108) } }, /* 78 */ ++ { "hy", { FC_REF_CONSTANT, 1, OFF(79,110), NUM(79,110) } }, /* 79 */ ++ { "hz", { FC_REF_CONSTANT, 3, OFF(80,111), NUM(80,111) } }, /* 80 */ ++ { "ia", { FC_REF_CONSTANT, 1, OFF(81,83), NUM(81,83) } }, /* 81 */ ++ { "id", { FC_REF_CONSTANT, 1, OFF(82,114), NUM(82,114) } }, /* 82 */ ++ { "ie", { FC_REF_CONSTANT, 1, OFF(83,83), NUM(83,83) } }, /* 83 */ ++ { "ig", { FC_REF_CONSTANT, 2, OFF(84,115), NUM(84,115) } }, /* 84 */ ++ { "ii", { FC_REF_CONSTANT, 5, OFF(85,117), NUM(85,117) } }, /* 85 */ ++ { "ik", { FC_REF_CONSTANT, 1, OFF(86,122), NUM(86,122) } }, /* 86 */ ++ { "io", { FC_REF_CONSTANT, 1, OFF(87,83), NUM(87,83) } }, /* 87 */ ++ { "is", { FC_REF_CONSTANT, 1, OFF(88,123), NUM(88,123) } }, /* 88 */ ++ { "it", { FC_REF_CONSTANT, 1, OFF(89,124), NUM(89,124) } }, /* 89 */ ++ { "iu", { FC_REF_CONSTANT, 3, OFF(90,125), NUM(90,125) } }, /* 90 */ ++ { "ja", { FC_REF_CONSTANT, 83, OFF(91,128), NUM(91,128) } }, /* 91 */ ++ { "jv", { FC_REF_CONSTANT, 1, OFF(92,211), NUM(92,211) } }, /* 92 */ ++ { "ka", { FC_REF_CONSTANT, 1, OFF(93,212), NUM(93,212) } }, /* 93 */ ++ { "kaa", { FC_REF_CONSTANT, 1, OFF(94,213), NUM(94,213) } }, /* 94 */ ++ { "kab", { FC_REF_CONSTANT, 4, OFF(95,22), NUM(95,22) } }, /* 95 */ ++ { "ki", { FC_REF_CONSTANT, 2, OFF(96,214), NUM(96,214) } }, /* 96 */ ++ { "kj", { FC_REF_CONSTANT, 1, OFF(97,83), NUM(97,83) } }, /* 97 */ ++ { "kk", { FC_REF_CONSTANT, 1, OFF(98,216), NUM(98,216) } }, /* 98 */ ++ { "kl", { FC_REF_CONSTANT, 2, OFF(99,217), NUM(99,217) } }, /* 99 */ ++ { "km", { FC_REF_CONSTANT, 1, OFF(100,219), NUM(100,219) } }, /* 100 */ ++ { "kn", { FC_REF_CONSTANT, 1, OFF(101,220), NUM(101,220) } }, /* 101 */ ++ { "ko", { FC_REF_CONSTANT, 45, OFF(102,221), NUM(102,221) } }, /* 102 */ ++ { "kok", { FC_REF_CONSTANT, 1, OFF(103,28), NUM(103,28) } }, /* 103 */ ++ { "kr", { FC_REF_CONSTANT, 3, OFF(104,266), NUM(104,266) } }, /* 104 */ ++ { "ks", { FC_REF_CONSTANT, 1, OFF(105,269), NUM(105,269) } }, /* 105 */ ++ { "ku-am", { FC_REF_CONSTANT, 2, OFF(106,270), NUM(106,270) } }, /* 106 */ ++ { "ku-iq", { FC_REF_CONSTANT, 1, OFF(107,272), NUM(107,272) } }, /* 107 */ ++ { "ku-ir", { FC_REF_CONSTANT, 1, OFF(108,272), NUM(108,272) } }, /* 108 */ ++ { "ku-tr", { FC_REF_CONSTANT, 2, OFF(109,273), NUM(109,273) } }, /* 109 */ ++ { "kum", { FC_REF_CONSTANT, 1, OFF(110,275), NUM(110,275) } }, /* 110 */ ++ { "kv", { FC_REF_CONSTANT, 1, OFF(111,276), NUM(111,276) } }, /* 111 */ ++ { "kw", { FC_REF_CONSTANT, 3, OFF(112,277), NUM(112,277) } }, /* 112 */ ++ { "kwm", { FC_REF_CONSTANT, 1, OFF(113,83), NUM(113,83) } }, /* 113 */ ++ { "ky", { FC_REF_CONSTANT, 1, OFF(114,280), NUM(114,280) } }, /* 114 */ ++ { "la", { FC_REF_CONSTANT, 2, OFF(115,281), NUM(115,281) } }, /* 115 */ ++ { "lah", { FC_REF_CONSTANT, 1, OFF(116,269), NUM(116,269) } }, /* 116 */ ++ { "lb", { FC_REF_CONSTANT, 1, OFF(117,283), NUM(117,283) } }, /* 117 */ ++ { "lez", { FC_REF_CONSTANT, 1, OFF(118,14), NUM(118,14) } }, /* 118 */ ++ { "lg", { FC_REF_CONSTANT, 2, OFF(119,284), NUM(119,284) } }, /* 119 */ ++ { "li", { FC_REF_CONSTANT, 1, OFF(120,286), NUM(120,286) } }, /* 120 */ ++ { "ln", { FC_REF_CONSTANT, 4, OFF(121,287), NUM(121,287) } }, /* 121 */ ++ { "lo", { FC_REF_CONSTANT, 1, OFF(122,291), NUM(122,291) } }, /* 122 */ ++ { "lt", { FC_REF_CONSTANT, 2, OFF(123,292), NUM(123,292) } }, /* 123 */ ++ { "lv", { FC_REF_CONSTANT, 2, OFF(124,294), NUM(124,294) } }, /* 124 */ ++ { "mai", { FC_REF_CONSTANT, 1, OFF(125,28), NUM(125,28) } }, /* 125 */ ++ { "mg", { FC_REF_CONSTANT, 1, OFF(126,296), NUM(126,296) } }, /* 126 */ ++ { "mh", { FC_REF_CONSTANT, 2, OFF(127,297), NUM(127,297) } }, /* 127 */ ++ { "mi", { FC_REF_CONSTANT, 3, OFF(128,299), NUM(128,299) } }, /* 128 */ ++ { "mk", { FC_REF_CONSTANT, 1, OFF(129,302), NUM(129,302) } }, /* 129 */ ++ { "ml", { FC_REF_CONSTANT, 1, OFF(130,303), NUM(130,303) } }, /* 130 */ ++ { "mn-cn", { FC_REF_CONSTANT, 1, OFF(131,304), NUM(131,304) } }, /* 131 */ ++ { "mn-mn", { FC_REF_CONSTANT, 1, OFF(132,305), NUM(132,305) } }, /* 132 */ ++ { "mo", { FC_REF_CONSTANT, 4, OFF(133,306), NUM(133,306) } }, /* 133 */ ++ { "mr", { FC_REF_CONSTANT, 1, OFF(134,28), NUM(134,28) } }, /* 134 */ ++ { "ms", { FC_REF_CONSTANT, 1, OFF(135,83), NUM(135,83) } }, /* 135 */ ++ { "mt", { FC_REF_CONSTANT, 2, OFF(136,310), NUM(136,310) } }, /* 136 */ ++ { "my", { FC_REF_CONSTANT, 1, OFF(137,312), NUM(137,312) } }, /* 137 */ ++ { "na", { FC_REF_CONSTANT, 2, OFF(138,313), NUM(138,313) } }, /* 138 */ ++ { "nb", { FC_REF_CONSTANT, 1, OFF(139,315), NUM(139,315) } }, /* 139 */ ++ { "nds", { FC_REF_CONSTANT, 1, OFF(140,64), NUM(140,64) } }, /* 140 */ ++ { "ne", { FC_REF_CONSTANT, 1, OFF(141,28), NUM(141,28) } }, /* 141 */ ++ { "ng", { FC_REF_CONSTANT, 1, OFF(142,83), NUM(142,83) } }, /* 142 */ ++ { "nl", { FC_REF_CONSTANT, 1, OFF(143,316), NUM(143,316) } }, /* 143 */ ++ { "nn", { FC_REF_CONSTANT, 1, OFF(144,317), NUM(144,317) } }, /* 144 */ ++ { "no", { FC_REF_CONSTANT, 1, OFF(145,315), NUM(145,315) } }, /* 145 */ ++ { "nr", { FC_REF_CONSTANT, 1, OFF(146,83), NUM(146,83) } }, /* 146 */ ++ { "nso", { FC_REF_CONSTANT, 2, OFF(147,318), NUM(147,318) } }, /* 147 */ ++ { "nv", { FC_REF_CONSTANT, 4, OFF(148,320), NUM(148,320) } }, /* 148 */ ++ { "ny", { FC_REF_CONSTANT, 2, OFF(149,324), NUM(149,324) } }, /* 149 */ ++ { "oc", { FC_REF_CONSTANT, 1, OFF(150,326), NUM(150,326) } }, /* 150 */ ++ { "om", { FC_REF_CONSTANT, 1, OFF(151,83), NUM(151,83) } }, /* 151 */ ++ { "or", { FC_REF_CONSTANT, 1, OFF(152,327), NUM(152,327) } }, /* 152 */ ++ { "os", { FC_REF_CONSTANT, 1, OFF(153,275), NUM(153,275) } }, /* 153 */ ++ { "ota", { FC_REF_CONSTANT, 1, OFF(154,328), NUM(154,328) } }, /* 154 */ ++ { "pa", { FC_REF_CONSTANT, 1, OFF(155,329), NUM(155,329) } }, /* 155 */ ++ { "pa-pk", { FC_REF_CONSTANT, 1, OFF(156,269), NUM(156,269) } }, /* 156 */ ++ { "pap-an", { FC_REF_CONSTANT, 1, OFF(157,330), NUM(157,330) } }, /* 157 */ ++ { "pap-aw", { FC_REF_CONSTANT, 1, OFF(158,331), NUM(158,331) } }, /* 158 */ ++ { "pl", { FC_REF_CONSTANT, 2, OFF(159,332), NUM(159,332) } }, /* 159 */ ++ { "ps-af", { FC_REF_CONSTANT, 1, OFF(160,334), NUM(160,334) } }, /* 160 */ ++ { "ps-pk", { FC_REF_CONSTANT, 1, OFF(161,335), NUM(161,335) } }, /* 161 */ ++ { "pt", { FC_REF_CONSTANT, 1, OFF(162,336), NUM(162,336) } }, /* 162 */ ++ { "qu", { FC_REF_CONSTANT, 2, OFF(163,337), NUM(163,337) } }, /* 163 */ ++ { "rm", { FC_REF_CONSTANT, 1, OFF(164,339), NUM(164,339) } }, /* 164 */ ++ { "rn", { FC_REF_CONSTANT, 1, OFF(165,83), NUM(165,83) } }, /* 165 */ ++ { "ro", { FC_REF_CONSTANT, 3, OFF(166,340), NUM(166,340) } }, /* 166 */ ++ { "ru", { FC_REF_CONSTANT, 1, OFF(167,275), NUM(167,275) } }, /* 167 */ ++ { "rw", { FC_REF_CONSTANT, 1, OFF(168,83), NUM(168,83) } }, /* 168 */ ++ { "sa", { FC_REF_CONSTANT, 1, OFF(169,28), NUM(169,28) } }, /* 169 */ ++ { "sah", { FC_REF_CONSTANT, 1, OFF(170,343), NUM(170,343) } }, /* 170 */ ++ { "sc", { FC_REF_CONSTANT, 1, OFF(171,344), NUM(171,344) } }, /* 171 */ ++ { "sco", { FC_REF_CONSTANT, 3, OFF(172,345), NUM(172,345) } }, /* 172 */ ++ { "sd", { FC_REF_CONSTANT, 1, OFF(173,348), NUM(173,348) } }, /* 173 */ ++ { "se", { FC_REF_CONSTANT, 2, OFF(174,349), NUM(174,349) } }, /* 174 */ ++ { "sel", { FC_REF_CONSTANT, 1, OFF(175,275), NUM(175,275) } }, /* 175 */ ++ { "sg", { FC_REF_CONSTANT, 1, OFF(176,351), NUM(176,351) } }, /* 176 */ ++ { "sh", { FC_REF_CONSTANT, 3, OFF(177,352), NUM(177,352) } }, /* 177 */ ++ { "shs", { FC_REF_CONSTANT, 2, OFF(178,355), NUM(178,355) } }, /* 178 */ ++ { "si", { FC_REF_CONSTANT, 1, OFF(179,357), NUM(179,357) } }, /* 179 */ ++ { "sid", { FC_REF_CONSTANT, 2, OFF(180,358), NUM(180,358) } }, /* 180 */ ++ { "sk", { FC_REF_CONSTANT, 2, OFF(181,360), NUM(181,360) } }, /* 181 */ ++ { "sl", { FC_REF_CONSTANT, 2, OFF(182,39), NUM(182,39) } }, /* 182 */ ++ { "sm", { FC_REF_CONSTANT, 2, OFF(183,362), NUM(183,362) } }, /* 183 */ ++ { "sma", { FC_REF_CONSTANT, 1, OFF(184,364), NUM(184,364) } }, /* 184 */ ++ { "smj", { FC_REF_CONSTANT, 1, OFF(185,365), NUM(185,365) } }, /* 185 */ ++ { "smn", { FC_REF_CONSTANT, 2, OFF(186,366), NUM(186,366) } }, /* 186 */ ++ { "sms", { FC_REF_CONSTANT, 3, OFF(187,368), NUM(187,368) } }, /* 187 */ ++ { "sn", { FC_REF_CONSTANT, 1, OFF(188,83), NUM(188,83) } }, /* 188 */ ++ { "so", { FC_REF_CONSTANT, 1, OFF(189,83), NUM(189,83) } }, /* 189 */ ++ { "sq", { FC_REF_CONSTANT, 1, OFF(190,371), NUM(190,371) } }, /* 190 */ ++ { "sr", { FC_REF_CONSTANT, 1, OFF(191,372), NUM(191,372) } }, /* 191 */ ++ { "ss", { FC_REF_CONSTANT, 1, OFF(192,83), NUM(192,83) } }, /* 192 */ ++ { "st", { FC_REF_CONSTANT, 1, OFF(193,83), NUM(193,83) } }, /* 193 */ ++ { "su", { FC_REF_CONSTANT, 1, OFF(194,114), NUM(194,114) } }, /* 194 */ ++ { "sv", { FC_REF_CONSTANT, 1, OFF(195,373), NUM(195,373) } }, /* 195 */ ++ { "sw", { FC_REF_CONSTANT, 1, OFF(196,83), NUM(196,83) } }, /* 196 */ ++ { "syr", { FC_REF_CONSTANT, 1, OFF(197,374), NUM(197,374) } }, /* 197 */ ++ { "ta", { FC_REF_CONSTANT, 1, OFF(198,375), NUM(198,375) } }, /* 198 */ ++ { "te", { FC_REF_CONSTANT, 1, OFF(199,376), NUM(199,376) } }, /* 199 */ ++ { "tg", { FC_REF_CONSTANT, 1, OFF(200,377), NUM(200,377) } }, /* 200 */ ++ { "th", { FC_REF_CONSTANT, 1, OFF(201,378), NUM(201,378) } }, /* 201 */ ++ { "ti-er", { FC_REF_CONSTANT, 2, OFF(202,42), NUM(202,42) } }, /* 202 */ ++ { "ti-et", { FC_REF_CONSTANT, 2, OFF(203,358), NUM(203,358) } }, /* 203 */ ++ { "tig", { FC_REF_CONSTANT, 2, OFF(204,379), NUM(204,379) } }, /* 204 */ ++ { "tk", { FC_REF_CONSTANT, 2, OFF(205,381), NUM(205,381) } }, /* 205 */ ++ { "tl", { FC_REF_CONSTANT, 1, OFF(206,82), NUM(206,82) } }, /* 206 */ ++ { "tn", { FC_REF_CONSTANT, 2, OFF(207,318), NUM(207,318) } }, /* 207 */ ++ { "to", { FC_REF_CONSTANT, 2, OFF(208,362), NUM(208,362) } }, /* 208 */ ++ { "tr", { FC_REF_CONSTANT, 2, OFF(209,383), NUM(209,383) } }, /* 209 */ ++ { "ts", { FC_REF_CONSTANT, 1, OFF(210,83), NUM(210,83) } }, /* 210 */ ++ { "tt", { FC_REF_CONSTANT, 1, OFF(211,385), NUM(211,385) } }, /* 211 */ ++ { "tw", { FC_REF_CONSTANT, 5, OFF(212,4), NUM(212,4) } }, /* 212 */ ++ { "ty", { FC_REF_CONSTANT, 3, OFF(213,386), NUM(213,386) } }, /* 213 */ ++ { "tyv", { FC_REF_CONSTANT, 1, OFF(214,280), NUM(214,280) } }, /* 214 */ ++ { "ug", { FC_REF_CONSTANT, 1, OFF(215,12), NUM(215,12) } }, /* 215 */ ++ { "uk", { FC_REF_CONSTANT, 1, OFF(216,389), NUM(216,389) } }, /* 216 */ ++ { "ur", { FC_REF_CONSTANT, 1, OFF(217,269), NUM(217,269) } }, /* 217 */ ++ { "uz", { FC_REF_CONSTANT, 1, OFF(218,83), NUM(218,83) } }, /* 218 */ ++ { "ve", { FC_REF_CONSTANT, 2, OFF(219,390), NUM(219,390) } }, /* 219 */ ++ { "vi", { FC_REF_CONSTANT, 4, OFF(220,392), NUM(220,392) } }, /* 220 */ ++ { "vo", { FC_REF_CONSTANT, 1, OFF(221,396), NUM(221,396) } }, /* 221 */ ++ { "vot", { FC_REF_CONSTANT, 2, OFF(222,397), NUM(222,397) } }, /* 222 */ ++ { "wa", { FC_REF_CONSTANT, 1, OFF(223,399), NUM(223,399) } }, /* 223 */ ++ { "wal", { FC_REF_CONSTANT, 2, OFF(224,358), NUM(224,358) } }, /* 224 */ ++ { "wen", { FC_REF_CONSTANT, 2, OFF(225,400), NUM(225,400) } }, /* 225 */ ++ { "wo", { FC_REF_CONSTANT, 2, OFF(226,402), NUM(226,402) } }, /* 226 */ ++ { "xh", { FC_REF_CONSTANT, 1, OFF(227,83), NUM(227,83) } }, /* 227 */ ++ { "yap", { FC_REF_CONSTANT, 1, OFF(228,404), NUM(228,404) } }, /* 228 */ ++ { "yi", { FC_REF_CONSTANT, 1, OFF(229,104), NUM(229,104) } }, /* 229 */ ++ { "yo", { FC_REF_CONSTANT, 4, OFF(230,405), NUM(230,405) } }, /* 230 */ ++ { "za", { FC_REF_CONSTANT, 1, OFF(231,83), NUM(231,83) } }, /* 231 */ ++ { "zh-cn", { FC_REF_CONSTANT, 82, OFF(232,409), NUM(232,409) } }, /* 232 */ ++ { "zh-hk", { FC_REF_CONSTANT, 83, OFF(233,491), NUM(233,491) } }, /* 233 */ ++ { "zh-mo", { FC_REF_CONSTANT, 83, OFF(234,491), NUM(234,491) } }, /* 234 */ ++ { "zh-sg", { FC_REF_CONSTANT, 82, OFF(235,409), NUM(235,409) } }, /* 235 */ ++ { "zh-tw", { FC_REF_CONSTANT, 83, OFF(236,574), NUM(236,574) } }, /* 236 */ ++ { "zu", { FC_REF_CONSTANT, 1, OFF(237,83), NUM(237,83) } }, /* 237 */ ++}, ++{ ++ { { /* 0 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x08104404, 0x08104404, ++ } }, ++ { { /* 1 */ ++ 0xffff8002, 0xffffffff, 0x8002ffff, 0x00000000, ++ 0xc0000000, 0xf0fc33c0, 0x03000000, 0x00000003, ++ } }, ++ { { /* 2 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x0810cf00, 0x0810cf00, ++ } }, ++ { { /* 3 */ ++ 0x00000000, 0x00000000, 0x00000200, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 4 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00220008, 0x00220008, ++ } }, ++ { { /* 5 */ ++ 0x00000000, 0x00000300, 0x00000000, 0x00000300, ++ 0x00010040, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 6 */ ++ 0x00000000, 0x00000000, 0x08100000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 7 */ ++ 0x00000048, 0x00000200, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 8 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x30000000, 0x00000000, 0x03000000, ++ } }, ++ { { /* 9 */ ++ 0xff7fff7f, 0xff01ff7f, 0x00003d7f, 0xffff7fff, ++ 0xffff3d7f, 0x003d7fff, 0xff7f7f00, 0x00ff7fff, ++ } }, ++ { { /* 10 */ ++ 0x003d7fff, 0xffffffff, 0x007fff7f, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 11 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x140a2202, 0x140a2202, ++ } }, ++ { { /* 12 */ ++ 0x00000000, 0x07fffffe, 0x000007fe, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 13 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0xfff99fee, 0xd3c4fdff, 0xb000399f, 0x00030000, ++ } }, ++ { { /* 14 */ ++ 0xffff0042, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 15 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x10028010, 0x10028010, ++ } }, ++ { { /* 16 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x10400080, 0x10400080, ++ } }, ++ { { /* 17 */ ++ 0xc0000000, 0x00030000, 0xc0000000, 0x00000000, ++ 0x00008000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 18 */ ++ 0x00000000, 0x00000000, 0x02000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 19 */ ++ 0x00000000, 0x07ffffde, 0x001009f6, 0x40000000, ++ 0x01000040, 0x00008200, 0x00001000, 0x00000000, ++ } }, ++ { { /* 20 */ ++ 0xffff0000, 0xffffffff, 0x0000ffff, 0x00000000, ++ 0x030c0000, 0x0c00cc0f, 0x03000000, 0x00000300, ++ } }, ++ { { /* 21 */ ++ 0xffff4040, 0xffffffff, 0x4040ffff, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 22 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 23 */ ++ 0x00003000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00110000, 0x00000000, 0x00000000, 0x000000c0, ++ } }, ++ { { /* 24 */ ++ 0x00000000, 0x00000000, 0x08000000, 0x00000008, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 25 */ ++ 0x00003000, 0x00000030, 0x00000000, 0x0000300c, ++ 0x000c0000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 26 */ ++ 0x00000000, 0x3a8b0000, 0x9e78e6b9, 0x0000802e, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 27 */ ++ 0xffff0000, 0xffffd7ff, 0x0000d7ff, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 28 */ ++ 0xffffffe0, 0x83ffffff, 0x00003fff, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 29 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x10008200, 0x10008200, ++ } }, ++ { { /* 30 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x060c3303, 0x060c3303, ++ } }, ++ { { /* 31 */ ++ 0x00000003, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 32 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x03000000, 0x00003000, 0x00000000, ++ } }, ++ { { /* 33 */ ++ 0x00000000, 0x00000000, 0x00000c00, 0x00000000, ++ 0x20010040, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 34 */ ++ 0x00000000, 0x00000000, 0x08100000, 0x00040000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 35 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0xfff99fee, 0xd3c5fdff, 0xb000399f, 0x00000000, ++ } }, ++ { { /* 36 */ ++ 0x00000000, 0x00000000, 0xfffffeff, 0x3d7e03ff, ++ 0xfeff0003, 0x03ffffff, 0x00000000, 0x00000000, ++ } }, ++ { { /* 37 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x12120404, 0x12120404, ++ } }, ++ { { /* 38 */ ++ 0x000330c0, 0x00000000, 0x00000000, 0x60000003, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 39 */ ++ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x00000000, 0x0c00c000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 40 */ ++ 0xff7fff7f, 0xff01ff00, 0x3d7f3d7f, 0xffff7fff, ++ 0xffff0000, 0x003d7fff, 0xff7f7f3d, 0x00ff7fff, ++ } }, ++ { { /* 41 */ ++ 0x003d7fff, 0xffffffff, 0x007fff00, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 42 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x140ca381, 0x140ca381, ++ } }, ++ { { /* 43 */ ++ 0x00000000, 0x80000000, 0x00000001, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 44 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x10020004, 0x10020004, ++ } }, ++ { { /* 45 */ ++ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x00000000, 0x00000030, 0x000c0000, 0x030300c0, ++ } }, ++ { { /* 46 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0xffffffff, 0xffffffff, 0x001fffff, ++ } }, ++ { { /* 47 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x1a10cfc5, 0x9a10cfc5, ++ } }, ++ { { /* 48 */ ++ 0x00000000, 0x00000000, 0x000c0000, 0x01000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 49 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x10420084, 0x10420084, ++ } }, ++ { { /* 50 */ ++ 0xc0000000, 0x00030000, 0xc0000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 51 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x24082202, 0x24082202, ++ } }, ++ { { /* 52 */ ++ 0x0c00f000, 0x00000000, 0x03000180, 0x6000c033, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 53 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x021c0a08, 0x021c0a08, ++ } }, ++ { { /* 54 */ ++ 0x00000030, 0x00000000, 0x0000001e, 0x18000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 55 */ ++ 0xfdffa966, 0xffffdfff, 0xa965dfff, 0x03ffffff, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 56 */ ++ 0x0000000c, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 57 */ ++ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x00000000, 0x00000c00, 0x00c00000, 0x000c0000, ++ } }, ++ { { /* 58 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x0010c604, 0x8010c604, ++ } }, ++ { { /* 59 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x01f00000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 60 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x0000003f, 0x00000000, 0x00000000, 0x000c0000, ++ } }, ++ { { /* 61 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x25082262, 0x25082262, ++ } }, ++ { { /* 62 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x90400010, 0x10400010, ++ } }, ++ { { /* 63 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0xffffffff, 0x0001ffff, 0x00000000, 0x00000000, ++ } }, ++ { { /* 64 */ ++ 0x0c000000, 0x00000000, 0x00000c00, 0x00000000, ++ 0x00170240, 0x00040000, 0x001fe000, 0x00000000, ++ } }, ++ { { /* 65 */ ++ 0x00000000, 0x00000000, 0x08500000, 0x00000008, ++ 0x00000800, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 66 */ ++ 0x00001003, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 67 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0xffffd740, 0xfffffffb, 0x00007fff, 0x00000000, ++ } }, ++ { { /* 68 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00528f81, 0x00528f81, ++ } }, ++ { { /* 69 */ ++ 0x30000300, 0x00300030, 0x30000000, 0x00003000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 70 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x10600010, 0x10600010, ++ } }, ++ { { /* 71 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x60000003, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 72 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x10020000, 0x10020000, ++ } }, ++ { { /* 73 */ ++ 0x00000000, 0x00000000, 0x00000c00, 0x00000000, ++ 0x20000402, 0x00180000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 74 */ ++ 0x00000000, 0x00000000, 0x00880000, 0x00040000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 75 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00400030, 0x00400030, ++ } }, ++ { { /* 76 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x0e1e7707, 0x0e1e7707, ++ } }, ++ { { /* 77 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x25092042, 0x25092042, ++ } }, ++ { { /* 78 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x02041107, 0x02041107, ++ } }, ++ { { /* 79 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x9c508e14, 0x1c508e14, ++ } }, ++ { { /* 80 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x04082202, 0x04082202, ++ } }, ++ { { /* 81 */ ++ 0x00000c00, 0x00000003, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 82 */ ++ 0xc0000c0c, 0x00000000, 0x00c00003, 0x00000c03, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 83 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x020c1383, 0x020c1383, ++ } }, ++ { { /* 84 */ ++ 0xff7fff7f, 0xff01ff7f, 0x00003d7f, 0x00ff00ff, ++ 0x00ff3d7f, 0x003d7fff, 0xff7f7f00, 0x00ff7f00, ++ } }, ++ { { /* 85 */ ++ 0x003d7f00, 0xffff01ff, 0x007fff7f, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 86 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x040a2202, 0x042a220a, ++ } }, ++ { { /* 87 */ ++ 0x00000000, 0x00000200, 0x00000000, 0x00000200, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 88 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x20000000, 0x00000000, 0x02000000, ++ } }, ++ { { /* 89 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0xfffbafee, 0xf3edfdff, 0x00013bbf, 0x00000001, ++ } }, ++ { { /* 90 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00000080, 0x00000080, ++ } }, ++ { { /* 91 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x03000402, 0x00180000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 92 */ ++ 0x00000000, 0x00000000, 0x00880000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 93 */ ++ 0x000c0003, 0x00000c00, 0x00003000, 0x00000c00, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 94 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x08000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 95 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0xffff0000, 0x000007ff, ++ } }, ++ { { /* 96 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00080000, 0x00080000, ++ } }, ++ { { /* 97 */ ++ 0x0c0030c0, 0x00000000, 0x0300001e, 0x66000003, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 98 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00040100, 0x00040100, ++ } }, ++ { { /* 99 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x14482202, 0x14482202, ++ } }, ++ { { /* 100 */ ++ 0x00000000, 0x00000000, 0x00030000, 0x00030000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 101 */ ++ 0x00000000, 0xfffe0000, 0x007fffff, 0xfffffffe, ++ 0x000000ff, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 102 */ ++ 0x00000000, 0x00008000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 103 */ ++ 0x000c0000, 0x00000000, 0x00000c00, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 104 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00000200, 0x00000200, ++ } }, ++ { { /* 105 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00003c00, 0x00000030, ++ } }, ++ { { /* 106 */ ++ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, ++ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, ++ } }, ++ { { /* 107 */ ++ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, ++ 0x00001fff, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 108 */ ++ 0xffff4002, 0xffffffff, 0x4002ffff, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 109 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x64092242, 0x64092242, ++ } }, ++ { { /* 110 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x060cb301, 0x060cb301, ++ } }, ++ { { /* 111 */ ++ 0x00000c7e, 0x031f8000, 0x0063f200, 0x000df840, ++ 0x00037e08, 0x08000dfa, 0x0df901bf, 0x5437e400, ++ } }, ++ { { /* 112 */ ++ 0x00000025, 0x40006fc0, 0x27f91be4, 0xdee00000, ++ 0x007ff83f, 0x00007f7f, 0x00000000, 0x00000000, ++ } }, ++ { { /* 113 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x007f8000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 114 */ ++ 0x000000e7, 0x00000000, 0xfffffffe, 0xffffffff, ++ 0x780fffff, 0xfffffffe, 0xffffffff, 0x787fffff, ++ } }, ++ { { /* 115 */ ++ 0x43f36f8b, 0x9b462442, 0xe3e0e82c, 0x400a0004, ++ 0xdb365f65, 0x04497977, 0xe3f0ecd7, 0x08c56038, ++ } }, ++ { { /* 116 */ ++ 0x3403e602, 0x35518000, 0x7eabe0c8, 0x98698200, ++ 0x2942a948, 0x8060e803, 0xad93441c, 0x4568c03a, ++ } }, ++ { { /* 117 */ ++ 0x8656aa60, 0x02403f7a, 0x14618388, 0x21741020, ++ 0x07022021, 0x40bc3000, 0x4462a624, 0x0a2060a8, ++ } }, ++ { { /* 118 */ ++ 0x85740217, 0x9c840402, 0x14157bfb, 0x11e27f24, ++ 0x02efb665, 0x20ff1f75, 0x28403a70, 0x676326c3, ++ } }, ++ { { /* 119 */ ++ 0x20924dd9, 0x0fc946b0, 0x4850bc98, 0xa03f8638, ++ 0x88162388, 0x52323e09, 0xe3a422aa, 0xc72c00dd, ++ } }, ++ { { /* 120 */ ++ 0x26e1a166, 0x8f0a840b, 0x559e27eb, 0x89bbc241, ++ 0x85400014, 0x08496361, 0x8ad07f0c, 0x05cfff3e, ++ } }, ++ { { /* 121 */ ++ 0xa803ff1a, 0x7b407a41, 0x80024745, 0x38eb0500, ++ 0x0005d851, 0x710c9934, 0x01000397, 0x24046366, ++ } }, ++ { { /* 122 */ ++ 0x005180d0, 0x430ac000, 0x30c89071, 0x58000008, ++ 0xf7000e99, 0x00415f80, 0x941000b0, 0x62800018, ++ } }, ++ { { /* 123 */ ++ 0x09d00240, 0x01568200, 0x08015004, 0x05101d10, ++ 0x001084c1, 0x10504025, 0x4d8a410f, 0xa60d4009, ++ } }, ++ { { /* 124 */ ++ 0x914cab19, 0x098121c0, 0x0003c485, 0x80000652, ++ 0x00080b04, 0x0009041d, 0x905c4849, 0x16900009, ++ } }, ++ { { /* 125 */ ++ 0x22200c65, 0x24338412, 0x47960c03, 0x42250a04, ++ 0x90880028, 0x4f084900, 0xd3aa14a2, 0x3e87d830, ++ } }, ++ { { /* 126 */ ++ 0x1f618604, 0x41867ea4, 0x05b3c390, 0x211857a5, ++ 0x2a48241e, 0x4a041128, 0x161b0a40, 0x88400d60, ++ } }, ++ { { /* 127 */ ++ 0x9502020a, 0x10608221, 0x04000243, 0x80001444, ++ 0x0c040000, 0x70000000, 0x00c11a06, 0x0c00024a, ++ } }, ++ { { /* 128 */ ++ 0x00401a00, 0x40451404, 0xbdb30029, 0x052b0a78, ++ 0xbfa0bba9, 0x8379407c, 0xe81d12fc, 0xc5694bf6, ++ } }, ++ { { /* 129 */ ++ 0x044aeff6, 0xff022115, 0x402bed63, 0x0242d033, ++ 0x00131000, 0x59ca1b02, 0x020000a0, 0x2c41a703, ++ } }, ++ { { /* 130 */ ++ 0x8ff24880, 0x00000204, 0x10055800, 0x00489200, ++ 0x20011894, 0x34805004, 0x684c3200, 0x68be49ea, ++ } }, ++ { { /* 131 */ ++ 0x2e42184c, 0x21c9a820, 0x80b050b9, 0xff7c001e, ++ 0x14e0849a, 0x01e028c1, 0xac49870e, 0xdddb130f, ++ } }, ++ { { /* 132 */ ++ 0x89fbbe1a, 0x51a2a2e0, 0x32ca5502, 0x928b3e46, ++ 0x438f1dbf, 0x32186703, 0x33c03028, 0xa9230811, ++ } }, ++ { { /* 133 */ ++ 0x3a65c000, 0x04028fe3, 0x86252c4e, 0x00a1bf3d, ++ 0x8cd43a1a, 0x317c06c9, 0x950a00e0, 0x0edb018b, ++ } }, ++ { { /* 134 */ ++ 0x8c20e34b, 0xf0101182, 0xa7287d94, 0x40fbc9ac, ++ 0x06534484, 0x44445a90, 0x00013fc8, 0xf5d40048, ++ } }, ++ { { /* 135 */ ++ 0xec577701, 0x891dc442, 0x49286b83, 0xd2424109, ++ 0x59fe061d, 0x3a221800, 0x3b9fb7e4, 0xc0eaf003, ++ } }, ++ { { /* 136 */ ++ 0x82021386, 0xe4008980, 0x10a1b200, 0x0cc44b80, ++ 0x8944d309, 0x48341faf, 0x0c458259, 0x0450420a, ++ } }, ++ { { /* 137 */ ++ 0x10c8a040, 0x44503140, 0x01004004, 0x05408280, ++ 0x442c0108, 0x1a056a30, 0x051420a6, 0x645690cf, ++ } }, ++ { { /* 138 */ ++ 0x31000021, 0xcbf09c18, 0x63e2a120, 0x01b5104c, ++ 0x9a83538c, 0x3281b8b2, 0x0a84987a, 0x0c0233e7, ++ } }, ++ { { /* 139 */ ++ 0x9018d4cc, 0x9070a1a1, 0xe0048a1e, 0x0451c3d4, ++ 0x21c2439a, 0x53104844, 0x36400292, 0xf3bd0241, ++ } }, ++ { { /* 140 */ ++ 0xe8f0ab09, 0xa5d27dc0, 0xd24bc242, 0xd0afa43f, ++ 0x34a11aa0, 0x03d88247, 0x651bc452, 0xc83ad294, ++ } }, ++ { { /* 141 */ ++ 0x40c8001c, 0x33140e06, 0xb21b614f, 0xc0d00088, ++ 0xa898a02a, 0x166ba1c5, 0x85b42e50, 0x0604c08b, ++ } }, ++ { { /* 142 */ ++ 0x1e04f933, 0xa251056e, 0x76380400, 0x73b8ec07, ++ 0x18324406, 0xc8164081, 0x63097c8a, 0xaa042980, ++ } }, ++ { { /* 143 */ ++ 0xca9c1c24, 0x27604e0e, 0x83000990, 0x81040046, ++ 0x10816011, 0x0908540d, 0xcc0a000e, 0x0c000500, ++ } }, ++ { { /* 144 */ ++ 0xa0440430, 0x6784008b, 0x8a195288, 0x8b18865e, ++ 0x41602e59, 0x9cbe8c10, 0x891c6861, 0x00089800, ++ } }, ++ { { /* 145 */ ++ 0x089a8100, 0x41900018, 0xe4a14007, 0x640d0505, ++ 0x0e4d310e, 0xff0a4806, 0x2aa81632, 0x000b852e, ++ } }, ++ { { /* 146 */ ++ 0xca841800, 0x696c0e20, 0x16000032, 0x03905658, ++ 0x1a285120, 0x11248000, 0x432618e1, 0x0eaa5d52, ++ } }, ++ { { /* 147 */ ++ 0xae280fa0, 0x4500fa7b, 0x89406408, 0xc044c880, ++ 0xb1419005, 0x24c48424, 0x603a1a34, 0xc1949000, ++ } }, ++ { { /* 148 */ ++ 0x003a8246, 0xc106180d, 0x99100022, 0x1511e050, ++ 0x00824057, 0x020a041a, 0x8930004f, 0x444ad813, ++ } }, ++ { { /* 149 */ ++ 0xed228a02, 0x400510c0, 0x01021000, 0x31018808, ++ 0x02044600, 0x0708f000, 0xa2008900, 0x22020000, ++ } }, ++ { { /* 150 */ ++ 0x16100200, 0x10400042, 0x02605200, 0x200052f4, ++ 0x80308510, 0x42021100, 0x80b54308, 0x9a2070e1, ++ } }, ++ { { /* 151 */ ++ 0x08012040, 0xfc653500, 0xab0419c1, 0x62140286, ++ 0x00440087, 0x02449085, 0x0a85405c, 0x33803207, ++ } }, ++ { { /* 152 */ ++ 0xb8c00400, 0xc0d0ce20, 0x0080c030, 0x0d250508, ++ 0x00400a90, 0x080c0200, 0x40006505, 0x41026421, ++ } }, ++ { { /* 153 */ ++ 0x00000268, 0x847c0024, 0xde200002, 0x40498619, ++ 0x40000808, 0x20010084, 0x10108400, 0x01c742cd, ++ } }, ++ { { /* 154 */ ++ 0xd52a7038, 0x1d8f1968, 0x3e12be50, 0x81d92ef5, ++ 0x2412cec4, 0x732e0828, 0x4b3424ac, 0xd41d020c, ++ } }, ++ { { /* 155 */ ++ 0x80002a02, 0x08110097, 0x114411c4, 0x7d451786, ++ 0x064949d9, 0x87914000, 0xd8c4254c, 0x491444ba, ++ } }, ++ { { /* 156 */ ++ 0xc8001b92, 0x15800271, 0x0c000081, 0xc200096a, ++ 0x40024800, 0xba493021, 0x1c802080, 0x1008e2ac, ++ } }, ++ { { /* 157 */ ++ 0x00341004, 0x841400e1, 0x20000020, 0x10149800, ++ 0x04aa70c2, 0x54208688, 0x04130c62, 0x20109180, ++ } }, ++ { { /* 158 */ ++ 0x02064082, 0x54001c40, 0xe4e90383, 0x84802125, ++ 0x2000e433, 0xe60944c0, 0x81260a03, 0x080112da, ++ } }, ++ { { /* 159 */ ++ 0x97906901, 0xf8864001, 0x0081e24d, 0xa6510a0e, ++ 0x81ec011a, 0x8441c600, 0xb62cadb8, 0x8741a46f, ++ } }, ++ { { /* 160 */ ++ 0x4b028d54, 0x02681161, 0x2057bb60, 0x043350a0, ++ 0xb7b4a8c0, 0x01122402, 0x20009ad3, 0x00c82271, ++ } }, ++ { { /* 161 */ ++ 0x809e2081, 0xe1800c8a, 0x8151b009, 0x40281031, ++ 0x89a52a0e, 0x620e69b6, 0xd1444425, 0x4d548085, ++ } }, ++ { { /* 162 */ ++ 0x1fb12c75, 0x862dd807, 0x4841d87c, 0x226e414e, ++ 0x9e088200, 0xed37f80c, 0x75268c80, 0x08149313, ++ } }, ++ { { /* 163 */ ++ 0xc8040e32, 0x6ea6484e, 0x66702c4a, 0xba0126c0, ++ 0x185dd30c, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 164 */ ++ 0x00000000, 0x05400000, 0x81337020, 0x03a54f81, ++ 0x641055ec, 0x2344c318, 0x00341462, 0x1a090a43, ++ } }, ++ { { /* 165 */ ++ 0x13a5187b, 0xa8480102, 0xc5440440, 0xe2dd8106, ++ 0x2d481af0, 0x0416b626, 0x6e405058, 0x31128032, ++ } }, ++ { { /* 166 */ ++ 0x0c0007e4, 0x420a8208, 0x803b4840, 0x87134860, ++ 0x3428850d, 0xe5290319, 0x870a2345, 0x5c1825a9, ++ } }, ++ { { /* 167 */ ++ 0xd9c577a6, 0x03e85e00, 0xa7000081, 0x41c6cd54, ++ 0xa2042800, 0x2b0ab860, 0xda9e0020, 0x0e1a08ea, ++ } }, ++ { { /* 168 */ ++ 0x11c0427c, 0x03768908, 0x01058621, 0x18a80000, ++ 0xc44846a0, 0x20220d05, 0x91485422, 0x28978a01, ++ } }, ++ { { /* 169 */ ++ 0x00087898, 0x31221605, 0x08804240, 0x06a2fa4e, ++ 0x92110814, 0x9b042002, 0x06432e52, 0x90105000, ++ } }, ++ { { /* 170 */ ++ 0x85ba0041, 0x20203042, 0x05a04f0b, 0x40802708, ++ 0x1a930591, 0x0600df50, 0x3021a202, 0x4e800630, ++ } }, ++ { { /* 171 */ ++ 0x04c80cc4, 0x8001a004, 0xd4316000, 0x0a020880, ++ 0x00281c00, 0x00418e18, 0xca106ad0, 0x4b00f210, ++ } }, ++ { { /* 172 */ ++ 0x1506274d, 0x88900220, 0x82a85a00, 0x81504549, ++ 0x80002004, 0x2c088804, 0x000508d1, 0x4ac48001, ++ } }, ++ { { /* 173 */ ++ 0x0062e020, 0x0a42008e, 0x6a8c3055, 0xe0a5090e, ++ 0x42c42906, 0x80b34814, 0xb330803e, 0x731c0102, ++ } }, ++ { { /* 174 */ ++ 0x600d1494, 0x09400c20, 0xc040301a, 0xc094a451, ++ 0x05c88dca, 0xa40c96c2, 0x34040001, 0x011000c8, ++ } }, ++ { { /* 175 */ ++ 0xa9c9550d, 0x1c5a2428, 0x48370142, 0x100f7a4d, ++ 0x452a32b4, 0x9205317b, 0x5c44b894, 0x458a68d7, ++ } }, ++ { { /* 176 */ ++ 0x2ed15097, 0x42081943, 0x9d40d202, 0x20979840, ++ 0x064d5409, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 177 */ ++ 0x00000000, 0x84800000, 0x04215542, 0x17001c06, ++ 0x61107624, 0xb9ddff87, 0x5c0a659f, 0x3c00245d, ++ } }, ++ { { /* 178 */ ++ 0x0059adb0, 0x00000000, 0x00000000, 0x009b28d0, ++ 0x02000422, 0x44080108, 0xac409804, 0x90288d0a, ++ } }, ++ { { /* 179 */ ++ 0xe0018700, 0x00310400, 0x82211794, 0x10540019, ++ 0x021a2cb2, 0x40039c02, 0x88043d60, 0x7900080c, ++ } }, ++ { { /* 180 */ ++ 0xba3c1628, 0xcb088640, 0x90807274, 0x0000001e, ++ 0xd8000000, 0x9c87e188, 0x04124034, 0x2791ae64, ++ } }, ++ { { /* 181 */ ++ 0xe6fbe86b, 0x5366408f, 0x537feea6, 0xb5e4e32b, ++ 0x0002869f, 0x01228548, 0x08004402, 0x20a02116, ++ } }, ++ { { /* 182 */ ++ 0x02040004, 0x00052000, 0x01547e00, 0x01ac162c, ++ 0x10852a84, 0x05308c14, 0xb943fbc3, 0x906000ca, ++ } }, ++ { { /* 183 */ ++ 0x40326000, 0x80901200, 0x4c810b30, 0x40020054, ++ 0x1d6a0029, 0x02802000, 0x00048000, 0x150c2610, ++ } }, ++ { { /* 184 */ ++ 0x07018040, 0x0c24d94d, 0x18502810, 0x50205001, ++ 0x04d01000, 0x02017080, 0x21c30108, 0x00000132, ++ } }, ++ { { /* 185 */ ++ 0x07190088, 0x05600802, 0x4c0e0012, 0xf0a10405, ++ 0x00000002, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 186 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00800000, ++ 0x035a8e8d, 0x5a0421bd, 0x11703488, 0x00000026, ++ } }, ++ { { /* 187 */ ++ 0x10000000, 0x8804c502, 0xf801b815, 0x25ed147c, ++ 0x1bb0ed60, 0x1bd70589, 0x1a627af3, 0x0ac50d0c, ++ } }, ++ { { /* 188 */ ++ 0x524ae5d1, 0x63050490, 0x52440354, 0x16122b57, ++ 0x1101a872, 0x00182949, 0x10080948, 0x886c6000, ++ } }, ++ { { /* 189 */ ++ 0x058f916e, 0x39903012, 0x4930f840, 0x001b8880, ++ 0x00000000, 0x00428500, 0x98000058, 0x7014ea04, ++ } }, ++ { { /* 190 */ ++ 0x611d1628, 0x60005113, 0x00a71a24, 0x00000000, ++ 0x03c00000, 0x10187120, 0xa9270172, 0x89066004, ++ } }, ++ { { /* 191 */ ++ 0x020cc022, 0x40810900, 0x8ca0202d, 0x00000e34, ++ 0x00000000, 0x11012100, 0xc11a8011, 0x0892ec4c, ++ } }, ++ { { /* 192 */ ++ 0x85000040, 0x1806c7ac, 0x0512e03e, 0x00108000, ++ 0x80ce4008, 0x02106d01, 0x08568641, 0x0027011e, ++ } }, ++ { { /* 193 */ ++ 0x083d3750, 0x4e05e032, 0x048401c0, 0x01400081, ++ 0x00000000, 0x00000000, 0x00000000, 0x00591aa0, ++ } }, ++ { { /* 194 */ ++ 0x882443c8, 0xc8001d48, 0x72030152, 0x04049013, ++ 0x04008280, 0x0d148a10, 0x02088056, 0x2704a040, ++ } }, ++ { { /* 195 */ ++ 0x4c000000, 0x00000000, 0x00000000, 0xa3200000, ++ 0xa0ae1902, 0xdf002660, 0x7b15f010, 0x3ad08121, ++ } }, ++ { { /* 196 */ ++ 0x00284180, 0x48001003, 0x8014cc00, 0x00c414cf, ++ 0x30202000, 0x00000001, 0x00000000, 0x00000000, ++ } }, ++ { { /* 197 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00000300, 0x00000300, ++ } }, ++ { { /* 198 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0xffff0000, 0x0001ffff, ++ } }, ++ { { /* 199 */ ++ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x0c0c0000, 0x000cc00c, 0x03000000, 0x00000000, ++ } }, ++ { { /* 200 */ ++ 0x00000000, 0x00000300, 0x00000000, 0x00000300, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 201 */ ++ 0xffff0000, 0xffffffff, 0x0040ffff, 0x00000000, ++ 0x0c0c0000, 0x0c00000c, 0x03000000, 0x00000300, ++ } }, ++ { { /* 202 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x0d10646e, 0x0d10646e, ++ } }, ++ { { /* 203 */ ++ 0x00000000, 0x01000300, 0x00000000, 0x00000300, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 204 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x9fffffff, 0xffcffee7, 0x0000003f, 0x00000000, ++ } }, ++ { { /* 205 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0xfffddfec, 0xc3effdff, 0x40603ddf, 0x00000003, ++ } }, ++ { { /* 206 */ ++ 0x00000000, 0xfffe0000, 0xffffffff, 0xffffffff, ++ 0x00007fff, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 207 */ ++ 0x3eff0793, 0x1303b011, 0x11102801, 0x05930000, ++ 0xb0111e7b, 0x3b019703, 0x00a01112, 0x306b9593, ++ } }, ++ { { /* 208 */ ++ 0x1102b051, 0x11303201, 0x011102b0, 0xb879300a, ++ 0x30011306, 0x00800010, 0x100b0113, 0x93000011, ++ } }, ++ { { /* 209 */ ++ 0x00102b03, 0x05930000, 0xb051746b, 0x3b011323, ++ 0x00001030, 0x70000000, 0x1303b011, 0x11102900, ++ } }, ++ { { /* 210 */ ++ 0x00012180, 0xb0153000, 0x3001030e, 0x02000030, ++ 0x10230111, 0x13000000, 0x10106b81, 0x01130300, ++ } }, ++ { { /* 211 */ ++ 0x30111013, 0x00000100, 0x22b85530, 0x30000000, ++ 0x9702b011, 0x113afb07, 0x011303b0, 0x00000021, ++ } }, ++ { { /* 212 */ ++ 0x3b0d1b00, 0x03b01138, 0x11330113, 0x13000001, ++ 0x111c2b05, 0x00000100, 0xb0111000, 0x2a011300, ++ } }, ++ { { /* 213 */ ++ 0x02b01930, 0x10100001, 0x11000000, 0x10300301, ++ 0x07130230, 0x0011146b, 0x2b051300, 0x8fb8f974, ++ } }, ++ { { /* 214 */ ++ 0x103b0113, 0x00000000, 0xd9700000, 0x01134ab0, ++ 0x0011103b, 0x00001103, 0x2ab15930, 0x10000111, ++ } }, ++ { { /* 215 */ ++ 0x11010000, 0x00100b01, 0x01130000, 0x0000102b, ++ 0x20000101, 0x02a01110, 0x30210111, 0x0102b059, ++ } }, ++ { { /* 216 */ ++ 0x19300000, 0x011307b0, 0xb011383b, 0x00000003, ++ 0x00000000, 0x383b0d13, 0x0103b011, 0x00001000, ++ } }, ++ { { /* 217 */ ++ 0x01130000, 0x00101020, 0x00000100, 0x00000110, ++ 0x30000000, 0x00021811, 0x00100000, 0x01110000, ++ } }, ++ { { /* 218 */ ++ 0x00000023, 0x0b019300, 0x00301110, 0x302b0111, ++ 0x13c7b011, 0x01303b01, 0x00000280, 0xb0113000, ++ } }, ++ { { /* 219 */ ++ 0x2b011383, 0x03b01130, 0x300a0011, 0x1102b011, ++ 0x00002000, 0x01110100, 0xa011102b, 0x2b011302, ++ } }, ++ { { /* 220 */ ++ 0x01000010, 0x30000001, 0x13029011, 0x11302b01, ++ 0x000066b0, 0xb0113000, 0x6b07d302, 0x07b0113a, ++ } }, ++ { { /* 221 */ ++ 0x00200103, 0x13000000, 0x11386b05, 0x011303b0, ++ 0x000010b8, 0x2b051b00, 0x03000110, 0x10000000, ++ } }, ++ { { /* 222 */ ++ 0x1102a011, 0x79700a01, 0x0111a2b0, 0x0000100a, ++ 0x00011100, 0x00901110, 0x00090111, 0x93000000, ++ } }, ++ { { /* 223 */ ++ 0xf9f2bb05, 0x011322b0, 0x2001323b, 0x00000000, ++ 0x06b05930, 0x303b0193, 0x1123a011, 0x11700000, ++ } }, ++ { { /* 224 */ ++ 0x001102b0, 0x00001010, 0x03011301, 0x00000110, ++ 0x162b0793, 0x01010010, 0x11300000, 0x01110200, ++ } }, ++ { { /* 225 */ ++ 0xb0113029, 0x00000000, 0x0eb05130, 0x383b0513, ++ 0x0303b011, 0x00000100, 0x01930000, 0x00001039, ++ } }, ++ { { /* 226 */ ++ 0x3b000302, 0x00000000, 0x00230113, 0x00000000, ++ 0x00100000, 0x00010000, 0x90113020, 0x00000002, ++ } }, ++ { { /* 227 */ ++ 0x00000000, 0x10000000, 0x11020000, 0x00000301, ++ 0x01130000, 0xb079b02b, 0x3b011323, 0x02b01130, ++ } }, ++ { { /* 228 */ ++ 0xf0210111, 0x1343b0d9, 0x11303b01, 0x011103b0, ++ 0xb0517020, 0x20011322, 0x01901110, 0x300b0111, ++ } }, ++ { { /* 229 */ ++ 0x9302b011, 0x0016ab01, 0x01130100, 0xb0113021, ++ 0x29010302, 0x02b03130, 0x30000000, 0x1b42b819, ++ } }, ++ { { /* 230 */ ++ 0x11383301, 0x00000330, 0x00000020, 0x33051300, ++ 0x00001110, 0x00000000, 0x93000000, 0x01302305, ++ } }, ++ { { /* 231 */ ++ 0x00010100, 0x30111010, 0x00000100, 0x02301130, ++ 0x10100001, 0x11000000, 0x00000000, 0x85130200, ++ } }, ++ { { /* 232 */ ++ 0x10111003, 0x2b011300, 0x63b87730, 0x303b0113, ++ 0x11a2b091, 0x7b300201, 0x011357f0, 0xf0d1702b, ++ } }, ++ { { /* 233 */ ++ 0x1b0111e3, 0x0ab97130, 0x303b0113, 0x13029001, ++ 0x11302b01, 0x071302b0, 0x3011302b, 0x23011303, ++ } }, ++ { { /* 234 */ ++ 0x02b01130, 0x30ab0113, 0x11feb411, 0x71300901, ++ 0x05d347b8, 0xb011307b, 0x21015303, 0x00001110, ++ } }, ++ { { /* 235 */ ++ 0x306b0513, 0x1102b011, 0x00103301, 0x05130000, ++ 0xa01038eb, 0x30000102, 0x02b01110, 0x30200013, ++ } }, ++ { { /* 236 */ ++ 0x0102b071, 0x00101000, 0x01130000, 0x1011100b, ++ 0x2b011300, 0x00000000, 0x366b0593, 0x1303b095, ++ } }, ++ { { /* 237 */ ++ 0x01103b01, 0x00000200, 0xb0113000, 0x20000103, ++ 0x01000010, 0x30000000, 0x030ab011, 0x00101001, ++ } }, ++ { { /* 238 */ ++ 0x01110100, 0x00000003, 0x23011302, 0x03000010, ++ 0x10000000, 0x01000000, 0x00100000, 0x00000290, ++ } }, ++ { { /* 239 */ ++ 0x30113000, 0x7b015386, 0x03b01130, 0x00210151, ++ 0x13000000, 0x11303b01, 0x001102b0, 0x00011010, ++ } }, ++ { { /* 240 */ ++ 0x2b011302, 0x02001110, 0x10000000, 0x0102b011, ++ 0x11300100, 0x000102b0, 0x00011010, 0x2b011100, ++ } }, ++ { { /* 241 */ ++ 0x02101110, 0x002b0113, 0x93000000, 0x11302b03, ++ 0x011302b0, 0x0000303b, 0x00000002, 0x03b01930, ++ } }, ++ { { /* 242 */ ++ 0x102b0113, 0x0103b011, 0x11300000, 0x011302b0, ++ 0x00001021, 0x00010102, 0x00000010, 0x102b0113, ++ } }, ++ { { /* 243 */ ++ 0x01020011, 0x11302000, 0x011102b0, 0x30113001, ++ 0x00000002, 0x02b01130, 0x303b0313, 0x0103b011, ++ } }, ++ { { /* 244 */ ++ 0x00002000, 0x05130000, 0xb011303b, 0x10001102, ++ 0x00000110, 0x142b0113, 0x01000001, 0x01100000, ++ } }, ++ { { /* 245 */ ++ 0x00010280, 0xb0113000, 0x10000102, 0x00000010, ++ 0x10230113, 0x93021011, 0x11100b05, 0x01130030, ++ } }, ++ { { /* 246 */ ++ 0xb051702b, 0x3b011323, 0x00000030, 0x30000000, ++ 0x1303b011, 0x11102b01, 0x01010330, 0xb011300a, ++ } }, ++ { { /* 247 */ ++ 0x20000102, 0x00000000, 0x10000011, 0x9300a011, ++ 0x00102b05, 0x00000200, 0x90111000, 0x29011100, ++ } }, ++ { { /* 248 */ ++ 0x00b01110, 0x30000000, 0x1302b011, 0x11302b21, ++ 0x000103b0, 0x00000020, 0x2b051300, 0x02b01130, ++ } }, ++ { { /* 249 */ ++ 0x103b0113, 0x13002011, 0x11322b21, 0x00130280, ++ 0xa0113028, 0x0a011102, 0x02921130, 0x30210111, ++ } }, ++ { { /* 250 */ ++ 0x13020011, 0x11302b01, 0x03d30290, 0x3011122b, ++ 0x2b011302, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 251 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00004000, 0x00000000, 0x20000000, 0x00000000, ++ } }, ++ { { /* 252 */ ++ 0x00000000, 0x00000000, 0x00003000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 253 */ ++ 0x00000000, 0x07ffffde, 0x000001f6, 0x42000000, ++ 0x01020140, 0x44008200, 0x00041000, 0x00000000, ++ } }, ++ { { /* 254 */ ++ 0xffff0000, 0xffff27bf, 0x000027bf, 0x00000000, ++ 0x00000000, 0x0c000000, 0x03000000, 0x000000c0, ++ } }, ++ { { /* 255 */ ++ 0x3c000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 256 */ ++ 0x00000000, 0x061ef5c0, 0x000001f6, 0x40000000, ++ 0x01040040, 0x00208210, 0x00005040, 0x00000000, ++ } }, ++ { { /* 257 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x08004480, 0x08004480, ++ } }, ++ { { /* 258 */ ++ 0x00000000, 0x00000000, 0xc0000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 259 */ ++ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 260 */ ++ 0xffff0042, 0xffffffff, 0x0042ffff, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x000000c0, ++ } }, ++ { { /* 261 */ ++ 0x00000000, 0x000c0000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 262 */ ++ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x00000000, 0x0000c00c, 0x00000000, 0x00000000, ++ } }, ++ { { /* 263 */ ++ 0x000c0003, 0x00003c00, 0x0000f000, 0x00003c00, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 264 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x98504f14, 0x18504f14, ++ } }, ++ { { /* 265 */ ++ 0x00000000, 0x00000000, 0x00000c00, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 266 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00480910, 0x00480910, ++ } }, ++ { { /* 267 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x0c186606, 0x0c186606, ++ } }, ++ { { /* 268 */ ++ 0x0c000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00010040, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 269 */ ++ 0x00001006, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 270 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0xfef02596, 0x3bffecae, 0x30003f5f, 0x00000000, ++ } }, ++ { { /* 271 */ ++ 0x03c03030, 0x0000c000, 0x00000000, 0x600c0c03, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 272 */ ++ 0x000c3003, 0x18c00c0c, 0x00c03060, 0x60000c03, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 273 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00100002, 0x00100002, ++ } }, ++ { { /* 274 */ ++ 0x00000003, 0x18000000, 0x00003060, 0x00000c00, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 275 */ ++ 0x00000000, 0x00300000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 276 */ ++ 0xfdffb729, 0x000001ff, 0xb7290000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 277 */ ++ 0xfffddfec, 0xc3fffdff, 0x00803dcf, 0x00000003, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 278 */ ++ 0x00000000, 0xffffffff, 0xffffffff, 0x00ffffff, ++ 0xffffffff, 0x000003ff, 0x00000000, 0x00000000, ++ } }, ++ { { /* 279 */ ++ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x00000000, 0x0000c000, 0x00000000, 0x00000300, ++ } }, ++ { { /* 280 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00004004, 0x00004004, ++ } }, ++ { { /* 281 */ ++ 0x0f000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 282 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x02045101, 0x02045101, ++ } }, ++ { { /* 283 */ ++ 0x00000c00, 0x000000c3, 0x00000000, 0x18000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 284 */ ++ 0xffffffff, 0x0007f6fb, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 285 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000300, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 286 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x011c0661, 0x011c0661, ++ } }, ++ { { /* 287 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x1c58af16, 0x1c58af16, ++ } }, ++ { { /* 288 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x115c0671, 0x115c0671, ++ } }, ++ { { /* 289 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00100400, 0x00100400, ++ } }, ++ { { /* 290 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000003, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 291 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00082202, 0x00082202, ++ } }, ++ { { /* 292 */ ++ 0x03000030, 0x0000c000, 0x00000006, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000c00, ++ } }, ++ { { /* 293 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x10000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 294 */ ++ 0x00000002, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 295 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00300000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 296 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x040c2383, 0x040c2383, ++ } }, ++ { { /* 297 */ ++ 0xfff99fee, 0xf3cdfdff, 0xb0c0398f, 0x00000003, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 298 */ ++ 0x00000000, 0x07ffffc6, 0x000001fe, 0x40000000, ++ 0x01000040, 0x0000a000, 0x00001000, 0x00000000, ++ } }, ++ { { /* 299 */ ++ 0xfff987e0, 0xd36dfdff, 0x1e003987, 0x001f0000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 300 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x160e2302, 0x160e2302, ++ } }, ++ { { /* 301 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00020000, 0x00020000, ++ } }, ++ { { /* 302 */ ++ 0x030000f0, 0x00000000, 0x0c00001e, 0x1e000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 303 */ ++ 0x00000000, 0x07ffffde, 0x000005f6, 0x50000000, ++ 0x05480262, 0x10000a00, 0x00013000, 0x00000000, ++ } }, ++ { { /* 304 */ ++ 0x00000000, 0x07ffffde, 0x000005f6, 0x50000000, ++ 0x05480262, 0x10000a00, 0x00052000, 0x00000000, ++ } }, ++ { { /* 305 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x143c278f, 0x143c278f, ++ } }, ++ { { /* 306 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000100, 0x00000000, ++ } }, ++ { { /* 307 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x02045301, 0x02045301, ++ } }, ++ { { /* 308 */ ++ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x00300000, 0x0c00c030, 0x03000000, 0x00000000, ++ } }, ++ { { /* 309 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x02041101, 0x02041101, ++ } }, ++ { { /* 310 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00800000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 311 */ ++ 0x30000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00040000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 312 */ ++ 0x00000000, 0x07fffdd6, 0x000005f6, 0xec000000, ++ 0x0200b4d9, 0x480a8640, 0x00000000, 0x00000000, ++ } }, ++ { { /* 313 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00000002, 0x00000002, ++ } }, ++ { { /* 314 */ ++ 0x00033000, 0x00000000, 0x00000c00, 0x600000c3, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 315 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x1850cc14, 0x1850cc14, ++ } }, ++ { { /* 316 */ ++ 0xffff8f04, 0xffffffff, 0x8f04ffff, 0x00000000, ++ 0x030c0000, 0x0c00cc0f, 0x03000000, 0x00000300, ++ } }, ++ { { /* 317 */ ++ 0x00000000, 0x00800000, 0x03bffbaa, 0x03bffbaa, ++ 0x00000000, 0x00000000, 0x00002202, 0x00002202, ++ } }, ++ { { /* 318 */ ++ 0x00080000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 319 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0xfc7e3fec, 0x2ffbffbf, 0x7f5f847f, 0x00040000, ++ } }, ++ { { /* 320 */ ++ 0xff7fff7f, 0xff01ff7f, 0x3d7f3d7f, 0xffff7fff, ++ 0xffff3d7f, 0x003d7fff, 0xff7f7f3d, 0x00ff7fff, ++ } }, ++ { { /* 321 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x24182212, 0x24182212, ++ } }, ++ { { /* 322 */ ++ 0x0000f000, 0x66000000, 0x00300180, 0x60000033, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 323 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00408030, 0x00408030, ++ } }, ++ { { /* 324 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00020032, 0x00020032, ++ } }, ++ { { /* 325 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00000016, 0x00000016, ++ } }, ++ { { /* 326 */ ++ 0x00033000, 0x00000000, 0x00000c00, 0x60000003, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 327 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00200034, 0x00200034, ++ } }, ++ { { /* 328 */ ++ 0x00033000, 0x00000000, 0x00000c00, 0x60000003, ++ 0x00000000, 0x00800000, 0x00000000, 0x0000c3f0, ++ } }, ++ { { /* 329 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00040000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 330 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00000880, 0x00000880, ++ } }, ++ { { /* 331 */ ++ 0xfdff8f04, 0xfdff01ff, 0x8f0401ff, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 332 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x10400a33, 0x10400a33, ++ } }, ++ { { /* 333 */ ++ 0xffff0000, 0xffff1fff, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 334 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0xd63dc7e8, 0xc3bfc718, 0x00803dc7, 0x00000000, ++ } }, ++ { { /* 335 */ ++ 0xfffddfee, 0xc3effdff, 0x00603ddf, 0x00000003, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 336 */ ++ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x0c0c0000, 0x00cc0000, 0x00000000, 0x0000c00c, ++ } }, ++ { { /* 337 */ ++ 0xfffffffe, 0x87ffffff, 0x00007fff, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 338 */ ++ 0xff7fff7f, 0xff01ff00, 0x00003d7f, 0xffff7fff, ++ 0x00ff0000, 0x003d7f7f, 0xff7f7f00, 0x00ff7f00, ++ } }, ++ { { /* 339 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x30400090, 0x30400090, ++ } }, ++ { { /* 340 */ ++ 0x00000000, 0x00000000, 0xc0000180, 0x60000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 341 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x18404084, 0x18404084, ++ } }, ++ { { /* 342 */ ++ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x00c00000, 0x0c00c00c, 0x03000000, 0x00000000, ++ } }, ++ { { /* 343 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00008000, 0x00008000, ++ } }, ++ { { /* 344 */ ++ 0xffff00d0, 0xffffffff, 0x00d0ffff, 0x00000000, ++ 0x00030000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 345 */ ++ 0x000c0000, 0x30000000, 0x00000c30, 0x00030000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 346 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x263c370f, 0x263c370f, ++ } }, ++ { { /* 347 */ ++ 0x0003000c, 0x00000300, 0x00000000, 0x00000300, ++ 0x00000000, 0x00018003, 0x00000000, 0x00000000, ++ } }, ++ { { /* 348 */ ++ 0x0800024f, 0x00000008, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 349 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0xffffffff, 0xffffffff, 0x03ffffff, ++ } }, ++ { { /* 350 */ ++ 0x00000000, 0x00000000, 0x077dfffe, 0x077dfffe, ++ 0x00000000, 0x00000000, 0x10400010, 0x10400010, ++ } }, ++ { { /* 351 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x10400010, 0x10400010, ++ } }, ++ { { /* 352 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x081047a4, 0x081047a4, ++ } }, ++ { { /* 353 */ ++ 0x0c0030c0, 0x00000000, 0x0f30001e, 0x66000003, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 354 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x000a0a09, 0x000a0a09, ++ } }, ++ { { /* 355 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00400810, 0x00400810, ++ } }, ++ { { /* 356 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x0e3c770f, 0x0e3c770f, ++ } }, ++ { { /* 357 */ ++ 0x0c000000, 0x00000300, 0x00000018, 0x00000300, ++ 0x00000000, 0x00000000, 0x001fe000, 0x03000000, ++ } }, ++ { { /* 358 */ ++ 0x0000100f, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 359 */ ++ 0x00000000, 0xc0000000, 0x00000000, 0x0000000c, ++ 0x00000000, 0x33000000, 0x00003000, 0x00000000, ++ } }, ++ { { /* 360 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000280, 0x00000000, ++ } }, ++ { { /* 361 */ ++ 0x7f7b7f8b, 0xef553db4, 0xf35dfba8, 0x400b0243, ++ 0x8d3efb40, 0x8c2c7bf7, 0xe3fa6eff, 0xa8ed1d3a, ++ } }, ++ { { /* 362 */ ++ 0xcf83e602, 0x35558cf5, 0xffabe048, 0xd85992b9, ++ 0x2892ab18, 0x8020d7e9, 0xf583c438, 0x450ae74a, ++ } }, ++ { { /* 363 */ ++ 0x9714b000, 0x54007762, 0x1420d188, 0xc8c01020, ++ 0x00002121, 0x0c0413a8, 0x04408000, 0x082870c0, ++ } }, ++ { { /* 364 */ ++ 0x000408c0, 0x80000002, 0x14722b7b, 0x3bfb7924, ++ 0x1ae43327, 0x38ef9835, 0x28029ad1, 0xbf69a813, ++ } }, ++ { { /* 365 */ ++ 0x2fc665cf, 0xafc96b11, 0x5053340f, 0xa00486a2, ++ 0xe8090106, 0xc00e3f0f, 0x81450a88, 0xc6010010, ++ } }, ++ { { /* 366 */ ++ 0x26e1a161, 0xce00444b, 0xd4eec7aa, 0x85bbcadf, ++ 0xa5203a74, 0x8840436c, 0x8bd23f06, 0x3befff79, ++ } }, ++ { { /* 367 */ ++ 0xe8eff75a, 0x5b36fbcb, 0x1bfd0d49, 0x39ee0154, ++ 0x2e75d855, 0xa91abfd8, 0xf6bff3d7, 0xb40c67e0, ++ } }, ++ { { /* 368 */ ++ 0x081382c2, 0xd08bd49d, 0x1061065a, 0x59e074f2, ++ 0xb3128f9f, 0x6aaa0080, 0xb05e3230, 0x60ac9d7a, ++ } }, ++ { { /* 369 */ ++ 0xc900d303, 0x8a563098, 0x13907000, 0x18421f14, ++ 0x0008c060, 0x10808008, 0xec900400, 0xe6332817, ++ } }, ++ { { /* 370 */ ++ 0x90000758, 0x4e09f708, 0xfc83f485, 0x18c8af53, ++ 0x080c187c, 0x01146adf, 0xa734c80c, 0x2710a011, ++ } }, ++ { { /* 371 */ ++ 0x422228c5, 0x00210413, 0x41123010, 0x40001820, ++ 0xc60c022b, 0x10000300, 0x00220022, 0x02495810, ++ } }, ++ { { /* 372 */ ++ 0x9670a094, 0x1792eeb0, 0x05f2cb96, 0x23580025, ++ 0x42cc25de, 0x4a04cf38, 0x359f0c40, 0x8a001128, ++ } }, ++ { { /* 373 */ ++ 0x910a13fa, 0x10560229, 0x04200641, 0x84f00484, ++ 0x0c040000, 0x412c0400, 0x11541206, 0x00020a4b, ++ } }, ++ { { /* 374 */ ++ 0x00c00200, 0x00940000, 0xbfbb0001, 0x242b167c, ++ 0x7fa89bbb, 0xe3790c7f, 0xe00d10f4, 0x9f014132, ++ } }, ++ { { /* 375 */ ++ 0x35728652, 0xff1210b4, 0x4223cf27, 0x8602c06b, ++ 0x1fd33106, 0xa1aa3a0c, 0x02040812, 0x08012572, ++ } }, ++ { { /* 376 */ ++ 0x485040cc, 0x601062d0, 0x29001c80, 0x00109a00, ++ 0x22000004, 0x00800000, 0x68002020, 0x609ecbe6, ++ } }, ++ { { /* 377 */ ++ 0x3f73916e, 0x398260c0, 0x48301034, 0xbd5c0006, ++ 0xd6fb8cd1, 0x43e820e1, 0x084e0600, 0xc4d00500, ++ } }, ++ { { /* 378 */ ++ 0x89aa8d1f, 0x1602a6e1, 0x21ed0001, 0x1a8b3656, ++ 0x13a51fb7, 0x30a06502, 0x23c7b278, 0xe9226c93, ++ } }, ++ { { /* 379 */ ++ 0x3a74e47f, 0x98208fe3, 0x2625280e, 0xbf49bf9c, ++ 0xac543218, 0x1916b949, 0xb5220c60, 0x0659fbc1, ++ } }, ++ { { /* 380 */ ++ 0x8420e343, 0x800008d9, 0x20225500, 0x00a10184, ++ 0x20104800, 0x40801380, 0x00160d04, 0x80200040, ++ } }, ++ { { /* 381 */ ++ 0x8de7fd40, 0xe0985436, 0x091e7b8b, 0xd249fec8, ++ 0x8dee0611, 0xba221937, 0x9fdd77f4, 0xf0daf3ec, ++ } }, ++ { { /* 382 */ ++ 0xec424386, 0x26048d3f, 0xc021fa6c, 0x0cc2628e, ++ 0x0145d785, 0x559977ad, 0x4045e250, 0xa154260b, ++ } }, ++ { { /* 383 */ ++ 0x58199827, 0xa4103443, 0x411405f2, 0x07002280, ++ 0x426600b4, 0x15a17210, 0x41856025, 0x00000054, ++ } }, ++ { { /* 384 */ ++ 0x01040201, 0xcb70c820, 0x6a629320, 0x0095184c, ++ 0x9a8b1880, 0x3201aab2, 0x00c4d87a, 0x04c3f3e5, ++ } }, ++ { { /* 385 */ ++ 0xa238d44d, 0x5072a1a1, 0x84fc980a, 0x44d1c152, ++ 0x20c21094, 0x42104180, 0x3a000000, 0xd29d0240, ++ } }, ++ { { /* 386 */ ++ 0xa8b12f01, 0x2432bd40, 0xd04bd34d, 0xd0ada723, ++ 0x75a10a92, 0x01e9adac, 0x771f801a, 0xa01b9225, ++ } }, ++ { { /* 387 */ ++ 0x20cadfa1, 0x738c0602, 0x003b577f, 0x00d00bff, ++ 0x0088806a, 0x0029a1c4, 0x05242a05, 0x16234009, ++ } }, ++ { { /* 388 */ ++ 0x80056822, 0xa2112011, 0x64900004, 0x13824849, ++ 0x193023d5, 0x08922980, 0x88115402, 0xa0042001, ++ } }, ++ { { /* 389 */ ++ 0x81800400, 0x60228502, 0x0b010090, 0x12020022, ++ 0x00834011, 0x00001a01, 0x00000000, 0x00000000, ++ } }, ++ { { /* 390 */ ++ 0x00000000, 0x4684009f, 0x020012c8, 0x1a0004fc, ++ 0x0c4c2ede, 0x80b80402, 0x0afca826, 0x22288c02, ++ } }, ++ { { /* 391 */ ++ 0x8f7ba0e0, 0x2135c7d6, 0xf8b106c7, 0x62550713, ++ 0x8a19936e, 0xfb0e6efa, 0x48f91630, 0x7debcd2f, ++ } }, ++ { { /* 392 */ ++ 0x4e845892, 0x7a2e4ca0, 0x561eedea, 0x1190c649, ++ 0xe83a5324, 0x8124cfdb, 0x634218f1, 0x1a8a5853, ++ } }, ++ { { /* 393 */ ++ 0x24d37420, 0x0514aa3b, 0x89586018, 0xc0004800, ++ 0x91018268, 0x2cd684a4, 0xc4ba8886, 0x02100377, ++ } }, ++ { { /* 394 */ ++ 0x00388244, 0x404aae11, 0x510028c0, 0x15146044, ++ 0x10007310, 0x02480082, 0x40060205, 0x0000c003, ++ } }, ++ { { /* 395 */ ++ 0x0c020000, 0x02200008, 0x40009000, 0xd161b800, ++ 0x32744621, 0x3b8af800, 0x8b00050f, 0x2280bbd0, ++ } }, ++ { { /* 396 */ ++ 0x07690600, 0x00438040, 0x50005420, 0x250c41d0, ++ 0x83108410, 0x02281101, 0x00304008, 0x020040a1, ++ } }, ++ { { /* 397 */ ++ 0x20000040, 0xabe31500, 0xaa443180, 0xc624c2c6, ++ 0x8004ac13, 0x03d1b000, 0x4285611e, 0x1d9ff303, ++ } }, ++ { { /* 398 */ ++ 0x78e8440a, 0xc3925e26, 0x00852000, 0x4000b001, ++ 0x88424a90, 0x0c8dca04, 0x4203a705, 0x000422a1, ++ } }, ++ { { /* 399 */ ++ 0x0c018668, 0x10795564, 0xdea00002, 0x40c12000, ++ 0x5001488b, 0x04000380, 0x50040000, 0x80d0c05d, ++ } }, ++ { { /* 400 */ ++ 0x970aa010, 0x4dafbb20, 0x1e10d921, 0x83140460, ++ 0xa6d68848, 0x733fd83b, 0x497427bc, 0x92130ddc, ++ } }, ++ { { /* 401 */ ++ 0x8ba1142b, 0xd1392e75, 0x50503009, 0x69008808, ++ 0x024a49d4, 0x80164010, 0x89d7e564, 0x5316c020, ++ } }, ++ { { /* 402 */ ++ 0x86002b92, 0x15e0a345, 0x0c03008b, 0xe200196e, ++ 0x80067031, 0xa82916a5, 0x18802000, 0xe1487aac, ++ } }, ++ { { /* 403 */ ++ 0xb5d63207, 0x5f9132e8, 0x20e550a1, 0x10807c00, ++ 0x9d8a7280, 0x421f00aa, 0x02310e22, 0x04941100, ++ } }, ++ { { /* 404 */ ++ 0x40080022, 0x5c100010, 0xfcc80343, 0x0580a1a5, ++ 0x04008433, 0x6e080080, 0x81262a4b, 0x2901aad8, ++ } }, ++ { { /* 405 */ ++ 0x4490684d, 0xba880009, 0x00820040, 0x87d10000, ++ 0xb1e6215b, 0x80083161, 0xc2400800, 0xa600a069, ++ } }, ++ { { /* 406 */ ++ 0x4a328d58, 0x550a5d71, 0x2d579aa0, 0x4aa64005, ++ 0x30b12021, 0x01123fc6, 0x260a10c2, 0x50824462, ++ } }, ++ { { /* 407 */ ++ 0x80409880, 0x810004c0, 0x00002003, 0x38180000, ++ 0xf1a60200, 0x720e4434, 0x92e035a2, 0x09008101, ++ } }, ++ { { /* 408 */ ++ 0x00000400, 0x00008885, 0x00000000, 0x00804000, ++ 0x00000000, 0x00004040, 0x00000000, 0x00000000, ++ } }, ++ { { /* 409 */ ++ 0x00000000, 0x08000000, 0x00000082, 0x00000000, ++ 0x88000004, 0xe7efbfff, 0xffbfffff, 0xfdffefef, ++ } }, ++ { { /* 410 */ ++ 0xbffefbff, 0x057fffff, 0x85b30034, 0x42164706, ++ 0xe4105402, 0xb3058092, 0x81305422, 0x180b4263, ++ } }, ++ { { /* 411 */ ++ 0x13f5387b, 0xa9ea07e5, 0x05143c4c, 0x80020600, ++ 0xbd481ad9, 0xf496ee37, 0x7ec0705f, 0x355fbfb2, ++ } }, ++ { { /* 412 */ ++ 0x455fe644, 0x41469000, 0x063b1d40, 0xfe1362a1, ++ 0x39028505, 0x0c080548, 0x0000144f, 0x58183488, ++ } }, ++ { { /* 413 */ ++ 0xd8153077, 0x4bfbbd0e, 0x85008a90, 0xe61dc100, ++ 0xb386ed14, 0x639bff72, 0xd9befd92, 0x0a92887b, ++ } }, ++ { { /* 414 */ ++ 0x1cb2d3fe, 0x177ab980, 0xdc1782c9, 0x3980fffb, ++ 0x590c4260, 0x37df0f01, 0xb15094a3, 0x23070623, ++ } }, ++ { { /* 415 */ ++ 0x3102f85a, 0x310201f0, 0x1e820040, 0x056a3a0a, ++ 0x12805b84, 0xa7148002, 0xa04b2612, 0x90011069, ++ } }, ++ { { /* 416 */ ++ 0x848a1000, 0x3f801802, 0x42400708, 0x4e140110, ++ 0x180080b0, 0x0281c510, 0x10298202, 0x88000210, ++ } }, ++ { { /* 417 */ ++ 0x00420020, 0x11000280, 0x4413e000, 0xfe025804, ++ 0x30283c07, 0x04739798, 0xcb13ced1, 0x431f6210, ++ } }, ++ { { /* 418 */ ++ 0x55ac278d, 0xc892422e, 0x02885380, 0x78514039, ++ 0x8088292c, 0x2428b900, 0x080e0c41, 0x42004421, ++ } }, ++ { { /* 419 */ ++ 0x08680408, 0x12040006, 0x02903031, 0xe0855b3e, ++ 0x10442936, 0x10822814, 0x83344266, 0x531b013c, ++ } }, ++ { { /* 420 */ ++ 0x0e0d0404, 0x00510c22, 0xc0000012, 0x88000040, ++ 0x0000004a, 0x00000000, 0x5447dff6, 0x00088868, ++ } }, ++ { { /* 421 */ ++ 0x00000081, 0x40000000, 0x00000100, 0x02000000, ++ 0x00080600, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 422 */ ++ 0x00000080, 0x00000040, 0x00000000, 0x00001040, ++ 0x00000000, 0xf7fdefff, 0xfffeff7f, 0xfffffbff, ++ } }, ++ { { /* 423 */ ++ 0xbffffdff, 0x00ffffff, 0x042012c2, 0x07080c06, ++ 0x01101624, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 424 */ ++ 0xe0000000, 0xfffffffe, 0x7f79ffff, 0x00f928df, ++ 0x80120c32, 0xd53a0008, 0xecc2d858, 0x2fa89d18, ++ } }, ++ { { /* 425 */ ++ 0xe0109620, 0x2622d60c, 0x02060f97, 0x9055b240, ++ 0x501180a2, 0x04049800, 0x00004000, 0x00000000, ++ } }, ++ { { /* 426 */ ++ 0x00000000, 0x00000000, 0x00000000, 0xfffffbc0, ++ 0xdffbeffe, 0x62430b08, 0xfb3b41b6, 0x23896f74, ++ } }, ++ { { /* 427 */ ++ 0xecd7ae7f, 0x5960e047, 0x098fa096, 0xa030612c, ++ 0x2aaa090d, 0x4f7bd44e, 0x388bc4b2, 0x6110a9c6, ++ } }, ++ { { /* 428 */ ++ 0x42000014, 0x0202800c, 0x6485fe48, 0xe3f7d63e, ++ 0x0c073aa0, 0x0430e40c, 0x1002f680, 0x00000000, ++ } }, ++ { { /* 429 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00100000, ++ 0x00004000, 0x00004000, 0x00000100, 0x00000000, ++ } }, ++ { { /* 430 */ ++ 0x00000000, 0x40000000, 0x00000000, 0x00000400, ++ 0x00008000, 0x00000000, 0x00400400, 0x00000000, ++ } }, ++ { { /* 431 */ ++ 0x00000000, 0x40000000, 0x00000000, 0x00000800, ++ 0xfebdffe0, 0xffffffff, 0xfbe77f7f, 0xf7ffffbf, ++ } }, ++ { { /* 432 */ ++ 0xefffffff, 0xdff7ff7e, 0xfbdff6f7, 0x804fbffe, ++ 0x00000000, 0x00000000, 0x00000000, 0x7fffef00, ++ } }, ++ { { /* 433 */ ++ 0xb6f7ff7f, 0xb87e4406, 0x88313bf5, 0x00f41796, ++ 0x1391a960, 0x72490080, 0x0024f2f3, 0x42c88701, ++ } }, ++ { { /* 434 */ ++ 0x5048e3d3, 0x43052400, 0x4a4c0000, 0x10580227, ++ 0x01162820, 0x0014a809, 0x00000000, 0x00683ec0, ++ } }, ++ { { /* 435 */ ++ 0x00000000, 0x00000000, 0x00000000, 0xffe00000, ++ 0xfddbb7ff, 0x000000f7, 0xc72e4000, 0x00000180, ++ } }, ++ { { /* 436 */ ++ 0x00012000, 0x00004000, 0x00300000, 0xb4f7ffa8, ++ 0x03ffadf3, 0x00000120, 0x00000000, 0x00000000, ++ } }, ++ { { /* 437 */ ++ 0x00000000, 0x00000000, 0x00000000, 0xfffbf000, ++ 0xfdcf9df7, 0x15c301bf, 0x810a1827, 0x0a00a842, ++ } }, ++ { { /* 438 */ ++ 0x80088108, 0x18048008, 0x0012a3be, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 439 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x90000000, ++ 0xdc3769e6, 0x3dff6bff, 0xf3f9fcf8, 0x00000004, ++ } }, ++ { { /* 440 */ ++ 0x80000000, 0xe7eebf6f, 0x5da2dffe, 0xc00b3fd8, ++ 0xa00c0984, 0x69100040, 0xb912e210, 0x5a0086a5, ++ } }, ++ { { /* 441 */ ++ 0x02896800, 0x6a809005, 0x00030010, 0x80000000, ++ 0x8e001ff9, 0x00000001, 0x00000000, 0x00000000, ++ } }, ++ { { /* 442 */ ++ 0x14000010, 0xa0c09512, 0x0c000200, 0x01000400, ++ 0x050002a3, 0x98800009, 0x00004000, 0x01004c00, ++ } }, ++ { { /* 443 */ ++ 0x04800008, 0x02840300, 0x00000824, 0x00040000, ++ 0x00000400, 0x20010904, 0x00001100, 0x22050030, ++ } }, ++ { { /* 444 */ ++ 0x00000108, 0x08104000, 0x01400000, 0x00001040, ++ 0x00010102, 0x10000040, 0x82012000, 0x10100002, ++ } }, ++ { { /* 445 */ ++ 0x00006002, 0x00000800, 0x00400000, 0x02100401, ++ 0x14400144, 0x013c4980, 0x880e8288, 0x50102014, ++ } }, ++ { { /* 446 */ ++ 0x80000824, 0x101000c1, 0x02800000, 0x02080101, ++ 0x04118000, 0x02200112, 0x00031020, 0x02000003, ++ } }, ++ { { /* 447 */ ++ 0x00000002, 0x090c1090, 0xa0004004, 0x60102290, ++ 0x00080000, 0x00414f45, 0x07071026, 0x40c00001, ++ } }, ++ { { /* 448 */ ++ 0x04580000, 0x0014800a, 0x00002800, 0x00002600, ++ 0x50988020, 0x02140018, 0x04013800, 0x00008008, ++ } }, ++ { { /* 449 */ ++ 0x41082004, 0x80000928, 0x20080280, 0x020e0a00, ++ 0x00010040, 0x16110200, 0x41800002, 0x08231400, ++ } }, ++ { { /* 450 */ ++ 0x40020020, 0x0080202f, 0x2015a008, 0x1c000002, ++ 0xc0040e00, 0x82028012, 0x00400000, 0x2002a004, ++ } }, ++ { { /* 451 */ ++ 0x20200001, 0xa0040000, 0x8890004c, 0xc4000080, ++ 0x10012500, 0x48100482, 0x60800110, 0x40008040, ++ } }, ++ { { /* 452 */ ++ 0x00040008, 0x04000044, 0x90000091, 0x000c1200, ++ 0x06040000, 0x08610480, 0x10010800, 0x080d0001, ++ } }, ++ { { /* 453 */ ++ 0x800204b4, 0x00140000, 0x00000000, 0x00200020, ++ 0x84100200, 0x01811000, 0x02000210, 0x03018800, ++ } }, ++ { { /* 454 */ ++ 0x04042804, 0x20001c92, 0x02100020, 0x4202490a, ++ 0x02420146, 0x00000803, 0x0008c008, 0x44050010, ++ } }, ++ { { /* 455 */ ++ 0x80222000, 0x00000800, 0x00008452, 0x10502140, ++ 0xe0410005, 0x00000400, 0x00a00008, 0x80080000, ++ } }, ++ { { /* 456 */ ++ 0x50180020, 0x00000009, 0x40080600, 0x00000000, ++ 0x56000020, 0x04000000, 0x00020006, 0x00208220, ++ } }, ++ { { /* 457 */ ++ 0x01210000, 0x40009000, 0x08c00140, 0x08110000, ++ 0x00004820, 0x02400810, 0x08800002, 0x00200000, ++ } }, ++ { { /* 458 */ ++ 0x00040a00, 0x00004000, 0x40000104, 0x84000000, ++ 0x02040048, 0x20000000, 0x00012000, 0x1b100000, ++ } }, ++ { { /* 459 */ ++ 0x00007000, 0x04000020, 0x10032000, 0x0804000a, ++ 0x00000008, 0x04020090, 0x88000014, 0x00000000, ++ } }, ++ { { /* 460 */ ++ 0x00000000, 0x08020008, 0x00040400, 0x40a00000, ++ 0x40000000, 0x00080090, 0x40800000, 0x20000388, ++ } }, ++ { { /* 461 */ ++ 0x02001080, 0x20010004, 0x12010004, 0x20008011, ++ 0x13200082, 0x02800000, 0x04098001, 0x00000004, ++ } }, ++ { { /* 462 */ ++ 0x00000000, 0x02801000, 0x00001000, 0x00000100, ++ 0x20010024, 0x00000050, 0x80200028, 0x00000020, ++ } }, ++ { { /* 463 */ ++ 0x01000000, 0x00a24000, 0x00000000, 0x82001010, ++ 0x00000800, 0x02000000, 0x40020002, 0x59000044, ++ } }, ++ { { /* 464 */ ++ 0x00000080, 0x0d040000, 0x04000000, 0x10020000, ++ 0x00022000, 0x00508000, 0x20080001, 0x000004a2, ++ } }, ++ { { /* 465 */ ++ 0xc0020400, 0x00310000, 0x80002000, 0x00002800, ++ 0x00000b60, 0x40200000, 0x00120000, 0x80000009, ++ } }, ++ { { /* 466 */ ++ 0x41000000, 0x00010008, 0x00880910, 0x20080888, ++ 0x04044020, 0x80482010, 0x00006000, 0x00020000, ++ } }, ++ { { /* 467 */ ++ 0x42405004, 0x00400020, 0x00000010, 0x00000886, ++ 0x00008000, 0x80021011, 0x00c00000, 0x42000000, ++ } }, ++ { { /* 468 */ ++ 0x4801201f, 0x40c00004, 0x20600480, 0x00000020, ++ 0x01000110, 0x22400040, 0x00000428, 0x00000000, ++ } }, ++ { { /* 469 */ ++ 0x0f00020f, 0x40401000, 0x00200048, 0x000c0092, ++ 0x81000421, 0x00040004, 0x00620001, 0x06000202, ++ } }, ++ { { /* 470 */ ++ 0x14001808, 0x00083800, 0x008c1028, 0x04120028, ++ 0x22008404, 0x40260880, 0x01100700, 0x00400000, ++ } }, ++ { { /* 471 */ ++ 0x20000020, 0x00200000, 0x00840000, 0x04108000, ++ 0x00000002, 0x00000000, 0x10000002, 0x04000402, ++ } }, ++ { { /* 472 */ ++ 0x10000000, 0x26a20000, 0x05000200, 0x82204000, ++ 0x80000000, 0x00048404, 0x80004800, 0x80000400, ++ } }, ++ { { /* 473 */ ++ 0x00000064, 0x00000050, 0x18804000, 0x00060000, ++ 0x00408002, 0x02020030, 0x00000000, 0x40000000, ++ } }, ++ { { /* 474 */ ++ 0x01208414, 0x00000600, 0x02018000, 0x10400000, ++ 0x04000840, 0x09200000, 0x2e000000, 0x04000304, ++ } }, ++ { { /* 475 */ ++ 0x00c01810, 0x20100010, 0x10400010, 0x02100000, ++ 0xa0000402, 0x48200000, 0x06080000, 0x01400000, ++ } }, ++ { { /* 476 */ ++ 0x40000008, 0x00001000, 0x10112800, 0xc2a09080, ++ 0x00008a02, 0x3a0000e9, 0x80611011, 0x40220000, ++ } }, ++ { { /* 477 */ ++ 0x20000020, 0x48381a00, 0x00028421, 0x54ea0800, ++ 0x01425100, 0x0490200c, 0x20020000, 0x00600800, ++ } }, ++ { { /* 478 */ ++ 0x00e0c201, 0x00004810, 0x10a10001, 0x00000040, ++ 0x80108084, 0x00042000, 0x00002000, 0x00000004, ++ } }, ++ { { /* 479 */ ++ 0x00010014, 0x03005d00, 0x00008102, 0x00120000, ++ 0x51009000, 0x04000480, 0x0021c200, 0x0a888056, ++ } }, ++ { { /* 480 */ ++ 0xd2b60004, 0x13800000, 0x204803a8, 0x04501921, ++ 0x0a003004, 0x02100010, 0x00091100, 0x01070080, ++ } }, ++ { { /* 481 */ ++ 0x42004020, 0x08300000, 0x002a2444, 0x04046081, ++ 0x40046008, 0x00120000, 0x10000108, 0x00000000, ++ } }, ++ { { /* 482 */ ++ 0x00000084, 0x08001000, 0x0012e001, 0x045880c0, ++ 0x00010000, 0x00800022, 0x02401000, 0x00000000, ++ } }, ++ { { /* 483 */ ++ 0x4000d000, 0x00000850, 0x01000009, 0x0d840000, ++ 0x01080000, 0x42008000, 0x20000828, 0x40100040, ++ } }, ++ { { /* 484 */ ++ 0x51000100, 0x32000000, 0x001a0894, 0x04000040, ++ 0x00002102, 0x03428000, 0x018c0080, 0x00234010, ++ } }, ++ { { /* 485 */ ++ 0x00000040, 0x185c4000, 0x03000000, 0x40020004, ++ 0xa20200c9, 0x00000220, 0x00101050, 0x00120004, ++ } }, ++ { { /* 486 */ ++ 0x00000040, 0x44002400, 0x00000228, 0x20000020, ++ 0x000a0008, 0x18010000, 0x3c08830c, 0x40000684, ++ } }, ++ { { /* 487 */ ++ 0x80101800, 0x02000280, 0x0020000c, 0x08009004, ++ 0x00040000, 0x0004000c, 0x00018000, 0x14001000, ++ } }, ++ { { /* 488 */ ++ 0x08240000, 0x00200000, 0x20420014, 0x58112000, ++ 0x10004048, 0x010050c0, 0x0408228c, 0x12282040, ++ } }, ++ { { /* 489 */ ++ 0x00000000, 0x00000020, 0x24002000, 0x00000000, ++ 0x00800a00, 0x00080910, 0x1019a000, 0x60200030, ++ } }, ++ { { /* 490 */ ++ 0x00000080, 0x00000080, 0x08000000, 0x800050a0, ++ 0x80044000, 0x04001010, 0x80008080, 0x00000000, ++ } }, ++ { { /* 491 */ ++ 0x00000040, 0x00800000, 0x000c4283, 0x01020000, ++ 0x00888000, 0x00104008, 0x20000000, 0x04000080, ++ } }, ++ { { /* 492 */ ++ 0x20000104, 0x1802c021, 0x08100000, 0x0000004e, ++ 0x80000001, 0x30c00080, 0x00000040, 0x00401200, ++ } }, ++ { { /* 493 */ ++ 0x04945288, 0x00940400, 0x06400104, 0x10002000, ++ 0x00080010, 0x00400420, 0x00000102, 0x00408010, ++ } }, ++ { { /* 494 */ ++ 0x05000000, 0x40002240, 0x00100000, 0x0e400024, ++ 0x00000080, 0x80000440, 0x01018410, 0xb1804004, ++ } }, ++ { { /* 495 */ ++ 0x25000800, 0x20000000, 0x00800000, 0x0000804c, ++ 0x10020020, 0x42001000, 0x00082000, 0x00002000, ++ } }, ++ { { /* 496 */ ++ 0x11500020, 0x40004053, 0x11280500, 0x80060014, ++ 0x004c0101, 0x60002008, 0x44000000, 0x01000036, ++ } }, ++ { { /* 497 */ ++ 0x00010028, 0x01180000, 0x84041804, 0x00098000, ++ 0x00800000, 0x00000000, 0x00400002, 0x10004001, ++ } }, ++ { { /* 498 */ ++ 0x0051a004, 0x00008100, 0x00000024, 0x40041000, ++ 0x00040000, 0x00042001, 0x00000000, 0x00008000, ++ } }, ++ { { /* 499 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x20030000, ++ 0x00001840, 0x00020220, 0x04404002, 0x00204000, ++ } }, ++ { { /* 500 */ ++ 0x01008010, 0x00002080, 0x40008064, 0x00004031, ++ 0x10018090, 0x80304001, 0x000080a0, 0x80200040, ++ } }, ++ { { /* 501 */ ++ 0x00000001, 0x00000010, 0x00102088, 0x00800020, ++ 0x00120681, 0x100002a0, 0x00000042, 0x00000080, ++ } }, ++ { { /* 502 */ ++ 0x10000000, 0x21000a00, 0x00000200, 0x40000080, ++ 0x10110000, 0x00108200, 0x04000000, 0x00000400, ++ } }, ++ { { /* 503 */ ++ 0x80001000, 0x80002000, 0x40003008, 0x00000204, ++ 0x0801000a, 0x40000001, 0x00000000, 0x00000004, ++ } }, ++ { { /* 504 */ ++ 0x00000000, 0x00000000, 0x00020000, 0x00000000, ++ 0x88000000, 0x00002000, 0x08502000, 0x00840a00, ++ } }, ++ { { /* 505 */ ++ 0x31061808, 0x00000000, 0x00000000, 0x04000000, ++ 0x00000004, 0x00000240, 0x00100009, 0x00000000, ++ } }, ++ { { /* 506 */ ++ 0x00004002, 0x04002500, 0x00008040, 0x40a20100, ++ 0x00000001, 0x12412080, 0x04004008, 0x00042014, ++ } }, ++ { { /* 507 */ ++ 0x02000000, 0x00012000, 0x10000402, 0x000040c0, ++ 0x00080000, 0x5fe800a1, 0x04019402, 0x02000000, ++ } }, ++ { { /* 508 */ ++ 0x00040100, 0x00880000, 0x00401000, 0x00001012, ++ 0x00000000, 0x08004100, 0x00000010, 0x00000000, ++ } }, ++ { { /* 509 */ ++ 0x00000000, 0x00000000, 0x52020000, 0x10410080, ++ 0x00005000, 0x08400200, 0x80400010, 0x44400020, ++ } }, ++ { { /* 510 */ ++ 0x00084100, 0x10200d02, 0xa1200012, 0x00804804, ++ 0x00008212, 0xc6024000, 0x08100000, 0x205c1828, ++ } }, ++ { { /* 511 */ ++ 0x00000088, 0x00031000, 0x8000013f, 0x21184b44, ++ 0x100100f2, 0xa9002001, 0x08080840, 0x001b0001, ++ } }, ++ { { /* 512 */ ++ 0x28800112, 0x400020f0, 0x0910200c, 0x0a0010a0, ++ 0x80000020, 0x00000004, 0x1000000a, 0x00400000, ++ } }, ++ { { /* 513 */ ++ 0x00000000, 0x00002000, 0x00000080, 0x81000000, ++ 0x02c00020, 0x000004c5, 0x00000000, 0x00100100, ++ } }, ++ { { /* 514 */ ++ 0x20000000, 0x01080000, 0x00400022, 0x08000200, ++ 0x00408002, 0x20400028, 0x00000000, 0x00100000, ++ } }, ++ { { /* 515 */ ++ 0x08000008, 0x00420002, 0xa0a20003, 0x00022000, ++ 0x88000280, 0x65160000, 0x00040105, 0x00244041, ++ } }, ++ { { /* 516 */ ++ 0x80300000, 0x00184008, 0x00000880, 0x00201140, ++ 0x00000000, 0x02900000, 0x50004588, 0x00221043, ++ } }, ++ { { /* 517 */ ++ 0x12004000, 0x0b800000, 0x20002405, 0x0000000c, ++ 0x08000000, 0x11000410, 0x04000030, 0x00200043, ++ } }, ++ { { /* 518 */ ++ 0x80011000, 0x18008042, 0x11000000, 0x00001008, ++ 0x00008000, 0x24440000, 0x00800000, 0x80100005, ++ } }, ++ { { /* 519 */ ++ 0x00108204, 0x02102400, 0x00010001, 0x80000200, ++ 0xa080e80a, 0x00010000, 0x20008000, 0x80122200, ++ } }, ++ { { /* 520 */ ++ 0x88211404, 0x04208041, 0x20088020, 0x18040000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 521 */ ++ 0x00401004, 0x02100002, 0x40014210, 0x50006000, ++ 0x00080008, 0x20000820, 0x00100211, 0x10000000, ++ } }, ++ { { /* 522 */ ++ 0x91005400, 0x00000000, 0x00000000, 0x08000000, ++ 0x41610032, 0xa0029d44, 0x000000d2, 0x41020004, ++ } }, ++ { { /* 523 */ ++ 0x00800104, 0x020000c0, 0x04090030, 0x80000204, ++ 0x82004000, 0x00000020, 0x00000000, 0x00000000, ++ } }, ++ { { /* 524 */ ++ 0x00000000, 0x00000000, 0x00000080, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 525 */ ++ 0xc373ff8b, 0x1b0f6840, 0xf34ce9ac, 0xc0080200, ++ 0xca3e795c, 0x06487976, 0xf7f02fdf, 0xa8ff033a, ++ } }, ++ { { /* 526 */ ++ 0x233fef37, 0xfd59b004, 0xfffff3ca, 0xfff9de9f, ++ 0x7df7abff, 0x8eecc000, 0xffdbeebf, 0x45fad003, ++ } }, ++ { { /* 527 */ ++ 0xdffefae1, 0x10abbfef, 0xfcaaffeb, 0x24fdef3f, ++ 0x7f7678ad, 0xedfff00c, 0x2cfacff6, 0xeb6bf7f9, ++ } }, ++ { { /* 528 */ ++ 0x95bf1ffd, 0xbfbf6677, 0xfeb43bfb, 0x11e27bae, ++ 0x41bea681, 0x72c31435, 0x71917d70, 0x276b0003, ++ } }, ++ { { /* 529 */ ++ 0x70cf57cb, 0x0def4732, 0xfc747eda, 0xbdb4fe06, ++ 0x8bca3f9f, 0x58007e49, 0xebec228f, 0xddbb8a5c, ++ } }, ++ { { /* 530 */ ++ 0xb6e7ef60, 0xf293a40f, 0x549e37bb, 0x9bafd04b, ++ 0xf7d4c414, 0x0a1430b0, 0x88d02f08, 0x192fff7e, ++ } }, ++ { { /* 531 */ ++ 0xfb07ffda, 0x7beb7ff1, 0x0010c5ef, 0xfdff99ff, ++ 0x056779d7, 0xfdcbffe7, 0x4040c3ff, 0xbd8e6ff7, ++ } }, ++ { { /* 532 */ ++ 0x0497dffa, 0x5bfff4c0, 0xd0e7ed7b, 0xf8e0047e, ++ 0xb73eff9f, 0x882e7dfe, 0xbe7ffffd, 0xf6c483fe, ++ } }, ++ { { /* 533 */ ++ 0xb8fdf357, 0xef7dd680, 0x47885767, 0xc3dfff7d, ++ 0x37a9f0ff, 0x70fc7de0, 0xec9a3f6f, 0x86814cb3, ++ } }, ++ { { /* 534 */ ++ 0xdd5c3f9e, 0x4819f70d, 0x0007fea3, 0x38ffaf56, ++ 0xefb8980d, 0xb760403d, 0x9035d8ce, 0x3fff72bf, ++ } }, ++ { { /* 535 */ ++ 0x7a117ff7, 0xabfff7bb, 0x6fbeff00, 0xfe72a93c, ++ 0xf11bcfef, 0xf40adb6b, 0xef7ec3e6, 0xf6109b9c, ++ } }, ++ { { /* 536 */ ++ 0x16f4f048, 0x5182feb5, 0x15bbc7b1, 0xfbdf6e87, ++ 0x63cde43f, 0x7e7ec1ff, 0x7d5ffdeb, 0xfcfe777b, ++ } }, ++ { { /* 537 */ ++ 0xdbea960b, 0x53e86229, 0xfdef37df, 0xbd8136f5, ++ 0xfcbddc18, 0xffffd2e4, 0xffe03fd7, 0xabf87f6f, ++ } }, ++ { { /* 538 */ ++ 0x6ed99bae, 0xf115f5fb, 0xbdfb79a9, 0xadaf5a3c, ++ 0x1facdbba, 0x837971fc, 0xc35f7cf7, 0x0567dfff, ++ } }, ++ { { /* 539 */ ++ 0x8467ff9a, 0xdf8b1534, 0x3373f9f3, 0x5e1af7bd, ++ 0xa03fbf40, 0x01ebffff, 0xcfdddfc0, 0xabd37500, ++ } }, ++ { { /* 540 */ ++ 0xeed6f8c3, 0xb7ff43fd, 0x42275eaf, 0xf6869bac, ++ 0xf6bc27d7, 0x35b7f787, 0xe176aacd, 0xe29f49e7, ++ } }, ++ { { /* 541 */ ++ 0xaff2545c, 0x61d82b3f, 0xbbb8fc3b, 0x7b7dffcf, ++ 0x1ce0bf95, 0x43ff7dfd, 0xfffe5ff6, 0xc4ced3ef, ++ } }, ++ { { /* 542 */ ++ 0xadbc8db6, 0x11eb63dc, 0x23d0df59, 0xf3dbbeb4, ++ 0xdbc71fe7, 0xfae4ff63, 0x63f7b22b, 0xadbaed3b, ++ } }, ++ { { /* 543 */ ++ 0x7efffe01, 0x02bcfff7, 0xef3932ff, 0x8005fffc, ++ 0xbcf577fb, 0xfff7010d, 0xbf3afffb, 0xdfff0057, ++ } }, ++ { { /* 544 */ ++ 0xbd7def7b, 0xc8d4db88, 0xed7cfff3, 0x56ff5dee, ++ 0xac5f7e0d, 0xd57fff96, 0xc1403fee, 0xffe76ff9, ++ } }, ++ { { /* 545 */ ++ 0x8e77779b, 0xe45d6ebf, 0x5f1f6fcf, 0xfedfe07f, ++ 0x01fed7db, 0xfb7bff00, 0x1fdfffd4, 0xfffff800, ++ } }, ++ { { /* 546 */ ++ 0x007bfb8f, 0x7f5cbf00, 0x07f3ffff, 0x3de7eba0, ++ 0xfbd7f7bf, 0x6003ffbf, 0xbfedfffd, 0x027fefbb, ++ } }, ++ { { /* 547 */ ++ 0xddfdfe40, 0xe2f9fdff, 0xfb1f680b, 0xaffdfbe3, ++ 0xf7ed9fa4, 0xf80f7a7d, 0x0fd5eebe, 0xfd9fbb5d, ++ } }, ++ { { /* 548 */ ++ 0x3bf9f2db, 0xebccfe7f, 0x73fa876a, 0x9ffc95fc, ++ 0xfaf7109f, 0xbbcdddb7, 0xeccdf87e, 0x3c3ff366, ++ } }, ++ { { /* 549 */ ++ 0xb03ffffd, 0x067ee9f7, 0xfe0696ae, 0x5fd7d576, ++ 0xa3f33fd1, 0x6fb7cf07, 0x7f449fd1, 0xd3dd7b59, ++ } }, ++ { { /* 550 */ ++ 0xa9bdaf3b, 0xff3a7dcf, 0xf6ebfbe0, 0xffffb401, ++ 0xb7bf7afa, 0x0ffdc000, 0xff1fff7f, 0x95fffefc, ++ } }, ++ { { /* 551 */ ++ 0xb5dc0000, 0x3f3eef63, 0x001bfb7f, 0xfbf6e800, ++ 0xb8df9eef, 0x003fff9f, 0xf5ff7bd0, 0x3fffdfdb, ++ } }, ++ { { /* 552 */ ++ 0x00bffdf0, 0xbbbd8420, 0xffdedf37, 0x0ff3ff6d, ++ 0x5efb604c, 0xfafbfffb, 0x0219fe5e, 0xf9de79f4, ++ } }, ++ { { /* 553 */ ++ 0xebfaa7f7, 0xff3401eb, 0xef73ebd3, 0xc040afd7, ++ 0xdcff72bb, 0x2fd8f17f, 0xfe0bb8ec, 0x1f0bdda3, ++ } }, ++ { { /* 554 */ ++ 0x47cf8f1d, 0xffdeb12b, 0xda737fee, 0xcbc424ff, ++ 0xcbf2f75d, 0xb4edecfd, 0x4dddbff9, 0xfb8d99dd, ++ } }, ++ { { /* 555 */ ++ 0xaf7bbb7f, 0xc959ddfb, 0xfab5fc4f, 0x6d5fafe3, ++ 0x3f7dffff, 0xffdb7800, 0x7effb6ff, 0x022ffbaf, ++ } }, ++ { { /* 556 */ ++ 0xefc7ff9b, 0xffffffa5, 0xc7000007, 0xfff1f7ff, ++ 0x01bf7ffd, 0xfdbcdc00, 0xffffbff5, 0x3effff7f, ++ } }, ++ { { /* 557 */ ++ 0xbe000029, 0xff7ff9ff, 0xfd7e6efb, 0x039ecbff, ++ 0xfbdde300, 0xf6dfccff, 0x117fffff, 0xfbf6f800, ++ } }, ++ { { /* 558 */ ++ 0xd73ce7ef, 0xdfeffeef, 0xedbfc00b, 0xfdcdfedf, ++ 0x40fd7bf5, 0xb75fffff, 0xf930ffdf, 0xdc97fbdf, ++ } }, ++ { { /* 559 */ ++ 0xbff2fef3, 0xdfbf8fdf, 0xede6177f, 0x35530f7f, ++ 0x877e447c, 0x45bbfa12, 0x779eede0, 0xbfd98017, ++ } }, ++ { { /* 560 */ ++ 0xde897e55, 0x0447c16f, 0xf75d7ade, 0x290557ff, ++ 0xfe9586f7, 0xf32f97b3, 0x9f75cfff, 0xfb1771f7, ++ } }, ++ { { /* 561 */ ++ 0xee1934ee, 0xef6137cc, 0xef4c9fd6, 0xfbddd68f, ++ 0x6def7b73, 0xa431d7fe, 0x97d75e7f, 0xffd80f5b, ++ } }, ++ { { /* 562 */ ++ 0x7bce9d83, 0xdcff22ec, 0xef87763d, 0xfdeddfe7, ++ 0xa0fc4fff, 0xdbfc3b77, 0x7fdc3ded, 0xf5706fa9, ++ } }, ++ { { /* 563 */ ++ 0x2c403ffb, 0x847fff7f, 0xdeb7ec57, 0xf22fe69c, ++ 0xd5b50feb, 0xede7afeb, 0xfff08c2f, 0xe8f0537f, ++ } }, ++ { { /* 564 */ ++ 0xb5ffb99d, 0xe78fff66, 0xbe10d981, 0xe3c19c7c, ++ 0x27339cd1, 0xff6d0cbc, 0xefb7fcb7, 0xffffa0df, ++ } }, ++ { { /* 565 */ ++ 0xfe7bbf0b, 0x353fa3ff, 0x97cd13cc, 0xfb277637, ++ 0x7e6ccfd6, 0xed31ec50, 0xfc1c677c, 0x5fbff6fa, ++ } }, ++ { { /* 566 */ ++ 0xae2f0fba, 0x7ffea3ad, 0xde74fcf0, 0xf200ffef, ++ 0xfea2fbbf, 0xbcff3daf, 0x5fb9f694, 0x3f8ff3ad, ++ } }, ++ { { /* 567 */ ++ 0xa01ff26c, 0x01bfffef, 0x70057728, 0xda03ff35, ++ 0xc7fad2f9, 0x5c1d3fbf, 0xec33ff3a, 0xfe9cb7af, ++ } }, ++ { { /* 568 */ ++ 0x7a9f5236, 0xe722bffa, 0xfcff9ff7, 0xb61d2fbb, ++ 0x1dfded06, 0xefdf7dd7, 0xf166eb23, 0x0dc07ed9, ++ } }, ++ { { /* 569 */ ++ 0xdfbf3d3d, 0xba83c945, 0x9dd07dd1, 0xcf737b87, ++ 0xc3f59ff3, 0xc5fedf0d, 0x83020cb3, 0xaec0e879, ++ } }, ++ { { /* 570 */ ++ 0x6f0fc773, 0x093ffd7d, 0x0157fff1, 0x01ff62fb, ++ 0x3bf3fdb4, 0x43b2b013, 0xff305ed3, 0xeb9f0fff, ++ } }, ++ { { /* 571 */ ++ 0xf203feef, 0xfb893fef, 0x9e9937a9, 0xa72cdef9, ++ 0xc1f63733, 0xfe3e812e, 0xf2f75d20, 0x69d7d585, ++ } }, ++ { { /* 572 */ ++ 0xffffffff, 0xff6fdb07, 0xd97fc4ff, 0xbe0fefce, ++ 0xf05ef17b, 0xffb7f6cf, 0xef845ef7, 0x0edfd7cb, ++ } }, ++ { { /* 573 */ ++ 0xfcffff08, 0xffffee3f, 0xd7ff13ff, 0x7ffdaf0f, ++ 0x1ffabdc7, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 574 */ ++ 0x00000000, 0xe7400000, 0xf933bd38, 0xfeed7feb, ++ 0x7c767fe8, 0xffefb3f7, 0xd8b7feaf, 0xfbbfff6f, ++ } }, ++ { { /* 575 */ ++ 0xdbf7f8fb, 0xe2f91752, 0x754785c8, 0xe3ef9090, ++ 0x3f6d9ef4, 0x0536ee2e, 0x7ff3f7bc, 0x7f3fa07b, ++ } }, ++ { { /* 576 */ ++ 0xeb600567, 0x6601babe, 0x583ffcd8, 0x87dfcaf7, ++ 0xffa0bfcd, 0xfebf5bcd, 0xefa7b6fd, 0xdf9c77ef, ++ } }, ++ { { /* 577 */ ++ 0xf8773fb7, 0xb7fc9d27, 0xdfefcab5, 0xf1b6fb5a, ++ 0xef1fec39, 0x7ffbfbbf, 0xdafe000d, 0x4e7fbdfb, ++ } }, ++ { { /* 578 */ ++ 0x5ac033ff, 0x9ffebff5, 0x005fffbf, 0xfdf80000, ++ 0x6ffdffca, 0xa001cffd, 0xfbf2dfff, 0xff7fdfbf, ++ } }, ++ { { /* 579 */ ++ 0x080ffeda, 0xbfffba08, 0xeed77afd, 0x67f9fbeb, ++ 0xff93e044, 0x9f57df97, 0x08dffef7, 0xfedfdf80, ++ } }, ++ { { /* 580 */ ++ 0xf7feffc5, 0x6803fffb, 0x6bfa67fb, 0x5fe27fff, ++ 0xff73ffff, 0xe7fb87df, 0xf7a7ebfd, 0xefc7bf7e, ++ } }, ++ { { /* 581 */ ++ 0xdf821ef3, 0xdf7e76ff, 0xda7d79c9, 0x1e9befbe, ++ 0x77fb7ce0, 0xfffb87be, 0xffdb1bff, 0x4fe03f5c, ++ } }, ++ { { /* 582 */ ++ 0x5f0e7fff, 0xddbf77ff, 0xfffff04f, 0x0ff8ffff, ++ 0xfddfa3be, 0xfffdfc1c, 0xfb9e1f7d, 0xdedcbdff, ++ } }, ++ { { /* 583 */ ++ 0xbafb3f6f, 0xfbefdf7f, 0x2eec7d1b, 0xf2f7af8e, ++ 0xcfee7b0f, 0x77c61d96, 0xfff57e07, 0x7fdfd982, ++ } }, ++ { { /* 584 */ ++ 0xc7ff5ee6, 0x79effeee, 0xffcf9a56, 0xde5efe5f, ++ 0xf9e8896e, 0xe6c4f45e, 0xbe7c0001, 0xdddf3b7f, ++ } }, ++ { { /* 585 */ ++ 0xe9efd59d, 0xde5334ac, 0x4bf7f573, 0x9eff7b4f, ++ 0x476eb8fe, 0xff450dfb, 0xfbfeabfd, 0xddffe9d7, ++ } }, ++ { { /* 586 */ ++ 0x7fffedf7, 0x7eebddfd, 0xb7ffcfe7, 0xef91bde9, ++ 0xd77c5d75, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 587 */ ++ 0x00000000, 0xfa800000, 0xb4f1ffee, 0x2fefbf76, ++ 0x77bfb677, 0xfffd9fbf, 0xf6ae95bf, 0x7f3b75ff, ++ } }, ++ { { /* 588 */ ++ 0x0af9a7f5, 0x00000000, 0x00000000, 0x2bddfbd0, ++ 0x9a7ff633, 0xd6fcfdab, 0xbfebf9e6, 0xf41fdfdf, ++ } }, ++ { { /* 589 */ ++ 0xffffa6fd, 0xf37b4aff, 0xfef97fb7, 0x1d5cb6ff, ++ 0xe5ff7ff6, 0x24041f7b, 0xf99ebe05, 0xdff2dbe3, ++ } }, ++ { { /* 590 */ ++ 0xfdff6fef, 0xcbfcd679, 0xefffebfd, 0x0000001f, ++ 0x98000000, 0x8017e148, 0x00fe6a74, 0xfdf16d7f, ++ } }, ++ { { /* 591 */ ++ 0xfef3b87f, 0xf176e01f, 0x7b3fee96, 0xfffdeb8d, ++ 0xcbb3adff, 0xe17f84ef, 0xbff04daa, 0xfe3fbf3f, ++ } }, ++ { { /* 592 */ ++ 0xffd7ebff, 0xcf7fffdf, 0x85edfffb, 0x07bcd73f, ++ 0xfe0faeff, 0x76bffdaf, 0x37bbfaef, 0xa3ba7fdc, ++ } }, ++ { { /* 593 */ ++ 0x56f7b6ff, 0xe7df60f8, 0x4cdfff61, 0xff45b0fb, ++ 0x3ffa7ded, 0x18fc1fff, 0xe3afffff, 0xdf83c7d3, ++ } }, ++ { { /* 594 */ ++ 0xef7dfb57, 0x1378efff, 0x5ff7fec0, 0x5ee334bb, ++ 0xeff6f70d, 0x00bfd7fe, 0xf7f7f59d, 0xffe051de, ++ } }, ++ { { /* 595 */ ++ 0x037ffec9, 0xbfef5f01, 0x60a79ff1, 0xf1ffef1d, ++ 0x0000000f, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 596 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x3c800000, ++ 0xd91ffb4d, 0xfee37b3a, 0xdc7f3fe9, 0x0000003f, ++ } }, ++ { { /* 597 */ ++ 0x50000000, 0xbe07f51f, 0xf91bfc1d, 0x71ffbc1e, ++ 0x5bbe6ff9, 0x9b1b5796, 0xfffc7fff, 0xafe7872e, ++ } }, ++ { { /* 598 */ ++ 0xf34febf5, 0xe725dffd, 0x5d440bdc, 0xfddd5747, ++ 0x7790ed3f, 0x8ac87d7f, 0xf3f9fafa, 0xef4b202a, ++ } }, ++ { { /* 599 */ ++ 0x79cff5ff, 0x0ba5abd3, 0xfb8ff77a, 0x001f8ebd, ++ 0x00000000, 0xfd4ef300, 0x88001a57, 0x7654aeac, ++ } }, ++ { { /* 600 */ ++ 0xcdff17ad, 0xf42fffb2, 0xdbff5baa, 0x00000002, ++ 0x73c00000, 0x2e3ff9ea, 0xbbfffa8e, 0xffd376bc, ++ } }, ++ { { /* 601 */ ++ 0x7e72eefe, 0xe7f77ebd, 0xcefdf77f, 0x00000ff5, ++ 0x00000000, 0xdb9ba900, 0x917fa4c7, 0x7ecef8ca, ++ } }, ++ { { /* 602 */ ++ 0xc7e77d7a, 0xdcaecbbd, 0x8f76fd7e, 0x7cf391d3, ++ 0x4c2f01e5, 0xa360ed77, 0x5ef807db, 0x21811df7, ++ } }, ++ { { /* 603 */ ++ 0x309c6be0, 0xfade3b3a, 0xc3f57f53, 0x07ba61cd, ++ 0x00000000, 0x00000000, 0x00000000, 0xbefe26e0, ++ } }, ++ { { /* 604 */ ++ 0xebb503f9, 0xe9cbe36d, 0xbfde9c2f, 0xabbf9f83, ++ 0xffd51ff7, 0xdffeb7df, 0xffeffdae, 0xeffdfb7e, ++ } }, ++ { { /* 605 */ ++ 0x6ebfaaff, 0x00000000, 0x00000000, 0xb6200000, ++ 0xbe9e7fcd, 0x58f162b3, 0xfd7bf10d, 0xbefde9f1, ++ } }, ++ { { /* 606 */ ++ 0x5f6dc6c3, 0x69ffff3d, 0xfbf4ffcf, 0x4ff7dcfb, ++ 0x11372000, 0x00000015, 0x00000000, 0x00000000, ++ } }, ++ { { /* 607 */ ++ 0x00003000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++}, ++{ ++ /* aa */ ++ LEAF( 0, 0), ++ /* ab */ ++ LEAF( 1, 1), ++ /* af */ ++ LEAF( 2, 2), LEAF( 2, 3), ++ /* ak */ ++ LEAF( 4, 4), LEAF( 4, 5), LEAF( 4, 6), LEAF( 4, 7), ++ LEAF( 4, 8), ++ /* am */ ++ LEAF( 9, 9), LEAF( 9, 10), ++ /* an */ ++ LEAF( 11, 11), ++ /* ar */ ++ LEAF( 12, 12), ++ /* as */ ++ LEAF( 13, 13), ++ /* av */ ++ LEAF( 14, 14), ++ /* ay */ ++ LEAF( 15, 15), ++ /* az_az */ ++ LEAF( 16, 16), LEAF( 16, 17), LEAF( 16, 18), ++ /* az_ir */ ++ LEAF( 19, 19), ++ /* ba */ ++ LEAF( 20, 20), ++ /* be */ ++ LEAF( 21, 21), ++ /* ber_dz */ ++ LEAF( 22, 22), LEAF( 22, 23), LEAF( 22, 24), LEAF( 22, 25), ++ /* ber_ma */ ++ LEAF( 26, 26), ++ /* bg */ ++ LEAF( 27, 27), ++ /* bh */ ++ LEAF( 28, 28), ++ /* bi */ ++ LEAF( 29, 29), ++ /* bin */ ++ LEAF( 30, 30), LEAF( 30, 31), LEAF( 30, 32), ++ /* bm */ ++ LEAF( 33, 22), LEAF( 33, 33), LEAF( 33, 34), ++ /* bn */ ++ LEAF( 36, 35), ++ /* bo */ ++ LEAF( 37, 36), ++ /* br */ ++ LEAF( 38, 37), ++ /* bs */ ++ LEAF( 39, 22), LEAF( 39, 38), ++ /* bua */ ++ LEAF( 41, 39), ++ /* byn */ ++ LEAF( 42, 40), LEAF( 42, 41), ++ /* ca */ ++ LEAF( 44, 42), LEAF( 44, 43), ++ /* ch */ ++ LEAF( 46, 44), ++ /* chm */ ++ LEAF( 47, 45), ++ /* chr */ ++ LEAF( 48, 46), ++ /* co */ ++ LEAF( 49, 47), LEAF( 49, 48), ++ /* crh */ ++ LEAF( 51, 49), LEAF( 51, 50), ++ /* cs */ ++ LEAF( 53, 51), LEAF( 53, 52), ++ /* csb */ ++ LEAF( 55, 53), LEAF( 55, 54), ++ /* cu */ ++ LEAF( 57, 55), ++ /* cv */ ++ LEAF( 58, 56), LEAF( 58, 57), ++ /* cy */ ++ LEAF( 60, 58), LEAF( 60, 59), LEAF( 60, 60), ++ /* da */ ++ LEAF( 63, 61), ++ /* de */ ++ LEAF( 64, 62), ++ /* dv */ ++ LEAF( 65, 63), ++ /* ee */ ++ LEAF( 66, 30), LEAF( 66, 64), LEAF( 66, 65), LEAF( 66, 66), ++ /* el */ ++ LEAF( 70, 67), ++ /* en */ ++ LEAF( 71, 68), ++ /* eo */ ++ LEAF( 72, 22), LEAF( 72, 69), ++ /* et */ ++ LEAF( 74, 70), LEAF( 74, 71), ++ /* eu */ ++ LEAF( 76, 72), ++ /* ff */ ++ LEAF( 77, 22), LEAF( 77, 73), LEAF( 77, 74), ++ /* fi */ ++ LEAF( 80, 75), LEAF( 80, 71), ++ /* fil */ ++ LEAF( 82, 76), ++ /* fj */ ++ LEAF( 83, 22), ++ /* fo */ ++ LEAF( 84, 77), ++ /* fur */ ++ LEAF( 85, 78), ++ /* fy */ ++ LEAF( 86, 79), ++ /* ga */ ++ LEAF( 87, 80), LEAF( 87, 81), LEAF( 87, 82), ++ /* gd */ ++ LEAF( 90, 83), ++ /* gez */ ++ LEAF( 91, 84), LEAF( 91, 85), ++ /* gn */ ++ LEAF( 93, 86), LEAF( 93, 87), LEAF( 93, 88), ++ /* gu */ ++ LEAF( 96, 89), ++ /* gv */ ++ LEAF( 97, 90), ++ /* ha */ ++ LEAF( 98, 22), LEAF( 98, 91), LEAF( 98, 92), ++ /* haw */ ++ LEAF(101, 22), LEAF(101, 93), LEAF(101, 94), ++ /* he */ ++ LEAF(104, 95), ++ /* hsb */ ++ LEAF(105, 96), LEAF(105, 97), ++ /* ht */ ++ LEAF(107, 98), ++ /* hu */ ++ LEAF(108, 99), LEAF(108,100), ++ /* hy */ ++ LEAF(110,101), ++ /* hz */ ++ LEAF(111, 22), LEAF(111,102), LEAF(111,103), ++ /* id */ ++ LEAF(114,104), ++ /* ig */ ++ LEAF(115, 22), LEAF(115,105), ++ /* ii */ ++ LEAF(117,106), LEAF(117,106), LEAF(117,106), LEAF(117,106), ++ LEAF(117,107), ++ /* ik */ ++ LEAF(122,108), ++ /* is */ ++ LEAF(123,109), ++ /* it */ ++ LEAF(124,110), ++ /* iu */ ++ LEAF(125,111), LEAF(125,112), LEAF(125,113), ++ /* ja */ ++ LEAF(128,114), LEAF(128,115), LEAF(128,116), LEAF(128,117), ++ LEAF(128,118), LEAF(128,119), LEAF(128,120), LEAF(128,121), ++ LEAF(128,122), LEAF(128,123), LEAF(128,124), LEAF(128,125), ++ LEAF(128,126), LEAF(128,127), LEAF(128,128), LEAF(128,129), ++ LEAF(128,130), LEAF(128,131), LEAF(128,132), LEAF(128,133), ++ LEAF(128,134), LEAF(128,135), LEAF(128,136), LEAF(128,137), ++ LEAF(128,138), LEAF(128,139), LEAF(128,140), LEAF(128,141), ++ LEAF(128,142), LEAF(128,143), LEAF(128,144), LEAF(128,145), ++ LEAF(128,146), LEAF(128,147), LEAF(128,148), LEAF(128,149), ++ LEAF(128,150), LEAF(128,151), LEAF(128,152), LEAF(128,153), ++ LEAF(128,154), LEAF(128,155), LEAF(128,156), LEAF(128,157), ++ LEAF(128,158), LEAF(128,159), LEAF(128,160), LEAF(128,161), ++ LEAF(128,162), LEAF(128,163), LEAF(128,164), LEAF(128,165), ++ LEAF(128,166), LEAF(128,167), LEAF(128,168), LEAF(128,169), ++ LEAF(128,170), LEAF(128,171), LEAF(128,172), LEAF(128,173), ++ LEAF(128,174), LEAF(128,175), LEAF(128,176), LEAF(128,177), ++ LEAF(128,178), LEAF(128,179), LEAF(128,180), LEAF(128,181), ++ LEAF(128,182), LEAF(128,183), LEAF(128,184), LEAF(128,185), ++ LEAF(128,186), LEAF(128,187), LEAF(128,188), LEAF(128,189), ++ LEAF(128,190), LEAF(128,191), LEAF(128,192), LEAF(128,193), ++ LEAF(128,194), LEAF(128,195), LEAF(128,196), ++ /* jv */ ++ LEAF(211,197), ++ /* ka */ ++ LEAF(212,198), ++ /* kaa */ ++ LEAF(213,199), ++ /* ki */ ++ LEAF(214, 22), LEAF(214,200), ++ /* kk */ ++ LEAF(216,201), ++ /* kl */ ++ LEAF(217,202), LEAF(217,203), ++ /* km */ ++ LEAF(219,204), ++ /* kn */ ++ LEAF(220,205), ++ /* ko */ ++ LEAF(221,206), LEAF(221,207), LEAF(221,208), LEAF(221,209), ++ LEAF(221,210), LEAF(221,211), LEAF(221,212), LEAF(221,213), ++ LEAF(221,214), LEAF(221,215), LEAF(221,216), LEAF(221,217), ++ LEAF(221,218), LEAF(221,219), LEAF(221,220), LEAF(221,221), ++ LEAF(221,222), LEAF(221,223), LEAF(221,224), LEAF(221,225), ++ LEAF(221,226), LEAF(221,227), LEAF(221,228), LEAF(221,229), ++ LEAF(221,230), LEAF(221,231), LEAF(221,232), LEAF(221,233), ++ LEAF(221,234), LEAF(221,235), LEAF(221,236), LEAF(221,237), ++ LEAF(221,238), LEAF(221,239), LEAF(221,240), LEAF(221,241), ++ LEAF(221,242), LEAF(221,243), LEAF(221,244), LEAF(221,245), ++ LEAF(221,246), LEAF(221,247), LEAF(221,248), LEAF(221,249), ++ LEAF(221,250), ++ /* kr */ ++ LEAF(266, 22), LEAF(266,251), LEAF(266,252), ++ /* ks */ ++ LEAF(269,253), ++ /* ku_am */ ++ LEAF(270,254), LEAF(270,255), ++ /* ku_iq */ ++ LEAF(272,256), ++ /* ku_tr */ ++ LEAF(273,257), LEAF(273,258), ++ /* kum */ ++ LEAF(275,259), ++ /* kv */ ++ LEAF(276,260), ++ /* kw */ ++ LEAF(277, 22), LEAF(277, 93), LEAF(277,261), ++ /* ky */ ++ LEAF(280,262), ++ /* la */ ++ LEAF(281, 22), LEAF(281,263), ++ /* lb */ ++ LEAF(283,264), ++ /* lg */ ++ LEAF(284, 22), LEAF(284,265), ++ /* li */ ++ LEAF(286,266), ++ /* ln */ ++ LEAF(287,267), LEAF(287,268), LEAF(287, 6), LEAF(287,269), ++ /* lo */ ++ LEAF(291,270), ++ /* lt */ ++ LEAF(292, 22), LEAF(292,271), ++ /* lv */ ++ LEAF(294, 22), LEAF(294,272), ++ /* mg */ ++ LEAF(296,273), ++ /* mh */ ++ LEAF(297, 22), LEAF(297,274), ++ /* mi */ ++ LEAF(299, 22), LEAF(299, 93), LEAF(299,275), ++ /* mk */ ++ LEAF(302,276), ++ /* ml */ ++ LEAF(303,277), ++ /* mn_cn */ ++ LEAF(304,278), ++ /* mn_mn */ ++ LEAF(305,279), ++ /* mo */ ++ LEAF(306,280), LEAF(306, 56), LEAF(306,281), LEAF(306,259), ++ /* mt */ ++ LEAF(310,282), LEAF(310,283), ++ /* my */ ++ LEAF(312,284), ++ /* na */ ++ LEAF(313, 4), LEAF(313,285), ++ /* nb */ ++ LEAF(315,286), ++ /* nl */ ++ LEAF(316,287), ++ /* nn */ ++ LEAF(317,288), ++ /* nso */ ++ LEAF(318,289), LEAF(318,290), ++ /* nv */ ++ LEAF(320,291), LEAF(320,292), LEAF(320,293), LEAF(320,294), ++ /* ny */ ++ LEAF(324, 22), LEAF(324,295), ++ /* oc */ ++ LEAF(326,296), ++ /* or */ ++ LEAF(327,297), ++ /* ota */ ++ LEAF(328,298), ++ /* pa */ ++ LEAF(329,299), ++ /* pap_an */ ++ LEAF(330,300), ++ /* pap_aw */ ++ LEAF(331,301), ++ /* pl */ ++ LEAF(332, 96), LEAF(332,302), ++ /* ps_af */ ++ LEAF(334,303), ++ /* ps_pk */ ++ LEAF(335,304), ++ /* pt */ ++ LEAF(336,305), ++ /* qu */ ++ LEAF(337,301), LEAF(337,306), ++ /* rm */ ++ LEAF(339,307), ++ /* ro */ ++ LEAF(340,280), LEAF(340, 56), LEAF(340,281), ++ /* sah */ ++ LEAF(343,308), ++ /* sc */ ++ LEAF(344,309), ++ /* sco */ ++ LEAF(345, 22), LEAF(345,310), LEAF(345,311), ++ /* sd */ ++ LEAF(348,312), ++ /* se */ ++ LEAF(349,313), LEAF(349,314), ++ /* sg */ ++ LEAF(351,315), ++ /* sh */ ++ LEAF(352, 22), LEAF(352, 38), LEAF(352,316), ++ /* shs */ ++ LEAF(355,317), LEAF(355,318), ++ /* si */ ++ LEAF(357,319), ++ /* sid */ ++ LEAF(358,320), LEAF(358, 10), ++ /* sk */ ++ LEAF(360,321), LEAF(360,322), ++ /* sm */ ++ LEAF(362, 22), LEAF(362, 94), ++ /* sma */ ++ LEAF(364,323), ++ /* smj */ ++ LEAF(365,324), ++ /* smn */ ++ LEAF(366,325), LEAF(366,326), ++ /* sms */ ++ LEAF(368,327), LEAF(368,328), LEAF(368,329), ++ /* sq */ ++ LEAF(371,330), ++ /* sr */ ++ LEAF(372,331), ++ /* sv */ ++ LEAF(373,332), ++ /* syr */ ++ LEAF(374,333), ++ /* ta */ ++ LEAF(375,334), ++ /* te */ ++ LEAF(376,335), ++ /* tg */ ++ LEAF(377,336), ++ /* th */ ++ LEAF(378,337), ++ /* tig */ ++ LEAF(379,338), LEAF(379, 41), ++ /* tk */ ++ LEAF(381,339), LEAF(381,340), ++ /* tr */ ++ LEAF(383,341), LEAF(383, 50), ++ /* tt */ ++ LEAF(385,342), ++ /* ty */ ++ LEAF(386,343), LEAF(386, 93), LEAF(386,293), ++ /* uk */ ++ LEAF(389,344), ++ /* ve */ ++ LEAF(390, 22), LEAF(390,345), ++ /* vi */ ++ LEAF(392,346), LEAF(392,347), LEAF(392,348), LEAF(392,349), ++ /* vo */ ++ LEAF(396,350), ++ /* vot */ ++ LEAF(397,351), LEAF(397, 71), ++ /* wa */ ++ LEAF(399,352), ++ /* wen */ ++ LEAF(400, 96), LEAF(400,353), ++ /* wo */ ++ LEAF(402,354), LEAF(402,265), ++ /* yap */ ++ LEAF(404,355), ++ /* yo */ ++ LEAF(405,356), LEAF(405,357), LEAF(405,358), LEAF(405,359), ++ /* zh_cn */ ++ LEAF(409,360), LEAF(409,361), LEAF(409,362), LEAF(409,363), ++ LEAF(409,364), LEAF(409,365), LEAF(409,366), LEAF(409,367), ++ LEAF(409,368), LEAF(409,369), LEAF(409,370), LEAF(409,371), ++ LEAF(409,372), LEAF(409,373), LEAF(409,374), LEAF(409,375), ++ LEAF(409,376), LEAF(409,377), LEAF(409,378), LEAF(409,379), ++ LEAF(409,380), LEAF(409,381), LEAF(409,382), LEAF(409,383), ++ LEAF(409,384), LEAF(409,385), LEAF(409,386), LEAF(409,387), ++ LEAF(409,388), LEAF(409,389), LEAF(409,390), LEAF(409,391), ++ LEAF(409,392), LEAF(409,393), LEAF(409,394), LEAF(409,395), ++ LEAF(409,396), LEAF(409,397), LEAF(409,398), LEAF(409,399), ++ LEAF(409,400), LEAF(409,401), LEAF(409,402), LEAF(409,403), ++ LEAF(409,404), LEAF(409,405), LEAF(409,406), LEAF(409,407), ++ LEAF(409,408), LEAF(409,409), LEAF(409,410), LEAF(409,411), ++ LEAF(409,412), LEAF(409,413), LEAF(409,414), LEAF(409,415), ++ LEAF(409,416), LEAF(409,417), LEAF(409,418), LEAF(409,419), ++ LEAF(409,420), LEAF(409,421), LEAF(409,422), LEAF(409,423), ++ LEAF(409,424), LEAF(409,425), LEAF(409,426), LEAF(409,427), ++ LEAF(409,428), LEAF(409,429), LEAF(409,430), LEAF(409,431), ++ LEAF(409,432), LEAF(409,433), LEAF(409,434), LEAF(409,435), ++ LEAF(409,436), LEAF(409,437), LEAF(409,438), LEAF(409,439), ++ LEAF(409,440), LEAF(409,441), ++ /* zh_hk */ ++ LEAF(491,442), LEAF(491,443), LEAF(491,444), LEAF(491,445), ++ LEAF(491,446), LEAF(491,447), LEAF(491,448), LEAF(491,449), ++ LEAF(491,450), LEAF(491,451), LEAF(491,452), LEAF(491,453), ++ LEAF(491,454), LEAF(491,455), LEAF(491,456), LEAF(491,457), ++ LEAF(491,458), LEAF(491,459), LEAF(491,460), LEAF(491,461), ++ LEAF(491,462), LEAF(491,463), LEAF(491,464), LEAF(491,465), ++ LEAF(491,466), LEAF(491,467), LEAF(491,468), LEAF(491,469), ++ LEAF(491,470), LEAF(491,471), LEAF(491,472), LEAF(491,473), ++ LEAF(491,474), LEAF(491,475), LEAF(491,476), LEAF(491,477), ++ LEAF(491,478), LEAF(491,479), LEAF(491,480), LEAF(491,481), ++ LEAF(491,482), LEAF(491,483), LEAF(491,484), LEAF(491,485), ++ LEAF(491,486), LEAF(491,487), LEAF(491,488), LEAF(491,489), ++ LEAF(491,490), LEAF(491,491), LEAF(491,492), LEAF(491,493), ++ LEAF(491,494), LEAF(491,495), LEAF(491,496), LEAF(491,497), ++ LEAF(491,498), LEAF(491,499), LEAF(491,500), LEAF(491,501), ++ LEAF(491,502), LEAF(491,503), LEAF(491,504), LEAF(491,505), ++ LEAF(491,506), LEAF(491,507), LEAF(491,508), LEAF(491,509), ++ LEAF(491,510), LEAF(491,511), LEAF(491,512), LEAF(491,513), ++ LEAF(491,514), LEAF(491,515), LEAF(491,516), LEAF(491,517), ++ LEAF(491,518), LEAF(491,519), LEAF(491,520), LEAF(491,521), ++ LEAF(491,522), LEAF(491,523), LEAF(491,524), ++ /* zh_tw */ ++ LEAF(574,525), LEAF(574,526), LEAF(574,527), LEAF(574,528), ++ LEAF(574,529), LEAF(574,530), LEAF(574,531), LEAF(574,532), ++ LEAF(574,533), LEAF(574,534), LEAF(574,535), LEAF(574,536), ++ LEAF(574,537), LEAF(574,538), LEAF(574,539), LEAF(574,540), ++ LEAF(574,541), LEAF(574,542), LEAF(574,543), LEAF(574,544), ++ LEAF(574,545), LEAF(574,546), LEAF(574,547), LEAF(574,548), ++ LEAF(574,549), LEAF(574,550), LEAF(574,551), LEAF(574,552), ++ LEAF(574,553), LEAF(574,554), LEAF(574,555), LEAF(574,556), ++ LEAF(574,557), LEAF(574,558), LEAF(574,559), LEAF(574,560), ++ LEAF(574,561), LEAF(574,562), LEAF(574,563), LEAF(574,564), ++ LEAF(574,565), LEAF(574,566), LEAF(574,567), LEAF(574,568), ++ LEAF(574,569), LEAF(574,570), LEAF(574,571), LEAF(574,572), ++ LEAF(574,573), LEAF(574,574), LEAF(574,575), LEAF(574,576), ++ LEAF(574,577), LEAF(574,578), LEAF(574,579), LEAF(574,580), ++ LEAF(574,581), LEAF(574,582), LEAF(574,583), LEAF(574,584), ++ LEAF(574,585), LEAF(574,586), LEAF(574,587), LEAF(574,588), ++ LEAF(574,589), LEAF(574,590), LEAF(574,591), LEAF(574,592), ++ LEAF(574,593), LEAF(574,594), LEAF(574,595), LEAF(574,596), ++ LEAF(574,597), LEAF(574,598), LEAF(574,599), LEAF(574,600), ++ LEAF(574,601), LEAF(574,602), LEAF(574,603), LEAF(574,604), ++ LEAF(574,605), LEAF(574,606), LEAF(574,607), ++}, ++{ ++ /* aa */ ++ 0x0000, ++ /* ab */ ++ 0x0004, ++ /* af */ ++ 0x0000, 0x0001, ++ /* ak */ ++ 0x0000, 0x0001, 0x0002, 0x0003, 0x001e, ++ /* am */ ++ 0x0012, 0x0013, ++ /* an */ ++ 0x0000, ++ /* ar */ ++ 0x0006, ++ /* as */ ++ 0x0009, ++ /* av */ ++ 0x0004, ++ /* ay */ ++ 0x0000, ++ /* az_az */ ++ 0x0000, 0x0001, 0x0002, ++ /* az_ir */ ++ 0x0006, ++ /* ba */ ++ 0x0004, ++ /* be */ ++ 0x0004, ++ /* ber_dz */ ++ 0x0000, 0x0001, 0x0002, 0x001e, ++ /* ber_ma */ ++ 0x002d, ++ /* bg */ ++ 0x0004, ++ /* bh */ ++ 0x0009, ++ /* bi */ ++ 0x0000, ++ /* bin */ ++ 0x0000, 0x0003, 0x001e, ++ /* bm */ ++ 0x0000, 0x0001, 0x0002, ++ /* bn */ ++ 0x0009, ++ /* bo */ ++ 0x000f, ++ /* br */ ++ 0x0000, ++ /* bs */ ++ 0x0000, 0x0001, ++ /* bua */ ++ 0x0004, ++ /* byn */ ++ 0x0012, 0x0013, ++ /* ca */ ++ 0x0000, 0x0001, ++ /* ch */ ++ 0x0000, ++ /* chm */ ++ 0x0004, ++ /* chr */ ++ 0x0013, ++ /* co */ ++ 0x0000, 0x0001, ++ /* crh */ ++ 0x0000, 0x0001, ++ /* cs */ ++ 0x0000, 0x0001, ++ /* csb */ ++ 0x0000, 0x0001, ++ /* cu */ ++ 0x0004, ++ /* cv */ ++ 0x0001, 0x0004, ++ /* cy */ ++ 0x0000, 0x0001, 0x001e, ++ /* da */ ++ 0x0000, ++ /* de */ ++ 0x0000, ++ /* dv */ ++ 0x0007, ++ /* ee */ ++ 0x0000, 0x0001, 0x0002, 0x0003, ++ /* el */ ++ 0x0003, ++ /* en */ ++ 0x0000, ++ /* eo */ ++ 0x0000, 0x0001, ++ /* et */ ++ 0x0000, 0x0001, ++ /* eu */ ++ 0x0000, ++ /* ff */ ++ 0x0000, 0x0001, 0x0002, ++ /* fi */ ++ 0x0000, 0x0001, ++ /* fil */ ++ 0x0000, ++ /* fj */ ++ 0x0000, ++ /* fo */ ++ 0x0000, ++ /* fur */ ++ 0x0000, ++ /* fy */ ++ 0x0000, ++ /* ga */ ++ 0x0000, 0x0001, 0x001e, ++ /* gd */ ++ 0x0000, ++ /* gez */ ++ 0x0012, 0x0013, ++ /* gn */ ++ 0x0000, 0x0001, 0x001e, ++ /* gu */ ++ 0x000a, ++ /* gv */ ++ 0x0000, ++ /* ha */ ++ 0x0000, 0x0001, 0x0002, ++ /* haw */ ++ 0x0000, 0x0001, 0x0002, ++ /* he */ ++ 0x0005, ++ /* hsb */ ++ 0x0000, 0x0001, ++ /* ht */ ++ 0x0000, ++ /* hu */ ++ 0x0000, 0x0001, ++ /* hy */ ++ 0x0005, ++ /* hz */ ++ 0x0000, 0x0003, 0x001e, ++ /* id */ ++ 0x0000, ++ /* ig */ ++ 0x0000, 0x001e, ++ /* ii */ ++ 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, ++ /* ik */ ++ 0x0004, ++ /* is */ ++ 0x0000, ++ /* it */ ++ 0x0000, ++ /* iu */ ++ 0x0014, 0x0015, 0x0016, ++ /* ja */ ++ 0x0030, 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, ++ 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, ++ 0x005d, 0x005e, 0x005f, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, ++ 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, ++ 0x006d, 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, ++ 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, ++ 0x007d, 0x007e, 0x007f, 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, ++ 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, ++ 0x008d, 0x008e, 0x008f, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, ++ 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, ++ 0x009d, 0x009e, 0x009f, ++ /* jv */ ++ 0x0000, ++ /* ka */ ++ 0x0010, ++ /* kaa */ ++ 0x0004, ++ /* ki */ ++ 0x0000, 0x0001, ++ /* kk */ ++ 0x0004, ++ /* kl */ ++ 0x0000, 0x0001, ++ /* km */ ++ 0x0017, ++ /* kn */ ++ 0x000c, ++ /* ko */ ++ 0x0031, 0x00ac, 0x00ad, 0x00ae, 0x00af, 0x00b0, 0x00b1, 0x00b2, ++ 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x00ba, ++ 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, 0x00c0, 0x00c1, 0x00c2, ++ 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, ++ 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, 0x00d0, 0x00d1, 0x00d2, ++ 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, ++ /* kr */ ++ 0x0000, 0x0001, 0x0002, ++ /* ks */ ++ 0x0006, ++ /* ku_am */ ++ 0x0004, 0x0005, ++ /* ku_iq */ ++ 0x0006, ++ /* ku_tr */ ++ 0x0000, 0x0001, ++ /* kum */ ++ 0x0004, ++ /* kv */ ++ 0x0004, ++ /* kw */ ++ 0x0000, 0x0001, 0x0002, ++ /* ky */ ++ 0x0004, ++ /* la */ ++ 0x0000, 0x0001, ++ /* lb */ ++ 0x0000, ++ /* lg */ ++ 0x0000, 0x0001, ++ /* li */ ++ 0x0000, ++ /* ln */ ++ 0x0000, 0x0001, 0x0002, 0x0003, ++ /* lo */ ++ 0x000e, ++ /* lt */ ++ 0x0000, 0x0001, ++ /* lv */ ++ 0x0000, 0x0001, ++ /* mg */ ++ 0x0000, ++ /* mh */ ++ 0x0000, 0x0001, ++ /* mi */ ++ 0x0000, 0x0001, 0x001e, ++ /* mk */ ++ 0x0004, ++ /* ml */ ++ 0x000d, ++ /* mn_cn */ ++ 0x0018, ++ /* mn_mn */ ++ 0x0004, ++ /* mo */ ++ 0x0000, 0x0001, 0x0002, 0x0004, ++ /* mt */ ++ 0x0000, 0x0001, ++ /* my */ ++ 0x0010, ++ /* na */ ++ 0x0000, 0x0001, ++ /* nb */ ++ 0x0000, ++ /* nl */ ++ 0x0000, ++ /* nn */ ++ 0x0000, ++ /* nso */ ++ 0x0000, 0x0001, ++ /* nv */ ++ 0x0000, 0x0001, 0x0002, 0x0003, ++ /* ny */ ++ 0x0000, 0x0001, ++ /* oc */ ++ 0x0000, ++ /* or */ ++ 0x000b, ++ /* ota */ ++ 0x0006, ++ /* pa */ ++ 0x000a, ++ /* pap_an */ ++ 0x0000, ++ /* pap_aw */ ++ 0x0000, ++ /* pl */ ++ 0x0000, 0x0001, ++ /* ps_af */ ++ 0x0006, ++ /* ps_pk */ ++ 0x0006, ++ /* pt */ ++ 0x0000, ++ /* qu */ ++ 0x0000, 0x0002, ++ /* rm */ ++ 0x0000, ++ /* ro */ ++ 0x0000, 0x0001, 0x0002, ++ /* sah */ ++ 0x0004, ++ /* sc */ ++ 0x0000, ++ /* sco */ ++ 0x0000, 0x0001, 0x0002, ++ /* sd */ ++ 0x0006, ++ /* se */ ++ 0x0000, 0x0001, ++ /* sg */ ++ 0x0000, ++ /* sh */ ++ 0x0000, 0x0001, 0x0004, ++ /* shs */ ++ 0x0000, 0x0003, ++ /* si */ ++ 0x000d, ++ /* sid */ ++ 0x0012, 0x0013, ++ /* sk */ ++ 0x0000, 0x0001, ++ /* sm */ ++ 0x0000, 0x0002, ++ /* sma */ ++ 0x0000, ++ /* smj */ ++ 0x0000, ++ /* smn */ ++ 0x0000, 0x0001, ++ /* sms */ ++ 0x0000, 0x0001, 0x0002, ++ /* sq */ ++ 0x0000, ++ /* sr */ ++ 0x0004, ++ /* sv */ ++ 0x0000, ++ /* syr */ ++ 0x0007, ++ /* ta */ ++ 0x000b, ++ /* te */ ++ 0x000c, ++ /* tg */ ++ 0x0004, ++ /* th */ ++ 0x000e, ++ /* tig */ ++ 0x0012, 0x0013, ++ /* tk */ ++ 0x0000, 0x0001, ++ /* tr */ ++ 0x0000, 0x0001, ++ /* tt */ ++ 0x0004, ++ /* ty */ ++ 0x0000, 0x0001, 0x0002, ++ /* uk */ ++ 0x0004, ++ /* ve */ ++ 0x0000, 0x001e, ++ /* vi */ ++ 0x0000, 0x0001, 0x0003, 0x001e, ++ /* vo */ ++ 0x0000, ++ /* vot */ ++ 0x0000, 0x0001, ++ /* wa */ ++ 0x0000, ++ /* wen */ ++ 0x0000, 0x0001, ++ /* wo */ ++ 0x0000, 0x0001, ++ /* yap */ ++ 0x0000, ++ /* yo */ ++ 0x0000, 0x0001, 0x0003, 0x001e, ++ /* zh_cn */ ++ 0x0002, 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, ++ 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, ++ 0x005d, 0x005e, 0x005f, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, ++ 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, ++ 0x006d, 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, ++ 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, ++ 0x007d, 0x007e, 0x007f, 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, ++ 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, ++ 0x008d, 0x008e, 0x008f, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, ++ 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, ++ 0x009e, 0x009f, ++ /* zh_hk */ ++ 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, ++ 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, ++ 0x005e, 0x005f, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, ++ 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, ++ 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, ++ 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, ++ 0x007e, 0x007f, 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, ++ 0x0086, 0x0087, 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, ++ 0x008e, 0x008f, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, ++ 0x0096, 0x0097, 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, ++ 0x009e, 0x009f, 0x0205, ++ /* zh_tw */ ++ 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, ++ 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, ++ 0x005e, 0x005f, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, ++ 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, ++ 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, ++ 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, ++ 0x007e, 0x007f, 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, ++ 0x0086, 0x0087, 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, ++ 0x008e, 0x008f, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, ++ 0x0096, 0x0097, 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, ++ 0x009e, 0x009f, 0x00fa, ++}, ++{ ++ 0, /* aa */ ++ 1, /* ab */ ++ 2, /* af */ ++ 190, /* ak */ ++ 3, /* am */ ++ 191, /* an */ ++ 4, /* ar */ ++ 5, /* as */ ++ 6, /* ast */ ++ 7, /* av */ ++ 8, /* ay */ ++ 9, /* az_az */ ++ 10, /* az_ir */ ++ 11, /* ba */ ++ 13, /* be */ ++ 192, /* ber_dz */ ++ 193, /* ber_ma */ ++ 14, /* bg */ ++ 15, /* bh */ ++ 16, /* bho */ ++ 17, /* bi */ ++ 18, /* bin */ ++ 12, /* bm */ ++ 19, /* bn */ ++ 20, /* bo */ ++ 21, /* br */ ++ 22, /* bs */ ++ 23, /* bua */ ++ 194, /* byn */ ++ 24, /* ca */ ++ 25, /* ce */ ++ 26, /* ch */ ++ 27, /* chm */ ++ 28, /* chr */ ++ 29, /* co */ ++ 195, /* crh */ ++ 30, /* cs */ ++ 196, /* csb */ ++ 31, /* cu */ ++ 32, /* cv */ ++ 33, /* cy */ ++ 34, /* da */ ++ 35, /* de */ ++ 197, /* dv */ ++ 36, /* dz */ ++ 198, /* ee */ ++ 37, /* el */ ++ 38, /* en */ ++ 39, /* eo */ ++ 40, /* es */ ++ 41, /* et */ ++ 42, /* eu */ ++ 43, /* fa */ ++ 199, /* fat */ ++ 48, /* ff */ ++ 44, /* fi */ ++ 200, /* fil */ ++ 45, /* fj */ ++ 46, /* fo */ ++ 47, /* fr */ ++ 49, /* fur */ ++ 50, /* fy */ ++ 51, /* ga */ ++ 52, /* gd */ ++ 53, /* gez */ ++ 54, /* gl */ ++ 55, /* gn */ ++ 56, /* gu */ ++ 57, /* gv */ ++ 58, /* ha */ ++ 59, /* haw */ ++ 60, /* he */ ++ 61, /* hi */ ++ 201, /* hne */ ++ 62, /* ho */ ++ 63, /* hr */ ++ 202, /* hsb */ ++ 203, /* ht */ ++ 64, /* hu */ ++ 65, /* hy */ ++ 204, /* hz */ ++ 66, /* ia */ ++ 68, /* id */ ++ 69, /* ie */ ++ 67, /* ig */ ++ 205, /* ii */ ++ 70, /* ik */ ++ 71, /* io */ ++ 72, /* is */ ++ 73, /* it */ ++ 74, /* iu */ ++ 75, /* ja */ ++ 206, /* jv */ ++ 76, /* ka */ ++ 77, /* kaa */ ++ 207, /* kab */ ++ 78, /* ki */ ++ 208, /* kj */ ++ 79, /* kk */ ++ 80, /* kl */ ++ 81, /* km */ ++ 82, /* kn */ ++ 83, /* ko */ ++ 84, /* kok */ ++ 209, /* kr */ ++ 85, /* ks */ ++ 86, /* ku_am */ ++ 210, /* ku_iq */ ++ 87, /* ku_ir */ ++ 211, /* ku_tr */ ++ 88, /* kum */ ++ 89, /* kv */ ++ 90, /* kw */ ++ 212, /* kwm */ ++ 91, /* ky */ ++ 92, /* la */ ++ 237, /* lah */ ++ 93, /* lb */ ++ 94, /* lez */ ++ 213, /* lg */ ++ 214, /* li */ ++ 95, /* ln */ ++ 96, /* lo */ ++ 97, /* lt */ ++ 98, /* lv */ ++ 215, /* mai */ ++ 99, /* mg */ ++ 100, /* mh */ ++ 101, /* mi */ ++ 102, /* mk */ ++ 103, /* ml */ ++ 104, /* mn_cn */ ++ 216, /* mn_mn */ ++ 105, /* mo */ ++ 106, /* mr */ ++ 217, /* ms */ ++ 107, /* mt */ ++ 108, /* my */ ++ 218, /* na */ ++ 109, /* nb */ ++ 110, /* nds */ ++ 111, /* ne */ ++ 219, /* ng */ ++ 112, /* nl */ ++ 113, /* nn */ ++ 114, /* no */ ++ 115, /* nr */ ++ 116, /* nso */ ++ 220, /* nv */ ++ 117, /* ny */ ++ 118, /* oc */ ++ 119, /* om */ ++ 120, /* or */ ++ 121, /* os */ ++ 221, /* ota */ ++ 122, /* pa */ ++ 222, /* pa_pk */ ++ 223, /* pap_an */ ++ 224, /* pap_aw */ ++ 123, /* pl */ ++ 124, /* ps_af */ ++ 125, /* ps_pk */ ++ 126, /* pt */ ++ 225, /* qu */ ++ 127, /* rm */ ++ 226, /* rn */ ++ 128, /* ro */ ++ 129, /* ru */ ++ 227, /* rw */ ++ 130, /* sa */ ++ 131, /* sah */ ++ 228, /* sc */ ++ 132, /* sco */ ++ 229, /* sd */ ++ 133, /* se */ ++ 134, /* sel */ ++ 230, /* sg */ ++ 135, /* sh */ ++ 136, /* shs */ ++ 137, /* si */ ++ 231, /* sid */ ++ 138, /* sk */ ++ 139, /* sl */ ++ 140, /* sm */ ++ 141, /* sma */ ++ 142, /* smj */ ++ 143, /* smn */ ++ 144, /* sms */ ++ 232, /* sn */ ++ 145, /* so */ ++ 146, /* sq */ ++ 147, /* sr */ ++ 148, /* ss */ ++ 149, /* st */ ++ 233, /* su */ ++ 150, /* sv */ ++ 151, /* sw */ ++ 152, /* syr */ ++ 153, /* ta */ ++ 154, /* te */ ++ 155, /* tg */ ++ 156, /* th */ ++ 157, /* ti_er */ ++ 158, /* ti_et */ ++ 159, /* tig */ ++ 160, /* tk */ ++ 161, /* tl */ ++ 162, /* tn */ ++ 163, /* to */ ++ 164, /* tr */ ++ 165, /* ts */ ++ 166, /* tt */ ++ 167, /* tw */ ++ 234, /* ty */ ++ 168, /* tyv */ ++ 169, /* ug */ ++ 170, /* uk */ ++ 171, /* ur */ ++ 172, /* uz */ ++ 173, /* ve */ ++ 174, /* vi */ ++ 175, /* vo */ ++ 176, /* vot */ ++ 177, /* wa */ ++ 235, /* wal */ ++ 178, /* wen */ ++ 179, /* wo */ ++ 180, /* xh */ ++ 181, /* yap */ ++ 182, /* yi */ ++ 183, /* yo */ ++ 236, /* za */ ++ 184, /* zh_cn */ ++ 185, /* zh_hk */ ++ 186, /* zh_mo */ ++ 187, /* zh_sg */ ++ 188, /* zh_tw */ ++ 189, /* zu */ ++}, ++{ ++ 0, /* aa */ ++ 1, /* ab */ ++ 2, /* af */ ++ 4, /* am */ ++ 6, /* ar */ ++ 7, /* as */ ++ 8, /* ast */ ++ 9, /* av */ ++ 10, /* ay */ ++ 11, /* az_az */ ++ 12, /* az_ir */ ++ 13, /* ba */ ++ 22, /* bm */ ++ 14, /* be */ ++ 17, /* bg */ ++ 18, /* bh */ ++ 19, /* bho */ ++ 20, /* bi */ ++ 21, /* bin */ ++ 23, /* bn */ ++ 24, /* bo */ ++ 25, /* br */ ++ 26, /* bs */ ++ 27, /* bua */ ++ 29, /* ca */ ++ 30, /* ce */ ++ 31, /* ch */ ++ 32, /* chm */ ++ 33, /* chr */ ++ 34, /* co */ ++ 36, /* cs */ ++ 38, /* cu */ ++ 39, /* cv */ ++ 40, /* cy */ ++ 41, /* da */ ++ 42, /* de */ ++ 44, /* dz */ ++ 46, /* el */ ++ 47, /* en */ ++ 48, /* eo */ ++ 49, /* es */ ++ 50, /* et */ ++ 51, /* eu */ ++ 52, /* fa */ ++ 55, /* fi */ ++ 57, /* fj */ ++ 58, /* fo */ ++ 59, /* fr */ ++ 54, /* ff */ ++ 60, /* fur */ ++ 61, /* fy */ ++ 62, /* ga */ ++ 63, /* gd */ ++ 64, /* gez */ ++ 65, /* gl */ ++ 66, /* gn */ ++ 67, /* gu */ ++ 68, /* gv */ ++ 69, /* ha */ ++ 70, /* haw */ ++ 71, /* he */ ++ 72, /* hi */ ++ 74, /* ho */ ++ 75, /* hr */ ++ 78, /* hu */ ++ 79, /* hy */ ++ 81, /* ia */ ++ 84, /* ig */ ++ 82, /* id */ ++ 83, /* ie */ ++ 86, /* ik */ ++ 87, /* io */ ++ 88, /* is */ ++ 89, /* it */ ++ 90, /* iu */ ++ 91, /* ja */ ++ 93, /* ka */ ++ 94, /* kaa */ ++ 96, /* ki */ ++ 98, /* kk */ ++ 99, /* kl */ ++ 100, /* km */ ++ 101, /* kn */ ++ 102, /* ko */ ++ 103, /* kok */ ++ 105, /* ks */ ++ 106, /* ku_am */ ++ 108, /* ku_ir */ ++ 110, /* kum */ ++ 111, /* kv */ ++ 112, /* kw */ ++ 114, /* ky */ ++ 115, /* la */ ++ 117, /* lb */ ++ 118, /* lez */ ++ 121, /* ln */ ++ 122, /* lo */ ++ 123, /* lt */ ++ 124, /* lv */ ++ 126, /* mg */ ++ 127, /* mh */ ++ 128, /* mi */ ++ 129, /* mk */ ++ 130, /* ml */ ++ 131, /* mn_cn */ ++ 133, /* mo */ ++ 134, /* mr */ ++ 136, /* mt */ ++ 137, /* my */ ++ 139, /* nb */ ++ 140, /* nds */ ++ 141, /* ne */ ++ 143, /* nl */ ++ 144, /* nn */ ++ 145, /* no */ ++ 146, /* nr */ ++ 147, /* nso */ ++ 149, /* ny */ ++ 150, /* oc */ ++ 151, /* om */ ++ 152, /* or */ ++ 153, /* os */ ++ 155, /* pa */ ++ 159, /* pl */ ++ 160, /* ps_af */ ++ 161, /* ps_pk */ ++ 162, /* pt */ ++ 164, /* rm */ ++ 166, /* ro */ ++ 167, /* ru */ ++ 169, /* sa */ ++ 170, /* sah */ ++ 172, /* sco */ ++ 174, /* se */ ++ 175, /* sel */ ++ 177, /* sh */ ++ 178, /* shs */ ++ 179, /* si */ ++ 181, /* sk */ ++ 182, /* sl */ ++ 183, /* sm */ ++ 184, /* sma */ ++ 185, /* smj */ ++ 186, /* smn */ ++ 187, /* sms */ ++ 189, /* so */ ++ 190, /* sq */ ++ 191, /* sr */ ++ 192, /* ss */ ++ 193, /* st */ ++ 195, /* sv */ ++ 196, /* sw */ ++ 197, /* syr */ ++ 198, /* ta */ ++ 199, /* te */ ++ 200, /* tg */ ++ 201, /* th */ ++ 202, /* ti_er */ ++ 203, /* ti_et */ ++ 204, /* tig */ ++ 205, /* tk */ ++ 206, /* tl */ ++ 207, /* tn */ ++ 208, /* to */ ++ 209, /* tr */ ++ 210, /* ts */ ++ 211, /* tt */ ++ 212, /* tw */ ++ 214, /* tyv */ ++ 215, /* ug */ ++ 216, /* uk */ ++ 217, /* ur */ ++ 218, /* uz */ ++ 219, /* ve */ ++ 220, /* vi */ ++ 221, /* vo */ ++ 222, /* vot */ ++ 223, /* wa */ ++ 225, /* wen */ ++ 226, /* wo */ ++ 227, /* xh */ ++ 228, /* yap */ ++ 229, /* yi */ ++ 230, /* yo */ ++ 232, /* zh_cn */ ++ 233, /* zh_hk */ ++ 234, /* zh_mo */ ++ 235, /* zh_sg */ ++ 236, /* zh_tw */ ++ 237, /* zu */ ++ 3, /* ak */ ++ 5, /* an */ ++ 15, /* ber_dz */ ++ 16, /* ber_ma */ ++ 28, /* byn */ ++ 35, /* crh */ ++ 37, /* csb */ ++ 43, /* dv */ ++ 45, /* ee */ ++ 53, /* fat */ ++ 56, /* fil */ ++ 73, /* hne */ ++ 76, /* hsb */ ++ 77, /* ht */ ++ 80, /* hz */ ++ 85, /* ii */ ++ 92, /* jv */ ++ 95, /* kab */ ++ 97, /* kj */ ++ 104, /* kr */ ++ 107, /* ku_iq */ ++ 109, /* ku_tr */ ++ 113, /* kwm */ ++ 119, /* lg */ ++ 120, /* li */ ++ 125, /* mai */ ++ 132, /* mn_mn */ ++ 135, /* ms */ ++ 138, /* na */ ++ 142, /* ng */ ++ 148, /* nv */ ++ 154, /* ota */ ++ 156, /* pa_pk */ ++ 157, /* pap_an */ ++ 158, /* pap_aw */ ++ 163, /* qu */ ++ 165, /* rn */ ++ 168, /* rw */ ++ 171, /* sc */ ++ 173, /* sd */ ++ 176, /* sg */ ++ 180, /* sid */ ++ 188, /* sn */ ++ 194, /* su */ ++ 213, /* ty */ ++ 224, /* wal */ ++ 231, /* za */ ++ 116, /* lah */ ++} ++}; ++ ++#define NUM_LANG_CHAR_SET 238 ++#define NUM_LANG_SET_MAP 8 ++ ++static const FcChar32 fcLangCountrySets[][NUM_LANG_SET_MAP] = { ++ { 0x00000600, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }, /* az */ ++ { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, }, /* ber */ ++ { 0x00000000, 0x00000000, 0x00c00000, 0x00000000, 0x00000000, 0x00000000, 0x000c0000, 0x00000000, }, /* ku */ ++ { 0x00000000, 0x00000000, 0x00000000, 0x00000100, 0x00000000, 0x00000000, 0x01000000, 0x00000000, }, /* mn */ ++ { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40000000, 0x00000000, }, /* pa */ ++ { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x00000001, }, /* pap */ ++ { 0x00000000, 0x00000000, 0x00000000, 0x30000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }, /* ps */ ++ { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x60000000, 0x00000000, 0x00000000, 0x00000000, }, /* ti */ ++ { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x1f000000, 0x00000000, 0x00000000, }, /* zh */ ++}; ++ ++#define NUM_COUNTRY_SET 9 ++ ++static const FcLangCharSetRange fcLangCharSetRanges[] = { ++ ++ { 0, 12 }, /* a */ ++ { 13, 28 }, /* b */ ++ { 29, 40 }, /* c */ ++ { 41, 44 }, /* d */ ++ { 45, 51 }, /* e */ ++ { 52, 61 }, /* f */ ++ { 62, 68 }, /* g */ ++ { 69, 80 }, /* h */ ++ { 81, 90 }, /* i */ ++ { 91, 92 }, /* j */ ++ { 93, 114 }, /* k */ ++ { 115, 124 }, /* l */ ++ { 125, 137 }, /* m */ ++ { 138, 149 }, /* n */ ++ { 150, 154 }, /* o */ ++ { 155, 162 }, /* p */ ++ { 163, 163 }, /* q */ ++ { 164, 168 }, /* r */ ++ { 169, 197 }, /* s */ ++ { 198, 214 }, /* t */ ++ { 215, 218 }, /* u */ ++ { 219, 222 }, /* v */ ++ { 223, 226 }, /* w */ ++ { 227, 227 }, /* x */ ++ { 228, 230 }, /* y */ ++ { 231, 237 }, /* z */ ++}; ++ +--- misc/fontconfig-2.8.0/src/fcalias.h Wed Aug 20 14:33:55 2008 ++++ misc/build/fontconfig-2.8.0/src/fcalias.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,369 @@ +-dummy ++extern __typeof (FcBlanksCreate) IA__FcBlanksCreate __attribute((visibility("hidden"))); ++#define FcBlanksCreate IA__FcBlanksCreate ++extern __typeof (FcBlanksDestroy) IA__FcBlanksDestroy __attribute((visibility("hidden"))); ++#define FcBlanksDestroy IA__FcBlanksDestroy ++extern __typeof (FcBlanksAdd) IA__FcBlanksAdd __attribute((visibility("hidden"))); ++#define FcBlanksAdd IA__FcBlanksAdd ++extern __typeof (FcBlanksIsMember) IA__FcBlanksIsMember __attribute((visibility("hidden"))); ++#define FcBlanksIsMember IA__FcBlanksIsMember ++extern __typeof (FcCacheCopySet) IA__FcCacheCopySet __attribute((visibility("hidden"))); ++#define FcCacheCopySet IA__FcCacheCopySet ++extern __typeof (FcCacheNumSubdir) IA__FcCacheNumSubdir __attribute((visibility("hidden"))); ++#define FcCacheNumSubdir IA__FcCacheNumSubdir ++extern __typeof (FcCacheNumFont) IA__FcCacheNumFont __attribute((visibility("hidden"))); ++#define FcCacheNumFont IA__FcCacheNumFont ++extern __typeof (FcDirCacheUnlink) IA__FcDirCacheUnlink __attribute((visibility("hidden"))); ++#define FcDirCacheUnlink IA__FcDirCacheUnlink ++extern __typeof (FcDirCacheValid) IA__FcDirCacheValid __attribute((visibility("hidden"))); ++#define FcDirCacheValid IA__FcDirCacheValid ++extern __typeof (FcConfigHome) IA__FcConfigHome __attribute((visibility("hidden"))); ++#define FcConfigHome IA__FcConfigHome ++extern __typeof (FcConfigEnableHome) IA__FcConfigEnableHome __attribute((visibility("hidden"))); ++#define FcConfigEnableHome IA__FcConfigEnableHome ++extern __typeof (FcConfigFilename) IA__FcConfigFilename __attribute((visibility("hidden"))); ++#define FcConfigFilename IA__FcConfigFilename ++extern __typeof (FcConfigCreate) IA__FcConfigCreate __attribute((visibility("hidden"))); ++#define FcConfigCreate IA__FcConfigCreate ++extern __typeof (FcConfigReference) IA__FcConfigReference __attribute((visibility("hidden"))); ++#define FcConfigReference IA__FcConfigReference ++extern __typeof (FcConfigDestroy) IA__FcConfigDestroy __attribute((visibility("hidden"))); ++#define FcConfigDestroy IA__FcConfigDestroy ++extern __typeof (FcConfigSetCurrent) IA__FcConfigSetCurrent __attribute((visibility("hidden"))); ++#define FcConfigSetCurrent IA__FcConfigSetCurrent ++extern __typeof (FcConfigGetCurrent) IA__FcConfigGetCurrent __attribute((visibility("hidden"))); ++#define FcConfigGetCurrent IA__FcConfigGetCurrent ++extern __typeof (FcConfigUptoDate) IA__FcConfigUptoDate __attribute((visibility("hidden"))); ++#define FcConfigUptoDate IA__FcConfigUptoDate ++extern __typeof (FcConfigBuildFonts) IA__FcConfigBuildFonts __attribute((visibility("hidden"))); ++#define FcConfigBuildFonts IA__FcConfigBuildFonts ++extern __typeof (FcConfigGetFontDirs) IA__FcConfigGetFontDirs __attribute((visibility("hidden"))); ++#define FcConfigGetFontDirs IA__FcConfigGetFontDirs ++extern __typeof (FcConfigGetConfigDirs) IA__FcConfigGetConfigDirs __attribute((visibility("hidden"))); ++#define FcConfigGetConfigDirs IA__FcConfigGetConfigDirs ++extern __typeof (FcConfigGetConfigFiles) IA__FcConfigGetConfigFiles __attribute((visibility("hidden"))); ++#define FcConfigGetConfigFiles IA__FcConfigGetConfigFiles ++extern __typeof (FcConfigGetCache) IA__FcConfigGetCache __attribute((visibility("hidden"))); ++#define FcConfigGetCache IA__FcConfigGetCache ++extern __typeof (FcConfigGetBlanks) IA__FcConfigGetBlanks __attribute((visibility("hidden"))); ++#define FcConfigGetBlanks IA__FcConfigGetBlanks ++extern __typeof (FcConfigGetCacheDirs) IA__FcConfigGetCacheDirs __attribute((visibility("hidden"))); ++#define FcConfigGetCacheDirs IA__FcConfigGetCacheDirs ++extern __typeof (FcConfigGetRescanInterval) IA__FcConfigGetRescanInterval __attribute((visibility("hidden"))); ++#define FcConfigGetRescanInterval IA__FcConfigGetRescanInterval ++extern __typeof (FcConfigSetRescanInterval) IA__FcConfigSetRescanInterval __attribute((visibility("hidden"))); ++#define FcConfigSetRescanInterval IA__FcConfigSetRescanInterval ++extern __typeof (FcConfigGetFonts) IA__FcConfigGetFonts __attribute((visibility("hidden"))); ++#define FcConfigGetFonts IA__FcConfigGetFonts ++extern __typeof (FcConfigAppFontAddFile) IA__FcConfigAppFontAddFile __attribute((visibility("hidden"))); ++#define FcConfigAppFontAddFile IA__FcConfigAppFontAddFile ++extern __typeof (FcConfigAppFontAddDir) IA__FcConfigAppFontAddDir __attribute((visibility("hidden"))); ++#define FcConfigAppFontAddDir IA__FcConfigAppFontAddDir ++extern __typeof (FcConfigAppFontClear) IA__FcConfigAppFontClear __attribute((visibility("hidden"))); ++#define FcConfigAppFontClear IA__FcConfigAppFontClear ++extern __typeof (FcConfigSubstituteWithPat) IA__FcConfigSubstituteWithPat __attribute((visibility("hidden"))); ++#define FcConfigSubstituteWithPat IA__FcConfigSubstituteWithPat ++extern __typeof (FcConfigSubstitute) IA__FcConfigSubstitute __attribute((visibility("hidden"))); ++#define FcConfigSubstitute IA__FcConfigSubstitute ++extern __typeof (FcCharSetCreate) IA__FcCharSetCreate __attribute((visibility("hidden"))); ++#define FcCharSetCreate IA__FcCharSetCreate ++extern __typeof (FcCharSetNew) IA__FcCharSetNew __attribute((visibility("hidden"))); ++#define FcCharSetNew IA__FcCharSetNew ++extern __typeof (FcCharSetDestroy) IA__FcCharSetDestroy __attribute((visibility("hidden"))); ++#define FcCharSetDestroy IA__FcCharSetDestroy ++extern __typeof (FcCharSetAddChar) IA__FcCharSetAddChar __attribute((visibility("hidden"))); ++#define FcCharSetAddChar IA__FcCharSetAddChar ++extern __typeof (FcCharSetCopy) IA__FcCharSetCopy __attribute((visibility("hidden"))); ++#define FcCharSetCopy IA__FcCharSetCopy ++extern __typeof (FcCharSetEqual) IA__FcCharSetEqual __attribute((visibility("hidden"))); ++#define FcCharSetEqual IA__FcCharSetEqual ++extern __typeof (FcCharSetIntersect) IA__FcCharSetIntersect __attribute((visibility("hidden"))); ++#define FcCharSetIntersect IA__FcCharSetIntersect ++extern __typeof (FcCharSetUnion) IA__FcCharSetUnion __attribute((visibility("hidden"))); ++#define FcCharSetUnion IA__FcCharSetUnion ++extern __typeof (FcCharSetSubtract) IA__FcCharSetSubtract __attribute((visibility("hidden"))); ++#define FcCharSetSubtract IA__FcCharSetSubtract ++extern __typeof (FcCharSetMerge) IA__FcCharSetMerge __attribute((visibility("hidden"))); ++#define FcCharSetMerge IA__FcCharSetMerge ++extern __typeof (FcCharSetHasChar) IA__FcCharSetHasChar __attribute((visibility("hidden"))); ++#define FcCharSetHasChar IA__FcCharSetHasChar ++extern __typeof (FcCharSetCount) IA__FcCharSetCount __attribute((visibility("hidden"))); ++#define FcCharSetCount IA__FcCharSetCount ++extern __typeof (FcCharSetIntersectCount) IA__FcCharSetIntersectCount __attribute((visibility("hidden"))); ++#define FcCharSetIntersectCount IA__FcCharSetIntersectCount ++extern __typeof (FcCharSetSubtractCount) IA__FcCharSetSubtractCount __attribute((visibility("hidden"))); ++#define FcCharSetSubtractCount IA__FcCharSetSubtractCount ++extern __typeof (FcCharSetIsSubset) IA__FcCharSetIsSubset __attribute((visibility("hidden"))); ++#define FcCharSetIsSubset IA__FcCharSetIsSubset ++extern __typeof (FcCharSetFirstPage) IA__FcCharSetFirstPage __attribute((visibility("hidden"))); ++#define FcCharSetFirstPage IA__FcCharSetFirstPage ++extern __typeof (FcCharSetNextPage) IA__FcCharSetNextPage __attribute((visibility("hidden"))); ++#define FcCharSetNextPage IA__FcCharSetNextPage ++extern __typeof (FcCharSetCoverage) IA__FcCharSetCoverage __attribute((visibility("hidden"))); ++#define FcCharSetCoverage IA__FcCharSetCoverage ++extern __typeof (FcValuePrint) IA__FcValuePrint __attribute((visibility("hidden"))); ++#define FcValuePrint IA__FcValuePrint ++extern __typeof (FcPatternPrint) IA__FcPatternPrint __attribute((visibility("hidden"))); ++#define FcPatternPrint IA__FcPatternPrint ++extern __typeof (FcFontSetPrint) IA__FcFontSetPrint __attribute((visibility("hidden"))); ++#define FcFontSetPrint IA__FcFontSetPrint ++extern __typeof (FcDefaultSubstitute) IA__FcDefaultSubstitute __attribute((visibility("hidden"))); ++#define FcDefaultSubstitute IA__FcDefaultSubstitute ++extern __typeof (FcFileIsDir) IA__FcFileIsDir __attribute((visibility("hidden"))); ++#define FcFileIsDir IA__FcFileIsDir ++extern __typeof (FcFileScan) IA__FcFileScan __attribute((visibility("hidden"))); ++#define FcFileScan IA__FcFileScan ++extern __typeof (FcDirScan) IA__FcDirScan __attribute((visibility("hidden"))); ++#define FcDirScan IA__FcDirScan ++extern __typeof (FcDirSave) IA__FcDirSave __attribute((visibility("hidden"))); ++#define FcDirSave IA__FcDirSave ++extern __typeof (FcDirCacheLoad) IA__FcDirCacheLoad __attribute((visibility("hidden"))); ++#define FcDirCacheLoad IA__FcDirCacheLoad ++extern __typeof (FcDirCacheRead) IA__FcDirCacheRead __attribute((visibility("hidden"))); ++#define FcDirCacheRead IA__FcDirCacheRead ++extern __typeof (FcDirCacheLoadFile) IA__FcDirCacheLoadFile __attribute((visibility("hidden"))); ++#define FcDirCacheLoadFile IA__FcDirCacheLoadFile ++extern __typeof (FcDirCacheUnload) IA__FcDirCacheUnload __attribute((visibility("hidden"))); ++#define FcDirCacheUnload IA__FcDirCacheUnload ++extern __typeof (FcFreeTypeQuery) IA__FcFreeTypeQuery __attribute((visibility("hidden"))); ++#define FcFreeTypeQuery IA__FcFreeTypeQuery ++extern __typeof (FcFontSetCreate) IA__FcFontSetCreate __attribute((visibility("hidden"))); ++#define FcFontSetCreate IA__FcFontSetCreate ++extern __typeof (FcFontSetDestroy) IA__FcFontSetDestroy __attribute((visibility("hidden"))); ++#define FcFontSetDestroy IA__FcFontSetDestroy ++extern __typeof (FcFontSetAdd) IA__FcFontSetAdd __attribute((visibility("hidden"))); ++#define FcFontSetAdd IA__FcFontSetAdd ++extern __typeof (FcInitLoadConfig) IA__FcInitLoadConfig __attribute((visibility("hidden"))); ++#define FcInitLoadConfig IA__FcInitLoadConfig ++extern __typeof (FcInitLoadConfigAndFonts) IA__FcInitLoadConfigAndFonts __attribute((visibility("hidden"))); ++#define FcInitLoadConfigAndFonts IA__FcInitLoadConfigAndFonts ++extern __typeof (FcInit) IA__FcInit __attribute((visibility("hidden"))); ++#define FcInit IA__FcInit ++extern __typeof (FcFini) IA__FcFini __attribute((visibility("hidden"))); ++#define FcFini IA__FcFini ++extern __typeof (FcGetVersion) IA__FcGetVersion __attribute((visibility("hidden"))); ++#define FcGetVersion IA__FcGetVersion ++extern __typeof (FcInitReinitialize) IA__FcInitReinitialize __attribute((visibility("hidden"))); ++#define FcInitReinitialize IA__FcInitReinitialize ++extern __typeof (FcInitBringUptoDate) IA__FcInitBringUptoDate __attribute((visibility("hidden"))); ++#define FcInitBringUptoDate IA__FcInitBringUptoDate ++extern __typeof (FcGetLangs) IA__FcGetLangs __attribute((visibility("hidden"))); ++#define FcGetLangs IA__FcGetLangs ++extern __typeof (FcLangGetCharSet) IA__FcLangGetCharSet __attribute((visibility("hidden"))); ++#define FcLangGetCharSet IA__FcLangGetCharSet ++extern __typeof (FcLangSetCreate) IA__FcLangSetCreate __attribute((visibility("hidden"))); ++#define FcLangSetCreate IA__FcLangSetCreate ++extern __typeof (FcLangSetDestroy) IA__FcLangSetDestroy __attribute((visibility("hidden"))); ++#define FcLangSetDestroy IA__FcLangSetDestroy ++extern __typeof (FcLangSetCopy) IA__FcLangSetCopy __attribute((visibility("hidden"))); ++#define FcLangSetCopy IA__FcLangSetCopy ++extern __typeof (FcLangSetAdd) IA__FcLangSetAdd __attribute((visibility("hidden"))); ++#define FcLangSetAdd IA__FcLangSetAdd ++extern __typeof (FcLangSetHasLang) IA__FcLangSetHasLang __attribute((visibility("hidden"))); ++#define FcLangSetHasLang IA__FcLangSetHasLang ++extern __typeof (FcLangSetCompare) IA__FcLangSetCompare __attribute((visibility("hidden"))); ++#define FcLangSetCompare IA__FcLangSetCompare ++extern __typeof (FcLangSetContains) IA__FcLangSetContains __attribute((visibility("hidden"))); ++#define FcLangSetContains IA__FcLangSetContains ++extern __typeof (FcLangSetEqual) IA__FcLangSetEqual __attribute((visibility("hidden"))); ++#define FcLangSetEqual IA__FcLangSetEqual ++extern __typeof (FcLangSetHash) IA__FcLangSetHash __attribute((visibility("hidden"))); ++#define FcLangSetHash IA__FcLangSetHash ++extern __typeof (FcLangSetGetLangs) IA__FcLangSetGetLangs __attribute((visibility("hidden"))); ++#define FcLangSetGetLangs IA__FcLangSetGetLangs ++extern __typeof (FcObjectSetCreate) IA__FcObjectSetCreate __attribute((visibility("hidden"))); ++#define FcObjectSetCreate IA__FcObjectSetCreate ++extern __typeof (FcObjectSetAdd) IA__FcObjectSetAdd __attribute((visibility("hidden"))); ++#define FcObjectSetAdd IA__FcObjectSetAdd ++extern __typeof (FcObjectSetDestroy) IA__FcObjectSetDestroy __attribute((visibility("hidden"))); ++#define FcObjectSetDestroy IA__FcObjectSetDestroy ++extern __typeof (FcObjectSetVaBuild) IA__FcObjectSetVaBuild __attribute((visibility("hidden"))); ++#define FcObjectSetVaBuild IA__FcObjectSetVaBuild ++extern __typeof (FcObjectSetBuild) IA__FcObjectSetBuild __attribute((visibility("hidden"))); ++#define FcObjectSetBuild IA__FcObjectSetBuild ++extern __typeof (FcFontSetList) IA__FcFontSetList __attribute((visibility("hidden"))); ++#define FcFontSetList IA__FcFontSetList ++extern __typeof (FcFontList) IA__FcFontList __attribute((visibility("hidden"))); ++#define FcFontList IA__FcFontList ++extern __typeof (FcAtomicCreate) IA__FcAtomicCreate __attribute((visibility("hidden"))); ++#define FcAtomicCreate IA__FcAtomicCreate ++extern __typeof (FcAtomicLock) IA__FcAtomicLock __attribute((visibility("hidden"))); ++#define FcAtomicLock IA__FcAtomicLock ++extern __typeof (FcAtomicNewFile) IA__FcAtomicNewFile __attribute((visibility("hidden"))); ++#define FcAtomicNewFile IA__FcAtomicNewFile ++extern __typeof (FcAtomicOrigFile) IA__FcAtomicOrigFile __attribute((visibility("hidden"))); ++#define FcAtomicOrigFile IA__FcAtomicOrigFile ++extern __typeof (FcAtomicReplaceOrig) IA__FcAtomicReplaceOrig __attribute((visibility("hidden"))); ++#define FcAtomicReplaceOrig IA__FcAtomicReplaceOrig ++extern __typeof (FcAtomicDeleteNew) IA__FcAtomicDeleteNew __attribute((visibility("hidden"))); ++#define FcAtomicDeleteNew IA__FcAtomicDeleteNew ++extern __typeof (FcAtomicUnlock) IA__FcAtomicUnlock __attribute((visibility("hidden"))); ++#define FcAtomicUnlock IA__FcAtomicUnlock ++extern __typeof (FcAtomicDestroy) IA__FcAtomicDestroy __attribute((visibility("hidden"))); ++#define FcAtomicDestroy IA__FcAtomicDestroy ++extern __typeof (FcFontSetMatch) IA__FcFontSetMatch __attribute((visibility("hidden"))); ++#define FcFontSetMatch IA__FcFontSetMatch ++extern __typeof (FcFontMatch) IA__FcFontMatch __attribute((visibility("hidden"))); ++#define FcFontMatch IA__FcFontMatch ++extern __typeof (FcFontRenderPrepare) IA__FcFontRenderPrepare __attribute((visibility("hidden"))); ++#define FcFontRenderPrepare IA__FcFontRenderPrepare ++extern __typeof (FcFontSetSort) IA__FcFontSetSort __attribute((visibility("hidden"))); ++#define FcFontSetSort IA__FcFontSetSort ++extern __typeof (FcFontSort) IA__FcFontSort __attribute((visibility("hidden"))); ++#define FcFontSort IA__FcFontSort ++extern __typeof (FcFontSetSortDestroy) IA__FcFontSetSortDestroy __attribute((visibility("hidden"))); ++#define FcFontSetSortDestroy IA__FcFontSetSortDestroy ++extern __typeof (FcMatrixCopy) IA__FcMatrixCopy __attribute((visibility("hidden"))); ++#define FcMatrixCopy IA__FcMatrixCopy ++extern __typeof (FcMatrixEqual) IA__FcMatrixEqual __attribute((visibility("hidden"))); ++#define FcMatrixEqual IA__FcMatrixEqual ++extern __typeof (FcMatrixMultiply) IA__FcMatrixMultiply __attribute((visibility("hidden"))); ++#define FcMatrixMultiply IA__FcMatrixMultiply ++extern __typeof (FcMatrixRotate) IA__FcMatrixRotate __attribute((visibility("hidden"))); ++#define FcMatrixRotate IA__FcMatrixRotate ++extern __typeof (FcMatrixScale) IA__FcMatrixScale __attribute((visibility("hidden"))); ++#define FcMatrixScale IA__FcMatrixScale ++extern __typeof (FcMatrixShear) IA__FcMatrixShear __attribute((visibility("hidden"))); ++#define FcMatrixShear IA__FcMatrixShear ++extern __typeof (FcNameRegisterObjectTypes) IA__FcNameRegisterObjectTypes __attribute((visibility("hidden"))); ++#define FcNameRegisterObjectTypes IA__FcNameRegisterObjectTypes ++extern __typeof (FcNameUnregisterObjectTypes) IA__FcNameUnregisterObjectTypes __attribute((visibility("hidden"))); ++#define FcNameUnregisterObjectTypes IA__FcNameUnregisterObjectTypes ++extern __typeof (FcNameGetObjectType) IA__FcNameGetObjectType __attribute((visibility("hidden"))); ++#define FcNameGetObjectType IA__FcNameGetObjectType ++extern __typeof (FcNameRegisterConstants) IA__FcNameRegisterConstants __attribute((visibility("hidden"))); ++#define FcNameRegisterConstants IA__FcNameRegisterConstants ++extern __typeof (FcNameUnregisterConstants) IA__FcNameUnregisterConstants __attribute((visibility("hidden"))); ++#define FcNameUnregisterConstants IA__FcNameUnregisterConstants ++extern __typeof (FcNameGetConstant) IA__FcNameGetConstant __attribute((visibility("hidden"))); ++#define FcNameGetConstant IA__FcNameGetConstant ++extern __typeof (FcNameConstant) IA__FcNameConstant __attribute((visibility("hidden"))); ++#define FcNameConstant IA__FcNameConstant ++extern __typeof (FcNameParse) IA__FcNameParse __attribute((visibility("hidden"))); ++#define FcNameParse IA__FcNameParse ++extern __typeof (FcNameUnparse) IA__FcNameUnparse __attribute((visibility("hidden"))); ++#define FcNameUnparse IA__FcNameUnparse ++extern __typeof (FcPatternCreate) IA__FcPatternCreate __attribute((visibility("hidden"))); ++#define FcPatternCreate IA__FcPatternCreate ++extern __typeof (FcPatternDuplicate) IA__FcPatternDuplicate __attribute((visibility("hidden"))); ++#define FcPatternDuplicate IA__FcPatternDuplicate ++extern __typeof (FcPatternReference) IA__FcPatternReference __attribute((visibility("hidden"))); ++#define FcPatternReference IA__FcPatternReference ++extern __typeof (FcPatternFilter) IA__FcPatternFilter __attribute((visibility("hidden"))); ++#define FcPatternFilter IA__FcPatternFilter ++extern __typeof (FcValueDestroy) IA__FcValueDestroy __attribute((visibility("hidden"))); ++#define FcValueDestroy IA__FcValueDestroy ++extern __typeof (FcValueEqual) IA__FcValueEqual __attribute((visibility("hidden"))); ++#define FcValueEqual IA__FcValueEqual ++extern __typeof (FcValueSave) IA__FcValueSave __attribute((visibility("hidden"))); ++#define FcValueSave IA__FcValueSave ++extern __typeof (FcPatternDestroy) IA__FcPatternDestroy __attribute((visibility("hidden"))); ++#define FcPatternDestroy IA__FcPatternDestroy ++extern __typeof (FcPatternEqual) IA__FcPatternEqual __attribute((visibility("hidden"))); ++#define FcPatternEqual IA__FcPatternEqual ++extern __typeof (FcPatternEqualSubset) IA__FcPatternEqualSubset __attribute((visibility("hidden"))); ++#define FcPatternEqualSubset IA__FcPatternEqualSubset ++extern __typeof (FcPatternHash) IA__FcPatternHash __attribute((visibility("hidden"))); ++#define FcPatternHash IA__FcPatternHash ++extern __typeof (FcPatternAdd) IA__FcPatternAdd __attribute((visibility("hidden"))); ++#define FcPatternAdd IA__FcPatternAdd ++extern __typeof (FcPatternAddWeak) IA__FcPatternAddWeak __attribute((visibility("hidden"))); ++#define FcPatternAddWeak IA__FcPatternAddWeak ++extern __typeof (FcPatternGet) IA__FcPatternGet __attribute((visibility("hidden"))); ++#define FcPatternGet IA__FcPatternGet ++extern __typeof (FcPatternDel) IA__FcPatternDel __attribute((visibility("hidden"))); ++#define FcPatternDel IA__FcPatternDel ++extern __typeof (FcPatternRemove) IA__FcPatternRemove __attribute((visibility("hidden"))); ++#define FcPatternRemove IA__FcPatternRemove ++extern __typeof (FcPatternAddInteger) IA__FcPatternAddInteger __attribute((visibility("hidden"))); ++#define FcPatternAddInteger IA__FcPatternAddInteger ++extern __typeof (FcPatternAddDouble) IA__FcPatternAddDouble __attribute((visibility("hidden"))); ++#define FcPatternAddDouble IA__FcPatternAddDouble ++extern __typeof (FcPatternAddString) IA__FcPatternAddString __attribute((visibility("hidden"))); ++#define FcPatternAddString IA__FcPatternAddString ++extern __typeof (FcPatternAddMatrix) IA__FcPatternAddMatrix __attribute((visibility("hidden"))); ++#define FcPatternAddMatrix IA__FcPatternAddMatrix ++extern __typeof (FcPatternAddCharSet) IA__FcPatternAddCharSet __attribute((visibility("hidden"))); ++#define FcPatternAddCharSet IA__FcPatternAddCharSet ++extern __typeof (FcPatternAddBool) IA__FcPatternAddBool __attribute((visibility("hidden"))); ++#define FcPatternAddBool IA__FcPatternAddBool ++extern __typeof (FcPatternAddLangSet) IA__FcPatternAddLangSet __attribute((visibility("hidden"))); ++#define FcPatternAddLangSet IA__FcPatternAddLangSet ++extern __typeof (FcPatternGetInteger) IA__FcPatternGetInteger __attribute((visibility("hidden"))); ++#define FcPatternGetInteger IA__FcPatternGetInteger ++extern __typeof (FcPatternGetDouble) IA__FcPatternGetDouble __attribute((visibility("hidden"))); ++#define FcPatternGetDouble IA__FcPatternGetDouble ++extern __typeof (FcPatternGetString) IA__FcPatternGetString __attribute((visibility("hidden"))); ++#define FcPatternGetString IA__FcPatternGetString ++extern __typeof (FcPatternGetMatrix) IA__FcPatternGetMatrix __attribute((visibility("hidden"))); ++#define FcPatternGetMatrix IA__FcPatternGetMatrix ++extern __typeof (FcPatternGetCharSet) IA__FcPatternGetCharSet __attribute((visibility("hidden"))); ++#define FcPatternGetCharSet IA__FcPatternGetCharSet ++extern __typeof (FcPatternGetBool) IA__FcPatternGetBool __attribute((visibility("hidden"))); ++#define FcPatternGetBool IA__FcPatternGetBool ++extern __typeof (FcPatternGetLangSet) IA__FcPatternGetLangSet __attribute((visibility("hidden"))); ++#define FcPatternGetLangSet IA__FcPatternGetLangSet ++extern __typeof (FcPatternVaBuild) IA__FcPatternVaBuild __attribute((visibility("hidden"))); ++#define FcPatternVaBuild IA__FcPatternVaBuild ++extern __typeof (FcPatternBuild) IA__FcPatternBuild __attribute((visibility("hidden"))); ++#define FcPatternBuild IA__FcPatternBuild ++extern __typeof (FcPatternFormat) IA__FcPatternFormat __attribute((visibility("hidden"))); ++#define FcPatternFormat IA__FcPatternFormat ++extern __typeof (FcStrCopy) IA__FcStrCopy __attribute((visibility("hidden"))); ++#define FcStrCopy IA__FcStrCopy ++extern __typeof (FcStrCopyFilename) IA__FcStrCopyFilename __attribute((visibility("hidden"))); ++#define FcStrCopyFilename IA__FcStrCopyFilename ++extern __typeof (FcStrPlus) IA__FcStrPlus __attribute((visibility("hidden"))); ++#define FcStrPlus IA__FcStrPlus ++extern __typeof (FcStrFree) IA__FcStrFree __attribute((visibility("hidden"))); ++#define FcStrFree IA__FcStrFree ++extern __typeof (FcStrDowncase) IA__FcStrDowncase __attribute((visibility("hidden"))); ++#define FcStrDowncase IA__FcStrDowncase ++extern __typeof (FcStrCmpIgnoreCase) IA__FcStrCmpIgnoreCase __attribute((visibility("hidden"))); ++#define FcStrCmpIgnoreCase IA__FcStrCmpIgnoreCase ++extern __typeof (FcStrCmp) IA__FcStrCmp __attribute((visibility("hidden"))); ++#define FcStrCmp IA__FcStrCmp ++extern __typeof (FcStrStrIgnoreCase) IA__FcStrStrIgnoreCase __attribute((visibility("hidden"))); ++#define FcStrStrIgnoreCase IA__FcStrStrIgnoreCase ++extern __typeof (FcStrStr) IA__FcStrStr __attribute((visibility("hidden"))); ++#define FcStrStr IA__FcStrStr ++extern __typeof (FcUtf8ToUcs4) IA__FcUtf8ToUcs4 __attribute((visibility("hidden"))); ++#define FcUtf8ToUcs4 IA__FcUtf8ToUcs4 ++extern __typeof (FcUtf8Len) IA__FcUtf8Len __attribute((visibility("hidden"))); ++#define FcUtf8Len IA__FcUtf8Len ++extern __typeof (FcUcs4ToUtf8) IA__FcUcs4ToUtf8 __attribute((visibility("hidden"))); ++#define FcUcs4ToUtf8 IA__FcUcs4ToUtf8 ++extern __typeof (FcUtf16ToUcs4) IA__FcUtf16ToUcs4 __attribute((visibility("hidden"))); ++#define FcUtf16ToUcs4 IA__FcUtf16ToUcs4 ++extern __typeof (FcUtf16Len) IA__FcUtf16Len __attribute((visibility("hidden"))); ++#define FcUtf16Len IA__FcUtf16Len ++extern __typeof (FcStrDirname) IA__FcStrDirname __attribute((visibility("hidden"))); ++#define FcStrDirname IA__FcStrDirname ++extern __typeof (FcStrBasename) IA__FcStrBasename __attribute((visibility("hidden"))); ++#define FcStrBasename IA__FcStrBasename ++extern __typeof (FcStrSetCreate) IA__FcStrSetCreate __attribute((visibility("hidden"))); ++#define FcStrSetCreate IA__FcStrSetCreate ++extern __typeof (FcStrSetMember) IA__FcStrSetMember __attribute((visibility("hidden"))); ++#define FcStrSetMember IA__FcStrSetMember ++extern __typeof (FcStrSetEqual) IA__FcStrSetEqual __attribute((visibility("hidden"))); ++#define FcStrSetEqual IA__FcStrSetEqual ++extern __typeof (FcStrSetAdd) IA__FcStrSetAdd __attribute((visibility("hidden"))); ++#define FcStrSetAdd IA__FcStrSetAdd ++extern __typeof (FcStrSetAddFilename) IA__FcStrSetAddFilename __attribute((visibility("hidden"))); ++#define FcStrSetAddFilename IA__FcStrSetAddFilename ++extern __typeof (FcStrSetDel) IA__FcStrSetDel __attribute((visibility("hidden"))); ++#define FcStrSetDel IA__FcStrSetDel ++extern __typeof (FcStrSetDestroy) IA__FcStrSetDestroy __attribute((visibility("hidden"))); ++#define FcStrSetDestroy IA__FcStrSetDestroy ++extern __typeof (FcStrListCreate) IA__FcStrListCreate __attribute((visibility("hidden"))); ++#define FcStrListCreate IA__FcStrListCreate ++extern __typeof (FcStrListNext) IA__FcStrListNext __attribute((visibility("hidden"))); ++#define FcStrListNext IA__FcStrListNext ++extern __typeof (FcStrListDone) IA__FcStrListDone __attribute((visibility("hidden"))); ++#define FcStrListDone IA__FcStrListDone ++extern __typeof (FcConfigParseAndLoad) IA__FcConfigParseAndLoad __attribute((visibility("hidden"))); ++#define FcConfigParseAndLoad IA__FcConfigParseAndLoad ++extern __typeof (FcConfigGetRescanInverval) IA__FcConfigGetRescanInverval __attribute((visibility("hidden"))); ++#define FcConfigGetRescanInverval IA__FcConfigGetRescanInverval ++extern __typeof (FcConfigSetRescanInverval) IA__FcConfigSetRescanInverval __attribute((visibility("hidden"))); ++#define FcConfigSetRescanInverval IA__FcConfigSetRescanInverval ++ +--- misc/fontconfig-2.8.0/src/fcaliastail.h Wed Aug 20 14:33:55 2008 ++++ misc/build/fontconfig-2.8.0/src/fcaliastail.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,739 @@ +-dummy ++#if HAVE_GNUC_ATTRIBUTE ++#ifdef __fcblanks__ ++#undef FcBlanksCreate ++extern __typeof (FcBlanksCreate) FcBlanksCreate __attribute((alias("IA__FcBlanksCreate"), visibility("default"))); ++#endif ++#ifdef __fcblanks__ ++#undef FcBlanksDestroy ++extern __typeof (FcBlanksDestroy) FcBlanksDestroy __attribute((alias("IA__FcBlanksDestroy"), visibility("default"))); ++#endif ++#ifdef __fcblanks__ ++#undef FcBlanksAdd ++extern __typeof (FcBlanksAdd) FcBlanksAdd __attribute((alias("IA__FcBlanksAdd"), visibility("default"))); ++#endif ++#ifdef __fcblanks__ ++#undef FcBlanksIsMember ++extern __typeof (FcBlanksIsMember) FcBlanksIsMember __attribute((alias("IA__FcBlanksIsMember"), visibility("default"))); ++#endif ++#ifdef __fccache__ ++#undef FcCacheCopySet ++extern __typeof (FcCacheCopySet) FcCacheCopySet __attribute((alias("IA__FcCacheCopySet"), visibility("default"))); ++#endif ++#ifdef __fccache__ ++#undef FcCacheNumSubdir ++extern __typeof (FcCacheNumSubdir) FcCacheNumSubdir __attribute((alias("IA__FcCacheNumSubdir"), visibility("default"))); ++#endif ++#ifdef __fccache__ ++#undef FcCacheNumFont ++extern __typeof (FcCacheNumFont) FcCacheNumFont __attribute((alias("IA__FcCacheNumFont"), visibility("default"))); ++#endif ++#ifdef __fccache__ ++#undef FcDirCacheUnlink ++extern __typeof (FcDirCacheUnlink) FcDirCacheUnlink __attribute((alias("IA__FcDirCacheUnlink"), visibility("default"))); ++#endif ++#ifdef __fccache__ ++#undef FcDirCacheValid ++extern __typeof (FcDirCacheValid) FcDirCacheValid __attribute((alias("IA__FcDirCacheValid"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigHome ++extern __typeof (FcConfigHome) FcConfigHome __attribute((alias("IA__FcConfigHome"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigEnableHome ++extern __typeof (FcConfigEnableHome) FcConfigEnableHome __attribute((alias("IA__FcConfigEnableHome"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigFilename ++extern __typeof (FcConfigFilename) FcConfigFilename __attribute((alias("IA__FcConfigFilename"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigCreate ++extern __typeof (FcConfigCreate) FcConfigCreate __attribute((alias("IA__FcConfigCreate"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigReference ++extern __typeof (FcConfigReference) FcConfigReference __attribute((alias("IA__FcConfigReference"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigDestroy ++extern __typeof (FcConfigDestroy) FcConfigDestroy __attribute((alias("IA__FcConfigDestroy"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigSetCurrent ++extern __typeof (FcConfigSetCurrent) FcConfigSetCurrent __attribute((alias("IA__FcConfigSetCurrent"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigGetCurrent ++extern __typeof (FcConfigGetCurrent) FcConfigGetCurrent __attribute((alias("IA__FcConfigGetCurrent"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigUptoDate ++extern __typeof (FcConfigUptoDate) FcConfigUptoDate __attribute((alias("IA__FcConfigUptoDate"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigBuildFonts ++extern __typeof (FcConfigBuildFonts) FcConfigBuildFonts __attribute((alias("IA__FcConfigBuildFonts"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigGetFontDirs ++extern __typeof (FcConfigGetFontDirs) FcConfigGetFontDirs __attribute((alias("IA__FcConfigGetFontDirs"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigGetConfigDirs ++extern __typeof (FcConfigGetConfigDirs) FcConfigGetConfigDirs __attribute((alias("IA__FcConfigGetConfigDirs"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigGetConfigFiles ++extern __typeof (FcConfigGetConfigFiles) FcConfigGetConfigFiles __attribute((alias("IA__FcConfigGetConfigFiles"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigGetCache ++extern __typeof (FcConfigGetCache) FcConfigGetCache __attribute((alias("IA__FcConfigGetCache"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigGetBlanks ++extern __typeof (FcConfigGetBlanks) FcConfigGetBlanks __attribute((alias("IA__FcConfigGetBlanks"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigGetCacheDirs ++extern __typeof (FcConfigGetCacheDirs) FcConfigGetCacheDirs __attribute((alias("IA__FcConfigGetCacheDirs"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigGetRescanInterval ++extern __typeof (FcConfigGetRescanInterval) FcConfigGetRescanInterval __attribute((alias("IA__FcConfigGetRescanInterval"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigSetRescanInterval ++extern __typeof (FcConfigSetRescanInterval) FcConfigSetRescanInterval __attribute((alias("IA__FcConfigSetRescanInterval"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigGetFonts ++extern __typeof (FcConfigGetFonts) FcConfigGetFonts __attribute((alias("IA__FcConfigGetFonts"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigAppFontAddFile ++extern __typeof (FcConfigAppFontAddFile) FcConfigAppFontAddFile __attribute((alias("IA__FcConfigAppFontAddFile"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigAppFontAddDir ++extern __typeof (FcConfigAppFontAddDir) FcConfigAppFontAddDir __attribute((alias("IA__FcConfigAppFontAddDir"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigAppFontClear ++extern __typeof (FcConfigAppFontClear) FcConfigAppFontClear __attribute((alias("IA__FcConfigAppFontClear"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigSubstituteWithPat ++extern __typeof (FcConfigSubstituteWithPat) FcConfigSubstituteWithPat __attribute((alias("IA__FcConfigSubstituteWithPat"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigSubstitute ++extern __typeof (FcConfigSubstitute) FcConfigSubstitute __attribute((alias("IA__FcConfigSubstitute"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetCreate ++extern __typeof (FcCharSetCreate) FcCharSetCreate __attribute((alias("IA__FcCharSetCreate"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetNew ++extern __typeof (FcCharSetNew) FcCharSetNew __attribute((alias("IA__FcCharSetNew"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetDestroy ++extern __typeof (FcCharSetDestroy) FcCharSetDestroy __attribute((alias("IA__FcCharSetDestroy"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetAddChar ++extern __typeof (FcCharSetAddChar) FcCharSetAddChar __attribute((alias("IA__FcCharSetAddChar"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetCopy ++extern __typeof (FcCharSetCopy) FcCharSetCopy __attribute((alias("IA__FcCharSetCopy"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetEqual ++extern __typeof (FcCharSetEqual) FcCharSetEqual __attribute((alias("IA__FcCharSetEqual"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetIntersect ++extern __typeof (FcCharSetIntersect) FcCharSetIntersect __attribute((alias("IA__FcCharSetIntersect"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetUnion ++extern __typeof (FcCharSetUnion) FcCharSetUnion __attribute((alias("IA__FcCharSetUnion"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetSubtract ++extern __typeof (FcCharSetSubtract) FcCharSetSubtract __attribute((alias("IA__FcCharSetSubtract"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetMerge ++extern __typeof (FcCharSetMerge) FcCharSetMerge __attribute((alias("IA__FcCharSetMerge"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetHasChar ++extern __typeof (FcCharSetHasChar) FcCharSetHasChar __attribute((alias("IA__FcCharSetHasChar"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetCount ++extern __typeof (FcCharSetCount) FcCharSetCount __attribute((alias("IA__FcCharSetCount"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetIntersectCount ++extern __typeof (FcCharSetIntersectCount) FcCharSetIntersectCount __attribute((alias("IA__FcCharSetIntersectCount"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetSubtractCount ++extern __typeof (FcCharSetSubtractCount) FcCharSetSubtractCount __attribute((alias("IA__FcCharSetSubtractCount"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetIsSubset ++extern __typeof (FcCharSetIsSubset) FcCharSetIsSubset __attribute((alias("IA__FcCharSetIsSubset"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetFirstPage ++extern __typeof (FcCharSetFirstPage) FcCharSetFirstPage __attribute((alias("IA__FcCharSetFirstPage"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetNextPage ++extern __typeof (FcCharSetNextPage) FcCharSetNextPage __attribute((alias("IA__FcCharSetNextPage"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetCoverage ++extern __typeof (FcCharSetCoverage) FcCharSetCoverage __attribute((alias("IA__FcCharSetCoverage"), visibility("default"))); ++#endif ++#ifdef __fcdbg__ ++#undef FcValuePrint ++extern __typeof (FcValuePrint) FcValuePrint __attribute((alias("IA__FcValuePrint"), visibility("default"))); ++#endif ++#ifdef __fcdbg__ ++#undef FcPatternPrint ++extern __typeof (FcPatternPrint) FcPatternPrint __attribute((alias("IA__FcPatternPrint"), visibility("default"))); ++#endif ++#ifdef __fcdbg__ ++#undef FcFontSetPrint ++extern __typeof (FcFontSetPrint) FcFontSetPrint __attribute((alias("IA__FcFontSetPrint"), visibility("default"))); ++#endif ++#ifdef __fcdefault__ ++#undef FcDefaultSubstitute ++extern __typeof (FcDefaultSubstitute) FcDefaultSubstitute __attribute((alias("IA__FcDefaultSubstitute"), visibility("default"))); ++#endif ++#ifdef __fcdir__ ++#undef FcFileIsDir ++extern __typeof (FcFileIsDir) FcFileIsDir __attribute((alias("IA__FcFileIsDir"), visibility("default"))); ++#endif ++#ifdef __fcdir__ ++#undef FcFileScan ++extern __typeof (FcFileScan) FcFileScan __attribute((alias("IA__FcFileScan"), visibility("default"))); ++#endif ++#ifdef __fcdir__ ++#undef FcDirScan ++extern __typeof (FcDirScan) FcDirScan __attribute((alias("IA__FcDirScan"), visibility("default"))); ++#endif ++#ifdef __fcdir__ ++#undef FcDirSave ++extern __typeof (FcDirSave) FcDirSave __attribute((alias("IA__FcDirSave"), visibility("default"))); ++#endif ++#ifdef __fccache__ ++#undef FcDirCacheLoad ++extern __typeof (FcDirCacheLoad) FcDirCacheLoad __attribute((alias("IA__FcDirCacheLoad"), visibility("default"))); ++#endif ++#ifdef __fcdir__ ++#undef FcDirCacheRead ++extern __typeof (FcDirCacheRead) FcDirCacheRead __attribute((alias("IA__FcDirCacheRead"), visibility("default"))); ++#endif ++#ifdef __fccache__ ++#undef FcDirCacheLoadFile ++extern __typeof (FcDirCacheLoadFile) FcDirCacheLoadFile __attribute((alias("IA__FcDirCacheLoadFile"), visibility("default"))); ++#endif ++#ifdef __fccache__ ++#undef FcDirCacheUnload ++extern __typeof (FcDirCacheUnload) FcDirCacheUnload __attribute((alias("IA__FcDirCacheUnload"), visibility("default"))); ++#endif ++#ifdef __fcfreetype__ ++#undef FcFreeTypeQuery ++extern __typeof (FcFreeTypeQuery) FcFreeTypeQuery __attribute((alias("IA__FcFreeTypeQuery"), visibility("default"))); ++#endif ++#ifdef __fcfs__ ++#undef FcFontSetCreate ++extern __typeof (FcFontSetCreate) FcFontSetCreate __attribute((alias("IA__FcFontSetCreate"), visibility("default"))); ++#endif ++#ifdef __fcfs__ ++#undef FcFontSetDestroy ++extern __typeof (FcFontSetDestroy) FcFontSetDestroy __attribute((alias("IA__FcFontSetDestroy"), visibility("default"))); ++#endif ++#ifdef __fcfs__ ++#undef FcFontSetAdd ++extern __typeof (FcFontSetAdd) FcFontSetAdd __attribute((alias("IA__FcFontSetAdd"), visibility("default"))); ++#endif ++#ifdef __fcinit__ ++#undef FcInitLoadConfig ++extern __typeof (FcInitLoadConfig) FcInitLoadConfig __attribute((alias("IA__FcInitLoadConfig"), visibility("default"))); ++#endif ++#ifdef __fcinit__ ++#undef FcInitLoadConfigAndFonts ++extern __typeof (FcInitLoadConfigAndFonts) FcInitLoadConfigAndFonts __attribute((alias("IA__FcInitLoadConfigAndFonts"), visibility("default"))); ++#endif ++#ifdef __fcinit__ ++#undef FcInit ++extern __typeof (FcInit) FcInit __attribute((alias("IA__FcInit"), visibility("default"))); ++#endif ++#ifdef __fcinit__ ++#undef FcFini ++extern __typeof (FcFini) FcFini __attribute((alias("IA__FcFini"), visibility("default"))); ++#endif ++#ifdef __fcinit__ ++#undef FcGetVersion ++extern __typeof (FcGetVersion) FcGetVersion __attribute((alias("IA__FcGetVersion"), visibility("default"))); ++#endif ++#ifdef __fcinit__ ++#undef FcInitReinitialize ++extern __typeof (FcInitReinitialize) FcInitReinitialize __attribute((alias("IA__FcInitReinitialize"), visibility("default"))); ++#endif ++#ifdef __fcinit__ ++#undef FcInitBringUptoDate ++extern __typeof (FcInitBringUptoDate) FcInitBringUptoDate __attribute((alias("IA__FcInitBringUptoDate"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcGetLangs ++extern __typeof (FcGetLangs) FcGetLangs __attribute((alias("IA__FcGetLangs"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangGetCharSet ++extern __typeof (FcLangGetCharSet) FcLangGetCharSet __attribute((alias("IA__FcLangGetCharSet"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangSetCreate ++extern __typeof (FcLangSetCreate) FcLangSetCreate __attribute((alias("IA__FcLangSetCreate"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangSetDestroy ++extern __typeof (FcLangSetDestroy) FcLangSetDestroy __attribute((alias("IA__FcLangSetDestroy"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangSetCopy ++extern __typeof (FcLangSetCopy) FcLangSetCopy __attribute((alias("IA__FcLangSetCopy"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangSetAdd ++extern __typeof (FcLangSetAdd) FcLangSetAdd __attribute((alias("IA__FcLangSetAdd"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangSetHasLang ++extern __typeof (FcLangSetHasLang) FcLangSetHasLang __attribute((alias("IA__FcLangSetHasLang"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangSetCompare ++extern __typeof (FcLangSetCompare) FcLangSetCompare __attribute((alias("IA__FcLangSetCompare"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangSetContains ++extern __typeof (FcLangSetContains) FcLangSetContains __attribute((alias("IA__FcLangSetContains"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangSetEqual ++extern __typeof (FcLangSetEqual) FcLangSetEqual __attribute((alias("IA__FcLangSetEqual"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangSetHash ++extern __typeof (FcLangSetHash) FcLangSetHash __attribute((alias("IA__FcLangSetHash"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangSetGetLangs ++extern __typeof (FcLangSetGetLangs) FcLangSetGetLangs __attribute((alias("IA__FcLangSetGetLangs"), visibility("default"))); ++#endif ++#ifdef __fclist__ ++#undef FcObjectSetCreate ++extern __typeof (FcObjectSetCreate) FcObjectSetCreate __attribute((alias("IA__FcObjectSetCreate"), visibility("default"))); ++#endif ++#ifdef __fclist__ ++#undef FcObjectSetAdd ++extern __typeof (FcObjectSetAdd) FcObjectSetAdd __attribute((alias("IA__FcObjectSetAdd"), visibility("default"))); ++#endif ++#ifdef __fclist__ ++#undef FcObjectSetDestroy ++extern __typeof (FcObjectSetDestroy) FcObjectSetDestroy __attribute((alias("IA__FcObjectSetDestroy"), visibility("default"))); ++#endif ++#ifdef __fclist__ ++#undef FcObjectSetVaBuild ++extern __typeof (FcObjectSetVaBuild) FcObjectSetVaBuild __attribute((alias("IA__FcObjectSetVaBuild"), visibility("default"))); ++#endif ++#ifdef __fclist__ ++#undef FcObjectSetBuild ++extern __typeof (FcObjectSetBuild) FcObjectSetBuild __attribute((alias("IA__FcObjectSetBuild"), visibility("default"))); ++#endif ++#ifdef __fclist__ ++#undef FcFontSetList ++extern __typeof (FcFontSetList) FcFontSetList __attribute((alias("IA__FcFontSetList"), visibility("default"))); ++#endif ++#ifdef __fclist__ ++#undef FcFontList ++extern __typeof (FcFontList) FcFontList __attribute((alias("IA__FcFontList"), visibility("default"))); ++#endif ++#ifdef __fcatomic__ ++#undef FcAtomicCreate ++extern __typeof (FcAtomicCreate) FcAtomicCreate __attribute((alias("IA__FcAtomicCreate"), visibility("default"))); ++#endif ++#ifdef __fcatomic__ ++#undef FcAtomicLock ++extern __typeof (FcAtomicLock) FcAtomicLock __attribute((alias("IA__FcAtomicLock"), visibility("default"))); ++#endif ++#ifdef __fcatomic__ ++#undef FcAtomicNewFile ++extern __typeof (FcAtomicNewFile) FcAtomicNewFile __attribute((alias("IA__FcAtomicNewFile"), visibility("default"))); ++#endif ++#ifdef __fcatomic__ ++#undef FcAtomicOrigFile ++extern __typeof (FcAtomicOrigFile) FcAtomicOrigFile __attribute((alias("IA__FcAtomicOrigFile"), visibility("default"))); ++#endif ++#ifdef __fcatomic__ ++#undef FcAtomicReplaceOrig ++extern __typeof (FcAtomicReplaceOrig) FcAtomicReplaceOrig __attribute((alias("IA__FcAtomicReplaceOrig"), visibility("default"))); ++#endif ++#ifdef __fcatomic__ ++#undef FcAtomicDeleteNew ++extern __typeof (FcAtomicDeleteNew) FcAtomicDeleteNew __attribute((alias("IA__FcAtomicDeleteNew"), visibility("default"))); ++#endif ++#ifdef __fcatomic__ ++#undef FcAtomicUnlock ++extern __typeof (FcAtomicUnlock) FcAtomicUnlock __attribute((alias("IA__FcAtomicUnlock"), visibility("default"))); ++#endif ++#ifdef __fcatomic__ ++#undef FcAtomicDestroy ++extern __typeof (FcAtomicDestroy) FcAtomicDestroy __attribute((alias("IA__FcAtomicDestroy"), visibility("default"))); ++#endif ++#ifdef __fcmatch__ ++#undef FcFontSetMatch ++extern __typeof (FcFontSetMatch) FcFontSetMatch __attribute((alias("IA__FcFontSetMatch"), visibility("default"))); ++#endif ++#ifdef __fcmatch__ ++#undef FcFontMatch ++extern __typeof (FcFontMatch) FcFontMatch __attribute((alias("IA__FcFontMatch"), visibility("default"))); ++#endif ++#ifdef __fcmatch__ ++#undef FcFontRenderPrepare ++extern __typeof (FcFontRenderPrepare) FcFontRenderPrepare __attribute((alias("IA__FcFontRenderPrepare"), visibility("default"))); ++#endif ++#ifdef __fcmatch__ ++#undef FcFontSetSort ++extern __typeof (FcFontSetSort) FcFontSetSort __attribute((alias("IA__FcFontSetSort"), visibility("default"))); ++#endif ++#ifdef __fcmatch__ ++#undef FcFontSort ++extern __typeof (FcFontSort) FcFontSort __attribute((alias("IA__FcFontSort"), visibility("default"))); ++#endif ++#ifdef __fcmatch__ ++#undef FcFontSetSortDestroy ++extern __typeof (FcFontSetSortDestroy) FcFontSetSortDestroy __attribute((alias("IA__FcFontSetSortDestroy"), visibility("default"))); ++#endif ++#ifdef __fcmatrix__ ++#undef FcMatrixCopy ++extern __typeof (FcMatrixCopy) FcMatrixCopy __attribute((alias("IA__FcMatrixCopy"), visibility("default"))); ++#endif ++#ifdef __fcmatrix__ ++#undef FcMatrixEqual ++extern __typeof (FcMatrixEqual) FcMatrixEqual __attribute((alias("IA__FcMatrixEqual"), visibility("default"))); ++#endif ++#ifdef __fcmatrix__ ++#undef FcMatrixMultiply ++extern __typeof (FcMatrixMultiply) FcMatrixMultiply __attribute((alias("IA__FcMatrixMultiply"), visibility("default"))); ++#endif ++#ifdef __fcmatrix__ ++#undef FcMatrixRotate ++extern __typeof (FcMatrixRotate) FcMatrixRotate __attribute((alias("IA__FcMatrixRotate"), visibility("default"))); ++#endif ++#ifdef __fcmatrix__ ++#undef FcMatrixScale ++extern __typeof (FcMatrixScale) FcMatrixScale __attribute((alias("IA__FcMatrixScale"), visibility("default"))); ++#endif ++#ifdef __fcmatrix__ ++#undef FcMatrixShear ++extern __typeof (FcMatrixShear) FcMatrixShear __attribute((alias("IA__FcMatrixShear"), visibility("default"))); ++#endif ++#ifdef __fcname__ ++#undef FcNameRegisterObjectTypes ++extern __typeof (FcNameRegisterObjectTypes) FcNameRegisterObjectTypes __attribute((alias("IA__FcNameRegisterObjectTypes"), visibility("default"))); ++#endif ++#ifdef __fcname__ ++#undef FcNameUnregisterObjectTypes ++extern __typeof (FcNameUnregisterObjectTypes) FcNameUnregisterObjectTypes __attribute((alias("IA__FcNameUnregisterObjectTypes"), visibility("default"))); ++#endif ++#ifdef __fcname__ ++#undef FcNameGetObjectType ++extern __typeof (FcNameGetObjectType) FcNameGetObjectType __attribute((alias("IA__FcNameGetObjectType"), visibility("default"))); ++#endif ++#ifdef __fcname__ ++#undef FcNameRegisterConstants ++extern __typeof (FcNameRegisterConstants) FcNameRegisterConstants __attribute((alias("IA__FcNameRegisterConstants"), visibility("default"))); ++#endif ++#ifdef __fcname__ ++#undef FcNameUnregisterConstants ++extern __typeof (FcNameUnregisterConstants) FcNameUnregisterConstants __attribute((alias("IA__FcNameUnregisterConstants"), visibility("default"))); ++#endif ++#ifdef __fcname__ ++#undef FcNameGetConstant ++extern __typeof (FcNameGetConstant) FcNameGetConstant __attribute((alias("IA__FcNameGetConstant"), visibility("default"))); ++#endif ++#ifdef __fcname__ ++#undef FcNameConstant ++extern __typeof (FcNameConstant) FcNameConstant __attribute((alias("IA__FcNameConstant"), visibility("default"))); ++#endif ++#ifdef __fcname__ ++#undef FcNameParse ++extern __typeof (FcNameParse) FcNameParse __attribute((alias("IA__FcNameParse"), visibility("default"))); ++#endif ++#ifdef __fcname__ ++#undef FcNameUnparse ++extern __typeof (FcNameUnparse) FcNameUnparse __attribute((alias("IA__FcNameUnparse"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternCreate ++extern __typeof (FcPatternCreate) FcPatternCreate __attribute((alias("IA__FcPatternCreate"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternDuplicate ++extern __typeof (FcPatternDuplicate) FcPatternDuplicate __attribute((alias("IA__FcPatternDuplicate"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternReference ++extern __typeof (FcPatternReference) FcPatternReference __attribute((alias("IA__FcPatternReference"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternFilter ++extern __typeof (FcPatternFilter) FcPatternFilter __attribute((alias("IA__FcPatternFilter"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcValueDestroy ++extern __typeof (FcValueDestroy) FcValueDestroy __attribute((alias("IA__FcValueDestroy"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcValueEqual ++extern __typeof (FcValueEqual) FcValueEqual __attribute((alias("IA__FcValueEqual"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcValueSave ++extern __typeof (FcValueSave) FcValueSave __attribute((alias("IA__FcValueSave"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternDestroy ++extern __typeof (FcPatternDestroy) FcPatternDestroy __attribute((alias("IA__FcPatternDestroy"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternEqual ++extern __typeof (FcPatternEqual) FcPatternEqual __attribute((alias("IA__FcPatternEqual"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternEqualSubset ++extern __typeof (FcPatternEqualSubset) FcPatternEqualSubset __attribute((alias("IA__FcPatternEqualSubset"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternHash ++extern __typeof (FcPatternHash) FcPatternHash __attribute((alias("IA__FcPatternHash"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternAdd ++extern __typeof (FcPatternAdd) FcPatternAdd __attribute((alias("IA__FcPatternAdd"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternAddWeak ++extern __typeof (FcPatternAddWeak) FcPatternAddWeak __attribute((alias("IA__FcPatternAddWeak"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternGet ++extern __typeof (FcPatternGet) FcPatternGet __attribute((alias("IA__FcPatternGet"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternDel ++extern __typeof (FcPatternDel) FcPatternDel __attribute((alias("IA__FcPatternDel"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternRemove ++extern __typeof (FcPatternRemove) FcPatternRemove __attribute((alias("IA__FcPatternRemove"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternAddInteger ++extern __typeof (FcPatternAddInteger) FcPatternAddInteger __attribute((alias("IA__FcPatternAddInteger"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternAddDouble ++extern __typeof (FcPatternAddDouble) FcPatternAddDouble __attribute((alias("IA__FcPatternAddDouble"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternAddString ++extern __typeof (FcPatternAddString) FcPatternAddString __attribute((alias("IA__FcPatternAddString"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternAddMatrix ++extern __typeof (FcPatternAddMatrix) FcPatternAddMatrix __attribute((alias("IA__FcPatternAddMatrix"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternAddCharSet ++extern __typeof (FcPatternAddCharSet) FcPatternAddCharSet __attribute((alias("IA__FcPatternAddCharSet"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternAddBool ++extern __typeof (FcPatternAddBool) FcPatternAddBool __attribute((alias("IA__FcPatternAddBool"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternAddLangSet ++extern __typeof (FcPatternAddLangSet) FcPatternAddLangSet __attribute((alias("IA__FcPatternAddLangSet"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternGetInteger ++extern __typeof (FcPatternGetInteger) FcPatternGetInteger __attribute((alias("IA__FcPatternGetInteger"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternGetDouble ++extern __typeof (FcPatternGetDouble) FcPatternGetDouble __attribute((alias("IA__FcPatternGetDouble"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternGetString ++extern __typeof (FcPatternGetString) FcPatternGetString __attribute((alias("IA__FcPatternGetString"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternGetMatrix ++extern __typeof (FcPatternGetMatrix) FcPatternGetMatrix __attribute((alias("IA__FcPatternGetMatrix"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternGetCharSet ++extern __typeof (FcPatternGetCharSet) FcPatternGetCharSet __attribute((alias("IA__FcPatternGetCharSet"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternGetBool ++extern __typeof (FcPatternGetBool) FcPatternGetBool __attribute((alias("IA__FcPatternGetBool"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternGetLangSet ++extern __typeof (FcPatternGetLangSet) FcPatternGetLangSet __attribute((alias("IA__FcPatternGetLangSet"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternVaBuild ++extern __typeof (FcPatternVaBuild) FcPatternVaBuild __attribute((alias("IA__FcPatternVaBuild"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternBuild ++extern __typeof (FcPatternBuild) FcPatternBuild __attribute((alias("IA__FcPatternBuild"), visibility("default"))); ++#endif ++#ifdef __fcformat__ ++#undef FcPatternFormat ++extern __typeof (FcPatternFormat) FcPatternFormat __attribute((alias("IA__FcPatternFormat"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrCopy ++extern __typeof (FcStrCopy) FcStrCopy __attribute((alias("IA__FcStrCopy"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrCopyFilename ++extern __typeof (FcStrCopyFilename) FcStrCopyFilename __attribute((alias("IA__FcStrCopyFilename"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrPlus ++extern __typeof (FcStrPlus) FcStrPlus __attribute((alias("IA__FcStrPlus"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrFree ++extern __typeof (FcStrFree) FcStrFree __attribute((alias("IA__FcStrFree"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrDowncase ++extern __typeof (FcStrDowncase) FcStrDowncase __attribute((alias("IA__FcStrDowncase"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrCmpIgnoreCase ++extern __typeof (FcStrCmpIgnoreCase) FcStrCmpIgnoreCase __attribute((alias("IA__FcStrCmpIgnoreCase"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrCmp ++extern __typeof (FcStrCmp) FcStrCmp __attribute((alias("IA__FcStrCmp"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrStrIgnoreCase ++extern __typeof (FcStrStrIgnoreCase) FcStrStrIgnoreCase __attribute((alias("IA__FcStrStrIgnoreCase"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrStr ++extern __typeof (FcStrStr) FcStrStr __attribute((alias("IA__FcStrStr"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcUtf8ToUcs4 ++extern __typeof (FcUtf8ToUcs4) FcUtf8ToUcs4 __attribute((alias("IA__FcUtf8ToUcs4"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcUtf8Len ++extern __typeof (FcUtf8Len) FcUtf8Len __attribute((alias("IA__FcUtf8Len"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcUcs4ToUtf8 ++extern __typeof (FcUcs4ToUtf8) FcUcs4ToUtf8 __attribute((alias("IA__FcUcs4ToUtf8"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcUtf16ToUcs4 ++extern __typeof (FcUtf16ToUcs4) FcUtf16ToUcs4 __attribute((alias("IA__FcUtf16ToUcs4"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcUtf16Len ++extern __typeof (FcUtf16Len) FcUtf16Len __attribute((alias("IA__FcUtf16Len"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrDirname ++extern __typeof (FcStrDirname) FcStrDirname __attribute((alias("IA__FcStrDirname"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrBasename ++extern __typeof (FcStrBasename) FcStrBasename __attribute((alias("IA__FcStrBasename"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrSetCreate ++extern __typeof (FcStrSetCreate) FcStrSetCreate __attribute((alias("IA__FcStrSetCreate"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrSetMember ++extern __typeof (FcStrSetMember) FcStrSetMember __attribute((alias("IA__FcStrSetMember"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrSetEqual ++extern __typeof (FcStrSetEqual) FcStrSetEqual __attribute((alias("IA__FcStrSetEqual"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrSetAdd ++extern __typeof (FcStrSetAdd) FcStrSetAdd __attribute((alias("IA__FcStrSetAdd"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrSetAddFilename ++extern __typeof (FcStrSetAddFilename) FcStrSetAddFilename __attribute((alias("IA__FcStrSetAddFilename"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrSetDel ++extern __typeof (FcStrSetDel) FcStrSetDel __attribute((alias("IA__FcStrSetDel"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrSetDestroy ++extern __typeof (FcStrSetDestroy) FcStrSetDestroy __attribute((alias("IA__FcStrSetDestroy"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrListCreate ++extern __typeof (FcStrListCreate) FcStrListCreate __attribute((alias("IA__FcStrListCreate"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrListNext ++extern __typeof (FcStrListNext) FcStrListNext __attribute((alias("IA__FcStrListNext"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrListDone ++extern __typeof (FcStrListDone) FcStrListDone __attribute((alias("IA__FcStrListDone"), visibility("default"))); ++#endif ++#ifdef __fcxml__ ++#undef FcConfigParseAndLoad ++extern __typeof (FcConfigParseAndLoad) FcConfigParseAndLoad __attribute((alias("IA__FcConfigParseAndLoad"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigGetRescanInverval ++extern __typeof (FcConfigGetRescanInverval) FcConfigGetRescanInverval __attribute((alias("IA__FcConfigGetRescanInverval"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigSetRescanInverval ++extern __typeof (FcConfigSetRescanInverval) FcConfigSetRescanInverval __attribute((alias("IA__FcConfigSetRescanInverval"), visibility("default"))); ++#endif ++#endif ++ +--- misc/fontconfig-2.8.0/src/fcftaliastail.h Wed Aug 20 14:33:55 2008 ++++ misc/build/fontconfig-2.8.0/src/fcftaliastail.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,27 @@ +-dummy ++#if HAVE_GNUC_ATTRIBUTE ++#ifdef __fcfreetype__ ++#undef FcFreeTypeCharIndex ++extern __typeof (FcFreeTypeCharIndex) FcFreeTypeCharIndex __attribute((alias("IA__FcFreeTypeCharIndex"), visibility("default"))); ++#endif ++#ifdef __fcfreetype__ ++#undef FcFreeTypeCharSetAndSpacing ++extern __typeof (FcFreeTypeCharSetAndSpacing) FcFreeTypeCharSetAndSpacing __attribute((alias("IA__FcFreeTypeCharSetAndSpacing"), visibility("default"))); ++#endif ++#ifdef __fcfreetype__ ++#undef FcFreeTypeCharSet ++extern __typeof (FcFreeTypeCharSet) FcFreeTypeCharSet __attribute((alias("IA__FcFreeTypeCharSet"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternGetFTFace ++extern __typeof (FcPatternGetFTFace) FcPatternGetFTFace __attribute((alias("IA__FcPatternGetFTFace"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternAddFTFace ++extern __typeof (FcPatternAddFTFace) FcPatternAddFTFace __attribute((alias("IA__FcPatternAddFTFace"), visibility("default"))); ++#endif ++#ifdef __fcfreetype__ ++#undef FcFreeTypeQueryFace ++extern __typeof (FcFreeTypeQueryFace) FcFreeTypeQueryFace __attribute((alias("IA__FcFreeTypeQueryFace"), visibility("default"))); ++#endif ++#endif ++ +--- misc/fontconfig-2.8.0/src/makefile.mk Wed Aug 20 14:33:55 2008 ++++ misc/build/fontconfig-2.8.0/src/makefile.mk Wed Aug 20 14:26:42 2008 +@@ -1 +1,99 @@ +-dummy ++#************************************************************************* ++# ++# 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=..$/..$/..$/..$/.. ++PRJINC=.. ++PRJNAME=fontconfig ++TARGET=fontconfig ++ ++#ENABLE_EXCEPTIONS=TRUE ++VISIBILITY_HIDDEN=TRUE ++EXTERNAL_WARNINGS_NOT_ERRORS=TRUE ++ ++# --- Settings ---------------------------------- ++ ++.INCLUDE : settings.mk ++ ++#.IF "$(GUI)$(CPU)"=="WNTP" ++ CFLAGS+= -I .. -D HAVE_CONFIG_H -D FC_CACHEDIR=\".\" ++ #.ENDIF ++ ++# --- Files ------------------------------------- ++ ++SLOFILES=\ ++ $(SLO)$/fcatomic.obj \ ++ $(SLO)$/fcblanks.obj \ ++ $(SLO)$/fccache.obj \ ++ $(SLO)$/fccfg.obj \ ++ $(SLO)$/fccharset.obj \ ++ $(SLO)$/fcdbg.obj \ ++ $(SLO)$/fcdefault.obj \ ++ $(SLO)$/fcdir.obj \ ++ $(SLO)$/fcformat.obj \ ++ $(SLO)$/fcfreetype.obj \ ++ $(SLO)$/fcfs.obj \ ++ $(SLO)$/fcinit.obj \ ++ $(SLO)$/fclang.obj \ ++ $(SLO)$/fclist.obj \ ++ $(SLO)$/fcmatch.obj \ ++ $(SLO)$/fcmatrix.obj \ ++ $(SLO)$/fcname.obj \ ++ $(SLO)$/fcpat.obj \ ++ $(SLO)$/fcserialize.obj \ ++ $(SLO)$/fcstr.obj \ ++ $(SLO)$/fcxml.obj \ ++ $(SLO)$/ftglue.obj ++ ++# --- Library ----------------------------------- ++ ++SHL1TARGET= fontconfig$(DLLPOSTFIX) ++SHL1OBJS=$(SLOFILES) ++SHL1STDLIBS=\ ++ ifreetype.lib \ ++ $(LIBXML2LIB) ++ ++ ++SHL1DEPN= ++#SHL1IMPLIB= ifontconfig ++#SHL1USE_EXPORTS=name ++ ++SHL1DEF= $(MISC)$/$(SHL1TARGET).def ++ ++DEF1NAME= $(SHL1TARGET) ++DEF1DEPN= $(MISC)$/$(SHL1TARGET).flt \ ++ $(SLB)$/$(TARGET).lib ++DEFLIB1NAME=$(TARGET) ++ ++# --- Targets ---------------------------------- ++ ++.INCLUDE : target.mk ++ ++# --- filter file ------------------------------ ++ ++$(MISC)$/$(SHL1TARGET).flt: makefile.mk ++ @echo CLEAR_THE_FILE > $@ ++ diff --git a/fontconfig/makefile.mk b/fontconfig/makefile.mk new file mode 100644 index 000000000000..8fd9efe4871a --- /dev/null +++ b/fontconfig/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=so_fontconfig +TARGET=so_fontconfig + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +.IF "$(SYSTEM_FONTCONFIG)" == "YES" +all: + @echo "An already available installation of freetype should exist on your system." + @echo "Therefore the version provided here does not need to be built in addition." +.ENDIF + +# --- Files -------------------------------------------------------- + +TARFILE_NAME=fontconfig-2.8.0 +TARFILE_MD5=77e15a92006ddc2adbb06f840d591c0e + +CONFIGURE_DIR= +.IF "$(OS)"=="WNT" +ADDITIONAL_FILES=\ + fc-arch$/fcalias.h \ + fc-arch$/fcaliastail.h \ + fc-arch$/fcarch.h \ + fc-glyphname$/fcglyphname.h \ + fc-lang$/fclang.h \ + src$/fcalias.h \ + src$/fcaliastail.h \ + src$/fcftaliastail.h \ + src$/makefile.mk \ + config.h + +PATCH_FILES=fontconfig-2.8.0.patch +BUILD_DIR=$(CONFIGURE_DIR)$/src +BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS) +.ELSE +CONFIGURE_ACTION=./configure --enable-shared=yes --enable-libxml2 --disable-docs --libdir=$(OUTDIR)/lib +BUILD_ACTION=$(GNUMAKE) +.ENDIF + +# --- Targets ------------------------------------------------------ + +.INCLUDE : set_ext.mk +.INCLUDE : target.mk +.INCLUDE : tg_ext.mk diff --git a/fontconfig/prj/build.lst b/fontconfig/prj/build.lst new file mode 100644 index 000000000000..f6de3d52523e --- /dev/null +++ b/fontconfig/prj/build.lst @@ -0,0 +1,3 @@ +ep freetype : soltools freetype LIBXML2:libxml2 NULL +ep freetype usr1 - all ep_mkout NULL +ep freetype nmake - all ep_freetype NULL diff --git a/fontconfig/prj/d.lst b/fontconfig/prj/d.lst new file mode 100644 index 000000000000..b409a223608e --- /dev/null +++ b/fontconfig/prj/d.lst @@ -0,0 +1,3 @@ +mkdir: %_DEST%\inc%_EXT%\external\fontconfig +..\%__SRC%\bin\fontconfigmi.dll %_DEST%\bin%_EXT%\fontconfigmi.dll + diff --git a/freetype/prj/d.lst b/freetype/prj/d.lst index b0b19777d2e0..e487787236c9 100644 --- a/freetype/prj/d.lst +++ b/freetype/prj/d.lst @@ -1,7 +1,6 @@ mkdir: %_DEST%\inc%_EXT%\external\freetype mkdir: %_DEST%\inc%_EXT%\external\freetype\config ..\%__SRC%\bin\freetype.dll %_DEST%\bin%_EXT%\freetype.dll -..\%__SRC%\bin\freetype.lib %_DEST%\lib%_EXT%\freetype.lib ..\%__SRC%\lib\ifreetype.lib %_DEST%\lib%_EXT%\ifreetype.lib ..\%__SRC%\misc\build\freetype-2.4.4\include\ft2build.h %_DEST%\inc%_EXT%\external\freetype\ft2build.h -- cgit v1.2.3 From 826f77ed2715a8f1e906675443a6a94d1b8cd2c9 Mon Sep 17 00:00:00 2001 From: ka Date: Thu, 3 Mar 2011 11:36:16 +0100 Subject: rsvglibs: additional header --- libpng/makefile.mk | 3 +-- libpng/prj/d.lst | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libpng/makefile.mk b/libpng/makefile.mk index 7efaffed85e6..0e29d2fde063 100644 --- a/libpng/makefile.mk +++ b/libpng/makefile.mk @@ -55,8 +55,7 @@ ADDITIONAL_FILES=makefile.mk pnglibconf.h BUILD_DIR=$(CONFIGURE_DIR) BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS) -OUT2INC=png.h pnglibconf.h - +OUT2INC=png.h pnglibconf.h pngconf.h # --- Targets ------------------------------------------------------ .INCLUDE : set_ext.mk diff --git a/libpng/prj/d.lst b/libpng/prj/d.lst index 06189e99bbbc..f3b73fdc9d76 100644 --- a/libpng/prj/d.lst +++ b/libpng/prj/d.lst @@ -6,4 +6,5 @@ mkdir: %_DEST%\inc%_EXT%\external\libpng ..\%__SRC%\inc\png.h %_DEST%\inc%_EXT%\external\libpng\png.h ..\%__SRC%\inc\pnglibconf.h %_DEST%\inc%_EXT%\external\libpng\pnglibconf.h +..\%__SRC%\inc\pnglibconf.h %_DEST%\inc%_EXT%\external\libpng\pngconf.h -- cgit v1.2.3 From 0b8311e8546afc32caf36f57ac996dba0401d69e Mon Sep 17 00:00:00 2001 From: ka Date: Thu, 3 Mar 2011 11:42:26 +0100 Subject: rsvglibs: additional header --- libpng/prj/d.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpng/prj/d.lst b/libpng/prj/d.lst index f3b73fdc9d76..553b92253fe5 100644 --- a/libpng/prj/d.lst +++ b/libpng/prj/d.lst @@ -6,5 +6,5 @@ mkdir: %_DEST%\inc%_EXT%\external\libpng ..\%__SRC%\inc\png.h %_DEST%\inc%_EXT%\external\libpng\png.h ..\%__SRC%\inc\pnglibconf.h %_DEST%\inc%_EXT%\external\libpng\pnglibconf.h -..\%__SRC%\inc\pnglibconf.h %_DEST%\inc%_EXT%\external\libpng\pngconf.h +..\%__SRC%\inc\pngconf.h %_DEST%\inc%_EXT%\external\libpng\pngconf.h -- cgit v1.2.3 From bf3dd8be937d7f41c92f4ad2a5551752ff267153 Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Thu, 3 Mar 2011 12:53:20 +0100 Subject: rsvglibs: correct path file --- fontconfig/fontconfig-2.8.0.patch | 142 +++++++++++++++++++++++++++++++++++++- 1 file changed, 141 insertions(+), 1 deletion(-) diff --git a/fontconfig/fontconfig-2.8.0.patch b/fontconfig/fontconfig-2.8.0.patch index d6d25a7b5557..2b3abc9654a6 100644 --- a/fontconfig/fontconfig-2.8.0.patch +++ b/fontconfig/fontconfig-2.8.0.patch @@ -1,5 +1,15 @@ --- misc/fontconfig-2.8.0/fc-cache/fc-cache.c Mon Jan 19 23:26:36 1970 +++ misc/build/fontconfig-2.8.0/fc-cache/fc-cache.c Mon Jan 19 23:26:36 1970 +@@ -41,7 +41,9 @@ + #include + #include + #include ++#ifndef _WIN32 + #include ++#endif + #include + + #if defined (_WIN32) @@ -257,6 +257,9 @@ FcBool remove; FcCache *cache; @@ -77,6 +87,16 @@ #include "../fc-arch/fcarch.h" #include #include +@@ -26,7 +26,9 @@ + #include "../fc-arch/fcarch.h" + #include + #include ++#ifndef _WIN32 + #include ++#endif + #include + #include + #include @@ -34,9 +35,11 @@ # include #elif defined(_WIN32) @@ -170,6 +190,16 @@ cache_dir = test_dir; --- misc/fontconfig-2.8.0/src/fccfg.c Mon Jan 19 23:26:36 1970 +++ misc/build/fontconfig-2.8.0/src/fccfg.c Mon Jan 19 23:26:36 1970 +@@ -23,7 +23,9 @@ + */ + + #include "fcint.h" ++#ifndef _WIN32 + #include ++#endif + #include + + #if defined (_WIN32) && (defined (PIC) || defined (DLL_EXPORT)) @@ -1646,6 +1646,9 @@ FcConfigFileExists (const FcChar8 *dir, const FcChar8 *file) { @@ -208,6 +238,73 @@ /* The language is documented in doc/fcformat.fncs * These are the features implemented: +--- misc/fontconfig-2.8.0/src/fcdir.c 2009-11-16 18:24:52.000000000 +0100 ++++ misc/build/fontconfig-2.8.0/src/fcdir.c 2011-03-03 12:46:39.702582800 +0100 +@@ -23,7 +23,6 @@ + */ + + #include "fcint.h" +-#include + + FcBool + FcFileIsDir (const FcChar8 *file) +@@ -323,6 +322,56 @@ + { + return FcFalse; /* XXX deprecated */ + } ++ ++DIR *opendir( const char* pPfad ) ++{ ++ DIR *pDir = malloc (sizeof (DIR)); ++ if ( pDir ) ++ { ++ FcMemAlloc (FC_MEM_ATTR, sizeof (DIR)); /* size is too expensive */ ++ pDir->p = (char*) pPfad; ++ } ++ return pDir; ++} ++struct dirent *readdir( DIR *pDir ) ++{ ++ int bOk = 0; ++ if ( pDir->p ) ++ { ++ char *pBuf = malloc ((strlen( pDir->p ) + 5 )); ++ FcMemAlloc (FC_MEM_STRING, strlen( pDir->p ) + 5); ++ if ( pBuf ) ++ { ++ // *.* dahinter, ggf mit "\\" abtrennen (falls nicht schon da) ++ strcpy( pBuf, pDir->p ); ++ strcat( pBuf, "\\*.*" + ( *(pBuf + strlen( pBuf ) - 1 ) == '\\' ) ); ++ CharUpperBuff( pBuf, strlen(pBuf) ); ++ pDir->h = FindFirstFile( pBuf, &pDir->aDirEnt ); ++ bOk = pDir->h != INVALID_HANDLE_VALUE; ++ pDir->p = NULL; ++ free (pBuf); ++ } ++ else ++ pDir->h = INVALID_HANDLE_VALUE; ++ } ++ else ++ { ++ bOk = FindNextFile( pDir->h, &pDir->aDirEnt ); ++ } ++ ++ return bOk ? &pDir->aDirEnt : NULL; ++} ++ ++int closedir( DIR *pDir ) ++{ ++ int bOk = 0; ++ if ( pDir ) ++ { ++ bOk = 0 != pDir->p || FindClose( pDir->h ); ++ free (pDir); ++ } ++ return bOk; ++} + #define __fcdir__ + #include "fcaliastail.h" + #undef __fcdir__ --- misc/fontconfig-2.8.0/src/fcint.h Mon Jan 19 23:26:36 1970 +++ misc/build/fontconfig-2.8.0/src/fcint.h Mon Jan 19 23:26:36 1970 @@ -31,6 +31,15 @@ @@ -236,11 +333,54 @@ #include #include #include +@@ -62,6 +64,40 @@ + #include + #include "fcdeprecate.h" + ++#ifndef _WIN32 ++#include ++#else ++#include ++#include ++#include ++#include ++#include ++#include ++#ifdef _MSC_VER ++#pragma warning (push,1) ++#endif ++#include ++#ifdef _MSC_VER ++#pragma warning (pop) ++#endif ++# define S_IFDIR _S_IFDIR /* directory */ ++#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) ++#define dirent _WIN32_FIND_DATAA ++#define d_name cFileName ++#define d_type dwFileAttributes ++typedef struct ++{ ++ WIN32_FIND_DATAA aDirEnt; ++ HANDLE h; ++ const char *p; ++} DIR; ++ ++DIR *opendir( const char* pPfad ); ++struct dirent *readdir( DIR *pDir ); ++ ++int closedir( DIR *pDir ); ++#endif ++ + #ifndef FC_CONFIG_PATH + #define FC_CONFIG_PATH "fonts.conf" + #endif --- misc/fontconfig-2.8.0/src/fcxml.c Mon Jan 19 23:26:36 1970 +++ misc/build/fontconfig-2.8.0/src/fcxml.c Mon Jan 19 23:26:36 1970 -@@ -27,6 +27,11 @@ +@@ -27,6 +27,13 @@ #include ++#ifndef _WIN32 #include ++#endif +#ifdef _WIN32 +#include -- cgit v1.2.3 From 9220ab2cf671e18428691378e803f77b6f0a920e Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 3 Mar 2011 13:04:48 +0100 Subject: rsvglibs: export more executables --- gettext/makefile.mk | 15 +++++++++++++++ gettext/prj/d.lst | 17 ++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/gettext/makefile.mk b/gettext/makefile.mk index dee6c82d6295..871bddd25060 100644 --- a/gettext/makefile.mk +++ b/gettext/makefile.mk @@ -68,7 +68,22 @@ OUT2INC+=gettext-tools$/intl$/libintl.h OUT2INC+=gettext-runtime$/libasprintf$/autosprintf.h OUT2INC+=gettext-tools$/libgettextpo$/gettext-po.h +OUT2BIN+=gettext-tools$/src$/.libs$/msgattrib +OUT2BIN+=gettext-tools$/src$/.libs$/msgcat +OUT2BIN+=gettext-tools$/src$/.libs$/msgcmp +OUT2BIN+=gettext-tools$/src$/.libs$/msgcomm +OUT2BIN+=gettext-tools$/src$/.libs$/msgconv +OUT2BIN+=gettext-tools$/src$/.libs$/msgen +OUT2BIN+=gettext-tools$/src$/.libs$/msgexec +OUT2BIN+=gettext-tools$/src$/.libs$/msgfilter OUT2BIN+=gettext-tools$/src$/.libs$/msgfmt +OUT2BIN+=gettext-tools$/src$/.libs$/msggrep +OUT2BIN+=gettext-tools$/src$/.libs$/msginit +OUT2BIN+=gettext-tools$/src$/.libs$/msgmerge +OUT2BIN+=gettext-tools$/src$/.libs$/msgunfmt +OUT2BIN+=gettext-tools$/src$/.libs$/msguniq +OUT2BIN+=gettext-tools$/src$/.libs$/urlget +OUT2BIN+=gettext-tools$/src$/.libs$/xgettext .ELIF "$(OS)"=="WNT" .ELSE .ENDIF diff --git a/gettext/prj/d.lst b/gettext/prj/d.lst index a7df40b0a718..6e0accf09bf5 100644 --- a/gettext/prj/d.lst +++ b/gettext/prj/d.lst @@ -11,5 +11,20 @@ symlink: %_DEST%\lib%_EXT%\libintl.8.dylib %_DEST%\lib%_EXT%\libintl.dylib ..\%__SRC%\lib\libgettextlib-0.18.1.dylib %_DEST%\lib%_EXT%\libgettextlib-0.18.1.dylib symlink: %_DEST%\lib%_EXT%\libgettextlib-0.18.1.dylib %_DEST%\lib%_EXT%\libgettextlib.dylib ..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT% -..\%__SRC%\bin\msgfmt %_DEST%\bin%_EXT% +..\%__SRC%\bin\msgattrib %_DEST%\bin%_EXT%\msgattrib +..\%__SRC%\bin\msgcat %_DEST%\bin%_EXT%\msgcat +..\%__SRC%\bin\msgcmp %_DEST%\bin%_EXT%\msgcmp +..\%__SRC%\bin\msgcomm %_DEST%\bin%_EXT%\msgcomm +..\%__SRC%\bin\msgconv %_DEST%\bin%_EXT%\msgconv +..\%__SRC%\bin\msgen %_DEST%\bin%_EXT%\msgen +..\%__SRC%\bin\msgexec %_DEST%\bin%_EXT%\msgexec +..\%__SRC%\bin\msgfilter %_DEST%\bin%_EXT%\msgfilter +..\%__SRC%\bin\msgfmt %_DEST%\bin%_EXT%\msgfmt +..\%__SRC%\bin\msggrep %_DEST%\bin%_EXT%\msggrep +..\%__SRC%\bin\msginit %_DEST%\bin%_EXT%\msginit +..\%__SRC%\bin\msgmerge %_DEST%\bin%_EXT%\msgmerge +..\%__SRC%\bin\msgunfmt %_DEST%\bin%_EXT%\msgunfmt +..\%__SRC%\bin\msguniq %_DEST%\bin%_EXT%\msguniq +..\%__SRC%\bin\urlget %_DEST%\bin%_EXT%\urlget +..\%__SRC%\bin\xgettext %_DEST%\bin%_EXT%\xgettext -- cgit v1.2.3 From 3b7ef2d7fa3ef973f1fc2b02a62bf4530290795b Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 3 Mar 2011 13:36:49 +0100 Subject: rsvglibs: add libgsf dependency. --- libgsf/libgsf-1.14.19.patch | 20 +++++++ libgsf/makefile.mk | 140 +++++++++++++++++++++++++++++++++++++++++++ libgsf/prj/build.lst | 3 + libgsf/prj/d.lst | 56 +++++++++++++++++ librsvg/librsvg-2.32.1.patch | 26 ++++++++ librsvg/makefile.mk | 86 ++++++++++++++++++++++++++ librsvg/prj/d.lst | 0 7 files changed, 331 insertions(+) create mode 100644 libgsf/libgsf-1.14.19.patch create mode 100644 libgsf/makefile.mk create mode 100644 libgsf/prj/build.lst create mode 100644 libgsf/prj/d.lst create mode 100644 librsvg/librsvg-2.32.1.patch create mode 100644 librsvg/makefile.mk create mode 100644 librsvg/prj/d.lst diff --git a/libgsf/libgsf-1.14.19.patch b/libgsf/libgsf-1.14.19.patch new file mode 100644 index 000000000000..a39758367f83 --- /dev/null +++ b/libgsf/libgsf-1.14.19.patch @@ -0,0 +1,20 @@ +--- misc/libgsf-1.14.19/configure 2010-09-25 18:53:55.000000000 +0200 ++++ misc/build/libgsf-1.14.19/configure 2011-03-03 12:42:21.000000000 +0100 +@@ -11475,7 +11475,7 @@ + + + +- ++if 0; then + case "$am__api_version" in + 1.01234) + as_fn_error "Automake 1.5 or newer is required to use intltool" "$LINENO" 5 +@@ -11650,7 +11650,7 @@ + + + +- ++fi + + + diff --git a/libgsf/makefile.mk b/libgsf/makefile.mk new file mode 100644 index 000000000000..e19a88c9a370 --- /dev/null +++ b/libgsf/makefile.mk @@ -0,0 +1,140 @@ +#************************************************************************* +# +# 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=libgsf +TARGET=so_libgsf + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +.IF "$(SYSTEM_LIBGSF)" == "YES" +all: + @echo "An already available installation of gdk-pixbuf should exist on your system." + @echo "Therefore the version provided here does not need to be built in addition." +.ENDIF + +# --- Files -------------------------------------------------------- + +LIBGSFVERSION=1.14.19 + +TARFILE_NAME=$(PRJNAME)-$(LIBGSFVERSION) +TARFILE_MD5=3a84ac2da37cae5bf7ce616228c6fbde + +PATCH_FILES=libgsf-1.14.19.patch + +CONFIGURE_DIR= +CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) \ + .$/configure \ + --prefix=$(SRC_ROOT)$/$(PRJNAME)$/$(MISC) \ + CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS) -I$(SOLARINCDIR)$/external -I$(SOLARINCDIR)$/external$/glib-2.0" \ + LDFLAGS="-L$(SOLARLIBDIR)" \ + --without-python \ + --without-bonobo \ + --with-bz2 \ + --with-gio \ + --with-gdk_pixbuf \ + --without-gnome-vfs \ + --disable-nls \ + LIBGSF_CFLAGS="-I$(SOLARINCDIR)$/external$/glib-2.0" \ + LIBGSF_LIBS="-lxml2 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl" \ + LIBGSF_GIO_CFLAGS="-I$(SOLARINCDIR)$/external$/glib-2.0" \ + LIBGSF_GIO_LIBS="-lgio-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl" \ + GDK_PIXBUF_CFLAGS="-I$(SOLARINCDIR)$/external$/gdk-pixbuf-2.0" \ + GDK_PIXBUF_LIBS="-lgdk_pixbuf-2.0" + + +CONFIGURE_FLAGS=$(eq,$(OS),MACOSX CPPFLAGS="$(EXTRA_CDEFS)" $(NULL)) + +BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) \ + $(GNUMAKE) +BUILD_DIR=$(CONFIGURE_DIR) + +.IF "$(OS)"=="MACOSX" +EXTRPATH=LOADER +OUT2LIB+=gsf$/.libs$/libgsf-1.114.dylib + +OUT2INC+=gsf$/gsf-blob.h +OUT2INC+=gsf$/gsf-input-impl.h +OUT2INC+=gsf$/gsf-outfile.h +OUT2INC+=gsf$/gsf-clip-data.h +OUT2INC+=gsf$/gsf-input-iochannel.h +OUT2INC+=gsf$/gsf-output-bzip.h +OUT2INC+=gsf$/gsf-doc-meta-data.h +OUT2INC+=gsf$/gsf-input-memory.h +OUT2INC+=gsf$/gsf-output-csv.h +OUT2INC+=gsf$/gsf-docprop-vector.h +OUT2INC+=gsf$/gsf-input-proxy.h +OUT2INC+=gsf$/gsf-output-gio.h +OUT2INC+=gsf$/gsf-impl-utils.h +OUT2INC+=gsf$/gsf-input-stdio.h +OUT2INC+=gsf$/gsf-output-gzip.h +OUT2INC+=gsf$/gsf-infile-impl.h +OUT2INC+=gsf$/gsf-input-textline.h +OUT2INC+=gsf$/gsf-output-iconv.h +OUT2INC+=gsf$/gsf-infile-msole.h +OUT2INC+=gsf$/gsf-input.h +OUT2INC+=gsf$/gsf-output-impl.h +OUT2INC+=gsf$/gsf-infile-msvba.h +OUT2INC+=gsf$/gsf-libxml.h +OUT2INC+=gsf$/gsf-output-iochannel.h +OUT2INC+=gsf$/gsf-infile-stdio.h +OUT2INC+=gsf$/gsf-meta-names.h +OUT2INC+=gsf$/gsf-output-memory.h +OUT2INC+=gsf$/gsf-infile-tar.h +OUT2INC+=gsf$/gsf-msole-utils.h +OUT2INC+=gsf$/gsf-output-stdio.h +OUT2INC+=gsf$/gsf-infile-zip.h +OUT2INC+=gsf$/gsf-open-pkg-utils.h +OUT2INC+=gsf$/gsf-output.h +OUT2INC+=gsf$/gsf-infile.h +OUT2INC+=gsf$/gsf-opendoc-utils.h +OUT2INC+=gsf$/gsf-shared-memory.h +OUT2INC+=gsf$/gsf-input-bzip.h +OUT2INC+=gsf$/gsf-outfile-impl.h +OUT2INC+=gsf$/gsf-structured-blob.h +OUT2INC+=gsf$/gsf-input-gio.h +OUT2INC+=gsf$/gsf-outfile-msole.h +OUT2INC+=gsf$/gsf-timestamp.h +OUT2INC+=gsf$/gsf-input-gzip.h +OUT2INC+=gsf$/gsf-outfile-stdio.h +OUT2INC+=gsf$/gsf-utils.h +OUT2INC+=gsf$/gsf-input-http.h +OUT2INC+=gsf$/gsf-outfile-zip.h +OUT2INC+=gsf$/gsf.h +.ELIF "$(OS)"=="WNT" +.ELSE +.ENDIF + +# --- Targets ------------------------------------------------------ + +.INCLUDE : set_ext.mk +.INCLUDE : target.mk +.INCLUDE : tg_ext.mk + diff --git a/libgsf/prj/build.lst b/libgsf/prj/build.lst new file mode 100644 index 000000000000..b5f0d8167c08 --- /dev/null +++ b/libgsf/prj/build.lst @@ -0,0 +1,3 @@ +gs libgsf : soltools NULL +gs libgsf usr1 - all gs_mkout NULL +gs libgsf nmake - all gs_libgsf NULL diff --git a/libgsf/prj/d.lst b/libgsf/prj/d.lst new file mode 100644 index 000000000000..382f4fa071a6 --- /dev/null +++ b/libgsf/prj/d.lst @@ -0,0 +1,56 @@ +mkdir: %_DEST%\inc%_EXT%\external +mkdir: %_DEST%\inc%_EXT%\external\libgsf-1 +mkdir: %_DEST%\inc%_EXT%\external\libgsf-1\gsf + +..\%__SRC%\inc\gsf-blob.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-blob.h +..\%__SRC%\inc\gsf-input-impl.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-input-impl.h +..\%__SRC%\inc\gsf-outfile.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-outfile.h +..\%__SRC%\inc\gsf-clip-data.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-clip-data.h +..\%__SRC%\inc\gsf-input-iochannel.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-input-iochannel.h +..\%__SRC%\inc\gsf-output-bzip.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-output-bzip.h +..\%__SRC%\inc\gsf-doc-meta-data.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-doc-meta-data.h +..\%__SRC%\inc\gsf-input-memory.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-input-memory.h +..\%__SRC%\inc\gsf-output-csv.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-output-csv.h +..\%__SRC%\inc\gsf-docprop-vector.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-docprop-vector.h +..\%__SRC%\inc\gsf-input-proxy.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-input-proxy.h +..\%__SRC%\inc\gsf-output-gio.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-output-gio.h +..\%__SRC%\inc\gsf-impl-utils.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-impl-utils.h +..\%__SRC%\inc\gsf-input-stdio.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-input-stdio.h +..\%__SRC%\inc\gsf-output-gzip.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-output-gzip.h +..\%__SRC%\inc\gsf-infile-impl.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-infile-impl.h +..\%__SRC%\inc\gsf-input-textline.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-input-textline.h +..\%__SRC%\inc\gsf-output-iconv.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-output-iconv.h +..\%__SRC%\inc\gsf-infile-msole.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-infile-msole.h +..\%__SRC%\inc\gsf-input.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-input.h +..\%__SRC%\inc\gsf-output-impl.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-output-impl.h +..\%__SRC%\inc\gsf-infile-msvba.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-infile-msvba.h +..\%__SRC%\inc\gsf-libxml.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-libxml.h +..\%__SRC%\inc\gsf-output-iochannel.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-output-iochannel.h +..\%__SRC%\inc\gsf-infile-stdio.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-infile-stdio.h +..\%__SRC%\inc\gsf-meta-names.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-meta-names.h +..\%__SRC%\inc\gsf-output-memory.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-output-memory.h +..\%__SRC%\inc\gsf-infile-tar.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-infile-tar.h +..\%__SRC%\inc\gsf-msole-utils.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-msole-utils.h +..\%__SRC%\inc\gsf-output-stdio.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-output-stdio.h +..\%__SRC%\inc\gsf-infile-zip.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-infile-zip.h +..\%__SRC%\inc\gsf-open-pkg-utils.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-open-pkg-utils.h +..\%__SRC%\inc\gsf-output.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-output.h +..\%__SRC%\inc\gsf-infile.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-infile.h +..\%__SRC%\inc\gsf-opendoc-utils.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-opendoc-utils.h +..\%__SRC%\inc\gsf-shared-memory.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-shared-memory.h +..\%__SRC%\inc\gsf-input-bzip.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-input-bzip.h +..\%__SRC%\inc\gsf-outfile-impl.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-outfile-impl.h +..\%__SRC%\inc\gsf-structured-blob.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-structured-blob.h +..\%__SRC%\inc\gsf-input-gio.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-input-gio.h +..\%__SRC%\inc\gsf-outfile-msole.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-outfile-msole.h +..\%__SRC%\inc\gsf-timestamp.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-timestamp.h +..\%__SRC%\inc\gsf-input-gzip.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-input-gzip.h +..\%__SRC%\inc\gsf-outfile-stdio.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-outfile-stdio.h +..\%__SRC%\inc\gsf-utils.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-utils.h +..\%__SRC%\inc\gsf-input-http.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-input-http.h +..\%__SRC%\inc\gsf-outfile-zip.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf-outfile-zip.h +..\%__SRC%\inc\gsf.h %_DEST%\inc%_EXT%\external\libgsf-1\gsf\gsf.h + +..\%__SRC%\lib\libgsf-1.114.dylib %_DEST%\lib%_EXT%\libgsf-1.114.dylib +symlink: %_DEST%\lib%_EXT%\libgsf-1.114.dylib %_DEST%\lib%_EXT%\libgsf-1.dylib + diff --git a/librsvg/librsvg-2.32.1.patch b/librsvg/librsvg-2.32.1.patch new file mode 100644 index 000000000000..db8f89169df0 --- /dev/null +++ b/librsvg/librsvg-2.32.1.patch @@ -0,0 +1,26 @@ +--- misc/librsvg-2.32.1/configure 2010-11-13 11:52:19.000000000 +0100 ++++ misc/build/librsvg-2.32.1/configure 2011-03-02 14:06:41.000000000 +0100 +@@ -12288,8 +12288,8 @@ + + + +-GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` +- ++#GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` ++GLIB_MKENUMS=glib-mkenums + + + pkg_failed=no +--- misc/librsvg-2.32.1/librsvg-features.h 2010-11-13 11:52:49.000000000 +0100 ++++ misc/build/librsvg-2.32.1/librsvg-features.h 2011-03-02 14:05:37.000000000 +0100 +@@ -11,8 +11,8 @@ + (LIBRSVG_MAJOR_VERSION == (major) && LIBRSVG_MINOR_VERSION > (minor)) || \ + (LIBRSVG_MAJOR_VERSION == (major) && LIBRSVG_MINOR_VERSION == (minor) && LIBRSVG_MICRO_VERSION >= (micro))) + +-#define LIBRSVG_HAVE_SVGZ (1) +-#define LIBRSVG_HAVE_CSS (1) ++#define LIBRSVG_HAVE_SVGZ (0) ++#define LIBRSVG_HAVE_CSS (0) + + #define LIBRSVG_CHECK_FEATURE(FEATURE) (defined(LIBRSVG_HAVE_##FEATURE) && LIBRSVG_HAVE_##FEATURE) + diff --git a/librsvg/makefile.mk b/librsvg/makefile.mk new file mode 100644 index 000000000000..084d9e2569e4 --- /dev/null +++ b/librsvg/makefile.mk @@ -0,0 +1,86 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ=. + +PRJNAME=librsvg +TARGET=so_librsvg + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +.IF "$(SYSTEM_LIBRSVG)" == "YES" +all: + @echo "An already available installation of librsvg should exist on your system." + @echo "Therefore the version provided here does not need to be built in addition." +.ENDIF + +# --- Files -------------------------------------------------------- + +LIBRSVGVERSION=2.32.1 + +TARFILE_NAME=$(PRJNAME)-$(LIBRSVGVERSION) +TARFILE_MD5=d7a242ca43e33e1b63d3073f9d46a6a8 + +PATCH_FILES=librsvg-2.32.1.patch + +.IF "$(LIBXML_LIBS)" == "" +LIBXML_LIBS=-lxml2 +.ENDIF + +CONFIGURE_LDFLAGS="-L$(SOLARLIBDIR)" +CONFIGURE_DIR= +CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) .$/configure \ + --prefix=$(SRC_ROOT)$/$(PRJNAME)$/$(MISC) +CONFIGURE_FLAGS=--disable-gtk-theme --disable-tools --with-croco --with-svgz \ + LIBRSVG_CFLAGS=-I$(SOLARINCDIR)$/external/glib-2.0 \ + LIBRSVG_LIBS="-lgdk_pixbuf-2.0 -lpango-1.0 -lpangocairo-1.0 -lgthread-2.0 -lgio-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 $(LIBXML_LIBS) -lcairo -lintl" \ + GDK_PIXBUF_CFLAGS=-I$(SOLARINCDIR)$/external/gdk-pixbuf-2.0 \ + GDK_PIXBUF_LIBS=-lgdkpixbuf-2.0 \ + GTHREAD_CFLAGS=-I$(SOLARINCDIR)$/external/glib-2.0 \ + GTHREAD_LIBS=-lgthread-2.0 \ + CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS) -I$(SOLARINCDIR)$/external -I$(SOLARINCDIR)$/external$/glib-2.0 -I$(SOLARINCDIR)$/external/gdk-pixbuf-2.0 -I$(SOLARINCDIR)$/external/pango-1.0 -I$(SOLARINCDIR)$/cairo" \ + LDFLAGS="$(CONFIGURE_LDFLAGS)" + +BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) \ + $(GNUMAKE) +BUILD_DIR=$(CONFIGURE_DIR) + + + +.IF "$(OS)"=="MACOSX" +EXTRPATH=LOADER +.ELIF "$(OS)"=="WNT" +.ENDIF + +# --- Targets ------------------------------------------------------ + +.INCLUDE : set_ext.mk +.INCLUDE : target.mk +.INCLUDE : tg_ext.mk + diff --git a/librsvg/prj/d.lst b/librsvg/prj/d.lst new file mode 100644 index 000000000000..e69de29bb2d1 -- cgit v1.2.3 From 6d7d3e6434439b04e538fa4e5de818d9de65d566 Mon Sep 17 00:00:00 2001 From: ka Date: Thu, 3 Mar 2011 13:51:32 +0100 Subject: rsvglibs: added PNG support for cairo --- cairo/cairo-1.8.0.patch | 4 ++-- cairo/cairo/makefile.mk | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cairo/cairo-1.8.0.patch b/cairo/cairo-1.8.0.patch index 454f234176e0..424c6041562d 100644 --- a/cairo/cairo-1.8.0.patch +++ b/cairo/cairo-1.8.0.patch @@ -25,7 +25,7 @@ diff -ur misc/build/cairo-1.8.0.org/build/Makefile.win32.common misc/build/cairo DEFAULT_CFLAGS += -I. -I$(top_srcdir) DEFAULT_CFLAGS += $(PIXMAN_CFLAGS) +DEFAULT_CFLAGS += $(SOLARINC) -+DEFAULT_CFLAGS += -I$(SOLARVER)/$(INPATH)/inc/zlib -DZLIB_FIX ++DEFAULT_CFLAGS += -I$(SOLARVER)/$(INPATH)/inc/zlib -I$(SOLARVER)/$(INPATH)/inc/external/libpng -DZLIB_FIX CAIRO_CFLAGS = $(DEFAULT_CFLAGS) $(CFLAGS) @@ -46,7 +46,7 @@ diff -ur misc/build/cairo-1.8.0.org/build/Makefile.win32.features misc/build/cai CAIRO_HAS_OS2_SURFACE=0 CAIRO_HAS_BEOS_SURFACE=0 -CAIRO_HAS_PNG_FUNCTIONS=1 -+CAIRO_HAS_PNG_FUNCTIONS=0 ++CAIRO_HAS_PNG_FUNCTIONS=1 CAIRO_HAS_GLITZ_SURFACE=0 CAIRO_HAS_DIRECTFB_SURFACE=0 CAIRO_HAS_FT_FONT=0 diff --git a/cairo/cairo/makefile.mk b/cairo/cairo/makefile.mk index dfe4e643a9d3..834095144d21 100644 --- a/cairo/cairo/makefile.mk +++ b/cairo/cairo/makefile.mk @@ -83,7 +83,7 @@ cairo_LIBS+=$(MINGW_SHARED_LIBSTDCPP) CONFIGURE_DIR= CONFIGURE_ACTION=cp $(SRC_ROOT)$/$(PRJNAME)$/cairo$/dummy_pkg_config . && .$/configure -CONFIGURE_FLAGS=--disable-xlib --disable-ft --disable-pthread --disable-svg --disable-png --enable-gtk-doc=no --enable-test-surfaces=no --enable-static=no --build=i586-pc-mingw32 --host=i586-pc-mingw32 PKG_CONFIG=./dummy_pkg_config CC="$(cairo_CC)" LIBS="$(cairo_LIBS)" ZLIB3RDLIB=$(ZLIB3RDLIB) COMPRESS=$(cairo_COMPRESS) OBJDUMP="$(WRAPCMD) objdump" +CONFIGURE_FLAGS=--disable-xlib --disable-ft --disable-pthread --disable-svg --enable-gtk-doc=no --enable-test-surfaces=no --enable-static=no --build=i586-pc-mingw32 --host=i586-pc-mingw32 PKG_CONFIG=./dummy_pkg_config CC="$(cairo_CC)" LIBS="$(cairo_LIBS)" ZLIB3RDLIB=$(ZLIB3RDLIB) COMPRESS=$(cairo_COMPRESS) OBJDUMP="$(WRAPCMD) objdump" BUILD_ACTION=$(GNUMAKE) BUILD_FLAGS+= -j$(EXTMAXPROCESS) BUILD_DIR=$(CONFIGURE_DIR) @@ -108,7 +108,7 @@ cairo_CPPFLAGS+=$(EXTRA_CFLAGS) $(EXTRA_CDEFS) .ENDIF # "$(SYSBASE)"!="" CONFIGURE_DIR= CONFIGURE_ACTION=cp $(SRC_ROOT)$/$(PRJNAME)$/cairo$/dummy_pkg_config . && .$/configure -CONFIGURE_FLAGS=--enable-static=no --disable-xlib --disable-ft --disable-svg --disable-png --enable-quartz --enable-quartz-font --enable-gtk-doc=no --enable-test-surfaces=no PKG_CONFIG=./dummy_pkg_config ZLIB3RDLIB=$(ZLIB3RDLIB) COMPRESS=$(cairo_COMPRESS) +CONFIGURE_FLAGS=--enable-static=no --disable-xlib --disable-ft --disable-svg --enable-quartz --enable-quartz-font --enable-gtk-doc=no --enable-test-surfaces=no PKG_CONFIG=./dummy_pkg_config ZLIB3RDLIB=$(ZLIB3RDLIB) COMPRESS=$(cairo_COMPRESS) cairo_CPPFLAGS+=$(EXTRA_CDEFS) cairo_LDFLAGS+=$(EXTRA_LINKFLAGS) BUILD_ACTION=$(GNUMAKE) @@ -145,7 +145,7 @@ cairo_CFLAGS+=-march=i486 CONFIGURE_DIR= CONFIGURE_ACTION=.$/configure -CONFIGURE_FLAGS=--enable-xlib --enable-ft --disable-svg --disable-png --enable-gtk-doc=no --enable-test-surfaces=no --enable-static=no ZLIB3RDLIB=$(ZLIB3RDLIB) COMPRESS=$(cairo_COMPRESS) +CONFIGURE_FLAGS=--enable-xlib --enable-ft --disable-svg --enable-gtk-doc=no --enable-test-surfaces=no --enable-static=no ZLIB3RDLIB=$(ZLIB3RDLIB) COMPRESS=$(cairo_COMPRESS) BUILD_ACTION=$(GNUMAKE) BUILD_FLAGS+= -j$(EXTMAXPROCESS) BUILD_DIR=$(CONFIGURE_DIR) -- cgit v1.2.3 From 0cbf3d294fa5e42e78b3af0c561a65d4ccb22cd7 Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Thu, 3 Mar 2011 13:56:23 +0100 Subject: rsvglibs: add fontconfig --- fontconfig/fontconfig-2.8.0.patch | 6762 +++++++++++++++++++++++++++++++++++++ fontconfig/makefile.mk | 74 + fontconfig/prj/build.lst | 3 + fontconfig/prj/d.lst | 3 + 4 files changed, 6842 insertions(+) create mode 100644 fontconfig/fontconfig-2.8.0.patch create mode 100644 fontconfig/makefile.mk create mode 100644 fontconfig/prj/build.lst create mode 100644 fontconfig/prj/d.lst diff --git a/fontconfig/fontconfig-2.8.0.patch b/fontconfig/fontconfig-2.8.0.patch new file mode 100644 index 000000000000..2b3abc9654a6 --- /dev/null +++ b/fontconfig/fontconfig-2.8.0.patch @@ -0,0 +1,6762 @@ +--- misc/fontconfig-2.8.0/fc-cache/fc-cache.c Mon Jan 19 23:26:36 1970 ++++ misc/build/fontconfig-2.8.0/fc-cache/fc-cache.c Mon Jan 19 23:26:36 1970 +@@ -41,7 +41,9 @@ + #include + #include + #include ++#ifndef _WIN32 + #include ++#endif + #include + + #if defined (_WIN32) +@@ -257,6 +257,9 @@ + FcBool remove; + FcCache *cache; + struct stat target_stat; ++#if defined (_WIN32) ++ struct stat aStat; ++#endif + + dir_base = FcStrPlus (dir, (FcChar8 *) "/"); + if (!dir_base) +@@ -264,14 +267,25 @@ + fprintf (stderr, "%s: out of memory\n", dir); + return FcFalse; + } ++#if defined (_WIN32) ++ if (stat ((char *) dir, &aStat) != 0) ++ { ++ if (verbose) ++ printf ("%s: not cleaning %s cache directory\n", dir, ++ access ((char *) dir, F_OK) == 0 ? "unwritable" : "non-existent"); ++ FcStrFree (dir_base); ++ return FcTrue; ++ } ++#else + if (access ((char *) dir, W_OK) != 0) + { +- if (verbose) +- printf ("%s: not cleaning %s cache directory\n", dir, +- access ((char *) dir, F_OK) == 0 ? "unwritable" : "non-existent"); +- FcStrFree (dir_base); +- return FcTrue; ++ if (verbose) ++ printf ("%s: not cleaning %s cache directory\n", dir, ++ access ((char *) dir, F_OK) == 0 ? "unwritable" : "non-existent"); ++ FcStrFree (dir_base); ++ return FcTrue; + } ++#endif + if (verbose) + printf ("%s: cleaning cache directory\n", dir); + d = opendir ((char *) dir); +--- misc/fontconfig-2.8.0/fontconfig/fontconfig.h Mon Jan 19 23:26:36 1970 ++++ misc/build/fontconfig-2.8.0/fontconfig/fontconfig.h Mon Jan 19 23:26:36 1970 +@@ -40,7 +40,7 @@ + #define FcPublic + #endif + +-typedef unsigned char FcChar8; ++typedef char FcChar8; + typedef unsigned short FcChar16; + typedef unsigned int FcChar32; + typedef int FcBool; +--- misc/fontconfig-2.8.0/src/fcatomic.c Mon Jan 19 23:26:36 1970 ++++ misc/build/fontconfig-2.8.0/src/fcatomic.c Mon Jan 19 23:26:36 1970 +@@ -56,7 +56,12 @@ + #include + + #ifdef _WIN32 ++#include ++#include ++#include + #define mkdir(path,mode) _mkdir(path) ++#define rmdir(path) _rmdir(path) ++#define unlink(path) _unlink(path) + #endif + + #define NEW_NAME ".NEW" +--- misc/fontconfig-2.8.0/src/fccache.c Mon Jan 19 23:26:36 1970 ++++ misc/build/fontconfig-2.8.0/src/fccache.c Mon Jan 19 23:26:36 1970 +@@ -22,6 +22,7 @@ + */ + + #include "fcint.h" ++ + #include "../fc-arch/fcarch.h" + #include + #include +@@ -26,7 +26,9 @@ + #include "../fc-arch/fcarch.h" + #include + #include ++#ifndef _WIN32 + #include ++#endif + #include + #include + #include +@@ -34,9 +35,11 @@ + # include + #elif defined(_WIN32) + # define _WIN32_WINNT 0x0500 +-# include + #endif +- ++#include ++#include ++#include ++#include + #ifndef O_BINARY + #define O_BINARY 0 + #endif +@@ -809,6 +812,7 @@ + + + #ifdef _WIN32 ++#include + #define mkdir(path,mode) _mkdir(path) + #endif + +@@ -817,17 +821,28 @@ + { + FcChar8 *parent; + FcBool ret; ++#ifdef _WIN32 ++ struct stat aStat; ++#endif + + if (strlen ((char *) dir) == 0) + return FcFalse; + + parent = FcStrDirname (dir); + if (!parent) +- return FcFalse; ++ return FcFalse; ++#ifdef _WIN32 ++ if (stat ((char *) parent, &aStat) != 0) ++#else + if (access ((char *) parent, F_OK) == 0) +- ret = mkdir ((char *) dir, 0755) == 0 && chmod ((char *) dir, 0755) == 0; ++#endif ++ ret = mkdir ((char *) dir, 0755) == 0 && chmod ((char *) dir, 0755) == 0; ++#ifdef _WIN32 ++ else if (stat ((char *) parent, &aStat) != 0) ++#else + else if (access ((char *) parent, F_OK) == -1) +- ret = FcMakeDirectory (parent) && (mkdir ((char *) dir, 0755) == 0) && chmod ((char *) dir, 0755) == 0; ++#endif ++ ret = FcMakeDirectory (parent) && (mkdir ((char *) dir, 0755) == 0) && chmod ((char *) dir, 0755) == 0; + else + ret = FcFalse; + FcStrFree (parent); +@@ -850,6 +865,9 @@ + struct stat cache_stat; + int magic; + int written; ++#ifdef _WIN32 ++ struct stat aStat; ++#endif + + /* + * Write it to the first directory in the list which is writable +@@ -857,9 +875,13 @@ + + list = FcStrListCreate (config->cacheDirs); + if (!list) +- return FcFalse; ++ return FcFalse; + while ((test_dir = FcStrListNext (list))) { ++#ifdef _WIN32 ++ if (stat ((char *) test_dir, &aStat) != 0) ++#else + if (access ((char *) test_dir, W_OK|X_OK) == 0) ++#endif + { + cache_dir = test_dir; + break; +@@ -869,7 +891,11 @@ + /* + * If the directory doesn't exist, try to create it + */ ++#ifdef _WIN32 ++ if (stat ((char *) test_dir, &aStat) == -1){ ++#else + if (access ((char *) test_dir, F_OK) == -1) { ++#endif + if (FcMakeDirectory (test_dir)) + { + cache_dir = test_dir; +--- misc/fontconfig-2.8.0/src/fccfg.c Mon Jan 19 23:26:36 1970 ++++ misc/build/fontconfig-2.8.0/src/fccfg.c Mon Jan 19 23:26:36 1970 +@@ -23,7 +23,9 @@ + */ + + #include "fcint.h" ++#ifndef _WIN32 + #include ++#endif + #include + + #if defined (_WIN32) && (defined (PIC) || defined (DLL_EXPORT)) +@@ -1646,6 +1646,9 @@ + FcConfigFileExists (const FcChar8 *dir, const FcChar8 *file) + { + FcChar8 *path; ++#ifdef _WIN32 ++ struct stat aStat; ++#endif + + if (!dir) + dir = (FcChar8 *) ""; +@@ -1669,8 +1672,12 @@ + strcat ((char *) path, (char *) file); + + FcMemAlloc (FC_MEM_STRING, strlen ((char *) path) + 1); ++#ifdef _WIN32 ++ if (stat ((char *) path, &aStat) == 0) ++#else + if (access ((char *) path, R_OK) == 0) +- return path; ++#endif ++ return path; + + FcStrFree (path); + return 0; +--- misc/fontconfig-2.8.0/src/fcformat.c Mon Jan 19 23:26:36 1970 ++++ misc/build/fontconfig-2.8.0/src/fcformat.c Mon Jan 19 23:26:36 1970 +@@ -26,7 +26,11 @@ + #include + #include + #include ++#include + ++#ifdef _WIN32 ++#define snprintf(a1,a2,a3,a4) _snprintf(a1,a2,a3,a4) ++#endif + + /* The language is documented in doc/fcformat.fncs + * These are the features implemented: +--- misc/fontconfig-2.8.0/src/fcdir.c 2009-11-16 18:24:52.000000000 +0100 ++++ misc/build/fontconfig-2.8.0/src/fcdir.c 2011-03-03 12:46:39.702582800 +0100 +@@ -23,7 +23,6 @@ + */ + + #include "fcint.h" +-#include + + FcBool + FcFileIsDir (const FcChar8 *file) +@@ -323,6 +322,56 @@ + { + return FcFalse; /* XXX deprecated */ + } ++ ++DIR *opendir( const char* pPfad ) ++{ ++ DIR *pDir = malloc (sizeof (DIR)); ++ if ( pDir ) ++ { ++ FcMemAlloc (FC_MEM_ATTR, sizeof (DIR)); /* size is too expensive */ ++ pDir->p = (char*) pPfad; ++ } ++ return pDir; ++} ++struct dirent *readdir( DIR *pDir ) ++{ ++ int bOk = 0; ++ if ( pDir->p ) ++ { ++ char *pBuf = malloc ((strlen( pDir->p ) + 5 )); ++ FcMemAlloc (FC_MEM_STRING, strlen( pDir->p ) + 5); ++ if ( pBuf ) ++ { ++ // *.* dahinter, ggf mit "\\" abtrennen (falls nicht schon da) ++ strcpy( pBuf, pDir->p ); ++ strcat( pBuf, "\\*.*" + ( *(pBuf + strlen( pBuf ) - 1 ) == '\\' ) ); ++ CharUpperBuff( pBuf, strlen(pBuf) ); ++ pDir->h = FindFirstFile( pBuf, &pDir->aDirEnt ); ++ bOk = pDir->h != INVALID_HANDLE_VALUE; ++ pDir->p = NULL; ++ free (pBuf); ++ } ++ else ++ pDir->h = INVALID_HANDLE_VALUE; ++ } ++ else ++ { ++ bOk = FindNextFile( pDir->h, &pDir->aDirEnt ); ++ } ++ ++ return bOk ? &pDir->aDirEnt : NULL; ++} ++ ++int closedir( DIR *pDir ) ++{ ++ int bOk = 0; ++ if ( pDir ) ++ { ++ bOk = 0 != pDir->p || FindClose( pDir->h ); ++ free (pDir); ++ } ++ return bOk; ++} + #define __fcdir__ + #include "fcaliastail.h" + #undef __fcdir__ +--- misc/fontconfig-2.8.0/src/fcint.h Mon Jan 19 23:26:36 1970 ++++ misc/build/fontconfig-2.8.0/src/fcint.h Mon Jan 19 23:26:36 1970 +@@ -31,6 +31,15 @@ + + #include + #include ++#ifdef _MSC_VER ++ ++typedef __int32 int32_t; ++typedef unsigned __int32 uint32_t; ++typedef __int64 int64_t; ++typedef unsigned __int64 uint64_t; ++typedef __int16 int16_t; ++#define ulink _ulink ++#else + #ifdef HAVE_INTTYPES_H + #include + #elif defined(HAVE_STDINT_H) +@@ -38,6 +47,9 @@ + #else + #error missing C99 integer data types + #endif ++#endif ++ ++ + #include + #include + #include +@@ -62,6 +64,40 @@ + #include + #include "fcdeprecate.h" + ++#ifndef _WIN32 ++#include ++#else ++#include ++#include ++#include ++#include ++#include ++#include ++#ifdef _MSC_VER ++#pragma warning (push,1) ++#endif ++#include ++#ifdef _MSC_VER ++#pragma warning (pop) ++#endif ++# define S_IFDIR _S_IFDIR /* directory */ ++#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) ++#define dirent _WIN32_FIND_DATAA ++#define d_name cFileName ++#define d_type dwFileAttributes ++typedef struct ++{ ++ WIN32_FIND_DATAA aDirEnt; ++ HANDLE h; ++ const char *p; ++} DIR; ++ ++DIR *opendir( const char* pPfad ); ++struct dirent *readdir( DIR *pDir ); ++ ++int closedir( DIR *pDir ); ++#endif ++ + #ifndef FC_CONFIG_PATH + #define FC_CONFIG_PATH "fonts.conf" + #endif +--- misc/fontconfig-2.8.0/src/fcxml.c Mon Jan 19 23:26:36 1970 ++++ misc/build/fontconfig-2.8.0/src/fcxml.c Mon Jan 19 23:26:36 1970 +@@ -27,6 +27,13 @@ + #include ++#ifndef _WIN32 + #include ++#endif + ++#ifdef _WIN32 ++#include ++#define open(path,oflag) _open(path,oflag) ++#endif ++ + #ifdef ENABLE_LIBXML2 + + #include +--- misc/fontconfig-2.8.0/config.h Wed Aug 20 14:33:55 2008 ++++ misc/build/fontconfig-2.8.0/config.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,202 @@ +-dummy ++/* config.h. Generated from config.h.in by configure. */ ++/* config.h.in. Generated from configure.in by autoheader. */ ++ ++/* Font configuration directory */ ++#define CONFDIR "${sysconfdir}/fonts" ++ ++/* Use libxml2 instead of Expat */ ++#define ENABLE_LIBXML2 1 ++ ++/* Additional font directories */ ++#define FC_ADD_FONTS "yes" ++ ++/* System font directory */ ++#define FC_DEFAULT_FONTS "/usr/share/fonts" ++ ++/* Define to 1 if you have the `chsize' function. */ ++#define HAVE_CHSIZE 1 ++ ++/* Define to 1 if you have the header file, and it defines `DIR'. ++ */ ++#define HAVE_DIRENT_H 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_DLFCN_H */ ++ ++/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ ++/* #undef HAVE_DOPRNT */ ++ ++/* Found a useable expat library */ ++/* #undef HAVE_EXPAT */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_FCNTL_H 1 ++ ++/* Define to 1 if you have the `ftruncate' function. */ ++/* #undef HAVE_FTRUNCATE */ ++ ++/* FT_Bitmap_Size structure includes y_ppem field */ ++#define HAVE_FT_BITMAP_SIZE_Y_PPEM 1 ++ ++/* Define to 1 if you have the `FT_Get_BDF_Property' function. */ ++#define HAVE_FT_GET_BDF_PROPERTY 1 ++ ++/* Define to 1 if you have the `FT_Get_Next_Char' function. */ ++#define HAVE_FT_GET_NEXT_CHAR 1 ++ ++/* Define to 1 if you have the `FT_Get_PS_Font_Info' function. */ ++#define HAVE_FT_GET_PS_FONT_INFO 1 ++ ++/* Define to 1 if you have the `FT_Get_X11_Font_Format' function. */ ++#define HAVE_FT_GET_X11_FONT_FORMAT 1 ++ ++/* Define to 1 if you have the `FT_Has_PS_Glyph_Names' function. */ ++#define HAVE_FT_HAS_PS_GLYPH_NAMES 1 ++ ++/* Define to 1 if you have the `FT_Select_Size' function. */ ++#define HAVE_FT_SELECT_SIZE 1 ++ ++/* Define to 1 if you have the `geteuid' function. */ ++/* #undef HAVE_GETEUID */ ++ ++/* Define to 1 if you have the `getopt' function. */ ++/* #undef HAVE_GETOPT */ ++ ++/* Define to 1 if you have the `getopt_long' function. */ ++/* #undef HAVE_GETOPT_LONG */ ++ ++/* Define to 1 if you have the `getpagesize' function. */ ++/* #undef HAVE_GETPAGESIZE */ ++ ++/* Define to 1 if you have the `getuid' function. */ ++/* #undef HAVE_GETUID */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_INTTYPES_H */ ++ ++/* Define to 1 if you have the `link' function. */ ++/* #undef HAVE_LINK */ ++ ++/* Define to 1 if you have the `lrand48' function. */ ++/* #undef HAVE_LRAND48 */ ++ ++/* Define to 1 if you have the `memmove' function. */ ++#define HAVE_MEMMOVE 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_MEMORY_H 1 ++ ++/* Define to 1 if you have the `memset' function. */ ++#define HAVE_MEMSET 1 ++ ++/* Define to 1 if you have the `mkstemp' function. */ ++/* #undef HAVE_MKSTEMP */ ++ ++/* Define to 1 if you have a working `mmap' system call. */ ++/* #undef HAVE_MMAP */ ++ ++/* Define to 1 if you have the header file, and it defines `DIR'. */ ++/* #undef HAVE_NDIR_H */ ++ ++/* Define to 1 if you have the `rand' function. */ ++#define HAVE_RAND 1 ++ ++/* Define to 1 if you have the `random' function. */ ++/* #undef HAVE_RANDOM */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_STDINT_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STDLIB_H 1 ++ ++/* Define to 1 if you have the `strchr' function. */ ++#define HAVE_STRCHR 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_STRINGS_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STRING_H 1 ++ ++/* Define to 1 if you have the `strrchr' function. */ ++#define HAVE_STRRCHR 1 ++ ++/* Define to 1 if you have the `strtol' function. */ ++#define HAVE_STRTOL 1 ++ ++/* Define to 1 if you have the `sysconf' function. */ ++/* #undef HAVE_SYSCONF */ ++ ++/* Define to 1 if you have the header file, and it defines `DIR'. ++ */ ++/* #undef HAVE_SYS_DIR_H */ ++ ++/* Define to 1 if you have the header file, and it defines `DIR'. ++ */ ++/* #undef HAVE_SYS_NDIR_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_STAT_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_TYPES_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_UNISTD_H 1 ++ ++/* Define to 1 if you have the `vprintf' function. */ ++#define HAVE_VPRINTF 1 ++ ++/* Can use #warning in C files */ ++/* #undef HAVE_WARNING_CPP_DIRECTIVE */ ++ ++/* Use xmlparse.h instead of expat.h */ ++/* #undef HAVE_XMLPARSE_H */ ++ ++/* Define to 1 if you have the `XML_SetDoctypeDeclHandler' function. */ ++/* #undef HAVE_XML_SETDOCTYPEDECLHANDLER */ ++ ++/* Define to the sub-directory in which libtool stores uninstalled libraries. ++ */ ++#define LT_OBJDIR ".libs/" ++ ++/* Name of package */ ++#define PACKAGE "fontconfig" ++ ++/* Define to the address where bug reports for this package should be sent. */ ++#define PACKAGE_BUGREPORT "" ++ ++/* Define to the full name of this package. */ ++#define PACKAGE_NAME "" ++ ++/* Define to the full name and version of this package. */ ++#define PACKAGE_STRING "" ++ ++/* Define to the one symbol short name of this package. */ ++#define PACKAGE_TARNAME "" ++ ++/* Define to the version of this package. */ ++#define PACKAGE_VERSION "" ++ ++/* Define to 1 if you have the ANSI C header files. */ ++#define STDC_HEADERS 1 ++ ++/* Use iconv. */ ++#define USE_ICONV 0 ++ ++/* Version number of package */ ++#define VERSION "2.8.0" ++ ++/* Define to empty if `const' does not conform to ANSI C. */ ++/* #undef const */ ++ ++/* Define to `__inline__' or `__inline' if that's what the C compiler ++ calls it, or to nothing if 'inline' is not supported under any name. */ ++#ifndef __cplusplus ++#define inline __inline ++#endif ++ ++/* Define to `int' if does not define. */ ++#define pid_t int ++ +--- misc/fontconfig-2.8.0/fc-arch/fcalias.h Wed Aug 20 14:33:55 2008 ++++ misc/build/fontconfig-2.8.0/fc-arch/fcalias.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,1 @@ +-dummy ++ +--- misc/fontconfig-2.8.0/fc-arch/fcaliastail.h Wed Aug 20 14:33:55 2008 ++++ misc/build/fontconfig-2.8.0/fc-arch/fcaliastail.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,1 @@ +-dummy ++ +--- misc/fontconfig-2.8.0/fc-arch/fcarch.h Wed Aug 20 14:33:55 2008 ++++ misc/build/fontconfig-2.8.0/fc-arch/fcarch.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,24 @@ +-dummy ++/* ++ * Copyright © 2006 Keith Packard ++ * ++ * Permission to use, copy, modify, distribute, and sell this software and its ++ * documentation for any purpose is hereby granted without fee, provided that ++ * the above copyright notice appear in all copies and that both that ++ * copyright notice and this permission notice appear in supporting ++ * documentation, and that the name of Keith Packard not be used in ++ * advertising or publicity pertaining to distribution of the software without ++ * specific, written prior permission. Keith Packard makes no ++ * representations about the suitability of this software for any purpose. It ++ * is provided "as is" without express or implied warranty. ++ * ++ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, ++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO ++ * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR ++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, ++ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ++ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ++ * PERFORMANCE OF THIS SOFTWARE. ++ */ ++ ++#define FC_ARCHITECTURE "le32d8" ++ +--- misc/fontconfig-2.8.0/fc-glyphname$/fcglyphname.h Wed Aug 20 14:33:55 2008 ++++ misc/build/fontconfig-2.8.0/fc-glyphname/fcglyphname.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,782 @@ +-dummy ++/* ++ * fontconfig/fc-glyphname/fcglyphname.tmpl.h ++ * ++ * Copyright © 2003 Keith Packard ++ * ++ * Permission to use, copy, modify, distribute, and sell this software and its ++ * documentation for any purpose is hereby granted without fee, provided that ++ * the above copyright notice appear in all copies and that both that ++ * copyright notice and this permission notice appear in supporting ++ * documentation, and that the name of Keith Packard not be used in ++ * advertising or publicity pertaining to distribution of the software without ++ * specific, written prior permission. Keith Packard makes no ++ * representations about the suitability of this software for any purpose. It ++ * is provided "as is" without express or implied warranty. ++ * ++ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, ++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO ++ * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR ++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, ++ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ++ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ++ * PERFORMANCE OF THIS SOFTWARE. ++ */ ++ ++/* 201 glyphnames in 271 entries, 74% occupancy */ ++ ++#define FC_GLYPHNAME_HASH 271 ++#define FC_GLYPHNAME_REHASH 269 ++#define FC_GLYPHNAME_MAXLEN 4 ++ ++typedef int16_t FcGlyphId; ++ ++static const struct { const FcChar32 ucs; const FcChar8 name[5]; } _fc_glyph_names[201] = { ++ { 0x2701, "a1" }, ++ { 0x2721, "a10" }, ++ { 0x275e, "a100" }, ++ { 0x2761, "a101" }, ++ { 0x2762, "a102" }, ++ { 0x2763, "a103" }, ++ { 0x2764, "a104" }, ++ { 0x2710, "a105" }, ++ { 0x2765, "a106" }, ++ { 0x2766, "a107" }, ++ { 0x2767, "a108" }, ++ { 0x2660, "a109" }, ++ { 0x261b, "a11" }, ++ { 0x2665, "a110" }, ++ { 0x2666, "a111" }, ++ { 0x2663, "a112" }, ++ { 0x2709, "a117" }, ++ { 0x2708, "a118" }, ++ { 0x2707, "a119" }, ++ { 0x261e, "a12" }, ++ { 0x2460, "a120" }, ++ { 0x2461, "a121" }, ++ { 0x2462, "a122" }, ++ { 0x2463, "a123" }, ++ { 0x2464, "a124" }, ++ { 0x2465, "a125" }, ++ { 0x2466, "a126" }, ++ { 0x2467, "a127" }, ++ { 0x2468, "a128" }, ++ { 0x2469, "a129" }, ++ { 0x270c, "a13" }, ++ { 0x2776, "a130" }, ++ { 0x2777, "a131" }, ++ { 0x2778, "a132" }, ++ { 0x2779, "a133" }, ++ { 0x277a, "a134" }, ++ { 0x277b, "a135" }, ++ { 0x277c, "a136" }, ++ { 0x277d, "a137" }, ++ { 0x277e, "a138" }, ++ { 0x277f, "a139" }, ++ { 0x270d, "a14" }, ++ { 0x2780, "a140" }, ++ { 0x2781, "a141" }, ++ { 0x2782, "a142" }, ++ { 0x2783, "a143" }, ++ { 0x2784, "a144" }, ++ { 0x2785, "a145" }, ++ { 0x2786, "a146" }, ++ { 0x2787, "a147" }, ++ { 0x2788, "a148" }, ++ { 0x2789, "a149" }, ++ { 0x270e, "a15" }, ++ { 0x278a, "a150" }, ++ { 0x278b, "a151" }, ++ { 0x278c, "a152" }, ++ { 0x278d, "a153" }, ++ { 0x278e, "a154" }, ++ { 0x278f, "a155" }, ++ { 0x2790, "a156" }, ++ { 0x2791, "a157" }, ++ { 0x2792, "a158" }, ++ { 0x2793, "a159" }, ++ { 0x270f, "a16" }, ++ { 0x2794, "a160" }, ++ { 0x2192, "a161" }, ++ { 0x27a3, "a162" }, ++ { 0x2194, "a163" }, ++ { 0x2195, "a164" }, ++ { 0x2799, "a165" }, ++ { 0x279b, "a166" }, ++ { 0x279c, "a167" }, ++ { 0x279d, "a168" }, ++ { 0x279e, "a169" }, ++ { 0x2711, "a17" }, ++ { 0x279f, "a170" }, ++ { 0x27a0, "a171" }, ++ { 0x27a1, "a172" }, ++ { 0x27a2, "a173" }, ++ { 0x27a4, "a174" }, ++ { 0x27a5, "a175" }, ++ { 0x27a6, "a176" }, ++ { 0x27a7, "a177" }, ++ { 0x27a8, "a178" }, ++ { 0x27a9, "a179" }, ++ { 0x2712, "a18" }, ++ { 0x27ab, "a180" }, ++ { 0x27ad, "a181" }, ++ { 0x27af, "a182" }, ++ { 0x27b2, "a183" }, ++ { 0x27b3, "a184" }, ++ { 0x27b5, "a185" }, ++ { 0x27b8, "a186" }, ++ { 0x27ba, "a187" }, ++ { 0x27bb, "a188" }, ++ { 0x27bc, "a189" }, ++ { 0x2713, "a19" }, ++ { 0x27bd, "a190" }, ++ { 0x27be, "a191" }, ++ { 0x279a, "a192" }, ++ { 0x27aa, "a193" }, ++ { 0x27b6, "a194" }, ++ { 0x27b9, "a195" }, ++ { 0x2798, "a196" }, ++ { 0x27b4, "a197" }, ++ { 0x27b7, "a198" }, ++ { 0x27ac, "a199" }, ++ { 0x2702, "a2" }, ++ { 0x2714, "a20" }, ++ { 0x27ae, "a200" }, ++ { 0x27b1, "a201" }, ++ { 0x2703, "a202" }, ++ { 0x2750, "a203" }, ++ { 0x2752, "a204" }, ++ { 0x276e, "a205" }, ++ { 0x2770, "a206" }, ++ { 0x2715, "a21" }, ++ { 0x2716, "a22" }, ++ { 0x2717, "a23" }, ++ { 0x2718, "a24" }, ++ { 0x2719, "a25" }, ++ { 0x271a, "a26" }, ++ { 0x271b, "a27" }, ++ { 0x271c, "a28" }, ++ { 0x2722, "a29" }, ++ { 0x2704, "a3" }, ++ { 0x2723, "a30" }, ++ { 0x2724, "a31" }, ++ { 0x2725, "a32" }, ++ { 0x2726, "a33" }, ++ { 0x2727, "a34" }, ++ { 0x2605, "a35" }, ++ { 0x2729, "a36" }, ++ { 0x272a, "a37" }, ++ { 0x272b, "a38" }, ++ { 0x272c, "a39" }, ++ { 0x260e, "a4" }, ++ { 0x272d, "a40" }, ++ { 0x272e, "a41" }, ++ { 0x272f, "a42" }, ++ { 0x2730, "a43" }, ++ { 0x2731, "a44" }, ++ { 0x2732, "a45" }, ++ { 0x2733, "a46" }, ++ { 0x2734, "a47" }, ++ { 0x2735, "a48" }, ++ { 0x2736, "a49" }, ++ { 0x2706, "a5" }, ++ { 0x2737, "a50" }, ++ { 0x2738, "a51" }, ++ { 0x2739, "a52" }, ++ { 0x273a, "a53" }, ++ { 0x273b, "a54" }, ++ { 0x273c, "a55" }, ++ { 0x273d, "a56" }, ++ { 0x273e, "a57" }, ++ { 0x273f, "a58" }, ++ { 0x2740, "a59" }, ++ { 0x271d, "a6" }, ++ { 0x2741, "a60" }, ++ { 0x2742, "a61" }, ++ { 0x2743, "a62" }, ++ { 0x2744, "a63" }, ++ { 0x2745, "a64" }, ++ { 0x2746, "a65" }, ++ { 0x2747, "a66" }, ++ { 0x2748, "a67" }, ++ { 0x2749, "a68" }, ++ { 0x274a, "a69" }, ++ { 0x271e, "a7" }, ++ { 0x274b, "a70" }, ++ { 0x25cf, "a71" }, ++ { 0x274d, "a72" }, ++ { 0x25a0, "a73" }, ++ { 0x274f, "a74" }, ++ { 0x2751, "a75" }, ++ { 0x25b2, "a76" }, ++ { 0x25bc, "a77" }, ++ { 0x25c6, "a78" }, ++ { 0x2756, "a79" }, ++ { 0x271f, "a8" }, ++ { 0x25d7, "a81" }, ++ { 0x2758, "a82" }, ++ { 0x2759, "a83" }, ++ { 0x275a, "a84" }, ++ { 0x276f, "a85" }, ++ { 0x2771, "a86" }, ++ { 0x2772, "a87" }, ++ { 0x2773, "a88" }, ++ { 0x2768, "a89" }, ++ { 0x2720, "a9" }, ++ { 0x2769, "a90" }, ++ { 0x276c, "a91" }, ++ { 0x276d, "a92" }, ++ { 0x276a, "a93" }, ++ { 0x276b, "a94" }, ++ { 0x2774, "a95" }, ++ { 0x2775, "a96" }, ++ { 0x275b, "a97" }, ++ { 0x275c, "a98" }, ++ { 0x275d, "a99" }, ++}; ++static const FcGlyphId _fc_name_to_ucs[271] = { ++ 123, ++ 81, ++ 198, ++ 154, ++ 142, ++ 186, ++ 82, ++ -1, ++ 143, ++ 172, ++ 181, ++ 79, ++ 153, ++ 191, ++ -1, ++ -1, ++ 80, ++ 195, ++ 179, ++ 170, ++ 151, ++ 129, ++ 101, ++ 194, ++ 85, ++ 102, ++ 73, ++ 171, ++ 99, ++ -1, ++ -1, ++ 100, ++ 196, ++ -1, ++ 189, ++ 163, ++ 110, ++ 199, ++ -1, ++ -1, ++ 59, ++ 50, ++ -1, ++ 60, ++ 75, ++ -1, ++ 51, ++ -1, ++ -1, ++ 58, ++ -1, ++ 61, ++ 55, ++ -1, ++ 192, ++ 56, ++ 62, ++ -1, ++ 53, ++ 166, ++ 113, ++ 54, ++ -1, ++ 157, ++ 33, ++ 188, ++ 177, ++ 21, ++ -1, ++ -1, ++ 31, ++ -1, ++ -1, ++ 32, ++ -1, ++ -1, ++ 24, ++ 160, ++ -1, ++ 38, ++ -1, ++ -1, ++ 26, ++ -1, ++ 161, ++ 27, ++ 197, ++ 94, ++ 95, ++ 105, ++ 106, ++ 90, ++ 91, ++ 92, ++ 93, ++ 86, ++ 87, ++ 88, ++ 89, ++ 28, ++ 29, ++ 39, ++ 40, ++ 10, ++ 11, ++ 17, ++ 18, ++ 6, ++ 7, ++ 8, ++ 9, ++ 2, ++ 3, ++ 4, ++ 5, ++ -1, ++ -1, ++ 114, ++ 108, ++ 146, ++ 74, ++ -1, ++ 117, ++ 115, ++ 118, ++ 156, ++ 119, ++ -1, ++ 120, ++ -1, ++ 121, ++ 131, ++ 122, ++ -1, ++ 109, ++ -1, ++ 124, ++ 141, ++ 134, ++ 174, ++ 144, ++ -1, ++ 137, ++ 155, ++ 138, ++ -1, ++ 64, ++ -1, ++ 140, ++ 152, ++ 65, ++ -1, ++ 111, ++ -1, ++ 57, ++ 162, ++ -1, ++ -1, ++ 67, ++ -1, ++ -1, ++ 150, ++ 68, ++ -1, ++ 167, ++ -1, ++ 69, ++ 164, ++ -1, ++ 116, ++ 70, ++ -1, ++ -1, ++ 148, ++ 71, ++ -1, ++ -1, ++ 184, ++ 72, ++ 149, ++ 176, ++ 193, ++ 34, ++ 182, ++ 145, ++ -1, ++ 83, ++ 187, ++ -1, ++ 103, ++ 84, ++ 104, ++ 200, ++ 63, ++ 37, ++ 41, ++ 52, ++ 19, ++ 30, ++ 1, ++ 12, ++ 97, ++ 35, ++ 98, ++ 135, ++ 46, ++ 36, ++ 47, ++ 96, ++ 48, ++ 159, ++ 49, ++ -1, ++ 42, ++ 112, ++ 43, ++ 173, ++ 44, ++ 168, ++ 45, ++ -1, ++ 20, ++ 183, ++ 16, ++ 147, ++ 22, ++ 178, ++ 23, ++ -1, ++ 15, ++ -1, ++ 25, ++ 190, ++ 13, ++ 139, ++ 14, ++ -1, ++ -1, ++ -1, ++ 128, ++ 107, ++ 125, ++ -1, ++ 0, ++ 158, ++ 169, ++ 136, ++ 126, ++ -1, ++ -1, ++ 180, ++ 127, ++ 77, ++ -1, ++ -1, ++ 132, ++ -1, ++ 78, ++ -1, ++ 133, ++ -1, ++ 165, ++ 66, ++ 130, ++ -1, ++ -1, ++ -1, ++ 76, ++ -1, ++ 185, ++ 175, ++}; ++static const FcGlyphId _fc_ucs_to_name[271] = { ++ 56, ++ 135, ++ 19, ++ 138, ++ 58, ++ 140, ++ 59, ++ 142, ++ 60, ++ 144, ++ 61, ++ 146, ++ 62, ++ 149, ++ 64, ++ 151, ++ 152, ++ 153, ++ 154, ++ 155, ++ 156, ++ 157, ++ 159, ++ 160, ++ 161, ++ 162, ++ 163, ++ 131, ++ 165, ++ 166, ++ 167, ++ 168, ++ 170, ++ -1, ++ 172, ++ -1, ++ 174, ++ 112, ++ 175, ++ 113, ++ -1, ++ 173, ++ -1, ++ 179, ++ -1, ++ 182, ++ 183, ++ 158, ++ 198, ++ 199, ++ 200, ++ 2, ++ -1, ++ -1, ++ 3, ++ 4, ++ 5, ++ 6, ++ 8, ++ 9, ++ 10, ++ 189, ++ 164, ++ 194, ++ 195, ++ 192, ++ 193, ++ 114, ++ 11, ++ 115, ++ 186, ++ 15, ++ 188, ++ 13, ++ 14, ++ 31, ++ 32, ++ 33, ++ 34, ++ 35, ++ 36, ++ 37, ++ 38, ++ 39, ++ 40, ++ 42, ++ 43, ++ 44, ++ 45, ++ 46, ++ 47, ++ 48, ++ 49, ++ 50, ++ 51, ++ 53, ++ 54, ++ 55, ++ 20, ++ 21, ++ 22, ++ 23, ++ 24, ++ 25, ++ 26, ++ 27, ++ 28, ++ 29, ++ -1, ++ 103, ++ 69, ++ 99, ++ 70, ++ 71, ++ 72, ++ 73, ++ 75, ++ 76, ++ 77, ++ 78, ++ 66, ++ 79, ++ 80, ++ 81, ++ 82, ++ 83, ++ 84, ++ 100, ++ 86, ++ 106, ++ 87, ++ 109, ++ 88, ++ -1, ++ 110, ++ 89, ++ 90, ++ 104, ++ 91, ++ 101, ++ 105, ++ 92, ++ 102, ++ 93, ++ 94, ++ 95, ++ 97, ++ 98, ++ 196, ++ -1, ++ 134, ++ -1, ++ -1, ++ -1, ++ -1, ++ -1, ++ 137, ++ -1, ++ -1, ++ -1, ++ -1, ++ -1, ++ 139, ++ -1, ++ -1, ++ 176, ++ -1, ++ -1, ++ 141, ++ 184, ++ -1, ++ -1, ++ -1, ++ -1, ++ 143, ++ 177, ++ 57, ++ -1, ++ -1, ++ -1, ++ 145, ++ -1, ++ -1, ++ -1, ++ -1, ++ 178, ++ 148, ++ -1, ++ -1, ++ -1, ++ -1, ++ -1, ++ 150, ++ 65, ++ 171, ++ 67, ++ 68, ++ -1, ++ -1, ++ 191, ++ -1, ++ -1, ++ 181, ++ -1, ++ -1, ++ -1, ++ -1, ++ -1, ++ -1, ++ -1, ++ -1, ++ 185, ++ -1, ++ -1, ++ -1, ++ -1, ++ -1, ++ 187, ++ -1, ++ -1, ++ -1, ++ 133, ++ -1, ++ 197, ++ -1, ++ -1, ++ -1, ++ -1, ++ -1, ++ 0, ++ 107, ++ 111, ++ 125, ++ -1, ++ 147, ++ 18, ++ 17, ++ 16, ++ -1, ++ -1, ++ 30, ++ 41, ++ 52, ++ 63, ++ 7, ++ 74, ++ 85, ++ 96, ++ 108, ++ 116, ++ 117, ++ 118, ++ 119, ++ 120, ++ 121, ++ 122, ++ 123, ++ 136, ++ 169, ++ 180, ++ 190, ++ 1, ++ 124, ++ 126, ++ 127, ++ 128, ++ 129, ++ 130, ++ -1, ++ 132, ++ 12, ++}; ++ +--- misc/fontconfig-2.8.0/fc-lang/fclang.h Wed Aug 20 14:33:55 2008 ++++ misc/build/fontconfig-2.8.0/fc-lang/fclang.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,4086 @@ +-dummy ++/* ++ * fontconfig/fc-lang/fclang.tmpl.h ++ * ++ * Copyright © 2002 Keith Packard ++ * ++ * Permission to use, copy, modify, distribute, and sell this software and its ++ * documentation for any purpose is hereby granted without fee, provided that ++ * the above copyright notice appear in all copies and that both that ++ * copyright notice and this permission notice appear in supporting ++ * documentation, and that the name of Keith Packard not be used in ++ * advertising or publicity pertaining to distribution of the software without ++ * specific, written prior permission. Keith Packard makes no ++ * representations about the suitability of this software for any purpose. It ++ * is provided "as is" without express or implied warranty. ++ * ++ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, ++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO ++ * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR ++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, ++ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ++ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ++ * PERFORMANCE OF THIS SOFTWARE. ++ */ ++ ++/* total size: 903 unique leaves: 608 */ ++ ++#define LEAF0 (238 * sizeof (FcLangCharSet)) ++#define OFF0 (LEAF0 + 608 * sizeof (FcCharLeaf)) ++#define NUM0 (OFF0 + 657 * sizeof (intptr_t)) ++#define SET(n) (n * sizeof (FcLangCharSet) + offsetof (FcLangCharSet, charset)) ++#define OFF(s,o) (OFF0 + o * sizeof (intptr_t) - SET(s)) ++#define NUM(s,n) (NUM0 + n * sizeof (FcChar16) - SET(s)) ++#define LEAF(o,l) (LEAF0 + l * sizeof (FcCharLeaf) - (OFF0 + o * sizeof (intptr_t))) ++#define fcLangCharSets (fcLangData.langCharSets) ++#define fcLangCharSetIndices (fcLangData.langIndices) ++#define fcLangCharSetIndicesInv (fcLangData.langIndicesInv) ++ ++static const struct { ++ FcLangCharSet langCharSets[238]; ++ FcCharLeaf leaves[608]; ++ intptr_t leaf_offsets[657]; ++ FcChar16 numbers[657]; ++ FcChar8 langIndices[238]; ++ FcChar8 langIndicesInv[238]; ++} fcLangData = { ++{ ++ { "aa", { FC_REF_CONSTANT, 1, OFF(0,0), NUM(0,0) } }, /* 0 */ ++ { "ab", { FC_REF_CONSTANT, 1, OFF(1,1), NUM(1,1) } }, /* 1 */ ++ { "af", { FC_REF_CONSTANT, 2, OFF(2,2), NUM(2,2) } }, /* 2 */ ++ { "ak", { FC_REF_CONSTANT, 5, OFF(3,4), NUM(3,4) } }, /* 3 */ ++ { "am", { FC_REF_CONSTANT, 2, OFF(4,9), NUM(4,9) } }, /* 4 */ ++ { "an", { FC_REF_CONSTANT, 1, OFF(5,11), NUM(5,11) } }, /* 5 */ ++ { "ar", { FC_REF_CONSTANT, 1, OFF(6,12), NUM(6,12) } }, /* 6 */ ++ { "as", { FC_REF_CONSTANT, 1, OFF(7,13), NUM(7,13) } }, /* 7 */ ++ { "ast", { FC_REF_CONSTANT, 1, OFF(8,11), NUM(8,11) } }, /* 8 */ ++ { "av", { FC_REF_CONSTANT, 1, OFF(9,14), NUM(9,14) } }, /* 9 */ ++ { "ay", { FC_REF_CONSTANT, 1, OFF(10,15), NUM(10,15) } }, /* 10 */ ++ { "az-az", { FC_REF_CONSTANT, 3, OFF(11,16), NUM(11,16) } }, /* 11 */ ++ { "az-ir", { FC_REF_CONSTANT, 1, OFF(12,19), NUM(12,19) } }, /* 12 */ ++ { "ba", { FC_REF_CONSTANT, 1, OFF(13,20), NUM(13,20) } }, /* 13 */ ++ { "be", { FC_REF_CONSTANT, 1, OFF(14,21), NUM(14,21) } }, /* 14 */ ++ { "ber-dz", { FC_REF_CONSTANT, 4, OFF(15,22), NUM(15,22) } }, /* 15 */ ++ { "ber-ma", { FC_REF_CONSTANT, 1, OFF(16,26), NUM(16,26) } }, /* 16 */ ++ { "bg", { FC_REF_CONSTANT, 1, OFF(17,27), NUM(17,27) } }, /* 17 */ ++ { "bh", { FC_REF_CONSTANT, 1, OFF(18,28), NUM(18,28) } }, /* 18 */ ++ { "bho", { FC_REF_CONSTANT, 1, OFF(19,28), NUM(19,28) } }, /* 19 */ ++ { "bi", { FC_REF_CONSTANT, 1, OFF(20,29), NUM(20,29) } }, /* 20 */ ++ { "bin", { FC_REF_CONSTANT, 3, OFF(21,30), NUM(21,30) } }, /* 21 */ ++ { "bm", { FC_REF_CONSTANT, 3, OFF(22,33), NUM(22,33) } }, /* 22 */ ++ { "bn", { FC_REF_CONSTANT, 1, OFF(23,36), NUM(23,36) } }, /* 23 */ ++ { "bo", { FC_REF_CONSTANT, 1, OFF(24,37), NUM(24,37) } }, /* 24 */ ++ { "br", { FC_REF_CONSTANT, 1, OFF(25,38), NUM(25,38) } }, /* 25 */ ++ { "bs", { FC_REF_CONSTANT, 2, OFF(26,39), NUM(26,39) } }, /* 26 */ ++ { "bua", { FC_REF_CONSTANT, 1, OFF(27,41), NUM(27,41) } }, /* 27 */ ++ { "byn", { FC_REF_CONSTANT, 2, OFF(28,42), NUM(28,42) } }, /* 28 */ ++ { "ca", { FC_REF_CONSTANT, 2, OFF(29,44), NUM(29,44) } }, /* 29 */ ++ { "ce", { FC_REF_CONSTANT, 1, OFF(30,14), NUM(30,14) } }, /* 30 */ ++ { "ch", { FC_REF_CONSTANT, 1, OFF(31,46), NUM(31,46) } }, /* 31 */ ++ { "chm", { FC_REF_CONSTANT, 1, OFF(32,47), NUM(32,47) } }, /* 32 */ ++ { "chr", { FC_REF_CONSTANT, 1, OFF(33,48), NUM(33,48) } }, /* 33 */ ++ { "co", { FC_REF_CONSTANT, 2, OFF(34,49), NUM(34,49) } }, /* 34 */ ++ { "crh", { FC_REF_CONSTANT, 2, OFF(35,51), NUM(35,51) } }, /* 35 */ ++ { "cs", { FC_REF_CONSTANT, 2, OFF(36,53), NUM(36,53) } }, /* 36 */ ++ { "csb", { FC_REF_CONSTANT, 2, OFF(37,55), NUM(37,55) } }, /* 37 */ ++ { "cu", { FC_REF_CONSTANT, 1, OFF(38,57), NUM(38,57) } }, /* 38 */ ++ { "cv", { FC_REF_CONSTANT, 2, OFF(39,58), NUM(39,58) } }, /* 39 */ ++ { "cy", { FC_REF_CONSTANT, 3, OFF(40,60), NUM(40,60) } }, /* 40 */ ++ { "da", { FC_REF_CONSTANT, 1, OFF(41,63), NUM(41,63) } }, /* 41 */ ++ { "de", { FC_REF_CONSTANT, 1, OFF(42,64), NUM(42,64) } }, /* 42 */ ++ { "dv", { FC_REF_CONSTANT, 1, OFF(43,65), NUM(43,65) } }, /* 43 */ ++ { "dz", { FC_REF_CONSTANT, 1, OFF(44,37), NUM(44,37) } }, /* 44 */ ++ { "ee", { FC_REF_CONSTANT, 4, OFF(45,66), NUM(45,66) } }, /* 45 */ ++ { "el", { FC_REF_CONSTANT, 1, OFF(46,70), NUM(46,70) } }, /* 46 */ ++ { "en", { FC_REF_CONSTANT, 1, OFF(47,71), NUM(47,71) } }, /* 47 */ ++ { "eo", { FC_REF_CONSTANT, 2, OFF(48,72), NUM(48,72) } }, /* 48 */ ++ { "es", { FC_REF_CONSTANT, 1, OFF(49,11), NUM(49,11) } }, /* 49 */ ++ { "et", { FC_REF_CONSTANT, 2, OFF(50,74), NUM(50,74) } }, /* 50 */ ++ { "eu", { FC_REF_CONSTANT, 1, OFF(51,76), NUM(51,76) } }, /* 51 */ ++ { "fa", { FC_REF_CONSTANT, 1, OFF(52,19), NUM(52,19) } }, /* 52 */ ++ { "fat", { FC_REF_CONSTANT, 5, OFF(53,4), NUM(53,4) } }, /* 53 */ ++ { "ff", { FC_REF_CONSTANT, 3, OFF(54,77), NUM(54,77) } }, /* 54 */ ++ { "fi", { FC_REF_CONSTANT, 2, OFF(55,80), NUM(55,80) } }, /* 55 */ ++ { "fil", { FC_REF_CONSTANT, 1, OFF(56,82), NUM(56,82) } }, /* 56 */ ++ { "fj", { FC_REF_CONSTANT, 1, OFF(57,83), NUM(57,83) } }, /* 57 */ ++ { "fo", { FC_REF_CONSTANT, 1, OFF(58,84), NUM(58,84) } }, /* 58 */ ++ { "fr", { FC_REF_CONSTANT, 2, OFF(59,49), NUM(59,49) } }, /* 59 */ ++ { "fur", { FC_REF_CONSTANT, 1, OFF(60,85), NUM(60,85) } }, /* 60 */ ++ { "fy", { FC_REF_CONSTANT, 1, OFF(61,86), NUM(61,86) } }, /* 61 */ ++ { "ga", { FC_REF_CONSTANT, 3, OFF(62,87), NUM(62,87) } }, /* 62 */ ++ { "gd", { FC_REF_CONSTANT, 1, OFF(63,90), NUM(63,90) } }, /* 63 */ ++ { "gez", { FC_REF_CONSTANT, 2, OFF(64,91), NUM(64,91) } }, /* 64 */ ++ { "gl", { FC_REF_CONSTANT, 1, OFF(65,11), NUM(65,11) } }, /* 65 */ ++ { "gn", { FC_REF_CONSTANT, 3, OFF(66,93), NUM(66,93) } }, /* 66 */ ++ { "gu", { FC_REF_CONSTANT, 1, OFF(67,96), NUM(67,96) } }, /* 67 */ ++ { "gv", { FC_REF_CONSTANT, 1, OFF(68,97), NUM(68,97) } }, /* 68 */ ++ { "ha", { FC_REF_CONSTANT, 3, OFF(69,98), NUM(69,98) } }, /* 69 */ ++ { "haw", { FC_REF_CONSTANT, 3, OFF(70,101), NUM(70,101) } }, /* 70 */ ++ { "he", { FC_REF_CONSTANT, 1, OFF(71,104), NUM(71,104) } }, /* 71 */ ++ { "hi", { FC_REF_CONSTANT, 1, OFF(72,28), NUM(72,28) } }, /* 72 */ ++ { "hne", { FC_REF_CONSTANT, 1, OFF(73,28), NUM(73,28) } }, /* 73 */ ++ { "ho", { FC_REF_CONSTANT, 1, OFF(74,83), NUM(74,83) } }, /* 74 */ ++ { "hr", { FC_REF_CONSTANT, 2, OFF(75,39), NUM(75,39) } }, /* 75 */ ++ { "hsb", { FC_REF_CONSTANT, 2, OFF(76,105), NUM(76,105) } }, /* 76 */ ++ { "ht", { FC_REF_CONSTANT, 1, OFF(77,107), NUM(77,107) } }, /* 77 */ ++ { "hu", { FC_REF_CONSTANT, 2, OFF(78,108), NUM(78,108) } }, /* 78 */ ++ { "hy", { FC_REF_CONSTANT, 1, OFF(79,110), NUM(79,110) } }, /* 79 */ ++ { "hz", { FC_REF_CONSTANT, 3, OFF(80,111), NUM(80,111) } }, /* 80 */ ++ { "ia", { FC_REF_CONSTANT, 1, OFF(81,83), NUM(81,83) } }, /* 81 */ ++ { "id", { FC_REF_CONSTANT, 1, OFF(82,114), NUM(82,114) } }, /* 82 */ ++ { "ie", { FC_REF_CONSTANT, 1, OFF(83,83), NUM(83,83) } }, /* 83 */ ++ { "ig", { FC_REF_CONSTANT, 2, OFF(84,115), NUM(84,115) } }, /* 84 */ ++ { "ii", { FC_REF_CONSTANT, 5, OFF(85,117), NUM(85,117) } }, /* 85 */ ++ { "ik", { FC_REF_CONSTANT, 1, OFF(86,122), NUM(86,122) } }, /* 86 */ ++ { "io", { FC_REF_CONSTANT, 1, OFF(87,83), NUM(87,83) } }, /* 87 */ ++ { "is", { FC_REF_CONSTANT, 1, OFF(88,123), NUM(88,123) } }, /* 88 */ ++ { "it", { FC_REF_CONSTANT, 1, OFF(89,124), NUM(89,124) } }, /* 89 */ ++ { "iu", { FC_REF_CONSTANT, 3, OFF(90,125), NUM(90,125) } }, /* 90 */ ++ { "ja", { FC_REF_CONSTANT, 83, OFF(91,128), NUM(91,128) } }, /* 91 */ ++ { "jv", { FC_REF_CONSTANT, 1, OFF(92,211), NUM(92,211) } }, /* 92 */ ++ { "ka", { FC_REF_CONSTANT, 1, OFF(93,212), NUM(93,212) } }, /* 93 */ ++ { "kaa", { FC_REF_CONSTANT, 1, OFF(94,213), NUM(94,213) } }, /* 94 */ ++ { "kab", { FC_REF_CONSTANT, 4, OFF(95,22), NUM(95,22) } }, /* 95 */ ++ { "ki", { FC_REF_CONSTANT, 2, OFF(96,214), NUM(96,214) } }, /* 96 */ ++ { "kj", { FC_REF_CONSTANT, 1, OFF(97,83), NUM(97,83) } }, /* 97 */ ++ { "kk", { FC_REF_CONSTANT, 1, OFF(98,216), NUM(98,216) } }, /* 98 */ ++ { "kl", { FC_REF_CONSTANT, 2, OFF(99,217), NUM(99,217) } }, /* 99 */ ++ { "km", { FC_REF_CONSTANT, 1, OFF(100,219), NUM(100,219) } }, /* 100 */ ++ { "kn", { FC_REF_CONSTANT, 1, OFF(101,220), NUM(101,220) } }, /* 101 */ ++ { "ko", { FC_REF_CONSTANT, 45, OFF(102,221), NUM(102,221) } }, /* 102 */ ++ { "kok", { FC_REF_CONSTANT, 1, OFF(103,28), NUM(103,28) } }, /* 103 */ ++ { "kr", { FC_REF_CONSTANT, 3, OFF(104,266), NUM(104,266) } }, /* 104 */ ++ { "ks", { FC_REF_CONSTANT, 1, OFF(105,269), NUM(105,269) } }, /* 105 */ ++ { "ku-am", { FC_REF_CONSTANT, 2, OFF(106,270), NUM(106,270) } }, /* 106 */ ++ { "ku-iq", { FC_REF_CONSTANT, 1, OFF(107,272), NUM(107,272) } }, /* 107 */ ++ { "ku-ir", { FC_REF_CONSTANT, 1, OFF(108,272), NUM(108,272) } }, /* 108 */ ++ { "ku-tr", { FC_REF_CONSTANT, 2, OFF(109,273), NUM(109,273) } }, /* 109 */ ++ { "kum", { FC_REF_CONSTANT, 1, OFF(110,275), NUM(110,275) } }, /* 110 */ ++ { "kv", { FC_REF_CONSTANT, 1, OFF(111,276), NUM(111,276) } }, /* 111 */ ++ { "kw", { FC_REF_CONSTANT, 3, OFF(112,277), NUM(112,277) } }, /* 112 */ ++ { "kwm", { FC_REF_CONSTANT, 1, OFF(113,83), NUM(113,83) } }, /* 113 */ ++ { "ky", { FC_REF_CONSTANT, 1, OFF(114,280), NUM(114,280) } }, /* 114 */ ++ { "la", { FC_REF_CONSTANT, 2, OFF(115,281), NUM(115,281) } }, /* 115 */ ++ { "lah", { FC_REF_CONSTANT, 1, OFF(116,269), NUM(116,269) } }, /* 116 */ ++ { "lb", { FC_REF_CONSTANT, 1, OFF(117,283), NUM(117,283) } }, /* 117 */ ++ { "lez", { FC_REF_CONSTANT, 1, OFF(118,14), NUM(118,14) } }, /* 118 */ ++ { "lg", { FC_REF_CONSTANT, 2, OFF(119,284), NUM(119,284) } }, /* 119 */ ++ { "li", { FC_REF_CONSTANT, 1, OFF(120,286), NUM(120,286) } }, /* 120 */ ++ { "ln", { FC_REF_CONSTANT, 4, OFF(121,287), NUM(121,287) } }, /* 121 */ ++ { "lo", { FC_REF_CONSTANT, 1, OFF(122,291), NUM(122,291) } }, /* 122 */ ++ { "lt", { FC_REF_CONSTANT, 2, OFF(123,292), NUM(123,292) } }, /* 123 */ ++ { "lv", { FC_REF_CONSTANT, 2, OFF(124,294), NUM(124,294) } }, /* 124 */ ++ { "mai", { FC_REF_CONSTANT, 1, OFF(125,28), NUM(125,28) } }, /* 125 */ ++ { "mg", { FC_REF_CONSTANT, 1, OFF(126,296), NUM(126,296) } }, /* 126 */ ++ { "mh", { FC_REF_CONSTANT, 2, OFF(127,297), NUM(127,297) } }, /* 127 */ ++ { "mi", { FC_REF_CONSTANT, 3, OFF(128,299), NUM(128,299) } }, /* 128 */ ++ { "mk", { FC_REF_CONSTANT, 1, OFF(129,302), NUM(129,302) } }, /* 129 */ ++ { "ml", { FC_REF_CONSTANT, 1, OFF(130,303), NUM(130,303) } }, /* 130 */ ++ { "mn-cn", { FC_REF_CONSTANT, 1, OFF(131,304), NUM(131,304) } }, /* 131 */ ++ { "mn-mn", { FC_REF_CONSTANT, 1, OFF(132,305), NUM(132,305) } }, /* 132 */ ++ { "mo", { FC_REF_CONSTANT, 4, OFF(133,306), NUM(133,306) } }, /* 133 */ ++ { "mr", { FC_REF_CONSTANT, 1, OFF(134,28), NUM(134,28) } }, /* 134 */ ++ { "ms", { FC_REF_CONSTANT, 1, OFF(135,83), NUM(135,83) } }, /* 135 */ ++ { "mt", { FC_REF_CONSTANT, 2, OFF(136,310), NUM(136,310) } }, /* 136 */ ++ { "my", { FC_REF_CONSTANT, 1, OFF(137,312), NUM(137,312) } }, /* 137 */ ++ { "na", { FC_REF_CONSTANT, 2, OFF(138,313), NUM(138,313) } }, /* 138 */ ++ { "nb", { FC_REF_CONSTANT, 1, OFF(139,315), NUM(139,315) } }, /* 139 */ ++ { "nds", { FC_REF_CONSTANT, 1, OFF(140,64), NUM(140,64) } }, /* 140 */ ++ { "ne", { FC_REF_CONSTANT, 1, OFF(141,28), NUM(141,28) } }, /* 141 */ ++ { "ng", { FC_REF_CONSTANT, 1, OFF(142,83), NUM(142,83) } }, /* 142 */ ++ { "nl", { FC_REF_CONSTANT, 1, OFF(143,316), NUM(143,316) } }, /* 143 */ ++ { "nn", { FC_REF_CONSTANT, 1, OFF(144,317), NUM(144,317) } }, /* 144 */ ++ { "no", { FC_REF_CONSTANT, 1, OFF(145,315), NUM(145,315) } }, /* 145 */ ++ { "nr", { FC_REF_CONSTANT, 1, OFF(146,83), NUM(146,83) } }, /* 146 */ ++ { "nso", { FC_REF_CONSTANT, 2, OFF(147,318), NUM(147,318) } }, /* 147 */ ++ { "nv", { FC_REF_CONSTANT, 4, OFF(148,320), NUM(148,320) } }, /* 148 */ ++ { "ny", { FC_REF_CONSTANT, 2, OFF(149,324), NUM(149,324) } }, /* 149 */ ++ { "oc", { FC_REF_CONSTANT, 1, OFF(150,326), NUM(150,326) } }, /* 150 */ ++ { "om", { FC_REF_CONSTANT, 1, OFF(151,83), NUM(151,83) } }, /* 151 */ ++ { "or", { FC_REF_CONSTANT, 1, OFF(152,327), NUM(152,327) } }, /* 152 */ ++ { "os", { FC_REF_CONSTANT, 1, OFF(153,275), NUM(153,275) } }, /* 153 */ ++ { "ota", { FC_REF_CONSTANT, 1, OFF(154,328), NUM(154,328) } }, /* 154 */ ++ { "pa", { FC_REF_CONSTANT, 1, OFF(155,329), NUM(155,329) } }, /* 155 */ ++ { "pa-pk", { FC_REF_CONSTANT, 1, OFF(156,269), NUM(156,269) } }, /* 156 */ ++ { "pap-an", { FC_REF_CONSTANT, 1, OFF(157,330), NUM(157,330) } }, /* 157 */ ++ { "pap-aw", { FC_REF_CONSTANT, 1, OFF(158,331), NUM(158,331) } }, /* 158 */ ++ { "pl", { FC_REF_CONSTANT, 2, OFF(159,332), NUM(159,332) } }, /* 159 */ ++ { "ps-af", { FC_REF_CONSTANT, 1, OFF(160,334), NUM(160,334) } }, /* 160 */ ++ { "ps-pk", { FC_REF_CONSTANT, 1, OFF(161,335), NUM(161,335) } }, /* 161 */ ++ { "pt", { FC_REF_CONSTANT, 1, OFF(162,336), NUM(162,336) } }, /* 162 */ ++ { "qu", { FC_REF_CONSTANT, 2, OFF(163,337), NUM(163,337) } }, /* 163 */ ++ { "rm", { FC_REF_CONSTANT, 1, OFF(164,339), NUM(164,339) } }, /* 164 */ ++ { "rn", { FC_REF_CONSTANT, 1, OFF(165,83), NUM(165,83) } }, /* 165 */ ++ { "ro", { FC_REF_CONSTANT, 3, OFF(166,340), NUM(166,340) } }, /* 166 */ ++ { "ru", { FC_REF_CONSTANT, 1, OFF(167,275), NUM(167,275) } }, /* 167 */ ++ { "rw", { FC_REF_CONSTANT, 1, OFF(168,83), NUM(168,83) } }, /* 168 */ ++ { "sa", { FC_REF_CONSTANT, 1, OFF(169,28), NUM(169,28) } }, /* 169 */ ++ { "sah", { FC_REF_CONSTANT, 1, OFF(170,343), NUM(170,343) } }, /* 170 */ ++ { "sc", { FC_REF_CONSTANT, 1, OFF(171,344), NUM(171,344) } }, /* 171 */ ++ { "sco", { FC_REF_CONSTANT, 3, OFF(172,345), NUM(172,345) } }, /* 172 */ ++ { "sd", { FC_REF_CONSTANT, 1, OFF(173,348), NUM(173,348) } }, /* 173 */ ++ { "se", { FC_REF_CONSTANT, 2, OFF(174,349), NUM(174,349) } }, /* 174 */ ++ { "sel", { FC_REF_CONSTANT, 1, OFF(175,275), NUM(175,275) } }, /* 175 */ ++ { "sg", { FC_REF_CONSTANT, 1, OFF(176,351), NUM(176,351) } }, /* 176 */ ++ { "sh", { FC_REF_CONSTANT, 3, OFF(177,352), NUM(177,352) } }, /* 177 */ ++ { "shs", { FC_REF_CONSTANT, 2, OFF(178,355), NUM(178,355) } }, /* 178 */ ++ { "si", { FC_REF_CONSTANT, 1, OFF(179,357), NUM(179,357) } }, /* 179 */ ++ { "sid", { FC_REF_CONSTANT, 2, OFF(180,358), NUM(180,358) } }, /* 180 */ ++ { "sk", { FC_REF_CONSTANT, 2, OFF(181,360), NUM(181,360) } }, /* 181 */ ++ { "sl", { FC_REF_CONSTANT, 2, OFF(182,39), NUM(182,39) } }, /* 182 */ ++ { "sm", { FC_REF_CONSTANT, 2, OFF(183,362), NUM(183,362) } }, /* 183 */ ++ { "sma", { FC_REF_CONSTANT, 1, OFF(184,364), NUM(184,364) } }, /* 184 */ ++ { "smj", { FC_REF_CONSTANT, 1, OFF(185,365), NUM(185,365) } }, /* 185 */ ++ { "smn", { FC_REF_CONSTANT, 2, OFF(186,366), NUM(186,366) } }, /* 186 */ ++ { "sms", { FC_REF_CONSTANT, 3, OFF(187,368), NUM(187,368) } }, /* 187 */ ++ { "sn", { FC_REF_CONSTANT, 1, OFF(188,83), NUM(188,83) } }, /* 188 */ ++ { "so", { FC_REF_CONSTANT, 1, OFF(189,83), NUM(189,83) } }, /* 189 */ ++ { "sq", { FC_REF_CONSTANT, 1, OFF(190,371), NUM(190,371) } }, /* 190 */ ++ { "sr", { FC_REF_CONSTANT, 1, OFF(191,372), NUM(191,372) } }, /* 191 */ ++ { "ss", { FC_REF_CONSTANT, 1, OFF(192,83), NUM(192,83) } }, /* 192 */ ++ { "st", { FC_REF_CONSTANT, 1, OFF(193,83), NUM(193,83) } }, /* 193 */ ++ { "su", { FC_REF_CONSTANT, 1, OFF(194,114), NUM(194,114) } }, /* 194 */ ++ { "sv", { FC_REF_CONSTANT, 1, OFF(195,373), NUM(195,373) } }, /* 195 */ ++ { "sw", { FC_REF_CONSTANT, 1, OFF(196,83), NUM(196,83) } }, /* 196 */ ++ { "syr", { FC_REF_CONSTANT, 1, OFF(197,374), NUM(197,374) } }, /* 197 */ ++ { "ta", { FC_REF_CONSTANT, 1, OFF(198,375), NUM(198,375) } }, /* 198 */ ++ { "te", { FC_REF_CONSTANT, 1, OFF(199,376), NUM(199,376) } }, /* 199 */ ++ { "tg", { FC_REF_CONSTANT, 1, OFF(200,377), NUM(200,377) } }, /* 200 */ ++ { "th", { FC_REF_CONSTANT, 1, OFF(201,378), NUM(201,378) } }, /* 201 */ ++ { "ti-er", { FC_REF_CONSTANT, 2, OFF(202,42), NUM(202,42) } }, /* 202 */ ++ { "ti-et", { FC_REF_CONSTANT, 2, OFF(203,358), NUM(203,358) } }, /* 203 */ ++ { "tig", { FC_REF_CONSTANT, 2, OFF(204,379), NUM(204,379) } }, /* 204 */ ++ { "tk", { FC_REF_CONSTANT, 2, OFF(205,381), NUM(205,381) } }, /* 205 */ ++ { "tl", { FC_REF_CONSTANT, 1, OFF(206,82), NUM(206,82) } }, /* 206 */ ++ { "tn", { FC_REF_CONSTANT, 2, OFF(207,318), NUM(207,318) } }, /* 207 */ ++ { "to", { FC_REF_CONSTANT, 2, OFF(208,362), NUM(208,362) } }, /* 208 */ ++ { "tr", { FC_REF_CONSTANT, 2, OFF(209,383), NUM(209,383) } }, /* 209 */ ++ { "ts", { FC_REF_CONSTANT, 1, OFF(210,83), NUM(210,83) } }, /* 210 */ ++ { "tt", { FC_REF_CONSTANT, 1, OFF(211,385), NUM(211,385) } }, /* 211 */ ++ { "tw", { FC_REF_CONSTANT, 5, OFF(212,4), NUM(212,4) } }, /* 212 */ ++ { "ty", { FC_REF_CONSTANT, 3, OFF(213,386), NUM(213,386) } }, /* 213 */ ++ { "tyv", { FC_REF_CONSTANT, 1, OFF(214,280), NUM(214,280) } }, /* 214 */ ++ { "ug", { FC_REF_CONSTANT, 1, OFF(215,12), NUM(215,12) } }, /* 215 */ ++ { "uk", { FC_REF_CONSTANT, 1, OFF(216,389), NUM(216,389) } }, /* 216 */ ++ { "ur", { FC_REF_CONSTANT, 1, OFF(217,269), NUM(217,269) } }, /* 217 */ ++ { "uz", { FC_REF_CONSTANT, 1, OFF(218,83), NUM(218,83) } }, /* 218 */ ++ { "ve", { FC_REF_CONSTANT, 2, OFF(219,390), NUM(219,390) } }, /* 219 */ ++ { "vi", { FC_REF_CONSTANT, 4, OFF(220,392), NUM(220,392) } }, /* 220 */ ++ { "vo", { FC_REF_CONSTANT, 1, OFF(221,396), NUM(221,396) } }, /* 221 */ ++ { "vot", { FC_REF_CONSTANT, 2, OFF(222,397), NUM(222,397) } }, /* 222 */ ++ { "wa", { FC_REF_CONSTANT, 1, OFF(223,399), NUM(223,399) } }, /* 223 */ ++ { "wal", { FC_REF_CONSTANT, 2, OFF(224,358), NUM(224,358) } }, /* 224 */ ++ { "wen", { FC_REF_CONSTANT, 2, OFF(225,400), NUM(225,400) } }, /* 225 */ ++ { "wo", { FC_REF_CONSTANT, 2, OFF(226,402), NUM(226,402) } }, /* 226 */ ++ { "xh", { FC_REF_CONSTANT, 1, OFF(227,83), NUM(227,83) } }, /* 227 */ ++ { "yap", { FC_REF_CONSTANT, 1, OFF(228,404), NUM(228,404) } }, /* 228 */ ++ { "yi", { FC_REF_CONSTANT, 1, OFF(229,104), NUM(229,104) } }, /* 229 */ ++ { "yo", { FC_REF_CONSTANT, 4, OFF(230,405), NUM(230,405) } }, /* 230 */ ++ { "za", { FC_REF_CONSTANT, 1, OFF(231,83), NUM(231,83) } }, /* 231 */ ++ { "zh-cn", { FC_REF_CONSTANT, 82, OFF(232,409), NUM(232,409) } }, /* 232 */ ++ { "zh-hk", { FC_REF_CONSTANT, 83, OFF(233,491), NUM(233,491) } }, /* 233 */ ++ { "zh-mo", { FC_REF_CONSTANT, 83, OFF(234,491), NUM(234,491) } }, /* 234 */ ++ { "zh-sg", { FC_REF_CONSTANT, 82, OFF(235,409), NUM(235,409) } }, /* 235 */ ++ { "zh-tw", { FC_REF_CONSTANT, 83, OFF(236,574), NUM(236,574) } }, /* 236 */ ++ { "zu", { FC_REF_CONSTANT, 1, OFF(237,83), NUM(237,83) } }, /* 237 */ ++}, ++{ ++ { { /* 0 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x08104404, 0x08104404, ++ } }, ++ { { /* 1 */ ++ 0xffff8002, 0xffffffff, 0x8002ffff, 0x00000000, ++ 0xc0000000, 0xf0fc33c0, 0x03000000, 0x00000003, ++ } }, ++ { { /* 2 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x0810cf00, 0x0810cf00, ++ } }, ++ { { /* 3 */ ++ 0x00000000, 0x00000000, 0x00000200, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 4 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00220008, 0x00220008, ++ } }, ++ { { /* 5 */ ++ 0x00000000, 0x00000300, 0x00000000, 0x00000300, ++ 0x00010040, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 6 */ ++ 0x00000000, 0x00000000, 0x08100000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 7 */ ++ 0x00000048, 0x00000200, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 8 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x30000000, 0x00000000, 0x03000000, ++ } }, ++ { { /* 9 */ ++ 0xff7fff7f, 0xff01ff7f, 0x00003d7f, 0xffff7fff, ++ 0xffff3d7f, 0x003d7fff, 0xff7f7f00, 0x00ff7fff, ++ } }, ++ { { /* 10 */ ++ 0x003d7fff, 0xffffffff, 0x007fff7f, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 11 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x140a2202, 0x140a2202, ++ } }, ++ { { /* 12 */ ++ 0x00000000, 0x07fffffe, 0x000007fe, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 13 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0xfff99fee, 0xd3c4fdff, 0xb000399f, 0x00030000, ++ } }, ++ { { /* 14 */ ++ 0xffff0042, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 15 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x10028010, 0x10028010, ++ } }, ++ { { /* 16 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x10400080, 0x10400080, ++ } }, ++ { { /* 17 */ ++ 0xc0000000, 0x00030000, 0xc0000000, 0x00000000, ++ 0x00008000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 18 */ ++ 0x00000000, 0x00000000, 0x02000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 19 */ ++ 0x00000000, 0x07ffffde, 0x001009f6, 0x40000000, ++ 0x01000040, 0x00008200, 0x00001000, 0x00000000, ++ } }, ++ { { /* 20 */ ++ 0xffff0000, 0xffffffff, 0x0000ffff, 0x00000000, ++ 0x030c0000, 0x0c00cc0f, 0x03000000, 0x00000300, ++ } }, ++ { { /* 21 */ ++ 0xffff4040, 0xffffffff, 0x4040ffff, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 22 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 23 */ ++ 0x00003000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00110000, 0x00000000, 0x00000000, 0x000000c0, ++ } }, ++ { { /* 24 */ ++ 0x00000000, 0x00000000, 0x08000000, 0x00000008, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 25 */ ++ 0x00003000, 0x00000030, 0x00000000, 0x0000300c, ++ 0x000c0000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 26 */ ++ 0x00000000, 0x3a8b0000, 0x9e78e6b9, 0x0000802e, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 27 */ ++ 0xffff0000, 0xffffd7ff, 0x0000d7ff, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 28 */ ++ 0xffffffe0, 0x83ffffff, 0x00003fff, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 29 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x10008200, 0x10008200, ++ } }, ++ { { /* 30 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x060c3303, 0x060c3303, ++ } }, ++ { { /* 31 */ ++ 0x00000003, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 32 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x03000000, 0x00003000, 0x00000000, ++ } }, ++ { { /* 33 */ ++ 0x00000000, 0x00000000, 0x00000c00, 0x00000000, ++ 0x20010040, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 34 */ ++ 0x00000000, 0x00000000, 0x08100000, 0x00040000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 35 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0xfff99fee, 0xd3c5fdff, 0xb000399f, 0x00000000, ++ } }, ++ { { /* 36 */ ++ 0x00000000, 0x00000000, 0xfffffeff, 0x3d7e03ff, ++ 0xfeff0003, 0x03ffffff, 0x00000000, 0x00000000, ++ } }, ++ { { /* 37 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x12120404, 0x12120404, ++ } }, ++ { { /* 38 */ ++ 0x000330c0, 0x00000000, 0x00000000, 0x60000003, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 39 */ ++ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x00000000, 0x0c00c000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 40 */ ++ 0xff7fff7f, 0xff01ff00, 0x3d7f3d7f, 0xffff7fff, ++ 0xffff0000, 0x003d7fff, 0xff7f7f3d, 0x00ff7fff, ++ } }, ++ { { /* 41 */ ++ 0x003d7fff, 0xffffffff, 0x007fff00, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 42 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x140ca381, 0x140ca381, ++ } }, ++ { { /* 43 */ ++ 0x00000000, 0x80000000, 0x00000001, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 44 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x10020004, 0x10020004, ++ } }, ++ { { /* 45 */ ++ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x00000000, 0x00000030, 0x000c0000, 0x030300c0, ++ } }, ++ { { /* 46 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0xffffffff, 0xffffffff, 0x001fffff, ++ } }, ++ { { /* 47 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x1a10cfc5, 0x9a10cfc5, ++ } }, ++ { { /* 48 */ ++ 0x00000000, 0x00000000, 0x000c0000, 0x01000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 49 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x10420084, 0x10420084, ++ } }, ++ { { /* 50 */ ++ 0xc0000000, 0x00030000, 0xc0000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 51 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x24082202, 0x24082202, ++ } }, ++ { { /* 52 */ ++ 0x0c00f000, 0x00000000, 0x03000180, 0x6000c033, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 53 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x021c0a08, 0x021c0a08, ++ } }, ++ { { /* 54 */ ++ 0x00000030, 0x00000000, 0x0000001e, 0x18000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 55 */ ++ 0xfdffa966, 0xffffdfff, 0xa965dfff, 0x03ffffff, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 56 */ ++ 0x0000000c, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 57 */ ++ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x00000000, 0x00000c00, 0x00c00000, 0x000c0000, ++ } }, ++ { { /* 58 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x0010c604, 0x8010c604, ++ } }, ++ { { /* 59 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x01f00000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 60 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x0000003f, 0x00000000, 0x00000000, 0x000c0000, ++ } }, ++ { { /* 61 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x25082262, 0x25082262, ++ } }, ++ { { /* 62 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x90400010, 0x10400010, ++ } }, ++ { { /* 63 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0xffffffff, 0x0001ffff, 0x00000000, 0x00000000, ++ } }, ++ { { /* 64 */ ++ 0x0c000000, 0x00000000, 0x00000c00, 0x00000000, ++ 0x00170240, 0x00040000, 0x001fe000, 0x00000000, ++ } }, ++ { { /* 65 */ ++ 0x00000000, 0x00000000, 0x08500000, 0x00000008, ++ 0x00000800, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 66 */ ++ 0x00001003, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 67 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0xffffd740, 0xfffffffb, 0x00007fff, 0x00000000, ++ } }, ++ { { /* 68 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00528f81, 0x00528f81, ++ } }, ++ { { /* 69 */ ++ 0x30000300, 0x00300030, 0x30000000, 0x00003000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 70 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x10600010, 0x10600010, ++ } }, ++ { { /* 71 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x60000003, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 72 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x10020000, 0x10020000, ++ } }, ++ { { /* 73 */ ++ 0x00000000, 0x00000000, 0x00000c00, 0x00000000, ++ 0x20000402, 0x00180000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 74 */ ++ 0x00000000, 0x00000000, 0x00880000, 0x00040000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 75 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00400030, 0x00400030, ++ } }, ++ { { /* 76 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x0e1e7707, 0x0e1e7707, ++ } }, ++ { { /* 77 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x25092042, 0x25092042, ++ } }, ++ { { /* 78 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x02041107, 0x02041107, ++ } }, ++ { { /* 79 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x9c508e14, 0x1c508e14, ++ } }, ++ { { /* 80 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x04082202, 0x04082202, ++ } }, ++ { { /* 81 */ ++ 0x00000c00, 0x00000003, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 82 */ ++ 0xc0000c0c, 0x00000000, 0x00c00003, 0x00000c03, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 83 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x020c1383, 0x020c1383, ++ } }, ++ { { /* 84 */ ++ 0xff7fff7f, 0xff01ff7f, 0x00003d7f, 0x00ff00ff, ++ 0x00ff3d7f, 0x003d7fff, 0xff7f7f00, 0x00ff7f00, ++ } }, ++ { { /* 85 */ ++ 0x003d7f00, 0xffff01ff, 0x007fff7f, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 86 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x040a2202, 0x042a220a, ++ } }, ++ { { /* 87 */ ++ 0x00000000, 0x00000200, 0x00000000, 0x00000200, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 88 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x20000000, 0x00000000, 0x02000000, ++ } }, ++ { { /* 89 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0xfffbafee, 0xf3edfdff, 0x00013bbf, 0x00000001, ++ } }, ++ { { /* 90 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00000080, 0x00000080, ++ } }, ++ { { /* 91 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x03000402, 0x00180000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 92 */ ++ 0x00000000, 0x00000000, 0x00880000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 93 */ ++ 0x000c0003, 0x00000c00, 0x00003000, 0x00000c00, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 94 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x08000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 95 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0xffff0000, 0x000007ff, ++ } }, ++ { { /* 96 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00080000, 0x00080000, ++ } }, ++ { { /* 97 */ ++ 0x0c0030c0, 0x00000000, 0x0300001e, 0x66000003, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 98 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00040100, 0x00040100, ++ } }, ++ { { /* 99 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x14482202, 0x14482202, ++ } }, ++ { { /* 100 */ ++ 0x00000000, 0x00000000, 0x00030000, 0x00030000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 101 */ ++ 0x00000000, 0xfffe0000, 0x007fffff, 0xfffffffe, ++ 0x000000ff, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 102 */ ++ 0x00000000, 0x00008000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 103 */ ++ 0x000c0000, 0x00000000, 0x00000c00, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 104 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00000200, 0x00000200, ++ } }, ++ { { /* 105 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00003c00, 0x00000030, ++ } }, ++ { { /* 106 */ ++ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, ++ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, ++ } }, ++ { { /* 107 */ ++ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, ++ 0x00001fff, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 108 */ ++ 0xffff4002, 0xffffffff, 0x4002ffff, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 109 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x64092242, 0x64092242, ++ } }, ++ { { /* 110 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x060cb301, 0x060cb301, ++ } }, ++ { { /* 111 */ ++ 0x00000c7e, 0x031f8000, 0x0063f200, 0x000df840, ++ 0x00037e08, 0x08000dfa, 0x0df901bf, 0x5437e400, ++ } }, ++ { { /* 112 */ ++ 0x00000025, 0x40006fc0, 0x27f91be4, 0xdee00000, ++ 0x007ff83f, 0x00007f7f, 0x00000000, 0x00000000, ++ } }, ++ { { /* 113 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x007f8000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 114 */ ++ 0x000000e7, 0x00000000, 0xfffffffe, 0xffffffff, ++ 0x780fffff, 0xfffffffe, 0xffffffff, 0x787fffff, ++ } }, ++ { { /* 115 */ ++ 0x43f36f8b, 0x9b462442, 0xe3e0e82c, 0x400a0004, ++ 0xdb365f65, 0x04497977, 0xe3f0ecd7, 0x08c56038, ++ } }, ++ { { /* 116 */ ++ 0x3403e602, 0x35518000, 0x7eabe0c8, 0x98698200, ++ 0x2942a948, 0x8060e803, 0xad93441c, 0x4568c03a, ++ } }, ++ { { /* 117 */ ++ 0x8656aa60, 0x02403f7a, 0x14618388, 0x21741020, ++ 0x07022021, 0x40bc3000, 0x4462a624, 0x0a2060a8, ++ } }, ++ { { /* 118 */ ++ 0x85740217, 0x9c840402, 0x14157bfb, 0x11e27f24, ++ 0x02efb665, 0x20ff1f75, 0x28403a70, 0x676326c3, ++ } }, ++ { { /* 119 */ ++ 0x20924dd9, 0x0fc946b0, 0x4850bc98, 0xa03f8638, ++ 0x88162388, 0x52323e09, 0xe3a422aa, 0xc72c00dd, ++ } }, ++ { { /* 120 */ ++ 0x26e1a166, 0x8f0a840b, 0x559e27eb, 0x89bbc241, ++ 0x85400014, 0x08496361, 0x8ad07f0c, 0x05cfff3e, ++ } }, ++ { { /* 121 */ ++ 0xa803ff1a, 0x7b407a41, 0x80024745, 0x38eb0500, ++ 0x0005d851, 0x710c9934, 0x01000397, 0x24046366, ++ } }, ++ { { /* 122 */ ++ 0x005180d0, 0x430ac000, 0x30c89071, 0x58000008, ++ 0xf7000e99, 0x00415f80, 0x941000b0, 0x62800018, ++ } }, ++ { { /* 123 */ ++ 0x09d00240, 0x01568200, 0x08015004, 0x05101d10, ++ 0x001084c1, 0x10504025, 0x4d8a410f, 0xa60d4009, ++ } }, ++ { { /* 124 */ ++ 0x914cab19, 0x098121c0, 0x0003c485, 0x80000652, ++ 0x00080b04, 0x0009041d, 0x905c4849, 0x16900009, ++ } }, ++ { { /* 125 */ ++ 0x22200c65, 0x24338412, 0x47960c03, 0x42250a04, ++ 0x90880028, 0x4f084900, 0xd3aa14a2, 0x3e87d830, ++ } }, ++ { { /* 126 */ ++ 0x1f618604, 0x41867ea4, 0x05b3c390, 0x211857a5, ++ 0x2a48241e, 0x4a041128, 0x161b0a40, 0x88400d60, ++ } }, ++ { { /* 127 */ ++ 0x9502020a, 0x10608221, 0x04000243, 0x80001444, ++ 0x0c040000, 0x70000000, 0x00c11a06, 0x0c00024a, ++ } }, ++ { { /* 128 */ ++ 0x00401a00, 0x40451404, 0xbdb30029, 0x052b0a78, ++ 0xbfa0bba9, 0x8379407c, 0xe81d12fc, 0xc5694bf6, ++ } }, ++ { { /* 129 */ ++ 0x044aeff6, 0xff022115, 0x402bed63, 0x0242d033, ++ 0x00131000, 0x59ca1b02, 0x020000a0, 0x2c41a703, ++ } }, ++ { { /* 130 */ ++ 0x8ff24880, 0x00000204, 0x10055800, 0x00489200, ++ 0x20011894, 0x34805004, 0x684c3200, 0x68be49ea, ++ } }, ++ { { /* 131 */ ++ 0x2e42184c, 0x21c9a820, 0x80b050b9, 0xff7c001e, ++ 0x14e0849a, 0x01e028c1, 0xac49870e, 0xdddb130f, ++ } }, ++ { { /* 132 */ ++ 0x89fbbe1a, 0x51a2a2e0, 0x32ca5502, 0x928b3e46, ++ 0x438f1dbf, 0x32186703, 0x33c03028, 0xa9230811, ++ } }, ++ { { /* 133 */ ++ 0x3a65c000, 0x04028fe3, 0x86252c4e, 0x00a1bf3d, ++ 0x8cd43a1a, 0x317c06c9, 0x950a00e0, 0x0edb018b, ++ } }, ++ { { /* 134 */ ++ 0x8c20e34b, 0xf0101182, 0xa7287d94, 0x40fbc9ac, ++ 0x06534484, 0x44445a90, 0x00013fc8, 0xf5d40048, ++ } }, ++ { { /* 135 */ ++ 0xec577701, 0x891dc442, 0x49286b83, 0xd2424109, ++ 0x59fe061d, 0x3a221800, 0x3b9fb7e4, 0xc0eaf003, ++ } }, ++ { { /* 136 */ ++ 0x82021386, 0xe4008980, 0x10a1b200, 0x0cc44b80, ++ 0x8944d309, 0x48341faf, 0x0c458259, 0x0450420a, ++ } }, ++ { { /* 137 */ ++ 0x10c8a040, 0x44503140, 0x01004004, 0x05408280, ++ 0x442c0108, 0x1a056a30, 0x051420a6, 0x645690cf, ++ } }, ++ { { /* 138 */ ++ 0x31000021, 0xcbf09c18, 0x63e2a120, 0x01b5104c, ++ 0x9a83538c, 0x3281b8b2, 0x0a84987a, 0x0c0233e7, ++ } }, ++ { { /* 139 */ ++ 0x9018d4cc, 0x9070a1a1, 0xe0048a1e, 0x0451c3d4, ++ 0x21c2439a, 0x53104844, 0x36400292, 0xf3bd0241, ++ } }, ++ { { /* 140 */ ++ 0xe8f0ab09, 0xa5d27dc0, 0xd24bc242, 0xd0afa43f, ++ 0x34a11aa0, 0x03d88247, 0x651bc452, 0xc83ad294, ++ } }, ++ { { /* 141 */ ++ 0x40c8001c, 0x33140e06, 0xb21b614f, 0xc0d00088, ++ 0xa898a02a, 0x166ba1c5, 0x85b42e50, 0x0604c08b, ++ } }, ++ { { /* 142 */ ++ 0x1e04f933, 0xa251056e, 0x76380400, 0x73b8ec07, ++ 0x18324406, 0xc8164081, 0x63097c8a, 0xaa042980, ++ } }, ++ { { /* 143 */ ++ 0xca9c1c24, 0x27604e0e, 0x83000990, 0x81040046, ++ 0x10816011, 0x0908540d, 0xcc0a000e, 0x0c000500, ++ } }, ++ { { /* 144 */ ++ 0xa0440430, 0x6784008b, 0x8a195288, 0x8b18865e, ++ 0x41602e59, 0x9cbe8c10, 0x891c6861, 0x00089800, ++ } }, ++ { { /* 145 */ ++ 0x089a8100, 0x41900018, 0xe4a14007, 0x640d0505, ++ 0x0e4d310e, 0xff0a4806, 0x2aa81632, 0x000b852e, ++ } }, ++ { { /* 146 */ ++ 0xca841800, 0x696c0e20, 0x16000032, 0x03905658, ++ 0x1a285120, 0x11248000, 0x432618e1, 0x0eaa5d52, ++ } }, ++ { { /* 147 */ ++ 0xae280fa0, 0x4500fa7b, 0x89406408, 0xc044c880, ++ 0xb1419005, 0x24c48424, 0x603a1a34, 0xc1949000, ++ } }, ++ { { /* 148 */ ++ 0x003a8246, 0xc106180d, 0x99100022, 0x1511e050, ++ 0x00824057, 0x020a041a, 0x8930004f, 0x444ad813, ++ } }, ++ { { /* 149 */ ++ 0xed228a02, 0x400510c0, 0x01021000, 0x31018808, ++ 0x02044600, 0x0708f000, 0xa2008900, 0x22020000, ++ } }, ++ { { /* 150 */ ++ 0x16100200, 0x10400042, 0x02605200, 0x200052f4, ++ 0x80308510, 0x42021100, 0x80b54308, 0x9a2070e1, ++ } }, ++ { { /* 151 */ ++ 0x08012040, 0xfc653500, 0xab0419c1, 0x62140286, ++ 0x00440087, 0x02449085, 0x0a85405c, 0x33803207, ++ } }, ++ { { /* 152 */ ++ 0xb8c00400, 0xc0d0ce20, 0x0080c030, 0x0d250508, ++ 0x00400a90, 0x080c0200, 0x40006505, 0x41026421, ++ } }, ++ { { /* 153 */ ++ 0x00000268, 0x847c0024, 0xde200002, 0x40498619, ++ 0x40000808, 0x20010084, 0x10108400, 0x01c742cd, ++ } }, ++ { { /* 154 */ ++ 0xd52a7038, 0x1d8f1968, 0x3e12be50, 0x81d92ef5, ++ 0x2412cec4, 0x732e0828, 0x4b3424ac, 0xd41d020c, ++ } }, ++ { { /* 155 */ ++ 0x80002a02, 0x08110097, 0x114411c4, 0x7d451786, ++ 0x064949d9, 0x87914000, 0xd8c4254c, 0x491444ba, ++ } }, ++ { { /* 156 */ ++ 0xc8001b92, 0x15800271, 0x0c000081, 0xc200096a, ++ 0x40024800, 0xba493021, 0x1c802080, 0x1008e2ac, ++ } }, ++ { { /* 157 */ ++ 0x00341004, 0x841400e1, 0x20000020, 0x10149800, ++ 0x04aa70c2, 0x54208688, 0x04130c62, 0x20109180, ++ } }, ++ { { /* 158 */ ++ 0x02064082, 0x54001c40, 0xe4e90383, 0x84802125, ++ 0x2000e433, 0xe60944c0, 0x81260a03, 0x080112da, ++ } }, ++ { { /* 159 */ ++ 0x97906901, 0xf8864001, 0x0081e24d, 0xa6510a0e, ++ 0x81ec011a, 0x8441c600, 0xb62cadb8, 0x8741a46f, ++ } }, ++ { { /* 160 */ ++ 0x4b028d54, 0x02681161, 0x2057bb60, 0x043350a0, ++ 0xb7b4a8c0, 0x01122402, 0x20009ad3, 0x00c82271, ++ } }, ++ { { /* 161 */ ++ 0x809e2081, 0xe1800c8a, 0x8151b009, 0x40281031, ++ 0x89a52a0e, 0x620e69b6, 0xd1444425, 0x4d548085, ++ } }, ++ { { /* 162 */ ++ 0x1fb12c75, 0x862dd807, 0x4841d87c, 0x226e414e, ++ 0x9e088200, 0xed37f80c, 0x75268c80, 0x08149313, ++ } }, ++ { { /* 163 */ ++ 0xc8040e32, 0x6ea6484e, 0x66702c4a, 0xba0126c0, ++ 0x185dd30c, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 164 */ ++ 0x00000000, 0x05400000, 0x81337020, 0x03a54f81, ++ 0x641055ec, 0x2344c318, 0x00341462, 0x1a090a43, ++ } }, ++ { { /* 165 */ ++ 0x13a5187b, 0xa8480102, 0xc5440440, 0xe2dd8106, ++ 0x2d481af0, 0x0416b626, 0x6e405058, 0x31128032, ++ } }, ++ { { /* 166 */ ++ 0x0c0007e4, 0x420a8208, 0x803b4840, 0x87134860, ++ 0x3428850d, 0xe5290319, 0x870a2345, 0x5c1825a9, ++ } }, ++ { { /* 167 */ ++ 0xd9c577a6, 0x03e85e00, 0xa7000081, 0x41c6cd54, ++ 0xa2042800, 0x2b0ab860, 0xda9e0020, 0x0e1a08ea, ++ } }, ++ { { /* 168 */ ++ 0x11c0427c, 0x03768908, 0x01058621, 0x18a80000, ++ 0xc44846a0, 0x20220d05, 0x91485422, 0x28978a01, ++ } }, ++ { { /* 169 */ ++ 0x00087898, 0x31221605, 0x08804240, 0x06a2fa4e, ++ 0x92110814, 0x9b042002, 0x06432e52, 0x90105000, ++ } }, ++ { { /* 170 */ ++ 0x85ba0041, 0x20203042, 0x05a04f0b, 0x40802708, ++ 0x1a930591, 0x0600df50, 0x3021a202, 0x4e800630, ++ } }, ++ { { /* 171 */ ++ 0x04c80cc4, 0x8001a004, 0xd4316000, 0x0a020880, ++ 0x00281c00, 0x00418e18, 0xca106ad0, 0x4b00f210, ++ } }, ++ { { /* 172 */ ++ 0x1506274d, 0x88900220, 0x82a85a00, 0x81504549, ++ 0x80002004, 0x2c088804, 0x000508d1, 0x4ac48001, ++ } }, ++ { { /* 173 */ ++ 0x0062e020, 0x0a42008e, 0x6a8c3055, 0xe0a5090e, ++ 0x42c42906, 0x80b34814, 0xb330803e, 0x731c0102, ++ } }, ++ { { /* 174 */ ++ 0x600d1494, 0x09400c20, 0xc040301a, 0xc094a451, ++ 0x05c88dca, 0xa40c96c2, 0x34040001, 0x011000c8, ++ } }, ++ { { /* 175 */ ++ 0xa9c9550d, 0x1c5a2428, 0x48370142, 0x100f7a4d, ++ 0x452a32b4, 0x9205317b, 0x5c44b894, 0x458a68d7, ++ } }, ++ { { /* 176 */ ++ 0x2ed15097, 0x42081943, 0x9d40d202, 0x20979840, ++ 0x064d5409, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 177 */ ++ 0x00000000, 0x84800000, 0x04215542, 0x17001c06, ++ 0x61107624, 0xb9ddff87, 0x5c0a659f, 0x3c00245d, ++ } }, ++ { { /* 178 */ ++ 0x0059adb0, 0x00000000, 0x00000000, 0x009b28d0, ++ 0x02000422, 0x44080108, 0xac409804, 0x90288d0a, ++ } }, ++ { { /* 179 */ ++ 0xe0018700, 0x00310400, 0x82211794, 0x10540019, ++ 0x021a2cb2, 0x40039c02, 0x88043d60, 0x7900080c, ++ } }, ++ { { /* 180 */ ++ 0xba3c1628, 0xcb088640, 0x90807274, 0x0000001e, ++ 0xd8000000, 0x9c87e188, 0x04124034, 0x2791ae64, ++ } }, ++ { { /* 181 */ ++ 0xe6fbe86b, 0x5366408f, 0x537feea6, 0xb5e4e32b, ++ 0x0002869f, 0x01228548, 0x08004402, 0x20a02116, ++ } }, ++ { { /* 182 */ ++ 0x02040004, 0x00052000, 0x01547e00, 0x01ac162c, ++ 0x10852a84, 0x05308c14, 0xb943fbc3, 0x906000ca, ++ } }, ++ { { /* 183 */ ++ 0x40326000, 0x80901200, 0x4c810b30, 0x40020054, ++ 0x1d6a0029, 0x02802000, 0x00048000, 0x150c2610, ++ } }, ++ { { /* 184 */ ++ 0x07018040, 0x0c24d94d, 0x18502810, 0x50205001, ++ 0x04d01000, 0x02017080, 0x21c30108, 0x00000132, ++ } }, ++ { { /* 185 */ ++ 0x07190088, 0x05600802, 0x4c0e0012, 0xf0a10405, ++ 0x00000002, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 186 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00800000, ++ 0x035a8e8d, 0x5a0421bd, 0x11703488, 0x00000026, ++ } }, ++ { { /* 187 */ ++ 0x10000000, 0x8804c502, 0xf801b815, 0x25ed147c, ++ 0x1bb0ed60, 0x1bd70589, 0x1a627af3, 0x0ac50d0c, ++ } }, ++ { { /* 188 */ ++ 0x524ae5d1, 0x63050490, 0x52440354, 0x16122b57, ++ 0x1101a872, 0x00182949, 0x10080948, 0x886c6000, ++ } }, ++ { { /* 189 */ ++ 0x058f916e, 0x39903012, 0x4930f840, 0x001b8880, ++ 0x00000000, 0x00428500, 0x98000058, 0x7014ea04, ++ } }, ++ { { /* 190 */ ++ 0x611d1628, 0x60005113, 0x00a71a24, 0x00000000, ++ 0x03c00000, 0x10187120, 0xa9270172, 0x89066004, ++ } }, ++ { { /* 191 */ ++ 0x020cc022, 0x40810900, 0x8ca0202d, 0x00000e34, ++ 0x00000000, 0x11012100, 0xc11a8011, 0x0892ec4c, ++ } }, ++ { { /* 192 */ ++ 0x85000040, 0x1806c7ac, 0x0512e03e, 0x00108000, ++ 0x80ce4008, 0x02106d01, 0x08568641, 0x0027011e, ++ } }, ++ { { /* 193 */ ++ 0x083d3750, 0x4e05e032, 0x048401c0, 0x01400081, ++ 0x00000000, 0x00000000, 0x00000000, 0x00591aa0, ++ } }, ++ { { /* 194 */ ++ 0x882443c8, 0xc8001d48, 0x72030152, 0x04049013, ++ 0x04008280, 0x0d148a10, 0x02088056, 0x2704a040, ++ } }, ++ { { /* 195 */ ++ 0x4c000000, 0x00000000, 0x00000000, 0xa3200000, ++ 0xa0ae1902, 0xdf002660, 0x7b15f010, 0x3ad08121, ++ } }, ++ { { /* 196 */ ++ 0x00284180, 0x48001003, 0x8014cc00, 0x00c414cf, ++ 0x30202000, 0x00000001, 0x00000000, 0x00000000, ++ } }, ++ { { /* 197 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00000300, 0x00000300, ++ } }, ++ { { /* 198 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0xffff0000, 0x0001ffff, ++ } }, ++ { { /* 199 */ ++ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x0c0c0000, 0x000cc00c, 0x03000000, 0x00000000, ++ } }, ++ { { /* 200 */ ++ 0x00000000, 0x00000300, 0x00000000, 0x00000300, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 201 */ ++ 0xffff0000, 0xffffffff, 0x0040ffff, 0x00000000, ++ 0x0c0c0000, 0x0c00000c, 0x03000000, 0x00000300, ++ } }, ++ { { /* 202 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x0d10646e, 0x0d10646e, ++ } }, ++ { { /* 203 */ ++ 0x00000000, 0x01000300, 0x00000000, 0x00000300, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 204 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x9fffffff, 0xffcffee7, 0x0000003f, 0x00000000, ++ } }, ++ { { /* 205 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0xfffddfec, 0xc3effdff, 0x40603ddf, 0x00000003, ++ } }, ++ { { /* 206 */ ++ 0x00000000, 0xfffe0000, 0xffffffff, 0xffffffff, ++ 0x00007fff, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 207 */ ++ 0x3eff0793, 0x1303b011, 0x11102801, 0x05930000, ++ 0xb0111e7b, 0x3b019703, 0x00a01112, 0x306b9593, ++ } }, ++ { { /* 208 */ ++ 0x1102b051, 0x11303201, 0x011102b0, 0xb879300a, ++ 0x30011306, 0x00800010, 0x100b0113, 0x93000011, ++ } }, ++ { { /* 209 */ ++ 0x00102b03, 0x05930000, 0xb051746b, 0x3b011323, ++ 0x00001030, 0x70000000, 0x1303b011, 0x11102900, ++ } }, ++ { { /* 210 */ ++ 0x00012180, 0xb0153000, 0x3001030e, 0x02000030, ++ 0x10230111, 0x13000000, 0x10106b81, 0x01130300, ++ } }, ++ { { /* 211 */ ++ 0x30111013, 0x00000100, 0x22b85530, 0x30000000, ++ 0x9702b011, 0x113afb07, 0x011303b0, 0x00000021, ++ } }, ++ { { /* 212 */ ++ 0x3b0d1b00, 0x03b01138, 0x11330113, 0x13000001, ++ 0x111c2b05, 0x00000100, 0xb0111000, 0x2a011300, ++ } }, ++ { { /* 213 */ ++ 0x02b01930, 0x10100001, 0x11000000, 0x10300301, ++ 0x07130230, 0x0011146b, 0x2b051300, 0x8fb8f974, ++ } }, ++ { { /* 214 */ ++ 0x103b0113, 0x00000000, 0xd9700000, 0x01134ab0, ++ 0x0011103b, 0x00001103, 0x2ab15930, 0x10000111, ++ } }, ++ { { /* 215 */ ++ 0x11010000, 0x00100b01, 0x01130000, 0x0000102b, ++ 0x20000101, 0x02a01110, 0x30210111, 0x0102b059, ++ } }, ++ { { /* 216 */ ++ 0x19300000, 0x011307b0, 0xb011383b, 0x00000003, ++ 0x00000000, 0x383b0d13, 0x0103b011, 0x00001000, ++ } }, ++ { { /* 217 */ ++ 0x01130000, 0x00101020, 0x00000100, 0x00000110, ++ 0x30000000, 0x00021811, 0x00100000, 0x01110000, ++ } }, ++ { { /* 218 */ ++ 0x00000023, 0x0b019300, 0x00301110, 0x302b0111, ++ 0x13c7b011, 0x01303b01, 0x00000280, 0xb0113000, ++ } }, ++ { { /* 219 */ ++ 0x2b011383, 0x03b01130, 0x300a0011, 0x1102b011, ++ 0x00002000, 0x01110100, 0xa011102b, 0x2b011302, ++ } }, ++ { { /* 220 */ ++ 0x01000010, 0x30000001, 0x13029011, 0x11302b01, ++ 0x000066b0, 0xb0113000, 0x6b07d302, 0x07b0113a, ++ } }, ++ { { /* 221 */ ++ 0x00200103, 0x13000000, 0x11386b05, 0x011303b0, ++ 0x000010b8, 0x2b051b00, 0x03000110, 0x10000000, ++ } }, ++ { { /* 222 */ ++ 0x1102a011, 0x79700a01, 0x0111a2b0, 0x0000100a, ++ 0x00011100, 0x00901110, 0x00090111, 0x93000000, ++ } }, ++ { { /* 223 */ ++ 0xf9f2bb05, 0x011322b0, 0x2001323b, 0x00000000, ++ 0x06b05930, 0x303b0193, 0x1123a011, 0x11700000, ++ } }, ++ { { /* 224 */ ++ 0x001102b0, 0x00001010, 0x03011301, 0x00000110, ++ 0x162b0793, 0x01010010, 0x11300000, 0x01110200, ++ } }, ++ { { /* 225 */ ++ 0xb0113029, 0x00000000, 0x0eb05130, 0x383b0513, ++ 0x0303b011, 0x00000100, 0x01930000, 0x00001039, ++ } }, ++ { { /* 226 */ ++ 0x3b000302, 0x00000000, 0x00230113, 0x00000000, ++ 0x00100000, 0x00010000, 0x90113020, 0x00000002, ++ } }, ++ { { /* 227 */ ++ 0x00000000, 0x10000000, 0x11020000, 0x00000301, ++ 0x01130000, 0xb079b02b, 0x3b011323, 0x02b01130, ++ } }, ++ { { /* 228 */ ++ 0xf0210111, 0x1343b0d9, 0x11303b01, 0x011103b0, ++ 0xb0517020, 0x20011322, 0x01901110, 0x300b0111, ++ } }, ++ { { /* 229 */ ++ 0x9302b011, 0x0016ab01, 0x01130100, 0xb0113021, ++ 0x29010302, 0x02b03130, 0x30000000, 0x1b42b819, ++ } }, ++ { { /* 230 */ ++ 0x11383301, 0x00000330, 0x00000020, 0x33051300, ++ 0x00001110, 0x00000000, 0x93000000, 0x01302305, ++ } }, ++ { { /* 231 */ ++ 0x00010100, 0x30111010, 0x00000100, 0x02301130, ++ 0x10100001, 0x11000000, 0x00000000, 0x85130200, ++ } }, ++ { { /* 232 */ ++ 0x10111003, 0x2b011300, 0x63b87730, 0x303b0113, ++ 0x11a2b091, 0x7b300201, 0x011357f0, 0xf0d1702b, ++ } }, ++ { { /* 233 */ ++ 0x1b0111e3, 0x0ab97130, 0x303b0113, 0x13029001, ++ 0x11302b01, 0x071302b0, 0x3011302b, 0x23011303, ++ } }, ++ { { /* 234 */ ++ 0x02b01130, 0x30ab0113, 0x11feb411, 0x71300901, ++ 0x05d347b8, 0xb011307b, 0x21015303, 0x00001110, ++ } }, ++ { { /* 235 */ ++ 0x306b0513, 0x1102b011, 0x00103301, 0x05130000, ++ 0xa01038eb, 0x30000102, 0x02b01110, 0x30200013, ++ } }, ++ { { /* 236 */ ++ 0x0102b071, 0x00101000, 0x01130000, 0x1011100b, ++ 0x2b011300, 0x00000000, 0x366b0593, 0x1303b095, ++ } }, ++ { { /* 237 */ ++ 0x01103b01, 0x00000200, 0xb0113000, 0x20000103, ++ 0x01000010, 0x30000000, 0x030ab011, 0x00101001, ++ } }, ++ { { /* 238 */ ++ 0x01110100, 0x00000003, 0x23011302, 0x03000010, ++ 0x10000000, 0x01000000, 0x00100000, 0x00000290, ++ } }, ++ { { /* 239 */ ++ 0x30113000, 0x7b015386, 0x03b01130, 0x00210151, ++ 0x13000000, 0x11303b01, 0x001102b0, 0x00011010, ++ } }, ++ { { /* 240 */ ++ 0x2b011302, 0x02001110, 0x10000000, 0x0102b011, ++ 0x11300100, 0x000102b0, 0x00011010, 0x2b011100, ++ } }, ++ { { /* 241 */ ++ 0x02101110, 0x002b0113, 0x93000000, 0x11302b03, ++ 0x011302b0, 0x0000303b, 0x00000002, 0x03b01930, ++ } }, ++ { { /* 242 */ ++ 0x102b0113, 0x0103b011, 0x11300000, 0x011302b0, ++ 0x00001021, 0x00010102, 0x00000010, 0x102b0113, ++ } }, ++ { { /* 243 */ ++ 0x01020011, 0x11302000, 0x011102b0, 0x30113001, ++ 0x00000002, 0x02b01130, 0x303b0313, 0x0103b011, ++ } }, ++ { { /* 244 */ ++ 0x00002000, 0x05130000, 0xb011303b, 0x10001102, ++ 0x00000110, 0x142b0113, 0x01000001, 0x01100000, ++ } }, ++ { { /* 245 */ ++ 0x00010280, 0xb0113000, 0x10000102, 0x00000010, ++ 0x10230113, 0x93021011, 0x11100b05, 0x01130030, ++ } }, ++ { { /* 246 */ ++ 0xb051702b, 0x3b011323, 0x00000030, 0x30000000, ++ 0x1303b011, 0x11102b01, 0x01010330, 0xb011300a, ++ } }, ++ { { /* 247 */ ++ 0x20000102, 0x00000000, 0x10000011, 0x9300a011, ++ 0x00102b05, 0x00000200, 0x90111000, 0x29011100, ++ } }, ++ { { /* 248 */ ++ 0x00b01110, 0x30000000, 0x1302b011, 0x11302b21, ++ 0x000103b0, 0x00000020, 0x2b051300, 0x02b01130, ++ } }, ++ { { /* 249 */ ++ 0x103b0113, 0x13002011, 0x11322b21, 0x00130280, ++ 0xa0113028, 0x0a011102, 0x02921130, 0x30210111, ++ } }, ++ { { /* 250 */ ++ 0x13020011, 0x11302b01, 0x03d30290, 0x3011122b, ++ 0x2b011302, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 251 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00004000, 0x00000000, 0x20000000, 0x00000000, ++ } }, ++ { { /* 252 */ ++ 0x00000000, 0x00000000, 0x00003000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 253 */ ++ 0x00000000, 0x07ffffde, 0x000001f6, 0x42000000, ++ 0x01020140, 0x44008200, 0x00041000, 0x00000000, ++ } }, ++ { { /* 254 */ ++ 0xffff0000, 0xffff27bf, 0x000027bf, 0x00000000, ++ 0x00000000, 0x0c000000, 0x03000000, 0x000000c0, ++ } }, ++ { { /* 255 */ ++ 0x3c000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 256 */ ++ 0x00000000, 0x061ef5c0, 0x000001f6, 0x40000000, ++ 0x01040040, 0x00208210, 0x00005040, 0x00000000, ++ } }, ++ { { /* 257 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x08004480, 0x08004480, ++ } }, ++ { { /* 258 */ ++ 0x00000000, 0x00000000, 0xc0000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 259 */ ++ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 260 */ ++ 0xffff0042, 0xffffffff, 0x0042ffff, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x000000c0, ++ } }, ++ { { /* 261 */ ++ 0x00000000, 0x000c0000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 262 */ ++ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x00000000, 0x0000c00c, 0x00000000, 0x00000000, ++ } }, ++ { { /* 263 */ ++ 0x000c0003, 0x00003c00, 0x0000f000, 0x00003c00, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 264 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x98504f14, 0x18504f14, ++ } }, ++ { { /* 265 */ ++ 0x00000000, 0x00000000, 0x00000c00, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 266 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00480910, 0x00480910, ++ } }, ++ { { /* 267 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x0c186606, 0x0c186606, ++ } }, ++ { { /* 268 */ ++ 0x0c000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00010040, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 269 */ ++ 0x00001006, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 270 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0xfef02596, 0x3bffecae, 0x30003f5f, 0x00000000, ++ } }, ++ { { /* 271 */ ++ 0x03c03030, 0x0000c000, 0x00000000, 0x600c0c03, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 272 */ ++ 0x000c3003, 0x18c00c0c, 0x00c03060, 0x60000c03, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 273 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00100002, 0x00100002, ++ } }, ++ { { /* 274 */ ++ 0x00000003, 0x18000000, 0x00003060, 0x00000c00, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 275 */ ++ 0x00000000, 0x00300000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 276 */ ++ 0xfdffb729, 0x000001ff, 0xb7290000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 277 */ ++ 0xfffddfec, 0xc3fffdff, 0x00803dcf, 0x00000003, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 278 */ ++ 0x00000000, 0xffffffff, 0xffffffff, 0x00ffffff, ++ 0xffffffff, 0x000003ff, 0x00000000, 0x00000000, ++ } }, ++ { { /* 279 */ ++ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x00000000, 0x0000c000, 0x00000000, 0x00000300, ++ } }, ++ { { /* 280 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00004004, 0x00004004, ++ } }, ++ { { /* 281 */ ++ 0x0f000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 282 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x02045101, 0x02045101, ++ } }, ++ { { /* 283 */ ++ 0x00000c00, 0x000000c3, 0x00000000, 0x18000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 284 */ ++ 0xffffffff, 0x0007f6fb, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 285 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000300, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 286 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x011c0661, 0x011c0661, ++ } }, ++ { { /* 287 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x1c58af16, 0x1c58af16, ++ } }, ++ { { /* 288 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x115c0671, 0x115c0671, ++ } }, ++ { { /* 289 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00100400, 0x00100400, ++ } }, ++ { { /* 290 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000003, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 291 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00082202, 0x00082202, ++ } }, ++ { { /* 292 */ ++ 0x03000030, 0x0000c000, 0x00000006, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000c00, ++ } }, ++ { { /* 293 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x10000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 294 */ ++ 0x00000002, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 295 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00300000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 296 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x040c2383, 0x040c2383, ++ } }, ++ { { /* 297 */ ++ 0xfff99fee, 0xf3cdfdff, 0xb0c0398f, 0x00000003, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 298 */ ++ 0x00000000, 0x07ffffc6, 0x000001fe, 0x40000000, ++ 0x01000040, 0x0000a000, 0x00001000, 0x00000000, ++ } }, ++ { { /* 299 */ ++ 0xfff987e0, 0xd36dfdff, 0x1e003987, 0x001f0000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 300 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x160e2302, 0x160e2302, ++ } }, ++ { { /* 301 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00020000, 0x00020000, ++ } }, ++ { { /* 302 */ ++ 0x030000f0, 0x00000000, 0x0c00001e, 0x1e000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 303 */ ++ 0x00000000, 0x07ffffde, 0x000005f6, 0x50000000, ++ 0x05480262, 0x10000a00, 0x00013000, 0x00000000, ++ } }, ++ { { /* 304 */ ++ 0x00000000, 0x07ffffde, 0x000005f6, 0x50000000, ++ 0x05480262, 0x10000a00, 0x00052000, 0x00000000, ++ } }, ++ { { /* 305 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x143c278f, 0x143c278f, ++ } }, ++ { { /* 306 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000100, 0x00000000, ++ } }, ++ { { /* 307 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x02045301, 0x02045301, ++ } }, ++ { { /* 308 */ ++ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x00300000, 0x0c00c030, 0x03000000, 0x00000000, ++ } }, ++ { { /* 309 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x02041101, 0x02041101, ++ } }, ++ { { /* 310 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00800000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 311 */ ++ 0x30000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00040000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 312 */ ++ 0x00000000, 0x07fffdd6, 0x000005f6, 0xec000000, ++ 0x0200b4d9, 0x480a8640, 0x00000000, 0x00000000, ++ } }, ++ { { /* 313 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00000002, 0x00000002, ++ } }, ++ { { /* 314 */ ++ 0x00033000, 0x00000000, 0x00000c00, 0x600000c3, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 315 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x1850cc14, 0x1850cc14, ++ } }, ++ { { /* 316 */ ++ 0xffff8f04, 0xffffffff, 0x8f04ffff, 0x00000000, ++ 0x030c0000, 0x0c00cc0f, 0x03000000, 0x00000300, ++ } }, ++ { { /* 317 */ ++ 0x00000000, 0x00800000, 0x03bffbaa, 0x03bffbaa, ++ 0x00000000, 0x00000000, 0x00002202, 0x00002202, ++ } }, ++ { { /* 318 */ ++ 0x00080000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 319 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0xfc7e3fec, 0x2ffbffbf, 0x7f5f847f, 0x00040000, ++ } }, ++ { { /* 320 */ ++ 0xff7fff7f, 0xff01ff7f, 0x3d7f3d7f, 0xffff7fff, ++ 0xffff3d7f, 0x003d7fff, 0xff7f7f3d, 0x00ff7fff, ++ } }, ++ { { /* 321 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x24182212, 0x24182212, ++ } }, ++ { { /* 322 */ ++ 0x0000f000, 0x66000000, 0x00300180, 0x60000033, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 323 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00408030, 0x00408030, ++ } }, ++ { { /* 324 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00020032, 0x00020032, ++ } }, ++ { { /* 325 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00000016, 0x00000016, ++ } }, ++ { { /* 326 */ ++ 0x00033000, 0x00000000, 0x00000c00, 0x60000003, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 327 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00200034, 0x00200034, ++ } }, ++ { { /* 328 */ ++ 0x00033000, 0x00000000, 0x00000c00, 0x60000003, ++ 0x00000000, 0x00800000, 0x00000000, 0x0000c3f0, ++ } }, ++ { { /* 329 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00040000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 330 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00000880, 0x00000880, ++ } }, ++ { { /* 331 */ ++ 0xfdff8f04, 0xfdff01ff, 0x8f0401ff, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 332 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x10400a33, 0x10400a33, ++ } }, ++ { { /* 333 */ ++ 0xffff0000, 0xffff1fff, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 334 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0xd63dc7e8, 0xc3bfc718, 0x00803dc7, 0x00000000, ++ } }, ++ { { /* 335 */ ++ 0xfffddfee, 0xc3effdff, 0x00603ddf, 0x00000003, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 336 */ ++ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x0c0c0000, 0x00cc0000, 0x00000000, 0x0000c00c, ++ } }, ++ { { /* 337 */ ++ 0xfffffffe, 0x87ffffff, 0x00007fff, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 338 */ ++ 0xff7fff7f, 0xff01ff00, 0x00003d7f, 0xffff7fff, ++ 0x00ff0000, 0x003d7f7f, 0xff7f7f00, 0x00ff7f00, ++ } }, ++ { { /* 339 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x30400090, 0x30400090, ++ } }, ++ { { /* 340 */ ++ 0x00000000, 0x00000000, 0xc0000180, 0x60000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 341 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x18404084, 0x18404084, ++ } }, ++ { { /* 342 */ ++ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, ++ 0x00c00000, 0x0c00c00c, 0x03000000, 0x00000000, ++ } }, ++ { { /* 343 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00008000, 0x00008000, ++ } }, ++ { { /* 344 */ ++ 0xffff00d0, 0xffffffff, 0x00d0ffff, 0x00000000, ++ 0x00030000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 345 */ ++ 0x000c0000, 0x30000000, 0x00000c30, 0x00030000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 346 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x263c370f, 0x263c370f, ++ } }, ++ { { /* 347 */ ++ 0x0003000c, 0x00000300, 0x00000000, 0x00000300, ++ 0x00000000, 0x00018003, 0x00000000, 0x00000000, ++ } }, ++ { { /* 348 */ ++ 0x0800024f, 0x00000008, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 349 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0xffffffff, 0xffffffff, 0x03ffffff, ++ } }, ++ { { /* 350 */ ++ 0x00000000, 0x00000000, 0x077dfffe, 0x077dfffe, ++ 0x00000000, 0x00000000, 0x10400010, 0x10400010, ++ } }, ++ { { /* 351 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x10400010, 0x10400010, ++ } }, ++ { { /* 352 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x081047a4, 0x081047a4, ++ } }, ++ { { /* 353 */ ++ 0x0c0030c0, 0x00000000, 0x0f30001e, 0x66000003, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 354 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x000a0a09, 0x000a0a09, ++ } }, ++ { { /* 355 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00400810, 0x00400810, ++ } }, ++ { { /* 356 */ ++ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x0e3c770f, 0x0e3c770f, ++ } }, ++ { { /* 357 */ ++ 0x0c000000, 0x00000300, 0x00000018, 0x00000300, ++ 0x00000000, 0x00000000, 0x001fe000, 0x03000000, ++ } }, ++ { { /* 358 */ ++ 0x0000100f, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 359 */ ++ 0x00000000, 0xc0000000, 0x00000000, 0x0000000c, ++ 0x00000000, 0x33000000, 0x00003000, 0x00000000, ++ } }, ++ { { /* 360 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000280, 0x00000000, ++ } }, ++ { { /* 361 */ ++ 0x7f7b7f8b, 0xef553db4, 0xf35dfba8, 0x400b0243, ++ 0x8d3efb40, 0x8c2c7bf7, 0xe3fa6eff, 0xa8ed1d3a, ++ } }, ++ { { /* 362 */ ++ 0xcf83e602, 0x35558cf5, 0xffabe048, 0xd85992b9, ++ 0x2892ab18, 0x8020d7e9, 0xf583c438, 0x450ae74a, ++ } }, ++ { { /* 363 */ ++ 0x9714b000, 0x54007762, 0x1420d188, 0xc8c01020, ++ 0x00002121, 0x0c0413a8, 0x04408000, 0x082870c0, ++ } }, ++ { { /* 364 */ ++ 0x000408c0, 0x80000002, 0x14722b7b, 0x3bfb7924, ++ 0x1ae43327, 0x38ef9835, 0x28029ad1, 0xbf69a813, ++ } }, ++ { { /* 365 */ ++ 0x2fc665cf, 0xafc96b11, 0x5053340f, 0xa00486a2, ++ 0xe8090106, 0xc00e3f0f, 0x81450a88, 0xc6010010, ++ } }, ++ { { /* 366 */ ++ 0x26e1a161, 0xce00444b, 0xd4eec7aa, 0x85bbcadf, ++ 0xa5203a74, 0x8840436c, 0x8bd23f06, 0x3befff79, ++ } }, ++ { { /* 367 */ ++ 0xe8eff75a, 0x5b36fbcb, 0x1bfd0d49, 0x39ee0154, ++ 0x2e75d855, 0xa91abfd8, 0xf6bff3d7, 0xb40c67e0, ++ } }, ++ { { /* 368 */ ++ 0x081382c2, 0xd08bd49d, 0x1061065a, 0x59e074f2, ++ 0xb3128f9f, 0x6aaa0080, 0xb05e3230, 0x60ac9d7a, ++ } }, ++ { { /* 369 */ ++ 0xc900d303, 0x8a563098, 0x13907000, 0x18421f14, ++ 0x0008c060, 0x10808008, 0xec900400, 0xe6332817, ++ } }, ++ { { /* 370 */ ++ 0x90000758, 0x4e09f708, 0xfc83f485, 0x18c8af53, ++ 0x080c187c, 0x01146adf, 0xa734c80c, 0x2710a011, ++ } }, ++ { { /* 371 */ ++ 0x422228c5, 0x00210413, 0x41123010, 0x40001820, ++ 0xc60c022b, 0x10000300, 0x00220022, 0x02495810, ++ } }, ++ { { /* 372 */ ++ 0x9670a094, 0x1792eeb0, 0x05f2cb96, 0x23580025, ++ 0x42cc25de, 0x4a04cf38, 0x359f0c40, 0x8a001128, ++ } }, ++ { { /* 373 */ ++ 0x910a13fa, 0x10560229, 0x04200641, 0x84f00484, ++ 0x0c040000, 0x412c0400, 0x11541206, 0x00020a4b, ++ } }, ++ { { /* 374 */ ++ 0x00c00200, 0x00940000, 0xbfbb0001, 0x242b167c, ++ 0x7fa89bbb, 0xe3790c7f, 0xe00d10f4, 0x9f014132, ++ } }, ++ { { /* 375 */ ++ 0x35728652, 0xff1210b4, 0x4223cf27, 0x8602c06b, ++ 0x1fd33106, 0xa1aa3a0c, 0x02040812, 0x08012572, ++ } }, ++ { { /* 376 */ ++ 0x485040cc, 0x601062d0, 0x29001c80, 0x00109a00, ++ 0x22000004, 0x00800000, 0x68002020, 0x609ecbe6, ++ } }, ++ { { /* 377 */ ++ 0x3f73916e, 0x398260c0, 0x48301034, 0xbd5c0006, ++ 0xd6fb8cd1, 0x43e820e1, 0x084e0600, 0xc4d00500, ++ } }, ++ { { /* 378 */ ++ 0x89aa8d1f, 0x1602a6e1, 0x21ed0001, 0x1a8b3656, ++ 0x13a51fb7, 0x30a06502, 0x23c7b278, 0xe9226c93, ++ } }, ++ { { /* 379 */ ++ 0x3a74e47f, 0x98208fe3, 0x2625280e, 0xbf49bf9c, ++ 0xac543218, 0x1916b949, 0xb5220c60, 0x0659fbc1, ++ } }, ++ { { /* 380 */ ++ 0x8420e343, 0x800008d9, 0x20225500, 0x00a10184, ++ 0x20104800, 0x40801380, 0x00160d04, 0x80200040, ++ } }, ++ { { /* 381 */ ++ 0x8de7fd40, 0xe0985436, 0x091e7b8b, 0xd249fec8, ++ 0x8dee0611, 0xba221937, 0x9fdd77f4, 0xf0daf3ec, ++ } }, ++ { { /* 382 */ ++ 0xec424386, 0x26048d3f, 0xc021fa6c, 0x0cc2628e, ++ 0x0145d785, 0x559977ad, 0x4045e250, 0xa154260b, ++ } }, ++ { { /* 383 */ ++ 0x58199827, 0xa4103443, 0x411405f2, 0x07002280, ++ 0x426600b4, 0x15a17210, 0x41856025, 0x00000054, ++ } }, ++ { { /* 384 */ ++ 0x01040201, 0xcb70c820, 0x6a629320, 0x0095184c, ++ 0x9a8b1880, 0x3201aab2, 0x00c4d87a, 0x04c3f3e5, ++ } }, ++ { { /* 385 */ ++ 0xa238d44d, 0x5072a1a1, 0x84fc980a, 0x44d1c152, ++ 0x20c21094, 0x42104180, 0x3a000000, 0xd29d0240, ++ } }, ++ { { /* 386 */ ++ 0xa8b12f01, 0x2432bd40, 0xd04bd34d, 0xd0ada723, ++ 0x75a10a92, 0x01e9adac, 0x771f801a, 0xa01b9225, ++ } }, ++ { { /* 387 */ ++ 0x20cadfa1, 0x738c0602, 0x003b577f, 0x00d00bff, ++ 0x0088806a, 0x0029a1c4, 0x05242a05, 0x16234009, ++ } }, ++ { { /* 388 */ ++ 0x80056822, 0xa2112011, 0x64900004, 0x13824849, ++ 0x193023d5, 0x08922980, 0x88115402, 0xa0042001, ++ } }, ++ { { /* 389 */ ++ 0x81800400, 0x60228502, 0x0b010090, 0x12020022, ++ 0x00834011, 0x00001a01, 0x00000000, 0x00000000, ++ } }, ++ { { /* 390 */ ++ 0x00000000, 0x4684009f, 0x020012c8, 0x1a0004fc, ++ 0x0c4c2ede, 0x80b80402, 0x0afca826, 0x22288c02, ++ } }, ++ { { /* 391 */ ++ 0x8f7ba0e0, 0x2135c7d6, 0xf8b106c7, 0x62550713, ++ 0x8a19936e, 0xfb0e6efa, 0x48f91630, 0x7debcd2f, ++ } }, ++ { { /* 392 */ ++ 0x4e845892, 0x7a2e4ca0, 0x561eedea, 0x1190c649, ++ 0xe83a5324, 0x8124cfdb, 0x634218f1, 0x1a8a5853, ++ } }, ++ { { /* 393 */ ++ 0x24d37420, 0x0514aa3b, 0x89586018, 0xc0004800, ++ 0x91018268, 0x2cd684a4, 0xc4ba8886, 0x02100377, ++ } }, ++ { { /* 394 */ ++ 0x00388244, 0x404aae11, 0x510028c0, 0x15146044, ++ 0x10007310, 0x02480082, 0x40060205, 0x0000c003, ++ } }, ++ { { /* 395 */ ++ 0x0c020000, 0x02200008, 0x40009000, 0xd161b800, ++ 0x32744621, 0x3b8af800, 0x8b00050f, 0x2280bbd0, ++ } }, ++ { { /* 396 */ ++ 0x07690600, 0x00438040, 0x50005420, 0x250c41d0, ++ 0x83108410, 0x02281101, 0x00304008, 0x020040a1, ++ } }, ++ { { /* 397 */ ++ 0x20000040, 0xabe31500, 0xaa443180, 0xc624c2c6, ++ 0x8004ac13, 0x03d1b000, 0x4285611e, 0x1d9ff303, ++ } }, ++ { { /* 398 */ ++ 0x78e8440a, 0xc3925e26, 0x00852000, 0x4000b001, ++ 0x88424a90, 0x0c8dca04, 0x4203a705, 0x000422a1, ++ } }, ++ { { /* 399 */ ++ 0x0c018668, 0x10795564, 0xdea00002, 0x40c12000, ++ 0x5001488b, 0x04000380, 0x50040000, 0x80d0c05d, ++ } }, ++ { { /* 400 */ ++ 0x970aa010, 0x4dafbb20, 0x1e10d921, 0x83140460, ++ 0xa6d68848, 0x733fd83b, 0x497427bc, 0x92130ddc, ++ } }, ++ { { /* 401 */ ++ 0x8ba1142b, 0xd1392e75, 0x50503009, 0x69008808, ++ 0x024a49d4, 0x80164010, 0x89d7e564, 0x5316c020, ++ } }, ++ { { /* 402 */ ++ 0x86002b92, 0x15e0a345, 0x0c03008b, 0xe200196e, ++ 0x80067031, 0xa82916a5, 0x18802000, 0xe1487aac, ++ } }, ++ { { /* 403 */ ++ 0xb5d63207, 0x5f9132e8, 0x20e550a1, 0x10807c00, ++ 0x9d8a7280, 0x421f00aa, 0x02310e22, 0x04941100, ++ } }, ++ { { /* 404 */ ++ 0x40080022, 0x5c100010, 0xfcc80343, 0x0580a1a5, ++ 0x04008433, 0x6e080080, 0x81262a4b, 0x2901aad8, ++ } }, ++ { { /* 405 */ ++ 0x4490684d, 0xba880009, 0x00820040, 0x87d10000, ++ 0xb1e6215b, 0x80083161, 0xc2400800, 0xa600a069, ++ } }, ++ { { /* 406 */ ++ 0x4a328d58, 0x550a5d71, 0x2d579aa0, 0x4aa64005, ++ 0x30b12021, 0x01123fc6, 0x260a10c2, 0x50824462, ++ } }, ++ { { /* 407 */ ++ 0x80409880, 0x810004c0, 0x00002003, 0x38180000, ++ 0xf1a60200, 0x720e4434, 0x92e035a2, 0x09008101, ++ } }, ++ { { /* 408 */ ++ 0x00000400, 0x00008885, 0x00000000, 0x00804000, ++ 0x00000000, 0x00004040, 0x00000000, 0x00000000, ++ } }, ++ { { /* 409 */ ++ 0x00000000, 0x08000000, 0x00000082, 0x00000000, ++ 0x88000004, 0xe7efbfff, 0xffbfffff, 0xfdffefef, ++ } }, ++ { { /* 410 */ ++ 0xbffefbff, 0x057fffff, 0x85b30034, 0x42164706, ++ 0xe4105402, 0xb3058092, 0x81305422, 0x180b4263, ++ } }, ++ { { /* 411 */ ++ 0x13f5387b, 0xa9ea07e5, 0x05143c4c, 0x80020600, ++ 0xbd481ad9, 0xf496ee37, 0x7ec0705f, 0x355fbfb2, ++ } }, ++ { { /* 412 */ ++ 0x455fe644, 0x41469000, 0x063b1d40, 0xfe1362a1, ++ 0x39028505, 0x0c080548, 0x0000144f, 0x58183488, ++ } }, ++ { { /* 413 */ ++ 0xd8153077, 0x4bfbbd0e, 0x85008a90, 0xe61dc100, ++ 0xb386ed14, 0x639bff72, 0xd9befd92, 0x0a92887b, ++ } }, ++ { { /* 414 */ ++ 0x1cb2d3fe, 0x177ab980, 0xdc1782c9, 0x3980fffb, ++ 0x590c4260, 0x37df0f01, 0xb15094a3, 0x23070623, ++ } }, ++ { { /* 415 */ ++ 0x3102f85a, 0x310201f0, 0x1e820040, 0x056a3a0a, ++ 0x12805b84, 0xa7148002, 0xa04b2612, 0x90011069, ++ } }, ++ { { /* 416 */ ++ 0x848a1000, 0x3f801802, 0x42400708, 0x4e140110, ++ 0x180080b0, 0x0281c510, 0x10298202, 0x88000210, ++ } }, ++ { { /* 417 */ ++ 0x00420020, 0x11000280, 0x4413e000, 0xfe025804, ++ 0x30283c07, 0x04739798, 0xcb13ced1, 0x431f6210, ++ } }, ++ { { /* 418 */ ++ 0x55ac278d, 0xc892422e, 0x02885380, 0x78514039, ++ 0x8088292c, 0x2428b900, 0x080e0c41, 0x42004421, ++ } }, ++ { { /* 419 */ ++ 0x08680408, 0x12040006, 0x02903031, 0xe0855b3e, ++ 0x10442936, 0x10822814, 0x83344266, 0x531b013c, ++ } }, ++ { { /* 420 */ ++ 0x0e0d0404, 0x00510c22, 0xc0000012, 0x88000040, ++ 0x0000004a, 0x00000000, 0x5447dff6, 0x00088868, ++ } }, ++ { { /* 421 */ ++ 0x00000081, 0x40000000, 0x00000100, 0x02000000, ++ 0x00080600, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 422 */ ++ 0x00000080, 0x00000040, 0x00000000, 0x00001040, ++ 0x00000000, 0xf7fdefff, 0xfffeff7f, 0xfffffbff, ++ } }, ++ { { /* 423 */ ++ 0xbffffdff, 0x00ffffff, 0x042012c2, 0x07080c06, ++ 0x01101624, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 424 */ ++ 0xe0000000, 0xfffffffe, 0x7f79ffff, 0x00f928df, ++ 0x80120c32, 0xd53a0008, 0xecc2d858, 0x2fa89d18, ++ } }, ++ { { /* 425 */ ++ 0xe0109620, 0x2622d60c, 0x02060f97, 0x9055b240, ++ 0x501180a2, 0x04049800, 0x00004000, 0x00000000, ++ } }, ++ { { /* 426 */ ++ 0x00000000, 0x00000000, 0x00000000, 0xfffffbc0, ++ 0xdffbeffe, 0x62430b08, 0xfb3b41b6, 0x23896f74, ++ } }, ++ { { /* 427 */ ++ 0xecd7ae7f, 0x5960e047, 0x098fa096, 0xa030612c, ++ 0x2aaa090d, 0x4f7bd44e, 0x388bc4b2, 0x6110a9c6, ++ } }, ++ { { /* 428 */ ++ 0x42000014, 0x0202800c, 0x6485fe48, 0xe3f7d63e, ++ 0x0c073aa0, 0x0430e40c, 0x1002f680, 0x00000000, ++ } }, ++ { { /* 429 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x00100000, ++ 0x00004000, 0x00004000, 0x00000100, 0x00000000, ++ } }, ++ { { /* 430 */ ++ 0x00000000, 0x40000000, 0x00000000, 0x00000400, ++ 0x00008000, 0x00000000, 0x00400400, 0x00000000, ++ } }, ++ { { /* 431 */ ++ 0x00000000, 0x40000000, 0x00000000, 0x00000800, ++ 0xfebdffe0, 0xffffffff, 0xfbe77f7f, 0xf7ffffbf, ++ } }, ++ { { /* 432 */ ++ 0xefffffff, 0xdff7ff7e, 0xfbdff6f7, 0x804fbffe, ++ 0x00000000, 0x00000000, 0x00000000, 0x7fffef00, ++ } }, ++ { { /* 433 */ ++ 0xb6f7ff7f, 0xb87e4406, 0x88313bf5, 0x00f41796, ++ 0x1391a960, 0x72490080, 0x0024f2f3, 0x42c88701, ++ } }, ++ { { /* 434 */ ++ 0x5048e3d3, 0x43052400, 0x4a4c0000, 0x10580227, ++ 0x01162820, 0x0014a809, 0x00000000, 0x00683ec0, ++ } }, ++ { { /* 435 */ ++ 0x00000000, 0x00000000, 0x00000000, 0xffe00000, ++ 0xfddbb7ff, 0x000000f7, 0xc72e4000, 0x00000180, ++ } }, ++ { { /* 436 */ ++ 0x00012000, 0x00004000, 0x00300000, 0xb4f7ffa8, ++ 0x03ffadf3, 0x00000120, 0x00000000, 0x00000000, ++ } }, ++ { { /* 437 */ ++ 0x00000000, 0x00000000, 0x00000000, 0xfffbf000, ++ 0xfdcf9df7, 0x15c301bf, 0x810a1827, 0x0a00a842, ++ } }, ++ { { /* 438 */ ++ 0x80088108, 0x18048008, 0x0012a3be, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 439 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x90000000, ++ 0xdc3769e6, 0x3dff6bff, 0xf3f9fcf8, 0x00000004, ++ } }, ++ { { /* 440 */ ++ 0x80000000, 0xe7eebf6f, 0x5da2dffe, 0xc00b3fd8, ++ 0xa00c0984, 0x69100040, 0xb912e210, 0x5a0086a5, ++ } }, ++ { { /* 441 */ ++ 0x02896800, 0x6a809005, 0x00030010, 0x80000000, ++ 0x8e001ff9, 0x00000001, 0x00000000, 0x00000000, ++ } }, ++ { { /* 442 */ ++ 0x14000010, 0xa0c09512, 0x0c000200, 0x01000400, ++ 0x050002a3, 0x98800009, 0x00004000, 0x01004c00, ++ } }, ++ { { /* 443 */ ++ 0x04800008, 0x02840300, 0x00000824, 0x00040000, ++ 0x00000400, 0x20010904, 0x00001100, 0x22050030, ++ } }, ++ { { /* 444 */ ++ 0x00000108, 0x08104000, 0x01400000, 0x00001040, ++ 0x00010102, 0x10000040, 0x82012000, 0x10100002, ++ } }, ++ { { /* 445 */ ++ 0x00006002, 0x00000800, 0x00400000, 0x02100401, ++ 0x14400144, 0x013c4980, 0x880e8288, 0x50102014, ++ } }, ++ { { /* 446 */ ++ 0x80000824, 0x101000c1, 0x02800000, 0x02080101, ++ 0x04118000, 0x02200112, 0x00031020, 0x02000003, ++ } }, ++ { { /* 447 */ ++ 0x00000002, 0x090c1090, 0xa0004004, 0x60102290, ++ 0x00080000, 0x00414f45, 0x07071026, 0x40c00001, ++ } }, ++ { { /* 448 */ ++ 0x04580000, 0x0014800a, 0x00002800, 0x00002600, ++ 0x50988020, 0x02140018, 0x04013800, 0x00008008, ++ } }, ++ { { /* 449 */ ++ 0x41082004, 0x80000928, 0x20080280, 0x020e0a00, ++ 0x00010040, 0x16110200, 0x41800002, 0x08231400, ++ } }, ++ { { /* 450 */ ++ 0x40020020, 0x0080202f, 0x2015a008, 0x1c000002, ++ 0xc0040e00, 0x82028012, 0x00400000, 0x2002a004, ++ } }, ++ { { /* 451 */ ++ 0x20200001, 0xa0040000, 0x8890004c, 0xc4000080, ++ 0x10012500, 0x48100482, 0x60800110, 0x40008040, ++ } }, ++ { { /* 452 */ ++ 0x00040008, 0x04000044, 0x90000091, 0x000c1200, ++ 0x06040000, 0x08610480, 0x10010800, 0x080d0001, ++ } }, ++ { { /* 453 */ ++ 0x800204b4, 0x00140000, 0x00000000, 0x00200020, ++ 0x84100200, 0x01811000, 0x02000210, 0x03018800, ++ } }, ++ { { /* 454 */ ++ 0x04042804, 0x20001c92, 0x02100020, 0x4202490a, ++ 0x02420146, 0x00000803, 0x0008c008, 0x44050010, ++ } }, ++ { { /* 455 */ ++ 0x80222000, 0x00000800, 0x00008452, 0x10502140, ++ 0xe0410005, 0x00000400, 0x00a00008, 0x80080000, ++ } }, ++ { { /* 456 */ ++ 0x50180020, 0x00000009, 0x40080600, 0x00000000, ++ 0x56000020, 0x04000000, 0x00020006, 0x00208220, ++ } }, ++ { { /* 457 */ ++ 0x01210000, 0x40009000, 0x08c00140, 0x08110000, ++ 0x00004820, 0x02400810, 0x08800002, 0x00200000, ++ } }, ++ { { /* 458 */ ++ 0x00040a00, 0x00004000, 0x40000104, 0x84000000, ++ 0x02040048, 0x20000000, 0x00012000, 0x1b100000, ++ } }, ++ { { /* 459 */ ++ 0x00007000, 0x04000020, 0x10032000, 0x0804000a, ++ 0x00000008, 0x04020090, 0x88000014, 0x00000000, ++ } }, ++ { { /* 460 */ ++ 0x00000000, 0x08020008, 0x00040400, 0x40a00000, ++ 0x40000000, 0x00080090, 0x40800000, 0x20000388, ++ } }, ++ { { /* 461 */ ++ 0x02001080, 0x20010004, 0x12010004, 0x20008011, ++ 0x13200082, 0x02800000, 0x04098001, 0x00000004, ++ } }, ++ { { /* 462 */ ++ 0x00000000, 0x02801000, 0x00001000, 0x00000100, ++ 0x20010024, 0x00000050, 0x80200028, 0x00000020, ++ } }, ++ { { /* 463 */ ++ 0x01000000, 0x00a24000, 0x00000000, 0x82001010, ++ 0x00000800, 0x02000000, 0x40020002, 0x59000044, ++ } }, ++ { { /* 464 */ ++ 0x00000080, 0x0d040000, 0x04000000, 0x10020000, ++ 0x00022000, 0x00508000, 0x20080001, 0x000004a2, ++ } }, ++ { { /* 465 */ ++ 0xc0020400, 0x00310000, 0x80002000, 0x00002800, ++ 0x00000b60, 0x40200000, 0x00120000, 0x80000009, ++ } }, ++ { { /* 466 */ ++ 0x41000000, 0x00010008, 0x00880910, 0x20080888, ++ 0x04044020, 0x80482010, 0x00006000, 0x00020000, ++ } }, ++ { { /* 467 */ ++ 0x42405004, 0x00400020, 0x00000010, 0x00000886, ++ 0x00008000, 0x80021011, 0x00c00000, 0x42000000, ++ } }, ++ { { /* 468 */ ++ 0x4801201f, 0x40c00004, 0x20600480, 0x00000020, ++ 0x01000110, 0x22400040, 0x00000428, 0x00000000, ++ } }, ++ { { /* 469 */ ++ 0x0f00020f, 0x40401000, 0x00200048, 0x000c0092, ++ 0x81000421, 0x00040004, 0x00620001, 0x06000202, ++ } }, ++ { { /* 470 */ ++ 0x14001808, 0x00083800, 0x008c1028, 0x04120028, ++ 0x22008404, 0x40260880, 0x01100700, 0x00400000, ++ } }, ++ { { /* 471 */ ++ 0x20000020, 0x00200000, 0x00840000, 0x04108000, ++ 0x00000002, 0x00000000, 0x10000002, 0x04000402, ++ } }, ++ { { /* 472 */ ++ 0x10000000, 0x26a20000, 0x05000200, 0x82204000, ++ 0x80000000, 0x00048404, 0x80004800, 0x80000400, ++ } }, ++ { { /* 473 */ ++ 0x00000064, 0x00000050, 0x18804000, 0x00060000, ++ 0x00408002, 0x02020030, 0x00000000, 0x40000000, ++ } }, ++ { { /* 474 */ ++ 0x01208414, 0x00000600, 0x02018000, 0x10400000, ++ 0x04000840, 0x09200000, 0x2e000000, 0x04000304, ++ } }, ++ { { /* 475 */ ++ 0x00c01810, 0x20100010, 0x10400010, 0x02100000, ++ 0xa0000402, 0x48200000, 0x06080000, 0x01400000, ++ } }, ++ { { /* 476 */ ++ 0x40000008, 0x00001000, 0x10112800, 0xc2a09080, ++ 0x00008a02, 0x3a0000e9, 0x80611011, 0x40220000, ++ } }, ++ { { /* 477 */ ++ 0x20000020, 0x48381a00, 0x00028421, 0x54ea0800, ++ 0x01425100, 0x0490200c, 0x20020000, 0x00600800, ++ } }, ++ { { /* 478 */ ++ 0x00e0c201, 0x00004810, 0x10a10001, 0x00000040, ++ 0x80108084, 0x00042000, 0x00002000, 0x00000004, ++ } }, ++ { { /* 479 */ ++ 0x00010014, 0x03005d00, 0x00008102, 0x00120000, ++ 0x51009000, 0x04000480, 0x0021c200, 0x0a888056, ++ } }, ++ { { /* 480 */ ++ 0xd2b60004, 0x13800000, 0x204803a8, 0x04501921, ++ 0x0a003004, 0x02100010, 0x00091100, 0x01070080, ++ } }, ++ { { /* 481 */ ++ 0x42004020, 0x08300000, 0x002a2444, 0x04046081, ++ 0x40046008, 0x00120000, 0x10000108, 0x00000000, ++ } }, ++ { { /* 482 */ ++ 0x00000084, 0x08001000, 0x0012e001, 0x045880c0, ++ 0x00010000, 0x00800022, 0x02401000, 0x00000000, ++ } }, ++ { { /* 483 */ ++ 0x4000d000, 0x00000850, 0x01000009, 0x0d840000, ++ 0x01080000, 0x42008000, 0x20000828, 0x40100040, ++ } }, ++ { { /* 484 */ ++ 0x51000100, 0x32000000, 0x001a0894, 0x04000040, ++ 0x00002102, 0x03428000, 0x018c0080, 0x00234010, ++ } }, ++ { { /* 485 */ ++ 0x00000040, 0x185c4000, 0x03000000, 0x40020004, ++ 0xa20200c9, 0x00000220, 0x00101050, 0x00120004, ++ } }, ++ { { /* 486 */ ++ 0x00000040, 0x44002400, 0x00000228, 0x20000020, ++ 0x000a0008, 0x18010000, 0x3c08830c, 0x40000684, ++ } }, ++ { { /* 487 */ ++ 0x80101800, 0x02000280, 0x0020000c, 0x08009004, ++ 0x00040000, 0x0004000c, 0x00018000, 0x14001000, ++ } }, ++ { { /* 488 */ ++ 0x08240000, 0x00200000, 0x20420014, 0x58112000, ++ 0x10004048, 0x010050c0, 0x0408228c, 0x12282040, ++ } }, ++ { { /* 489 */ ++ 0x00000000, 0x00000020, 0x24002000, 0x00000000, ++ 0x00800a00, 0x00080910, 0x1019a000, 0x60200030, ++ } }, ++ { { /* 490 */ ++ 0x00000080, 0x00000080, 0x08000000, 0x800050a0, ++ 0x80044000, 0x04001010, 0x80008080, 0x00000000, ++ } }, ++ { { /* 491 */ ++ 0x00000040, 0x00800000, 0x000c4283, 0x01020000, ++ 0x00888000, 0x00104008, 0x20000000, 0x04000080, ++ } }, ++ { { /* 492 */ ++ 0x20000104, 0x1802c021, 0x08100000, 0x0000004e, ++ 0x80000001, 0x30c00080, 0x00000040, 0x00401200, ++ } }, ++ { { /* 493 */ ++ 0x04945288, 0x00940400, 0x06400104, 0x10002000, ++ 0x00080010, 0x00400420, 0x00000102, 0x00408010, ++ } }, ++ { { /* 494 */ ++ 0x05000000, 0x40002240, 0x00100000, 0x0e400024, ++ 0x00000080, 0x80000440, 0x01018410, 0xb1804004, ++ } }, ++ { { /* 495 */ ++ 0x25000800, 0x20000000, 0x00800000, 0x0000804c, ++ 0x10020020, 0x42001000, 0x00082000, 0x00002000, ++ } }, ++ { { /* 496 */ ++ 0x11500020, 0x40004053, 0x11280500, 0x80060014, ++ 0x004c0101, 0x60002008, 0x44000000, 0x01000036, ++ } }, ++ { { /* 497 */ ++ 0x00010028, 0x01180000, 0x84041804, 0x00098000, ++ 0x00800000, 0x00000000, 0x00400002, 0x10004001, ++ } }, ++ { { /* 498 */ ++ 0x0051a004, 0x00008100, 0x00000024, 0x40041000, ++ 0x00040000, 0x00042001, 0x00000000, 0x00008000, ++ } }, ++ { { /* 499 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x20030000, ++ 0x00001840, 0x00020220, 0x04404002, 0x00204000, ++ } }, ++ { { /* 500 */ ++ 0x01008010, 0x00002080, 0x40008064, 0x00004031, ++ 0x10018090, 0x80304001, 0x000080a0, 0x80200040, ++ } }, ++ { { /* 501 */ ++ 0x00000001, 0x00000010, 0x00102088, 0x00800020, ++ 0x00120681, 0x100002a0, 0x00000042, 0x00000080, ++ } }, ++ { { /* 502 */ ++ 0x10000000, 0x21000a00, 0x00000200, 0x40000080, ++ 0x10110000, 0x00108200, 0x04000000, 0x00000400, ++ } }, ++ { { /* 503 */ ++ 0x80001000, 0x80002000, 0x40003008, 0x00000204, ++ 0x0801000a, 0x40000001, 0x00000000, 0x00000004, ++ } }, ++ { { /* 504 */ ++ 0x00000000, 0x00000000, 0x00020000, 0x00000000, ++ 0x88000000, 0x00002000, 0x08502000, 0x00840a00, ++ } }, ++ { { /* 505 */ ++ 0x31061808, 0x00000000, 0x00000000, 0x04000000, ++ 0x00000004, 0x00000240, 0x00100009, 0x00000000, ++ } }, ++ { { /* 506 */ ++ 0x00004002, 0x04002500, 0x00008040, 0x40a20100, ++ 0x00000001, 0x12412080, 0x04004008, 0x00042014, ++ } }, ++ { { /* 507 */ ++ 0x02000000, 0x00012000, 0x10000402, 0x000040c0, ++ 0x00080000, 0x5fe800a1, 0x04019402, 0x02000000, ++ } }, ++ { { /* 508 */ ++ 0x00040100, 0x00880000, 0x00401000, 0x00001012, ++ 0x00000000, 0x08004100, 0x00000010, 0x00000000, ++ } }, ++ { { /* 509 */ ++ 0x00000000, 0x00000000, 0x52020000, 0x10410080, ++ 0x00005000, 0x08400200, 0x80400010, 0x44400020, ++ } }, ++ { { /* 510 */ ++ 0x00084100, 0x10200d02, 0xa1200012, 0x00804804, ++ 0x00008212, 0xc6024000, 0x08100000, 0x205c1828, ++ } }, ++ { { /* 511 */ ++ 0x00000088, 0x00031000, 0x8000013f, 0x21184b44, ++ 0x100100f2, 0xa9002001, 0x08080840, 0x001b0001, ++ } }, ++ { { /* 512 */ ++ 0x28800112, 0x400020f0, 0x0910200c, 0x0a0010a0, ++ 0x80000020, 0x00000004, 0x1000000a, 0x00400000, ++ } }, ++ { { /* 513 */ ++ 0x00000000, 0x00002000, 0x00000080, 0x81000000, ++ 0x02c00020, 0x000004c5, 0x00000000, 0x00100100, ++ } }, ++ { { /* 514 */ ++ 0x20000000, 0x01080000, 0x00400022, 0x08000200, ++ 0x00408002, 0x20400028, 0x00000000, 0x00100000, ++ } }, ++ { { /* 515 */ ++ 0x08000008, 0x00420002, 0xa0a20003, 0x00022000, ++ 0x88000280, 0x65160000, 0x00040105, 0x00244041, ++ } }, ++ { { /* 516 */ ++ 0x80300000, 0x00184008, 0x00000880, 0x00201140, ++ 0x00000000, 0x02900000, 0x50004588, 0x00221043, ++ } }, ++ { { /* 517 */ ++ 0x12004000, 0x0b800000, 0x20002405, 0x0000000c, ++ 0x08000000, 0x11000410, 0x04000030, 0x00200043, ++ } }, ++ { { /* 518 */ ++ 0x80011000, 0x18008042, 0x11000000, 0x00001008, ++ 0x00008000, 0x24440000, 0x00800000, 0x80100005, ++ } }, ++ { { /* 519 */ ++ 0x00108204, 0x02102400, 0x00010001, 0x80000200, ++ 0xa080e80a, 0x00010000, 0x20008000, 0x80122200, ++ } }, ++ { { /* 520 */ ++ 0x88211404, 0x04208041, 0x20088020, 0x18040000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 521 */ ++ 0x00401004, 0x02100002, 0x40014210, 0x50006000, ++ 0x00080008, 0x20000820, 0x00100211, 0x10000000, ++ } }, ++ { { /* 522 */ ++ 0x91005400, 0x00000000, 0x00000000, 0x08000000, ++ 0x41610032, 0xa0029d44, 0x000000d2, 0x41020004, ++ } }, ++ { { /* 523 */ ++ 0x00800104, 0x020000c0, 0x04090030, 0x80000204, ++ 0x82004000, 0x00000020, 0x00000000, 0x00000000, ++ } }, ++ { { /* 524 */ ++ 0x00000000, 0x00000000, 0x00000080, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 525 */ ++ 0xc373ff8b, 0x1b0f6840, 0xf34ce9ac, 0xc0080200, ++ 0xca3e795c, 0x06487976, 0xf7f02fdf, 0xa8ff033a, ++ } }, ++ { { /* 526 */ ++ 0x233fef37, 0xfd59b004, 0xfffff3ca, 0xfff9de9f, ++ 0x7df7abff, 0x8eecc000, 0xffdbeebf, 0x45fad003, ++ } }, ++ { { /* 527 */ ++ 0xdffefae1, 0x10abbfef, 0xfcaaffeb, 0x24fdef3f, ++ 0x7f7678ad, 0xedfff00c, 0x2cfacff6, 0xeb6bf7f9, ++ } }, ++ { { /* 528 */ ++ 0x95bf1ffd, 0xbfbf6677, 0xfeb43bfb, 0x11e27bae, ++ 0x41bea681, 0x72c31435, 0x71917d70, 0x276b0003, ++ } }, ++ { { /* 529 */ ++ 0x70cf57cb, 0x0def4732, 0xfc747eda, 0xbdb4fe06, ++ 0x8bca3f9f, 0x58007e49, 0xebec228f, 0xddbb8a5c, ++ } }, ++ { { /* 530 */ ++ 0xb6e7ef60, 0xf293a40f, 0x549e37bb, 0x9bafd04b, ++ 0xf7d4c414, 0x0a1430b0, 0x88d02f08, 0x192fff7e, ++ } }, ++ { { /* 531 */ ++ 0xfb07ffda, 0x7beb7ff1, 0x0010c5ef, 0xfdff99ff, ++ 0x056779d7, 0xfdcbffe7, 0x4040c3ff, 0xbd8e6ff7, ++ } }, ++ { { /* 532 */ ++ 0x0497dffa, 0x5bfff4c0, 0xd0e7ed7b, 0xf8e0047e, ++ 0xb73eff9f, 0x882e7dfe, 0xbe7ffffd, 0xf6c483fe, ++ } }, ++ { { /* 533 */ ++ 0xb8fdf357, 0xef7dd680, 0x47885767, 0xc3dfff7d, ++ 0x37a9f0ff, 0x70fc7de0, 0xec9a3f6f, 0x86814cb3, ++ } }, ++ { { /* 534 */ ++ 0xdd5c3f9e, 0x4819f70d, 0x0007fea3, 0x38ffaf56, ++ 0xefb8980d, 0xb760403d, 0x9035d8ce, 0x3fff72bf, ++ } }, ++ { { /* 535 */ ++ 0x7a117ff7, 0xabfff7bb, 0x6fbeff00, 0xfe72a93c, ++ 0xf11bcfef, 0xf40adb6b, 0xef7ec3e6, 0xf6109b9c, ++ } }, ++ { { /* 536 */ ++ 0x16f4f048, 0x5182feb5, 0x15bbc7b1, 0xfbdf6e87, ++ 0x63cde43f, 0x7e7ec1ff, 0x7d5ffdeb, 0xfcfe777b, ++ } }, ++ { { /* 537 */ ++ 0xdbea960b, 0x53e86229, 0xfdef37df, 0xbd8136f5, ++ 0xfcbddc18, 0xffffd2e4, 0xffe03fd7, 0xabf87f6f, ++ } }, ++ { { /* 538 */ ++ 0x6ed99bae, 0xf115f5fb, 0xbdfb79a9, 0xadaf5a3c, ++ 0x1facdbba, 0x837971fc, 0xc35f7cf7, 0x0567dfff, ++ } }, ++ { { /* 539 */ ++ 0x8467ff9a, 0xdf8b1534, 0x3373f9f3, 0x5e1af7bd, ++ 0xa03fbf40, 0x01ebffff, 0xcfdddfc0, 0xabd37500, ++ } }, ++ { { /* 540 */ ++ 0xeed6f8c3, 0xb7ff43fd, 0x42275eaf, 0xf6869bac, ++ 0xf6bc27d7, 0x35b7f787, 0xe176aacd, 0xe29f49e7, ++ } }, ++ { { /* 541 */ ++ 0xaff2545c, 0x61d82b3f, 0xbbb8fc3b, 0x7b7dffcf, ++ 0x1ce0bf95, 0x43ff7dfd, 0xfffe5ff6, 0xc4ced3ef, ++ } }, ++ { { /* 542 */ ++ 0xadbc8db6, 0x11eb63dc, 0x23d0df59, 0xf3dbbeb4, ++ 0xdbc71fe7, 0xfae4ff63, 0x63f7b22b, 0xadbaed3b, ++ } }, ++ { { /* 543 */ ++ 0x7efffe01, 0x02bcfff7, 0xef3932ff, 0x8005fffc, ++ 0xbcf577fb, 0xfff7010d, 0xbf3afffb, 0xdfff0057, ++ } }, ++ { { /* 544 */ ++ 0xbd7def7b, 0xc8d4db88, 0xed7cfff3, 0x56ff5dee, ++ 0xac5f7e0d, 0xd57fff96, 0xc1403fee, 0xffe76ff9, ++ } }, ++ { { /* 545 */ ++ 0x8e77779b, 0xe45d6ebf, 0x5f1f6fcf, 0xfedfe07f, ++ 0x01fed7db, 0xfb7bff00, 0x1fdfffd4, 0xfffff800, ++ } }, ++ { { /* 546 */ ++ 0x007bfb8f, 0x7f5cbf00, 0x07f3ffff, 0x3de7eba0, ++ 0xfbd7f7bf, 0x6003ffbf, 0xbfedfffd, 0x027fefbb, ++ } }, ++ { { /* 547 */ ++ 0xddfdfe40, 0xe2f9fdff, 0xfb1f680b, 0xaffdfbe3, ++ 0xf7ed9fa4, 0xf80f7a7d, 0x0fd5eebe, 0xfd9fbb5d, ++ } }, ++ { { /* 548 */ ++ 0x3bf9f2db, 0xebccfe7f, 0x73fa876a, 0x9ffc95fc, ++ 0xfaf7109f, 0xbbcdddb7, 0xeccdf87e, 0x3c3ff366, ++ } }, ++ { { /* 549 */ ++ 0xb03ffffd, 0x067ee9f7, 0xfe0696ae, 0x5fd7d576, ++ 0xa3f33fd1, 0x6fb7cf07, 0x7f449fd1, 0xd3dd7b59, ++ } }, ++ { { /* 550 */ ++ 0xa9bdaf3b, 0xff3a7dcf, 0xf6ebfbe0, 0xffffb401, ++ 0xb7bf7afa, 0x0ffdc000, 0xff1fff7f, 0x95fffefc, ++ } }, ++ { { /* 551 */ ++ 0xb5dc0000, 0x3f3eef63, 0x001bfb7f, 0xfbf6e800, ++ 0xb8df9eef, 0x003fff9f, 0xf5ff7bd0, 0x3fffdfdb, ++ } }, ++ { { /* 552 */ ++ 0x00bffdf0, 0xbbbd8420, 0xffdedf37, 0x0ff3ff6d, ++ 0x5efb604c, 0xfafbfffb, 0x0219fe5e, 0xf9de79f4, ++ } }, ++ { { /* 553 */ ++ 0xebfaa7f7, 0xff3401eb, 0xef73ebd3, 0xc040afd7, ++ 0xdcff72bb, 0x2fd8f17f, 0xfe0bb8ec, 0x1f0bdda3, ++ } }, ++ { { /* 554 */ ++ 0x47cf8f1d, 0xffdeb12b, 0xda737fee, 0xcbc424ff, ++ 0xcbf2f75d, 0xb4edecfd, 0x4dddbff9, 0xfb8d99dd, ++ } }, ++ { { /* 555 */ ++ 0xaf7bbb7f, 0xc959ddfb, 0xfab5fc4f, 0x6d5fafe3, ++ 0x3f7dffff, 0xffdb7800, 0x7effb6ff, 0x022ffbaf, ++ } }, ++ { { /* 556 */ ++ 0xefc7ff9b, 0xffffffa5, 0xc7000007, 0xfff1f7ff, ++ 0x01bf7ffd, 0xfdbcdc00, 0xffffbff5, 0x3effff7f, ++ } }, ++ { { /* 557 */ ++ 0xbe000029, 0xff7ff9ff, 0xfd7e6efb, 0x039ecbff, ++ 0xfbdde300, 0xf6dfccff, 0x117fffff, 0xfbf6f800, ++ } }, ++ { { /* 558 */ ++ 0xd73ce7ef, 0xdfeffeef, 0xedbfc00b, 0xfdcdfedf, ++ 0x40fd7bf5, 0xb75fffff, 0xf930ffdf, 0xdc97fbdf, ++ } }, ++ { { /* 559 */ ++ 0xbff2fef3, 0xdfbf8fdf, 0xede6177f, 0x35530f7f, ++ 0x877e447c, 0x45bbfa12, 0x779eede0, 0xbfd98017, ++ } }, ++ { { /* 560 */ ++ 0xde897e55, 0x0447c16f, 0xf75d7ade, 0x290557ff, ++ 0xfe9586f7, 0xf32f97b3, 0x9f75cfff, 0xfb1771f7, ++ } }, ++ { { /* 561 */ ++ 0xee1934ee, 0xef6137cc, 0xef4c9fd6, 0xfbddd68f, ++ 0x6def7b73, 0xa431d7fe, 0x97d75e7f, 0xffd80f5b, ++ } }, ++ { { /* 562 */ ++ 0x7bce9d83, 0xdcff22ec, 0xef87763d, 0xfdeddfe7, ++ 0xa0fc4fff, 0xdbfc3b77, 0x7fdc3ded, 0xf5706fa9, ++ } }, ++ { { /* 563 */ ++ 0x2c403ffb, 0x847fff7f, 0xdeb7ec57, 0xf22fe69c, ++ 0xd5b50feb, 0xede7afeb, 0xfff08c2f, 0xe8f0537f, ++ } }, ++ { { /* 564 */ ++ 0xb5ffb99d, 0xe78fff66, 0xbe10d981, 0xe3c19c7c, ++ 0x27339cd1, 0xff6d0cbc, 0xefb7fcb7, 0xffffa0df, ++ } }, ++ { { /* 565 */ ++ 0xfe7bbf0b, 0x353fa3ff, 0x97cd13cc, 0xfb277637, ++ 0x7e6ccfd6, 0xed31ec50, 0xfc1c677c, 0x5fbff6fa, ++ } }, ++ { { /* 566 */ ++ 0xae2f0fba, 0x7ffea3ad, 0xde74fcf0, 0xf200ffef, ++ 0xfea2fbbf, 0xbcff3daf, 0x5fb9f694, 0x3f8ff3ad, ++ } }, ++ { { /* 567 */ ++ 0xa01ff26c, 0x01bfffef, 0x70057728, 0xda03ff35, ++ 0xc7fad2f9, 0x5c1d3fbf, 0xec33ff3a, 0xfe9cb7af, ++ } }, ++ { { /* 568 */ ++ 0x7a9f5236, 0xe722bffa, 0xfcff9ff7, 0xb61d2fbb, ++ 0x1dfded06, 0xefdf7dd7, 0xf166eb23, 0x0dc07ed9, ++ } }, ++ { { /* 569 */ ++ 0xdfbf3d3d, 0xba83c945, 0x9dd07dd1, 0xcf737b87, ++ 0xc3f59ff3, 0xc5fedf0d, 0x83020cb3, 0xaec0e879, ++ } }, ++ { { /* 570 */ ++ 0x6f0fc773, 0x093ffd7d, 0x0157fff1, 0x01ff62fb, ++ 0x3bf3fdb4, 0x43b2b013, 0xff305ed3, 0xeb9f0fff, ++ } }, ++ { { /* 571 */ ++ 0xf203feef, 0xfb893fef, 0x9e9937a9, 0xa72cdef9, ++ 0xc1f63733, 0xfe3e812e, 0xf2f75d20, 0x69d7d585, ++ } }, ++ { { /* 572 */ ++ 0xffffffff, 0xff6fdb07, 0xd97fc4ff, 0xbe0fefce, ++ 0xf05ef17b, 0xffb7f6cf, 0xef845ef7, 0x0edfd7cb, ++ } }, ++ { { /* 573 */ ++ 0xfcffff08, 0xffffee3f, 0xd7ff13ff, 0x7ffdaf0f, ++ 0x1ffabdc7, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 574 */ ++ 0x00000000, 0xe7400000, 0xf933bd38, 0xfeed7feb, ++ 0x7c767fe8, 0xffefb3f7, 0xd8b7feaf, 0xfbbfff6f, ++ } }, ++ { { /* 575 */ ++ 0xdbf7f8fb, 0xe2f91752, 0x754785c8, 0xe3ef9090, ++ 0x3f6d9ef4, 0x0536ee2e, 0x7ff3f7bc, 0x7f3fa07b, ++ } }, ++ { { /* 576 */ ++ 0xeb600567, 0x6601babe, 0x583ffcd8, 0x87dfcaf7, ++ 0xffa0bfcd, 0xfebf5bcd, 0xefa7b6fd, 0xdf9c77ef, ++ } }, ++ { { /* 577 */ ++ 0xf8773fb7, 0xb7fc9d27, 0xdfefcab5, 0xf1b6fb5a, ++ 0xef1fec39, 0x7ffbfbbf, 0xdafe000d, 0x4e7fbdfb, ++ } }, ++ { { /* 578 */ ++ 0x5ac033ff, 0x9ffebff5, 0x005fffbf, 0xfdf80000, ++ 0x6ffdffca, 0xa001cffd, 0xfbf2dfff, 0xff7fdfbf, ++ } }, ++ { { /* 579 */ ++ 0x080ffeda, 0xbfffba08, 0xeed77afd, 0x67f9fbeb, ++ 0xff93e044, 0x9f57df97, 0x08dffef7, 0xfedfdf80, ++ } }, ++ { { /* 580 */ ++ 0xf7feffc5, 0x6803fffb, 0x6bfa67fb, 0x5fe27fff, ++ 0xff73ffff, 0xe7fb87df, 0xf7a7ebfd, 0xefc7bf7e, ++ } }, ++ { { /* 581 */ ++ 0xdf821ef3, 0xdf7e76ff, 0xda7d79c9, 0x1e9befbe, ++ 0x77fb7ce0, 0xfffb87be, 0xffdb1bff, 0x4fe03f5c, ++ } }, ++ { { /* 582 */ ++ 0x5f0e7fff, 0xddbf77ff, 0xfffff04f, 0x0ff8ffff, ++ 0xfddfa3be, 0xfffdfc1c, 0xfb9e1f7d, 0xdedcbdff, ++ } }, ++ { { /* 583 */ ++ 0xbafb3f6f, 0xfbefdf7f, 0x2eec7d1b, 0xf2f7af8e, ++ 0xcfee7b0f, 0x77c61d96, 0xfff57e07, 0x7fdfd982, ++ } }, ++ { { /* 584 */ ++ 0xc7ff5ee6, 0x79effeee, 0xffcf9a56, 0xde5efe5f, ++ 0xf9e8896e, 0xe6c4f45e, 0xbe7c0001, 0xdddf3b7f, ++ } }, ++ { { /* 585 */ ++ 0xe9efd59d, 0xde5334ac, 0x4bf7f573, 0x9eff7b4f, ++ 0x476eb8fe, 0xff450dfb, 0xfbfeabfd, 0xddffe9d7, ++ } }, ++ { { /* 586 */ ++ 0x7fffedf7, 0x7eebddfd, 0xb7ffcfe7, 0xef91bde9, ++ 0xd77c5d75, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 587 */ ++ 0x00000000, 0xfa800000, 0xb4f1ffee, 0x2fefbf76, ++ 0x77bfb677, 0xfffd9fbf, 0xf6ae95bf, 0x7f3b75ff, ++ } }, ++ { { /* 588 */ ++ 0x0af9a7f5, 0x00000000, 0x00000000, 0x2bddfbd0, ++ 0x9a7ff633, 0xd6fcfdab, 0xbfebf9e6, 0xf41fdfdf, ++ } }, ++ { { /* 589 */ ++ 0xffffa6fd, 0xf37b4aff, 0xfef97fb7, 0x1d5cb6ff, ++ 0xe5ff7ff6, 0x24041f7b, 0xf99ebe05, 0xdff2dbe3, ++ } }, ++ { { /* 590 */ ++ 0xfdff6fef, 0xcbfcd679, 0xefffebfd, 0x0000001f, ++ 0x98000000, 0x8017e148, 0x00fe6a74, 0xfdf16d7f, ++ } }, ++ { { /* 591 */ ++ 0xfef3b87f, 0xf176e01f, 0x7b3fee96, 0xfffdeb8d, ++ 0xcbb3adff, 0xe17f84ef, 0xbff04daa, 0xfe3fbf3f, ++ } }, ++ { { /* 592 */ ++ 0xffd7ebff, 0xcf7fffdf, 0x85edfffb, 0x07bcd73f, ++ 0xfe0faeff, 0x76bffdaf, 0x37bbfaef, 0xa3ba7fdc, ++ } }, ++ { { /* 593 */ ++ 0x56f7b6ff, 0xe7df60f8, 0x4cdfff61, 0xff45b0fb, ++ 0x3ffa7ded, 0x18fc1fff, 0xe3afffff, 0xdf83c7d3, ++ } }, ++ { { /* 594 */ ++ 0xef7dfb57, 0x1378efff, 0x5ff7fec0, 0x5ee334bb, ++ 0xeff6f70d, 0x00bfd7fe, 0xf7f7f59d, 0xffe051de, ++ } }, ++ { { /* 595 */ ++ 0x037ffec9, 0xbfef5f01, 0x60a79ff1, 0xf1ffef1d, ++ 0x0000000f, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++ { { /* 596 */ ++ 0x00000000, 0x00000000, 0x00000000, 0x3c800000, ++ 0xd91ffb4d, 0xfee37b3a, 0xdc7f3fe9, 0x0000003f, ++ } }, ++ { { /* 597 */ ++ 0x50000000, 0xbe07f51f, 0xf91bfc1d, 0x71ffbc1e, ++ 0x5bbe6ff9, 0x9b1b5796, 0xfffc7fff, 0xafe7872e, ++ } }, ++ { { /* 598 */ ++ 0xf34febf5, 0xe725dffd, 0x5d440bdc, 0xfddd5747, ++ 0x7790ed3f, 0x8ac87d7f, 0xf3f9fafa, 0xef4b202a, ++ } }, ++ { { /* 599 */ ++ 0x79cff5ff, 0x0ba5abd3, 0xfb8ff77a, 0x001f8ebd, ++ 0x00000000, 0xfd4ef300, 0x88001a57, 0x7654aeac, ++ } }, ++ { { /* 600 */ ++ 0xcdff17ad, 0xf42fffb2, 0xdbff5baa, 0x00000002, ++ 0x73c00000, 0x2e3ff9ea, 0xbbfffa8e, 0xffd376bc, ++ } }, ++ { { /* 601 */ ++ 0x7e72eefe, 0xe7f77ebd, 0xcefdf77f, 0x00000ff5, ++ 0x00000000, 0xdb9ba900, 0x917fa4c7, 0x7ecef8ca, ++ } }, ++ { { /* 602 */ ++ 0xc7e77d7a, 0xdcaecbbd, 0x8f76fd7e, 0x7cf391d3, ++ 0x4c2f01e5, 0xa360ed77, 0x5ef807db, 0x21811df7, ++ } }, ++ { { /* 603 */ ++ 0x309c6be0, 0xfade3b3a, 0xc3f57f53, 0x07ba61cd, ++ 0x00000000, 0x00000000, 0x00000000, 0xbefe26e0, ++ } }, ++ { { /* 604 */ ++ 0xebb503f9, 0xe9cbe36d, 0xbfde9c2f, 0xabbf9f83, ++ 0xffd51ff7, 0xdffeb7df, 0xffeffdae, 0xeffdfb7e, ++ } }, ++ { { /* 605 */ ++ 0x6ebfaaff, 0x00000000, 0x00000000, 0xb6200000, ++ 0xbe9e7fcd, 0x58f162b3, 0xfd7bf10d, 0xbefde9f1, ++ } }, ++ { { /* 606 */ ++ 0x5f6dc6c3, 0x69ffff3d, 0xfbf4ffcf, 0x4ff7dcfb, ++ 0x11372000, 0x00000015, 0x00000000, 0x00000000, ++ } }, ++ { { /* 607 */ ++ 0x00003000, 0x00000000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ++ } }, ++}, ++{ ++ /* aa */ ++ LEAF( 0, 0), ++ /* ab */ ++ LEAF( 1, 1), ++ /* af */ ++ LEAF( 2, 2), LEAF( 2, 3), ++ /* ak */ ++ LEAF( 4, 4), LEAF( 4, 5), LEAF( 4, 6), LEAF( 4, 7), ++ LEAF( 4, 8), ++ /* am */ ++ LEAF( 9, 9), LEAF( 9, 10), ++ /* an */ ++ LEAF( 11, 11), ++ /* ar */ ++ LEAF( 12, 12), ++ /* as */ ++ LEAF( 13, 13), ++ /* av */ ++ LEAF( 14, 14), ++ /* ay */ ++ LEAF( 15, 15), ++ /* az_az */ ++ LEAF( 16, 16), LEAF( 16, 17), LEAF( 16, 18), ++ /* az_ir */ ++ LEAF( 19, 19), ++ /* ba */ ++ LEAF( 20, 20), ++ /* be */ ++ LEAF( 21, 21), ++ /* ber_dz */ ++ LEAF( 22, 22), LEAF( 22, 23), LEAF( 22, 24), LEAF( 22, 25), ++ /* ber_ma */ ++ LEAF( 26, 26), ++ /* bg */ ++ LEAF( 27, 27), ++ /* bh */ ++ LEAF( 28, 28), ++ /* bi */ ++ LEAF( 29, 29), ++ /* bin */ ++ LEAF( 30, 30), LEAF( 30, 31), LEAF( 30, 32), ++ /* bm */ ++ LEAF( 33, 22), LEAF( 33, 33), LEAF( 33, 34), ++ /* bn */ ++ LEAF( 36, 35), ++ /* bo */ ++ LEAF( 37, 36), ++ /* br */ ++ LEAF( 38, 37), ++ /* bs */ ++ LEAF( 39, 22), LEAF( 39, 38), ++ /* bua */ ++ LEAF( 41, 39), ++ /* byn */ ++ LEAF( 42, 40), LEAF( 42, 41), ++ /* ca */ ++ LEAF( 44, 42), LEAF( 44, 43), ++ /* ch */ ++ LEAF( 46, 44), ++ /* chm */ ++ LEAF( 47, 45), ++ /* chr */ ++ LEAF( 48, 46), ++ /* co */ ++ LEAF( 49, 47), LEAF( 49, 48), ++ /* crh */ ++ LEAF( 51, 49), LEAF( 51, 50), ++ /* cs */ ++ LEAF( 53, 51), LEAF( 53, 52), ++ /* csb */ ++ LEAF( 55, 53), LEAF( 55, 54), ++ /* cu */ ++ LEAF( 57, 55), ++ /* cv */ ++ LEAF( 58, 56), LEAF( 58, 57), ++ /* cy */ ++ LEAF( 60, 58), LEAF( 60, 59), LEAF( 60, 60), ++ /* da */ ++ LEAF( 63, 61), ++ /* de */ ++ LEAF( 64, 62), ++ /* dv */ ++ LEAF( 65, 63), ++ /* ee */ ++ LEAF( 66, 30), LEAF( 66, 64), LEAF( 66, 65), LEAF( 66, 66), ++ /* el */ ++ LEAF( 70, 67), ++ /* en */ ++ LEAF( 71, 68), ++ /* eo */ ++ LEAF( 72, 22), LEAF( 72, 69), ++ /* et */ ++ LEAF( 74, 70), LEAF( 74, 71), ++ /* eu */ ++ LEAF( 76, 72), ++ /* ff */ ++ LEAF( 77, 22), LEAF( 77, 73), LEAF( 77, 74), ++ /* fi */ ++ LEAF( 80, 75), LEAF( 80, 71), ++ /* fil */ ++ LEAF( 82, 76), ++ /* fj */ ++ LEAF( 83, 22), ++ /* fo */ ++ LEAF( 84, 77), ++ /* fur */ ++ LEAF( 85, 78), ++ /* fy */ ++ LEAF( 86, 79), ++ /* ga */ ++ LEAF( 87, 80), LEAF( 87, 81), LEAF( 87, 82), ++ /* gd */ ++ LEAF( 90, 83), ++ /* gez */ ++ LEAF( 91, 84), LEAF( 91, 85), ++ /* gn */ ++ LEAF( 93, 86), LEAF( 93, 87), LEAF( 93, 88), ++ /* gu */ ++ LEAF( 96, 89), ++ /* gv */ ++ LEAF( 97, 90), ++ /* ha */ ++ LEAF( 98, 22), LEAF( 98, 91), LEAF( 98, 92), ++ /* haw */ ++ LEAF(101, 22), LEAF(101, 93), LEAF(101, 94), ++ /* he */ ++ LEAF(104, 95), ++ /* hsb */ ++ LEAF(105, 96), LEAF(105, 97), ++ /* ht */ ++ LEAF(107, 98), ++ /* hu */ ++ LEAF(108, 99), LEAF(108,100), ++ /* hy */ ++ LEAF(110,101), ++ /* hz */ ++ LEAF(111, 22), LEAF(111,102), LEAF(111,103), ++ /* id */ ++ LEAF(114,104), ++ /* ig */ ++ LEAF(115, 22), LEAF(115,105), ++ /* ii */ ++ LEAF(117,106), LEAF(117,106), LEAF(117,106), LEAF(117,106), ++ LEAF(117,107), ++ /* ik */ ++ LEAF(122,108), ++ /* is */ ++ LEAF(123,109), ++ /* it */ ++ LEAF(124,110), ++ /* iu */ ++ LEAF(125,111), LEAF(125,112), LEAF(125,113), ++ /* ja */ ++ LEAF(128,114), LEAF(128,115), LEAF(128,116), LEAF(128,117), ++ LEAF(128,118), LEAF(128,119), LEAF(128,120), LEAF(128,121), ++ LEAF(128,122), LEAF(128,123), LEAF(128,124), LEAF(128,125), ++ LEAF(128,126), LEAF(128,127), LEAF(128,128), LEAF(128,129), ++ LEAF(128,130), LEAF(128,131), LEAF(128,132), LEAF(128,133), ++ LEAF(128,134), LEAF(128,135), LEAF(128,136), LEAF(128,137), ++ LEAF(128,138), LEAF(128,139), LEAF(128,140), LEAF(128,141), ++ LEAF(128,142), LEAF(128,143), LEAF(128,144), LEAF(128,145), ++ LEAF(128,146), LEAF(128,147), LEAF(128,148), LEAF(128,149), ++ LEAF(128,150), LEAF(128,151), LEAF(128,152), LEAF(128,153), ++ LEAF(128,154), LEAF(128,155), LEAF(128,156), LEAF(128,157), ++ LEAF(128,158), LEAF(128,159), LEAF(128,160), LEAF(128,161), ++ LEAF(128,162), LEAF(128,163), LEAF(128,164), LEAF(128,165), ++ LEAF(128,166), LEAF(128,167), LEAF(128,168), LEAF(128,169), ++ LEAF(128,170), LEAF(128,171), LEAF(128,172), LEAF(128,173), ++ LEAF(128,174), LEAF(128,175), LEAF(128,176), LEAF(128,177), ++ LEAF(128,178), LEAF(128,179), LEAF(128,180), LEAF(128,181), ++ LEAF(128,182), LEAF(128,183), LEAF(128,184), LEAF(128,185), ++ LEAF(128,186), LEAF(128,187), LEAF(128,188), LEAF(128,189), ++ LEAF(128,190), LEAF(128,191), LEAF(128,192), LEAF(128,193), ++ LEAF(128,194), LEAF(128,195), LEAF(128,196), ++ /* jv */ ++ LEAF(211,197), ++ /* ka */ ++ LEAF(212,198), ++ /* kaa */ ++ LEAF(213,199), ++ /* ki */ ++ LEAF(214, 22), LEAF(214,200), ++ /* kk */ ++ LEAF(216,201), ++ /* kl */ ++ LEAF(217,202), LEAF(217,203), ++ /* km */ ++ LEAF(219,204), ++ /* kn */ ++ LEAF(220,205), ++ /* ko */ ++ LEAF(221,206), LEAF(221,207), LEAF(221,208), LEAF(221,209), ++ LEAF(221,210), LEAF(221,211), LEAF(221,212), LEAF(221,213), ++ LEAF(221,214), LEAF(221,215), LEAF(221,216), LEAF(221,217), ++ LEAF(221,218), LEAF(221,219), LEAF(221,220), LEAF(221,221), ++ LEAF(221,222), LEAF(221,223), LEAF(221,224), LEAF(221,225), ++ LEAF(221,226), LEAF(221,227), LEAF(221,228), LEAF(221,229), ++ LEAF(221,230), LEAF(221,231), LEAF(221,232), LEAF(221,233), ++ LEAF(221,234), LEAF(221,235), LEAF(221,236), LEAF(221,237), ++ LEAF(221,238), LEAF(221,239), LEAF(221,240), LEAF(221,241), ++ LEAF(221,242), LEAF(221,243), LEAF(221,244), LEAF(221,245), ++ LEAF(221,246), LEAF(221,247), LEAF(221,248), LEAF(221,249), ++ LEAF(221,250), ++ /* kr */ ++ LEAF(266, 22), LEAF(266,251), LEAF(266,252), ++ /* ks */ ++ LEAF(269,253), ++ /* ku_am */ ++ LEAF(270,254), LEAF(270,255), ++ /* ku_iq */ ++ LEAF(272,256), ++ /* ku_tr */ ++ LEAF(273,257), LEAF(273,258), ++ /* kum */ ++ LEAF(275,259), ++ /* kv */ ++ LEAF(276,260), ++ /* kw */ ++ LEAF(277, 22), LEAF(277, 93), LEAF(277,261), ++ /* ky */ ++ LEAF(280,262), ++ /* la */ ++ LEAF(281, 22), LEAF(281,263), ++ /* lb */ ++ LEAF(283,264), ++ /* lg */ ++ LEAF(284, 22), LEAF(284,265), ++ /* li */ ++ LEAF(286,266), ++ /* ln */ ++ LEAF(287,267), LEAF(287,268), LEAF(287, 6), LEAF(287,269), ++ /* lo */ ++ LEAF(291,270), ++ /* lt */ ++ LEAF(292, 22), LEAF(292,271), ++ /* lv */ ++ LEAF(294, 22), LEAF(294,272), ++ /* mg */ ++ LEAF(296,273), ++ /* mh */ ++ LEAF(297, 22), LEAF(297,274), ++ /* mi */ ++ LEAF(299, 22), LEAF(299, 93), LEAF(299,275), ++ /* mk */ ++ LEAF(302,276), ++ /* ml */ ++ LEAF(303,277), ++ /* mn_cn */ ++ LEAF(304,278), ++ /* mn_mn */ ++ LEAF(305,279), ++ /* mo */ ++ LEAF(306,280), LEAF(306, 56), LEAF(306,281), LEAF(306,259), ++ /* mt */ ++ LEAF(310,282), LEAF(310,283), ++ /* my */ ++ LEAF(312,284), ++ /* na */ ++ LEAF(313, 4), LEAF(313,285), ++ /* nb */ ++ LEAF(315,286), ++ /* nl */ ++ LEAF(316,287), ++ /* nn */ ++ LEAF(317,288), ++ /* nso */ ++ LEAF(318,289), LEAF(318,290), ++ /* nv */ ++ LEAF(320,291), LEAF(320,292), LEAF(320,293), LEAF(320,294), ++ /* ny */ ++ LEAF(324, 22), LEAF(324,295), ++ /* oc */ ++ LEAF(326,296), ++ /* or */ ++ LEAF(327,297), ++ /* ota */ ++ LEAF(328,298), ++ /* pa */ ++ LEAF(329,299), ++ /* pap_an */ ++ LEAF(330,300), ++ /* pap_aw */ ++ LEAF(331,301), ++ /* pl */ ++ LEAF(332, 96), LEAF(332,302), ++ /* ps_af */ ++ LEAF(334,303), ++ /* ps_pk */ ++ LEAF(335,304), ++ /* pt */ ++ LEAF(336,305), ++ /* qu */ ++ LEAF(337,301), LEAF(337,306), ++ /* rm */ ++ LEAF(339,307), ++ /* ro */ ++ LEAF(340,280), LEAF(340, 56), LEAF(340,281), ++ /* sah */ ++ LEAF(343,308), ++ /* sc */ ++ LEAF(344,309), ++ /* sco */ ++ LEAF(345, 22), LEAF(345,310), LEAF(345,311), ++ /* sd */ ++ LEAF(348,312), ++ /* se */ ++ LEAF(349,313), LEAF(349,314), ++ /* sg */ ++ LEAF(351,315), ++ /* sh */ ++ LEAF(352, 22), LEAF(352, 38), LEAF(352,316), ++ /* shs */ ++ LEAF(355,317), LEAF(355,318), ++ /* si */ ++ LEAF(357,319), ++ /* sid */ ++ LEAF(358,320), LEAF(358, 10), ++ /* sk */ ++ LEAF(360,321), LEAF(360,322), ++ /* sm */ ++ LEAF(362, 22), LEAF(362, 94), ++ /* sma */ ++ LEAF(364,323), ++ /* smj */ ++ LEAF(365,324), ++ /* smn */ ++ LEAF(366,325), LEAF(366,326), ++ /* sms */ ++ LEAF(368,327), LEAF(368,328), LEAF(368,329), ++ /* sq */ ++ LEAF(371,330), ++ /* sr */ ++ LEAF(372,331), ++ /* sv */ ++ LEAF(373,332), ++ /* syr */ ++ LEAF(374,333), ++ /* ta */ ++ LEAF(375,334), ++ /* te */ ++ LEAF(376,335), ++ /* tg */ ++ LEAF(377,336), ++ /* th */ ++ LEAF(378,337), ++ /* tig */ ++ LEAF(379,338), LEAF(379, 41), ++ /* tk */ ++ LEAF(381,339), LEAF(381,340), ++ /* tr */ ++ LEAF(383,341), LEAF(383, 50), ++ /* tt */ ++ LEAF(385,342), ++ /* ty */ ++ LEAF(386,343), LEAF(386, 93), LEAF(386,293), ++ /* uk */ ++ LEAF(389,344), ++ /* ve */ ++ LEAF(390, 22), LEAF(390,345), ++ /* vi */ ++ LEAF(392,346), LEAF(392,347), LEAF(392,348), LEAF(392,349), ++ /* vo */ ++ LEAF(396,350), ++ /* vot */ ++ LEAF(397,351), LEAF(397, 71), ++ /* wa */ ++ LEAF(399,352), ++ /* wen */ ++ LEAF(400, 96), LEAF(400,353), ++ /* wo */ ++ LEAF(402,354), LEAF(402,265), ++ /* yap */ ++ LEAF(404,355), ++ /* yo */ ++ LEAF(405,356), LEAF(405,357), LEAF(405,358), LEAF(405,359), ++ /* zh_cn */ ++ LEAF(409,360), LEAF(409,361), LEAF(409,362), LEAF(409,363), ++ LEAF(409,364), LEAF(409,365), LEAF(409,366), LEAF(409,367), ++ LEAF(409,368), LEAF(409,369), LEAF(409,370), LEAF(409,371), ++ LEAF(409,372), LEAF(409,373), LEAF(409,374), LEAF(409,375), ++ LEAF(409,376), LEAF(409,377), LEAF(409,378), LEAF(409,379), ++ LEAF(409,380), LEAF(409,381), LEAF(409,382), LEAF(409,383), ++ LEAF(409,384), LEAF(409,385), LEAF(409,386), LEAF(409,387), ++ LEAF(409,388), LEAF(409,389), LEAF(409,390), LEAF(409,391), ++ LEAF(409,392), LEAF(409,393), LEAF(409,394), LEAF(409,395), ++ LEAF(409,396), LEAF(409,397), LEAF(409,398), LEAF(409,399), ++ LEAF(409,400), LEAF(409,401), LEAF(409,402), LEAF(409,403), ++ LEAF(409,404), LEAF(409,405), LEAF(409,406), LEAF(409,407), ++ LEAF(409,408), LEAF(409,409), LEAF(409,410), LEAF(409,411), ++ LEAF(409,412), LEAF(409,413), LEAF(409,414), LEAF(409,415), ++ LEAF(409,416), LEAF(409,417), LEAF(409,418), LEAF(409,419), ++ LEAF(409,420), LEAF(409,421), LEAF(409,422), LEAF(409,423), ++ LEAF(409,424), LEAF(409,425), LEAF(409,426), LEAF(409,427), ++ LEAF(409,428), LEAF(409,429), LEAF(409,430), LEAF(409,431), ++ LEAF(409,432), LEAF(409,433), LEAF(409,434), LEAF(409,435), ++ LEAF(409,436), LEAF(409,437), LEAF(409,438), LEAF(409,439), ++ LEAF(409,440), LEAF(409,441), ++ /* zh_hk */ ++ LEAF(491,442), LEAF(491,443), LEAF(491,444), LEAF(491,445), ++ LEAF(491,446), LEAF(491,447), LEAF(491,448), LEAF(491,449), ++ LEAF(491,450), LEAF(491,451), LEAF(491,452), LEAF(491,453), ++ LEAF(491,454), LEAF(491,455), LEAF(491,456), LEAF(491,457), ++ LEAF(491,458), LEAF(491,459), LEAF(491,460), LEAF(491,461), ++ LEAF(491,462), LEAF(491,463), LEAF(491,464), LEAF(491,465), ++ LEAF(491,466), LEAF(491,467), LEAF(491,468), LEAF(491,469), ++ LEAF(491,470), LEAF(491,471), LEAF(491,472), LEAF(491,473), ++ LEAF(491,474), LEAF(491,475), LEAF(491,476), LEAF(491,477), ++ LEAF(491,478), LEAF(491,479), LEAF(491,480), LEAF(491,481), ++ LEAF(491,482), LEAF(491,483), LEAF(491,484), LEAF(491,485), ++ LEAF(491,486), LEAF(491,487), LEAF(491,488), LEAF(491,489), ++ LEAF(491,490), LEAF(491,491), LEAF(491,492), LEAF(491,493), ++ LEAF(491,494), LEAF(491,495), LEAF(491,496), LEAF(491,497), ++ LEAF(491,498), LEAF(491,499), LEAF(491,500), LEAF(491,501), ++ LEAF(491,502), LEAF(491,503), LEAF(491,504), LEAF(491,505), ++ LEAF(491,506), LEAF(491,507), LEAF(491,508), LEAF(491,509), ++ LEAF(491,510), LEAF(491,511), LEAF(491,512), LEAF(491,513), ++ LEAF(491,514), LEAF(491,515), LEAF(491,516), LEAF(491,517), ++ LEAF(491,518), LEAF(491,519), LEAF(491,520), LEAF(491,521), ++ LEAF(491,522), LEAF(491,523), LEAF(491,524), ++ /* zh_tw */ ++ LEAF(574,525), LEAF(574,526), LEAF(574,527), LEAF(574,528), ++ LEAF(574,529), LEAF(574,530), LEAF(574,531), LEAF(574,532), ++ LEAF(574,533), LEAF(574,534), LEAF(574,535), LEAF(574,536), ++ LEAF(574,537), LEAF(574,538), LEAF(574,539), LEAF(574,540), ++ LEAF(574,541), LEAF(574,542), LEAF(574,543), LEAF(574,544), ++ LEAF(574,545), LEAF(574,546), LEAF(574,547), LEAF(574,548), ++ LEAF(574,549), LEAF(574,550), LEAF(574,551), LEAF(574,552), ++ LEAF(574,553), LEAF(574,554), LEAF(574,555), LEAF(574,556), ++ LEAF(574,557), LEAF(574,558), LEAF(574,559), LEAF(574,560), ++ LEAF(574,561), LEAF(574,562), LEAF(574,563), LEAF(574,564), ++ LEAF(574,565), LEAF(574,566), LEAF(574,567), LEAF(574,568), ++ LEAF(574,569), LEAF(574,570), LEAF(574,571), LEAF(574,572), ++ LEAF(574,573), LEAF(574,574), LEAF(574,575), LEAF(574,576), ++ LEAF(574,577), LEAF(574,578), LEAF(574,579), LEAF(574,580), ++ LEAF(574,581), LEAF(574,582), LEAF(574,583), LEAF(574,584), ++ LEAF(574,585), LEAF(574,586), LEAF(574,587), LEAF(574,588), ++ LEAF(574,589), LEAF(574,590), LEAF(574,591), LEAF(574,592), ++ LEAF(574,593), LEAF(574,594), LEAF(574,595), LEAF(574,596), ++ LEAF(574,597), LEAF(574,598), LEAF(574,599), LEAF(574,600), ++ LEAF(574,601), LEAF(574,602), LEAF(574,603), LEAF(574,604), ++ LEAF(574,605), LEAF(574,606), LEAF(574,607), ++}, ++{ ++ /* aa */ ++ 0x0000, ++ /* ab */ ++ 0x0004, ++ /* af */ ++ 0x0000, 0x0001, ++ /* ak */ ++ 0x0000, 0x0001, 0x0002, 0x0003, 0x001e, ++ /* am */ ++ 0x0012, 0x0013, ++ /* an */ ++ 0x0000, ++ /* ar */ ++ 0x0006, ++ /* as */ ++ 0x0009, ++ /* av */ ++ 0x0004, ++ /* ay */ ++ 0x0000, ++ /* az_az */ ++ 0x0000, 0x0001, 0x0002, ++ /* az_ir */ ++ 0x0006, ++ /* ba */ ++ 0x0004, ++ /* be */ ++ 0x0004, ++ /* ber_dz */ ++ 0x0000, 0x0001, 0x0002, 0x001e, ++ /* ber_ma */ ++ 0x002d, ++ /* bg */ ++ 0x0004, ++ /* bh */ ++ 0x0009, ++ /* bi */ ++ 0x0000, ++ /* bin */ ++ 0x0000, 0x0003, 0x001e, ++ /* bm */ ++ 0x0000, 0x0001, 0x0002, ++ /* bn */ ++ 0x0009, ++ /* bo */ ++ 0x000f, ++ /* br */ ++ 0x0000, ++ /* bs */ ++ 0x0000, 0x0001, ++ /* bua */ ++ 0x0004, ++ /* byn */ ++ 0x0012, 0x0013, ++ /* ca */ ++ 0x0000, 0x0001, ++ /* ch */ ++ 0x0000, ++ /* chm */ ++ 0x0004, ++ /* chr */ ++ 0x0013, ++ /* co */ ++ 0x0000, 0x0001, ++ /* crh */ ++ 0x0000, 0x0001, ++ /* cs */ ++ 0x0000, 0x0001, ++ /* csb */ ++ 0x0000, 0x0001, ++ /* cu */ ++ 0x0004, ++ /* cv */ ++ 0x0001, 0x0004, ++ /* cy */ ++ 0x0000, 0x0001, 0x001e, ++ /* da */ ++ 0x0000, ++ /* de */ ++ 0x0000, ++ /* dv */ ++ 0x0007, ++ /* ee */ ++ 0x0000, 0x0001, 0x0002, 0x0003, ++ /* el */ ++ 0x0003, ++ /* en */ ++ 0x0000, ++ /* eo */ ++ 0x0000, 0x0001, ++ /* et */ ++ 0x0000, 0x0001, ++ /* eu */ ++ 0x0000, ++ /* ff */ ++ 0x0000, 0x0001, 0x0002, ++ /* fi */ ++ 0x0000, 0x0001, ++ /* fil */ ++ 0x0000, ++ /* fj */ ++ 0x0000, ++ /* fo */ ++ 0x0000, ++ /* fur */ ++ 0x0000, ++ /* fy */ ++ 0x0000, ++ /* ga */ ++ 0x0000, 0x0001, 0x001e, ++ /* gd */ ++ 0x0000, ++ /* gez */ ++ 0x0012, 0x0013, ++ /* gn */ ++ 0x0000, 0x0001, 0x001e, ++ /* gu */ ++ 0x000a, ++ /* gv */ ++ 0x0000, ++ /* ha */ ++ 0x0000, 0x0001, 0x0002, ++ /* haw */ ++ 0x0000, 0x0001, 0x0002, ++ /* he */ ++ 0x0005, ++ /* hsb */ ++ 0x0000, 0x0001, ++ /* ht */ ++ 0x0000, ++ /* hu */ ++ 0x0000, 0x0001, ++ /* hy */ ++ 0x0005, ++ /* hz */ ++ 0x0000, 0x0003, 0x001e, ++ /* id */ ++ 0x0000, ++ /* ig */ ++ 0x0000, 0x001e, ++ /* ii */ ++ 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, ++ /* ik */ ++ 0x0004, ++ /* is */ ++ 0x0000, ++ /* it */ ++ 0x0000, ++ /* iu */ ++ 0x0014, 0x0015, 0x0016, ++ /* ja */ ++ 0x0030, 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, ++ 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, ++ 0x005d, 0x005e, 0x005f, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, ++ 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, ++ 0x006d, 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, ++ 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, ++ 0x007d, 0x007e, 0x007f, 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, ++ 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, ++ 0x008d, 0x008e, 0x008f, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, ++ 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, ++ 0x009d, 0x009e, 0x009f, ++ /* jv */ ++ 0x0000, ++ /* ka */ ++ 0x0010, ++ /* kaa */ ++ 0x0004, ++ /* ki */ ++ 0x0000, 0x0001, ++ /* kk */ ++ 0x0004, ++ /* kl */ ++ 0x0000, 0x0001, ++ /* km */ ++ 0x0017, ++ /* kn */ ++ 0x000c, ++ /* ko */ ++ 0x0031, 0x00ac, 0x00ad, 0x00ae, 0x00af, 0x00b0, 0x00b1, 0x00b2, ++ 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x00ba, ++ 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, 0x00c0, 0x00c1, 0x00c2, ++ 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, ++ 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, 0x00d0, 0x00d1, 0x00d2, ++ 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, ++ /* kr */ ++ 0x0000, 0x0001, 0x0002, ++ /* ks */ ++ 0x0006, ++ /* ku_am */ ++ 0x0004, 0x0005, ++ /* ku_iq */ ++ 0x0006, ++ /* ku_tr */ ++ 0x0000, 0x0001, ++ /* kum */ ++ 0x0004, ++ /* kv */ ++ 0x0004, ++ /* kw */ ++ 0x0000, 0x0001, 0x0002, ++ /* ky */ ++ 0x0004, ++ /* la */ ++ 0x0000, 0x0001, ++ /* lb */ ++ 0x0000, ++ /* lg */ ++ 0x0000, 0x0001, ++ /* li */ ++ 0x0000, ++ /* ln */ ++ 0x0000, 0x0001, 0x0002, 0x0003, ++ /* lo */ ++ 0x000e, ++ /* lt */ ++ 0x0000, 0x0001, ++ /* lv */ ++ 0x0000, 0x0001, ++ /* mg */ ++ 0x0000, ++ /* mh */ ++ 0x0000, 0x0001, ++ /* mi */ ++ 0x0000, 0x0001, 0x001e, ++ /* mk */ ++ 0x0004, ++ /* ml */ ++ 0x000d, ++ /* mn_cn */ ++ 0x0018, ++ /* mn_mn */ ++ 0x0004, ++ /* mo */ ++ 0x0000, 0x0001, 0x0002, 0x0004, ++ /* mt */ ++ 0x0000, 0x0001, ++ /* my */ ++ 0x0010, ++ /* na */ ++ 0x0000, 0x0001, ++ /* nb */ ++ 0x0000, ++ /* nl */ ++ 0x0000, ++ /* nn */ ++ 0x0000, ++ /* nso */ ++ 0x0000, 0x0001, ++ /* nv */ ++ 0x0000, 0x0001, 0x0002, 0x0003, ++ /* ny */ ++ 0x0000, 0x0001, ++ /* oc */ ++ 0x0000, ++ /* or */ ++ 0x000b, ++ /* ota */ ++ 0x0006, ++ /* pa */ ++ 0x000a, ++ /* pap_an */ ++ 0x0000, ++ /* pap_aw */ ++ 0x0000, ++ /* pl */ ++ 0x0000, 0x0001, ++ /* ps_af */ ++ 0x0006, ++ /* ps_pk */ ++ 0x0006, ++ /* pt */ ++ 0x0000, ++ /* qu */ ++ 0x0000, 0x0002, ++ /* rm */ ++ 0x0000, ++ /* ro */ ++ 0x0000, 0x0001, 0x0002, ++ /* sah */ ++ 0x0004, ++ /* sc */ ++ 0x0000, ++ /* sco */ ++ 0x0000, 0x0001, 0x0002, ++ /* sd */ ++ 0x0006, ++ /* se */ ++ 0x0000, 0x0001, ++ /* sg */ ++ 0x0000, ++ /* sh */ ++ 0x0000, 0x0001, 0x0004, ++ /* shs */ ++ 0x0000, 0x0003, ++ /* si */ ++ 0x000d, ++ /* sid */ ++ 0x0012, 0x0013, ++ /* sk */ ++ 0x0000, 0x0001, ++ /* sm */ ++ 0x0000, 0x0002, ++ /* sma */ ++ 0x0000, ++ /* smj */ ++ 0x0000, ++ /* smn */ ++ 0x0000, 0x0001, ++ /* sms */ ++ 0x0000, 0x0001, 0x0002, ++ /* sq */ ++ 0x0000, ++ /* sr */ ++ 0x0004, ++ /* sv */ ++ 0x0000, ++ /* syr */ ++ 0x0007, ++ /* ta */ ++ 0x000b, ++ /* te */ ++ 0x000c, ++ /* tg */ ++ 0x0004, ++ /* th */ ++ 0x000e, ++ /* tig */ ++ 0x0012, 0x0013, ++ /* tk */ ++ 0x0000, 0x0001, ++ /* tr */ ++ 0x0000, 0x0001, ++ /* tt */ ++ 0x0004, ++ /* ty */ ++ 0x0000, 0x0001, 0x0002, ++ /* uk */ ++ 0x0004, ++ /* ve */ ++ 0x0000, 0x001e, ++ /* vi */ ++ 0x0000, 0x0001, 0x0003, 0x001e, ++ /* vo */ ++ 0x0000, ++ /* vot */ ++ 0x0000, 0x0001, ++ /* wa */ ++ 0x0000, ++ /* wen */ ++ 0x0000, 0x0001, ++ /* wo */ ++ 0x0000, 0x0001, ++ /* yap */ ++ 0x0000, ++ /* yo */ ++ 0x0000, 0x0001, 0x0003, 0x001e, ++ /* zh_cn */ ++ 0x0002, 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, ++ 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, ++ 0x005d, 0x005e, 0x005f, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, ++ 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, ++ 0x006d, 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, ++ 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, ++ 0x007d, 0x007e, 0x007f, 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, ++ 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, ++ 0x008d, 0x008e, 0x008f, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, ++ 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, ++ 0x009e, 0x009f, ++ /* zh_hk */ ++ 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, ++ 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, ++ 0x005e, 0x005f, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, ++ 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, ++ 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, ++ 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, ++ 0x007e, 0x007f, 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, ++ 0x0086, 0x0087, 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, ++ 0x008e, 0x008f, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, ++ 0x0096, 0x0097, 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, ++ 0x009e, 0x009f, 0x0205, ++ /* zh_tw */ ++ 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, ++ 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, ++ 0x005e, 0x005f, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, ++ 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, ++ 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, ++ 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, ++ 0x007e, 0x007f, 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, ++ 0x0086, 0x0087, 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, ++ 0x008e, 0x008f, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, ++ 0x0096, 0x0097, 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, ++ 0x009e, 0x009f, 0x00fa, ++}, ++{ ++ 0, /* aa */ ++ 1, /* ab */ ++ 2, /* af */ ++ 190, /* ak */ ++ 3, /* am */ ++ 191, /* an */ ++ 4, /* ar */ ++ 5, /* as */ ++ 6, /* ast */ ++ 7, /* av */ ++ 8, /* ay */ ++ 9, /* az_az */ ++ 10, /* az_ir */ ++ 11, /* ba */ ++ 13, /* be */ ++ 192, /* ber_dz */ ++ 193, /* ber_ma */ ++ 14, /* bg */ ++ 15, /* bh */ ++ 16, /* bho */ ++ 17, /* bi */ ++ 18, /* bin */ ++ 12, /* bm */ ++ 19, /* bn */ ++ 20, /* bo */ ++ 21, /* br */ ++ 22, /* bs */ ++ 23, /* bua */ ++ 194, /* byn */ ++ 24, /* ca */ ++ 25, /* ce */ ++ 26, /* ch */ ++ 27, /* chm */ ++ 28, /* chr */ ++ 29, /* co */ ++ 195, /* crh */ ++ 30, /* cs */ ++ 196, /* csb */ ++ 31, /* cu */ ++ 32, /* cv */ ++ 33, /* cy */ ++ 34, /* da */ ++ 35, /* de */ ++ 197, /* dv */ ++ 36, /* dz */ ++ 198, /* ee */ ++ 37, /* el */ ++ 38, /* en */ ++ 39, /* eo */ ++ 40, /* es */ ++ 41, /* et */ ++ 42, /* eu */ ++ 43, /* fa */ ++ 199, /* fat */ ++ 48, /* ff */ ++ 44, /* fi */ ++ 200, /* fil */ ++ 45, /* fj */ ++ 46, /* fo */ ++ 47, /* fr */ ++ 49, /* fur */ ++ 50, /* fy */ ++ 51, /* ga */ ++ 52, /* gd */ ++ 53, /* gez */ ++ 54, /* gl */ ++ 55, /* gn */ ++ 56, /* gu */ ++ 57, /* gv */ ++ 58, /* ha */ ++ 59, /* haw */ ++ 60, /* he */ ++ 61, /* hi */ ++ 201, /* hne */ ++ 62, /* ho */ ++ 63, /* hr */ ++ 202, /* hsb */ ++ 203, /* ht */ ++ 64, /* hu */ ++ 65, /* hy */ ++ 204, /* hz */ ++ 66, /* ia */ ++ 68, /* id */ ++ 69, /* ie */ ++ 67, /* ig */ ++ 205, /* ii */ ++ 70, /* ik */ ++ 71, /* io */ ++ 72, /* is */ ++ 73, /* it */ ++ 74, /* iu */ ++ 75, /* ja */ ++ 206, /* jv */ ++ 76, /* ka */ ++ 77, /* kaa */ ++ 207, /* kab */ ++ 78, /* ki */ ++ 208, /* kj */ ++ 79, /* kk */ ++ 80, /* kl */ ++ 81, /* km */ ++ 82, /* kn */ ++ 83, /* ko */ ++ 84, /* kok */ ++ 209, /* kr */ ++ 85, /* ks */ ++ 86, /* ku_am */ ++ 210, /* ku_iq */ ++ 87, /* ku_ir */ ++ 211, /* ku_tr */ ++ 88, /* kum */ ++ 89, /* kv */ ++ 90, /* kw */ ++ 212, /* kwm */ ++ 91, /* ky */ ++ 92, /* la */ ++ 237, /* lah */ ++ 93, /* lb */ ++ 94, /* lez */ ++ 213, /* lg */ ++ 214, /* li */ ++ 95, /* ln */ ++ 96, /* lo */ ++ 97, /* lt */ ++ 98, /* lv */ ++ 215, /* mai */ ++ 99, /* mg */ ++ 100, /* mh */ ++ 101, /* mi */ ++ 102, /* mk */ ++ 103, /* ml */ ++ 104, /* mn_cn */ ++ 216, /* mn_mn */ ++ 105, /* mo */ ++ 106, /* mr */ ++ 217, /* ms */ ++ 107, /* mt */ ++ 108, /* my */ ++ 218, /* na */ ++ 109, /* nb */ ++ 110, /* nds */ ++ 111, /* ne */ ++ 219, /* ng */ ++ 112, /* nl */ ++ 113, /* nn */ ++ 114, /* no */ ++ 115, /* nr */ ++ 116, /* nso */ ++ 220, /* nv */ ++ 117, /* ny */ ++ 118, /* oc */ ++ 119, /* om */ ++ 120, /* or */ ++ 121, /* os */ ++ 221, /* ota */ ++ 122, /* pa */ ++ 222, /* pa_pk */ ++ 223, /* pap_an */ ++ 224, /* pap_aw */ ++ 123, /* pl */ ++ 124, /* ps_af */ ++ 125, /* ps_pk */ ++ 126, /* pt */ ++ 225, /* qu */ ++ 127, /* rm */ ++ 226, /* rn */ ++ 128, /* ro */ ++ 129, /* ru */ ++ 227, /* rw */ ++ 130, /* sa */ ++ 131, /* sah */ ++ 228, /* sc */ ++ 132, /* sco */ ++ 229, /* sd */ ++ 133, /* se */ ++ 134, /* sel */ ++ 230, /* sg */ ++ 135, /* sh */ ++ 136, /* shs */ ++ 137, /* si */ ++ 231, /* sid */ ++ 138, /* sk */ ++ 139, /* sl */ ++ 140, /* sm */ ++ 141, /* sma */ ++ 142, /* smj */ ++ 143, /* smn */ ++ 144, /* sms */ ++ 232, /* sn */ ++ 145, /* so */ ++ 146, /* sq */ ++ 147, /* sr */ ++ 148, /* ss */ ++ 149, /* st */ ++ 233, /* su */ ++ 150, /* sv */ ++ 151, /* sw */ ++ 152, /* syr */ ++ 153, /* ta */ ++ 154, /* te */ ++ 155, /* tg */ ++ 156, /* th */ ++ 157, /* ti_er */ ++ 158, /* ti_et */ ++ 159, /* tig */ ++ 160, /* tk */ ++ 161, /* tl */ ++ 162, /* tn */ ++ 163, /* to */ ++ 164, /* tr */ ++ 165, /* ts */ ++ 166, /* tt */ ++ 167, /* tw */ ++ 234, /* ty */ ++ 168, /* tyv */ ++ 169, /* ug */ ++ 170, /* uk */ ++ 171, /* ur */ ++ 172, /* uz */ ++ 173, /* ve */ ++ 174, /* vi */ ++ 175, /* vo */ ++ 176, /* vot */ ++ 177, /* wa */ ++ 235, /* wal */ ++ 178, /* wen */ ++ 179, /* wo */ ++ 180, /* xh */ ++ 181, /* yap */ ++ 182, /* yi */ ++ 183, /* yo */ ++ 236, /* za */ ++ 184, /* zh_cn */ ++ 185, /* zh_hk */ ++ 186, /* zh_mo */ ++ 187, /* zh_sg */ ++ 188, /* zh_tw */ ++ 189, /* zu */ ++}, ++{ ++ 0, /* aa */ ++ 1, /* ab */ ++ 2, /* af */ ++ 4, /* am */ ++ 6, /* ar */ ++ 7, /* as */ ++ 8, /* ast */ ++ 9, /* av */ ++ 10, /* ay */ ++ 11, /* az_az */ ++ 12, /* az_ir */ ++ 13, /* ba */ ++ 22, /* bm */ ++ 14, /* be */ ++ 17, /* bg */ ++ 18, /* bh */ ++ 19, /* bho */ ++ 20, /* bi */ ++ 21, /* bin */ ++ 23, /* bn */ ++ 24, /* bo */ ++ 25, /* br */ ++ 26, /* bs */ ++ 27, /* bua */ ++ 29, /* ca */ ++ 30, /* ce */ ++ 31, /* ch */ ++ 32, /* chm */ ++ 33, /* chr */ ++ 34, /* co */ ++ 36, /* cs */ ++ 38, /* cu */ ++ 39, /* cv */ ++ 40, /* cy */ ++ 41, /* da */ ++ 42, /* de */ ++ 44, /* dz */ ++ 46, /* el */ ++ 47, /* en */ ++ 48, /* eo */ ++ 49, /* es */ ++ 50, /* et */ ++ 51, /* eu */ ++ 52, /* fa */ ++ 55, /* fi */ ++ 57, /* fj */ ++ 58, /* fo */ ++ 59, /* fr */ ++ 54, /* ff */ ++ 60, /* fur */ ++ 61, /* fy */ ++ 62, /* ga */ ++ 63, /* gd */ ++ 64, /* gez */ ++ 65, /* gl */ ++ 66, /* gn */ ++ 67, /* gu */ ++ 68, /* gv */ ++ 69, /* ha */ ++ 70, /* haw */ ++ 71, /* he */ ++ 72, /* hi */ ++ 74, /* ho */ ++ 75, /* hr */ ++ 78, /* hu */ ++ 79, /* hy */ ++ 81, /* ia */ ++ 84, /* ig */ ++ 82, /* id */ ++ 83, /* ie */ ++ 86, /* ik */ ++ 87, /* io */ ++ 88, /* is */ ++ 89, /* it */ ++ 90, /* iu */ ++ 91, /* ja */ ++ 93, /* ka */ ++ 94, /* kaa */ ++ 96, /* ki */ ++ 98, /* kk */ ++ 99, /* kl */ ++ 100, /* km */ ++ 101, /* kn */ ++ 102, /* ko */ ++ 103, /* kok */ ++ 105, /* ks */ ++ 106, /* ku_am */ ++ 108, /* ku_ir */ ++ 110, /* kum */ ++ 111, /* kv */ ++ 112, /* kw */ ++ 114, /* ky */ ++ 115, /* la */ ++ 117, /* lb */ ++ 118, /* lez */ ++ 121, /* ln */ ++ 122, /* lo */ ++ 123, /* lt */ ++ 124, /* lv */ ++ 126, /* mg */ ++ 127, /* mh */ ++ 128, /* mi */ ++ 129, /* mk */ ++ 130, /* ml */ ++ 131, /* mn_cn */ ++ 133, /* mo */ ++ 134, /* mr */ ++ 136, /* mt */ ++ 137, /* my */ ++ 139, /* nb */ ++ 140, /* nds */ ++ 141, /* ne */ ++ 143, /* nl */ ++ 144, /* nn */ ++ 145, /* no */ ++ 146, /* nr */ ++ 147, /* nso */ ++ 149, /* ny */ ++ 150, /* oc */ ++ 151, /* om */ ++ 152, /* or */ ++ 153, /* os */ ++ 155, /* pa */ ++ 159, /* pl */ ++ 160, /* ps_af */ ++ 161, /* ps_pk */ ++ 162, /* pt */ ++ 164, /* rm */ ++ 166, /* ro */ ++ 167, /* ru */ ++ 169, /* sa */ ++ 170, /* sah */ ++ 172, /* sco */ ++ 174, /* se */ ++ 175, /* sel */ ++ 177, /* sh */ ++ 178, /* shs */ ++ 179, /* si */ ++ 181, /* sk */ ++ 182, /* sl */ ++ 183, /* sm */ ++ 184, /* sma */ ++ 185, /* smj */ ++ 186, /* smn */ ++ 187, /* sms */ ++ 189, /* so */ ++ 190, /* sq */ ++ 191, /* sr */ ++ 192, /* ss */ ++ 193, /* st */ ++ 195, /* sv */ ++ 196, /* sw */ ++ 197, /* syr */ ++ 198, /* ta */ ++ 199, /* te */ ++ 200, /* tg */ ++ 201, /* th */ ++ 202, /* ti_er */ ++ 203, /* ti_et */ ++ 204, /* tig */ ++ 205, /* tk */ ++ 206, /* tl */ ++ 207, /* tn */ ++ 208, /* to */ ++ 209, /* tr */ ++ 210, /* ts */ ++ 211, /* tt */ ++ 212, /* tw */ ++ 214, /* tyv */ ++ 215, /* ug */ ++ 216, /* uk */ ++ 217, /* ur */ ++ 218, /* uz */ ++ 219, /* ve */ ++ 220, /* vi */ ++ 221, /* vo */ ++ 222, /* vot */ ++ 223, /* wa */ ++ 225, /* wen */ ++ 226, /* wo */ ++ 227, /* xh */ ++ 228, /* yap */ ++ 229, /* yi */ ++ 230, /* yo */ ++ 232, /* zh_cn */ ++ 233, /* zh_hk */ ++ 234, /* zh_mo */ ++ 235, /* zh_sg */ ++ 236, /* zh_tw */ ++ 237, /* zu */ ++ 3, /* ak */ ++ 5, /* an */ ++ 15, /* ber_dz */ ++ 16, /* ber_ma */ ++ 28, /* byn */ ++ 35, /* crh */ ++ 37, /* csb */ ++ 43, /* dv */ ++ 45, /* ee */ ++ 53, /* fat */ ++ 56, /* fil */ ++ 73, /* hne */ ++ 76, /* hsb */ ++ 77, /* ht */ ++ 80, /* hz */ ++ 85, /* ii */ ++ 92, /* jv */ ++ 95, /* kab */ ++ 97, /* kj */ ++ 104, /* kr */ ++ 107, /* ku_iq */ ++ 109, /* ku_tr */ ++ 113, /* kwm */ ++ 119, /* lg */ ++ 120, /* li */ ++ 125, /* mai */ ++ 132, /* mn_mn */ ++ 135, /* ms */ ++ 138, /* na */ ++ 142, /* ng */ ++ 148, /* nv */ ++ 154, /* ota */ ++ 156, /* pa_pk */ ++ 157, /* pap_an */ ++ 158, /* pap_aw */ ++ 163, /* qu */ ++ 165, /* rn */ ++ 168, /* rw */ ++ 171, /* sc */ ++ 173, /* sd */ ++ 176, /* sg */ ++ 180, /* sid */ ++ 188, /* sn */ ++ 194, /* su */ ++ 213, /* ty */ ++ 224, /* wal */ ++ 231, /* za */ ++ 116, /* lah */ ++} ++}; ++ ++#define NUM_LANG_CHAR_SET 238 ++#define NUM_LANG_SET_MAP 8 ++ ++static const FcChar32 fcLangCountrySets[][NUM_LANG_SET_MAP] = { ++ { 0x00000600, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }, /* az */ ++ { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, }, /* ber */ ++ { 0x00000000, 0x00000000, 0x00c00000, 0x00000000, 0x00000000, 0x00000000, 0x000c0000, 0x00000000, }, /* ku */ ++ { 0x00000000, 0x00000000, 0x00000000, 0x00000100, 0x00000000, 0x00000000, 0x01000000, 0x00000000, }, /* mn */ ++ { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40000000, 0x00000000, }, /* pa */ ++ { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x00000001, }, /* pap */ ++ { 0x00000000, 0x00000000, 0x00000000, 0x30000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }, /* ps */ ++ { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x60000000, 0x00000000, 0x00000000, 0x00000000, }, /* ti */ ++ { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x1f000000, 0x00000000, 0x00000000, }, /* zh */ ++}; ++ ++#define NUM_COUNTRY_SET 9 ++ ++static const FcLangCharSetRange fcLangCharSetRanges[] = { ++ ++ { 0, 12 }, /* a */ ++ { 13, 28 }, /* b */ ++ { 29, 40 }, /* c */ ++ { 41, 44 }, /* d */ ++ { 45, 51 }, /* e */ ++ { 52, 61 }, /* f */ ++ { 62, 68 }, /* g */ ++ { 69, 80 }, /* h */ ++ { 81, 90 }, /* i */ ++ { 91, 92 }, /* j */ ++ { 93, 114 }, /* k */ ++ { 115, 124 }, /* l */ ++ { 125, 137 }, /* m */ ++ { 138, 149 }, /* n */ ++ { 150, 154 }, /* o */ ++ { 155, 162 }, /* p */ ++ { 163, 163 }, /* q */ ++ { 164, 168 }, /* r */ ++ { 169, 197 }, /* s */ ++ { 198, 214 }, /* t */ ++ { 215, 218 }, /* u */ ++ { 219, 222 }, /* v */ ++ { 223, 226 }, /* w */ ++ { 227, 227 }, /* x */ ++ { 228, 230 }, /* y */ ++ { 231, 237 }, /* z */ ++}; ++ +--- misc/fontconfig-2.8.0/src/fcalias.h Wed Aug 20 14:33:55 2008 ++++ misc/build/fontconfig-2.8.0/src/fcalias.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,369 @@ +-dummy ++extern __typeof (FcBlanksCreate) IA__FcBlanksCreate __attribute((visibility("hidden"))); ++#define FcBlanksCreate IA__FcBlanksCreate ++extern __typeof (FcBlanksDestroy) IA__FcBlanksDestroy __attribute((visibility("hidden"))); ++#define FcBlanksDestroy IA__FcBlanksDestroy ++extern __typeof (FcBlanksAdd) IA__FcBlanksAdd __attribute((visibility("hidden"))); ++#define FcBlanksAdd IA__FcBlanksAdd ++extern __typeof (FcBlanksIsMember) IA__FcBlanksIsMember __attribute((visibility("hidden"))); ++#define FcBlanksIsMember IA__FcBlanksIsMember ++extern __typeof (FcCacheCopySet) IA__FcCacheCopySet __attribute((visibility("hidden"))); ++#define FcCacheCopySet IA__FcCacheCopySet ++extern __typeof (FcCacheNumSubdir) IA__FcCacheNumSubdir __attribute((visibility("hidden"))); ++#define FcCacheNumSubdir IA__FcCacheNumSubdir ++extern __typeof (FcCacheNumFont) IA__FcCacheNumFont __attribute((visibility("hidden"))); ++#define FcCacheNumFont IA__FcCacheNumFont ++extern __typeof (FcDirCacheUnlink) IA__FcDirCacheUnlink __attribute((visibility("hidden"))); ++#define FcDirCacheUnlink IA__FcDirCacheUnlink ++extern __typeof (FcDirCacheValid) IA__FcDirCacheValid __attribute((visibility("hidden"))); ++#define FcDirCacheValid IA__FcDirCacheValid ++extern __typeof (FcConfigHome) IA__FcConfigHome __attribute((visibility("hidden"))); ++#define FcConfigHome IA__FcConfigHome ++extern __typeof (FcConfigEnableHome) IA__FcConfigEnableHome __attribute((visibility("hidden"))); ++#define FcConfigEnableHome IA__FcConfigEnableHome ++extern __typeof (FcConfigFilename) IA__FcConfigFilename __attribute((visibility("hidden"))); ++#define FcConfigFilename IA__FcConfigFilename ++extern __typeof (FcConfigCreate) IA__FcConfigCreate __attribute((visibility("hidden"))); ++#define FcConfigCreate IA__FcConfigCreate ++extern __typeof (FcConfigReference) IA__FcConfigReference __attribute((visibility("hidden"))); ++#define FcConfigReference IA__FcConfigReference ++extern __typeof (FcConfigDestroy) IA__FcConfigDestroy __attribute((visibility("hidden"))); ++#define FcConfigDestroy IA__FcConfigDestroy ++extern __typeof (FcConfigSetCurrent) IA__FcConfigSetCurrent __attribute((visibility("hidden"))); ++#define FcConfigSetCurrent IA__FcConfigSetCurrent ++extern __typeof (FcConfigGetCurrent) IA__FcConfigGetCurrent __attribute((visibility("hidden"))); ++#define FcConfigGetCurrent IA__FcConfigGetCurrent ++extern __typeof (FcConfigUptoDate) IA__FcConfigUptoDate __attribute((visibility("hidden"))); ++#define FcConfigUptoDate IA__FcConfigUptoDate ++extern __typeof (FcConfigBuildFonts) IA__FcConfigBuildFonts __attribute((visibility("hidden"))); ++#define FcConfigBuildFonts IA__FcConfigBuildFonts ++extern __typeof (FcConfigGetFontDirs) IA__FcConfigGetFontDirs __attribute((visibility("hidden"))); ++#define FcConfigGetFontDirs IA__FcConfigGetFontDirs ++extern __typeof (FcConfigGetConfigDirs) IA__FcConfigGetConfigDirs __attribute((visibility("hidden"))); ++#define FcConfigGetConfigDirs IA__FcConfigGetConfigDirs ++extern __typeof (FcConfigGetConfigFiles) IA__FcConfigGetConfigFiles __attribute((visibility("hidden"))); ++#define FcConfigGetConfigFiles IA__FcConfigGetConfigFiles ++extern __typeof (FcConfigGetCache) IA__FcConfigGetCache __attribute((visibility("hidden"))); ++#define FcConfigGetCache IA__FcConfigGetCache ++extern __typeof (FcConfigGetBlanks) IA__FcConfigGetBlanks __attribute((visibility("hidden"))); ++#define FcConfigGetBlanks IA__FcConfigGetBlanks ++extern __typeof (FcConfigGetCacheDirs) IA__FcConfigGetCacheDirs __attribute((visibility("hidden"))); ++#define FcConfigGetCacheDirs IA__FcConfigGetCacheDirs ++extern __typeof (FcConfigGetRescanInterval) IA__FcConfigGetRescanInterval __attribute((visibility("hidden"))); ++#define FcConfigGetRescanInterval IA__FcConfigGetRescanInterval ++extern __typeof (FcConfigSetRescanInterval) IA__FcConfigSetRescanInterval __attribute((visibility("hidden"))); ++#define FcConfigSetRescanInterval IA__FcConfigSetRescanInterval ++extern __typeof (FcConfigGetFonts) IA__FcConfigGetFonts __attribute((visibility("hidden"))); ++#define FcConfigGetFonts IA__FcConfigGetFonts ++extern __typeof (FcConfigAppFontAddFile) IA__FcConfigAppFontAddFile __attribute((visibility("hidden"))); ++#define FcConfigAppFontAddFile IA__FcConfigAppFontAddFile ++extern __typeof (FcConfigAppFontAddDir) IA__FcConfigAppFontAddDir __attribute((visibility("hidden"))); ++#define FcConfigAppFontAddDir IA__FcConfigAppFontAddDir ++extern __typeof (FcConfigAppFontClear) IA__FcConfigAppFontClear __attribute((visibility("hidden"))); ++#define FcConfigAppFontClear IA__FcConfigAppFontClear ++extern __typeof (FcConfigSubstituteWithPat) IA__FcConfigSubstituteWithPat __attribute((visibility("hidden"))); ++#define FcConfigSubstituteWithPat IA__FcConfigSubstituteWithPat ++extern __typeof (FcConfigSubstitute) IA__FcConfigSubstitute __attribute((visibility("hidden"))); ++#define FcConfigSubstitute IA__FcConfigSubstitute ++extern __typeof (FcCharSetCreate) IA__FcCharSetCreate __attribute((visibility("hidden"))); ++#define FcCharSetCreate IA__FcCharSetCreate ++extern __typeof (FcCharSetNew) IA__FcCharSetNew __attribute((visibility("hidden"))); ++#define FcCharSetNew IA__FcCharSetNew ++extern __typeof (FcCharSetDestroy) IA__FcCharSetDestroy __attribute((visibility("hidden"))); ++#define FcCharSetDestroy IA__FcCharSetDestroy ++extern __typeof (FcCharSetAddChar) IA__FcCharSetAddChar __attribute((visibility("hidden"))); ++#define FcCharSetAddChar IA__FcCharSetAddChar ++extern __typeof (FcCharSetCopy) IA__FcCharSetCopy __attribute((visibility("hidden"))); ++#define FcCharSetCopy IA__FcCharSetCopy ++extern __typeof (FcCharSetEqual) IA__FcCharSetEqual __attribute((visibility("hidden"))); ++#define FcCharSetEqual IA__FcCharSetEqual ++extern __typeof (FcCharSetIntersect) IA__FcCharSetIntersect __attribute((visibility("hidden"))); ++#define FcCharSetIntersect IA__FcCharSetIntersect ++extern __typeof (FcCharSetUnion) IA__FcCharSetUnion __attribute((visibility("hidden"))); ++#define FcCharSetUnion IA__FcCharSetUnion ++extern __typeof (FcCharSetSubtract) IA__FcCharSetSubtract __attribute((visibility("hidden"))); ++#define FcCharSetSubtract IA__FcCharSetSubtract ++extern __typeof (FcCharSetMerge) IA__FcCharSetMerge __attribute((visibility("hidden"))); ++#define FcCharSetMerge IA__FcCharSetMerge ++extern __typeof (FcCharSetHasChar) IA__FcCharSetHasChar __attribute((visibility("hidden"))); ++#define FcCharSetHasChar IA__FcCharSetHasChar ++extern __typeof (FcCharSetCount) IA__FcCharSetCount __attribute((visibility("hidden"))); ++#define FcCharSetCount IA__FcCharSetCount ++extern __typeof (FcCharSetIntersectCount) IA__FcCharSetIntersectCount __attribute((visibility("hidden"))); ++#define FcCharSetIntersectCount IA__FcCharSetIntersectCount ++extern __typeof (FcCharSetSubtractCount) IA__FcCharSetSubtractCount __attribute((visibility("hidden"))); ++#define FcCharSetSubtractCount IA__FcCharSetSubtractCount ++extern __typeof (FcCharSetIsSubset) IA__FcCharSetIsSubset __attribute((visibility("hidden"))); ++#define FcCharSetIsSubset IA__FcCharSetIsSubset ++extern __typeof (FcCharSetFirstPage) IA__FcCharSetFirstPage __attribute((visibility("hidden"))); ++#define FcCharSetFirstPage IA__FcCharSetFirstPage ++extern __typeof (FcCharSetNextPage) IA__FcCharSetNextPage __attribute((visibility("hidden"))); ++#define FcCharSetNextPage IA__FcCharSetNextPage ++extern __typeof (FcCharSetCoverage) IA__FcCharSetCoverage __attribute((visibility("hidden"))); ++#define FcCharSetCoverage IA__FcCharSetCoverage ++extern __typeof (FcValuePrint) IA__FcValuePrint __attribute((visibility("hidden"))); ++#define FcValuePrint IA__FcValuePrint ++extern __typeof (FcPatternPrint) IA__FcPatternPrint __attribute((visibility("hidden"))); ++#define FcPatternPrint IA__FcPatternPrint ++extern __typeof (FcFontSetPrint) IA__FcFontSetPrint __attribute((visibility("hidden"))); ++#define FcFontSetPrint IA__FcFontSetPrint ++extern __typeof (FcDefaultSubstitute) IA__FcDefaultSubstitute __attribute((visibility("hidden"))); ++#define FcDefaultSubstitute IA__FcDefaultSubstitute ++extern __typeof (FcFileIsDir) IA__FcFileIsDir __attribute((visibility("hidden"))); ++#define FcFileIsDir IA__FcFileIsDir ++extern __typeof (FcFileScan) IA__FcFileScan __attribute((visibility("hidden"))); ++#define FcFileScan IA__FcFileScan ++extern __typeof (FcDirScan) IA__FcDirScan __attribute((visibility("hidden"))); ++#define FcDirScan IA__FcDirScan ++extern __typeof (FcDirSave) IA__FcDirSave __attribute((visibility("hidden"))); ++#define FcDirSave IA__FcDirSave ++extern __typeof (FcDirCacheLoad) IA__FcDirCacheLoad __attribute((visibility("hidden"))); ++#define FcDirCacheLoad IA__FcDirCacheLoad ++extern __typeof (FcDirCacheRead) IA__FcDirCacheRead __attribute((visibility("hidden"))); ++#define FcDirCacheRead IA__FcDirCacheRead ++extern __typeof (FcDirCacheLoadFile) IA__FcDirCacheLoadFile __attribute((visibility("hidden"))); ++#define FcDirCacheLoadFile IA__FcDirCacheLoadFile ++extern __typeof (FcDirCacheUnload) IA__FcDirCacheUnload __attribute((visibility("hidden"))); ++#define FcDirCacheUnload IA__FcDirCacheUnload ++extern __typeof (FcFreeTypeQuery) IA__FcFreeTypeQuery __attribute((visibility("hidden"))); ++#define FcFreeTypeQuery IA__FcFreeTypeQuery ++extern __typeof (FcFontSetCreate) IA__FcFontSetCreate __attribute((visibility("hidden"))); ++#define FcFontSetCreate IA__FcFontSetCreate ++extern __typeof (FcFontSetDestroy) IA__FcFontSetDestroy __attribute((visibility("hidden"))); ++#define FcFontSetDestroy IA__FcFontSetDestroy ++extern __typeof (FcFontSetAdd) IA__FcFontSetAdd __attribute((visibility("hidden"))); ++#define FcFontSetAdd IA__FcFontSetAdd ++extern __typeof (FcInitLoadConfig) IA__FcInitLoadConfig __attribute((visibility("hidden"))); ++#define FcInitLoadConfig IA__FcInitLoadConfig ++extern __typeof (FcInitLoadConfigAndFonts) IA__FcInitLoadConfigAndFonts __attribute((visibility("hidden"))); ++#define FcInitLoadConfigAndFonts IA__FcInitLoadConfigAndFonts ++extern __typeof (FcInit) IA__FcInit __attribute((visibility("hidden"))); ++#define FcInit IA__FcInit ++extern __typeof (FcFini) IA__FcFini __attribute((visibility("hidden"))); ++#define FcFini IA__FcFini ++extern __typeof (FcGetVersion) IA__FcGetVersion __attribute((visibility("hidden"))); ++#define FcGetVersion IA__FcGetVersion ++extern __typeof (FcInitReinitialize) IA__FcInitReinitialize __attribute((visibility("hidden"))); ++#define FcInitReinitialize IA__FcInitReinitialize ++extern __typeof (FcInitBringUptoDate) IA__FcInitBringUptoDate __attribute((visibility("hidden"))); ++#define FcInitBringUptoDate IA__FcInitBringUptoDate ++extern __typeof (FcGetLangs) IA__FcGetLangs __attribute((visibility("hidden"))); ++#define FcGetLangs IA__FcGetLangs ++extern __typeof (FcLangGetCharSet) IA__FcLangGetCharSet __attribute((visibility("hidden"))); ++#define FcLangGetCharSet IA__FcLangGetCharSet ++extern __typeof (FcLangSetCreate) IA__FcLangSetCreate __attribute((visibility("hidden"))); ++#define FcLangSetCreate IA__FcLangSetCreate ++extern __typeof (FcLangSetDestroy) IA__FcLangSetDestroy __attribute((visibility("hidden"))); ++#define FcLangSetDestroy IA__FcLangSetDestroy ++extern __typeof (FcLangSetCopy) IA__FcLangSetCopy __attribute((visibility("hidden"))); ++#define FcLangSetCopy IA__FcLangSetCopy ++extern __typeof (FcLangSetAdd) IA__FcLangSetAdd __attribute((visibility("hidden"))); ++#define FcLangSetAdd IA__FcLangSetAdd ++extern __typeof (FcLangSetHasLang) IA__FcLangSetHasLang __attribute((visibility("hidden"))); ++#define FcLangSetHasLang IA__FcLangSetHasLang ++extern __typeof (FcLangSetCompare) IA__FcLangSetCompare __attribute((visibility("hidden"))); ++#define FcLangSetCompare IA__FcLangSetCompare ++extern __typeof (FcLangSetContains) IA__FcLangSetContains __attribute((visibility("hidden"))); ++#define FcLangSetContains IA__FcLangSetContains ++extern __typeof (FcLangSetEqual) IA__FcLangSetEqual __attribute((visibility("hidden"))); ++#define FcLangSetEqual IA__FcLangSetEqual ++extern __typeof (FcLangSetHash) IA__FcLangSetHash __attribute((visibility("hidden"))); ++#define FcLangSetHash IA__FcLangSetHash ++extern __typeof (FcLangSetGetLangs) IA__FcLangSetGetLangs __attribute((visibility("hidden"))); ++#define FcLangSetGetLangs IA__FcLangSetGetLangs ++extern __typeof (FcObjectSetCreate) IA__FcObjectSetCreate __attribute((visibility("hidden"))); ++#define FcObjectSetCreate IA__FcObjectSetCreate ++extern __typeof (FcObjectSetAdd) IA__FcObjectSetAdd __attribute((visibility("hidden"))); ++#define FcObjectSetAdd IA__FcObjectSetAdd ++extern __typeof (FcObjectSetDestroy) IA__FcObjectSetDestroy __attribute((visibility("hidden"))); ++#define FcObjectSetDestroy IA__FcObjectSetDestroy ++extern __typeof (FcObjectSetVaBuild) IA__FcObjectSetVaBuild __attribute((visibility("hidden"))); ++#define FcObjectSetVaBuild IA__FcObjectSetVaBuild ++extern __typeof (FcObjectSetBuild) IA__FcObjectSetBuild __attribute((visibility("hidden"))); ++#define FcObjectSetBuild IA__FcObjectSetBuild ++extern __typeof (FcFontSetList) IA__FcFontSetList __attribute((visibility("hidden"))); ++#define FcFontSetList IA__FcFontSetList ++extern __typeof (FcFontList) IA__FcFontList __attribute((visibility("hidden"))); ++#define FcFontList IA__FcFontList ++extern __typeof (FcAtomicCreate) IA__FcAtomicCreate __attribute((visibility("hidden"))); ++#define FcAtomicCreate IA__FcAtomicCreate ++extern __typeof (FcAtomicLock) IA__FcAtomicLock __attribute((visibility("hidden"))); ++#define FcAtomicLock IA__FcAtomicLock ++extern __typeof (FcAtomicNewFile) IA__FcAtomicNewFile __attribute((visibility("hidden"))); ++#define FcAtomicNewFile IA__FcAtomicNewFile ++extern __typeof (FcAtomicOrigFile) IA__FcAtomicOrigFile __attribute((visibility("hidden"))); ++#define FcAtomicOrigFile IA__FcAtomicOrigFile ++extern __typeof (FcAtomicReplaceOrig) IA__FcAtomicReplaceOrig __attribute((visibility("hidden"))); ++#define FcAtomicReplaceOrig IA__FcAtomicReplaceOrig ++extern __typeof (FcAtomicDeleteNew) IA__FcAtomicDeleteNew __attribute((visibility("hidden"))); ++#define FcAtomicDeleteNew IA__FcAtomicDeleteNew ++extern __typeof (FcAtomicUnlock) IA__FcAtomicUnlock __attribute((visibility("hidden"))); ++#define FcAtomicUnlock IA__FcAtomicUnlock ++extern __typeof (FcAtomicDestroy) IA__FcAtomicDestroy __attribute((visibility("hidden"))); ++#define FcAtomicDestroy IA__FcAtomicDestroy ++extern __typeof (FcFontSetMatch) IA__FcFontSetMatch __attribute((visibility("hidden"))); ++#define FcFontSetMatch IA__FcFontSetMatch ++extern __typeof (FcFontMatch) IA__FcFontMatch __attribute((visibility("hidden"))); ++#define FcFontMatch IA__FcFontMatch ++extern __typeof (FcFontRenderPrepare) IA__FcFontRenderPrepare __attribute((visibility("hidden"))); ++#define FcFontRenderPrepare IA__FcFontRenderPrepare ++extern __typeof (FcFontSetSort) IA__FcFontSetSort __attribute((visibility("hidden"))); ++#define FcFontSetSort IA__FcFontSetSort ++extern __typeof (FcFontSort) IA__FcFontSort __attribute((visibility("hidden"))); ++#define FcFontSort IA__FcFontSort ++extern __typeof (FcFontSetSortDestroy) IA__FcFontSetSortDestroy __attribute((visibility("hidden"))); ++#define FcFontSetSortDestroy IA__FcFontSetSortDestroy ++extern __typeof (FcMatrixCopy) IA__FcMatrixCopy __attribute((visibility("hidden"))); ++#define FcMatrixCopy IA__FcMatrixCopy ++extern __typeof (FcMatrixEqual) IA__FcMatrixEqual __attribute((visibility("hidden"))); ++#define FcMatrixEqual IA__FcMatrixEqual ++extern __typeof (FcMatrixMultiply) IA__FcMatrixMultiply __attribute((visibility("hidden"))); ++#define FcMatrixMultiply IA__FcMatrixMultiply ++extern __typeof (FcMatrixRotate) IA__FcMatrixRotate __attribute((visibility("hidden"))); ++#define FcMatrixRotate IA__FcMatrixRotate ++extern __typeof (FcMatrixScale) IA__FcMatrixScale __attribute((visibility("hidden"))); ++#define FcMatrixScale IA__FcMatrixScale ++extern __typeof (FcMatrixShear) IA__FcMatrixShear __attribute((visibility("hidden"))); ++#define FcMatrixShear IA__FcMatrixShear ++extern __typeof (FcNameRegisterObjectTypes) IA__FcNameRegisterObjectTypes __attribute((visibility("hidden"))); ++#define FcNameRegisterObjectTypes IA__FcNameRegisterObjectTypes ++extern __typeof (FcNameUnregisterObjectTypes) IA__FcNameUnregisterObjectTypes __attribute((visibility("hidden"))); ++#define FcNameUnregisterObjectTypes IA__FcNameUnregisterObjectTypes ++extern __typeof (FcNameGetObjectType) IA__FcNameGetObjectType __attribute((visibility("hidden"))); ++#define FcNameGetObjectType IA__FcNameGetObjectType ++extern __typeof (FcNameRegisterConstants) IA__FcNameRegisterConstants __attribute((visibility("hidden"))); ++#define FcNameRegisterConstants IA__FcNameRegisterConstants ++extern __typeof (FcNameUnregisterConstants) IA__FcNameUnregisterConstants __attribute((visibility("hidden"))); ++#define FcNameUnregisterConstants IA__FcNameUnregisterConstants ++extern __typeof (FcNameGetConstant) IA__FcNameGetConstant __attribute((visibility("hidden"))); ++#define FcNameGetConstant IA__FcNameGetConstant ++extern __typeof (FcNameConstant) IA__FcNameConstant __attribute((visibility("hidden"))); ++#define FcNameConstant IA__FcNameConstant ++extern __typeof (FcNameParse) IA__FcNameParse __attribute((visibility("hidden"))); ++#define FcNameParse IA__FcNameParse ++extern __typeof (FcNameUnparse) IA__FcNameUnparse __attribute((visibility("hidden"))); ++#define FcNameUnparse IA__FcNameUnparse ++extern __typeof (FcPatternCreate) IA__FcPatternCreate __attribute((visibility("hidden"))); ++#define FcPatternCreate IA__FcPatternCreate ++extern __typeof (FcPatternDuplicate) IA__FcPatternDuplicate __attribute((visibility("hidden"))); ++#define FcPatternDuplicate IA__FcPatternDuplicate ++extern __typeof (FcPatternReference) IA__FcPatternReference __attribute((visibility("hidden"))); ++#define FcPatternReference IA__FcPatternReference ++extern __typeof (FcPatternFilter) IA__FcPatternFilter __attribute((visibility("hidden"))); ++#define FcPatternFilter IA__FcPatternFilter ++extern __typeof (FcValueDestroy) IA__FcValueDestroy __attribute((visibility("hidden"))); ++#define FcValueDestroy IA__FcValueDestroy ++extern __typeof (FcValueEqual) IA__FcValueEqual __attribute((visibility("hidden"))); ++#define FcValueEqual IA__FcValueEqual ++extern __typeof (FcValueSave) IA__FcValueSave __attribute((visibility("hidden"))); ++#define FcValueSave IA__FcValueSave ++extern __typeof (FcPatternDestroy) IA__FcPatternDestroy __attribute((visibility("hidden"))); ++#define FcPatternDestroy IA__FcPatternDestroy ++extern __typeof (FcPatternEqual) IA__FcPatternEqual __attribute((visibility("hidden"))); ++#define FcPatternEqual IA__FcPatternEqual ++extern __typeof (FcPatternEqualSubset) IA__FcPatternEqualSubset __attribute((visibility("hidden"))); ++#define FcPatternEqualSubset IA__FcPatternEqualSubset ++extern __typeof (FcPatternHash) IA__FcPatternHash __attribute((visibility("hidden"))); ++#define FcPatternHash IA__FcPatternHash ++extern __typeof (FcPatternAdd) IA__FcPatternAdd __attribute((visibility("hidden"))); ++#define FcPatternAdd IA__FcPatternAdd ++extern __typeof (FcPatternAddWeak) IA__FcPatternAddWeak __attribute((visibility("hidden"))); ++#define FcPatternAddWeak IA__FcPatternAddWeak ++extern __typeof (FcPatternGet) IA__FcPatternGet __attribute((visibility("hidden"))); ++#define FcPatternGet IA__FcPatternGet ++extern __typeof (FcPatternDel) IA__FcPatternDel __attribute((visibility("hidden"))); ++#define FcPatternDel IA__FcPatternDel ++extern __typeof (FcPatternRemove) IA__FcPatternRemove __attribute((visibility("hidden"))); ++#define FcPatternRemove IA__FcPatternRemove ++extern __typeof (FcPatternAddInteger) IA__FcPatternAddInteger __attribute((visibility("hidden"))); ++#define FcPatternAddInteger IA__FcPatternAddInteger ++extern __typeof (FcPatternAddDouble) IA__FcPatternAddDouble __attribute((visibility("hidden"))); ++#define FcPatternAddDouble IA__FcPatternAddDouble ++extern __typeof (FcPatternAddString) IA__FcPatternAddString __attribute((visibility("hidden"))); ++#define FcPatternAddString IA__FcPatternAddString ++extern __typeof (FcPatternAddMatrix) IA__FcPatternAddMatrix __attribute((visibility("hidden"))); ++#define FcPatternAddMatrix IA__FcPatternAddMatrix ++extern __typeof (FcPatternAddCharSet) IA__FcPatternAddCharSet __attribute((visibility("hidden"))); ++#define FcPatternAddCharSet IA__FcPatternAddCharSet ++extern __typeof (FcPatternAddBool) IA__FcPatternAddBool __attribute((visibility("hidden"))); ++#define FcPatternAddBool IA__FcPatternAddBool ++extern __typeof (FcPatternAddLangSet) IA__FcPatternAddLangSet __attribute((visibility("hidden"))); ++#define FcPatternAddLangSet IA__FcPatternAddLangSet ++extern __typeof (FcPatternGetInteger) IA__FcPatternGetInteger __attribute((visibility("hidden"))); ++#define FcPatternGetInteger IA__FcPatternGetInteger ++extern __typeof (FcPatternGetDouble) IA__FcPatternGetDouble __attribute((visibility("hidden"))); ++#define FcPatternGetDouble IA__FcPatternGetDouble ++extern __typeof (FcPatternGetString) IA__FcPatternGetString __attribute((visibility("hidden"))); ++#define FcPatternGetString IA__FcPatternGetString ++extern __typeof (FcPatternGetMatrix) IA__FcPatternGetMatrix __attribute((visibility("hidden"))); ++#define FcPatternGetMatrix IA__FcPatternGetMatrix ++extern __typeof (FcPatternGetCharSet) IA__FcPatternGetCharSet __attribute((visibility("hidden"))); ++#define FcPatternGetCharSet IA__FcPatternGetCharSet ++extern __typeof (FcPatternGetBool) IA__FcPatternGetBool __attribute((visibility("hidden"))); ++#define FcPatternGetBool IA__FcPatternGetBool ++extern __typeof (FcPatternGetLangSet) IA__FcPatternGetLangSet __attribute((visibility("hidden"))); ++#define FcPatternGetLangSet IA__FcPatternGetLangSet ++extern __typeof (FcPatternVaBuild) IA__FcPatternVaBuild __attribute((visibility("hidden"))); ++#define FcPatternVaBuild IA__FcPatternVaBuild ++extern __typeof (FcPatternBuild) IA__FcPatternBuild __attribute((visibility("hidden"))); ++#define FcPatternBuild IA__FcPatternBuild ++extern __typeof (FcPatternFormat) IA__FcPatternFormat __attribute((visibility("hidden"))); ++#define FcPatternFormat IA__FcPatternFormat ++extern __typeof (FcStrCopy) IA__FcStrCopy __attribute((visibility("hidden"))); ++#define FcStrCopy IA__FcStrCopy ++extern __typeof (FcStrCopyFilename) IA__FcStrCopyFilename __attribute((visibility("hidden"))); ++#define FcStrCopyFilename IA__FcStrCopyFilename ++extern __typeof (FcStrPlus) IA__FcStrPlus __attribute((visibility("hidden"))); ++#define FcStrPlus IA__FcStrPlus ++extern __typeof (FcStrFree) IA__FcStrFree __attribute((visibility("hidden"))); ++#define FcStrFree IA__FcStrFree ++extern __typeof (FcStrDowncase) IA__FcStrDowncase __attribute((visibility("hidden"))); ++#define FcStrDowncase IA__FcStrDowncase ++extern __typeof (FcStrCmpIgnoreCase) IA__FcStrCmpIgnoreCase __attribute((visibility("hidden"))); ++#define FcStrCmpIgnoreCase IA__FcStrCmpIgnoreCase ++extern __typeof (FcStrCmp) IA__FcStrCmp __attribute((visibility("hidden"))); ++#define FcStrCmp IA__FcStrCmp ++extern __typeof (FcStrStrIgnoreCase) IA__FcStrStrIgnoreCase __attribute((visibility("hidden"))); ++#define FcStrStrIgnoreCase IA__FcStrStrIgnoreCase ++extern __typeof (FcStrStr) IA__FcStrStr __attribute((visibility("hidden"))); ++#define FcStrStr IA__FcStrStr ++extern __typeof (FcUtf8ToUcs4) IA__FcUtf8ToUcs4 __attribute((visibility("hidden"))); ++#define FcUtf8ToUcs4 IA__FcUtf8ToUcs4 ++extern __typeof (FcUtf8Len) IA__FcUtf8Len __attribute((visibility("hidden"))); ++#define FcUtf8Len IA__FcUtf8Len ++extern __typeof (FcUcs4ToUtf8) IA__FcUcs4ToUtf8 __attribute((visibility("hidden"))); ++#define FcUcs4ToUtf8 IA__FcUcs4ToUtf8 ++extern __typeof (FcUtf16ToUcs4) IA__FcUtf16ToUcs4 __attribute((visibility("hidden"))); ++#define FcUtf16ToUcs4 IA__FcUtf16ToUcs4 ++extern __typeof (FcUtf16Len) IA__FcUtf16Len __attribute((visibility("hidden"))); ++#define FcUtf16Len IA__FcUtf16Len ++extern __typeof (FcStrDirname) IA__FcStrDirname __attribute((visibility("hidden"))); ++#define FcStrDirname IA__FcStrDirname ++extern __typeof (FcStrBasename) IA__FcStrBasename __attribute((visibility("hidden"))); ++#define FcStrBasename IA__FcStrBasename ++extern __typeof (FcStrSetCreate) IA__FcStrSetCreate __attribute((visibility("hidden"))); ++#define FcStrSetCreate IA__FcStrSetCreate ++extern __typeof (FcStrSetMember) IA__FcStrSetMember __attribute((visibility("hidden"))); ++#define FcStrSetMember IA__FcStrSetMember ++extern __typeof (FcStrSetEqual) IA__FcStrSetEqual __attribute((visibility("hidden"))); ++#define FcStrSetEqual IA__FcStrSetEqual ++extern __typeof (FcStrSetAdd) IA__FcStrSetAdd __attribute((visibility("hidden"))); ++#define FcStrSetAdd IA__FcStrSetAdd ++extern __typeof (FcStrSetAddFilename) IA__FcStrSetAddFilename __attribute((visibility("hidden"))); ++#define FcStrSetAddFilename IA__FcStrSetAddFilename ++extern __typeof (FcStrSetDel) IA__FcStrSetDel __attribute((visibility("hidden"))); ++#define FcStrSetDel IA__FcStrSetDel ++extern __typeof (FcStrSetDestroy) IA__FcStrSetDestroy __attribute((visibility("hidden"))); ++#define FcStrSetDestroy IA__FcStrSetDestroy ++extern __typeof (FcStrListCreate) IA__FcStrListCreate __attribute((visibility("hidden"))); ++#define FcStrListCreate IA__FcStrListCreate ++extern __typeof (FcStrListNext) IA__FcStrListNext __attribute((visibility("hidden"))); ++#define FcStrListNext IA__FcStrListNext ++extern __typeof (FcStrListDone) IA__FcStrListDone __attribute((visibility("hidden"))); ++#define FcStrListDone IA__FcStrListDone ++extern __typeof (FcConfigParseAndLoad) IA__FcConfigParseAndLoad __attribute((visibility("hidden"))); ++#define FcConfigParseAndLoad IA__FcConfigParseAndLoad ++extern __typeof (FcConfigGetRescanInverval) IA__FcConfigGetRescanInverval __attribute((visibility("hidden"))); ++#define FcConfigGetRescanInverval IA__FcConfigGetRescanInverval ++extern __typeof (FcConfigSetRescanInverval) IA__FcConfigSetRescanInverval __attribute((visibility("hidden"))); ++#define FcConfigSetRescanInverval IA__FcConfigSetRescanInverval ++ +--- misc/fontconfig-2.8.0/src/fcaliastail.h Wed Aug 20 14:33:55 2008 ++++ misc/build/fontconfig-2.8.0/src/fcaliastail.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,739 @@ +-dummy ++#if HAVE_GNUC_ATTRIBUTE ++#ifdef __fcblanks__ ++#undef FcBlanksCreate ++extern __typeof (FcBlanksCreate) FcBlanksCreate __attribute((alias("IA__FcBlanksCreate"), visibility("default"))); ++#endif ++#ifdef __fcblanks__ ++#undef FcBlanksDestroy ++extern __typeof (FcBlanksDestroy) FcBlanksDestroy __attribute((alias("IA__FcBlanksDestroy"), visibility("default"))); ++#endif ++#ifdef __fcblanks__ ++#undef FcBlanksAdd ++extern __typeof (FcBlanksAdd) FcBlanksAdd __attribute((alias("IA__FcBlanksAdd"), visibility("default"))); ++#endif ++#ifdef __fcblanks__ ++#undef FcBlanksIsMember ++extern __typeof (FcBlanksIsMember) FcBlanksIsMember __attribute((alias("IA__FcBlanksIsMember"), visibility("default"))); ++#endif ++#ifdef __fccache__ ++#undef FcCacheCopySet ++extern __typeof (FcCacheCopySet) FcCacheCopySet __attribute((alias("IA__FcCacheCopySet"), visibility("default"))); ++#endif ++#ifdef __fccache__ ++#undef FcCacheNumSubdir ++extern __typeof (FcCacheNumSubdir) FcCacheNumSubdir __attribute((alias("IA__FcCacheNumSubdir"), visibility("default"))); ++#endif ++#ifdef __fccache__ ++#undef FcCacheNumFont ++extern __typeof (FcCacheNumFont) FcCacheNumFont __attribute((alias("IA__FcCacheNumFont"), visibility("default"))); ++#endif ++#ifdef __fccache__ ++#undef FcDirCacheUnlink ++extern __typeof (FcDirCacheUnlink) FcDirCacheUnlink __attribute((alias("IA__FcDirCacheUnlink"), visibility("default"))); ++#endif ++#ifdef __fccache__ ++#undef FcDirCacheValid ++extern __typeof (FcDirCacheValid) FcDirCacheValid __attribute((alias("IA__FcDirCacheValid"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigHome ++extern __typeof (FcConfigHome) FcConfigHome __attribute((alias("IA__FcConfigHome"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigEnableHome ++extern __typeof (FcConfigEnableHome) FcConfigEnableHome __attribute((alias("IA__FcConfigEnableHome"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigFilename ++extern __typeof (FcConfigFilename) FcConfigFilename __attribute((alias("IA__FcConfigFilename"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigCreate ++extern __typeof (FcConfigCreate) FcConfigCreate __attribute((alias("IA__FcConfigCreate"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigReference ++extern __typeof (FcConfigReference) FcConfigReference __attribute((alias("IA__FcConfigReference"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigDestroy ++extern __typeof (FcConfigDestroy) FcConfigDestroy __attribute((alias("IA__FcConfigDestroy"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigSetCurrent ++extern __typeof (FcConfigSetCurrent) FcConfigSetCurrent __attribute((alias("IA__FcConfigSetCurrent"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigGetCurrent ++extern __typeof (FcConfigGetCurrent) FcConfigGetCurrent __attribute((alias("IA__FcConfigGetCurrent"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigUptoDate ++extern __typeof (FcConfigUptoDate) FcConfigUptoDate __attribute((alias("IA__FcConfigUptoDate"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigBuildFonts ++extern __typeof (FcConfigBuildFonts) FcConfigBuildFonts __attribute((alias("IA__FcConfigBuildFonts"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigGetFontDirs ++extern __typeof (FcConfigGetFontDirs) FcConfigGetFontDirs __attribute((alias("IA__FcConfigGetFontDirs"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigGetConfigDirs ++extern __typeof (FcConfigGetConfigDirs) FcConfigGetConfigDirs __attribute((alias("IA__FcConfigGetConfigDirs"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigGetConfigFiles ++extern __typeof (FcConfigGetConfigFiles) FcConfigGetConfigFiles __attribute((alias("IA__FcConfigGetConfigFiles"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigGetCache ++extern __typeof (FcConfigGetCache) FcConfigGetCache __attribute((alias("IA__FcConfigGetCache"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigGetBlanks ++extern __typeof (FcConfigGetBlanks) FcConfigGetBlanks __attribute((alias("IA__FcConfigGetBlanks"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigGetCacheDirs ++extern __typeof (FcConfigGetCacheDirs) FcConfigGetCacheDirs __attribute((alias("IA__FcConfigGetCacheDirs"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigGetRescanInterval ++extern __typeof (FcConfigGetRescanInterval) FcConfigGetRescanInterval __attribute((alias("IA__FcConfigGetRescanInterval"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigSetRescanInterval ++extern __typeof (FcConfigSetRescanInterval) FcConfigSetRescanInterval __attribute((alias("IA__FcConfigSetRescanInterval"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigGetFonts ++extern __typeof (FcConfigGetFonts) FcConfigGetFonts __attribute((alias("IA__FcConfigGetFonts"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigAppFontAddFile ++extern __typeof (FcConfigAppFontAddFile) FcConfigAppFontAddFile __attribute((alias("IA__FcConfigAppFontAddFile"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigAppFontAddDir ++extern __typeof (FcConfigAppFontAddDir) FcConfigAppFontAddDir __attribute((alias("IA__FcConfigAppFontAddDir"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigAppFontClear ++extern __typeof (FcConfigAppFontClear) FcConfigAppFontClear __attribute((alias("IA__FcConfigAppFontClear"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigSubstituteWithPat ++extern __typeof (FcConfigSubstituteWithPat) FcConfigSubstituteWithPat __attribute((alias("IA__FcConfigSubstituteWithPat"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigSubstitute ++extern __typeof (FcConfigSubstitute) FcConfigSubstitute __attribute((alias("IA__FcConfigSubstitute"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetCreate ++extern __typeof (FcCharSetCreate) FcCharSetCreate __attribute((alias("IA__FcCharSetCreate"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetNew ++extern __typeof (FcCharSetNew) FcCharSetNew __attribute((alias("IA__FcCharSetNew"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetDestroy ++extern __typeof (FcCharSetDestroy) FcCharSetDestroy __attribute((alias("IA__FcCharSetDestroy"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetAddChar ++extern __typeof (FcCharSetAddChar) FcCharSetAddChar __attribute((alias("IA__FcCharSetAddChar"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetCopy ++extern __typeof (FcCharSetCopy) FcCharSetCopy __attribute((alias("IA__FcCharSetCopy"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetEqual ++extern __typeof (FcCharSetEqual) FcCharSetEqual __attribute((alias("IA__FcCharSetEqual"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetIntersect ++extern __typeof (FcCharSetIntersect) FcCharSetIntersect __attribute((alias("IA__FcCharSetIntersect"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetUnion ++extern __typeof (FcCharSetUnion) FcCharSetUnion __attribute((alias("IA__FcCharSetUnion"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetSubtract ++extern __typeof (FcCharSetSubtract) FcCharSetSubtract __attribute((alias("IA__FcCharSetSubtract"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetMerge ++extern __typeof (FcCharSetMerge) FcCharSetMerge __attribute((alias("IA__FcCharSetMerge"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetHasChar ++extern __typeof (FcCharSetHasChar) FcCharSetHasChar __attribute((alias("IA__FcCharSetHasChar"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetCount ++extern __typeof (FcCharSetCount) FcCharSetCount __attribute((alias("IA__FcCharSetCount"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetIntersectCount ++extern __typeof (FcCharSetIntersectCount) FcCharSetIntersectCount __attribute((alias("IA__FcCharSetIntersectCount"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetSubtractCount ++extern __typeof (FcCharSetSubtractCount) FcCharSetSubtractCount __attribute((alias("IA__FcCharSetSubtractCount"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetIsSubset ++extern __typeof (FcCharSetIsSubset) FcCharSetIsSubset __attribute((alias("IA__FcCharSetIsSubset"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetFirstPage ++extern __typeof (FcCharSetFirstPage) FcCharSetFirstPage __attribute((alias("IA__FcCharSetFirstPage"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetNextPage ++extern __typeof (FcCharSetNextPage) FcCharSetNextPage __attribute((alias("IA__FcCharSetNextPage"), visibility("default"))); ++#endif ++#ifdef __fccharset__ ++#undef FcCharSetCoverage ++extern __typeof (FcCharSetCoverage) FcCharSetCoverage __attribute((alias("IA__FcCharSetCoverage"), visibility("default"))); ++#endif ++#ifdef __fcdbg__ ++#undef FcValuePrint ++extern __typeof (FcValuePrint) FcValuePrint __attribute((alias("IA__FcValuePrint"), visibility("default"))); ++#endif ++#ifdef __fcdbg__ ++#undef FcPatternPrint ++extern __typeof (FcPatternPrint) FcPatternPrint __attribute((alias("IA__FcPatternPrint"), visibility("default"))); ++#endif ++#ifdef __fcdbg__ ++#undef FcFontSetPrint ++extern __typeof (FcFontSetPrint) FcFontSetPrint __attribute((alias("IA__FcFontSetPrint"), visibility("default"))); ++#endif ++#ifdef __fcdefault__ ++#undef FcDefaultSubstitute ++extern __typeof (FcDefaultSubstitute) FcDefaultSubstitute __attribute((alias("IA__FcDefaultSubstitute"), visibility("default"))); ++#endif ++#ifdef __fcdir__ ++#undef FcFileIsDir ++extern __typeof (FcFileIsDir) FcFileIsDir __attribute((alias("IA__FcFileIsDir"), visibility("default"))); ++#endif ++#ifdef __fcdir__ ++#undef FcFileScan ++extern __typeof (FcFileScan) FcFileScan __attribute((alias("IA__FcFileScan"), visibility("default"))); ++#endif ++#ifdef __fcdir__ ++#undef FcDirScan ++extern __typeof (FcDirScan) FcDirScan __attribute((alias("IA__FcDirScan"), visibility("default"))); ++#endif ++#ifdef __fcdir__ ++#undef FcDirSave ++extern __typeof (FcDirSave) FcDirSave __attribute((alias("IA__FcDirSave"), visibility("default"))); ++#endif ++#ifdef __fccache__ ++#undef FcDirCacheLoad ++extern __typeof (FcDirCacheLoad) FcDirCacheLoad __attribute((alias("IA__FcDirCacheLoad"), visibility("default"))); ++#endif ++#ifdef __fcdir__ ++#undef FcDirCacheRead ++extern __typeof (FcDirCacheRead) FcDirCacheRead __attribute((alias("IA__FcDirCacheRead"), visibility("default"))); ++#endif ++#ifdef __fccache__ ++#undef FcDirCacheLoadFile ++extern __typeof (FcDirCacheLoadFile) FcDirCacheLoadFile __attribute((alias("IA__FcDirCacheLoadFile"), visibility("default"))); ++#endif ++#ifdef __fccache__ ++#undef FcDirCacheUnload ++extern __typeof (FcDirCacheUnload) FcDirCacheUnload __attribute((alias("IA__FcDirCacheUnload"), visibility("default"))); ++#endif ++#ifdef __fcfreetype__ ++#undef FcFreeTypeQuery ++extern __typeof (FcFreeTypeQuery) FcFreeTypeQuery __attribute((alias("IA__FcFreeTypeQuery"), visibility("default"))); ++#endif ++#ifdef __fcfs__ ++#undef FcFontSetCreate ++extern __typeof (FcFontSetCreate) FcFontSetCreate __attribute((alias("IA__FcFontSetCreate"), visibility("default"))); ++#endif ++#ifdef __fcfs__ ++#undef FcFontSetDestroy ++extern __typeof (FcFontSetDestroy) FcFontSetDestroy __attribute((alias("IA__FcFontSetDestroy"), visibility("default"))); ++#endif ++#ifdef __fcfs__ ++#undef FcFontSetAdd ++extern __typeof (FcFontSetAdd) FcFontSetAdd __attribute((alias("IA__FcFontSetAdd"), visibility("default"))); ++#endif ++#ifdef __fcinit__ ++#undef FcInitLoadConfig ++extern __typeof (FcInitLoadConfig) FcInitLoadConfig __attribute((alias("IA__FcInitLoadConfig"), visibility("default"))); ++#endif ++#ifdef __fcinit__ ++#undef FcInitLoadConfigAndFonts ++extern __typeof (FcInitLoadConfigAndFonts) FcInitLoadConfigAndFonts __attribute((alias("IA__FcInitLoadConfigAndFonts"), visibility("default"))); ++#endif ++#ifdef __fcinit__ ++#undef FcInit ++extern __typeof (FcInit) FcInit __attribute((alias("IA__FcInit"), visibility("default"))); ++#endif ++#ifdef __fcinit__ ++#undef FcFini ++extern __typeof (FcFini) FcFini __attribute((alias("IA__FcFini"), visibility("default"))); ++#endif ++#ifdef __fcinit__ ++#undef FcGetVersion ++extern __typeof (FcGetVersion) FcGetVersion __attribute((alias("IA__FcGetVersion"), visibility("default"))); ++#endif ++#ifdef __fcinit__ ++#undef FcInitReinitialize ++extern __typeof (FcInitReinitialize) FcInitReinitialize __attribute((alias("IA__FcInitReinitialize"), visibility("default"))); ++#endif ++#ifdef __fcinit__ ++#undef FcInitBringUptoDate ++extern __typeof (FcInitBringUptoDate) FcInitBringUptoDate __attribute((alias("IA__FcInitBringUptoDate"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcGetLangs ++extern __typeof (FcGetLangs) FcGetLangs __attribute((alias("IA__FcGetLangs"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangGetCharSet ++extern __typeof (FcLangGetCharSet) FcLangGetCharSet __attribute((alias("IA__FcLangGetCharSet"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangSetCreate ++extern __typeof (FcLangSetCreate) FcLangSetCreate __attribute((alias("IA__FcLangSetCreate"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangSetDestroy ++extern __typeof (FcLangSetDestroy) FcLangSetDestroy __attribute((alias("IA__FcLangSetDestroy"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangSetCopy ++extern __typeof (FcLangSetCopy) FcLangSetCopy __attribute((alias("IA__FcLangSetCopy"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangSetAdd ++extern __typeof (FcLangSetAdd) FcLangSetAdd __attribute((alias("IA__FcLangSetAdd"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangSetHasLang ++extern __typeof (FcLangSetHasLang) FcLangSetHasLang __attribute((alias("IA__FcLangSetHasLang"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangSetCompare ++extern __typeof (FcLangSetCompare) FcLangSetCompare __attribute((alias("IA__FcLangSetCompare"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangSetContains ++extern __typeof (FcLangSetContains) FcLangSetContains __attribute((alias("IA__FcLangSetContains"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangSetEqual ++extern __typeof (FcLangSetEqual) FcLangSetEqual __attribute((alias("IA__FcLangSetEqual"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangSetHash ++extern __typeof (FcLangSetHash) FcLangSetHash __attribute((alias("IA__FcLangSetHash"), visibility("default"))); ++#endif ++#ifdef __fclang__ ++#undef FcLangSetGetLangs ++extern __typeof (FcLangSetGetLangs) FcLangSetGetLangs __attribute((alias("IA__FcLangSetGetLangs"), visibility("default"))); ++#endif ++#ifdef __fclist__ ++#undef FcObjectSetCreate ++extern __typeof (FcObjectSetCreate) FcObjectSetCreate __attribute((alias("IA__FcObjectSetCreate"), visibility("default"))); ++#endif ++#ifdef __fclist__ ++#undef FcObjectSetAdd ++extern __typeof (FcObjectSetAdd) FcObjectSetAdd __attribute((alias("IA__FcObjectSetAdd"), visibility("default"))); ++#endif ++#ifdef __fclist__ ++#undef FcObjectSetDestroy ++extern __typeof (FcObjectSetDestroy) FcObjectSetDestroy __attribute((alias("IA__FcObjectSetDestroy"), visibility("default"))); ++#endif ++#ifdef __fclist__ ++#undef FcObjectSetVaBuild ++extern __typeof (FcObjectSetVaBuild) FcObjectSetVaBuild __attribute((alias("IA__FcObjectSetVaBuild"), visibility("default"))); ++#endif ++#ifdef __fclist__ ++#undef FcObjectSetBuild ++extern __typeof (FcObjectSetBuild) FcObjectSetBuild __attribute((alias("IA__FcObjectSetBuild"), visibility("default"))); ++#endif ++#ifdef __fclist__ ++#undef FcFontSetList ++extern __typeof (FcFontSetList) FcFontSetList __attribute((alias("IA__FcFontSetList"), visibility("default"))); ++#endif ++#ifdef __fclist__ ++#undef FcFontList ++extern __typeof (FcFontList) FcFontList __attribute((alias("IA__FcFontList"), visibility("default"))); ++#endif ++#ifdef __fcatomic__ ++#undef FcAtomicCreate ++extern __typeof (FcAtomicCreate) FcAtomicCreate __attribute((alias("IA__FcAtomicCreate"), visibility("default"))); ++#endif ++#ifdef __fcatomic__ ++#undef FcAtomicLock ++extern __typeof (FcAtomicLock) FcAtomicLock __attribute((alias("IA__FcAtomicLock"), visibility("default"))); ++#endif ++#ifdef __fcatomic__ ++#undef FcAtomicNewFile ++extern __typeof (FcAtomicNewFile) FcAtomicNewFile __attribute((alias("IA__FcAtomicNewFile"), visibility("default"))); ++#endif ++#ifdef __fcatomic__ ++#undef FcAtomicOrigFile ++extern __typeof (FcAtomicOrigFile) FcAtomicOrigFile __attribute((alias("IA__FcAtomicOrigFile"), visibility("default"))); ++#endif ++#ifdef __fcatomic__ ++#undef FcAtomicReplaceOrig ++extern __typeof (FcAtomicReplaceOrig) FcAtomicReplaceOrig __attribute((alias("IA__FcAtomicReplaceOrig"), visibility("default"))); ++#endif ++#ifdef __fcatomic__ ++#undef FcAtomicDeleteNew ++extern __typeof (FcAtomicDeleteNew) FcAtomicDeleteNew __attribute((alias("IA__FcAtomicDeleteNew"), visibility("default"))); ++#endif ++#ifdef __fcatomic__ ++#undef FcAtomicUnlock ++extern __typeof (FcAtomicUnlock) FcAtomicUnlock __attribute((alias("IA__FcAtomicUnlock"), visibility("default"))); ++#endif ++#ifdef __fcatomic__ ++#undef FcAtomicDestroy ++extern __typeof (FcAtomicDestroy) FcAtomicDestroy __attribute((alias("IA__FcAtomicDestroy"), visibility("default"))); ++#endif ++#ifdef __fcmatch__ ++#undef FcFontSetMatch ++extern __typeof (FcFontSetMatch) FcFontSetMatch __attribute((alias("IA__FcFontSetMatch"), visibility("default"))); ++#endif ++#ifdef __fcmatch__ ++#undef FcFontMatch ++extern __typeof (FcFontMatch) FcFontMatch __attribute((alias("IA__FcFontMatch"), visibility("default"))); ++#endif ++#ifdef __fcmatch__ ++#undef FcFontRenderPrepare ++extern __typeof (FcFontRenderPrepare) FcFontRenderPrepare __attribute((alias("IA__FcFontRenderPrepare"), visibility("default"))); ++#endif ++#ifdef __fcmatch__ ++#undef FcFontSetSort ++extern __typeof (FcFontSetSort) FcFontSetSort __attribute((alias("IA__FcFontSetSort"), visibility("default"))); ++#endif ++#ifdef __fcmatch__ ++#undef FcFontSort ++extern __typeof (FcFontSort) FcFontSort __attribute((alias("IA__FcFontSort"), visibility("default"))); ++#endif ++#ifdef __fcmatch__ ++#undef FcFontSetSortDestroy ++extern __typeof (FcFontSetSortDestroy) FcFontSetSortDestroy __attribute((alias("IA__FcFontSetSortDestroy"), visibility("default"))); ++#endif ++#ifdef __fcmatrix__ ++#undef FcMatrixCopy ++extern __typeof (FcMatrixCopy) FcMatrixCopy __attribute((alias("IA__FcMatrixCopy"), visibility("default"))); ++#endif ++#ifdef __fcmatrix__ ++#undef FcMatrixEqual ++extern __typeof (FcMatrixEqual) FcMatrixEqual __attribute((alias("IA__FcMatrixEqual"), visibility("default"))); ++#endif ++#ifdef __fcmatrix__ ++#undef FcMatrixMultiply ++extern __typeof (FcMatrixMultiply) FcMatrixMultiply __attribute((alias("IA__FcMatrixMultiply"), visibility("default"))); ++#endif ++#ifdef __fcmatrix__ ++#undef FcMatrixRotate ++extern __typeof (FcMatrixRotate) FcMatrixRotate __attribute((alias("IA__FcMatrixRotate"), visibility("default"))); ++#endif ++#ifdef __fcmatrix__ ++#undef FcMatrixScale ++extern __typeof (FcMatrixScale) FcMatrixScale __attribute((alias("IA__FcMatrixScale"), visibility("default"))); ++#endif ++#ifdef __fcmatrix__ ++#undef FcMatrixShear ++extern __typeof (FcMatrixShear) FcMatrixShear __attribute((alias("IA__FcMatrixShear"), visibility("default"))); ++#endif ++#ifdef __fcname__ ++#undef FcNameRegisterObjectTypes ++extern __typeof (FcNameRegisterObjectTypes) FcNameRegisterObjectTypes __attribute((alias("IA__FcNameRegisterObjectTypes"), visibility("default"))); ++#endif ++#ifdef __fcname__ ++#undef FcNameUnregisterObjectTypes ++extern __typeof (FcNameUnregisterObjectTypes) FcNameUnregisterObjectTypes __attribute((alias("IA__FcNameUnregisterObjectTypes"), visibility("default"))); ++#endif ++#ifdef __fcname__ ++#undef FcNameGetObjectType ++extern __typeof (FcNameGetObjectType) FcNameGetObjectType __attribute((alias("IA__FcNameGetObjectType"), visibility("default"))); ++#endif ++#ifdef __fcname__ ++#undef FcNameRegisterConstants ++extern __typeof (FcNameRegisterConstants) FcNameRegisterConstants __attribute((alias("IA__FcNameRegisterConstants"), visibility("default"))); ++#endif ++#ifdef __fcname__ ++#undef FcNameUnregisterConstants ++extern __typeof (FcNameUnregisterConstants) FcNameUnregisterConstants __attribute((alias("IA__FcNameUnregisterConstants"), visibility("default"))); ++#endif ++#ifdef __fcname__ ++#undef FcNameGetConstant ++extern __typeof (FcNameGetConstant) FcNameGetConstant __attribute((alias("IA__FcNameGetConstant"), visibility("default"))); ++#endif ++#ifdef __fcname__ ++#undef FcNameConstant ++extern __typeof (FcNameConstant) FcNameConstant __attribute((alias("IA__FcNameConstant"), visibility("default"))); ++#endif ++#ifdef __fcname__ ++#undef FcNameParse ++extern __typeof (FcNameParse) FcNameParse __attribute((alias("IA__FcNameParse"), visibility("default"))); ++#endif ++#ifdef __fcname__ ++#undef FcNameUnparse ++extern __typeof (FcNameUnparse) FcNameUnparse __attribute((alias("IA__FcNameUnparse"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternCreate ++extern __typeof (FcPatternCreate) FcPatternCreate __attribute((alias("IA__FcPatternCreate"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternDuplicate ++extern __typeof (FcPatternDuplicate) FcPatternDuplicate __attribute((alias("IA__FcPatternDuplicate"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternReference ++extern __typeof (FcPatternReference) FcPatternReference __attribute((alias("IA__FcPatternReference"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternFilter ++extern __typeof (FcPatternFilter) FcPatternFilter __attribute((alias("IA__FcPatternFilter"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcValueDestroy ++extern __typeof (FcValueDestroy) FcValueDestroy __attribute((alias("IA__FcValueDestroy"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcValueEqual ++extern __typeof (FcValueEqual) FcValueEqual __attribute((alias("IA__FcValueEqual"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcValueSave ++extern __typeof (FcValueSave) FcValueSave __attribute((alias("IA__FcValueSave"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternDestroy ++extern __typeof (FcPatternDestroy) FcPatternDestroy __attribute((alias("IA__FcPatternDestroy"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternEqual ++extern __typeof (FcPatternEqual) FcPatternEqual __attribute((alias("IA__FcPatternEqual"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternEqualSubset ++extern __typeof (FcPatternEqualSubset) FcPatternEqualSubset __attribute((alias("IA__FcPatternEqualSubset"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternHash ++extern __typeof (FcPatternHash) FcPatternHash __attribute((alias("IA__FcPatternHash"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternAdd ++extern __typeof (FcPatternAdd) FcPatternAdd __attribute((alias("IA__FcPatternAdd"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternAddWeak ++extern __typeof (FcPatternAddWeak) FcPatternAddWeak __attribute((alias("IA__FcPatternAddWeak"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternGet ++extern __typeof (FcPatternGet) FcPatternGet __attribute((alias("IA__FcPatternGet"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternDel ++extern __typeof (FcPatternDel) FcPatternDel __attribute((alias("IA__FcPatternDel"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternRemove ++extern __typeof (FcPatternRemove) FcPatternRemove __attribute((alias("IA__FcPatternRemove"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternAddInteger ++extern __typeof (FcPatternAddInteger) FcPatternAddInteger __attribute((alias("IA__FcPatternAddInteger"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternAddDouble ++extern __typeof (FcPatternAddDouble) FcPatternAddDouble __attribute((alias("IA__FcPatternAddDouble"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternAddString ++extern __typeof (FcPatternAddString) FcPatternAddString __attribute((alias("IA__FcPatternAddString"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternAddMatrix ++extern __typeof (FcPatternAddMatrix) FcPatternAddMatrix __attribute((alias("IA__FcPatternAddMatrix"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternAddCharSet ++extern __typeof (FcPatternAddCharSet) FcPatternAddCharSet __attribute((alias("IA__FcPatternAddCharSet"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternAddBool ++extern __typeof (FcPatternAddBool) FcPatternAddBool __attribute((alias("IA__FcPatternAddBool"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternAddLangSet ++extern __typeof (FcPatternAddLangSet) FcPatternAddLangSet __attribute((alias("IA__FcPatternAddLangSet"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternGetInteger ++extern __typeof (FcPatternGetInteger) FcPatternGetInteger __attribute((alias("IA__FcPatternGetInteger"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternGetDouble ++extern __typeof (FcPatternGetDouble) FcPatternGetDouble __attribute((alias("IA__FcPatternGetDouble"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternGetString ++extern __typeof (FcPatternGetString) FcPatternGetString __attribute((alias("IA__FcPatternGetString"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternGetMatrix ++extern __typeof (FcPatternGetMatrix) FcPatternGetMatrix __attribute((alias("IA__FcPatternGetMatrix"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternGetCharSet ++extern __typeof (FcPatternGetCharSet) FcPatternGetCharSet __attribute((alias("IA__FcPatternGetCharSet"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternGetBool ++extern __typeof (FcPatternGetBool) FcPatternGetBool __attribute((alias("IA__FcPatternGetBool"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternGetLangSet ++extern __typeof (FcPatternGetLangSet) FcPatternGetLangSet __attribute((alias("IA__FcPatternGetLangSet"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternVaBuild ++extern __typeof (FcPatternVaBuild) FcPatternVaBuild __attribute((alias("IA__FcPatternVaBuild"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternBuild ++extern __typeof (FcPatternBuild) FcPatternBuild __attribute((alias("IA__FcPatternBuild"), visibility("default"))); ++#endif ++#ifdef __fcformat__ ++#undef FcPatternFormat ++extern __typeof (FcPatternFormat) FcPatternFormat __attribute((alias("IA__FcPatternFormat"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrCopy ++extern __typeof (FcStrCopy) FcStrCopy __attribute((alias("IA__FcStrCopy"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrCopyFilename ++extern __typeof (FcStrCopyFilename) FcStrCopyFilename __attribute((alias("IA__FcStrCopyFilename"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrPlus ++extern __typeof (FcStrPlus) FcStrPlus __attribute((alias("IA__FcStrPlus"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrFree ++extern __typeof (FcStrFree) FcStrFree __attribute((alias("IA__FcStrFree"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrDowncase ++extern __typeof (FcStrDowncase) FcStrDowncase __attribute((alias("IA__FcStrDowncase"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrCmpIgnoreCase ++extern __typeof (FcStrCmpIgnoreCase) FcStrCmpIgnoreCase __attribute((alias("IA__FcStrCmpIgnoreCase"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrCmp ++extern __typeof (FcStrCmp) FcStrCmp __attribute((alias("IA__FcStrCmp"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrStrIgnoreCase ++extern __typeof (FcStrStrIgnoreCase) FcStrStrIgnoreCase __attribute((alias("IA__FcStrStrIgnoreCase"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrStr ++extern __typeof (FcStrStr) FcStrStr __attribute((alias("IA__FcStrStr"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcUtf8ToUcs4 ++extern __typeof (FcUtf8ToUcs4) FcUtf8ToUcs4 __attribute((alias("IA__FcUtf8ToUcs4"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcUtf8Len ++extern __typeof (FcUtf8Len) FcUtf8Len __attribute((alias("IA__FcUtf8Len"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcUcs4ToUtf8 ++extern __typeof (FcUcs4ToUtf8) FcUcs4ToUtf8 __attribute((alias("IA__FcUcs4ToUtf8"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcUtf16ToUcs4 ++extern __typeof (FcUtf16ToUcs4) FcUtf16ToUcs4 __attribute((alias("IA__FcUtf16ToUcs4"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcUtf16Len ++extern __typeof (FcUtf16Len) FcUtf16Len __attribute((alias("IA__FcUtf16Len"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrDirname ++extern __typeof (FcStrDirname) FcStrDirname __attribute((alias("IA__FcStrDirname"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrBasename ++extern __typeof (FcStrBasename) FcStrBasename __attribute((alias("IA__FcStrBasename"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrSetCreate ++extern __typeof (FcStrSetCreate) FcStrSetCreate __attribute((alias("IA__FcStrSetCreate"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrSetMember ++extern __typeof (FcStrSetMember) FcStrSetMember __attribute((alias("IA__FcStrSetMember"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrSetEqual ++extern __typeof (FcStrSetEqual) FcStrSetEqual __attribute((alias("IA__FcStrSetEqual"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrSetAdd ++extern __typeof (FcStrSetAdd) FcStrSetAdd __attribute((alias("IA__FcStrSetAdd"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrSetAddFilename ++extern __typeof (FcStrSetAddFilename) FcStrSetAddFilename __attribute((alias("IA__FcStrSetAddFilename"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrSetDel ++extern __typeof (FcStrSetDel) FcStrSetDel __attribute((alias("IA__FcStrSetDel"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrSetDestroy ++extern __typeof (FcStrSetDestroy) FcStrSetDestroy __attribute((alias("IA__FcStrSetDestroy"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrListCreate ++extern __typeof (FcStrListCreate) FcStrListCreate __attribute((alias("IA__FcStrListCreate"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrListNext ++extern __typeof (FcStrListNext) FcStrListNext __attribute((alias("IA__FcStrListNext"), visibility("default"))); ++#endif ++#ifdef __fcstr__ ++#undef FcStrListDone ++extern __typeof (FcStrListDone) FcStrListDone __attribute((alias("IA__FcStrListDone"), visibility("default"))); ++#endif ++#ifdef __fcxml__ ++#undef FcConfigParseAndLoad ++extern __typeof (FcConfigParseAndLoad) FcConfigParseAndLoad __attribute((alias("IA__FcConfigParseAndLoad"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigGetRescanInverval ++extern __typeof (FcConfigGetRescanInverval) FcConfigGetRescanInverval __attribute((alias("IA__FcConfigGetRescanInverval"), visibility("default"))); ++#endif ++#ifdef __fccfg__ ++#undef FcConfigSetRescanInverval ++extern __typeof (FcConfigSetRescanInverval) FcConfigSetRescanInverval __attribute((alias("IA__FcConfigSetRescanInverval"), visibility("default"))); ++#endif ++#endif ++ +--- misc/fontconfig-2.8.0/src/fcftaliastail.h Wed Aug 20 14:33:55 2008 ++++ misc/build/fontconfig-2.8.0/src/fcftaliastail.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,27 @@ +-dummy ++#if HAVE_GNUC_ATTRIBUTE ++#ifdef __fcfreetype__ ++#undef FcFreeTypeCharIndex ++extern __typeof (FcFreeTypeCharIndex) FcFreeTypeCharIndex __attribute((alias("IA__FcFreeTypeCharIndex"), visibility("default"))); ++#endif ++#ifdef __fcfreetype__ ++#undef FcFreeTypeCharSetAndSpacing ++extern __typeof (FcFreeTypeCharSetAndSpacing) FcFreeTypeCharSetAndSpacing __attribute((alias("IA__FcFreeTypeCharSetAndSpacing"), visibility("default"))); ++#endif ++#ifdef __fcfreetype__ ++#undef FcFreeTypeCharSet ++extern __typeof (FcFreeTypeCharSet) FcFreeTypeCharSet __attribute((alias("IA__FcFreeTypeCharSet"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternGetFTFace ++extern __typeof (FcPatternGetFTFace) FcPatternGetFTFace __attribute((alias("IA__FcPatternGetFTFace"), visibility("default"))); ++#endif ++#ifdef __fcpat__ ++#undef FcPatternAddFTFace ++extern __typeof (FcPatternAddFTFace) FcPatternAddFTFace __attribute((alias("IA__FcPatternAddFTFace"), visibility("default"))); ++#endif ++#ifdef __fcfreetype__ ++#undef FcFreeTypeQueryFace ++extern __typeof (FcFreeTypeQueryFace) FcFreeTypeQueryFace __attribute((alias("IA__FcFreeTypeQueryFace"), visibility("default"))); ++#endif ++#endif ++ +--- misc/fontconfig-2.8.0/src/makefile.mk Wed Aug 20 14:33:55 2008 ++++ misc/build/fontconfig-2.8.0/src/makefile.mk Wed Aug 20 14:26:42 2008 +@@ -1 +1,99 @@ +-dummy ++#************************************************************************* ++# ++# 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=..$/..$/..$/..$/.. ++PRJINC=.. ++PRJNAME=fontconfig ++TARGET=fontconfig ++ ++#ENABLE_EXCEPTIONS=TRUE ++VISIBILITY_HIDDEN=TRUE ++EXTERNAL_WARNINGS_NOT_ERRORS=TRUE ++ ++# --- Settings ---------------------------------- ++ ++.INCLUDE : settings.mk ++ ++#.IF "$(GUI)$(CPU)"=="WNTP" ++ CFLAGS+= -I .. -D HAVE_CONFIG_H -D FC_CACHEDIR=\".\" ++ #.ENDIF ++ ++# --- Files ------------------------------------- ++ ++SLOFILES=\ ++ $(SLO)$/fcatomic.obj \ ++ $(SLO)$/fcblanks.obj \ ++ $(SLO)$/fccache.obj \ ++ $(SLO)$/fccfg.obj \ ++ $(SLO)$/fccharset.obj \ ++ $(SLO)$/fcdbg.obj \ ++ $(SLO)$/fcdefault.obj \ ++ $(SLO)$/fcdir.obj \ ++ $(SLO)$/fcformat.obj \ ++ $(SLO)$/fcfreetype.obj \ ++ $(SLO)$/fcfs.obj \ ++ $(SLO)$/fcinit.obj \ ++ $(SLO)$/fclang.obj \ ++ $(SLO)$/fclist.obj \ ++ $(SLO)$/fcmatch.obj \ ++ $(SLO)$/fcmatrix.obj \ ++ $(SLO)$/fcname.obj \ ++ $(SLO)$/fcpat.obj \ ++ $(SLO)$/fcserialize.obj \ ++ $(SLO)$/fcstr.obj \ ++ $(SLO)$/fcxml.obj \ ++ $(SLO)$/ftglue.obj ++ ++# --- Library ----------------------------------- ++ ++SHL1TARGET= fontconfig$(DLLPOSTFIX) ++SHL1OBJS=$(SLOFILES) ++SHL1STDLIBS=\ ++ ifreetype.lib \ ++ $(LIBXML2LIB) ++ ++ ++SHL1DEPN= ++#SHL1IMPLIB= ifontconfig ++#SHL1USE_EXPORTS=name ++ ++SHL1DEF= $(MISC)$/$(SHL1TARGET).def ++ ++DEF1NAME= $(SHL1TARGET) ++DEF1DEPN= $(MISC)$/$(SHL1TARGET).flt \ ++ $(SLB)$/$(TARGET).lib ++DEFLIB1NAME=$(TARGET) ++ ++# --- Targets ---------------------------------- ++ ++.INCLUDE : target.mk ++ ++# --- filter file ------------------------------ ++ ++$(MISC)$/$(SHL1TARGET).flt: makefile.mk ++ @echo CLEAR_THE_FILE > $@ ++ diff --git a/fontconfig/makefile.mk b/fontconfig/makefile.mk new file mode 100644 index 000000000000..8fd9efe4871a --- /dev/null +++ b/fontconfig/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=so_fontconfig +TARGET=so_fontconfig + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +.IF "$(SYSTEM_FONTCONFIG)" == "YES" +all: + @echo "An already available installation of freetype should exist on your system." + @echo "Therefore the version provided here does not need to be built in addition." +.ENDIF + +# --- Files -------------------------------------------------------- + +TARFILE_NAME=fontconfig-2.8.0 +TARFILE_MD5=77e15a92006ddc2adbb06f840d591c0e + +CONFIGURE_DIR= +.IF "$(OS)"=="WNT" +ADDITIONAL_FILES=\ + fc-arch$/fcalias.h \ + fc-arch$/fcaliastail.h \ + fc-arch$/fcarch.h \ + fc-glyphname$/fcglyphname.h \ + fc-lang$/fclang.h \ + src$/fcalias.h \ + src$/fcaliastail.h \ + src$/fcftaliastail.h \ + src$/makefile.mk \ + config.h + +PATCH_FILES=fontconfig-2.8.0.patch +BUILD_DIR=$(CONFIGURE_DIR)$/src +BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS) +.ELSE +CONFIGURE_ACTION=./configure --enable-shared=yes --enable-libxml2 --disable-docs --libdir=$(OUTDIR)/lib +BUILD_ACTION=$(GNUMAKE) +.ENDIF + +# --- Targets ------------------------------------------------------ + +.INCLUDE : set_ext.mk +.INCLUDE : target.mk +.INCLUDE : tg_ext.mk diff --git a/fontconfig/prj/build.lst b/fontconfig/prj/build.lst new file mode 100644 index 000000000000..f6de3d52523e --- /dev/null +++ b/fontconfig/prj/build.lst @@ -0,0 +1,3 @@ +ep freetype : soltools freetype LIBXML2:libxml2 NULL +ep freetype usr1 - all ep_mkout NULL +ep freetype nmake - all ep_freetype NULL diff --git a/fontconfig/prj/d.lst b/fontconfig/prj/d.lst new file mode 100644 index 000000000000..b409a223608e --- /dev/null +++ b/fontconfig/prj/d.lst @@ -0,0 +1,3 @@ +mkdir: %_DEST%\inc%_EXT%\external\fontconfig +..\%__SRC%\bin\fontconfigmi.dll %_DEST%\bin%_EXT%\fontconfigmi.dll + -- cgit v1.2.3 From d1d6168c4f4fe0af4f7c2560feefca8c379e3cee Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 3 Mar 2011 14:15:16 +0100 Subject: rsvglibs: add libcroco dependency --- libcroco/makefile.mk | 110 +++++++++++++++++++++++++++++++++++++++++++++++++ libcroco/prj/build.lst | 3 ++ libcroco/prj/d.lst | 37 +++++++++++++++++ 3 files changed, 150 insertions(+) create mode 100644 libcroco/makefile.mk create mode 100644 libcroco/prj/build.lst create mode 100644 libcroco/prj/d.lst diff --git a/libcroco/makefile.mk b/libcroco/makefile.mk new file mode 100644 index 000000000000..390ee49ce9c3 --- /dev/null +++ b/libcroco/makefile.mk @@ -0,0 +1,110 @@ +#************************************************************************* +# +# 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=libcroco +TARGET=so_libcroco + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +.IF "$(SYSTEM_LIBCROCO)" == "YES" +all: + @echo "An already available installation of libcroco should exist on your system." + @echo "Therefore the version provided here does not need to be built in addition." +.ENDIF + +# --- Files -------------------------------------------------------- + +LIBCROCOVERSION=0.6.2 + +TARFILE_NAME=$(PRJNAME)-$(LIBCROCOVERSION) +TARFILE_MD5=0611e099e807210cf738dcb41425d104 + +PATCH_FILES= + +CONFIGURE_DIR= +CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) \ + .$/configure \ + --prefix=$(SRC_ROOT)$/$(PRJNAME)$/$(MISC) \ + CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS) -I$(SOLARINCDIR)$/external -I$(SOLARINCDIR)$/external$/glib-2.0" \ + LDFLAGS="-L$(SOLARLIBDIR)" \ + GLIB2_CFLAGS="-I$(SOLARINCDIR)$/external$/glib-2.0" \ + GLIB2_LIBS="-lgio-2.0 -lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lintl" \ + LIBXML2_CFLAGS=" " \ + LIBXML2_LIBS="-lxml2" + +CONFIGURE_FLAGS=$(eq,$(OS),MACOSX CPPFLAGS="$(EXTRA_CDEFS)" $(NULL)) + +BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) \ + $(GNUMAKE) +BUILD_DIR=$(CONFIGURE_DIR) + +.IF "$(OS)"=="MACOSX" +EXTRPATH=LOADER +OUT2LIB+=src$/.libs$/libcroco-0.6.3.0.1.dylib + +OUT2INC+=src$/cr-additional-sel.h +OUT2INC+=src$/cr-input.h +OUT2INC+=src$/cr-rgb.h +OUT2INC+=src$/cr-stylesheet.h +OUT2INC+=src$/cr-attr-sel.h +OUT2INC+=src$/cr-num.h +OUT2INC+=src$/cr-sel-eng.h +OUT2INC+=src$/cr-term.h +OUT2INC+=src$/cr-cascade.h +OUT2INC+=src$/cr-om-parser.h +OUT2INC+=src$/cr-selector.h +OUT2INC+=src$/cr-tknzr.h +OUT2INC+=src$/cr-declaration.h +OUT2INC+=src$/cr-parser.h +OUT2INC+=src$/cr-simple-sel.h +OUT2INC+=src$/cr-token.h +OUT2INC+=src$/cr-doc-handler.h +OUT2INC+=src$/cr-parsing-location.h +OUT2INC+=src$/cr-statement.h +OUT2INC+=src$/cr-utils.h +OUT2INC+=src$/cr-enc-handler.h +OUT2INC+=src$/cr-prop-list.h +OUT2INC+=src$/cr-string.h +OUT2INC+=src$/libcroco-config.h +OUT2INC+=src$/cr-fonts.h +OUT2INC+=src$/cr-pseudo.h +OUT2INC+=src$/cr-style.h +OUT2INC+=src$/libcroco.h +.ELIF "$(OS)"=="WNT" +.ELSE +.ENDIF + +# --- Targets ------------------------------------------------------ + +.INCLUDE : set_ext.mk +.INCLUDE : target.mk +.INCLUDE : tg_ext.mk + diff --git a/libcroco/prj/build.lst b/libcroco/prj/build.lst new file mode 100644 index 000000000000..ef0578bfe141 --- /dev/null +++ b/libcroco/prj/build.lst @@ -0,0 +1,3 @@ +cr libcroco : libxml2 glib soltools NULL +cr libcroco usr1 - all cr_mkout NULL +cr libcroco nmake - all cr_libcroco NULL diff --git a/libcroco/prj/d.lst b/libcroco/prj/d.lst new file mode 100644 index 000000000000..ec15be37015b --- /dev/null +++ b/libcroco/prj/d.lst @@ -0,0 +1,37 @@ +mkdir: %_DEST%\inc%_EXT%\external +mkdir: %_DEST%\inc%_EXT%\external\libcroco-0.6 +mkdir: %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco + +..\%__SRC%\inc\cr-additional-sel.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-additional-sel.h +..\%__SRC%\inc\cr-input.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-input.h +..\%__SRC%\inc\cr-rgb.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-rgb.h +..\%__SRC%\inc\cr-stylesheet.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-stylesheet.h +..\%__SRC%\inc\cr-attr-sel.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-attr-sel.h +..\%__SRC%\inc\cr-num.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-num.h +..\%__SRC%\inc\cr-sel-eng.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-sel-eng.h +..\%__SRC%\inc\cr-term.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-term.h +..\%__SRC%\inc\cr-cascade.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-cascade.h +..\%__SRC%\inc\cr-om-parser.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-om-parser.h +..\%__SRC%\inc\cr-selector.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-selector.h +..\%__SRC%\inc\cr-tknzr.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-tknzr.h +..\%__SRC%\inc\cr-declaration.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-declaration.h +..\%__SRC%\inc\cr-parser.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-parser.h +..\%__SRC%\inc\cr-simple-sel.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-simple-sel.h +..\%__SRC%\inc\cr-token.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-token.h +..\%__SRC%\inc\cr-doc-handler.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-doc-handler.h +..\%__SRC%\inc\cr-parsing-location.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-parsing-location.h +..\%__SRC%\inc\cr-statement.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-statement.h +..\%__SRC%\inc\cr-utils.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-utils.h +..\%__SRC%\inc\cr-enc-handler.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-enc-handler.h +..\%__SRC%\inc\cr-prop-list.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-prop-list.h +..\%__SRC%\inc\cr-string.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-string.h +..\%__SRC%\inc\libcroco-config.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\libcroco-config.h +..\%__SRC%\inc\cr-fonts.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-fonts.h +..\%__SRC%\inc\cr-pseudo.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-pseudo.h +..\%__SRC%\inc\cr-style.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-style.h +..\%__SRC%\inc\libcroco.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\libcroco.h + +..\%__SRC%\lib\libcroco-0.6.3.0.1.dylib %_DEST%\lib%_EXT%\libcroco-0.6.3.0.1.dylib +symlink: %_DEST%\lib%_EXT%\libcroco-0.6.3.0.1.dylib %_DEST%\lib%_EXT%\libcroco-0.6.3.dylib +symlink: %_DEST%\lib%_EXT%\libcroco-0.6.3.dylib %_DEST%\lib%_EXT%\libcroco-0.6.dylib + -- cgit v1.2.3 From 1a37018cfe5ac64071be7de0953fb8b3f3fed17d Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 3 Mar 2011 14:20:10 +0100 Subject: resvglibs: patch configure --- librsvg/librsvg-2.32.1.patch | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/librsvg/librsvg-2.32.1.patch b/librsvg/librsvg-2.32.1.patch index db8f89169df0..7e065a1bc497 100644 --- a/librsvg/librsvg-2.32.1.patch +++ b/librsvg/librsvg-2.32.1.patch @@ -1,5 +1,5 @@ --- misc/librsvg-2.32.1/configure 2010-11-13 11:52:19.000000000 +0100 -+++ misc/build/librsvg-2.32.1/configure 2011-03-02 14:06:41.000000000 +0100 ++++ misc/build/librsvg-2.32.1/configure 2011-03-03 13:50:14.000000000 +0100 @@ -12288,8 +12288,8 @@ @@ -11,16 +11,22 @@ pkg_failed=no ---- misc/librsvg-2.32.1/librsvg-features.h 2010-11-13 11:52:49.000000000 +0100 -+++ misc/build/librsvg-2.32.1/librsvg-features.h 2011-03-02 14:05:37.000000000 +0100 -@@ -11,8 +11,8 @@ - (LIBRSVG_MAJOR_VERSION == (major) && LIBRSVG_MINOR_VERSION > (minor)) || \ - (LIBRSVG_MAJOR_VERSION == (major) && LIBRSVG_MINOR_VERSION == (minor) && LIBRSVG_MICRO_VERSION >= (micro))) - --#define LIBRSVG_HAVE_SVGZ (1) --#define LIBRSVG_HAVE_CSS (1) -+#define LIBRSVG_HAVE_SVGZ (0) -+#define LIBRSVG_HAVE_CSS (0) - - #define LIBRSVG_CHECK_FEATURE(FEATURE) (defined(LIBRSVG_HAVE_##FEATURE) && LIBRSVG_HAVE_##FEATURE) - +@@ -12562,6 +12562,7 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gio 2.24 is available" >&5 + $as_echo_n "checking whether gio 2.24 is available... " >&6; } ++if 0 ; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.24.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.24.0") 2>&5 +@@ -12572,6 +12573,9 @@ + else + have_gio_2_24=no + fi ++else ++ have_gio_2_24=yes ++fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gio_2_24" >&5 + $as_echo "$have_gio_2_24" >&6; } + + -- cgit v1.2.3 From a9f44c3d4d87e28029e59315edce08e7fe3889b1 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 3 Mar 2011 14:42:27 +0100 Subject: rsvglibs: add libcroco dependency --- librsvg/librsvg-2.32.1.patch | 13 ++++++++++++- librsvg/makefile.mk | 15 ++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/librsvg/librsvg-2.32.1.patch b/librsvg/librsvg-2.32.1.patch index 7e065a1bc497..8d2368e11e39 100644 --- a/librsvg/librsvg-2.32.1.patch +++ b/librsvg/librsvg-2.32.1.patch @@ -1,5 +1,5 @@ --- misc/librsvg-2.32.1/configure 2010-11-13 11:52:19.000000000 +0100 -+++ misc/build/librsvg-2.32.1/configure 2011-03-03 13:50:14.000000000 +0100 ++++ misc/build/librsvg-2.32.1/configure 2011-03-03 14:28:12.000000000 +0100 @@ -12288,8 +12288,8 @@ @@ -29,4 +29,15 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gio_2_24" >&5 $as_echo "$have_gio_2_24" >&6; } +@@ -12695,8 +12699,8 @@ + + + +-LIBCROCO_CFLAGS="" +-LIBCROCO_LIBS="" ++#LIBCROCO_CFLAGS="" ++#LIBCROCO_LIBS="" + LIBCROCOPKG="" + + test_croco=true diff --git a/librsvg/makefile.mk b/librsvg/makefile.mk index 084d9e2569e4..ef458745b95a 100644 --- a/librsvg/makefile.mk +++ b/librsvg/makefile.mk @@ -58,14 +58,19 @@ CONFIGURE_DIR= CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) .$/configure \ --prefix=$(SRC_ROOT)$/$(PRJNAME)$/$(MISC) CONFIGURE_FLAGS=--disable-gtk-theme --disable-tools --with-croco --with-svgz \ - LIBRSVG_CFLAGS=-I$(SOLARINCDIR)$/external/glib-2.0 \ - LIBRSVG_LIBS="-lgdk_pixbuf-2.0 -lpango-1.0 -lpangocairo-1.0 -lgthread-2.0 -lgio-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 $(LIBXML_LIBS) -lcairo -lintl" \ - GDK_PIXBUF_CFLAGS=-I$(SOLARINCDIR)$/external/gdk-pixbuf-2.0 \ + LIBRSVG_CFLAGS="-I$(SOLARINCDIR)$/external$/glib-2.0 -I$(SOLARINCDIR)$/external$/gdk-pixbuf-2.0 -I$(SOLARINCDIR)$/external$/pango-1.0 -I$(SOLARINCDIR)$/cairo $(LIBXML_CFLAGS)" \ + LIBRSVG_LIBS="-L$(SOLARLIBDIR) -lgdk_pixbuf-2.0 -lpango-1.0 -lpangocairo-1.0 -lgthread-2.0 -lgio-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 $(LIBXML_LIBS) -lcairo -lintl" \ + GDK_PIXBUF_CFLAGS="-I$(SOLARINCDIR)$/external$/gdk-pixbuf-2.0" \ GDK_PIXBUF_LIBS=-lgdkpixbuf-2.0 \ - GTHREAD_CFLAGS=-I$(SOLARINCDIR)$/external/glib-2.0 \ + GTHREAD_CFLAGS=-I$(SOLARINCDIR)$/external/$glib-2.0 \ GTHREAD_LIBS=-lgthread-2.0 \ - CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS) -I$(SOLARINCDIR)$/external -I$(SOLARINCDIR)$/external$/glib-2.0 -I$(SOLARINCDIR)$/external/gdk-pixbuf-2.0 -I$(SOLARINCDIR)$/external/pango-1.0 -I$(SOLARINCDIR)$/cairo" \ + LIBCROCO_CFLAGS="-I$(SOLARINCDIR)$/external$/libcroco-0.6" \ + LIBCROCO_LIBS=-lcroco-0.6 + CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS) -I$(SOLARINCDIR)$/external -I$(SOLARINCDIR)$/external$/glib-2.0 -I$(SOLARINCDIR)$/external$/gdk-pixbuf-2.0 -I$(SOLARINCDIR)$/external$/pango-1.0 -I$(SOLARINCDIR)$/cairo" \ LDFLAGS="$(CONFIGURE_LDFLAGS)" +.IF "$(OS)" == "MACOSX" +CONFIGURE_FLAGS+= CPPFLAGS="$(ARCH_FLAGS) $(EXTRA_CDEFS)" +.ENDIF BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) \ $(GNUMAKE) -- cgit v1.2.3 From 7c83fe565234aa5025729462f3250ed883f1b7df Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 3 Mar 2011 14:49:27 +0100 Subject: fwk167: #i90917# Filter out requests for controls which are not available for the explorer-style Windows file picker. --- .../source/win32/filepicker/WinFileOpenImpl.cxx | 33 ++++++++++++++++++---- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx index 9fb13c1a2d5e..f701efe1357b 100644 --- a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx +++ b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx @@ -316,11 +316,24 @@ void SAL_CALL CWinFileOpenImpl::appendFilterGroup(const rtl::OUString& sGroupTit // XExtendedFilePicker //================================================================================================================= +// #i90917: Due to a different feature set for the system-dependent file pickers +// it's possible that generic code (e.g. sfx2) provides control ids +// (see ExtendedFilePickerElementIds::LISTBOX_FILTER_SELECTOR) which are NOT +// available on all platforms. This filter function should filter out control ids +// which are only available on KDE/GTK file pickers. +static bool filterControlCommand( sal_Int16 nControlId ) +{ + if ( nControlId == LISTBOX_FILTER_SELECTOR ) + return true; + return false; +} + void SAL_CALL CWinFileOpenImpl::setValue(sal_Int16 aControlId, sal_Int16 aControlAction, const uno::Any& aValue) throw(uno::RuntimeException) { OSL_ASSERT(m_FilePickerState); - m_FilePickerState->setValue(aControlId, aControlAction, aValue); + if ( !filterControlCommand( aControlId )) + m_FilePickerState->setValue(aControlId, aControlAction, aValue); } //----------------------------------------------------------------------------------------- @@ -332,7 +345,10 @@ uno::Any SAL_CALL CWinFileOpenImpl::getValue(sal_Int16 aControlId, sal_Int16 aCo throw(uno::RuntimeException) { OSL_ASSERT(m_FilePickerState); - return m_FilePickerState->getValue(aControlId, aControlAction); + if ( !filterControlCommand( aControlId )) + return m_FilePickerState->getValue(aControlId, aControlAction); + else + return uno::Any(); } //----------------------------------------------------------------------------------------- @@ -343,7 +359,8 @@ void SAL_CALL CWinFileOpenImpl::enableControl(sal_Int16 ControlID, sal_Bool bEna throw(uno::RuntimeException) { OSL_ASSERT(m_FilePickerState); - m_FilePickerState->enableControl(ControlID, bEnable); + if ( !filterControlCommand( ControlID )) + m_FilePickerState->enableControl(ControlID, bEnable); } //----------------------------------------------------------------------------------------- @@ -353,7 +370,9 @@ void SAL_CALL CWinFileOpenImpl::enableControl(sal_Int16 ControlID, sal_Bool bEna void SAL_CALL CWinFileOpenImpl::setLabel( sal_Int16 aControlId, const rtl::OUString& aLabel ) throw (uno::RuntimeException) { - m_FilePickerState->setLabel(aControlId, aLabel); + OSL_ASSERT(m_FilePickerState); + if ( !filterControlCommand( aControlId )) + m_FilePickerState->setLabel(aControlId, aLabel); } //----------------------------------------------------------------------------------------- @@ -363,7 +382,11 @@ void SAL_CALL CWinFileOpenImpl::setLabel( sal_Int16 aControlId, const rtl::OUStr rtl::OUString SAL_CALL CWinFileOpenImpl::getLabel( sal_Int16 aControlId ) throw (uno::RuntimeException) { - return m_FilePickerState->getLabel(aControlId); + OSL_ASSERT(m_FilePickerState); + if ( !filterControlCommand( aControlId )) + return m_FilePickerState->getLabel(aControlId); + else + return rtl::OUString(); } //----------------------------------------------------------------------------------------- -- cgit v1.2.3 From 1517568a5b72d99d039fdfe81b4b6c3c4bf830a4 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Thu, 3 Mar 2011 14:58:19 +0100 Subject: calc66: #i113553# update MarkData with additional columns in ScViewFunc::PasteFromClip --- sc/source/ui/view/viewfun3.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 0f4893cf3512..f25aa500cc72 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -1104,7 +1104,20 @@ sal_Bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc, if (nBlockAddX > nDestSizeX) nMarkAddX = nBlockAddX - nDestSizeX; // fuer Merge-Test else + { nEndCol = nStartCol + nDestSizeX; + if (nEndCol > aMarkRange.aEnd.Col()) + { + // #i113553# larger range has to be included in aFilteredMark (for undo), but extending columns can't changed the filtered status + aMarkRange = ScRange( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab ); + aFilteredMark.SetMarkArea( aMarkRange ); + if (bMarkIsFiltered) + { + ScViewUtil::UnmarkFiltered( aFilteredMark, pDoc ); + aFilteredMark.FillRangeListWithMarks( &aRangeList, sal_True ); + } + } + } if (nBlockAddY > nDestSizeY) nMarkAddY = nBlockAddY - nDestSizeY; // fuer Merge-Test -- cgit v1.2.3 From 394514c504510e18ef65e0cc1e9bdfeae42e175c Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 3 Mar 2011 15:43:51 +0100 Subject: rsvglibs: add libpng dependency for cairo --- cairo/cairo/makefile.mk | 5 +++++ libpng/libpng.patch | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cairo/cairo/makefile.mk b/cairo/cairo/makefile.mk index 834095144d21..4bf3911b1ca9 100644 --- a/cairo/cairo/makefile.mk +++ b/cairo/cairo/makefile.mk @@ -173,6 +173,11 @@ CONFIGURE_FLAGS+=CFLAGS="-I$(SRC_ROOT)$/$(PRJNAME)$/$(INPATH)$/inc $(cairo_CFLAG .ENDIF +.IF "$(SYSTEM_LIBPNG)" != "YES" +CONFIGURE_FLAGS+=png_CFLAGS="-I$(SOLARINCDIR)$/external$/libpng" png_LIBS="-L$(SOLARLIBDIR) -lpng" +.ENDIF + + OUT2INC+=cairo-version.h \ src$/cairo-deprecated.h \ src$/cairo-features.h \ diff --git a/libpng/libpng.patch b/libpng/libpng.patch index 26b3098d0467..3bfc76c9131b 100644 --- a/libpng/libpng.patch +++ b/libpng/libpng.patch @@ -46,7 +46,7 @@ + $(SLO)$/pngwutil.obj + +LIB1TARGET=$(SLB)$/$(TARGET).lib -+LIB1ARCHIV=$(LB)$/lib$(TARGET).a ++LIB1ARCHIV=$(LB)$/$(TARGET).a +LIB1OBJFILES=$(SLOFILES) + +.INCLUDE : target.mk -- cgit v1.2.3 From 1de09f782860838109810c7d42ea7fbde0aeb886 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 3 Mar 2011 15:55:42 +0100 Subject: rsvglibs: add librsvg --- librsvg/makefile.mk | 8 +++++++- librsvg/prj/d.lst | 12 ++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/librsvg/makefile.mk b/librsvg/makefile.mk index ef458745b95a..ea76a0ea8d56 100644 --- a/librsvg/makefile.mk +++ b/librsvg/makefile.mk @@ -61,7 +61,7 @@ CONFIGURE_FLAGS=--disable-gtk-theme --disable-tools --with-croco --with-svgz \ LIBRSVG_CFLAGS="-I$(SOLARINCDIR)$/external$/glib-2.0 -I$(SOLARINCDIR)$/external$/gdk-pixbuf-2.0 -I$(SOLARINCDIR)$/external$/pango-1.0 -I$(SOLARINCDIR)$/cairo $(LIBXML_CFLAGS)" \ LIBRSVG_LIBS="-L$(SOLARLIBDIR) -lgdk_pixbuf-2.0 -lpango-1.0 -lpangocairo-1.0 -lgthread-2.0 -lgio-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 $(LIBXML_LIBS) -lcairo -lintl" \ GDK_PIXBUF_CFLAGS="-I$(SOLARINCDIR)$/external$/gdk-pixbuf-2.0" \ - GDK_PIXBUF_LIBS=-lgdkpixbuf-2.0 \ + GDK_PIXBUF_LIBS=-lgdk_pixbuf-2.0 \ GTHREAD_CFLAGS=-I$(SOLARINCDIR)$/external/$glib-2.0 \ GTHREAD_LIBS=-lgthread-2.0 \ LIBCROCO_CFLAGS="-I$(SOLARINCDIR)$/external$/libcroco-0.6" \ @@ -80,6 +80,12 @@ BUILD_DIR=$(CONFIGURE_DIR) .IF "$(OS)"=="MACOSX" EXTRPATH=LOADER +OUT2LIB+=.libs$/librsvg-2.2.dylib + +OUT2INC+=librsvg-enum-types.h +OUT2INC+=librsvg-features.h +OUT2INC+=rsvg-cairo.h +OUT2INC+=rsvg.h .ELIF "$(OS)"=="WNT" .ENDIF diff --git a/librsvg/prj/d.lst b/librsvg/prj/d.lst index e69de29bb2d1..cd238ecb7e8f 100644 --- a/librsvg/prj/d.lst +++ b/librsvg/prj/d.lst @@ -0,0 +1,12 @@ +mkdir: %_DEST%\inc%_EXT%\external +mkdir: %_DEST%\inc%_EXT%\external\librsvg-2.0 +mkdir: %_DEST%\inc%_EXT%\external\librsvg-2.0\librsvg + +..\%__SRC%\inc\rsvg.h %_DEST%\inc%_EXT%\external\librsvg-2.0\librsvg\rsvg.h +..\%__SRC%\inc\rsvg-cairo.h %_DEST%\inc%_EXT%\external\librsvg-2.0\librsvg\rsvg-cairo.h +..\%__SRC%\inc\rsvg-features.h %_DEST%\inc%_EXT%\external\librsvg-2.0\librsvg\rsvg-features.h +..\%__SRC%\inc\rsvg-enum-types.h %_DEST%\inc%_EXT%\external\librsvg-2.0\librsvg\rsvg-enum-types.h + +..\%__SRC%\lib\librsvg-2.2.dylib %_DEST%\lib%_EXT%\librsvg-2.2.dylib +symlink: %_DEST%\lib%_EXT%\librsvg-2.2.dylib %_DEST%\lib%_EXT%\librsvg-2.dylib + -- cgit v1.2.3 From d9698e83a5b9428db2500937181cb344625b7172 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 4 Mar 2011 13:20:07 +0100 Subject: rsvglibs: add libpng support --- gdk-pixbuf/makefile.mk | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/gdk-pixbuf/makefile.mk b/gdk-pixbuf/makefile.mk index d723a8c39f78..65cb1c276417 100644 --- a/gdk-pixbuf/makefile.mk +++ b/gdk-pixbuf/makefile.mk @@ -55,14 +55,13 @@ CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) \ BASE_DEPENDENCIES_LIBS=" " \ .$/configure \ --prefix=$(SRC_ROOT)$/$(PRJNAME)$/$(MISC) \ - CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS) -I$(SOLARINCDIR)$/external -I$(SOLARINCDIR)$/external/glib-2.0" \ + CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS) -I$(SOLARINCDIR)$/external -I$(SOLARINCDIR)$/external$/glib-2.0 -I$(SOLARINCDIR)$/external$/libpng" \ LDFLAGS="-L$(SOLARLIBDIR) -lgobject-2.0 -lgio-2.0 -lgthread-2.0 -lgmodule-2.0 -lglib-2.0 -lintl" \ --disable-glibtest \ --without-libtiff \ - --without-libjpeg \ - --without-libpng + --without-libjpeg -## FIXME: libtiff, libjpeg, libpng +## FIXME: libtiff, libjpeg CONFIGURE_FLAGS=$(eq,$(OS),MACOSX CPPFLAGS="$(EXTRA_CDEFS)" $(NULL)) @@ -72,21 +71,21 @@ BUILD_DIR=$(CONFIGURE_DIR) .IF "$(OS)"=="MACOSX" EXTRPATH=LOADER -OUT2LIB+=gdk-pixbuf/.libs/libgdk_pixbuf-2.0.0.dylib - -OUT2BIN+=gdk-pixbuf/.libs/gdk-pixbuf-query-loaders - -OUT2INC+=gdk-pixbuf/gdk-pixbuf-animation.h -OUT2INC+=gdk-pixbuf/gdk-pixbuf-features.h -OUT2INC+=gdk-pixbuf/gdk-pixbuf-marshal.h -OUT2INC+=gdk-pixbuf/gdk-pixbuf.h -OUT2INC+=gdk-pixbuf/gdk-pixbuf-core.h -OUT2INC+=gdk-pixbuf/gdk-pixbuf-io.h -OUT2INC+=gdk-pixbuf/gdk-pixbuf-simple-anim.h -OUT2INC+=gdk-pixbuf/gdk-pixdata.h -OUT2INC+=gdk-pixbuf/gdk-pixbuf-enum-types.h -OUT2INC+=gdk-pixbuf/gdk-pixbuf-loader.h -OUT2INC+=gdk-pixbuf/gdk-pixbuf-transform.h +OUT2LIB+=gdk-pixbuf$/.libs/libgdk_pixbuf-2.0.0.dylib + +OUT2BIN+=gdk-pixbuf$/.libs/gdk-pixbuf-query-loaders + +OUT2INC+=gdk-pixbuf$/gdk-pixbuf-animation.h +OUT2INC+=gdk-pixbuf$/gdk-pixbuf-features.h +OUT2INC+=gdk-pixbuf$/gdk-pixbuf-marshal.h +OUT2INC+=gdk-pixbuf$/gdk-pixbuf.h +OUT2INC+=gdk-pixbuf$/gdk-pixbuf-core.h +OUT2INC+=gdk-pixbuf$/gdk-pixbuf-io.h +OUT2INC+=gdk-pixbuf$/gdk-pixbuf-simple-anim.h +OUT2INC+=gdk-pixbuf$/gdk-pixdata.h +OUT2INC+=gdk-pixbuf$/gdk-pixbuf-enum-types.h +OUT2INC+=gdk-pixbuf$/gdk-pixbuf-loader.h +OUT2INC+=gdk-pixbuf$/gdk-pixbuf-transform.h .ELIF "$(OS)"=="WNT" .ELSE .ENDIF -- cgit v1.2.3 From 4bb459568df8ca68adc85d3a2871a66ee8bc3110 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Fri, 4 Mar 2011 14:38:24 +0100 Subject: fwk167: #i90917# Added missing include --- extensions/source/propctrlr/eventhandler.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx index 90c3931c60b5..85a686859ee7 100644 --- a/extensions/source/propctrlr/eventhandler.cxx +++ b/extensions/source/propctrlr/eventhandler.cxx @@ -74,6 +74,7 @@ #include #include #include +#include #include #include -- cgit v1.2.3 From 413675e3dcd5fcae4f81ce721bfd62b7d891034b Mon Sep 17 00:00:00 2001 From: "Eike Rathke [er]" Date: Fri, 4 Mar 2011 14:43:09 +0100 Subject: calc66: #i103331# make OFFSET with external references work again + Introduced FormulaSubroutineToken to hold a FormulaTokenArray. * INDIRECT in case of external reference returns FormulaSubroutineToken instead of directly pushing the token array to code and signalling its presence to ScInterpreter::Interpret(). * ScInterpreter::ScExternalRef() checks if an external reference is used with OFFSET and if so does not resolve it but pushes it so it can be handled within OFFSET. + OFFSET recognizes external reference and creates an external reference of the new area and returns that as subroutine to be resolved by ScExternalRef(). * Interpret() pushes the subroutine to code and rememberes the token and array for late destruction. --- sc/inc/token.hxx | 33 +++--- sc/source/core/tool/interpr1.cxx | 211 +++++++++++++++++++++++++++------------ sc/source/core/tool/interpr4.cxx | 48 ++++++++- sc/source/core/tool/token.cxx | 8 ++ 4 files changed, 215 insertions(+), 85 deletions(-) diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx index 13a8038a4109..28cefeec8554 100644 --- a/sc/inc/token.hxx +++ b/sc/inc/token.hxx @@ -198,14 +198,14 @@ public: ScExternalSingleRefToken( const ScExternalSingleRefToken& r ); virtual ~ScExternalSingleRefToken(); - virtual sal_uInt16 GetIndex() const; + virtual sal_uInt16 GetIndex() const; virtual const String& GetString() const; virtual const ScSingleRefData& GetSingleRef() const; - virtual ScSingleRefData& GetSingleRef(); - virtual void CalcAbsIfRel( const ScAddress& ); - virtual void CalcRelFromAbs( const ScAddress& ); + virtual ScSingleRefData& GetSingleRef(); + virtual void CalcAbsIfRel( const ScAddress& ); + virtual void CalcRelFromAbs( const ScAddress& ); virtual sal_Bool operator==( const formula::FormulaToken& rToken ) const; - virtual FormulaToken* Clone() const { return new ScExternalSingleRefToken(*this); } + virtual FormulaToken* Clone() const { return new ScExternalSingleRefToken(*this); } }; @@ -220,20 +220,21 @@ private: public: ScExternalDoubleRefToken( sal_uInt16 nFileId, const String& rTabName, const ScComplexRefData& r ); ScExternalDoubleRefToken( const ScExternalDoubleRefToken& r ); + explicit ScExternalDoubleRefToken( const ScExternalSingleRefToken& r ); virtual ~ScExternalDoubleRefToken(); - virtual sal_uInt16 GetIndex() const; - virtual const String& GetString() const; - virtual const ScSingleRefData& GetSingleRef() const; - virtual ScSingleRefData& GetSingleRef(); - virtual const ScSingleRefData& GetSingleRef2() const; - virtual ScSingleRefData& GetSingleRef2(); - virtual const ScComplexRefData& GetDoubleRef() const; - virtual ScComplexRefData& GetDoubleRef(); - virtual void CalcAbsIfRel( const ScAddress& ); - virtual void CalcRelFromAbs( const ScAddress& ); + virtual sal_uInt16 GetIndex() const; + virtual const String& GetString() const; + virtual const ScSingleRefData& GetSingleRef() const; + virtual ScSingleRefData& GetSingleRef(); + virtual const ScSingleRefData& GetSingleRef2() const; + virtual ScSingleRefData& GetSingleRef2(); + virtual const ScComplexRefData& GetDoubleRef() const; + virtual ScComplexRefData& GetDoubleRef(); + virtual void CalcAbsIfRel( const ScAddress& ); + virtual void CalcRelFromAbs( const ScAddress& ); virtual sal_Bool operator==( const formula::FormulaToken& rToken ) const; - virtual FormulaToken* Clone() const { return new ScExternalDoubleRefToken(*this); } + virtual FormulaToken* Clone() const { return new ScExternalDoubleRefToken(*this); } }; diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 5439609c7c57..1c781cdc8c6f 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -6220,7 +6220,7 @@ void ScInterpreter::ScDBVarP() } -ScTokenArray* lcl_CreateExternalRefTokenArray( const ScAddress& rPos, ScDocument* pDoc, +FormulaSubroutineToken* lcl_CreateExternalRefSubroutine( const ScAddress& rPos, ScDocument* pDoc, const ScAddress::ExternalInfo& rExtInfo, const ScRefAddress& rRefAd1, const ScRefAddress* pRefAd2 ) { @@ -6262,7 +6262,7 @@ ScTokenArray* lcl_CreateExternalRefTokenArray( const ScAddress& rPos, ScDocument rExtInfo.maTabName, nSheets); ScCompiler aComp( pDoc, rPos, *pTokenArray); aComp.CompileTokenArray(); - return pTokenArray; + return new FormulaSubroutineToken( pTokenArray); } @@ -6291,15 +6291,10 @@ void ScInterpreter::ScIndirect() { if (aExtInfo.mbExternal) { - /* TODO: future versions should implement a proper subroutine - * token. This procedure here is a minimally invasive fix for - * #i101645# in OOo3.1.1 */ - // Push a subroutine on the instruction code stack that - // resolves the external reference as the next instruction. - aCode.Push( lcl_CreateExternalRefTokenArray( aPos, pDok, + // Push a subroutine that resolves the external reference as + // the next instruction. + PushTempToken( lcl_CreateExternalRefSubroutine( aPos, pDok, aExtInfo, aRefAd, &aRefAd2)); - // Signal subroutine call to interpreter. - PushTempToken( new FormulaUnknownToken( ocCall)); } else PushDoubleRef( aRefAd.Col(), aRefAd.Row(), aRefAd.Tab(), @@ -6311,15 +6306,10 @@ void ScInterpreter::ScIndirect() { if (aExtInfo.mbExternal) { - /* TODO: future versions should implement a proper subroutine - * token. This procedure here is a minimally invasive fix for - * #i101645# in OOo3.1.1 */ - // Push a subroutine on the instruction code stack that - // resolves the external reference as the next instruction. - aCode.Push( lcl_CreateExternalRefTokenArray( aPos, pDok, + // Push a subroutine that resolves the external reference as + // the next instruction. + PushTempToken( lcl_CreateExternalRefSubroutine( aPos, pDok, aExtInfo, aRefAd, NULL)); - // Signal subroutine call to interpreter. - PushTempToken( new FormulaUnknownToken( ocCall)); } else PushSingleRef( aRefAd.Col(), aRefAd.Row(), aRefAd.Tab() ); @@ -6468,6 +6458,24 @@ void ScInterpreter::ScAddressFunc() } +FormulaSubroutineToken* lcl_CreateExternalRefSubroutine( const ScAddress& rPos, + ScDocument* pDoc, const FormulaTokenRef& xExtRef ) +{ + // The exact usage (which cell range) of the external table can't be + // detected during the store-to-file cycle, mark it as permanently + // referenced so it gets stored even if not directly referenced anywhere. + ScExternalRefManager* pRefMgr = pDoc->GetExternalRefManager(); + pRefMgr->setCacheTableReferencedPermanently( + static_cast(xExtRef.get())->GetIndex(), + static_cast(xExtRef.get())->GetString(), 1); + ScTokenArray* pTokenArray = new ScTokenArray; + pTokenArray->AddToken( *xExtRef); + ScCompiler aComp( pDoc, rPos, *pTokenArray); + aComp.CompileTokenArray(); + return new FormulaSubroutineToken( pTokenArray); +} + + void ScInterpreter::ScOffset() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScOffset" ); @@ -6492,54 +6500,129 @@ void ScInterpreter::ScOffset() PushIllegalArgument(); return; } - if (GetStackType() == svSingleRef) - { - PopSingleRef(nCol1, nRow1, nTab1); - if (nParamCount == 3 || (nColNew < 0 && nRowNew < 0)) - { - nCol1 = (SCCOL)((long) nCol1 + nColPlus); - nRow1 = (SCROW)((long) nRow1 + nRowPlus); - if (!ValidCol(nCol1) || !ValidRow(nRow1)) - PushIllegalArgument(); - else - PushSingleRef(nCol1, nRow1, nTab1); - } - else - { - if (nColNew < 0) - nColNew = 1; - if (nRowNew < 0) - nRowNew = 1; - nCol1 = (SCCOL)((long)nCol1+nColPlus); // ! nCol1 wird veraendert! - nRow1 = (SCROW)((long)nRow1+nRowPlus); - nCol2 = (SCCOL)((long)nCol1+nColNew-1); - nRow2 = (SCROW)((long)nRow1+nRowNew-1); - if (!ValidCol(nCol1) || !ValidRow(nRow1) || - !ValidCol(nCol2) || !ValidRow(nRow2)) - PushIllegalArgument(); - else - PushDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab1); - } - } - else if (GetStackType() == svDoubleRef) + FormulaTokenRef xExtRef; + switch (GetStackType()) { - PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2); - if (nColNew < 0) - nColNew = nCol2 - nCol1 + 1; - if (nRowNew < 0) - nRowNew = nRow2 - nRow1 + 1; - nCol1 = (SCCOL)((long)nCol1+nColPlus); - nRow1 = (SCROW)((long)nRow1+nRowPlus); - nCol2 = (SCCOL)((long)nCol1+nColNew-1); - nRow2 = (SCROW)((long)nRow1+nRowNew-1); - if (!ValidCol(nCol1) || !ValidRow(nRow1) || - !ValidCol(nCol2) || !ValidRow(nRow2) || nTab1 != nTab2) - PushIllegalArgument(); - else - PushDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab1); + case svExternalSingleRef: + xExtRef = PopToken()->Clone(); + // fallthru + case svSingleRef: + { + if (xExtRef) + { + ScSingleRefData& rData = static_cast(xExtRef.get())->GetSingleRef(); + rData.CalcAbsIfRel( aPos); + nCol1 = rData.nCol; + nRow1 = rData.nRow; + nTab1 = rData.nTab; + } + else + PopSingleRef( nCol1, nRow1, nTab1); + if (nParamCount == 3 || (nColNew < 0 && nRowNew < 0)) + { + nCol1 = (SCCOL)((long) nCol1 + nColPlus); + nRow1 = (SCROW)((long) nRow1 + nRowPlus); + if (!ValidCol(nCol1) || !ValidRow(nRow1)) + PushIllegalArgument(); + else if (xExtRef) + { + ScSingleRefData& rData = static_cast(xExtRef.get())->GetSingleRef(); + rData.nCol = nCol1; + rData.nRow = nRow1; + rData.nTab = nTab1; + rData.CalcRelFromAbs( aPos); + // Push a subroutine that resolves the external + // reference as the next instruction. + PushTempToken( lcl_CreateExternalRefSubroutine( aPos, pDok, xExtRef)); + } + else + PushSingleRef(nCol1, nRow1, nTab1); + } + else + { + if (nColNew < 0) + nColNew = 1; + if (nRowNew < 0) + nRowNew = 1; + nCol1 = (SCCOL)((long)nCol1+nColPlus); // ! nCol1 is modified + nRow1 = (SCROW)((long)nRow1+nRowPlus); + nCol2 = (SCCOL)((long)nCol1+nColNew-1); + nRow2 = (SCROW)((long)nRow1+nRowNew-1); + if (!ValidCol(nCol1) || !ValidRow(nRow1) || + !ValidCol(nCol2) || !ValidRow(nRow2)) + PushIllegalArgument(); + else if (xExtRef) + { + // Convert SingleRef to DoubleRef. + xExtRef = new ScExternalDoubleRefToken( + *static_cast(xExtRef.get())); + ScComplexRefData& rData = static_cast(xExtRef.get())->GetDoubleRef(); + rData.Ref1.nCol = nCol1; + rData.Ref1.nRow = nRow1; + rData.Ref1.nTab = nTab1; + rData.Ref2.nCol = nCol2; + rData.Ref2.nRow = nRow2; + rData.Ref2.nTab = nTab1; + rData.CalcRelFromAbs( aPos); + // Push a subroutine that resolves the external + // reference as the next instruction. + PushTempToken( lcl_CreateExternalRefSubroutine( aPos, pDok, xExtRef)); + } + else + PushDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab1); + } + } + break; + case svExternalDoubleRef: + xExtRef = PopToken()->Clone(); + // fallthru + case svDoubleRef: + { + if (xExtRef) + { + ScComplexRefData& rData = static_cast(xExtRef.get())->GetDoubleRef(); + rData.CalcAbsIfRel( aPos); + nCol1 = rData.Ref1.nCol; + nRow1 = rData.Ref1.nRow; + nTab1 = rData.Ref1.nTab; + nCol2 = rData.Ref2.nCol; + nRow2 = rData.Ref2.nRow; + nTab2 = rData.Ref2.nTab; + } + else + PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2); + if (nColNew < 0) + nColNew = nCol2 - nCol1 + 1; + if (nRowNew < 0) + nRowNew = nRow2 - nRow1 + 1; + nCol1 = (SCCOL)((long)nCol1+nColPlus); + nRow1 = (SCROW)((long)nRow1+nRowPlus); + nCol2 = (SCCOL)((long)nCol1+nColNew-1); + nRow2 = (SCROW)((long)nRow1+nRowNew-1); + if (!ValidCol(nCol1) || !ValidRow(nRow1) || + !ValidCol(nCol2) || !ValidRow(nRow2) || nTab1 != nTab2) + PushIllegalArgument(); + else if (xExtRef) + { + ScComplexRefData& rData = static_cast(xExtRef.get())->GetDoubleRef(); + rData.Ref1.nCol = nCol1; + rData.Ref1.nRow = nRow1; + rData.Ref1.nTab = nTab1; + rData.Ref2.nCol = nCol2; + rData.Ref2.nRow = nRow2; + rData.Ref2.nTab = nTab1; + rData.CalcRelFromAbs( aPos); + // Push a subroutine that resolves the external + // reference as the next instruction. + PushTempToken( lcl_CreateExternalRefSubroutine( aPos, pDok, xExtRef)); + } + else + PushDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab1); + } + break; + default: + PushIllegalParameter(); } - else - PushIllegalParameter(); } } diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 7a4ac7ecdac8..a8fc219859ea 100755 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -3181,6 +3181,14 @@ void ScInterpreter::ScColRowNameAuto() void ScInterpreter::ScExternalRef() { + const FormulaToken* pNextOp = aCode.PeekNextOperator(); + if (pNextOp && pNextOp->GetOpCode() == ocOffset) + { + // Handled by OFFSET function. + PushTempToken( *pCur); + return; + } + ScExternalRefManager* pRefMgr = pDok->GetExternalRefManager(); const String* pFile = pRefMgr->getExternalFileName(pCur->GetIndex()); if (!pFile) @@ -3324,6 +3332,21 @@ void ScInterpreter::GlobalExit() // static } +// A ::std::vector is not possible, a push_back() attempts to +// use a FormulaToken(const FormulaTokenRef&) ctor. Reinvent wheel.. +struct FormulaTokenRefPtr +{ + FormulaToken* mp; + FormulaTokenRefPtr() : mp(0) {} + FormulaTokenRefPtr( FormulaToken* p ) : mp(p) { if (mp) mp->IncRef(); } + FormulaTokenRefPtr( const FormulaTokenRefPtr & r ) : mp(r.mp) { if (mp) mp->IncRef(); } + ~FormulaTokenRefPtr() { if (mp) mp->DecRef(); } + FormulaTokenRefPtr& operator=( const FormulaTokenRefPtr & r ) + { if (r.mp) r.mp->IncRef(); if (mp) mp->DecRef(); mp = r.mp; return *this; } +}; +typedef ::std::vector< FormulaTokenRefPtr > FormulaTokenDtor; + + StackVar ScInterpreter::Interpret() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::Interpret" ); @@ -3342,6 +3365,7 @@ StackVar ScInterpreter::Interpret() pJumpMatrix = NULL; glSubTotal = sal_False; ScTokenMatrixMap::const_iterator aTokenMatrixMapIter; + ::boost::scoped_ptr< FormulaTokenDtor > pTokenDtor; // Once upon a time we used to have FP exceptions on, and there was a // Windows printer driver that kept switching off exceptions, so we had to @@ -3720,13 +3744,27 @@ StackVar ScInterpreter::Interpret() default : PushError( errUnknownOpCode); break; } - // If the function signalled that it pushed a subroutine on the - // instruction code stack instead of a result, continue with + // If the function pushed a subroutine as result, continue with // execution of the subroutine. - if (sp > nStackBase && pStack[sp-1]->GetOpCode() == ocCall) + if (sp > nStackBase && pStack[sp-1]->GetOpCode() == ocCall && pStack[sp-1]->GetType() == svSubroutine) { - Pop(); - continue; // while( ( pCur = aCode.Next() ) != NULL ... + FormulaTokenRef xTok = PopToken(); + const FormulaSubroutineToken* pSub = dynamic_cast(xTok.get()); + if (pSub) + { + // Remember token for late destruction. + if (!pTokenDtor) + pTokenDtor.reset( new FormulaTokenDtor); + pTokenDtor->push_back( FormulaTokenDtor::value_type( xTok)); + // Continue with execution of subroutine. + aCode.Push( pSub->GetTokenArray()); + continue; // while( ( pCur = aCode.Next() ) != NULL ... + } + else + { + DBG_ERRORFILE( "ScInterpreter::Interpret: ocCall svSubroutine, but no FormulaSubroutineToken?!?"); + PushError( errNoCode); + } } // Remember result matrix in case it could be reused. diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 59f055296f75..c7126fb16aa8 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -926,6 +926,14 @@ ScExternalDoubleRefToken::ScExternalDoubleRefToken( const ScExternalDoubleRefTok { } +ScExternalDoubleRefToken::ScExternalDoubleRefToken( const ScExternalSingleRefToken& r ) : + ScToken( svExternalDoubleRef, ocExternalRef), + mnFileId( r.GetIndex()), + maTabName( r.GetString()) +{ + maDoubleRef.Ref1 = maDoubleRef.Ref2 = r.GetSingleRef(); +} + ScExternalDoubleRefToken::~ScExternalDoubleRefToken() { } -- cgit v1.2.3 From 4f24ef15969c9c062f6ed60d0f2848608cee079e Mon Sep 17 00:00:00 2001 From: "Eike Rathke [er]" Date: Fri, 4 Mar 2011 14:43:09 +0100 Subject: calc66: #i103331# make OFFSET with external references work again + Introduced FormulaSubroutineToken to hold a FormulaTokenArray. * INDIRECT in case of external reference returns FormulaSubroutineToken instead of directly pushing the token array to code and signalling its presence to ScInterpreter::Interpret(). * ScInterpreter::ScExternalRef() checks if an external reference is used with OFFSET and if so does not resolve it but pushes it so it can be handled within OFFSET. + OFFSET recognizes external reference and creates an external reference of the new area and returns that as subroutine to be resolved by ScExternalRef(). * Interpret() pushes the subroutine to code and rememberes the token and array for late destruction. --- formula/inc/formula/token.hxx | 19 +++++++++++ formula/inc/formula/tokenarray.hxx | 4 +++ formula/source/core/api/token.cxx | 67 +++++++++++++++++++++++++++++--------- 3 files changed, 75 insertions(+), 15 deletions(-) diff --git a/formula/inc/formula/token.hxx b/formula/inc/formula/token.hxx index 30618c67381a..8a94b1005bc8 100644 --- a/formula/inc/formula/token.hxx +++ b/formula/inc/formula/token.hxx @@ -70,6 +70,7 @@ enum StackVarEnum svExternalSingleRef, svExternalDoubleRef, svExternalName, + svSubroutine, // A token with a subroutine token array. svError, // error token svMissing = 0x70, // 0 or "" svSep, // separator, ocSep, ocOpen, ocClose @@ -89,6 +90,7 @@ class FormulaToken; typedef SimpleIntrusiveReference< class FormulaToken > FormulaTokenRef; typedef SimpleIntrusiveReference< const class FormulaToken > FormulaConstTokenRef; +class FormulaTokenArray; class FORMULA_DLLPUBLIC FormulaToken : public IFormulaToken { @@ -364,6 +366,23 @@ public: }; +class FORMULA_DLLPUBLIC FormulaSubroutineToken : public FormulaToken +{ +public: + /** Takes ownership of pArray and deletes it upon destruction! */ + FormulaSubroutineToken( const FormulaTokenArray* pArray ) : + FormulaToken( svSubroutine, ocCall ), mpArray( pArray) {} + FormulaSubroutineToken( const FormulaSubroutineToken& r ); + virtual ~FormulaSubroutineToken(); + virtual FormulaToken* Clone() const { return new FormulaSubroutineToken(*this); } + virtual sal_Bool operator==( const FormulaToken& rToken ) const; + const FormulaTokenArray* GetTokenArray() const; + +private: + const FormulaTokenArray* mpArray; +}; + + class FORMULA_DLLPUBLIC FormulaUnknownToken : public FormulaToken { public: diff --git a/formula/inc/formula/tokenarray.hxx b/formula/inc/formula/tokenarray.hxx index 31d780c81a79..bcd4061f5ac6 100644 --- a/formula/inc/formula/tokenarray.hxx +++ b/formula/inc/formula/tokenarray.hxx @@ -256,6 +256,7 @@ public: void Reset(); const FormulaToken* First(); const FormulaToken* Next(); + const FormulaToken* PeekNextOperator(); bool IsEndOfPath() const; /// if a jump or subroutine path is done bool HasStacked() const { return pCur->pNext != 0; } short GetPC() const { return pCur->nPC; } @@ -276,6 +277,9 @@ public: void Jump( short nStart, short nNext, short nStop = SHRT_MAX ); void Push( const FormulaTokenArray* ); void Pop(); + +private: + const FormulaToken* GetNonEndOfPathToken( short nIdx ) const; }; // ============================================================================= } // formula diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index 3942712da6a4..b644d1cd8fb3 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -1265,15 +1265,7 @@ const FormulaToken* FormulaTokenIterator::First() const FormulaToken* FormulaTokenIterator::Next() { - const FormulaToken* t = NULL; - ++pCur->nPC; - if( pCur->nPC < pCur->pArr->nRPN && pCur->nPC < pCur->nStop ) - { - t = pCur->pArr->pRPN[ pCur->nPC ]; - // such an OpCode ends an IF() or CHOOSE() path - if( t->GetOpCode() == ocSep || t->GetOpCode() == ocClose ) - t = NULL; - } + const FormulaToken* t = GetNonEndOfPathToken( ++pCur->nPC ); if( !t && pCur->pNext ) { Pop(); @@ -1282,6 +1274,25 @@ const FormulaToken* FormulaTokenIterator::Next() return t; } +const FormulaToken* FormulaTokenIterator::PeekNextOperator() +{ + const FormulaToken* t = NULL; + short nIdx = pCur->nPC; + while (!t && ((t = GetNonEndOfPathToken( ++nIdx)) != NULL)) + { + if (t->GetOpCode() == ocPush) + t = NULL; // ignore operands + } + if (!t && pCur->pNext) + { + ImpTokenIterator* pHere = pCur; + pCur = pCur->pNext; + t = PeekNextOperator(); + pCur = pHere; + } + return t; +} + //! The nPC counts after a Push() are -1 void FormulaTokenIterator::Jump( short nStart, short nNext, short nStop ) @@ -1295,17 +1306,22 @@ void FormulaTokenIterator::Jump( short nStart, short nNext, short nStop ) } } -bool FormulaTokenIterator::IsEndOfPath() const +const FormulaToken* FormulaTokenIterator::GetNonEndOfPathToken( short nIdx ) const { - sal_uInt16 nTest = pCur->nPC + 1; - if( nTest < pCur->pArr->nRPN && nTest < pCur->nStop ) + if (nIdx < pCur->pArr->nRPN && nIdx < pCur->nStop) { - const FormulaToken* t = pCur->pArr->pRPN[ nTest ]; + const FormulaToken* t = pCur->pArr->pRPN[ nIdx ]; // such an OpCode ends an IF() or CHOOSE() path - return t->GetOpCode() == ocSep || t->GetOpCode() == ocClose; + return (t->GetOpCode() == ocSep || t->GetOpCode() == ocClose) ? NULL : t; } - return true; + return NULL; } + +bool FormulaTokenIterator::IsEndOfPath() const +{ + return GetNonEndOfPathToken( pCur->nPC + 1) != NULL; +} + // ----------------------------------------------------------------------------- // ========================================================================== // real implementations of virtual functions @@ -1367,6 +1383,27 @@ sal_Bool FormulaMissingToken::operator==( const FormulaToken& r ) const } +FormulaSubroutineToken::FormulaSubroutineToken( const FormulaSubroutineToken& r ) : + FormulaToken( r ), + mpArray( r.mpArray->Clone()) +{ +} +FormulaSubroutineToken::~FormulaSubroutineToken() +{ + delete mpArray; +} +const FormulaTokenArray* FormulaSubroutineToken::GetTokenArray() const +{ + return mpArray; +} +sal_Bool FormulaSubroutineToken::operator==( const FormulaToken& r ) const +{ + // Arrays don't equal.. + return FormulaToken::operator==( r ) && + (mpArray == static_cast(r).mpArray); +} + + sal_Bool FormulaUnknownToken::operator==( const FormulaToken& r ) const { return FormulaToken::operator==( r ); -- cgit v1.2.3 From 2038d1496dc652b517c9b6b71cdae848bcec2ab8 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 4 Mar 2011 14:59:30 +0100 Subject: dba34d: #i116795# compile with system HSQL --- connectivity/qa/makefile.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/connectivity/qa/makefile.mk b/connectivity/qa/makefile.mk index ee41cab63554..c087ab98bd7d 100644 --- a/connectivity/qa/makefile.mk +++ b/connectivity/qa/makefile.mk @@ -35,9 +35,16 @@ PACKAGE = complex/connectivity #----- compile .java files ----------------------------------------- -JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar hsqldb.jar JAVAFILES := $(shell @$(FIND) complex -name "*.java") +JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar + +.IF "$(SYSTEM_HSQLDB)" == "YES" +EXTRAJARFILES = $(HSQLDB_JAR) +.ELSE +JARFILES += hsqldb.jar +.ENDIF + #----- make a jar from compiled files ------------------------------ JARCLASSDIRS = $(PACKAGE) -- cgit v1.2.3 From 1a333e4bcef74bd4d53e22e2b63c8acbff478b30 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Fri, 4 Mar 2011 17:24:28 +0100 Subject: calc66: #i116457# handle empty column titles in data pilot source range --- sc/source/core/data/dpshttab.cxx | 10 ++++------ sc/source/core/data/dptablecache.cxx | 27 ++++++++++++++++----------- sc/source/ui/dbgui/pvfundlg.cxx | 7 +++++-- sc/source/ui/view/gridwin2.cxx | 24 ++++++++++++++++++++---- 4 files changed, 45 insertions(+), 23 deletions(-) diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx index 33ce84cc94c2..9fa4e37fc879 100644 --- a/sc/source/core/data/dpshttab.cxx +++ b/sc/source/core/data/dpshttab.cxx @@ -291,12 +291,10 @@ sal_uLong ScSheetSourceDesc::CheckValidate( ScDocument* pDoc ) const ScRange aSrcRange( aSourceRange); if ( !pDoc ) return STR_ERR_DATAPILOTSOURCE; - for(sal_uInt16 i= aSrcRange.aStart.Col();i <= aSrcRange.aEnd.Col();i++) - { - if ( pDoc->IsBlockEmpty( aSrcRange.aStart.Tab(), - i, aSrcRange.aStart.Row(),i, aSrcRange.aStart.Row())) - return STR_PIVOT_FIRSTROWEMPTYERR; - } + + // #i116457# Empty column titles were allowed before 3.3, and might be useful for hidden columns with annotations. + // Be compatible with 3.2: Allow empty titles, create columns with empty names, hide them in the dialogs. + if( pDoc->IsBlockEmpty( aSrcRange.aStart.Tab(), aSrcRange.aStart.Col(), aSrcRange.aStart.Row()+1, aSrcRange.aEnd.Col(), aSrcRange.aEnd.Row() ) ) { return STR_PIVOT_ONLYONEROWERR; diff --git a/sc/source/core/data/dptablecache.cxx b/sc/source/core/data/dptablecache.cxx index 18c7af81e06c..37699dc5f1dc 100644 --- a/sc/source/core/data/dptablecache.cxx +++ b/sc/source/core/data/dptablecache.cxx @@ -937,23 +937,28 @@ void ScDPTableDataCache::AddLabel(ScDPItemData *pData) //reset name if needed String strNewName = pData->aString; - sal_Bool bFound = sal_False; - long nIndex = 1; - do + + // #i116457# don't modify empty column titles + if ( strNewName.Len() ) { - for ( long i= mrLabelNames.size()-1; i>=0; i-- ) + sal_Bool bFound = sal_False; + long nIndex = 1; + do { - if( mrLabelNames[i]->aString == strNewName ) + for ( long i= mrLabelNames.size()-1; i>=0; i-- ) { - strNewName = pData->aString; - strNewName += String::CreateFromInt32( nIndex ); - nIndex ++ ; - bFound = sal_True; + if( mrLabelNames[i]->aString == strNewName ) + { + strNewName = pData->aString; + strNewName += String::CreateFromInt32( nIndex ); + nIndex ++ ; + bFound = sal_True; + } } + bFound = !bFound; } - bFound = !bFound; + while ( !bFound ); } - while ( !bFound ); pData->aString = strNewName; mrLabelNames.push_back( pData ); diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx index 5ee9b320a04e..1bf258264dc9 100644 --- a/sc/source/ui/dbgui/pvfundlg.cxx +++ b/sc/source/ui/dbgui/pvfundlg.cxx @@ -748,8 +748,11 @@ ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, sal_u if (pLayoutName) aName = *pLayoutName; } - maLbDims.InsertEntry( aName ); - maNameIndexMap.insert(DimNameIndexMap::value_type(aName, nDim)); + if ( aName.Len() ) + { + maLbDims.InsertEntry( aName ); + maNameIndexMap.insert(DimNameIndexMap::value_type(aName, nDim)); + } } } } diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index 67cc1d318fdb..89fd1027877d 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -456,6 +456,18 @@ private: } +bool lcl_GetLabelIndex( size_t& rLabelIndex, long nDimension, const ScDPLabelDataVector& rLabelArray ) +{ + size_t n = rLabelArray.size(); + for (size_t i = 0; i < n; ++i) + if (static_cast(rLabelArray[i].mnCol) == nDimension) + { + rLabelIndex = i; + return true; + } + return false; +} + void ScGridWindow::DPLaunchFieldPopupMenu( const Point& rScrPos, const Size& rScrSize, const ScAddress& rPos, ScDPObject* pDPObj) { @@ -467,11 +479,12 @@ void ScGridWindow::DPLaunchFieldPopupMenu( sal_uInt16 nOrient; pDPData->mnDim = pDPObj->GetHeaderDim(rPos, nOrient); - if (pDPData->maDPParam.maLabelArray.size() <= static_cast(pDPData->mnDim)) - // out-of-bound dimension ID. This should never happen! + // #i116457# FillLabelData skips empty column names, so mnDim can't be used directly as index into maLabelArray. + size_t nLabelIndex = 0; + if (!lcl_GetLabelIndex( nLabelIndex, pDPData->mnDim, pDPData->maDPParam.maLabelArray )) return; - const ScDPLabelData& rLabelData = pDPData->maDPParam.maLabelArray[pDPData->mnDim]; + const ScDPLabelData& rLabelData = pDPData->maDPParam.maLabelArray[nLabelIndex]; mpDPFieldPopup.reset(new ScDPFieldPopupWindow(this, pViewData->GetDocument())); mpDPFieldPopup->setName(OUString::createFromAscii("Pivot table field member popup")); @@ -567,8 +580,11 @@ void ScGridWindow::UpdateDPFromFieldPopupMenu() if (!pDim) return; + size_t nLabelIndex = 0; + lcl_GetLabelIndex( nLabelIndex, pDPData->mnDim, pDPData->maDPParam.maLabelArray ); + // Build a map of layout names to original names. - const ScDPLabelData& rLabelData = pDPData->maDPParam.maLabelArray[pDPData->mnDim]; + const ScDPLabelData& rLabelData = pDPData->maDPParam.maLabelArray[nLabelIndex]; MemNameMapType aMemNameMap; for (vector::const_iterator itr = rLabelData.maMembers.begin(), itrEnd = rLabelData.maMembers.end(); itr != itrEnd; ++itr) -- cgit v1.2.3 From 9d0e7743fa8ec4efdfe47288c715732372cf84ce Mon Sep 17 00:00:00 2001 From: ka Date: Mon, 7 Mar 2011 03:30:31 +0100 Subject: rsvglibs: added external sources for jpeg8 library --- libjpeg/jpeg-8c.patch | 142 ++++++++++++++++++++++++++++++++++++++++++++++++++ libjpeg/makefile.mk | 66 +++++++++++++++++++++++ libjpeg/prj/build.lst | 3 ++ libjpeg/prj/d.lst | 11 ++++ 4 files changed, 222 insertions(+) create mode 100644 libjpeg/jpeg-8c.patch create mode 100644 libjpeg/makefile.mk create mode 100644 libjpeg/prj/build.lst create mode 100644 libjpeg/prj/d.lst diff --git a/libjpeg/jpeg-8c.patch b/libjpeg/jpeg-8c.patch new file mode 100644 index 000000000000..216608d6e50e --- /dev/null +++ b/libjpeg/jpeg-8c.patch @@ -0,0 +1,142 @@ +--- misc/jpeg-8c/makefile.mk 2011-03-06 23:04:22.985821034 +0100 ++++ misc/build/jpeg-8c/makefile.mk 2011-03-06 23:03:28.424821116 +0100 +@@ -1 +1,76 @@ +-dummy ++#************************************************************************* ++# ++# Copyright according the GNU Public License. ++# ++#************************************************************************* ++ ++PRJ=..$/..$/..$/.. ++ ++PRJNAME=jpeg8 ++TARGET=jpeg8 ++LIBTARGET=NO ++EXTERNAL_WARNINGS_NOT_ERRORS=TRUE ++VISIBILITY_HIDDEN=TRUE ++ ++# --- Settings ----------------------------------------------------------- ++ ++.INCLUDE : settings.mk ++ ++.IF "$(GUI)$(CPU)"=="WNTP" ++CFLAGS=$(CFLAGS) -Od ++.ENDIF ++ ++# --- Files -------------------------------------------------------- ++ ++SLOFILES= $(SLO)$/jaricom.obj \ ++ $(SLO)$/jcapimin.obj \ ++ $(SLO)$/jcapistd.obj \ ++ $(SLO)$/jcarith.obj \ ++ $(SLO)$/jccoefct.obj \ ++ $(SLO)$/jccolor.obj \ ++ $(SLO)$/jcdctmgr.obj \ ++ $(SLO)$/jchuff.obj \ ++ $(SLO)$/jcinit.obj \ ++ $(SLO)$/jcmainct.obj \ ++ $(SLO)$/jcmarker.obj \ ++ $(SLO)$/jcmaster.obj \ ++ $(SLO)$/jcomapi.obj \ ++ $(SLO)$/jcparam.obj \ ++ $(SLO)$/jcprepct.obj \ ++ $(SLO)$/jcsample.obj \ ++ $(SLO)$/jctrans.obj \ ++ $(SLO)$/jdapimin.obj \ ++ $(SLO)$/jdapistd.obj \ ++ $(SLO)$/jdarith.obj \ ++ $(SLO)$/jdatadst.obj \ ++ $(SLO)$/jdatasrc.obj \ ++ $(SLO)$/jdcoefct.obj \ ++ $(SLO)$/jdcolor.obj \ ++ $(SLO)$/jddctmgr.obj \ ++ $(SLO)$/jdhuff.obj \ ++ $(SLO)$/jdinput.obj \ ++ $(SLO)$/jdmainct.obj \ ++ $(SLO)$/jdmarker.obj \ ++ $(SLO)$/jdmaster.obj \ ++ $(SLO)$/jdmerge.obj \ ++ $(SLO)$/jdpostct.obj \ ++ $(SLO)$/jdsample.obj \ ++ $(SLO)$/jdtrans.obj \ ++ $(SLO)$/jerror.obj \ ++ $(SLO)$/jfdctflt.obj \ ++ $(SLO)$/jfdctfst.obj \ ++ $(SLO)$/jfdctint.obj \ ++ $(SLO)$/jidctflt.obj \ ++ $(SLO)$/jidctfst.obj \ ++ $(SLO)$/jidctint.obj \ ++ $(SLO)$/jquant1.obj \ ++ $(SLO)$/jquant2.obj \ ++ $(SLO)$/jutils.obj \ ++ $(SLO)$/jmemnobs.obj \ ++ $(SLO)$/jutils.obj ++ ++LIB1TARGET=$(SLB)$/$(TARGET).lib ++LIB1ARCHIV=$(LB)$/$(TARGET).a ++LIB1OBJFILES=$(SLOFILES) ++ ++.INCLUDE : target.mk +--- misc/jpeg-8c/jconfig.h 2011-03-06 23:19:25.611821058 +0100 ++++ misc/build/jpeg-8c/jconfig.h 2011-03-06 23:10:22.070821059 +0100 +@@ -1 +1,58 @@ +-dummy ++/* jconfig.h. Generated from jconfig.cfg by configure. */ ++/* jconfig.cfg --- source file edited by configure script */ ++/* see jconfig.txt for explanations */ ++ ++#define HAVE_PROTOTYPES 1 ++#define HAVE_UNSIGNED_CHAR 1 ++#define HAVE_UNSIGNED_SHORT 1 ++/* #undef void */ ++/* #undef const */ ++/* #undef CHAR_IS_UNSIGNED */ ++#define HAVE_STDDEF_H 1 ++#define HAVE_STDLIB_H 1 ++#define HAVE_LOCALE_H 1 ++/* #undef NEED_BSD_STRINGS */ ++/* #undef NEED_SYS_TYPES_H */ ++/* #undef NEED_FAR_POINTERS */ ++/* #undef NEED_SHORT_EXTERNAL_NAMES */ ++/* Define this if you get warnings about undefined structures. */ ++/* #undef INCOMPLETE_TYPES_BROKEN */ ++ ++/* Define "boolean" as unsigned char, not int, on Windows systems. */ ++#ifdef WNT ++#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ ++typedef unsigned char boolean; ++#endif ++#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ ++#endif ++ ++#ifdef JPEG_INTERNALS ++ ++/* #undef RIGHT_SHIFT_IS_UNSIGNED */ ++#ifdef WNT ++#define INLINE __inline ++#else ++#define INLINE inline ++#endif ++/* These are for configuring the JPEG memory manager. */ ++/* #undef DEFAULT_MAX_MEM */ ++/* #undef NO_MKTEMP */ ++ ++#endif /* JPEG_INTERNALS */ ++ ++#ifdef JPEG_CJPEG_DJPEG ++ ++#define BMP_SUPPORTED /* BMP image file format */ ++#define GIF_SUPPORTED /* GIF image file format */ ++#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ ++/* #undef RLE_SUPPORTED */ ++#define TARGA_SUPPORTED /* Targa image file format */ ++ ++/* #undef TWO_FILE_COMMANDLINE */ ++/* #undef NEED_SIGNAL_CATCHER */ ++/* #undef DONT_USE_B_MODE */ ++ ++/* Define this if you want percent-done progress reports from cjpeg/djpeg. */ ++/* #undef PROGRESS_REPORT */ ++ ++#endif /* JPEG_CJPEG_DJPEG */ diff --git a/libjpeg/makefile.mk b/libjpeg/makefile.mk new file mode 100644 index 000000000000..779f0bce7c64 --- /dev/null +++ b/libjpeg/makefile.mk @@ -0,0 +1,66 @@ +#************************************************************************* +# +# 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=libjpeg +TARGET=jpeg8 + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +.IF "$(SYSTEM_LIBJPEG)" == "YES" +all: + @echo "An already available installation of libjpeg should exist on your system." + @echo "Therefore the version provided here does not need to be built in addition." +.ENDIF + +# --- Files -------------------------------------------------------- + +TARFILE_NAME=jpeg-8c +TARFILE_MD5=a2c10c04f396a9ce72894beb18b4e1f9 + +PATCH_FILES=jpeg-8c.patch +ADDITIONAL_FILES=makefile.mk jconfig.h + +#relative to CONFIGURE_DIR + +BUILD_DIR=$(CONFIGURE_DIR) +BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS) + +OUT2INC= jconfig.h \ + jerror.h \ + jmorecfg.h \ + jpegint.h \ + jpeglib.h + +# --- Targets ------------------------------------------------------ + +.INCLUDE : set_ext.mk +.INCLUDE : target.mk +.INCLUDE : tg_ext.mk diff --git a/libjpeg/prj/build.lst b/libjpeg/prj/build.lst new file mode 100644 index 000000000000..fbb2f6f45704 --- /dev/null +++ b/libjpeg/prj/build.lst @@ -0,0 +1,3 @@ +ljpeg libjpeg : soltools NULL +ljpeg libjpeg usr1 - all ljpeg_mkout NULL +ljpeg libjpeg nmake - all ljpeg_libjpeg NULL diff --git a/libjpeg/prj/d.lst b/libjpeg/prj/d.lst new file mode 100644 index 000000000000..7306d54a5fd9 --- /dev/null +++ b/libjpeg/prj/d.lst @@ -0,0 +1,11 @@ +mkdir: %_DEST%\inc%_EXT%\external +mkdir: %_DEST%\inc%_EXT%\external\libjpeg + +..\%__SRC%\slb\jpeg8.lib %_DEST%\lib%_EXT%\jpeg8.lib +..\%__SRC%\lib\jpeg8.a %_DEST%\lib%_EXT%\jpeg8.a + +..\%__SRC%\inc\jpeglib.h %_DEST%\inc%_EXT%\external\libjpeg\jpeglib.h +..\%__SRC%\inc\jconfig.h %_DEST%\inc%_EXT%\external\libjpeg\jconfig.h +..\%__SRC%\inc\jmorecfg.h %_DEST%\inc%_EXT%\external\libjpeg\jmorecfg.h +..\%__SRC%\inc\jerror.h %_DEST%\inc%_EXT%\external\libjpeg\jerror.h +..\%__SRC%\inc\jpegint.h %_DEST%\inc%_EXT%\external\libjpeg\jpegint.h -- cgit v1.2.3 From 9cadc9c7432a4aaa48f87005ea2dc68dc2c6bf59 Mon Sep 17 00:00:00 2001 From: ka Date: Mon, 7 Mar 2011 03:30:31 +0100 Subject: rsvglibs: added external sources for jpeg8 library --- ooo.lst | 1 + 1 file changed, 1 insertion(+) diff --git a/ooo.lst b/ooo.lst index 1de8da966035..aa3bfd60ebb3 100755 --- a/ooo.lst +++ b/ooo.lst @@ -76,3 +76,4 @@ f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip ff369e69ef0f0143beb5626164e87ae2-neon-0.29.5.tar.gz 220035f111ea045a51e290906025e8b5-libpng-1.5.1.tar.gz +a2c10c04f396a9ce72894beb18b4e1f9-jpeg-8c.tar.gz -- cgit v1.2.3 From d529258afae41451b8fa79056d4571894bd7562b Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Mon, 7 Mar 2011 09:46:28 +0100 Subject: rsvglibs: add patch for win32 --- glib/glib-2.28.1-win32.patch | 4010 ++++++++++++++++++++++++++++++++++++++++++ glib/makefile.mk | 13 +- 2 files changed, 4021 insertions(+), 2 deletions(-) create mode 100644 glib/glib-2.28.1-win32.patch diff --git a/glib/glib-2.28.1-win32.patch b/glib/glib-2.28.1-win32.patch new file mode 100644 index 000000000000..6476e983d2a4 --- /dev/null +++ b/glib/glib-2.28.1-win32.patch @@ -0,0 +1,4010 @@ +--- misc/glib-2.28.1/build/win32/dirent/makefile.msc 2009-04-01 01:04:20.000000000 +0200 ++++ misc/build/glib-2.28.1/build/win32/dirent/makefile.msc 2011-03-04 09:06:56.391118000 +0100 +@@ -1,10 +1,10 @@ + TOP = ..\..\..\.. + +-!INCLUDE $(TOP)\glib\build\win32\make.msc ++!INCLUDE ..\make.msc + + dirent_OBJECTS = dirent.obj wdirent.obj + +-INCLUDES = -I. ++INCLUDES = -I. $(SOLARINC) + + all : dirent.lib + +--- misc/glib-2.28.1/build/win32/make.msc 2009-08-29 04:52:21.000000000 +0200 ++++ misc/build/glib-2.28.1/build/win32/make.msc 2011-03-04 12:36:27.513145100 +0100 +@@ -35,7 +35,7 @@ + XSLTPROC = d:\gnome-0\xsltproc + + # paths and version numbers +-!INCLUDE $(TOP)\glib\build\win32\module.defs ++!INCLUDE module.defs + + ################ + # CFLAGS and LIBS for the packages in module.defs. +@@ -58,8 +58,8 @@ + CAIRO_CFLAGS = -FI $(CAIRO)\cairo-version.h -I $(CAIRO)\src -I $(CAIRO) + CAIRO_LIBS = $(CAIRO)\src\libcairo.lib + +-DIRENT_CFLAGS = -I $(GLIB)\build\win32\dirent +-DIRENT_LIBS = $(GLIB)\build\win32\dirent\dirent.lib ++DIRENT_CFLAGS = -I ..\build\win32\dirent ++DIRENT_LIBS = ..\build\win32\dirent\dirent.lib + + !IFNDEF EXIF + EXIF_CFLAGS = -I $(DEVTOP)\include +@@ -92,7 +92,7 @@ + # overide definition to use it as callable path + GLIB = $(TOP)\glib + +-GLIB_CFLAGS = -I $(GLIB) -I $(GLIB)\glib -I $(GLIB)\gmodule $(INTL_CFLAGS) ++GLIB_CFLAGS = -I $(GLIB) -I $(GLIB)\glib -I $(GLIB)\gmodule $(INTL_CFLAGS) $(SOLARINC) + GLIB_LIBS = $(GLIB)\glib\glib-$(GLIB_VER).lib $(GLIB)\gmodule\gmodule-$(GLIB_VER).lib $(GLIB)\gobject\gobject-$(GLIB_VER).lib $(GLIB)\gio\gio-$(GLIB_VER).lib + GTHREAD_LIBS = $(GLIB)\gthread\gthread-$(GLIB_VER).lib + +@@ -126,11 +126,11 @@ + LIBART_LIBS = $(LIBART)\art_lgpl_2.lib + + !IFNDEF INTL +-INTL_CFLAGS = -I $(DEVTOP)\include +-INTL_LIBS = $(DEVTOP)\lib\intl.lib ++INTL_CFLAGS = -I $(OUTDIR)\inc\external ++INTL_LIBS = $(OUTDIR)\lib\intl.lib + !ELSE +-INTL_CFLAGS = -I $(INTL) +-INTL_LIBS = $(INTL)\intl.lib ++INTL_CFLAGS = -I $(OUTDIR)\inc\external ++INTL_LIBS = $(OUTDIR)\lib\intl.lib + !ENDIF + + !IFDEF LCMS +@@ -199,10 +199,10 @@ + + !IFDEF ZLIB + ZLIB_CFLAGS = -I $(ZLIB) +-ZLIB_LIBS = $(ZLIB)\projects\visualc6\Win32_LIB_Release\zlib.lib ++ZLIB_LIBS = $(OUTDIR)\lib\zlib.lib + !ELSE +-ZLIB_CFLAGS = -I $(DEVTOP)\include +-ZLIB_LIBS = $(DEVTOP)\lib\zdll.lib ++ZLIB_CFLAGS = -I $(ZLIB) ++ZLIB_LIBS = $(OUTDIR)\lib\zlib.lib + !ENDIF + + ################ +--- misc/glib-2.28.1/gio/gzlibcompressor.c 2011-03-07 09:13:41.313889800 +0100 ++++ misc/build/glib-2.28.1/gio/gzlibcompressor.c 2011-03-04 12:02:41.465261800 +0100 +@@ -25,7 +25,7 @@ + #include "gzlibcompressor.h" + + #include +-#include ++#include + #include + + #include "gfileinfo.h" +@@ -64,8 +64,10 @@ + + GZlibCompressorFormat format; + int level; ++#if !defined (G_OS_WIN32) || ZLIB_VERNUM >= 0x1240 + z_stream zstream; + gz_header gzheader; ++#endif + GFileInfo *file_info; + }; + +@@ -73,7 +73,7 @@ + g_zlib_compressor_set_gzheader (GZlibCompressor *compressor) + { + /* On win32, these functions were not exported before 1.2.4 */ +-#if !defined (G_OS_WIN32) || ZLIB_VERNUM >= 0x1240 ++#if (!defined (G_OS_WIN32) && ! defined(BUILD_OS_APPLEOSX)) || ZLIB_VERNUM >= 0x1240 + const gchar *filename; + + if (compressor->format != G_ZLIB_COMPRESSOR_FORMAT_GZIP || +--- misc/glib-2.28.1/gio/gzlibdecompressor.c 2011-03-07 09:13:41.324890400 +0100 ++++ misc/build/glib-2.28.1/gio/gzlibdecompressor.c 2011-03-04 11:28:39.712480200 +0100 +@@ -25,7 +25,7 @@ + #include "gzlibdecompressor.h" + + #include +-#include ++#include + #include + + #include "gfileinfo.h" +@@ -76,7 +76,7 @@ + g_zlib_decompressor_set_gzheader (GZlibDecompressor *decompressor) + { + /* On win32, these functions were not exported before 1.2.4 */ +-#if !defined (G_OS_WIN32) || ZLIB_VERNUM >= 0x1240 ++#if (!defined (G_OS_WIN32) && !defined(BUILD_OS_APPLEOSX)) || ZLIB_VERNUM >= 0x1240 + if (decompressor->format != G_ZLIB_COMPRESSOR_FORMAT_GZIP) + return; + +@@ -376,7 +376,7 @@ + *bytes_read = inbuf_size - decompressor->zstream.avail_in; + *bytes_written = outbuf_size - decompressor->zstream.avail_out; + +-#if !defined (G_OS_WIN32) || ZLIB_VERNUM >= 0x1240 ++#if (!defined (G_OS_WIN32) && !defined(BUILD_OS_APPLEOSX)) || ZLIB_VERNUM >= 0x1240 + if (decompressor->header_data != NULL && + decompressor->header_data->gzheader.done == 1) + { +--- misc/glib-2.28.1/gio/makefile.msc 2011-02-11 16:23:12.000000000 +0100 ++++ misc/build/glib-2.28.1/gio/makefile.msc 2011-03-04 12:43:54.423706900 +0100 +@@ -3,9 +3,9 @@ + PRJ_TOP = .. + PACKAGE = gio + PKG_VER = 2.0 +-!INCLUDE $(TOP)\glib\build\win32\make.msc ++!INCLUDE ..\build\win32\make.msc + +-SUBDIRS = win32 ++SUBDIRS = win32 gvdb + + sub-all: + for %d in ($(SUBDIRS)) do nmake -nologo -f makefile.msc sub-one THIS=%d +@@ -18,13 +18,15 @@ + INCLUDES = \ + -FImsvc_recommended_pragmas.h \ + -I .. -I ..\glib -I ..\gmodule -I . \ +- $(INTL_CFLAGS) ++ $(INTL_CFLAGS) \ ++ $(SOLARINC) \ + + DEFINES = \ + -DG_LOG_DOMAIN=\"GLib-GIO\" \ + -DGIO_MODULE_DIR=\"$(libdir)/gio/modules\" \ + -DGIO_COMPILATION + ++ + appinfo_sources = \ + gwin32appinfo.c gwin32appinfo.h + +@@ -75,6 +77,12 @@ + $(NULL) + + OBJECTS = \ ++ gaction.obj \ ++ gactiongroup.obj \ ++ gappinfo.obj \ ++ gapplication.obj \ ++ gapplicationcommandline.obj \ ++ gapplicationimpl-dbus.obj \ + gappinfo.obj \ + gasynchelper.obj \ + gasyncinitable.obj \ +@@ -82,12 +90,38 @@ + gbufferedinputstream.obj \ + gbufferedoutputstream.obj \ + gcancellable.obj \ ++ gcharsetconverter.obj \ + gcontenttype.obj \ ++ gconverter.obj \ ++ gconverterinputstream.obj \ ++ gconverteroutputstream.obj \ ++ gcredentials.obj \ + gdatainputstream.obj \ + gdataoutputstream.obj \ ++ gdbusaddress.obj \ ++ gdbusauth.obj \ ++ gdbusauthmechanism.obj \ ++ gdbusauthmechanismanon.obj \ ++ gdbusauthmechanismexternal.obj \ ++ gdbusauthmechanismsha1.obj \ ++ gdbusauthobserver.obj \ ++ gdbusconnection.obj \ ++ gdbuserror.obj \ ++ gdbusintrospection.obj \ ++ gdbusmessage.obj \ ++ gdbusmethodinvocation.obj \ ++ gdbusnameowning.obj \ ++ gdbusnamewatching.obj \ ++ gdbusprivate.obj \ ++ gdbusproxy.obj \ ++ gdbusserver.obj \ ++ gdbusutils.obj \ ++ gdelayedsettingsbackend.obj \ + # gdesktopappinfo.obj \ + gdrive.obj \ + gdummyfile.obj \ ++ gdummyproxyresolver.obj \ ++ gdummytlsbackend.obj \ + gemblem.obj \ + gemblemedicon.obj \ + gfile.obj \ +@@ -112,20 +146,39 @@ + giomodule.obj \ + gioscheduler.obj \ + giostream.obj \ ++ gkeyfilesettingsbackend.obj \ + gloadableicon.obj \ + glocalfileiostream.obj \ + gmemoryinputstream.obj \ + gmemoryoutputstream.obj \ ++ gmemorysettingsbackend.obj \ + gmount.obj \ + gmountoperation.obj \ + gnativevolumemonitor.obj \ + gnetworkaddress.obj \ + gnetworkservice.obj \ ++ gnullsettingsbackend.obj \ + goutputstream.obj \ ++ gpermission.obj \ ++ gpollableinputstream.obj \ ++ gpollableoutputstream.obj \ + gpollfilemonitor.obj \ ++ gproxy.obj\ ++ gproxyaddress.obj \ ++ gproxyaddressenumerator.obj \ ++ gproxyresolver.obj \ ++ gregistrysettingsbackend.obj \ + gresolver.obj \ ++ gsettings-mapping.obj \ ++ gsettings-tool.obj \ ++ gsettings.obj \ ++ gsettingsbackend.obj \ ++ gsettingsschema.obj \ + gseekable.obj \ ++ gsimpleaction.obj \ ++ gsimpleactiongroup.obj \ + gsimpleasyncresult.obj \ ++ gsimplepermission.obj \ + gsocket.obj \ + gsocketaddress.obj \ + gsocketaddressenumerator.obj \ +@@ -135,13 +188,23 @@ + gsocketcontrolmessage.obj \ + gsocketlistener.obj \ + gsocketservice.obj \ ++ gsocks4aproxy.obj \ ++ gsocks4proxy.obj \ ++ gsocks5proxy.obj \ ++ gsrvtarget.obj \ + gsocketinputstream.obj \ + gsocketoutputstream.obj \ + gsrvtarget.obj \ + gtcpconnection.obj \ ++ gtcpwrapperconnection.obj \ + gthreadedresolver.obj \ + gthreadedsocketservice.obj \ + gthemedicon.obj \ ++ gtlsbackend.obj \ ++ gtlscertificate.obj \ ++ gtlsclientconnection.obj \ ++ gtlsconnection.obj \ ++ gtlsserverconnection.obj \ + gunionvolumemonitor.obj \ + gvfs.obj \ + gvolume.obj \ +@@ -156,11 +219,15 @@ + glocalfilemonitor.obj \ + glocaldirectorymonitor.obj \ + gwin32appinfo.obj \ ++ gwin32outputstream.obj \ + \ + gio-marshal.obj \ ++ gwin32inputstream.obj \ + gwin32mount.obj \ + gwin32volumemonitor.obj \ +- gwin32resolver.obj ++ gwin32resolver.obj \ ++ gzlibdecompressor.obj \ ++ gzlibcompressor.obj + + libgio_2_0_la_LIBADD = \ + $(top_builddir)/glib/libglib-2.0.la \ +@@ -190,13 +257,13 @@ + + gio-marshal.h: gio-marshal.list + $(GLIB_GEN_MARSHAL) --prefix=_gio_marshal gio-marshal.list --header >> xgen-gwmh \ +- && copy /y xgen-gwmh gio-marshal.h \ ++ && $(GNUCOPY) /y xgen-gwmh gio-marshal.h \ + && del xgen-gwmh xgen-gwmh~ + + gio-marshal.c: gio-marshal.h + echo #include "gio-marshal.h" >> xgen-gwmc \ + && $(GLIB_GEN_MARSHAL) --prefix=_gio_marshal gio-marshal.list --body >> xgen-gwmc \ +- && copy xgen-gwmc gio-marshal.c \ ++ && $(GNUCOPY) xgen-gwmc gio-marshal.c \ + && del xgen-gwmc xgen-gwmc~ + + local_sources = \ +@@ -228,7 +295,7 @@ + + + $(PRJ_TOP)\config.h: $(PRJ_TOP)\config.h.win32 +- copy $(PRJ_TOP)\config.h.win32 $(PRJ_TOP)\config.h ++ $(GNUCOPY) $(PRJ_TOP)\config.h.win32 $(PRJ_TOP)\config.h + + gioenumtypes.h: $(gio_headers) gioenumtypes.h.template + $(PERL) ..\gobject\glib-mkenums --template gioenumtypes.h.template $(gio_headers) > gioenumtypes.h +@@ -245,14 +312,14 @@ + RESOURCE = $(PACKAGE).res + + $(PACKAGE).res : $(PACKAGE).rc +- rc -DBUILDNUMBER=0 -r -fo $(PACKAGE).res $(PACKAGE).rc ++ rc -DBUILDNUMBER=0 -r -i $(SOLARINC) -fo $(PACKAGE).res $(PACKAGE).rc + +-libgio-$(PKG_VER)-0.dll : $(OBJECTS) win32\giowin32.lib $(PACKAGE).def $(RESOURCE) ++libgio-$(PKG_VER)-0.dll : $(OBJECTS) win32\giowin32.lib gvdb\giogvdb.lib $(PACKAGE).def $(RESOURCE) + $(CC) $(CFLAGS) -LD -Felibgio-$(PKG_VER)-0.dll $(OBJECTS) $(RESOURCE) \ + ..\glib\glib-2.0.lib ..\gobject\gobject-2.0.lib ..\gmodule\gmodule-2.0.lib \ +- win32\giowin32.lib \ +- $(INTL_LIBS) \ +- kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib ws2_32.lib dnsapi.lib mpr.lib $(LDFLAGS) \ ++ win32\giowin32.lib gvdb\giogvdb.lib \ ++ $(INTL_LIBS) $(ZLIB_LIBS) \ ++ kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib Shlwapi.lib ws2_32.lib dnsapi.lib mpr.lib $(LDFLAGS) \ + /implib:gio-2.0.lib /def:$(PACKAGE).def + + .c.obj : +--- misc/glib-2.28.1/glib/gatomic.c 2011-02-11 16:23:12.000000000 +0100 ++++ misc/build/glib-2.28.1/glib/gatomic.c 2011-02-25 15:51:45.000000000 +0100 +@@ -28,6 +28,7 @@ + #endif + + #include "gatomic.h" ++#include "gthread.h" + #include "gthreadprivate.h" + + /** +--- misc/glib-2.28.1/glib/gnulib/makefile.msc 2009-04-01 01:04:20.000000000 +0200 ++++ misc/build/glib-2.28.1/glib/gnulib/makefile.msc 2011-03-04 08:37:50.624265900 +0100 +@@ -1,7 +1,7 @@ + TOP = ..\..\.. + !INCLUDE ..\..\build\win32\make.msc + +-INCLUDES = -I ..\.. -I .. ++INCLUDES = -I ..\.. -I .. $(SOLARINC) + DEFINES = -DHAVE_CONFIG_H -DHAVE_LONG_LONG_FORMAT + + OBJECTS = \ +--- misc/glib-2.28.1/glib/makefile.msc 2011-02-18 16:34:53.000000000 +0100 ++++ misc/build/glib-2.28.1/glib/makefile.msc 2011-03-07 09:04:26.301144900 +0100 +@@ -7,23 +7,21 @@ + + ################################################################ + +-INCLUDES = -FImsvc_recommended_pragmas.h -I . -I .. ++INCLUDES = -FImsvc_recommended_pragmas.h -I . -I .. $(SOLARINC) + DEFINES = \ + -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=\"GLib\" \ + -DG_ENABLE_DEBUG -DPCRE_STATIC -DG_DISABLE_DEPRECATED \ +- -DDLL_EXPORT=1 ++ -DDLL_EXPORT=1 -DG_DISABLE_ASSERT + + DEPCFLAGS = -Zm400 $(INTL_CFLAGS) $(DIRENT_CFLAGS) + + all : \ + ..\config.h \ +- ..\glibconfig.h \ ++ glibconfig.h \ + gnulib\gnulib.lib \ + pcre\pcre.lib \ + libglib-2.0-0.dll \ +- glib-2.28s.lib \ +- gspawn-win32-helper.exe \ +- gspawn-win32-helper-console.exe \ ++ glib-2.28s.lib + + + gnulib\gnulib.lib : +@@ -37,73 +35,83 @@ + cd .. + + glib_OBJECTS = \ +- garray.obj \ +- gasyncqueue.obj \ +- gatomic.obj \ +- gbacktrace.obj \ +- gbase64.obj \ +- gbookmarkfile.obj \ +- gcache.obj \ +- gchecksum.obj \ +- gcompletion.obj \ +- gconvert.obj \ +- gdataset.obj \ +- gdate.obj \ +- gdir.obj \ +- gerror.obj \ +- gfileutils.obj \ +- ghash.obj \ +- ghostutils.obj \ +- ghook.obj \ +- giochannel.obj \ +- giowin32.obj \ +- gpoll.obj \ +- gkeyfile.obj \ +- glist.obj \ +- gmain.obj \ +- gmappedfile.obj \ +- gmarkup.obj \ +- gmem.obj \ +- gmessages.obj \ +- gnode.obj \ +- goption.obj \ +- gpattern.obj \ +- gprimes.obj \ +- gprintf.obj \ +- gqsort.obj \ +- gqueue.obj \ +- grand.obj \ +- gregex.obj \ +- grel.obj \ +- gscanner.obj \ +- gsequence.obj \ +- gshell.obj \ +- gslice.obj \ +- gslist.obj \ +- gspawn-win32.obj \ +- gstdio.obj \ +- gstrfuncs.obj \ +- gstring.obj \ +- gtestutils.obj \ +- gthread.obj \ +- gthreadpool.obj \ +- gtimer.obj \ +- gtree.obj \ +- gunibreak.obj \ +- gunicollate.obj \ +- gunidecomp.obj \ +- guniprop.obj \ +- gurifuncs.obj \ +- gutf8.obj \ +- gutils.obj \ +- gwin32.obj \ ++ garray.obj \ ++ gasyncqueue.obj \ ++ gatomic.obj \ ++ gbacktrace.obj \ ++ gbase64.obj \ ++ gbitlock.obj \ ++ gbookmarkfile.obj \ ++ gbuffer.obj \ ++ gcache.obj \ ++ gchecksum.obj \ ++ gconvert.obj \ ++ gcompletion.obj \ ++ gdataset.obj \ ++ gdate.obj \ ++ gdatetime.obj \ ++ gdir.obj \ ++ gerror.obj \ ++ gfileutils.obj \ ++ ghash.obj \ ++ ghook.obj \ ++ ghostutils.obj \ ++ giochannel.obj \ ++ giowin32.obj \ ++ gkeyfile.obj \ ++ glist.obj \ ++ gmain.obj \ ++ gmappedfile.obj \ ++ gmarkup.obj \ ++ gmem.obj \ ++ gmessages.obj \ ++ gnode.obj \ ++ goption.obj \ ++ gpattern.obj \ ++ gpoll.obj \ ++ gprimes.obj \ ++ gprintf.obj \ ++ gqsort.obj \ ++ gqueue.obj \ ++ grand.obj \ ++ gregex.obj \ ++ grel.obj \ ++ gscanner.obj \ ++ gsequence.obj \ ++ gshell.obj \ ++ gslice.obj \ ++ gslist.obj \ ++ gspawn-win32.obj \ ++ gstdio.obj \ ++ gstrfuncs.obj \ ++ gstring.obj \ ++ gtestutils.obj \ ++ gthread.obj \ ++ gthreadpool.obj \ ++ gtimer.obj \ ++ gtimezone.obj \ ++ gtree.obj \ ++ gunibreak.obj \ ++ gunicollate.obj \ ++ gunidecomp.obj \ ++ guniprop.obj \ ++ gurifuncs.obj \ ++ gutf8.obj \ ++ gutils.obj \ ++ gvariant-core.obj \ ++ gvariant-parser.obj \ ++ gvariant-serialiser.obj \ ++ gvariant.obj \ ++ gvarianttype.obj \ ++ gvarianttypeinfo.obj \ ++ gwin32.obj \ + localcharset.obj + +-..\glibconfig.h: ..\glibconfig.h.win32 +- copy ..\glibconfig.h.win32 ..\glibconfig.h ++glibconfig.h: glibconfig.h.win32 ++ $(GNUCOPY) glibconfig.h.win32 glibconfig.h + + ..\config.h: ..\config.h.win32 +- copy ..\config.h.win32 ..\config.h ++ $(GNUCOPY) ..\config.h.win32 ..\config.h + + localcharset.obj : libcharset\localcharset.c + $(CC) $(CFLAGS) -DLIBDIR=\".\" -c libcharset\localcharset.c +@@ -115,7 +123,7 @@ + -DG_GNUC_PRINTF=;G_GNUC_PRINTF -DG_GNUC_FORMAT=;G_GNUC_FORMAT glib.symbols >> glib.def + + glib.res : glib.rc +- rc -DBUILDNUMBER=0 -r -fo glib.res glib.rc ++ rc -DBUILDNUMBER=0 -r -i $(SOLARINC) -fo glib.res glib.rc + + ################ glib + +@@ -124,20 +132,14 @@ + glib-2.28s.lib : $(glib_OBJECTS) gnulib\gnulib.lib pcre\pcre.lib + lib /out:glib-2.28s.lib $(glib_OBJECTS) gnulib\gnulib.lib pcre\pcre.lib + +-libglib-2.0-0.dll : $(glib_OBJECTS) gnulib\gnulib.lib pcre\pcre.lib glib.def glib.res ++libglib-2.0-0.dll : $(glib_OBJECTS) gnulib\gnulib.lib pcre\pcre.lib glib.def glib.res + $(CC) $(CFLAGS) -LD -Fe$@ $(glib_OBJECTS) glib.res $(INTL_LIBS) \ + gnulib\gnulib.lib pcre\pcre.lib $(DIRENT_LIBS) user32.lib advapi32.lib shell32.lib wsock32.lib ole32.lib ws2_32.lib \ + $(LDFLAGS) /implib:glib-2.0.lib /def:glib.def + +-gspawn-win32-helper.exe : gspawn-win32-helper.c libglib-2.0-0.dll +- $(CC) $(CFLAGS) -Fe$@ -DG_LOG_DOMAIN=\"gspawn-win32-helper\" gspawn-win32-helper.c glib-2.0.lib $(LDFLAGS) /subsystem:windows user32.lib +- +-gspawn-win32-helper-console.exe : gspawn-win32-helper.c libglib-2.0-0.dll +- $(CC) $(CFLAGS) -Fe$@ -DG_LOG_DOMAIN=\"gspawn-win32-helper\" gspawn-win32-helper.c glib-2.0.lib $(LDFLAGS) /subsystem:console user32.lib +- + ################ other stuff + + clean:: + del ..\config.h +- del ..\glibconfig.h ++ del glibconfig.h + +--- misc/glib-2.28.1/glib/pcre/makefile.msc 2010-06-20 06:35:47.000000000 +0200 ++++ misc/build/glib-2.28.1/glib/pcre/makefile.msc 2011-03-04 09:06:02.748049800 +0100 +@@ -3,7 +3,8 @@ + + INCLUDES = \ + -I ..\.. \ +- -I .. ++ -I .. \ ++ $(SOLARINC) + + DEFINES = \ + -DPCRE_STATIC \ +@@ -18,10 +19,24 @@ + -DMAX_NAME_COUNT=10000 \ + -DMAX_DUPLENGTH=30000 \ + -DLINK_SIZE=2 \ +- -DEBCDIC=0 \ + -DPOSIX_MALLOC_THRESHOLD=10 + + OBJECTS = \ ++ pcre_chartables.obj \ ++ pcre_compile.obj \ ++ pcre_config.obj \ ++ pcre_dfa_exec.obj \ ++ pcre_exec.obj \ ++ pcre_fullinfo.obj \ ++ pcre_get.obj \ ++ pcre_globals.obj \ ++ pcre_newline.obj \ ++ pcre_ord2utf8.obj \ ++ pcre_study.obj \ ++ pcre_tables.obj \ ++ pcre_try_flipped.obj \ ++ pcre_ucp_searchfuncs.obj \ ++ pcre_xclass.obj \ + + + all : pcre.lib +--- misc/glib-2.28.1/gmodule/makefile.msc 2011-02-18 16:34:58.000000000 +0100 ++++ misc/build/glib-2.28.1/gmodule/makefile.msc 2011-03-04 08:43:06.896355600 +0100 +@@ -7,7 +7,7 @@ + + ################################################################ + +-INCLUDES = -FImsvc_recommended_pragmas.h -I .. -I . -I ..\glib ++INCLUDES = -FImsvc_recommended_pragmas.h -I .. -I . -I ..\glib $(SOLARINC) + DEFINES = -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"GModule\" + + all : \ +@@ -24,10 +24,10 @@ + + + gmoduleconf.h: gmoduleconf.h.win32 +- copy gmoduleconf.h.win32 gmoduleconf.h ++ $(GNUCOPY) gmoduleconf.h.win32 gmoduleconf.h + + gmodule.res : gmodule.rc +- rc -DBUILDNUMBER=0 -r -fo gmodule.res gmodule.rc ++ rc -DBUILDNUMBER=0 -r -i $(SOLARINC) -fo gmodule.res gmodule.rc + + libgmodule-2.0-0.dll : $(gmodule_OBJECTS) gmodule.def gmodule.res + $(CC) $(CFLAGS) -LD -Fe$@ $(gmodule_OBJECTS) gmodule.res \ +--- misc/glib-2.28.1/gobject/gmarshal.c 2011-02-18 16:35:05.000000000 +0100 ++++ misc/build/glib-2.28.1/gobject/gmarshal.c 2011-03-04 11:05:16.120199300 +0100 +@@ -1,835 +1,835 @@ +- +- +-#ifdef G_ENABLE_DEBUG +-#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) +-#define g_marshal_value_peek_char(v) g_value_get_char (v) +-#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) +-#define g_marshal_value_peek_int(v) g_value_get_int (v) +-#define g_marshal_value_peek_uint(v) g_value_get_uint (v) +-#define g_marshal_value_peek_long(v) g_value_get_long (v) +-#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) +-#define g_marshal_value_peek_int64(v) g_value_get_int64 (v) +-#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) +-#define g_marshal_value_peek_enum(v) g_value_get_enum (v) +-#define g_marshal_value_peek_flags(v) g_value_get_flags (v) +-#define g_marshal_value_peek_float(v) g_value_get_float (v) +-#define g_marshal_value_peek_double(v) g_value_get_double (v) +-#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) +-#define g_marshal_value_peek_param(v) g_value_get_param (v) +-#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) +-#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) +-#define g_marshal_value_peek_object(v) g_value_get_object (v) +-#define g_marshal_value_peek_variant(v) g_value_get_variant (v) +-#else /* !G_ENABLE_DEBUG */ +-/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. +- * Do not access GValues directly in your code. Instead, use the +- * g_value_get_*() functions +- */ +-#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int +-#define g_marshal_value_peek_char(v) (v)->data[0].v_int +-#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint +-#define g_marshal_value_peek_int(v) (v)->data[0].v_int +-#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint +-#define g_marshal_value_peek_long(v) (v)->data[0].v_long +-#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong +-#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 +-#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 +-#define g_marshal_value_peek_enum(v) (v)->data[0].v_long +-#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong +-#define g_marshal_value_peek_float(v) (v)->data[0].v_float +-#define g_marshal_value_peek_double(v) (v)->data[0].v_double +-#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer +-#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer +-#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer +-#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer +-#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer +-#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer +-#endif /* !G_ENABLE_DEBUG */ +- +- +-/* VOID:VOID (./gmarshal.list:27) */ +-void +-g_cclosure_marshal_VOID__VOID (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef void (*GMarshalFunc_VOID__VOID) (gpointer data1, +- gpointer data2); +- register GMarshalFunc_VOID__VOID callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- +- g_return_if_fail (n_param_values == 1); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_VOID__VOID) (marshal_data ? marshal_data : cc->callback); +- +- callback (data1, +- data2); +-} +- +-/* VOID:BOOLEAN (./gmarshal.list:28) */ +-void +-g_cclosure_marshal_VOID__BOOLEAN (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef void (*GMarshalFunc_VOID__BOOLEAN) (gpointer data1, +- gboolean arg_1, +- gpointer data2); +- register GMarshalFunc_VOID__BOOLEAN callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- +- g_return_if_fail (n_param_values == 2); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_VOID__BOOLEAN) (marshal_data ? marshal_data : cc->callback); +- +- callback (data1, +- g_marshal_value_peek_boolean (param_values + 1), +- data2); +-} +- +-/* VOID:CHAR (./gmarshal.list:29) */ +-void +-g_cclosure_marshal_VOID__CHAR (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef void (*GMarshalFunc_VOID__CHAR) (gpointer data1, +- gchar arg_1, +- gpointer data2); +- register GMarshalFunc_VOID__CHAR callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- +- g_return_if_fail (n_param_values == 2); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_VOID__CHAR) (marshal_data ? marshal_data : cc->callback); +- +- callback (data1, +- g_marshal_value_peek_char (param_values + 1), +- data2); +-} +- +-/* VOID:UCHAR (./gmarshal.list:30) */ +-void +-g_cclosure_marshal_VOID__UCHAR (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef void (*GMarshalFunc_VOID__UCHAR) (gpointer data1, +- guchar arg_1, +- gpointer data2); +- register GMarshalFunc_VOID__UCHAR callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- +- g_return_if_fail (n_param_values == 2); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_VOID__UCHAR) (marshal_data ? marshal_data : cc->callback); +- +- callback (data1, +- g_marshal_value_peek_uchar (param_values + 1), +- data2); +-} +- +-/* VOID:INT (./gmarshal.list:31) */ +-void +-g_cclosure_marshal_VOID__INT (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef void (*GMarshalFunc_VOID__INT) (gpointer data1, +- gint arg_1, +- gpointer data2); +- register GMarshalFunc_VOID__INT callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- +- g_return_if_fail (n_param_values == 2); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_VOID__INT) (marshal_data ? marshal_data : cc->callback); +- +- callback (data1, +- g_marshal_value_peek_int (param_values + 1), +- data2); +-} +- +-/* VOID:UINT (./gmarshal.list:32) */ +-void +-g_cclosure_marshal_VOID__UINT (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef void (*GMarshalFunc_VOID__UINT) (gpointer data1, +- guint arg_1, +- gpointer data2); +- register GMarshalFunc_VOID__UINT callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- +- g_return_if_fail (n_param_values == 2); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_VOID__UINT) (marshal_data ? marshal_data : cc->callback); +- +- callback (data1, +- g_marshal_value_peek_uint (param_values + 1), +- data2); +-} +- +-/* VOID:LONG (./gmarshal.list:33) */ +-void +-g_cclosure_marshal_VOID__LONG (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef void (*GMarshalFunc_VOID__LONG) (gpointer data1, +- glong arg_1, +- gpointer data2); +- register GMarshalFunc_VOID__LONG callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- +- g_return_if_fail (n_param_values == 2); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_VOID__LONG) (marshal_data ? marshal_data : cc->callback); +- +- callback (data1, +- g_marshal_value_peek_long (param_values + 1), +- data2); +-} +- +-/* VOID:ULONG (./gmarshal.list:34) */ +-void +-g_cclosure_marshal_VOID__ULONG (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef void (*GMarshalFunc_VOID__ULONG) (gpointer data1, +- gulong arg_1, +- gpointer data2); +- register GMarshalFunc_VOID__ULONG callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- +- g_return_if_fail (n_param_values == 2); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_VOID__ULONG) (marshal_data ? marshal_data : cc->callback); +- +- callback (data1, +- g_marshal_value_peek_ulong (param_values + 1), +- data2); +-} +- +-/* VOID:ENUM (./gmarshal.list:35) */ +-void +-g_cclosure_marshal_VOID__ENUM (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef void (*GMarshalFunc_VOID__ENUM) (gpointer data1, +- gint arg_1, +- gpointer data2); +- register GMarshalFunc_VOID__ENUM callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- +- g_return_if_fail (n_param_values == 2); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_VOID__ENUM) (marshal_data ? marshal_data : cc->callback); +- +- callback (data1, +- g_marshal_value_peek_enum (param_values + 1), +- data2); +-} +- +-/* VOID:FLAGS (./gmarshal.list:36) */ +-void +-g_cclosure_marshal_VOID__FLAGS (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef void (*GMarshalFunc_VOID__FLAGS) (gpointer data1, +- guint arg_1, +- gpointer data2); +- register GMarshalFunc_VOID__FLAGS callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- +- g_return_if_fail (n_param_values == 2); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_VOID__FLAGS) (marshal_data ? marshal_data : cc->callback); +- +- callback (data1, +- g_marshal_value_peek_flags (param_values + 1), +- data2); +-} +- +-/* VOID:FLOAT (./gmarshal.list:37) */ +-void +-g_cclosure_marshal_VOID__FLOAT (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef void (*GMarshalFunc_VOID__FLOAT) (gpointer data1, +- gfloat arg_1, +- gpointer data2); +- register GMarshalFunc_VOID__FLOAT callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- +- g_return_if_fail (n_param_values == 2); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_VOID__FLOAT) (marshal_data ? marshal_data : cc->callback); +- +- callback (data1, +- g_marshal_value_peek_float (param_values + 1), +- data2); +-} +- +-/* VOID:DOUBLE (./gmarshal.list:38) */ +-void +-g_cclosure_marshal_VOID__DOUBLE (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef void (*GMarshalFunc_VOID__DOUBLE) (gpointer data1, +- gdouble arg_1, +- gpointer data2); +- register GMarshalFunc_VOID__DOUBLE callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- +- g_return_if_fail (n_param_values == 2); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_VOID__DOUBLE) (marshal_data ? marshal_data : cc->callback); +- +- callback (data1, +- g_marshal_value_peek_double (param_values + 1), +- data2); +-} +- +-/* VOID:STRING (./gmarshal.list:39) */ +-void +-g_cclosure_marshal_VOID__STRING (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef void (*GMarshalFunc_VOID__STRING) (gpointer data1, +- gpointer arg_1, +- gpointer data2); +- register GMarshalFunc_VOID__STRING callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- +- g_return_if_fail (n_param_values == 2); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_VOID__STRING) (marshal_data ? marshal_data : cc->callback); +- +- callback (data1, +- g_marshal_value_peek_string (param_values + 1), +- data2); +-} +- +-/* VOID:PARAM (./gmarshal.list:40) */ +-void +-g_cclosure_marshal_VOID__PARAM (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef void (*GMarshalFunc_VOID__PARAM) (gpointer data1, +- gpointer arg_1, +- gpointer data2); +- register GMarshalFunc_VOID__PARAM callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- +- g_return_if_fail (n_param_values == 2); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_VOID__PARAM) (marshal_data ? marshal_data : cc->callback); +- +- callback (data1, +- g_marshal_value_peek_param (param_values + 1), +- data2); +-} +- +-/* VOID:BOXED (./gmarshal.list:41) */ +-void +-g_cclosure_marshal_VOID__BOXED (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef void (*GMarshalFunc_VOID__BOXED) (gpointer data1, +- gpointer arg_1, +- gpointer data2); +- register GMarshalFunc_VOID__BOXED callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- +- g_return_if_fail (n_param_values == 2); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_VOID__BOXED) (marshal_data ? marshal_data : cc->callback); +- +- callback (data1, +- g_marshal_value_peek_boxed (param_values + 1), +- data2); +-} +- +-/* VOID:POINTER (./gmarshal.list:42) */ +-void +-g_cclosure_marshal_VOID__POINTER (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef void (*GMarshalFunc_VOID__POINTER) (gpointer data1, +- gpointer arg_1, +- gpointer data2); +- register GMarshalFunc_VOID__POINTER callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- +- g_return_if_fail (n_param_values == 2); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_VOID__POINTER) (marshal_data ? marshal_data : cc->callback); +- +- callback (data1, +- g_marshal_value_peek_pointer (param_values + 1), +- data2); +-} +- +-/* VOID:OBJECT (./gmarshal.list:43) */ +-void +-g_cclosure_marshal_VOID__OBJECT (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef void (*GMarshalFunc_VOID__OBJECT) (gpointer data1, +- gpointer arg_1, +- gpointer data2); +- register GMarshalFunc_VOID__OBJECT callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- +- g_return_if_fail (n_param_values == 2); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_VOID__OBJECT) (marshal_data ? marshal_data : cc->callback); +- +- callback (data1, +- g_marshal_value_peek_object (param_values + 1), +- data2); +-} +- +-/* VOID:VARIANT (./gmarshal.list:44) */ +-void +-g_cclosure_marshal_VOID__VARIANT (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef void (*GMarshalFunc_VOID__VARIANT) (gpointer data1, +- gpointer arg_1, +- gpointer data2); +- register GMarshalFunc_VOID__VARIANT callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- +- g_return_if_fail (n_param_values == 2); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_VOID__VARIANT) (marshal_data ? marshal_data : cc->callback); +- +- callback (data1, +- g_marshal_value_peek_variant (param_values + 1), +- data2); +-} +- +-/* VOID:UINT,POINTER (./gmarshal.list:47) */ +-void +-g_cclosure_marshal_VOID__UINT_POINTER (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef void (*GMarshalFunc_VOID__UINT_POINTER) (gpointer data1, +- guint arg_1, +- gpointer arg_2, +- gpointer data2); +- register GMarshalFunc_VOID__UINT_POINTER callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- +- g_return_if_fail (n_param_values == 3); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_VOID__UINT_POINTER) (marshal_data ? marshal_data : cc->callback); +- +- callback (data1, +- g_marshal_value_peek_uint (param_values + 1), +- g_marshal_value_peek_pointer (param_values + 2), +- data2); +-} +- +-/* BOOL:FLAGS (./gmarshal.list:48) */ +-void +-g_cclosure_marshal_BOOLEAN__FLAGS (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef gboolean (*GMarshalFunc_BOOLEAN__FLAGS) (gpointer data1, +- guint arg_1, +- gpointer data2); +- register GMarshalFunc_BOOLEAN__FLAGS callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- gboolean v_return; +- +- g_return_if_fail (return_value != NULL); +- g_return_if_fail (n_param_values == 2); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_BOOLEAN__FLAGS) (marshal_data ? marshal_data : cc->callback); +- +- v_return = callback (data1, +- g_marshal_value_peek_flags (param_values + 1), +- data2); +- +- g_value_set_boolean (return_value, v_return); +-} +- +-/* STRING:OBJECT,POINTER (./gmarshal.list:49) */ +-void +-g_cclosure_marshal_STRING__OBJECT_POINTER (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef gchar* (*GMarshalFunc_STRING__OBJECT_POINTER) (gpointer data1, +- gpointer arg_1, +- gpointer arg_2, +- gpointer data2); +- register GMarshalFunc_STRING__OBJECT_POINTER callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- gchar* v_return; +- +- g_return_if_fail (return_value != NULL); +- g_return_if_fail (n_param_values == 3); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_STRING__OBJECT_POINTER) (marshal_data ? marshal_data : cc->callback); +- +- v_return = callback (data1, +- g_marshal_value_peek_object (param_values + 1), +- g_marshal_value_peek_pointer (param_values + 2), +- data2); +- +- g_value_take_string (return_value, v_return); +-} +- +-/* BOOL:BOXED,BOXED (./gmarshal.list:50) */ +-void +-g_cclosure_marshal_BOOLEAN__BOXED_BOXED (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef gboolean (*GMarshalFunc_BOOLEAN__BOXED_BOXED) (gpointer data1, +- gpointer arg_1, +- gpointer arg_2, +- gpointer data2); +- register GMarshalFunc_BOOLEAN__BOXED_BOXED callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- gboolean v_return; +- +- g_return_if_fail (return_value != NULL); +- g_return_if_fail (n_param_values == 3); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_BOOLEAN__BOXED_BOXED) (marshal_data ? marshal_data : cc->callback); +- +- v_return = callback (data1, +- g_marshal_value_peek_boxed (param_values + 1), +- g_marshal_value_peek_boxed (param_values + 2), +- data2); +- +- g_value_set_boolean (return_value, v_return); +-} +- ++ ++ ++#ifdef G_ENABLE_DEBUG ++#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) ++#define g_marshal_value_peek_char(v) g_value_get_char (v) ++#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) ++#define g_marshal_value_peek_int(v) g_value_get_int (v) ++#define g_marshal_value_peek_uint(v) g_value_get_uint (v) ++#define g_marshal_value_peek_long(v) g_value_get_long (v) ++#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) ++#define g_marshal_value_peek_int64(v) g_value_get_int64 (v) ++#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) ++#define g_marshal_value_peek_enum(v) g_value_get_enum (v) ++#define g_marshal_value_peek_flags(v) g_value_get_flags (v) ++#define g_marshal_value_peek_float(v) g_value_get_float (v) ++#define g_marshal_value_peek_double(v) g_value_get_double (v) ++#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) ++#define g_marshal_value_peek_param(v) g_value_get_param (v) ++#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) ++#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) ++#define g_marshal_value_peek_object(v) g_value_get_object (v) ++#define g_marshal_value_peek_variant(v) g_value_get_variant (v) ++#else /* !G_ENABLE_DEBUG */ ++/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. ++ * Do not access GValues directly in your code. Instead, use the ++ * g_value_get_*() functions ++ */ ++#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int ++#define g_marshal_value_peek_char(v) (v)->data[0].v_int ++#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint ++#define g_marshal_value_peek_int(v) (v)->data[0].v_int ++#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint ++#define g_marshal_value_peek_long(v) (v)->data[0].v_long ++#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong ++#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 ++#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 ++#define g_marshal_value_peek_enum(v) (v)->data[0].v_long ++#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong ++#define g_marshal_value_peek_float(v) (v)->data[0].v_float ++#define g_marshal_value_peek_double(v) (v)->data[0].v_double ++#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer ++#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer ++#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer ++#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer ++#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer ++#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer ++#endif /* !G_ENABLE_DEBUG */ ++ ++ ++/* VOID:VOID (gmarshal.list:27) */ ++void ++g_cclosure_marshal_VOID__VOID (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef void (*GMarshalFunc_VOID__VOID) (gpointer data1, ++ gpointer data2); ++ register GMarshalFunc_VOID__VOID callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ ++ g_return_if_fail (n_param_values == 1); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_VOID__VOID) (marshal_data ? marshal_data : cc->callback); ++ ++ callback (data1, ++ data2); ++} ++ ++/* VOID:BOOLEAN (gmarshal.list:28) */ ++void ++g_cclosure_marshal_VOID__BOOLEAN (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef void (*GMarshalFunc_VOID__BOOLEAN) (gpointer data1, ++ gboolean arg_1, ++ gpointer data2); ++ register GMarshalFunc_VOID__BOOLEAN callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ ++ g_return_if_fail (n_param_values == 2); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_VOID__BOOLEAN) (marshal_data ? marshal_data : cc->callback); ++ ++ callback (data1, ++ g_marshal_value_peek_boolean (param_values + 1), ++ data2); ++} ++ ++/* VOID:CHAR (gmarshal.list:29) */ ++void ++g_cclosure_marshal_VOID__CHAR (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef void (*GMarshalFunc_VOID__CHAR) (gpointer data1, ++ gchar arg_1, ++ gpointer data2); ++ register GMarshalFunc_VOID__CHAR callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ ++ g_return_if_fail (n_param_values == 2); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_VOID__CHAR) (marshal_data ? marshal_data : cc->callback); ++ ++ callback (data1, ++ g_marshal_value_peek_char (param_values + 1), ++ data2); ++} ++ ++/* VOID:UCHAR (gmarshal.list:30) */ ++void ++g_cclosure_marshal_VOID__UCHAR (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef void (*GMarshalFunc_VOID__UCHAR) (gpointer data1, ++ guchar arg_1, ++ gpointer data2); ++ register GMarshalFunc_VOID__UCHAR callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ ++ g_return_if_fail (n_param_values == 2); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_VOID__UCHAR) (marshal_data ? marshal_data : cc->callback); ++ ++ callback (data1, ++ g_marshal_value_peek_uchar (param_values + 1), ++ data2); ++} ++ ++/* VOID:INT (gmarshal.list:31) */ ++void ++g_cclosure_marshal_VOID__INT (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef void (*GMarshalFunc_VOID__INT) (gpointer data1, ++ gint arg_1, ++ gpointer data2); ++ register GMarshalFunc_VOID__INT callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ ++ g_return_if_fail (n_param_values == 2); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_VOID__INT) (marshal_data ? marshal_data : cc->callback); ++ ++ callback (data1, ++ g_marshal_value_peek_int (param_values + 1), ++ data2); ++} ++ ++/* VOID:UINT (gmarshal.list:32) */ ++void ++g_cclosure_marshal_VOID__UINT (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef void (*GMarshalFunc_VOID__UINT) (gpointer data1, ++ guint arg_1, ++ gpointer data2); ++ register GMarshalFunc_VOID__UINT callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ ++ g_return_if_fail (n_param_values == 2); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_VOID__UINT) (marshal_data ? marshal_data : cc->callback); ++ ++ callback (data1, ++ g_marshal_value_peek_uint (param_values + 1), ++ data2); ++} ++ ++/* VOID:LONG (gmarshal.list:33) */ ++void ++g_cclosure_marshal_VOID__LONG (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef void (*GMarshalFunc_VOID__LONG) (gpointer data1, ++ glong arg_1, ++ gpointer data2); ++ register GMarshalFunc_VOID__LONG callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ ++ g_return_if_fail (n_param_values == 2); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_VOID__LONG) (marshal_data ? marshal_data : cc->callback); ++ ++ callback (data1, ++ g_marshal_value_peek_long (param_values + 1), ++ data2); ++} ++ ++/* VOID:ULONG (gmarshal.list:34) */ ++void ++g_cclosure_marshal_VOID__ULONG (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef void (*GMarshalFunc_VOID__ULONG) (gpointer data1, ++ gulong arg_1, ++ gpointer data2); ++ register GMarshalFunc_VOID__ULONG callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ ++ g_return_if_fail (n_param_values == 2); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_VOID__ULONG) (marshal_data ? marshal_data : cc->callback); ++ ++ callback (data1, ++ g_marshal_value_peek_ulong (param_values + 1), ++ data2); ++} ++ ++/* VOID:ENUM (gmarshal.list:35) */ ++void ++g_cclosure_marshal_VOID__ENUM (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef void (*GMarshalFunc_VOID__ENUM) (gpointer data1, ++ gint arg_1, ++ gpointer data2); ++ register GMarshalFunc_VOID__ENUM callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ ++ g_return_if_fail (n_param_values == 2); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_VOID__ENUM) (marshal_data ? marshal_data : cc->callback); ++ ++ callback (data1, ++ g_marshal_value_peek_enum (param_values + 1), ++ data2); ++} ++ ++/* VOID:FLAGS (gmarshal.list:36) */ ++void ++g_cclosure_marshal_VOID__FLAGS (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef void (*GMarshalFunc_VOID__FLAGS) (gpointer data1, ++ guint arg_1, ++ gpointer data2); ++ register GMarshalFunc_VOID__FLAGS callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ ++ g_return_if_fail (n_param_values == 2); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_VOID__FLAGS) (marshal_data ? marshal_data : cc->callback); ++ ++ callback (data1, ++ g_marshal_value_peek_flags (param_values + 1), ++ data2); ++} ++ ++/* VOID:FLOAT (gmarshal.list:37) */ ++void ++g_cclosure_marshal_VOID__FLOAT (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef void (*GMarshalFunc_VOID__FLOAT) (gpointer data1, ++ gfloat arg_1, ++ gpointer data2); ++ register GMarshalFunc_VOID__FLOAT callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ ++ g_return_if_fail (n_param_values == 2); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_VOID__FLOAT) (marshal_data ? marshal_data : cc->callback); ++ ++ callback (data1, ++ g_marshal_value_peek_float (param_values + 1), ++ data2); ++} ++ ++/* VOID:DOUBLE (gmarshal.list:38) */ ++void ++g_cclosure_marshal_VOID__DOUBLE (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef void (*GMarshalFunc_VOID__DOUBLE) (gpointer data1, ++ gdouble arg_1, ++ gpointer data2); ++ register GMarshalFunc_VOID__DOUBLE callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ ++ g_return_if_fail (n_param_values == 2); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_VOID__DOUBLE) (marshal_data ? marshal_data : cc->callback); ++ ++ callback (data1, ++ g_marshal_value_peek_double (param_values + 1), ++ data2); ++} ++ ++/* VOID:STRING (gmarshal.list:39) */ ++void ++g_cclosure_marshal_VOID__STRING (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef void (*GMarshalFunc_VOID__STRING) (gpointer data1, ++ gpointer arg_1, ++ gpointer data2); ++ register GMarshalFunc_VOID__STRING callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ ++ g_return_if_fail (n_param_values == 2); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_VOID__STRING) (marshal_data ? marshal_data : cc->callback); ++ ++ callback (data1, ++ g_marshal_value_peek_string (param_values + 1), ++ data2); ++} ++ ++/* VOID:PARAM (gmarshal.list:40) */ ++void ++g_cclosure_marshal_VOID__PARAM (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef void (*GMarshalFunc_VOID__PARAM) (gpointer data1, ++ gpointer arg_1, ++ gpointer data2); ++ register GMarshalFunc_VOID__PARAM callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ ++ g_return_if_fail (n_param_values == 2); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_VOID__PARAM) (marshal_data ? marshal_data : cc->callback); ++ ++ callback (data1, ++ g_marshal_value_peek_param (param_values + 1), ++ data2); ++} ++ ++/* VOID:BOXED (gmarshal.list:41) */ ++void ++g_cclosure_marshal_VOID__BOXED (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef void (*GMarshalFunc_VOID__BOXED) (gpointer data1, ++ gpointer arg_1, ++ gpointer data2); ++ register GMarshalFunc_VOID__BOXED callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ ++ g_return_if_fail (n_param_values == 2); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_VOID__BOXED) (marshal_data ? marshal_data : cc->callback); ++ ++ callback (data1, ++ g_marshal_value_peek_boxed (param_values + 1), ++ data2); ++} ++ ++/* VOID:POINTER (gmarshal.list:42) */ ++void ++g_cclosure_marshal_VOID__POINTER (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef void (*GMarshalFunc_VOID__POINTER) (gpointer data1, ++ gpointer arg_1, ++ gpointer data2); ++ register GMarshalFunc_VOID__POINTER callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ ++ g_return_if_fail (n_param_values == 2); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_VOID__POINTER) (marshal_data ? marshal_data : cc->callback); ++ ++ callback (data1, ++ g_marshal_value_peek_pointer (param_values + 1), ++ data2); ++} ++ ++/* VOID:OBJECT (gmarshal.list:43) */ ++void ++g_cclosure_marshal_VOID__OBJECT (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef void (*GMarshalFunc_VOID__OBJECT) (gpointer data1, ++ gpointer arg_1, ++ gpointer data2); ++ register GMarshalFunc_VOID__OBJECT callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ ++ g_return_if_fail (n_param_values == 2); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_VOID__OBJECT) (marshal_data ? marshal_data : cc->callback); ++ ++ callback (data1, ++ g_marshal_value_peek_object (param_values + 1), ++ data2); ++} ++ ++/* VOID:VARIANT (gmarshal.list:44) */ ++void ++g_cclosure_marshal_VOID__VARIANT (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef void (*GMarshalFunc_VOID__VARIANT) (gpointer data1, ++ gpointer arg_1, ++ gpointer data2); ++ register GMarshalFunc_VOID__VARIANT callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ ++ g_return_if_fail (n_param_values == 2); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_VOID__VARIANT) (marshal_data ? marshal_data : cc->callback); ++ ++ callback (data1, ++ g_marshal_value_peek_variant (param_values + 1), ++ data2); ++} ++ ++/* VOID:UINT,POINTER (gmarshal.list:47) */ ++void ++g_cclosure_marshal_VOID__UINT_POINTER (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef void (*GMarshalFunc_VOID__UINT_POINTER) (gpointer data1, ++ guint arg_1, ++ gpointer arg_2, ++ gpointer data2); ++ register GMarshalFunc_VOID__UINT_POINTER callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ ++ g_return_if_fail (n_param_values == 3); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_VOID__UINT_POINTER) (marshal_data ? marshal_data : cc->callback); ++ ++ callback (data1, ++ g_marshal_value_peek_uint (param_values + 1), ++ g_marshal_value_peek_pointer (param_values + 2), ++ data2); ++} ++ ++/* BOOL:FLAGS (gmarshal.list:48) */ ++void ++g_cclosure_marshal_BOOLEAN__FLAGS (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef gboolean (*GMarshalFunc_BOOLEAN__FLAGS) (gpointer data1, ++ guint arg_1, ++ gpointer data2); ++ register GMarshalFunc_BOOLEAN__FLAGS callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ gboolean v_return; ++ ++ g_return_if_fail (return_value != NULL); ++ g_return_if_fail (n_param_values == 2); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_BOOLEAN__FLAGS) (marshal_data ? marshal_data : cc->callback); ++ ++ v_return = callback (data1, ++ g_marshal_value_peek_flags (param_values + 1), ++ data2); ++ ++ g_value_set_boolean (return_value, v_return); ++} ++ ++/* STRING:OBJECT,POINTER (gmarshal.list:49) */ ++void ++g_cclosure_marshal_STRING__OBJECT_POINTER (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef gchar* (*GMarshalFunc_STRING__OBJECT_POINTER) (gpointer data1, ++ gpointer arg_1, ++ gpointer arg_2, ++ gpointer data2); ++ register GMarshalFunc_STRING__OBJECT_POINTER callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ gchar* v_return; ++ ++ g_return_if_fail (return_value != NULL); ++ g_return_if_fail (n_param_values == 3); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_STRING__OBJECT_POINTER) (marshal_data ? marshal_data : cc->callback); ++ ++ v_return = callback (data1, ++ g_marshal_value_peek_object (param_values + 1), ++ g_marshal_value_peek_pointer (param_values + 2), ++ data2); ++ ++ g_value_take_string (return_value, v_return); ++} ++ ++/* BOOL:BOXED,BOXED (gmarshal.list:50) */ ++void ++g_cclosure_marshal_BOOLEAN__BOXED_BOXED (GClosure *closure, ++ GValue *return_value G_GNUC_UNUSED, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint G_GNUC_UNUSED, ++ gpointer marshal_data) ++{ ++ typedef gboolean (*GMarshalFunc_BOOLEAN__BOXED_BOXED) (gpointer data1, ++ gpointer arg_1, ++ gpointer arg_2, ++ gpointer data2); ++ register GMarshalFunc_BOOLEAN__BOXED_BOXED callback; ++ register GCClosure *cc = (GCClosure*) closure; ++ register gpointer data1, data2; ++ gboolean v_return; ++ ++ g_return_if_fail (return_value != NULL); ++ g_return_if_fail (n_param_values == 3); ++ ++ if (G_CCLOSURE_SWAP_DATA (closure)) ++ { ++ data1 = closure->data; ++ data2 = g_value_peek_pointer (param_values + 0); ++ } ++ else ++ { ++ data1 = g_value_peek_pointer (param_values + 0); ++ data2 = closure->data; ++ } ++ callback = (GMarshalFunc_BOOLEAN__BOXED_BOXED) (marshal_data ? marshal_data : cc->callback); ++ ++ v_return = callback (data1, ++ g_marshal_value_peek_boxed (param_values + 1), ++ g_marshal_value_peek_boxed (param_values + 2), ++ data2); ++ ++ g_value_set_boolean (return_value, v_return); ++} ++ +--- misc/glib-2.28.1/gobject/gmarshal.h 2011-02-18 16:35:05.000000000 +0100 ++++ misc/build/glib-2.28.1/gobject/gmarshal.h 2011-03-04 11:05:16.077196900 +0100 +@@ -1,186 +1,186 @@ +-#ifndef __G_MARSHAL_H__ +-#define __G_MARSHAL_H__ +- +-G_BEGIN_DECLS +- +-/* VOID:VOID (./gmarshal.list:27) */ +-extern void g_cclosure_marshal_VOID__VOID (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +- +-/* VOID:BOOLEAN (./gmarshal.list:28) */ +-extern void g_cclosure_marshal_VOID__BOOLEAN (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +- +-/* VOID:CHAR (./gmarshal.list:29) */ +-extern void g_cclosure_marshal_VOID__CHAR (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +- +-/* VOID:UCHAR (./gmarshal.list:30) */ +-extern void g_cclosure_marshal_VOID__UCHAR (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +- +-/* VOID:INT (./gmarshal.list:31) */ +-extern void g_cclosure_marshal_VOID__INT (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +- +-/* VOID:UINT (./gmarshal.list:32) */ +-extern void g_cclosure_marshal_VOID__UINT (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +- +-/* VOID:LONG (./gmarshal.list:33) */ +-extern void g_cclosure_marshal_VOID__LONG (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +- +-/* VOID:ULONG (./gmarshal.list:34) */ +-extern void g_cclosure_marshal_VOID__ULONG (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +- +-/* VOID:ENUM (./gmarshal.list:35) */ +-extern void g_cclosure_marshal_VOID__ENUM (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +- +-/* VOID:FLAGS (./gmarshal.list:36) */ +-extern void g_cclosure_marshal_VOID__FLAGS (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +- +-/* VOID:FLOAT (./gmarshal.list:37) */ +-extern void g_cclosure_marshal_VOID__FLOAT (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +- +-/* VOID:DOUBLE (./gmarshal.list:38) */ +-extern void g_cclosure_marshal_VOID__DOUBLE (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +- +-/* VOID:STRING (./gmarshal.list:39) */ +-extern void g_cclosure_marshal_VOID__STRING (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +- +-/* VOID:PARAM (./gmarshal.list:40) */ +-extern void g_cclosure_marshal_VOID__PARAM (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +- +-/* VOID:BOXED (./gmarshal.list:41) */ +-extern void g_cclosure_marshal_VOID__BOXED (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +- +-/* VOID:POINTER (./gmarshal.list:42) */ +-extern void g_cclosure_marshal_VOID__POINTER (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +- +-/* VOID:OBJECT (./gmarshal.list:43) */ +-extern void g_cclosure_marshal_VOID__OBJECT (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +- +-/* VOID:VARIANT (./gmarshal.list:44) */ +-extern void g_cclosure_marshal_VOID__VARIANT (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +- +-/* VOID:UINT,POINTER (./gmarshal.list:47) */ +-extern void g_cclosure_marshal_VOID__UINT_POINTER (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +- +-/* BOOL:FLAGS (./gmarshal.list:48) */ +-extern void g_cclosure_marshal_BOOLEAN__FLAGS (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +-#define g_cclosure_marshal_BOOL__FLAGS g_cclosure_marshal_BOOLEAN__FLAGS +- +-/* STRING:OBJECT,POINTER (./gmarshal.list:49) */ +-extern void g_cclosure_marshal_STRING__OBJECT_POINTER (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +- +-/* BOOL:BOXED,BOXED (./gmarshal.list:50) */ +-extern void g_cclosure_marshal_BOOLEAN__BOXED_BOXED (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); +-#define g_cclosure_marshal_BOOL__BOXED_BOXED g_cclosure_marshal_BOOLEAN__BOXED_BOXED +- +-G_END_DECLS +- +-#endif /* __G_MARSHAL_H__ */ ++#ifndef __G_MARSHAL_H__ ++#define __G_MARSHAL_H__ ++ ++G_BEGIN_DECLS ++ ++/* VOID:VOID (gmarshal.list:27) */ ++extern void g_cclosure_marshal_VOID__VOID (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++ ++/* VOID:BOOLEAN (gmarshal.list:28) */ ++extern void g_cclosure_marshal_VOID__BOOLEAN (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++ ++/* VOID:CHAR (gmarshal.list:29) */ ++extern void g_cclosure_marshal_VOID__CHAR (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++ ++/* VOID:UCHAR (gmarshal.list:30) */ ++extern void g_cclosure_marshal_VOID__UCHAR (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++ ++/* VOID:INT (gmarshal.list:31) */ ++extern void g_cclosure_marshal_VOID__INT (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++ ++/* VOID:UINT (gmarshal.list:32) */ ++extern void g_cclosure_marshal_VOID__UINT (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++ ++/* VOID:LONG (gmarshal.list:33) */ ++extern void g_cclosure_marshal_VOID__LONG (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++ ++/* VOID:ULONG (gmarshal.list:34) */ ++extern void g_cclosure_marshal_VOID__ULONG (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++ ++/* VOID:ENUM (gmarshal.list:35) */ ++extern void g_cclosure_marshal_VOID__ENUM (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++ ++/* VOID:FLAGS (gmarshal.list:36) */ ++extern void g_cclosure_marshal_VOID__FLAGS (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++ ++/* VOID:FLOAT (gmarshal.list:37) */ ++extern void g_cclosure_marshal_VOID__FLOAT (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++ ++/* VOID:DOUBLE (gmarshal.list:38) */ ++extern void g_cclosure_marshal_VOID__DOUBLE (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++ ++/* VOID:STRING (gmarshal.list:39) */ ++extern void g_cclosure_marshal_VOID__STRING (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++ ++/* VOID:PARAM (gmarshal.list:40) */ ++extern void g_cclosure_marshal_VOID__PARAM (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++ ++/* VOID:BOXED (gmarshal.list:41) */ ++extern void g_cclosure_marshal_VOID__BOXED (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++ ++/* VOID:POINTER (gmarshal.list:42) */ ++extern void g_cclosure_marshal_VOID__POINTER (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++ ++/* VOID:OBJECT (gmarshal.list:43) */ ++extern void g_cclosure_marshal_VOID__OBJECT (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++ ++/* VOID:VARIANT (gmarshal.list:44) */ ++extern void g_cclosure_marshal_VOID__VARIANT (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++ ++/* VOID:UINT,POINTER (gmarshal.list:47) */ ++extern void g_cclosure_marshal_VOID__UINT_POINTER (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++ ++/* BOOL:FLAGS (gmarshal.list:48) */ ++extern void g_cclosure_marshal_BOOLEAN__FLAGS (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++#define g_cclosure_marshal_BOOL__FLAGS g_cclosure_marshal_BOOLEAN__FLAGS ++ ++/* STRING:OBJECT,POINTER (gmarshal.list:49) */ ++extern void g_cclosure_marshal_STRING__OBJECT_POINTER (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++ ++/* BOOL:BOXED,BOXED (gmarshal.list:50) */ ++extern void g_cclosure_marshal_BOOLEAN__BOXED_BOXED (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); ++#define g_cclosure_marshal_BOOL__BOXED_BOXED g_cclosure_marshal_BOOLEAN__BOXED_BOXED ++ ++G_END_DECLS ++ ++#endif /* __G_MARSHAL_H__ */ +--- misc/glib-2.28.1/gobject/makefile.msc 2011-02-18 16:35:05.000000000 +0100 ++++ misc/build/glib-2.28.1/gobject/makefile.msc 2011-03-04 12:33:52.399273100 +0100 +@@ -7,7 +7,7 @@ + + ################################################################ + +-INCLUDES = -FImsvc_recommended_pragmas.h -I .. -I . -I ..\glib ++INCLUDES = -FImsvc_recommended_pragmas.h -I .. -I . -I ..\glib $(SOLARINC) + DEFINES = -DHAVE_CONFIG_H -DGOBJECT_COMPILATION -DG_LOG_DOMAIN=\"GLib-GObject\" \ + -DG_ENABLE_DEBUG + # -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS +@@ -24,6 +24,8 @@ + testgobject.exe + + gobject_OBJECTS = \ ++ gatomicarray.obj \ ++ gbinding.obj \ + gboxed.obj \ + gclosure.obj \ + genums.obj \ +@@ -47,14 +49,14 @@ + -DG_GNUC_PRINTF=;G_GNUC_PRINTF gobject.symbols >> gobject.def + + gobject.res : gobject.rc +- rc -DBUILDNUMBER=0 -r -fo gobject.res gobject.rc ++ rc -DBUILDNUMBER=0 -r -i $(SOLARINC) -fo gobject.res gobject.rc + + gmarshal.h : gmarshal.list glib-genmarshal.exe + echo #ifndef __G_MARSHAL_H__ > xgen-gmh + echo #define __G_MARSHAL_H__ >> xgen-gmh + glib-genmarshal --nostdinc --prefix=g_cclosure_marshal gmarshal.list --header >> xgen-gmh + echo #endif /* __G_MARSHAL_H__ */ >> xgen-gmh +- copy xgen-gmh gmarshal.h ++ $(GNUCOPY) xgen-gmh gmarshal.h + + gmarshal.c: gmarshal.list gmarshal.h glib-genmarshal.exe + glib-genmarshal --nostdinc --prefix=g_cclosure_marshal gmarshal.list --body > gmarshal.c +--- misc/glib-2.28.1/gthread/makefile.msc 2011-02-18 16:35:00.000000000 +0100 ++++ misc/build/glib-2.28.1/gthread/makefile.msc 2011-03-04 08:43:06.900355800 +0100 +@@ -7,7 +7,7 @@ + + ################################################################ + +-INCLUDES = -FImsvc_recommended_pragmas.h -I .. -I . -I ..\glib ++INCLUDES = -FImsvc_recommended_pragmas.h -I .. -I . -I ..\glib $(SOLARINC) + DEFINES = -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"GThread\" + all : \ + libgthread-2.0-0.dll +@@ -19,7 +19,7 @@ + $(CC) -c $(CFLAGS) gthread-impl.c + + gthread.res : gthread.rc +- rc -DBUILDNUMBER=0 -r -fo gthread.res gthread.rc ++ rc -DBUILDNUMBER=0 -r -i $(SOLARINC) -fo gthread.res gthread.rc + + libgthread-2.0-0.dll : $(gthread_OBJECTS) gthread.def gthread.res + $(CC) $(CFLAGS) -LD -Fe$@ $(gthread_OBJECTS) gthread.res \ +--- misc/glib-2.28.1/makefile.msc 2009-04-01 01:04:20.000000000 +0200 ++++ misc/build/glib-2.28.1/makefile.msc 2011-03-04 09:11:06.663432800 +0100 +@@ -1,7 +1,7 @@ + ## Makefile for building the GLib dlls with Microsoft C + ## Use: nmake -f makefile.msc + +-PARTS = glib gmodule gthread gobject gio tests ++PARTS = "build\win32\dirent" glib gmodule gthread gobject gio tests + + all : \ + config.h \ +@@ -22,7 +22,7 @@ + @cd .. + + config.h: config.h.win32 +- copy config.h.win32 config.h ++ $(GNUCOPY) config.h.win32 config.h + +-glibconfig.h: glibconfig.h.win32 +- copy glibconfig.h.win32 glibconfig.h ++glibconfig.h: glib/glibconfig.h.win32 ++ $(GNUCOPY) glib/glibconfig.h.win32 glib/glibconfig.h +--- misc/glib-2.28.1/tests/makefile.msc 2011-02-18 16:35:43.000000000 +0100 ++++ misc/build/glib-2.28.1/tests/makefile.msc 2011-03-04 08:33:02.079762100 +0100 +@@ -7,7 +7,7 @@ + + ################################################################ + +-INCLUDES = -FImsvc_recommended_pragmas.h -I .. -I ..\glib -I ..\gmodule ++INCLUDES = -FImsvc_recommended_pragmas.h -I .. -I ..\glib -I ..\gmodule $(SOLARINC) + DEFINES = -DHAVE_CONFIG_H -DENABLE_REGEX + + NONAUTOMATIC_TESTS = \ +--- misc/glib-2.28.1/glib/glibconfig.h Wed Aug 20 14:33:55 2008 ++++ misc/build/glib-2.28.1/glib/glibconfig.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,285 @@ +-dummy ++ /* glibconfig.h.win32.in. Originally merged from two versions of ++ * glibconfig.h, generated by the GLib configure script, for gcc and ++ * MSVC. ++ */ ++ ++ /* glibconfig.h ++ * ++ * This is a generated file. Please modify 'glibconfig.h.win32.in' ++ */ ++ ++ #ifndef __G_LIBCONFIG_H__ ++ #define __G_LIBCONFIG_H__ ++ ++ #include ++ ++ #include ++ #include ++ ++ G_BEGIN_DECLS ++ ++ #define G_MINFLOAT FLT_MIN ++ #define G_MAXFLOAT FLT_MAX ++ #define G_MINDOUBLE DBL_MIN ++ #define G_MAXDOUBLE DBL_MAX ++ #define G_MINSHORT SHRT_MIN ++ #define G_MAXSHORT SHRT_MAX ++ #define G_MAXUSHORT USHRT_MAX ++ #define G_MININT INT_MIN ++ #define G_MAXINT INT_MAX ++ #define G_MAXUINT UINT_MAX ++ #define G_MINLONG LONG_MIN ++ #define G_MAXLONG LONG_MAX ++ #define G_MAXULONG ULONG_MAX ++ ++ typedef signed char gint8; ++ typedef unsigned char guint8; ++ typedef signed short gint16; ++ typedef unsigned short guint16; ++ #define G_GINT16_MODIFIER "h" ++ #define G_GINT16_FORMAT "hi" ++ #define G_GUINT16_FORMAT "hu" ++ typedef signed int gint32; ++ typedef unsigned int guint32; ++ #define G_GINT32_MODIFIER "" ++ #define G_GINT32_FORMAT "i" ++ #define G_GUINT32_FORMAT "u" ++ #define G_HAVE_GINT64 1 /* deprecated, always true */ ++ ++ #ifndef _MSC_VER ++ G_GNUC_EXTENSION typedef signed long long gint64; ++ G_GNUC_EXTENSION typedef unsigned long long guint64; ++ #else /* _MSC_VER */ ++ typedef signed __int64 gint64; ++ typedef unsigned __int64 guint64; ++ #endif /* _MSC_VER */ ++ ++ #ifndef _MSC_VER ++ #define G_GINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##LL)) ++ #else /* _MSC_VER */ ++ #define G_GINT64_CONSTANT(val) (val##i64) ++ #endif /* _MSC_VER */ ++ #ifndef _MSC_VER ++ #define G_GUINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##ULL)) ++ #else /* _MSC_VER */ ++ #define G_GUINT64_CONSTANT(val) (val##Ui64) ++ #endif /* _MSC_VER */ ++ #define G_GINT64_MODIFIER "I64" ++ #define G_GINT64_FORMAT "I64i" ++ #define G_GUINT64_FORMAT "I64u" ++ ++ #if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64) ++ ++ #define GLIB_SIZEOF_VOID_P 8 ++ #define GLIB_SIZEOF_LONG 4 ++ #define GLIB_SIZEOF_SIZE_T 8 ++ ++ typedef signed long long gssize; ++ typedef unsigned long long gsize; ++ #define G_GSIZE_MODIFIER "I64" ++ #define G_GSSIZE_FORMAT "I64d" ++ #define G_GSIZE_FORMAT "I64u" ++ ++ #define G_MAXSIZE G_MAXUINT64 ++ #define G_MINSSIZE G_MININT64 ++ #define G_MAXSSIZE G_MAXINT64 ++ ++ #else ++ ++ #define GLIB_SIZEOF_VOID_P 4 ++ #define GLIB_SIZEOF_LONG 4 ++ #define GLIB_SIZEOF_SIZE_T 4 ++ ++ typedef signed int gssize; ++ typedef unsigned int gsize; ++ #define G_GSIZE_MODIFIER "" ++ #define G_GSSIZE_FORMAT "i" ++ #define G_GSIZE_FORMAT "u" ++ ++ #define G_MAXSIZE G_MAXUINT ++ #define G_MINSSIZE G_MININT ++ #define G_MAXSSIZE G_MAXINT ++ ++ #endif ++ ++ typedef gint64 goffset; ++ #define G_MINOFFSET G_MININT64 ++ #define G_MAXOFFSET G_MAXINT64 ++ ++ #define G_GOFFSET_MODIFIER G_GINT64_MODIFIER ++ #define G_GOFFSET_FORMAT G_GINT64_FORMAT ++ #define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val) ++ ++ ++ #ifndef _WIN64 ++ ++ #define GPOINTER_TO_INT(p) ((gint) (p)) ++ #define GPOINTER_TO_UINT(p) ((guint) (p)) ++ ++ #define GINT_TO_POINTER(i) ((gpointer) (i)) ++ #define GUINT_TO_POINTER(u) ((gpointer) (u)) ++ ++ typedef signed int gintptr; ++ typedef unsigned int guintptr; ++ ++ #define G_GINTPTR_MODIFIER "" ++ #define G_GINTPTR_FORMAT "i" ++ #define G_GUINTPTR_FORMAT "u" ++ ++ #else ++ ++ #define GPOINTER_TO_INT(p) ((gint) (gint64) (p)) ++ #define GPOINTER_TO_UINT(p) ((guint) (guint64) (p)) ++ ++ #define GINT_TO_POINTER(i) ((gpointer) (gint64) (i)) ++ #define GUINT_TO_POINTER(u) ((gpointer) (guint64) (u)) ++ ++ #ifndef _MSC_VER ++ typedef signed long long gintptr; ++ typedef unsigned long long guintptr; ++ #else ++ typedef signed __int64 gintptr; ++ typedef unsigned __int64 guintptr; ++ #endif ++ ++ #define G_GINTPTR_MODIFIER "I64" ++ #define G_GINTPTR_FORMAT "I64i" ++ #define G_GUINTPTR_FORMAT "I64u" ++ ++ #endif ++ ++ #ifdef NeXT /* @#%@! NeXTStep */ ++ # define g_ATEXIT(proc) (!atexit (proc)) ++ #else ++ # define g_ATEXIT(proc) (atexit (proc)) ++ #endif ++ ++ #define g_memmove(dest,src,len) G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END ++ ++ #define GLIB_MAJOR_VERSION 2 ++ #define GLIB_MINOR_VERSION 28 ++ #define GLIB_MICRO_VERSION 1 ++ ++ #define G_OS_WIN32 ++ #define G_PLATFORM_WIN32 ++ ++ ++ #ifndef _MSC_VER ++ #define G_VA_COPY va_copy ++ #endif /* not _MSC_VER */ ++ ++ #ifdef __cplusplus ++ #define G_HAVE_INLINE 1 ++ #else /* !__cplusplus */ ++ #ifndef _MSC_VER ++ #define G_HAVE_INLINE 1 ++ #endif /* _MSC_VER */ ++ #define G_HAVE___INLINE 1 ++ #if !defined(_MSC_VER) && !defined(__DMC__) ++ #define G_HAVE___INLINE__ 1 ++ #endif /* !_MSC_VER and !__DMC__ */ ++ #endif /* !__cplusplus */ ++ ++ #define G_CAN_INLINE 1 ++ ++ #ifndef _MSC_VER ++ #define G_HAVE_ISO_VARARGS 1 ++ ++ /* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi ++ * is passed ISO vararg support is turned off, and there is no work ++ * around to turn it on, so we unconditionally turn it off. ++ */ ++ #if __GNUC__ == 2 && __GNUC_MINOR__ == 95 ++ # undef G_HAVE_ISO_VARARGS ++ #endif ++ ++ #define G_HAVE_GNUC_VARARGS 1 ++ #else /* _MSC_VER */ ++ /* varargs macros available since msvc8 (vs2005) */ ++ # if _MSC_VER >= 1400 ++ # define G_HAVE_ISO_VARARGS 1 ++ # endif ++ #endif /* not _MSC_VER */ ++ #define G_HAVE_GROWING_STACK 0 ++ ++ #define G_GNUC_INTERNAL ++ ++ #define G_THREADS_ENABLED ++ #define G_THREADS_IMPL_WIN32 ++ typedef struct _GMutex* GStaticMutex; ++ #define G_STATIC_MUTEX_INIT NULL ++ #define g_static_mutex_get_mutex(mutex) \ ++ (g_static_mutex_get_mutex_impl_shortcut (mutex)) ++ /* This represents a system thread as used by the implementation. An ++ * alien implementaion, as loaded by g_thread_init can only count on ++ * "sizeof (gpointer)" bytes to store their info. We however need more ++ * for some of our native implementations. */ ++ typedef union _GSystemThread GSystemThread; ++ union _GSystemThread ++ { ++ #ifndef _WIN64 ++ char data[4]; ++ #else ++ char data[8]; ++ #endif ++ double dummy_double; ++ void *dummy_pointer; ++ long dummy_long; ++ }; ++ ++ #define GINT16_TO_LE(val) ((gint16) (val)) ++ #define GUINT16_TO_LE(val) ((guint16) (val)) ++ #define GINT16_TO_BE(val) ((gint16) GUINT16_SWAP_LE_BE (val)) ++ #define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val)) ++ #define GINT32_TO_LE(val) ((gint32) (val)) ++ #define GUINT32_TO_LE(val) ((guint32) (val)) ++ #define GINT32_TO_BE(val) ((gint32) GUINT32_SWAP_LE_BE (val)) ++ #define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val)) ++ #define GINT64_TO_LE(val) ((gint64) (val)) ++ #define GUINT64_TO_LE(val) ((guint64) (val)) ++ #define GINT64_TO_BE(val) ((gint64) GUINT64_SWAP_LE_BE (val)) ++ #define GUINT64_TO_BE(val) (GUINT64_SWAP_LE_BE (val)) ++ #define GLONG_TO_LE(val) ((glong) GINT32_TO_LE (val)) ++ #define GULONG_TO_LE(val) ((gulong) GUINT32_TO_LE (val)) ++ #define GLONG_TO_BE(val) ((glong) GINT32_TO_BE (val)) ++ #define GULONG_TO_BE(val) ((gulong) GUINT32_TO_BE (val)) ++ #define GINT_TO_LE(val) ((gint) GINT32_TO_LE (val)) ++ #define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val)) ++ #define GINT_TO_BE(val) ((gint) GINT32_TO_BE (val)) ++ #define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val)) ++ #define GSIZE_TO_LE(val) ((gsize) GUINT32_TO_LE (val)) ++ #define GSSIZE_TO_LE(val) ((gssize) GINT32_TO_LE (val)) ++ #define GSIZE_TO_BE(val) ((gsize) GUINT32_TO_BE (val)) ++ #define GSSIZE_TO_BE(val) ((gssize) GINT32_TO_BE (val)) ++ #define G_BYTE_ORDER G_LITTLE_ENDIAN ++ ++ #define GLIB_SYSDEF_POLLIN =1 ++ #define GLIB_SYSDEF_POLLOUT =4 ++ #define GLIB_SYSDEF_POLLPRI =2 ++ #define GLIB_SYSDEF_POLLHUP =16 ++ #define GLIB_SYSDEF_POLLERR =8 ++ #define GLIB_SYSDEF_POLLNVAL =32 ++ ++ #define G_MODULE_SUFFIX "dll" ++ ++ /* A GPid is an abstraction for a process "handle". It is *not* an ++ * abstraction for a process identifier in general. GPid is used in ++ * GLib only for descendant processes spawned with the g_spawn* ++ * functions. On POSIX there is no "process handle" concept as such, ++ * but on Windows a GPid is a handle to a process, a kind of pointer, ++ * not a process identifier. ++ */ ++ typedef void * GPid; ++ ++ #define GLIB_SYSDEF_AF_UNIX 1 ++ #define GLIB_SYSDEF_AF_INET 2 ++ #define GLIB_SYSDEF_AF_INET6 23 ++ ++ #define GLIB_SYSDEF_MSG_OOB 1 ++ #define GLIB_SYSDEF_MSG_PEEK 2 ++ #define GLIB_SYSDEF_MSG_DONTROUTE 4 ++ ++ G_END_DECLS ++ ++ #endif /* GLIBCONFIG_H */ ++ +--- misc/glib-2.28.1/gmodule/gmoduleconf.h Wed Aug 20 14:33:55 2008 ++++ misc/build/glib-2.28.1/gmodule/gmoduleconf.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,45 @@ +-dummy ++ /* GMODULE - GLIB wrapper code for dynamic module loading ++ * Copyright (C) 1998 Tim Janik ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ * Boston, MA 02111-1307, USA. ++ */ ++ #ifndef __G_MODULE_CONF_H__ ++ #define __G_MODULE_CONF_H__ ++ ++ ++ #ifdef __cplusplus ++ extern "C" { ++ #endif /* __cplusplus */ ++ ++ ++ #define G_MODULE_IMPL_NONE 0 ++ #define G_MODULE_IMPL_DL 1 ++ #define G_MODULE_IMPL_DLD 2 ++ #define G_MODULE_IMPL_WIN32 3 ++ #define G_MODULE_IMPL_OS2 4 ++ #define G_MODULE_IMPL_BEOS 5 ++ #define G_MODULE_IMPL_DYLD 6 ++ ++ #define G_MODULE_IMPL G_MODULE_IMPL_WIN32 ++ #undef G_MODULE_HAVE_DLERROR ++ ++ #ifdef __cplusplus ++ } ++ #endif /* __cplusplus */ ++ ++ ++ #endif /* __G_MODULE_CONF_H__ */ ++ +--- misc/glib-2.28.1/config.h Wed Aug 20 14:33:55 2008 ++++ misc/build/glib-2.28.1/config.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,834 @@ +-dummy ++ /* config.h.win32.in Merged from two versions generated by configure for gcc and MSVC. */ ++ /* config.h. Generated by configure. */ ++ /* config.h.in. Generated from configure.ac by autoheader. */ ++ ++ /* Define if building universal (internal helper macro) */ ++ /* #undef AC_APPLE_UNIVERSAL_BUILD */ ++ ++ /* define if asm blocks can use numeric local labels */ ++ /* #undef ASM_NUMERIC_LABELS */ ++ ++ /* poll doesn't work on devices */ ++ #define BROKEN_POLL 1 ++ ++ /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP ++ systems. This function is required for `alloca.c' support on those systems. ++ */ ++ /* #undef CRAY_STACKSEG_END */ ++ ++ /* Define to 1 if using `alloca.c'. */ ++ /* #undef C_ALLOCA */ ++ ++ /* Whether to disable memory pools */ ++ /* #undef DISABLE_MEM_POOLS */ ++ ++ /* Whether to enable GC friendliness by default */ ++ /* #undef ENABLE_GC_FRIENDLY_DEFAULT */ ++ ++ /* always defined to indicate that i18n is enabled */ ++ #define ENABLE_NLS 1 ++ ++ /* include GRegex */ ++ #define ENABLE_REGEX /**/ ++ ++ /* Define the gettext package to be used */ ++ #define GETTEXT_PACKAGE "glib20" ++ ++ /* Define to the GLIB binary age */ ++ #define GLIB_BINARY_AGE 2801 ++ ++ /* Byte contents of gmutex */ ++ /* #undef GLIB_BYTE_CONTENTS_GMUTEX */ ++ ++ /* Define to the GLIB interface age */ ++ #define GLIB_INTERFACE_AGE 1 ++ ++ /* Define the location where the catalogs will be installed */ ++ #define GLIB_LOCALE_DIR "NONE/share/locale" ++ ++ /* Define to the GLIB major version */ ++ #define GLIB_MAJOR_VERSION 2 ++ ++ /* Define to the GLIB micro version */ ++ #define GLIB_MICRO_VERSION 1 ++ ++ /* Define to the GLIB minor version */ ++ #define GLIB_MINOR_VERSION 28 ++ ++ /* The size of gmutex, as computed by sizeof. */ ++ /* #undef GLIB_SIZEOF_GMUTEX */ ++ ++ /* The size of system_thread, as computed by sizeof. */ ++ #define GLIB_SIZEOF_SYSTEM_THREAD 4 ++ ++ /* alpha atomic implementation */ ++ /* #undef G_ATOMIC_ALPHA */ ++ ++ /* arm atomic implementation */ ++ /* #undef G_ATOMIC_ARM */ ++ ++ /* cris atomic implementation */ ++ /* #undef G_ATOMIC_CRIS */ ++ ++ /* crisv32 atomic implementation */ ++ /* #undef G_ATOMIC_CRISV32 */ ++ ++ /* i486 atomic implementation */ ++ #ifndef _MSC_VER ++ #define G_ATOMIC_I486 1 ++ #endif /* _MSC_VER */ ++ ++ /* ia64 atomic implementation */ ++ /* #undef G_ATOMIC_IA64 */ ++ ++ /* powerpc atomic implementation */ ++ /* #undef G_ATOMIC_POWERPC */ ++ ++ /* s390 atomic implementation */ ++ /* #undef G_ATOMIC_S390 */ ++ ++ /* sparcv9 atomic implementation */ ++ /* #undef G_ATOMIC_SPARCV9 */ ++ ++ /* x86_64 atomic implementation */ ++ /* #undef G_ATOMIC_X86_64 */ ++ ++ /* Have inline keyword */ ++ #ifndef _MSC_VER ++ #define G_HAVE_INLINE 1 ++ #else /* _MSC_VER */ ++ /* #undef G_HAVE_INLINE */ ++ #endif /* _MSC_VER */ ++ ++ /* Have __inline keyword */ ++ #define G_HAVE___INLINE 1 ++ ++ /* Have __inline__ keyword */ ++ #if !defined(_MSC_VER) && !defined(__DMC__) ++ #define G_HAVE___INLINE__ 1 ++ #else /* _MSC_VER or __DMC__ */ ++ /* #undef G_HAVE___INLINE__ */ ++ #endif /* _MSC_VER or __DMC__ */ ++ ++ /* Source file containing theread implementation */ ++ #define G_THREAD_SOURCE "gthread-win32.c" ++ ++ /* A 'va_copy' style function */ ++ #ifndef _MSC_VER ++ #define G_VA_COPY va_copy ++ #else /* _MSC_VER */ ++ /* #undef G_VA_COPY */ ++ #endif /* _MSC_VER */ ++ ++ /* 'va_lists' cannot be copies as values */ ++ /* #undef G_VA_COPY_AS_ARRAY */ ++ ++ /* Define to 1 if you have `alloca', as a function or macro. */ ++ #define HAVE_ALLOCA 1 ++ ++ /* Define to 1 if you have and it should be used (not on Ultrix). ++ */ ++ /* #undef HAVE_ALLOCA_H */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_ARPA_NAMESER_COMPAT_H */ ++ ++ /* Define to 1 if you have the `atexit' function. */ ++ #define HAVE_ATEXIT 1 ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_ATTR_XATTR_H */ ++ ++ /* Define to 1 if you have the `bind_textdomain_codeset' function. */ ++ #define HAVE_BIND_TEXTDOMAIN_CODESET 1 ++ ++ /* Define if you have a version of the snprintf function with semantics as ++ specified by the ISO C99 standard. */ ++ /* #undef HAVE_C99_SNPRINTF */ ++ ++ /* Define if you have a version of the vsnprintf function with semantics as ++ specified by the ISO C99 standard. */ ++ /* #undef HAVE_C99_VSNPRINTF */ ++ ++ /* define to 1 if Carbon is available */ ++ /* #undef HAVE_CARBON */ ++ ++ /* Define to 1 if you have the `chown' function. */ ++ /* #undef HAVE_CHOWN */ ++ ++ /* Define to 1 if you have the `clock_gettime' function. */ ++ /* #undef HAVE_CLOCK_GETTIME */ ++ ++ /* Have nl_langinfo (CODESET) */ ++ /* #undef HAVE_CODESET */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_CRT_EXTERNS_H */ ++ ++ /* Define if dbus-1 is available */ ++ /* #undef HAVE_DBUS1 */ ++ ++ /* Define to 1 if you have the `dcgettext' function. */ ++ #define HAVE_DCGETTEXT 1 ++ ++ /* Define to 1 if you have the header file. */ ++ #ifndef _MSC_VER ++ #define HAVE_DIRENT_H 1 ++ #else ++ /* #undef HAVE_DIRENT_H */ ++ #endif ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_DLFCN_H */ ++ ++ /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ ++ /* #undef HAVE_DOPRNT */ ++ ++ /* define for working do while(0) macros */ ++ #define HAVE_DOWHILE_MACROS 1 ++ ++ /* Define to 1 if you have the `endmntent' function. */ ++ /* #undef HAVE_ENDMNTENT */ ++ ++ /* Define to 1 if you have the `endservent' function. */ ++ /* #undef HAVE_ENDSERVENT */ ++ ++ /* Define if we have FAM */ ++ /* #undef HAVE_FAM */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_FAM_H */ ++ ++ /* Define if we have FAMNoExists in fam */ ++ /* #undef HAVE_FAM_NO_EXISTS */ ++ ++ /* Define to 1 if you have the `fchmod' function. */ ++ /* #undef HAVE_FCHMOD */ ++ ++ /* Define to 1 if you have the `fchown' function. */ ++ /* #undef HAVE_FCHOWN */ ++ ++ /* Define to 1 if you have the `fdwalk' function. */ ++ /* #undef HAVE_FDWALK */ ++ ++ /* Define to 1 if you have the header file. */ ++ #define HAVE_FLOAT_H 1 ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_FSTAB_H */ ++ ++ /* Define to 1 if you have the `fsync' function. */ ++ /* #undef HAVE_FSYNC */ ++ ++ /* we have the futex(2) system call */ ++ /* #undef HAVE_FUTEX */ ++ ++ /* Define to 1 if you have the `getcwd' function. */ ++ #define HAVE_GETCWD 1 ++ ++ /* Define to 1 if you have the `getc_unlocked' function. */ ++ /* #undef HAVE_GETC_UNLOCKED */ ++ ++ /* Define to 1 if you have the `getgrgid' function. */ ++ /* #undef HAVE_GETGRGID */ ++ ++ /* Define to 1 if you have the `getmntent_r' function. */ ++ /* #undef HAVE_GETMNTENT_R */ ++ ++ /* Define to 1 if you have the `getmntinfo' function. */ ++ /* #undef HAVE_GETMNTINFO */ ++ ++ /* Define to 1 if you have the `getprotobyname_r' function. */ ++ /* #undef HAVE_GETPROTOBYNAME_R */ ++ ++ /* Define to 1 if you have the `getpwuid' function. */ ++ /* #undef HAVE_GETPWUID */ ++ ++ /* Define if the GNU gettext() function is already present or preinstalled. */ ++ #define HAVE_GETTEXT 1 ++ ++ /* Define to 1 if you have the `gmtime_r' function. */ ++ /* #undef HAVE_GMTIME_R */ ++ ++ /* define to use system printf */ ++ /* #undef HAVE_GOOD_PRINTF */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_GRP_H */ ++ ++ /* Define to 1 if you have the `hasmntopt' function. */ ++ /* #undef HAVE_HASMNTOPT */ ++ ++ /* Define to 1 if you have the `inotify_init1' function. */ ++ /* #undef HAVE_INOTIFY_INIT1 */ ++ ++ /* define to support printing 64-bit integers with format I64 */ ++ #define HAVE_INT64_AND_I64 1 ++ ++ /* Define if you have the 'intmax_t' type in or . */ ++ #ifndef _MSC_VER ++ #define HAVE_INTMAX_T 1 ++ #else /* _MSC_VER */ ++ /* #undef HAVE_INTMAX_T */ ++ #endif /* _MSC_VER */ ++ ++ /* Define to 1 if you have the header file. */ ++ #ifndef _MSC_VER ++ #define HAVE_INTTYPES_H 1 ++ #else /* _MSC_VER */ ++ /* #undef HAVE_INTTYPES_H */ ++ #endif /* _MSC_VER */ ++ ++ /* Define if exists, doesn't clash with , and ++ declares uintmax_t. */ ++ #ifndef _MSC_VER ++ #define HAVE_INTTYPES_H_WITH_UINTMAX 1 ++ #else /* _MSC_VER */ ++ /* #undef HAVE_INTTYPES_H_WITH_UINTMAX */ ++ #endif /* _MSC_VER */ ++ ++ /* Define if you have and nl_langinfo(CODESET). */ ++ /* #undef HAVE_LANGINFO_CODESET */ ++ ++ /* Define to 1 if you have the `lchmod' function. */ ++ /* #undef HAVE_LCHMOD */ ++ ++ /* Define to 1 if you have the `lchown' function. */ ++ /* #undef HAVE_LCHOWN */ ++ ++ /* Define if your file defines LC_MESSAGES. */ ++ /* #undef HAVE_LC_MESSAGES */ ++ ++ /* Define to 1 if you have the header file. */ ++ #define HAVE_LIMITS_H 1 ++ ++ /* Define to 1 if you have the `link' function. */ ++ /* #undef HAVE_LINK */ ++ ++ /* Define to 1 if you have the header file. */ ++ #define HAVE_LOCALE_H 1 ++ ++ /* Define to 1 if you have the `localtime_r' function. */ ++ /* #undef HAVE_LOCALTIME_R */ ++ ++ /* Define if you have the 'long double' type. */ ++ #define HAVE_LONG_DOUBLE 1 ++ ++ /* Define if you have the 'long long' type. */ ++ #ifndef _MSC_VER ++ #define HAVE_LONG_LONG 1 ++ #else /* _MSC_VER */ ++ /* #undef HAVE_LONG_LONG */ ++ #endif /* _MSC_VER */ ++ ++ /* define if system printf can print long long */ ++ #define HAVE_LONG_LONG_FORMAT 1 ++ ++ /* Define to 1 if you have the `lstat' function. */ ++ /* #undef HAVE_LSTAT */ ++ ++ /* Define to 1 if you have the header file. */ ++ #define HAVE_MALLOC_H 1 ++ ++ /* Define to 1 if you have the `memalign' function. */ ++ /* #undef HAVE_MEMALIGN */ ++ ++ /* Define to 1 if you have the `memmem' function. */ ++ /* #undef HAVE_MEMMEM */ ++ ++ /* Define to 1 if you have the `memmove' function. */ ++ #define HAVE_MEMMOVE 1 ++ ++ /* Define to 1 if you have the header file. */ ++ #define HAVE_MEMORY_H 1 ++ ++ /* Define to 1 if you have the `mmap' function. */ ++ /* #undef HAVE_MMAP */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_MNTENT_H */ ++ ++ /* Have a monotonic clock */ ++ /* #undef HAVE_MONOTONIC_CLOCK */ ++ ++ /* Define to 1 if you have the `nanosleep' function. */ ++ /* #undef HAVE_NANOSLEEP */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_NETDB_H */ ++ ++ /* Have non-POSIX function getgrgid_r */ ++ /* #undef HAVE_NONPOSIX_GETGRGID_R */ ++ ++ /* Have non-POSIX function getpwuid_r */ ++ /* #undef HAVE_NONPOSIX_GETPWUID_R */ ++ ++ /* Define to 1 if you have the `nsleep' function. */ ++ /* #undef HAVE_NSLEEP */ ++ ++ /* Define to 1 if you have the `on_exit' function. */ ++ /* #undef HAVE_ON_EXIT */ ++ ++ /* Define to 1 if you have the `pipe2' function. */ ++ /* #undef HAVE_PIPE2 */ ++ ++ /* Define to 1 if you have the `poll' function. */ ++ /* #undef HAVE_POLL */ ++ ++ /* Have POSIX function getgrgid_r */ ++ /* #undef HAVE_POSIX_GETGRGID_R */ ++ ++ /* Have POSIX function getpwuid_r */ ++ /* #undef HAVE_POSIX_GETPWUID_R */ ++ ++ /* Define to 1 if you have the `posix_memalign' function. */ ++ /* #undef HAVE_POSIX_MEMALIGN */ ++ ++ /* Have function pthread_attr_setstacksize */ ++ /* #undef HAVE_PTHREAD_ATTR_SETSTACKSIZE */ ++ ++ /* Define to 1 if the system has the type `ptrdiff_t'. */ ++ #define HAVE_PTRDIFF_T 1 ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_PWD_H */ ++ ++ /* Define to 1 if you have the `readlink' function. */ ++ /* #undef HAVE_READLINK */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_SCHED_H */ ++ ++ /* Define to 1 if libselinux is available */ ++ /* #undef HAVE_SELINUX */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_SELINUX_SELINUX_H */ ++ ++ /* Define to 1 if you have the `setenv' function. */ ++ /* #undef HAVE_SETENV */ ++ ++ /* Define to 1 if you have the `setlocale' function. */ ++ #define HAVE_SETLOCALE 1 ++ ++ /* Define to 1 if you have the `setmntent' function. */ ++ /* #undef HAVE_SETMNTENT */ ++ ++ /* Define to 1 if you have the `setresuid' function. */ ++ /* #undef HAVE_SETRESUID */ ++ ++ /* Define to 1 if you have the `setreuid' function. */ ++ /* #undef HAVE_SETREUID */ ++ ++ /* Define to 1 if you have the `snprintf' function. */ ++ #ifndef _MSC_VER ++ #define HAVE_SNPRINTF 1 ++ #ifdef __DMC__ ++ #define snprintf _snprintf ++ #endif ++ #else /* _MSC_VER */ ++ /* #undef HAVE_SNPRINTF */ ++ #endif /* _MSC_VER */ ++ ++ /* Define to 1 if you have the `splice' function. */ ++ /* #undef HAVE_SPLICE */ ++ ++ /* Define to 1 if you have the `statfs' function. */ ++ /* #undef HAVE_STATFS */ ++ ++ /* Define to 1 if you have the `statvfs' function. */ ++ /* #undef HAVE_STATVFS */ ++ ++ /* Define to 1 if you have the header file. */ ++ #define HAVE_STDDEF_H 1 ++ ++ /* Define to 1 if you have the header file. */ ++ #ifndef _MSC_VER ++ #define HAVE_STDINT_H 1 ++ #else /* _MSC_VER */ ++ /* #undef HAVE_STDINT_H */ ++ #endif /* _MSC_VER */ ++ ++ /* Define if exists, doesn't clash with , and declares ++ uintmax_t. */ ++ #ifndef _MSC_VER ++ #define HAVE_STDINT_H_WITH_UINTMAX 1 ++ #else /* _MSC_VER */ ++ /* #undef HAVE_STDINT_H_WITH_UINTMAX */ ++ #endif /* _MSC_VER */ ++ ++ /* Define to 1 if you have the header file. */ ++ #define HAVE_STDLIB_H 1 ++ ++ /* Define to 1 if you have the `stpcpy' function. */ ++ /* #undef HAVE_STPCPY */ ++ ++ /* Define to 1 if you have the `strcasecmp' function. */ ++ #if !defined(_MSC_VER) && !defined(__DMC__) ++ #define HAVE_STRCASECMP 1 ++ #else /* _MSC_VER or __DMC__ */ ++ /* #undef HAVE_STRCASECMP */ ++ #endif /* _MSC_VER or __DMC__ */ ++ ++ /* Define to 1 if you have the `strerror' function. */ ++ #define HAVE_STRERROR 1 ++ ++ /* Define to 1 if you have the header file. */ ++ #if !defined(_MSC_VER) && !defined(__DMC__) ++ #define HAVE_STRINGS_H 1 ++ #else /* _MSC_VER or __DMC__ */ ++ /* #undef HAVE_STRINGS_H */ ++ #endif /* _MSC_VER or __DMC__ */ ++ ++ /* Define to 1 if you have the header file. */ ++ #define HAVE_STRING_H 1 ++ ++ /* Have functions strlcpy and strlcat */ ++ /* #undef HAVE_STRLCPY */ ++ ++ /* Define to 1 if you have the `strncasecmp' function. */ ++ #if !defined(_MSC_VER) && !defined(__DMC__) ++ #define HAVE_STRNCASECMP 1 ++ #else /* _MSC_VER or __DMC__ */ ++ /* #undef HAVE_STRNCASECMP */ ++ #endif /* _MSC_VER or __DMC__ */ ++ ++ /* Define to 1 if you have the `strndup' function. */ ++ /* #undef HAVE_STRNDUP */ ++ ++ /* Define to 1 if you have the `strsignal' function. */ ++ /* #undef HAVE_STRSIGNAL */ ++ ++ /* Define to 1 if `f_bavail' is member of `struct statfs'. */ ++ /* #undef HAVE_STRUCT_STATFS_F_BAVAIL */ ++ ++ /* Define to 1 if `f_fstypename' is member of `struct statfs'. */ ++ /* #undef HAVE_STRUCT_STATFS_F_FSTYPENAME */ ++ ++ /* Define to 1 if `f_basetype' is member of `struct statvfs'. */ ++ /* #undef HAVE_STRUCT_STATVFS_F_BASETYPE */ ++ ++ /* Define to 1 if `st_atimensec' is member of `struct stat'. */ ++ /* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */ ++ ++ /* Define to 1 if `st_atim.tv_nsec' is member of `struct stat'. */ ++ /* #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC */ ++ ++ /* Define to 1 if `st_blksize' is member of `struct stat'. */ ++ /* #undef HAVE_STRUCT_STAT_ST_BLKSIZE */ ++ ++ /* Define to 1 if `st_blocks' is member of `struct stat'. */ ++ /* #undef HAVE_STRUCT_STAT_ST_BLOCKS */ ++ ++ /* Define to 1 if `st_ctimensec' is member of `struct stat'. */ ++ /* #undef HAVE_STRUCT_STAT_ST_CTIMENSEC */ ++ ++ /* Define to 1 if `st_ctim.tv_nsec' is member of `struct stat'. */ ++ /* #undef HAVE_STRUCT_STAT_ST_CTIM_TV_NSEC */ ++ ++ /* Define to 1 if `st_mtimensec' is member of `struct stat'. */ ++ /* #undef HAVE_STRUCT_STAT_ST_MTIMENSEC */ ++ ++ /* Define to 1 if `st_mtim.tv_nsec' is member of `struct stat'. */ ++ /* #undef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC */ ++ ++ /* Define to 1 if you have the `symlink' function. */ ++ /* #undef HAVE_SYMLINK */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_SYS_INOTIFY_H */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_SYS_MNTCTL_H */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_SYS_MNTTAB_H */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_SYS_MOUNT_H */ ++ ++ /* Define to 1 if you have the header file. */ ++ #if !defined(_MSC_VER) && !defined(__DMC__) ++ #define HAVE_SYS_PARAM_H 1 ++ #else /* _MSC_VER or __DMC__ */ ++ /* #undef HAVE_SYS_PARAM_H */ ++ #endif /* _MSC_VER or __DMC__ */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_SYS_POLL_H */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_SYS_PRCTL_H */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_SYS_RESOURCE_H */ ++ ++ /* found fd_set in sys/select.h */ ++ /* #undef HAVE_SYS_SELECT_H */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_SYS_STATFS_H */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_SYS_STATVFS_H */ ++ ++ /* Define to 1 if you have the header file. */ ++ #define HAVE_SYS_STAT_H 1 ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_SYS_SYSCTL_H */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_SYS_TIMES_H */ ++ ++ /* Define to 1 if you have the header file. */ ++ #ifndef _MSC_VER ++ #define HAVE_SYS_TIME_H 1 ++ #else /* _MSC_VER */ ++ /* #undef HAVE_SYS_TIME_H */ ++ #endif /* _MSC_VER */ ++ ++ /* Define to 1 if you have the header file. */ ++ #define HAVE_SYS_TYPES_H 1 ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_SYS_UIO_H */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_SYS_VFSTAB_H */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_SYS_VFS_H */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_SYS_VMOUNT_H */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_SYS_WAIT_H */ ++ ++ /* Define to 1 if you have the header file. */ ++ /* #undef HAVE_SYS_XATTR_H */ ++ ++ /* Define to 1 if you have the `timegm' function. */ ++ /* #undef HAVE_TIMEGM */ ++ ++ /* Define to 1 if you have the header file. */ ++ #ifndef _MSC_VER ++ #define HAVE_UNISTD_H 1 ++ #else /* _MSC_VER */ ++ /* #undef HAVE_UNISTD_H */ ++ #endif /* _MSC_VER */ ++ ++ /* Define if your printf function family supports positional parameters as ++ specified by Unix98. */ ++ /* #undef HAVE_UNIX98_PRINTF */ ++ ++ /* Define to 1 if you have the `unsetenv' function. */ ++ /* #undef HAVE_UNSETENV */ ++ ++ /* Define to 1 if you have the `utimes' function. */ ++ /* #undef HAVE_UTIMES */ ++ ++ /* Define to 1 if you have the `valloc' function. */ ++ /* #undef HAVE_VALLOC */ ++ ++ /* Define to 1 if you have the header file. */ ++ #if !defined(_MSC_VER) && !defined(__DMC__) ++ #define HAVE_VALUES_H 1 ++ #else /* _MSC_VER or __DMC__ */ ++ /* #undef HAVE_VALUES_H */ ++ #endif /* _MSC_VER or __DMC__ */ ++ ++ /* Define to 1 if you have the `vasprintf' function. */ ++ #define HAVE_VASPRINTF 1 ++ ++ /* Define to 1 if you have the `vprintf' function. */ ++ #define HAVE_VPRINTF 1 ++ ++ /* Define to 1 if you have the `vsnprintf' function. */ ++ #ifndef _MSC_VER ++ #define HAVE_VSNPRINTF 1 ++ #ifdef __DMC__ ++ #define vsnprintf _vsnprintf ++ #endif ++ #else /* _MSC_VER */ ++ /* #undef HAVE_VSNPRINTF */ ++ #endif /* _MSC_VER */ ++ ++ /* Define if you have the 'wchar_t' type. */ ++ #define HAVE_WCHAR_T 1 ++ ++ /* Define to 1 if you have the `wcslen' function. */ ++ #define HAVE_WCSLEN 1 ++ ++ /* Define if you have the 'wint_t' type. */ ++ #define HAVE_WINT_T 1 ++ ++ /* Have a working bcopy */ ++ /* #undef HAVE_WORKING_BCOPY */ ++ ++ /* Define to 1 if you have the header file. */ ++ #ifndef _MSC_VER ++ /* #undef HAVE_WSPIAPI_H */ ++ #else ++ #define HAVE_WSPIAPI_H 1 ++ #endif ++ ++ /* Define to 1 if xattr is available */ ++ /* #undef HAVE_XATTR */ ++ ++ /* Define to 1 if xattr API uses XATTR_NOFOLLOW */ ++ /* #undef HAVE_XATTR_NOFOLLOW */ ++ ++ /* Define to 1 if you have the `_NSGetEnviron' function. */ ++ /* #undef HAVE__NSGETENVIRON */ ++ ++ /* Define to the sub-directory in which libtool stores uninstalled libraries. ++ */ ++ #define LT_OBJDIR ".libs/" ++ ++ /* Do we cache iconv descriptors */ ++ #define NEED_ICONV_CACHE 1 ++ ++ /* didn't find fd_set */ ++ #define NO_FD_SET 1 ++ ++ /* Define to 1 if your C compiler doesn't accept -c and -o together. */ ++ /* #undef NO_MINUS_C_MINUS_O */ ++ ++ /* global 'sys_errlist' not found */ ++ #define NO_SYS_ERRLIST 1 ++ ++ /* global 'sys_siglist' not found */ ++ #define NO_SYS_SIGLIST 1 ++ ++ /* global 'sys_siglist' not declared */ ++ #define NO_SYS_SIGLIST_DECL 1 ++ ++ /* Define to the address where bug reports for this package should be sent. */ ++ #define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=glib" ++ ++ /* Define to the full name of this package. */ ++ #define PACKAGE_NAME "glib" ++ ++ /* Define to the full name and version of this package. */ ++ #define PACKAGE_STRING "glib 2.28.1" ++ ++ /* Define to the one symbol short name of this package. */ ++ #define PACKAGE_TARNAME "glib" ++ ++ /* Define to the version of this package. */ ++ #define PACKAGE_VERSION "2.28.1" ++ ++ /* Maximum POSIX RT priority */ ++ /* #undef POSIX_MAX_PRIORITY */ ++ ++ /* define if posix_memalign() can allocate any size */ ++ /* #undef POSIX_MEMALIGN_WITH_COMPLIANT_ALLOCS */ ++ ++ /* Minimum POSIX RT priority */ ++ /* #undef POSIX_MIN_PRIORITY */ ++ ++ /* The POSIX RT yield function */ ++ /* #undef POSIX_YIELD_FUNC */ ++ ++ /* whether realloc (NULL,) works */ ++ #define REALLOC_0_WORKS 1 ++ ++ /* Define if you have correct malloc prototypes */ ++ #ifndef _MSC_VER ++ #define SANE_MALLOC_PROTOS 1 ++ #else /* _MSC_VER */ ++ /* #undef SANE_MALLOC_PROTOS */ ++ #endif /* _MSC_VER */ ++ ++ /* The size of `char', as computed by sizeof. */ ++ #define SIZEOF_CHAR 1 ++ ++ /* The size of `int', as computed by sizeof. */ ++ #define SIZEOF_INT 4 ++ ++ /* The size of `long', as computed by sizeof. */ ++ #define SIZEOF_LONG 4 ++ ++ /* The size of `long long', as computed by sizeof. */ ++ #ifndef _MSC_VER ++ #define SIZEOF_LONG_LONG 8 ++ #else /* _MSC_VER */ ++ #define SIZEOF_LONG_LONG 0 ++ #endif /* _MSC_VER */ ++ ++ /* The size of `short', as computed by sizeof. */ ++ #define SIZEOF_SHORT 2 ++ ++ /* The size of `size_t', as computed by sizeof. */ ++ #define SIZEOF_SIZE_T 4 ++ ++ /* The size of `void *', as computed by sizeof. */ ++ #define SIZEOF_VOID_P 4 ++ ++ /* The size of `__int64', as computed by sizeof. */ ++ #define SIZEOF___INT64 8 ++ ++ /* If using the C implementation of alloca, define if you know the ++ direction of stack growth for your system; otherwise it will be ++ automatically deduced at runtime. ++ STACK_DIRECTION > 0 => grows toward higher addresses ++ STACK_DIRECTION < 0 => grows toward lower addresses ++ STACK_DIRECTION = 0 => direction of growth unknown */ ++ /* #undef STACK_DIRECTION */ ++ ++ /* Number of arguments to statfs() */ ++ /* #undef STATFS_ARGS */ ++ ++ /* Define to 1 if you have the ANSI C header files. */ ++ #define STDC_HEADERS 1 ++ ++ /* Using GNU libiconv */ ++ /* #undef USE_LIBICONV_GNU */ ++ ++ /* Using a native implementation of iconv in a separate library */ ++ #define USE_LIBICONV_NATIVE 1 ++ ++ /* using the system-supplied PCRE library */ ++ /* #undef USE_SYSTEM_PCRE */ ++ ++ /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most ++ significant byte first (like Motorola and SPARC, unlike Intel). */ ++ #if defined AC_APPLE_UNIVERSAL_BUILD ++ # if defined __BIG_ENDIAN__ ++ # define WORDS_BIGENDIAN 1 ++ # endif ++ #else ++ # ifndef WORDS_BIGENDIAN ++ /* # undef WORDS_BIGENDIAN */ ++ # endif ++ #endif ++ ++ /* Number of bits in a file offset, on hosts where this is settable. */ ++ /* #undef _FILE_OFFSET_BITS */ ++ ++ /* Define for large files, on AIX-style hosts. */ ++ /* #undef _LARGE_FILES */ ++ ++ /* Needed to get declarations for msg_control and msg_controllen on Solaris */ ++ /* #undef _XOPEN_SOURCE */ ++ ++ /* Needed to get declarations for msg_control and msg_controllen on Solaris */ ++ /* #undef _XOPEN_SOURCE_EXTENDED */ ++ ++ /* Needed to get declarations for msg_control and msg_controllen on Solaris */ ++ /* #undef __EXTENSIONS__ */ ++ ++ /* Define to empty if `const' does not conform to ANSI C. */ ++ /* #undef const */ ++ ++ /* Define to long or long long if and don't define. */ ++ /* #undef intmax_t */ ++ ++ /* Define to empty if the C compiler doesn't support this keyword. */ ++ /* #undef signed */ ++ ++ /* Define to `unsigned int' if does not define. */ ++ /* #undef size_t */ ++ +--- misc/glib-2.28.1/gio/gvdb/makefile.msc Wed Aug 20 14:33:55 2008 ++++ misc/build/glib-2.28.1/gio/gvdb/makefile.msc Wed Aug 20 14:26:42 2008 +@@ -1 +1,24 @@ +-dummy ++ TOP = ..\..\.. ++ ++ !INCLUDE ..\..\build\win32\make.msc ++ ++ INCLUDES = \ ++ -FImsvc_recommended_pragmas.h \ ++ -I .. -I ..\..\glib -I ..\..\gmodule -I . -I ..\.. \ ++ $(INTL_CFLAGS) \ ++ $(SOLARINC) ++ ++ DEFINES = \ ++ -DG_LOG_DOMAIN=\"GLib-GIO\" \ ++ -DGIO_MODULE_DIR=\"$(libdir)/gio/modules\" \ ++ -DGIO_COMPILATION ++ ++ OBJECTS = \ ++ gvdb-reader.obj \ ++ gvdb-builder.obj ++ ++ all : giogvdb.lib ++ ++ giogvdb.lib : $(OBJECTS) ++ lib -out:giogvdb.lib $(OBJECTS) ++ +--- misc/glib-2.28.1/gio/win32/makefile.msc Wed Aug 20 14:33:55 2008 ++++ misc/build/glib-2.28.1/gio/win32/makefile.msc Wed Aug 20 14:26:42 2008 +@@ -1 +1,27 @@ +-dummy ++ TOP = ..\..\.. ++ ++ !INCLUDE ..\..\build\win32\make.msc ++ ++ INCLUDES = \ ++ -FImsvc_recommended_pragmas.h \ ++ -I .. -I ..\..\glib -I ..\..\gmodule -I . -I ..\.. \ ++ $(INTL_CFLAGS) \ ++ $(SOLARINC) ++ ++ DEFINES = \ ++ -DG_LOG_DOMAIN=\"GLib-GIO\" \ ++ -DGIO_MODULE_DIR=\"$(libdir)/gio/modules\" \ ++ -DGIO_COMPILATION ++ ++ OBJECTS = \ ++ gwin32directorymonitor.obj \ ++ gwinhttpfile.obj \ ++ gwinhttpfileinputstream.obj \ ++ gwinhttpfileoutputstream.obj \ ++ gwinhttpvfs.obj \ ++ ++ all : giowin32.lib ++ ++ giowin32.lib : $(OBJECTS) ++ lib -out:giowin32.lib $(OBJECTS) ++ diff --git a/glib/makefile.mk b/glib/makefile.mk index eefa00315007..e26b2f4039ae 100644 --- a/glib/makefile.mk +++ b/glib/makefile.mk @@ -47,8 +47,9 @@ GLIBVERSION=2.28.1 TARFILE_NAME=$(PRJNAME)-$(GLIBVERSION) TARFILE_MD5=9f6e85e1e38490c3956f4415bcd33e6e -PATCH_FILES=glib-2.28.1.patch +.IF "$(OS)"=="MACOSX" +PATCH_FILES=glib-2.28.1.patch CONFIGURE_LDFLAGS="-L$(SOLARLIBDIR)" CONFIGURE_DIR= CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) \ @@ -64,7 +65,6 @@ BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) $(GNUMAKE) BUILD_DIR=$(CONFIGURE_DIR) -.IF "$(OS)"=="MACOSX" EXTRPATH=LOADER OUT2LIB+=gio/.libs/libgio-2.0.0.dylib OUT2LIB+=glib/.libs/libglib-2.0.0.dylib @@ -284,6 +284,15 @@ OUT2INC+=gobject/gtype.h OUT2INC+=gobject/gvaluearray.h .ELIF "$(OS)"=="WNT" +PATCH_FILES=glib-2.28.1-win32.patch +CONFIGURE_ACTION= +ADDITIONAL_FILES= config.h \ + gio/gvdb/makefile.msc \ + gio/win32/makefile.msc \ + glib/glibconfig.h \ + gmodule/gmoduleconf.h + +BUILD_ACTION=nmake -f makefile.msc .ELSE .ENDIF -- cgit v1.2.3 From aee0eef2964f2dc87d73d3af865db4579993d52b Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 7 Mar 2011 13:26:30 +0100 Subject: rsvglibs: add missing source file, create appropriate lib target --- libjpeg/jpeg-8c.patch | 137 +++++++++++++++++++++++++------------------------- libjpeg/prj/d.lst | 2 +- 2 files changed, 70 insertions(+), 69 deletions(-) diff --git a/libjpeg/jpeg-8c.patch b/libjpeg/jpeg-8c.patch index 216608d6e50e..76c8d30c5732 100644 --- a/libjpeg/jpeg-8c.patch +++ b/libjpeg/jpeg-8c.patch @@ -1,6 +1,68 @@ ---- misc/jpeg-8c/makefile.mk 2011-03-06 23:04:22.985821034 +0100 -+++ misc/build/jpeg-8c/makefile.mk 2011-03-06 23:03:28.424821116 +0100 -@@ -1 +1,76 @@ +--- misc/jpeg-8c/jconfig.h 2011-03-07 13:16:09.000000000 +0100 ++++ misc/build/jpeg-8c/jconfig.h 2011-03-07 13:15:03.000000000 +0100 +@@ -1 +1,58 @@ +-dummy ++/* jconfig.h. Generated from jconfig.cfg by configure. */ ++/* jconfig.cfg --- source file edited by configure script */ ++/* see jconfig.txt for explanations */ ++ ++#define HAVE_PROTOTYPES 1 ++#define HAVE_UNSIGNED_CHAR 1 ++#define HAVE_UNSIGNED_SHORT 1 ++/* #undef void */ ++/* #undef const */ ++/* #undef CHAR_IS_UNSIGNED */ ++#define HAVE_STDDEF_H 1 ++#define HAVE_STDLIB_H 1 ++#define HAVE_LOCALE_H 1 ++/* #undef NEED_BSD_STRINGS */ ++/* #undef NEED_SYS_TYPES_H */ ++/* #undef NEED_FAR_POINTERS */ ++/* #undef NEED_SHORT_EXTERNAL_NAMES */ ++/* Define this if you get warnings about undefined structures. */ ++/* #undef INCOMPLETE_TYPES_BROKEN */ ++ ++/* Define "boolean" as unsigned char, not int, on Windows systems. */ ++#ifdef WNT ++#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ ++typedef unsigned char boolean; ++#endif ++#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ ++#endif ++ ++#ifdef JPEG_INTERNALS ++ ++/* #undef RIGHT_SHIFT_IS_UNSIGNED */ ++#ifdef WNT ++#define INLINE __inline ++#else ++#define INLINE inline ++#endif ++/* These are for configuring the JPEG memory manager. */ ++/* #undef DEFAULT_MAX_MEM */ ++/* #undef NO_MKTEMP */ ++ ++#endif /* JPEG_INTERNALS */ ++ ++#ifdef JPEG_CJPEG_DJPEG ++ ++#define BMP_SUPPORTED /* BMP image file format */ ++#define GIF_SUPPORTED /* GIF image file format */ ++#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ ++/* #undef RLE_SUPPORTED */ ++#define TARGA_SUPPORTED /* Targa image file format */ ++ ++/* #undef TWO_FILE_COMMANDLINE */ ++/* #undef NEED_SIGNAL_CATCHER */ ++/* #undef DONT_USE_B_MODE */ ++ ++/* Define this if you want percent-done progress reports from cjpeg/djpeg. */ ++/* #undef PROGRESS_REPORT */ ++ ++#endif /* JPEG_CJPEG_DJPEG */ +--- misc/jpeg-8c/makefile.mk 2011-03-07 13:16:09.000000000 +0100 ++++ misc/build/jpeg-8c/makefile.mk 2011-03-07 13:15:39.000000000 +0100 +@@ -1 +1,77 @@ -dummy +#************************************************************************* +# @@ -10,8 +72,8 @@ + +PRJ=..$/..$/..$/.. + -+PRJNAME=jpeg8 -+TARGET=jpeg8 ++PRJNAME=libjpeg ++TARGET=jpeg +LIBTARGET=NO +EXTERNAL_WARNINGS_NOT_ERRORS=TRUE +VISIBILITY_HIDDEN=TRUE @@ -70,73 +132,12 @@ + $(SLO)$/jquant1.obj \ + $(SLO)$/jquant2.obj \ + $(SLO)$/jutils.obj \ ++ $(SLO)$/jmemmgr.obj \ + $(SLO)$/jmemnobs.obj \ + $(SLO)$/jutils.obj + +LIB1TARGET=$(SLB)$/$(TARGET).lib -+LIB1ARCHIV=$(LB)$/$(TARGET).a ++LIB1ARCHIV=$(LB)$/lib$(TARGET).a +LIB1OBJFILES=$(SLOFILES) + +.INCLUDE : target.mk ---- misc/jpeg-8c/jconfig.h 2011-03-06 23:19:25.611821058 +0100 -+++ misc/build/jpeg-8c/jconfig.h 2011-03-06 23:10:22.070821059 +0100 -@@ -1 +1,58 @@ --dummy -+/* jconfig.h. Generated from jconfig.cfg by configure. */ -+/* jconfig.cfg --- source file edited by configure script */ -+/* see jconfig.txt for explanations */ -+ -+#define HAVE_PROTOTYPES 1 -+#define HAVE_UNSIGNED_CHAR 1 -+#define HAVE_UNSIGNED_SHORT 1 -+/* #undef void */ -+/* #undef const */ -+/* #undef CHAR_IS_UNSIGNED */ -+#define HAVE_STDDEF_H 1 -+#define HAVE_STDLIB_H 1 -+#define HAVE_LOCALE_H 1 -+/* #undef NEED_BSD_STRINGS */ -+/* #undef NEED_SYS_TYPES_H */ -+/* #undef NEED_FAR_POINTERS */ -+/* #undef NEED_SHORT_EXTERNAL_NAMES */ -+/* Define this if you get warnings about undefined structures. */ -+/* #undef INCOMPLETE_TYPES_BROKEN */ -+ -+/* Define "boolean" as unsigned char, not int, on Windows systems. */ -+#ifdef WNT -+#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ -+typedef unsigned char boolean; -+#endif -+#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ -+#endif -+ -+#ifdef JPEG_INTERNALS -+ -+/* #undef RIGHT_SHIFT_IS_UNSIGNED */ -+#ifdef WNT -+#define INLINE __inline -+#else -+#define INLINE inline -+#endif -+/* These are for configuring the JPEG memory manager. */ -+/* #undef DEFAULT_MAX_MEM */ -+/* #undef NO_MKTEMP */ -+ -+#endif /* JPEG_INTERNALS */ -+ -+#ifdef JPEG_CJPEG_DJPEG -+ -+#define BMP_SUPPORTED /* BMP image file format */ -+#define GIF_SUPPORTED /* GIF image file format */ -+#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -+/* #undef RLE_SUPPORTED */ -+#define TARGA_SUPPORTED /* Targa image file format */ -+ -+/* #undef TWO_FILE_COMMANDLINE */ -+/* #undef NEED_SIGNAL_CATCHER */ -+/* #undef DONT_USE_B_MODE */ -+ -+/* Define this if you want percent-done progress reports from cjpeg/djpeg. */ -+/* #undef PROGRESS_REPORT */ -+ -+#endif /* JPEG_CJPEG_DJPEG */ diff --git a/libjpeg/prj/d.lst b/libjpeg/prj/d.lst index 7306d54a5fd9..099da59797a0 100644 --- a/libjpeg/prj/d.lst +++ b/libjpeg/prj/d.lst @@ -2,7 +2,7 @@ mkdir: %_DEST%\inc%_EXT%\external mkdir: %_DEST%\inc%_EXT%\external\libjpeg ..\%__SRC%\slb\jpeg8.lib %_DEST%\lib%_EXT%\jpeg8.lib -..\%__SRC%\lib\jpeg8.a %_DEST%\lib%_EXT%\jpeg8.a +..\%__SRC%\lib\libjpeg.a %_DEST%\lib%_EXT%\libjpeg.a ..\%__SRC%\inc\jpeglib.h %_DEST%\inc%_EXT%\external\libjpeg\jpeglib.h ..\%__SRC%\inc\jconfig.h %_DEST%\inc%_EXT%\external\libjpeg\jconfig.h -- cgit v1.2.3 From dc4d513c4de6f5d8e38e623eacbe59852f48388a Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 7 Mar 2011 13:27:14 +0100 Subject: rsvglibs: add libjpeg --- gdk-pixbuf/makefile.mk | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/gdk-pixbuf/makefile.mk b/gdk-pixbuf/makefile.mk index 65cb1c276417..8e42c7787861 100644 --- a/gdk-pixbuf/makefile.mk +++ b/gdk-pixbuf/makefile.mk @@ -55,15 +55,18 @@ CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) \ BASE_DEPENDENCIES_LIBS=" " \ .$/configure \ --prefix=$(SRC_ROOT)$/$(PRJNAME)$/$(MISC) \ - CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS) -I$(SOLARINCDIR)$/external -I$(SOLARINCDIR)$/external$/glib-2.0 -I$(SOLARINCDIR)$/external$/libpng" \ + CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS) -I$(SOLARINCDIR)$/external -I$(SOLARINCDIR)$/external$/glib-2.0 -I$(SOLARINCDIR)$/external$/libpng -I$(SOLARINCDIR)$/external$/libjpeg" \ LDFLAGS="-L$(SOLARLIBDIR) -lgobject-2.0 -lgio-2.0 -lgthread-2.0 -lgmodule-2.0 -lglib-2.0 -lintl" \ --disable-glibtest \ - --without-libtiff \ - --without-libjpeg + --without-libtiff -## FIXME: libtiff, libjpeg - -CONFIGURE_FLAGS=$(eq,$(OS),MACOSX CPPFLAGS="$(EXTRA_CDEFS)" $(NULL)) +## FIXME: libtiff + +.IF "$(OS)" == "MACOSX" +CONFIGURE_FLAGS=CPPFLAGS="$(EXTRA_CDEFS) -I$(SOLARINCDIR)$/external$/libjpeg" +.ELSE +CONFIGURE_FLAGS=CPPFLAGS="-I$(SOLARINCDIR)$/external$/libjpeg" +.ENDIF BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) \ $(GNUMAKE) -- cgit v1.2.3 From 25aa5ab9470f6a41a5709e33bf37a2e8ff5e7cca Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Mon, 7 Mar 2011 14:22:10 +0100 Subject: calc66: Patch from IBM Symphony team for #i89232# and #i85305# --- sc/inc/dbcolect.hxx | 5 +-- sc/inc/document.hxx | 4 +-- sc/inc/table.hxx | 3 +- sc/source/core/data/documen3.cxx | 24 +++++++++++++- sc/source/core/data/table2.cxx | 16 +++++++++- sc/source/core/data/table4.cxx | 68 +++++++++++++++++++++++++++++++++------- sc/source/core/tool/dbcolect.cxx | 23 +++++++++++++- sc/source/ui/view/gridwin.cxx | 3 +- 8 files changed, 125 insertions(+), 21 deletions(-) diff --git a/sc/inc/dbcolect.hxx b/sc/inc/dbcolect.hxx index 2398a142ee4e..32eeb2d65353 100644 --- a/sc/inc/dbcolect.hxx +++ b/sc/inc/dbcolect.hxx @@ -2,7 +2,7 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2000, 2011 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * @@ -44,7 +44,7 @@ class ScDocument; class ScDBData : public ScDataObject, public ScRefreshTimer { - +friend class ScDBCollection; private: // DBParam String aName; @@ -219,6 +219,7 @@ public: virtual sal_Bool IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const; ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Bool bStartOnly) const; ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const; + ScDBData* GetFilterDBAtTable(SCTAB nTab) const; sal_Bool SearchName( const String& rName, sal_uInt16& rIndex ) const; diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 9a83a49b8c5e..dc7a6445f791 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -2,7 +2,7 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2000, 2011 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * @@ -505,7 +505,7 @@ public: ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Bool bStartOnly = sal_False) const; ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const; - + ScDBData* GetFilterDBAtTable(SCTAB nTab) const; //UNUSED2008-05 ScRangeData* GetRangeAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, //UNUSED2008-05 sal_Bool bStartOnly = sal_False) const; SC_DLLPUBLIC ScRangeData* GetRangeAtBlock( const ScRange& rBlock, String* pName=NULL ) const; diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 524919da5e39..5e50d7d853ce 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -2,7 +2,7 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2000, 2011 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * @@ -683,6 +683,7 @@ public: /// @return the index of the last changed row (flags and row height, auto pagebreak is ignored). SCROW GetLastChangedRow() const; + sal_Bool IsDataFiltered() const; sal_uInt8 GetColFlags( SCCOL nCol ) const; sal_uInt8 GetRowFlags( SCROW nRow ) const; diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx index e249d7f3bf47..def8edc2d1a4 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -2,7 +2,7 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2000, 2011 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * @@ -197,6 +197,14 @@ ScDBData* ScDocument::GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nC return NULL; } +ScDBData* ScDocument::GetFilterDBAtTable(SCTAB nTab) const +{ + if (pDBCollection) + return pDBCollection->GetFilterDBAtTable(nTab); + else + return NULL; +} + ScDPCollection* ScDocument::GetDPCollection() { if (!pDPCollection) @@ -1359,6 +1367,20 @@ sal_Bool ScDocument::GetFilterEntries( SCCOL nEndCol; SCROW nEndRow; pDBData->GetArea( nAreaTab, nStartCol, nStartRow, nEndCol, nEndRow ); + + //Add for i85305 + SCCOL nTmpStartCol = nCol; + SCROW nTmpStartRow = nRow; + SCCOL nTmpEndCol = nCol; + SCROW nTmpEndRow = nRow; + GetDataArea( nTab, nTmpStartCol, nTmpStartRow, nTmpEndCol, nTmpEndRow, sal_False, false); + if (nTmpEndRow > nEndRow) + { + nEndRow = nTmpEndRow; + pDBData->SetArea(nAreaTab, nStartCol,nStartRow, nEndCol,nEndRow); + } + //End of i85305 + if (pDBData->HasHeader()) ++nStartRow; diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 3b10e51355e8..10eb5512afea 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -2,7 +2,7 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2000, 2011 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * @@ -59,6 +59,7 @@ #include "sheetevents.hxx" #include "globstr.hrc" #include "segmenttree.hxx" +#include "dbcolect.hxx" #include @@ -2772,6 +2773,19 @@ void ScTable::ShowRows(SCROW nRow1, SCROW nRow2, bool bShow) DecRecalcLevel(); } +sal_Bool ScTable::IsDataFiltered() const +{ + sal_Bool bAnyQuery = sal_False; + ScDBData* pDBData = pDocument->GetFilterDBAtTable(nTab); + if ( pDBData ) + { + ScQueryParam aParam; + pDBData->GetQueryParam( aParam ); + if ( aParam.GetEntry(0).bDoQuery ) + bAnyQuery = sal_True; + } + return bAnyQuery; +} void ScTable::SetColFlags( SCCOL nCol, sal_uInt8 nNewFlags ) { diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index 5c7c872f6c64..90284687701c 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -2,7 +2,7 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2000, 2011 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * @@ -78,6 +78,7 @@ #include "rangenam.hxx" #include "docpool.hxx" #include "progress.hxx" +#include "segmenttree.hxx" #include @@ -198,7 +199,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, rMinDigits = 0; rListData = NULL; rCmd = FILL_SIMPLE; - if ( nScFillModeMouseModifier & KEY_MOD1 ) + if (( nScFillModeMouseModifier & KEY_MOD1 )||IsDataFiltered()) //i89232 return ; // Ctrl-Taste: Copy SCCOL nAddX; @@ -567,11 +568,13 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uLong nIMin = nIStart; sal_uLong nIMax = nIEnd; PutInOrder(nIMin,nIMax); - if (bVertical) - DeleteArea(nCol1, static_cast(nIMin), nCol2, static_cast(nIMax), IDF_AUTOFILL); - else - DeleteArea(static_cast(nIMin), nRow1, static_cast(nIMax), nRow2, IDF_AUTOFILL); - + if (!IsDataFiltered()) //modify for i89232 + { + if (bVertical) + DeleteArea(nCol1, static_cast(nIMin), nCol2, static_cast(nIMax), IDF_AUTOFILL); + else + DeleteArea(static_cast(nIMin), nRow1, static_cast(nIMax), nRow2, IDF_AUTOFILL); + } sal_uLong nProgress = rProgress.GetState(); // @@ -733,7 +736,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, { sal_uLong nSource = nISrcStart; double nDelta; - if ( nScFillModeMouseModifier & KEY_MOD1 ) + if (( nScFillModeMouseModifier & KEY_MOD1 )||IsDataFiltered()) //i89232 nDelta = 0.0; else if ( bPositive ) nDelta = 1.0; @@ -750,6 +753,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScBaseCell* pSrcCell = NULL; CellType eCellType = CELLTYPE_NONE; sal_Bool bIsOrdinalSuffix = sal_False; + sal_Bool bRowFiltered = sal_False; //i89232 rInner = nIStart; while (true) // #i53728# with "for (;;)" old solaris/x86 compiler mis-optimizes @@ -775,7 +779,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ((ScStringCell*)pSrcCell)->GetString( aValue ); else ((ScEditCell*)pSrcCell)->GetString( aValue ); - if ( !(nScFillModeMouseModifier & KEY_MOD1) ) + if ( !(nScFillModeMouseModifier & KEY_MOD1) && !IsDataFiltered()) //i89232 { nCellDigits = 0; // look at each source cell individually nHeadNoneTail = lcl_DecompValueString( @@ -794,6 +798,16 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, else eCellType = CELLTYPE_NONE; } + + //Modify for i89232 + bRowFiltered = mpFilteredRows->getValue(nRow); + + if (!bRowFiltered) + { + if (IsDataFiltered()) + DeleteArea(nCol, nRow, nCol, nRow, IDF_AUTOFILL); + //End of i89232 + switch (eCellType) { case CELLTYPE_VALUE: @@ -861,7 +875,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, nSource = nISrcStart; bGetCell = sal_True; } - if ( !(nScFillModeMouseModifier & KEY_MOD1) ) + if ( !(nScFillModeMouseModifier & KEY_MOD1) && !IsDataFiltered() ) //i89232 { if ( bPositive ) nDelta += 1.0; @@ -880,6 +894,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, { --nSource; bGetCell = sal_True; + } } // Progress in der inneren Schleife nur bei teuren Zellen, @@ -978,6 +993,35 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n } else if ( eFillCmd == FILL_SIMPLE ) // Auffuellen mit Muster { + //Add for i89232 + if ((eFillDir == FILL_TO_BOTTOM)||(eFillDir == FILL_TO_TOP)) + { + long nfilteredrow = 0; + long nBegin = 0; + long nEnd = 0; + if (nEndY > nRow1) + { + nBegin = nRow2+1; + nEnd = nEndY; + } + else + { + nBegin = nEndY; + nEnd = nRow1 -1; + } + for (long nRowIndex = nBegin; nRowIndex <= nEnd; nRowIndex++) + { + sal_uInt8 nFlags = pRowFlags->GetValue(nRowIndex); + if (nFlags & CR_FILTERED) + nfilteredrow++; + } + if (nIndex >0) + nIndex = nIndex - nfilteredrow; + else + nIndex = nIndex + nfilteredrow; + } + //End of i89232 + long nPosIndex = nIndex; while ( nPosIndex < 0 ) nPosIndex += nSrcCount; @@ -1008,7 +1052,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n ((ScStringCell*)pCell)->GetString( aValue ); else ((ScEditCell*)pCell)->GetString( aValue ); - if ( !(nScFillModeMouseModifier & KEY_MOD1) ) + if ( !(nScFillModeMouseModifier & KEY_MOD1) && !IsDataFiltered() ) //i89232 { sal_Int32 nVal; sal_uInt16 nCellDigits = 0; // look at each source cell individually @@ -1029,7 +1073,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n { // dabei kann's keinen Ueberlauf geben... double nVal = ((ScValueCell*)pCell)->GetValue(); - if ( !(nScFillModeMouseModifier & KEY_MOD1) ) + if ( !(nScFillModeMouseModifier & KEY_MOD1) && !IsDataFiltered() ) //i89232 nVal += (double) nDelta; Color* pColor; diff --git a/sc/source/core/tool/dbcolect.cxx b/sc/source/core/tool/dbcolect.cxx index 800716bef3b6..baf2c3de8c2a 100644 --- a/sc/source/core/tool/dbcolect.cxx +++ b/sc/source/core/tool/dbcolect.cxx @@ -2,7 +2,7 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2000, 2011 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * @@ -753,6 +753,27 @@ ScDBData* ScDBCollection::GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCO return pNoNameData; // "unbenannt" nur zurueck, wenn sonst nichts gefunden } +ScDBData* ScDBCollection::GetFilterDBAtTable(SCTAB nTab) const +{ + ScDBData* pDataEmpty = NULL; + if (pItems) + { + for (sal_uInt16 i = 0; i < nCount; i++) + { + ScDBData* pDBTemp = (ScDBData*)pItems[i]; + if ( pDBTemp->nTable == nTab ) + { + sal_Bool bFilter = pDBTemp->HasAutoFilter() || pDBTemp->HasQueryParam(); + + if ( bFilter ) + return pDBTemp; + } + } + } + + return pDataEmpty; +} + sal_Bool ScDBCollection::SearchName( const String& rName, sal_uInt16& rIndex ) const { ScDBData aDataObj( rName, 0,0,0,0,0 ); diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index d350da754433..cdbaf764c747 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -2,7 +2,7 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2000, 2011 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * @@ -1682,6 +1682,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt ) pDoc->GetAttr( nPosX, nPosY, nTab, ATTR_MERGE_FLAG ); if (pAttr->HasAutoFilter()) { + SC_MOD()->InputEnterHandler(); //Add for i85305 if (DoAutoFilterButton(nPosX, nPosY, rMEvt)) return; } -- cgit v1.2.3 From 609e196ad264ddf039bfec245c81a0d0a3232453 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Mon, 7 Mar 2011 14:55:18 +0100 Subject: calc66: warning-free --- sc/source/core/data/table4.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index 90284687701c..ee3f134d2ac6 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -805,7 +805,8 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, if (!bRowFiltered) { if (IsDataFiltered()) - DeleteArea(nCol, nRow, nCol, nRow, IDF_AUTOFILL); + DeleteArea(static_cast(nCol), static_cast(nRow), + static_cast(nCol), static_cast(nRow), IDF_AUTOFILL); //End of i89232 switch (eCellType) -- cgit v1.2.3 From 605447bb906e0ac1888558d6e338059962ebab8b Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Tue, 8 Mar 2011 10:36:17 +0100 Subject: rsvglibs: new zlib version 1.2.5 --- zlib/makefile.mk | 6 ++--- zlib/zlib-1.2.5.patch | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 zlib/zlib-1.2.5.patch diff --git a/zlib/makefile.mk b/zlib/makefile.mk index 389a68eb9c52..6165ccc8ddbf 100644 --- a/zlib/makefile.mk +++ b/zlib/makefile.mk @@ -44,10 +44,10 @@ all: # --- Files -------------------------------------------------------- -TARFILE_NAME=zlib-1.1.4 -TARFILE_MD5=abc405d0bdd3ee22782d7aa20e440f08 +TARFILE_NAME=zlib-1.2.5 +TARFILE_MD5=c735eab2d659a96e5a594c9e8541ad63 -PATCH_FILES=zlib-1.1.4.patch +PATCH_FILES=zlib-1.2.5.patch ADDITIONAL_FILES=makefile.mk #relative to CONFIGURE_DIR diff --git a/zlib/zlib-1.2.5.patch b/zlib/zlib-1.2.5.patch new file mode 100644 index 000000000000..7021a2ca4ba0 --- /dev/null +++ b/zlib/zlib-1.2.5.patch @@ -0,0 +1,71 @@ +--- misc/zlib-1.2.5/makefile.mk Fri Mar 14 10:17:06 2008 ++++ misc/build/zlib-1.2.5/makefile.mk Fri Mar 14 10:16:56 2008 +@@ -1 +1,67 @@ +-dummy ++#************************************************************************* ++# ++# Copyright according the GNU Public License. ++# ++#************************************************************************* ++ ++PRJ=..$/..$/..$/.. ++ ++PRJNAME=zlib ++TARGET=zlib ++LIBTARGET=NO ++EXTERNAL_WARNINGS_NOT_ERRORS=TRUE ++ ++# --- Settings ----------------------------------------------------- ++ ++.INCLUDE : settings.mk ++ ++# --- Files -------------------------------------------------------- ++ ++INCEXT=contrib$/minizip ++ ++SLOFILES= $(SLO)$/adler32.obj \ ++ $(SLO)$/compress.obj \ ++ $(SLO)$/deflate.obj \ ++ $(SLO)$/crc32.obj \ ++ $(SLO)$/inffast.obj \ ++ $(SLO)$/inflate.obj \ ++ $(SLO)$/inftrees.obj \ ++ $(SLO)$/trees.obj \ ++ $(SLO)$/zutil.obj \ ++ $(SLO)$/unzip.obj \ ++ $(SLO)$/ioapi.obj ++ ++ ++LIB1TARGET=$(SLB)$/$(TARGET).lib ++LIB1ARCHIV=$(LB)$/lib$(TARGET).a ++LIB1OBJFILES=$(SLOFILES) ++ ++.IF "$(BUILD_X64)"!="" ++SLOFILES_X64= $(SLO_X64)$/adler32.obj \ ++ $(SLO_X64)$/compress.obj \ ++ $(SLO_X64)$/deflate.obj \ ++ $(SLO_X64)$/crc32.obj \ ++ $(SLO_X64)$/inffast.obj \ ++ $(SLO_X64)$/inflate.obj \ ++ $(SLO_X64)$/inftrees.obj \ ++ $(SLO_X64)$/trees.obj \ ++ $(SLO_X64)$/zutil.obj \ ++ $(SLO_X64)$/unzip.obj \ ++ $(SLO_X64)$/ioapi.obj ++ ++LIB1TARGET_X64=$(SLB_X64)$/$(TARGET).lib ++LIB1OBJFILES_X64=$(SLOFILES_X64) ++.ENDIF # "$(BUILD_X64)"!="" ++ ++ ++# --- Targets ------------------------------------------------------ ++ ++$(MISC)$/%.c : contrib$/minizip$/%.c ++ @echo ------------------------------ ++ @echo Making: $@ ++ @$(COPY) $< $@ ++ ++.INCLUDE : set_wntx64.mk ++.INCLUDE : target.mk ++.INCLUDE : tg_wntx64.mk ++ -- cgit v1.2.3 From 7bd65500828eec5062bfa74e9988771ccc0f797e Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Tue, 8 Mar 2011 15:41:52 +0100 Subject: dba34d: #i117276# mid for driver doesn't be static --- connectivity/source/drivers/jdbc/JConnection.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx index f61dc9287649..d17ad87d5e37 100644 --- a/connectivity/source/drivers/jdbc/JConnection.cxx +++ b/connectivity/source/drivers/jdbc/JConnection.cxx @@ -822,7 +822,7 @@ sal_Bool java_sql_Connection::construct(const ::rtl::OUString& url, static const char * cSignature = "(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection;"; static const char * cMethodName = "connect"; // Java-Call absetzen - static jmethodID mID = NULL; + jmethodID mID = NULL; if ( !mID ) mID = t.pEnv->GetMethodID( m_Driver_theClass, cMethodName, cSignature ); if ( mID ) -- cgit v1.2.3 From 7ef574b200155fa3d5c6acf4ad44f47fa61ebc54 Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Wed, 9 Mar 2011 09:35:36 +0100 Subject: rsvglibs: glib patch file added for windows --- glib/glib-2.28.1-win32.patch | 4799 ++++++++++++------------------------------ glib/makefile.mk | 2 + 2 files changed, 1388 insertions(+), 3413 deletions(-) diff --git a/glib/glib-2.28.1-win32.patch b/glib/glib-2.28.1-win32.patch index 6476e983d2a4..3f2e45c55a9d 100644 --- a/glib/glib-2.28.1-win32.patch +++ b/glib/glib-2.28.1-win32.patch @@ -13,6 +13,14 @@ all : dirent.lib +@@ -12,5 +12,5 @@ + lib /out:dirent.lib /nodefaultlib $(dirent_OBJECTS) + + clean:: +- del /f $(dirent_OBJECTS) +- del /f dirent.lib ++ rm /f $(dirent_OBJECTS) ++ rm /f dirent.lib --- misc/glib-2.28.1/build/win32/make.msc 2009-08-29 04:52:21.000000000 +0200 +++ misc/build/glib-2.28.1/build/win32/make.msc 2011-03-04 12:36:27.513145100 +0100 @@ -35,7 +35,7 @@ @@ -51,12 +59,12 @@ -INTL_CFLAGS = -I $(DEVTOP)\include -INTL_LIBS = $(DEVTOP)\lib\intl.lib +INTL_CFLAGS = -I $(OUTDIR)\inc\external -+INTL_LIBS = $(OUTDIR)\lib\intl.lib ++INTL_LIBS = $(OUTDIR)/lib/intl.lib !ELSE -INTL_CFLAGS = -I $(INTL) -INTL_LIBS = $(INTL)\intl.lib +INTL_CFLAGS = -I $(OUTDIR)\inc\external -+INTL_LIBS = $(OUTDIR)\lib\intl.lib ++INTL_LIBS = $(OUTDIR)/lib/intl.lib !ENDIF !IFDEF LCMS @@ -74,8 +82,8 @@ !ENDIF ################ ---- misc/glib-2.28.1/gio/gzlibcompressor.c 2011-03-07 09:13:41.313889800 +0100 -+++ misc/build/glib-2.28.1/gio/gzlibcompressor.c 2011-03-04 12:02:41.465261800 +0100 +--- misc/glib-2.28.1/gio/gzlibcompressor.c 2011-02-11 16:23:12.000000000 +0100 ++++ misc/build/glib-2.28.1/gio/gzlibcompressor.c 2011-03-07 10:33:19.559189800 +0100 @@ -25,7 +25,7 @@ #include "gzlibcompressor.h" @@ -96,7 +104,7 @@ GFileInfo *file_info; }; -@@ -73,7 +73,7 @@ +@@ -73,7 +75,7 @@ g_zlib_compressor_set_gzheader (GZlibCompressor *compressor) { /* On win32, these functions were not exported before 1.2.4 */ @@ -165,20 +173,19 @@ appinfo_sources = \ gwin32appinfo.c gwin32appinfo.h -@@ -75,6 +77,12 @@ +@@ -75,19 +77,50 @@ $(NULL) OBJECTS = \ + gaction.obj \ + gactiongroup.obj \ -+ gappinfo.obj \ + gappinfo.obj \ + gapplication.obj \ + gapplicationcommandline.obj \ + gapplicationimpl-dbus.obj \ - gappinfo.obj \ gasynchelper.obj \ gasyncinitable.obj \ -@@ -82,12 +90,38 @@ + gasyncresult.obj \ gbufferedinputstream.obj \ gbufferedoutputstream.obj \ gcancellable.obj \ @@ -217,7 +224,7 @@ gemblem.obj \ gemblemedicon.obj \ gfile.obj \ -@@ -112,20 +146,39 @@ +@@ -112,20 +145,39 @@ giomodule.obj \ gioscheduler.obj \ giostream.obj \ @@ -257,14 +264,13 @@ gsocket.obj \ gsocketaddress.obj \ gsocketaddressenumerator.obj \ -@@ -135,13 +188,23 @@ +@@ -135,13 +187,22 @@ gsocketcontrolmessage.obj \ gsocketlistener.obj \ gsocketservice.obj \ + gsocks4aproxy.obj \ + gsocks4proxy.obj \ + gsocks5proxy.obj \ -+ gsrvtarget.obj \ gsocketinputstream.obj \ gsocketoutputstream.obj \ gsrvtarget.obj \ @@ -281,7 +287,7 @@ gunionvolumemonitor.obj \ gvfs.obj \ gvolume.obj \ -@@ -156,11 +219,15 @@ +@@ -156,11 +217,15 @@ glocalfilemonitor.obj \ glocaldirectorymonitor.obj \ gwin32appinfo.obj \ @@ -298,23 +304,26 @@ libgio_2_0_la_LIBADD = \ $(top_builddir)/glib/libglib-2.0.la \ -@@ -190,13 +257,13 @@ +@@ -190,14 +255,14 @@ gio-marshal.h: gio-marshal.list $(GLIB_GEN_MARSHAL) --prefix=_gio_marshal gio-marshal.list --header >> xgen-gwmh \ - && copy /y xgen-gwmh gio-marshal.h \ +- && del xgen-gwmh xgen-gwmh~ + && $(GNUCOPY) /y xgen-gwmh gio-marshal.h \ - && del xgen-gwmh xgen-gwmh~ ++ && rm xgen-gwmh xgen-gwmh~ gio-marshal.c: gio-marshal.h echo #include "gio-marshal.h" >> xgen-gwmc \ && $(GLIB_GEN_MARSHAL) --prefix=_gio_marshal gio-marshal.list --body >> xgen-gwmc \ - && copy xgen-gwmc gio-marshal.c \ +- && del xgen-gwmc xgen-gwmc~ + && $(GNUCOPY) xgen-gwmc gio-marshal.c \ - && del xgen-gwmc xgen-gwmc~ ++ && rm xgen-gwmc xgen-gwmc~ local_sources = \ -@@ -228,7 +295,7 @@ + glocaldirectorymonitor.c \ +@@ -228,7 +293,7 @@ $(PRJ_TOP)\config.h: $(PRJ_TOP)\config.h.win32 @@ -323,7 +332,7 @@ gioenumtypes.h: $(gio_headers) gioenumtypes.h.template $(PERL) ..\gobject\glib-mkenums --template gioenumtypes.h.template $(gio_headers) > gioenumtypes.h -@@ -245,14 +312,14 @@ +@@ -245,14 +310,14 @@ RESOURCE = $(PACKAGE).res $(PACKAGE).res : $(PACKAGE).rc @@ -365,8 +374,8 @@ OBJECTS = \ --- misc/glib-2.28.1/glib/makefile.msc 2011-02-18 16:34:53.000000000 +0100 -+++ misc/build/glib-2.28.1/glib/makefile.msc 2011-03-07 09:04:26.301144900 +0100 -@@ -7,23 +7,21 @@ ++++ misc/build/glib-2.28.1/glib/makefile.msc 2011-03-07 11:41:13.874227300 +0100 +@@ -7,7 +7,7 @@ ################################################################ @@ -375,10 +384,7 @@ DEFINES = \ -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=\"GLib\" \ -DG_ENABLE_DEBUG -DPCRE_STATIC -DG_DISABLE_DEPRECATED \ -- -DDLL_EXPORT=1 -+ -DDLL_EXPORT=1 -DG_DISABLE_ASSERT - - DEPCFLAGS = -Zm400 $(INTL_CFLAGS) $(DIRENT_CFLAGS) +@@ -17,13 +17,11 @@ all : \ ..\config.h \ @@ -394,7 +400,7 @@ gnulib\gnulib.lib : -@@ -37,73 +35,83 @@ +@@ -37,37 +35,40 @@ cd .. glib_OBJECTS = \ @@ -403,122 +409,62 @@ - gatomic.obj \ - gbacktrace.obj \ - gbase64.obj \ -- gbookmarkfile.obj \ -- gcache.obj \ -- gchecksum.obj \ -- gcompletion.obj \ -- gconvert.obj \ -- gdataset.obj \ -- gdate.obj \ -- gdir.obj \ -- gerror.obj \ -- gfileutils.obj \ -- ghash.obj \ -- ghostutils.obj \ -- ghook.obj \ -- giochannel.obj \ -- giowin32.obj \ -- gpoll.obj \ -- gkeyfile.obj \ -- glist.obj \ -- gmain.obj \ -- gmappedfile.obj \ -- gmarkup.obj \ -- gmem.obj \ -- gmessages.obj \ -- gnode.obj \ -- goption.obj \ -- gpattern.obj \ -- gprimes.obj \ -- gprintf.obj \ -- gqsort.obj \ -- gqueue.obj \ -- grand.obj \ -- gregex.obj \ -- grel.obj \ -- gscanner.obj \ -- gsequence.obj \ -- gshell.obj \ -- gslice.obj \ -- gslist.obj \ -- gspawn-win32.obj \ -- gstdio.obj \ -- gstrfuncs.obj \ -- gstring.obj \ -- gtestutils.obj \ -- gthread.obj \ -- gthreadpool.obj \ -- gtimer.obj \ -- gtree.obj \ -- gunibreak.obj \ -- gunicollate.obj \ -- gunidecomp.obj \ -- guniprop.obj \ -- gurifuncs.obj \ -- gutf8.obj \ -- gutils.obj \ -- gwin32.obj \ + garray.obj \ + gasyncqueue.obj \ + gatomic.obj \ + gbacktrace.obj \ + gbase64.obj \ + gbitlock.obj \ -+ gbookmarkfile.obj \ + gbookmarkfile.obj \ + gbuffer.obj \ -+ gcache.obj \ + gcache.obj \ +- gchecksum.obj \ +- gcompletion.obj \ + gchecksum.obj \ -+ gconvert.obj \ + gconvert.obj \ + gcompletion.obj \ -+ gdataset.obj \ -+ gdate.obj \ + gdataset.obj \ + gdate.obj \ + gdatetime.obj \ -+ gdir.obj \ -+ gerror.obj \ -+ gfileutils.obj \ -+ ghash.obj \ -+ ghook.obj \ + gdir.obj \ + gerror.obj \ + gfileutils.obj \ + ghash.obj \ +- ghostutils.obj \ + ghook.obj \ + ghostutils.obj \ -+ giochannel.obj \ -+ giowin32.obj \ -+ gkeyfile.obj \ -+ glist.obj \ -+ gmain.obj \ + giochannel.obj \ + giowin32.obj \ +- gpoll.obj \ + gkeyfile.obj \ + glist.obj \ + gmain.obj \ +- gmappedfile.obj \ + gmappedfile.obj \ -+ gmarkup.obj \ -+ gmem.obj \ -+ gmessages.obj \ -+ gnode.obj \ -+ goption.obj \ -+ gpattern.obj \ + gmarkup.obj \ + gmem.obj \ + gmessages.obj \ + gnode.obj \ + goption.obj \ + gpattern.obj \ + gpoll.obj \ -+ gprimes.obj \ -+ gprintf.obj \ -+ gqsort.obj \ -+ gqueue.obj \ -+ grand.obj \ -+ gregex.obj \ -+ grel.obj \ -+ gscanner.obj \ -+ gsequence.obj \ -+ gshell.obj \ -+ gslice.obj \ -+ gslist.obj \ -+ gspawn-win32.obj \ -+ gstdio.obj \ -+ gstrfuncs.obj \ -+ gstring.obj \ -+ gtestutils.obj \ -+ gthread.obj \ -+ gthreadpool.obj \ -+ gtimer.obj \ + gprimes.obj \ + gprintf.obj \ + gqsort.obj \ +@@ -88,22 +89,29 @@ + gthread.obj \ + gthreadpool.obj \ + gtimer.obj \ + gtimezone.obj \ -+ gtree.obj \ -+ gunibreak.obj \ -+ gunicollate.obj \ -+ gunidecomp.obj \ -+ guniprop.obj \ -+ gurifuncs.obj \ + gtree.obj \ + gunibreak.obj \ + gunicollate.obj \ + gunidecomp.obj \ + guniprop.obj \ + gurifuncs.obj \ +- gutf8.obj \ +- gutils.obj \ +- gwin32.obj \ + gutf8.obj \ + gutils.obj \ + gvariant-core.obj \ @@ -569,9 +515,10 @@ ################ other stuff clean:: - del ..\config.h +- del ..\config.h - del ..\glibconfig.h -+ del glibconfig.h ++ rm ..\config.h ++ rm glibconfig.h --- misc/glib-2.28.1/glib/pcre/makefile.msc 2010-06-20 06:35:47.000000000 +0200 +++ misc/build/glib-2.28.1/glib/pcre/makefile.msc 2011-03-04 09:06:02.748049800 +0100 @@ -622,8 +569,22 @@ DEFINES = -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"GModule\" all : \ -@@ -24,10 +24,10 @@ +@@ -16,22 +16,22 @@ + gmodule_OBJECTS = \ + gmodule.obj +-gmodule.def: gmodule.symbols +- echo EXPORTS > gmodule.def +- cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DINCLUDE_INTERNAL_SYMBOLS -DALL_FILES \ +- -DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_NORETURN= \ +- -DG_GNUC_PRINTF=;G_GNUC_PRINTF gmodule.symbols >> gmodule.def +- ++gmodule.def: gmodule.symbols ++ echo EXPORTS > gmodule.def ++ cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DINCLUDE_INTERNAL_SYMBOLS -DALL_FILES \ ++ -DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_NORETURN= \ ++ -DG_GNUC_PRINTF=;G_GNUC_PRINTF gmodule.symbols >> gmodule.def ++ gmoduleconf.h: gmoduleconf.h.win32 - copy gmoduleconf.h.win32 gmoduleconf.h @@ -635,2056 +596,15 @@ libgmodule-2.0-0.dll : $(gmodule_OBJECTS) gmodule.def gmodule.res $(CC) $(CFLAGS) -LD -Fe$@ $(gmodule_OBJECTS) gmodule.res \ ---- misc/glib-2.28.1/gobject/gmarshal.c 2011-02-18 16:35:05.000000000 +0100 -+++ misc/build/glib-2.28.1/gobject/gmarshal.c 2011-03-04 11:05:16.120199300 +0100 -@@ -1,835 +1,835 @@ -- -- --#ifdef G_ENABLE_DEBUG --#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) --#define g_marshal_value_peek_char(v) g_value_get_char (v) --#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) --#define g_marshal_value_peek_int(v) g_value_get_int (v) --#define g_marshal_value_peek_uint(v) g_value_get_uint (v) --#define g_marshal_value_peek_long(v) g_value_get_long (v) --#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) --#define g_marshal_value_peek_int64(v) g_value_get_int64 (v) --#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) --#define g_marshal_value_peek_enum(v) g_value_get_enum (v) --#define g_marshal_value_peek_flags(v) g_value_get_flags (v) --#define g_marshal_value_peek_float(v) g_value_get_float (v) --#define g_marshal_value_peek_double(v) g_value_get_double (v) --#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) --#define g_marshal_value_peek_param(v) g_value_get_param (v) --#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) --#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) --#define g_marshal_value_peek_object(v) g_value_get_object (v) --#define g_marshal_value_peek_variant(v) g_value_get_variant (v) --#else /* !G_ENABLE_DEBUG */ --/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. -- * Do not access GValues directly in your code. Instead, use the -- * g_value_get_*() functions -- */ --#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int --#define g_marshal_value_peek_char(v) (v)->data[0].v_int --#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint --#define g_marshal_value_peek_int(v) (v)->data[0].v_int --#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint --#define g_marshal_value_peek_long(v) (v)->data[0].v_long --#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong --#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 --#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 --#define g_marshal_value_peek_enum(v) (v)->data[0].v_long --#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong --#define g_marshal_value_peek_float(v) (v)->data[0].v_float --#define g_marshal_value_peek_double(v) (v)->data[0].v_double --#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer --#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer --#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer --#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer --#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer --#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer --#endif /* !G_ENABLE_DEBUG */ -- -- --/* VOID:VOID (./gmarshal.list:27) */ --void --g_cclosure_marshal_VOID__VOID (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef void (*GMarshalFunc_VOID__VOID) (gpointer data1, -- gpointer data2); -- register GMarshalFunc_VOID__VOID callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- -- g_return_if_fail (n_param_values == 1); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_VOID__VOID) (marshal_data ? marshal_data : cc->callback); -- -- callback (data1, -- data2); --} -- --/* VOID:BOOLEAN (./gmarshal.list:28) */ --void --g_cclosure_marshal_VOID__BOOLEAN (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef void (*GMarshalFunc_VOID__BOOLEAN) (gpointer data1, -- gboolean arg_1, -- gpointer data2); -- register GMarshalFunc_VOID__BOOLEAN callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- -- g_return_if_fail (n_param_values == 2); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_VOID__BOOLEAN) (marshal_data ? marshal_data : cc->callback); -- -- callback (data1, -- g_marshal_value_peek_boolean (param_values + 1), -- data2); --} -- --/* VOID:CHAR (./gmarshal.list:29) */ --void --g_cclosure_marshal_VOID__CHAR (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef void (*GMarshalFunc_VOID__CHAR) (gpointer data1, -- gchar arg_1, -- gpointer data2); -- register GMarshalFunc_VOID__CHAR callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- -- g_return_if_fail (n_param_values == 2); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_VOID__CHAR) (marshal_data ? marshal_data : cc->callback); -- -- callback (data1, -- g_marshal_value_peek_char (param_values + 1), -- data2); --} -- --/* VOID:UCHAR (./gmarshal.list:30) */ --void --g_cclosure_marshal_VOID__UCHAR (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef void (*GMarshalFunc_VOID__UCHAR) (gpointer data1, -- guchar arg_1, -- gpointer data2); -- register GMarshalFunc_VOID__UCHAR callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- -- g_return_if_fail (n_param_values == 2); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_VOID__UCHAR) (marshal_data ? marshal_data : cc->callback); -- -- callback (data1, -- g_marshal_value_peek_uchar (param_values + 1), -- data2); --} -- --/* VOID:INT (./gmarshal.list:31) */ --void --g_cclosure_marshal_VOID__INT (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef void (*GMarshalFunc_VOID__INT) (gpointer data1, -- gint arg_1, -- gpointer data2); -- register GMarshalFunc_VOID__INT callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- -- g_return_if_fail (n_param_values == 2); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_VOID__INT) (marshal_data ? marshal_data : cc->callback); -- -- callback (data1, -- g_marshal_value_peek_int (param_values + 1), -- data2); --} -- --/* VOID:UINT (./gmarshal.list:32) */ --void --g_cclosure_marshal_VOID__UINT (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef void (*GMarshalFunc_VOID__UINT) (gpointer data1, -- guint arg_1, -- gpointer data2); -- register GMarshalFunc_VOID__UINT callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- -- g_return_if_fail (n_param_values == 2); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_VOID__UINT) (marshal_data ? marshal_data : cc->callback); -- -- callback (data1, -- g_marshal_value_peek_uint (param_values + 1), -- data2); --} -- --/* VOID:LONG (./gmarshal.list:33) */ --void --g_cclosure_marshal_VOID__LONG (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef void (*GMarshalFunc_VOID__LONG) (gpointer data1, -- glong arg_1, -- gpointer data2); -- register GMarshalFunc_VOID__LONG callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- -- g_return_if_fail (n_param_values == 2); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_VOID__LONG) (marshal_data ? marshal_data : cc->callback); -- -- callback (data1, -- g_marshal_value_peek_long (param_values + 1), -- data2); --} -- --/* VOID:ULONG (./gmarshal.list:34) */ --void --g_cclosure_marshal_VOID__ULONG (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef void (*GMarshalFunc_VOID__ULONG) (gpointer data1, -- gulong arg_1, -- gpointer data2); -- register GMarshalFunc_VOID__ULONG callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- -- g_return_if_fail (n_param_values == 2); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_VOID__ULONG) (marshal_data ? marshal_data : cc->callback); -- -- callback (data1, -- g_marshal_value_peek_ulong (param_values + 1), -- data2); --} -- --/* VOID:ENUM (./gmarshal.list:35) */ --void --g_cclosure_marshal_VOID__ENUM (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef void (*GMarshalFunc_VOID__ENUM) (gpointer data1, -- gint arg_1, -- gpointer data2); -- register GMarshalFunc_VOID__ENUM callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- -- g_return_if_fail (n_param_values == 2); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_VOID__ENUM) (marshal_data ? marshal_data : cc->callback); -- -- callback (data1, -- g_marshal_value_peek_enum (param_values + 1), -- data2); --} -- --/* VOID:FLAGS (./gmarshal.list:36) */ --void --g_cclosure_marshal_VOID__FLAGS (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef void (*GMarshalFunc_VOID__FLAGS) (gpointer data1, -- guint arg_1, -- gpointer data2); -- register GMarshalFunc_VOID__FLAGS callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- -- g_return_if_fail (n_param_values == 2); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_VOID__FLAGS) (marshal_data ? marshal_data : cc->callback); -- -- callback (data1, -- g_marshal_value_peek_flags (param_values + 1), -- data2); --} -- --/* VOID:FLOAT (./gmarshal.list:37) */ --void --g_cclosure_marshal_VOID__FLOAT (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef void (*GMarshalFunc_VOID__FLOAT) (gpointer data1, -- gfloat arg_1, -- gpointer data2); -- register GMarshalFunc_VOID__FLOAT callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- -- g_return_if_fail (n_param_values == 2); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_VOID__FLOAT) (marshal_data ? marshal_data : cc->callback); -- -- callback (data1, -- g_marshal_value_peek_float (param_values + 1), -- data2); --} -- --/* VOID:DOUBLE (./gmarshal.list:38) */ --void --g_cclosure_marshal_VOID__DOUBLE (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef void (*GMarshalFunc_VOID__DOUBLE) (gpointer data1, -- gdouble arg_1, -- gpointer data2); -- register GMarshalFunc_VOID__DOUBLE callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- -- g_return_if_fail (n_param_values == 2); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_VOID__DOUBLE) (marshal_data ? marshal_data : cc->callback); -- -- callback (data1, -- g_marshal_value_peek_double (param_values + 1), -- data2); --} -- --/* VOID:STRING (./gmarshal.list:39) */ --void --g_cclosure_marshal_VOID__STRING (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef void (*GMarshalFunc_VOID__STRING) (gpointer data1, -- gpointer arg_1, -- gpointer data2); -- register GMarshalFunc_VOID__STRING callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- -- g_return_if_fail (n_param_values == 2); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_VOID__STRING) (marshal_data ? marshal_data : cc->callback); -- -- callback (data1, -- g_marshal_value_peek_string (param_values + 1), -- data2); --} -- --/* VOID:PARAM (./gmarshal.list:40) */ --void --g_cclosure_marshal_VOID__PARAM (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef void (*GMarshalFunc_VOID__PARAM) (gpointer data1, -- gpointer arg_1, -- gpointer data2); -- register GMarshalFunc_VOID__PARAM callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- -- g_return_if_fail (n_param_values == 2); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_VOID__PARAM) (marshal_data ? marshal_data : cc->callback); -- -- callback (data1, -- g_marshal_value_peek_param (param_values + 1), -- data2); --} -- --/* VOID:BOXED (./gmarshal.list:41) */ --void --g_cclosure_marshal_VOID__BOXED (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef void (*GMarshalFunc_VOID__BOXED) (gpointer data1, -- gpointer arg_1, -- gpointer data2); -- register GMarshalFunc_VOID__BOXED callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- -- g_return_if_fail (n_param_values == 2); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_VOID__BOXED) (marshal_data ? marshal_data : cc->callback); -- -- callback (data1, -- g_marshal_value_peek_boxed (param_values + 1), -- data2); --} -- --/* VOID:POINTER (./gmarshal.list:42) */ --void --g_cclosure_marshal_VOID__POINTER (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef void (*GMarshalFunc_VOID__POINTER) (gpointer data1, -- gpointer arg_1, -- gpointer data2); -- register GMarshalFunc_VOID__POINTER callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- -- g_return_if_fail (n_param_values == 2); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_VOID__POINTER) (marshal_data ? marshal_data : cc->callback); -- -- callback (data1, -- g_marshal_value_peek_pointer (param_values + 1), -- data2); --} -- --/* VOID:OBJECT (./gmarshal.list:43) */ --void --g_cclosure_marshal_VOID__OBJECT (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef void (*GMarshalFunc_VOID__OBJECT) (gpointer data1, -- gpointer arg_1, -- gpointer data2); -- register GMarshalFunc_VOID__OBJECT callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- -- g_return_if_fail (n_param_values == 2); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_VOID__OBJECT) (marshal_data ? marshal_data : cc->callback); -- -- callback (data1, -- g_marshal_value_peek_object (param_values + 1), -- data2); --} -- --/* VOID:VARIANT (./gmarshal.list:44) */ --void --g_cclosure_marshal_VOID__VARIANT (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef void (*GMarshalFunc_VOID__VARIANT) (gpointer data1, -- gpointer arg_1, -- gpointer data2); -- register GMarshalFunc_VOID__VARIANT callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- -- g_return_if_fail (n_param_values == 2); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_VOID__VARIANT) (marshal_data ? marshal_data : cc->callback); -- -- callback (data1, -- g_marshal_value_peek_variant (param_values + 1), -- data2); --} -- --/* VOID:UINT,POINTER (./gmarshal.list:47) */ --void --g_cclosure_marshal_VOID__UINT_POINTER (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef void (*GMarshalFunc_VOID__UINT_POINTER) (gpointer data1, -- guint arg_1, -- gpointer arg_2, -- gpointer data2); -- register GMarshalFunc_VOID__UINT_POINTER callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- -- g_return_if_fail (n_param_values == 3); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_VOID__UINT_POINTER) (marshal_data ? marshal_data : cc->callback); -- -- callback (data1, -- g_marshal_value_peek_uint (param_values + 1), -- g_marshal_value_peek_pointer (param_values + 2), -- data2); --} -- --/* BOOL:FLAGS (./gmarshal.list:48) */ --void --g_cclosure_marshal_BOOLEAN__FLAGS (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef gboolean (*GMarshalFunc_BOOLEAN__FLAGS) (gpointer data1, -- guint arg_1, -- gpointer data2); -- register GMarshalFunc_BOOLEAN__FLAGS callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- gboolean v_return; -- -- g_return_if_fail (return_value != NULL); -- g_return_if_fail (n_param_values == 2); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_BOOLEAN__FLAGS) (marshal_data ? marshal_data : cc->callback); -- -- v_return = callback (data1, -- g_marshal_value_peek_flags (param_values + 1), -- data2); -- -- g_value_set_boolean (return_value, v_return); --} -- --/* STRING:OBJECT,POINTER (./gmarshal.list:49) */ --void --g_cclosure_marshal_STRING__OBJECT_POINTER (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef gchar* (*GMarshalFunc_STRING__OBJECT_POINTER) (gpointer data1, -- gpointer arg_1, -- gpointer arg_2, -- gpointer data2); -- register GMarshalFunc_STRING__OBJECT_POINTER callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- gchar* v_return; -- -- g_return_if_fail (return_value != NULL); -- g_return_if_fail (n_param_values == 3); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_STRING__OBJECT_POINTER) (marshal_data ? marshal_data : cc->callback); -- -- v_return = callback (data1, -- g_marshal_value_peek_object (param_values + 1), -- g_marshal_value_peek_pointer (param_values + 2), -- data2); -- -- g_value_take_string (return_value, v_return); --} -- --/* BOOL:BOXED,BOXED (./gmarshal.list:50) */ --void --g_cclosure_marshal_BOOLEAN__BOXED_BOXED (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef gboolean (*GMarshalFunc_BOOLEAN__BOXED_BOXED) (gpointer data1, -- gpointer arg_1, -- gpointer arg_2, -- gpointer data2); -- register GMarshalFunc_BOOLEAN__BOXED_BOXED callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- gboolean v_return; -- -- g_return_if_fail (return_value != NULL); -- g_return_if_fail (n_param_values == 3); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_BOOLEAN__BOXED_BOXED) (marshal_data ? marshal_data : cc->callback); -- -- v_return = callback (data1, -- g_marshal_value_peek_boxed (param_values + 1), -- g_marshal_value_peek_boxed (param_values + 2), -- data2); -- -- g_value_set_boolean (return_value, v_return); --} -- -+ -+ -+#ifdef G_ENABLE_DEBUG -+#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) -+#define g_marshal_value_peek_char(v) g_value_get_char (v) -+#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) -+#define g_marshal_value_peek_int(v) g_value_get_int (v) -+#define g_marshal_value_peek_uint(v) g_value_get_uint (v) -+#define g_marshal_value_peek_long(v) g_value_get_long (v) -+#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) -+#define g_marshal_value_peek_int64(v) g_value_get_int64 (v) -+#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) -+#define g_marshal_value_peek_enum(v) g_value_get_enum (v) -+#define g_marshal_value_peek_flags(v) g_value_get_flags (v) -+#define g_marshal_value_peek_float(v) g_value_get_float (v) -+#define g_marshal_value_peek_double(v) g_value_get_double (v) -+#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) -+#define g_marshal_value_peek_param(v) g_value_get_param (v) -+#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) -+#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) -+#define g_marshal_value_peek_object(v) g_value_get_object (v) -+#define g_marshal_value_peek_variant(v) g_value_get_variant (v) -+#else /* !G_ENABLE_DEBUG */ -+/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. -+ * Do not access GValues directly in your code. Instead, use the -+ * g_value_get_*() functions -+ */ -+#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int -+#define g_marshal_value_peek_char(v) (v)->data[0].v_int -+#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint -+#define g_marshal_value_peek_int(v) (v)->data[0].v_int -+#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint -+#define g_marshal_value_peek_long(v) (v)->data[0].v_long -+#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong -+#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 -+#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 -+#define g_marshal_value_peek_enum(v) (v)->data[0].v_long -+#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong -+#define g_marshal_value_peek_float(v) (v)->data[0].v_float -+#define g_marshal_value_peek_double(v) (v)->data[0].v_double -+#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer -+#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer -+#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer -+#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer -+#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer -+#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer -+#endif /* !G_ENABLE_DEBUG */ -+ -+ -+/* VOID:VOID (gmarshal.list:27) */ -+void -+g_cclosure_marshal_VOID__VOID (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef void (*GMarshalFunc_VOID__VOID) (gpointer data1, -+ gpointer data2); -+ register GMarshalFunc_VOID__VOID callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ -+ g_return_if_fail (n_param_values == 1); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_VOID__VOID) (marshal_data ? marshal_data : cc->callback); -+ -+ callback (data1, -+ data2); -+} -+ -+/* VOID:BOOLEAN (gmarshal.list:28) */ -+void -+g_cclosure_marshal_VOID__BOOLEAN (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef void (*GMarshalFunc_VOID__BOOLEAN) (gpointer data1, -+ gboolean arg_1, -+ gpointer data2); -+ register GMarshalFunc_VOID__BOOLEAN callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ -+ g_return_if_fail (n_param_values == 2); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_VOID__BOOLEAN) (marshal_data ? marshal_data : cc->callback); -+ -+ callback (data1, -+ g_marshal_value_peek_boolean (param_values + 1), -+ data2); -+} -+ -+/* VOID:CHAR (gmarshal.list:29) */ -+void -+g_cclosure_marshal_VOID__CHAR (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef void (*GMarshalFunc_VOID__CHAR) (gpointer data1, -+ gchar arg_1, -+ gpointer data2); -+ register GMarshalFunc_VOID__CHAR callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ -+ g_return_if_fail (n_param_values == 2); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_VOID__CHAR) (marshal_data ? marshal_data : cc->callback); -+ -+ callback (data1, -+ g_marshal_value_peek_char (param_values + 1), -+ data2); -+} -+ -+/* VOID:UCHAR (gmarshal.list:30) */ -+void -+g_cclosure_marshal_VOID__UCHAR (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef void (*GMarshalFunc_VOID__UCHAR) (gpointer data1, -+ guchar arg_1, -+ gpointer data2); -+ register GMarshalFunc_VOID__UCHAR callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ -+ g_return_if_fail (n_param_values == 2); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_VOID__UCHAR) (marshal_data ? marshal_data : cc->callback); -+ -+ callback (data1, -+ g_marshal_value_peek_uchar (param_values + 1), -+ data2); -+} -+ -+/* VOID:INT (gmarshal.list:31) */ -+void -+g_cclosure_marshal_VOID__INT (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef void (*GMarshalFunc_VOID__INT) (gpointer data1, -+ gint arg_1, -+ gpointer data2); -+ register GMarshalFunc_VOID__INT callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ -+ g_return_if_fail (n_param_values == 2); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_VOID__INT) (marshal_data ? marshal_data : cc->callback); -+ -+ callback (data1, -+ g_marshal_value_peek_int (param_values + 1), -+ data2); -+} -+ -+/* VOID:UINT (gmarshal.list:32) */ -+void -+g_cclosure_marshal_VOID__UINT (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef void (*GMarshalFunc_VOID__UINT) (gpointer data1, -+ guint arg_1, -+ gpointer data2); -+ register GMarshalFunc_VOID__UINT callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ -+ g_return_if_fail (n_param_values == 2); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_VOID__UINT) (marshal_data ? marshal_data : cc->callback); -+ -+ callback (data1, -+ g_marshal_value_peek_uint (param_values + 1), -+ data2); -+} -+ -+/* VOID:LONG (gmarshal.list:33) */ -+void -+g_cclosure_marshal_VOID__LONG (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef void (*GMarshalFunc_VOID__LONG) (gpointer data1, -+ glong arg_1, -+ gpointer data2); -+ register GMarshalFunc_VOID__LONG callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ -+ g_return_if_fail (n_param_values == 2); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_VOID__LONG) (marshal_data ? marshal_data : cc->callback); -+ -+ callback (data1, -+ g_marshal_value_peek_long (param_values + 1), -+ data2); -+} -+ -+/* VOID:ULONG (gmarshal.list:34) */ -+void -+g_cclosure_marshal_VOID__ULONG (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef void (*GMarshalFunc_VOID__ULONG) (gpointer data1, -+ gulong arg_1, -+ gpointer data2); -+ register GMarshalFunc_VOID__ULONG callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ -+ g_return_if_fail (n_param_values == 2); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_VOID__ULONG) (marshal_data ? marshal_data : cc->callback); -+ -+ callback (data1, -+ g_marshal_value_peek_ulong (param_values + 1), -+ data2); -+} -+ -+/* VOID:ENUM (gmarshal.list:35) */ -+void -+g_cclosure_marshal_VOID__ENUM (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef void (*GMarshalFunc_VOID__ENUM) (gpointer data1, -+ gint arg_1, -+ gpointer data2); -+ register GMarshalFunc_VOID__ENUM callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ -+ g_return_if_fail (n_param_values == 2); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_VOID__ENUM) (marshal_data ? marshal_data : cc->callback); -+ -+ callback (data1, -+ g_marshal_value_peek_enum (param_values + 1), -+ data2); -+} -+ -+/* VOID:FLAGS (gmarshal.list:36) */ -+void -+g_cclosure_marshal_VOID__FLAGS (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef void (*GMarshalFunc_VOID__FLAGS) (gpointer data1, -+ guint arg_1, -+ gpointer data2); -+ register GMarshalFunc_VOID__FLAGS callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ -+ g_return_if_fail (n_param_values == 2); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_VOID__FLAGS) (marshal_data ? marshal_data : cc->callback); -+ -+ callback (data1, -+ g_marshal_value_peek_flags (param_values + 1), -+ data2); -+} -+ -+/* VOID:FLOAT (gmarshal.list:37) */ -+void -+g_cclosure_marshal_VOID__FLOAT (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef void (*GMarshalFunc_VOID__FLOAT) (gpointer data1, -+ gfloat arg_1, -+ gpointer data2); -+ register GMarshalFunc_VOID__FLOAT callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ -+ g_return_if_fail (n_param_values == 2); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_VOID__FLOAT) (marshal_data ? marshal_data : cc->callback); -+ -+ callback (data1, -+ g_marshal_value_peek_float (param_values + 1), -+ data2); -+} -+ -+/* VOID:DOUBLE (gmarshal.list:38) */ -+void -+g_cclosure_marshal_VOID__DOUBLE (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef void (*GMarshalFunc_VOID__DOUBLE) (gpointer data1, -+ gdouble arg_1, -+ gpointer data2); -+ register GMarshalFunc_VOID__DOUBLE callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ -+ g_return_if_fail (n_param_values == 2); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_VOID__DOUBLE) (marshal_data ? marshal_data : cc->callback); -+ -+ callback (data1, -+ g_marshal_value_peek_double (param_values + 1), -+ data2); -+} -+ -+/* VOID:STRING (gmarshal.list:39) */ -+void -+g_cclosure_marshal_VOID__STRING (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef void (*GMarshalFunc_VOID__STRING) (gpointer data1, -+ gpointer arg_1, -+ gpointer data2); -+ register GMarshalFunc_VOID__STRING callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ -+ g_return_if_fail (n_param_values == 2); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_VOID__STRING) (marshal_data ? marshal_data : cc->callback); -+ -+ callback (data1, -+ g_marshal_value_peek_string (param_values + 1), -+ data2); -+} -+ -+/* VOID:PARAM (gmarshal.list:40) */ -+void -+g_cclosure_marshal_VOID__PARAM (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef void (*GMarshalFunc_VOID__PARAM) (gpointer data1, -+ gpointer arg_1, -+ gpointer data2); -+ register GMarshalFunc_VOID__PARAM callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ -+ g_return_if_fail (n_param_values == 2); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_VOID__PARAM) (marshal_data ? marshal_data : cc->callback); -+ -+ callback (data1, -+ g_marshal_value_peek_param (param_values + 1), -+ data2); -+} -+ -+/* VOID:BOXED (gmarshal.list:41) */ -+void -+g_cclosure_marshal_VOID__BOXED (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef void (*GMarshalFunc_VOID__BOXED) (gpointer data1, -+ gpointer arg_1, -+ gpointer data2); -+ register GMarshalFunc_VOID__BOXED callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ -+ g_return_if_fail (n_param_values == 2); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_VOID__BOXED) (marshal_data ? marshal_data : cc->callback); -+ -+ callback (data1, -+ g_marshal_value_peek_boxed (param_values + 1), -+ data2); -+} -+ -+/* VOID:POINTER (gmarshal.list:42) */ -+void -+g_cclosure_marshal_VOID__POINTER (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef void (*GMarshalFunc_VOID__POINTER) (gpointer data1, -+ gpointer arg_1, -+ gpointer data2); -+ register GMarshalFunc_VOID__POINTER callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ -+ g_return_if_fail (n_param_values == 2); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_VOID__POINTER) (marshal_data ? marshal_data : cc->callback); -+ -+ callback (data1, -+ g_marshal_value_peek_pointer (param_values + 1), -+ data2); -+} -+ -+/* VOID:OBJECT (gmarshal.list:43) */ -+void -+g_cclosure_marshal_VOID__OBJECT (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef void (*GMarshalFunc_VOID__OBJECT) (gpointer data1, -+ gpointer arg_1, -+ gpointer data2); -+ register GMarshalFunc_VOID__OBJECT callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ -+ g_return_if_fail (n_param_values == 2); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_VOID__OBJECT) (marshal_data ? marshal_data : cc->callback); -+ -+ callback (data1, -+ g_marshal_value_peek_object (param_values + 1), -+ data2); -+} -+ -+/* VOID:VARIANT (gmarshal.list:44) */ -+void -+g_cclosure_marshal_VOID__VARIANT (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef void (*GMarshalFunc_VOID__VARIANT) (gpointer data1, -+ gpointer arg_1, -+ gpointer data2); -+ register GMarshalFunc_VOID__VARIANT callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ -+ g_return_if_fail (n_param_values == 2); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_VOID__VARIANT) (marshal_data ? marshal_data : cc->callback); -+ -+ callback (data1, -+ g_marshal_value_peek_variant (param_values + 1), -+ data2); -+} -+ -+/* VOID:UINT,POINTER (gmarshal.list:47) */ -+void -+g_cclosure_marshal_VOID__UINT_POINTER (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef void (*GMarshalFunc_VOID__UINT_POINTER) (gpointer data1, -+ guint arg_1, -+ gpointer arg_2, -+ gpointer data2); -+ register GMarshalFunc_VOID__UINT_POINTER callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ -+ g_return_if_fail (n_param_values == 3); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_VOID__UINT_POINTER) (marshal_data ? marshal_data : cc->callback); -+ -+ callback (data1, -+ g_marshal_value_peek_uint (param_values + 1), -+ g_marshal_value_peek_pointer (param_values + 2), -+ data2); -+} -+ -+/* BOOL:FLAGS (gmarshal.list:48) */ -+void -+g_cclosure_marshal_BOOLEAN__FLAGS (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef gboolean (*GMarshalFunc_BOOLEAN__FLAGS) (gpointer data1, -+ guint arg_1, -+ gpointer data2); -+ register GMarshalFunc_BOOLEAN__FLAGS callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ gboolean v_return; -+ -+ g_return_if_fail (return_value != NULL); -+ g_return_if_fail (n_param_values == 2); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_BOOLEAN__FLAGS) (marshal_data ? marshal_data : cc->callback); -+ -+ v_return = callback (data1, -+ g_marshal_value_peek_flags (param_values + 1), -+ data2); -+ -+ g_value_set_boolean (return_value, v_return); -+} -+ -+/* STRING:OBJECT,POINTER (gmarshal.list:49) */ -+void -+g_cclosure_marshal_STRING__OBJECT_POINTER (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef gchar* (*GMarshalFunc_STRING__OBJECT_POINTER) (gpointer data1, -+ gpointer arg_1, -+ gpointer arg_2, -+ gpointer data2); -+ register GMarshalFunc_STRING__OBJECT_POINTER callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ gchar* v_return; -+ -+ g_return_if_fail (return_value != NULL); -+ g_return_if_fail (n_param_values == 3); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_STRING__OBJECT_POINTER) (marshal_data ? marshal_data : cc->callback); -+ -+ v_return = callback (data1, -+ g_marshal_value_peek_object (param_values + 1), -+ g_marshal_value_peek_pointer (param_values + 2), -+ data2); -+ -+ g_value_take_string (return_value, v_return); -+} -+ -+/* BOOL:BOXED,BOXED (gmarshal.list:50) */ -+void -+g_cclosure_marshal_BOOLEAN__BOXED_BOXED (GClosure *closure, -+ GValue *return_value G_GNUC_UNUSED, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint G_GNUC_UNUSED, -+ gpointer marshal_data) -+{ -+ typedef gboolean (*GMarshalFunc_BOOLEAN__BOXED_BOXED) (gpointer data1, -+ gpointer arg_1, -+ gpointer arg_2, -+ gpointer data2); -+ register GMarshalFunc_BOOLEAN__BOXED_BOXED callback; -+ register GCClosure *cc = (GCClosure*) closure; -+ register gpointer data1, data2; -+ gboolean v_return; -+ -+ g_return_if_fail (return_value != NULL); -+ g_return_if_fail (n_param_values == 3); -+ -+ if (G_CCLOSURE_SWAP_DATA (closure)) -+ { -+ data1 = closure->data; -+ data2 = g_value_peek_pointer (param_values + 0); -+ } -+ else -+ { -+ data1 = g_value_peek_pointer (param_values + 0); -+ data2 = closure->data; -+ } -+ callback = (GMarshalFunc_BOOLEAN__BOXED_BOXED) (marshal_data ? marshal_data : cc->callback); -+ -+ v_return = callback (data1, -+ g_marshal_value_peek_boxed (param_values + 1), -+ g_marshal_value_peek_boxed (param_values + 2), -+ data2); -+ -+ g_value_set_boolean (return_value, v_return); -+} -+ ---- misc/glib-2.28.1/gobject/gmarshal.h 2011-02-18 16:35:05.000000000 +0100 -+++ misc/build/glib-2.28.1/gobject/gmarshal.h 2011-03-04 11:05:16.077196900 +0100 -@@ -1,186 +1,186 @@ --#ifndef __G_MARSHAL_H__ --#define __G_MARSHAL_H__ -- --G_BEGIN_DECLS -- --/* VOID:VOID (./gmarshal.list:27) */ --extern void g_cclosure_marshal_VOID__VOID (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); -- --/* VOID:BOOLEAN (./gmarshal.list:28) */ --extern void g_cclosure_marshal_VOID__BOOLEAN (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); -- --/* VOID:CHAR (./gmarshal.list:29) */ --extern void g_cclosure_marshal_VOID__CHAR (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); -- --/* VOID:UCHAR (./gmarshal.list:30) */ --extern void g_cclosure_marshal_VOID__UCHAR (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); -- --/* VOID:INT (./gmarshal.list:31) */ --extern void g_cclosure_marshal_VOID__INT (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); -- --/* VOID:UINT (./gmarshal.list:32) */ --extern void g_cclosure_marshal_VOID__UINT (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); -- --/* VOID:LONG (./gmarshal.list:33) */ --extern void g_cclosure_marshal_VOID__LONG (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); -- --/* VOID:ULONG (./gmarshal.list:34) */ --extern void g_cclosure_marshal_VOID__ULONG (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); -- --/* VOID:ENUM (./gmarshal.list:35) */ --extern void g_cclosure_marshal_VOID__ENUM (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); -- --/* VOID:FLAGS (./gmarshal.list:36) */ --extern void g_cclosure_marshal_VOID__FLAGS (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); -- --/* VOID:FLOAT (./gmarshal.list:37) */ --extern void g_cclosure_marshal_VOID__FLOAT (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); -- --/* VOID:DOUBLE (./gmarshal.list:38) */ --extern void g_cclosure_marshal_VOID__DOUBLE (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); -- --/* VOID:STRING (./gmarshal.list:39) */ --extern void g_cclosure_marshal_VOID__STRING (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); -- --/* VOID:PARAM (./gmarshal.list:40) */ --extern void g_cclosure_marshal_VOID__PARAM (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); -- --/* VOID:BOXED (./gmarshal.list:41) */ --extern void g_cclosure_marshal_VOID__BOXED (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); -- --/* VOID:POINTER (./gmarshal.list:42) */ --extern void g_cclosure_marshal_VOID__POINTER (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); -- --/* VOID:OBJECT (./gmarshal.list:43) */ --extern void g_cclosure_marshal_VOID__OBJECT (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); -- --/* VOID:VARIANT (./gmarshal.list:44) */ --extern void g_cclosure_marshal_VOID__VARIANT (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); -- --/* VOID:UINT,POINTER (./gmarshal.list:47) */ --extern void g_cclosure_marshal_VOID__UINT_POINTER (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); -- --/* BOOL:FLAGS (./gmarshal.list:48) */ --extern void g_cclosure_marshal_BOOLEAN__FLAGS (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); --#define g_cclosure_marshal_BOOL__FLAGS g_cclosure_marshal_BOOLEAN__FLAGS -- --/* STRING:OBJECT,POINTER (./gmarshal.list:49) */ --extern void g_cclosure_marshal_STRING__OBJECT_POINTER (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); -- --/* BOOL:BOXED,BOXED (./gmarshal.list:50) */ --extern void g_cclosure_marshal_BOOLEAN__BOXED_BOXED (GClosure *closure, -- GValue *return_value, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint, -- gpointer marshal_data); --#define g_cclosure_marshal_BOOL__BOXED_BOXED g_cclosure_marshal_BOOLEAN__BOXED_BOXED -- --G_END_DECLS -- --#endif /* __G_MARSHAL_H__ */ -+#ifndef __G_MARSHAL_H__ -+#define __G_MARSHAL_H__ -+ -+G_BEGIN_DECLS -+ -+/* VOID:VOID (gmarshal.list:27) */ -+extern void g_cclosure_marshal_VOID__VOID (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+ -+/* VOID:BOOLEAN (gmarshal.list:28) */ -+extern void g_cclosure_marshal_VOID__BOOLEAN (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+ -+/* VOID:CHAR (gmarshal.list:29) */ -+extern void g_cclosure_marshal_VOID__CHAR (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+ -+/* VOID:UCHAR (gmarshal.list:30) */ -+extern void g_cclosure_marshal_VOID__UCHAR (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+ -+/* VOID:INT (gmarshal.list:31) */ -+extern void g_cclosure_marshal_VOID__INT (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+ -+/* VOID:UINT (gmarshal.list:32) */ -+extern void g_cclosure_marshal_VOID__UINT (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+ -+/* VOID:LONG (gmarshal.list:33) */ -+extern void g_cclosure_marshal_VOID__LONG (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+ -+/* VOID:ULONG (gmarshal.list:34) */ -+extern void g_cclosure_marshal_VOID__ULONG (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+ -+/* VOID:ENUM (gmarshal.list:35) */ -+extern void g_cclosure_marshal_VOID__ENUM (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+ -+/* VOID:FLAGS (gmarshal.list:36) */ -+extern void g_cclosure_marshal_VOID__FLAGS (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+ -+/* VOID:FLOAT (gmarshal.list:37) */ -+extern void g_cclosure_marshal_VOID__FLOAT (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+ -+/* VOID:DOUBLE (gmarshal.list:38) */ -+extern void g_cclosure_marshal_VOID__DOUBLE (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+ -+/* VOID:STRING (gmarshal.list:39) */ -+extern void g_cclosure_marshal_VOID__STRING (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+ -+/* VOID:PARAM (gmarshal.list:40) */ -+extern void g_cclosure_marshal_VOID__PARAM (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+ -+/* VOID:BOXED (gmarshal.list:41) */ -+extern void g_cclosure_marshal_VOID__BOXED (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+ -+/* VOID:POINTER (gmarshal.list:42) */ -+extern void g_cclosure_marshal_VOID__POINTER (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+ -+/* VOID:OBJECT (gmarshal.list:43) */ -+extern void g_cclosure_marshal_VOID__OBJECT (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+ -+/* VOID:VARIANT (gmarshal.list:44) */ -+extern void g_cclosure_marshal_VOID__VARIANT (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+ -+/* VOID:UINT,POINTER (gmarshal.list:47) */ -+extern void g_cclosure_marshal_VOID__UINT_POINTER (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+ -+/* BOOL:FLAGS (gmarshal.list:48) */ -+extern void g_cclosure_marshal_BOOLEAN__FLAGS (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+#define g_cclosure_marshal_BOOL__FLAGS g_cclosure_marshal_BOOLEAN__FLAGS -+ -+/* STRING:OBJECT,POINTER (gmarshal.list:49) */ -+extern void g_cclosure_marshal_STRING__OBJECT_POINTER (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+ -+/* BOOL:BOXED,BOXED (gmarshal.list:50) */ -+extern void g_cclosure_marshal_BOOLEAN__BOXED_BOXED (GClosure *closure, -+ GValue *return_value, -+ guint n_param_values, -+ const GValue *param_values, -+ gpointer invocation_hint, -+ gpointer marshal_data); -+#define g_cclosure_marshal_BOOL__BOXED_BOXED g_cclosure_marshal_BOOLEAN__BOXED_BOXED -+ -+G_END_DECLS -+ -+#endif /* __G_MARSHAL_H__ */ + ..\glib\glib-2.0.lib $(LDFLAGS) /implib:gmodule-2.0.lib /def:gmodule.def + + clean:: +- del gmoduleconf.h ++ rm gmoduleconf.h --- misc/glib-2.28.1/gobject/makefile.msc 2011-02-18 16:35:05.000000000 +0100 +++ misc/build/glib-2.28.1/gobject/makefile.msc 2011-03-04 12:33:52.399273100 +0100 +--- misc/glib-2.28.1/gobject/makefile.msc 2011-02-18 16:35:05.000000000 +0100 ++++ misc/build/glib-2.28.1/gobject/makefile.msc 2011-03-09 09:29:52.712284300 +0100 @@ -7,7 +7,7 @@ ################################################################ @@ -2694,7 +614,15 @@ DEFINES = -DHAVE_CONFIG_H -DGOBJECT_COMPILATION -DG_LOG_DOMAIN=\"GLib-GObject\" \ -DG_ENABLE_DEBUG # -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS -@@ -24,6 +24,8 @@ +@@ -16,7 +16,6 @@ + all : \ + glib-genmarshal.exe \ + gmarshal.h \ +- gmarshal.c \ + gmarshal.strings \ + gobject-query.exe \ + libgobject-2.0-0.dll \ +@@ -24,8 +23,11 @@ testgobject.exe gobject_OBJECTS = \ @@ -2702,8 +630,11 @@ + gbinding.obj \ gboxed.obj \ gclosure.obj \ ++ gmarshal.obj \ genums.obj \ -@@ -47,14 +49,14 @@ + gobject.obj \ + gparam.obj \ +@@ -47,21 +49,18 @@ -DG_GNUC_PRINTF=;G_GNUC_PRINTF gobject.symbols >> gobject.def gobject.res : gobject.rc @@ -2716,10 +647,27 @@ glib-genmarshal --nostdinc --prefix=g_cclosure_marshal gmarshal.list --header >> xgen-gmh echo #endif /* __G_MARSHAL_H__ */ >> xgen-gmh - copy xgen-gmh gmarshal.h +- +-gmarshal.c: gmarshal.list gmarshal.h glib-genmarshal.exe +- glib-genmarshal --nostdinc --prefix=g_cclosure_marshal gmarshal.list --body > gmarshal.c + $(GNUCOPY) xgen-gmh gmarshal.h - gmarshal.c: gmarshal.list gmarshal.h glib-genmarshal.exe - glib-genmarshal --nostdinc --prefix=g_cclosure_marshal gmarshal.list --body > gmarshal.c + libgobject-2.0-0.dll : $(gobject_OBJECTS) gobject.def gobject.res + $(CC) $(CFLAGS) -Fm -LD -Fe$@ $(gobject_OBJECTS) gobject.res \ +- ..\glib\glib-2.0.lib $(LDFLAGS) /implib:gobject-2.0.lib /def:gobject.def || del $@ ++ ..\glib\glib-2.0.lib ..\gthread\gthread-2.0.lib $(LDFLAGS) /implib:gobject-2.0.lib /def:gobject.def || rm $@ + + gobject-2.28s.lib : $(gobject_OBJECTS) + lib /out:$@ $(gobject_OBJECTS) +@@ -69,7 +68,7 @@ + # link glib's static version to avoid installing + glib-genmarshal.exe : glib-genmarshal.c gmarshal.strings + $(CC) -Fe$@ $(CFLAGS) -UGOBJECT_COMPILATION glib-genmarshal.c \ +- ..\glib\glib-2.28s.lib user32.lib advapi32.lib ole32.lib shell32.lib $(INTL_LIBS) ++ ..\glib\glib-2.28s.lib user32.lib advapi32.lib ole32.lib shell32.lib $(INTL_LIBS) + + gobject-query.exe : gobject-query.c libgobject-2.0-0.dll + $(CC) -Fe$@ $(CFLAGS) -UGOBJECT_COMPILATION gobject-query.c \ --- misc/glib-2.28.1/gthread/makefile.msc 2011-02-18 16:35:00.000000000 +0100 +++ misc/build/glib-2.28.1/gthread/makefile.msc 2011-03-04 08:43:06.900355800 +0100 @@ -7,7 +7,7 @@ @@ -2773,1238 +721,1263 @@ DEFINES = -DHAVE_CONFIG_H -DENABLE_REGEX NONAUTOMATIC_TESTS = \ +@@ -79,7 +79,7 @@ + libmoduletestplugin_a.dll \ + libmoduletestplugin_b.dll + +-all : $(TESTS) $(NONAUTOMATIC_TESTS) $(DLLS) ++all : + + .c.exe : + $(CC) $(CFLAGS) -c $< --- misc/glib-2.28.1/glib/glibconfig.h Wed Aug 20 14:33:55 2008 +++ misc/build/glib-2.28.1/glib/glibconfig.h Wed Aug 20 14:26:42 2008 @@ -1 +1,285 @@ -dummy -+ /* glibconfig.h.win32.in. Originally merged from two versions of -+ * glibconfig.h, generated by the GLib configure script, for gcc and -+ * MSVC. -+ */ -+ -+ /* glibconfig.h -+ * -+ * This is a generated file. Please modify 'glibconfig.h.win32.in' -+ */ -+ -+ #ifndef __G_LIBCONFIG_H__ -+ #define __G_LIBCONFIG_H__ -+ -+ #include -+ -+ #include -+ #include -+ -+ G_BEGIN_DECLS -+ -+ #define G_MINFLOAT FLT_MIN -+ #define G_MAXFLOAT FLT_MAX -+ #define G_MINDOUBLE DBL_MIN -+ #define G_MAXDOUBLE DBL_MAX -+ #define G_MINSHORT SHRT_MIN -+ #define G_MAXSHORT SHRT_MAX -+ #define G_MAXUSHORT USHRT_MAX -+ #define G_MININT INT_MIN -+ #define G_MAXINT INT_MAX -+ #define G_MAXUINT UINT_MAX -+ #define G_MINLONG LONG_MIN -+ #define G_MAXLONG LONG_MAX -+ #define G_MAXULONG ULONG_MAX -+ -+ typedef signed char gint8; -+ typedef unsigned char guint8; -+ typedef signed short gint16; -+ typedef unsigned short guint16; -+ #define G_GINT16_MODIFIER "h" -+ #define G_GINT16_FORMAT "hi" -+ #define G_GUINT16_FORMAT "hu" -+ typedef signed int gint32; -+ typedef unsigned int guint32; -+ #define G_GINT32_MODIFIER "" -+ #define G_GINT32_FORMAT "i" -+ #define G_GUINT32_FORMAT "u" -+ #define G_HAVE_GINT64 1 /* deprecated, always true */ -+ -+ #ifndef _MSC_VER -+ G_GNUC_EXTENSION typedef signed long long gint64; -+ G_GNUC_EXTENSION typedef unsigned long long guint64; -+ #else /* _MSC_VER */ -+ typedef signed __int64 gint64; -+ typedef unsigned __int64 guint64; -+ #endif /* _MSC_VER */ -+ -+ #ifndef _MSC_VER -+ #define G_GINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##LL)) -+ #else /* _MSC_VER */ -+ #define G_GINT64_CONSTANT(val) (val##i64) -+ #endif /* _MSC_VER */ -+ #ifndef _MSC_VER -+ #define G_GUINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##ULL)) -+ #else /* _MSC_VER */ -+ #define G_GUINT64_CONSTANT(val) (val##Ui64) -+ #endif /* _MSC_VER */ -+ #define G_GINT64_MODIFIER "I64" -+ #define G_GINT64_FORMAT "I64i" -+ #define G_GUINT64_FORMAT "I64u" -+ -+ #if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64) -+ -+ #define GLIB_SIZEOF_VOID_P 8 -+ #define GLIB_SIZEOF_LONG 4 -+ #define GLIB_SIZEOF_SIZE_T 8 -+ -+ typedef signed long long gssize; -+ typedef unsigned long long gsize; -+ #define G_GSIZE_MODIFIER "I64" -+ #define G_GSSIZE_FORMAT "I64d" -+ #define G_GSIZE_FORMAT "I64u" -+ -+ #define G_MAXSIZE G_MAXUINT64 -+ #define G_MINSSIZE G_MININT64 -+ #define G_MAXSSIZE G_MAXINT64 -+ -+ #else -+ -+ #define GLIB_SIZEOF_VOID_P 4 -+ #define GLIB_SIZEOF_LONG 4 -+ #define GLIB_SIZEOF_SIZE_T 4 -+ -+ typedef signed int gssize; -+ typedef unsigned int gsize; -+ #define G_GSIZE_MODIFIER "" -+ #define G_GSSIZE_FORMAT "i" -+ #define G_GSIZE_FORMAT "u" -+ -+ #define G_MAXSIZE G_MAXUINT -+ #define G_MINSSIZE G_MININT -+ #define G_MAXSSIZE G_MAXINT -+ -+ #endif -+ -+ typedef gint64 goffset; -+ #define G_MINOFFSET G_MININT64 -+ #define G_MAXOFFSET G_MAXINT64 -+ -+ #define G_GOFFSET_MODIFIER G_GINT64_MODIFIER -+ #define G_GOFFSET_FORMAT G_GINT64_FORMAT -+ #define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val) -+ -+ -+ #ifndef _WIN64 -+ -+ #define GPOINTER_TO_INT(p) ((gint) (p)) -+ #define GPOINTER_TO_UINT(p) ((guint) (p)) -+ -+ #define GINT_TO_POINTER(i) ((gpointer) (i)) -+ #define GUINT_TO_POINTER(u) ((gpointer) (u)) -+ -+ typedef signed int gintptr; -+ typedef unsigned int guintptr; -+ -+ #define G_GINTPTR_MODIFIER "" -+ #define G_GINTPTR_FORMAT "i" -+ #define G_GUINTPTR_FORMAT "u" -+ -+ #else -+ -+ #define GPOINTER_TO_INT(p) ((gint) (gint64) (p)) -+ #define GPOINTER_TO_UINT(p) ((guint) (guint64) (p)) -+ -+ #define GINT_TO_POINTER(i) ((gpointer) (gint64) (i)) -+ #define GUINT_TO_POINTER(u) ((gpointer) (guint64) (u)) -+ -+ #ifndef _MSC_VER -+ typedef signed long long gintptr; -+ typedef unsigned long long guintptr; -+ #else -+ typedef signed __int64 gintptr; -+ typedef unsigned __int64 guintptr; -+ #endif -+ -+ #define G_GINTPTR_MODIFIER "I64" -+ #define G_GINTPTR_FORMAT "I64i" -+ #define G_GUINTPTR_FORMAT "I64u" -+ -+ #endif -+ -+ #ifdef NeXT /* @#%@! NeXTStep */ -+ # define g_ATEXIT(proc) (!atexit (proc)) -+ #else -+ # define g_ATEXIT(proc) (atexit (proc)) -+ #endif -+ -+ #define g_memmove(dest,src,len) G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END -+ -+ #define GLIB_MAJOR_VERSION 2 -+ #define GLIB_MINOR_VERSION 28 -+ #define GLIB_MICRO_VERSION 1 -+ -+ #define G_OS_WIN32 -+ #define G_PLATFORM_WIN32 -+ -+ -+ #ifndef _MSC_VER -+ #define G_VA_COPY va_copy -+ #endif /* not _MSC_VER */ -+ -+ #ifdef __cplusplus -+ #define G_HAVE_INLINE 1 -+ #else /* !__cplusplus */ -+ #ifndef _MSC_VER -+ #define G_HAVE_INLINE 1 -+ #endif /* _MSC_VER */ -+ #define G_HAVE___INLINE 1 -+ #if !defined(_MSC_VER) && !defined(__DMC__) -+ #define G_HAVE___INLINE__ 1 -+ #endif /* !_MSC_VER and !__DMC__ */ -+ #endif /* !__cplusplus */ -+ -+ #define G_CAN_INLINE 1 -+ -+ #ifndef _MSC_VER -+ #define G_HAVE_ISO_VARARGS 1 -+ -+ /* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi -+ * is passed ISO vararg support is turned off, and there is no work -+ * around to turn it on, so we unconditionally turn it off. -+ */ -+ #if __GNUC__ == 2 && __GNUC_MINOR__ == 95 -+ # undef G_HAVE_ISO_VARARGS -+ #endif -+ -+ #define G_HAVE_GNUC_VARARGS 1 -+ #else /* _MSC_VER */ -+ /* varargs macros available since msvc8 (vs2005) */ -+ # if _MSC_VER >= 1400 -+ # define G_HAVE_ISO_VARARGS 1 -+ # endif -+ #endif /* not _MSC_VER */ -+ #define G_HAVE_GROWING_STACK 0 -+ -+ #define G_GNUC_INTERNAL -+ -+ #define G_THREADS_ENABLED -+ #define G_THREADS_IMPL_WIN32 -+ typedef struct _GMutex* GStaticMutex; -+ #define G_STATIC_MUTEX_INIT NULL -+ #define g_static_mutex_get_mutex(mutex) \ -+ (g_static_mutex_get_mutex_impl_shortcut (mutex)) -+ /* This represents a system thread as used by the implementation. An -+ * alien implementaion, as loaded by g_thread_init can only count on -+ * "sizeof (gpointer)" bytes to store their info. We however need more -+ * for some of our native implementations. */ -+ typedef union _GSystemThread GSystemThread; -+ union _GSystemThread -+ { -+ #ifndef _WIN64 -+ char data[4]; -+ #else -+ char data[8]; -+ #endif -+ double dummy_double; -+ void *dummy_pointer; -+ long dummy_long; -+ }; -+ -+ #define GINT16_TO_LE(val) ((gint16) (val)) -+ #define GUINT16_TO_LE(val) ((guint16) (val)) -+ #define GINT16_TO_BE(val) ((gint16) GUINT16_SWAP_LE_BE (val)) -+ #define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val)) -+ #define GINT32_TO_LE(val) ((gint32) (val)) -+ #define GUINT32_TO_LE(val) ((guint32) (val)) -+ #define GINT32_TO_BE(val) ((gint32) GUINT32_SWAP_LE_BE (val)) -+ #define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val)) -+ #define GINT64_TO_LE(val) ((gint64) (val)) -+ #define GUINT64_TO_LE(val) ((guint64) (val)) -+ #define GINT64_TO_BE(val) ((gint64) GUINT64_SWAP_LE_BE (val)) -+ #define GUINT64_TO_BE(val) (GUINT64_SWAP_LE_BE (val)) -+ #define GLONG_TO_LE(val) ((glong) GINT32_TO_LE (val)) -+ #define GULONG_TO_LE(val) ((gulong) GUINT32_TO_LE (val)) -+ #define GLONG_TO_BE(val) ((glong) GINT32_TO_BE (val)) -+ #define GULONG_TO_BE(val) ((gulong) GUINT32_TO_BE (val)) -+ #define GINT_TO_LE(val) ((gint) GINT32_TO_LE (val)) -+ #define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val)) -+ #define GINT_TO_BE(val) ((gint) GINT32_TO_BE (val)) -+ #define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val)) -+ #define GSIZE_TO_LE(val) ((gsize) GUINT32_TO_LE (val)) -+ #define GSSIZE_TO_LE(val) ((gssize) GINT32_TO_LE (val)) -+ #define GSIZE_TO_BE(val) ((gsize) GUINT32_TO_BE (val)) -+ #define GSSIZE_TO_BE(val) ((gssize) GINT32_TO_BE (val)) -+ #define G_BYTE_ORDER G_LITTLE_ENDIAN -+ -+ #define GLIB_SYSDEF_POLLIN =1 -+ #define GLIB_SYSDEF_POLLOUT =4 -+ #define GLIB_SYSDEF_POLLPRI =2 -+ #define GLIB_SYSDEF_POLLHUP =16 -+ #define GLIB_SYSDEF_POLLERR =8 -+ #define GLIB_SYSDEF_POLLNVAL =32 -+ -+ #define G_MODULE_SUFFIX "dll" -+ -+ /* A GPid is an abstraction for a process "handle". It is *not* an -+ * abstraction for a process identifier in general. GPid is used in -+ * GLib only for descendant processes spawned with the g_spawn* -+ * functions. On POSIX there is no "process handle" concept as such, -+ * but on Windows a GPid is a handle to a process, a kind of pointer, -+ * not a process identifier. -+ */ -+ typedef void * GPid; -+ -+ #define GLIB_SYSDEF_AF_UNIX 1 -+ #define GLIB_SYSDEF_AF_INET 2 -+ #define GLIB_SYSDEF_AF_INET6 23 -+ -+ #define GLIB_SYSDEF_MSG_OOB 1 -+ #define GLIB_SYSDEF_MSG_PEEK 2 -+ #define GLIB_SYSDEF_MSG_DONTROUTE 4 -+ -+ G_END_DECLS -+ -+ #endif /* GLIBCONFIG_H */ -+ ---- misc/glib-2.28.1/gmodule/gmoduleconf.h Wed Aug 20 14:33:55 2008 -+++ misc/build/glib-2.28.1/gmodule/gmoduleconf.h Wed Aug 20 14:26:42 2008 -@@ -1 +1,45 @@ --dummy -+ /* GMODULE - GLIB wrapper code for dynamic module loading -+ * Copyright (C) 1998 Tim Janik -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the -+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, -+ * Boston, MA 02111-1307, USA. -+ */ -+ #ifndef __G_MODULE_CONF_H__ -+ #define __G_MODULE_CONF_H__ -+ -+ -+ #ifdef __cplusplus -+ extern "C" { -+ #endif /* __cplusplus */ -+ -+ -+ #define G_MODULE_IMPL_NONE 0 -+ #define G_MODULE_IMPL_DL 1 -+ #define G_MODULE_IMPL_DLD 2 -+ #define G_MODULE_IMPL_WIN32 3 -+ #define G_MODULE_IMPL_OS2 4 -+ #define G_MODULE_IMPL_BEOS 5 -+ #define G_MODULE_IMPL_DYLD 6 -+ -+ #define G_MODULE_IMPL G_MODULE_IMPL_WIN32 -+ #undef G_MODULE_HAVE_DLERROR -+ -+ #ifdef __cplusplus -+ } -+ #endif /* __cplusplus */ -+ -+ -+ #endif /* __G_MODULE_CONF_H__ */ -+ ---- misc/glib-2.28.1/config.h Wed Aug 20 14:33:55 2008 -+++ misc/build/glib-2.28.1/config.h Wed Aug 20 14:26:42 2008 -@@ -1 +1,834 @@ --dummy -+ /* config.h.win32.in Merged from two versions generated by configure for gcc and MSVC. */ -+ /* config.h. Generated by configure. */ -+ /* config.h.in. Generated from configure.ac by autoheader. */ -+ -+ /* Define if building universal (internal helper macro) */ -+ /* #undef AC_APPLE_UNIVERSAL_BUILD */ -+ -+ /* define if asm blocks can use numeric local labels */ -+ /* #undef ASM_NUMERIC_LABELS */ -+ -+ /* poll doesn't work on devices */ -+ #define BROKEN_POLL 1 -+ -+ /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP -+ systems. This function is required for `alloca.c' support on those systems. -+ */ -+ /* #undef CRAY_STACKSEG_END */ -+ -+ /* Define to 1 if using `alloca.c'. */ -+ /* #undef C_ALLOCA */ -+ -+ /* Whether to disable memory pools */ -+ /* #undef DISABLE_MEM_POOLS */ -+ -+ /* Whether to enable GC friendliness by default */ -+ /* #undef ENABLE_GC_FRIENDLY_DEFAULT */ -+ -+ /* always defined to indicate that i18n is enabled */ -+ #define ENABLE_NLS 1 -+ -+ /* include GRegex */ -+ #define ENABLE_REGEX /**/ -+ -+ /* Define the gettext package to be used */ -+ #define GETTEXT_PACKAGE "glib20" -+ -+ /* Define to the GLIB binary age */ -+ #define GLIB_BINARY_AGE 2801 -+ -+ /* Byte contents of gmutex */ -+ /* #undef GLIB_BYTE_CONTENTS_GMUTEX */ -+ -+ /* Define to the GLIB interface age */ -+ #define GLIB_INTERFACE_AGE 1 -+ -+ /* Define the location where the catalogs will be installed */ -+ #define GLIB_LOCALE_DIR "NONE/share/locale" -+ -+ /* Define to the GLIB major version */ -+ #define GLIB_MAJOR_VERSION 2 -+ -+ /* Define to the GLIB micro version */ -+ #define GLIB_MICRO_VERSION 1 -+ -+ /* Define to the GLIB minor version */ -+ #define GLIB_MINOR_VERSION 28 -+ -+ /* The size of gmutex, as computed by sizeof. */ -+ /* #undef GLIB_SIZEOF_GMUTEX */ -+ -+ /* The size of system_thread, as computed by sizeof. */ -+ #define GLIB_SIZEOF_SYSTEM_THREAD 4 -+ -+ /* alpha atomic implementation */ -+ /* #undef G_ATOMIC_ALPHA */ -+ -+ /* arm atomic implementation */ -+ /* #undef G_ATOMIC_ARM */ -+ -+ /* cris atomic implementation */ -+ /* #undef G_ATOMIC_CRIS */ -+ -+ /* crisv32 atomic implementation */ -+ /* #undef G_ATOMIC_CRISV32 */ -+ -+ /* i486 atomic implementation */ -+ #ifndef _MSC_VER -+ #define G_ATOMIC_I486 1 -+ #endif /* _MSC_VER */ -+ -+ /* ia64 atomic implementation */ -+ /* #undef G_ATOMIC_IA64 */ -+ -+ /* powerpc atomic implementation */ -+ /* #undef G_ATOMIC_POWERPC */ -+ -+ /* s390 atomic implementation */ -+ /* #undef G_ATOMIC_S390 */ -+ -+ /* sparcv9 atomic implementation */ -+ /* #undef G_ATOMIC_SPARCV9 */ -+ -+ /* x86_64 atomic implementation */ -+ /* #undef G_ATOMIC_X86_64 */ -+ -+ /* Have inline keyword */ -+ #ifndef _MSC_VER -+ #define G_HAVE_INLINE 1 -+ #else /* _MSC_VER */ -+ /* #undef G_HAVE_INLINE */ -+ #endif /* _MSC_VER */ -+ -+ /* Have __inline keyword */ -+ #define G_HAVE___INLINE 1 -+ -+ /* Have __inline__ keyword */ -+ #if !defined(_MSC_VER) && !defined(__DMC__) -+ #define G_HAVE___INLINE__ 1 -+ #else /* _MSC_VER or __DMC__ */ -+ /* #undef G_HAVE___INLINE__ */ -+ #endif /* _MSC_VER or __DMC__ */ -+ -+ /* Source file containing theread implementation */ -+ #define G_THREAD_SOURCE "gthread-win32.c" -+ -+ /* A 'va_copy' style function */ -+ #ifndef _MSC_VER -+ #define G_VA_COPY va_copy -+ #else /* _MSC_VER */ -+ /* #undef G_VA_COPY */ -+ #endif /* _MSC_VER */ -+ -+ /* 'va_lists' cannot be copies as values */ -+ /* #undef G_VA_COPY_AS_ARRAY */ -+ -+ /* Define to 1 if you have `alloca', as a function or macro. */ -+ #define HAVE_ALLOCA 1 -+ -+ /* Define to 1 if you have and it should be used (not on Ultrix). -+ */ -+ /* #undef HAVE_ALLOCA_H */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_ARPA_NAMESER_COMPAT_H */ -+ -+ /* Define to 1 if you have the `atexit' function. */ -+ #define HAVE_ATEXIT 1 -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_ATTR_XATTR_H */ -+ -+ /* Define to 1 if you have the `bind_textdomain_codeset' function. */ -+ #define HAVE_BIND_TEXTDOMAIN_CODESET 1 -+ -+ /* Define if you have a version of the snprintf function with semantics as -+ specified by the ISO C99 standard. */ -+ /* #undef HAVE_C99_SNPRINTF */ -+ -+ /* Define if you have a version of the vsnprintf function with semantics as -+ specified by the ISO C99 standard. */ -+ /* #undef HAVE_C99_VSNPRINTF */ -+ -+ /* define to 1 if Carbon is available */ -+ /* #undef HAVE_CARBON */ -+ -+ /* Define to 1 if you have the `chown' function. */ -+ /* #undef HAVE_CHOWN */ -+ -+ /* Define to 1 if you have the `clock_gettime' function. */ -+ /* #undef HAVE_CLOCK_GETTIME */ -+ -+ /* Have nl_langinfo (CODESET) */ -+ /* #undef HAVE_CODESET */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_CRT_EXTERNS_H */ -+ -+ /* Define if dbus-1 is available */ -+ /* #undef HAVE_DBUS1 */ -+ -+ /* Define to 1 if you have the `dcgettext' function. */ -+ #define HAVE_DCGETTEXT 1 -+ -+ /* Define to 1 if you have the header file. */ -+ #ifndef _MSC_VER -+ #define HAVE_DIRENT_H 1 -+ #else -+ /* #undef HAVE_DIRENT_H */ -+ #endif -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_DLFCN_H */ -+ -+ /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ -+ /* #undef HAVE_DOPRNT */ -+ -+ /* define for working do while(0) macros */ -+ #define HAVE_DOWHILE_MACROS 1 -+ -+ /* Define to 1 if you have the `endmntent' function. */ -+ /* #undef HAVE_ENDMNTENT */ -+ -+ /* Define to 1 if you have the `endservent' function. */ -+ /* #undef HAVE_ENDSERVENT */ -+ -+ /* Define if we have FAM */ -+ /* #undef HAVE_FAM */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_FAM_H */ -+ -+ /* Define if we have FAMNoExists in fam */ -+ /* #undef HAVE_FAM_NO_EXISTS */ -+ -+ /* Define to 1 if you have the `fchmod' function. */ -+ /* #undef HAVE_FCHMOD */ -+ -+ /* Define to 1 if you have the `fchown' function. */ -+ /* #undef HAVE_FCHOWN */ -+ -+ /* Define to 1 if you have the `fdwalk' function. */ -+ /* #undef HAVE_FDWALK */ -+ -+ /* Define to 1 if you have the header file. */ -+ #define HAVE_FLOAT_H 1 -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_FSTAB_H */ -+ -+ /* Define to 1 if you have the `fsync' function. */ -+ /* #undef HAVE_FSYNC */ -+ -+ /* we have the futex(2) system call */ -+ /* #undef HAVE_FUTEX */ -+ -+ /* Define to 1 if you have the `getcwd' function. */ -+ #define HAVE_GETCWD 1 -+ -+ /* Define to 1 if you have the `getc_unlocked' function. */ -+ /* #undef HAVE_GETC_UNLOCKED */ -+ -+ /* Define to 1 if you have the `getgrgid' function. */ -+ /* #undef HAVE_GETGRGID */ -+ -+ /* Define to 1 if you have the `getmntent_r' function. */ -+ /* #undef HAVE_GETMNTENT_R */ -+ -+ /* Define to 1 if you have the `getmntinfo' function. */ -+ /* #undef HAVE_GETMNTINFO */ -+ -+ /* Define to 1 if you have the `getprotobyname_r' function. */ -+ /* #undef HAVE_GETPROTOBYNAME_R */ -+ -+ /* Define to 1 if you have the `getpwuid' function. */ -+ /* #undef HAVE_GETPWUID */ -+ -+ /* Define if the GNU gettext() function is already present or preinstalled. */ -+ #define HAVE_GETTEXT 1 -+ -+ /* Define to 1 if you have the `gmtime_r' function. */ -+ /* #undef HAVE_GMTIME_R */ -+ -+ /* define to use system printf */ -+ /* #undef HAVE_GOOD_PRINTF */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_GRP_H */ -+ -+ /* Define to 1 if you have the `hasmntopt' function. */ -+ /* #undef HAVE_HASMNTOPT */ -+ -+ /* Define to 1 if you have the `inotify_init1' function. */ -+ /* #undef HAVE_INOTIFY_INIT1 */ -+ -+ /* define to support printing 64-bit integers with format I64 */ -+ #define HAVE_INT64_AND_I64 1 -+ -+ /* Define if you have the 'intmax_t' type in or . */ -+ #ifndef _MSC_VER -+ #define HAVE_INTMAX_T 1 -+ #else /* _MSC_VER */ -+ /* #undef HAVE_INTMAX_T */ -+ #endif /* _MSC_VER */ -+ -+ /* Define to 1 if you have the header file. */ -+ #ifndef _MSC_VER -+ #define HAVE_INTTYPES_H 1 -+ #else /* _MSC_VER */ -+ /* #undef HAVE_INTTYPES_H */ -+ #endif /* _MSC_VER */ -+ -+ /* Define if exists, doesn't clash with , and -+ declares uintmax_t. */ -+ #ifndef _MSC_VER -+ #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -+ #else /* _MSC_VER */ -+ /* #undef HAVE_INTTYPES_H_WITH_UINTMAX */ -+ #endif /* _MSC_VER */ -+ -+ /* Define if you have and nl_langinfo(CODESET). */ -+ /* #undef HAVE_LANGINFO_CODESET */ -+ -+ /* Define to 1 if you have the `lchmod' function. */ -+ /* #undef HAVE_LCHMOD */ -+ -+ /* Define to 1 if you have the `lchown' function. */ -+ /* #undef HAVE_LCHOWN */ -+ -+ /* Define if your file defines LC_MESSAGES. */ -+ /* #undef HAVE_LC_MESSAGES */ -+ -+ /* Define to 1 if you have the header file. */ -+ #define HAVE_LIMITS_H 1 -+ -+ /* Define to 1 if you have the `link' function. */ -+ /* #undef HAVE_LINK */ -+ -+ /* Define to 1 if you have the header file. */ -+ #define HAVE_LOCALE_H 1 -+ -+ /* Define to 1 if you have the `localtime_r' function. */ -+ /* #undef HAVE_LOCALTIME_R */ -+ -+ /* Define if you have the 'long double' type. */ -+ #define HAVE_LONG_DOUBLE 1 -+ -+ /* Define if you have the 'long long' type. */ -+ #ifndef _MSC_VER -+ #define HAVE_LONG_LONG 1 -+ #else /* _MSC_VER */ -+ /* #undef HAVE_LONG_LONG */ -+ #endif /* _MSC_VER */ -+ -+ /* define if system printf can print long long */ -+ #define HAVE_LONG_LONG_FORMAT 1 -+ -+ /* Define to 1 if you have the `lstat' function. */ -+ /* #undef HAVE_LSTAT */ -+ -+ /* Define to 1 if you have the header file. */ -+ #define HAVE_MALLOC_H 1 -+ -+ /* Define to 1 if you have the `memalign' function. */ -+ /* #undef HAVE_MEMALIGN */ -+ -+ /* Define to 1 if you have the `memmem' function. */ -+ /* #undef HAVE_MEMMEM */ -+ -+ /* Define to 1 if you have the `memmove' function. */ -+ #define HAVE_MEMMOVE 1 -+ -+ /* Define to 1 if you have the header file. */ -+ #define HAVE_MEMORY_H 1 -+ -+ /* Define to 1 if you have the `mmap' function. */ -+ /* #undef HAVE_MMAP */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_MNTENT_H */ -+ -+ /* Have a monotonic clock */ -+ /* #undef HAVE_MONOTONIC_CLOCK */ -+ -+ /* Define to 1 if you have the `nanosleep' function. */ -+ /* #undef HAVE_NANOSLEEP */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_NETDB_H */ -+ -+ /* Have non-POSIX function getgrgid_r */ -+ /* #undef HAVE_NONPOSIX_GETGRGID_R */ -+ -+ /* Have non-POSIX function getpwuid_r */ -+ /* #undef HAVE_NONPOSIX_GETPWUID_R */ -+ -+ /* Define to 1 if you have the `nsleep' function. */ -+ /* #undef HAVE_NSLEEP */ -+ -+ /* Define to 1 if you have the `on_exit' function. */ -+ /* #undef HAVE_ON_EXIT */ -+ -+ /* Define to 1 if you have the `pipe2' function. */ -+ /* #undef HAVE_PIPE2 */ -+ -+ /* Define to 1 if you have the `poll' function. */ -+ /* #undef HAVE_POLL */ -+ -+ /* Have POSIX function getgrgid_r */ -+ /* #undef HAVE_POSIX_GETGRGID_R */ -+ -+ /* Have POSIX function getpwuid_r */ -+ /* #undef HAVE_POSIX_GETPWUID_R */ -+ -+ /* Define to 1 if you have the `posix_memalign' function. */ -+ /* #undef HAVE_POSIX_MEMALIGN */ -+ -+ /* Have function pthread_attr_setstacksize */ -+ /* #undef HAVE_PTHREAD_ATTR_SETSTACKSIZE */ -+ -+ /* Define to 1 if the system has the type `ptrdiff_t'. */ -+ #define HAVE_PTRDIFF_T 1 -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_PWD_H */ -+ -+ /* Define to 1 if you have the `readlink' function. */ -+ /* #undef HAVE_READLINK */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_SCHED_H */ -+ -+ /* Define to 1 if libselinux is available */ -+ /* #undef HAVE_SELINUX */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_SELINUX_SELINUX_H */ -+ -+ /* Define to 1 if you have the `setenv' function. */ -+ /* #undef HAVE_SETENV */ -+ -+ /* Define to 1 if you have the `setlocale' function. */ -+ #define HAVE_SETLOCALE 1 -+ -+ /* Define to 1 if you have the `setmntent' function. */ -+ /* #undef HAVE_SETMNTENT */ -+ -+ /* Define to 1 if you have the `setresuid' function. */ -+ /* #undef HAVE_SETRESUID */ -+ -+ /* Define to 1 if you have the `setreuid' function. */ -+ /* #undef HAVE_SETREUID */ -+ -+ /* Define to 1 if you have the `snprintf' function. */ -+ #ifndef _MSC_VER -+ #define HAVE_SNPRINTF 1 -+ #ifdef __DMC__ -+ #define snprintf _snprintf -+ #endif -+ #else /* _MSC_VER */ -+ /* #undef HAVE_SNPRINTF */ -+ #endif /* _MSC_VER */ -+ -+ /* Define to 1 if you have the `splice' function. */ -+ /* #undef HAVE_SPLICE */ -+ -+ /* Define to 1 if you have the `statfs' function. */ -+ /* #undef HAVE_STATFS */ -+ -+ /* Define to 1 if you have the `statvfs' function. */ -+ /* #undef HAVE_STATVFS */ -+ -+ /* Define to 1 if you have the header file. */ -+ #define HAVE_STDDEF_H 1 -+ -+ /* Define to 1 if you have the header file. */ -+ #ifndef _MSC_VER -+ #define HAVE_STDINT_H 1 -+ #else /* _MSC_VER */ -+ /* #undef HAVE_STDINT_H */ -+ #endif /* _MSC_VER */ -+ -+ /* Define if exists, doesn't clash with , and declares -+ uintmax_t. */ -+ #ifndef _MSC_VER -+ #define HAVE_STDINT_H_WITH_UINTMAX 1 -+ #else /* _MSC_VER */ -+ /* #undef HAVE_STDINT_H_WITH_UINTMAX */ -+ #endif /* _MSC_VER */ -+ -+ /* Define to 1 if you have the header file. */ -+ #define HAVE_STDLIB_H 1 -+ -+ /* Define to 1 if you have the `stpcpy' function. */ -+ /* #undef HAVE_STPCPY */ -+ -+ /* Define to 1 if you have the `strcasecmp' function. */ -+ #if !defined(_MSC_VER) && !defined(__DMC__) -+ #define HAVE_STRCASECMP 1 -+ #else /* _MSC_VER or __DMC__ */ -+ /* #undef HAVE_STRCASECMP */ -+ #endif /* _MSC_VER or __DMC__ */ -+ -+ /* Define to 1 if you have the `strerror' function. */ -+ #define HAVE_STRERROR 1 -+ -+ /* Define to 1 if you have the header file. */ -+ #if !defined(_MSC_VER) && !defined(__DMC__) -+ #define HAVE_STRINGS_H 1 -+ #else /* _MSC_VER or __DMC__ */ -+ /* #undef HAVE_STRINGS_H */ -+ #endif /* _MSC_VER or __DMC__ */ -+ -+ /* Define to 1 if you have the header file. */ -+ #define HAVE_STRING_H 1 -+ -+ /* Have functions strlcpy and strlcat */ -+ /* #undef HAVE_STRLCPY */ -+ -+ /* Define to 1 if you have the `strncasecmp' function. */ -+ #if !defined(_MSC_VER) && !defined(__DMC__) -+ #define HAVE_STRNCASECMP 1 -+ #else /* _MSC_VER or __DMC__ */ -+ /* #undef HAVE_STRNCASECMP */ -+ #endif /* _MSC_VER or __DMC__ */ -+ -+ /* Define to 1 if you have the `strndup' function. */ -+ /* #undef HAVE_STRNDUP */ -+ -+ /* Define to 1 if you have the `strsignal' function. */ -+ /* #undef HAVE_STRSIGNAL */ -+ -+ /* Define to 1 if `f_bavail' is member of `struct statfs'. */ -+ /* #undef HAVE_STRUCT_STATFS_F_BAVAIL */ -+ -+ /* Define to 1 if `f_fstypename' is member of `struct statfs'. */ -+ /* #undef HAVE_STRUCT_STATFS_F_FSTYPENAME */ -+ -+ /* Define to 1 if `f_basetype' is member of `struct statvfs'. */ -+ /* #undef HAVE_STRUCT_STATVFS_F_BASETYPE */ -+ -+ /* Define to 1 if `st_atimensec' is member of `struct stat'. */ -+ /* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */ -+ -+ /* Define to 1 if `st_atim.tv_nsec' is member of `struct stat'. */ -+ /* #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC */ -+ -+ /* Define to 1 if `st_blksize' is member of `struct stat'. */ -+ /* #undef HAVE_STRUCT_STAT_ST_BLKSIZE */ -+ -+ /* Define to 1 if `st_blocks' is member of `struct stat'. */ -+ /* #undef HAVE_STRUCT_STAT_ST_BLOCKS */ -+ -+ /* Define to 1 if `st_ctimensec' is member of `struct stat'. */ -+ /* #undef HAVE_STRUCT_STAT_ST_CTIMENSEC */ -+ -+ /* Define to 1 if `st_ctim.tv_nsec' is member of `struct stat'. */ -+ /* #undef HAVE_STRUCT_STAT_ST_CTIM_TV_NSEC */ -+ -+ /* Define to 1 if `st_mtimensec' is member of `struct stat'. */ -+ /* #undef HAVE_STRUCT_STAT_ST_MTIMENSEC */ -+ -+ /* Define to 1 if `st_mtim.tv_nsec' is member of `struct stat'. */ -+ /* #undef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC */ -+ -+ /* Define to 1 if you have the `symlink' function. */ -+ /* #undef HAVE_SYMLINK */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_SYS_INOTIFY_H */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_SYS_MNTCTL_H */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_SYS_MNTTAB_H */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_SYS_MOUNT_H */ -+ -+ /* Define to 1 if you have the header file. */ -+ #if !defined(_MSC_VER) && !defined(__DMC__) -+ #define HAVE_SYS_PARAM_H 1 -+ #else /* _MSC_VER or __DMC__ */ -+ /* #undef HAVE_SYS_PARAM_H */ -+ #endif /* _MSC_VER or __DMC__ */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_SYS_POLL_H */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_SYS_PRCTL_H */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_SYS_RESOURCE_H */ -+ -+ /* found fd_set in sys/select.h */ -+ /* #undef HAVE_SYS_SELECT_H */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_SYS_STATFS_H */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_SYS_STATVFS_H */ -+ -+ /* Define to 1 if you have the header file. */ -+ #define HAVE_SYS_STAT_H 1 -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_SYS_SYSCTL_H */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_SYS_TIMES_H */ -+ -+ /* Define to 1 if you have the header file. */ -+ #ifndef _MSC_VER -+ #define HAVE_SYS_TIME_H 1 -+ #else /* _MSC_VER */ -+ /* #undef HAVE_SYS_TIME_H */ -+ #endif /* _MSC_VER */ -+ -+ /* Define to 1 if you have the header file. */ -+ #define HAVE_SYS_TYPES_H 1 -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_SYS_UIO_H */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_SYS_VFSTAB_H */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_SYS_VFS_H */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_SYS_VMOUNT_H */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_SYS_WAIT_H */ -+ -+ /* Define to 1 if you have the header file. */ -+ /* #undef HAVE_SYS_XATTR_H */ -+ -+ /* Define to 1 if you have the `timegm' function. */ -+ /* #undef HAVE_TIMEGM */ -+ -+ /* Define to 1 if you have the header file. */ -+ #ifndef _MSC_VER -+ #define HAVE_UNISTD_H 1 -+ #else /* _MSC_VER */ -+ /* #undef HAVE_UNISTD_H */ -+ #endif /* _MSC_VER */ -+ -+ /* Define if your printf function family supports positional parameters as -+ specified by Unix98. */ -+ /* #undef HAVE_UNIX98_PRINTF */ -+ -+ /* Define to 1 if you have the `unsetenv' function. */ -+ /* #undef HAVE_UNSETENV */ -+ -+ /* Define to 1 if you have the `utimes' function. */ -+ /* #undef HAVE_UTIMES */ -+ -+ /* Define to 1 if you have the `valloc' function. */ -+ /* #undef HAVE_VALLOC */ -+ -+ /* Define to 1 if you have the header file. */ -+ #if !defined(_MSC_VER) && !defined(__DMC__) -+ #define HAVE_VALUES_H 1 -+ #else /* _MSC_VER or __DMC__ */ -+ /* #undef HAVE_VALUES_H */ -+ #endif /* _MSC_VER or __DMC__ */ -+ -+ /* Define to 1 if you have the `vasprintf' function. */ -+ #define HAVE_VASPRINTF 1 -+ -+ /* Define to 1 if you have the `vprintf' function. */ -+ #define HAVE_VPRINTF 1 -+ -+ /* Define to 1 if you have the `vsnprintf' function. */ -+ #ifndef _MSC_VER -+ #define HAVE_VSNPRINTF 1 -+ #ifdef __DMC__ -+ #define vsnprintf _vsnprintf -+ #endif -+ #else /* _MSC_VER */ -+ /* #undef HAVE_VSNPRINTF */ -+ #endif /* _MSC_VER */ -+ -+ /* Define if you have the 'wchar_t' type. */ -+ #define HAVE_WCHAR_T 1 -+ -+ /* Define to 1 if you have the `wcslen' function. */ -+ #define HAVE_WCSLEN 1 -+ -+ /* Define if you have the 'wint_t' type. */ -+ #define HAVE_WINT_T 1 -+ -+ /* Have a working bcopy */ -+ /* #undef HAVE_WORKING_BCOPY */ -+ -+ /* Define to 1 if you have the header file. */ -+ #ifndef _MSC_VER -+ /* #undef HAVE_WSPIAPI_H */ -+ #else -+ #define HAVE_WSPIAPI_H 1 -+ #endif -+ -+ /* Define to 1 if xattr is available */ -+ /* #undef HAVE_XATTR */ -+ -+ /* Define to 1 if xattr API uses XATTR_NOFOLLOW */ -+ /* #undef HAVE_XATTR_NOFOLLOW */ -+ -+ /* Define to 1 if you have the `_NSGetEnviron' function. */ -+ /* #undef HAVE__NSGETENVIRON */ -+ -+ /* Define to the sub-directory in which libtool stores uninstalled libraries. -+ */ -+ #define LT_OBJDIR ".libs/" -+ -+ /* Do we cache iconv descriptors */ -+ #define NEED_ICONV_CACHE 1 -+ -+ /* didn't find fd_set */ -+ #define NO_FD_SET 1 -+ -+ /* Define to 1 if your C compiler doesn't accept -c and -o together. */ -+ /* #undef NO_MINUS_C_MINUS_O */ -+ -+ /* global 'sys_errlist' not found */ -+ #define NO_SYS_ERRLIST 1 -+ -+ /* global 'sys_siglist' not found */ -+ #define NO_SYS_SIGLIST 1 -+ -+ /* global 'sys_siglist' not declared */ -+ #define NO_SYS_SIGLIST_DECL 1 -+ -+ /* Define to the address where bug reports for this package should be sent. */ -+ #define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=glib" -+ -+ /* Define to the full name of this package. */ -+ #define PACKAGE_NAME "glib" -+ -+ /* Define to the full name and version of this package. */ -+ #define PACKAGE_STRING "glib 2.28.1" -+ -+ /* Define to the one symbol short name of this package. */ -+ #define PACKAGE_TARNAME "glib" -+ -+ /* Define to the version of this package. */ -+ #define PACKAGE_VERSION "2.28.1" -+ -+ /* Maximum POSIX RT priority */ -+ /* #undef POSIX_MAX_PRIORITY */ -+ -+ /* define if posix_memalign() can allocate any size */ -+ /* #undef POSIX_MEMALIGN_WITH_COMPLIANT_ALLOCS */ -+ -+ /* Minimum POSIX RT priority */ -+ /* #undef POSIX_MIN_PRIORITY */ -+ -+ /* The POSIX RT yield function */ -+ /* #undef POSIX_YIELD_FUNC */ -+ -+ /* whether realloc (NULL,) works */ -+ #define REALLOC_0_WORKS 1 -+ -+ /* Define if you have correct malloc prototypes */ -+ #ifndef _MSC_VER -+ #define SANE_MALLOC_PROTOS 1 -+ #else /* _MSC_VER */ -+ /* #undef SANE_MALLOC_PROTOS */ -+ #endif /* _MSC_VER */ -+ -+ /* The size of `char', as computed by sizeof. */ -+ #define SIZEOF_CHAR 1 -+ -+ /* The size of `int', as computed by sizeof. */ -+ #define SIZEOF_INT 4 -+ -+ /* The size of `long', as computed by sizeof. */ -+ #define SIZEOF_LONG 4 -+ -+ /* The size of `long long', as computed by sizeof. */ -+ #ifndef _MSC_VER -+ #define SIZEOF_LONG_LONG 8 -+ #else /* _MSC_VER */ -+ #define SIZEOF_LONG_LONG 0 -+ #endif /* _MSC_VER */ -+ -+ /* The size of `short', as computed by sizeof. */ -+ #define SIZEOF_SHORT 2 -+ -+ /* The size of `size_t', as computed by sizeof. */ -+ #define SIZEOF_SIZE_T 4 -+ -+ /* The size of `void *', as computed by sizeof. */ -+ #define SIZEOF_VOID_P 4 -+ -+ /* The size of `__int64', as computed by sizeof. */ -+ #define SIZEOF___INT64 8 -+ -+ /* If using the C implementation of alloca, define if you know the -+ direction of stack growth for your system; otherwise it will be -+ automatically deduced at runtime. -+ STACK_DIRECTION > 0 => grows toward higher addresses -+ STACK_DIRECTION < 0 => grows toward lower addresses -+ STACK_DIRECTION = 0 => direction of growth unknown */ -+ /* #undef STACK_DIRECTION */ -+ -+ /* Number of arguments to statfs() */ -+ /* #undef STATFS_ARGS */ -+ -+ /* Define to 1 if you have the ANSI C header files. */ -+ #define STDC_HEADERS 1 -+ -+ /* Using GNU libiconv */ -+ /* #undef USE_LIBICONV_GNU */ -+ -+ /* Using a native implementation of iconv in a separate library */ -+ #define USE_LIBICONV_NATIVE 1 -+ -+ /* using the system-supplied PCRE library */ -+ /* #undef USE_SYSTEM_PCRE */ -+ -+ /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most -+ significant byte first (like Motorola and SPARC, unlike Intel). */ -+ #if defined AC_APPLE_UNIVERSAL_BUILD -+ # if defined __BIG_ENDIAN__ -+ # define WORDS_BIGENDIAN 1 -+ # endif -+ #else -+ # ifndef WORDS_BIGENDIAN -+ /* # undef WORDS_BIGENDIAN */ -+ # endif -+ #endif -+ -+ /* Number of bits in a file offset, on hosts where this is settable. */ -+ /* #undef _FILE_OFFSET_BITS */ -+ -+ /* Define for large files, on AIX-style hosts. */ -+ /* #undef _LARGE_FILES */ -+ -+ /* Needed to get declarations for msg_control and msg_controllen on Solaris */ -+ /* #undef _XOPEN_SOURCE */ -+ -+ /* Needed to get declarations for msg_control and msg_controllen on Solaris */ -+ /* #undef _XOPEN_SOURCE_EXTENDED */ -+ -+ /* Needed to get declarations for msg_control and msg_controllen on Solaris */ -+ /* #undef __EXTENSIONS__ */ -+ -+ /* Define to empty if `const' does not conform to ANSI C. */ -+ /* #undef const */ -+ -+ /* Define to long or long long if and don't define. */ -+ /* #undef intmax_t */ -+ -+ /* Define to empty if the C compiler doesn't support this keyword. */ -+ /* #undef signed */ -+ -+ /* Define to `unsigned int' if does not define. */ -+ /* #undef size_t */ -+ ---- misc/glib-2.28.1/gio/gvdb/makefile.msc Wed Aug 20 14:33:55 2008 -+++ misc/build/glib-2.28.1/gio/gvdb/makefile.msc Wed Aug 20 14:26:42 2008 -@@ -1 +1,24 @@ --dummy -+ TOP = ..\..\.. -+ -+ !INCLUDE ..\..\build\win32\make.msc -+ -+ INCLUDES = \ -+ -FImsvc_recommended_pragmas.h \ -+ -I .. -I ..\..\glib -I ..\..\gmodule -I . -I ..\.. \ -+ $(INTL_CFLAGS) \ -+ $(SOLARINC) -+ -+ DEFINES = \ -+ -DG_LOG_DOMAIN=\"GLib-GIO\" \ -+ -DGIO_MODULE_DIR=\"$(libdir)/gio/modules\" \ -+ -DGIO_COMPILATION -+ -+ OBJECTS = \ -+ gvdb-reader.obj \ -+ gvdb-builder.obj -+ -+ all : giogvdb.lib -+ -+ giogvdb.lib : $(OBJECTS) -+ lib -out:giogvdb.lib $(OBJECTS) -+ ---- misc/glib-2.28.1/gio/win32/makefile.msc Wed Aug 20 14:33:55 2008 -+++ misc/build/glib-2.28.1/gio/win32/makefile.msc Wed Aug 20 14:26:42 2008 -@@ -1 +1,27 @@ --dummy -+ TOP = ..\..\.. -+ -+ !INCLUDE ..\..\build\win32\make.msc -+ -+ INCLUDES = \ -+ -FImsvc_recommended_pragmas.h \ -+ -I .. -I ..\..\glib -I ..\..\gmodule -I . -I ..\.. \ -+ $(INTL_CFLAGS) \ -+ $(SOLARINC) -+ -+ DEFINES = \ -+ -DG_LOG_DOMAIN=\"GLib-GIO\" \ -+ -DGIO_MODULE_DIR=\"$(libdir)/gio/modules\" \ -+ -DGIO_COMPILATION -+ -+ OBJECTS = \ -+ gwin32directorymonitor.obj \ -+ gwinhttpfile.obj \ -+ gwinhttpfileinputstream.obj \ -+ gwinhttpfileoutputstream.obj \ -+ gwinhttpvfs.obj \ -+ -+ all : giowin32.lib -+ -+ giowin32.lib : $(OBJECTS) -+ lib -out:giowin32.lib $(OBJECTS) -+ ++/* glibconfig.h.win32.in. Originally merged from two versions of ++ * glibconfig.h, generated by the GLib configure script, for gcc and ++ * MSVC. ++ */ ++ ++/* glibconfig.h ++ * ++ * This is a generated file. Please modify 'glibconfig.h.win32.in' ++ */ ++ ++#ifndef __G_LIBCONFIG_H__ ++#define __G_LIBCONFIG_H__ ++ ++#include ++ ++#include ++#include ++ ++G_BEGIN_DECLS ++ ++#define G_MINFLOAT FLT_MIN ++#define G_MAXFLOAT FLT_MAX ++#define G_MINDOUBLE DBL_MIN ++#define G_MAXDOUBLE DBL_MAX ++#define G_MINSHORT SHRT_MIN ++#define G_MAXSHORT SHRT_MAX ++#define G_MAXUSHORT USHRT_MAX ++#define G_MININT INT_MIN ++#define G_MAXINT INT_MAX ++#define G_MAXUINT UINT_MAX ++#define G_MINLONG LONG_MIN ++#define G_MAXLONG LONG_MAX ++#define G_MAXULONG ULONG_MAX ++ ++typedef signed char gint8; ++typedef unsigned char guint8; ++typedef signed short gint16; ++typedef unsigned short guint16; ++#define G_GINT16_MODIFIER "h" ++#define G_GINT16_FORMAT "hi" ++#define G_GUINT16_FORMAT "hu" ++typedef signed int gint32; ++typedef unsigned int guint32; ++#define G_GINT32_MODIFIER "" ++#define G_GINT32_FORMAT "i" ++#define G_GUINT32_FORMAT "u" ++#define G_HAVE_GINT64 1 /* deprecated, always true */ ++ ++#ifndef _MSC_VER ++G_GNUC_EXTENSION typedef signed long long gint64; ++G_GNUC_EXTENSION typedef unsigned long long guint64; ++#else /* _MSC_VER */ ++typedef signed __int64 gint64; ++typedef unsigned __int64 guint64; ++#endif /* _MSC_VER */ ++ ++#ifndef _MSC_VER ++#define G_GINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##LL)) ++#else /* _MSC_VER */ ++#define G_GINT64_CONSTANT(val) (val##i64) ++#endif /* _MSC_VER */ ++#ifndef _MSC_VER ++#define G_GUINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##ULL)) ++#else /* _MSC_VER */ ++#define G_GUINT64_CONSTANT(val) (val##Ui64) ++#endif /* _MSC_VER */ ++#define G_GINT64_MODIFIER "I64" ++#define G_GINT64_FORMAT "I64i" ++#define G_GUINT64_FORMAT "I64u" ++ ++#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64) ++ ++#define GLIB_SIZEOF_VOID_P 8 ++#define GLIB_SIZEOF_LONG 4 ++#define GLIB_SIZEOF_SIZE_T 8 ++ ++typedef signed long long gssize; ++typedef unsigned long long gsize; ++#define G_GSIZE_MODIFIER "I64" ++#define G_GSSIZE_FORMAT "I64d" ++#define G_GSIZE_FORMAT "I64u" ++ ++#define G_MAXSIZE G_MAXUINT64 ++#define G_MINSSIZE G_MININT64 ++#define G_MAXSSIZE G_MAXINT64 ++ ++#else ++ ++#define GLIB_SIZEOF_VOID_P 4 ++#define GLIB_SIZEOF_LONG 4 ++#define GLIB_SIZEOF_SIZE_T 4 ++ ++typedef signed int gssize; ++typedef unsigned int gsize; ++#define G_GSIZE_MODIFIER "" ++#define G_GSSIZE_FORMAT "i" ++#define G_GSIZE_FORMAT "u" ++ ++#define G_MAXSIZE G_MAXUINT ++#define G_MINSSIZE G_MININT ++#define G_MAXSSIZE G_MAXINT ++ ++#endif ++ ++typedef gint64 goffset; ++#define G_MINOFFSET G_MININT64 ++#define G_MAXOFFSET G_MAXINT64 ++ ++#define G_GOFFSET_MODIFIER G_GINT64_MODIFIER ++#define G_GOFFSET_FORMAT G_GINT64_FORMAT ++#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val) ++ ++ ++#ifndef _WIN64 ++ ++#define GPOINTER_TO_INT(p) ((gint) (p)) ++#define GPOINTER_TO_UINT(p) ((guint) (p)) ++ ++#define GINT_TO_POINTER(i) ((gpointer) (i)) ++#define GUINT_TO_POINTER(u) ((gpointer) (u)) ++ ++typedef signed int gintptr; ++typedef unsigned int guintptr; ++ ++#define G_GINTPTR_MODIFIER "" ++#define G_GINTPTR_FORMAT "i" ++#define G_GUINTPTR_FORMAT "u" ++ ++#else ++ ++#define GPOINTER_TO_INT(p) ((gint) (gint64) (p)) ++#define GPOINTER_TO_UINT(p) ((guint) (guint64) (p)) ++ ++#define GINT_TO_POINTER(i) ((gpointer) (gint64) (i)) ++#define GUINT_TO_POINTER(u) ((gpointer) (guint64) (u)) ++ ++#ifndef _MSC_VER ++typedef signed long long gintptr; ++typedef unsigned long long guintptr; ++#else ++typedef signed __int64 gintptr; ++typedef unsigned __int64 guintptr; ++#endif ++ ++#define G_GINTPTR_MODIFIER "I64" ++#define G_GINTPTR_FORMAT "I64i" ++#define G_GUINTPTR_FORMAT "I64u" ++ ++#endif ++ ++#ifdef NeXT /* @#%@! NeXTStep */ ++# define g_ATEXIT(proc) (!atexit (proc)) ++#else ++# define g_ATEXIT(proc) (atexit (proc)) ++#endif ++ ++#define g_memmove(dest,src,len) G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END ++ ++#define GLIB_MAJOR_VERSION 2 ++#define GLIB_MINOR_VERSION 28 ++#define GLIB_MICRO_VERSION 1 ++ ++#define G_OS_WIN32 ++#define G_PLATFORM_WIN32 ++ ++ ++#ifndef _MSC_VER ++#define G_VA_COPY va_copy ++#endif /* not _MSC_VER */ ++ ++#ifdef __cplusplus ++#define G_HAVE_INLINE 1 ++#else /* !__cplusplus */ ++#ifndef _MSC_VER ++#define G_HAVE_INLINE 1 ++#endif /* _MSC_VER */ ++#define G_HAVE___INLINE 1 ++#if !defined(_MSC_VER) && !defined(__DMC__) ++#define G_HAVE___INLINE__ 1 ++#endif /* !_MSC_VER and !__DMC__ */ ++#endif /* !__cplusplus */ ++ ++#define G_CAN_INLINE 1 ++ ++#ifndef _MSC_VER ++#define G_HAVE_ISO_VARARGS 1 ++ ++/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi ++ * is passed ISO vararg support is turned off, and there is no work ++ * around to turn it on, so we unconditionally turn it off. ++ */ ++#if __GNUC__ == 2 && __GNUC_MINOR__ == 95 ++# undef G_HAVE_ISO_VARARGS ++#endif ++ ++#define G_HAVE_GNUC_VARARGS 1 ++#else /* _MSC_VER */ ++/* varargs macros available since msvc8 (vs2005) */ ++# if _MSC_VER >= 1400 ++# define G_HAVE_ISO_VARARGS 1 ++# endif ++#endif /* not _MSC_VER */ ++#define G_HAVE_GROWING_STACK 0 ++ ++#define G_GNUC_INTERNAL ++ ++#define G_THREADS_ENABLED ++#define G_THREADS_IMPL_WIN32 ++typedef struct _GMutex* GStaticMutex; ++#define G_STATIC_MUTEX_INIT NULL ++#define g_static_mutex_get_mutex(mutex) \ ++ (g_static_mutex_get_mutex_impl_shortcut (mutex)) ++/* This represents a system thread as used by the implementation. An ++ * alien implementaion, as loaded by g_thread_init can only count on ++ * "sizeof (gpointer)" bytes to store their info. We however need more ++ * for some of our native implementations. */ ++typedef union _GSystemThread GSystemThread; ++union _GSystemThread ++{ ++#ifndef _WIN64 ++ char data[4]; ++#else ++ char data[8]; ++#endif ++ double dummy_double; ++ void *dummy_pointer; ++ long dummy_long; ++}; ++ ++#define GINT16_TO_LE(val) ((gint16) (val)) ++#define GUINT16_TO_LE(val) ((guint16) (val)) ++#define GINT16_TO_BE(val) ((gint16) GUINT16_SWAP_LE_BE (val)) ++#define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val)) ++#define GINT32_TO_LE(val) ((gint32) (val)) ++#define GUINT32_TO_LE(val) ((guint32) (val)) ++#define GINT32_TO_BE(val) ((gint32) GUINT32_SWAP_LE_BE (val)) ++#define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val)) ++#define GINT64_TO_LE(val) ((gint64) (val)) ++#define GUINT64_TO_LE(val) ((guint64) (val)) ++#define GINT64_TO_BE(val) ((gint64) GUINT64_SWAP_LE_BE (val)) ++#define GUINT64_TO_BE(val) (GUINT64_SWAP_LE_BE (val)) ++#define GLONG_TO_LE(val) ((glong) GINT32_TO_LE (val)) ++#define GULONG_TO_LE(val) ((gulong) GUINT32_TO_LE (val)) ++#define GLONG_TO_BE(val) ((glong) GINT32_TO_BE (val)) ++#define GULONG_TO_BE(val) ((gulong) GUINT32_TO_BE (val)) ++#define GINT_TO_LE(val) ((gint) GINT32_TO_LE (val)) ++#define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val)) ++#define GINT_TO_BE(val) ((gint) GINT32_TO_BE (val)) ++#define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val)) ++#define GSIZE_TO_LE(val) ((gsize) GUINT32_TO_LE (val)) ++#define GSSIZE_TO_LE(val) ((gssize) GINT32_TO_LE (val)) ++#define GSIZE_TO_BE(val) ((gsize) GUINT32_TO_BE (val)) ++#define GSSIZE_TO_BE(val) ((gssize) GINT32_TO_BE (val)) ++#define G_BYTE_ORDER G_LITTLE_ENDIAN ++ ++#define GLIB_SYSDEF_POLLIN =1 ++#define GLIB_SYSDEF_POLLOUT =4 ++#define GLIB_SYSDEF_POLLPRI =2 ++#define GLIB_SYSDEF_POLLHUP =16 ++#define GLIB_SYSDEF_POLLERR =8 ++#define GLIB_SYSDEF_POLLNVAL =32 ++ ++#define G_MODULE_SUFFIX "dll" ++ ++/* A GPid is an abstraction for a process "handle". It is *not* an ++ * abstraction for a process identifier in general. GPid is used in ++ * GLib only for descendant processes spawned with the g_spawn* ++ * functions. On POSIX there is no "process handle" concept as such, ++ * but on Windows a GPid is a handle to a process, a kind of pointer, ++ * not a process identifier. ++ */ ++typedef void * GPid; ++ ++#define GLIB_SYSDEF_AF_UNIX 1 ++#define GLIB_SYSDEF_AF_INET 2 ++#define GLIB_SYSDEF_AF_INET6 23 ++ ++#define GLIB_SYSDEF_MSG_OOB 1 ++#define GLIB_SYSDEF_MSG_PEEK 2 ++#define GLIB_SYSDEF_MSG_DONTROUTE 4 ++ ++G_END_DECLS ++ ++#endif /* GLIBCONFIG_H */ ++ +--- misc/glib-2.28.1/gmodule/gmoduleconf.h Wed Aug 20 14:33:55 2008 ++++ misc/build/glib-2.28.1/gmodule/gmoduleconf.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,45 @@ +-dummy ++/* GMODULE - GLIB wrapper code for dynamic module loading ++ * Copyright (C) 1998 Tim Janik ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ * Boston, MA 02111-1307, USA. ++ */ ++#ifndef __G_MODULE_CONF_H__ ++#define __G_MODULE_CONF_H__ ++ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif /* __cplusplus */ ++ ++ ++#define G_MODULE_IMPL_NONE 0 ++#define G_MODULE_IMPL_DL 1 ++#define G_MODULE_IMPL_DLD 2 ++#define G_MODULE_IMPL_WIN32 3 ++#define G_MODULE_IMPL_OS2 4 ++#define G_MODULE_IMPL_BEOS 5 ++#define G_MODULE_IMPL_DYLD 6 ++ ++#define G_MODULE_IMPL G_MODULE_IMPL_WIN32 ++#undef G_MODULE_HAVE_DLERROR ++ ++#ifdef __cplusplus ++} ++#endif /* __cplusplus */ ++ ++ ++#endif /* __G_MODULE_CONF_H__ */ ++ +--- misc/glib-2.28.1/config.h Wed Aug 20 14:33:55 2008 ++++ misc/build/glib-2.28.1/config.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,834 @@ +-dummy ++/* config.h.win32.in Merged from two versions generated by configure for gcc and MSVC. */ ++/* config.h. Generated by configure. */ ++/* config.h.in. Generated from configure.ac by autoheader. */ ++ ++/* Define if building universal (internal helper macro) */ ++/* #undef AC_APPLE_UNIVERSAL_BUILD */ ++ ++/* define if asm blocks can use numeric local labels */ ++/* #undef ASM_NUMERIC_LABELS */ ++ ++/* poll doesn't work on devices */ ++#define BROKEN_POLL 1 ++ ++/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP ++ systems. This function is required for `alloca.c' support on those systems. ++ */ ++/* #undef CRAY_STACKSEG_END */ ++ ++/* Define to 1 if using `alloca.c'. */ ++/* #undef C_ALLOCA */ ++ ++/* Whether to disable memory pools */ ++/* #undef DISABLE_MEM_POOLS */ ++ ++/* Whether to enable GC friendliness by default */ ++/* #undef ENABLE_GC_FRIENDLY_DEFAULT */ ++ ++/* always defined to indicate that i18n is enabled */ ++#define ENABLE_NLS 1 ++ ++/* include GRegex */ ++#define ENABLE_REGEX /**/ ++ ++/* Define the gettext package to be used */ ++#define GETTEXT_PACKAGE "glib20" ++ ++/* Define to the GLIB binary age */ ++#define GLIB_BINARY_AGE 2801 ++ ++/* Byte contents of gmutex */ ++/* #undef GLIB_BYTE_CONTENTS_GMUTEX */ ++ ++/* Define to the GLIB interface age */ ++#define GLIB_INTERFACE_AGE 1 ++ ++/* Define the location where the catalogs will be installed */ ++#define GLIB_LOCALE_DIR "NONE/share/locale" ++ ++/* Define to the GLIB major version */ ++#define GLIB_MAJOR_VERSION 2 ++ ++/* Define to the GLIB micro version */ ++#define GLIB_MICRO_VERSION 1 ++ ++/* Define to the GLIB minor version */ ++#define GLIB_MINOR_VERSION 28 ++ ++/* The size of gmutex, as computed by sizeof. */ ++/* #undef GLIB_SIZEOF_GMUTEX */ ++ ++/* The size of system_thread, as computed by sizeof. */ ++#define GLIB_SIZEOF_SYSTEM_THREAD 4 ++ ++/* alpha atomic implementation */ ++/* #undef G_ATOMIC_ALPHA */ ++ ++/* arm atomic implementation */ ++/* #undef G_ATOMIC_ARM */ ++ ++/* cris atomic implementation */ ++/* #undef G_ATOMIC_CRIS */ ++ ++/* crisv32 atomic implementation */ ++/* #undef G_ATOMIC_CRISV32 */ ++ ++/* i486 atomic implementation */ ++#ifndef _MSC_VER ++#define G_ATOMIC_I486 1 ++#endif /* _MSC_VER */ ++ ++/* ia64 atomic implementation */ ++/* #undef G_ATOMIC_IA64 */ ++ ++/* powerpc atomic implementation */ ++/* #undef G_ATOMIC_POWERPC */ ++ ++/* s390 atomic implementation */ ++/* #undef G_ATOMIC_S390 */ ++ ++/* sparcv9 atomic implementation */ ++/* #undef G_ATOMIC_SPARCV9 */ ++ ++/* x86_64 atomic implementation */ ++/* #undef G_ATOMIC_X86_64 */ ++ ++/* Have inline keyword */ ++#ifndef _MSC_VER ++#define G_HAVE_INLINE 1 ++#else /* _MSC_VER */ ++/* #undef G_HAVE_INLINE */ ++#endif /* _MSC_VER */ ++ ++/* Have __inline keyword */ ++#define G_HAVE___INLINE 1 ++ ++/* Have __inline__ keyword */ ++#if !defined(_MSC_VER) && !defined(__DMC__) ++#define G_HAVE___INLINE__ 1 ++#else /* _MSC_VER or __DMC__ */ ++/* #undef G_HAVE___INLINE__ */ ++#endif /* _MSC_VER or __DMC__ */ ++ ++/* Source file containing theread implementation */ ++#define G_THREAD_SOURCE "gthread-win32.c" ++ ++/* A 'va_copy' style function */ ++#ifndef _MSC_VER ++#define G_VA_COPY va_copy ++#else /* _MSC_VER */ ++/* #undef G_VA_COPY */ ++#endif /* _MSC_VER */ ++ ++/* 'va_lists' cannot be copies as values */ ++/* #undef G_VA_COPY_AS_ARRAY */ ++ ++/* Define to 1 if you have `alloca', as a function or macro. */ ++#define HAVE_ALLOCA 1 ++ ++/* Define to 1 if you have and it should be used (not on Ultrix). ++ */ ++/* #undef HAVE_ALLOCA_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_ARPA_NAMESER_COMPAT_H */ ++ ++/* Define to 1 if you have the `atexit' function. */ ++#define HAVE_ATEXIT 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_ATTR_XATTR_H */ ++ ++/* Define to 1 if you have the `bind_textdomain_codeset' function. */ ++#define HAVE_BIND_TEXTDOMAIN_CODESET 1 ++ ++/* Define if you have a version of the snprintf function with semantics as ++ specified by the ISO C99 standard. */ ++/* #undef HAVE_C99_SNPRINTF */ ++ ++/* Define if you have a version of the vsnprintf function with semantics as ++ specified by the ISO C99 standard. */ ++/* #undef HAVE_C99_VSNPRINTF */ ++ ++/* define to 1 if Carbon is available */ ++/* #undef HAVE_CARBON */ ++ ++/* Define to 1 if you have the `chown' function. */ ++/* #undef HAVE_CHOWN */ ++ ++/* Define to 1 if you have the `clock_gettime' function. */ ++/* #undef HAVE_CLOCK_GETTIME */ ++ ++/* Have nl_langinfo (CODESET) */ ++/* #undef HAVE_CODESET */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_CRT_EXTERNS_H */ ++ ++/* Define if dbus-1 is available */ ++/* #undef HAVE_DBUS1 */ ++ ++/* Define to 1 if you have the `dcgettext' function. */ ++#define HAVE_DCGETTEXT 1 ++ ++/* Define to 1 if you have the header file. */ ++#ifndef _MSC_VER ++#define HAVE_DIRENT_H 1 ++#else ++/* #undef HAVE_DIRENT_H */ ++#endif ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_DLFCN_H */ ++ ++/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ ++/* #undef HAVE_DOPRNT */ ++ ++/* define for working do while(0) macros */ ++#define HAVE_DOWHILE_MACROS 1 ++ ++/* Define to 1 if you have the `endmntent' function. */ ++/* #undef HAVE_ENDMNTENT */ ++ ++/* Define to 1 if you have the `endservent' function. */ ++/* #undef HAVE_ENDSERVENT */ ++ ++/* Define if we have FAM */ ++/* #undef HAVE_FAM */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_FAM_H */ ++ ++/* Define if we have FAMNoExists in fam */ ++/* #undef HAVE_FAM_NO_EXISTS */ ++ ++/* Define to 1 if you have the `fchmod' function. */ ++/* #undef HAVE_FCHMOD */ ++ ++/* Define to 1 if you have the `fchown' function. */ ++/* #undef HAVE_FCHOWN */ ++ ++/* Define to 1 if you have the `fdwalk' function. */ ++/* #undef HAVE_FDWALK */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_FLOAT_H 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_FSTAB_H */ ++ ++/* Define to 1 if you have the `fsync' function. */ ++/* #undef HAVE_FSYNC */ ++ ++/* we have the futex(2) system call */ ++/* #undef HAVE_FUTEX */ ++ ++/* Define to 1 if you have the `getcwd' function. */ ++#define HAVE_GETCWD 1 ++ ++/* Define to 1 if you have the `getc_unlocked' function. */ ++/* #undef HAVE_GETC_UNLOCKED */ ++ ++/* Define to 1 if you have the `getgrgid' function. */ ++/* #undef HAVE_GETGRGID */ ++ ++/* Define to 1 if you have the `getmntent_r' function. */ ++/* #undef HAVE_GETMNTENT_R */ ++ ++/* Define to 1 if you have the `getmntinfo' function. */ ++/* #undef HAVE_GETMNTINFO */ ++ ++/* Define to 1 if you have the `getprotobyname_r' function. */ ++/* #undef HAVE_GETPROTOBYNAME_R */ ++ ++/* Define to 1 if you have the `getpwuid' function. */ ++/* #undef HAVE_GETPWUID */ ++ ++/* Define if the GNU gettext() function is already present or preinstalled. */ ++#define HAVE_GETTEXT 1 ++ ++/* Define to 1 if you have the `gmtime_r' function. */ ++/* #undef HAVE_GMTIME_R */ ++ ++/* define to use system printf */ ++/* #undef HAVE_GOOD_PRINTF */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_GRP_H */ ++ ++/* Define to 1 if you have the `hasmntopt' function. */ ++/* #undef HAVE_HASMNTOPT */ ++ ++/* Define to 1 if you have the `inotify_init1' function. */ ++/* #undef HAVE_INOTIFY_INIT1 */ ++ ++/* define to support printing 64-bit integers with format I64 */ ++#define HAVE_INT64_AND_I64 1 ++ ++/* Define if you have the 'intmax_t' type in or . */ ++#ifndef _MSC_VER ++#define HAVE_INTMAX_T 1 ++#else /* _MSC_VER */ ++/* #undef HAVE_INTMAX_T */ ++#endif /* _MSC_VER */ ++ ++/* Define to 1 if you have the header file. */ ++#ifndef _MSC_VER ++#define HAVE_INTTYPES_H 1 ++#else /* _MSC_VER */ ++/* #undef HAVE_INTTYPES_H */ ++#endif /* _MSC_VER */ ++ ++/* Define if exists, doesn't clash with , and ++ declares uintmax_t. */ ++#ifndef _MSC_VER ++#define HAVE_INTTYPES_H_WITH_UINTMAX 1 ++#else /* _MSC_VER */ ++/* #undef HAVE_INTTYPES_H_WITH_UINTMAX */ ++#endif /* _MSC_VER */ ++ ++/* Define if you have and nl_langinfo(CODESET). */ ++/* #undef HAVE_LANGINFO_CODESET */ ++ ++/* Define to 1 if you have the `lchmod' function. */ ++/* #undef HAVE_LCHMOD */ ++ ++/* Define to 1 if you have the `lchown' function. */ ++/* #undef HAVE_LCHOWN */ ++ ++/* Define if your file defines LC_MESSAGES. */ ++/* #undef HAVE_LC_MESSAGES */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_LIMITS_H 1 ++ ++/* Define to 1 if you have the `link' function. */ ++/* #undef HAVE_LINK */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_LOCALE_H 1 ++ ++/* Define to 1 if you have the `localtime_r' function. */ ++/* #undef HAVE_LOCALTIME_R */ ++ ++/* Define if you have the 'long double' type. */ ++#define HAVE_LONG_DOUBLE 1 ++ ++/* Define if you have the 'long long' type. */ ++#ifndef _MSC_VER ++#define HAVE_LONG_LONG 1 ++#else /* _MSC_VER */ ++/* #undef HAVE_LONG_LONG */ ++#endif /* _MSC_VER */ ++ ++/* define if system printf can print long long */ ++#define HAVE_LONG_LONG_FORMAT 1 ++ ++/* Define to 1 if you have the `lstat' function. */ ++/* #undef HAVE_LSTAT */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_MALLOC_H 1 ++ ++/* Define to 1 if you have the `memalign' function. */ ++/* #undef HAVE_MEMALIGN */ ++ ++/* Define to 1 if you have the `memmem' function. */ ++/* #undef HAVE_MEMMEM */ ++ ++/* Define to 1 if you have the `memmove' function. */ ++#define HAVE_MEMMOVE 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_MEMORY_H 1 ++ ++/* Define to 1 if you have the `mmap' function. */ ++/* #undef HAVE_MMAP */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_MNTENT_H */ ++ ++/* Have a monotonic clock */ ++/* #undef HAVE_MONOTONIC_CLOCK */ ++ ++/* Define to 1 if you have the `nanosleep' function. */ ++/* #undef HAVE_NANOSLEEP */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_NETDB_H */ ++ ++/* Have non-POSIX function getgrgid_r */ ++/* #undef HAVE_NONPOSIX_GETGRGID_R */ ++ ++/* Have non-POSIX function getpwuid_r */ ++/* #undef HAVE_NONPOSIX_GETPWUID_R */ ++ ++/* Define to 1 if you have the `nsleep' function. */ ++/* #undef HAVE_NSLEEP */ ++ ++/* Define to 1 if you have the `on_exit' function. */ ++/* #undef HAVE_ON_EXIT */ ++ ++/* Define to 1 if you have the `pipe2' function. */ ++/* #undef HAVE_PIPE2 */ ++ ++/* Define to 1 if you have the `poll' function. */ ++/* #undef HAVE_POLL */ ++ ++/* Have POSIX function getgrgid_r */ ++/* #undef HAVE_POSIX_GETGRGID_R */ ++ ++/* Have POSIX function getpwuid_r */ ++/* #undef HAVE_POSIX_GETPWUID_R */ ++ ++/* Define to 1 if you have the `posix_memalign' function. */ ++/* #undef HAVE_POSIX_MEMALIGN */ ++ ++/* Have function pthread_attr_setstacksize */ ++/* #undef HAVE_PTHREAD_ATTR_SETSTACKSIZE */ ++ ++/* Define to 1 if the system has the type `ptrdiff_t'. */ ++#define HAVE_PTRDIFF_T 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_PWD_H */ ++ ++/* Define to 1 if you have the `readlink' function. */ ++/* #undef HAVE_READLINK */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SCHED_H */ ++ ++/* Define to 1 if libselinux is available */ ++/* #undef HAVE_SELINUX */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SELINUX_SELINUX_H */ ++ ++/* Define to 1 if you have the `setenv' function. */ ++/* #undef HAVE_SETENV */ ++ ++/* Define to 1 if you have the `setlocale' function. */ ++#define HAVE_SETLOCALE 1 ++ ++/* Define to 1 if you have the `setmntent' function. */ ++/* #undef HAVE_SETMNTENT */ ++ ++/* Define to 1 if you have the `setresuid' function. */ ++/* #undef HAVE_SETRESUID */ ++ ++/* Define to 1 if you have the `setreuid' function. */ ++/* #undef HAVE_SETREUID */ ++ ++/* Define to 1 if you have the `snprintf' function. */ ++#ifndef _MSC_VER ++#define HAVE_SNPRINTF 1 ++#ifdef __DMC__ ++#define snprintf _snprintf ++#endif ++#else /* _MSC_VER */ ++/* #undef HAVE_SNPRINTF */ ++#endif /* _MSC_VER */ ++ ++/* Define to 1 if you have the `splice' function. */ ++/* #undef HAVE_SPLICE */ ++ ++/* Define to 1 if you have the `statfs' function. */ ++/* #undef HAVE_STATFS */ ++ ++/* Define to 1 if you have the `statvfs' function. */ ++/* #undef HAVE_STATVFS */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STDDEF_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#ifndef _MSC_VER ++#define HAVE_STDINT_H 1 ++#else /* _MSC_VER */ ++/* #undef HAVE_STDINT_H */ ++#endif /* _MSC_VER */ ++ ++/* Define if exists, doesn't clash with , and declares ++ uintmax_t. */ ++#ifndef _MSC_VER ++#define HAVE_STDINT_H_WITH_UINTMAX 1 ++#else /* _MSC_VER */ ++/* #undef HAVE_STDINT_H_WITH_UINTMAX */ ++#endif /* _MSC_VER */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STDLIB_H 1 ++ ++/* Define to 1 if you have the `stpcpy' function. */ ++/* #undef HAVE_STPCPY */ ++ ++/* Define to 1 if you have the `strcasecmp' function. */ ++#if !defined(_MSC_VER) && !defined(__DMC__) ++#define HAVE_STRCASECMP 1 ++#else /* _MSC_VER or __DMC__ */ ++/* #undef HAVE_STRCASECMP */ ++#endif /* _MSC_VER or __DMC__ */ ++ ++/* Define to 1 if you have the `strerror' function. */ ++#define HAVE_STRERROR 1 ++ ++/* Define to 1 if you have the header file. */ ++#if !defined(_MSC_VER) && !defined(__DMC__) ++#define HAVE_STRINGS_H 1 ++#else /* _MSC_VER or __DMC__ */ ++/* #undef HAVE_STRINGS_H */ ++#endif /* _MSC_VER or __DMC__ */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STRING_H 1 ++ ++/* Have functions strlcpy and strlcat */ ++/* #undef HAVE_STRLCPY */ ++ ++/* Define to 1 if you have the `strncasecmp' function. */ ++#if !defined(_MSC_VER) && !defined(__DMC__) ++#define HAVE_STRNCASECMP 1 ++#else /* _MSC_VER or __DMC__ */ ++/* #undef HAVE_STRNCASECMP */ ++#endif /* _MSC_VER or __DMC__ */ ++ ++/* Define to 1 if you have the `strndup' function. */ ++/* #undef HAVE_STRNDUP */ ++ ++/* Define to 1 if you have the `strsignal' function. */ ++/* #undef HAVE_STRSIGNAL */ ++ ++/* Define to 1 if `f_bavail' is member of `struct statfs'. */ ++/* #undef HAVE_STRUCT_STATFS_F_BAVAIL */ ++ ++/* Define to 1 if `f_fstypename' is member of `struct statfs'. */ ++/* #undef HAVE_STRUCT_STATFS_F_FSTYPENAME */ ++ ++/* Define to 1 if `f_basetype' is member of `struct statvfs'. */ ++/* #undef HAVE_STRUCT_STATVFS_F_BASETYPE */ ++ ++/* Define to 1 if `st_atimensec' is member of `struct stat'. */ ++/* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */ ++ ++/* Define to 1 if `st_atim.tv_nsec' is member of `struct stat'. */ ++/* #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC */ ++ ++/* Define to 1 if `st_blksize' is member of `struct stat'. */ ++/* #undef HAVE_STRUCT_STAT_ST_BLKSIZE */ ++ ++/* Define to 1 if `st_blocks' is member of `struct stat'. */ ++/* #undef HAVE_STRUCT_STAT_ST_BLOCKS */ ++ ++/* Define to 1 if `st_ctimensec' is member of `struct stat'. */ ++/* #undef HAVE_STRUCT_STAT_ST_CTIMENSEC */ ++ ++/* Define to 1 if `st_ctim.tv_nsec' is member of `struct stat'. */ ++/* #undef HAVE_STRUCT_STAT_ST_CTIM_TV_NSEC */ ++ ++/* Define to 1 if `st_mtimensec' is member of `struct stat'. */ ++/* #undef HAVE_STRUCT_STAT_ST_MTIMENSEC */ ++ ++/* Define to 1 if `st_mtim.tv_nsec' is member of `struct stat'. */ ++/* #undef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC */ ++ ++/* Define to 1 if you have the `symlink' function. */ ++/* #undef HAVE_SYMLINK */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_INOTIFY_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_MNTCTL_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_MNTTAB_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_MOUNT_H */ ++ ++/* Define to 1 if you have the header file. */ ++#if !defined(_MSC_VER) && !defined(__DMC__) ++#define HAVE_SYS_PARAM_H 1 ++#else /* _MSC_VER or __DMC__ */ ++/* #undef HAVE_SYS_PARAM_H */ ++#endif /* _MSC_VER or __DMC__ */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_POLL_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_PRCTL_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_RESOURCE_H */ ++ ++/* found fd_set in sys/select.h */ ++/* #undef HAVE_SYS_SELECT_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_STATFS_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_STATVFS_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_STAT_H 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_SYSCTL_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_TIMES_H */ ++ ++/* Define to 1 if you have the header file. */ ++#ifndef _MSC_VER ++#define HAVE_SYS_TIME_H 1 ++#else /* _MSC_VER */ ++/* #undef HAVE_SYS_TIME_H */ ++#endif /* _MSC_VER */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_TYPES_H 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_UIO_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_VFSTAB_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_VFS_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_VMOUNT_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_WAIT_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_XATTR_H */ ++ ++/* Define to 1 if you have the `timegm' function. */ ++/* #undef HAVE_TIMEGM */ ++ ++/* Define to 1 if you have the header file. */ ++#ifndef _MSC_VER ++#define HAVE_UNISTD_H 1 ++#else /* _MSC_VER */ ++/* #undef HAVE_UNISTD_H */ ++#endif /* _MSC_VER */ ++ ++/* Define if your printf function family supports positional parameters as ++ specified by Unix98. */ ++/* #undef HAVE_UNIX98_PRINTF */ ++ ++/* Define to 1 if you have the `unsetenv' function. */ ++/* #undef HAVE_UNSETENV */ ++ ++/* Define to 1 if you have the `utimes' function. */ ++/* #undef HAVE_UTIMES */ ++ ++/* Define to 1 if you have the `valloc' function. */ ++/* #undef HAVE_VALLOC */ ++ ++/* Define to 1 if you have the header file. */ ++#if !defined(_MSC_VER) && !defined(__DMC__) ++#define HAVE_VALUES_H 1 ++#else /* _MSC_VER or __DMC__ */ ++/* #undef HAVE_VALUES_H */ ++#endif /* _MSC_VER or __DMC__ */ ++ ++/* Define to 1 if you have the `vasprintf' function. */ ++#define HAVE_VASPRINTF 1 ++ ++/* Define to 1 if you have the `vprintf' function. */ ++#define HAVE_VPRINTF 1 ++ ++/* Define to 1 if you have the `vsnprintf' function. */ ++#ifndef _MSC_VER ++#define HAVE_VSNPRINTF 1 ++#ifdef __DMC__ ++#define vsnprintf _vsnprintf ++#endif ++#else /* _MSC_VER */ ++/* #undef HAVE_VSNPRINTF */ ++#endif /* _MSC_VER */ ++ ++/* Define if you have the 'wchar_t' type. */ ++#define HAVE_WCHAR_T 1 ++ ++/* Define to 1 if you have the `wcslen' function. */ ++#define HAVE_WCSLEN 1 ++ ++/* Define if you have the 'wint_t' type. */ ++#define HAVE_WINT_T 1 ++ ++/* Have a working bcopy */ ++/* #undef HAVE_WORKING_BCOPY */ ++ ++/* Define to 1 if you have the header file. */ ++#ifndef _MSC_VER ++/* #undef HAVE_WSPIAPI_H */ ++#else ++#define HAVE_WSPIAPI_H 1 ++#endif ++ ++/* Define to 1 if xattr is available */ ++/* #undef HAVE_XATTR */ ++ ++/* Define to 1 if xattr API uses XATTR_NOFOLLOW */ ++/* #undef HAVE_XATTR_NOFOLLOW */ ++ ++/* Define to 1 if you have the `_NSGetEnviron' function. */ ++/* #undef HAVE__NSGETENVIRON */ ++ ++/* Define to the sub-directory in which libtool stores uninstalled libraries. ++ */ ++#define LT_OBJDIR ".libs/" ++ ++/* Do we cache iconv descriptors */ ++#define NEED_ICONV_CACHE 1 ++ ++/* didn't find fd_set */ ++#define NO_FD_SET 1 ++ ++/* Define to 1 if your C compiler doesn't accept -c and -o together. */ ++/* #undef NO_MINUS_C_MINUS_O */ ++ ++/* global 'sys_errlist' not found */ ++#define NO_SYS_ERRLIST 1 ++ ++/* global 'sys_siglist' not found */ ++#define NO_SYS_SIGLIST 1 ++ ++/* global 'sys_siglist' not declared */ ++#define NO_SYS_SIGLIST_DECL 1 ++ ++/* Define to the address where bug reports for this package should be sent. */ ++#define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=glib" ++ ++/* Define to the full name of this package. */ ++#define PACKAGE_NAME "glib" ++ ++/* Define to the full name and version of this package. */ ++#define PACKAGE_STRING "glib 2.28.1" ++ ++/* Define to the one symbol short name of this package. */ ++#define PACKAGE_TARNAME "glib" ++ ++/* Define to the version of this package. */ ++#define PACKAGE_VERSION "2.28.1" ++ ++/* Maximum POSIX RT priority */ ++/* #undef POSIX_MAX_PRIORITY */ ++ ++/* define if posix_memalign() can allocate any size */ ++/* #undef POSIX_MEMALIGN_WITH_COMPLIANT_ALLOCS */ ++ ++/* Minimum POSIX RT priority */ ++/* #undef POSIX_MIN_PRIORITY */ ++ ++/* The POSIX RT yield function */ ++/* #undef POSIX_YIELD_FUNC */ ++ ++/* whether realloc (NULL,) works */ ++#define REALLOC_0_WORKS 1 ++ ++/* Define if you have correct malloc prototypes */ ++#ifndef _MSC_VER ++#define SANE_MALLOC_PROTOS 1 ++#else /* _MSC_VER */ ++/* #undef SANE_MALLOC_PROTOS */ ++#endif /* _MSC_VER */ ++ ++/* The size of `char', as computed by sizeof. */ ++#define SIZEOF_CHAR 1 ++ ++/* The size of `int', as computed by sizeof. */ ++#define SIZEOF_INT 4 ++ ++/* The size of `long', as computed by sizeof. */ ++#define SIZEOF_LONG 4 ++ ++/* The size of `long long', as computed by sizeof. */ ++#ifndef _MSC_VER ++#define SIZEOF_LONG_LONG 8 ++#else /* _MSC_VER */ ++#define SIZEOF_LONG_LONG 0 ++#endif /* _MSC_VER */ ++ ++/* The size of `short', as computed by sizeof. */ ++#define SIZEOF_SHORT 2 ++ ++/* The size of `size_t', as computed by sizeof. */ ++#define SIZEOF_SIZE_T 4 ++ ++/* The size of `void *', as computed by sizeof. */ ++#define SIZEOF_VOID_P 4 ++ ++/* The size of `__int64', as computed by sizeof. */ ++#define SIZEOF___INT64 8 ++ ++/* If using the C implementation of alloca, define if you know the ++ direction of stack growth for your system; otherwise it will be ++ automatically deduced at runtime. ++ STACK_DIRECTION > 0 => grows toward higher addresses ++ STACK_DIRECTION < 0 => grows toward lower addresses ++ STACK_DIRECTION = 0 => direction of growth unknown */ ++/* #undef STACK_DIRECTION */ ++ ++/* Number of arguments to statfs() */ ++/* #undef STATFS_ARGS */ ++ ++/* Define to 1 if you have the ANSI C header files. */ ++#define STDC_HEADERS 1 ++ ++/* Using GNU libiconv */ ++/* #undef USE_LIBICONV_GNU */ ++ ++/* Using a native implementation of iconv in a separate library */ ++#define USE_LIBICONV_NATIVE 1 ++ ++/* using the system-supplied PCRE library */ ++/* #undef USE_SYSTEM_PCRE */ ++ ++/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most ++ significant byte first (like Motorola and SPARC, unlike Intel). */ ++#if defined AC_APPLE_UNIVERSAL_BUILD ++# if defined __BIG_ENDIAN__ ++# define WORDS_BIGENDIAN 1 ++# endif ++#else ++# ifndef WORDS_BIGENDIAN ++/* # undef WORDS_BIGENDIAN */ ++# endif ++#endif ++ ++/* Number of bits in a file offset, on hosts where this is settable. */ ++/* #undef _FILE_OFFSET_BITS */ ++ ++/* Define for large files, on AIX-style hosts. */ ++/* #undef _LARGE_FILES */ ++ ++/* Needed to get declarations for msg_control and msg_controllen on Solaris */ ++/* #undef _XOPEN_SOURCE */ ++ ++/* Needed to get declarations for msg_control and msg_controllen on Solaris */ ++/* #undef _XOPEN_SOURCE_EXTENDED */ ++ ++/* Needed to get declarations for msg_control and msg_controllen on Solaris */ ++/* #undef __EXTENSIONS__ */ ++ ++/* Define to empty if `const' does not conform to ANSI C. */ ++/* #undef const */ ++ ++/* Define to long or long long if and don't define. */ ++/* #undef intmax_t */ ++ ++/* Define to empty if the C compiler doesn't support this keyword. */ ++/* #undef signed */ ++ ++/* Define to `unsigned int' if does not define. */ ++/* #undef size_t */ ++ +--- misc/glib-2.28.1/gio/gvdb/makefile.msc Wed Aug 20 14:33:55 2008 ++++ misc/build/glib-2.28.1/gio/gvdb/makefile.msc Wed Aug 20 14:26:42 2008 +@@ -1 +1,24 @@ +-dummy ++TOP = ..\..\.. ++ ++!INCLUDE ..\..\build\win32\make.msc ++ ++INCLUDES = \ ++ -FImsvc_recommended_pragmas.h \ ++ -I .. -I ..\..\glib -I ..\..\gmodule -I . -I ..\.. \ ++ $(INTL_CFLAGS) \ ++ $(SOLARINC) ++ ++DEFINES = \ ++ -DG_LOG_DOMAIN=\"GLib-GIO\" \ ++ -DGIO_MODULE_DIR=\"$(libdir)/gio/modules\" \ ++ -DGIO_COMPILATION ++ ++OBJECTS = \ ++ gvdb-reader.obj \ ++ gvdb-builder.obj ++ ++all : giogvdb.lib ++ ++giogvdb.lib : $(OBJECTS) ++ lib -out:giogvdb.lib $(OBJECTS) ++ +--- misc/glib-2.28.1/gio/win32/makefile.msc Wed Aug 20 14:33:55 2008 ++++ misc/build/glib-2.28.1/gio/win32/makefile.msc Wed Aug 20 14:26:42 2008 +@@ -1 +1,27 @@ +-dummy ++TOP = ..\..\.. ++ ++!INCLUDE ..\..\build\win32\make.msc ++ ++INCLUDES = \ ++ -FImsvc_recommended_pragmas.h \ ++ -I .. -I ..\..\glib -I ..\..\gmodule -I . -I ..\.. \ ++ $(INTL_CFLAGS) \ ++ $(SOLARINC) ++ ++DEFINES = \ ++ -DG_LOG_DOMAIN=\"GLib-GIO\" \ ++ -DGIO_MODULE_DIR=\"$(libdir)/gio/modules\" \ ++ -DGIO_COMPILATION ++ ++OBJECTS = \ ++ gwin32directorymonitor.obj \ ++ gwinhttpfile.obj \ ++ gwinhttpfileinputstream.obj \ ++ gwinhttpfileoutputstream.obj \ ++ gwinhttpvfs.obj \ ++ ++all : giowin32.lib ++ ++giowin32.lib : $(OBJECTS) ++ lib -out:giowin32.lib $(OBJECTS) ++ +--- misc/glib-2.28.1/gobject/gmarshal.c Wed Aug 20 14:33:55 2008 ++++ misc/build/glib-2.28.1/gobject/gmarshal.c Wed Aug 20 14:26:42 2008 +@@ -1,4 +1,13 @@ ++#include "config.h" + ++#include "gsourceclosure.h" ++#include "gboxed.h" ++#include "genums.h" ++#include "gmarshal.h" ++#include "gvalue.h" ++#include "gvaluetypes.h" ++#include "gparam.h" ++#include "gobject.h" + + #ifdef G_ENABLE_DEBUG + #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) diff --git a/glib/makefile.mk b/glib/makefile.mk index e26b2f4039ae..747f1e71abfc 100644 --- a/glib/makefile.mk +++ b/glib/makefile.mk @@ -284,6 +284,8 @@ OUT2INC+=gobject/gtype.h OUT2INC+=gobject/gvaluearray.h .ELIF "$(OS)"=="WNT" +CONVERTFILES=gobject/gmarshal.c + PATCH_FILES=glib-2.28.1-win32.patch CONFIGURE_ACTION= ADDITIONAL_FILES= config.h \ -- cgit v1.2.3 From e799b912bfc74e59d480acffabfcf383d503f02c Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Wed, 9 Mar 2011 09:55:09 +0100 Subject: rsvglibs: use OUT2INC --- glib/glib-2.28.1-win32.patch | 3 +- glib/makefile.mk | 217 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 218 insertions(+), 2 deletions(-) diff --git a/glib/glib-2.28.1-win32.patch b/glib/glib-2.28.1-win32.patch index 3f2e45c55a9d..6e7c06d68465 100644 --- a/glib/glib-2.28.1-win32.patch +++ b/glib/glib-2.28.1-win32.patch @@ -622,7 +622,7 @@ gmarshal.strings \ gobject-query.exe \ libgobject-2.0-0.dll \ -@@ -24,8 +23,11 @@ +@@ -24,8 +23,10 @@ testgobject.exe gobject_OBJECTS = \ @@ -630,7 +630,6 @@ + gbinding.obj \ gboxed.obj \ gclosure.obj \ -+ gmarshal.obj \ genums.obj \ gobject.obj \ gparam.obj \ diff --git a/glib/makefile.mk b/glib/makefile.mk index 747f1e71abfc..b2d266ce0f66 100644 --- a/glib/makefile.mk +++ b/glib/makefile.mk @@ -295,6 +295,223 @@ ADDITIONAL_FILES= config.h \ gmodule/gmoduleconf.h BUILD_ACTION=nmake -f makefile.msc + +OUT2LIB+=gio/libgio-2.0-0.dll +OUT2LIB+=glib/libglib-2.0-0.dll +OUT2LIB+=gmodule/libgmodule-2.0-0.dll +OUT2LIB+=gobject/libgobject-2.0-0.dll +OUT2LIB+=gthread/libgthread-2.0-0.dll + +OUT2INC+=glib/glib.h +OUT2INC+=glib/glib-object.h +OUT2INC+=glib/glibconfig.h +OUT2INC+=gmodule/gmodule.h + +OUT2INC+=gio/gdesktopappinfo.h +OUT2INC+=gio/gunixcredentialsmessage.h +OUT2INC+=gio/gunixinputstream.h +OUT2INC+=gio/gunixsocketaddress.h +OUT2INC+=gio/gfiledescriptorbased.h +OUT2INC+=gio/gunixfdlist.h +OUT2INC+=gio/gunixmounts.h +OUT2INC+=gio/gunixconnection.h +OUT2INC+=gio/gunixfdmessage.h +OUT2INC+=gio/gunixoutputstream.h + + +OUT2INC+=gio/gaction.h +OUT2INC+=gio/gfileicon.h +OUT2INC+=gio/gproxyaddressenumerator.h +OUT2INC+=gio/gactiongroup.h +OUT2INC+=gio/gfileinfo.h +OUT2INC+=gio/gproxyresolver.h +OUT2INC+=gio/gappinfo.h +OUT2INC+=gio/gfileinputstream.h +OUT2INC+=gio/gresolver.h +OUT2INC+=gio/gapplication.h +OUT2INC+=gio/gfileiostream.h +OUT2INC+=gio/gseekable.h +OUT2INC+=gio/gapplicationcommandline.h +OUT2INC+=gio/gfilemonitor.h +OUT2INC+=gio/gsettings.h +OUT2INC+=gio/gasyncinitable.h +OUT2INC+=gio/gfilenamecompleter.h +OUT2INC+=gio/gsettingsbackend.h +OUT2INC+=gio/gasyncresult.h +OUT2INC+=gio/gfileoutputstream.h +OUT2INC+=gio/gsimpleaction.h +OUT2INC+=gio/gbufferedinputstream.h +OUT2INC+=gio/gfilterinputstream.h +OUT2INC+=gio/gsimpleactiongroup.h +OUT2INC+=gio/gbufferedoutputstream.h +OUT2INC+=gio/gfilteroutputstream.h +OUT2INC+=gio/gsimpleasyncresult.h +OUT2INC+=gio/gcancellable.h +OUT2INC+=gio/gicon.h +OUT2INC+=gio/gsimplepermission.h +OUT2INC+=gio/gcharsetconverter.h +OUT2INC+=gio/ginetaddress.h +OUT2INC+=gio/gsocket.h +OUT2INC+=gio/gcontenttype.h +OUT2INC+=gio/ginetsocketaddress.h +OUT2INC+=gio/gsocketaddress.h +OUT2INC+=gio/gconverter.h +OUT2INC+=gio/ginitable.h +OUT2INC+=gio/gsocketaddressenumerator.h +OUT2INC+=gio/gconverterinputstream.h +OUT2INC+=gio/ginputstream.h +OUT2INC+=gio/gsocketclient.h +OUT2INC+=gio/gconverteroutputstream.h +OUT2INC+=gio/gio.h +OUT2INC+=gio/gsocketconnectable.h +OUT2INC+=gio/gcredentials.h +OUT2INC+=gio/gioenums.h +OUT2INC+=gio/gsocketconnection.h +OUT2INC+=gio/gdatainputstream.h +OUT2INC+=gio/gioenumtypes.h +OUT2INC+=gio/gsocketcontrolmessage.h +OUT2INC+=gio/gdataoutputstream.h +OUT2INC+=gio/gioerror.h +OUT2INC+=gio/gsocketlistener.h +OUT2INC+=gio/gdbusaddress.h +OUT2INC+=gio/giomodule.h +OUT2INC+=gio/gsocketservice.h +OUT2INC+=gio/gdbusauthobserver.h +OUT2INC+=gio/gioscheduler.h +OUT2INC+=gio/gsrvtarget.h +OUT2INC+=gio/gdbusconnection.h +OUT2INC+=gio/giostream.h +OUT2INC+=gio/gtcpconnection.h +OUT2INC+=gio/gdbuserror.h +OUT2INC+=gio/giotypes.h +OUT2INC+=gio/gtcpwrapperconnection.h +OUT2INC+=gio/gdbusintrospection.h +OUT2INC+=gio/gloadableicon.h +OUT2INC+=gio/gthemedicon.h +OUT2INC+=gio/gdbusmessage.h +OUT2INC+=gio/gmemoryinputstream.h +OUT2INC+=gio/gthreadedsocketservice.h +OUT2INC+=gio/gdbusmethodinvocation.h +OUT2INC+=gio/gmemoryoutputstream.h +OUT2INC+=gio/gtlsbackend.h +OUT2INC+=gio/gdbusnameowning.h +OUT2INC+=gio/gmount.h +OUT2INC+=gio/gtlscertificate.h +OUT2INC+=gio/gdbusnamewatching.h +OUT2INC+=gio/gmountoperation.h +OUT2INC+=gio/gtlsclientconnection.h +OUT2INC+=gio/gdbusproxy.h +OUT2INC+=gio/gnativevolumemonitor.h +OUT2INC+=gio/gtlsconnection.h +OUT2INC+=gio/gdbusserver.h +OUT2INC+=gio/gnetworkaddress.h +OUT2INC+=gio/gtlsserverconnection.h +OUT2INC+=gio/gdbusutils.h +OUT2INC+=gio/gnetworkservice.h +OUT2INC+=gio/gvfs.h +OUT2INC+=gio/gdrive.h +OUT2INC+=gio/goutputstream.h +OUT2INC+=gio/gvolume.h +OUT2INC+=gio/gemblem.h +OUT2INC+=gio/gpermission.h +OUT2INC+=gio/gvolumemonitor.h +OUT2INC+=gio/gemblemedicon.h +OUT2INC+=gio/gpollableinputstream.h +OUT2INC+=gio/gzlibcompressor.h +OUT2INC+=gio/gfile.h +OUT2INC+=gio/gpollableoutputstream.h +OUT2INC+=gio/gzlibdecompressor.h +OUT2INC+=gio/gfileattribute.h +OUT2INC+=gio/gproxy.h +OUT2INC+=gio/gfileenumerator.h +OUT2INC+=gio/gproxyaddress.h + +OUT2INC+=glib/galloca.h +OUT2INC+=glib/gconvert.h +OUT2INC+=glib/gi18n.h +OUT2INC+=glib/goption.h +OUT2INC+=glib/gscanner.h +OUT2INC+=glib/gthreadpool.h +OUT2INC+=glib/garray.h +OUT2INC+=glib/gdataset.h +OUT2INC+=glib/giochannel.h +OUT2INC+=glib/gpattern.h +OUT2INC+=glib/gsequence.h +OUT2INC+=glib/gtimer.h +OUT2INC+=glib/gasyncqueue.h +OUT2INC+=glib/gdate.h +OUT2INC+=glib/gkeyfile.h +OUT2INC+=glib/gpoll.h +OUT2INC+=glib/gshell.h +OUT2INC+=glib/gtimezone.h +OUT2INC+=glib/gatomic.h +OUT2INC+=glib/gdatetime.h +OUT2INC+=glib/glist.h +OUT2INC+=glib/gprimes.h +OUT2INC+=glib/gslice.h +OUT2INC+=glib/gtree.h +OUT2INC+=glib/gbacktrace.h +OUT2INC+=glib/gdir.h +OUT2INC+=glib/gmacros.h +OUT2INC+=glib/gprintf.h +OUT2INC+=glib/gslist.h +OUT2INC+=glib/gtypes.h +OUT2INC+=glib/gbase64.h +OUT2INC+=glib/gerror.h +OUT2INC+=glib/gmain.h +OUT2INC+=glib/gqsort.h +OUT2INC+=glib/gspawn.h +OUT2INC+=glib/gunicode.h +OUT2INC+=glib/gbitlock.h +OUT2INC+=glib/gfileutils.h +OUT2INC+=glib/gmappedfile.h +OUT2INC+=glib/gquark.h +OUT2INC+=glib/gstdio.h +OUT2INC+=glib/gurifuncs.h +OUT2INC+=glib/gbookmarkfile.h +OUT2INC+=glib/ghash.h +OUT2INC+=glib/gmarkup.h +OUT2INC+=glib/gqueue.h +OUT2INC+=glib/gstrfuncs.h +OUT2INC+=glib/gutils.h +OUT2INC+=glib/gcache.h +OUT2INC+=glib/ghook.h +OUT2INC+=glib/gmem.h +OUT2INC+=glib/grand.h +OUT2INC+=glib/gstring.h +OUT2INC+=glib/gvariant.h +OUT2INC+=glib/gchecksum.h +OUT2INC+=glib/ghostutils.h +OUT2INC+=glib/gmessages.h +OUT2INC+=glib/gregex.h +OUT2INC+=glib/gtestutils.h +OUT2INC+=glib/gvarianttype.h +OUT2INC+=glib/gcompletion.h +OUT2INC+=glib/gi18n-lib.h +OUT2INC+=glib/gnode.h +OUT2INC+=glib/grel.h +OUT2INC+=glib/gthread.h +OUT2INC+=glib/gwin32.h + + +OUT2INC+=gobject/gbinding.h +OUT2INC+=gobject/gmarshal.h +OUT2INC+=gobject/gparamspecs.h +OUT2INC+=gobject/gtypemodule.h +OUT2INC+=gobject/gvaluecollector.h +OUT2INC+=gobject/gboxed.h +OUT2INC+=gobject/gobject.h +OUT2INC+=gobject/gsignal.h +OUT2INC+=gobject/gtypeplugin.h +OUT2INC+=gobject/gvaluetypes.h +OUT2INC+=gobject/gclosure.h +OUT2INC+=gobject/gobjectnotifyqueue.c +OUT2INC+=gobject/gsourceclosure.h +OUT2INC+=gobject/gvalue.h +OUT2INC+=gobject/genums.h +OUT2INC+=gobject/gparam.h +OUT2INC+=gobject/gtype.h +OUT2INC+=gobject/gvaluearray.h .ELSE .ENDIF -- cgit v1.2.3 From c2e4254b329463732e203e8e7f3cd57c592990e8 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 9 Mar 2011 10:03:44 +0100 Subject: fwk167: #i87596# Remove decoration on windowResized() only in design mode. VCL works without decoration and so does the toolkit. In design mode the drawing layer wants to include the decoration. So using mbDesignMode helps to complete the fix --- toolkit/source/controls/dialogcontrol.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index 15eeb2aa1939..e507267c1aed 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -354,7 +354,10 @@ throw (::com::sun::star::uno::RuntimeException) Reference< XControl > xDialogControl( *this, UNO_QUERY_THROW ); Reference< XDevice > xDialogDevice( xDialogControl->getPeer(), UNO_QUERY ); OSL_ENSURE( xDialogDevice.is(), "UnoDialogControl::windowResized: no peer, but a windowResized event?" ); - if ( xDialogDevice.is() ) + + // #i87592 In design mode the drawing layer works with sizes with decoration. + // Therefore we have to substract them before writing back to the properties (model). + if ( xDialogDevice.is() && mbDesignMode ) { DeviceInfo aDeviceInfo( xDialogDevice->getInfo() ); aAppFontSize.Width() -= aDeviceInfo.LeftInset + aDeviceInfo.RightInset; -- cgit v1.2.3 From 12a44956bc562d05e8f3e616a19684b909d2c8d7 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 9 Mar 2011 11:35:43 +0100 Subject: rsvglibs: add build.lst --- librsvg/prj/build.lst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 librsvg/prj/build.lst diff --git a/librsvg/prj/build.lst b/librsvg/prj/build.lst new file mode 100644 index 000000000000..d34f9751db4e --- /dev/null +++ b/librsvg/prj/build.lst @@ -0,0 +1,3 @@ +rg librsvg : libcroco libgsf cairo gdk_pixbuf soltools NULL +rg librsvg usr1 - all rg_mkout NULL +rg librsvg nmake - all rg_gettext NULL -- cgit v1.2.3 From f887134f9e809d22b759ff9e0f87d1088c6d0b90 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Wed, 9 Mar 2011 11:44:16 +0100 Subject: calc66: #i116504# don't use the same cache ID for a different range --- sc/source/core/data/documen2.cxx | 7 ++++++- sc/source/core/data/documen3.cxx | 5 +++-- sc/source/core/data/dpobject.cxx | 4 +++- sc/source/core/data/dpsdbtab.cxx | 2 +- sc/source/core/data/dpshttab.cxx | 2 +- sc/source/ui/dbgui/pvlaydlg.cxx | 2 +- 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 22155543ee81..66432feb5644 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -447,7 +447,12 @@ ScDocument::~ScDocument() delete pChangeViewSettings; // und weg damit delete pVirtualDevice_100th_mm; - delete pDPCollection; + if (pDPCollection) + { + pDPCollection->FreeAll(); + RemoveUnusedDPObjectCaches(); + delete pDPCollection; + } // delete the EditEngine before destroying the xPoolHelper delete pCacheFieldEditEngine; diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx index def8edc2d1a4..3f8742ee1d56 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -2120,7 +2120,7 @@ void ScDocument::RemoveDPObjectCache( long nID ) void ScDocument::RemoveUnusedDPObjectCaches() { - for ( std::list::iterator iter = m_listDPObjectsCaches.begin(); iter!=m_listDPObjectsCaches.end(); iter++ ) + for ( std::list::iterator iter = m_listDPObjectsCaches.begin(); iter!=m_listDPObjectsCaches.end(); ) { long nID = (*iter)->GetId(); sal_uInt16 nCount = GetDPCollection()->GetCount(); @@ -2133,10 +2133,11 @@ void ScDocument::RemoveUnusedDPObjectCaches() if ( i == nCount ) { ScDPTableDataCache* pCache = *iter; - m_listDPObjectsCaches.erase( iter ); + iter = m_listDPObjectsCaches.erase( iter ); delete pCache; continue; } + ++iter; } } diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index ad1932303da0..77dd1d67139d 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -292,7 +292,7 @@ void ScDPObject::SetSheetDesc(const ScSheetSourceDesc& rDesc) DELETEZ( pImpDesc ); DELETEZ( pServDesc ); - delete pImpDesc; + delete pSheetDesc; pSheetDesc = new ScSheetSourceDesc(rDesc); // make valid QueryParam @@ -304,6 +304,7 @@ void ScDPObject::SetSheetDesc(const ScSheetSourceDesc& rDesc) pSheetDesc->aQueryParam.bHasHeader = sal_True; InvalidateSource(); // new source must be created + SetCacheId( -1 ); // #i116504# don't use the same cache ID for a different range } void ScDPObject::SetImportDesc(const ScImportSourceDesc& rDesc) @@ -318,6 +319,7 @@ void ScDPObject::SetImportDesc(const ScImportSourceDesc& rDesc) pImpDesc = new ScImportSourceDesc(rDesc); InvalidateSource(); // new source must be created + SetCacheId( -1 ); } void ScDPObject::SetServiceData(const ScDPServiceDesc& rDesc) diff --git a/sc/source/core/data/dpsdbtab.cxx b/sc/source/core/data/dpsdbtab.cxx index f0e060e8cc7d..977be2e182a9 100644 --- a/sc/source/core/data/dpsdbtab.cxx +++ b/sc/source/core/data/dpsdbtab.cxx @@ -214,7 +214,7 @@ ScDatabaseDPData::ScDatabaseDPData( ScDocument* pDoc, const ScImportSourceDesc& rImport, long nCacheId /*=-1 */ ) : ScDPTableData(pDoc, rImport.GetCacheId( pDoc, nCacheId) ), - aCacheTable( pDoc, rImport.GetCacheId( pDoc, nCacheId)) + aCacheTable( pDoc, GetCacheId() ) // base class ID is initialized with the GetCacheId call above { } diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx index 9fa4e37fc879..6c376209e035 100644 --- a/sc/source/core/data/dpshttab.cxx +++ b/sc/source/core/data/dpshttab.cxx @@ -67,7 +67,7 @@ ScSheetDPData::ScSheetDPData( ScDocument* pD, const ScSheetSourceDesc& rDesc , l pSpecial(NULL), bIgnoreEmptyRows( sal_False ), bRepeatIfEmpty(sal_False), - aCacheTable( pD, rDesc.GetCacheId( pD, nCacheId)) + aCacheTable( pD, GetCacheId() ) // base class ID is initialized with the GetCacheId call above { SCSIZE nEntryCount( aQuery.GetEntryCount()); pSpecial = new sal_Bool[nEntryCount]; diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx index b43779ffa62b..3377fc16b924 100644 --- a/sc/source/ui/dbgui/pvlaydlg.cxx +++ b/sc/source/ui/dbgui/pvlaydlg.cxx @@ -99,7 +99,7 @@ ScPivotLayoutDlg::ScPivotLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window maFlAreas( this, ScResId( FL_OUTPUT ) ), maFtInArea( this, ScResId( FT_INAREA) ), - maEdInPos( this, ScResId( ED_INAREA) ), + maEdInPos( this, this, ScResId( ED_INAREA) ), maRbInPos( this, ScResId( RB_INAREA ), &maEdInPos, this ), maLbOutPos( this, ScResId( LB_OUTAREA ) ), maFtOutArea( this, ScResId( FT_OUTAREA ) ), -- cgit v1.2.3 From 70c54842a1703692e45cc51901b2661d7531bf1b Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 9 Mar 2011 11:59:37 +0100 Subject: rsvglibs: updated build dependencies --- ooo.lst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ooo.lst b/ooo.lst index aa3bfd60ebb3..2ee9dd26713b 100755 --- a/ooo.lst +++ b/ooo.lst @@ -77,3 +77,10 @@ ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip ff369e69ef0f0143beb5626164e87ae2-neon-0.29.5.tar.gz 220035f111ea045a51e290906025e8b5-libpng-1.5.1.tar.gz a2c10c04f396a9ce72894beb18b4e1f9-jpeg-8c.tar.gz +3a84ac2da37cae5bf7ce616228c6fbde-libgsf-1.14.19.tar.gz +22ad1c8d3fda7e73b0798035f3dd96bc-pango-1.28.3.tar.gz +a7d6c5f2fe2d481149ed3ba807b5c043-gdk-pixbuf-2.23.0.tar.gz +9f6e85e1e38490c3956f4415bcd33e6e-glib-2.28.1.tar.gz +3dd55b952826d2b32f51308f2f91aa89-gettext-0.18.1.1.tar.gz +0611e099e807210cf738dcb41425d104-libcroco-0.6.2.tar.gz + -- cgit v1.2.3 From fb999d52ac27c7752c09bf715a0e51b1e254ee5e Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 9 Mar 2011 11:59:37 +0100 Subject: rsvglibs: updated build dependencies --- gdk-pixbuf/prj/build.lst | 2 +- librsvg/prj/build.lst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gdk-pixbuf/prj/build.lst b/gdk-pixbuf/prj/build.lst index fda2c4a0031d..1f9de3ec47d1 100644 --- a/gdk-pixbuf/prj/build.lst +++ b/gdk-pixbuf/prj/build.lst @@ -1,3 +1,3 @@ -gp gdk-pixbuf : soltools NULL +gp gdk-pixbuf : glib libjpeg libpng soltools NULL gp gdk-pixbuf usr1 - all gp_mkout NULL gp gdk-pixbuf nmake - all gp_gdk-pixbuf NULL diff --git a/librsvg/prj/build.lst b/librsvg/prj/build.lst index d34f9751db4e..82e1fd64d1c5 100644 --- a/librsvg/prj/build.lst +++ b/librsvg/prj/build.lst @@ -1,3 +1,3 @@ -rg librsvg : libcroco libgsf cairo gdk_pixbuf soltools NULL +rg librsvg : libcroco libgsf cairo gdk-pixbuf soltools NULL rg librsvg usr1 - all rg_mkout NULL rg librsvg nmake - all rg_gettext NULL -- cgit v1.2.3 From a98c6c61ec22c1a6c9673d9197021758d9ee72ff Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 9 Mar 2011 11:59:37 +0100 Subject: rsvglibs: updated build dependencies --- postprocess/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postprocess/prj/build.lst b/postprocess/prj/build.lst index 20de2ed6d40f..54e065760fa9 100644 --- a/postprocess/prj/build.lst +++ b/postprocess/prj/build.lst @@ -1,4 +1,4 @@ -po postprocess :: accessibility automation basctl bean BINFILTER:binfilter chart2 configmgr CRASHREP:crashrep cui dbaccess desktop dtrans embeddedobj embedserv EPM:epm eventattacher extensions extras fileaccess filter forms fpicker helpcontent2 hwpfilter io JAVAINSTALLER2:javainstaller2 lingucomponent MATHMLDTD:MathMLDTD ODK:odk officecfg package padmin psprint_config remotebridges sc scaddins sccomp scp2 scripting sd setup_native slideshow starmath sw sysui testtools ucb UnoControls unoxml ure wizards xmerge xmlsecurity MORE_FONTS:more_fonts DICTIONARIES:dictionaries OOo:pyuno OOo:readlicense_oo SO:top unodevtools JFREEREPORT:jfreereport REPORTBUILDER:reportbuilder reportdesign SDEXT:sdext SWEXT:swext uui writerfilter oox MYSQLC:mysqlc LIBXSLT:libxslt NULL +po postprocess :: accessibility automation basctl bean BINFILTER:binfilter chart2 configmgr CRASHREP:crashrep cui dbaccess desktop dtrans embeddedobj embedserv EPM:epm eventattacher extensions extras fileaccess filter forms fpicker helpcontent2 hwpfilter io JAVAINSTALLER2:javainstaller2 librsvg lingucomponent MATHMLDTD:MathMLDTD ODK:odk officecfg package padmin psprint_config remotebridges sc scaddins sccomp scp2 scripting sd setup_native slideshow starmath sw sysui testtools ucb UnoControls unoxml ure wizards xmerge xmlsecurity MORE_FONTS:more_fonts DICTIONARIES:dictionaries OOo:pyuno OOo:readlicense_oo SO:top unodevtools JFREEREPORT:jfreereport REPORTBUILDER:reportbuilder reportdesign SDEXT:sdext SWEXT:swext uui writerfilter oox MYSQLC:mysqlc LIBXSLT:libxslt NULL po postprocess usr1 - all po_mkout NULL po postprocess\checkxml nmake - all po_checkxml NULL po postprocess\checkdeliver nmake - all po_checkdlv NULL -- cgit v1.2.3 From d182e7fd3d912ca61fdc881beca5bb46df14efad Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Wed, 9 Mar 2011 12:54:36 +0100 Subject: rsvglibs: crate intl.dll and header file for windows --- gettext/gettext-0.18.1.1.patch | 2365 ++++++++++++++++++++++++++++++++++++++++ gettext/makefile.mk | 11 +- 2 files changed, 2375 insertions(+), 1 deletion(-) create mode 100644 gettext/gettext-0.18.1.1.patch diff --git a/gettext/gettext-0.18.1.1.patch b/gettext/gettext-0.18.1.1.patch new file mode 100644 index 000000000000..c0a506332b69 --- /dev/null +++ b/gettext/gettext-0.18.1.1.patch @@ -0,0 +1,2365 @@ +--- misc/gettext-0.18.1.1/gettext-runtime/intl/makefile.mk Wed Aug 20 14:33:55 2008 ++++ misc/build/gettext-0.18.1.1/gettext-runtime/intl/makefile.mk Wed Aug 20 14:26:42 2008 +@@ -1 +1,111 @@ +-dummy ++#************************************************************************* ++# ++# 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=..$/..$/..$/..$/..$/.. ++PRJINC=.. ++PRJNAME=gettext ++TARGET=intl ++ ++#ENABLE_EXCEPTIONS=TRUE ++VISIBILITY_HIDDEN=TRUE ++EXTERNAL_WARNINGS_NOT_ERRORS=TRUE ++ ++# --- Settings ---------------------------------- ++ ++.INCLUDE : settings.mk ++ ++#.IF "$(GUI)$(CPU)"=="WNTP" ++#CFLAGS+= -I .. -D HAVE_CONFIG_H -D FC_CACHEDIR=\".\" -DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 ++#CFLAGS+= -DLOCALEDIR=\"d:/tools/o_rsvglibs/DEV300/ooo/gettext/./wntmsci12/misc/share/locale\" -DLOCALE_ALIAS_PATH=\"d:/tools/o_rsvglibs/DEV300/ooo/gettext/./wntmsci12/misc/share/locale\" -DLIBDIR=\"d:/tools/o_rsvglibs/DEV300/ooo/gettext/./wntmsci12/misc/lib\" ++#CFLAGS+=-DDLL_EXPORT -DPIC -D_LIBC ++CFLAGS+=-c -DLOCALEDIR=\"d:/tools/o_rsvglibs/DEV300/ooo/gettext/./wntmsci12/misc/share/locale\" -DLOCALE_ALIAS_PATH=\"d:/tools/o_rsvglibs/DEV300/ooo/gettext/./wntmsci12/misc/share/locale\" -DLIBDIR=\"d:/tools/o_rsvglibs/DEV300/ooo/gettext/./wntmsci12/misc/lib\" ++CFLAGS+=-DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"d:/tools/o_rsvglibs/DEV300/ooo/gettext/./wntmsci12/misc/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate ++CFLAGS+=-DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -I. -I. -I.. -DDLL_EXPORT -DPIC ++ ++ #.ENDIF ++ ++# --- Files ------------------------------------- ++ ++SLOFILES=\ ++ $(SLO)$/bindtextdom.obj \ ++ $(SLO)$/dcgettext.obj \ ++ $(SLO)$/dgettext.obj \ ++ $(SLO)$/gettext.obj \ ++ $(SLO)$/finddomain.obj \ ++ $(SLO)$/hash-string.obj \ ++ $(SLO)$/loadmsgcat.obj \ ++ $(SLO)$/localealias.obj \ ++ $(SLO)$/textdomain.obj \ ++ $(SLO)$/l10nflist.obj \ ++ $(SLO)$/explodename.obj \ ++ $(SLO)$/dcigettext.obj \ ++ $(SLO)$/dcngettext.obj \ ++ $(SLO)$/dngettext.obj \ ++ $(SLO)$/ngettext.obj \ ++ $(SLO)$/plural.obj \ ++ $(SLO)$/plural-exp.obj \ ++ $(SLO)$/localcharset.obj \ ++ $(SLO)$/threadlib.obj \ ++ $(SLO)$/lock.obj \ ++ $(SLO)$/relocatable.obj \ ++ $(SLO)$/langprefs.obj \ ++ $(SLO)$/localename.obj \ ++ $(SLO)$/log.obj \ ++ $(SLO)$/printf.obj \ ++ $(SLO)$/setlocale.obj \ ++ $(SLO)$/version.obj \ ++ $(SLO)$/osdep.obj \ ++ $(SLO)$/intl-compat.obj ++ ++# --- Library ----------------------------------- ++ ++SHL1TARGET= $(TARGET) ++SHL1OBJS=$(SLOFILES) ++SHL1STDLIBS=\ ++ Advapi32.lib ++ ++ ++SHL1DEPN= ++#SHL1IMPLIB= i$(TARGET) ++#SHL1USE_EXPORTS=name ++ ++SHL1DEF= $(MISC)$/$(SHL1TARGET).def ++ ++DEF1NAME= $(SHL1TARGET) ++DEF1DEPN= $(MISC)$/$(SHL1TARGET).flt \ ++ $(SLB)$/$(TARGET).lib ++DEFLIB1NAME=$(TARGET) ++ ++# --- Targets ---------------------------------- ++ ++.INCLUDE : target.mk ++ ++# --- filter file ------------------------------ ++ ++$(MISC)$/$(SHL1TARGET).flt: makefile.mk ++ @echo CLEAR_THE_FILE > $@ ++ +--- misc/gettext-0.18.1.1/gettext-runtime/intl/printf-parse.c 2010-06-06 14:49:57.000000000 +0200 ++++ misc/build/gettext-0.18.1.1/gettext-runtime/intl/printf-parse.c 2011-03-09 11:51:02.615094200 +0100 +@@ -75,6 +74,9 @@ + # include "c-ctype.h" + #endif + ++typedef __int64 intmax_t; ++ ++ + #ifdef STATIC + STATIC + #endif +--- misc/gettext-0.18.1.1/gettext-runtime/config.h Wed Aug 20 14:33:55 2008 ++++ misc/build/gettext-0.18.1.1/gettext-runtime/config.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,1288 @@ +-dummy ++/* config.h. Generated from config.h.in by configure. */ ++/* config.h.in. Generated from configure.ac by autoheader. */ ++ ++/* Define if the compiler is building for multiple architectures of Apple ++ platforms at once. */ ++/* #undef AA_APPLE_UNIVERSAL_BUILD */ ++ ++/* Define to the number of bits in type 'ptrdiff_t'. */ ++#define BITSIZEOF_PTRDIFF_T 32 ++ ++/* Define to the number of bits in type 'sig_atomic_t'. */ ++#define BITSIZEOF_SIG_ATOMIC_T 32 ++ ++/* Define to the number of bits in type 'size_t'. */ ++#define BITSIZEOF_SIZE_T 32 ++ ++/* Define to the number of bits in type 'wchar_t'. */ ++#define BITSIZEOF_WCHAR_T 16 ++ ++/* Define to the number of bits in type 'wint_t'. */ ++#define BITSIZEOF_WINT_T 16 ++ ++/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP ++ systems. This function is required for `alloca.c' support on those systems. ++ */ ++/* #undef CRAY_STACKSEG_END */ ++ ++/* Define if mono is the preferred C# implementation. */ ++/* #undef CSHARP_CHOICE_MONO */ ++ ++/* Define if pnet is the preferred C# implementation. */ ++/* #undef CSHARP_CHOICE_PNET */ ++ ++/* Define to 1 if using `alloca.c'. */ ++/* #undef C_ALLOCA */ ++ ++/* Define to 1 if // is a file system root distinct from /. */ ++#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1 ++ ++/* Define to 1 if translation of program messages to the user's native ++ language is requested. */ ++#define ENABLE_NLS 1 ++ ++/* Define to 1 if the package shall run at any location in the file system. */ ++/* #undef ENABLE_RELOCATABLE */ ++ ++/* Define on systems for which file names may have a so-called `drive letter' ++ prefix, define this to compute the length of that prefix, including the ++ colon. */ ++#define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 1 ++ ++/* Define if the backslash character may also serve as a file name component ++ separator. */ ++#define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 1 ++ ++/* Define if a drive letter prefix denotes a relative path if it is not ++ followed by a file name component separator. */ ++#define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1 ++ ++/* Define to 1 if realpath() can malloc memory, always gives an absolute path, ++ and handles trailing slash correctly. */ ++/* #undef FUNC_REALPATH_WORKS */ ++ ++/* Define to a C preprocessor expression that evaluates to 1 or 0, depending ++ whether the gnulib module canonicalize-lgpl shall be considered present. */ ++#define GNULIB_CANONICALIZE_LGPL 1 ++ ++/* Define to a C preprocessor expression that evaluates to 1 or 0, depending ++ whether the gnulib module fwriteerror shall be considered present. */ ++#define GNULIB_FWRITEERROR 1 ++ ++/* Define to a C preprocessor expression that evaluates to 1 or 0, depending ++ whether the gnulib module sigpipe shall be considered present. */ ++#define GNULIB_SIGPIPE 1 ++ ++/* Define to 1 when the gnulib module canonicalize_file_name should be tested. ++ */ ++#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1 ++ ++/* Define to 1 when the gnulib module environ should be tested. */ ++#define GNULIB_TEST_ENVIRON 1 ++ ++/* Define to 1 when the gnulib module getopt-gnu should be tested. */ ++#define GNULIB_TEST_GETOPT_GNU 1 ++ ++/* Define to 1 when the gnulib module lstat should be tested. */ ++#define GNULIB_TEST_LSTAT 1 ++ ++/* Define to 1 when the gnulib module malloc-posix should be tested. */ ++#define GNULIB_TEST_MALLOC_POSIX 1 ++ ++/* Define to 1 when the gnulib module mbrtowc should be tested. */ ++#define GNULIB_TEST_MBRTOWC 1 ++ ++/* Define to 1 when the gnulib module mbsinit should be tested. */ ++#define GNULIB_TEST_MBSINIT 1 ++ ++/* Define to 1 when the gnulib module mbslen should be tested. */ ++#define GNULIB_TEST_MBSLEN 1 ++ ++/* Define to 1 when the gnulib module mbsstr should be tested. */ ++#define GNULIB_TEST_MBSSTR 1 ++ ++/* Define to 1 when the gnulib module memchr should be tested. */ ++#define GNULIB_TEST_MEMCHR 1 ++ ++/* Define to 1 when the gnulib module readlink should be tested. */ ++#define GNULIB_TEST_READLINK 1 ++ ++/* Define to 1 when the gnulib module realpath should be tested. */ ++#define GNULIB_TEST_REALPATH 1 ++ ++/* Define to 1 when the gnulib module sigprocmask should be tested. */ ++#define GNULIB_TEST_SIGPROCMASK 1 ++ ++/* Define to 1 when the gnulib module stat should be tested. */ ++#define GNULIB_TEST_STAT 1 ++ ++/* Define to 1 when the gnulib module strerror should be tested. */ ++#define GNULIB_TEST_STRERROR 1 ++ ++/* Define to 1 when the gnulib module strnlen should be tested. */ ++#define GNULIB_TEST_STRNLEN 1 ++ ++/* Define to 1 when the gnulib module wcwidth should be tested. */ ++#define GNULIB_TEST_WCWIDTH 1 ++ ++/* Define to 1 if you have `alloca', as a function or macro. */ ++#define HAVE_ALLOCA 1 ++ ++/* Define to 1 if you have and it should be used (not on Ultrix). ++ */ ++/* #undef HAVE_ALLOCA_H */ ++ ++/* Define to 1 if you have the `argz_count' function. */ ++/* #undef HAVE_ARGZ_COUNT */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_ARGZ_H */ ++ ++/* Define to 1 if you have the `argz_next' function. */ ++/* #undef HAVE_ARGZ_NEXT */ ++ ++/* Define to 1 if you have the `argz_stringify' function. */ ++/* #undef HAVE_ARGZ_STRINGIFY */ ++ ++/* Define to 1 if you have the `asprintf' function. */ ++/* #undef HAVE_ASPRINTF */ ++ ++/* Define to 1 if you have the `atexit' function. */ ++#define HAVE_ATEXIT 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_BP_SYM_H */ ++ ++/* Define to 1 if the compiler understands __builtin_expect. */ ++/* #undef HAVE_BUILTIN_EXPECT */ ++ ++/* Define to 1 if you have the `canonicalize_file_name' function. */ ++/* #undef HAVE_CANONICALIZE_FILE_NAME */ ++ ++/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the ++ CoreFoundation framework. */ ++/* #undef HAVE_CFLOCALECOPYCURRENT */ ++ ++/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in ++ the CoreFoundation framework. */ ++/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ ++ ++/* Define if the GNU dcgettext() function is already present or preinstalled. ++ */ ++/* #undef HAVE_DCGETTEXT */ ++ ++/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if ++ you don't. */ ++#define HAVE_DECL_CLEARERR_UNLOCKED 0 ++ ++/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you ++ don't. */ ++#define HAVE_DECL_FEOF_UNLOCKED 0 ++ ++/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if ++ you don't. */ ++#define HAVE_DECL_FERROR_UNLOCKED 0 ++ ++/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if ++ you don't. */ ++#define HAVE_DECL_FFLUSH_UNLOCKED 0 ++ ++/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if ++ you don't. */ ++#define HAVE_DECL_FGETS_UNLOCKED 0 ++ ++/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if ++ you don't. */ ++#define HAVE_DECL_FPUTC_UNLOCKED 0 ++ ++/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if ++ you don't. */ ++#define HAVE_DECL_FPUTS_UNLOCKED 0 ++ ++/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if ++ you don't. */ ++#define HAVE_DECL_FREAD_UNLOCKED 0 ++ ++/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if ++ you don't. */ ++#define HAVE_DECL_FWRITE_UNLOCKED 0 ++ ++/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if ++ you don't. */ ++#define HAVE_DECL_GETCHAR_UNLOCKED 0 ++ ++/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you ++ don't. */ ++#define HAVE_DECL_GETC_UNLOCKED 0 ++ ++/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. ++ */ ++#define HAVE_DECL_GETENV 1 ++ ++/* Define to 1 if you have the declaration of `getopt_clip', and to 0 if you ++ don't. */ ++/* #undef HAVE_DECL_GETOPT_CLIP */ ++ ++/* Define to 1 if you have the declaration of `optreset', and to 0 if you ++ don't. */ ++/* #undef HAVE_DECL_OPTRESET */ ++ ++/* Define to 1 if you have the declaration of `program_invocation_name', and ++ to 0 if you don't. */ ++#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 ++ ++/* Define to 1 if you have the declaration of `program_invocation_short_name', ++ and to 0 if you don't. */ ++#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 ++ ++/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if ++ you don't. */ ++#define HAVE_DECL_PUTCHAR_UNLOCKED 0 ++ ++/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you ++ don't. */ ++#define HAVE_DECL_PUTC_UNLOCKED 0 ++ ++/* Define to 1 if you have the declaration of `strerror', and to 0 if you ++ don't. */ ++#define HAVE_DECL_STRERROR 1 ++ ++/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you ++ don't. */ ++#define HAVE_DECL_STRERROR_R 0 ++ ++/* Define to 1 if you have the declaration of `strnlen', and to 0 if you ++ don't. */ ++#define HAVE_DECL_STRNLEN 1 ++ ++/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you ++ don't. */ ++#define HAVE_DECL_WCWIDTH 0 ++ ++/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you ++ don't. */ ++#define HAVE_DECL__SNPRINTF 1 ++ ++/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you ++ don't. */ ++#define HAVE_DECL__SNWPRINTF 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_DLFCN_H */ ++ ++/* Define if you have the declaration of environ. */ ++/* #undef HAVE_ENVIRON_DECL */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_ERRNO_H 1 ++ ++/* Define to 1 if you have the `fwprintf' function. */ ++#define HAVE_FWPRINTF 1 ++ ++/* Define to 1 if you have the `getcwd' function. */ ++#define HAVE_GETCWD 1 ++ ++/* Define to 1 if you have the `getegid' function. */ ++/* #undef HAVE_GETEGID */ ++ ++/* Define to 1 if you have the `geteuid' function. */ ++/* #undef HAVE_GETEUID */ ++ ++/* Define to 1 if you have the `getgid' function. */ ++/* #undef HAVE_GETGID */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_GETOPT_H */ ++ ++/* Define to 1 if you have the `getopt_long_only' function. */ ++/* #undef HAVE_GETOPT_LONG_ONLY */ ++ ++/* Define to 1 if you have the `getpagesize' function. */ ++/* #undef HAVE_GETPAGESIZE */ ++ ++/* Define if the GNU gettext() function is already present or preinstalled. */ ++/* #undef HAVE_GETTEXT */ ++ ++/* Define to 1 if you have the `getuid' function. */ ++/* #undef HAVE_GETUID */ ++ ++/* Define if you have the iconv() function and it works. */ ++/* #undef HAVE_ICONV */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_ICONV_H */ ++ ++/* Define if you have the 'intmax_t' type in or . */ ++/* #undef HAVE_INTMAX_T */ ++#ifndef _MSC_VER ++#define HAVE_INTMAX_T 1 ++#else /* _MSC_VER */ ++/* #undef HAVE_INTMAX_T */ ++#endif /* _MSC_VER */ ++ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_INTTYPES_H */ ++#ifndef _MSC_VER ++#define HAVE_INTTYPES_H 1 ++#else /* _MSC_VER */ ++/* #undef HAVE_INTTYPES_H */ ++#endif /* _MSC_VER */ ++ ++ ++/* Define if exists, doesn't clash with , and ++ declares uintmax_t. */ ++/* #undef HAVE_INTTYPES_H_WITH_UINTMAX */ ++#ifndef _MSC_VER ++#define HAVE_INTTYPES_H_WITH_UINTMAX 1 ++#else /* _MSC_VER */ ++/* #undef HAVE_INTTYPES_H_WITH_UINTMAX */ ++#endif /* _MSC_VER */ ++ ++ ++/* Define to 1 if you have the `iswblank' function. */ ++/* #undef HAVE_ISWBLANK */ ++ ++/* Define to 1 if you have the `iswcntrl' function. */ ++#define HAVE_ISWCNTRL 1 ++ ++/* Define if you have and nl_langinfo(CODESET). */ ++/* #undef HAVE_LANGINFO_CODESET */ ++ ++/* Define if your file defines LC_MESSAGES. */ ++/* #undef HAVE_LC_MESSAGES */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_LIMITS_H 1 ++ ++/* Define to 1 if the system has the type `long long int'. */ ++#define HAVE_LONG_LONG_INT 1 ++ ++/* Define to 1 if you have the `lstat' function. */ ++/* #undef HAVE_LSTAT */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_MACH_O_DYLD_H */ ++ ++/* Define if the 'malloc' function is POSIX compliant. */ ++/* #undef HAVE_MALLOC_POSIX */ ++ ++/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including ++ config.h and . */ ++/* #undef HAVE_MAP_ANONYMOUS */ ++ ++/* Define to 1 if you have the `mbrtowc' function. */ ++#define HAVE_MBRTOWC 1 ++ ++/* Define to 1 if you have the `mbsinit' function. */ ++/* #undef HAVE_MBSINIT */ ++ ++/* Define to 1 if you have the `mbslen' function. */ ++/* #undef HAVE_MBSLEN */ ++ ++/* Define to 1 if declares mbstate_t. */ ++#define HAVE_MBSTATE_T 1 ++ ++/* Define to 1 if you have the `memchr' function. */ ++#define HAVE_MEMCHR 1 ++ ++/* Define to 1 if you have the `memmove' function. */ ++#define HAVE_MEMMOVE 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_MEMORY_H 1 ++ ++/* Define to 1 if you have the `mempcpy' function. */ ++/* #undef HAVE_MEMPCPY */ ++ ++/* Define to 1 if you have a working `mmap' system call. */ ++/* #undef HAVE_MMAP */ ++ ++/* Define to 1 if you have the `mprotect' function. */ ++/* #undef HAVE_MPROTECT */ ++ ++/* Define to 1 if you have the `munmap' function. */ ++/* #undef HAVE_MUNMAP */ ++ ++/* Define to 1 if you have the `newlocale' function. */ ++/* #undef HAVE_NEWLOCALE */ ++ ++/* Define to 1 if you have the `pathconf' function. */ ++/* #undef HAVE_PATHCONF */ ++ ++/* Define if your printf() function supports format strings with positions. */ ++/* #undef HAVE_POSIX_PRINTF */ ++ ++/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ ++/* #undef HAVE_PTHREAD_MUTEX_RECURSIVE */ ++ ++/* Define if the POSIX multithreading library has read/write locks. */ ++/* #undef HAVE_PTHREAD_RWLOCK */ ++ ++/* Define to 1 if you have the `putenv' function. */ ++#define HAVE_PUTENV 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_RANDOM_H */ ++ ++/* Define to 1 if atoll is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_ATOLL */ ++ ++/* Define to 1 if btowc is declared even after undefining macros. */ ++#define HAVE_RAW_DECL_BTOWC 1 ++ ++/* Define to 1 if canonicalize_file_name is declared even after undefining ++ macros. */ ++/* #undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME */ ++ ++/* Define to 1 if chown is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_CHOWN */ ++ ++/* Define to 1 if dprintf is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_DPRINTF */ ++ ++/* Define to 1 if dup2 is declared even after undefining macros. */ ++#define HAVE_RAW_DECL_DUP2 1 ++ ++/* Define to 1 if dup3 is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_DUP3 */ ++ ++/* Define to 1 if endusershell is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_ENDUSERSHELL */ ++ ++/* Define to 1 if environ is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_ENVIRON */ ++ ++/* Define to 1 if euidaccess is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_EUIDACCESS */ ++ ++/* Define to 1 if faccessat is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_FACCESSAT */ ++ ++/* Define to 1 if fchdir is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_FCHDIR */ ++ ++/* Define to 1 if fchmodat is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_FCHMODAT */ ++ ++/* Define to 1 if fchownat is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_FCHOWNAT */ ++ ++/* Define to 1 if fpurge is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_FPURGE */ ++ ++/* Define to 1 if fseeko is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_FSEEKO */ ++ ++/* Define to 1 if fstatat is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_FSTATAT */ ++ ++/* Define to 1 if fsync is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_FSYNC */ ++ ++/* Define to 1 if ftello is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_FTELLO */ ++ ++/* Define to 1 if ftruncate is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_FTRUNCATE */ ++ ++/* Define to 1 if futimens is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_FUTIMENS */ ++ ++/* Define to 1 if getcwd is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_GETCWD */ ++ ++/* Define to 1 if getdelim is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_GETDELIM */ ++ ++/* Define to 1 if getdomainname is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_GETDOMAINNAME */ ++ ++/* Define to 1 if getdtablesize is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_GETDTABLESIZE */ ++ ++/* Define to 1 if getgroups is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_GETGROUPS */ ++ ++/* Define to 1 if gethostname is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_GETHOSTNAME */ ++ ++/* Define to 1 if getline is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_GETLINE */ ++ ++/* Define to 1 if getloadavg is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_GETLOADAVG */ ++ ++/* Define to 1 if getlogin is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_GETLOGIN */ ++ ++/* Define to 1 if getlogin_r is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_GETLOGIN_R */ ++ ++/* Define to 1 if getpagesize is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_GETPAGESIZE */ ++ ++/* Define to 1 if getsubopt is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_GETSUBOPT */ ++ ++/* Define to 1 if getusershell is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_GETUSERSHELL */ ++ ++/* Define to 1 if grantpt is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_GRANTPT */ ++ ++/* Define to 1 if initstat_r is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_INITSTAT_R */ ++ ++/* Define to 1 if lchmod is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_LCHMOD */ ++ ++/* Define to 1 if lchown is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_LCHOWN */ ++ ++/* Define to 1 if link is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_LINK */ ++ ++/* Define to 1 if linkat is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_LINKAT */ ++ ++/* Define to 1 if lseek is declared even after undefining macros. */ ++#define HAVE_RAW_DECL_LSEEK 1 ++ ++/* Define to 1 if lstat is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_LSTAT */ ++ ++/* Define to 1 if mbrlen is declared even after undefining macros. */ ++#define HAVE_RAW_DECL_MBRLEN 1 ++ ++/* Define to 1 if mbrtowc is declared even after undefining macros. */ ++#define HAVE_RAW_DECL_MBRTOWC 1 ++ ++/* Define to 1 if mbsinit is declared even after undefining macros. */ ++#define HAVE_RAW_DECL_MBSINIT 1 ++ ++/* Define to 1 if mbsnrtowcs is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_MBSNRTOWCS */ ++ ++/* Define to 1 if mbsrtowcs is declared even after undefining macros. */ ++#define HAVE_RAW_DECL_MBSRTOWCS 1 ++ ++/* Define to 1 if memmem is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_MEMMEM */ ++ ++/* Define to 1 if mempcpy is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_MEMPCPY */ ++ ++/* Define to 1 if memrchr is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_MEMRCHR */ ++ ++/* Define to 1 if mkdirat is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_MKDIRAT */ ++ ++/* Define to 1 if mkdtemp is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_MKDTEMP */ ++ ++/* Define to 1 if mkfifo is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_MKFIFO */ ++ ++/* Define to 1 if mkfifoat is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_MKFIFOAT */ ++ ++/* Define to 1 if mknod is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_MKNOD */ ++ ++/* Define to 1 if mknodat is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_MKNODAT */ ++ ++/* Define to 1 if mkostemp is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_MKOSTEMP */ ++ ++/* Define to 1 if mkostemps is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_MKOSTEMPS */ ++ ++/* Define to 1 if mkstemp is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_MKSTEMP */ ++ ++/* Define to 1 if mkstemps is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_MKSTEMPS */ ++ ++/* Define to 1 if pipe2 is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_PIPE2 */ ++ ++/* Define to 1 if popen is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_POPEN */ ++ ++/* Define to 1 if pread is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_PREAD */ ++ ++/* Define to 1 if ptsname is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_PTSNAME */ ++ ++/* Define to 1 if pwrite is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_PWRITE */ ++ ++/* Define to 1 if random_r is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_RANDOM_R */ ++ ++/* Define to 1 if rawmemchr is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_RAWMEMCHR */ ++ ++/* Define to 1 if readlink is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_READLINK */ ++ ++/* Define to 1 if readlinkat is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_READLINKAT */ ++ ++/* Define to 1 if realpath is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_REALPATH */ ++ ++/* Define to 1 if renameat is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_RENAMEAT */ ++ ++/* Define to 1 if rmdir is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_RMDIR */ ++ ++/* Define to 1 if rpmatch is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_RPMATCH */ ++ ++/* Define to 1 if setenv is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_SETENV */ ++ ++/* Define to 1 if setstate_r is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_SETSTATE_R */ ++ ++/* Define to 1 if setusershell is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_SETUSERSHELL */ ++ ++/* Define to 1 if sigaction is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_SIGACTION */ ++ ++/* Define to 1 if sigaddset is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_SIGADDSET */ ++ ++/* Define to 1 if sigdelset is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_SIGDELSET */ ++ ++/* Define to 1 if sigemptyset is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_SIGEMPTYSET */ ++ ++/* Define to 1 if sigfillset is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_SIGFILLSET */ ++ ++/* Define to 1 if sigismember is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_SIGISMEMBER */ ++ ++/* Define to 1 if sigpending is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_SIGPENDING */ ++ ++/* Define to 1 if sigprocmask is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_SIGPROCMASK */ ++ ++/* Define to 1 if sleep is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_SLEEP */ ++ ++/* Define to 1 if snprintf is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_SNPRINTF */ ++ ++/* Define to 1 if srandom_r is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_SRANDOM_R */ ++ ++/* Define to 1 if stat is declared even after undefining macros. */ ++#define HAVE_RAW_DECL_STAT 1 ++ ++/* Define to 1 if stpcpy is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_STPCPY */ ++ ++/* Define to 1 if stpncpy is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_STPNCPY */ ++ ++/* Define to 1 if strcasestr is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_STRCASESTR */ ++ ++/* Define to 1 if strchrnul is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_STRCHRNUL */ ++ ++/* Define to 1 if strdup is declared even after undefining macros. */ ++#define HAVE_RAW_DECL_STRDUP 1 ++ ++/* Define to 1 if strncat is declared even after undefining macros. */ ++#define HAVE_RAW_DECL_STRNCAT 1 ++ ++/* Define to 1 if strndup is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_STRNDUP */ ++ ++/* Define to 1 if strnlen is declared even after undefining macros. */ ++#define HAVE_RAW_DECL_STRNLEN 1 ++ ++/* Define to 1 if strpbrk is declared even after undefining macros. */ ++#define HAVE_RAW_DECL_STRPBRK 1 ++ ++/* Define to 1 if strsep is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_STRSEP */ ++ ++/* Define to 1 if strsignal is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_STRSIGNAL */ ++ ++/* Define to 1 if strtod is declared even after undefining macros. */ ++#define HAVE_RAW_DECL_STRTOD 1 ++ ++/* Define to 1 if strtok_r is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_STRTOK_R */ ++ ++/* Define to 1 if strtoll is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_STRTOLL */ ++ ++/* Define to 1 if strtoull is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_STRTOULL */ ++ ++/* Define to 1 if strverscmp is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_STRVERSCMP */ ++ ++/* Define to 1 if symlink is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_SYMLINK */ ++ ++/* Define to 1 if symlinkat is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_SYMLINKAT */ ++ ++/* Define to 1 if tmpfile is declared even after undefining macros. */ ++#define HAVE_RAW_DECL_TMPFILE 1 ++ ++/* Define to 1 if ttyname_r is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_TTYNAME_R */ ++ ++/* Define to 1 if unlink is declared even after undefining macros. */ ++#define HAVE_RAW_DECL_UNLINK 1 ++ ++/* Define to 1 if unlinkat is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_UNLINKAT */ ++ ++/* Define to 1 if unlockpt is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_UNLOCKPT */ ++ ++/* Define to 1 if unsetenv is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_UNSETENV */ ++ ++/* Define to 1 if usleep is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_USLEEP */ ++ ++/* Define to 1 if utimensat is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_UTIMENSAT */ ++ ++/* Define to 1 if vdprintf is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_VDPRINTF */ ++ ++/* Define to 1 if vsnprintf is declared even after undefining macros. */ ++#define HAVE_RAW_DECL_VSNPRINTF 1 ++ ++/* Define to 1 if wcrtomb is declared even after undefining macros. */ ++#define HAVE_RAW_DECL_WCRTOMB 1 ++ ++/* Define to 1 if wcsnrtombs is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_WCSNRTOMBS */ ++ ++/* Define to 1 if wcsrtombs is declared even after undefining macros. */ ++#define HAVE_RAW_DECL_WCSRTOMBS 1 ++ ++/* Define to 1 if wctob is declared even after undefining macros. */ ++#define HAVE_RAW_DECL_WCTOB 1 ++ ++/* Define to 1 if wcwidth is declared even after undefining macros. */ ++/* #undef HAVE_RAW_DECL_WCWIDTH */ ++ ++/* Define to 1 if you have the `readlink' function. */ ++/* #undef HAVE_READLINK */ ++ ++/* Define to 1 if you have the `realpath' function. */ ++/* #undef HAVE_REALPATH */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SEARCH_H 1 ++ ++/* Define to 1 if you have the `setenv' function. */ ++/* #undef HAVE_SETENV */ ++ ++/* Define to 1 if you have the `setlocale' function. */ ++#define HAVE_SETLOCALE 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SIGNAL_H 1 ++ ++/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ ++#define HAVE_SIGNED_SIG_ATOMIC_T 1 ++ ++/* Define to 1 if 'wchar_t' is a signed integer type. */ ++/* #undef HAVE_SIGNED_WCHAR_T */ ++ ++/* Define to 1 if 'wint_t' is a signed integer type. */ ++/* #undef HAVE_SIGNED_WINT_T */ ++ ++/* Define to 1 if the system has the type `sigset_t'. */ ++/* #undef HAVE_SIGSET_T */ ++ ++/* Define to 1 if you have the `snprintf' function. */ ++/* #undef HAVE_SNPRINTF */ ++ ++/* Define to 1 if stdbool.h conforms to C99. */ ++/* #undef HAVE_STDBOOL_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STDDEF_H 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_STDINT_H */ ++ ++/* Define if exists, doesn't clash with , and declares ++ uintmax_t. */ ++/* #undef HAVE_STDINT_H_WITH_UINTMAX */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STDIO_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STDLIB_H 1 ++ ++/* Define to 1 if you have the `stpcpy' function. */ ++/* #undef HAVE_STPCPY */ ++ ++/* Define to 1 if you have the `strcasecmp' function. */ ++/* #undef HAVE_STRCASECMP */ ++ ++/* Define to 1 if you have the `strdup' function. */ ++#define HAVE_STRDUP 1 ++ ++/* Define to 1 if you have the `strerror_r' function. */ ++/* #undef HAVE_STRERROR_R */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_STRINGS_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STRING_H 1 ++ ++/* Define to 1 if you have the `strnlen' function. */ ++#define HAVE_STRNLEN 1 ++ ++/* Define to 1 if you have the `strtol' function. */ ++#define HAVE_STRTOL 1 ++ ++/* Define to 1 if you have the `strtoul' function. */ ++#define HAVE_STRTOUL 1 ++ ++/* Define to 1 if the system has the type `struct random_data'. */ ++/* #undef HAVE_STRUCT_RANDOM_DATA */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_BITYPES_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_INTTYPES_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_MMAN_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_PARAM_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_SOCKET_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_STAT_H 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_TIME_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_TYPES_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_TIME_H 1 ++ ++/* Define to 1 if you have the `tsearch' function. */ ++/* #undef HAVE_TSEARCH */ ++ ++/* Define if you have the 'uintmax_t' type in or . */ ++/* #undef HAVE_UINTMAX_T */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_UNISTD_H 1 ++ ++/* Define to 1 if the system has the type `unsigned long long int'. */ ++#define HAVE_UNSIGNED_LONG_LONG_INT 1 ++ ++/* Define to 1 if you have the `uselocale' function. */ ++/* #undef HAVE_USELOCALE */ ++ ++/* Define to 1 or 0, depending whether the compiler supports simple visibility ++ declarations. */ ++#define HAVE_VISIBILITY 0 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_WCHAR_H 1 ++ ++/* Define if you have the 'wchar_t' type. */ ++#define HAVE_WCHAR_T 1 ++ ++/* Define to 1 if you have the `wcrtomb' function. */ ++#define HAVE_WCRTOMB 1 ++ ++/* Define to 1 if you have the `wcslen' function. */ ++#define HAVE_WCSLEN 1 ++ ++/* Define to 1 if you have the `wcsnlen' function. */ ++#define HAVE_WCSNLEN 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_WCTYPE_H 1 ++ ++/* Define to 1 if you have the `wcwidth' function. */ ++/* #undef HAVE_WCWIDTH */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_WINSOCK2_H 1 ++ ++/* Define if you have the 'wint_t' type. */ ++#define HAVE_WINT_T 1 ++ ++/* Define to 1 if O_NOATIME works. */ ++#define HAVE_WORKING_O_NOATIME 0 ++ ++/* Define to 1 if O_NOFOLLOW works. */ ++#define HAVE_WORKING_O_NOFOLLOW 0 ++ ++/* Define to 1 if the system has the type `_Bool'. */ ++/* #undef HAVE__BOOL */ ++ ++/* Define to 1 if you have the `_NSGetExecutablePath' function. */ ++/* #undef HAVE__NSGETEXECUTABLEPATH */ ++ ++/* Define to 1 if you have the `__fsetlocking' function. */ ++/* #undef HAVE___FSETLOCKING */ ++ ++/* Define as const if the declaration of iconv() needs const. */ ++/* #undef ICONV_CONST */ ++ ++/* Define to a symbolic name denoting the flavor of iconv_open() ++ implementation. */ ++/* #undef ICONV_FLAVOR */ ++ ++/* Define to the value of ${prefix}, as a string. */ ++#define INSTALLPREFIX "d:/tools/o_rsvglibs/DEV300/ooo/gettext/./wntmsci12/misc" ++ ++/* Define if integer division by zero raises signal SIGFPE. */ ++#define INTDIV0_RAISES_SIGFPE 0 ++ ++#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ++# define ISSLASH(C) ((C) == '/' || (C) == '\\') ++#else ++# define ISSLASH(C) ((C) == '/') ++#endif ++ ++/* Define to 1 if `lstat' dereferences a symlink specified with a trailing ++ slash. */ ++/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */ ++ ++/* Define to the sub-directory in which libtool stores uninstalled libraries. ++ */ ++#define LT_OBJDIR ".libs/" ++ ++/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ ++#define MALLOC_0_IS_NONNULL 1 ++ ++/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ ++/* #undef MAP_ANONYMOUS */ ++ ++/* Define if the mbrtowc function has the NULL string argument bug. */ ++/* #undef MBRTOWC_NULL_ARG_BUG */ ++ ++/* Define if the mbrtowc function does not return 0 for a NUL character. */ ++/* #undef MBRTOWC_NUL_RETVAL_BUG */ ++ ++/* Define if the mbrtowc function returns a wrong return value. */ ++/* #undef MBRTOWC_RETVAL_BUG */ ++ ++/* Define to 1 if your C compiler doesn't accept -c and -o together. */ ++#define NO_MINUS_C_MINUS_O 1 ++ ++/* Name of package */ ++#define PACKAGE "gettext-runtime" ++ ++/* Define to the address where bug reports for this package should be sent. */ ++#define PACKAGE_BUGREPORT "" ++ ++/* Define to the full name of this package. */ ++#define PACKAGE_NAME "" ++ ++/* Define to the full name and version of this package. */ ++#define PACKAGE_STRING "" ++ ++/* Define to the one symbol short name of this package. */ ++#define PACKAGE_TARNAME "" ++ ++/* Define to the home page for this package. */ ++#define PACKAGE_URL "" ++ ++/* Define to the version of this package. */ ++#define PACKAGE_VERSION "" ++ ++/* Define if exists and defines unusable PRI* macros. */ ++/* #undef PRI_MACROS_BROKEN */ ++ ++/* Define if the pthread_in_use() detection is hard. */ ++/* #undef PTHREAD_IN_USE_DETECTION_HARD */ ++ ++/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type ++ 'ptrdiff_t'. */ ++#define PTRDIFF_T_SUFFIX ++ ++/* Define to 1 if readlink fails to recognize a trailing slash. */ ++/* #undef READLINK_TRAILING_SLASH_BUG */ ++ ++/* Define to 1 if stat needs help when passed a directory name with a trailing ++ slash */ ++#define REPLACE_FUNC_STAT_DIR 1 ++ ++/* Define to 1 if stat needs help when passed a file name with a trailing ++ slash */ ++/* #undef REPLACE_FUNC_STAT_FILE */ ++ ++/* Define this to 1 if strerror is broken. */ ++#define REPLACE_STRERROR 1 ++ ++/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type ++ 'sig_atomic_t'. */ ++#define SIG_ATOMIC_T_SUFFIX ++ ++/* Define as the maximum value of type 'size_t', if the system doesn't define ++ it. */ ++#ifndef SIZE_MAX ++/* # undef SIZE_MAX */ ++#endif ++ ++/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type ++ 'size_t'. */ ++#define SIZE_T_SUFFIX u ++ ++/* If using the C implementation of alloca, define if you know the ++ direction of stack growth for your system; otherwise it will be ++ automatically deduced at runtime. ++ STACK_DIRECTION > 0 => grows toward higher addresses ++ STACK_DIRECTION < 0 => grows toward lower addresses ++ STACK_DIRECTION = 0 => direction of growth unknown */ ++/* #undef STACK_DIRECTION */ ++ ++/* Define to 1 if the `S_IS*' macros in do not work properly. */ ++/* #undef STAT_MACROS_BROKEN */ ++ ++/* Define to 1 if you have the ANSI C header files. */ ++#define STDC_HEADERS 1 ++ ++/* Define to 1 if strerror_r returns char *. */ ++/* #undef STRERROR_R_CHAR_P */ ++ ++/* Define to the prefix of C symbols at the assembler and linker level, either ++ an underscore or empty. */ ++#define USER_LABEL_PREFIX ++ ++/* Define if the POSIX multithreading library can be used. */ ++/* #undef USE_POSIX_THREADS */ ++ ++/* Define if references to the POSIX multithreading library should be made ++ weak. */ ++/* #undef USE_POSIX_THREADS_WEAK */ ++ ++/* Define if the GNU Pth multithreading library can be used. */ ++/* #undef USE_PTH_THREADS */ ++ ++/* Define if references to the GNU Pth multithreading library should be made ++ weak. */ ++/* #undef USE_PTH_THREADS_WEAK */ ++ ++/* Define if the old Solaris multithreading library can be used. */ ++/* #undef USE_SOLARIS_THREADS */ ++ ++/* Define if references to the old Solaris multithreading library should be ++ made weak. */ ++/* #undef USE_SOLARIS_THREADS_WEAK */ ++ ++/* Define to 1 if you want getc etc. to use unlocked I/O if available. ++ Unlocked I/O can improve performance in unithreaded apps, but it is not ++ safe for multithreaded apps. */ ++#define USE_UNLOCKED_IO 1 ++ ++/* Define if the Win32 multithreading API can be used. */ ++/* #undef USE_WIN32_THREADS */ ++ ++/* Version number of package */ ++#define VERSION "0.18.1" ++ ++/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type ++ 'wchar_t'. */ ++#define WCHAR_T_SUFFIX ++ ++/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type ++ 'wint_t'. */ ++#define WINT_T_SUFFIX ++ ++/* Define to 1 if on MINIX. */ ++/* #undef _MINIX */ ++ ++/* Define to 2 if the system does not provide POSIX.1 features except with ++ this defined. */ ++/* #undef _POSIX_1_SOURCE */ ++ ++/* Define to 1 if you need to in order for `stat' and other things to work. */ ++/* #undef _POSIX_SOURCE */ ++ ++/* Define to 500 only on HP-UX. */ ++/* #undef _XOPEN_SOURCE */ ++ ++/* Enable extensions on AIX 3, Interix. */ ++#ifndef _ALL_SOURCE ++# define _ALL_SOURCE 1 ++#endif ++/* Enable GNU extensions on systems that have them. */ ++#ifndef _GNU_SOURCE ++# define _GNU_SOURCE 1 ++#endif ++/* Enable threading extensions on Solaris. */ ++#ifndef _POSIX_PTHREAD_SEMANTICS ++# define _POSIX_PTHREAD_SEMANTICS 1 ++#endif ++/* Enable extensions on HP NonStop. */ ++#ifndef _TANDEM_SOURCE ++# define _TANDEM_SOURCE 1 ++#endif ++/* Enable general extensions on Solaris. */ ++#ifndef __EXTENSIONS__ ++# define __EXTENSIONS__ 1 ++#endif ++ ++ ++/* Define to rpl_ if the getopt replacement functions and variables should be ++ used. */ ++#define __GETOPT_PREFIX rpl_ ++ ++/* Define to `int' if doesn't define. */ ++#define gid_t int ++ ++/* Define to `__inline__' or `__inline' if that's what the C compiler ++ calls it, or to nothing if 'inline' is not supported under any name. */ ++#ifndef __cplusplus ++#define inline __inline ++#endif ++ ++/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports ++ the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of ++ earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. ++ __APPLE__ && __MACH__ test for MacOS X. ++ __APPLE_CC__ tests for the Apple compiler and its version. ++ __STDC_VERSION__ tests for the C99 mode. */ ++#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ ++# define __GNUC_STDC_INLINE__ 1 ++#endif ++ ++/* Define to a type if does not define. */ ++/* #undef mbstate_t */ ++ ++/* Define to the type of st_nlink in struct stat, or a supertype. */ ++#define nlink_t int ++ ++/* Define as the type of the result of subtracting two pointers, if the system ++ doesn't define it. */ ++/* #undef ptrdiff_t */ ++ ++/* Define to the equivalent of the C99 'restrict' keyword, or to ++ nothing if this is not supported. Do not define if restrict is ++ supported directly. */ ++#define restrict /**/ ++/* Work around a bug in Sun C++: it does not support _Restrict or ++ __restrict__, even though the corresponding Sun C compiler ends up with ++ "#define restrict _Restrict" or "#define restrict __restrict__" in the ++ previous line. Perhaps some future version of Sun C++ will work with ++ restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ ++#if defined __SUNPRO_CC && !defined __RESTRICT ++# define _Restrict ++# define __restrict__ ++#endif ++ ++/* Define to `unsigned int' if does not define. */ ++/* #undef size_t */ ++ ++/* Define as a signed type of the same size as size_t. */ ++#define ssize_t int ++ ++/* Define to `int' if doesn't define. */ ++#define uid_t int ++ ++/* Define to unsigned long or unsigned long long if and ++ don't define. */ ++#define uintmax_t unsigned long long ++ ++/* Define as a marker that can be attached to declarations that might not ++ be used. This helps to reduce warnings, such as from ++ GCC -Wunused-parameter. */ ++#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) ++# define _GL_UNUSED __attribute__ ((__unused__)) ++#else ++# define _GL_UNUSED ++#endif ++/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name ++ is a misnomer outside of parameter lists. */ ++#define _UNUSED_PARAMETER_ _GL_UNUSED ++ ++ ++ ++#define __libc_lock_t gl_lock_t ++#define __libc_lock_define gl_lock_define ++#define __libc_lock_define_initialized gl_lock_define_initialized ++#define __libc_lock_init gl_lock_init ++#define __libc_lock_lock gl_lock_lock ++#define __libc_lock_unlock gl_lock_unlock ++#define __libc_lock_recursive_t gl_recursive_lock_t ++#define __libc_lock_define_recursive gl_recursive_lock_define ++#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized ++#define __libc_lock_init_recursive gl_recursive_lock_init ++#define __libc_lock_lock_recursive gl_recursive_lock_lock ++#define __libc_lock_unlock_recursive gl_recursive_lock_unlock ++#define glthread_in_use libintl_thread_in_use ++#define glthread_lock_init_func libintl_lock_init_func ++#define glthread_lock_lock_func libintl_lock_lock_func ++#define glthread_lock_unlock_func libintl_lock_unlock_func ++#define glthread_lock_destroy_func libintl_lock_destroy_func ++#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded ++#define glthread_rwlock_init_func libintl_rwlock_init_func ++#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded ++#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func ++#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded ++#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func ++#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded ++#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func ++#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded ++#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func ++#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded ++#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func ++#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded ++#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func ++#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded ++#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func ++#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded ++#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func ++#define glthread_once_func libintl_once_func ++#define glthread_once_singlethreaded libintl_once_singlethreaded ++#define glthread_once_multithreaded libintl_once_multithreaded ++ ++ ++ ++/* On Windows, variables that may be in a DLL must be marked specially. */ ++#if (defined _MSC_VER && defined _DLL) && !defined IN_RELOCWRAPPER ++# define DLL_VARIABLE __declspec (dllimport) ++#else ++# define DLL_VARIABLE ++#endif ++ ++/* Extra OS/2 (emx+gcc) defines. */ ++#ifdef __EMX__ ++# include "intl/os2compat.h" ++#endif ++ +--- misc/gettext-0.18.1.1/gettext-runtime/intl/libgnuintl.h Wed Aug 20 14:33:55 2008 ++++ misc/build/gettext-0.18.1.1/gettext-runtime/intl/libgnuintl.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,473 @@ +-dummy ++/* Message catalogs for internationalization. ++ Copyright (C) 1995-1997, 2000-2010 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify it ++ under the terms of the GNU Library General Public License as published ++ by the Free Software Foundation; either version 2, or (at your option) ++ any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Library General Public License for more details. ++ ++ You should have received a copy of the GNU Library General Public ++ License along with this program; if not, write to the Free Software ++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++ USA. */ ++ ++#ifndef _LIBINTL_H ++#define _LIBINTL_H 1 ++ ++#if 0 && BUILDING_LIBINTL ++#define LIBINTL_DLL_EXPORTED __attribute__((__visibility__("default"))) ++#elif defined _MSC_VER && BUILDING_DLL ++# define LIBINTL_DLL_EXPORTED __declspec(dllexport) ++#else ++#define LIBINTL_DLL_EXPORTED ++#endif ++ ++#include ++#if (defined __APPLE__ && defined __MACH__) && 0 ++# include ++#endif ++ ++/* The LC_MESSAGES locale category is the category used by the functions ++ gettext() and dgettext(). It is specified in POSIX, but not in ANSI C. ++ On systems that don't define it, use an arbitrary value instead. ++ On Solaris, defines __LOCALE_H (or _LOCALE_H in Solaris 2.5) ++ then includes (i.e. this file!) and then only defines ++ LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES ++ in this case. */ ++#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun)) ++# define LC_MESSAGES 1729 ++#endif ++ ++/* We define an additional symbol to signal that we use the GNU ++ implementation of gettext. */ ++#define __USE_GNU_GETTEXT 1 ++ ++/* Provide information about the supported file formats. Returns the ++ maximum minor revision number supported for a given major revision. */ ++#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \ ++ ((major) == 0 || (major) == 1 ? 1 : -1) ++ ++/* Resolve a platform specific conflict on DJGPP. GNU gettext takes ++ precedence over _conio_gettext. */ ++#ifdef __DJGPP__ ++# undef gettext ++#endif ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++ ++/* Version number: (major<<16) + (minor<<8) + subminor */ ++#define LIBINTL_VERSION 0x001201 ++extern LIBINTL_DLL_EXPORTED __declspec (dllimport) int libintl_version; ++ ++ ++/* We redirect the functions to those prefixed with "libintl_". This is ++ necessary, because some systems define gettext/textdomain/... in the C ++ library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer). ++ If we used the unprefixed names, there would be cases where the ++ definition in the C library would override the one in the libintl.so ++ shared library. Recall that on ELF systems, the symbols are looked ++ up in the following order: ++ 1. in the executable, ++ 2. in the shared libraries specified on the link command line, in order, ++ 3. in the dependencies of the shared libraries specified on the link ++ command line, ++ 4. in the dlopen()ed shared libraries, in the order in which they were ++ dlopen()ed. ++ The definition in the C library would override the one in libintl.so if ++ either ++ * -lc is given on the link command line and -lintl isn't, or ++ * -lc is given on the link command line before -lintl, or ++ * libintl.so is a dependency of a dlopen()ed shared library but not ++ linked to the executable at link time. ++ Since Solaris gettext() behaves differently than GNU gettext(), this ++ would be unacceptable. ++ ++ The redirection happens by default through macros in C, so that &gettext ++ is independent of the compilation unit, but through inline functions in ++ C++, in order not to interfere with the name mangling of class fields or ++ class methods called 'gettext'. */ ++ ++/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS. ++ If he doesn't, we choose the method. A third possible method is ++ _INTL_REDIRECT_ASM, supported only by GCC. */ ++#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS) ++# if defined __GNUC__ && __GNUC__ >= 2 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus) ++# define _INTL_REDIRECT_ASM ++# else ++# ifdef __cplusplus ++# define _INTL_REDIRECT_INLINE ++# else ++# define _INTL_REDIRECT_MACROS ++# endif ++# endif ++#endif ++/* Auxiliary macros. */ ++#ifdef _INTL_REDIRECT_ASM ++# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname)) ++# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring ++# define _INTL_STRINGIFY(prefix) #prefix ++#else ++# define _INTL_ASM(cname) ++#endif ++ ++/* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return ++ its n-th argument literally. This enables GCC to warn for example about ++ printf (gettext ("foo %y")). */ ++#if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && defined __cplusplus) ++# define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n))) ++#else ++# define _INTL_MAY_RETURN_STRING_ARG(n) ++#endif ++ ++/* Look up MSGID in the current default message catalog for the current ++ LC_MESSAGES locale. If not found, returns MSGID itself (the default ++ text). */ ++#ifdef _INTL_REDIRECT_INLINE ++extern LIBINTL_DLL_EXPORTED char *libintl_gettext (const char *__msgid) ++ _INTL_MAY_RETURN_STRING_ARG (1); ++static inline char *gettext (const char *__msgid) ++{ ++ return libintl_gettext (__msgid); ++} ++#else ++#ifdef _INTL_REDIRECT_MACROS ++# define gettext libintl_gettext ++#endif ++extern LIBINTL_DLL_EXPORTED char *gettext (const char *__msgid) ++ _INTL_ASM (libintl_gettext) ++ _INTL_MAY_RETURN_STRING_ARG (1); ++#endif ++ ++/* Look up MSGID in the DOMAINNAME message catalog for the current ++ LC_MESSAGES locale. */ ++#ifdef _INTL_REDIRECT_INLINE ++extern LIBINTL_DLL_EXPORTED char *libintl_dgettext (const char *__domainname, const char *__msgid) ++ _INTL_MAY_RETURN_STRING_ARG (2); ++static inline char *dgettext (const char *__domainname, const char *__msgid) ++{ ++ return libintl_dgettext (__domainname, __msgid); ++} ++#else ++#ifdef _INTL_REDIRECT_MACROS ++# define dgettext libintl_dgettext ++#endif ++extern LIBINTL_DLL_EXPORTED char *dgettext (const char *__domainname, const char *__msgid) ++ _INTL_ASM (libintl_dgettext) ++ _INTL_MAY_RETURN_STRING_ARG (2); ++#endif ++ ++/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY ++ locale. */ ++#ifdef _INTL_REDIRECT_INLINE ++extern LIBINTL_DLL_EXPORTED char *libintl_dcgettext (const char *__domainname, const char *__msgid, ++ int __category) ++ _INTL_MAY_RETURN_STRING_ARG (2); ++static inline char *dcgettext (const char *__domainname, const char *__msgid, ++ int __category) ++{ ++ return libintl_dcgettext (__domainname, __msgid, __category); ++} ++#else ++#ifdef _INTL_REDIRECT_MACROS ++# define dcgettext libintl_dcgettext ++#endif ++extern LIBINTL_DLL_EXPORTED char *dcgettext (const char *__domainname, const char *__msgid, ++ int __category) ++ _INTL_ASM (libintl_dcgettext) ++ _INTL_MAY_RETURN_STRING_ARG (2); ++#endif ++ ++ ++/* Similar to `gettext' but select the plural form corresponding to the ++ number N. */ ++#ifdef _INTL_REDIRECT_INLINE ++extern LIBINTL_DLL_EXPORTED char *libintl_ngettext (const char *__msgid1, const char *__msgid2, ++ unsigned long int __n) ++ _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2); ++static inline char *ngettext (const char *__msgid1, const char *__msgid2, ++ unsigned long int __n) ++{ ++ return libintl_ngettext (__msgid1, __msgid2, __n); ++} ++#else ++#ifdef _INTL_REDIRECT_MACROS ++# define ngettext libintl_ngettext ++#endif ++extern LIBINTL_DLL_EXPORTED char *ngettext (const char *__msgid1, const char *__msgid2, ++ unsigned long int __n) ++ _INTL_ASM (libintl_ngettext) ++ _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2); ++#endif ++ ++/* Similar to `dgettext' but select the plural form corresponding to the ++ number N. */ ++#ifdef _INTL_REDIRECT_INLINE ++extern LIBINTL_DLL_EXPORTED char *libintl_dngettext (const char *__domainname, const char *__msgid1, ++ const char *__msgid2, unsigned long int __n) ++ _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); ++static inline char *dngettext (const char *__domainname, const char *__msgid1, ++ const char *__msgid2, unsigned long int __n) ++{ ++ return libintl_dngettext (__domainname, __msgid1, __msgid2, __n); ++} ++#else ++#ifdef _INTL_REDIRECT_MACROS ++# define dngettext libintl_dngettext ++#endif ++extern LIBINTL_DLL_EXPORTED char *dngettext (const char *__domainname, ++ const char *__msgid1, const char *__msgid2, ++ unsigned long int __n) ++ _INTL_ASM (libintl_dngettext) ++ _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); ++#endif ++ ++/* Similar to `dcgettext' but select the plural form corresponding to the ++ number N. */ ++#ifdef _INTL_REDIRECT_INLINE ++extern LIBINTL_DLL_EXPORTED char *libintl_dcngettext (const char *__domainname, ++ const char *__msgid1, const char *__msgid2, ++ unsigned long int __n, int __category) ++ _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); ++static inline char *dcngettext (const char *__domainname, ++ const char *__msgid1, const char *__msgid2, ++ unsigned long int __n, int __category) ++{ ++ return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category); ++} ++#else ++#ifdef _INTL_REDIRECT_MACROS ++# define dcngettext libintl_dcngettext ++#endif ++extern LIBINTL_DLL_EXPORTED char *dcngettext (const char *__domainname, ++ const char *__msgid1, const char *__msgid2, ++ unsigned long int __n, int __category) ++ _INTL_ASM (libintl_dcngettext) ++ _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); ++#endif ++ ++ ++ ++/* Set the current default message catalog to DOMAINNAME. ++ If DOMAINNAME is null, return the current default. ++ If DOMAINNAME is "", reset to the default of "messages". */ ++#ifdef _INTL_REDIRECT_INLINE ++extern LIBINTL_DLL_EXPORTED char *libintl_textdomain (const char *__domainname); ++static inline char *textdomain (const char *__domainname) ++{ ++ return libintl_textdomain (__domainname); ++} ++#else ++#ifdef _INTL_REDIRECT_MACROS ++# define textdomain libintl_textdomain ++#endif ++extern LIBINTL_DLL_EXPORTED char *textdomain (const char *__domainname) ++ _INTL_ASM (libintl_textdomain); ++#endif ++ ++/* Specify that the DOMAINNAME message catalog will be found ++ in DIRNAME rather than in the system locale data base. */ ++#ifdef _INTL_REDIRECT_INLINE ++extern LIBINTL_DLL_EXPORTED char *libintl_bindtextdomain (const char *__domainname, ++ const char *__dirname); ++static inline char *bindtextdomain (const char *__domainname, ++ const char *__dirname) ++{ ++ return libintl_bindtextdomain (__domainname, __dirname); ++} ++#else ++#ifdef _INTL_REDIRECT_MACROS ++# define bindtextdomain libintl_bindtextdomain ++#endif ++extern LIBINTL_DLL_EXPORTED char *bindtextdomain (const char *__domainname, const char *__dirname) ++ _INTL_ASM (libintl_bindtextdomain); ++#endif ++ ++/* Specify the character encoding in which the messages from the ++ DOMAINNAME message catalog will be returned. */ ++#ifdef _INTL_REDIRECT_INLINE ++extern LIBINTL_DLL_EXPORTED char *libintl_bind_textdomain_codeset (const char *__domainname, ++ const char *__codeset); ++static inline char *bind_textdomain_codeset (const char *__domainname, ++ const char *__codeset) ++{ ++ return libintl_bind_textdomain_codeset (__domainname, __codeset); ++} ++#else ++#ifdef _INTL_REDIRECT_MACROS ++# define bind_textdomain_codeset libintl_bind_textdomain_codeset ++#endif ++extern LIBINTL_DLL_EXPORTED char *bind_textdomain_codeset (const char *__domainname, ++ const char *__codeset) ++ _INTL_ASM (libintl_bind_textdomain_codeset); ++#endif ++ ++ ++ ++/* Support for format strings with positions in *printf(), following the ++ POSIX/XSI specification. ++ Note: These replacements for the *printf() functions are visible only ++ in source files that #include or #include "gettext.h". ++ Packages that use *printf() in source files that don't refer to _() ++ or gettext() but for which the format string could be the return value ++ of _() or gettext() need to add this #include. Oh well. */ ++ ++#if !0 ++ ++#include ++#include ++ ++/* Get va_list. */ ++#if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER ++# include ++#else ++# include ++#endif ++ ++#if !(defined fprintf && defined _GL_STDIO_H) /* don't override gnulib */ ++#undef fprintf ++#define fprintf libintl_fprintf ++extern LIBINTL_DLL_EXPORTED int fprintf (FILE *, const char *, ...); ++#endif ++#if !(defined vfprintf && defined _GL_STDIO_H) /* don't override gnulib */ ++#undef vfprintf ++#define vfprintf libintl_vfprintf ++extern LIBINTL_DLL_EXPORTED int vfprintf (FILE *, const char *, va_list); ++#endif ++ ++#if !(defined printf && defined _GL_STDIO_H) /* don't override gnulib */ ++#undef printf ++#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__ ++/* Don't break __attribute__((format(printf,M,N))). ++ This redefinition is only possible because the libc in NetBSD, Cygwin, ++ mingw does not have a function __printf__. ++ Alternatively, we could have done this redirection only when compiling with ++ __GNUC__, together with a symbol redirection: ++ extern LIBINTL_DLL_EXPORTED int printf (const char *, ...) ++ __asm__ (#__USER_LABEL_PREFIX__ "libintl_printf"); ++ But doing it now would introduce a binary incompatibility with already ++ distributed versions of libintl on these systems. */ ++# define libintl_printf __printf__ ++#endif ++#define printf libintl_printf ++extern LIBINTL_DLL_EXPORTED int printf (const char *, ...); ++#endif ++#if !(defined vprintf && defined _GL_STDIO_H) /* don't override gnulib */ ++#undef vprintf ++#define vprintf libintl_vprintf ++extern LIBINTL_DLL_EXPORTED int vprintf (const char *, va_list); ++#endif ++ ++#if !(defined sprintf && defined _GL_STDIO_H) /* don't override gnulib */ ++#undef sprintf ++#define sprintf libintl_sprintf ++extern LIBINTL_DLL_EXPORTED int sprintf (char *, const char *, ...); ++#endif ++#if !(defined vsprintf && defined _GL_STDIO_H) /* don't override gnulib */ ++#undef vsprintf ++#define vsprintf libintl_vsprintf ++extern LIBINTL_DLL_EXPORTED int vsprintf (char *, const char *, va_list); ++#endif ++ ++#if 0 ++ ++#if !(defined snprintf && defined _GL_STDIO_H) /* don't override gnulib */ ++#undef snprintf ++#define snprintf libintl_snprintf ++extern LIBINTL_DLL_EXPORTED int snprintf (char *, size_t, const char *, ...); ++#endif ++#if !(defined vsnprintf && defined _GL_STDIO_H) /* don't override gnulib */ ++#undef vsnprintf ++#define vsnprintf libintl_vsnprintf ++extern LIBINTL_DLL_EXPORTED int vsnprintf (char *, size_t, const char *, va_list); ++#endif ++ ++#endif ++ ++#if 0 ++ ++#if !(defined asprintf && defined _GL_STDIO_H) /* don't override gnulib */ ++#undef asprintf ++#define asprintf libintl_asprintf ++extern LIBINTL_DLL_EXPORTED int asprintf (char **, const char *, ...); ++#endif ++#if !(defined vasprintf && defined _GL_STDIO_H) /* don't override gnulib */ ++#undef vasprintf ++#define vasprintf libintl_vasprintf ++extern LIBINTL_DLL_EXPORTED int vasprintf (char **, const char *, va_list); ++#endif ++ ++#endif ++ ++#if 0 ++ ++#undef fwprintf ++#define fwprintf libintl_fwprintf ++extern LIBINTL_DLL_EXPORTED int fwprintf (FILE *, const wchar_t *, ...); ++#undef vfwprintf ++#define vfwprintf libintl_vfwprintf ++extern LIBINTL_DLL_EXPORTED int vfwprintf (FILE *, const wchar_t *, va_list); ++ ++#undef wprintf ++#define wprintf libintl_wprintf ++extern LIBINTL_DLL_EXPORTED int wprintf (const wchar_t *, ...); ++#undef vwprintf ++#define vwprintf libintl_vwprintf ++extern LIBINTL_DLL_EXPORTED int vwprintf (const wchar_t *, va_list); ++ ++#undef swprintf ++#define swprintf libintl_swprintf ++extern LIBINTL_DLL_EXPORTED int swprintf (wchar_t *, size_t, const wchar_t *, ...); ++#undef vswprintf ++#define vswprintf libintl_vswprintf ++extern LIBINTL_DLL_EXPORTED int vswprintf (wchar_t *, size_t, const wchar_t *, va_list); ++ ++#endif ++ ++#endif ++ ++ ++/* Support for the locale chosen by the user. */ ++#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ ++ ++#undef setlocale ++#define setlocale libintl_setlocale ++extern LIBINTL_DLL_EXPORTED char *setlocale (int, const char *); ++ ++#if 0 ++ ++#undef newlocale ++#define newlocale libintl_newlocale ++extern LIBINTL_DLL_EXPORTED locale_t newlocale (int, const char *, locale_t); ++ ++#endif ++ ++#endif ++ ++ ++/* Support for relocatable packages. */ ++ ++/* Sets the original and the current installation prefix of the package. ++ Relocation simply replaces a pathname starting with the original prefix ++ by the corresponding pathname with the current prefix instead. Both ++ prefixes should be directory names without trailing slash (i.e. use "" ++ instead of "/"). */ ++#define libintl_set_relocation_prefix libintl_set_relocation_prefix ++extern LIBINTL_DLL_EXPORTED void ++ libintl_set_relocation_prefix (const char *orig_prefix, ++ const char *curr_prefix); ++ ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* libintl.h */ ++ +--- misc/gettext-0.18.1.1/gettext-runtime/intl/libintl.h Wed Aug 20 14:33:55 2008 ++++ misc/build/gettext-0.18.1.1/gettext-runtime/intl/libintl.h Wed Aug 20 14:26:42 2008 +@@ -1 +1,465 @@ +-dummy ++/* Message catalogs for internationalization. ++ Copyright (C) 1995-1997, 2000-2010 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify it ++ under the terms of the GNU Library General Public License as published ++ by the Free Software Foundation; either version 2, or (at your option) ++ any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Library General Public License for more details. ++ ++ You should have received a copy of the GNU Library General Public ++ License along with this program; if not, write to the Free Software ++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++ USA. */ ++ ++#ifndef _LIBINTL_H ++#define _LIBINTL_H 1 ++ ++#include ++#if (defined __APPLE__ && defined __MACH__) && 0 ++# include ++#endif ++ ++/* The LC_MESSAGES locale category is the category used by the functions ++ gettext() and dgettext(). It is specified in POSIX, but not in ANSI C. ++ On systems that don't define it, use an arbitrary value instead. ++ On Solaris, defines __LOCALE_H (or _LOCALE_H in Solaris 2.5) ++ then includes (i.e. this file!) and then only defines ++ LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES ++ in this case. */ ++#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun)) ++# define LC_MESSAGES 1729 ++#endif ++ ++/* We define an additional symbol to signal that we use the GNU ++ implementation of gettext. */ ++#define __USE_GNU_GETTEXT 1 ++ ++/* Provide information about the supported file formats. Returns the ++ maximum minor revision number supported for a given major revision. */ ++#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \ ++ ((major) == 0 || (major) == 1 ? 1 : -1) ++ ++/* Resolve a platform specific conflict on DJGPP. GNU gettext takes ++ precedence over _conio_gettext. */ ++#ifdef __DJGPP__ ++# undef gettext ++#endif ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++ ++/* Version number: (major<<16) + (minor<<8) + subminor */ ++#define LIBINTL_VERSION 0x001201 ++extern int libintl_version; ++ ++ ++/* We redirect the functions to those prefixed with "libintl_". This is ++ necessary, because some systems define gettext/textdomain/... in the C ++ library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer). ++ If we used the unprefixed names, there would be cases where the ++ definition in the C library would override the one in the libintl.so ++ shared library. Recall that on ELF systems, the symbols are looked ++ up in the following order: ++ 1. in the executable, ++ 2. in the shared libraries specified on the link command line, in order, ++ 3. in the dependencies of the shared libraries specified on the link ++ command line, ++ 4. in the dlopen()ed shared libraries, in the order in which they were ++ dlopen()ed. ++ The definition in the C library would override the one in libintl.so if ++ either ++ * -lc is given on the link command line and -lintl isn't, or ++ * -lc is given on the link command line before -lintl, or ++ * libintl.so is a dependency of a dlopen()ed shared library but not ++ linked to the executable at link time. ++ Since Solaris gettext() behaves differently than GNU gettext(), this ++ would be unacceptable. ++ ++ The redirection happens by default through macros in C, so that &gettext ++ is independent of the compilation unit, but through inline functions in ++ C++, in order not to interfere with the name mangling of class fields or ++ class methods called 'gettext'. */ ++ ++/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS. ++ If he doesn't, we choose the method. A third possible method is ++ _INTL_REDIRECT_ASM, supported only by GCC. */ ++#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS) ++# if defined __GNUC__ && __GNUC__ >= 2 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus) ++# define _INTL_REDIRECT_ASM ++# else ++# ifdef __cplusplus ++# define _INTL_REDIRECT_INLINE ++# else ++# define _INTL_REDIRECT_MACROS ++# endif ++# endif ++#endif ++/* Auxiliary macros. */ ++#ifdef _INTL_REDIRECT_ASM ++# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname)) ++# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring ++# define _INTL_STRINGIFY(prefix) #prefix ++#else ++# define _INTL_ASM(cname) ++#endif ++ ++/* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return ++ its n-th argument literally. This enables GCC to warn for example about ++ printf (gettext ("foo %y")). */ ++#if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && defined __cplusplus) ++# define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n))) ++#else ++# define _INTL_MAY_RETURN_STRING_ARG(n) ++#endif ++ ++/* Look up MSGID in the current default message catalog for the current ++ LC_MESSAGES locale. If not found, returns MSGID itself (the default ++ text). */ ++#ifdef _INTL_REDIRECT_INLINE ++extern char *libintl_gettext (const char *__msgid) ++ _INTL_MAY_RETURN_STRING_ARG (1); ++static inline char *gettext (const char *__msgid) ++{ ++ return libintl_gettext (__msgid); ++} ++#else ++#ifdef _INTL_REDIRECT_MACROS ++# define gettext libintl_gettext ++#endif ++extern char *gettext (const char *__msgid) ++ _INTL_ASM (libintl_gettext) ++ _INTL_MAY_RETURN_STRING_ARG (1); ++#endif ++ ++/* Look up MSGID in the DOMAINNAME message catalog for the current ++ LC_MESSAGES locale. */ ++#ifdef _INTL_REDIRECT_INLINE ++extern char *libintl_dgettext (const char *__domainname, const char *__msgid) ++ _INTL_MAY_RETURN_STRING_ARG (2); ++static inline char *dgettext (const char *__domainname, const char *__msgid) ++{ ++ return libintl_dgettext (__domainname, __msgid); ++} ++#else ++#ifdef _INTL_REDIRECT_MACROS ++# define dgettext libintl_dgettext ++#endif ++extern char *dgettext (const char *__domainname, const char *__msgid) ++ _INTL_ASM (libintl_dgettext) ++ _INTL_MAY_RETURN_STRING_ARG (2); ++#endif ++ ++/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY ++ locale. */ ++#ifdef _INTL_REDIRECT_INLINE ++extern char *libintl_dcgettext (const char *__domainname, const char *__msgid, ++ int __category) ++ _INTL_MAY_RETURN_STRING_ARG (2); ++static inline char *dcgettext (const char *__domainname, const char *__msgid, ++ int __category) ++{ ++ return libintl_dcgettext (__domainname, __msgid, __category); ++} ++#else ++#ifdef _INTL_REDIRECT_MACROS ++# define dcgettext libintl_dcgettext ++#endif ++extern char *dcgettext (const char *__domainname, const char *__msgid, ++ int __category) ++ _INTL_ASM (libintl_dcgettext) ++ _INTL_MAY_RETURN_STRING_ARG (2); ++#endif ++ ++ ++/* Similar to `gettext' but select the plural form corresponding to the ++ number N. */ ++#ifdef _INTL_REDIRECT_INLINE ++extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2, ++ unsigned long int __n) ++ _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2); ++static inline char *ngettext (const char *__msgid1, const char *__msgid2, ++ unsigned long int __n) ++{ ++ return libintl_ngettext (__msgid1, __msgid2, __n); ++} ++#else ++#ifdef _INTL_REDIRECT_MACROS ++# define ngettext libintl_ngettext ++#endif ++extern char *ngettext (const char *__msgid1, const char *__msgid2, ++ unsigned long int __n) ++ _INTL_ASM (libintl_ngettext) ++ _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2); ++#endif ++ ++/* Similar to `dgettext' but select the plural form corresponding to the ++ number N. */ ++#ifdef _INTL_REDIRECT_INLINE ++extern char *libintl_dngettext (const char *__domainname, const char *__msgid1, ++ const char *__msgid2, unsigned long int __n) ++ _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); ++static inline char *dngettext (const char *__domainname, const char *__msgid1, ++ const char *__msgid2, unsigned long int __n) ++{ ++ return libintl_dngettext (__domainname, __msgid1, __msgid2, __n); ++} ++#else ++#ifdef _INTL_REDIRECT_MACROS ++# define dngettext libintl_dngettext ++#endif ++extern char *dngettext (const char *__domainname, ++ const char *__msgid1, const char *__msgid2, ++ unsigned long int __n) ++ _INTL_ASM (libintl_dngettext) ++ _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); ++#endif ++ ++/* Similar to `dcgettext' but select the plural form corresponding to the ++ number N. */ ++#ifdef _INTL_REDIRECT_INLINE ++extern char *libintl_dcngettext (const char *__domainname, ++ const char *__msgid1, const char *__msgid2, ++ unsigned long int __n, int __category) ++ _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); ++static inline char *dcngettext (const char *__domainname, ++ const char *__msgid1, const char *__msgid2, ++ unsigned long int __n, int __category) ++{ ++ return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category); ++} ++#else ++#ifdef _INTL_REDIRECT_MACROS ++# define dcngettext libintl_dcngettext ++#endif ++extern char *dcngettext (const char *__domainname, ++ const char *__msgid1, const char *__msgid2, ++ unsigned long int __n, int __category) ++ _INTL_ASM (libintl_dcngettext) ++ _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); ++#endif ++ ++ ++ ++/* Set the current default message catalog to DOMAINNAME. ++ If DOMAINNAME is null, return the current default. ++ If DOMAINNAME is "", reset to the default of "messages". */ ++#ifdef _INTL_REDIRECT_INLINE ++extern char *libintl_textdomain (const char *__domainname); ++static inline char *textdomain (const char *__domainname) ++{ ++ return libintl_textdomain (__domainname); ++} ++#else ++#ifdef _INTL_REDIRECT_MACROS ++# define textdomain libintl_textdomain ++#endif ++extern char *textdomain (const char *__domainname) ++ _INTL_ASM (libintl_textdomain); ++#endif ++ ++/* Specify that the DOMAINNAME message catalog will be found ++ in DIRNAME rather than in the system locale data base. */ ++#ifdef _INTL_REDIRECT_INLINE ++extern char *libintl_bindtextdomain (const char *__domainname, ++ const char *__dirname); ++static inline char *bindtextdomain (const char *__domainname, ++ const char *__dirname) ++{ ++ return libintl_bindtextdomain (__domainname, __dirname); ++} ++#else ++#ifdef _INTL_REDIRECT_MACROS ++# define bindtextdomain libintl_bindtextdomain ++#endif ++extern char *bindtextdomain (const char *__domainname, const char *__dirname) ++ _INTL_ASM (libintl_bindtextdomain); ++#endif ++ ++/* Specify the character encoding in which the messages from the ++ DOMAINNAME message catalog will be returned. */ ++#ifdef _INTL_REDIRECT_INLINE ++extern char *libintl_bind_textdomain_codeset (const char *__domainname, ++ const char *__codeset); ++static inline char *bind_textdomain_codeset (const char *__domainname, ++ const char *__codeset) ++{ ++ return libintl_bind_textdomain_codeset (__domainname, __codeset); ++} ++#else ++#ifdef _INTL_REDIRECT_MACROS ++# define bind_textdomain_codeset libintl_bind_textdomain_codeset ++#endif ++extern char *bind_textdomain_codeset (const char *__domainname, ++ const char *__codeset) ++ _INTL_ASM (libintl_bind_textdomain_codeset); ++#endif ++ ++ ++ ++/* Support for format strings with positions in *printf(), following the ++ POSIX/XSI specification. ++ Note: These replacements for the *printf() functions are visible only ++ in source files that #include or #include "gettext.h". ++ Packages that use *printf() in source files that don't refer to _() ++ or gettext() but for which the format string could be the return value ++ of _() or gettext() need to add this #include. Oh well. */ ++ ++#if !0 ++ ++#include ++#include ++ ++/* Get va_list. */ ++#if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER ++# include ++#else ++# include ++#endif ++ ++#if !(defined fprintf && defined _GL_STDIO_H) /* don't override gnulib */ ++#undef fprintf ++#define fprintf libintl_fprintf ++extern int fprintf (FILE *, const char *, ...); ++#endif ++#if !(defined vfprintf && defined _GL_STDIO_H) /* don't override gnulib */ ++#undef vfprintf ++#define vfprintf libintl_vfprintf ++extern int vfprintf (FILE *, const char *, va_list); ++#endif ++ ++#if !(defined printf && defined _GL_STDIO_H) /* don't override gnulib */ ++#undef printf ++#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__ ++/* Don't break __attribute__((format(printf,M,N))). ++ This redefinition is only possible because the libc in NetBSD, Cygwin, ++ mingw does not have a function __printf__. ++ Alternatively, we could have done this redirection only when compiling with ++ __GNUC__, together with a symbol redirection: ++ extern int printf (const char *, ...) ++ __asm__ (#__USER_LABEL_PREFIX__ "libintl_printf"); ++ But doing it now would introduce a binary incompatibility with already ++ distributed versions of libintl on these systems. */ ++# define libintl_printf __printf__ ++#endif ++#define printf libintl_printf ++extern int printf (const char *, ...); ++#endif ++#if !(defined vprintf && defined _GL_STDIO_H) /* don't override gnulib */ ++#undef vprintf ++#define vprintf libintl_vprintf ++extern int vprintf (const char *, va_list); ++#endif ++ ++#if !(defined sprintf && defined _GL_STDIO_H) /* don't override gnulib */ ++#undef sprintf ++#define sprintf libintl_sprintf ++extern int sprintf (char *, const char *, ...); ++#endif ++#if !(defined vsprintf && defined _GL_STDIO_H) /* don't override gnulib */ ++#undef vsprintf ++#define vsprintf libintl_vsprintf ++extern int vsprintf (char *, const char *, va_list); ++#endif ++ ++#if 0 ++ ++#if !(defined snprintf && defined _GL_STDIO_H) /* don't override gnulib */ ++#undef snprintf ++#define snprintf libintl_snprintf ++extern int snprintf (char *, size_t, const char *, ...); ++#endif ++#if !(defined vsnprintf && defined _GL_STDIO_H) /* don't override gnulib */ ++#undef vsnprintf ++#define vsnprintf libintl_vsnprintf ++extern int vsnprintf (char *, size_t, const char *, va_list); ++#endif ++ ++#endif ++ ++#if 0 ++ ++#if !(defined asprintf && defined _GL_STDIO_H) /* don't override gnulib */ ++#undef asprintf ++#define asprintf libintl_asprintf ++extern int asprintf (char **, const char *, ...); ++#endif ++#if !(defined vasprintf && defined _GL_STDIO_H) /* don't override gnulib */ ++#undef vasprintf ++#define vasprintf libintl_vasprintf ++extern int vasprintf (char **, const char *, va_list); ++#endif ++ ++#endif ++ ++#if 0 ++ ++#undef fwprintf ++#define fwprintf libintl_fwprintf ++extern int fwprintf (FILE *, const wchar_t *, ...); ++#undef vfwprintf ++#define vfwprintf libintl_vfwprintf ++extern int vfwprintf (FILE *, const wchar_t *, va_list); ++ ++#undef wprintf ++#define wprintf libintl_wprintf ++extern int wprintf (const wchar_t *, ...); ++#undef vwprintf ++#define vwprintf libintl_vwprintf ++extern int vwprintf (const wchar_t *, va_list); ++ ++#undef swprintf ++#define swprintf libintl_swprintf ++extern int swprintf (wchar_t *, size_t, const wchar_t *, ...); ++#undef vswprintf ++#define vswprintf libintl_vswprintf ++extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list); ++ ++#endif ++ ++#endif ++ ++ ++/* Support for the locale chosen by the user. */ ++#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ ++ ++#undef setlocale ++#define setlocale libintl_setlocale ++extern char *setlocale (int, const char *); ++ ++#if 0 ++ ++#undef newlocale ++#define newlocale libintl_newlocale ++extern locale_t newlocale (int, const char *, locale_t); ++ ++#endif ++ ++#endif ++ ++ ++/* Support for relocatable packages. */ ++ ++/* Sets the original and the current installation prefix of the package. ++ Relocation simply replaces a pathname starting with the original prefix ++ by the corresponding pathname with the current prefix instead. Both ++ prefixes should be directory names without trailing slash (i.e. use "" ++ instead of "/"). */ ++#define libintl_set_relocation_prefix libintl_set_relocation_prefix ++extern void ++ libintl_set_relocation_prefix (const char *orig_prefix, ++ const char *curr_prefix); ++ ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* libintl.h */ ++ diff --git a/gettext/makefile.mk b/gettext/makefile.mk index 871bddd25060..965fb4e7e812 100644 --- a/gettext/makefile.mk +++ b/gettext/makefile.mk @@ -49,6 +49,8 @@ TARFILE_MD5=3dd55b952826d2b32f51308f2f91aa89 PATCH_FILES= + +.IF "$(OS)"=="MACOSX" CONFIGURE_DIR= CONFIGURE_ACTION=.$/configure --prefix=$(SRC_ROOT)$/$(PRJNAME)$/$(MISC) CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS)" CONFIGURE_FLAGS=$(eq,$(OS),MACOSX CPPFLAGS="$(EXTRA_CDEFS)" $(NULL)) --disable-curses --without-emacs --without-git --disable-java @@ -56,7 +58,6 @@ CONFIGURE_FLAGS=$(eq,$(OS),MACOSX CPPFLAGS="$(EXTRA_CDEFS)" $(NULL)) --disable-c BUILD_ACTION=$(GNUMAKE) BUILD_DIR=$(CONFIGURE_DIR) -.IF "$(OS)"=="MACOSX" EXTRPATH=LOADER OUT2LIB+=gettext-tools$/intl$/.libs$/libintl.*.dylib OUT2LIB+=gettext-runtime$/libasprintf$/.libs$/libasprintf.*.dylib @@ -85,6 +86,14 @@ OUT2BIN+=gettext-tools$/src$/.libs$/msguniq OUT2BIN+=gettext-tools$/src$/.libs$/urlget OUT2BIN+=gettext-tools$/src$/.libs$/xgettext .ELIF "$(OS)"=="WNT" +BUILD_DIR=gettext-runtime$/intl +PATCH_FILES=gettext-0.18.1.1.patch +ADDITIONAL_FILES=\ + gettext-runtime/intl/makefile.mk \ + gettext-runtime/intl/libgnuintl.h \ + gettext-runtime/intl/libintl.h \ + gettext-runtime/config.h +OUT2INC+=gettext-runtime$/intl$/libintl.h .ELSE .ENDIF -- cgit v1.2.3 From c47775b5f613dbe0dcc48921e8ed95d7e1ece088 Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Wed, 9 Mar 2011 13:05:54 +0100 Subject: rsvglibs: remove local paths --- gettext/gettext-0.18.1.1.patch | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/gettext/gettext-0.18.1.1.patch b/gettext/gettext-0.18.1.1.patch index c0a506332b69..b42cafe93974 100644 --- a/gettext/gettext-0.18.1.1.patch +++ b/gettext/gettext-0.18.1.1.patch @@ -1,6 +1,6 @@ --- misc/gettext-0.18.1.1/gettext-runtime/intl/makefile.mk Wed Aug 20 14:33:55 2008 +++ misc/build/gettext-0.18.1.1/gettext-runtime/intl/makefile.mk Wed Aug 20 14:26:42 2008 -@@ -1 +1,111 @@ +@@ -1 +1,108 @@ -dummy +#************************************************************************* +# @@ -43,11 +43,8 @@ +.INCLUDE : settings.mk + +#.IF "$(GUI)$(CPU)"=="WNTP" -+#CFLAGS+= -I .. -D HAVE_CONFIG_H -D FC_CACHEDIR=\".\" -DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -+#CFLAGS+= -DLOCALEDIR=\"d:/tools/o_rsvglibs/DEV300/ooo/gettext/./wntmsci12/misc/share/locale\" -DLOCALE_ALIAS_PATH=\"d:/tools/o_rsvglibs/DEV300/ooo/gettext/./wntmsci12/misc/share/locale\" -DLIBDIR=\"d:/tools/o_rsvglibs/DEV300/ooo/gettext/./wntmsci12/misc/lib\" -+#CFLAGS+=-DDLL_EXPORT -DPIC -D_LIBC -+CFLAGS+=-c -DLOCALEDIR=\"d:/tools/o_rsvglibs/DEV300/ooo/gettext/./wntmsci12/misc/share/locale\" -DLOCALE_ALIAS_PATH=\"d:/tools/o_rsvglibs/DEV300/ooo/gettext/./wntmsci12/misc/share/locale\" -DLIBDIR=\"d:/tools/o_rsvglibs/DEV300/ooo/gettext/./wntmsci12/misc/lib\" -+CFLAGS+=-DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"d:/tools/o_rsvglibs/DEV300/ooo/gettext/./wntmsci12/misc/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate ++CFLAGS+=-c -DLOCALEDIR=\"./share/locale\" -DLOCALE_ALIAS_PATH=\"./share/locale\" -DLIBDIR=\"./lib\" ++CFLAGS+=-DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"./lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate +CFLAGS+=-DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -I. -I. -I.. -DDLL_EXPORT -DPIC + + #.ENDIF @@ -1098,7 +1095,7 @@ +/* #undef ICONV_FLAVOR */ + +/* Define to the value of ${prefix}, as a string. */ -+#define INSTALLPREFIX "d:/tools/o_rsvglibs/DEV300/ooo/gettext/./wntmsci12/misc" ++#define INSTALLPREFIX "." + +/* Define if integer division by zero raises signal SIGFPE. */ +#define INTDIV0_RAISES_SIGFPE 0 -- cgit v1.2.3 From c118a818ebca9305451421e831fcfb447d7bca74 Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Wed, 9 Mar 2011 13:27:29 +0100 Subject: rsvglibs: exports libs as well --- glib/makefile.mk | 24 +++++++++++++++++++----- glib/prj/d.lst | 5 +++++ 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/glib/makefile.mk b/glib/makefile.mk index b2d266ce0f66..bafb4841d225 100644 --- a/glib/makefile.mk +++ b/glib/makefile.mk @@ -296,11 +296,25 @@ ADDITIONAL_FILES= config.h \ BUILD_ACTION=nmake -f makefile.msc -OUT2LIB+=gio/libgio-2.0-0.dll -OUT2LIB+=glib/libglib-2.0-0.dll -OUT2LIB+=gmodule/libgmodule-2.0-0.dll -OUT2LIB+=gobject/libgobject-2.0-0.dll -OUT2LIB+=gthread/libgthread-2.0-0.dll +OUT2BIN+=gio/libgio-2.0-0.dll +OUT2BIN+=glib/libglib-2.0-0.dll +OUT2BIN+=gmodule/libgmodule-2.0-0.dll +OUT2BIN+=gobject/libgobject-2.0-0.dll +OUT2BIN+=gthread/libgthread-2.0-0.dll + +OUT2LIB+=build/win32/dirent/dirent.lib +OUT2LIB+=gio/gio-2.0.lib +OUT2LIB+=gio/gvdb/giogvdb.lib +OUT2LIB+=gio/win32/giowin32.lib +OUT2LIB+=glib/glib-2.0.lib +OUT2LIB+=glib/glib-2.28s.lib +OUT2LIB+=glib/gnulib/gnulib.lib +OUT2LIB+=glib/pcre/pcre.lib +OUT2LIB+=gmodule/gmodule-2.0.lib +OUT2LIB+=gobject/glib-genmarshal.lib +OUT2LIB+=gobject/gobject-2.0.lib +OUT2LIB+=gthread/gthread-2.0.lib + OUT2INC+=glib/glib.h OUT2INC+=glib/glib-object.h diff --git a/glib/prj/d.lst b/glib/prj/d.lst index 27585318ac6f..4a9fb4ce2f86 100644 --- a/glib/prj/d.lst +++ b/glib/prj/d.lst @@ -10,6 +10,11 @@ symlink: %_DEST%\lib%_EXT%\libglib-2.0.0.dylib %_DEST%\lib%_EXT%\libglib-2.0.dyl ..\%__SRC%\lib\libgobject-2.0.0.dylib %_DEST%\lib%_EXT%\libgobject-2.0.0.dylib symlink: %_DEST%\lib%_EXT%\libgobject-2.0.0.dylib %_DEST%\lib%_EXT%\libgobject-2.0.dylib ..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT% +..\%__SRC%\lib\libgio-2.0.lib %_DEST%\lib%_EXT%\libgio-2.0.lib +..\%__SRC%\lib\libgmodule-2.0.lib %_DEST%\lib%_EXT%\libgmodule-2.0.lib +..\%__SRC%\lib\libgthread-2.0.lib %_DEST%\lib%_EXT%\libgthread-2.0.lib +..\%__SRC%\lib\libglib-2.0.lib %_DEST%\lib%_EXT%\libglib-2.0.lib +..\%__SRC%\lib\libgobject-2.0.lib %_DEST%\lib%_EXT%\libgobject-2.0.lib mkdir: %_DEST%\inc%_EXT%\external\gio-unix-2.0 mkdir: %_DEST%\inc%_EXT%\external\gio-unix-2.0\gio -- cgit v1.2.3 From d44fe9de5ae028129310d00ebd8612193d99ecff Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Wed, 9 Mar 2011 14:36:34 +0100 Subject: rsvglibs: libcroco for windows added --- libcroco/libcroco-0.6.2.patch | 110 ++++++++++++++++++++++++++++++++++++++++++ libcroco/makefile.mk | 40 ++++++++++++++- libcroco/prj/d.lst | 1 + 3 files changed, 149 insertions(+), 2 deletions(-) create mode 100644 libcroco/libcroco-0.6.2.patch diff --git a/libcroco/libcroco-0.6.2.patch b/libcroco/libcroco-0.6.2.patch new file mode 100644 index 000000000000..100023fb7395 --- /dev/null +++ b/libcroco/libcroco-0.6.2.patch @@ -0,0 +1,110 @@ +--- misc/libcroco-0.6.2/src/makefile.mk Wed Aug 20 14:33:55 2008 ++++ misc/build/libcroco-0.6.2/src/makefile.mk Wed Aug 20 14:26:42 2008 +@@ -1 +1,106 @@ +-dummy ++#************************************************************************* ++# ++# 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=..$/..$/..$/..$/.. ++#PRJINC=.. ++PRJNAME=libcroco ++TARGET=libcroco-0.6-3 ++ ++#ENABLE_EXCEPTIONS=TRUE ++VISIBILITY_HIDDEN=TRUE ++EXTERNAL_WARNINGS_NOT_ERRORS=TRUE ++ ++# --- Settings ---------------------------------- ++ ++.INCLUDE : settings.mk ++ ++CFLAGS+=-I$(SOLARINCDIR)$/external -I$(SOLARINCDIR)$/external$/glib-2.0 ++ ++# --- Files ------------------------------------- ++ ++SLOFILES=\ ++ $(SLO)$/cr-utils.obj \ ++ $(SLO)$/cr-input.obj \ ++ $(SLO)$/cr-enc-handler.obj \ ++ $(SLO)$/cr-num.obj \ ++ $(SLO)$/cr-rgb.obj \ ++ $(SLO)$/cr-token.obj \ ++ $(SLO)$/cr-tknzr.obj \ ++ $(SLO)$/cr-term.obj \ ++ $(SLO)$/cr-attr-sel.obj \ ++ $(SLO)$/cr-pseudo.obj \ ++ $(SLO)$/cr-additional-sel.obj \ ++ $(SLO)$/cr-simple-sel.obj \ ++ $(SLO)$/cr-selector.obj \ ++ $(SLO)$/cr-doc-handler.obj \ ++ $(SLO)$/cr-parser.obj \ ++ $(SLO)$/cr-declaration.obj \ ++ $(SLO)$/cr-statement.obj \ ++ $(SLO)$/cr-stylesheet.obj \ ++ $(SLO)$/cr-cascade.obj \ ++ $(SLO)$/cr-om-parser.obj \ ++ $(SLO)$/cr-style.obj \ ++ $(SLO)$/cr-sel-eng.obj \ ++ $(SLO)$/cr-fonts.obj \ ++ $(SLO)$/cr-prop-list.obj \ ++ $(SLO)$/cr-parsing-location.obj \ ++ $(SLO)$/cr-string.obj ++ ++ ++# --- Library ----------------------------------- ++ ++SHL1TARGET= $(TARGET) ++SHL1OBJS=$(SLOFILES) ++SHL1STDLIBS=\ ++ gio-2.0.lib \ ++ gobject-2.0.lib \ ++ gthread-2.0.lib \ ++ glib-2.0.lib \ ++ intl.lib \ ++ $(LIBXML2LIB) ++ ++ ++SHL1DEPN= ++#SHL1IMPLIB=$(TARGET) ++#SHL1USE_EXPORTS=name ++ ++SHL1DEF= $(MISC)$/$(SHL1TARGET).def ++ ++DEF1NAME= $(SHL1TARGET) ++DEF1DEPN= $(MISC)$/$(SHL1TARGET).flt \ ++ $(SLB)$/$(TARGET).lib ++DEFLIB1NAME=$(TARGET) ++ ++# --- Targets ---------------------------------- ++ ++.INCLUDE : target.mk ++ ++# --- filter file ------------------------------ ++ ++$(MISC)$/$(SHL1TARGET).flt: makefile.mk ++ @echo CLEAR_THE_FILE > $@ ++ diff --git a/libcroco/makefile.mk b/libcroco/makefile.mk index 390ee49ce9c3..d5c84d517190 100644 --- a/libcroco/makefile.mk +++ b/libcroco/makefile.mk @@ -48,8 +48,9 @@ TARFILE_NAME=$(PRJNAME)-$(LIBCROCOVERSION) TARFILE_MD5=0611e099e807210cf738dcb41425d104 PATCH_FILES= - CONFIGURE_DIR= + +.IF "$(OS)"=="MACOSX" CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) \ .$/configure \ --prefix=$(SRC_ROOT)$/$(PRJNAME)$/$(MISC) \ @@ -66,7 +67,6 @@ BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) \ $(GNUMAKE) BUILD_DIR=$(CONFIGURE_DIR) -.IF "$(OS)"=="MACOSX" EXTRPATH=LOADER OUT2LIB+=src$/.libs$/libcroco-0.6.3.0.1.dylib @@ -99,7 +99,43 @@ OUT2INC+=src$/cr-pseudo.h OUT2INC+=src$/cr-style.h OUT2INC+=src$/libcroco.h .ELIF "$(OS)"=="WNT" + +BUILD_ACTION=dmake +BUILD_DIR=$(CONFIGURE_DIR)$/src +PATCH_FILES=libcroco-0.6.2.patch +ADDITIONAL_FILES=\ + src$/makefile.mk + +OUT2INC+=src$/cr-additional-sel.h +OUT2INC+=src$/cr-input.h +OUT2INC+=src$/cr-rgb.h +OUT2INC+=src$/cr-stylesheet.h +OUT2INC+=src$/cr-attr-sel.h +OUT2INC+=src$/cr-num.h +OUT2INC+=src$/cr-sel-eng.h +OUT2INC+=src$/cr-term.h +OUT2INC+=src$/cr-cascade.h +OUT2INC+=src$/cr-om-parser.h +OUT2INC+=src$/cr-selector.h +OUT2INC+=src$/cr-tknzr.h +OUT2INC+=src$/cr-declaration.h +OUT2INC+=src$/cr-parser.h +OUT2INC+=src$/cr-simple-sel.h +OUT2INC+=src$/cr-token.h +OUT2INC+=src$/cr-doc-handler.h +OUT2INC+=src$/cr-parsing-location.h +OUT2INC+=src$/cr-statement.h +OUT2INC+=src$/cr-utils.h +OUT2INC+=src$/cr-enc-handler.h +OUT2INC+=src$/cr-prop-list.h +OUT2INC+=src$/cr-string.h +OUT2INC+=src$/libcroco-config.h +OUT2INC+=src$/cr-fonts.h +OUT2INC+=src$/cr-pseudo.h +OUT2INC+=src$/cr-style.h +OUT2INC+=src$/libcroco.h .ELSE + .ENDIF # --- Targets ------------------------------------------------------ diff --git a/libcroco/prj/d.lst b/libcroco/prj/d.lst index ec15be37015b..455323283fe9 100644 --- a/libcroco/prj/d.lst +++ b/libcroco/prj/d.lst @@ -31,6 +31,7 @@ mkdir: %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco ..\%__SRC%\inc\cr-style.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-style.h ..\%__SRC%\inc\libcroco.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\libcroco.h +..\%__SRC%\bin\libcroco-0.6-3.dll %_DEST%\bin%_EXT%\libcroco-0.6-3.dll ..\%__SRC%\lib\libcroco-0.6.3.0.1.dylib %_DEST%\lib%_EXT%\libcroco-0.6.3.0.1.dylib symlink: %_DEST%\lib%_EXT%\libcroco-0.6.3.0.1.dylib %_DEST%\lib%_EXT%\libcroco-0.6.3.dylib symlink: %_DEST%\lib%_EXT%\libcroco-0.6.3.dylib %_DEST%\lib%_EXT%\libcroco-0.6.dylib -- cgit v1.2.3 From c5819b62fa815442e4a1716e3c28eb5a2fbb005a Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 9 Mar 2011 18:12:52 +0100 Subject: rsgvlibs: adapt build configuration --- configure.in | 183 ++++++++++++++++++++++++++++++++++++++++++++++ set_soenv.in | 8 ++ solenv/config/sdev300.ini | 92 ++++++++++++++++++++++- 3 files changed, 281 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index eca0540550a5..d95a5c9e2728 100644 --- a/configure.in +++ b/configure.in @@ -6639,6 +6639,189 @@ fi AC_SUBST(USE_XINERAMA) AC_SUBST(XINERAMA_LINK) +dnl =================================================================== +dnl Test whether to build librsvg or rely on the system version +dnl =================================================================== +AC_MSG_CHECKING([whether to build own version of librsvg]) + +case "$_os" in + WINNT*) # Windows + SYSTEM_LIBRSVG=NO + AC_MSG_RESULT([yes]) + ;; + Darwin*) + SYSTEM_LIBRSVG=NO + AC_MSG_RESULT([yes]) + ;; + *) + SYSTEM_LIBRSVG=YES + AC_MSG_RESULT([no]) + ;; +esac +AC_SUBST(SYSTEM_LIBRSVG) + +dnl =================================================================== +dnl Test whether to build gdk-pixbuf or rely on the system version +dnl =================================================================== +AC_MSG_CHECKING([whether to build own version of gdk-pixbuf]) + +case "$_os" in + WINNT*) # Windows + SYSTEM_GDKPIXBUF=NO + AC_MSG_RESULT([yes]) + ;; + Darwin*) + SYSTEM_GDKPIXBUF=NO + AC_MSG_RESULT([yes]) + ;; + *) + SYSTEM_GDKPIXBUF=YES + AC_MSG_RESULT([no]) + ;; +esac +AC_SUBST(SYSTEM_GDKPIXBUF) + +dnl =================================================================== +dnl Test whether to build glib or rely on the system version +dnl =================================================================== +AC_MSG_CHECKING([whether to build own version of glib]) + +case "$_os" in + WINNT*) # Windows + SYSTEM_GLIB=NO + AC_MSG_RESULT([yes]) + ;; + Darwin*) + SYSTEM_GLIB=NO + AC_MSG_RESULT([yes]) + ;; + *) + SYSTEM_GLIB=YES + AC_MSG_RESULT([no]) + ;; +esac +AC_SUBST(SYSTEM_GLIB) + +dnl =================================================================== +dnl Test whether to build gettext or rely on the system version +dnl =================================================================== +AC_MSG_CHECKING([whether to build own version of gettext]) + +case "$_os" in + WINNT*) # Windows + SYSTEM_GETTEXT=NO + AC_MSG_RESULT([yes]) + ;; + Darwin*) + SYSTEM_GETTEXT=NO + AC_MSG_RESULT([yes]) + ;; + *) + SYSTEM_GETTEXT=YES + AC_MSG_RESULT([no]) + ;; +esac +AC_SUBST(SYSTEM_GETTEXT) + +dnl =================================================================== +dnl Test whether to build libcroco or rely on the system version +dnl =================================================================== +AC_MSG_CHECKING([whether to build own version of libcroco]) + +case "$_os" in + WINNT*) # Windows + SYSTEM_LIBCROCO=NO + AC_MSG_RESULT([yes]) + ;; + Darwin*) + SYSTEM_LIBCROCO=NO + AC_MSG_RESULT([yes]) + ;; + *) + SYSTEM_LIBCROCO=YES + AC_MSG_RESULT([no]) + ;; +esac +AC_SUBST(SYSTEM_LIBCROCO) + +dnl =================================================================== +dnl Test whether to build pango or rely on the system version +dnl =================================================================== +AC_MSG_CHECKING([whether to build own version of pango]) + +case "$_os" in + WINNT*) # Windows + SYSTEM_PANGO=NO + AC_MSG_RESULT([yes]) + ;; + Darwin*) + SYSTEM_PANGO=NO + AC_MSG_RESULT([yes]) + ;; + *) + SYSTEM_PANGO=YES + AC_MSG_RESULT([no]) + ;; +esac +AC_SUBST(SYSTEM_PANGO) + +dnl =================================================================== +dnl Test whether to build libpng or rely on the system version +dnl =================================================================== +AC_MSG_CHECKING([whether to build own version of libpng]) + +case "$_os" in + WINNT*) # Windows + SYSTEM_LIBPNG=NO + AC_MSG_RESULT([yes]) + ;; + Darwin*) + SYSTEM_LIBPNG=NO + AC_MSG_RESULT([yes]) + ;; + *) + SYSTEM_LIBPNG=YES + AC_MSG_RESULT([no]) + ;; +esac +AC_SUBST(SYSTEM_LIBPNG) + +dnl =================================================================== +dnl Test whether to build libjpeg or rely on the system version +dnl =================================================================== +dnl FIXME: this is currently because we have jpeg-6b for our filters +dnl and jpeg-8 as dependency for librsvg +dnl this should be unified into using only one version for both + +AC_MSG_CHECKING([whether to build own version of libjpeg]) + +if test "$SYSTEM_JPEG" == "YES"; then +SYSTEM_LIBJPEG=YES +else +case "$_os" in + WINNT*) # Windows + SYSTEM_LIBJPEG=NO + AC_MSG_RESULT([yes]) + ;; + Darwin*) + SYSTEM_LIBJPEG=NO + AC_MSG_RESULT([yes]) + ;; + *) + SYSTEM_LIBJPEG=YES + AC_MSG_RESULT([no]) + ;; +esac +fi + +if test "$SYSTEM_LIBJPEG" == "YES"; then + AC_MSG_RESULT([no]) +else + AC_MSG_RESULT([yes]) +fi +AC_SUBST(SYSTEM_LIBJPEG) + + dnl =================================================================== dnl Test for the presence of Ant and that it works dnl =================================================================== diff --git a/set_soenv.in b/set_soenv.in index bb185bce0691..33d2e492c3cc 100644 --- a/set_soenv.in +++ b/set_soenv.in @@ -1927,6 +1927,14 @@ ToFile( "SYSTEM_BOOST", "@SYSTEM_BOOST@", "e" ); ToFile( "SYSTEM_MDDS", "@SYSTEM_MDDS@", "e" ); ToFile( "SYSTEM_VIGRA", "@SYSTEM_VIGRA@", "e" ); ToFile( "SYSTEM_NEON", "@SYSTEM_NEON@", "e" ); +ToFile( "SYSTEM_LIBRSVG", "@SYSTEM_LIBRSVG@", "e" ); +ToFile( "SYSTEM_GDKPIXBUF", "@SYSTEM_GDKPIXBUF@", "e" ); +ToFile( "SYSTEM_GLIB", "@SYSTEM_GLIB@", "e" ); +ToFile( "SYSTEM_GETTEXT", "@SYSTEM_GETTEXT@", "e" ); +ToFile( "SYSTEM_LIBCROCO", "@SYSTEM_LIBCROCO@", "e" ); +ToFile( "SYSTEM_PANGO", "@SYSTEM_PANGO@", "e" ); +ToFile( "SYSTEM_LIBPNG", "@SYSTEM_LIBPNG@", "e" ); +ToFile( "SYSTEM_LIBJPEG", "@SYSTEM_LIBJPEG@", "e" ); ToFile( "NEON_VERSION", "@NEON_VERSION@", "e" ); ToFile( "NEON_LIBS", "@NEON_LIBS@", "e" ); ToFile( "NEON_CFLAGS", "@NEON_CFLAGS@", "e" ); diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini index cc8f2f0d71e1..08ab5e0c6d5d 100644 --- a/solenv/config/sdev300.ini +++ b/solenv/config/sdev300.ini @@ -363,8 +363,16 @@ unxfbsdi SOLAREXTRALIB -L../lib -L%SYSBASE%/usr/X11R6/lib -L%SYSBASE%/usr/lib -L/usr/X11R6/lib -L%SOLAR_STLLIBPATH% SOLAR_JAVA TRUE ZIPDEP perl %SOLARENV%/bin/zipdep.pl - ENABLE_GCONF TRUE - ENABLE_GNOMEVFS TRUE + ENABLE_GCONF YES + ENABLE_GNOMEVFS YES + SYSTEM_LIBRSVG YES + SYSTEM_LIBCROCO YES + SYSTEM_GDKPIXBUF YES + SYSTEM_GLIB YES + SYSTEM_GETTEXT YES + SYSTEM_PANGO YES + SYSTEM_LIBPNG YES + SYSTEM_LIBJPEG YES } common0 { @@ -616,6 +624,14 @@ unxlngi6 ENABLE_GNOMEVFS TRUE GNUCOPY cp GNUMAKE make + SYSTEM_LIBRSVG YES + SYSTEM_LIBCROCO YES + SYSTEM_GDKPIXBUF YES + SYSTEM_GLIB YES + SYSTEM_GETTEXT YES + SYSTEM_PANGO YES + SYSTEM_LIBPNG YES + SYSTEM_LIBJPEG YES } common0 { @@ -898,6 +914,14 @@ unxlngx6 ENABLE_GCONF TRUE ENABLE_GNOMEVFS TRUE GNUMAKE make + SYSTEM_LIBRSVG YES + SYSTEM_LIBCROCO YES + SYSTEM_GDKPIXBUF YES + SYSTEM_GLIB YES + SYSTEM_GETTEXT YES + SYSTEM_PANGO YES + SYSTEM_LIBPNG YES + SYSTEM_LIBJPEG YES } common0 { @@ -1228,6 +1252,14 @@ unxmacxi BUILD_PIXMAN YES WITH_MOZILLA YES ENABLE_CAIRO TRUE + SYSTEM_LIBRSVG NO + SYSTEM_LIBCROCO NO + SYSTEM_GDKPIXBUF NO + SYSTEM_GLIB NO + SYSTEM_GETTEXT NO + SYSTEM_PANGO NO + SYSTEM_LIBPNG NO + SYSTEM_LIBJPEG NO } common2 { @@ -1452,6 +1484,14 @@ unxsoli4 ENABLE_GNOMEVFS TRUE GNUCOPY gnucp GNUMAKE gmake + SYSTEM_LIBRSVG YES + SYSTEM_LIBCROCO YES + SYSTEM_GDKPIXBUF YES + SYSTEM_GLIB YES + SYSTEM_GETTEXT YES + SYSTEM_PANGO YES + SYSTEM_LIBPNG YES + SYSTEM_LIBJPEG YES } common0 { @@ -1714,6 +1754,14 @@ unxsols4 ENABLE_GNOMEVFS TRUE GNUCOPY gnucp GNUMAKE gmake + SYSTEM_LIBRSVG YES + SYSTEM_LIBCROCO YES + SYSTEM_GDKPIXBUF YES + SYSTEM_GLIB YES + SYSTEM_GETTEXT YES + SYSTEM_PANGO YES + SYSTEM_LIBPNG YES + SYSTEM_LIBJPEG YES } common0 { @@ -1991,6 +2039,14 @@ unxsolu4 ENABLE_GCONF TRUE # ENABLE_GNOMEVFS TRUE GNUMAKE gmake + SYSTEM_LIBRSVG YES + SYSTEM_LIBCROCO YES + SYSTEM_GDKPIXBUF YES + SYSTEM_GLIB YES + SYSTEM_GETTEXT YES + SYSTEM_PANGO YES + SYSTEM_LIBPNG YES + SYSTEM_LIBJPEG YES } common0 { @@ -2230,6 +2286,14 @@ wntgcci1 XCLASSPATH . ZIPDEP %PERL% %SOLARENV%$/bin$/zipdep.pl GNUMAKE make + SYSTEM_LIBRSVG YES + SYSTEM_LIBCROCO YES + SYSTEM_GDKPIXBUF YES + SYSTEM_GLIB YES + SYSTEM_GETTEXT YES + SYSTEM_PANGO YES + SYSTEM_LIBPNG YES + SYSTEM_LIBJPEG YES } common0 { @@ -2499,6 +2563,14 @@ wntmsci11 WINDOWS_VISTA_PSDK TRUE XCLASSPATH . ZIPDEP %PERL% %SOLARENV%$/bin$/zipdep.pl + SYSTEM_LIBRSVG YES + SYSTEM_LIBCROCO YES + SYSTEM_GDKPIXBUF YES + SYSTEM_GLIB YES + SYSTEM_GETTEXT YES + SYSTEM_PANGO YES + SYSTEM_LIBPNG YES + SYSTEM_LIBJPEG YES } common0 { @@ -2771,6 +2843,14 @@ wntmsci12 CHECK_LUCENCE_INDEXER_OUTPUT TRUE GNUCOPY cp GNUMAKE make + SYSTEM_LIBRSVG NO + SYSTEM_LIBCROCO NO + SYSTEM_GDKPIXBUF NO + SYSTEM_GLIB NO + SYSTEM_GETTEXT NO + SYSTEM_PANGO NO + SYSTEM_LIBPNG NO + SYSTEM_LIBJPEG NO } common0 { @@ -3115,6 +3195,14 @@ wntmsci13 BUILD_X64 TRUE GNUCOPY cp GNUMAKE make + SYSTEM_LIBRSVG NO + SYSTEM_LIBCROCO NO + SYSTEM_GDKPIXBUF NO + SYSTEM_GLIB NO + SYSTEM_GETTEXT NO + SYSTEM_PANGO NO + SYSTEM_LIBPNG NO + SYSTEM_LIBJPEG NO } common0 { -- cgit v1.2.3 From 97e936765c121b5e5045c9eb417e7cf8bbc368a9 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 9 Mar 2011 18:13:04 +0100 Subject: rsvglibs: add dependencies for librsvg --- configure | 200 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 199 insertions(+), 1 deletion(-) diff --git a/configure b/configure index d1883676f273..8fe568c48d2b 100755 --- a/configure +++ b/configure @@ -309,7 +309,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS EGREP AWK SED LOCAL_SOLENV _solenv UPD SOURCEVERSION build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os GNUTAR OSVERSION PTHREAD_CFLAGS PTHREAD_LIBS ENABLE_CRASHDUMP VC_STANDARD ENABLE_WERROR ENABLE_DEBUG PRODUCT PROFULLSWITCH PROEXT ENABLE_SYMBOLS DISABLE_STRIP ENABLE_CUPS ENABLE_FONTCONFIG TARFILE_LOCATION DO_FETCH_TARBALLS WITH_BINFILTER ENABLE_DIRECTX DISABLE_ACTIVEX DISABLE_ATL ENABLE_RPATH WITH_MYSPELL_DICTS SYSTEM_DICTS DICT_SYSTEM_DIR HYPH_SYSTEM_DIR THES_SYSTEM_DIR WITH_MINGWIN SHELLPATH GCC_HOME CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT COMPATH GCCVER HAVE_LD_BSYMBOLIC_FUNCTIONS ENABLE_PCH GNUMAKE _cc HAVE_LD_HASH_STYLE PERL MSPDB_PATH COMEX USE_MINGW MIDL_PATH CSC_PATH FRAME_HOME CPP CXX CXXFLAGS ac_ct_CXX CXXCPP SIZEOF_LONG WORDS_BIGENDIAN LFS_CFLAGS PAM NEW_SHADOW_API PAM_LINK CRYPT_LINK GXX_INCLUDE_PATH MINGW_LIB_INCLUDE_PATH MINGW_BACKWARD_INCLUDE_PATH MINGW_CLIB_DIR MINGW_SHARED_GCCLIB MINGW_GCCLIB_EH MINGW_SHARED_GXXLIB MINGW_SHARED_LIBSTDCPP MINGW_GCCDLL MINGW_GXXDLL EXCEPTIONS STLPORT4 STLPORT_VER USE_SYSTEM_STL USE_CCACHE CCACHE HAVE_GCC_VISIBILITY_FEATURE ALLOC BUILD_VER_STRING SOLAR_JAVA JAVAINTERPRETER JAVACOMPILER JAVACISGCJ JAVADOC AWTLIB JAVAAOTCOMPILER JAVA_HOME JDK JAVAFLAGS JAVAIFLAGS DMAKE BUILD_DMAKE EPM DPKG PKGMK BUILD_EPM RPM PKGFORMAT GPERF BUILD_STAX MINGWCXX ac_ct_MINGWCXX MINGWSTRIP ac_ct_MINGWSTRIP BUILD_UNOWINREG SYSTEM_STDLIBS SYSTEM_ZLIB SYSTEM_JPEG SYSTEM_EXPAT PKG_CONFIG LIBWPD_CFLAGS LIBWPD_LIBS SYSTEM_LIBWPD CPPUNIT_CFLAGS CPPUNIT_LIBS SYSTEM_CPPUNIT FREETYPE_CFLAGS FREETYPE_LIBS USE_FT_EMBOLDEN LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC SYSTEM_LIBXSLT LIBXML_CFLAGS LIBXML_LIBS SYSTEM_LIBXML PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir BZIP2 SYSTEM_PYTHON PYTHON_CFLAGS PYTHON_LIBS HOME SYSTEM_DB DB_VERSION DB_INCLUDES DB_JAR SYSTEM_LUCENE LUCENE_CORE_JAR LUCENE_ANALYZERS_JAR ENABLE_MYSQLC MYSQLCONFIG SYSTEM_MYSQL MYSQL_INC MYSQL_LIB MYSQL_DEFINES LIBMYSQL_PATH SYSTEM_MYSQL_CPPCONN SYSTEM_HSQLDB HSQLDB_JAR SYSTEM_BSH BSH_JAR SERIALIZER_JAR SYSTEM_SAXON SAXON_JAR CURLCONFIG SYSTEM_CURL CURL_CFLAGS CURL_LIBS SYSTEM_MDDS SYSTEM_BOOST SYSTEM_VIGRA SYSTEM_ODBC_HEADERS WITH_MOZILLA WITH_LDAP WITH_OPENLDAP MOZ_NSS_CFLAGS MOZ_NSS_LIBS NSS_LIB MOZ_NSPR_CFLAGS MOZ_NSPR_LIBS NSPR_LIB MOZILLAXPCOM_CFLAGS MOZILLAXPCOM_LIBS MOZILLA_VERSION MOZILLA_TOOLKIT MOZGTK2_CFLAGS MOZGTK2_LIBS MOZLIBREQ_CFLAGS MOZLIBREQ_LIBS BUILD_MOZAB ENABLE_NSS_MODULE MOZILLABUILD SYSTEM_MOZILLA MOZ_FLAVOUR MOZ_INC MOZ_LIB MOZ_LIB_XPCOM MOZ_LDAP_CFLAGS SYSTEM_SANE_HEADER SYSTEM_GENBRK SYSTEM_GENCCODE SYSTEM_GENCMN ICUCONFIG SYSTEM_ICU ICU_MAJOR ICU_MINOR ICU_MICRO GRAPHITE_CFLAGS GRAPHITE_LIBS ENABLE_GRAPHITE SYSTEM_GRAPHITE X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XINC XLIB XAU_LIBS DISABLE_XAW SYSTEM_XRENDER_HEADERS XRENDER_LINK XRANDR_CFLAGS XRANDR_LIBS XRANDR_DLOPEN ENABLE_RANDR DISABLE_NEON NEON_CFLAGS NEON_LIBS SYSTEM_NEON NEON_VERSION OPENSSL_CFLAGS OPENSSL_LIBS SYSTEM_OPENSSL ENABLE_AGG AGG_CFLAGS AGG_LIBS SYSTEM_AGG AGG_VERSION REDLAND_CFLAGS REDLAND_LIBS SYSTEM_REDLAND HUNSPELL_CFLAGS HUNSPELL_LIBS SYSTEM_HUNSPELL SYSTEM_HYPH HYPHEN_LIB MYTHES_CFLAGS MYTHES_LIBS SYSTEM_MYTHES SYSTEM_LPSOLVE SYSTEM_LIBTEXTCAT SYSTEM_LIBTEXTCAT_DATA HAVE_GETOPT HAVE_READDIR_R SYSTEM_LIBC PSDK_HOME WINDOWS_VISTA_PSDK DIRECTXSDK_HOME DIRECTXSDK_LIB NSIS_PATH BISON FLEX PATCH GNUCP GNUPATCH CYGWIN_PATH ML_EXE ASM_HOME ZIP UNZIP ZIP_HOME ENABLE_GTK ENABLE_KDE ENABLE_KDE4 GCONF_CFLAGS GCONF_LIBS ENABLE_GCONF GNOMEVFS_CFLAGS GNOMEVFS_LIBS ENABLE_GNOMEVFS GTK_CFLAGS GTK_LIBS DBUS_CFLAGS DBUS_LIBS GIO_CFLAGS GIO_LIBS ENABLE_GIO ENABLE_DBUS ENABLE_SYSTRAY_GTK GSTREAMER_CFLAGS GSTREAMER_LIBS ENABLE_GSTREAMER CAIRO_CFLAGS CAIRO_LIBS ENABLE_CAIRO BUILD_PIXMAN SYSTEM_CAIRO ENABLE_OPENGL ENABLE_PRESENTER_EXTRA_UI ENABLE_MINIMIZER ENABLE_PRESENTER_SCREEN POPPLER_CFLAGS POPPLER_LIBS ENABLE_PDFIMPORT SYSTEM_POPPLER ENABLE_MEDIAWIKI SYSTEM_SERVLETAPI SERVLETAPI_JAR ENABLE_REPORTBUILDER SYSTEM_JFREEREPORT SAC_JAR LIBXML_JAR FLUTE_JAR JFREEREPORT_JAR LIBBASE_JAR LIBLAYOUT_JAR LIBLOADER_JAR LIBFORMULA_JAR LIBREPOSITORY_JAR LIBFONTS_JAR LIBSERIALIZER_JAR SYSTEM_APACHE_COMMONS COMMONS_CODEC_JAR COMMONS_LANG_JAR COMMONS_HTTPCLIENT_JAR COMMONS_LOGGING_JAR MOC KDE_CFLAGS KDE_LIBS MOC4 KDE4_CFLAGS KDE4_LIBS ENABLE_LOCKDOWN GOBJECT_CFLAGS GOBJECT_LIBS ENABLE_EVOAB2 ENABLE_KAB WITH_FONTS WITHOUT_PPDS WITHOUT_AFMS SCPDEFS USE_XINERAMA XINERAMA_LINK ANT ANT_HOME ANT_LIB OOO_JUNIT_JAR WITH_LANG WITH_POOR_HELP_LOCALIZATIONS WITH_DICT INTRO_BITMAPS ABOUT_BITMAPS OOO_VENDOR UNIXWRAPPERNAME ENABLE_STATIC_GTK ENABLE_LAYOUT VERBOSE nodep LOCAL_SOLVER BUILD_TYPE LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS EGREP AWK SED LOCAL_SOLENV _solenv UPD SOURCEVERSION build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os GNUTAR OSVERSION PTHREAD_CFLAGS PTHREAD_LIBS ENABLE_CRASHDUMP VC_STANDARD ENABLE_WERROR ENABLE_DEBUG PRODUCT PROFULLSWITCH PROEXT ENABLE_SYMBOLS DISABLE_STRIP ENABLE_CUPS ENABLE_FONTCONFIG TARFILE_LOCATION DO_FETCH_TARBALLS WITH_BINFILTER ENABLE_DIRECTX DISABLE_ACTIVEX DISABLE_ATL ENABLE_RPATH WITH_MYSPELL_DICTS SYSTEM_DICTS DICT_SYSTEM_DIR HYPH_SYSTEM_DIR THES_SYSTEM_DIR WITH_MINGWIN SHELLPATH GCC_HOME CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT COMPATH GCCVER HAVE_LD_BSYMBOLIC_FUNCTIONS ENABLE_PCH GNUMAKE _cc HAVE_LD_HASH_STYLE PERL MSPDB_PATH COMEX USE_MINGW MIDL_PATH CSC_PATH FRAME_HOME CPP CXX CXXFLAGS ac_ct_CXX CXXCPP SIZEOF_LONG WORDS_BIGENDIAN LFS_CFLAGS PAM NEW_SHADOW_API PAM_LINK CRYPT_LINK GXX_INCLUDE_PATH MINGW_LIB_INCLUDE_PATH MINGW_BACKWARD_INCLUDE_PATH MINGW_CLIB_DIR MINGW_SHARED_GCCLIB MINGW_GCCLIB_EH MINGW_SHARED_GXXLIB MINGW_SHARED_LIBSTDCPP MINGW_GCCDLL MINGW_GXXDLL EXCEPTIONS STLPORT4 STLPORT_VER USE_SYSTEM_STL USE_CCACHE CCACHE HAVE_GCC_VISIBILITY_FEATURE ALLOC BUILD_VER_STRING SOLAR_JAVA JAVAINTERPRETER JAVACOMPILER JAVACISGCJ JAVADOC AWTLIB JAVAAOTCOMPILER JAVA_HOME JDK JAVAFLAGS JAVAIFLAGS DMAKE BUILD_DMAKE EPM DPKG PKGMK BUILD_EPM RPM PKGFORMAT GPERF BUILD_STAX MINGWCXX ac_ct_MINGWCXX MINGWSTRIP ac_ct_MINGWSTRIP BUILD_UNOWINREG SYSTEM_STDLIBS SYSTEM_ZLIB SYSTEM_JPEG SYSTEM_EXPAT PKG_CONFIG LIBWPD_CFLAGS LIBWPD_LIBS SYSTEM_LIBWPD CPPUNIT_CFLAGS CPPUNIT_LIBS SYSTEM_CPPUNIT FREETYPE_CFLAGS FREETYPE_LIBS USE_FT_EMBOLDEN LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC SYSTEM_LIBXSLT LIBXML_CFLAGS LIBXML_LIBS SYSTEM_LIBXML PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir BZIP2 SYSTEM_PYTHON PYTHON_CFLAGS PYTHON_LIBS HOME SYSTEM_DB DB_VERSION DB_INCLUDES DB_JAR SYSTEM_LUCENE LUCENE_CORE_JAR LUCENE_ANALYZERS_JAR ENABLE_MYSQLC MYSQLCONFIG SYSTEM_MYSQL MYSQL_INC MYSQL_LIB MYSQL_DEFINES LIBMYSQL_PATH SYSTEM_MYSQL_CPPCONN SYSTEM_HSQLDB HSQLDB_JAR SYSTEM_BSH BSH_JAR SERIALIZER_JAR SYSTEM_SAXON SAXON_JAR CURLCONFIG SYSTEM_CURL CURL_CFLAGS CURL_LIBS SYSTEM_MDDS SYSTEM_BOOST SYSTEM_VIGRA SYSTEM_ODBC_HEADERS WITH_MOZILLA WITH_LDAP WITH_OPENLDAP MOZ_NSS_CFLAGS MOZ_NSS_LIBS NSS_LIB MOZ_NSPR_CFLAGS MOZ_NSPR_LIBS NSPR_LIB MOZILLAXPCOM_CFLAGS MOZILLAXPCOM_LIBS MOZILLA_VERSION MOZILLA_TOOLKIT MOZGTK2_CFLAGS MOZGTK2_LIBS MOZLIBREQ_CFLAGS MOZLIBREQ_LIBS BUILD_MOZAB ENABLE_NSS_MODULE MOZILLABUILD SYSTEM_MOZILLA MOZ_FLAVOUR MOZ_INC MOZ_LIB MOZ_LIB_XPCOM MOZ_LDAP_CFLAGS SYSTEM_SANE_HEADER SYSTEM_GENBRK SYSTEM_GENCCODE SYSTEM_GENCMN ICUCONFIG SYSTEM_ICU ICU_MAJOR ICU_MINOR ICU_MICRO GRAPHITE_CFLAGS GRAPHITE_LIBS ENABLE_GRAPHITE SYSTEM_GRAPHITE X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XINC XLIB XAU_LIBS DISABLE_XAW SYSTEM_XRENDER_HEADERS XRENDER_LINK XRANDR_CFLAGS XRANDR_LIBS XRANDR_DLOPEN ENABLE_RANDR DISABLE_NEON NEON_CFLAGS NEON_LIBS SYSTEM_NEON NEON_VERSION OPENSSL_CFLAGS OPENSSL_LIBS SYSTEM_OPENSSL ENABLE_AGG AGG_CFLAGS AGG_LIBS SYSTEM_AGG AGG_VERSION REDLAND_CFLAGS REDLAND_LIBS SYSTEM_REDLAND HUNSPELL_CFLAGS HUNSPELL_LIBS SYSTEM_HUNSPELL SYSTEM_HYPH HYPHEN_LIB MYTHES_CFLAGS MYTHES_LIBS SYSTEM_MYTHES SYSTEM_LPSOLVE SYSTEM_LIBTEXTCAT SYSTEM_LIBTEXTCAT_DATA HAVE_GETOPT HAVE_READDIR_R SYSTEM_LIBC PSDK_HOME WINDOWS_VISTA_PSDK DIRECTXSDK_HOME DIRECTXSDK_LIB NSIS_PATH BISON FLEX PATCH GNUCP GNUPATCH CYGWIN_PATH ML_EXE ASM_HOME ZIP UNZIP ZIP_HOME ENABLE_GTK ENABLE_KDE ENABLE_KDE4 GCONF_CFLAGS GCONF_LIBS ENABLE_GCONF GNOMEVFS_CFLAGS GNOMEVFS_LIBS ENABLE_GNOMEVFS GTK_CFLAGS GTK_LIBS DBUS_CFLAGS DBUS_LIBS GIO_CFLAGS GIO_LIBS ENABLE_GIO ENABLE_DBUS ENABLE_SYSTRAY_GTK GSTREAMER_CFLAGS GSTREAMER_LIBS ENABLE_GSTREAMER CAIRO_CFLAGS CAIRO_LIBS ENABLE_CAIRO BUILD_PIXMAN SYSTEM_CAIRO ENABLE_OPENGL ENABLE_PRESENTER_EXTRA_UI ENABLE_MINIMIZER ENABLE_PRESENTER_SCREEN POPPLER_CFLAGS POPPLER_LIBS ENABLE_PDFIMPORT SYSTEM_POPPLER ENABLE_MEDIAWIKI SYSTEM_SERVLETAPI SERVLETAPI_JAR ENABLE_REPORTBUILDER SYSTEM_JFREEREPORT SAC_JAR LIBXML_JAR FLUTE_JAR JFREEREPORT_JAR LIBBASE_JAR LIBLAYOUT_JAR LIBLOADER_JAR LIBFORMULA_JAR LIBREPOSITORY_JAR LIBFONTS_JAR LIBSERIALIZER_JAR SYSTEM_APACHE_COMMONS COMMONS_CODEC_JAR COMMONS_LANG_JAR COMMONS_HTTPCLIENT_JAR COMMONS_LOGGING_JAR MOC KDE_CFLAGS KDE_LIBS MOC4 KDE4_CFLAGS KDE4_LIBS ENABLE_LOCKDOWN GOBJECT_CFLAGS GOBJECT_LIBS ENABLE_EVOAB2 ENABLE_KAB WITH_FONTS WITHOUT_PPDS WITHOUT_AFMS SCPDEFS USE_XINERAMA XINERAMA_LINK SYSTEM_LIBRSVG SYSTEM_GDKPIXBUF SYSTEM_GLIB SYSTEM_GETTEXT SYSTEM_LIBCROCO SYSTEM_PANGO SYSTEM_LIBPNG SYSTEM_LIBJPEG ANT ANT_HOME ANT_LIB OOO_JUNIT_JAR WITH_LANG WITH_POOR_HELP_LOCALIZATIONS WITH_DICT INTRO_BITMAPS ABOUT_BITMAPS OOO_VENDOR UNIXWRAPPERNAME ENABLE_STATIC_GTK ENABLE_LAYOUT VERBOSE nodep LOCAL_SOLVER BUILD_TYPE LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -29716,6 +29716,196 @@ fi +echo "$as_me:$LINENO: checking whether to build own version of librsvg" >&5 +echo $ECHO_N "checking whether to build own version of librsvg... $ECHO_C" >&6 + +case "$_os" in + WINNT*) # Windows + SYSTEM_LIBRSVG=NO + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + Darwin*) + SYSTEM_LIBRSVG=NO + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + *) + SYSTEM_LIBRSVG=YES + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; +esac + + +echo "$as_me:$LINENO: checking whether to build own version of gdk-pixbuf" >&5 +echo $ECHO_N "checking whether to build own version of gdk-pixbuf... $ECHO_C" >&6 + +case "$_os" in + WINNT*) # Windows + SYSTEM_GDKPIXBUF=NO + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + Darwin*) + SYSTEM_GDKPIXBUF=NO + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + *) + SYSTEM_GDKPIXBUF=YES + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; +esac + + +echo "$as_me:$LINENO: checking whether to build own version of glib" >&5 +echo $ECHO_N "checking whether to build own version of glib... $ECHO_C" >&6 + +case "$_os" in + WINNT*) # Windows + SYSTEM_GLIB=NO + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + Darwin*) + SYSTEM_GLIB=NO + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + *) + SYSTEM_GLIB=YES + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; +esac + + +echo "$as_me:$LINENO: checking whether to build own version of gettext" >&5 +echo $ECHO_N "checking whether to build own version of gettext... $ECHO_C" >&6 + +case "$_os" in + WINNT*) # Windows + SYSTEM_GETTEXT=NO + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + Darwin*) + SYSTEM_GETTEXT=NO + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + *) + SYSTEM_GETTEXT=YES + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; +esac + + +echo "$as_me:$LINENO: checking whether to build own version of libcroco" >&5 +echo $ECHO_N "checking whether to build own version of libcroco... $ECHO_C" >&6 + +case "$_os" in + WINNT*) # Windows + SYSTEM_LIBCROCO=NO + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + Darwin*) + SYSTEM_LIBCROCO=NO + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + *) + SYSTEM_LIBCROCO=YES + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; +esac + + +echo "$as_me:$LINENO: checking whether to build own version of pango" >&5 +echo $ECHO_N "checking whether to build own version of pango... $ECHO_C" >&6 + +case "$_os" in + WINNT*) # Windows + SYSTEM_PANGO=NO + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + Darwin*) + SYSTEM_PANGO=NO + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + *) + SYSTEM_PANGO=YES + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; +esac + + +echo "$as_me:$LINENO: checking whether to build own version of libpng" >&5 +echo $ECHO_N "checking whether to build own version of libpng... $ECHO_C" >&6 + +case "$_os" in + WINNT*) # Windows + SYSTEM_LIBPNG=NO + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + Darwin*) + SYSTEM_LIBPNG=NO + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + *) + SYSTEM_LIBPNG=YES + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; +esac + + + +echo "$as_me:$LINENO: checking whether to build own version of libjpeg" >&5 +echo $ECHO_N "checking whether to build own version of libjpeg... $ECHO_C" >&6 + +if test "$SYSTEM_JPEG" == "YES"; then +SYSTEM_LIBJPEG=YES +else +case "$_os" in + WINNT*) # Windows + SYSTEM_LIBJPEG=NO + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + Darwin*) + SYSTEM_LIBJPEG=NO + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + *) + SYSTEM_LIBJPEG=YES + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; +esac +fi + +if test "$SYSTEM_LIBJPEG" == "YES"; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +fi + + + if test "$SOLAR_JAVA" != ""; then ANT_HOME=; export ANT_HOME @@ -31245,6 +31435,14 @@ 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,@SYSTEM_LIBRSVG@,$SYSTEM_LIBRSVG,;t t +s,@SYSTEM_GDKPIXBUF@,$SYSTEM_GDKPIXBUF,;t t +s,@SYSTEM_GLIB@,$SYSTEM_GLIB,;t t +s,@SYSTEM_GETTEXT@,$SYSTEM_GETTEXT,;t t +s,@SYSTEM_LIBCROCO@,$SYSTEM_LIBCROCO,;t t +s,@SYSTEM_PANGO@,$SYSTEM_PANGO,;t t +s,@SYSTEM_LIBPNG@,$SYSTEM_LIBPNG,;t t +s,@SYSTEM_LIBJPEG@,$SYSTEM_LIBJPEG,;t t s,@ANT@,$ANT,;t t s,@ANT_HOME@,$ANT_HOME,;t t s,@ANT_LIB@,$ANT_LIB,;t t -- cgit v1.2.3 From 8440baa184e67db9538ca6a18902bbd9a3949050 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Wed, 9 Mar 2011 19:08:17 +0100 Subject: calc66: #i89232# delete before applying attributes, use CountNonFilteredRows for preview, indenting --- sc/source/core/data/table4.cxx | 230 ++++++++++++++++++++--------------------- 1 file changed, 115 insertions(+), 115 deletions(-) diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index ee3f134d2ac6..ba68fa53b13f 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -568,7 +568,8 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uLong nIMin = nIStart; sal_uLong nIMax = nIEnd; PutInOrder(nIMin,nIMax); - if (!IsDataFiltered()) //modify for i89232 + sal_Bool bHasFiltered = IsDataFiltered(); + if (!bHasFiltered) //modify for i89232 { if (bVertical) DeleteArea(nCol1, static_cast(nIMin), nCol2, static_cast(nIMax), IDF_AUTOFILL); @@ -620,7 +621,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, pNewPattern = NULL; } - if ( bVertical && nISrcStart == nISrcEnd ) + if ( bVertical && nISrcStart == nISrcEnd && !bHasFiltered ) { // Attribute komplett am Stueck setzen if (pNewPattern || pSrcPattern != pDocument->GetDefPattern()) @@ -638,37 +639,44 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, break; // Schleife abbrechen } - if ( pSrcPattern != aCol[nCol].GetPattern( static_cast(nRow) ) ) + if ( !RowFiltered(nRow) ) { - // Vorlage auch uebernehmen - //! am AttrArray mit ApplyPattern zusammenfassen ?? - if ( pStyleSheet ) - aCol[nCol].ApplyStyle( static_cast(nRow), *pStyleSheet ); + if ( bHasFiltered ) + DeleteArea(static_cast(nCol), static_cast(nRow), + static_cast(nCol), static_cast(nRow), IDF_AUTOFILL); - // ApplyPattern statt SetPattern um alte MergeFlags stehenzulassen - if ( pNewPattern ) - aCol[nCol].ApplyPattern( static_cast(nRow), *pNewPattern ); - else - aCol[nCol].ApplyPattern( static_cast(nRow), *pSrcPattern ); - } + if ( pSrcPattern != aCol[nCol].GetPattern( static_cast(nRow) ) ) + { + // Vorlage auch uebernehmen + //! am AttrArray mit ApplyPattern zusammenfassen ?? + if ( pStyleSheet ) + aCol[nCol].ApplyStyle( static_cast(nRow), *pStyleSheet ); - if (nAtSrc==nISrcEnd) - { - if ( nAtSrc != nISrcStart ) - { // mehr als eine Source-Zelle - nAtSrc = nISrcStart; + // ApplyPattern statt SetPattern um alte MergeFlags stehenzulassen + if ( pNewPattern ) + aCol[nCol].ApplyPattern( static_cast(nRow), *pNewPattern ); + else + aCol[nCol].ApplyPattern( static_cast(nRow), *pSrcPattern ); + } + + if (nAtSrc==nISrcEnd) + { + if ( nAtSrc != nISrcStart ) + { // mehr als eine Source-Zelle + nAtSrc = nISrcStart; + bGetPattern = sal_True; + } + } + else if (bPositive) + { + ++nAtSrc; + bGetPattern = sal_True; + } + else + { + --nAtSrc; bGetPattern = sal_True; } - } - else if (bPositive) - { - ++nAtSrc; - bGetPattern = sal_True; - } - else - { - --nAtSrc; - bGetPattern = sal_True; } if (rInner == nIEnd) break; @@ -736,7 +744,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, { sal_uLong nSource = nISrcStart; double nDelta; - if (( nScFillModeMouseModifier & KEY_MOD1 )||IsDataFiltered()) //i89232 + if (( nScFillModeMouseModifier & KEY_MOD1 )||bHasFiltered) //i89232 nDelta = 0.0; else if ( bPositive ) nDelta = 1.0; @@ -779,7 +787,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ((ScStringCell*)pSrcCell)->GetString( aValue ); else ((ScEditCell*)pSrcCell)->GetString( aValue ); - if ( !(nScFillModeMouseModifier & KEY_MOD1) && !IsDataFiltered()) //i89232 + if ( !(nScFillModeMouseModifier & KEY_MOD1) && !bHasFiltered) //i89232 { nCellDigits = 0; // look at each source cell individually nHeadNoneTail = lcl_DecompValueString( @@ -804,97 +812,94 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, if (!bRowFiltered) { - if (IsDataFiltered()) - DeleteArea(static_cast(nCol), static_cast(nRow), - static_cast(nCol), static_cast(nRow), IDF_AUTOFILL); //End of i89232 - switch (eCellType) - { - case CELLTYPE_VALUE: - aCol[nCol].Insert(static_cast(nRow), new ScValueCell(nVal + nDelta)); - break; - case CELLTYPE_STRING: - case CELLTYPE_EDIT: - if ( nHeadNoneTail ) - { - // #i48009# with the "nStringValue+(long)nDelta" expression within the - // lcl_ValueString calls, gcc 3.4.1 makes wrong optimizations (ok in 3.4.3), - // so nNextValue is now calculated ahead. - sal_Int32 nNextValue = nStringValue+(sal_Int32)nDelta; - - String aStr; - if ( nHeadNoneTail < 0 ) + switch (eCellType) + { + case CELLTYPE_VALUE: + aCol[nCol].Insert(static_cast(nRow), new ScValueCell(nVal + nDelta)); + break; + case CELLTYPE_STRING: + case CELLTYPE_EDIT: + if ( nHeadNoneTail ) { - aCol[nCol].Insert( static_cast(nRow), - lcl_getSuffixCell( pDocument, - nNextValue, nCellDigits, aValue, - eCellType, bIsOrdinalSuffix)); + // #i48009# with the "nStringValue+(long)nDelta" expression within the + // lcl_ValueString calls, gcc 3.4.1 makes wrong optimizations (ok in 3.4.3), + // so nNextValue is now calculated ahead. + sal_Int32 nNextValue = nStringValue+(sal_Int32)nDelta; + + String aStr; + if ( nHeadNoneTail < 0 ) + { + aCol[nCol].Insert( static_cast(nRow), + lcl_getSuffixCell( pDocument, + nNextValue, nCellDigits, aValue, + eCellType, bIsOrdinalSuffix)); + } + else + { + aStr = aValue; + aStr += lcl_ValueString( nNextValue, nCellDigits ); + aCol[nCol].Insert( static_cast(nRow), + new ScStringCell( aStr)); + } } else { - aStr = aValue; - aStr += lcl_ValueString( nNextValue, nCellDigits ); - aCol[nCol].Insert( static_cast(nRow), - new ScStringCell( aStr)); - } - } - else - { - ScAddress aDestPos( static_cast(nCol), static_cast(nRow), nTab ); - switch ( eCellType ) - { - case CELLTYPE_STRING: - case CELLTYPE_EDIT: - aCol[nCol].Insert( aDestPos.Row(), pSrcCell->CloneWithoutNote( *pDocument ) ); - break; - default: + ScAddress aDestPos( static_cast(nCol), static_cast(nRow), nTab ); + switch ( eCellType ) { - // added to avoid warnings + case CELLTYPE_STRING: + case CELLTYPE_EDIT: + aCol[nCol].Insert( aDestPos.Row(), pSrcCell->CloneWithoutNote( *pDocument ) ); + break; + default: + { + // added to avoid warnings + } } } + break; + case CELLTYPE_FORMULA : + FillFormula( nFormulaCounter, bFirst, + (ScFormulaCell*) pSrcCell, + static_cast(nCol), + static_cast(nRow), (rInner == nIEnd) ); + if (nFormulaCounter - nActFormCnt > nMaxFormCnt) + nMaxFormCnt = nFormulaCounter - nActFormCnt; + break; + default: + { + // added to avoid warnings } - break; - case CELLTYPE_FORMULA : - FillFormula( nFormulaCounter, bFirst, - (ScFormulaCell*) pSrcCell, - static_cast(nCol), - static_cast(nRow), (rInner == nIEnd) ); - if (nFormulaCounter - nActFormCnt > nMaxFormCnt) - nMaxFormCnt = nFormulaCounter - nActFormCnt; - break; - default: - { - // added to avoid warnings } - } - if (nSource==nISrcEnd) - { - if ( nSource != nISrcStart ) - { // mehr als eine Source-Zelle - nSource = nISrcStart; - bGetCell = sal_True; + if (nSource==nISrcEnd) + { + if ( nSource != nISrcStart ) + { // mehr als eine Source-Zelle + nSource = nISrcStart; + bGetCell = sal_True; + } + if ( !(nScFillModeMouseModifier & KEY_MOD1) && !bHasFiltered ) //i89232 + { + if ( bPositive ) + nDelta += 1.0; + else + nDelta -= 1.0; + } + nFormulaCounter = nActFormCnt; + bFirst = sal_False; } - if ( !(nScFillModeMouseModifier & KEY_MOD1) && !IsDataFiltered() ) //i89232 + else if (bPositive) { - if ( bPositive ) - nDelta += 1.0; - else - nDelta -= 1.0; + ++nSource; + bGetCell = sal_True; } - nFormulaCounter = nActFormCnt; - bFirst = sal_False; - } - else if (bPositive) - { - ++nSource; - bGetCell = sal_True; - } - else - { - --nSource; - bGetCell = sal_True; + else + { + --nSource; + bGetCell = sal_True; } } @@ -997,7 +1002,6 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n //Add for i89232 if ((eFillDir == FILL_TO_BOTTOM)||(eFillDir == FILL_TO_TOP)) { - long nfilteredrow = 0; long nBegin = 0; long nEnd = 0; if (nEndY > nRow1) @@ -1010,16 +1014,12 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n nBegin = nEndY; nEnd = nRow1 -1; } - for (long nRowIndex = nBegin; nRowIndex <= nEnd; nRowIndex++) - { - sal_uInt8 nFlags = pRowFlags->GetValue(nRowIndex); - if (nFlags & CR_FILTERED) - nfilteredrow++; - } + long nNonFiltered = CountNonFilteredRows(nBegin, nEnd); + long nFiltered = nEnd + 1 - nBegin - nNonFiltered; if (nIndex >0) - nIndex = nIndex - nfilteredrow; + nIndex = nIndex - nFiltered; else - nIndex = nIndex + nfilteredrow; + nIndex = nIndex + nFiltered; } //End of i89232 -- cgit v1.2.3 From 0840df75dec4a7c04da12cdbfa291fc5caeb19cf Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Thu, 10 Mar 2011 12:54:21 +0100 Subject: dba34d: #i116509# check if first and previous work --- connectivity/source/drivers/ado/AResultSet.cxx | 2 +- connectivity/source/drivers/dbase/DNoException.cxx | 15 +++++++++------ connectivity/source/drivers/dbase/DTable.cxx | 2 +- connectivity/source/drivers/dbase/dindexnode.cxx | 13 ++++++++----- connectivity/source/drivers/odbcbase/OResultSet.cxx | 19 ++++++++++++++----- .../source/drivers/odbcbase/OResultSetMetaData.cxx | 6 +++++- connectivity/source/drivers/odbcbase/OStatement.cxx | 12 ++++++++---- 7 files changed, 46 insertions(+), 23 deletions(-) diff --git a/connectivity/source/drivers/ado/AResultSet.cxx b/connectivity/source/drivers/ado/AResultSet.cxx index 0c5db12c3355..2d902eb45c4f 100644 --- a/connectivity/source/drivers/ado/AResultSet.cxx +++ b/connectivity/source/drivers/ado/AResultSet.cxx @@ -400,7 +400,7 @@ void SAL_CALL OResultSet::beforeFirst( ) throw(SQLException, RuntimeException) if(first()) - previous(); + m_bOnFirstAfterOpen = !previous(); } // ------------------------------------------------------------------------- void SAL_CALL OResultSet::afterLast( ) throw(SQLException, RuntimeException) diff --git a/connectivity/source/drivers/dbase/DNoException.cxx b/connectivity/source/drivers/dbase/DNoException.cxx index 7534d06f068c..4f2e4890d705 100644 --- a/connectivity/source/drivers/dbase/DNoException.cxx +++ b/connectivity/source/drivers/dbase/DNoException.cxx @@ -242,7 +242,7 @@ void ODbaseTable::AllocBuffer() } // Falls noch kein Puffer vorhanden: allozieren: - if (m_pBuffer == NULL && nSize) + if (m_pBuffer == NULL && nSize > 0) { m_nBufferSize = nSize; m_pBuffer = new sal_uInt8[m_nBufferSize+1]; @@ -504,11 +504,14 @@ SvStream& connectivity::dbase::operator << (SvStream &rStream, const ONDXPage& r sal_uIntPtr nTell = rStream.Tell() % 512; sal_uInt16 nBufferSize = rStream.GetBufferSize(); sal_uIntPtr nSize = nBufferSize - nTell; - char* pEmptyData = new char[nSize]; - memset(pEmptyData,0x00,nSize); - rStream.Write((sal_uInt8*)pEmptyData,nSize); - rStream.Seek(nTell); - delete [] pEmptyData; + if ( nSize <= nBufferSize ) + { + char* pEmptyData = new char[nSize]; + memset(pEmptyData,0x00,nSize); + rStream.Write((sal_uInt8*)pEmptyData,nSize); + rStream.Seek(nTell); + delete [] pEmptyData; + } } return rStream; } diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index a0844b93b0b7..6868fa72c18e 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -2822,7 +2822,7 @@ void ODbaseTable::AllocBuffer() } // Falls noch kein Puffer vorhanden: allozieren: - if (m_pBuffer == NULL && nSize) + if (m_pBuffer == NULL && nSize > 0) { m_nBufferSize = nSize; m_pBuffer = new sal_uInt8[m_nBufferSize+1]; diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx index 767595d06b85..5e153e2f6111 100644 --- a/connectivity/source/drivers/dbase/dindexnode.cxx +++ b/connectivity/source/drivers/dbase/dindexnode.cxx @@ -926,11 +926,14 @@ SvStream& connectivity::dbase::operator << (SvStream &rStream, const ONDXPage& r sal_uIntPtr nTell = rStream.Tell() % PAGE_SIZE; sal_uInt16 nBufferSize = rStream.GetBufferSize(); sal_uIntPtr nRemainSize = nBufferSize - nTell; - char* pEmptyData = new char[nRemainSize]; - memset(pEmptyData,0x00,nRemainSize); - rStream.Write((sal_uInt8*)pEmptyData,nRemainSize); - rStream.Seek(nTell); - delete [] pEmptyData; + if ( nRemainSize <= nBufferSize ) + { + char* pEmptyData = new char[nRemainSize]; + memset(pEmptyData,0x00,nRemainSize); + rStream.Write((sal_uInt8*)pEmptyData,nRemainSize); + rStream.Seek(nTell); + delete [] pEmptyData; + } } return rStream; } diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx index 7055bd273370..24c7b4a3a892 100644 --- a/connectivity/source/drivers/odbcbase/OResultSet.cxx +++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx @@ -1365,15 +1365,24 @@ sal_Bool OResultSet::isBookmarkable() const //------------------------------------------------------------------------------ void OResultSet::setFetchDirection(sal_Int32 _par0) { - N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_CURSOR_TYPE,(SQLPOINTER)_par0,SQL_IS_UINTEGER); + OSL_ENSURE(_par0>0,"Illegal fetch direction!"); + if ( _par0 > 0 ) + { + N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_CURSOR_TYPE,(SQLPOINTER)_par0,SQL_IS_UINTEGER); + } } //------------------------------------------------------------------------------ void OResultSet::setFetchSize(sal_Int32 _par0) { - N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_ARRAY_SIZE,(SQLPOINTER)_par0,SQL_IS_UINTEGER); - delete m_pRowStatusArray; - m_pRowStatusArray = new SQLUSMALLINT[_par0]; - N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_STATUS_PTR,m_pRowStatusArray,SQL_IS_POINTER); + OSL_ENSURE(_par0>0,"Illegal fetch size!"); + if ( _par0 > 0 ) + { + N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_ARRAY_SIZE,(SQLPOINTER)_par0,SQL_IS_UINTEGER); + delete m_pRowStatusArray; + + m_pRowStatusArray = new SQLUSMALLINT[_par0]; + N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_STATUS_PTR,m_pRowStatusArray,SQL_IS_POINTER); + } } // ------------------------------------------------------------------------- IPropertyArrayHelper* OResultSet::createArrayHelper( ) const diff --git a/connectivity/source/drivers/odbcbase/OResultSetMetaData.cxx b/connectivity/source/drivers/odbcbase/OResultSetMetaData.cxx index db4538b76e10..7a47a36545a2 100644 --- a/connectivity/source/drivers/odbcbase/OResultSetMetaData.cxx +++ b/connectivity/source/drivers/odbcbase/OResultSetMetaData.cxx @@ -60,7 +60,11 @@ OResultSetMetaData::~OResultSetMetaData() ); ::rtl::OUString sValue; if ( nRet == SQL_SUCCESS ) + { + if ( nRealLen < 0 ) + nRealLen = BUFFER_LEN; sValue = ::rtl::OUString(pName,nRealLen,m_pConnection->getTextEncoding()); + } delete [] pName; OTools::ThrowException(m_pConnection,nRet,m_aStatementHandle,SQL_HANDLE_STMT,*this); if(nRealLen > BUFFER_LEN) @@ -74,7 +78,7 @@ OResultSetMetaData::~OResultSetMetaData() &nRealLen, NULL ); - if ( nRet == SQL_SUCCESS ) + if ( nRet == SQL_SUCCESS && nRealLen > 0) sValue = ::rtl::OUString(pName,nRealLen,m_pConnection->getTextEncoding()); delete [] pName; OTools::ThrowException(m_pConnection,nRet,m_aStatementHandle,SQL_HANDLE_STMT,*this); diff --git a/connectivity/source/drivers/odbcbase/OStatement.cxx b/connectivity/source/drivers/odbcbase/OStatement.cxx index 874e24c20e75..1ffe2b0ffbca 100644 --- a/connectivity/source/drivers/odbcbase/OStatement.cxx +++ b/connectivity/source/drivers/odbcbase/OStatement.cxx @@ -875,12 +875,16 @@ void OStatement_Base::setFetchDirection(sal_Int32 _par0) void OStatement_Base::setFetchSize(sal_Int32 _par0) { OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); + OSL_ENSURE(_par0>0,"Illegal fetch size!"); + if ( _par0 > 0 ) + { - SQLRETURN nRetCode = N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_ARRAY_SIZE,(SQLPOINTER)_par0,SQL_IS_UINTEGER); + SQLRETURN nRetCode = N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_ARRAY_SIZE,(SQLPOINTER)_par0,SQL_IS_UINTEGER); - delete m_pRowStatusArray; - m_pRowStatusArray = new SQLUSMALLINT[_par0]; - nRetCode = N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_STATUS_PTR,m_pRowStatusArray,SQL_IS_POINTER); + delete m_pRowStatusArray; + m_pRowStatusArray = new SQLUSMALLINT[_par0]; + nRetCode = N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_STATUS_PTR,m_pRowStatusArray,SQL_IS_POINTER); + } } //------------------------------------------------------------------------------ void OStatement_Base::setMaxFieldSize(sal_Int32 _par0) -- cgit v1.2.3 From a8b68a6b9d60ce4f11d82a6f4932b9587289d969 Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Thu, 10 Mar 2011 12:58:23 +0100 Subject: dba34d: automatic code corrections --- .../sun/star/comp/bridgefactory/BridgeFactory.java | 4 +-- .../sun/star/comp/connections/PipedConnection.java | 2 +- jurt/com/sun/star/comp/loader/FactoryHelper.java | 7 ++--- jurt/com/sun/star/comp/loader/JavaLoader.java | 2 +- .../star/comp/servicemanager/ServiceManager.java | 33 +++++++++------------- .../com/sun/star/comp/urlresolver/UrlResolver.java | 12 ++++---- .../star/lib/connections/pipe/PipeConnection.java | 2 +- .../lib/connections/socket/SocketConnection.java | 2 +- .../lib/uno/bridges/java_remote/ProxyFactory.java | 5 ++-- .../XConnectionInputStream_Adapter.java | 2 +- .../XConnectionOutputStream_Adapter.java | 2 +- .../bridges/java_remote/java_remote_bridge.java | 2 -- .../sun/star/lib/uno/protocols/urp/Unmarshal.java | 2 +- jurt/com/sun/star/lib/util/UrlToFileMapper.java | 2 +- 14 files changed, 33 insertions(+), 46 deletions(-) diff --git a/jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java b/jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java index 1c4819326268..b0c093ffa2bb 100644 --- a/jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java +++ b/jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java @@ -108,7 +108,7 @@ public class BridgeFactory implements XBridgeFactory/*, XEventListener*/ { com.sun.star.uno.RuntimeException { boolean hasName = sName.length() != 0; - Object context = hasName ? (Object) sName : (Object) new UniqueToken(); + Object context = hasName ? sName : new UniqueToken(); // UnoRuntime.getBridgeByName internally uses context.toString() to // distinguish bridges, so the result of // new UniqueToken().toString() might clash with an explicit @@ -128,7 +128,7 @@ public class BridgeFactory implements XBridgeFactory/*, XEventListener*/ { } } - XBridge xBridge = null; + XBridge xBridge; try { IBridge iBridge = UnoRuntime.getBridgeByName("java", context, "remote", context, hasName ? new Object[]{sProtocol, aConnection, anInstanceProvider, sName} : new Object[]{sProtocol, aConnection, anInstanceProvider}); diff --git a/jurt/com/sun/star/comp/connections/PipedConnection.java b/jurt/com/sun/star/comp/connections/PipedConnection.java index f5a839ea78c5..aefc2eec3a7a 100644 --- a/jurt/com/sun/star/comp/connections/PipedConnection.java +++ b/jurt/com/sun/star/comp/connections/PipedConnection.java @@ -139,7 +139,7 @@ public class PipedConnection implements XConnection { if(_closed) throw new com.sun.star.io.IOException("connection has been closed"); - int bytes = 0; + int bytes ; if(_out < _in) { bytes = Math.min(aData.length - bytesWritten, _in - _out - 1); diff --git a/jurt/com/sun/star/comp/loader/FactoryHelper.java b/jurt/com/sun/star/comp/loader/FactoryHelper.java index 29b484631670..ef0dda4e3f23 100644 --- a/jurt/com/sun/star/comp/loader/FactoryHelper.java +++ b/jurt/com/sun/star/comp/loader/FactoryHelper.java @@ -413,10 +413,7 @@ public class FactoryHelper { _implementationId[2]= (byte)((hash >>> 16) & 0xff); _implementationId[3]= (byte)((hash >>>24) & 0xff); - for (int i= 0; i < nNameLength; i++) - { - _implementationId[4 + i]= arName[i]; - } + System.arraycopy(arName, 0, _implementationId, 4, nNameLength); } } return _implementationId; @@ -453,7 +450,7 @@ public class FactoryHelper { XSingleServiceFactory xSingleServiceFactory = null; try { - Field serviceName = null; + Field serviceName ; try { serviceName = implClass.getField("__serviceName"); diff --git a/jurt/com/sun/star/comp/loader/JavaLoader.java b/jurt/com/sun/star/comp/loader/JavaLoader.java index 47723b208497..25fc90b47676 100644 --- a/jurt/com/sun/star/comp/loader/JavaLoader.java +++ b/jurt/com/sun/star/comp/loader/JavaLoader.java @@ -265,7 +265,7 @@ public class JavaLoader implements XImplementationLoader, locationUrl = expand_url( locationUrl ); Object returnObject = null; - Class clazz = null; + Class clazz ; DEBUG("try to get factory for " + implementationName); diff --git a/jurt/com/sun/star/comp/servicemanager/ServiceManager.java b/jurt/com/sun/star/comp/servicemanager/ServiceManager.java index 3d672c6dfddf..026f198a2f02 100644 --- a/jurt/com/sun/star/comp/servicemanager/ServiceManager.java +++ b/jurt/com/sun/star/comp/servicemanager/ServiceManager.java @@ -187,7 +187,7 @@ public class ServiceManager implements XMultiServiceFactory, Class clazz = Class.forName( newImpls[i] ); Class[] methodClassParam = { String.class, XMultiServiceFactory.class, XRegistryKey.class }; - java.lang.reflect.Method getFactoryMeth = null; + java.lang.reflect.Method getFactoryMeth ; try { getFactoryMeth = clazz.getMethod("__getServiceFactory", methodClassParam); } @@ -233,7 +233,7 @@ public class ServiceManager implements XMultiServiceFactory, public void initialize( Object args[] ) throws com.sun.star.uno.Exception, com.sun.star.uno.RuntimeException { - XSimpleRegistry xSimpleRegistry = null; + XSimpleRegistry xSimpleRegistry ; try { xSimpleRegistry = (XSimpleRegistry) args[0]; if (xSimpleRegistry != null) @@ -462,9 +462,9 @@ public class ServiceManager implements XMultiServiceFactory, XEventListener listener = (XEventListener) enumer.nextElement(); listener.disposing(new com.sun.star.lang.EventObject(this)); } + eventListener.removeAllElements(); } - eventListener.removeAllElements(); factoriesByServiceNames.clear(); factoriesByImplNames.clear(); } @@ -527,12 +527,9 @@ public class ServiceManager implements XMultiServiceFactory, XServiceInfo xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, object); - if (xServiceInfo != null) { - return UnoRuntime.areSame(factoriesByImplNames.get(xServiceInfo.getImplementationName()), object); - } + return xServiceInfo != null && UnoRuntime.areSame(factoriesByImplNames.get(xServiceInfo.getImplementationName()), object); - return false; - } + } /** * Adds a SingleServiceFactory to the ServiceManager. @@ -567,7 +564,7 @@ public class ServiceManager implements XMultiServiceFactory, String[] serviceNames = xServiceInfo.getSupportedServiceNames(); - java.util.Vector vec = null; + java.util.Vector vec ; for (int i=0; iServiceManager. diff --git a/jurt/com/sun/star/comp/urlresolver/UrlResolver.java b/jurt/com/sun/star/comp/urlresolver/UrlResolver.java index 538315638553..2a7bddcb01d9 100644 --- a/jurt/com/sun/star/comp/urlresolver/UrlResolver.java +++ b/jurt/com/sun/star/comp/urlresolver/UrlResolver.java @@ -71,9 +71,9 @@ public class UrlResolver { } public Object resolve(/*IN*/String dcp) throws NoConnectException, ConnectionSetupException, IllegalArgumentException, com.sun.star.uno.RuntimeException { - String conDcp = null; - String protDcp = null; - String rootOid = null; + String conDcp ; + String protDcp ; + String rootOid ; if(dcp.indexOf(';') == -1) {// use old style conDcp = dcp; @@ -96,8 +96,8 @@ public class UrlResolver { rootOid = dcp.trim().trim(); } - Object rootObject = null; - XBridgeFactory xBridgeFactory= null; + Object rootObject ; + XBridgeFactory xBridgeFactory ; try { xBridgeFactory = UnoRuntime.queryInterface(XBridgeFactory.class, _xMultiServiceFactory.createInstance("com.sun.star.bridge.BridgeFactory")); @@ -107,7 +107,7 @@ public class UrlResolver { XBridge xBridge = xBridgeFactory.getBridge(conDcp + ";" + protDcp); if(xBridge == null) { - Object connector= null; + Object connector ; try { connector = _xMultiServiceFactory.createInstance("com.sun.star.connection.Connector"); } catch (com.sun.star.uno.Exception e) { diff --git a/jurt/com/sun/star/lib/connections/pipe/PipeConnection.java b/jurt/com/sun/star/lib/connections/pipe/PipeConnection.java index 455e3aab6502..f18cafb29c3e 100644 --- a/jurt/com/sun/star/lib/connections/pipe/PipeConnection.java +++ b/jurt/com/sun/star/lib/connections/pipe/PipeConnection.java @@ -82,7 +82,7 @@ public class PipeConnection implements XConnection, XConnectionBroadcaster { _bFirstRead = true; // get pipe name from pipe descriptor - String aPipeName = null; + String aPipeName ; StringTokenizer aTokenizer = new StringTokenizer( description, "," ); if ( aTokenizer.hasMoreTokens() ) { diff --git a/jurt/com/sun/star/lib/connections/socket/SocketConnection.java b/jurt/com/sun/star/lib/connections/socket/SocketConnection.java index 8512bdb49fe1..13da9d5cbea9 100644 --- a/jurt/com/sun/star/lib/connections/socket/SocketConnection.java +++ b/jurt/com/sun/star/lib/connections/socket/SocketConnection.java @@ -149,7 +149,7 @@ public class SocketConnection implements XConnection, XConnectionBroadcaster { bytes[0] = new byte[nBytesToRead]; try { - int count = 0; + int count ; do { count = _inputStream.read(bytes[0], read_bytes, nBytesToRead - read_bytes); diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java index ae2719f1c07d..c29be0c9558d 100644 --- a/jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java +++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java @@ -113,9 +113,8 @@ final class ProxyFactory { throws Throwable { if (method.equals(METHOD_EQUALS) || method.equals(METHOD_IS_SAME)) { - return new Boolean( - args[0] != null - && oid.equals(UnoRuntime.generateOid(args[0]))); + return Boolean.valueOf(args[0] != null + && oid.equals(UnoRuntime.generateOid(args[0]))); } else if (method.equals(METHOD_HASH_CODE)) { return new Integer(oid.hashCode()); } else if (method.equals(METHOD_TO_STRING)) { diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java index e663a96d1ea7..274d9389bcf0 100644 --- a/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java +++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java @@ -50,7 +50,7 @@ class XConnectionInputStream_Adapter extends InputStream { public int read() throws IOException { - int len = 0; + int len ; try { len = _xConnection.read(_bytes, 1); diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java index 51f3594330ee..51e4b6d0182c 100644 --- a/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java +++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java @@ -60,7 +60,7 @@ class XConnectionOutputStream_Adapter extends OutputStream { } public void write(byte[] b, int off, int len) throws IOException { - byte bytes[] = null; + byte bytes[] ; if(off == 0 && len == b.length) bytes = b; diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java index 267a84d7515f..7589ffbe8c5a 100644 --- a/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java +++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java @@ -620,8 +620,6 @@ public class java_remote_bridge checkDisposed(); - boolean goThroughThreadPool = false; - ThreadId threadId = _iThreadPool.getThreadId(); Object handle = _iThreadPool.attach(threadId); try { diff --git a/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java b/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java index 5a500ad3a0c1..fe7ea2231589 100644 --- a/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java +++ b/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java @@ -91,7 +91,7 @@ final class Unmarshal { public ThreadId readThreadId() { int len = readCompressedNumber(); - byte[] data = null; + byte[] data ; ThreadId id = null; if (len != 0) { data = new byte[len]; diff --git a/jurt/com/sun/star/lib/util/UrlToFileMapper.java b/jurt/com/sun/star/lib/util/UrlToFileMapper.java index 22b6ccf0a745..9de0a199880f 100644 --- a/jurt/com/sun/star/lib/util/UrlToFileMapper.java +++ b/jurt/com/sun/star/lib/util/UrlToFileMapper.java @@ -145,7 +145,7 @@ public final class UrlToFileMapper { try { enc = (String) urlEncoderEncode.invoke( null, - new Object[] { new Character(c).toString(), "UTF-8" }); + new Object[] {Character.toString(c), "UTF-8" }); } catch (IllegalAccessException e) { throw new RuntimeException("This cannot happen: " + e); } catch (InvocationTargetException e) { -- cgit v1.2.3 From 27ef3ca46b4a2cf3963a5bc012b9d8278653c8ac Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Thu, 10 Mar 2011 12:59:15 +0100 Subject: dba34d: remove unnescessary casts --- .../sun/star/wizards/agenda/AgendaTemplate.java | 97 ++++++------ .../wizards/agenda/AgendaWizardDialogImpl.java | 16 +- .../com/sun/star/wizards/agenda/TopicsControl.java | 18 +-- .../com/sun/star/wizards/common/Configuration.java | 41 +++-- wizards/com/sun/star/wizards/common/Desktop.java | 58 +++---- .../com/sun/star/wizards/common/FileAccess.java | 90 +++++------ wizards/com/sun/star/wizards/common/HelpIds.java | 2 +- wizards/com/sun/star/wizards/common/Helper.java | 49 +++--- wizards/com/sun/star/wizards/common/JavaTools.java | 35 ++--- .../star/wizards/common/NamedValueCollection.java | 2 +- .../sun/star/wizards/common/NumberFormatter.java | 14 +- .../sun/star/wizards/common/NumericalHelper.java | 19 ++- .../sun/star/wizards/common/PropertySetHelper.java | 4 +- wizards/com/sun/star/wizards/common/Resource.java | 8 +- .../com/sun/star/wizards/common/SystemDialog.java | 35 ++--- wizards/com/sun/star/wizards/common/UCB.java | 18 +-- .../com/sun/star/wizards/db/BlindtextCreator.java | 3 +- .../com/sun/star/wizards/db/CommandMetaData.java | 10 +- wizards/com/sun/star/wizards/db/CommandName.java | 10 +- wizards/com/sun/star/wizards/db/DBMetaData.java | 25 +-- wizards/com/sun/star/wizards/db/FieldColumn.java | 39 +++-- wizards/com/sun/star/wizards/db/RecordParser.java | 16 +- .../sun/star/wizards/db/RelationController.java | 4 +- .../com/sun/star/wizards/db/SQLQueryComposer.java | 20 +-- .../com/sun/star/wizards/db/TableDescriptor.java | 28 ++-- wizards/com/sun/star/wizards/db/TypeInspector.java | 31 ++-- wizards/com/sun/star/wizards/document/Control.java | 4 +- .../sun/star/wizards/document/DatabaseControl.java | 8 +- .../com/sun/star/wizards/document/FormHandler.java | 52 +++---- .../sun/star/wizards/document/OfficeDocument.java | 62 ++++---- wizards/com/sun/star/wizards/document/Shape.java | 10 +- .../star/wizards/document/TimeStampControl.java | 7 +- wizards/com/sun/star/wizards/fax/FaxDocument.java | 23 ++- .../sun/star/wizards/fax/FaxWizardDialogImpl.java | 49 +++--- .../com/sun/star/wizards/form/CallFormWizard.java | 2 +- .../com/sun/star/wizards/form/DataEntrySetter.java | 14 +- wizards/com/sun/star/wizards/form/FieldLinker.java | 57 +++---- wizards/com/sun/star/wizards/form/Finalizer.java | 2 +- .../sun/star/wizards/form/FormConfiguration.java | 10 +- .../sun/star/wizards/form/FormControlArranger.java | 2 +- .../com/sun/star/wizards/form/FormDocument.java | 10 +- wizards/com/sun/star/wizards/form/FormWizard.java | 6 +- .../com/sun/star/wizards/form/StyleApplier.java | 2 +- .../sun/star/wizards/form/UIControlArranger.java | 8 +- .../sun/star/wizards/letter/LetterDocument.java | 35 ++--- .../wizards/letter/LetterWizardDialogImpl.java | 77 +++++----- wizards/com/sun/star/wizards/query/Finalizer.java | 3 +- .../com/sun/star/wizards/query/QuerySummary.java | 3 +- .../com/sun/star/wizards/query/QueryWizard.java | 7 +- .../sun/star/wizards/report/CallReportWizard.java | 2 +- wizards/com/sun/star/wizards/report/DBColumn.java | 26 ++-- .../com/sun/star/wizards/report/Dataimport.java | 3 +- .../sun/star/wizards/report/GroupFieldHandler.java | 12 +- .../com/sun/star/wizards/report/RecordTable.java | 12 +- .../sun/star/wizards/report/ReportFinalizer.java | 4 +- .../sun/star/wizards/report/ReportLayouter.java | 14 +- .../star/wizards/report/ReportTextDocument.java | 92 ++++------- .../wizards/report/ReportTextImplementation.java | 12 +- .../com/sun/star/wizards/report/ReportWizard.java | 27 ++-- .../reportbuilder/ReportBuilderImplementation.java | 12 +- .../reportbuilder/layout/ColumnarSingleColumn.java | 3 +- .../reportbuilder/layout/ColumnarThreeColumns.java | 3 +- .../reportbuilder/layout/ColumnarTwoColumns.java | 3 +- .../reportbuilder/layout/DesignTemplate.java | 12 +- .../reportbuilder/layout/InBlocksLabelsAbove.java | 3 +- .../reportbuilder/layout/InBlocksLabelsLeft.java | 3 +- .../layout/ReportBuilderLayouter.java | 65 ++++---- .../reportbuilder/layout/SectionEmptyObject.java | 3 +- .../wizards/reportbuilder/layout/SectionLabel.java | 3 +- .../reportbuilder/layout/SectionTextField.java | 3 +- .../star/wizards/reportbuilder/layout/Tabular.java | 3 +- wizards/com/sun/star/wizards/table/CGCategory.java | 5 +- .../sun/star/wizards/table/CallTableWizard.java | 2 +- .../sun/star/wizards/table/FieldDescription.java | 10 +- .../com/sun/star/wizards/table/FieldFormatter.java | 15 +- .../sun/star/wizards/table/PrimaryKeyHandler.java | 24 +-- .../sun/star/wizards/table/ScenarioSelector.java | 12 +- .../com/sun/star/wizards/table/TableWizard.java | 2 +- .../com/sun/star/wizards/text/TextDocument.java | 91 ++++++----- .../sun/star/wizards/text/TextFieldHandler.java | 35 ++--- .../sun/star/wizards/text/TextFrameHandler.java | 5 +- .../sun/star/wizards/text/TextSectionHandler.java | 28 ++-- .../sun/star/wizards/text/TextStyleHandler.java | 12 +- .../sun/star/wizards/text/TextTableHandler.java | 29 ++-- wizards/com/sun/star/wizards/text/ViewHandler.java | 18 +-- .../sun/star/wizards/ui/AggregateComponent.java | 17 +- wizards/com/sun/star/wizards/ui/ButtonList.java | 22 ++- .../sun/star/wizards/ui/CommandFieldSelection.java | 10 +- .../com/sun/star/wizards/ui/ControlScroller.java | 22 ++- .../star/wizards/ui/DBLimitedFieldSelection.java | 7 +- .../com/sun/star/wizards/ui/DocumentPreview.java | 14 +- .../com/sun/star/wizards/ui/FieldSelection.java | 20 +-- .../com/sun/star/wizards/ui/FilterComponent.java | 34 ++-- wizards/com/sun/star/wizards/ui/ImageList.java | 16 +- wizards/com/sun/star/wizards/ui/PathSelection.java | 6 +- wizards/com/sun/star/wizards/ui/PeerConfig.java | 6 +- .../com/sun/star/wizards/ui/SortingComponent.java | 45 +++--- .../com/sun/star/wizards/ui/TitlesComponent.java | 2 +- wizards/com/sun/star/wizards/ui/UnoDialog.java | 171 ++++++++++----------- wizards/com/sun/star/wizards/ui/UnoDialog2.java | 18 +-- wizards/com/sun/star/wizards/ui/WizardDialog.java | 21 ++- .../star/wizards/ui/event/AbstractListener.java | 2 +- .../com/sun/star/wizards/ui/event/DataAware.java | 2 +- .../sun/star/wizards/ui/event/DataAwareFields.java | 2 +- .../sun/star/wizards/ui/event/ListModelBinder.java | 8 +- .../star/wizards/ui/event/MethodInvocation.java | 6 +- .../sun/star/wizards/ui/event/RadioDataAware.java | 2 +- .../sun/star/wizards/ui/event/UnoDataAware.java | 8 +- wizards/com/sun/star/wizards/web/FTPDialog.java | 7 +- wizards/com/sun/star/wizards/web/Process.java | 6 +- wizards/com/sun/star/wizards/web/WWD_Events.java | 12 +- wizards/com/sun/star/wizards/web/WWD_Startup.java | 8 +- .../com/sun/star/wizards/web/data/CGDesign.java | 2 +- .../com/sun/star/wizards/web/data/CGDocument.java | 8 +- .../com/sun/star/wizards/web/data/CGSettings.java | 4 +- .../star/wizards/web/export/AbstractExporter.java | 6 +- 116 files changed, 1036 insertions(+), 1231 deletions(-) diff --git a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java index 09d2fb9831b5..32a94738da41 100644 --- a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java +++ b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java @@ -26,11 +26,7 @@ ************************************************************************/ package com.sun.star.wizards.agenda; -import java.util.Calendar; -import java.util.Hashtable; -import java.util.List; -import java.util.Map; -import java.util.Vector; +import java.util.*; import com.sun.star.awt.TextEvent; @@ -201,7 +197,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data { template = calcTemplateName(templateURL); document = loadAsPreview(templateURL, false); - docMSF = ((XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, document)); + docMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, document); xFrame.getComponentWindow().setEnable(false); xTextDocument.lockControllers(); initialize(); @@ -374,7 +370,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data { itemsCache = new Hashtable(11); - XMultiServiceFactory xmsf = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, document); + XMultiServiceFactory xmsf = UnoRuntime.queryInterface(XMultiServiceFactory.class, document); // Headings itemsCache.put(FILLIN_MEETING_TYPE, @@ -442,7 +438,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data /* * Get the default locale of the document, and create the date and time formatters. */ - XMultiServiceFactory docMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, document); + XMultiServiceFactory docMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, document); try { Object defaults = docMSF.createInstance("com.sun.star.text.Defaults"); @@ -453,7 +449,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data calendar = Calendar.getInstance(jl); - XNumberFormatsSupplier nfs = (XNumberFormatsSupplier) UnoRuntime.queryInterface(XNumberFormatsSupplier.class, document); + XNumberFormatsSupplier nfs = UnoRuntime.queryInterface(XNumberFormatsSupplier.class, document); Object formatSettings = nfs.getNumberFormatSettings(); com.sun.star.util.Date date = (com.sun.star.util.Date) Helper.getUnoPropertyValue(formatSettings, "NullDate"); @@ -483,8 +479,8 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data initializeItems(); initializeTitles(); initializeItemsSections(); - XMultiServiceFactory xMultiServiceFactory = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, document); - textSectionHandler = new TextSectionHandler(xMultiServiceFactory, (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, document)); + XMultiServiceFactory xMultiServiceFactory = UnoRuntime.queryInterface(XMultiServiceFactory.class, document); + textSectionHandler = new TextSectionHandler(xMultiServiceFactory, UnoRuntime.queryInterface(XTextDocument.class, document)); initializeTopics(); _allItems.clear(); _allItems = null; @@ -498,7 +494,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data { XTextRange item = null; - XMultiServiceFactory xmsf = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, document); + XMultiServiceFactory xmsf = UnoRuntime.queryInterface(XMultiServiceFactory.class, document); for (int i = 0; i < _allItems.size(); i++) { @@ -550,7 +546,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data { try { - XSearchable xSearchable = (XSearchable) UnoRuntime.queryInterface(XSearchable.class, document); + XSearchable xSearchable = UnoRuntime.queryInterface(XSearchable.class, document); XSearchDescriptor sd = xSearchable.createSearchDescriptor(); sd.setSearchString("<[^>]+>"); sd.setPropertyValue("SearchRegularExpression", Boolean.TRUE); @@ -558,12 +554,12 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data XIndexAccess ia = xSearchable.findAll(sd); - List l = new Vector(ia.getCount()); + List l = new ArrayList(ia.getCount()); for (int i = 0; i < ia.getCount(); i++) { try { - l.add((XTextRange) UnoRuntime.queryInterface(XTextRange.class, ia.getByIndex(i))); + l.add(UnoRuntime.queryInterface(XTextRange.class, ia.getByIndex(i))); } catch (Exception ex) { @@ -607,20 +603,20 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data private String[] getSections(Object document, String s) { - XTextSectionsSupplier xTextSectionsSupplier = (XTextSectionsSupplier) UnoRuntime.queryInterface(XTextSectionsSupplier.class, document); + XTextSectionsSupplier xTextSectionsSupplier = UnoRuntime.queryInterface(XTextSectionsSupplier.class, document); String[] allSections = xTextSectionsSupplier.getTextSections().getElementNames(); return getNamesWhichStartWith(allSections, s); } Object getSection(String name) throws NoSuchElementException, WrappedTargetException { - XTextSectionsSupplier xTextSectionsSupplier = (XTextSectionsSupplier) UnoRuntime.queryInterface(XTextSectionsSupplier.class, document); + XTextSectionsSupplier xTextSectionsSupplier = UnoRuntime.queryInterface(XTextSectionsSupplier.class, document); return ((Any) (xTextSectionsSupplier.getTextSections().getByName(name))).getObject(); } Object getTable(String name) throws NoSuchElementException, WrappedTargetException { - XTextTablesSupplier xTextTablesSupplier = (XTextTablesSupplier) UnoRuntime.queryInterface(XTextTablesSupplier.class, document); + XTextTablesSupplier xTextTablesSupplier = UnoRuntime.queryInterface(XTextTablesSupplier.class, document); return ((Any) xTextTablesSupplier.getTextTables().getByName(name)).getObject(); } @@ -676,7 +672,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data { return PropertyNames.EMPTY_STRING; } - int date = new Integer(d).intValue(); + int date = Integer.parseInt(d); calendar.clear(); calendar.set(date / 10000, (date % 10000) / 100 - 1, @@ -698,7 +694,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data { return PropertyNames.EMPTY_STRING; } - int time = new Integer(s).intValue(); + int time = Integer.parseInt(s); double t = ((double) (time / 1000000) / 24) + ((double) ((time % 1000000) / 1000) / (24 * 60)); return timeFormatter.convertNumberToString(timeFormat, t); @@ -722,7 +718,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data */ private void deleteHiddenSections() { - XTextSectionsSupplier xTextSectionsSupplier = (XTextSectionsSupplier) UnoRuntime.queryInterface(XTextSectionsSupplier.class, document); + XTextSectionsSupplier xTextSectionsSupplier = UnoRuntime.queryInterface(XTextSectionsSupplier.class, document); String[] allSections = xTextSectionsSupplier.getTextSections().getElementNames(); try { @@ -733,7 +729,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data boolean visible = ((Boolean) Helper.getUnoPropertyValue(section, "IsVisible")).booleanValue(); if (!visible) { - ((XTextContent) UnoRuntime.queryInterface(XTextContent.class, section)).getAnchor().setString(PropertyNames.EMPTY_STRING); + UnoRuntime.queryInterface(XTextContent.class, section).getAnchor().setString(PropertyNames.EMPTY_STRING); } } } @@ -759,7 +755,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data try { Object minutesAllSection = getSection(SECTION_MINUTES_ALL); - XTextSection xTextSection = (XTextSection) UnoRuntime.queryInterface(XTextSection.class, minutesAllSection); + XTextSection xTextSection = UnoRuntime.queryInterface(XTextSection.class, minutesAllSection); xTextSection.getAnchor().setString(PropertyNames.EMPTY_STRING); } catch (Exception ex) @@ -777,7 +773,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data int topicStartTime = 0; try { - topicStartTime = new Integer(agenda.cp_Time).intValue(); + topicStartTime = Integer.parseInt(agenda.cp_Time); } catch (Exception ex) { @@ -936,7 +932,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data Helper.setUnoPropertyValue(placeHolder, "PlaceHolder", ph); Helper.setUnoPropertyValue(placeHolder, "Hint", hint); Helper.setUnoPropertyValue(placeHolder, "PlaceHolderType", new Short(PlaceholderType.TEXT)); - return (XTextContent) UnoRuntime.queryInterface(XTextContent.class, placeHolder); + return UnoRuntime.queryInterface(XTextContent.class, placeHolder); } @@ -1016,7 +1012,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data table = getTable(name); section = getSection(name); - XTextTable xTextTable = (XTextTable) UnoRuntime.queryInterface(XTextTable.class, table); + XTextTable xTextTable = UnoRuntime.queryInterface(XTextTable.class, table); XTextTableCursor cursor = xTextTable.createCursorByCellName("A1"); AgendaItem ai; // should this section be visible? @@ -1072,7 +1068,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data while ((!cellName.equals(cursor.getRangeName()) && (!cursor.getRangeName().startsWith("A")))) { cell = xTextTable.getCellByName(cursor.getRangeName()); - ((XTextRange) UnoRuntime.queryInterface(XTextRange.class, cell)).setString(PropertyNames.EMPTY_STRING); + UnoRuntime.queryInterface(XTextRange.class, cell).setString(PropertyNames.EMPTY_STRING); cellName = cursor.getRangeName(); cursor.goRight((short) 1, false); } @@ -1085,7 +1081,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data return; } int rowIndex = getRowIndex(cursor); - int rowsCount = getRowCount((XTextTable) UnoRuntime.queryInterface(XTextTable.class, table)); + int rowsCount = getRowCount(UnoRuntime.queryInterface(XTextTable.class, table)); /* now before deleteing i move the cursor up so it * does not disappear, because it will crash office. @@ -1201,7 +1197,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data } // and this is the XTable. - table = ((XTextTable) UnoRuntime.queryInterface(XTextTable.class, t)); + table = UnoRuntime.queryInterface(XTextTable.class, t); /* first I store all <*> ranges * which are in the topics table. @@ -1246,7 +1242,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data while (!cursor.getRangeName().equals(afterLastCell)) { cell = table.getCellByName(cursor.getRangeName()); - XTextRange xTextRange = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, cell); + XTextRange xTextRange = UnoRuntime.queryInterface(XTextRange.class, cell); // first I store the content and para style of the cell AgendaElement ae = new TextElement(xTextRange); // if the cell contains a relevant <...> @@ -1413,12 +1409,14 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data break; } // move the cursor to the needed cell... - cursor.goRight((short) cursorMoves, false); - XCell xc = table.getCellByName(cursor.getRangeName()); - // and write it ! - te.write(xc); - ((TableCellFormatter) topicCellFormats.get(cursorMoves)).format(xc); - + if ( te != null) + { + cursor.goRight((short) cursorMoves, false); + XCell xc = table.getCellByName(cursor.getRangeName()); + // and write it ! + te.write(xc); + ((TableCellFormatter) topicCellFormats.get(cursorMoves)).format(xc); + } } } @@ -1585,7 +1583,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data */ public static String[] getNamesWhichStartWith(String[] allNames, String prefix) { - Vector v = new Vector(); + ArrayList v = new ArrayList(); for (int i = 0; i < allNames.length; i++) { if (allNames[i].startsWith(prefix)) @@ -1594,8 +1592,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data } } String[] s = new String[v.size()]; - System.arraycopy(v.toArray(), 0, s, 0, s.length); - return s; + return v.toArray(s); } /** @@ -1605,7 +1602,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data */ public static String getName(Object obj) { - return ((XNamed) UnoRuntime.queryInterface(XNamed.class, obj)).getName(); + return UnoRuntime.queryInterface(XNamed.class, obj).getName(); } /** @@ -1616,7 +1613,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data */ public static void removeTableRows(Object table, int start, int count) { - XTableRows rows = ((XTextTable) UnoRuntime.queryInterface(XTextTable.class, table)).getRows(); + XTableRows rows = UnoRuntime.queryInterface(XTextTable.class, table).getRows(); rows.removeByIndex(start, count); } @@ -1628,7 +1625,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data */ public static void insertTableRows(Object table, int start, int count) { - XTableRows rows = ((XTextTable) UnoRuntime.queryInterface(XTextTable.class, table)).getRows(); + XTableRows rows = UnoRuntime.queryInterface(XTextTable.class, table).getRows(); rows.insertByIndex(start, count); } @@ -1717,12 +1714,12 @@ class ParaStyled implements AgendaElement void format(Object textRange) { XText o; - o = ((XText) UnoRuntime.queryInterface(XText.class, textRange)); + o = UnoRuntime.queryInterface(XText.class, textRange); if (o == null) { - o = ((XTextRange) UnoRuntime.queryInterface(XTextRange.class, textRange)).getText(); + o = UnoRuntime.queryInterface(XTextRange.class, textRange).getText(); } - XTextRange xtr = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, textRange); + XTextRange xtr = UnoRuntime.queryInterface(XTextRange.class, textRange); XTextCursor cursor = o.createTextCursorByRange(xtr); Helper.setUnoPropertyValue(cursor, "ParaStyleName", paraStyle); @@ -1763,7 +1760,7 @@ class TextElement extends ParaStyled public void write(Object textRange) { - ((XTextRange) UnoRuntime.queryInterface(XTextRange.class, textRange)).setString(text); + UnoRuntime.queryInterface(XTextRange.class, textRange).setString(text); if (!text.equals(PropertyNames.EMPTY_STRING)) { super.write(textRange); @@ -1807,7 +1804,7 @@ class PlaceholderTextElement extends TextElement super.write(textRange); if (text == null || text.equals(PropertyNames.EMPTY_STRING)) { - XTextRange xTextRange = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, textRange); + XTextRange xTextRange = UnoRuntime.queryInterface(XTextRange.class, textRange); try { XTextContent xTextContent = AgendaTemplate.createPlaceHolder(xmsf, placeHolderText, hint); @@ -1849,7 +1846,7 @@ class PlaceholderElement extends ParaStyled public void write(Object textRange) { - XTextRange xTextRange = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, textRange); + XTextRange xTextRange = UnoRuntime.queryInterface(XTextRange.class, textRange); try { XTextContent xTextContent = AgendaTemplate.createPlaceHolder(xmsf, placeHolderText, hint); @@ -1896,8 +1893,8 @@ class AgendaItem implements AgendaElement public void write(Object tableCursor) throws Exception { - XTextTableCursor xTextTableCursor = (XTextTableCursor) UnoRuntime.queryInterface(XTextTableCursor.class, tableCursor); - XTextTable xTextTable = (XTextTable) UnoRuntime.queryInterface(XTextTable.class, table); + XTextTableCursor xTextTableCursor = UnoRuntime.queryInterface(XTextTableCursor.class, tableCursor); + XTextTable xTextTable = UnoRuntime.queryInterface(XTextTable.class, table); String cellname = xTextTableCursor.getRangeName(); Object cell = xTextTable.getCellByName(cellname); diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java index 96f8d53eafff..20ad03c428ae 100644 --- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java +++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java @@ -159,7 +159,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog // create the peer XWindow xw = agendaTemplate.xFrame.getContainerWindow(); - XWindowPeer xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xw); + XWindowPeer xWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, xw); this.createWindowPeer( xWindowPeer ); // initialize roadmap @@ -185,8 +185,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog removeTerminateListener(); ex.printStackTrace(); running=false; - return; - } + } } @@ -483,7 +482,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog agendaTemplate.xTextDocument.lockControllers(); - xTextDocument = (XTextDocument)UnoRuntime.queryInterface(XTextDocument.class,agendaTemplate.document); + xTextDocument = UnoRuntime.queryInterface(XTextDocument.class,agendaTemplate.document); bSaveSuccess = OfficeDocument.store(xMSF, xTextDocument, sPath , "writer8_template", false ); } catch (Exception e) { @@ -504,7 +503,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog agendaTemplate.finish( topicsControl.getTopicsData()); try { - XStorable xStoreable = (XStorable) UnoRuntime.queryInterface(XStorable.class, agendaTemplate.document); + XStorable xStoreable = UnoRuntime.queryInterface(XStorable.class, agendaTemplate.document); xStoreable.store(); } catch (Exception ex) { @@ -529,8 +528,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog loadValues[1] = new PropertyValue(); loadValues[1].Name = "InteractionHandler"; try { - XInteractionHandler xIH = (XInteractionHandler) UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler")); - loadValues[1].Value = xIH; + loadValues[1].Value = UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler")); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -538,7 +536,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog //Object oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), agenda.cp_TemplatePath, "_default", new PropertyValue[0]); Object oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), sPath, "_default", new PropertyValue[0]); xTextDocument = (com.sun.star.text.XTextDocument) oDoc; - XMultiServiceFactory xDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument); + XMultiServiceFactory xDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument); ViewHandler myViewHandler = new ViewHandler(xDocMSF, xTextDocument); try { myViewHandler.setViewSetting("ZoomType", new Short(com.sun.star.view.DocumentZoomType.OPTIMAL)); @@ -558,7 +556,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog private void closeDocument() { try { //xComponent.dispose(); - XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, agendaTemplate.xFrame); + XCloseable xCloseable = UnoRuntime.queryInterface(XCloseable.class, agendaTemplate.xFrame); xCloseable.close(false); } catch (CloseVetoException e) { e.printStackTrace(); diff --git a/wizards/com/sun/star/wizards/agenda/TopicsControl.java b/wizards/com/sun/star/wizards/agenda/TopicsControl.java index 2361176f861f..495ac8a94040 100644 --- a/wizards/com/sun/star/wizards/agenda/TopicsControl.java +++ b/wizards/com/sun/star/wizards/agenda/TopicsControl.java @@ -190,7 +190,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener */ static void addKeyListener(Object control, XKeyListener listener) { - XWindow xlastControl = (XWindow) UnoRuntime.queryInterface(XWindow.class, + XWindow xlastControl = UnoRuntime.queryInterface(XWindow.class, control); xlastControl.addKeyListener(listener); } @@ -200,7 +200,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener */ static void addFocusListener(Object control, XFocusListener listener) { - XWindow xlastControl = (XWindow) UnoRuntime.queryInterface(XWindow.class, + XWindow xlastControl = UnoRuntime.queryInterface(XWindow.class, control); xlastControl.addFocusListener(listener); } @@ -311,7 +311,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener */ public void focusGained(FocusEvent fe) { - XControl xc = (XControl) UnoRuntime.queryInterface(XControl.class, fe.Source); + XControl xc = UnoRuntime.queryInterface(XControl.class, fe.Source); focusGained(xc); } @@ -698,11 +698,11 @@ public class TopicsControl extends ControlScroller implements XFocusListener */ private void focus(Object textControl) { - ((XWindow) UnoRuntime.queryInterface(XWindow.class, textControl)).setFocus(); - XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, textControl); + UnoRuntime.queryInterface(XWindow.class, textControl).setFocus(); + XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, textControl); String text = xTextComponent.getText(); xTextComponent.setSelection(new Selection(0, text.length())); - XControl xc = (XControl) UnoRuntime.queryInterface(XControl.class, textControl); + XControl xc = UnoRuntime.queryInterface(XControl.class, textControl); focusGained(xc); } @@ -876,7 +876,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener */ private Selection getSelection(Object control) { - return ((XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, control)).getSelection(); + return UnoRuntime.queryInterface(XTextComponent.class, control).getSelection(); } /** @@ -897,8 +897,8 @@ public class TopicsControl extends ControlScroller implements XFocusListener { ControlRow cr = (ControlRow) ControlGroupVector.get(guiRow); Object control = getControl(cr, eventSource); - ((XWindow) UnoRuntime.queryInterface(XWindow.class, control)).setFocus(); - ((XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, control)).setSelection(s); + UnoRuntime.queryInterface(XWindow.class, control).setFocus(); + UnoRuntime.queryInterface(XTextComponent.class, control).setSelection(s); } /** diff --git a/wizards/com/sun/star/wizards/common/Configuration.java b/wizards/com/sun/star/wizards/common/Configuration.java index a95e773649b1..08baa26b412c 100644 --- a/wizards/com/sun/star/wizards/common/Configuration.java +++ b/wizards/com/sun/star/wizards/common/Configuration.java @@ -114,7 +114,7 @@ public abstract class Configuration public static Object getNode(String name, Object parent) throws Exception { - return ((XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, parent)).getByName(name); + return UnoRuntime.queryInterface(XNameAccess.class, parent).getByName(name); } public static void set(int value, String name, Object parent) throws Exception @@ -134,7 +134,7 @@ public abstract class Configuration public static void set(boolean value, String name, Object parent) throws Exception { - if (value == true) + if (value) { set(Boolean.TRUE, name, parent); } @@ -146,7 +146,7 @@ public abstract class Configuration public static void set(Object value, String name, Object parent) throws com.sun.star.lang.IllegalArgumentException, PropertyVetoException, UnknownPropertyException, WrappedTargetException { - ((XHierarchicalPropertySet) UnoRuntime.queryInterface(XHierarchicalPropertySet.class, parent)).setHierarchicalPropertyValue(name, value); + UnoRuntime.queryInterface(XHierarchicalPropertySet.class, parent).setHierarchicalPropertyValue(name, value); } /** Creates a new instance of RegistryEntry @@ -157,7 +157,7 @@ public abstract class Configuration */ public static Object getConfigurationNode(String name, Object parent) throws Exception { - return ((XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, parent)).getByName(name); + return UnoRuntime.queryInterface(XNameAccess.class, parent).getByName(name); } public static Object getConfigurationRoot(XMultiServiceFactory xmsf, String sPath, boolean updateable) throws com.sun.star.uno.Exception @@ -165,7 +165,7 @@ public abstract class Configuration Object oConfigProvider; oConfigProvider = xmsf.createInstance("com.sun.star.configuration.ConfigurationProvider"); - XMultiServiceFactory confMsf = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, oConfigProvider); + XMultiServiceFactory confMsf = UnoRuntime.queryInterface(XMultiServiceFactory.class, oConfigProvider); final String sView = updateable ? "com.sun.star.configuration.ConfigurationUpdateAccess" : "com.sun.star.configuration.ConfigurationAccess"; @@ -192,7 +192,7 @@ public abstract class Configuration public static String[] getChildrenNames(Object configView) { - XNameAccess nameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, configView); + XNameAccess nameAccess = UnoRuntime.queryInterface(XNameAccess.class, configView); return nameAccess.getElementNames(); } @@ -201,8 +201,7 @@ public abstract class Configuration try { Object oProdNameAccess = getConfigurationRoot(xMSF, "org.openoffice.Setup/Product", false); - String ProductName = (String) Helper.getUnoObjectbyName(oProdNameAccess, "ooName"); - return ProductName; + return (String) Helper.getUnoObjectbyName(oProdNameAccess, "ooName"); } catch (Exception exception) { @@ -247,8 +246,7 @@ public abstract class Configuration try { Object oMasterKey = getConfigurationRoot(xMSF, "org.openoffice.Setup/L10N/", false); - String sLinguistic = (String) Helper.getUnoObjectbyName(oMasterKey, "ooLocale"); - return sLinguistic; + return (String) Helper.getUnoObjectbyName(oMasterKey, "ooLocale"); } catch (Exception exception) { @@ -273,11 +271,11 @@ public abstract class Configuration public static Object addConfigNode(Object configView, String name) throws com.sun.star.lang.WrappedTargetException, ElementExistException, NoSuchElementException, com.sun.star.uno.Exception { - XNameContainer xNameContainer = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, configView); + XNameContainer xNameContainer = UnoRuntime.queryInterface(XNameContainer.class, configView); if (xNameContainer == null) { - XNameReplace xNameReplace = (XNameReplace) UnoRuntime.queryInterface(XNameReplace.class, configView); + XNameReplace xNameReplace = UnoRuntime.queryInterface(XNameReplace.class, configView); return xNameReplace.getByName(name); } else @@ -287,7 +285,7 @@ public abstract class Configuration xNameContainer.removeByName(name);*/ // create a new detached set element (instance of DataSourceDescription) - XSingleServiceFactory xElementFactory = (XSingleServiceFactory) UnoRuntime.queryInterface(XSingleServiceFactory.class, configView); + XSingleServiceFactory xElementFactory = UnoRuntime.queryInterface(XSingleServiceFactory.class, configView); // the new element is the result ! Object newNode = xElementFactory.createInstance(); @@ -300,7 +298,7 @@ public abstract class Configuration public static void removeNode(Object configView, String name) throws NoSuchElementException, WrappedTargetException { - XNameContainer xNameContainer = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, configView); + XNameContainer xNameContainer = UnoRuntime.queryInterface(XNameContainer.class, configView); if (xNameContainer.hasByName(name)) { @@ -310,7 +308,7 @@ public abstract class Configuration public static void commit(Object configView) throws WrappedTargetException { - XChangesBatch xUpdateControl = (XChangesBatch) UnoRuntime.queryInterface(XChangesBatch.class, configView); + XChangesBatch xUpdateControl = UnoRuntime.queryInterface(XChangesBatch.class, configView); xUpdateControl.commitChanges(); } @@ -319,7 +317,7 @@ public abstract class Configuration Object view = Configuration.getConfigurationRoot(xmsf, path, true); addConfigNode(path, name); node.writeConfiguration(view, param); - XChangesBatch xUpdateControl = (XChangesBatch) UnoRuntime.queryInterface(XChangesBatch.class, view); + XChangesBatch xUpdateControl = UnoRuntime.queryInterface(XChangesBatch.class, view); xUpdateControl.commitChanges(); } @@ -327,7 +325,7 @@ public abstract class Configuration { Object view = Configuration.getConfigurationRoot(xmsf, path, true); removeNode(view, name); - XChangesBatch xUpdateControl = (XChangesBatch) UnoRuntime.queryInterface(XChangesBatch.class, view); + XChangesBatch xUpdateControl = UnoRuntime.queryInterface(XChangesBatch.class, view); xUpdateControl.commitChanges(); } @@ -371,8 +369,7 @@ public abstract class Configuration { String[] snames = _xNameAccess.getElementNames(); Object oNode = _xNameAccess.getByName(snames[_index]); - XNameAccess xNameAccessNode = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oNode); - return xNameAccessNode; + return UnoRuntime.queryInterface(XNameAccess.class, oNode); } catch (Exception e) { @@ -387,7 +384,7 @@ public abstract class Configuration { if (_xNameAccessNode.hasByName(_SubNodeName)) { - return (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, _xNameAccessNode.getByName(_SubNodeName)); + return UnoRuntime.queryInterface(XNameAccess.class, _xNameAccessNode.getByName(_SubNodeName)); } } catch (Exception e) @@ -415,7 +412,7 @@ public abstract class Configuration String curdisplayname = (String) Helper.getUnoPropertyValue(_xNameAccessNode.getByName(snames[i]), _nodename); if (curdisplayname.equals(_displayname)) { - return (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, _xNameAccessNode.getByName(snames[i])); + return UnoRuntime.queryInterface(XNameAccess.class, _xNameAccessNode.getByName(snames[i])); } } } @@ -444,7 +441,7 @@ public abstract class Configuration if (curdisplayname.equals(_displayname)) { - return (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, _xNameAccessNode.getByName(snames[i])); + return UnoRuntime.queryInterface(XNameAccess.class, _xNameAccessNode.getByName(snames[i])); } } } diff --git a/wizards/com/sun/star/wizards/common/Desktop.java b/wizards/com/sun/star/wizards/common/Desktop.java index 0f9bfbf0939d..13de04381155 100644 --- a/wizards/com/sun/star/wizards/common/Desktop.java +++ b/wizards/com/sun/star/wizards/common/Desktop.java @@ -76,7 +76,7 @@ public class Desktop try { xInterface = (com.sun.star.uno.XInterface) xMSF.createInstance("com.sun.star.frame.Desktop"); - xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, xInterface); + xDesktop = UnoRuntime.queryInterface(XDesktop.class, xInterface); } catch (Exception exception) { @@ -93,27 +93,26 @@ public class Desktop public static XFrame getActiveFrame(XMultiServiceFactory xMSF) { XDesktop xDesktop = getDesktop(xMSF); - XFramesSupplier xFrameSuppl = (XFramesSupplier) UnoRuntime.queryInterface(XFramesSupplier.class, xDesktop); - XFrame xFrame = xFrameSuppl.getActiveFrame(); - return xFrame; + XFramesSupplier xFrameSuppl = UnoRuntime.queryInterface(XFramesSupplier.class, xDesktop); + return xFrameSuppl.getActiveFrame(); } public static XComponent getActiveComponent(XMultiServiceFactory _xMSF) { XFrame xFrame = getActiveFrame(_xMSF); - return (XComponent) UnoRuntime.queryInterface(XComponent.class, xFrame.getController().getModel()); + return UnoRuntime.queryInterface(XComponent.class, xFrame.getController().getModel()); } public static XTextDocument getActiveTextDocument(XMultiServiceFactory _xMSF) { XComponent xComponent = getActiveComponent(_xMSF); - return (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, xComponent); + return UnoRuntime.queryInterface(XTextDocument.class, xComponent); } public static XSpreadsheetDocument getActiveSpreadsheetDocument(XMultiServiceFactory _xMSF) { XComponent xComponent = getActiveComponent(_xMSF); - return (XSpreadsheetDocument) UnoRuntime.queryInterface(XSpreadsheetDocument.class, xComponent); + return UnoRuntime.queryInterface(XSpreadsheetDocument.class, xComponent); } public static XDispatch getDispatcher(XMultiServiceFactory xMSF, XFrame xFrame, String _stargetframe, com.sun.star.util.URL oURL) @@ -122,9 +121,8 @@ public class Desktop { com.sun.star.util.URL[] oURLArray = new com.sun.star.util.URL[1]; oURLArray[0] = oURL; - XDispatchProvider xDispatchProvider = (XDispatchProvider) UnoRuntime.queryInterface(XDispatchProvider.class, xFrame); - XDispatch xDispatch = xDispatchProvider.queryDispatch(oURLArray[0], _stargetframe, FrameSearchFlag.ALL); // "_self" - return xDispatch; + XDispatchProvider xDispatchProvider = UnoRuntime.queryInterface(XDispatchProvider.class, xFrame); + return xDispatchProvider.queryDispatch(oURLArray[0], _stargetframe, FrameSearchFlag.ALL); // "_self" } catch (Exception e) { @@ -138,7 +136,7 @@ public class Desktop try { Object oTransformer = xMSF.createInstance("com.sun.star.util.URLTransformer"); - XURLTransformer xTransformer = (XURLTransformer) UnoRuntime.queryInterface(XURLTransformer.class, oTransformer); + XURLTransformer xTransformer = UnoRuntime.queryInterface(XURLTransformer.class, oTransformer); com.sun.star.util.URL[] oURL = new com.sun.star.util.URL[1]; oURL[0] = new com.sun.star.util.URL(); oURL[0].Complete = _sURL; @@ -182,8 +180,7 @@ public class Desktop XMultiComponentFactory componentFactory = getMultiComponentFactory(); Object xUrlResolver = componentFactory.createInstanceWithContext( "com.sun.star.bridge.UnoUrlResolver", null ); XUnoUrlResolver urlResolver = UnoRuntime.queryInterface(XUnoUrlResolver.class, xUrlResolver); - XMultiServiceFactory orb = UnoRuntime.queryInterface(XMultiServiceFactory.class, urlResolver.resolve( connectStr ) ); - return orb; + return UnoRuntime.queryInterface(XMultiServiceFactory.class, urlResolver.resolve( connectStr ) ); } public static String getIncrementSuffix(XNameAccess xElementContainer, String ElementName) @@ -192,10 +189,10 @@ public class Desktop int i = 1; String sIncSuffix = PropertyNames.EMPTY_STRING; String BaseName = ElementName; - while (bElementexists == true) + while (bElementexists) { bElementexists = xElementContainer.hasByName(ElementName); - if (bElementexists == true) + if (bElementexists) { i += 1; ElementName = BaseName + Integer.toString(i); @@ -214,10 +211,10 @@ public class Desktop int i = 1; String sIncSuffix = PropertyNames.EMPTY_STRING; String BaseName = ElementName; - while (bElementexists == true) + while (bElementexists) { bElementexists = xElementContainer.hasByHierarchicalName(ElementName); - if (bElementexists == true) + if (bElementexists) { i += 1; ElementName = BaseName + Integer.toString(i); @@ -235,10 +232,9 @@ public class Desktop try { int nStartFlags = com.sun.star.i18n.KParseTokens.ANY_LETTER_OR_NUMBER + com.sun.star.i18n.KParseTokens.ASC_UNDERSCORE; - int nContFlags = nStartFlags; Object ocharservice = _xMSF.createInstance("com.sun.star.i18n.CharacterClassification"); - XCharacterClassification xCharacterClassification = (XCharacterClassification) UnoRuntime.queryInterface(XCharacterClassification.class, ocharservice); - ParseResult aResult = xCharacterClassification.parsePredefinedToken(KParseType.IDENTNAME, _sString, 0, _aLocale, nStartFlags, PropertyNames.EMPTY_STRING, nContFlags, PropertyNames.SPACE); + XCharacterClassification xCharacterClassification = UnoRuntime.queryInterface(XCharacterClassification.class, ocharservice); + ParseResult aResult = xCharacterClassification.parsePredefinedToken(KParseType.IDENTNAME, _sString, 0, _aLocale, nStartFlags, PropertyNames.EMPTY_STRING, nStartFlags, PropertyNames.SPACE); return aResult.EndPos; } catch (Exception e) @@ -311,7 +307,7 @@ public class Desktop { return _sElementName; } - while (bElementexists == true) + while (bElementexists) { for (int i = 0; i < _slist.length; i++) { @@ -342,8 +338,8 @@ public class Desktop aNodePath[0] = new PropertyValue(); aNodePath[0].Name = "nodepath"; aNodePath[0].Value = KeyName; - XMultiServiceFactory xMSFConfig = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, oConfigProvider); - if (bForUpdate == true) + XMultiServiceFactory xMSFConfig = UnoRuntime.queryInterface(XMultiServiceFactory.class, oConfigProvider); + if (bForUpdate) { return (XInterface) xMSFConfig.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess", aNodePath); } @@ -391,8 +387,7 @@ public class Desktop { try { - String sTemplatePath = FileAccess.getOfficePath(_xMSF, "Template", "share", "/wizard"); - return sTemplatePath; + return FileAccess.getOfficePath(_xMSF, "Template", "share", "/wizard"); } catch (NoValidPathException nopathexception) { @@ -404,8 +399,7 @@ public class Desktop { try { - String sUserTemplatePath = FileAccess.getOfficePath(_xMSF, "Template", "user", PropertyNames.EMPTY_STRING); - return sUserTemplatePath; + return FileAccess.getOfficePath(_xMSF, "Template", "user", PropertyNames.EMPTY_STRING); } catch (NoValidPathException nopathexception) { @@ -417,8 +411,7 @@ public class Desktop { try { - String sBitmapPath = FileAccess.combinePaths(_xMSF, getTemplatePath(_xMSF), "/../wizard/bitmap"); - return sBitmapPath; + return FileAccess.combinePaths(_xMSF, getTemplatePath(_xMSF), "/../wizard/bitmap"); } catch (NoValidPathException nopathexception) { @@ -430,8 +423,7 @@ public class Desktop { try { - String sWorkPath = FileAccess.getOfficePath(_xMSF, "Work", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING); - return sWorkPath; + return FileAccess.getOfficePath(_xMSF, "Work", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING); } catch (NoValidPathException nopathexception) { @@ -452,7 +444,7 @@ public class Desktop } if (xPathSubst != null) { - return (XStringSubstitution) UnoRuntime.queryInterface(XStringSubstitution.class, xPathSubst); + return UnoRuntime.queryInterface(XStringSubstitution.class, xPathSubst); } else { @@ -495,7 +487,7 @@ public class Desktop { Object comp = ((Any) e.nextElement()).getObject(); - XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, comp); + XModel xModel = UnoRuntime.queryInterface(XModel.class, comp); XFrame xFrame = xModel.getCurrentController().getFrame(); if (xFrame != null && xFrame.getComponentWindow() != null) diff --git a/wizards/com/sun/star/wizards/common/FileAccess.java b/wizards/com/sun/star/wizards/common/FileAccess.java index 1b5e91c6c58b..40cccba9ad75 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.java +++ b/wizards/com/sun/star/wizards/common/FileAccess.java @@ -33,6 +33,7 @@ import com.sun.star.util.XMacroExpander; // import com.sun.star.wizards.common.NoValidPathException; import java.io.File; import java.util.ArrayList; +import java.util.Arrays; import java.util.Vector; import com.sun.star.awt.VclWindowPeerAttribute; @@ -90,8 +91,7 @@ public class FileAccess } } ResultPath += PropertyNames.SEMI_COLON + sAddPath; - return; - } + } public static String deleteLastSlashfromUrl(String _sPath) { @@ -155,11 +155,11 @@ public class FileAccess try { XInterface xPathInterface = (XInterface) xMSF.createInstance("com.sun.star.util.PathSettings"); - XPropertySet xPropertySet = (XPropertySet) com.sun.star.uno.UnoRuntime.queryInterface(XPropertySet.class, xPathInterface); + XPropertySet xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xPathInterface); String WritePath = PropertyNames.EMPTY_STRING; String[] ReadPaths = null; XInterface xUcbInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); - XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface); + XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface); Template_writable = (String) xPropertySet.getPropertyValue(sPath + "_writable"); Template_internal = (String[]) xPropertySet.getPropertyValue(sPath + "_internal"); @@ -206,7 +206,7 @@ public class FileAccess exception.printStackTrace(System.out); ResultPath = PropertyNames.EMPTY_STRING; } - if (bexists == false) + if (!bexists) { throw new NoValidPathException(xMSF, PropertyNames.EMPTY_STRING); } @@ -229,7 +229,7 @@ public class FileAccess try { XInterface xPathInterface = (XInterface) xMSF.createInstance("com.sun.star.util.PathSettings"); - XPropertySet xPropertySet = (XPropertySet) com.sun.star.uno.UnoRuntime.queryInterface(XPropertySet.class, xPathInterface); + XPropertySet xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xPathInterface); // String WritePath = PropertyNames.EMPTY_STRING; // XInterface xUcbInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); // XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface); @@ -255,10 +255,7 @@ public class FileAccess aPathList.add(sPath); } - for (int i = 0; i < Template_user.length; i++) - { - aPathList.add(Template_user[i]); - } + aPathList.addAll(Arrays.asList(Template_user)); aPathList.add(Template_writable); // WritePath = Template_writable; @@ -323,7 +320,7 @@ public class FileAccess String sPath = _sPath + "/" + aLocaleAll.toString(); XInterface xInterface = (XInterface) _xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); - XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface); + XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface); if (xSimpleFileAccess.exists(sPath)) { return sPath; @@ -439,7 +436,7 @@ public class FileAccess try { XInterface xUcbInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); - XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface); + XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface); bExists = xSimpleFileAccess.exists(_sPath); } catch (Exception exception) @@ -456,7 +453,7 @@ public class FileAccess try { XInterface xUcbInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); - XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface); + XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface); ReturnPath = _sFirstPath + _sSecondPath; bexists = xSimpleFileAccess.exists(ReturnPath); } @@ -465,7 +462,7 @@ public class FileAccess exception.printStackTrace(System.out); return PropertyNames.EMPTY_STRING; } - if (bexists == false) + if (!bexists) { throw new NoValidPathException(xMSF, PropertyNames.EMPTY_STRING); } @@ -478,20 +475,17 @@ public class FileAccess try { Resource oResource = new Resource(xMSF, "ImportWizard", "imp"); - if (oResource != null) + sNoDirCreation = oResource.getResText(1050); + String sMsgDirNotThere = oResource.getResText(1051); + String sQueryForNewCreation = oResource.getResText(1052); + String OSPath = JavaTools.convertfromURLNotation(Path); + String sQueryMessage = JavaTools.replaceSubString(sMsgDirNotThere, OSPath, "%1"); + sQueryMessage = sQueryMessage + (char) 13 + sQueryForNewCreation; + int icreate = SystemDialog.showMessageBox(xMSF, "QueryBox", VclWindowPeerAttribute.YES_NO, sQueryMessage); + if (icreate == 2) { - sNoDirCreation = oResource.getResText(1050); - String sMsgDirNotThere = oResource.getResText(1051); - String sQueryForNewCreation = oResource.getResText(1052); - String OSPath = JavaTools.convertfromURLNotation(Path); - String sQueryMessage = JavaTools.replaceSubString(sMsgDirNotThere, OSPath, "%1"); - sQueryMessage = sQueryMessage + (char) 13 + sQueryForNewCreation; - int icreate = SystemDialog.showMessageBox(xMSF, "QueryBox", VclWindowPeerAttribute.YES_NO, sQueryMessage); - if (icreate == 2) - { - xSimpleFileAccess.createFolder(Path); - return true; - } + xSimpleFileAccess.createFolder(Path); + return true; } return false; } @@ -525,7 +519,7 @@ public class FileAccess String LowerCasePath; String NewPath = Path; XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); - XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface); + XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface); if (baskbeforeOverwrite) { if (xSimpleFileAccess.exists(Path)) @@ -563,14 +557,13 @@ public class FileAccess if (bexists) { LowerCasePath = NewPath.toLowerCase(); - bexists = (((LowerCasePath.equals("file:///")) || (LowerCasePath.equals("file://")) || (LowerCasePath.equals("file:/")) || (LowerCasePath.equals("file:"))) == false); + bexists = (!((LowerCasePath.equals("file:///")) || (LowerCasePath.equals("file://")) || (LowerCasePath.equals("file:/")) || (LowerCasePath.equals("file:")))); } if (bexists) { - if (bSubDirexists == false) + if (!bSubDirexists) { - boolean bSubDiriscreated = createSubDirectory(xMSF, xSimpleFileAccess, SubDirPath); - return bSubDiriscreated; + return createSubDirectory(xMSF, xSimpleFileAccess, SubDirPath); } return true; } @@ -611,10 +604,10 @@ public class FileAccess java.util.Vector NameVector = null; XInterface xDocInterface = (XInterface) xMSF.createInstance("com.sun.star.document.DocumentProperties"); - XDocumentProperties xDocProps = (XDocumentProperties) UnoRuntime.queryInterface(XDocumentProperties.class, xDocInterface); + XDocumentProperties xDocProps = UnoRuntime.queryInterface(XDocumentProperties.class, xDocInterface); XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); - com.sun.star.ucb.XSimpleFileAccess xSimpleFileAccess = (com.sun.star.ucb.XSimpleFileAccess) UnoRuntime.queryInterface(com.sun.star.ucb.XSimpleFileAccess.class, xInterface); + com.sun.star.ucb.XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface); String[] nameList = xSimpleFileAccess.getFolderContents(FolderName, false); @@ -680,7 +673,7 @@ public class FileAccess try { XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); - com.sun.star.ucb.XSimpleFileAccess xSimpleFileAccess = (com.sun.star.ucb.XSimpleFileAccess) UnoRuntime.queryInterface(com.sun.star.ucb.XSimpleFileAccess.class, xInterface); + com.sun.star.ucb.XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface); for (int i = 0; i < _aList.size(); i++) { @@ -718,7 +711,7 @@ public class FileAccess try { XInterface xDocInterface = (XInterface) xMSF.createInstance("com.sun.star.document.DocumentProperties"); - XDocumentProperties xDocProps = (XDocumentProperties) UnoRuntime.queryInterface(XDocumentProperties.class, xDocInterface); + XDocumentProperties xDocProps = UnoRuntime.queryInterface(XDocumentProperties.class, xDocInterface); PropertyValue[] noArgs = { }; xDocProps.loadFromMedium(_sFile, noArgs); sTitle = xDocProps.getTitle(); @@ -744,7 +737,7 @@ public class FileAccess try { XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); - xSimpleFileAccess = (com.sun.star.ucb.XSimpleFileAccess) UnoRuntime.queryInterface(com.sun.star.ucb.XSimpleFileAccess.class, xInterface); + xSimpleFileAccess = UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface); } catch (com.sun.star.uno.Exception e) { @@ -818,26 +811,23 @@ public class FileAccess { //get a simple file access... Object fa = xmsf.createInstance("com.sun.star.ucb.SimpleFileAccess"); - fileAccess = (XSimpleFileAccess2) UnoRuntime.queryInterface(XSimpleFileAccess2.class, fa); + fileAccess = UnoRuntime.queryInterface(XSimpleFileAccess2.class, fa); //get the file identifier converter Object fcv = xmsf.createInstance("com.sun.star.ucb.FileContentProvider"); - filenameConverter = (XFileIdentifierConverter) UnoRuntime.queryInterface(XFileIdentifierConverter.class, fcv); + filenameConverter = UnoRuntime.queryInterface(XFileIdentifierConverter.class, fcv); } public String getURL(String parentPath, String childPath) { String parent = filenameConverter.getSystemPathFromFileURL(parentPath); File f = new File(parent, childPath); - String r = filenameConverter.getFileURLFromSystemPath(parentPath, f.getAbsolutePath()); - return r; + return filenameConverter.getFileURLFromSystemPath(parentPath, f.getAbsolutePath()); } public String getURL(String path) { File f = new File(path); - String r = filenameConverter.getFileURLFromSystemPath( - path, f.getAbsolutePath()); - return r; + return filenameConverter.getFileURLFromSystemPath(path, f.getAbsolutePath()); } public String getPath(String parentURL, String childURL) @@ -1018,8 +1008,7 @@ public class FileAccess { String filename = getFilename(path, pathSeparator); String sExtension = getExtension(filename); - String basename = filename.substring(0, filename.length() - (sExtension.length() + 1)); - return basename; + return filename.substring(0, filename.length() - (sExtension.length() + 1)); } /** @@ -1102,8 +1091,7 @@ public class FileAccess do { String filename = filename(name, extension, i++); - String u = getURL(parentDir, filename); - url = u; + url = getURL(parentDir, filename); } while (exists(url, true)); @@ -1140,13 +1128,13 @@ public class FileAccess { Vector oDataVector = new Vector(); Object oSimpleFileAccess = _xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); - XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, oSimpleFileAccess); + XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(XSimpleFileAccess.class, oSimpleFileAccess); if (xSimpleFileAccess.exists(_filepath)) { XInputStream xInputStream = xSimpleFileAccess.openFileRead(_filepath); Object oTextInputStream = _xMSF.createInstance("com.sun.star.io.TextInputStream"); - XTextInputStream xTextInputStream = (XTextInputStream) UnoRuntime.queryInterface(XTextInputStream.class, oTextInputStream); - XActiveDataSink xActiveDataSink = (XActiveDataSink) UnoRuntime.queryInterface(XActiveDataSink.class, oTextInputStream); + XTextInputStream xTextInputStream = UnoRuntime.queryInterface(XTextInputStream.class, oTextInputStream); + XActiveDataSink xActiveDataSink = UnoRuntime.queryInterface(XActiveDataSink.class, oTextInputStream); xActiveDataSink.setInputStream(xInputStream); while (!xTextInputStream.isEOF()) { diff --git a/wizards/com/sun/star/wizards/common/HelpIds.java b/wizards/com/sun/star/wizards/common/HelpIds.java index a3b577d1e52b..19a51bef3e5a 100644 --- a/wizards/com/sun/star/wizards/common/HelpIds.java +++ b/wizards/com/sun/star/wizards/common/HelpIds.java @@ -1042,6 +1042,6 @@ public class HelpIds else if ( nHelpId >= 40769 && nHelpId <= 41245 ) return array2[ nHelpId - 40769 ]; else - return new String(); + return ""; } } diff --git a/wizards/com/sun/star/wizards/common/Helper.java b/wizards/com/sun/star/wizards/common/Helper.java index 0df16b360de0..b00cb3b2b485 100644 --- a/wizards/com/sun/star/wizards/common/Helper.java +++ b/wizards/com/sun/star/wizards/common/Helper.java @@ -58,15 +58,14 @@ public class Helper oCal.set(DateValue.Year, DateValue.Month, DateValue.Day); java.util.Date dTime = oCal.getTime(); long lTime = dTime.getTime(); - long lDate = lTime / (3600 * 24000); - return lDate; + return lTime / (3600 * 24000); } public static void setUnoPropertyValue(Object oUnoObject, String PropertyName, Object PropertyValue) { try { - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oUnoObject); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oUnoObject); if (xPSet.getPropertySetInfo().hasPropertyByName(PropertyName)) { xPSet.setPropertyValue(PropertyName, PropertyValue); @@ -87,8 +86,8 @@ public class Helper { try { - com.sun.star.container.XNameAccess xName = (com.sun.star.container.XNameAccess) UnoRuntime.queryInterface(com.sun.star.container.XNameAccess.class, oUnoObject); - if (xName.hasByName(ElementName) == true) + com.sun.star.container.XNameAccess xName = UnoRuntime.queryInterface(com.sun.star.container.XNameAccess.class, oUnoObject); + if (xName.hasByName(ElementName)) { return xName.getByName(ElementName); } @@ -126,7 +125,7 @@ public class Helper { if (oUnoObject != null) { - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oUnoObject); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oUnoObject); Object oObject = xPSet.getPropertyValue(PropertyName); if (AnyConverter.isVoid(oObject)) { @@ -202,10 +201,9 @@ public class Helper { if (oUnoObject != null) { - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oUnoObject); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oUnoObject); // Property[] aProps = xPSet.getPropertySetInfo().getProperties(); - Object oObject = xPSet.getPropertyValue(PropertyName); - return oObject; + return xPSet.getPropertyValue(PropertyName); } } catch (Exception exception) @@ -221,7 +219,7 @@ public class Helper { if (oUnoObject != null) { - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oUnoObject); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oUnoObject); Object oObject = xPSet.getPropertyValue(PropertyName); if (AnyConverter.isArray(oObject)) { @@ -242,11 +240,10 @@ public class Helper { if (oUnoObject != null) { - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oUnoObject); - if (xPSet.getPropertySetInfo().hasPropertyByName(PropertyName) == true) + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oUnoObject); + if (xPSet.getPropertySetInfo().hasPropertyByName(PropertyName)) { - Object oObject = xPSet.getPropertyValue(PropertyName); - return oObject; + return xPSet.getPropertyValue(PropertyName); } } return null; @@ -262,7 +259,7 @@ public class Helper { try { - com.sun.star.beans.XMultiPropertySet xMultiPSetLst = (com.sun.star.beans.XMultiPropertySet) UnoRuntime.queryInterface(com.sun.star.beans.XMultiPropertySet.class, oUnoObject); + com.sun.star.beans.XMultiPropertySet xMultiPSetLst = UnoRuntime.queryInterface(com.sun.star.beans.XMultiPropertySet.class, oUnoObject); if (xMultiPSetLst != null) { xMultiPSetLst.setPropertyValues(PropertyNames, PropertyValues); @@ -322,7 +319,7 @@ public class Helper public DateUtils(XMultiServiceFactory xmsf, Object document) throws Exception { - XMultiServiceFactory docMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, document); + XMultiServiceFactory docMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, document); Object defaults = docMSF.createInstance("com.sun.star.text.Defaults"); Locale l = (Locale) Helper.getUnoStructValue(defaults, "CharLocale"); @@ -332,7 +329,7 @@ public class Helper calendar = Calendar.getInstance(jl); - formatSupplier = (XNumberFormatsSupplier) UnoRuntime.queryInterface(XNumberFormatsSupplier.class, document); + formatSupplier = UnoRuntime.queryInterface(XNumberFormatsSupplier.class, document); Object formatSettings = formatSupplier.getNumberFormatSettings(); com.sun.star.util.Date date = (com.sun.star.util.Date) Helper.getUnoPropertyValue(formatSettings, "NullDate"); @@ -379,9 +376,7 @@ public class Helper * docNullTime and date1 are in millis, but * I need a day... */ - double daysDiff = (date1 - docNullTime) / DAY_IN_MILLIS + 1; - - return daysDiff; + return (date1 - docNullTime) / DAY_IN_MILLIS + 1; } public double getDocumentDateAsDouble(DateTime date) @@ -400,9 +395,7 @@ public class Helper * docNullTime and date1 are in millis, but * I need a day... */ - double daysDiff = (date1 - docNullTime) / DAY_IN_MILLIS + 1; - - return daysDiff; + return (date1 - docNullTime) / DAY_IN_MILLIS + 1; } @@ -425,20 +418,16 @@ public class Helper public static XComponentContext getComponentContext(XMultiServiceFactory _xMSF) { // Get the path to the extension and try to add the path to the class loader - final XPropertySet xProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, _xMSF); + final XPropertySet xProps = UnoRuntime.queryInterface(XPropertySet.class, _xMSF); final PropertySetHelper aHelper = new PropertySetHelper(xProps); final Object aDefaultContext = aHelper.getPropertyValueAsObject("DefaultContext"); - final XComponentContext xComponentContext = (XComponentContext) UnoRuntime.queryInterface(XComponentContext.class, aDefaultContext); - return xComponentContext; + return UnoRuntime.queryInterface(XComponentContext.class, aDefaultContext); } public static XMacroExpander getMacroExpander(XMultiServiceFactory _xMSF) { final XComponentContext xComponentContext = getComponentContext(_xMSF); final Object aSingleton = xComponentContext.getValueByName("/singletons/com.sun.star.util.theMacroExpander"); - XMacroExpander xExpander = (XMacroExpander) UnoRuntime.queryInterface(XMacroExpander.class, aSingleton); - // String[][] aStrListList = xProvider.getExtensionList(); -// final String sLocation = xProvider.getPackageLocation("com.sun.reportdesigner"); - return xExpander; + return UnoRuntime.queryInterface(XMacroExpander.class, aSingleton); } } diff --git a/wizards/com/sun/star/wizards/common/JavaTools.java b/wizards/com/sun/star/wizards/common/JavaTools.java index a05c3a6460f7..43a66301ba27 100644 --- a/wizards/com/sun/star/wizards/common/JavaTools.java +++ b/wizards/com/sun/star/wizards/common/JavaTools.java @@ -79,10 +79,7 @@ public class JavaTools if (FirstArray != null) { String[] SecondArray = new String[FirstArray.length]; - for (int i = 0; i < FirstArray.length; i++) - { - SecondArray[i] = FirstArray[i]; - } + System.arraycopy(FirstArray, 0, SecondArray, 0, FirstArray.length); return SecondArray; } else @@ -377,7 +374,7 @@ public class JavaTools public static String[] ArrayoutofString(String MainString, String Token) { String[] StringArray; - if (MainString.equals(PropertyNames.EMPTY_STRING) == false) + if (!MainString.equals(PropertyNames.EMPTY_STRING)) { Vector StringVector = new Vector(); String LocString = null; @@ -565,38 +562,32 @@ public class JavaTools public static PropertyValue[][] removeOutdatedFields(PropertyValue[][] baselist, String[] _complist) { - PropertyValue[][] retarray = new PropertyValue[][] - { - }; if ((baselist != null) && (_complist != null)) { - Vector firstdimvector = new Vector(); - int b = 0; + ArrayList firstdimvector = new ArrayList(); for (int n = 0; n < baselist.length; n++) { - Vector secdimvector = new Vector(); - PropertyValue[] internalArray; - int a = 0; + ArrayList secdimvector = new ArrayList(); for (int m = 0; m < baselist[n].length; m++) { if (FieldInList(_complist, baselist[n][m].Name) > -1) { secdimvector.add(baselist[n][m]); - a++; } } - if (a > 0) + if (!secdimvector.isEmpty()) { - internalArray = new PropertyValue[a]; + PropertyValue[] internalArray = new PropertyValue[secdimvector.size()]; secdimvector.toArray(internalArray); firstdimvector.add(internalArray); - b++; } } - retarray = new PropertyValue[b][]; - firstdimvector.toArray(retarray); + PropertyValue[][] retarray = new PropertyValue[firstdimvector.size()][]; + return firstdimvector.toArray(retarray); } - return (retarray); + return new PropertyValue[][] + { + }; } /** @@ -621,7 +612,7 @@ public class JavaTools { if (n == 0) { - sDescList[m] = new String(); + sDescList[m] = ""; } sDescList[m] += _scomplist[n][m]; } @@ -766,7 +757,7 @@ public class JavaTools } else { - bissame = (sSecondString == null); + bissame = true; } } else diff --git a/wizards/com/sun/star/wizards/common/NamedValueCollection.java b/wizards/com/sun/star/wizards/common/NamedValueCollection.java index f8f2cd05224a..ebafcbd31e41 100644 --- a/wizards/com/sun/star/wizards/common/NamedValueCollection.java +++ b/wizards/com/sun/star/wizards/common/NamedValueCollection.java @@ -38,7 +38,7 @@ public class NamedValueCollection } @SuppressWarnings("unchecked") - public final < T extends Object > T getOrDefault( final String i_key, final T i_default ) + public final < T > T getOrDefault( final String i_key, final T i_default ) { if ( m_values.containsKey( i_key ) ) { diff --git a/wizards/com/sun/star/wizards/common/NumberFormatter.java b/wizards/com/sun/star/wizards/common/NumberFormatter.java index ccfbee303f98..f4398088ff30 100644 --- a/wizards/com/sun/star/wizards/common/NumberFormatter.java +++ b/wizards/com/sun/star/wizards/common/NumberFormatter.java @@ -66,9 +66,9 @@ public class NumberFormatter Object oNumberFormatter = _xMSF.createInstance("com.sun.star.util.NumberFormatter"); xNumberFormats = _xNumberFormatsSupplier.getNumberFormats(); xNumberFormatSettings = _xNumberFormatsSupplier.getNumberFormatSettings(); - xNumberFormatter = (XNumberFormatter) UnoRuntime.queryInterface(XNumberFormatter.class, oNumberFormatter); + xNumberFormatter = UnoRuntime.queryInterface(XNumberFormatter.class, oNumberFormatter); xNumberFormatter.attachNumberFormatsSupplier(_xNumberFormatsSupplier); - xNumberFormatTypes = (XNumberFormatTypes) UnoRuntime.queryInterface(XNumberFormatTypes.class, xNumberFormats); + xNumberFormatTypes = UnoRuntime.queryInterface(XNumberFormatTypes.class, xNumberFormats); } @@ -77,7 +77,7 @@ public class NumberFormatter aLocale = _aLocale; xNumberFormats = _xNumberFormatsSupplier.getNumberFormats(); xNumberFormatSettings = _xNumberFormatsSupplier.getNumberFormatSettings(); - xNumberFormatTypes = (XNumberFormatTypes) UnoRuntime.queryInterface(XNumberFormatTypes.class, xNumberFormats); + xNumberFormatTypes = UnoRuntime.queryInterface(XNumberFormatTypes.class, xNumberFormats); } @@ -92,7 +92,7 @@ public class NumberFormatter public static XNumberFormatter createNumberFormatter(XMultiServiceFactory _xMSF, XNumberFormatsSupplier _xNumberFormatsSupplier) throws Exception { Object oNumberFormatter = _xMSF.createInstance("com.sun.star.util.NumberFormatter"); - XNumberFormatter xNumberFormatter = (XNumberFormatter) UnoRuntime.queryInterface(XNumberFormatter.class, oNumberFormatter); + XNumberFormatter xNumberFormatter = UnoRuntime.queryInterface(XNumberFormatter.class, oNumberFormatter); xNumberFormatter.attachNumberFormatsSupplier(_xNumberFormatsSupplier); return xNumberFormatter; } @@ -114,9 +114,9 @@ public class NumberFormatter */ public static int getNumberFormatterKey( Object numberFormatsSupplier, short type) { - Object numberFormatTypes = ((XNumberFormatsSupplier)UnoRuntime.queryInterface(XNumberFormatsSupplier.class,numberFormatsSupplier)).getNumberFormats(); + Object numberFormatTypes = UnoRuntime.queryInterface(XNumberFormatsSupplier.class,numberFormatsSupplier).getNumberFormats(); Locale l = new Locale(); - return ((XNumberFormatTypes)UnoRuntime.queryInterface(XNumberFormatTypes.class,numberFormatTypes)).getFormatIndex(type, l); + return UnoRuntime.queryInterface(XNumberFormatTypes.class,numberFormatTypes).getFormatIndex(type, l); } @@ -200,7 +200,7 @@ public class NumberFormatter String FormatString = AnyConverter.toString(Helper.getUnoPropertyValue(xNumberFormat, "FormatString")); Locale oLocale = (Locale) Helper.getUnoPropertyValue(xNumberFormat, "Locale"); int NewFormatKey = defineNumberFormat(FormatString, oLocale); - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, _xFormatObject); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, _xFormatObject); xPSet.setPropertyValue("FormatsSupplier", _oNumberFormatter.xNumberFormatter.getNumberFormatsSupplier()); if (xPSet.getPropertySetInfo().hasPropertyByName("NumberFormat")) { diff --git a/wizards/com/sun/star/wizards/common/NumericalHelper.java b/wizards/com/sun/star/wizards/common/NumericalHelper.java index ff3795473fee..3a1c3b4ecf0f 100644 --- a/wizards/com/sun/star/wizards/common/NumericalHelper.java +++ b/wizards/com/sun/star/wizards/common/NumericalHelper.java @@ -735,31 +735,31 @@ public class NumericalHelper switch (aTypeObject.iType) { case BYTE_TYPE: - retValue = ((Byte) aTypeObject.aValue).toString(); + retValue = aTypeObject.aValue.toString(); break; case CHAR_TYPE: - retValue = ((Character) aTypeObject.aValue).toString(); + retValue = aTypeObject.aValue.toString(); break; case SHORT_TYPE: - retValue = ((Short) aTypeObject.aValue).toString(); + retValue = aTypeObject.aValue.toString(); break; case INT_TYPE: - retValue = ((Integer) aTypeObject.aValue).toString(); + retValue = aTypeObject.aValue.toString(); break; case LONG_TYPE: - retValue = ((Long) aTypeObject.aValue).toString(); + retValue = aTypeObject.aValue.toString(); break; case FLOAT_TYPE: - retValue = ((Float) aTypeObject.aValue).toString(); + retValue = aTypeObject.aValue.toString(); break; case DOUBLE_TYPE: - retValue = ((Double) aTypeObject.aValue).toString(); + retValue = aTypeObject.aValue.toString(); break; case STRING_TYPE: retValue = (String) aTypeObject.aValue; break; case BOOLEAN_TYPE: - retValue = ((Boolean) aTypeObject.aValue).toString(); + retValue = aTypeObject.aValue.toString(); break; case ARRAY_TYPE: retValue = new String(toByteArray((aValue))); @@ -1619,7 +1619,6 @@ public class NumericalHelper public static double roundDouble(double _dblvalue, int _ndecimals) { double dblfactor = java.lang.Math.pow(10.0, (double) _ndecimals); - double dblretvalue = ((double) ((int) (_dblvalue * dblfactor))) / dblfactor; - return dblretvalue; + return ((double) ((int) (_dblvalue * dblfactor))) / dblfactor; } } diff --git a/wizards/com/sun/star/wizards/common/PropertySetHelper.java b/wizards/com/sun/star/wizards/common/PropertySetHelper.java index bdca296db552..bde98249f43d 100644 --- a/wizards/com/sun/star/wizards/common/PropertySetHelper.java +++ b/wizards/com/sun/star/wizards/common/PropertySetHelper.java @@ -49,7 +49,7 @@ public class PropertySetHelper { return; } - m_xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, _aObj); + m_xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, _aObj); } private HashMap getHashMap() @@ -375,7 +375,7 @@ public class PropertySetHelper if (m_xPropertySet != null) { - XServiceInfo xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, m_xPropertySet); + XServiceInfo xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, m_xPropertySet); if (xServiceInfo != null) { sName = xServiceInfo.getImplementationName(); diff --git a/wizards/com/sun/star/wizards/common/Resource.java b/wizards/com/sun/star/wizards/common/Resource.java index 8dc660b21d07..8e93e68e6b54 100644 --- a/wizards/com/sun/star/wizards/common/Resource.java +++ b/wizards/com/sun/star/wizards/common/Resource.java @@ -61,8 +61,7 @@ public class Resource Object[][] DummyArray = new Object[1][]; Object[] nIDArray = new Object[1]; nIDArray[0] = new Integer(nID); - final String IDString = (String) xInvocation.invoke("getString", nIDArray, PointerArray, DummyArray); - return IDString; + return (String) xInvocation.invoke("getString", nIDArray, PointerArray, DummyArray); } catch (Exception exception) { @@ -80,8 +79,7 @@ public class Resource Object[] nIDArray = new Object[1]; nIDArray[0] = new Integer(nID); //Object bla = xInvocation.invoke("getStringList", nIDArray, PointerArray, DummyArray); - PropertyValue[] ResProp = (PropertyValue[]) xInvocation.invoke("getStringList", nIDArray, PointerArray, DummyArray); - return ResProp; + return (PropertyValue[]) xInvocation.invoke("getStringList", nIDArray, PointerArray, DummyArray); } catch (Exception exception) { @@ -120,7 +118,7 @@ public class Resource } else { - XInvocation xResInvoke = (XInvocation) com.sun.star.uno.UnoRuntime.queryInterface(XInvocation.class, xResource); + XInvocation xResInvoke = com.sun.star.uno.UnoRuntime.queryInterface(XInvocation.class, xResource); xResInvoke.setValue("FileName", Module); return xResInvoke; } diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.java b/wizards/com/sun/star/wizards/common/SystemDialog.java index ac3a38c9cf7d..012b33770f5c 100644 --- a/wizards/com/sun/star/wizards/common/SystemDialog.java +++ b/wizards/com/sun/star/wizards/common/SystemDialog.java @@ -66,14 +66,14 @@ public class SystemDialog try { this.xMSF = xMSF; - systemDialog = (XInterface) xMSF.createInstance(ServiceName); - xFilePicker = (XFilePicker) UnoRuntime.queryInterface(XFilePicker.class, systemDialog); - xFolderPicker = (XFolderPicker) UnoRuntime.queryInterface(XFolderPicker.class, systemDialog); - xFilterManager = (XFilterManager) UnoRuntime.queryInterface(XFilterManager.class, systemDialog); - xInitialize = (XInitialization) UnoRuntime.queryInterface(XInitialization.class, systemDialog); - xExecutable = (XExecutableDialog) UnoRuntime.queryInterface(XExecutableDialog.class, systemDialog); - xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, systemDialog); - xFilePickerControlAccess = (XFilePickerControlAccess) UnoRuntime.queryInterface(XFilePickerControlAccess.class, systemDialog); + systemDialog = xMSF.createInstance(ServiceName); + xFilePicker = UnoRuntime.queryInterface(XFilePicker.class, systemDialog); + xFolderPicker = UnoRuntime.queryInterface(XFolderPicker.class, systemDialog); + xFilterManager = UnoRuntime.queryInterface(XFilterManager.class, systemDialog); + xInitialize = UnoRuntime.queryInterface(XInitialization.class, systemDialog); + xExecutable = UnoRuntime.queryInterface(XExecutableDialog.class, systemDialog); + xComponent = UnoRuntime.queryInterface(XComponent.class, systemDialog); + xFilePickerControlAccess = UnoRuntime.queryInterface(XFilePickerControlAccess.class, systemDialog); xStringSubstitution = createStringSubstitution(xMSF); Short[] listAny = new Short[] { @@ -114,12 +114,7 @@ public class SystemDialog { try { - //System.out.println("SystemDialog.subst:"); - //System.out.println(path); - String s = xStringSubstitution.substituteVariables(path, false); - //System.out.println(s); - return s; - + return xStringSubstitution.substituteVariables(path, false); } catch (Exception ex) { @@ -157,7 +152,7 @@ public class SystemDialog sStorePath = null; try { - xFilePickerControlAccess.setValue(com.sun.star.ui.dialogs.ExtendedFilePickerElementIds.CHECKBOX_AUTOEXTENSION, (short) 0, new Boolean(true)); + xFilePickerControlAccess.setValue(com.sun.star.ui.dialogs.ExtendedFilePickerElementIds.CHECKBOX_AUTOEXTENSION, (short) 0, Boolean.TRUE); xFilePicker.setDefaultName(defaultName); xFilePicker.setDisplayDirectory(subst(displayDir)); if (execute(xExecutable)) @@ -351,7 +346,7 @@ public class SystemDialog return 0; } XFrame xFrame = Desktop.getActiveFrame(xMSF); - XWindowPeer xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xFrame.getComponentWindow()); + XWindowPeer xWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, xFrame.getComponentWindow()); return showMessageBox(xMSF, xWindowPeer, windowServiceName, windowAttribute, MessageText); } catch (Exception exception) @@ -382,15 +377,15 @@ public class SystemDialog try { XInterface xAWTToolkit = (XInterface) xMSF.createInstance("com.sun.star.awt.Toolkit"); - XToolkit xToolkit = (XToolkit) UnoRuntime.queryInterface(XToolkit.class, xAWTToolkit); + XToolkit xToolkit = UnoRuntime.queryInterface(XToolkit.class, xAWTToolkit); com.sun.star.awt.WindowDescriptor oDescriptor = new com.sun.star.awt.WindowDescriptor(); oDescriptor.WindowServiceName = windowServiceName; oDescriptor.Parent = peer; oDescriptor.Type = com.sun.star.awt.WindowClass.MODALTOP; oDescriptor.WindowAttributes = windowAttribute; XWindowPeer xMsgPeer = xToolkit.createWindow(oDescriptor); - XMessageBox xMsgbox = (XMessageBox) UnoRuntime.queryInterface(XMessageBox.class, xMsgPeer); - XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xMsgbox); + XMessageBox xMsgbox = UnoRuntime.queryInterface(XMessageBox.class, xMsgPeer); + XComponent xComponent = UnoRuntime.queryInterface(XComponent.class, xMsgbox); xMsgbox.setMessageText(MessageText); iMessage = xMsgbox.execute(); xComponent.dispose(); @@ -417,7 +412,7 @@ public class SystemDialog } if (xPathSubst != null) { - return (XStringSubstitution) UnoRuntime.queryInterface( + return UnoRuntime.queryInterface( XStringSubstitution.class, xPathSubst); } else diff --git a/wizards/com/sun/star/wizards/common/UCB.java b/wizards/com/sun/star/wizards/common/UCB.java index aa612ad5fef1..5d032639d5e3 100644 --- a/wizards/com/sun/star/wizards/common/UCB.java +++ b/wizards/com/sun/star/wizards/common/UCB.java @@ -149,7 +149,7 @@ public class UCB throws com.sun.star.ucb.CommandAbortedException, com.sun.star.uno.Exception { - XCommandProcessor xCmdProcessor = (XCommandProcessor)UnoRuntime.queryInterface( + XCommandProcessor xCmdProcessor = UnoRuntime.queryInterface( XCommandProcessor.class, xContent); Command aCommand = new Command(); aCommand.Name = aCommandName; @@ -174,7 +174,7 @@ public class UCB XDynamicResultSet xSet; - xSet = (XDynamicResultSet)UnoRuntime.queryInterface( + xSet = UnoRuntime.queryInterface( XDynamicResultSet.class,executeCommand(xContent, "open", aArg)); XResultSet xResultSet = xSet.getStaticResultSet(); @@ -184,9 +184,9 @@ public class UCB if (xResultSet.first()) { // obtain XContentAccess interface for child content access and XRow for properties - XContentAccess xContentAccess = (XContentAccess)UnoRuntime.queryInterface( + XContentAccess xContentAccess = UnoRuntime.queryInterface( XContentAccess.class, xResultSet); - XRow xRow = (XRow)UnoRuntime.queryInterface(XRow.class, xResultSet); + XRow xRow = UnoRuntime.queryInterface(XRow.class, xResultSet); do { // Obtain URL of child. @@ -195,7 +195,7 @@ public class UCB String aTitle = xRow.getString(1); if (aTitle.length() == 0 && xRow.wasNull()) { - ; //ignore + //ignore } else { @@ -228,7 +228,7 @@ public class UCB pv[0].Handle = -1; Object row = executeCommand(content,"getPropertyValues",pv); - XRow xrow = (XRow)UnoRuntime.queryInterface(XRow.class,row); + XRow xrow = UnoRuntime.queryInterface(XRow.class,row); if (type.equals(String.class)) { return xrow.getString(1); @@ -255,10 +255,10 @@ public class UCB public Object getContent(String path) throws Exception { //System.out.println("Getting Content for : " + path); - XContentIdentifier id = ((XContentIdentifierFactory) UnoRuntime.queryInterface(XContentIdentifierFactory.class, ucb)).createContentIdentifier(path); + XContentIdentifier id = UnoRuntime.queryInterface(XContentIdentifierFactory.class, ucb).createContentIdentifier(path); - return ((XContentProvider)UnoRuntime.queryInterface( - XContentProvider.class,ucb)).queryContent(id); + return UnoRuntime.queryInterface( + XContentProvider.class,ucb).queryContent(id); } public static interface Verifier diff --git a/wizards/com/sun/star/wizards/db/BlindtextCreator.java b/wizards/com/sun/star/wizards/db/BlindtextCreator.java index 308eca03e121..989fdcc916e9 100644 --- a/wizards/com/sun/star/wizards/db/BlindtextCreator.java +++ b/wizards/com/sun/star/wizards/db/BlindtextCreator.java @@ -71,7 +71,6 @@ public class BlindtextCreator String PartBlindText = BlindTextArray[0]; String NewPartBlindText; int MaxHeaderWidth; - int iWidth = FieldWidth; int Titlelength = (int) 1.1 * FieldTitle.length(); // We assume that the TableHeading is bold if (Titlelength > PartBlindText.length()) @@ -102,7 +101,7 @@ public class BlindtextCreator private static int getMaxFieldCount(boolean bIsCurLandscape) { - if (bIsCurLandscape == true) + if (bIsCurLandscape) { return 5; } diff --git a/wizards/com/sun/star/wizards/db/CommandMetaData.java b/wizards/com/sun/star/wizards/db/CommandMetaData.java index af4972c52e86..cb76e3b44a28 100644 --- a/wizards/com/sun/star/wizards/db/CommandMetaData.java +++ b/wizards/com/sun/star/wizards/db/CommandMetaData.java @@ -154,8 +154,7 @@ public class CommandMetaData extends DBMetaData String CurCommandName = CurFieldColumn.getCommandName(); CommandObject oCommand = getTableByName(CurCommandName); Object oColumn = oCommand.getColumns().getByName(CurFieldColumn.getFieldName()); - XPropertySet xColumn = UnoRuntime.queryInterface(XPropertySet.class, oColumn); - return xColumn; + return UnoRuntime.queryInterface(XPropertySet.class, oColumn); } catch (Exception exception) { @@ -335,19 +334,16 @@ public class CommandMetaData extends DBMetaData public String[] getOrderableColumns(String[] _fieldnames) { ArrayList aOrderableColumns = new ArrayList(); - int ncount = 0; for (int i = 0; i < _fieldnames.length; i++) { FieldColumn ofieldcolumn = getFieldColumnByFieldName(_fieldnames[i]); if (getDBDataTypeInspector().isColumnOrderable(ofieldcolumn.getXColumnPropertySet())) { aOrderableColumns.add(_fieldnames[i]); - ncount++; } } - String[] sretfieldnames = new String[ncount]; - aOrderableColumns.toArray(sretfieldnames); - return sretfieldnames; + String[] sretfieldnames = new String[aOrderableColumns.size()]; + return aOrderableColumns.toArray(sretfieldnames); } /** diff --git a/wizards/com/sun/star/wizards/db/CommandName.java b/wizards/com/sun/star/wizards/db/CommandName.java index 64e3f5cbeae5..9d8578f5c8ba 100644 --- a/wizards/com/sun/star/wizards/db/CommandName.java +++ b/wizards/com/sun/star/wizards/db/CommandName.java @@ -95,12 +95,12 @@ public class CommandName { this.DisplayName = _DisplayName; int iIndex; - if (oCommandMetaData.xDBMetaData.supportsCatalogsInDataManipulation() == true) + if (oCommandMetaData.xDBMetaData.supportsCatalogsInDataManipulation()) { // ...dann Catalog mit in TableName iIndex = _DisplayName.indexOf(sCatalogSep); if (iIndex >= 0) { - if (bCatalogAtStart == true) + if (bCatalogAtStart) { CatalogName = _DisplayName.substring(0, iIndex); _DisplayName = _DisplayName.substring(iIndex + 1, _DisplayName.length()); @@ -112,7 +112,7 @@ public class CommandName } } } - if (oCommandMetaData.xDBMetaData.supportsSchemasInDataManipulation() == true) + if (oCommandMetaData.xDBMetaData.supportsSchemasInDataManipulation()) { String[] NameList; NameList = new String[0]; @@ -141,7 +141,7 @@ public class CommandName { if (!CatalogName.equals(PropertyNames.EMPTY_STRING)) { - if (bCatalogAtStart == true) + if (bCatalogAtStart) { ComposedName = quoteName(CatalogName) + sCatalogSep; } @@ -162,7 +162,7 @@ public class CommandName { ComposedName += quoteName(TableName); } - if ((bCatalogAtStart == false) && (CatalogName != null)) + if ((!bCatalogAtStart) && (CatalogName != null)) { if (!CatalogName.equals(PropertyNames.EMPTY_STRING)) { diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java index 54a68cad17b4..afddc49c5895 100644 --- a/wizards/com/sun/star/wizards/db/DBMetaData.java +++ b/wizards/com/sun/star/wizards/db/DBMetaData.java @@ -142,7 +142,6 @@ public class DBMetaData private int iMaxColumnsInSelect; private int iMaxColumnsInGroupBy; - private int iMaxColumnsInTable; private int iMaxColumnNameLength = -1; private int iMaxTableNameLength = -1; private boolean bPasswordIsRequired; @@ -372,8 +371,7 @@ public class DBMetaData public XNameAccess getTableNamesAsNameAccess() { XTablesSupplier xDBTables = UnoRuntime.queryInterface( XTablesSupplier.class, DBConnection ); - XNameAccess xTableNames = xDBTables.getTables(); - return xTableNames; + return xDBTables.getTables(); } public String[] getQueryNames() @@ -488,7 +486,7 @@ public class DBMetaData public int getMaxColumnsInTable() throws SQLException { - iMaxColumnsInTable = xDBMetaData.getMaxColumnsInTable(); + int iMaxColumnsInTable = xDBMetaData.getMaxColumnsInTable(); if (iMaxColumnsInTable == 0) { iMaxColumnsInTable = DBMetaData.NOLIMIT; @@ -645,11 +643,6 @@ public class DBMetaData String sDataSourceName = AnyConverter.toString(Properties.getPropertyValue(curproperties, "DatabaseLocation")); return getConnection(sDataSourceName); } - else if (xConnection != null) - { - bdisposeConnection = false; - return getConnection(xConnection); - } } catch (IllegalArgumentException e) { @@ -701,7 +694,7 @@ public class DBMetaData xConnectionComponent.dispose(); } getDataSourceInterfaces(); - if (bPasswordIsRequired == false) + if (!bPasswordIsRequired) { DBConnection = _dataSource.getConnection(PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING); bgetConnection = true; @@ -717,7 +710,7 @@ public class DBMetaData { DBConnection = xCompleted2.connectWithCompletion( xInteractionHandler ); bgetConnection = DBConnection != null; - if (bgetConnection == false) + if (!bgetConnection) { bExitLoop = true; } @@ -731,9 +724,9 @@ public class DBMetaData bgetConnection = false; } } - while (bExitLoop == false); + while (!bExitLoop); } - if (bgetConnection == false) + if (!bgetConnection) { String sMsgConnectionImpossible = oResource.getResText(RID_DB_COMMON + 35); showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, sMsgConnectionImpossible); @@ -900,15 +893,13 @@ public class DBMetaData { XReportDocumentsSupplier xReportDocumentSuppl = UnoRuntime.queryInterface( XReportDocumentsSupplier.class, this.xModel ); xReportDocumentSuppl.getReportDocuments(); - XHierarchicalNameAccess xReportHier = UnoRuntime.queryInterface( XHierarchicalNameAccess.class, xReportDocumentSuppl.getReportDocuments() ); - return xReportHier; + return UnoRuntime.queryInterface( XHierarchicalNameAccess.class, xReportDocumentSuppl.getReportDocuments() ); } public XHierarchicalNameAccess getFormDocuments() { XFormDocumentsSupplier xFormDocumentSuppl = UnoRuntime.queryInterface( XFormDocumentsSupplier.class, xModel ); - XHierarchicalNameAccess xFormHier = UnoRuntime.queryInterface( XHierarchicalNameAccess.class, xFormDocumentSuppl.getFormDocuments() ); - return xFormHier; + return UnoRuntime.queryInterface( XHierarchicalNameAccess.class, xFormDocumentSuppl.getFormDocuments() ); } public boolean hasFormDocumentByName(String _sFormName) diff --git a/wizards/com/sun/star/wizards/db/FieldColumn.java b/wizards/com/sun/star/wizards/db/FieldColumn.java index 041aab5f5300..47a333e88dd9 100644 --- a/wizards/com/sun/star/wizards/db/FieldColumn.java +++ b/wizards/com/sun/star/wizards/db/FieldColumn.java @@ -142,8 +142,7 @@ public class FieldColumn */ private String getOnlyFieldName(String _DisplayFieldName, String _CommandName) { - final String sName = _DisplayFieldName.substring(_CommandName.length() + 1, _DisplayFieldName.length()); - return sName; + return _DisplayFieldName.substring(_CommandName.length() + 1, _DisplayFieldName.length()); } public static String composeDisplayFieldName(String _sCommandName, String _sFieldName) @@ -155,12 +154,12 @@ public class FieldColumn { try { - m_xColPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, _xColumns.getByName(m_sFieldName)); + m_xColPropertySet = UnoRuntime.queryInterface(XPropertySet.class, _xColumns.getByName(m_sFieldName)); ColIndex = JavaTools.FieldInList(_xColumns.getElementNames(), m_sFieldName) + 1; m_nFieldType = AnyConverter.toInt(m_xColPropertySet.getPropertyValue("Type")); getTyperelatedFieldData(); - if (bFormatKeysInitialized == false) + if (!bFormatKeysInitialized) { final NumberFormatter aNumberFormatter = oCommandMetaData.getNumberFormatter(); @@ -393,67 +392,67 @@ public class FieldColumn { case DataType.BIT: // == -7; case DataType.BOOLEAN: - DefaultValue = (Object) Integer.valueOf("1"); + DefaultValue = Integer.valueOf("1"); break; case DataType.TINYINT: // == -6; - DefaultValue = (Object) Integer.valueOf("98"); + DefaultValue = Integer.valueOf("98"); break; case DataType.SMALLINT: // == 5; - DefaultValue = (Object) Integer.valueOf("987"); + DefaultValue = Integer.valueOf("987"); break; case DataType.INTEGER: // == 4; - DefaultValue = (Object) Integer.valueOf("9876"); + DefaultValue = Integer.valueOf("9876"); break; case DataType.BIGINT: // == -5; - DefaultValue = (Object) Integer.valueOf("98765"); + DefaultValue = Integer.valueOf("98765"); break; case DataType.CHAR: // == 1; - DefaultValue = (Object) String.valueOf('x'); + DefaultValue = String.valueOf('x'); break; case DataType.VARCHAR: // == 12; - DefaultValue = (Object) BlindtextCreator.getBlindTextString(FieldTitle, FieldWidth, FieldWidth); + DefaultValue = BlindtextCreator.getBlindTextString(FieldTitle, FieldWidth, FieldWidth); break; case DataType.LONGVARCHAR: // == -1; - DefaultValue = (Object) BlindtextCreator.getBlindTextString(FieldTitle, FieldWidth, FieldWidth); + DefaultValue = BlindtextCreator.getBlindTextString(FieldTitle, FieldWidth, FieldWidth); break; case DataType.NUMERIC: // == 2; - DefaultValue = (Object) Double.valueOf("9876.5"); + DefaultValue = Double.valueOf("9876.5"); break; case DataType.DECIMAL: // == 3; [mit Nachkommastellen] - DefaultValue = (Object) Double.valueOf("9876.5"); + DefaultValue = Double.valueOf("9876.5"); break; case DataType.FLOAT: // == 6; - DefaultValue = (Object) Double.valueOf("9876.5"); + DefaultValue = Double.valueOf("9876.5"); break; case DataType.REAL: // == 7; - DefaultValue = (Object) Double.valueOf("9876.5"); + DefaultValue = Double.valueOf("9876.5"); break; case DataType.DOUBLE: // == 8; - DefaultValue = (Object) Double.valueOf("9876.54"); + DefaultValue = Double.valueOf("9876.54"); break; case DataType.DATE: // == 91; - DefaultValue = (Object) Double.valueOf("42510"); + DefaultValue = Double.valueOf("42510"); break; case DataType.TIME: // == 92; - DefaultValue = (Object) Double.valueOf("10"); + DefaultValue = Double.valueOf("10"); break; case DataType.TIMESTAMP: // == 93; - DefaultValue = (Object) Double.valueOf("5454110"); + DefaultValue = Double.valueOf("5454110"); break; default: diff --git a/wizards/com/sun/star/wizards/db/RecordParser.java b/wizards/com/sun/star/wizards/db/RecordParser.java index f9621fe8420d..9f2c6abbc54f 100644 --- a/wizards/com/sun/star/wizards/db/RecordParser.java +++ b/wizards/com/sun/star/wizards/db/RecordParser.java @@ -79,11 +79,11 @@ public class RecordParser extends QueryMetaData try { xRowSet = (XInterface) xMSF.createInstance("com.sun.star.sdb.RowSet"); - xRowSetColumnsSupplier = (XColumnsSupplier) UnoRuntime.queryInterface(XColumnsSupplier.class, xRowSet); - xRowSetComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xRowSet); - xExecute = (com.sun.star.sdb.XCompletedExecution) UnoRuntime.queryInterface(com.sun.star.sdb.XCompletedExecution.class, xRowSet); + xRowSetColumnsSupplier = UnoRuntime.queryInterface(XColumnsSupplier.class, xRowSet); + xRowSetComponent = UnoRuntime.queryInterface(XComponent.class, xRowSet); + xExecute = UnoRuntime.queryInterface(XCompletedExecution.class, xRowSet); XInterface oInteraction = (XInterface) xMSF.createInstance("com.sun.star.task.InteractionHandler"); - xInteraction = (XInteractionHandler) UnoRuntime.queryInterface(XInteractionHandler.class, oInteraction); + xInteraction = UnoRuntime.queryInterface(XInteractionHandler.class, oInteraction); } catch (Exception exception) { @@ -222,10 +222,10 @@ public class RecordParser extends QueryMetaData Helper.setUnoPropertyValue(xRowSet, PropertyNames.COMMAND, Command); Helper.setUnoPropertyValue(xRowSet, PropertyNames.COMMAND_TYPE, new Integer(_nCommandType)); // CommandType xExecute.executeWithCompletion(xInteraction); - com.sun.star.sdb.XResultSetAccess xResultAccess = (com.sun.star.sdb.XResultSetAccess) UnoRuntime.queryInterface(com.sun.star.sdb.XResultSetAccess.class, xRowSet); + com.sun.star.sdb.XResultSetAccess xResultAccess = UnoRuntime.queryInterface(com.sun.star.sdb.XResultSetAccess.class, xRowSet); ResultSet = xResultAccess.createResultSet(); - xResultSetRow = (com.sun.star.sdbc.XRow) UnoRuntime.queryInterface(com.sun.star.sdbc.XRow.class, ResultSet); - XColumnsSupplier xDBCols = (XColumnsSupplier) UnoRuntime.queryInterface(XColumnsSupplier.class, ResultSet); + xResultSetRow = UnoRuntime.queryInterface(com.sun.star.sdbc.XRow.class, ResultSet); + XColumnsSupplier xDBCols = UnoRuntime.queryInterface(XColumnsSupplier.class, ResultSet); xColumns = xDBCols.getColumns(); setCommandType(_nCommandType); return true; @@ -241,7 +241,7 @@ public class RecordParser extends QueryMetaData { try { - if (binitializeDBColumns == true) + if (binitializeDBColumns) { initializeFieldColumns(_sFieldNames, xColumns); } diff --git a/wizards/com/sun/star/wizards/db/RelationController.java b/wizards/com/sun/star/wizards/db/RelationController.java index 6c8b212f3cfd..e5b8cb4b3775 100644 --- a/wizards/com/sun/star/wizards/db/RelationController.java +++ b/wizards/com/sun/star/wizards/db/RelationController.java @@ -73,7 +73,7 @@ public class RelationController extends CommandName String[] sTableNames = super.getCommandMetaData().getTableNames(); Vector aReferencedTableVector = new Vector(); XResultSet xResultSet = super.getCommandMetaData().xDBMetaData.getExportedKeys((getCatalogName(this)), getSchemaName(), getTableName()); - XRow xRow = (XRow) UnoRuntime.queryInterface(XRow.class, xResultSet); + XRow xRow = UnoRuntime.queryInterface(XRow.class, xResultSet); while (xResultSet.next()) { String sForeignCatalog = xRow.getString(FKTABLE_CAT); @@ -114,7 +114,7 @@ public class RelationController extends CommandName { CommandName oLocCommandName = new CommandName(super.getCommandMetaData(), _sreferencedtablename); XResultSet xResultSet = super.getCommandMetaData().xDBMetaData.getImportedKeys(getCatalogName(oLocCommandName), oLocCommandName.getSchemaName(), oLocCommandName.getTableName()); - XRow xRow = (XRow) UnoRuntime.queryInterface(XRow.class, xResultSet); + XRow xRow = UnoRuntime.queryInterface(XRow.class, xResultSet); boolean bleaveLoop = false; Vector aMasterFieldNamesVector = new Vector(); Vector aSlaveFieldNamesVector = new Vector(); diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java index 966da2722ff0..879cb216a08a 100644 --- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java +++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java @@ -69,10 +69,10 @@ public class SQLQueryComposer try { this.CurDBMetaData = _CurDBMetaData; - xMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, CurDBMetaData.DBConnection); + xMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, CurDBMetaData.DBConnection); final Object oQueryComposer = xMSF.createInstance("com.sun.star.sdb.SingleSelectQueryComposer"); - m_xQueryAnalyzer = (XSingleSelectQueryAnalyzer) UnoRuntime.queryInterface(XSingleSelectQueryAnalyzer.class, oQueryComposer); - m_queryComposer = (XSingleSelectQueryComposer) UnoRuntime.queryInterface(XSingleSelectQueryComposer.class, m_xQueryAnalyzer); + m_xQueryAnalyzer = UnoRuntime.queryInterface(XSingleSelectQueryAnalyzer.class, oQueryComposer); + m_queryComposer = UnoRuntime.queryInterface(XSingleSelectQueryComposer.class, m_xQueryAnalyzer); } catch (Exception exception) { @@ -82,12 +82,8 @@ public class SQLQueryComposer private boolean addtoSelectClause(String DisplayFieldName) throws SQLException { - if (bincludeGrouping && CurDBMetaData.xDBMetaData.supportsGroupByUnrelated() && CurDBMetaData.GroupFieldNames != null && JavaTools.FieldInList(CurDBMetaData.GroupFieldNames, DisplayFieldName) > -1) - { - return false; + return !(bincludeGrouping && CurDBMetaData.xDBMetaData.supportsGroupByUnrelated() && CurDBMetaData.GroupFieldNames != null && JavaTools.FieldInList(CurDBMetaData.GroupFieldNames, DisplayFieldName) > -1); } - return true; - } public String getSelectClause(boolean _baddAliasFieldNames) throws SQLException { @@ -169,7 +165,7 @@ public class SQLQueryComposer { try { - XPropertySet xColumnPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xColumnIndexAccess.getByIndex(i)); + XPropertySet xColumnPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xColumnIndexAccess.getByIndex(i)); String sName = (String) xColumnPropertySet.getPropertyValue(PropertyNames.PROPERTY_NAME); if (JavaTools.FieldInTable(CurDBMetaData.getSortFieldNames(), sName) == -1) { @@ -364,7 +360,7 @@ public class SQLQueryComposer String AliasName = ""; boolean bAliasNameexists = true; String locAliasName = _TableName; - while (bAliasNameexists == true) + while (bAliasNameexists) { bAliasNameexists = (getComposedCommandByAliasName(locAliasName) != null); if (bAliasNameexists) @@ -390,8 +386,8 @@ public class SQLQueryComposer try { Object oErrorDialog = CurDBMetaData.xMSF.createInstance("com.sun.star.sdb.ErrorMessageDialog"); - XInitialization xInitialize = (XInitialization) UnoRuntime.queryInterface(XInitialization.class, oErrorDialog); - XExecutableDialog xExecute = (XExecutableDialog) UnoRuntime.queryInterface(XExecutableDialog.class, oErrorDialog); + XInitialization xInitialize = UnoRuntime.queryInterface(XInitialization.class, oErrorDialog); + XExecutableDialog xExecute = UnoRuntime.queryInterface(XExecutableDialog.class, oErrorDialog); PropertyValue[] rDispatchArguments = new PropertyValue[3]; rDispatchArguments[0] = Properties.createProperty(PropertyNames.PROPERTY_TITLE, Configuration.getProductName(CurDBMetaData.xMSF) + " Base"); rDispatchArguments[1] = Properties.createProperty("ParentWindow", _xParentWindow); diff --git a/wizards/com/sun/star/wizards/db/TableDescriptor.java b/wizards/com/sun/star/wizards/db/TableDescriptor.java index 80fbfd9ed906..491b724e1f09 100644 --- a/wizards/com/sun/star/wizards/db/TableDescriptor.java +++ b/wizards/com/sun/star/wizards/db/TableDescriptor.java @@ -156,16 +156,16 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen { try { - XKeysSupplier xKeySupplier = (XKeysSupplier) UnoRuntime.queryInterface(XKeysSupplier.class, xPropTableDataDescriptor); + XKeysSupplier xKeySupplier = UnoRuntime.queryInterface(XKeysSupplier.class, xPropTableDataDescriptor); xIndexAccessKeys = xKeySupplier.getKeys(); - XDataDescriptorFactory xKeyFac = (XDataDescriptorFactory) UnoRuntime.queryInterface(XDataDescriptorFactory.class, xIndexAccessKeys); - xKeyDrop = (XDrop) UnoRuntime.queryInterface(XDrop.class, xIndexAccessKeys); - xKeyAppend = (XAppend) UnoRuntime.queryInterface(XAppend.class, xKeyFac); + XDataDescriptorFactory xKeyFac = UnoRuntime.queryInterface(XDataDescriptorFactory.class, xIndexAccessKeys); + xKeyDrop = UnoRuntime.queryInterface(XDrop.class, xIndexAccessKeys); + xKeyAppend = UnoRuntime.queryInterface(XAppend.class, xKeyFac); xKey = xKeyFac.createDataDescriptor(); xKey.setPropertyValue("Type", new Integer(KeyType.PRIMARY)); - xKeyColumnSupplier = (XColumnsSupplier) UnoRuntime.queryInterface(XColumnsSupplier.class, xKey); - XDataDescriptorFactory xKeyColFac = (XDataDescriptorFactory) UnoRuntime.queryInterface(XDataDescriptorFactory.class, xKeyColumnSupplier.getColumns()); - xKeyColAppend = (XAppend) UnoRuntime.queryInterface(XAppend.class, xKeyColFac); + xKeyColumnSupplier = UnoRuntime.queryInterface(XColumnsSupplier.class, xKey); + XDataDescriptorFactory xKeyColFac = UnoRuntime.queryInterface(XDataDescriptorFactory.class, xKeyColumnSupplier.getColumns()); + xKeyColAppend = UnoRuntime.queryInterface(XAppend.class, xKeyColFac); removePrimaryKeys(); for (int i = 0; i < _fieldnames.length; i++) { @@ -190,7 +190,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen if (xColPropertySet.getPropertySetInfo().hasPropertyByName("IsAutoIncrement")) { xColPropertySet.setPropertyValue("Type", new Integer(nDataType)); - xColPropertySet.setPropertyValue("IsAutoIncrement", new Boolean(_bAutoincrementation)); + xColPropertySet.setPropertyValue("IsAutoIncrement", Boolean.valueOf(_bAutoincrementation)); } } } @@ -222,7 +222,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen { try { - String sColumnName = (String) AnyConverter.toString(_xToBeAppendedPropertySet.getPropertyValue(PropertyNames.PROPERTY_NAME)); + String sColumnName = AnyConverter.toString(_xToBeAppendedPropertySet.getPropertyValue(PropertyNames.PROPERTY_NAME)); if (_xColumns.hasByName(sColumnName)) { String sMessage = JavaTools.replaceSubString(sColumnAlreadyExistsMessage, sColumnName, "%FIELDNAME"); @@ -251,7 +251,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen boolean breturn = true; try { - XAppend xAppendColumns = (XAppend) UnoRuntime.queryInterface(XAppend.class, xNameAccessColumns); + XAppend xAppendColumns = UnoRuntime.queryInterface(XAppend.class, xNameAccessColumns); for (int i = 0; i < columncontainer.size(); i++) { XPropertySet xColPropertySet = getByIndex(i); @@ -269,7 +269,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen assignTableProperty(PropertyNames.PROPERTY_NAME, _tablename); assignTableProperty("CatalogName", _catalogname); assignTableProperty("SchemaName", _schemaname); - xTableContainer = (XContainer) UnoRuntime.queryInterface(XContainer.class, getTableNamesAsNameAccess()); + xTableContainer = UnoRuntime.queryInterface(XContainer.class, getTableNamesAsNameAccess()); xTableContainer.addContainerListener(this); if (keycolumncontainer.size() > 0) { @@ -331,7 +331,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen } } } - XDrop xColumnDrop = (XDrop) UnoRuntime.queryInterface(XDrop.class, xNameAccessColumns); + XDrop xColumnDrop = UnoRuntime.queryInterface(XDrop.class, xNameAccessColumns); for (int i = xNameAccessColumns.getElementNames().length - 1; i >= 0; i--) { xColumnDrop.dropByIndex(i); @@ -604,7 +604,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen if (hasByName(_snewname)) { Object oColumn = getByName(_snewname); - XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oColumn); + XPropertySet xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, oColumn); Property[] aColProperties = xPropertySet.getPropertySetInfo().getProperties(); for (int i = 0; i < aColProperties.length; i++) { @@ -777,7 +777,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen { try { - XPropertySet xTablePropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, arg0.Element); + XPropertySet xTablePropertySet = UnoRuntime.queryInterface(XPropertySet.class, arg0.Element); String stablename = AnyConverter.toString(xTablePropertySet.getPropertyValue(PropertyNames.PROPERTY_NAME)); String sschemaname = AnyConverter.toString(xPropTableDataDescriptor.getPropertyValue("SchemaName")); String scatalogname = AnyConverter.toString(xPropTableDataDescriptor.getPropertyValue("CatalogName")); diff --git a/wizards/com/sun/star/wizards/db/TypeInspector.java b/wizards/com/sun/star/wizards/db/TypeInspector.java index 6e6bc358aaea..bf1a8c3a483f 100644 --- a/wizards/com/sun/star/wizards/db/TypeInspector.java +++ b/wizards/com/sun/star/wizards/db/TypeInspector.java @@ -88,15 +88,15 @@ public class TypeInspector Vector aSearchableVector = new Vector(); // Integer[] aIntegerDataTypes = null; // XResultSet xResultSet = xDBMetaDagetTypeInfo(); - XRow xRow = (XRow) UnoRuntime.queryInterface(XRow.class, xResultSet); + XRow xRow = UnoRuntime.queryInterface(XRow.class, xResultSet); while (xResultSet.next()) { - aTypeNameVector.addElement(new String(xRow.getString(1))); + aTypeNameVector.addElement(xRow.getString(1)); aTypeVector.addElement(new Integer(xRow.getShort(2))); aPrecisionVector.addElement(new Integer(xRow.getInt(3))); aNullableVector.addElement(new Integer(xRow.getShort(7))); aSearchableVector.addElement(new Integer(xRow.getShort(9))); - aAutoIncrementVector.addElement(new Boolean(xRow.getBoolean(12))); + aAutoIncrementVector.addElement(Boolean.valueOf(xRow.getBoolean(12))); aMinScaleVector.addElement(new Integer(xRow.getShort(14))); aMaxScaleVector.addElement(new Integer(xRow.getShort(15))); @@ -154,12 +154,11 @@ public class TypeInspector { return ColumnValue.NO_NULLS; } - int nNullable = _nNullable; - if (nNullable == ColumnValue.NULLABLE) + if (_nNullable == ColumnValue.NULLABLE) { return nNullableInfos[i]; //probably nullability is not allowed } - return nNullable; + return _nNullable; } public int getNullability(XPropertySet _xColPropertySet) @@ -231,25 +230,19 @@ public class TypeInspector int i = JavaTools.FieldInIntTable(nDataTypeInfos, nDataType, startindex); startindex = i + 1; bleaveloop = (i < 0); - if (!bleaveloop) + if (!bleaveloop && sTypeName.equals(sDataTypeNames[i])) { - if (sTypeName.equals(sDataTypeNames[i])) + if (_bCheckNumericAttributes) { - if (_bCheckNumericAttributes) - { - if (nPrecision <= nPrecisionInfos[i]) - { - if ((nScale >= nMinScaleInfos[i]) && (nScale <= nMinScaleInfos[i])) - { - return i; - } - } - } - else + if (nPrecision <= nPrecisionInfos[i] && (nScale >= nMinScaleInfos[i]) && (nScale <= nMinScaleInfos[i]) ) { return i; } } + else + { + return i; + } } } } diff --git a/wizards/com/sun/star/wizards/document/Control.java b/wizards/com/sun/star/wizards/document/Control.java index 8a7b10f2cefd..ce4afe5a3022 100644 --- a/wizards/com/sun/star/wizards/document/Control.java +++ b/wizards/com/sun/star/wizards/document/Control.java @@ -131,7 +131,7 @@ public class Control extends Shape { if (xFormName != null) { - XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xFormName); + XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, xFormName); String sControlName = Desktop.getUniqueName(xNameAccess, getControlName(_fieldname)); xPropertySet.setPropertyValue(PropertyNames.PROPERTY_NAME, sControlName); xFormName.insertByName(sControlName, xControlModel); @@ -280,7 +280,7 @@ public class Control extends Shape */ public XLayoutConstrains getPeer() { - return (XLayoutConstrains) UnoRuntime.queryInterface(XLayoutConstrains.class, xControl.getPeer()); + return UnoRuntime.queryInterface(XLayoutConstrains.class, xControl.getPeer()); } public Size getPeerSize() diff --git a/wizards/com/sun/star/wizards/document/DatabaseControl.java b/wizards/com/sun/star/wizards/document/DatabaseControl.java index 22b0af405b17..5e8877374c9b 100644 --- a/wizards/com/sun/star/wizards/document/DatabaseControl.java +++ b/wizards/com/sun/star/wizards/document/DatabaseControl.java @@ -90,7 +90,7 @@ public class DatabaseControl extends Control { bHidden = true; } - xPropColumn.setPropertyValue("Hidden", new Boolean(bHidden)); + xPropColumn.setPropertyValue("Hidden", Boolean.valueOf(bHidden)); xPropColumn.setPropertyValue("DataField", sFieldName); xPropColumn.setPropertyValue(PropertyNames.PROPERTY_LABEL, _columntitle); xPropColumn.setPropertyValue(PropertyNames.PROPERTY_WIDTH, 0); // Width of column is adjusted to Columname @@ -160,16 +160,14 @@ public class DatabaseControl extends Control if (getControlType() == FormHandler.SOIMAGECONTROL) { // return oFormHandler.getImageControlHeight(); - final int nMemofieldheight = oFormHandler.getControlReferenceHeight() * 4; - return nMemofieldheight; + return oFormHandler.getControlReferenceHeight() * 4; } else { if (getFieldType() == DataType.LONGVARCHAR) { // Helper.setUnoPropertyValue(xControlModel, PropertyNames.PROPERTY_MULTILINE, Boolean.TRUE); - final int nMemofieldheight = oFormHandler.getControlReferenceHeight() * 4; - return nMemofieldheight; + return oFormHandler.getControlReferenceHeight() * 4; } else if (getControlType() == FormHandler.SOCHECKBOX) { diff --git a/wizards/com/sun/star/wizards/document/FormHandler.java b/wizards/com/sun/star/wizards/document/FormHandler.java index e1fab5a3301b..828ae4fc67f0 100644 --- a/wizards/com/sun/star/wizards/document/FormHandler.java +++ b/wizards/com/sun/star/wizards/document/FormHandler.java @@ -116,12 +116,12 @@ public class FormHandler public FormHandler(XMultiServiceFactory _xMSF, XTextDocument xTextDocument) { this.xMSF = _xMSF; - xDrawPageSupplier = (XDrawPageSupplier) UnoRuntime.queryInterface(XDrawPageSupplier.class, xTextDocument); + xDrawPageSupplier = UnoRuntime.queryInterface(XDrawPageSupplier.class, xTextDocument); xDrawPage = xDrawPageSupplier.getDrawPage(); - xFormsSupplier = (XFormsSupplier) UnoRuntime.queryInterface(XFormsSupplier.class, xDrawPage); - xShapeGrouper = (XShapeGrouper) UnoRuntime.queryInterface(XShapeGrouper.class, xDrawPage); - xControlAccess = (XControlAccess) UnoRuntime.queryInterface(XControlAccess.class, xTextDocument.getCurrentController()); - xMSFDoc = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument); + xFormsSupplier = UnoRuntime.queryInterface(XFormsSupplier.class, xDrawPage); + xShapeGrouper = UnoRuntime.queryInterface(XShapeGrouper.class, xDrawPage); + xControlAccess = UnoRuntime.queryInterface(XControlAccess.class, xTextDocument.getCurrentController()); + xMSFDoc = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument); sModelServices[SOLABEL] = "com.sun.star.form.component.FixedText"; sModelServices[SOTEXTBOX] = "com.sun.star.form.component.TextField"; sModelServices[SOCHECKBOX] = "com.sun.star.form.component.CheckBox"; @@ -164,8 +164,7 @@ public class FormHandler { if (oControlData[i].DataType == _fieldtype) { - final int nType = oControlData[i].ControlType; - return nType; + return oControlData[i].ControlType; } } return -1; @@ -192,7 +191,7 @@ public class FormHandler public void initializeBasicControlValues() { Control oLabelControl = new Control(this, SOLABEL, new Point(), new Size()); - XDevice xDevice = (XDevice) UnoRuntime.queryInterface(XDevice.class, oLabelControl.xWindowPeer); + XDevice xDevice = UnoRuntime.queryInterface(XDevice.class, oLabelControl.xWindowPeer); iXPixelFactor = (int) (100000 / xDevice.getInfo().PixelPerMeterX); iYPixelFactor = (int) (100000 / xDevice.getInfo().PixelPerMeterY); @@ -226,8 +225,7 @@ public class FormHandler { if (xNamedForm.hasByName(ControlName)) { - String ControlValue = AnyConverter.toString(com.sun.star.wizards.common.Helper.getUnoPropertyValue(xNamedForm.getByName(ControlName), "HiddenValue")); - return ControlValue; + return AnyConverter.toString(com.sun.star.wizards.common.Helper.getUnoPropertyValue(xNamedForm.getByName(ControlName), "HiddenValue")); } else { @@ -267,7 +265,7 @@ public class FormHandler public UnknownHiddenControlException(XNameAccess xNamedForm, String ControlName, String sMsgHiddenControlisMissing) { - XNamed xNamed = (XNamed) UnoRuntime.queryInterface(XNamed.class, xNamedForm); + XNamed xNamed = UnoRuntime.queryInterface(XNamed.class, xNamedForm); String FormName = xNamed.getName(); sMsgHiddenControlisMissing = JavaTools.replaceSubString(sMsgHiddenControlisMissing, FormName, ""); sMsgHiddenControlisMissing = JavaTools.replaceSubString(sMsgHiddenControlisMissing, ControlName, ""); @@ -278,7 +276,7 @@ public class FormHandler public boolean hasFormByName(String _FormName) { xNamedFormContainer = getDocumentForms(); - xNamedForms = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xNamedFormContainer); + xNamedForms = UnoRuntime.queryInterface(XNameAccess.class, xNamedFormContainer); return xNamedForms.hasByName(_FormName); } @@ -306,7 +304,7 @@ public class FormHandler { if (belongsToForm(xDrawPage.getByIndex(i), _FormName)) { - XShape xShape = (XShape) UnoRuntime.queryInterface(XShape.class, xDrawPage.getByIndex(i)); + XShape xShape = UnoRuntime.queryInterface(XShape.class, xDrawPage.getByIndex(i)); xDrawPage.remove(xShape); } } @@ -335,16 +333,16 @@ public class FormHandler public boolean belongsToForm(Object _oDrawPageElement, String _FormName) { - XServiceInfo xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, _oDrawPageElement); + XServiceInfo xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, _oDrawPageElement); if (xServiceInfo.supportsService("com.sun.star.drawing.ControlShape")) { - XControlShape xControlShape = (XControlShape) UnoRuntime.queryInterface(XControlShape.class, _oDrawPageElement); + XControlShape xControlShape = UnoRuntime.queryInterface(XControlShape.class, _oDrawPageElement); XControlModel xControlModel = xControlShape.getControl(); - xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, xControlShape.getControl()); + xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, xControlShape.getControl()); if (xServiceInfo.supportsService("com.sun.star.form.FormComponent")) { - XChild xChild = (XChild) UnoRuntime.queryInterface(XChild.class, xControlModel); - XNamed xNamed = (XNamed) UnoRuntime.queryInterface(XNamed.class, xChild.getParent()); + XChild xChild = UnoRuntime.queryInterface(XChild.class, xControlModel); + XNamed xNamed = UnoRuntime.queryInterface(XNamed.class, xChild.getParent()); String sName = xNamed.getName(); return _FormName.equals(sName); } @@ -362,7 +360,7 @@ public class FormHandler oDBForm = xMSFDoc.createInstance("com.sun.star.form.component.Form"); _xNamedFormContainer.insertByName(_FormName, oDBForm); XNameContainer xNamedForm; - xNamedForm = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, oDBForm); + xNamedForm = UnoRuntime.queryInterface(XNameContainer.class, oDBForm); return xNamedForm; } else @@ -395,7 +393,7 @@ public class FormHandler if (xNamedForms.hasByName(_sname)) { Object oDBForm = AnyConverter.toObject(new Type(XInterface.class), Helper.getUnoObjectbyName(xNamedForms, _sname)); - xNamedForm = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, oDBForm); + xNamedForm = UnoRuntime.queryInterface(XNameContainer.class, oDBForm); } } catch (IllegalArgumentException e) @@ -491,7 +489,7 @@ public class FormHandler { for (int i = 0; i < this.xDrawPage.getCount(); i++) { - XShape xShape = (XShape) UnoRuntime.queryInterface(XShape.class, xDrawPage.getByIndex(i)); + XShape xShape = UnoRuntime.queryInterface(XShape.class, xDrawPage.getByIndex(i)); xShape.setPosition(new Point(this.iXNirwanaPos, this.iYNirwanaPos)); } } @@ -505,7 +503,7 @@ public class FormHandler { for (int i = this.xDrawPage.getCount(); i > -1; i--) { - XShape xShape = (XShape) UnoRuntime.queryInterface(XShape.class, xDrawPage.getByIndex(i)); + XShape xShape = UnoRuntime.queryInterface(XShape.class, xDrawPage.getByIndex(i)); removeShape(xShape); } } @@ -517,7 +515,7 @@ public class FormHandler public void removeShape(XShape _xShape) { xDrawPage.remove(_xShape); - XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, _xShape); + XComponent xComponent = UnoRuntime.queryInterface(XComponent.class, _xShape); xComponent.dispose(); } // Destroy all Shapes in Nirwana @@ -525,7 +523,7 @@ public class FormHandler { for (int i = this.xDrawPage.getCount(); i > -1; i--) { - XShape xShape = (XShape) UnoRuntime.queryInterface(XShape.class, xDrawPage.getByIndex(i)); + XShape xShape = UnoRuntime.queryInterface(XShape.class, xDrawPage.getByIndex(i)); if (xShape.getPosition().Y < this.iYNirwanaPos) { xDrawPage.remove(xShape); @@ -538,7 +536,7 @@ public class FormHandler try { Object oGroupShape = _xMSF.createInstance("com.sun.star.drawing.ShapeCollection"); - XShapes xShapes = (XShapes) UnoRuntime.queryInterface(XShapes.class, oGroupShape); + XShapes xShapes = UnoRuntime.queryInterface(XShapes.class, oGroupShape); xShapes.add(_xLabelShape); xShapes.add(_xControlShape); return this.xShapeGrouper.group(xShapes); @@ -590,8 +588,8 @@ public class FormHandler { try { - XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, this.xMSFDoc.createInstance("com.sun.star.text.DocumentSettings")); - xPropertySet.setPropertyValue("DoNotCaptureDrawObjsOnPage", new Boolean(!_bCaptureObjects)); + XPropertySet xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, this.xMSFDoc.createInstance("com.sun.star.text.DocumentSettings")); + xPropertySet.setPropertyValue("DoNotCaptureDrawObjsOnPage", Boolean.valueOf(!_bCaptureObjects)); } catch (Exception e) { diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.java b/wizards/com/sun/star/wizards/document/OfficeDocument.java index 5e745dee7963..074ff5350a39 100644 --- a/wizards/com/sun/star/wizards/document/OfficeDocument.java +++ b/wizards/com/sun/star/wizards/document/OfficeDocument.java @@ -81,7 +81,7 @@ public class OfficeDocument { try { - XEventsSupplier xEventsSuppl = (XEventsSupplier) UnoRuntime.queryInterface(XEventsSupplier.class, xComponent); + XEventsSupplier xEventsSuppl = UnoRuntime.queryInterface(XEventsSupplier.class, xComponent); PropertyValue[] oEventProperties = new PropertyValue[2]; oEventProperties[0] = new PropertyValue(); oEventProperties[0].Name = "EventType"; @@ -103,8 +103,8 @@ public class OfficeDocument { if (xComponent != null) { - XModifiable xModified = (XModifiable) UnoRuntime.queryInterface(XModifiable.class, xComponent); - XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, xComponent); + XModifiable xModified = UnoRuntime.queryInterface(XModifiable.class, xComponent); + XModel xModel = UnoRuntime.queryInterface(XModel.class, xComponent); XFrame xFrame = xModel.getCurrentController().getFrame(); if (xModified.isModified()) { @@ -144,18 +144,18 @@ public class OfficeDocument try { - xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, frame); + xComponentLoader = UnoRuntime.queryInterface(XComponentLoader.class, frame); /*if (frame.getName() == null || frame.getName().equals(PropertyNames.EMPTY_STRING)); frame.setName("T" + System.currentTimeMillis());*/ XComponent xComponent = xComponentLoader.loadComponentFromURL(sURL, "_self", 0, loadValues); - if (sDocumentType == "swriter") + if (sDocumentType.equals("swriter")) { - oDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, xComponent); + oDocument = UnoRuntime.queryInterface(XTextDocument.class, xComponent); } - else if (sDocumentType == "scalc") + else if (sDocumentType.equals("scalc")) { - oDocument = (XSpreadsheetDocument) UnoRuntime.queryInterface(XSpreadsheetDocument.class, xComponent); + oDocument = UnoRuntime.queryInterface(XSpreadsheetDocument.class, xComponent); //TODO: // else if (sDocumentType == "simpress") // else if (sDocumentType == "sdraw") @@ -182,14 +182,14 @@ public class OfficeDocument } else { - XFrame xF = (XFrame) UnoRuntime.queryInterface(XFrame.class, Desktop.getDesktop(xMSF)); + XFrame xF = UnoRuntime.queryInterface(XFrame.class, Desktop.getDesktop(xMSF)); xFrame = xF.findFrame(FrameName, 0); if (listener != null) { - XFramesSupplier xFS = (XFramesSupplier) UnoRuntime.queryInterface(XFramesSupplier.class, xF); + XFramesSupplier xFS = UnoRuntime.queryInterface(XFramesSupplier.class, xF); XFrames xFF = xFS.getFrames(); xFF.remove(xFrame); - XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, xF); + XDesktop xDesktop = UnoRuntime.queryInterface(XDesktop.class, xF); xDesktop.addTerminateListener(listener); } } @@ -201,7 +201,7 @@ public class OfficeDocument XToolkit xToolkit = null; try { - xToolkit = (XToolkit) UnoRuntime.queryInterface(XToolkit.class, xMSF.createInstance("com.sun.star.awt.Toolkit")); + xToolkit = UnoRuntime.queryInterface(XToolkit.class, xMSF.createInstance("com.sun.star.awt.Toolkit")); } catch (Exception e) { @@ -226,14 +226,14 @@ public class OfficeDocument XWindowPeer xPeer = null; try { - xPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xToolkit.createWindow(aDescriptor)); + xPeer = UnoRuntime.queryInterface(XWindowPeer.class, xToolkit.createWindow(aDescriptor)); } catch (IllegalArgumentException e) { // TODO Auto-generated catch block e.printStackTrace(); } - XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, xPeer); + XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, xPeer); //define some further properties of the frame window //if it's needed .-) @@ -243,7 +243,7 @@ public class OfficeDocument XFrame xFrame = null; try { - xFrame = (XFrame) UnoRuntime.queryInterface(XFrame.class, xMSF.createInstance("com.sun.star.frame.Frame")); + xFrame = UnoRuntime.queryInterface(XFrame.class, xMSF.createInstance("com.sun.star.frame.Frame")); } catch (Exception e) { @@ -273,13 +273,13 @@ public class OfficeDocument //XInterface xInterface = null; try { - xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, xInterface); + xComponentLoader = UnoRuntime.queryInterface(XComponentLoader.class, xInterface); com.sun.star.lang.XComponent xComponent = xComponentLoader.loadComponentFromURL(sURL, sFrame, 0, xValues); - XServiceInfo xComponentService = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, xComponent); + XServiceInfo xComponentService = UnoRuntime.queryInterface(XServiceInfo.class, xComponent); if (xComponentService.supportsService("com.sun.star.text.TextDocument")) { - oDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, xComponent); //TODO: write if clauses for Calc, Impress and Draw + oDocument = UnoRuntime.queryInterface(XTextDocument.class, xComponent); //TODO: write if clauses for Calc, Impress and Draw } } catch (Exception exception) @@ -293,7 +293,7 @@ public class OfficeDocument { try { - XStorable xStoreable = (XStorable) UnoRuntime.queryInterface(XStorable.class, xComponent); + XStorable xStoreable = UnoRuntime.queryInterface(XStorable.class, xComponent); PropertyValue[] oStoreProperties; if (FilterName.length() > 0) { @@ -303,13 +303,13 @@ public class OfficeDocument oStoreProperties[0].Value = FilterName; oStoreProperties[1] = new PropertyValue(); oStoreProperties[1].Name = "InteractionHandler"; - oStoreProperties[1].Value = (XInteractionHandler) UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler")); + oStoreProperties[1].Value = UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler")); } else { oStoreProperties = new PropertyValue[0]; } - if (bStoreToUrl == true) + if (bStoreToUrl) { xStoreable.storeToURL(StorePath, oStoreProperties); } @@ -330,11 +330,11 @@ public class OfficeDocument public static boolean close(XComponent xComponent) { boolean bState = false; - XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, xComponent); + XModel xModel = UnoRuntime.queryInterface(XModel.class, xComponent); if (xModel != null) { - XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, xModel); + XCloseable xCloseable = UnoRuntime.queryInterface(XCloseable.class, xModel); if (xCloseable != null) { @@ -351,7 +351,7 @@ public class OfficeDocument } else { - XComponent xDisposeable = (XComponent) UnoRuntime.queryInterface(XComponent.class, xModel); + XComponent xDisposeable = UnoRuntime.queryInterface(XComponent.class, xModel); xDisposeable.dispose(); bState = true; } @@ -369,9 +369,9 @@ public class OfficeDocument int colcount = datalist[0].length; if (colcount > 0) { - XCellRange xCellRange = (XCellRange) UnoRuntime.queryInterface(XCellRange.class, oTable); + XCellRange xCellRange = UnoRuntime.queryInterface(XCellRange.class, oTable); XCellRange xNewRange = xCellRange.getCellRangeByPosition(xpos, ypos, (colcount + xpos) - 1, (rowcount + ypos) - 1); - XCellRangeData xDataArray = (XCellRangeData) UnoRuntime.queryInterface(XCellRangeData.class, xNewRange); + XCellRangeData xDataArray = UnoRuntime.queryInterface(XCellRangeData.class, xNewRange); xDataArray.setDataArray(datalist); } } @@ -392,9 +392,9 @@ public class OfficeDocument mediaDescr[0][0].Name = PropertyNames.URL; mediaDescr[0][0].Value = url; - String type = ((XTypeDetection) UnoRuntime.queryInterface(XTypeDetection.class, typeDetect)).queryTypeByDescriptor(mediaDescr, true); + String type = UnoRuntime.queryInterface(XTypeDetection.class, typeDetect).queryTypeByDescriptor(mediaDescr, true); - XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, typeDetect); + XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, typeDetect); if (type.equals(PropertyNames.EMPTY_STRING)) { return null; @@ -409,7 +409,7 @@ public class OfficeDocument throws Exception { Object typeDetect = xmsf.createInstance("com.sun.star.document.TypeDetection"); - XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, typeDetect); + XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, typeDetect); return (PropertyValue[]) xNameAccess.getByName(type); } @@ -421,13 +421,13 @@ public class OfficeDocument */ public static int getSlideCount(Object model) { - XDrawPagesSupplier xDrawPagesSupplier = (XDrawPagesSupplier) UnoRuntime.queryInterface(XDrawPagesSupplier.class, model); + XDrawPagesSupplier xDrawPagesSupplier = UnoRuntime.queryInterface(XDrawPagesSupplier.class, model); return xDrawPagesSupplier.getDrawPages().getCount(); } public static XDocumentProperties getDocumentProperties(Object document) { - XDocumentPropertiesSupplier xDocumentPropertiesSupplier = (XDocumentPropertiesSupplier) UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, document); + XDocumentPropertiesSupplier xDocumentPropertiesSupplier = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, document); return xDocumentPropertiesSupplier.getDocumentProperties(); } diff --git a/wizards/com/sun/star/wizards/document/Shape.java b/wizards/com/sun/star/wizards/document/Shape.java index b2ef1a27e662..990fe68cb916 100644 --- a/wizards/com/sun/star/wizards/document/Shape.java +++ b/wizards/com/sun/star/wizards/document/Shape.java @@ -73,8 +73,8 @@ public class Shape this.aSize = _aSize; this.oFormHandler = _oFormHandler; Object oShape = oFormHandler.xMSF.createInstance(_sServiceName); - xShapes = (XShapes) UnoRuntime.queryInterface(XShapes.class, oShape); - xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, oShape); + xShapes = UnoRuntime.queryInterface(XShapes.class, oShape); + xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, oShape); } catch (Exception e) { @@ -92,7 +92,7 @@ public class Shape { xMSF = oFormHandler.xMSFDoc; Object oShape = xMSF.createInstance(sServiceName); - xShape = (XShape) UnoRuntime.queryInterface(XShape.class, oShape); + xShape = UnoRuntime.queryInterface(XShape.class, oShape); xShape.setPosition(aPoint); if (aSize != null) { @@ -103,8 +103,8 @@ public class Shape xShape.setSize(new Size(1000, 100)); } Helper.setUnoPropertyValue(xShape, "AnchorType", TextContentAnchorType.AT_PARAGRAPH); - xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, xShape); - xControlShape = (XControlShape) UnoRuntime.queryInterface(XControlShape.class, xShape); + xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, xShape); + xControlShape = UnoRuntime.queryInterface(XControlShape.class, xShape); } catch (Exception e) diff --git a/wizards/com/sun/star/wizards/document/TimeStampControl.java b/wizards/com/sun/star/wizards/document/TimeStampControl.java index 0ca625062e67..7c951921bde6 100644 --- a/wizards/com/sun/star/wizards/document/TimeStampControl.java +++ b/wizards/com/sun/star/wizards/document/TimeStampControl.java @@ -75,7 +75,7 @@ public class TimeStampControl extends DatabaseControl xShapes.add(oDateControl.xShape); xShapes.add(oTimeControl.xShape); xShapeGroup = _oFormHandler.xShapeGrouper.group(xShapes); - xShapeGroup = (XShape) UnoRuntime.queryInterface(XShape.class, xShapeGroup); + xShapeGroup = UnoRuntime.queryInterface(XShape.class, xShapeGroup); nreldatewidth = 1.0 / ((double) getSize().Width / (double) nDateWidth); nreltimewidth = 1.0 - nreldatewidth; } @@ -87,9 +87,8 @@ public class TimeStampControl extends DatabaseControl if (_i < xShapes.getCount()) { Object oControl = xShapes.getByIndex(_i); - XControlShape xControlShape = (XControlShape) UnoRuntime.queryInterface(XControlShape.class, oControl); - XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControlShape.getControl()); - return xPropertySet; + XControlShape xControlShape = UnoRuntime.queryInterface(XControlShape.class, oControl); + return UnoRuntime.queryInterface(XPropertySet.class, xControlShape.getControl()); } } catch (Exception e) diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.java b/wizards/com/sun/star/wizards/fax/FaxDocument.java index d429ee42d2b8..a8f383f74cef 100644 --- a/wizards/com/sun/star/wizards/fax/FaxDocument.java +++ b/wizards/com/sun/star/wizards/fax/FaxDocument.java @@ -56,8 +56,7 @@ public class FaxDocument extends TextDocument public XWindowPeer getWindowPeer() { - XWindowPeer xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xTextDocument); - return xWindowPeer; + return UnoRuntime.queryInterface(XWindowPeer.class, xTextDocument); } public void switchElement(String sElement, boolean bState) @@ -66,7 +65,7 @@ public class FaxDocument extends TextDocument { TextSectionHandler mySectionHandler = new TextSectionHandler(xMSF, xTextDocument); Object oSection = mySectionHandler.xTextSectionsSupplier.getTextSections().getByName(sElement); - Helper.setUnoPropertyValue(oSection, "IsVisible", new Boolean(bState)); + Helper.setUnoPropertyValue(oSection, "IsVisible", Boolean.valueOf(bState)); } catch (Exception exception) @@ -88,20 +87,20 @@ public class FaxDocument extends TextDocument xTextDocument.lockControllers(); try { - XStyleFamiliesSupplier xStyleFamiliesSupplier = (XStyleFamiliesSupplier) com.sun.star.uno.UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument); + XStyleFamiliesSupplier xStyleFamiliesSupplier = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument); com.sun.star.container.XNameAccess xNameAccess = null; xNameAccess = xStyleFamiliesSupplier.getStyleFamilies(); com.sun.star.container.XNameContainer xPageStyleCollection = null; - xPageStyleCollection = (com.sun.star.container.XNameContainer) UnoRuntime.queryInterface(com.sun.star.container.XNameContainer.class, xNameAccess.getByName("PageStyles")); + xPageStyleCollection = UnoRuntime.queryInterface(com.sun.star.container.XNameContainer.class, xNameAccess.getByName("PageStyles")); XText xFooterText; - XStyle xPageStyle = (XStyle) UnoRuntime.queryInterface(XStyle.class, xPageStyleCollection.getByName(sPageStyle)); + XStyle xPageStyle = UnoRuntime.queryInterface(XStyle.class, xPageStyleCollection.getByName(sPageStyle)); if (bState) { - Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", new Boolean(true)); - xFooterText = (XText) UnoRuntime.queryInterface(XText.class, Helper.getUnoPropertyValue(xPageStyle, "FooterText")); + Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", Boolean.TRUE); + xFooterText = UnoRuntime.queryInterface(XText.class, Helper.getUnoPropertyValue(xPageStyle, "FooterText")); xFooterText.setString(sText); if (bPageNumber) { @@ -109,10 +108,10 @@ public class FaxDocument extends TextDocument XTextCursor myCursor = xFooterText.createTextCursor(); myCursor.gotoEnd(false); xFooterText.insertControlCharacter(myCursor, ControlCharacter.PARAGRAPH_BREAK, false); - XPropertySet xCursorPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, myCursor); + XPropertySet xCursorPSet = UnoRuntime.queryInterface(XPropertySet.class, myCursor); xCursorPSet.setPropertyValue("ParaAdjust", ParagraphAdjust.CENTER); - XTextField xPageNumberField = (XTextField) UnoRuntime.queryInterface(XTextField.class, xMSFDoc.createInstance("com.sun.star.text.TextField.PageNumber")); - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xPageNumberField); + XTextField xPageNumberField = UnoRuntime.queryInterface(XTextField.class, xMSFDoc.createInstance("com.sun.star.text.TextField.PageNumber")); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xPageNumberField); xPSet.setPropertyValue("SubType", PageNumberType.CURRENT); xPSet.setPropertyValue("NumberingType", new Short(NumberingType.ARABIC)); xFooterText.insertTextContent(xFooterText.getEnd(), xPageNumberField, false); @@ -120,7 +119,7 @@ public class FaxDocument extends TextDocument } else { - Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", new Boolean(false)); + Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", Boolean.FALSE); } xTextDocument.unlockControllers(); } diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java index 36d1d4af9add..8f9cf8107c7f 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java @@ -168,7 +168,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog } XWindow xContainerWindow = myFaxDoc.xFrame.getContainerWindow(); - XWindowPeer xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xContainerWindow); + XWindowPeer xWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, xContainerWindow); createWindowPeer(xWindowPeer); //add the Roadmap to the dialog: @@ -198,8 +198,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog removeTerminateListener(); exception.printStackTrace(System.out); running = false; - return; - } + } } public void cancelWizard() @@ -250,7 +249,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog if (bSaveSuccess) { saveConfiguration(); - XInteractionHandler xIH = (XInteractionHandler) UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler")); + XInteractionHandler xIH = UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler")); PropertyValue loadValues[] = new PropertyValue[4]; loadValues[0] = new PropertyValue(); loadValues[0].Name = "AsTemplate"; @@ -275,7 +274,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog } Object oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), sPath, "_default", loadValues); XTextDocument xTextDocument = (com.sun.star.text.XTextDocument) oDoc; - XMultiServiceFactory xDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument); + XMultiServiceFactory xDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument); ViewHandler myViewHandler = new ViewHandler(xDocMSF, xTextDocument); myViewHandler.setViewSetting("ZoomType", new Short(com.sun.star.view.DocumentZoomType.OPTIMAL)); } @@ -301,7 +300,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog try { //xComponent.dispose(); - XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, myFaxDoc.xFrame); + XCloseable xCloseable = UnoRuntime.queryInterface(XCloseable.class, myFaxDoc.xFrame); xCloseable.close(false); } catch (CloseVetoException e) @@ -352,7 +351,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog try { Object oGS = xMSF.createInstance("com.sun.star.graphic.GraphicProvider"); - XGraphicProvider xGraphicProvider = (XGraphicProvider) UnoRuntime.queryInterface(XGraphicProvider.class, oGS); + XGraphicProvider xGraphicProvider = UnoRuntime.queryInterface(XGraphicProvider.class, oGS); PropertyValue GraphicValues[] = new PropertyValue[1]; GraphicValues[0] = new PropertyValue(); @@ -424,9 +423,9 @@ public class FaxWizardDialogImpl extends FaxWizardDialog public void initializeElements() { - setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, new Boolean(myFaxDoc.hasElement("Company Logo"))); - setControlProperty("chkUseSubject", PropertyNames.PROPERTY_ENABLED, new Boolean(myFaxDoc.hasElement("Subject Line"))); - setControlProperty("chkUseDate", PropertyNames.PROPERTY_ENABLED, new Boolean(myFaxDoc.hasElement("Date"))); + setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myFaxDoc.hasElement("Company Logo"))); + setControlProperty("chkUseSubject", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myFaxDoc.hasElement("Subject Line"))); + setControlProperty("chkUseDate", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myFaxDoc.hasElement("Date"))); myFaxDoc.updateDateFields(); } @@ -448,17 +447,17 @@ public class FaxWizardDialogImpl extends FaxWizardDialog private void setDefaultForGreetingAndSalutationAndCommunication() { XTextComponent xTextComponent; - xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); + xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING)) { xTextComponent.setText(resources.SalutationLabels[0]); } - xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); + xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING)) { xTextComponent.setText(resources.GreetingLabels[0]); } - xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstCommunicationType); + xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstCommunicationType); if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING)) { xTextComponent.setText(resources.CommunicationLabels[0]); @@ -590,7 +589,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog public void txtTemplateNameTextChanged() { - XDocumentPropertiesSupplier xDocPropsSuppl = (XDocumentPropertiesSupplier) UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument); + XDocumentPropertiesSupplier xDocPropsSuppl = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument); XDocumentProperties xDocProps = xDocPropsSuppl.getDocumentProperties(); String TitleName = txtTemplateName.getText(); xDocProps.setTitle(TitleName); @@ -769,7 +768,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog //enable/disable roadmap item for footer page XInterface BPaperItem = getRoadmapItemByID(RM_FOOTER); - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, new Boolean(bFooterPossible)); + Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bFooterPossible)); } catch (Exception exception) @@ -795,14 +794,14 @@ public class FaxWizardDialogImpl extends FaxWizardDialog public void chkUseSalutationItemChanged() { - XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); + XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); myFaxDoc.switchUserField("Salutation", xTextComponent.getText(), (chkUseSalutation.getState() != 0)); - setControlProperty("lstSalutation", PropertyNames.PROPERTY_ENABLED, new Boolean(chkUseSalutation.getState() != 0)); + setControlProperty("lstSalutation", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(chkUseSalutation.getState() != 0)); } public void lstSalutationItemChanged() { - XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); + XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); myFaxDoc.switchUserField("Salutation", xTextComponent.getText(), (chkUseSalutation.getState() != 0)); } @@ -812,14 +811,14 @@ public class FaxWizardDialogImpl extends FaxWizardDialog public void chkUseCommunicationItemChanged() { - XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstCommunicationType); + XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstCommunicationType); myFaxDoc.switchUserField("CommunicationType", xTextComponent.getText(), (chkUseCommunicationType.getState() != 0)); - setControlProperty("lstCommunicationType", PropertyNames.PROPERTY_ENABLED, new Boolean(chkUseCommunicationType.getState() != 0)); + setControlProperty("lstCommunicationType", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(chkUseCommunicationType.getState() != 0)); } public void lstCommunicationItemChanged() { - XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstCommunicationType); + XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstCommunicationType); myFaxDoc.switchUserField("CommunicationType", xTextComponent.getText(), (chkUseCommunicationType.getState() != 0)); } @@ -829,14 +828,14 @@ public class FaxWizardDialogImpl extends FaxWizardDialog public void chkUseGreetingItemChanged() { - XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); + XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); myFaxDoc.switchUserField("Greeting", xTextComponent.getText(), (chkUseGreeting.getState() != 0)); - setControlProperty("lstGreeting", PropertyNames.PROPERTY_ENABLED, new Boolean(chkUseGreeting.getState() != 0)); + setControlProperty("lstGreeting", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(chkUseGreeting.getState() != 0)); } public void lstGreetingItemChanged() { - XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); + XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); myFaxDoc.switchUserField("Greeting", xTextComponent.getText(), (chkUseGreeting.getState() != 0)); } @@ -846,7 +845,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog private void setPossibleFooter(boolean bState) { - setControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); + setControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); if (!bState) { chkUseFooter.setState((short) 0); diff --git a/wizards/com/sun/star/wizards/form/CallFormWizard.java b/wizards/com/sun/star/wizards/form/CallFormWizard.java index f53fef4dd90e..543a521c6ce7 100644 --- a/wizards/com/sun/star/wizards/form/CallFormWizard.java +++ b/wizards/com/sun/star/wizards/form/CallFormWizard.java @@ -160,7 +160,7 @@ public class CallFormWizard try { - byteReturn = new String(PropertyNames.EMPTY_STRING + this.hashCode()).getBytes(); + byteReturn = (PropertyNames.EMPTY_STRING + this.hashCode()).getBytes(); } catch (Exception exception) { diff --git a/wizards/com/sun/star/wizards/form/DataEntrySetter.java b/wizards/com/sun/star/wizards/form/DataEntrySetter.java index de1d9f55c7d0..9a5624f627c5 100644 --- a/wizards/com/sun/star/wizards/form/DataEntrySetter.java +++ b/wizards/com/sun/star/wizards/form/DataEntrySetter.java @@ -125,14 +125,14 @@ public class DataEntrySetter boolean bAllowUpdates = (((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(chknomodification), PropertyNames.PROPERTY_STATE)).shortValue()) != 1; boolean bAllowDeletes = (((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(chknodeletion), PropertyNames.PROPERTY_STATE)).shortValue()) != 1; boolean bAllowInserts = (((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(chknoaddition), PropertyNames.PROPERTY_STATE)).shortValue()) != 1; - retProperties[0] = Properties.createProperty("AllowUpdates", new Boolean(bAllowUpdates)); - retProperties[1] = Properties.createProperty("AllowDeletes", new Boolean(bAllowDeletes)); - retProperties[2] = Properties.createProperty("AllowInserts", new Boolean(bAllowInserts)); + retProperties[0] = Properties.createProperty("AllowUpdates", Boolean.valueOf(bAllowUpdates)); + retProperties[1] = Properties.createProperty("AllowDeletes", Boolean.valueOf(bAllowDeletes)); + retProperties[2] = Properties.createProperty("AllowInserts", Boolean.valueOf(bAllowInserts)); } else { retProperties = new PropertyValue[1]; - retProperties[0] = Properties.createProperty("IgnoreResult", new Boolean(true)); + retProperties[0] = Properties.createProperty("IgnoreResult", Boolean.TRUE); } return retProperties; @@ -141,8 +141,8 @@ public class DataEntrySetter public void toggleCheckBoxes() { boolean bdisplayalldata = optDisplayAllData.getState(); - Helper.setUnoPropertyValue(UnoDialog.getModel(chknomodification), PropertyNames.PROPERTY_ENABLED, new Boolean(bdisplayalldata)); - Helper.setUnoPropertyValue(UnoDialog.getModel(chknodeletion), PropertyNames.PROPERTY_ENABLED, new Boolean(bdisplayalldata)); - Helper.setUnoPropertyValue(UnoDialog.getModel(chknoaddition), PropertyNames.PROPERTY_ENABLED, new Boolean(bdisplayalldata)); + Helper.setUnoPropertyValue(UnoDialog.getModel(chknomodification), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdisplayalldata)); + Helper.setUnoPropertyValue(UnoDialog.getModel(chknodeletion), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdisplayalldata)); + Helper.setUnoPropertyValue(UnoDialog.getModel(chknoaddition), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdisplayalldata)); } } diff --git a/wizards/com/sun/star/wizards/form/FieldLinker.java b/wizards/com/sun/star/wizards/form/FieldLinker.java index e9671aaf91c0..146173ec9097 100644 --- a/wizards/com/sun/star/wizards/form/FieldLinker.java +++ b/wizards/com/sun/star/wizards/form/FieldLinker.java @@ -48,18 +48,9 @@ public class FieldLinker extends DBLimitedFieldSelection private XFixedText[] lblMasterFields; private XListBox[] lstSlaveFields; private XListBox[] lstMasterFields; - private final int SOMASTERINDEX = 1; - private final int SOSLAVEINDEX = 0; - private int SOFIRSTLINKLST = 0; - private int SOSECLINKLST = 1; - private int SOTHIRDLINKLST = 2; - private int SOFOURTHLINKLST = 3; private int[] SOLINKLST = null; private String[] sSlaveListHeader; private String[] sMasterListHeader; //CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 40); - private String sSlaveHidString; - private String sMasterHidString; - private Integer IListBoxPosX; public FieldLinker(WizardDialog _CurUnoDialog, int iStep, int iCompPosX, int iCompPosY, int iCompWidth, int _firsthelpid) { @@ -76,31 +67,31 @@ public class FieldLinker extends DBLimitedFieldSelection lblMasterFields = new XFixedText[rowcount]; lstSlaveFields = new XListBox[rowcount]; lstMasterFields = new XListBox[rowcount]; - SOFIRSTLINKLST = 0; - SOSECLINKLST = 1; - SOTHIRDLINKLST = 2; - SOFOURTHLINKLST = 3; - IListBoxPosX = new Integer(iCompPosX + 6); + int SOFIRSTLINKLST = 0; + int SOSECLINKLST = 1; + int SOTHIRDLINKLST = 2; + int SOFOURTHLINKLST = 3; + Integer IListBoxPosX = new Integer(iCompPosX + 6); sSlaveListHeader = CurUnoDialog.m_oResource.getResArray(UIConsts.RID_FORM + 20, 4); //new String[rowcount];PropertyNames.EMPTY_STRING; //CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 40); sMasterListHeader = CurUnoDialog.m_oResource.getResArray(UIConsts.RID_FORM + 24, 4);// new String[rowcount];PropertyNames.EMPTY_STRING; //CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 40); SOLINKLST = new int[] { - SOFIRSTLINKLST, SOSECLINKLST, SOTHIRDLINKLST, SOFOURTHLINKLST + SOFIRSTLINKLST, SOSECLINKLST, SOTHIRDLINKLST, SOFOURTHLINKLST }; } - sSlaveHidString = HelpIds.getHelpIdString(FirstHelpIndex + (i * 2)); - sMasterHidString = HelpIds.getHelpIdString(FirstHelpIndex + (i * 2) + 1); + String sSlaveHidString = HelpIds.getHelpIdString(FirstHelpIndex + (i * 2)); + String sMasterHidString = HelpIds.getHelpIdString(FirstHelpIndex + (i * 2) + 1); boolean bDoEnable = (i < 2); - lblSlaveFields[i] = CurUnoDialog.insertLabel("lblSlaveFieldLink" + new Integer(i + 1).toString(), + lblSlaveFields[i] = CurUnoDialog.insertLabel("lblSlaveFieldLink" + Integer.toString(i + 1), new String[] { PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { - new Boolean(bDoEnable), 8, sSlaveListHeader[i], 97, new Integer(iCurPosY), IStep, new Short(curtabindex++), 97 + Boolean.valueOf(bDoEnable), 8, sSlaveListHeader[i], 97, new Integer(iCurPosY), IStep, new Short(curtabindex++), 97 }); - lstSlaveFields[i] = CurUnoDialog.insertListBox("lstSlaveFieldLink" + new Integer(i + 1).toString(), SOLINKLST[i], null, new ItemListenerImpl(), + lstSlaveFields[i] = CurUnoDialog.insertListBox("lstSlaveFieldLink" + (i + 1), SOLINKLST[i], null, new ItemListenerImpl(), new String[] { "Dropdown", @@ -117,9 +108,9 @@ public class FieldLinker extends DBLimitedFieldSelection new Object[] { Boolean.TRUE, - new Boolean(bDoEnable), + Boolean.valueOf(bDoEnable), UIConsts.INTEGER_12, - sSlaveHidString, + sSlaveHidString, Short.valueOf(UnoDialog.getListBoxLineCount()), 97, new Integer(iCurPosY + 10), @@ -128,17 +119,17 @@ public class FieldLinker extends DBLimitedFieldSelection 97 }); - lblMasterFields[i] = CurUnoDialog.insertLabel("lblMasterFieldLink" + new Integer(i + 1).toString(), + lblMasterFields[i] = CurUnoDialog.insertLabel("lblMasterFieldLink" + Integer.toString(i + 1), new String[] { PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { - new Boolean(bDoEnable), 8, sMasterListHeader[i], 206, new Integer(iCurPosY), IStep, new Short(curtabindex++), 97 + Boolean.valueOf(bDoEnable), 8, sMasterListHeader[i], 206, new Integer(iCurPosY), IStep, new Short(curtabindex++), 97 }); - lstMasterFields[i] = CurUnoDialog.insertListBox("lstMasterFieldLink" + new Integer(i + 1).toString(), SOLINKLST[i], null, new ItemListenerImpl(), + lstMasterFields[i] = CurUnoDialog.insertListBox("lstMasterFieldLink" + Integer.toString(i + 1), SOLINKLST[i], null, new ItemListenerImpl(), new String[] { "Dropdown", @@ -155,9 +146,9 @@ public class FieldLinker extends DBLimitedFieldSelection new Object[] { Boolean.TRUE, - new Boolean(bDoEnable), + Boolean.valueOf(bDoEnable), UIConsts.INTEGER_12, - sMasterHidString, + sMasterHidString, Short.valueOf(UnoDialog.getListBoxLineCount()), 206, new Integer(iCurPosY + 10), @@ -206,11 +197,11 @@ public class FieldLinker extends DBLimitedFieldSelection { if (i < rowcount) { - Helper.setUnoPropertyValue(UnoDialog.getModel(lblSlaveFields[i]), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[i]), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(lblMasterFields[i]), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[i]), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); - if (bDoEnable == false) + Helper.setUnoPropertyValue(UnoDialog.getModel(lblSlaveFields[i]), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bDoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[i]), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bDoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(lblMasterFields[i]), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bDoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[i]), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bDoEnable)); + if (!bDoEnable) { Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[i]), PropertyNames.SELECTED_ITEMS, new short[] { 0 }); Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[i]), PropertyNames.SELECTED_ITEMS, new short[] { 0 }); @@ -238,7 +229,9 @@ public class FieldLinker extends DBLimitedFieldSelection { // short[] MasterSelList = null; // short[] SlaveSelList = null; + int SOMASTERINDEX = 1; String[] MasterLinkNames = JavaTools.ArrayOutOfMultiDimArray(_LinkFieldNames, SOMASTERINDEX); + int SOSLAVEINDEX = 0; String[] SlaveLinkNames = JavaTools.ArrayOutOfMultiDimArray(_LinkFieldNames, SOSLAVEINDEX); String[] ViewMasterFieldNames = addNoneFieldItemToList(_AllMasterFieldNames); // add '-undefiened-' String[] ViewSlaveFieldNames = addNoneFieldItemToList(_AllSlaveFieldNames); diff --git a/wizards/com/sun/star/wizards/form/Finalizer.java b/wizards/com/sun/star/wizards/form/Finalizer.java index 199e55d2ebb6..7cd25f012cd6 100644 --- a/wizards/com/sun/star/wizards/form/Finalizer.java +++ b/wizards/com/sun/star/wizards/form/Finalizer.java @@ -128,7 +128,7 @@ public class Finalizer public boolean getOpenForEditing() { - return optModifyForm.getState() ? true : false; + return optModifyForm.getState(); } public boolean finish() diff --git a/wizards/com/sun/star/wizards/form/FormConfiguration.java b/wizards/com/sun/star/wizards/form/FormConfiguration.java index b6f6c476b84c..7d7425985f83 100644 --- a/wizards/com/sun/star/wizards/form/FormConfiguration.java +++ b/wizards/com/sun/star/wizards/form/FormConfiguration.java @@ -151,8 +151,8 @@ public class FormConfiguration public void toggleSubFormMode() { boolean bdoEnable = (this.chkcreateSubForm.getState() == 1); - Helper.setUnoPropertyValue(UnoDialog.getModel(optOnExistingRelation), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoEnable && bsupportsRelations)); - Helper.setUnoPropertyValue(UnoDialog.getModel(optSelectManually), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(optOnExistingRelation), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoEnable && bsupportsRelations)); + Helper.setUnoPropertyValue(UnoDialog.getModel(optSelectManually), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoEnable)); toggleSteps(); } @@ -164,7 +164,7 @@ public class FormConfiguration Helper.setUnoPropertyValue(UnoDialog.getModel(lstRelations), PropertyNames.STRING_ITEM_LIST, sreferencedTables); this.CurSubFormFieldSelection = _CurSubFormFieldSelection; toggleRelationsListbox(); - Helper.setUnoPropertyValue(UnoDialog.getModel(optOnExistingRelation), PropertyNames.PROPERTY_ENABLED, new Boolean(bsupportsRelations && (chkcreateSubForm.getState() == 1))); + Helper.setUnoPropertyValue(UnoDialog.getModel(optOnExistingRelation), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bsupportsRelations && (chkcreateSubForm.getState() == 1))); } public void toggleSteps() @@ -231,8 +231,8 @@ public class FormConfiguration private void toggleRelationsListbox() { boolean bdoenable = bsupportsRelations && this.optOnExistingRelation.getState() && (chkcreateSubForm.getState() == 1); - Helper.setUnoPropertyValue(UnoDialog.getModel(lblRelations), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoenable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(lstRelations), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoenable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(lblRelations), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoenable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(lstRelations), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoenable)); } public boolean hasSubForm() diff --git a/wizards/com/sun/star/wizards/form/FormControlArranger.java b/wizards/com/sun/star/wizards/form/FormControlArranger.java index 916c92621efa..a87478f5690a 100644 --- a/wizards/com/sun/star/wizards/form/FormControlArranger.java +++ b/wizards/com/sun/star/wizards/form/FormControlArranger.java @@ -126,7 +126,7 @@ public class FormControlArranger { if (LastIndex < DBControlList.length && DBControlList[LastIndex].getControlType() == FormHandler.SOCHECKBOX) { - return (int) ((oFormHandler.getControlReferenceHeight() - DBControlList[LastIndex].getControlHeight()) / 2); + return (oFormHandler.getControlReferenceHeight() - DBControlList[LastIndex].getControlHeight()) / 2; } return 0; } diff --git a/wizards/com/sun/star/wizards/form/FormDocument.java b/wizards/com/sun/star/wizards/form/FormDocument.java index 63bd67a9f0ce..f12455c264d5 100644 --- a/wizards/com/sun/star/wizards/form/FormDocument.java +++ b/wizards/com/sun/star/wizards/form/FormDocument.java @@ -223,8 +223,7 @@ public class FormDocument extends TextDocument nMainFormHeight = (int) (((double) getMainFieldCount() / (double) nTotalFieldCount) * ((double) (nFormHeight - SOFORMGAP) / 2)); } } - Size aMainFormSize = new Size(nFormWidth, nMainFormHeight); - return aMainFormSize; + return new Size(nFormWidth, nMainFormHeight); } private Size getSubFormSize() @@ -233,8 +232,7 @@ public class FormDocument extends TextDocument // int nSubFormFieldCount = this.oSubFormDBMetaData.FieldNames.length; // int totfieldcount = oMainFormDBMetaData.FieldNames.length + nSubFormFieldCount; int nMainFormHeight = ((ControlForm) oControlForms.get(0)).getActualFormHeight(); - Size aSubFormSize = new Size(nFormWidth, nFormHeight - nMainFormHeight - SOFORMGAP); - return aSubFormSize; + return new Size(nFormWidth, nFormHeight - nMainFormHeight - SOFORMGAP); } private Point getSubFormPoint() @@ -265,7 +263,7 @@ public class FormDocument extends TextDocument { ControlForm oMainControlForm = (ControlForm) oControlForms.get(0); ControlForm oSubControlForm = (ControlForm) oControlForms.get(1); - oSubControlForm.setFormSize(new Size(nFormWidth, (int) nFormHeight - oMainControlForm.getFormSize().Height)); + oSubControlForm.setFormSize(new Size(nFormWidth, nFormHeight - oMainControlForm.getFormSize().Height)); if (oSubControlForm.curArrangement == FormWizard.AS_GRID) { Point aPoint = oSubControlForm.oGridControl.getPosition(); @@ -378,7 +376,7 @@ public class FormDocument extends TextDocument { xFormContainer = oFormHandler.insertFormbyName(_sname); } - xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xFormContainer); + xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xFormContainer); if (_sname.equals(SOMAINFORM)) { oDBMetaData = oFormDocument.oMainFormDBMetaData; diff --git a/wizards/com/sun/star/wizards/form/FormWizard.java b/wizards/com/sun/star/wizards/form/FormWizard.java index 101c054a2c2b..cff52f46229b 100644 --- a/wizards/com/sun/star/wizards/form/FormWizard.java +++ b/wizards/com/sun/star/wizards/form/FormWizard.java @@ -89,7 +89,7 @@ public class FormWizard extends DatabaseObjectWizard 210, Boolean.TRUE, "DialogForm", 102, 41, 1, new Short((short) 0), m_oResource.getResText(UIConsts.RID_FORM), 310 }); drawNaviBar(); - if (getFormResources() == true) + if (getFormResources()) { setRightPaneHeaders(m_oResource, UIConsts.RID_FORM + 90, 8); } @@ -461,7 +461,7 @@ public class FormWizard extends DatabaseObjectWizard curDBCommandFieldSelection.setModified(true); boolean benable = curDBCommandFieldSelection.getSelectedFieldNames().length > 0; enablefromStep(SOSUBFORM_PAGE, benable); - setControlProperty("btnWizardNext", PropertyNames.PROPERTY_ENABLED, new Boolean(benable)); + setControlProperty("btnWizardNext", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(benable)); if (benable) { if (curFormConfiguration.hasSubForm()) @@ -474,7 +474,7 @@ public class FormWizard extends DatabaseObjectWizard setStepEnabled(SOFIELDLINKER_PAGE, false); } } - setControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED, new Boolean(benable)); + setControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(benable)); } } } diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java b/wizards/com/sun/star/wizards/form/StyleApplier.java index 657ca504fcfb..9f6f6d6160dd 100644 --- a/wizards/com/sun/star/wizards/form/StyleApplier.java +++ b/wizards/com/sun/star/wizards/form/StyleApplier.java @@ -187,7 +187,7 @@ public class StyleApplier try { Object oRootNode = Configuration.getConfigurationRoot(xMSF, "org.openoffice.Office.FormWizard/FormWizard/Styles", false); - XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oRootNode); + XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, oRootNode); StyleNodeNames = xNameAccess.getElementNames(); StyleNames = new String[StyleNodeNames.length]; FileNames = new String[StyleNodeNames.length]; diff --git a/wizards/com/sun/star/wizards/form/UIControlArranger.java b/wizards/com/sun/star/wizards/form/UIControlArranger.java index 678ed88962b0..82a063c1bb7d 100644 --- a/wizards/com/sun/star/wizards/form/UIControlArranger.java +++ b/wizards/com/sun/star/wizards/form/UIControlArranger.java @@ -201,7 +201,7 @@ public class UIControlArranger public void enableSubFormImageList(boolean _bdoEnable) { m_aArrangeList[1].m_aButtonList.setenabled(_bdoEnable); - CurUnoDialog.setControlProperty("lnLabelPlacment_2", PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoEnable)); + CurUnoDialog.setControlProperty("lnLabelPlacment_2", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bdoEnable)); } public short getAlignValue() @@ -235,9 +235,9 @@ public class UIControlArranger private void enableAlignControlGroup(boolean _bEnableAlignControlGroup) { - Helper.setUnoPropertyValue(UnoDialog.getModel(flnLabelPlacement), PropertyNames.PROPERTY_ENABLED, new Boolean(_bEnableAlignControlGroup)); - Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignLeft), PropertyNames.PROPERTY_ENABLED, new Boolean(_bEnableAlignControlGroup)); - Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignRight), PropertyNames.PROPERTY_ENABLED, new Boolean(_bEnableAlignControlGroup)); + Helper.setUnoPropertyValue(UnoDialog.getModel(flnLabelPlacement), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bEnableAlignControlGroup)); + Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignLeft), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bEnableAlignControlGroup)); + Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignRight), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bEnableAlignControlGroup)); } // private class ArrangeImageList implements XItemListener diff --git a/wizards/com/sun/star/wizards/letter/LetterDocument.java b/wizards/com/sun/star/wizards/letter/LetterDocument.java index 361e7d3da43d..6a024ce1113f 100644 --- a/wizards/com/sun/star/wizards/letter/LetterDocument.java +++ b/wizards/com/sun/star/wizards/letter/LetterDocument.java @@ -61,9 +61,8 @@ public class LetterDocument extends TextDocument public XWindowPeer getWindowPeer() { - XWindowPeer xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xTextDocument); - return xWindowPeer; - } + return UnoRuntime.queryInterface(XWindowPeer.class, xTextDocument); +} public void switchElement(String sElement, boolean bState) { @@ -71,7 +70,7 @@ public class LetterDocument extends TextDocument { TextSectionHandler mySectionHandler = new TextSectionHandler(xMSF, xTextDocument); Object oSection = mySectionHandler.xTextSectionsSupplier.getTextSections().getByName(sElement); - Helper.setUnoPropertyValue(oSection, "IsVisible", new Boolean(bState)); + Helper.setUnoPropertyValue(oSection, "IsVisible", Boolean.valueOf(bState)); } catch (Exception exception) @@ -93,20 +92,20 @@ public class LetterDocument extends TextDocument try { xTextDocument.lockControllers(); - XStyleFamiliesSupplier xStyleFamiliesSupplier = (XStyleFamiliesSupplier) com.sun.star.uno.UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument); + XStyleFamiliesSupplier xStyleFamiliesSupplier = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument); com.sun.star.container.XNameAccess xNameAccess = null; xNameAccess = xStyleFamiliesSupplier.getStyleFamilies(); com.sun.star.container.XNameContainer xPageStyleCollection = null; - xPageStyleCollection = (com.sun.star.container.XNameContainer) UnoRuntime.queryInterface(com.sun.star.container.XNameContainer.class, xNameAccess.getByName("PageStyles")); + xPageStyleCollection = UnoRuntime.queryInterface(com.sun.star.container.XNameContainer.class, xNameAccess.getByName("PageStyles")); XText xFooterText; - XStyle xPageStyle = (XStyle) UnoRuntime.queryInterface(XStyle.class, xPageStyleCollection.getByName(sPageStyle)); + XStyle xPageStyle = UnoRuntime.queryInterface(XStyle.class, xPageStyleCollection.getByName(sPageStyle)); if (bState) { - Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", new Boolean(true)); - xFooterText = (XText) UnoRuntime.queryInterface(XText.class, Helper.getUnoPropertyValue(xPageStyle, "FooterText")); + Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", Boolean.TRUE); + xFooterText = UnoRuntime.queryInterface(XText.class, Helper.getUnoPropertyValue(xPageStyle, "FooterText")); xFooterText.setString(sText); if (bPageNumber) { @@ -114,10 +113,10 @@ public class LetterDocument extends TextDocument XTextCursor myCursor = xFooterText.createTextCursor(); myCursor.gotoEnd(false); xFooterText.insertControlCharacter(myCursor, ControlCharacter.PARAGRAPH_BREAK, false); - XPropertySet xCursorPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, myCursor); + XPropertySet xCursorPSet = UnoRuntime.queryInterface(XPropertySet.class, myCursor); xCursorPSet.setPropertyValue("ParaAdjust", ParagraphAdjust.CENTER); - XTextField xPageNumberField = (XTextField) UnoRuntime.queryInterface(XTextField.class, xMSFDoc.createInstance("com.sun.star.text.TextField.PageNumber")); - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xPageNumberField); + XTextField xPageNumberField = UnoRuntime.queryInterface(XTextField.class, xMSFDoc.createInstance("com.sun.star.text.TextField.PageNumber")); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xPageNumberField); xPSet.setPropertyValue("SubType", PageNumberType.CURRENT); xPSet.setPropertyValue("NumberingType", new Short(NumberingType.ARABIC)); xFooterText.insertTextContent(xFooterText.getEnd(), xPageNumberField, false); @@ -125,7 +124,7 @@ public class LetterDocument extends TextDocument } else { - Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", new Boolean(false)); + Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", Boolean.FALSE); } xTextDocument.unlockControllers(); } @@ -259,8 +258,8 @@ public class LetterDocument extends TextDocument try { - xFrame = (XTextFrame) UnoRuntime.queryInterface(XTextFrame.class, xMSFDoc.createInstance("com.sun.star.text.TextFrame")); - xShape = (XShape) UnoRuntime.queryInterface(XShape.class, xFrame); + xFrame = UnoRuntime.queryInterface(XTextFrame.class, xMSFDoc.createInstance("com.sun.star.text.TextFrame")); + xShape = UnoRuntime.queryInterface(XShape.class, xFrame); setFramePosition(); Helper.setUnoPropertyValue(xShape, "AnchorType", TextContentAnchorType.AT_PAGE); @@ -276,7 +275,7 @@ public class LetterDocument extends TextDocument Helper.setUnoPropertyValue(xFrame, "RightBorder", myBorder); Helper.setUnoPropertyValue(xFrame, "TopBorder", myBorder); Helper.setUnoPropertyValue(xFrame, "BottomBorder", myBorder); - Helper.setUnoPropertyValue(xFrame, "Print", new Boolean(false)); + Helper.setUnoPropertyValue(xFrame, "Print", Boolean.FALSE); XTextCursor xTextCursor = xTextDocument.getText().createTextCursor(); xTextCursor.gotoEnd(true); @@ -285,10 +284,10 @@ public class LetterDocument extends TextDocument XText xFrameText = xFrame.getText(); XTextCursor xFrameCursor = xFrameText.createTextCursor(); - XPropertySet xCursorProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xFrameCursor); + XPropertySet xCursorProps = UnoRuntime.queryInterface(XPropertySet.class, xFrameCursor); xCursorProps.setPropertyValue("CharWeight", new Float(com.sun.star.awt.FontWeight.BOLD)); xCursorProps.setPropertyValue("CharColor", 16777215); - xCursorProps.setPropertyValue("CharFontName", new String("Albany")); + xCursorProps.setPropertyValue("CharFontName", "Albany"); xCursorProps.setPropertyValue("CharHeight", new Float(18)); xFrameText.insertString(xFrameCursor, FrameText, false); diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java index 6f4503d3936a..a7198b6ba955 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java @@ -211,7 +211,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog } XWindow xContainerWindow = myLetterDoc.xFrame.getContainerWindow(); - XWindowPeer xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xContainerWindow); + XWindowPeer xWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, xContainerWindow); createWindowPeer(xWindowPeer); //add the Roadmap to the dialog: @@ -240,8 +240,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog removeTerminateListener(); exception.printStackTrace(System.out); running = false; - return; - } + } } public void cancelWizard() @@ -311,7 +310,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog if (bSaveSuccess) { saveConfiguration(); - XInteractionHandler xIH = (XInteractionHandler) UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler")); + XInteractionHandler xIH = UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler")); PropertyValue loadValues[] = new PropertyValue[4]; loadValues[0] = new PropertyValue(); loadValues[0].Name = "AsTemplate"; @@ -335,7 +334,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog } Object oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), sPath, "_default", loadValues); XTextDocument xTextDocument = (com.sun.star.text.XTextDocument) oDoc; - XMultiServiceFactory xDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument); + XMultiServiceFactory xDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument); ViewHandler myViewHandler = new ViewHandler(xDocMSF, xTextDocument); myViewHandler.setViewSetting("ZoomType", new Short(com.sun.star.view.DocumentZoomType.OPTIMAL)); } @@ -361,7 +360,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog try { //xComponent.dispose(); - XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, myLetterDoc.xFrame); + XCloseable xCloseable = UnoRuntime.queryInterface(XCloseable.class, myLetterDoc.xFrame); xCloseable.close(false); } catch (CloseVetoException e) @@ -734,7 +733,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { numFooterHeight.setValue(0.1); } - BusFooter = myLetterDoc.new BusinessPaperObject("Footer", (int) myLetterDoc.DocSize.Width, (int) (numFooterHeight.getValue() * 1000), (int) 0, (int) (myLetterDoc.DocSize.Height - (numFooterHeight.getValue() * 1000))); + BusFooter = myLetterDoc.new BusinessPaperObject("Footer", myLetterDoc.DocSize.Width, (int) (numFooterHeight.getValue() * 1000), 0, (int) (myLetterDoc.DocSize.Height - (numFooterHeight.getValue() * 1000))); this.setControlProperty("numFooterHeight", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); this.setControlProperty("lblFooterHeight", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); setPossibleFooter(false); @@ -827,7 +826,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog //enable/disable roadmap item for footer page XInterface BPaperItem = getRoadmapItemByID(RM_FOOTER); - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, new Boolean(bFooterPossible)); + Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bFooterPossible)); } catch (Exception exception) @@ -848,7 +847,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog private void setPossibleFooter(boolean bState) { - setControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); + setControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); chkUseFooterItemChanged(); } @@ -856,7 +855,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { if (myLetterDoc.hasElement("Sender Address Repeated")) { - setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); + setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); chkUseAddressReceiverItemChanged(); } } @@ -865,7 +864,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { if (myLetterDoc.hasElement("Company Logo")) { - setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); + setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); chkUseLogoItemChanged(); } } @@ -907,7 +906,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog public void txtTemplateNameTextChanged() { - XDocumentPropertiesSupplier xDocPropsSuppl = (XDocumentPropertiesSupplier) UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument); + XDocumentPropertiesSupplier xDocPropsSuppl = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument); XDocumentProperties xDocProps = xDocPropsSuppl.getDocumentProperties(); String TitleName = txtTemplateName.getText(); xDocProps.setTitle(TitleName); @@ -915,14 +914,14 @@ public class LetterWizardDialogImpl extends LetterWizardDialog public void chkUseSalutationItemChanged() { - XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); + XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); myLetterDoc.switchUserField("Salutation", xTextComponent.getText(), (chkUseSalutation.getState() != 0)); - setControlProperty("lstSalutation", PropertyNames.PROPERTY_ENABLED, new Boolean(chkUseSalutation.getState() != 0)); + setControlProperty("lstSalutation", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(chkUseSalutation.getState() != 0)); } public void lstSalutationItemChanged() { - XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); + XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); myLetterDoc.switchUserField("Salutation", xTextComponent.getText(), (chkUseSalutation.getState() != 0)); } @@ -932,20 +931,20 @@ public class LetterWizardDialogImpl extends LetterWizardDialog public void chkUseGreetingItemChanged() { - XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); + XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); myLetterDoc.switchUserField("Greeting", xTextComponent.getText(), (chkUseGreeting.getState() != 0)); - setControlProperty("lstGreeting", PropertyNames.PROPERTY_ENABLED, new Boolean(chkUseGreeting.getState() != 0)); + setControlProperty("lstGreeting", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(chkUseGreeting.getState() != 0)); } private void setDefaultForGreetingAndSalutation() { XTextComponent xTextComponent; - xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); + xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING)) { xTextComponent.setText(resources.SalutationLabels[0]); } - xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); + xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING)) { xTextComponent.setText(resources.GreetingLabels[0]); @@ -954,7 +953,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog public void lstGreetingItemChanged() { - XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); + XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); myLetterDoc.switchUserField("Greeting", xTextComponent.getText(), (chkUseGreeting.getState() != 0)); } @@ -1009,20 +1008,20 @@ public class LetterWizardDialogImpl extends LetterWizardDialog private void setPossibleSenderData(boolean bState) { - setControlProperty("optSenderDefine", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); - setControlProperty("optSenderPlaceholder", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); - setControlProperty("lblSenderAddress", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); + setControlProperty("optSenderDefine", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); + setControlProperty("optSenderPlaceholder", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); + setControlProperty("lblSenderAddress", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); if (!bState) { - setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); - setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); - setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); - setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); - setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); - setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); - setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); - setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); - setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); + setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); + setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); + setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); + setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); + setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); + setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); + setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); + setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); + setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); } } @@ -1149,7 +1148,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog //sLetterLangPackPath = FileAccess.combinePaths(xMSF, sTemplatePath, sLetterSubPath); XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); - com.sun.star.ucb.XSimpleFileAccess xSimpleFileAccess = (com.sun.star.ucb.XSimpleFileAccess) UnoRuntime.queryInterface(com.sun.star.ucb.XSimpleFileAccess.class, xInterface); + com.sun.star.ucb.XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(com.sun.star.ucb.XSimpleFileAccess.class, xInterface); nameList1 = xSimpleFileAccess.getFolderContents(sMainPath, true); nameList2 = xSimpleFileAccess.getFolderContents(sLetterPath, true); for (int i = 0; i < nameList1.length; i++) @@ -1246,7 +1245,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog if (found) { NormsVector.add(cIsoCode); - NormsPathVector.add((String) nameList[i]); + NormsPathVector.add(nameList[i]); LanguageLabelsVector.add(lc.getLanguageString(MSID)); /* Norms[z] = cIsoCode; @@ -1341,11 +1340,11 @@ public class LetterWizardDialogImpl extends LetterWizardDialog public void initializeElements() { - setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, new Boolean(myLetterDoc.hasElement("Company Logo"))); - setControlProperty("chkUseBendMarks", PropertyNames.PROPERTY_ENABLED, new Boolean(myLetterDoc.hasElement("Bend Marks"))); - setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, new Boolean(myLetterDoc.hasElement("Sender Address Repeated"))); - setControlProperty("chkUseSubject", PropertyNames.PROPERTY_ENABLED, new Boolean(myLetterDoc.hasElement("Subject Line"))); - setControlProperty("chkUseSigns", PropertyNames.PROPERTY_ENABLED, new Boolean(myLetterDoc.hasElement("Letter Signs"))); + setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myLetterDoc.hasElement("Company Logo"))); + setControlProperty("chkUseBendMarks", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myLetterDoc.hasElement("Bend Marks"))); + setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myLetterDoc.hasElement("Sender Address Repeated"))); + setControlProperty("chkUseSubject", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myLetterDoc.hasElement("Subject Line"))); + setControlProperty("chkUseSigns", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myLetterDoc.hasElement("Letter Signs"))); myLetterDoc.updateDateFields(); } diff --git a/wizards/com/sun/star/wizards/query/Finalizer.java b/wizards/com/sun/star/wizards/query/Finalizer.java index ad11db4041d2..6caf2dfa60a2 100644 --- a/wizards/com/sun/star/wizards/query/Finalizer.java +++ b/wizards/com/sun/star/wizards/query/Finalizer.java @@ -164,8 +164,7 @@ public class Finalizer private String getTitle() { - final String sTitle = (String) Helper.getUnoPropertyValue(UnoDialog.getModel(m_aTxtTitle), "Text"); - return sTitle; + return (String) Helper.getUnoPropertyValue(UnoDialog.getModel(m_aTxtTitle), "Text"); } public String finish() diff --git a/wizards/com/sun/star/wizards/query/QuerySummary.java b/wizards/com/sun/star/wizards/query/QuerySummary.java index 76e670a848be..7a0ab0d06beb 100644 --- a/wizards/com/sun/star/wizards/query/QuerySummary.java +++ b/wizards/com/sun/star/wizards/query/QuerySummary.java @@ -122,8 +122,7 @@ public class QuerySummary extends QueryMetaData sconditions = appendClauseSeparator(sconditions, PropertyNames.SPACE + sOr + PropertyNames.SPACE, i, _filterconditions.length); } } - String sreturn = sStart + sconditions; - return sreturn; + return sStart + sconditions; } return oResource.getResText(_AlternativeResID); } diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java b/wizards/com/sun/star/wizards/query/QueryWizard.java index 9d1a454f9497..f4dd3296dbce 100644 --- a/wizards/com/sun/star/wizards/query/QueryWizard.java +++ b/wizards/com/sun/star/wizards/query/QueryWizard.java @@ -77,7 +77,6 @@ public class QueryWizard extends DatabaseObjectWizard private String reslblFields; private String reslblSelFields; private String reslblTables; - private String resQueryWizard; private String reslblGroupBy; private String resmsgNonNumericAsGroupBy; private String m_createdQuery; @@ -194,7 +193,7 @@ public class QueryWizard extends DatabaseObjectWizard reslblSelFields = m_oResource.getResText(UIConsts.RID_QUERY + 50); reslblTables = m_oResource.getResText(UIConsts.RID_QUERY + 3); reslblGroupBy = m_oResource.getResText(UIConsts.RID_QUERY + 18); - resQueryWizard = m_oResource.getResText(UIConsts.RID_QUERY + 2); + String resQueryWizard = m_oResource.getResText(UIConsts.RID_QUERY + 2); resmsgNonNumericAsGroupBy = m_oResource.getResText(UIConsts.RID_QUERY + 88); Helper.setUnoPropertyValues(xDialogModel, new String[] { @@ -249,7 +248,7 @@ public class QueryWizard extends DatabaseObjectWizard switch (CurItemID) { case SOAGGREGATE_PAGE: - if (_bEnabled == true) + if (_bEnabled) { bEnabled = ((m_DBMetaData.hasNumericalFields()) && (m_DBMetaData.xDBMetaData.supportsCoreSQLGrammar())); } @@ -259,7 +258,7 @@ public class QueryWizard extends DatabaseObjectWizard break; case SOGROUPFILTER_PAGE: bEnabled = false; - if (_bEnabled == true) + if (_bEnabled) { bEnabled = (m_DBMetaData.GroupByFilterConditions.length > 0); } diff --git a/wizards/com/sun/star/wizards/report/CallReportWizard.java b/wizards/com/sun/star/wizards/report/CallReportWizard.java index 31d4555757ee..8b10e96ac5a3 100644 --- a/wizards/com/sun/star/wizards/report/CallReportWizard.java +++ b/wizards/com/sun/star/wizards/report/CallReportWizard.java @@ -118,7 +118,7 @@ public class CallReportWizard { if (sEvent.compareTo(PropertyNames.START) == 0) { - if (bWizardstartedalready != true) + if (!bWizardstartedalready) { ReportWizard CurReportWizard = new ReportWizard( xmultiservicefactory, m_wizardContext ); CurReportWizard.startReportWizard(); diff --git a/wizards/com/sun/star/wizards/report/DBColumn.java b/wizards/com/sun/star/wizards/report/DBColumn.java index 556c1c1cdaee..25b6da4950c3 100644 --- a/wizards/com/sun/star/wizards/report/DBColumn.java +++ b/wizards/com/sun/star/wizards/report/DBColumn.java @@ -126,7 +126,7 @@ public class DBColumn try { XCell xCell = CurRecordTable.xCellRange.getCellByPosition(_nColumn, 0); - XTextRange xTextCell = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, xCell); + XTextRange xTextCell = UnoRuntime.queryInterface(XTextRange.class, xCell); String CompString = "Column"; XTextCursor xLocCellCursor = TextDocument.createTextCursor(xCell); if (isNameCell(xLocCellCursor, CurDBField.getFieldName(), CompString) || (_bforce)) @@ -134,7 +134,7 @@ public class DBColumn xNameCell = xCell; xNameTextCell = xTextCell; xValCell = CurRecordTable.xCellRange.getCellByPosition(_nColumn, 1); - xValTextCell = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, xValCell); + xValTextCell = UnoRuntime.queryInterface(XTextRange.class, xValCell); xValCellCursor = TextDocument.createTextCursor(xValCell); ValColumn = _nColumn; return true; @@ -190,7 +190,7 @@ public class DBColumn for (int m = 0; m < xRows.getCount(); m++) { xCell = xCellRange.getCellByPosition(n, m); - xTextCell = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, xCell); + xTextCell = UnoRuntime.queryInterface(XTextRange.class, xCell); String CompString = TableName.substring(4); XTextCursor xLocCellCursor = TextDocument.createTextCursor(xCell); if (isNameCell(xLocCellCursor, CurDBField.getFieldName(), CompString)) @@ -216,12 +216,12 @@ public class DBColumn try { XNameAccess xAllTextTables = oTextTableHandler.xTextTablesSupplier.getTextTables(); - if (xAllTextTables.hasByName(TableName) == true) + if (xAllTextTables.hasByName(TableName)) { Object oTextTable = xAllTextTables.getByName(TableName); - xCellRange = (XCellRange) UnoRuntime.queryInterface(XCellRange.class, oTextTable); - xTextTable = (XTextTable) UnoRuntime.queryInterface(XTextTable.class, oTextTable); - xTableName = (XNamed) UnoRuntime.queryInterface(XNamed.class, oTextTable); + xCellRange = UnoRuntime.queryInterface(XCellRange.class, oTextTable); + xTextTable = UnoRuntime.queryInterface(XTextTable.class, oTextTable); + xTableName = UnoRuntime.queryInterface(XNamed.class, oTextTable); xTableColumns = xTextTable.getColumns(); } } @@ -290,7 +290,7 @@ public class DBColumn try { xValCell = xCellRange.getCellByPosition(ValColumn, ValRow); - xValTextCell = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, xValCell); + xValTextCell = UnoRuntime.queryInterface(XTextRange.class, xValCell); modifyCellContent(CurGroupValue); if (bAlignLeft) { @@ -361,7 +361,7 @@ public class DBColumn try { Object CurGroupValue; - if (bIsGroupColumn == false && CurDBField.isNumberFormat() == false) + if (!bIsGroupColumn && !CurDBField.isNumberFormat()) { CurGroupValue = BlindtextCreator.adjustBlindTextlength(CurDBField.getFieldTitle(), CurDBField.getFieldWidth(), _bIsLandscape, bIsGroupColumn, CurDBMetaData.getRecordFieldNames()); } @@ -381,7 +381,7 @@ public class DBColumn { CharFontName = "StarSymbol"; Helper.setUnoPropertyValue(xValCellCursor, "CharFontName", CharFontName); - if (bIsGroupColumn == false) + if (!bIsGroupColumn) { Helper.setUnoPropertyValue(xValCellCursor, "ParaAdjust", new Integer(ParagraphAdjust.CENTER_value)); } @@ -390,7 +390,7 @@ public class DBColumn { if (PropertyState == com.sun.star.beans.PropertyState.DEFAULT_VALUE) { - XPropertyState xPropState = (XPropertyState) UnoRuntime.queryInterface(XPropertyState.class, xValCellCursor); + XPropertyState xPropState = UnoRuntime.queryInterface(XPropertyState.class, xValCellCursor); xPropState.setPropertyToDefault("CharFontName"); } else @@ -425,7 +425,7 @@ public class DBColumn } else { - xPropertyState = (XPropertyState) UnoRuntime.queryInterface(XPropertyState.class, xValCellCursor); + xPropertyState = UnoRuntime.queryInterface(XPropertyState.class, xValCellCursor); PropertyState = xPropertyState.getPropertyState("CharFontName"); CharFontName = AnyConverter.toString(Helper.getUnoPropertyValue(xValCellCursor, "CharFontName")); } @@ -449,7 +449,7 @@ public class DBColumn } else { - XDependentTextField xDependent = (XDependentTextField) UnoRuntime.queryInterface(XDependentTextField.class, oTextField); + XDependentTextField xDependent = UnoRuntime.queryInterface(XDependentTextField.class, oTextField); XPropertySet xMaster = xDependent.getTextFieldMaster(); String UserFieldName = (String) xMaster.getPropertyValue(PropertyNames.PROPERTY_NAME); boolean bIsNameCell = false; diff --git a/wizards/com/sun/star/wizards/report/Dataimport.java b/wizards/com/sun/star/wizards/report/Dataimport.java index a467b3dbbeab..5b80ec41e5b8 100644 --- a/wizards/com/sun/star/wizards/report/Dataimport.java +++ b/wizards/com/sun/star/wizards/report/Dataimport.java @@ -186,8 +186,7 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi calculateDialogPosition(CurReportDocument.getFrame().getComponentWindow().getPosSize()); xWindow.setVisible(true); super.xReschedule.reschedule(); - return; - } + } catch (Exception e) { Logger.getLogger(Dataimport.class.getName()).log(Level.SEVERE, null, e); diff --git a/wizards/com/sun/star/wizards/report/GroupFieldHandler.java b/wizards/com/sun/star/wizards/report/GroupFieldHandler.java index b18a99c35a5b..b123bb3b06fb 100644 --- a/wizards/com/sun/star/wizards/report/GroupFieldHandler.java +++ b/wizards/com/sun/star/wizards/report/GroupFieldHandler.java @@ -53,8 +53,8 @@ public class GroupFieldHandler extends FieldSelection this.oWizardDialog = _CurUnoDialog; this.CurReportDocument = _CurReportDocument; this.CurDBMetaData = CurReportDocument.getRecordParser(); - CurUnoDialog.setControlProperty("lstFields_2", "MultiSelection", new Boolean(false)); - CurUnoDialog.setControlProperty("lstSelFields_2", "MultiSelection", new Boolean(false)); + CurUnoDialog.setControlProperty("lstFields_2", "MultiSelection", Boolean.FALSE); + CurUnoDialog.setControlProperty("lstSelFields_2", "MultiSelection", Boolean.FALSE); addFieldSelectionListener(new FieldSelectionListener()); String sNote = ReportWizard.getBlindTextNote(_CurReportDocument, _CurUnoDialog.m_oResource); CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblBlindTextNote_1", @@ -64,7 +64,7 @@ public class GroupFieldHandler extends FieldSelection }, new Object[] { - new Boolean(false), 18, sNote, new Boolean(true), 95, 158, new Integer(ReportWizard.SOGROUPPAGE), 209 + Boolean.FALSE, 18, sNote, Boolean.TRUE, 95, 158, new Integer(ReportWizard.SOGROUPPAGE), 209 }); } catch (Exception exception) @@ -113,7 +113,7 @@ public class GroupFieldHandler extends FieldSelection { emptyFieldsListBoxes(); GroupFieldVector.removeAllElements(); - CurUnoDialog.setControlProperty("lblBlindTextNote_1", PropertyNames.PROPERTY_ENABLED, new Boolean(false)); + CurUnoDialog.setControlProperty("lblBlindTextNote_1", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); } public void getGroupFieldNames(CommandMetaData CurDBMetaData) @@ -162,7 +162,7 @@ public class GroupFieldHandler extends FieldSelection int iSelCount = xSelectedFieldsListBox.getItemCount(); String[] CurGroupNames = xFieldsListBox.getItems(); CurReportDocument.liveupdate_addGroupNametoDocument(CurGroupNames, CurGroupTitle, GroupFieldVector, CurReportDocument.getReportPath(), iSelCount); - CurUnoDialog.setControlProperty("lblBlindTextNote_1", PropertyNames.PROPERTY_ENABLED, new Boolean(true)); + CurUnoDialog.setControlProperty("lblBlindTextNote_1", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); if (iSelCount >= MAXSELFIELDS) { toggleMoveButtons(false, false); @@ -178,7 +178,7 @@ public class GroupFieldHandler extends FieldSelection String[] NewSelList = xSelectedFieldsListBox.getItems(); CurReportDocument.liveupdate_removeGroupName(NewSelList, OldGroupTitle, GroupFieldVector); String[] NewSelGroupNames = xSelectedFieldsListBox.getItems(); - CurUnoDialog.setControlProperty("lblBlindTextNote_1", PropertyNames.PROPERTY_ENABLED, new Boolean(NewSelGroupNames.length == 0)); + CurUnoDialog.setControlProperty("lblBlindTextNote_1", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(NewSelGroupNames.length == 0)); // CurReportDocument.refreshGroupFields(xSelectedFieldsListBox.getItems()); } diff --git a/wizards/com/sun/star/wizards/report/RecordTable.java b/wizards/com/sun/star/wizards/report/RecordTable.java index b4af7f7fa94b..86b365fbac80 100644 --- a/wizards/com/sun/star/wizards/report/RecordTable.java +++ b/wizards/com/sun/star/wizards/report/RecordTable.java @@ -69,21 +69,21 @@ public class RecordTable { oTable = xAllTextTables.getByName(ReportTextDocument.TBLRECORDSECTION); } - xTextTable = (XTextTable) UnoRuntime.queryInterface(XTextTable.class, oTable); - xTableName = (XNamed) UnoRuntime.queryInterface(XNamed.class, xTextTable); + xTextTable = UnoRuntime.queryInterface(XTextTable.class, oTable); + xTableName = UnoRuntime.queryInterface(XNamed.class, xTextTable); } else { - XIndexAccess xTableIndex = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xAllTextTables); + XIndexAccess xTableIndex = UnoRuntime.queryInterface(XIndexAccess.class, xAllTextTables); int n = xTableIndex.getCount() - 1; Object x = xTableIndex.getByIndex(n); - xTextTable = (XTextTable) UnoRuntime.queryInterface(XTextTable.class, x); - xTableName = (XNamed) UnoRuntime.queryInterface(XNamed.class, xTextTable); + xTextTable = UnoRuntime.queryInterface(XTextTable.class, x); + xTableName = UnoRuntime.queryInterface(XNamed.class, xTextTable); xTableName.setName(ReportTextDocument.TBLRECORDSECTION); } xTableRows = xTextTable.getRows(); xTableColumns = xTextTable.getColumns(); - xCellRange = (XCellRange) UnoRuntime.queryInterface(XCellRange.class, xTextTable); + xCellRange = UnoRuntime.queryInterface(XCellRange.class, xTextTable); } catch (Exception exception) { diff --git a/wizards/com/sun/star/wizards/report/ReportFinalizer.java b/wizards/com/sun/star/wizards/report/ReportFinalizer.java index 6fd22abd5093..5498eb89dd55 100644 --- a/wizards/com/sun/star/wizards/report/ReportFinalizer.java +++ b/wizards/com/sun/star/wizards/report/ReportFinalizer.java @@ -200,7 +200,7 @@ public class ReportFinalizer { String FirstCommandName = (_CurDBMetaData.getIncludedCommandNames())[0]; DefaultName = Desktop.getUniqueName(_CurDBMetaData.getReportDocuments(), FirstCommandName); - if (DefaultName.equals(OldDefaultName) == false) + if (!DefaultName.equals(OldDefaultName)) { OldDefaultName = DefaultName; } @@ -227,7 +227,7 @@ public class ReportFinalizer StoreName = getStoreName(); String StorePath; XInterface xInterface = (XInterface) m_xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); - XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface); + XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface); StorePath = FileAccess.getOfficePath(m_xMSF, "Temp", xSimpleFileAccess) + "/" + StoreName; return StorePath; } diff --git a/wizards/com/sun/star/wizards/report/ReportLayouter.java b/wizards/com/sun/star/wizards/report/ReportLayouter.java index dac1b5f98101..0ea91a2f2a30 100644 --- a/wizards/com/sun/star/wizards/report/ReportLayouter.java +++ b/wizards/com/sun/star/wizards/report/ReportLayouter.java @@ -195,7 +195,7 @@ public class ReportLayouter }, new Object[] { - new Short("0"), 23, 164, 158, new Boolean(false), new Integer(ReportWizard.SOTEMPLATEPAGE), 30 + new Short("0"), 23, 164, 158, Boolean.FALSE, new Integer(ReportWizard.SOTEMPLATEPAGE), 30 }); String sNote = ReportWizard.getBlindTextNote(CurReportDocument, CurUnoDialog.m_oResource); @@ -206,7 +206,7 @@ public class ReportLayouter }, new Object[] { - 34, sNote, new Boolean(true), 205, 148, new Integer(ReportWizard.SOTEMPLATEPAGE), 99 + 34, sNote, Boolean.TRUE, 205, 148, new Integer(ReportWizard.SOTEMPLATEPAGE), 99 }); if (m_nLandscapeState == 1) { @@ -246,7 +246,7 @@ public class ReportLayouter try { int iPos; - Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, new Boolean(false)); + Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); // LLA: should we lock controllers here? // CurReportDocument.getDoc().xTextDocument.lockControllers(); int iKey = CurUnoDialog.getControlKey(EventObject.Source, CurUnoDialog.ControlList); @@ -306,7 +306,7 @@ public class ReportLayouter e.printStackTrace(); } // CurReportDocument.getDoc().unlockallControllers(); - Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, new Boolean(true)); + Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); } public void disposing(EventObject eventObject) @@ -325,17 +325,17 @@ public class ReportLayouter { try { - Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, new Boolean(false)); + Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); // CurReportDocument.getDoc().xTextDocument.lockControllers(); boolean blandscape = (((Short) CurUnoDialog.getControlProperty("optLandscape", PropertyNames.PROPERTY_STATE)).shortValue() == 1); - CurReportDocument.setPageOrientation((blandscape == true) ? SOOPTLANDSCAPE : SOOPTPORTRAIT); + CurReportDocument.setPageOrientation((blandscape) ? SOOPTLANDSCAPE : SOOPTPORTRAIT); } catch (Exception exception) { exception.printStackTrace(System.out); } // CurReportDocument.getDoc().unlockallControllers(); - Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, new Boolean(true)); + Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); } } } diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java index c0babfab9769..79196826def1 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java +++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java @@ -153,8 +153,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen { oTextSection = xTextSections.getByName(RECORDSECTION); } - boolean bLayoutMode = AnyConverter.toBoolean(Helper.getUnoPropertyValue(oTextSection, ISVISIBLE)); - return bLayoutMode; + return AnyConverter.toBoolean(Helper.getUnoPropertyValue(oTextSection, ISVISIBLE)); } catch (Exception e) { @@ -205,7 +204,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen public void createReportForm(String SOREPORTFORMNAME) { com.sun.star.container.XNameContainer xNamedForm = oFormHandler.insertFormbyName(SOREPORTFORMNAME); - XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xNamedForm); + XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, xNamedForm); oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, PropertyNames.COMMAND_TYPE, Integer.toString(CurDBMetaData.getCommandType())); if (CurDBMetaData.getCommandType() == CommandType.QUERY) { @@ -317,16 +316,9 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen for (i = 0; i < GroupCount; i++) { CurDBColumn = new DBColumn(oTextTableHandler, CurDBMetaData, CurDBMetaData.GroupFieldNames[i], i, TBLGROUPSECTION + (i + 1)); - if (CurDBColumn == null) - { - return false; - } - else - { - CurDBColumn.formatValueCell(); - DBColumnsVector.set(i, CurDBColumn); - replaceFieldValueInGroupTable(CurDBColumn, i); - } + CurDBColumn.formatValueCell(); + DBColumnsVector.set(i, CurDBColumn); + replaceFieldValueInGroupTable(CurDBColumn, i); } return true; } @@ -499,16 +491,8 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen oTextSectionHandler.insertTextSection(GROUPSECTION + GroupCount, sPath, GroupCount == 1); CurDBColumn = new DBColumn(oTextTableHandler, CurDBMetaData, CurFieldColumn.getFieldName(), GroupCount - 1, TBLGROUPSECTION + (GroupCount)); CurDBColumn.formatValueCell(); - if (CurDBColumn != null) - { - DBColumnsVector.addElement(CurDBColumn); - replaceFieldValueInGroupTable(CurDBColumn, GroupCount - 1); - } - else - { - String sMessage = JavaTools.replaceSubString(sMsgTableNotExisting, TBLGROUPSECTION + (GroupCount), ""); - CurDBMetaData.showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, sMessage); - } + DBColumnsVector.addElement(CurDBColumn); + replaceFieldValueInGroupTable(CurDBColumn, GroupCount - 1); } catch (Exception exception) { @@ -583,43 +567,35 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen } CurDBColumn = new DBColumn(CurRecordTable, oTextTableHandler, CurDBMetaData, i - CurDBMetaData.GroupFieldNames.length); } - if (CurDBColumn != null) + if (CurDBColumn.xNameCell != null) { - if (CurDBColumn.xNameCell != null) + DBColumnsVector.addElement(CurDBColumn); + } + else + { + String DelFieldName; + if (i < CurDBMetaData.GroupFieldNames.length) { - DBColumnsVector.addElement(CurDBColumn); + DelFieldName = CurDBMetaData.GroupFieldNames[i]; + CurDBMetaData.GroupFieldNames = JavaTools.removefromList(CurDBMetaData.GroupFieldNames, new String[] + { + DelFieldName + }); + CurDBMetaData.GroupFieldColumns = removeFieldColumnByFieldName(DelFieldName, CurDBMetaData.GroupFieldColumns); } else { - String DelFieldName; - if (i < CurDBMetaData.GroupFieldNames.length) - { - DelFieldName = CurDBMetaData.GroupFieldNames[i]; - CurDBMetaData.GroupFieldNames = JavaTools.removefromList(CurDBMetaData.GroupFieldNames, new String[] - { - DelFieldName - }); - CurDBMetaData.GroupFieldColumns = removeFieldColumnByFieldName(DelFieldName, CurDBMetaData.GroupFieldColumns); - } - else - { - DelFieldName = CurDBMetaData.getRecordFieldName(i - CurDBMetaData.GroupFieldNames.length); - String[] aNewList = JavaTools.removefromList(CurDBMetaData.getRecordFieldNames(), new String[] - { - DelFieldName - }); - CurDBMetaData.setRecordFieldNames(aNewList); - CurDBMetaData.RecordFieldColumns = removeFieldColumnByFieldName(DelFieldName, CurDBMetaData.RecordFieldColumns); - CurDBMetaData.FieldColumns = removeFieldColumnByFieldName(DelFieldName, CurDBMetaData.FieldColumns); + DelFieldName = CurDBMetaData.getRecordFieldName(i - CurDBMetaData.GroupFieldNames.length); + String[] aNewList = JavaTools.removefromList(CurDBMetaData.getRecordFieldNames(), new String[] + { + DelFieldName + }); + CurDBMetaData.setRecordFieldNames(aNewList); + CurDBMetaData.RecordFieldColumns = removeFieldColumnByFieldName(DelFieldName, CurDBMetaData.RecordFieldColumns); + CurDBMetaData.FieldColumns = removeFieldColumnByFieldName(DelFieldName, CurDBMetaData.FieldColumns); - } - i--; } - } - else - { - String sMessage = JavaTools.replaceSubString(sMsgTableNotExisting, TBLGROUPSECTION + (CurDBMetaData.GroupFieldNames.length), ""); - CurDBMetaData.showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, sMessage); + i--; } } java.util.Arrays.sort(CurDBMetaData.RecordFieldColumns, this); @@ -696,7 +672,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen { sInvisibleSectionNames[i] = GROUPSECTION + i; } - XNameAccess xNameAccessTextSections = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oTextSectionHandler.xTextSectionsSupplier.getTextSections()); + XNameAccess xNameAccessTextSections = UnoRuntime.queryInterface(XNameAccess.class, oTextSectionHandler.xTextSectionsSupplier.getTextSections()); String[] sSectionNames = xNameAccessTextSections.getElementNames(); for (int i = 0; i < sSectionNames.length; i++) { @@ -723,7 +699,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen public void removeNonLayoutTextTables() { String[] sLayoutTableNames = getLayoutTextTableNames(); - XNameAccess xNameAccessTextTables = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oTextTableHandler.xTextTablesSupplier.getTextTables()); + XNameAccess xNameAccessTextTables = UnoRuntime.queryInterface(XNameAccess.class, oTextTableHandler.xTextTablesSupplier.getTextTables()); String[] sTableNames = xNameAccessTextTables.getElementNames(); for (int i = 0; i < sTableNames.length; i++) { @@ -738,8 +714,8 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen public void removeLayoutTextTables() { String[] sLayoutTableNames = getLayoutTextTableNames(); - XNameAccess xNameAccessTextTables = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oTextTableHandler.xTextTablesSupplier.getTextTables()); - XRelativeTextContentRemove xRelativeTextContentRemove = (XRelativeTextContentRemove) UnoRuntime.queryInterface(XRelativeTextContentRemove.class, xText); + XNameAccess xNameAccessTextTables = UnoRuntime.queryInterface(XNameAccess.class, oTextTableHandler.xTextTablesSupplier.getTextTables()); + XRelativeTextContentRemove xRelativeTextContentRemove = UnoRuntime.queryInterface(XRelativeTextContentRemove.class, xText); String[] sTableNames = xNameAccessTextTables.getElementNames(); for (int i = 0; i < sTableNames.length; i++) { @@ -748,7 +724,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen { if (!sTableName.equals(sLayoutTableNames[0])) { - XTextContent xTextContent = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, oTextTableHandler.getByName(sTableName)); + XTextContent xTextContent = UnoRuntime.queryInterface(XTextContent.class, oTextTableHandler.getByName(sTableName)); boolean bleaveloop = false; while (!bleaveloop) { diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java index 039ae870359a..6a79d0f37d84 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java +++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java @@ -189,8 +189,8 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme Helper.setUnoPropertyValue(xTextSection, "LinkRegion", sLinkRegion); if (CurDBColumn != null) { - boolean bIsGroupTable = (sLinkRegion.equals(ReportTextDocument.RECORDSECTION) != true); - if (bIsGroupTable == true) + boolean bIsGroupTable = (!sLinkRegion.equals(ReportTextDocument.RECORDSECTION)); + if (bIsGroupTable) { XTextTable xTextTable = getDoc().oTextTableHandler.getlastTextTable(); XCellRange xCellRange = UnoRuntime.queryInterface( XCellRange.class, xTextTable ); @@ -347,7 +347,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme XTextCursor xTextCursor = ReportTextDocument.createTextCursor(getDoc().xTextDocument.getText()); xTextDocument.lockControllers(); - if (getRecordParser().ResultSet.next() == true) + if (getRecordParser().ResultSet.next()) { replaceUserFields(); Helper.setUnoPropertyValue(xTextCursor, "PageDescName", "First Page"); @@ -361,18 +361,18 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme CurDBColumn = (DBColumn) getDoc().DBColumnsVector.elementAt(ColIndex); addLinkedTextSection(xTextCursor, ReportTextDocument.GROUPSECTION + Integer.toString(ColIndex + 1), CurDBColumn, CurGroupValue); //COPYOF!!!! } - if (getRecordParser().getcurrentRecordData(DataVector) == true) + if (getRecordParser().getcurrentRecordData(DataVector)) { // int RowIndex = 1; m_bStopProcess = false; - while ((getRecordParser().ResultSet.next() == true) && (m_bStopProcess == false)) + while ((getRecordParser().ResultSet.next()) && (!m_bStopProcess)) { // RowIndex += 1; breset = false; for (ColIndex = 0; ColIndex < GroupFieldCount; ColIndex++) { CurGroupValue = getRecordParser().getGroupColumnValue(ColIndex); - if ((CurGroupValue.equals(OldGroupFieldValues[ColIndex]) == false) || (breset)) + if ((!CurGroupValue.equals(OldGroupFieldValues[ColIndex])) || (breset)) { breset = true; insertDataToRecordTable(xTextCursor, DataVector, RecordFieldCount); diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java b/wizards/com/sun/star/wizards/report/ReportWizard.java index 597893986282..000f093b54d5 100644 --- a/wizards/com/sun/star/wizards/report/ReportWizard.java +++ b/wizards/com/sun/star/wizards/report/ReportWizard.java @@ -103,7 +103,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, { super(i_serviceFactory, 34320, i_wizardContext); super.addResourceHandler("Report Wizard", "dbw"); - if (getReportResources(false) == true) + if (getReportResources(false)) { Helper.setUnoPropertyValues(xDialogModel, new String[] @@ -245,7 +245,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, private void dialogFinish() { this.xComponent.dispose(); - if (bCloseDocument == true) + if (bCloseDocument) { m_reportDocument.dispose(); return; @@ -406,12 +406,8 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, { return false; } - if (e.hasMoreElements()) - { - return true; + return e.hasMoreElements(); } - return false; - } /** * Return the path to the "com.sun.reportdesigner" extension @@ -424,8 +420,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, final XComponentContext xComponentContext = Helper.getComponentContext(_xMSF); final Object aSingleton = xComponentContext.getValueByName("/singletons/com.sun.star.deployment.PackageInformationProvider"); XPackageInformationProvider xProvider = UnoRuntime.queryInterface(XPackageInformationProvider.class, aSingleton); - final String sLocation = xProvider.getPackageLocation("com.sun.reportdesigner"); - return sLocation; + return xProvider.getPackageLocation("com.sun.reportdesigner"); } private static XLogger m_xLogger; @@ -471,10 +466,8 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, { XMultiServiceFactory.class }); - m_reportDocument = (IReportDocument) aMethod.invoke(a, new Object[] - { - xMSF - }); + m_reportDocument = (IReportDocument) aMethod.invoke(a, xMSF + ); } catch (Exception e) { @@ -577,7 +570,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, public boolean getReportResources(boolean bgetProgressResourcesOnly) { sMsgWizardName = super.m_oResource.getResText(UIConsts.RID_REPORT); - if (bgetProgressResourcesOnly == false) + if (!bgetProgressResourcesOnly) { sShowBinaryFields = m_oResource.getResText(UIConsts.RID_REPORT + 60); slblTables = m_oResource.getResText(UIConsts.RID_FORM + 6); @@ -627,7 +620,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, bEnabled = true; } - Helper.setUnoPropertyValue(oRoadmapItem, PropertyNames.PROPERTY_ENABLED, new Boolean(bEnabled)); + Helper.setUnoPropertyValue(oRoadmapItem, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bEnabled)); } } catch (com.sun.star.uno.Exception exception) @@ -639,8 +632,8 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, private void enableWizardSteps(String[] NewItems) { boolean bEnabled = NewItems.length > 0; - setControlProperty("btnWizardNext", PropertyNames.PROPERTY_ENABLED, new Boolean(bEnabled)); - setControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED, new Boolean(bEnabled)); + setControlProperty("btnWizardNext", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bEnabled)); + setControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bEnabled)); enableRoadmapItems(bEnabled); // Note: Performancewise this could be improved } diff --git a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java index 0e9945912425..0b55936da3fb 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java +++ b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java @@ -107,8 +107,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper public XWindowPeer getWizardParent() { - final XWindowPeer aWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, getFrame().getComponentWindow()); - return aWindowPeer; + return UnoRuntime.queryInterface(XWindowPeer.class, getFrame().getComponentWindow()); } private XFrame m_xFrame = null; // private ReportBuilderLayouter m_aReportBuilderLayouter = null; @@ -121,8 +120,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper */ private IReportBuilderLayouter getReportBuilderLayouter() { - final IReportBuilderLayouter aReportBuilderLayouter = (IReportBuilderLayouter) getLayoutMap().get(m_sReportBuilderLayoutName); - return aReportBuilderLayouter; + return (IReportBuilderLayouter) getLayoutMap().get(m_sReportBuilderLayoutName); } private Object m_aReportDocument; private XPropertySet m_documentDefinition; @@ -168,8 +166,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper private XModeSelector getModeSelector() { final XController xController = getReportDefinition().getCurrentController(); - final XModeSelector xModeSelector = UnoRuntime.queryInterface(XModeSelector.class, xController); - return xModeSelector; + return UnoRuntime.queryInterface(XModeSelector.class, xController); } private void switchOffAddFieldWindow() @@ -586,8 +583,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper Object[] aParams = new Object[2]; aParams[0] = this; aParams[1] = m_resource; - final IReportBuilderLayouter aReportBuilderLayouter = (IReportBuilderLayouter) cTor.newInstance(aParams); - return aReportBuilderLayouter; + return (IReportBuilderLayouter) cTor.newInstance(aParams); } catch (Exception e) { diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarSingleColumn.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarSingleColumn.java index 9094807570ad..02ad2438bb59 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarSingleColumn.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarSingleColumn.java @@ -53,8 +53,7 @@ public class ColumnarSingleColumn extends ReportBuilderLayouter public String getLocalizedName() { - final String sLocalizedName = getResource().getResText(UIConsts.RID_REPORT + 81); - return sLocalizedName; + return getResource().getResText(UIConsts.RID_REPORT + 81); } protected void insertDetailFields() diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarThreeColumns.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarThreeColumns.java index 2dc468fb09e7..51c14c42a536 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarThreeColumns.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarThreeColumns.java @@ -51,8 +51,7 @@ public class ColumnarThreeColumns extends ColumnarTwoColumns public String getLocalizedName() { - final String sLocalizedName = getResource().getResText(UIConsts.RID_REPORT + 83); - return sLocalizedName; + return getResource().getResText(UIConsts.RID_REPORT + 83); } protected void insertDetailFields() diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarTwoColumns.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarTwoColumns.java index 023d447a939f..9dd9bb78201c 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarTwoColumns.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarTwoColumns.java @@ -53,8 +53,7 @@ public class ColumnarTwoColumns extends ReportBuilderLayouter public String getLocalizedName() { - final String sLocalizedName = getResource().getResText(UIConsts.RID_REPORT + 82); - return sLocalizedName; + return getResource().getResText(UIConsts.RID_REPORT + 82); } protected void insertDetailFields() diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java b/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java index f2bdbcd6e428..12999090e646 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java @@ -181,7 +181,7 @@ public class DesignTemplate // is aObj a textfield // m_aDetailLabel_FD // m_aDetailTextField_FD - XFixedText aFixedText = (XFixedText) UnoRuntime.queryInterface(XFixedText.class, aObj); + XFixedText aFixedText = UnoRuntime.queryInterface(XFixedText.class, aObj); if (aFixedText != null && m_aDetailLabel == null) { @@ -189,7 +189,7 @@ public class DesignTemplate } else { - XFormattedField aFormattedField = (XFormattedField) UnoRuntime.queryInterface(XFormattedField.class, aObj); + XFormattedField aFormattedField = UnoRuntime.queryInterface(XFormattedField.class, aObj); if (aFormattedField != null && m_aDetailTextField == null) { @@ -218,7 +218,7 @@ public class DesignTemplate try { Object aGroup = xGroups.getByIndex(nGroup); - XGroup xGroup = (XGroup) UnoRuntime.queryInterface(XGroup.class, aGroup); + XGroup xGroup = UnoRuntime.queryInterface(XGroup.class, aGroup); XSection xGroupSection = xGroup.getHeader(); final int nCount = xGroupSection.getCount(); @@ -227,7 +227,7 @@ public class DesignTemplate try { Object aObj = xGroupSection.getByIndex(i); - XFixedText aFixedText = (XFixedText) UnoRuntime.queryInterface(XFixedText.class, aObj); + XFixedText aFixedText = UnoRuntime.queryInterface(XFixedText.class, aObj); // is aObj a label // is aObj a textfield if (aFixedText != null && @@ -237,7 +237,7 @@ public class DesignTemplate } else { - XFormattedField aFormattedField = (XFormattedField) UnoRuntime.queryInterface(XFormattedField.class, aObj); + XFormattedField aFormattedField = UnoRuntime.queryInterface(XFormattedField.class, aObj); if (aFormattedField != null && m_aGroupTextField[nGroup] == null) { @@ -317,7 +317,7 @@ public class DesignTemplate m_xGlobalMSF = _xMSF; m_sFilename = _sPath; final Object aObj = _xMSF.createInstance("com.sun.star.report.ReportDefinition"); - m_xReportDefinition = (XReportDefinition) UnoRuntime.queryInterface(XReportDefinition.class, aObj); + m_xReportDefinition = UnoRuntime.queryInterface(XReportDefinition.class, aObj); PropertyValue[] aLoadProps = new PropertyValue[2]; aLoadProps[0] = Properties.createProperty(PropertyNames.URL, _sPath); diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java b/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java index f1c02112414a..3fa72ca047b2 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java @@ -54,8 +54,7 @@ public class InBlocksLabelsAbove extends ColumnarTwoColumns public String getLocalizedName() { - final String sLocalizedName = getResource().getResText(UIConsts.RID_REPORT + 85); - return sLocalizedName; + return getResource().getResText(UIConsts.RID_REPORT + 85); } protected void insertDetailFields() diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsLeft.java b/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsLeft.java index b8ac18db61a4..34c2f9c10280 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsLeft.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsLeft.java @@ -54,8 +54,7 @@ public class InBlocksLabelsLeft extends ColumnarTwoColumns public String getLocalizedName() { - final String sLocalizedName = getResource().getResText(UIConsts.RID_REPORT + 84); - return sLocalizedName; + return getResource().getResText(UIConsts.RID_REPORT + 84); } protected void insertDetailFields() diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java index e236405448f2..8d27f9e6507b 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java @@ -1,5 +1,4 @@ -/* - ************************************************************************ +/************************************************************************ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -210,7 +209,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter try { final Object aObj = _xSectionToClear.getByIndex(0); - final XShape aShape = (XShape) UnoRuntime.queryInterface(XShape.class, aObj); + final XShape aShape = UnoRuntime.queryInterface(XShape.class, aObj); _xSectionToClear.remove(aShape); } catch (com.sun.star.uno.Exception ex) @@ -295,7 +294,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter // get all Page Styles final Object aPageStylesObj = xNameAccess.getByName(_sStyleName); - final XNameAccess xContainer = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, aPageStylesObj); + final XNameAccess xContainer = UnoRuntime.queryInterface(XNameAccess.class, aPageStylesObj); // step over all Page Styles, search the one which is in use final String[] aElementNames = xContainer.getElementNames(); @@ -303,7 +302,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter { final String sName = aElementNames[i]; final Object aObj = xContainer.getByName(sName); - final XStyle xStyle = (XStyle) UnoRuntime.queryInterface(XStyle.class, aObj); + final XStyle xStyle = UnoRuntime.queryInterface(XStyle.class, aObj); if (xStyle.isInUse()) { aUsedStyle = xStyle; @@ -386,7 +385,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter { final XGroups xGroups = getReportDefinition().getGroups(); Object aGroup = xGroups.getByIndex(_nGroup); - XGroup xGroup = (XGroup) UnoRuntime.queryInterface(XGroup.class, aGroup); + XGroup xGroup = UnoRuntime.queryInterface(XGroup.class, aGroup); XSection xGroupSection = xGroup.getHeader(); // copy Properties @@ -560,7 +559,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter for (int i = 0; i < _aList.length; i++) { final String sField = _aList[i]; - if (listContains(m_aGroupNames, sField) == true) + if (listContains(m_aGroupNames, sField)) { continue; } @@ -662,7 +661,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter try { final Object aFixedText = getMSFofReportDefinition().createInstance("com.sun.star.report.FixedText"); - final XFixedText xFixedText = (XFixedText) UnoRuntime.queryInterface(XFixedText.class, aFixedText); + final XFixedText xFixedText = UnoRuntime.queryInterface(XFixedText.class, aFixedText); int nHeight = LayoutConstants.LabelHeight; // default height of label is fixed. @@ -722,8 +721,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter if (_sName.startsWith("field:[")) { int nCloseBrace = _sName.lastIndexOf("]"); - final String sName = _sName.substring(7, nCloseBrace).trim(); - return sName; + return _sName.substring(7, nCloseBrace).trim(); } return _sName; } @@ -775,7 +773,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } _aRect.Height = nHeight; - final XReportControlModel xReportControlModel = (XReportControlModel) UnoRuntime.queryInterface(XReportControlModel.class, aField); + final XReportControlModel xReportControlModel = UnoRuntime.queryInterface(XReportControlModel.class, aField); if (xReportControlModel != null) { // #i86907# not documented right in idl description. @@ -802,7 +800,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter || nType == DataType.LONGVARBINARY) { // aField = getMSFofReportDefinition().createInstance("com.sun.star.report.ImageControl"); - final XImageControl xImageControl = (XImageControl) UnoRuntime.queryInterface(XImageControl.class, xReportControlModel); + final XImageControl xImageControl = UnoRuntime.queryInterface(XImageControl.class, xReportControlModel); if (xImageControl != null) { // xImageControl.setScaleImage(true); @@ -828,11 +826,11 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter // spezial case rpt:now() (default date format) if (_sFormattedfield.equals("rpt:now()")) { - final XFormattedField xFormattedField = (XFormattedField) UnoRuntime.queryInterface(XFormattedField.class, xReportControlModel); + final XFormattedField xFormattedField = UnoRuntime.queryInterface(XFormattedField.class, xReportControlModel); XNumberFormatsSupplier x = xFormattedField.getFormatsSupplier(); XNumberFormats xFormats = x.getNumberFormats(); - XNumberFormatTypes x3 = (XNumberFormatTypes) UnoRuntime.queryInterface(XNumberFormatTypes.class, xFormats); + XNumberFormatTypes x3 = UnoRuntime.queryInterface(XNumberFormatTypes.class, xFormats); Locale.getDefault(); com.sun.star.lang.Locale aLocale = new com.sun.star.lang.Locale(); aLocale.Country = Locale.getDefault().getCountry(); @@ -869,8 +867,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter { if (m_xMSF == null) { - final XMultiServiceFactory xMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, getReportDefinition()); - m_xMSF = xMSF; + m_xMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, getReportDefinition()); } return m_xMSF; } @@ -893,7 +890,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter try { final Object aFixedLine = getMSFofReportDefinition().createInstance("com.sun.star.report.FixedLine"); - final XFixedLine xFixedLine = (XFixedLine) UnoRuntime.queryInterface(XFixedLine.class, aFixedLine); + final XFixedLine xFixedLine = UnoRuntime.queryInterface(XFixedLine.class, aFixedLine); xFixedLine.setOrientation(_nOrientation); // TODO: line width is fixed @@ -1135,7 +1132,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter // XControlContainer xControlContainer = (XControlContainer)UnoRuntime.queryInterface(XControlContainer.class, aControlContainer); final Object aFixedTextModel = getGlobalMSF().createInstance("com.sun.star.awt.UnoControlFixedTextModel"); - final XControlModel xFixedTextModel = (XControlModel) UnoRuntime.queryInterface(XControlModel.class, aFixedTextModel); + final XControlModel xFixedTextModel = UnoRuntime.queryInterface(XControlModel.class, aFixedTextModel); final PropertySetHelper aPropertySetHelper = new PropertySetHelper(xFixedTextModel); // aPropertySetHelper.showProperties(); @@ -1145,34 +1142,34 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter // XServiceInfo xServiceInfo2 = (XServiceInfo)UnoRuntime.queryInterface(XServiceInfo.class, aUnoCtrlFixedText); // String[] sServices2 = xServiceInfo2.getSupportedServiceNames(); - final XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, aUnoCtrlFixedText); + final XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, aUnoCtrlFixedText); xWindow.setVisible(false); - final XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, aUnoCtrlFixedText); + final XControl xControl = UnoRuntime.queryInterface(XControl.class, aUnoCtrlFixedText); xControl.setModel(xFixedTextModel); - final com.sun.star.awt.XFixedText xFixedText = (com.sun.star.awt.XFixedText) UnoRuntime.queryInterface(com.sun.star.awt.XFixedText.class, aUnoCtrlFixedText); + final com.sun.star.awt.XFixedText xFixedText = UnoRuntime.queryInterface(com.sun.star.awt.XFixedText.class, aUnoCtrlFixedText); xFixedText.setText(_sText); - final XLayoutConstrains xLayoutConstraints = (XLayoutConstrains) UnoRuntime.queryInterface(XLayoutConstrains.class, aUnoCtrlFixedText); + final XLayoutConstrains xLayoutConstraints = UnoRuntime.queryInterface(XLayoutConstrains.class, aUnoCtrlFixedText); final Size aSizeInPixel = xLayoutConstraints.getPreferredSize(); - final XWindowPeer xPeerOfReportDefinition = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, getReportDefinition().getCurrentController().getFrame().getComponentWindow()); + final XWindowPeer xPeerOfReportDefinition = UnoRuntime.queryInterface(XWindowPeer.class, getReportDefinition().getCurrentController().getFrame().getComponentWindow()); xControl.createPeer(null, xPeerOfReportDefinition); final XWindowPeer x = xControl.getPeer(); - final XUnitConversion xConversion = (XUnitConversion) UnoRuntime.queryInterface(XUnitConversion.class, x); + final XUnitConversion xConversion = UnoRuntime.queryInterface(XUnitConversion.class, x); aSizeMM_100TH = xConversion.convertSizeToLogic(aSizeInPixel, com.sun.star.util.MeasureUnit.MM_100TH); // xToolkit.createScreenCompatibleDevice(_nWidth, _nWidth). // XWindow x = getReportDefinition().getCurrentController().getFrame().getContainerWindow(); // Object aObj = _xSection.getParent(); // we don't need the created objects any longer - final XComponent xFixedTextDeleter = (XComponent) UnoRuntime.queryInterface(XComponent.class, xFixedText); + final XComponent xFixedTextDeleter = UnoRuntime.queryInterface(XComponent.class, xFixedText); xFixedTextDeleter.dispose(); - final XComponent xFixedTextModelDeleter = (XComponent) UnoRuntime.queryInterface(XComponent.class, aFixedTextModel); + final XComponent xFixedTextModelDeleter = UnoRuntime.queryInterface(XComponent.class, aFixedTextModel); xFixedTextModelDeleter.dispose(); } catch (Exception e) @@ -1215,8 +1212,8 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter */ private void copyProperties(Object _aFrom, Object _aTo) { - XPropertySet xFrom = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, _aFrom); - XPropertySet xTo = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, _aTo); + XPropertySet xFrom = UnoRuntime.queryInterface(XPropertySet.class, _aFrom); + XPropertySet xTo = UnoRuntime.queryInterface(XPropertySet.class, _aTo); XPropertySetInfo xForeignPropInfo = xFrom.getPropertySetInfo(); @@ -1258,7 +1255,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter while (xEnum.hasMoreElements()) { Object aEnumObj = xEnum.nextElement(); - XReportComponent aComponent = (XReportComponent) UnoRuntime.queryInterface(XReportComponent.class, aEnumObj); + XReportComponent aComponent = UnoRuntime.queryInterface(XReportComponent.class, aEnumObj); // XCloneable aClone = (XCloneable)UnoRuntime.queryInterface(XCloneable.class, aEnumObj); if (aComponent != null) @@ -1266,7 +1263,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter Object aClone = aComponent.createClone(); if (aClone != null) { - XShape aShape = (XShape) UnoRuntime.queryInterface(XShape.class, aClone); + XShape aShape = UnoRuntime.queryInterface(XShape.class, aClone); // normally 'createClone' will create a real clone of the component, // but there seems some problems, we have to controll. @@ -1311,8 +1308,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter { Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e); } - return; - } + } else { // we won't a page header @@ -1469,10 +1465,9 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter aRect.Y += nLineHeight; aRect.Y += LayoutConstants.LabelHeight; - final int nWidth = nUsablePageWidth; aRect.X = getLeftPageIndent(); - aRect = insertFormattedField(xSection, "rpt:" + sNoFirstUnusedQuotes, aRect, nWidth, null, (short) com.sun.star.awt.TextAlign.CENTER); + aRect = insertFormattedField(xSection, "rpt:" + sNoFirstUnusedQuotes, aRect, nUsablePageWidth, null, (short) com.sun.star.awt.TextAlign.CENTER); aRect.Y += LayoutConstants.FormattedFieldHeight + LayoutConstants.LineHeight; xSection.setHeight(aRect.Y); @@ -1598,7 +1593,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter if (m_aFixedTextHelper == null) { final Object aFixedText = getMSFofReportDefinition().createInstance("com.sun.star.report.FixedText"); - m_aFixedTextHelper = (XFixedText) UnoRuntime.queryInterface(XFixedText.class, aFixedText); + m_aFixedTextHelper = UnoRuntime.queryInterface(XFixedText.class, aFixedText); } m_aFixedTextHelper.setLabel(_sLabel); diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionEmptyObject.java b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionEmptyObject.java index 8df754795e63..6830d56b5107 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionEmptyObject.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionEmptyObject.java @@ -44,8 +44,7 @@ public class SectionEmptyObject extends SectionObject public static SectionObject create() { - SectionEmptyObject a = new SectionEmptyObject(); - return a; + return new SectionEmptyObject(); } public FontDescriptor getFontDescriptor() diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java index ae3766fd3391..9780a1350681 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java @@ -48,8 +48,7 @@ public class SectionLabel extends SectionObject public static SectionObject create(XFixedText _aFixedText) { - final SectionLabel a = new SectionLabel(_aFixedText); - return a; + return new SectionLabel(_aFixedText); } /** diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionTextField.java b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionTextField.java index 2a11fcd56f04..fc17ba0ab5aa 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionTextField.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionTextField.java @@ -46,8 +46,7 @@ public class SectionTextField extends SectionObject public static SectionObject create(XFormattedField _aFormattedField) { - SectionTextField a = new SectionTextField(_aFormattedField); - return a; + return new SectionTextField(_aFormattedField); } public FontDescriptor getFontDescriptor() diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/Tabular.java b/wizards/com/sun/star/wizards/reportbuilder/layout/Tabular.java index 51edc3e3ac13..c2d85fb58e61 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/Tabular.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/Tabular.java @@ -55,8 +55,7 @@ public class Tabular extends ReportBuilderLayouter public String getLocalizedName() { - String sLocalizedName = getResource().getResText(UIConsts.RID_REPORT + 80); - return sLocalizedName; + return getResource().getResText(UIConsts.RID_REPORT + 80); } protected void insertDetailFields() diff --git a/wizards/com/sun/star/wizards/table/CGCategory.java b/wizards/com/sun/star/wizards/table/CGCategory.java index ea74b33f09ad..228891c12927 100644 --- a/wizards/com/sun/star/wizards/table/CGCategory.java +++ b/wizards/com/sun/star/wizards/table/CGCategory.java @@ -75,9 +75,8 @@ public class CGCategory { try { - xNameAccessTablesNode = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xNameAccessCurBusinessNode.getByName("Tables")); - String[] sTableNames = Configuration.getNodeDisplayNames(xNameAccessTablesNode); - return sTableNames; + xNameAccessTablesNode = UnoRuntime.queryInterface(XNameAccess.class, xNameAccessCurBusinessNode.getByName("Tables")); + return Configuration.getNodeDisplayNames(xNameAccessTablesNode); } catch (Exception e) { diff --git a/wizards/com/sun/star/wizards/table/CallTableWizard.java b/wizards/com/sun/star/wizards/table/CallTableWizard.java index 21174d59ff74..e3c5c690fad3 100644 --- a/wizards/com/sun/star/wizards/table/CallTableWizard.java +++ b/wizards/com/sun/star/wizards/table/CallTableWizard.java @@ -167,7 +167,7 @@ public class CallTableWizard try { - byteReturn = new String(PropertyNames.EMPTY_STRING + this.hashCode()).getBytes(); + byteReturn = (PropertyNames.EMPTY_STRING + this.hashCode()).getBytes(); } catch (Exception exception) { diff --git a/wizards/com/sun/star/wizards/table/FieldDescription.java b/wizards/com/sun/star/wizards/table/FieldDescription.java index 70fa37f18a2f..95e556f920b7 100644 --- a/wizards/com/sun/star/wizards/table/FieldDescription.java +++ b/wizards/com/sun/star/wizards/table/FieldDescription.java @@ -132,7 +132,7 @@ public class FieldDescription { try { - xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, _xNameAccessFieldNode); + xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, _xNameAccessFieldNode); // Integer Index = (Integer) xPropertySet.getPropertyValue("Index"); if (propertyexists(PropertyNames.PROPERTY_NAME)) { @@ -140,21 +140,21 @@ public class FieldDescription } if (propertyexists("Type")) { - aPropertyValues.addElement(Properties.createProperty("Type", (Integer) xPropertySet.getPropertyValue("Type"))); + aPropertyValues.addElement(Properties.createProperty("Type", xPropertySet.getPropertyValue("Type"))); } if (propertyexists("Scale")) { - aPropertyValues.addElement(Properties.createProperty("Scale", (Integer) xPropertySet.getPropertyValue("Scale"))); + aPropertyValues.addElement(Properties.createProperty("Scale", xPropertySet.getPropertyValue("Scale"))); // Scale = } if (propertyexists("Precision")) { - aPropertyValues.addElement(Properties.createProperty("Precision", (Integer) xPropertySet.getPropertyValue("Precision"))); + aPropertyValues.addElement(Properties.createProperty("Precision", xPropertySet.getPropertyValue("Precision"))); // Precision = (Integer) xPropertySet.getPropertyValue("Precision"); } if (propertyexists("DefaultValue")) { - aPropertyValues.addElement(Properties.createProperty("DefaultValue", (Boolean) xPropertySet.getPropertyValue("DefaultValue")));// DefaultValue = (Boolean) xPropertySet.getPropertyValue("DefaultValue"); + aPropertyValues.addElement(Properties.createProperty("DefaultValue", xPropertySet.getPropertyValue("DefaultValue")));// DefaultValue = (Boolean) xPropertySet.getPropertyValue("DefaultValue"); //Type = 4; // TODO wo ist der Fehler?(Integer) xPropertySet.getPropertyValue("Type"); } } diff --git a/wizards/com/sun/star/wizards/table/FieldFormatter.java b/wizards/com/sun/star/wizards/table/FieldFormatter.java index dbf2aeb730b7..d19a6e0eb21d 100644 --- a/wizards/com/sun/star/wizards/table/FieldFormatter.java +++ b/wizards/com/sun/star/wizards/table/FieldFormatter.java @@ -233,9 +233,9 @@ public class FieldFormatter implements XItemListener benableShiftUpButton = (iselpos != 0); benableShiftDownButton = (iselpos != ilistcount - 1); } - Helper.setUnoPropertyValue(UnoDialog.getModel(btnShiftUp), PropertyNames.PROPERTY_ENABLED, new Boolean(benableShiftUpButton)); - Helper.setUnoPropertyValue(UnoDialog.getModel(btnShiftDown), PropertyNames.PROPERTY_ENABLED, new Boolean(benableShiftDownButton)); - Helper.setUnoPropertyValue(UnoDialog.getModel(btnminus), PropertyNames.PROPERTY_ENABLED, new Boolean(blistispopulated)); + Helper.setUnoPropertyValue(UnoDialog.getModel(btnShiftUp), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(benableShiftUpButton)); + Helper.setUnoPropertyValue(UnoDialog.getModel(btnShiftDown), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(benableShiftDownButton)); + Helper.setUnoPropertyValue(UnoDialog.getModel(btnminus), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(blistispopulated)); CurUnoDialog.setcompleted(TableWizard.SOFIELDSFORMATPAGE, blistispopulated); } @@ -298,10 +298,10 @@ public class FieldFormatter implements XItemListener else { Helper.setUnoPropertyValue(UnoDialog.getModel(txtfieldname), "Text", PropertyNames.EMPTY_STRING); - Helper.setUnoPropertyValue(UnoDialog.getModel(btnminus), PropertyNames.PROPERTY_ENABLED, new Boolean(benable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(btnminus), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(benable)); CurUnoDialog.setcompleted(TableWizard.SOFIELDSFORMATPAGE, benable); } - Helper.setUnoPropertyValue(UnoDialog.getModel(btnminus), PropertyNames.PROPERTY_ENABLED, new Boolean(benable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(btnminus), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(benable)); CurUnoDialog.setControlVisible("oColumnDescriptor", benable); CurUnoDialog.repaintDialogStep(); } @@ -379,7 +379,7 @@ public class FieldFormatter implements XItemListener public boolean updateColumnofColumnDescriptor() { Object oColumn = Helper.getUnoPropertyValue(oColumnDescriptorModel, "Column"); - XPropertySet xColPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oColumn); + XPropertySet xColPropertySet = UnoRuntime.queryInterface(XPropertySet.class, oColumn); if (xColPropertySet != null) { curTableDescriptor.modifyColumn(txtfieldname.getText(), xColPropertySet); @@ -401,8 +401,7 @@ public class FieldFormatter implements XItemListener public XPropertySet clonePropertySet(XPropertySet _xPropertySet) { - XPropertySet xlocpropertyset = null; - return xlocpropertyset; + return null; } public void itemStateChanged(ItemEvent arg0) diff --git a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java index 34c880c3bab5..6246b3ef037f 100644 --- a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java +++ b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java @@ -260,16 +260,16 @@ public class PrimaryKeyHandler implements XFieldSelectionListener public void togglePrimeKeyFields() { boolean bdoEnable = (this.chkcreatePrimaryKey.getState() == 1); - Helper.setUnoPropertyValue(UnoDialog.getModel(optAddAutomatically), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoEnable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueAutomatic), PropertyNames.PROPERTY_ENABLED, new Boolean(bAutoPrimaryKeysupportsAutoIncrmentation && bdoEnable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(optUseExisting), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoEnable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(optUseSeveral), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(optAddAutomatically), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueAutomatic), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bAutoPrimaryKeysupportsAutoIncrmentation && bdoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(optUseExisting), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(optUseSeveral), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoEnable)); //toggle subcontrols of the radiobuttons... toggleAutomaticAutoValueCheckBox(); boolean benableSinglePrimekeyControls = bdoEnable && optUseExisting.getState(); toggleSinglePrimeKeyFields(benableSinglePrimekeyControls); boolean benableSeveralPrimekeyControls = bdoEnable && optUseSeveral.getState(); - curPrimaryKeySelection.toggleListboxControls(new Boolean(benableSeveralPrimekeyControls)); + curPrimaryKeySelection.toggleListboxControls(Boolean.valueOf(benableSeveralPrimekeyControls)); // toggle the following steps of the dialog... if (!bdoEnable) { @@ -354,7 +354,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener String selfieldname = lstSinglePrimeKey.getSelectedItem(); boolean bdoenable = isAutoIncrementatable(selfieldname); CurUnoDialog.setcompleted(TableWizard.SOPRIMARYKEYPAGE, lstSinglePrimeKey.getSelectedItemPos() != -1); - Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoenable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoenable)); XPropertySet xColPropertySet = curTableDescriptor.getByName(selfieldname); boolean bIsAutoIncremented = ((Boolean) xColPropertySet.getPropertyValue("IsAutoIncrement")).booleanValue(); if (bIsAutoIncremented) @@ -378,7 +378,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener { boolean bisAutomaticMode = AnyConverter.toBoolean(Helper.getUnoPropertyValue(UnoDialog.getModel(optAddAutomatically), PropertyNames.PROPERTY_ENABLED)); boolean bdoenable = bAutoPrimaryKeysupportsAutoIncrmentation && optAddAutomatically.getState() && bisAutomaticMode; - Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueAutomatic), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoenable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueAutomatic), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoenable)); } catch (IllegalArgumentException e) { @@ -388,17 +388,17 @@ public class PrimaryKeyHandler implements XFieldSelectionListener private void toggleSinglePrimeKeyFields(boolean _bdoenable) { - Helper.setUnoPropertyValue(UnoDialog.getModel(lblPrimeFieldName), PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoenable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(lstSinglePrimeKey), PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoenable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoenable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(lblPrimeFieldName), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bdoenable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(lstSinglePrimeKey), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bdoenable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bdoenable)); boolean bdoenableAutoValueCheckBox = (isAutoIncrementatable(lstSinglePrimeKey.getSelectedItem()) && _bdoenable); - Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoenableAutoValueCheckBox)); + Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoenableAutoValueCheckBox)); } private void toggleSeveralPrimeKeyFields() { boolean bdoEnable = (this.optUseSeveral.getState()); - curPrimaryKeySelection.toggleListboxControls(new Boolean(bdoEnable)); + curPrimaryKeySelection.toggleListboxControls(Boolean.valueOf(bdoEnable)); } public String[] getPrimaryKeyFields(TableDescriptor _curtabledescriptor) diff --git a/wizards/com/sun/star/wizards/table/ScenarioSelector.java b/wizards/com/sun/star/wizards/table/ScenarioSelector.java index 8c2b52cf5244..3ee366eb761a 100644 --- a/wizards/com/sun/star/wizards/table/ScenarioSelector.java +++ b/wizards/com/sun/star/wizards/table/ScenarioSelector.java @@ -26,6 +26,7 @@ ************************************************************************/ package com.sun.star.wizards.table; +import java.util.ArrayList; import java.util.Vector; import com.sun.star.awt.ItemEvent; @@ -207,8 +208,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X public String[] getSelectedFieldNames() { String[] displayfieldnames = super.getSelectedFieldNames(); - Vector afieldnameVector = new Vector(); - int a = 0; + ArrayList afieldnameVector = new ArrayList(); for (int i = 0; i < displayfieldnames.length; i++) { try @@ -216,8 +216,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X FieldDescription ofielddescription = (FieldDescription) CurTableWizardUnoDialog.fielditems.get(displayfieldnames[i]); if (ofielddescription != null) { - afieldnameVector.addElement(ofielddescription.getName()); - a++; + afieldnameVector.add(ofielddescription.getName()); } } catch (RuntimeException e) @@ -225,9 +224,8 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X e.printStackTrace(System.out); } } - String[] fieldnames = new String[a]; - afieldnameVector.toArray(fieldnames); - return fieldnames; + String[] fieldnames = new String[afieldnameVector.size()]; + return afieldnameVector.toArray(fieldnames); } public boolean iscompleted() diff --git a/wizards/com/sun/star/wizards/table/TableWizard.java b/wizards/com/sun/star/wizards/table/TableWizard.java index deb38a044f76..d5f4c706b174 100644 --- a/wizards/com/sun/star/wizards/table/TableWizard.java +++ b/wizards/com/sun/star/wizards/table/TableWizard.java @@ -88,7 +88,7 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener, drawNaviBar(); fielditems = new Hashtable(); //TODO if reportResouces cannot be gotten dispose officedocument - if (getTableResources() == true) + if (getTableResources()) { setRightPaneHeaders(m_oResource, UIConsts.RID_TABLE + 8, 4); } diff --git a/wizards/com/sun/star/wizards/text/TextDocument.java b/wizards/com/sun/star/wizards/text/TextDocument.java index 732dcf777acd..6e873c049167 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.java +++ b/wizards/com/sun/star/wizards/text/TextDocument.java @@ -112,7 +112,7 @@ public class TextDocument xFrame = OfficeDocument.createNewFrame(xMSF, listener); xTextDocument = loadAsPreview(_sPreviewURL, true); - xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xTextDocument); + xComponent = UnoRuntime.queryInterface(XComponent.class, xTextDocument); if (bShowStatusIndicator) { @@ -127,10 +127,10 @@ public class TextDocument this.xMSF = xMSF; XDesktop xDesktop = Desktop.getDesktop(xMSF); - XFramesSupplier xFrameSupplier = (XFramesSupplier) UnoRuntime.queryInterface(XFramesSupplier.class, xDesktop); + XFramesSupplier xFrameSupplier = UnoRuntime.queryInterface(XFramesSupplier.class, xDesktop); xFrame = xFrameSupplier.getActiveFrame(); - xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xFrame.getController().getModel()); - xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, xComponent); + xComponent = UnoRuntime.queryInterface(XComponent.class, xFrame.getController().getModel()); + xTextDocument = UnoRuntime.queryInterface(XTextDocument.class, xComponent); if (bShowStatusIndicator) { @@ -153,7 +153,7 @@ public class TextDocument { m_identifier = _identifier; } - }; + } // creates an instance of TextDocument containing a blank text document public TextDocument(XMultiServiceFactory xMSF, ModuleIdentifier _moduleIdentifier, boolean bShowStatusIndicator) @@ -163,19 +163,19 @@ public class TextDocument try { // create the empty document, and set its module identifier - xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, + xTextDocument = UnoRuntime.queryInterface(XTextDocument.class, xMSF.createInstance("com.sun.star.text.TextDocument")); - XLoadable xLoadable = (XLoadable) UnoRuntime.queryInterface(XLoadable.class, xTextDocument); + XLoadable xLoadable = UnoRuntime.queryInterface(XLoadable.class, xTextDocument); xLoadable.initNew(); - XModule xModule = (XModule) UnoRuntime.queryInterface(XModule.class, + XModule xModule = UnoRuntime.queryInterface(XModule.class, xTextDocument); xModule.setIdentifier(_moduleIdentifier.getIdentifier()); // load the document into a blank frame XDesktop xDesktop = Desktop.getDesktop(xMSF); - XComponentLoader xLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, xDesktop); + XComponentLoader xLoader = UnoRuntime.queryInterface(XComponentLoader.class, xDesktop); PropertyValue[] loadArgs = new PropertyValue[] { new PropertyValue("Model", -1, xTextDocument, com.sun.star.beans.PropertyState.DIRECT_VALUE) @@ -184,7 +184,7 @@ public class TextDocument // remember some things for later usage xFrame = xTextDocument.getCurrentController().getFrame(); - xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xTextDocument); + xComponent = UnoRuntime.queryInterface(XComponent.class, xTextDocument); } catch (Exception e) { @@ -204,21 +204,21 @@ public class TextDocument { this.xMSF = xMSF; xFrame = _textDocument.getCurrentController().getFrame(); - xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, _textDocument); - xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, xComponent); + xComponent = UnoRuntime.queryInterface(XComponent.class, _textDocument); + xTextDocument = UnoRuntime.queryInterface(XTextDocument.class, xComponent); //PosSize = xFrame.getComponentWindow().getPosSize(); if (bshowStatusIndicator) { - XStatusIndicatorFactory xStatusIndicatorFactory = (XStatusIndicatorFactory) UnoRuntime.queryInterface(XStatusIndicatorFactory.class, xFrame); + XStatusIndicatorFactory xStatusIndicatorFactory = UnoRuntime.queryInterface(XStatusIndicatorFactory.class, xFrame); xProgressBar = xStatusIndicatorFactory.createStatusIndicator(); xProgressBar.start(PropertyNames.EMPTY_STRING, 100); xProgressBar.setValue(5); } - xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xFrame.getComponentWindow()); - xMSFDoc = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument); - xNumberFormatsSupplier = (XNumberFormatsSupplier) UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument); + xWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, xFrame.getComponentWindow()); + xMSFDoc = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument); + xNumberFormatsSupplier = UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument); - XDocumentPropertiesSupplier xDocPropsSuppl = (XDocumentPropertiesSupplier) UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument); + XDocumentPropertiesSupplier xDocPropsSuppl = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument); m_xDocProps = xDocPropsSuppl.getDocumentProperties(); CharLocale = (Locale) Helper.getUnoStructValue((Object) xComponent, "CharLocale"); xText = xTextDocument.getText(); @@ -226,19 +226,19 @@ public class TextDocument private void init() { - xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xFrame.getComponentWindow()); - xMSFDoc = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument); - xNumberFormatsSupplier = (XNumberFormatsSupplier) UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument); - XDocumentPropertiesSupplier xDocPropsSuppl = (XDocumentPropertiesSupplier) UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument); + xWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, xFrame.getComponentWindow()); + xMSFDoc = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument); + xNumberFormatsSupplier = UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument); + XDocumentPropertiesSupplier xDocPropsSuppl = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument); m_xDocProps = xDocPropsSuppl.getDocumentProperties(); CharLocale = (Locale) Helper.getUnoStructValue((Object) xComponent, "CharLocale"); - xStorable = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument); + xStorable = UnoRuntime.queryInterface(XStorable.class, xTextDocument); xText = xTextDocument.getText(); } private void showStatusIndicator() { - XStatusIndicatorFactory xStatusIndicatorFactory = (XStatusIndicatorFactory) UnoRuntime.queryInterface(XStatusIndicatorFactory.class, xFrame); + XStatusIndicatorFactory xStatusIndicatorFactory = UnoRuntime.queryInterface(XStatusIndicatorFactory.class, xFrame); xProgressBar = xStatusIndicatorFactory.createStatusIndicator(); xProgressBar.start(PropertyNames.EMPTY_STRING, 100); xProgressBar.setValue(5); @@ -263,7 +263,7 @@ public class TextDocument { try { - XModifiable xModi = (XModifiable) UnoRuntime.queryInterface(XModifiable.class, xTextDocument); + XModifiable xModi = UnoRuntime.queryInterface(XModifiable.class, xTextDocument); xModi.setModified(false); } catch (PropertyVetoException e1) @@ -274,7 +274,7 @@ public class TextDocument Object oDoc = OfficeDocument.load(xFrame, sDefaultTemplate, "_self", loadValues); xTextDocument = (com.sun.star.text.XTextDocument) oDoc; DocSize = getPageSize(); - xMSFDoc = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument); + xMSFDoc = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument); ViewHandler myViewHandler = new ViewHandler(xMSFDoc, xTextDocument); try @@ -297,12 +297,12 @@ public class TextDocument { try { - XStyleFamiliesSupplier xStyleFamiliesSupplier = (XStyleFamiliesSupplier) com.sun.star.uno.UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument); + XStyleFamiliesSupplier xStyleFamiliesSupplier = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument); com.sun.star.container.XNameAccess xNameAccess = null; xNameAccess = xStyleFamiliesSupplier.getStyleFamilies(); com.sun.star.container.XNameContainer xPageStyleCollection = null; - xPageStyleCollection = (com.sun.star.container.XNameContainer) UnoRuntime.queryInterface(com.sun.star.container.XNameContainer.class, xNameAccess.getByName("PageStyles")); - XStyle xPageStyle = (XStyle) UnoRuntime.queryInterface(XStyle.class, xPageStyleCollection.getByName("First Page")); + xPageStyleCollection = UnoRuntime.queryInterface(com.sun.star.container.XNameContainer.class, xNameAccess.getByName("PageStyles")); + XStyle xPageStyle = UnoRuntime.queryInterface(XStyle.class, xPageStyleCollection.getByName("First Page")); return (Size) Helper.getUnoPropertyValue(xPageStyle, "Size"); } @@ -322,23 +322,22 @@ public class TextDocument xFrame = OfficeDocument.createNewFrame(xMSF, listener); Object oDoc = OfficeDocument.load(xFrame, URL, "_self", xArgs); xTextDocument = (XTextDocument) oDoc; - xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xTextDocument); + xComponent = UnoRuntime.queryInterface(XComponent.class, xTextDocument); XWindow xWindow = xFrame.getComponentWindow(); - xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xFrame.getComponentWindow()); - xMSFDoc = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument); - xNumberFormatsSupplier = (XNumberFormatsSupplier) UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument); + xWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, xFrame.getComponentWindow()); + xMSFDoc = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument); + xNumberFormatsSupplier = UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument); - XDocumentPropertiesSupplier xDocPropsSuppl = (XDocumentPropertiesSupplier) UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument); + XDocumentPropertiesSupplier xDocPropsSuppl = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument); m_xDocProps = xDocPropsSuppl.getDocumentProperties(); CharLocale = (Locale) Helper.getUnoStructValue((Object) xComponent, "CharLocale"); } public static XTextCursor createTextCursor(Object oCursorContainer) { - XSimpleText xText = (XSimpleText) UnoRuntime.queryInterface(XSimpleText.class, oCursorContainer); - XTextCursor xTextCursor = xText.createTextCursor(); - return xTextCursor; + XSimpleText xText = UnoRuntime.queryInterface(XSimpleText.class, oCursorContainer); + return xText.createTextCursor(); } // Todo: This method is unsecure because the last index is not necessarily the last section @@ -357,7 +356,7 @@ public class TextDocument xTextCursor.gotoStart(false); com.sun.star.wizards.common.Helper.setUnoPropertyValue(xTextCursor, "PageDescName", "First Page"); xTextCursor.setString(ScaleString); - XTextViewCursorSupplier xViewCursor = (XTextViewCursorSupplier) UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xTextDocument.getCurrentController()); + XTextViewCursorSupplier xViewCursor = UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xTextDocument.getCurrentController()); XTextViewCursor xTextViewCursor = xViewCursor.getViewCursor(); xTextViewCursor.gotoStart(false); int iFirstPos = xTextViewCursor.getPosition().X; @@ -373,7 +372,7 @@ public class TextDocument public void unlockallControllers() { - while (xTextDocument.hasControllersLocked() == true) + while (xTextDocument.hasControllersLocked()) { xTextDocument.unlockControllers(); } @@ -381,7 +380,7 @@ public class TextDocument public void refresh() { - XRefreshable xRefreshable = (XRefreshable) UnoRuntime.queryInterface(XRefreshable.class, xTextDocument); + XRefreshable xRefreshable = UnoRuntime.queryInterface(XRefreshable.class, xTextDocument); xRefreshable.refresh(); } @@ -397,10 +396,10 @@ public class TextDocument try { Object uD = Configuration.getConfigurationRoot(xMSF, "/org.openoffice.UserProfile/Data", false); - XNameAccess xNA = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, uD); + XNameAccess xNA = UnoRuntime.queryInterface(XNameAccess.class, uD); Object gn = xNA.getByName("givenname"); Object sn = xNA.getByName("sn"); - String fullname = (String) gn + PropertyNames.SPACE + (String) sn; + String fullname = gn + PropertyNames.SPACE + sn; Calendar cal = new GregorianCalendar(); int year = cal.get(Calendar.YEAR); @@ -414,7 +413,7 @@ public class TextDocument int ff = du.getFormat(NumberFormatIndex.DATE_SYS_DDMMYY); String myDate = du.format(ff, currentDate); - XDocumentPropertiesSupplier xDocPropsSuppl = (XDocumentPropertiesSupplier) UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument); + XDocumentPropertiesSupplier xDocPropsSuppl = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument); XDocumentProperties xDocProps2 = xDocPropsSuppl.getDocumentProperties(); xDocProps2.setAuthor(fullname); xDocProps2.setModifiedBy(fullname); @@ -450,7 +449,7 @@ public class TextDocument { try { - XTextContent xTextContent = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, oTextContent); + XTextContent xTextContent = UnoRuntime.queryInterface(XTextContent.class, oTextContent); xText.removeTextContent(xTextContent); return true; } @@ -470,11 +469,11 @@ public class TextDocument */ public static int getPageCount(Object model) { - XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, model); + XModel xModel = UnoRuntime.queryInterface(XModel.class, model); XController xController = xModel.getCurrentController(); - XTextViewCursorSupplier xTextVCS = (XTextViewCursorSupplier) UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xController); + XTextViewCursorSupplier xTextVCS = UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xController); XTextViewCursor xTextVC = xTextVCS.getViewCursor(); - XPageCursor xPC = (XPageCursor) UnoRuntime.queryInterface(XPageCursor.class, xTextVC); + XPageCursor xPC = UnoRuntime.queryInterface(XPageCursor.class, xTextVC); xPC.jumpToLastPage(); return xPC.getPage(); } diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.java b/wizards/com/sun/star/wizards/text/TextFieldHandler.java index 8236ddb86d3a..78de28073f37 100644 --- a/wizards/com/sun/star/wizards/text/TextFieldHandler.java +++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.java @@ -65,12 +65,12 @@ public class TextFieldHandler public TextFieldHandler(XMultiServiceFactory xMSF, XTextDocument xTextDocument) { this.xMSFDoc = xMSF; - xTextFieldsSupplier = (XTextFieldsSupplier) UnoRuntime.queryInterface(XTextFieldsSupplier.class, xTextDocument); + xTextFieldsSupplier = UnoRuntime.queryInterface(XTextFieldsSupplier.class, xTextDocument); } public void refreshTextFields() { - XRefreshable xUp = (XRefreshable) UnoRuntime.queryInterface(XRefreshable.class, xTextFieldsSupplier.getTextFields()); + XRefreshable xUp = UnoRuntime.queryInterface(XRefreshable.class, xTextFieldsSupplier.getTextFields()); xUp.refresh(); } @@ -86,10 +86,9 @@ public class TextFieldHandler } else { - XDependentTextField xDependent = (XDependentTextField) UnoRuntime.queryInterface(XDependentTextField.class, oTextField); + XDependentTextField xDependent = UnoRuntime.queryInterface(XDependentTextField.class, oTextField); XPropertySet xMaster = xDependent.getTextFieldMaster(); - String UserFieldContent = (String) xMaster.getPropertyValue("Content"); - return UserFieldContent; + return (String) xMaster.getPropertyValue("Content"); } } catch (com.sun.star.uno.Exception exception) @@ -104,12 +103,12 @@ public class TextFieldHandler try { XInterface xField = (XInterface) xMSFDoc.createInstance("com.sun.star.text.TextField.User"); - XDependentTextField xDepField = (XDependentTextField) UnoRuntime.queryInterface(XDependentTextField.class, xField); - XTextContent xFieldContent = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, xField); + XDependentTextField xDepField = UnoRuntime.queryInterface(XDependentTextField.class, xField); + XTextContent xFieldContent = UnoRuntime.queryInterface(XTextContent.class, xField); if (xTextFieldsSupplier.getTextFieldMasters().hasByName("com.sun.star.text.FieldMaster.User." + FieldName)) { Object oMaster = xTextFieldsSupplier.getTextFieldMasters().getByName("com.sun.star.text.FieldMaster.User." + FieldName); - XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, oMaster); + XComponent xComponent = UnoRuntime.queryInterface(XComponent.class, oMaster); xComponent.dispose(); } XPropertySet xPSet = createUserField(FieldName, FieldTitle); @@ -138,7 +137,7 @@ public class TextFieldHandler public XPropertySet createUserField(String FieldName, String FieldTitle) throws com.sun.star.uno.Exception { Object oMaster = xMSFDoc.createInstance("com.sun.star.text.FieldMaster.User"); - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oMaster); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oMaster); xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, FieldName); xPSet.setPropertyValue("Content", FieldTitle); @@ -160,7 +159,7 @@ public class TextFieldHandler while (xEnum.hasMoreElements()) { Object oTextField = xEnum.nextElement(); - XDependentTextField xDependent = (XDependentTextField) UnoRuntime.queryInterface(XDependentTextField.class, oTextField); + XDependentTextField xDependent = UnoRuntime.queryInterface(XDependentTextField.class, oTextField); XPropertySet xPropertySet = xDependent.getTextFieldMaster(); if (xPropertySet.getPropertySetInfo().hasPropertyByName(_PropertyName)) { @@ -235,16 +234,16 @@ public class TextFieldHandler while (xEnum.hasMoreElements()) { Object oTextField = xEnum.nextElement(); - XServiceInfo xSI = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, oTextField); + XServiceInfo xSI = UnoRuntime.queryInterface(XServiceInfo.class, oTextField); if (xSI.supportsService("com.sun.star.text.TextField.ExtendedUser")) { - XUpdatable xUp = (XUpdatable) UnoRuntime.queryInterface(XUpdatable.class, oTextField); + XUpdatable xUp = UnoRuntime.queryInterface(XUpdatable.class, oTextField); xUp.update(); } if (xSI.supportsService("com.sun.star.text.TextField.User")) { - XUpdatable xUp = (XUpdatable) UnoRuntime.queryInterface(XUpdatable.class, oTextField); + XUpdatable xUp = UnoRuntime.queryInterface(XUpdatable.class, oTextField); xUp.update(); } } @@ -270,11 +269,11 @@ public class TextFieldHandler while (xEnum.hasMoreElements()) { Object oTextField = xEnum.nextElement(); - XServiceInfo xSI = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, oTextField); + XServiceInfo xSI = UnoRuntime.queryInterface(XServiceInfo.class, oTextField); if (xSI.supportsService("com.sun.star.text.TextField.DateTime")) { - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oTextField); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oTextField); xPSet.setPropertyValue("IsFixed", Boolean.FALSE); xPSet.setPropertyValue("DateTimeValue", dt); } @@ -294,11 +293,11 @@ public class TextFieldHandler while (xEnum.hasMoreElements()) { Object oTextField = xEnum.nextElement(); - XServiceInfo xSI = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, oTextField); + XServiceInfo xSI = UnoRuntime.queryInterface(XServiceInfo.class, oTextField); if (xSI.supportsService("com.sun.star.text.TextField.DateTime")) { - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oTextField); - xPSet.setPropertyValue("IsFixed", new Boolean(_bSetFixed)); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oTextField); + xPSet.setPropertyValue("IsFixed", Boolean.valueOf(_bSetFixed)); } } } diff --git a/wizards/com/sun/star/wizards/text/TextFrameHandler.java b/wizards/com/sun/star/wizards/text/TextFrameHandler.java index 562444a1ad84..babaf21120e3 100644 --- a/wizards/com/sun/star/wizards/text/TextFrameHandler.java +++ b/wizards/com/sun/star/wizards/text/TextFrameHandler.java @@ -39,12 +39,11 @@ public class TextFrameHandler public static XTextFrame getFrameByName(String sFrameName, XTextDocument xTD) throws NoSuchElementException, WrappedTargetException { - XTextFramesSupplier xFrameSupplier = (XTextFramesSupplier) UnoRuntime.queryInterface(XTextFramesSupplier.class, xTD); + XTextFramesSupplier xFrameSupplier = UnoRuntime.queryInterface(XTextFramesSupplier.class, xTD); if (xFrameSupplier.getTextFrames().hasByName(sFrameName)) { Object oTextFrame = xFrameSupplier.getTextFrames().getByName(sFrameName); - XTextFrame xTextFrame = (XTextFrame) UnoRuntime.queryInterface(XTextFrame.class, oTextFrame); - return xTextFrame; + return UnoRuntime.queryInterface(XTextFrame.class, oTextFrame); } return null; } diff --git a/wizards/com/sun/star/wizards/text/TextSectionHandler.java b/wizards/com/sun/star/wizards/text/TextSectionHandler.java index b948b2a60d4b..b20d016f8ee8 100644 --- a/wizards/com/sun/star/wizards/text/TextSectionHandler.java +++ b/wizards/com/sun/star/wizards/text/TextSectionHandler.java @@ -59,7 +59,7 @@ public class TextSectionHandler this.xMSFDoc = xMSF; this.xTextDocument = xTextDocument; xText = xTextDocument.getText(); - xTextSectionsSupplier = (XTextSectionsSupplier) UnoRuntime.queryInterface(XTextSectionsSupplier.class, xTextDocument); + xTextSectionsSupplier = UnoRuntime.queryInterface(XTextSectionsSupplier.class, xTextDocument); } public void removeTextSectionbyName(String SectionName) @@ -67,7 +67,7 @@ public class TextSectionHandler try { XNameAccess xAllTextSections = xTextSectionsSupplier.getTextSections(); - if (xAllTextSections.hasByName(SectionName) == true) + if (xAllTextSections.hasByName(SectionName)) { Object oTextSection = xTextSectionsSupplier.getTextSections().getByName(SectionName); removeTextSection(oTextSection); @@ -89,7 +89,7 @@ public class TextSectionHandler { try { - XIndexAccess xAllTextSections = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xTextSectionsSupplier.getTextSections()); + XIndexAccess xAllTextSections = UnoRuntime.queryInterface(XIndexAccess.class, xTextSectionsSupplier.getTextSections()); Object oTextSection = xAllTextSections.getByIndex(xAllTextSections.getCount() - 1); removeTextSection(oTextSection); } @@ -103,7 +103,7 @@ public class TextSectionHandler { try { - XTextContent xTextContentTextSection = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, _oTextSection); + XTextContent xTextContentTextSection = UnoRuntime.queryInterface(XTextContent.class, _oTextSection); xText.removeTextContent(xTextContentTextSection); } catch (Exception exception) @@ -116,12 +116,12 @@ public class TextSectionHandler { try { - XIndexAccess xAllTextSections = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xTextSectionsSupplier.getTextSections()); + XIndexAccess xAllTextSections = UnoRuntime.queryInterface(XIndexAccess.class, xTextSectionsSupplier.getTextSections()); int TextSectionCount = xAllTextSections.getCount(); for (int i = TextSectionCount - 1; i >= 0; i--) { - XTextContent xTextContentTextSection = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, xAllTextSections.getByIndex(i)); - XPropertySet xTextSectionPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextContentTextSection); + XTextContent xTextContentTextSection = UnoRuntime.queryInterface(XTextContent.class, xAllTextSections.getByIndex(i)); + XPropertySet xTextSectionPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xTextContentTextSection); boolean bRemoveTextSection = (!AnyConverter.toBoolean(xTextSectionPropertySet.getPropertyValue("IsVisible"))); if (bRemoveTextSection) { @@ -139,12 +139,12 @@ public class TextSectionHandler { try { - XIndexAccess xAllTextSections = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xTextSectionsSupplier.getTextSections()); + XIndexAccess xAllTextSections = UnoRuntime.queryInterface(XIndexAccess.class, xTextSectionsSupplier.getTextSections()); int TextSectionCount = xAllTextSections.getCount(); for (int i = TextSectionCount - 1; i >= 0; i--) { - XTextContent xTextContentTextSection = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, xAllTextSections.getByIndex(i)); - XPropertySet xTextSectionPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextContentTextSection); + XTextContent xTextContentTextSection = UnoRuntime.queryInterface(XTextContent.class, xAllTextSections.getByIndex(i)); + XPropertySet xTextSectionPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xTextContentTextSection); xText.removeTextContent(xTextContentTextSection); } } @@ -159,7 +159,7 @@ public class TextSectionHandler try { Object oTextSection; - XIndexAccess xAllTextSections = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xTextSectionsSupplier.getTextSections()); + XIndexAccess xAllTextSections = UnoRuntime.queryInterface(XIndexAccess.class, xTextSectionsSupplier.getTextSections()); int iSectionCount = xAllTextSections.getCount(); SectionFileLink oSectionLink = new SectionFileLink(); oSectionLink.FileURL = PropertyNames.EMPTY_STRING; @@ -218,7 +218,7 @@ public class TextSectionHandler { oSectionLink, SectionName }); - XNamed xSectionName = (XNamed) UnoRuntime.queryInterface(XNamed.class, oTextSection); + XNamed xSectionName = UnoRuntime.queryInterface(XNamed.class, oTextSection); String NewSectionName = xSectionName.getName(); if (NewSectionName.compareTo(SectionName) != 0) { @@ -252,14 +252,14 @@ public class TextSectionHandler try { Object xTextSection; - if (xTextSectionsSupplier.getTextSections().hasByName(sectionName) == true) + if (xTextSectionsSupplier.getTextSections().hasByName(sectionName)) { xTextSection = xTextSectionsSupplier.getTextSections().getByName(sectionName); } else { xTextSection = xMSFDoc.createInstance("com.sun.star.text.TextSection"); - XTextContent xTextContentSection = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, xTextSection); + XTextContent xTextContentSection = UnoRuntime.queryInterface(XTextContent.class, xTextSection); position.getText().insertTextContent(position, xTextContentSection, false); } linkSectiontoTemplate(xTextSection, templateName, sectionName); diff --git a/wizards/com/sun/star/wizards/text/TextStyleHandler.java b/wizards/com/sun/star/wizards/text/TextStyleHandler.java index 82da36f16019..e9f6cd737e7d 100644 --- a/wizards/com/sun/star/wizards/text/TextStyleHandler.java +++ b/wizards/com/sun/star/wizards/text/TextStyleHandler.java @@ -50,21 +50,21 @@ public class TextStyleHandler { this.xMSFDoc = xMSF; this.xTextDocument = xTextDocument; - xStyleFamiliesSupplier = (XStyleFamiliesSupplier) UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument); + xStyleFamiliesSupplier = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument); } public void loadStyleTemplates(String sTemplateUrl, String OptionString) { try { - XStyleLoader xStyleLoader = (XStyleLoader) UnoRuntime.queryInterface(XStyleLoader.class, xStyleFamiliesSupplier.getStyleFamilies()); + XStyleLoader xStyleLoader = UnoRuntime.queryInterface(XStyleLoader.class, xStyleFamiliesSupplier.getStyleFamilies()); com.sun.star.beans.PropertyValue[] StyleOptions = xStyleLoader.getStyleLoaderOptions(); String CurOptionName = PropertyNames.EMPTY_STRING; int PropCount = StyleOptions.length; for (int i = 0; i < PropCount; i++) { CurOptionName = StyleOptions[i].Name; - StyleOptions[i].Value = new Boolean((CurOptionName.compareTo(OptionString) == 0) || (CurOptionName.compareTo("OverwriteStyles") == 0)); + StyleOptions[i].Value = Boolean.valueOf((CurOptionName.compareTo(OptionString) == 0) || (CurOptionName.compareTo("OverwriteStyles") == 0)); } xStyleLoader.loadStylesFromURL(sTemplateUrl, StyleOptions); } @@ -80,10 +80,10 @@ public class TextStyleHandler { XPropertySet xPropertySet = null; Object oStyleFamily = xStyleFamiliesSupplier.getStyleFamilies().getByName(sStyleFamily); - XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oStyleFamily); + XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, oStyleFamily); if (xNameAccess.hasByName(sStyleName)) { - xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xNameAccess.getByName(sStyleName)); + xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xNameAccess.getByName(sStyleName)); } return xPropertySet; } @@ -98,7 +98,7 @@ public class TextStyleHandler { try { - _xPropPageStyle.setPropertyValue("IsLandscape", new Boolean(_bIsLandscape)); + _xPropPageStyle.setPropertyValue("IsLandscape", Boolean.valueOf(_bIsLandscape)); Size aPageSize = (Size) AnyConverter.toObject(Size.class, _xPropPageStyle.getPropertyValue("Size")); int nPageWidth = aPageSize.Width; int nPageHeight = aPageSize.Height; diff --git a/wizards/com/sun/star/wizards/text/TextTableHandler.java b/wizards/com/sun/star/wizards/text/TextTableHandler.java index d3646a7cfa37..ab7e46a62c0a 100644 --- a/wizards/com/sun/star/wizards/text/TextTableHandler.java +++ b/wizards/com/sun/star/wizards/text/TextTableHandler.java @@ -69,9 +69,9 @@ public class TextTableHandler this.xMSFDoc = xMSF; this.xTextDocument = xTextDocument; xText = xTextDocument.getText(); - xTextTablesSupplier = (XTextTablesSupplier) UnoRuntime.queryInterface(XTextTablesSupplier.class, xTextDocument); - xSimpleText = (XSimpleText) UnoRuntime.queryInterface(XSimpleText.class, xTextDocument.getText()); - XNumberFormatsSupplier xNumberFormatsSupplier = (XNumberFormatsSupplier) UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument); + xTextTablesSupplier = UnoRuntime.queryInterface(XTextTablesSupplier.class, xTextDocument); + xSimpleText = UnoRuntime.queryInterface(XSimpleText.class, xTextDocument.getText()); + XNumberFormatsSupplier xNumberFormatsSupplier = UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument); aCharLocale = (Locale) Helper.getUnoStructValue((Object) xTextDocument, "CharLocale"); oNumberFormatter = new NumberFormatter(xNumberFormatsSupplier, aCharLocale); } @@ -95,7 +95,7 @@ public class TextTableHandler if (xAllTextTables.hasByName(_sTableName)) { Object oTable = xAllTextTables.getByName(_sTableName); - xTextTable = (XTextTable) UnoRuntime.queryInterface(XTextTable.class, oTable); + xTextTable = UnoRuntime.queryInterface(XTextTable.class, oTable); } } catch (Exception exception) @@ -109,11 +109,10 @@ public class TextTableHandler { try { - XIndexAccess xAllTextTables = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xTextTablesSupplier.getTextTables()); + XIndexAccess xAllTextTables = UnoRuntime.queryInterface(XIndexAccess.class, xTextTablesSupplier.getTextTables()); int MaxIndex = xAllTextTables.getCount() - 1; Object oTable = xAllTextTables.getByIndex(MaxIndex); - XTextTable xTextTable = (XTextTable) UnoRuntime.queryInterface(XTextTable.class, oTable); - return xTextTable; + return UnoRuntime.queryInterface(XTextTable.class, oTable); } catch (Exception exception) { @@ -127,7 +126,7 @@ public class TextTableHandler try { com.sun.star.uno.XInterface xTextTable = (XInterface) xMSFDoc.createInstance("com.sun.star.text.TextTable"); - XTextContent xTextContentTable = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, xTextTable); + XTextContent xTextContentTable = UnoRuntime.queryInterface(XTextContent.class, xTextTable); if (xTextCursor == null) { xTextCursor = xTextDocument.getText().createTextCursor(); @@ -145,7 +144,7 @@ public class TextTableHandler { try { - XIndexAccess xAllTextTables = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xTextTablesSupplier.getTextTables()); + XIndexAccess xAllTextTables = UnoRuntime.queryInterface(XIndexAccess.class, xTextTablesSupplier.getTextTables()); int TextTableCount = xAllTextTables.getCount(); for (int i = TextTableCount - 1; i >= 0; i--) { @@ -162,7 +161,7 @@ public class TextTableHandler { try { - XIndexAccess xAllTextTables = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xTextTablesSupplier.getTextTables()); + XIndexAccess xAllTextTables = UnoRuntime.queryInterface(XIndexAccess.class, xTextTablesSupplier.getTextTables()); Object oTextTable = xAllTextTables.getByIndex(xAllTextTables.getCount() - 1); removeTextTable(oTextTable); } @@ -176,7 +175,7 @@ public class TextTableHandler { try { - XTextContent xTextContentTable = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, oTextTable); + XTextContent xTextContentTable = UnoRuntime.queryInterface(XTextContent.class, oTextTable); xTextDocument.getText().removeTextContent(xTextContentTable); } catch (Exception exception) @@ -190,7 +189,7 @@ public class TextTableHandler try { XNameAccess xAllTextTables = xTextTablesSupplier.getTextTables(); - if (xAllTextTables.hasByName(TableName) == true) + if (xAllTextTables.hasByName(TableName)) { removeTextTable(xAllTextTables.getByName(TableName)); } @@ -209,7 +208,7 @@ public class TextTableHandler if (xTextTableNames.hasByName(OldTableName)) { Object oTextTable = xTextTableNames.getByName(OldTableName); - XNamed xTextTableName = (XNamed) UnoRuntime.queryInterface(XNamed.class, oTextTable); + XNamed xTextTableName = UnoRuntime.queryInterface(XNamed.class, oTextTable); xTextTableName.setName(NewTableName); } } @@ -236,10 +235,10 @@ public class TextTableHandler { XFrame xFrame = this.xTextDocument.getCurrentController().getFrame(); int ColCount = xTextTable.getColumns().getCount(); - XCellRange xCellRange = (XCellRange) UnoRuntime.queryInterface(XCellRange.class, xTextTable); + XCellRange xCellRange = UnoRuntime.queryInterface(XCellRange.class, xTextTable); XCellRange xLocCellRange = xCellRange.getCellRangeByPosition(0, 0, ColCount - 1, 1); short iHoriOrient = AnyConverter.toShort(Helper.getUnoPropertyValue(xTextTable, "HoriOrient")); - XSelectionSupplier xSelection = (XSelectionSupplier) UnoRuntime.queryInterface(XSelectionSupplier.class, xTextDocument.getCurrentController()); + XSelectionSupplier xSelection = UnoRuntime.queryInterface(XSelectionSupplier.class, xTextDocument.getCurrentController()); xSelection.select(xLocCellRange); Desktop.dispatchURL(_xMSF, ".Uno:DistributeColumns", xFrame); Desktop.dispatchURL(_xMSF, ".Uno:SetOptimalColumnWidth", xFrame); diff --git a/wizards/com/sun/star/wizards/text/ViewHandler.java b/wizards/com/sun/star/wizards/text/ViewHandler.java index e29ad10cfbb1..d234f26e2bfe 100644 --- a/wizards/com/sun/star/wizards/text/ViewHandler.java +++ b/wizards/com/sun/star/wizards/text/ViewHandler.java @@ -59,26 +59,26 @@ public class ViewHandler { this.xMSFDoc = xMSF; this.xTextDocument = xTextDocument; - xTextViewCursorSupplier = (XTextViewCursorSupplier) UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xTextDocument.getCurrentController()); - xViewSettingsSupplier = (XViewSettingsSupplier) UnoRuntime.queryInterface(XViewSettingsSupplier.class, xTextDocument.getCurrentController()); - xStyleFamiliesSupplier = (XStyleFamiliesSupplier) UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument); + xTextViewCursorSupplier = UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xTextDocument.getCurrentController()); + xViewSettingsSupplier = UnoRuntime.queryInterface(XViewSettingsSupplier.class, xTextDocument.getCurrentController()); + xStyleFamiliesSupplier = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument); } public void selectFirstPage(TextTableHandler oTextTableHandler) { try { - XPageCursor xPageCursor = (XPageCursor) UnoRuntime.queryInterface(XPageCursor.class, xTextViewCursorSupplier.getViewCursor()); - XTextCursor xViewTextCursor = (XTextCursor) UnoRuntime.queryInterface(XTextCursor.class, xPageCursor); + XPageCursor xPageCursor = UnoRuntime.queryInterface(XPageCursor.class, xTextViewCursorSupplier.getViewCursor()); + XTextCursor xViewTextCursor = UnoRuntime.queryInterface(XTextCursor.class, xPageCursor); xPageCursor.jumpToFirstPage(); xPageCursor.jumpToStartOfPage(); Helper.setUnoPropertyValue(xPageCursor, "PageDescName", "First Page"); Object oPageStyles = xStyleFamiliesSupplier.getStyleFamilies().getByName("PageStyles"); - XNameAccess xName = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oPageStyles); + XNameAccess xName = UnoRuntime.queryInterface(XNameAccess.class, oPageStyles); Object oPageStyle = xName.getByName("First Page"); - XIndexAccess xAllTextTables = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, oTextTableHandler.xTextTablesSupplier.getTextTables()); - XTextContent xTextTable = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, xAllTextTables.getByIndex(0)); - XTextRange xRange = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, xTextTable.getAnchor().getText()); + XIndexAccess xAllTextTables = UnoRuntime.queryInterface(XIndexAccess.class, oTextTableHandler.xTextTablesSupplier.getTextTables()); + XTextContent xTextTable = UnoRuntime.queryInterface(XTextContent.class, xAllTextTables.getByIndex(0)); + XTextRange xRange = UnoRuntime.queryInterface(XTextRange.class, xTextTable.getAnchor().getText()); xViewTextCursor.gotoRange(xRange, false); // if (xPageCursor.getPage() == (short) 1) { // Helper.setUnoPropertyValue(xTextTable, "PageDescName", "First Page"); diff --git a/wizards/com/sun/star/wizards/ui/AggregateComponent.java b/wizards/com/sun/star/wizards/ui/AggregateComponent.java index 2940e89a6ae4..aeebc069addc 100644 --- a/wizards/com/sun/star/wizards/ui/AggregateComponent.java +++ b/wizards/com/sun/star/wizards/ui/AggregateComponent.java @@ -26,6 +26,7 @@ ************************************************************************/ package com.sun.star.wizards.ui; +import java.util.ArrayList; import java.util.Vector; import com.sun.star.wizards.common.*; import com.sun.star.wizards.db.*; @@ -44,7 +45,6 @@ public class AggregateComponent extends ControlScroller { "SUM", "AVG", "MIN", "MAX" }; - ; QueryMetaData CurDBMetaData; XButton optDetailQuery; XButton optSummaryQuery; @@ -79,7 +79,6 @@ public class AggregateComponent extends ControlScroller { curHelpID = _firstHelpID; this.CurDBMetaData = _CurDBMetaData; - ; Count = 1; optDetailQuery = CurUnoDialog.insertRadioButton("optDetailQuery", 0, new ActionListenerImpl(), new String[] @@ -280,14 +279,14 @@ public class AggregateComponent extends ControlScroller ControlRow curcontrolrow = null; boolean biscomplete = true; CurDBMetaData.Type = getQueryType(); - CurUnoDialog.setControlProperty("btnminus", PropertyNames.PROPERTY_ENABLED, new Boolean((super.getTotalFieldCount() > 0) && (CurDBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY))); + CurUnoDialog.setControlProperty("btnminus", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf((super.getTotalFieldCount() > 0) && (CurDBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY))); int fieldcount = super.getCurFieldCount(); if (fieldcount > 0) { curcontrolrow = (ControlRow) ControlRowVector.elementAt(super.getCurFieldCount() - 1); biscomplete = curcontrolrow.isComplete(); } - CurUnoDialog.setControlProperty("btnplus", PropertyNames.PROPERTY_ENABLED, new Boolean(biscomplete && (CurDBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY))); + CurUnoDialog.setControlProperty("btnplus", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(biscomplete && (CurDBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY))); togglefollowingDialogSteps(); } @@ -295,8 +294,8 @@ public class AggregateComponent extends ControlScroller { CurDBMetaData.Type = getQueryType(); boolean benableComponent = isAggregateComponentEnabled(); - CurUnoDialog.setControlProperty("lblAggregate", PropertyNames.PROPERTY_ENABLED, new Boolean(benableComponent)); - CurUnoDialog.setControlProperty("lblFieldnames", PropertyNames.PROPERTY_ENABLED, new Boolean(benableComponent)); + CurUnoDialog.setControlProperty("lblAggregate", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(benableComponent)); + CurUnoDialog.setControlProperty("lblFieldnames", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(benableComponent)); toggleButtons(); super.toggleComponent(benableComponent); super.toggleControls(benableComponent); @@ -370,11 +369,10 @@ public class AggregateComponent extends ControlScroller CurDBMetaData.Type = getQueryType(); if (CurDBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY) { - Vector aggregatevector = new Vector(); + ArrayList aggregatevector = new ArrayList(); PropertyValue[][] aggregatelist = this.getScrollFieldValues(); PropertyValue[] currowproperties; PropertyValue curaggregateproperty; - int a = 0; if (CurDBMetaData.AggregateFieldNames != null) { for (int i = 0; i < aggregatelist.length; i++) @@ -390,12 +388,11 @@ public class AggregateComponent extends ControlScroller curaggregatename[0] = CurDBMetaData.NumericFieldNames[iselfield[0]]; curaggregatename[1] = this.sFunctionOperators[iselfunction[0]]; aggregatevector.add(curaggregatename); - a++; } } } } - CurDBMetaData.AggregateFieldNames = new String[a][2]; + CurDBMetaData.AggregateFieldNames = new String[aggregatevector.size()][2]; aggregatevector.toArray(CurDBMetaData.AggregateFieldNames); } diff --git a/wizards/com/sun/star/wizards/ui/ButtonList.java b/wizards/com/sun/star/wizards/ui/ButtonList.java index 4436c5dbfe95..e85343f42464 100644 --- a/wizards/com/sun/star/wizards/ui/ButtonList.java +++ b/wizards/com/sun/star/wizards/ui/ButtonList.java @@ -219,7 +219,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener for (int c = 0; c < cols; c++) { XButton aButton = createButton(dialog, r, c); - XControl aControl = (XControl)UnoRuntime.queryInterface(XControl.class, aButton); + XControl aControl = UnoRuntime.queryInterface(XControl.class, aButton); m_aButtons[r * cols + c] = aControl; } } @@ -269,7 +269,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener m_aButtonWidth }); - XWindow win = (XWindow) UnoRuntime.queryInterface(XWindow.class, aButton); + XWindow win = UnoRuntime.queryInterface(XWindow.class, aButton); win.setEnable(true); win.setVisible(true); return aButton; @@ -277,14 +277,12 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener private int getButtonPosX(int _col) { - final int nXPos = pos.Width + _col * (m_aButtonSize.Width + gap.Width) + gap.Width; - return nXPos; + return pos.Width + _col * (m_aButtonSize.Width + gap.Width) + gap.Width; } private int getButtonPosY(int _row) { - final int nYPos = pos.Height + _row * (m_aButtonSize.Height + gap.Height) + gap.Height; - return nYPos; + return pos.Height + _row * (m_aButtonSize.Height + gap.Height) + gap.Height; } private void refreshImages() @@ -308,7 +306,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener { if (oResources.length == 1) { - Helper.setUnoPropertyValue(m_aButtons[i].getModel(), PropertyNames.PROPERTY_IMAGEURL, (String) oResources[0]); + Helper.setUnoPropertyValue(m_aButtons[i].getModel(), PropertyNames.PROPERTY_IMAGEURL, oResources[0]); } else if (oResources.length == 2) { @@ -350,7 +348,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener private transient java.util.ArrayList m_aItemListenerList; private void setVisible(Object control, boolean visible) { - final XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, control); + final XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, control); xWindow.setVisible(visible); } @@ -719,8 +717,8 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener private void enableButtons() { - enable(btnNext, new Boolean(pageStart + rows * cols < listModel.getSize())); - enable(btnBack, new Boolean(pageStart > 0)); + enable(btnNext, Boolean.valueOf(pageStart + rows * cols < listModel.getSize())); + enable(btnBack, Boolean.valueOf(pageStart > 0)); } private void enable(Object control, Boolean enable) @@ -730,7 +728,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener private Object getModel(Object control) { - return ((XControl) UnoRuntime.queryInterface(XControl.class, control)).getModel(); + return UnoRuntime.queryInterface(XControl.class, control).getModel(); } private void setBorder(Object control, Short border) @@ -893,7 +891,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener // check which Button is pressed. String sControlName = aHelper.getPropertyValueAsString(PropertyNames.PROPERTY_NAME, PropertyNames.EMPTY_STRING); final String sButton = sControlName.substring(7 + m_aControlName.length()); - int nButton = new Integer(sButton).intValue(); + int nButton = Integer.parseInt(sButton); // int image = getImageFromEvent(event); int index = getIndexFor(nButton); diff --git a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java index b97fb6f5e84f..14a5f88796ba 100644 --- a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java @@ -320,7 +320,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator else { emptyFieldsListBoxes(); - iSelArray = new short[] { (short) iSelPos }; + iSelArray = new short[] {iSelPos}; } Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.SELECTED_ITEMS, iSelArray); toggleCommandListBox(true); @@ -366,8 +366,8 @@ public class CommandFieldSelection extends FieldSelection implements Comparator public void toggleCommandListBox(boolean _bdoenable) { - Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoenable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(xlblTable), PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoenable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bdoenable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(xlblTable), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bdoenable)); } public String getSelectedCommandName() @@ -444,7 +444,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator } if (_bReadOnly) { - Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.READ_ONLY, new Boolean(_selitem.length() > 0)); + Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.READ_ONLY, Boolean.valueOf(_selitem.length() > 0)); } } @@ -467,7 +467,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator } if (_bReadOnly) { - Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.READ_ONLY, new Boolean(_selitem.length() > 0)); + Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.READ_ONLY, Boolean.valueOf(_selitem.length() > 0)); } toggleListboxButtons((short)-1,(short)-1); } diff --git a/wizards/com/sun/star/wizards/ui/ControlScroller.java b/wizards/com/sun/star/wizards/ui/ControlScroller.java index f25616098a26..59b01fee772b 100644 --- a/wizards/com/sun/star/wizards/ui/ControlScroller.java +++ b/wizards/com/sun/star/wizards/ui/ControlScroller.java @@ -132,7 +132,7 @@ public abstract class ControlScroller }, new Object[] { - new Short((short) 0), new Boolean(true), new Integer(ScrollHeight), HelpIds.getHelpIdString(curHelpIndex), new Integer(ScrollBarOrientation.VERTICAL), new Integer(iCompPosX + iCompWidth - iScrollBarWidth - 1), new Integer(iCompPosY + 1), IStep, new Integer(iScrollBarWidth) + new Short((short) 0), Boolean.TRUE, new Integer(ScrollHeight), HelpIds.getHelpIdString(curHelpIndex), new Integer(ScrollBarOrientation.VERTICAL), new Integer(iCompPosX + iCompWidth - iScrollBarWidth - 1), new Integer(iCompPosY + 1), IStep, new Integer(iScrollBarWidth) }); scrollfields = new Vector(); int ypos = iStartPosY + SORELFIRSTPOSY; @@ -171,7 +171,7 @@ public abstract class ControlScroller ntotfieldcount = _ntotfieldcount; setCurFieldCount(); nscrollvalue = 0; - Helper.setUnoPropertyValue(UnoDialog.getModel(xScrollBar), new String("ScrollValue"), new Integer(nscrollvalue)); + Helper.setUnoPropertyValue(UnoDialog.getModel(xScrollBar), "ScrollValue", new Integer(nscrollvalue)); if (ntotfieldcount > nblockincrement) { Helper.setUnoPropertyValues(UnoDialog.getModel(xScrollBar), new String[] @@ -243,7 +243,7 @@ public abstract class ControlScroller { if (_nscrollvalue >= 0) { - Helper.setUnoPropertyValue(UnoDialog.getModel(xScrollBar), new String("ScrollValue"), new Integer(_nscrollvalue)); + Helper.setUnoPropertyValue(UnoDialog.getModel(xScrollBar), "ScrollValue", new Integer(_nscrollvalue)); scrollControls(); } } @@ -299,7 +299,7 @@ public abstract class ControlScroller protected void toggleComponent(boolean _bdoenable) { boolean bdoenable = _bdoenable && (ntotfieldcount > nblockincrement); - CurUnoDialog.setControlProperty("TitleScrollBar" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, new Boolean(bdoenable)); + CurUnoDialog.setControlProperty("TitleScrollBar" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoenable)); } protected void toggleControls(boolean _bdoenable) @@ -310,7 +310,7 @@ public abstract class ControlScroller for (int m = 0; m < curproperties.length; m++) { PropertyValue curproperty = curproperties[m]; - CurUnoDialog.setControlProperty(curproperty.Name, PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoenable)); + CurUnoDialog.setControlProperty(curproperty.Name, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bdoenable)); } } @@ -324,7 +324,7 @@ public abstract class ControlScroller protected void setLineIncrementation(int _nlineincrement) { this.nlineincrement = _nlineincrement; - Helper.setUnoPropertyValue(UnoDialog.getModel(xScrollBar), new String("LineIncrement"), new Integer(nlineincrement)); + Helper.setUnoPropertyValue(UnoDialog.getModel(xScrollBar), "LineIncrement", new Integer(nlineincrement)); } @@ -341,7 +341,7 @@ public abstract class ControlScroller PropertyNames.PROPERTY_ENABLED, "BlockIncrement", "ScrollValueMax" }, new Object[] { - new Boolean(ntotfieldcount > nblockincrement), new Integer(nblockincrement), new Integer(ntotfieldcount - nblockincrement) + Boolean.valueOf(ntotfieldcount > nblockincrement), new Integer(nblockincrement), new Integer(ntotfieldcount - nblockincrement) }); } @@ -395,12 +395,10 @@ public abstract class ControlScroller { if (guiRow + nscrollvalue < scrollfields.size()) { - PropertyValue pv = fieldInfo( + return fieldInfo( ((PropertyValue[]) scrollfields.elementAt(guiRow + nscrollvalue))[column], ((PropertyValue[]) scrollfields.elementAt(guiRow))[column]); //System.out.println("getting field info for : " + guiRow + "/" + column + ":" + pv.Value + "(" + pv.Name + ")" ); - - return pv; } else { @@ -451,7 +449,7 @@ public abstract class ControlScroller { Object oControlModel = UnoDialog.getModel(CurUnoDialog.xDlgContainer.getControl(controlname)); String propertyname = UnoDialog.getDisplayProperty(oControlModel); - if (propertyname != PropertyNames.EMPTY_STRING) + if (!propertyname.equals(PropertyNames.EMPTY_STRING)) { CurUnoDialog.setControlProperty(controlname, propertyname, newvalue); } @@ -461,7 +459,7 @@ public abstract class ControlScroller { Object oControlModel = UnoDialog.getModel(CurUnoDialog.xDlgContainer.getControl(controlname)); String propertyname = UnoDialog.getDisplayProperty(oControlModel); - if (propertyname != PropertyNames.EMPTY_STRING) + if (!propertyname.equals(PropertyNames.EMPTY_STRING)) { return CurUnoDialog.getControlProperty(controlname, propertyname); } diff --git a/wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java b/wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java index dfe5ff93f6a2..1bf70e77faa6 100644 --- a/wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java @@ -91,7 +91,7 @@ public abstract class DBLimitedFieldSelection protected void moveupSelectedItems(int CurIndex, boolean bDoEnable) { // short iNextItemPos; - if ((bDoEnable == false) && (MAXSELINDEX > CurIndex)) + if ((!bDoEnable) && (MAXSELINDEX > CurIndex)) { for (int i = CurIndex; i < MAXSELINDEX; i++) { @@ -113,10 +113,7 @@ public abstract class DBLimitedFieldSelection int FieldCount = _FieldNames.length; String[] ViewFieldNames = new String[FieldCount + 1]; ViewFieldNames[0] = sNoField; - for (int i = 0; i < FieldCount; i++) - { - ViewFieldNames[i + 1] = _FieldNames[i]; - } + System.arraycopy(_FieldNames, 0, ViewFieldNames, 1, FieldCount); return ViewFieldNames; } diff --git a/wizards/com/sun/star/wizards/ui/DocumentPreview.java b/wizards/com/sun/star/wizards/ui/DocumentPreview.java index 3489ca0235b3..db7a3fd959fc 100644 --- a/wizards/com/sun/star/wizards/ui/DocumentPreview.java +++ b/wizards/com/sun/star/wizards/ui/DocumentPreview.java @@ -76,7 +76,7 @@ public class DocumentPreview { //((XWindow)UnoRuntime.queryInterface(XWindow.class,control)).addPaintListener(this); - xControl = (XControl) UnoRuntime.queryInterface(XControl.class, control); + xControl = UnoRuntime.queryInterface(XControl.class, control); //register this object as a listener, to close the frame when disposing. //((XComponent) UnoRuntime.queryInterface(XComponent.class, control)).addEventListener(this); @@ -99,7 +99,7 @@ public class DocumentPreview protected XComponent setDocument(String url, PropertyValue[] lArgs) throws com.sun.star.lang.IllegalArgumentException, IOException, CloseVetoException { loadArgs = lArgs; - XComponentLoader xCompLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, xFrame); + XComponentLoader xCompLoader = UnoRuntime.queryInterface(XComponentLoader.class, xFrame); xFrame.activate(); return xComponent = xCompLoader.loadComponentFromURL(url, "_self", 0, loadArgs); } @@ -116,7 +116,7 @@ public class DocumentPreview { if (xFrame != null) { - ((XCloseable) UnoRuntime.queryInterface(XCloseable.class, xFrame)).close(false); + UnoRuntime.queryInterface(XCloseable.class, xFrame).close(false); } } @@ -149,11 +149,11 @@ public class DocumentPreview public void createPreviewFrame(XMultiServiceFactory xmsf, XControl xControl) throws com.sun.star.uno.Exception, com.sun.star.lang.IllegalArgumentException { XWindowPeer controlPeer = xControl.getPeer(); - XWindow controlWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, xControl); + XWindow controlWindow = UnoRuntime.queryInterface(XWindow.class, xControl); Rectangle r = controlWindow.getPosSize(); Object toolkit = xmsf.createInstance("com.sun.star.awt.Toolkit"); - XToolkit xToolkit = (XToolkit) UnoRuntime.queryInterface(XToolkit.class, toolkit); + XToolkit xToolkit = UnoRuntime.queryInterface(XToolkit.class, toolkit); WindowDescriptor aDescriptor = new WindowDescriptor(); aDescriptor.Type = WindowClass.SIMPLE; @@ -164,9 +164,9 @@ public class DocumentPreview aDescriptor.WindowAttributes = VclWindowPeerAttribute.CLIPCHILDREN | WindowAttribute.SHOW; XWindowPeer xPeer = xToolkit.createWindow(aDescriptor); - xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, xPeer); + xWindow = UnoRuntime.queryInterface(XWindow.class, xPeer); Object frame = xmsf.createInstance("com.sun.star.frame.Frame"); - xFrame = (XFrame) UnoRuntime.queryInterface(XFrame.class, frame); + xFrame = UnoRuntime.queryInterface(XFrame.class, frame); // XFrame xF = (XFrame) UnoRuntime.queryInterface(XFrame.class, Desktop.getDesktop(xmsf)); // xFrame = xF.findFrame("_blank", 0); xFrame.initialize(xWindow); diff --git a/wizards/com/sun/star/wizards/ui/FieldSelection.java b/wizards/com/sun/star/wizards/ui/FieldSelection.java index 1a4ef1bf75e7..9083b13ec49f 100644 --- a/wizards/com/sun/star/wizards/ui/FieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/FieldSelection.java @@ -210,7 +210,7 @@ public class FieldSelection SelListBoxPosX = new Integer(cmdShiftButtonPosX.intValue() + cmdButtonWidth + cmdButtonHoriDist); IStep = new Integer(_iStep); - if (bshowFourButtons == true) + if (bshowFourButtons) { ShiftButtonCount = 4; } @@ -254,7 +254,7 @@ public class FieldSelection Boolean.FALSE, 14, HelpIds.getHelpIdString(_FirstHelpIndex + 1), ">", cmdShiftButtonPosX, ShiftButtonPosY[a++], IStep, new Short(curtabindex++), CmdButtonWidth }); - if (bshowFourButtons == true) + if (bshowFourButtons) { btnmoveall = CurUnoDialog.insertButton("cmdMoveAll" + sIncSuffix, SOCMDMOVEALL, new ActionListenerImpl(), new String[] @@ -276,7 +276,7 @@ public class FieldSelection Boolean.FALSE, 14, HelpIds.getHelpIdString(_FirstHelpIndex + 3), "<", cmdShiftButtonPosX, ShiftButtonPosY[a++], IStep, new Short(curtabindex++), CmdButtonWidth }); - if (bshowFourButtons == true) + if (bshowFourButtons) { btnremoveall = CurUnoDialog.insertButton("cmdRemoveAll" + sIncSuffix, SOCMDREMOVEALL, new ActionListenerImpl(), new String[] @@ -427,7 +427,7 @@ public class FieldSelection CurUnoDialog.setControlProperty("lstFields" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, BDoEnable); CurUnoDialog.setControlProperty("lstSelFields" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, BDoEnable); - if (BDoEnable.booleanValue() == true) + if (BDoEnable.booleanValue()) { toggleListboxButtons((short) - 1, (short) - 1); } @@ -466,11 +466,11 @@ public class FieldSelection bmoveUpenabled = ((iSelIndices[0] > 0) && (iSelIndices.length == 1)); bmoveDownenabled = (((iSelIndices[SelListBoxSelLength - 1]) < (short) (SelectCount - 1)) && (iSelIndices.length == 1)); } - CurUnoDialog.setControlProperty("cmdRemoveAll" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, new Boolean(SelectCount >= 1)); - CurUnoDialog.setControlProperty("cmdRemoveSelected" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, new Boolean(bSelectSelected)); + CurUnoDialog.setControlProperty("cmdRemoveAll" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(SelectCount >= 1)); + CurUnoDialog.setControlProperty("cmdRemoveSelected" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bSelectSelected)); toggleMoveButtons((FieldCount >= 1), bIsFieldSelected); - CurUnoDialog.setControlProperty("cmdMoveUp" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, new Boolean(bmoveUpenabled)); - CurUnoDialog.setControlProperty("cmdMoveDown" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, new Boolean(bmoveDownenabled)); + CurUnoDialog.setControlProperty("cmdMoveUp" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bmoveUpenabled)); + CurUnoDialog.setControlProperty("cmdMoveDown" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bmoveDownenabled)); } catch (Exception exception) { @@ -482,8 +482,8 @@ public class FieldSelection { boolean btoggleMoveAll = (((xFieldsListBox.getItemCount() + xSelectedFieldsListBox.getItemCount()) < maxfieldcount) && (_btoggleMoveAll)); boolean btoggleMoveSelected = (((xFieldsListBox.getSelectedItems().length + xSelectedFieldsListBox.getItemCount()) < maxfieldcount) && (_btoggleMoveSelected)); - CurUnoDialog.setControlProperty("cmdMoveAll" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, new Boolean(btoggleMoveAll)); - CurUnoDialog.setControlProperty("cmdMoveSelected" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, new Boolean(btoggleMoveSelected)); + CurUnoDialog.setControlProperty("cmdMoveAll" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(btoggleMoveAll)); + CurUnoDialog.setControlProperty("cmdMoveSelected" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(btoggleMoveSelected)); } public void setMultipleMode(boolean _bisMultiple) diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java b/wizards/com/sun/star/wizards/ui/FilterComponent.java index 1bc24f71ac41..8c8ee10a1a83 100644 --- a/wizards/com/sun/star/wizards/ui/FilterComponent.java +++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java @@ -137,7 +137,7 @@ public class FilterComponent case SO_FOURTHFIELDNAME: sControlName = getControlName(EventObject.Source); String sControlNameSuffix = sIncSuffix + "_" + getIndexNumber(sControlName); - XListBox xCurFieldListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, CurUnoDialog.xDlgContainer.getControl(sControlName)); + XListBox xCurFieldListBox = UnoRuntime.queryInterface(XListBox.class, CurUnoDialog.xDlgContainer.getControl(sControlName)); String CurDisplayFieldName = xCurFieldListBox.getSelectedItem(); FieldColumn CurFieldColumn = new FieldColumn(oQueryMetaData, CurDisplayFieldName); @@ -198,8 +198,7 @@ public class FilterComponent public static String getIndexNumber(String _sStr) { - String sLastNumber = _sStr.substring(_sStr.length() - 1, _sStr.length()); - return sLastNumber; + return _sStr.substring(_sStr.length() - 1, _sStr.length()); } /** @@ -223,10 +222,9 @@ public class FilterComponent { try { - XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, _oSourceevent); - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControl.getModel()); - final String sName = AnyConverter.toString(xPSet.getPropertyValue(PropertyNames.PROPERTY_NAME)); - return sName; + XControl xControl = UnoRuntime.queryInterface(XControl.class, _oSourceevent); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xControl.getModel()); + return AnyConverter.toString(xPSet.getPropertyValue(PropertyNames.PROPERTY_NAME)); } catch (Exception e) { @@ -246,7 +244,7 @@ public class FilterComponent try { final String serviceName = "com.sun.star.beans.PropertyBag"; - final XPropertyContainer column = (XPropertyContainer) UnoRuntime.queryInterface(XPropertyContainer.class, oQueryMetaData.xMSF.createInstance(serviceName)); + final XPropertyContainer column = UnoRuntime.queryInterface(XPropertyContainer.class, oQueryMetaData.xMSF.createInstance(serviceName)); column.addProperty("Type", PropertyAttribute.BOUND, DataType.VARCHAR); column.addProperty(PropertyNames.PROPERTY_NAME, PropertyAttribute.BOUND, PropertyNames.EMPTY_STRING); @@ -288,7 +286,7 @@ public class FilterComponent || (operator == SQLFilterOperator.NOT_SQLNULL) || AnyConverter.isVoid(value)) { - column.addProperty("Value", (short) (PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE), new String()); + column.addProperty("Value", (short) (PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE), ""); value = new Any(new Type(TypeClass.VOID), null); } else @@ -362,7 +360,7 @@ public class FilterComponent { boolean bisany = true; int ifilterstate = SOI_MATCHALL; - bisany = (this.optMatchAny.getState()) == true; + bisany = (this.optMatchAny.getState()); if (bisany) { ifilterstate = SOI_MATCHANY; @@ -563,7 +561,7 @@ public class FilterComponent m_bEnabled = _bEnabled; // Label Field - ControlElements[0] = (XInterface) CurUnoDialog.insertLabel("lblFieldNames" + sCompSuffix, + ControlElements[0] = CurUnoDialog.insertLabel("lblFieldNames" + sCompSuffix, new String[] { PropertyNames.PROPERTY_ENABLED, @@ -588,7 +586,7 @@ public class FilterComponent }); // Label Operator - ControlElements[1] = (XInterface) CurUnoDialog.insertLabel("lblOperators" + sCompSuffix, + ControlElements[1] = CurUnoDialog.insertLabel("lblOperators" + sCompSuffix, new String[] { PropertyNames.PROPERTY_ENABLED, @@ -613,7 +611,7 @@ public class FilterComponent }); // Label Value - ControlElements[2] = (XInterface) CurUnoDialog.insertLabel("lblValue" + sCompSuffix, + ControlElements[2] = CurUnoDialog.insertLabel("lblValue" + sCompSuffix, new String[] { PropertyNames.PROPERTY_ENABLED, @@ -638,7 +636,7 @@ public class FilterComponent }); // Listbox Fields - ControlElements[SOLSTFIELDNAME] = (XInterface) CurUnoDialog.insertListBox("lstFieldName" + sCompSuffix, SO_FIELDNAMELIST[Index], null, new ItemListenerImpl(), + ControlElements[SOLSTFIELDNAME] = CurUnoDialog.insertListBox("lstFieldName" + sCompSuffix, SO_FIELDNAMELIST[Index], null, new ItemListenerImpl(), new String[] { PropertyNames.PROPERTY_ENABLED, @@ -667,7 +665,7 @@ public class FilterComponent }); // Listbox Operators - ControlElements[SOLSTOPERATOR] = (XInterface) CurUnoDialog.insertListBox("lstOperator" + sCompSuffix, SO_CONDITIONLIST[Index], null, new ItemListenerImpl(), + ControlElements[SOLSTOPERATOR] = CurUnoDialog.insertListBox("lstOperator" + sCompSuffix, SO_CONDITIONLIST[Index], null, new ItemListenerImpl(), new String[] { PropertyNames.PROPERTY_ENABLED, @@ -696,7 +694,7 @@ public class FilterComponent Short.valueOf(curtabindex++), Integer.valueOf(nOperatorWidth) }); - ControlElements[SOTXTVALUE] = (XInterface) CurUnoDialog.insertFormattedField("txtValue" + sCompSuffix, SO_TEXTFIELDLIST[Index], new TextListenerImpl(), + ControlElements[SOTXTVALUE] = CurUnoDialog.insertFormattedField("txtValue" + sCompSuffix, SO_TEXTFIELDLIST[Index], new TextListenerImpl(), new String[] { PropertyNames.PROPERTY_ENABLED, @@ -778,9 +776,9 @@ public class FilterComponent { try { - XListBox xFieldsListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, ControlElements[SOLSTFIELDNAME]); + XListBox xFieldsListBox = UnoRuntime.queryInterface(XListBox.class, ControlElements[SOLSTFIELDNAME]); xFieldsListBox.selectItem(_filtercondition.Name, true); - XListBox xOperatorListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, ControlElements[SOLSTOPERATOR]); + XListBox xOperatorListBox = UnoRuntime.queryInterface(XListBox.class, ControlElements[SOLSTOPERATOR]); xOperatorListBox.selectItemPos((short) (_filtercondition.Handle - 1), true); if (AnyConverter.isString(_filtercondition.Value)) diff --git a/wizards/com/sun/star/wizards/ui/ImageList.java b/wizards/com/sun/star/wizards/ui/ImageList.java index 5ee289ecf8a4..02e7668db727 100644 --- a/wizards/com/sun/star/wizards/ui/ImageList.java +++ b/wizards/com/sun/star/wizards/ui/ImageList.java @@ -222,7 +222,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener new Integer(selectionWidth) }); - XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, grbxSelectedImage); + XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, grbxSelectedImage); xWindow.addMouseListener(new OMouseListener()); final String[] pNames1 = new String[] @@ -366,7 +366,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener m_imageWidth }); - XWindow win = (XWindow) UnoRuntime.queryInterface(XWindow.class, image); + XWindow win = UnoRuntime.queryInterface(XWindow.class, image); win.addMouseListener(uiEventListener); win.addKeyListener(imageKeyListener); //uiEventListener.add(imageName,EventNames.EVENT_MOUSE_ENTERED,METHOD_MOUSE_ENTER_IMAGE); @@ -408,7 +408,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener { if (oResources.length == 1) { - Helper.setUnoPropertyValue(m_aImages[i].getModel(), PropertyNames.PROPERTY_IMAGEURL, (String) oResources[0]); + Helper.setUnoPropertyValue(m_aImages[i].getModel(), PropertyNames.PROPERTY_IMAGEURL, oResources[0]); } else if (oResources.length == 2) { @@ -500,7 +500,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener private void setVisible(Object control, boolean visible) { - ((XWindow) UnoRuntime.queryInterface(XWindow.class, control)).setVisible(visible); + UnoRuntime.queryInterface(XWindow.class, control).setVisible(visible); } /** @@ -861,8 +861,8 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener private void enableButtons() { - enable(btnNext, new Boolean(pageStart + rows * cols < listModel.getSize())); - enable(btnBack, new Boolean(pageStart > 0)); + enable(btnNext, Boolean.valueOf(pageStart + rows * cols < listModel.getSize())); + enable(btnBack, Boolean.valueOf(pageStart > 0)); } private void enable(Object control, Boolean enable) @@ -872,7 +872,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener private Object getModel(Object control) { - return ((XControl) UnoRuntime.queryInterface(XControl.class, control)).getModel(); + return UnoRuntime.queryInterface(XControl.class, control).getModel(); } /* @@ -1081,7 +1081,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener { Helper.setUnoPropertyValue(m_aImages[image].getModel(), "Tabstop", Boolean.TRUE); - XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, m_aImages[image]); + XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, m_aImages[image]); xWindow.setFocus(); } diff --git a/wizards/com/sun/star/wizards/ui/PathSelection.java b/wizards/com/sun/star/wizards/ui/PathSelection.java index 249a47a6b803..fbeb54f84f35 100755 --- a/wizards/com/sun/star/wizards/ui/PathSelection.java +++ b/wizards/com/sun/star/wizards/ui/PathSelection.java @@ -81,7 +81,7 @@ public class PathSelection PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { - new Boolean(Enabled), 8, LabelText, new Integer(XPos), new Integer(YPos), new Integer(DialogStep), new Short(CurTabIndex), new Integer(Width) + Boolean.valueOf(Enabled), 8, LabelText, new Integer(XPos), new Integer(YPos), new Integer(DialogStep), new Short(CurTabIndex), new Integer(Width) }); xSaveTextBox = CurUnoDialog.insertTextField("txtSavePath", "callXPathSelectionListener", this, new String[] @@ -89,7 +89,7 @@ public class PathSelection PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { - new Boolean(Enabled), 12, TxtHelpURL, new Integer(XPos), new Integer(YPos + 10), new Integer(DialogStep), new Short((short) (CurTabIndex + 1)), new Integer(Width - 26) + Boolean.valueOf(Enabled), 12, TxtHelpURL, new Integer(XPos), new Integer(YPos + 10), new Integer(DialogStep), new Short((short) (CurTabIndex + 1)), new Integer(Width - 26) }); //CurUnoDialog.setControlProperty("txtSavePath", PropertyNames.READ_ONLY, Boolean.TRUE); CurUnoDialog.setControlProperty("txtSavePath", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); @@ -98,7 +98,7 @@ public class PathSelection PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { - new Boolean(Enabled), 14, BtnHelpURL, "...", new Integer(XPos + Width - 16), new Integer(YPos + 9), new Integer(DialogStep), new Short((short) (CurTabIndex + 2)), 16 + Boolean.valueOf(Enabled), 14, BtnHelpURL, "...", new Integer(XPos + Width - 16), new Integer(YPos + 9), new Integer(DialogStep), new Short((short) (CurTabIndex + 2)), 16 }); } diff --git a/wizards/com/sun/star/wizards/ui/PeerConfig.java b/wizards/com/sun/star/wizards/ui/PeerConfig.java index a13a02f0153c..1fed4a961f7a 100644 --- a/wizards/com/sun/star/wizards/ui/PeerConfig.java +++ b/wizards/com/sun/star/wizards/ui/PeerConfig.java @@ -115,7 +115,7 @@ public class PeerConfig implements XWindowListener for (int i = 0; i < this.m_aPeerTasks.size(); i++) { PeerTask aPeerTask = (PeerTask) m_aPeerTasks.elementAt(i); - XVclWindowPeer xVclWindowPeer = (XVclWindowPeer) UnoRuntime.queryInterface(XVclWindowPeer.class, aPeerTask.xControl.getPeer()); + XVclWindowPeer xVclWindowPeer = UnoRuntime.queryInterface(XVclWindowPeer.class, aPeerTask.xControl.getPeer()); for (int n = 0; n < aPeerTask.propnames.length; n++) { xVclWindowPeer.setProperty(aPeerTask.propnames[n], aPeerTask.propvalues[n]); @@ -167,7 +167,7 @@ public class PeerConfig implements XWindowListener */ public void setAccessibleName(Object oAPIControl, String _saccessname) { - XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, oAPIControl); + XControl xControl = UnoRuntime.queryInterface(XControl.class, oAPIControl); setPeerProperties(xControl, new String[] { "AccessibleName" @@ -196,7 +196,7 @@ public class PeerConfig implements XWindowListener */ public void setPeerProperties(Object oAPIControl, String[] _propnames, Object[] _propvalues) { - XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, oAPIControl); + XControl xControl = UnoRuntime.queryInterface(XControl.class, oAPIControl); setPeerProperties(xControl, _propnames, _propvalues); } diff --git a/wizards/com/sun/star/wizards/ui/SortingComponent.java b/wizards/com/sun/star/wizards/ui/SortingComponent.java index bf1576525947..50ffa59a254c 100644 --- a/wizards/com/sun/star/wizards/ui/SortingComponent.java +++ b/wizards/com/sun/star/wizards/ui/SortingComponent.java @@ -61,10 +61,10 @@ public class SortingComponent public void itemStateChanged(ItemEvent EventObject) { - Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, new Boolean(false)); + Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); int ikey = CurUnoDialog.getControlKey(EventObject.Source, CurUnoDialog.ControlList); enableNextSortListBox(ikey); - Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, new Boolean(true)); + Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); } public void disposing(com.sun.star.lang.EventObject eventObject) @@ -97,16 +97,16 @@ public class SortingComponent for (int i = 0; i < 4; i++) { bDoEnable = (i < 2); - CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lblSort" + new Integer(i + 1).toString(), new String[] + CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lblSort" + Integer.toString(i + 1), new String[] { PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.ORIENTATION, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { - new Boolean(bDoEnable), 8, sSortHeader[i], 0, ICompPosX, new Integer(iCurPosY), IStep, new Short(curtabindex++), ICompWidth + Boolean.valueOf(bDoEnable), 8, sSortHeader[i], 0, ICompPosX, new Integer(iCurPosY), IStep, new Short(curtabindex++), ICompWidth }); HIDString = HelpIds.getHelpIdString(FirstHelpIndex); - xSortListBox[i] = CurUnoDialog.insertListBox("lstSort" + new Integer(i + 1).toString(), SOSORTLST[i], null, new ItemListenerImpl(), new String[] + xSortListBox[i] = CurUnoDialog.insertListBox("lstSort" + Integer.toString(i + 1), SOSORTLST[i], null, new ItemListenerImpl(), new String[] { "Dropdown", PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] @@ -165,10 +165,7 @@ public class SortingComponent int FieldCount = _FieldNames.length; String[] ViewFieldNames = new String[FieldCount + 1]; ViewFieldNames[0] = sNoSorting; - for (int i = 0; i < FieldCount; i++) - { - ViewFieldNames[i + 1] = _FieldNames[i]; - } + System.arraycopy(_FieldNames, 0, ViewFieldNames, 1, FieldCount); short[] SelList = null; for (int i = 0; i < 4; i++) { @@ -186,8 +183,8 @@ public class SortingComponent (short) 0 }; } - CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 1).toString(), PropertyNames.STRING_ITEM_LIST, ViewFieldNames); - CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 1).toString(), PropertyNames.SELECTED_ITEMS, SelList); + CurUnoDialog.setControlProperty("lstSort" + Integer.toString(i + 1), PropertyNames.STRING_ITEM_LIST, ViewFieldNames); + CurUnoDialog.setControlProperty("lstSort" + Integer.toString(i + 1), PropertyNames.SELECTED_ITEMS, SelList); toggleSortListBox(i, (i <= _SortFieldNames.length)); } } @@ -211,7 +208,7 @@ public class SortingComponent */ public void setReadOnly(int _index, boolean _breadonly) { - CurUnoDialog.setControlProperty("lstSort" + new Integer(_index + 1).toString(), PropertyNames.READ_ONLY, new Boolean(_breadonly)); + CurUnoDialog.setControlProperty("lstSort" + Integer.toString(_index + 1), PropertyNames.READ_ONLY, Boolean.valueOf(_breadonly)); } /** @@ -265,7 +262,7 @@ public class SortingComponent { CurFieldName = xSortListBox[i].getSelectedItem(); SortDescriptions.add(CurFieldName); - iCurState = ((Short) CurUnoDialog.getControlProperty("optAscend" + new Integer(i + 1).toString(), PropertyNames.PROPERTY_STATE)).shortValue(); + iCurState = ((Short) CurUnoDialog.getControlProperty("optAscend" + Integer.toString(i + 1), PropertyNames.PROPERTY_STATE)).shortValue(); SortFieldNames.add(new String[]{CurFieldName,iCurState == 1 ? PropertyNames.ASC :"DESC" }); } } @@ -303,7 +300,7 @@ public class SortingComponent toggleSortListBox(i, (false)); if (i < MaxSortIndex) { - CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 2).toString(), PropertyNames.SELECTED_ITEMS, new short[] + CurUnoDialog.setControlProperty("lstSort" + Integer.toString(i + 2), PropertyNames.SELECTED_ITEMS, new short[] { 0 }); @@ -319,22 +316,22 @@ public class SortingComponent private void moveupSortItems(int CurIndex, boolean bDoEnable) { short iNextItemPos; - if ((bDoEnable == false) && (MAXSORTCRITERIAINDEX > CurIndex)) + if ((!bDoEnable) && (MAXSORTCRITERIAINDEX > CurIndex)) { for (int i = CurIndex; i < MAXSORTCRITERIAINDEX; i++) { iNextItemPos = xSortListBox[i + 1].getSelectedItemPos(); if (iNextItemPos != 0) { - CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 1).toString(), PropertyNames.SELECTED_ITEMS, new short[] + CurUnoDialog.setControlProperty("lstSort" + Integer.toString(i + 1), PropertyNames.SELECTED_ITEMS, new short[] { iNextItemPos }); - CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 2).toString(), PropertyNames.SELECTED_ITEMS, new short[] + CurUnoDialog.setControlProperty("lstSort" + Integer.toString(i + 2), PropertyNames.SELECTED_ITEMS, new short[] { }); toggleSortListBox(i, true); - CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 2).toString(), PropertyNames.SELECTED_ITEMS, new short[] + CurUnoDialog.setControlProperty("lstSort" + Integer.toString(i + 2), PropertyNames.SELECTED_ITEMS, new short[] { 0 }); @@ -357,13 +354,13 @@ public class SortingComponent { if (CurIndex < xSortListBox.length) { - CurUnoDialog.setControlProperty("lblSort" + new Integer(CurIndex + 1).toString(), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); - CurUnoDialog.setControlProperty("lstSort" + new Integer(CurIndex + 1).toString(), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); - CurUnoDialog.setControlProperty("optAscend" + new Integer(CurIndex + 1).toString(), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); - CurUnoDialog.setControlProperty("optDescend" + new Integer(CurIndex + 1).toString(), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); - if (bDoEnable == false) + CurUnoDialog.setControlProperty("lblSort" + Integer.toString(CurIndex + 1), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bDoEnable)); + CurUnoDialog.setControlProperty("lstSort" + Integer.toString(CurIndex + 1), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bDoEnable)); + CurUnoDialog.setControlProperty("optAscend" + Integer.toString(CurIndex + 1), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bDoEnable)); + CurUnoDialog.setControlProperty("optDescend" + Integer.toString(CurIndex + 1), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bDoEnable)); + if (!bDoEnable) { - CurUnoDialog.setControlProperty("lstSort" + new Integer(CurIndex + 1).toString(), PropertyNames.SELECTED_ITEMS, new short[] + CurUnoDialog.setControlProperty("lstSort" + Integer.toString(CurIndex + 1), PropertyNames.SELECTED_ITEMS, new short[] { 0 }); diff --git a/wizards/com/sun/star/wizards/ui/TitlesComponent.java b/wizards/com/sun/star/wizards/ui/TitlesComponent.java index 6ef9557b158f..4858c22a221d 100644 --- a/wizards/com/sun/star/wizards/ui/TitlesComponent.java +++ b/wizards/com/sun/star/wizards/ui/TitlesComponent.java @@ -111,7 +111,7 @@ public class TitlesComponent extends ControlScroller }, new Object[] { - 16, new Boolean(true), new Integer(iLabelPosX), new Integer(_iCompPosY + 1), UIConsts.INVISIBLESTEP, new Short(curtabindex++), 30 + 16, Boolean.TRUE, new Integer(iLabelPosX), new Integer(_iCompPosY + 1), UIConsts.INVISIBLESTEP, new Short(curtabindex++), 30 }); xTextComponent = CurUnoDialog.insertTextField(stextfieldname, 0, null, diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java b/wizards/com/sun/star/wizards/ui/UnoDialog.java index 1798986a563a..7149503dfd6d 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java @@ -82,19 +82,19 @@ public class UnoDialog implements EventNames this.xMSF = xMSF; ControlList = new Hashtable(); xDialogModel = (XInterface) xMSF.createInstance("com.sun.star.awt.UnoControlDialogModel"); - XMultiPropertySet xMultiPSetDlg = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, xDialogModel); + XMultiPropertySet xMultiPSetDlg = UnoRuntime.queryInterface(XMultiPropertySet.class, xDialogModel); xMultiPSetDlg.setPropertyValues(PropertyNames, PropertyValues); - MSFDialogModel = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xDialogModel); + MSFDialogModel = UnoRuntime.queryInterface(XMultiServiceFactory.class, xDialogModel); xUnoDialog = (XInterface) xMSF.createInstance("com.sun.star.awt.UnoControlDialog"); - xControl = (XControl) UnoRuntime.queryInterface(XControl.class, xUnoDialog); - XControlModel xControlModel = (XControlModel) UnoRuntime.queryInterface(XControlModel.class, xDialogModel); + xControl = UnoRuntime.queryInterface(XControl.class, xUnoDialog); + XControlModel xControlModel = UnoRuntime.queryInterface(XControlModel.class, xDialogModel); xControl.setModel(xControlModel); - xPSetDlg = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xDialogModel); - xDlgContainer = (XControlContainer) UnoRuntime.queryInterface(XControlContainer.class, xUnoDialog); - xDlgNames = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, xDialogModel); + xPSetDlg = UnoRuntime.queryInterface(XPropertySet.class, xDialogModel); + xDlgContainer = UnoRuntime.queryInterface(XControlContainer.class, xUnoDialog); + xDlgNames = UnoRuntime.queryInterface(XNameContainer.class, xDialogModel); // xDlgNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xDialogModel); - xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xUnoDialog); - xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, xUnoDialog); + xComponent = UnoRuntime.queryInterface(XComponent.class, xUnoDialog); + xWindow = UnoRuntime.queryInterface(XWindow.class, xUnoDialog); // setPeerConfiguration(); // LLA: will be done, if really used! } @@ -107,9 +107,9 @@ public class UnoDialog implements EventNames public int getControlKey(Object EventObject, Hashtable ControlList) { int iKey; - XControl xContrl = (XControl) UnoRuntime.queryInterface(XControl.class, EventObject); + XControl xContrl = UnoRuntime.queryInterface(XControl.class, EventObject); XControlModel xControlModel = xContrl.getModel(); - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControlModel); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xControlModel); try { String sName = (String) xPSet.getPropertyValue(PropertyNames.PROPERTY_NAME); @@ -142,7 +142,7 @@ public class UnoDialog implements EventNames { if (m_xDlgNameAccess == null) { - m_xDlgNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xDialogModel); + m_xDlgNameAccess = UnoRuntime.queryInterface(XNameAccess.class, xDialogModel); } return m_xDlgNameAccess; } @@ -152,12 +152,12 @@ public class UnoDialog implements EventNames { if (PropertyValue != null) { - if (getDlgNameAccess().hasByName(ControlName) == false) + if (!getDlgNameAccess().hasByName(ControlName)) { return; } Object xControlModel = getDlgNameAccess().getByName(ControlName); - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControlModel); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xControlModel); if (AnyConverter.isArray(PropertyValue)) { com.sun.star.uno.Type seqType = new com.sun.star.uno.Type(PropertyValue.getClass()); @@ -187,12 +187,12 @@ public class UnoDialog implements EventNames { if (PropertyValues != null) { - if (getDlgNameAccess().hasByName(ControlName) == false) + if (!getDlgNameAccess().hasByName(ControlName)) { return; } Object xControlModel = getDlgNameAccess().getByName(ControlName); - XMultiPropertySet xMultiPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, xControlModel); + XMultiPropertySet xMultiPSet = UnoRuntime.queryInterface(XMultiPropertySet.class, xControlModel); xMultiPSet.setPropertyValues(PropertyNames, PropertyValues); } } @@ -207,12 +207,8 @@ public class UnoDialog implements EventNames try { Object xControlModel = getDlgNameAccess().getByName(ControlName); - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControlModel); - Object oPropValue = xPSet.getPropertyValue(PropertyName); - // if (AnyConverter.isArray(oPropValue)) - // return Helper.getArrayValue(oPropValue); - // else - return oPropValue; + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xControlModel); + return xPSet.getPropertyValue(PropertyName); } catch (com.sun.star.uno.Exception exception) { // com.sun.star.container.NoSuchElementException, com.sun.star.beans.UnknownPropertyException, @@ -226,7 +222,7 @@ public class UnoDialog implements EventNames try { Object xControlModel = getDlgNameAccess().getByName(ControlName); - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControlModel); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xControlModel); Property[] allProps = xPSet.getPropertySetInfo().getProperties(); for (int i = 0; i < allProps.length; i++) { @@ -243,20 +239,19 @@ public class UnoDialog implements EventNames public double getMAPConversionFactor(String ControlName) { XControl xControl2 = xDlgContainer.getControl(ControlName); - XView xView = (XView) UnoRuntime.queryInterface(XView.class, xControl2); + XView xView = UnoRuntime.queryInterface(XView.class, xControl2); Size aSize = xView.getSize(); double dblMAPWidth = (double) (((Integer) Helper.getUnoPropertyValue(xControl2.getModel(), PropertyNames.PROPERTY_WIDTH)).intValue()); - double dblFactor = (((double) (aSize.Width)) / dblMAPWidth); - return dblFactor; + return (((double) (aSize.Width)) / dblMAPWidth); } public Size getpreferredLabelSize(String LabelName, String sLabel) { XControl xControl2 = xDlgContainer.getControl(LabelName); - XFixedText xFixedText = (XFixedText) UnoRuntime.queryInterface(XFixedText.class, xControl2); + XFixedText xFixedText = UnoRuntime.queryInterface(XFixedText.class, xControl2); String OldText = xFixedText.getText(); xFixedText.setText(sLabel); - XLayoutConstrains xLayoutConstrains = (XLayoutConstrains) UnoRuntime.queryInterface(XLayoutConstrains.class, xControl2); + XLayoutConstrains xLayoutConstrains = UnoRuntime.queryInterface(XLayoutConstrains.class, xControl2); Size aSize = xLayoutConstrains.getPreferredSize(); xFixedText.setText(OldText); return aSize; @@ -307,10 +302,10 @@ public class UnoDialog implements EventNames try { Object oFixedText = insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", sName, sPropNames, oPropValues); - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oFixedText); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oFixedText); xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName); - Object oLabel = xDlgContainer.getControl(new String(sName)); - return (XFixedText) UnoRuntime.queryInterface(XFixedText.class, oLabel); + Object oLabel = xDlgContainer.getControl(sName); + return UnoRuntime.queryInterface(XFixedText.class, oLabel); } catch (java.lang.Exception ex) { @@ -334,10 +329,10 @@ public class UnoDialog implements EventNames public XButton insertButton(String sName, int iControlKey, XActionListener xActionListener, String[] sProperties, Object[] sValues) throws com.sun.star.uno.Exception { Object oButtonModel = insertControlModel("com.sun.star.awt.UnoControlButtonModel", sName, sProperties, sValues); - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oButtonModel); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oButtonModel); xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName); - Object objectButton = xDlgContainer.getControl(new String(sName)); - XButton xButton = (XButton) UnoRuntime.queryInterface(XButton.class, objectButton); + Object objectButton = xDlgContainer.getControl(sName); + XButton xButton = UnoRuntime.queryInterface(XButton.class, objectButton); if (xActionListener != null) { xButton.addActionListener(xActionListener); @@ -353,10 +348,10 @@ public class UnoDialog implements EventNames public void insertCheckBox(String sName, int iControlKey, XItemListener xItemListener, String[] sProperties, Object[] sValues) throws com.sun.star.uno.Exception { Object oButtonModel = insertControlModel("com.sun.star.awt.UnoControlCheckBoxModel", sName, sProperties, sValues); - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oButtonModel); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oButtonModel); xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName); - Object objectCheckBox = xDlgContainer.getControl(new String(sName)); - XCheckBox xCheckBox = (XCheckBox) UnoRuntime.queryInterface(XCheckBox.class, objectCheckBox); + Object objectCheckBox = xDlgContainer.getControl(sName); + XCheckBox xCheckBox = UnoRuntime.queryInterface(XCheckBox.class, objectCheckBox); if (xItemListener != null) { xCheckBox.addItemListener(xItemListener); @@ -371,10 +366,10 @@ public class UnoDialog implements EventNames public void insertNumericField(String sName, int iControlKey, XTextListener xTextListener, String[] sProperties, Object[] sValues) throws com.sun.star.uno.Exception { Object oNumericFieldModel = insertControlModel("com.sun.star.awt.UnoControlNumericFieldModel", sName, sProperties, sValues); - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oNumericFieldModel); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oNumericFieldModel); xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName); - Object objectNumericField = xDlgContainer.getControl(new String(sName)); - XTextComponent xNumericField = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, objectNumericField); + Object objectNumericField = xDlgContainer.getControl(sName); + XTextComponent xNumericField = UnoRuntime.queryInterface(XTextComponent.class, objectNumericField); if (xTextListener != null) { xNumericField.addTextListener(xTextListener); @@ -391,10 +386,10 @@ public class UnoDialog implements EventNames try { Object oScrollModel = insertControlModel("com.sun.star.awt.UnoControlScrollBarModel", sName, sProperties, sValues); - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oScrollModel); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oScrollModel); xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName); - Object oScrollBar = xDlgContainer.getControl(new String(sName)); - XScrollBar xScrollBar = (XScrollBar) UnoRuntime.queryInterface(XScrollBar.class, oScrollBar); + Object oScrollBar = xDlgContainer.getControl(sName); + XScrollBar xScrollBar = UnoRuntime.queryInterface(XScrollBar.class, oScrollBar); if (xAdjustmentListener != null) { xScrollBar.addAdjustmentListener(xAdjustmentListener); @@ -415,14 +410,12 @@ public class UnoDialog implements EventNames public XTextComponent insertTextField(String sName, int iControlKey, XTextListener xTextListener, String[] sProperties, Object[] sValues) { - XTextComponent xTextBox = insertEditField("com.sun.star.awt.UnoControlEditModel", sName, iControlKey, xTextListener, sProperties, sValues); - return xTextBox; + return insertEditField("com.sun.star.awt.UnoControlEditModel", sName, iControlKey, xTextListener, sProperties, sValues); } public XTextComponent insertFormattedField(String sName, int iControlKey, XTextListener xTextListener, String[] sProperties, Object[] sValues) { - XTextComponent xTextBox = insertEditField("com.sun.star.awt.UnoControlFormattedFieldModel", sName, iControlKey, xTextListener, sProperties, sValues); - return xTextBox; + return insertEditField("com.sun.star.awt.UnoControlFormattedFieldModel", sName, iControlKey, xTextListener, sProperties, sValues); } public XTextComponent insertEditField(String ServiceName, String sName, int iControlKey, XTextListener xTextListener, String[] sProperties, Object[] sValues) @@ -430,10 +423,10 @@ public class UnoDialog implements EventNames try { XInterface xTextModel = insertControlModel(ServiceName, sName, sProperties, sValues); - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextModel); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xTextModel); xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName); - XControl xTextField = xDlgContainer.getControl(new String(sName)); - XTextComponent xTextBox = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, xTextField); + XControl xTextField = xDlgContainer.getControl(sName); + XTextComponent xTextBox = UnoRuntime.queryInterface(XTextComponent.class, xTextField); if (xTextListener != null) { xTextBox.addTextListener(xTextListener); @@ -452,10 +445,10 @@ public class UnoDialog implements EventNames public XListBox insertListBox(String sName, int iControlKey, XActionListener xActionListener, XItemListener xItemListener, String[] sProperties, Object[] sValues) throws com.sun.star.uno.Exception { XInterface xListBoxModel = insertControlModel("com.sun.star.awt.UnoControlListBoxModel", sName, sProperties, sValues); - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xListBoxModel); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xListBoxModel); xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName); - XControl xControlListBox = xDlgContainer.getControl(new String(sName)); - XListBox xListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, xControlListBox); + XControl xControlListBox = xDlgContainer.getControl(sName); + XListBox xListBox = UnoRuntime.queryInterface(XListBox.class, xControlListBox); if (xItemListener != null) { xListBox.addItemListener(xItemListener); @@ -472,17 +465,17 @@ public class UnoDialog implements EventNames public XComboBox insertComboBox(String sName, int iControlKey, XActionListener xActionListener, XTextListener xTextListener, XItemListener xItemListener, String[] sProperties, Object[] sValues) throws com.sun.star.uno.Exception { XInterface xComboBoxModel = insertControlModel("com.sun.star.awt.UnoControlComboBoxModel", sName, sProperties, sValues); - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xComboBoxModel); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xComboBoxModel); xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName); - XControl xControlComboBox = xDlgContainer.getControl(new String(sName)); - XComboBox xComboBox = (XComboBox) UnoRuntime.queryInterface(XComboBox.class, xControlComboBox); + XControl xControlComboBox = xDlgContainer.getControl(sName); + XComboBox xComboBox = UnoRuntime.queryInterface(XComboBox.class, xControlComboBox); if (xItemListener != null) { xComboBox.addItemListener(xItemListener); } if (xTextListener != null) { - XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, xComboBox); + XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, xComboBox); xTextComponent.addTextListener(xTextListener); } if (xActionListener != null) @@ -517,7 +510,7 @@ public class UnoDialog implements EventNames try { XRadioButton xRadioButton = insertRadioButton(sName, iControlKey, sProperties, sValues); - XButton xButton = (com.sun.star.awt.XButton) UnoRuntime.queryInterface(XButton.class, xRadioButton); + XButton xButton = UnoRuntime.queryInterface(XButton.class, xRadioButton); if (xActionListener != null) { xButton.addActionListener(xActionListener); @@ -544,11 +537,10 @@ public class UnoDialog implements EventNames try { XInterface oRadioButtonModel = insertControlModel("com.sun.star.awt.UnoControlRadioButtonModel", sName, sProperties, sValues); - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oRadioButtonModel); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oRadioButtonModel); xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName); - XControl xControlRadioButton = xDlgContainer.getControl(new String(sName)); - XRadioButton xRadioButton = (XRadioButton) UnoRuntime.queryInterface(XRadioButton.class, xControlRadioButton); - return xRadioButton; + XControl xControlRadioButton = xDlgContainer.getControl(sName); + return UnoRuntime.queryInterface(XRadioButton.class, xControlRadioButton); } catch (com.sun.star.uno.Exception exception) { @@ -647,7 +639,7 @@ public class UnoDialog implements EventNames public void setFocus(String ControlName) { Object oFocusControl = xDlgContainer.getControl(ControlName); - XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, oFocusControl); + XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, oFocusControl); xWindow.setFocus(); } @@ -735,10 +727,10 @@ public class UnoDialog implements EventNames { createWindowPeer(); } - xVclWindowPeer = (XVclWindowPeer) UnoRuntime.queryInterface(XVclWindowPeer.class, xWindowPeer); + xVclWindowPeer = UnoRuntime.queryInterface(XVclWindowPeer.class, xWindowPeer); // xVclWindowPeer.setProperty("AutoMnemonics", new Boolean(true)); - this.BisHighContrastModeActivated = new Boolean(this.isHighContrastModeActivated()); - xDialog = (XDialog) UnoRuntime.queryInterface(XDialog.class, xUnoDialog); + this.BisHighContrastModeActivated = Boolean.valueOf(this.isHighContrastModeActivated()); + xDialog = UnoRuntime.queryInterface(XDialog.class, xUnoDialog); return xDialog.execute(); } @@ -749,8 +741,8 @@ public class UnoDialog implements EventNames { createWindowPeer(); } - XVclWindowPeer xVclWindowPeer = (XVclWindowPeer) UnoRuntime.queryInterface(XVclWindowPeer.class, xWindowPeer); - xDialog = (XDialog) UnoRuntime.queryInterface(XDialog.class, xUnoDialog); + XVclWindowPeer xVclWindowPeer = UnoRuntime.queryInterface(XVclWindowPeer.class, xWindowPeer); + xDialog = UnoRuntime.queryInterface(XDialog.class, xUnoDialog); this.xWindow.setVisible(true); } @@ -774,7 +766,7 @@ public class UnoDialog implements EventNames */ public short executeDialog(XInterface xComponent) throws com.sun.star.uno.Exception { - XFrame frame = (XFrame) UnoRuntime.queryInterface(XFrame.class, xComponent); + XFrame frame = UnoRuntime.queryInterface(XFrame.class, xComponent); if (frame != null) { XWindow w = frame.getComponentWindow(); @@ -801,10 +793,10 @@ public class UnoDialog implements EventNames public void setAutoMnemonic(String ControlName, boolean bValue) { Object oControl = xDlgContainer.getControl(ControlName); - xControl = (XControl) UnoRuntime.queryInterface(XControl.class, oControl); + xControl = UnoRuntime.queryInterface(XControl.class, oControl); XWindowPeer xWindowPeer = xControl.getPeer(); - XVclWindowPeer xVclWindowPeer = (XVclWindowPeer) UnoRuntime.queryInterface(XVclWindowPeer.class, xControl.getPeer()); - xVclWindowPeer.setProperty("AutoMnemonics", new Boolean(bValue)); + XVclWindowPeer xVclWindowPeer = UnoRuntime.queryInterface(XVclWindowPeer.class, xControl.getPeer()); + xVclWindowPeer.setProperty("AutoMnemonics", Boolean.valueOf(bValue)); } public void modifyFontWeight(String ControlName, float FontWeight) @@ -828,10 +820,10 @@ public class UnoDialog implements EventNames Object tk = xMSF.createInstance("com.sun.star.awt.Toolkit"); if (parentPeer == null) { - parentPeer = ((XToolkit) UnoRuntime.queryInterface(XToolkit.class, tk)).getDesktopWindow(); + parentPeer = UnoRuntime.queryInterface(XToolkit.class, tk).getDesktopWindow(); } - XToolkit xToolkit = (XToolkit) UnoRuntime.queryInterface(XToolkit.class, tk); - xReschedule = (XReschedule) UnoRuntime.queryInterface(XReschedule.class, xToolkit); + XToolkit xToolkit = UnoRuntime.queryInterface(XToolkit.class, tk); + xReschedule = UnoRuntime.queryInterface(XReschedule.class, xToolkit); // TEUER! xControl.createPeer(xToolkit, parentPeer); xWindowPeer = xControl.getPeer(); @@ -855,7 +847,7 @@ public class UnoDialog implements EventNames public void deletefirstListboxEntry(String ListBoxName, String DelEntryName) { XControl xListControl = xDlgContainer.getControl(ListBoxName); - XListBox xListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, xListControl); + XListBox xListBox = UnoRuntime.queryInterface(XListBox.class, xListControl); String FirstItem = xListBox.getItem((short) 0); if (FirstItem.equals(DelEntryName)) { @@ -872,17 +864,16 @@ public class UnoDialog implements EventNames public void setPeerProperty(String ControlName, String PropertyName, Object PropertyValue) { Object oControl = xDlgContainer.getControl(ControlName); - XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, oControl); + XControl xControl = UnoRuntime.queryInterface(XControl.class, oControl); XWindowPeer xControlPeer = xControl.getPeer(); - XVclWindowPeer xVclWindowPeer = (XVclWindowPeer) UnoRuntime.queryInterface(XVclWindowPeer.class, xControlPeer); + XVclWindowPeer xVclWindowPeer = UnoRuntime.queryInterface(XVclWindowPeer.class, xControlPeer); xVclWindowPeer.setProperty(PropertyName, PropertyValue); } public static Object getModel(Object control) { - XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, control); - XControlModel xModel = xControl.getModel(); - return xModel; + XControl xControl = UnoRuntime.queryInterface(XControl.class, control); + return xControl.getModel(); } public static void setEnabled(Object control, boolean enabled) @@ -902,7 +893,7 @@ public class UnoDialog implements EventNames */ public static int getControlModelType(Object oControlModel) { - XServiceInfo xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, oControlModel); + XServiceInfo xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, oControlModel); if (xServiceInfo.supportsService("com.sun.star.awt.UnoControlFixedTextModel")) { return UIConsts.CONTROLTYPE.FIXEDTEXT; @@ -988,7 +979,7 @@ public class UnoDialog implements EventNames */ public static String getDisplayProperty(Object oControlModel) { - XServiceInfo xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, oControlModel); + XServiceInfo xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, oControlModel); int itype = getControlModelType(oControlModel); return getDisplayProperty(itype); } @@ -1075,7 +1066,7 @@ public class UnoDialog implements EventNames int nBlue = getBlueColorShare(nUIColor); int nLuminance = ((nBlue * 28 + nGreen * 151 + nRed * 77) / 256); boolean bisactivated = (nLuminance <= 25); - BisHighContrastModeActivated = new Boolean(bisactivated); + BisHighContrastModeActivated = Boolean.valueOf(bisactivated); return bisactivated; } else @@ -1091,9 +1082,9 @@ public class UnoDialog implements EventNames public static int getRedColorShare(int _nColor) { - int nRed = (int) _nColor / 65536; + int nRed = _nColor / 65536; int nRedModulo = _nColor % 65536; - int nGreen = (int) (nRedModulo / 256); + int nGreen = nRedModulo / 256; int nGreenModulo = (nRedModulo % 256); int nBlue = nGreenModulo; return nRed; @@ -1101,17 +1092,17 @@ public class UnoDialog implements EventNames public static int getGreenColorShare(int _nColor) { - int nRed = (int) _nColor / 65536; + int nRed = _nColor / 65536; int nRedModulo = _nColor % 65536; - int nGreen = (int) (nRedModulo / 256); + int nGreen = nRedModulo / 256; return nGreen; } public static int getBlueColorShare(int _nColor) { - int nRed = (int) _nColor / 65536; + int nRed = _nColor / 65536; int nRedModulo = _nColor % 65536; - int nGreen = (int) (nRedModulo / 256); + int nGreen = nRedModulo / 256; int nGreenModulo = (nRedModulo % 256); int nBlue = nGreenModulo; return nBlue; diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.java b/wizards/com/sun/star/wizards/ui/UnoDialog2.java index c42fd453f957..a938b16213f5 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.java @@ -134,7 +134,7 @@ public class UnoDialog2 extends UnoDialog implements EventNames } if (textChanged != null) { - XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, xComboBox); + XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, xComboBox); xTextComponent.addTextListener((XTextListener) guiEventListener); guiEventListener.add(sName, EVENT_TEXT_CHANGED, textChanged, eventTarget); } @@ -186,7 +186,7 @@ public class UnoDialog2 extends UnoDialog implements EventNames public XControl insertTitledBox(String sName, String[] sPropNames, Object[] oPropValues) { Object oTitledBox = insertControlModel2("com.sun.star.awt.UnoControlGroupBoxModel", sName, sPropNames, oPropValues); - return (XControl) UnoRuntime.queryInterface(XControl.class, oTitledBox); + return UnoRuntime.queryInterface(XControl.class, oTitledBox); } public XTextComponent insertTextField(String sName, String sTextChanged, Object eventTarget, String[] sPropNames, Object[] oPropValues) @@ -307,25 +307,25 @@ public class UnoDialog2 extends UnoDialog implements EventNames public XControl insertFixedLine(String sName, String[] sPropNames, Object[] oPropValues) { Object oLine = insertControlModel2("com.sun.star.awt.UnoControlFixedLineModel", sName, sPropNames, oPropValues); - return (XControl) UnoRuntime.queryInterface(XControl.class, oLine); + return UnoRuntime.queryInterface(XControl.class, oLine); } public XScrollBar insertScrollBar(String sName, String[] sPropNames, Object[] oPropValues) { Object oScrollBar = insertControlModel2("com.sun.star.awt.UnoControlScrollBarModel", sName, sPropNames, oPropValues); - return (XScrollBar) UnoRuntime.queryInterface(XScrollBar.class, oScrollBar); + return UnoRuntime.queryInterface(XScrollBar.class, oScrollBar); } public XProgressBar insertProgressBar(String sName, String[] sPropNames, Object[] oPropValues) { Object oProgressBar = insertControlModel2("com.sun.star.awt.UnoControlProgressBarModel", sName, sPropNames, oPropValues); - return (XProgressBar) UnoRuntime.queryInterface(XProgressBar.class, oProgressBar); + return UnoRuntime.queryInterface(XProgressBar.class, oProgressBar); } public XControl insertGroupBox(String sName, String[] sPropNames, Object[] oPropValues) { Object oGroupBox = insertControlModel2("com.sun.star.awt.UnoControlGroupBoxModel", sName, sPropNames, oPropValues); - return (XControl) UnoRuntime.queryInterface(XControl.class, oGroupBox); + return UnoRuntime.queryInterface(XControl.class, oGroupBox); } public Object insertControlModel2(String serviceName, String componentName, String[] sPropNames, Object[] oPropValues) @@ -347,8 +347,7 @@ public class UnoDialog2 extends UnoDialog implements EventNames { ex.printStackTrace(); } - final Object aObj = xDlgContainer.getControl(componentName); - return aObj; + return xDlgContainer.getControl(componentName); } private void setControlPropertiesDebug(Object model, String[] names, Object[] values) @@ -374,8 +373,7 @@ public class UnoDialog2 extends UnoDialog implements EventNames public static Object getControlModel(Object unoControl) { - Object obj = ((XControl) UnoRuntime.queryInterface(XControl.class, unoControl)).getModel(); - return obj; + return UnoRuntime.queryInterface(XControl.class, unoControl).getModel(); } public int showMessageBox(String windowServiceName, int windowAttribute, String MessageText) diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java b/wizards/com/sun/star/wizards/ui/WizardDialog.java index 9af5fc560a82..5273994741c6 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.java +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java @@ -109,7 +109,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL { try { - XTopWindow top = (XTopWindow) UnoRuntime.queryInterface(XTopWindow.class, xWindow); + XTopWindow top = UnoRuntime.queryInterface(XTopWindow.class, xWindow); if (top != null) { top.toFront(); @@ -178,12 +178,12 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL public void setRoadmapInteractive(boolean _bInteractive) { - Helper.setUnoPropertyValue(oRoadmap, "Activated", new Boolean(_bInteractive)); + Helper.setUnoPropertyValue(oRoadmap, "Activated", Boolean.valueOf(_bInteractive)); } public void setRoadmapComplete(boolean bComplete) { - Helper.setUnoPropertyValue(oRoadmap, "Complete", new Boolean(bComplete)); + Helper.setUnoPropertyValue(oRoadmap, "Complete", Boolean.valueOf(bComplete)); } public boolean isRoadmapComplete() @@ -254,18 +254,18 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL Boolean.TRUE, 85 }); - XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oRoadmap); + XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oRoadmap); xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, "rdmNavi"); - xSSFRoadmap = (XSingleServiceFactory) UnoRuntime.queryInterface(XSingleServiceFactory.class, oRoadmap); - xIndexContRoadmap = (XIndexContainer) UnoRuntime.queryInterface(XIndexContainer.class, oRoadmap); + xSSFRoadmap = UnoRuntime.queryInterface(XSingleServiceFactory.class, oRoadmap); + xIndexContRoadmap = UnoRuntime.queryInterface(XIndexContainer.class, oRoadmap); // XPropertySet xPropRoadmapModel = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oRoadmap); // xPropRoadmapModel.addPropertyChangeListener("CurrentItemID", new WizardDialog.RoadmapItemListener(this.xDialogModel)); MethodInvocation mi = new MethodInvocation("itemStateChanged", this, com.sun.star.awt.ItemEvent.class); getGuiEventListener().add("rdmNavi", EventNames.EVENT_ITEM_CHANGED, mi); xRoadmapControl = this.xDlgContainer.getControl("rdmNavi"); - xRoadmapBroadcaster = (XItemEventBroadcaster) UnoRuntime.queryInterface(XItemEventBroadcaster.class, xRoadmapControl); + xRoadmapBroadcaster = UnoRuntime.queryInterface(XItemEventBroadcaster.class, xRoadmapControl); xRoadmapBroadcaster.addItemListener((XItemListener) getGuiEventListener()); // xRoadmapControl = this.xDlgContainer.getControl("rdmNavi"); @@ -310,11 +310,10 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL { Object oRoadmapItem = xSSFRoadmap.createInstance(); Helper.setUnoPropertyValue(oRoadmapItem, PropertyNames.PROPERTY_LABEL, _sLabel); - Helper.setUnoPropertyValue(oRoadmapItem, PropertyNames.PROPERTY_ENABLED, new Boolean(_bEnabled)); + Helper.setUnoPropertyValue(oRoadmapItem, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bEnabled)); Helper.setUnoPropertyValue(oRoadmapItem, "ID", new Integer(_CurItemID)); xIndexContRoadmap.insertByIndex(Index, oRoadmapItem); - int NextIndex = Index + 1; - return NextIndex; + return Index + 1; } catch (com.sun.star.uno.Exception exception) { @@ -588,7 +587,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL XInterface xRoadmapItem = getRoadmapItemByID(_nStep); if (xRoadmapItem != null) { - Helper.setUnoPropertyValue(xRoadmapItem, PropertyNames.PROPERTY_ENABLED, new Boolean(bEnabled)); + Helper.setUnoPropertyValue(xRoadmapItem, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bEnabled)); } } diff --git a/wizards/com/sun/star/wizards/ui/event/AbstractListener.java b/wizards/com/sun/star/wizards/ui/event/AbstractListener.java index bbe9cee2eb86..464282a56f7d 100644 --- a/wizards/com/sun/star/wizards/ui/event/AbstractListener.java +++ b/wizards/com/sun/star/wizards/ui/event/AbstractListener.java @@ -128,7 +128,7 @@ public class AbstractListener */ public static String getEventSourceName(EventObject eventObject) { - XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, eventObject.Source); + XControl xControl = UnoRuntime.queryInterface(XControl.class, eventObject.Source); return (String) Helper.getUnoPropertyValue(xControl.getModel(), PropertyNames.PROPERTY_NAME, String.class); } } diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.java b/wizards/com/sun/star/wizards/ui/event/DataAware.java index 63213e444dc9..7da0981104ba 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAware.java +++ b/wizards/com/sun/star/wizards/ui/event/DataAware.java @@ -347,7 +347,7 @@ public abstract class DataAware { */ public void set(Object value, Object target) { try { - setMethod.invoke(target, new Object[] {value}); + setMethod.invoke(target, value); } catch (IllegalAccessException ex1) { ex1.printStackTrace(); } catch (InvocationTargetException ex2) { diff --git a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java index 4dc917a76ad3..7d0d4194f892 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java +++ b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java @@ -460,7 +460,7 @@ public class DataAwareFields } else if (value instanceof String) { - return ((String) value).equals(TRUE); + return value.equals(TRUE); } else if (value instanceof short[]) { diff --git a/wizards/com/sun/star/wizards/ui/event/ListModelBinder.java b/wizards/com/sun/star/wizards/ui/event/ListModelBinder.java index b29b960d4c06..73980b9afdd1 100644 --- a/wizards/com/sun/star/wizards/ui/event/ListModelBinder.java +++ b/wizards/com/sun/star/wizards/ui/event/ListModelBinder.java @@ -64,7 +64,7 @@ public class ListModelBinder implements ListDataListener public ListModelBinder(Object unoListBox, ListModel listModel_) { - unoList = (XListBox) UnoRuntime.queryInterface(XListBox.class, unoListBox); + unoList = UnoRuntime.queryInterface(XListBox.class, unoListBox); unoListModel = UnoDataAware.getModel(unoListBox); setListModel(listModel_); } @@ -100,7 +100,7 @@ public class ListModelBinder implements ListDataListener protected void remove(short i1, short i2) { - unoList.removeItems((short) i1, (short) (i2 - i1 + 1)); + unoList.removeItems(i1, (short) (i2 - i1 + 1)); } protected void insert(short i) @@ -180,7 +180,7 @@ public class ListModelBinder implements ListDataListener public static void fillList(Object list, Object[] items, Renderer renderer) { - XListBox xlist = (XListBox) UnoRuntime.queryInterface(XListBox.class, list); + XListBox xlist = UnoRuntime.queryInterface(XListBox.class, list); Helper.setUnoPropertyValue(UnoDataAware.getModel(list), PropertyNames.STRING_ITEM_LIST, new String[] { }); @@ -195,7 +195,7 @@ public class ListModelBinder implements ListDataListener public static void fillComboBox(Object list, Object[] items, Renderer renderer) { - XComboBox xComboBox = (XComboBox) UnoRuntime.queryInterface(XComboBox.class, list); + XComboBox xComboBox = UnoRuntime.queryInterface(XComboBox.class, list); Helper.setUnoPropertyValue(UnoDataAware.getModel(list), PropertyNames.STRING_ITEM_LIST, new String[] { }); diff --git a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java index c45a496c7849..2f86de798bfd 100644 --- a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java +++ b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java @@ -86,10 +86,8 @@ public class MethodInvocation { if (mWithParam) { - return mMethod.invoke(mObject, new Object[] - { - (Object) param - }); + return mMethod.invoke(mObject, (Object) param + ); } else { diff --git a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.java b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.java index b2a9b0197357..ed8bf03642a4 100644 --- a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.java +++ b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.java @@ -47,7 +47,7 @@ public class RadioDataAware extends DataAware radioButtons = new XRadioButton[radioButs.length]; for (int i = 0; i < radioButs.length; i++) { - radioButtons[i] = (XRadioButton) UnoRuntime.queryInterface(XRadioButton.class, radioButs[i]); + radioButtons[i] = UnoRuntime.queryInterface(XRadioButton.class, radioButs[i]); } } diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java index 5ab0a8f20743..f97ae8f24577 100644 --- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java +++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java @@ -152,7 +152,7 @@ public class UnoDataAware extends DataAware private static UnoDataAware attachTextControl(Object data, String prop, Object unoText, final Listener listener, String unoProperty, boolean field, Object value) { - XTextComponent text = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, unoText); + XTextComponent text = UnoRuntime.queryInterface(XTextComponent.class, unoText); final UnoDataAware uda = new UnoDataAware(data, field ? DataAwareFields.getFieldValueFor(data, prop, value) @@ -199,7 +199,7 @@ public class UnoDataAware extends DataAware public static UnoDataAware attachCheckBox(Object data, String prop, Object checkBox, final Listener listener, boolean field) { - XCheckBox xcheckBox = ((XCheckBox) UnoRuntime.queryInterface(XCheckBox.class, checkBox)); + XCheckBox xcheckBox = UnoRuntime.queryInterface(XCheckBox.class, checkBox); final UnoDataAware uda = new UnoDataAware(data, field ? DataAwareFields.getFieldValueFor(data, prop, new Short((short) 0)) @@ -239,7 +239,7 @@ public class UnoDataAware extends DataAware public static UnoDataAware attachListBox(Object data, String prop, Object listBox, final Listener listener, boolean field) { - XListBox xListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, listBox); + XListBox xListBox = UnoRuntime.queryInterface(XListBox.class, listBox); final UnoDataAware uda = new UnoDataAware(data, field ? DataAwareFields.getFieldValueFor(data, prop, new short[0]) @@ -251,7 +251,7 @@ public class UnoDataAware extends DataAware public static Object getModel(Object control) { - return ((XControl) UnoRuntime.queryInterface(XControl.class, control)).getModel(); + return UnoRuntime.queryInterface(XControl.class, control).getModel(); } public static void setEnabled(Object control, boolean enabled) diff --git a/wizards/com/sun/star/wizards/web/FTPDialog.java b/wizards/com/sun/star/wizards/web/FTPDialog.java index c4101f30c92c..f707690394ea 100644 --- a/wizards/com/sun/star/wizards/web/FTPDialog.java +++ b/wizards/com/sun/star/wizards/web/FTPDialog.java @@ -326,7 +326,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID }, new Object[] { - new Boolean(false), INTEGER_12, HelpIds.getHelpIdString(HID_FTP_TXT_PATH), "txtDir", INTEGER_12, 113, new Short((short) 11), resources.restxtDir_value, 184 + Boolean.FALSE, INTEGER_12, HelpIds.getHelpIdString(HID_FTP_TXT_PATH), "txtDir", INTEGER_12, 113, new Short((short) 11), resources.restxtDir_value, 184 }); btnDir = insertButton("btnDir", "chooseDirectory", PROPNAMES_BUTTON, @@ -708,10 +708,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID private String imageUrl(String s) { - String t = imagesDirectory + s; - //System.out.println(t); - return t; - + return imagesDirectory + s; } /** diff --git a/wizards/com/sun/star/wizards/web/Process.java b/wizards/com/sun/star/wizards/web/Process.java index 3140d3dc328c..f861a82865e3 100644 --- a/wizards/com/sun/star/wizards/web/Process.java +++ b/wizards/com/sun/star/wizards/web/Process.java @@ -164,13 +164,12 @@ public class Process implements WebWizardConst, ProcessErrors { } int publish = countPublish(); - int taskSteps = + return TASKS_IN_PREPARE + TASKS_IN_EXPORT + docs * TASKS_PER_DOC + TASKS_IN_GENERATE + xsl * TASKS_PER_XSL + TASKS_IN_PUBLISH + publish * TASKS_PER_PUBLISH + TASKS_IN_FINISHUP; - return taskSteps; } /** @@ -241,8 +240,7 @@ public class Process implements WebWizardConst, ProcessErrors { try { - String s = FileAccess.getOfficePath(xmsf, "Temp", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING); - return s; + return FileAccess.getOfficePath(xmsf, "Temp", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING); } catch (Exception e) { diff --git a/wizards/com/sun/star/wizards/web/WWD_Events.java b/wizards/com/sun/star/wizards/web/WWD_Events.java index f4b657854592..b37e0fff39e6 100644 --- a/wizards/com/sun/star/wizards/web/WWD_Events.java +++ b/wizards/com/sun/star/wizards/web/WWD_Events.java @@ -81,11 +81,11 @@ public abstract class WWD_Events extends WWD_Startup { super(xmsf); Create c = new Create(); - XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, chkFTP); + XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, chkFTP); xWindow.addKeyListener(c); - xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, chkLocalDir); + xWindow = UnoRuntime.queryInterface(XWindow.class, chkLocalDir); xWindow.addKeyListener(c); - xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, chkZip); + xWindow = UnoRuntime.queryInterface(XWindow.class, chkZip); xWindow.addKeyListener(c); } @@ -310,7 +310,7 @@ public abstract class WWD_Events extends WWD_Startup { fillExportList(settings.getExporters(doc.appType)); } - else; // do nothing + selectedDoc = s; @@ -1204,7 +1204,7 @@ public abstract class WWD_Events extends WWD_Startup //if (xCloseable != null) // xCloseable.close(false); - XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, myFrame); + XCloseable xCloseable = UnoRuntime.queryInterface(XCloseable.class, myFrame); if (xCloseable != null) { xCloseable.close(false); @@ -1301,6 +1301,6 @@ public abstract class WWD_Events extends WWD_Startup task.advance(false); } } - }; + } } diff --git a/wizards/com/sun/star/wizards/web/WWD_Startup.java b/wizards/com/sun/star/wizards/web/WWD_Startup.java index f75740363a93..c3bae2a10bc4 100644 --- a/wizards/com/sun/star/wizards/web/WWD_Startup.java +++ b/wizards/com/sun/star/wizards/web/WWD_Startup.java @@ -254,7 +254,7 @@ public abstract class WWD_Startup extends WWD_General this.buildStep7(proxies, exclamationURL); buildStepX(); - this.xMSF = xMSF; + this.xMSF = xmsf; XDesktop xDesktop = Desktop.getDesktop(xMSF); myFrame = OfficeDocument.createNewFrame(xMSF, this); Object doc = OfficeDocument.createNewDocument(myFrame, "swriter", false, true); @@ -388,7 +388,7 @@ public abstract class WWD_Startup extends WWD_General private XFrame getFrame(Object model) { - XModel xmodel = (XModel) UnoRuntime.queryInterface(XModel.class, model); + XModel xmodel = UnoRuntime.queryInterface(XModel.class, model); return xmodel.getCurrentController().getFrame(); } @@ -412,7 +412,7 @@ public abstract class WWD_Startup extends WWD_General //XWindow xContainerWindow = myFrame.getContainerWindow(); XWindow xContainerWindow = myFrame.getComponentWindow(); - XWindowPeer xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xContainerWindow); + XWindowPeer xWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, xContainerWindow); createWindowPeer(xWindowPeer); @@ -595,7 +595,7 @@ public abstract class WWD_Startup extends WWD_General //page 2 : document properties - docListDA = (UnoDataAware) UnoDataAware.attachListBox(this, "SelectedDoc", lstDocuments, null, false); + docListDA = UnoDataAware.attachListBox(this, "SelectedDoc", lstDocuments, null, false); docListDA.disableControls(new Object[] { /*btnDocDown, btnDocUp, */ diff --git a/wizards/com/sun/star/wizards/web/data/CGDesign.java b/wizards/com/sun/star/wizards/web/data/CGDesign.java index 00c1ea10b949..4644eb96899f 100644 --- a/wizards/com/sun/star/wizards/web/data/CGDesign.java +++ b/wizards/com/sun/star/wizards/web/data/CGDesign.java @@ -72,7 +72,7 @@ public class CGDesign extends ConfigGroup implements XMLProvider public void setStyle(short[] newStyle) { - Object o = ((CGStyle) ((CGSettings) root).cp_Styles.getElementAt(newStyle[0])); + Object o = ((CGSettings) root).cp_Styles.getElementAt(newStyle[0]); cp_Style = (String) ((CGSettings) root).cp_Styles.getKey(o); } diff --git a/wizards/com/sun/star/wizards/web/data/CGDocument.java b/wizards/com/sun/star/wizards/web/data/CGDocument.java index 76affdb36d5a..e3612acf88f3 100644 --- a/wizards/com/sun/star/wizards/web/data/CGDocument.java +++ b/wizards/com/sun/star/wizards/web/data/CGDocument.java @@ -177,8 +177,8 @@ public class CGDocument extends ConfigSetItem implements XMLProvider props[0] = Properties.createProperty("Hidden", Boolean.TRUE); props[1] = Properties.createProperty("MacroExecutionMode", new Short(MacroExecMode.NEVER_EXECUTE)); props[2] = Properties.createProperty("UpdateDocMode", new Short(UpdateDocMode.NO_UPDATE)); - XComponent component = ((XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, desktop)).loadComponentFromURL(cp_URL, "_default", 0, props); - xProps = ((XDocumentPropertiesSupplier) UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, component)).getDocumentProperties(); + XComponent component = UnoRuntime.queryInterface(XComponentLoader.class, desktop).loadComponentFromURL(cp_URL, "_default", 0, props); + xProps = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, component).getDocumentProperties(); } task.advance(true); //4 @@ -243,13 +243,13 @@ public class CGDocument extends ConfigSetItem implements XMLProvider //System.out.println(appType); isSOOpenable = - (appType == TypeDetection.WRITER_DOC || appType == TypeDetection.CALC_DOC || appType == TypeDetection.IMPRESS_DOC || appType == TypeDetection.DRAW_DOC) || appType == TypeDetection.HTML_DOC; + (appType.equals(TypeDetection.WRITER_DOC) || appType.equals(TypeDetection.CALC_DOC) || appType.equals(TypeDetection.IMPRESS_DOC) || appType.equals(TypeDetection.DRAW_DOC)) || appType.equals(TypeDetection.HTML_DOC); // String[] parts = media.split("_"); // line removed because of compatibility to JDK13 String[] parts = JavaTools.ArrayoutofString(media, "_"); - isSODocument = parts.length < 2 ? false : isSOOpenable && (parts[1].startsWith("Star")); + isSODocument = parts.length >= 2 && isSOOpenable && (parts[1].startsWith("Star")); } diff --git a/wizards/com/sun/star/wizards/web/data/CGSettings.java b/wizards/com/sun/star/wizards/web/data/CGSettings.java index 4102c2f87dbf..60e711c3c2ae 100644 --- a/wizards/com/sun/star/wizards/web/data/CGSettings.java +++ b/wizards/com/sun/star/wizards/web/data/CGSettings.java @@ -124,7 +124,7 @@ public class CGSettings extends ConfigGroup } } } - return (CGExporter[]) v.toArray(EMPTY_ARRAY_1); + return (CGExporter[]) v.toArray(new CGExporter[v.size()]); } /** @@ -141,7 +141,7 @@ public class CGSettings extends ConfigGroup private void calcExportersTargetTypeNames(XMultiServiceFactory xmsf) throws Exception { Object typeDetect = xmsf.createInstance("com.sun.star.document.TypeDetection"); - XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, typeDetect); + XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, typeDetect); for (int i = 0; i < cp_Exporters.getSize(); i++) { calcExporterTargetTypeName(xNameAccess, (CGExporter) cp_Exporters.getElementAt(i)); diff --git a/wizards/com/sun/star/wizards/web/export/AbstractExporter.java b/wizards/com/sun/star/wizards/web/export/AbstractExporter.java index 97b1109add01..4f35c69e935b 100644 --- a/wizards/com/sun/star/wizards/web/export/AbstractExporter.java +++ b/wizards/com/sun/star/wizards/web/export/AbstractExporter.java @@ -73,7 +73,7 @@ public abstract class AbstractExporter implements Exporter { props.put("FilterData", filterData); } - XStorable xs = ((XStorable) UnoRuntime.queryInterface(XStorable.class, officeDocument)); + XStorable xs = UnoRuntime.queryInterface(XStorable.class, officeDocument); PropertyValue[] o = props.getProperties(); xs.storeToURL(targetUrl, o); } @@ -110,7 +110,7 @@ public abstract class AbstractExporter implements Exporter props.put("Hidden", Boolean.TRUE); props.put("MacroExecutionMode", new Short(MacroExecMode.NEVER_EXECUTE)); props.put("UpdateDocMode", new Short(UpdateDocMode.NO_UPDATE)); - document = ((XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, desktop)).loadComponentFromURL(doc.cp_URL, "_blank", 0, props.getProperties()); + document = UnoRuntime.queryInterface(XComponentLoader.class, desktop).loadComponentFromURL(doc.cp_URL, "_blank", 0, props.getProperties()); } catch (com.sun.star.lang.IllegalArgumentException iaex) { @@ -134,7 +134,7 @@ public abstract class AbstractExporter implements Exporter (XComponent) UnoRuntime.queryInterface(XComponent.class, doc));*/ try { - XCloseable xc = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, doc); + XCloseable xc = UnoRuntime.queryInterface(XCloseable.class, doc); xc.close(false); } catch (Exception ex) -- cgit v1.2.3 From de8ad25e0efc05f6ebc083349fc53f99563de6bd Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Thu, 10 Mar 2011 18:04:50 +0100 Subject: calc66: #o11817313# disable automatic line breaks only for 'General' number format --- sc/source/core/data/column2.cxx | 10 ++++------ sc/source/ui/view/output2.cxx | 23 +++++------------------ 2 files changed, 9 insertions(+), 24 deletions(-) diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index 0cffd3bef163..1ba47c24581d 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -244,8 +244,10 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, else bBreak = ((const SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK)).GetValue(); - if (pCell->HasValueData()) - // Cell has a value. Disable line break. + SvNumberFormatter* pFormatter = pDocument->GetFormatTable(); + sal_uLong nFormat = pPattern->GetNumberFormat( pFormatter, pCondSet ); + // #i111387# #o11817313# disable automatic line breaks only for "General" number format + if ( bBreak && pCell->HasValueData() && ( nFormat % SV_COUNTRY_LANGUAGE_OFFSET ) == 0 ) bBreak = false; // get other attributes from pattern and conditional formatting @@ -332,8 +334,6 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, { String aValStr; Color* pColor; - SvNumberFormatter* pFormatter = pDocument->GetFormatTable(); - sal_uLong nFormat = pPattern->GetNumberFormat( pFormatter, pCondSet ); ScCellFormat::GetString( pCell, nFormat, aValStr, &pColor, *pFormatter, sal_True, rOptions.bFormula, ftCheck ); @@ -493,8 +493,6 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, else { Color* pColor; - SvNumberFormatter* pFormatter = pDocument->GetFormatTable(); - sal_uLong nFormat = pPattern->GetNumberFormat( pFormatter, pCondSet ); String aString; ScCellFormat::GetString( pCell, nFormat, aString, &pColor, *pFormatter, diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index b1d6787d3ce6..8e64690508ea 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -75,8 +75,6 @@ #include "scmod.hxx" #include "fillinfo.hxx" -#include - #include //! Autofilter-Breite mit column.cxx zusammenfassen @@ -1361,10 +1359,6 @@ void ScOutputData::DrawStrings( sal_Bool bPixelToLogic ) const SfxItemSet* pOldCondSet = NULL; sal_uInt8 nOldScript = 0; - // alternative pattern instances in case we need to modify the pattern - // before processing the cell value. - ::boost::ptr_vector aAltPatterns; - long nPosY = nScrY; for (SCSIZE nArrY=1; nArrY+1GetCondResult( nCellX, nCellY, nTab ); } - if (pCell->HasValueData() && - static_cast( - pPattern->GetItem(ATTR_LINEBREAK, pCondSet)).GetValue()) - { - // Disable line break when the cell content is numeric. - aAltPatterns.push_back(new ScPatternAttr(*pPattern)); - ScPatternAttr* pAltPattern = &aAltPatterns.back(); - SfxBoolItem aLineBreak(ATTR_LINEBREAK, false); - pAltPattern->GetItemSet().Put(aLineBreak); - pPattern = pAltPattern; - } - sal_uInt8 nScript = GetScriptType( pDoc, pCell, pPattern, pCondSet ); if (nScript == 0) nScript = ScGlobal::GetDefaultScriptType(); if ( pPattern != pOldPattern || pCondSet != pOldCondSet || @@ -1562,6 +1544,11 @@ void ScOutputData::DrawStrings( sal_Bool bPixelToLogic ) eOutHorJust = SVX_HOR_JUSTIFY_LEFT; // repeat is not yet implemented sal_Bool bBreak = ( aVars.GetLineBreak() || aVars.GetHorJust() == SVX_HOR_JUSTIFY_BLOCK ); + + // #i111387# #o11817313# disable automatic line breaks only for "General" number format + if ( bBreak && bCellIsValue && ( aVars.GetValueFormat() % SV_COUNTRY_LANGUAGE_OFFSET ) == 0 ) + bBreak = sal_False; + sal_Bool bRepeat = aVars.IsRepeat() && !bBreak; sal_Bool bShrink = aVars.IsShrink() && !bBreak && !bRepeat; -- cgit v1.2.3 From 4a1cf1e979464240953beb9550b4c46e591f92ba Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Thu, 10 Mar 2011 18:09:01 +0100 Subject: calc66: #i117315# round-down single row height values in GetScaledRowHeight --- sc/source/core/data/table2.cxx | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 10eb5512afea..83c5412d08c3 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -2488,8 +2488,22 @@ sal_uLong ScTable::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fS { if (nLastRow > nEndRow) nLastRow = nEndRow; - sal_uInt32 nThisHeight = mpRowHeights->getSumValue(nRow, nLastRow); - nHeight += static_cast(nThisHeight * fScale); + + // #i117315# can't use getSumValue, because individual values must be rounded + while (nRow <= nLastRow) + { + ScFlatUInt16RowSegments::RangeData aData; + if (!mpRowHeights->getRangeData(nRow, aData)) + return nHeight; // shouldn't happen + + SCROW nSegmentEnd = std::min( nLastRow, aData.mnRow2 ); + + // round-down a single height value, multiply resulting (pixel) values + sal_uLong nOneHeight = static_cast( aData.mnValue * fScale ); + nHeight += nOneHeight * ( nSegmentEnd + 1 - nRow ); + + nRow = nSegmentEnd + 1; + } } nRow = nLastRow + 1; } -- cgit v1.2.3 From c5a8a2c3cbcee0175127a0662e3d820ea4deea22 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Fri, 11 Mar 2011 13:28:49 +0100 Subject: sw34bf05: #i84870# - method - do not split text frame which only contains on as-character anchored object --- sw/source/core/text/frmform.cxx | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) mode change 100644 => 100755 sw/source/core/text/frmform.cxx diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx old mode 100644 new mode 100755 index 4fac26a7a08d..5a6514847b51 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -1048,8 +1048,21 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine, !rFrmBreak.IsInside( rLine ) ) : rFrmBreak.IsBreakNow( rLine ) ) ) ) ? 1 : 0; + // --> OD #i84870# + // no split of text frame, which only contains a as-character anchored object + const bool bOnlyContainsAsCharAnchoredObj = + !IsFollow() && nStrLen == 1 && + GetDrawObjs() && GetDrawObjs()->Count() == 1 && + (*GetDrawObjs())[0]->GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AS_CHAR; + if ( nNew && bOnlyContainsAsCharAnchoredObj ) + { + nNew = 0; + } + // <-- if ( nNew ) + { SplitFrm( nEnd ); + } const SwFrm *pBodyFrm = (const SwFrm*)(FindBodyFrm()); @@ -1104,8 +1117,7 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine, // the numbering and must stay. if ( GetFollow()->GetOfst() != nEnd || GetFollow()->IsFieldFollow() || - ( nStrLen == 0 && GetTxtNode()->GetNumRule()) - ) + ( nStrLen == 0 && GetTxtNode()->GetNumRule() ) ) { nNew |= 3; } @@ -1116,8 +1128,11 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine, { // OD 21.03.2003 #108121# - Only split frame, if the frame contains // content or contains no content, but has a numbering. - if ( nStrLen > 0 || - ( nStrLen == 0 && GetTxtNode()->GetNumRule()) + // OD #i84870# - no split, if text frame only contains one + // as-character anchored object. + if ( !bOnlyContainsAsCharAnchoredObj && + ( nStrLen > 0 || + ( nStrLen == 0 && GetTxtNode()->GetNumRule() ) ) ) { SplitFrm( nEnd ); @@ -1138,7 +1153,15 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine, const SwTwips nDocPrtTop = Frm().Top() + Prt().Top(); const SwTwips nOldHeight = Prt().SSize().Height(); - const SwTwips nChg = rLine.CalcBottomLine() - nDocPrtTop - nOldHeight; + SwTwips nChg = rLine.CalcBottomLine() - nDocPrtTop - nOldHeight; + // --> OD #i84870# - no shrink of text frame, if it only contains one + // as-character anchored object. + if ( nChg < 0 && + bOnlyContainsAsCharAnchoredObj ) + { + nChg = 0; + } + // <-- // Vertical Formatting: // The (rotated) repaint rectangle's x coordinate referes to the frame. -- cgit v1.2.3 From a8664689ece5a4329c9786f1b666e3ab701d908b Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Fri, 11 Mar 2011 14:44:06 +0100 Subject: sw34bf05: #i103292# - method consider space taken as lower space as the last content of a table cell --- sw/source/core/text/widorp.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) mode change 100644 => 100755 sw/source/core/text/widorp.cxx diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx old mode 100644 new mode 100755 index f0fe98e44987..c3aea0750566 --- a/sw/source/core/text/widorp.cxx +++ b/sw/source/core/text/widorp.cxx @@ -150,6 +150,17 @@ sal_Bool SwTxtFrmBreak::IsInside( SwTxtMargin &rLine ) const // Der Frm besitzt eine Hoehe, mit der er auf die Seite passt. SwTwips nHeight = (*fnRect->fnYDiff)( (pFrm->GetUpper()->*fnRect->fnGetPrtBottom)(), nOrigin ); + // --> OD #i103292# + // add additional space taken as lower space as last content in a table + // for all text lines expect the last one. + { + if ( rLine.GetNext() && + pFrm->IsInTab() && !pFrm->GetFollow() && !pFrm->GetIndNext() ) + { + nHeight += pFrm->CalcAddLowerSpaceAsLastInTableCell(); + } + } + // <-- // Wenn sich alles innerhalb des bestehenden Frames abspielt, // ist das Ergebnis sal_True; -- cgit v1.2.3 From 77540cbbaa808ed8326e31c8532f29624a4526b5 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Fri, 11 Mar 2011 15:17:48 +0100 Subject: sw34bf05: #i85105# trigger load of linked graphic on requesting com.sun.star.text.TextGraphicObject.ActualSize --- sw/source/core/graphic/ndgrf.cxx | 5 ++++- sw/source/core/unocore/unoframe.cxx | 19 ++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) mode change 100644 => 100755 sw/source/core/graphic/ndgrf.cxx mode change 100644 => 100755 sw/source/core/unocore/unoframe.cxx diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx old mode 100644 new mode 100755 index 1f8dc1ee488b..bb7198ed3358 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -1183,7 +1183,10 @@ void SwGrfNode::ApplyInputStream( void SwGrfNode::UpdateLinkWithInputStream() { - if ( IsLinkedFile() ) + // --> OD #i85105# + // do not work on link, if a has been triggered. + if ( !bInSwapIn && IsLinkedFile() ) + // <-- { GetLink()->setStreamToLoadFrom( mxInputStream, mbIsStreamReadOnly ); GetLink()->Update(); diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx old mode 100644 new mode 100755 index 5ee3fc45f6f4..93e25c5485d3 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -1637,7 +1637,24 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) { SwNodeIndex aIdx(*pIdx, 1); SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode(); - Size aActSize = ((SwGrfNode*)pNoTxt)->GetTwipSize(); + // --> OD #i85105# +// SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode(); +// Size aActSize = ((SwGrfNode*)pNoTxt)->GetTwipSize(); + Size aActSize; + { + SwGrfNode* pGrfNode = dynamic_cast(aIdx.GetNode().GetNoTxtNode()); + if ( pGrfNode ) + { + aActSize = pGrfNode->GetTwipSize(); + if ( aActSize.Width() == 0 && aActSize.Height() == 0 && + pGrfNode->IsLinkedFile() ) + { + pGrfNode->SwapIn( TRUE ); + aActSize = pGrfNode->GetTwipSize(); + } + } + } + // <-- awt::Size aTmp; aTmp.Width = TWIP_TO_MM100(aActSize.Width()); aTmp.Height = TWIP_TO_MM100(aActSize.Height()); -- cgit v1.2.3 From 71ac08253fa7af25d5f4d62bf053ddc4fbe2c44f Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Fri, 11 Mar 2011 15:50:36 +0100 Subject: fwk167: #i109640# Don't call SetWindowState if window state is the same as the current one --- framework/source/helper/persistentwindowstate.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx index 877c2dd3d711..c25036c5c346 100644 --- a/framework/source/helper/persistentwindowstate.cxx +++ b/framework/source/helper/persistentwindowstate.cxx @@ -61,6 +61,7 @@ #endif #include #include +#include //_________________________________________________________________________________________________________________ // namespace @@ -343,7 +344,9 @@ void PersistentWindowState::implst_setWindowStateOnWindow(const css::uno::Refere if (pWorkWindow->IsMinimized()) return; - pSystemWindow->SetWindowState(U2B_ENC(sWindowState,RTL_TEXTENCODING_UTF8)); + ::rtl::OUString sOldWindowState = ::rtl::OStringToOUString( pSystemWindow->GetWindowState(), RTL_TEXTENCODING_ASCII_US ); + if ( sOldWindowState != sWindowState ) + pSystemWindow->SetWindowState(U2B_ENC(sWindowState,RTL_TEXTENCODING_UTF8)); aSolarLock.clear(); // <- SOLAR SAFE ------------------------ -- cgit v1.2.3 From fc7c328caaadbee71753c0374873bdf649f42a50 Mon Sep 17 00:00:00 2001 From: "Eike Rathke [er]" Date: Fri, 11 Mar 2011 18:11:21 +0100 Subject: calc66: #i75279# improved accuracy of BINOMDIST; patch from --- sc/source/core/inc/interpre.hxx | 1 + sc/source/core/tool/interpr3.cxx | 252 +++++++++++++++++---------------------- 2 files changed, 113 insertions(+), 140 deletions(-) diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx index 926c44c06317..b9ab37ea33c9 100644 --- a/sc/source/core/inc/interpre.hxx +++ b/sc/source/core/inc/interpre.hxx @@ -701,6 +701,7 @@ double GetGamma(double x); double GetLogGamma(double x); double GetBeta(double fAlpha, double fBeta); double GetLogBeta(double fAlpha, double fBeta); +double GetBinomDistPMF(double x, double n, double p); //probability mass function void ScLogGamma(); void ScGamma(); void ScPhi(); diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx index dfcce4c06c3f..ef1a18b65def 100644 --- a/sc/source/core/tool/interpr3.cxx +++ b/sc/source/core/tool/interpr3.cxx @@ -949,17 +949,18 @@ double ScInterpreter::GetBetaDistPDF(double fX, double fA, double fB) const double fLogDblMin = log( ::std::numeric_limits::min()); double fLogY = (fX < 0.1) ? ::rtl::math::log1p(-fX) : log(0.5-fX+0.5); double fLogX = log(fX); - double fAm1 = fA-1.0; - double fBm1 = fB-1.0; + double fAm1LogX = (fA-1.0) * fLogX; + double fBm1LogY = (fB-1.0) * fLogY; double fLogBeta = GetLogBeta(fA,fB); // check whether parts over- or underflow - if ( fAm1 * fLogX < fLogDblMax && fAm1 * fLogX > fLogDblMin - && fBm1 * fLogY < fLogDblMax && fBm1* fLogY > fLogDblMin - && fLogBeta < fLogDblMax && fLogBeta > fLogDblMin ) + if ( fAm1LogX < fLogDblMax && fAm1LogX > fLogDblMin + && fBm1LogY < fLogDblMax && fBm1LogY > fLogDblMin + && fLogBeta < fLogDblMax && fLogBeta > fLogDblMin + && fAm1LogX + fBm1LogY < fLogDblMax && fAm1LogX + fBm1LogY > fLogDblMin) return pow(fX,fA-1.0) * pow(0.5-fX+0.5,fB-1.0) / GetBeta(fA,fB); else // need logarithm; // might overflow as a whole, but seldom, not worth to pre-detect it - return exp((fA-1.0)*fLogX + (fB-1.0)* fLogY - fLogBeta); + return exp( fAm1LogX + fBm1LogY - fLogBeta); } @@ -1226,121 +1227,106 @@ void ScInterpreter::ScVariationen2() } } -void ScInterpreter::ScB() -{ - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScB" ); - sal_uInt8 nParamCount = GetByte(); - if ( !MustHaveParamCount( nParamCount, 3, 4 ) ) - return ; - if (nParamCount == 3) - { - double x = ::rtl::math::approxFloor(GetDouble()); - double p = GetDouble(); - double n = ::rtl::math::approxFloor(GetDouble()); - if (n < 0.0 || x < 0.0 || x > n || p < 0.0 || p > 1.0) - PushIllegalArgument(); - else + +double ScInterpreter::GetBinomDistPMF(double x, double n, double p) +// used in ScB and ScBinomDist +// preconditions: 0.0 <= x <= n, 0.0 < p < 1.0; x,n integral although double { - double q = 1.0 - p; + double q = (0.5 - p) + 0.5; double fFactor = pow(q, n); - if (fFactor == 0.0) + if (fFactor <=::std::numeric_limits::min()) { fFactor = pow(p, n); - if (fFactor == 0.0) - PushNoValue(); + if (fFactor <= ::std::numeric_limits::min()) + return GetBetaDistPDF(p, x+1.0, n-x+1.0)/(n+1.0); else { - sal_uLong max = (sal_uLong) (n - x); - for (sal_uLong i = 0; i < max && fFactor > 0.0; i++) + sal_uInt32 max = static_cast(n - x); + for (sal_uInt32 i = 0; i < max && fFactor > 0.0; i++) fFactor *= (n-i)/(i+1)*q/p; - PushDouble(fFactor); + return fFactor; } } else { - sal_uLong max = (sal_uLong) x; - for (sal_uLong i = 0; i < max && fFactor > 0.0; i++) + sal_uInt32 max = static_cast(x); + for (sal_uInt32 i = 0; i < max && fFactor > 0.0; i++) fFactor *= (n-i)/(i+1)*p/q; - PushDouble(fFactor); - } + return fFactor; } } - else if (nParamCount == 4) - { - double xe = GetDouble(); - double xs = GetDouble(); - double p = GetDouble(); - double n = GetDouble(); -// alter Stand 300-SC -// if ((xs < n) && (xe < n) && (p < 1.0)) -// { -// double Varianz = sqrt(n * p * (1.0 - p)); -// xs = fabs(xs - (n * p /* / 2.0 STE */ )); -// xe = fabs(xe - (n * p /* / 2.0 STE */ )); -//// STE double nVal = gauss((xs + 0.5) / Varianz) + gauss((xe + 0.5) / Varianz); -// double nVal = fabs(gauss(xs / Varianz) - gauss(xe / Varianz)); -// PushDouble(nVal); -// } - bool bIsValidX = ( 0.0 <= xs && xs <= xe && xe <= n); - if ( bIsValidX && 0.0 < p && p < 1.0 ) - { - double q = 1.0 - p; - double fFactor = pow(q, n); - if (fFactor == 0.0) - { - fFactor = pow(p, n); - if (fFactor == 0.0) - PushNoValue(); - else + +double lcl_GetBinomDistRange(double n, double xs,double xe, + double fFactor /* q^n */, double p, double q) +//preconditions: 0.0 <= xs < xe <= n; xs,xe,n integral although double { - double fSum = 0.0; - sal_uLong max; - if (xe < (sal_uLong) n) - max = (sal_uLong) (n-xe)-1; - else - max = 0; - sal_uLong i; - for (i = 0; i < max && fFactor > 0.0; i++) - fFactor *= (n-i)/(i+1)*q/p; - if (xs < (sal_uLong) n) - max = (sal_uLong) (n-xs); - else - fSum = fFactor; - for (; i < max && fFactor > 0.0; i++) + sal_uInt32 i; + double fSum; + // skip summands index 0 to xs-1, start sum with index xs + sal_uInt32 nXs = static_cast( xs ); + for (i = 1; i <= nXs && fFactor > 0.0; i++) + fFactor *= (n-i+1)/i * p/q; + fSum = fFactor; // Summand xs + sal_uInt32 nXe = static_cast(xe); + for (i = nXs+1; i <= nXe && fFactor > 0.0; i++) { - fFactor *= (n-i)/(i+1)*q/p; + fFactor *= (n-i+1)/i * p/q; fSum += fFactor; } - PushDouble(fSum); + return (fSum>1.0) ? 1.0 : fSum; } + +void ScInterpreter::ScB() +{ + RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScB" ); + sal_uInt8 nParamCount = GetByte(); + if ( !MustHaveParamCount( nParamCount, 3, 4 ) ) + return ; + if (nParamCount == 3) // mass function + { + double x = ::rtl::math::approxFloor(GetDouble()); + double p = GetDouble(); + double n = ::rtl::math::approxFloor(GetDouble()); + if (n < 0.0 || x < 0.0 || x > n || p < 0.0 || p > 1.0) + PushIllegalArgument(); + else + if (p == 0.0) + PushDouble( (x == 0.0) ? 1.0 : 0.0 ); + else + if ( p == 1.0) + PushDouble( (x == n) ? 1.0 : 0.0); + else + PushDouble(GetBinomDistPMF(x,n,p)); } else + { // nParamCount == 4 + double xe = ::rtl::math::approxFloor(GetDouble()); + double xs = ::rtl::math::approxFloor(GetDouble()); + double p = GetDouble(); + double n = ::rtl::math::approxFloor(GetDouble()); + double q = (0.5 - p) + 0.5; + bool bIsValidX = ( 0.0 <= xs && xs <= xe && xe <= n); + if ( bIsValidX && 0.0 < p && p < 1.0) { - sal_uLong max; - double fSum; - if ( (sal_uLong) xs == 0) + if (xs == xe) // mass function + PushDouble(GetBinomDistPMF(xs,n,p)); + else { - fSum = fFactor; - max = 0; - } + double fFactor = pow(q, n); + if (fFactor > ::std::numeric_limits::min()) + PushDouble(lcl_GetBinomDistRange(n,xs,xe,fFactor,p,q)); else { - max = (sal_uLong) xs-1; - fSum = 0.0; + fFactor = pow(p, n); + if (fFactor > ::std::numeric_limits::min()) + { + // sum from j=xs to xe {(n choose j) * p^j * q^(n-j)} + // = sum from i = n-xe to n-xs { (n choose i) * q^i * p^(n-i)} + PushDouble(lcl_GetBinomDistRange(n,n-xe,n-xs,fFactor,q,p)); } - sal_uLong i; - for (i = 0; i < max && fFactor > 0.0; i++) - fFactor *= (n-i)/(i+1)*p/q; - if ((sal_uLong)xe == 0) // beide 0 - fSum = fFactor; else - max = (sal_uLong) xe; - for (; i < max && fFactor > 0.0; i++) - { - fFactor *= (n-i)/(i+1)*p/q; - fSum += fFactor; + PushDouble(GetBetaDist(q,n-xe,xe+1.0)-GetBetaDist(q,n-xs+1,xs) ); } - PushDouble(fSum); } } else @@ -1365,77 +1351,63 @@ void ScInterpreter::ScBinomDist() RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScBinomDist" ); if ( MustHaveParamCount( GetByte(), 4 ) ) { - double kum = GetDouble(); // 0 oder 1 - double p = GetDouble(); // p - double n = ::rtl::math::approxFloor(GetDouble()); // n - double x = ::rtl::math::approxFloor(GetDouble()); // x - double fFactor, q, fSum; + bool bIsCum = GetBool(); // false=mass function; true=cumulative + double p = GetDouble(); + double n = ::rtl::math::approxFloor(GetDouble()); + double x = ::rtl::math::approxFloor(GetDouble()); + double q = (0.5 - p) + 0.5; // get one bit more for p near 1.0 + double fFactor, fSum; if (n < 0.0 || x < 0.0 || x > n || p < 0.0 || p > 1.0) - PushIllegalArgument(); - else if (kum == 0.0) // Dichte { - q = 1.0 - p; - fFactor = pow(q, n); - if (fFactor == 0.0) - { - fFactor = pow(p, n); - if (fFactor == 0.0) - PushNoValue(); - else - { - sal_uLong max = (sal_uLong) (n - x); - for (sal_uLong i = 0; i < max && fFactor > 0.0; i++) - fFactor *= (n-i)/(i+1)*q/p; - PushDouble(fFactor); - } + PushIllegalArgument(); + return; } - else + if ( p == 0.0) { - sal_uLong max = (sal_uLong) x; - for (sal_uLong i = 0; i < max && fFactor > 0.0; i++) - fFactor *= (n-i)/(i+1)*p/q; - PushDouble(fFactor); + PushDouble( (x==0.0 || bIsCum) ? 1.0 : 0.0 ); + return; } + if ( p == 1.0) + { + PushDouble( (x==n) ? 1.0 : 0.0); + return; } - else // Verteilung + if (!bIsCum) + PushDouble( GetBinomDistPMF(x,n,p)); + else { - if (n == x) + if (x == n) PushDouble(1.0); else { - q = 1.0 - p; fFactor = pow(q, n); - if (fFactor == 0.0) + if (x == 0.0) + PushDouble(fFactor); + else + if (fFactor <= ::std::numeric_limits::min()) { fFactor = pow(p, n); - if (fFactor == 0.0) - PushNoValue(); + if (fFactor <= ::std::numeric_limits::min()) + PushDouble(GetBetaDist(q,n-x,x+1.0)); else { + if (fFactor > fMachEps) + { fSum = 1.0 - fFactor; - sal_uLong max = (sal_uLong) (n - x) - 1; - for (sal_uLong i = 0; i < max && fFactor > 0.0; i++) + sal_uInt32 max = static_cast (n - x) - 1; + for (sal_uInt32 i = 0; i < max && fFactor > 0.0; i++) { fFactor *= (n-i)/(i+1)*q/p; fSum -= fFactor; } - if (fSum < 0.0) - PushDouble(0.0); - else - PushDouble(fSum); - } + PushDouble( (fSum < 0.0) ? 0.0 : fSum ); } else - { - fSum = fFactor; - sal_uLong max = (sal_uLong) x; - for (sal_uLong i = 0; i < max && fFactor > 0.0; i++) - { - fFactor *= (n-i)/(i+1)*p/q; - fSum += fFactor; + PushDouble(lcl_GetBinomDistRange(n,n-x,n,fFactor,q,p)); } - PushDouble(fSum); } + else + PushDouble( lcl_GetBinomDistRange(n,0.0,x,fFactor,p,q)) ; } } } -- cgit v1.2.3 From ad0cee149d32412782aca0d088dcc1f189b74871 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Mon, 14 Mar 2011 10:40:10 +0100 Subject: sw34bf05: #i103292# - method - improve fix due to code review --- sw/source/core/text/widorp.cxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx index c3aea0750566..e1f8630b0e81 100755 --- a/sw/source/core/text/widorp.cxx +++ b/sw/source/core/text/widorp.cxx @@ -150,21 +150,23 @@ sal_Bool SwTxtFrmBreak::IsInside( SwTxtMargin &rLine ) const // Der Frm besitzt eine Hoehe, mit der er auf die Seite passt. SwTwips nHeight = (*fnRect->fnYDiff)( (pFrm->GetUpper()->*fnRect->fnGetPrtBottom)(), nOrigin ); + // Wenn sich alles innerhalb des bestehenden Frames abspielt, + // ist das Ergebnis sal_True; + bFit = nHeight >= nLineHeight; + // --> OD #i103292# - // add additional space taken as lower space as last content in a table - // for all text lines expect the last one. + if ( !bFit ) { if ( rLine.GetNext() && pFrm->IsInTab() && !pFrm->GetFollow() && !pFrm->GetIndNext() ) { + // add additional space taken as lower space as last content in a table + // for all text lines except the last one. nHeight += pFrm->CalcAddLowerSpaceAsLastInTableCell(); + bFit = nHeight >= nLineHeight; } } // <-- - - // Wenn sich alles innerhalb des bestehenden Frames abspielt, - // ist das Ergebnis sal_True; - bFit = nHeight >= nLineHeight; if( !bFit ) { // Die LineHeight sprengt die aktuelle Frm-Hoehe. -- cgit v1.2.3 From e76d571936cb4ba720070a5fbb1880200e242a2b Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Mon, 14 Mar 2011 11:06:22 +0100 Subject: dba34d: #i116774# set date descriptions --- dbaccess/source/core/misc/DatabaseDataProvider.cxx | 25 ++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx index ab0ccc737a11..574139b78f76 100644 --- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx +++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -49,6 +50,7 @@ #include #include #include +#include #include #include @@ -781,6 +783,7 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(sal_Bool _bHasCat } ::std::vector< ::rtl::OUString > aRowLabels; + ::std::vector< double > aDateRowLabels; ::std::vector< ::std::vector< double > > aDataValues; sal_Int32 nRowCount = 0; ::connectivity::ORowSetValue aValue; @@ -789,7 +792,16 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(sal_Bool _bHasCat ++nRowCount; aValue.fill( aColumns[0].nResultSetPosition, aColumns[0].nDataType, xRow ); - aRowLabels.push_back( aValue.getString() ); + switch(aColumns[0].nDataType) + { + case sdbc::DataType::DATE: + case sdbc::DataType::TIMESTAMP: + aDateRowLabels.push_back( aValue.getDouble() ); + break; + default: + aRowLabels.push_back( aValue.getString() ); + break; + } ::std::vector< double > aRow; for ( ColumnDescriptions::const_iterator col = aColumns.begin(); @@ -839,7 +851,16 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(sal_Bool _bHasCat } // if ( !nRowCount ) uno::Reference< chart::XChartDataArray> xData(m_xInternal,uno::UNO_QUERY); - xData->setRowDescriptions(uno::Sequence< ::rtl::OUString >(&(*aRowLabels.begin()),aRowLabels.size())); + if ( aDateRowLabels.empty() ) + { + xData->setRowDescriptions(uno::Sequence< ::rtl::OUString >(&(*aRowLabels.begin()),aRowLabels.size())); + } + else + { + uno::Reference< chart::XDateCategories> xDate(m_xInternal,uno::UNO_QUERY); + xDate->setDateCategories(uno::Sequence< double >(&(*aDateRowLabels.begin()),aDateRowLabels.size())); + } + const size_t nOffset = bFirstColumnIsCategory ? 1 : 0; uno::Sequence< ::rtl::OUString > aColumnDescriptions( aColumns.size() - nOffset ); -- cgit v1.2.3 From 754240ba32e835ce44097fb14cd449da21195195 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Mon, 14 Mar 2011 11:40:44 +0100 Subject: calc66: #i117239# prevent nested GetTableData calls from GetPivotData --- sc/inc/dpobject.hxx | 3 ++- sc/source/core/data/dpobject.cxx | 45 +++++++++++++++++++++++++++------------- 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index e69f8e8c3a3f..f1ea36e9b81e 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -117,6 +117,7 @@ private: SC_DLLPRIVATE void CreateOutput(); sal_Bool bRefresh; long mnCacheId; + bool mbCreatingTableData; public: // Wang Xu Ming -- 2009-8-17 @@ -156,7 +157,7 @@ public: void SetHeaderLayout(bool bUseGrid); bool GetHeaderLayout() const; - void SetSheetDesc(const ScSheetSourceDesc& rDesc); + void SetSheetDesc(const ScSheetSourceDesc& rDesc, bool bFromRefUpdate = false); void SetImportDesc(const ScImportSourceDesc& rDesc); void SetServiceData(const ScDPServiceDesc& rDesc); diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 77dd1d67139d..b4fb351b9ba7 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -176,7 +176,8 @@ ScDPObject::ScDPObject( ScDocument* pD ) : nHeaderRows( 0 ), mbHeaderLayout(false), bRefresh( sal_False ), // Wang Xu Ming - DataPilot migration - mnCacheId( -1) // Wang Xu Ming - DataPilot migration + mnCacheId( -1 ), // Wang Xu Ming - DataPilot migration + mbCreatingTableData( false ) { } @@ -199,7 +200,8 @@ ScDPObject::ScDPObject(const ScDPObject& r) : nHeaderRows( r.nHeaderRows ), mbHeaderLayout( r.mbHeaderLayout ), bRefresh( r.bRefresh ), // Wang Xu Ming - DataPilot migration - mnCacheId ( r.mnCacheId ) // Wang Xu Ming - DataPilot migration + mnCacheId ( r.mnCacheId ), // Wang Xu Ming - DataPilot migration + mbCreatingTableData( false ) { if (r.pSaveData) pSaveData = new ScDPSaveData(*r.pSaveData); @@ -284,7 +286,7 @@ void ScDPObject::SetOutRange(const ScRange& rRange) pOutput->SetPosition( rRange.aStart ); } -void ScDPObject::SetSheetDesc(const ScSheetSourceDesc& rDesc) +void ScDPObject::SetSheetDesc(const ScSheetSourceDesc& rDesc, bool bFromRefUpdate) { if ( pSheetDesc && rDesc == *pSheetDesc ) return; // nothing to do @@ -304,7 +306,8 @@ void ScDPObject::SetSheetDesc(const ScSheetSourceDesc& rDesc) pSheetDesc->aQueryParam.bHasHeader = sal_True; InvalidateSource(); // new source must be created - SetCacheId( -1 ); // #i116504# don't use the same cache ID for a different range + if (!bFromRefUpdate) + SetCacheId( -1 ); // #i116504# don't use the same cache ID for a different range (except reference update) } void ScDPObject::SetImportDesc(const ScImportSourceDesc& rDesc) @@ -430,8 +433,12 @@ void ScDPObject::CreateOutput() ScDPTableData* ScDPObject::GetTableData() { - if (!mpTableData) + if (!mpTableData && !mbCreatingTableData) { + // #i117239# While filling the cache, mpTableData is still null. + // Prevent nested calls from GetPivotData and similar functions. + mbCreatingTableData = true; + shared_ptr pData; if ( pImpDesc ) { @@ -467,6 +474,8 @@ ScDPTableData* ScDPObject::GetTableData() // End Comments mpTableData = pData; // after SetCacheId + + mbCreatingTableData = false; } return mpTableData.get(); @@ -496,16 +505,19 @@ void ScDPObject::CreateObjects() DBG_ASSERT( !pServDesc, "DPSource could not be created" ); ScDPTableData* pData = GetTableData(); - ScDPSource* pSource = new ScDPSource( pData ); - xSource = pSource; - - if ( pSaveData && bRefresh ) + if ( pData ) // nested GetTableData calls may return NULL { - pSaveData->Refresh( xSource ); - bRefresh = sal_False; + ScDPSource* pSource = new ScDPSource( pData ); + xSource = pSource; + + if ( pSaveData && bRefresh ) + { + pSaveData->Refresh( xSource ); + bRefresh = sal_False; + } } } - if (pSaveData ) + if ( xSource.is() && pSaveData ) pSaveData->WriteToSource( xSource ); } else if (bSettingsChanged) @@ -753,7 +765,7 @@ void ScDPObject::UpdateReference( UpdateRefMode eUpdateRefMode, if (aNewDesc.aQueryParam.GetEntry(i).bDoQuery) aNewDesc.aQueryParam.GetEntry(i).nField += nDiffX; - SetSheetDesc( aNewDesc ); // allocates new pSheetDesc + SetSheetDesc( aNewDesc, true ); // allocates new pSheetDesc } } } @@ -781,7 +793,7 @@ void ScDPObject::WriteRefsTo( ScDPObject& r ) const { r.SetOutRange( aOutRange ); if ( pSheetDesc ) - r.SetSheetDesc( *pSheetDesc ); + r.SetSheetDesc( *pSheetDesc, true ); } void ScDPObject::GetPositionData(const ScAddress& rPos, DataPilotTablePositionData& rPosData) @@ -1057,6 +1069,11 @@ void ScDPObject::GetHeaderPositionData(const ScAddress& rPos, DataPilotTableHead sal_Bool ScDPObject::GetPivotData( ScDPGetPivotDataField& rTarget, const std::vector< ScDPGetPivotDataField >& rFilters ) { + // #i117239# Exit with an error if called from creating the cache for this object + // (don't create an empty pOutput object) + if (mbCreatingTableData) + return sal_False; + CreateOutput(); // create xSource and pOutput if not already done return pOutput->GetPivotData( rTarget, rFilters ); -- cgit v1.2.3 From 47b3e51e5d5351e8036a53e6deb555509fecf9e1 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Mon, 14 Mar 2011 15:12:57 +0100 Subject: calc66: #o11817313# also look at formula result number format --- sc/source/core/data/column2.cxx | 7 ++++++- sc/source/ui/view/output2.cxx | 17 +++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index 1ba47c24581d..15341f33d899 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -248,7 +248,12 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, sal_uLong nFormat = pPattern->GetNumberFormat( pFormatter, pCondSet ); // #i111387# #o11817313# disable automatic line breaks only for "General" number format if ( bBreak && pCell->HasValueData() && ( nFormat % SV_COUNTRY_LANGUAGE_OFFSET ) == 0 ) - bBreak = false; + { + // also take formula result type into account for number format + if ( pCell->GetCellType() != CELLTYPE_FORMULA || + ( static_cast(pCell)->GetStandardFormat(*pFormatter, nFormat) % SV_COUNTRY_LANGUAGE_OFFSET ) == 0 ) + bBreak = false; + } // get other attributes from pattern and conditional formatting diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index 8e64690508ea..bd13851a762a 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -152,6 +152,8 @@ public: const Size& GetTextSize() const { return aTextSize; } long GetOriginalWidth() const { return nOriginalWidth; } + sal_uLong GetResultValueFormat( const ScBaseCell* pCell ) const; + sal_uLong GetValueFormat() const { return nValueFormat; } sal_Bool GetLineBreak() const { return bLineBreak; } sal_Bool IsRepeat() const { return bRepeat; } @@ -540,7 +542,7 @@ void ScDrawStringsVars::SetTextToWidthOrHash( ScBaseCell* pCell, long nWidth ) return; } - sal_uLong nFormat = GetValueFormat(); + sal_uLong nFormat = GetResultValueFormat(pCell); if ((nFormat % SV_COUNTRY_LANGUAGE_OFFSET) != 0) { // Not 'General' number format. Set hash text and bail out. @@ -717,6 +719,17 @@ sal_Bool ScDrawStringsVars::HasEditCharacters() const return aString.SearchChar( pChars ) != STRING_NOTFOUND; } +sal_uLong ScDrawStringsVars::GetResultValueFormat( const ScBaseCell* pCell ) const +{ + // Get the effective number format, including formula result types. + // This assumes that a formula cell has already been calculated. + + if ( (nValueFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0 && pCell && pCell->GetCellType() == CELLTYPE_FORMULA ) + return static_cast(pCell)->GetStandardFormat(*pOutput->pDoc->GetFormatTable(), nValueFormat); + else + return nValueFormat; +} + //================================================================== double ScOutputData::GetStretch() @@ -1546,7 +1559,7 @@ void ScOutputData::DrawStrings( sal_Bool bPixelToLogic ) sal_Bool bBreak = ( aVars.GetLineBreak() || aVars.GetHorJust() == SVX_HOR_JUSTIFY_BLOCK ); // #i111387# #o11817313# disable automatic line breaks only for "General" number format - if ( bBreak && bCellIsValue && ( aVars.GetValueFormat() % SV_COUNTRY_LANGUAGE_OFFSET ) == 0 ) + if ( bBreak && bCellIsValue && ( aVars.GetResultValueFormat(pCell) % SV_COUNTRY_LANGUAGE_OFFSET ) == 0 ) bBreak = sal_False; sal_Bool bRepeat = aVars.IsRepeat() && !bBreak; -- cgit v1.2.3 From 525198026899d978373933a91f45c79b12bacbd5 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Mon, 14 Mar 2011 15:47:38 +0100 Subject: sw34bf05: #i87645# - method - reset layout processing boolean, only if something has been invalidated. --- sw/source/core/layout/fly.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) mode change 100644 => 100755 sw/source/core/layout/fly.cxx diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx old mode 100644 new mode 100755 index 8cd4253f6ddc..d065f1e89c81 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -796,11 +796,10 @@ void SwFlyFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew ) UpdateObjInSortedList(); } // <-- + // --> OD #i87645# - reset flags for the layout process (only if something has been invalidated) + ResetLayoutProcessBools(); + // <-- } - - // --> OD 2005-07-18 #i51474# - reset flags for the layout process - ResetLayoutProcessBools(); - // <-- } void SwFlyFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew, -- cgit v1.2.3 From 53c1143e3da612f4e0659e1cb2fb3c539a8435aa Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Mon, 14 Mar 2011 16:56:15 +0100 Subject: sw34bf05: #i85105# - fix build breaker which was not detected under Windows --- sw/source/core/unocore/unoframe.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 93e25c5485d3..6be7d4301c5f 100755 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -1636,7 +1636,6 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) if(pIdx) { SwNodeIndex aIdx(*pIdx, 1); - SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode(); // --> OD #i85105# // SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode(); // Size aActSize = ((SwGrfNode*)pNoTxt)->GetTwipSize(); @@ -1649,7 +1648,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) if ( aActSize.Width() == 0 && aActSize.Height() == 0 && pGrfNode->IsLinkedFile() ) { - pGrfNode->SwapIn( TRUE ); + pGrfNode->SwapIn( sal_True ); aActSize = pGrfNode->GetTwipSize(); } } -- cgit v1.2.3 From ffd2c7b2b15f46b00fc802a49a27a971a9dee2d4 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Mon, 14 Mar 2011 18:02:00 +0100 Subject: calc66: #i117358# Compiler Warning Errors --- chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx | 2 +- chart2/source/view/axes/ScaleAutomatism.cxx | 2 +- chart2/source/view/axes/Tickmarks_Dates.cxx | 6 +++--- chart2/source/view/charttypes/VSeriesPlotter.cxx | 4 ++-- chart2/source/view/main/VLegend.cxx | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx index 95f7d45bc27f..bce22df7eb58 100644 --- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx @@ -618,7 +618,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet { TimeInterval aTimeInterval; aScale.TimeIncrement.MajorTimeInterval >>= aTimeInterval; - aTimeInterval.Number = static_cast(fValue); + aTimeInterval.Number = static_cast(fValue); aScale.TimeIncrement.MajorTimeInterval = uno::makeAny( aTimeInterval ); bSetScale = true; } diff --git a/chart2/source/view/axes/ScaleAutomatism.cxx b/chart2/source/view/axes/ScaleAutomatism.cxx index 075ad16347c2..e97635ae1578 100644 --- a/chart2/source/view/axes/ScaleAutomatism.cxx +++ b/chart2/source/view/axes/ScaleAutomatism.cxx @@ -693,7 +693,7 @@ void ScaleAutomatism::calculateExplicitIncrementAndScaleForDateTimeAxis( if(nNumer<=0) nNumer=1; rExplicitIncrement.MajorTimeInterval.Number = nNumer; - nMainIncrementCount = nDayCount/(nNumer*nDaysPerInterval); + nMainIncrementCount = static_cast(nDayCount/(nNumer*nDaysPerInterval)); } //choose minor time interval: diff --git a/chart2/source/view/axes/Tickmarks_Dates.cxx b/chart2/source/view/axes/Tickmarks_Dates.cxx index b5177fe307b8..fa466b755824 100644 --- a/chart2/source/view/axes/Tickmarks_Dates.cxx +++ b/chart2/source/view/axes/Tickmarks_Dates.cxx @@ -82,8 +82,8 @@ void DateTickFactory::getAllTicks( ::std::vector< ::std::vector< TickInfo > >& r Date aNull(m_aScale.NullDate); - Date aDate = aNull + ::rtl::math::approxFloor(m_aScale.Minimum); - Date aMaxDate = aNull + ::rtl::math::approxFloor(m_aScale.Maximum); + Date aDate = aNull + static_cast(::rtl::math::approxFloor(m_aScale.Minimum)); + Date aMaxDate = aNull + static_cast(::rtl::math::approxFloor(m_aScale.Maximum)); uno::Reference< chart2::XScaling > xScaling(m_aScale.Scaling); uno::Reference< chart2::XScaling > xInverseScaling(m_xInverseScaling); @@ -125,7 +125,7 @@ void DateTickFactory::getAllTicks( ::std::vector< ::std::vector< TickInfo > >& r } //create minor date tickinfos - aDate = aNull + ::rtl::math::approxFloor(m_aScale.Minimum); + aDate = aNull + static_cast(::rtl::math::approxFloor(m_aScale.Minimum)); while( aDate<= aMaxDate ) { if( bShifted && aDate==aMaxDate ) diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 1077591dfce8..d8402e45f1f4 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -1194,11 +1194,11 @@ long VSeriesPlotter::calculateTimeResolutionOnXAxis() aNullDate = m_apNumberFormatterWrapper->getNullDate(); if( aIt!=aEnd ) { - Date aPrevious(aNullDate); aPrevious+=rtl::math::approxFloor(aIt->fValue); + Date aPrevious(aNullDate); aPrevious+=static_cast(rtl::math::approxFloor(aIt->fValue)); ++aIt; for(;aIt!=aEnd;++aIt) { - Date aCurrent(aNullDate); aCurrent+=rtl::math::approxFloor(aIt->fValue); + Date aCurrent(aNullDate); aCurrent+=static_cast(rtl::math::approxFloor(aIt->fValue)); if( ::com::sun::star::chart::TimeUnit::YEAR == nRet ) { if( DateHelper::IsInSameYear( aPrevious, aCurrent ) ) diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index 33e1d1f26aa4..e7c681d80781 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -918,8 +918,8 @@ void VLegend::createShapes( RelativeSize aRelativeSize; if ((xLegendProp->getPropertyValue( C2U( "RelativeSize" )) >>= aRelativeSize)) { - aLegendSize.Width = aRelativeSize.Primary * rPageSize.Width; - aLegendSize.Height = aRelativeSize.Secondary * rPageSize.Height; + aLegendSize.Width = static_cast( ::rtl::math::approxCeil( aRelativeSize.Primary * rPageSize.Width ) ); //i117185 + aLegendSize.Height = static_cast( ::rtl::math::approxCeil( aRelativeSize.Secondary * rPageSize.Height ) ); //i117185 } else eExpansion = ::com::sun::star::chart::ChartLegendExpansion_HIGH; -- cgit v1.2.3 From 9da3a11edb636af3c3428a420be33b8fa3b1d5d5 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 14 Mar 2011 19:05:52 +0100 Subject: dba34d: #i116908# include --- svl/inc/svl/undo.hxx | 1 + 1 file changed, 1 insertion(+) diff --git a/svl/inc/svl/undo.hxx b/svl/inc/svl/undo.hxx index 3d2c46af496c..57a26c3109ec 100644 --- a/svl/inc/svl/undo.hxx +++ b/svl/inc/svl/undo.hxx @@ -35,6 +35,7 @@ #include #include +#include //==================================================================== -- cgit v1.2.3 From 1692644a24fdb5d12b58e595ea8f3a2adc856880 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 14 Mar 2011 22:47:46 +0100 Subject: dba34d: removed a duplicate 'vbaevents' entry --- postprocess/packcomponents/makefile.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk index 3dd513c26111..5a5a20a0c61f 100644 --- a/postprocess/packcomponents/makefile.mk +++ b/postprocess/packcomponents/makefile.mk @@ -172,7 +172,6 @@ my_components = \ uui \ vbaevents \ vbaobj \ - vbaevents \ vcl \ vclcanvas \ wpft \ -- cgit v1.2.3 From 907f0c4466f7cb788eddfe0b68562168434a758e Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Tue, 15 Mar 2011 13:33:14 +0100 Subject: calc66: warnings --- sc/source/core/tool/token.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index c7126fb16aa8..83ee5d365e63 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -564,7 +564,6 @@ sal_Bool ScToken::Is3DRef() const case svExternalSingleRef: case svExternalDoubleRef: return sal_True; - break; default: { // added to avoid warnings -- cgit v1.2.3 From 53155997b9d8b8c1043e0e81a30542c5dae495dc Mon Sep 17 00:00:00 2001 From: os Date: Tue, 15 Mar 2011 14:20:47 +0100 Subject: #i116336# mail merge to single documents fixed --- sw/inc/swabstdlg.hxx | 5 +++++ sw/source/ui/dbui/dbmgr.cxx | 8 +++++++- sw/source/ui/dialog/swdlgfact.cxx | 17 +++++++++++++++++ sw/source/ui/dialog/swdlgfact.hxx | 4 ++++ sw/source/ui/inc/mailmrge.hxx | 6 ++++++ 5 files changed, 39 insertions(+), 1 deletion(-) diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index 2768cc50bc82..33cac190d5d1 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -164,6 +164,11 @@ public: virtual const ::rtl::OUString& GetSaveFilter() const = 0; virtual const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const = 0; virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const = 0; + virtual bool IsSaveIndividualDocs() const = 0; + virtual bool IsGenerateFromDataBase() const = 0; + virtual String GetColumnName() const = 0; + virtual String GetPath() const = 0; + }; class AbstractMailMergeCreateFromDlg : public VclAbstractDialog //add for SwMailMergeCreateFromDlg { diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 13645f395d04..fc17b6093cba 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -2598,7 +2598,13 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh, SwMergeDescriptor aMergeDesc( pImpl->pMergeDialog->GetMergeType(), pView->GetWrtShell(), aDescriptor ); aMergeDesc.sSaveToFilter = pImpl->pMergeDialog->GetSaveFilter(); - aMergeDesc.bCreateSingleFile= true; + aMergeDesc.bCreateSingleFile = !pImpl->pMergeDialog->IsSaveIndividualDocs(); + if( !aMergeDesc.bCreateSingleFile && pImpl->pMergeDialog->IsGenerateFromDataBase() ) + { + aMergeDesc.sAddressFromColumn = pImpl->pMergeDialog->GetColumnName(); + aMergeDesc.sSubject = pImpl->pMergeDialog->GetPath(); + } + MergeNew(aMergeDesc); pWorkDoc->SetNewDBMgr( pWorkDBMgr ); diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 5610365e3167..19db1f67c44b 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -526,6 +526,23 @@ uno::Reference< sdbc::XResultSet> AbstractMailMergeDlg_Impl::GetResultSet() cons { return pDlg->GetResultSet(); } +bool AbstractMailMergeDlg_Impl::IsSaveIndividualDocs() const +{ + return pDlg->IsSaveIndividualDocs(); +} +bool AbstractMailMergeDlg_Impl::IsGenerateFromDataBase() const +{ + return pDlg->IsGenerateFromDataBase(); +} +String AbstractMailMergeDlg_Impl::GetColumnName() const +{ + return pDlg->GetColumnName(); +} +String AbstractMailMergeDlg_Impl::GetPath() const +{ + return pDlg->GetPath(); +} + // AbstractMailMergeDlg_Impl end // AbstractMailMergeCreateFromDlg_Impl begin sal_Bool AbstractMailMergeCreateFromDlg_Impl::IsThisDocument() const diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 5ffd7fcd74ad..4c970c58aca7 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -332,6 +332,10 @@ class AbstractMailMergeDlg_Impl : public AbstractMailMergeDlg virtual const ::rtl::OUString& GetSaveFilter() const; virtual const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const ; virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const; + virtual bool IsSaveIndividualDocs() const; + virtual bool IsGenerateFromDataBase() const; + virtual String GetColumnName() const; + virtual String GetPath() const; }; //for SwMailMergeDlg end //for SwMailMergeCreateFromDlg begin diff --git a/sw/source/ui/inc/mailmrge.hxx b/sw/source/ui/inc/mailmrge.hxx index 43534f76a3da..c541832462ec 100644 --- a/sw/source/ui/inc/mailmrge.hxx +++ b/sw/source/ui/inc/mailmrge.hxx @@ -156,6 +156,12 @@ public: ~SwMailMergeDlg(); inline sal_uInt16 GetMergeType() { return nMergeType; } + + bool IsSaveIndividualDocs() const { return aSaveIndividualRB.IsChecked(); } + bool IsGenerateFromDataBase() const { return aGenerateFromDataBaseCB.IsChecked(); } + String GetColumnName() const { return aColumnLB.GetSelectEntry();} + String GetPath() const { return aPathED.GetText();} + const ::rtl::OUString& GetSaveFilter() const {return m_sSaveFilter;} inline const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const { return m_aSelection; } ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const; -- cgit v1.2.3 From ff7c2e7d4210a3171e8395a768ad9e8253a9b8b1 Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Tue, 15 Mar 2011 14:34:21 +0100 Subject: rsvglibs: deliver changed --- glib/prj/d.lst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/glib/prj/d.lst b/glib/prj/d.lst index 4a9fb4ce2f86..f3e91032d582 100644 --- a/glib/prj/d.lst +++ b/glib/prj/d.lst @@ -10,11 +10,11 @@ symlink: %_DEST%\lib%_EXT%\libglib-2.0.0.dylib %_DEST%\lib%_EXT%\libglib-2.0.dyl ..\%__SRC%\lib\libgobject-2.0.0.dylib %_DEST%\lib%_EXT%\libgobject-2.0.0.dylib symlink: %_DEST%\lib%_EXT%\libgobject-2.0.0.dylib %_DEST%\lib%_EXT%\libgobject-2.0.dylib ..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT% -..\%__SRC%\lib\libgio-2.0.lib %_DEST%\lib%_EXT%\libgio-2.0.lib -..\%__SRC%\lib\libgmodule-2.0.lib %_DEST%\lib%_EXT%\libgmodule-2.0.lib -..\%__SRC%\lib\libgthread-2.0.lib %_DEST%\lib%_EXT%\libgthread-2.0.lib -..\%__SRC%\lib\libglib-2.0.lib %_DEST%\lib%_EXT%\libglib-2.0.lib -..\%__SRC%\lib\libgobject-2.0.lib %_DEST%\lib%_EXT%\libgobject-2.0.lib +..\%__SRC%\lib\gio-2.0.lib %_DEST%\lib%_EXT%\gio-2.0.lib +..\%__SRC%\lib\gmodule-2.0.lib %_DEST%\lib%_EXT%\gmodule-2.0.lib +..\%__SRC%\lib\gthread-2.0.lib %_DEST%\lib%_EXT%\gthread-2.0.lib +..\%__SRC%\lib\glib-2.0.lib %_DEST%\lib%_EXT%\glib-2.0.lib +..\%__SRC%\lib\gobject-2.0.lib %_DEST%\lib%_EXT%\gobject-2.0.lib mkdir: %_DEST%\inc%_EXT%\external\gio-unix-2.0 mkdir: %_DEST%\inc%_EXT%\external\gio-unix-2.0\gio -- cgit v1.2.3 From f0d7607ff2bd136b9d420947b50bbea323ffdf78 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 15 Mar 2011 16:27:21 +0100 Subject: test123l10n04: #i107099# fixed italian file --- extras/source/autotext/lang/it/standard.bau | Bin 44669 -> 49477 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/extras/source/autotext/lang/it/standard.bau b/extras/source/autotext/lang/it/standard.bau index 37dc3d492d36..1d1679c62508 100644 Binary files a/extras/source/autotext/lang/it/standard.bau and b/extras/source/autotext/lang/it/standard.bau differ -- cgit v1.2.3 From 53483b25451545ced391cd0f3cf86e8d4b7e31c7 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 15 Mar 2011 17:37:20 +0100 Subject: vcl121: #i117390# fix the fix for issue 80730 --- vcl/inc/vcl/cursor.hxx | 2 +- vcl/source/window/cursor.cxx | 17 +++++++++-------- vcl/source/window/window.cxx | 8 ++++---- vcl/source/window/winproc.cxx | 4 ++-- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/vcl/inc/vcl/cursor.hxx b/vcl/inc/vcl/cursor.hxx index c143e49002fa..11f00145c466 100644 --- a/vcl/inc/vcl/cursor.hxx +++ b/vcl/inc/vcl/cursor.hxx @@ -69,7 +69,7 @@ public: SAL_DLLPRIVATE void ImplRestore(); DECL_DLLPRIVATE_LINK( ImplTimerHdl, AutoTimer* ); SAL_DLLPRIVATE void ImplShow( bool bDrawDirect = true, bool bRestore = false ); - SAL_DLLPRIVATE bool ImplHide(); + SAL_DLLPRIVATE bool ImplHide( bool bStopTimer ); SAL_DLLPRIVATE void ImplNew(); public: diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx index c59978077412..883010c3e8d7 100644 --- a/vcl/source/window/cursor.cxx +++ b/vcl/source/window/cursor.cxx @@ -216,7 +216,7 @@ void Cursor::ImplShow( bool bDrawDirect, bool bRestore ) // ----------------------------------------------------------------------- -bool Cursor::ImplHide() +bool Cursor::ImplHide( bool i_bStopTimer ) { bool bWasCurVisible = false; if ( mpData && mpData->mpWindow ) @@ -225,6 +225,13 @@ bool Cursor::ImplHide() if ( mpData->mbCurVisible ) ImplRestore(); } + + if( mpData && i_bStopTimer ) + { + mpData->maTimer.Stop(); + mpData->mpWindow = NULL; + } + return bWasCurVisible; } @@ -328,13 +335,7 @@ void Cursor::Hide() if ( mbVisible ) { mbVisible = sal_False; - ImplHide(); - - if( mpData ) - { - mpData->maTimer.Stop(); - mpData->mpWindow = NULL; - } + ImplHide( true ); } } diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 96e787928772..792228d40459 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -2407,7 +2407,7 @@ void Window::ImplCallPaint( const Region* pRegion, sal_uInt16 nPaintFlags ) { bool bRestoreCursor = false; if ( mpWindowImpl->mpCursor ) - bRestoreCursor = mpWindowImpl->mpCursor->ImplHide(); + bRestoreCursor = mpWindowImpl->mpCursor->ImplHide( false ); mbInitClipRegion = sal_True; mpWindowImpl->mbInPaint = sal_True; @@ -2896,7 +2896,7 @@ void Window::ImplScroll( const Rectangle& rRect, ImplInvalidateAllOverlapBackgrounds(); if ( mpWindowImpl->mpCursor ) - mpWindowImpl->mpCursor->ImplHide(); + mpWindowImpl->mpCursor->ImplHide( false ); sal_uInt16 nOrgFlags = nFlags; if ( !(nFlags & (SCROLL_CHILDREN | SCROLL_NOCHILDREN)) ) @@ -4073,7 +4073,7 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags ) { // Cursor hiden if ( pOldFocusWindow->mpWindowImpl->mpCursor ) - pOldFocusWindow->mpWindowImpl->mpCursor->ImplHide(); + pOldFocusWindow->mpWindowImpl->mpCursor->ImplHide( true ); } // !!!!! Wegen altem SV-Office Activate/Deavtivate Handling @@ -8054,7 +8054,7 @@ void Window::SetCursor( Cursor* pCursor ) if ( mpWindowImpl->mpCursor != pCursor ) { if ( mpWindowImpl->mpCursor ) - mpWindowImpl->mpCursor->ImplHide(); + mpWindowImpl->mpCursor->ImplHide( true ); mpWindowImpl->mpCursor = pCursor; if ( pCursor ) pCursor->ImplShow(); diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 9cb38756e770..171c1f3ff74d 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -1793,7 +1793,7 @@ IMPL_LINK( Window, ImplAsyncFocusHdl, void*, EMPTYARG ) pSVData->maWinData.mpFocusWin = NULL; if ( pFocusWin->ImplGetWindowImpl()->mpCursor ) - pFocusWin->ImplGetWindowImpl()->mpCursor->ImplHide(); + pFocusWin->ImplGetWindowImpl()->mpCursor->ImplHide( true ); // Deaktivate rufen Window* pOldFocusWindow = pFocusWin; @@ -1900,7 +1900,7 @@ static void ImplHandleLoseFocus( Window* pWindow ) Window* pFocusWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin; if ( pFocusWin && pFocusWin->ImplGetWindowImpl()->mpCursor ) - pFocusWin->ImplGetWindowImpl()->mpCursor->ImplHide(); + pFocusWin->ImplGetWindowImpl()->mpCursor->ImplHide( true ); if( bCallDirect ) pWindow->ImplAsyncFocusHdl( NULL ); } -- cgit v1.2.3 From 65162840e329afee6f401f5a91273c2dbd1bbdf8 Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Tue, 15 Mar 2011 21:47:26 +0100 Subject: #i117329# - Publishing of UNO types, first wave. --- offapi/com/sun/star/awt/AsyncCallback.idl | 2 +- offapi/com/sun/star/awt/ContainerWindowProvider.idl | 2 +- offapi/com/sun/star/awt/DialogProvider.idl | 2 +- offapi/com/sun/star/awt/DialogProvider2.idl | 2 +- offapi/com/sun/star/awt/MenuItemType.idl | 2 +- offapi/com/sun/star/awt/MenuLogo.idl | 2 +- offapi/com/sun/star/awt/XCallback.idl | 2 +- offapi/com/sun/star/awt/XContainerWindowEventHandler.idl | 2 +- offapi/com/sun/star/awt/XContainerWindowProvider.idl | 2 +- offapi/com/sun/star/awt/XDialogEventHandler.idl | 2 +- offapi/com/sun/star/awt/XDialogProvider.idl | 2 +- offapi/com/sun/star/awt/XDialogProvider2.idl | 14 ++++++-------- offapi/com/sun/star/awt/XFixedHyperlink.idl | 2 +- offapi/com/sun/star/awt/XMenuExtended.idl | 2 +- offapi/com/sun/star/awt/XMenuExtended2.idl | 2 +- offapi/com/sun/star/awt/XPopupMenuExtended.idl | 2 +- offapi/com/sun/star/awt/XRequestCallback.idl | 2 +- offapi/com/sun/star/awt/XSimpleTabController.idl | 2 +- offapi/com/sun/star/awt/XTabListener.idl | 2 +- offapi/com/sun/star/awt/XUnitConversion.idl | 2 +- offapi/com/sun/star/deployment/DeploymentException.idl | 2 +- .../com/sun/star/deployment/PackageInformationProvider.idl | 2 +- .../sun/star/deployment/XPackageInformationProvider.idl | 2 +- offapi/com/sun/star/frame/ModuleManager.idl | 2 +- offapi/com/sun/star/frame/UnknownModuleException.idl | 2 +- offapi/com/sun/star/frame/XLayoutManager.idl | 2 +- .../com/sun/star/frame/XLayoutManagerEventBroadcaster.idl | 2 +- offapi/com/sun/star/frame/XLayoutManagerListener.idl | 2 +- offapi/com/sun/star/frame/XModuleManager.idl | 2 +- offapi/com/sun/star/frame/XTitle.idl | 14 ++++++++++---- .../com/sun/star/resource/StringResourceWithLocation.idl | 2 +- offapi/com/sun/star/resource/XStringResourceManager.idl | 2 +- .../com/sun/star/resource/XStringResourcePersistence.idl | 2 +- offapi/com/sun/star/resource/XStringResourceResolver.idl | 2 +- .../com/sun/star/resource/XStringResourceWithLocation.idl | 2 +- offapi/com/sun/star/security/CertificateContainer.idl | 3 ++- .../com/sun/star/security/CertificateContainerStatus.idl | 4 +--- .../sun/star/security/SecurityInfrastructureException.idl | 6 +----- offapi/com/sun/star/security/XCertificate.idl | 6 +----- offapi/com/sun/star/security/XCertificateContainer.idl | 2 +- offapi/com/sun/star/security/XCertificateExtension.idl | 6 +----- offapi/com/sun/star/sheet/ComplexReference.idl | 2 +- offapi/com/sun/star/sheet/FormulaOpCodeMapEntry.idl | 2 +- offapi/com/sun/star/sheet/FormulaToken.idl | 2 +- offapi/com/sun/star/sheet/SingleReference.idl | 2 +- offapi/com/sun/star/sheet/XFormulaOpCodeMapper.idl | 2 +- offapi/com/sun/star/sheet/XFormulaTokens.idl | 2 +- offapi/com/sun/star/task/ErrorCodeIOException.idl | 2 +- offapi/com/sun/star/task/XUrlContainer.idl | 2 +- offapi/com/sun/star/text/GlobalDocument.idl | 4 +++- offapi/com/sun/star/text/WebDocument.idl | 4 +++- offapi/com/sun/star/ucb/CertificateValidationRequest.idl | 5 ++++- offapi/com/sun/star/ucb/URLAuthenticationRequest.idl | 2 +- .../com/sun/star/ucb/XInteractionSupplyAuthentication2.idl | 2 +- offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl | 7 +++---- offapi/com/sun/star/ui/DockingArea.idl | 2 +- .../sun/star/ui/ModuleUIConfigurationManagerSupplier.idl | 2 +- offapi/com/sun/star/ui/UIElementFactory.idl | 2 +- offapi/com/sun/star/ui/WindowStateConfiguration.idl | 2 +- offapi/com/sun/star/ui/XDockingAreaAcceptor.idl | 2 +- offapi/com/sun/star/ui/XImageManager.idl | 2 +- .../sun/star/ui/XModuleUIConfigurationManagerSupplier.idl | 2 +- offapi/com/sun/star/ui/XUIConfiguration.idl | 2 +- offapi/com/sun/star/ui/XUIConfigurationListener.idl | 2 +- offapi/com/sun/star/ui/XUIConfigurationManager.idl | 2 +- offapi/com/sun/star/ui/XUIConfigurationPersistence.idl | 2 +- offapi/com/sun/star/ui/XUIElement.idl | 2 +- offapi/com/sun/star/ui/XUIElementFactory.idl | 2 +- offapi/com/sun/star/ui/XUIElementSettings.idl | 2 +- offapi/com/sun/star/xml/crypto/SEInitializer.idl | 6 +----- offapi/com/sun/star/xml/crypto/XSEInitializer.idl | 8 ++------ offapi/com/sun/star/xml/crypto/XSecurityEnvironment.idl | 6 +----- offapi/com/sun/star/xml/crypto/XXMLSecurityContext.idl | 6 +----- udkapi/com/sun/star/io/TempFile.idl | 2 +- udkapi/com/sun/star/io/XTempFile.idl | 2 +- udkapi/com/sun/star/script/ArrayWrapper.idl | 2 +- udkapi/com/sun/star/task/XInteractionHandler2.idl | 4 +++- 77 files changed, 104 insertions(+), 121 deletions(-) diff --git a/offapi/com/sun/star/awt/AsyncCallback.idl b/offapi/com/sun/star/awt/AsyncCallback.idl index 6c1d9feef993..4d7c3048ba1a 100644 --- a/offapi/com/sun/star/awt/AsyncCallback.idl +++ b/offapi/com/sun/star/awt/AsyncCallback.idl @@ -40,7 +40,7 @@ module com { module sun { module star { module awt { @see XRequestCallback */ -service AsyncCallback: XRequestCallback; +published service AsyncCallback: XRequestCallback; }; }; }; }; diff --git a/offapi/com/sun/star/awt/ContainerWindowProvider.idl b/offapi/com/sun/star/awt/ContainerWindowProvider.idl index 74bc62d11b56..f19d08a8e1bd 100644 --- a/offapi/com/sun/star/awt/ContainerWindowProvider.idl +++ b/offapi/com/sun/star/awt/ContainerWindowProvider.idl @@ -46,7 +46,7 @@ module com { module sun { module star { module awt { /** specifies a provider for container windows implementing the XWindow interface. */ -service ContainerWindowProvider : com::sun::star::awt::XContainerWindowProvider; +published service ContainerWindowProvider : com::sun::star::awt::XContainerWindowProvider; //============================================================================= diff --git a/offapi/com/sun/star/awt/DialogProvider.idl b/offapi/com/sun/star/awt/DialogProvider.idl index 863a107755d6..06768493d680 100644 --- a/offapi/com/sun/star/awt/DialogProvider.idl +++ b/offapi/com/sun/star/awt/DialogProvider.idl @@ -46,7 +46,7 @@ module com { module sun { module star { module awt { /** specifies a provider for dialogs implementing the XDialog interface. */ -service DialogProvider : com::sun::star::awt::XDialogProvider; +published service DialogProvider : com::sun::star::awt::XDialogProvider; // service DialogProvider { // interface com::sun::star::awt::XDialogProvider; diff --git a/offapi/com/sun/star/awt/DialogProvider2.idl b/offapi/com/sun/star/awt/DialogProvider2.idl index be0db00bf859..8299db6ae7e4 100644 --- a/offapi/com/sun/star/awt/DialogProvider2.idl +++ b/offapi/com/sun/star/awt/DialogProvider2.idl @@ -46,7 +46,7 @@ module com { module sun { module star { module awt { /** specifies a provider for dialogs implementing the XDialog interface. */ -service DialogProvider2 : com::sun::star::awt::XDialogProvider2; +published service DialogProvider2 : com::sun::star::awt::XDialogProvider2; //============================================================================= diff --git a/offapi/com/sun/star/awt/MenuItemType.idl b/offapi/com/sun/star/awt/MenuItemType.idl index d3907b9278eb..426563b2eb56 100644 --- a/offapi/com/sun/star/awt/MenuItemType.idl +++ b/offapi/com/sun/star/awt/MenuItemType.idl @@ -37,7 +37,7 @@ /** specifies the type of a menu item, as returned by XMenuExtended2::getItemType(). */ -enum MenuItemType +published enum MenuItemType { /** specifies that the menu item type is unkown. */ diff --git a/offapi/com/sun/star/awt/MenuLogo.idl b/offapi/com/sun/star/awt/MenuLogo.idl index a84f6be2f04a..4e558a5364c3 100755 --- a/offapi/com/sun/star/awt/MenuLogo.idl +++ b/offapi/com/sun/star/awt/MenuLogo.idl @@ -43,7 +43,7 @@ /** specifies a logo to be displayed on a menu, with a background gradient. */ -struct MenuLogo +published struct MenuLogo { /** specifies the logo image. */ diff --git a/offapi/com/sun/star/awt/XCallback.idl b/offapi/com/sun/star/awt/XCallback.idl index 08c058cd51ed..399fb16cec57 100644 --- a/offapi/com/sun/star/awt/XCallback.idl +++ b/offapi/com/sun/star/awt/XCallback.idl @@ -41,7 +41,7 @@ module com { module sun { module star { module awt { /** specifices an interface which can be used to call back an implementation */ -interface XCallback +published interface XCallback { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/awt/XContainerWindowEventHandler.idl b/offapi/com/sun/star/awt/XContainerWindowEventHandler.idl index d1e2d725c02e..21711d918ac9 100644 --- a/offapi/com/sun/star/awt/XContainerWindowEventHandler.idl +++ b/offapi/com/sun/star/awt/XContainerWindowEventHandler.idl @@ -48,7 +48,7 @@ module com { module sun { module star { module awt { /** Handles events fired by windows represented by a XWindow interface. */ -interface XContainerWindowEventHandler : ::com::sun::star::uno::XInterface { +published interface XContainerWindowEventHandler : ::com::sun::star::uno::XInterface { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/awt/XContainerWindowProvider.idl b/offapi/com/sun/star/awt/XContainerWindowProvider.idl index 1cea42d99a80..6435c80d5025 100644 --- a/offapi/com/sun/star/awt/XContainerWindowProvider.idl +++ b/offapi/com/sun/star/awt/XContainerWindowProvider.idl @@ -47,7 +47,7 @@ module com { module sun { module star { module awt { /** provides container windows implementing the XWindow interface. */ -interface XContainerWindowProvider : ::com::sun::star::uno::XInterface { +published interface XContainerWindowProvider : ::com::sun::star::uno::XInterface { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/awt/XDialogEventHandler.idl b/offapi/com/sun/star/awt/XDialogEventHandler.idl index 206d71bb5dee..57348bdb6eb2 100644 --- a/offapi/com/sun/star/awt/XDialogEventHandler.idl +++ b/offapi/com/sun/star/awt/XDialogEventHandler.idl @@ -48,7 +48,7 @@ module com { module sun { module star { module awt { /** Handles events fired by dialogs represented by a XDialog interface. */ -interface XDialogEventHandler : ::com::sun::star::uno::XInterface { +published interface XDialogEventHandler : ::com::sun::star::uno::XInterface { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/awt/XDialogProvider.idl b/offapi/com/sun/star/awt/XDialogProvider.idl index 2ab873df16b6..625483c01909 100644 --- a/offapi/com/sun/star/awt/XDialogProvider.idl +++ b/offapi/com/sun/star/awt/XDialogProvider.idl @@ -48,7 +48,7 @@ module com { module sun { module star { module awt { /** provides dialogs implementing the XDialog interface. */ -interface XDialogProvider : ::com::sun::star::uno::XInterface { +published interface XDialogProvider : ::com::sun::star::uno::XInterface { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/awt/XDialogProvider2.idl b/offapi/com/sun/star/awt/XDialogProvider2.idl index c08508a58bfe..7a2a549e5dd9 100644 --- a/offapi/com/sun/star/awt/XDialogProvider2.idl +++ b/offapi/com/sun/star/awt/XDialogProvider2.idl @@ -45,7 +45,7 @@ module com { module sun { module star { module awt { /** provides dialogs implementing the XDialog interface. */ -interface XDialogProvider2 : ::com::sun::star::awt::XDialogProvider { +published interface XDialogProvider2 : ::com::sun::star::awt::XDialogProvider { //------------------------------------------------------------------------- @@ -107,7 +107,7 @@ interface XDialogProvider2 : ::com::sun::star::awt::XDialogProvider { @see XDialogEventHandler */ - com::sun::star::awt::XDialog createDialogWithHandler + XDialog createDialogWithHandler ( [in] string URL, [in] com::sun::star::uno::XInterface xHandler ) raises ( com::sun::star::lang::IllegalArgumentException ); @@ -123,12 +123,10 @@ interface XDialogProvider2 : ::com::sun::star::awt::XDialogProvider {

*/ - XDialog createDialogWithArguments( - [in] string URL, - [in] sequence< ::com::sun::star::beans::NamedValue > Arguments - ) - raises ( com::sun::star::lang::IllegalArgumentException - ); + XDialog createDialogWithArguments + ( [in] string URL, + [in] sequence< ::com::sun::star::beans::NamedValue > Arguments ) + raises ( com::sun::star::lang::IllegalArgumentException ); }; //============================================================================= diff --git a/offapi/com/sun/star/awt/XFixedHyperlink.idl b/offapi/com/sun/star/awt/XFixedHyperlink.idl index 9fb6965b6e4a..978549828779 100644 --- a/offapi/com/sun/star/awt/XFixedHyperlink.idl +++ b/offapi/com/sun/star/awt/XFixedHyperlink.idl @@ -43,7 +43,7 @@ /** gives access to the text and formatting of a fixed hyperlink field. */ -interface XFixedHyperlink: com::sun::star::uno::XInterface +published interface XFixedHyperlink: com::sun::star::uno::XInterface { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/awt/XMenuExtended.idl b/offapi/com/sun/star/awt/XMenuExtended.idl index ba850ca5d416..3efa60eeafe1 100644 --- a/offapi/com/sun/star/awt/XMenuExtended.idl +++ b/offapi/com/sun/star/awt/XMenuExtended.idl @@ -38,7 +38,7 @@ module com { module sun { module star { module awt { /** specifies extended menu functions. */ -interface XMenuExtended: com::sun::star::uno::XInterface +published interface XMenuExtended: com::sun::star::uno::XInterface { /** sets the command string for the menu item. diff --git a/offapi/com/sun/star/awt/XMenuExtended2.idl b/offapi/com/sun/star/awt/XMenuExtended2.idl index adba6816a9e8..613699c5dd29 100755 --- a/offapi/com/sun/star/awt/XMenuExtended2.idl +++ b/offapi/com/sun/star/awt/XMenuExtended2.idl @@ -50,7 +50,7 @@ module com { module sun { module star { module awt { /** specifies extended menu functions. */ -interface XMenuExtended2 +published interface XMenuExtended2 { /** specifies some extended menu functions, like setting a command URL and a help command for a menu item.
These functions are available for both menu bar and popup menu. diff --git a/offapi/com/sun/star/awt/XPopupMenuExtended.idl b/offapi/com/sun/star/awt/XPopupMenuExtended.idl index ecec10fad8ea..5b6d112e8f28 100755 --- a/offapi/com/sun/star/awt/XPopupMenuExtended.idl +++ b/offapi/com/sun/star/awt/XPopupMenuExtended.idl @@ -63,7 +63,7 @@ module com { module sun { module star { module awt { @since OOo 3.1 */ -interface XPopupMenuExtended +published interface XPopupMenuExtended { /** specifies basic functions for a popup menu. */ diff --git a/offapi/com/sun/star/awt/XRequestCallback.idl b/offapi/com/sun/star/awt/XRequestCallback.idl index 7d89f0138683..4605fe348f3c 100644 --- a/offapi/com/sun/star/awt/XRequestCallback.idl +++ b/offapi/com/sun/star/awt/XRequestCallback.idl @@ -41,7 +41,7 @@ module com { module sun { module star { module awt { /** specifices an interface which can be used to call back an implementation */ -interface XRequestCallback +published interface XRequestCallback { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/awt/XSimpleTabController.idl b/offapi/com/sun/star/awt/XSimpleTabController.idl index 0688a1d08018..b705a9b73ace 100644 --- a/offapi/com/sun/star/awt/XSimpleTabController.idl +++ b/offapi/com/sun/star/awt/XSimpleTabController.idl @@ -52,7 +52,7 @@ /** specifies the basic operations for a tab controller, but does not require XControl as type of tabs. */ -interface XSimpleTabController : com::sun::star::uno::XInterface +published interface XSimpleTabController : com::sun::star::uno::XInterface { //------------------------------------------------------------------------- /** create a new tab and return an unique ID, diff --git a/offapi/com/sun/star/awt/XTabListener.idl b/offapi/com/sun/star/awt/XTabListener.idl index e7018bb284af..e169aa8fa126 100644 --- a/offapi/com/sun/star/awt/XTabListener.idl +++ b/offapi/com/sun/star/awt/XTabListener.idl @@ -48,7 +48,7 @@ /** such listener will be informed if tab's was inserted/removed from an XSimpleTabController instance or if the properties of a tab was changed. */ -interface XTabListener : com::sun::star::lang::XEventListener +published interface XTabListener : com::sun::star::lang::XEventListener { //------------------------------------------------------------------------- /** a new tab was inserted. diff --git a/offapi/com/sun/star/awt/XUnitConversion.idl b/offapi/com/sun/star/awt/XUnitConversion.idl index b04802ee0728..aed9b4cbeee2 100644 --- a/offapi/com/sun/star/awt/XUnitConversion.idl +++ b/offapi/com/sun/star/awt/XUnitConversion.idl @@ -53,7 +53,7 @@ @since OOo 3.0 */ -interface XUnitConversion: com::sun::star::uno::XInterface +published interface XUnitConversion: com::sun::star::uno::XInterface { /** converts the given Point, which is specified in pixels, into the given logical unit diff --git a/offapi/com/sun/star/deployment/DeploymentException.idl b/offapi/com/sun/star/deployment/DeploymentException.idl index fd40cf0e8aec..2b82c4621068 100644 --- a/offapi/com/sun/star/deployment/DeploymentException.idl +++ b/offapi/com/sun/star/deployment/DeploymentException.idl @@ -37,7 +37,7 @@ module com { module sun { module star { module deployment { @since OOo 2.0 */ -exception DeploymentException : com::sun::star::uno::Exception +published exception DeploymentException : com::sun::star::uno::Exception { /** reflects the cause of the error. Commonly an exception. */ diff --git a/offapi/com/sun/star/deployment/PackageInformationProvider.idl b/offapi/com/sun/star/deployment/PackageInformationProvider.idl index 9d3c81d10d08..dc0ad465856f 100644 --- a/offapi/com/sun/star/deployment/PackageInformationProvider.idl +++ b/offapi/com/sun/star/deployment/PackageInformationProvider.idl @@ -34,7 +34,7 @@ module com { module sun { module star { module deployment { @since OOo 2.3 */ -singleton PackageInformationProvider : XPackageInformationProvider; +published singleton PackageInformationProvider : XPackageInformationProvider; }; }; }; }; diff --git a/offapi/com/sun/star/deployment/XPackageInformationProvider.idl b/offapi/com/sun/star/deployment/XPackageInformationProvider.idl index a983e34ecdd3..9389fb69bec6 100644 --- a/offapi/com/sun/star/deployment/XPackageInformationProvider.idl +++ b/offapi/com/sun/star/deployment/XPackageInformationProvider.idl @@ -36,7 +36,7 @@ module com { module sun { module star { module deployment { @since OOo 2.3 */ -interface XPackageInformationProvider +published interface XPackageInformationProvider { /** get Package information for a specific extension. diff --git a/offapi/com/sun/star/frame/ModuleManager.idl b/offapi/com/sun/star/frame/ModuleManager.idl index 7a102da72bef..186e89858c20 100644 --- a/offapi/com/sun/star/frame/ModuleManager.idl +++ b/offapi/com/sun/star/frame/ModuleManager.idl @@ -51,7 +51,7 @@ module com { module sun { module star { module frame { @since OOo 2.0 */ -service ModuleManager +published service ModuleManager { //------------------------------------------- /** provides functions to identify office modules. diff --git a/offapi/com/sun/star/frame/UnknownModuleException.idl b/offapi/com/sun/star/frame/UnknownModuleException.idl index 9b3169c1dcbe..510cc08203e0 100644 --- a/offapi/com/sun/star/frame/UnknownModuleException.idl +++ b/offapi/com/sun/star/frame/UnknownModuleException.idl @@ -42,7 +42,7 @@ module com { module sun { module star { module frame { @since OOo 2.0 */ -exception UnknownModuleException : ::com::sun::star::uno::Exception +published exception UnknownModuleException : ::com::sun::star::uno::Exception { }; diff --git a/offapi/com/sun/star/frame/XLayoutManager.idl b/offapi/com/sun/star/frame/XLayoutManager.idl index 1801140d2965..f9f027dfa81d 100644 --- a/offapi/com/sun/star/frame/XLayoutManager.idl +++ b/offapi/com/sun/star/frame/XLayoutManager.idl @@ -98,7 +98,7 @@ module com { module sun { module star { module frame { @since OOo 2.0 */ -interface XLayoutManager : com::sun::star::uno::XInterface +published interface XLayoutManager : com::sun::star::uno::XInterface { /** attaches a XFrame to a layout manager. diff --git a/offapi/com/sun/star/frame/XLayoutManagerEventBroadcaster.idl b/offapi/com/sun/star/frame/XLayoutManagerEventBroadcaster.idl index fc7636e21e56..48d077815ca4 100644 --- a/offapi/com/sun/star/frame/XLayoutManagerEventBroadcaster.idl +++ b/offapi/com/sun/star/frame/XLayoutManagerEventBroadcaster.idl @@ -43,7 +43,7 @@ @since OOo 2.0 */ -interface XLayoutManagerEventBroadcaster : com::sun::star::uno::XInterface +published interface XLayoutManagerEventBroadcaster : com::sun::star::uno::XInterface { /** adds a layout manager event listener to the object's listener list. diff --git a/offapi/com/sun/star/frame/XLayoutManagerListener.idl b/offapi/com/sun/star/frame/XLayoutManagerListener.idl index 1a1cd9266917..6a47bd382e45 100644 --- a/offapi/com/sun/star/frame/XLayoutManagerListener.idl +++ b/offapi/com/sun/star/frame/XLayoutManagerListener.idl @@ -49,7 +49,7 @@ module com { module sun { module star { module frame { @since OOo 2.0 */ -interface XLayoutManagerListener : com::sun::star::lang::XEventListener +published interface XLayoutManagerListener : com::sun::star::lang::XEventListener { //============================================================================= /** is invoked when a layout manager has made a certain operation. diff --git a/offapi/com/sun/star/frame/XModuleManager.idl b/offapi/com/sun/star/frame/XModuleManager.idl index 0e1d8b8fe00e..c240e382322e 100644 --- a/offapi/com/sun/star/frame/XModuleManager.idl +++ b/offapi/com/sun/star/frame/XModuleManager.idl @@ -49,7 +49,7 @@ module com { module sun { module star { module frame { @since OOo 2.0 */ -interface XModuleManager : com::sun::star::uno::XInterface +published interface XModuleManager : com::sun::star::uno::XInterface { //------------------------------------------- /** diff --git a/offapi/com/sun/star/frame/XTitle.idl b/offapi/com/sun/star/frame/XTitle.idl index 0ce06aecb8f0..2bc71111f932 100644 --- a/offapi/com/sun/star/frame/XTitle.idl +++ b/offapi/com/sun/star/frame/XTitle.idl @@ -40,17 +40,23 @@ module com { module sun { module star { module frame { //============================================================================= -/** todo document me +/** an interface representing an entity with a modifyable title. */ -interface XTitle : com::sun::star::uno::XInterface +published interface XTitle : com::sun::star::uno::XInterface { //------------------------------------------------------------------------- - /** todo document me + /** Returns the title of the object. + * + * @returns + * The title. */ string getTitle (); //------------------------------------------------------------------------- - /** todo document me + /** Sets the title of the object. + * + * @param sTitle + * The title. */ void setTitle ( [in] string sTitle ); }; diff --git a/offapi/com/sun/star/resource/StringResourceWithLocation.idl b/offapi/com/sun/star/resource/StringResourceWithLocation.idl index 9115d9e22758..ea3743106277 100644 --- a/offapi/com/sun/star/resource/StringResourceWithLocation.idl +++ b/offapi/com/sun/star/resource/StringResourceWithLocation.idl @@ -42,7 +42,7 @@ module com { module sun { module star { module resource { /** specifies a service providing access to a resource string table implementing the XStringResourceWithLocation interface. */ -service StringResourceWithLocation : com::sun::star::resource::XStringResourceWithLocation +published service StringResourceWithLocation : com::sun::star::resource::XStringResourceWithLocation { /** is used to initialize the object on its creation. diff --git a/offapi/com/sun/star/resource/XStringResourceManager.idl b/offapi/com/sun/star/resource/XStringResourceManager.idl index 140c6e832a59..d367e499be36 100644 --- a/offapi/com/sun/star/resource/XStringResourceManager.idl +++ b/offapi/com/sun/star/resource/XStringResourceManager.idl @@ -71,7 +71,7 @@ module com { module sun { module star { module resource { localized dialogs. */ -interface XStringResourceManager: com::sun::star::resource::XStringResourceResolver +published interface XStringResourceManager: com::sun::star::resource::XStringResourceResolver { /** Returns the resource's read only state diff --git a/offapi/com/sun/star/resource/XStringResourcePersistence.idl b/offapi/com/sun/star/resource/XStringResourcePersistence.idl index 880ff903e8b5..085613f1d058 100644 --- a/offapi/com/sun/star/resource/XStringResourcePersistence.idl +++ b/offapi/com/sun/star/resource/XStringResourcePersistence.idl @@ -52,7 +52,7 @@ module com { module sun { module star { module resource { @see XStringResourceManager. */ -interface XStringResourcePersistence: com::sun::star::resource::XStringResourceManager +published interface XStringResourcePersistence: com::sun::star::resource::XStringResourceManager { /** Stores all string table data respectively all data modified since diff --git a/offapi/com/sun/star/resource/XStringResourceResolver.idl b/offapi/com/sun/star/resource/XStringResourceResolver.idl index f386c73abd08..716b40341881 100644 --- a/offapi/com/sun/star/resource/XStringResourceResolver.idl +++ b/offapi/com/sun/star/resource/XStringResourceResolver.idl @@ -60,7 +60,7 @@ module com { module sun { module star { module resource { But also changing the locale at runtime can be supported in this way. */ -interface XStringResourceResolver: com::sun::star::util::XModifyBroadcaster +published interface XStringResourceResolver: com::sun::star::util::XModifyBroadcaster { /** Resolves the passed ResoureID for the current locale. This diff --git a/offapi/com/sun/star/resource/XStringResourceWithLocation.idl b/offapi/com/sun/star/resource/XStringResourceWithLocation.idl index 642187897ed3..d6e616a9a2ee 100644 --- a/offapi/com/sun/star/resource/XStringResourceWithLocation.idl +++ b/offapi/com/sun/star/resource/XStringResourceWithLocation.idl @@ -43,7 +43,7 @@ module com { module sun { module star { module resource { @see XStringResourcePersistence. */ -interface XStringResourceWithLocation: com::sun::star::resource::XStringResourcePersistence +published interface XStringResourceWithLocation: com::sun::star::resource::XStringResourcePersistence { /** Stores all string table data to a location and associates this location diff --git a/offapi/com/sun/star/security/CertificateContainer.idl b/offapi/com/sun/star/security/CertificateContainer.idl index ca6573c9c13b..5974aefa3a7f 100644 --- a/offapi/com/sun/star/security/CertificateContainer.idl +++ b/offapi/com/sun/star/security/CertificateContainer.idl @@ -37,9 +37,10 @@ module com { module sun { module star { module security { /** the service to be used for XCertificateContainer. + @since OOo 2.3.1 */ -service CertificateContainer: XCertificateContainer; +published service CertificateContainer: XCertificateContainer; }; }; }; }; diff --git a/offapi/com/sun/star/security/CertificateContainerStatus.idl b/offapi/com/sun/star/security/CertificateContainerStatus.idl index 302e301e562a..6ca4c43bd571 100644 --- a/offapi/com/sun/star/security/CertificateContainerStatus.idl +++ b/offapi/com/sun/star/security/CertificateContainerStatus.idl @@ -25,8 +25,6 @@ * ************************************************************************/ -/** -- idl definition -- **/ - #ifndef __com_sun_star_security_CertificateContainerStatus_idl_ #define __com_sun_star_security_CertificateContainerStatus_idl_ @@ -39,7 +37,7 @@ module com { module sun { module star { module security { * Constant definiton of a certificate container status. * */ -enum CertificateContainerStatus +published enum CertificateContainerStatus { /** * The certificate was not found. diff --git a/offapi/com/sun/star/security/SecurityInfrastructureException.idl b/offapi/com/sun/star/security/SecurityInfrastructureException.idl index 2b68c42b52ec..71cb0e18aa8b 100644 --- a/offapi/com/sun/star/security/SecurityInfrastructureException.idl +++ b/offapi/com/sun/star/security/SecurityInfrastructureException.idl @@ -25,10 +25,6 @@ * ************************************************************************/ -//i20156 - new file for xmlsecurity module - -/** -- idl definition -- **/ - #ifndef __com_sun_star_security_SecurityInfrastructureException_idl__ #define __com_sun_star_security_SecurityInfrastructureException_idl__ @@ -43,7 +39,7 @@ module com { module sun { module star { module security { //============================================================================= -exception SecurityInfrastructureException : com::sun::star::uno::SecurityException +published exception SecurityInfrastructureException : com::sun::star::uno::SecurityException { }; diff --git a/offapi/com/sun/star/security/XCertificate.idl b/offapi/com/sun/star/security/XCertificate.idl index 155ddc5e6b2f..0c4eaa1ddfc7 100644 --- a/offapi/com/sun/star/security/XCertificate.idl +++ b/offapi/com/sun/star/security/XCertificate.idl @@ -25,10 +25,6 @@ * ************************************************************************/ -//i20156 - new file for xmlsecurity module - -/** -- idl definition -- **/ - #ifndef __com_sun_star_security_XCertificate_idl_ #define __com_sun_star_security_XCertificate_idl_ @@ -43,7 +39,7 @@ module com { module sun { module star { module security { * *

This interface represents a x509 certificate.

*/ -interface XCertificate : com::sun::star::uno::XInterface +published interface XCertificate : com::sun::star::uno::XInterface { /** * the version number attribute of the certificate. diff --git a/offapi/com/sun/star/security/XCertificateContainer.idl b/offapi/com/sun/star/security/XCertificateContainer.idl index c71f0d209aab..605916c45fdc 100644 --- a/offapi/com/sun/star/security/XCertificateContainer.idl +++ b/offapi/com/sun/star/security/XCertificateContainer.idl @@ -37,7 +37,7 @@ module com { module sun { module star { module security { @see CertificateContainer @since OOo 2.3.1 */ -interface XCertificateContainer +published interface XCertificateContainer { /** Store the certificate in memory. @param url diff --git a/offapi/com/sun/star/security/XCertificateExtension.idl b/offapi/com/sun/star/security/XCertificateExtension.idl index 93148a74ac48..5c8c9549c4dc 100644 --- a/offapi/com/sun/star/security/XCertificateExtension.idl +++ b/offapi/com/sun/star/security/XCertificateExtension.idl @@ -25,10 +25,6 @@ * ************************************************************************/ -//i20156 - new file for xmlsecurity module - -/** -- idl definition -- **/ - #ifndef __com_sun_star_security_XCertificateExtension_idl_ #define __com_sun_star_security_XCertificateExtension_idl_ @@ -41,7 +37,7 @@ module com { module sun { module star { module security { * *

This interface represents a x509 certificate.

*/ -interface XCertificateExtension : com::sun::star::uno::XInterface +published interface XCertificateExtension : com::sun::star::uno::XInterface { /** * Check whether it is a critical extension diff --git a/offapi/com/sun/star/sheet/ComplexReference.idl b/offapi/com/sun/star/sheet/ComplexReference.idl index 12a8fd5db8e1..22cb225bab73 100644 --- a/offapi/com/sun/star/sheet/ComplexReference.idl +++ b/offapi/com/sun/star/sheet/ComplexReference.idl @@ -40,7 +40,7 @@ module com { module sun { module star { module sheet { /** contains a reference to a cell range. */ -struct ComplexReference +published struct ComplexReference { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/sheet/FormulaOpCodeMapEntry.idl b/offapi/com/sun/star/sheet/FormulaOpCodeMapEntry.idl index 0c80854db357..e49a9185fc62 100644 --- a/offapi/com/sun/star/sheet/FormulaOpCodeMapEntry.idl +++ b/offapi/com/sun/star/sheet/FormulaOpCodeMapEntry.idl @@ -41,7 +41,7 @@ module com { module sun { module star { module sheet { /** contains a mapping from a formula name (function name, operator, ...) to the OpCode used by the formula compiler. */ -struct FormulaOpCodeMapEntry +published struct FormulaOpCodeMapEntry { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/sheet/FormulaToken.idl b/offapi/com/sun/star/sheet/FormulaToken.idl index b9558fa164fb..96eaefcc52e3 100644 --- a/offapi/com/sun/star/sheet/FormulaToken.idl +++ b/offapi/com/sun/star/sheet/FormulaToken.idl @@ -36,7 +36,7 @@ module com { module sun { module star { module sheet { /** contains a single token within a formula. */ -struct FormulaToken +published struct FormulaToken { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/sheet/SingleReference.idl b/offapi/com/sun/star/sheet/SingleReference.idl index a4e191d08280..b49bf326fb40 100644 --- a/offapi/com/sun/star/sheet/SingleReference.idl +++ b/offapi/com/sun/star/sheet/SingleReference.idl @@ -36,7 +36,7 @@ module com { module sun { module star { module sheet { /** contains a reference to a single cell. */ -struct SingleReference +published struct SingleReference { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/sheet/XFormulaOpCodeMapper.idl b/offapi/com/sun/star/sheet/XFormulaOpCodeMapper.idl index e0ca0655d3e3..39760501214e 100644 --- a/offapi/com/sun/star/sheet/XFormulaOpCodeMapper.idl +++ b/offapi/com/sun/star/sheet/XFormulaOpCodeMapper.idl @@ -44,7 +44,7 @@ module com { module sun { module star { module sheet { /** gives access to spreadsheet compiler token interns. */ -interface XFormulaOpCodeMapper +published interface XFormulaOpCodeMapper { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/sheet/XFormulaTokens.idl b/offapi/com/sun/star/sheet/XFormulaTokens.idl index 5edfe0b9840d..0e7cb93482f1 100644 --- a/offapi/com/sun/star/sheet/XFormulaTokens.idl +++ b/offapi/com/sun/star/sheet/XFormulaTokens.idl @@ -44,7 +44,7 @@ module com { module sun { module star { module sheet { /** gives access to a formula as token sequence. */ -interface XFormulaTokens +published interface XFormulaTokens { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/task/ErrorCodeIOException.idl b/offapi/com/sun/star/task/ErrorCodeIOException.idl index 93b8aaa67d1a..9600483fcf32 100644 --- a/offapi/com/sun/star/task/ErrorCodeIOException.idl +++ b/offapi/com/sun/star/task/ErrorCodeIOException.idl @@ -40,7 +40,7 @@ /** IOException that can carry error codes ( not only io related ). It can be used to transport the error code information. */ -exception ErrorCodeIOException : com::sun::star::io::IOException +published exception ErrorCodeIOException : com::sun::star::io::IOException { //------------------------------------------------------------------------ /** specifies the error code. diff --git a/offapi/com/sun/star/task/XUrlContainer.idl b/offapi/com/sun/star/task/XUrlContainer.idl index ac55107c67f0..9a20a3e9238d 100644 --- a/offapi/com/sun/star/task/XUrlContainer.idl +++ b/offapi/com/sun/star/task/XUrlContainer.idl @@ -46,7 +46,7 @@ module com { module sun { module star { module task { @since OOo 3.2 */ -/*published*/ interface XUrlContainer : com::sun::star::uno::XInterface +published interface XUrlContainer : com::sun::star::uno::XInterface { //------------------------------------------------------------------------- /** Add a URL to the container. diff --git a/offapi/com/sun/star/text/GlobalDocument.idl b/offapi/com/sun/star/text/GlobalDocument.idl index 2e71c7ad3736..480887d64b0f 100644 --- a/offapi/com/sun/star/text/GlobalDocument.idl +++ b/offapi/com/sun/star/text/GlobalDocument.idl @@ -38,8 +38,10 @@ //============================================================================= /** Specify the document service of the global text module. + + @deprecated */ -service GlobalDocument +published service GlobalDocument { /** Provides the functionality of such global document. */ service GenericTextDocument; diff --git a/offapi/com/sun/star/text/WebDocument.idl b/offapi/com/sun/star/text/WebDocument.idl index 62b6294ff5ac..fd4f1b66aef6 100644 --- a/offapi/com/sun/star/text/WebDocument.idl +++ b/offapi/com/sun/star/text/WebDocument.idl @@ -38,8 +38,10 @@ //============================================================================= /** Specify the document service of the web module. + + @deprecated */ -service WebDocument +published service WebDocument { /** Provides the functionality of such web document. */ service GenericTextDocument; diff --git a/offapi/com/sun/star/ucb/CertificateValidationRequest.idl b/offapi/com/sun/star/ucb/CertificateValidationRequest.idl index 5d225aa0220c..1f427af1a323 100755 --- a/offapi/com/sun/star/ucb/CertificateValidationRequest.idl +++ b/offapi/com/sun/star/ucb/CertificateValidationRequest.idl @@ -42,7 +42,7 @@ module com { module sun { module star { module ucb { //============================================================================= /** An error specifing an invalid certificate. */ -exception CertificateValidationRequest: com::sun::star::task::ClassifiedInteractionRequest +published exception CertificateValidationRequest: com::sun::star::task::ClassifiedInteractionRequest { //------------------------------------------------------------------------- /** This value describes the validity of the certificate. @@ -54,6 +54,9 @@ exception CertificateValidationRequest: com::sun::star::task::ClassifiedInteract */ com::sun::star::security::XCertificate Certificate; + //------------------------------------------------------------------------- + /** The host name. + */ string HostName; }; diff --git a/offapi/com/sun/star/ucb/URLAuthenticationRequest.idl b/offapi/com/sun/star/ucb/URLAuthenticationRequest.idl index 1d79ea42cf2f..8e1ed6c0d2b5 100644 --- a/offapi/com/sun/star/ucb/URLAuthenticationRequest.idl +++ b/offapi/com/sun/star/ucb/URLAuthenticationRequest.idl @@ -42,7 +42,7 @@ module com { module sun { module star { module ucb { @since OOo 3.2 */ -/*published*/ exception URLAuthenticationRequest : AuthenticationRequest +published exception URLAuthenticationRequest : AuthenticationRequest { //------------------------------------------------------------------------- /** The URL for which authentication is requested. diff --git a/offapi/com/sun/star/ucb/XInteractionSupplyAuthentication2.idl b/offapi/com/sun/star/ucb/XInteractionSupplyAuthentication2.idl index 252ba27c25c6..853a927ba3dd 100644 --- a/offapi/com/sun/star/ucb/XInteractionSupplyAuthentication2.idl +++ b/offapi/com/sun/star/ucb/XInteractionSupplyAuthentication2.idl @@ -45,7 +45,7 @@ module com { module sun { module star { module ucb { @since OOo 3.2 */ -/*published*/ interface XInteractionSupplyAuthentication2 : XInteractionSupplyAuthentication +published interface XInteractionSupplyAuthentication2 : XInteractionSupplyAuthentication { //------------------------------------------------------------------------- /** Specifies if 'system credentials' can be obtained and used by the issuer diff --git a/offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl b/offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl index 98d72c25e8ad..561da63ee8c8 100644 --- a/offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl +++ b/offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl @@ -46,8 +46,7 @@ module com { module sun { module star { module ucb { XCommandEnvironment implementation, when executing a command using XCommandProcessor. */ -/* published */ -interface XWebDAVCommandEnvironment : com::sun::star::uno::XInterface +published interface XWebDAVCommandEnvironment : com::sun::star::uno::XInterface { //------------------------------------------------------------------------- /** This method gets called while assembling an WebDAV/HTTP request. @@ -66,8 +65,8 @@ interface XWebDAVCommandEnvironment : com::sun::star::uno::XInterface The header value must be an Any containing a string. */ sequence getUserRequestHeaders( - [in] string aURI, - [in] string aMethod); + [in] string aURI, + [in] string aMethod); }; //============================================================================= diff --git a/offapi/com/sun/star/ui/DockingArea.idl b/offapi/com/sun/star/ui/DockingArea.idl index f376581e0c7e..7880efb8ebd8 100644 --- a/offapi/com/sun/star/ui/DockingArea.idl +++ b/offapi/com/sun/star/ui/DockingArea.idl @@ -47,7 +47,7 @@ module com { module sun { module star { module ui { @since OOo 2.0 */ -enum DockingArea +published enum DockingArea { /** the top docking area below the menu bar. */ diff --git a/offapi/com/sun/star/ui/ModuleUIConfigurationManagerSupplier.idl b/offapi/com/sun/star/ui/ModuleUIConfigurationManagerSupplier.idl index 0a405a1ac64b..33bd1ae4a922 100644 --- a/offapi/com/sun/star/ui/ModuleUIConfigurationManagerSupplier.idl +++ b/offapi/com/sun/star/ui/ModuleUIConfigurationManagerSupplier.idl @@ -43,7 +43,7 @@ module com { module sun { module star { module ui { @since OOo 2.0 */ -service ModuleUIConfigurationManagerSupplier +published service ModuleUIConfigurationManagerSupplier { /** controls module based user interface configuration managers. diff --git a/offapi/com/sun/star/ui/UIElementFactory.idl b/offapi/com/sun/star/ui/UIElementFactory.idl index 24c4fa4f0501..bc5ced44ca05 100644 --- a/offapi/com/sun/star/ui/UIElementFactory.idl +++ b/offapi/com/sun/star/ui/UIElementFactory.idl @@ -52,7 +52,7 @@ module com { module sun { module star { module ui { @since OOo 2.0 */ -service UIElementFactory +published service UIElementFactory { /** this interface provides a function to create and initalize new instances of user interface elements. diff --git a/offapi/com/sun/star/ui/WindowStateConfiguration.idl b/offapi/com/sun/star/ui/WindowStateConfiguration.idl index 915bdfad93b0..8c34d07d557e 100644 --- a/offapi/com/sun/star/ui/WindowStateConfiguration.idl +++ b/offapi/com/sun/star/ui/WindowStateConfiguration.idl @@ -51,7 +51,7 @@ module com { module sun { module star { module ui { @since OOo 2.0 */ -service WindowStateConfiguration +published service WindowStateConfiguration { /** provides access to window based information about user interface elements of all installed application modules. diff --git a/offapi/com/sun/star/ui/XDockingAreaAcceptor.idl b/offapi/com/sun/star/ui/XDockingAreaAcceptor.idl index f3912a12c1a6..576c1d00268b 100644 --- a/offapi/com/sun/star/ui/XDockingAreaAcceptor.idl +++ b/offapi/com/sun/star/ui/XDockingAreaAcceptor.idl @@ -63,7 +63,7 @@ module com { module sun { module star { module ui { */ -interface XDockingAreaAcceptor : com::sun::star::uno::XInterface +published interface XDockingAreaAcceptor : com::sun::star::uno::XInterface { /** provide the container window where the layout manager can request border space for docking windows. diff --git a/offapi/com/sun/star/ui/XImageManager.idl b/offapi/com/sun/star/ui/XImageManager.idl index 2c5f3882fffe..fb9d260d7201 100644 --- a/offapi/com/sun/star/ui/XImageManager.idl +++ b/offapi/com/sun/star/ui/XImageManager.idl @@ -75,7 +75,7 @@ module com { module sun { module star { module ui {

*/ -interface XImageManager +published interface XImageManager { /** resets the image manager to default data. diff --git a/offapi/com/sun/star/ui/XModuleUIConfigurationManagerSupplier.idl b/offapi/com/sun/star/ui/XModuleUIConfigurationManagerSupplier.idl index a1f9942627a7..bb35b2211891 100644 --- a/offapi/com/sun/star/ui/XModuleUIConfigurationManagerSupplier.idl +++ b/offapi/com/sun/star/ui/XModuleUIConfigurationManagerSupplier.idl @@ -44,7 +44,7 @@ module com { module sun { module star { module ui { @since OOo 2.0 */ -interface XModuleUIConfigurationManagerSupplier : ::com::sun::star::uno::XInterface +published interface XModuleUIConfigurationManagerSupplier : ::com::sun::star::uno::XInterface { //---------------------------------------------------------------------- /** returns the requested module based user interface configuration manager. diff --git a/offapi/com/sun/star/ui/XUIConfiguration.idl b/offapi/com/sun/star/ui/XUIConfiguration.idl index 95ec91a65f5b..12c1891da376 100644 --- a/offapi/com/sun/star/ui/XUIConfiguration.idl +++ b/offapi/com/sun/star/ui/XUIConfiguration.idl @@ -50,7 +50,7 @@ module com { module sun { module star { module ui { @since OOo 2.0 */ -interface XUIConfiguration : ::com::sun::star::uno::XInterface +published interface XUIConfiguration : ::com::sun::star::uno::XInterface { /** adds the specified listener to receive events when elements are changed, inserted or removed. diff --git a/offapi/com/sun/star/ui/XUIConfigurationListener.idl b/offapi/com/sun/star/ui/XUIConfigurationListener.idl index 2e89eee6bea0..a44e2b947512 100644 --- a/offapi/com/sun/star/ui/XUIConfigurationListener.idl +++ b/offapi/com/sun/star/ui/XUIConfigurationListener.idl @@ -48,7 +48,7 @@ module com { module sun { module star { module ui { @since OOo 2.0 */ -interface XUIConfigurationListener : com::sun::star::lang::XEventListener +published interface XUIConfigurationListener : com::sun::star::lang::XEventListener { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/ui/XUIConfigurationManager.idl b/offapi/com/sun/star/ui/XUIConfigurationManager.idl index 95025ac3a516..e47af4af365e 100644 --- a/offapi/com/sun/star/ui/XUIConfigurationManager.idl +++ b/offapi/com/sun/star/ui/XUIConfigurationManager.idl @@ -73,7 +73,7 @@ module com { module sun { module star { module ui { @since OOo 2.0 */ -interface XUIConfigurationManager : ::com::sun::star::uno::XInterface +published interface XUIConfigurationManager : ::com::sun::star::uno::XInterface { /** resets the configuration manager to the default user interface configuration data. diff --git a/offapi/com/sun/star/ui/XUIConfigurationPersistence.idl b/offapi/com/sun/star/ui/XUIConfigurationPersistence.idl index aae269b58c26..a102edac1fc0 100644 --- a/offapi/com/sun/star/ui/XUIConfigurationPersistence.idl +++ b/offapi/com/sun/star/ui/XUIConfigurationPersistence.idl @@ -41,7 +41,7 @@ module com { module sun { module star { module ui { @since OOo 2.0 */ -interface XUIConfigurationPersistence : ::com::sun::star::uno::XInterface +published interface XUIConfigurationPersistence : ::com::sun::star::uno::XInterface { /** reloads the configuration data from the storage and reinitialize the user interface configuration manager instance with this data. diff --git a/offapi/com/sun/star/ui/XUIElement.idl b/offapi/com/sun/star/ui/XUIElement.idl index 26536a85f29f..ba835b2ab7d7 100644 --- a/offapi/com/sun/star/ui/XUIElement.idl +++ b/offapi/com/sun/star/ui/XUIElement.idl @@ -60,7 +60,7 @@ module com { module sun { module star { module ui {

*/ -interface XUIElement : com::sun::star::uno::XInterface +published interface XUIElement : com::sun::star::uno::XInterface { /** returns an interface to get access to user interface type specific functions. diff --git a/offapi/com/sun/star/ui/XUIElementFactory.idl b/offapi/com/sun/star/ui/XUIElementFactory.idl index 708ccadf22bf..053f14654ca8 100644 --- a/offapi/com/sun/star/ui/XUIElementFactory.idl +++ b/offapi/com/sun/star/ui/XUIElementFactory.idl @@ -70,7 +70,7 @@ module com { module sun { module star { module ui { @since OOo 2.0 */ -interface XUIElementFactory : ::com::sun::star::uno::XInterface +published interface XUIElementFactory : ::com::sun::star::uno::XInterface { /** creates a new instances of a specific user interface element. diff --git a/offapi/com/sun/star/ui/XUIElementSettings.idl b/offapi/com/sun/star/ui/XUIElementSettings.idl index ab5604b6a937..7d39acb4684d 100644 --- a/offapi/com/sun/star/ui/XUIElementSettings.idl +++ b/offapi/com/sun/star/ui/XUIElementSettings.idl @@ -48,7 +48,7 @@ module com { module sun { module star { module ui { @since OOo 2.0 */ -interface XUIElementSettings : com::sun::star::uno::XInterface +published interface XUIElementSettings : com::sun::star::uno::XInterface { /** forces the user interface element to retrieve new settings from its configuration source. diff --git a/offapi/com/sun/star/xml/crypto/SEInitializer.idl b/offapi/com/sun/star/xml/crypto/SEInitializer.idl index bf947f5555d0..e27bafd319e9 100644 --- a/offapi/com/sun/star/xml/crypto/SEInitializer.idl +++ b/offapi/com/sun/star/xml/crypto/SEInitializer.idl @@ -25,10 +25,6 @@ * ************************************************************************/ -//i20156 - new file for xmlsecurity module - -/** -- idl definition -- **/ - #ifndef __com_sun_star_xml_crypto_seinitializer_idl_ #define __com_sun_star_xml_crypto_seinitializer_idl_ @@ -44,7 +40,7 @@ module com { module sun { module star { module xml { module crypto { /** * Service of SEInitializer */ -service SEInitializer { +published service SEInitializer { interface com::sun::star::xml::crypto::XSEInitializer ; interface com::sun::star::lang::XServiceInfo ; }; diff --git a/offapi/com/sun/star/xml/crypto/XSEInitializer.idl b/offapi/com/sun/star/xml/crypto/XSEInitializer.idl index 5d41d3a03575..eedbfa9551a4 100644 --- a/offapi/com/sun/star/xml/crypto/XSEInitializer.idl +++ b/offapi/com/sun/star/xml/crypto/XSEInitializer.idl @@ -25,10 +25,6 @@ * ************************************************************************/ -//i20156 - new file for xmlsecurity module - -/** -- idl definition -- **/ - #ifndef __com_sun_star_xml_crypto_xseinitializer_idl_ #define __com_sun_star_xml_crypto_xseinitializer_idl_ @@ -37,12 +33,12 @@ module com { module sun { module star { module xml { module crypto { -interface XXMLSecurityContext; +published interface XXMLSecurityContext; /** * Interface to manipulate Security Environment */ -interface XSEInitializer : com::sun::star::uno::XInterface +published interface XSEInitializer : com::sun::star::uno::XInterface { /** * Creates a security context. diff --git a/offapi/com/sun/star/xml/crypto/XSecurityEnvironment.idl b/offapi/com/sun/star/xml/crypto/XSecurityEnvironment.idl index 2a22282be54c..d2a3e99a36ba 100644 --- a/offapi/com/sun/star/xml/crypto/XSecurityEnvironment.idl +++ b/offapi/com/sun/star/xml/crypto/XSecurityEnvironment.idl @@ -25,10 +25,6 @@ * ************************************************************************/ -//i20156 - new file for xmlsecurity module - -/** -- idl definition -- **/ - #ifndef __com_sun_star_xml_crypto_xsecurityenvironment_idl_ #define __com_sun_star_xml_crypto_xsecurityenvironment_idl_ @@ -47,7 +43,7 @@ module com { module sun { module star { module xml { module crypto { /** * Interface of Security Environment */ -interface XSecurityEnvironment : com::sun::star::uno::XInterface +published interface XSecurityEnvironment : com::sun::star::uno::XInterface { /** * Get personal certificate from the environment diff --git a/offapi/com/sun/star/xml/crypto/XXMLSecurityContext.idl b/offapi/com/sun/star/xml/crypto/XXMLSecurityContext.idl index 6e08c6dee3b0..f61ae4d802ae 100644 --- a/offapi/com/sun/star/xml/crypto/XXMLSecurityContext.idl +++ b/offapi/com/sun/star/xml/crypto/XXMLSecurityContext.idl @@ -25,10 +25,6 @@ * ************************************************************************/ -//i20156 - new file for xmlsecurity module - -/** -- idl definition -- **/ - #ifndef __com_sun_star_xml_crypto_xxmlsecuritycontext_idl_ #define __com_sun_star_xml_crypto_xxmlsecuritycontext_idl_ @@ -45,7 +41,7 @@ module com { module sun { module star { module xml { module crypto { *

This interface specifies a certain signature context. By signature * context, the signer or verifier retrieves key specification.

*/ -interface XXMLSecurityContext : com::sun::star::uno::XInterface +published interface XXMLSecurityContext : com::sun::star::uno::XInterface { /** * Add personal security environment , and return the index of the added env. diff --git a/udkapi/com/sun/star/io/TempFile.idl b/udkapi/com/sun/star/io/TempFile.idl index 84d16e362db0..2a799e7ec21d 100644 --- a/udkapi/com/sun/star/io/TempFile.idl +++ b/udkapi/com/sun/star/io/TempFile.idl @@ -38,7 +38,7 @@ module com { module sun { module star { module io { //======================================================================== /** This service allows to get access to temp files. */ -service TempFile : XTempFile; +published service TempFile : XTempFile; //========================================================================= diff --git a/udkapi/com/sun/star/io/XTempFile.idl b/udkapi/com/sun/star/io/XTempFile.idl index 94b7daaac85c..7912004a07ef 100644 --- a/udkapi/com/sun/star/io/XTempFile.idl +++ b/udkapi/com/sun/star/io/XTempFile.idl @@ -46,7 +46,7 @@ module com { module sun { module star { module io { //======================================================================== /** This interface offers access to temp files. */ -interface XTempFile +published interface XTempFile { // INTERFACES // diff --git a/udkapi/com/sun/star/script/ArrayWrapper.idl b/udkapi/com/sun/star/script/ArrayWrapper.idl index 8f60780229c7..f152792e5cb8 100644 --- a/udkapi/com/sun/star/script/ArrayWrapper.idl +++ b/udkapi/com/sun/star/script/ArrayWrapper.idl @@ -48,7 +48,7 @@ module com { module sun { module star { module script { preference for a Multi-Dimensional array representation to be specified.

*/ -struct ArrayWrapper +published struct ArrayWrapper { /** Indicates whether the Array should be have 1 or 0 based indexing. */ diff --git a/udkapi/com/sun/star/task/XInteractionHandler2.idl b/udkapi/com/sun/star/task/XInteractionHandler2.idl index 8fff5823d669..1584e43b7934 100644 --- a/udkapi/com/sun/star/task/XInteractionHandler2.idl +++ b/udkapi/com/sun/star/task/XInteractionHandler2.idl @@ -43,8 +43,10 @@

This interface extends the interface XInteractionHandler the way that a caller can determine whether an interaction request was actually handled by the interaction handler.

+ + @since OOo 3.2 */ -/* published */ interface XInteractionHandler2 : com::sun::star::task::XInteractionHandler +published interface XInteractionHandler2 : com::sun::star::task::XInteractionHandler { //------------------------------------------------------------------------- /** Handle an interaction request. -- cgit v1.2.3 From 50a751cc366e49f2b52d9f7783049c12536024ac Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Wed, 16 Mar 2011 08:57:10 +0100 Subject: rsvglibs: add export and build action --- gettext/makefile.mk | 1 + gettext/prj/d.lst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gettext/makefile.mk b/gettext/makefile.mk index 965fb4e7e812..91255f1c0694 100644 --- a/gettext/makefile.mk +++ b/gettext/makefile.mk @@ -87,6 +87,7 @@ OUT2BIN+=gettext-tools$/src$/.libs$/urlget OUT2BIN+=gettext-tools$/src$/.libs$/xgettext .ELIF "$(OS)"=="WNT" BUILD_DIR=gettext-runtime$/intl +BUILD_ACTION=dmake PATCH_FILES=gettext-0.18.1.1.patch ADDITIONAL_FILES=\ gettext-runtime/intl/makefile.mk \ diff --git a/gettext/prj/d.lst b/gettext/prj/d.lst index 6e0accf09bf5..09e9ea1c2e60 100644 --- a/gettext/prj/d.lst +++ b/gettext/prj/d.lst @@ -27,4 +27,4 @@ symlink: %_DEST%\lib%_EXT%\libgettextlib-0.18.1.dylib %_DEST%\lib%_EXT%\libgette ..\%__SRC%\bin\msguniq %_DEST%\bin%_EXT%\msguniq ..\%__SRC%\bin\urlget %_DEST%\bin%_EXT%\urlget ..\%__SRC%\bin\xgettext %_DEST%\bin%_EXT%\xgettext - +..\%__SRC%\lib\iintl_t1.lib %_DEST%\lib%_EXT%\intl.lib -- cgit v1.2.3 From 970ab411dd018c7c6159f073aca5927de8c52980 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 16 Mar 2011 11:02:32 +0100 Subject: sw34bf05: #i76669# - reestablish call-back DrawingLayer to Writer in order to let the Writer decide, if a certain draing object should be drawn or not. --- sw/source/core/inc/viewimp.hxx | 4 +- sw/source/core/layout/paintfrm.cxx | 120 +++++++++++++++++++++++-------------- sw/source/core/view/vdraw.cxx | 5 +- 3 files changed, 82 insertions(+), 47 deletions(-) mode change 100644 => 100755 sw/source/core/inc/viewimp.hxx mode change 100644 => 100755 sw/source/core/layout/paintfrm.cxx mode change 100644 => 100755 sw/source/core/view/vdraw.cxx diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx old mode 100644 new mode 100755 index 3959a815eaa2..67a1edd7c8e1 --- a/sw/source/core/inc/viewimp.hxx +++ b/sw/source/core/inc/viewimp.hxx @@ -215,11 +215,13 @@ public: // direction at the outliner of the draw view for painting layers // and . // OD 25.06.2003 #108784# - correct type of 1st parameter + // OD #i76669# - added parameter void PaintLayer( const SdrLayerID _nLayerID, SwPrintData const*const pPrintData, const SwRect& _rRect, const Color* _pPageBackgrdColor = 0, - const bool _bIsPageRightToLeft = false ) const; + const bool _bIsPageRightToLeft = false, + sdr::contact::ViewObjectContactRedirector* pRedirector = 0 ) const; //wird als Link an die DrawEngine uebergeben, entscheidet was wie //gepaintet wird oder nicht. diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx old mode 100644 new mode 100755 index e0f4914da529..ed8fa0b31a4d --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -2706,6 +2706,49 @@ void SwTabFrmPainter::Insert( SwLineEntry& rNew, bool bHori ) // FUNCTIONS USED FOR COLLAPSING TABLE BORDER LINES END // +// --> OD #i76669# +#include +#include + +namespace +{ + class SwViewObjectContactRedirector : public ::sdr::contact::ViewObjectContactRedirector + { + private: + const ViewShell& mrViewShell; + + public: + SwViewObjectContactRedirector( const ViewShell& rSh ) + : mrViewShell( rSh ) + {}; + + virtual ~SwViewObjectContactRedirector() + {} + + virtual drawinglayer::primitive2d::Primitive2DSequence createRedirectedPrimitive2DSequence( + const sdr::contact::ViewObjectContact& rOriginal, + const sdr::contact::DisplayInfo& rDisplayInfo) + { + sal_Bool bPaint( sal_True ); + + SdrObject* pObj = rOriginal.GetViewContact().TryToGetSdrObject(); + if ( pObj ) + { + bPaint = SwFlyFrm::IsPaint( pObj, &mrViewShell ); + } + + if ( !bPaint ) + { + return drawinglayer::primitive2d::Primitive2DSequence(); + } + + return sdr::contact::ViewObjectContactRedirector::createRedirectedPrimitive2DSequence( + rOriginal, rDisplayInfo ); + } + }; + +} // end of anonymous namespace +// <-- /************************************************************************* |* @@ -2727,7 +2770,7 @@ void SwTabFrmPainter::Insert( SwLineEntry& rNew, bool bHori ) void SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const { - ASSERT( Lower() && Lower()->IsPageFrm(), "Lower der Root keine Seite." ); + ASSERT( Lower() && Lower()->IsPageFrm(), "Lower der Root keine Seite." ); PROTOCOL( this, PROT_FILE_INIT, 0, 0) @@ -2766,8 +2809,6 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const // --> OD 2008-10-07 #i92745# // Extend check on certain states of the 'current' instance to // all existing instances. -// if ( !pSh->IsInEndAction() && !pSh->IsPaintInProgress() && -// (!pSh->Imp()->IsAction() || !pSh->Imp()->GetLayAction().IsActionInProgress() ) ) bool bPerformLayoutAction( true ); { ViewShell* pTmpViewShell = pSh; @@ -2822,10 +2863,11 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const // #i68597# const bool bGridPainting(pSh->GetWin() && pSh->Imp()->HasDrawView() && pSh->Imp()->GetDrawView()->IsGridVisible()); - // --> OD 2008-05-16 #i84659# -// while ( pPage && !::IsShortCut( aRect, pPage->Frm() ) ) - while ( pPage ) + // --> OD #i76669# + SwViewObjectContactRedirector aSwRedirector( *pSh ); // <-- + + while ( pPage ) { const bool bPaintRightShadow = !bBookMode || (pPage == Lower()) || (!bLTR && !pPage->OnRightPage()) || (bLTR && pPage->OnRightPage()); const bool bRightSidebar = pPage->SidebarPosition() == sw::sidebarwindows::SIDEBAR_RIGHT; @@ -2836,12 +2878,10 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const SwPageFrm::GetBorderAndShadowBoundRect( pPage->Frm(), pSh, aPaintRect, bRightSidebar ); if ( aRect.IsOver( aPaintRect ) ) - // <-- { if ( pSh->GetWin() ) { pSubsLines = new SwSubsRects; - // OD 18.11.2002 #99672# - create array for special sub-lines pSpecSubsLines = new SwSubsRects; } @@ -2852,15 +2892,6 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const // marks), if painting on a window and the paint is trigger by an // end action. The inefficient and simple enlargement of the // paint area is replaced by this invalidation. - // if ( bExtraData ) - // { - // //Ja, das ist grob, aber wie macht man es besser? - // SWRECTFN( pPage ) - // (aPaintRect.*fnRect->fnSetLeftAndWidth)( - // (pPage->Frm().*fnRect->fnGetLeft)(), - // (pPage->Frm().*fnRect->fnGetWidth)() ); - // aPaintRect._Intersection( pSh->VisArea() ); - // } if ( bExtraData && pSh->GetWin() && pSh->IsInEndAction() ) { @@ -2921,32 +2952,31 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const if ( pSh->Imp()->HasDrawView() ) { pLines->LockLines( sal_True ); - // OD 29.08.2002 #102450# - add 3rd parameter - // OD 09.12.2002 #103045# - add 4th parameter for horizontal text direction. const IDocumentDrawModelAccess* pIDDMA = pSh->getIDocumentDrawModelAccess(); - pSh->Imp()->PaintLayer( pIDDMA->GetHellId(), pPrintData, aPaintRect, - &aPageBackgrdColor, (pPage->IsRightToLeft() ? true : false) ); + pSh->Imp()->PaintLayer( pIDDMA->GetHellId(), + pPrintData, + aPaintRect, + &aPageBackgrdColor, + (pPage->IsRightToLeft() ? true : false), + &aSwRedirector ); pLines->PaintLines( pSh->GetOut() ); pLines->LockLines( sal_False ); } if( pSh->GetWin() ) { - // OD 18.11.2002 #99672# - collect sub-lines + // collect sub-lines pPage->RefreshSubsidiary( aPaintRect ); - // OD 18.11.2002 #99672# - paint special sub-lines + // paint special sub-lines pSpecSubsLines->PaintSubsidiary( pSh->GetOut(), NULL ); } pPage->Paint( aPaintRect ); - // OD 20.12.2002 #94627# - no paint of page border and shadow, if - // writer is in place mode. + // no paint of page border and shadow, if writer is in place mode. if( pSh->GetWin() && pSh->GetDoc()->GetDocShell() && !pSh->GetDoc()->GetDocShell()->IsInPlaceActive() ) { - // OD 12.02.2003 #i9719#, #105645# - use new method - // . SwPageFrm::PaintBorderAndShadow( pPage->Frm(), pSh, bPaintRightShadow, bRightSidebar ); SwPageFrm::PaintNotesSidebar( pPage->Frm(), pSh, pPage->GetPhyPageNum(), bRightSidebar); } @@ -2957,9 +2987,12 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const { /// OD 29.08.2002 #102450# - add 3rd parameter // OD 09.12.2002 #103045# - add 4th parameter for horizontal text direction. - pSh->Imp()->PaintLayer( pSh->GetDoc()->GetHeavenId(), pPrintData, aPaintRect, + pSh->Imp()->PaintLayer( pSh->GetDoc()->GetHeavenId(), + pPrintData, + aPaintRect, &aPageBackgrdColor, - (pPage->IsRightToLeft() ? true : false) ); + (pPage->IsRightToLeft() ? true : false), + &aSwRedirector ); } if ( bExtraData ) @@ -6424,21 +6457,20 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const SwRect aRetouchePart( rRetouche ); if ( aRetouchePart.HasArea() ) { - // OD 30.08.2002 #102450# - // determine background color of page for method - // calls, painting or const Color aPageBackgrdColor = pPage->GetDrawBackgrdColor(); - // OD 29.08.2002 #102450# - // add 3rd parameter to method calls - // OD 09.12.2002 #103045# - add 4th parameter for horizontal text direction. const IDocumentDrawModelAccess* pIDDMA = pSh->getIDocumentDrawModelAccess(); + // --> OD #i76669# + SwViewObjectContactRedirector aSwRedirector( *pSh ); + // <-- pSh->Imp()->PaintLayer( pIDDMA->GetHellId(), 0, aRetouchePart, &aPageBackgrdColor, - (pPage->IsRightToLeft() ? true : false) ); + (pPage->IsRightToLeft() ? true : false), + &aSwRedirector ); pSh->Imp()->PaintLayer( pIDDMA->GetHeavenId(), 0, aRetouchePart, &aPageBackgrdColor, - (pPage->IsRightToLeft() ? true : false) ); + (pPage->IsRightToLeft() ? true : false), + &aSwRedirector ); } SetRetouche(); @@ -6679,22 +6711,22 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap ) // OD 09.12.2002 #103045# - determine page, fly frame is on const SwPageFrm* pFlyPage = pFly->FindPageFrm(); - // OD 30.08.2002 #102450# - // determine color of page, the fly frame is on, for method - // calls, painting or const Color aPageBackgrdColor = pFlyPage->GetDrawBackgrdColor(); - // OD 30.08.2002 #102450# - add 3rd parameter - // OD 09.12.2002 #103045# - add 4th parameter for horizontal text direction. const IDocumentDrawModelAccess* pIDDMA = pSh->getIDocumentDrawModelAccess(); + // --> OD #i76669# + SwViewObjectContactRedirector aSwRedirector( *pSh ); + // <-- pImp->PaintLayer( pIDDMA->GetHellId(), 0, aOut, &aPageBackgrdColor, - (pFlyPage->IsRightToLeft() ? true : false) ); + (pFlyPage->IsRightToLeft() ? true : false), + &aSwRedirector ); pLines->PaintLines( &aDev ); if ( pFly->IsFlyInCntFrm() ) pFly->Paint( aOut ); pLines->PaintLines( &aDev ); /// OD 30.08.2002 #102450# - add 3rd parameter pImp->PaintLayer( pIDDMA->GetHeavenId(), 0, aOut, &aPageBackgrdColor, - (pFlyPage->IsRightToLeft() ? true : false) ); + (pFlyPage->IsRightToLeft() ? true : false), + &aSwRedirector ); pLines->PaintLines( &aDev ); DELETEZ( pLines ); pFlyOnlyDraw = 0; diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx old mode 100644 new mode 100755 index c9581d26251f..cec333d0397d --- a/sw/source/core/view/vdraw.cxx +++ b/sw/source/core/view/vdraw.cxx @@ -182,7 +182,8 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID, SwPrintData const*const pPrintData, const SwRect& , const Color* _pPageBackgrdColor, - const bool _bIsPageRightToLeft ) const + const bool _bIsPageRightToLeft, + sdr::contact::ViewObjectContactRedirector* pRedirector ) const { if ( HasDrawView() ) { @@ -232,7 +233,7 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID, SdrView &rSdrView = const_cast< SdrView & >(GetPageView()->GetView()); rSdrView.setHideDraw( !pPrintData->IsPrintDraw() ); } - GetPageView()->DrawLayer(_nLayerID, pOutDev); + GetPageView()->DrawLayer( _nLayerID, pOutDev, pRedirector ); pOutDev->Pop(); // OD 29.08.2002 #102450# -- cgit v1.2.3 From f24ceb2d452fd0056c3fb36088872eecffd187a8 Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Wed, 16 Mar 2011 11:04:37 +0100 Subject: sw34bf05: #i86906# Set property DefaultText of combobox from Dropbox form field's selected item --- sw/source/filter/ww8/ww8par3.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index bcf4e1efbc9a..d4e5121168b6 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -2192,7 +2192,7 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich, nType=1; } fUnknown = nHeaderByte & 0x3; - fDropdownIndex = (nHeaderByte & 0xFC) >> 2; + fDropdownIndex = (nHeaderByte & 0x7C) >> 2; *pDataStream >> nField; fToolTip = nField & 0x01; fNoMark = (nField & 0x02)>>1; @@ -2485,7 +2485,15 @@ sal_Bool WW8FormulaListBox::Import(const uno::Reference < aTmp <<= aListSource; xPropSet->setPropertyValue(C2U("StringItemList"), aTmp ); - aTmp <<= aListSource[0]; + if (fDropdownIndex < nLen) + { + aTmp <<= aListSource[fDropdownIndex]; + } + else + { + aTmp <<= aListSource[0]; + } + xPropSet->setPropertyValue(C2U("DefaultText"), aTmp ); rSz = rRdr.MiserableDropDownFormHack(maListEntries[0], xPropSet); -- cgit v1.2.3 From 99c38a88c43fa6b9c3fcc2c6c7620a315bea307b Mon Sep 17 00:00:00 2001 From: ka Date: Wed, 16 Mar 2011 12:04:27 +0100 Subject: rsvglibs: added zlib-1.2.5 --- ooo.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 ooo.lst diff --git a/ooo.lst b/ooo.lst old mode 100755 new mode 100644 index 2ee9dd26713b..447a62446395 --- a/ooo.lst +++ b/ooo.lst @@ -83,4 +83,4 @@ a7d6c5f2fe2d481149ed3ba807b5c043-gdk-pixbuf-2.23.0.tar.gz 9f6e85e1e38490c3956f4415bcd33e6e-glib-2.28.1.tar.gz 3dd55b952826d2b32f51308f2f91aa89-gettext-0.18.1.1.tar.gz 0611e099e807210cf738dcb41425d104-libcroco-0.6.2.tar.gz - +c735eab2d659a96e5a594c9e8541ad63-zlib-1.2.5.tar.gz -- cgit v1.2.3 From 1831ee1d1a173369f625ba4cfbf8b7229e040920 Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Wed, 16 Mar 2011 12:48:58 +0100 Subject: dba34d: #i86167# fix for 64 bit long value to int32 --- dbaccess/source/ui/querydesign/JoinController.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx index 7a983f663ce7..e66ad6017be3 100644 --- a/dbaccess/source/ui/querydesign/JoinController.cxx +++ b/dbaccess/source/ui/querydesign/JoinController.cxx @@ -519,10 +519,10 @@ void OJoinController::saveTableWindows( ::comphelper::NamedValueCollection& o_rV aWindowData.put( "ComposedName", (*aIter)->GetComposedName() ); aWindowData.put( "TableName", (*aIter)->GetTableName() ); aWindowData.put( "WindowName", (*aIter)->GetWinName() ); - aWindowData.put( "WindowTop", (*aIter)->GetPosition().Y() ); - aWindowData.put( "WindowLeft", (*aIter)->GetPosition().X() ); - aWindowData.put( "WindowWidth", (*aIter)->GetSize().Width() ); - aWindowData.put( "WindowHeight", (*aIter)->GetSize().Height() ); + aWindowData.put( "WindowTop", static_cast((*aIter)->GetPosition().Y()) ); + aWindowData.put( "WindowLeft", static_cast((*aIter)->GetPosition().X()) ); + aWindowData.put( "WindowWidth", static_cast((*aIter)->GetSize().Width()) ); + aWindowData.put( "WindowHeight", static_cast((*aIter)->GetSize().Height()) ); aWindowData.put( "ShowAll", (*aIter)->IsShowAll() ); const ::rtl::OUString sTableName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Table" ) ) + ::rtl::OUString::valueOf( i ) ); -- cgit v1.2.3 From 10d74f6c33d5f678254760fca296a5d275ccfff9 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 16 Mar 2011 13:00:38 +0100 Subject: fwk167: #i117378# Use BOOL instead of sal_Bool for Windows specific code. --- fpicker/source/win32/filepicker/previewadapter.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fpicker/source/win32/filepicker/previewadapter.cxx b/fpicker/source/win32/filepicker/previewadapter.cxx index a145c2af563d..b341a5b8252f 100644 --- a/fpicker/source/win32/filepicker/previewadapter.cxx +++ b/fpicker/source/win32/filepicker/previewadapter.cxx @@ -308,7 +308,7 @@ void SAL_CALL CPreviewAdapterImpl::rearrangeLayout() // style bit of the FileOpen dialog must be set after that // message LONG lStyle = GetWindowLong(prvwnd,GWL_STYLE); - sal_Bool bIsVisible = (sal_Bool)(lStyle & WS_VISIBLE); + BOOL bIsVisible = (BOOL)(lStyle & WS_VISIBLE); int cx = 0; -- cgit v1.2.3 From 95a6c29ae8853bead767ff4434b5af88e107994f Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 16 Mar 2011 13:19:11 +0100 Subject: fwk167: #i117378# Use safer way to check for visibility --- fpicker/source/win32/filepicker/previewadapter.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fpicker/source/win32/filepicker/previewadapter.cxx b/fpicker/source/win32/filepicker/previewadapter.cxx index b341a5b8252f..2506dce59ede 100644 --- a/fpicker/source/win32/filepicker/previewadapter.cxx +++ b/fpicker/source/win32/filepicker/previewadapter.cxx @@ -308,7 +308,7 @@ void SAL_CALL CPreviewAdapterImpl::rearrangeLayout() // style bit of the FileOpen dialog must be set after that // message LONG lStyle = GetWindowLong(prvwnd,GWL_STYLE); - BOOL bIsVisible = (BOOL)(lStyle & WS_VISIBLE); + BOOL bIsVisible = ((lStyle & WS_VISIBLE) != 0); int cx = 0; -- cgit v1.2.3 From 1705149aa69a9e38313986bd7bef2ac565b35af9 Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Wed, 16 Mar 2011 13:25:41 +0100 Subject: dba34d: #i32633# fix for lcase and ucase --- connectivity/source/drivers/file/fcomp.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx index 9a303d1f1d27..28cdb41931d6 100644 --- a/connectivity/source/drivers/file/fcomp.cxx +++ b/connectivity/source/drivers/file/fcomp.cxx @@ -297,10 +297,19 @@ OOperand* OPredicateCompiler::execute_LIKE(OSQLParseNode* pPredicateNode) throw( OSQLParseNode* pAtom = pPart2->getChild(pPart2->count()-2); OSQLParseNode* pOptEscape = pPart2->getChild(pPart2->count()-1); - if (!(pAtom->getNodeType() == SQL_NODE_STRING || SQL_ISRULE(pAtom,parameter))) + if (!(pAtom->getNodeType() == SQL_NODE_STRING || + SQL_ISRULE(pAtom,parameter) || + // odbc date + SQL_ISRULE(pAtom,set_fct_spec) || + SQL_ISRULE(pAtom,position_exp) || + SQL_ISRULE(pAtom,char_substring_fct) || + // upper, lower etc. + SQL_ISRULE(pAtom,fold)) ) { - m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_INVALID_LIKE_STRING,NULL); + m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_TOO_COMPLEX,NULL); + return NULL; } + if (pOptEscape->count() != 0) { if (pOptEscape->count() != 2) -- cgit v1.2.3 From 104874537cf87e29f24861db53dd690673fb57c4 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 16 Mar 2011 14:38:22 +0100 Subject: fwk167: #i116139# Check for preview frame in requestToolbar method. --- framework/source/layoutmanager/toolbarlayoutmanager.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 5992e7b42dc5..2f66699de459 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -420,6 +420,14 @@ bool ToolbarLayoutManager::requestToolbar( const ::rtl::OUString& rResourceURL ) bool bMustCallCreate( false ); uno::Reference< ui::XUIElement > xUIElement; + ReadGuard aReadLock( m_aLock ); + uno::Reference< frame::XFrame > xFrame( m_xFrame ); + aReadLock.unlock(); + + uno::Reference< frame::XModel > xModel( impl_getModelFromFrame( xFrame )); + if ( implts_isPreviewModel( xModel )) + return false; // no toolbars for preview frame! + UIElement aRequestedToolbar = impl_findToolbar( rResourceURL ); if ( aRequestedToolbar.m_aName != rResourceURL ) { -- cgit v1.2.3 From 77857a809994c9f28174803d721a999f83cca2b9 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 16 Mar 2011 14:58:35 +0100 Subject: fwk167: #i117379# Use bool instead of Windows type BOOL to prevent misuse --- fpicker/source/win32/filepicker/previewadapter.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fpicker/source/win32/filepicker/previewadapter.cxx b/fpicker/source/win32/filepicker/previewadapter.cxx index 2506dce59ede..aa784a2f7607 100644 --- a/fpicker/source/win32/filepicker/previewadapter.cxx +++ b/fpicker/source/win32/filepicker/previewadapter.cxx @@ -308,7 +308,7 @@ void SAL_CALL CPreviewAdapterImpl::rearrangeLayout() // style bit of the FileOpen dialog must be set after that // message LONG lStyle = GetWindowLong(prvwnd,GWL_STYLE); - BOOL bIsVisible = ((lStyle & WS_VISIBLE) != 0); + bool bIsVisible = ((lStyle & WS_VISIBLE) != 0); int cx = 0; -- cgit v1.2.3 From 0f79c68194206864c993cd0fb01a485d2db2664f Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Wed, 16 Mar 2011 15:22:08 +0100 Subject: #i117329# - Publishing of UNO types, second wave. --- offapi/com/sun/star/awt/tab/TabPageActivatedEvent.idl | 2 +- offapi/com/sun/star/awt/tab/UnoControlTabPageContainerModel.idl | 2 +- offapi/com/sun/star/awt/tab/UnoControlTabPageModel.idl | 4 ++-- offapi/com/sun/star/awt/tab/XTabPage.idl | 2 +- offapi/com/sun/star/awt/tab/XTabPageContainer.idl | 2 +- offapi/com/sun/star/awt/tab/XTabPageContainerListener.idl | 2 +- offapi/com/sun/star/awt/tab/XTabPageContainerModel.idl | 2 +- offapi/com/sun/star/awt/tab/XTabPageModel.idl | 2 +- offapi/com/sun/star/document/XDocumentSubStorageSupplier.idl | 2 +- offapi/com/sun/star/document/XStorageBasedDocument.idl | 2 +- offapi/com/sun/star/document/XStorageChangeListener.idl | 2 +- offapi/com/sun/star/inspection/DefaultHelpProvider.idl | 4 ++-- offapi/com/sun/star/inspection/GenericPropertyHandler.idl | 2 +- offapi/com/sun/star/inspection/InteractiveSelectionResult.idl | 2 +- offapi/com/sun/star/inspection/LineDescriptor.idl | 4 ++-- offapi/com/sun/star/inspection/ObjectInspector.idl | 2 +- offapi/com/sun/star/inspection/ObjectInspectorModel.idl | 2 +- offapi/com/sun/star/inspection/PropertyCategoryDescriptor.idl | 2 +- offapi/com/sun/star/inspection/PropertyControlType.idl | 2 +- offapi/com/sun/star/inspection/PropertyLineElement.idl | 2 +- offapi/com/sun/star/inspection/XHyperlinkControl.idl | 2 +- offapi/com/sun/star/inspection/XNumericControl.idl | 2 +- offapi/com/sun/star/inspection/XObjectInspector.idl | 6 +++--- offapi/com/sun/star/inspection/XObjectInspectorModel.idl | 2 +- offapi/com/sun/star/inspection/XObjectInspectorUI.idl | 4 ++-- offapi/com/sun/star/inspection/XPropertyControl.idl | 4 ++-- offapi/com/sun/star/inspection/XPropertyControlContext.idl | 2 +- offapi/com/sun/star/inspection/XPropertyControlFactory.idl | 4 ++-- offapi/com/sun/star/inspection/XPropertyControlObserver.idl | 4 ++-- offapi/com/sun/star/inspection/XPropertyHandler.idl | 6 +++--- offapi/com/sun/star/inspection/XStringListControl.idl | 2 +- offapi/com/sun/star/inspection/XStringRepresentation.idl | 2 +- offapi/com/sun/star/report/Calculation.idl | 2 +- offapi/com/sun/star/report/ForceNewPage.idl | 2 +- offapi/com/sun/star/report/GroupKeepTogether.idl | 2 +- offapi/com/sun/star/report/GroupOn.idl | 2 +- offapi/com/sun/star/report/KeepTogether.idl | 2 +- offapi/com/sun/star/report/ReportPrintOption.idl | 2 +- offapi/com/sun/star/report/SectionPageBreak.idl | 2 +- offapi/com/sun/star/report/XFixedLine.idl | 4 ++-- offapi/com/sun/star/report/XFixedText.idl | 4 ++-- offapi/com/sun/star/report/XFormatCondition.idl | 2 +- offapi/com/sun/star/report/XFormattedField.idl | 4 ++-- offapi/com/sun/star/report/XFunction.idl | 2 +- offapi/com/sun/star/report/XFunctions.idl | 6 +++--- offapi/com/sun/star/report/XFunctionsSupplier.idl | 4 ++-- offapi/com/sun/star/report/XGroup.idl | 2 +- offapi/com/sun/star/report/XGroups.idl | 6 +++--- offapi/com/sun/star/report/XImageControl.idl | 4 ++-- offapi/com/sun/star/report/XReportComponent.idl | 6 ++++-- offapi/com/sun/star/report/XReportControlFormat.idl | 4 ++-- offapi/com/sun/star/report/XReportControlModel.idl | 2 +- offapi/com/sun/star/report/XReportDefinition.idl | 8 ++++---- offapi/com/sun/star/report/XReportEngine.idl | 2 +- offapi/com/sun/star/report/XSection.idl | 4 ++-- offapi/com/sun/star/report/XShape.idl | 2 +- offapi/com/sun/star/report/inspection/DataProviderHandler.idl | 2 +- .../sun/star/report/inspection/DefaultComponentInspectorModel.idl | 2 +- offapi/com/sun/star/report/inspection/ReportComponentHandler.idl | 2 +- offapi/com/sun/star/report/meta/XFormulaParser.idl | 2 +- offapi/com/sun/star/report/meta/XFunctionCategory.idl | 4 ++-- offapi/com/sun/star/report/meta/XFunctionDescription.idl | 4 ++-- offapi/com/sun/star/report/meta/XFunctionManager.idl | 2 +- offapi/com/sun/star/sdb/XDocumentDataSource.idl | 2 +- offapi/com/sun/star/sdb/XFormDocumentsSupplier.idl | 2 +- offapi/com/sun/star/sdb/XOfficeDatabaseDocument.idl | 2 +- offapi/com/sun/star/sdb/XReportDocumentsSupplier.idl | 2 +- offapi/com/sun/star/sheet/XFormulaParser.idl | 2 +- offapi/com/sun/star/ui/XUIConfigurationManagerSupplier.idl | 2 +- offapi/com/sun/star/util/XModifiable2.idl | 2 +- udkapi/com/sun/star/beans/Ambiguous.idl | 2 +- udkapi/com/sun/star/beans/Defaulted.idl | 2 +- udkapi/com/sun/star/beans/Optional.idl | 2 +- 73 files changed, 103 insertions(+), 101 deletions(-) diff --git a/offapi/com/sun/star/awt/tab/TabPageActivatedEvent.idl b/offapi/com/sun/star/awt/tab/TabPageActivatedEvent.idl index ef678395fe06..e3fd0c46b1db 100644 --- a/offapi/com/sun/star/awt/tab/TabPageActivatedEvent.idl +++ b/offapi/com/sun/star/awt/tab/TabPageActivatedEvent.idl @@ -41,7 +41,7 @@ module com { module sun { module star { module awt { module tab { @since OOo 3.4 */ -struct TabPageActivatedEvent: com::sun::star::lang::EventObject +published struct TabPageActivatedEvent: com::sun::star::lang::EventObject { /** Contains the ID of the tab page */ diff --git a/offapi/com/sun/star/awt/tab/UnoControlTabPageContainerModel.idl b/offapi/com/sun/star/awt/tab/UnoControlTabPageContainerModel.idl index b97b7881b416..bb9a8456a330 100644 --- a/offapi/com/sun/star/awt/tab/UnoControlTabPageContainerModel.idl +++ b/offapi/com/sun/star/awt/tab/UnoControlTabPageContainerModel.idl @@ -40,7 +40,7 @@ module com { module sun { module star { module awt { module tab { @since OOo 3.4 */ -service UnoControlTabPageContainerModel +published service UnoControlTabPageContainerModel { service com::sun::star::awt::UnoControlModel; diff --git a/offapi/com/sun/star/awt/tab/UnoControlTabPageModel.idl b/offapi/com/sun/star/awt/tab/UnoControlTabPageModel.idl index 3508e33260c7..266f6a56119a 100644 --- a/offapi/com/sun/star/awt/tab/UnoControlTabPageModel.idl +++ b/offapi/com/sun/star/awt/tab/UnoControlTabPageModel.idl @@ -38,13 +38,13 @@ module com { module sun { module star { module awt { module tab { /** specifies the standard model of a XTabPageModel. @since OOo 3.4 */ -service UnoControlTabPageModel : XTabPageModel +published service UnoControlTabPageModel : XTabPageModel { /** Creates a new XTabPageModel with a given ID. */ create([in] short tabPageID); - /** Creates a new XTabPageModel with a given ID and a url which is used to load teh tab page model. + /** Creates a new XTabPageModel with a given ID and a url which is used to load the tab page model. */ load([in] short tabPageID,[in] string url); }; diff --git a/offapi/com/sun/star/awt/tab/XTabPage.idl b/offapi/com/sun/star/awt/tab/XTabPage.idl index 616820071f5b..0c79d34075d5 100644 --- a/offapi/com/sun/star/awt/tab/XTabPage.idl +++ b/offapi/com/sun/star/awt/tab/XTabPage.idl @@ -40,7 +40,7 @@ module com { module sun { module star { module awt { module tab { @since OOo 3.4 */ -interface XTabPage +published interface XTabPage { }; diff --git a/offapi/com/sun/star/awt/tab/XTabPageContainer.idl b/offapi/com/sun/star/awt/tab/XTabPageContainer.idl index e62cf4c365c1..0349b04cc637 100644 --- a/offapi/com/sun/star/awt/tab/XTabPageContainer.idl +++ b/offapi/com/sun/star/awt/tab/XTabPageContainer.idl @@ -41,7 +41,7 @@ module com { module sun { module star { module awt { module tab { @since OOo 3.4 */ -interface XTabPageContainer +published interface XTabPageContainer { /** Returns the number of tab pages. @returns diff --git a/offapi/com/sun/star/awt/tab/XTabPageContainerListener.idl b/offapi/com/sun/star/awt/tab/XTabPageContainerListener.idl index f46951231513..6bfe04e5babe 100644 --- a/offapi/com/sun/star/awt/tab/XTabPageContainerListener.idl +++ b/offapi/com/sun/star/awt/tab/XTabPageContainerListener.idl @@ -41,7 +41,7 @@ module com { module sun { module star { module awt { module tab { @since OOo 3.4 */ -interface XTabPageContainerListener: com::sun::star::lang::XEventListener +published interface XTabPageContainerListener: com::sun::star::lang::XEventListener { //------------------------------------------------------------------------- /** Invoked after a tab page was activated. diff --git a/offapi/com/sun/star/awt/tab/XTabPageContainerModel.idl b/offapi/com/sun/star/awt/tab/XTabPageContainerModel.idl index cc815209a01d..8b3bf2d9afbd 100644 --- a/offapi/com/sun/star/awt/tab/XTabPageContainerModel.idl +++ b/offapi/com/sun/star/awt/tab/XTabPageContainerModel.idl @@ -40,7 +40,7 @@ module com { module sun { module star { module awt { module tab { @since OOo 3.4 */ -interface XTabPageContainerModel +published interface XTabPageContainerModel { interface com::sun::star::container::XIndexContainer; interface com::sun::star::container::XContainer; diff --git a/offapi/com/sun/star/awt/tab/XTabPageModel.idl b/offapi/com/sun/star/awt/tab/XTabPageModel.idl index 15fae422bb17..b07c3ea4ec6d 100644 --- a/offapi/com/sun/star/awt/tab/XTabPageModel.idl +++ b/offapi/com/sun/star/awt/tab/XTabPageModel.idl @@ -43,7 +43,7 @@ module com { module sun { module star { module awt { module tab { @since OOo 3.4 */ -interface XTabPageModel +published interface XTabPageModel { //interface com::sun::star::lang::XMultiServiceFactory; diff --git a/offapi/com/sun/star/document/XDocumentSubStorageSupplier.idl b/offapi/com/sun/star/document/XDocumentSubStorageSupplier.idl index be5121bf2e2a..69cbe1bbfb2e 100644 --- a/offapi/com/sun/star/document/XDocumentSubStorageSupplier.idl +++ b/offapi/com/sun/star/document/XDocumentSubStorageSupplier.idl @@ -50,7 +50,7 @@ module com { module sun { module star { module document { @see DocumentInfo @see StandaloneDocumentInfo */ -interface XDocumentSubStorageSupplier: com::sun::star::uno::XInterface +published interface XDocumentSubStorageSupplier: com::sun::star::uno::XInterface { //------------------------------------------------------------------------- /** provides the access to a substorage with specified name diff --git a/offapi/com/sun/star/document/XStorageBasedDocument.idl b/offapi/com/sun/star/document/XStorageBasedDocument.idl index 047320b43df4..a352d36110a2 100644 --- a/offapi/com/sun/star/document/XStorageBasedDocument.idl +++ b/offapi/com/sun/star/document/XStorageBasedDocument.idl @@ -63,7 +63,7 @@ /** allows to initialize document with a storage, to store document to a storage, and to set document to be based on provided storage. */ -interface XStorageBasedDocument: com::sun::star::uno::XInterface +published interface XStorageBasedDocument: com::sun::star::uno::XInterface { //------------------------------------------------------------------------ /** lets the document load itself using provided storage. diff --git a/offapi/com/sun/star/document/XStorageChangeListener.idl b/offapi/com/sun/star/document/XStorageChangeListener.idl index 2272132f8db2..6ed36735a1c1 100644 --- a/offapi/com/sun/star/document/XStorageChangeListener.idl +++ b/offapi/com/sun/star/document/XStorageChangeListener.idl @@ -46,7 +46,7 @@ module com { module sun { module star { module document { //============================================================================= /** allows to be notified when a document is switched to a new storage. */ -interface XStorageChangeListener: com::sun::star::lang::XEventListener +published interface XStorageChangeListener: com::sun::star::lang::XEventListener { //------------------------------------------------------------------------- /** is called when document switches to another storage. diff --git a/offapi/com/sun/star/inspection/DefaultHelpProvider.idl b/offapi/com/sun/star/inspection/DefaultHelpProvider.idl index 900610538b35..b5847f918191 100644 --- a/offapi/com/sun/star/inspection/DefaultHelpProvider.idl +++ b/offapi/com/sun/star/inspection/DefaultHelpProvider.idl @@ -35,7 +35,7 @@ module com { module sun { module star { module inspection { -interface XObjectInspectorUI; +published interface XObjectInspectorUI; //============================================================================= @@ -48,7 +48,7 @@ interface XObjectInspectorUI; the extended help text of this control's window, and set this help text at the object inspector's help section.

*/ -service DefaultHelpProvider : com::sun::star::uno::XInterface +published service DefaultHelpProvider : com::sun::star::uno::XInterface { /** creates a help provider instance @param InspectorUI diff --git a/offapi/com/sun/star/inspection/GenericPropertyHandler.idl b/offapi/com/sun/star/inspection/GenericPropertyHandler.idl index c93f7a958ba5..f8e0e69a3499 100644 --- a/offapi/com/sun/star/inspection/GenericPropertyHandler.idl +++ b/offapi/com/sun/star/inspection/GenericPropertyHandler.idl @@ -52,7 +52,7 @@ module com { module sun { module star { module inspection { @since OOo 2.0.3 */ -service GenericPropertyHandler : XPropertyHandler; +published service GenericPropertyHandler : XPropertyHandler; //============================================================================= diff --git a/offapi/com/sun/star/inspection/InteractiveSelectionResult.idl b/offapi/com/sun/star/inspection/InteractiveSelectionResult.idl index 0447da8ed4ab..4c8dc9f1a55c 100644 --- a/offapi/com/sun/star/inspection/InteractiveSelectionResult.idl +++ b/offapi/com/sun/star/inspection/InteractiveSelectionResult.idl @@ -38,7 +38,7 @@ module com { module sun { module star { module inspection { @since OOo 2.0.3 */ -enum InteractiveSelectionResult +published enum InteractiveSelectionResult { /** The interactive selection of a property value was cancelled. */ diff --git a/offapi/com/sun/star/inspection/LineDescriptor.idl b/offapi/com/sun/star/inspection/LineDescriptor.idl index df8d72c9edd2..b574e05f774c 100644 --- a/offapi/com/sun/star/inspection/LineDescriptor.idl +++ b/offapi/com/sun/star/inspection/LineDescriptor.idl @@ -35,7 +35,7 @@ //============================================================================= module com { module sun { module star { module inspection { -interface XPropertyControl; +published interface XPropertyControl; //----------------------------------------------------------------------------- /** describes the appearance of a line representing a single property in an ObjectInspector. @@ -55,7 +55,7 @@ interface XPropertyControl; @since OOo 2.0.3 */ -struct LineDescriptor +published struct LineDescriptor { /** denotes the human-readable display name used to present a property to the user */ diff --git a/offapi/com/sun/star/inspection/ObjectInspector.idl b/offapi/com/sun/star/inspection/ObjectInspector.idl index 9a0386bee9f0..fb42d3342e7a 100644 --- a/offapi/com/sun/star/inspection/ObjectInspector.idl +++ b/offapi/com/sun/star/inspection/ObjectInspector.idl @@ -82,7 +82,7 @@ module com { module sun { module star { module inspection { @since OOo 2.0.3 */ -service ObjectInspector : XObjectInspector +published service ObjectInspector : XObjectInspector { /** creates a default instance of the ObjectInspector diff --git a/offapi/com/sun/star/inspection/ObjectInspectorModel.idl b/offapi/com/sun/star/inspection/ObjectInspectorModel.idl index 00a55a0b43c3..073ea4d5f10c 100644 --- a/offapi/com/sun/star/inspection/ObjectInspectorModel.idl +++ b/offapi/com/sun/star/inspection/ObjectInspectorModel.idl @@ -54,7 +54,7 @@ module com { module sun { module star { module inspection { @since OOo 2.0.3 */ -service ObjectInspectorModel : XObjectInspectorModel +published service ObjectInspectorModel : XObjectInspectorModel { /** creates a default ObjectInspectorModel, whose one and only handler factory creates a GenericPropertyHandler. diff --git a/offapi/com/sun/star/inspection/PropertyCategoryDescriptor.idl b/offapi/com/sun/star/inspection/PropertyCategoryDescriptor.idl index 5e58701e3c03..1d0c18d06363 100644 --- a/offapi/com/sun/star/inspection/PropertyCategoryDescriptor.idl +++ b/offapi/com/sun/star/inspection/PropertyCategoryDescriptor.idl @@ -38,7 +38,7 @@ module com { module sun { module star { module inspection { @since OOo 2.0.3 */ -struct PropertyCategoryDescriptor +published struct PropertyCategoryDescriptor { /** contains the programmatic name of the category. diff --git a/offapi/com/sun/star/inspection/PropertyControlType.idl b/offapi/com/sun/star/inspection/PropertyControlType.idl index 1f61dfe6ed97..ef5e76c54aea 100644 --- a/offapi/com/sun/star/inspection/PropertyControlType.idl +++ b/offapi/com/sun/star/inspection/PropertyControlType.idl @@ -45,7 +45,7 @@ module com { module sun { module star { module inspection { @since OOo 2.0.3 */ -constants PropertyControlType +published constants PropertyControlType { /** denotes a control which allows the user to choose from a list of possible property values diff --git a/offapi/com/sun/star/inspection/PropertyLineElement.idl b/offapi/com/sun/star/inspection/PropertyLineElement.idl index 35d7c47e7a17..9979169a2773 100644 --- a/offapi/com/sun/star/inspection/PropertyLineElement.idl +++ b/offapi/com/sun/star/inspection/PropertyLineElement.idl @@ -40,7 +40,7 @@ module com { module sun { module star { module inspection { @since OOo 2.0.3 */ -constants PropertyLineElement +published constants PropertyLineElement { /// specifies the input control in a group of controls related to a single property const short InputControl = 0x01; diff --git a/offapi/com/sun/star/inspection/XHyperlinkControl.idl b/offapi/com/sun/star/inspection/XHyperlinkControl.idl index f6daa5f8c179..6537da25a966 100644 --- a/offapi/com/sun/star/inspection/XHyperlinkControl.idl +++ b/offapi/com/sun/star/inspection/XHyperlinkControl.idl @@ -46,7 +46,7 @@ module com { module sun { module star { module inspection { @since OOo 2.0.3 */ -interface XHyperlinkControl : XPropertyControl +published interface XHyperlinkControl : XPropertyControl { /** adds a listener which will be notified when the user clicked the hyperlink text in the control @param listener diff --git a/offapi/com/sun/star/inspection/XNumericControl.idl b/offapi/com/sun/star/inspection/XNumericControl.idl index 13e4631a3959..16009b0e786f 100644 --- a/offapi/com/sun/star/inspection/XNumericControl.idl +++ b/offapi/com/sun/star/inspection/XNumericControl.idl @@ -47,7 +47,7 @@ module com { module sun { module star { module inspection { @since OOo 2.0.3 */ -interface XNumericControl : XPropertyControl +published interface XNumericControl : XPropertyControl { /** describes the number of decimal digits to use for the value */ diff --git a/offapi/com/sun/star/inspection/XObjectInspector.idl b/offapi/com/sun/star/inspection/XObjectInspector.idl index 664221ff03fd..12d656692b74 100644 --- a/offapi/com/sun/star/inspection/XObjectInspector.idl +++ b/offapi/com/sun/star/inspection/XObjectInspector.idl @@ -41,8 +41,8 @@ //============================================================================= module com { module sun { module star { module inspection { -interface XObjectInspectorModel; -interface XObjectInspectorUI; +published interface XObjectInspectorModel; +published interface XObjectInspectorUI; //----------------------------------------------------------------------------- /** describes the main interface of an ObjectInspector. @@ -51,7 +51,7 @@ interface XObjectInspectorUI; @since OOo 2.0.3 */ -interface XObjectInspector +published interface XObjectInspector { /** allows to plug the inspector into an XFrame diff --git a/offapi/com/sun/star/inspection/XObjectInspectorModel.idl b/offapi/com/sun/star/inspection/XObjectInspectorModel.idl index b7248d87d25f..f018081e85e2 100644 --- a/offapi/com/sun/star/inspection/XObjectInspectorModel.idl +++ b/offapi/com/sun/star/inspection/XObjectInspectorModel.idl @@ -47,7 +47,7 @@ interface XPropertyHandler; @since OOo 2.0.3 */ -interface XObjectInspectorModel +published interface XObjectInspectorModel { /** describes a set of factories for creating XPropertyHandlers diff --git a/offapi/com/sun/star/inspection/XObjectInspectorUI.idl b/offapi/com/sun/star/inspection/XObjectInspectorUI.idl index f6a90c824426..81b4836c4c36 100644 --- a/offapi/com/sun/star/inspection/XObjectInspectorUI.idl +++ b/offapi/com/sun/star/inspection/XObjectInspectorUI.idl @@ -43,7 +43,7 @@ //============================================================================= module com { module sun { module star { module inspection { -interface XPropertyControlObserver; +published interface XPropertyControlObserver; //----------------------------------------------------------------------------- /** grants access to certain aspects of the user interface of an object @@ -59,7 +59,7 @@ interface XPropertyControlObserver; @since OOo 2.0.3 */ -interface XObjectInspectorUI +published interface XObjectInspectorUI { /** enables or disables all components belonging to the UI representation of a property diff --git a/offapi/com/sun/star/inspection/XPropertyControl.idl b/offapi/com/sun/star/inspection/XPropertyControl.idl index b48f730fa7d9..5f414ccdcd28 100644 --- a/offapi/com/sun/star/inspection/XPropertyControl.idl +++ b/offapi/com/sun/star/inspection/XPropertyControl.idl @@ -38,14 +38,14 @@ //============================================================================= module com { module sun { module star { module inspection { -interface XPropertyControlContext; +published interface XPropertyControlContext; //----------------------------------------------------------------------------- /** defines the interface for a single control in an ObjectInspector @since OOo 2.0.3 */ -interface XPropertyControl +published interface XPropertyControl { /** denotes the type of the control, as one of the PropertyControlType constants diff --git a/offapi/com/sun/star/inspection/XPropertyControlContext.idl b/offapi/com/sun/star/inspection/XPropertyControlContext.idl index 457ef549652d..e2f4b0224ccb 100644 --- a/offapi/com/sun/star/inspection/XPropertyControlContext.idl +++ b/offapi/com/sun/star/inspection/XPropertyControlContext.idl @@ -42,7 +42,7 @@ module com { module sun { module star { module inspection { @since OOo 2.0.3 */ -interface XPropertyControlContext : XPropertyControlObserver +published interface XPropertyControlContext : XPropertyControlObserver { /** instructs the XPropertyControlContext to active the next control diff --git a/offapi/com/sun/star/inspection/XPropertyControlFactory.idl b/offapi/com/sun/star/inspection/XPropertyControlFactory.idl index 964a2c4fb3e8..c4ff4dd875d1 100644 --- a/offapi/com/sun/star/inspection/XPropertyControlFactory.idl +++ b/offapi/com/sun/star/inspection/XPropertyControlFactory.idl @@ -35,14 +35,14 @@ //============================================================================= module com { module sun { module star { module inspection { -interface XPropertyControl; +published interface XPropertyControl; //----------------------------------------------------------------------------- /** a factory for XPropertyControls @since OOo 2.0.3 */ -interface XPropertyControlFactory +published interface XPropertyControlFactory { /** creates a XPropertyControl diff --git a/offapi/com/sun/star/inspection/XPropertyControlObserver.idl b/offapi/com/sun/star/inspection/XPropertyControlObserver.idl index 51263e6824a5..90b1337b5d08 100644 --- a/offapi/com/sun/star/inspection/XPropertyControlObserver.idl +++ b/offapi/com/sun/star/inspection/XPropertyControlObserver.idl @@ -36,7 +36,7 @@ module com { module sun { module star { module inspection { -interface XPropertyControl; +published interface XPropertyControl; //============================================================================= @@ -45,7 +45,7 @@ interface XPropertyControl; @since OOo 2.2 */ -interface XPropertyControlObserver +published interface XPropertyControlObserver { /** notifies the observer that a certain XPropertyControl's UI representation gained the focus. diff --git a/offapi/com/sun/star/inspection/XPropertyHandler.idl b/offapi/com/sun/star/inspection/XPropertyHandler.idl index 81a105b8b9a5..d58c6fa10f04 100644 --- a/offapi/com/sun/star/inspection/XPropertyHandler.idl +++ b/offapi/com/sun/star/inspection/XPropertyHandler.idl @@ -55,8 +55,8 @@ //============================================================================= module com { module sun { module star { module inspection { -interface XObjectInspectorUI; -interface XPropertyControlFactory; +published interface XObjectInspectorUI; +published interface XPropertyControlFactory; //----------------------------------------------------------------------------- /** is the basic interface for object inspection. @@ -72,7 +72,7 @@ interface XPropertyControlFactory; @since OOo 2.0.3 */ -interface XPropertyHandler +published interface XPropertyHandler { /** used for controlling resources acquired by the handler diff --git a/offapi/com/sun/star/inspection/XStringListControl.idl b/offapi/com/sun/star/inspection/XStringListControl.idl index 640741961090..fc3f1dedd1ae 100644 --- a/offapi/com/sun/star/inspection/XStringListControl.idl +++ b/offapi/com/sun/star/inspection/XStringListControl.idl @@ -46,7 +46,7 @@ module com { module sun { module star { module inspection { @since OOo 2.0.3 */ -interface XStringListControl : XPropertyControl +published interface XStringListControl : XPropertyControl { /** clears the whole list */ diff --git a/offapi/com/sun/star/inspection/XStringRepresentation.idl b/offapi/com/sun/star/inspection/XStringRepresentation.idl index 66888f3cc240..cb527f12cc96 100644 --- a/offapi/com/sun/star/inspection/XStringRepresentation.idl +++ b/offapi/com/sun/star/inspection/XStringRepresentation.idl @@ -39,7 +39,7 @@ module com { module sun { module star { module inspection { /** handles string representations of property values. @see */ -interface XStringRepresentation +published interface XStringRepresentation { /** converts a into a string. @param PropertyValue diff --git a/offapi/com/sun/star/report/Calculation.idl b/offapi/com/sun/star/report/Calculation.idl index 228f7291c086..3e4611345f4c 100644 --- a/offapi/com/sun/star/report/Calculation.idl +++ b/offapi/com/sun/star/report/Calculation.idl @@ -37,7 +37,7 @@ /** Specifies how to calculate a value. @see XFormattedField */ -constants Calculation +published constants Calculation { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/report/ForceNewPage.idl b/offapi/com/sun/star/report/ForceNewPage.idl index 38a15a56df9c..90cfd1f7e5ae 100644 --- a/offapi/com/sun/star/report/ForceNewPage.idl +++ b/offapi/com/sun/star/report/ForceNewPage.idl @@ -38,7 +38,7 @@

This does not apply to page header or page footer.

@see XSection */ -constants ForceNewPage +published constants ForceNewPage { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/report/GroupKeepTogether.idl b/offapi/com/sun/star/report/GroupKeepTogether.idl index 8c3a7110c2e4..1a6adbca5bab 100644 --- a/offapi/com/sun/star/report/GroupKeepTogether.idl +++ b/offapi/com/sun/star/report/GroupKeepTogether.idl @@ -38,7 +38,7 @@ KeepTogether set to WHOLE_GROUP or WITH_FIRST_DETAIL will keep together by page or column. @see XGroup */ -constants GroupKeepTogether +published constants GroupKeepTogether { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/report/GroupOn.idl b/offapi/com/sun/star/report/GroupOn.idl index e3959e8885c7..8a9cbecc13ce 100644 --- a/offapi/com/sun/star/report/GroupOn.idl +++ b/offapi/com/sun/star/report/GroupOn.idl @@ -37,7 +37,7 @@ /** Specifies how to group data. @see XGroup */ -constants GroupOn +published constants GroupOn { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/report/KeepTogether.idl b/offapi/com/sun/star/report/KeepTogether.idl index 0a5ccbc70d26..f004c3f17993 100644 --- a/offapi/com/sun/star/report/KeepTogether.idl +++ b/offapi/com/sun/star/report/KeepTogether.idl @@ -37,7 +37,7 @@ /** Specifies that a group header, detail, and footer section is printed on the same page. @see XGroup */ -constants KeepTogether +published constants KeepTogether { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/report/ReportPrintOption.idl b/offapi/com/sun/star/report/ReportPrintOption.idl index 218944d2b513..f2e923dc1090 100644 --- a/offapi/com/sun/star/report/ReportPrintOption.idl +++ b/offapi/com/sun/star/report/ReportPrintOption.idl @@ -36,7 +36,7 @@ /** Specifies wether a page header or footer is printed on the same page as the report header or report footer. */ -constants ReportPrintOption +published constants ReportPrintOption { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/report/SectionPageBreak.idl b/offapi/com/sun/star/report/SectionPageBreak.idl index 04af47ae1609..abf9352013ea 100644 --- a/offapi/com/sun/star/report/SectionPageBreak.idl +++ b/offapi/com/sun/star/report/SectionPageBreak.idl @@ -37,7 +37,7 @@ /** Specifies that page breaks are allowed inside this section. @see XSection */ -constants SectionPageBreak +published constants SectionPageBreak { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/report/XFixedLine.idl b/offapi/com/sun/star/report/XFixedLine.idl index f1f44f5fcf1a..7dcd6d7208d8 100644 --- a/offapi/com/sun/star/report/XFixedLine.idl +++ b/offapi/com/sun/star/report/XFixedLine.idl @@ -49,7 +49,7 @@ module com { module sun { module star { module report { //============================================================================= -interface XFixedLine +published interface XFixedLine { interface XReportControlModel; @@ -97,7 +97,7 @@ interface XFixedLine //------------------------------------------------------------------------- }; -service FixedLine : XFixedLine; +published service FixedLine : XFixedLine; //============================================================================= }; }; }; }; diff --git a/offapi/com/sun/star/report/XFixedText.idl b/offapi/com/sun/star/report/XFixedText.idl index 8c10e1935548..3444aa8d7c5d 100644 --- a/offapi/com/sun/star/report/XFixedText.idl +++ b/offapi/com/sun/star/report/XFixedText.idl @@ -35,7 +35,7 @@ module com { module sun { module star { module report { //============================================================================= -interface XFixedText +published interface XFixedText { interface XReportControlModel; @@ -44,7 +44,7 @@ interface XFixedText [attribute,bound] string Label; }; -service FixedText : XFixedText; +published service FixedText : XFixedText; //============================================================================= }; }; }; }; diff --git a/offapi/com/sun/star/report/XFormatCondition.idl b/offapi/com/sun/star/report/XFormatCondition.idl index 187c1b524af2..340f3a828a80 100644 --- a/offapi/com/sun/star/report/XFormatCondition.idl +++ b/offapi/com/sun/star/report/XFormatCondition.idl @@ -36,7 +36,7 @@ //============================================================================= /** specifies a format condition for a control. */ -interface XFormatCondition +published interface XFormatCondition { interface XReportControlFormat; diff --git a/offapi/com/sun/star/report/XFormattedField.idl b/offapi/com/sun/star/report/XFormattedField.idl index 5de71ec50b64..3dc102752572 100644 --- a/offapi/com/sun/star/report/XFormattedField.idl +++ b/offapi/com/sun/star/report/XFormattedField.idl @@ -44,7 +44,7 @@ @see com::sun::star::report::XReportControlModel @see com::sun::star::util::XNumberFormatsSupplier */ -interface XFormattedField +published interface XFormattedField { interface XReportControlModel; @@ -61,7 +61,7 @@ interface XFormattedField [attribute,bound] com::sun::star::util::XNumberFormatsSupplier FormatsSupplier; }; -service FormattedField : XFormattedField; +published service FormattedField : XFormattedField; //============================================================================= }; }; }; }; diff --git a/offapi/com/sun/star/report/XFunction.idl b/offapi/com/sun/star/report/XFunction.idl index 7f3ac1a136e3..8a511a29939b 100644 --- a/offapi/com/sun/star/report/XFunction.idl +++ b/offapi/com/sun/star/report/XFunction.idl @@ -44,7 +44,7 @@ //============================================================================= /** specifies a format condition for a control. */ -interface XFunction +published interface XFunction { /** gives access to the properties. */ diff --git a/offapi/com/sun/star/report/XFunctions.idl b/offapi/com/sun/star/report/XFunctions.idl index 5a6ab1e8930f..4b23b61b962c 100644 --- a/offapi/com/sun/star/report/XFunctions.idl +++ b/offapi/com/sun/star/report/XFunctions.idl @@ -42,15 +42,15 @@ //============================================================================= module com { module sun { module star { module report { -interface XReportDefinition; -interface XFunction; +published interface XReportDefinition; +published interface XFunction; //============================================================================= /** This interface specifies the functions collections of the report definition or a group. @see XFunction @see XReportDefinition */ -interface XFunctions +published interface XFunctions { /** allows to register listeners to be notified of changes in the container. */ diff --git a/offapi/com/sun/star/report/XFunctionsSupplier.idl b/offapi/com/sun/star/report/XFunctionsSupplier.idl index d28c13f4dbdb..c9e2e49d8085 100644 --- a/offapi/com/sun/star/report/XFunctionsSupplier.idl +++ b/offapi/com/sun/star/report/XFunctionsSupplier.idl @@ -36,10 +36,10 @@ //============================================================================= module com { module sun { module star { module report { //============================================================================= - interface XFunctions; +published interface XFunctions; /** specifies the functions supplier which are located in a report defintion or a group. */ -interface XFunctionsSupplier +published interface XFunctionsSupplier { /** access to the functions */ diff --git a/offapi/com/sun/star/report/XGroup.idl b/offapi/com/sun/star/report/XGroup.idl index 469889ff6c7a..ac55066fdbf8 100644 --- a/offapi/com/sun/star/report/XGroup.idl +++ b/offapi/com/sun/star/report/XGroup.idl @@ -48,7 +48,7 @@ @see XReportDefinition @see XGroups */ -interface XGroup +published interface XGroup { /** allows access to the groups collection of the report. */ diff --git a/offapi/com/sun/star/report/XGroups.idl b/offapi/com/sun/star/report/XGroups.idl index ee2324f10855..a166425104ae 100644 --- a/offapi/com/sun/star/report/XGroups.idl +++ b/offapi/com/sun/star/report/XGroups.idl @@ -42,15 +42,15 @@ //============================================================================= module com { module sun { module star { module report { -interface XReportDefinition; -interface XGroup; +published interface XReportDefinition; +published interface XGroup; //============================================================================= /** This interface specifies the groups collections of the report definition. @see XGroup @see XReportDefinition */ -interface XGroups +published interface XGroups { /** allows to register listeners to be notified of changes in the container. */ diff --git a/offapi/com/sun/star/report/XImageControl.idl b/offapi/com/sun/star/report/XImageControl.idl index 48c18cb0b864..ea0641455d10 100644 --- a/offapi/com/sun/star/report/XImageControl.idl +++ b/offapi/com/sun/star/report/XImageControl.idl @@ -39,7 +39,7 @@ module com { module sun { module star { module report { //============================================================================= -interface XImageControl +published interface XImageControl { interface XReportControlModel; @@ -81,7 +81,7 @@ interface XImageControl [attribute,bound] boolean PreserveIRI; }; -service ImageControl : XImageControl; +published service ImageControl : XImageControl; //============================================================================= }; }; }; }; diff --git a/offapi/com/sun/star/report/XReportComponent.idl b/offapi/com/sun/star/report/XReportComponent.idl index e3098a2246e8..19466f68c243 100644 --- a/offapi/com/sun/star/report/XReportComponent.idl +++ b/offapi/com/sun/star/report/XReportComponent.idl @@ -55,13 +55,15 @@ //============================================================================= module com { module sun { module star { module report { - interface XSection; + +published interface XSection; + //============================================================================= /** describes a component which may be part of a report. @see XReportDefinition */ -interface XReportComponent +published interface XReportComponent { interface com::sun::star::util::XCloneable; /** identifies the component as a candidate for being part of a report. diff --git a/offapi/com/sun/star/report/XReportControlFormat.idl b/offapi/com/sun/star/report/XReportControlFormat.idl index 672ff99549e7..74eee2a0035a 100644 --- a/offapi/com/sun/star/report/XReportControlFormat.idl +++ b/offapi/com/sun/star/report/XReportControlFormat.idl @@ -42,7 +42,7 @@ //============================================================================= /** specifies a format condition for a control. */ -interface XReportControlFormat +published interface XReportControlFormat { /** specifies the background color (RGB) of the control. */ @@ -374,7 +374,7 @@ interface XReportControlFormat }; /** determins the rotation of a character in degree. -

Depending on the implementation only certain values may be allowed. +

Depending on the implementation only certain values may be allowed.

*/ [attribute,bound] short CharRotation diff --git a/offapi/com/sun/star/report/XReportControlModel.idl b/offapi/com/sun/star/report/XReportControlModel.idl index 2c28f5fcc570..3f65afd84964 100644 --- a/offapi/com/sun/star/report/XReportControlModel.idl +++ b/offapi/com/sun/star/report/XReportControlModel.idl @@ -47,7 +47,7 @@ module com { module sun { module star { module report { //============================================================================= -interface XReportControlModel +published interface XReportControlModel { /** allows the creation of sub reports. */ diff --git a/offapi/com/sun/star/report/XReportDefinition.idl b/offapi/com/sun/star/report/XReportDefinition.idl index 9af58a8d702e..6c20ede01305 100644 --- a/offapi/com/sun/star/report/XReportDefinition.idl +++ b/offapi/com/sun/star/report/XReportDefinition.idl @@ -92,8 +92,8 @@ published interface XConnection; module com { module sun { module star { module report { - interface XSection; - interface XGroups; + published interface XSection; + published interface XGroups; //============================================================================= /** identifies a XReportComponent as being a (sub-) report. @@ -107,7 +107,7 @@ published interface XConnection; @see XReportComponent */ -interface XReportDefinition +published interface XReportDefinition { /** allows the access to the model embedded in the database storage. */ @@ -351,7 +351,7 @@ interface XReportDefinition }; }; -service ReportDefinition : XReportDefinition; +published service ReportDefinition : XReportDefinition; //============================================================================= }; }; }; }; diff --git a/offapi/com/sun/star/report/XReportEngine.idl b/offapi/com/sun/star/report/XReportEngine.idl index 7a154483ff20..f364a6a48bf5 100644 --- a/offapi/com/sun/star/report/XReportEngine.idl +++ b/offapi/com/sun/star/report/XReportEngine.idl @@ -76,7 +76,7 @@ module com { module sun { module star { module report { @see com.sun.star.document.OfficeDocument */ -interface XReportEngine +published interface XReportEngine { /** allows life-time control of report engine. */ diff --git a/offapi/com/sun/star/report/XSection.idl b/offapi/com/sun/star/report/XSection.idl index 294bd449c6cc..389f9949ebb6 100644 --- a/offapi/com/sun/star/report/XSection.idl +++ b/offapi/com/sun/star/report/XSection.idl @@ -54,7 +54,7 @@ //============================================================================= module com { module sun { module star { module report { - interface XGroup; + published interface XGroup; //============================================================================= /** identifies a XSection inside a report. @@ -66,7 +66,7 @@ @see XReportDefinition @see XGroup */ -interface XSection +published interface XSection { /** allows to navigate to group or report definition. */ diff --git a/offapi/com/sun/star/report/XShape.idl b/offapi/com/sun/star/report/XShape.idl index 50e366fc2a79..ca5935422303 100644 --- a/offapi/com/sun/star/report/XShape.idl +++ b/offapi/com/sun/star/report/XShape.idl @@ -44,7 +44,7 @@ module com { module sun { module star { module report { //============================================================================= -interface XShape +published interface XShape { interface XReportControlModel; diff --git a/offapi/com/sun/star/report/inspection/DataProviderHandler.idl b/offapi/com/sun/star/report/inspection/DataProviderHandler.idl index a7348b5aca9d..0f410efe3aeb 100644 --- a/offapi/com/sun/star/report/inspection/DataProviderHandler.idl +++ b/offapi/com/sun/star/report/inspection/DataProviderHandler.idl @@ -42,7 +42,7 @@ module com { module sun { module star { module report { module inspection { @see com::sun::star::inspection::XPropertyHandler */ -service DataProviderHandler +published service DataProviderHandler { interface com::sun::star::inspection::XPropertyHandler; }; diff --git a/offapi/com/sun/star/report/inspection/DefaultComponentInspectorModel.idl b/offapi/com/sun/star/report/inspection/DefaultComponentInspectorModel.idl index 842dd8d3b047..8f949cbdb953 100644 --- a/offapi/com/sun/star/report/inspection/DefaultComponentInspectorModel.idl +++ b/offapi/com/sun/star/report/inspection/DefaultComponentInspectorModel.idl @@ -52,7 +52,7 @@ module com { module sun { module star { module report { module inspection { @see com::sun::star::inspection::XObjectInspectorModel::HandlerFactories */ -service DefaultComponentInspectorModel : com::sun::star::inspection::XObjectInspectorModel +published service DefaultComponentInspectorModel : com::sun::star::inspection::XObjectInspectorModel { /** creates a default DefaultComponentInspectorModel, providing factories for all handlers listed above. diff --git a/offapi/com/sun/star/report/inspection/ReportComponentHandler.idl b/offapi/com/sun/star/report/inspection/ReportComponentHandler.idl index 132cbab1eccb..cda25345607e 100644 --- a/offapi/com/sun/star/report/inspection/ReportComponentHandler.idl +++ b/offapi/com/sun/star/report/inspection/ReportComponentHandler.idl @@ -42,7 +42,7 @@ module com { module sun { module star { module report { module inspection { @see com::sun::star::inspection::XPropertyHandler */ -service ReportComponentHandler +published service ReportComponentHandler { interface com::sun::star::inspection::XPropertyHandler; }; diff --git a/offapi/com/sun/star/report/meta/XFormulaParser.idl b/offapi/com/sun/star/report/meta/XFormulaParser.idl index 96ae63f4c5e8..61bbba184baa 100644 --- a/offapi/com/sun/star/report/meta/XFormulaParser.idl +++ b/offapi/com/sun/star/report/meta/XFormulaParser.idl @@ -38,7 +38,7 @@ module com { module sun { module star { module report { module meta { /** identifies a XFormulaParser which allows to retrieve the meta data of all supported functions. */ -interface XFormulaParser +published interface XFormulaParser { /** allows life-time control of report engine. */ diff --git a/offapi/com/sun/star/report/meta/XFunctionCategory.idl b/offapi/com/sun/star/report/meta/XFunctionCategory.idl index 9cb669c84573..22e2e4928daa 100644 --- a/offapi/com/sun/star/report/meta/XFunctionCategory.idl +++ b/offapi/com/sun/star/report/meta/XFunctionCategory.idl @@ -34,12 +34,12 @@ //============================================================================= module com { module sun { module star { module report { module meta { -interface XFunctionDescription; +published interface XFunctionDescription; /** identifies a XFunctionCategory which allows to retrieve the meta data of all supported functions. */ -interface XFunctionCategory +published interface XFunctionCategory { /** gives access to the properties. */ diff --git a/offapi/com/sun/star/report/meta/XFunctionDescription.idl b/offapi/com/sun/star/report/meta/XFunctionDescription.idl index 9ed060bcaa85..ac92a69481e5 100644 --- a/offapi/com/sun/star/report/meta/XFunctionDescription.idl +++ b/offapi/com/sun/star/report/meta/XFunctionDescription.idl @@ -34,12 +34,12 @@ //============================================================================= module com { module sun { module star { module report { module meta { -interface XFunctionCategory; +published interface XFunctionCategory; /** identifies a XFunctionDescription which allows to retrieve the meta data of all supported functions. */ -interface XFunctionDescription +published interface XFunctionDescription { /** gives access to the properties. */ diff --git a/offapi/com/sun/star/report/meta/XFunctionManager.idl b/offapi/com/sun/star/report/meta/XFunctionManager.idl index a862ad07dd59..69078d649277 100644 --- a/offapi/com/sun/star/report/meta/XFunctionManager.idl +++ b/offapi/com/sun/star/report/meta/XFunctionManager.idl @@ -39,7 +39,7 @@ module com { module sun { module star { module report { module meta { /** identifies a XFunctionManager which allows to retrieve the meta data of all supported functions. */ -interface XFunctionManager +published interface XFunctionManager { /** allows life-time control of report engine. */ diff --git a/offapi/com/sun/star/sdb/XDocumentDataSource.idl b/offapi/com/sun/star/sdb/XDocumentDataSource.idl index b0e891b0a084..6acb441bd7a5 100644 --- a/offapi/com/sun/star/sdb/XDocumentDataSource.idl +++ b/offapi/com/sun/star/sdb/XDocumentDataSource.idl @@ -43,7 +43,7 @@

@see OfficeDatabaseDocument */ -interface XDocumentDataSource +published interface XDocumentDataSource { /** provides access to the one and only OfficeDatabaseDocument which the data source is based on. diff --git a/offapi/com/sun/star/sdb/XFormDocumentsSupplier.idl b/offapi/com/sun/star/sdb/XFormDocumentsSupplier.idl index 672505bc12ad..fa28e15ebc75 100644 --- a/offapi/com/sun/star/sdb/XFormDocumentsSupplier.idl +++ b/offapi/com/sun/star/sdb/XFormDocumentsSupplier.idl @@ -41,7 +41,7 @@ /** provides the access to a container of database forms. @see Forms */ -interface XFormDocumentsSupplier: com::sun::star::uno::XInterface +published interface XFormDocumentsSupplier: com::sun::star::uno::XInterface { /** returns the container of forms. diff --git a/offapi/com/sun/star/sdb/XOfficeDatabaseDocument.idl b/offapi/com/sun/star/sdb/XOfficeDatabaseDocument.idl index b2640704537c..d0f79a4ab348 100644 --- a/offapi/com/sun/star/sdb/XOfficeDatabaseDocument.idl +++ b/offapi/com/sun/star/sdb/XOfficeDatabaseDocument.idl @@ -47,7 +47,7 @@ module com { module sun { module star { module sdb { //============================================================================= /** simplifies the accessing of data sources, and it's corresponding database document and forms, and reports. */ -interface XOfficeDatabaseDocument +published interface XOfficeDatabaseDocument { /** allows to access the supplier for forms. @see com::sun::star::sdb::Forms diff --git a/offapi/com/sun/star/sdb/XReportDocumentsSupplier.idl b/offapi/com/sun/star/sdb/XReportDocumentsSupplier.idl index d7b15fbc0018..691c745160e3 100644 --- a/offapi/com/sun/star/sdb/XReportDocumentsSupplier.idl +++ b/offapi/com/sun/star/sdb/XReportDocumentsSupplier.idl @@ -41,7 +41,7 @@ /** provides the access to a container of database reports. @see Reports */ -interface XReportDocumentsSupplier: com::sun::star::uno::XInterface +published interface XReportDocumentsSupplier: com::sun::star::uno::XInterface { /** returns the container of reports. diff --git a/offapi/com/sun/star/sheet/XFormulaParser.idl b/offapi/com/sun/star/sheet/XFormulaParser.idl index 73b317e7f848..b7bbab984ce1 100644 --- a/offapi/com/sun/star/sheet/XFormulaParser.idl +++ b/offapi/com/sun/star/sheet/XFormulaParser.idl @@ -40,7 +40,7 @@ module com { module sun { module star { module sheet { /** converts between text and token representations of formulas. */ -interface XFormulaParser +published interface XFormulaParser { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/ui/XUIConfigurationManagerSupplier.idl b/offapi/com/sun/star/ui/XUIConfigurationManagerSupplier.idl index a1f091623a30..ee2ae174d8d1 100644 --- a/offapi/com/sun/star/ui/XUIConfigurationManagerSupplier.idl +++ b/offapi/com/sun/star/ui/XUIConfigurationManagerSupplier.idl @@ -40,7 +40,7 @@ module com { module sun { module star { module ui { @since OOo 2.0 */ -interface XUIConfigurationManagerSupplier : ::com::sun::star::uno::XInterface +published interface XUIConfigurationManagerSupplier : ::com::sun::star::uno::XInterface { //---------------------------------------------------------------------- /** returns the user interface configuration manager related to the diff --git a/offapi/com/sun/star/util/XModifiable2.idl b/offapi/com/sun/star/util/XModifiable2.idl index fe2c7960e9d1..fd9b19042424 100644 --- a/offapi/com/sun/star/util/XModifiable2.idl +++ b/offapi/com/sun/star/util/XModifiable2.idl @@ -51,7 +51,7 @@ module com { module sun { module star { module util { Please use this interface very carefuly.

*/ -interface XModifiable2: com::sun::star::util::XModifiable +published interface XModifiable2: com::sun::star::util::XModifiable { //------------------------------------------------------------------------- /** disable possibility to change modified state of the document diff --git a/udkapi/com/sun/star/beans/Ambiguous.idl b/udkapi/com/sun/star/beans/Ambiguous.idl index 919c7250f462..ec443e7cb5d5 100644 --- a/udkapi/com/sun/star/beans/Ambiguous.idl +++ b/udkapi/com/sun/star/beans/Ambiguous.idl @@ -37,7 +37,7 @@ module com { module sun { module star { module beans { have the PropertyAttribute::MAYBEAMBIGUOUS.

*/ -struct Ambiguous { +published struct Ambiguous { /** The underlying value of this structure instance. diff --git a/udkapi/com/sun/star/beans/Defaulted.idl b/udkapi/com/sun/star/beans/Defaulted.idl index d67f1aacf055..7b0b09318611 100644 --- a/udkapi/com/sun/star/beans/Defaulted.idl +++ b/udkapi/com/sun/star/beans/Defaulted.idl @@ -37,7 +37,7 @@ module com { module sun { module star { module beans { have the PropertyAttribute::MAYBEDEFAULT.

*/ -struct Defaulted { +published struct Defaulted { /** The underlying value of this structure instance. diff --git a/udkapi/com/sun/star/beans/Optional.idl b/udkapi/com/sun/star/beans/Optional.idl index fbf58b667c16..a2786e5190c1 100644 --- a/udkapi/com/sun/star/beans/Optional.idl +++ b/udkapi/com/sun/star/beans/Optional.idl @@ -39,7 +39,7 @@ module com { module sun { module star { module beans { also be useful in other situations, for example as the return type of an interface method.

*/ -struct Optional { +published struct Optional { /** Marks this structure instance as having an actual value. */ -- cgit v1.2.3 From 25e6fb65f5948aeba3b0eabed9cda3eae22fd4fa Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 16 Mar 2011 15:43:27 +0100 Subject: sw34bf05: #i76669# - fix build breaker which are not detected under Windows with enable PCH --- sw/source/core/inc/viewimp.hxx | 5 +++++ sw/source/core/layout/paintfrm.cxx | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx index 67a1edd7c8e1..eb0af505138f 100755 --- a/sw/source/core/inc/viewimp.hxx +++ b/sw/source/core/inc/viewimp.hxx @@ -59,6 +59,11 @@ class SwPrintData; class SwPagePreviewLayout; struct PrevwPage; class SwTxtFrm; +// --> OD #i76669# +namespace sdr { namespace contact { + class ViewObjectContactRedirector; +} } +// <-- class SwViewImp { diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index ed8fa0b31a4d..17b5a12a4e97 100755 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -95,6 +95,11 @@ // --> FME 2004-06-08 #i12836# enhanced pdf export #include // <-- +// --> OD #i76669# +#include +#include +#include +// <-- #include #include @@ -2707,9 +2712,6 @@ void SwTabFrmPainter::Insert( SwLineEntry& rNew, bool bHori ) // // --> OD #i76669# -#include -#include - namespace { class SwViewObjectContactRedirector : public ::sdr::contact::ViewObjectContactRedirector -- cgit v1.2.3 From d2b362879156f49ac77a69942cab2ffb0fdac12b Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 16 Mar 2011 17:23:01 +0100 Subject: #i116487# Adjust copyright date to 2011 --- svx/source/intro/about_ooo.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svx/source/intro/about_ooo.src b/svx/source/intro/about_ooo.src index b49a0ff927cf..4523ffd739ce 100644 --- a/svx/source/intro/about_ooo.src +++ b/svx/source/intro/about_ooo.src @@ -30,7 +30,7 @@ String ABOUT_STR_COPYRIGHT { - Text[ en-US ] = "Copyright © 2000, 2010 Oracle and/or its affiliates. All rights reserved.\nThis product was created by %OOOVENDOR, based on OpenOffice.org.\nOpenOffice.org acknowledges all community members, especially those mentioned at\n http://www.openoffice.org/welcome/credits.html."; + Text[ en-US ] = "Copyright © 2000, 2011 Oracle and/or its affiliates. All rights reserved.\nThis product was created by %OOOVENDOR, based on OpenOffice.org.\nOpenOffice.org acknowledges all community members, especially those mentioned at\n http://www.openoffice.org/welcome/credits.html."; }; StringArray ABOUT_STR_DEVELOPER_ARY -- cgit v1.2.3 From 6f79e5e6a2b640cd671410e49db64d4fec6046b8 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 16 Mar 2011 17:44:08 +0100 Subject: sw34bf05: #i102238# - correct contour polypolygon conversion in case that graphic's map made is not MAP_PIXEL --- sw/source/core/docnode/ndnotxt.cxx | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) mode change 100644 => 100755 sw/source/core/docnode/ndnotxt.cxx diff --git a/sw/source/core/docnode/ndnotxt.cxx b/sw/source/core/docnode/ndnotxt.cxx old mode 100644 new mode 100755 index 6ad9605a18f2..4210c78d81bc --- a/sw/source/core/docnode/ndnotxt.cxx +++ b/sw/source/core/docnode/ndnotxt.cxx @@ -136,6 +136,30 @@ const PolyPolygon *SwNoTxtNode::HasContour() const const MapMode aContourMap( bPixelGrf ? MAP_PIXEL : MAP_100TH_MM ); if( bPixelGrf ? !bPixelContour : aGrfMap != aContourMap ) { + // --> OD #i102238# + double nGrfDPIx = 0.0; + double nGrfDPIy = 0.0; + { + if ( !bPixelGrf && bPixelContour ) + { + const Size aGrfPixelSize( GetGraphic().GetSizePixel() ); + const Size aGrfPrefMapModeSize( GetGraphic().GetPrefSize() ); + if ( aGrfMap.GetMapUnit() == MAP_INCH ) + { + nGrfDPIx = aGrfPixelSize.Width() / ( (double)aGrfMap.GetScaleX() * aGrfPrefMapModeSize.Width() ); + nGrfDPIy = aGrfPixelSize.Height() / ( (double)aGrfMap.GetScaleY() * aGrfPrefMapModeSize.Height() ); + } + else + { + const Size aGrf1000thInchSize = + OutputDevice::LogicToLogic( aGrfPrefMapModeSize, + aGrfMap, MAP_1000TH_INCH ); + nGrfDPIx = 1000.0 * aGrfPixelSize.Width() / aGrf1000thInchSize.Width(); + nGrfDPIy = 1000.0 * aGrfPixelSize.Height() / aGrf1000thInchSize.Height(); + } + } + } + // <-- ASSERT( !bPixelGrf || aGrfMap == aContourMap, "scale factor for pixel unsupported" ); OutputDevice* pOutDev = @@ -153,7 +177,16 @@ const PolyPolygon *SwNoTxtNode::HasContour() const rPoly[i] = pOutDev->LogicToPixel( rPoly[i], aContourMap ); else if( bPixelContour ) + { rPoly[i] = pOutDev->PixelToLogic( rPoly[i], aGrfMap ); + // --> OD #i102238# + if ( nGrfDPIx != 0 && nGrfDPIy != 0 ) + { + rPoly[i] = Point( rPoly[i].X() * pOutDev->ImplGetDPIX() / nGrfDPIx, + rPoly[i].Y() * pOutDev->ImplGetDPIY() / nGrfDPIy ); + } + // <-- + } else rPoly[i] = OutputDevice::LogicToLogic( rPoly[i], aContourMap, @@ -203,7 +236,9 @@ sal_Bool SwNoTxtNode::GetContourAPI( PolyPolygon &rContour ) const sal_uInt16 nPolyCount = rContour.Count(); for( sal_uInt16 j=0; j OD #i102238# - use the right instance + Polygon& rPoly = rContour[j]; + // <-- sal_uInt16 nCount = rPoly.GetSize(); for( sal_uInt16 i=0 ; i Date: Wed, 16 Mar 2011 17:49:32 +0100 Subject: sw34bf05: #i117159# remove codepoint 0xf0f1 from mapping for Windings 2 to enable codepoint 0xf0f7 from Symbol to take effect --- unotools/source/misc/fontcvt.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx index 5f5011d9d863..b7e3b452483a 100644 --- a/unotools/source/misc/fontcvt.cxx +++ b/unotools/source/misc/fontcvt.cxx @@ -343,7 +343,7 @@ static const sal_Unicode aWingDings2Tab[224] = 0xe5c1, 0xe5c2, 0xe5c3, 0xe5c4, 0xe5c5, 0xe5c6, 0xe5c7, 0xe5c8, // F0f0 - 0xe5c9, 0x2022, 0xe5cb, 0xe5cc, + 0xe5c9, 0, 0xe5cb, 0xe5cc, 0xe5cd, 0xe5ce, 0xe5cf, 0xe5d0, 0x203b, 0x2042, 0, 0, 0, 0, 0, 0 -- cgit v1.2.3 From a754527bb20058cee5fc9bffaed1861e7239fa78 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 17 Mar 2011 09:09:16 +0100 Subject: #i117341# let getAvailableServiceNames include css.awt.tab.UnoControlTabPageModel --- toolkit/source/controls/controlmodelcontainerbase.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx index f037f10bbe31..25f30cb88d34 100644 --- a/toolkit/source/controls/controlmodelcontainerbase.cxx +++ b/toolkit/source/controls/controlmodelcontainerbase.cxx @@ -427,7 +427,7 @@ Sequence< ::rtl::OUString > ControlModelContainerBase::getAvailableServiceNames( static Sequence< ::rtl::OUString >* pNamesSeq = NULL; if ( !pNamesSeq ) { - pNamesSeq = new Sequence< ::rtl::OUString >( 23 ); + pNamesSeq = new Sequence< ::rtl::OUString >( 24 ); ::rtl::OUString* pNames = pNamesSeq->getArray(); pNames[0] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlEditModel ); pNames[1] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFormattedFieldModel ); @@ -452,7 +452,7 @@ Sequence< ::rtl::OUString > ControlModelContainerBase::getAvailableServiceNames( pNames[20] = ::rtl::OUString::createFromAscii( szServiceName_TreeControlModel ); pNames[21] = ::rtl::OUString::createFromAscii( szServiceName_GridControlModel ); pNames[22] = ::rtl::OUString::createFromAscii( szServiceName_UnoControlTabPageContainerModel ); - + pNames[23] = ::rtl::OUString::createFromAscii( szServiceName_UnoControlTabPageModel ); } return *pNamesSeq; } -- cgit v1.2.3 From c696ee29fc4254652b4df9cd5242bae8096d7e1f Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Thu, 17 Mar 2011 11:11:01 +0100 Subject: dba34d: fix for assertion from comphelper --- .../odbcbase/ODatabaseMetaDataResultSet.cxx | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx index 751ab7cf2988..828d0f6b7c3e 100644 --- a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx @@ -979,7 +979,8 @@ void ODatabaseMetaDataResultSet::openColumnPrivileges( const Any& catalog, cons m_bFreeHandle = sal_True; ::rtl::OString aPKQ,aPKO,aPKN,aCOL; - aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); + if ( catalog.hasValue() ) + aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); aPKO = ::rtl::OUStringToOString(schema,m_nTextEncoding); const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, @@ -1011,7 +1012,8 @@ void ODatabaseMetaDataResultSet::openColumns( const Any& catalog, m_bFreeHandle = sal_True; ::rtl::OString aPKQ,aPKO,aPKN,aCOL; - aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); + if ( catalog.hasValue() ) + aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); aPKO = ::rtl::OUStringToOString(schemaPattern,m_nTextEncoding); const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, @@ -1077,7 +1079,8 @@ void ODatabaseMetaDataResultSet::openProcedureColumns( const Any& catalog, m_bFreeHandle = sal_True; ::rtl::OString aPKQ,aPKO,aPKN,aCOL; - aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); + if ( catalog.hasValue() ) + aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); aPKO = ::rtl::OUStringToOString(schemaPattern,m_nTextEncoding); const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, @@ -1110,7 +1113,8 @@ void ODatabaseMetaDataResultSet::openProcedures(const Any& catalog, const ::rtl: m_bFreeHandle = sal_True; ::rtl::OString aPKQ,aPKO,aPKN,aCOL; - aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); + if ( catalog.hasValue() ) + aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); aPKO = ::rtl::OUStringToOString(schemaPattern,m_nTextEncoding); const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, @@ -1139,6 +1143,7 @@ void ODatabaseMetaDataResultSet::openSpecialColumns(sal_Bool _bRowVer,const Any& m_bFreeHandle = sal_True; ::rtl::OString aPKQ,aPKO,aPKN,aCOL; + if ( catalog.hasValue() ) aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); aPKO = ::rtl::OUStringToOString(schema,m_nTextEncoding); @@ -1228,7 +1233,8 @@ void ODatabaseMetaDataResultSet::openPrimaryKeys(const Any& catalog, const ::rtl m_bFreeHandle = sal_True; ::rtl::OString aPKQ,aPKO,aPKN,aCOL; - aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); + if ( catalog.hasValue() ) + aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); aPKO = ::rtl::OUStringToOString(schema,m_nTextEncoding); const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, @@ -1257,7 +1263,8 @@ void ODatabaseMetaDataResultSet::openTablePrivileges(const Any& catalog, const : m_bFreeHandle = sal_True; ::rtl::OString aPKQ,aPKO,aPKN; - aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); + if ( catalog.hasValue() ) + aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); aPKO = ::rtl::OUStringToOString(schemaPattern,m_nTextEncoding); const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, @@ -1287,7 +1294,8 @@ void ODatabaseMetaDataResultSet::openIndexInfo( const Any& catalog, const ::rtl: m_bFreeHandle = sal_True; ::rtl::OString aPKQ,aPKO,aPKN; - aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); + if ( catalog.hasValue() ) + aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); aPKO = ::rtl::OUStringToOString(schema,m_nTextEncoding); const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, -- cgit v1.2.3 From bd5f34e011d723600858e57667c17e21172f0f65 Mon Sep 17 00:00:00 2001 From: Frank Peters Date: Thu, 17 Mar 2011 11:37:28 +0100 Subject: #i117372# --- readlicense_oo/docs/readme/eval.xsl | 2 +- readlicense_oo/docs/readme/readme.xrm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/readlicense_oo/docs/readme/eval.xsl b/readlicense_oo/docs/readme/eval.xsl index e8830d43015c..613e61d673f9 100644 --- a/readlicense_oo/docs/readme/eval.xsl +++ b/readlicense_oo/docs/readme/eval.xsl @@ -1,5 +1,5 @@ - + diff --git a/readlicense_oo/docs/readme/readme.xrm b/readlicense_oo/docs/readme/readme.xrm index 78716869e822..66203b687635 100755 --- a/readlicense_oo/docs/readme/readme.xrm +++ b/readlicense_oo/docs/readme/readme.xrm @@ -1,6 +1,5 @@ - + @@ -31,6 +30,7 @@

Notes on Installation

+

${PRODUCTNAME} requires a recent version of JAVA for full functionality which is part of the ${PRODUCTNAME} installation package.

System Requirements

    -- cgit v1.2.3 From 0461d179dddc2caab6315e6f7ec7bb3804dd017a Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Thu, 17 Mar 2011 12:50:52 +0100 Subject: #i117329# - Publishing of UNO types,third wave. --- offapi/com/sun/star/awt/AnimatedImagesControlModel.idl | 4 ++-- offapi/com/sun/star/awt/ItemListEvent.idl | 2 +- offapi/com/sun/star/awt/SpinningProgressControlModel.idl | 2 +- offapi/com/sun/star/awt/XAnimatedImages.idl | 2 +- offapi/com/sun/star/awt/XAnimation.idl | 2 +- offapi/com/sun/star/awt/XItemEventBroadcaster.idl | 2 +- offapi/com/sun/star/awt/XItemList.idl | 4 ++-- offapi/com/sun/star/awt/XItemListListener.idl | 2 +- offapi/com/sun/star/awt/XStyleChangeListener.idl | 2 +- offapi/com/sun/star/awt/XStyleSettings.idl | 4 ++-- offapi/com/sun/star/awt/XStyleSettingsSupplier.idl | 4 ++-- offapi/com/sun/star/awt/XWindowListener2.idl | 2 +- offapi/com/sun/star/awt/grid/GridColumnEvent.idl | 2 +- offapi/com/sun/star/awt/grid/XGridColumn.idl | 2 +- offapi/com/sun/star/awt/grid/XGridColumnListener.idl | 2 +- offapi/com/sun/star/document/DocumentEvent.idl | 2 +- offapi/com/sun/star/document/EmptyUndoStackException.idl | 2 +- .../sun/star/document/UndoContextNotClosedException.idl | 2 +- offapi/com/sun/star/document/UndoFailedException.idl | 2 +- offapi/com/sun/star/document/UndoManagerEvent.idl | 2 +- offapi/com/sun/star/document/XDocumentEventBroadcaster.idl | 4 ++-- offapi/com/sun/star/document/XDocumentEventListener.idl | 2 +- offapi/com/sun/star/document/XUndoAction.idl | 2 +- offapi/com/sun/star/document/XUndoManager.idl | 6 +++--- offapi/com/sun/star/document/XUndoManagerListener.idl | 2 +- offapi/com/sun/star/document/XUndoManagerSupplier.idl | 4 ++-- offapi/com/sun/star/frame/XController2.idl | 2 +- offapi/com/sun/star/logging/LogRecord.idl | 2 +- offapi/com/sun/star/logging/XLogFormatter.idl | 2 +- offapi/com/sun/star/logging/XLogHandler.idl | 2 +- offapi/com/sun/star/logging/XLogger.idl | 4 ++-- offapi/com/sun/star/sdb/XSingleSelectQueryAnalyzer.idl | 4 ++-- offapi/com/sun/star/sdb/XSingleSelectQueryComposer.idl | 4 ++-- offapi/com/sun/star/sdb/XSubDocument.idl | 2 +- .../com/sun/star/sdb/application/XDatabaseDocumentUI.idl | 2 +- offapi/com/sun/star/sdb/tools/XConnectionTools.idl | 14 +++++++------- offapi/com/sun/star/sdb/tools/XDataSourceMetaData.idl | 2 +- offapi/com/sun/star/sdb/tools/XObjectNames.idl | 2 +- offapi/com/sun/star/sdb/tools/XTableName.idl | 2 +- offapi/com/sun/star/ui/XToolPanel.idl | 2 +- offapi/com/sun/star/ui/dialogs/Wizard.idl | 4 ++-- offapi/com/sun/star/ui/dialogs/XWizard.idl | 4 ++-- offapi/com/sun/star/ui/dialogs/XWizardController.idl | 2 +- offapi/com/sun/star/ui/dialogs/XWizardPage.idl | 2 +- offapi/com/sun/star/util/InvalidStateException.idl | 2 +- offapi/com/sun/star/util/NotLockedException.idl | 2 +- offapi/com/sun/star/util/XLockable.idl | 2 +- udkapi/com/sun/star/beans/Pair.idl | 2 +- 48 files changed, 67 insertions(+), 67 deletions(-) diff --git a/offapi/com/sun/star/awt/AnimatedImagesControlModel.idl b/offapi/com/sun/star/awt/AnimatedImagesControlModel.idl index 2bc1260775c9..5d8aecdc07d8 100755 --- a/offapi/com/sun/star/awt/AnimatedImagesControlModel.idl +++ b/offapi/com/sun/star/awt/AnimatedImagesControlModel.idl @@ -33,7 +33,7 @@ module com { module sun { module star { module awt { -interface XAnimatedImages; +published interface XAnimatedImages; //====================================================================================================================== @@ -41,7 +41,7 @@ interface XAnimatedImages; @since OOo 3.4 */ -service AnimatedImagesControlModel +published service AnimatedImagesControlModel { service com::sun::star::awt::UnoControlModel; diff --git a/offapi/com/sun/star/awt/ItemListEvent.idl b/offapi/com/sun/star/awt/ItemListEvent.idl index f9d2658bd5bd..bcd072062ddc 100644 --- a/offapi/com/sun/star/awt/ItemListEvent.idl +++ b/offapi/com/sun/star/awt/ItemListEvent.idl @@ -39,7 +39,7 @@ module com { module sun { module star { module awt { /** is the event broadcasted by a XListItems implementation for changes in its item list. */ -struct ItemListEvent : ::com::sun::star::lang::EventObject +published struct ItemListEvent : ::com::sun::star::lang::EventObject { /** specifies the position of the item which is affected by the event diff --git a/offapi/com/sun/star/awt/SpinningProgressControlModel.idl b/offapi/com/sun/star/awt/SpinningProgressControlModel.idl index a75417d41cc3..c6c273bce26d 100755 --- a/offapi/com/sun/star/awt/SpinningProgressControlModel.idl +++ b/offapi/com/sun/star/awt/SpinningProgressControlModel.idl @@ -40,7 +40,7 @@ module com { module sun { module star { module awt {

    Three image sets are provided, of size 16x16, 32x32, and 64x64 pixels.

    */ -service SpinningProgressControlModel +published service SpinningProgressControlModel { service AnimatedImagesControlModel; }; diff --git a/offapi/com/sun/star/awt/XAnimatedImages.idl b/offapi/com/sun/star/awt/XAnimatedImages.idl index a03d08c965f1..6a470882ed44 100755 --- a/offapi/com/sun/star/awt/XAnimatedImages.idl +++ b/offapi/com/sun/star/awt/XAnimatedImages.idl @@ -46,7 +46,7 @@ module com { module sun { module star { module awt { @since OOo 3.4 */ -interface XAnimatedImages +published interface XAnimatedImages { /** specifies the time in milliseconds between two animation steps. diff --git a/offapi/com/sun/star/awt/XAnimation.idl b/offapi/com/sun/star/awt/XAnimation.idl index e1e8f6023a7d..28947b87d5a4 100755 --- a/offapi/com/sun/star/awt/XAnimation.idl +++ b/offapi/com/sun/star/awt/XAnimation.idl @@ -39,7 +39,7 @@ module com { module sun { module star { module awt { @since OOo 3.4 */ -interface XAnimation +published interface XAnimation { /** starts the animation */ diff --git a/offapi/com/sun/star/awt/XItemEventBroadcaster.idl b/offapi/com/sun/star/awt/XItemEventBroadcaster.idl index ca4bb0727f91..8eb95215eb68 100644 --- a/offapi/com/sun/star/awt/XItemEventBroadcaster.idl +++ b/offapi/com/sun/star/awt/XItemEventBroadcaster.idl @@ -46,7 +46,7 @@ /** registers item listeners at controls like the com::sun::star::awt::Roadmap */ -interface XItemEventBroadcaster: com::sun::star::uno::XInterface +published interface XItemEventBroadcaster: com::sun::star::uno::XInterface { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/awt/XItemList.idl b/offapi/com/sun/star/awt/XItemList.idl index 6419ea94d0b0..7d7a3e52f26d 100644 --- a/offapi/com/sun/star/awt/XItemList.idl +++ b/offapi/com/sun/star/awt/XItemList.idl @@ -34,13 +34,13 @@ module com { module sun { module star { module awt { -interface XItemListListener; +published interface XItemListListener; //================================================================================================================== /** provides convenient access to the list of items in a list box */ -interface XItemList +published interface XItemList { /** is the number of items in the list */ diff --git a/offapi/com/sun/star/awt/XItemListListener.idl b/offapi/com/sun/star/awt/XItemListListener.idl index d41d8b104a02..276fae3d0b00 100644 --- a/offapi/com/sun/star/awt/XItemListListener.idl +++ b/offapi/com/sun/star/awt/XItemListListener.idl @@ -39,7 +39,7 @@ module com { module sun { module star { module awt { /** describes a listener for changes in a item list @see XListItems */ -interface XItemListListener : ::com::sun::star::lang::XEventListener +published interface XItemListListener : ::com::sun::star::lang::XEventListener { /** is called when an item is inserted into the list */ diff --git a/offapi/com/sun/star/awt/XStyleChangeListener.idl b/offapi/com/sun/star/awt/XStyleChangeListener.idl index 819f211a737f..97ef47bfaf23 100644 --- a/offapi/com/sun/star/awt/XStyleChangeListener.idl +++ b/offapi/com/sun/star/awt/XStyleChangeListener.idl @@ -39,7 +39,7 @@ module com { module sun { module star { module awt { @see XStyleSettings */ -interface XStyleChangeListener : ::com::sun::star::lang::XEventListener +published interface XStyleChangeListener : ::com::sun::star::lang::XEventListener { /// called when the style settings of the observed component changed void styleSettingsChanged( [in] com::sun::star::lang::EventObject Event ); diff --git a/offapi/com/sun/star/awt/XStyleSettings.idl b/offapi/com/sun/star/awt/XStyleSettings.idl index 67c3bba7d8f1..bb9525f23703 100644 --- a/offapi/com/sun/star/awt/XStyleSettings.idl +++ b/offapi/com/sun/star/awt/XStyleSettings.idl @@ -35,7 +35,7 @@ module com { module sun { module star { module awt { -interface XStyleChangeListener; +published interface XStyleChangeListener; //================================================================================================================== @@ -53,7 +53,7 @@ interface XStyleChangeListener; while the text is drawn by OpenOffice.org. In this case, the button respects the ButtonRolloverTextColor when painting its text.

    */ -interface XStyleSettings +published interface XStyleSettings { /// specifies the color of the border of active windows [attribute] ::com::sun::star::util::Color ActiveBorderColor; diff --git a/offapi/com/sun/star/awt/XStyleSettingsSupplier.idl b/offapi/com/sun/star/awt/XStyleSettingsSupplier.idl index cb60994ff894..d3622bbc2015 100644 --- a/offapi/com/sun/star/awt/XStyleSettingsSupplier.idl +++ b/offapi/com/sun/star/awt/XStyleSettingsSupplier.idl @@ -32,13 +32,13 @@ module com { module sun { module star { module awt { - interface XStyleSettings; + published interface XStyleSettings; //================================================================================================================== /** provides access to the style settings of a component */ -interface XStyleSettingsSupplier +published interface XStyleSettingsSupplier { [attribute, readonly] XStyleSettings StyleSettings; }; diff --git a/offapi/com/sun/star/awt/XWindowListener2.idl b/offapi/com/sun/star/awt/XWindowListener2.idl index 1313246664ef..bfb0dbab86fe 100644 --- a/offapi/com/sun/star/awt/XWindowListener2.idl +++ b/offapi/com/sun/star/awt/XWindowListener2.idl @@ -39,7 +39,7 @@ module com { module sun { module star { module awt { /** allows receive window-related events, additional to the ones received by an XWindowListener */ -interface XWindowListener2: XWindowListener +published interface XWindowListener2: XWindowListener { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/awt/grid/GridColumnEvent.idl b/offapi/com/sun/star/awt/grid/GridColumnEvent.idl index 22380b944a83..0fe19dfea71a 100644 --- a/offapi/com/sun/star/awt/grid/GridColumnEvent.idl +++ b/offapi/com/sun/star/awt/grid/GridColumnEvent.idl @@ -40,7 +40,7 @@ module com { module sun { module star { module awt { module grid { @since OOo 3.3 */ -struct GridColumnEvent: com::sun::star::lang::EventObject +published struct GridColumnEvent: com::sun::star::lang::EventObject { /** Contains the name of the attributes whose value changed. **/ string AttributeName; diff --git a/offapi/com/sun/star/awt/grid/XGridColumn.idl b/offapi/com/sun/star/awt/grid/XGridColumn.idl index aa69a83441ea..d19225fbc6c2 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumn.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumn.idl @@ -42,7 +42,7 @@ module com { module sun { module star { module awt { module grid { /** The XGridColumn defines the properties and behavior of a column in a grid control @since OOo 3.3 */ -interface XGridColumn +published interface XGridColumn { /** implements life time control for the component */ diff --git a/offapi/com/sun/star/awt/grid/XGridColumnListener.idl b/offapi/com/sun/star/awt/grid/XGridColumnListener.idl index 09ac590ba3f2..be1b0b1714a1 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumnListener.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumnListener.idl @@ -41,7 +41,7 @@ module com { module sun { module star { module awt { module grid { @since OOo 3.3 */ -interface XGridColumnListener : ::com::sun::star::lang::XEventListener +published interface XGridColumnListener : ::com::sun::star::lang::XEventListener { /** Invoked after a column was modified. */ diff --git a/offapi/com/sun/star/document/DocumentEvent.idl b/offapi/com/sun/star/document/DocumentEvent.idl index caa717a8217a..bd22f6fef522 100644 --- a/offapi/com/sun/star/document/DocumentEvent.idl +++ b/offapi/com/sun/star/document/DocumentEvent.idl @@ -51,7 +51,7 @@ module com { module sun { module star { module document { @see XDocumentEventBroadcaster @since OOo 3.1 */ -struct DocumentEvent : ::com::sun::star::lang::EventObject +published struct DocumentEvent : ::com::sun::star::lang::EventObject { /** specifies the name of the event. diff --git a/offapi/com/sun/star/document/EmptyUndoStackException.idl b/offapi/com/sun/star/document/EmptyUndoStackException.idl index e003d6af71b9..476a82bbe705 100755 --- a/offapi/com/sun/star/document/EmptyUndoStackException.idl +++ b/offapi/com/sun/star/document/EmptyUndoStackException.idl @@ -38,7 +38,7 @@ module com { module sun { module star { module document { /** is raised when an operation is attemption at an XUndoManager which requires a non-empty stack of undo actions, and this requirement is not fullfilled. */ -exception EmptyUndoStackException : ::com::sun::star::util::InvalidStateException +published exception EmptyUndoStackException : ::com::sun::star::util::InvalidStateException { }; diff --git a/offapi/com/sun/star/document/UndoContextNotClosedException.idl b/offapi/com/sun/star/document/UndoContextNotClosedException.idl index 4f7d746bad1a..81eeca83c7ac 100755 --- a/offapi/com/sun/star/document/UndoContextNotClosedException.idl +++ b/offapi/com/sun/star/document/UndoContextNotClosedException.idl @@ -38,7 +38,7 @@ module com { module sun { module star { module document { /** is thrown when an operation is attempted at an XUndoManager which requires all undo contexts to be closed, but this requirement is not fullfilled. */ -exception UndoContextNotClosedException : ::com::sun::star::util::InvalidStateException +published exception UndoContextNotClosedException : ::com::sun::star::util::InvalidStateException { }; diff --git a/offapi/com/sun/star/document/UndoFailedException.idl b/offapi/com/sun/star/document/UndoFailedException.idl index 4489ac5a0e0d..65b23148ad37 100755 --- a/offapi/com/sun/star/document/UndoFailedException.idl +++ b/offapi/com/sun/star/document/UndoFailedException.idl @@ -40,7 +40,7 @@ module com { module sun { module star { module document { @see XUndoAction::undo @see XUndoManager::undo */ -exception UndoFailedException : ::com::sun::star::uno::Exception +published exception UndoFailedException : ::com::sun::star::uno::Exception { /** describes the reason why the operation failed. Usually, this member will carry an exception. */ diff --git a/offapi/com/sun/star/document/UndoManagerEvent.idl b/offapi/com/sun/star/document/UndoManagerEvent.idl index e587669e4fbd..163b9c6dd33d 100755 --- a/offapi/com/sun/star/document/UndoManagerEvent.idl +++ b/offapi/com/sun/star/document/UndoManagerEvent.idl @@ -41,7 +41,7 @@ module com { module sun { module star { module document { @see XUndoManagerListener @see XUndoAction */ -struct UndoManagerEvent : ::com::sun::star::lang::EventObject +published struct UndoManagerEvent : ::com::sun::star::lang::EventObject { /** the title of the undo action which is described by the event @see XUndoAction::Title diff --git a/offapi/com/sun/star/document/XDocumentEventBroadcaster.idl b/offapi/com/sun/star/document/XDocumentEventBroadcaster.idl index bd7bbf52722c..7274083fcf1e 100644 --- a/offapi/com/sun/star/document/XDocumentEventBroadcaster.idl +++ b/offapi/com/sun/star/document/XDocumentEventBroadcaster.idl @@ -47,7 +47,7 @@ module com { module sun { module star { module document { -interface XDocumentEventListener; +published interface XDocumentEventListener; //============================================================================= @@ -60,7 +60,7 @@ interface XDocumentEventListener; @see DocumentEvent @since OOo 3.1 */ -interface XDocumentEventBroadcaster +published interface XDocumentEventBroadcaster { /** registers a listener which is notified about document events diff --git a/offapi/com/sun/star/document/XDocumentEventListener.idl b/offapi/com/sun/star/document/XDocumentEventListener.idl index 2fa8e1583f1a..94548e52b578 100644 --- a/offapi/com/sun/star/document/XDocumentEventListener.idl +++ b/offapi/com/sun/star/document/XDocumentEventListener.idl @@ -49,7 +49,7 @@ module com { module sun { module star { module document { @see XDocumentEventBroadcaster @since OOo 3.1 */ -interface XDocumentEventListener : ::com::sun::star::lang::XEventListener +published interface XDocumentEventListener : ::com::sun::star::lang::XEventListener { /** is called whenever a document event occured */ diff --git a/offapi/com/sun/star/document/XUndoAction.idl b/offapi/com/sun/star/document/XUndoAction.idl index b47550a3f52f..e65354013499 100755 --- a/offapi/com/sun/star/document/XUndoAction.idl +++ b/offapi/com/sun/star/document/XUndoAction.idl @@ -38,7 +38,7 @@ module com { module sun { module star { module document { /** represents a single (undoable) action on a document */ -interface XUndoAction +published interface XUndoAction { /** reverts the action represented by the instance diff --git a/offapi/com/sun/star/document/XUndoManager.idl b/offapi/com/sun/star/document/XUndoManager.idl index be43ca899b94..74aa4de0cf70 100755 --- a/offapi/com/sun/star/document/XUndoManager.idl +++ b/offapi/com/sun/star/document/XUndoManager.idl @@ -40,8 +40,8 @@ module com { module sun { module star { module document { -interface XUndoAction; -interface XUndoManagerListener; +published interface XUndoAction; +published interface XUndoManagerListener; //================================================================================================================== @@ -76,7 +76,7 @@ interface XUndoManagerListener; XLockable::unlock methods. When it is locked, then every attempt to add an undo action, or to enter or leave an Undo context, will be silently ignored.

    */ -interface XUndoManager +published interface XUndoManager { /** allows locking the undo manager. */ diff --git a/offapi/com/sun/star/document/XUndoManagerListener.idl b/offapi/com/sun/star/document/XUndoManagerListener.idl index 783e8e7014d8..045e74761794 100755 --- a/offapi/com/sun/star/document/XUndoManagerListener.idl +++ b/offapi/com/sun/star/document/XUndoManagerListener.idl @@ -40,7 +40,7 @@ module com { module sun { module star { module document { @see XUndoManager */ -interface XUndoManagerListener : ::com::sun::star::lang::XEventListener +published interface XUndoManagerListener : ::com::sun::star::lang::XEventListener { /** is called when an undo action is added to the undo stack. diff --git a/offapi/com/sun/star/document/XUndoManagerSupplier.idl b/offapi/com/sun/star/document/XUndoManagerSupplier.idl index 88a082259413..211dd151ecad 100755 --- a/offapi/com/sun/star/document/XUndoManagerSupplier.idl +++ b/offapi/com/sun/star/document/XUndoManagerSupplier.idl @@ -33,13 +33,13 @@ module com { module sun { module star { module document { -interface XUndoManager; +published interface XUndoManager; //================================================================================================================== /** provides access to an XUndoManager. */ -interface XUndoManagerSupplier +published interface XUndoManagerSupplier { /** returns the Undo manager associated with the component. */ diff --git a/offapi/com/sun/star/frame/XController2.idl b/offapi/com/sun/star/frame/XController2.idl index 2c0157d99309..15c6b0ceaa51 100644 --- a/offapi/com/sun/star/frame/XController2.idl +++ b/offapi/com/sun/star/frame/XController2.idl @@ -41,7 +41,7 @@ module com { module sun { module star { module frame { @since OOo 3.0 */ -interface XController2 : XController +published interface XController2 : XController { /** denotes the "root window" of the controller. diff --git a/offapi/com/sun/star/logging/LogRecord.idl b/offapi/com/sun/star/logging/LogRecord.idl index 9d35f351de04..f7a299503322 100644 --- a/offapi/com/sun/star/logging/LogRecord.idl +++ b/offapi/com/sun/star/logging/LogRecord.idl @@ -44,7 +44,7 @@ module com { module sun { module star { module logging { @since OOo 2.3 */ -struct LogRecord +published struct LogRecord { /// specifies the name of the logger at which the record is logged string LoggerName; diff --git a/offapi/com/sun/star/logging/XLogFormatter.idl b/offapi/com/sun/star/logging/XLogFormatter.idl index 4a0e5c68b6ef..a6a3fc9ccf1d 100644 --- a/offapi/com/sun/star/logging/XLogFormatter.idl +++ b/offapi/com/sun/star/logging/XLogFormatter.idl @@ -48,7 +48,7 @@ module com { module sun { module star { module logging { @since OOo 2.3 */ -interface XLogFormatter +published interface XLogFormatter { /** returns the header string for the log diff --git a/offapi/com/sun/star/logging/XLogHandler.idl b/offapi/com/sun/star/logging/XLogHandler.idl index 6bf52bd9f2cd..048e3161c761 100644 --- a/offapi/com/sun/star/logging/XLogHandler.idl +++ b/offapi/com/sun/star/logging/XLogHandler.idl @@ -53,7 +53,7 @@ module com { module sun { module star { module logging { @since OOo 2.3 */ -interface XLogHandler +published interface XLogHandler { /** allows life time control for the handler diff --git a/offapi/com/sun/star/logging/XLogger.idl b/offapi/com/sun/star/logging/XLogger.idl index 74998458af88..b3e6bb1ddce9 100644 --- a/offapi/com/sun/star/logging/XLogger.idl +++ b/offapi/com/sun/star/logging/XLogger.idl @@ -36,7 +36,7 @@ module com { module sun { module star { module logging { -interface XLogHandler; +published interface XLogHandler; //============================================================================= @@ -53,7 +53,7 @@ interface XLogHandler; @since OOo 2.3 */ -interface XLogger +published interface XLogger { /** denotes the name of the logger. */ diff --git a/offapi/com/sun/star/sdb/XSingleSelectQueryAnalyzer.idl b/offapi/com/sun/star/sdb/XSingleSelectQueryAnalyzer.idl index 96041b71e86b..3df97e9fac5c 100644 --- a/offapi/com/sun/star/sdb/XSingleSelectQueryAnalyzer.idl +++ b/offapi/com/sun/star/sdb/XSingleSelectQueryAnalyzer.idl @@ -40,7 +40,7 @@ #endif module com { module sun { module star { module container { -interface XIndexAccess; +published interface XIndexAccess; };};};}; //============================================================================= @@ -55,7 +55,7 @@ interface XIndexAccess; structure of the used query.

    */ -interface XSingleSelectQueryAnalyzer : com::sun::star::uno::XInterface +published interface XSingleSelectQueryAnalyzer : com::sun::star::uno::XInterface { /** returns the query. diff --git a/offapi/com/sun/star/sdb/XSingleSelectQueryComposer.idl b/offapi/com/sun/star/sdb/XSingleSelectQueryComposer.idl index ad609262ecbe..9439959f180e 100644 --- a/offapi/com/sun/star/sdb/XSingleSelectQueryComposer.idl +++ b/offapi/com/sun/star/sdb/XSingleSelectQueryComposer.idl @@ -58,7 +58,7 @@ @see com::sun::star::sdb::SingleSelectQueryComposer */ -interface XSingleSelectQueryComposer: XSingleSelectQueryAnalyzer +published interface XSingleSelectQueryComposer: XSingleSelectQueryAnalyzer { //------------------------------------------------------------------------- // FILTER @@ -211,7 +211,7 @@ interface XSingleSelectQueryComposer: XSingleSelectQueryAnalyzer if a database access error occurs. */ void appendOrderByColumn([in] com::sun::star::beans::XPropertySet column, - [in] boolean ascending) + [in] boolean ascending) raises (com::sun::star::sdbc::SQLException); //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/sdb/XSubDocument.idl b/offapi/com/sun/star/sdb/XSubDocument.idl index 120280fd7ef3..2f9e86b10df6 100644 --- a/offapi/com/sun/star/sdb/XSubDocument.idl +++ b/offapi/com/sun/star/sdb/XSubDocument.idl @@ -40,7 +40,7 @@ module com { module sun { module star { module sdb { @since OOo 3.1 */ -interface XSubDocument +published interface XSubDocument { /** opens the sub document diff --git a/offapi/com/sun/star/sdb/application/XDatabaseDocumentUI.idl b/offapi/com/sun/star/sdb/application/XDatabaseDocumentUI.idl index 088ed540897c..1a5c5ed03077 100644 --- a/offapi/com/sun/star/sdb/application/XDatabaseDocumentUI.idl +++ b/offapi/com/sun/star/sdb/application/XDatabaseDocumentUI.idl @@ -54,7 +54,7 @@ module com { module sun { module star { module sdb { module application { @since OOo 2.2 */ -interface XDatabaseDocumentUI +published interface XDatabaseDocumentUI { /** provides access to the data source belong to the database document */ diff --git a/offapi/com/sun/star/sdb/tools/XConnectionTools.idl b/offapi/com/sun/star/sdb/tools/XConnectionTools.idl index 29e47c597e09..ab9e308fcc5c 100644 --- a/offapi/com/sun/star/sdb/tools/XConnectionTools.idl +++ b/offapi/com/sun/star/sdb/tools/XConnectionTools.idl @@ -37,21 +37,21 @@ module com { module sun { module star { module container { - interface XNameAccess; + published interface XNameAccess; }; module lang { - interface XComponent; + published interface XComponent; }; };};}; //============================================================================= module com { module sun { module star { module sdb { - interface XSingleSelectQueryComposer; + published interface XSingleSelectQueryComposer; module tools { //============================================================================= -interface XTableName; -interface XObjectNames; -interface XDataSourceMetaData; +published interface XTableName; +published interface XObjectNames; +published interface XDataSourceMetaData; //----------------------------------------------------------------------------- /** encapsulates various useful functionality around a @@ -68,7 +68,7 @@ interface XDataSourceMetaData; @since OOo 2.0.4 */ -interface XConnectionTools +published interface XConnectionTools { /** creates an instance supporting the XTableName interface, which can be used to manipulate table names for various purposes. diff --git a/offapi/com/sun/star/sdb/tools/XDataSourceMetaData.idl b/offapi/com/sun/star/sdb/tools/XDataSourceMetaData.idl index b2b00c758250..726b7d712771 100644 --- a/offapi/com/sun/star/sdb/tools/XDataSourceMetaData.idl +++ b/offapi/com/sun/star/sdb/tools/XDataSourceMetaData.idl @@ -36,7 +36,7 @@ module com { module sun { module star { module sdb { module tools { //============================================================================= -interface XDataSourceMetaData +published interface XDataSourceMetaData { /** determines whether the data source supports queries in the FROM part of a SELECT statement. diff --git a/offapi/com/sun/star/sdb/tools/XObjectNames.idl b/offapi/com/sun/star/sdb/tools/XObjectNames.idl index 16b2bae93baa..1925c74f752f 100644 --- a/offapi/com/sun/star/sdb/tools/XObjectNames.idl +++ b/offapi/com/sun/star/sdb/tools/XObjectNames.idl @@ -70,7 +70,7 @@ module com { module sun { module star { module sdb { module tools { @since OOo 2.0.4 */ -interface XObjectNames +published interface XObjectNames { /** suggests a (unique) table or query name diff --git a/offapi/com/sun/star/sdb/tools/XTableName.idl b/offapi/com/sun/star/sdb/tools/XTableName.idl index 48070da02fe6..dfddb75a9933 100644 --- a/offapi/com/sun/star/sdb/tools/XTableName.idl +++ b/offapi/com/sun/star/sdb/tools/XTableName.idl @@ -72,7 +72,7 @@ module com { module sun { module star { module sdb { module tools { @since OOo 2.0.4 */ -interface XTableName +published interface XTableName { /** denotes the name of the catalog which the table is a part of */ diff --git a/offapi/com/sun/star/ui/XToolPanel.idl b/offapi/com/sun/star/ui/XToolPanel.idl index 261f4c20413d..6b485d1b8b51 100644 --- a/offapi/com/sun/star/ui/XToolPanel.idl +++ b/offapi/com/sun/star/ui/XToolPanel.idl @@ -38,7 +38,7 @@ module com { module sun { module star { module ui { /** describes the basic interface to be implemented by a tool panel */ -interface XToolPanel +published interface XToolPanel { /** provides access to the tool panel's main window. diff --git a/offapi/com/sun/star/ui/dialogs/Wizard.idl b/offapi/com/sun/star/ui/dialogs/Wizard.idl index 4e6b13f44ca2..d15819a73281 100644 --- a/offapi/com/sun/star/ui/dialogs/Wizard.idl +++ b/offapi/com/sun/star/ui/dialogs/Wizard.idl @@ -34,13 +34,13 @@ module com { module sun { module star { module ui { module dialogs { -interface XWizardController; +published interface XWizardController; //================================================================================================================== /** provides a framework for implementing a wizard dialog. */ -service Wizard : XWizard +published service Wizard : XWizard { /** creates a wizard with a single execution path @param PageIds diff --git a/offapi/com/sun/star/ui/dialogs/XWizard.idl b/offapi/com/sun/star/ui/dialogs/XWizard.idl index 445f7bbf2a44..debe91072ba4 100644 --- a/offapi/com/sun/star/ui/dialogs/XWizard.idl +++ b/offapi/com/sun/star/ui/dialogs/XWizard.idl @@ -37,7 +37,7 @@ module com { module sun { module star { module ui { module dialogs { //================================================================================================================== -interface XWizardPage; +published interface XWizardPage; /** is the main interface implemented by the Wizard services. @@ -79,7 +79,7 @@ interface XWizardPage; @see XWizardController @see XWizardPage */ -interface XWizard +published interface XWizard { interface XExecutableDialog; diff --git a/offapi/com/sun/star/ui/dialogs/XWizardController.idl b/offapi/com/sun/star/ui/dialogs/XWizardController.idl index 6a51a67360fe..2ada9c1e715d 100644 --- a/offapi/com/sun/star/ui/dialogs/XWizardController.idl +++ b/offapi/com/sun/star/ui/dialogs/XWizardController.idl @@ -37,7 +37,7 @@ module com { module sun { module star { module ui { module dialogs { /** is the interface of a client-provided controller of a custom Wizard. */ -interface XWizardController +published interface XWizardController { /** creates a page diff --git a/offapi/com/sun/star/ui/dialogs/XWizardPage.idl b/offapi/com/sun/star/ui/dialogs/XWizardPage.idl index 149f8c14709b..64b9f807da29 100644 --- a/offapi/com/sun/star/ui/dialogs/XWizardPage.idl +++ b/offapi/com/sun/star/ui/dialogs/XWizardPage.idl @@ -37,7 +37,7 @@ module com { module sun { module star { module ui { module dialogs { /** is a single page of a Wizard */ -interface XWizardPage : ::com::sun::star::lang::XComponent +published interface XWizardPage : ::com::sun::star::lang::XComponent { /** provides read-only access to the window of the page */ diff --git a/offapi/com/sun/star/util/InvalidStateException.idl b/offapi/com/sun/star/util/InvalidStateException.idl index 7d59abbcbac6..3f4b28dbd479 100644 --- a/offapi/com/sun/star/util/InvalidStateException.idl +++ b/offapi/com/sun/star/util/InvalidStateException.idl @@ -37,7 +37,7 @@ module com { module sun { module star { module util { /** is thrown when an object's state does not allow to call requested functionality. */ -exception InvalidStateException : com::sun::star::uno::Exception +published exception InvalidStateException : com::sun::star::uno::Exception { }; diff --git a/offapi/com/sun/star/util/NotLockedException.idl b/offapi/com/sun/star/util/NotLockedException.idl index b0917e0bdca6..9819fde69afd 100755 --- a/offapi/com/sun/star/util/NotLockedException.idl +++ b/offapi/com/sun/star/util/NotLockedException.idl @@ -37,7 +37,7 @@ module com { module sun { module star { module util { /** is raised when attempt is made to unlock a lockable component which actually is not locked. */ -exception NotLockedException : ::com::sun::star::util::InvalidStateException +published exception NotLockedException : ::com::sun::star::util::InvalidStateException { }; diff --git a/offapi/com/sun/star/util/XLockable.idl b/offapi/com/sun/star/util/XLockable.idl index e3da8025a034..0e52cc96cb8b 100755 --- a/offapi/com/sun/star/util/XLockable.idl +++ b/offapi/com/sun/star/util/XLockable.idl @@ -41,7 +41,7 @@ module com { module sun { module star { module util { pairs. As long as there has been one more call to lock than to unlock, the component is considered locked, which is reflected by isLocked returning .

    */ -interface XLockable +published interface XLockable { /** locks the component diff --git a/udkapi/com/sun/star/beans/Pair.idl b/udkapi/com/sun/star/beans/Pair.idl index 0bb214fb87bb..4089300a5a44 100644 --- a/udkapi/com/sun/star/beans/Pair.idl +++ b/udkapi/com/sun/star/beans/Pair.idl @@ -40,7 +40,7 @@ module com { module sun { module star { module beans { @since OOo 3.0 */ -struct Pair { +published struct Pair { /// first object. T First; -- cgit v1.2.3 From f74016fe581e96afec61ecef37920ca81e8767c9 Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Thu, 17 Mar 2011 13:38:39 +0100 Subject: dba34d: check extensions is empty --- connectivity/source/drivers/flat/ETable.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index b18c577030b0..4417c0fe6a7a 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -494,7 +494,8 @@ String OFlatTable::getEntry() // name and extension have to coincide if ( m_pConnection->matchesExtension( sExt ) ) { - sName = sName.replaceAt(sName.getLength()-(sExt.getLength()+1),sExt.getLength()+1,::rtl::OUString()); + if ( sExt.getLength() ) + sName = sName.replaceAt(sName.getLength()-(sExt.getLength()+1),sExt.getLength()+1,::rtl::OUString()); if ( sName == m_Name ) { Reference< XContentAccess > xContentAccess( xDir, UNO_QUERY ); -- cgit v1.2.3 From ac254e099c57010222d8cc25a78796e2e71f490a Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Thu, 17 Mar 2011 14:37:53 +0100 Subject: dba34d: remove patch for date axises --- dbaccess/source/core/misc/DatabaseDataProvider.cxx | 23 ++-------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx index 574139b78f76..dbed20058780 100644 --- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx +++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx @@ -783,7 +783,6 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(sal_Bool _bHasCat } ::std::vector< ::rtl::OUString > aRowLabels; - ::std::vector< double > aDateRowLabels; ::std::vector< ::std::vector< double > > aDataValues; sal_Int32 nRowCount = 0; ::connectivity::ORowSetValue aValue; @@ -792,16 +791,7 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(sal_Bool _bHasCat ++nRowCount; aValue.fill( aColumns[0].nResultSetPosition, aColumns[0].nDataType, xRow ); - switch(aColumns[0].nDataType) - { - case sdbc::DataType::DATE: - case sdbc::DataType::TIMESTAMP: - aDateRowLabels.push_back( aValue.getDouble() ); - break; - default: - aRowLabels.push_back( aValue.getString() ); - break; - } + aRowLabels.push_back( aValue.getString() ); ::std::vector< double > aRow; for ( ColumnDescriptions::const_iterator col = aColumns.begin(); @@ -851,16 +841,7 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(sal_Bool _bHasCat } // if ( !nRowCount ) uno::Reference< chart::XChartDataArray> xData(m_xInternal,uno::UNO_QUERY); - if ( aDateRowLabels.empty() ) - { - xData->setRowDescriptions(uno::Sequence< ::rtl::OUString >(&(*aRowLabels.begin()),aRowLabels.size())); - } - else - { - uno::Reference< chart::XDateCategories> xDate(m_xInternal,uno::UNO_QUERY); - xDate->setDateCategories(uno::Sequence< double >(&(*aDateRowLabels.begin()),aDateRowLabels.size())); - } - + xData->setRowDescriptions(uno::Sequence< ::rtl::OUString >(&(*aRowLabels.begin()),aRowLabels.size())); const size_t nOffset = bFirstColumnIsCategory ? 1 : 0; uno::Sequence< ::rtl::OUString > aColumnDescriptions( aColumns.size() - nOffset ); -- cgit v1.2.3 From 5c31f3d194ca409680d80be1348fb8ce42de1abe Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 17 Mar 2011 15:03:19 +0100 Subject: vcl121: #i117409# fix a typo --- filter/source/pdf/impdialog.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/filter/source/pdf/impdialog.src b/filter/source/pdf/impdialog.src index 35cfa93dd854..e65e4dd5da57 100644 --- a/filter/source/pdf/impdialog.src +++ b/filter/source/pdf/impdialog.src @@ -615,7 +615,7 @@ TabPage RID_PDF_TAB_SECURITY String STR_USER_PWD_PDFA { - Text [en-US] = "PDF doument will not be encrypted due to PDF/A export."; + Text [en-US] = "PDF document will not be encrypted due to PDF/A export."; }; FixedText FT_OWNER_PWD @@ -646,7 +646,7 @@ TabPage RID_PDF_TAB_SECURITY String STR_OWNER_PWD_PDFA { - Text [en-US] = "PDF doument will not be restricted due to PDF/A export."; + Text [en-US] = "PDF document will not be restricted due to PDF/A export."; }; ////////////////////////////// -- cgit v1.2.3 From eb128d9a915cbec73c857301dfcf834dfd3d92b0 Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Thu, 17 Mar 2011 15:10:29 +0100 Subject: sw34bf05: #i102368#: output right alignment of numbering, too --- sw/source/filter/ww8/wrtw8num.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx index e8cb9a755087..57371f8cbdf3 100644 --- a/sw/source/filter/ww8/wrtw8num.cxx +++ b/sw/source/filter/ww8/wrtw8num.cxx @@ -231,8 +231,15 @@ void WW8AttributeOutput::NumberingLevel( sal_uInt8 /*nLevel*/, sal_uInt8 nAlign; switch ( eAdjust ) { - case SVX_ADJUST_CENTER: nAlign = 1; break; - default: nAlign = 0; break; + case SVX_ADJUST_CENTER: + nAlign = 1; + break; + case SVX_ADJUST_RIGHT: + nAlign = 2; + break; + default: + nAlign = 0; + break; } *m_rWW8Export.pTableStrm << nAlign; -- cgit v1.2.3 From 8473229179c9d94720f9822a9a04819d8725b975 Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Fri, 18 Mar 2011 09:31:06 +0100 Subject: dba34d: #i66846# check bookmarable before use statis resultset --- dbaccess/source/core/api/RowSetCache.cxx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index 68ea76e7244c..0ab902c6a52f 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -118,10 +118,11 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs, // first try if the result can be used to do inserts and updates Reference< XPropertySet> xProp(_xRs,UNO_QUERY); Reference< XPropertySetInfo > xPropInfo = xProp->getPropertySetInfo(); + sal_Bool bBookmarkable = sal_False; try { Reference< XResultSetUpdate> xUp(_xRs,UNO_QUERY_THROW); - sal_Bool bBookmarkable = xPropInfo->hasPropertyByName(PROPERTY_ISBOOKMARKABLE) && + bBookmarkable = xPropInfo->hasPropertyByName(PROPERTY_ISBOOKMARKABLE) && any2bool(xProp->getPropertyValue(PROPERTY_ISBOOKMARKABLE)) && Reference< XRowLocate >(_xRs, UNO_QUERY).is(); if ( bBookmarkable ) { @@ -154,10 +155,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs, sal_Bool bAllKeysFound = sal_False; sal_Int32 nTablesCount = 0; - - sal_Bool bNeedKeySet = !(xPropInfo->hasPropertyByName(PROPERTY_ISBOOKMARKABLE) && - any2bool(xProp->getPropertyValue(PROPERTY_ISBOOKMARKABLE)) && Reference< XRowLocate >(_xRs, UNO_QUERY).is() ); - bNeedKeySet = bNeedKeySet || (xPropInfo->hasPropertyByName(PROPERTY_RESULTSETCONCURRENCY) && + sal_Bool bNeedKeySet = !bBookmarkable || (xPropInfo->hasPropertyByName(PROPERTY_RESULTSETCONCURRENCY) && ::comphelper::getINT32(xProp->getPropertyValue(PROPERTY_RESULTSETCONCURRENCY)) == ResultSetConcurrency::READ_ONLY); Reference< XIndexAccess> xUpdateTableKeys; @@ -280,6 +278,16 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs, // oj removed because keyset uses only the next// || (xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_RESULTSETTYPE) && comphelper::getINT32(xProp->getPropertyValue(PROPERTY_RESULTSETTYPE)) == ResultSetType::FORWARD_ONLY) if(!bAllKeysFound ) { + if ( bBookmarkable ) + { + // here I know that we have a read only bookmarable cursor + _xRs->beforeFirst(); + m_nPrivileges = Privilege::SELECT; + m_pCacheSet = new WrappedResultSet(i_nMaxRows); + m_xCacheSet = m_pCacheSet; + m_pCacheSet->construct(_xRs,i_sRowSetFilter); + return; + } m_pCacheSet = new OStaticSet(i_nMaxRows); m_xCacheSet = m_pCacheSet; m_pCacheSet->construct(_xRs,i_sRowSetFilter); -- cgit v1.2.3 From e9e5d2cae62465c44defcc015f873849fdcf5a44 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Fri, 18 Mar 2011 09:55:33 +0100 Subject: fwk167: #i93666# Added separators to the new Vista/7 file dialog --- .../filepicker/IVistaFilePickerInternalNotify.hxx | 2 + .../source/win32/filepicker/VistaFilePicker.cxx | 16 +++---- .../filepicker/VistaFilePickerEventHandler.cxx | 52 +++------------------ .../win32/filepicker/VistaFilePickerImpl.cxx | 53 +++++++++++++++++++++- .../win32/filepicker/VistaFilePickerImpl.hxx | 12 ++++- fpicker/source/win32/filepicker/platform_vista.h | 27 ----------- 6 files changed, 78 insertions(+), 84 deletions(-) diff --git a/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx b/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx index 8f4e0d040f3e..d47c21c40cb2 100644 --- a/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx +++ b/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx @@ -66,6 +66,8 @@ class IVistaFilePickerInternalNotify public: virtual void onAutoExtensionChanged (bool bChecked) = 0; + + virtual bool onFileTypeChanged( UINT nTypeIndex ) = 0; }; }}} diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx b/fpicker/source/win32/filepicker/VistaFilePicker.cxx index 14b185ee2688..f150120e132f 100644 --- a/fpicker/source/win32/filepicker/VistaFilePicker.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePicker.cxx @@ -224,7 +224,7 @@ void SAL_CALL VistaFilePicker::setTitle(const ::rtl::OUString& sTitle) //----------------------------------------------------------------------------------------- void SAL_CALL VistaFilePicker::appendFilter(const ::rtl::OUString& sTitle , - const ::rtl::OUString& sFilter) + const ::rtl::OUString& sFilter) throw(css::lang::IllegalArgumentException, css::uno::RuntimeException ) { @@ -263,17 +263,15 @@ void SAL_CALL VistaFilePicker::setCurrentFilter(const ::rtl::OUString& sTitle) //----------------------------------------------------------------------------------------- void SAL_CALL VistaFilePicker::appendFilterGroup(const ::rtl::OUString& /*sGroupTitle*/, - const css::uno::Sequence< css::beans::StringPair >& lFilters ) + const css::uno::Sequence< css::beans::StringPair >& rFilters ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException ) { - ::sal_Int32 c = lFilters.getLength(); - ::sal_Int32 i = 0; - for (i=0; isetRequest (VistaFilePickerImpl::E_APPEND_FILTERGROUP); + rRequest->setArgument(PROP_FILTER_GROUP, rFilters); + + m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } //----------------------------------------------------------------------------------------- diff --git a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx index 2fadaa6bfdff..f399c55de694 100644 --- a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx @@ -269,33 +269,16 @@ STDMETHODIMP VistaFilePickerEventHandler::OnShareViolation(IFileDialog* } //----------------------------------------------------------------------------------------- -STDMETHODIMP VistaFilePickerEventHandler::OnTypeChange(IFileDialog* /*pDialog*/) +STDMETHODIMP VistaFilePickerEventHandler::OnTypeChange(IFileDialog* pDialog) { - /* - IFileDialogCustomize *iCustomize; - pDialog->QueryInterface(IID_IFileDialogCustomize, (void**)(&iCustomize)); + UINT nFileTypeIndex; + HRESULT hResult = pDialog->GetFileTypeIndex( &nFileTypeIndex ); - BOOL bValue = FALSE; - HRESULT hResult = iCustomize->GetCheckButtonState( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, &bValue); - - if ( bValue ) + if ( hResult == S_OK ) { - UINT nIndex; - - pDialog->GetFileTypeIndex( &nIndex ); - - LPCWSTR lpFilterExt = lFilters[nIndex].pszSpec; - - lpFilterExt = wcschr( lpFilterExt, '.' ); - if ( lpFilterExt ) - lpFilterExt++; - pDialog->SetDefaultExtension( lpFilterExt ); + if ( m_pInternalNotify->onFileTypeChanged( nFileTypeIndex )) + impl_sendEvent(E_CONTROL_STATE_CHANGED, css::ui::dialogs::CommonFilePickerElementIds::LISTBOX_FILTER); } - return S_OK; - - */ - - impl_sendEvent(E_CONTROL_STATE_CHANGED, css::ui::dialogs::CommonFilePickerElementIds::LISTBOX_FILTER); return S_OK; } @@ -334,32 +317,9 @@ STDMETHODIMP VistaFilePickerEventHandler::OnCheckButtonToggled(IFileDialogCustom DWORD nIDCtl , BOOL bChecked ) { - /* - if (nIDCtl == css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION) - { - LPCWSTR lpFilterExt = 0; - if ( bChecked ) - { - UINT nIndex; - if (m_pDialog) - { - m_pDialog->GetFileTypeIndex( &nIndex ); - lpFilterExt = lFilters[nIndex].pszSpec; - lpFilterExt = wcschr( lpFilterExt, '.' ); - if ( lpFilterExt ) - lpFilterExt++; - } - } - - if (m_pDialog) - m_pDialog->SetDefaultExtension( lpFilterExt ); - } - */ - if (nIDCtl == css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION) m_pInternalNotify->onAutoExtensionChanged(bChecked); - impl_sendEvent(E_CONTROL_STATE_CHANGED, static_cast( nIDCtl)); return S_OK; diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx index 677c2bdbfa7d..97afa038fcab 100644 --- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -42,6 +43,8 @@ #endif #include "..\misc\WinImplHelper.hxx" +#include + inline bool is_current_process_window(HWND hwnd) { DWORD pid; @@ -199,6 +202,10 @@ void VistaFilePickerImpl::doRequest(const RequestRef& rRequest) impl_sta_appendFilter(rRequest); break; + case E_APPEND_FILTERGROUP : + impl_sta_appendFilterGroup(rRequest); + break; + case E_SET_CURRENT_FILTER : impl_sta_setCurrentFilter(rRequest); break; @@ -330,6 +337,28 @@ void VistaFilePickerImpl::impl_sta_appendFilter(const RequestRef& rRequest) m_lFilters.addFilter(sTitle, sFilter); } +//------------------------------------------------------------------------------- +void VistaFilePickerImpl::impl_sta_appendFilterGroup(const RequestRef& rRequest) +{ + const css::uno::Sequence< css::beans::StringPair > aFilterGroup = + rRequest->getArgumentOrDefault(PROP_FILTER_GROUP, css::uno::Sequence< css::beans::StringPair >()); + + // SYNCHRONIZED-> + ::rtl::OUString aEmpty; + ::osl::ResettableMutexGuard aLock(m_aMutex); + + if ( m_lFilters.numFilter() > 0 && aFilterGroup.getLength() > 0 ) + m_lFilters.addFilter( STRING_SEPARATOR, aEmpty, sal_True ); + + ::sal_Int32 c = aFilterGroup.getLength(); + ::sal_Int32 i = 0; + for (i=0; isetArgument(PROP_DIALOG_SHOW_RESULT, (::sal_Bool)sal_True); + rRequest->setArgument(PROP_DIALOG_SHOW_RESULT, sal_True); } //------------------------------------------------------------------------------- @@ -1179,6 +1208,23 @@ void VistaFilePickerImpl::impl_SetDefaultExtension( const rtl::OUString& current } } +static void impl_refreshFileDialog( TFileDialog iDialog ) +{ + if ( SUCCEEDED(iDialog->SetFileName(L"")) && + SUCCEEDED(iDialog->SetFileName(L"*.*")) ) + { + IOleWindow* iOleWindow; + if (SUCCEEDED(iDialog->QueryInterface(IID_PPV_ARGS(&iOleWindow)))) + { + HWND hwnd; + if (SUCCEEDED(iOleWindow->GetWindow(&hwnd))) + { + PostMessage(hwnd, WM_COMMAND, IDOK, 0); + } + iOleWindow->Release(); + } + } +} //------------------------------------------------------------------------------- void VistaFilePickerImpl::onAutoExtensionChanged (bool bChecked) @@ -1207,6 +1253,11 @@ void VistaFilePickerImpl::onAutoExtensionChanged (bool bChecked) iDialog->SetDefaultExtension( pExt ); } +bool VistaFilePickerImpl::onFileTypeChanged( UINT /*nTypeIndex*/ ) +{ + return true; +} + } // namespace vista } // namespace win32 } // namespace fpicker diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx index 6be17935609b..201ed9f1764d 100644 --- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx +++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx @@ -104,12 +104,14 @@ static const ::rtl::OUString PROP_TEMPLATE_DESCR = ::rtl::OUString::createF static const ::rtl::OUString PROP_FILTER_TITLE = ::rtl::OUString::createFromAscii("filter_title" ); // [OUString] static const ::rtl::OUString PROP_FILTER_VALUE = ::rtl::OUString::createFromAscii("filter_value" ); // [OUString] static const ::rtl::OUString PROP_FORCE = ::rtl::OUString::createFromAscii("force" ); // [sal_Bool] +static const ::rtl::OUString PROP_FILTER_GROUP = ::rtl::OUString::createFromAscii("filter_group" ); // [seq< css:beans::StringPair >] contains a group of filters static const ::rtl::OUString PROP_CONTROL_ID = ::rtl::OUString::createFromAscii("control_id" ); // [sal_Int16] static const ::rtl::OUString PROP_CONTROL_ACTION = ::rtl::OUString::createFromAscii("control_action" ); // [sal_Int16] static const ::rtl::OUString PROP_CONTROL_VALUE = ::rtl::OUString::createFromAscii("control_value" ); // [Any] static const ::rtl::OUString PROP_CONTROL_LABEL = ::rtl::OUString::createFromAscii("control_label" ); // [OUString] static const ::rtl::OUString PROP_CONTROL_ENABLE = ::rtl::OUString::createFromAscii("control_enable" ); // [sal_Bool] true=ON, false=OFF +static const ::rtl::OUString STRING_SEPARATOR = ::rtl::OUString::createFromAscii("------------------------------------------" ); //----------------------------------------------------------------------------- /** native implementation of the file picker on Vista and upcoming windows versions. @@ -149,7 +151,8 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex E_GET_CONTROL_VALUE, E_SET_CONTROL_LABEL, E_GET_CONTROL_LABEL, - E_ENABLE_CONTROL + E_ENABLE_CONTROL, + E_APPEND_FILTERGROUP }; public: @@ -168,8 +171,11 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex virtual void doRequest(const RequestRef& rRequest); virtual void after(); + //--------------------------------------------------------------------- + // IVistaFilePickerInternalNotify //--------------------------------------------------------------------- virtual void onAutoExtensionChanged (bool bChecked); + virtual bool onFileTypeChanged( UINT nTypeIndex ); private: @@ -185,6 +191,10 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex /// implementation of request E_APPEND_FILTER void impl_sta_appendFilter(const RequestRef& rRequest); + //--------------------------------------------------------------------- + /// implementation of request E_APPEND_FILTERGROUP + void impl_sta_appendFilterGroup(const RequestRef& rRequest); + //--------------------------------------------------------------------- /// implementation of request E_SET_CURRENT_FILTER void impl_sta_setCurrentFilter(const RequestRef& rRequest); diff --git a/fpicker/source/win32/filepicker/platform_vista.h b/fpicker/source/win32/filepicker/platform_vista.h index e8812909f757..553ff811ef5e 100644 --- a/fpicker/source/win32/filepicker/platform_vista.h +++ b/fpicker/source/win32/filepicker/platform_vista.h @@ -47,32 +47,6 @@ #pragma warning(pop) #endif -// ATL/WTL -//#include -//#include -//#include -//extern CAppModule _Module; -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include - -/* -// STL -#include - -// Global functions -LPCTSTR PrepFilterString ( CString& sFilters ); -bool PathFromShellItem ( IShellItem* pItem, CString& sPath ); -bool BuildFilterSpecList ( _U_STRINGorID szFilterList, - std::vector& vecsFilterParts, - std::vector& vecFilters ); -*/ - #if defined _M_IX86 #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") #elif defined _M_IA64 @@ -84,4 +58,3 @@ bool BuildFilterSpecList ( _U_STRINGorID szFilterList, #endif #endif - -- cgit v1.2.3 From 38c9a3de2848de7285ddfb0eaa63817780ff6f5c Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Fri, 18 Mar 2011 10:06:25 +0100 Subject: sw34bf05: #i117339# method - import only files for loading styles in own file format (ODF and OpenOffice.org XML file format) --- sw/source/ui/app/docsh2.cxx | 63 +++++++++++++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 20 deletions(-) mode change 100644 => 100755 sw/source/ui/app/docsh2.cxx diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx old mode 100644 new mode 100755 index 8963a837389c..6fc932bc218e --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -801,7 +801,11 @@ void SwDocShell::Execute(SfxRequest& rReq) const SfxFilter* pFlt = aIter.First(); while( pFlt ) { - if( pFlt && pFlt->IsAllowedAsTemplate() ) + // --> OD #i117339# +// if( pFlt && pFlt->IsAllowedAsTemplate() ) + if( pFlt && pFlt->IsAllowedAsTemplate() && + ( pFlt->GetUserData().EqualsAscii("CXML") || + pFlt->GetUserData().EqualsAscii("CXMLV") ) ) { const String sWild = ((WildCard&)pFlt->GetWildcard()).GetWildCard(); xFltMgr->appendFilter( pFlt->GetUIName(), sWild ); @@ -1861,10 +1865,6 @@ sal_uLong SwDocShell::LoadStylesFromFile( const String& rURL, INetURLObject aURLObj( rURL ); String sURL( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) ); - SwRead pRead = 0; - SwReader* pReader = 0; - SwPaM* pPam = 0; - // Filter bestimmen: // const SfxFilter* pFlt = SwIoSystem::GetFileFilter( rURL, aEmptyStr ); String sFactory(String::CreateFromAscii(SwDocShell::Factory().GetShortName())); @@ -1880,10 +1880,41 @@ sal_uLong SwDocShell::LoadStylesFromFile( const String& rURL, SfxFilterMatcher aWebMatcher( sWebFactory ); aWebMatcher.DetectFilter( aMed, &pFlt, sal_False, sal_False ); } - if( aMed.IsStorage() ) + // --> OD #i117339# - trigger import only for own formats +// if( aMed.IsStorage() ) + bool bImport( false ); + { + if ( aMed.IsStorage() ) + { + // As xStorage = aMed.GetStorage(); + if ( xStorage.is() ) + { + // use on retrieving in order to check, + // if the storage is one of our own ones. + try + { + uno::Reference< beans::XPropertySet > xProps( xStorage, uno::UNO_QUERY_THROW ); + const ::rtl::OUString aMediaTypePropName( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) ); + xProps->getPropertyValue( aMediaTypePropName ); + bImport = true; + } + catch( const uno::Exception& ) + { + bImport = false; + } + } + } + } + if ( bImport ) + // <-- { DBG_ASSERT((pFlt ? pFlt->GetVersion() : 0) >= SOFFICE_FILEFORMAT_60, "which file version?"); - pRead = ReadXML; + SwRead pRead = ReadXML; + SwReader* pReader = 0; + SwPaM* pPam = 0; // the SW3IO - Reader need the pam/wrtshell, because only then he // insert the styles! if( bUnoCall ) @@ -1893,19 +1924,10 @@ sal_uLong SwDocShell::LoadStylesFromFile( const String& rURL, pReader = new SwReader( aMed, rURL, *pPam ); } else + { pReader = new SwReader( aMed, rURL, *pWrtShell->GetCrsr() ); - } - else if( pFlt ) - { -// if( pFlt->GetUserData().EqualsAscii( FILTER_SWG ) || -// pFlt->GetUserData().EqualsAscii( FILTER_SWGV )) -// pRead = ReadSwg; - pReader = new SwReader( aMed, rURL, pDoc ); - } + } - ASSERT( pRead, "no reader found" ); - if( pRead ) - { pRead->GetReaderOpt().SetTxtFmts( rOpt.IsTxtFmts() ); pRead->GetReaderOpt().SetFrmFmts( rOpt.IsFrmFmts() ); pRead->GetReaderOpt().SetPageDescs( rOpt.IsPageDescs() ); @@ -1923,9 +1945,10 @@ sal_uLong SwDocShell::LoadStylesFromFile( const String& rURL, nErr = pReader->Read( *pRead ); pWrtShell->EndAllAction(); } + delete pPam; + delete pReader; } - delete pPam; - delete pReader; + return nErr; } -- cgit v1.2.3 From 1768cff01e1d63687d9ecfedf65b81610dfd71b2 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 18 Mar 2011 13:16:16 +0100 Subject: dba34d: Solaris WaE --- connectivity/source/commontools/FValue.cxx | 3 --- 1 file changed, 3 deletions(-) diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx index 5ea0e601a9c3..6f65547736d9 100644 --- a/connectivity/source/commontools/FValue.cxx +++ b/connectivity/source/commontools/FValue.cxx @@ -795,7 +795,6 @@ bool ORowSetValue::operator==(const ORowSetValue& _rRH) const case DataType::DOUBLE: case DataType::REAL: return getDouble() == _rRH.getDouble(); - break; default: switch(_rRH.m_eTypeKind) { @@ -803,7 +802,6 @@ bool ORowSetValue::operator==(const ORowSetValue& _rRH) const case DataType::DOUBLE: case DataType::REAL: return getDouble() == _rRH.getDouble(); - break; default: break; } @@ -827,7 +825,6 @@ bool ORowSetValue::operator==(const ORowSetValue& _rRH) const ::rtl::OUString aVal1(m_aValue.m_pString); ::rtl::OUString aVal2(_rRH.m_aValue.m_pString); return aVal1 == aVal2; - break; } default: if ( m_bSigned != _rRH.m_bSigned ) -- cgit v1.2.3 From 3e396922c2926165d680e8051c3d9247ea4aaf78 Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Fri, 18 Mar 2011 15:55:57 +0100 Subject: #i117329# - Publishing of UNO types, 4th wave. --- .../com/sun/star/awt/tree/ExpandVetoException.idl | 2 +- .../com/sun/star/awt/tree/MutableTreeDataModel.idl | 2 +- .../com/sun/star/awt/tree/TreeDataModelEvent.idl | 2 +- .../com/sun/star/awt/tree/TreeExpansionEvent.idl | 2 +- .../sun/star/awt/tree/XMutableTreeDataModel.idl | 2 +- offapi/com/sun/star/awt/tree/XMutableTreeNode.idl | 2 +- offapi/com/sun/star/awt/tree/XTreeControl.idl | 2 +- offapi/com/sun/star/awt/tree/XTreeDataModel.idl | 2 +- .../sun/star/awt/tree/XTreeDataModelListener.idl | 2 +- offapi/com/sun/star/awt/tree/XTreeEditListener.idl | 2 +- .../sun/star/awt/tree/XTreeExpansionListener.idl | 2 +- offapi/com/sun/star/awt/tree/XTreeNode.idl | 2 +- .../star/datatransfer/XTransferableSupplier.idl | 2 +- offapi/com/sun/star/drawing/XSlidePreviewCache.idl | 5 ++--- .../star/drawing/framework/AnchorBindingMode.idl | 2 +- .../drawing/framework/ConfigurationChangeEvent.idl | 7 +++---- .../drawing/framework/ResourceActivationMode.idl | 2 +- .../sun/star/drawing/framework/XConfiguration.idl | 4 ++-- .../framework/XConfigurationChangeListener.idl | 2 +- .../framework/XConfigurationChangeRequest.idl | 4 ++-- .../drawing/framework/XConfigurationController.idl | 10 ++++----- .../XConfigurationControllerBroadcaster.idl | 4 ++-- .../XConfigurationControllerRequestQueue.idl | 4 ++-- offapi/com/sun/star/drawing/framework/XPane.idl | 2 +- .../star/drawing/framework/XPaneBorderPainter.idl | 4 ++-- .../com/sun/star/drawing/framework/XResource.idl | 4 ++-- .../star/drawing/framework/XResourceFactory.idl | 6 +++--- .../drawing/framework/XResourceFactoryManager.idl | 6 +++--- .../com/sun/star/drawing/framework/XResourceId.idl | 2 +- offapi/com/sun/star/drawing/framework/XView.idl | 2 +- offapi/com/sun/star/geometry/AffineMatrix2D.idl | 2 +- offapi/com/sun/star/geometry/IntegerSize2D.idl | 2 +- offapi/com/sun/star/geometry/Matrix2D.idl | 2 +- .../com/sun/star/geometry/RealBezierSegment2D.idl | 2 +- offapi/com/sun/star/geometry/RealPoint2D.idl | 2 +- offapi/com/sun/star/geometry/RealRectangle2D.idl | 2 +- offapi/com/sun/star/geometry/RealSize2D.idl | 2 +- offapi/com/sun/star/geometry/XMapping2D.idl | 2 +- .../com/sun/star/rendering/AnimationAttributes.idl | 4 ++-- offapi/com/sun/star/rendering/Caret.idl | 2 +- offapi/com/sun/star/rendering/FillRule.idl | 2 +- offapi/com/sun/star/rendering/FontInfo.idl | 4 ++-- offapi/com/sun/star/rendering/FontMetrics.idl | 6 +++--- offapi/com/sun/star/rendering/FontRequest.idl | 4 ++-- offapi/com/sun/star/rendering/Panose.idl | 2 +- offapi/com/sun/star/rendering/RenderState.idl | 4 ++-- offapi/com/sun/star/rendering/StringContext.idl | 4 ++-- offapi/com/sun/star/rendering/StrokeAttributes.idl | 12 ++--------- offapi/com/sun/star/rendering/TextHit.idl | 2 +- offapi/com/sun/star/rendering/Texture.idl | 6 +++--- offapi/com/sun/star/rendering/ViewState.idl | 4 ++-- .../VolatileContentDestroyedException.idl | 2 +- offapi/com/sun/star/rendering/XAnimatedSprite.idl | 2 +- offapi/com/sun/star/rendering/XAnimation.idl | 2 +- .../sun/star/rendering/XBezierPolyPolygon2D.idl | 4 ++-- offapi/com/sun/star/rendering/XBitmap.idl | 8 +++----- offapi/com/sun/star/rendering/XBitmapCanvas.idl | 2 +- .../com/sun/star/rendering/XBufferController.idl | 4 ++-- offapi/com/sun/star/rendering/XCachedPrimitive.idl | 2 +- offapi/com/sun/star/rendering/XCanvas.idl | 24 +++++++++++----------- offapi/com/sun/star/rendering/XCanvasFont.idl | 10 ++++----- offapi/com/sun/star/rendering/XColorSpace.idl | 10 ++++----- offapi/com/sun/star/rendering/XCustomSprite.idl | 4 ++-- offapi/com/sun/star/rendering/XGraphicDevice.idl | 10 ++++----- .../com/sun/star/rendering/XLinePolyPolygon2D.idl | 2 +- .../star/rendering/XParametricPolyPolygon2D.idl | 4 ++-- offapi/com/sun/star/rendering/XPolyPolygon2D.idl | 2 +- offapi/com/sun/star/rendering/XSprite.idl | 2 +- offapi/com/sun/star/rendering/XSpriteCanvas.idl | 10 ++++----- offapi/com/sun/star/rendering/XTextLayout.idl | 10 ++++----- offapi/com/sun/star/rendering/XVolatileBitmap.idl | 2 +- offapi/com/sun/star/util/TriState.idl | 2 +- .../com/sun/star/view/XMultiSelectionSupplier.idl | 2 +- 73 files changed, 138 insertions(+), 150 deletions(-) diff --git a/offapi/com/sun/star/awt/tree/ExpandVetoException.idl b/offapi/com/sun/star/awt/tree/ExpandVetoException.idl index cbee77879859..b3675f334336 100644 --- a/offapi/com/sun/star/awt/tree/ExpandVetoException.idl +++ b/offapi/com/sun/star/awt/tree/ExpandVetoException.idl @@ -45,7 +45,7 @@ module com { module sun { module star { module awt { module tree { @see XTreeExpansionListener @see XTreeControl */ -exception ExpandVetoException : com::sun::star::util::VetoException +published exception ExpandVetoException : com::sun::star::util::VetoException { /** The event that the exception was created for. */ TreeExpansionEvent Event; diff --git a/offapi/com/sun/star/awt/tree/MutableTreeDataModel.idl b/offapi/com/sun/star/awt/tree/MutableTreeDataModel.idl index 92875a7806d8..8ecf6eba67a4 100644 --- a/offapi/com/sun/star/awt/tree/MutableTreeDataModel.idl +++ b/offapi/com/sun/star/awt/tree/MutableTreeDataModel.idl @@ -44,7 +44,7 @@ module com { module sun { module star { module awt { module tree { /** If you do not want to implement the XTreeDataModel yourself, use this service. This implementation uses MutableTreeNode for its nodes. */ -service MutableTreeDataModel : XMutableTreeDataModel +published service MutableTreeDataModel : XMutableTreeDataModel { }; diff --git a/offapi/com/sun/star/awt/tree/TreeDataModelEvent.idl b/offapi/com/sun/star/awt/tree/TreeDataModelEvent.idl index 380848950e6e..c0210870788f 100644 --- a/offapi/com/sun/star/awt/tree/TreeDataModelEvent.idl +++ b/offapi/com/sun/star/awt/tree/TreeDataModelEvent.idl @@ -50,7 +50,7 @@ module com { module sun { module star { module awt { module tree { @see XTreeControl @see XTreeDataModelListener */ -struct TreeDataModelEvent : ::com::sun::star::lang::EventObject +published struct TreeDataModelEvent : ::com::sun::star::lang::EventObject { /** contains the changed, added or removed nodes.

    All nodes must have ParentNode as parent. */ diff --git a/offapi/com/sun/star/awt/tree/TreeExpansionEvent.idl b/offapi/com/sun/star/awt/tree/TreeExpansionEvent.idl index 20ee645d56e8..524b43dd3e6b 100644 --- a/offapi/com/sun/star/awt/tree/TreeExpansionEvent.idl +++ b/offapi/com/sun/star/awt/tree/TreeExpansionEvent.idl @@ -46,7 +46,7 @@ module com { module sun { module star { module awt { module tree { @see XTreeExpansionListener @see XTreeControl */ -struct TreeExpansionEvent : ::com::sun::star::lang::EventObject +published struct TreeExpansionEvent : ::com::sun::star::lang::EventObject { /* The node that has been expanded/collapsed.*/ com::sun::star::awt::tree::XTreeNode Node; diff --git a/offapi/com/sun/star/awt/tree/XMutableTreeDataModel.idl b/offapi/com/sun/star/awt/tree/XMutableTreeDataModel.idl index b2ef8c65a706..6634a31caaf4 100644 --- a/offapi/com/sun/star/awt/tree/XMutableTreeDataModel.idl +++ b/offapi/com/sun/star/awt/tree/XMutableTreeDataModel.idl @@ -46,7 +46,7 @@ module com { module sun { module star { module awt { module tree {

    Note that only XTreeNode created from the same instance with createNode are valids nodes for this instance.

    */ -interface XMutableTreeDataModel : XTreeDataModel +published interface XMutableTreeDataModel : XTreeDataModel { /** creates a new tree node with the given value and given settings. diff --git a/offapi/com/sun/star/awt/tree/XMutableTreeNode.idl b/offapi/com/sun/star/awt/tree/XMutableTreeNode.idl index 1ecf30290400..fed14b189297 100644 --- a/offapi/com/sun/star/awt/tree/XMutableTreeNode.idl +++ b/offapi/com/sun/star/awt/tree/XMutableTreeNode.idl @@ -47,7 +47,7 @@ module com { module sun { module star { module awt { module tree { /** Represents a mutable tree node as used by the MutableTreeDataModel */ -interface XMutableTreeNode : XTreeNode +published interface XMutableTreeNode : XTreeNode { /** appends ChildNode to this instance. diff --git a/offapi/com/sun/star/awt/tree/XTreeControl.idl b/offapi/com/sun/star/awt/tree/XTreeControl.idl index 7a5e3c11af29..390d2c7a3b0c 100644 --- a/offapi/com/sun/star/awt/tree/XTreeControl.idl +++ b/offapi/com/sun/star/awt/tree/XTreeControl.idl @@ -53,7 +53,7 @@ module com { module sun { module star { module awt { module tree { @see TreeControl */ -interface XTreeControl +published interface XTreeControl { /** This interfaces provides access to the selection of tree nodes for this control. diff --git a/offapi/com/sun/star/awt/tree/XTreeDataModel.idl b/offapi/com/sun/star/awt/tree/XTreeDataModel.idl index 50f6dcae2151..f6eac6b115a3 100644 --- a/offapi/com/sun/star/awt/tree/XTreeDataModel.idl +++ b/offapi/com/sun/star/awt/tree/XTreeDataModel.idl @@ -58,7 +58,7 @@ module com { module sun { module star { module awt { module tree { If you do not need your own model implementation, you can also use the MutableTreeDataModel. */ -interface XTreeDataModel : ::com::sun::star::lang::XComponent +published interface XTreeDataModel : ::com::sun::star::lang::XComponent { /** Returns the root of the tree.

    Returns null only if the tree has no nodes. diff --git a/offapi/com/sun/star/awt/tree/XTreeDataModelListener.idl b/offapi/com/sun/star/awt/tree/XTreeDataModelListener.idl index 5110dac3623e..5925eeab3f5d 100644 --- a/offapi/com/sun/star/awt/tree/XTreeDataModelListener.idl +++ b/offapi/com/sun/star/awt/tree/XTreeDataModelListener.idl @@ -49,7 +49,7 @@ module com { module sun { module star { module awt { module tree { by the TreeControl, but you must notify it correctly if you implement the XTreeDataModel yourself

    . */ -interface XTreeDataModelListener: com::sun::star::lang::XEventListener +published interface XTreeDataModelListener: com::sun::star::lang::XEventListener { /** Invoked after a node (or a set of siblings) has changed in some way. The node(s) have not changed locations in the tree or altered their diff --git a/offapi/com/sun/star/awt/tree/XTreeEditListener.idl b/offapi/com/sun/star/awt/tree/XTreeEditListener.idl index dcaec810dae8..75875c7fbc92 100644 --- a/offapi/com/sun/star/awt/tree/XTreeEditListener.idl +++ b/offapi/com/sun/star/awt/tree/XTreeEditListener.idl @@ -51,7 +51,7 @@ module com { module sun { module star { module awt { module tree {

    You have to set the TreeControlModel::Editable property to before a tree supports editing.

    */ -interface XTreeEditListener : ::com::sun::star::lang::XEventListener +published interface XTreeEditListener : ::com::sun::star::lang::XEventListener { /** This method is called from the TreeControl implementation when editing of Node is requested by calling XTreeControl::startEditingAtNode(). diff --git a/offapi/com/sun/star/awt/tree/XTreeExpansionListener.idl b/offapi/com/sun/star/awt/tree/XTreeExpansionListener.idl index 8b235ff6db28..759e74a40e50 100644 --- a/offapi/com/sun/star/awt/tree/XTreeExpansionListener.idl +++ b/offapi/com/sun/star/awt/tree/XTreeExpansionListener.idl @@ -51,7 +51,7 @@ module com { module sun { module star { module awt { module tree { @see XTreeControl::addTreeExpansionListener @see XTreeControl::removeTreeExpansionListener */ -interface XTreeExpansionListener: com::sun::star::lang::XEventListener +published interface XTreeExpansionListener: com::sun::star::lang::XEventListener { /** Invoked when a node with children on demand is about to be expanded. diff --git a/offapi/com/sun/star/awt/tree/XTreeNode.idl b/offapi/com/sun/star/awt/tree/XTreeNode.idl index b19af432f5d2..e867f40d2bc4 100644 --- a/offapi/com/sun/star/awt/tree/XTreeNode.idl +++ b/offapi/com/sun/star/awt/tree/XTreeNode.idl @@ -47,7 +47,7 @@ module com { module sun { module star { module awt { module tree { information needed to display a hierarchical outline

    Each XTreeNode in a XTreeDataModel must be unique. */ -interface XTreeNode +published interface XTreeNode { /** Returns the child tree node at Index. diff --git a/offapi/com/sun/star/datatransfer/XTransferableSupplier.idl b/offapi/com/sun/star/datatransfer/XTransferableSupplier.idl index 2cf5c4967597..db5e6520614a 100644 --- a/offapi/com/sun/star/datatransfer/XTransferableSupplier.idl +++ b/offapi/com/sun/star/datatransfer/XTransferableSupplier.idl @@ -40,7 +40,7 @@ module com { module sun { module star { module datatransfer { -interface XTransferableSupplier +published interface XTransferableSupplier { //------------------------------------------------------------------------- /** To get access to a transferable representation of a selected part of an object. diff --git a/offapi/com/sun/star/drawing/XSlidePreviewCache.idl b/offapi/com/sun/star/drawing/XSlidePreviewCache.idl index ee40c5f34fa6..eb1cecb7abb9 100644 --- a/offapi/com/sun/star/drawing/XSlidePreviewCache.idl +++ b/offapi/com/sun/star/drawing/XSlidePreviewCache.idl @@ -44,7 +44,6 @@ #include #endif - module com { module sun { module star { module drawing { /** Listener for asynchronous preview creations. Called when a slide @@ -53,7 +52,7 @@ module com { module sun { module star { module drawing { implementor may then call getSlidePreview() a second time to get the up-to-date version of the preview. */ -interface XSlidePreviewCacheListener +published interface XSlidePreviewCacheListener { /** Called by a XSlidePreviewCache object when a preview has been created for the slide with the given index. @@ -77,7 +76,7 @@ interface XSlidePreviewCacheListener order to allow multiple references to a single slide (custom presentations). */ -interface XSlidePreviewCache +published interface XSlidePreviewCache { /** Set the set of slides for which the cache will provide the previews. All slides in the given XIndexAccess are required to come diff --git a/offapi/com/sun/star/drawing/framework/AnchorBindingMode.idl b/offapi/com/sun/star/drawing/framework/AnchorBindingMode.idl index afcea77be685..9a65144514ca 100644 --- a/offapi/com/sun/star/drawing/framework/AnchorBindingMode.idl +++ b/offapi/com/sun/star/drawing/framework/AnchorBindingMode.idl @@ -43,7 +43,7 @@ module com { module sun { module star { module drawing { module framework { anchor a1:a2 which itself is a resource a1 bound to anchor a2. Then r:a1:a2 is bound directly to a1:a2 and indirectly to a2.

    */ -enum AnchorBindingMode +published enum AnchorBindingMode { DIRECT, INDIRECT diff --git a/offapi/com/sun/star/drawing/framework/ConfigurationChangeEvent.idl b/offapi/com/sun/star/drawing/framework/ConfigurationChangeEvent.idl index f5d37a917383..ac4db617ee12 100644 --- a/offapi/com/sun/star/drawing/framework/ConfigurationChangeEvent.idl +++ b/offapi/com/sun/star/drawing/framework/ConfigurationChangeEvent.idl @@ -36,9 +36,8 @@ module com { module sun { module star { module uno { interface XInterface; }; }; module com { module sun { module star { module drawing { module framework { -interface XConfiguration; -interface XConfigurationController; -interface XResourceId; +published interface XConfiguration; +published interface XResourceId; /** Objects of this class are used for notifying changes of the configuration. @@ -53,7 +52,7 @@ interface XResourceId; general guidelines. See XConfigurationController for a list of event types used by the basic drawing framework.

    */ -struct ConfigurationChangeEvent +published struct ConfigurationChangeEvent : ::com::sun::star::lang::EventObject { /** The type of configuration change is a free-form string. This is the diff --git a/offapi/com/sun/star/drawing/framework/ResourceActivationMode.idl b/offapi/com/sun/star/drawing/framework/ResourceActivationMode.idl index a62e47d01302..162d94f2408d 100644 --- a/offapi/com/sun/star/drawing/framework/ResourceActivationMode.idl +++ b/offapi/com/sun/star/drawing/framework/ResourceActivationMode.idl @@ -36,7 +36,7 @@ module com { module sun { module star { module drawing { module framework { whether a requested resource is to replace an existing resource of the same class or is to be activated additionally. */ -enum ResourceActivationMode +published enum ResourceActivationMode { /** A resource is requested in addition to already existing ones. This is used for example for panes. diff --git a/offapi/com/sun/star/drawing/framework/XConfiguration.idl b/offapi/com/sun/star/drawing/framework/XConfiguration.idl index e0af30491710..acbb5ecab0c0 100644 --- a/offapi/com/sun/star/drawing/framework/XConfiguration.idl +++ b/offapi/com/sun/star/drawing/framework/XConfiguration.idl @@ -40,7 +40,7 @@ module com { module sun { module star { module drawing { module framework { -interface XResourceId; +published interface XResourceId; /** A configuration describes the resources of an application like panes, views, and tool bars and their relationships that are currently active @@ -54,7 +54,7 @@ interface XResourceId; @see XConfigurationController */ -interface XConfiguration +published interface XConfiguration : ::com::sun::star::util::XCloneable { /** Returns the list of resources that are bound directly and/or diff --git a/offapi/com/sun/star/drawing/framework/XConfigurationChangeListener.idl b/offapi/com/sun/star/drawing/framework/XConfigurationChangeListener.idl index d487786387b5..742a3141350b 100644 --- a/offapi/com/sun/star/drawing/framework/XConfigurationChangeListener.idl +++ b/offapi/com/sun/star/drawing/framework/XConfigurationChangeListener.idl @@ -41,7 +41,7 @@ module com { module sun { module star { module drawing { module framework { registered at the configuration controller and a configuration change occurs. */ -interface XConfigurationChangeListener +published interface XConfigurationChangeListener : ::com::sun::star::lang::XEventListener { /** The exact time of when a listener is called (before the change takes diff --git a/offapi/com/sun/star/drawing/framework/XConfigurationChangeRequest.idl b/offapi/com/sun/star/drawing/framework/XConfigurationChangeRequest.idl index 8fff19cd27ad..7a37f8e5652d 100644 --- a/offapi/com/sun/star/drawing/framework/XConfigurationChangeRequest.idl +++ b/offapi/com/sun/star/drawing/framework/XConfigurationChangeRequest.idl @@ -37,7 +37,7 @@ module com { module sun { module star { module drawing { module framework { -interface XConfiguration; +published interface XConfiguration; /** A single explicit request for a configuration change. @@ -53,7 +53,7 @@ interface XConfiguration;

    This interface is typically used internally by the XConfigurationController

    @see XConfigurationController */ -interface XConfigurationChangeRequest +published interface XConfigurationChangeRequest { /** Commit the configuration change request represented by the called object to the given configuration. diff --git a/offapi/com/sun/star/drawing/framework/XConfigurationController.idl b/offapi/com/sun/star/drawing/framework/XConfigurationController.idl index f7d01faf44db..9d7630318368 100644 --- a/offapi/com/sun/star/drawing/framework/XConfigurationController.idl +++ b/offapi/com/sun/star/drawing/framework/XConfigurationController.idl @@ -46,10 +46,10 @@ module com { module sun { module star { module drawing { module framework { -interface XConfigurationChangeListener; -interface XConfigurationChangeRequest; -interface XResourceId; -interface XResource; +published interface XConfigurationChangeListener; +published interface XConfigurationChangeRequest; +published interface XResourceId; +published interface XResource; /** The configuration controller is responsible for the management of the set of active resources. @@ -157,7 +157,7 @@ interface XResource; deactivated resource.

*/ -interface XConfigurationController +published interface XConfigurationController { interface XConfigurationControllerRequestQueue; interface XConfigurationControllerBroadcaster; diff --git a/offapi/com/sun/star/drawing/framework/XConfigurationControllerBroadcaster.idl b/offapi/com/sun/star/drawing/framework/XConfigurationControllerBroadcaster.idl index 6da775a13fea..01755f1ab646 100644 --- a/offapi/com/sun/star/drawing/framework/XConfigurationControllerBroadcaster.idl +++ b/offapi/com/sun/star/drawing/framework/XConfigurationControllerBroadcaster.idl @@ -37,13 +37,13 @@ module com { module sun { module star { module drawing { module framework { -interface XConfigurationChangeListener; +published interface XConfigurationChangeListener; /** Manage the set of registered event listeners and the event notification for a configuration controller.

The listeners are called in the order in which they are registered.

*/ -interface XConfigurationControllerBroadcaster +published interface XConfigurationControllerBroadcaster { /** Add a new listener for configuration changes.

The listener is notified only for the specified type of diff --git a/offapi/com/sun/star/drawing/framework/XConfigurationControllerRequestQueue.idl b/offapi/com/sun/star/drawing/framework/XConfigurationControllerRequestQueue.idl index ebd171cb4f23..e993b5befde0 100644 --- a/offapi/com/sun/star/drawing/framework/XConfigurationControllerRequestQueue.idl +++ b/offapi/com/sun/star/drawing/framework/XConfigurationControllerRequestQueue.idl @@ -34,7 +34,7 @@ module com { module sun { module star { module drawing { module framework { -interface XConfigurationChangeRequest; +published interface XConfigurationChangeRequest; /** The request queue of the configuration controller handles requests for changes to the current configuration. @@ -44,7 +44,7 @@ interface XConfigurationChangeRequest; should normally not be necessary for anyone else than the XConfigurationController. It may be removed in the future.

*/ -interface XConfigurationControllerRequestQueue +published interface XConfigurationControllerRequestQueue { /** Return whether there are pending requests for configuration changes. @return diff --git a/offapi/com/sun/star/drawing/framework/XPane.idl b/offapi/com/sun/star/drawing/framework/XPane.idl index ad0bc7dbb791..1126b69bef31 100644 --- a/offapi/com/sun/star/drawing/framework/XPane.idl +++ b/offapi/com/sun/star/drawing/framework/XPane.idl @@ -49,7 +49,7 @@ module com { module sun { module star { module drawing { module framework { parts like title, menu, closer button.

The URL prefix of panes is private:resource/floater

*/ -interface XPane +published interface XPane { interface XResource; diff --git a/offapi/com/sun/star/drawing/framework/XPaneBorderPainter.idl b/offapi/com/sun/star/drawing/framework/XPaneBorderPainter.idl index e9d875897a40..80bd19403244 100644 --- a/offapi/com/sun/star/drawing/framework/XPaneBorderPainter.idl +++ b/offapi/com/sun/star/drawing/framework/XPaneBorderPainter.idl @@ -43,7 +43,7 @@ module com { module sun { module star { module drawing { module framework { /** See XPaneBorderPainter and its addBorder() and removeBorder() methods for an explanation of the border type and its values. */ -enum BorderType +published enum BorderType { INNER_BORDER, OUTER_BORDER, @@ -65,7 +65,7 @@ enum BorderType left corner bitmap is painted with its lower right at the upper left of the center box.

*/ -interface XPaneBorderPainter +published interface XPaneBorderPainter { /** Enlarge the given rectangle by the size of the specified part of the border. This method can be used to convert an inner bounding box diff --git a/offapi/com/sun/star/drawing/framework/XResource.idl b/offapi/com/sun/star/drawing/framework/XResource.idl index c0dbbe95141d..3b3c6a643f4e 100644 --- a/offapi/com/sun/star/drawing/framework/XResource.idl +++ b/offapi/com/sun/star/drawing/framework/XResource.idl @@ -34,12 +34,12 @@ module com { module sun { module star { module drawing { module framework { -interface XResourceId; +published interface XResourceId; /** Base interface that provides functionality shared by all resource types of the drawing framework. */ -interface XResource +published interface XResource { /** Return an XResourceId object for the called resource. The returned id unambiguously indentifies the resource. diff --git a/offapi/com/sun/star/drawing/framework/XResourceFactory.idl b/offapi/com/sun/star/drawing/framework/XResourceFactory.idl index 4bb8b09bc8ad..6b76edad5496 100644 --- a/offapi/com/sun/star/drawing/framework/XResourceFactory.idl +++ b/offapi/com/sun/star/drawing/framework/XResourceFactory.idl @@ -40,8 +40,8 @@ module com { module sun { module star { module drawing { module framework { -interface XResource; -interface XResourceId; +published interface XResource; +published interface XResourceId; /** Factory and possibly cache for creating and releasing resources.

A resource factory is created and used by the @@ -49,7 +49,7 @@ interface XResourceId;

A factory may want to implement a cache to reuse previously released resources.

*/ -interface XResourceFactory +published interface XResourceFactory { /** Create a resource for the given XResourceId object. @param xResourceId diff --git a/offapi/com/sun/star/drawing/framework/XResourceFactoryManager.idl b/offapi/com/sun/star/drawing/framework/XResourceFactoryManager.idl index 1926c38c2774..5865d46257eb 100644 --- a/offapi/com/sun/star/drawing/framework/XResourceFactoryManager.idl +++ b/offapi/com/sun/star/drawing/framework/XResourceFactoryManager.idl @@ -34,8 +34,8 @@ module com { module sun { module star { module drawing { module framework { -interface XResourceId; -interface XResourceFactory; +published interface XResourceId; +published interface XResourceFactory; /** The XResourceFactoryManager is part of the configuration controller and manages the set of registered resource factories. @@ -43,7 +43,7 @@ interface XResourceFactory; @see XConfigurationController @see XResourceFactory */ -interface XResourceFactoryManager +published interface XResourceFactoryManager { /** Register a new resource factory for the given URL.

When one factory is responsible for more than one type of resource diff --git a/offapi/com/sun/star/drawing/framework/XResourceId.idl b/offapi/com/sun/star/drawing/framework/XResourceId.idl index 6d24fbed092f..1f5871f3a8ba 100644 --- a/offapi/com/sun/star/drawing/framework/XResourceId.idl +++ b/offapi/com/sun/star/drawing/framework/XResourceId.idl @@ -55,7 +55,7 @@ module com { module sun { module star { module drawing { module framework { method on its creation. Arguments are only available through the getFullResourceURL(). The getResourceURL() method strips them away.

*/ -interface XResourceId +published interface XResourceId { /** Return the URL of the resource. Arguments supplied on creation are stripped away. Use getFullResourceURL() to access them. diff --git a/offapi/com/sun/star/drawing/framework/XView.idl b/offapi/com/sun/star/drawing/framework/XView.idl index c773cd903a00..3a45919fb316 100644 --- a/offapi/com/sun/star/drawing/framework/XView.idl +++ b/offapi/com/sun/star/drawing/framework/XView.idl @@ -46,7 +46,7 @@ module com { module sun { module star { module drawing { module framework { reference them.

The URL prefix of views is private:resource/view

*/ -interface XView +published interface XView { interface XResource; }; diff --git a/offapi/com/sun/star/geometry/AffineMatrix2D.idl b/offapi/com/sun/star/geometry/AffineMatrix2D.idl index 2a6c65459c4d..5162db83a75b 100644 --- a/offapi/com/sun/star/geometry/AffineMatrix2D.idl +++ b/offapi/com/sun/star/geometry/AffineMatrix2D.idl @@ -67,7 +67,7 @@ module com { module sun { module star { module geometry { @since OOo 2.0 */ -struct AffineMatrix2D +published struct AffineMatrix2D { /// The top, left matrix entry. double m00; diff --git a/offapi/com/sun/star/geometry/IntegerSize2D.idl b/offapi/com/sun/star/geometry/IntegerSize2D.idl index cf3e1a215adb..0f41d2d6a147 100644 --- a/offapi/com/sun/star/geometry/IntegerSize2D.idl +++ b/offapi/com/sun/star/geometry/IntegerSize2D.idl @@ -35,7 +35,7 @@ module com { module sun { module star { module geometry { @since OOo 2.0 */ -struct IntegerSize2D +published struct IntegerSize2D { /// Amount of space occupied in the x direction. long Width; diff --git a/offapi/com/sun/star/geometry/Matrix2D.idl b/offapi/com/sun/star/geometry/Matrix2D.idl index d0e8bf357f2a..7d96b7d2af0b 100644 --- a/offapi/com/sun/star/geometry/Matrix2D.idl +++ b/offapi/com/sun/star/geometry/Matrix2D.idl @@ -70,7 +70,7 @@ module com { module sun { module star { module geometry { @since OOo 2.0 */ -struct Matrix2D +published struct Matrix2D { /// The top, left matrix entry. double m00; diff --git a/offapi/com/sun/star/geometry/RealBezierSegment2D.idl b/offapi/com/sun/star/geometry/RealBezierSegment2D.idl index 6ec7e1b8b83d..83180b1ae4ee 100644 --- a/offapi/com/sun/star/geometry/RealBezierSegment2D.idl +++ b/offapi/com/sun/star/geometry/RealBezierSegment2D.idl @@ -43,7 +43,7 @@ module com { module sun { module star { module geometry { @see com.sun.star.rendering.XBezierPolyPolygon2D @since OOo 2.0 */ -struct RealBezierSegment2D +published struct RealBezierSegment2D { /// The x coordinate of the start point. double Px; diff --git a/offapi/com/sun/star/geometry/RealPoint2D.idl b/offapi/com/sun/star/geometry/RealPoint2D.idl index 1ac34b7a380e..4f9b0fbc8e9f 100644 --- a/offapi/com/sun/star/geometry/RealPoint2D.idl +++ b/offapi/com/sun/star/geometry/RealPoint2D.idl @@ -36,7 +36,7 @@ module com { module sun { module star { module geometry { @since OOo 2.0 */ -struct RealPoint2D +published struct RealPoint2D { /// The x coordinate of the point. double X; diff --git a/offapi/com/sun/star/geometry/RealRectangle2D.idl b/offapi/com/sun/star/geometry/RealRectangle2D.idl index 39cd783f3c08..52e113046e50 100644 --- a/offapi/com/sun/star/geometry/RealRectangle2D.idl +++ b/offapi/com/sun/star/geometry/RealRectangle2D.idl @@ -47,7 +47,7 @@ module com { module sun { module star { module geometry { @since OOo 2.0 */ -struct RealRectangle2D +published struct RealRectangle2D { /// X coordinate of upper left corner . double X1; diff --git a/offapi/com/sun/star/geometry/RealSize2D.idl b/offapi/com/sun/star/geometry/RealSize2D.idl index dab80a5c7deb..a01fa5bd96db 100644 --- a/offapi/com/sun/star/geometry/RealSize2D.idl +++ b/offapi/com/sun/star/geometry/RealSize2D.idl @@ -35,7 +35,7 @@ module com { module sun { module star { module geometry { @since OOo 2.0 */ -struct RealSize2D +published struct RealSize2D { /// Amount of space occupied in the x direction. double Width; diff --git a/offapi/com/sun/star/geometry/XMapping2D.idl b/offapi/com/sun/star/geometry/XMapping2D.idl index 1d2465d91f8e..a9a458579ab9 100644 --- a/offapi/com/sun/star/geometry/XMapping2D.idl +++ b/offapi/com/sun/star/geometry/XMapping2D.idl @@ -50,7 +50,7 @@ module com { module sun { module star { module geometry { @since OOo 2.0 */ -interface XMapping2D : ::com::sun::star::uno::XInterface +published interface XMapping2D : ::com::sun::star::uno::XInterface { /** Forward 2D mapping function */ diff --git a/offapi/com/sun/star/rendering/AnimationAttributes.idl b/offapi/com/sun/star/rendering/AnimationAttributes.idl index 330ec3d75b30..9a5678176b17 100644 --- a/offapi/com/sun/star/rendering/AnimationAttributes.idl +++ b/offapi/com/sun/star/rendering/AnimationAttributes.idl @@ -37,10 +37,10 @@ module com { module sun { module star { module rendering { @since OOo 2.0 */ -struct AnimationAttributes +published struct AnimationAttributes { /// Preferred duration of the animation sequence in seconds. - double Duration; + double Duration; //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/rendering/Caret.idl b/offapi/com/sun/star/rendering/Caret.idl index 8d8999160ac2..7eea3b6dc79f 100644 --- a/offapi/com/sun/star/rendering/Caret.idl +++ b/offapi/com/sun/star/rendering/Caret.idl @@ -36,7 +36,7 @@ module com { module sun { module star { module rendering { @since OOo 2.0 */ -struct Caret +published struct Caret { /** This contains the main caret index.

diff --git a/offapi/com/sun/star/rendering/FillRule.idl b/offapi/com/sun/star/rendering/FillRule.idl index ffea263b4bb3..0959ab0b297b 100644 --- a/offapi/com/sun/star/rendering/FillRule.idl +++ b/offapi/com/sun/star/rendering/FillRule.idl @@ -34,7 +34,7 @@ module com { module sun { module star { module rendering { @since OOo 2.0 */ -enum FillRule +published enum FillRule { /** Fill every area, where, when travelling along a line, the summed winding number (that is, -1 for a diff --git a/offapi/com/sun/star/rendering/FontInfo.idl b/offapi/com/sun/star/rendering/FontInfo.idl index ed2beaba1c5b..16b4714a37e8 100644 --- a/offapi/com/sun/star/rendering/FontInfo.idl +++ b/offapi/com/sun/star/rendering/FontInfo.idl @@ -42,7 +42,7 @@ module com { module sun { module star { module rendering { @since OOo 2.0 */ -struct FontInfo +published struct FontInfo { /** The PANOSE font classification.

@@ -73,7 +73,7 @@ struct FontInfo //------------------------------------------------------------------------- /** This value specifies which unicode ranges are supported by - this font.

+ this font.

This is to be interpreted as a split-up 128bit value, see Adobe's diff --git a/offapi/com/sun/star/rendering/FontMetrics.idl b/offapi/com/sun/star/rendering/FontMetrics.idl index 71b8f9d3dce6..f7beb681b475 100644 --- a/offapi/com/sun/star/rendering/FontMetrics.idl +++ b/offapi/com/sun/star/rendering/FontMetrics.idl @@ -51,7 +51,7 @@ module com { module sun { module star { module rendering { @since OOo 2.0 */ -struct FontMetrics +published struct FontMetrics { /// Ascent (above the baseline) part of the font. double Ascent; @@ -84,14 +84,14 @@ struct FontMetrics characters, and if one needs a font with double character width, the referenceCharSize should be doubled.

*/ - double ReferenceCharSize; + double ReferenceCharSize; //------------------------------------------------------------------------- /** Specifies the offset to be added to the baseline when drawing underlined text. */ - double UnderlineOffset; + double UnderlineOffset; //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/rendering/FontRequest.idl b/offapi/com/sun/star/rendering/FontRequest.idl index b9da5f1425d4..a1727c30ed4e 100644 --- a/offapi/com/sun/star/rendering/FontRequest.idl +++ b/offapi/com/sun/star/rendering/FontRequest.idl @@ -50,7 +50,7 @@ module com { module sun { module star { module rendering { @since OOo 2.0 */ -struct FontRequest +published struct FontRequest { /** The description of the font.

@@ -85,7 +85,7 @@ struct FontRequest query methods, for both XCanvasFont and XTextLayout.

*/ - double CellSize; + double CellSize; //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/rendering/Panose.idl b/offapi/com/sun/star/rendering/Panose.idl index aaf3d3f8da4e..2239f05c8ac0 100644 --- a/offapi/com/sun/star/rendering/Panose.idl +++ b/offapi/com/sun/star/rendering/Panose.idl @@ -29,7 +29,7 @@ module com { module sun { module star { module rendering { -struct Panose +published struct Panose { /// PanoseFamilyTypes byte FamilyType; diff --git a/offapi/com/sun/star/rendering/RenderState.idl b/offapi/com/sun/star/rendering/RenderState.idl index ecb5b169d3a3..1f0cef7843aa 100644 --- a/offapi/com/sun/star/rendering/RenderState.idl +++ b/offapi/com/sun/star/rendering/RenderState.idl @@ -36,7 +36,7 @@ module com { module sun { module star { module rendering { -interface XPolyPolygon2D; +published interface XPolyPolygon2D; /** This structure contains information passed to each XCanvas render operation.

@@ -47,7 +47,7 @@ interface XPolyPolygon2D; @since OOo 2.0 */ -struct RenderState +published struct RenderState { /** The affine transform associated with this render operation.

diff --git a/offapi/com/sun/star/rendering/StringContext.idl b/offapi/com/sun/star/rendering/StringContext.idl index 3f9c833ceb74..28a7e5f50907 100644 --- a/offapi/com/sun/star/rendering/StringContext.idl +++ b/offapi/com/sun/star/rendering/StringContext.idl @@ -38,12 +38,12 @@ module com { module sun { module star { module rendering { @since OOo 2.0 */ -struct StringContext +published struct StringContext { /** The complete text, from which a subset is selected by the parameters below. */ - string Text; + string Text; //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/rendering/StrokeAttributes.idl b/offapi/com/sun/star/rendering/StrokeAttributes.idl index e02d4cf6c89e..e33276796416 100644 --- a/offapi/com/sun/star/rendering/StrokeAttributes.idl +++ b/offapi/com/sun/star/rendering/StrokeAttributes.idl @@ -27,14 +27,6 @@ #ifndef __com_sun_star_rendering_StrokeAttributes_idl__ #define __com_sun_star_rendering_StrokeAttributes_idl__ -#ifndef __com_sun_star_rendering_PathCapType_idl__ -#include -#endif -#ifndef __com_sun_star_rendering_PathJoinType_idl__ -#include -#endif - - module com { module sun { module star { module rendering { /** This structure contains all attributes required for path stroking.

@@ -45,14 +37,14 @@ module com { module sun { module star { module rendering { @single #110496# */ -struct StrokeAttributes +published struct StrokeAttributes { /** Defines the width of the stroke, measured in user coordinate space. This value must be positive (or 0.0) */ - double StrokeWidth; + double StrokeWidth; //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/rendering/TextHit.idl b/offapi/com/sun/star/rendering/TextHit.idl index 2b0c5305b925..bd0783e8c1f3 100644 --- a/offapi/com/sun/star/rendering/TextHit.idl +++ b/offapi/com/sun/star/rendering/TextHit.idl @@ -36,7 +36,7 @@ module com { module sun { module star { module rendering { @since OOo 2.0 */ -struct TextHit +published struct TextHit { /** This contains the entry index.

diff --git a/offapi/com/sun/star/rendering/Texture.idl b/offapi/com/sun/star/rendering/Texture.idl index ea033b3e21a8..43addb55e769 100644 --- a/offapi/com/sun/star/rendering/Texture.idl +++ b/offapi/com/sun/star/rendering/Texture.idl @@ -36,8 +36,8 @@ module com { module sun { module star { module rendering { -interface XBitmap; -interface XParametricPolyPolygon2D; +published interface XBitmap; +published interface XParametricPolyPolygon2D; /** Contains all information needed to define a texture.

@@ -53,7 +53,7 @@ interface XParametricPolyPolygon2D; @since OOo 2.0 */ -struct Texture +published struct Texture { /** Texture transformation from texture to primitive space.

diff --git a/offapi/com/sun/star/rendering/ViewState.idl b/offapi/com/sun/star/rendering/ViewState.idl index fe4de1fc17bf..4791232f5ae4 100644 --- a/offapi/com/sun/star/rendering/ViewState.idl +++ b/offapi/com/sun/star/rendering/ViewState.idl @@ -33,7 +33,7 @@ module com { module sun { module star { module rendering { -interface XPolyPolygon2D; +published interface XPolyPolygon2D; /** This structure contains information considered the view state.

@@ -43,7 +43,7 @@ interface XPolyPolygon2D; @since OOo 2.0 */ -struct ViewState +published struct ViewState { /** The affine transform associated with the view.

diff --git a/offapi/com/sun/star/rendering/VolatileContentDestroyedException.idl b/offapi/com/sun/star/rendering/VolatileContentDestroyedException.idl index 718444f91a25..90517a596c13 100644 --- a/offapi/com/sun/star/rendering/VolatileContentDestroyedException.idl +++ b/offapi/com/sun/star/rendering/VolatileContentDestroyedException.idl @@ -40,7 +40,7 @@ module com { module sun { module star { module rendering { @since OOo 2.0 */ - exception VolatileContentDestroyedException : ::com::sun::star::uno::Exception + published exception VolatileContentDestroyedException : ::com::sun::star::uno::Exception { }; diff --git a/offapi/com/sun/star/rendering/XAnimatedSprite.idl b/offapi/com/sun/star/rendering/XAnimatedSprite.idl index aa10e68f9ae1..9f2f015e113e 100644 --- a/offapi/com/sun/star/rendering/XAnimatedSprite.idl +++ b/offapi/com/sun/star/rendering/XAnimatedSprite.idl @@ -56,7 +56,7 @@ module com { module sun { module star { module rendering { @since OOo 2.0 */ -interface XAnimatedSprite : XSprite +published interface XAnimatedSprite : XSprite { /** Start animation sequence of this sprite.

diff --git a/offapi/com/sun/star/rendering/XAnimation.idl b/offapi/com/sun/star/rendering/XAnimation.idl index 8dd196bb7b6e..861b40c44468 100644 --- a/offapi/com/sun/star/rendering/XAnimation.idl +++ b/offapi/com/sun/star/rendering/XAnimation.idl @@ -60,7 +60,7 @@ module com { module sun { module star { module rendering { @since OOo 2.0 */ -interface XAnimation : ::com::sun::star::uno::XInterface +published interface XAnimation : ::com::sun::star::uno::XInterface { /** Render the animation content at time t into the specified canvas.

diff --git a/offapi/com/sun/star/rendering/XBezierPolyPolygon2D.idl b/offapi/com/sun/star/rendering/XBezierPolyPolygon2D.idl index 8d245d1c00a2..081d516fdcf0 100644 --- a/offapi/com/sun/star/rendering/XBezierPolyPolygon2D.idl +++ b/offapi/com/sun/star/rendering/XBezierPolyPolygon2D.idl @@ -43,7 +43,7 @@ module com { module sun { module star { module rendering { /** This is a specialized interface for a 2D poly-polygon containing - straight line and bezier segments.

+ straight line and bezier segments.

This poly-polygon can contain polygons consisting of a mixture of cubic bezier curves and straight lines. As the straight line is a @@ -56,7 +56,7 @@ module com { module sun { module star { module rendering { @since OOo 2.0 */ -interface XBezierPolyPolygon2D : XPolyPolygon2D +published interface XBezierPolyPolygon2D : XPolyPolygon2D { /** Query subset of this poly-polygon.

diff --git a/offapi/com/sun/star/rendering/XBitmap.idl b/offapi/com/sun/star/rendering/XBitmap.idl index c061d2908f2e..7ba4471118bf 100644 --- a/offapi/com/sun/star/rendering/XBitmap.idl +++ b/offapi/com/sun/star/rendering/XBitmap.idl @@ -45,8 +45,6 @@ module com { module sun { module star { module rendering { -interface XBitmapCanvas; - /** This is a generic interface to a bitmap.

This interface contains the generic functionality to be used on @@ -57,14 +55,14 @@ interface XBitmapCanvas; @since OOo 2.0 */ -interface XBitmap : ::com::sun::star::uno::XInterface +published interface XBitmap : ::com::sun::star::uno::XInterface { /** Query the size of the bitmap.

This method queries the bitmap size in pixel.

@return the bitmap size in pixel. - */ + */ ::com::sun::star::geometry::IntegerSize2D getSize(); //------------------------------------------------------------------------- @@ -80,7 +78,7 @@ interface XBitmap : ::com::sun::star::uno::XInterface @return , if the bitmap has alpha data, or if not. - */ + */ boolean hasAlpha(); //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/rendering/XBitmapCanvas.idl b/offapi/com/sun/star/rendering/XBitmapCanvas.idl index fed3cd4238dc..5931741248d6 100644 --- a/offapi/com/sun/star/rendering/XBitmapCanvas.idl +++ b/offapi/com/sun/star/rendering/XBitmapCanvas.idl @@ -61,7 +61,7 @@ module com { module sun { module star { module rendering { @since OOo 2.0 */ -interface XBitmapCanvas : XCanvas +published interface XBitmapCanvas : XCanvas { /** This method copies a rectangular area from a place of one canvas to a place on another.

diff --git a/offapi/com/sun/star/rendering/XBufferController.idl b/offapi/com/sun/star/rendering/XBufferController.idl index 93bfea9158f3..735582217412 100644 --- a/offapi/com/sun/star/rendering/XBufferController.idl +++ b/offapi/com/sun/star/rendering/XBufferController.idl @@ -44,7 +44,7 @@ module com { module sun { module star { module rendering { @since OOo 2.0 */ -interface XBufferController : ::com::sun::star::uno::XInterface +published interface XBufferController : ::com::sun::star::uno::XInterface { /** Create the given number of background buffers.

@@ -61,7 +61,7 @@ interface XBufferController : ::com::sun::star::uno::XInterface @throws com::sun::star::lang::IllegalArgumentException if nBuffers is smaller than one. - */ + */ long createBuffers( [in] long nBuffers ) raises (com::sun::star::lang::IllegalArgumentException); diff --git a/offapi/com/sun/star/rendering/XCachedPrimitive.idl b/offapi/com/sun/star/rendering/XCachedPrimitive.idl index 9793374ad913..18b18c7133a6 100644 --- a/offapi/com/sun/star/rendering/XCachedPrimitive.idl +++ b/offapi/com/sun/star/rendering/XCachedPrimitive.idl @@ -47,7 +47,7 @@ module com { module sun { module star { module rendering { @since OOo 2.0 */ -interface XCachedPrimitive : ::com::sun::star::uno::XInterface +published interface XCachedPrimitive : ::com::sun::star::uno::XInterface { /** Redraw the cached primitive.

diff --git a/offapi/com/sun/star/rendering/XCanvas.idl b/offapi/com/sun/star/rendering/XCanvas.idl index e731e535d3c9..5a131ce1fbc6 100644 --- a/offapi/com/sun/star/rendering/XCanvas.idl +++ b/offapi/com/sun/star/rendering/XCanvas.idl @@ -76,17 +76,17 @@ module com { module sun { module star { module geometry { - interface XMapping2D; + published interface XMapping2D; }; }; }; }; module com { module sun { module star { module rendering { -interface XCanvasFont; -interface XPolyPolygon2D; -interface XCachedPrimitive; -interface XBitmap; -interface XGraphicDevice; -interface XTextLayout; +published interface XCanvasFont; +published interface XPolyPolygon2D; +published interface XCachedPrimitive; +published interface XBitmap; +published interface XGraphicDevice; +published interface XTextLayout; /** Central interface for rendering.

@@ -150,7 +150,7 @@ interface XTextLayout; @since OOo 2.0 */ -interface XCanvas : ::com::sun::star::uno::XInterface +published interface XCanvas : ::com::sun::star::uno::XInterface { /** Clear the whole canvas area.

@@ -162,7 +162,7 @@ interface XCanvas : ::com::sun::star::uno::XInterface /** Draw a point in device resolution on the device. - @param aPoint + @param aPoint The point to draw. @param aViewState @@ -183,10 +183,10 @@ interface XCanvas : ::com::sun::star::uno::XInterface /** Draw a line in device resolution width (i.e. one device pixel wide). - @param aStartPoint + @param aStartPoint The start point of the line to draw. - @param aEndPoint + @param aEndPoint The end point of the line to draw. @param aViewState @@ -402,7 +402,7 @@ interface XCanvas : ::com::sun::star::uno::XInterface if one of the view and renderstate parameters are outside the specified range. */ - XPolyPolygon2D queryStrokeShapes( [in] XPolyPolygon2D xPolyPolygon, [in] ViewState aViewState, [in] RenderState aRenderState, [in] StrokeAttributes aStrokeAttributes ) + XPolyPolygon2D queryStrokeShapes( [in] XPolyPolygon2D xPolyPolygon, [in] ViewState aViewState, [in] RenderState aRenderState, [in] StrokeAttributes aStrokeAttributes ) raises (com::sun::star::lang::IllegalArgumentException); //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/rendering/XCanvasFont.idl b/offapi/com/sun/star/rendering/XCanvasFont.idl index face4c16cee9..a761c604b18d 100644 --- a/offapi/com/sun/star/rendering/XCanvasFont.idl +++ b/offapi/com/sun/star/rendering/XCanvasFont.idl @@ -59,15 +59,15 @@ module com { module sun { module star { module rendering { -interface XCanvas; -interface XTextLayout; -interface XPolyPolygon2D; +published interface XCanvas; +published interface XTextLayout; +published interface XPolyPolygon2D; /** This interface provides access to a specific, XCanvas-dependent font incarnation. This font is not universally usable, but belongs to the XCanvas it was queried from. */ -interface XCanvasFont : ::com::sun::star::uno::XInterface +published interface XCanvasFont : ::com::sun::star::uno::XInterface { /** Create a text layout interface.

@@ -122,7 +122,7 @@ interface XCanvasFont : ::com::sun::star::uno::XInterface contained in the list returned by this method can lead to visible disturbances.

*/ - sequence< double > getAvailableSizes(); + sequence< double > getAvailableSizes(); //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/rendering/XColorSpace.idl b/offapi/com/sun/star/rendering/XColorSpace.idl index a08295d9565d..5bfb666b30a1 100644 --- a/offapi/com/sun/star/rendering/XColorSpace.idl +++ b/offapi/com/sun/star/rendering/XColorSpace.idl @@ -43,13 +43,13 @@ module com { module sun { module star { module rendering { /// Shorthand for the device-dependent color components, and easier to read -typedef double ColorComponent; -typedef sequence Color; +published typedef double ColorComponent; +published typedef sequence Color; //============================================================================= /// RGB color triplet -struct RGBColor +published struct RGBColor { /// Red component. Valid range is [0,1.0] ColorComponent Red; @@ -62,7 +62,7 @@ struct RGBColor //============================================================================= /// ARGB color quad -struct ARGBColor +published struct ARGBColor { /** Alpha component.

@@ -95,7 +95,7 @@ struct ARGBColor e.g. XIntegerBitmapColorSpace, which use sequences of integers for color representation.

*/ -interface XColorSpace +published interface XColorSpace { /** Query type of this color space.

diff --git a/offapi/com/sun/star/rendering/XCustomSprite.idl b/offapi/com/sun/star/rendering/XCustomSprite.idl index e02f3c62df84..3b6dd45644f4 100644 --- a/offapi/com/sun/star/rendering/XCustomSprite.idl +++ b/offapi/com/sun/star/rendering/XCustomSprite.idl @@ -42,7 +42,7 @@ module com { module sun { module star { module rendering { -interface XCanvas; +published interface XCanvas; /** Interface to control a custom sprite object on a XSpriteCanvas.

@@ -53,7 +53,7 @@ interface XCanvas; TODO: Maybe more than alpha has to be overridden from render state. TODO: Provide means to change the output area */ -interface XCustomSprite : XSprite +published interface XCustomSprite : XSprite { /** Query a render canvas for this sprite's content.

diff --git a/offapi/com/sun/star/rendering/XGraphicDevice.idl b/offapi/com/sun/star/rendering/XGraphicDevice.idl index a9caaefede7e..3a4b03236743 100644 --- a/offapi/com/sun/star/rendering/XGraphicDevice.idl +++ b/offapi/com/sun/star/rendering/XGraphicDevice.idl @@ -54,9 +54,9 @@ module com { module sun { module star { module rendering { -interface XBitmap; -interface XVolatileBitmap; -interface XBufferController; +published interface XBitmap; +published interface XVolatileBitmap; +published interface XBufferController; /* TODO: There's obviously a concept called window missing here, where methods such as bufferController, fullscreen mode etc . belong @@ -78,7 +78,7 @@ interface XBufferController; have this state, it might even be that all windows on the screen share a common graphic device. */ -interface XGraphicDevice : ::com::sun::star::uno::XInterface +published interface XGraphicDevice : ::com::sun::star::uno::XInterface { /** Query the controller for multi buffering functionality on this graphic device. @@ -130,7 +130,7 @@ interface XGraphicDevice : ::com::sun::star::uno::XInterface @param points The points of the poly-polygon, in a separate array for every polygon. */ - XLinePolyPolygon2D createCompatibleLinePolyPolygon( [in] sequence< sequence< ::com::sun::star::geometry::RealPoint2D > > points ); + XLinePolyPolygon2D createCompatibleLinePolyPolygon( [in] sequence< sequence< ::com::sun::star::geometry::RealPoint2D > > points ); //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/rendering/XLinePolyPolygon2D.idl b/offapi/com/sun/star/rendering/XLinePolyPolygon2D.idl index bbd2606297ba..865faec60b9e 100644 --- a/offapi/com/sun/star/rendering/XLinePolyPolygon2D.idl +++ b/offapi/com/sun/star/rendering/XLinePolyPolygon2D.idl @@ -46,7 +46,7 @@ module com { module sun { module star { module rendering { @since OOo 2.0 */ -interface XLinePolyPolygon2D : XPolyPolygon2D +published interface XLinePolyPolygon2D : XPolyPolygon2D { /** Query subset of this poly-polygon, starting at the given polygon and the given point within that polygon, and diff --git a/offapi/com/sun/star/rendering/XParametricPolyPolygon2D.idl b/offapi/com/sun/star/rendering/XParametricPolyPolygon2D.idl index 2102422147d7..c000f69fc65b 100644 --- a/offapi/com/sun/star/rendering/XParametricPolyPolygon2D.idl +++ b/offapi/com/sun/star/rendering/XParametricPolyPolygon2D.idl @@ -52,7 +52,7 @@ module com { module sun { module star { module rendering { [0,1]x[0,1] rectangle. At least that is the dimension expected at other places. e.g. Texture. */ -interface XParametricPolyPolygon2D : ::com::sun::star::uno::XInterface +published interface XParametricPolyPolygon2D : ::com::sun::star::uno::XInterface { /** Query the polygonal outline at the specified value. @@ -67,7 +67,7 @@ interface XParametricPolyPolygon2D : ::com::sun::star::uno::XInterface with t (unless singularities in e.g. the resulting gradient are desired). */ - XPolyPolygon2D getOutline( [in] double t ) + XPolyPolygon2D getOutline( [in] double t ) raises (com::sun::star::lang::IllegalArgumentException); //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/rendering/XPolyPolygon2D.idl b/offapi/com/sun/star/rendering/XPolyPolygon2D.idl index dc99fabee053..ceeed55ec080 100644 --- a/offapi/com/sun/star/rendering/XPolyPolygon2D.idl +++ b/offapi/com/sun/star/rendering/XPolyPolygon2D.idl @@ -49,7 +49,7 @@ module com { module sun { module star { module rendering { @since OOo 2.0 */ -interface XPolyPolygon2D : ::com::sun::star::uno::XInterface +published interface XPolyPolygon2D : ::com::sun::star::uno::XInterface { /** Add the specified poly-polygon at the given position. diff --git a/offapi/com/sun/star/rendering/XSprite.idl b/offapi/com/sun/star/rendering/XSprite.idl index 5ee4eb6dacd7..d62b93bdeb7e 100644 --- a/offapi/com/sun/star/rendering/XSprite.idl +++ b/offapi/com/sun/star/rendering/XSprite.idl @@ -54,7 +54,7 @@ module com { module sun { module star { module rendering { XSpriteCanvas. Sprites are moving, back-buffered objects.

*/ -interface XSprite : ::com::sun::star::uno::XInterface +published interface XSprite : ::com::sun::star::uno::XInterface { /** Set overall transparency of the sprite.

diff --git a/offapi/com/sun/star/rendering/XSpriteCanvas.idl b/offapi/com/sun/star/rendering/XSpriteCanvas.idl index cc534013861a..97d2feaee6c5 100644 --- a/offapi/com/sun/star/rendering/XSpriteCanvas.idl +++ b/offapi/com/sun/star/rendering/XSpriteCanvas.idl @@ -42,9 +42,9 @@ module com { module sun { module star { module rendering { -interface XSprite; -interface XAnimatedSprite; -interface XCustomSprite; +published interface XSprite; +published interface XAnimatedSprite; +published interface XCustomSprite; /** Specialization of a XBitmapCanvas, where moving, animated objects (called sprites) are supported.

@@ -62,7 +62,7 @@ interface XCustomSprite; you don't need sprite functionality, and don't want the updateScreen hassle, simply use the XBitmapCanvas. */ -interface XSpriteCanvas : XBitmapCanvas +published interface XSpriteCanvas : XBitmapCanvas { /** Create a sprite object from the specified animation sequence. A sprite is a back-buffered object with its own, @@ -130,7 +130,7 @@ interface XSpriteCanvas : XBitmapCanvas raises (com::sun::star::lang::IllegalArgumentException); /** Tells the sprite canvas to now update the screen - representation. + representation. Required to display rendered changes to the canvas, and updates to stopped animations and XCustomSprites in diff --git a/offapi/com/sun/star/rendering/XTextLayout.idl b/offapi/com/sun/star/rendering/XTextLayout.idl index 062a1c86a4ba..04b6c4f0103b 100644 --- a/offapi/com/sun/star/rendering/XTextLayout.idl +++ b/offapi/com/sun/star/rendering/XTextLayout.idl @@ -64,9 +64,9 @@ module com { module sun { module star { module rendering { -interface XCanvas; -interface XCanvasFont; -interface XPolyPolygon2D; +published interface XCanvas; +published interface XCanvasFont; +published interface XPolyPolygon2D; /** This is the central interface for text layouting.

@@ -92,7 +92,7 @@ interface XPolyPolygon2D; @since OOo 2.0 */ -interface XTextLayout : ::com::sun::star::uno::XInterface +published interface XTextLayout : ::com::sun::star::uno::XInterface { /** Extract the polygonal shapes of the layouted text.

@@ -107,7 +107,7 @@ interface XTextLayout : ::com::sun::star::uno::XInterface //------------------------------------------------------------------------- /** Query the ink bounding boxes for every glyph in the layouted - text.

+ text.

Ink, or tight bounding boxes in this case means that for e.g. an 'a', the bounding box for the diff --git a/offapi/com/sun/star/rendering/XVolatileBitmap.idl b/offapi/com/sun/star/rendering/XVolatileBitmap.idl index 2597243f5505..e8a30d6f86cd 100644 --- a/offapi/com/sun/star/rendering/XVolatileBitmap.idl +++ b/offapi/com/sun/star/rendering/XVolatileBitmap.idl @@ -36,7 +36,7 @@ module com { module sun { module star { module rendering { /** This is a specialized interface to a volatile bitmap (which can become invalid at any point in time). */ -interface XVolatileBitmap : XBitmap +published interface XVolatileBitmap : XBitmap { /** Query whether this volatile bitmap still has valid content. diff --git a/offapi/com/sun/star/util/TriState.idl b/offapi/com/sun/star/util/TriState.idl index 8b3c0f684e40..322174216f0a 100644 --- a/offapi/com/sun/star/util/TriState.idl +++ b/offapi/com/sun/star/util/TriState.idl @@ -39,7 +39,7 @@ module com { module sun { module star { module util { This enumeration defines three values, , and a don't know value.

*/ -enum TriState +published enum TriState { /** The value is equivalent to . */ diff --git a/offapi/com/sun/star/view/XMultiSelectionSupplier.idl b/offapi/com/sun/star/view/XMultiSelectionSupplier.idl index 3557b3c47fae..249cc53072ec 100644 --- a/offapi/com/sun/star/view/XMultiSelectionSupplier.idl +++ b/offapi/com/sun/star/view/XMultiSelectionSupplier.idl @@ -50,7 +50,7 @@ module com { module sun { module star { module view {

Adding an object more than once to a selection should not toggle the selection for that object but only select it once

*/ -interface XMultiSelectionSupplier: XSelectionSupplier +published interface XMultiSelectionSupplier: XSelectionSupplier { //------------------------------------------------------------------------- -- cgit v1.2.3 From 0f34d16aa1d34415034823a5ee828819c3b258fa Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 18 Mar 2011 17:31:51 +0100 Subject: masterfix from: sb140: #i117456# on Solaris 11 against Solaris 10 baseline, trick python configure into thinking it sees Solaris 10 (transplanted from 6402ce7b0667b255e70c517c4320ecaee2682c56) --- python/Python-2.6.1-sysbase.patch | 13 +++++++++++++ python/makefile.mk | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 python/Python-2.6.1-sysbase.patch diff --git a/python/Python-2.6.1-sysbase.patch b/python/Python-2.6.1-sysbase.patch new file mode 100644 index 000000000000..fb81056c1595 --- /dev/null +++ b/python/Python-2.6.1-sysbase.patch @@ -0,0 +1,13 @@ +--- misc/Python-2.6.1/configure Thu Mar 17 13:00:41 2011 ++++ misc/build/Python-2.6.1/configure Thu Mar 17 12:58:50 2011 +@@ -2042,7 +2042,9 @@ + if test -z "$MACHDEP" + then + ac_sys_system=`uname -s` +- if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \ ++ if test -n "$OOO_SYSBASE_SYS_RELEASE"; then ++ ac_sys_release=$OOO_SYSBASE_SYS_RELEASE ++ elif test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \ + -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then + ac_sys_release=`uname -v` + else diff --git a/python/makefile.mk b/python/makefile.mk index 607ba93ab92d..f1e37729b111 100644 --- a/python/makefile.mk +++ b/python/makefile.mk @@ -50,7 +50,8 @@ TARFILE_MD5=e81c2f0953aa60f8062c05a4673f2be0 PATCH_FILES=\ Python-$(PYVERSION).patch \ Python-parallel-make.patch \ - Python-ssl.patch + Python-ssl.patch \ + Python-2.6.1-sysbase.patch CONFIGURE_DIR= -- cgit v1.2.3 From f2277b6211713d20bb488415ed1e61e86d81b04a Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Fri, 25 Mar 2011 12:41:11 +0100 Subject: #i117080# fix for removal of the userdir --- solenv/gbuild/JunitTest.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/solenv/gbuild/JunitTest.mk b/solenv/gbuild/JunitTest.mk index 5699398241ca..4b6fe5e7fc56 100644 --- a/solenv/gbuild/JunitTest.mk +++ b/solenv/gbuild/JunitTest.mk @@ -43,8 +43,10 @@ $(call gb_JunitTest_get_clean_target,%) : $(call gb_JavaClassSet_get_clean_targe $(call gb_JunitTest_get_target,%) : $(call gb_Output_announce,$*,$(true),JUT,2) $(call gb_Helper_abbreviate_dirs_native,\ + rm -rf $(call gb_JunitTest_get_userdir,$*) && \ mkdir -p $(call gb_JunitTest_get_userdir,$*) && \ - $(gb_JunitTest_JAVACOMMAND) -cp "$(CLASSPATH)" $(DEFS) org.junit.runner.JUnitCore $(CLASSES) 2>&1 > $@.log || (cat $@.log && false)) + $(gb_JunitTest_JAVACOMMAND) -cp "$(CLASSPATH)" $(DEFS) org.junit.runner.JUnitCore $(CLASSES) 2>&1 > $@.log || (cat $@.log && false) && \ + rm -rf $(call gb_JunitTest_get_userdir,$*)) $(CLEAN_CMD) define gb_JunitTest_JunitTest -- cgit v1.2.3 From e31ca485ecf5f8cb4bf547675829931519e209d3 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 18 Mar 2011 17:31:51 +0100 Subject: masterfix from: sb140: #i117456# on Solaris 11 against Solaris 10 baseline, trick python configure into thinking it sees Solaris 10 (transplanted from 6402ce7b0667b255e70c517c4320ecaee2682c56) --- solenv/config/sdev300.ini | 6 ++++++ solenv/config/ssolar.cmn | 1 + 2 files changed, 7 insertions(+) diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini index 441f97ceda50..befa1c6c891f 100644 --- a/solenv/config/sdev300.ini +++ b/solenv/config/sdev300.ini @@ -1459,6 +1459,7 @@ unxsoli4 SOLAR_ENV_ROOT /so/env SOLAR_SOURCE_ROOT %DRIVE_O% SOLAR_SYSBASE_ROOT /so/env/solaris_2.10_intel + OOO_SYSBASE_SYS_RELEASE 5.10 } common1 { @@ -1580,6 +1581,7 @@ unxsoli4 sysbaseroot { SOLAR_SYSBASE_ROOT %SYSBASE_ROOT% + OOO_SYSBASE_SYS_RELEASE } } extern @@ -1722,6 +1724,7 @@ unxsols4 SOLAR_LICENSE_FILE /opt/SUNWspro/license_dir/sunpro.lic,1 SOLAR_SOURCE_ROOT %DRIVE_O% SOLAR_SYSBASE_ROOT /so/env/solaris_2.10_sparc + OOO_SYSBASE_SYS_RELEASE 5.10 } common1 { @@ -1849,6 +1852,7 @@ unxsols4 sysbaseroot { SOLAR_SYSBASE_ROOT %SYSBASE_ROOT% + OOO_SYSBASE_SYS_RELEASE } } extern @@ -1998,6 +2002,7 @@ unxsolu4 SOLAR_ENV_ROOT /so/env SOLAR_SOURCE_ROOT %DRIVE_O% SOLAR_SYSBASE_ROOT /so/env/solaris_2.10_sparc + OOO_SYSBASE_SYS_RELEASE 5.10 } common1 { @@ -2086,6 +2091,7 @@ unxsolu4 sysbaseroot { SOLAR_SYSBASE_ROOT %SYSBASE_ROOT% + OOO_SYSBASE_SYS_RELEASE } } extern diff --git a/solenv/config/ssolar.cmn b/solenv/config/ssolar.cmn index f30fb227fea6..3694c225973c 100644 --- a/solenv/config/ssolar.cmn +++ b/solenv/config/ssolar.cmn @@ -166,6 +166,7 @@ common OLD_CHAOS OOO_JUNIT_JAR OOO_SHELL + OOO_SYSBASE_SYS_RELEASE PACKMS PCLEAN_PATH PKGCONFIG_ROOT -- cgit v1.2.3 From e7a66e693bd25926ec3cc909f8d4c0ca5fa64baf Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 18 Mar 2011 17:36:53 +0100 Subject: masterfix from sb140: #i117457# on Solaris 11 against Solaris 10 baseline, make sure berkeleydb configure sees baseline libs (transplanted from 9d08b963f5867d52d63dc8b5a410ad653c0e73d3) --- berkeleydb/makefile.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/berkeleydb/makefile.mk b/berkeleydb/makefile.mk index b27d483e9e60..b3e6acdb17c6 100644 --- a/berkeleydb/makefile.mk +++ b/berkeleydb/makefile.mk @@ -96,7 +96,7 @@ CONFIGURE_DIR=out #relative to CONFIGURE_DIR CONFIGURE_ACTION= \ ..$/dist$/configure -CONFIGURE_FLAGS=--disable-cxx --enable-dynamic --enable-shared --enable-compat185 +CONFIGURE_FLAGS=--disable-cxx --enable-dynamic --enable-shared --enable-compat185 CC='$(CC) $(SOLARLIB)' .IF "$(OS)"=="MACOSX" CONFIGURE_FLAGS+=CPPFLAGS="$(EXTRA_CDEFS)" .ENDIF -- cgit v1.2.3 From a4c8bf980c1f18804a97c057de23943dc9359286 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 18 Mar 2011 17:38:05 +0100 Subject: masterfix from sb140: #i117458# on Solaris 11 against Solaris 10 baseline, make sure xpdf sees baseline headers (transplanted from 5d89bbbf49f658c5a293b7a81ca1550f6cc8d3d9) --- xpdf/makefile.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xpdf/makefile.mk b/xpdf/makefile.mk index 191eefd50e2b..3205582d969b 100644 --- a/xpdf/makefile.mk +++ b/xpdf/makefile.mk @@ -73,6 +73,9 @@ CXXFLAGS:=-O2 $(ARCH_FLAGS) .ELSE CXXFLAGS:=-O $(ARCH_FLAGS) .ENDIF +.IF "$(SYSBASE)" != "" +CXXFLAGS +:= -I$(SYSBASE)/usr/include +.END LDFLAGS:=$(ARCH_FLAGS) .EXPORT : CFLAGS CXXFLAGS LDFLAGS .ENDIF -- cgit v1.2.3 From 3d9ee575a207f478f297f022f238a0fde973e1b5 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 21 Mar 2011 14:06:29 +0100 Subject: test123l10n04: #i117489# rename ns to nso --- solenv/inc/langlist.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/solenv/inc/langlist.mk b/solenv/inc/langlist.mk index e3ac2e5065ff..d550298e9b45 100644 --- a/solenv/inc/langlist.mk +++ b/solenv/inc/langlist.mk @@ -102,7 +102,6 @@ nb \ nl \ nn \ nr \ -ns \ nso \ om \ oms \ -- cgit v1.2.3 From 74c7de5d3c221b86e77e5eb50014e117f0317961 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 21 Mar 2011 14:07:54 +0100 Subject: test123l10n04: #i117489# rename ns to nso --- setup_native/source/win32/msi-encodinglist.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup_native/source/win32/msi-encodinglist.txt b/setup_native/source/win32/msi-encodinglist.txt index ebfe9371f59f..c4f22f50a939 100644 --- a/setup_native/source/win32/msi-encodinglist.txt +++ b/setup_native/source/win32/msi-encodinglist.txt @@ -83,7 +83,7 @@ nl 1252 1043 nn 1252 2068 no 1252 1044 nr 0 1580 # Ndebele South -ns 0 1132 # Northern Sotho (Sepedi) +nso 0 1132 # Northern Sotho (Sepedi) oc 1252 1154 # Occitan-lengadocian om 0 2162 or 0 1096 # Oriya -- cgit v1.2.3 From 3b8a5089df071a9e17cf140c6b90f020c10cacd2 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 21 Mar 2011 14:14:28 +0100 Subject: test123l10n04: path fixed --- l10ntools/scripts/localize.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l10ntools/scripts/localize.pl b/l10ntools/scripts/localize.pl index e432869d3a7b..6dac386011e0 100755 --- a/l10ntools/scripts/localize.pl +++ b/l10ntools/scripts/localize.pl @@ -175,7 +175,7 @@ sub splitfile{ exit( -1 ); } my $src_root = $ENV{SOURCE_ROOT_DIR}; - my $ooo_src_root = $src_root."/l10n/l10n"; + my $ooo_src_root = $src_root."/l10n"; my $so_l10n_path = $src_root."/sun/l10n_so/source"; my $ooo_l10n_path = $ooo_src_root."/l10n/source"; -- cgit v1.2.3 From 86528b0c6b49e25d38f40f2bfec468a4d13e9100 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 21 Mar 2011 15:01:58 +0100 Subject: CWS fwk167: #i117366# - move resources from sfx2 to sd and sc --- sfx2/source/appl/sfx.src | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/sfx2/source/appl/sfx.src b/sfx2/source/appl/sfx.src index 3bca517c5fd5..746b4c9688d6 100644 --- a/sfx2/source/appl/sfx.src +++ b/sfx2/source/appl/sfx.src @@ -27,19 +27,6 @@ #include -String STR_STYLE_FILTER_USED -{ - Text [ en-US ] = "Applied Styles" ; -}; -String STR_STYLE_FILTER_USERDEF -{ - Text [ en-US ] = "Custom Styles" ; -}; -String STR_STYLE_FILTER_ALL -{ - Text [ en-US ] = "All Styles" ; -}; - String STR_ACCTITLE_PRODUCTIVITYTOOLS { Text [ en-US ] = "%PRODUCTNAME"; -- cgit v1.2.3 From 7b2ad5806cd60da8ffa26a4977f4526f559db6bc Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 21 Mar 2011 15:01:58 +0100 Subject: CWS fwk167: #i117366# - move resources from sfx2 to sd and sc --- sc/source/ui/styleui/scstyles.src | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/sc/source/ui/styleui/scstyles.src b/sc/source/ui/styleui/scstyles.src index 1968b6dca877..efb335189187 100644 --- a/sc/source/ui/styleui/scstyles.src +++ b/sc/source/ui/styleui/scstyles.src @@ -31,6 +31,19 @@ StyleFamily = family; \ FilterList = { filter } +String STR_STYLE_FILTER_USED +{ + Text [ en-US ] = "Applied Styles" ; +}; +String STR_STYLE_FILTER_USERDEF +{ + Text [ en-US ] = "Custom Styles" ; +}; +String STR_STYLE_FILTER_ALL +{ + Text [ en-US ] = "All Styles" ; +}; + //------------------------------------------------------------------------ SfxStyleFamilies DLG_STYLE_DESIGNER { @@ -39,16 +52,16 @@ SfxStyleFamilies DLG_STYLE_DESIGNER SfxStyleFamilyItem { IMPL_FAMILY ( SFX_STYLE_FAMILY_PARA , - < STR_STYLE_FILTER_ALL ; SFXSTYLEBIT_ALL ; > ; - < STR_STYLE_FILTER_USED ; SFXSTYLEBIT_USED ; > ; - < STR_STYLE_FILTER_USERDEF ; SFXSTYLEBIT_USERDEF ; > ; ) ; + < "All Styles" ; SFXSTYLEBIT_ALL ; > ; + < "Applied Styles" ; SFXSTYLEBIT_USED ; > ; + < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ; ) ; Text [ en-US ] = "Cell Styles" ; }; SfxStyleFamilyItem { IMPL_FAMILY ( SFX_STYLE_FAMILY_PAGE , - < STR_STYLE_FILTER_ALL ; SFXSTYLEBIT_ALL ; > ; - < STR_STYLE_FILTER_USERDEF ; SFXSTYLEBIT_USERDEF ; > ; ) ; + < "All Styles" ; SFXSTYLEBIT_ALL ; > ; + < "Applied Styles" ; SFXSTYLEBIT_USERDEF ; > ; ) ; Text [ en-US ] = "Page Styles" ; }; }; -- cgit v1.2.3 From 923962dd1d43910471a3d8dccff4f7c92994cedb Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 21 Mar 2011 15:01:58 +0100 Subject: CWS fwk167: #i117366# - move resources from sfx2 to sd and sc --- sd/source/ui/app/res_bmp.src | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/sd/source/ui/app/res_bmp.src b/sd/source/ui/app/res_bmp.src index 0901e53df0ed..be6c9258fec2 100755 --- a/sd/source/ui/app/res_bmp.src +++ b/sd/source/ui/app/res_bmp.src @@ -403,6 +403,19 @@ Image IMG_REMOVEALLBMP_H #define SfxStyleFamiliesRes2\ Text [ en-US ] = "Presentation Styles" ;\ +String STR_STYLE_FILTER_USED +{ + Text [ en-US ] = "Applied Styles" ; +}; +String STR_STYLE_FILTER_USERDEF +{ + Text [ en-US ] = "Custom Styles" ; +}; +String STR_STYLE_FILTER_ALL +{ + Text [ en-US ] = "All Styles" ; +}; + SfxStyleFamilies DLG_STYLE_DESIGNER { StyleFamilyList = @@ -413,9 +426,9 @@ SfxStyleFamilies DLG_STYLE_DESIGNER StyleFamily = SFX_STYLE_FAMILY_PARA ; FilterList = { - < STR_STYLE_FILTER_ALL ; SFXSTYLEBIT_ALL ; > ; - < STR_STYLE_FILTER_USED ; SFXSTYLEBIT_USED ; > ; - < STR_STYLE_FILTER_USERDEF ; SFXSTYLEBIT_USERDEF ; > ; + < "All Styles" ; SFXSTYLEBIT_ALL ; > ; + < "Applied Styles" ; SFXSTYLEBIT_USED ; > ; + < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ; }; }; SfxStyleFamilyItem RID_PRESENTATIONSTYLEFAMILY @@ -424,7 +437,7 @@ SfxStyleFamilies DLG_STYLE_DESIGNER StyleFamily = SFX_STYLE_FAMILY_PSEUDO ; FilterList = { - < STR_STYLE_FILTER_ALL ; SFXSTYLEBIT_ALL ; > ; + < "All Styles" ; SFXSTYLEBIT_ALL ; > ; }; }; }; -- cgit v1.2.3 From 116bcf73991899a9988729c663a778c67be70dde Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 21 Mar 2011 15:03:07 +0100 Subject: CWS fwk167: #i117487# - use correct resource manager for error handlers --- sfx2/source/appl/appdata.cxx | 2 ++ sfx2/source/appl/appinit.cxx | 11 +++++------ sfx2/source/appl/appquit.cxx | 2 ++ sfx2/source/inc/appdata.hxx | 3 ++- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx index 71a6fc269c11..2914c648bfe9 100644 --- a/sfx2/source/appl/appdata.cxx +++ b/sfx2/source/appl/appdata.cxx @@ -98,6 +98,8 @@ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* ) : pTopFrames( new SfxFrameArr_Impl ), pInitLinkList(0), pMatcher( 0 ), + pBasicResMgr( 0 ), + pSvtResMgr( 0 ), pAppDispatch(NULL), pTemplates( 0 ), pPool(0), diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index d9ff26beccba..ba23e04cad12 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -262,12 +262,11 @@ bool SfxApplication::Initialize_Impl() // nichtgehandelte Fehler durch Errorcode 1 an SFX gegeben. new SimpleErrorHandler; #endif - new SfxErrorHandler(RID_ERRHDL, ERRCODE_AREA_TOOLS, ERRCODE_AREA_LIB1); - - new SfxErrorHandler( - RID_SO_ERROR_HANDLER, ERRCODE_AREA_SO, ERRCODE_AREA_SO_END); - new SfxErrorHandler( - RID_BASIC_START, ERRCODE_AREA_SBX, ERRCODE_AREA_SBX_END ); + pAppData_Impl->pBasicResMgr = CreateResManager("sb"); + pAppData_Impl->pSvtResMgr = CreateResManager("svt"); + new SfxErrorHandler( RID_ERRHDL, ERRCODE_AREA_TOOLS, ERRCODE_AREA_LIB1 ); + new SfxErrorHandler( RID_SO_ERROR_HANDLER, ERRCODE_AREA_SO, ERRCODE_AREA_SO_END, pAppData_Impl->pSvtResMgr ); + new SfxErrorHandler( RID_BASIC_START, ERRCODE_AREA_SBX, ERRCODE_AREA_SBX_END, pAppData_Impl->pBasicResMgr ); // diverse Pointer SfxPickList::GetOrCreate( SvtHistoryOptions().GetSize( ePICKLIST ) ); diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx index 351376091929..1a62f48a7a24 100644 --- a/sfx2/source/appl/appquit.cxx +++ b/sfx2/source/appl/appquit.cxx @@ -167,4 +167,6 @@ void SfxApplication::Deinitialize() NoChaos::ReleaseItemPool(); */ pAppData_Impl->pPool = NULL; + DELETEZ(pAppData_Impl->pBasicResMgr); + DELETEZ(pAppData_Impl->pSvtResMgr); } diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx index 7da892ca89c9..92a56655a27d 100644 --- a/sfx2/source/inc/appdata.hxx +++ b/sfx2/source/inc/appdata.hxx @@ -110,7 +110,8 @@ public: // application members SfxFilterMatcher* pMatcher; - ResMgr* pLabelResMgr; + ResMgr* pBasicResMgr; + ResMgr* pSvtResMgr; SfxStatusDispatcher* pAppDispatch; SfxDocumentTemplates* pTemplates; -- cgit v1.2.3 From 768b52b3d5443a5bbeaf8e585790ba795b39bd23 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 21 Mar 2011 15:12:52 +0100 Subject: CWS fwk167: #i117366# - move resources from sfx2 to sd and sc --- sc/source/ui/styleui/scstyles.src | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sc/source/ui/styleui/scstyles.src b/sc/source/ui/styleui/scstyles.src index efb335189187..07e4dbd85151 100644 --- a/sc/source/ui/styleui/scstyles.src +++ b/sc/source/ui/styleui/scstyles.src @@ -52,16 +52,16 @@ SfxStyleFamilies DLG_STYLE_DESIGNER SfxStyleFamilyItem { IMPL_FAMILY ( SFX_STYLE_FAMILY_PARA , - < "All Styles" ; SFXSTYLEBIT_ALL ; > ; - < "Applied Styles" ; SFXSTYLEBIT_USED ; > ; - < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ; ) ; + < STR_STYLE_FILTER_ALL ; SFXSTYLEBIT_ALL ; > ; + < STR_STYLE_FILTER_USED ; SFXSTYLEBIT_USED ; > ; + < STR_STYLE_FILTER_USERDEF ; SFXSTYLEBIT_USERDEF ; > ; ) ; Text [ en-US ] = "Cell Styles" ; }; SfxStyleFamilyItem { IMPL_FAMILY ( SFX_STYLE_FAMILY_PAGE , - < "All Styles" ; SFXSTYLEBIT_ALL ; > ; - < "Applied Styles" ; SFXSTYLEBIT_USERDEF ; > ; ) ; + < STR_STYLE_FILTER_ALL ; SFXSTYLEBIT_ALL ; > ; + < STR_STYLE_FILTER_USERDEF ; SFXSTYLEBIT_USERDEF ; > ; ) ; Text [ en-US ] = "Page Styles" ; }; }; -- cgit v1.2.3 From 52090913e44d51bcc49ff1a8f3c8fe6c39e6b219 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 21 Mar 2011 15:12:52 +0100 Subject: CWS fwk167: #i117366# - move resources from sfx2 to sd and sc --- sd/source/ui/app/res_bmp.src | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sd/source/ui/app/res_bmp.src b/sd/source/ui/app/res_bmp.src index be6c9258fec2..52a988f08aa6 100755 --- a/sd/source/ui/app/res_bmp.src +++ b/sd/source/ui/app/res_bmp.src @@ -426,9 +426,9 @@ SfxStyleFamilies DLG_STYLE_DESIGNER StyleFamily = SFX_STYLE_FAMILY_PARA ; FilterList = { - < "All Styles" ; SFXSTYLEBIT_ALL ; > ; - < "Applied Styles" ; SFXSTYLEBIT_USED ; > ; - < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ; + < STR_STYLE_FILTER_ALL ; SFXSTYLEBIT_ALL ; > ; + < STR_STYLE_FILTER_USED ; SFXSTYLEBIT_USED ; > ; + < STR_STYLE_FILTER_USERDEF ; SFXSTYLEBIT_USERDEF ; > ; }; }; SfxStyleFamilyItem RID_PRESENTATIONSTYLEFAMILY @@ -437,7 +437,7 @@ SfxStyleFamilies DLG_STYLE_DESIGNER StyleFamily = SFX_STYLE_FAMILY_PSEUDO ; FilterList = { - < "All Styles" ; SFXSTYLEBIT_ALL ; > ; + < STR_STYLE_FILTER_ALL ; SFXSTYLEBIT_ALL ; > ; }; }; }; @@ -505,4 +505,4 @@ Bitmap BMP_COMMENTS_INDICATOR Bitmap BMP_COMMENTS_INDICATOR_H { File = "comments_indicator_hc.bmp"; -}; \ No newline at end of file +}; -- cgit v1.2.3 From 77c6a8e3ac106240b9fca715affedd5280c1367e Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Tue, 22 Mar 2011 10:24:28 +0100 Subject: ause127: #i117375# avoid hard links in python build --- python/Python-2.6.1-nohardlink.patch | 20 ++++++++++++++++++++ python/makefile.mk | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 python/Python-2.6.1-nohardlink.patch diff --git a/python/Python-2.6.1-nohardlink.patch b/python/Python-2.6.1-nohardlink.patch new file mode 100644 index 000000000000..c552b1a0e126 --- /dev/null +++ b/python/Python-2.6.1-nohardlink.patch @@ -0,0 +1,20 @@ +--- misc/Python-2.6.1/Makefile.pre.in 2011-03-08 18:23:37.230410480 +0100 ++++ misc/build/Python-2.6.1/Makefile.pre.in 2011-03-08 18:22:57.935746999 +0100 +@@ -414,7 +414,7 @@ + libpython$(VERSION).so: $(LIBRARY_OBJS) + if test $(INSTSONAME) != $(LDLIBRARY); then \ + $(LDSHARED) $(LDFLAGS) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ +- $(LN) -f $(INSTSONAME) $@; \ ++ $(LN) -fs $(INSTSONAME) $@; \ + else\ + $(LDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ + fi +@@ -767,7 +767,7 @@ + then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \ + else true; \ + fi +- (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON)) ++ (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(EXE) $(PYTHON)) + -rm -f $(DESTDIR)$(BINDIR)/python-config + (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python-config) + diff --git a/python/makefile.mk b/python/makefile.mk index 607ba93ab92d..806830033d35 100644 --- a/python/makefile.mk +++ b/python/makefile.mk @@ -50,7 +50,8 @@ TARFILE_MD5=e81c2f0953aa60f8062c05a4673f2be0 PATCH_FILES=\ Python-$(PYVERSION).patch \ Python-parallel-make.patch \ - Python-ssl.patch + Python-ssl.patch \ + Python-2.6.1-nohardlink.patch CONFIGURE_DIR= -- cgit v1.2.3 From 0cab3da5063c3f4e87577c164f8dfba4ed9455eb Mon Sep 17 00:00:00 2001 From: va Date: Tue, 22 Mar 2011 13:40:22 +0100 Subject: #i108049# Added Lithuanian AutoCorrection File --- extras/source/autotext/lang/lt-LT/acor_lt-LT.dat | Bin 0 -> 3208 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 extras/source/autotext/lang/lt-LT/acor_lt-LT.dat diff --git a/extras/source/autotext/lang/lt-LT/acor_lt-LT.dat b/extras/source/autotext/lang/lt-LT/acor_lt-LT.dat new file mode 100644 index 000000000000..d638ff34c57b Binary files /dev/null and b/extras/source/autotext/lang/lt-LT/acor_lt-LT.dat differ -- cgit v1.2.3 From d533b4e5b628ae5c5d4b8881685872fe95580b6d Mon Sep 17 00:00:00 2001 From: va Date: Tue, 22 Mar 2011 13:50:55 +0100 Subject: #i108806# Added Dutch (Belgium) AutoCorrection File --- extras/source/autotext/lang/nl-BE/acor_nl-BE.dat | Bin 0 -> 18310 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 extras/source/autotext/lang/nl-BE/acor_nl-BE.dat diff --git a/extras/source/autotext/lang/nl-BE/acor_nl-BE.dat b/extras/source/autotext/lang/nl-BE/acor_nl-BE.dat new file mode 100644 index 000000000000..ecfe671f9699 Binary files /dev/null and b/extras/source/autotext/lang/nl-BE/acor_nl-BE.dat differ -- cgit v1.2.3 From 648662b98438dead75b83d6336ecb909bbc61e3d Mon Sep 17 00:00:00 2001 From: va Date: Tue, 22 Mar 2011 15:52:39 +0100 Subject: #i96706# Added Croatian AutoCorrection File --- extras/source/autotext/lang/hr-HR/acor_hr-HR.dat | Bin 0 -> 6217 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 extras/source/autotext/lang/hr-HR/acor_hr-HR.dat diff --git a/extras/source/autotext/lang/hr-HR/acor_hr-HR.dat b/extras/source/autotext/lang/hr-HR/acor_hr-HR.dat new file mode 100644 index 000000000000..38a998595c7b Binary files /dev/null and b/extras/source/autotext/lang/hr-HR/acor_hr-HR.dat differ -- cgit v1.2.3 From 0f5e45726901dde6bfb2f914bf8ac8015a66a831 Mon Sep 17 00:00:00 2001 From: va Date: Tue, 22 Mar 2011 16:08:43 +0100 Subject: #i112962# Remove standard.dic --- extras/source/wordbook/makefile.mk | 5 ----- 1 file changed, 5 deletions(-) diff --git a/extras/source/wordbook/makefile.mk b/extras/source/wordbook/makefile.mk index a012b89686f1..2c6b844c9557 100644 --- a/extras/source/wordbook/makefile.mk +++ b/extras/source/wordbook/makefile.mk @@ -42,11 +42,6 @@ ZIP1TARGET = $(WORDBOOK_ALL_TARGET) ZIP1LIST = oracle.dic -ZIP2TARGET = $(WORDBOOK_USER_TARGET) - -ZIP2LIST = standard.dic - - .INCLUDE : target.mk -- cgit v1.2.3 From 629455cb22c316e483bfe832da4526ad9da1c9b6 Mon Sep 17 00:00:00 2001 From: va Date: Tue, 22 Mar 2011 16:12:17 +0100 Subject: #i112962# Remove standard.dic --- extras/util/target.pmk | 1 - 1 file changed, 1 deletion(-) diff --git a/extras/util/target.pmk b/extras/util/target.pmk index 2280f7d8916c..d5c6cb729c1c 100644 --- a/extras/util/target.pmk +++ b/extras/util/target.pmk @@ -129,7 +129,6 @@ TEMPLATE_WIZARD_WEB_TARGET = tplwizweb WORDBOOK_ALL_TARGET = wordbook -WORDBOOK_USER_TARGET = wordbookuser FONTS_WIN_ARIOSO_BOLD = fontwinariosobold FONTS_WIN_ARIOSO_NORMAL = fontwinariosonormal -- cgit v1.2.3 From 14156952455a15f795a57382f126bc5a8e4efdca Mon Sep 17 00:00:00 2001 From: va Date: Tue, 22 Mar 2011 16:13:33 +0100 Subject: #i112962# Remove standard.dic --- extras/source/wordbook/standard.dic | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 extras/source/wordbook/standard.dic diff --git a/extras/source/wordbook/standard.dic b/extras/source/wordbook/standard.dic deleted file mode 100644 index 5b8b235b5dd0..000000000000 --- a/extras/source/wordbook/standard.dic +++ /dev/null @@ -1,4 +0,0 @@ -OOoUserDict1 -lang: -type: positive ---- \ No newline at end of file -- cgit v1.2.3 From a4daf448493ee16d34abf4867ddafd556f4e0cd1 Mon Sep 17 00:00:00 2001 From: va Date: Tue, 22 Mar 2011 16:30:21 +0100 Subject: #i116270# Clean-up oracle.dic --- extras/source/wordbook/oracle.dic | 500 +------------------------------------- 1 file changed, 1 insertion(+), 499 deletions(-) diff --git a/extras/source/wordbook/oracle.dic b/extras/source/wordbook/oracle.dic index 5b7ab0957916..6355596d3ad4 100644 --- a/extras/source/wordbook/oracle.dic +++ b/extras/source/wordbook/oracle.dic @@ -2,401 +2,73 @@ OOoUserDict1 lang: type: positive --- -Accelerator -Access -Accessibility -Account -Accounting -Accounts Acorde= -Activity -Adapter -Adapters -Add-in -Add-on -Add-On -Administration -Administrator -Admissions -Advanced -Advantage -Advisor -Agent -Agents -Agile -Analysis -Analytics -Analyzer AppConnect= -Application -Applications AppWizard= AppXaminer= AppXNavigator= AppXRay= -Architecture Argus= -Asset -Assets -Assistant -Automation -Automotive AutoVue= -Backbone -Banking -Base Base24= -Based Basel= Beehive= Berkeley -Bill -Billing -Bills -Blade BookBuilder= Brocade= -Budgeting -Budgets -Builder -Bulk -Bus -Business CADView= Calc= -Call -Campaigns -Campus -Candidate -Capital Captovation= -Capture -Care -Cartridge -Case -Cash -Center -Certified -Chain -Change ChangeCast= -Channel Cisco= Clickstream= -Client -Clinical -Cluster -Clusters Cognos= -Coherence -Collaboration -Collaborative -Collection -Collections -Commerce -Commercial -Communications -Compensation -Compliance -Component -Components -Configuration -Configurator Connect2OracleSelf= -Connection -Connector -Console -Consulting -Consumer -Contact -Content ConText= -Contract -Contracts -Control -Controls -Core COREid= -Corporate Corporation= -Costing -Credit -Crypto -Crystal -Custom -Customer -Customers -Dashboard -Dashboards -Data -Database Datacenter= -Daybreak -Delivery -Demand Demantra= -Designer -Desktop -Developer -Development -Device -Direct -Director -Directory -Discoverer -Discrete -Distribution DistributionRPM= DocLink= Docuflex= Documaker= -Document Documentum= Draw= -Dynamic E-Business= -e-Commerce -E-Delivery -E-Factoring -E-Mail -E-Records -e-Support Easy*SQL= -eAutomotive= -eBenefits= -eBill= -eBilling= -eCommunications= -eCompensation= -eConfigurator= -eConsumer= -eCustomer= -eDevelopment= -Edition -Education Edwards -eEnergy= -eEvents= -eFinance= -eHealthcare= -eInsurance= -Electro-Mechanical Ellison= -Email -eMail -eMedia= -Encyclopedia -Energy -Engine -Enterprise EnterpriseOne= -eOil= -ePay= -ePayment= -ePerformance= -eProcurement= -eProfile= -ePublic= -eRecruit= -eRetail= -eSales= -eService= -eSettlements= -Essbase= -Estate -eStatement= -eSupplier= -Ethernet -eTransportation= -eTravel= Exadata= -Exchange -Execution -Expansion -Express -ExpressModule= -Extension -Extensions -FastForward= -Field -FieldService= -FileAct= -Filenet= -Finance -Financial -Financials -FinancialsRPM= -Fire= -Flash= -FlashFire= -Floor -Flow -Foundation -Framework -Fulfillment -Funds -Fusion -Gateway -General -Gigabit GigaSwift= -Global -GoldenGate= -Goods -Government -Gradebook= -Grants -Group -Handheld -Healthcare HelpDesk= -High -Hub -Human Hummingbird= Hyperion= -i-flex -iAssets= -iClaims= -iDelivery= -Identity -iGovernment= -iLearning= -iMarketing= -iMeeting= Impress= -Incentive -Industry -InfiniBand= -Information Informix= -Infosync= -Infrastructure -Insight -Institutional -Insurance -Integration -Integrator -Intellectual -Intelligence -InterAct= -Interaction -Interactive -InterConnect= -InterDev= -Interface -interMedia= -Inventory -iPayment= -iPLS= -iProcurement= -iReceivables= -iRecruitment= -iSetup= iSQL*Plus= -iStore= -IStream= -iSupplier= -iSupport= -iWay= Java= JDeveloper= JeOS -JHeadstart= -Jinitiator= -Jolt= -JRockit= -JServer= -Kit -Kodo= -Labor Larry= -Learning -Lease -Leasing -Ledger -Legal -Lending -Library -Life -Lifecycle -Lines Linux -Livelink= -Load -Loans -LogMiner= -Loyalty -Machine -Mainframe -Maintenance -Managed -Management -management -Manager -Managers -Mantas= -Manufacturing -Marketing -Mart -Marts -Master Math= MatrixOne= -Media -Medical -MessageQ= -Messaging -Metadata -MetaSolv= Microsoft= -MicroStrategy= -Middleware -Migration -Mobile -Model -Modeling -Module -Modules -Monitor -Monitoring -Multi-Currency -Multi-Site -Multichannel -MultiChannel= MultiDB= -Multilayer -Multinational -Multiprotocol -MultiProtocol= -Multiservice -Multisite -Multithreaded NetApp= Netra= NetSolutions= -Network Nostro= Objectel= -Objects Office= -On -OnDemand= -One -Online -OnLine= -Onsite -Open= OpenBeleid= OpenDocument= OpenOffice.org= OpenText= OpenWorld= OpenZorg= -Operational -Operations -Optimization -Option Oracle= OracleBRONZE= OracleCONTACT= @@ -411,201 +83,38 @@ Oraclemetals= OraclePLATINUM= OracleSILVER= OracleSTERLING= -Order -Origination -Outage -Pack -Parkway= -Partner -PartnerNetwork= -Payable -Payables -Payment -Payments -Payroll -PayrollRPM= PeopleBooks= PeopleCode= PeopleSoft= -Peoplesoft= PeopleTools= -Performance -Personal Phaos= -Pharma -Planning -Platform -Plug-in -Plug-In -Plug-ins -Plus -Point -Policies -Policy -Port -Portal PortalRPM= -Pricing Primavera= -PrimeSourcing= -Process -ProcessConnect= -Processing -Processor -Procurement -Product -product -Production -Productivity -Professional -Profiles -Profitability -Project ProjectsRPM= -Promotions -Property -Provider -Provisioning -Public -Publisher -Purchasing -Quality -Quickclip= -Quoting -Rack -Rally -Rating -Real -Real -Real-Time -Receivables -Records -Recruiting Redwood= -Reference -Relationship -Repair -Reporting -Reports -Repository -Resource -Resources -ResourcesRPM= -Retail Reveleus= -Revenue -Risk RosettaNet= -Rules -Sale -Sales -Samples Satmetrix= -Scheduler -Scheduling -Sciences -Scorecard -Search -Sector -Secure SecureCARE= -Security -Self -SellingPoint= -Server -Service -Services -Servicing Shores= Siebel= -Sign-On SimBuilder= -Single -Site SiteMinder= SkillsVillage= -Smart SmartScript= SmartViews= -Software -Solution -Solutions Sophoi= -Sourcing -Space Spatial= SSLava= -Standard -Steward -Storage StorageTek= -Store -Strategic -Student -Studio -StyleBox= -Subledger -Succession -Suite Sun= SunHSI= SunSAI= -Superior -Supervisor -Supply -Support -SupportInsite= -SupportNews= -SupportNotes= -SureTrak= SWIFTNet= -Switch -Switching -System -Talent -Taxation -Tech -Technology Telco= -Telecom -Telemarketing -Telephony -TeleSales= -TeleService= -Testing -Theory -Time -TimesTen= -Tools -TopLink= -TopPlan= -Tracking -Trade -Trading -Transaction -Transfer -Transparent -Transportation -Treasury -Trial -TrialMinder= Tuxedo= Unbreakable= -Unified -Universal -Update -Upgrade -User -Utilities -Utility -Value -Vault -Veridata -Virtual VoIP= -VueLink= -Warehouse -Web WebCast= WebCenter= WebDB= @@ -615,12 +124,5 @@ Webmail WebServer= WebTrack= Whitehill= -Wireless -Work -Workflow -Workforce -Workgroup -Workspace -Workspaces World -Writer= +Writer= \ No newline at end of file -- cgit v1.2.3 From 6cd39dec2121d18a7d73c84a5d30dd991edf8607 Mon Sep 17 00:00:00 2001 From: Ruediger Timm Date: Tue, 22 Mar 2011 17:13:41 +0100 Subject: rt40: #i117510# Result of solenv/bin/modules/installer/systemactions.pm's find_file_with_file_extension() should be sorted for better predictability. --- solenv/bin/modules/installer/systemactions.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solenv/bin/modules/installer/systemactions.pm b/solenv/bin/modules/installer/systemactions.pm index 24b070574189..07cd838cf4fa 100644 --- a/solenv/bin/modules/installer/systemactions.pm +++ b/solenv/bin/modules/installer/systemactions.pm @@ -954,7 +954,7 @@ sub find_file_with_file_extension push(@installer::globals::logfileinfo, $infoline); opendir(DIR, $dir); - @sourcefiles = readdir(DIR); + @sourcefiles = sort readdir(DIR); closedir(DIR); my $onefile; -- cgit v1.2.3 From 18142be9f7dc3b8b40caa1b1b2118b917c02ac13 Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Wed, 23 Mar 2011 10:19:59 +0100 Subject: ause127: #i117518# fix directory access rights inside zip - thanks to mav --- swext/mediawiki/build.xml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/swext/mediawiki/build.xml b/swext/mediawiki/build.xml index 79cd9cb9eb1c..2f51bc483716 100644 --- a/swext/mediawiki/build.xml +++ b/swext/mediawiki/build.xml @@ -149,24 +149,24 @@ - - - - - - + + + + + + - - - - - - - - - + + + + + + + + + -- cgit v1.2.3 From 0b494e0cb9eb6652d00397fb6ca8d9b6709e4cb5 Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Wed, 23 Mar 2011 10:34:12 +0100 Subject: #i117329# - Publishing of UNO types, last wave (for now). --- offapi/com/sun/star/animations/XAnimationListener.idl | 2 +- offapi/com/sun/star/animations/XAnimationNode.idl | 2 +- offapi/com/sun/star/drawing/DrawingDocument.idl | 2 +- offapi/com/sun/star/drawing/GenericDrawingDocument.idl | 2 +- offapi/com/sun/star/presentation/PresentationDocument.idl | 2 +- offapi/com/sun/star/presentation/XSlideShowListener.idl | 2 +- offapi/com/sun/star/presentation/XSlideShowView.idl | 8 ++++---- offapi/com/sun/star/rdf/XMetadatable.idl | 2 +- offapi/com/sun/star/rdf/XNode.idl | 2 +- offapi/com/sun/star/rdf/XResource.idl | 2 +- offapi/com/sun/star/rdf/XURI.idl | 2 +- offapi/com/sun/star/text/textfield/MetadataField.idl | 2 +- offapi/com/sun/star/view/SelectionType.idl | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/offapi/com/sun/star/animations/XAnimationListener.idl b/offapi/com/sun/star/animations/XAnimationListener.idl index d1f4f453ee60..c0582d229f8f 100644 --- a/offapi/com/sun/star/animations/XAnimationListener.idl +++ b/offapi/com/sun/star/animations/XAnimationListener.idl @@ -45,7 +45,7 @@ @since OOo 3.0 */ -interface XAnimationListener : ::com::sun::star::lang::XEventListener +published interface XAnimationListener : ::com::sun::star::lang::XEventListener { /** This event is raised when the element local timeline begins to play.

It will be raised each time the element begins the active duration (i.e. when it restarts, but not when it repeats).

diff --git a/offapi/com/sun/star/animations/XAnimationNode.idl b/offapi/com/sun/star/animations/XAnimationNode.idl index b1681d296e48..218bf7cd748a 100644 --- a/offapi/com/sun/star/animations/XAnimationNode.idl +++ b/offapi/com/sun/star/animations/XAnimationNode.idl @@ -43,7 +43,7 @@ /** */ -interface XAnimationNode : ::com::sun::star::container::XChild +published interface XAnimationNode : ::com::sun::star::container::XChild { /** a value from AnimationNodeType. diff --git a/offapi/com/sun/star/drawing/DrawingDocument.idl b/offapi/com/sun/star/drawing/DrawingDocument.idl index f0335dbd4c10..5fdca8fa5d00 100644 --- a/offapi/com/sun/star/drawing/DrawingDocument.idl +++ b/offapi/com/sun/star/drawing/DrawingDocument.idl @@ -40,7 +40,7 @@ /** specifies a document which consists of multiple pages with drawings. */ -service DrawingDocument +published service DrawingDocument { /** this base service describes the whole functionality of such DrawingDocument. */ service GenericDrawingDocument; diff --git a/offapi/com/sun/star/drawing/GenericDrawingDocument.idl b/offapi/com/sun/star/drawing/GenericDrawingDocument.idl index febd57d93b97..761fc3252b18 100644 --- a/offapi/com/sun/star/drawing/GenericDrawingDocument.idl +++ b/offapi/com/sun/star/drawing/GenericDrawingDocument.idl @@ -82,7 +82,7 @@

Because its function is needed more then once, its defined as generic one.

*/ -service GenericDrawingDocument +published service GenericDrawingDocument { /** this base service describes storing and printing */ service com::sun::star::document::OfficeDocument; diff --git a/offapi/com/sun/star/presentation/PresentationDocument.idl b/offapi/com/sun/star/presentation/PresentationDocument.idl index 401090dd09c2..97129cb9f060 100644 --- a/offapi/com/sun/star/presentation/PresentationDocument.idl +++ b/offapi/com/sun/star/presentation/PresentationDocument.idl @@ -52,7 +52,7 @@ /** This is the service provided by a presentation document. */ -service PresentationDocument +published service PresentationDocument { /** This is a basic service for a drawing document. diff --git a/offapi/com/sun/star/presentation/XSlideShowListener.idl b/offapi/com/sun/star/presentation/XSlideShowListener.idl index 01127e66253f..ab051807f4b1 100644 --- a/offapi/com/sun/star/presentation/XSlideShowListener.idl +++ b/offapi/com/sun/star/presentation/XSlideShowListener.idl @@ -39,7 +39,7 @@ module com { module sun { module star { module presentation { @since OOo 3.0 */ -interface XSlideShowListener : ::com::sun::star::animations::XAnimationListener +published interface XSlideShowListener : ::com::sun::star::animations::XAnimationListener { /** Notify that the slide show is paused */ diff --git a/offapi/com/sun/star/presentation/XSlideShowView.idl b/offapi/com/sun/star/presentation/XSlideShowView.idl index 7a78a9861f71..c60bdea2bef1 100644 --- a/offapi/com/sun/star/presentation/XSlideShowView.idl +++ b/offapi/com/sun/star/presentation/XSlideShowView.idl @@ -59,7 +59,7 @@ module com { module sun { module star { module presentation { @since OOo 2.4 */ -interface XSlideShowView : ::com::sun::star::uno::XInterface +published interface XSlideShowView : ::com::sun::star::uno::XInterface { /** Get view canvas.

@@ -81,9 +81,9 @@ interface XSlideShowView : ::com::sun::star::uno::XInterface /** Query the current transformation matrix for this view.

- This method returns the transformation matrix of the - view. When notified via the transformation change listener, - the show will be displayed using the new transformation.

+ This method returns the transformation matrix of the + view. When notified via the transformation change listener, + the show will be displayed using the new transformation.

@return the view transformation matrix. Note that the slide show itself will paint all slides as one-by-one boxes, one diff --git a/offapi/com/sun/star/rdf/XMetadatable.idl b/offapi/com/sun/star/rdf/XMetadatable.idl index e7f01d9c05ba..256d74e48549 100644 --- a/offapi/com/sun/star/rdf/XMetadatable.idl +++ b/offapi/com/sun/star/rdf/XMetadatable.idl @@ -67,7 +67,7 @@ module com { module sun { module star { module rdf { @see XRepository @see XDocumentMetadataAccess */ -interface XMetadatable : XURI +published interface XMetadatable : XURI { //------------------------------------------------------------------------- /** a metadata reference, comprising the stream name and the XML ID. diff --git a/offapi/com/sun/star/rdf/XNode.idl b/offapi/com/sun/star/rdf/XNode.idl index 0c7f70d5e4f7..9ed8e614fd03 100644 --- a/offapi/com/sun/star/rdf/XNode.idl +++ b/offapi/com/sun/star/rdf/XNode.idl @@ -66,7 +66,7 @@ module com { module sun { module star { module rdf { @see XURI @see XLiteral */ -interface XNode +published interface XNode { /// the string value of the node. [readonly, attribute] string StringValue; diff --git a/offapi/com/sun/star/rdf/XResource.idl b/offapi/com/sun/star/rdf/XResource.idl index 3c10b586fd78..b0ce3c505de8 100644 --- a/offapi/com/sun/star/rdf/XResource.idl +++ b/offapi/com/sun/star/rdf/XResource.idl @@ -50,7 +50,7 @@ module com { module sun { module star { module rdf { @see XBlankNode @see XURI */ -interface XResource : XNode +published interface XResource : XNode { }; diff --git a/offapi/com/sun/star/rdf/XURI.idl b/offapi/com/sun/star/rdf/XURI.idl index 6ba59cec0dd6..d869d4e80c54 100644 --- a/offapi/com/sun/star/rdf/XURI.idl +++ b/offapi/com/sun/star/rdf/XURI.idl @@ -62,7 +62,7 @@ module com { module sun { module star { module rdf { @see XRepository */ -interface XURI : XResource +published interface XURI : XResource { /// prefix [readonly, attribute] string Namespace; diff --git a/offapi/com/sun/star/text/textfield/MetadataField.idl b/offapi/com/sun/star/text/textfield/MetadataField.idl index d98c4be39e96..b3d585c0d32c 100755 --- a/offapi/com/sun/star/text/textfield/MetadataField.idl +++ b/offapi/com/sun/star/text/textfield/MetadataField.idl @@ -61,7 +61,7 @@ module com { module sun { module star { module text { module textfield { @see com::sun::star::rdf */ -service MetadataField +published service MetadataField { //------------------------------------------------------------------------- /** None of the properties of diff --git a/offapi/com/sun/star/view/SelectionType.idl b/offapi/com/sun/star/view/SelectionType.idl index c8aa07d27393..56fe2b036131 100644 --- a/offapi/com/sun/star/view/SelectionType.idl +++ b/offapi/com/sun/star/view/SelectionType.idl @@ -35,7 +35,7 @@ module com { module sun { module star { module view { /** Specifies a selection type for a view that supports a selection model. */ -enum SelectionType +published enum SelectionType { //------------------------------------------------------------------------- -- cgit v1.2.3 From 5ebd29ba88ff986e5256f4a940006bdb40ec7ad1 Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Wed, 23 Mar 2011 11:30:01 +0100 Subject: ause127: #i117376# filter out files starting with '.' - now quoted --- postprocess/packregistry/makefile.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/postprocess/packregistry/makefile.mk b/postprocess/packregistry/makefile.mk index a6881783776a..60bb9f3cd579 100644 --- a/postprocess/packregistry/makefile.mk +++ b/postprocess/packregistry/makefile.mk @@ -515,14 +515,16 @@ $(MISC)/lang/fcfg_langpack_{$(alllangiso)}.xcd : $(SOLARPCKDIR)/$$(@:b).zip # It can happen that localized $(SOLARPCKDIR)/fcfg_langpack_*.zip contain # zero-sized org/openoffice/TypeDectection/Filter.xcu; filter them out in the # find shell command below (see issue 110041): + $(MISC)/lang/fcfg_langpack_%.xcd .ERRREMOVE : $(MKDIRHIER) $(@:d) rm -rf $(MISC)/$(@:b).unzip mkdir $(MISC)/$(@:b).unzip cd $(MISC)/$(@:b).unzip && unzip $(SOLARPCKDIR)/$(@:b).zip - $(RM) $(MISC)/$(@:b).list + # filter out filenames starting with "." echo '' $(foreach,i,$(shell cd $(MISC) && \ - find $(@:b).unzip -name \*.xcu -size +0c -print) \ + find $(@:b).unzip -name \[!.\]\*.xcu -size +0c -print) \ '$i') '' > $(MISC)/$(@:b).list $(XSLTPROC) --nonet --stringparam prefix $(PWD)/$(MISC)/ -o $@ \ $(SOLARENV)/bin/packregistry.xslt $(MISC)/$(@:b).list @@ -540,8 +542,9 @@ $(MISC)/lang/registry_%.xcd .ERRREMOVE : cd $(MISC)/fcfg_drivers_$*.unzip && \ unzip $(SOLARPCKDIR)/fcfg_drivers_$*.zip - $(RM) $(MISC)/$(@:b).list + # filter out filenames starting with "." echo '' $(foreach,i,$(shell cd $(MISC) && \ - find $(@:b).unzip fcfg_drivers_$*.unzip -name \*.xcu -print) \ + find $(@:b).unzip fcfg_drivers_$*.unzip -name \[!.\]\*.xcu -print) \ '$i') '' > $(MISC)/$(@:b).list $(XSLTPROC) --nonet --stringparam prefix $(PWD)/$(MISC)/ -o $@ \ $(SOLARENV)/bin/packregistry.xslt $(MISC)/$(@:b).list -- cgit v1.2.3 From 67f0cd0dd2ed0e0970d9be5b9e0f4edd38e82210 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 23 Mar 2011 16:22:41 +0100 Subject: rsvglibs: libgsf, windows --- libgsf/libgsf-1.14.19.windows.patch | 138 ++++++++++++++++++++++++++++++++++++ libgsf/makefile.mk | 17 ++++- libgsf/prj/d.lst | 3 + 3 files changed, 155 insertions(+), 3 deletions(-) create mode 100644 libgsf/libgsf-1.14.19.windows.patch mode change 100644 => 100755 libgsf/makefile.mk mode change 100644 => 100755 libgsf/prj/d.lst diff --git a/libgsf/libgsf-1.14.19.windows.patch b/libgsf/libgsf-1.14.19.windows.patch new file mode 100644 index 000000000000..2f4221420558 --- /dev/null +++ b/libgsf/libgsf-1.14.19.windows.patch @@ -0,0 +1,138 @@ +--- misc/libgsf-1.14.19/gsf/gsf-config.h 2011-03-23 16:18:27.163747600 +0100 ++++ misc/build/libgsf-1.14.19/gsf/gsf-config.h 2011-03-23 16:01:26.598374600 +0100 +@@ -1 +1,10 @@ +-dummy ++#ifndef GSF_CONFIG_H ++#define GSF_CONFIG_H ++ ++#define GETTEXT_PACKAGE "gsf" ++ ++typedef unsigned short mode_t; ++ ++#define S_ISREG(x) ((x & _S_IFREG)!=0) ++ ++#endif +--- misc/libgsf-1.14.19/gsf/makefile.mk 2011-03-23 16:18:27.070742300 +0100 ++++ misc/build/libgsf-1.14.19/gsf/makefile.mk 2011-03-23 16:17:29.477448100 +0100 +@@ -1 +1,120 @@ +-dummy ++#************************************************************************* ++# ++# 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=..$/..$/..$/..$/.. ++PRJINC=.. ++PRJNAME=libgsf ++TARGET=gsf-1 ++ ++VISIBILITY_HIDDEN=TRUE ++EXTERNAL_WARNINGS_NOT_ERRORS=TRUE ++ ++# --- Settings ---------------------------------- ++ ++.INCLUDE : settings.mk ++ ++CFLAGS+= -I.. -I$(SOLARINCDIR)$/external$/glib-2.0 -I$(SOLARINCDIR)$/external$/zlib -I$(SOLARINCDIR)$/external ++ ++# --- Files ------------------------------------- ++ ++SLOFILES=\ ++ $(SLO)$/gsf-blob.obj \ ++ $(SLO)$/gsf-input-memory.obj \ ++ $(SLO)$/gsf-output-gio.obj \ ++ $(SLO)$/gsf-clip-data.obj \ ++ $(SLO)$/gsf-input-proxy.obj \ ++ $(SLO)$/gsf-output-gzip.obj \ ++ $(SLO)$/gsf-doc-meta-data.obj \ ++ $(SLO)$/gsf-input-stdio.obj \ ++ $(SLO)$/gsf-output-iconv.obj \ ++ $(SLO)$/gsf-docprop-vector.obj \ ++ $(SLO)$/gsf-input-textline.obj \ ++ $(SLO)$/gsf-output-iochannel.obj \ ++ $(SLO)$/gsf-infile-msole.obj \ ++ $(SLO)$/gsf-input.obj \ ++ $(SLO)$/gsf-output-memory.obj \ ++ $(SLO)$/gsf-infile-msvba.obj \ ++ $(SLO)$/gsf-libxml.obj \ ++ $(SLO)$/gsf-output-stdio.obj \ ++ $(SLO)$/gsf-infile-stdio.obj \ ++ $(SLO)$/gsf-msole-utils.obj \ ++ $(SLO)$/gsf-output.obj \ ++ $(SLO)$/gsf-infile-tar.obj \ ++ $(SLO)$/gsf-open-pkg-utils.obj \ ++ $(SLO)$/gsf-shared-memory.obj \ ++ $(SLO)$/gsf-infile-zip.obj \ ++ $(SLO)$/gsf-opendoc-utils.obj \ ++ $(SLO)$/gsf-structured-blob.obj \ ++ $(SLO)$/gsf-infile.obj \ ++ $(SLO)$/gsf-outfile-msole.obj \ ++ $(SLO)$/gsf-timestamp.obj \ ++ $(SLO)$/gsf-input-bzip.obj \ ++ $(SLO)$/gsf-outfile-stdio.obj \ ++ $(SLO)$/gsf-utils.obj \ ++ $(SLO)$/gsf-input-gio.obj \ ++ $(SLO)$/gsf-outfile-zip.obj \ ++ $(SLO)$/gsf-zip-utils.obj \ ++ $(SLO)$/gsf-input-gzip.obj \ ++ $(SLO)$/gsf-outfile.obj \ ++ $(SLO)$/version.obj \ ++ $(SLO)$/gsf-input-http.obj \ ++ $(SLO)$/gsf-output-bzip.obj \ ++ $(SLO)$/gsf-input-iochannel.obj \ ++ $(SLO)$/gsf-output-csv.obj ++ ++# --- Library ----------------------------------- ++ ++SHL1TARGET= $(TARGET) ++SHL1OBJS=$(SLOFILES) ++SHL1STDLIBS=\ ++ libxml2.lib \ ++ gio-2.0.lib \ ++ gmodule-2.0.lib \ ++ gobject-2.0.lib \ ++ glib-2.0.lib \ ++ intl.lib \ ++ zlib.lib \ ++ Advapi32.lib ++ ++ ++SHL1IMPLIB= i$(TARGET) ++SHL1DEF= $(MISC)$/$(SHL1TARGET).def ++ ++DEF1NAME= $(SHL1TARGET) ++DEF1DEPN= $(MISC)$/$(SHL1TARGET).flt \ ++ $(SLB)$/$(TARGET).lib ++DEFLIB1NAME=$(TARGET) ++ ++# --- Targets ---------------------------------- ++ ++.INCLUDE : target.mk ++ ++# --- filter file ------------------------------ ++ ++$(MISC)$/$(SHL1TARGET).flt: makefile.mk ++ @echo CLEAR_THE_FILE > $@ ++ diff --git a/libgsf/makefile.mk b/libgsf/makefile.mk old mode 100644 new mode 100755 index e19a88c9a370..326b7e56771a --- a/libgsf/makefile.mk +++ b/libgsf/makefile.mk @@ -47,6 +47,17 @@ LIBGSFVERSION=1.14.19 TARFILE_NAME=$(PRJNAME)-$(LIBGSFVERSION) TARFILE_MD5=3a84ac2da37cae5bf7ce616228c6fbde +.IF "$(OS)" == "WNT" +PATCH_FILES=libgsf-1.14.19.windows.patch + +BUILD_DIR=gsf +BUILD_ACTION=dmake + +ADDITIONAL_FILES=\ + gsf$/makefile.mk \ + gsf$/gsf-config.h + +.ELSE PATCH_FILES=libgsf-1.14.19.patch CONFIGURE_DIR= @@ -76,9 +87,12 @@ BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) \ $(GNUMAKE) BUILD_DIR=$(CONFIGURE_DIR) +.ENDIF + .IF "$(OS)"=="MACOSX" EXTRPATH=LOADER OUT2LIB+=gsf$/.libs$/libgsf-1.114.dylib +.ENDIF OUT2INC+=gsf$/gsf-blob.h OUT2INC+=gsf$/gsf-input-impl.h @@ -128,9 +142,6 @@ OUT2INC+=gsf$/gsf-utils.h OUT2INC+=gsf$/gsf-input-http.h OUT2INC+=gsf$/gsf-outfile-zip.h OUT2INC+=gsf$/gsf.h -.ELIF "$(OS)"=="WNT" -.ELSE -.ENDIF # --- Targets ------------------------------------------------------ diff --git a/libgsf/prj/d.lst b/libgsf/prj/d.lst old mode 100644 new mode 100755 index 382f4fa071a6..c47826c5b410 --- a/libgsf/prj/d.lst +++ b/libgsf/prj/d.lst @@ -54,3 +54,6 @@ mkdir: %_DEST%\inc%_EXT%\external\libgsf-1\gsf ..\%__SRC%\lib\libgsf-1.114.dylib %_DEST%\lib%_EXT%\libgsf-1.114.dylib symlink: %_DEST%\lib%_EXT%\libgsf-1.114.dylib %_DEST%\lib%_EXT%\libgsf-1.dylib +..\%__SRC%\bin\gsf-1.dll %_DEST%\bin%_EXT%\gsf-1.dll +..\%__SRC%\lib\igsf-1.lib %_DEST%\lib%_EXT%\igsf-1.lib + -- cgit v1.2.3 From 5ebffff3faea50c35c35fc1730fae56802c5929d Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 23 Mar 2011 17:27:40 +0100 Subject: vcl2gnumake: #i116588# add: windows native resource files (thanks hjs !) --- solenv/gbuild/Library.mk | 1 + solenv/gbuild/LinkTarget.mk | 1 + solenv/gbuild/TargetLocations.mk | 2 ++ solenv/gbuild/gbuild.mk | 1 + solenv/gbuild/platform/windows.mk | 72 ++++++++++++++++++++++++++++++++++---- solenv/gbuild/platform/winmingw.mk | 63 +++++++++++++++++++++++++++++++++ 6 files changed, 134 insertions(+), 6 deletions(-) mode change 100644 => 100755 solenv/gbuild/TargetLocations.mk diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk index d697b1a777ca..0ce56ce41ea2 100644 --- a/solenv/gbuild/Library.mk +++ b/solenv/gbuild/Library.mk @@ -61,6 +61,7 @@ $$(eval $$(call gb_Output_error,Library $(1) must be registered in Repository.mk endif $(call gb_Library_get_target,$(1)) : AUXTARGETS := $(call gb_Library__Library_impl,$(1),$(call gb_Library__get_linktargetname,$(1))) +$(call gb_Library_add_default_nativeres,$(1),default) endef diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk index 612b85bf3e20..8f681b5e4d5c 100644 --- a/solenv/gbuild/LinkTarget.mk +++ b/solenv/gbuild/LinkTarget.mk @@ -362,6 +362,7 @@ $(call gb_LinkTarget_get_target,$(1)) : PCH_NAME := $(call gb_LinkTarget_get_target,$(1)) : PCHOBJS := $(call gb_LinkTarget_get_headers_target,$(1)) \ $(call gb_LinkTarget_get_target,$(1)) : PDBFILE := +$(call gb_LinkTarget_get_target,$(1)) : NATIVERES := ifeq ($(gb_FULLDEPS),$(true)) ifneq ($(wildcard $(call gb_LinkTarget_get_dep_target,$(1))),) diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk old mode 100644 new mode 100755 index aba209c29136..60e53ec10e15 --- a/solenv/gbuild/TargetLocations.mk +++ b/solenv/gbuild/TargetLocations.mk @@ -81,6 +81,7 @@ gb_SdiTarget_get_target = $(WORKDIR)/SdiTarget/$(1) gb_SrsPartMergeTarget_get_target = $(WORKDIR)/SrsPartMergeTarget/$(1) gb_SrsPartTarget_get_target = $(WORKDIR)/SrsPartTarget/$(1) gb_SrsTarget_get_target = $(WORKDIR)/SrsTarget/$(1).srs +gb_WinResTarget_get_target = $(WORKDIR)/WinResTarget/$(1)$(gb_WinResTarget_POSTFIX) define gb_Library_get_external_headers_target $(patsubst $(1):%,$(WORKDIR)/ExternalHeaders/Library/%,$(filter $(1):%,$(gb_Library_FILENAMES))) @@ -105,6 +106,7 @@ $(eval $(call gb_Helper_make_clean_targets,\ JunitTest \ LinkTarget \ Module \ + WinResTarget \ NoexPrecompiledHeader \ PackagePart \ PrecompiledHeader \ diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk index 3c7010a32158..46f1b72dda52 100644 --- a/solenv/gbuild/gbuild.mk +++ b/solenv/gbuild/gbuild.mk @@ -221,6 +221,7 @@ $(eval $(call gb_Deliver_init)) include $(foreach class, \ ComponentTarget \ AllLangResTarget \ + WinResTarget \ LinkTarget \ Library \ StaticLibrary \ diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk index e85bdb5a0f80..23f6b60da94f 100755 --- a/solenv/gbuild/platform/windows.mk +++ b/solenv/gbuild/platform/windows.mk @@ -37,6 +37,7 @@ gb_CXX := cl gb_LINK := link gb_AWK := awk gb_CLASSPATHSEP := ; +gb_RC := rc # use CC/CXX if they are nondefaults ifneq ($(origin CC),default) @@ -67,6 +68,13 @@ gb_COMPILERDEFS := \ gb_CPUDEFS := -DINTEL -D_X86_=1 +gb_RCDEFS := \ + -DWINVER=0x0400 \ + -DWIN32 \ + +gb_RCFLAGS := \ + -V + gb_CFLAGS := \ -Gd \ -GR \ @@ -180,7 +188,7 @@ gb_PrecompiledHeader_EXCEPTIONFLAGS := $(gb_LinkTarget_EXCEPTIONFLAGS) gb_LinkTarget_NOEXCEPTIONFLAGS := \ -DEXCEPTIONS_OFF \ - + gb_NoexPrecompiledHeader_NOEXCEPTIONFLAGS := $(gb_LinkTarget_NOEXCEPTIONFLAGS) gb_LinkTarget_LDFLAGS := \ @@ -274,11 +282,11 @@ $(call gb_Helper_abbreviate_dirs_native,\ $(3) \ -f - \ | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ - -v OBJECTFILE=$(1) \ - -v OUTDIR=$(OUTDIR)/ \ + -v OBJECTFILE=$(1) \ + -v OUTDIR=$(OUTDIR)/ \ -v WORKDIR=$(WORKDIR)/ \ -v SRCDIR=$(SRCDIR)/ \ - -v REPODIR=$(REPODIR)/ \ + -v REPODIR=$(REPODIR)/ \ > $(call gb_CxxObject_get_dep_target,$(2))) endef else @@ -383,7 +391,6 @@ $(call gb_Helper_abbreviate_dirs_native,\ $(call gb_NoexPrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6)) endef - # LinkTarget class gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS) @@ -406,7 +413,7 @@ $(call gb_Helper_abbreviate_dirs_native,\ echo "$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ - $(PCHOBJS)" > $${RESPONSEFILE} && \ + $(PCHOBJS) $(NATIVERES)" > $${RESPONSEFILE} && \ $(gb_LINK) \ $(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \ $(if $(filter StaticLibrary,$(TARGETTYPE)),$(gb_StaticLibrary_TARGETTYPEFLAGS)) \ @@ -519,6 +526,20 @@ $(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE = $(call gb_LinkTarget_g endef +define gb_Library_add_default_nativeres +$(call gb_WinResTarget_WinResTarget_init,$(1)/$(2)) +$(call gb_WinResTarget_add_file,$(1)/$(2),solenv/gbuild/shlinfo) +$(call gb_Library_add_nativeres,$(1),$(2)) +$(call gb_Library_get_clean_target,$(1)) : $(call gb_WinResTarget_get_clean_target,$(1)/$(2)) + +endef + +define gb_Library_add_nativeres +$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : $(call gb_WinResTarget_get_target,$(1)/$(2)) +$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : NATIVERES += $(call gb_WinResTarget_get_target,$(1)/$(2)) + +endef + define gb_Library_get_dllname $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_DLLFILENAMES))) endef @@ -672,6 +693,45 @@ else gb_SrsPartTarget__command_dep = endif +# WinResTarget class + +gb_WinResTarget_POSTFIX :=.res + +define gb_WinResTarget__command +$(call gb_Output_announce,$(2),$(true),RES,3) +$(call gb_Helper_abbreviate_dirs_native,\ + mkdir -p $(dir $(1)) && \ + $(gb_RC) \ + $(DEFS) $(FLAGS) \ + -I$(dir $(3)) \ + $(INCLUDE) \ + -Fo$(1) \ + $(RCFILE) ) +endef + +$(eval $(call gb_Helper_make_dep_targets,\ + WinResTarget \ +)) + +ifeq ($(gb_FULLDEPS),$(true)) +define gb_WinResTarget__command_dep +$(call gb_Helper_abbreviate_dirs_native,\ + $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ + $(INCLUDE) \ + $(DEFS) \ + $(2) \ + -f - \ + | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ + -v OBJECTFILE=$(call gb_WinResTarget_get_target,$(1)) \ + -v OUTDIR=$(OUTDIR)/ \ + -v WORKDIR=$(WORKDIR)/ \ + -v SRCDIR=$(SRCDIR)/ \ + -v REPODIR=$(REPODIR)/ \ + > $(call gb_WinResTarget_get_dep_target,$(1))) +endef +else +gb_WinResTarget__command_dep = +endif # ComponentTarget diff --git a/solenv/gbuild/platform/winmingw.mk b/solenv/gbuild/platform/winmingw.mk index b9eec5eaf417..9c3764fd328b 100644 --- a/solenv/gbuild/platform/winmingw.mk +++ b/solenv/gbuild/platform/winmingw.mk @@ -96,6 +96,13 @@ gb_CPUDEFS := \ -DINTEL \ -D_M_IX86 \ +gb_RCDEFS := \ + -DWINVER=0x0400 \ + -DWIN32 \ + +gb_RCFLAGS := \ + -V + gb_CFLAGS := \ -Wall \ -Wendif-labels \ @@ -521,6 +528,20 @@ $(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(3)),$(3)) endef +define gb_Library_add_default_nativeres +$(call gb_WinResTarget_WinResTarget_init,$(1)/$(2)) +$(call gb_WinResTarget_add_file,$(1)/$(2),solenv/gbuild/shlinfo) +$(call gb_Library_add_nativeres,$(1),$(2)) +$(call gb_Library_get_clean_target,$(1)) : $(call gb_WinResTarget_get_clean_target,$(1)/$(2)) + +endef + +define gb_Library_add_nativeres +$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : $(call gb_WinResTarget_get_target,$(1)/$(2)) +$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : NATIVERES += $(call gb_WinResTarget_get_target,$(1)/$(2)) + +endef + define gb_Library_get_dllname $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_DLLFILENAMES))) endef @@ -599,6 +620,48 @@ else gb_SrsPartTarget__command_dep = endif +# WinResTarget class + +gb_WinResTarget_POSTFIX :=_res.o + +define gb_WinResTarget__command +$(call gb_Output_announce,$(2),$(true),RES,3) +$(call gb_Helper_abbreviate_dirs_native,\ + mkdir -p $(dir $(1)) && \ + $(gb_RC) \ + $(DEFS) $(FLAGS) \ + -I$(dir $(3)) \ + $(INCLUDE) \ + -Fo$(patsubst %_res.o,%.res,$(1)) \ + $(RCFILE) ) + windres $(patsubst %_res.o,%.res,$(1)) $(1) + rm $(patsubst %_res.o,%.res,$(1)) +endef + +$(eval $(call gb_Helper_make_dep_targets,\ + WinResTarget \ +)) + +ifeq ($(gb_FULLDEPS),$(true)) +define gb_WinResTarget__command_dep +$(call gb_Helper_abbreviate_dirs_native,\ + $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ + $(INCLUDE) \ + $(DEFS) \ + $(2) \ + -f - \ + | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ + -v OBJECTFILE=$(call gb_WinResTarget_get_target,$(1)) \ + -v OUTDIR=$(OUTDIR)/ \ + -v WORKDIR=$(WORKDIR)/ \ + -v SRCDIR=$(SRCDIR)/ \ + -v REPODIR=$(REPODIR)/ \ + > $(call gb_WinResTarget_get_dep_target,$(1))) +endef +else +gb_WinResTarget__command_dep = +endif + # ComponentTarget gb_XSLTPROCPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" -- cgit v1.2.3 From 7de3ced6186204e9e1c41c120eb19eac09f9d4a1 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 23 Mar 2011 17:30:35 +0100 Subject: vcl2gnumake: #i116588# add: windows native resource files (thanks hjs !) --- solenv/gbuild/WinResTarget.mk | 70 +++++++++++++++++++++++++++ solenv/gbuild/shlinfo.rc | 107 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 177 insertions(+) create mode 100644 solenv/gbuild/WinResTarget.mk create mode 100644 solenv/gbuild/shlinfo.rc diff --git a/solenv/gbuild/WinResTarget.mk b/solenv/gbuild/WinResTarget.mk new file mode 100644 index 000000000000..17c7500769f9 --- /dev/null +++ b/solenv/gbuild/WinResTarget.mk @@ -0,0 +1,70 @@ + +# WinResTarget class + +gb_WinResTarget_DEFAULTDEFS := $(gb_RCDEFS) + +define gb_WinResTarget_WinResTarget +$(call gb_WinResTarget_WinResTarget_init,$(1)) +$$(eval $$(call gb_Module_register_target,$(call gb_WinResTarget_get_target,$(1)),$(call gb_WinResTarget_get_clean_target,$(1)))) + +endef + +define gb_WinResTarget_WinResTarget_init +$(call gb_WinResTarget_get_target,$(1)) : DEFS := $(gb_WinResTarget_DEFAULTDEFS) +$(call gb_WinResTarget_get_target,$(1)) : INCLUDE := $(SOLARINC) +$(call gb_WinResTarget_get_clean_target,$(1)) : RCFILE := +$(call gb_WinResTarget_get_target,$(1)) : RCFILE := +ifeq ($(gb_FULLDEPS),$(true)) +$(call gb_WinResTarget_get_target,$(1)) : $(call gb_WinResTarget_get_dep_target,$(1)) +ifneq ($(wildcard $(call gb_WinResTarget_get_dep_target,$(1))),) +include $(call gb_WinResTarget_get_dep_target,$(1)) +else +$(firstword $(MAKEFILE_LIST)) : $(call gb_WinResTarget_get_dep_target,$(1)) +endif +$(call gb_WinResTarget_get_dep_target,$(1)) : DEFS := $$(gb_WinResTarget_DEFAULTDEFS) +$(call gb_WinResTarget_get_dep_target,$(1)) : INCLUDE := $$(gb_WinResTarget_INCLUDE) +$(call gb_WinResTarget_get_dep_target,$(1)) : RCFILE := +endif + +endef + +ifeq ($(gb_FULLDEPS),$(true)) +$(call gb_WinResTarget_get_dep_target,%) : $(gb_Helper_MISCDUMMY) + mkdir -p $(dir $@) && \ + echo '$(call gb_WinResTarget_get_target,$*) : $$(gb_Helper_PHONY)' > $@ +endif + + +$(call gb_WinResTarget_get_target,%) : + $(call gb_Output_announce,$*,$(true),RES,1) + $(call gb_WinResTarget__command_dep,$*,$<) + $(call gb_Helper_abbreviate_dirs,\ + mkdir -p $(dir $@)) + $(call gb_WinResTarget__command,$@) + +$(call gb_WinResTarget_get_clean_target,%) : + $(call gb_Helper_abbreviate_dirs,\ + rm -f $(call gb_WinResTarget_get_target,$*)) + +define gb_WinResTarget_set_defs +$(call gb_WinResTarget_get_target,$(1)) : DEFS := $(2) +$(call gb_WinResTarget_get_dep_target,$(1)) : DEFS := $(2) + +endef + +define gb_WinResTarget_set_include +$(call gb_WinResTarget_get_target,$(1)) : INCLUDE := $(2) + +endef + +define gb_WinResTarget_add_file +$(call gb_WinResTarget_get_clean_target,$(1)) : RCFILE=$(gb_Helper_SRCDIR_NATIVE)/$(2).rc +$(call gb_WinResTarget_get_target,$(1)) : RCFILE=$(foreach file,$(gb_REPOS),$(realpath $(file)/$(strip $(2)).rc)) +$(call gb_WinResTarget_get_target,$(1)) : $(foreach file,$(gb_REPOS),$(realpath $(file)/$(strip $(2)).rc)) + +endef + +define gb_WinResTarget_add_dependency +$(call gb_WinResTarget_get_target,$(1)) : $(foreach file,$(2),$(foreach repo,$(gb_REPOS),$(realpath $(repo)/$(strip $(file))))) + +endef diff --git a/solenv/gbuild/shlinfo.rc b/solenv/gbuild/shlinfo.rc new file mode 100644 index 000000000000..8453e9826170 --- /dev/null +++ b/solenv/gbuild/shlinfo.rc @@ -0,0 +1,107 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#if !defined(ENGLISH) +#define LG_D // generate always german version +#endif + +#define VER_FIRSTYEAR 2010 + + +#if defined(OS2) + +#define OS2_VERSION "hello world" + +#else + +#include +#include "version.hrc" + +// ----------------------------------------------------------------------- +// version information +// ----------------------------------------------------------------------- + +VS_VERSION_INFO versioninfo +#ifndef SUBVERSION + fileversion VERSION, 0, VERVARIANT, VER_COUNT + productversion VERSION, 0, VERVARIANT, VER_COUNT +#else + fileversion VERSION, SUBVERSION, VERVARIANT, VER_COUNT + productversion VERSION, SUBVERSION, VERVARIANT, VER_COUNT +#endif + fileflagsmask 0x3F + fileflags +#if defined(DEBUG) + VS_FF_DEBUG | +#endif +#ifdef VER_PREL + VS_FF_PRERELEASE | +#endif + 0 +#ifndef WIN32 + fileos VOS_DOS_WINDOWS16 +#else + fileos VOS_NT_WINDOWS32 +#endif + filetype VFT_APP + { + block "StringFileInfo" + { +#ifdef LG_D + block "040704E4" + { + // German StringTable + value "CompanyName", "OpenOffice.org\0" + value "FileVersion", PPS(VER_LEVEL) "\0" + value "OriginalFilename", PPS(ORG_NAME) "\0" + value "InternalName", PPS(INTERNAL_NAME) "\0" + value "LegalCopyright", S_CRIGHT " Oracle, Inc.\0" + } +#else + block "040904E4" + { + // International StringTable + value "CompanyName", "OpenOffice.org\0" + value "FileVersion", PPS(VER_LEVEL) "\0" + value "OriginalFilename", PPS(ORG_NAME) "\0" + value "InternalName", PPS(INTERNAL_NAME) "\0" + value "LegalCopyright", S_CRIGHT " Oracle, Inc.\0" + } +#endif + } + + block "VarFileInfo" + { +#ifdef LG_D + value "Translation", 0x0407, 1252 +#else + value "Translation", 0x0409, 1252 +#endif + } + } + +#endif // OS2 -- cgit v1.2.3 From 4617694b3fd830c8560f8d75d5f6afca618a8d65 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 23 Mar 2011 17:32:53 +0100 Subject: vcl2gnumake: #i116588# add: windows native resource files, cleanup (thanks hjs !) --- vcl/Library_desktop_detector.mk | 2 +- vcl/Library_vcl.mk | 9 ++- vcl/Library_vclplug_gen.mk | 4 -- vcl/Library_vclplug_gtk.mk | 4 -- vcl/Library_vclplug_kde.mk | 4 -- vcl/Library_vclplug_kde4.mk | 4 -- vcl/Library_vclplug_svp.mk | 4 -- vcl/Module_vcl.mk | 7 ++- vcl/StaticLibrary_vclmain.mk | 10 +++- vcl/WinResTarget_vcl.mk | 123 ++++++++++++++++++++++++++++++++++++++++ vcl/win/source/gdi/wntgdi.cxx | 3 + 11 files changed, 148 insertions(+), 26 deletions(-) mode change 100644 => 100755 vcl/Library_vclplug_gen.mk mode change 100644 => 100755 vcl/Library_vclplug_gtk.mk mode change 100644 => 100755 vcl/Library_vclplug_kde.mk mode change 100644 => 100755 vcl/Library_vclplug_kde4.mk mode change 100644 => 100755 vcl/Library_vclplug_svp.mk create mode 100755 vcl/WinResTarget_vcl.mk diff --git a/vcl/Library_desktop_detector.mk b/vcl/Library_desktop_detector.mk index f98be027fa1d..49151cb19ff5 100644 --- a/vcl/Library_desktop_detector.mk +++ b/vcl/Library_desktop_detector.mk @@ -27,7 +27,7 @@ $(eval $(call gb_Library_Library,desktop_detector)) -$(eval $(call gb_Library_add_package_headers,vcl,vcl_inc)) +#$(eval $(call gb_Library_add_package_headers,vcl,vcl_inc)) $(eval $(call gb_Library_add_precompiled_header,desktop_detector,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 98f84e13600b..445059ec4a9d 100755 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -37,8 +37,6 @@ endif $(eval $(call gb_Library_add_package_headers,vcl,vcl_inc)) -#$(eval $(call gb_Library_add_precompiled_header,vcl,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) - $(eval $(call gb_Library_set_include,vcl,\ $$(INCLUDE) \ -I$(SRCDIR)/vcl/inc \ @@ -236,7 +234,8 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/win/source/window/salobj \ )) -### FIXME: need to link windows resources to vcl dll +$(eval $(call gb_Library_add_nativeres,vcl,src)) + endif $(eval $(call gb_Library_add_cobjects,vcl,\ @@ -469,6 +468,10 @@ $(eval $(call gb_Library_set_ldflags,vcl,\ endif ifeq ($(OS),WNT) +$(eval $(call gb_Library_set_ldflags,vcl,\ + $$(LDFLAGS) \ + /ENTRY:LibMain@12 \ +)) $(eval $(call gb_Library_add_linked_libs,vcl,\ advapi32 \ gdi32 \ diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk old mode 100644 new mode 100755 index 7d534aa211a3..bba48e0d65ba --- a/vcl/Library_vclplug_gen.mk +++ b/vcl/Library_vclplug_gen.mk @@ -27,10 +27,6 @@ $(eval $(call gb_Library_Library,vclplug_gen)) -$(eval $(call gb_Library_add_package_headers,vcl,vcl_inc)) - -$(eval $(call gb_Library_add_precompiled_header,vclplug_gen,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) - $(eval $(call gb_Library_set_include,vclplug_gen,\ $$(INCLUDE) \ -I$(SRCDIR)/vcl/inc \ diff --git a/vcl/Library_vclplug_gtk.mk b/vcl/Library_vclplug_gtk.mk old mode 100644 new mode 100755 index d0df791bad7d..129ef1060272 --- a/vcl/Library_vclplug_gtk.mk +++ b/vcl/Library_vclplug_gtk.mk @@ -27,10 +27,6 @@ $(eval $(call gb_Library_Library,vclplug_gtk)) -$(eval $(call gb_Library_add_package_headers,vcl,vcl_inc)) - -$(eval $(call gb_Library_add_precompiled_header,vclplug_gtk,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) - $(eval $(call gb_Library_set_include,vclplug_gtk,\ $$(INCLUDE) \ -I$(SRCDIR)/vcl/inc \ diff --git a/vcl/Library_vclplug_kde.mk b/vcl/Library_vclplug_kde.mk old mode 100644 new mode 100755 index 560898d94ed7..a3fc45513707 --- a/vcl/Library_vclplug_kde.mk +++ b/vcl/Library_vclplug_kde.mk @@ -27,10 +27,6 @@ $(eval $(call gb_Library_Library,vclplug_kde)) -$(eval $(call gb_Library_add_package_headers,vcl,vcl_inc)) - -$(eval $(call gb_Library_add_precompiled_header,vclplug_kde,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) - $(eval $(call gb_Library_set_include,vclplug_kde,\ $$(INCLUDE) \ -I$(SRCDIR)/vcl/inc \ diff --git a/vcl/Library_vclplug_kde4.mk b/vcl/Library_vclplug_kde4.mk old mode 100644 new mode 100755 index ad1c5530ce79..30fc756b4a35 --- a/vcl/Library_vclplug_kde4.mk +++ b/vcl/Library_vclplug_kde4.mk @@ -27,10 +27,6 @@ $(eval $(call gb_Library_Library,vclplug_kde4)) -$(eval $(call gb_Library_add_package_headers,vcl,vcl_inc)) - -$(eval $(call gb_Library_add_precompiled_header,vclplug_kde4,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) - $(eval $(call gb_Library_set_include,vclplug_kde4,\ $$(INCLUDE) \ -I$(SRCDIR)/vcl/inc \ diff --git a/vcl/Library_vclplug_svp.mk b/vcl/Library_vclplug_svp.mk old mode 100644 new mode 100755 index 845b0c93d320..1289c6b53a83 --- a/vcl/Library_vclplug_svp.mk +++ b/vcl/Library_vclplug_svp.mk @@ -27,10 +27,6 @@ $(eval $(call gb_Library_Library,vclplug_svp)) -$(eval $(call gb_Library_add_package_headers,vcl,vcl_inc)) - -$(eval $(call gb_Library_add_precompiled_header,vclplug_svp,$(SRCDIR)/vcl/inc/pch/precompiled_vcl)) - $(eval $(call gb_Library_set_include,vclplug_svp,\ $$(INCLUDE) \ -I$(SRCDIR)/vcl/inc \ diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk index ff35aadd574c..929f60988bb1 100644 --- a/vcl/Module_vcl.mk +++ b/vcl/Module_vcl.mk @@ -30,8 +30,8 @@ $(eval $(call gb_Module_Module,vcl)) $(eval $(call gb_Module_add_targets,vcl,\ Library_vcl \ - Package_inc \ StaticLibrary_vclmain \ + Package_inc \ AllLangResTarget_vcl \ )) @@ -65,5 +65,10 @@ $(eval $(call gb_Module_add_targets,vcl,\ )) endif +ifeq ($(GUIBASE),WIN) +$(eval $(call gb_Module_add_targets,vcl,\ + WinResTarget_vcl \ +)) +endif # vim: set noet sw=4 ts=4: diff --git a/vcl/StaticLibrary_vclmain.mk b/vcl/StaticLibrary_vclmain.mk index 9e6275f345d5..ccf800b38ce6 100755 --- a/vcl/StaticLibrary_vclmain.mk +++ b/vcl/StaticLibrary_vclmain.mk @@ -27,7 +27,15 @@ $(eval $(call gb_StaticLibrary_StaticLibrary,vclmain)) -$(eval $(call gb_StaticLibrary_add_package_headers,vclmain,vcl_inc)) +$(eval $(call gb_StaticLibrary_set_include,vclmain,\ + $$(INCLUDE) \ + -I$(SRCDIR)/vcl/inc \ + -I$(SRCDIR)/vcl/inc/pch \ + -I$(SRCDIR)/solenv/inc \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc/stl \ + -I$(OUTDIR)/inc \ +)) $(eval $(call gb_StaticLibrary_add_exception_objects,vclmain,\ vcl/source/salmain/salmain \ diff --git a/vcl/WinResTarget_vcl.mk b/vcl/WinResTarget_vcl.mk new file mode 100755 index 000000000000..68fe30c0826c --- /dev/null +++ b/vcl/WinResTarget_vcl.mk @@ -0,0 +1,123 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2011 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_WinResTarget_WinResTarget,vcl/src)) + +$(eval $(call gb_WinResTarget_set_include,vcl/src,\ + $$(INCLUDE) \ + -I$(SRCDIR)/vcl/inc \ +)) + +$(eval $(call gb_WinResTarget_add_file,vcl/src,\ + vcl/win/source/src/salsrc \ +)) +$(eval $(call gb_WinResTarget_add_dependency,vcl/src,\ + vcl/win/source/src/dtext.cur \ + vcl/win/source/src/50.bmp \ + vcl/win/source/src/copydata.cur \ + vcl/win/source/src/dpie.cur \ + vcl/win/source/src/movedata.cur \ + vcl/win/source/src/rotate.cur \ + vcl/win/source/src/50.png \ + vcl/win/source/src/copydlnk.cur \ + vcl/win/source/src/dpolygon.cur \ + vcl/win/source/src/movedlnk.cur \ + vcl/win/source/src/salsrc.rc \ + vcl/win/source/src/airbrush.cur \ + vcl/win/source/src/copyf.cur \ + vcl/win/source/src/drect.cur \ + vcl/win/source/src/movef.cur \ + vcl/win/source/src/sd.ico \ + vcl/win/source/src/ase.cur \ + vcl/win/source/src/copyf2.cur \ + vcl/win/source/src/dtext.cur \ + vcl/win/source/src/movef2.cur \ + vcl/win/source/src/tblsele.cur \ + vcl/win/source/src/asn.cur \ + vcl/win/source/src/copyflnk.cur \ + vcl/win/source/src/fill.cur \ + vcl/win/source/src/moveflnk.cur \ + vcl/win/source/src/tblsels.cur \ + vcl/win/source/src/asne.cur \ + vcl/win/source/src/crook.cur \ + vcl/win/source/src/hand.cur \ + vcl/win/source/src/movept.cur \ + vcl/win/source/src/tblselse.cur \ + vcl/win/source/src/asns.cur \ + vcl/win/source/src/crop.cur \ + vcl/win/source/src/help.cur \ + vcl/win/source/src/neswsize.cur \ + vcl/win/source/src/tblselsw.cur \ + vcl/win/source/src/asnswe.cur \ + vcl/win/source/src/cross.cur \ + vcl/win/source/src/hshear.cur \ + vcl/win/source/src/notallow.cur \ + vcl/win/source/src/tblselw.cur \ + vcl/win/source/src/asnw.cur \ + vcl/win/source/src/darc.cur \ + vcl/win/source/src/hsize.cur \ + vcl/win/source/src/nullptr.cur \ + vcl/win/source/src/timemove.cur \ + vcl/win/source/src/ass.cur \ + vcl/win/source/src/dbezier.cur \ + vcl/win/source/src/hsizebar.cur \ + vcl/win/source/src/nwsesize.cur \ + vcl/win/source/src/timesize.cur \ + vcl/win/source/src/asse.cur \ + vcl/win/source/src/dcapt.cur \ + vcl/win/source/src/hsplit.cur \ + vcl/win/source/src/pen.cur \ + vcl/win/source/src/vshear.cur \ + vcl/win/source/src/assw.cur \ + vcl/win/source/src/dcirccut.cur \ + vcl/win/source/src/linkdata.cur \ + vcl/win/source/src/pivotcol.cur \ + vcl/win/source/src/vsize.cur \ + vcl/win/source/src/asw.cur \ + vcl/win/source/src/dconnect.cur \ + vcl/win/source/src/linkf.cur \ + vcl/win/source/src/pivotdel.cur \ + vcl/win/source/src/vsizebar.cur \ + vcl/win/source/src/aswe.cur \ + vcl/win/source/src/dellipse.cur \ + vcl/win/source/src/magnify.cur \ + vcl/win/source/src/pivotfld.cur \ + vcl/win/source/src/vsplit.cur \ + vcl/win/source/src/chain.cur \ + vcl/win/source/src/detectiv.cur \ + vcl/win/source/src/mirror.cur \ + vcl/win/source/src/pivotrow.cur \ + vcl/win/source/src/vtext.cur \ + vcl/win/source/src/chainnot.cur \ + vcl/win/source/src/dfree.cur \ + vcl/win/source/src/move.cur \ + vcl/win/source/src/pntbrsh.cur \ + vcl/win/source/src/chart.cur \ + vcl/win/source/src/dline.cur \ + vcl/win/source/src/movebw.cur \ + vcl/win/source/src/refhand.cur \ +)) diff --git a/vcl/win/source/gdi/wntgdi.cxx b/vcl/win/source/gdi/wntgdi.cxx index 2f6d73a83ec6..eb53fb4d8699 100755 --- a/vcl/win/source/gdi/wntgdi.cxx +++ b/vcl/win/source/gdi/wntgdi.cxx @@ -25,6 +25,9 @@ * ************************************************************************/ +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_vcl.hxx" + #if defined _MSC_VER #pragma warning(push, 1) #endif -- cgit v1.2.3 From 0e40dca039bb46ebe1694d116b88482f0b753c0c Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 24 Mar 2011 08:40:30 +0100 Subject: dba34d: #i117521# --- reportdesign/source/ui/report/ViewsWindow.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index f3706fa786bd..bd6171cf9112 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -317,6 +317,7 @@ void OViewsWindow::addSection(const uno::Reference< report::XSection >& _xSectio ::boost::shared_ptr pSectionWindow( new OSectionWindow(this,_xSection,_sColorEntry) ); m_aSections.insert(getIteratorAtPos(_nPosition) , TSectionsMap::value_type(pSectionWindow)); m_pParent->setMarked(&pSectionWindow->getReportSection().getSectionView(),m_aSections.size() == 1); + Resize(); } //---------------------------------------------------------------------------- void OViewsWindow::removeSection(sal_uInt16 _nPosition) -- cgit v1.2.3 From c80267e6ed2feef852066981b3c98f37de800c83 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 24 Mar 2011 10:44:59 +0100 Subject: vcl2gnumake: solve some merge problems --- vcl/aqua/source/dtrans/DragSource.cxx | 6 +----- vcl/aqua/source/dtrans/DropTarget.cxx | 4 ++-- vcl/aqua/source/gdi/salgdi.cxx | 2 +- vcl/inc/svdata.hxx | 13 ++++++++++--- vcl/source/gdi/pdfwriter_impl.cxx | 1 + vcl/source/gdi/print.cxx | 2 +- 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/vcl/aqua/source/dtrans/DragSource.cxx b/vcl/aqua/source/dtrans/DragSource.cxx index 28e427dbd536..f3e73b765c94 100644 --- a/vcl/aqua/source/dtrans/DragSource.cxx +++ b/vcl/aqua/source/dtrans/DragSource.cxx @@ -146,7 +146,7 @@ Sequence dragSource_getSupportedServiceNames() bDropSuccess ); mDragSource->mXDragSrcListener->dragDropEnd(dsde); - mDragSource->mXDragSrcListener = Reference(); + mDragSource->mXDragSrcListener = uno::Reference(); } @@ -252,10 +252,6 @@ void SAL_CALL DragSource::startDrag(const DragGestureEvent& trigger, sal_Int8 sourceActions, sal_Int32 /*cursor*/, sal_Int32 /*image*/, - const Reference& transferable, - const Reference& listener ) - sal_Int32 cursor, - sal_Int32 image, const uno::Reference& transferable, const uno::Reference& listener ) throw( RuntimeException) diff --git a/vcl/aqua/source/dtrans/DropTarget.cxx b/vcl/aqua/source/dtrans/DropTarget.cxx index ecd3e241dd7c..b55a70872372 100644 --- a/vcl/aqua/source/dtrans/DropTarget.cxx +++ b/vcl/aqua/source/dtrans/DropTarget.cxx @@ -50,8 +50,8 @@ #include #include -#include -#include +#include +#include using namespace rtl; using namespace cppu; diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx index 8a9c52d33379..3c228ffcfa40 100644 --- a/vcl/aqua/source/gdi/salgdi.cxx +++ b/vcl/aqua/source/gdi/salgdi.cxx @@ -44,7 +44,6 @@ #include "vcl/sysdata.hxx" #include "vcl/svapp.hxx" -#include "vcl/region.h" #include "aqua/salconst.h" #include "aqua/salgdi.h" @@ -55,6 +54,7 @@ #include "fontsubset.hxx" #include "impfont.hxx" +#include "region.h" #include "sallayout.hxx" #include "sft.hxx" diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index 9c91915823b2..5dba6441cd1c 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -29,20 +29,27 @@ #define _SV_SVDATA_HXX #include "rtl/ref.hxx" + #include "vos/thread.hxx" + #include "tools/string.hxx" #include "tools/gen.hxx" #include "tools/shl.hxx" #include "tools/link.hxx" #include "tools/fldunit.hxx" -#include "vcl/vclevent.hxx" -#include "vcl/sv.h" #include "tools/color.hxx" #include "tools/debug.hxx" + +#include "vcl/vclevent.hxx" +#include "vcl/sv.h" #include "vcl/dllapi.h" -#include "com/sun/star/uno/Reference.hxx" + #include "unotools/options.hxx" +#include "xconnection.hxx" + +#include "com/sun/star/uno/Reference.hxx" + #include namespace com { diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 09d3e7372c22..01f6a3b60f6d 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -63,6 +63,7 @@ #include #include #include +#include "vcl/cvtgrf.hxx" #include "vcl/strhelper.hxx" #include diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index daf0d6352c46..9d8bee00ef24 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -44,13 +44,13 @@ #include #include #include -#include #include #include #include #include #include +#include #include #include #include -- cgit v1.2.3 From f9c3fb7d9197a659244aa0bbe063b94688bc1cf6 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 24 Mar 2011 11:57:24 +0100 Subject: vcl2gnumake: fix a merge problem (thanks mst !) --- Repository.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/Repository.mk b/Repository.mk index 0df085200471..c5146937f197 100755 --- a/Repository.mk +++ b/Repository.mk @@ -145,7 +145,6 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \ jpeglib \ ooopathutils \ salcpprt \ - vclmain \ zlib \ graphite \ vclmain \ -- cgit v1.2.3 From 7c9b9d5dcd08833486554ed4e88ed8e86ab30ac0 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 24 Mar 2011 11:58:22 +0100 Subject: vcl2gnumake: updated windows makefiles --- solenv/gbuild/platform/windows.mk | 8 ++- solenv/gbuild/platform/winmingw.mk | 8 ++- solenv/gbuild/shlinfo.rc | 107 ------------------------------------- 3 files changed, 14 insertions(+), 109 deletions(-) delete mode 100644 solenv/gbuild/shlinfo.rc diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk index 4a2922164286..3b34fc522f0c 100644 --- a/solenv/gbuild/platform/windows.mk +++ b/solenv/gbuild/platform/windows.mk @@ -539,7 +539,13 @@ endef define gb_Library_add_default_nativeres $(call gb_WinResTarget_WinResTarget_init,$(1)/$(2)) -$(call gb_WinResTarget_add_file,$(1)/$(2),solenv/gbuild/shlinfo) +$(call gb_WinResTarget_add_file,$(1)/$(2),solenv/inc/shlinfo) +$(call gb_WinResTarget_set_defs,$(1)/$(2),\ + $$(DEFS) \ + -DADDITIONAL_VERINFO1 \ + -DADDITIONAL_VERINFO2 \ + -DADDITIONAL_VERINFO3 \ +) $(call gb_Library_add_nativeres,$(1),$(2)) $(call gb_Library_get_clean_target,$(1)) : $(call gb_WinResTarget_get_clean_target,$(1)/$(2)) diff --git a/solenv/gbuild/platform/winmingw.mk b/solenv/gbuild/platform/winmingw.mk index 62167b4b1b9f..49c36c14bc1b 100644 --- a/solenv/gbuild/platform/winmingw.mk +++ b/solenv/gbuild/platform/winmingw.mk @@ -543,7 +543,13 @@ endef define gb_Library_add_default_nativeres $(call gb_WinResTarget_WinResTarget_init,$(1)/$(2)) -$(call gb_WinResTarget_add_file,$(1)/$(2),solenv/gbuild/shlinfo) +$(call gb_WinResTarget_add_file,$(1)/$(2),solenv/inc/shlinfo) +$(call gb_WinResTarget_set_defs,$(1)/$(2),\ + $$(DEFS) \ + -DADDITIONAL_VERINFO1 \ + -DADDITIONAL_VERINFO2 \ + -DADDITIONAL_VERINFO3 \ +) $(call gb_Library_add_nativeres,$(1),$(2)) $(call gb_Library_get_clean_target,$(1)) : $(call gb_WinResTarget_get_clean_target,$(1)/$(2)) diff --git a/solenv/gbuild/shlinfo.rc b/solenv/gbuild/shlinfo.rc deleted file mode 100644 index 8453e9826170..000000000000 --- a/solenv/gbuild/shlinfo.rc +++ /dev/null @@ -1,107 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#if !defined(ENGLISH) -#define LG_D // generate always german version -#endif - -#define VER_FIRSTYEAR 2010 - - -#if defined(OS2) - -#define OS2_VERSION "hello world" - -#else - -#include -#include "version.hrc" - -// ----------------------------------------------------------------------- -// version information -// ----------------------------------------------------------------------- - -VS_VERSION_INFO versioninfo -#ifndef SUBVERSION - fileversion VERSION, 0, VERVARIANT, VER_COUNT - productversion VERSION, 0, VERVARIANT, VER_COUNT -#else - fileversion VERSION, SUBVERSION, VERVARIANT, VER_COUNT - productversion VERSION, SUBVERSION, VERVARIANT, VER_COUNT -#endif - fileflagsmask 0x3F - fileflags -#if defined(DEBUG) - VS_FF_DEBUG | -#endif -#ifdef VER_PREL - VS_FF_PRERELEASE | -#endif - 0 -#ifndef WIN32 - fileos VOS_DOS_WINDOWS16 -#else - fileos VOS_NT_WINDOWS32 -#endif - filetype VFT_APP - { - block "StringFileInfo" - { -#ifdef LG_D - block "040704E4" - { - // German StringTable - value "CompanyName", "OpenOffice.org\0" - value "FileVersion", PPS(VER_LEVEL) "\0" - value "OriginalFilename", PPS(ORG_NAME) "\0" - value "InternalName", PPS(INTERNAL_NAME) "\0" - value "LegalCopyright", S_CRIGHT " Oracle, Inc.\0" - } -#else - block "040904E4" - { - // International StringTable - value "CompanyName", "OpenOffice.org\0" - value "FileVersion", PPS(VER_LEVEL) "\0" - value "OriginalFilename", PPS(ORG_NAME) "\0" - value "InternalName", PPS(INTERNAL_NAME) "\0" - value "LegalCopyright", S_CRIGHT " Oracle, Inc.\0" - } -#endif - } - - block "VarFileInfo" - { -#ifdef LG_D - value "Translation", 0x0407, 1252 -#else - value "Translation", 0x0409, 1252 -#endif - } - } - -#endif // OS2 -- cgit v1.2.3 From c121bdfc1f11f41a76c1d04fa28075b2315633e4 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 24 Mar 2011 13:55:20 +0100 Subject: vcl2gnumake: enable Werror for objcxx files --- solenv/gbuild/platform/macosx.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk index b54cb8fb1b9d..d6a3e57c1ffc 100644 --- a/solenv/gbuild/platform/macosx.mk +++ b/solenv/gbuild/platform/macosx.mk @@ -225,7 +225,7 @@ endef gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS) gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR) -gb_LinkTarget_OBJCXXFLAGS := $(gb_CXXFLAGS) $(gb_OBJCXXFLAGS) $(gb_COMPILEROPTFLAGS) +gb_LinkTarget_OBJCXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR) $(gb_OBJCXXFLAGS) $(gb_COMPILEROPTFLAGS) ifeq ($(gb_DEBUGLEVEL),2) gb_LinkTarget_CFLAGS += -g -- cgit v1.2.3 From 2f852c6e840fa089fd778eec1f7096e4218f5498 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 24 Mar 2011 13:56:11 +0100 Subject: vcl2gnumake: fix warnings --- vcl/aqua/source/a11y/aqua11yselectionwrapper.mm | 1 + vcl/aqua/source/a11y/aqua11ytextwrapper.mm | 18 ++++-- vcl/aqua/source/a11y/aqua11ywrapper.mm | 8 ++- vcl/aqua/source/app/salnstimer.mm | 1 + vcl/aqua/source/app/vclnsapp.mm | 23 ++++++- vcl/aqua/source/gdi/aquaprintaccessoryview.mm | 2 +- vcl/aqua/source/gdi/aquaprintview.mm | 1 + vcl/aqua/source/window/salframe.cxx | 1 + vcl/aqua/source/window/salframeview.mm | 79 ++++++++++++++++++++++++- vcl/aqua/source/window/salnsmenu.mm | 2 + vcl/source/gdi/wall.cxx | 2 +- vcl/unx/headless/svpgdi.cxx | 2 +- 12 files changed, 127 insertions(+), 13 deletions(-) diff --git a/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm b/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm index 1330424df739..a215bf913cf1 100644 --- a/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm +++ b/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm @@ -68,6 +68,7 @@ using namespace ::com::sun::star::uno; +(BOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper { + (void)wrapper; if ( [ attribute isEqualToString: NSAccessibilitySelectedChildrenAttribute ] ) { return YES; diff --git a/vcl/aqua/source/a11y/aqua11ytextwrapper.mm b/vcl/aqua/source/a11y/aqua11ytextwrapper.mm index d4c27812de63..d956d2beb0b7 100644 --- a/vcl/aqua/source/a11y/aqua11ytextwrapper.mm +++ b/vcl/aqua/source/a11y/aqua11ytextwrapper.mm @@ -51,8 +51,11 @@ using namespace ::rtl; return CreateNSString ( [ wrapper accessibleText ] -> getText() ); } -+(void)setValueAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value { ++(void)setValueAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value +{ // TODO + (void)wrapper; + (void)value; } +(id)numberOfCharactersAttributeForElement:(AquaA11yWrapper *)wrapper { @@ -105,15 +108,22 @@ using namespace ::rtl; return [ NSValue valueWithRange: NSMakeRange ( 0, [ wrapper accessibleText ] -> getCharacterCount() ) ]; } -+(void)setVisibleCharacterRangeAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value { ++(void)setVisibleCharacterRangeAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value +{ // do nothing + (void)wrapper; + (void)value; } -+(id)sharedTextUIElementsAttributeForElement:(AquaA11yWrapper *)wrapper { ++(id)sharedTextUIElementsAttributeForElement:(AquaA11yWrapper *)wrapper +{ + (void)wrapper; return [ [ NSArray alloc ] init ]; // unsupported } -+(id)sharedCharacterRangeAttributeForElement:(AquaA11yWrapper *)wrapper { ++(id)sharedCharacterRangeAttributeForElement:(AquaA11yWrapper *)wrapper +{ + (void)wrapper; return [ NSValue valueWithRange: NSMakeRange ( 0, 0 ) ]; // unsupported } diff --git a/vcl/aqua/source/a11y/aqua11ywrapper.mm b/vcl/aqua/source/a11y/aqua11ywrapper.mm index ce2db7745c30..bf8de98c3318 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapper.mm +++ b/vcl/aqua/source/a11y/aqua11ywrapper.mm @@ -164,7 +164,8 @@ static BOOL isPopupMenuOpen = NO; if ( ! asGetter ) { [ methodName appendString: @"set" ]; } - NSString * firstChar = [ attribute substringWithRange: NSMakeRange ( 2, 1 ) ]; // drop leading "AX" and get first char + NSRange aRange = { 2, 1 }; + NSString * firstChar = [ attribute substringWithRange: aRange ]; // drop leading "AX" and get first char if ( asGetter ) { [ methodName appendString: [ firstChar lowercaseString ] ]; } else { @@ -831,7 +832,10 @@ static BOOL isPopupMenuOpen = NO; return nil; // TODO: to be completed } --(BOOL)accessibilitySetOverrideValue:(id)value forAttribute:(NSString *)attribute { +-(BOOL)accessibilitySetOverrideValue:(id)value forAttribute:(NSString *)attribute +{ + (void)value; + (void)attribute; return NO; // TODO } diff --git a/vcl/aqua/source/app/salnstimer.mm b/vcl/aqua/source/app/salnstimer.mm index 2f1f0158cc05..f44c3d698f73 100755 --- a/vcl/aqua/source/app/salnstimer.mm +++ b/vcl/aqua/source/app/salnstimer.mm @@ -38,6 +38,7 @@ @implementation TimerCallbackCaller -(void)timerElapsed:(NSTimer*)pTimer { + (void)pTimer; ImplSVData* pSVData = ImplGetSVData(); if( AquaSalTimer::bDispatchTimer ) { diff --git a/vcl/aqua/source/app/vclnsapp.mm b/vcl/aqua/source/app/vclnsapp.mm index f79414457452..cfb4d5e62454 100755 --- a/vcl/aqua/source/app/vclnsapp.mm +++ b/vcl/aqua/source/app/vclnsapp.mm @@ -53,6 +53,7 @@ { // do nothing, this is just to start an NSThread and therefore put // Cocoa into multithread mode + (void)param; } @end @@ -285,11 +286,13 @@ -(NSMenu*)applicationDockMenu:(NSApplication *)sender { + (void)sender; return AquaSalInstance::GetDynamicDockMenu(); } -(BOOL)application: (NSApplication*)app openFile: (NSString*)pFile { + (void)app; const rtl::OUString aFile( GetOUString( pFile ) ); if( ! AquaSalInstance::isOnCommandLine( aFile ) ) { @@ -302,6 +305,7 @@ -(void)application: (NSApplication*) app openFiles: (NSArray*)files { + (void)app; rtl::OUStringBuffer aFileList( 256 ); NSEnumerator* it = [files objectEnumerator]; @@ -331,6 +335,7 @@ -(BOOL)application: (NSApplication*)app printFile: (NSString*)pFile { + (void)app; const rtl::OUString aFile( GetOUString( pFile ) ); const ApplicationEvent* pAppEvent = new ApplicationEvent( String(), ApplicationAddress(), APPEVENT_PRINT_STRING, aFile ); @@ -339,6 +344,9 @@ } -(NSApplicationPrintReply)application: (NSApplication *) app printFiles:(NSArray *)files withSettings: (NSDictionary *)printSettings showPrintPanels:(BOOL)bShowPrintPanels { + (void)app; + (void)printSettings; + (void)bShowPrintPanels; // currently ignores print settings an bShowPrintPanels rtl::OUStringBuffer aFileList( 256 ); @@ -361,6 +369,7 @@ -(NSApplicationTerminateReply)applicationShouldTerminate: (NSApplication *) app { + (void)app; NSApplicationTerminateReply aReply = NSTerminateNow; { YIELD_GUARD; @@ -388,6 +397,7 @@ -(void)systemColorsChanged: (NSNotification*) pNotification { + (void)pNotification; YIELD_GUARD; const SalData* pSalData = GetSalData(); @@ -397,6 +407,7 @@ -(void)screenParametersChanged: (NSNotification*) pNotification { + (void)pNotification; YIELD_GUARD; SalData* pSalData = GetSalData(); @@ -409,11 +420,13 @@ -(void)scrollbarVariantChanged: (NSNotification*) pNotification { + (void)pNotification; GetSalData()->mpFirstInstance->delayedSettingsChanged( true ); } -(void)scrollbarSettingsChanged: (NSNotification*) pNotification { + (void)pNotification; GetSalData()->mpFirstInstance->delayedSettingsChanged( false ); } @@ -437,7 +450,9 @@ #pragma mark - #pragma mark NSApplication Delegates -- (void)applicationWillBecomeActive:(NSNotification *)aNotification { +- (void)applicationWillBecomeActive:(NSNotification *)pNotification +{ + (void)pNotification; if (GetSalData()->mpMainController->remoteControl) { // [remoteControl startListening: self]; @@ -453,7 +468,9 @@ } } -- (void)applicationWillResignActive:(NSNotification *)aNotification { +- (void)applicationWillResignActive:(NSNotification *)pNotification +{ + (void)pNotification; if (GetSalData()->mpMainController->remoteControl) { // [remoteControl stopListening: self]; @@ -471,6 +488,8 @@ - (BOOL)applicationShouldHandleReopen: (NSApplication*)pApp hasVisibleWindows: (BOOL) bWinVisible { + (void)pApp; + (void)bWinVisible; NSObject* pHdl = GetSalData()->mpDockIconClickHandler; if( pHdl && [pHdl respondsToSelector: @selector(dockIconClicked:)] ) { diff --git a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm index 26013010a4d5..8786ed7d0013 100644 --- a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm +++ b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm @@ -919,7 +919,7 @@ static void addRadio( NSView* pCurParent, long& rCurX, long& rCurY, long nAttach [pProto release]; } -static void addList( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachOffset, +static void addList( NSView* pCurParent, long& rCurX, long& rCurY, long /*nAttachOffset*/, const rtl::OUString& rText, const rtl::OUString& rProperty, const Sequence< rtl::OUString > rChoices, sal_Int32 nSelectValue, std::vector& rLeftColumn, diff --git a/vcl/aqua/source/gdi/aquaprintview.mm b/vcl/aqua/source/gdi/aquaprintview.mm index 947906ce4172..692435fc00f0 100755 --- a/vcl/aqua/source/gdi/aquaprintview.mm +++ b/vcl/aqua/source/gdi/aquaprintview.mm @@ -65,6 +65,7 @@ -(NSPoint)locationOfPrintRect: (NSRect)aRect { + (void)aRect; NSPoint aPoint = { 0, 0 }; return aPoint; } diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx index e6cff19c4dd3..8749774459d3 100644 --- a/vcl/aqua/source/window/salframe.cxx +++ b/vcl/aqua/source/window/salframe.cxx @@ -288,6 +288,7 @@ SalGraphics* AquaSalFrame::GetGraphics() void AquaSalFrame::ReleaseGraphics( SalGraphics *pGraphics ) { + (void)pGraphics; DBG_ASSERT( pGraphics == mpGraphics, "graphics released on wrong frame" ); mbGraphics = FALSE; } diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm index 13bbbb20d663..dd2deefdeeaa 100755 --- a/vcl/aqua/source/window/salframeview.mm +++ b/vcl/aqua/source/window/salframeview.mm @@ -207,6 +207,7 @@ static AquaSalFrame* getMouseContainerFrame() -(void)windowDidBecomeKey: (NSNotification*)pNotification { + (void)pNotification; YIELD_GUARD; if( mpFrame && AquaSalFrame::isAlive( mpFrame ) ) @@ -237,6 +238,7 @@ static AquaSalFrame* getMouseContainerFrame() -(void)windowDidResignKey: (NSNotification*)pNotification { + (void)pNotification; YIELD_GUARD; if( mpFrame && AquaSalFrame::isAlive( mpFrame ) ) @@ -248,6 +250,7 @@ static AquaSalFrame* getMouseContainerFrame() -(void)windowDidChangeScreen: (NSNotification*)pNotification { + (void)pNotification; YIELD_GUARD; if( mpFrame && AquaSalFrame::isAlive( mpFrame ) ) @@ -256,6 +259,7 @@ static AquaSalFrame* getMouseContainerFrame() -(void)windowDidMove: (NSNotification*)pNotification { + (void)pNotification; YIELD_GUARD; if( mpFrame && AquaSalFrame::isAlive( mpFrame ) ) @@ -267,6 +271,7 @@ static AquaSalFrame* getMouseContainerFrame() -(void)windowDidResize: (NSNotification*)pNotification { + (void)pNotification; YIELD_GUARD; if( mpFrame && AquaSalFrame::isAlive( mpFrame ) ) @@ -279,6 +284,7 @@ static AquaSalFrame* getMouseContainerFrame() -(void)windowDidMiniaturize: (NSNotification*)pNotification { + (void)pNotification; YIELD_GUARD; if( mpFrame && AquaSalFrame::isAlive( mpFrame ) ) @@ -291,6 +297,7 @@ static AquaSalFrame* getMouseContainerFrame() -(void)windowDidDeminiaturize: (NSNotification*)pNotification { + (void)pNotification; YIELD_GUARD; if( mpFrame && AquaSalFrame::isAlive( mpFrame ) ) @@ -303,6 +310,7 @@ static AquaSalFrame* getMouseContainerFrame() -(BOOL)windowShouldClose: (NSNotification*)pNotification { + (void)pNotification; YIELD_GUARD; BOOL bRet = YES; @@ -322,6 +330,7 @@ static AquaSalFrame* getMouseContainerFrame() -(void)dockMenuItemTriggered: (id)sender { + (void)sender; YIELD_GUARD; if( mpFrame && AquaSalFrame::isAlive( mpFrame ) ) @@ -370,6 +379,7 @@ static AquaSalFrame* getMouseContainerFrame() -(void)unregisterDraggingDestinationHandler:(id)theHandler { + (void)theHandler; mDraggingDestinationHandler = nil; } @@ -421,6 +431,7 @@ static AquaSalFrame* getMouseContainerFrame() -(BOOL)acceptsFirstMouse: (NSEvent*)pEvent { + (void)pEvent; return YES; } @@ -731,6 +742,7 @@ private: { //Rotation : -(float)rotation; // TODO: create new CommandType so rotation is available to the applications + (void)pEvent; } - (void)swipeWithEvent: (NSEvent*)pEvent @@ -1026,294 +1038,352 @@ private: -(void)insertTab: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: KEY_TAB character: '\t' modifiers: 0]; } -(void)insertBacktab: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: (KEY_TAB | KEY_SHIFT) character: '\t' modifiers: 0]; } -(void)moveLeft: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: KEY_LEFT character: 0 modifiers: 0]; } -(void)moveLeftAndModifySelection: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: KEY_LEFT character: 0 modifiers: NSShiftKeyMask]; } -(void)moveBackwardAndModifySelection: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::SELECT_BACKWARD character: 0 modifiers: 0]; } -(void)moveRight: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: KEY_RIGHT character: 0 modifiers: 0]; } -(void)moveRightAndModifySelection: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: KEY_RIGHT character: 0 modifiers: NSShiftKeyMask]; } -(void)moveForwardAndModifySelection: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::SELECT_FORWARD character: 0 modifiers: 0]; } -(void)moveWordLeft: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::MOVE_WORD_BACKWARD character: 0 modifiers: 0]; } -(void)moveWordBackward: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::MOVE_WORD_BACKWARD character: 0 modifiers: 0]; } -(void)moveWordBackwardAndModifySelection: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::SELECT_WORD_BACKWARD character: 0 modifiers: 0]; } -(void)moveWordLeftAndModifySelection: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::SELECT_WORD_BACKWARD character: 0 modifiers: 0]; } -(void)moveWordRight: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::MOVE_WORD_FORWARD character: 0 modifiers: 0]; } -(void)moveWordForward: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::MOVE_WORD_FORWARD character: 0 modifiers: 0]; } -(void)moveWordForwardAndModifySelection: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::SELECT_WORD_FORWARD character: 0 modifiers: 0]; } -(void)moveWordRightAndModifySelection: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::SELECT_WORD_FORWARD character: 0 modifiers: 0]; } -(void)moveToEndOfLine: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::MOVE_TO_END_OF_LINE character: 0 modifiers: 0]; } -(void)moveToRightEndOfLine: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::MOVE_TO_END_OF_LINE character: 0 modifiers: 0]; } -(void)moveToEndOfLineAndModifySelection: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::SELECT_TO_END_OF_LINE character: 0 modifiers: 0]; } -(void)moveToRightEndOfLineAndModifySelection: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::SELECT_TO_END_OF_LINE character: 0 modifiers: 0]; } -(void)moveToBeginningOfLine: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::MOVE_TO_BEGIN_OF_LINE character: 0 modifiers: 0]; } -(void)moveToLeftEndOfLine: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::MOVE_TO_BEGIN_OF_LINE character: 0 modifiers: 0]; } -(void)moveToBeginningOfLineAndModifySelection: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::SELECT_TO_BEGIN_OF_LINE character: 0 modifiers: 0]; } -(void)moveToLeftEndOfLineAndModifySelection: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::SELECT_TO_BEGIN_OF_LINE character: 0 modifiers: 0]; } -(void)moveToEndOfParagraph: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::MOVE_TO_END_OF_PARAGRAPH character: 0 modifiers: 0]; } -(void)moveToEndOfParagraphAndModifySelection: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::SELECT_TO_END_OF_PARAGRAPH character: 0 modifiers: 0]; } -(void)moveParagraphForward: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::MOVE_TO_END_OF_PARAGRAPH character: 0 modifiers: 0]; } -(void)moveParagraphForwardAndModifySelection: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::SELECT_TO_END_OF_PARAGRAPH character: 0 modifiers: 0]; } -(void)moveToBeginningOfParagraph: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::MOVE_TO_BEGIN_OF_PARAGRAPH character: 0 modifiers: 0]; } -(void)moveParagraphBackward: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::MOVE_TO_BEGIN_OF_PARAGRAPH character: 0 modifiers: 0]; } -(void)moveToBeginningOfParagraphAndModifySelection: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::SELECT_TO_BEGIN_OF_PARAGRAPH character: 0 modifiers: 0]; } -(void)moveParagraphBackwardAndModifySelection: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::SELECT_TO_BEGIN_OF_PARAGRAPH character: 0 modifiers: 0]; } -(void)moveToEndOfDocument: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::MOVE_TO_END_OF_DOCUMENT character: 0 modifiers: 0]; } -(void)scrollToEndOfDocument: (id)aSender { + (void)aSender; // this is not exactly what we should do, but it makes "End" and "Shift-End" behave consistent [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::MOVE_TO_END_OF_DOCUMENT character: 0 modifiers: 0]; } -(void)moveToEndOfDocumentAndModifySelection: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::SELECT_TO_END_OF_DOCUMENT character: 0 modifiers: 0]; } -(void)moveToBeginningOfDocument: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::MOVE_TO_BEGIN_OF_DOCUMENT character: 0 modifiers: 0]; } -(void)scrollToBeginningOfDocument: (id)aSender { + (void)aSender; // this is not exactly what we should do, but it makes "Home" and "Shift-Home" behave consistent [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::MOVE_TO_BEGIN_OF_DOCUMENT character: 0 modifiers: 0]; } -(void)moveToBeginningOfDocumentAndModifySelection: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::SELECT_TO_BEGIN_OF_DOCUMENT character: 0 modifiers: 0]; } -(void)moveUp: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: KEY_UP character: 0 modifiers: 0]; } -(void)moveDown: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: KEY_DOWN character: 0 modifiers: 0]; } -(void)insertNewline: (id)aSender { + (void)aSender; // #i91267# make enter and shift-enter work by evaluating the modifiers [self sendKeyInputAndReleaseToFrame: KEY_RETURN character: '\n' modifiers: mpFrame->mnLastModifierFlags]; } -(void)deleteBackward: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: KEY_BACKSPACE character: '\b' modifiers: 0]; } -(void)deleteForward: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: KEY_DELETE character: 0x7f modifiers: 0]; } -(void)deleteBackwardByDecomposingPreviousCharacter: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: KEY_BACKSPACE character: '\b' modifiers: 0]; } -(void)deleteWordBackward: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::DELETE_WORD_BACKWARD character: 0 modifiers: 0]; } -(void)deleteWordForward: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::DELETE_WORD_FORWARD character: 0 modifiers: 0]; } -(void)deleteToBeginningOfLine: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::DELETE_TO_BEGIN_OF_LINE character: 0 modifiers: 0]; } -(void)deleteToEndOfLine: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::DELETE_TO_END_OF_LINE character: 0 modifiers: 0]; } -(void)deleteToBeginningOfParagraph: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::DELETE_TO_BEGIN_OF_PARAGRAPH character: 0 modifiers: 0]; } -(void)deleteToEndOfParagraph: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::DELETE_TO_END_OF_PARAGRAPH character: 0 modifiers: 0]; } -(void)insertLineBreak: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::INSERT_LINEBREAK character: 0 modifiers: 0]; } -(void)insertParagraphSeparator: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::INSERT_PARAGRAPH character: 0 modifiers: 0]; } -(void)selectWord: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::SELECT_WORD character: 0 modifiers: 0]; } -(void)selectLine: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::SELECT_LINE character: 0 modifiers: 0]; } -(void)selectParagraph: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::SELECT_PARAGRAPH character: 0 modifiers: 0]; } -(void)selectAll: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: com::sun::star::awt::Key::SELECT_ALL character: 0 modifiers: 0]; } -(void)cancelOperation: (id)aSender { + (void)aSender; [self sendKeyInputAndReleaseToFrame: KEY_ESCAPE character: 0x1b modifiers: 0]; } -(void)noop: (id)aSender { + (void)aSender; if( ! mbKeyHandled ) { if( ! [self sendSingleCharacter:mpLastEvent] ) @@ -1513,12 +1583,14 @@ private: - (NSAttributedString *)attributedSubstringFromRange:(NSRange)theRange { + (void)theRange; // FIXME return nil; } - (unsigned int)characterIndexForPoint:(NSPoint)thePoint { + (void)thePoint; // FIXME return 0; } @@ -1562,6 +1634,7 @@ private: - (NSRect)firstRectForCharacterRange:(NSRange)theRange { + (void)theRange; SalExtTextInputPosEvent aPosEvent; mpFrame->CallCallback( SALEVENT_EXTTEXTINPUTPOS, (void *)&aPosEvent ); @@ -1607,7 +1680,8 @@ private: -(void)unregisterMouseEventListener: (id)theListener { - mpMouseEventListener = nil; + (void)theListener; + mpMouseEventListener = nil; } -(NSDragOperation)draggingEntered:(id )sender @@ -1647,7 +1721,8 @@ private: -(void)unregisterDraggingDestinationHandler:(id)theHandler { - mDraggingDestinationHandler = nil; + (void)theHandler; + mDraggingDestinationHandler = nil; } @end diff --git a/vcl/aqua/source/window/salnsmenu.mm b/vcl/aqua/source/window/salnsmenu.mm index cd6f7e1e2f28..fcc2392a01a9 100755 --- a/vcl/aqua/source/window/salnsmenu.mm +++ b/vcl/aqua/source/window/salnsmenu.mm @@ -45,6 +45,7 @@ -(void)menuNeedsUpdate: (NSMenu*)pMenu { + (void)pMenu; YIELD_GUARD; if( mpMenu ) @@ -84,6 +85,7 @@ } -(void)menuItemTriggered: (id)aSender { + (void)aSender; YIELD_GUARD; const AquaSalFrame* pFrame = mpMenuItem->mpParentMenu ? mpMenuItem->mpParentMenu->getFrame() : NULL; diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx index ebad1e68a8ca..aa7c421dbc65 100644 --- a/vcl/source/gdi/wall.cxx +++ b/vcl/source/gdi/wall.cxx @@ -40,7 +40,7 @@ #include -DBG_NAME( Wallpaper ); +DBG_NAME( Wallpaper ) // ----------------------------------------------------------------------- diff --git a/vcl/unx/headless/svpgdi.cxx b/vcl/unx/headless/svpgdi.cxx index a460bb271198..3a72e126e4d2 100644 --- a/vcl/unx/headless/svpgdi.cxx +++ b/vcl/unx/headless/svpgdi.cxx @@ -29,7 +29,6 @@ #include "svpbmp.hxx" #include -#include #include #include #include @@ -47,6 +46,7 @@ #endif #include +#include using namespace basegfx; using namespace basebmp; -- cgit v1.2.3 From 9ec7075d48206f13b65fb0442962aa3a2e687156 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 24 Mar 2011 14:48:19 +0100 Subject: vcl2gnumake: fix a warning --- sfx2/source/appl/shutdowniconaqua.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/sfx2/source/appl/shutdowniconaqua.mm b/sfx2/source/appl/shutdowniconaqua.mm index 14f12c79b53b..d51df52b02d1 100644 --- a/sfx2/source/appl/shutdowniconaqua.mm +++ b/sfx2/source/appl/shutdowniconaqua.mm @@ -115,6 +115,7 @@ using namespace ::com::sun::star::util; -(void)dockIconClicked: (NSObject*)pSender { + (void)pSender; // start start module ShutdownIcon::OpenURL( OUString( RTL_CONSTASCII_USTRINGPARAM( STARTMODULE_URL ) ), OUString( RTL_CONSTASCII_USTRINGPARAM( "_default" ) ) ); } -- cgit v1.2.3 From 00436cbc18dde46b81dd6b73224b489780918cae Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 24 Mar 2011 16:07:39 +0100 Subject: vcl2gnumake: add missing rpath on solaris to find system freetype library --- vcl/Library_vcl.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 445059ec4a9d..1bfc629b7a04 100755 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -454,6 +454,20 @@ $(eval $(call gb_Library_add_linked_libs,vcl,\ )) endif +ifeq ($(OS),SOLARIS) +ifeq ($(CPUNAME)$(CPU),SPARCU) +$(eval $(call gb_Library_set_ldflags,vcl,\ + $$(LDFLAGS) \ + -R/usr/sfw/lib/64 \ +)) +else +$(eval $(call gb_Library_set_ldflags,vcl,\ + $$(LDFLAGS) \ + -R/usr/sfw/lib \ +)) +endif +endif + ifeq ($(GUIBASE),aqua) $(eval $(call gb_Library_add_linked_libs,vcl,\ AppleRemote \ -- cgit v1.2.3 From c663055214e756935255ccb5cf8e61d151a41a2f Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 24 Mar 2011 16:10:32 +0100 Subject: vcl2gnumake: solve a merge problem --- postprocess/packcomponents/makefile.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk index f1626c62751a..a0e8d4e7fdbe 100644 --- a/postprocess/packcomponents/makefile.mk +++ b/postprocess/packcomponents/makefile.mk @@ -172,7 +172,6 @@ my_components = \ uui \ vbaobj \ vbaevents \ - vcl \ vclcanvas \ wpft \ writerfilter \ -- cgit v1.2.3 From 06a991f02fe0b68c58e27bc3f02d3ce32f7fb7d5 Mon Sep 17 00:00:00 2001 From: ka Date: Thu, 24 Mar 2011 21:44:02 +0100 Subject: rsvglibs: updated external jpeg library to 8c --- jpeg/jpeg-8c.patch | 174 +++++++++++++++++++++++++++++++++++++++++++++++++++++ jpeg/makefile.mk | 24 +++++--- jpeg/prj/build.lst | 4 +- jpeg/prj/d.lst | 12 ++-- 4 files changed, 196 insertions(+), 18 deletions(-) create mode 100644 jpeg/jpeg-8c.patch diff --git a/jpeg/jpeg-8c.patch b/jpeg/jpeg-8c.patch new file mode 100644 index 000000000000..a131f72fad0d --- /dev/null +++ b/jpeg/jpeg-8c.patch @@ -0,0 +1,174 @@ +--- misc/jpeg-8c/jconfig.h 2011-03-24 21:20:52.542761397 +0100 ++++ misc/build/jpeg-8c/jconfig.h 2011-03-24 21:15:20.712761156 +0100 +@@ -1 +1,58 @@ +-dummy ++/* jconfig.h. Generated from jconfig.cfg by configure. */ ++/* jconfig.cfg --- source file edited by configure script */ ++/* see jconfig.txt for explanations */ ++ ++#define HAVE_PROTOTYPES 1 ++#define HAVE_UNSIGNED_CHAR 1 ++#define HAVE_UNSIGNED_SHORT 1 ++/* #undef void */ ++/* #undef const */ ++/* #undef CHAR_IS_UNSIGNED */ ++#define HAVE_STDDEF_H 1 ++#define HAVE_STDLIB_H 1 ++#define HAVE_LOCALE_H 1 ++/* #undef NEED_BSD_STRINGS */ ++/* #undef NEED_SYS_TYPES_H */ ++/* #undef NEED_FAR_POINTERS */ ++/* #undef NEED_SHORT_EXTERNAL_NAMES */ ++/* Define this if you get warnings about undefined structures. */ ++/* #undef INCOMPLETE_TYPES_BROKEN */ ++ ++/* Define "boolean" as unsigned char, not int, on Windows systems. */ ++#ifdef WNT ++#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ ++typedef unsigned char boolean; ++#endif ++#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ ++#endif ++ ++#ifdef JPEG_INTERNALS ++ ++/* #undef RIGHT_SHIFT_IS_UNSIGNED */ ++#ifdef WNT ++#define INLINE __inline ++#else ++#define INLINE inline ++#endif ++/* These are for configuring the JPEG memory manager. */ ++/* #undef DEFAULT_MAX_MEM */ ++/* #undef NO_MKTEMP */ ++ ++#endif /* JPEG_INTERNALS */ ++ ++#ifdef JPEG_CJPEG_DJPEG ++ ++#undef BMP_SUPPORTED /* BMP image file format */ ++#undef GIF_SUPPORTED /* GIF image file format */ ++#undef PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ ++/* #undef RLE_SUPPORTED */ ++#undef TARGA_SUPPORTED /* Targa image file format */ ++ ++/* #undef TWO_FILE_COMMANDLINE */ ++/* #undef NEED_SIGNAL_CATCHER */ ++/* #undef DONT_USE_B_MODE */ ++ ++/* Define this if you want percent-done progress reports from cjpeg/djpeg. */ ++/* #undef PROGRESS_REPORT */ ++ ++#endif /* JPEG_CJPEG_DJPEG */ +Nur in misc/build/jpeg-8c: jconfig.h.dummy. +--- misc/jpeg-8c/jmorecfg.h 2009-11-20 09:01:24.000000000 +0100 ++++ misc/build/jpeg-8c/jmorecfg.h 2011-03-24 21:29:02.073761750 +0100 +@@ -21,7 +21,7 @@ + * We do not support run-time selection of data precision, sorry. + */ + +-#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ ++#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ + + + /* +@@ -158,7 +158,8 @@ + + /* INT32 must hold at least signed 32-bit values. */ + +-#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ ++#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ ++#ifndef _SOLAR_H + #ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */ + #ifndef _BASETSD_H /* MinGW is slightly different */ + #ifndef QGLOBAL_H /* Qt defines it in qglobal.h */ +@@ -166,6 +167,7 @@ + #endif + #endif + #endif ++#endif + #endif + + /* Datatype used for image dimensions. The JPEG standard only supports +--- misc/jpeg-8c/makefile.mk 2011-03-24 21:20:52.540761397 +0100 ++++ misc/build/jpeg-8c/makefile.mk 2011-03-24 21:15:20.712761156 +0100 +@@ -1 +1,77 @@ +-dummy ++#************************************************************************* ++# ++# Copyright according the GNU Public License. ++# ++#************************************************************************* ++ ++PRJ=..$/..$/..$/.. ++ ++PRJNAME=jpeg ++TARGET=jpeglib ++LIBTARGET=NO ++EXTERNAL_WARNINGS_NOT_ERRORS=TRUE ++VISIBILITY_HIDDEN=TRUE ++ ++# --- Settings ----------------------------------------------------------- ++ ++.INCLUDE : settings.mk ++ ++.IF "$(GUI)$(CPU)"=="WNTP" ++CFLAGS=$(CFLAGS) -Od ++.ENDIF ++ ++# --- Files -------------------------------------------------------- ++ ++SLOFILES= $(SLO)$/jaricom.obj \ ++ $(SLO)$/jcapimin.obj \ ++ $(SLO)$/jcapistd.obj \ ++ $(SLO)$/jcarith.obj \ ++ $(SLO)$/jccoefct.obj \ ++ $(SLO)$/jccolor.obj \ ++ $(SLO)$/jcdctmgr.obj \ ++ $(SLO)$/jchuff.obj \ ++ $(SLO)$/jcinit.obj \ ++ $(SLO)$/jcmainct.obj \ ++ $(SLO)$/jcmarker.obj \ ++ $(SLO)$/jcmaster.obj \ ++ $(SLO)$/jcomapi.obj \ ++ $(SLO)$/jcparam.obj \ ++ $(SLO)$/jcprepct.obj \ ++ $(SLO)$/jcsample.obj \ ++ $(SLO)$/jctrans.obj \ ++ $(SLO)$/jdapimin.obj \ ++ $(SLO)$/jdapistd.obj \ ++ $(SLO)$/jdarith.obj \ ++ $(SLO)$/jdatadst.obj \ ++ $(SLO)$/jdatasrc.obj \ ++ $(SLO)$/jdcoefct.obj \ ++ $(SLO)$/jdcolor.obj \ ++ $(SLO)$/jddctmgr.obj \ ++ $(SLO)$/jdhuff.obj \ ++ $(SLO)$/jdinput.obj \ ++ $(SLO)$/jdmainct.obj \ ++ $(SLO)$/jdmarker.obj \ ++ $(SLO)$/jdmaster.obj \ ++ $(SLO)$/jdmerge.obj \ ++ $(SLO)$/jdpostct.obj \ ++ $(SLO)$/jdsample.obj \ ++ $(SLO)$/jdtrans.obj \ ++ $(SLO)$/jerror.obj \ ++ $(SLO)$/jfdctflt.obj \ ++ $(SLO)$/jfdctfst.obj \ ++ $(SLO)$/jfdctint.obj \ ++ $(SLO)$/jidctflt.obj \ ++ $(SLO)$/jidctfst.obj \ ++ $(SLO)$/jidctint.obj \ ++ $(SLO)$/jquant1.obj \ ++ $(SLO)$/jquant2.obj \ ++ $(SLO)$/jutils.obj \ ++ $(SLO)$/jmemmgr.obj \ ++ $(SLO)$/jmemnobs.obj \ ++ $(SLO)$/jutils.obj ++ ++LIB1TARGET=$(SLB)$/$(TARGET).lib ++LIB1ARCHIV=$(LB)$/lib$(TARGET).a ++LIB1OBJFILES=$(SLOFILES) ++ ++.INCLUDE : target.mk +Nur in misc/build/jpeg-8c: makefile.mk.dummy. diff --git a/jpeg/makefile.mk b/jpeg/makefile.mk index b2553dd1b4f2..adc0c664c127 100644 --- a/jpeg/makefile.mk +++ b/jpeg/makefile.mk @@ -42,23 +42,27 @@ all: # --- Files -------------------------------------------------------- -TARFILE_NAME=jpeg-6b -TARFILE_MD5=dbd5f3b47ed13132f04c685d608a7547 +#TARFILE_NAME=jpeg-6b +TARFILE_NAME=jpeg-8c -PATCH_FILES=jpeg-6b.patch -ADDITIONAL_FILES=makefile.mk \ - jconfig.h +#TARFILE_MD5=dbd5f3b47ed13132f04c685d608a7547 +TARFILE_MD5=a2c10c04f396a9ce72894beb18b4e1f9 + +#PATCH_FILES=jpeg-6b.patch +PATCH_FILES=jpeg-8c.patch + +ADDITIONAL_FILES=makefile.mk jconfig.h #relative to CONFIGURE_DIR BUILD_DIR=$(CONFIGURE_DIR) BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS) -OUT2INC=jerror.h \ - jpeglib.h \ - jconfig.h \ - jmorecfg.h - +OUT2INC= jconfig.h \ + jerror.h \ + jmorecfg.h \ + jpegint.h \ + jpeglib.h # --- Targets ------------------------------------------------------ diff --git a/jpeg/prj/build.lst b/jpeg/prj/build.lst index b0fe1f0aaf68..ef26ed4a7926 100644 --- a/jpeg/prj/build.lst +++ b/jpeg/prj/build.lst @@ -1,2 +1,2 @@ -jg jpeg : soltools NULL -jg jpeg nmake - all jg_mkout NULL +jg jpeg : soltools NULL +jg jpeg nmake - all jg_mkout NULL diff --git a/jpeg/prj/d.lst b/jpeg/prj/d.lst index 8bda1b88ea9d..237883b36951 100644 --- a/jpeg/prj/d.lst +++ b/jpeg/prj/d.lst @@ -1,10 +1,10 @@ mkdir: %_DEST%\inc%_EXT%\external mkdir: %_DEST%\inc%_EXT%\external\jpeg -..\%__SRC%\slb\jpeglib.lib %_DEST%\lib%_EXT%\jpeglib.lib -..\%__SRC%\lib\libjpeglib.a %_DEST%\lib%_EXT%\libjpeglib.a +..\%__SRC%\slb\jpeglib.lib %_DEST%\lib%_EXT%\jpeg.lib +..\%__SRC%\lib\libjpeglib.a %_DEST%\lib%_EXT%\libjpeg.a -..\%__SRC%\inc\jerror.h %_DEST%\inc%_EXT%\external\jerror.h -..\%__SRC%\inc\jpeglib.h %_DEST%\inc%_EXT%\external\jpeglib.h -..\%__SRC%\inc\jconfig.h %_DEST%\inc%_EXT%\external\jconfig.h -..\%__SRC%\inc\jmorecfg.h %_DEST%\inc%_EXT%\external\jmorecfg.h +..\%__SRC%\inc\jerror.h %_DEST%\inc%_EXT%\external\jpeg\jerror.h +..\%__SRC%\inc\jpeglib.h %_DEST%\inc%_EXT%\external\jpeg\jpeglib.h +..\%__SRC%\inc\jconfig.h %_DEST%\inc%_EXT%\external\jpeg\jconfig.h +..\%__SRC%\inc\jmorecfg.h %_DEST%\inc%_EXT%\external\jpeg\jmorecfg.h -- cgit v1.2.3 From 323cf246437ae0e7e04df44c3e164d87d1d08184 Mon Sep 17 00:00:00 2001 From: ka Date: Thu, 24 Mar 2011 21:58:54 +0100 Subject: rsvglibs: cleanup --- libjpeg/jpeg-8c.patch | 143 ------------------------ libjpeg/makefile.mk | 66 ----------- libjpeg/prj/build.lst | 3 - libjpeg/prj/d.lst | 11 -- libpng/libpng-1.5.1.patch | 277 +++++++++++++++++++++++++++++++++++++++++++++ libpng/libpng.patch | 278 ---------------------------------------------- libpng/makefile.mk | 3 +- 7 files changed, 278 insertions(+), 503 deletions(-) delete mode 100644 libjpeg/jpeg-8c.patch delete mode 100644 libjpeg/makefile.mk delete mode 100644 libjpeg/prj/build.lst delete mode 100644 libjpeg/prj/d.lst create mode 100644 libpng/libpng-1.5.1.patch delete mode 100644 libpng/libpng.patch diff --git a/libjpeg/jpeg-8c.patch b/libjpeg/jpeg-8c.patch deleted file mode 100644 index 76c8d30c5732..000000000000 --- a/libjpeg/jpeg-8c.patch +++ /dev/null @@ -1,143 +0,0 @@ ---- misc/jpeg-8c/jconfig.h 2011-03-07 13:16:09.000000000 +0100 -+++ misc/build/jpeg-8c/jconfig.h 2011-03-07 13:15:03.000000000 +0100 -@@ -1 +1,58 @@ --dummy -+/* jconfig.h. Generated from jconfig.cfg by configure. */ -+/* jconfig.cfg --- source file edited by configure script */ -+/* see jconfig.txt for explanations */ -+ -+#define HAVE_PROTOTYPES 1 -+#define HAVE_UNSIGNED_CHAR 1 -+#define HAVE_UNSIGNED_SHORT 1 -+/* #undef void */ -+/* #undef const */ -+/* #undef CHAR_IS_UNSIGNED */ -+#define HAVE_STDDEF_H 1 -+#define HAVE_STDLIB_H 1 -+#define HAVE_LOCALE_H 1 -+/* #undef NEED_BSD_STRINGS */ -+/* #undef NEED_SYS_TYPES_H */ -+/* #undef NEED_FAR_POINTERS */ -+/* #undef NEED_SHORT_EXTERNAL_NAMES */ -+/* Define this if you get warnings about undefined structures. */ -+/* #undef INCOMPLETE_TYPES_BROKEN */ -+ -+/* Define "boolean" as unsigned char, not int, on Windows systems. */ -+#ifdef WNT -+#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ -+typedef unsigned char boolean; -+#endif -+#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ -+#endif -+ -+#ifdef JPEG_INTERNALS -+ -+/* #undef RIGHT_SHIFT_IS_UNSIGNED */ -+#ifdef WNT -+#define INLINE __inline -+#else -+#define INLINE inline -+#endif -+/* These are for configuring the JPEG memory manager. */ -+/* #undef DEFAULT_MAX_MEM */ -+/* #undef NO_MKTEMP */ -+ -+#endif /* JPEG_INTERNALS */ -+ -+#ifdef JPEG_CJPEG_DJPEG -+ -+#define BMP_SUPPORTED /* BMP image file format */ -+#define GIF_SUPPORTED /* GIF image file format */ -+#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -+/* #undef RLE_SUPPORTED */ -+#define TARGA_SUPPORTED /* Targa image file format */ -+ -+/* #undef TWO_FILE_COMMANDLINE */ -+/* #undef NEED_SIGNAL_CATCHER */ -+/* #undef DONT_USE_B_MODE */ -+ -+/* Define this if you want percent-done progress reports from cjpeg/djpeg. */ -+/* #undef PROGRESS_REPORT */ -+ -+#endif /* JPEG_CJPEG_DJPEG */ ---- misc/jpeg-8c/makefile.mk 2011-03-07 13:16:09.000000000 +0100 -+++ misc/build/jpeg-8c/makefile.mk 2011-03-07 13:15:39.000000000 +0100 -@@ -1 +1,77 @@ --dummy -+#************************************************************************* -+# -+# Copyright according the GNU Public License. -+# -+#************************************************************************* -+ -+PRJ=..$/..$/..$/.. -+ -+PRJNAME=libjpeg -+TARGET=jpeg -+LIBTARGET=NO -+EXTERNAL_WARNINGS_NOT_ERRORS=TRUE -+VISIBILITY_HIDDEN=TRUE -+ -+# --- Settings ----------------------------------------------------------- -+ -+.INCLUDE : settings.mk -+ -+.IF "$(GUI)$(CPU)"=="WNTP" -+CFLAGS=$(CFLAGS) -Od -+.ENDIF -+ -+# --- Files -------------------------------------------------------- -+ -+SLOFILES= $(SLO)$/jaricom.obj \ -+ $(SLO)$/jcapimin.obj \ -+ $(SLO)$/jcapistd.obj \ -+ $(SLO)$/jcarith.obj \ -+ $(SLO)$/jccoefct.obj \ -+ $(SLO)$/jccolor.obj \ -+ $(SLO)$/jcdctmgr.obj \ -+ $(SLO)$/jchuff.obj \ -+ $(SLO)$/jcinit.obj \ -+ $(SLO)$/jcmainct.obj \ -+ $(SLO)$/jcmarker.obj \ -+ $(SLO)$/jcmaster.obj \ -+ $(SLO)$/jcomapi.obj \ -+ $(SLO)$/jcparam.obj \ -+ $(SLO)$/jcprepct.obj \ -+ $(SLO)$/jcsample.obj \ -+ $(SLO)$/jctrans.obj \ -+ $(SLO)$/jdapimin.obj \ -+ $(SLO)$/jdapistd.obj \ -+ $(SLO)$/jdarith.obj \ -+ $(SLO)$/jdatadst.obj \ -+ $(SLO)$/jdatasrc.obj \ -+ $(SLO)$/jdcoefct.obj \ -+ $(SLO)$/jdcolor.obj \ -+ $(SLO)$/jddctmgr.obj \ -+ $(SLO)$/jdhuff.obj \ -+ $(SLO)$/jdinput.obj \ -+ $(SLO)$/jdmainct.obj \ -+ $(SLO)$/jdmarker.obj \ -+ $(SLO)$/jdmaster.obj \ -+ $(SLO)$/jdmerge.obj \ -+ $(SLO)$/jdpostct.obj \ -+ $(SLO)$/jdsample.obj \ -+ $(SLO)$/jdtrans.obj \ -+ $(SLO)$/jerror.obj \ -+ $(SLO)$/jfdctflt.obj \ -+ $(SLO)$/jfdctfst.obj \ -+ $(SLO)$/jfdctint.obj \ -+ $(SLO)$/jidctflt.obj \ -+ $(SLO)$/jidctfst.obj \ -+ $(SLO)$/jidctint.obj \ -+ $(SLO)$/jquant1.obj \ -+ $(SLO)$/jquant2.obj \ -+ $(SLO)$/jutils.obj \ -+ $(SLO)$/jmemmgr.obj \ -+ $(SLO)$/jmemnobs.obj \ -+ $(SLO)$/jutils.obj -+ -+LIB1TARGET=$(SLB)$/$(TARGET).lib -+LIB1ARCHIV=$(LB)$/lib$(TARGET).a -+LIB1OBJFILES=$(SLOFILES) -+ -+.INCLUDE : target.mk diff --git a/libjpeg/makefile.mk b/libjpeg/makefile.mk deleted file mode 100644 index 779f0bce7c64..000000000000 --- a/libjpeg/makefile.mk +++ /dev/null @@ -1,66 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=. - -PRJNAME=libjpeg -TARGET=jpeg8 - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -.IF "$(SYSTEM_LIBJPEG)" == "YES" -all: - @echo "An already available installation of libjpeg should exist on your system." - @echo "Therefore the version provided here does not need to be built in addition." -.ENDIF - -# --- Files -------------------------------------------------------- - -TARFILE_NAME=jpeg-8c -TARFILE_MD5=a2c10c04f396a9ce72894beb18b4e1f9 - -PATCH_FILES=jpeg-8c.patch -ADDITIONAL_FILES=makefile.mk jconfig.h - -#relative to CONFIGURE_DIR - -BUILD_DIR=$(CONFIGURE_DIR) -BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS) - -OUT2INC= jconfig.h \ - jerror.h \ - jmorecfg.h \ - jpegint.h \ - jpeglib.h - -# --- Targets ------------------------------------------------------ - -.INCLUDE : set_ext.mk -.INCLUDE : target.mk -.INCLUDE : tg_ext.mk diff --git a/libjpeg/prj/build.lst b/libjpeg/prj/build.lst deleted file mode 100644 index fbb2f6f45704..000000000000 --- a/libjpeg/prj/build.lst +++ /dev/null @@ -1,3 +0,0 @@ -ljpeg libjpeg : soltools NULL -ljpeg libjpeg usr1 - all ljpeg_mkout NULL -ljpeg libjpeg nmake - all ljpeg_libjpeg NULL diff --git a/libjpeg/prj/d.lst b/libjpeg/prj/d.lst deleted file mode 100644 index 2c153159a08e..000000000000 --- a/libjpeg/prj/d.lst +++ /dev/null @@ -1,11 +0,0 @@ -mkdir: %_DEST%\inc%_EXT%\external -mkdir: %_DEST%\inc%_EXT%\external\libjpeg - -..\%__SRC%\slb\jpeg.lib %_DEST%\lib%_EXT%\jpeg.lib -..\%__SRC%\lib\libjpeg.a %_DEST%\lib%_EXT%\libjpeg.a - -..\%__SRC%\inc\jpeglib.h %_DEST%\inc%_EXT%\external\libjpeg\jpeglib.h -..\%__SRC%\inc\jconfig.h %_DEST%\inc%_EXT%\external\libjpeg\jconfig.h -..\%__SRC%\inc\jmorecfg.h %_DEST%\inc%_EXT%\external\libjpeg\jmorecfg.h -..\%__SRC%\inc\jerror.h %_DEST%\inc%_EXT%\external\libjpeg\jerror.h -..\%__SRC%\inc\jpegint.h %_DEST%\inc%_EXT%\external\libjpeg\jpegint.h diff --git a/libpng/libpng-1.5.1.patch b/libpng/libpng-1.5.1.patch new file mode 100644 index 000000000000..b64d92430f55 --- /dev/null +++ b/libpng/libpng-1.5.1.patch @@ -0,0 +1,277 @@ +--- misc/libpng-1.5.1/makefile.mk 2011-03-24 21:49:50.911397154 +0100 ++++ misc/build/libpng-1.5.1/makefile.mk 2011-03-24 21:47:23.379397048 +0100 +@@ -1 +1,49 @@ +-dummy ++#************************************************************************* ++# ++# Copyright according the GNU Public License. ++# ++#************************************************************************* ++ ++PRJ=..$/..$/..$/.. ++ ++PRJNAME=libpng ++TARGET=libpng ++LIBTARGET=NO ++EXTERNAL_WARNINGS_NOT_ERRORS=TRUE ++VISIBILITY_HIDDEN=TRUE ++ ++# --- Settings ----------------------------------------------------------- ++ ++.INCLUDE : settings.mk ++ ++ ++.IF "$(GUI)$(CPU)"=="WNTP" ++CFLAGS=$(CFLAGS) -Od ++.ENDIF ++ ++# --- Files -------------------------------------------------------- ++ ++SLOFILES= $(SLO)$/png.obj \ ++ $(SLO)$/pngerror.obj \ ++ $(SLO)$/pngget.obj \ ++ $(SLO)$/pngmem.obj \ ++ $(SLO)$/pngpread.obj \ ++ $(SLO)$/pngread.obj \ ++ $(SLO)$/pngrio.obj \ ++ $(SLO)$/pngrtran.obj \ ++ $(SLO)$/pngrutil.obj \ ++ $(SLO)$/pngset.obj \ ++ $(SLO)$/pngtest.obj \ ++ $(SLO)$/pngtrans.obj \ ++ $(SLO)$/pngvalid.obj \ ++ $(SLO)$/pngwio.obj \ ++ $(SLO)$/pngwrite.obj \ ++ $(SLO)$/pngwtran.obj \ ++ $(SLO)$/pngwutil.obj ++ ++LIB1TARGET=$(SLB)$/$(TARGET).lib ++LIB1ARCHIV=$(LB)$/$(TARGET).a ++LIB1OBJFILES=$(SLOFILES) ++ ++.INCLUDE : target.mk ++ +--- misc/libpng-1.5.1/pnglibconf.h 2011-03-24 21:49:50.913397154 +0100 ++++ misc/build/libpng-1.5.1/pnglibconf.h 2011-03-24 21:47:23.380397048 +0100 +@@ -1 +1,176 @@ +-dummy ++ ++/* libpng STANDARD API DEFINITION */ ++ ++/* pnglibconf.h - library build configuration */ ++ ++/* libpng version 1.5.0 - last changed on January 6, 2011 */ ++ ++/* Copyright (c) 1998-2011 Glenn Randers-Pehrson */ ++ ++/* This code is released under the libpng license. */ ++/* For conditions of distribution and use, see the disclaimer */ ++/* and license in png.h */ ++ ++/* pnglibconf.h */ ++/* Machine generated file: DO NOT EDIT */ ++/* Derived from: scripts/pnglibconf.dfa */ ++#ifndef PNGLCONF_H ++#define PNGLCONF_H ++/* settings */ ++#define PNG_MAX_GAMMA_8 11 ++#define PNG_CALLOC_SUPPORTED ++#define PNG_QUANTIZE_RED_BITS 5 ++#define PNG_USER_WIDTH_MAX 1000000L ++#define PNG_QUANTIZE_GREEN_BITS 5 ++#define PNG_API_RULE 0 ++#define PNG_QUANTIZE_BLUE_BITS 5 ++#define PNG_USER_CHUNK_CACHE_MAX 0 ++#define PNG_USER_HEIGHT_MAX 1000000L ++#define PNG_sCAL_PRECISION 5 ++#define PNG_COST_SHIFT 3 ++#define PNG_WEIGHT_SHIFT 8 ++#define PNG_USER_CHUNK_MALLOC_MAX 0 ++#define PNG_DEFAULT_READ_MACROS 1 ++#define PNG_ZBUF_SIZE 8192 ++#define PNG_GAMMA_THRESHOLD_FIXED 5000 ++/* end of settings */ ++/* options */ ++#define PNG_INFO_IMAGE_SUPPORTED ++#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED ++#define PNG_POINTER_INDEXING_SUPPORTED ++#define PNG_WARNINGS_SUPPORTED ++#define PNG_FLOATING_ARITHMETIC_SUPPORTED ++#define PNG_WRITE_SUPPORTED ++#define PNG_WRITE_INTERLACING_SUPPORTED ++#define PNG_WRITE_16BIT_SUPPORTED ++#define PNG_EASY_ACCESS_SUPPORTED ++#define PNG_ALIGN_MEMORY_SUPPORTED ++#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED ++#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED ++#define PNG_USER_LIMITS_SUPPORTED ++#define PNG_FIXED_POINT_SUPPORTED ++/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/ ++#define PNG_ERROR_TEXT_SUPPORTED ++#define PNG_READ_SUPPORTED ++/*#undef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED*/ ++#define PNG_BENIGN_ERRORS_SUPPORTED ++#define PNG_SETJMP_SUPPORTED ++#define PNG_WRITE_FLUSH_SUPPORTED ++#define PNG_MNG_FEATURES_SUPPORTED ++#define PNG_FLOATING_POINT_SUPPORTED ++#define PNG_INCH_CONVERSIONS_SUPPORTED ++#define PNG_STDIO_SUPPORTED ++#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED ++#define PNG_USER_MEM_SUPPORTED ++#define PNG_IO_STATE_SUPPORTED ++#define PNG_SET_USER_LIMITS_SUPPORTED ++#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED ++#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED ++#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED ++#define PNG_WRITE_FILTER_SUPPORTED ++#define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED ++#define PNG_WRITE_iCCP_SUPPORTED ++#define PNG_READ_TRANSFORMS_SUPPORTED ++#define PNG_READ_GAMMA_SUPPORTED ++#define PNG_READ_bKGD_SUPPORTED ++#define PNG_UNKNOWN_CHUNKS_SUPPORTED ++#define PNG_READ_sCAL_SUPPORTED ++#define PNG_WRITE_hIST_SUPPORTED ++#define PNG_READ_OPT_PLTE_SUPPORTED ++#define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED ++#define PNG_WRITE_gAMA_SUPPORTED ++#define PNG_READ_GRAY_TO_RGB_SUPPORTED ++#define PNG_WRITE_pCAL_SUPPORTED ++#define PNG_READ_INVERT_ALPHA_SUPPORTED ++#define PNG_WRITE_TRANSFORMS_SUPPORTED ++#define PNG_READ_sBIT_SUPPORTED ++#define PNG_READ_PACK_SUPPORTED ++#define PNG_WRITE_SWAP_SUPPORTED ++#define PNG_READ_cHRM_SUPPORTED ++#define PNG_WRITE_tIME_SUPPORTED ++#define PNG_READ_INTERLACING_SUPPORTED ++#define PNG_READ_tRNS_SUPPORTED ++#define PNG_WRITE_pHYs_SUPPORTED ++#define PNG_WRITE_INVERT_SUPPORTED ++#define PNG_READ_RGB_TO_GRAY_SUPPORTED ++#define PNG_WRITE_sRGB_SUPPORTED ++#define PNG_READ_oFFs_SUPPORTED ++#define PNG_WRITE_FILLER_SUPPORTED ++#define PNG_WRITE_TEXT_SUPPORTED ++#define PNG_WRITE_SHIFT_SUPPORTED ++#define PNG_PROGRESSIVE_READ_SUPPORTED ++#define PNG_READ_SHIFT_SUPPORTED ++#define PNG_CONVERT_tIME_SUPPORTED ++#define PNG_READ_USER_TRANSFORM_SUPPORTED ++#define PNG_READ_INT_FUNCTIONS_SUPPORTED ++#define PNG_READ_USER_CHUNKS_SUPPORTED ++#define PNG_READ_hIST_SUPPORTED ++#define PNG_READ_16BIT_SUPPORTED ++#define PNG_READ_SWAP_ALPHA_SUPPORTED ++#define PNG_READ_COMPOSITE_NODIV_SUPPORTED ++#define PNG_SEQUENTIAL_READ_SUPPORTED ++#define PNG_READ_BACKGROUND_SUPPORTED ++#define PNG_READ_QUANTIZE_SUPPORTED ++#define PNG_READ_iCCP_SUPPORTED ++#define PNG_READ_STRIP_ALPHA_SUPPORTED ++#define PNG_READ_PACKSWAP_SUPPORTED ++#define PNG_READ_sRGB_SUPPORTED ++#define PNG_WRITE_tEXt_SUPPORTED ++#define PNG_READ_gAMA_SUPPORTED ++#define PNG_READ_pCAL_SUPPORTED ++#define PNG_READ_EXPAND_SUPPORTED ++#define PNG_WRITE_sPLT_SUPPORTED ++#define PNG_READ_SWAP_SUPPORTED ++#define PNG_READ_tIME_SUPPORTED ++#define PNG_READ_pHYs_SUPPORTED ++#define PNG_WRITE_SWAP_ALPHA_SUPPORTED ++#define PNG_TIME_RFC1123_SUPPORTED ++#define PNG_READ_TEXT_SUPPORTED ++#define PNG_WRITE_BGR_SUPPORTED ++#define PNG_USER_CHUNKS_SUPPORTED ++#define PNG_CONSOLE_IO_SUPPORTED ++#define PNG_WRITE_PACK_SUPPORTED ++#define PNG_READ_FILLER_SUPPORTED ++#define PNG_WRITE_bKGD_SUPPORTED ++#define PNG_WRITE_tRNS_SUPPORTED ++#define PNG_READ_sPLT_SUPPORTED ++#define PNG_WRITE_sCAL_SUPPORTED ++#define PNG_WRITE_oFFs_SUPPORTED ++#define PNG_READ_tEXt_SUPPORTED ++#define PNG_WRITE_sBIT_SUPPORTED ++#define PNG_READ_INVERT_SUPPORTED ++#define PNG_READ_16_TO_8_SUPPORTED ++#define PNG_WRITE_cHRM_SUPPORTED ++#define PNG_16BIT_SUPPORTED ++#define PNG_WRITE_USER_TRANSFORM_SUPPORTED ++#define PNG_READ_BGR_SUPPORTED ++#define PNG_WRITE_PACKSWAP_SUPPORTED ++#define PNG_WRITE_INVERT_ALPHA_SUPPORTED ++#define PNG_sCAL_SUPPORTED ++#define PNG_WRITE_zTXt_SUPPORTED ++#define PNG_sBIT_SUPPORTED ++#define PNG_cHRM_SUPPORTED ++#define PNG_bKGD_SUPPORTED ++#define PNG_tRNS_SUPPORTED ++#define PNG_WRITE_iTXt_SUPPORTED ++#define PNG_oFFs_SUPPORTED ++#define PNG_USER_TRANSFORM_PTR_SUPPORTED ++#define PNG_USER_TRANSFORM_INFO_SUPPORTED ++#define PNG_hIST_SUPPORTED ++#define PNG_iCCP_SUPPORTED ++#define PNG_sRGB_SUPPORTED ++#define PNG_READ_zTXt_SUPPORTED ++#define PNG_gAMA_SUPPORTED ++#define PNG_pCAL_SUPPORTED ++#define PNG_CHECK_cHRM_SUPPORTED ++#define PNG_tIME_SUPPORTED ++#define PNG_pHYs_SUPPORTED ++#define PNG_READ_iTXt_SUPPORTED ++#define PNG_TEXT_SUPPORTED ++#define PNG_SAVE_INT_32_SUPPORTED ++#define PNG_sPLT_SUPPORTED ++#define PNG_tEXt_SUPPORTED ++#define PNG_zTXt_SUPPORTED ++#define PNG_iTXt_SUPPORTED ++/* end of options */ ++#endif /* PNGLCONF_H */ +--- misc/libpng-1.5.1/pngstruct.h 2011-02-03 05:58:17.000000000 +0100 ++++ misc/build/libpng-1.5.1/pngstruct.h 2011-03-24 21:47:23.380397048 +0100 +@@ -24,7 +24,11 @@ + * in this structure and is required for decompressing the LZ compressed + * data in PNG files. + */ ++#if defined MACOSX + #include "zlib.h" ++#else ++#include ++#endif + + struct png_struct_def + { +--- misc/libpng-1.5.1/pngtest.c 2011-02-03 05:58:17.000000000 +0100 ++++ misc/build/libpng-1.5.1/pngtest.c 2011-03-24 21:47:23.380397048 +0100 +@@ -31,7 +31,12 @@ + * of files at once by typing "pngtest -m file1.png file2.png ..." + */ + ++#if defined MACOSX + #include "zlib.h" ++#else ++#include ++#endif ++ + #include "png.h" + /* Copied from pngpriv.h but only used in error messages below. */ + #ifndef PNG_ZBUF_SIZE +--- misc/libpng-1.5.1/pngvalid.c 2011-02-03 05:58:17.000000000 +0100 ++++ misc/build/libpng-1.5.1/pngvalid.c 2011-03-24 21:47:23.381397048 +0100 +@@ -51,7 +51,11 @@ + #define PNG_READ_16BIT_SUPPORTED + #endif + +-#include "zlib.h" /* For crc32 */ ++#if defined MACOSX ++#include "zlib.h" ++#else ++#include ++#endif + + #include /* For floating point constants */ + #include /* For malloc */ diff --git a/libpng/libpng.patch b/libpng/libpng.patch deleted file mode 100644 index 3bfc76c9131b..000000000000 --- a/libpng/libpng.patch +++ /dev/null @@ -1,278 +0,0 @@ ---- misc/libpng-1.5.1/makefile.mk 2011-03-01 00:01:58.221734678 +0100 -+++ misc/build/libpng-1.5.1/makefile.mk 2011-02-28 23:52:40.953319424 +0100 -@@ -1 +1,49 @@ --dummy -+#************************************************************************* -+# -+# Copyright according the GNU Public License. -+# -+#************************************************************************* -+ -+PRJ=..$/..$/..$/.. -+ -+PRJNAME=libpng -+TARGET=libpng -+LIBTARGET=NO -+EXTERNAL_WARNINGS_NOT_ERRORS=TRUE -+VISIBILITY_HIDDEN=TRUE -+ -+# --- Settings ----------------------------------------------------------- -+ -+.INCLUDE : settings.mk -+ -+ -+.IF "$(GUI)$(CPU)"=="WNTP" -+CFLAGS=$(CFLAGS) -Od -+.ENDIF -+ -+# --- Files -------------------------------------------------------- -+ -+SLOFILES= $(SLO)$/png.obj \ -+ $(SLO)$/pngerror.obj \ -+ $(SLO)$/pngget.obj \ -+ $(SLO)$/pngmem.obj \ -+ $(SLO)$/pngpread.obj \ -+ $(SLO)$/pngread.obj \ -+ $(SLO)$/pngrio.obj \ -+ $(SLO)$/pngrtran.obj \ -+ $(SLO)$/pngrutil.obj \ -+ $(SLO)$/pngset.obj \ -+ $(SLO)$/pngtest.obj \ -+ $(SLO)$/pngtrans.obj \ -+ $(SLO)$/pngvalid.obj \ -+ $(SLO)$/pngwio.obj \ -+ $(SLO)$/pngwrite.obj \ -+ $(SLO)$/pngwtran.obj \ -+ $(SLO)$/pngwutil.obj -+ -+LIB1TARGET=$(SLB)$/$(TARGET).lib -+LIB1ARCHIV=$(LB)$/$(TARGET).a -+LIB1OBJFILES=$(SLOFILES) -+ -+.INCLUDE : target.mk -+ ---- misc/libpng-1.5.1/pnglibconf.h 2011-03-02 15:19:29.537422800 +0100 -+++ misc/build/libpng-1.5.1/pnglibconf.h 2011-03-02 15:18:11.492358700 +0100 -@@ -1 +1,176 @@ --dummy -+ -+/* libpng STANDARD API DEFINITION */ -+ -+/* pnglibconf.h - library build configuration */ -+ -+/* libpng version 1.5.0 - last changed on January 6, 2011 */ -+ -+/* Copyright (c) 1998-2011 Glenn Randers-Pehrson */ -+ -+/* This code is released under the libpng license. */ -+/* For conditions of distribution and use, see the disclaimer */ -+/* and license in png.h */ -+ -+/* pnglibconf.h */ -+/* Machine generated file: DO NOT EDIT */ -+/* Derived from: scripts/pnglibconf.dfa */ -+#ifndef PNGLCONF_H -+#define PNGLCONF_H -+/* settings */ -+#define PNG_MAX_GAMMA_8 11 -+#define PNG_CALLOC_SUPPORTED -+#define PNG_QUANTIZE_RED_BITS 5 -+#define PNG_USER_WIDTH_MAX 1000000L -+#define PNG_QUANTIZE_GREEN_BITS 5 -+#define PNG_API_RULE 0 -+#define PNG_QUANTIZE_BLUE_BITS 5 -+#define PNG_USER_CHUNK_CACHE_MAX 0 -+#define PNG_USER_HEIGHT_MAX 1000000L -+#define PNG_sCAL_PRECISION 5 -+#define PNG_COST_SHIFT 3 -+#define PNG_WEIGHT_SHIFT 8 -+#define PNG_USER_CHUNK_MALLOC_MAX 0 -+#define PNG_DEFAULT_READ_MACROS 1 -+#define PNG_ZBUF_SIZE 8192 -+#define PNG_GAMMA_THRESHOLD_FIXED 5000 -+/* end of settings */ -+/* options */ -+#define PNG_INFO_IMAGE_SUPPORTED -+#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED -+#define PNG_POINTER_INDEXING_SUPPORTED -+#define PNG_WARNINGS_SUPPORTED -+#define PNG_FLOATING_ARITHMETIC_SUPPORTED -+#define PNG_WRITE_SUPPORTED -+#define PNG_WRITE_INTERLACING_SUPPORTED -+#define PNG_WRITE_16BIT_SUPPORTED -+#define PNG_EASY_ACCESS_SUPPORTED -+#define PNG_ALIGN_MEMORY_SUPPORTED -+#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED -+#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED -+#define PNG_USER_LIMITS_SUPPORTED -+#define PNG_FIXED_POINT_SUPPORTED -+/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/ -+#define PNG_ERROR_TEXT_SUPPORTED -+#define PNG_READ_SUPPORTED -+/*#undef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED*/ -+#define PNG_BENIGN_ERRORS_SUPPORTED -+#define PNG_SETJMP_SUPPORTED -+#define PNG_WRITE_FLUSH_SUPPORTED -+#define PNG_MNG_FEATURES_SUPPORTED -+#define PNG_FLOATING_POINT_SUPPORTED -+#define PNG_INCH_CONVERSIONS_SUPPORTED -+#define PNG_STDIO_SUPPORTED -+#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED -+#define PNG_USER_MEM_SUPPORTED -+#define PNG_IO_STATE_SUPPORTED -+#define PNG_SET_USER_LIMITS_SUPPORTED -+#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED -+#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED -+#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED -+#define PNG_WRITE_FILTER_SUPPORTED -+#define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED -+#define PNG_WRITE_iCCP_SUPPORTED -+#define PNG_READ_TRANSFORMS_SUPPORTED -+#define PNG_READ_GAMMA_SUPPORTED -+#define PNG_READ_bKGD_SUPPORTED -+#define PNG_UNKNOWN_CHUNKS_SUPPORTED -+#define PNG_READ_sCAL_SUPPORTED -+#define PNG_WRITE_hIST_SUPPORTED -+#define PNG_READ_OPT_PLTE_SUPPORTED -+#define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED -+#define PNG_WRITE_gAMA_SUPPORTED -+#define PNG_READ_GRAY_TO_RGB_SUPPORTED -+#define PNG_WRITE_pCAL_SUPPORTED -+#define PNG_READ_INVERT_ALPHA_SUPPORTED -+#define PNG_WRITE_TRANSFORMS_SUPPORTED -+#define PNG_READ_sBIT_SUPPORTED -+#define PNG_READ_PACK_SUPPORTED -+#define PNG_WRITE_SWAP_SUPPORTED -+#define PNG_READ_cHRM_SUPPORTED -+#define PNG_WRITE_tIME_SUPPORTED -+#define PNG_READ_INTERLACING_SUPPORTED -+#define PNG_READ_tRNS_SUPPORTED -+#define PNG_WRITE_pHYs_SUPPORTED -+#define PNG_WRITE_INVERT_SUPPORTED -+#define PNG_READ_RGB_TO_GRAY_SUPPORTED -+#define PNG_WRITE_sRGB_SUPPORTED -+#define PNG_READ_oFFs_SUPPORTED -+#define PNG_WRITE_FILLER_SUPPORTED -+#define PNG_WRITE_TEXT_SUPPORTED -+#define PNG_WRITE_SHIFT_SUPPORTED -+#define PNG_PROGRESSIVE_READ_SUPPORTED -+#define PNG_READ_SHIFT_SUPPORTED -+#define PNG_CONVERT_tIME_SUPPORTED -+#define PNG_READ_USER_TRANSFORM_SUPPORTED -+#define PNG_READ_INT_FUNCTIONS_SUPPORTED -+#define PNG_READ_USER_CHUNKS_SUPPORTED -+#define PNG_READ_hIST_SUPPORTED -+#define PNG_READ_16BIT_SUPPORTED -+#define PNG_READ_SWAP_ALPHA_SUPPORTED -+#define PNG_READ_COMPOSITE_NODIV_SUPPORTED -+#define PNG_SEQUENTIAL_READ_SUPPORTED -+#define PNG_READ_BACKGROUND_SUPPORTED -+#define PNG_READ_QUANTIZE_SUPPORTED -+#define PNG_READ_iCCP_SUPPORTED -+#define PNG_READ_STRIP_ALPHA_SUPPORTED -+#define PNG_READ_PACKSWAP_SUPPORTED -+#define PNG_READ_sRGB_SUPPORTED -+#define PNG_WRITE_tEXt_SUPPORTED -+#define PNG_READ_gAMA_SUPPORTED -+#define PNG_READ_pCAL_SUPPORTED -+#define PNG_READ_EXPAND_SUPPORTED -+#define PNG_WRITE_sPLT_SUPPORTED -+#define PNG_READ_SWAP_SUPPORTED -+#define PNG_READ_tIME_SUPPORTED -+#define PNG_READ_pHYs_SUPPORTED -+#define PNG_WRITE_SWAP_ALPHA_SUPPORTED -+#define PNG_TIME_RFC1123_SUPPORTED -+#define PNG_READ_TEXT_SUPPORTED -+#define PNG_WRITE_BGR_SUPPORTED -+#define PNG_USER_CHUNKS_SUPPORTED -+#define PNG_CONSOLE_IO_SUPPORTED -+#define PNG_WRITE_PACK_SUPPORTED -+#define PNG_READ_FILLER_SUPPORTED -+#define PNG_WRITE_bKGD_SUPPORTED -+#define PNG_WRITE_tRNS_SUPPORTED -+#define PNG_READ_sPLT_SUPPORTED -+#define PNG_WRITE_sCAL_SUPPORTED -+#define PNG_WRITE_oFFs_SUPPORTED -+#define PNG_READ_tEXt_SUPPORTED -+#define PNG_WRITE_sBIT_SUPPORTED -+#define PNG_READ_INVERT_SUPPORTED -+#define PNG_READ_16_TO_8_SUPPORTED -+#define PNG_WRITE_cHRM_SUPPORTED -+#define PNG_16BIT_SUPPORTED -+#define PNG_WRITE_USER_TRANSFORM_SUPPORTED -+#define PNG_READ_BGR_SUPPORTED -+#define PNG_WRITE_PACKSWAP_SUPPORTED -+#define PNG_WRITE_INVERT_ALPHA_SUPPORTED -+#define PNG_sCAL_SUPPORTED -+#define PNG_WRITE_zTXt_SUPPORTED -+#define PNG_sBIT_SUPPORTED -+#define PNG_cHRM_SUPPORTED -+#define PNG_bKGD_SUPPORTED -+#define PNG_tRNS_SUPPORTED -+#define PNG_WRITE_iTXt_SUPPORTED -+#define PNG_oFFs_SUPPORTED -+#define PNG_USER_TRANSFORM_PTR_SUPPORTED -+#define PNG_USER_TRANSFORM_INFO_SUPPORTED -+#define PNG_hIST_SUPPORTED -+#define PNG_iCCP_SUPPORTED -+#define PNG_sRGB_SUPPORTED -+#define PNG_READ_zTXt_SUPPORTED -+#define PNG_gAMA_SUPPORTED -+#define PNG_pCAL_SUPPORTED -+#define PNG_CHECK_cHRM_SUPPORTED -+#define PNG_tIME_SUPPORTED -+#define PNG_pHYs_SUPPORTED -+#define PNG_READ_iTXt_SUPPORTED -+#define PNG_TEXT_SUPPORTED -+#define PNG_SAVE_INT_32_SUPPORTED -+#define PNG_sPLT_SUPPORTED -+#define PNG_tEXt_SUPPORTED -+#define PNG_zTXt_SUPPORTED -+#define PNG_iTXt_SUPPORTED -+/* end of options */ -+#endif /* PNGLCONF_H */ ---- misc/libpng-1.5.1/pngstruct.h 2011-02-03 05:58:17.000000000 +0100 -+++ misc/build/libpng-1.5.1/pngstruct.h 2011-03-02 16:28:53.289801400 +0100 -@@ -24,7 +24,11 @@ - * in this structure and is required for decompressing the LZ compressed - * data in PNG files. - */ -+#if defined MACOSX - #include "zlib.h" -+#else -+#include -+#endif - - struct png_struct_def - { ---- misc/libpng-1.5.1/pngtest.c 2011-02-03 05:58:17.000000000 +0100 -+++ misc/build/libpng-1.5.1/pngtest.c 2011-03-02 16:30:09.881914600 +0100 -@@ -31,7 +31,12 @@ - * of files at once by typing "pngtest -m file1.png file2.png ..." - */ - -+#if defined MACOSX - #include "zlib.h" -+#else -+#include -+#endif -+ - #include "png.h" - /* Copied from pngpriv.h but only used in error messages below. */ - #ifndef PNG_ZBUF_SIZE ---- misc/libpng-1.5.1/pngvalid.c 2011-02-03 05:58:17.000000000 +0100 -+++ misc/build/libpng-1.5.1/pngvalid.c 2011-03-02 19:15:38.583630100 +0100 -@@ -51,7 +51,11 @@ typedef png_byte *png_const_bytep; - #define PNG_READ_16BIT_SUPPORTED - #endif - --#include "zlib.h" /* For crc32 */ -+#if defined MACOSX -+#include "zlib.h" -+#else -+#include -+#endif - - #include /* For floating point constants */ - #include /* For malloc */ - diff --git a/libpng/makefile.mk b/libpng/makefile.mk index 5de77b432e8f..f40e3a72921c 100755 --- a/libpng/makefile.mk +++ b/libpng/makefile.mk @@ -47,7 +47,7 @@ LIBPNGVERSION=1.5.1 TARFILE_NAME=$(PRJNAME)-$(LIBPNGVERSION) TARFILE_MD5=220035f111ea045a51e290906025e8b5 -PATCH_FILES=libpng.patch +PATCH_FILES=$(PRJNAME)-$(LIBPNGVERSION).patch ADDITIONAL_FILES=makefile.mk pnglibconf.h #relative to CONFIGURE_DIR @@ -61,4 +61,3 @@ OUT2INC=png.h pnglibconf.h pngconf.h pngstruct.h .INCLUDE : set_ext.mk .INCLUDE : target.mk .INCLUDE : tg_ext.mk - -- cgit v1.2.3 From 58dd4557165f409a891b2b774373ae41849f11a5 Mon Sep 17 00:00:00 2001 From: ka Date: Fri, 25 Mar 2011 06:25:10 +0100 Subject: rsvglibs: adjusted makefiles to build external rsvglib dependencies --- fontconfig/makefile.mk | 4 ++++ freetype/makefile.mk | 4 ++++ gdk-pixbuf/prj/build.lst | 2 +- jpeg/prj/d.lst | 2 ++ libgsf/makefile.mk | 6 ++++-- libgsf/prj/build.lst | 2 +- librsvg/makefile.mk | 4 ++++ librsvg/prj/build.lst | 2 +- pango/makefile.mk | 4 ++++ 9 files changed, 25 insertions(+), 5 deletions(-) diff --git a/fontconfig/makefile.mk b/fontconfig/makefile.mk index 8fd9efe4871a..3618cdc129e8 100644 --- a/fontconfig/makefile.mk +++ b/fontconfig/makefile.mk @@ -45,6 +45,8 @@ all: TARFILE_NAME=fontconfig-2.8.0 TARFILE_MD5=77e15a92006ddc2adbb06f840d591c0e +.IF "$(OS)"=="WNT" + CONFIGURE_DIR= .IF "$(OS)"=="WNT" ADDITIONAL_FILES=\ @@ -67,6 +69,8 @@ CONFIGURE_ACTION=./configure --enable-shared=yes --enable-libxml2 --disable-docs BUILD_ACTION=$(GNUMAKE) .ENDIF +.ENDIF + # --- Targets ------------------------------------------------------ .INCLUDE : set_ext.mk diff --git a/freetype/makefile.mk b/freetype/makefile.mk index a4e085471be9..c32b7dec06c6 100644 --- a/freetype/makefile.mk +++ b/freetype/makefile.mk @@ -45,6 +45,8 @@ all: TARFILE_NAME=freetype-2.4.4 TARFILE_MD5=9273efacffb683483e58a9e113efae9f +.IF "$(OS)"=="WNT" + CONFIGURE_DIR= .IF "$(OS)"=="WNT" CONFIGURE_ACTION= @@ -59,6 +61,8 @@ CONFIGURE_ACTION=.$/configure BUILD_ACTION=$(GNUMAKE) +.ENDIF + # --- Targets ------------------------------------------------------ .INCLUDE : set_ext.mk diff --git a/gdk-pixbuf/prj/build.lst b/gdk-pixbuf/prj/build.lst index 1f9de3ec47d1..1182d1bf6d19 100644 --- a/gdk-pixbuf/prj/build.lst +++ b/gdk-pixbuf/prj/build.lst @@ -1,3 +1,3 @@ -gp gdk-pixbuf : glib libjpeg libpng soltools NULL +gp gdk-pixbuf : glib jpeg libpng soltools NULL gp gdk-pixbuf usr1 - all gp_mkout NULL gp gdk-pixbuf nmake - all gp_gdk-pixbuf NULL diff --git a/jpeg/prj/d.lst b/jpeg/prj/d.lst index 237883b36951..93c3de45c570 100644 --- a/jpeg/prj/d.lst +++ b/jpeg/prj/d.lst @@ -1,7 +1,9 @@ mkdir: %_DEST%\inc%_EXT%\external mkdir: %_DEST%\inc%_EXT%\external\jpeg +..\%__SRC%\slb\jpeglib.lib %_DEST%\lib%_EXT%\jpeglib.lib ..\%__SRC%\slb\jpeglib.lib %_DEST%\lib%_EXT%\jpeg.lib +..\%__SRC%\lib\libjpeglib.a %_DEST%\lib%_EXT%\libjpeglib.a ..\%__SRC%\lib\libjpeglib.a %_DEST%\lib%_EXT%\libjpeg.a ..\%__SRC%\inc\jerror.h %_DEST%\inc%_EXT%\external\jpeg\jerror.h diff --git a/libgsf/makefile.mk b/libgsf/makefile.mk index 7ffb7e64f3cc..fc2897deaec1 100755 --- a/libgsf/makefile.mk +++ b/libgsf/makefile.mk @@ -25,7 +25,6 @@ # #************************************************************************* -.IF "$(OS)"=="MACOSX" || "$(OS)"=="WNT" PRJ=. @@ -49,6 +48,8 @@ LIBGSFVERSION=1.14.19 TARFILE_NAME=$(PRJNAME)-$(LIBGSFVERSION) TARFILE_MD5=3a84ac2da37cae5bf7ce616228c6fbde +.IF "$(OS)"=="MACOSX" || "$(OS)"=="WNT" + .IF "$(OS)" == "WNT" PATCH_FILES=libgsf-1.14.19.windows.patch @@ -145,11 +146,12 @@ OUT2INC+=gsf$/gsf-input-http.h OUT2INC+=gsf$/gsf-outfile-zip.h OUT2INC+=gsf$/gsf.h +.ENDIF + # --- Targets ------------------------------------------------------ .INCLUDE : set_ext.mk .INCLUDE : target.mk .INCLUDE : tg_ext.mk -.ENDIF diff --git a/libgsf/prj/build.lst b/libgsf/prj/build.lst index b5f0d8167c08..1a3ea01e7535 100644 --- a/libgsf/prj/build.lst +++ b/libgsf/prj/build.lst @@ -1,3 +1,3 @@ -gs libgsf : soltools NULL +gs libgsf : glib soltools NULL gs libgsf usr1 - all gs_mkout NULL gs libgsf nmake - all gs_libgsf NULL diff --git a/librsvg/makefile.mk b/librsvg/makefile.mk index ea76a0ea8d56..81127630ee3d 100644 --- a/librsvg/makefile.mk +++ b/librsvg/makefile.mk @@ -47,6 +47,8 @@ LIBRSVGVERSION=2.32.1 TARFILE_NAME=$(PRJNAME)-$(LIBRSVGVERSION) TARFILE_MD5=d7a242ca43e33e1b63d3073f9d46a6a8 +.IF "$(OS)" == "MACOSX" || "$(OS)" == "WNT" + PATCH_FILES=librsvg-2.32.1.patch .IF "$(LIBXML_LIBS)" == "" @@ -89,6 +91,8 @@ OUT2INC+=rsvg.h .ELIF "$(OS)"=="WNT" .ENDIF +.ENDIF + # --- Targets ------------------------------------------------------ .INCLUDE : set_ext.mk diff --git a/librsvg/prj/build.lst b/librsvg/prj/build.lst index 82e1fd64d1c5..e2b4d1fab07a 100644 --- a/librsvg/prj/build.lst +++ b/librsvg/prj/build.lst @@ -1,3 +1,3 @@ -rg librsvg : libcroco libgsf cairo gdk-pixbuf soltools NULL +rg librsvg : pango libcroco libgsf cairo gdk-pixbuf soltools NULL rg librsvg usr1 - all rg_mkout NULL rg librsvg nmake - all rg_gettext NULL diff --git a/pango/makefile.mk b/pango/makefile.mk index c2b18022ced0..5a7194986e20 100644 --- a/pango/makefile.mk +++ b/pango/makefile.mk @@ -47,6 +47,8 @@ PANGOVERSION=1.28.3 TARFILE_NAME=$(PRJNAME)-$(PANGOVERSION) TARFILE_MD5=22ad1c8d3fda7e73b0798035f3dd96bc +.IF "$(OS)"=="MACOSX" || "$(OS)"=="WNT" + PATCH_FILES=pango-1.28.3.patch CONFIGURE_LDFLAGS="-L$(SOLARLIBDIR)" @@ -108,6 +110,8 @@ OUT2INC+=pango/pango-utils.h .ELSE .ENDIF +.ENDIF + # --- Targets ------------------------------------------------------ .INCLUDE : set_ext.mk -- cgit v1.2.3 From 91e5a39cf22e07eef102c2f3e63f2aaaef256810 Mon Sep 17 00:00:00 2001 From: ka Date: Fri, 25 Mar 2011 06:25:10 +0100 Subject: rsvglibs: adjusted makefiles to build external rsvglib dependencies --- package/source/zipapi/Deflater.cxx | 8 ++++---- package/source/zipapi/Inflater.cxx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package/source/zipapi/Deflater.cxx b/package/source/zipapi/Deflater.cxx index ac12a8cb5831..a87fa91af41e 100644 --- a/package/source/zipapi/Deflater.cxx +++ b/package/source/zipapi/Deflater.cxx @@ -93,7 +93,7 @@ sal_Int32 Deflater::doDeflateBytes (uno::Sequence < sal_Int8 > &rBuffer, sal_Int pStream->avail_in = nLength; pStream->avail_out = nNewLength; -#ifdef SYSTEM_ZLIB +#if defined SYSTEM_ZLIB || !defined ZLIB_PREFIX nResult = deflateParams(pStream, nLevel, nStrategy); #else nResult = z_deflateParams(pStream, nLevel, nStrategy); @@ -119,7 +119,7 @@ sal_Int32 Deflater::doDeflateBytes (uno::Sequence < sal_Int8 > &rBuffer, sal_Int pStream->avail_in = nLength; pStream->avail_out = nNewLength; -#ifdef SYSTEM_ZLIB +#if defined SYSTEM_ZLIB || !defined ZLIB_PREFIX nResult = deflate(pStream, bFinish ? Z_FINISH : Z_NO_FLUSH); #else nResult = z_deflate(pStream, bFinish ? Z_FINISH : Z_NO_FLUSH); @@ -188,7 +188,7 @@ sal_Int32 SAL_CALL Deflater::getTotalOut( ) } void SAL_CALL Deflater::reset( ) { -#ifdef SYSTEM_ZLIB +#if defined SYSTEM_ZLIB || !defined ZLIB_PREFIXB deflateReset(pStream); #else z_deflateReset(pStream); @@ -201,7 +201,7 @@ void SAL_CALL Deflater::end( ) { if (pStream != NULL) { -#ifdef SYSTEM_ZLIB +#if defined SYSTEM_ZLIB || !defined ZLIB_PREFIX deflateEnd(pStream); #else z_deflateEnd(pStream); diff --git a/package/source/zipapi/Inflater.cxx b/package/source/zipapi/Inflater.cxx index e95809a35dad..415036bd73b1 100644 --- a/package/source/zipapi/Inflater.cxx +++ b/package/source/zipapi/Inflater.cxx @@ -105,7 +105,7 @@ void SAL_CALL Inflater::end( ) { if (pStream != NULL) { -#ifdef SYSTEM_ZLIB +#if defined SYSTEM_ZLIB || !defined ZLIB_PREFIX inflateEnd(pStream); #else z_inflateEnd(pStream); @@ -130,7 +130,7 @@ sal_Int32 Inflater::doInflateBytes (Sequence < sal_Int8 > &rBuffer, sal_Int32 n pStream->next_out = reinterpret_cast < unsigned char* > ( rBuffer.getArray() + nNewOffset ); pStream->avail_out = nNewLength; -#ifdef SYSTEM_ZLIB +#if defined SYSTEM_ZLIB || !defined ZLIB_PREFIX sal_Int32 nResult = ::inflate(pStream, Z_PARTIAL_FLUSH); #else sal_Int32 nResult = ::z_inflate(pStream, Z_PARTIAL_FLUSH); -- cgit v1.2.3 From f194f5d6feb677c7c2dbed029ec974645ca62de2 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 25 Mar 2011 10:42:31 +0100 Subject: vcl2gnumake: add build dependency smoketestdoc --- postprocess/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postprocess/prj/build.lst b/postprocess/prj/build.lst index 20de2ed6d40f..a3db1209dbf0 100644 --- a/postprocess/prj/build.lst +++ b/postprocess/prj/build.lst @@ -1,4 +1,4 @@ -po postprocess :: accessibility automation basctl bean BINFILTER:binfilter chart2 configmgr CRASHREP:crashrep cui dbaccess desktop dtrans embeddedobj embedserv EPM:epm eventattacher extensions extras fileaccess filter forms fpicker helpcontent2 hwpfilter io JAVAINSTALLER2:javainstaller2 lingucomponent MATHMLDTD:MathMLDTD ODK:odk officecfg package padmin psprint_config remotebridges sc scaddins sccomp scp2 scripting sd setup_native slideshow starmath sw sysui testtools ucb UnoControls unoxml ure wizards xmerge xmlsecurity MORE_FONTS:more_fonts DICTIONARIES:dictionaries OOo:pyuno OOo:readlicense_oo SO:top unodevtools JFREEREPORT:jfreereport REPORTBUILDER:reportbuilder reportdesign SDEXT:sdext SWEXT:swext uui writerfilter oox MYSQLC:mysqlc LIBXSLT:libxslt NULL +po postprocess :: accessibility automation basctl bean BINFILTER:binfilter chart2 configmgr CRASHREP:crashrep cui dbaccess desktop dtrans embeddedobj embedserv EPM:epm eventattacher extensions extras fileaccess filter forms fpicker helpcontent2 hwpfilter io JAVAINSTALLER2:javainstaller2 lingucomponent MATHMLDTD:MathMLDTD ODK:odk officecfg package padmin psprint_config remotebridges sc scaddins sccomp scp2 scripting sd setup_native slideshow starmath sw sysui testtools ucb UnoControls unoxml ure wizards xmerge xmlsecurity MORE_FONTS:more_fonts DICTIONARIES:dictionaries OOo:pyuno OOo:readlicense_oo SO:top unodevtools JFREEREPORT:jfreereport REPORTBUILDER:reportbuilder reportdesign SDEXT:sdext SWEXT:swext smoketestdoc uui writerfilter oox MYSQLC:mysqlc LIBXSLT:libxslt NULL po postprocess usr1 - all po_mkout NULL po postprocess\checkxml nmake - all po_checkxml NULL po postprocess\checkdeliver nmake - all po_checkdlv NULL -- cgit v1.2.3 From b0de0123633df656f1eca0ee2ff71ebe6f900d68 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 25 Mar 2011 14:59:57 +0100 Subject: vcl2gnumake: use gb_Library_get_runtime_filename instead of local workarounds --- vcl/Library_vcl.mk | 4 ++-- vcl/Library_vclplug_gen.mk | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 1bfc629b7a04..abd3297879d9 100755 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -56,7 +56,7 @@ endif $(eval $(call gb_Library_set_defs,vcl,\ $$(DEFS) \ -DVCL_DLLIMPLEMENTATION \ - -DCUI_DLL_NAME=\"$(or $(call gb_Library_get_dllname,cui),$(call gb_Library_get_filename,cui))\" \ + -DCUI_DLL_NAME=\"$(call gb_Library_get_runtime_filename,cui)\" \ -DDLLPOSTFIX=$(subst $(or $(gb_Library_DLLEXT),$(gb_Library_PLAINEXT)),,$(gb_Library_OOOEXT)) \ )) @@ -178,7 +178,7 @@ $(eval $(call gb_Library_set_defs,vcl,\ $$(DEFS) \ -DSAL_DLLPREFIX=\"$(gb_Library_SYSPRE)\" \ -DSAL_DLLPOSTFIX=\"$(gb_Library_OOOEXT)\" \ - -D_XSALSET_LIBNAME=\"$(call gb_Library_get_filename,spa)\" \ + -D_XSALSET_LIBNAME=\"$(call gb_Library_get_runtime_filename,spa)\" \ )) ## handle fontconfig ifneq ($(ENABLE_FONTCONFIG),) diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk index bba48e0d65ba..4d2ee7e91238 100755 --- a/vcl/Library_vclplug_gen.mk +++ b/vcl/Library_vclplug_gen.mk @@ -113,7 +113,7 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_gen,\ $(eval $(call gb_Library_set_defs,vclplug_gen,\ $$(DEFS) \ - -D_XSALSET_LIBNAME=\"$(gb_Library_SYSPRE)spa$(gb_Library_OOOEXT)\" \ + -D_XSALSET_LIBNAME=\"$(call gb_Library_get_runtime_filename,spa)\" \ -DVCLPLUG_GEN_IMPLEMENTATION \ )) -- cgit v1.2.3 From 507e4cf1d9b6233eacbb0dfd9789fc886a1391bc Mon Sep 17 00:00:00 2001 From: ka Date: Sat, 26 Mar 2011 17:03:03 +0100 Subject: rsvglibs: added external pango library --- pango/makefile.mk | 52 +- pango/pango-1.28.3-win32.patch | 1543 ++++++++++++++++++++++++++++++++++++++++ pango/prj/build.lst | 2 +- pango/prj/d.lst | 56 +- 4 files changed, 1622 insertions(+), 31 deletions(-) create mode 100644 pango/pango-1.28.3-win32.patch diff --git a/pango/makefile.mk b/pango/makefile.mk index 5a7194986e20..2b5acbea1719 100644 --- a/pango/makefile.mk +++ b/pango/makefile.mk @@ -49,6 +49,8 @@ TARFILE_MD5=22ad1c8d3fda7e73b0798035f3dd96bc .IF "$(OS)"=="MACOSX" || "$(OS)"=="WNT" +.IF "$(OS)" == "MACOSX" + PATCH_FILES=pango-1.28.3.patch CONFIGURE_LDFLAGS="-L$(SOLARLIBDIR)" @@ -62,17 +64,14 @@ CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) \ GLIB_CFLAGS="-I$(SOLARINCDIR)$/external$/glib-2.0" \ GLIB_LIBS="-lgthread-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 -lintl" CONFIGURE_FLAGS=--with-included-modules=yes -.IF "$(OS)" == "MACOSX" CONFIGURE_FLAGS+= CPPFLAGS="$(ARCH_FLAGS) $(EXTRA_CDEFS)" CONFIGURE_ACTION+="--without-x" -.ENDIF BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) $(GNUMAKE) BUILD_DIR=$(CONFIGURE_DIR) - -.IF "$(OS)"=="MACOSX" EXTRPATH=LOADER + OUT2LIB+=pango/.libs/libpango-1.0.0.dylib OUT2LIB+=pango/.libs/libpangocairo-1.0.0.dylib @@ -107,6 +106,50 @@ OUT2INC+=pango/pango-matrix.h OUT2INC+=pango/pango-utils.h .ELIF "$(OS)"=="WNT" + +PATCH_FILES=pango-1.28.3-win32.patch +ADDITIONAL_FILES=config.h module.defs make.msc glib-mkenums.pl msvc_recommended_pragmas.h +CONFIGURE_DIR= +CONFIGURE_ACTION= +BUILD_DIR=./pango +BUILD_ACTION=nmake -f makefile.msc + +OUT2LIB+=pango/pango-1.0.lib +OUT2LIB+=pango/pango-1.0s.lib +OUT2LIB+=pango/pangocairo-1.0.lib +OUT2LIB+=pango/pangocairo-1.0s.lib +OUT2LIB+=pango/pangowin32-1.0.lib +OUT2LIB+=pango/pangowin32-1.0s.lib + +OUT2BIN+=pango/libpango-1.0-0.dll +OUT2BIN+=pango/libpangocairo-1.0-0.dll +OUT2BIN+=pango/libpangowin32-1.0-0.dll +OUT2BIN+=pango/querymodules.exe + +OUT2INC+=pango/pango.h +OUT2INC+=pango/pango-attributes.h +OUT2INC+=pango/pango-bidi-type.h +OUT2INC+=pango/pango-break.h +OUT2INC+=pango/pango-context.h +OUT2INC+=pango/pango-coverage.h +OUT2INC+=pango/pango-engine.h +OUT2INC+=pango/pango-enum-types.h +OUT2INC+=pango/pango-features.h +OUT2INC+=pango/pango-font.h +OUT2INC+=pango/pango-fontmap.h +OUT2INC+=pango/pango-fontset.h +OUT2INC+=pango/pango-glyph.h +OUT2INC+=pango/pango-glyph-item.h +OUT2INC+=pango/pango-gravity.h +OUT2INC+=pango/pango-item.h +OUT2INC+=pango/pango-layout.h +OUT2INC+=pango/pango-matrix.h +OUT2INC+=pango/pango-renderer.h +OUT2INC+=pango/pango-script.h +OUT2INC+=pango/pango-tabs.h +OUT2INC+=pango/pango-types.h +OUT2INC+=pango/pango-utils.h + .ELSE .ENDIF @@ -117,4 +160,3 @@ OUT2INC+=pango/pango-utils.h .INCLUDE : set_ext.mk .INCLUDE : target.mk .INCLUDE : tg_ext.mk - diff --git a/pango/pango-1.28.3-win32.patch b/pango/pango-1.28.3-win32.patch new file mode 100644 index 000000000000..78dd7bbbffe0 --- /dev/null +++ b/pango/pango-1.28.3-win32.patch @@ -0,0 +1,1543 @@ +--- misc/pango-1.28.3/configure 2010-09-29 13:02:33.000000000 +0200 ++++ misc/build/pango-1.28.3/configure 2011-03-26 06:09:01.021181200 +0100 +@@ -18596,16 +18596,16 @@ + fi + + if $have_atsui; then +- if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo-quartz-font >= \$cairo_required\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "cairo-quartz-font >= $cairo_required") 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; then ++# if test -n "$PKG_CONFIG" && \ ++# { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo-quartz-font >= \$cairo_required\""; } >&5 ++# ($PKG_CONFIG --exists --print-errors "cairo-quartz-font >= $cairo_required") 2>&5 ++# ac_status=$? ++# $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++# test $ac_status = 0; }; then + have_cairo_atsui=true +-else +- : +-fi ++#else ++# : ++#fi + fi + if $have_cairo_atsui; then + +@@ -18859,7 +18859,7 @@ + + # Setup GLIB_MKENUMS to use glib-mkenums even if GLib is uninstalled. + GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` +- ++GLIB_MKENUMS=glib-mkenums + + + # Add in gthread-2.0 to CFLAGS but not to LIBS so we get any +--- misc/pango-1.28.3/pango/makefile.msc 2010-02-09 13:06:28.000000000 +0100 ++++ misc/build/pango-1.28.3/pango/makefile.msc 2011-03-26 15:41:45.375966400 +0100 +@@ -1,5 +1,15 @@ +-TOP = ../.. +-!INCLUDE $(TOP)/glib/build/win32/make.msc ++PRJ_TOP = .. ++GLIB_INC = -I$(OUTDIR)\inc\external\glib-2.0 ++CAIRO_INC = -I$(OUTDIR)\inc\external\cairo ++ ++INTL_LIB = $(OUTDIR)\lib\intl.lib ++GLIB_LIB = $(OUTDIR)\lib\glib-2.0.lib \ ++ $(OUTDIR)\lib\gobject-2.0.lib \ ++ $(OUTDIR)\lib\gmodule-2.0.lib ++CAIRO_LIB = $(OUTDIR)\lib\cairo.lib ++USP10_LIB = $(OUTDIR)\lib\USP10.lib ++ ++!INCLUDE $(PRJ_TOP)\make.msc + + !IFNDEF PERL + PERL = perl +@@ -16,7 +26,7 @@ + + !IFNDEF PACKAGE + +-DLLS = pango pangowin32 pangoft2 pangocairo # pangox ++DLLS = pango pangowin32 pangocairo # pangox pangoft2 + EXES = querymodules testfonts + #? test1 test2 test3 test4 test5 + +@@ -40,28 +50,28 @@ + + !ELSE + +-PRJ_TOP = .. ++CFLAGS = -I. -I$(PRJ_TOP) $(SOLARINC) $(GLIB_INC) $(CAIRO_INC) ++ + PKG_VER = $(PANGO_VER) + PKG_DEF = $(PACKAGE).def +- +-PKG_CFLAGS = -FImsvc_recommended_pragmas.h -I.. -I. -I$(PRJ_TOP) \ ++PKG_CFLAGS = -FI$(PRJ_TOP)\msvc_recommended_pragmas.h $(CFLAGS) \ + -DPACKAGE=\"Pango\" -DVERSION=\"$(PANGO_VER)\" \ + -DPANGO_ENABLE_BACKEND -DPANGO_ENABLE_ENGINE \ + -DMODULE_VERSION=\"$(PANGO_MODULE_VERSION)\" \ + $(GLIB_CFLAGS) $(LIBICONV_CFLAGS) \ + $(X11_CFLAGS) -DSYSCONFDIR=\"/etc\" \ +- -DPANGO_BINARY_AGE=0 ++ -DPANGO_BINARY_AGE=0 \ ++ -DLIBDIR=\".\\\\\" + + #-DHAVE_USP10_H +- + + !IFDEF OBJS_pango + # don't link with itself +-PKG_LINK = $(GLIB_LIBS) $(FONTCONFIG_LIBS) ++PKG_LINK = $(GLIB_LIB) + !ENDIF + + !IFDEF OBJS_pangowin32 +-PKG_LINK = $(GLIB_LIBS) $(LIBICONV_LIBS) \ ++PKG_LINK = $(GLIB_LIB) $(INTL_LIB) $(USP10_LIB) \ + pango-$(PANGO_VER).lib + !ENDIF + +@@ -69,23 +79,24 @@ + PKG_CFLAGS = $(PKG_CFLAGS) $(FREETYPE2_CFLAGS) $(FONTCONFIG_CFLAGS) \ + -DPANGO_MODULE_PREFIX=_pango_basic_ft2 + +-PKG_LINK = $(GLIB_LIBS) $(LIBICONV_LIBS) $(FREETYPE2_LIBS) $(FONTCONFIG_LIBS) \ ++PKG_LINK = $(GLIB_LIB) $(INTL_LIB) $(FREETYPE2_LIBS) $(FONTCONFIG_LIBS) \ + pango-$(PANGO_VER).lib opentype\pango-ot.lib + !ENDIF + + !IFDEF OBJS_pangox +-PKG_LINK = $(GLIB_LIBS) $(LIBICONV_LIBS) \ ++PKG_LINK = $(GLIB_LIB) $(INTL_LIB) \ + pango-$(PANGO_VER).lib $(X11_LIBS) + !ENDIF + + !IFDEF OBJS_pangocairo +-PKG_LINK = $(GLIB_LIBS) $(LIBICONV_LIBS) \ +- pango-$(PANGO_VER).lib $(CAIRO_LIBS) \ +- pangowin32-$(PANGO_VER).lib $(FONTCONFIG_LIBS) ++PKG_CFLAGS = $(PKG_CFLAGS) ++PKG_LINK = $(GLIB_LIB) $(INTL_LIB) \ ++ pango-$(PANGO_VER).lib $(CAIRO_LIB) \ ++ pangowin32-$(PANGO_VER).lib + !ENDIF + + !IF DEFINED (OBJS_querymodules) || DEFINED (OBJS_testfonts) +-PKG_LINK = $(GLIB_LIBS) $(LIBICONV_LIBS) \ ++PKG_LINK = $(GLIB_LIB) $(INTL_LIB) \ + pango-$(PANGO_VER).lib pangowin32-$(PANGO_VER).lib + !ENDIF + +@@ -99,9 +110,10 @@ + ellipsize.obj \ + fonts.obj \ + glyphstring.obj \ +- mapping.obj \ ++# mapping.obj \ + modules.obj \ + pango-attributes.obj \ ++ pango-bidi-type.obj \ + pango-engine.obj \ + pango-color.obj \ + pango-context.obj \ +@@ -121,7 +133,6 @@ + pango-utils.obj \ + reorder-items.obj \ + shape.obj \ +- \ + fribidi.obj \ + fribidi_types.obj \ + fribidi_char_type.obj +@@ -215,15 +226,6 @@ + OBJECTS = $(PACKAGE).obj + !ENDIF + +-module-defs-win32.c : module-defs-win32.c.win32 +- copy module-defs-win32.c.win32 module-defs-win32.c +- +-module-defs-fc.c : module-defs-fc.c.win32 +- copy module-defs-fc.c.win32 module-defs-fc.c +- +-module-defs-lang.c : module-defs-lang.c.win32 +- copy module-defs-lang.c.win32 module-defs-lang.c +- + pango_headers= \ + pango.h \ + pango-attributes.h \ +@@ -249,7 +251,7 @@ + pangofc-fontmap.h + + pango-enum-types.h: $(pango_headers) makefile.msc +- $(PERL) $(GLIB)\gobject\glib-mkenums \ ++ $(PERL) $(PRJ_TOP)\glib-mkenums.pl \ + --fhead "#ifndef __PANGO_ENUM_TYPES_H__\n#define __PANGO_ENUM_TYPES_H__\n\n#include \n\nG_BEGIN_DECLS\n" \ + --fprod "/* enumerations from \"@filename@\" */\n" \ + --vhead "GType @enum_name@_get_type (void);\n#define PANGO_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ +@@ -257,7 +259,7 @@ + $(pango_headers) > pango-enum-types.h + + pango-enum-types.c: $(pango_headers) pango-enum-types.h makefile.msc +- $(PERL) $(GLIB)\gobject\glib-mkenums \ ++ $(PERL) $(PRJ_TOP)\glib-mkenums.pl \ + --fhead "#include " \ + --fprod "\n/* enumerations from \"@filename@\" */" \ + --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \ +@@ -275,15 +277,6 @@ + $(PACKAGE).exe : $(PKG_LINK) $(OBJECTS) + $(CC) $(CFLAGS) -Fe$(PACKAGE).exe $(OBJECTS) $(PKG_LINK) gdi32.lib user32.lib + +-$(PRJ_TOP)\config.h.win32 : makefile.msc +- echo /*almostempty*/ > $(PRJ_TOP)\config.h.win32 +- echo #define PANGO_BINARY_AGE 0 >> $(PRJ_TOP)\config.h.win32 +- echo #define DHAVE_USP10_H 1 >> $(PRJ_TOP)\config.h.win32 +- +-$(PRJ_TOP)\config.h: $(PRJ_TOP)\config.h.win32 +- copy $(PRJ_TOP)\config.h.win32 $(PRJ_TOP)\config.h +- +- + .c.obj : + $(CC) $(CFLAGS) -GD -c $(PKG_CFLAGS) $< + +--- misc/pango-1.28.3/pango/module-defs-win32.c 2010-09-29 13:02:42.000000000 +0200 ++++ misc/build/pango-1.28.3/pango/module-defs-win32.c 2011-03-26 08:57:53.088370000 +0100 +@@ -1,7 +1,25 @@ +-/* Autogenerated by configure. Do not edit */ ++/* Hand-written, for builds using Microsoft's compiler and makefile.msc, ++ * where the configure mechanism isn't used. ++ */ + +-#include "module-defs.h" ++#include "modules.h" ++ ++#ifdef PANGO_MODULE_PREFIX ++void _pango_basic_win32_script_engine_list (PangoEngineInfo **engines, ++ gint *n_engines); ++void _pango_basic_win32_script_engine_init (GTypeModule *module); ++void _pango_basic_win32_script_engine_exit (void); ++PangoEngine *_pango_basic_win32_script_engine_create (const char *id); ++#endif + + PangoIncludedModule _pango_included_win32_modules[] = { +- { NULL, NULL, NULL, NULL }, ++#ifdef PANGO_MODULE_PREFIX ++ { ++ _pango_basic_win32_script_engine_list, ++ _pango_basic_win32_script_engine_init, ++ _pango_basic_win32_script_engine_exit, ++ _pango_basic_win32_script_engine_create ++ }, ++#endif ++ { NULL, NULL, NULL }, + }; +--- misc/pango-1.28.3/pango/pango-enum-types.c 2010-09-29 13:02:42.000000000 +0200 ++++ misc/build/pango-1.28.3/pango/pango-enum-types.c 2011-03-26 15:41:51.313542400 +0100 +@@ -35,7 +35,7 @@ + { PANGO_ATTR_GRAVITY_HINT, "PANGO_ATTR_GRAVITY_HINT", "gravity-hint" }, + { 0, NULL, NULL } + }; +- etype = g_enum_register_static (g_intern_static_string ("PangoAttrType"), values); ++ etype = g_enum_register_static ("PangoAttrType", values); + } + return etype; + } +@@ -52,59 +52,7 @@ + { PANGO_UNDERLINE_ERROR, "PANGO_UNDERLINE_ERROR", "error" }, + { 0, NULL, NULL } + }; +- etype = g_enum_register_static (g_intern_static_string ("PangoUnderline"), values); +- } +- return etype; +-} +- +-/* enumerations from "pango-bidi-type.h" */ +-GType +-pango_bidi_type_get_type (void) +-{ +- static GType etype = 0; +- if (etype == 0) { +- static const GEnumValue values[] = { +- { PANGO_BIDI_TYPE_L, "PANGO_BIDI_TYPE_L", "l" }, +- { PANGO_BIDI_TYPE_LRE, "PANGO_BIDI_TYPE_LRE", "lre" }, +- { PANGO_BIDI_TYPE_LRO, "PANGO_BIDI_TYPE_LRO", "lro" }, +- { PANGO_BIDI_TYPE_R, "PANGO_BIDI_TYPE_R", "r" }, +- { PANGO_BIDI_TYPE_AL, "PANGO_BIDI_TYPE_AL", "al" }, +- { PANGO_BIDI_TYPE_RLE, "PANGO_BIDI_TYPE_RLE", "rle" }, +- { PANGO_BIDI_TYPE_RLO, "PANGO_BIDI_TYPE_RLO", "rlo" }, +- { PANGO_BIDI_TYPE_PDF, "PANGO_BIDI_TYPE_PDF", "pdf" }, +- { PANGO_BIDI_TYPE_EN, "PANGO_BIDI_TYPE_EN", "en" }, +- { PANGO_BIDI_TYPE_ES, "PANGO_BIDI_TYPE_ES", "es" }, +- { PANGO_BIDI_TYPE_ET, "PANGO_BIDI_TYPE_ET", "et" }, +- { PANGO_BIDI_TYPE_AN, "PANGO_BIDI_TYPE_AN", "an" }, +- { PANGO_BIDI_TYPE_CS, "PANGO_BIDI_TYPE_CS", "cs" }, +- { PANGO_BIDI_TYPE_NSM, "PANGO_BIDI_TYPE_NSM", "nsm" }, +- { PANGO_BIDI_TYPE_BN, "PANGO_BIDI_TYPE_BN", "bn" }, +- { PANGO_BIDI_TYPE_B, "PANGO_BIDI_TYPE_B", "b" }, +- { PANGO_BIDI_TYPE_S, "PANGO_BIDI_TYPE_S", "s" }, +- { PANGO_BIDI_TYPE_WS, "PANGO_BIDI_TYPE_WS", "ws" }, +- { PANGO_BIDI_TYPE_ON, "PANGO_BIDI_TYPE_ON", "on" }, +- { 0, NULL, NULL } +- }; +- etype = g_enum_register_static (g_intern_static_string ("PangoBidiType"), values); +- } +- return etype; +-} +-GType +-pango_direction_get_type (void) +-{ +- static GType etype = 0; +- if (etype == 0) { +- static const GEnumValue values[] = { +- { PANGO_DIRECTION_LTR, "PANGO_DIRECTION_LTR", "ltr" }, +- { PANGO_DIRECTION_RTL, "PANGO_DIRECTION_RTL", "rtl" }, +- { PANGO_DIRECTION_TTB_LTR, "PANGO_DIRECTION_TTB_LTR", "ttb-ltr" }, +- { PANGO_DIRECTION_TTB_RTL, "PANGO_DIRECTION_TTB_RTL", "ttb-rtl" }, +- { PANGO_DIRECTION_WEAK_LTR, "PANGO_DIRECTION_WEAK_LTR", "weak-ltr" }, +- { PANGO_DIRECTION_WEAK_RTL, "PANGO_DIRECTION_WEAK_RTL", "weak-rtl" }, +- { PANGO_DIRECTION_NEUTRAL, "PANGO_DIRECTION_NEUTRAL", "neutral" }, +- { 0, NULL, NULL } +- }; +- etype = g_enum_register_static (g_intern_static_string ("PangoDirection"), values); ++ etype = g_enum_register_static ("PangoUnderline", values); + } + return etype; + } +@@ -122,7 +70,7 @@ + { PANGO_COVERAGE_EXACT, "PANGO_COVERAGE_EXACT", "exact" }, + { 0, NULL, NULL } + }; +- etype = g_enum_register_static (g_intern_static_string ("PangoCoverageLevel"), values); ++ etype = g_enum_register_static ("PangoCoverageLevel", values); + } + return etype; + } +@@ -139,7 +87,7 @@ + { PANGO_STYLE_ITALIC, "PANGO_STYLE_ITALIC", "italic" }, + { 0, NULL, NULL } + }; +- etype = g_enum_register_static (g_intern_static_string ("PangoStyle"), values); ++ etype = g_enum_register_static ("PangoStyle", values); + } + return etype; + } +@@ -153,7 +101,7 @@ + { PANGO_VARIANT_SMALL_CAPS, "PANGO_VARIANT_SMALL_CAPS", "small-caps" }, + { 0, NULL, NULL } + }; +- etype = g_enum_register_static (g_intern_static_string ("PangoVariant"), values); ++ etype = g_enum_register_static ("PangoVariant", values); + } + return etype; + } +@@ -176,7 +124,7 @@ + { PANGO_WEIGHT_ULTRAHEAVY, "PANGO_WEIGHT_ULTRAHEAVY", "ultraheavy" }, + { 0, NULL, NULL } + }; +- etype = g_enum_register_static (g_intern_static_string ("PangoWeight"), values); ++ etype = g_enum_register_static ("PangoWeight", values); + } + return etype; + } +@@ -197,7 +145,7 @@ + { PANGO_STRETCH_ULTRA_EXPANDED, "PANGO_STRETCH_ULTRA_EXPANDED", "ultra-expanded" }, + { 0, NULL, NULL } + }; +- etype = g_enum_register_static (g_intern_static_string ("PangoStretch"), values); ++ etype = g_enum_register_static ("PangoStretch", values); + } + return etype; + } +@@ -216,7 +164,7 @@ + { PANGO_FONT_MASK_GRAVITY, "PANGO_FONT_MASK_GRAVITY", "gravity" }, + { 0, NULL, NULL } + }; +- etype = g_flags_register_static (g_intern_static_string ("PangoFontMask"), values); ++ etype = g_flags_register_static ("PangoFontMask", values); + } + return etype; + } +@@ -235,7 +183,7 @@ + { PANGO_GRAVITY_AUTO, "PANGO_GRAVITY_AUTO", "auto" }, + { 0, NULL, NULL } + }; +- etype = g_enum_register_static (g_intern_static_string ("PangoGravity"), values); ++ etype = g_enum_register_static ("PangoGravity", values); + } + return etype; + } +@@ -250,7 +198,7 @@ + { PANGO_GRAVITY_HINT_LINE, "PANGO_GRAVITY_HINT_LINE", "line" }, + { 0, NULL, NULL } + }; +- etype = g_enum_register_static (g_intern_static_string ("PangoGravityHint"), values); ++ etype = g_enum_register_static ("PangoGravityHint", values); + } + return etype; + } +@@ -267,7 +215,7 @@ + { PANGO_ALIGN_RIGHT, "PANGO_ALIGN_RIGHT", "right" }, + { 0, NULL, NULL } + }; +- etype = g_enum_register_static (g_intern_static_string ("PangoAlignment"), values); ++ etype = g_enum_register_static ("PangoAlignment", values); + } + return etype; + } +@@ -282,7 +230,7 @@ + { PANGO_WRAP_WORD_CHAR, "PANGO_WRAP_WORD_CHAR", "word-char" }, + { 0, NULL, NULL } + }; +- etype = g_enum_register_static (g_intern_static_string ("PangoWrapMode"), values); ++ etype = g_enum_register_static ("PangoWrapMode", values); + } + return etype; + } +@@ -298,7 +246,7 @@ + { PANGO_ELLIPSIZE_END, "PANGO_ELLIPSIZE_END", "end" }, + { 0, NULL, NULL } + }; +- etype = g_enum_register_static (g_intern_static_string ("PangoEllipsizeMode"), values); ++ etype = g_enum_register_static ("PangoEllipsizeMode", values); + } + return etype; + } +@@ -316,7 +264,7 @@ + { PANGO_RENDER_PART_STRIKETHROUGH, "PANGO_RENDER_PART_STRIKETHROUGH", "strikethrough" }, + { 0, NULL, NULL } + }; +- etype = g_enum_register_static (g_intern_static_string ("PangoRenderPart"), values); ++ etype = g_enum_register_static ("PangoRenderPart", values); + } + return etype; + } +@@ -409,7 +357,7 @@ + { PANGO_SCRIPT_LYDIAN, "PANGO_SCRIPT_LYDIAN", "lydian" }, + { 0, NULL, NULL } + }; +- etype = g_enum_register_static (g_intern_static_string ("PangoScript"), values); ++ etype = g_enum_register_static ("PangoScript", values); + } + return etype; + } +@@ -424,7 +372,7 @@ + { PANGO_TAB_LEFT, "PANGO_TAB_LEFT", "left" }, + { 0, NULL, NULL } + }; +- etype = g_enum_register_static (g_intern_static_string ("PangoTabAlign"), values); ++ etype = g_enum_register_static ("PangoTabAlign", values); + } + return etype; + } +--- misc/pango-1.28.3/pango/pango-enum-types.h 2010-09-29 13:02:42.000000000 +0200 ++++ misc/build/pango-1.28.3/pango/pango-enum-types.h 2011-03-26 15:41:50.922912400 +0100 +@@ -12,11 +12,6 @@ + #define PANGO_TYPE_ATTR_TYPE (pango_attr_type_get_type()) + GType pango_underline_get_type (void); + #define PANGO_TYPE_UNDERLINE (pango_underline_get_type()) +-/* enumerations from "pango-bidi-type.h" */ +-GType pango_bidi_type_get_type (void); +-#define PANGO_TYPE_BIDI_TYPE (pango_bidi_type_get_type()) +-GType pango_direction_get_type (void); +-#define PANGO_TYPE_DIRECTION (pango_direction_get_type()) + /* enumerations from "pango-coverage.h" */ + GType pango_coverage_level_get_type (void); + #define PANGO_TYPE_COVERAGE_LEVEL (pango_coverage_level_get_type()) +@@ -53,7 +48,6 @@ + GType pango_tab_align_get_type (void); + #define PANGO_TYPE_TAB_ALIGN (pango_tab_align_get_type()) + G_END_DECLS +- + #endif /* __PANGO_ENUM_TYPES_H__ */ + + +--- misc/pango-1.28.3/pango/pango-language.c 2010-02-09 13:06:28.000000000 +0100 ++++ misc/build/pango-1.28.3/pango/pango-language.c 2011-03-26 10:25:32.858819200 +0100 +@@ -169,7 +169,6 @@ + static gchar * + _pango_get_lc_ctype (void) + { +-#ifdef G_OS_WIN32 + /* Somebody might try to set the locale for this process using the + * LANG or LC_ environment variables. The Microsoft C library + * doesn't know anything about them. You set the locale in the +@@ -196,9 +195,6 @@ + return g_strdup (p); + + return g_win32_getlocale (); +-#else +- return g_strdup (setlocale (LC_CTYPE, NULL)); +-#endif + } + + /** +--- misc/pango-1.28.3/pango/pango-utils.c 2010-09-29 12:39:16.000000000 +0200 ++++ misc/build/pango-1.28.3/pango/pango-utils.c 2011-03-26 11:07:49.125658000 +0100 +@@ -38,15 +38,11 @@ + # define getc_unlocked(f) getc(f) + #endif /* !HAVE_FLOCKFILE */ + +-#ifdef G_OS_WIN32 +- + #include + + #define STRICT + #include + +-#endif +- + struct PangoAlias + { + char *alias; +@@ -204,25 +200,6 @@ + + continue; + } +-#ifndef G_OS_WIN32 +- /* '~' is a quite normal and common character in file names on +- * Windows, especially in the 8.3 versions of long file names, which +- * still occur now and then. Also, few Windows user are aware of the +- * Unix shell convention that '~' stands for the home directory, +- * even if they happen to have a home directory. +- */ +- if (file[0] == '~' && file[1] == G_DIR_SEPARATOR) +- { +- char *tmp = g_strconcat (g_get_home_dir(), file + 1, NULL); +- g_free (file); +- file = tmp; +- } +- else if (file[0] == '~' && file[1] == '\0') +- { +- g_free (file); +- file = g_strdup (g_get_home_dir()); +- } +-#endif + g_free (files[i]); + files[i] = file; + +@@ -655,8 +632,6 @@ + return g_strdup (g_hash_table_lookup (config_hash, key)); + } + +-#ifdef G_OS_WIN32 +- + /* DllMain function needed to tuck away the DLL handle */ + + static HMODULE pango_dll; +@@ -676,8 +651,6 @@ + return TRUE; + } + +-#endif +- + /** + * pango_get_sysconf_subdirectory: + * +@@ -692,7 +665,6 @@ + G_CONST_RETURN char * + pango_get_sysconf_subdirectory (void) + { +-#ifdef G_OS_WIN32 + static gchar *result = NULL; + + if (result == NULL) +@@ -702,9 +674,6 @@ + g_free (root); + } + return result; +-#else +- return SYSCONFDIR "/pango"; +-#endif + } + + /** +@@ -721,7 +690,6 @@ + G_CONST_RETURN char * + pango_get_lib_subdirectory (void) + { +-#ifdef G_OS_WIN32 + static gchar *result = NULL; + + if (result == NULL) +@@ -737,9 +705,6 @@ + g_free (root); + } + return result; +-#else +- return LIBDIR "/pango"; +-#endif + } + + +--- misc/pango-1.28.3/pango/pango.def 2010-02-09 13:06:28.000000000 +0100 ++++ misc/build/pango-1.28.3/pango/pango.def 2011-03-26 11:10:51.284239600 +0100 +@@ -49,7 +49,6 @@ + pango_attribute_destroy + pango_attribute_equal + pango_bidi_type_for_unichar +- pango_bidi_type_get_type + pango_break + pango_color_copy + pango_color_free +@@ -89,7 +88,6 @@ + pango_coverage_to_bytes + pango_coverage_unref + pango_default_break +- pango_direction_get_type + pango_ellipsize_mode_get_type + pango_engine_get_type + pango_engine_lang_get_type +--- misc/pango-1.28.3/config.h 2011-03-26 08:43:30.577330000 +0100 ++++ misc/build/pango-1.28.3/config.h 2011-03-26 08:42:01.216811200 +0100 +@@ -1 +1,3 @@ +-dummy ++/*almostempty*/ ++#define PANGO_BINARY_AGE 0 ++#define DHAVE_USP10_H 1 +--- misc/pango-1.28.3/make.msc 2011-03-26 08:32:25.068811600 +0100 ++++ misc/build/pango-1.28.3/make.msc 2011-03-26 09:00:42.356161600 +0100 +@@ -1 +1,237 @@ +-dummy ++# Note that this file is hardly maintained, hardly usable without ++# manual editing, and not really part of a recommended way to build ++# GLib and related software with Microsoft's compilers. Only a few ++# persons use a build setup that involves this file. ++ ++# Common makefile definitions for building GLib, GTk+, and various ++# software that use these libraries with msvc on Win32 ++ ++# Debug builds shoud link with msvcrtd release build with msvcrt. ++!IFNDEF DEBUG ++# Full optimization: ++OPTIMIZE = -Ox ++# release with debug ++OPTIMIZE = -Zi -DG_ENABLE_DEBUG=1 ++CRUNTIME = -MD ++LINKDEBUG = /OPT:REF ++!ELSE ++# Debugging: ++OPTIMIZE = ++CRUNTIME = -MDd ++DEBUGINFO = -Zi -DG_ENABLE_DEBUG=1 ++LINKDEBUG = /debug /nodefaultlib:msvcrt.lib ++!ENDIF ++ ++LDFLAGS = /link /machine:ix86 $(LINKDEBUG) ++ ++!IFNDEF TOP ++TOP = .. ++!ENDIF ++ ++!IFNDEF PERL ++PERL = perl ++!ENDIF ++ ++XSLTPROC = d:\gnome-0\xsltproc ++ ++# paths and version numbers ++!INCLUDE module.defs ++ ++################ ++# CFLAGS and LIBS for the packages in module.defs. ++# In alphabetical order. ++ ++# Note that these CFLAGS and LIBS refer to stuff in "source" ++# directories. This is for historical reasons, and only useable if you ++# have the GLib, Pango, etc sources. If you use the prebuilt developer ++# packages, you should fix these to instead refer to the place where ++# you unzipped the developer packages. Easiest of all, run pkg-config ++# --cflags gtk+-2.0 (for instance), and paste its output as the ++# definition of GTK2_CFLAGS. Etc. ++ ++ATK_CFLAGS = -I $(ATK) ++ATK_LIBS = $(ATK)\atk\atk-$(ATK_VER).lib ++BABL_CFLAGS = -I $(BABL) ++BABL_LIBS = $(BABL)\babl\babl-1.0.lib ++ ++# force inclusion of the _right_ cairoversion.h even when using without installation ++CAIRO_CFLAGS = -I $(CAIRO)\src -I $(CAIRO) ++CAIRO_LIBS = $(CAIRO)\src\libcairo.lib ++ ++DIRENT_CFLAGS = -I ..\build\win32\dirent ++DIRENT_LIBS = ..\build\win32\dirent\dirent.lib ++ ++!IFNDEF EXIF ++EXIF_CFLAGS = -I $(DEVTOP)\include ++EXIF_LIBS = $(DEVTOP)\lib\exif.lib ++EXIF = 1 ++!ENDIF ++ ++# Don't know if Freetype2, FriBiDi and some others actually can be ++# built with MSVC, but one can produce an import library even if the ++# DLL was built with gcc. ++!IFDEF FREETYPE2 ++FREETYPE2_CFLAGS = -I $(FREETYPE2)\include ++FREETYPE2_LIBS = $(FREETYPE2)\obj\freetype-$(FREETYPE2_VER).lib ++!ELSE ++FREETYPE2_CFLAGS = -I $(DEVTOP)\include -I $(DEVTOP)\include\freetype2 ++FREETYPE2_LIBS = $(DEVTOP)\lib\freetype6.lib ++!ENDIF ++ ++!IFNDEF FONTCONFIG ++FONTCONFIG_CFLAGS = -I $(DEVTOP)\include ++FONTCONFIG_LIBS = $(DEVTOP)\lib\fontconfig.lib ++!ENDIF ++ ++GDK_PIXBUF_CFLAGS = -I $(GDK_PIXBUF) ++GDK_PIXBUF_LIBS = $(GTK2)\gdk-pixbuf\gdk_pixbuf-$(GDK_PIXBUF_VER).lib ++ ++GIMP_CFLAGS = -I $(GIMP) ++GIMP_PLUGIN_LIBS = $(GIMP)\libgimp\gimp-$(GIMP_VER).lib $(GIMP)\libgimp\gimpui-$(GIMP_VER).lib ++ ++# overide definition to use it as callable path ++GLIB = $(TOP)\glib ++ ++GLIB_CFLAGS = -I $(GLIB) -I $(GLIB)\glib -I $(GLIB)\gmodule $(INTL_CFLAGS) $(SOLARINC) ++GLIB_LIBS = $(GLIB)\glib\glib-$(GLIB_VER).lib $(GLIB)\gmodule\gmodule-$(GLIB_VER).lib $(GLIB)\gobject\gobject-$(GLIB_VER).lib $(GLIB)\gio\gio-$(GLIB_VER).lib ++GTHREAD_LIBS = $(GLIB)\gthread\gthread-$(GLIB_VER).lib ++ ++!IFNDEF GDK_PIXBUF ++GDK_PIXBUF_CFLAGS = $(GTK2_CFLAGS) ++GDK_PIXBUF_LIBS = $(GTK2_LIBS) ++!ENDIF ++ ++GNOMECANVAS_CFLAGS = -I $(GNOMECANVAS) ++GNOMECANVAS_LIBS = $(GNOMECANVAS)\libgnomecanvas\libgnomecanvas-$(GNOMECANVAS_VER).lib ++ ++GNOMEPRINT_CFLAGS = -I $(GNOMEPRINT) ++GNOMEPRINT_LIBS = $(GNOMEPRINT)\libgnomeprint\gnome-print-$(GNOMEPRINT_VER).lib ++ ++GNOMEPRINTUI_CFLAGS = -I $(GNOMEPRINTUI) ++GNOMEPRINTUI_LIBS = $(GNOMEPRINTUI)\libgnomeprintui\gnome-printui-$(GNOMEPRINTUI_VER).lib ++ ++GTK_CFLAGS = -I$(GTK)\gdk -I$(GTK)\gdk -I$(GTK) ++GTK_LIBS = $(GTK)\gtk\gtk.lib $(GTK)\gdk\gdk.lib ++ ++GTK2_CFLAGS = $(GLIB_CFLAGS) $(ATK_CFLAGS) -I$(GTK2)\gdk -I$(GTK2)\gdk -I$(GTK2) -I$(PANGO) -I$(ATK) $(CAIRO_CFLAGS) ++GTK2_LIBS = $(GTK2)\gtk\gtk-win32-$(GTK2_VER).lib $(GTK2)\gdk\gdk-win32-$(GTK2_VER).lib $(GTK2)\gdk-pixbuf\gdk_pixbuf-$(GTK2_VER).lib $(PANGO_LIBS) ++ ++GTKGLAREA_CFLAGS = -I $(GTKGLAREA) ++GTKGLAREA_LIBS = $(GTKGLAREA)\gtkgl\gtkgl-$(GTKGLAREA_VER).lib ++ ++GTKSOURCEVIEW_CFLAGS = -I $(GTKSOURCEVIEW) ++GTKSOURCEVIEW_LIBS = $(GTKSOURCEVIEW)\gtksourceview\gtksourceview.lib ++ ++LIBART_CFLAGS = -I$(LIBART)\.. -FIlibart_lgpl/art_config.h ++LIBART_LIBS = $(LIBART)\art_lgpl_2.lib ++ ++!IFNDEF INTL ++INTL_CFLAGS = -I $(OUTDIR)\inc\external ++INTL_LIBS = $(OUTDIR)/lib/intl.lib ++!ELSE ++INTL_CFLAGS = -I $(OUTDIR)\inc\external ++INTL_LIBS = $(OUTDIR)/lib/intl.lib ++!ENDIF ++ ++!IFDEF LCMS ++LCMS_CFLAGS = -DLCMS_DLL -I $(LCMS)\include ++LCMS_LIBS = $(LCMS)\Projects\VC6\Release\lcms.lib ++!ENDIF ++ ++LIBICONV_CFLAGS = -I $(LIBICONV)\include ++LIBICONV_LIBS = $(LIBICONV)\lib\iconv.lib ++ ++LIBXML_CFLAGS = -I $(LIBXML) ++LIBXML_LIBS = $(LIBXML)\xml-$(LIBXML_VER).lib ++ ++LIBXML2_CFLAGS = $(LIBICONV_CFLAGS) -I $(LIBXML2)\include ++LIBXML2_LIBS = $(LIBXML2)\libxml2.lib ++ ++LIBXSLT_CFLAGS = -I $(LIBXSLT) ++LIBXSLT_LIBS = $(LIBXSLT)\libxslt\libxslt.lib ++ ++LCMS_CFLAGS = -I $(LCMS)\include -DLCMS_DLL ++LCMS_LIBS = $(LCMS)\Projects\VC6\Release\lcms.lib ++ ++!IFNDEF JPEG ++JPEG_CFLAGS = -I $(DEVTOP)\include ++JPEG_LIBS = $(DEVTOP)\lib\jpeg.lib ++!ELSE ++JPEG_CFLAGS = -I $(JPEG) ++JPEG_LIBS = $(JPEG)\libjpeg.lib ++!ENDIF ++ ++OPENGL_CFLAGS = # None needed, headers bundled with the compiler ++OPENGL_LIBS = opengl32.lib lglu32.lib ++ ++PANGO_CFLAGS = -I $(PANGO) ++PANGO_LIBS = $(PANGO)\pango\pango-$(PANGO_VER).lib ++PANGOCAIRO_LIBS = $(PANGO_LIBS) $(PANGO)\pango\pangocairo-$(PANGO_VER).lib ++PANGOWIN32_LIBS = $(PANGO_LIBS) $(PANGO)\pango\pangowin32-$(PANGO_VER).lib ++PANGOFT2_LIBS = $(PANGO_LIBS) $(PANGO)\pango\pangoft2-$(PANGO_VER).lib ++ ++!IFDEF PNG ++PNG_CFLAGS = -I $(PNG) $(ZLIB_CFLAGS) ++PNG_LIBS = $(PNG)\projects\visualc6\Win32_LIB_Release\libpng.lib $(ZLIB_LIBS) ++!ELSE ++PNG_CFLAGS = -I $(DEVTOP)\include $(ZLIB_CFLAGS) ++PNG_LIBS = $(DEVTOP)\lib\libpng.lib $(ZLIB_LIBS) ++!ENDIF ++ ++RSVG_CFLAGS = -I $(RSVG)\.. ++RSVG_LIBS = $(RSVG)\librsvg-2.lib ++ ++SVG_CFLAGS = -I $(SVG)\src ++SVG_LIBS = $(SVG)\src\libsvg-$(SVG_VER).lib ++ ++!IFDEF TIFF ++TIFF_CFLAGS = -I $(TIFF)\libtiff ++# Use single import library for both libtiff DLL versions (with or ++# without LZW code). The user selects which DLL to use. ++TIFF_LIBS = $(TIFF)\libtiff\libtiff.lib $(JPEG_LIBS) $(ZLIB_LIBS) user32.lib ++!ELSE ++TIFF_CFLAGS = -I $(DEVTOP)\include ++TIFF_LIBS = $(DEVTOP)\lib\libtiff.lib ++!ENDIF ++ ++VIPS_CFLAGS = -I $(VIPS)/include ++VIPS_LIBS = $(VIPS)/libsrc/vips.lib ++ ++!IFDEF ZLIB ++ZLIB_CFLAGS = -I $(ZLIB) ++ZLIB_LIBS = $(OUTDIR)\lib\zlib.lib ++!ELSE ++ZLIB_CFLAGS = -I $(ZLIB) ++ZLIB_LIBS = $(OUTDIR)\lib\zlib.lib ++!ENDIF ++ ++################ ++# Compiler to use. ++ ++CCOMPILER = cl ++CC = $(CCOMPILER) $(OPTIMIZE) $(CRUNTIME) -W3 -nologo ++ ++################ ++# The including makefile should define INCLUDES, DEFINES and ++# DEPCFLAGS. INCLUDES are the includes related to the module being ++# built. DEFINES similarly. DEPCFLAGS should be set to a set of ++# GLIB_CFLAGS, GTK_CFLAGS etc corresponding to what other modules we ++# depend on. ++ ++CFLAGS = $(OPTIMIZE) $(DEBUGINFO) $(INCLUDES) $(DEFINES) $(DEPCFLAGS) ++# make cl/wcl386 compatible (c99 and cdecl) ++#OPTIMIZE = -Ox ++#CFLAGS = /passwopts:-za99 /passwopts:-ecc $(DEBUGINFO) $(INCLUDES) $(DEFINES) $(DEPCFLAGS) ++.c.i : ++ $(CC) $(CFLAGS) -E $< >$@ ++ ++# The default target should be "all" ++ ++default: all ++ ++clean:: ++ -del *.obj *.res *.i *.exe *.dll *.lib *.err *.map *.exp *.lk1 *.mk1 *.ilk *.manifest ++ -del *.pdb ++ ++# Needed by hacker rule to make makefile.msc from makefile.msc.in: ++SED = e:\cygwin\bin\sed +--- misc/pango-1.28.3/module.defs 2011-03-26 15:50:26.773265200 +0100 ++++ misc/build/pango-1.28.3/module.defs 2011-03-26 15:49:47.850892000 +0100 +@@ -1 +1,124 @@ +-dummy ++# Note that this file is hardly maintained, hardly usable without ++# manual editing, and not really part of a recommended way to build ++# GLib and related software with Microsoft's compilers. Only a few ++# persons use a build setup that involves this file. ++ ++# This file is included by makefiles for both GNU Make (for gcc ++# (mingw) builds, and NMAKE (for MSVC builds). ++ ++MODULE_DEFS_INCLUDED=1 ++ ++# fallback if a specifc library is not contained in TOP (i.e. not self-compiled) ++DEVTOP=$(TOP)\..\other\dev ++ ++################ ++# The version macros define what versions of libraries to use. ++ ++# The version numbers are defined unconditionally. If you want to ++# produce a newer version of one of these libraries, the new number ++# should be defined in the specific project makefile _after_ including ++# this file (or make.{mingw,msc}). These version numbers are used in ++# the names of some import libraries. ++ ++# Please note that there are two (or three) ways to build the GLib ++# (and GTK+ etc) libraries on Win32: Either using the same ++# auto*/configure mechanism to generate makefiles as on Unix, and ++# libtool to handle DLL creation. This currently only works for gcc, ++# and even then it is hellish to set up to work 100% correctly. For ++# people using that, this file is totally irrelevant. ++ ++# Or, use hand-written makefiles, either for MSVC (these are called ++# makefile.msc and maintained by Hans Breuer), or for gcc ++# (makefile.mingw, by Tor Lillqvist). Only for GLib are the ++# makefile.mingw files believed to be up-to-date, for other modules ++# they have been left to rot after Tor started using the ++# autoconfiscated way of building. ++ ++# The stuff here uses the same name for (import) libraries as on Unix, ++# as libtool uses those, and the semi-official developer packages are ++# built using libtool. ++ ++ATK_VER = 1.0 ++CAIRO_VER = 1.4 ++FREETYPE2_VER = 2.0 ++GIMP_VER = 1.2 ++GDK_PIXBUF_VER = 2.0 ++GLIB_VER = 2.0 ++GTKGLAREA_VER = 1.2.2 ++GTK2_VER = 2.0 ++LIBGLADE_VER = 0.14 ++LIBICONV_VER = 1.7 ++LIBXML_VER = 1.8.7 ++LIBXML2_VER = 2.4.2 ++PANGO_VER = 1.0 ++POPT_VER = 1.4 ++SVG_VER = 0.1 ++RSVG_VER = 2.4 ++ ++################ ++# Locations of various source directories. TOP is defined in make.{mingw,msc} ++ ++# First stuff that is in the GNOME CVS repository. ++# In alphabetical order. ++ ++ATK = $(TOP)/atk ++BABL = $(TOP)/babl ++CAIRO = d:\devel\from-svn\other\cairo-1.8.4 ++GIMP = $(TOP)/gimp ++GEGL = $(TOP)/gegl ++GLIB = $(TOP)/glib ++GNOMECANVAS = $(TOP)\libgnomecanvas ++GNOMECANVAS_VER = 2.9 ++ ++# GTK+ 1.3.0, gtk-1-3-win32-production branch. Rename directory ++# to gtk+p after initial checkout from CVS. ++GTK = $(TOP)/gtk+p ++# GTK+ 2.0 ++GTK2 = $(TOP)/gtk+ ++GTKSOURCEVIEW = $(TOP)/gtksourceview ++GNOMEPRINT = $(TOP)\libgnomeprint ++GNOMEPRINT_VER = 2.8 ++LIBGLADE = $(TOP)/libglade ++LIBXML = $(TOP)/libxml-$(LIBXML_VER) ++LIBXML2 = $(TOP)/libxml2 ++#PANGO = $(TOP)/pango-1-8 ++PANGO = $(TOP)/pango ++ ++GNOMEPRINTUI = $(TOP)\libgnomeprintui ++GNOMEPRINTUI_VER = 2.2 ++ ++# Aux programs ++GLIB_GENMARSHAL = $(GLIB)/gobject/glib-genmarshal ++ ++# Stuff from other places. ++ ++# Note this was is specific to what tml happened to have on his disk ++# at some time in history. To really be able to recompile something ++# that uses for instance libjpeg, you should download a suitable ++# binary "developer" distribution of it, unpack it into some location, ++# and edit this file correspondingly. You should not take the versions ++# mentioned here too literally, use the latest version you can find, ++# or the ones the current GTK+ 2.0 for Windows uses. ++ ++#FREETYPE2 = $(TOP)/freetype2 ++GTKEXTRA = $(TOP)/gtk+extra ++GTKGLAREA = $(TOP)/gtkglarea ++#INTL = d:/devel/from-svn/other/intl-tml ++JPEG = d:/devel/from-svn/other/jpeg-6b ++LCMS = d:/devel/other/lcms-1.15 ++LIBART = $(TOP)/libart_lgpl ++LIBICONV = $(TOP)/libiconv-$(LIBICONV_VER) ++LIBXSLT = $(TOP)/libxslt ++#PNG = d:/devel/from-svn/other/lpng1224 ++RSVG = $(TOP)\librsvg ++SVG = $(TOP)\libsvg ++#TIFF = d:/devel/from-svn/other/tiff-3.7.2 ++#ZLIB = d:/devel/from-svn/other/zlib123 ++ ++# Headers from Microsoft's PlatformSDK (that aren't present in ++# mingw) are needed by a just a few packages when compiling with gcc. ++# This is just where tml has it installed. ++PLATFORMSDK = i:/src/psdk ++ ++# ++WTKIT = d:/devel/from-svn/other\wtkit126 +--- misc/pango-1.28.3/glib-mkenums.pl 2011-03-26 07:31:15.240588400 +0100 ++++ misc/build/pango-1.28.3/glib-mkenums.pl 2011-03-26 07:34:33.961882000 +0100 +@@ -1 +1,538 @@ +-dummy ++#! perl.exe ++ ++use warnings; ++use File::Basename; ++use Safe; ++ ++# glib-mkenums.pl ++# Information about the current enumeration ++my $flags; # Is enumeration a bitmask? ++my $option_underscore_name; # Overriden underscore variant of the enum name ++ # for example to fix the cases we don't get the ++ # mixed-case -> underscorized transform right. ++my $option_lowercase_name; # DEPRECATED. A lower case name to use as part ++ # of the *_get_type() function, instead of the ++ # one that we guess. For instance, when an enum ++ # uses abnormal capitalization and we can not ++ # guess where to put the underscores. ++my $seenbitshift; # Have we seen bitshift operators? ++my $enum_prefix; # Prefix for this enumeration ++my $enumname; # Name for this enumeration ++my $enumshort; # $enumname without prefix ++my $enumname_prefix; # prefix of $enumname ++my $enumindex = 0; # Global enum counter ++my $firstenum = 1; # Is this the first enumeration per file? ++my @entries; # [ $name, $val ] for each entry ++my $sandbox = Safe->new; # sandbox for safe evaluation of expressions ++ ++sub parse_trigraph { ++ my $opts = shift; ++ my @opts; ++ ++ for $opt (split /\s*,\s*/, $opts) { ++ $opt =~ s/^\s*//; ++ $opt =~ s/\s*$//; ++ my ($key,$val) = $opt =~ /(\w+)(?:=(.+))?/; ++ defined $val or $val = 1; ++ push @opts, $key, $val; ++ } ++ @opts; ++} ++sub parse_entries { ++ my $file = shift; ++ my $file_name = shift; ++ my $looking_for_name = 0; ++ ++ while (<$file>) { ++ # read lines until we have no open comments ++ while (m@/\*([^*]|\*(?!/))*$@) { ++ my $new; ++ defined ($new = <$file>) || die "Unmatched comment in $ARGV"; ++ $_ .= $new; ++ } ++ # strip comments w/o options ++ s@/\*(?!<) ++ ([^*]+|\*(?!/))* ++ \*/@@gx; ++ ++ # strip newlines ++ s@\n@ @; ++ ++ # skip empty lines ++ next if m@^\s*$@; ++ ++ if ($looking_for_name) { ++ if (/^\s*(\w+)/) { ++ $enumname = $1; ++ return 1; ++ } ++ } ++ ++ # Handle include files ++ if (/^\#include\s*<([^>]*)>/ ) { ++ my $file= "../$1"; ++ open NEWFILE, $file or die "Cannot open include file $file: $!\n"; ++ ++ if (parse_entries (\*NEWFILE, $NEWFILE)) { ++ return 1; ++ } else { ++ next; ++ } ++ } ++ ++ if (/^\s*\}\s*(\w+)/) { ++ $enumname = $1; ++ $enumindex++; ++ return 1; ++ } ++ ++ if (/^\s*\}/) { ++ $enumindex++; ++ $looking_for_name = 1; ++ next; ++ } ++ ++ if (m@^\s* ++ (\w+)\s* # name ++ (?:=( # value ++ \s*\w+\s*\(.*\)\s* # macro with multiple args ++ | # OR ++ (?:[^,/]|/(?!\*))* # anything but a comma or comment ++ ))?,?\s* ++ (?:/\*< # options ++ (([^*]|\*(?!/))*) ++ >\s*\*/)?,? ++ \s*$ ++ @x) { ++ my ($name, $value, $options) = ($1,$2,$3); ++ ++ if (!defined $flags && defined $value && $value =~ /< Output file header\n"; ++ print " --fprod Per input file production\n"; ++ print " --ftail Output file trailer\n"; ++ print " --eprod Per enum text (produced prior to value itarations)\n"; ++ print " --vhead Value header, produced before iterating over enum values\n"; ++ print " --vprod Value text, produced for each enum value\n"; ++ print " --vtail Value tail, produced after iterating over enum values\n"; ++ print " --comments Comment structure\n"; ++ print " --template file Template file\n"; ++ print " -v, --version Print version informations\n\n"; ++ print "Production text substitutions:\n"; ++ print " \@EnumName\@ PrefixTheXEnum\n"; ++ print " \@enum_name\@ prefix_the_xenum\n"; ++ print " \@ENUMNAME\@ PREFIX_THE_XENUM\n"; ++ print " \@ENUMSHORT\@ THE_XENUM\n"; ++ print " \@ENUMPREFIX\@ PREFIX\n"; ++ print " \@VALUENAME\@ PREFIX_THE_XVALUE\n"; ++ print " \@valuenick\@ the-xvalue\n"; ++ print " \@valuenum\@ the integer value (limited support, Since: 2.26)\n"; ++ print " \@type\@ either enum or flags\n"; ++ print " \@Type\@ either Enum or Flags\n"; ++ print " \@TYPE\@ either ENUM or FLAGS\n"; ++ print " \@filename\@ name of current input file\n"; ++ print " \@basename\@ base name of the current input file (Since: 2.22)\n"; ++ exit 0; ++} ++ ++# production variables: ++my $fhead = ""; # output file header ++my $fprod = ""; # per input file production ++my $ftail = ""; # output file trailer ++my $eprod = ""; # per enum text (produced prior to value itarations) ++my $vhead = ""; # value header, produced before iterating over enum values ++my $vprod = ""; # value text, produced for each enum value ++my $vtail = ""; # value tail, produced after iterating over enum values ++my $comment_tmpl = ""; # comment template ++ ++sub read_template_file { ++ my ($file) = @_; ++ my %tmpl = ('file-header', $fhead, ++ 'file-production', $fprod, ++ 'file-tail', $ftail, ++ 'enumeration-production', $eprod, ++ 'value-header', $vhead, ++ 'value-production', $vprod, ++ 'value-tail', $vtail, ++ 'comment', $comment_tmpl); ++ my $in = 'junk'; ++ open (FILE, $file) || die "Can't open $file: $!\n"; ++ while () { ++ if (/^\/\*\*\*\s+(BEGIN|END)\s+([\w-]+)\s+\*\*\*\//) { ++ if (($in eq 'junk') && ($1 eq 'BEGIN') && (exists($tmpl{$2}))) { ++ $in = $2; ++ next; ++ } ++ elsif (($in eq $2) && ($1 eq 'END') && (exists($tmpl{$2}))) { ++ $in = 'junk'; ++ next; ++ } else { ++ die "Malformed template file $file\n"; ++ } ++ } ++ if (!($in eq 'junk')) { ++ $tmpl{$in} .= $_; ++ } ++ } ++ close (FILE); ++ if (!($in eq 'junk')) { ++ die "Malformed template file $file\n"; ++ } ++ $fhead = $tmpl{'file-header'}; ++ $fprod = $tmpl{'file-production'}; ++ $ftail = $tmpl{'file-tail'}; ++ $eprod = $tmpl{'enumeration-production'}; ++ $vhead = $tmpl{'value-header'}; ++ $vprod = $tmpl{'value-production'}; ++ $vtail = $tmpl{'value-tail'}; ++ $comment_tmpl = $tmpl{'comment'}; ++ ++ # default to C-style comments ++ $comment_tmpl = "/* \@comment\@ */" if $comment_tmpl eq ""; ++} ++ ++if (!defined $ARGV[0]) { ++ usage; ++} ++while ($_=$ARGV[0],/^-/) { ++ shift; ++ last if /^--$/; ++ if (/^--template$/) { read_template_file (shift); } ++ elsif (/^--fhead$/) { $fhead = $fhead . shift } ++ elsif (/^--fprod$/) { $fprod = $fprod . shift } ++ elsif (/^--ftail$/) { $ftail = $ftail . shift } ++ elsif (/^--eprod$/) { $eprod = $eprod . shift } ++ elsif (/^--vhead$/) { $vhead = $vhead . shift } ++ elsif (/^--vprod$/) { $vprod = $vprod . shift } ++ elsif (/^--vtail$/) { $vtail = $vtail . shift } ++ elsif (/^--comments$/) { $comment_tmpl = shift } ++ elsif (/^--help$/ || /^-h$/ || /^-\?$/) { usage; } ++ elsif (/^--version$/ || /^-v$/) { version; } ++ else { usage; } ++ last if not defined($ARGV[0]); ++} ++ ++# put auto-generation comment ++{ ++ my $comment = $comment_tmpl; ++ $comment =~ s/\@comment\@/Generated data (by glib-mkenums)/; ++ print "\n" . $comment . "\n\n"; ++} ++ ++if (length($fhead)) { ++ my $prod = $fhead; ++ my $base = basename ($ARGV[0]); ++ ++ $prod =~ s/\@filename\@/$ARGV[0]/g; ++ $prod =~ s/\@basename\@/$base/g; ++ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; ++ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g; ++ chomp ($prod); ++ ++ print "$prod\n"; ++} ++ ++while (<>) { ++ if (eof) { ++ close (ARGV); # reset line numbering ++ $firstenum = 1; # Flag to print filename at next enum ++ } ++ ++ # read lines until we have no open comments ++ while (m@/\*([^*]|\*(?!/))*$@) { ++ my $new; ++ defined ($new = <>) || die "Unmatched comment in $ARGV"; ++ $_ .= $new; ++ } ++ # strip comments w/o options ++ s@/\*(?!<) ++ ([^*]+|\*(?!/))* ++ \*/@@gx; ++ ++ if (m@^\s*typedef\s+enum\s* ++ ({)?\s* ++ (?:/\*< ++ (([^*]|\*(?!/))*) ++ >\s*\*/)? ++ \s*({)? ++ @x) { ++ if (defined $2) { ++ my %options = parse_trigraph ($2); ++ next if defined $options{skip}; ++ $enum_prefix = $options{prefix}; ++ $flags = $options{flags}; ++ $option_lowercase_name = $options{lowercase_name}; ++ $option_underscore_name = $options{underscore_name}; ++ } else { ++ $enum_prefix = undef; ++ $flags = undef; ++ $option_lowercase_name = undef; ++ $option_underscore_name = undef; ++ } ++ if (defined $option_lowercase_name) { ++ if (defined $option_underscore_name) { ++ print STDERR "$0: $ARGV:$.: lowercase_name overriden with underscore_name\n"; ++ $option_lowercase_name = undef; ++ } else { ++ print STDERR "$0: $ARGV:$.: lowercase_name is deprecated, use underscore_name\n"; ++ } ++ } ++ # Didn't have trailing '{' look on next lines ++ if (!defined $1 && !defined $4) { ++ while (<>) { ++ if (s/^\s*\{//) { ++ last; ++ } ++ } ++ } ++ ++ $seenbitshift = 0; ++ @entries = (); ++ ++ # Now parse the entries ++ parse_entries (\*ARGV, $ARGV); ++ ++ # figure out if this was a flags or enums enumeration ++ if (!defined $flags) { ++ $flags = $seenbitshift; ++ } ++ ++ # Autogenerate a prefix ++ if (!defined $enum_prefix) { ++ for (@entries) { ++ my $nick = $_->[2]; ++ if (!defined $nick) { ++ my $name = $_->[0]; ++ if (defined $enum_prefix) { ++ my $tmp = ~ ($name ^ $enum_prefix); ++ ($tmp) = $tmp =~ /(^\xff*)/; ++ $enum_prefix = $enum_prefix & $tmp; ++ } else { ++ $enum_prefix = $name; ++ } ++ } ++ } ++ if (!defined $enum_prefix) { ++ $enum_prefix = ""; ++ } else { ++ # Trim so that it ends in an underscore ++ $enum_prefix =~ s/_[^_]*$/_/; ++ } ++ } else { ++ # canonicalize user defined prefixes ++ $enum_prefix = uc($enum_prefix); ++ $enum_prefix =~ s/-/_/g; ++ $enum_prefix =~ s/(.*)([^_])$/$1$2_/; ++ } ++ ++ for $entry (@entries) { ++ my ($name,$num,$nick) = @{$entry}; ++ if (!defined $nick) { ++ ($nick = $name) =~ s/^$enum_prefix//; ++ $nick =~ tr/_/-/; ++ $nick = lc($nick); ++ @{$entry} = ($name, $num, $nick); ++ } ++ } ++ ++ ++ # Spit out the output ++ if (defined $option_underscore_name) { ++ $enumlong = uc $option_underscore_name; ++ $enumsym = lc $option_underscore_name; ++ $enumshort = $enumlong; ++ $enumshort =~ s/^[A-Z][A-Z0-9]*_//; ++ ++ $enumname_prefix = $enumlong; ++ $enumname_prefix =~ s/$enumshort$//; ++ } else { ++ # enumname is e.g. GMatchType ++ $enspace = $enumname; ++ $enspace =~ s/^([A-Z][a-z]*).*$/$1/; ++ ++ $enumshort = $enumname; ++ $enumshort =~ s/^[A-Z][a-z]*//; ++ $enumshort =~ s/([^A-Z])([A-Z])/$1_$2/g; ++ $enumshort =~ s/([A-Z][A-Z])([A-Z][0-9a-z])/$1_$2/g; ++ $enumshort = uc($enumshort); ++ ++ $enumname_prefix = $enumname; ++ $enumname_prefix =~ s/^([A-Z][a-z]*).*$/$1/; ++ $enumname_prefix = uc($enumname_prefix); ++ ++ $enumlong = uc($enspace) . "_" . $enumshort; ++ $enumsym = lc($enspace) . "_" . lc($enumshort); ++ ++ if (defined($option_lowercase_name)) { ++ $enumsym = $option_lowercase_name; ++ } ++ } ++ ++ if ($firstenum) { ++ $firstenum = 0; ++ ++ if (length($fprod)) { ++ my $prod = $fprod; ++ my $base = basename ($ARGV); ++ ++ $prod =~ s/\@filename\@/$ARGV/g; ++ $prod =~ s/\@basename\@/$base/g; ++ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; ++ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g; ++ chomp ($prod); ++ ++ print "$prod\n"; ++ } ++ } ++ ++ if (length($eprod)) { ++ my $prod = $eprod; ++ ++ $prod =~ s/\@enum_name\@/$enumsym/g; ++ $prod =~ s/\@EnumName\@/$enumname/g; ++ $prod =~ s/\@ENUMSHORT\@/$enumshort/g; ++ $prod =~ s/\@ENUMNAME\@/$enumlong/g; ++ $prod =~ s/\@ENUMPREFIX\@/$enumname_prefix/g; ++ if ($flags) { $prod =~ s/\@type\@/flags/g; } else { $prod =~ s/\@type\@/enum/g; } ++ if ($flags) { $prod =~ s/\@Type\@/Flags/g; } else { $prod =~ s/\@Type\@/Enum/g; } ++ if ($flags) { $prod =~ s/\@TYPE\@/FLAGS/g; } else { $prod =~ s/\@TYPE\@/ENUM/g; } ++ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; ++ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g; ++ chomp ($prod); ++ ++ print "$prod\n"; ++ } ++ ++ if (length($vhead)) { ++ my $prod = $vhead; ++ ++ $prod =~ s/\@enum_name\@/$enumsym/g; ++ $prod =~ s/\@EnumName\@/$enumname/g; ++ $prod =~ s/\@ENUMSHORT\@/$enumshort/g; ++ $prod =~ s/\@ENUMNAME\@/$enumlong/g; ++ $prod =~ s/\@ENUMPREFIX\@/$enumname_prefix/g; ++ if ($flags) { $prod =~ s/\@type\@/flags/g; } else { $prod =~ s/\@type\@/enum/g; } ++ if ($flags) { $prod =~ s/\@Type\@/Flags/g; } else { $prod =~ s/\@Type\@/Enum/g; } ++ if ($flags) { $prod =~ s/\@TYPE\@/FLAGS/g; } else { $prod =~ s/\@TYPE\@/ENUM/g; } ++ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; ++ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g; ++ chomp ($prod); ++ ++ print "$prod\n"; ++ } ++ ++ if (length($vprod)) { ++ my $prod = $vprod; ++ my $next_num = 0; ++ ++ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; ++ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g; ++ for (@entries) { ++ my ($name,$num,$nick) = @{$_}; ++ my $tmp_prod = $prod; ++ ++ if ($prod =~ /\@valuenum\@/) { ++ # only attempt to eval the value if it is requested ++ # this prevents us from throwing errors otherwise ++ if (defined $num) { ++ # use sandboxed perl evaluation as a reasonable ++ # approximation to C constant folding ++ $num = $sandbox->reval ($num); ++ ++ # make sure it parsed to an integer ++ if (!defined $num or $num !~ /^-?\d+$/) { ++ die "Unable to parse enum value '$num'"; ++ } ++ } else { ++ $num = $next_num; ++ } ++ ++ $tmp_prod =~ s/\@valuenum\@/$num/g; ++ $next_num = $num + 1; ++ } ++ ++ $tmp_prod =~ s/\@VALUENAME\@/$name/g; ++ $tmp_prod =~ s/\@valuenick\@/$nick/g; ++ if ($flags) { $tmp_prod =~ s/\@type\@/flags/g; } else { $tmp_prod =~ s/\@type\@/enum/g; } ++ if ($flags) { $tmp_prod =~ s/\@Type\@/Flags/g; } else { $tmp_prod =~ s/\@Type\@/Enum/g; } ++ if ($flags) { $tmp_prod =~ s/\@TYPE\@/FLAGS/g; } else { $tmp_prod =~ s/\@TYPE\@/ENUM/g; } ++ chomp ($tmp_prod); ++ ++ print "$tmp_prod\n"; ++ } ++ } ++ ++ if (length($vtail)) { ++ my $prod = $vtail; ++ ++ $prod =~ s/\@enum_name\@/$enumsym/g; ++ $prod =~ s/\@EnumName\@/$enumname/g; ++ $prod =~ s/\@ENUMSHORT\@/$enumshort/g; ++ $prod =~ s/\@ENUMNAME\@/$enumlong/g; ++ $prod =~ s/\@ENUMPREFIX\@/$enumname_prefix/g; ++ if ($flags) { $prod =~ s/\@type\@/flags/g; } else { $prod =~ s/\@type\@/enum/g; } ++ if ($flags) { $prod =~ s/\@Type\@/Flags/g; } else { $prod =~ s/\@Type\@/Enum/g; } ++ if ($flags) { $prod =~ s/\@TYPE\@/FLAGS/g; } else { $prod =~ s/\@TYPE\@/ENUM/g; } ++ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; ++ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g; ++ chomp ($prod); ++ ++ print "$prod\n"; ++ } ++ } ++} ++ ++if (length($ftail)) { ++ my $prod = $ftail; ++ my $base = basename ($ARGV); ++ ++ $prod =~ s/\@filename\@/$ARGV/g; ++ $prod =~ s/\@basename\@/$base/g; ++ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; ++ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g; ++ chomp ($prod); ++ ++ print "$prod\n"; ++} ++ ++# put auto-generation comment ++{ ++ my $comment = $comment_tmpl; ++ $comment =~ s/\@comment\@/Generated data ends here/; ++ print "\n" . $comment . "\n\n"; ++} +--- misc/pango-1.28.3/msvc_recommended_pragmas.h 2011-03-26 07:30:07.692848800 +0100 ++++ misc/build/pango-1.28.3/msvc_recommended_pragmas.h 2011-03-26 07:34:43.524504400 +0100 +@@ -1 +1,31 @@ +-dummy ++#ifndef _MSC_VER ++#pragma error "This header is for Microsoft VC only." ++#endif /* _MSC_VER */ ++ ++/* Make MSVC more pedantic, this is a recommended pragma list ++ * from _Win32_Programming_ by Rector and Newcomer. ++ */ ++#pragma warning(error:4002) /* too many actual parameters for macro */ ++#pragma warning(error:4003) /* not enough actual parameters for macro */ ++#pragma warning(1:4010) /* single-line comment contains line-continuation character */ ++#pragma warning(error:4013) /* 'function' undefined; assuming extern returning int */ ++#pragma warning(1:4016) /* no function return type; using int as default */ ++#pragma warning(error:4020) /* too many actual parameters */ ++#pragma warning(error:4021) /* too few actual parameters */ ++#pragma warning(error:4027) /* function declared without formal parameter list */ ++#pragma warning(error:4029) /* declared formal parameter list different from definition */ ++#pragma warning(error:4033) /* 'function' must return a value */ ++#pragma warning(error:4035) /* 'function' : no return value */ ++#pragma warning(error:4045) /* array bounds overflow */ ++#pragma warning(error:4047) /* different levels of indirection */ ++#pragma warning(error:4049) /* terminating line number emission */ ++#pragma warning(error:4053) /* An expression of type void was used as an operand */ ++#pragma warning(error:4071) /* no function prototype given */ ++#pragma warning(disable:4101) /* unreferenced local variable */ ++#pragma warning(error:4150) ++ ++#pragma warning(disable:4244) /* No possible loss of data warnings */ ++#pragma warning(disable:4305) /* No truncation from int to char warnings */ ++ ++/* work around Microsoft's premature attempt to deprecate the C-Library */ ++#pragma warning(disable:4996) /* This function or variable may be unsafe. */ diff --git a/pango/prj/build.lst b/pango/prj/build.lst index 44c735efe9fd..419eebb04ca6 100644 --- a/pango/prj/build.lst +++ b/pango/prj/build.lst @@ -1,3 +1,3 @@ -pg pango : gettext NULL +pg pango : gettext glib soltools NULL pg pango usr1 - all pg_mkout NULL pg pango nmake - all pg_pango NULL diff --git a/pango/prj/d.lst b/pango/prj/d.lst index a334a657bff1..ff7ba3340dce 100644 --- a/pango/prj/d.lst +++ b/pango/prj/d.lst @@ -1,38 +1,44 @@ mkdir: %_DEST%\inc%_EXT%\external -..\%__SRC%\lib\libpango-1.0.0.dylib %_DEST%\lib%_EXT%\libpango-1.0.0.dylib -symlink: %_DEST%\lib%_EXT%\libpango-1.0.0.dylib %_DEST%\lib%_EXT%\libpango-1.0.dylib -..\%__SRC%\lib\libpangocairo-1.0.0.dylib %_DEST%\lib%_EXT%\libpangocairo-1.0.0.dylib -symlink: %_DEST%\lib%_EXT%\libpangocairo-1.0.0.dylib %_DEST%\lib%_EXT%\libpangocairo-1.0.dylib - -..\%__SRC%\bin\pango-querymodules %_DEST%\bin%_EXT%\pango-querymodules - mkdir: %_DEST%\inc%_EXT%\external\pango-1.0 mkdir: %_DEST%\inc%_EXT%\external\pango-1.0\pango -..\%__SRC%\inc\pango-attributes.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-attributes.h -..\%__SRC%\inc\pango-enum-types.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-enum-types.h -..\%__SRC%\inc\pango-glyph.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-glyph.h -..\%__SRC%\inc\pango-modules.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-modules.h + ..\%__SRC%\inc\pango.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango.h -..\%__SRC%\inc\pango-bidi-type.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-bidi-type.h -..\%__SRC%\inc\pango-features.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-features.h -..\%__SRC%\inc\pango-gravity.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-gravity.h -..\%__SRC%\inc\pango-renderer.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-renderer.h +..\%__SRC%\inc\pangocairo.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pangocairo.h ..\%__SRC%\inc\pangoatsui.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pangoatsui.h +..\%__SRC%\inc\pango-attributes.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-attributes.h +..\%__SRC%\inc\pango-bidi-type.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-bidi-type.h ..\%__SRC%\inc\pango-break.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-break.h -..\%__SRC%\inc\pango-font.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-font.h -..\%__SRC%\inc\pango-item.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-item.h -..\%__SRC%\inc\pango-script.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-script.h -..\%__SRC%\inc\pangocairo.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pangocairo.h ..\%__SRC%\inc\pango-context.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-context.h -..\%__SRC%\inc\pango-fontmap.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-fontmap.h -..\%__SRC%\inc\pango-language.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-language.h -..\%__SRC%\inc\pango-tabs.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-tabs.h ..\%__SRC%\inc\pango-coverage.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-coverage.h -..\%__SRC%\inc\pango-fontset.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-fontset.h -..\%__SRC%\inc\pango-layout.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-layout.h -..\%__SRC%\inc\pango-types.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-types.h ..\%__SRC%\inc\pango-engine.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-engine.h +..\%__SRC%\inc\pango-enum-types.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-enum-types.h +..\%__SRC%\inc\pango-features.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-features.h +..\%__SRC%\inc\pango-font.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-font.h +..\%__SRC%\inc\pango-fontmap.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-fontmap.h +..\%__SRC%\inc\pango-fontset.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-fontset.h +..\%__SRC%\inc\pango-glyph.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-glyph.h ..\%__SRC%\inc\pango-glyph-item.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-glyph-item.h +..\%__SRC%\inc\pango-gravity.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-gravity.h +..\%__SRC%\inc\pango-item.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-item.h +..\%__SRC%\inc\pango-language.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-language.h +..\%__SRC%\inc\pango-layout.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-layout.h ..\%__SRC%\inc\pango-matrix.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-matrix.h +..\%__SRC%\inc\pango-modules.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-modules.h +..\%__SRC%\inc\pango-renderer.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-renderer.h +..\%__SRC%\inc\pango-script.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-script.h +..\%__SRC%\inc\pango-tabs.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-tabs.h +..\%__SRC%\inc\pango-types.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-types.h ..\%__SRC%\inc\pango-utils.h %_DEST%\inc%_EXT%\external\pango-1.0\pango\pango-utils.h +..\%__SRC%\lib\libpango-1.0.0.dylib %_DEST%\lib%_EXT%\libpango-1.0.0.dylib +symlink: %_DEST%\lib%_EXT%\libpango-1.0.0.dylib %_DEST%\lib%_EXT%\libpango-1.0.dylib +..\%__SRC%\lib\libpangocairo-1.0.0.dylib %_DEST%\lib%_EXT%\libpangocairo-1.0.0.dylib +symlink: %_DEST%\lib%_EXT%\libpangocairo-1.0.0.dylib %_DEST%\lib%_EXT%\libpangocairo-1.0.dylib + +..\%__SRC%\lib\ pango-1.0.lib %_DEST%\lib%_EXT%\pango-1.0.lib +..\%__SRC%\lib\ pangocairo-1.0.lib %_DEST%\lib%_EXT%\pangocairo-1.0.lib +..\%__SRC%\lib\ pangowin32-1.0.lib %_DEST%\lib%_EXT%\pangowin32-1.0.lib + +..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT% +..\%__SRC%\bin\pango-querymodules %_DEST%\bin%_EXT%\pango-querymodules +..\%__SRC%\bin\querymodules.exe %_DEST%\bin%_EXT%\pango-querymodules.exe -- cgit v1.2.3 From 5cf054625f1a5963ff1b0b5ac2bbee220a64caaa Mon Sep 17 00:00:00 2001 From: ka Date: Sat, 26 Mar 2011 17:56:26 +0100 Subject: rsvglibs: corrected dependencies --- gdk-pixbuf/prj/build.lst | 2 +- librsvg/prj/build.lst | 4 ++-- pango/makefile.mk | 0 pango/prj/d.lst | 0 4 files changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 pango/makefile.mk mode change 100644 => 100755 pango/prj/d.lst diff --git a/gdk-pixbuf/prj/build.lst b/gdk-pixbuf/prj/build.lst index 1182d1bf6d19..550466a7b9ed 100644 --- a/gdk-pixbuf/prj/build.lst +++ b/gdk-pixbuf/prj/build.lst @@ -1,3 +1,3 @@ -gp gdk-pixbuf : glib jpeg libpng soltools NULL +gp gdk-pixbuf : glib gettext jpeg libpng soltools NULL gp gdk-pixbuf usr1 - all gp_mkout NULL gp gdk-pixbuf nmake - all gp_gdk-pixbuf NULL diff --git a/librsvg/prj/build.lst b/librsvg/prj/build.lst index e2b4d1fab07a..d667da5c7b0b 100644 --- a/librsvg/prj/build.lst +++ b/librsvg/prj/build.lst @@ -1,3 +1,3 @@ -rg librsvg : pango libcroco libgsf cairo gdk-pixbuf soltools NULL +rg librsvg : libxml2 pango libcroco libgsf cairo gdk-pixbuf glib gettext soltools NULL rg librsvg usr1 - all rg_mkout NULL -rg librsvg nmake - all rg_gettext NULL +rg librsvg nmake - all rg_librsvg NULL diff --git a/pango/makefile.mk b/pango/makefile.mk old mode 100644 new mode 100755 diff --git a/pango/prj/d.lst b/pango/prj/d.lst old mode 100644 new mode 100755 -- cgit v1.2.3 From 97c0eb66acac1bc05ad30928e0f0d8203c75070c Mon Sep 17 00:00:00 2001 From: ka Date: Sat, 26 Mar 2011 17:56:26 +0100 Subject: rsvglibs: corrected dependencies --- ooo.lst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ooo.lst b/ooo.lst index 447a62446395..47e56f342bd7 100644 --- a/ooo.lst +++ b/ooo.lst @@ -75,12 +75,14 @@ eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip ff369e69ef0f0143beb5626164e87ae2-neon-0.29.5.tar.gz -220035f111ea045a51e290906025e8b5-libpng-1.5.1.tar.gz -a2c10c04f396a9ce72894beb18b4e1f9-jpeg-8c.tar.gz +3dd55b952826d2b32f51308f2f91aa89-gettext-0.18.1.1.tar.gz +9f6e85e1e38490c3956f4415bcd33e6e-glib-2.28.1.tar.gz +a7d6c5f2fe2d481149ed3ba807b5c043-gdk-pixbuf-2.23.0.tar.gz 3a84ac2da37cae5bf7ce616228c6fbde-libgsf-1.14.19.tar.gz 22ad1c8d3fda7e73b0798035f3dd96bc-pango-1.28.3.tar.gz -a7d6c5f2fe2d481149ed3ba807b5c043-gdk-pixbuf-2.23.0.tar.gz -9f6e85e1e38490c3956f4415bcd33e6e-glib-2.28.1.tar.gz -3dd55b952826d2b32f51308f2f91aa89-gettext-0.18.1.1.tar.gz 0611e099e807210cf738dcb41425d104-libcroco-0.6.2.tar.gz +d7a242ca43e33e1b63d3073f9d46a6a8-librsvg-2.32.1.tar.gz +220035f111ea045a51e290906025e8b5-libpng-1.5.1.tar.gz +a2c10c04f396a9ce72894beb18b4e1f9-jpeg-8c.tar.gz c735eab2d659a96e5a594c9e8541ad63-zlib-1.2.5.tar.gz + -- cgit v1.2.3 From 182318fb5ebf4d442c54235a08e9013ef3c8c451 Mon Sep 17 00:00:00 2001 From: ka Date: Mon, 28 Mar 2011 04:04:23 +0200 Subject: rsvglibs: minor adjustments wrt. new/updated external libs --- cairo/prj/d.lst | 3 + gdk-pixbuf/makefile.mk | 2 +- pango/makefile.mk | 1 + pango/pango-1.28.3.patch | 542 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 547 insertions(+), 1 deletion(-) mode change 100755 => 100644 gdk-pixbuf/makefile.mk mode change 100755 => 100644 pango/makefile.mk diff --git a/cairo/prj/d.lst b/cairo/prj/d.lst index b6a0c263f4a2..6cd8613cf677 100644 --- a/cairo/prj/d.lst +++ b/cairo/prj/d.lst @@ -1,5 +1,8 @@ mkdir: %_DEST%\inc%_EXT%\cairo +mkdir: %_DEST%\inc%_EXT%\external +mkdir: %_DEST%\inc%_EXT%\external\cairo ..\%__SRC%\inc\cairo*.h %_DEST%\inc%_EXT%\cairo\cairo*.h +..\%__SRC%\inc\cairo*.h %_DEST%\inc%_EXT%\external\cairo\cairo*.h ..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%\lib*.so ..\%__SRC%\lib\lib*.so.* %_DEST%\lib%_EXT%\lib*.so.* diff --git a/gdk-pixbuf/makefile.mk b/gdk-pixbuf/makefile.mk old mode 100755 new mode 100644 index 2e4f3d607104..663f0f252a47 --- a/gdk-pixbuf/makefile.mk +++ b/gdk-pixbuf/makefile.mk @@ -58,7 +58,7 @@ CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) \ --prefix=$(SRC_ROOT)$/$(PRJNAME)$/$(MISC) \ CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS) -I$(SOLARINCDIR)$/external -I$(SOLARINCDIR)$/external$/glib-2.0 -I$(SOLARINCDIR)$/external$/libpng -I$(SOLARINCDIR)$/external$/libjpeg" \ LDFLAGS="-L$(SOLARLIBDIR) -lgobject-2.0 -lgio-2.0 -lgthread-2.0 -lgmodule-2.0 -lglib-2.0 -lintl" \ - --disable-glibtest --without-libtiff + --disable-glibtest --without-libtiff --without-libjpeg BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) $(GNUMAKE) BUILD_DIR=$(CONFIGURE_DIR) diff --git a/pango/makefile.mk b/pango/makefile.mk old mode 100755 new mode 100644 index 2b5acbea1719..e653d25d61ec --- a/pango/makefile.mk +++ b/pango/makefile.mk @@ -52,6 +52,7 @@ TARFILE_MD5=22ad1c8d3fda7e73b0798035f3dd96bc .IF "$(OS)" == "MACOSX" PATCH_FILES=pango-1.28.3.patch +ADDITIONAL_FILES=pango/glib-mkenums CONFIGURE_LDFLAGS="-L$(SOLARLIBDIR)" CONFIGURE_DIR= diff --git a/pango/pango-1.28.3.patch b/pango/pango-1.28.3.patch index 7da953f28311..351f5267b77b 100644 --- a/pango/pango-1.28.3.patch +++ b/pango/pango-1.28.3.patch @@ -35,3 +35,545 @@ # Add in gthread-2.0 to CFLAGS but not to LIBS so we get any +--- misc/pango-1.28.3/pango/glib-mkenums 2011-03-28 02:33:03.000000000 +0200 ++++ misc/build/pango-1.28.3/pango/glib-mkenums 2011-03-28 02:25:57.000000000 +0200 +@@ -1 +1,538 @@ +-dummy ++#! /usr/bin/env perl ++ ++use warnings; ++use File::Basename; ++use Safe; ++ ++# glib-mkenums.pl ++# Information about the current enumeration ++my $flags; # Is enumeration a bitmask? ++my $option_underscore_name; # Overriden underscore variant of the enum name ++ # for example to fix the cases we don't get the ++ # mixed-case -> underscorized transform right. ++my $option_lowercase_name; # DEPRECATED. A lower case name to use as part ++ # of the *_get_type() function, instead of the ++ # one that we guess. For instance, when an enum ++ # uses abnormal capitalization and we can not ++ # guess where to put the underscores. ++my $seenbitshift; # Have we seen bitshift operators? ++my $enum_prefix; # Prefix for this enumeration ++my $enumname; # Name for this enumeration ++my $enumshort; # $enumname without prefix ++my $enumname_prefix; # prefix of $enumname ++my $enumindex = 0; # Global enum counter ++my $firstenum = 1; # Is this the first enumeration per file? ++my @entries; # [ $name, $val ] for each entry ++my $sandbox = Safe->new; # sandbox for safe evaluation of expressions ++ ++sub parse_trigraph { ++ my $opts = shift; ++ my @opts; ++ ++ for $opt (split /\s*,\s*/, $opts) { ++ $opt =~ s/^\s*//; ++ $opt =~ s/\s*$//; ++ my ($key,$val) = $opt =~ /(\w+)(?:=(.+))?/; ++ defined $val or $val = 1; ++ push @opts, $key, $val; ++ } ++ @opts; ++} ++sub parse_entries { ++ my $file = shift; ++ my $file_name = shift; ++ my $looking_for_name = 0; ++ ++ while (<$file>) { ++ # read lines until we have no open comments ++ while (m@/\*([^*]|\*(?!/))*$@) { ++ my $new; ++ defined ($new = <$file>) || die "Unmatched comment in $ARGV"; ++ $_ .= $new; ++ } ++ # strip comments w/o options ++ s@/\*(?!<) ++ ([^*]+|\*(?!/))* ++ \*/@@gx; ++ ++ # strip newlines ++ s@\n@ @; ++ ++ # skip empty lines ++ next if m@^\s*$@; ++ ++ if ($looking_for_name) { ++ if (/^\s*(\w+)/) { ++ $enumname = $1; ++ return 1; ++ } ++ } ++ ++ # Handle include files ++ if (/^\#include\s*<([^>]*)>/ ) { ++ my $file= "../$1"; ++ open NEWFILE, $file or die "Cannot open include file $file: $!\n"; ++ ++ if (parse_entries (\*NEWFILE, $NEWFILE)) { ++ return 1; ++ } else { ++ next; ++ } ++ } ++ ++ if (/^\s*\}\s*(\w+)/) { ++ $enumname = $1; ++ $enumindex++; ++ return 1; ++ } ++ ++ if (/^\s*\}/) { ++ $enumindex++; ++ $looking_for_name = 1; ++ next; ++ } ++ ++ if (m@^\s* ++ (\w+)\s* # name ++ (?:=( # value ++ \s*\w+\s*\(.*\)\s* # macro with multiple args ++ | # OR ++ (?:[^,/]|/(?!\*))* # anything but a comma or comment ++ ))?,?\s* ++ (?:/\*< # options ++ (([^*]|\*(?!/))*) ++ >\s*\*/)?,? ++ \s*$ ++ @x) { ++ my ($name, $value, $options) = ($1,$2,$3); ++ ++ if (!defined $flags && defined $value && $value =~ /< Output file header\n"; ++ print " --fprod Per input file production\n"; ++ print " --ftail Output file trailer\n"; ++ print " --eprod Per enum text (produced prior to value itarations)\n"; ++ print " --vhead Value header, produced before iterating over enum values\n"; ++ print " --vprod Value text, produced for each enum value\n"; ++ print " --vtail Value tail, produced after iterating over enum values\n"; ++ print " --comments Comment structure\n"; ++ print " --template file Template file\n"; ++ print " -v, --version Print version informations\n\n"; ++ print "Production text substitutions:\n"; ++ print " \@EnumName\@ PrefixTheXEnum\n"; ++ print " \@enum_name\@ prefix_the_xenum\n"; ++ print " \@ENUMNAME\@ PREFIX_THE_XENUM\n"; ++ print " \@ENUMSHORT\@ THE_XENUM\n"; ++ print " \@ENUMPREFIX\@ PREFIX\n"; ++ print " \@VALUENAME\@ PREFIX_THE_XVALUE\n"; ++ print " \@valuenick\@ the-xvalue\n"; ++ print " \@valuenum\@ the integer value (limited support, Since: 2.26)\n"; ++ print " \@type\@ either enum or flags\n"; ++ print " \@Type\@ either Enum or Flags\n"; ++ print " \@TYPE\@ either ENUM or FLAGS\n"; ++ print " \@filename\@ name of current input file\n"; ++ print " \@basename\@ base name of the current input file (Since: 2.22)\n"; ++ exit 0; ++} ++ ++# production variables: ++my $fhead = ""; # output file header ++my $fprod = ""; # per input file production ++my $ftail = ""; # output file trailer ++my $eprod = ""; # per enum text (produced prior to value itarations) ++my $vhead = ""; # value header, produced before iterating over enum values ++my $vprod = ""; # value text, produced for each enum value ++my $vtail = ""; # value tail, produced after iterating over enum values ++my $comment_tmpl = ""; # comment template ++ ++sub read_template_file { ++ my ($file) = @_; ++ my %tmpl = ('file-header', $fhead, ++ 'file-production', $fprod, ++ 'file-tail', $ftail, ++ 'enumeration-production', $eprod, ++ 'value-header', $vhead, ++ 'value-production', $vprod, ++ 'value-tail', $vtail, ++ 'comment', $comment_tmpl); ++ my $in = 'junk'; ++ open (FILE, $file) || die "Can't open $file: $!\n"; ++ while () { ++ if (/^\/\*\*\*\s+(BEGIN|END)\s+([\w-]+)\s+\*\*\*\//) { ++ if (($in eq 'junk') && ($1 eq 'BEGIN') && (exists($tmpl{$2}))) { ++ $in = $2; ++ next; ++ } ++ elsif (($in eq $2) && ($1 eq 'END') && (exists($tmpl{$2}))) { ++ $in = 'junk'; ++ next; ++ } else { ++ die "Malformed template file $file\n"; ++ } ++ } ++ if (!($in eq 'junk')) { ++ $tmpl{$in} .= $_; ++ } ++ } ++ close (FILE); ++ if (!($in eq 'junk')) { ++ die "Malformed template file $file\n"; ++ } ++ $fhead = $tmpl{'file-header'}; ++ $fprod = $tmpl{'file-production'}; ++ $ftail = $tmpl{'file-tail'}; ++ $eprod = $tmpl{'enumeration-production'}; ++ $vhead = $tmpl{'value-header'}; ++ $vprod = $tmpl{'value-production'}; ++ $vtail = $tmpl{'value-tail'}; ++ $comment_tmpl = $tmpl{'comment'}; ++ ++ # default to C-style comments ++ $comment_tmpl = "/* \@comment\@ */" if $comment_tmpl eq ""; ++} ++ ++if (!defined $ARGV[0]) { ++ usage; ++} ++while ($_=$ARGV[0],/^-/) { ++ shift; ++ last if /^--$/; ++ if (/^--template$/) { read_template_file (shift); } ++ elsif (/^--fhead$/) { $fhead = $fhead . shift } ++ elsif (/^--fprod$/) { $fprod = $fprod . shift } ++ elsif (/^--ftail$/) { $ftail = $ftail . shift } ++ elsif (/^--eprod$/) { $eprod = $eprod . shift } ++ elsif (/^--vhead$/) { $vhead = $vhead . shift } ++ elsif (/^--vprod$/) { $vprod = $vprod . shift } ++ elsif (/^--vtail$/) { $vtail = $vtail . shift } ++ elsif (/^--comments$/) { $comment_tmpl = shift } ++ elsif (/^--help$/ || /^-h$/ || /^-\?$/) { usage; } ++ elsif (/^--version$/ || /^-v$/) { version; } ++ else { usage; } ++ last if not defined($ARGV[0]); ++} ++ ++# put auto-generation comment ++{ ++ my $comment = $comment_tmpl; ++ $comment =~ s/\@comment\@/Generated data (by glib-mkenums)/; ++ print "\n" . $comment . "\n\n"; ++} ++ ++if (length($fhead)) { ++ my $prod = $fhead; ++ my $base = basename ($ARGV[0]); ++ ++ $prod =~ s/\@filename\@/$ARGV[0]/g; ++ $prod =~ s/\@basename\@/$base/g; ++ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; ++ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g; ++ chomp ($prod); ++ ++ print "$prod\n"; ++} ++ ++while (<>) { ++ if (eof) { ++ close (ARGV); # reset line numbering ++ $firstenum = 1; # Flag to print filename at next enum ++ } ++ ++ # read lines until we have no open comments ++ while (m@/\*([^*]|\*(?!/))*$@) { ++ my $new; ++ defined ($new = <>) || die "Unmatched comment in $ARGV"; ++ $_ .= $new; ++ } ++ # strip comments w/o options ++ s@/\*(?!<) ++ ([^*]+|\*(?!/))* ++ \*/@@gx; ++ ++ if (m@^\s*typedef\s+enum\s* ++ ({)?\s* ++ (?:/\*< ++ (([^*]|\*(?!/))*) ++ >\s*\*/)? ++ \s*({)? ++ @x) { ++ if (defined $2) { ++ my %options = parse_trigraph ($2); ++ next if defined $options{skip}; ++ $enum_prefix = $options{prefix}; ++ $flags = $options{flags}; ++ $option_lowercase_name = $options{lowercase_name}; ++ $option_underscore_name = $options{underscore_name}; ++ } else { ++ $enum_prefix = undef; ++ $flags = undef; ++ $option_lowercase_name = undef; ++ $option_underscore_name = undef; ++ } ++ if (defined $option_lowercase_name) { ++ if (defined $option_underscore_name) { ++ print STDERR "$0: $ARGV:$.: lowercase_name overriden with underscore_name\n"; ++ $option_lowercase_name = undef; ++ } else { ++ print STDERR "$0: $ARGV:$.: lowercase_name is deprecated, use underscore_name\n"; ++ } ++ } ++ # Didn't have trailing '{' look on next lines ++ if (!defined $1 && !defined $4) { ++ while (<>) { ++ if (s/^\s*\{//) { ++ last; ++ } ++ } ++ } ++ ++ $seenbitshift = 0; ++ @entries = (); ++ ++ # Now parse the entries ++ parse_entries (\*ARGV, $ARGV); ++ ++ # figure out if this was a flags or enums enumeration ++ if (!defined $flags) { ++ $flags = $seenbitshift; ++ } ++ ++ # Autogenerate a prefix ++ if (!defined $enum_prefix) { ++ for (@entries) { ++ my $nick = $_->[2]; ++ if (!defined $nick) { ++ my $name = $_->[0]; ++ if (defined $enum_prefix) { ++ my $tmp = ~ ($name ^ $enum_prefix); ++ ($tmp) = $tmp =~ /(^\xff*)/; ++ $enum_prefix = $enum_prefix & $tmp; ++ } else { ++ $enum_prefix = $name; ++ } ++ } ++ } ++ if (!defined $enum_prefix) { ++ $enum_prefix = ""; ++ } else { ++ # Trim so that it ends in an underscore ++ $enum_prefix =~ s/_[^_]*$/_/; ++ } ++ } else { ++ # canonicalize user defined prefixes ++ $enum_prefix = uc($enum_prefix); ++ $enum_prefix =~ s/-/_/g; ++ $enum_prefix =~ s/(.*)([^_])$/$1$2_/; ++ } ++ ++ for $entry (@entries) { ++ my ($name,$num,$nick) = @{$entry}; ++ if (!defined $nick) { ++ ($nick = $name) =~ s/^$enum_prefix//; ++ $nick =~ tr/_/-/; ++ $nick = lc($nick); ++ @{$entry} = ($name, $num, $nick); ++ } ++ } ++ ++ ++ # Spit out the output ++ if (defined $option_underscore_name) { ++ $enumlong = uc $option_underscore_name; ++ $enumsym = lc $option_underscore_name; ++ $enumshort = $enumlong; ++ $enumshort =~ s/^[A-Z][A-Z0-9]*_//; ++ ++ $enumname_prefix = $enumlong; ++ $enumname_prefix =~ s/$enumshort$//; ++ } else { ++ # enumname is e.g. GMatchType ++ $enspace = $enumname; ++ $enspace =~ s/^([A-Z][a-z]*).*$/$1/; ++ ++ $enumshort = $enumname; ++ $enumshort =~ s/^[A-Z][a-z]*//; ++ $enumshort =~ s/([^A-Z])([A-Z])/$1_$2/g; ++ $enumshort =~ s/([A-Z][A-Z])([A-Z][0-9a-z])/$1_$2/g; ++ $enumshort = uc($enumshort); ++ ++ $enumname_prefix = $enumname; ++ $enumname_prefix =~ s/^([A-Z][a-z]*).*$/$1/; ++ $enumname_prefix = uc($enumname_prefix); ++ ++ $enumlong = uc($enspace) . "_" . $enumshort; ++ $enumsym = lc($enspace) . "_" . lc($enumshort); ++ ++ if (defined($option_lowercase_name)) { ++ $enumsym = $option_lowercase_name; ++ } ++ } ++ ++ if ($firstenum) { ++ $firstenum = 0; ++ ++ if (length($fprod)) { ++ my $prod = $fprod; ++ my $base = basename ($ARGV); ++ ++ $prod =~ s/\@filename\@/$ARGV/g; ++ $prod =~ s/\@basename\@/$base/g; ++ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; ++ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g; ++ chomp ($prod); ++ ++ print "$prod\n"; ++ } ++ } ++ ++ if (length($eprod)) { ++ my $prod = $eprod; ++ ++ $prod =~ s/\@enum_name\@/$enumsym/g; ++ $prod =~ s/\@EnumName\@/$enumname/g; ++ $prod =~ s/\@ENUMSHORT\@/$enumshort/g; ++ $prod =~ s/\@ENUMNAME\@/$enumlong/g; ++ $prod =~ s/\@ENUMPREFIX\@/$enumname_prefix/g; ++ if ($flags) { $prod =~ s/\@type\@/flags/g; } else { $prod =~ s/\@type\@/enum/g; } ++ if ($flags) { $prod =~ s/\@Type\@/Flags/g; } else { $prod =~ s/\@Type\@/Enum/g; } ++ if ($flags) { $prod =~ s/\@TYPE\@/FLAGS/g; } else { $prod =~ s/\@TYPE\@/ENUM/g; } ++ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; ++ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g; ++ chomp ($prod); ++ ++ print "$prod\n"; ++ } ++ ++ if (length($vhead)) { ++ my $prod = $vhead; ++ ++ $prod =~ s/\@enum_name\@/$enumsym/g; ++ $prod =~ s/\@EnumName\@/$enumname/g; ++ $prod =~ s/\@ENUMSHORT\@/$enumshort/g; ++ $prod =~ s/\@ENUMNAME\@/$enumlong/g; ++ $prod =~ s/\@ENUMPREFIX\@/$enumname_prefix/g; ++ if ($flags) { $prod =~ s/\@type\@/flags/g; } else { $prod =~ s/\@type\@/enum/g; } ++ if ($flags) { $prod =~ s/\@Type\@/Flags/g; } else { $prod =~ s/\@Type\@/Enum/g; } ++ if ($flags) { $prod =~ s/\@TYPE\@/FLAGS/g; } else { $prod =~ s/\@TYPE\@/ENUM/g; } ++ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; ++ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g; ++ chomp ($prod); ++ ++ print "$prod\n"; ++ } ++ ++ if (length($vprod)) { ++ my $prod = $vprod; ++ my $next_num = 0; ++ ++ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; ++ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g; ++ for (@entries) { ++ my ($name,$num,$nick) = @{$_}; ++ my $tmp_prod = $prod; ++ ++ if ($prod =~ /\@valuenum\@/) { ++ # only attempt to eval the value if it is requested ++ # this prevents us from throwing errors otherwise ++ if (defined $num) { ++ # use sandboxed perl evaluation as a reasonable ++ # approximation to C constant folding ++ $num = $sandbox->reval ($num); ++ ++ # make sure it parsed to an integer ++ if (!defined $num or $num !~ /^-?\d+$/) { ++ die "Unable to parse enum value '$num'"; ++ } ++ } else { ++ $num = $next_num; ++ } ++ ++ $tmp_prod =~ s/\@valuenum\@/$num/g; ++ $next_num = $num + 1; ++ } ++ ++ $tmp_prod =~ s/\@VALUENAME\@/$name/g; ++ $tmp_prod =~ s/\@valuenick\@/$nick/g; ++ if ($flags) { $tmp_prod =~ s/\@type\@/flags/g; } else { $tmp_prod =~ s/\@type\@/enum/g; } ++ if ($flags) { $tmp_prod =~ s/\@Type\@/Flags/g; } else { $tmp_prod =~ s/\@Type\@/Enum/g; } ++ if ($flags) { $tmp_prod =~ s/\@TYPE\@/FLAGS/g; } else { $tmp_prod =~ s/\@TYPE\@/ENUM/g; } ++ chomp ($tmp_prod); ++ ++ print "$tmp_prod\n"; ++ } ++ } ++ ++ if (length($vtail)) { ++ my $prod = $vtail; ++ ++ $prod =~ s/\@enum_name\@/$enumsym/g; ++ $prod =~ s/\@EnumName\@/$enumname/g; ++ $prod =~ s/\@ENUMSHORT\@/$enumshort/g; ++ $prod =~ s/\@ENUMNAME\@/$enumlong/g; ++ $prod =~ s/\@ENUMPREFIX\@/$enumname_prefix/g; ++ if ($flags) { $prod =~ s/\@type\@/flags/g; } else { $prod =~ s/\@type\@/enum/g; } ++ if ($flags) { $prod =~ s/\@Type\@/Flags/g; } else { $prod =~ s/\@Type\@/Enum/g; } ++ if ($flags) { $prod =~ s/\@TYPE\@/FLAGS/g; } else { $prod =~ s/\@TYPE\@/ENUM/g; } ++ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; ++ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g; ++ chomp ($prod); ++ ++ print "$prod\n"; ++ } ++ } ++} ++ ++if (length($ftail)) { ++ my $prod = $ftail; ++ my $base = basename ($ARGV); ++ ++ $prod =~ s/\@filename\@/$ARGV/g; ++ $prod =~ s/\@basename\@/$base/g; ++ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; ++ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g; ++ chomp ($prod); ++ ++ print "$prod\n"; ++} ++ ++# put auto-generation comment ++{ ++ my $comment = $comment_tmpl; ++ $comment =~ s/\@comment\@/Generated data ends here/; ++ print "\n" . $comment . "\n\n"; ++} -- cgit v1.2.3 From ba03ade00164cadaf653b95c909d28f290c419e1 Mon Sep 17 00:00:00 2001 From: ka Date: Mon, 28 Mar 2011 04:04:23 +0200 Subject: rsvglibs: minor adjustments wrt. new/updated external libs --- svtools/source/filter.vcl/jpeg/jpeg.cxx | 4 ++-- svtools/source/filter.vcl/jpeg/jpegc.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/svtools/source/filter.vcl/jpeg/jpeg.cxx b/svtools/source/filter.vcl/jpeg/jpeg.cxx index dff6ec8ff51f..da1edf8449e4 100644 --- a/svtools/source/filter.vcl/jpeg/jpeg.cxx +++ b/svtools/source/filter.vcl/jpeg/jpeg.cxx @@ -34,8 +34,8 @@ extern "C" { #include "stdio.h" #include "jpeg.h" - #include "jpeglib.h" - #include "jerror.h" + #include "jpeg/jpeglib.h" + #include "jpeg/jerror.h" } #define _JPEGPRIVATE diff --git a/svtools/source/filter.vcl/jpeg/jpegc.c b/svtools/source/filter.vcl/jpeg/jpegc.c index 8d3a82a86ef3..b51d37a4a163 100644 --- a/svtools/source/filter.vcl/jpeg/jpegc.c +++ b/svtools/source/filter.vcl/jpeg/jpegc.c @@ -28,8 +28,8 @@ #include #include #include "setjmp.h" -#include "jpeglib.h" -#include "jerror.h" +#include "jpeg/jpeglib.h" +#include "jpeg/jerror.h" #include "jpeg.h" #include "rtl/alloc.h" #include "osl/diagnose.h" -- cgit v1.2.3 From a625fc56cc6cdca3d220155b37e9ce0dde5b84c3 Mon Sep 17 00:00:00 2001 From: ka Date: Mon, 28 Mar 2011 04:04:23 +0200 Subject: rsvglibs: minor adjustments wrt. new/updated external libs --- solenv/config/sdev300.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini index 08ab5e0c6d5d..072067b2b971 100644 --- a/solenv/config/sdev300.ini +++ b/solenv/config/sdev300.ini @@ -2891,6 +2891,7 @@ wntmsci12 common2 { ENABLE_GRAPHITE TRUE + BUILD_PIXMAN TRUE BUILD_TOOLS %SOLARROOT%$/btw$/%BTOOLDIR% CALL_CDECL TRUE CDPATHx %CDPATH%$:..$:..$/..$:..$/..$/..$:..$/source$:..$/..$/source$:$cp(%SOLAR_SOURCE_ROOT%$/%WORK_STAMP%$/ooo%UPDMINOREXT%) @@ -2903,6 +2904,7 @@ wntmsci12 CPUNAME INTEL CVER M1500 DYNAMIC_CRT TRUE + ENABLE_CAIRO TRUE ENV_TOOLS %SOLARROOT%$/etw$/%WORK_STAMP% GUI WNT GUIBASE WIN -- cgit v1.2.3 From 00821810ffe759d3207b377e987e20301fdd9919 Mon Sep 17 00:00:00 2001 From: ka Date: Mon, 28 Mar 2011 04:04:23 +0200 Subject: rsvglibs: minor adjustments wrt. new/updated external libs --- sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx index 0c3497abcbad..411989ecce9c 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx @@ -33,6 +33,7 @@ #ifdef SYSTEM_ZLIB #include "zlib.h" #else +#define ZLIB_INTERNAL 1 #include #endif -- cgit v1.2.3 From 2503be5aca3e99a7fbce4e4314d079f93e00d7db Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 28 Mar 2011 13:44:04 +0200 Subject: rsvglibs: deliver needed executable --- glib/makefile.mk | 3 +++ glib/prj/d.lst | 2 ++ 2 files changed, 5 insertions(+) diff --git a/glib/makefile.mk b/glib/makefile.mk index 34d12a92878a..d1ce6a88568b 100755 --- a/glib/makefile.mk +++ b/glib/makefile.mk @@ -72,6 +72,9 @@ OUT2LIB+=gmodule/.libs/libgmodule-2.0.0.dylib OUT2LIB+=gobject/.libs/libgobject-2.0.0.dylib OUT2LIB+=gthread/.libs/libgthread-2.0.0.dylib +OUT2BIN+=gobject$/glib-mkenums +OUT2BIN+=gobject$/.libs$/glib-genmarshal + OUT2INC+=glib/glib.h OUT2INC+=glib/glib-object.h OUT2INC+=glib/glibconfig.h diff --git a/glib/prj/d.lst b/glib/prj/d.lst index f3e91032d582..eb6c2620a08a 100644 --- a/glib/prj/d.lst +++ b/glib/prj/d.lst @@ -10,6 +10,8 @@ symlink: %_DEST%\lib%_EXT%\libglib-2.0.0.dylib %_DEST%\lib%_EXT%\libglib-2.0.dyl ..\%__SRC%\lib\libgobject-2.0.0.dylib %_DEST%\lib%_EXT%\libgobject-2.0.0.dylib symlink: %_DEST%\lib%_EXT%\libgobject-2.0.0.dylib %_DEST%\lib%_EXT%\libgobject-2.0.dylib ..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT% +..\%__SRC%\bin\glib-mkenums %_DEST%\bin%_EXT%\glib-mkenums +..\%__SRC%\bin\glib-genmarshal %_DEST%\bin%_EXT%\glib-genmarshal ..\%__SRC%\lib\gio-2.0.lib %_DEST%\lib%_EXT%\gio-2.0.lib ..\%__SRC%\lib\gmodule-2.0.lib %_DEST%\lib%_EXT%\gmodule-2.0.lib ..\%__SRC%\lib\gthread-2.0.lib %_DEST%\lib%_EXT%\gthread-2.0.lib -- cgit v1.2.3 From 6423decfb669412c820e019f244f6dc2f85b598e Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 28 Mar 2011 16:40:51 +0200 Subject: vcl2gnumake: RandR linker switches --- vcl/Library_vclplug_gen.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk index 4d2ee7e91238..9d0dea8b580f 100755 --- a/vcl/Library_vclplug_gen.mk +++ b/vcl/Library_vclplug_gen.mk @@ -129,6 +129,10 @@ $(eval $(call gb_Library_set_cxxflags,vclplug_gen,\ $$(CXXFLAGS) \ $$(XRANDR_CFLAGS) \ )) +$(eval $(call gb_Library_set_ldflags,vclplug_gen,\ + $$(LDFLAGS) \ + $(XRANDR_LIBS) \ +)) else $(eval $(call gb_Library_set_defs,vclplug_gen,\ $$(DEFS) \ -- cgit v1.2.3 From c7ccd0ba40037b1e517d7b133c74617803e751c4 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 28 Mar 2011 18:20:03 +0200 Subject: masterfix DEV300: fix for make clean --- solenv/gbuild/platform/macosx.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 solenv/gbuild/platform/macosx.mk diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk old mode 100755 new mode 100644 index b54cb8fb1b9d..203ace96b15c --- a/solenv/gbuild/platform/macosx.mk +++ b/solenv/gbuild/platform/macosx.mk @@ -29,7 +29,7 @@ GUI := UNX COM := GCC # Darwin mktemp -t expects a prefix, not a pattern -gb_MKTEMP := /usr/bin/mktemp -t gbuild. +gb_MKTEMP ?= /usr/bin/mktemp -t gbuild. gb_CC := cc gb_CXX := g++ -- cgit v1.2.3 From c408f46f8df0098e1b6c6a53228cb6345254b198 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 28 Mar 2011 18:20:48 +0200 Subject: masterfix DEV300: fix for multi lang builds --- solenv/gbuild/AllLangResTarget.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solenv/gbuild/AllLangResTarget.mk b/solenv/gbuild/AllLangResTarget.mk index 1b7acc947bfc..ccd574ba7c93 100644 --- a/solenv/gbuild/AllLangResTarget.mk +++ b/solenv/gbuild/AllLangResTarget.mk @@ -72,7 +72,7 @@ $(call gb_Helper_abbreviate_dirs_native,\ -I$(dir $(3)) \ $(DEFS) \ -fp=$(1) \ - $(if $<,$<,$(MERGEDFILE))" > $${RESPONSEFILE} && \ + $(if $(MERGEDFILE),$(MERGEDFILE),$<)" > $${RESPONSEFILE} && \ $(gb_SrsPartTarget_RSCCOMMAND) -presponse @$${RESPONSEFILE} && \ rm -rf $${RESPONSEFILE}) -- cgit v1.2.3 From 9d5e820097199b5ab5ebd17460a5bb068471e52e Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 28 Mar 2011 18:35:35 +0200 Subject: masterfix DEV300: fix for string corruption --- l10ntools/source/directory.cxx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/l10ntools/source/directory.cxx b/l10ntools/source/directory.cxx index f7330a9b5ed9..c354d54ad4ea 100644 --- a/l10ntools/source/directory.cxx +++ b/l10ntools/source/directory.cxx @@ -187,21 +187,18 @@ void Directory::readDirectory( const rtl::OUString& sFullpath ) struct stat statbuf2; struct dirent *dirp; DIR *dir; - //int ret; - //char *ptr; if( sFullpath.getLength() < 1 ) return; rtl::OString sFullpathext = rtl::OUStringToOString( sFullpath , RTL_TEXTENCODING_UTF8 , sFullpath.getLength() ).getStr(); - //printf("%s\n",sFullpathext.getStr()); - const char* path = sFullpathext.getStr(); // stat - if( stat( path , &statbuf ) < 0 ){ printf("warning: Can not stat %s" , path ); return; }// error } + if( stat( sFullpathext.getStr() , &statbuf ) < 0 ){ printf("warning: Can not stat %s" , sFullpathext.getStr() ); return; }// error } if( S_ISDIR(statbuf.st_mode ) == 0 ) { return; }// error } return; // not dir - if( (dir = opendir( path ) ) == NULL ) {printf("readerror 2 in %s \n",path); return; } // error } return; // error + if( (dir = opendir( sFullpathext.getStr() ) ) == NULL ) {printf("readerror 2 in %s \n",sFullpathext.getStr()); return; } // error } return; // error + dirholder aHolder(dir); sFullpathext += rtl::OString( "/" ); @@ -209,7 +206,7 @@ void Directory::readDirectory( const rtl::OUString& sFullpath ) const rtl::OString sDot ( "." ) ; const rtl::OString sDDot( ".." ); - if ( chdir( path ) == -1 ) { printf("chdir error in %s \n",path); return; } // error + if ( chdir( sFullpathext.getStr() ) == -1 ) { printf("chdir error in %s \n",sFullpathext.getStr()); return; } // error while( ( dirp = readdir( dir ) ) != NULL ) { -- cgit v1.2.3 From e9fc30b6901b3af4b406bd3820125d6c607f9784 Mon Sep 17 00:00:00 2001 From: ka Date: Mon, 28 Mar 2011 22:26:34 +0200 Subject: ka102: adjusted cairo dll name --- vcl/source/components/rasterizer_rsvg.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcl/source/components/rasterizer_rsvg.cxx b/vcl/source/components/rasterizer_rsvg.cxx index 28ae6056fee2..5547b179d227 100644 --- a/vcl/source/components/rasterizer_rsvg.cxx +++ b/vcl/source/components/rasterizer_rsvg.cxx @@ -49,7 +49,7 @@ #define VCL_RSVG_LIBRSVG_LIBNAME "librsvg-2.so" #elif defined WNT #define VCL_RSVG_GOBJECT_LIBNAME "libgobject-2.0-0.dll" - #define VCL_RSVG_CAIRO_LIBNAME "libcairo-2.dll" + #define VCL_RSVG_CAIRO_LIBNAME "cairo.dll" #define VCL_RSVG_LIBRSVG_LIBNAME "librsvg-2-2.dll" #else #define VCL_RSVG_GOBJECT_LIBNAME "nogobjectlib" -- cgit v1.2.3 From febd402ce3877e88a0b67b04323ff8bd633d2075 Mon Sep 17 00:00:00 2001 From: ka Date: Mon, 28 Mar 2011 23:42:19 +0200 Subject: rsvglibs: added external librsvg library --- librsvg/librsvg-2.32.1-win32.patch | 526 +++++++++++++++++++++++++++++++++++++ librsvg/makefile.mk | 22 +- librsvg/prj/d.lst | 2 + 3 files changed, 544 insertions(+), 6 deletions(-) create mode 100644 librsvg/librsvg-2.32.1-win32.patch mode change 100644 => 100755 librsvg/makefile.mk mode change 100644 => 100755 librsvg/prj/d.lst diff --git a/librsvg/librsvg-2.32.1-win32.patch b/librsvg/librsvg-2.32.1-win32.patch new file mode 100644 index 000000000000..0bdf11d57184 --- /dev/null +++ b/librsvg/librsvg-2.32.1-win32.patch @@ -0,0 +1,526 @@ +--- misc/librsvg-2.32.1/librsvg-features.h 2010-11-13 11:52:49.000000000 +0100 ++++ misc/build/librsvg-2.32.1/librsvg-features.h 2011-03-28 16:29:01.357827800 +0200 +@@ -11,7 +11,7 @@ + (LIBRSVG_MAJOR_VERSION == (major) && LIBRSVG_MINOR_VERSION > (minor)) || \ + (LIBRSVG_MAJOR_VERSION == (major) && LIBRSVG_MINOR_VERSION == (minor) && LIBRSVG_MICRO_VERSION >= (micro))) + +-#define LIBRSVG_HAVE_SVGZ (1) ++#define LIBRSVG_HAVE_SVGZ (0) + #define LIBRSVG_HAVE_CSS (1) + + #define LIBRSVG_CHECK_FEATURE(FEATURE) (defined(LIBRSVG_HAVE_##FEATURE) && LIBRSVG_HAVE_##FEATURE) +--- misc/librsvg-2.32.1/rsvg-image.c 2010-09-27 19:18:35.000000000 +0200 ++++ misc/build/librsvg-2.32.1/rsvg-image.c 2011-03-28 20:14:53.630005800 +0200 +@@ -22,8 +22,8 @@ + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +- Authors: Raph Levien , +- Dom Lachowicz , ++ Authors: Raph Levien , ++ Dom Lachowicz , + Caleb Moore + */ + +@@ -34,15 +34,167 @@ + #include + #include + #include "rsvg-css.h" ++#ifdef HAVE_GIO + #include ++#endif ++ ++static const char s_UTF8_B64Alphabet[64] = { ++ 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, ++ 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, /* A-Z */ ++ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, ++ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, /* a-z */ ++ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, /* 0-9 */ ++ 0x2b, /* + */ ++ 0x2f /* / */ ++}; ++static const char utf8_b64_pad = 0x3d; ++ ++static gboolean ++b64_decode_char (char c, int *b64) ++{ ++ if ((c >= 0x41) && (c <= 0x5a)) { ++ *b64 = c - 0x41; ++ return TRUE; ++ } ++ if ((c >= 0x61) && (c <= 0x7a)) { ++ *b64 = c - (0x61 - 26); ++ return TRUE; ++ } ++ if ((c >= 0x30) && (c <= 0x39)) { ++ *b64 = c + (52 - 0x30); ++ return TRUE; ++ } ++ if (c == 0x2b) { ++ *b64 = 62; ++ return TRUE; ++ } ++ if (c == 0x2f) { ++ *b64 = 63; ++ return TRUE; ++ } ++ return FALSE; ++} ++ ++static gboolean ++utf8_base64_decode (guchar ** binptr, size_t * binlen, const char *b64ptr, size_t b64len) ++{ ++ gboolean decoded = TRUE; ++ gboolean padding = FALSE; ++ ++ int i = 0; ++ glong ucs4_len, j; ++ ++ unsigned char byte1 = 0; ++ unsigned char byte2; ++ ++ gunichar ucs4, *ucs4_str; ++ ++ if (b64len == 0) ++ return TRUE; ++ ++ if ((binptr == 0) || (b64ptr == 0)) ++ return FALSE; ++ ++ ucs4_str = g_utf8_to_ucs4_fast (b64ptr, b64len, &ucs4_len); ++ ++ for (j = 0; j < ucs4_len; j++) { ++ ucs4 = ucs4_str[j]; ++ if ((ucs4 & 0x7f) == ucs4) { ++ int b64; ++ char c = (char) (ucs4); ++ ++ if (b64_decode_char (c, &b64)) { ++ if (padding || (*binlen == 0)) { ++ decoded = FALSE; ++ break; ++ } ++ ++ switch (i) { ++ case 0: ++ byte1 = (unsigned char) (b64) << 2; ++ i++; ++ break; ++ case 1: ++ byte2 = (unsigned char) (b64); ++ byte1 |= byte2 >> 4; ++ *(*binptr)++ = (char) (byte1); ++ (*binlen)--; ++ byte1 = (byte2 & 0x0f) << 4; ++ i++; ++ break; ++ case 2: ++ byte2 = (unsigned char) (b64); ++ byte1 |= byte2 >> 2; ++ *(*binptr)++ = (char) (byte1); ++ (*binlen)--; ++ byte1 = (byte2 & 0x03) << 6; ++ i++; ++ break; ++ default: ++ byte1 |= (unsigned char) (b64); ++ *(*binptr)++ = (char) (byte1); ++ (*binlen)--; ++ i = 0; ++ break; ++ } ++ ++ if (!decoded) ++ break; ++ ++ continue; ++ } else if (c == utf8_b64_pad) { ++ switch (i) { ++ case 0: ++ case 1: ++ decoded = FALSE; ++ break; ++ case 2: ++ if (*binlen == 0) ++ decoded = FALSE; ++ else { ++ *(*binptr)++ = (char) (byte1); ++ (*binlen)--; ++ padding = TRUE; ++ } ++ i++; ++ break; ++ default: ++ if (!padding) { ++ if (*binlen == 0) ++ decoded = FALSE; ++ else { ++ *(*binptr)++ = (char) (byte1); ++ (*binlen)--; ++ padding = TRUE; ++ } ++ } ++ i = 0; ++ break; ++ } ++ if (!decoded) ++ break; ++ ++ continue; ++ } ++ } ++ if (g_unichar_isspace (ucs4)) ++ continue; ++ ++ decoded = FALSE; ++ break; ++ } ++ ++ g_free (ucs4_str); ++ return decoded; ++} + + static GByteArray * + rsvg_acquire_base64_resource (const char *data, GError ** error) + { +- GByteArray *array = NULL; +- gsize data_len, written_len; +- int state = 0; +- guint save = 0; ++ GByteArray *array; ++ ++ guchar *bufptr; ++ size_t buffer_len, buffer_max_len, data_len; + + rsvg_return_val_if_fail (data != NULL, NULL, error); + +@@ -51,10 +203,19 @@ + break; + + data_len = strlen (data); +- array = g_byte_array_sized_new (data_len / 4 * 3); +- written_len = g_base64_decode_step (data, data_len, array->data, +- &state, &save); +- g_byte_array_set_size (array, written_len); ++ ++ buffer_max_len = ((data_len >> 2) + 1) * 3; ++ buffer_len = buffer_max_len; ++ ++ array = g_byte_array_sized_new (buffer_max_len); ++ bufptr = array->data; ++ ++ if (!utf8_base64_decode (&bufptr, &buffer_len, data, data_len)) { ++ g_byte_array_free (array, TRUE); ++ return NULL; ++ } ++ ++ array->len = buffer_max_len - buffer_len; + + return array; + } +@@ -75,7 +236,7 @@ + if (base_filename != NULL) { + tmpcdir = g_path_get_dirname (base_filename); + g_free (base_filename); +- } else ++ } else + return NULL; + } else + tmpcdir = g_get_current_dir (); +@@ -92,8 +253,10 @@ + { + GByteArray *array; + gchar *path; +- gchar *data = NULL; +- gsize length; ++ ++ guchar buffer[4096]; ++ int length; ++ FILE *f; + + rsvg_return_val_if_fail (filename != NULL, NULL, error); + +@@ -101,20 +264,53 @@ + if (path == NULL) + return NULL; + +- if (!g_file_get_contents (path, &data, &length, error)) { +- g_free (path); ++ f = fopen (path, "rb"); ++ g_free (path); ++ ++ if (!f) { ++ g_set_error (error, ++ G_FILE_ERROR, ++ g_file_error_from_errno (errno), ++ _("Failed to open file '%s': %s"), filename, g_strerror (errno)); + return NULL; + } + ++ /* TODO: an optimization is to use the file's size */ + array = g_byte_array_new (); + +- g_byte_array_append (array, (guint8 *)data, length); +- g_free (data); +- g_free (path); ++ while (!feof (f)) { ++ length = fread (buffer, 1, sizeof (buffer), f); ++ if (length > 0) { ++ if (g_byte_array_append (array, buffer, length) == NULL) { ++ fclose (f); ++ g_byte_array_free (array, TRUE); ++ return NULL; ++ } ++ } else if (ferror (f)) { ++ fclose (f); ++ g_byte_array_free (array, TRUE); ++ return NULL; ++ } ++ } ++ ++ fclose (f); + + return array; + } + ++#ifdef HAVE_GIO ++ ++static void ++rsvg_free_error (GError ** err) ++{ ++ if (err) { ++ if (*err) { ++ g_error_free (*err); ++ *err = NULL; ++ } ++ } ++} ++ + static GByteArray * + rsvg_acquire_vfs_resource (const char *filename, const char *base_uri, GError ** error) + { +@@ -133,19 +329,19 @@ + if (base_uri != NULL) { + GFile *base; + +- g_clear_error (error); +- +- g_object_unref (file); ++ rsvg_free_error(error); ++ ++ g_object_unref (file); + + base = g_file_new_for_uri (base_uri); + file = g_file_resolve_relative_path (base, filename); + g_object_unref (base); + +- res = g_file_load_contents (file, NULL, &data, &size, NULL, error); ++ res = g_file_load_contents (file, NULL, &data, &size, NULL, error); + } + } + +- g_object_unref (file); ++ g_object_unref (file); + + if (res) { + array = g_byte_array_new (); +@@ -158,6 +354,7 @@ + + return array; + } ++#endif + + GByteArray * + _rsvg_acquire_xlink_href_resource (const char *href, const char *base_uri, GError ** err) +@@ -173,8 +370,10 @@ + if (!arr) + arr = rsvg_acquire_file_resource (href, base_uri, NULL); + ++#ifdef HAVE_GIO + if (!arr) + arr = rsvg_acquire_vfs_resource (href, base_uri, NULL); ++#endif + + return arr; + } +@@ -274,10 +473,9 @@ + RsvgNodeImage *z = (RsvgNodeImage *) self; + rsvg_state_finalize (z->super.state); + g_free (z->super.state); +- z->super.state = NULL; + if (z->img) +- g_object_unref (z->img); +- _rsvg_node_free(self); ++ g_object_unref (G_OBJECT (z->img)); ++ g_free (z); + } + + static void +@@ -300,7 +498,7 @@ + + rsvg_push_discrete_layer (ctx); + +- if (!rsvg_current_state (ctx)->overflow && (aspect_ratio & RSVG_ASPECT_RATIO_SLICE)) { ++ if (!rsvg_current_state(ctx)->overflow && (aspect_ratio & RSVG_ASPECT_RATIO_SLICE)) { + rsvg_add_clipping_rect (ctx, x, y, w, h); + } + +@@ -357,10 +555,11 @@ + RsvgNodeImage *image; + image = g_new (RsvgNodeImage, 1); + _rsvg_node_init (&image->super); +- g_assert (image->super.state); + image->img = NULL; + image->preserve_aspect_ratio = RSVG_ASPECT_RATIO_XMID_YMID; + image->x = image->y = image->w = image->h = _rsvg_css_parse_length ("0"); ++ image->super.state = g_new (RsvgState, 1); ++ rsvg_state_init (image->super.state); + image->super.free = rsvg_node_image_free; + image->super.draw = rsvg_node_image_draw; + image->super.set_atts = rsvg_node_image_set_atts; +--- misc/librsvg-2.32.1/config.h 2011-03-28 20:38:20.301880800 +0200 ++++ misc/build/librsvg-2.32.1/config.h 2011-03-28 20:40:54.958130800 +0200 +@@ -1 +1,27 @@ +-dummy ++#define HAVE_FLOAT_H 1 ++/* #undef ENABLE_XEMBED */ ++/* #undef HAVE_BASENAME */ ++/* #undef HAVE_DLFCN_H */ ++#define HAVE_GIO 1 ++/* #undef HAVE_INTTYPES_H */ ++/* #undef HAVE_LC_MESSAGES */ ++#define HAVE_LOCALE_H 1 ++#define HAVE_MEMORY_H 1 ++/* #undef HAVE_STDINT_H */ ++#define HAVE_STDLIB_H 1 ++/* #undef HAVE_STRINGS_H */ ++#define HAVE_STRING_H 1 ++/* #undef HAVE_STRTOK_R */ ++#define HAVE_SYS_STAT_H 1 ++#define HAVE_SYS_TYPES_H 1 ++/* #undef HAVE_UNISTD_H */ ++ ++#define PACKAGE "librsvg" ++#define PACKAGE_BUGREPORT "" ++#define PACKAGE_NAME "" ++#define PACKAGE_STRING "" ++#define PACKAGE_TARNAME "" ++#define PACKAGE_VERSION "" ++#define VERSION "2.32.1" ++#define STDC_HEADERS 1 ++#define X_DISPLAY_MISSING 1 +--- misc/librsvg-2.32.1/makefile.mk 2011-03-28 20:38:20.489380800 +0200 ++++ misc/build/librsvg-2.32.1/makefile.mk 2011-03-28 20:40:38.786255800 +0200 +@@ -1 +1,111 @@ +-dummy ++#************************************************************************* ++# ++# 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=..$/..$/..$/.. ++PRJINC=. ++PRJNAME=librsvg ++TARGET=librsvg-2-2 ++ ++VISIBILITY_HIDDEN=TRUE ++EXTERNAL_WARNINGS_NOT_ERRORS=TRUE ++ ++# --- Settings ---------------------------------- ++ ++.INCLUDE : settings.mk ++ ++CFLAGS+= -DHAVE_GSF -DHAVE_LIBCROCO \ ++ -I. -I$(SOLARINCDIR)$/external/glib-2.0 \ ++ -I. -I$(SOLARINCDIR)$/external/gdk-pixbuf-2.0 \ ++ -I$(SOLARINCDIR)$/external/pango-1.0 \ ++ -I$(SOLARINCDIR)$/external/cairo \ ++ -I$(SOLARINCDIR)$/external/libgsf-1 \ ++ -I$(SOLARINCDIR)$/external/libcroco-0.6 ++ ++# --- Files ------------------------------------- ++ ++SLOFILES=\ ++ $(SLO)$/librsvg-enum-types.obj \ ++ $(SLO)$/librsvg-features.obj \ ++ $(SLO)$/rsvg-affine.obj \ ++ $(SLO)$/rsvg-base-file-util.obj \ ++ $(SLO)$/rsvg-base.obj \ ++ $(SLO)$/rsvg-bpath-util.obj \ ++ $(SLO)$/rsvg-cairo-clip.obj \ ++ $(SLO)$/rsvg-cairo-draw.obj \ ++ $(SLO)$/rsvg-cairo-render.obj \ ++ $(SLO)$/rsvg-cond.obj \ ++ $(SLO)$/rsvg-convert.obj \ ++ $(SLO)$/rsvg-css.obj \ ++ $(SLO)$/rsvg-defs.obj \ ++ $(SLO)$/rsvg-file-util.obj \ ++ $(SLO)$/rsvg-filter.obj \ ++ $(SLO)$/rsvg-gobject.obj \ ++ $(SLO)$/rsvg-image.obj \ ++ $(SLO)$/rsvg-marker.obj \ ++ $(SLO)$/rsvg-mask.obj \ ++ $(SLO)$/rsvg-paint-server.obj \ ++ $(SLO)$/rsvg-path.obj \ ++ $(SLO)$/rsvg-shapes.obj \ ++ $(SLO)$/rsvg-structure.obj \ ++ $(SLO)$/rsvg-styles.obj \ ++ $(SLO)$/rsvg-text.obj \ ++ $(SLO)$/rsvg-xml.obj \ ++ $(SLO)$/rsvg.obj ++ ++# --- Library ----------------------------------- ++ ++SHL1TARGET= $(TARGET) ++SHL1OBJS=$(SLOFILES) ++SHL1STDLIBS=\ ++ intl.lib \ ++ gobject-2.0.lib \ ++ gmodule-2.0.lib \ ++ glib-2.0.lib \ ++ gio-2.0.lib \ ++ gthread-2.0.lib \ ++ gdk_pixbuf-2.0.lib \ ++ cairo.lib \ ++ libxml2.lib \ ++ igsf-1.lib \ ++ libcroco-0.6-3.lib \ ++ pango-1.0.lib \ ++ pangocairo-1.0.lib ++ ++SHL1IMPLIB= i$(TARGET) ++SHL1DEF= $(MISC)$/$(SHL1TARGET).def ++DEF1NAME= $(SHL1TARGET) ++DEF1DEPN= $(MISC)$/$(SHL1TARGET).flt $(SLB)$/$(TARGET).lib ++DEFLIB1NAME= $(TARGET) ++ ++# --- Targets ---------------------------------- ++ ++.INCLUDE : target.mk ++ ++# --- filter file ------------------------------ ++ ++$(MISC)$/$(SHL1TARGET).flt: makefile.mk ++ @echo CLEAR_THE_FILE > $@ diff --git a/librsvg/makefile.mk b/librsvg/makefile.mk old mode 100644 new mode 100755 index 81127630ee3d..f9c07cfd20fa --- a/librsvg/makefile.mk +++ b/librsvg/makefile.mk @@ -49,6 +49,8 @@ TARFILE_MD5=d7a242ca43e33e1b63d3073f9d46a6a8 .IF "$(OS)" == "MACOSX" || "$(OS)" == "WNT" +.IF "$(OS)" == "MACOSX" + PATCH_FILES=librsvg-2.32.1.patch .IF "$(LIBXML_LIBS)" == "" @@ -70,17 +72,13 @@ CONFIGURE_FLAGS=--disable-gtk-theme --disable-tools --with-croco --with-svgz \ LIBCROCO_LIBS=-lcroco-0.6 CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS) -I$(SOLARINCDIR)$/external -I$(SOLARINCDIR)$/external$/glib-2.0 -I$(SOLARINCDIR)$/external$/gdk-pixbuf-2.0 -I$(SOLARINCDIR)$/external$/pango-1.0 -I$(SOLARINCDIR)$/cairo" \ LDFLAGS="$(CONFIGURE_LDFLAGS)" -.IF "$(OS)" == "MACOSX" + CONFIGURE_FLAGS+= CPPFLAGS="$(ARCH_FLAGS) $(EXTRA_CDEFS)" -.ENDIF BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) \ $(GNUMAKE) BUILD_DIR=$(CONFIGURE_DIR) - - -.IF "$(OS)"=="MACOSX" EXTRPATH=LOADER OUT2LIB+=.libs$/librsvg-2.2.dylib @@ -88,7 +86,20 @@ OUT2INC+=librsvg-enum-types.h OUT2INC+=librsvg-features.h OUT2INC+=rsvg-cairo.h OUT2INC+=rsvg.h + .ELIF "$(OS)"=="WNT" + +PATCH_FILES=librsvg-2.32.1-win32.patch +ADDITIONAL_FILES=config.h makefile.mk + +BUILD_DIR=. +BUILD_ACTION=dmake + +OUT2INC+=librsvg-enum-types.h +OUT2INC+=librsvg-features.h +OUT2INC+=rsvg-cairo.h +OUT2INC+=rsvg.h + .ENDIF .ENDIF @@ -98,4 +109,3 @@ OUT2INC+=rsvg.h .INCLUDE : set_ext.mk .INCLUDE : target.mk .INCLUDE : tg_ext.mk - diff --git a/librsvg/prj/d.lst b/librsvg/prj/d.lst old mode 100644 new mode 100755 index cd238ecb7e8f..3e6f5de98364 --- a/librsvg/prj/d.lst +++ b/librsvg/prj/d.lst @@ -10,3 +10,5 @@ mkdir: %_DEST%\inc%_EXT%\external\librsvg-2.0\librsvg ..\%__SRC%\lib\librsvg-2.2.dylib %_DEST%\lib%_EXT%\librsvg-2.2.dylib symlink: %_DEST%\lib%_EXT%\librsvg-2.2.dylib %_DEST%\lib%_EXT%\librsvg-2.dylib +..\%__SRC%\lib\ilibrsvg-2-2.lib %_DEST%\lib%_EXT%\librsvg-2-2.lib +..\%__SRC%\bin\librsvg-2-2.dll %_DEST%\bin%_EXT%\librsvg-2-2.dll -- cgit v1.2.3 From 3d15673188d62ca570342df76497032036cddc67 Mon Sep 17 00:00:00 2001 From: ka Date: Mon, 28 Mar 2011 23:47:32 +0200 Subject: rsvglibs: adjustments for external library patches --- fontconfig/fontconfig-2.8.0.patch | 6762 ------------------------------------- fontconfig/makefile.mk | 78 - fontconfig/prj/build.lst | 3 - fontconfig/prj/d.lst | 3 - freetype/freetype-2.4.4.patch | 133 - freetype/makefile.mk | 70 - freetype/prj/build.lst | 3 - freetype/prj/d.lst | 53 - libcroco/prj/d.lst | 3 +- pango/makefile.mk | 8 +- pango/prj/d.lst | 6 +- 11 files changed, 8 insertions(+), 7114 deletions(-) delete mode 100644 fontconfig/fontconfig-2.8.0.patch delete mode 100644 fontconfig/makefile.mk delete mode 100644 fontconfig/prj/build.lst delete mode 100644 fontconfig/prj/d.lst delete mode 100644 freetype/freetype-2.4.4.patch delete mode 100644 freetype/makefile.mk delete mode 100644 freetype/prj/build.lst delete mode 100644 freetype/prj/d.lst mode change 100644 => 100755 libcroco/prj/d.lst diff --git a/fontconfig/fontconfig-2.8.0.patch b/fontconfig/fontconfig-2.8.0.patch deleted file mode 100644 index 2b3abc9654a6..000000000000 --- a/fontconfig/fontconfig-2.8.0.patch +++ /dev/null @@ -1,6762 +0,0 @@ ---- misc/fontconfig-2.8.0/fc-cache/fc-cache.c Mon Jan 19 23:26:36 1970 -+++ misc/build/fontconfig-2.8.0/fc-cache/fc-cache.c Mon Jan 19 23:26:36 1970 -@@ -41,7 +41,9 @@ - #include - #include - #include -+#ifndef _WIN32 - #include -+#endif - #include - - #if defined (_WIN32) -@@ -257,6 +257,9 @@ - FcBool remove; - FcCache *cache; - struct stat target_stat; -+#if defined (_WIN32) -+ struct stat aStat; -+#endif - - dir_base = FcStrPlus (dir, (FcChar8 *) "/"); - if (!dir_base) -@@ -264,14 +267,25 @@ - fprintf (stderr, "%s: out of memory\n", dir); - return FcFalse; - } -+#if defined (_WIN32) -+ if (stat ((char *) dir, &aStat) != 0) -+ { -+ if (verbose) -+ printf ("%s: not cleaning %s cache directory\n", dir, -+ access ((char *) dir, F_OK) == 0 ? "unwritable" : "non-existent"); -+ FcStrFree (dir_base); -+ return FcTrue; -+ } -+#else - if (access ((char *) dir, W_OK) != 0) - { -- if (verbose) -- printf ("%s: not cleaning %s cache directory\n", dir, -- access ((char *) dir, F_OK) == 0 ? "unwritable" : "non-existent"); -- FcStrFree (dir_base); -- return FcTrue; -+ if (verbose) -+ printf ("%s: not cleaning %s cache directory\n", dir, -+ access ((char *) dir, F_OK) == 0 ? "unwritable" : "non-existent"); -+ FcStrFree (dir_base); -+ return FcTrue; - } -+#endif - if (verbose) - printf ("%s: cleaning cache directory\n", dir); - d = opendir ((char *) dir); ---- misc/fontconfig-2.8.0/fontconfig/fontconfig.h Mon Jan 19 23:26:36 1970 -+++ misc/build/fontconfig-2.8.0/fontconfig/fontconfig.h Mon Jan 19 23:26:36 1970 -@@ -40,7 +40,7 @@ - #define FcPublic - #endif - --typedef unsigned char FcChar8; -+typedef char FcChar8; - typedef unsigned short FcChar16; - typedef unsigned int FcChar32; - typedef int FcBool; ---- misc/fontconfig-2.8.0/src/fcatomic.c Mon Jan 19 23:26:36 1970 -+++ misc/build/fontconfig-2.8.0/src/fcatomic.c Mon Jan 19 23:26:36 1970 -@@ -56,7 +56,12 @@ - #include - - #ifdef _WIN32 -+#include -+#include -+#include - #define mkdir(path,mode) _mkdir(path) -+#define rmdir(path) _rmdir(path) -+#define unlink(path) _unlink(path) - #endif - - #define NEW_NAME ".NEW" ---- misc/fontconfig-2.8.0/src/fccache.c Mon Jan 19 23:26:36 1970 -+++ misc/build/fontconfig-2.8.0/src/fccache.c Mon Jan 19 23:26:36 1970 -@@ -22,6 +22,7 @@ - */ - - #include "fcint.h" -+ - #include "../fc-arch/fcarch.h" - #include - #include -@@ -26,7 +26,9 @@ - #include "../fc-arch/fcarch.h" - #include - #include -+#ifndef _WIN32 - #include -+#endif - #include - #include - #include -@@ -34,9 +35,11 @@ - # include - #elif defined(_WIN32) - # define _WIN32_WINNT 0x0500 --# include - #endif -- -+#include -+#include -+#include -+#include - #ifndef O_BINARY - #define O_BINARY 0 - #endif -@@ -809,6 +812,7 @@ - - - #ifdef _WIN32 -+#include - #define mkdir(path,mode) _mkdir(path) - #endif - -@@ -817,17 +821,28 @@ - { - FcChar8 *parent; - FcBool ret; -+#ifdef _WIN32 -+ struct stat aStat; -+#endif - - if (strlen ((char *) dir) == 0) - return FcFalse; - - parent = FcStrDirname (dir); - if (!parent) -- return FcFalse; -+ return FcFalse; -+#ifdef _WIN32 -+ if (stat ((char *) parent, &aStat) != 0) -+#else - if (access ((char *) parent, F_OK) == 0) -- ret = mkdir ((char *) dir, 0755) == 0 && chmod ((char *) dir, 0755) == 0; -+#endif -+ ret = mkdir ((char *) dir, 0755) == 0 && chmod ((char *) dir, 0755) == 0; -+#ifdef _WIN32 -+ else if (stat ((char *) parent, &aStat) != 0) -+#else - else if (access ((char *) parent, F_OK) == -1) -- ret = FcMakeDirectory (parent) && (mkdir ((char *) dir, 0755) == 0) && chmod ((char *) dir, 0755) == 0; -+#endif -+ ret = FcMakeDirectory (parent) && (mkdir ((char *) dir, 0755) == 0) && chmod ((char *) dir, 0755) == 0; - else - ret = FcFalse; - FcStrFree (parent); -@@ -850,6 +865,9 @@ - struct stat cache_stat; - int magic; - int written; -+#ifdef _WIN32 -+ struct stat aStat; -+#endif - - /* - * Write it to the first directory in the list which is writable -@@ -857,9 +875,13 @@ - - list = FcStrListCreate (config->cacheDirs); - if (!list) -- return FcFalse; -+ return FcFalse; - while ((test_dir = FcStrListNext (list))) { -+#ifdef _WIN32 -+ if (stat ((char *) test_dir, &aStat) != 0) -+#else - if (access ((char *) test_dir, W_OK|X_OK) == 0) -+#endif - { - cache_dir = test_dir; - break; -@@ -869,7 +891,11 @@ - /* - * If the directory doesn't exist, try to create it - */ -+#ifdef _WIN32 -+ if (stat ((char *) test_dir, &aStat) == -1){ -+#else - if (access ((char *) test_dir, F_OK) == -1) { -+#endif - if (FcMakeDirectory (test_dir)) - { - cache_dir = test_dir; ---- misc/fontconfig-2.8.0/src/fccfg.c Mon Jan 19 23:26:36 1970 -+++ misc/build/fontconfig-2.8.0/src/fccfg.c Mon Jan 19 23:26:36 1970 -@@ -23,7 +23,9 @@ - */ - - #include "fcint.h" -+#ifndef _WIN32 - #include -+#endif - #include - - #if defined (_WIN32) && (defined (PIC) || defined (DLL_EXPORT)) -@@ -1646,6 +1646,9 @@ - FcConfigFileExists (const FcChar8 *dir, const FcChar8 *file) - { - FcChar8 *path; -+#ifdef _WIN32 -+ struct stat aStat; -+#endif - - if (!dir) - dir = (FcChar8 *) ""; -@@ -1669,8 +1672,12 @@ - strcat ((char *) path, (char *) file); - - FcMemAlloc (FC_MEM_STRING, strlen ((char *) path) + 1); -+#ifdef _WIN32 -+ if (stat ((char *) path, &aStat) == 0) -+#else - if (access ((char *) path, R_OK) == 0) -- return path; -+#endif -+ return path; - - FcStrFree (path); - return 0; ---- misc/fontconfig-2.8.0/src/fcformat.c Mon Jan 19 23:26:36 1970 -+++ misc/build/fontconfig-2.8.0/src/fcformat.c Mon Jan 19 23:26:36 1970 -@@ -26,7 +26,11 @@ - #include - #include - #include -+#include - -+#ifdef _WIN32 -+#define snprintf(a1,a2,a3,a4) _snprintf(a1,a2,a3,a4) -+#endif - - /* The language is documented in doc/fcformat.fncs - * These are the features implemented: ---- misc/fontconfig-2.8.0/src/fcdir.c 2009-11-16 18:24:52.000000000 +0100 -+++ misc/build/fontconfig-2.8.0/src/fcdir.c 2011-03-03 12:46:39.702582800 +0100 -@@ -23,7 +23,6 @@ - */ - - #include "fcint.h" --#include - - FcBool - FcFileIsDir (const FcChar8 *file) -@@ -323,6 +322,56 @@ - { - return FcFalse; /* XXX deprecated */ - } -+ -+DIR *opendir( const char* pPfad ) -+{ -+ DIR *pDir = malloc (sizeof (DIR)); -+ if ( pDir ) -+ { -+ FcMemAlloc (FC_MEM_ATTR, sizeof (DIR)); /* size is too expensive */ -+ pDir->p = (char*) pPfad; -+ } -+ return pDir; -+} -+struct dirent *readdir( DIR *pDir ) -+{ -+ int bOk = 0; -+ if ( pDir->p ) -+ { -+ char *pBuf = malloc ((strlen( pDir->p ) + 5 )); -+ FcMemAlloc (FC_MEM_STRING, strlen( pDir->p ) + 5); -+ if ( pBuf ) -+ { -+ // *.* dahinter, ggf mit "\\" abtrennen (falls nicht schon da) -+ strcpy( pBuf, pDir->p ); -+ strcat( pBuf, "\\*.*" + ( *(pBuf + strlen( pBuf ) - 1 ) == '\\' ) ); -+ CharUpperBuff( pBuf, strlen(pBuf) ); -+ pDir->h = FindFirstFile( pBuf, &pDir->aDirEnt ); -+ bOk = pDir->h != INVALID_HANDLE_VALUE; -+ pDir->p = NULL; -+ free (pBuf); -+ } -+ else -+ pDir->h = INVALID_HANDLE_VALUE; -+ } -+ else -+ { -+ bOk = FindNextFile( pDir->h, &pDir->aDirEnt ); -+ } -+ -+ return bOk ? &pDir->aDirEnt : NULL; -+} -+ -+int closedir( DIR *pDir ) -+{ -+ int bOk = 0; -+ if ( pDir ) -+ { -+ bOk = 0 != pDir->p || FindClose( pDir->h ); -+ free (pDir); -+ } -+ return bOk; -+} - #define __fcdir__ - #include "fcaliastail.h" - #undef __fcdir__ ---- misc/fontconfig-2.8.0/src/fcint.h Mon Jan 19 23:26:36 1970 -+++ misc/build/fontconfig-2.8.0/src/fcint.h Mon Jan 19 23:26:36 1970 -@@ -31,6 +31,15 @@ - - #include - #include -+#ifdef _MSC_VER -+ -+typedef __int32 int32_t; -+typedef unsigned __int32 uint32_t; -+typedef __int64 int64_t; -+typedef unsigned __int64 uint64_t; -+typedef __int16 int16_t; -+#define ulink _ulink -+#else - #ifdef HAVE_INTTYPES_H - #include - #elif defined(HAVE_STDINT_H) -@@ -38,6 +47,9 @@ - #else - #error missing C99 integer data types - #endif -+#endif -+ -+ - #include - #include - #include -@@ -62,6 +64,40 @@ - #include - #include "fcdeprecate.h" - -+#ifndef _WIN32 -+#include -+#else -+#include -+#include -+#include -+#include -+#include -+#include -+#ifdef _MSC_VER -+#pragma warning (push,1) -+#endif -+#include -+#ifdef _MSC_VER -+#pragma warning (pop) -+#endif -+# define S_IFDIR _S_IFDIR /* directory */ -+#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) -+#define dirent _WIN32_FIND_DATAA -+#define d_name cFileName -+#define d_type dwFileAttributes -+typedef struct -+{ -+ WIN32_FIND_DATAA aDirEnt; -+ HANDLE h; -+ const char *p; -+} DIR; -+ -+DIR *opendir( const char* pPfad ); -+struct dirent *readdir( DIR *pDir ); -+ -+int closedir( DIR *pDir ); -+#endif -+ - #ifndef FC_CONFIG_PATH - #define FC_CONFIG_PATH "fonts.conf" - #endif ---- misc/fontconfig-2.8.0/src/fcxml.c Mon Jan 19 23:26:36 1970 -+++ misc/build/fontconfig-2.8.0/src/fcxml.c Mon Jan 19 23:26:36 1970 -@@ -27,6 +27,13 @@ - #include -+#ifndef _WIN32 - #include -+#endif - -+#ifdef _WIN32 -+#include -+#define open(path,oflag) _open(path,oflag) -+#endif -+ - #ifdef ENABLE_LIBXML2 - - #include ---- misc/fontconfig-2.8.0/config.h Wed Aug 20 14:33:55 2008 -+++ misc/build/fontconfig-2.8.0/config.h Wed Aug 20 14:26:42 2008 -@@ -1 +1,202 @@ --dummy -+/* config.h. Generated from config.h.in by configure. */ -+/* config.h.in. Generated from configure.in by autoheader. */ -+ -+/* Font configuration directory */ -+#define CONFDIR "${sysconfdir}/fonts" -+ -+/* Use libxml2 instead of Expat */ -+#define ENABLE_LIBXML2 1 -+ -+/* Additional font directories */ -+#define FC_ADD_FONTS "yes" -+ -+/* System font directory */ -+#define FC_DEFAULT_FONTS "/usr/share/fonts" -+ -+/* Define to 1 if you have the `chsize' function. */ -+#define HAVE_CHSIZE 1 -+ -+/* Define to 1 if you have the header file, and it defines `DIR'. -+ */ -+#define HAVE_DIRENT_H 1 -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_DLFCN_H */ -+ -+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ -+/* #undef HAVE_DOPRNT */ -+ -+/* Found a useable expat library */ -+/* #undef HAVE_EXPAT */ -+ -+/* Define to 1 if you have the header file. */ -+#define HAVE_FCNTL_H 1 -+ -+/* Define to 1 if you have the `ftruncate' function. */ -+/* #undef HAVE_FTRUNCATE */ -+ -+/* FT_Bitmap_Size structure includes y_ppem field */ -+#define HAVE_FT_BITMAP_SIZE_Y_PPEM 1 -+ -+/* Define to 1 if you have the `FT_Get_BDF_Property' function. */ -+#define HAVE_FT_GET_BDF_PROPERTY 1 -+ -+/* Define to 1 if you have the `FT_Get_Next_Char' function. */ -+#define HAVE_FT_GET_NEXT_CHAR 1 -+ -+/* Define to 1 if you have the `FT_Get_PS_Font_Info' function. */ -+#define HAVE_FT_GET_PS_FONT_INFO 1 -+ -+/* Define to 1 if you have the `FT_Get_X11_Font_Format' function. */ -+#define HAVE_FT_GET_X11_FONT_FORMAT 1 -+ -+/* Define to 1 if you have the `FT_Has_PS_Glyph_Names' function. */ -+#define HAVE_FT_HAS_PS_GLYPH_NAMES 1 -+ -+/* Define to 1 if you have the `FT_Select_Size' function. */ -+#define HAVE_FT_SELECT_SIZE 1 -+ -+/* Define to 1 if you have the `geteuid' function. */ -+/* #undef HAVE_GETEUID */ -+ -+/* Define to 1 if you have the `getopt' function. */ -+/* #undef HAVE_GETOPT */ -+ -+/* Define to 1 if you have the `getopt_long' function. */ -+/* #undef HAVE_GETOPT_LONG */ -+ -+/* Define to 1 if you have the `getpagesize' function. */ -+/* #undef HAVE_GETPAGESIZE */ -+ -+/* Define to 1 if you have the `getuid' function. */ -+/* #undef HAVE_GETUID */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_INTTYPES_H */ -+ -+/* Define to 1 if you have the `link' function. */ -+/* #undef HAVE_LINK */ -+ -+/* Define to 1 if you have the `lrand48' function. */ -+/* #undef HAVE_LRAND48 */ -+ -+/* Define to 1 if you have the `memmove' function. */ -+#define HAVE_MEMMOVE 1 -+ -+/* Define to 1 if you have the header file. */ -+#define HAVE_MEMORY_H 1 -+ -+/* Define to 1 if you have the `memset' function. */ -+#define HAVE_MEMSET 1 -+ -+/* Define to 1 if you have the `mkstemp' function. */ -+/* #undef HAVE_MKSTEMP */ -+ -+/* Define to 1 if you have a working `mmap' system call. */ -+/* #undef HAVE_MMAP */ -+ -+/* Define to 1 if you have the header file, and it defines `DIR'. */ -+/* #undef HAVE_NDIR_H */ -+ -+/* Define to 1 if you have the `rand' function. */ -+#define HAVE_RAND 1 -+ -+/* Define to 1 if you have the `random' function. */ -+/* #undef HAVE_RANDOM */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_STDINT_H */ -+ -+/* Define to 1 if you have the header file. */ -+#define HAVE_STDLIB_H 1 -+ -+/* Define to 1 if you have the `strchr' function. */ -+#define HAVE_STRCHR 1 -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_STRINGS_H */ -+ -+/* Define to 1 if you have the header file. */ -+#define HAVE_STRING_H 1 -+ -+/* Define to 1 if you have the `strrchr' function. */ -+#define HAVE_STRRCHR 1 -+ -+/* Define to 1 if you have the `strtol' function. */ -+#define HAVE_STRTOL 1 -+ -+/* Define to 1 if you have the `sysconf' function. */ -+/* #undef HAVE_SYSCONF */ -+ -+/* Define to 1 if you have the header file, and it defines `DIR'. -+ */ -+/* #undef HAVE_SYS_DIR_H */ -+ -+/* Define to 1 if you have the header file, and it defines `DIR'. -+ */ -+/* #undef HAVE_SYS_NDIR_H */ -+ -+/* Define to 1 if you have the header file. */ -+#define HAVE_SYS_STAT_H 1 -+ -+/* Define to 1 if you have the header file. */ -+#define HAVE_SYS_TYPES_H 1 -+ -+/* Define to 1 if you have the header file. */ -+#define HAVE_UNISTD_H 1 -+ -+/* Define to 1 if you have the `vprintf' function. */ -+#define HAVE_VPRINTF 1 -+ -+/* Can use #warning in C files */ -+/* #undef HAVE_WARNING_CPP_DIRECTIVE */ -+ -+/* Use xmlparse.h instead of expat.h */ -+/* #undef HAVE_XMLPARSE_H */ -+ -+/* Define to 1 if you have the `XML_SetDoctypeDeclHandler' function. */ -+/* #undef HAVE_XML_SETDOCTYPEDECLHANDLER */ -+ -+/* Define to the sub-directory in which libtool stores uninstalled libraries. -+ */ -+#define LT_OBJDIR ".libs/" -+ -+/* Name of package */ -+#define PACKAGE "fontconfig" -+ -+/* Define to the address where bug reports for this package should be sent. */ -+#define PACKAGE_BUGREPORT "" -+ -+/* Define to the full name of this package. */ -+#define PACKAGE_NAME "" -+ -+/* Define to the full name and version of this package. */ -+#define PACKAGE_STRING "" -+ -+/* Define to the one symbol short name of this package. */ -+#define PACKAGE_TARNAME "" -+ -+/* Define to the version of this package. */ -+#define PACKAGE_VERSION "" -+ -+/* Define to 1 if you have the ANSI C header files. */ -+#define STDC_HEADERS 1 -+ -+/* Use iconv. */ -+#define USE_ICONV 0 -+ -+/* Version number of package */ -+#define VERSION "2.8.0" -+ -+/* Define to empty if `const' does not conform to ANSI C. */ -+/* #undef const */ -+ -+/* Define to `__inline__' or `__inline' if that's what the C compiler -+ calls it, or to nothing if 'inline' is not supported under any name. */ -+#ifndef __cplusplus -+#define inline __inline -+#endif -+ -+/* Define to `int' if does not define. */ -+#define pid_t int -+ ---- misc/fontconfig-2.8.0/fc-arch/fcalias.h Wed Aug 20 14:33:55 2008 -+++ misc/build/fontconfig-2.8.0/fc-arch/fcalias.h Wed Aug 20 14:26:42 2008 -@@ -1 +1,1 @@ --dummy -+ ---- misc/fontconfig-2.8.0/fc-arch/fcaliastail.h Wed Aug 20 14:33:55 2008 -+++ misc/build/fontconfig-2.8.0/fc-arch/fcaliastail.h Wed Aug 20 14:26:42 2008 -@@ -1 +1,1 @@ --dummy -+ ---- misc/fontconfig-2.8.0/fc-arch/fcarch.h Wed Aug 20 14:33:55 2008 -+++ misc/build/fontconfig-2.8.0/fc-arch/fcarch.h Wed Aug 20 14:26:42 2008 -@@ -1 +1,24 @@ --dummy -+/* -+ * Copyright © 2006 Keith Packard -+ * -+ * Permission to use, copy, modify, distribute, and sell this software and its -+ * documentation for any purpose is hereby granted without fee, provided that -+ * the above copyright notice appear in all copies and that both that -+ * copyright notice and this permission notice appear in supporting -+ * documentation, and that the name of Keith Packard not be used in -+ * advertising or publicity pertaining to distribution of the software without -+ * specific, written prior permission. Keith Packard makes no -+ * representations about the suitability of this software for any purpose. It -+ * is provided "as is" without express or implied warranty. -+ * -+ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -+ * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR -+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -+ * PERFORMANCE OF THIS SOFTWARE. -+ */ -+ -+#define FC_ARCHITECTURE "le32d8" -+ ---- misc/fontconfig-2.8.0/fc-glyphname$/fcglyphname.h Wed Aug 20 14:33:55 2008 -+++ misc/build/fontconfig-2.8.0/fc-glyphname/fcglyphname.h Wed Aug 20 14:26:42 2008 -@@ -1 +1,782 @@ --dummy -+/* -+ * fontconfig/fc-glyphname/fcglyphname.tmpl.h -+ * -+ * Copyright © 2003 Keith Packard -+ * -+ * Permission to use, copy, modify, distribute, and sell this software and its -+ * documentation for any purpose is hereby granted without fee, provided that -+ * the above copyright notice appear in all copies and that both that -+ * copyright notice and this permission notice appear in supporting -+ * documentation, and that the name of Keith Packard not be used in -+ * advertising or publicity pertaining to distribution of the software without -+ * specific, written prior permission. Keith Packard makes no -+ * representations about the suitability of this software for any purpose. It -+ * is provided "as is" without express or implied warranty. -+ * -+ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -+ * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR -+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -+ * PERFORMANCE OF THIS SOFTWARE. -+ */ -+ -+/* 201 glyphnames in 271 entries, 74% occupancy */ -+ -+#define FC_GLYPHNAME_HASH 271 -+#define FC_GLYPHNAME_REHASH 269 -+#define FC_GLYPHNAME_MAXLEN 4 -+ -+typedef int16_t FcGlyphId; -+ -+static const struct { const FcChar32 ucs; const FcChar8 name[5]; } _fc_glyph_names[201] = { -+ { 0x2701, "a1" }, -+ { 0x2721, "a10" }, -+ { 0x275e, "a100" }, -+ { 0x2761, "a101" }, -+ { 0x2762, "a102" }, -+ { 0x2763, "a103" }, -+ { 0x2764, "a104" }, -+ { 0x2710, "a105" }, -+ { 0x2765, "a106" }, -+ { 0x2766, "a107" }, -+ { 0x2767, "a108" }, -+ { 0x2660, "a109" }, -+ { 0x261b, "a11" }, -+ { 0x2665, "a110" }, -+ { 0x2666, "a111" }, -+ { 0x2663, "a112" }, -+ { 0x2709, "a117" }, -+ { 0x2708, "a118" }, -+ { 0x2707, "a119" }, -+ { 0x261e, "a12" }, -+ { 0x2460, "a120" }, -+ { 0x2461, "a121" }, -+ { 0x2462, "a122" }, -+ { 0x2463, "a123" }, -+ { 0x2464, "a124" }, -+ { 0x2465, "a125" }, -+ { 0x2466, "a126" }, -+ { 0x2467, "a127" }, -+ { 0x2468, "a128" }, -+ { 0x2469, "a129" }, -+ { 0x270c, "a13" }, -+ { 0x2776, "a130" }, -+ { 0x2777, "a131" }, -+ { 0x2778, "a132" }, -+ { 0x2779, "a133" }, -+ { 0x277a, "a134" }, -+ { 0x277b, "a135" }, -+ { 0x277c, "a136" }, -+ { 0x277d, "a137" }, -+ { 0x277e, "a138" }, -+ { 0x277f, "a139" }, -+ { 0x270d, "a14" }, -+ { 0x2780, "a140" }, -+ { 0x2781, "a141" }, -+ { 0x2782, "a142" }, -+ { 0x2783, "a143" }, -+ { 0x2784, "a144" }, -+ { 0x2785, "a145" }, -+ { 0x2786, "a146" }, -+ { 0x2787, "a147" }, -+ { 0x2788, "a148" }, -+ { 0x2789, "a149" }, -+ { 0x270e, "a15" }, -+ { 0x278a, "a150" }, -+ { 0x278b, "a151" }, -+ { 0x278c, "a152" }, -+ { 0x278d, "a153" }, -+ { 0x278e, "a154" }, -+ { 0x278f, "a155" }, -+ { 0x2790, "a156" }, -+ { 0x2791, "a157" }, -+ { 0x2792, "a158" }, -+ { 0x2793, "a159" }, -+ { 0x270f, "a16" }, -+ { 0x2794, "a160" }, -+ { 0x2192, "a161" }, -+ { 0x27a3, "a162" }, -+ { 0x2194, "a163" }, -+ { 0x2195, "a164" }, -+ { 0x2799, "a165" }, -+ { 0x279b, "a166" }, -+ { 0x279c, "a167" }, -+ { 0x279d, "a168" }, -+ { 0x279e, "a169" }, -+ { 0x2711, "a17" }, -+ { 0x279f, "a170" }, -+ { 0x27a0, "a171" }, -+ { 0x27a1, "a172" }, -+ { 0x27a2, "a173" }, -+ { 0x27a4, "a174" }, -+ { 0x27a5, "a175" }, -+ { 0x27a6, "a176" }, -+ { 0x27a7, "a177" }, -+ { 0x27a8, "a178" }, -+ { 0x27a9, "a179" }, -+ { 0x2712, "a18" }, -+ { 0x27ab, "a180" }, -+ { 0x27ad, "a181" }, -+ { 0x27af, "a182" }, -+ { 0x27b2, "a183" }, -+ { 0x27b3, "a184" }, -+ { 0x27b5, "a185" }, -+ { 0x27b8, "a186" }, -+ { 0x27ba, "a187" }, -+ { 0x27bb, "a188" }, -+ { 0x27bc, "a189" }, -+ { 0x2713, "a19" }, -+ { 0x27bd, "a190" }, -+ { 0x27be, "a191" }, -+ { 0x279a, "a192" }, -+ { 0x27aa, "a193" }, -+ { 0x27b6, "a194" }, -+ { 0x27b9, "a195" }, -+ { 0x2798, "a196" }, -+ { 0x27b4, "a197" }, -+ { 0x27b7, "a198" }, -+ { 0x27ac, "a199" }, -+ { 0x2702, "a2" }, -+ { 0x2714, "a20" }, -+ { 0x27ae, "a200" }, -+ { 0x27b1, "a201" }, -+ { 0x2703, "a202" }, -+ { 0x2750, "a203" }, -+ { 0x2752, "a204" }, -+ { 0x276e, "a205" }, -+ { 0x2770, "a206" }, -+ { 0x2715, "a21" }, -+ { 0x2716, "a22" }, -+ { 0x2717, "a23" }, -+ { 0x2718, "a24" }, -+ { 0x2719, "a25" }, -+ { 0x271a, "a26" }, -+ { 0x271b, "a27" }, -+ { 0x271c, "a28" }, -+ { 0x2722, "a29" }, -+ { 0x2704, "a3" }, -+ { 0x2723, "a30" }, -+ { 0x2724, "a31" }, -+ { 0x2725, "a32" }, -+ { 0x2726, "a33" }, -+ { 0x2727, "a34" }, -+ { 0x2605, "a35" }, -+ { 0x2729, "a36" }, -+ { 0x272a, "a37" }, -+ { 0x272b, "a38" }, -+ { 0x272c, "a39" }, -+ { 0x260e, "a4" }, -+ { 0x272d, "a40" }, -+ { 0x272e, "a41" }, -+ { 0x272f, "a42" }, -+ { 0x2730, "a43" }, -+ { 0x2731, "a44" }, -+ { 0x2732, "a45" }, -+ { 0x2733, "a46" }, -+ { 0x2734, "a47" }, -+ { 0x2735, "a48" }, -+ { 0x2736, "a49" }, -+ { 0x2706, "a5" }, -+ { 0x2737, "a50" }, -+ { 0x2738, "a51" }, -+ { 0x2739, "a52" }, -+ { 0x273a, "a53" }, -+ { 0x273b, "a54" }, -+ { 0x273c, "a55" }, -+ { 0x273d, "a56" }, -+ { 0x273e, "a57" }, -+ { 0x273f, "a58" }, -+ { 0x2740, "a59" }, -+ { 0x271d, "a6" }, -+ { 0x2741, "a60" }, -+ { 0x2742, "a61" }, -+ { 0x2743, "a62" }, -+ { 0x2744, "a63" }, -+ { 0x2745, "a64" }, -+ { 0x2746, "a65" }, -+ { 0x2747, "a66" }, -+ { 0x2748, "a67" }, -+ { 0x2749, "a68" }, -+ { 0x274a, "a69" }, -+ { 0x271e, "a7" }, -+ { 0x274b, "a70" }, -+ { 0x25cf, "a71" }, -+ { 0x274d, "a72" }, -+ { 0x25a0, "a73" }, -+ { 0x274f, "a74" }, -+ { 0x2751, "a75" }, -+ { 0x25b2, "a76" }, -+ { 0x25bc, "a77" }, -+ { 0x25c6, "a78" }, -+ { 0x2756, "a79" }, -+ { 0x271f, "a8" }, -+ { 0x25d7, "a81" }, -+ { 0x2758, "a82" }, -+ { 0x2759, "a83" }, -+ { 0x275a, "a84" }, -+ { 0x276f, "a85" }, -+ { 0x2771, "a86" }, -+ { 0x2772, "a87" }, -+ { 0x2773, "a88" }, -+ { 0x2768, "a89" }, -+ { 0x2720, "a9" }, -+ { 0x2769, "a90" }, -+ { 0x276c, "a91" }, -+ { 0x276d, "a92" }, -+ { 0x276a, "a93" }, -+ { 0x276b, "a94" }, -+ { 0x2774, "a95" }, -+ { 0x2775, "a96" }, -+ { 0x275b, "a97" }, -+ { 0x275c, "a98" }, -+ { 0x275d, "a99" }, -+}; -+static const FcGlyphId _fc_name_to_ucs[271] = { -+ 123, -+ 81, -+ 198, -+ 154, -+ 142, -+ 186, -+ 82, -+ -1, -+ 143, -+ 172, -+ 181, -+ 79, -+ 153, -+ 191, -+ -1, -+ -1, -+ 80, -+ 195, -+ 179, -+ 170, -+ 151, -+ 129, -+ 101, -+ 194, -+ 85, -+ 102, -+ 73, -+ 171, -+ 99, -+ -1, -+ -1, -+ 100, -+ 196, -+ -1, -+ 189, -+ 163, -+ 110, -+ 199, -+ -1, -+ -1, -+ 59, -+ 50, -+ -1, -+ 60, -+ 75, -+ -1, -+ 51, -+ -1, -+ -1, -+ 58, -+ -1, -+ 61, -+ 55, -+ -1, -+ 192, -+ 56, -+ 62, -+ -1, -+ 53, -+ 166, -+ 113, -+ 54, -+ -1, -+ 157, -+ 33, -+ 188, -+ 177, -+ 21, -+ -1, -+ -1, -+ 31, -+ -1, -+ -1, -+ 32, -+ -1, -+ -1, -+ 24, -+ 160, -+ -1, -+ 38, -+ -1, -+ -1, -+ 26, -+ -1, -+ 161, -+ 27, -+ 197, -+ 94, -+ 95, -+ 105, -+ 106, -+ 90, -+ 91, -+ 92, -+ 93, -+ 86, -+ 87, -+ 88, -+ 89, -+ 28, -+ 29, -+ 39, -+ 40, -+ 10, -+ 11, -+ 17, -+ 18, -+ 6, -+ 7, -+ 8, -+ 9, -+ 2, -+ 3, -+ 4, -+ 5, -+ -1, -+ -1, -+ 114, -+ 108, -+ 146, -+ 74, -+ -1, -+ 117, -+ 115, -+ 118, -+ 156, -+ 119, -+ -1, -+ 120, -+ -1, -+ 121, -+ 131, -+ 122, -+ -1, -+ 109, -+ -1, -+ 124, -+ 141, -+ 134, -+ 174, -+ 144, -+ -1, -+ 137, -+ 155, -+ 138, -+ -1, -+ 64, -+ -1, -+ 140, -+ 152, -+ 65, -+ -1, -+ 111, -+ -1, -+ 57, -+ 162, -+ -1, -+ -1, -+ 67, -+ -1, -+ -1, -+ 150, -+ 68, -+ -1, -+ 167, -+ -1, -+ 69, -+ 164, -+ -1, -+ 116, -+ 70, -+ -1, -+ -1, -+ 148, -+ 71, -+ -1, -+ -1, -+ 184, -+ 72, -+ 149, -+ 176, -+ 193, -+ 34, -+ 182, -+ 145, -+ -1, -+ 83, -+ 187, -+ -1, -+ 103, -+ 84, -+ 104, -+ 200, -+ 63, -+ 37, -+ 41, -+ 52, -+ 19, -+ 30, -+ 1, -+ 12, -+ 97, -+ 35, -+ 98, -+ 135, -+ 46, -+ 36, -+ 47, -+ 96, -+ 48, -+ 159, -+ 49, -+ -1, -+ 42, -+ 112, -+ 43, -+ 173, -+ 44, -+ 168, -+ 45, -+ -1, -+ 20, -+ 183, -+ 16, -+ 147, -+ 22, -+ 178, -+ 23, -+ -1, -+ 15, -+ -1, -+ 25, -+ 190, -+ 13, -+ 139, -+ 14, -+ -1, -+ -1, -+ -1, -+ 128, -+ 107, -+ 125, -+ -1, -+ 0, -+ 158, -+ 169, -+ 136, -+ 126, -+ -1, -+ -1, -+ 180, -+ 127, -+ 77, -+ -1, -+ -1, -+ 132, -+ -1, -+ 78, -+ -1, -+ 133, -+ -1, -+ 165, -+ 66, -+ 130, -+ -1, -+ -1, -+ -1, -+ 76, -+ -1, -+ 185, -+ 175, -+}; -+static const FcGlyphId _fc_ucs_to_name[271] = { -+ 56, -+ 135, -+ 19, -+ 138, -+ 58, -+ 140, -+ 59, -+ 142, -+ 60, -+ 144, -+ 61, -+ 146, -+ 62, -+ 149, -+ 64, -+ 151, -+ 152, -+ 153, -+ 154, -+ 155, -+ 156, -+ 157, -+ 159, -+ 160, -+ 161, -+ 162, -+ 163, -+ 131, -+ 165, -+ 166, -+ 167, -+ 168, -+ 170, -+ -1, -+ 172, -+ -1, -+ 174, -+ 112, -+ 175, -+ 113, -+ -1, -+ 173, -+ -1, -+ 179, -+ -1, -+ 182, -+ 183, -+ 158, -+ 198, -+ 199, -+ 200, -+ 2, -+ -1, -+ -1, -+ 3, -+ 4, -+ 5, -+ 6, -+ 8, -+ 9, -+ 10, -+ 189, -+ 164, -+ 194, -+ 195, -+ 192, -+ 193, -+ 114, -+ 11, -+ 115, -+ 186, -+ 15, -+ 188, -+ 13, -+ 14, -+ 31, -+ 32, -+ 33, -+ 34, -+ 35, -+ 36, -+ 37, -+ 38, -+ 39, -+ 40, -+ 42, -+ 43, -+ 44, -+ 45, -+ 46, -+ 47, -+ 48, -+ 49, -+ 50, -+ 51, -+ 53, -+ 54, -+ 55, -+ 20, -+ 21, -+ 22, -+ 23, -+ 24, -+ 25, -+ 26, -+ 27, -+ 28, -+ 29, -+ -1, -+ 103, -+ 69, -+ 99, -+ 70, -+ 71, -+ 72, -+ 73, -+ 75, -+ 76, -+ 77, -+ 78, -+ 66, -+ 79, -+ 80, -+ 81, -+ 82, -+ 83, -+ 84, -+ 100, -+ 86, -+ 106, -+ 87, -+ 109, -+ 88, -+ -1, -+ 110, -+ 89, -+ 90, -+ 104, -+ 91, -+ 101, -+ 105, -+ 92, -+ 102, -+ 93, -+ 94, -+ 95, -+ 97, -+ 98, -+ 196, -+ -1, -+ 134, -+ -1, -+ -1, -+ -1, -+ -1, -+ -1, -+ 137, -+ -1, -+ -1, -+ -1, -+ -1, -+ -1, -+ 139, -+ -1, -+ -1, -+ 176, -+ -1, -+ -1, -+ 141, -+ 184, -+ -1, -+ -1, -+ -1, -+ -1, -+ 143, -+ 177, -+ 57, -+ -1, -+ -1, -+ -1, -+ 145, -+ -1, -+ -1, -+ -1, -+ -1, -+ 178, -+ 148, -+ -1, -+ -1, -+ -1, -+ -1, -+ -1, -+ 150, -+ 65, -+ 171, -+ 67, -+ 68, -+ -1, -+ -1, -+ 191, -+ -1, -+ -1, -+ 181, -+ -1, -+ -1, -+ -1, -+ -1, -+ -1, -+ -1, -+ -1, -+ -1, -+ 185, -+ -1, -+ -1, -+ -1, -+ -1, -+ -1, -+ 187, -+ -1, -+ -1, -+ -1, -+ 133, -+ -1, -+ 197, -+ -1, -+ -1, -+ -1, -+ -1, -+ -1, -+ 0, -+ 107, -+ 111, -+ 125, -+ -1, -+ 147, -+ 18, -+ 17, -+ 16, -+ -1, -+ -1, -+ 30, -+ 41, -+ 52, -+ 63, -+ 7, -+ 74, -+ 85, -+ 96, -+ 108, -+ 116, -+ 117, -+ 118, -+ 119, -+ 120, -+ 121, -+ 122, -+ 123, -+ 136, -+ 169, -+ 180, -+ 190, -+ 1, -+ 124, -+ 126, -+ 127, -+ 128, -+ 129, -+ 130, -+ -1, -+ 132, -+ 12, -+}; -+ ---- misc/fontconfig-2.8.0/fc-lang/fclang.h Wed Aug 20 14:33:55 2008 -+++ misc/build/fontconfig-2.8.0/fc-lang/fclang.h Wed Aug 20 14:26:42 2008 -@@ -1 +1,4086 @@ --dummy -+/* -+ * fontconfig/fc-lang/fclang.tmpl.h -+ * -+ * Copyright © 2002 Keith Packard -+ * -+ * Permission to use, copy, modify, distribute, and sell this software and its -+ * documentation for any purpose is hereby granted without fee, provided that -+ * the above copyright notice appear in all copies and that both that -+ * copyright notice and this permission notice appear in supporting -+ * documentation, and that the name of Keith Packard not be used in -+ * advertising or publicity pertaining to distribution of the software without -+ * specific, written prior permission. Keith Packard makes no -+ * representations about the suitability of this software for any purpose. It -+ * is provided "as is" without express or implied warranty. -+ * -+ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -+ * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR -+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -+ * PERFORMANCE OF THIS SOFTWARE. -+ */ -+ -+/* total size: 903 unique leaves: 608 */ -+ -+#define LEAF0 (238 * sizeof (FcLangCharSet)) -+#define OFF0 (LEAF0 + 608 * sizeof (FcCharLeaf)) -+#define NUM0 (OFF0 + 657 * sizeof (intptr_t)) -+#define SET(n) (n * sizeof (FcLangCharSet) + offsetof (FcLangCharSet, charset)) -+#define OFF(s,o) (OFF0 + o * sizeof (intptr_t) - SET(s)) -+#define NUM(s,n) (NUM0 + n * sizeof (FcChar16) - SET(s)) -+#define LEAF(o,l) (LEAF0 + l * sizeof (FcCharLeaf) - (OFF0 + o * sizeof (intptr_t))) -+#define fcLangCharSets (fcLangData.langCharSets) -+#define fcLangCharSetIndices (fcLangData.langIndices) -+#define fcLangCharSetIndicesInv (fcLangData.langIndicesInv) -+ -+static const struct { -+ FcLangCharSet langCharSets[238]; -+ FcCharLeaf leaves[608]; -+ intptr_t leaf_offsets[657]; -+ FcChar16 numbers[657]; -+ FcChar8 langIndices[238]; -+ FcChar8 langIndicesInv[238]; -+} fcLangData = { -+{ -+ { "aa", { FC_REF_CONSTANT, 1, OFF(0,0), NUM(0,0) } }, /* 0 */ -+ { "ab", { FC_REF_CONSTANT, 1, OFF(1,1), NUM(1,1) } }, /* 1 */ -+ { "af", { FC_REF_CONSTANT, 2, OFF(2,2), NUM(2,2) } }, /* 2 */ -+ { "ak", { FC_REF_CONSTANT, 5, OFF(3,4), NUM(3,4) } }, /* 3 */ -+ { "am", { FC_REF_CONSTANT, 2, OFF(4,9), NUM(4,9) } }, /* 4 */ -+ { "an", { FC_REF_CONSTANT, 1, OFF(5,11), NUM(5,11) } }, /* 5 */ -+ { "ar", { FC_REF_CONSTANT, 1, OFF(6,12), NUM(6,12) } }, /* 6 */ -+ { "as", { FC_REF_CONSTANT, 1, OFF(7,13), NUM(7,13) } }, /* 7 */ -+ { "ast", { FC_REF_CONSTANT, 1, OFF(8,11), NUM(8,11) } }, /* 8 */ -+ { "av", { FC_REF_CONSTANT, 1, OFF(9,14), NUM(9,14) } }, /* 9 */ -+ { "ay", { FC_REF_CONSTANT, 1, OFF(10,15), NUM(10,15) } }, /* 10 */ -+ { "az-az", { FC_REF_CONSTANT, 3, OFF(11,16), NUM(11,16) } }, /* 11 */ -+ { "az-ir", { FC_REF_CONSTANT, 1, OFF(12,19), NUM(12,19) } }, /* 12 */ -+ { "ba", { FC_REF_CONSTANT, 1, OFF(13,20), NUM(13,20) } }, /* 13 */ -+ { "be", { FC_REF_CONSTANT, 1, OFF(14,21), NUM(14,21) } }, /* 14 */ -+ { "ber-dz", { FC_REF_CONSTANT, 4, OFF(15,22), NUM(15,22) } }, /* 15 */ -+ { "ber-ma", { FC_REF_CONSTANT, 1, OFF(16,26), NUM(16,26) } }, /* 16 */ -+ { "bg", { FC_REF_CONSTANT, 1, OFF(17,27), NUM(17,27) } }, /* 17 */ -+ { "bh", { FC_REF_CONSTANT, 1, OFF(18,28), NUM(18,28) } }, /* 18 */ -+ { "bho", { FC_REF_CONSTANT, 1, OFF(19,28), NUM(19,28) } }, /* 19 */ -+ { "bi", { FC_REF_CONSTANT, 1, OFF(20,29), NUM(20,29) } }, /* 20 */ -+ { "bin", { FC_REF_CONSTANT, 3, OFF(21,30), NUM(21,30) } }, /* 21 */ -+ { "bm", { FC_REF_CONSTANT, 3, OFF(22,33), NUM(22,33) } }, /* 22 */ -+ { "bn", { FC_REF_CONSTANT, 1, OFF(23,36), NUM(23,36) } }, /* 23 */ -+ { "bo", { FC_REF_CONSTANT, 1, OFF(24,37), NUM(24,37) } }, /* 24 */ -+ { "br", { FC_REF_CONSTANT, 1, OFF(25,38), NUM(25,38) } }, /* 25 */ -+ { "bs", { FC_REF_CONSTANT, 2, OFF(26,39), NUM(26,39) } }, /* 26 */ -+ { "bua", { FC_REF_CONSTANT, 1, OFF(27,41), NUM(27,41) } }, /* 27 */ -+ { "byn", { FC_REF_CONSTANT, 2, OFF(28,42), NUM(28,42) } }, /* 28 */ -+ { "ca", { FC_REF_CONSTANT, 2, OFF(29,44), NUM(29,44) } }, /* 29 */ -+ { "ce", { FC_REF_CONSTANT, 1, OFF(30,14), NUM(30,14) } }, /* 30 */ -+ { "ch", { FC_REF_CONSTANT, 1, OFF(31,46), NUM(31,46) } }, /* 31 */ -+ { "chm", { FC_REF_CONSTANT, 1, OFF(32,47), NUM(32,47) } }, /* 32 */ -+ { "chr", { FC_REF_CONSTANT, 1, OFF(33,48), NUM(33,48) } }, /* 33 */ -+ { "co", { FC_REF_CONSTANT, 2, OFF(34,49), NUM(34,49) } }, /* 34 */ -+ { "crh", { FC_REF_CONSTANT, 2, OFF(35,51), NUM(35,51) } }, /* 35 */ -+ { "cs", { FC_REF_CONSTANT, 2, OFF(36,53), NUM(36,53) } }, /* 36 */ -+ { "csb", { FC_REF_CONSTANT, 2, OFF(37,55), NUM(37,55) } }, /* 37 */ -+ { "cu", { FC_REF_CONSTANT, 1, OFF(38,57), NUM(38,57) } }, /* 38 */ -+ { "cv", { FC_REF_CONSTANT, 2, OFF(39,58), NUM(39,58) } }, /* 39 */ -+ { "cy", { FC_REF_CONSTANT, 3, OFF(40,60), NUM(40,60) } }, /* 40 */ -+ { "da", { FC_REF_CONSTANT, 1, OFF(41,63), NUM(41,63) } }, /* 41 */ -+ { "de", { FC_REF_CONSTANT, 1, OFF(42,64), NUM(42,64) } }, /* 42 */ -+ { "dv", { FC_REF_CONSTANT, 1, OFF(43,65), NUM(43,65) } }, /* 43 */ -+ { "dz", { FC_REF_CONSTANT, 1, OFF(44,37), NUM(44,37) } }, /* 44 */ -+ { "ee", { FC_REF_CONSTANT, 4, OFF(45,66), NUM(45,66) } }, /* 45 */ -+ { "el", { FC_REF_CONSTANT, 1, OFF(46,70), NUM(46,70) } }, /* 46 */ -+ { "en", { FC_REF_CONSTANT, 1, OFF(47,71), NUM(47,71) } }, /* 47 */ -+ { "eo", { FC_REF_CONSTANT, 2, OFF(48,72), NUM(48,72) } }, /* 48 */ -+ { "es", { FC_REF_CONSTANT, 1, OFF(49,11), NUM(49,11) } }, /* 49 */ -+ { "et", { FC_REF_CONSTANT, 2, OFF(50,74), NUM(50,74) } }, /* 50 */ -+ { "eu", { FC_REF_CONSTANT, 1, OFF(51,76), NUM(51,76) } }, /* 51 */ -+ { "fa", { FC_REF_CONSTANT, 1, OFF(52,19), NUM(52,19) } }, /* 52 */ -+ { "fat", { FC_REF_CONSTANT, 5, OFF(53,4), NUM(53,4) } }, /* 53 */ -+ { "ff", { FC_REF_CONSTANT, 3, OFF(54,77), NUM(54,77) } }, /* 54 */ -+ { "fi", { FC_REF_CONSTANT, 2, OFF(55,80), NUM(55,80) } }, /* 55 */ -+ { "fil", { FC_REF_CONSTANT, 1, OFF(56,82), NUM(56,82) } }, /* 56 */ -+ { "fj", { FC_REF_CONSTANT, 1, OFF(57,83), NUM(57,83) } }, /* 57 */ -+ { "fo", { FC_REF_CONSTANT, 1, OFF(58,84), NUM(58,84) } }, /* 58 */ -+ { "fr", { FC_REF_CONSTANT, 2, OFF(59,49), NUM(59,49) } }, /* 59 */ -+ { "fur", { FC_REF_CONSTANT, 1, OFF(60,85), NUM(60,85) } }, /* 60 */ -+ { "fy", { FC_REF_CONSTANT, 1, OFF(61,86), NUM(61,86) } }, /* 61 */ -+ { "ga", { FC_REF_CONSTANT, 3, OFF(62,87), NUM(62,87) } }, /* 62 */ -+ { "gd", { FC_REF_CONSTANT, 1, OFF(63,90), NUM(63,90) } }, /* 63 */ -+ { "gez", { FC_REF_CONSTANT, 2, OFF(64,91), NUM(64,91) } }, /* 64 */ -+ { "gl", { FC_REF_CONSTANT, 1, OFF(65,11), NUM(65,11) } }, /* 65 */ -+ { "gn", { FC_REF_CONSTANT, 3, OFF(66,93), NUM(66,93) } }, /* 66 */ -+ { "gu", { FC_REF_CONSTANT, 1, OFF(67,96), NUM(67,96) } }, /* 67 */ -+ { "gv", { FC_REF_CONSTANT, 1, OFF(68,97), NUM(68,97) } }, /* 68 */ -+ { "ha", { FC_REF_CONSTANT, 3, OFF(69,98), NUM(69,98) } }, /* 69 */ -+ { "haw", { FC_REF_CONSTANT, 3, OFF(70,101), NUM(70,101) } }, /* 70 */ -+ { "he", { FC_REF_CONSTANT, 1, OFF(71,104), NUM(71,104) } }, /* 71 */ -+ { "hi", { FC_REF_CONSTANT, 1, OFF(72,28), NUM(72,28) } }, /* 72 */ -+ { "hne", { FC_REF_CONSTANT, 1, OFF(73,28), NUM(73,28) } }, /* 73 */ -+ { "ho", { FC_REF_CONSTANT, 1, OFF(74,83), NUM(74,83) } }, /* 74 */ -+ { "hr", { FC_REF_CONSTANT, 2, OFF(75,39), NUM(75,39) } }, /* 75 */ -+ { "hsb", { FC_REF_CONSTANT, 2, OFF(76,105), NUM(76,105) } }, /* 76 */ -+ { "ht", { FC_REF_CONSTANT, 1, OFF(77,107), NUM(77,107) } }, /* 77 */ -+ { "hu", { FC_REF_CONSTANT, 2, OFF(78,108), NUM(78,108) } }, /* 78 */ -+ { "hy", { FC_REF_CONSTANT, 1, OFF(79,110), NUM(79,110) } }, /* 79 */ -+ { "hz", { FC_REF_CONSTANT, 3, OFF(80,111), NUM(80,111) } }, /* 80 */ -+ { "ia", { FC_REF_CONSTANT, 1, OFF(81,83), NUM(81,83) } }, /* 81 */ -+ { "id", { FC_REF_CONSTANT, 1, OFF(82,114), NUM(82,114) } }, /* 82 */ -+ { "ie", { FC_REF_CONSTANT, 1, OFF(83,83), NUM(83,83) } }, /* 83 */ -+ { "ig", { FC_REF_CONSTANT, 2, OFF(84,115), NUM(84,115) } }, /* 84 */ -+ { "ii", { FC_REF_CONSTANT, 5, OFF(85,117), NUM(85,117) } }, /* 85 */ -+ { "ik", { FC_REF_CONSTANT, 1, OFF(86,122), NUM(86,122) } }, /* 86 */ -+ { "io", { FC_REF_CONSTANT, 1, OFF(87,83), NUM(87,83) } }, /* 87 */ -+ { "is", { FC_REF_CONSTANT, 1, OFF(88,123), NUM(88,123) } }, /* 88 */ -+ { "it", { FC_REF_CONSTANT, 1, OFF(89,124), NUM(89,124) } }, /* 89 */ -+ { "iu", { FC_REF_CONSTANT, 3, OFF(90,125), NUM(90,125) } }, /* 90 */ -+ { "ja", { FC_REF_CONSTANT, 83, OFF(91,128), NUM(91,128) } }, /* 91 */ -+ { "jv", { FC_REF_CONSTANT, 1, OFF(92,211), NUM(92,211) } }, /* 92 */ -+ { "ka", { FC_REF_CONSTANT, 1, OFF(93,212), NUM(93,212) } }, /* 93 */ -+ { "kaa", { FC_REF_CONSTANT, 1, OFF(94,213), NUM(94,213) } }, /* 94 */ -+ { "kab", { FC_REF_CONSTANT, 4, OFF(95,22), NUM(95,22) } }, /* 95 */ -+ { "ki", { FC_REF_CONSTANT, 2, OFF(96,214), NUM(96,214) } }, /* 96 */ -+ { "kj", { FC_REF_CONSTANT, 1, OFF(97,83), NUM(97,83) } }, /* 97 */ -+ { "kk", { FC_REF_CONSTANT, 1, OFF(98,216), NUM(98,216) } }, /* 98 */ -+ { "kl", { FC_REF_CONSTANT, 2, OFF(99,217), NUM(99,217) } }, /* 99 */ -+ { "km", { FC_REF_CONSTANT, 1, OFF(100,219), NUM(100,219) } }, /* 100 */ -+ { "kn", { FC_REF_CONSTANT, 1, OFF(101,220), NUM(101,220) } }, /* 101 */ -+ { "ko", { FC_REF_CONSTANT, 45, OFF(102,221), NUM(102,221) } }, /* 102 */ -+ { "kok", { FC_REF_CONSTANT, 1, OFF(103,28), NUM(103,28) } }, /* 103 */ -+ { "kr", { FC_REF_CONSTANT, 3, OFF(104,266), NUM(104,266) } }, /* 104 */ -+ { "ks", { FC_REF_CONSTANT, 1, OFF(105,269), NUM(105,269) } }, /* 105 */ -+ { "ku-am", { FC_REF_CONSTANT, 2, OFF(106,270), NUM(106,270) } }, /* 106 */ -+ { "ku-iq", { FC_REF_CONSTANT, 1, OFF(107,272), NUM(107,272) } }, /* 107 */ -+ { "ku-ir", { FC_REF_CONSTANT, 1, OFF(108,272), NUM(108,272) } }, /* 108 */ -+ { "ku-tr", { FC_REF_CONSTANT, 2, OFF(109,273), NUM(109,273) } }, /* 109 */ -+ { "kum", { FC_REF_CONSTANT, 1, OFF(110,275), NUM(110,275) } }, /* 110 */ -+ { "kv", { FC_REF_CONSTANT, 1, OFF(111,276), NUM(111,276) } }, /* 111 */ -+ { "kw", { FC_REF_CONSTANT, 3, OFF(112,277), NUM(112,277) } }, /* 112 */ -+ { "kwm", { FC_REF_CONSTANT, 1, OFF(113,83), NUM(113,83) } }, /* 113 */ -+ { "ky", { FC_REF_CONSTANT, 1, OFF(114,280), NUM(114,280) } }, /* 114 */ -+ { "la", { FC_REF_CONSTANT, 2, OFF(115,281), NUM(115,281) } }, /* 115 */ -+ { "lah", { FC_REF_CONSTANT, 1, OFF(116,269), NUM(116,269) } }, /* 116 */ -+ { "lb", { FC_REF_CONSTANT, 1, OFF(117,283), NUM(117,283) } }, /* 117 */ -+ { "lez", { FC_REF_CONSTANT, 1, OFF(118,14), NUM(118,14) } }, /* 118 */ -+ { "lg", { FC_REF_CONSTANT, 2, OFF(119,284), NUM(119,284) } }, /* 119 */ -+ { "li", { FC_REF_CONSTANT, 1, OFF(120,286), NUM(120,286) } }, /* 120 */ -+ { "ln", { FC_REF_CONSTANT, 4, OFF(121,287), NUM(121,287) } }, /* 121 */ -+ { "lo", { FC_REF_CONSTANT, 1, OFF(122,291), NUM(122,291) } }, /* 122 */ -+ { "lt", { FC_REF_CONSTANT, 2, OFF(123,292), NUM(123,292) } }, /* 123 */ -+ { "lv", { FC_REF_CONSTANT, 2, OFF(124,294), NUM(124,294) } }, /* 124 */ -+ { "mai", { FC_REF_CONSTANT, 1, OFF(125,28), NUM(125,28) } }, /* 125 */ -+ { "mg", { FC_REF_CONSTANT, 1, OFF(126,296), NUM(126,296) } }, /* 126 */ -+ { "mh", { FC_REF_CONSTANT, 2, OFF(127,297), NUM(127,297) } }, /* 127 */ -+ { "mi", { FC_REF_CONSTANT, 3, OFF(128,299), NUM(128,299) } }, /* 128 */ -+ { "mk", { FC_REF_CONSTANT, 1, OFF(129,302), NUM(129,302) } }, /* 129 */ -+ { "ml", { FC_REF_CONSTANT, 1, OFF(130,303), NUM(130,303) } }, /* 130 */ -+ { "mn-cn", { FC_REF_CONSTANT, 1, OFF(131,304), NUM(131,304) } }, /* 131 */ -+ { "mn-mn", { FC_REF_CONSTANT, 1, OFF(132,305), NUM(132,305) } }, /* 132 */ -+ { "mo", { FC_REF_CONSTANT, 4, OFF(133,306), NUM(133,306) } }, /* 133 */ -+ { "mr", { FC_REF_CONSTANT, 1, OFF(134,28), NUM(134,28) } }, /* 134 */ -+ { "ms", { FC_REF_CONSTANT, 1, OFF(135,83), NUM(135,83) } }, /* 135 */ -+ { "mt", { FC_REF_CONSTANT, 2, OFF(136,310), NUM(136,310) } }, /* 136 */ -+ { "my", { FC_REF_CONSTANT, 1, OFF(137,312), NUM(137,312) } }, /* 137 */ -+ { "na", { FC_REF_CONSTANT, 2, OFF(138,313), NUM(138,313) } }, /* 138 */ -+ { "nb", { FC_REF_CONSTANT, 1, OFF(139,315), NUM(139,315) } }, /* 139 */ -+ { "nds", { FC_REF_CONSTANT, 1, OFF(140,64), NUM(140,64) } }, /* 140 */ -+ { "ne", { FC_REF_CONSTANT, 1, OFF(141,28), NUM(141,28) } }, /* 141 */ -+ { "ng", { FC_REF_CONSTANT, 1, OFF(142,83), NUM(142,83) } }, /* 142 */ -+ { "nl", { FC_REF_CONSTANT, 1, OFF(143,316), NUM(143,316) } }, /* 143 */ -+ { "nn", { FC_REF_CONSTANT, 1, OFF(144,317), NUM(144,317) } }, /* 144 */ -+ { "no", { FC_REF_CONSTANT, 1, OFF(145,315), NUM(145,315) } }, /* 145 */ -+ { "nr", { FC_REF_CONSTANT, 1, OFF(146,83), NUM(146,83) } }, /* 146 */ -+ { "nso", { FC_REF_CONSTANT, 2, OFF(147,318), NUM(147,318) } }, /* 147 */ -+ { "nv", { FC_REF_CONSTANT, 4, OFF(148,320), NUM(148,320) } }, /* 148 */ -+ { "ny", { FC_REF_CONSTANT, 2, OFF(149,324), NUM(149,324) } }, /* 149 */ -+ { "oc", { FC_REF_CONSTANT, 1, OFF(150,326), NUM(150,326) } }, /* 150 */ -+ { "om", { FC_REF_CONSTANT, 1, OFF(151,83), NUM(151,83) } }, /* 151 */ -+ { "or", { FC_REF_CONSTANT, 1, OFF(152,327), NUM(152,327) } }, /* 152 */ -+ { "os", { FC_REF_CONSTANT, 1, OFF(153,275), NUM(153,275) } }, /* 153 */ -+ { "ota", { FC_REF_CONSTANT, 1, OFF(154,328), NUM(154,328) } }, /* 154 */ -+ { "pa", { FC_REF_CONSTANT, 1, OFF(155,329), NUM(155,329) } }, /* 155 */ -+ { "pa-pk", { FC_REF_CONSTANT, 1, OFF(156,269), NUM(156,269) } }, /* 156 */ -+ { "pap-an", { FC_REF_CONSTANT, 1, OFF(157,330), NUM(157,330) } }, /* 157 */ -+ { "pap-aw", { FC_REF_CONSTANT, 1, OFF(158,331), NUM(158,331) } }, /* 158 */ -+ { "pl", { FC_REF_CONSTANT, 2, OFF(159,332), NUM(159,332) } }, /* 159 */ -+ { "ps-af", { FC_REF_CONSTANT, 1, OFF(160,334), NUM(160,334) } }, /* 160 */ -+ { "ps-pk", { FC_REF_CONSTANT, 1, OFF(161,335), NUM(161,335) } }, /* 161 */ -+ { "pt", { FC_REF_CONSTANT, 1, OFF(162,336), NUM(162,336) } }, /* 162 */ -+ { "qu", { FC_REF_CONSTANT, 2, OFF(163,337), NUM(163,337) } }, /* 163 */ -+ { "rm", { FC_REF_CONSTANT, 1, OFF(164,339), NUM(164,339) } }, /* 164 */ -+ { "rn", { FC_REF_CONSTANT, 1, OFF(165,83), NUM(165,83) } }, /* 165 */ -+ { "ro", { FC_REF_CONSTANT, 3, OFF(166,340), NUM(166,340) } }, /* 166 */ -+ { "ru", { FC_REF_CONSTANT, 1, OFF(167,275), NUM(167,275) } }, /* 167 */ -+ { "rw", { FC_REF_CONSTANT, 1, OFF(168,83), NUM(168,83) } }, /* 168 */ -+ { "sa", { FC_REF_CONSTANT, 1, OFF(169,28), NUM(169,28) } }, /* 169 */ -+ { "sah", { FC_REF_CONSTANT, 1, OFF(170,343), NUM(170,343) } }, /* 170 */ -+ { "sc", { FC_REF_CONSTANT, 1, OFF(171,344), NUM(171,344) } }, /* 171 */ -+ { "sco", { FC_REF_CONSTANT, 3, OFF(172,345), NUM(172,345) } }, /* 172 */ -+ { "sd", { FC_REF_CONSTANT, 1, OFF(173,348), NUM(173,348) } }, /* 173 */ -+ { "se", { FC_REF_CONSTANT, 2, OFF(174,349), NUM(174,349) } }, /* 174 */ -+ { "sel", { FC_REF_CONSTANT, 1, OFF(175,275), NUM(175,275) } }, /* 175 */ -+ { "sg", { FC_REF_CONSTANT, 1, OFF(176,351), NUM(176,351) } }, /* 176 */ -+ { "sh", { FC_REF_CONSTANT, 3, OFF(177,352), NUM(177,352) } }, /* 177 */ -+ { "shs", { FC_REF_CONSTANT, 2, OFF(178,355), NUM(178,355) } }, /* 178 */ -+ { "si", { FC_REF_CONSTANT, 1, OFF(179,357), NUM(179,357) } }, /* 179 */ -+ { "sid", { FC_REF_CONSTANT, 2, OFF(180,358), NUM(180,358) } }, /* 180 */ -+ { "sk", { FC_REF_CONSTANT, 2, OFF(181,360), NUM(181,360) } }, /* 181 */ -+ { "sl", { FC_REF_CONSTANT, 2, OFF(182,39), NUM(182,39) } }, /* 182 */ -+ { "sm", { FC_REF_CONSTANT, 2, OFF(183,362), NUM(183,362) } }, /* 183 */ -+ { "sma", { FC_REF_CONSTANT, 1, OFF(184,364), NUM(184,364) } }, /* 184 */ -+ { "smj", { FC_REF_CONSTANT, 1, OFF(185,365), NUM(185,365) } }, /* 185 */ -+ { "smn", { FC_REF_CONSTANT, 2, OFF(186,366), NUM(186,366) } }, /* 186 */ -+ { "sms", { FC_REF_CONSTANT, 3, OFF(187,368), NUM(187,368) } }, /* 187 */ -+ { "sn", { FC_REF_CONSTANT, 1, OFF(188,83), NUM(188,83) } }, /* 188 */ -+ { "so", { FC_REF_CONSTANT, 1, OFF(189,83), NUM(189,83) } }, /* 189 */ -+ { "sq", { FC_REF_CONSTANT, 1, OFF(190,371), NUM(190,371) } }, /* 190 */ -+ { "sr", { FC_REF_CONSTANT, 1, OFF(191,372), NUM(191,372) } }, /* 191 */ -+ { "ss", { FC_REF_CONSTANT, 1, OFF(192,83), NUM(192,83) } }, /* 192 */ -+ { "st", { FC_REF_CONSTANT, 1, OFF(193,83), NUM(193,83) } }, /* 193 */ -+ { "su", { FC_REF_CONSTANT, 1, OFF(194,114), NUM(194,114) } }, /* 194 */ -+ { "sv", { FC_REF_CONSTANT, 1, OFF(195,373), NUM(195,373) } }, /* 195 */ -+ { "sw", { FC_REF_CONSTANT, 1, OFF(196,83), NUM(196,83) } }, /* 196 */ -+ { "syr", { FC_REF_CONSTANT, 1, OFF(197,374), NUM(197,374) } }, /* 197 */ -+ { "ta", { FC_REF_CONSTANT, 1, OFF(198,375), NUM(198,375) } }, /* 198 */ -+ { "te", { FC_REF_CONSTANT, 1, OFF(199,376), NUM(199,376) } }, /* 199 */ -+ { "tg", { FC_REF_CONSTANT, 1, OFF(200,377), NUM(200,377) } }, /* 200 */ -+ { "th", { FC_REF_CONSTANT, 1, OFF(201,378), NUM(201,378) } }, /* 201 */ -+ { "ti-er", { FC_REF_CONSTANT, 2, OFF(202,42), NUM(202,42) } }, /* 202 */ -+ { "ti-et", { FC_REF_CONSTANT, 2, OFF(203,358), NUM(203,358) } }, /* 203 */ -+ { "tig", { FC_REF_CONSTANT, 2, OFF(204,379), NUM(204,379) } }, /* 204 */ -+ { "tk", { FC_REF_CONSTANT, 2, OFF(205,381), NUM(205,381) } }, /* 205 */ -+ { "tl", { FC_REF_CONSTANT, 1, OFF(206,82), NUM(206,82) } }, /* 206 */ -+ { "tn", { FC_REF_CONSTANT, 2, OFF(207,318), NUM(207,318) } }, /* 207 */ -+ { "to", { FC_REF_CONSTANT, 2, OFF(208,362), NUM(208,362) } }, /* 208 */ -+ { "tr", { FC_REF_CONSTANT, 2, OFF(209,383), NUM(209,383) } }, /* 209 */ -+ { "ts", { FC_REF_CONSTANT, 1, OFF(210,83), NUM(210,83) } }, /* 210 */ -+ { "tt", { FC_REF_CONSTANT, 1, OFF(211,385), NUM(211,385) } }, /* 211 */ -+ { "tw", { FC_REF_CONSTANT, 5, OFF(212,4), NUM(212,4) } }, /* 212 */ -+ { "ty", { FC_REF_CONSTANT, 3, OFF(213,386), NUM(213,386) } }, /* 213 */ -+ { "tyv", { FC_REF_CONSTANT, 1, OFF(214,280), NUM(214,280) } }, /* 214 */ -+ { "ug", { FC_REF_CONSTANT, 1, OFF(215,12), NUM(215,12) } }, /* 215 */ -+ { "uk", { FC_REF_CONSTANT, 1, OFF(216,389), NUM(216,389) } }, /* 216 */ -+ { "ur", { FC_REF_CONSTANT, 1, OFF(217,269), NUM(217,269) } }, /* 217 */ -+ { "uz", { FC_REF_CONSTANT, 1, OFF(218,83), NUM(218,83) } }, /* 218 */ -+ { "ve", { FC_REF_CONSTANT, 2, OFF(219,390), NUM(219,390) } }, /* 219 */ -+ { "vi", { FC_REF_CONSTANT, 4, OFF(220,392), NUM(220,392) } }, /* 220 */ -+ { "vo", { FC_REF_CONSTANT, 1, OFF(221,396), NUM(221,396) } }, /* 221 */ -+ { "vot", { FC_REF_CONSTANT, 2, OFF(222,397), NUM(222,397) } }, /* 222 */ -+ { "wa", { FC_REF_CONSTANT, 1, OFF(223,399), NUM(223,399) } }, /* 223 */ -+ { "wal", { FC_REF_CONSTANT, 2, OFF(224,358), NUM(224,358) } }, /* 224 */ -+ { "wen", { FC_REF_CONSTANT, 2, OFF(225,400), NUM(225,400) } }, /* 225 */ -+ { "wo", { FC_REF_CONSTANT, 2, OFF(226,402), NUM(226,402) } }, /* 226 */ -+ { "xh", { FC_REF_CONSTANT, 1, OFF(227,83), NUM(227,83) } }, /* 227 */ -+ { "yap", { FC_REF_CONSTANT, 1, OFF(228,404), NUM(228,404) } }, /* 228 */ -+ { "yi", { FC_REF_CONSTANT, 1, OFF(229,104), NUM(229,104) } }, /* 229 */ -+ { "yo", { FC_REF_CONSTANT, 4, OFF(230,405), NUM(230,405) } }, /* 230 */ -+ { "za", { FC_REF_CONSTANT, 1, OFF(231,83), NUM(231,83) } }, /* 231 */ -+ { "zh-cn", { FC_REF_CONSTANT, 82, OFF(232,409), NUM(232,409) } }, /* 232 */ -+ { "zh-hk", { FC_REF_CONSTANT, 83, OFF(233,491), NUM(233,491) } }, /* 233 */ -+ { "zh-mo", { FC_REF_CONSTANT, 83, OFF(234,491), NUM(234,491) } }, /* 234 */ -+ { "zh-sg", { FC_REF_CONSTANT, 82, OFF(235,409), NUM(235,409) } }, /* 235 */ -+ { "zh-tw", { FC_REF_CONSTANT, 83, OFF(236,574), NUM(236,574) } }, /* 236 */ -+ { "zu", { FC_REF_CONSTANT, 1, OFF(237,83), NUM(237,83) } }, /* 237 */ -+}, -+{ -+ { { /* 0 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x08104404, 0x08104404, -+ } }, -+ { { /* 1 */ -+ 0xffff8002, 0xffffffff, 0x8002ffff, 0x00000000, -+ 0xc0000000, 0xf0fc33c0, 0x03000000, 0x00000003, -+ } }, -+ { { /* 2 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x0810cf00, 0x0810cf00, -+ } }, -+ { { /* 3 */ -+ 0x00000000, 0x00000000, 0x00000200, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 4 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00220008, 0x00220008, -+ } }, -+ { { /* 5 */ -+ 0x00000000, 0x00000300, 0x00000000, 0x00000300, -+ 0x00010040, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 6 */ -+ 0x00000000, 0x00000000, 0x08100000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 7 */ -+ 0x00000048, 0x00000200, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 8 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0x30000000, 0x00000000, 0x03000000, -+ } }, -+ { { /* 9 */ -+ 0xff7fff7f, 0xff01ff7f, 0x00003d7f, 0xffff7fff, -+ 0xffff3d7f, 0x003d7fff, 0xff7f7f00, 0x00ff7fff, -+ } }, -+ { { /* 10 */ -+ 0x003d7fff, 0xffffffff, 0x007fff7f, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 11 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x140a2202, 0x140a2202, -+ } }, -+ { { /* 12 */ -+ 0x00000000, 0x07fffffe, 0x000007fe, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 13 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0xfff99fee, 0xd3c4fdff, 0xb000399f, 0x00030000, -+ } }, -+ { { /* 14 */ -+ 0xffff0042, 0xffffffff, 0x0002ffff, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 15 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x10028010, 0x10028010, -+ } }, -+ { { /* 16 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x10400080, 0x10400080, -+ } }, -+ { { /* 17 */ -+ 0xc0000000, 0x00030000, 0xc0000000, 0x00000000, -+ 0x00008000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 18 */ -+ 0x00000000, 0x00000000, 0x02000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 19 */ -+ 0x00000000, 0x07ffffde, 0x001009f6, 0x40000000, -+ 0x01000040, 0x00008200, 0x00001000, 0x00000000, -+ } }, -+ { { /* 20 */ -+ 0xffff0000, 0xffffffff, 0x0000ffff, 0x00000000, -+ 0x030c0000, 0x0c00cc0f, 0x03000000, 0x00000300, -+ } }, -+ { { /* 21 */ -+ 0xffff4040, 0xffffffff, 0x4040ffff, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 22 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 23 */ -+ 0x00003000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00110000, 0x00000000, 0x00000000, 0x000000c0, -+ } }, -+ { { /* 24 */ -+ 0x00000000, 0x00000000, 0x08000000, 0x00000008, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 25 */ -+ 0x00003000, 0x00000030, 0x00000000, 0x0000300c, -+ 0x000c0000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 26 */ -+ 0x00000000, 0x3a8b0000, 0x9e78e6b9, 0x0000802e, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 27 */ -+ 0xffff0000, 0xffffd7ff, 0x0000d7ff, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 28 */ -+ 0xffffffe0, 0x83ffffff, 0x00003fff, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 29 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x10008200, 0x10008200, -+ } }, -+ { { /* 30 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x060c3303, 0x060c3303, -+ } }, -+ { { /* 31 */ -+ 0x00000003, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 32 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0x03000000, 0x00003000, 0x00000000, -+ } }, -+ { { /* 33 */ -+ 0x00000000, 0x00000000, 0x00000c00, 0x00000000, -+ 0x20010040, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 34 */ -+ 0x00000000, 0x00000000, 0x08100000, 0x00040000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 35 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0xfff99fee, 0xd3c5fdff, 0xb000399f, 0x00000000, -+ } }, -+ { { /* 36 */ -+ 0x00000000, 0x00000000, 0xfffffeff, 0x3d7e03ff, -+ 0xfeff0003, 0x03ffffff, 0x00000000, 0x00000000, -+ } }, -+ { { /* 37 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x12120404, 0x12120404, -+ } }, -+ { { /* 38 */ -+ 0x000330c0, 0x00000000, 0x00000000, 0x60000003, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 39 */ -+ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, -+ 0x00000000, 0x0c00c000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 40 */ -+ 0xff7fff7f, 0xff01ff00, 0x3d7f3d7f, 0xffff7fff, -+ 0xffff0000, 0x003d7fff, 0xff7f7f3d, 0x00ff7fff, -+ } }, -+ { { /* 41 */ -+ 0x003d7fff, 0xffffffff, 0x007fff00, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 42 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x140ca381, 0x140ca381, -+ } }, -+ { { /* 43 */ -+ 0x00000000, 0x80000000, 0x00000001, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 44 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x10020004, 0x10020004, -+ } }, -+ { { /* 45 */ -+ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, -+ 0x00000000, 0x00000030, 0x000c0000, 0x030300c0, -+ } }, -+ { { /* 46 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0xffffffff, 0xffffffff, 0x001fffff, -+ } }, -+ { { /* 47 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x1a10cfc5, 0x9a10cfc5, -+ } }, -+ { { /* 48 */ -+ 0x00000000, 0x00000000, 0x000c0000, 0x01000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 49 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x10420084, 0x10420084, -+ } }, -+ { { /* 50 */ -+ 0xc0000000, 0x00030000, 0xc0000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 51 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x24082202, 0x24082202, -+ } }, -+ { { /* 52 */ -+ 0x0c00f000, 0x00000000, 0x03000180, 0x6000c033, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 53 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x021c0a08, 0x021c0a08, -+ } }, -+ { { /* 54 */ -+ 0x00000030, 0x00000000, 0x0000001e, 0x18000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 55 */ -+ 0xfdffa966, 0xffffdfff, 0xa965dfff, 0x03ffffff, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 56 */ -+ 0x0000000c, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 57 */ -+ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, -+ 0x00000000, 0x00000c00, 0x00c00000, 0x000c0000, -+ } }, -+ { { /* 58 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x0010c604, 0x8010c604, -+ } }, -+ { { /* 59 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x01f00000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 60 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x0000003f, 0x00000000, 0x00000000, 0x000c0000, -+ } }, -+ { { /* 61 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x25082262, 0x25082262, -+ } }, -+ { { /* 62 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x90400010, 0x10400010, -+ } }, -+ { { /* 63 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0xffffffff, 0x0001ffff, 0x00000000, 0x00000000, -+ } }, -+ { { /* 64 */ -+ 0x0c000000, 0x00000000, 0x00000c00, 0x00000000, -+ 0x00170240, 0x00040000, 0x001fe000, 0x00000000, -+ } }, -+ { { /* 65 */ -+ 0x00000000, 0x00000000, 0x08500000, 0x00000008, -+ 0x00000800, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 66 */ -+ 0x00001003, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 67 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0xffffd740, 0xfffffffb, 0x00007fff, 0x00000000, -+ } }, -+ { { /* 68 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00528f81, 0x00528f81, -+ } }, -+ { { /* 69 */ -+ 0x30000300, 0x00300030, 0x30000000, 0x00003000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 70 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x10600010, 0x10600010, -+ } }, -+ { { /* 71 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x60000003, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 72 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x10020000, 0x10020000, -+ } }, -+ { { /* 73 */ -+ 0x00000000, 0x00000000, 0x00000c00, 0x00000000, -+ 0x20000402, 0x00180000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 74 */ -+ 0x00000000, 0x00000000, 0x00880000, 0x00040000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 75 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00400030, 0x00400030, -+ } }, -+ { { /* 76 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x0e1e7707, 0x0e1e7707, -+ } }, -+ { { /* 77 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x25092042, 0x25092042, -+ } }, -+ { { /* 78 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x02041107, 0x02041107, -+ } }, -+ { { /* 79 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x9c508e14, 0x1c508e14, -+ } }, -+ { { /* 80 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x04082202, 0x04082202, -+ } }, -+ { { /* 81 */ -+ 0x00000c00, 0x00000003, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 82 */ -+ 0xc0000c0c, 0x00000000, 0x00c00003, 0x00000c03, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 83 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x020c1383, 0x020c1383, -+ } }, -+ { { /* 84 */ -+ 0xff7fff7f, 0xff01ff7f, 0x00003d7f, 0x00ff00ff, -+ 0x00ff3d7f, 0x003d7fff, 0xff7f7f00, 0x00ff7f00, -+ } }, -+ { { /* 85 */ -+ 0x003d7f00, 0xffff01ff, 0x007fff7f, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 86 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x040a2202, 0x042a220a, -+ } }, -+ { { /* 87 */ -+ 0x00000000, 0x00000200, 0x00000000, 0x00000200, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 88 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0x20000000, 0x00000000, 0x02000000, -+ } }, -+ { { /* 89 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0xfffbafee, 0xf3edfdff, 0x00013bbf, 0x00000001, -+ } }, -+ { { /* 90 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00000080, 0x00000080, -+ } }, -+ { { /* 91 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x03000402, 0x00180000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 92 */ -+ 0x00000000, 0x00000000, 0x00880000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 93 */ -+ 0x000c0003, 0x00000c00, 0x00003000, 0x00000c00, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 94 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0x08000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 95 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0xffff0000, 0x000007ff, -+ } }, -+ { { /* 96 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00080000, 0x00080000, -+ } }, -+ { { /* 97 */ -+ 0x0c0030c0, 0x00000000, 0x0300001e, 0x66000003, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 98 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00040100, 0x00040100, -+ } }, -+ { { /* 99 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x14482202, 0x14482202, -+ } }, -+ { { /* 100 */ -+ 0x00000000, 0x00000000, 0x00030000, 0x00030000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 101 */ -+ 0x00000000, 0xfffe0000, 0x007fffff, 0xfffffffe, -+ 0x000000ff, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 102 */ -+ 0x00000000, 0x00008000, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 103 */ -+ 0x000c0000, 0x00000000, 0x00000c00, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 104 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00000200, 0x00000200, -+ } }, -+ { { /* 105 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00003c00, 0x00000030, -+ } }, -+ { { /* 106 */ -+ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -+ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -+ } }, -+ { { /* 107 */ -+ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -+ 0x00001fff, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 108 */ -+ 0xffff4002, 0xffffffff, 0x4002ffff, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 109 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x64092242, 0x64092242, -+ } }, -+ { { /* 110 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x060cb301, 0x060cb301, -+ } }, -+ { { /* 111 */ -+ 0x00000c7e, 0x031f8000, 0x0063f200, 0x000df840, -+ 0x00037e08, 0x08000dfa, 0x0df901bf, 0x5437e400, -+ } }, -+ { { /* 112 */ -+ 0x00000025, 0x40006fc0, 0x27f91be4, 0xdee00000, -+ 0x007ff83f, 0x00007f7f, 0x00000000, 0x00000000, -+ } }, -+ { { /* 113 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x007f8000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 114 */ -+ 0x000000e7, 0x00000000, 0xfffffffe, 0xffffffff, -+ 0x780fffff, 0xfffffffe, 0xffffffff, 0x787fffff, -+ } }, -+ { { /* 115 */ -+ 0x43f36f8b, 0x9b462442, 0xe3e0e82c, 0x400a0004, -+ 0xdb365f65, 0x04497977, 0xe3f0ecd7, 0x08c56038, -+ } }, -+ { { /* 116 */ -+ 0x3403e602, 0x35518000, 0x7eabe0c8, 0x98698200, -+ 0x2942a948, 0x8060e803, 0xad93441c, 0x4568c03a, -+ } }, -+ { { /* 117 */ -+ 0x8656aa60, 0x02403f7a, 0x14618388, 0x21741020, -+ 0x07022021, 0x40bc3000, 0x4462a624, 0x0a2060a8, -+ } }, -+ { { /* 118 */ -+ 0x85740217, 0x9c840402, 0x14157bfb, 0x11e27f24, -+ 0x02efb665, 0x20ff1f75, 0x28403a70, 0x676326c3, -+ } }, -+ { { /* 119 */ -+ 0x20924dd9, 0x0fc946b0, 0x4850bc98, 0xa03f8638, -+ 0x88162388, 0x52323e09, 0xe3a422aa, 0xc72c00dd, -+ } }, -+ { { /* 120 */ -+ 0x26e1a166, 0x8f0a840b, 0x559e27eb, 0x89bbc241, -+ 0x85400014, 0x08496361, 0x8ad07f0c, 0x05cfff3e, -+ } }, -+ { { /* 121 */ -+ 0xa803ff1a, 0x7b407a41, 0x80024745, 0x38eb0500, -+ 0x0005d851, 0x710c9934, 0x01000397, 0x24046366, -+ } }, -+ { { /* 122 */ -+ 0x005180d0, 0x430ac000, 0x30c89071, 0x58000008, -+ 0xf7000e99, 0x00415f80, 0x941000b0, 0x62800018, -+ } }, -+ { { /* 123 */ -+ 0x09d00240, 0x01568200, 0x08015004, 0x05101d10, -+ 0x001084c1, 0x10504025, 0x4d8a410f, 0xa60d4009, -+ } }, -+ { { /* 124 */ -+ 0x914cab19, 0x098121c0, 0x0003c485, 0x80000652, -+ 0x00080b04, 0x0009041d, 0x905c4849, 0x16900009, -+ } }, -+ { { /* 125 */ -+ 0x22200c65, 0x24338412, 0x47960c03, 0x42250a04, -+ 0x90880028, 0x4f084900, 0xd3aa14a2, 0x3e87d830, -+ } }, -+ { { /* 126 */ -+ 0x1f618604, 0x41867ea4, 0x05b3c390, 0x211857a5, -+ 0x2a48241e, 0x4a041128, 0x161b0a40, 0x88400d60, -+ } }, -+ { { /* 127 */ -+ 0x9502020a, 0x10608221, 0x04000243, 0x80001444, -+ 0x0c040000, 0x70000000, 0x00c11a06, 0x0c00024a, -+ } }, -+ { { /* 128 */ -+ 0x00401a00, 0x40451404, 0xbdb30029, 0x052b0a78, -+ 0xbfa0bba9, 0x8379407c, 0xe81d12fc, 0xc5694bf6, -+ } }, -+ { { /* 129 */ -+ 0x044aeff6, 0xff022115, 0x402bed63, 0x0242d033, -+ 0x00131000, 0x59ca1b02, 0x020000a0, 0x2c41a703, -+ } }, -+ { { /* 130 */ -+ 0x8ff24880, 0x00000204, 0x10055800, 0x00489200, -+ 0x20011894, 0x34805004, 0x684c3200, 0x68be49ea, -+ } }, -+ { { /* 131 */ -+ 0x2e42184c, 0x21c9a820, 0x80b050b9, 0xff7c001e, -+ 0x14e0849a, 0x01e028c1, 0xac49870e, 0xdddb130f, -+ } }, -+ { { /* 132 */ -+ 0x89fbbe1a, 0x51a2a2e0, 0x32ca5502, 0x928b3e46, -+ 0x438f1dbf, 0x32186703, 0x33c03028, 0xa9230811, -+ } }, -+ { { /* 133 */ -+ 0x3a65c000, 0x04028fe3, 0x86252c4e, 0x00a1bf3d, -+ 0x8cd43a1a, 0x317c06c9, 0x950a00e0, 0x0edb018b, -+ } }, -+ { { /* 134 */ -+ 0x8c20e34b, 0xf0101182, 0xa7287d94, 0x40fbc9ac, -+ 0x06534484, 0x44445a90, 0x00013fc8, 0xf5d40048, -+ } }, -+ { { /* 135 */ -+ 0xec577701, 0x891dc442, 0x49286b83, 0xd2424109, -+ 0x59fe061d, 0x3a221800, 0x3b9fb7e4, 0xc0eaf003, -+ } }, -+ { { /* 136 */ -+ 0x82021386, 0xe4008980, 0x10a1b200, 0x0cc44b80, -+ 0x8944d309, 0x48341faf, 0x0c458259, 0x0450420a, -+ } }, -+ { { /* 137 */ -+ 0x10c8a040, 0x44503140, 0x01004004, 0x05408280, -+ 0x442c0108, 0x1a056a30, 0x051420a6, 0x645690cf, -+ } }, -+ { { /* 138 */ -+ 0x31000021, 0xcbf09c18, 0x63e2a120, 0x01b5104c, -+ 0x9a83538c, 0x3281b8b2, 0x0a84987a, 0x0c0233e7, -+ } }, -+ { { /* 139 */ -+ 0x9018d4cc, 0x9070a1a1, 0xe0048a1e, 0x0451c3d4, -+ 0x21c2439a, 0x53104844, 0x36400292, 0xf3bd0241, -+ } }, -+ { { /* 140 */ -+ 0xe8f0ab09, 0xa5d27dc0, 0xd24bc242, 0xd0afa43f, -+ 0x34a11aa0, 0x03d88247, 0x651bc452, 0xc83ad294, -+ } }, -+ { { /* 141 */ -+ 0x40c8001c, 0x33140e06, 0xb21b614f, 0xc0d00088, -+ 0xa898a02a, 0x166ba1c5, 0x85b42e50, 0x0604c08b, -+ } }, -+ { { /* 142 */ -+ 0x1e04f933, 0xa251056e, 0x76380400, 0x73b8ec07, -+ 0x18324406, 0xc8164081, 0x63097c8a, 0xaa042980, -+ } }, -+ { { /* 143 */ -+ 0xca9c1c24, 0x27604e0e, 0x83000990, 0x81040046, -+ 0x10816011, 0x0908540d, 0xcc0a000e, 0x0c000500, -+ } }, -+ { { /* 144 */ -+ 0xa0440430, 0x6784008b, 0x8a195288, 0x8b18865e, -+ 0x41602e59, 0x9cbe8c10, 0x891c6861, 0x00089800, -+ } }, -+ { { /* 145 */ -+ 0x089a8100, 0x41900018, 0xe4a14007, 0x640d0505, -+ 0x0e4d310e, 0xff0a4806, 0x2aa81632, 0x000b852e, -+ } }, -+ { { /* 146 */ -+ 0xca841800, 0x696c0e20, 0x16000032, 0x03905658, -+ 0x1a285120, 0x11248000, 0x432618e1, 0x0eaa5d52, -+ } }, -+ { { /* 147 */ -+ 0xae280fa0, 0x4500fa7b, 0x89406408, 0xc044c880, -+ 0xb1419005, 0x24c48424, 0x603a1a34, 0xc1949000, -+ } }, -+ { { /* 148 */ -+ 0x003a8246, 0xc106180d, 0x99100022, 0x1511e050, -+ 0x00824057, 0x020a041a, 0x8930004f, 0x444ad813, -+ } }, -+ { { /* 149 */ -+ 0xed228a02, 0x400510c0, 0x01021000, 0x31018808, -+ 0x02044600, 0x0708f000, 0xa2008900, 0x22020000, -+ } }, -+ { { /* 150 */ -+ 0x16100200, 0x10400042, 0x02605200, 0x200052f4, -+ 0x80308510, 0x42021100, 0x80b54308, 0x9a2070e1, -+ } }, -+ { { /* 151 */ -+ 0x08012040, 0xfc653500, 0xab0419c1, 0x62140286, -+ 0x00440087, 0x02449085, 0x0a85405c, 0x33803207, -+ } }, -+ { { /* 152 */ -+ 0xb8c00400, 0xc0d0ce20, 0x0080c030, 0x0d250508, -+ 0x00400a90, 0x080c0200, 0x40006505, 0x41026421, -+ } }, -+ { { /* 153 */ -+ 0x00000268, 0x847c0024, 0xde200002, 0x40498619, -+ 0x40000808, 0x20010084, 0x10108400, 0x01c742cd, -+ } }, -+ { { /* 154 */ -+ 0xd52a7038, 0x1d8f1968, 0x3e12be50, 0x81d92ef5, -+ 0x2412cec4, 0x732e0828, 0x4b3424ac, 0xd41d020c, -+ } }, -+ { { /* 155 */ -+ 0x80002a02, 0x08110097, 0x114411c4, 0x7d451786, -+ 0x064949d9, 0x87914000, 0xd8c4254c, 0x491444ba, -+ } }, -+ { { /* 156 */ -+ 0xc8001b92, 0x15800271, 0x0c000081, 0xc200096a, -+ 0x40024800, 0xba493021, 0x1c802080, 0x1008e2ac, -+ } }, -+ { { /* 157 */ -+ 0x00341004, 0x841400e1, 0x20000020, 0x10149800, -+ 0x04aa70c2, 0x54208688, 0x04130c62, 0x20109180, -+ } }, -+ { { /* 158 */ -+ 0x02064082, 0x54001c40, 0xe4e90383, 0x84802125, -+ 0x2000e433, 0xe60944c0, 0x81260a03, 0x080112da, -+ } }, -+ { { /* 159 */ -+ 0x97906901, 0xf8864001, 0x0081e24d, 0xa6510a0e, -+ 0x81ec011a, 0x8441c600, 0xb62cadb8, 0x8741a46f, -+ } }, -+ { { /* 160 */ -+ 0x4b028d54, 0x02681161, 0x2057bb60, 0x043350a0, -+ 0xb7b4a8c0, 0x01122402, 0x20009ad3, 0x00c82271, -+ } }, -+ { { /* 161 */ -+ 0x809e2081, 0xe1800c8a, 0x8151b009, 0x40281031, -+ 0x89a52a0e, 0x620e69b6, 0xd1444425, 0x4d548085, -+ } }, -+ { { /* 162 */ -+ 0x1fb12c75, 0x862dd807, 0x4841d87c, 0x226e414e, -+ 0x9e088200, 0xed37f80c, 0x75268c80, 0x08149313, -+ } }, -+ { { /* 163 */ -+ 0xc8040e32, 0x6ea6484e, 0x66702c4a, 0xba0126c0, -+ 0x185dd30c, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 164 */ -+ 0x00000000, 0x05400000, 0x81337020, 0x03a54f81, -+ 0x641055ec, 0x2344c318, 0x00341462, 0x1a090a43, -+ } }, -+ { { /* 165 */ -+ 0x13a5187b, 0xa8480102, 0xc5440440, 0xe2dd8106, -+ 0x2d481af0, 0x0416b626, 0x6e405058, 0x31128032, -+ } }, -+ { { /* 166 */ -+ 0x0c0007e4, 0x420a8208, 0x803b4840, 0x87134860, -+ 0x3428850d, 0xe5290319, 0x870a2345, 0x5c1825a9, -+ } }, -+ { { /* 167 */ -+ 0xd9c577a6, 0x03e85e00, 0xa7000081, 0x41c6cd54, -+ 0xa2042800, 0x2b0ab860, 0xda9e0020, 0x0e1a08ea, -+ } }, -+ { { /* 168 */ -+ 0x11c0427c, 0x03768908, 0x01058621, 0x18a80000, -+ 0xc44846a0, 0x20220d05, 0x91485422, 0x28978a01, -+ } }, -+ { { /* 169 */ -+ 0x00087898, 0x31221605, 0x08804240, 0x06a2fa4e, -+ 0x92110814, 0x9b042002, 0x06432e52, 0x90105000, -+ } }, -+ { { /* 170 */ -+ 0x85ba0041, 0x20203042, 0x05a04f0b, 0x40802708, -+ 0x1a930591, 0x0600df50, 0x3021a202, 0x4e800630, -+ } }, -+ { { /* 171 */ -+ 0x04c80cc4, 0x8001a004, 0xd4316000, 0x0a020880, -+ 0x00281c00, 0x00418e18, 0xca106ad0, 0x4b00f210, -+ } }, -+ { { /* 172 */ -+ 0x1506274d, 0x88900220, 0x82a85a00, 0x81504549, -+ 0x80002004, 0x2c088804, 0x000508d1, 0x4ac48001, -+ } }, -+ { { /* 173 */ -+ 0x0062e020, 0x0a42008e, 0x6a8c3055, 0xe0a5090e, -+ 0x42c42906, 0x80b34814, 0xb330803e, 0x731c0102, -+ } }, -+ { { /* 174 */ -+ 0x600d1494, 0x09400c20, 0xc040301a, 0xc094a451, -+ 0x05c88dca, 0xa40c96c2, 0x34040001, 0x011000c8, -+ } }, -+ { { /* 175 */ -+ 0xa9c9550d, 0x1c5a2428, 0x48370142, 0x100f7a4d, -+ 0x452a32b4, 0x9205317b, 0x5c44b894, 0x458a68d7, -+ } }, -+ { { /* 176 */ -+ 0x2ed15097, 0x42081943, 0x9d40d202, 0x20979840, -+ 0x064d5409, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 177 */ -+ 0x00000000, 0x84800000, 0x04215542, 0x17001c06, -+ 0x61107624, 0xb9ddff87, 0x5c0a659f, 0x3c00245d, -+ } }, -+ { { /* 178 */ -+ 0x0059adb0, 0x00000000, 0x00000000, 0x009b28d0, -+ 0x02000422, 0x44080108, 0xac409804, 0x90288d0a, -+ } }, -+ { { /* 179 */ -+ 0xe0018700, 0x00310400, 0x82211794, 0x10540019, -+ 0x021a2cb2, 0x40039c02, 0x88043d60, 0x7900080c, -+ } }, -+ { { /* 180 */ -+ 0xba3c1628, 0xcb088640, 0x90807274, 0x0000001e, -+ 0xd8000000, 0x9c87e188, 0x04124034, 0x2791ae64, -+ } }, -+ { { /* 181 */ -+ 0xe6fbe86b, 0x5366408f, 0x537feea6, 0xb5e4e32b, -+ 0x0002869f, 0x01228548, 0x08004402, 0x20a02116, -+ } }, -+ { { /* 182 */ -+ 0x02040004, 0x00052000, 0x01547e00, 0x01ac162c, -+ 0x10852a84, 0x05308c14, 0xb943fbc3, 0x906000ca, -+ } }, -+ { { /* 183 */ -+ 0x40326000, 0x80901200, 0x4c810b30, 0x40020054, -+ 0x1d6a0029, 0x02802000, 0x00048000, 0x150c2610, -+ } }, -+ { { /* 184 */ -+ 0x07018040, 0x0c24d94d, 0x18502810, 0x50205001, -+ 0x04d01000, 0x02017080, 0x21c30108, 0x00000132, -+ } }, -+ { { /* 185 */ -+ 0x07190088, 0x05600802, 0x4c0e0012, 0xf0a10405, -+ 0x00000002, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 186 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00800000, -+ 0x035a8e8d, 0x5a0421bd, 0x11703488, 0x00000026, -+ } }, -+ { { /* 187 */ -+ 0x10000000, 0x8804c502, 0xf801b815, 0x25ed147c, -+ 0x1bb0ed60, 0x1bd70589, 0x1a627af3, 0x0ac50d0c, -+ } }, -+ { { /* 188 */ -+ 0x524ae5d1, 0x63050490, 0x52440354, 0x16122b57, -+ 0x1101a872, 0x00182949, 0x10080948, 0x886c6000, -+ } }, -+ { { /* 189 */ -+ 0x058f916e, 0x39903012, 0x4930f840, 0x001b8880, -+ 0x00000000, 0x00428500, 0x98000058, 0x7014ea04, -+ } }, -+ { { /* 190 */ -+ 0x611d1628, 0x60005113, 0x00a71a24, 0x00000000, -+ 0x03c00000, 0x10187120, 0xa9270172, 0x89066004, -+ } }, -+ { { /* 191 */ -+ 0x020cc022, 0x40810900, 0x8ca0202d, 0x00000e34, -+ 0x00000000, 0x11012100, 0xc11a8011, 0x0892ec4c, -+ } }, -+ { { /* 192 */ -+ 0x85000040, 0x1806c7ac, 0x0512e03e, 0x00108000, -+ 0x80ce4008, 0x02106d01, 0x08568641, 0x0027011e, -+ } }, -+ { { /* 193 */ -+ 0x083d3750, 0x4e05e032, 0x048401c0, 0x01400081, -+ 0x00000000, 0x00000000, 0x00000000, 0x00591aa0, -+ } }, -+ { { /* 194 */ -+ 0x882443c8, 0xc8001d48, 0x72030152, 0x04049013, -+ 0x04008280, 0x0d148a10, 0x02088056, 0x2704a040, -+ } }, -+ { { /* 195 */ -+ 0x4c000000, 0x00000000, 0x00000000, 0xa3200000, -+ 0xa0ae1902, 0xdf002660, 0x7b15f010, 0x3ad08121, -+ } }, -+ { { /* 196 */ -+ 0x00284180, 0x48001003, 0x8014cc00, 0x00c414cf, -+ 0x30202000, 0x00000001, 0x00000000, 0x00000000, -+ } }, -+ { { /* 197 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00000300, 0x00000300, -+ } }, -+ { { /* 198 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0xffff0000, 0x0001ffff, -+ } }, -+ { { /* 199 */ -+ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, -+ 0x0c0c0000, 0x000cc00c, 0x03000000, 0x00000000, -+ } }, -+ { { /* 200 */ -+ 0x00000000, 0x00000300, 0x00000000, 0x00000300, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 201 */ -+ 0xffff0000, 0xffffffff, 0x0040ffff, 0x00000000, -+ 0x0c0c0000, 0x0c00000c, 0x03000000, 0x00000300, -+ } }, -+ { { /* 202 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x0d10646e, 0x0d10646e, -+ } }, -+ { { /* 203 */ -+ 0x00000000, 0x01000300, 0x00000000, 0x00000300, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 204 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x9fffffff, 0xffcffee7, 0x0000003f, 0x00000000, -+ } }, -+ { { /* 205 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0xfffddfec, 0xc3effdff, 0x40603ddf, 0x00000003, -+ } }, -+ { { /* 206 */ -+ 0x00000000, 0xfffe0000, 0xffffffff, 0xffffffff, -+ 0x00007fff, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 207 */ -+ 0x3eff0793, 0x1303b011, 0x11102801, 0x05930000, -+ 0xb0111e7b, 0x3b019703, 0x00a01112, 0x306b9593, -+ } }, -+ { { /* 208 */ -+ 0x1102b051, 0x11303201, 0x011102b0, 0xb879300a, -+ 0x30011306, 0x00800010, 0x100b0113, 0x93000011, -+ } }, -+ { { /* 209 */ -+ 0x00102b03, 0x05930000, 0xb051746b, 0x3b011323, -+ 0x00001030, 0x70000000, 0x1303b011, 0x11102900, -+ } }, -+ { { /* 210 */ -+ 0x00012180, 0xb0153000, 0x3001030e, 0x02000030, -+ 0x10230111, 0x13000000, 0x10106b81, 0x01130300, -+ } }, -+ { { /* 211 */ -+ 0x30111013, 0x00000100, 0x22b85530, 0x30000000, -+ 0x9702b011, 0x113afb07, 0x011303b0, 0x00000021, -+ } }, -+ { { /* 212 */ -+ 0x3b0d1b00, 0x03b01138, 0x11330113, 0x13000001, -+ 0x111c2b05, 0x00000100, 0xb0111000, 0x2a011300, -+ } }, -+ { { /* 213 */ -+ 0x02b01930, 0x10100001, 0x11000000, 0x10300301, -+ 0x07130230, 0x0011146b, 0x2b051300, 0x8fb8f974, -+ } }, -+ { { /* 214 */ -+ 0x103b0113, 0x00000000, 0xd9700000, 0x01134ab0, -+ 0x0011103b, 0x00001103, 0x2ab15930, 0x10000111, -+ } }, -+ { { /* 215 */ -+ 0x11010000, 0x00100b01, 0x01130000, 0x0000102b, -+ 0x20000101, 0x02a01110, 0x30210111, 0x0102b059, -+ } }, -+ { { /* 216 */ -+ 0x19300000, 0x011307b0, 0xb011383b, 0x00000003, -+ 0x00000000, 0x383b0d13, 0x0103b011, 0x00001000, -+ } }, -+ { { /* 217 */ -+ 0x01130000, 0x00101020, 0x00000100, 0x00000110, -+ 0x30000000, 0x00021811, 0x00100000, 0x01110000, -+ } }, -+ { { /* 218 */ -+ 0x00000023, 0x0b019300, 0x00301110, 0x302b0111, -+ 0x13c7b011, 0x01303b01, 0x00000280, 0xb0113000, -+ } }, -+ { { /* 219 */ -+ 0x2b011383, 0x03b01130, 0x300a0011, 0x1102b011, -+ 0x00002000, 0x01110100, 0xa011102b, 0x2b011302, -+ } }, -+ { { /* 220 */ -+ 0x01000010, 0x30000001, 0x13029011, 0x11302b01, -+ 0x000066b0, 0xb0113000, 0x6b07d302, 0x07b0113a, -+ } }, -+ { { /* 221 */ -+ 0x00200103, 0x13000000, 0x11386b05, 0x011303b0, -+ 0x000010b8, 0x2b051b00, 0x03000110, 0x10000000, -+ } }, -+ { { /* 222 */ -+ 0x1102a011, 0x79700a01, 0x0111a2b0, 0x0000100a, -+ 0x00011100, 0x00901110, 0x00090111, 0x93000000, -+ } }, -+ { { /* 223 */ -+ 0xf9f2bb05, 0x011322b0, 0x2001323b, 0x00000000, -+ 0x06b05930, 0x303b0193, 0x1123a011, 0x11700000, -+ } }, -+ { { /* 224 */ -+ 0x001102b0, 0x00001010, 0x03011301, 0x00000110, -+ 0x162b0793, 0x01010010, 0x11300000, 0x01110200, -+ } }, -+ { { /* 225 */ -+ 0xb0113029, 0x00000000, 0x0eb05130, 0x383b0513, -+ 0x0303b011, 0x00000100, 0x01930000, 0x00001039, -+ } }, -+ { { /* 226 */ -+ 0x3b000302, 0x00000000, 0x00230113, 0x00000000, -+ 0x00100000, 0x00010000, 0x90113020, 0x00000002, -+ } }, -+ { { /* 227 */ -+ 0x00000000, 0x10000000, 0x11020000, 0x00000301, -+ 0x01130000, 0xb079b02b, 0x3b011323, 0x02b01130, -+ } }, -+ { { /* 228 */ -+ 0xf0210111, 0x1343b0d9, 0x11303b01, 0x011103b0, -+ 0xb0517020, 0x20011322, 0x01901110, 0x300b0111, -+ } }, -+ { { /* 229 */ -+ 0x9302b011, 0x0016ab01, 0x01130100, 0xb0113021, -+ 0x29010302, 0x02b03130, 0x30000000, 0x1b42b819, -+ } }, -+ { { /* 230 */ -+ 0x11383301, 0x00000330, 0x00000020, 0x33051300, -+ 0x00001110, 0x00000000, 0x93000000, 0x01302305, -+ } }, -+ { { /* 231 */ -+ 0x00010100, 0x30111010, 0x00000100, 0x02301130, -+ 0x10100001, 0x11000000, 0x00000000, 0x85130200, -+ } }, -+ { { /* 232 */ -+ 0x10111003, 0x2b011300, 0x63b87730, 0x303b0113, -+ 0x11a2b091, 0x7b300201, 0x011357f0, 0xf0d1702b, -+ } }, -+ { { /* 233 */ -+ 0x1b0111e3, 0x0ab97130, 0x303b0113, 0x13029001, -+ 0x11302b01, 0x071302b0, 0x3011302b, 0x23011303, -+ } }, -+ { { /* 234 */ -+ 0x02b01130, 0x30ab0113, 0x11feb411, 0x71300901, -+ 0x05d347b8, 0xb011307b, 0x21015303, 0x00001110, -+ } }, -+ { { /* 235 */ -+ 0x306b0513, 0x1102b011, 0x00103301, 0x05130000, -+ 0xa01038eb, 0x30000102, 0x02b01110, 0x30200013, -+ } }, -+ { { /* 236 */ -+ 0x0102b071, 0x00101000, 0x01130000, 0x1011100b, -+ 0x2b011300, 0x00000000, 0x366b0593, 0x1303b095, -+ } }, -+ { { /* 237 */ -+ 0x01103b01, 0x00000200, 0xb0113000, 0x20000103, -+ 0x01000010, 0x30000000, 0x030ab011, 0x00101001, -+ } }, -+ { { /* 238 */ -+ 0x01110100, 0x00000003, 0x23011302, 0x03000010, -+ 0x10000000, 0x01000000, 0x00100000, 0x00000290, -+ } }, -+ { { /* 239 */ -+ 0x30113000, 0x7b015386, 0x03b01130, 0x00210151, -+ 0x13000000, 0x11303b01, 0x001102b0, 0x00011010, -+ } }, -+ { { /* 240 */ -+ 0x2b011302, 0x02001110, 0x10000000, 0x0102b011, -+ 0x11300100, 0x000102b0, 0x00011010, 0x2b011100, -+ } }, -+ { { /* 241 */ -+ 0x02101110, 0x002b0113, 0x93000000, 0x11302b03, -+ 0x011302b0, 0x0000303b, 0x00000002, 0x03b01930, -+ } }, -+ { { /* 242 */ -+ 0x102b0113, 0x0103b011, 0x11300000, 0x011302b0, -+ 0x00001021, 0x00010102, 0x00000010, 0x102b0113, -+ } }, -+ { { /* 243 */ -+ 0x01020011, 0x11302000, 0x011102b0, 0x30113001, -+ 0x00000002, 0x02b01130, 0x303b0313, 0x0103b011, -+ } }, -+ { { /* 244 */ -+ 0x00002000, 0x05130000, 0xb011303b, 0x10001102, -+ 0x00000110, 0x142b0113, 0x01000001, 0x01100000, -+ } }, -+ { { /* 245 */ -+ 0x00010280, 0xb0113000, 0x10000102, 0x00000010, -+ 0x10230113, 0x93021011, 0x11100b05, 0x01130030, -+ } }, -+ { { /* 246 */ -+ 0xb051702b, 0x3b011323, 0x00000030, 0x30000000, -+ 0x1303b011, 0x11102b01, 0x01010330, 0xb011300a, -+ } }, -+ { { /* 247 */ -+ 0x20000102, 0x00000000, 0x10000011, 0x9300a011, -+ 0x00102b05, 0x00000200, 0x90111000, 0x29011100, -+ } }, -+ { { /* 248 */ -+ 0x00b01110, 0x30000000, 0x1302b011, 0x11302b21, -+ 0x000103b0, 0x00000020, 0x2b051300, 0x02b01130, -+ } }, -+ { { /* 249 */ -+ 0x103b0113, 0x13002011, 0x11322b21, 0x00130280, -+ 0xa0113028, 0x0a011102, 0x02921130, 0x30210111, -+ } }, -+ { { /* 250 */ -+ 0x13020011, 0x11302b01, 0x03d30290, 0x3011122b, -+ 0x2b011302, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 251 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00004000, 0x00000000, 0x20000000, 0x00000000, -+ } }, -+ { { /* 252 */ -+ 0x00000000, 0x00000000, 0x00003000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 253 */ -+ 0x00000000, 0x07ffffde, 0x000001f6, 0x42000000, -+ 0x01020140, 0x44008200, 0x00041000, 0x00000000, -+ } }, -+ { { /* 254 */ -+ 0xffff0000, 0xffff27bf, 0x000027bf, 0x00000000, -+ 0x00000000, 0x0c000000, 0x03000000, 0x000000c0, -+ } }, -+ { { /* 255 */ -+ 0x3c000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 256 */ -+ 0x00000000, 0x061ef5c0, 0x000001f6, 0x40000000, -+ 0x01040040, 0x00208210, 0x00005040, 0x00000000, -+ } }, -+ { { /* 257 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x08004480, 0x08004480, -+ } }, -+ { { /* 258 */ -+ 0x00000000, 0x00000000, 0xc0000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 259 */ -+ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 260 */ -+ 0xffff0042, 0xffffffff, 0x0042ffff, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x000000c0, -+ } }, -+ { { /* 261 */ -+ 0x00000000, 0x000c0000, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 262 */ -+ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, -+ 0x00000000, 0x0000c00c, 0x00000000, 0x00000000, -+ } }, -+ { { /* 263 */ -+ 0x000c0003, 0x00003c00, 0x0000f000, 0x00003c00, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 264 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x98504f14, 0x18504f14, -+ } }, -+ { { /* 265 */ -+ 0x00000000, 0x00000000, 0x00000c00, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 266 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00480910, 0x00480910, -+ } }, -+ { { /* 267 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x0c186606, 0x0c186606, -+ } }, -+ { { /* 268 */ -+ 0x0c000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00010040, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 269 */ -+ 0x00001006, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 270 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0xfef02596, 0x3bffecae, 0x30003f5f, 0x00000000, -+ } }, -+ { { /* 271 */ -+ 0x03c03030, 0x0000c000, 0x00000000, 0x600c0c03, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 272 */ -+ 0x000c3003, 0x18c00c0c, 0x00c03060, 0x60000c03, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 273 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00100002, 0x00100002, -+ } }, -+ { { /* 274 */ -+ 0x00000003, 0x18000000, 0x00003060, 0x00000c00, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 275 */ -+ 0x00000000, 0x00300000, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 276 */ -+ 0xfdffb729, 0x000001ff, 0xb7290000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 277 */ -+ 0xfffddfec, 0xc3fffdff, 0x00803dcf, 0x00000003, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 278 */ -+ 0x00000000, 0xffffffff, 0xffffffff, 0x00ffffff, -+ 0xffffffff, 0x000003ff, 0x00000000, 0x00000000, -+ } }, -+ { { /* 279 */ -+ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, -+ 0x00000000, 0x0000c000, 0x00000000, 0x00000300, -+ } }, -+ { { /* 280 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00004004, 0x00004004, -+ } }, -+ { { /* 281 */ -+ 0x0f000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 282 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x02045101, 0x02045101, -+ } }, -+ { { /* 283 */ -+ 0x00000c00, 0x000000c3, 0x00000000, 0x18000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 284 */ -+ 0xffffffff, 0x0007f6fb, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 285 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000300, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 286 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x011c0661, 0x011c0661, -+ } }, -+ { { /* 287 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x1c58af16, 0x1c58af16, -+ } }, -+ { { /* 288 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x115c0671, 0x115c0671, -+ } }, -+ { { /* 289 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00100400, 0x00100400, -+ } }, -+ { { /* 290 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000003, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 291 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00082202, 0x00082202, -+ } }, -+ { { /* 292 */ -+ 0x03000030, 0x0000c000, 0x00000006, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000c00, -+ } }, -+ { { /* 293 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0x10000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 294 */ -+ 0x00000002, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 295 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00300000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 296 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x040c2383, 0x040c2383, -+ } }, -+ { { /* 297 */ -+ 0xfff99fee, 0xf3cdfdff, 0xb0c0398f, 0x00000003, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 298 */ -+ 0x00000000, 0x07ffffc6, 0x000001fe, 0x40000000, -+ 0x01000040, 0x0000a000, 0x00001000, 0x00000000, -+ } }, -+ { { /* 299 */ -+ 0xfff987e0, 0xd36dfdff, 0x1e003987, 0x001f0000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 300 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x160e2302, 0x160e2302, -+ } }, -+ { { /* 301 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00020000, 0x00020000, -+ } }, -+ { { /* 302 */ -+ 0x030000f0, 0x00000000, 0x0c00001e, 0x1e000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 303 */ -+ 0x00000000, 0x07ffffde, 0x000005f6, 0x50000000, -+ 0x05480262, 0x10000a00, 0x00013000, 0x00000000, -+ } }, -+ { { /* 304 */ -+ 0x00000000, 0x07ffffde, 0x000005f6, 0x50000000, -+ 0x05480262, 0x10000a00, 0x00052000, 0x00000000, -+ } }, -+ { { /* 305 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x143c278f, 0x143c278f, -+ } }, -+ { { /* 306 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000100, 0x00000000, -+ } }, -+ { { /* 307 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x02045301, 0x02045301, -+ } }, -+ { { /* 308 */ -+ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, -+ 0x00300000, 0x0c00c030, 0x03000000, 0x00000000, -+ } }, -+ { { /* 309 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x02041101, 0x02041101, -+ } }, -+ { { /* 310 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0x00800000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 311 */ -+ 0x30000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00040000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 312 */ -+ 0x00000000, 0x07fffdd6, 0x000005f6, 0xec000000, -+ 0x0200b4d9, 0x480a8640, 0x00000000, 0x00000000, -+ } }, -+ { { /* 313 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00000002, 0x00000002, -+ } }, -+ { { /* 314 */ -+ 0x00033000, 0x00000000, 0x00000c00, 0x600000c3, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 315 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x1850cc14, 0x1850cc14, -+ } }, -+ { { /* 316 */ -+ 0xffff8f04, 0xffffffff, 0x8f04ffff, 0x00000000, -+ 0x030c0000, 0x0c00cc0f, 0x03000000, 0x00000300, -+ } }, -+ { { /* 317 */ -+ 0x00000000, 0x00800000, 0x03bffbaa, 0x03bffbaa, -+ 0x00000000, 0x00000000, 0x00002202, 0x00002202, -+ } }, -+ { { /* 318 */ -+ 0x00080000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 319 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0xfc7e3fec, 0x2ffbffbf, 0x7f5f847f, 0x00040000, -+ } }, -+ { { /* 320 */ -+ 0xff7fff7f, 0xff01ff7f, 0x3d7f3d7f, 0xffff7fff, -+ 0xffff3d7f, 0x003d7fff, 0xff7f7f3d, 0x00ff7fff, -+ } }, -+ { { /* 321 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x24182212, 0x24182212, -+ } }, -+ { { /* 322 */ -+ 0x0000f000, 0x66000000, 0x00300180, 0x60000033, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 323 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00408030, 0x00408030, -+ } }, -+ { { /* 324 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00020032, 0x00020032, -+ } }, -+ { { /* 325 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00000016, 0x00000016, -+ } }, -+ { { /* 326 */ -+ 0x00033000, 0x00000000, 0x00000c00, 0x60000003, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 327 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00200034, 0x00200034, -+ } }, -+ { { /* 328 */ -+ 0x00033000, 0x00000000, 0x00000c00, 0x60000003, -+ 0x00000000, 0x00800000, 0x00000000, 0x0000c3f0, -+ } }, -+ { { /* 329 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00040000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 330 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00000880, 0x00000880, -+ } }, -+ { { /* 331 */ -+ 0xfdff8f04, 0xfdff01ff, 0x8f0401ff, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 332 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x10400a33, 0x10400a33, -+ } }, -+ { { /* 333 */ -+ 0xffff0000, 0xffff1fff, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 334 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0xd63dc7e8, 0xc3bfc718, 0x00803dc7, 0x00000000, -+ } }, -+ { { /* 335 */ -+ 0xfffddfee, 0xc3effdff, 0x00603ddf, 0x00000003, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 336 */ -+ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, -+ 0x0c0c0000, 0x00cc0000, 0x00000000, 0x0000c00c, -+ } }, -+ { { /* 337 */ -+ 0xfffffffe, 0x87ffffff, 0x00007fff, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 338 */ -+ 0xff7fff7f, 0xff01ff00, 0x00003d7f, 0xffff7fff, -+ 0x00ff0000, 0x003d7f7f, 0xff7f7f00, 0x00ff7f00, -+ } }, -+ { { /* 339 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x30400090, 0x30400090, -+ } }, -+ { { /* 340 */ -+ 0x00000000, 0x00000000, 0xc0000180, 0x60000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 341 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x18404084, 0x18404084, -+ } }, -+ { { /* 342 */ -+ 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, -+ 0x00c00000, 0x0c00c00c, 0x03000000, 0x00000000, -+ } }, -+ { { /* 343 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00008000, 0x00008000, -+ } }, -+ { { /* 344 */ -+ 0xffff00d0, 0xffffffff, 0x00d0ffff, 0x00000000, -+ 0x00030000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 345 */ -+ 0x000c0000, 0x30000000, 0x00000c30, 0x00030000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 346 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x263c370f, 0x263c370f, -+ } }, -+ { { /* 347 */ -+ 0x0003000c, 0x00000300, 0x00000000, 0x00000300, -+ 0x00000000, 0x00018003, 0x00000000, 0x00000000, -+ } }, -+ { { /* 348 */ -+ 0x0800024f, 0x00000008, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 349 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0xffffffff, 0xffffffff, 0x03ffffff, -+ } }, -+ { { /* 350 */ -+ 0x00000000, 0x00000000, 0x077dfffe, 0x077dfffe, -+ 0x00000000, 0x00000000, 0x10400010, 0x10400010, -+ } }, -+ { { /* 351 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x10400010, 0x10400010, -+ } }, -+ { { /* 352 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x081047a4, 0x081047a4, -+ } }, -+ { { /* 353 */ -+ 0x0c0030c0, 0x00000000, 0x0f30001e, 0x66000003, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 354 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x000a0a09, 0x000a0a09, -+ } }, -+ { { /* 355 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x00400810, 0x00400810, -+ } }, -+ { { /* 356 */ -+ 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, -+ 0x00000000, 0x00000000, 0x0e3c770f, 0x0e3c770f, -+ } }, -+ { { /* 357 */ -+ 0x0c000000, 0x00000300, 0x00000018, 0x00000300, -+ 0x00000000, 0x00000000, 0x001fe000, 0x03000000, -+ } }, -+ { { /* 358 */ -+ 0x0000100f, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 359 */ -+ 0x00000000, 0xc0000000, 0x00000000, 0x0000000c, -+ 0x00000000, 0x33000000, 0x00003000, 0x00000000, -+ } }, -+ { { /* 360 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000280, 0x00000000, -+ } }, -+ { { /* 361 */ -+ 0x7f7b7f8b, 0xef553db4, 0xf35dfba8, 0x400b0243, -+ 0x8d3efb40, 0x8c2c7bf7, 0xe3fa6eff, 0xa8ed1d3a, -+ } }, -+ { { /* 362 */ -+ 0xcf83e602, 0x35558cf5, 0xffabe048, 0xd85992b9, -+ 0x2892ab18, 0x8020d7e9, 0xf583c438, 0x450ae74a, -+ } }, -+ { { /* 363 */ -+ 0x9714b000, 0x54007762, 0x1420d188, 0xc8c01020, -+ 0x00002121, 0x0c0413a8, 0x04408000, 0x082870c0, -+ } }, -+ { { /* 364 */ -+ 0x000408c0, 0x80000002, 0x14722b7b, 0x3bfb7924, -+ 0x1ae43327, 0x38ef9835, 0x28029ad1, 0xbf69a813, -+ } }, -+ { { /* 365 */ -+ 0x2fc665cf, 0xafc96b11, 0x5053340f, 0xa00486a2, -+ 0xe8090106, 0xc00e3f0f, 0x81450a88, 0xc6010010, -+ } }, -+ { { /* 366 */ -+ 0x26e1a161, 0xce00444b, 0xd4eec7aa, 0x85bbcadf, -+ 0xa5203a74, 0x8840436c, 0x8bd23f06, 0x3befff79, -+ } }, -+ { { /* 367 */ -+ 0xe8eff75a, 0x5b36fbcb, 0x1bfd0d49, 0x39ee0154, -+ 0x2e75d855, 0xa91abfd8, 0xf6bff3d7, 0xb40c67e0, -+ } }, -+ { { /* 368 */ -+ 0x081382c2, 0xd08bd49d, 0x1061065a, 0x59e074f2, -+ 0xb3128f9f, 0x6aaa0080, 0xb05e3230, 0x60ac9d7a, -+ } }, -+ { { /* 369 */ -+ 0xc900d303, 0x8a563098, 0x13907000, 0x18421f14, -+ 0x0008c060, 0x10808008, 0xec900400, 0xe6332817, -+ } }, -+ { { /* 370 */ -+ 0x90000758, 0x4e09f708, 0xfc83f485, 0x18c8af53, -+ 0x080c187c, 0x01146adf, 0xa734c80c, 0x2710a011, -+ } }, -+ { { /* 371 */ -+ 0x422228c5, 0x00210413, 0x41123010, 0x40001820, -+ 0xc60c022b, 0x10000300, 0x00220022, 0x02495810, -+ } }, -+ { { /* 372 */ -+ 0x9670a094, 0x1792eeb0, 0x05f2cb96, 0x23580025, -+ 0x42cc25de, 0x4a04cf38, 0x359f0c40, 0x8a001128, -+ } }, -+ { { /* 373 */ -+ 0x910a13fa, 0x10560229, 0x04200641, 0x84f00484, -+ 0x0c040000, 0x412c0400, 0x11541206, 0x00020a4b, -+ } }, -+ { { /* 374 */ -+ 0x00c00200, 0x00940000, 0xbfbb0001, 0x242b167c, -+ 0x7fa89bbb, 0xe3790c7f, 0xe00d10f4, 0x9f014132, -+ } }, -+ { { /* 375 */ -+ 0x35728652, 0xff1210b4, 0x4223cf27, 0x8602c06b, -+ 0x1fd33106, 0xa1aa3a0c, 0x02040812, 0x08012572, -+ } }, -+ { { /* 376 */ -+ 0x485040cc, 0x601062d0, 0x29001c80, 0x00109a00, -+ 0x22000004, 0x00800000, 0x68002020, 0x609ecbe6, -+ } }, -+ { { /* 377 */ -+ 0x3f73916e, 0x398260c0, 0x48301034, 0xbd5c0006, -+ 0xd6fb8cd1, 0x43e820e1, 0x084e0600, 0xc4d00500, -+ } }, -+ { { /* 378 */ -+ 0x89aa8d1f, 0x1602a6e1, 0x21ed0001, 0x1a8b3656, -+ 0x13a51fb7, 0x30a06502, 0x23c7b278, 0xe9226c93, -+ } }, -+ { { /* 379 */ -+ 0x3a74e47f, 0x98208fe3, 0x2625280e, 0xbf49bf9c, -+ 0xac543218, 0x1916b949, 0xb5220c60, 0x0659fbc1, -+ } }, -+ { { /* 380 */ -+ 0x8420e343, 0x800008d9, 0x20225500, 0x00a10184, -+ 0x20104800, 0x40801380, 0x00160d04, 0x80200040, -+ } }, -+ { { /* 381 */ -+ 0x8de7fd40, 0xe0985436, 0x091e7b8b, 0xd249fec8, -+ 0x8dee0611, 0xba221937, 0x9fdd77f4, 0xf0daf3ec, -+ } }, -+ { { /* 382 */ -+ 0xec424386, 0x26048d3f, 0xc021fa6c, 0x0cc2628e, -+ 0x0145d785, 0x559977ad, 0x4045e250, 0xa154260b, -+ } }, -+ { { /* 383 */ -+ 0x58199827, 0xa4103443, 0x411405f2, 0x07002280, -+ 0x426600b4, 0x15a17210, 0x41856025, 0x00000054, -+ } }, -+ { { /* 384 */ -+ 0x01040201, 0xcb70c820, 0x6a629320, 0x0095184c, -+ 0x9a8b1880, 0x3201aab2, 0x00c4d87a, 0x04c3f3e5, -+ } }, -+ { { /* 385 */ -+ 0xa238d44d, 0x5072a1a1, 0x84fc980a, 0x44d1c152, -+ 0x20c21094, 0x42104180, 0x3a000000, 0xd29d0240, -+ } }, -+ { { /* 386 */ -+ 0xa8b12f01, 0x2432bd40, 0xd04bd34d, 0xd0ada723, -+ 0x75a10a92, 0x01e9adac, 0x771f801a, 0xa01b9225, -+ } }, -+ { { /* 387 */ -+ 0x20cadfa1, 0x738c0602, 0x003b577f, 0x00d00bff, -+ 0x0088806a, 0x0029a1c4, 0x05242a05, 0x16234009, -+ } }, -+ { { /* 388 */ -+ 0x80056822, 0xa2112011, 0x64900004, 0x13824849, -+ 0x193023d5, 0x08922980, 0x88115402, 0xa0042001, -+ } }, -+ { { /* 389 */ -+ 0x81800400, 0x60228502, 0x0b010090, 0x12020022, -+ 0x00834011, 0x00001a01, 0x00000000, 0x00000000, -+ } }, -+ { { /* 390 */ -+ 0x00000000, 0x4684009f, 0x020012c8, 0x1a0004fc, -+ 0x0c4c2ede, 0x80b80402, 0x0afca826, 0x22288c02, -+ } }, -+ { { /* 391 */ -+ 0x8f7ba0e0, 0x2135c7d6, 0xf8b106c7, 0x62550713, -+ 0x8a19936e, 0xfb0e6efa, 0x48f91630, 0x7debcd2f, -+ } }, -+ { { /* 392 */ -+ 0x4e845892, 0x7a2e4ca0, 0x561eedea, 0x1190c649, -+ 0xe83a5324, 0x8124cfdb, 0x634218f1, 0x1a8a5853, -+ } }, -+ { { /* 393 */ -+ 0x24d37420, 0x0514aa3b, 0x89586018, 0xc0004800, -+ 0x91018268, 0x2cd684a4, 0xc4ba8886, 0x02100377, -+ } }, -+ { { /* 394 */ -+ 0x00388244, 0x404aae11, 0x510028c0, 0x15146044, -+ 0x10007310, 0x02480082, 0x40060205, 0x0000c003, -+ } }, -+ { { /* 395 */ -+ 0x0c020000, 0x02200008, 0x40009000, 0xd161b800, -+ 0x32744621, 0x3b8af800, 0x8b00050f, 0x2280bbd0, -+ } }, -+ { { /* 396 */ -+ 0x07690600, 0x00438040, 0x50005420, 0x250c41d0, -+ 0x83108410, 0x02281101, 0x00304008, 0x020040a1, -+ } }, -+ { { /* 397 */ -+ 0x20000040, 0xabe31500, 0xaa443180, 0xc624c2c6, -+ 0x8004ac13, 0x03d1b000, 0x4285611e, 0x1d9ff303, -+ } }, -+ { { /* 398 */ -+ 0x78e8440a, 0xc3925e26, 0x00852000, 0x4000b001, -+ 0x88424a90, 0x0c8dca04, 0x4203a705, 0x000422a1, -+ } }, -+ { { /* 399 */ -+ 0x0c018668, 0x10795564, 0xdea00002, 0x40c12000, -+ 0x5001488b, 0x04000380, 0x50040000, 0x80d0c05d, -+ } }, -+ { { /* 400 */ -+ 0x970aa010, 0x4dafbb20, 0x1e10d921, 0x83140460, -+ 0xa6d68848, 0x733fd83b, 0x497427bc, 0x92130ddc, -+ } }, -+ { { /* 401 */ -+ 0x8ba1142b, 0xd1392e75, 0x50503009, 0x69008808, -+ 0x024a49d4, 0x80164010, 0x89d7e564, 0x5316c020, -+ } }, -+ { { /* 402 */ -+ 0x86002b92, 0x15e0a345, 0x0c03008b, 0xe200196e, -+ 0x80067031, 0xa82916a5, 0x18802000, 0xe1487aac, -+ } }, -+ { { /* 403 */ -+ 0xb5d63207, 0x5f9132e8, 0x20e550a1, 0x10807c00, -+ 0x9d8a7280, 0x421f00aa, 0x02310e22, 0x04941100, -+ } }, -+ { { /* 404 */ -+ 0x40080022, 0x5c100010, 0xfcc80343, 0x0580a1a5, -+ 0x04008433, 0x6e080080, 0x81262a4b, 0x2901aad8, -+ } }, -+ { { /* 405 */ -+ 0x4490684d, 0xba880009, 0x00820040, 0x87d10000, -+ 0xb1e6215b, 0x80083161, 0xc2400800, 0xa600a069, -+ } }, -+ { { /* 406 */ -+ 0x4a328d58, 0x550a5d71, 0x2d579aa0, 0x4aa64005, -+ 0x30b12021, 0x01123fc6, 0x260a10c2, 0x50824462, -+ } }, -+ { { /* 407 */ -+ 0x80409880, 0x810004c0, 0x00002003, 0x38180000, -+ 0xf1a60200, 0x720e4434, 0x92e035a2, 0x09008101, -+ } }, -+ { { /* 408 */ -+ 0x00000400, 0x00008885, 0x00000000, 0x00804000, -+ 0x00000000, 0x00004040, 0x00000000, 0x00000000, -+ } }, -+ { { /* 409 */ -+ 0x00000000, 0x08000000, 0x00000082, 0x00000000, -+ 0x88000004, 0xe7efbfff, 0xffbfffff, 0xfdffefef, -+ } }, -+ { { /* 410 */ -+ 0xbffefbff, 0x057fffff, 0x85b30034, 0x42164706, -+ 0xe4105402, 0xb3058092, 0x81305422, 0x180b4263, -+ } }, -+ { { /* 411 */ -+ 0x13f5387b, 0xa9ea07e5, 0x05143c4c, 0x80020600, -+ 0xbd481ad9, 0xf496ee37, 0x7ec0705f, 0x355fbfb2, -+ } }, -+ { { /* 412 */ -+ 0x455fe644, 0x41469000, 0x063b1d40, 0xfe1362a1, -+ 0x39028505, 0x0c080548, 0x0000144f, 0x58183488, -+ } }, -+ { { /* 413 */ -+ 0xd8153077, 0x4bfbbd0e, 0x85008a90, 0xe61dc100, -+ 0xb386ed14, 0x639bff72, 0xd9befd92, 0x0a92887b, -+ } }, -+ { { /* 414 */ -+ 0x1cb2d3fe, 0x177ab980, 0xdc1782c9, 0x3980fffb, -+ 0x590c4260, 0x37df0f01, 0xb15094a3, 0x23070623, -+ } }, -+ { { /* 415 */ -+ 0x3102f85a, 0x310201f0, 0x1e820040, 0x056a3a0a, -+ 0x12805b84, 0xa7148002, 0xa04b2612, 0x90011069, -+ } }, -+ { { /* 416 */ -+ 0x848a1000, 0x3f801802, 0x42400708, 0x4e140110, -+ 0x180080b0, 0x0281c510, 0x10298202, 0x88000210, -+ } }, -+ { { /* 417 */ -+ 0x00420020, 0x11000280, 0x4413e000, 0xfe025804, -+ 0x30283c07, 0x04739798, 0xcb13ced1, 0x431f6210, -+ } }, -+ { { /* 418 */ -+ 0x55ac278d, 0xc892422e, 0x02885380, 0x78514039, -+ 0x8088292c, 0x2428b900, 0x080e0c41, 0x42004421, -+ } }, -+ { { /* 419 */ -+ 0x08680408, 0x12040006, 0x02903031, 0xe0855b3e, -+ 0x10442936, 0x10822814, 0x83344266, 0x531b013c, -+ } }, -+ { { /* 420 */ -+ 0x0e0d0404, 0x00510c22, 0xc0000012, 0x88000040, -+ 0x0000004a, 0x00000000, 0x5447dff6, 0x00088868, -+ } }, -+ { { /* 421 */ -+ 0x00000081, 0x40000000, 0x00000100, 0x02000000, -+ 0x00080600, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 422 */ -+ 0x00000080, 0x00000040, 0x00000000, 0x00001040, -+ 0x00000000, 0xf7fdefff, 0xfffeff7f, 0xfffffbff, -+ } }, -+ { { /* 423 */ -+ 0xbffffdff, 0x00ffffff, 0x042012c2, 0x07080c06, -+ 0x01101624, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 424 */ -+ 0xe0000000, 0xfffffffe, 0x7f79ffff, 0x00f928df, -+ 0x80120c32, 0xd53a0008, 0xecc2d858, 0x2fa89d18, -+ } }, -+ { { /* 425 */ -+ 0xe0109620, 0x2622d60c, 0x02060f97, 0x9055b240, -+ 0x501180a2, 0x04049800, 0x00004000, 0x00000000, -+ } }, -+ { { /* 426 */ -+ 0x00000000, 0x00000000, 0x00000000, 0xfffffbc0, -+ 0xdffbeffe, 0x62430b08, 0xfb3b41b6, 0x23896f74, -+ } }, -+ { { /* 427 */ -+ 0xecd7ae7f, 0x5960e047, 0x098fa096, 0xa030612c, -+ 0x2aaa090d, 0x4f7bd44e, 0x388bc4b2, 0x6110a9c6, -+ } }, -+ { { /* 428 */ -+ 0x42000014, 0x0202800c, 0x6485fe48, 0xe3f7d63e, -+ 0x0c073aa0, 0x0430e40c, 0x1002f680, 0x00000000, -+ } }, -+ { { /* 429 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x00100000, -+ 0x00004000, 0x00004000, 0x00000100, 0x00000000, -+ } }, -+ { { /* 430 */ -+ 0x00000000, 0x40000000, 0x00000000, 0x00000400, -+ 0x00008000, 0x00000000, 0x00400400, 0x00000000, -+ } }, -+ { { /* 431 */ -+ 0x00000000, 0x40000000, 0x00000000, 0x00000800, -+ 0xfebdffe0, 0xffffffff, 0xfbe77f7f, 0xf7ffffbf, -+ } }, -+ { { /* 432 */ -+ 0xefffffff, 0xdff7ff7e, 0xfbdff6f7, 0x804fbffe, -+ 0x00000000, 0x00000000, 0x00000000, 0x7fffef00, -+ } }, -+ { { /* 433 */ -+ 0xb6f7ff7f, 0xb87e4406, 0x88313bf5, 0x00f41796, -+ 0x1391a960, 0x72490080, 0x0024f2f3, 0x42c88701, -+ } }, -+ { { /* 434 */ -+ 0x5048e3d3, 0x43052400, 0x4a4c0000, 0x10580227, -+ 0x01162820, 0x0014a809, 0x00000000, 0x00683ec0, -+ } }, -+ { { /* 435 */ -+ 0x00000000, 0x00000000, 0x00000000, 0xffe00000, -+ 0xfddbb7ff, 0x000000f7, 0xc72e4000, 0x00000180, -+ } }, -+ { { /* 436 */ -+ 0x00012000, 0x00004000, 0x00300000, 0xb4f7ffa8, -+ 0x03ffadf3, 0x00000120, 0x00000000, 0x00000000, -+ } }, -+ { { /* 437 */ -+ 0x00000000, 0x00000000, 0x00000000, 0xfffbf000, -+ 0xfdcf9df7, 0x15c301bf, 0x810a1827, 0x0a00a842, -+ } }, -+ { { /* 438 */ -+ 0x80088108, 0x18048008, 0x0012a3be, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 439 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x90000000, -+ 0xdc3769e6, 0x3dff6bff, 0xf3f9fcf8, 0x00000004, -+ } }, -+ { { /* 440 */ -+ 0x80000000, 0xe7eebf6f, 0x5da2dffe, 0xc00b3fd8, -+ 0xa00c0984, 0x69100040, 0xb912e210, 0x5a0086a5, -+ } }, -+ { { /* 441 */ -+ 0x02896800, 0x6a809005, 0x00030010, 0x80000000, -+ 0x8e001ff9, 0x00000001, 0x00000000, 0x00000000, -+ } }, -+ { { /* 442 */ -+ 0x14000010, 0xa0c09512, 0x0c000200, 0x01000400, -+ 0x050002a3, 0x98800009, 0x00004000, 0x01004c00, -+ } }, -+ { { /* 443 */ -+ 0x04800008, 0x02840300, 0x00000824, 0x00040000, -+ 0x00000400, 0x20010904, 0x00001100, 0x22050030, -+ } }, -+ { { /* 444 */ -+ 0x00000108, 0x08104000, 0x01400000, 0x00001040, -+ 0x00010102, 0x10000040, 0x82012000, 0x10100002, -+ } }, -+ { { /* 445 */ -+ 0x00006002, 0x00000800, 0x00400000, 0x02100401, -+ 0x14400144, 0x013c4980, 0x880e8288, 0x50102014, -+ } }, -+ { { /* 446 */ -+ 0x80000824, 0x101000c1, 0x02800000, 0x02080101, -+ 0x04118000, 0x02200112, 0x00031020, 0x02000003, -+ } }, -+ { { /* 447 */ -+ 0x00000002, 0x090c1090, 0xa0004004, 0x60102290, -+ 0x00080000, 0x00414f45, 0x07071026, 0x40c00001, -+ } }, -+ { { /* 448 */ -+ 0x04580000, 0x0014800a, 0x00002800, 0x00002600, -+ 0x50988020, 0x02140018, 0x04013800, 0x00008008, -+ } }, -+ { { /* 449 */ -+ 0x41082004, 0x80000928, 0x20080280, 0x020e0a00, -+ 0x00010040, 0x16110200, 0x41800002, 0x08231400, -+ } }, -+ { { /* 450 */ -+ 0x40020020, 0x0080202f, 0x2015a008, 0x1c000002, -+ 0xc0040e00, 0x82028012, 0x00400000, 0x2002a004, -+ } }, -+ { { /* 451 */ -+ 0x20200001, 0xa0040000, 0x8890004c, 0xc4000080, -+ 0x10012500, 0x48100482, 0x60800110, 0x40008040, -+ } }, -+ { { /* 452 */ -+ 0x00040008, 0x04000044, 0x90000091, 0x000c1200, -+ 0x06040000, 0x08610480, 0x10010800, 0x080d0001, -+ } }, -+ { { /* 453 */ -+ 0x800204b4, 0x00140000, 0x00000000, 0x00200020, -+ 0x84100200, 0x01811000, 0x02000210, 0x03018800, -+ } }, -+ { { /* 454 */ -+ 0x04042804, 0x20001c92, 0x02100020, 0x4202490a, -+ 0x02420146, 0x00000803, 0x0008c008, 0x44050010, -+ } }, -+ { { /* 455 */ -+ 0x80222000, 0x00000800, 0x00008452, 0x10502140, -+ 0xe0410005, 0x00000400, 0x00a00008, 0x80080000, -+ } }, -+ { { /* 456 */ -+ 0x50180020, 0x00000009, 0x40080600, 0x00000000, -+ 0x56000020, 0x04000000, 0x00020006, 0x00208220, -+ } }, -+ { { /* 457 */ -+ 0x01210000, 0x40009000, 0x08c00140, 0x08110000, -+ 0x00004820, 0x02400810, 0x08800002, 0x00200000, -+ } }, -+ { { /* 458 */ -+ 0x00040a00, 0x00004000, 0x40000104, 0x84000000, -+ 0x02040048, 0x20000000, 0x00012000, 0x1b100000, -+ } }, -+ { { /* 459 */ -+ 0x00007000, 0x04000020, 0x10032000, 0x0804000a, -+ 0x00000008, 0x04020090, 0x88000014, 0x00000000, -+ } }, -+ { { /* 460 */ -+ 0x00000000, 0x08020008, 0x00040400, 0x40a00000, -+ 0x40000000, 0x00080090, 0x40800000, 0x20000388, -+ } }, -+ { { /* 461 */ -+ 0x02001080, 0x20010004, 0x12010004, 0x20008011, -+ 0x13200082, 0x02800000, 0x04098001, 0x00000004, -+ } }, -+ { { /* 462 */ -+ 0x00000000, 0x02801000, 0x00001000, 0x00000100, -+ 0x20010024, 0x00000050, 0x80200028, 0x00000020, -+ } }, -+ { { /* 463 */ -+ 0x01000000, 0x00a24000, 0x00000000, 0x82001010, -+ 0x00000800, 0x02000000, 0x40020002, 0x59000044, -+ } }, -+ { { /* 464 */ -+ 0x00000080, 0x0d040000, 0x04000000, 0x10020000, -+ 0x00022000, 0x00508000, 0x20080001, 0x000004a2, -+ } }, -+ { { /* 465 */ -+ 0xc0020400, 0x00310000, 0x80002000, 0x00002800, -+ 0x00000b60, 0x40200000, 0x00120000, 0x80000009, -+ } }, -+ { { /* 466 */ -+ 0x41000000, 0x00010008, 0x00880910, 0x20080888, -+ 0x04044020, 0x80482010, 0x00006000, 0x00020000, -+ } }, -+ { { /* 467 */ -+ 0x42405004, 0x00400020, 0x00000010, 0x00000886, -+ 0x00008000, 0x80021011, 0x00c00000, 0x42000000, -+ } }, -+ { { /* 468 */ -+ 0x4801201f, 0x40c00004, 0x20600480, 0x00000020, -+ 0x01000110, 0x22400040, 0x00000428, 0x00000000, -+ } }, -+ { { /* 469 */ -+ 0x0f00020f, 0x40401000, 0x00200048, 0x000c0092, -+ 0x81000421, 0x00040004, 0x00620001, 0x06000202, -+ } }, -+ { { /* 470 */ -+ 0x14001808, 0x00083800, 0x008c1028, 0x04120028, -+ 0x22008404, 0x40260880, 0x01100700, 0x00400000, -+ } }, -+ { { /* 471 */ -+ 0x20000020, 0x00200000, 0x00840000, 0x04108000, -+ 0x00000002, 0x00000000, 0x10000002, 0x04000402, -+ } }, -+ { { /* 472 */ -+ 0x10000000, 0x26a20000, 0x05000200, 0x82204000, -+ 0x80000000, 0x00048404, 0x80004800, 0x80000400, -+ } }, -+ { { /* 473 */ -+ 0x00000064, 0x00000050, 0x18804000, 0x00060000, -+ 0x00408002, 0x02020030, 0x00000000, 0x40000000, -+ } }, -+ { { /* 474 */ -+ 0x01208414, 0x00000600, 0x02018000, 0x10400000, -+ 0x04000840, 0x09200000, 0x2e000000, 0x04000304, -+ } }, -+ { { /* 475 */ -+ 0x00c01810, 0x20100010, 0x10400010, 0x02100000, -+ 0xa0000402, 0x48200000, 0x06080000, 0x01400000, -+ } }, -+ { { /* 476 */ -+ 0x40000008, 0x00001000, 0x10112800, 0xc2a09080, -+ 0x00008a02, 0x3a0000e9, 0x80611011, 0x40220000, -+ } }, -+ { { /* 477 */ -+ 0x20000020, 0x48381a00, 0x00028421, 0x54ea0800, -+ 0x01425100, 0x0490200c, 0x20020000, 0x00600800, -+ } }, -+ { { /* 478 */ -+ 0x00e0c201, 0x00004810, 0x10a10001, 0x00000040, -+ 0x80108084, 0x00042000, 0x00002000, 0x00000004, -+ } }, -+ { { /* 479 */ -+ 0x00010014, 0x03005d00, 0x00008102, 0x00120000, -+ 0x51009000, 0x04000480, 0x0021c200, 0x0a888056, -+ } }, -+ { { /* 480 */ -+ 0xd2b60004, 0x13800000, 0x204803a8, 0x04501921, -+ 0x0a003004, 0x02100010, 0x00091100, 0x01070080, -+ } }, -+ { { /* 481 */ -+ 0x42004020, 0x08300000, 0x002a2444, 0x04046081, -+ 0x40046008, 0x00120000, 0x10000108, 0x00000000, -+ } }, -+ { { /* 482 */ -+ 0x00000084, 0x08001000, 0x0012e001, 0x045880c0, -+ 0x00010000, 0x00800022, 0x02401000, 0x00000000, -+ } }, -+ { { /* 483 */ -+ 0x4000d000, 0x00000850, 0x01000009, 0x0d840000, -+ 0x01080000, 0x42008000, 0x20000828, 0x40100040, -+ } }, -+ { { /* 484 */ -+ 0x51000100, 0x32000000, 0x001a0894, 0x04000040, -+ 0x00002102, 0x03428000, 0x018c0080, 0x00234010, -+ } }, -+ { { /* 485 */ -+ 0x00000040, 0x185c4000, 0x03000000, 0x40020004, -+ 0xa20200c9, 0x00000220, 0x00101050, 0x00120004, -+ } }, -+ { { /* 486 */ -+ 0x00000040, 0x44002400, 0x00000228, 0x20000020, -+ 0x000a0008, 0x18010000, 0x3c08830c, 0x40000684, -+ } }, -+ { { /* 487 */ -+ 0x80101800, 0x02000280, 0x0020000c, 0x08009004, -+ 0x00040000, 0x0004000c, 0x00018000, 0x14001000, -+ } }, -+ { { /* 488 */ -+ 0x08240000, 0x00200000, 0x20420014, 0x58112000, -+ 0x10004048, 0x010050c0, 0x0408228c, 0x12282040, -+ } }, -+ { { /* 489 */ -+ 0x00000000, 0x00000020, 0x24002000, 0x00000000, -+ 0x00800a00, 0x00080910, 0x1019a000, 0x60200030, -+ } }, -+ { { /* 490 */ -+ 0x00000080, 0x00000080, 0x08000000, 0x800050a0, -+ 0x80044000, 0x04001010, 0x80008080, 0x00000000, -+ } }, -+ { { /* 491 */ -+ 0x00000040, 0x00800000, 0x000c4283, 0x01020000, -+ 0x00888000, 0x00104008, 0x20000000, 0x04000080, -+ } }, -+ { { /* 492 */ -+ 0x20000104, 0x1802c021, 0x08100000, 0x0000004e, -+ 0x80000001, 0x30c00080, 0x00000040, 0x00401200, -+ } }, -+ { { /* 493 */ -+ 0x04945288, 0x00940400, 0x06400104, 0x10002000, -+ 0x00080010, 0x00400420, 0x00000102, 0x00408010, -+ } }, -+ { { /* 494 */ -+ 0x05000000, 0x40002240, 0x00100000, 0x0e400024, -+ 0x00000080, 0x80000440, 0x01018410, 0xb1804004, -+ } }, -+ { { /* 495 */ -+ 0x25000800, 0x20000000, 0x00800000, 0x0000804c, -+ 0x10020020, 0x42001000, 0x00082000, 0x00002000, -+ } }, -+ { { /* 496 */ -+ 0x11500020, 0x40004053, 0x11280500, 0x80060014, -+ 0x004c0101, 0x60002008, 0x44000000, 0x01000036, -+ } }, -+ { { /* 497 */ -+ 0x00010028, 0x01180000, 0x84041804, 0x00098000, -+ 0x00800000, 0x00000000, 0x00400002, 0x10004001, -+ } }, -+ { { /* 498 */ -+ 0x0051a004, 0x00008100, 0x00000024, 0x40041000, -+ 0x00040000, 0x00042001, 0x00000000, 0x00008000, -+ } }, -+ { { /* 499 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x20030000, -+ 0x00001840, 0x00020220, 0x04404002, 0x00204000, -+ } }, -+ { { /* 500 */ -+ 0x01008010, 0x00002080, 0x40008064, 0x00004031, -+ 0x10018090, 0x80304001, 0x000080a0, 0x80200040, -+ } }, -+ { { /* 501 */ -+ 0x00000001, 0x00000010, 0x00102088, 0x00800020, -+ 0x00120681, 0x100002a0, 0x00000042, 0x00000080, -+ } }, -+ { { /* 502 */ -+ 0x10000000, 0x21000a00, 0x00000200, 0x40000080, -+ 0x10110000, 0x00108200, 0x04000000, 0x00000400, -+ } }, -+ { { /* 503 */ -+ 0x80001000, 0x80002000, 0x40003008, 0x00000204, -+ 0x0801000a, 0x40000001, 0x00000000, 0x00000004, -+ } }, -+ { { /* 504 */ -+ 0x00000000, 0x00000000, 0x00020000, 0x00000000, -+ 0x88000000, 0x00002000, 0x08502000, 0x00840a00, -+ } }, -+ { { /* 505 */ -+ 0x31061808, 0x00000000, 0x00000000, 0x04000000, -+ 0x00000004, 0x00000240, 0x00100009, 0x00000000, -+ } }, -+ { { /* 506 */ -+ 0x00004002, 0x04002500, 0x00008040, 0x40a20100, -+ 0x00000001, 0x12412080, 0x04004008, 0x00042014, -+ } }, -+ { { /* 507 */ -+ 0x02000000, 0x00012000, 0x10000402, 0x000040c0, -+ 0x00080000, 0x5fe800a1, 0x04019402, 0x02000000, -+ } }, -+ { { /* 508 */ -+ 0x00040100, 0x00880000, 0x00401000, 0x00001012, -+ 0x00000000, 0x08004100, 0x00000010, 0x00000000, -+ } }, -+ { { /* 509 */ -+ 0x00000000, 0x00000000, 0x52020000, 0x10410080, -+ 0x00005000, 0x08400200, 0x80400010, 0x44400020, -+ } }, -+ { { /* 510 */ -+ 0x00084100, 0x10200d02, 0xa1200012, 0x00804804, -+ 0x00008212, 0xc6024000, 0x08100000, 0x205c1828, -+ } }, -+ { { /* 511 */ -+ 0x00000088, 0x00031000, 0x8000013f, 0x21184b44, -+ 0x100100f2, 0xa9002001, 0x08080840, 0x001b0001, -+ } }, -+ { { /* 512 */ -+ 0x28800112, 0x400020f0, 0x0910200c, 0x0a0010a0, -+ 0x80000020, 0x00000004, 0x1000000a, 0x00400000, -+ } }, -+ { { /* 513 */ -+ 0x00000000, 0x00002000, 0x00000080, 0x81000000, -+ 0x02c00020, 0x000004c5, 0x00000000, 0x00100100, -+ } }, -+ { { /* 514 */ -+ 0x20000000, 0x01080000, 0x00400022, 0x08000200, -+ 0x00408002, 0x20400028, 0x00000000, 0x00100000, -+ } }, -+ { { /* 515 */ -+ 0x08000008, 0x00420002, 0xa0a20003, 0x00022000, -+ 0x88000280, 0x65160000, 0x00040105, 0x00244041, -+ } }, -+ { { /* 516 */ -+ 0x80300000, 0x00184008, 0x00000880, 0x00201140, -+ 0x00000000, 0x02900000, 0x50004588, 0x00221043, -+ } }, -+ { { /* 517 */ -+ 0x12004000, 0x0b800000, 0x20002405, 0x0000000c, -+ 0x08000000, 0x11000410, 0x04000030, 0x00200043, -+ } }, -+ { { /* 518 */ -+ 0x80011000, 0x18008042, 0x11000000, 0x00001008, -+ 0x00008000, 0x24440000, 0x00800000, 0x80100005, -+ } }, -+ { { /* 519 */ -+ 0x00108204, 0x02102400, 0x00010001, 0x80000200, -+ 0xa080e80a, 0x00010000, 0x20008000, 0x80122200, -+ } }, -+ { { /* 520 */ -+ 0x88211404, 0x04208041, 0x20088020, 0x18040000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 521 */ -+ 0x00401004, 0x02100002, 0x40014210, 0x50006000, -+ 0x00080008, 0x20000820, 0x00100211, 0x10000000, -+ } }, -+ { { /* 522 */ -+ 0x91005400, 0x00000000, 0x00000000, 0x08000000, -+ 0x41610032, 0xa0029d44, 0x000000d2, 0x41020004, -+ } }, -+ { { /* 523 */ -+ 0x00800104, 0x020000c0, 0x04090030, 0x80000204, -+ 0x82004000, 0x00000020, 0x00000000, 0x00000000, -+ } }, -+ { { /* 524 */ -+ 0x00000000, 0x00000000, 0x00000080, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 525 */ -+ 0xc373ff8b, 0x1b0f6840, 0xf34ce9ac, 0xc0080200, -+ 0xca3e795c, 0x06487976, 0xf7f02fdf, 0xa8ff033a, -+ } }, -+ { { /* 526 */ -+ 0x233fef37, 0xfd59b004, 0xfffff3ca, 0xfff9de9f, -+ 0x7df7abff, 0x8eecc000, 0xffdbeebf, 0x45fad003, -+ } }, -+ { { /* 527 */ -+ 0xdffefae1, 0x10abbfef, 0xfcaaffeb, 0x24fdef3f, -+ 0x7f7678ad, 0xedfff00c, 0x2cfacff6, 0xeb6bf7f9, -+ } }, -+ { { /* 528 */ -+ 0x95bf1ffd, 0xbfbf6677, 0xfeb43bfb, 0x11e27bae, -+ 0x41bea681, 0x72c31435, 0x71917d70, 0x276b0003, -+ } }, -+ { { /* 529 */ -+ 0x70cf57cb, 0x0def4732, 0xfc747eda, 0xbdb4fe06, -+ 0x8bca3f9f, 0x58007e49, 0xebec228f, 0xddbb8a5c, -+ } }, -+ { { /* 530 */ -+ 0xb6e7ef60, 0xf293a40f, 0x549e37bb, 0x9bafd04b, -+ 0xf7d4c414, 0x0a1430b0, 0x88d02f08, 0x192fff7e, -+ } }, -+ { { /* 531 */ -+ 0xfb07ffda, 0x7beb7ff1, 0x0010c5ef, 0xfdff99ff, -+ 0x056779d7, 0xfdcbffe7, 0x4040c3ff, 0xbd8e6ff7, -+ } }, -+ { { /* 532 */ -+ 0x0497dffa, 0x5bfff4c0, 0xd0e7ed7b, 0xf8e0047e, -+ 0xb73eff9f, 0x882e7dfe, 0xbe7ffffd, 0xf6c483fe, -+ } }, -+ { { /* 533 */ -+ 0xb8fdf357, 0xef7dd680, 0x47885767, 0xc3dfff7d, -+ 0x37a9f0ff, 0x70fc7de0, 0xec9a3f6f, 0x86814cb3, -+ } }, -+ { { /* 534 */ -+ 0xdd5c3f9e, 0x4819f70d, 0x0007fea3, 0x38ffaf56, -+ 0xefb8980d, 0xb760403d, 0x9035d8ce, 0x3fff72bf, -+ } }, -+ { { /* 535 */ -+ 0x7a117ff7, 0xabfff7bb, 0x6fbeff00, 0xfe72a93c, -+ 0xf11bcfef, 0xf40adb6b, 0xef7ec3e6, 0xf6109b9c, -+ } }, -+ { { /* 536 */ -+ 0x16f4f048, 0x5182feb5, 0x15bbc7b1, 0xfbdf6e87, -+ 0x63cde43f, 0x7e7ec1ff, 0x7d5ffdeb, 0xfcfe777b, -+ } }, -+ { { /* 537 */ -+ 0xdbea960b, 0x53e86229, 0xfdef37df, 0xbd8136f5, -+ 0xfcbddc18, 0xffffd2e4, 0xffe03fd7, 0xabf87f6f, -+ } }, -+ { { /* 538 */ -+ 0x6ed99bae, 0xf115f5fb, 0xbdfb79a9, 0xadaf5a3c, -+ 0x1facdbba, 0x837971fc, 0xc35f7cf7, 0x0567dfff, -+ } }, -+ { { /* 539 */ -+ 0x8467ff9a, 0xdf8b1534, 0x3373f9f3, 0x5e1af7bd, -+ 0xa03fbf40, 0x01ebffff, 0xcfdddfc0, 0xabd37500, -+ } }, -+ { { /* 540 */ -+ 0xeed6f8c3, 0xb7ff43fd, 0x42275eaf, 0xf6869bac, -+ 0xf6bc27d7, 0x35b7f787, 0xe176aacd, 0xe29f49e7, -+ } }, -+ { { /* 541 */ -+ 0xaff2545c, 0x61d82b3f, 0xbbb8fc3b, 0x7b7dffcf, -+ 0x1ce0bf95, 0x43ff7dfd, 0xfffe5ff6, 0xc4ced3ef, -+ } }, -+ { { /* 542 */ -+ 0xadbc8db6, 0x11eb63dc, 0x23d0df59, 0xf3dbbeb4, -+ 0xdbc71fe7, 0xfae4ff63, 0x63f7b22b, 0xadbaed3b, -+ } }, -+ { { /* 543 */ -+ 0x7efffe01, 0x02bcfff7, 0xef3932ff, 0x8005fffc, -+ 0xbcf577fb, 0xfff7010d, 0xbf3afffb, 0xdfff0057, -+ } }, -+ { { /* 544 */ -+ 0xbd7def7b, 0xc8d4db88, 0xed7cfff3, 0x56ff5dee, -+ 0xac5f7e0d, 0xd57fff96, 0xc1403fee, 0xffe76ff9, -+ } }, -+ { { /* 545 */ -+ 0x8e77779b, 0xe45d6ebf, 0x5f1f6fcf, 0xfedfe07f, -+ 0x01fed7db, 0xfb7bff00, 0x1fdfffd4, 0xfffff800, -+ } }, -+ { { /* 546 */ -+ 0x007bfb8f, 0x7f5cbf00, 0x07f3ffff, 0x3de7eba0, -+ 0xfbd7f7bf, 0x6003ffbf, 0xbfedfffd, 0x027fefbb, -+ } }, -+ { { /* 547 */ -+ 0xddfdfe40, 0xe2f9fdff, 0xfb1f680b, 0xaffdfbe3, -+ 0xf7ed9fa4, 0xf80f7a7d, 0x0fd5eebe, 0xfd9fbb5d, -+ } }, -+ { { /* 548 */ -+ 0x3bf9f2db, 0xebccfe7f, 0x73fa876a, 0x9ffc95fc, -+ 0xfaf7109f, 0xbbcdddb7, 0xeccdf87e, 0x3c3ff366, -+ } }, -+ { { /* 549 */ -+ 0xb03ffffd, 0x067ee9f7, 0xfe0696ae, 0x5fd7d576, -+ 0xa3f33fd1, 0x6fb7cf07, 0x7f449fd1, 0xd3dd7b59, -+ } }, -+ { { /* 550 */ -+ 0xa9bdaf3b, 0xff3a7dcf, 0xf6ebfbe0, 0xffffb401, -+ 0xb7bf7afa, 0x0ffdc000, 0xff1fff7f, 0x95fffefc, -+ } }, -+ { { /* 551 */ -+ 0xb5dc0000, 0x3f3eef63, 0x001bfb7f, 0xfbf6e800, -+ 0xb8df9eef, 0x003fff9f, 0xf5ff7bd0, 0x3fffdfdb, -+ } }, -+ { { /* 552 */ -+ 0x00bffdf0, 0xbbbd8420, 0xffdedf37, 0x0ff3ff6d, -+ 0x5efb604c, 0xfafbfffb, 0x0219fe5e, 0xf9de79f4, -+ } }, -+ { { /* 553 */ -+ 0xebfaa7f7, 0xff3401eb, 0xef73ebd3, 0xc040afd7, -+ 0xdcff72bb, 0x2fd8f17f, 0xfe0bb8ec, 0x1f0bdda3, -+ } }, -+ { { /* 554 */ -+ 0x47cf8f1d, 0xffdeb12b, 0xda737fee, 0xcbc424ff, -+ 0xcbf2f75d, 0xb4edecfd, 0x4dddbff9, 0xfb8d99dd, -+ } }, -+ { { /* 555 */ -+ 0xaf7bbb7f, 0xc959ddfb, 0xfab5fc4f, 0x6d5fafe3, -+ 0x3f7dffff, 0xffdb7800, 0x7effb6ff, 0x022ffbaf, -+ } }, -+ { { /* 556 */ -+ 0xefc7ff9b, 0xffffffa5, 0xc7000007, 0xfff1f7ff, -+ 0x01bf7ffd, 0xfdbcdc00, 0xffffbff5, 0x3effff7f, -+ } }, -+ { { /* 557 */ -+ 0xbe000029, 0xff7ff9ff, 0xfd7e6efb, 0x039ecbff, -+ 0xfbdde300, 0xf6dfccff, 0x117fffff, 0xfbf6f800, -+ } }, -+ { { /* 558 */ -+ 0xd73ce7ef, 0xdfeffeef, 0xedbfc00b, 0xfdcdfedf, -+ 0x40fd7bf5, 0xb75fffff, 0xf930ffdf, 0xdc97fbdf, -+ } }, -+ { { /* 559 */ -+ 0xbff2fef3, 0xdfbf8fdf, 0xede6177f, 0x35530f7f, -+ 0x877e447c, 0x45bbfa12, 0x779eede0, 0xbfd98017, -+ } }, -+ { { /* 560 */ -+ 0xde897e55, 0x0447c16f, 0xf75d7ade, 0x290557ff, -+ 0xfe9586f7, 0xf32f97b3, 0x9f75cfff, 0xfb1771f7, -+ } }, -+ { { /* 561 */ -+ 0xee1934ee, 0xef6137cc, 0xef4c9fd6, 0xfbddd68f, -+ 0x6def7b73, 0xa431d7fe, 0x97d75e7f, 0xffd80f5b, -+ } }, -+ { { /* 562 */ -+ 0x7bce9d83, 0xdcff22ec, 0xef87763d, 0xfdeddfe7, -+ 0xa0fc4fff, 0xdbfc3b77, 0x7fdc3ded, 0xf5706fa9, -+ } }, -+ { { /* 563 */ -+ 0x2c403ffb, 0x847fff7f, 0xdeb7ec57, 0xf22fe69c, -+ 0xd5b50feb, 0xede7afeb, 0xfff08c2f, 0xe8f0537f, -+ } }, -+ { { /* 564 */ -+ 0xb5ffb99d, 0xe78fff66, 0xbe10d981, 0xe3c19c7c, -+ 0x27339cd1, 0xff6d0cbc, 0xefb7fcb7, 0xffffa0df, -+ } }, -+ { { /* 565 */ -+ 0xfe7bbf0b, 0x353fa3ff, 0x97cd13cc, 0xfb277637, -+ 0x7e6ccfd6, 0xed31ec50, 0xfc1c677c, 0x5fbff6fa, -+ } }, -+ { { /* 566 */ -+ 0xae2f0fba, 0x7ffea3ad, 0xde74fcf0, 0xf200ffef, -+ 0xfea2fbbf, 0xbcff3daf, 0x5fb9f694, 0x3f8ff3ad, -+ } }, -+ { { /* 567 */ -+ 0xa01ff26c, 0x01bfffef, 0x70057728, 0xda03ff35, -+ 0xc7fad2f9, 0x5c1d3fbf, 0xec33ff3a, 0xfe9cb7af, -+ } }, -+ { { /* 568 */ -+ 0x7a9f5236, 0xe722bffa, 0xfcff9ff7, 0xb61d2fbb, -+ 0x1dfded06, 0xefdf7dd7, 0xf166eb23, 0x0dc07ed9, -+ } }, -+ { { /* 569 */ -+ 0xdfbf3d3d, 0xba83c945, 0x9dd07dd1, 0xcf737b87, -+ 0xc3f59ff3, 0xc5fedf0d, 0x83020cb3, 0xaec0e879, -+ } }, -+ { { /* 570 */ -+ 0x6f0fc773, 0x093ffd7d, 0x0157fff1, 0x01ff62fb, -+ 0x3bf3fdb4, 0x43b2b013, 0xff305ed3, 0xeb9f0fff, -+ } }, -+ { { /* 571 */ -+ 0xf203feef, 0xfb893fef, 0x9e9937a9, 0xa72cdef9, -+ 0xc1f63733, 0xfe3e812e, 0xf2f75d20, 0x69d7d585, -+ } }, -+ { { /* 572 */ -+ 0xffffffff, 0xff6fdb07, 0xd97fc4ff, 0xbe0fefce, -+ 0xf05ef17b, 0xffb7f6cf, 0xef845ef7, 0x0edfd7cb, -+ } }, -+ { { /* 573 */ -+ 0xfcffff08, 0xffffee3f, 0xd7ff13ff, 0x7ffdaf0f, -+ 0x1ffabdc7, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 574 */ -+ 0x00000000, 0xe7400000, 0xf933bd38, 0xfeed7feb, -+ 0x7c767fe8, 0xffefb3f7, 0xd8b7feaf, 0xfbbfff6f, -+ } }, -+ { { /* 575 */ -+ 0xdbf7f8fb, 0xe2f91752, 0x754785c8, 0xe3ef9090, -+ 0x3f6d9ef4, 0x0536ee2e, 0x7ff3f7bc, 0x7f3fa07b, -+ } }, -+ { { /* 576 */ -+ 0xeb600567, 0x6601babe, 0x583ffcd8, 0x87dfcaf7, -+ 0xffa0bfcd, 0xfebf5bcd, 0xefa7b6fd, 0xdf9c77ef, -+ } }, -+ { { /* 577 */ -+ 0xf8773fb7, 0xb7fc9d27, 0xdfefcab5, 0xf1b6fb5a, -+ 0xef1fec39, 0x7ffbfbbf, 0xdafe000d, 0x4e7fbdfb, -+ } }, -+ { { /* 578 */ -+ 0x5ac033ff, 0x9ffebff5, 0x005fffbf, 0xfdf80000, -+ 0x6ffdffca, 0xa001cffd, 0xfbf2dfff, 0xff7fdfbf, -+ } }, -+ { { /* 579 */ -+ 0x080ffeda, 0xbfffba08, 0xeed77afd, 0x67f9fbeb, -+ 0xff93e044, 0x9f57df97, 0x08dffef7, 0xfedfdf80, -+ } }, -+ { { /* 580 */ -+ 0xf7feffc5, 0x6803fffb, 0x6bfa67fb, 0x5fe27fff, -+ 0xff73ffff, 0xe7fb87df, 0xf7a7ebfd, 0xefc7bf7e, -+ } }, -+ { { /* 581 */ -+ 0xdf821ef3, 0xdf7e76ff, 0xda7d79c9, 0x1e9befbe, -+ 0x77fb7ce0, 0xfffb87be, 0xffdb1bff, 0x4fe03f5c, -+ } }, -+ { { /* 582 */ -+ 0x5f0e7fff, 0xddbf77ff, 0xfffff04f, 0x0ff8ffff, -+ 0xfddfa3be, 0xfffdfc1c, 0xfb9e1f7d, 0xdedcbdff, -+ } }, -+ { { /* 583 */ -+ 0xbafb3f6f, 0xfbefdf7f, 0x2eec7d1b, 0xf2f7af8e, -+ 0xcfee7b0f, 0x77c61d96, 0xfff57e07, 0x7fdfd982, -+ } }, -+ { { /* 584 */ -+ 0xc7ff5ee6, 0x79effeee, 0xffcf9a56, 0xde5efe5f, -+ 0xf9e8896e, 0xe6c4f45e, 0xbe7c0001, 0xdddf3b7f, -+ } }, -+ { { /* 585 */ -+ 0xe9efd59d, 0xde5334ac, 0x4bf7f573, 0x9eff7b4f, -+ 0x476eb8fe, 0xff450dfb, 0xfbfeabfd, 0xddffe9d7, -+ } }, -+ { { /* 586 */ -+ 0x7fffedf7, 0x7eebddfd, 0xb7ffcfe7, 0xef91bde9, -+ 0xd77c5d75, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 587 */ -+ 0x00000000, 0xfa800000, 0xb4f1ffee, 0x2fefbf76, -+ 0x77bfb677, 0xfffd9fbf, 0xf6ae95bf, 0x7f3b75ff, -+ } }, -+ { { /* 588 */ -+ 0x0af9a7f5, 0x00000000, 0x00000000, 0x2bddfbd0, -+ 0x9a7ff633, 0xd6fcfdab, 0xbfebf9e6, 0xf41fdfdf, -+ } }, -+ { { /* 589 */ -+ 0xffffa6fd, 0xf37b4aff, 0xfef97fb7, 0x1d5cb6ff, -+ 0xe5ff7ff6, 0x24041f7b, 0xf99ebe05, 0xdff2dbe3, -+ } }, -+ { { /* 590 */ -+ 0xfdff6fef, 0xcbfcd679, 0xefffebfd, 0x0000001f, -+ 0x98000000, 0x8017e148, 0x00fe6a74, 0xfdf16d7f, -+ } }, -+ { { /* 591 */ -+ 0xfef3b87f, 0xf176e01f, 0x7b3fee96, 0xfffdeb8d, -+ 0xcbb3adff, 0xe17f84ef, 0xbff04daa, 0xfe3fbf3f, -+ } }, -+ { { /* 592 */ -+ 0xffd7ebff, 0xcf7fffdf, 0x85edfffb, 0x07bcd73f, -+ 0xfe0faeff, 0x76bffdaf, 0x37bbfaef, 0xa3ba7fdc, -+ } }, -+ { { /* 593 */ -+ 0x56f7b6ff, 0xe7df60f8, 0x4cdfff61, 0xff45b0fb, -+ 0x3ffa7ded, 0x18fc1fff, 0xe3afffff, 0xdf83c7d3, -+ } }, -+ { { /* 594 */ -+ 0xef7dfb57, 0x1378efff, 0x5ff7fec0, 0x5ee334bb, -+ 0xeff6f70d, 0x00bfd7fe, 0xf7f7f59d, 0xffe051de, -+ } }, -+ { { /* 595 */ -+ 0x037ffec9, 0xbfef5f01, 0x60a79ff1, 0xf1ffef1d, -+ 0x0000000f, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+ { { /* 596 */ -+ 0x00000000, 0x00000000, 0x00000000, 0x3c800000, -+ 0xd91ffb4d, 0xfee37b3a, 0xdc7f3fe9, 0x0000003f, -+ } }, -+ { { /* 597 */ -+ 0x50000000, 0xbe07f51f, 0xf91bfc1d, 0x71ffbc1e, -+ 0x5bbe6ff9, 0x9b1b5796, 0xfffc7fff, 0xafe7872e, -+ } }, -+ { { /* 598 */ -+ 0xf34febf5, 0xe725dffd, 0x5d440bdc, 0xfddd5747, -+ 0x7790ed3f, 0x8ac87d7f, 0xf3f9fafa, 0xef4b202a, -+ } }, -+ { { /* 599 */ -+ 0x79cff5ff, 0x0ba5abd3, 0xfb8ff77a, 0x001f8ebd, -+ 0x00000000, 0xfd4ef300, 0x88001a57, 0x7654aeac, -+ } }, -+ { { /* 600 */ -+ 0xcdff17ad, 0xf42fffb2, 0xdbff5baa, 0x00000002, -+ 0x73c00000, 0x2e3ff9ea, 0xbbfffa8e, 0xffd376bc, -+ } }, -+ { { /* 601 */ -+ 0x7e72eefe, 0xe7f77ebd, 0xcefdf77f, 0x00000ff5, -+ 0x00000000, 0xdb9ba900, 0x917fa4c7, 0x7ecef8ca, -+ } }, -+ { { /* 602 */ -+ 0xc7e77d7a, 0xdcaecbbd, 0x8f76fd7e, 0x7cf391d3, -+ 0x4c2f01e5, 0xa360ed77, 0x5ef807db, 0x21811df7, -+ } }, -+ { { /* 603 */ -+ 0x309c6be0, 0xfade3b3a, 0xc3f57f53, 0x07ba61cd, -+ 0x00000000, 0x00000000, 0x00000000, 0xbefe26e0, -+ } }, -+ { { /* 604 */ -+ 0xebb503f9, 0xe9cbe36d, 0xbfde9c2f, 0xabbf9f83, -+ 0xffd51ff7, 0xdffeb7df, 0xffeffdae, 0xeffdfb7e, -+ } }, -+ { { /* 605 */ -+ 0x6ebfaaff, 0x00000000, 0x00000000, 0xb6200000, -+ 0xbe9e7fcd, 0x58f162b3, 0xfd7bf10d, 0xbefde9f1, -+ } }, -+ { { /* 606 */ -+ 0x5f6dc6c3, 0x69ffff3d, 0xfbf4ffcf, 0x4ff7dcfb, -+ 0x11372000, 0x00000015, 0x00000000, 0x00000000, -+ } }, -+ { { /* 607 */ -+ 0x00003000, 0x00000000, 0x00000000, 0x00000000, -+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, -+ } }, -+}, -+{ -+ /* aa */ -+ LEAF( 0, 0), -+ /* ab */ -+ LEAF( 1, 1), -+ /* af */ -+ LEAF( 2, 2), LEAF( 2, 3), -+ /* ak */ -+ LEAF( 4, 4), LEAF( 4, 5), LEAF( 4, 6), LEAF( 4, 7), -+ LEAF( 4, 8), -+ /* am */ -+ LEAF( 9, 9), LEAF( 9, 10), -+ /* an */ -+ LEAF( 11, 11), -+ /* ar */ -+ LEAF( 12, 12), -+ /* as */ -+ LEAF( 13, 13), -+ /* av */ -+ LEAF( 14, 14), -+ /* ay */ -+ LEAF( 15, 15), -+ /* az_az */ -+ LEAF( 16, 16), LEAF( 16, 17), LEAF( 16, 18), -+ /* az_ir */ -+ LEAF( 19, 19), -+ /* ba */ -+ LEAF( 20, 20), -+ /* be */ -+ LEAF( 21, 21), -+ /* ber_dz */ -+ LEAF( 22, 22), LEAF( 22, 23), LEAF( 22, 24), LEAF( 22, 25), -+ /* ber_ma */ -+ LEAF( 26, 26), -+ /* bg */ -+ LEAF( 27, 27), -+ /* bh */ -+ LEAF( 28, 28), -+ /* bi */ -+ LEAF( 29, 29), -+ /* bin */ -+ LEAF( 30, 30), LEAF( 30, 31), LEAF( 30, 32), -+ /* bm */ -+ LEAF( 33, 22), LEAF( 33, 33), LEAF( 33, 34), -+ /* bn */ -+ LEAF( 36, 35), -+ /* bo */ -+ LEAF( 37, 36), -+ /* br */ -+ LEAF( 38, 37), -+ /* bs */ -+ LEAF( 39, 22), LEAF( 39, 38), -+ /* bua */ -+ LEAF( 41, 39), -+ /* byn */ -+ LEAF( 42, 40), LEAF( 42, 41), -+ /* ca */ -+ LEAF( 44, 42), LEAF( 44, 43), -+ /* ch */ -+ LEAF( 46, 44), -+ /* chm */ -+ LEAF( 47, 45), -+ /* chr */ -+ LEAF( 48, 46), -+ /* co */ -+ LEAF( 49, 47), LEAF( 49, 48), -+ /* crh */ -+ LEAF( 51, 49), LEAF( 51, 50), -+ /* cs */ -+ LEAF( 53, 51), LEAF( 53, 52), -+ /* csb */ -+ LEAF( 55, 53), LEAF( 55, 54), -+ /* cu */ -+ LEAF( 57, 55), -+ /* cv */ -+ LEAF( 58, 56), LEAF( 58, 57), -+ /* cy */ -+ LEAF( 60, 58), LEAF( 60, 59), LEAF( 60, 60), -+ /* da */ -+ LEAF( 63, 61), -+ /* de */ -+ LEAF( 64, 62), -+ /* dv */ -+ LEAF( 65, 63), -+ /* ee */ -+ LEAF( 66, 30), LEAF( 66, 64), LEAF( 66, 65), LEAF( 66, 66), -+ /* el */ -+ LEAF( 70, 67), -+ /* en */ -+ LEAF( 71, 68), -+ /* eo */ -+ LEAF( 72, 22), LEAF( 72, 69), -+ /* et */ -+ LEAF( 74, 70), LEAF( 74, 71), -+ /* eu */ -+ LEAF( 76, 72), -+ /* ff */ -+ LEAF( 77, 22), LEAF( 77, 73), LEAF( 77, 74), -+ /* fi */ -+ LEAF( 80, 75), LEAF( 80, 71), -+ /* fil */ -+ LEAF( 82, 76), -+ /* fj */ -+ LEAF( 83, 22), -+ /* fo */ -+ LEAF( 84, 77), -+ /* fur */ -+ LEAF( 85, 78), -+ /* fy */ -+ LEAF( 86, 79), -+ /* ga */ -+ LEAF( 87, 80), LEAF( 87, 81), LEAF( 87, 82), -+ /* gd */ -+ LEAF( 90, 83), -+ /* gez */ -+ LEAF( 91, 84), LEAF( 91, 85), -+ /* gn */ -+ LEAF( 93, 86), LEAF( 93, 87), LEAF( 93, 88), -+ /* gu */ -+ LEAF( 96, 89), -+ /* gv */ -+ LEAF( 97, 90), -+ /* ha */ -+ LEAF( 98, 22), LEAF( 98, 91), LEAF( 98, 92), -+ /* haw */ -+ LEAF(101, 22), LEAF(101, 93), LEAF(101, 94), -+ /* he */ -+ LEAF(104, 95), -+ /* hsb */ -+ LEAF(105, 96), LEAF(105, 97), -+ /* ht */ -+ LEAF(107, 98), -+ /* hu */ -+ LEAF(108, 99), LEAF(108,100), -+ /* hy */ -+ LEAF(110,101), -+ /* hz */ -+ LEAF(111, 22), LEAF(111,102), LEAF(111,103), -+ /* id */ -+ LEAF(114,104), -+ /* ig */ -+ LEAF(115, 22), LEAF(115,105), -+ /* ii */ -+ LEAF(117,106), LEAF(117,106), LEAF(117,106), LEAF(117,106), -+ LEAF(117,107), -+ /* ik */ -+ LEAF(122,108), -+ /* is */ -+ LEAF(123,109), -+ /* it */ -+ LEAF(124,110), -+ /* iu */ -+ LEAF(125,111), LEAF(125,112), LEAF(125,113), -+ /* ja */ -+ LEAF(128,114), LEAF(128,115), LEAF(128,116), LEAF(128,117), -+ LEAF(128,118), LEAF(128,119), LEAF(128,120), LEAF(128,121), -+ LEAF(128,122), LEAF(128,123), LEAF(128,124), LEAF(128,125), -+ LEAF(128,126), LEAF(128,127), LEAF(128,128), LEAF(128,129), -+ LEAF(128,130), LEAF(128,131), LEAF(128,132), LEAF(128,133), -+ LEAF(128,134), LEAF(128,135), LEAF(128,136), LEAF(128,137), -+ LEAF(128,138), LEAF(128,139), LEAF(128,140), LEAF(128,141), -+ LEAF(128,142), LEAF(128,143), LEAF(128,144), LEAF(128,145), -+ LEAF(128,146), LEAF(128,147), LEAF(128,148), LEAF(128,149), -+ LEAF(128,150), LEAF(128,151), LEAF(128,152), LEAF(128,153), -+ LEAF(128,154), LEAF(128,155), LEAF(128,156), LEAF(128,157), -+ LEAF(128,158), LEAF(128,159), LEAF(128,160), LEAF(128,161), -+ LEAF(128,162), LEAF(128,163), LEAF(128,164), LEAF(128,165), -+ LEAF(128,166), LEAF(128,167), LEAF(128,168), LEAF(128,169), -+ LEAF(128,170), LEAF(128,171), LEAF(128,172), LEAF(128,173), -+ LEAF(128,174), LEAF(128,175), LEAF(128,176), LEAF(128,177), -+ LEAF(128,178), LEAF(128,179), LEAF(128,180), LEAF(128,181), -+ LEAF(128,182), LEAF(128,183), LEAF(128,184), LEAF(128,185), -+ LEAF(128,186), LEAF(128,187), LEAF(128,188), LEAF(128,189), -+ LEAF(128,190), LEAF(128,191), LEAF(128,192), LEAF(128,193), -+ LEAF(128,194), LEAF(128,195), LEAF(128,196), -+ /* jv */ -+ LEAF(211,197), -+ /* ka */ -+ LEAF(212,198), -+ /* kaa */ -+ LEAF(213,199), -+ /* ki */ -+ LEAF(214, 22), LEAF(214,200), -+ /* kk */ -+ LEAF(216,201), -+ /* kl */ -+ LEAF(217,202), LEAF(217,203), -+ /* km */ -+ LEAF(219,204), -+ /* kn */ -+ LEAF(220,205), -+ /* ko */ -+ LEAF(221,206), LEAF(221,207), LEAF(221,208), LEAF(221,209), -+ LEAF(221,210), LEAF(221,211), LEAF(221,212), LEAF(221,213), -+ LEAF(221,214), LEAF(221,215), LEAF(221,216), LEAF(221,217), -+ LEAF(221,218), LEAF(221,219), LEAF(221,220), LEAF(221,221), -+ LEAF(221,222), LEAF(221,223), LEAF(221,224), LEAF(221,225), -+ LEAF(221,226), LEAF(221,227), LEAF(221,228), LEAF(221,229), -+ LEAF(221,230), LEAF(221,231), LEAF(221,232), LEAF(221,233), -+ LEAF(221,234), LEAF(221,235), LEAF(221,236), LEAF(221,237), -+ LEAF(221,238), LEAF(221,239), LEAF(221,240), LEAF(221,241), -+ LEAF(221,242), LEAF(221,243), LEAF(221,244), LEAF(221,245), -+ LEAF(221,246), LEAF(221,247), LEAF(221,248), LEAF(221,249), -+ LEAF(221,250), -+ /* kr */ -+ LEAF(266, 22), LEAF(266,251), LEAF(266,252), -+ /* ks */ -+ LEAF(269,253), -+ /* ku_am */ -+ LEAF(270,254), LEAF(270,255), -+ /* ku_iq */ -+ LEAF(272,256), -+ /* ku_tr */ -+ LEAF(273,257), LEAF(273,258), -+ /* kum */ -+ LEAF(275,259), -+ /* kv */ -+ LEAF(276,260), -+ /* kw */ -+ LEAF(277, 22), LEAF(277, 93), LEAF(277,261), -+ /* ky */ -+ LEAF(280,262), -+ /* la */ -+ LEAF(281, 22), LEAF(281,263), -+ /* lb */ -+ LEAF(283,264), -+ /* lg */ -+ LEAF(284, 22), LEAF(284,265), -+ /* li */ -+ LEAF(286,266), -+ /* ln */ -+ LEAF(287,267), LEAF(287,268), LEAF(287, 6), LEAF(287,269), -+ /* lo */ -+ LEAF(291,270), -+ /* lt */ -+ LEAF(292, 22), LEAF(292,271), -+ /* lv */ -+ LEAF(294, 22), LEAF(294,272), -+ /* mg */ -+ LEAF(296,273), -+ /* mh */ -+ LEAF(297, 22), LEAF(297,274), -+ /* mi */ -+ LEAF(299, 22), LEAF(299, 93), LEAF(299,275), -+ /* mk */ -+ LEAF(302,276), -+ /* ml */ -+ LEAF(303,277), -+ /* mn_cn */ -+ LEAF(304,278), -+ /* mn_mn */ -+ LEAF(305,279), -+ /* mo */ -+ LEAF(306,280), LEAF(306, 56), LEAF(306,281), LEAF(306,259), -+ /* mt */ -+ LEAF(310,282), LEAF(310,283), -+ /* my */ -+ LEAF(312,284), -+ /* na */ -+ LEAF(313, 4), LEAF(313,285), -+ /* nb */ -+ LEAF(315,286), -+ /* nl */ -+ LEAF(316,287), -+ /* nn */ -+ LEAF(317,288), -+ /* nso */ -+ LEAF(318,289), LEAF(318,290), -+ /* nv */ -+ LEAF(320,291), LEAF(320,292), LEAF(320,293), LEAF(320,294), -+ /* ny */ -+ LEAF(324, 22), LEAF(324,295), -+ /* oc */ -+ LEAF(326,296), -+ /* or */ -+ LEAF(327,297), -+ /* ota */ -+ LEAF(328,298), -+ /* pa */ -+ LEAF(329,299), -+ /* pap_an */ -+ LEAF(330,300), -+ /* pap_aw */ -+ LEAF(331,301), -+ /* pl */ -+ LEAF(332, 96), LEAF(332,302), -+ /* ps_af */ -+ LEAF(334,303), -+ /* ps_pk */ -+ LEAF(335,304), -+ /* pt */ -+ LEAF(336,305), -+ /* qu */ -+ LEAF(337,301), LEAF(337,306), -+ /* rm */ -+ LEAF(339,307), -+ /* ro */ -+ LEAF(340,280), LEAF(340, 56), LEAF(340,281), -+ /* sah */ -+ LEAF(343,308), -+ /* sc */ -+ LEAF(344,309), -+ /* sco */ -+ LEAF(345, 22), LEAF(345,310), LEAF(345,311), -+ /* sd */ -+ LEAF(348,312), -+ /* se */ -+ LEAF(349,313), LEAF(349,314), -+ /* sg */ -+ LEAF(351,315), -+ /* sh */ -+ LEAF(352, 22), LEAF(352, 38), LEAF(352,316), -+ /* shs */ -+ LEAF(355,317), LEAF(355,318), -+ /* si */ -+ LEAF(357,319), -+ /* sid */ -+ LEAF(358,320), LEAF(358, 10), -+ /* sk */ -+ LEAF(360,321), LEAF(360,322), -+ /* sm */ -+ LEAF(362, 22), LEAF(362, 94), -+ /* sma */ -+ LEAF(364,323), -+ /* smj */ -+ LEAF(365,324), -+ /* smn */ -+ LEAF(366,325), LEAF(366,326), -+ /* sms */ -+ LEAF(368,327), LEAF(368,328), LEAF(368,329), -+ /* sq */ -+ LEAF(371,330), -+ /* sr */ -+ LEAF(372,331), -+ /* sv */ -+ LEAF(373,332), -+ /* syr */ -+ LEAF(374,333), -+ /* ta */ -+ LEAF(375,334), -+ /* te */ -+ LEAF(376,335), -+ /* tg */ -+ LEAF(377,336), -+ /* th */ -+ LEAF(378,337), -+ /* tig */ -+ LEAF(379,338), LEAF(379, 41), -+ /* tk */ -+ LEAF(381,339), LEAF(381,340), -+ /* tr */ -+ LEAF(383,341), LEAF(383, 50), -+ /* tt */ -+ LEAF(385,342), -+ /* ty */ -+ LEAF(386,343), LEAF(386, 93), LEAF(386,293), -+ /* uk */ -+ LEAF(389,344), -+ /* ve */ -+ LEAF(390, 22), LEAF(390,345), -+ /* vi */ -+ LEAF(392,346), LEAF(392,347), LEAF(392,348), LEAF(392,349), -+ /* vo */ -+ LEAF(396,350), -+ /* vot */ -+ LEAF(397,351), LEAF(397, 71), -+ /* wa */ -+ LEAF(399,352), -+ /* wen */ -+ LEAF(400, 96), LEAF(400,353), -+ /* wo */ -+ LEAF(402,354), LEAF(402,265), -+ /* yap */ -+ LEAF(404,355), -+ /* yo */ -+ LEAF(405,356), LEAF(405,357), LEAF(405,358), LEAF(405,359), -+ /* zh_cn */ -+ LEAF(409,360), LEAF(409,361), LEAF(409,362), LEAF(409,363), -+ LEAF(409,364), LEAF(409,365), LEAF(409,366), LEAF(409,367), -+ LEAF(409,368), LEAF(409,369), LEAF(409,370), LEAF(409,371), -+ LEAF(409,372), LEAF(409,373), LEAF(409,374), LEAF(409,375), -+ LEAF(409,376), LEAF(409,377), LEAF(409,378), LEAF(409,379), -+ LEAF(409,380), LEAF(409,381), LEAF(409,382), LEAF(409,383), -+ LEAF(409,384), LEAF(409,385), LEAF(409,386), LEAF(409,387), -+ LEAF(409,388), LEAF(409,389), LEAF(409,390), LEAF(409,391), -+ LEAF(409,392), LEAF(409,393), LEAF(409,394), LEAF(409,395), -+ LEAF(409,396), LEAF(409,397), LEAF(409,398), LEAF(409,399), -+ LEAF(409,400), LEAF(409,401), LEAF(409,402), LEAF(409,403), -+ LEAF(409,404), LEAF(409,405), LEAF(409,406), LEAF(409,407), -+ LEAF(409,408), LEAF(409,409), LEAF(409,410), LEAF(409,411), -+ LEAF(409,412), LEAF(409,413), LEAF(409,414), LEAF(409,415), -+ LEAF(409,416), LEAF(409,417), LEAF(409,418), LEAF(409,419), -+ LEAF(409,420), LEAF(409,421), LEAF(409,422), LEAF(409,423), -+ LEAF(409,424), LEAF(409,425), LEAF(409,426), LEAF(409,427), -+ LEAF(409,428), LEAF(409,429), LEAF(409,430), LEAF(409,431), -+ LEAF(409,432), LEAF(409,433), LEAF(409,434), LEAF(409,435), -+ LEAF(409,436), LEAF(409,437), LEAF(409,438), LEAF(409,439), -+ LEAF(409,440), LEAF(409,441), -+ /* zh_hk */ -+ LEAF(491,442), LEAF(491,443), LEAF(491,444), LEAF(491,445), -+ LEAF(491,446), LEAF(491,447), LEAF(491,448), LEAF(491,449), -+ LEAF(491,450), LEAF(491,451), LEAF(491,452), LEAF(491,453), -+ LEAF(491,454), LEAF(491,455), LEAF(491,456), LEAF(491,457), -+ LEAF(491,458), LEAF(491,459), LEAF(491,460), LEAF(491,461), -+ LEAF(491,462), LEAF(491,463), LEAF(491,464), LEAF(491,465), -+ LEAF(491,466), LEAF(491,467), LEAF(491,468), LEAF(491,469), -+ LEAF(491,470), LEAF(491,471), LEAF(491,472), LEAF(491,473), -+ LEAF(491,474), LEAF(491,475), LEAF(491,476), LEAF(491,477), -+ LEAF(491,478), LEAF(491,479), LEAF(491,480), LEAF(491,481), -+ LEAF(491,482), LEAF(491,483), LEAF(491,484), LEAF(491,485), -+ LEAF(491,486), LEAF(491,487), LEAF(491,488), LEAF(491,489), -+ LEAF(491,490), LEAF(491,491), LEAF(491,492), LEAF(491,493), -+ LEAF(491,494), LEAF(491,495), LEAF(491,496), LEAF(491,497), -+ LEAF(491,498), LEAF(491,499), LEAF(491,500), LEAF(491,501), -+ LEAF(491,502), LEAF(491,503), LEAF(491,504), LEAF(491,505), -+ LEAF(491,506), LEAF(491,507), LEAF(491,508), LEAF(491,509), -+ LEAF(491,510), LEAF(491,511), LEAF(491,512), LEAF(491,513), -+ LEAF(491,514), LEAF(491,515), LEAF(491,516), LEAF(491,517), -+ LEAF(491,518), LEAF(491,519), LEAF(491,520), LEAF(491,521), -+ LEAF(491,522), LEAF(491,523), LEAF(491,524), -+ /* zh_tw */ -+ LEAF(574,525), LEAF(574,526), LEAF(574,527), LEAF(574,528), -+ LEAF(574,529), LEAF(574,530), LEAF(574,531), LEAF(574,532), -+ LEAF(574,533), LEAF(574,534), LEAF(574,535), LEAF(574,536), -+ LEAF(574,537), LEAF(574,538), LEAF(574,539), LEAF(574,540), -+ LEAF(574,541), LEAF(574,542), LEAF(574,543), LEAF(574,544), -+ LEAF(574,545), LEAF(574,546), LEAF(574,547), LEAF(574,548), -+ LEAF(574,549), LEAF(574,550), LEAF(574,551), LEAF(574,552), -+ LEAF(574,553), LEAF(574,554), LEAF(574,555), LEAF(574,556), -+ LEAF(574,557), LEAF(574,558), LEAF(574,559), LEAF(574,560), -+ LEAF(574,561), LEAF(574,562), LEAF(574,563), LEAF(574,564), -+ LEAF(574,565), LEAF(574,566), LEAF(574,567), LEAF(574,568), -+ LEAF(574,569), LEAF(574,570), LEAF(574,571), LEAF(574,572), -+ LEAF(574,573), LEAF(574,574), LEAF(574,575), LEAF(574,576), -+ LEAF(574,577), LEAF(574,578), LEAF(574,579), LEAF(574,580), -+ LEAF(574,581), LEAF(574,582), LEAF(574,583), LEAF(574,584), -+ LEAF(574,585), LEAF(574,586), LEAF(574,587), LEAF(574,588), -+ LEAF(574,589), LEAF(574,590), LEAF(574,591), LEAF(574,592), -+ LEAF(574,593), LEAF(574,594), LEAF(574,595), LEAF(574,596), -+ LEAF(574,597), LEAF(574,598), LEAF(574,599), LEAF(574,600), -+ LEAF(574,601), LEAF(574,602), LEAF(574,603), LEAF(574,604), -+ LEAF(574,605), LEAF(574,606), LEAF(574,607), -+}, -+{ -+ /* aa */ -+ 0x0000, -+ /* ab */ -+ 0x0004, -+ /* af */ -+ 0x0000, 0x0001, -+ /* ak */ -+ 0x0000, 0x0001, 0x0002, 0x0003, 0x001e, -+ /* am */ -+ 0x0012, 0x0013, -+ /* an */ -+ 0x0000, -+ /* ar */ -+ 0x0006, -+ /* as */ -+ 0x0009, -+ /* av */ -+ 0x0004, -+ /* ay */ -+ 0x0000, -+ /* az_az */ -+ 0x0000, 0x0001, 0x0002, -+ /* az_ir */ -+ 0x0006, -+ /* ba */ -+ 0x0004, -+ /* be */ -+ 0x0004, -+ /* ber_dz */ -+ 0x0000, 0x0001, 0x0002, 0x001e, -+ /* ber_ma */ -+ 0x002d, -+ /* bg */ -+ 0x0004, -+ /* bh */ -+ 0x0009, -+ /* bi */ -+ 0x0000, -+ /* bin */ -+ 0x0000, 0x0003, 0x001e, -+ /* bm */ -+ 0x0000, 0x0001, 0x0002, -+ /* bn */ -+ 0x0009, -+ /* bo */ -+ 0x000f, -+ /* br */ -+ 0x0000, -+ /* bs */ -+ 0x0000, 0x0001, -+ /* bua */ -+ 0x0004, -+ /* byn */ -+ 0x0012, 0x0013, -+ /* ca */ -+ 0x0000, 0x0001, -+ /* ch */ -+ 0x0000, -+ /* chm */ -+ 0x0004, -+ /* chr */ -+ 0x0013, -+ /* co */ -+ 0x0000, 0x0001, -+ /* crh */ -+ 0x0000, 0x0001, -+ /* cs */ -+ 0x0000, 0x0001, -+ /* csb */ -+ 0x0000, 0x0001, -+ /* cu */ -+ 0x0004, -+ /* cv */ -+ 0x0001, 0x0004, -+ /* cy */ -+ 0x0000, 0x0001, 0x001e, -+ /* da */ -+ 0x0000, -+ /* de */ -+ 0x0000, -+ /* dv */ -+ 0x0007, -+ /* ee */ -+ 0x0000, 0x0001, 0x0002, 0x0003, -+ /* el */ -+ 0x0003, -+ /* en */ -+ 0x0000, -+ /* eo */ -+ 0x0000, 0x0001, -+ /* et */ -+ 0x0000, 0x0001, -+ /* eu */ -+ 0x0000, -+ /* ff */ -+ 0x0000, 0x0001, 0x0002, -+ /* fi */ -+ 0x0000, 0x0001, -+ /* fil */ -+ 0x0000, -+ /* fj */ -+ 0x0000, -+ /* fo */ -+ 0x0000, -+ /* fur */ -+ 0x0000, -+ /* fy */ -+ 0x0000, -+ /* ga */ -+ 0x0000, 0x0001, 0x001e, -+ /* gd */ -+ 0x0000, -+ /* gez */ -+ 0x0012, 0x0013, -+ /* gn */ -+ 0x0000, 0x0001, 0x001e, -+ /* gu */ -+ 0x000a, -+ /* gv */ -+ 0x0000, -+ /* ha */ -+ 0x0000, 0x0001, 0x0002, -+ /* haw */ -+ 0x0000, 0x0001, 0x0002, -+ /* he */ -+ 0x0005, -+ /* hsb */ -+ 0x0000, 0x0001, -+ /* ht */ -+ 0x0000, -+ /* hu */ -+ 0x0000, 0x0001, -+ /* hy */ -+ 0x0005, -+ /* hz */ -+ 0x0000, 0x0003, 0x001e, -+ /* id */ -+ 0x0000, -+ /* ig */ -+ 0x0000, 0x001e, -+ /* ii */ -+ 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, -+ /* ik */ -+ 0x0004, -+ /* is */ -+ 0x0000, -+ /* it */ -+ 0x0000, -+ /* iu */ -+ 0x0014, 0x0015, 0x0016, -+ /* ja */ -+ 0x0030, 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, -+ 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, -+ 0x005d, 0x005e, 0x005f, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, -+ 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, -+ 0x006d, 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, -+ 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, -+ 0x007d, 0x007e, 0x007f, 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, -+ 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, -+ 0x008d, 0x008e, 0x008f, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, -+ 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, -+ 0x009d, 0x009e, 0x009f, -+ /* jv */ -+ 0x0000, -+ /* ka */ -+ 0x0010, -+ /* kaa */ -+ 0x0004, -+ /* ki */ -+ 0x0000, 0x0001, -+ /* kk */ -+ 0x0004, -+ /* kl */ -+ 0x0000, 0x0001, -+ /* km */ -+ 0x0017, -+ /* kn */ -+ 0x000c, -+ /* ko */ -+ 0x0031, 0x00ac, 0x00ad, 0x00ae, 0x00af, 0x00b0, 0x00b1, 0x00b2, -+ 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x00ba, -+ 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, 0x00c0, 0x00c1, 0x00c2, -+ 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, -+ 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, 0x00d0, 0x00d1, 0x00d2, -+ 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, -+ /* kr */ -+ 0x0000, 0x0001, 0x0002, -+ /* ks */ -+ 0x0006, -+ /* ku_am */ -+ 0x0004, 0x0005, -+ /* ku_iq */ -+ 0x0006, -+ /* ku_tr */ -+ 0x0000, 0x0001, -+ /* kum */ -+ 0x0004, -+ /* kv */ -+ 0x0004, -+ /* kw */ -+ 0x0000, 0x0001, 0x0002, -+ /* ky */ -+ 0x0004, -+ /* la */ -+ 0x0000, 0x0001, -+ /* lb */ -+ 0x0000, -+ /* lg */ -+ 0x0000, 0x0001, -+ /* li */ -+ 0x0000, -+ /* ln */ -+ 0x0000, 0x0001, 0x0002, 0x0003, -+ /* lo */ -+ 0x000e, -+ /* lt */ -+ 0x0000, 0x0001, -+ /* lv */ -+ 0x0000, 0x0001, -+ /* mg */ -+ 0x0000, -+ /* mh */ -+ 0x0000, 0x0001, -+ /* mi */ -+ 0x0000, 0x0001, 0x001e, -+ /* mk */ -+ 0x0004, -+ /* ml */ -+ 0x000d, -+ /* mn_cn */ -+ 0x0018, -+ /* mn_mn */ -+ 0x0004, -+ /* mo */ -+ 0x0000, 0x0001, 0x0002, 0x0004, -+ /* mt */ -+ 0x0000, 0x0001, -+ /* my */ -+ 0x0010, -+ /* na */ -+ 0x0000, 0x0001, -+ /* nb */ -+ 0x0000, -+ /* nl */ -+ 0x0000, -+ /* nn */ -+ 0x0000, -+ /* nso */ -+ 0x0000, 0x0001, -+ /* nv */ -+ 0x0000, 0x0001, 0x0002, 0x0003, -+ /* ny */ -+ 0x0000, 0x0001, -+ /* oc */ -+ 0x0000, -+ /* or */ -+ 0x000b, -+ /* ota */ -+ 0x0006, -+ /* pa */ -+ 0x000a, -+ /* pap_an */ -+ 0x0000, -+ /* pap_aw */ -+ 0x0000, -+ /* pl */ -+ 0x0000, 0x0001, -+ /* ps_af */ -+ 0x0006, -+ /* ps_pk */ -+ 0x0006, -+ /* pt */ -+ 0x0000, -+ /* qu */ -+ 0x0000, 0x0002, -+ /* rm */ -+ 0x0000, -+ /* ro */ -+ 0x0000, 0x0001, 0x0002, -+ /* sah */ -+ 0x0004, -+ /* sc */ -+ 0x0000, -+ /* sco */ -+ 0x0000, 0x0001, 0x0002, -+ /* sd */ -+ 0x0006, -+ /* se */ -+ 0x0000, 0x0001, -+ /* sg */ -+ 0x0000, -+ /* sh */ -+ 0x0000, 0x0001, 0x0004, -+ /* shs */ -+ 0x0000, 0x0003, -+ /* si */ -+ 0x000d, -+ /* sid */ -+ 0x0012, 0x0013, -+ /* sk */ -+ 0x0000, 0x0001, -+ /* sm */ -+ 0x0000, 0x0002, -+ /* sma */ -+ 0x0000, -+ /* smj */ -+ 0x0000, -+ /* smn */ -+ 0x0000, 0x0001, -+ /* sms */ -+ 0x0000, 0x0001, 0x0002, -+ /* sq */ -+ 0x0000, -+ /* sr */ -+ 0x0004, -+ /* sv */ -+ 0x0000, -+ /* syr */ -+ 0x0007, -+ /* ta */ -+ 0x000b, -+ /* te */ -+ 0x000c, -+ /* tg */ -+ 0x0004, -+ /* th */ -+ 0x000e, -+ /* tig */ -+ 0x0012, 0x0013, -+ /* tk */ -+ 0x0000, 0x0001, -+ /* tr */ -+ 0x0000, 0x0001, -+ /* tt */ -+ 0x0004, -+ /* ty */ -+ 0x0000, 0x0001, 0x0002, -+ /* uk */ -+ 0x0004, -+ /* ve */ -+ 0x0000, 0x001e, -+ /* vi */ -+ 0x0000, 0x0001, 0x0003, 0x001e, -+ /* vo */ -+ 0x0000, -+ /* vot */ -+ 0x0000, 0x0001, -+ /* wa */ -+ 0x0000, -+ /* wen */ -+ 0x0000, 0x0001, -+ /* wo */ -+ 0x0000, 0x0001, -+ /* yap */ -+ 0x0000, -+ /* yo */ -+ 0x0000, 0x0001, 0x0003, 0x001e, -+ /* zh_cn */ -+ 0x0002, 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, -+ 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, -+ 0x005d, 0x005e, 0x005f, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, -+ 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, -+ 0x006d, 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, -+ 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, -+ 0x007d, 0x007e, 0x007f, 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, -+ 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, -+ 0x008d, 0x008e, 0x008f, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, -+ 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, -+ 0x009e, 0x009f, -+ /* zh_hk */ -+ 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, -+ 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, -+ 0x005e, 0x005f, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, -+ 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, -+ 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, -+ 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, -+ 0x007e, 0x007f, 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, -+ 0x0086, 0x0087, 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, -+ 0x008e, 0x008f, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, -+ 0x0096, 0x0097, 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, -+ 0x009e, 0x009f, 0x0205, -+ /* zh_tw */ -+ 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, -+ 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, -+ 0x005e, 0x005f, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, -+ 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, -+ 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, -+ 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, -+ 0x007e, 0x007f, 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, -+ 0x0086, 0x0087, 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, -+ 0x008e, 0x008f, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, -+ 0x0096, 0x0097, 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, -+ 0x009e, 0x009f, 0x00fa, -+}, -+{ -+ 0, /* aa */ -+ 1, /* ab */ -+ 2, /* af */ -+ 190, /* ak */ -+ 3, /* am */ -+ 191, /* an */ -+ 4, /* ar */ -+ 5, /* as */ -+ 6, /* ast */ -+ 7, /* av */ -+ 8, /* ay */ -+ 9, /* az_az */ -+ 10, /* az_ir */ -+ 11, /* ba */ -+ 13, /* be */ -+ 192, /* ber_dz */ -+ 193, /* ber_ma */ -+ 14, /* bg */ -+ 15, /* bh */ -+ 16, /* bho */ -+ 17, /* bi */ -+ 18, /* bin */ -+ 12, /* bm */ -+ 19, /* bn */ -+ 20, /* bo */ -+ 21, /* br */ -+ 22, /* bs */ -+ 23, /* bua */ -+ 194, /* byn */ -+ 24, /* ca */ -+ 25, /* ce */ -+ 26, /* ch */ -+ 27, /* chm */ -+ 28, /* chr */ -+ 29, /* co */ -+ 195, /* crh */ -+ 30, /* cs */ -+ 196, /* csb */ -+ 31, /* cu */ -+ 32, /* cv */ -+ 33, /* cy */ -+ 34, /* da */ -+ 35, /* de */ -+ 197, /* dv */ -+ 36, /* dz */ -+ 198, /* ee */ -+ 37, /* el */ -+ 38, /* en */ -+ 39, /* eo */ -+ 40, /* es */ -+ 41, /* et */ -+ 42, /* eu */ -+ 43, /* fa */ -+ 199, /* fat */ -+ 48, /* ff */ -+ 44, /* fi */ -+ 200, /* fil */ -+ 45, /* fj */ -+ 46, /* fo */ -+ 47, /* fr */ -+ 49, /* fur */ -+ 50, /* fy */ -+ 51, /* ga */ -+ 52, /* gd */ -+ 53, /* gez */ -+ 54, /* gl */ -+ 55, /* gn */ -+ 56, /* gu */ -+ 57, /* gv */ -+ 58, /* ha */ -+ 59, /* haw */ -+ 60, /* he */ -+ 61, /* hi */ -+ 201, /* hne */ -+ 62, /* ho */ -+ 63, /* hr */ -+ 202, /* hsb */ -+ 203, /* ht */ -+ 64, /* hu */ -+ 65, /* hy */ -+ 204, /* hz */ -+ 66, /* ia */ -+ 68, /* id */ -+ 69, /* ie */ -+ 67, /* ig */ -+ 205, /* ii */ -+ 70, /* ik */ -+ 71, /* io */ -+ 72, /* is */ -+ 73, /* it */ -+ 74, /* iu */ -+ 75, /* ja */ -+ 206, /* jv */ -+ 76, /* ka */ -+ 77, /* kaa */ -+ 207, /* kab */ -+ 78, /* ki */ -+ 208, /* kj */ -+ 79, /* kk */ -+ 80, /* kl */ -+ 81, /* km */ -+ 82, /* kn */ -+ 83, /* ko */ -+ 84, /* kok */ -+ 209, /* kr */ -+ 85, /* ks */ -+ 86, /* ku_am */ -+ 210, /* ku_iq */ -+ 87, /* ku_ir */ -+ 211, /* ku_tr */ -+ 88, /* kum */ -+ 89, /* kv */ -+ 90, /* kw */ -+ 212, /* kwm */ -+ 91, /* ky */ -+ 92, /* la */ -+ 237, /* lah */ -+ 93, /* lb */ -+ 94, /* lez */ -+ 213, /* lg */ -+ 214, /* li */ -+ 95, /* ln */ -+ 96, /* lo */ -+ 97, /* lt */ -+ 98, /* lv */ -+ 215, /* mai */ -+ 99, /* mg */ -+ 100, /* mh */ -+ 101, /* mi */ -+ 102, /* mk */ -+ 103, /* ml */ -+ 104, /* mn_cn */ -+ 216, /* mn_mn */ -+ 105, /* mo */ -+ 106, /* mr */ -+ 217, /* ms */ -+ 107, /* mt */ -+ 108, /* my */ -+ 218, /* na */ -+ 109, /* nb */ -+ 110, /* nds */ -+ 111, /* ne */ -+ 219, /* ng */ -+ 112, /* nl */ -+ 113, /* nn */ -+ 114, /* no */ -+ 115, /* nr */ -+ 116, /* nso */ -+ 220, /* nv */ -+ 117, /* ny */ -+ 118, /* oc */ -+ 119, /* om */ -+ 120, /* or */ -+ 121, /* os */ -+ 221, /* ota */ -+ 122, /* pa */ -+ 222, /* pa_pk */ -+ 223, /* pap_an */ -+ 224, /* pap_aw */ -+ 123, /* pl */ -+ 124, /* ps_af */ -+ 125, /* ps_pk */ -+ 126, /* pt */ -+ 225, /* qu */ -+ 127, /* rm */ -+ 226, /* rn */ -+ 128, /* ro */ -+ 129, /* ru */ -+ 227, /* rw */ -+ 130, /* sa */ -+ 131, /* sah */ -+ 228, /* sc */ -+ 132, /* sco */ -+ 229, /* sd */ -+ 133, /* se */ -+ 134, /* sel */ -+ 230, /* sg */ -+ 135, /* sh */ -+ 136, /* shs */ -+ 137, /* si */ -+ 231, /* sid */ -+ 138, /* sk */ -+ 139, /* sl */ -+ 140, /* sm */ -+ 141, /* sma */ -+ 142, /* smj */ -+ 143, /* smn */ -+ 144, /* sms */ -+ 232, /* sn */ -+ 145, /* so */ -+ 146, /* sq */ -+ 147, /* sr */ -+ 148, /* ss */ -+ 149, /* st */ -+ 233, /* su */ -+ 150, /* sv */ -+ 151, /* sw */ -+ 152, /* syr */ -+ 153, /* ta */ -+ 154, /* te */ -+ 155, /* tg */ -+ 156, /* th */ -+ 157, /* ti_er */ -+ 158, /* ti_et */ -+ 159, /* tig */ -+ 160, /* tk */ -+ 161, /* tl */ -+ 162, /* tn */ -+ 163, /* to */ -+ 164, /* tr */ -+ 165, /* ts */ -+ 166, /* tt */ -+ 167, /* tw */ -+ 234, /* ty */ -+ 168, /* tyv */ -+ 169, /* ug */ -+ 170, /* uk */ -+ 171, /* ur */ -+ 172, /* uz */ -+ 173, /* ve */ -+ 174, /* vi */ -+ 175, /* vo */ -+ 176, /* vot */ -+ 177, /* wa */ -+ 235, /* wal */ -+ 178, /* wen */ -+ 179, /* wo */ -+ 180, /* xh */ -+ 181, /* yap */ -+ 182, /* yi */ -+ 183, /* yo */ -+ 236, /* za */ -+ 184, /* zh_cn */ -+ 185, /* zh_hk */ -+ 186, /* zh_mo */ -+ 187, /* zh_sg */ -+ 188, /* zh_tw */ -+ 189, /* zu */ -+}, -+{ -+ 0, /* aa */ -+ 1, /* ab */ -+ 2, /* af */ -+ 4, /* am */ -+ 6, /* ar */ -+ 7, /* as */ -+ 8, /* ast */ -+ 9, /* av */ -+ 10, /* ay */ -+ 11, /* az_az */ -+ 12, /* az_ir */ -+ 13, /* ba */ -+ 22, /* bm */ -+ 14, /* be */ -+ 17, /* bg */ -+ 18, /* bh */ -+ 19, /* bho */ -+ 20, /* bi */ -+ 21, /* bin */ -+ 23, /* bn */ -+ 24, /* bo */ -+ 25, /* br */ -+ 26, /* bs */ -+ 27, /* bua */ -+ 29, /* ca */ -+ 30, /* ce */ -+ 31, /* ch */ -+ 32, /* chm */ -+ 33, /* chr */ -+ 34, /* co */ -+ 36, /* cs */ -+ 38, /* cu */ -+ 39, /* cv */ -+ 40, /* cy */ -+ 41, /* da */ -+ 42, /* de */ -+ 44, /* dz */ -+ 46, /* el */ -+ 47, /* en */ -+ 48, /* eo */ -+ 49, /* es */ -+ 50, /* et */ -+ 51, /* eu */ -+ 52, /* fa */ -+ 55, /* fi */ -+ 57, /* fj */ -+ 58, /* fo */ -+ 59, /* fr */ -+ 54, /* ff */ -+ 60, /* fur */ -+ 61, /* fy */ -+ 62, /* ga */ -+ 63, /* gd */ -+ 64, /* gez */ -+ 65, /* gl */ -+ 66, /* gn */ -+ 67, /* gu */ -+ 68, /* gv */ -+ 69, /* ha */ -+ 70, /* haw */ -+ 71, /* he */ -+ 72, /* hi */ -+ 74, /* ho */ -+ 75, /* hr */ -+ 78, /* hu */ -+ 79, /* hy */ -+ 81, /* ia */ -+ 84, /* ig */ -+ 82, /* id */ -+ 83, /* ie */ -+ 86, /* ik */ -+ 87, /* io */ -+ 88, /* is */ -+ 89, /* it */ -+ 90, /* iu */ -+ 91, /* ja */ -+ 93, /* ka */ -+ 94, /* kaa */ -+ 96, /* ki */ -+ 98, /* kk */ -+ 99, /* kl */ -+ 100, /* km */ -+ 101, /* kn */ -+ 102, /* ko */ -+ 103, /* kok */ -+ 105, /* ks */ -+ 106, /* ku_am */ -+ 108, /* ku_ir */ -+ 110, /* kum */ -+ 111, /* kv */ -+ 112, /* kw */ -+ 114, /* ky */ -+ 115, /* la */ -+ 117, /* lb */ -+ 118, /* lez */ -+ 121, /* ln */ -+ 122, /* lo */ -+ 123, /* lt */ -+ 124, /* lv */ -+ 126, /* mg */ -+ 127, /* mh */ -+ 128, /* mi */ -+ 129, /* mk */ -+ 130, /* ml */ -+ 131, /* mn_cn */ -+ 133, /* mo */ -+ 134, /* mr */ -+ 136, /* mt */ -+ 137, /* my */ -+ 139, /* nb */ -+ 140, /* nds */ -+ 141, /* ne */ -+ 143, /* nl */ -+ 144, /* nn */ -+ 145, /* no */ -+ 146, /* nr */ -+ 147, /* nso */ -+ 149, /* ny */ -+ 150, /* oc */ -+ 151, /* om */ -+ 152, /* or */ -+ 153, /* os */ -+ 155, /* pa */ -+ 159, /* pl */ -+ 160, /* ps_af */ -+ 161, /* ps_pk */ -+ 162, /* pt */ -+ 164, /* rm */ -+ 166, /* ro */ -+ 167, /* ru */ -+ 169, /* sa */ -+ 170, /* sah */ -+ 172, /* sco */ -+ 174, /* se */ -+ 175, /* sel */ -+ 177, /* sh */ -+ 178, /* shs */ -+ 179, /* si */ -+ 181, /* sk */ -+ 182, /* sl */ -+ 183, /* sm */ -+ 184, /* sma */ -+ 185, /* smj */ -+ 186, /* smn */ -+ 187, /* sms */ -+ 189, /* so */ -+ 190, /* sq */ -+ 191, /* sr */ -+ 192, /* ss */ -+ 193, /* st */ -+ 195, /* sv */ -+ 196, /* sw */ -+ 197, /* syr */ -+ 198, /* ta */ -+ 199, /* te */ -+ 200, /* tg */ -+ 201, /* th */ -+ 202, /* ti_er */ -+ 203, /* ti_et */ -+ 204, /* tig */ -+ 205, /* tk */ -+ 206, /* tl */ -+ 207, /* tn */ -+ 208, /* to */ -+ 209, /* tr */ -+ 210, /* ts */ -+ 211, /* tt */ -+ 212, /* tw */ -+ 214, /* tyv */ -+ 215, /* ug */ -+ 216, /* uk */ -+ 217, /* ur */ -+ 218, /* uz */ -+ 219, /* ve */ -+ 220, /* vi */ -+ 221, /* vo */ -+ 222, /* vot */ -+ 223, /* wa */ -+ 225, /* wen */ -+ 226, /* wo */ -+ 227, /* xh */ -+ 228, /* yap */ -+ 229, /* yi */ -+ 230, /* yo */ -+ 232, /* zh_cn */ -+ 233, /* zh_hk */ -+ 234, /* zh_mo */ -+ 235, /* zh_sg */ -+ 236, /* zh_tw */ -+ 237, /* zu */ -+ 3, /* ak */ -+ 5, /* an */ -+ 15, /* ber_dz */ -+ 16, /* ber_ma */ -+ 28, /* byn */ -+ 35, /* crh */ -+ 37, /* csb */ -+ 43, /* dv */ -+ 45, /* ee */ -+ 53, /* fat */ -+ 56, /* fil */ -+ 73, /* hne */ -+ 76, /* hsb */ -+ 77, /* ht */ -+ 80, /* hz */ -+ 85, /* ii */ -+ 92, /* jv */ -+ 95, /* kab */ -+ 97, /* kj */ -+ 104, /* kr */ -+ 107, /* ku_iq */ -+ 109, /* ku_tr */ -+ 113, /* kwm */ -+ 119, /* lg */ -+ 120, /* li */ -+ 125, /* mai */ -+ 132, /* mn_mn */ -+ 135, /* ms */ -+ 138, /* na */ -+ 142, /* ng */ -+ 148, /* nv */ -+ 154, /* ota */ -+ 156, /* pa_pk */ -+ 157, /* pap_an */ -+ 158, /* pap_aw */ -+ 163, /* qu */ -+ 165, /* rn */ -+ 168, /* rw */ -+ 171, /* sc */ -+ 173, /* sd */ -+ 176, /* sg */ -+ 180, /* sid */ -+ 188, /* sn */ -+ 194, /* su */ -+ 213, /* ty */ -+ 224, /* wal */ -+ 231, /* za */ -+ 116, /* lah */ -+} -+}; -+ -+#define NUM_LANG_CHAR_SET 238 -+#define NUM_LANG_SET_MAP 8 -+ -+static const FcChar32 fcLangCountrySets[][NUM_LANG_SET_MAP] = { -+ { 0x00000600, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }, /* az */ -+ { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, }, /* ber */ -+ { 0x00000000, 0x00000000, 0x00c00000, 0x00000000, 0x00000000, 0x00000000, 0x000c0000, 0x00000000, }, /* ku */ -+ { 0x00000000, 0x00000000, 0x00000000, 0x00000100, 0x00000000, 0x00000000, 0x01000000, 0x00000000, }, /* mn */ -+ { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40000000, 0x00000000, }, /* pa */ -+ { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x00000001, }, /* pap */ -+ { 0x00000000, 0x00000000, 0x00000000, 0x30000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }, /* ps */ -+ { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x60000000, 0x00000000, 0x00000000, 0x00000000, }, /* ti */ -+ { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x1f000000, 0x00000000, 0x00000000, }, /* zh */ -+}; -+ -+#define NUM_COUNTRY_SET 9 -+ -+static const FcLangCharSetRange fcLangCharSetRanges[] = { -+ -+ { 0, 12 }, /* a */ -+ { 13, 28 }, /* b */ -+ { 29, 40 }, /* c */ -+ { 41, 44 }, /* d */ -+ { 45, 51 }, /* e */ -+ { 52, 61 }, /* f */ -+ { 62, 68 }, /* g */ -+ { 69, 80 }, /* h */ -+ { 81, 90 }, /* i */ -+ { 91, 92 }, /* j */ -+ { 93, 114 }, /* k */ -+ { 115, 124 }, /* l */ -+ { 125, 137 }, /* m */ -+ { 138, 149 }, /* n */ -+ { 150, 154 }, /* o */ -+ { 155, 162 }, /* p */ -+ { 163, 163 }, /* q */ -+ { 164, 168 }, /* r */ -+ { 169, 197 }, /* s */ -+ { 198, 214 }, /* t */ -+ { 215, 218 }, /* u */ -+ { 219, 222 }, /* v */ -+ { 223, 226 }, /* w */ -+ { 227, 227 }, /* x */ -+ { 228, 230 }, /* y */ -+ { 231, 237 }, /* z */ -+}; -+ ---- misc/fontconfig-2.8.0/src/fcalias.h Wed Aug 20 14:33:55 2008 -+++ misc/build/fontconfig-2.8.0/src/fcalias.h Wed Aug 20 14:26:42 2008 -@@ -1 +1,369 @@ --dummy -+extern __typeof (FcBlanksCreate) IA__FcBlanksCreate __attribute((visibility("hidden"))); -+#define FcBlanksCreate IA__FcBlanksCreate -+extern __typeof (FcBlanksDestroy) IA__FcBlanksDestroy __attribute((visibility("hidden"))); -+#define FcBlanksDestroy IA__FcBlanksDestroy -+extern __typeof (FcBlanksAdd) IA__FcBlanksAdd __attribute((visibility("hidden"))); -+#define FcBlanksAdd IA__FcBlanksAdd -+extern __typeof (FcBlanksIsMember) IA__FcBlanksIsMember __attribute((visibility("hidden"))); -+#define FcBlanksIsMember IA__FcBlanksIsMember -+extern __typeof (FcCacheCopySet) IA__FcCacheCopySet __attribute((visibility("hidden"))); -+#define FcCacheCopySet IA__FcCacheCopySet -+extern __typeof (FcCacheNumSubdir) IA__FcCacheNumSubdir __attribute((visibility("hidden"))); -+#define FcCacheNumSubdir IA__FcCacheNumSubdir -+extern __typeof (FcCacheNumFont) IA__FcCacheNumFont __attribute((visibility("hidden"))); -+#define FcCacheNumFont IA__FcCacheNumFont -+extern __typeof (FcDirCacheUnlink) IA__FcDirCacheUnlink __attribute((visibility("hidden"))); -+#define FcDirCacheUnlink IA__FcDirCacheUnlink -+extern __typeof (FcDirCacheValid) IA__FcDirCacheValid __attribute((visibility("hidden"))); -+#define FcDirCacheValid IA__FcDirCacheValid -+extern __typeof (FcConfigHome) IA__FcConfigHome __attribute((visibility("hidden"))); -+#define FcConfigHome IA__FcConfigHome -+extern __typeof (FcConfigEnableHome) IA__FcConfigEnableHome __attribute((visibility("hidden"))); -+#define FcConfigEnableHome IA__FcConfigEnableHome -+extern __typeof (FcConfigFilename) IA__FcConfigFilename __attribute((visibility("hidden"))); -+#define FcConfigFilename IA__FcConfigFilename -+extern __typeof (FcConfigCreate) IA__FcConfigCreate __attribute((visibility("hidden"))); -+#define FcConfigCreate IA__FcConfigCreate -+extern __typeof (FcConfigReference) IA__FcConfigReference __attribute((visibility("hidden"))); -+#define FcConfigReference IA__FcConfigReference -+extern __typeof (FcConfigDestroy) IA__FcConfigDestroy __attribute((visibility("hidden"))); -+#define FcConfigDestroy IA__FcConfigDestroy -+extern __typeof (FcConfigSetCurrent) IA__FcConfigSetCurrent __attribute((visibility("hidden"))); -+#define FcConfigSetCurrent IA__FcConfigSetCurrent -+extern __typeof (FcConfigGetCurrent) IA__FcConfigGetCurrent __attribute((visibility("hidden"))); -+#define FcConfigGetCurrent IA__FcConfigGetCurrent -+extern __typeof (FcConfigUptoDate) IA__FcConfigUptoDate __attribute((visibility("hidden"))); -+#define FcConfigUptoDate IA__FcConfigUptoDate -+extern __typeof (FcConfigBuildFonts) IA__FcConfigBuildFonts __attribute((visibility("hidden"))); -+#define FcConfigBuildFonts IA__FcConfigBuildFonts -+extern __typeof (FcConfigGetFontDirs) IA__FcConfigGetFontDirs __attribute((visibility("hidden"))); -+#define FcConfigGetFontDirs IA__FcConfigGetFontDirs -+extern __typeof (FcConfigGetConfigDirs) IA__FcConfigGetConfigDirs __attribute((visibility("hidden"))); -+#define FcConfigGetConfigDirs IA__FcConfigGetConfigDirs -+extern __typeof (FcConfigGetConfigFiles) IA__FcConfigGetConfigFiles __attribute((visibility("hidden"))); -+#define FcConfigGetConfigFiles IA__FcConfigGetConfigFiles -+extern __typeof (FcConfigGetCache) IA__FcConfigGetCache __attribute((visibility("hidden"))); -+#define FcConfigGetCache IA__FcConfigGetCache -+extern __typeof (FcConfigGetBlanks) IA__FcConfigGetBlanks __attribute((visibility("hidden"))); -+#define FcConfigGetBlanks IA__FcConfigGetBlanks -+extern __typeof (FcConfigGetCacheDirs) IA__FcConfigGetCacheDirs __attribute((visibility("hidden"))); -+#define FcConfigGetCacheDirs IA__FcConfigGetCacheDirs -+extern __typeof (FcConfigGetRescanInterval) IA__FcConfigGetRescanInterval __attribute((visibility("hidden"))); -+#define FcConfigGetRescanInterval IA__FcConfigGetRescanInterval -+extern __typeof (FcConfigSetRescanInterval) IA__FcConfigSetRescanInterval __attribute((visibility("hidden"))); -+#define FcConfigSetRescanInterval IA__FcConfigSetRescanInterval -+extern __typeof (FcConfigGetFonts) IA__FcConfigGetFonts __attribute((visibility("hidden"))); -+#define FcConfigGetFonts IA__FcConfigGetFonts -+extern __typeof (FcConfigAppFontAddFile) IA__FcConfigAppFontAddFile __attribute((visibility("hidden"))); -+#define FcConfigAppFontAddFile IA__FcConfigAppFontAddFile -+extern __typeof (FcConfigAppFontAddDir) IA__FcConfigAppFontAddDir __attribute((visibility("hidden"))); -+#define FcConfigAppFontAddDir IA__FcConfigAppFontAddDir -+extern __typeof (FcConfigAppFontClear) IA__FcConfigAppFontClear __attribute((visibility("hidden"))); -+#define FcConfigAppFontClear IA__FcConfigAppFontClear -+extern __typeof (FcConfigSubstituteWithPat) IA__FcConfigSubstituteWithPat __attribute((visibility("hidden"))); -+#define FcConfigSubstituteWithPat IA__FcConfigSubstituteWithPat -+extern __typeof (FcConfigSubstitute) IA__FcConfigSubstitute __attribute((visibility("hidden"))); -+#define FcConfigSubstitute IA__FcConfigSubstitute -+extern __typeof (FcCharSetCreate) IA__FcCharSetCreate __attribute((visibility("hidden"))); -+#define FcCharSetCreate IA__FcCharSetCreate -+extern __typeof (FcCharSetNew) IA__FcCharSetNew __attribute((visibility("hidden"))); -+#define FcCharSetNew IA__FcCharSetNew -+extern __typeof (FcCharSetDestroy) IA__FcCharSetDestroy __attribute((visibility("hidden"))); -+#define FcCharSetDestroy IA__FcCharSetDestroy -+extern __typeof (FcCharSetAddChar) IA__FcCharSetAddChar __attribute((visibility("hidden"))); -+#define FcCharSetAddChar IA__FcCharSetAddChar -+extern __typeof (FcCharSetCopy) IA__FcCharSetCopy __attribute((visibility("hidden"))); -+#define FcCharSetCopy IA__FcCharSetCopy -+extern __typeof (FcCharSetEqual) IA__FcCharSetEqual __attribute((visibility("hidden"))); -+#define FcCharSetEqual IA__FcCharSetEqual -+extern __typeof (FcCharSetIntersect) IA__FcCharSetIntersect __attribute((visibility("hidden"))); -+#define FcCharSetIntersect IA__FcCharSetIntersect -+extern __typeof (FcCharSetUnion) IA__FcCharSetUnion __attribute((visibility("hidden"))); -+#define FcCharSetUnion IA__FcCharSetUnion -+extern __typeof (FcCharSetSubtract) IA__FcCharSetSubtract __attribute((visibility("hidden"))); -+#define FcCharSetSubtract IA__FcCharSetSubtract -+extern __typeof (FcCharSetMerge) IA__FcCharSetMerge __attribute((visibility("hidden"))); -+#define FcCharSetMerge IA__FcCharSetMerge -+extern __typeof (FcCharSetHasChar) IA__FcCharSetHasChar __attribute((visibility("hidden"))); -+#define FcCharSetHasChar IA__FcCharSetHasChar -+extern __typeof (FcCharSetCount) IA__FcCharSetCount __attribute((visibility("hidden"))); -+#define FcCharSetCount IA__FcCharSetCount -+extern __typeof (FcCharSetIntersectCount) IA__FcCharSetIntersectCount __attribute((visibility("hidden"))); -+#define FcCharSetIntersectCount IA__FcCharSetIntersectCount -+extern __typeof (FcCharSetSubtractCount) IA__FcCharSetSubtractCount __attribute((visibility("hidden"))); -+#define FcCharSetSubtractCount IA__FcCharSetSubtractCount -+extern __typeof (FcCharSetIsSubset) IA__FcCharSetIsSubset __attribute((visibility("hidden"))); -+#define FcCharSetIsSubset IA__FcCharSetIsSubset -+extern __typeof (FcCharSetFirstPage) IA__FcCharSetFirstPage __attribute((visibility("hidden"))); -+#define FcCharSetFirstPage IA__FcCharSetFirstPage -+extern __typeof (FcCharSetNextPage) IA__FcCharSetNextPage __attribute((visibility("hidden"))); -+#define FcCharSetNextPage IA__FcCharSetNextPage -+extern __typeof (FcCharSetCoverage) IA__FcCharSetCoverage __attribute((visibility("hidden"))); -+#define FcCharSetCoverage IA__FcCharSetCoverage -+extern __typeof (FcValuePrint) IA__FcValuePrint __attribute((visibility("hidden"))); -+#define FcValuePrint IA__FcValuePrint -+extern __typeof (FcPatternPrint) IA__FcPatternPrint __attribute((visibility("hidden"))); -+#define FcPatternPrint IA__FcPatternPrint -+extern __typeof (FcFontSetPrint) IA__FcFontSetPrint __attribute((visibility("hidden"))); -+#define FcFontSetPrint IA__FcFontSetPrint -+extern __typeof (FcDefaultSubstitute) IA__FcDefaultSubstitute __attribute((visibility("hidden"))); -+#define FcDefaultSubstitute IA__FcDefaultSubstitute -+extern __typeof (FcFileIsDir) IA__FcFileIsDir __attribute((visibility("hidden"))); -+#define FcFileIsDir IA__FcFileIsDir -+extern __typeof (FcFileScan) IA__FcFileScan __attribute((visibility("hidden"))); -+#define FcFileScan IA__FcFileScan -+extern __typeof (FcDirScan) IA__FcDirScan __attribute((visibility("hidden"))); -+#define FcDirScan IA__FcDirScan -+extern __typeof (FcDirSave) IA__FcDirSave __attribute((visibility("hidden"))); -+#define FcDirSave IA__FcDirSave -+extern __typeof (FcDirCacheLoad) IA__FcDirCacheLoad __attribute((visibility("hidden"))); -+#define FcDirCacheLoad IA__FcDirCacheLoad -+extern __typeof (FcDirCacheRead) IA__FcDirCacheRead __attribute((visibility("hidden"))); -+#define FcDirCacheRead IA__FcDirCacheRead -+extern __typeof (FcDirCacheLoadFile) IA__FcDirCacheLoadFile __attribute((visibility("hidden"))); -+#define FcDirCacheLoadFile IA__FcDirCacheLoadFile -+extern __typeof (FcDirCacheUnload) IA__FcDirCacheUnload __attribute((visibility("hidden"))); -+#define FcDirCacheUnload IA__FcDirCacheUnload -+extern __typeof (FcFreeTypeQuery) IA__FcFreeTypeQuery __attribute((visibility("hidden"))); -+#define FcFreeTypeQuery IA__FcFreeTypeQuery -+extern __typeof (FcFontSetCreate) IA__FcFontSetCreate __attribute((visibility("hidden"))); -+#define FcFontSetCreate IA__FcFontSetCreate -+extern __typeof (FcFontSetDestroy) IA__FcFontSetDestroy __attribute((visibility("hidden"))); -+#define FcFontSetDestroy IA__FcFontSetDestroy -+extern __typeof (FcFontSetAdd) IA__FcFontSetAdd __attribute((visibility("hidden"))); -+#define FcFontSetAdd IA__FcFontSetAdd -+extern __typeof (FcInitLoadConfig) IA__FcInitLoadConfig __attribute((visibility("hidden"))); -+#define FcInitLoadConfig IA__FcInitLoadConfig -+extern __typeof (FcInitLoadConfigAndFonts) IA__FcInitLoadConfigAndFonts __attribute((visibility("hidden"))); -+#define FcInitLoadConfigAndFonts IA__FcInitLoadConfigAndFonts -+extern __typeof (FcInit) IA__FcInit __attribute((visibility("hidden"))); -+#define FcInit IA__FcInit -+extern __typeof (FcFini) IA__FcFini __attribute((visibility("hidden"))); -+#define FcFini IA__FcFini -+extern __typeof (FcGetVersion) IA__FcGetVersion __attribute((visibility("hidden"))); -+#define FcGetVersion IA__FcGetVersion -+extern __typeof (FcInitReinitialize) IA__FcInitReinitialize __attribute((visibility("hidden"))); -+#define FcInitReinitialize IA__FcInitReinitialize -+extern __typeof (FcInitBringUptoDate) IA__FcInitBringUptoDate __attribute((visibility("hidden"))); -+#define FcInitBringUptoDate IA__FcInitBringUptoDate -+extern __typeof (FcGetLangs) IA__FcGetLangs __attribute((visibility("hidden"))); -+#define FcGetLangs IA__FcGetLangs -+extern __typeof (FcLangGetCharSet) IA__FcLangGetCharSet __attribute((visibility("hidden"))); -+#define FcLangGetCharSet IA__FcLangGetCharSet -+extern __typeof (FcLangSetCreate) IA__FcLangSetCreate __attribute((visibility("hidden"))); -+#define FcLangSetCreate IA__FcLangSetCreate -+extern __typeof (FcLangSetDestroy) IA__FcLangSetDestroy __attribute((visibility("hidden"))); -+#define FcLangSetDestroy IA__FcLangSetDestroy -+extern __typeof (FcLangSetCopy) IA__FcLangSetCopy __attribute((visibility("hidden"))); -+#define FcLangSetCopy IA__FcLangSetCopy -+extern __typeof (FcLangSetAdd) IA__FcLangSetAdd __attribute((visibility("hidden"))); -+#define FcLangSetAdd IA__FcLangSetAdd -+extern __typeof (FcLangSetHasLang) IA__FcLangSetHasLang __attribute((visibility("hidden"))); -+#define FcLangSetHasLang IA__FcLangSetHasLang -+extern __typeof (FcLangSetCompare) IA__FcLangSetCompare __attribute((visibility("hidden"))); -+#define FcLangSetCompare IA__FcLangSetCompare -+extern __typeof (FcLangSetContains) IA__FcLangSetContains __attribute((visibility("hidden"))); -+#define FcLangSetContains IA__FcLangSetContains -+extern __typeof (FcLangSetEqual) IA__FcLangSetEqual __attribute((visibility("hidden"))); -+#define FcLangSetEqual IA__FcLangSetEqual -+extern __typeof (FcLangSetHash) IA__FcLangSetHash __attribute((visibility("hidden"))); -+#define FcLangSetHash IA__FcLangSetHash -+extern __typeof (FcLangSetGetLangs) IA__FcLangSetGetLangs __attribute((visibility("hidden"))); -+#define FcLangSetGetLangs IA__FcLangSetGetLangs -+extern __typeof (FcObjectSetCreate) IA__FcObjectSetCreate __attribute((visibility("hidden"))); -+#define FcObjectSetCreate IA__FcObjectSetCreate -+extern __typeof (FcObjectSetAdd) IA__FcObjectSetAdd __attribute((visibility("hidden"))); -+#define FcObjectSetAdd IA__FcObjectSetAdd -+extern __typeof (FcObjectSetDestroy) IA__FcObjectSetDestroy __attribute((visibility("hidden"))); -+#define FcObjectSetDestroy IA__FcObjectSetDestroy -+extern __typeof (FcObjectSetVaBuild) IA__FcObjectSetVaBuild __attribute((visibility("hidden"))); -+#define FcObjectSetVaBuild IA__FcObjectSetVaBuild -+extern __typeof (FcObjectSetBuild) IA__FcObjectSetBuild __attribute((visibility("hidden"))); -+#define FcObjectSetBuild IA__FcObjectSetBuild -+extern __typeof (FcFontSetList) IA__FcFontSetList __attribute((visibility("hidden"))); -+#define FcFontSetList IA__FcFontSetList -+extern __typeof (FcFontList) IA__FcFontList __attribute((visibility("hidden"))); -+#define FcFontList IA__FcFontList -+extern __typeof (FcAtomicCreate) IA__FcAtomicCreate __attribute((visibility("hidden"))); -+#define FcAtomicCreate IA__FcAtomicCreate -+extern __typeof (FcAtomicLock) IA__FcAtomicLock __attribute((visibility("hidden"))); -+#define FcAtomicLock IA__FcAtomicLock -+extern __typeof (FcAtomicNewFile) IA__FcAtomicNewFile __attribute((visibility("hidden"))); -+#define FcAtomicNewFile IA__FcAtomicNewFile -+extern __typeof (FcAtomicOrigFile) IA__FcAtomicOrigFile __attribute((visibility("hidden"))); -+#define FcAtomicOrigFile IA__FcAtomicOrigFile -+extern __typeof (FcAtomicReplaceOrig) IA__FcAtomicReplaceOrig __attribute((visibility("hidden"))); -+#define FcAtomicReplaceOrig IA__FcAtomicReplaceOrig -+extern __typeof (FcAtomicDeleteNew) IA__FcAtomicDeleteNew __attribute((visibility("hidden"))); -+#define FcAtomicDeleteNew IA__FcAtomicDeleteNew -+extern __typeof (FcAtomicUnlock) IA__FcAtomicUnlock __attribute((visibility("hidden"))); -+#define FcAtomicUnlock IA__FcAtomicUnlock -+extern __typeof (FcAtomicDestroy) IA__FcAtomicDestroy __attribute((visibility("hidden"))); -+#define FcAtomicDestroy IA__FcAtomicDestroy -+extern __typeof (FcFontSetMatch) IA__FcFontSetMatch __attribute((visibility("hidden"))); -+#define FcFontSetMatch IA__FcFontSetMatch -+extern __typeof (FcFontMatch) IA__FcFontMatch __attribute((visibility("hidden"))); -+#define FcFontMatch IA__FcFontMatch -+extern __typeof (FcFontRenderPrepare) IA__FcFontRenderPrepare __attribute((visibility("hidden"))); -+#define FcFontRenderPrepare IA__FcFontRenderPrepare -+extern __typeof (FcFontSetSort) IA__FcFontSetSort __attribute((visibility("hidden"))); -+#define FcFontSetSort IA__FcFontSetSort -+extern __typeof (FcFontSort) IA__FcFontSort __attribute((visibility("hidden"))); -+#define FcFontSort IA__FcFontSort -+extern __typeof (FcFontSetSortDestroy) IA__FcFontSetSortDestroy __attribute((visibility("hidden"))); -+#define FcFontSetSortDestroy IA__FcFontSetSortDestroy -+extern __typeof (FcMatrixCopy) IA__FcMatrixCopy __attribute((visibility("hidden"))); -+#define FcMatrixCopy IA__FcMatrixCopy -+extern __typeof (FcMatrixEqual) IA__FcMatrixEqual __attribute((visibility("hidden"))); -+#define FcMatrixEqual IA__FcMatrixEqual -+extern __typeof (FcMatrixMultiply) IA__FcMatrixMultiply __attribute((visibility("hidden"))); -+#define FcMatrixMultiply IA__FcMatrixMultiply -+extern __typeof (FcMatrixRotate) IA__FcMatrixRotate __attribute((visibility("hidden"))); -+#define FcMatrixRotate IA__FcMatrixRotate -+extern __typeof (FcMatrixScale) IA__FcMatrixScale __attribute((visibility("hidden"))); -+#define FcMatrixScale IA__FcMatrixScale -+extern __typeof (FcMatrixShear) IA__FcMatrixShear __attribute((visibility("hidden"))); -+#define FcMatrixShear IA__FcMatrixShear -+extern __typeof (FcNameRegisterObjectTypes) IA__FcNameRegisterObjectTypes __attribute((visibility("hidden"))); -+#define FcNameRegisterObjectTypes IA__FcNameRegisterObjectTypes -+extern __typeof (FcNameUnregisterObjectTypes) IA__FcNameUnregisterObjectTypes __attribute((visibility("hidden"))); -+#define FcNameUnregisterObjectTypes IA__FcNameUnregisterObjectTypes -+extern __typeof (FcNameGetObjectType) IA__FcNameGetObjectType __attribute((visibility("hidden"))); -+#define FcNameGetObjectType IA__FcNameGetObjectType -+extern __typeof (FcNameRegisterConstants) IA__FcNameRegisterConstants __attribute((visibility("hidden"))); -+#define FcNameRegisterConstants IA__FcNameRegisterConstants -+extern __typeof (FcNameUnregisterConstants) IA__FcNameUnregisterConstants __attribute((visibility("hidden"))); -+#define FcNameUnregisterConstants IA__FcNameUnregisterConstants -+extern __typeof (FcNameGetConstant) IA__FcNameGetConstant __attribute((visibility("hidden"))); -+#define FcNameGetConstant IA__FcNameGetConstant -+extern __typeof (FcNameConstant) IA__FcNameConstant __attribute((visibility("hidden"))); -+#define FcNameConstant IA__FcNameConstant -+extern __typeof (FcNameParse) IA__FcNameParse __attribute((visibility("hidden"))); -+#define FcNameParse IA__FcNameParse -+extern __typeof (FcNameUnparse) IA__FcNameUnparse __attribute((visibility("hidden"))); -+#define FcNameUnparse IA__FcNameUnparse -+extern __typeof (FcPatternCreate) IA__FcPatternCreate __attribute((visibility("hidden"))); -+#define FcPatternCreate IA__FcPatternCreate -+extern __typeof (FcPatternDuplicate) IA__FcPatternDuplicate __attribute((visibility("hidden"))); -+#define FcPatternDuplicate IA__FcPatternDuplicate -+extern __typeof (FcPatternReference) IA__FcPatternReference __attribute((visibility("hidden"))); -+#define FcPatternReference IA__FcPatternReference -+extern __typeof (FcPatternFilter) IA__FcPatternFilter __attribute((visibility("hidden"))); -+#define FcPatternFilter IA__FcPatternFilter -+extern __typeof (FcValueDestroy) IA__FcValueDestroy __attribute((visibility("hidden"))); -+#define FcValueDestroy IA__FcValueDestroy -+extern __typeof (FcValueEqual) IA__FcValueEqual __attribute((visibility("hidden"))); -+#define FcValueEqual IA__FcValueEqual -+extern __typeof (FcValueSave) IA__FcValueSave __attribute((visibility("hidden"))); -+#define FcValueSave IA__FcValueSave -+extern __typeof (FcPatternDestroy) IA__FcPatternDestroy __attribute((visibility("hidden"))); -+#define FcPatternDestroy IA__FcPatternDestroy -+extern __typeof (FcPatternEqual) IA__FcPatternEqual __attribute((visibility("hidden"))); -+#define FcPatternEqual IA__FcPatternEqual -+extern __typeof (FcPatternEqualSubset) IA__FcPatternEqualSubset __attribute((visibility("hidden"))); -+#define FcPatternEqualSubset IA__FcPatternEqualSubset -+extern __typeof (FcPatternHash) IA__FcPatternHash __attribute((visibility("hidden"))); -+#define FcPatternHash IA__FcPatternHash -+extern __typeof (FcPatternAdd) IA__FcPatternAdd __attribute((visibility("hidden"))); -+#define FcPatternAdd IA__FcPatternAdd -+extern __typeof (FcPatternAddWeak) IA__FcPatternAddWeak __attribute((visibility("hidden"))); -+#define FcPatternAddWeak IA__FcPatternAddWeak -+extern __typeof (FcPatternGet) IA__FcPatternGet __attribute((visibility("hidden"))); -+#define FcPatternGet IA__FcPatternGet -+extern __typeof (FcPatternDel) IA__FcPatternDel __attribute((visibility("hidden"))); -+#define FcPatternDel IA__FcPatternDel -+extern __typeof (FcPatternRemove) IA__FcPatternRemove __attribute((visibility("hidden"))); -+#define FcPatternRemove IA__FcPatternRemove -+extern __typeof (FcPatternAddInteger) IA__FcPatternAddInteger __attribute((visibility("hidden"))); -+#define FcPatternAddInteger IA__FcPatternAddInteger -+extern __typeof (FcPatternAddDouble) IA__FcPatternAddDouble __attribute((visibility("hidden"))); -+#define FcPatternAddDouble IA__FcPatternAddDouble -+extern __typeof (FcPatternAddString) IA__FcPatternAddString __attribute((visibility("hidden"))); -+#define FcPatternAddString IA__FcPatternAddString -+extern __typeof (FcPatternAddMatrix) IA__FcPatternAddMatrix __attribute((visibility("hidden"))); -+#define FcPatternAddMatrix IA__FcPatternAddMatrix -+extern __typeof (FcPatternAddCharSet) IA__FcPatternAddCharSet __attribute((visibility("hidden"))); -+#define FcPatternAddCharSet IA__FcPatternAddCharSet -+extern __typeof (FcPatternAddBool) IA__FcPatternAddBool __attribute((visibility("hidden"))); -+#define FcPatternAddBool IA__FcPatternAddBool -+extern __typeof (FcPatternAddLangSet) IA__FcPatternAddLangSet __attribute((visibility("hidden"))); -+#define FcPatternAddLangSet IA__FcPatternAddLangSet -+extern __typeof (FcPatternGetInteger) IA__FcPatternGetInteger __attribute((visibility("hidden"))); -+#define FcPatternGetInteger IA__FcPatternGetInteger -+extern __typeof (FcPatternGetDouble) IA__FcPatternGetDouble __attribute((visibility("hidden"))); -+#define FcPatternGetDouble IA__FcPatternGetDouble -+extern __typeof (FcPatternGetString) IA__FcPatternGetString __attribute((visibility("hidden"))); -+#define FcPatternGetString IA__FcPatternGetString -+extern __typeof (FcPatternGetMatrix) IA__FcPatternGetMatrix __attribute((visibility("hidden"))); -+#define FcPatternGetMatrix IA__FcPatternGetMatrix -+extern __typeof (FcPatternGetCharSet) IA__FcPatternGetCharSet __attribute((visibility("hidden"))); -+#define FcPatternGetCharSet IA__FcPatternGetCharSet -+extern __typeof (FcPatternGetBool) IA__FcPatternGetBool __attribute((visibility("hidden"))); -+#define FcPatternGetBool IA__FcPatternGetBool -+extern __typeof (FcPatternGetLangSet) IA__FcPatternGetLangSet __attribute((visibility("hidden"))); -+#define FcPatternGetLangSet IA__FcPatternGetLangSet -+extern __typeof (FcPatternVaBuild) IA__FcPatternVaBuild __attribute((visibility("hidden"))); -+#define FcPatternVaBuild IA__FcPatternVaBuild -+extern __typeof (FcPatternBuild) IA__FcPatternBuild __attribute((visibility("hidden"))); -+#define FcPatternBuild IA__FcPatternBuild -+extern __typeof (FcPatternFormat) IA__FcPatternFormat __attribute((visibility("hidden"))); -+#define FcPatternFormat IA__FcPatternFormat -+extern __typeof (FcStrCopy) IA__FcStrCopy __attribute((visibility("hidden"))); -+#define FcStrCopy IA__FcStrCopy -+extern __typeof (FcStrCopyFilename) IA__FcStrCopyFilename __attribute((visibility("hidden"))); -+#define FcStrCopyFilename IA__FcStrCopyFilename -+extern __typeof (FcStrPlus) IA__FcStrPlus __attribute((visibility("hidden"))); -+#define FcStrPlus IA__FcStrPlus -+extern __typeof (FcStrFree) IA__FcStrFree __attribute((visibility("hidden"))); -+#define FcStrFree IA__FcStrFree -+extern __typeof (FcStrDowncase) IA__FcStrDowncase __attribute((visibility("hidden"))); -+#define FcStrDowncase IA__FcStrDowncase -+extern __typeof (FcStrCmpIgnoreCase) IA__FcStrCmpIgnoreCase __attribute((visibility("hidden"))); -+#define FcStrCmpIgnoreCase IA__FcStrCmpIgnoreCase -+extern __typeof (FcStrCmp) IA__FcStrCmp __attribute((visibility("hidden"))); -+#define FcStrCmp IA__FcStrCmp -+extern __typeof (FcStrStrIgnoreCase) IA__FcStrStrIgnoreCase __attribute((visibility("hidden"))); -+#define FcStrStrIgnoreCase IA__FcStrStrIgnoreCase -+extern __typeof (FcStrStr) IA__FcStrStr __attribute((visibility("hidden"))); -+#define FcStrStr IA__FcStrStr -+extern __typeof (FcUtf8ToUcs4) IA__FcUtf8ToUcs4 __attribute((visibility("hidden"))); -+#define FcUtf8ToUcs4 IA__FcUtf8ToUcs4 -+extern __typeof (FcUtf8Len) IA__FcUtf8Len __attribute((visibility("hidden"))); -+#define FcUtf8Len IA__FcUtf8Len -+extern __typeof (FcUcs4ToUtf8) IA__FcUcs4ToUtf8 __attribute((visibility("hidden"))); -+#define FcUcs4ToUtf8 IA__FcUcs4ToUtf8 -+extern __typeof (FcUtf16ToUcs4) IA__FcUtf16ToUcs4 __attribute((visibility("hidden"))); -+#define FcUtf16ToUcs4 IA__FcUtf16ToUcs4 -+extern __typeof (FcUtf16Len) IA__FcUtf16Len __attribute((visibility("hidden"))); -+#define FcUtf16Len IA__FcUtf16Len -+extern __typeof (FcStrDirname) IA__FcStrDirname __attribute((visibility("hidden"))); -+#define FcStrDirname IA__FcStrDirname -+extern __typeof (FcStrBasename) IA__FcStrBasename __attribute((visibility("hidden"))); -+#define FcStrBasename IA__FcStrBasename -+extern __typeof (FcStrSetCreate) IA__FcStrSetCreate __attribute((visibility("hidden"))); -+#define FcStrSetCreate IA__FcStrSetCreate -+extern __typeof (FcStrSetMember) IA__FcStrSetMember __attribute((visibility("hidden"))); -+#define FcStrSetMember IA__FcStrSetMember -+extern __typeof (FcStrSetEqual) IA__FcStrSetEqual __attribute((visibility("hidden"))); -+#define FcStrSetEqual IA__FcStrSetEqual -+extern __typeof (FcStrSetAdd) IA__FcStrSetAdd __attribute((visibility("hidden"))); -+#define FcStrSetAdd IA__FcStrSetAdd -+extern __typeof (FcStrSetAddFilename) IA__FcStrSetAddFilename __attribute((visibility("hidden"))); -+#define FcStrSetAddFilename IA__FcStrSetAddFilename -+extern __typeof (FcStrSetDel) IA__FcStrSetDel __attribute((visibility("hidden"))); -+#define FcStrSetDel IA__FcStrSetDel -+extern __typeof (FcStrSetDestroy) IA__FcStrSetDestroy __attribute((visibility("hidden"))); -+#define FcStrSetDestroy IA__FcStrSetDestroy -+extern __typeof (FcStrListCreate) IA__FcStrListCreate __attribute((visibility("hidden"))); -+#define FcStrListCreate IA__FcStrListCreate -+extern __typeof (FcStrListNext) IA__FcStrListNext __attribute((visibility("hidden"))); -+#define FcStrListNext IA__FcStrListNext -+extern __typeof (FcStrListDone) IA__FcStrListDone __attribute((visibility("hidden"))); -+#define FcStrListDone IA__FcStrListDone -+extern __typeof (FcConfigParseAndLoad) IA__FcConfigParseAndLoad __attribute((visibility("hidden"))); -+#define FcConfigParseAndLoad IA__FcConfigParseAndLoad -+extern __typeof (FcConfigGetRescanInverval) IA__FcConfigGetRescanInverval __attribute((visibility("hidden"))); -+#define FcConfigGetRescanInverval IA__FcConfigGetRescanInverval -+extern __typeof (FcConfigSetRescanInverval) IA__FcConfigSetRescanInverval __attribute((visibility("hidden"))); -+#define FcConfigSetRescanInverval IA__FcConfigSetRescanInverval -+ ---- misc/fontconfig-2.8.0/src/fcaliastail.h Wed Aug 20 14:33:55 2008 -+++ misc/build/fontconfig-2.8.0/src/fcaliastail.h Wed Aug 20 14:26:42 2008 -@@ -1 +1,739 @@ --dummy -+#if HAVE_GNUC_ATTRIBUTE -+#ifdef __fcblanks__ -+#undef FcBlanksCreate -+extern __typeof (FcBlanksCreate) FcBlanksCreate __attribute((alias("IA__FcBlanksCreate"), visibility("default"))); -+#endif -+#ifdef __fcblanks__ -+#undef FcBlanksDestroy -+extern __typeof (FcBlanksDestroy) FcBlanksDestroy __attribute((alias("IA__FcBlanksDestroy"), visibility("default"))); -+#endif -+#ifdef __fcblanks__ -+#undef FcBlanksAdd -+extern __typeof (FcBlanksAdd) FcBlanksAdd __attribute((alias("IA__FcBlanksAdd"), visibility("default"))); -+#endif -+#ifdef __fcblanks__ -+#undef FcBlanksIsMember -+extern __typeof (FcBlanksIsMember) FcBlanksIsMember __attribute((alias("IA__FcBlanksIsMember"), visibility("default"))); -+#endif -+#ifdef __fccache__ -+#undef FcCacheCopySet -+extern __typeof (FcCacheCopySet) FcCacheCopySet __attribute((alias("IA__FcCacheCopySet"), visibility("default"))); -+#endif -+#ifdef __fccache__ -+#undef FcCacheNumSubdir -+extern __typeof (FcCacheNumSubdir) FcCacheNumSubdir __attribute((alias("IA__FcCacheNumSubdir"), visibility("default"))); -+#endif -+#ifdef __fccache__ -+#undef FcCacheNumFont -+extern __typeof (FcCacheNumFont) FcCacheNumFont __attribute((alias("IA__FcCacheNumFont"), visibility("default"))); -+#endif -+#ifdef __fccache__ -+#undef FcDirCacheUnlink -+extern __typeof (FcDirCacheUnlink) FcDirCacheUnlink __attribute((alias("IA__FcDirCacheUnlink"), visibility("default"))); -+#endif -+#ifdef __fccache__ -+#undef FcDirCacheValid -+extern __typeof (FcDirCacheValid) FcDirCacheValid __attribute((alias("IA__FcDirCacheValid"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigHome -+extern __typeof (FcConfigHome) FcConfigHome __attribute((alias("IA__FcConfigHome"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigEnableHome -+extern __typeof (FcConfigEnableHome) FcConfigEnableHome __attribute((alias("IA__FcConfigEnableHome"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigFilename -+extern __typeof (FcConfigFilename) FcConfigFilename __attribute((alias("IA__FcConfigFilename"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigCreate -+extern __typeof (FcConfigCreate) FcConfigCreate __attribute((alias("IA__FcConfigCreate"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigReference -+extern __typeof (FcConfigReference) FcConfigReference __attribute((alias("IA__FcConfigReference"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigDestroy -+extern __typeof (FcConfigDestroy) FcConfigDestroy __attribute((alias("IA__FcConfigDestroy"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigSetCurrent -+extern __typeof (FcConfigSetCurrent) FcConfigSetCurrent __attribute((alias("IA__FcConfigSetCurrent"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigGetCurrent -+extern __typeof (FcConfigGetCurrent) FcConfigGetCurrent __attribute((alias("IA__FcConfigGetCurrent"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigUptoDate -+extern __typeof (FcConfigUptoDate) FcConfigUptoDate __attribute((alias("IA__FcConfigUptoDate"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigBuildFonts -+extern __typeof (FcConfigBuildFonts) FcConfigBuildFonts __attribute((alias("IA__FcConfigBuildFonts"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigGetFontDirs -+extern __typeof (FcConfigGetFontDirs) FcConfigGetFontDirs __attribute((alias("IA__FcConfigGetFontDirs"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigGetConfigDirs -+extern __typeof (FcConfigGetConfigDirs) FcConfigGetConfigDirs __attribute((alias("IA__FcConfigGetConfigDirs"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigGetConfigFiles -+extern __typeof (FcConfigGetConfigFiles) FcConfigGetConfigFiles __attribute((alias("IA__FcConfigGetConfigFiles"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigGetCache -+extern __typeof (FcConfigGetCache) FcConfigGetCache __attribute((alias("IA__FcConfigGetCache"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigGetBlanks -+extern __typeof (FcConfigGetBlanks) FcConfigGetBlanks __attribute((alias("IA__FcConfigGetBlanks"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigGetCacheDirs -+extern __typeof (FcConfigGetCacheDirs) FcConfigGetCacheDirs __attribute((alias("IA__FcConfigGetCacheDirs"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigGetRescanInterval -+extern __typeof (FcConfigGetRescanInterval) FcConfigGetRescanInterval __attribute((alias("IA__FcConfigGetRescanInterval"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigSetRescanInterval -+extern __typeof (FcConfigSetRescanInterval) FcConfigSetRescanInterval __attribute((alias("IA__FcConfigSetRescanInterval"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigGetFonts -+extern __typeof (FcConfigGetFonts) FcConfigGetFonts __attribute((alias("IA__FcConfigGetFonts"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigAppFontAddFile -+extern __typeof (FcConfigAppFontAddFile) FcConfigAppFontAddFile __attribute((alias("IA__FcConfigAppFontAddFile"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigAppFontAddDir -+extern __typeof (FcConfigAppFontAddDir) FcConfigAppFontAddDir __attribute((alias("IA__FcConfigAppFontAddDir"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigAppFontClear -+extern __typeof (FcConfigAppFontClear) FcConfigAppFontClear __attribute((alias("IA__FcConfigAppFontClear"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigSubstituteWithPat -+extern __typeof (FcConfigSubstituteWithPat) FcConfigSubstituteWithPat __attribute((alias("IA__FcConfigSubstituteWithPat"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigSubstitute -+extern __typeof (FcConfigSubstitute) FcConfigSubstitute __attribute((alias("IA__FcConfigSubstitute"), visibility("default"))); -+#endif -+#ifdef __fccharset__ -+#undef FcCharSetCreate -+extern __typeof (FcCharSetCreate) FcCharSetCreate __attribute((alias("IA__FcCharSetCreate"), visibility("default"))); -+#endif -+#ifdef __fccharset__ -+#undef FcCharSetNew -+extern __typeof (FcCharSetNew) FcCharSetNew __attribute((alias("IA__FcCharSetNew"), visibility("default"))); -+#endif -+#ifdef __fccharset__ -+#undef FcCharSetDestroy -+extern __typeof (FcCharSetDestroy) FcCharSetDestroy __attribute((alias("IA__FcCharSetDestroy"), visibility("default"))); -+#endif -+#ifdef __fccharset__ -+#undef FcCharSetAddChar -+extern __typeof (FcCharSetAddChar) FcCharSetAddChar __attribute((alias("IA__FcCharSetAddChar"), visibility("default"))); -+#endif -+#ifdef __fccharset__ -+#undef FcCharSetCopy -+extern __typeof (FcCharSetCopy) FcCharSetCopy __attribute((alias("IA__FcCharSetCopy"), visibility("default"))); -+#endif -+#ifdef __fccharset__ -+#undef FcCharSetEqual -+extern __typeof (FcCharSetEqual) FcCharSetEqual __attribute((alias("IA__FcCharSetEqual"), visibility("default"))); -+#endif -+#ifdef __fccharset__ -+#undef FcCharSetIntersect -+extern __typeof (FcCharSetIntersect) FcCharSetIntersect __attribute((alias("IA__FcCharSetIntersect"), visibility("default"))); -+#endif -+#ifdef __fccharset__ -+#undef FcCharSetUnion -+extern __typeof (FcCharSetUnion) FcCharSetUnion __attribute((alias("IA__FcCharSetUnion"), visibility("default"))); -+#endif -+#ifdef __fccharset__ -+#undef FcCharSetSubtract -+extern __typeof (FcCharSetSubtract) FcCharSetSubtract __attribute((alias("IA__FcCharSetSubtract"), visibility("default"))); -+#endif -+#ifdef __fccharset__ -+#undef FcCharSetMerge -+extern __typeof (FcCharSetMerge) FcCharSetMerge __attribute((alias("IA__FcCharSetMerge"), visibility("default"))); -+#endif -+#ifdef __fccharset__ -+#undef FcCharSetHasChar -+extern __typeof (FcCharSetHasChar) FcCharSetHasChar __attribute((alias("IA__FcCharSetHasChar"), visibility("default"))); -+#endif -+#ifdef __fccharset__ -+#undef FcCharSetCount -+extern __typeof (FcCharSetCount) FcCharSetCount __attribute((alias("IA__FcCharSetCount"), visibility("default"))); -+#endif -+#ifdef __fccharset__ -+#undef FcCharSetIntersectCount -+extern __typeof (FcCharSetIntersectCount) FcCharSetIntersectCount __attribute((alias("IA__FcCharSetIntersectCount"), visibility("default"))); -+#endif -+#ifdef __fccharset__ -+#undef FcCharSetSubtractCount -+extern __typeof (FcCharSetSubtractCount) FcCharSetSubtractCount __attribute((alias("IA__FcCharSetSubtractCount"), visibility("default"))); -+#endif -+#ifdef __fccharset__ -+#undef FcCharSetIsSubset -+extern __typeof (FcCharSetIsSubset) FcCharSetIsSubset __attribute((alias("IA__FcCharSetIsSubset"), visibility("default"))); -+#endif -+#ifdef __fccharset__ -+#undef FcCharSetFirstPage -+extern __typeof (FcCharSetFirstPage) FcCharSetFirstPage __attribute((alias("IA__FcCharSetFirstPage"), visibility("default"))); -+#endif -+#ifdef __fccharset__ -+#undef FcCharSetNextPage -+extern __typeof (FcCharSetNextPage) FcCharSetNextPage __attribute((alias("IA__FcCharSetNextPage"), visibility("default"))); -+#endif -+#ifdef __fccharset__ -+#undef FcCharSetCoverage -+extern __typeof (FcCharSetCoverage) FcCharSetCoverage __attribute((alias("IA__FcCharSetCoverage"), visibility("default"))); -+#endif -+#ifdef __fcdbg__ -+#undef FcValuePrint -+extern __typeof (FcValuePrint) FcValuePrint __attribute((alias("IA__FcValuePrint"), visibility("default"))); -+#endif -+#ifdef __fcdbg__ -+#undef FcPatternPrint -+extern __typeof (FcPatternPrint) FcPatternPrint __attribute((alias("IA__FcPatternPrint"), visibility("default"))); -+#endif -+#ifdef __fcdbg__ -+#undef FcFontSetPrint -+extern __typeof (FcFontSetPrint) FcFontSetPrint __attribute((alias("IA__FcFontSetPrint"), visibility("default"))); -+#endif -+#ifdef __fcdefault__ -+#undef FcDefaultSubstitute -+extern __typeof (FcDefaultSubstitute) FcDefaultSubstitute __attribute((alias("IA__FcDefaultSubstitute"), visibility("default"))); -+#endif -+#ifdef __fcdir__ -+#undef FcFileIsDir -+extern __typeof (FcFileIsDir) FcFileIsDir __attribute((alias("IA__FcFileIsDir"), visibility("default"))); -+#endif -+#ifdef __fcdir__ -+#undef FcFileScan -+extern __typeof (FcFileScan) FcFileScan __attribute((alias("IA__FcFileScan"), visibility("default"))); -+#endif -+#ifdef __fcdir__ -+#undef FcDirScan -+extern __typeof (FcDirScan) FcDirScan __attribute((alias("IA__FcDirScan"), visibility("default"))); -+#endif -+#ifdef __fcdir__ -+#undef FcDirSave -+extern __typeof (FcDirSave) FcDirSave __attribute((alias("IA__FcDirSave"), visibility("default"))); -+#endif -+#ifdef __fccache__ -+#undef FcDirCacheLoad -+extern __typeof (FcDirCacheLoad) FcDirCacheLoad __attribute((alias("IA__FcDirCacheLoad"), visibility("default"))); -+#endif -+#ifdef __fcdir__ -+#undef FcDirCacheRead -+extern __typeof (FcDirCacheRead) FcDirCacheRead __attribute((alias("IA__FcDirCacheRead"), visibility("default"))); -+#endif -+#ifdef __fccache__ -+#undef FcDirCacheLoadFile -+extern __typeof (FcDirCacheLoadFile) FcDirCacheLoadFile __attribute((alias("IA__FcDirCacheLoadFile"), visibility("default"))); -+#endif -+#ifdef __fccache__ -+#undef FcDirCacheUnload -+extern __typeof (FcDirCacheUnload) FcDirCacheUnload __attribute((alias("IA__FcDirCacheUnload"), visibility("default"))); -+#endif -+#ifdef __fcfreetype__ -+#undef FcFreeTypeQuery -+extern __typeof (FcFreeTypeQuery) FcFreeTypeQuery __attribute((alias("IA__FcFreeTypeQuery"), visibility("default"))); -+#endif -+#ifdef __fcfs__ -+#undef FcFontSetCreate -+extern __typeof (FcFontSetCreate) FcFontSetCreate __attribute((alias("IA__FcFontSetCreate"), visibility("default"))); -+#endif -+#ifdef __fcfs__ -+#undef FcFontSetDestroy -+extern __typeof (FcFontSetDestroy) FcFontSetDestroy __attribute((alias("IA__FcFontSetDestroy"), visibility("default"))); -+#endif -+#ifdef __fcfs__ -+#undef FcFontSetAdd -+extern __typeof (FcFontSetAdd) FcFontSetAdd __attribute((alias("IA__FcFontSetAdd"), visibility("default"))); -+#endif -+#ifdef __fcinit__ -+#undef FcInitLoadConfig -+extern __typeof (FcInitLoadConfig) FcInitLoadConfig __attribute((alias("IA__FcInitLoadConfig"), visibility("default"))); -+#endif -+#ifdef __fcinit__ -+#undef FcInitLoadConfigAndFonts -+extern __typeof (FcInitLoadConfigAndFonts) FcInitLoadConfigAndFonts __attribute((alias("IA__FcInitLoadConfigAndFonts"), visibility("default"))); -+#endif -+#ifdef __fcinit__ -+#undef FcInit -+extern __typeof (FcInit) FcInit __attribute((alias("IA__FcInit"), visibility("default"))); -+#endif -+#ifdef __fcinit__ -+#undef FcFini -+extern __typeof (FcFini) FcFini __attribute((alias("IA__FcFini"), visibility("default"))); -+#endif -+#ifdef __fcinit__ -+#undef FcGetVersion -+extern __typeof (FcGetVersion) FcGetVersion __attribute((alias("IA__FcGetVersion"), visibility("default"))); -+#endif -+#ifdef __fcinit__ -+#undef FcInitReinitialize -+extern __typeof (FcInitReinitialize) FcInitReinitialize __attribute((alias("IA__FcInitReinitialize"), visibility("default"))); -+#endif -+#ifdef __fcinit__ -+#undef FcInitBringUptoDate -+extern __typeof (FcInitBringUptoDate) FcInitBringUptoDate __attribute((alias("IA__FcInitBringUptoDate"), visibility("default"))); -+#endif -+#ifdef __fclang__ -+#undef FcGetLangs -+extern __typeof (FcGetLangs) FcGetLangs __attribute((alias("IA__FcGetLangs"), visibility("default"))); -+#endif -+#ifdef __fclang__ -+#undef FcLangGetCharSet -+extern __typeof (FcLangGetCharSet) FcLangGetCharSet __attribute((alias("IA__FcLangGetCharSet"), visibility("default"))); -+#endif -+#ifdef __fclang__ -+#undef FcLangSetCreate -+extern __typeof (FcLangSetCreate) FcLangSetCreate __attribute((alias("IA__FcLangSetCreate"), visibility("default"))); -+#endif -+#ifdef __fclang__ -+#undef FcLangSetDestroy -+extern __typeof (FcLangSetDestroy) FcLangSetDestroy __attribute((alias("IA__FcLangSetDestroy"), visibility("default"))); -+#endif -+#ifdef __fclang__ -+#undef FcLangSetCopy -+extern __typeof (FcLangSetCopy) FcLangSetCopy __attribute((alias("IA__FcLangSetCopy"), visibility("default"))); -+#endif -+#ifdef __fclang__ -+#undef FcLangSetAdd -+extern __typeof (FcLangSetAdd) FcLangSetAdd __attribute((alias("IA__FcLangSetAdd"), visibility("default"))); -+#endif -+#ifdef __fclang__ -+#undef FcLangSetHasLang -+extern __typeof (FcLangSetHasLang) FcLangSetHasLang __attribute((alias("IA__FcLangSetHasLang"), visibility("default"))); -+#endif -+#ifdef __fclang__ -+#undef FcLangSetCompare -+extern __typeof (FcLangSetCompare) FcLangSetCompare __attribute((alias("IA__FcLangSetCompare"), visibility("default"))); -+#endif -+#ifdef __fclang__ -+#undef FcLangSetContains -+extern __typeof (FcLangSetContains) FcLangSetContains __attribute((alias("IA__FcLangSetContains"), visibility("default"))); -+#endif -+#ifdef __fclang__ -+#undef FcLangSetEqual -+extern __typeof (FcLangSetEqual) FcLangSetEqual __attribute((alias("IA__FcLangSetEqual"), visibility("default"))); -+#endif -+#ifdef __fclang__ -+#undef FcLangSetHash -+extern __typeof (FcLangSetHash) FcLangSetHash __attribute((alias("IA__FcLangSetHash"), visibility("default"))); -+#endif -+#ifdef __fclang__ -+#undef FcLangSetGetLangs -+extern __typeof (FcLangSetGetLangs) FcLangSetGetLangs __attribute((alias("IA__FcLangSetGetLangs"), visibility("default"))); -+#endif -+#ifdef __fclist__ -+#undef FcObjectSetCreate -+extern __typeof (FcObjectSetCreate) FcObjectSetCreate __attribute((alias("IA__FcObjectSetCreate"), visibility("default"))); -+#endif -+#ifdef __fclist__ -+#undef FcObjectSetAdd -+extern __typeof (FcObjectSetAdd) FcObjectSetAdd __attribute((alias("IA__FcObjectSetAdd"), visibility("default"))); -+#endif -+#ifdef __fclist__ -+#undef FcObjectSetDestroy -+extern __typeof (FcObjectSetDestroy) FcObjectSetDestroy __attribute((alias("IA__FcObjectSetDestroy"), visibility("default"))); -+#endif -+#ifdef __fclist__ -+#undef FcObjectSetVaBuild -+extern __typeof (FcObjectSetVaBuild) FcObjectSetVaBuild __attribute((alias("IA__FcObjectSetVaBuild"), visibility("default"))); -+#endif -+#ifdef __fclist__ -+#undef FcObjectSetBuild -+extern __typeof (FcObjectSetBuild) FcObjectSetBuild __attribute((alias("IA__FcObjectSetBuild"), visibility("default"))); -+#endif -+#ifdef __fclist__ -+#undef FcFontSetList -+extern __typeof (FcFontSetList) FcFontSetList __attribute((alias("IA__FcFontSetList"), visibility("default"))); -+#endif -+#ifdef __fclist__ -+#undef FcFontList -+extern __typeof (FcFontList) FcFontList __attribute((alias("IA__FcFontList"), visibility("default"))); -+#endif -+#ifdef __fcatomic__ -+#undef FcAtomicCreate -+extern __typeof (FcAtomicCreate) FcAtomicCreate __attribute((alias("IA__FcAtomicCreate"), visibility("default"))); -+#endif -+#ifdef __fcatomic__ -+#undef FcAtomicLock -+extern __typeof (FcAtomicLock) FcAtomicLock __attribute((alias("IA__FcAtomicLock"), visibility("default"))); -+#endif -+#ifdef __fcatomic__ -+#undef FcAtomicNewFile -+extern __typeof (FcAtomicNewFile) FcAtomicNewFile __attribute((alias("IA__FcAtomicNewFile"), visibility("default"))); -+#endif -+#ifdef __fcatomic__ -+#undef FcAtomicOrigFile -+extern __typeof (FcAtomicOrigFile) FcAtomicOrigFile __attribute((alias("IA__FcAtomicOrigFile"), visibility("default"))); -+#endif -+#ifdef __fcatomic__ -+#undef FcAtomicReplaceOrig -+extern __typeof (FcAtomicReplaceOrig) FcAtomicReplaceOrig __attribute((alias("IA__FcAtomicReplaceOrig"), visibility("default"))); -+#endif -+#ifdef __fcatomic__ -+#undef FcAtomicDeleteNew -+extern __typeof (FcAtomicDeleteNew) FcAtomicDeleteNew __attribute((alias("IA__FcAtomicDeleteNew"), visibility("default"))); -+#endif -+#ifdef __fcatomic__ -+#undef FcAtomicUnlock -+extern __typeof (FcAtomicUnlock) FcAtomicUnlock __attribute((alias("IA__FcAtomicUnlock"), visibility("default"))); -+#endif -+#ifdef __fcatomic__ -+#undef FcAtomicDestroy -+extern __typeof (FcAtomicDestroy) FcAtomicDestroy __attribute((alias("IA__FcAtomicDestroy"), visibility("default"))); -+#endif -+#ifdef __fcmatch__ -+#undef FcFontSetMatch -+extern __typeof (FcFontSetMatch) FcFontSetMatch __attribute((alias("IA__FcFontSetMatch"), visibility("default"))); -+#endif -+#ifdef __fcmatch__ -+#undef FcFontMatch -+extern __typeof (FcFontMatch) FcFontMatch __attribute((alias("IA__FcFontMatch"), visibility("default"))); -+#endif -+#ifdef __fcmatch__ -+#undef FcFontRenderPrepare -+extern __typeof (FcFontRenderPrepare) FcFontRenderPrepare __attribute((alias("IA__FcFontRenderPrepare"), visibility("default"))); -+#endif -+#ifdef __fcmatch__ -+#undef FcFontSetSort -+extern __typeof (FcFontSetSort) FcFontSetSort __attribute((alias("IA__FcFontSetSort"), visibility("default"))); -+#endif -+#ifdef __fcmatch__ -+#undef FcFontSort -+extern __typeof (FcFontSort) FcFontSort __attribute((alias("IA__FcFontSort"), visibility("default"))); -+#endif -+#ifdef __fcmatch__ -+#undef FcFontSetSortDestroy -+extern __typeof (FcFontSetSortDestroy) FcFontSetSortDestroy __attribute((alias("IA__FcFontSetSortDestroy"), visibility("default"))); -+#endif -+#ifdef __fcmatrix__ -+#undef FcMatrixCopy -+extern __typeof (FcMatrixCopy) FcMatrixCopy __attribute((alias("IA__FcMatrixCopy"), visibility("default"))); -+#endif -+#ifdef __fcmatrix__ -+#undef FcMatrixEqual -+extern __typeof (FcMatrixEqual) FcMatrixEqual __attribute((alias("IA__FcMatrixEqual"), visibility("default"))); -+#endif -+#ifdef __fcmatrix__ -+#undef FcMatrixMultiply -+extern __typeof (FcMatrixMultiply) FcMatrixMultiply __attribute((alias("IA__FcMatrixMultiply"), visibility("default"))); -+#endif -+#ifdef __fcmatrix__ -+#undef FcMatrixRotate -+extern __typeof (FcMatrixRotate) FcMatrixRotate __attribute((alias("IA__FcMatrixRotate"), visibility("default"))); -+#endif -+#ifdef __fcmatrix__ -+#undef FcMatrixScale -+extern __typeof (FcMatrixScale) FcMatrixScale __attribute((alias("IA__FcMatrixScale"), visibility("default"))); -+#endif -+#ifdef __fcmatrix__ -+#undef FcMatrixShear -+extern __typeof (FcMatrixShear) FcMatrixShear __attribute((alias("IA__FcMatrixShear"), visibility("default"))); -+#endif -+#ifdef __fcname__ -+#undef FcNameRegisterObjectTypes -+extern __typeof (FcNameRegisterObjectTypes) FcNameRegisterObjectTypes __attribute((alias("IA__FcNameRegisterObjectTypes"), visibility("default"))); -+#endif -+#ifdef __fcname__ -+#undef FcNameUnregisterObjectTypes -+extern __typeof (FcNameUnregisterObjectTypes) FcNameUnregisterObjectTypes __attribute((alias("IA__FcNameUnregisterObjectTypes"), visibility("default"))); -+#endif -+#ifdef __fcname__ -+#undef FcNameGetObjectType -+extern __typeof (FcNameGetObjectType) FcNameGetObjectType __attribute((alias("IA__FcNameGetObjectType"), visibility("default"))); -+#endif -+#ifdef __fcname__ -+#undef FcNameRegisterConstants -+extern __typeof (FcNameRegisterConstants) FcNameRegisterConstants __attribute((alias("IA__FcNameRegisterConstants"), visibility("default"))); -+#endif -+#ifdef __fcname__ -+#undef FcNameUnregisterConstants -+extern __typeof (FcNameUnregisterConstants) FcNameUnregisterConstants __attribute((alias("IA__FcNameUnregisterConstants"), visibility("default"))); -+#endif -+#ifdef __fcname__ -+#undef FcNameGetConstant -+extern __typeof (FcNameGetConstant) FcNameGetConstant __attribute((alias("IA__FcNameGetConstant"), visibility("default"))); -+#endif -+#ifdef __fcname__ -+#undef FcNameConstant -+extern __typeof (FcNameConstant) FcNameConstant __attribute((alias("IA__FcNameConstant"), visibility("default"))); -+#endif -+#ifdef __fcname__ -+#undef FcNameParse -+extern __typeof (FcNameParse) FcNameParse __attribute((alias("IA__FcNameParse"), visibility("default"))); -+#endif -+#ifdef __fcname__ -+#undef FcNameUnparse -+extern __typeof (FcNameUnparse) FcNameUnparse __attribute((alias("IA__FcNameUnparse"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternCreate -+extern __typeof (FcPatternCreate) FcPatternCreate __attribute((alias("IA__FcPatternCreate"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternDuplicate -+extern __typeof (FcPatternDuplicate) FcPatternDuplicate __attribute((alias("IA__FcPatternDuplicate"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternReference -+extern __typeof (FcPatternReference) FcPatternReference __attribute((alias("IA__FcPatternReference"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternFilter -+extern __typeof (FcPatternFilter) FcPatternFilter __attribute((alias("IA__FcPatternFilter"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcValueDestroy -+extern __typeof (FcValueDestroy) FcValueDestroy __attribute((alias("IA__FcValueDestroy"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcValueEqual -+extern __typeof (FcValueEqual) FcValueEqual __attribute((alias("IA__FcValueEqual"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcValueSave -+extern __typeof (FcValueSave) FcValueSave __attribute((alias("IA__FcValueSave"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternDestroy -+extern __typeof (FcPatternDestroy) FcPatternDestroy __attribute((alias("IA__FcPatternDestroy"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternEqual -+extern __typeof (FcPatternEqual) FcPatternEqual __attribute((alias("IA__FcPatternEqual"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternEqualSubset -+extern __typeof (FcPatternEqualSubset) FcPatternEqualSubset __attribute((alias("IA__FcPatternEqualSubset"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternHash -+extern __typeof (FcPatternHash) FcPatternHash __attribute((alias("IA__FcPatternHash"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternAdd -+extern __typeof (FcPatternAdd) FcPatternAdd __attribute((alias("IA__FcPatternAdd"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternAddWeak -+extern __typeof (FcPatternAddWeak) FcPatternAddWeak __attribute((alias("IA__FcPatternAddWeak"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternGet -+extern __typeof (FcPatternGet) FcPatternGet __attribute((alias("IA__FcPatternGet"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternDel -+extern __typeof (FcPatternDel) FcPatternDel __attribute((alias("IA__FcPatternDel"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternRemove -+extern __typeof (FcPatternRemove) FcPatternRemove __attribute((alias("IA__FcPatternRemove"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternAddInteger -+extern __typeof (FcPatternAddInteger) FcPatternAddInteger __attribute((alias("IA__FcPatternAddInteger"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternAddDouble -+extern __typeof (FcPatternAddDouble) FcPatternAddDouble __attribute((alias("IA__FcPatternAddDouble"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternAddString -+extern __typeof (FcPatternAddString) FcPatternAddString __attribute((alias("IA__FcPatternAddString"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternAddMatrix -+extern __typeof (FcPatternAddMatrix) FcPatternAddMatrix __attribute((alias("IA__FcPatternAddMatrix"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternAddCharSet -+extern __typeof (FcPatternAddCharSet) FcPatternAddCharSet __attribute((alias("IA__FcPatternAddCharSet"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternAddBool -+extern __typeof (FcPatternAddBool) FcPatternAddBool __attribute((alias("IA__FcPatternAddBool"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternAddLangSet -+extern __typeof (FcPatternAddLangSet) FcPatternAddLangSet __attribute((alias("IA__FcPatternAddLangSet"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternGetInteger -+extern __typeof (FcPatternGetInteger) FcPatternGetInteger __attribute((alias("IA__FcPatternGetInteger"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternGetDouble -+extern __typeof (FcPatternGetDouble) FcPatternGetDouble __attribute((alias("IA__FcPatternGetDouble"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternGetString -+extern __typeof (FcPatternGetString) FcPatternGetString __attribute((alias("IA__FcPatternGetString"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternGetMatrix -+extern __typeof (FcPatternGetMatrix) FcPatternGetMatrix __attribute((alias("IA__FcPatternGetMatrix"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternGetCharSet -+extern __typeof (FcPatternGetCharSet) FcPatternGetCharSet __attribute((alias("IA__FcPatternGetCharSet"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternGetBool -+extern __typeof (FcPatternGetBool) FcPatternGetBool __attribute((alias("IA__FcPatternGetBool"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternGetLangSet -+extern __typeof (FcPatternGetLangSet) FcPatternGetLangSet __attribute((alias("IA__FcPatternGetLangSet"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternVaBuild -+extern __typeof (FcPatternVaBuild) FcPatternVaBuild __attribute((alias("IA__FcPatternVaBuild"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternBuild -+extern __typeof (FcPatternBuild) FcPatternBuild __attribute((alias("IA__FcPatternBuild"), visibility("default"))); -+#endif -+#ifdef __fcformat__ -+#undef FcPatternFormat -+extern __typeof (FcPatternFormat) FcPatternFormat __attribute((alias("IA__FcPatternFormat"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcStrCopy -+extern __typeof (FcStrCopy) FcStrCopy __attribute((alias("IA__FcStrCopy"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcStrCopyFilename -+extern __typeof (FcStrCopyFilename) FcStrCopyFilename __attribute((alias("IA__FcStrCopyFilename"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcStrPlus -+extern __typeof (FcStrPlus) FcStrPlus __attribute((alias("IA__FcStrPlus"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcStrFree -+extern __typeof (FcStrFree) FcStrFree __attribute((alias("IA__FcStrFree"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcStrDowncase -+extern __typeof (FcStrDowncase) FcStrDowncase __attribute((alias("IA__FcStrDowncase"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcStrCmpIgnoreCase -+extern __typeof (FcStrCmpIgnoreCase) FcStrCmpIgnoreCase __attribute((alias("IA__FcStrCmpIgnoreCase"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcStrCmp -+extern __typeof (FcStrCmp) FcStrCmp __attribute((alias("IA__FcStrCmp"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcStrStrIgnoreCase -+extern __typeof (FcStrStrIgnoreCase) FcStrStrIgnoreCase __attribute((alias("IA__FcStrStrIgnoreCase"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcStrStr -+extern __typeof (FcStrStr) FcStrStr __attribute((alias("IA__FcStrStr"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcUtf8ToUcs4 -+extern __typeof (FcUtf8ToUcs4) FcUtf8ToUcs4 __attribute((alias("IA__FcUtf8ToUcs4"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcUtf8Len -+extern __typeof (FcUtf8Len) FcUtf8Len __attribute((alias("IA__FcUtf8Len"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcUcs4ToUtf8 -+extern __typeof (FcUcs4ToUtf8) FcUcs4ToUtf8 __attribute((alias("IA__FcUcs4ToUtf8"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcUtf16ToUcs4 -+extern __typeof (FcUtf16ToUcs4) FcUtf16ToUcs4 __attribute((alias("IA__FcUtf16ToUcs4"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcUtf16Len -+extern __typeof (FcUtf16Len) FcUtf16Len __attribute((alias("IA__FcUtf16Len"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcStrDirname -+extern __typeof (FcStrDirname) FcStrDirname __attribute((alias("IA__FcStrDirname"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcStrBasename -+extern __typeof (FcStrBasename) FcStrBasename __attribute((alias("IA__FcStrBasename"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcStrSetCreate -+extern __typeof (FcStrSetCreate) FcStrSetCreate __attribute((alias("IA__FcStrSetCreate"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcStrSetMember -+extern __typeof (FcStrSetMember) FcStrSetMember __attribute((alias("IA__FcStrSetMember"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcStrSetEqual -+extern __typeof (FcStrSetEqual) FcStrSetEqual __attribute((alias("IA__FcStrSetEqual"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcStrSetAdd -+extern __typeof (FcStrSetAdd) FcStrSetAdd __attribute((alias("IA__FcStrSetAdd"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcStrSetAddFilename -+extern __typeof (FcStrSetAddFilename) FcStrSetAddFilename __attribute((alias("IA__FcStrSetAddFilename"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcStrSetDel -+extern __typeof (FcStrSetDel) FcStrSetDel __attribute((alias("IA__FcStrSetDel"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcStrSetDestroy -+extern __typeof (FcStrSetDestroy) FcStrSetDestroy __attribute((alias("IA__FcStrSetDestroy"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcStrListCreate -+extern __typeof (FcStrListCreate) FcStrListCreate __attribute((alias("IA__FcStrListCreate"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcStrListNext -+extern __typeof (FcStrListNext) FcStrListNext __attribute((alias("IA__FcStrListNext"), visibility("default"))); -+#endif -+#ifdef __fcstr__ -+#undef FcStrListDone -+extern __typeof (FcStrListDone) FcStrListDone __attribute((alias("IA__FcStrListDone"), visibility("default"))); -+#endif -+#ifdef __fcxml__ -+#undef FcConfigParseAndLoad -+extern __typeof (FcConfigParseAndLoad) FcConfigParseAndLoad __attribute((alias("IA__FcConfigParseAndLoad"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigGetRescanInverval -+extern __typeof (FcConfigGetRescanInverval) FcConfigGetRescanInverval __attribute((alias("IA__FcConfigGetRescanInverval"), visibility("default"))); -+#endif -+#ifdef __fccfg__ -+#undef FcConfigSetRescanInverval -+extern __typeof (FcConfigSetRescanInverval) FcConfigSetRescanInverval __attribute((alias("IA__FcConfigSetRescanInverval"), visibility("default"))); -+#endif -+#endif -+ ---- misc/fontconfig-2.8.0/src/fcftaliastail.h Wed Aug 20 14:33:55 2008 -+++ misc/build/fontconfig-2.8.0/src/fcftaliastail.h Wed Aug 20 14:26:42 2008 -@@ -1 +1,27 @@ --dummy -+#if HAVE_GNUC_ATTRIBUTE -+#ifdef __fcfreetype__ -+#undef FcFreeTypeCharIndex -+extern __typeof (FcFreeTypeCharIndex) FcFreeTypeCharIndex __attribute((alias("IA__FcFreeTypeCharIndex"), visibility("default"))); -+#endif -+#ifdef __fcfreetype__ -+#undef FcFreeTypeCharSetAndSpacing -+extern __typeof (FcFreeTypeCharSetAndSpacing) FcFreeTypeCharSetAndSpacing __attribute((alias("IA__FcFreeTypeCharSetAndSpacing"), visibility("default"))); -+#endif -+#ifdef __fcfreetype__ -+#undef FcFreeTypeCharSet -+extern __typeof (FcFreeTypeCharSet) FcFreeTypeCharSet __attribute((alias("IA__FcFreeTypeCharSet"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternGetFTFace -+extern __typeof (FcPatternGetFTFace) FcPatternGetFTFace __attribute((alias("IA__FcPatternGetFTFace"), visibility("default"))); -+#endif -+#ifdef __fcpat__ -+#undef FcPatternAddFTFace -+extern __typeof (FcPatternAddFTFace) FcPatternAddFTFace __attribute((alias("IA__FcPatternAddFTFace"), visibility("default"))); -+#endif -+#ifdef __fcfreetype__ -+#undef FcFreeTypeQueryFace -+extern __typeof (FcFreeTypeQueryFace) FcFreeTypeQueryFace __attribute((alias("IA__FcFreeTypeQueryFace"), visibility("default"))); -+#endif -+#endif -+ ---- misc/fontconfig-2.8.0/src/makefile.mk Wed Aug 20 14:33:55 2008 -+++ misc/build/fontconfig-2.8.0/src/makefile.mk Wed Aug 20 14:26:42 2008 -@@ -1 +1,99 @@ --dummy -+#************************************************************************* -+# -+# 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=..$/..$/..$/..$/.. -+PRJINC=.. -+PRJNAME=fontconfig -+TARGET=fontconfig -+ -+#ENABLE_EXCEPTIONS=TRUE -+VISIBILITY_HIDDEN=TRUE -+EXTERNAL_WARNINGS_NOT_ERRORS=TRUE -+ -+# --- Settings ---------------------------------- -+ -+.INCLUDE : settings.mk -+ -+#.IF "$(GUI)$(CPU)"=="WNTP" -+ CFLAGS+= -I .. -D HAVE_CONFIG_H -D FC_CACHEDIR=\".\" -+ #.ENDIF -+ -+# --- Files ------------------------------------- -+ -+SLOFILES=\ -+ $(SLO)$/fcatomic.obj \ -+ $(SLO)$/fcblanks.obj \ -+ $(SLO)$/fccache.obj \ -+ $(SLO)$/fccfg.obj \ -+ $(SLO)$/fccharset.obj \ -+ $(SLO)$/fcdbg.obj \ -+ $(SLO)$/fcdefault.obj \ -+ $(SLO)$/fcdir.obj \ -+ $(SLO)$/fcformat.obj \ -+ $(SLO)$/fcfreetype.obj \ -+ $(SLO)$/fcfs.obj \ -+ $(SLO)$/fcinit.obj \ -+ $(SLO)$/fclang.obj \ -+ $(SLO)$/fclist.obj \ -+ $(SLO)$/fcmatch.obj \ -+ $(SLO)$/fcmatrix.obj \ -+ $(SLO)$/fcname.obj \ -+ $(SLO)$/fcpat.obj \ -+ $(SLO)$/fcserialize.obj \ -+ $(SLO)$/fcstr.obj \ -+ $(SLO)$/fcxml.obj \ -+ $(SLO)$/ftglue.obj -+ -+# --- Library ----------------------------------- -+ -+SHL1TARGET= fontconfig$(DLLPOSTFIX) -+SHL1OBJS=$(SLOFILES) -+SHL1STDLIBS=\ -+ ifreetype.lib \ -+ $(LIBXML2LIB) -+ -+ -+SHL1DEPN= -+#SHL1IMPLIB= ifontconfig -+#SHL1USE_EXPORTS=name -+ -+SHL1DEF= $(MISC)$/$(SHL1TARGET).def -+ -+DEF1NAME= $(SHL1TARGET) -+DEF1DEPN= $(MISC)$/$(SHL1TARGET).flt \ -+ $(SLB)$/$(TARGET).lib -+DEFLIB1NAME=$(TARGET) -+ -+# --- Targets ---------------------------------- -+ -+.INCLUDE : target.mk -+ -+# --- filter file ------------------------------ -+ -+$(MISC)$/$(SHL1TARGET).flt: makefile.mk -+ @echo CLEAR_THE_FILE > $@ -+ diff --git a/fontconfig/makefile.mk b/fontconfig/makefile.mk deleted file mode 100644 index 3618cdc129e8..000000000000 --- a/fontconfig/makefile.mk +++ /dev/null @@ -1,78 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=. - -PRJNAME=so_fontconfig -TARGET=so_fontconfig - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -.IF "$(SYSTEM_FONTCONFIG)" == "YES" -all: - @echo "An already available installation of freetype should exist on your system." - @echo "Therefore the version provided here does not need to be built in addition." -.ENDIF - -# --- Files -------------------------------------------------------- - -TARFILE_NAME=fontconfig-2.8.0 -TARFILE_MD5=77e15a92006ddc2adbb06f840d591c0e - -.IF "$(OS)"=="WNT" - -CONFIGURE_DIR= -.IF "$(OS)"=="WNT" -ADDITIONAL_FILES=\ - fc-arch$/fcalias.h \ - fc-arch$/fcaliastail.h \ - fc-arch$/fcarch.h \ - fc-glyphname$/fcglyphname.h \ - fc-lang$/fclang.h \ - src$/fcalias.h \ - src$/fcaliastail.h \ - src$/fcftaliastail.h \ - src$/makefile.mk \ - config.h - -PATCH_FILES=fontconfig-2.8.0.patch -BUILD_DIR=$(CONFIGURE_DIR)$/src -BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS) -.ELSE -CONFIGURE_ACTION=./configure --enable-shared=yes --enable-libxml2 --disable-docs --libdir=$(OUTDIR)/lib -BUILD_ACTION=$(GNUMAKE) -.ENDIF - -.ENDIF - -# --- Targets ------------------------------------------------------ - -.INCLUDE : set_ext.mk -.INCLUDE : target.mk -.INCLUDE : tg_ext.mk diff --git a/fontconfig/prj/build.lst b/fontconfig/prj/build.lst deleted file mode 100644 index f6de3d52523e..000000000000 --- a/fontconfig/prj/build.lst +++ /dev/null @@ -1,3 +0,0 @@ -ep freetype : soltools freetype LIBXML2:libxml2 NULL -ep freetype usr1 - all ep_mkout NULL -ep freetype nmake - all ep_freetype NULL diff --git a/fontconfig/prj/d.lst b/fontconfig/prj/d.lst deleted file mode 100644 index b409a223608e..000000000000 --- a/fontconfig/prj/d.lst +++ /dev/null @@ -1,3 +0,0 @@ -mkdir: %_DEST%\inc%_EXT%\external\fontconfig -..\%__SRC%\bin\fontconfigmi.dll %_DEST%\bin%_EXT%\fontconfigmi.dll - diff --git a/freetype/freetype-2.4.4.patch b/freetype/freetype-2.4.4.patch deleted file mode 100644 index 14067ae638e2..000000000000 --- a/freetype/freetype-2.4.4.patch +++ /dev/null @@ -1,133 +0,0 @@ ---- misc/freetype-2.4.4/config.mk Wed Aug 20 14:33:55 2008 -+++ misc/build/freetype-2.4.4/config.mk Wed Aug 20 14:26:42 2008 -@@ -1 +1,42 @@ --dummy -+# -+# FreeType 2 configuration rules for a `normal' pseudo ANSI compiler/system -+# -+ -+ -+# Copyright 1996-2000 by -+# David Turner, Robert Wilhelm, and Werner Lemberg. -+# -+# This file is part of the FreeType project, and may only be used, modified, -+# and distributed under the terms of the FreeType project license, -+# LICENSE.TXT. By continuing to use, modify, or distribute this file you -+# indicate that you have read the license and understand and accept it -+# fully. -+all modules: setup -+ -+CPPFLAGS ?= /DNDEBUG /DWIN32 /D_LIB /D_CRT_SECURE_NO_WARNINGS $(SOLARINC) -+ -+include $(TOP_DIR)/builds/win32/win32-def.mk -+ -+DELETE := rm -f -+CAT := cat -+SEP := / -+BUILD_PROJECT := yes -+COPY := $(GNUCOPY) -+visualc: setup -+ -+include $(TOP_DIR)/builds/compiler/visualc.mk -+include $(TOP_DIR)/builds/$(PROJECT).mk -+LINK_LIBRARY = link /MAP /OPT:NOREF -safeseh -nxcompat -dynamicbase /DLL /SUBSYSTEM:CONSOLE -LIBPATH:$(OUTDIR)/lib -NODEFAULTLIB -RELEASE -INCREMENTAL:NO /nologo -map:../../../misc/$(PROJECT).map -implib:../../../lib/i$(PROJECT).lib -out:$(subst /,$(COMPILER_SEP),../../../bin/$(PROJECT).dll $(OBJECTS_LIST)) kernel32.lib msvcrt.lib -+LIB_LIBRARY = lib -machine:IX86 /IGNORE:4102 /IGNORE:4197 -out:../../../lib/i$(PROJECT).lib -def:$(PROJECT).def -+exported_symbols: -+ -+ -+$(PROJECT_LIBRARY): $(OBJECTS_LIST) -+ $(LINK_LIBRARY) -+ $(LIB_LIBRARY) -+ -+# include $(TOP_DIR)/builds/link_dos.mk -+ -+ -+# EOF -+ ---- misc/freetype-2.4.4/objs/ftmodule.h Wed Aug 20 14:33:55 2008 -+++ misc/build/freetype-2.4.4/objs/ftmodule.h Wed Aug 20 14:26:42 2008 -@@ -1 +1,21 @@ --dummy -+/* This is a generated file. */ -+FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) -+FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) -+FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) -+FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) -+FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) -+FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) -+FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) -+FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) -+FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) -+FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) -+FT_USE_MODULE( FT_Module_Class, autofit_module_class ) -+FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) -+FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) -+FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) -+FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class ) -+FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class ) -+FT_USE_MODULE( FT_Module_Class, psaux_module_class ) -+FT_USE_MODULE( FT_Module_Class, psnames_module_class ) -+/* EOF */ -+ ---- misc/freetype-2.4.4/freetype.def Wed Aug 20 14:33:55 2008 -+++ misc/build/freetype-2.4.4/freetype.def Wed Aug 20 14:26:42 2008 -@@ -1 +1,58 @@ --dummy -+LIBRARY "freetype" -+ -+VERSION 2.4.4 -+ -+EXPORTS -+ FT_Init_FreeType @1 -+ FT_Done_FreeType @2 -+ FT_New_Face @3 -+ FT_New_Memory_Face @4 -+ FT_Open_Face @5 -+ FT_Attach_File @6 -+ FT_Attach_Stream @7 -+ FT_Reference_Face @8 -+ FT_Done_Face @9 -+ FT_Select_Size @10 -+ FT_Request_Size @11 -+ FT_Set_Char_Size @12 -+ FT_Set_Pixel_Sizes @13 -+ FT_Load_Glyph @14 -+ FT_Load_Char @15 -+ FT_Set_Transform @16 -+ FT_Render_Glyph @17 -+ FT_Get_Kerning @18 -+ FT_Get_Track_Kerning @19 -+ FT_Get_Glyph_Name @20 -+ FT_Get_Postscript_Name @21 -+ FT_Select_Charmap @22 -+ FT_Set_Charmap @23 -+ FT_Get_Charmap_Index @24 -+ FT_Get_Char_Index @25 -+ FT_Get_First_Char @26 -+ FT_Get_Next_Char @27 -+ FT_Get_Name_Index @28 -+ FT_Get_SubGlyph_Info @29 -+ FT_Get_FSType_Flags @30 -+ FT_Face_GetCharVariantIndex @31 -+ FT_Face_GetCharVariantIsDefault @32 -+ FT_Face_GetVariantSelectors @33 -+ FT_Face_GetVariantsOfChar @34 -+ FT_Face_GetCharsOfVariant @35 -+ FT_MulDiv @36 -+ FT_DivFix @37 -+ FT_RoundFix @38 -+ FT_CeilFix @39 -+ FT_FloorFix @40 -+ FT_Vector_Transform @41 -+ FT_Library_Version @42 -+ FT_Face_CheckTrueTypePatents @43 -+ FT_Face_SetUnpatentedHinting @44 -+ FT_Get_X11_Font_Format @45 -+ FT_Has_PS_Glyph_Names @46 -+ FT_Get_Sfnt_Name_Count @47 -+ FT_Get_PS_Font_Info @48 -+ FT_Get_Sfnt_Name @49 -+ FT_Get_Sfnt_Table @50 -+ FT_Load_Sfnt_Table @51 -+ FT_Get_BDF_Property @52 -+ diff --git a/freetype/makefile.mk b/freetype/makefile.mk deleted file mode 100644 index c32b7dec06c6..000000000000 --- a/freetype/makefile.mk +++ /dev/null @@ -1,70 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=. - -PRJNAME=so_freetype -TARGET=so_freetype - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -.IF "$(SYSTEM_FREETYPE)" == "YES" -all: - @echo "An already available installation of freetype should exist on your system." - @echo "Therefore the version provided here does not need to be built in addition." -.ENDIF - -# --- Files -------------------------------------------------------- - -TARFILE_NAME=freetype-2.4.4 -TARFILE_MD5=9273efacffb683483e58a9e113efae9f - -.IF "$(OS)"=="WNT" - -CONFIGURE_DIR= -.IF "$(OS)"=="WNT" -CONFIGURE_ACTION= -ADDITIONAL_FILES=config.mk \ - objs/ftmodule.h \ - freetype.def -PATCH_FILES=freetype-2.4.4.patch -LIBS= -l $(STDLIBGUIMT) -l $(LIBSTLPORT) -.ELSE -CONFIGURE_ACTION=.$/configure -.ENDIF - -BUILD_ACTION=$(GNUMAKE) - -.ENDIF - -# --- Targets ------------------------------------------------------ - -.INCLUDE : set_ext.mk -.INCLUDE : target.mk -.INCLUDE : tg_ext.mk diff --git a/freetype/prj/build.lst b/freetype/prj/build.lst deleted file mode 100644 index fcd927e4d764..000000000000 --- a/freetype/prj/build.lst +++ /dev/null @@ -1,3 +0,0 @@ -ep freetype : soltools NULL -ep freetype usr1 - all ep_mkout NULL -ep freetype nmake - all ep_freetype NULL diff --git a/freetype/prj/d.lst b/freetype/prj/d.lst deleted file mode 100644 index e487787236c9..000000000000 --- a/freetype/prj/d.lst +++ /dev/null @@ -1,53 +0,0 @@ -mkdir: %_DEST%\inc%_EXT%\external\freetype -mkdir: %_DEST%\inc%_EXT%\external\freetype\config -..\%__SRC%\bin\freetype.dll %_DEST%\bin%_EXT%\freetype.dll -..\%__SRC%\lib\ifreetype.lib %_DEST%\lib%_EXT%\ifreetype.lib -..\%__SRC%\misc\build\freetype-2.4.4\include\ft2build.h %_DEST%\inc%_EXT%\external\freetype\ft2build.h - -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\freetype.h %_DEST%\inc%_EXT%\external\freetype\freetype.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftadvanc.h %_DEST%\inc%_EXT%\external\freetype\ftadvanc.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftbbox.h %_DEST%\inc%_EXT%\external\freetype\ftbbox.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftbdf.h %_DEST%\inc%_EXT%\external\freetype\ftbdf.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftbitmap.h %_DEST%\inc%_EXT%\external\freetype\ftbitmap.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftcache.h %_DEST%\inc%_EXT%\external\freetype\ftcache.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftchapters.h %_DEST%\inc%_EXT%\external\freetype\ftchapters.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftcid.h %_DEST%\inc%_EXT%\external\freetype\ftcid.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\fterrdef.h %_DEST%\inc%_EXT%\external\freetype\fterrdef.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\fterrors.h %_DEST%\inc%_EXT%\external\freetype\fterrors.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftgasp.h %_DEST%\inc%_EXT%\external\freetype\ftgasp.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftglyph.h %_DEST%\inc%_EXT%\external\freetype\ftglyph.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftgxval.h %_DEST%\inc%_EXT%\external\freetype\ftgxval.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftgzip.h %_DEST%\inc%_EXT%\external\freetype\ftgzip.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftimage.h %_DEST%\inc%_EXT%\external\freetype\ftimage.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftincrem.h %_DEST%\inc%_EXT%\external\freetype\ftincrem.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftlcdfil.h %_DEST%\inc%_EXT%\external\freetype\ftlcdfil.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftlist.h %_DEST%\inc%_EXT%\external\freetype\ftlist.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftlzw.h %_DEST%\inc%_EXT%\external\freetype\ftlzw.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftmac.h %_DEST%\inc%_EXT%\external\freetype\ftmac.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftmm.h %_DEST%\inc%_EXT%\external\freetype\ftmm.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftmodapi.h %_DEST%\inc%_EXT%\external\freetype\ftmodapi.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftmoderr.h %_DEST%\inc%_EXT%\external\freetype\ftmoderr.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftotval.h %_DEST%\inc%_EXT%\external\freetype\ftotval.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftoutln.h %_DEST%\inc%_EXT%\external\freetype\ftoutln.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftpfr.h %_DEST%\inc%_EXT%\external\freetype\ftpfr.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftrender.h %_DEST%\inc%_EXT%\external\freetype\ftrender.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftsizes.h %_DEST%\inc%_EXT%\external\freetype\ftsizes.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftsnames.h %_DEST%\inc%_EXT%\external\freetype\ftsnames.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftstroke.h %_DEST%\inc%_EXT%\external\freetype\ftstroke.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftsynth.h %_DEST%\inc%_EXT%\external\freetype\ftsynth.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftsystem.h %_DEST%\inc%_EXT%\external\freetype\ftsystem.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\fttrigon.h %_DEST%\inc%_EXT%\external\freetype\fttrigon.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\fttypes.h %_DEST%\inc%_EXT%\external\freetype\fttypes.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftwinfnt.h %_DEST%\inc%_EXT%\external\freetype\ftwinfnt.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ftxf86.h %_DEST%\inc%_EXT%\external\freetype\ftxf86.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\t1tables.h %_DEST%\inc%_EXT%\external\freetype\t1tables.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ttnameid.h %_DEST%\inc%_EXT%\external\freetype\ttnameid.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\tttables.h %_DEST%\inc%_EXT%\external\freetype\tttables.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\tttags.h %_DEST%\inc%_EXT%\external\freetype\tttags.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\ttunpat.h %_DEST%\inc%_EXT%\external\freetype\ttunpat.h - -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\config\ftconfig.h %_DEST%\inc%_EXT%\external\freetype\config\ftconfig.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\config\ftheader.h %_DEST%\inc%_EXT%\external\freetype\config\ftheader.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\config\ftmodule.h %_DEST%\inc%_EXT%\external\freetype\config\ftmodule.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\config\ftoption.h %_DEST%\inc%_EXT%\external\freetype\config\ftoption.h -..\%__SRC%\misc\build\freetype-2.4.4\include\freetype\config\ftstdlib.h %_DEST%\inc%_EXT%\external\freetype\config\ftstdlib.h \ No newline at end of file diff --git a/libcroco/prj/d.lst b/libcroco/prj/d.lst old mode 100644 new mode 100755 index 455323283fe9..f010d0024951 --- a/libcroco/prj/d.lst +++ b/libcroco/prj/d.lst @@ -31,8 +31,9 @@ mkdir: %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco ..\%__SRC%\inc\cr-style.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\cr-style.h ..\%__SRC%\inc\libcroco.h %_DEST%\inc%_EXT%\external\libcroco-0.6\libcroco\libcroco.h -..\%__SRC%\bin\libcroco-0.6-3.dll %_DEST%\bin%_EXT%\libcroco-0.6-3.dll ..\%__SRC%\lib\libcroco-0.6.3.0.1.dylib %_DEST%\lib%_EXT%\libcroco-0.6.3.0.1.dylib symlink: %_DEST%\lib%_EXT%\libcroco-0.6.3.0.1.dylib %_DEST%\lib%_EXT%\libcroco-0.6.3.dylib symlink: %_DEST%\lib%_EXT%\libcroco-0.6.3.dylib %_DEST%\lib%_EXT%\libcroco-0.6.dylib +..\%__SRC%\lib\ilibcroco-0.6-3_t1.lib %_DEST%\lib%_EXT%\libcroco-0.6-3.lib +..\%__SRC%\bin\libcroco-0.6-3.dll %_DEST%\bin%_EXT%\libcroco-0.6-3.dll diff --git a/pango/makefile.mk b/pango/makefile.mk index e653d25d61ec..c7f9d036a545 100644 --- a/pango/makefile.mk +++ b/pango/makefile.mk @@ -52,7 +52,6 @@ TARFILE_MD5=22ad1c8d3fda7e73b0798035f3dd96bc .IF "$(OS)" == "MACOSX" PATCH_FILES=pango-1.28.3.patch -ADDITIONAL_FILES=pango/glib-mkenums CONFIGURE_LDFLAGS="-L$(SOLARLIBDIR)" CONFIGURE_DIR= @@ -112,15 +111,12 @@ PATCH_FILES=pango-1.28.3-win32.patch ADDITIONAL_FILES=config.h module.defs make.msc glib-mkenums.pl msvc_recommended_pragmas.h CONFIGURE_DIR= CONFIGURE_ACTION= -BUILD_DIR=./pango +BUILD_DIR=./pango BUILD_ACTION=nmake -f makefile.msc OUT2LIB+=pango/pango-1.0.lib -OUT2LIB+=pango/pango-1.0s.lib OUT2LIB+=pango/pangocairo-1.0.lib -OUT2LIB+=pango/pangocairo-1.0s.lib OUT2LIB+=pango/pangowin32-1.0.lib -OUT2LIB+=pango/pangowin32-1.0s.lib OUT2BIN+=pango/libpango-1.0-0.dll OUT2BIN+=pango/libpangocairo-1.0-0.dll @@ -128,6 +124,7 @@ OUT2BIN+=pango/libpangowin32-1.0-0.dll OUT2BIN+=pango/querymodules.exe OUT2INC+=pango/pango.h +OUT2INC+=pango/pangocairo.h OUT2INC+=pango/pango-attributes.h OUT2INC+=pango/pango-bidi-type.h OUT2INC+=pango/pango-break.h @@ -143,6 +140,7 @@ OUT2INC+=pango/pango-glyph.h OUT2INC+=pango/pango-glyph-item.h OUT2INC+=pango/pango-gravity.h OUT2INC+=pango/pango-item.h +OUT2INC+=pango/pango-language.h OUT2INC+=pango/pango-layout.h OUT2INC+=pango/pango-matrix.h OUT2INC+=pango/pango-renderer.h diff --git a/pango/prj/d.lst b/pango/prj/d.lst index ff7ba3340dce..c80568a0df01 100755 --- a/pango/prj/d.lst +++ b/pango/prj/d.lst @@ -35,9 +35,9 @@ symlink: %_DEST%\lib%_EXT%\libpango-1.0.0.dylib %_DEST%\lib%_EXT%\libpango-1.0.d ..\%__SRC%\lib\libpangocairo-1.0.0.dylib %_DEST%\lib%_EXT%\libpangocairo-1.0.0.dylib symlink: %_DEST%\lib%_EXT%\libpangocairo-1.0.0.dylib %_DEST%\lib%_EXT%\libpangocairo-1.0.dylib -..\%__SRC%\lib\ pango-1.0.lib %_DEST%\lib%_EXT%\pango-1.0.lib -..\%__SRC%\lib\ pangocairo-1.0.lib %_DEST%\lib%_EXT%\pangocairo-1.0.lib -..\%__SRC%\lib\ pangowin32-1.0.lib %_DEST%\lib%_EXT%\pangowin32-1.0.lib +..\%__SRC%\lib\pango-1.0.lib %_DEST%\lib%_EXT%\pango-1.0.lib +..\%__SRC%\lib\pangocairo-1.0.lib %_DEST%\lib%_EXT%\pangocairo-1.0.lib +..\%__SRC%\lib\pangowin32-1.0.lib %_DEST%\lib%_EXT%\pangowin32-1.0.lib ..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT% ..\%__SRC%\bin\pango-querymodules %_DEST%\bin%_EXT%\pango-querymodules -- cgit v1.2.3 From eb002d1915d37c35afc568781fb161c6b4b16f95 Mon Sep 17 00:00:00 2001 From: ka Date: Mon, 28 Mar 2011 23:47:32 +0200 Subject: rsvglibs: adjustments for external library patches --- canvas/source/cairo/cairo_textlayout.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx index 725a6ae0f2a6..7556e76fba42 100644 --- a/canvas/source/cairo/cairo_textlayout.cxx +++ b/canvas/source/cairo/cairo_textlayout.cxx @@ -214,8 +214,8 @@ namespace cairocanvas return geometry::RealRectangle2D( 0, nAboveBaseline, aVDev.GetTextWidth( maText.Text, - ::canvas::tools::numeric_cast(maText.StartPosition), - ::canvas::tools::numeric_cast(maText.Length) ), + ::canvas::tools::numeric_cast(maText.StartPosition), + ::canvas::tools::numeric_cast(maText.Length) ), nBelowBaseline ); } } @@ -404,8 +404,8 @@ namespace cairocanvas } aSysLayoutData = rOutDev.GetSysTextLayoutData(rOutpos, maText.Text, - ::canvas::tools::numeric_cast(maText.StartPosition), - ::canvas::tools::numeric_cast(maText.Length), + ::canvas::tools::numeric_cast(maText.StartPosition), + ::canvas::tools::numeric_cast(maText.Length), maLogicalAdvancements.getLength() ? aOffsets.get() : NULL); // Sort them so that all glyphs on the same glyph fallback level are consecutive @@ -446,15 +446,15 @@ namespace cairocanvas if (maLogicalAdvancements.getLength()) // VCL FALLBACK - with glyph advances { rOutDev.DrawTextArray( rOutpos, maText.Text, aOffsets.get(), - ::canvas::tools::numeric_cast(maText.StartPosition), - ::canvas::tools::numeric_cast(maText.Length) ); + ::canvas::tools::numeric_cast(maText.StartPosition), + ::canvas::tools::numeric_cast(maText.Length) ); return true; } else // VCL FALLBACK - without advances { rOutDev.DrawText( rOutpos, maText.Text, - ::canvas::tools::numeric_cast(maText.StartPosition), - ::canvas::tools::numeric_cast(maText.Length) ); + ::canvas::tools::numeric_cast(maText.StartPosition), + ::canvas::tools::numeric_cast(maText.Length) ); return true; } } -- cgit v1.2.3 From 9e95ae774904249653842e63192b2c535e8d5ba3 Mon Sep 17 00:00:00 2001 From: ka Date: Tue, 29 Mar 2011 00:04:49 +0200 Subject: rsvglibs: removed deprecated external libs --- ooo.lst | 2 -- 1 file changed, 2 deletions(-) diff --git a/ooo.lst b/ooo.lst index 47e56f342bd7..c9cc99640548 100644 --- a/ooo.lst +++ b/ooo.lst @@ -38,7 +38,6 @@ bd30e9cf5523cdfc019b94f5e1d7fd19-cppunit-1.12.1.tar.gz a169ab152209200a7bad29a275cb0333-seamonkey-1.1.14.source.tar.gz a4d9b30810a434a3ed39fc0003bbd637-LICENSE_stax-api-1.0-2-sources.html a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip -abc405d0bdd3ee22782d7aa20e440f08-zlib-1.1.4.tar.gz ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip af3c3acf618de6108d65fcdc92b492e1-commons-codec-1.3-src.tar.gz bc702168a2af16869201dbe91e46ae48-LICENSE_Python-2.6.1 @@ -49,7 +48,6 @@ d1a3205871c3c52e8a50c9f18510ae12-libformula.zip d35724900f6a4105550293686688bbb3-silgraphite-2.3.1.tar.gz d4c4d91ab3a8e52a2e69d48d34ef4df4-core.zip d70951c80dabecc2892c919ff5d07172-db-4.7.25.NC-custom.tar.gz -dbd5f3b47ed13132f04c685d608a7547-jpeg-6b.tar.gz e0707ff896045731ff99e99799606441-README_db-4.7.25.NC-custom.txt e81c2f0953aa60f8062c05a4673f2be0-Python-2.6.1.tar.bz2 e61d0364a30146aaa3001296f853b2b9-libxslt-1.1.26.tar.gz -- cgit v1.2.3 From a8167e3b5574a33042ac76bc6c82cf2fc33265ad Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 29 Mar 2011 14:36:53 +0200 Subject: rsvglibs: conditionally install dependencies --- scp2/source/ooo/file_library_ooo.scp | 148 ++++++++++++++++++++++++++++++++++ scp2/source/ooo/makefile.mk | 33 ++++++++ scp2/source/ooo/module_hidden_ooo.scp | 26 ++++++ scp2/source/ooo/shortcut_ooo.scp | 7 ++ 4 files changed, 214 insertions(+) diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp index 0e3eaba90e84..6f2905f47505 100755 --- a/scp2/source/ooo/file_library_ooo.scp +++ b/scp2/source/ooo/file_library_ooo.scp @@ -1751,3 +1751,151 @@ STD_LIB_FILE(gid_File_Lib_Unordf, unordf) STD_LIB_FILE( gid_File_Lib_For, for) STD_LIB_FILE( gid_File_Lib_Forui, forui) +// RSVG and dependencies +#if ! defined (SYSTEM_GETTEXT) +File gid_File_Lib_Intl + TXT_FILE_BODY; + Styles = (PACKED); + Dir = SCP2_OOO_BIN_DIR; + #ifdef MACOSX + Name = "libintl.8.dylib"; + #elif defined WNT + Name = "intl.dll"; + #endif +End +#endif + +#if ! defined SYSTEM_GLIB +File gid_File_Lib_Glib + TXT_FILE_BODY; + Styles = (PACKED); + Dir = SCP2_OOO_BIN_DIR; + #ifdef MACOSX + Name = "libglib-2.0.0.dylib"; + #elif defined WNT + Name = "libglib-2.0-0.dll"; + #endif +End +File gid_File_Lib_Gthread + TXT_FILE_BODY; + Styles = (PACKED); + Dir = SCP2_OOO_BIN_DIR; + #ifdef MACOSX + Name = "libgthread-2.0.0.dylib"; + #elif defined WNT + Name = "libgthread-2.0-0.dll"; + #endif +End +File gid_File_Lib_Gobject + TXT_FILE_BODY; + Styles = (PACKED); + Dir = SCP2_OOO_BIN_DIR; + #ifdef MACOSX + Name = "libgobject-2.0.0.dylib"; + #elif defined WNT + Name = "libgobject-2.0-0.dll"; + #endif +End +File gid_File_Lib_Gio + TXT_FILE_BODY; + Styles = (PACKED); + Dir = SCP2_OOO_BIN_DIR; + #ifdef MACOSX + Name = "libgio-2.0.0.dylib"; + #elif defined WNT + Name = "libgio-2.0-0.dll"; + #endif +End +File gid_File_Lib_Gmodule + TXT_FILE_BODY; + Styles = (PACKED); + Dir = SCP2_OOO_BIN_DIR; + #ifdef MACOSX + Name = "libgmodule-2.0.0.dylib"; + #elif defined WNT + Name = "libgmodule-2.0-0.dll"; + #endif +End +#endif + +#if ! defined SYSTEM_GDKPIXBUF +File gid_File_Lib_Gdkpixbuf + TXT_FILE_BODY; + Styles = (PACKED); + Dir = SCP2_OOO_BIN_DIR; + #ifdef MACOSX + Name = "libgdk_pixbuf-2.0.0.dylib"; + #elif defined WNT + Name = "libgdk_pixbuf-2.0-0.dll"; + #endif +End +#endif + +#if ! defined SYSTEM_LIBCROCO +File gid_File_Lib_Libcroco + TXT_FILE_BODY; + Styles = (PACKED); + Dir = SCP2_OOO_BIN_DIR; + #ifdef MACOSX + Name = "libcroco-0.6.3.0.1.dylib"; + #elif defined WNT + Name = "libcroco-0.6-3.dll"; + #endif +End +#endif + +#if ! defined SYSTEM_PANGO +File gid_File_Lib_Libpango + TXT_FILE_BODY; + Styles = (PACKED); + Dir = SCP2_OOO_BIN_DIR; + #ifdef MACOSX + Name = "libpango-1.0.0.dylib"; + #elif defined WNT + Name = "libpango-1.0-0.dll"; + #endif +End +File gid_File_Lib_Libpangocairo + TXT_FILE_BODY; + Styles = (PACKED); + Dir = SCP2_OOO_BIN_DIR; + #ifdef MACOSX + Name = "libpangocairo-1.0.0.dylib"; + #elif defined WNT + Name = "libpangocairo-1.0-0.dll"; + #endif +End +#if defined WNT +File gid_File_Lib_Libpangowin32 + TXT_FILE_BODY; + Styles = (PACKED); + Dir = SCP2_OOO_BIN_DIR; + Name = "libpangowin32-1.0-0.dll"; +End +#endif +#endif + +#if ! defined SYSTEM_LIBGSF +File gid_File_Lib_Libgsf + TXT_FILE_BODY; + Styles = (PACKED); + Dir = SCP2_OOO_BIN_DIR; +#ifdef WNT + Name = "gsf-1.dll"; +#endif +End +#endif + +#if ! defined SYSTEM_LIBRSVG +File gid_File_Lib_Librsvg + TXT_FILE_BODY; + Styles = (PACKED); + Dir = SCP2_OOO_BIN_DIR; + #ifdef MACOSX + Name = "librsvg-2.2.dylib"; + #elif defined WNT + Name = "librsvg-2-2.dll"; + #endif +End +#endif + diff --git a/scp2/source/ooo/makefile.mk b/scp2/source/ooo/makefile.mk index 77e3456443ab..7a7507c9fcad 100644 --- a/scp2/source/ooo/makefile.mk +++ b/scp2/source/ooo/makefile.mk @@ -251,6 +251,39 @@ SCPDEFS+=-DMINGW_GCCDLL=\""$(MINGW_GCCDLL)"\" SCPDEFS+=-DMINGW_GXXDLL=\""$(MINGW_GXXDLL)"\" .ENDIF +.IF "$(SYSTEM_GDKPIXBUF)" == "YES" +SCPDEFS+=-DSYSTEM_GDKPIXBUF +.ENDIF + +.IF "$(SYSTEM_GETTEXT)" == "YES" +SCPDEFS+=-DSYSTEM_GETTEXT +.ENDIF + +.IF "$(SYSTEM_GLIB)" == "YES" +SCPDEFS+=-DSYSTEM_GLIB +.ENDIF + +.IF "$(SYSTEM_LIBCROCO)" == "YES" +SCPDEFS+=-DSYSTEM_LIBCROCO +.ENDIF + +.IF "$(SYSTEM_LIBJPEG)" == "YES" +SCPDEFS+=-DSYSTEM_LIBJPEG +.ENDIF + +.IF "$(SYSTEM_LIBRSVG)" == "YES" +SCPDEFS+=-DSYSTEM_LIBRSVG +.ENDIF + +.IF "$(SYSTEM_PANGO)" == "YES" +SCPDEFS+=-DSYSTEM_PANGO +.ENDIF + +.IF "$(SYSTEM_LIBGSF)" == "YES" +SCPDEFS+=-DSYSTEM_LIBGSF +.ENDIF + + SCP_PRODUCT_TYPE=osl ICUVERSION_DEPENDENT_FILES= \ diff --git a/scp2/source/ooo/module_hidden_ooo.scp b/scp2/source/ooo/module_hidden_ooo.scp index 3810b3126334..40d7721416d9 100644 --- a/scp2/source/ooo/module_hidden_ooo.scp +++ b/scp2/source/ooo/module_hidden_ooo.scp @@ -262,6 +262,32 @@ Module gid_Module_Root_Files_5 Default = YES; Styles = (HIDDEN_ROOT); Files = (gid_File_Dat_Root5, +#if ! defined SYSTEM_GETTEXT + gid_File_Lib_Intl, +#endif +#if ! defined SYSTEM_GLIB + gid_File_Lib_Glib, + gid_File_Lib_Gobject, + gid_File_Lib_Gthread, + gid_File_Lib_Gmodule, + gid_File_Lib_Gio, +#endif +#if ! defined SYSTEM_GDKPIXBUF + gid_File_Lib_Gdkpixbuf, +#endif +#if ! defined SYSTEM_LIBCROCO + gid_File_Lib_Libcroco, +#endif +#if ! defined SYSTEM_PANGO + gid_File_Lib_Libpango, + gid_File_Lib_Libpangocairo, +#ifdef WNT + gid_File_Lib_Libpangowin32, +#endif +#endif +#if ! defined SYSTEM_LIBGSF + gid_File_Lib_Libgsf, +#endif gid_File_Lib_Dict_Ja, gid_File_Lib_Dict_Zh, gid_File_Lib_Collator_Data, diff --git a/scp2/source/ooo/shortcut_ooo.scp b/scp2/source/ooo/shortcut_ooo.scp index fb43b041c585..19e0aba77e11 100644 --- a/scp2/source/ooo/shortcut_ooo.scp +++ b/scp2/source/ooo/shortcut_ooo.scp @@ -92,6 +92,13 @@ Shortcut gid_Shortcut_Lib_Hsqldb_2 Styles = (NETWORK, RELATIVE); End +Shortcut gid_Shortcut_Lib_Libcroco + FileID = gid_File_Lib_Libcroco; + Dir = SCP2_OOO_BIN_DIR; + Name = "libcroco-0.6.3.dylib"; + Styles = (NETWORK, RELATIVE); +End + #endif //i44154 -end- -- cgit v1.2.3 From 26e2df6b026c994a950c4aea77f02a35bd658207 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 29 Mar 2011 14:37:15 +0200 Subject: rsvglibs: final touches --- configure.in | 17 +++++++++++++++++ set_soenv.in | 1 + solenv/config/sdev300.ini | 11 +++++++++++ 3 files changed, 29 insertions(+) diff --git a/configure.in b/configure.in index f5a9805cc34f..d82c8aec2201 100644 --- a/configure.in +++ b/configure.in @@ -6789,6 +6789,23 @@ case "$_os" in esac AC_SUBST(SYSTEM_PANGO) +dnl =================================================================== +dnl Test whether to build libgsf or rely on the system version +dnl =================================================================== +AC_MSG_CHECKING([whether to build own version of libgsf]) + +case "$_os" in + WINNT*) # Windows + SYSTEM_LIBGSF=NO + AC_MSG_RESULT([yes]) + ;; + *) + SYSTEM_PANGO=YES + AC_MSG_RESULT([no]) + ;; +esac +AC_SUBST(SYSTEM_LIBGSF) + dnl =================================================================== dnl Test whether to build libpng or rely on the system version dnl =================================================================== diff --git a/set_soenv.in b/set_soenv.in index c686d9c51fc8..2584984e9046 100644 --- a/set_soenv.in +++ b/set_soenv.in @@ -1934,6 +1934,7 @@ ToFile( "SYSTEM_GLIB", "@SYSTEM_GLIB@", "e" ); ToFile( "SYSTEM_GETTEXT", "@SYSTEM_GETTEXT@", "e" ); ToFile( "SYSTEM_LIBCROCO", "@SYSTEM_LIBCROCO@", "e" ); ToFile( "SYSTEM_PANGO", "@SYSTEM_PANGO@", "e" ); +ToFile( "SYSTEM_LIBGSF", "@SYSTEM_LIBGSF@", "e" ); ToFile( "SYSTEM_LIBPNG", "@SYSTEM_LIBPNG@", "e" ); ToFile( "SYSTEM_LIBJPEG", "@SYSTEM_LIBJPEG@", "e" ); ToFile( "NEON_VERSION", "@NEON_VERSION@", "e" ); diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini index eefc688711dc..150de75ce33d 100644 --- a/solenv/config/sdev300.ini +++ b/solenv/config/sdev300.ini @@ -372,6 +372,7 @@ unxfbsdi SYSTEM_PANGO YES SYSTEM_LIBPNG YES SYSTEM_LIBJPEG YES + SYSTEM_LIBGSF YES } common0 { @@ -632,6 +633,7 @@ unxlngi6 SYSTEM_PANGO YES SYSTEM_LIBPNG YES SYSTEM_LIBJPEG YES + SYSTEM_LIBGSF YES } common0 { @@ -923,6 +925,7 @@ unxlngx6 SYSTEM_PANGO YES SYSTEM_LIBPNG YES SYSTEM_LIBJPEG YES + SYSTEM_LIBGSF YES } common0 { @@ -1250,6 +1253,7 @@ unxmacxi SYSTEM_OPENSSL YES SYSTEM_PYTHON YES SYSTEM_ZLIB YES + SYSTEM_LIBGSF YES USE_SYSTEM_STL YES BUILD_PIXMAN YES WITH_MOZILLA YES @@ -1494,6 +1498,7 @@ unxsoli4 SYSTEM_PANGO YES SYSTEM_LIBPNG YES SYSTEM_LIBJPEG YES + SYSTEM_LIBGSF YES } common0 { @@ -1766,6 +1771,7 @@ unxsols4 SYSTEM_PANGO YES SYSTEM_LIBPNG YES SYSTEM_LIBJPEG YES + SYSTEM_LIBGSF YES } common0 { @@ -2053,6 +2059,7 @@ unxsolu4 SYSTEM_PANGO YES SYSTEM_LIBPNG YES SYSTEM_LIBJPEG YES + SYSTEM_LIBGSF YES } common0 { @@ -2302,6 +2309,7 @@ wntgcci1 SYSTEM_PANGO YES SYSTEM_LIBPNG YES SYSTEM_LIBJPEG YES + SYSTEM_LIBGSF YES } common0 { @@ -2579,6 +2587,7 @@ wntmsci11 SYSTEM_PANGO YES SYSTEM_LIBPNG YES SYSTEM_LIBJPEG YES + SYSTEM_LIBGSF YES } common0 { @@ -2859,6 +2868,7 @@ wntmsci12 SYSTEM_PANGO NO SYSTEM_LIBPNG NO SYSTEM_LIBJPEG NO + SYSTEM_LIBGSF NO } common0 { @@ -3213,6 +3223,7 @@ wntmsci13 SYSTEM_PANGO NO SYSTEM_LIBPNG NO SYSTEM_LIBJPEG NO + SYSTEM_LIBGSF NO } common0 { -- cgit v1.2.3 From a2823e2dd86e5179f1fe33c7b56cb76804d941b0 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 29 Mar 2011 14:37:15 +0200 Subject: rsvglibs: final touches --- pango/pango-1.28.3.patch | 542 ----------------------------------------------- 1 file changed, 542 deletions(-) diff --git a/pango/pango-1.28.3.patch b/pango/pango-1.28.3.patch index 351f5267b77b..7da953f28311 100644 --- a/pango/pango-1.28.3.patch +++ b/pango/pango-1.28.3.patch @@ -35,545 +35,3 @@ # Add in gthread-2.0 to CFLAGS but not to LIBS so we get any ---- misc/pango-1.28.3/pango/glib-mkenums 2011-03-28 02:33:03.000000000 +0200 -+++ misc/build/pango-1.28.3/pango/glib-mkenums 2011-03-28 02:25:57.000000000 +0200 -@@ -1 +1,538 @@ --dummy -+#! /usr/bin/env perl -+ -+use warnings; -+use File::Basename; -+use Safe; -+ -+# glib-mkenums.pl -+# Information about the current enumeration -+my $flags; # Is enumeration a bitmask? -+my $option_underscore_name; # Overriden underscore variant of the enum name -+ # for example to fix the cases we don't get the -+ # mixed-case -> underscorized transform right. -+my $option_lowercase_name; # DEPRECATED. A lower case name to use as part -+ # of the *_get_type() function, instead of the -+ # one that we guess. For instance, when an enum -+ # uses abnormal capitalization and we can not -+ # guess where to put the underscores. -+my $seenbitshift; # Have we seen bitshift operators? -+my $enum_prefix; # Prefix for this enumeration -+my $enumname; # Name for this enumeration -+my $enumshort; # $enumname without prefix -+my $enumname_prefix; # prefix of $enumname -+my $enumindex = 0; # Global enum counter -+my $firstenum = 1; # Is this the first enumeration per file? -+my @entries; # [ $name, $val ] for each entry -+my $sandbox = Safe->new; # sandbox for safe evaluation of expressions -+ -+sub parse_trigraph { -+ my $opts = shift; -+ my @opts; -+ -+ for $opt (split /\s*,\s*/, $opts) { -+ $opt =~ s/^\s*//; -+ $opt =~ s/\s*$//; -+ my ($key,$val) = $opt =~ /(\w+)(?:=(.+))?/; -+ defined $val or $val = 1; -+ push @opts, $key, $val; -+ } -+ @opts; -+} -+sub parse_entries { -+ my $file = shift; -+ my $file_name = shift; -+ my $looking_for_name = 0; -+ -+ while (<$file>) { -+ # read lines until we have no open comments -+ while (m@/\*([^*]|\*(?!/))*$@) { -+ my $new; -+ defined ($new = <$file>) || die "Unmatched comment in $ARGV"; -+ $_ .= $new; -+ } -+ # strip comments w/o options -+ s@/\*(?!<) -+ ([^*]+|\*(?!/))* -+ \*/@@gx; -+ -+ # strip newlines -+ s@\n@ @; -+ -+ # skip empty lines -+ next if m@^\s*$@; -+ -+ if ($looking_for_name) { -+ if (/^\s*(\w+)/) { -+ $enumname = $1; -+ return 1; -+ } -+ } -+ -+ # Handle include files -+ if (/^\#include\s*<([^>]*)>/ ) { -+ my $file= "../$1"; -+ open NEWFILE, $file or die "Cannot open include file $file: $!\n"; -+ -+ if (parse_entries (\*NEWFILE, $NEWFILE)) { -+ return 1; -+ } else { -+ next; -+ } -+ } -+ -+ if (/^\s*\}\s*(\w+)/) { -+ $enumname = $1; -+ $enumindex++; -+ return 1; -+ } -+ -+ if (/^\s*\}/) { -+ $enumindex++; -+ $looking_for_name = 1; -+ next; -+ } -+ -+ if (m@^\s* -+ (\w+)\s* # name -+ (?:=( # value -+ \s*\w+\s*\(.*\)\s* # macro with multiple args -+ | # OR -+ (?:[^,/]|/(?!\*))* # anything but a comma or comment -+ ))?,?\s* -+ (?:/\*< # options -+ (([^*]|\*(?!/))*) -+ >\s*\*/)?,? -+ \s*$ -+ @x) { -+ my ($name, $value, $options) = ($1,$2,$3); -+ -+ if (!defined $flags && defined $value && $value =~ /< Output file header\n"; -+ print " --fprod Per input file production\n"; -+ print " --ftail Output file trailer\n"; -+ print " --eprod Per enum text (produced prior to value itarations)\n"; -+ print " --vhead Value header, produced before iterating over enum values\n"; -+ print " --vprod Value text, produced for each enum value\n"; -+ print " --vtail Value tail, produced after iterating over enum values\n"; -+ print " --comments Comment structure\n"; -+ print " --template file Template file\n"; -+ print " -v, --version Print version informations\n\n"; -+ print "Production text substitutions:\n"; -+ print " \@EnumName\@ PrefixTheXEnum\n"; -+ print " \@enum_name\@ prefix_the_xenum\n"; -+ print " \@ENUMNAME\@ PREFIX_THE_XENUM\n"; -+ print " \@ENUMSHORT\@ THE_XENUM\n"; -+ print " \@ENUMPREFIX\@ PREFIX\n"; -+ print " \@VALUENAME\@ PREFIX_THE_XVALUE\n"; -+ print " \@valuenick\@ the-xvalue\n"; -+ print " \@valuenum\@ the integer value (limited support, Since: 2.26)\n"; -+ print " \@type\@ either enum or flags\n"; -+ print " \@Type\@ either Enum or Flags\n"; -+ print " \@TYPE\@ either ENUM or FLAGS\n"; -+ print " \@filename\@ name of current input file\n"; -+ print " \@basename\@ base name of the current input file (Since: 2.22)\n"; -+ exit 0; -+} -+ -+# production variables: -+my $fhead = ""; # output file header -+my $fprod = ""; # per input file production -+my $ftail = ""; # output file trailer -+my $eprod = ""; # per enum text (produced prior to value itarations) -+my $vhead = ""; # value header, produced before iterating over enum values -+my $vprod = ""; # value text, produced for each enum value -+my $vtail = ""; # value tail, produced after iterating over enum values -+my $comment_tmpl = ""; # comment template -+ -+sub read_template_file { -+ my ($file) = @_; -+ my %tmpl = ('file-header', $fhead, -+ 'file-production', $fprod, -+ 'file-tail', $ftail, -+ 'enumeration-production', $eprod, -+ 'value-header', $vhead, -+ 'value-production', $vprod, -+ 'value-tail', $vtail, -+ 'comment', $comment_tmpl); -+ my $in = 'junk'; -+ open (FILE, $file) || die "Can't open $file: $!\n"; -+ while () { -+ if (/^\/\*\*\*\s+(BEGIN|END)\s+([\w-]+)\s+\*\*\*\//) { -+ if (($in eq 'junk') && ($1 eq 'BEGIN') && (exists($tmpl{$2}))) { -+ $in = $2; -+ next; -+ } -+ elsif (($in eq $2) && ($1 eq 'END') && (exists($tmpl{$2}))) { -+ $in = 'junk'; -+ next; -+ } else { -+ die "Malformed template file $file\n"; -+ } -+ } -+ if (!($in eq 'junk')) { -+ $tmpl{$in} .= $_; -+ } -+ } -+ close (FILE); -+ if (!($in eq 'junk')) { -+ die "Malformed template file $file\n"; -+ } -+ $fhead = $tmpl{'file-header'}; -+ $fprod = $tmpl{'file-production'}; -+ $ftail = $tmpl{'file-tail'}; -+ $eprod = $tmpl{'enumeration-production'}; -+ $vhead = $tmpl{'value-header'}; -+ $vprod = $tmpl{'value-production'}; -+ $vtail = $tmpl{'value-tail'}; -+ $comment_tmpl = $tmpl{'comment'}; -+ -+ # default to C-style comments -+ $comment_tmpl = "/* \@comment\@ */" if $comment_tmpl eq ""; -+} -+ -+if (!defined $ARGV[0]) { -+ usage; -+} -+while ($_=$ARGV[0],/^-/) { -+ shift; -+ last if /^--$/; -+ if (/^--template$/) { read_template_file (shift); } -+ elsif (/^--fhead$/) { $fhead = $fhead . shift } -+ elsif (/^--fprod$/) { $fprod = $fprod . shift } -+ elsif (/^--ftail$/) { $ftail = $ftail . shift } -+ elsif (/^--eprod$/) { $eprod = $eprod . shift } -+ elsif (/^--vhead$/) { $vhead = $vhead . shift } -+ elsif (/^--vprod$/) { $vprod = $vprod . shift } -+ elsif (/^--vtail$/) { $vtail = $vtail . shift } -+ elsif (/^--comments$/) { $comment_tmpl = shift } -+ elsif (/^--help$/ || /^-h$/ || /^-\?$/) { usage; } -+ elsif (/^--version$/ || /^-v$/) { version; } -+ else { usage; } -+ last if not defined($ARGV[0]); -+} -+ -+# put auto-generation comment -+{ -+ my $comment = $comment_tmpl; -+ $comment =~ s/\@comment\@/Generated data (by glib-mkenums)/; -+ print "\n" . $comment . "\n\n"; -+} -+ -+if (length($fhead)) { -+ my $prod = $fhead; -+ my $base = basename ($ARGV[0]); -+ -+ $prod =~ s/\@filename\@/$ARGV[0]/g; -+ $prod =~ s/\@basename\@/$base/g; -+ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; -+ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g; -+ chomp ($prod); -+ -+ print "$prod\n"; -+} -+ -+while (<>) { -+ if (eof) { -+ close (ARGV); # reset line numbering -+ $firstenum = 1; # Flag to print filename at next enum -+ } -+ -+ # read lines until we have no open comments -+ while (m@/\*([^*]|\*(?!/))*$@) { -+ my $new; -+ defined ($new = <>) || die "Unmatched comment in $ARGV"; -+ $_ .= $new; -+ } -+ # strip comments w/o options -+ s@/\*(?!<) -+ ([^*]+|\*(?!/))* -+ \*/@@gx; -+ -+ if (m@^\s*typedef\s+enum\s* -+ ({)?\s* -+ (?:/\*< -+ (([^*]|\*(?!/))*) -+ >\s*\*/)? -+ \s*({)? -+ @x) { -+ if (defined $2) { -+ my %options = parse_trigraph ($2); -+ next if defined $options{skip}; -+ $enum_prefix = $options{prefix}; -+ $flags = $options{flags}; -+ $option_lowercase_name = $options{lowercase_name}; -+ $option_underscore_name = $options{underscore_name}; -+ } else { -+ $enum_prefix = undef; -+ $flags = undef; -+ $option_lowercase_name = undef; -+ $option_underscore_name = undef; -+ } -+ if (defined $option_lowercase_name) { -+ if (defined $option_underscore_name) { -+ print STDERR "$0: $ARGV:$.: lowercase_name overriden with underscore_name\n"; -+ $option_lowercase_name = undef; -+ } else { -+ print STDERR "$0: $ARGV:$.: lowercase_name is deprecated, use underscore_name\n"; -+ } -+ } -+ # Didn't have trailing '{' look on next lines -+ if (!defined $1 && !defined $4) { -+ while (<>) { -+ if (s/^\s*\{//) { -+ last; -+ } -+ } -+ } -+ -+ $seenbitshift = 0; -+ @entries = (); -+ -+ # Now parse the entries -+ parse_entries (\*ARGV, $ARGV); -+ -+ # figure out if this was a flags or enums enumeration -+ if (!defined $flags) { -+ $flags = $seenbitshift; -+ } -+ -+ # Autogenerate a prefix -+ if (!defined $enum_prefix) { -+ for (@entries) { -+ my $nick = $_->[2]; -+ if (!defined $nick) { -+ my $name = $_->[0]; -+ if (defined $enum_prefix) { -+ my $tmp = ~ ($name ^ $enum_prefix); -+ ($tmp) = $tmp =~ /(^\xff*)/; -+ $enum_prefix = $enum_prefix & $tmp; -+ } else { -+ $enum_prefix = $name; -+ } -+ } -+ } -+ if (!defined $enum_prefix) { -+ $enum_prefix = ""; -+ } else { -+ # Trim so that it ends in an underscore -+ $enum_prefix =~ s/_[^_]*$/_/; -+ } -+ } else { -+ # canonicalize user defined prefixes -+ $enum_prefix = uc($enum_prefix); -+ $enum_prefix =~ s/-/_/g; -+ $enum_prefix =~ s/(.*)([^_])$/$1$2_/; -+ } -+ -+ for $entry (@entries) { -+ my ($name,$num,$nick) = @{$entry}; -+ if (!defined $nick) { -+ ($nick = $name) =~ s/^$enum_prefix//; -+ $nick =~ tr/_/-/; -+ $nick = lc($nick); -+ @{$entry} = ($name, $num, $nick); -+ } -+ } -+ -+ -+ # Spit out the output -+ if (defined $option_underscore_name) { -+ $enumlong = uc $option_underscore_name; -+ $enumsym = lc $option_underscore_name; -+ $enumshort = $enumlong; -+ $enumshort =~ s/^[A-Z][A-Z0-9]*_//; -+ -+ $enumname_prefix = $enumlong; -+ $enumname_prefix =~ s/$enumshort$//; -+ } else { -+ # enumname is e.g. GMatchType -+ $enspace = $enumname; -+ $enspace =~ s/^([A-Z][a-z]*).*$/$1/; -+ -+ $enumshort = $enumname; -+ $enumshort =~ s/^[A-Z][a-z]*//; -+ $enumshort =~ s/([^A-Z])([A-Z])/$1_$2/g; -+ $enumshort =~ s/([A-Z][A-Z])([A-Z][0-9a-z])/$1_$2/g; -+ $enumshort = uc($enumshort); -+ -+ $enumname_prefix = $enumname; -+ $enumname_prefix =~ s/^([A-Z][a-z]*).*$/$1/; -+ $enumname_prefix = uc($enumname_prefix); -+ -+ $enumlong = uc($enspace) . "_" . $enumshort; -+ $enumsym = lc($enspace) . "_" . lc($enumshort); -+ -+ if (defined($option_lowercase_name)) { -+ $enumsym = $option_lowercase_name; -+ } -+ } -+ -+ if ($firstenum) { -+ $firstenum = 0; -+ -+ if (length($fprod)) { -+ my $prod = $fprod; -+ my $base = basename ($ARGV); -+ -+ $prod =~ s/\@filename\@/$ARGV/g; -+ $prod =~ s/\@basename\@/$base/g; -+ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; -+ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g; -+ chomp ($prod); -+ -+ print "$prod\n"; -+ } -+ } -+ -+ if (length($eprod)) { -+ my $prod = $eprod; -+ -+ $prod =~ s/\@enum_name\@/$enumsym/g; -+ $prod =~ s/\@EnumName\@/$enumname/g; -+ $prod =~ s/\@ENUMSHORT\@/$enumshort/g; -+ $prod =~ s/\@ENUMNAME\@/$enumlong/g; -+ $prod =~ s/\@ENUMPREFIX\@/$enumname_prefix/g; -+ if ($flags) { $prod =~ s/\@type\@/flags/g; } else { $prod =~ s/\@type\@/enum/g; } -+ if ($flags) { $prod =~ s/\@Type\@/Flags/g; } else { $prod =~ s/\@Type\@/Enum/g; } -+ if ($flags) { $prod =~ s/\@TYPE\@/FLAGS/g; } else { $prod =~ s/\@TYPE\@/ENUM/g; } -+ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; -+ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g; -+ chomp ($prod); -+ -+ print "$prod\n"; -+ } -+ -+ if (length($vhead)) { -+ my $prod = $vhead; -+ -+ $prod =~ s/\@enum_name\@/$enumsym/g; -+ $prod =~ s/\@EnumName\@/$enumname/g; -+ $prod =~ s/\@ENUMSHORT\@/$enumshort/g; -+ $prod =~ s/\@ENUMNAME\@/$enumlong/g; -+ $prod =~ s/\@ENUMPREFIX\@/$enumname_prefix/g; -+ if ($flags) { $prod =~ s/\@type\@/flags/g; } else { $prod =~ s/\@type\@/enum/g; } -+ if ($flags) { $prod =~ s/\@Type\@/Flags/g; } else { $prod =~ s/\@Type\@/Enum/g; } -+ if ($flags) { $prod =~ s/\@TYPE\@/FLAGS/g; } else { $prod =~ s/\@TYPE\@/ENUM/g; } -+ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; -+ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g; -+ chomp ($prod); -+ -+ print "$prod\n"; -+ } -+ -+ if (length($vprod)) { -+ my $prod = $vprod; -+ my $next_num = 0; -+ -+ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; -+ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g; -+ for (@entries) { -+ my ($name,$num,$nick) = @{$_}; -+ my $tmp_prod = $prod; -+ -+ if ($prod =~ /\@valuenum\@/) { -+ # only attempt to eval the value if it is requested -+ # this prevents us from throwing errors otherwise -+ if (defined $num) { -+ # use sandboxed perl evaluation as a reasonable -+ # approximation to C constant folding -+ $num = $sandbox->reval ($num); -+ -+ # make sure it parsed to an integer -+ if (!defined $num or $num !~ /^-?\d+$/) { -+ die "Unable to parse enum value '$num'"; -+ } -+ } else { -+ $num = $next_num; -+ } -+ -+ $tmp_prod =~ s/\@valuenum\@/$num/g; -+ $next_num = $num + 1; -+ } -+ -+ $tmp_prod =~ s/\@VALUENAME\@/$name/g; -+ $tmp_prod =~ s/\@valuenick\@/$nick/g; -+ if ($flags) { $tmp_prod =~ s/\@type\@/flags/g; } else { $tmp_prod =~ s/\@type\@/enum/g; } -+ if ($flags) { $tmp_prod =~ s/\@Type\@/Flags/g; } else { $tmp_prod =~ s/\@Type\@/Enum/g; } -+ if ($flags) { $tmp_prod =~ s/\@TYPE\@/FLAGS/g; } else { $tmp_prod =~ s/\@TYPE\@/ENUM/g; } -+ chomp ($tmp_prod); -+ -+ print "$tmp_prod\n"; -+ } -+ } -+ -+ if (length($vtail)) { -+ my $prod = $vtail; -+ -+ $prod =~ s/\@enum_name\@/$enumsym/g; -+ $prod =~ s/\@EnumName\@/$enumname/g; -+ $prod =~ s/\@ENUMSHORT\@/$enumshort/g; -+ $prod =~ s/\@ENUMNAME\@/$enumlong/g; -+ $prod =~ s/\@ENUMPREFIX\@/$enumname_prefix/g; -+ if ($flags) { $prod =~ s/\@type\@/flags/g; } else { $prod =~ s/\@type\@/enum/g; } -+ if ($flags) { $prod =~ s/\@Type\@/Flags/g; } else { $prod =~ s/\@Type\@/Enum/g; } -+ if ($flags) { $prod =~ s/\@TYPE\@/FLAGS/g; } else { $prod =~ s/\@TYPE\@/ENUM/g; } -+ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; -+ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g; -+ chomp ($prod); -+ -+ print "$prod\n"; -+ } -+ } -+} -+ -+if (length($ftail)) { -+ my $prod = $ftail; -+ my $base = basename ($ARGV); -+ -+ $prod =~ s/\@filename\@/$ARGV/g; -+ $prod =~ s/\@basename\@/$base/g; -+ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g; -+ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g; -+ chomp ($prod); -+ -+ print "$prod\n"; -+} -+ -+# put auto-generation comment -+{ -+ my $comment = $comment_tmpl; -+ $comment =~ s/\@comment\@/Generated data ends here/; -+ print "\n" . $comment . "\n\n"; -+} -- cgit v1.2.3 From bdeb466ccb95005784d29e9838e61a0996180a64 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 29 Mar 2011 15:10:48 +0200 Subject: rsvglibs: finishing touches --- configure | 28260 ++++++++++++++++++++++++++++++++++++--------------------- configure.in | 2 +- 2 files changed, 17807 insertions(+), 10455 deletions(-) diff --git a/configure b/configure index dc346db04abd..8050f7d8c752 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.67. -# -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 STATUS 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=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_unset $as_var fi - $as_echo "$as_me: error: $2" >&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, old GNU/Linux) returns a bogus exit status, +# 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,675 +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 -nodep -VERBOSE -ENABLE_LAYOUT -ENABLE_STATIC_GTK -UNIXWRAPPERNAME -OOO_VENDOR -ABOUT_BITMAPS -INTRO_BITMAPS -WITH_DICT -WITH_POOR_HELP_LOCALIZATIONS -WITH_LANG -OOO_JUNIT_JAR -ANT_LIB -ANT_HOME -ANT -SYSTEM_LIBJPEG -SYSTEM_LIBPNG -SYSTEM_PANGO -SYSTEM_LIBCROCO -SYSTEM_GETTEXT -SYSTEM_GLIB -SYSTEM_GDKPIXBUF -SYSTEM_LIBRSVG -XINERAMA_LINK -USE_XINERAMA -SCPDEFS -WITHOUT_AFMS -WITHOUT_PPDS -WITH_FONTS -ENABLE_KAB -ENABLE_EVOAB2 -GOBJECT_LIBS -GOBJECT_CFLAGS -ENABLE_LOCKDOWN -KDE4_LIBS -KDE4_CFLAGS -MOC4 -KDE_LIBS -KDE_CFLAGS -MOC -COMMONS_LOGGING_JAR -COMMONS_HTTPCLIENT_JAR -COMMONS_LANG_JAR -COMMONS_CODEC_JAR -SYSTEM_APACHE_COMMONS -LIBSERIALIZER_JAR -LIBFONTS_JAR -LIBREPOSITORY_JAR -LIBFORMULA_JAR -LIBLOADER_JAR -LIBLAYOUT_JAR -LIBBASE_JAR -JFREEREPORT_JAR -FLUTE_JAR -LIBXML_JAR -SAC_JAR -SYSTEM_JFREEREPORT -ENABLE_REPORTBUILDER -SERVLETAPI_JAR -SYSTEM_SERVLETAPI -ENABLE_MEDIAWIKI -SYSTEM_POPPLER -ENABLE_PDFIMPORT -POPPLER_LIBS -POPPLER_CFLAGS -ENABLE_PRESENTER_SCREEN -ENABLE_MINIMIZER -ENABLE_PRESENTER_EXTRA_UI -ENABLE_OPENGL -SYSTEM_CAIRO -BUILD_PIXMAN -ENABLE_CAIRO -CAIRO_LIBS -CAIRO_CFLAGS -ENABLE_GSTREAMER -GSTREAMER_LIBS -GSTREAMER_CFLAGS -ENABLE_SYSTRAY_GTK -ENABLE_DBUS -ENABLE_GIO -GIO_LIBS -GIO_CFLAGS -DBUS_LIBS -DBUS_CFLAGS -GTK_LIBS -GTK_CFLAGS -ENABLE_GNOMEVFS -GNOMEVFS_LIBS -GNOMEVFS_CFLAGS -ENABLE_GCONF -GCONF_LIBS -GCONF_CFLAGS -ENABLE_KDE4 -ENABLE_KDE -ENABLE_GTK -ZIP_HOME -UNZIP -ZIP -ASM_HOME -ML_EXE -CYGWIN_PATH -GNUPATCH -GNUCP -PATCH -FLEX -BISON -NSIS_PATH -DIRECTXSDK_LIB -DIRECTXSDK_HOME -WINDOWS_VISTA_PSDK -PSDK_HOME -SYSTEM_LIBC -HAVE_READDIR_R -HAVE_GETOPT -SYSTEM_LIBTEXTCAT_DATA -SYSTEM_LIBTEXTCAT -SYSTEM_LPSOLVE -SYSTEM_MYTHES -MYTHES_LIBS -MYTHES_CFLAGS -HYPHEN_LIB -SYSTEM_HYPH -SYSTEM_HUNSPELL -HUNSPELL_LIBS -HUNSPELL_CFLAGS -SYSTEM_REDLAND -REDLAND_LIBS -REDLAND_CFLAGS -AGG_VERSION -SYSTEM_AGG -AGG_LIBS -AGG_CFLAGS -ENABLE_AGG -SYSTEM_OPENSSL -OPENSSL_LIBS -OPENSSL_CFLAGS -NEON_VERSION -SYSTEM_NEON -NEON_LIBS -NEON_CFLAGS -DISABLE_NEON -ENABLE_RANDR -XRANDR_DLOPEN -XRANDR_LIBS -XRANDR_CFLAGS -XRENDER_LINK -SYSTEM_XRENDER_HEADERS -DISABLE_XAW -XAU_LIBS -XLIB -XINC -X_EXTRA_LIBS -X_LIBS -X_PRE_LIBS -X_CFLAGS -XMKMF -SYSTEM_GRAPHITE -ENABLE_GRAPHITE -GRAPHITE_LIBS -GRAPHITE_CFLAGS -ICU_MICRO -ICU_MINOR -ICU_MAJOR -SYSTEM_ICU -ICUCONFIG -SYSTEM_GENCMN -SYSTEM_GENCCODE -SYSTEM_GENBRK -SYSTEM_SANE_HEADER -MOZ_LDAP_CFLAGS -MOZ_LIB_XPCOM -MOZ_LIB -MOZ_INC -MOZ_FLAVOUR -SYSTEM_MOZILLA -MOZILLABUILD -ENABLE_NSS_MODULE -BUILD_MOZAB -MOZLIBREQ_LIBS -MOZLIBREQ_CFLAGS -MOZGTK2_LIBS -MOZGTK2_CFLAGS -MOZILLA_TOOLKIT -MOZILLA_VERSION -MOZILLAXPCOM_LIBS -MOZILLAXPCOM_CFLAGS -NSPR_LIB -MOZ_NSPR_LIBS -MOZ_NSPR_CFLAGS -NSS_LIB -MOZ_NSS_LIBS -MOZ_NSS_CFLAGS -WITH_OPENLDAP -WITH_LDAP -WITH_MOZILLA -SYSTEM_ODBC_HEADERS -SYSTEM_VIGRA -SYSTEM_BOOST -SYSTEM_MDDS -CURL_LIBS -CURL_CFLAGS -SYSTEM_CURL -CURLCONFIG -SAXON_JAR -SYSTEM_SAXON -SERIALIZER_JAR -BSH_JAR -SYSTEM_BSH -HSQLDB_JAR -SYSTEM_HSQLDB -SYSTEM_MYSQL_CPPCONN -LIBMYSQL_PATH -MYSQL_DEFINES -MYSQL_LIB -MYSQL_INC -SYSTEM_MYSQL -MYSQLCONFIG -ENABLE_MYSQLC -LUCENE_ANALYZERS_JAR -LUCENE_CORE_JAR -SYSTEM_LUCENE -DB_JAR -DB_INCLUDES -DB_VERSION -SYSTEM_DB -HOME -PYTHON_LIBS -PYTHON_CFLAGS -SYSTEM_PYTHON -BZIP2 -pkgpyexecdir -pyexecdir -pkgpythondir -pythondir -PYTHON_PLATFORM -PYTHON_EXEC_PREFIX -PYTHON_PREFIX -PYTHON_VERSION -PYTHON -SYSTEM_LIBXML -LIBXML_LIBS -LIBXML_CFLAGS -SYSTEM_LIBXSLT -XSLTPROC -LIBXSLT_LIBS -LIBXSLT_CFLAGS -USE_FT_EMBOLDEN -FREETYPE_LIBS -FREETYPE_CFLAGS -SYSTEM_CPPUNIT -CPPUNIT_LIBS -CPPUNIT_CFLAGS -SYSTEM_LIBWPD -LIBWPD_LIBS -LIBWPD_CFLAGS -PKG_CONFIG -SYSTEM_EXPAT -SYSTEM_JPEG -SYSTEM_ZLIB -SYSTEM_STDLIBS -BUILD_UNOWINREG -MINGWSTRIP -MINGWCXX -BUILD_STAX -GPERF -PKGFORMAT -RPM -BUILD_EPM -PKGMK -DPKG -EPM -BUILD_DMAKE -DMAKE -JAVAIFLAGS -JAVAFLAGS -JDK -JAVA_HOME -JAVAAOTCOMPILER -AWTLIB -JAVADOC -JAVACISGCJ -JAVACOMPILER -JAVAINTERPRETER -SOLAR_JAVA -BUILD_VER_STRING -ALLOC -HAVE_GCC_VISIBILITY_FEATURE -CCACHE -USE_CCACHE -USE_SYSTEM_STL -STLPORT_VER -STLPORT4 -EXCEPTIONS -MINGW_GXXDLL -MINGW_GCCDLL -MINGW_SHARED_LIBSTDCPP -MINGW_SHARED_GXXLIB -MINGW_GCCLIB_EH -MINGW_SHARED_GCCLIB -MINGW_CLIB_DIR -MINGW_BACKWARD_INCLUDE_PATH -MINGW_LIB_INCLUDE_PATH -GXX_INCLUDE_PATH -CRYPT_LINK -PAM_LINK -NEW_SHADOW_API -PAM -VALGRIND_CFLAGS -LFS_CFLAGS -WORDS_BIGENDIAN -SIZEOF_LONG -CXXCPP -ac_ct_CXX -CXXFLAGS -CXX -CPP -FRAME_HOME -CSC_PATH -MIDL_PATH -USE_MINGW -COMEX -MSPDB_PATH -PERL -HAVE_LD_HASH_STYLE -_cc -GNUMAKE -ENABLE_PCH -HAVE_LD_BSYMBOLIC_FUNCTIONS -GCCVER -COMPATH -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -GCC_HOME -SHELLPATH -WITH_MINGWIN -THES_SYSTEM_DIR -HYPH_SYSTEM_DIR -DICT_SYSTEM_DIR -SYSTEM_DICTS -WITH_MYSPELL_DICTS -ENABLE_RPATH -DISABLE_ATL -DISABLE_ACTIVEX -ENABLE_DIRECTX -WITH_BINFILTER -DO_FETCH_TARBALLS -TARFILE_LOCATION -ENABLE_FONTCONFIG -ENABLE_CUPS -DISABLE_STRIP -ENABLE_SYMBOLS -PROEXT -PROFULLSWITCH -PRODUCT -ENABLE_DEBUG -ENABLE_WERROR -VC_STANDARD -ENABLE_CRASHDUMP -PTHREAD_LIBS -PTHREAD_CFLAGS -OSVERSION -GNUTAR -target_os -target_vendor -target_cpu -target -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -SOURCEVERSION -UPD -_solenv -LOCAL_SOLENV -SED -AWK -EGREP -GREP -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_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 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 VALGRIND_CFLAGS PAM NEW_SHADOW_API PAM_LINK CRYPT_LINK GXX_INCLUDE_PATH MINGW_LIB_INCLUDE_PATH MINGW_BACKWARD_INCLUDE_PATH MINGW_CLIB_DIR MINGW_SHARED_GCCLIB MINGW_GCCLIB_EH MINGW_SHARED_GXXLIB MINGW_SHARED_LIBSTDCPP MINGW_GCCDLL MINGW_GXXDLL EXCEPTIONS STLPORT4 STLPORT_VER USE_SYSTEM_STL USE_CCACHE CCACHE HAVE_GCC_VISIBILITY_FEATURE ALLOC BUILD_VER_STRING SOLAR_JAVA JAVAINTERPRETER JAVACOMPILER JAVACISGCJ JAVADOC AWTLIB JAVAAOTCOMPILER JAVA_HOME JDK JAVAFLAGS JAVAIFLAGS DMAKE BUILD_DMAKE EPM DPKG PKGMK BUILD_EPM RPM PKGFORMAT GPERF BUILD_STAX MINGWCXX ac_ct_MINGWCXX MINGWSTRIP ac_ct_MINGWSTRIP BUILD_UNOWINREG SYSTEM_STDLIBS SYSTEM_ZLIB SYSTEM_JPEG SYSTEM_EXPAT PKG_CONFIG LIBWPD_CFLAGS LIBWPD_LIBS SYSTEM_LIBWPD CPPUNIT_CFLAGS CPPUNIT_LIBS SYSTEM_CPPUNIT FREETYPE_CFLAGS FREETYPE_LIBS USE_FT_EMBOLDEN LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC SYSTEM_LIBXSLT LIBXML_CFLAGS LIBXML_LIBS SYSTEM_LIBXML PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir BZIP2 SYSTEM_PYTHON PYTHON_CFLAGS PYTHON_LIBS HOME SYSTEM_DB DB_VERSION DB_INCLUDES DB_JAR SYSTEM_LUCENE LUCENE_CORE_JAR LUCENE_ANALYZERS_JAR ENABLE_MYSQLC MYSQLCONFIG SYSTEM_MYSQL MYSQL_INC MYSQL_LIB MYSQL_DEFINES LIBMYSQL_PATH SYSTEM_MYSQL_CPPCONN SYSTEM_HSQLDB HSQLDB_JAR SYSTEM_BSH BSH_JAR SERIALIZER_JAR SYSTEM_SAXON SAXON_JAR CURLCONFIG SYSTEM_CURL CURL_CFLAGS CURL_LIBS SYSTEM_MDDS SYSTEM_BOOST SYSTEM_VIGRA SYSTEM_ODBC_HEADERS WITH_MOZILLA WITH_LDAP WITH_OPENLDAP MOZ_NSS_CFLAGS MOZ_NSS_LIBS NSS_LIB MOZ_NSPR_CFLAGS MOZ_NSPR_LIBS NSPR_LIB MOZILLAXPCOM_CFLAGS MOZILLAXPCOM_LIBS MOZILLA_VERSION MOZILLA_TOOLKIT MOZGTK2_CFLAGS MOZGTK2_LIBS MOZLIBREQ_CFLAGS MOZLIBREQ_LIBS BUILD_MOZAB ENABLE_NSS_MODULE MOZILLABUILD SYSTEM_MOZILLA MOZ_FLAVOUR MOZ_INC MOZ_LIB MOZ_LIB_XPCOM MOZ_LDAP_CFLAGS SYSTEM_SANE_HEADER SYSTEM_GENBRK SYSTEM_GENCCODE SYSTEM_GENCMN ICUCONFIG SYSTEM_ICU ICU_MAJOR ICU_MINOR ICU_MICRO GRAPHITE_CFLAGS GRAPHITE_LIBS ENABLE_GRAPHITE SYSTEM_GRAPHITE X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XINC XLIB XAU_LIBS DISABLE_XAW SYSTEM_XRENDER_HEADERS XRENDER_LINK XRANDR_CFLAGS XRANDR_LIBS XRANDR_DLOPEN ENABLE_RANDR DISABLE_NEON NEON_CFLAGS NEON_LIBS SYSTEM_NEON NEON_VERSION OPENSSL_CFLAGS OPENSSL_LIBS SYSTEM_OPENSSL ENABLE_AGG AGG_CFLAGS AGG_LIBS SYSTEM_AGG AGG_VERSION REDLAND_CFLAGS REDLAND_LIBS SYSTEM_REDLAND HUNSPELL_CFLAGS HUNSPELL_LIBS SYSTEM_HUNSPELL SYSTEM_HYPH HYPHEN_LIB MYTHES_CFLAGS MYTHES_LIBS SYSTEM_MYTHES SYSTEM_LPSOLVE SYSTEM_LIBTEXTCAT SYSTEM_LIBTEXTCAT_DATA HAVE_GETOPT HAVE_READDIR_R SYSTEM_LIBC PSDK_HOME WINDOWS_VISTA_PSDK DIRECTXSDK_HOME DIRECTXSDK_LIB NSIS_PATH BISON FLEX PATCH GNUCP GNUPATCH CYGWIN_PATH ML_EXE ASM_HOME ZIP UNZIP ZIP_HOME ENABLE_GTK ENABLE_KDE ENABLE_KDE4 GCONF_CFLAGS GCONF_LIBS ENABLE_GCONF GNOMEVFS_CFLAGS GNOMEVFS_LIBS ENABLE_GNOMEVFS GTK_CFLAGS GTK_LIBS DBUS_CFLAGS DBUS_LIBS GIO_CFLAGS GIO_LIBS ENABLE_GIO ENABLE_DBUS ENABLE_SYSTRAY_GTK GSTREAMER_CFLAGS GSTREAMER_LIBS ENABLE_GSTREAMER CAIRO_CFLAGS CAIRO_LIBS ENABLE_CAIRO BUILD_PIXMAN SYSTEM_CAIRO ENABLE_OPENGL ENABLE_PRESENTER_EXTRA_UI ENABLE_MINIMIZER ENABLE_PRESENTER_SCREEN POPPLER_CFLAGS POPPLER_LIBS ENABLE_PDFIMPORT SYSTEM_POPPLER ENABLE_MEDIAWIKI SYSTEM_SERVLETAPI SERVLETAPI_JAR ENABLE_REPORTBUILDER SYSTEM_JFREEREPORT SAC_JAR LIBXML_JAR FLUTE_JAR JFREEREPORT_JAR LIBBASE_JAR LIBLAYOUT_JAR LIBLOADER_JAR LIBFORMULA_JAR LIBREPOSITORY_JAR LIBFONTS_JAR LIBSERIALIZER_JAR SYSTEM_APACHE_COMMONS COMMONS_CODEC_JAR COMMONS_LANG_JAR COMMONS_HTTPCLIENT_JAR COMMONS_LOGGING_JAR MOC KDE_CFLAGS KDE_LIBS MOC4 KDE4_CFLAGS KDE4_LIBS ENABLE_LOCKDOWN GOBJECT_CFLAGS GOBJECT_LIBS ENABLE_EVOAB2 ENABLE_KAB WITH_FONTS WITHOUT_PPDS WITHOUT_AFMS SCPDEFS USE_XINERAMA XINERAMA_LINK SYSTEM_LIBRSVG SYSTEM_GDKPIXBUF SYSTEM_GLIB SYSTEM_GETTEXT SYSTEM_LIBCROCO SYSTEM_PANGO SYSTEM_LIBGSF SYSTEM_LIBPNG SYSTEM_LIBJPEG ANT ANT_HOME ANT_LIB OOO_JUNIT_JAR WITH_LANG WITH_POOR_HELP_LOCALIZATIONS WITH_DICT INTRO_BITMAPS ABOUT_BITMAPS OOO_VENDOR UNIXWRAPPERNAME ENABLE_STATIC_GTK ENABLE_LAYOUT VERBOSE nodep LOCAL_SOLVER BUILD_TYPE LIBOBJS LTLIBOBJS' ac_subst_files='' -ac_user_opts=' -enable_option_checking -with_gnu_patch -with_agg -with_gnu_cp -enable_graphite -with_system_graphite -enable_ldap -enable_fetch_external -with_external_tar -with_openldap -enable_lockdown -enable_vba -with_vba_package_format -enable_pch -enable_mozilla -with_fonts -with_ppds -with_afms -enable_epm -with_epm -with_package_format -enable_odk -enable_mathmldtd -enable_evolution2 -with_system_stdlibs -enable_cups -enable_fontconfig -enable_directx -enable_activex -enable_atl -enable_symbols -enable_strip_solver -enable_werror -enable_debug -enable_dbgutil -enable_crashdump -enable_cl_standard -enable_gtk -enable_gstreamer -enable_systray -enable_cairo -with_system_cairo -enable_opengl -enable_dbus -enable_gconf -enable_gnome_vfs -enable_gio -enable_static_gtk -enable_layout -enable_build_mozilla -with_mozilla_version -with_mozilla_toolkit -enable_nss_module -enable_kde -enable_kdeab -enable_kde4 -enable_binfilter -enable_rpath -enable_pam -enable_pam_link -enable_crypt_link -enable_xrender_link -enable_randr -enable_randr_link -with_myspell_dicts -with_system_dicts -with_external_dict_dir -with_external_hyph_dir -with_external_thes_dir -with_system_libs -with_system_headers -with_system_jars -with_system_zlib -with_system_openssl -with_system_jpeg -with_system_expat -with_system_libwpd -with_system_libxml -with_system_python -with_system_icu -with_system_poppler -with_system_db -with_system_lucene -with_lucene_core_jar -with_lucene_analyzers_jar -enable_mysql_connector -with_system_mysql -with_libmysql_path -with_system_mysql_cppconn -with_system_hsqldb -with_hsqldb_jar -with_system_beanshell -with_beanshell_jar -enable_presenter_extra_ui -enable_minimizer -enable_presenter_console -enable_pdfimport -enable_wiki_publisher -with_commons_codec_jar -with_commons_lang_jar -with_commons_httpclient_jar -with_commons_logging_jar -with_servlet_api_jar -enable_report_builder -with_system_jfreereport -with_sac_jar -with_libxml_jar -with_flute_jar -with_jfreereport_jar -with_liblayout_jar -with_libloader_jar -with_libformula_jar -with_librepository_jar -with_libfonts_jar -with_libserializer_jar -with_libbase_jar -with_system_saxon -with_saxon_jar -with_system_libxslt -with_system_odbc -with_system_sane -with_system_xrender -with_system_curl -with_system_boost -with_system_mdds -with_system_vigra -enable_neon -enable_Xaw -with_system_neon -with_system_agg -with_system_hunspell -with_system_mythes -with_system_altlinuxhyph -with_system_lpsolve -with_system_libtextcat -with_external_libtextcat_data -with_system_cppunit -with_system_redland -with_system_mozilla -with_stlport -with_jdk_home -with_gxx_include_path -with_java -enable_gcjaot -with_ant_home -with_junit -with_perl_home -with_cl_home -with_mspdb_path -with_midl_path -with_csc_path -with_nsis_path -with_frame_home -with_psdk_home -with_directx_home -with_mozilla_build -with_local_solenv -with_local_solver -enable_check_only -enable_ccache_skip -with_lang -with_poor_help_localizations -with_dict -with_intro_bitmaps -with_about_bitmaps -with_vendor -with_unix_wrapper -with_asm_home -with_os_version -with_unzip_home -with_zip_home -with_mingwin -with_build_version -with_alloc -enable_verbose -enable_dependency_tracking -enable_largefile -with_x -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -CXX -CXXFLAGS -CCC -CXXCPP -XMKMF' - # Initialize some variables set by options. ac_init_help= ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -1244,49 +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= ;; - *) 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 ;; @@ -1308,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- \ @@ -1387,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 ;; @@ -1417,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) @@ -1491,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 ;; @@ -1551,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. @@ -1600,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} ;; @@ -1627,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' @@ -1670,8 +689,8 @@ 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. - If a cross compiler is detected then cross compile mode will be used" >&2 + 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 fi @@ -1683,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. @@ -1771,17 +804,20 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages + -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -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 @@ -1791,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 @@ -1830,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 @@ -2432,975 +1460,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.67 -Copyright (C) 2010 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; } > conftest.i && { - 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; } > conftest.i && { - 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 eval "test \"\${$3+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 eval "test \"\${$3+set}\"" = set; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+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.i 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 eval "test \"\${$3+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 eval "test \"\${$3+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 eval "test \"\${$3+set}\"" = set; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+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.i 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 eval "test \"\${$3+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 eval "test \"\${$4+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.67. 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 ## ----------- ## @@ -3418,6 +1636,7 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= +ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -3428,13 +1647,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 @@ -3450,115 +1669,104 @@ 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. { echo - $as_echo "## ---------------- ## + cat <<\_ASBOX +## ---------------- ## ## Cache variables. ## -## ---------------- ##" +## ---------------- ## +_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 - $as_echo "## ----------------- ## + cat <<\_ASBOX +## ----------------- ## ## Output variables. ## -## ----------------- ##" +## ----------------- ## +_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 - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" + cat <<\_ASBOX +## ------------- ## +## 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 if test -s confdefs.h; then - $as_echo "## ----------- ## + cat <<\_ASBOX +## ----------- ## ## confdefs.h. ## -## ----------- ##" +## ----------- ## +_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. @@ -3566,137 +1774,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 - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -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 +# 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 "$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;} +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" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 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' @@ -3705,1087 +1888,1104 @@ 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 - -# Check whether --enable-graphite was given. -if test "${enable_graphite+set}" = set; then : - enableval=$enable_graphite; -fi +fi; +# Check whether --enable-graphite or --disable-graphite was given. +if test "${enable_graphite+set}" = set; then + enableval="$enable_graphite" +fi; -# Check whether --with-system-graphite was given. -if test "${with_system_graphite+set}" = set; then : - withval=$with_system_graphite; -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 --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-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; -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-gstreamer or --disable-gstreamer was given. +if test "${enable_gstreamer+set}" = set; then + enableval="$enable_gstreamer" -# Check whether --enable-gstreamer was given. -if test "${enable_gstreamer+set}" = set; then : - enableval=$enable_gstreamer; else enable_gstreamer=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 +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-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 - - -# 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-mdds was given. -if test "${with_system_mdds+set}" = set; then : - withval=$with_system_mdds; -fi +# Check whether --with-system-mdds or --without-system-mdds was given. +if test "${with_system_mdds+set}" = set; then + withval="$with_system_mdds" +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-libtextcat was given. -if test "${with_system_libtextcat+set}" = set; then : - withval=$with_system_libtextcat; -fi +# Check whether --with-system-libtextcat or --without-system-libtextcat was given. +if test "${with_system_libtextcat+set}" = set; then + withval="$with_system_libtextcat" +fi; -# Check whether --with-external-libtextcat-data was given. -if test "${with_external_libtextcat_data+set}" = set; then : - withval=$with_external_libtextcat_data; -fi +# Check whether --with-external-libtextcat-data or --without-external-libtextcat-data was given. +if test "${with_external_libtextcat_data+set}" = set; then + withval="$with_external_libtextcat_data" +fi; -# 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 was given. -if test "${with_jdk_home+set}" = set; then : - withval=$with_jdk_home; -fi +# Check whether --with-jdk-home or --without-jdk-home was given. +if test "${with_jdk_home+set}" = set; then + withval="$with_jdk_home" +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 or --without-perl-home was given. +if test "${with_perl_home+set}" = set; then + withval="$with_perl_home" -# Check whether --with-perl-home was given. -if test "${with_perl_home+set}" = set; then : - withval=$with_perl_home; -fi - +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 was given. -if test "${with_lang+set}" = set; then : - withval=$with_lang; -fi +# Check whether --with-lang or --without-lang was given. +if test "${with_lang+set}" = set; then + withval="$with_lang" +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" -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi +fi; +# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval="$enable_dependency_tracking" +fi; BUILD_TYPE="OOo" @@ -4812,144 +3012,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. @@ -4959,37 +3044,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 [\\/]* | ?:[\\/]*) @@ -5001,41 +3084,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 [\\/]* | ?:[\\/]*) @@ -5047,46 +3131,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 @@ -5104,140 +3189,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 - if test -f "$ac_dir/install-sh"; then +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break - elif test -f "$ac_dir/install.sh"; then + elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break - elif test -f "$ac_dir/shtool"; then + elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { (exit 1); exit 1; }; } fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_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 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build +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 - 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 +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 - if test "x$target_alias" = x; then - ac_cv_target=$ac_cv_host -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. @@ -5246,22 +3301,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" @@ -5279,10 +3335,10 @@ case "$build_os" in _os=SunOS # Extract the first word of "gtar", so it can be a program name with args. set dummy gtar; ac_word=$2 -{ $as_echo "$as_me:${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 [\\/]* | ?:[\\/]*) @@ -5295,51 +3351,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*) @@ -5373,8 +3434,8 @@ $as_echo "ok ($build_cpu)" >&6; } test_gstreamer=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 @@ -5397,17 +3458,17 @@ $as_echo "$as_me: WARNING: Disabling gtk-quickstarter - not supported on Mac. Us test_randr=yes test_freetype=yes test_gstreamer=yes - { $as_echo "$as_me:${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" @@ -5418,8 +3479,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) @@ -5450,7 +3511,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 @@ -5458,17 +3521,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 @@ -5477,88 +3540,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 @@ -5566,20 +3631,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 @@ -5591,29 +3658,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 @@ -5628,124 +3695,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 @@ -5755,12 +3822,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." "$LINENO" 5 +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." >&2;} + { (exit 1); exit 1; }; } fi CC=`echo $CC | $SED "s/^guw.exe //"` CXX=`echo $CXX | $SED "s/^guw.exe //"` @@ -5775,29 +3846,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 [\\/]* | ?:[\\/]*) @@ -5809,45 +3882,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 @@ -5868,10 +3942,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${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. @@ -5881,37 +3955,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. @@ -5921,50 +3993,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. @@ -5974,37 +4035,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. @@ -6015,19 +4116,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. @@ -6045,25 +4145,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. @@ -6073,41 +4172,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. @@ -6117,78 +4214,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 @@ -6200,108 +4285,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_error 77 "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 @@ -6309,90 +4398,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 @@ -6404,46 +4441,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 @@ -6457,65 +4493,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 -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_compiler_gnu=no 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 -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; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +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 +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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -6526,18 +4552,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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cc_g=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 -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 @@ -6553,14 +4600,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 @@ -6588,17 +4639,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);}; @@ -6613,37 +4659,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' @@ -6658,10 +4872,10 @@ if test "$COMPATH" = "." ; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${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 [\\/]* | ?:[\\/]*) @@ -6673,29 +4887,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 @@ -6705,18 +4918,22 @@ COMPATH=`echo $COMPATH | $SED "s@/[Bb][Ii][Nn]\\\$@@"`; GCCVER=20995 if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then - { $as_echo "$as_me:${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 @@ -6729,35 +4946,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 @@ -6772,47 +4997,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_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 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 @@ -6820,26 +5070,30 @@ 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 "038100" ; 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_fn_error $? "failed ($GNUMAKE version >= 3.81 needed" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: failed ($GNUMAKE version >= 3.81 needed" >&5 +echo "$as_me: error: failed ($GNUMAKE version >= 3.81 needed" >&2;} + { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:${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 @@ -6847,10 +5101,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 @@ -6861,10 +5117,10 @@ if test "$_os" = "SunOS"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${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 [\\/]* | ?:[\\/]*) @@ -6876,58 +5132,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 @@ -6942,19 +5205,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 @@ -6966,10 +5253,10 @@ if test "$_os" = "OSF1"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${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 [\\/]* | ?:[\\/]*) @@ -6981,44 +5268,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 @@ -7026,10 +5314,10 @@ fi if test -z "$with_perl_home"; then # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 -{ $as_echo "$as_me:${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 [\\/]* | ?:[\\/]*) @@ -7041,29 +5329,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"` @@ -7072,38 +5359,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`; @@ -7113,8 +5408,8 @@ $as_echo_n "checking for friendly registry keys... " >&6; } else with_cl_home=`cygpath -u "$with_cl_home"` fi - { $as_echo "$as_me:${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"` @@ -7135,10 +5430,10 @@ $as_echo "done" >&6; } if test -z "$MSPDB_PATH";then # Extract the first word of "mspdb80.dll", so it can be a program name with args. set dummy mspdb80.dll; ac_word=$2 -{ $as_echo "$as_me:${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 [\\/]* | ?:[\\/]*) @@ -7150,35 +5445,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 [\\/]* | ?:[\\/]*) @@ -7190,50 +5484,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 [\\/]* | ?:[\\/]*) @@ -7245,41 +5540,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) @@ -7288,42 +5582,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 @@ -7335,10 +5635,10 @@ if test "$_os" = "WINNT"; then if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then # Extract the first word of "midl.exe", so it can be a program name with args. set dummy midl.exe; ac_word=$2 -{ $as_echo "$as_me:${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 [\\/]* | ?:[\\/]*) @@ -7350,29 +5650,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 @@ -7398,7 +5697,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"` @@ -7406,10 +5707,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 [\\/]* | ?:[\\/]*) @@ -7421,29 +5722,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 @@ -7459,14 +5759,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 @@ -7488,10 +5790,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"` @@ -7507,15 +5811,15 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${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" @@ -7529,7 +5833,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 @@ -7538,34 +5846,78 @@ 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.i conftest.$ac_ext +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 fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then break fi @@ -7577,8 +5929,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 @@ -7588,7 +5940,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 @@ -7597,40 +5953,85 @@ 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.i conftest.$ac_ext +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 fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - +rm -f conftest.err conftest.$ac_ext +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 @@ -7640,12 +6041,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 @@ -7660,23 +6065,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 @@ -7686,14 +6119,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 @@ -7703,13 +6140,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)) @@ -7729,50 +6169,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. @@ -7782,41 +6233,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. @@ -7826,77 +6275,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 @@ -7910,34 +6346,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 @@ -7948,80 +6405,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 +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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - ; - return 0; -} +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +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" @@ -8035,7 +6588,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 @@ -8044,34 +6601,78 @@ 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.i conftest.$ac_ext +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 fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then break fi @@ -8083,8 +6684,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 @@ -8094,7 +6695,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 @@ -8103,40 +6708,85 @@ 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.i conftest.$ac_ext +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 fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - +rm -f conftest.err conftest.$ac_ext +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 @@ -8154,15 +6804,15 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${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" @@ -8176,7 +6826,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 @@ -8185,34 +6839,78 @@ 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.i conftest.$ac_ext +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 fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then break fi @@ -8224,8 +6922,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 @@ -8235,7 +6933,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 @@ -8244,96 +6946,577 @@ 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.i conftest.$ac_ext +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 fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { 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 +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + fi +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=`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 `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +echo "$as_me:$LINENO: checking for long" >&5 +echo $ECHO_N "checking for long... $ECHO_C" >&6 +if test "${ac_cv_type_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((long *) 0) + return 0; +if (sizeof (long)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_long=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 +echo "${ECHO_T}$ac_cv_type_long" >&6 + +echo "$as_me:$LINENO: checking size of long" >&5 +echo $ECHO_N "checking size of long... $ECHO_C" >&6 +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 + # 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 + + ; + 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 >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 + ; + 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 - { { $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 ; } -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -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_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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - fi +ac_lo= ac_hi= fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +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. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +test_array [0] = 0 -# 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 -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + ; + 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 +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 () +{ + 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); -# 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 + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long=`cat conftest.val` else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : + 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 *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val 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_error 77 "cannot compute sizeof (long) -See \`config.log' for more details" "$LINENO" 5 ; } - else - ac_cv_sizeof_long=0 - fi + ac_cv_sizeof_long=0 fi - fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } - - - +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 @@ -8341,252 +7524,262 @@ _ACEOF SIZEOF_LONG=$ac_cv_sizeof_long - { $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 +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 - 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 -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 + # 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 BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif ; return 0; } _ACEOF -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 # It does; now see whether it defined to BIG_ENDIAN or not. - 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 +#include int main () { #if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif + 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 -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 -/* end confdefs.h. */ -#include + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -int -main () -{ -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif +ac_cv_c_bigendian=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - ; - return 0; -} +# 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 -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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - +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 () { -#ifndef _BIG_ENDIAN - not big endian - #endif - + _ascii (); _ebcdic (); ; 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 + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no 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 -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; +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -int -main () -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - 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 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +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. @@ -8605,34 +7798,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. @@ -8651,11 +7899,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 @@ -8675,33 +7952,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. @@ -8720,11 +8024,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 @@ -8744,43 +8077,201 @@ 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 +rm -f conftest* +fi + +if test -n "$ac_cv_sys_file_offset_bits"; then + LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" +fi +if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then + LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES" +fi + + +if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then + VALGRIND_CFLAGS="" + prev_cppflags=$CPPFLAGS + if test -z "$VALGRIND_CFLAGS"; then + CPPFLAGS="-I/usr/include/valgrind" + if test "${ac_cv_header_valgrind_h+set}" = set; then + echo "$as_me:$LINENO: checking for valgrind.h" >&5 +echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 +if test "${ac_cv_header_valgrind_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 +echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking valgrind.h usability" >&5 +echo $ECHO_N "checking valgrind.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 valgrind.h presence" >&5 +echo $ECHO_N "checking valgrind.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 -if test -n "$ac_cv_sys_file_offset_bits"; then - LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" -fi -if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then - LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES" + 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: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: valgrind.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 valgrind.h" >&5 +echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 +if test "${ac_cv_header_valgrind_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_valgrind_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 +echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 -if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then - VALGRIND_CFLAGS="" - prev_cppflags=$CPPFLAGS - if test -z "$VALGRIND_CFLAGS"; then - CPPFLAGS="-I/usr/include/valgrind" - ac_fn_c_check_header_mongrel "$LINENO" "valgrind.h" "ac_cv_header_valgrind_h" "$ac_includes_default" -if test "x$ac_cv_header_valgrind_h" = x""yes; then : +fi +if test $ac_cv_header_valgrind_h = yes; then VALGRIND_CFLAGS=$CPPFLAGS else unset ac_cv_header_valgrind_h @@ -8790,8 +8281,144 @@ fi fi if test -z "$VALGRIND_CFLAGS"; then CPPFLAGS="-I/usr/local/include/valgrind" - ac_fn_c_check_header_mongrel "$LINENO" "valgrind.h" "ac_cv_header_valgrind_h" "$ac_includes_default" -if test "x$ac_cv_header_valgrind_h" = x""yes; then : + if test "${ac_cv_header_valgrind_h+set}" = set; then + echo "$as_me:$LINENO: checking for valgrind.h" >&5 +echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 +if test "${ac_cv_header_valgrind_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 +echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking valgrind.h usability" >&5 +echo $ECHO_N "checking valgrind.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 valgrind.h presence" >&5 +echo $ECHO_N "checking valgrind.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: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: valgrind.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 valgrind.h" >&5 +echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 +if test "${ac_cv_header_valgrind_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_valgrind_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 +echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 + +fi +if test $ac_cv_header_valgrind_h = yes; then VALGRIND_CFLAGS=$CPPFLAGS fi @@ -8799,9 +8426,145 @@ fi fi if test -n "$VALGRIND_CFLAGS"; then CPPFLAGS=$VALGRIND_CFLAGS - ac_fn_c_check_header_mongrel "$LINENO" "memcheck.h" "ac_cv_header_memcheck_h" "$ac_includes_default" -if test "x$ac_cv_header_memcheck_h" = x""yes; then : + if test "${ac_cv_header_memcheck_h+set}" = set; then + echo "$as_me:$LINENO: checking for memcheck.h" >&5 +echo $ECHO_N "checking for memcheck.h... $ECHO_C" >&6 +if test "${ac_cv_header_memcheck_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_memcheck_h" >&5 +echo "${ECHO_T}$ac_cv_header_memcheck_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking memcheck.h usability" >&5 +echo $ECHO_N "checking memcheck.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 memcheck.h presence" >&5 +echo $ECHO_N "checking memcheck.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: memcheck.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: memcheck.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: memcheck.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: memcheck.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: memcheck.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: memcheck.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: memcheck.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: memcheck.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: memcheck.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: memcheck.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: memcheck.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: memcheck.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: memcheck.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: memcheck.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: memcheck.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: memcheck.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 memcheck.h" >&5 +echo $ECHO_N "checking for memcheck.h... $ECHO_C" >&6 +if test "${ac_cv_header_memcheck_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_memcheck_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_memcheck_h" >&5 +echo "${ECHO_T}$ac_cv_header_memcheck_h" >&6 +fi +if test $ac_cv_header_memcheck_h = yes; then + : else VALGRIND_CFLAGS="" fi @@ -8813,74 +8576,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 @@ -8888,17 +8956,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 @@ -8909,11 +8979,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 @@ -8930,7 +9000,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 @@ -8947,10 +9021,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 @@ -8958,7 +9057,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 @@ -8977,10 +9080,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 @@ -8990,7 +9118,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 @@ -9009,10 +9141,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 @@ -9023,28 +9180,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 @@ -9063,49 +9222,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 @@ -9113,12 +9301,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 @@ -9137,24 +9327,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. @@ -9164,41 +9350,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. @@ -9208,77 +9392,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 @@ -9292,34 +9463,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 @@ -9330,64 +9522,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 -/* 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' @@ -9397,8 +9685,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 }'` @@ -9412,26 +9700,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); @@ -9456,24 +9751,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 @@ -9491,18 +9801,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 @@ -9520,16 +9830,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 @@ -9538,41 +9848,41 @@ _ACEOF if test -n "$_mingw_backward_include_path"; then _mingw_backward_include_path=`cygpath -d $_mingw_backward_include_path` _mingw_backward_include_path=`cygpath -u $_mingw_backward_include_path` - { $as_echo "$as_me:${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 MINGW_SHARED_LIBSTDCPP= if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then MINGW_SHARED_LIBSTDCPP=stdc++_s @@ -9581,23 +9891,23 @@ $as_echo_n "checking whether to use dynamic libstdc++... " >&6; } MINGW_SHARED_LIBSTDCPP=stdc++.dll fi if test -n "$MINGW_SHARED_LIBSTDCPP" ; then - { $as_echo "$as_me:${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/lib$MINGW_SHARED_LIBSTDCPP.a | sed -ne 's@.* _libstdc__\(.*\)_dll_iname@libstdc++\1.dll@p' | uniq | sed -e 's@_@?@g'` MINGW_GXXDLL=`cd $COMPATH/bin && ls $MINGW_GXXDLL_pattern 2>/dev/null` if test -n "$MINGW_GXXDLL"; then MINGW_SHARED_LIBSTDCPP=-l$MINGW_SHARED_LIBSTDCPP MINGW_SHARED_GXXLIB=YES - { $as_echo "$as_me:${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 MINGW_SHARED_LIBSTDCPP= - { $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` @@ -9611,36 +9921,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' @@ -9648,7 +9958,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 @@ -9663,18 +9977,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' @@ -9687,8 +10025,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 @@ -9702,15 +10040,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 @@ -9724,17 +10062,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 @@ -9748,15 +10086,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 @@ -9770,19 +10108,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 @@ -9809,100 +10147,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.i conftest.$ac_ext +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 @@ -9918,11 +10290,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 @@ -9933,47 +10309,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 [\\/]* | ?:[\\/]*) @@ -9985,44 +10386,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' @@ -10030,7 +10430,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 @@ -10041,20 +10445,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 @@ -10064,27 +10492,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; @@ -10097,42 +10531,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 @@ -10142,9 +10606,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; @@ -10157,19 +10625,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 @@ -10178,8 +10670,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 { @@ -10207,11 +10699,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 @@ -10227,19 +10719,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" -if eval test \"x\$"$as_ac_var"\" = 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 @@ -10247,48 +10832,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 @@ -10296,77 +10912,203 @@ _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" = "jemalloc"; then if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: jemalloc" >&5 -$as_echo "jemalloc" >&6; } + echo "$as_me:$LINENO: result: jemalloc" >&5 +echo "${ECHO_T}jemalloc" >&6 save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -pthread" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc in -ljemalloc" >&5 -$as_echo_n "checking for malloc in -ljemalloc... " >&6; } -if test "${ac_cv_lib_jemalloc_malloc+set}" = set; then : - $as_echo_n "(cached) " >&6 + +echo "$as_me:$LINENO: checking for malloc in -ljemalloc" >&5 +echo $ECHO_N "checking for malloc in -ljemalloc... $ECHO_C" >&6 +if test "${ac_cv_lib_jemalloc_malloc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljemalloc $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 +/* 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 () +{ +malloc (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.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_jemalloc_malloc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_jemalloc_malloc=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_jemalloc_malloc" >&5 +echo "${ECHO_T}$ac_cv_lib_jemalloc_malloc" >&6 +if test $ac_cv_lib_jemalloc_malloc = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBJEMALLOC 1 +_ACEOF + + LIBS="-ljemalloc $LIBS" + +else + { { echo "$as_me:$LINENO: error: jemalloc not found or functional. Install the jemalloc allocator." >&5 +echo "$as_me: error: jemalloc not found or functional. Install the jemalloc allocator." >&2;} + { (exit 1); exit 1; }; } +fi + + ALLOC="JEMALLOC"; + CFLAGS=$save_CFLAGS + else + 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=`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 -char malloc (); + int main () { -return malloc (); +return f != $ac_func; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_jemalloc_malloc=yes +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 - ac_cv_lib_jemalloc_malloc=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_jemalloc_malloc" >&5 -$as_echo "$ac_cv_lib_jemalloc_malloc" >&6; } -if test "x$ac_cv_lib_jemalloc_malloc" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBJEMALLOC 1 -_ACEOF - - LIBS="-ljemalloc $LIBS" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -else - as_fn_error $? "jemalloc not found or functional. Install the jemalloc allocator." "$LINENO" 5 +eval "$as_ac_var=no" fi - - ALLOC="JEMALLOC"; - CFLAGS=$save_CFLAGS - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5 -$as_echo "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" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +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 @@ -10375,38 +11117,38 @@ done fi 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 @@ -10433,10 +11175,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 [\\/]* | ?:[\\/]*) @@ -10448,35 +11190,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 @@ -10486,26 +11229,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 @@ -10525,13 +11270,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 @@ -10561,15 +11308,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 @@ -10581,10 +11333,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]$,,"` @@ -10594,7 +11348,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 @@ -10614,10 +11370,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 [\\/]* | ?:[\\/]*) @@ -10629,29 +11385,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 @@ -10659,7 +11414,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 @@ -10675,11 +11432,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" @@ -10698,10 +11455,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 [\\/]* | ?:[\\/]*) @@ -10713,29 +11470,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 @@ -10748,10 +11504,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 [\\/]* | ?:[\\/]*) @@ -10763,33 +11519,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 @@ -10821,33 +11578,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"` @@ -10869,10 +11630,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 @@ -10894,12 +11655,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 @@ -10912,59 +11673,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 @@ -10983,93 +11910,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 @@ -11082,24 +12203,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 @@ -11109,10 +12230,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 [\\/]* | ?:[\\/]*) @@ -11124,37 +12245,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 @@ -11171,10 +12291,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 [\\/]* | ?:[\\/]*) @@ -11186,36 +12306,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 @@ -11224,48 +12343,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 [\\/]* | ?:[\\/]*) @@ -11277,30 +12396,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." @@ -11308,38 +12426,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" @@ -11348,8 +12472,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 @@ -11385,7 +12509,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 @@ -11393,7 +12519,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 @@ -11410,17 +12554,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 @@ -11435,22 +12580,26 @@ $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; }; } elif "$RPM" --usage 2>&1 | $EGREP -- -bb >/dev/null; then 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 else - as_fn_error $? "cannot build packages. Try installing rpmbuild." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: cannot build packages. Try installing rpmbuild." >&5 +echo "$as_me: error: cannot build packages. Try installing rpmbuild." >&2;} + { (exit 1); exit 1; }; } fi fi if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then # Extract the first word of "dpkg", so it can be a program name with args. set dummy dpkg; ac_word=$2 -{ $as_echo "$as_me:${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 [\\/]* | ?:[\\/]*) @@ -11462,76 +12611,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;} @@ -11542,10 +12696,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 [\\/]* | ?:[\\/]*) @@ -11557,32 +12711,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 @@ -11590,8 +12745,8 @@ 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 PKGFORMAT=native fi @@ -11600,10 +12755,10 @@ fi # Extract the first word of "gperf", so it can be a program name with args. set dummy gperf; ac_word=$2 -{ $as_echo "$as_me:${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 [\\/]* | ?:[\\/]*) @@ -11615,87 +12770,95 @@ 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 stax" >&5 -$as_echo_n "checking whether to build the stax... " >&6; } +echo "$as_me:$LINENO: checking whether to build the stax" >&5 +echo $ECHO_N "checking whether to build the stax... $ECHO_C" >&6 if test -f "./stax/download/jsr173_1.0_api.jar"; then BUILD_STAX=NO - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, will use the prebuilt stax/download/jsr173_1.0_api.jar" >&5 -$as_echo "no, will use the prebuilt stax/download/jsr173_1.0_api.jar" >&6; } + echo "$as_me:$LINENO: result: no, will use the prebuilt stax/download/jsr173_1.0_api.jar" >&5 +echo "${ECHO_T}no, will use the prebuilt stax/download/jsr173_1.0_api.jar" >&6 else BUILD_STAX=YES - { $as_echo "$as_me:${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 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" >&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" "$LINENO" 5 + 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 @@ -11703,10 +12866,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. @@ -11716,37 +12879,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. @@ -11756,53 +12917,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/ | $SED -e s/c++/strip/`"; then MINGSTRIP=false; else MINGWSTRIP=$(basename $(echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/)); fi @@ -11810,10 +12965,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/ | $SED -e s/c++/strip/`", so it can be a program name with args. set dummy ${ac_tool_prefix}`echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/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. @@ -11823,37 +12978,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/ | $SED -e s/c++/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/ | $SED -e s/c++/strip/`", so it can be a program name with args. set dummy `echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/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. @@ -11863,47 +13016,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/ | $SED -e s/c++/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' @@ -11921,37 +13066,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 @@ -11961,51 +13135,218 @@ _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 : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBADVAPI32 1 -_ACEOF - - LIBS="-ladvapi32 $LIBS" +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 + + LIBS="-ladvapi32 $LIBS" + +fi +ac_cv_lib_advapi32=ac_cv_lib_advapi32_main + + if test "${ac_cv_header_windows_h+set}" = set; then + echo "$as_me:$LINENO: checking for windows.h" >&5 +echo $ECHO_N "checking for windows.h... $ECHO_C" >&6 +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 -ac_cv_lib_advapi32=ac_cv_lib_advapi32_main +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" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" -if test "x$ac_cv_header_windows_h" = 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: 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 @@ -12024,24 +13365,24 @@ 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 -{ $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 @@ -12049,189 +13390,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 - { $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_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; } +echo "$as_me:$LINENO: checking which jpeg to use" >&5 +echo $ECHO_N "checking which jpeg to use... $ECHO_C" >&6 if test -n "$with_system_jpeg" -o -n "$with_system_libs" && \ test "$with_system_jpeg" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}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+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 +fi +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 @@ -12239,24 +14081,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 @@ -12264,10 +14106,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 [\\/]* | ?:[\\/]*) @@ -12279,30 +14121,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 @@ -12313,25 +14154,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="" @@ -12352,12 +14193,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 @@ -12365,12 +14208,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: @@ -12379,10 +14222,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 [\\/]* | ?:[\\/]*) @@ -12394,30 +14237,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 @@ -12428,25 +14270,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.0 " >&5 -$as_echo_n "checking for cppunit >= 1.12.0 ... " >&6; } + echo "$as_me:$LINENO: checking for cppunit >= 1.12.0 " >&5 +echo $ECHO_N "checking for cppunit >= 1.12.0 ... $ECHO_C" >&6 if $PKG_CONFIG --exists "cppunit >= 1.12.0 " ; then - { $as_echo "$as_me:${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.0 "` - { $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.0 "` - { $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="" @@ -12467,12 +14309,14 @@ $as_echo "$CPPUNIT_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_error $? "Library requirements (cppunit >= 1.12.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: Library requirements (cppunit >= 1.12.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (cppunit >= 1.12.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:${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 @@ -12481,18 +14325,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 [\\/]* | ?:[\\/]*) @@ -12504,30 +14348,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 @@ -12538,25 +14381,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="" @@ -12577,7 +14420,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 @@ -12590,43 +14435,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" @@ -12659,26 +14532,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 @@ -12688,10 +14561,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 [\\/]* | ?:[\\/]*) @@ -12703,30 +14576,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 @@ -12737,25 +14609,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="" @@ -12776,7 +14648,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 @@ -12784,10 +14658,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 [\\/]* | ?:[\\/]*) @@ -12799,36 +14673,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 @@ -12837,25 +14712,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 @@ -12865,10 +14740,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 [\\/]* | ?:[\\/]*) @@ -12880,30 +14755,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 @@ -12914,25 +14788,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="" @@ -12953,15 +14827,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 @@ -12969,27 +14845,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. @@ -13001,20 +14877,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 @@ -13030,23 +14909,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 [\\/]* | ?:[\\/]*) @@ -13058,48 +14938,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 @@ -13110,30 +14991,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 @@ -13141,16 +15022,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 @@ -13168,15 +15049,153 @@ $as_echo "$am_cv_python_pyexecdir" >&6; } PYTHON_CFLAGS="-I$python_include" PYTHON_LIBS="-lpython$python_version" fi -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 "$with_system_python" = "yes" ; then + SYSTEM_PYTHON=YES + save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS" + if test "${ac_cv_header_Python_h+set}" = set; then + echo "$as_me:$LINENO: checking for Python.h" >&5 +echo $ECHO_N "checking for Python.h... $ECHO_C" >&6 +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 @@ -13184,8 +15203,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=""; @@ -13194,10 +15213,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 [\\/]* | ?:[\\/]*) @@ -13209,31 +15228,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 @@ -13243,27 +15263,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 @@ -13271,15 +15385,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 @@ -13290,47 +15409,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 @@ -13338,14 +15501,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 @@ -13354,70 +15519,78 @@ 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-core.jar" >&5 -$as_echo_n "checking for /usr/share/java/lucene-core.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_lucene_core_jar+set}" = set; then : - $as_echo_n "(cached) " >&6 + echo "$as_me:$LINENO: checking for /usr/share/java/lucene-core.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/lucene-core.jar... $ECHO_C" >&6 +if test "${ac_cv_file__usr_share_java_lucene_core_jar+set}" = set; then + 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.jar"; then ac_cv_file__usr_share_java_lucene_core_jar=yes else ac_cv_file__usr_share_java_lucene_core_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_lucene_core_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_lucene_core_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_lucene_core_jar" = x""yes; then : +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_core_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_lucene_core_jar" >&6 +if test $ac_cv_file__usr_share_java_lucene_core_jar = yes; then LUCENE_CORE_JAR=/usr/share/java/lucene-core.jar else - { $as_echo "$as_me:${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 @@ -13430,70 +15603,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -13502,32 +15684,35 @@ 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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lucene is version 2.x" >&5 -$as_echo_n "checking whether lucene is version 2.x... " >&6; } + echo "$as_me:$LINENO: checking whether lucene is version 2.x" >&5 +echo $ECHO_N "checking whether lucene is version 2.x... $ECHO_C" >&6 export LUCENE_CORE_JAR if $PERL -e 'use Archive::Zip; my $file = "$ENV{'LUCENE_CORE_JAR'}"; @@ -13538,15 +15723,17 @@ $as_echo_n "checking whether lucene is version 2.x... " >&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, you need lucene 2" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: no, you need lucene 2" >&5 +echo "$as_me: error: no, you need lucene 2" >&2;} + { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:${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 @@ -13554,42 +15741,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 [\\/]* | ?:[\\/]*) @@ -13601,68 +15790,73 @@ 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 @@ -13671,7 +15865,7 @@ fi -ac_ext=cpp +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -13679,58 +15873,225 @@ 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; } +echo "$as_me:$LINENO: checking MySQL Connector/C++" >&5 +echo $ECHO_N "checking MySQL Connector/C++... $ECHO_C" >&6 if test -n "$with_system_mysql_cppconn" -o -n "$with_system_libs" && \ test "$with_system_mysql_cppconn" != "no" && test "$with_system_libs" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_MYSQL_CPPCONN=YES - ac_ext=cpp + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - 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 : + 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 @@ -13738,18 +16099,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 @@ -13766,17 +16134,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' @@ -13784,15 +16167,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 @@ -13806,41 +16191,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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.x" >&5 -$as_echo_n "checking whether hsqldb is 1.8.0.x... " >&6; } + echo "$as_me:$LINENO: checking whether hsqldb is 1.8.0.x" >&5 +echo $ECHO_N "checking whether hsqldb is 1.8.0.x... $ECHO_C" >&6 export HSQLDB_JAR if $PERL -e 'use Archive::Zip; my $file = "$ENV{'HSQLDB_JAR'}"; @@ -13863,56 +16251,61 @@ $as_echo_n "checking whether hsqldb is 1.8.0.x... " >&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, you need hsqldb >= 1.8.0.9 but < 1.8.1" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: no, you need hsqldb >= 1.8.0.9 but < 1.8.1" >&5 +echo "$as_me: error: no, you need hsqldb >= 1.8.0.9 but < 1.8.1" >&2;} + { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:${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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -13920,70 +16313,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 @@ -13996,60 +16397,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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; @@ -14090,36 +16497,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 @@ -14133,20 +16544,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 [\\/]* | ?:[\\/]*) @@ -14158,49 +16569,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 @@ -14208,84 +16622,640 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which mdds to use" >&5 -$as_echo_n "checking which mdds to use... " >&6; } +echo "$as_me:$LINENO: checking which mdds to use" >&5 +echo $ECHO_N "checking which mdds to use... $ECHO_C" >&6 if test -n "$with_system_mdds" -o -n "$with_system_headers" && \ test "$with_system_mdds" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_MDDS=YES - ac_ext=cpp + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + if test "${ac_cv_header_mdds_flat_segment_tree_hpp+set}" = set; then + echo "$as_me:$LINENO: checking for mdds/flat_segment_tree.hpp" >&5 +echo $ECHO_N "checking for mdds/flat_segment_tree.hpp... $ECHO_C" >&6 +if test "${ac_cv_header_mdds_flat_segment_tree_hpp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_mdds_flat_segment_tree_hpp" >&5 +echo "${ECHO_T}$ac_cv_header_mdds_flat_segment_tree_hpp" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking mdds/flat_segment_tree.hpp usability" >&5 +echo $ECHO_N "checking mdds/flat_segment_tree.hpp usability... $ECHO_C" >&6 +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 mdds/flat_segment_tree.hpp presence" >&5 +echo $ECHO_N "checking mdds/flat_segment_tree.hpp presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +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: mdds/flat_segment_tree.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: present but cannot be compiled" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for mdds/flat_segment_tree.hpp" >&5 +echo $ECHO_N "checking for mdds/flat_segment_tree.hpp... $ECHO_C" >&6 +if test "${ac_cv_header_mdds_flat_segment_tree_hpp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_mdds_flat_segment_tree_hpp=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_mdds_flat_segment_tree_hpp" >&5 +echo "${ECHO_T}$ac_cv_header_mdds_flat_segment_tree_hpp" >&6 + +fi +if test $ac_cv_header_mdds_flat_segment_tree_hpp = yes; then + : +else + { { echo "$as_me:$LINENO: error: mdds/flat_segment_tree.hpp not found. install mdds" >&5 +echo "$as_me: error: mdds/flat_segment_tree.hpp not found. install mdds" >&2;} + { (exit 1); exit 1; }; } +fi + + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +else + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 + BUILD_TYPE="$BUILD_TYPE MDDS" + SYSTEM_MDDS=NO +fi + + +echo "$as_me:$LINENO: checking which boost to use" >&5 +echo $ECHO_N "checking which boost to use... $ECHO_C" >&6 +if test -n "$with_system_boost" -o -n "$with_system_headers" && \ + test "$with_system_boost" != "no"; then + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 + SYSTEM_BOOST=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 - ac_fn_cxx_check_header_mongrel "$LINENO" "mdds/flat_segment_tree.hpp" "ac_cv_header_mdds_flat_segment_tree_hpp" "$ac_includes_default" -if test "x$ac_cv_header_mdds_flat_segment_tree_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 - as_fn_error $? "mdds/flat_segment_tree.hpp not found. install mdds" "$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_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 +# 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_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 -$as_echo "internal" >&6; } - BUILD_TYPE="$BUILD_TYPE MDDS" - SYSTEM_MDDS=NO + { { echo "$as_me:$LINENO: error: boost/spirit/include/classic_core.hpp not found. install boost >= 1.36" >&5 +echo "$as_me: error: boost/spirit/include/classic_core.hpp not found. install boost >= 1.36" >&2;} + { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which boost to use" >&5 -$as_echo_n "checking which boost to use... " >&6; } -if test -n "$with_system_boost" -o -n "$with_system_headers" && \ - test "$with_system_boost" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } - SYSTEM_BOOST=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 + 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_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 : +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/shared_ptr.hpp not found. install boost" "$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/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 : - +# 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 - as_fn_error $? "boost/spirit/include/classic_core.hpp not found. install boost >= 1.36" "$LINENO" 5 + 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 - - 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 : - +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 @@ -14297,18 +17267,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 @@ -14318,31 +17314,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; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 BUILD_TYPE="$BUILD_TYPE BOOST" SYSTEM_BOOST=NO fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which vigra to use" >&5 -$as_echo_n "checking which vigra to use... " >&6; } +echo "$as_me:$LINENO: checking which vigra to use" >&5 +echo $ECHO_N "checking which vigra to use... $ECHO_C" >&6 if test -n "$with_system_vigra" -o -n "$with_system_headers" && \ test "$with_system_vigra" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_VIGRA=YES - ac_ext=cpp + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - 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 : + 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 +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 @@ -14353,150 +17487,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 @@ -14504,48 +17945,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 @@ -14553,12 +18025,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 @@ -14567,16 +18041,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 @@ -14591,8 +18065,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 @@ -14600,10 +18074,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 [\\/]* | ?:[\\/]*) @@ -14615,30 +18089,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 @@ -14649,25 +18122,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="" @@ -14698,10 +18171,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 [\\/]* | ?:[\\/]*) @@ -14713,30 +18186,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 @@ -14747,25 +18219,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="" @@ -14786,7 +18258,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 @@ -14801,10 +18275,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 [\\/]* | ?:[\\/]*) @@ -14816,30 +18290,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 @@ -14850,25 +18323,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="" @@ -14889,7 +18362,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`" @@ -14901,10 +18376,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 [\\/]* | ?:[\\/]*) @@ -14916,30 +18391,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 @@ -14950,25 +18424,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="" @@ -14989,7 +18463,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 @@ -15001,10 +18477,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 [\\/]* | ?:[\\/]*) @@ -15016,30 +18492,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 @@ -15050,25 +18525,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="" @@ -15103,10 +18578,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 [\\/]* | ?:[\\/]*) @@ -15118,30 +18593,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 @@ -15152,25 +18626,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="" @@ -15191,7 +18665,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` @@ -15209,43 +18685,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 @@ -15253,9 +18758,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" @@ -15264,16 +18773,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 @@ -15284,48 +18797,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 @@ -15342,55 +18855,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 @@ -15398,11 +18919,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 @@ -15412,59 +18935,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 [\\/]* | ?:[\\/]*) @@ -15476,30 +19005,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 @@ -15510,25 +19038,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="" @@ -15547,10 +19075,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 @@ -15560,10 +19090,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 [\\/]* | ?:[\\/]*) @@ -15575,30 +19105,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 @@ -15609,25 +19138,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="" @@ -15652,7 +19181,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 @@ -15664,10 +19195,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 [\\/]* | ?:[\\/]*) @@ -15679,30 +19210,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 @@ -15713,25 +19243,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="" @@ -15756,7 +19286,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 @@ -15764,10 +19296,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 [\\/]* | ?:[\\/]*) @@ -15779,30 +19311,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 @@ -15813,25 +19344,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="" @@ -15856,7 +19387,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 @@ -15865,10 +19398,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 [\\/]* | ?:[\\/]*) @@ -15880,30 +19413,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 @@ -15914,25 +19446,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="" @@ -15957,7 +19489,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 @@ -15965,10 +19499,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 [\\/]* | ?:[\\/]*) @@ -15980,30 +19514,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 @@ -16014,25 +19547,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="" @@ -16057,7 +19590,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 @@ -16077,55 +19612,219 @@ 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.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -16134,10 +19833,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Extract the first word of "genbrk", so it can be a program name with args. set dummy genbrk; ac_word=$2 -{ $as_echo "$as_me:${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 [\\/]* | ?:[\\/]*) @@ -16150,38 +19849,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 [\\/]* | ?:[\\/]*) @@ -16194,38 +19894,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 [\\/]* | ?:[\\/]*) @@ -16238,39 +19939,40 @@ 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 # Extract the first word of "icu-config", so it can be a program name with args. set dummy icu-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ICUCONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_ICUCONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ICUCONFIG in [\\/]* | ?:[\\/]*) @@ -16282,46 +19984,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_ICUCONFIG="$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 ICUCONFIG=$ac_cv_path_ICUCONFIG + if test -n "$ICUCONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICUCONFIG" >&5 -$as_echo "$ICUCONFIG" >&6; } + echo "$as_me:$LINENO: result: $ICUCONFIG" >&5 +echo "${ECHO_T}$ICUCONFIG" >&6 else - { $as_echo "$as_me:${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 ICU version" >&5 -$as_echo_n "checking ICU version... " >&6; } + echo "$as_me:$LINENO: checking ICU version" >&5 +echo $ECHO_N "checking ICU version... $ECHO_C" >&6 ICU_VERSION=`$ICUCONFIG --version` ICU_MAJOR=`$ICUCONFIG --version | cut -d"." -f1` ICU_MINOR=`$ICUCONFIG --version | cut -d"." -f2` ICU_MICRO=`$ICUCONFIG --version | cut -d"." -f3` if test "$ICU_MAJOR" -ge "4"; then - { $as_echo "$as_me:${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 suitable, only >= 4.0 supported currently" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: not suitable, only >= 4.0 supported currently" >&5 +echo "$as_me: error: not suitable, only >= 4.0 supported currently" >&2;} + { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:${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 @@ -16334,18 +20037,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 @@ -16353,10 +20056,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 [\\/]* | ?:[\\/]*) @@ -16368,30 +20071,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 @@ -16402,25 +20104,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="" @@ -16441,18 +20143,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 @@ -16462,13 +20166,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 @@ -16476,7 +20182,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 @@ -16488,47 +20196,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 - # 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 +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. + 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 @@ -16536,41 +20241,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 @@ -16590,24 +20291,48 @@ ac_x_header_dirs=' /usr/openwin/share/include' if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Xlib.h. + # Guess where to find include files, by looking for Intrinsic.h. # First, try using that file with no special directory specified. - cat 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 _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 + if test -r "$ac_dir/X11/Intrinsic.h"; then ac_x_includes=$ac_dir break fi done fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then @@ -16615,76 +20340,102 @@ if test "$ac_x_libraries" = no; then # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS - LIBS="-lX11 $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + LIBS="-lXt $LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include int main () { -XrmInitialize () +XtMalloc (0) ; 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 @@ -16697,12 +20448,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 @@ -16713,13 +20468,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 @@ -16730,21 +20520,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. @@ -16758,206 +20575,432 @@ 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 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 () +{ +dnet_ntoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dnet_stub_dnet_ntoa=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_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 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, + # to get the SysV transport functions. + # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) + # needs -lnsl. + # The nsl library prevents programs from opening the X display + # on Irix 5.2, according to T.E. Dickey. + # The functions gethostbyname, getservbyname, and inet_addr are + # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. + echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 +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 GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC +/* 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 -extern "C" +} #endif -char dnet_ntoa (); + int main () { -return dnet_ntoa (); +return f != gethostbyname; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dnet_stub_dnet_ntoa=yes +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 - ac_cv_lib_dnet_stub_dnet_ntoa=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_dnet_stub_dnet_ntoa" >&5 -$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then : - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - fi +ac_cv_func_gethostbyname=no fi -rm -f core 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, - # to get the SysV transport functions. - # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) - # needs -lnsl. - # The nsl library prevents programs from opening the X display - # 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 : - +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 @@ -16971,147 +21014,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 @@ -17127,43 +21512,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 @@ -17180,92 +21593,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 @@ -17297,76 +21772,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 + { { 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 + 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 - as_fn_error $? "Xt include headers not found" "$LINENO" 5 -fi - -done + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - 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 : +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 @@ -17374,7 +21978,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 @@ -17384,23 +21990,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 @@ -17411,89 +22160,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 @@ -17501,20 +22432,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" @@ -17523,10 +22456,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 [\\/]* | ?:[\\/]*) @@ -17538,30 +22471,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 @@ -17572,25 +22504,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="" @@ -17615,52 +22547,219 @@ $as_echo "$XRANDR_LIBS" >&6; } fi 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 : + 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 + +# 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 + 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/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 @@ -17668,51 +22767,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 [\\/]* | ?:[\\/]*) @@ -17724,30 +22825,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 @@ -17758,25 +22858,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.26.0" >&5 -$as_echo_n "checking for neon >= 0.26.0... " >&6; } + echo "$as_me:$LINENO: checking for neon >= 0.26.0" >&5 +echo $ECHO_N "checking for neon >= 0.26.0... $ECHO_C" >&6 if $PKG_CONFIG --exists "neon >= 0.26.0" ; then - { $as_echo "$as_me:${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.26.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.26.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="" @@ -17797,15 +22897,17 @@ $as_echo "$NEON_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_error $? "you need neon >= 0.26.x for system-neon" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: you need neon >= 0.26.x for system-neon" >&5 +echo "$as_me: error: you need neon >= 0.26.x for system-neon" >&2;} + { (exit 1); exit 1; }; } fi 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= @@ -17820,12 +22922,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 @@ -17838,10 +22940,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 [\\/]* | ?:[\\/]*) @@ -17853,30 +22955,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 @@ -17887,25 +22988,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="" @@ -17926,14 +23027,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 @@ -17941,33 +23044,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 [\\/]* | ?:[\\/]*) @@ -17979,30 +23082,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 @@ -18013,25 +23115,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="" @@ -18052,11 +23154,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 @@ -18068,21 +23172,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" @@ -18091,12 +23197,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 @@ -18104,10 +23210,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 [\\/]* | ?:[\\/]*) @@ -18119,30 +23225,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 @@ -18153,25 +23258,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="" @@ -18192,12 +23297,14 @@ $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 @@ -18205,14 +23312,14 @@ 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' @@ -18224,10 +23331,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 [\\/]* | ?:[\\/]*) @@ -18239,30 +23346,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 @@ -18273,25 +23379,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="" @@ -18303,29 +23409,303 @@ $as_echo "$HUNSPELL_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 + HUNSPELL_PC="TRUE" + else + HUNSPELL_PC="" + fi + + if test "$HUNSPELL_PC" != "TRUE"; then + if test "${ac_cv_header_hunspell_hxx+set}" = set; then + echo "$as_me:$LINENO: checking for hunspell.hxx" >&5 +echo $ECHO_N "checking for hunspell.hxx... $ECHO_C" >&6 +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 - if test $succeeded = yes; then - HUNSPELL_PC="TRUE" +# 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 - HUNSPELL_PC="" + 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 "$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 : + 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 @@ -18333,37 +23713,66 @@ fi 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 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 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_hunspell_main=yes else - ac_cv_lib_hunspell_main=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_hunspell_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_hunspell_main" >&5 -$as_echo "$ac_cv_lib_hunspell_main" >&6; } -if test "x$ac_cv_lib_hunspell_main" = x""yes; then : +echo "$as_me:$LINENO: result: $ac_cv_lib_hunspell_main" >&5 +echo "${ECHO_T}$ac_cv_lib_hunspell_main" >&6 +if test $ac_cv_lib_hunspell_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBHUNSPELL 1 _ACEOF @@ -18371,7 +23780,9 @@ _ACEOF LIBS="-lhunspell $LIBS" else - as_fn_error $? "hunspell library not found." "$LINENO" 5 + { { 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 @@ -18383,8 +23794,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_HUNSPELL=NO BUILD_TYPE="$BUILD_TYPE HUNSPELL" fi @@ -18392,175 +23803,506 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which altlinuxhyph to use" >&5 -$as_echo_n "checking which altlinuxhyph to use... " >&6; } +echo "$as_me:$LINENO: checking which altlinuxhyph to use" >&5 +echo $ECHO_N "checking which altlinuxhyph to use... $ECHO_C" >&6 if test -n "$with_system_altlinuxhyph" -o -n "$with_system_libs" && \ test "$with_system_altlinuxhyph" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}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 : + 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 - as_fn_error $? "altlinuxhyph headers not found." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: altlinuxhyph headers not found." >&5 +echo "$as_me: error: altlinuxhyph headers not found." >&2;} + { (exit 1); exit 1; }; } 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 : + 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 + 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 (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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_member_struct__HyphenDict_cset=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +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_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' @@ -18572,10 +24314,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 [\\/]* | ?:[\\/]*) @@ -18587,30 +24329,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 @@ -18621,25 +24362,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 mythes" >&5 -$as_echo_n "checking for mythes... " >&6; } + echo "$as_me:$LINENO: checking for mythes" >&5 +echo $ECHO_N "checking for mythes... $ECHO_C" >&6 if $PKG_CONFIG --exists "mythes" ; then - { $as_echo "$as_me:${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 MYTHES_CFLAGS" >&5 -$as_echo_n "checking MYTHES_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking MYTHES_CFLAGS" >&5 +echo $ECHO_N "checking MYTHES_CFLAGS... $ECHO_C" >&6 MYTHES_CFLAGS=`$PKG_CONFIG --cflags "mythes"` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYTHES_CFLAGS" >&5 -$as_echo "$MYTHES_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $MYTHES_CFLAGS" >&5 +echo "${ECHO_T}$MYTHES_CFLAGS" >&6 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking MYTHES_LIBS" >&5 -$as_echo_n "checking MYTHES_LIBS... " >&6; } + echo "$as_me:$LINENO: checking MYTHES_LIBS" >&5 +echo $ECHO_N "checking MYTHES_LIBS... $ECHO_C" >&6 MYTHES_LIBS=`$PKG_CONFIG --libs "mythes"` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYTHES_LIBS" >&5 -$as_echo "$MYTHES_LIBS" >&6; } + echo "$as_me:$LINENO: result: $MYTHES_LIBS" >&5 +echo "${ECHO_T}$MYTHES_LIBS" >&6 else MYTHES_CFLAGS="" MYTHES_LIBS="" @@ -18664,45 +24405,212 @@ $as_echo "$MYTHES_LIBS" >&6; } fi if test "$MYTHES_PKGCONFIG" = "no"; then - ac_fn_cxx_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_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 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_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: 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-1.2" >&5 -$as_echo_n "checking for main in -lmythes-1.2... " >&6; } -if test "${ac_cv_lib_mythes_1_2_main+set}" = set; then : - $as_echo_n "(cached) " >&6 + +echo "$as_me:$LINENO: checking for main in -lmythes-1.2" >&5 +echo $ECHO_N "checking for main in -lmythes-1.2... $ECHO_C" >&6 +if test "${ac_cv_lib_mythes_1_2_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmythes-1.2 $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_mythes_1_2_main=yes else - ac_cv_lib_mythes_1_2_main=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_mythes_1_2_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_1_2_main" >&5 -$as_echo "$ac_cv_lib_mythes_1_2_main" >&6; } -if test "x$ac_cv_lib_mythes_1_2_main" = x""yes; then : +echo "$as_me:$LINENO: result: $ac_cv_lib_mythes_1_2_main" >&5 +echo "${ECHO_T}$ac_cv_lib_mythes_1_2_main" >&6 +if test $ac_cv_lib_mythes_1_2_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBMYTHES_1_2 1 _ACEOF @@ -18714,37 +24622,65 @@ else fi if test "$MYTHES_FOUND" = "no"; then - { $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_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_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 MYTHES_FOUND=yes else MYTHES_FOUND=no @@ -18752,7 +24688,9 @@ fi fi if test "$MYTHES_FOUND" = "no"; then - 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 fi ac_ext=c @@ -18762,68 +24700,235 @@ 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_MYTHES=NO BUILD_TYPE="$BUILD_TYPE MYTHES" fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which lpsolve to use" >&5 -$as_echo_n "checking which lpsolve to use... " >&6; } -if test -n "$with_system_lpsolve" -o -n "$with_system_libs" && \ - test "$with_system_lpsolve" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "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 : - + +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 + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 + SYSTEM_LPSOLVE=YES + if test "${ac_cv_header_lpsolve_lp_lib_h+set}" = set; then + 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 # some systems need this. Like Ubuntu.... - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for floor in -lm" >&5 -$as_echo_n "checking for floor in -lm... " >&6; } -if test "${ac_cv_lib_m_floor+set}" = set; then : - $as_echo_n "(cached) " >&6 + +echo "$as_me:$LINENO: checking for floor in -lm" >&5 +echo $ECHO_N "checking for floor in -lm... $ECHO_C" >&6 +if test "${ac_cv_lib_m_floor+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $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 floor (); int main () { -return floor (); +floor (); ; 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_m_floor=yes else - ac_cv_lib_m_floor=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_m_floor=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_m_floor" >&5 -$as_echo "$ac_cv_lib_m_floor" >&6; } -if test "x$ac_cv_lib_m_floor" = x""yes; then : +echo "$as_me:$LINENO: result: $ac_cv_lib_m_floor" >&5 +echo "${ECHO_T}$ac_cv_lib_m_floor" >&6 +if test $ac_cv_lib_m_floor = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF @@ -18832,43 +24937,72 @@ _ACEOF fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 + +echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $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 dlopen (); int main () { -return dlopen (); +dlopen (); ; 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_dl_dlopen=yes else - ac_cv_lib_dl_dlopen=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dl_dlopen=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_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF @@ -18877,43 +25011,72 @@ _ACEOF 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 @@ -18921,68 +25084,237 @@ _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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which libtextcat to use" >&5 -$as_echo_n "checking which libtextcat to use... " >&6; } +echo "$as_me:$LINENO: checking which libtextcat to use" >&5 +echo $ECHO_N "checking which libtextcat to use... $ECHO_C" >&6 if test -n "$with_system_libtextcat" && test "$with_system_libtextcat" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_LIBTEXTCAT=YES - ac_fn_c_check_header_mongrel "$LINENO" "libtextcat/textcat.h" "ac_cv_header_libtextcat_textcat_h" "$ac_includes_default" -if test "x$ac_cv_header_libtextcat_textcat_h" = x""yes; then : + if test "${ac_cv_header_libtextcat_textcat_h+set}" = set; then + echo "$as_me:$LINENO: checking for libtextcat/textcat.h" >&5 +echo $ECHO_N "checking for libtextcat/textcat.h... $ECHO_C" >&6 +if test "${ac_cv_header_libtextcat_textcat_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_libtextcat_textcat_h" >&5 +echo "${ECHO_T}$ac_cv_header_libtextcat_textcat_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking libtextcat/textcat.h usability" >&5 +echo $ECHO_N "checking libtextcat/textcat.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +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 libtextcat/textcat.h presence" >&5 +echo $ECHO_N "checking libtextcat/textcat.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: libtextcat/textcat.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for libtextcat/textcat.h" >&5 +echo $ECHO_N "checking for libtextcat/textcat.h... $ECHO_C" >&6 +if test "${ac_cv_header_libtextcat_textcat_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_libtextcat_textcat_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_libtextcat_textcat_h" >&5 +echo "${ECHO_T}$ac_cv_header_libtextcat_textcat_h" >&6 + +fi +if test $ac_cv_header_libtextcat_textcat_h = yes; then + : else - as_fn_error $? "libtextcat headers not found." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: libtextcat headers not found." >&5 +echo "$as_me: error: libtextcat headers not found." >&2;} + { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special_textcat_Init in -ltextcat" >&5 -$as_echo_n "checking for special_textcat_Init in -ltextcat... " >&6; } -if test "${ac_cv_lib_textcat_special_textcat_Init+set}" = set; then : - $as_echo_n "(cached) " >&6 + +echo "$as_me:$LINENO: checking for special_textcat_Init in -ltextcat" >&5 +echo $ECHO_N "checking for special_textcat_Init in -ltextcat... $ECHO_C" >&6 +if test "${ac_cv_lib_textcat_special_textcat_Init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltextcat $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 special_textcat_Init (); int main () { -return special_textcat_Init (); +special_textcat_Init (); ; 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_textcat_special_textcat_Init=yes else - ac_cv_lib_textcat_special_textcat_Init=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_textcat_special_textcat_Init=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_textcat_special_textcat_Init" >&5 -$as_echo "$ac_cv_lib_textcat_special_textcat_Init" >&6; } -if test "x$ac_cv_lib_textcat_special_textcat_Init" = x""yes; then : +echo "$as_me:$LINENO: result: $ac_cv_lib_textcat_special_textcat_Init" >&5 +echo "${ECHO_T}$ac_cv_lib_textcat_special_textcat_Init" >&6 +if test $ac_cv_lib_textcat_special_textcat_Init = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBTEXTCAT 1 _ACEOF @@ -18990,94 +25322,217 @@ _ACEOF LIBS="-ltextcat $LIBS" else - as_fn_error $? "libtextcat library not found or not suitable. libtextcat typically needs to be patched" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: libtextcat library not found or not suitable. libtextcat typically needs to be patched" >&5 +echo "$as_me: error: libtextcat library not found or not suitable. libtextcat typically needs to be patched" >&2;} + { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_LIBTEXTCAT=NO BUILD_TYPE="$BUILD_TYPE LIBTEXTCAT" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which libtextcat data directory to use" >&5 -$as_echo_n "checking which libtextcat data directory to use... " >&6; } +echo "$as_me:$LINENO: checking which libtextcat data directory to use" >&5 +echo $ECHO_N "checking which libtextcat data directory to use... $ECHO_C" >&6 if test -n "$with_system_libtextcat_data" && test "$with_system_libtextcat_data" != "no"; then if test "$with_system_libtextcat_data" = "yes"; then SYSTEM_LIBTEXTCAT_DATA=file:///usr/share/libtextcat else SYSTEM_LIBTEXTCAT_DATA=file://$with_system_libtextcat_data fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSTEM_LIBTEXTCAT_DATA" >&5 -$as_echo "$SYSTEM_LIBTEXTCAT_DATA" >&6; } + echo "$as_me:$LINENO: result: $SYSTEM_LIBTEXTCAT_DATA" >&5 +echo "${ECHO_T}$SYSTEM_LIBTEXTCAT_DATA" >&6 else - { $as_echo "$as_me:${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 LIBTEXTCATDATA" 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" != "WNT"; then - for ac_func in getopt -do : - ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt" -if test "x$ac_cv_func_getopt" = x""yes; then : + +for ac_func in getopt +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +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 HAVE_GETOPT 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF HAVE_GETOPT=YES else @@ -19085,12 +25540,103 @@ else fi done - for ac_func in readdir_r -do : - ac_fn_c_check_func "$LINENO" "readdir_r" "ac_cv_func_readdir_r" -if test "x$ac_cv_func_readdir_r" = x""yes; then : + +for ac_func in readdir_r +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +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 HAVE_READDIR_R 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF HAVE_READDIR_R=YES else @@ -19111,8 +25657,8 @@ 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` @@ -19133,12 +25679,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" \) \ @@ -19154,36 +25707,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"` @@ -19215,15 +25773,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 @@ -19231,14 +25791,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 [\\/]* | ?:[\\/]*) @@ -19250,29 +25810,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 @@ -19287,24 +25846,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 [\\/]* | ?:[\\/]*) @@ -19316,56 +25875,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 [\\/]* | ?:[\\/]*) @@ -19377,38 +25939,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 [\\/]* | ?:[\\/]*) @@ -19420,31 +25983,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 @@ -19454,17 +26018,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 fi @@ -19474,10 +26042,10 @@ if test -z "$with_gnu_cp"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${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 [\\/]* | ?:[\\/]*) @@ -19489,60 +26057,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_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 from coreutils with preserve= support" >&5 -$as_echo_n "checking whether $GNUCP is GNU cp from coreutils with preserve= support... " >&6; } +echo "$as_me:$LINENO: checking whether $GNUCP is GNU cp from coreutils with preserve= support" >&5 +echo $ECHO_N "checking whether $GNUCP is GNU cp from coreutils with preserve= support... $ECHO_C" >&6 if $GNUCP --version 2>/dev/null | grep "coreutils" >/dev/null 2>/dev/null; then - { $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 GNUCP='' fi if test -z "$GNUCP"; then if test "$_os" = "SunOS" -o "$_os" = "FreeBSD"; then - as_fn_error $? "no, GNU cp from coreutils is needed. install or specify with --with-gnu-cp=/path/to/it" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: no, GNU cp from coreutils is needed. install or specify with --with-gnu-cp=/path/to/it" >&5 +echo "$as_me: error: no, GNU cp from coreutils is needed. install or specify with --with-gnu-cp=/path/to/it" >&2;} + { (exit 1); exit 1; }; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GNU cp from coreutils found - using the system's cp command" >&5 -$as_echo "no GNU cp from coreutils found - using the system's cp command" >&6; } + echo "$as_me:$LINENO: result: no GNU cp from coreutils found - using the system's cp command" >&5 +echo "${ECHO_T}no GNU cp from coreutils found - using the system's cp command" >&6 fi fi @@ -19553,10 +26126,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 [\\/]* | ?:[\\/]*) @@ -19568,29 +26141,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 @@ -19599,18 +26171,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 [\\/]* | ?:[\\/]*) @@ -19622,43 +26194,44 @@ 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" fi fi - { $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 else with_asm_home="NO_ASM_HOME" fi @@ -19678,10 +26251,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 [\\/]* | ?:[\\/]*) @@ -19693,35 +26266,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 [\\/]* | ?:[\\/]*) @@ -19733,69 +26305,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 @@ -19803,21 +26390,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: +." >&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: -." "$LINENO" 5 +." >&2;} + { (exit 1); exit 1; }; } fi fi @@ -19827,11 +26421,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` @@ -19840,21 +26434,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" @@ -19877,31 +26477,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 [\\/]* | ?:[\\/]*) @@ -19913,30 +26513,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 @@ -19947,25 +26546,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="" @@ -19986,33 +26585,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 [\\/]* | ?:[\\/]*) @@ -20024,30 +26625,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 @@ -20058,25 +26658,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="" @@ -20097,7 +26697,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 @@ -20107,10 +26709,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 [\\/]* | ?:[\\/]*) @@ -20122,30 +26724,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 @@ -20156,25 +26757,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="" @@ -20195,13 +26796,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 @@ -20219,10 +26822,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 [\\/]* | ?:[\\/]*) @@ -20234,30 +26837,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 @@ -20268,25 +26870,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="" @@ -20307,7 +26909,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" @@ -20317,22 +26921,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 [\\/]* | ?:[\\/]*) @@ -20344,30 +26948,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 @@ -20378,25 +26981,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="" @@ -20417,33 +27020,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 [\\/]* | ?:[\\/]*) @@ -20455,30 +27062,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 @@ -20489,25 +27095,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="" @@ -20528,12 +27134,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 @@ -20551,8 +27159,8 @@ GSTREAMER_LIBS="" ENABLE_GSTREAMER="" if test "$test_gstreamer" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the GStreamer media backend" >&5 -$as_echo_n "checking whether to build the GStreamer media backend... " >&6; } + echo "$as_me:$LINENO: checking whether to build the GStreamer media backend" >&5 +echo $ECHO_N "checking whether to build the GStreamer media backend... $ECHO_C" >&6 if test "x$enable_gstreamer" != "xno" ; then succeeded=no @@ -20560,10 +27168,10 @@ $as_echo_n "checking whether to build the GStreamer media backend... " >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${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 [\\/]* | ?:[\\/]*) @@ -20575,30 +27183,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 @@ -20609,25 +27216,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 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 " >&5 -$as_echo_n "checking for gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 ... " >&6; } + echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 " >&5 +echo $ECHO_N "checking for gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 ... $ECHO_C" >&6 if $PKG_CONFIG --exists "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 " ; then - { $as_echo "$as_me:${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 GSTREAMER_CFLAGS" >&5 -$as_echo_n "checking GSTREAMER_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking GSTREAMER_CFLAGS" >&5 +echo $ECHO_N "checking GSTREAMER_CFLAGS... $ECHO_C" >&6 GSTREAMER_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 "` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSTREAMER_CFLAGS" >&5 -$as_echo "$GSTREAMER_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $GSTREAMER_CFLAGS" >&5 +echo "${ECHO_T}$GSTREAMER_CFLAGS" >&6 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking GSTREAMER_LIBS" >&5 -$as_echo_n "checking GSTREAMER_LIBS... " >&6; } + echo "$as_me:$LINENO: checking GSTREAMER_LIBS" >&5 +echo $ECHO_N "checking GSTREAMER_LIBS... $ECHO_C" >&6 GSTREAMER_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 "` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSTREAMER_LIBS" >&5 -$as_echo "$GSTREAMER_LIBS" >&6; } + echo "$as_me:$LINENO: result: $GSTREAMER_LIBS" >&5 +echo "${ECHO_T}$GSTREAMER_LIBS" >&6 else GSTREAMER_CFLAGS="" GSTREAMER_LIBS="" @@ -20648,15 +27255,17 @@ $as_echo "$GSTREAMER_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_error $? "requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" >&5 +echo "$as_me: error: requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" >&2;} + { (exit 1); exit 1; }; } fi ENABLE_GSTREAMER="TRUE" - { $as_echo "$as_me:${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 @@ -20671,18 +27280,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 @@ -20691,10 +27300,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 [\\/]* | ?:[\\/]*) @@ -20706,30 +27315,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 @@ -20740,25 +27348,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="" @@ -20779,22 +27387,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 @@ -20808,28 +27425,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 @@ -20840,52 +27472,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 @@ -20893,40 +27692,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 @@ -20934,69 +27764,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 @@ -21004,10 +27836,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 [\\/]* | ?:[\\/]*) @@ -21019,30 +27851,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 @@ -21053,25 +27884,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="" @@ -21092,26 +27923,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 @@ -21120,75 +27955,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -21196,92 +28038,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -21290,70 +28143,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -21362,70 +28224,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -21434,70 +28305,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -21506,70 +28386,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -21578,70 +28467,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -21650,70 +28548,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -21722,70 +28629,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -21794,70 +28710,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -21866,71 +28791,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -21939,49 +28873,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -22002,52 +28941,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 @@ -22056,70 +29001,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -22128,70 +29082,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -22200,71 +29163,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -22273,34 +29245,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -22352,8 +29327,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 @@ -22361,15 +29336,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 @@ -22377,19 +29355,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 [\\/]* | ?:[\\/]*) @@ -22402,37 +29383,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 @@ -22440,15 +29423,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 @@ -22456,11 +29442,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" @@ -22500,8 +29489,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 @@ -22510,14 +29499,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 @@ -22526,19 +29517,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 [\\/]* | ?:[\\/]*) @@ -22551,37 +29544,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 @@ -22589,14 +29584,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 @@ -22605,10 +29602,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" @@ -22618,34 +29617,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 [\\/]* | ?:[\\/]*) @@ -22657,30 +29656,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 @@ -22691,25 +29689,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="" @@ -22730,25 +29728,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' @@ -22756,15 +29756,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 @@ -22775,16 +29780,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' @@ -22794,67 +29814,67 @@ 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 BUILD_TYPE="$BUILD_TYPE AFMS" 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 @@ -22862,13 +29882,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 @@ -22898,13 +29918,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 @@ -22915,43 +30073,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 @@ -22959,177 +30146,196 @@ _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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build own version of librsvg" >&5 -$as_echo_n "checking whether to build own version of librsvg... " >&6; } +echo "$as_me:$LINENO: checking whether to build own version of librsvg" >&5 +echo $ECHO_N "checking whether to build own version of librsvg... $ECHO_C" >&6 case "$_os" in WINNT*) # Windows SYSTEM_LIBRSVG=NO - { $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 ;; Darwin*) SYSTEM_LIBRSVG=NO - { $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_LIBRSVG=YES - { $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 ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build own version of gdk-pixbuf" >&5 -$as_echo_n "checking whether to build own version of gdk-pixbuf... " >&6; } +echo "$as_me:$LINENO: checking whether to build own version of gdk-pixbuf" >&5 +echo $ECHO_N "checking whether to build own version of gdk-pixbuf... $ECHO_C" >&6 case "$_os" in WINNT*) # Windows SYSTEM_GDKPIXBUF=NO - { $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 ;; Darwin*) SYSTEM_GDKPIXBUF=NO - { $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_GDKPIXBUF=YES - { $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 ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build own version of glib" >&5 -$as_echo_n "checking whether to build own version of glib... " >&6; } +echo "$as_me:$LINENO: checking whether to build own version of glib" >&5 +echo $ECHO_N "checking whether to build own version of glib... $ECHO_C" >&6 case "$_os" in WINNT*) # Windows SYSTEM_GLIB=NO - { $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 ;; Darwin*) SYSTEM_GLIB=NO - { $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_GLIB=YES - { $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 ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build own version of gettext" >&5 -$as_echo_n "checking whether to build own version of gettext... " >&6; } +echo "$as_me:$LINENO: checking whether to build own version of gettext" >&5 +echo $ECHO_N "checking whether to build own version of gettext... $ECHO_C" >&6 case "$_os" in WINNT*) # Windows SYSTEM_GETTEXT=NO - { $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 ;; Darwin*) SYSTEM_GETTEXT=NO - { $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_GETTEXT=YES - { $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 ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build own version of libcroco" >&5 -$as_echo_n "checking whether to build own version of libcroco... " >&6; } +echo "$as_me:$LINENO: checking whether to build own version of libcroco" >&5 +echo $ECHO_N "checking whether to build own version of libcroco... $ECHO_C" >&6 case "$_os" in WINNT*) # Windows SYSTEM_LIBCROCO=NO - { $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 ;; Darwin*) SYSTEM_LIBCROCO=NO - { $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_LIBCROCO=YES - { $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 ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build own version of pango" >&5 -$as_echo_n "checking whether to build own version of pango... " >&6; } +echo "$as_me:$LINENO: checking whether to build own version of pango" >&5 +echo $ECHO_N "checking whether to build own version of pango... $ECHO_C" >&6 case "$_os" in WINNT*) # Windows SYSTEM_PANGO=NO - { $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 ;; Darwin*) SYSTEM_PANGO=NO - { $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_PANGO=YES - { $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 + ;; +esac + + +echo "$as_me:$LINENO: checking whether to build own version of libgsf" >&5 +echo $ECHO_N "checking whether to build own version of libgsf... $ECHO_C" >&6 + +case "$_os" in + WINNT*) # Windows + SYSTEM_LIBGSF=NO + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + *) + SYSTEM_LIBGSF=YES + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build own version of libpng" >&5 -$as_echo_n "checking whether to build own version of libpng... " >&6; } +echo "$as_me:$LINENO: checking whether to build own version of libpng" >&5 +echo $ECHO_N "checking whether to build own version of libpng... $ECHO_C" >&6 case "$_os" in WINNT*) # Windows SYSTEM_LIBPNG=NO - { $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 ;; Darwin*) SYSTEM_LIBPNG=NO - { $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_LIBPNG=YES - { $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 ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build own version of libjpeg" >&5 -$as_echo_n "checking whether to build own version of libjpeg... " >&6; } +echo "$as_me:$LINENO: checking whether to build own version of libjpeg" >&5 +echo $ECHO_N "checking whether to build own version of libjpeg... $ECHO_C" >&6 if test "$SYSTEM_JPEG" == "YES"; then SYSTEM_LIBJPEG=YES @@ -23137,28 +30343,28 @@ else case "$_os" in WINNT*) # Windows SYSTEM_LIBJPEG=NO - { $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 ;; Darwin*) SYSTEM_LIBJPEG=NO - { $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_LIBJPEG=YES - { $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 ;; esac fi if test "$SYSTEM_LIBJPEG" == "YES"; 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 fi @@ -23172,10 +30378,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 [\\/]* | ?:[\\/]*) @@ -23187,29 +30393,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 @@ -23221,10 +30426,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 [\\/]* | ?:[\\/]*) @@ -23237,29 +30442,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 @@ -23268,7 +30472,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 @@ -23286,8 +30492,8 @@ else export ANT_HOME 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) { @@ -23311,14 +30517,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 @@ -23331,8 +30537,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 @@ -23345,8 +30551,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 @@ -23362,14 +30568,16 @@ $as_echo_n "checking Ant lib directory... " >&6; } if test -f $ANT_HOME/lib/ant/ant.jar; then ANT_LIB="$ANT_HOME/lib/ant" else - as_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 @@ -23381,8 +30589,8 @@ if test "$ENABLE_MEDIAWIKI" = "YES"; then 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` @@ -23390,18 +30598,20 @@ echo "configure: ant_version $ant_version " >&5 echo "configure: ant_version_major $ant_version_major " >&5 echo "configure: ant_version_minor $ant_version_minor " >&5 if test "$ant_version_major" -ge "2"; then - { $as_echo "$as_me:${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 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 @@ -23433,29 +30643,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 @@ -23471,184 +30683,188 @@ $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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable dependency tracking" >&5 -$as_echo_n "checking whether to enable dependency tracking... " >&6; } +echo "$as_me:$LINENO: checking whether to enable dependency tracking" >&5 +echo $ECHO_N "checking whether to enable dependency tracking... $ECHO_C" >&6 if test "$enable_dependency_tracking" = "no"; then nodep=TRUE - { $as_echo "$as_me:${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 fi @@ -23659,20 +30875,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 @@ -23681,8 +30899,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 @@ -23701,59 +30918,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 @@ -23762,55 +30959,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= -U= 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 @@ -23818,15 +31023,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. @@ -23836,252 +31038,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' + alias -g '${1+"$@"}'='"$@"' +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 STATUS 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=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 +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: $2" >&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' @@ -24089,123 +31120,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'" @@ -24214,20 +31270,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.67. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -24235,117 +31302,124 @@ generated by GNU Autoconf 2.67. 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.67, - 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) 2010 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=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - 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"` ;; - '') as_fn_error $? "missing file argument" ;; - 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 @@ -24359,45 +31433,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 @@ -24407,411 +31467,707 @@ 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 sole $(srcdir), -# ${srcdir} and @srcdir@ entries 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[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -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,@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,@VALGRIND_CFLAGS@,$VALGRIND_CFLAGS,;t t +s,@PAM@,$PAM,;t t +s,@NEW_SHADOW_API@,$NEW_SHADOW_API,;t t +s,@PAM_LINK@,$PAM_LINK,;t t +s,@CRYPT_LINK@,$CRYPT_LINK,;t t +s,@GXX_INCLUDE_PATH@,$GXX_INCLUDE_PATH,;t t +s,@MINGW_LIB_INCLUDE_PATH@,$MINGW_LIB_INCLUDE_PATH,;t t +s,@MINGW_BACKWARD_INCLUDE_PATH@,$MINGW_BACKWARD_INCLUDE_PATH,;t t +s,@MINGW_CLIB_DIR@,$MINGW_CLIB_DIR,;t t +s,@MINGW_SHARED_GCCLIB@,$MINGW_SHARED_GCCLIB,;t t +s,@MINGW_GCCLIB_EH@,$MINGW_GCCLIB_EH,;t t +s,@MINGW_SHARED_GXXLIB@,$MINGW_SHARED_GXXLIB,;t t +s,@MINGW_SHARED_LIBSTDCPP@,$MINGW_SHARED_LIBSTDCPP,;t t +s,@MINGW_GCCDLL@,$MINGW_GCCDLL,;t t +s,@MINGW_GXXDLL@,$MINGW_GXXDLL,;t t +s,@EXCEPTIONS@,$EXCEPTIONS,;t t +s,@STLPORT4@,$STLPORT4,;t t +s,@STLPORT_VER@,$STLPORT_VER,;t t +s,@USE_SYSTEM_STL@,$USE_SYSTEM_STL,;t t +s,@USE_CCACHE@,$USE_CCACHE,;t t +s,@CCACHE@,$CCACHE,;t t +s,@HAVE_GCC_VISIBILITY_FEATURE@,$HAVE_GCC_VISIBILITY_FEATURE,;t t +s,@ALLOC@,$ALLOC,;t t +s,@BUILD_VER_STRING@,$BUILD_VER_STRING,;t t +s,@SOLAR_JAVA@,$SOLAR_JAVA,;t t +s,@JAVAINTERPRETER@,$JAVAINTERPRETER,;t t +s,@JAVACOMPILER@,$JAVACOMPILER,;t t +s,@JAVACISGCJ@,$JAVACISGCJ,;t t +s,@JAVADOC@,$JAVADOC,;t t +s,@AWTLIB@,$AWTLIB,;t t +s,@JAVAAOTCOMPILER@,$JAVAAOTCOMPILER,;t t +s,@JAVA_HOME@,$JAVA_HOME,;t t +s,@JDK@,$JDK,;t t +s,@JAVAFLAGS@,$JAVAFLAGS,;t t +s,@JAVAIFLAGS@,$JAVAIFLAGS,;t t +s,@DMAKE@,$DMAKE,;t t +s,@BUILD_DMAKE@,$BUILD_DMAKE,;t t +s,@EPM@,$EPM,;t t +s,@DPKG@,$DPKG,;t t +s,@PKGMK@,$PKGMK,;t t +s,@BUILD_EPM@,$BUILD_EPM,;t t +s,@RPM@,$RPM,;t t +s,@PKGFORMAT@,$PKGFORMAT,;t t +s,@GPERF@,$GPERF,;t t +s,@BUILD_STAX@,$BUILD_STAX,;t t +s,@MINGWCXX@,$MINGWCXX,;t t +s,@ac_ct_MINGWCXX@,$ac_ct_MINGWCXX,;t t +s,@MINGWSTRIP@,$MINGWSTRIP,;t t +s,@ac_ct_MINGWSTRIP@,$ac_ct_MINGWSTRIP,;t t +s,@BUILD_UNOWINREG@,$BUILD_UNOWINREG,;t t +s,@SYSTEM_STDLIBS@,$SYSTEM_STDLIBS,;t t +s,@SYSTEM_ZLIB@,$SYSTEM_ZLIB,;t t +s,@SYSTEM_JPEG@,$SYSTEM_JPEG,;t t +s,@SYSTEM_EXPAT@,$SYSTEM_EXPAT,;t t +s,@PKG_CONFIG@,$PKG_CONFIG,;t t +s,@LIBWPD_CFLAGS@,$LIBWPD_CFLAGS,;t t +s,@LIBWPD_LIBS@,$LIBWPD_LIBS,;t t +s,@SYSTEM_LIBWPD@,$SYSTEM_LIBWPD,;t t +s,@CPPUNIT_CFLAGS@,$CPPUNIT_CFLAGS,;t t +s,@CPPUNIT_LIBS@,$CPPUNIT_LIBS,;t t +s,@SYSTEM_CPPUNIT@,$SYSTEM_CPPUNIT,;t t +s,@FREETYPE_CFLAGS@,$FREETYPE_CFLAGS,;t t +s,@FREETYPE_LIBS@,$FREETYPE_LIBS,;t t +s,@USE_FT_EMBOLDEN@,$USE_FT_EMBOLDEN,;t t +s,@LIBXSLT_CFLAGS@,$LIBXSLT_CFLAGS,;t t +s,@LIBXSLT_LIBS@,$LIBXSLT_LIBS,;t t +s,@XSLTPROC@,$XSLTPROC,;t t +s,@SYSTEM_LIBXSLT@,$SYSTEM_LIBXSLT,;t t +s,@LIBXML_CFLAGS@,$LIBXML_CFLAGS,;t t +s,@LIBXML_LIBS@,$LIBXML_LIBS,;t t +s,@SYSTEM_LIBXML@,$SYSTEM_LIBXML,;t t +s,@PYTHON@,$PYTHON,;t t +s,@PYTHON_VERSION@,$PYTHON_VERSION,;t t +s,@PYTHON_PREFIX@,$PYTHON_PREFIX,;t t +s,@PYTHON_EXEC_PREFIX@,$PYTHON_EXEC_PREFIX,;t t +s,@PYTHON_PLATFORM@,$PYTHON_PLATFORM,;t t +s,@pythondir@,$pythondir,;t t +s,@pkgpythondir@,$pkgpythondir,;t t +s,@pyexecdir@,$pyexecdir,;t t +s,@pkgpyexecdir@,$pkgpyexecdir,;t t +s,@BZIP2@,$BZIP2,;t t +s,@SYSTEM_PYTHON@,$SYSTEM_PYTHON,;t t +s,@PYTHON_CFLAGS@,$PYTHON_CFLAGS,;t t +s,@PYTHON_LIBS@,$PYTHON_LIBS,;t t +s,@HOME@,$HOME,;t t +s,@SYSTEM_DB@,$SYSTEM_DB,;t t +s,@DB_VERSION@,$DB_VERSION,;t t +s,@DB_INCLUDES@,$DB_INCLUDES,;t t +s,@DB_JAR@,$DB_JAR,;t t +s,@SYSTEM_LUCENE@,$SYSTEM_LUCENE,;t t +s,@LUCENE_CORE_JAR@,$LUCENE_CORE_JAR,;t t +s,@LUCENE_ANALYZERS_JAR@,$LUCENE_ANALYZERS_JAR,;t t +s,@ENABLE_MYSQLC@,$ENABLE_MYSQLC,;t t +s,@MYSQLCONFIG@,$MYSQLCONFIG,;t t +s,@SYSTEM_MYSQL@,$SYSTEM_MYSQL,;t t +s,@MYSQL_INC@,$MYSQL_INC,;t t +s,@MYSQL_LIB@,$MYSQL_LIB,;t t +s,@MYSQL_DEFINES@,$MYSQL_DEFINES,;t t +s,@LIBMYSQL_PATH@,$LIBMYSQL_PATH,;t t +s,@SYSTEM_MYSQL_CPPCONN@,$SYSTEM_MYSQL_CPPCONN,;t t +s,@SYSTEM_HSQLDB@,$SYSTEM_HSQLDB,;t t +s,@HSQLDB_JAR@,$HSQLDB_JAR,;t t +s,@SYSTEM_BSH@,$SYSTEM_BSH,;t t +s,@BSH_JAR@,$BSH_JAR,;t t +s,@SERIALIZER_JAR@,$SERIALIZER_JAR,;t t +s,@SYSTEM_SAXON@,$SYSTEM_SAXON,;t t +s,@SAXON_JAR@,$SAXON_JAR,;t t +s,@CURLCONFIG@,$CURLCONFIG,;t t +s,@SYSTEM_CURL@,$SYSTEM_CURL,;t t +s,@CURL_CFLAGS@,$CURL_CFLAGS,;t t +s,@CURL_LIBS@,$CURL_LIBS,;t t +s,@SYSTEM_MDDS@,$SYSTEM_MDDS,;t t +s,@SYSTEM_BOOST@,$SYSTEM_BOOST,;t t +s,@SYSTEM_VIGRA@,$SYSTEM_VIGRA,;t t +s,@SYSTEM_ODBC_HEADERS@,$SYSTEM_ODBC_HEADERS,;t t +s,@WITH_MOZILLA@,$WITH_MOZILLA,;t t +s,@WITH_LDAP@,$WITH_LDAP,;t t +s,@WITH_OPENLDAP@,$WITH_OPENLDAP,;t t +s,@MOZ_NSS_CFLAGS@,$MOZ_NSS_CFLAGS,;t t +s,@MOZ_NSS_LIBS@,$MOZ_NSS_LIBS,;t t +s,@NSS_LIB@,$NSS_LIB,;t t +s,@MOZ_NSPR_CFLAGS@,$MOZ_NSPR_CFLAGS,;t t +s,@MOZ_NSPR_LIBS@,$MOZ_NSPR_LIBS,;t t +s,@NSPR_LIB@,$NSPR_LIB,;t t +s,@MOZILLAXPCOM_CFLAGS@,$MOZILLAXPCOM_CFLAGS,;t t +s,@MOZILLAXPCOM_LIBS@,$MOZILLAXPCOM_LIBS,;t t +s,@MOZILLA_VERSION@,$MOZILLA_VERSION,;t t +s,@MOZILLA_TOOLKIT@,$MOZILLA_TOOLKIT,;t t +s,@MOZGTK2_CFLAGS@,$MOZGTK2_CFLAGS,;t t +s,@MOZGTK2_LIBS@,$MOZGTK2_LIBS,;t t +s,@MOZLIBREQ_CFLAGS@,$MOZLIBREQ_CFLAGS,;t t +s,@MOZLIBREQ_LIBS@,$MOZLIBREQ_LIBS,;t t +s,@BUILD_MOZAB@,$BUILD_MOZAB,;t t +s,@ENABLE_NSS_MODULE@,$ENABLE_NSS_MODULE,;t t +s,@MOZILLABUILD@,$MOZILLABUILD,;t t +s,@SYSTEM_MOZILLA@,$SYSTEM_MOZILLA,;t t +s,@MOZ_FLAVOUR@,$MOZ_FLAVOUR,;t t +s,@MOZ_INC@,$MOZ_INC,;t t +s,@MOZ_LIB@,$MOZ_LIB,;t t +s,@MOZ_LIB_XPCOM@,$MOZ_LIB_XPCOM,;t t +s,@MOZ_LDAP_CFLAGS@,$MOZ_LDAP_CFLAGS,;t t +s,@SYSTEM_SANE_HEADER@,$SYSTEM_SANE_HEADER,;t t +s,@SYSTEM_GENBRK@,$SYSTEM_GENBRK,;t t +s,@SYSTEM_GENCCODE@,$SYSTEM_GENCCODE,;t t +s,@SYSTEM_GENCMN@,$SYSTEM_GENCMN,;t t +s,@ICUCONFIG@,$ICUCONFIG,;t t +s,@SYSTEM_ICU@,$SYSTEM_ICU,;t t +s,@ICU_MAJOR@,$ICU_MAJOR,;t t +s,@ICU_MINOR@,$ICU_MINOR,;t t +s,@ICU_MICRO@,$ICU_MICRO,;t t +s,@GRAPHITE_CFLAGS@,$GRAPHITE_CFLAGS,;t t +s,@GRAPHITE_LIBS@,$GRAPHITE_LIBS,;t t +s,@ENABLE_GRAPHITE@,$ENABLE_GRAPHITE,;t t +s,@SYSTEM_GRAPHITE@,$SYSTEM_GRAPHITE,;t t +s,@X_CFLAGS@,$X_CFLAGS,;t t +s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t +s,@X_LIBS@,$X_LIBS,;t t +s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t +s,@XINC@,$XINC,;t t +s,@XLIB@,$XLIB,;t t +s,@XAU_LIBS@,$XAU_LIBS,;t t +s,@DISABLE_XAW@,$DISABLE_XAW,;t t +s,@SYSTEM_XRENDER_HEADERS@,$SYSTEM_XRENDER_HEADERS,;t t +s,@XRENDER_LINK@,$XRENDER_LINK,;t t +s,@XRANDR_CFLAGS@,$XRANDR_CFLAGS,;t t +s,@XRANDR_LIBS@,$XRANDR_LIBS,;t t +s,@XRANDR_DLOPEN@,$XRANDR_DLOPEN,;t t +s,@ENABLE_RANDR@,$ENABLE_RANDR,;t t +s,@DISABLE_NEON@,$DISABLE_NEON,;t t +s,@NEON_CFLAGS@,$NEON_CFLAGS,;t t +s,@NEON_LIBS@,$NEON_LIBS,;t t +s,@SYSTEM_NEON@,$SYSTEM_NEON,;t t +s,@NEON_VERSION@,$NEON_VERSION,;t t +s,@OPENSSL_CFLAGS@,$OPENSSL_CFLAGS,;t t +s,@OPENSSL_LIBS@,$OPENSSL_LIBS,;t t +s,@SYSTEM_OPENSSL@,$SYSTEM_OPENSSL,;t t +s,@ENABLE_AGG@,$ENABLE_AGG,;t t +s,@AGG_CFLAGS@,$AGG_CFLAGS,;t t +s,@AGG_LIBS@,$AGG_LIBS,;t t +s,@SYSTEM_AGG@,$SYSTEM_AGG,;t t +s,@AGG_VERSION@,$AGG_VERSION,;t t +s,@REDLAND_CFLAGS@,$REDLAND_CFLAGS,;t t +s,@REDLAND_LIBS@,$REDLAND_LIBS,;t t +s,@SYSTEM_REDLAND@,$SYSTEM_REDLAND,;t t +s,@HUNSPELL_CFLAGS@,$HUNSPELL_CFLAGS,;t t +s,@HUNSPELL_LIBS@,$HUNSPELL_LIBS,;t t +s,@SYSTEM_HUNSPELL@,$SYSTEM_HUNSPELL,;t t +s,@SYSTEM_HYPH@,$SYSTEM_HYPH,;t t +s,@HYPHEN_LIB@,$HYPHEN_LIB,;t t +s,@MYTHES_CFLAGS@,$MYTHES_CFLAGS,;t t +s,@MYTHES_LIBS@,$MYTHES_LIBS,;t t +s,@SYSTEM_MYTHES@,$SYSTEM_MYTHES,;t t +s,@SYSTEM_LPSOLVE@,$SYSTEM_LPSOLVE,;t t +s,@SYSTEM_LIBTEXTCAT@,$SYSTEM_LIBTEXTCAT,;t t +s,@SYSTEM_LIBTEXTCAT_DATA@,$SYSTEM_LIBTEXTCAT_DATA,;t t +s,@HAVE_GETOPT@,$HAVE_GETOPT,;t t +s,@HAVE_READDIR_R@,$HAVE_READDIR_R,;t t +s,@SYSTEM_LIBC@,$SYSTEM_LIBC,;t t +s,@PSDK_HOME@,$PSDK_HOME,;t t +s,@WINDOWS_VISTA_PSDK@,$WINDOWS_VISTA_PSDK,;t t +s,@DIRECTXSDK_HOME@,$DIRECTXSDK_HOME,;t t +s,@DIRECTXSDK_LIB@,$DIRECTXSDK_LIB,;t t +s,@NSIS_PATH@,$NSIS_PATH,;t t +s,@BISON@,$BISON,;t t +s,@FLEX@,$FLEX,;t t +s,@PATCH@,$PATCH,;t t +s,@GNUCP@,$GNUCP,;t t +s,@GNUPATCH@,$GNUPATCH,;t t +s,@CYGWIN_PATH@,$CYGWIN_PATH,;t t +s,@ML_EXE@,$ML_EXE,;t t +s,@ASM_HOME@,$ASM_HOME,;t t +s,@ZIP@,$ZIP,;t t +s,@UNZIP@,$UNZIP,;t t +s,@ZIP_HOME@,$ZIP_HOME,;t t +s,@ENABLE_GTK@,$ENABLE_GTK,;t t +s,@ENABLE_KDE@,$ENABLE_KDE,;t t +s,@ENABLE_KDE4@,$ENABLE_KDE4,;t t +s,@GCONF_CFLAGS@,$GCONF_CFLAGS,;t t +s,@GCONF_LIBS@,$GCONF_LIBS,;t t +s,@ENABLE_GCONF@,$ENABLE_GCONF,;t t +s,@GNOMEVFS_CFLAGS@,$GNOMEVFS_CFLAGS,;t t +s,@GNOMEVFS_LIBS@,$GNOMEVFS_LIBS,;t t +s,@ENABLE_GNOMEVFS@,$ENABLE_GNOMEVFS,;t t +s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t +s,@GTK_LIBS@,$GTK_LIBS,;t t +s,@DBUS_CFLAGS@,$DBUS_CFLAGS,;t t +s,@DBUS_LIBS@,$DBUS_LIBS,;t t +s,@GIO_CFLAGS@,$GIO_CFLAGS,;t t +s,@GIO_LIBS@,$GIO_LIBS,;t t +s,@ENABLE_GIO@,$ENABLE_GIO,;t t +s,@ENABLE_DBUS@,$ENABLE_DBUS,;t t +s,@ENABLE_SYSTRAY_GTK@,$ENABLE_SYSTRAY_GTK,;t t +s,@GSTREAMER_CFLAGS@,$GSTREAMER_CFLAGS,;t t +s,@GSTREAMER_LIBS@,$GSTREAMER_LIBS,;t t +s,@ENABLE_GSTREAMER@,$ENABLE_GSTREAMER,;t t +s,@CAIRO_CFLAGS@,$CAIRO_CFLAGS,;t t +s,@CAIRO_LIBS@,$CAIRO_LIBS,;t t +s,@ENABLE_CAIRO@,$ENABLE_CAIRO,;t t +s,@BUILD_PIXMAN@,$BUILD_PIXMAN,;t t +s,@SYSTEM_CAIRO@,$SYSTEM_CAIRO,;t t +s,@ENABLE_OPENGL@,$ENABLE_OPENGL,;t t +s,@ENABLE_PRESENTER_EXTRA_UI@,$ENABLE_PRESENTER_EXTRA_UI,;t t +s,@ENABLE_MINIMIZER@,$ENABLE_MINIMIZER,;t t +s,@ENABLE_PRESENTER_SCREEN@,$ENABLE_PRESENTER_SCREEN,;t t +s,@POPPLER_CFLAGS@,$POPPLER_CFLAGS,;t t +s,@POPPLER_LIBS@,$POPPLER_LIBS,;t t +s,@ENABLE_PDFIMPORT@,$ENABLE_PDFIMPORT,;t t +s,@SYSTEM_POPPLER@,$SYSTEM_POPPLER,;t t +s,@ENABLE_MEDIAWIKI@,$ENABLE_MEDIAWIKI,;t t +s,@SYSTEM_SERVLETAPI@,$SYSTEM_SERVLETAPI,;t t +s,@SERVLETAPI_JAR@,$SERVLETAPI_JAR,;t t +s,@ENABLE_REPORTBUILDER@,$ENABLE_REPORTBUILDER,;t t +s,@SYSTEM_JFREEREPORT@,$SYSTEM_JFREEREPORT,;t t +s,@SAC_JAR@,$SAC_JAR,;t t +s,@LIBXML_JAR@,$LIBXML_JAR,;t t +s,@FLUTE_JAR@,$FLUTE_JAR,;t t +s,@JFREEREPORT_JAR@,$JFREEREPORT_JAR,;t t +s,@LIBBASE_JAR@,$LIBBASE_JAR,;t t +s,@LIBLAYOUT_JAR@,$LIBLAYOUT_JAR,;t t +s,@LIBLOADER_JAR@,$LIBLOADER_JAR,;t t +s,@LIBFORMULA_JAR@,$LIBFORMULA_JAR,;t t +s,@LIBREPOSITORY_JAR@,$LIBREPOSITORY_JAR,;t t +s,@LIBFONTS_JAR@,$LIBFONTS_JAR,;t t +s,@LIBSERIALIZER_JAR@,$LIBSERIALIZER_JAR,;t t +s,@SYSTEM_APACHE_COMMONS@,$SYSTEM_APACHE_COMMONS,;t t +s,@COMMONS_CODEC_JAR@,$COMMONS_CODEC_JAR,;t t +s,@COMMONS_LANG_JAR@,$COMMONS_LANG_JAR,;t t +s,@COMMONS_HTTPCLIENT_JAR@,$COMMONS_HTTPCLIENT_JAR,;t t +s,@COMMONS_LOGGING_JAR@,$COMMONS_LOGGING_JAR,;t t +s,@MOC@,$MOC,;t t +s,@KDE_CFLAGS@,$KDE_CFLAGS,;t t +s,@KDE_LIBS@,$KDE_LIBS,;t t +s,@MOC4@,$MOC4,;t t +s,@KDE4_CFLAGS@,$KDE4_CFLAGS,;t t +s,@KDE4_LIBS@,$KDE4_LIBS,;t t +s,@ENABLE_LOCKDOWN@,$ENABLE_LOCKDOWN,;t t +s,@GOBJECT_CFLAGS@,$GOBJECT_CFLAGS,;t t +s,@GOBJECT_LIBS@,$GOBJECT_LIBS,;t t +s,@ENABLE_EVOAB2@,$ENABLE_EVOAB2,;t t +s,@ENABLE_KAB@,$ENABLE_KAB,;t t +s,@WITH_FONTS@,$WITH_FONTS,;t t +s,@WITHOUT_PPDS@,$WITHOUT_PPDS,;t t +s,@WITHOUT_AFMS@,$WITHOUT_AFMS,;t t +s,@SCPDEFS@,$SCPDEFS,;t t +s,@USE_XINERAMA@,$USE_XINERAMA,;t t +s,@XINERAMA_LINK@,$XINERAMA_LINK,;t t +s,@SYSTEM_LIBRSVG@,$SYSTEM_LIBRSVG,;t t +s,@SYSTEM_GDKPIXBUF@,$SYSTEM_GDKPIXBUF,;t t +s,@SYSTEM_GLIB@,$SYSTEM_GLIB,;t t +s,@SYSTEM_GETTEXT@,$SYSTEM_GETTEXT,;t t +s,@SYSTEM_LIBCROCO@,$SYSTEM_LIBCROCO,;t t +s,@SYSTEM_PANGO@,$SYSTEM_PANGO,;t t +s,@SYSTEM_LIBGSF@,$SYSTEM_LIBGSF,;t t +s,@SYSTEM_LIBPNG@,$SYSTEM_LIBPNG,;t t +s,@SYSTEM_LIBJPEG@,$SYSTEM_LIBJPEG,;t t +s,@ANT@,$ANT,;t t +s,@ANT_HOME@,$ANT_HOME,;t t +s,@ANT_LIB@,$ANT_LIB,;t t +s,@OOO_JUNIT_JAR@,$OOO_JUNIT_JAR,;t t +s,@WITH_LANG@,$WITH_LANG,;t t +s,@WITH_POOR_HELP_LOCALIZATIONS@,$WITH_POOR_HELP_LOCALIZATIONS,;t t +s,@WITH_DICT@,$WITH_DICT,;t t +s,@INTRO_BITMAPS@,$INTRO_BITMAPS,;t t +s,@ABOUT_BITMAPS@,$ABOUT_BITMAPS,;t t +s,@OOO_VENDOR@,$OOO_VENDOR,;t t +s,@UNIXWRAPPERNAME@,$UNIXWRAPPERNAME,;t t +s,@ENABLE_STATIC_GTK@,$ENABLE_STATIC_GTK,;t t +s,@ENABLE_LAYOUT@,$ENABLE_LAYOUT,;t t +s,@VERBOSE@,$VERBOSE,;t t +s,@nodep@,$nodep,;t t +s,@LOCAL_SOLVER@,$LOCAL_SOLVER,;t t +s,@BUILD_TYPE@,$BUILD_TYPE,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF - 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 1 "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. @@ -24831,11 +32187,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 1 -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 diff --git a/configure.in b/configure.in index d82c8aec2201..502a03cf270f 100644 --- a/configure.in +++ b/configure.in @@ -6800,7 +6800,7 @@ case "$_os" in AC_MSG_RESULT([yes]) ;; *) - SYSTEM_PANGO=YES + SYSTEM_LIBGSF=YES AC_MSG_RESULT([no]) ;; esac -- cgit v1.2.3 From 11677258cbcd4985c7fde0742b5663f4b7b56cf2 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 29 Mar 2011 15:21:29 +0200 Subject: masterfix DEV300: windows make depend --- solenv/gbuild/platform/windows.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) mode change 100755 => 100644 solenv/gbuild/platform/windows.mk diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk old mode 100755 new mode 100644 index 5371ebf9d954..5c5b2a060070 --- a/solenv/gbuild/platform/windows.mk +++ b/solenv/gbuild/platform/windows.mk @@ -242,7 +242,7 @@ $(call gb_Helper_abbreviate_dirs_native,\ $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ $(filter-out -DPRECOMPILED_HEADERS,$(4)) $(5) \ -I$(dir $(3)) \ - $(filter-out -I$(COMPATH)% %/pch -I$(JAVA_HOME),$(6)) \ + $(filter-out -I$(COMPATH)% %/pch -I$(JAVA_HOME)%,$(6)) \ $(3) \ -f - \ | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ @@ -281,7 +281,7 @@ $(call gb_Helper_abbreviate_dirs_native,\ $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ $(filter-out -DPRECOMPILED_HEADERS,$(4)) $(5) \ -I$(dir $(3)) \ - $(filter-out -I$(COMPATH)% %/pch -I$(JAVA_HOME),$(6)) \ + $(filter-out -I$(COMPATH)% %/pch -I$(JAVA_HOME)%,$(6)) \ $(3) \ -f - \ | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ @@ -323,7 +323,7 @@ $(call gb_Helper_abbreviate_dirs_native,\ $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ $(4) $(5) \ -I$(dir $(3)) \ - $(filter-out -I$(COMPATH)% -I$(JAVA_HOME),$(6)) \ + $(filter-out -I$(COMPATH)% -I$(JAVA_HOME)%,$(6)) \ $(3) \ -f - \ | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ @@ -364,7 +364,7 @@ $(call gb_Helper_abbreviate_dirs_native,\ $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ $(4) $(5) \ -I$(dir $(3)) \ - $(filter-out -I$(COMPATH)% -I$(JAVA_HOME),$(6)) \ + $(filter-out -I$(COMPATH)% -I$(JAVA_HOME)%,$(6)) \ $(3) \ -f - \ | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ -- cgit v1.2.3 From 96198071f8a75ac34c49e0f8186d22df03da1ca5 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 29 Mar 2011 16:48:23 +0200 Subject: masterfix DEV300: skip .hg subdirs --- l10ntools/source/srciter.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/l10ntools/source/srciter.cxx b/l10ntools/source/srciter.cxx index 0c5071fca053..3434d4c39c55 100644 --- a/l10ntools/source/srciter.cxx +++ b/l10ntools/source/srciter.cxx @@ -70,6 +70,7 @@ void SourceTreeIterator::ExecuteDirectory( transex::Directory& aDirectory ) static rtl::OUString WCARD5 ( rtl::OUString::createFromAscii( "unxmac" ) ); static rtl::OUString WCARD6 ( rtl::OUString::createFromAscii( "unxubt" ) ); static rtl::OUString WCARD7 ( rtl::OUString::createFromAscii( ".svn" ) ); + static rtl::OUString WCARD8 ( rtl::OUString::createFromAscii( ".hg" ) ); if( sDirName.indexOf( WCARD1 , 0 ) > -1 || @@ -78,7 +79,8 @@ void SourceTreeIterator::ExecuteDirectory( transex::Directory& aDirectory ) sDirName.indexOf( WCARD4 , 0 ) > -1 || sDirName.indexOf( WCARD5 , 0 ) > -1 || sDirName.indexOf( WCARD6 , 0 ) > -1 || - sDirName.indexOf( WCARD7 , 0 ) > -1 + sDirName.indexOf( WCARD7 , 0 ) > -1 || + sDirName.indexOf( WCARD8 , 0 ) > -1 ) return; //printf("**** %s \n", OUStringToOString( sDirName , RTL_TEXTENCODING_UTF8 , sDirName.getLength() ).getStr() ); -- cgit v1.2.3 From cbf182a975dd170aa4997677ac3516ade4cb30a7 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 29 Mar 2011 16:56:17 +0200 Subject: masterfix DEV300: add turkmen lang support --- solenv/bin/modules/installer/globals.pm | 3 ++- solenv/inc/langlist.mk | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm index 4bc8964901b9..066e13dcf6d4 100644 --- a/solenv/bin/modules/installer/globals.pm +++ b/solenv/bin/modules/installer/globals.pm @@ -94,7 +94,8 @@ BEGIN "fur", "ny", "so", - "kab" + "kab", + "tk" ); @items_at_modules = ("Files", "Dirs", "Unixlinks"); @asianlanguages = ("ja", "ko", "zh-CN", "zh-TW"); diff --git a/solenv/inc/langlist.mk b/solenv/inc/langlist.mk index bbc5d3bd4b45..bbf940e77406 100644 --- a/solenv/inc/langlist.mk +++ b/solenv/inc/langlist.mk @@ -150,6 +150,7 @@ tlh \ th \ tn \ tr \ +tk \ ts \ tg \ ug \ -- cgit v1.2.3 From e314cd3d84337a3db67ec1a3807201ed1b2eb050 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 29 Mar 2011 16:56:17 +0200 Subject: masterfix DEV300: add turkmen lang support --- setup_native/source/win32/msi-encodinglist.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/setup_native/source/win32/msi-encodinglist.txt b/setup_native/source/win32/msi-encodinglist.txt index ebc8effbbc4e..7fbc27bfe1a8 100644 --- a/setup_native/source/win32/msi-encodinglist.txt +++ b/setup_native/source/win32/msi-encodinglist.txt @@ -131,6 +131,7 @@ ti-ER 0 1139 tn 0 1074 # Setsuana tr 1254 1055 # Turkish ts 0 1073 # Tsonga +tk 0 1090 tt 1251 1092 # Tatar ug 0 2200 uk 1251 1058 # Ukrainian -- cgit v1.2.3 From 453af5af1e26ba56d878a31c189f63418c430ae8 Mon Sep 17 00:00:00 2001 From: Release Engineering Date: Tue, 29 Mar 2011 20:26:59 +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 7cd8c89ac8f3..89c11311ca3d 100644 --- a/solenv/inc/minor.mk +++ b/solenv/inc/minor.mk @@ -1,5 +1,5 @@ RSCVERSION=300 -RSCREVISION=300m104(Build:9579) -BUILD=9579 -LAST_MINOR=m104 +RSCREVISION=300m105(Build:9581) +BUILD=9581 +LAST_MINOR=m105 SOURCEVERSION=DEV300 -- cgit v1.2.3 From 87987da3c23ed88f2cf86908842ff1a5933fb7b8 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Wed, 30 Mar 2011 15:41:12 +0200 Subject: masterfix DEV300: #i10000# removeing moved code --- svtools/source/filter.vcl/jpeg/jpeg.cxx | 777 -------------------------------- svtools/source/filter.vcl/jpeg/jpegc.c | 284 ------------ 2 files changed, 1061 deletions(-) delete mode 100644 svtools/source/filter.vcl/jpeg/jpeg.cxx delete mode 100644 svtools/source/filter.vcl/jpeg/jpegc.c diff --git a/svtools/source/filter.vcl/jpeg/jpeg.cxx b/svtools/source/filter.vcl/jpeg/jpeg.cxx deleted file mode 100644 index da1edf8449e4..000000000000 --- a/svtools/source/filter.vcl/jpeg/jpeg.cxx +++ /dev/null @@ -1,777 +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_svtools.hxx" - -#include - -extern "C" -{ - #include "stdio.h" - #include "jpeg.h" - #include "jpeg/jpeglib.h" - #include "jpeg/jerror.h" -} - -#define _JPEGPRIVATE -#include -#include "jpeg.hxx" -#include -#include - -// ----------- -// - Defines - -// ----------- - -using namespace ::com::sun::star; - -#define JPEGMINREAD 512 - -// ------------- -// - (C-Calls) - -// ------------- - -// ------------------------------------------------------------------------ - -extern "C" void* CreateBitmap( void* pJPEGReader, void* pJPEGCreateBitmapParam ) -{ - return ( (JPEGReader*) pJPEGReader )->CreateBitmap( pJPEGCreateBitmapParam ); -} - -// ------------------------------------------------------------------------ - -extern "C" void* GetScanline( void* pJPEGWriter, long nY ) -{ - return ( (JPEGWriter*) pJPEGWriter )->GetScanline( nY ); -} - -// ------------------------------------------------------------------------ - -struct JPEGCallbackStruct -{ - uno::Reference< task::XStatusIndicator > xStatusIndicator; -}; - -extern "C" long JPEGCallback( void* pCallbackData, long nPercent ) -{ - JPEGCallbackStruct* pS = (JPEGCallbackStruct*)pCallbackData; - if ( pS && pS->xStatusIndicator.is() ) - { - pS->xStatusIndicator->setValue( nPercent ); - } - return 0L; -} - -#define BUF_SIZE 4096 - -typedef struct -{ - struct jpeg_destination_mgr pub; /* public fields */ - - SvStream* outfile; /* target stream */ - JOCTET * buffer; /* start of buffer */ -} my_destination_mgr; - -typedef my_destination_mgr * my_dest_ptr; - -extern "C" void init_destination (j_compress_ptr cinfo) -{ - my_dest_ptr dest = (my_dest_ptr) cinfo->dest; - - /* Allocate the output buffer --- it will be released when done with image */ - dest->buffer = (JOCTET *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - BUF_SIZE * sizeof(JOCTET)); - - dest->pub.next_output_byte = dest->buffer; - dest->pub.free_in_buffer = BUF_SIZE; -} - -extern "C" int empty_output_buffer (j_compress_ptr cinfo) -{ - my_dest_ptr dest = (my_dest_ptr) cinfo->dest; - - if (dest->outfile->Write(dest->buffer, BUF_SIZE) != - (size_t) BUF_SIZE) - ERREXIT(cinfo, JERR_FILE_WRITE); - - dest->pub.next_output_byte = dest->buffer; - dest->pub.free_in_buffer = BUF_SIZE; - - return sal_True; -} - -extern "C" void term_destination (j_compress_ptr cinfo) -{ - my_dest_ptr dest = (my_dest_ptr) cinfo->dest; - size_t datacount = BUF_SIZE - dest->pub.free_in_buffer; - - /* Write any data remaining in the buffer */ - if (datacount > 0) { - if (dest->outfile->Write(dest->buffer, datacount) != datacount) - ERREXIT(cinfo, JERR_FILE_WRITE); - } -} - -extern "C" void jpeg_svstream_dest (j_compress_ptr cinfo, void* out) -{ - SvStream * outfile = (SvStream*)out; - my_dest_ptr dest; - - /* The destination object is made permanent so that multiple JPEG images - * can be written to the same file without re-executing jpeg_svstream_dest. - * This makes it dangerous to use this manager and a different destination - * manager serially with the same JPEG object, because their private object - * sizes may be different. Caveat programmer. - */ - if (cinfo->dest == NULL) { /* first time for this JPEG object? */ - cinfo->dest = (struct jpeg_destination_mgr *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - sizeof(my_destination_mgr)); - } - - dest = (my_dest_ptr) cinfo->dest; - dest->pub.init_destination = init_destination; - dest->pub.empty_output_buffer = empty_output_buffer; - dest->pub.term_destination = term_destination; - dest->outfile = outfile; -} - -/* Expanded data source object for stdio input */ - -typedef struct { - struct jpeg_source_mgr pub; /* public fields */ - - SvStream * infile; /* source stream */ - JOCTET * buffer; /* start of buffer */ - boolean start_of_file; /* have we gotten any data yet? */ -} my_source_mgr; - -typedef my_source_mgr * my_src_ptr; - -/* - * Initialize source --- called by jpeg_read_header - * before any data is actually read. - */ - -extern "C" void init_source (j_decompress_ptr cinfo) -{ - my_src_ptr src = (my_src_ptr) cinfo->src; - - /* We reset the empty-input-file flag for each image, - * but we don't clear the input buffer. - * This is correct behavior for reading a series of images from one source. - */ - src->start_of_file = sal_True; -} - -long StreamRead( SvStream* pSvStm, void* pBuffer, long nBufferSize ) -{ - long nRead; - - if( pSvStm->GetError() != ERRCODE_IO_PENDING ) - { - long nActPos = pSvStm->Tell(); - - nRead = (long) pSvStm->Read( pBuffer, nBufferSize ); - - if( pSvStm->GetError() == ERRCODE_IO_PENDING ) - { - nRead = 0; - - // Damit wir wieder an die alte Position - // seeken koennen, setzen wir den Error temp.zurueck - pSvStm->ResetError(); - pSvStm->Seek( nActPos ); - pSvStm->SetError( ERRCODE_IO_PENDING ); - } - } - else - nRead = 0; - - return nRead; -} - -extern "C" int fill_input_buffer (j_decompress_ptr cinfo) -{ - my_src_ptr src = (my_src_ptr) cinfo->src; - size_t nbytes; - - nbytes = StreamRead(src->infile, src->buffer, BUF_SIZE); - - if (nbytes <= 0) { - if (src->start_of_file) /* Treat empty input file as fatal error */ - ERREXIT(cinfo, JERR_INPUT_EMPTY); - WARNMS(cinfo, JWRN_JPEG_EOF); - /* Insert a fake EOI marker */ - src->buffer[0] = (JOCTET) 0xFF; - src->buffer[1] = (JOCTET) JPEG_EOI; - nbytes = 2; - } - - src->pub.next_input_byte = src->buffer; - src->pub.bytes_in_buffer = nbytes; - src->start_of_file = sal_False; - - return sal_True; -} - -extern "C" void skip_input_data (j_decompress_ptr cinfo, long num_bytes) -{ - my_src_ptr src = (my_src_ptr) cinfo->src; - - /* Just a dumb implementation for now. Could use fseek() except - * it doesn't work on pipes. Not clear that being smart is worth - * any trouble anyway --- large skips are infrequent. - */ - if (num_bytes > 0) { - while (num_bytes > (long) src->pub.bytes_in_buffer) { - num_bytes -= (long) src->pub.bytes_in_buffer; - (void) fill_input_buffer(cinfo); - /* note we assume that fill_input_buffer will never return sal_False, - * so suspension need not be handled. - */ - } - src->pub.next_input_byte += (size_t) num_bytes; - src->pub.bytes_in_buffer -= (size_t) num_bytes; - } -} - -extern "C" void term_source (j_decompress_ptr) -{ - /* no work necessary here */ -} - -extern "C" void jpeg_svstream_src (j_decompress_ptr cinfo, void * in) -{ - my_src_ptr src; - SvStream * infile = (SvStream*)in; - - /* The source object and input buffer are made permanent so that a series - * of JPEG images can be read from the same file by calling jpeg_stdio_src - * only before the first one. (If we discarded the buffer at the end of - * one image, we'd likely lose the start of the next one.) - * This makes it unsafe to use this manager and a different source - * manager serially with the same JPEG object. Caveat programmer. - */ - if (cinfo->src == NULL) { /* first time for this JPEG object? */ - cinfo->src = (struct jpeg_source_mgr *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - sizeof(my_source_mgr)); - src = (my_src_ptr) cinfo->src; - src->buffer = (JOCTET *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - BUF_SIZE * sizeof(JOCTET)); - } - - src = (my_src_ptr) cinfo->src; - src->pub.init_source = init_source; - src->pub.fill_input_buffer = fill_input_buffer; - src->pub.skip_input_data = skip_input_data; - src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */ - src->pub.term_source = term_source; - src->infile = infile; - src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */ - src->pub.next_input_byte = NULL; /* until buffer loaded */ -} - -// -------------- -// - JPEGReader - -// -------------- - -JPEGReader::JPEGReader( SvStream& rStm, void* /*pCallData*/, sal_Bool bSetLS ) : - rIStm ( rStm ), - pAcc ( NULL ), - pAcc1 ( NULL ), - pBuffer ( NULL ), - nLastPos ( rStm.Tell() ), - nLastLines ( 0 ), - bSetLogSize ( bSetLS ) -{ - maUpperName = String::CreateFromAscii( "SVIJPEG", 7 ); - nFormerPos = nLastPos; -} - -// ------------------------------------------------------------------------ - -JPEGReader::~JPEGReader() -{ - if( pBuffer ) - rtl_freeMemory( pBuffer ); - - if( pAcc ) - aBmp.ReleaseAccess( pAcc ); - - if( pAcc1 ) - aBmp1.ReleaseAccess( pAcc1 ); -} - -// ------------------------------------------------------------------------ - -void* JPEGReader::CreateBitmap( void* pParam ) -{ - Size aSize( ((JPEGCreateBitmapParam*)pParam)->nWidth, - ((JPEGCreateBitmapParam*)pParam)->nHeight ); - sal_Bool bGray = ((JPEGCreateBitmapParam*)pParam)->bGray != 0; - - void* pBmpBuf = NULL; - - if( pAcc ) - aBmp.ReleaseAccess( pAcc ); - - if( bGray ) - { - BitmapPalette aGrayPal( 256 ); - - for( sal_uInt16 n = 0; n < 256; n++ ) - { - const sal_uInt8 cGray = (sal_uInt8) n; - aGrayPal[ n ] = BitmapColor( cGray, cGray, cGray ); - } - - aBmp = Bitmap( aSize, 8, &aGrayPal ); - } - else - aBmp = Bitmap( aSize, 24 ); - - if ( bSetLogSize ) - { - unsigned long nUnit = ((JPEGCreateBitmapParam*)pParam)->density_unit; - - if( ( ( 1 == nUnit ) || ( 2 == nUnit ) ) && - ( (JPEGCreateBitmapParam*) pParam )->X_density && - ( (JPEGCreateBitmapParam*) pParam )->Y_density ) - { - Point aEmptyPoint; - Fraction aFractX( 1, ((JPEGCreateBitmapParam*)pParam)->X_density ); - Fraction aFractY( 1, ((JPEGCreateBitmapParam*)pParam)->Y_density ); - MapMode aMapMode( nUnit == 1 ? MAP_INCH : MAP_CM, aEmptyPoint, aFractX, aFractY ); - Size aPrefSize = OutputDevice::LogicToLogic( aSize, aMapMode, MAP_100TH_MM ); - - aBmp.SetPrefSize( aPrefSize ); - aBmp.SetPrefMapMode( MapMode( MAP_100TH_MM ) ); - } - } - - pAcc = aBmp.AcquireWriteAccess(); - - if( pAcc ) - { - long nAlignedWidth; - - const sal_uLong nFormat = pAcc->GetScanlineFormat(); - - if( - ( bGray && ( BMP_FORMAT_8BIT_PAL == nFormat ) ) || - ( !bGray && ( BMP_FORMAT_24BIT_TC_RGB == nFormat ) ) - ) - { - pBmpBuf = pAcc->GetBuffer(); - nAlignedWidth = pAcc->GetScanlineSize(); - ((JPEGCreateBitmapParam*)pParam)->bTopDown = pAcc->IsTopDown(); - } - else - { - nAlignedWidth = AlignedWidth4Bytes( aSize.Width() * ( bGray ? 8 : 24 ) ); - ((JPEGCreateBitmapParam*)pParam)->bTopDown = sal_True; - pBmpBuf = pBuffer = rtl_allocateMemory( nAlignedWidth * aSize.Height() ); - } - ((JPEGCreateBitmapParam*)pParam)->nAlignedWidth = nAlignedWidth; - } - - return pBmpBuf; -} - -// ------------------------------------------------------------------------ - -void JPEGReader::FillBitmap() -{ - if( pBuffer && pAcc ) - { - HPBYTE pTmp; - BitmapColor aColor; - long nAlignedWidth; - long nWidth = pAcc->Width(); - long nHeight = pAcc->Height(); - - if( pAcc->GetBitCount() == 8 ) - { - BitmapColor* pCols = new BitmapColor[ 256 ]; - - for( sal_uInt16 n = 0; n < 256; n++ ) - { - const sal_uInt8 cGray = (sal_uInt8) n; - pCols[ n ] = pAcc->GetBestMatchingColor( BitmapColor( cGray, cGray, cGray ) ); - } - - nAlignedWidth = AlignedWidth4Bytes( pAcc->Width() * 8L ); - - for( long nY = 0L; nY < nHeight; nY++ ) - { - pTmp = (sal_uInt8*) pBuffer + nY * nAlignedWidth; - - for( long nX = 0L; nX < nWidth; nX++ ) - pAcc->SetPixel( nY, nX, pCols[ *pTmp++ ] ); - } - - delete[] pCols; - } - else - { - nAlignedWidth = AlignedWidth4Bytes( pAcc->Width() * 24L ); - - for( long nY = 0L; nY < nHeight; nY++ ) - { - pTmp = (sal_uInt8*) pBuffer + nY * nAlignedWidth; - - for( long nX = 0L; nX < nWidth; nX++ ) - { - aColor.SetRed( *pTmp++ ); - aColor.SetGreen( *pTmp++ ); - aColor.SetBlue( *pTmp++ ); - pAcc->SetPixel( nY, nX, aColor ); - } - } - } - } -} - -// ------------------------------------------------------------------------ - -Graphic JPEGReader::CreateIntermediateGraphic( const Bitmap& rBitmap, long nLines ) -{ - Graphic aGraphic; - const Size aSizePix( rBitmap.GetSizePixel() ); - - if( !nLastLines ) - { - if( pAcc1 ) - aBmp1.ReleaseAccess( pAcc1 ); - - aBmp1 = Bitmap( rBitmap.GetSizePixel(), 1 ); - aBmp1.Erase( Color( COL_WHITE ) ); - pAcc1 = aBmp1.AcquireWriteAccess(); - } - - if( nLines && ( nLines < aSizePix.Height() ) ) - { - if( pAcc1 ) - { - const long nNewLines = nLines - nLastLines; - - if( nNewLines ) - { - pAcc1->SetFillColor( Color( COL_BLACK ) ); - pAcc1->FillRect( Rectangle( Point( 0, nLastLines ), - Size( pAcc1->Width(), nNewLines ) ) ); - } - - aBmp1.ReleaseAccess( pAcc1 ); - aGraphic = BitmapEx( rBitmap, aBmp1 ); - pAcc1 = aBmp1.AcquireWriteAccess(); - } - else - aGraphic = rBitmap; - } - else - aGraphic = rBitmap; - - nLastLines = nLines; - - return aGraphic; -} - -// ------------------------------------------------------------------------ - -ReadState JPEGReader::Read( Graphic& rGraphic ) -{ - long nEndPos; - long nLines; - ReadState eReadState; - sal_Bool bRet = sal_False; - sal_uInt8 cDummy; - -#if 1 // TODO: is it possible to get rid of this seek to the end? - // check if the stream's end is already available - rIStm.Seek( STREAM_SEEK_TO_END ); - rIStm >> cDummy; - nEndPos = rIStm.Tell(); - - // else check if at least JPEGMINREAD bytes can be read - if( rIStm.GetError() == ERRCODE_IO_PENDING ) - { - rIStm.ResetError(); - if( ( nEndPos - nFormerPos ) < JPEGMINREAD ) - { - rIStm.Seek( nLastPos ); - return JPEGREAD_NEED_MORE; - } - } - - // seek back to the original position - rIStm.Seek( nLastPos ); -#endif - - Size aPreviewSize = GetPreviewSize(); - SetJpegPreviewSizeHint( aPreviewSize.Width(), aPreviewSize.Height() ); - - // read the (partial) image - ReadJPEG( this, &rIStm, &nLines ); - - if( pAcc ) - { - if( pBuffer ) - { - FillBitmap(); - rtl_freeMemory( pBuffer ); - pBuffer = NULL; - } - - aBmp.ReleaseAccess( pAcc ); - pAcc = NULL; - - if( rIStm.GetError() == ERRCODE_IO_PENDING ) - rGraphic = CreateIntermediateGraphic( aBmp, nLines ); - else - rGraphic = aBmp; - - bRet = sal_True; - } - else if( rIStm.GetError() == ERRCODE_IO_PENDING ) - bRet = sal_True; - - // Status setzen ( Pending hat immer Vorrang ) - if( rIStm.GetError() == ERRCODE_IO_PENDING ) - { - eReadState = JPEGREAD_NEED_MORE; - rIStm.ResetError(); - nFormerPos = rIStm.Tell(); - } - else - { - if( bRet ) - eReadState = JPEGREAD_OK; - else - eReadState = JPEGREAD_ERROR; - } - - return eReadState; -} - - -// -------------- -// - JPEGWriter - -// -------------- - -JPEGWriter::JPEGWriter( SvStream& rStm, const uno::Sequence< beans::PropertyValue >* pFilterData, bool* pExportWasGrey ) : - rOStm ( rStm ), - pAcc ( NULL ), - pBuffer ( NULL ), - pExpWasGrey ( pExportWasGrey ) -{ - FilterConfigItem aConfigItem( (uno::Sequence< beans::PropertyValue >*)pFilterData ); - bGreys = aConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorMode" ) ), 0 ) != 0; - nQuality = aConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Quality" ) ), 75 ); - - if ( pFilterData ) - { - int nArgs = pFilterData->getLength(); - const beans::PropertyValue* pValues = pFilterData->getConstArray(); - while( nArgs-- ) - { - if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StatusIndicator" ) ) ) - { - pValues->Value >>= xStatusIndicator; - } - pValues++; - } - } -} - -// ------------------------------------------------------------------------ - -void* JPEGWriter::GetScanline( long nY ) -{ - void* pScanline = NULL; - - if( pAcc ) - { - if( bNative ) - pScanline = pAcc->GetScanline( nY ); - else if( pBuffer ) - { - BitmapColor aColor; - long nWidth = pAcc->Width(); - sal_uInt8* pTmp = pBuffer; - - if( pAcc->HasPalette() ) - { - for( long nX = 0L; nX < nWidth; nX++ ) - { - aColor = pAcc->GetPaletteColor( (sal_uInt8) pAcc->GetPixel( nY, nX ) ); - *pTmp++ = aColor.GetRed(); - if ( bGreys ) - continue; - *pTmp++ = aColor.GetGreen(); - *pTmp++ = aColor.GetBlue(); - } - } - else - { - for( long nX = 0L; nX < nWidth; nX++ ) - { - aColor = pAcc->GetPixel( nY, nX ); - *pTmp++ = aColor.GetRed(); - if ( bGreys ) - continue; - *pTmp++ = aColor.GetGreen(); - *pTmp++ = aColor.GetBlue(); - } - } - - pScanline = pBuffer; - } - } - - return pScanline; -} - -// ------------------------------------------------------------------------ - -sal_Bool JPEGWriter::Write( const Graphic& rGraphic ) -{ - sal_Bool bRet = sal_False; - - if ( xStatusIndicator.is() ) - { - rtl::OUString aMsg; - xStatusIndicator->start( aMsg, 100 ); - } - - Bitmap aGraphicBmp( rGraphic.GetBitmap() ); - - if ( bGreys ) - { - if ( !aGraphicBmp.Convert( BMP_CONVERSION_8BIT_GREYS ) ) - aGraphicBmp = rGraphic.GetBitmap(); - } - - pAcc = aGraphicBmp.AcquireReadAccess(); - - if ( !bGreys ) // bitmap was not explicitely converted into greyscale, - { // check if source is greyscale only - - sal_Bool bIsGrey = sal_True; - - long nWidth = pAcc->Width(); - for ( long nY = 0; bIsGrey && ( nY < pAcc->Height() ); nY++ ) - { - BitmapColor aColor; - for( long nX = 0L; bIsGrey && ( nX < nWidth ); nX++ ) - { - aColor = pAcc->HasPalette() ? pAcc->GetPaletteColor( (sal_uInt8) pAcc->GetPixel( nY, nX ) ) - : pAcc->GetPixel( nY, nX ); - bIsGrey = ( aColor.GetRed() == aColor.GetGreen() ) && ( aColor.GetRed() == aColor.GetBlue() ); - } - } - if ( bIsGrey ) - bGreys = sal_True; - } - - if( pExpWasGrey ) - *pExpWasGrey = bGreys; - - if( pAcc ) - { - bNative = ( pAcc->GetScanlineFormat() == BMP_FORMAT_24BIT_TC_RGB ); - - if( !bNative ) - pBuffer = new sal_uInt8[ AlignedWidth4Bytes( bGreys ? pAcc->Width() * 8L : pAcc->Width() * 24L ) ]; - - JPEGCallbackStruct aCallbackData; - aCallbackData.xStatusIndicator = xStatusIndicator; - bRet = (sal_Bool) WriteJPEG( this, &rOStm, pAcc->Width(), pAcc->Height(), bGreys, nQuality, &aCallbackData ); - - delete[] pBuffer; - pBuffer = NULL; - - aGraphicBmp.ReleaseAccess( pAcc ); - pAcc = NULL; - } - if ( xStatusIndicator.is() ) - xStatusIndicator->end(); - - return bRet; -} - -// -------------- -// - ImportJPEG - -// -------------- - -sal_Bool ImportJPEG( SvStream& rStm, Graphic& rGraphic, void* pCallerData, sal_Int32 nImportFlags ) -{ - JPEGReader* pJPEGReader = (JPEGReader*) rGraphic.GetContext(); - ReadState eReadState; - sal_Bool bRet = sal_True; - - if( !pJPEGReader ) - pJPEGReader = new JPEGReader( rStm, pCallerData, ( nImportFlags & GRFILTER_I_FLAGS_SET_LOGSIZE_FOR_JPEG ) != 0 ); - - if( nImportFlags & GRFILTER_I_FLAGS_FOR_PREVIEW ) - pJPEGReader->SetPreviewSize( Size(128,128) ); - else - pJPEGReader->DisablePreviewMode(); - - rGraphic.SetContext( NULL ); - eReadState = pJPEGReader->Read( rGraphic ); - - if( eReadState == JPEGREAD_ERROR ) - { - bRet = sal_False; - delete pJPEGReader; - } - else if( eReadState == JPEGREAD_OK ) - delete pJPEGReader; - else - rGraphic.SetContext( pJPEGReader ); - - return bRet; -} - -// -------------- -// - ExportJPEG - -// -------------- - -sal_Bool ExportJPEG( SvStream& rOStm, const Graphic& rGraphic, - const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData, - bool* pExportWasGrey - ) -{ - JPEGWriter aJPEGWriter( rOStm, pFilterData, pExportWasGrey ); - return aJPEGWriter.Write( rGraphic ); -} diff --git a/svtools/source/filter.vcl/jpeg/jpegc.c b/svtools/source/filter.vcl/jpeg/jpegc.c deleted file mode 100644 index b51d37a4a163..000000000000 --- a/svtools/source/filter.vcl/jpeg/jpegc.c +++ /dev/null @@ -1,284 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include -#include -#include "setjmp.h" -#include "jpeg/jpeglib.h" -#include "jpeg/jerror.h" -#include "jpeg.h" -#include "rtl/alloc.h" -#include "osl/diagnose.h" - -struct my_error_mgr -{ - struct jpeg_error_mgr pub; - jmp_buf setjmp_buffer; -}; - -void jpeg_svstream_src (j_decompress_ptr cinfo, void* infile); -void jpeg_svstream_dest (j_compress_ptr cinfo, void* outfile); - -METHODDEF( void ) -my_error_exit (j_common_ptr cinfo) -{ - my_error_ptr myerr = (my_error_ptr) cinfo->err; - (*cinfo->err->output_message) (cinfo); - longjmp(myerr->setjmp_buffer, 1); -} - - -METHODDEF( void ) -my_output_message (j_common_ptr cinfo) -{ - char buffer[JMSG_LENGTH_MAX]; - (*cinfo->err->format_message) (cinfo, buffer); -} - -/* TODO: when incompatible changes are possible again - the preview size hint should be redone */ -static int nPreviewWidth = 0; -static int nPreviewHeight = 0; -void SetJpegPreviewSizeHint( int nWidth, int nHeight ) -{ - nPreviewWidth = nWidth; - nPreviewHeight = nHeight; -} - -void ReadJPEG( void* pJPEGReader, void* pIStm, long* pLines ) -{ - struct jpeg_decompress_struct cinfo; - struct my_error_mgr jerr; - struct JPEGCreateBitmapParam aCreateBitmapParam; - HPBYTE pDIB; - HPBYTE pTmp; - long nWidth; - long nHeight; - long nAlignedWidth; - JSAMPLE * range_limit; - HPBYTE pScanLineBuffer = NULL; - long nScanLineBufferComponents = 0; - // declare bDecompCreated volatile because of gcc - // warning: variable 'bDecompCreated' might be clobbered by `longjmp' or `vfork' - volatile long bDecompCreated = 0; - - /* Falls der Stream nicht ausreicht (IO_PENDING) - wird ueber ein longjmp in der Schleife nach Exit - gesprungen, wir geben dann die Anzahl - der bisher bearbeiteten Scanlines zurueck*/ - if ( setjmp( jerr.setjmp_buffer ) ) - goto Exit; - - cinfo.err = jpeg_std_error( &jerr.pub ); - jerr.pub.error_exit = my_error_exit; - jerr.pub.output_message = my_output_message; - - jpeg_create_decompress( &cinfo ); - bDecompCreated = 1; - jpeg_svstream_src( &cinfo, pIStm ); - jpeg_read_header( &cinfo, sal_True ); - - cinfo.scale_num = 1; - cinfo.scale_denom = 1; - cinfo.output_gamma = 1.0; - cinfo.raw_data_out = sal_False; - cinfo.quantize_colors = sal_False; - if ( cinfo.jpeg_color_space == JCS_YCbCr ) - cinfo.out_color_space = JCS_RGB; - else if ( cinfo.jpeg_color_space == JCS_YCCK ) - cinfo.out_color_space = JCS_CMYK; - - OSL_ASSERT(cinfo.out_color_space == JCS_CMYK || cinfo.out_color_space == JCS_GRAYSCALE || cinfo.out_color_space == JCS_RGB); - - /* change scale for preview import */ - if( nPreviewWidth || nPreviewHeight ) - { - if( nPreviewWidth == 0 ) { - nPreviewWidth = ( cinfo.image_width*nPreviewHeight )/cinfo.image_height; - if( nPreviewWidth <= 0 ) - nPreviewWidth = 1; - } else if( nPreviewHeight == 0 ) { - nPreviewHeight = ( cinfo.image_height*nPreviewWidth )/cinfo.image_width; - if( nPreviewHeight <= 0 ) - nPreviewHeight = 1; - } - - for( cinfo.scale_denom = 1; cinfo.scale_denom < 8; cinfo.scale_denom *= 2 ) - { - if( cinfo.image_width < nPreviewWidth * cinfo.scale_denom ) - break; - if( cinfo.image_height < nPreviewHeight * cinfo.scale_denom ) - break; - } - - if( cinfo.scale_denom > 1 ) - { - cinfo.dct_method = JDCT_FASTEST; - cinfo.do_fancy_upsampling = sal_False; - cinfo.do_block_smoothing = sal_False; - } - } - - jpeg_start_decompress( &cinfo ); - - nWidth = cinfo.output_width; - nHeight = cinfo.output_height; - aCreateBitmapParam.nWidth = nWidth; - aCreateBitmapParam.nHeight = nHeight; - - aCreateBitmapParam.density_unit = cinfo.density_unit; - aCreateBitmapParam.X_density = cinfo.X_density; - aCreateBitmapParam.Y_density = cinfo.Y_density; - aCreateBitmapParam.bGray = cinfo.output_components == 1; - pDIB = CreateBitmap( pJPEGReader, &aCreateBitmapParam ); - nAlignedWidth = aCreateBitmapParam.nAlignedWidth; - range_limit=cinfo.sample_range_limit; - - if ( cinfo.out_color_space == JCS_CMYK ) - { - nScanLineBufferComponents = cinfo.output_width * 4; - pScanLineBuffer = rtl_allocateMemory( nScanLineBufferComponents ); - } - - if( pDIB ) - { - if( aCreateBitmapParam.bTopDown ) - pTmp = pDIB; - else - { - pTmp = pDIB + ( nHeight - 1 ) * nAlignedWidth; - nAlignedWidth = -nAlignedWidth; - } - - for ( *pLines = 0; *pLines < nHeight; (*pLines)++ ) - { - if (pScanLineBuffer!=NULL) { // in other words cinfo.out_color_space == JCS_CMYK - int i; - int j; - jpeg_read_scanlines( &cinfo, (JSAMPARRAY) &pScanLineBuffer, 1 ); - // convert CMYK to RGB - for( i=0, j=0; i < nScanLineBufferComponents; i+=4, j+=3 ) - { - int c_=255-pScanLineBuffer[i+0]; - int m_=255-pScanLineBuffer[i+1]; - int y_=255-pScanLineBuffer[i+2]; - int k_=255-pScanLineBuffer[i+3]; - pTmp[j+0]=range_limit[ 255L - ( c_ + k_ ) ]; - pTmp[j+1]=range_limit[ 255L - ( m_ + k_ ) ]; - pTmp[j+2]=range_limit[ 255L - ( y_ + k_ ) ]; - } - } else { - jpeg_read_scanlines( &cinfo, (JSAMPARRAY) &pTmp, 1 ); - } - /* PENDING ??? */ - if ( cinfo.err->msg_code == 113 ) - break; - - pTmp += nAlignedWidth; - } - } - - jpeg_finish_decompress( &cinfo ); - if (pScanLineBuffer!=NULL) { - rtl_freeMemory( pScanLineBuffer ); - pScanLineBuffer=NULL; - } - -Exit: - - if( bDecompCreated ) - jpeg_destroy_decompress( &cinfo ); -} - -long WriteJPEG( void* pJPEGWriter, void* pOStm, - long nWidth, long nHeight, long bGreys, - long nQualityPercent, void* pCallbackData ) -{ - struct jpeg_compress_struct cinfo; - struct my_error_mgr jerr; - void* pScanline; - long nY; - // declare bCompCreated, bRet volatile because of gcc - // warning: variable 'bCompCreated' might be clobbered by `longjmp' or `vfork' - volatile long bCompCreated = 0; - volatile long bRet = 0; - - if ( setjmp( jerr.setjmp_buffer ) ) - goto Exit; - - cinfo.err = jpeg_std_error( &jerr.pub ); - jerr.pub.error_exit = my_error_exit; - jerr.pub.output_message = my_output_message; - - jpeg_create_compress( &cinfo ); - bCompCreated = 1; - - jpeg_svstream_dest( &cinfo, pOStm ); - - cinfo.image_width = (JDIMENSION) nWidth; - cinfo.image_height = (JDIMENSION) nHeight; - if ( bGreys ) - { - cinfo.input_components = 1; - cinfo.in_color_space = JCS_GRAYSCALE; - } - else - { - cinfo.input_components = 3; - cinfo.in_color_space = JCS_RGB; - } - - jpeg_set_defaults( &cinfo ); - jpeg_set_quality( &cinfo, (int) nQualityPercent, sal_False ); - - if ( ( nWidth > 128 ) || ( nHeight > 128 ) ) - jpeg_simple_progression( &cinfo ); - - jpeg_start_compress( &cinfo, sal_True ); - - for( nY = 0; nY < nHeight; nY++ ) - { - pScanline = GetScanline( pJPEGWriter, nY ); - - if( pScanline ) - jpeg_write_scanlines( &cinfo, (JSAMPARRAY) &pScanline, 1 ); - - if( JPEGCallback( pCallbackData, nY * 100L / nHeight ) ) - goto Exit; - } - - bRet = 1; - - jpeg_finish_compress(&cinfo); - -Exit: - - if ( bCompCreated ) - jpeg_destroy_compress( &cinfo ); - - return bRet; -} -- cgit v1.2.3 From a80265ac483f01312ca5c3a16787ac2f9c2ba6c9 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Wed, 30 Mar 2011 18:52:07 +0200 Subject: masterfix DEV300: #i10000# build fixes --- solenv/config/sdev300.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini index e41d43d87b96..7f677870bc97 100644 --- a/solenv/config/sdev300.ini +++ b/solenv/config/sdev300.ini @@ -997,7 +997,7 @@ unxlngx6 GTK_CFLAGS -I%SOLAR_SYSBASE_ROOT%/usr/include/gtk-2.0 -I%SOLAR_SYSBASE_ROOT%/usr/lib/gtk-2.0/include -I%SOLAR_SYSBASE_ROOT%/usr/include/atk-1.0 -I%SOLAR_SYSBASE_ROOT%/usr/include/cairo -I%SOLAR_SYSBASE_ROOT%/usr/include/pango-1.0 -I%SOLAR_SYSBASE_ROOT%/usr/include/glib-2.0 -I%SOLAR_SYSBASE_ROOT%/usr/lib/glib-2.0/include GTK_LIBS -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lglib-2.0 KDE_CFLAGS -I%KDE_ROOT%/include -DQT_CLEAN_NAMESPACE - KDE_LIBS -L%KDE_ROOT%/lib -lkdeui -lkdecore -lqt-mt + KDE_LIBS -L%KDE_ROOT%/lib64 -L%KDE_ROOT%/lib -lkdeui -lkdecore -lqt-mt } common3:0 IF X%UPDATER%X == XX { -- cgit v1.2.3 From d2f6b45b7bbee300177b0cd71399ede22bc1d4f9 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Wed, 30 Mar 2011 18:52:07 +0200 Subject: masterfix DEV300: #i10000# build fixes --- svtools/Library_svt.mk | 1 - svtools/source/filter/jpeg/jpeg.cxx | 8 ++++---- vcl/Library_vcl.mk | 3 ++- vcl/Package_inc.mk | 4 +++- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk index 39b135f16b1e..f1c5dfef1590 100644 --- a/svtools/Library_svt.mk +++ b/svtools/Library_svt.mk @@ -43,7 +43,6 @@ $(eval $(call gb_Library_set_include,svt,\ -I$(SRCDIR)/svtools/source/inc \ -I$(SRCDIR)/svtools/inc/pch \ -I$(OUTDIR)/inc/offuh \ - -I$(OUTDIR)/inc \ )) $(eval $(call gb_Library_set_defs,svt,\ diff --git a/svtools/source/filter/jpeg/jpeg.cxx b/svtools/source/filter/jpeg/jpeg.cxx index dff6ec8ff51f..6f157a248ddc 100644 --- a/svtools/source/filter/jpeg/jpeg.cxx +++ b/svtools/source/filter/jpeg/jpeg.cxx @@ -34,8 +34,8 @@ extern "C" { #include "stdio.h" #include "jpeg.h" - #include "jpeglib.h" - #include "jerror.h" + #include "jpeg/jpeglib.h" + #include "jpeg/jerror.h" } #define _JPEGPRIVATE @@ -112,7 +112,7 @@ extern "C" void init_destination (j_compress_ptr cinfo) dest->pub.free_in_buffer = BUF_SIZE; } -extern "C" int empty_output_buffer (j_compress_ptr cinfo) +extern "C" boolean empty_output_buffer (j_compress_ptr cinfo) { my_dest_ptr dest = (my_dest_ptr) cinfo->dest; @@ -217,7 +217,7 @@ long StreamRead( SvStream* pSvStm, void* pBuffer, long nBufferSize ) return nRead; } -extern "C" int fill_input_buffer (j_decompress_ptr cinfo) +extern "C" boolean fill_input_buffer (j_decompress_ptr cinfo) { my_src_ptr src = (my_src_ptr) cinfo->src; size_t nbytes; diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 0e403239b570..fa5b3013a9fe 100755 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -264,7 +264,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/components/dtranscomp \ vcl/source/components/factory \ vcl/source/components/fontident \ - vcl/source/components/rasterizer_svg \ + vcl/source/components/rasterizer_rsvg \ vcl/source/components/stringmirror \ vcl/source/control/button \ vcl/source/control/combobox \ @@ -359,6 +359,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/gdi/sallayout \ vcl/source/gdi/salmisc \ vcl/source/gdi/salnativewidgets-none \ + vcl/source/gdi/svgread \ vcl/source/gdi/textlayout \ vcl/source/gdi/virdev \ vcl/source/gdi/wall \ diff --git a/vcl/Package_inc.mk b/vcl/Package_inc.mk index 1d40b76bda7b..f45f2b9c3917 100644 --- a/vcl/Package_inc.mk +++ b/vcl/Package_inc.mk @@ -119,7 +119,8 @@ $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/ptrstyle.hxx,vcl/ptrstyle.hxx) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/quickselectionengine.hxx,vcl/quickselectionengine.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/regband.hxx,vcl/regband.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/region.hxx,vcl/region.hxx)) -$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/vcl/rendergraphicrasterizer.hxx,vcl/vcl/rendergraphicrasterizer.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/rendergraphicrasterizer.hxx,vcl/rendergraphicrasterizer.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/rendergraphic.hxx,vcl/rendergraphic.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/salbtype.hxx,vcl/salbtype.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/salctype.hxx,vcl/salctype.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/salgtype.hxx,vcl/salgtype.hxx)) @@ -140,6 +141,7 @@ $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/stdtext.hxx,vcl/stdtext.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/strhelper.hxx,vcl/strhelper.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/svapp.hxx,vcl/svapp.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/sv.h,vcl/sv.h)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/svgread.hxx,vcl/svgread.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/symbol.hxx,vcl/symbol.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/syschild.hxx,vcl/syschild.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/sysdata.hxx,vcl/sysdata.hxx)) -- cgit v1.2.3 From f2f949c056dddfbd078fe7cf7c58dcc3acf8a41d Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Wed, 30 Mar 2011 18:52:07 +0200 Subject: masterfix DEV300: #i10000# build fixes --- gettext/makefile.mk | 2 +- gettext/prj/build.lst | 2 +- jpeg/jpeg-8c.patch | 10 +++++----- librsvg/makefile.mk | 2 +- pango/pango-1.28.3-win32.patch | 2 +- pango/prj/build.lst | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gettext/makefile.mk b/gettext/makefile.mk index 91255f1c0694..5569a31ff6c1 100644 --- a/gettext/makefile.mk +++ b/gettext/makefile.mk @@ -52,7 +52,7 @@ PATCH_FILES= .IF "$(OS)"=="MACOSX" CONFIGURE_DIR= -CONFIGURE_ACTION=.$/configure --prefix=$(SRC_ROOT)$/$(PRJNAME)$/$(MISC) CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS)" +CONFIGURE_ACTION=.$/configure --prefix=$(SRC_ROOT)$/$(PRJNAME)$/$(MISC) CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS)" CXXFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS)" CONFIGURE_FLAGS=$(eq,$(OS),MACOSX CPPFLAGS="$(EXTRA_CDEFS)" $(NULL)) --disable-curses --without-emacs --without-git --disable-java BUILD_ACTION=$(GNUMAKE) diff --git a/gettext/prj/build.lst b/gettext/prj/build.lst index 10d25eb8461f..cf38e63c826f 100644 --- a/gettext/prj/build.lst +++ b/gettext/prj/build.lst @@ -1,3 +1,3 @@ -gt gettext : soltools NULL +gt gettext : sal soltools NULL gt gettext usr1 - all gt_mkout NULL gt gettext nmake - all gt_gettext NULL diff --git a/jpeg/jpeg-8c.patch b/jpeg/jpeg-8c.patch index a131f72fad0d..77c1ff592c7a 100644 --- a/jpeg/jpeg-8c.patch +++ b/jpeg/jpeg-8c.patch @@ -1,6 +1,6 @@ ---- misc/jpeg-8c/jconfig.h 2011-03-24 21:20:52.542761397 +0100 -+++ misc/build/jpeg-8c/jconfig.h 2011-03-24 21:15:20.712761156 +0100 -@@ -1 +1,58 @@ +--- misc/jpeg-8c/jconfig.h 2011-03-30 11:20:06.266329889 +0200 ++++ misc/build/jpeg-8c/jconfig.h 2011-03-30 11:02:01.926080079 +0200 +@@ -1 +1,60 @@ -dummy +/* jconfig.h. Generated from jconfig.cfg by configure. */ +/* jconfig.cfg --- source file edited by configure script */ @@ -35,6 +35,8 @@ +/* #undef RIGHT_SHIFT_IS_UNSIGNED */ +#ifdef WNT +#define INLINE __inline ++#elif defined SOLARIS ++#define INLINE +#else +#define INLINE inline +#endif @@ -60,7 +62,6 @@ +/* #undef PROGRESS_REPORT */ + +#endif /* JPEG_CJPEG_DJPEG */ -Nur in misc/build/jpeg-8c: jconfig.h.dummy. --- misc/jpeg-8c/jmorecfg.h 2009-11-20 09:01:24.000000000 +0100 +++ misc/build/jpeg-8c/jmorecfg.h 2011-03-24 21:29:02.073761750 +0100 @@ -21,7 +21,7 @@ @@ -171,4 +172,3 @@ Nur in misc/build/jpeg-8c: jconfig.h.dummy. +LIB1OBJFILES=$(SLOFILES) + +.INCLUDE : target.mk -Nur in misc/build/jpeg-8c: makefile.mk.dummy. diff --git a/librsvg/makefile.mk b/librsvg/makefile.mk index f9c07cfd20fa..5744dc73d6ff 100755 --- a/librsvg/makefile.mk +++ b/librsvg/makefile.mk @@ -69,7 +69,7 @@ CONFIGURE_FLAGS=--disable-gtk-theme --disable-tools --with-croco --with-svgz \ GTHREAD_CFLAGS=-I$(SOLARINCDIR)$/external/$glib-2.0 \ GTHREAD_LIBS=-lgthread-2.0 \ LIBCROCO_CFLAGS="-I$(SOLARINCDIR)$/external$/libcroco-0.6" \ - LIBCROCO_LIBS=-lcroco-0.6 + LIBCROCO_LIBS=-lcroco-0.6 \ CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS) -I$(SOLARINCDIR)$/external -I$(SOLARINCDIR)$/external$/glib-2.0 -I$(SOLARINCDIR)$/external$/gdk-pixbuf-2.0 -I$(SOLARINCDIR)$/external$/pango-1.0 -I$(SOLARINCDIR)$/cairo" \ LDFLAGS="$(CONFIGURE_LDFLAGS)" diff --git a/pango/pango-1.28.3-win32.patch b/pango/pango-1.28.3-win32.patch index 78dd7bbbffe0..35ad6666b318 100644 --- a/pango/pango-1.28.3-win32.patch +++ b/pango/pango-1.28.3-win32.patch @@ -49,7 +49,7 @@ + $(OUTDIR)\lib\gobject-2.0.lib \ + $(OUTDIR)\lib\gmodule-2.0.lib +CAIRO_LIB = $(OUTDIR)\lib\cairo.lib -+USP10_LIB = $(OUTDIR)\lib\USP10.lib ++USP10_LIB = USP10.lib + +!INCLUDE $(PRJ_TOP)\make.msc diff --git a/pango/prj/build.lst b/pango/prj/build.lst index 419eebb04ca6..692ab2c2e592 100644 --- a/pango/prj/build.lst +++ b/pango/prj/build.lst @@ -1,3 +1,3 @@ -pg pango : gettext glib soltools NULL +pg pango : gettext glib soltools cairo NULL pg pango usr1 - all pg_mkout NULL pg pango nmake - all pg_pango NULL -- cgit v1.2.3 -- cgit v1.2.3 From ab9cf6f20825d09d19b646f26634920d44ab4c14 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 31 Mar 2011 08:20:48 +0200 Subject: masterfix DEV300: #i10000# new configure --- configure | 27755 +++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 17298 insertions(+), 10457 deletions(-) diff --git a/configure b/configure index c9c7a2240e4d..331796cd2c98 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.67. -# -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 STATUS 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=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_unset $as_var fi - $as_echo "$as_me: error: $2" >&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, old GNU/Linux) returns a bogus exit status, +# 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,675 +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" -<<<<<<< local -ac_subst_vars='LTLIBOBJS -LIBOBJS -BUILD_TYPE -LOCAL_SOLVER -nodep -VERBOSE -ENABLE_LAYOUT -ENABLE_STATIC_GTK -UNIXWRAPPERNAME -OOO_VENDOR -ABOUT_BITMAPS -INTRO_BITMAPS -WITH_DICT -WITH_POOR_HELP_LOCALIZATIONS -WITH_LANG -OOO_JUNIT_JAR -ANT_LIB -ANT_HOME -ANT -XINERAMA_LINK -USE_XINERAMA -SCPDEFS -WITHOUT_AFMS -WITHOUT_PPDS -WITH_FONTS -ENABLE_KAB -ENABLE_EVOAB2 -GOBJECT_LIBS -GOBJECT_CFLAGS -ENABLE_LOCKDOWN -KDE4_LIBS -KDE4_CFLAGS -MOC4 -KDE_LIBS -KDE_CFLAGS -MOC -COMMONS_LOGGING_JAR -COMMONS_HTTPCLIENT_JAR -COMMONS_LANG_JAR -COMMONS_CODEC_JAR -SYSTEM_APACHE_COMMONS -LIBSERIALIZER_JAR -LIBFONTS_JAR -LIBREPOSITORY_JAR -LIBFORMULA_JAR -LIBLOADER_JAR -LIBLAYOUT_JAR -LIBBASE_JAR -JFREEREPORT_JAR -FLUTE_JAR -LIBXML_JAR -SAC_JAR -SYSTEM_JFREEREPORT -ENABLE_REPORTBUILDER -SERVLETAPI_JAR -SYSTEM_SERVLETAPI -ENABLE_MEDIAWIKI -SYSTEM_POPPLER -ENABLE_PDFIMPORT -POPPLER_LIBS -POPPLER_CFLAGS -ENABLE_PRESENTER_SCREEN -ENABLE_MINIMIZER -ENABLE_PRESENTER_EXTRA_UI -ENABLE_OPENGL -ENABLE_LIBRSVG -LIBRSVG_LIBS -LIBRSVG_CFLAGS -SYSTEM_CAIRO -BUILD_PIXMAN -ENABLE_CAIRO -CAIRO_LIBS -CAIRO_CFLAGS -ENABLE_GSTREAMER -GSTREAMER_LIBS -GSTREAMER_CFLAGS -ENABLE_SYSTRAY_GTK -ENABLE_DBUS -ENABLE_GIO -GIO_LIBS -GIO_CFLAGS -DBUS_LIBS -DBUS_CFLAGS -GTK_LIBS -GTK_CFLAGS -ENABLE_GNOMEVFS -GNOMEVFS_LIBS -GNOMEVFS_CFLAGS -ENABLE_GCONF -GCONF_LIBS -GCONF_CFLAGS -ENABLE_KDE4 -ENABLE_KDE -ENABLE_GTK -ZIP_HOME -UNZIP -ZIP -ASM_HOME -ML_EXE -CYGWIN_PATH -GNUPATCH -GNUCP -PATCH -FLEX -BISON -NSIS_PATH -DIRECTXSDK_LIB -DIRECTXSDK_HOME -WINDOWS_VISTA_PSDK -PSDK_HOME -SYSTEM_LIBC -HAVE_READDIR_R -HAVE_GETOPT -SYSTEM_LIBTEXTCAT_DATA -SYSTEM_LIBTEXTCAT -SYSTEM_LPSOLVE -SYSTEM_MYTHES -MYTHES_LIBS -MYTHES_CFLAGS -HYPHEN_LIB -SYSTEM_HYPH -SYSTEM_HUNSPELL -HUNSPELL_LIBS -HUNSPELL_CFLAGS -SYSTEM_REDLAND -REDLAND_LIBS -REDLAND_CFLAGS -AGG_VERSION -SYSTEM_AGG -AGG_LIBS -AGG_CFLAGS -ENABLE_AGG -SYSTEM_OPENSSL -OPENSSL_LIBS -OPENSSL_CFLAGS -NEON_VERSION -SYSTEM_NEON -NEON_LIBS -NEON_CFLAGS -DISABLE_NEON -ENABLE_RANDR -XRANDR_DLOPEN -XRANDR_LIBS -XRANDR_CFLAGS -XRENDER_LINK -SYSTEM_XRENDER_HEADERS -DISABLE_XAW -XAU_LIBS -XLIB -XINC -X_EXTRA_LIBS -X_LIBS -X_PRE_LIBS -X_CFLAGS -XMKMF -SYSTEM_GRAPHITE -ENABLE_GRAPHITE -GRAPHITE_LIBS -GRAPHITE_CFLAGS -ICU_MICRO -ICU_MINOR -ICU_MAJOR -SYSTEM_ICU -ICUCONFIG -SYSTEM_GENCMN -SYSTEM_GENCCODE -SYSTEM_GENBRK -SYSTEM_SANE_HEADER -MOZ_LDAP_CFLAGS -MOZ_LIB_XPCOM -MOZ_LIB -MOZ_INC -MOZ_FLAVOUR -SYSTEM_MOZILLA -MOZILLABUILD -ENABLE_NSS_MODULE -BUILD_MOZAB -MOZLIBREQ_LIBS -MOZLIBREQ_CFLAGS -MOZGTK2_LIBS -MOZGTK2_CFLAGS -MOZILLA_TOOLKIT -MOZILLA_VERSION -MOZILLAXPCOM_LIBS -MOZILLAXPCOM_CFLAGS -NSPR_LIB -MOZ_NSPR_LIBS -MOZ_NSPR_CFLAGS -NSS_LIB -MOZ_NSS_LIBS -MOZ_NSS_CFLAGS -WITH_OPENLDAP -WITH_LDAP -WITH_MOZILLA -SYSTEM_ODBC_HEADERS -SYSTEM_VIGRA -SYSTEM_BOOST -SYSTEM_MDDS -CURL_LIBS -CURL_CFLAGS -SYSTEM_CURL -CURLCONFIG -SAXON_JAR -SYSTEM_SAXON -SERIALIZER_JAR -BSH_JAR -SYSTEM_BSH -HSQLDB_JAR -SYSTEM_HSQLDB -SYSTEM_MYSQL_CPPCONN -LIBMYSQL_PATH -MYSQL_DEFINES -MYSQL_LIB -MYSQL_INC -SYSTEM_MYSQL -MYSQLCONFIG -ENABLE_MYSQLC -LUCENE_ANALYZERS_JAR -LUCENE_CORE_JAR -SYSTEM_LUCENE -DB_JAR -DB_INCLUDES -DB_VERSION -SYSTEM_DB -HOME -PYTHON_LIBS -PYTHON_CFLAGS -SYSTEM_PYTHON -BZIP2 -pkgpyexecdir -pyexecdir -pkgpythondir -pythondir -PYTHON_PLATFORM -PYTHON_EXEC_PREFIX -PYTHON_PREFIX -PYTHON_VERSION -PYTHON -SYSTEM_LIBXML -LIBXML_LIBS -LIBXML_CFLAGS -SYSTEM_LIBXSLT -XSLTPROC -LIBXSLT_LIBS -LIBXSLT_CFLAGS -USE_FT_EMBOLDEN -FREETYPE_LIBS -FREETYPE_CFLAGS -SYSTEM_CPPUNIT -CPPUNIT_LIBS -CPPUNIT_CFLAGS -SYSTEM_LIBWPD -LIBWPD_LIBS -LIBWPD_CFLAGS -PKG_CONFIG -SYSTEM_EXPAT -SYSTEM_JPEG -SYSTEM_ZLIB -SYSTEM_STDLIBS -BUILD_UNOWINREG -MINGWSTRIP -MINGWCXX -BUILD_STAX -GPERF -PKGFORMAT -RPM -BUILD_EPM -PKGMK -DPKG -EPM -BUILD_DMAKE -DMAKE -JAVAIFLAGS -JAVAFLAGS -JDK -JAVA_HOME -JAVAAOTCOMPILER -AWTLIB -JAVADOC -JAVACISGCJ -JAVACOMPILER -JAVAINTERPRETER -SOLAR_JAVA -BUILD_VER_STRING -ALLOC -HAVE_GCC_VISIBILITY_FEATURE -CCACHE -USE_CCACHE -USE_SYSTEM_STL -STLPORT_VER -STLPORT4 -EXCEPTIONS -MINGW_GXXDLL -MINGW_GCCDLL -MINGW_SHARED_LIBSTDCPP -MINGW_SHARED_GXXLIB -MINGW_GCCLIB_EH -MINGW_SHARED_GCCLIB -MINGW_CLIB_DIR -MINGW_BACKWARD_INCLUDE_PATH -MINGW_LIB_INCLUDE_PATH -GXX_INCLUDE_PATH -CRYPT_LINK -PAM_LINK -NEW_SHADOW_API -PAM -VALGRIND_CFLAGS -LFS_CFLAGS -WORDS_BIGENDIAN -SIZEOF_LONG -CXXCPP -ac_ct_CXX -CXXFLAGS -CXX -CPP -FRAME_HOME -CSC_PATH -MIDL_PATH -USE_MINGW -COMEX -MSPDB_PATH -PERL -HAVE_LD_HASH_STYLE -_cc -GNUMAKE -ENABLE_PCH -HAVE_LD_BSYMBOLIC_FUNCTIONS -GCCVER -COMPATH -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -GCC_HOME -SHELLPATH -WITH_MINGWIN -THES_SYSTEM_DIR -HYPH_SYSTEM_DIR -DICT_SYSTEM_DIR -SYSTEM_DICTS -WITH_MYSPELL_DICTS -ENABLE_RPATH -DISABLE_ATL -DISABLE_ACTIVEX -ENABLE_DIRECTX -WITH_BINFILTER -DO_FETCH_TARBALLS -TARFILE_LOCATION -ENABLE_FONTCONFIG -ENABLE_CUPS -DISABLE_STRIP -ENABLE_SYMBOLS -PROEXT -PROFULLSWITCH -PRODUCT -ENABLE_DEBUG -ENABLE_WERROR -VC_STANDARD -ENABLE_CRASHDUMP -PTHREAD_LIBS -PTHREAD_CFLAGS -OSVERSION -GNUTAR -target_os -target_vendor -target_cpu -target -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -SOURCEVERSION -UPD -_solenv -LOCAL_SOLENV -SED -AWK -EGREP -GREP -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_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 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 VALGRIND_CFLAGS PAM NEW_SHADOW_API PAM_LINK CRYPT_LINK GXX_INCLUDE_PATH MINGW_LIB_INCLUDE_PATH MINGW_BACKWARD_INCLUDE_PATH MINGW_CLIB_DIR MINGW_SHARED_GCCLIB MINGW_GCCLIB_EH MINGW_SHARED_GXXLIB MINGW_SHARED_LIBSTDCPP MINGW_GCCDLL MINGW_GXXDLL EXCEPTIONS STLPORT4 STLPORT_VER USE_SYSTEM_STL USE_CCACHE CCACHE HAVE_GCC_VISIBILITY_FEATURE ALLOC BUILD_VER_STRING SOLAR_JAVA JAVAINTERPRETER JAVACOMPILER JAVACISGCJ JAVADOC AWTLIB JAVAAOTCOMPILER JAVA_HOME JDK JAVAFLAGS JAVAIFLAGS DMAKE BUILD_DMAKE EPM DPKG PKGMK BUILD_EPM RPM PKGFORMAT GPERF BUILD_STAX MINGWCXX ac_ct_MINGWCXX MINGWSTRIP ac_ct_MINGWSTRIP BUILD_UNOWINREG SYSTEM_STDLIBS SYSTEM_ZLIB SYSTEM_JPEG SYSTEM_EXPAT PKG_CONFIG LIBWPD_CFLAGS LIBWPD_LIBS SYSTEM_LIBWPD CPPUNIT_CFLAGS CPPUNIT_LIBS SYSTEM_CPPUNIT FREETYPE_CFLAGS FREETYPE_LIBS USE_FT_EMBOLDEN LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC SYSTEM_LIBXSLT LIBXML_CFLAGS LIBXML_LIBS SYSTEM_LIBXML PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir BZIP2 SYSTEM_PYTHON PYTHON_CFLAGS PYTHON_LIBS HOME SYSTEM_DB DB_VERSION DB_INCLUDES DB_JAR SYSTEM_LUCENE LUCENE_CORE_JAR LUCENE_ANALYZERS_JAR ENABLE_MYSQLC MYSQLCONFIG SYSTEM_MYSQL MYSQL_INC MYSQL_LIB MYSQL_DEFINES LIBMYSQL_PATH SYSTEM_MYSQL_CPPCONN SYSTEM_HSQLDB HSQLDB_JAR SYSTEM_BSH BSH_JAR SERIALIZER_JAR SYSTEM_SAXON SAXON_JAR CURLCONFIG SYSTEM_CURL CURL_CFLAGS CURL_LIBS SYSTEM_MDDS SYSTEM_BOOST SYSTEM_VIGRA SYSTEM_ODBC_HEADERS WITH_MOZILLA WITH_LDAP WITH_OPENLDAP MOZ_NSS_CFLAGS MOZ_NSS_LIBS NSS_LIB MOZ_NSPR_CFLAGS MOZ_NSPR_LIBS NSPR_LIB MOZILLAXPCOM_CFLAGS MOZILLAXPCOM_LIBS MOZILLA_VERSION MOZILLA_TOOLKIT MOZGTK2_CFLAGS MOZGTK2_LIBS MOZLIBREQ_CFLAGS MOZLIBREQ_LIBS BUILD_MOZAB ENABLE_NSS_MODULE MOZILLABUILD SYSTEM_MOZILLA MOZ_FLAVOUR MOZ_INC MOZ_LIB MOZ_LIB_XPCOM MOZ_LDAP_CFLAGS SYSTEM_SANE_HEADER SYSTEM_GENBRK SYSTEM_GENCCODE SYSTEM_GENCMN ICUCONFIG SYSTEM_ICU ICU_MAJOR ICU_MINOR ICU_MICRO GRAPHITE_CFLAGS GRAPHITE_LIBS ENABLE_GRAPHITE SYSTEM_GRAPHITE X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XINC XLIB XAU_LIBS DISABLE_XAW SYSTEM_XRENDER_HEADERS XRENDER_LINK XRANDR_CFLAGS XRANDR_LIBS XRANDR_DLOPEN ENABLE_RANDR DISABLE_NEON NEON_CFLAGS NEON_LIBS SYSTEM_NEON NEON_VERSION OPENSSL_CFLAGS OPENSSL_LIBS SYSTEM_OPENSSL ENABLE_AGG AGG_CFLAGS AGG_LIBS SYSTEM_AGG AGG_VERSION REDLAND_CFLAGS REDLAND_LIBS SYSTEM_REDLAND HUNSPELL_CFLAGS HUNSPELL_LIBS SYSTEM_HUNSPELL SYSTEM_HYPH HYPHEN_LIB MYTHES_CFLAGS MYTHES_LIBS SYSTEM_MYTHES SYSTEM_LPSOLVE SYSTEM_LIBTEXTCAT SYSTEM_LIBTEXTCAT_DATA HAVE_GETOPT HAVE_READDIR_R SYSTEM_LIBC PSDK_HOME WINDOWS_VISTA_PSDK DIRECTXSDK_HOME DIRECTXSDK_LIB NSIS_PATH BISON FLEX PATCH GNUCP GNUPATCH CYGWIN_PATH ML_EXE ASM_HOME ZIP UNZIP ZIP_HOME ENABLE_GTK ENABLE_KDE ENABLE_KDE4 GCONF_CFLAGS GCONF_LIBS ENABLE_GCONF GNOMEVFS_CFLAGS GNOMEVFS_LIBS ENABLE_GNOMEVFS GTK_CFLAGS GTK_LIBS DBUS_CFLAGS DBUS_LIBS GIO_CFLAGS GIO_LIBS ENABLE_GIO ENABLE_DBUS ENABLE_SYSTRAY_GTK GSTREAMER_CFLAGS GSTREAMER_LIBS ENABLE_GSTREAMER CAIRO_CFLAGS CAIRO_LIBS ENABLE_CAIRO BUILD_PIXMAN SYSTEM_CAIRO ENABLE_OPENGL ENABLE_PRESENTER_EXTRA_UI ENABLE_MINIMIZER ENABLE_PRESENTER_SCREEN POPPLER_CFLAGS POPPLER_LIBS ENABLE_PDFIMPORT SYSTEM_POPPLER ENABLE_MEDIAWIKI SYSTEM_SERVLETAPI SERVLETAPI_JAR ENABLE_REPORTBUILDER SYSTEM_JFREEREPORT SAC_JAR LIBXML_JAR FLUTE_JAR JFREEREPORT_JAR LIBBASE_JAR LIBLAYOUT_JAR LIBLOADER_JAR LIBFORMULA_JAR LIBREPOSITORY_JAR LIBFONTS_JAR LIBSERIALIZER_JAR SYSTEM_APACHE_COMMONS COMMONS_CODEC_JAR COMMONS_LANG_JAR COMMONS_HTTPCLIENT_JAR COMMONS_LOGGING_JAR MOC KDE_CFLAGS KDE_LIBS MOC4 KDE4_CFLAGS KDE4_LIBS ENABLE_LOCKDOWN GOBJECT_CFLAGS GOBJECT_LIBS ENABLE_EVOAB2 ENABLE_KAB WITH_FONTS WITHOUT_PPDS WITHOUT_AFMS SCPDEFS USE_XINERAMA XINERAMA_LINK SYSTEM_LIBRSVG SYSTEM_GDKPIXBUF SYSTEM_GLIB SYSTEM_GETTEXT SYSTEM_LIBCROCO SYSTEM_PANGO SYSTEM_LIBGSF SYSTEM_LIBPNG SYSTEM_LIBJPEG ANT ANT_HOME ANT_LIB OOO_JUNIT_JAR WITH_LANG WITH_POOR_HELP_LOCALIZATIONS WITH_DICT INTRO_BITMAPS ABOUT_BITMAPS OOO_VENDOR UNIXWRAPPERNAME ENABLE_STATIC_GTK ENABLE_LAYOUT VERBOSE nodep LOCAL_SOLVER BUILD_TYPE LIBOBJS LTLIBOBJS' ->>>>>>> other +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS EGREP AWK SED LOCAL_SOLENV _solenv UPD SOURCEVERSION build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os GNUTAR OSVERSION PTHREAD_CFLAGS PTHREAD_LIBS ENABLE_CRASHDUMP VC_STANDARD ENABLE_WERROR ENABLE_DEBUG PRODUCT PROFULLSWITCH PROEXT ENABLE_SYMBOLS DISABLE_STRIP ENABLE_CUPS ENABLE_FONTCONFIG TARFILE_LOCATION DO_FETCH_TARBALLS WITH_BINFILTER ENABLE_DIRECTX DISABLE_ACTIVEX DISABLE_ATL ENABLE_RPATH WITH_MYSPELL_DICTS SYSTEM_DICTS DICT_SYSTEM_DIR HYPH_SYSTEM_DIR THES_SYSTEM_DIR WITH_MINGWIN SHELLPATH GCC_HOME CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT COMPATH GCCVER HAVE_LD_BSYMBOLIC_FUNCTIONS ENABLE_PCH GNUMAKE _cc HAVE_LD_HASH_STYLE PERL MSPDB_PATH COMEX USE_MINGW MIDL_PATH CSC_PATH FRAME_HOME CPP CXX CXXFLAGS ac_ct_CXX CXXCPP SIZEOF_LONG WORDS_BIGENDIAN LFS_CFLAGS VALGRIND_CFLAGS PAM NEW_SHADOW_API PAM_LINK CRYPT_LINK GXX_INCLUDE_PATH MINGW_LIB_INCLUDE_PATH MINGW_BACKWARD_INCLUDE_PATH MINGW_CLIB_DIR MINGW_SHARED_GCCLIB MINGW_GCCLIB_EH MINGW_SHARED_GXXLIB MINGW_SHARED_LIBSTDCPP MINGW_GCCDLL MINGW_GXXDLL EXCEPTIONS STLPORT4 STLPORT_VER USE_SYSTEM_STL USE_CCACHE CCACHE HAVE_GCC_VISIBILITY_FEATURE ALLOC BUILD_VER_STRING SOLAR_JAVA JAVAINTERPRETER JAVACOMPILER JAVACISGCJ JAVADOC AWTLIB JAVAAOTCOMPILER JAVA_HOME JDK JAVAFLAGS JAVAIFLAGS DMAKE BUILD_DMAKE EPM DPKG PKGMK BUILD_EPM RPM PKGFORMAT GPERF BUILD_STAX MINGWCXX ac_ct_MINGWCXX MINGWSTRIP ac_ct_MINGWSTRIP BUILD_UNOWINREG SYSTEM_STDLIBS SYSTEM_ZLIB SYSTEM_JPEG SYSTEM_EXPAT PKG_CONFIG LIBWPD_CFLAGS LIBWPD_LIBS SYSTEM_LIBWPD CPPUNIT_CFLAGS CPPUNIT_LIBS SYSTEM_CPPUNIT FREETYPE_CFLAGS FREETYPE_LIBS USE_FT_EMBOLDEN LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC SYSTEM_LIBXSLT LIBXML_CFLAGS LIBXML_LIBS SYSTEM_LIBXML PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir BZIP2 SYSTEM_PYTHON PYTHON_CFLAGS PYTHON_LIBS HOME SYSTEM_DB DB_VERSION DB_INCLUDES DB_JAR SYSTEM_LUCENE LUCENE_CORE_JAR LUCENE_ANALYZERS_JAR ENABLE_MYSQLC MYSQLCONFIG SYSTEM_MYSQL MYSQL_INC MYSQL_LIB MYSQL_DEFINES LIBMYSQL_PATH SYSTEM_MYSQL_CPPCONN SYSTEM_HSQLDB HSQLDB_JAR SYSTEM_BSH BSH_JAR SERIALIZER_JAR SYSTEM_SAXON SAXON_JAR CURLCONFIG SYSTEM_CURL CURL_CFLAGS CURL_LIBS SYSTEM_MDDS SYSTEM_BOOST SYSTEM_VIGRA SYSTEM_ODBC_HEADERS WITH_MOZILLA WITH_LDAP WITH_OPENLDAP MOZ_NSS_CFLAGS MOZ_NSS_LIBS NSS_LIB MOZ_NSPR_CFLAGS MOZ_NSPR_LIBS NSPR_LIB MOZILLAXPCOM_CFLAGS MOZILLAXPCOM_LIBS MOZILLA_VERSION MOZILLA_TOOLKIT MOZGTK2_CFLAGS MOZGTK2_LIBS MOZLIBREQ_CFLAGS MOZLIBREQ_LIBS BUILD_MOZAB ENABLE_NSS_MODULE MOZILLABUILD SYSTEM_MOZILLA MOZ_FLAVOUR MOZ_INC MOZ_LIB MOZ_LIB_XPCOM MOZ_LDAP_CFLAGS SYSTEM_SANE_HEADER SYSTEM_GENBRK SYSTEM_GENCCODE SYSTEM_GENCMN ICUCONFIG SYSTEM_ICU ICU_MAJOR ICU_MINOR ICU_MICRO GRAPHITE_CFLAGS GRAPHITE_LIBS ENABLE_GRAPHITE SYSTEM_GRAPHITE X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XINC XLIB XAU_LIBS DISABLE_XAW SYSTEM_XRENDER_HEADERS XRENDER_LINK XRANDR_CFLAGS XRANDR_LIBS XRANDR_DLOPEN ENABLE_RANDR DISABLE_NEON NEON_CFLAGS NEON_LIBS SYSTEM_NEON NEON_VERSION OPENSSL_CFLAGS OPENSSL_LIBS SYSTEM_OPENSSL ENABLE_AGG AGG_CFLAGS AGG_LIBS SYSTEM_AGG AGG_VERSION REDLAND_CFLAGS REDLAND_LIBS SYSTEM_REDLAND HUNSPELL_CFLAGS HUNSPELL_LIBS SYSTEM_HUNSPELL SYSTEM_HYPH HYPHEN_LIB MYTHES_CFLAGS MYTHES_LIBS SYSTEM_MYTHES SYSTEM_LPSOLVE SYSTEM_LIBTEXTCAT SYSTEM_LIBTEXTCAT_DATA HAVE_GETOPT HAVE_READDIR_R SYSTEM_LIBC PSDK_HOME WINDOWS_VISTA_PSDK DIRECTXSDK_HOME DIRECTXSDK_LIB NSIS_PATH BISON FLEX PATCH GNUCP GNUPATCH CYGWIN_PATH ML_EXE ASM_HOME ZIP UNZIP ZIP_HOME ENABLE_GTK ENABLE_KDE ENABLE_KDE4 GCONF_CFLAGS GCONF_LIBS ENABLE_GCONF GNOMEVFS_CFLAGS GNOMEVFS_LIBS ENABLE_GNOMEVFS GTK_CFLAGS GTK_LIBS DBUS_CFLAGS DBUS_LIBS GIO_CFLAGS GIO_LIBS ENABLE_GIO ENABLE_DBUS ENABLE_SYSTRAY_GTK GSTREAMER_CFLAGS GSTREAMER_LIBS ENABLE_GSTREAMER CAIRO_CFLAGS CAIRO_LIBS ENABLE_CAIRO BUILD_PIXMAN SYSTEM_CAIRO LIBRSVG_CFLAGS LIBRSVG_LIBS ENABLE_LIBRSVG 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 SYSTEM_LIBRSVG SYSTEM_GDKPIXBUF SYSTEM_GLIB SYSTEM_GETTEXT SYSTEM_LIBCROCO SYSTEM_PANGO SYSTEM_LIBGSF SYSTEM_LIBPNG SYSTEM_LIBJPEG ANT ANT_HOME ANT_LIB OOO_JUNIT_JAR WITH_LANG WITH_POOR_HELP_LOCALIZATIONS WITH_DICT INTRO_BITMAPS ABOUT_BITMAPS OOO_VENDOR UNIXWRAPPERNAME ENABLE_STATIC_GTK ENABLE_LAYOUT VERBOSE nodep LOCAL_SOLVER BUILD_TYPE LIBOBJS LTLIBOBJS' ac_subst_files='' -ac_user_opts=' -enable_option_checking -with_gnu_patch -with_agg -with_gnu_cp -enable_graphite -with_system_graphite -enable_ldap -enable_fetch_external -with_external_tar -with_openldap -enable_lockdown -enable_vba -with_vba_package_format -enable_pch -enable_mozilla -with_fonts -with_ppds -with_afms -enable_epm -with_epm -with_package_format -enable_odk -enable_mathmldtd -enable_evolution2 -with_system_stdlibs -enable_cups -enable_fontconfig -enable_directx -enable_activex -enable_atl -enable_symbols -enable_strip_solver -enable_werror -enable_debug -enable_dbgutil -enable_crashdump -enable_cl_standard -enable_gtk -enable_gstreamer -enable_systray -enable_cairo -with_system_cairo -enable_librsvg -enable_opengl -enable_dbus -enable_gconf -enable_gnome_vfs -enable_gio -enable_static_gtk -enable_layout -enable_build_mozilla -with_mozilla_version -with_mozilla_toolkit -enable_nss_module -enable_kde -enable_kdeab -enable_kde4 -enable_binfilter -enable_rpath -enable_pam -enable_pam_link -enable_crypt_link -enable_xrender_link -enable_randr -enable_randr_link -with_myspell_dicts -with_system_dicts -with_external_dict_dir -with_external_hyph_dir -with_external_thes_dir -with_system_libs -with_system_headers -with_system_jars -with_system_zlib -with_system_openssl -with_system_jpeg -with_system_expat -with_system_libwpd -with_system_libxml -with_system_python -with_system_icu -with_system_poppler -with_system_db -with_system_lucene -with_lucene_core_jar -with_lucene_analyzers_jar -enable_mysql_connector -with_system_mysql -with_libmysql_path -with_system_mysql_cppconn -with_system_hsqldb -with_hsqldb_jar -with_system_beanshell -with_beanshell_jar -enable_presenter_extra_ui -enable_minimizer -enable_presenter_console -enable_pdfimport -enable_wiki_publisher -with_commons_codec_jar -with_commons_lang_jar -with_commons_httpclient_jar -with_commons_logging_jar -with_servlet_api_jar -enable_report_builder -with_system_jfreereport -with_sac_jar -with_libxml_jar -with_flute_jar -with_jfreereport_jar -with_liblayout_jar -with_libloader_jar -with_libformula_jar -with_librepository_jar -with_libfonts_jar -with_libserializer_jar -with_libbase_jar -with_system_saxon -with_saxon_jar -with_system_libxslt -with_system_odbc -with_system_sane -with_system_xrender -with_system_curl -with_system_boost -with_system_mdds -with_system_vigra -enable_neon -enable_Xaw -with_system_neon -with_system_agg -with_system_hunspell -with_system_mythes -with_system_altlinuxhyph -with_system_lpsolve -with_system_libtextcat -with_external_libtextcat_data -with_system_cppunit -with_system_redland -with_system_mozilla -with_stlport -with_jdk_home -with_gxx_include_path -with_java -enable_gcjaot -with_ant_home -with_junit -with_perl_home -with_cl_home -with_mspdb_path -with_midl_path -with_csc_path -with_nsis_path -with_frame_home -with_psdk_home -with_directx_home -with_mozilla_build -with_local_solenv -with_local_solver -enable_check_only -enable_ccache_skip -with_lang -with_poor_help_localizations -with_dict -with_intro_bitmaps -with_about_bitmaps -with_vendor -with_unix_wrapper -with_asm_home -with_os_version -with_unzip_home -with_zip_home -with_mingwin -with_build_version -with_alloc -enable_verbose -enable_dependency_tracking -enable_largefile -with_x -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -CXX -CXXFLAGS -CCC -CXXCPP -XMKMF' - # Initialize some variables set by options. ac_init_help= ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -1244,49 +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= ;; - *) 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 ;; @@ -1308,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- \ @@ -1387,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 ;; @@ -1417,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) @@ -1491,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 ;; @@ -1551,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. @@ -1600,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} ;; @@ -1627,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' @@ -1670,8 +689,8 @@ 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. - If a cross compiler is detected then cross compile mode will be used" >&2 + 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 fi @@ -1683,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. @@ -1771,17 +804,20 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages + -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -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 @@ -1791,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 @@ -1830,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 @@ -2445,975 +1473,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.67 -Copyright (C) 2010 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; } > conftest.i && { - 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; } > conftest.i && { - 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 eval "test \"\${$3+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 eval "test \"\${$3+set}\"" = set; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+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.i 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 eval "test \"\${$3+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 eval "test \"\${$3+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 eval "test \"\${$3+set}\"" = set; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+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.i 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 eval "test \"\${$3+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 eval "test \"\${$4+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.67. 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 ## ----------- ## @@ -3431,6 +1649,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 @@ -3441,13 +1660,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 @@ -3463,115 +1682,104 @@ 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. { echo - $as_echo "## ---------------- ## + cat <<\_ASBOX +## ---------------- ## ## Cache variables. ## -## ---------------- ##" +## ---------------- ## +_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 - $as_echo "## ----------------- ## + cat <<\_ASBOX +## ----------------- ## ## Output variables. ## -## ----------------- ##" +## ----------------- ## +_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 - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" + cat <<\_ASBOX +## ------------- ## +## 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 if test -s confdefs.h; then - $as_echo "## ----------- ## + cat <<\_ASBOX +## ----------- ## ## confdefs.h. ## -## ----------- ##" +## ----------- ## +_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. @@ -3579,137 +1787,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 - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -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 +# 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 "$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;} +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" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 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' @@ -3718,1094 +1901,1111 @@ 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 was given. -if test "${with_gnu_cp+set}" = set; then : - withval=$with_gnu_cp; -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 --enable-graphite was given. -if test "${enable_graphite+set}" = set; then : - enableval=$enable_graphite; -fi +fi; +# Check whether --enable-graphite or --disable-graphite was given. +if test "${enable_graphite+set}" = set; then + enableval="$enable_graphite" +fi; -# Check whether --with-system-graphite was given. -if test "${with_system_graphite+set}" = set; then : - withval=$with_system_graphite; -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 --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-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; -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-gstreamer or --disable-gstreamer was given. +if test "${enable_gstreamer+set}" = set; then + enableval="$enable_gstreamer" -# Check whether --enable-gstreamer was given. -if test "${enable_gstreamer+set}" = set; then : - enableval=$enable_gstreamer; else enable_gstreamer=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-librsvg or --disable-librsvg was given. +if test "${enable_librsvg+set}" = set; then + enableval="$enable_librsvg" -# Check whether --enable-librsvg was given. -if test "${enable_librsvg+set}" = set; then : - enableval=$enable_librsvg; else enable_librsvg=yes -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 - - -# 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-minimizer or --disable-minimizer was given. +if test "${enable_minimizer+set}" = set; then + enableval="$enable_minimizer" -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-presenter-console or --disable-presenter-console was given. +if test "${enable_presenter_console+set}" = set; then + enableval="$enable_presenter_console" +fi; +# Check whether --enable-pdfimport or --disable-pdfimport was given. +if test "${enable_pdfimport+set}" = set; then + enableval="$enable_pdfimport" -# Check whether --with-system-jfreereport was given. -if test "${with_system_jfreereport+set}" = set; then : - withval=$with_system_jfreereport; -fi +fi; +# Check whether --enable-wiki-publisher or --disable-wiki-publisher was given. +if test "${enable_wiki_publisher+set}" = set; then + enableval="$enable_wiki_publisher" +fi; -# 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-mdds was given. -if test "${with_system_mdds+set}" = set; then : - withval=$with_system_mdds; -fi +# Check whether --with-system-mdds or --without-system-mdds was given. +if test "${with_system_mdds+set}" = set; then + withval="$with_system_mdds" +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-libtextcat was given. -if test "${with_system_libtextcat+set}" = set; then : - withval=$with_system_libtextcat; -fi +# Check whether --with-system-libtextcat or --without-system-libtextcat was given. +if test "${with_system_libtextcat+set}" = set; then + withval="$with_system_libtextcat" +fi; -# Check whether --with-external-libtextcat-data was given. -if test "${with_external_libtextcat_data+set}" = set; then : - withval=$with_external_libtextcat_data; -fi +# Check whether --with-external-libtextcat-data or --without-external-libtextcat-data was given. +if test "${with_external_libtextcat_data+set}" = set; then + withval="$with_external_libtextcat_data" +fi; -# 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 was given. -if test "${with_jdk_home+set}" = set; then : - withval=$with_jdk_home; -fi +# Check whether --with-jdk-home or --without-jdk-home was given. +if test "${with_jdk_home+set}" = set; then + withval="$with_jdk_home" +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 or --without-perl-home was given. +if test "${with_perl_home+set}" = set; then + withval="$with_perl_home" -# Check whether --with-perl-home was given. -if test "${with_perl_home+set}" = set; then : - withval=$with_perl_home; -fi - +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 was given. -if test "${with_lang+set}" = set; then : - withval=$with_lang; -fi +# Check whether --with-lang or --without-lang was given. +if test "${with_lang+set}" = set; then + withval="$with_lang" +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 +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-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" -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi +fi; +# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval="$enable_dependency_tracking" +fi; BUILD_TYPE="OOo" @@ -4832,144 +3032,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. @@ -4979,37 +3064,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 [\\/]* | ?:[\\/]*) @@ -5021,41 +3104,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 [\\/]* | ?:[\\/]*) @@ -5067,46 +3151,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 @@ -5124,140 +3209,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 - if test -f "$ac_dir/install-sh"; then +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break - elif test -f "$ac_dir/install.sh"; then + elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break - elif test -f "$ac_dir/shtool"; then + elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { (exit 1); exit 1; }; } fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_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. @@ -5266,22 +3321,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" @@ -5300,10 +3356,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 [\\/]* | ?:[\\/]*) @@ -5316,51 +3372,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*) @@ -5397,8 +3458,8 @@ $as_echo "ok ($build_cpu)" >&6; } test_gstreamer=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 @@ -5423,17 +3484,17 @@ $as_echo "$as_me: WARNING: Disabling gtk-quickstarter - not supported on Mac. Us test_randr=yes test_freetype=yes test_gstreamer=yes - { $as_echo "$as_me:${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" @@ -5444,8 +3505,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) @@ -5477,7 +3538,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 @@ -5485,17 +3548,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 @@ -5504,88 +3567,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 @@ -5593,20 +3658,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 @@ -5618,29 +3685,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 @@ -5655,124 +3722,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 @@ -5782,12 +3849,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 //"` @@ -5802,29 +3873,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 [\\/]* | ?:[\\/]*) @@ -5836,45 +3909,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 @@ -5895,10 +3969,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. @@ -5908,37 +3982,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. @@ -5948,50 +4020,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. @@ -6001,37 +4062,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. @@ -6042,19 +4143,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. @@ -6072,25 +4172,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. @@ -6100,41 +4199,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. @@ -6144,78 +4241,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 @@ -6227,108 +4312,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_error 77 "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 @@ -6336,90 +4425,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 @@ -6431,46 +4468,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 @@ -6484,49 +4520,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 @@ -6537,34 +4579,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 +ac_cv_prog_cc_g=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -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 @@ -6580,14 +4627,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 @@ -6615,17 +4666,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);}; @@ -6640,37 +4686,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 conftest.err conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +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 core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done -rm -f conftest.$ac_ext -CC=$ac_save_CC - +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${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; } ;; - *) - 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; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : -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' @@ -6685,10 +4899,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 [\\/]* | ?:[\\/]*) @@ -6700,29 +4914,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 @@ -6732,18 +4945,22 @@ COMPATH=`echo $COMPATH | $SED "s@/[Bb][Ii][Nn]\\\$@@"`; GCCVER=20995 if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then - { $as_echo "$as_me:${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 @@ -6756,35 +4973,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 @@ -6799,47 +5024,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_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 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 @@ -6847,26 +5097,30 @@ 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 "038100" ; 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_fn_error $? "failed ($GNUMAKE version >= 3.81 needed" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: failed ($GNUMAKE version >= 3.81 needed" >&5 +echo "$as_me: error: failed ($GNUMAKE version >= 3.81 needed" >&2;} + { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:${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 @@ -6874,10 +5128,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 @@ -6888,10 +5144,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 [\\/]* | ?:[\\/]*) @@ -6903,58 +5159,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 @@ -6969,19 +5232,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 @@ -6993,10 +5280,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 [\\/]* | ?:[\\/]*) @@ -7008,44 +5295,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 @@ -7053,10 +5341,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 [\\/]* | ?:[\\/]*) @@ -7068,29 +5356,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"` @@ -7099,38 +5386,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`; @@ -7140,8 +5435,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"` @@ -7162,10 +5457,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 [\\/]* | ?:[\\/]*) @@ -7177,35 +5472,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 [\\/]* | ?:[\\/]*) @@ -7217,50 +5511,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 [\\/]* | ?:[\\/]*) @@ -7272,41 +5567,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) @@ -7315,42 +5609,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 @@ -7362,10 +5662,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 [\\/]* | ?:[\\/]*) @@ -7377,29 +5677,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 @@ -7425,7 +5724,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"` @@ -7433,10 +5734,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 [\\/]* | ?:[\\/]*) @@ -7448,29 +5749,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 @@ -7486,14 +5786,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 @@ -7515,10 +5817,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"` @@ -7534,15 +5838,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" @@ -7556,7 +5860,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 @@ -7565,34 +5873,78 @@ 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.i conftest.$ac_ext +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 fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then break fi @@ -7604,8 +5956,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 @@ -7615,7 +5967,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 @@ -7624,40 +5980,85 @@ 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.i conftest.$ac_ext +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 fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - +rm -f conftest.err conftest.$ac_ext +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 @@ -7667,12 +6068,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 @@ -7687,23 +6092,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 @@ -7713,14 +6146,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 @@ -7730,13 +6167,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)) @@ -7756,50 +6196,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. @@ -7809,41 +6260,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. @@ -7853,77 +6302,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 @@ -7937,34 +6373,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 @@ -7975,80 +6432,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" @@ -8062,7 +6615,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 @@ -8071,34 +6628,78 @@ 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 -else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +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 fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then break fi @@ -8110,8 +6711,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 @@ -8121,7 +6722,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 @@ -8130,40 +6735,85 @@ 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.i conftest.$ac_ext +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 fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - +rm -f conftest.err conftest.$ac_ext +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 @@ -8181,15 +6831,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" @@ -8203,7 +6853,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 @@ -8212,34 +6866,78 @@ 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.i conftest.$ac_ext +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 fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then break fi @@ -8251,8 +6949,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 @@ -8262,7 +6960,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 @@ -8271,40 +6973,85 @@ 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.i conftest.$ac_ext +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 fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - +rm -f conftest.err conftest.$ac_ext +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 @@ -8317,15 +7064,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 -" -if eval test \"x\$"$as_ac_Header"\" = 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 @@ -8333,287 +7135,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_error 77 "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 + 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 *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +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 - ac_cv_c_bigendian=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 - 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 + # 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 +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 core conftest.err conftest.$ac_objext conftest.$ac_ext +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. @@ -8632,34 +7825,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. @@ -8678,11 +7926,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 @@ -8702,33 +7979,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. @@ -8747,11 +8051,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 @@ -8771,64 +8104,494 @@ 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 +rm -f conftest* +fi + +if test -n "$ac_cv_sys_file_offset_bits"; then + LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" +fi +if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then + LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES" +fi + + +if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then + VALGRIND_CFLAGS="" + prev_cppflags=$CPPFLAGS + if test -z "$VALGRIND_CFLAGS"; then + CPPFLAGS="-I/usr/include/valgrind" + if test "${ac_cv_header_valgrind_h+set}" = set; then + echo "$as_me:$LINENO: checking for valgrind.h" >&5 +echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 +if test "${ac_cv_header_valgrind_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 +echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking valgrind.h usability" >&5 +echo $ECHO_N "checking valgrind.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 valgrind.h presence" >&5 +echo $ECHO_N "checking valgrind.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: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: valgrind.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 valgrind.h" >&5 +echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 +if test "${ac_cv_header_valgrind_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_valgrind_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 +echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 + +fi +if test $ac_cv_header_valgrind_h = yes; then + VALGRIND_CFLAGS=$CPPFLAGS +else + unset ac_cv_header_valgrind_h +fi + + + fi + if test -z "$VALGRIND_CFLAGS"; then + CPPFLAGS="-I/usr/local/include/valgrind" + if test "${ac_cv_header_valgrind_h+set}" = set; then + echo "$as_me:$LINENO: checking for valgrind.h" >&5 +echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 +if test "${ac_cv_header_valgrind_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 +echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking valgrind.h usability" >&5 +echo $ECHO_N "checking valgrind.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 valgrind.h presence" >&5 +echo $ECHO_N "checking valgrind.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: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: valgrind.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 valgrind.h" >&5 +echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 +if test "${ac_cv_header_valgrind_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_valgrind_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 +echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 + +fi +if test $ac_cv_header_valgrind_h = yes; then + VALGRIND_CFLAGS=$CPPFLAGS +fi + + + fi + if test -n "$VALGRIND_CFLAGS"; then + CPPFLAGS=$VALGRIND_CFLAGS + if test "${ac_cv_header_memcheck_h+set}" = set; then + echo "$as_me:$LINENO: checking for memcheck.h" >&5 +echo $ECHO_N "checking for memcheck.h... $ECHO_C" >&6 +if test "${ac_cv_header_memcheck_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_memcheck_h" >&5 +echo "${ECHO_T}$ac_cv_header_memcheck_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking memcheck.h usability" >&5 +echo $ECHO_N "checking memcheck.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 memcheck.h presence" >&5 +echo $ECHO_N "checking memcheck.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 -if test -n "$ac_cv_sys_file_offset_bits"; then - LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" -fi -if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then - LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES" + 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 - -if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then - VALGRIND_CFLAGS="" - prev_cppflags=$CPPFLAGS - if test -z "$VALGRIND_CFLAGS"; then - CPPFLAGS="-I/usr/include/valgrind" - ac_fn_c_check_header_mongrel "$LINENO" "valgrind.h" "ac_cv_header_valgrind_h" "$ac_includes_default" -if test "x$ac_cv_header_valgrind_h" = x""yes; then : - VALGRIND_CFLAGS=$CPPFLAGS +# 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: memcheck.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: memcheck.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: memcheck.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: memcheck.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: memcheck.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: memcheck.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: memcheck.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: memcheck.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: memcheck.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: memcheck.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: memcheck.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: memcheck.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: memcheck.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: memcheck.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: memcheck.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: memcheck.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 memcheck.h" >&5 +echo $ECHO_N "checking for memcheck.h... $ECHO_C" >&6 +if test "${ac_cv_header_memcheck_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - unset ac_cv_header_valgrind_h + ac_cv_header_memcheck_h=$ac_header_preproc fi +echo "$as_me:$LINENO: result: $ac_cv_header_memcheck_h" >&5 +echo "${ECHO_T}$ac_cv_header_memcheck_h" >&6 - - fi - if test -z "$VALGRIND_CFLAGS"; then - CPPFLAGS="-I/usr/local/include/valgrind" - ac_fn_c_check_header_mongrel "$LINENO" "valgrind.h" "ac_cv_header_valgrind_h" "$ac_includes_default" -if test "x$ac_cv_header_valgrind_h" = x""yes; then : - VALGRIND_CFLAGS=$CPPFLAGS fi - - - fi - if test -n "$VALGRIND_CFLAGS"; then - CPPFLAGS=$VALGRIND_CFLAGS - ac_fn_c_check_header_mongrel "$LINENO" "memcheck.h" "ac_cv_header_memcheck_h" "$ac_includes_default" -if test "x$ac_cv_header_memcheck_h" = x""yes; then : - +if test $ac_cv_header_memcheck_h = yes; then + : else VALGRIND_CFLAGS="" fi @@ -8840,74 +8603,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 @@ -8915,17 +8983,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 @@ -8936,11 +9006,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 @@ -8957,7 +9027,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 @@ -8974,10 +9048,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 @@ -8985,7 +9084,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 @@ -9004,10 +9107,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 @@ -9017,7 +9145,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 @@ -9036,10 +9168,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 @@ -9050,28 +9207,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 @@ -9090,49 +9249,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 @@ -9140,12 +9328,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 @@ -9164,24 +9354,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. @@ -9191,41 +9377,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. @@ -9235,77 +9419,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 @@ -9319,34 +9490,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 @@ -9357,64 +9549,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 -/* 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 +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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - ; - 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 -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - 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' @@ -9424,8 +9712,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 }'` @@ -9439,26 +9727,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); @@ -9483,24 +9778,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 @@ -9518,18 +9828,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 @@ -9547,16 +9857,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 @@ -9565,41 +9875,41 @@ _ACEOF if test -n "$_mingw_backward_include_path"; then _mingw_backward_include_path=`cygpath -d $_mingw_backward_include_path` _mingw_backward_include_path=`cygpath -u $_mingw_backward_include_path` - { $as_echo "$as_me:${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 MINGW_SHARED_LIBSTDCPP= if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then MINGW_SHARED_LIBSTDCPP=stdc++_s @@ -9608,23 +9918,23 @@ $as_echo_n "checking whether to use dynamic libstdc++... " >&6; } MINGW_SHARED_LIBSTDCPP=stdc++.dll fi if test -n "$MINGW_SHARED_LIBSTDCPP" ; then - { $as_echo "$as_me:${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/lib$MINGW_SHARED_LIBSTDCPP.a | sed -ne 's@.* _libstdc__\(.*\)_dll_iname@libstdc++\1.dll@p' | uniq | sed -e 's@_@?@g'` MINGW_GXXDLL=`cd $COMPATH/bin && ls $MINGW_GXXDLL_pattern 2>/dev/null` if test -n "$MINGW_GXXDLL"; then MINGW_SHARED_LIBSTDCPP=-l$MINGW_SHARED_LIBSTDCPP MINGW_SHARED_GXXLIB=YES - { $as_echo "$as_me:${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 MINGW_SHARED_LIBSTDCPP= - { $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` @@ -9638,36 +9948,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' @@ -9675,7 +9985,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 @@ -9690,18 +10004,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' @@ -9714,8 +10052,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 @@ -9729,15 +10067,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 @@ -9751,17 +10089,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 @@ -9775,15 +10113,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 @@ -9797,19 +10135,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 @@ -9836,100 +10174,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.i conftest.$ac_ext +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 @@ -9945,11 +10317,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 @@ -9960,47 +10336,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 [\\/]* | ?:[\\/]*) @@ -10012,44 +10413,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' @@ -10057,7 +10457,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 @@ -10068,20 +10472,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 @@ -10091,27 +10519,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; @@ -10124,42 +10558,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 @@ -10169,9 +10633,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; @@ -10184,19 +10652,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 @@ -10205,8 +10697,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 { @@ -10234,11 +10726,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 @@ -10254,19 +10746,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" -if eval test \"x\$"$as_ac_var"\" = 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 @@ -10274,48 +10859,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 @@ -10323,54 +10939,85 @@ _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" = "jemalloc"; then if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: jemalloc" >&5 -$as_echo "jemalloc" >&6; } + echo "$as_me:$LINENO: result: jemalloc" >&5 +echo "${ECHO_T}jemalloc" >&6 save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -pthread" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc in -ljemalloc" >&5 -$as_echo_n "checking for malloc in -ljemalloc... " >&6; } -if test "${ac_cv_lib_jemalloc_malloc+set}" = set; then : - $as_echo_n "(cached) " >&6 + +echo "$as_me:$LINENO: checking for malloc in -ljemalloc" >&5 +echo $ECHO_N "checking for malloc in -ljemalloc... $ECHO_C" >&6 +if test "${ac_cv_lib_jemalloc_malloc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljemalloc $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_jemalloc_malloc=yes else - ac_cv_lib_jemalloc_malloc=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_jemalloc_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_jemalloc_malloc" >&5 -$as_echo "$ac_cv_lib_jemalloc_malloc" >&6; } -if test "x$ac_cv_lib_jemalloc_malloc" = x""yes; then : +echo "$as_me:$LINENO: result: $ac_cv_lib_jemalloc_malloc" >&5 +echo "${ECHO_T}$ac_cv_lib_jemalloc_malloc" >&6 +if test $ac_cv_lib_jemalloc_malloc = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBJEMALLOC 1 _ACEOF @@ -10378,22 +11025,117 @@ _ACEOF LIBS="-ljemalloc $LIBS" else - as_fn_error $? "jemalloc not found or functional. Install the jemalloc allocator." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: jemalloc not found or functional. Install the jemalloc allocator." >&5 +echo "$as_me: error: jemalloc not found or functional. Install the jemalloc allocator." >&2;} + { (exit 1); exit 1; }; } fi ALLOC="JEMALLOC"; CFLAGS=$save_CFLAGS else - { $as_echo "$as_me:${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" -if eval test \"x\$"$as_ac_var"\" = 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 @@ -10402,38 +11144,38 @@ done fi 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 @@ -10460,10 +11202,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 [\\/]* | ?:[\\/]*) @@ -10475,35 +11217,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 @@ -10513,26 +11256,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 @@ -10552,13 +11297,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 @@ -10588,15 +11335,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 @@ -10608,10 +11360,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]$,,"` @@ -10621,7 +11375,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 @@ -10641,10 +11397,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 [\\/]* | ?:[\\/]*) @@ -10656,29 +11412,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 @@ -10686,7 +11441,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 @@ -10702,11 +11459,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" @@ -10725,10 +11482,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 [\\/]* | ?:[\\/]*) @@ -10740,29 +11497,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 @@ -10775,10 +11531,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 [\\/]* | ?:[\\/]*) @@ -10790,33 +11546,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 @@ -10848,33 +11605,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"` @@ -10896,10 +11657,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 @@ -10921,12 +11682,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 @@ -10937,61 +11698,227 @@ $as_echo "$as_me: WARNING: in case JAVA_HOME is incorrectly set, some projects w fi 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; } - 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 : +AWTLIB= +if test "$SOLAR_JAVA" != ""; then + echo "$as_me:$LINENO: checking for jawt lib name" >&5 +echo $ECHO_N "checking for jawt lib name... $ECHO_C" >&6 + 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 + 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 @@ -11010,93 +11937,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 - as_fn_error $? "jni.h could not be found." "$LINENO" 5 + 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 + { { 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 @@ -11109,24 +12230,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 @@ -11136,10 +12257,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 [\\/]* | ?:[\\/]*) @@ -11151,37 +12272,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 @@ -11198,10 +12318,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 [\\/]* | ?:[\\/]*) @@ -11213,36 +12333,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 @@ -11251,48 +12370,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 [\\/]* | ?:[\\/]*) @@ -11304,30 +12423,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." @@ -11335,38 +12453,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" @@ -11375,8 +12499,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 @@ -11412,7 +12536,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 @@ -11420,7 +12546,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 @@ -11437,17 +12581,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 @@ -11462,22 +12607,26 @@ $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; }; } elif "$RPM" --usage 2>&1 | $EGREP -- -bb >/dev/null; then 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 else - as_fn_error $? "cannot build packages. Try installing rpmbuild." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: cannot build packages. Try installing rpmbuild." >&5 +echo "$as_me: error: cannot build packages. Try installing rpmbuild." >&2;} + { (exit 1); exit 1; }; } fi fi if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then # Extract the first word of "dpkg", so it can be a program name with args. set dummy dpkg; ac_word=$2 -{ $as_echo "$as_me:${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 [\\/]* | ?:[\\/]*) @@ -11489,76 +12638,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;} @@ -11569,10 +12723,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 [\\/]* | ?:[\\/]*) @@ -11584,32 +12738,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 @@ -11617,8 +12772,8 @@ 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 PKGFORMAT=native fi @@ -11627,10 +12782,10 @@ fi # Extract the first word of "gperf", so it can be a program name with args. set dummy gperf; ac_word=$2 -{ $as_echo "$as_me:${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 [\\/]* | ?:[\\/]*) @@ -11642,87 +12797,95 @@ 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 stax" >&5 -$as_echo_n "checking whether to build the stax... " >&6; } +echo "$as_me:$LINENO: checking whether to build the stax" >&5 +echo $ECHO_N "checking whether to build the stax... $ECHO_C" >&6 if test -f "./stax/download/jsr173_1.0_api.jar"; then BUILD_STAX=NO - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, will use the prebuilt stax/download/jsr173_1.0_api.jar" >&5 -$as_echo "no, will use the prebuilt stax/download/jsr173_1.0_api.jar" >&6; } + echo "$as_me:$LINENO: result: no, will use the prebuilt stax/download/jsr173_1.0_api.jar" >&5 +echo "${ECHO_T}no, will use the prebuilt stax/download/jsr173_1.0_api.jar" >&6 else BUILD_STAX=YES - { $as_echo "$as_me:${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 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" >&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" "$LINENO" 5 + 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 @@ -11730,10 +12893,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. @@ -11743,37 +12906,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. @@ -11783,53 +12944,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/ | $SED -e s/c++/strip/`"; then MINGSTRIP=false; else MINGWSTRIP=$(basename $(echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/)); fi @@ -11837,10 +12992,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/ | $SED -e s/c++/strip/`", so it can be a program name with args. set dummy ${ac_tool_prefix}`echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/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. @@ -11850,37 +13005,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/ | $SED -e s/c++/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/ | $SED -e s/c++/strip/`", so it can be a program name with args. set dummy `echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/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. @@ -11890,47 +13043,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/ | $SED -e s/c++/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' @@ -11948,37 +13093,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 @@ -11988,37 +13162,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 @@ -12028,11 +13231,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 @@ -12051,24 +13392,24 @@ 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 -{ $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 @@ -12076,189 +13417,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 - { $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_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; } +echo "$as_me:$LINENO: checking which jpeg to use" >&5 +echo $ECHO_N "checking which jpeg to use... $ECHO_C" >&6 if test -n "$with_system_jpeg" -o -n "$with_system_libs" && \ test "$with_system_jpeg" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}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+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 +fi +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 @@ -12266,24 +14108,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 @@ -12291,10 +14133,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 [\\/]* | ?:[\\/]*) @@ -12306,30 +14148,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 @@ -12340,25 +14181,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="" @@ -12379,12 +14220,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 @@ -12392,12 +14235,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: @@ -12406,10 +14249,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 [\\/]* | ?:[\\/]*) @@ -12421,30 +14264,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 @@ -12455,25 +14297,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.0 " >&5 -$as_echo_n "checking for cppunit >= 1.12.0 ... " >&6; } + echo "$as_me:$LINENO: checking for cppunit >= 1.12.0 " >&5 +echo $ECHO_N "checking for cppunit >= 1.12.0 ... $ECHO_C" >&6 if $PKG_CONFIG --exists "cppunit >= 1.12.0 " ; then - { $as_echo "$as_me:${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.0 "` - { $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.0 "` - { $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="" @@ -12494,12 +14336,14 @@ $as_echo "$CPPUNIT_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_error $? "Library requirements (cppunit >= 1.12.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: Library requirements (cppunit >= 1.12.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (cppunit >= 1.12.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:${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 @@ -12508,18 +14352,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 [\\/]* | ?:[\\/]*) @@ -12531,30 +14375,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 @@ -12565,25 +14408,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="" @@ -12604,7 +14447,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 @@ -12617,43 +14462,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" @@ -12686,26 +14559,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 @@ -12715,10 +14588,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 [\\/]* | ?:[\\/]*) @@ -12730,30 +14603,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 @@ -12764,25 +14636,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="" @@ -12803,7 +14675,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 @@ -12811,10 +14685,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 [\\/]* | ?:[\\/]*) @@ -12826,36 +14700,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 @@ -12864,25 +14739,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 @@ -12892,10 +14767,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 [\\/]* | ?:[\\/]*) @@ -12907,30 +14782,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 @@ -12941,25 +14815,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="" @@ -12980,15 +14854,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 @@ -12996,27 +14872,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. @@ -13028,20 +14904,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 @@ -13057,23 +14936,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 [\\/]* | ?:[\\/]*) @@ -13085,48 +14965,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 @@ -13137,30 +15018,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 @@ -13168,16 +15049,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 @@ -13199,11 +15080,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 - as_fn_error $? "Python headers not found" "$LINENO" 5 + 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 + { { echo "$as_me:$LINENO: error: Python headers not found" >&5 +echo "$as_me: error: Python headers not found" >&2;} + { (exit 1); exit 1; }; } fi @@ -13211,8 +15230,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=""; @@ -13221,10 +15240,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 [\\/]* | ?:[\\/]*) @@ -13236,31 +15255,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 @@ -13270,27 +15290,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 @@ -13298,15 +15412,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 @@ -13317,47 +15436,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 @@ -13365,14 +15528,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 @@ -13381,70 +15546,78 @@ 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-core.jar" >&5 -$as_echo_n "checking for /usr/share/java/lucene-core.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_lucene_core_jar+set}" = set; then : - $as_echo_n "(cached) " >&6 + echo "$as_me:$LINENO: checking for /usr/share/java/lucene-core.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/lucene-core.jar... $ECHO_C" >&6 +if test "${ac_cv_file__usr_share_java_lucene_core_jar+set}" = set; then + 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.jar"; then ac_cv_file__usr_share_java_lucene_core_jar=yes else ac_cv_file__usr_share_java_lucene_core_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_lucene_core_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_lucene_core_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_lucene_core_jar" = x""yes; then : +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_core_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_lucene_core_jar" >&6 +if test $ac_cv_file__usr_share_java_lucene_core_jar = yes; then LUCENE_CORE_JAR=/usr/share/java/lucene-core.jar else - { $as_echo "$as_me:${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 @@ -13457,70 +15630,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -13529,32 +15711,35 @@ 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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lucene is version 2.x" >&5 -$as_echo_n "checking whether lucene is version 2.x... " >&6; } + echo "$as_me:$LINENO: checking whether lucene is version 2.x" >&5 +echo $ECHO_N "checking whether lucene is version 2.x... $ECHO_C" >&6 export LUCENE_CORE_JAR if $PERL -e 'use Archive::Zip; my $file = "$ENV{'LUCENE_CORE_JAR'}"; @@ -13565,15 +15750,17 @@ $as_echo_n "checking whether lucene is version 2.x... " >&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, you need lucene 2" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: no, you need lucene 2" >&5 +echo "$as_me: error: no, you need lucene 2" >&2;} + { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:${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 @@ -13581,42 +15768,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 [\\/]* | ?:[\\/]*) @@ -13628,68 +15817,73 @@ 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 @@ -13698,7 +15892,7 @@ fi -ac_ext=cpp +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -13706,58 +15900,225 @@ 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; } +echo "$as_me:$LINENO: checking MySQL Connector/C++" >&5 +echo $ECHO_N "checking MySQL Connector/C++... $ECHO_C" >&6 if test -n "$with_system_mysql_cppconn" -o -n "$with_system_libs" && \ test "$with_system_mysql_cppconn" != "no" && test "$with_system_libs" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_MYSQL_CPPCONN=YES - ac_ext=cpp + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - 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 : + 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 @@ -13765,18 +16126,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 @@ -13793,17 +16161,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' @@ -13811,15 +16194,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 @@ -13833,41 +16218,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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.x" >&5 -$as_echo_n "checking whether hsqldb is 1.8.0.x... " >&6; } + echo "$as_me:$LINENO: checking whether hsqldb is 1.8.0.x" >&5 +echo $ECHO_N "checking whether hsqldb is 1.8.0.x... $ECHO_C" >&6 export HSQLDB_JAR if $PERL -e 'use Archive::Zip; my $file = "$ENV{'HSQLDB_JAR'}"; @@ -13890,56 +16278,61 @@ $as_echo_n "checking whether hsqldb is 1.8.0.x... " >&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, you need hsqldb >= 1.8.0.9 but < 1.8.1" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: no, you need hsqldb >= 1.8.0.9 but < 1.8.1" >&5 +echo "$as_me: error: no, you need hsqldb >= 1.8.0.9 but < 1.8.1" >&2;} + { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:${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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -13947,70 +16340,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 @@ -14023,60 +16424,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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; @@ -14117,36 +16524,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 @@ -14160,20 +16571,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 [\\/]* | ?:[\\/]*) @@ -14185,49 +16596,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 @@ -14235,84 +16649,640 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which mdds to use" >&5 -$as_echo_n "checking which mdds to use... " >&6; } -if test -n "$with_system_mdds" -o -n "$with_system_headers" && \ - test "$with_system_mdds" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } - SYSTEM_MDDS=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 +echo "$as_me:$LINENO: checking which mdds to use" >&5 +echo $ECHO_N "checking which mdds to use... $ECHO_C" >&6 +if test -n "$with_system_mdds" -o -n "$with_system_headers" && \ + test "$with_system_mdds" != "no"; then + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 + SYSTEM_MDDS=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_mdds_flat_segment_tree_hpp+set}" = set; then + echo "$as_me:$LINENO: checking for mdds/flat_segment_tree.hpp" >&5 +echo $ECHO_N "checking for mdds/flat_segment_tree.hpp... $ECHO_C" >&6 +if test "${ac_cv_header_mdds_flat_segment_tree_hpp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_mdds_flat_segment_tree_hpp" >&5 +echo "${ECHO_T}$ac_cv_header_mdds_flat_segment_tree_hpp" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking mdds/flat_segment_tree.hpp usability" >&5 +echo $ECHO_N "checking mdds/flat_segment_tree.hpp usability... $ECHO_C" >&6 +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 mdds/flat_segment_tree.hpp presence" >&5 +echo $ECHO_N "checking mdds/flat_segment_tree.hpp presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +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: mdds/flat_segment_tree.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: present but cannot be compiled" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for mdds/flat_segment_tree.hpp" >&5 +echo $ECHO_N "checking for mdds/flat_segment_tree.hpp... $ECHO_C" >&6 +if test "${ac_cv_header_mdds_flat_segment_tree_hpp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_mdds_flat_segment_tree_hpp=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_mdds_flat_segment_tree_hpp" >&5 +echo "${ECHO_T}$ac_cv_header_mdds_flat_segment_tree_hpp" >&6 + +fi +if test $ac_cv_header_mdds_flat_segment_tree_hpp = yes; then + : +else + { { echo "$as_me:$LINENO: error: mdds/flat_segment_tree.hpp not found. install mdds" >&5 +echo "$as_me: error: mdds/flat_segment_tree.hpp not found. install mdds" >&2;} + { (exit 1); exit 1; }; } +fi + + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +else + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 + BUILD_TYPE="$BUILD_TYPE MDDS" + SYSTEM_MDDS=NO +fi + + +echo "$as_me:$LINENO: checking which boost to use" >&5 +echo $ECHO_N "checking which boost to use... $ECHO_C" >&6 +if test -n "$with_system_boost" -o -n "$with_system_headers" && \ + test "$with_system_boost" != "no"; then + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 + SYSTEM_BOOST=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_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_fn_cxx_check_header_mongrel "$LINENO" "mdds/flat_segment_tree.hpp" "ac_cv_header_mdds_flat_segment_tree_hpp" "$ac_includes_default" -if test "x$ac_cv_header_mdds_flat_segment_tree_hpp" = x""yes; then : +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 - as_fn_error $? "mdds/flat_segment_tree.hpp not found. install mdds" "$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_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 +# 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_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 -$as_echo "internal" >&6; } - BUILD_TYPE="$BUILD_TYPE MDDS" - SYSTEM_MDDS=NO + { { echo "$as_me:$LINENO: error: boost/spirit/include/classic_core.hpp not found. install boost >= 1.36" >&5 +echo "$as_me: error: boost/spirit/include/classic_core.hpp not found. install boost >= 1.36" >&2;} + { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which boost to use" >&5 -$as_echo_n "checking which boost to use... " >&6; } -if test -n "$with_system_boost" -o -n "$with_system_headers" && \ - test "$with_system_boost" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } - SYSTEM_BOOST=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 + 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_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 : +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/shared_ptr.hpp not found. install boost" "$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/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 : - +# 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 - as_fn_error $? "boost/spirit/include/classic_core.hpp not found. install boost >= 1.36" "$LINENO" 5 + 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 - - 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 : - +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 @@ -14324,18 +17294,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 @@ -14345,31 +17341,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; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 BUILD_TYPE="$BUILD_TYPE BOOST" SYSTEM_BOOST=NO fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which vigra to use" >&5 -$as_echo_n "checking which vigra to use... " >&6; } +echo "$as_me:$LINENO: checking which vigra to use" >&5 +echo $ECHO_N "checking which vigra to use... $ECHO_C" >&6 if test -n "$with_system_vigra" -o -n "$with_system_headers" && \ test "$with_system_vigra" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_VIGRA=YES - ac_ext=cpp + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - 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 : + 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 +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 @@ -14380,150 +17514,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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +fi + +echo "$as_me:$LINENO: checking whether to build LDAP configuration backend" >&5 +echo $ECHO_N "checking whether to build LDAP configuration backend... $ECHO_C" >&6 +if test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then + if test "$enable_mozilla" = "yes" || test "$with_openldap" = "yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + WITH_LDAP=YES + else + echo "$as_me:$LINENO: result: no. Either Mozilla or OpenLDAP needed" >&5 +echo "${ECHO_T}no. Either Mozilla or OpenLDAP needed" >&6 + WITH_LDAP=NO + fi +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + WITH_LDAP=NO +fi + +if test "$WITH_LDAP" = "YES"; then + echo "$as_me:$LINENO: checking which LDAP SDK to use" >&5 +echo $ECHO_N "checking which LDAP SDK to use... $ECHO_C" >&6 + if test -n "$with_openldap" && test "$with_openldap" != "no"; then + echo "$as_me:$LINENO: result: OpenLDAP" >&5 +echo "${ECHO_T}OpenLDAP" >&6 + WITH_OPENLDAP=YES + +for ac_header in ldap.h +do +as_ac_Header=`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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build LDAP configuration backend" >&5 -$as_echo_n "checking whether to build LDAP configuration backend... " >&6; } -if test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then - if test "$enable_mozilla" = "yes" || test "$with_openldap" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "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; } - WITH_LDAP=NO - fi +# 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - WITH_LDAP=NO + 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 -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; } - if test -n "$with_openldap" && test "$with_openldap" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenLDAP" >&5 -$as_echo "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 : +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 @@ -14531,48 +17972,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 @@ -14580,12 +18052,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 @@ -14594,16 +18068,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 @@ -14618,8 +18092,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 @@ -14627,10 +18101,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 [\\/]* | ?:[\\/]*) @@ -14642,30 +18116,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 @@ -14676,25 +18149,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="" @@ -14725,10 +18198,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 [\\/]* | ?:[\\/]*) @@ -14740,30 +18213,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 @@ -14774,25 +18246,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="" @@ -14813,7 +18285,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 @@ -14828,10 +18302,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 [\\/]* | ?:[\\/]*) @@ -14843,30 +18317,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 @@ -14877,25 +18350,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="" @@ -14916,7 +18389,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`" @@ -14928,10 +18403,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 [\\/]* | ?:[\\/]*) @@ -14943,30 +18418,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 @@ -14977,25 +18451,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="" @@ -15016,7 +18490,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 @@ -15028,10 +18504,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 [\\/]* | ?:[\\/]*) @@ -15043,30 +18519,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 @@ -15077,25 +18552,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="" @@ -15130,10 +18605,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 [\\/]* | ?:[\\/]*) @@ -15145,30 +18620,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 @@ -15179,25 +18653,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="" @@ -15218,7 +18692,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` @@ -15236,43 +18712,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 @@ -15280,9 +18785,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" @@ -15291,16 +18800,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." "$LINENO" 5 +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." >&2;} + { (exit 1); exit 1; }; } fi fi @@ -15311,48 +18824,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 @@ -15369,55 +18882,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" >&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" "$LINENO" 5 +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 @@ -15425,11 +18946,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 @@ -15439,59 +18962,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 [\\/]* | ?:[\\/]*) @@ -15503,30 +19032,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 @@ -15537,25 +19065,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="" @@ -15574,10 +19102,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 @@ -15587,10 +19117,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 [\\/]* | ?:[\\/]*) @@ -15602,30 +19132,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 @@ -15636,25 +19165,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="" @@ -15679,7 +19208,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 @@ -15691,10 +19222,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 [\\/]* | ?:[\\/]*) @@ -15706,30 +19237,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 @@ -15740,25 +19270,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="" @@ -15783,7 +19313,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 @@ -15791,10 +19323,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 [\\/]* | ?:[\\/]*) @@ -15806,30 +19338,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 @@ -15840,25 +19371,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="" @@ -15883,7 +19414,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 @@ -15892,10 +19425,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 [\\/]* | ?:[\\/]*) @@ -15907,30 +19440,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 @@ -15941,25 +19473,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="" @@ -15984,7 +19516,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 @@ -15992,10 +19526,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 [\\/]* | ?:[\\/]*) @@ -16007,30 +19541,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 @@ -16041,25 +19574,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="" @@ -16084,7 +19617,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 @@ -16104,55 +19639,219 @@ 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 - as_fn_error $? "icu headers not found." "$LINENO" 5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + echo "$as_me:$LINENO: result: checked." >&5 +echo "${ECHO_T}checked." >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { { 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.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -16161,10 +19860,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Extract the first word of "genbrk", so it can be a program name with args. set dummy genbrk; ac_word=$2 -{ $as_echo "$as_me:${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 [\\/]* | ?:[\\/]*) @@ -16177,38 +19876,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 [\\/]* | ?:[\\/]*) @@ -16221,38 +19921,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 [\\/]* | ?:[\\/]*) @@ -16265,39 +19966,40 @@ 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 # Extract the first word of "icu-config", so it can be a program name with args. set dummy icu-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ICUCONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_ICUCONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ICUCONFIG in [\\/]* | ?:[\\/]*) @@ -16309,46 +20011,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_ICUCONFIG="$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 ICUCONFIG=$ac_cv_path_ICUCONFIG + if test -n "$ICUCONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICUCONFIG" >&5 -$as_echo "$ICUCONFIG" >&6; } + echo "$as_me:$LINENO: result: $ICUCONFIG" >&5 +echo "${ECHO_T}$ICUCONFIG" >&6 else - { $as_echo "$as_me:${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 ICU version" >&5 -$as_echo_n "checking ICU version... " >&6; } + echo "$as_me:$LINENO: checking ICU version" >&5 +echo $ECHO_N "checking ICU version... $ECHO_C" >&6 ICU_VERSION=`$ICUCONFIG --version` ICU_MAJOR=`$ICUCONFIG --version | cut -d"." -f1` ICU_MINOR=`$ICUCONFIG --version | cut -d"." -f2` ICU_MICRO=`$ICUCONFIG --version | cut -d"." -f3` if test "$ICU_MAJOR" -ge "4"; then - { $as_echo "$as_me:${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 suitable, only >= 4.0 supported currently" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: not suitable, only >= 4.0 supported currently" >&5 +echo "$as_me: error: not suitable, only >= 4.0 supported currently" >&2;} + { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:${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 @@ -16361,18 +20064,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 @@ -16380,10 +20083,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 [\\/]* | ?:[\\/]*) @@ -16395,30 +20098,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 @@ -16429,25 +20131,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="" @@ -16468,18 +20170,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 @@ -16489,13 +20193,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 @@ -16503,7 +20209,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 @@ -16515,47 +20223,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 - # 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 +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. + 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 @@ -16563,41 +20268,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 @@ -16617,24 +20318,48 @@ ac_x_header_dirs=' /usr/openwin/share/include' if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Xlib.h. + # Guess where to find include files, by looking for Intrinsic.h. # First, try using that file with no special directory specified. - cat 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 _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 + if test -r "$ac_dir/X11/Intrinsic.h"; then ac_x_includes=$ac_dir break fi done fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then @@ -16642,76 +20367,102 @@ if test "$ac_x_libraries" = no; then # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS - LIBS="-lX11 $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + LIBS="-lXt $LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include int main () { -XrmInitialize () +XtMalloc (0) ; 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 @@ -16724,12 +20475,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 @@ -16740,13 +20495,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 @@ -16757,21 +20547,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. @@ -16785,112 +20602,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, @@ -16901,90 +20802,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 @@ -16998,147 +21041,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 @@ -17154,43 +21539,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 @@ -17207,92 +21620,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 @@ -17324,76 +21799,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 @@ -17401,7 +22005,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 @@ -17411,23 +22017,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 @@ -17438,89 +22187,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 @@ -17528,20 +22459,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" @@ -17550,10 +22483,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 [\\/]* | ?:[\\/]*) @@ -17565,30 +22498,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 @@ -17599,25 +22531,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="" @@ -17642,52 +22574,219 @@ $as_echo "$XRANDR_LIBS" >&6; } fi 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 : + 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 + +# 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 + 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/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 @@ -17695,51 +22794,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 [\\/]* | ?:[\\/]*) @@ -17751,30 +22852,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 @@ -17785,25 +22885,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.26.0" >&5 -$as_echo_n "checking for neon >= 0.26.0... " >&6; } + echo "$as_me:$LINENO: checking for neon >= 0.26.0" >&5 +echo $ECHO_N "checking for neon >= 0.26.0... $ECHO_C" >&6 if $PKG_CONFIG --exists "neon >= 0.26.0" ; then - { $as_echo "$as_me:${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.26.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.26.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="" @@ -17824,15 +22924,17 @@ $as_echo "$NEON_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_error $? "you need neon >= 0.26.x for system-neon" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: you need neon >= 0.26.x for system-neon" >&5 +echo "$as_me: error: you need neon >= 0.26.x for system-neon" >&2;} + { (exit 1); exit 1; }; } fi 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= @@ -17847,12 +22949,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 @@ -17865,10 +22967,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 [\\/]* | ?:[\\/]*) @@ -17880,30 +22982,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 @@ -17914,25 +23015,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="" @@ -17953,14 +23054,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 @@ -17968,33 +23071,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 [\\/]* | ?:[\\/]*) @@ -18006,30 +23109,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 @@ -18040,25 +23142,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="" @@ -18079,11 +23181,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 @@ -18095,21 +23199,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" @@ -18118,12 +23224,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 @@ -18131,10 +23237,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 [\\/]* | ?:[\\/]*) @@ -18146,30 +23252,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 @@ -18180,25 +23285,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="" @@ -18219,12 +23324,14 @@ $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 @@ -18232,14 +23339,14 @@ 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' @@ -18251,10 +23358,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 [\\/]* | ?:[\\/]*) @@ -18266,30 +23373,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 @@ -18300,25 +23406,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="" @@ -18343,16 +23449,290 @@ $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 @@ -18360,37 +23740,66 @@ fi 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 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 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_hunspell_main=yes else - ac_cv_lib_hunspell_main=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_hunspell_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_hunspell_main" >&5 -$as_echo "$ac_cv_lib_hunspell_main" >&6; } -if test "x$ac_cv_lib_hunspell_main" = x""yes; then : +echo "$as_me:$LINENO: result: $ac_cv_lib_hunspell_main" >&5 +echo "${ECHO_T}$ac_cv_lib_hunspell_main" >&6 +if test $ac_cv_lib_hunspell_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBHUNSPELL 1 _ACEOF @@ -18398,7 +23807,9 @@ _ACEOF LIBS="-lhunspell $LIBS" else - as_fn_error $? "hunspell library not found." "$LINENO" 5 + { { 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 @@ -18410,8 +23821,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_HUNSPELL=NO BUILD_TYPE="$BUILD_TYPE HUNSPELL" fi @@ -18419,175 +23830,506 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which altlinuxhyph to use" >&5 -$as_echo_n "checking which altlinuxhyph to use... " >&6; } +echo "$as_me:$LINENO: checking which altlinuxhyph to use" >&5 +echo $ECHO_N "checking which altlinuxhyph to use... $ECHO_C" >&6 if test -n "$with_system_altlinuxhyph" -o -n "$with_system_libs" && \ test "$with_system_altlinuxhyph" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}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 : + 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 - as_fn_error $? "altlinuxhyph headers not found." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: altlinuxhyph headers not found." >&5 +echo "$as_me: error: altlinuxhyph headers not found." >&2;} + { (exit 1); exit 1; }; } 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 : + 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 + 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 (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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_member_struct__HyphenDict_cset=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +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_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' @@ -18599,10 +24341,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 [\\/]* | ?:[\\/]*) @@ -18614,30 +24356,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 @@ -18648,25 +24389,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 mythes" >&5 -$as_echo_n "checking for mythes... " >&6; } + echo "$as_me:$LINENO: checking for mythes" >&5 +echo $ECHO_N "checking for mythes... $ECHO_C" >&6 if $PKG_CONFIG --exists "mythes" ; then - { $as_echo "$as_me:${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 MYTHES_CFLAGS" >&5 -$as_echo_n "checking MYTHES_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking MYTHES_CFLAGS" >&5 +echo $ECHO_N "checking MYTHES_CFLAGS... $ECHO_C" >&6 MYTHES_CFLAGS=`$PKG_CONFIG --cflags "mythes"` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYTHES_CFLAGS" >&5 -$as_echo "$MYTHES_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $MYTHES_CFLAGS" >&5 +echo "${ECHO_T}$MYTHES_CFLAGS" >&6 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking MYTHES_LIBS" >&5 -$as_echo_n "checking MYTHES_LIBS... " >&6; } + echo "$as_me:$LINENO: checking MYTHES_LIBS" >&5 +echo $ECHO_N "checking MYTHES_LIBS... $ECHO_C" >&6 MYTHES_LIBS=`$PKG_CONFIG --libs "mythes"` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYTHES_LIBS" >&5 -$as_echo "$MYTHES_LIBS" >&6; } + echo "$as_me:$LINENO: result: $MYTHES_LIBS" >&5 +echo "${ECHO_T}$MYTHES_LIBS" >&6 else MYTHES_CFLAGS="" MYTHES_LIBS="" @@ -18691,45 +24432,212 @@ $as_echo "$MYTHES_LIBS" >&6; } fi if test "$MYTHES_PKGCONFIG" = "no"; then - ac_fn_cxx_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_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 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_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: 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-1.2" >&5 -$as_echo_n "checking for main in -lmythes-1.2... " >&6; } -if test "${ac_cv_lib_mythes_1_2_main+set}" = set; then : - $as_echo_n "(cached) " >&6 + +echo "$as_me:$LINENO: checking for main in -lmythes-1.2" >&5 +echo $ECHO_N "checking for main in -lmythes-1.2... $ECHO_C" >&6 +if test "${ac_cv_lib_mythes_1_2_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmythes-1.2 $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_mythes_1_2_main=yes else - ac_cv_lib_mythes_1_2_main=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_mythes_1_2_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_1_2_main" >&5 -$as_echo "$ac_cv_lib_mythes_1_2_main" >&6; } -if test "x$ac_cv_lib_mythes_1_2_main" = x""yes; then : +echo "$as_me:$LINENO: result: $ac_cv_lib_mythes_1_2_main" >&5 +echo "${ECHO_T}$ac_cv_lib_mythes_1_2_main" >&6 +if test $ac_cv_lib_mythes_1_2_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBMYTHES_1_2 1 _ACEOF @@ -18741,37 +24649,65 @@ else fi if test "$MYTHES_FOUND" = "no"; then - { $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_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_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 MYTHES_FOUND=yes else MYTHES_FOUND=no @@ -18779,7 +24715,9 @@ fi fi if test "$MYTHES_FOUND" = "no"; then - 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 fi ac_ext=c @@ -18789,8 +24727,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_MYTHES=NO BUILD_TYPE="$BUILD_TYPE MYTHES" fi @@ -18798,59 +24736,226 @@ 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 - as_fn_error $? "lpsolve headers not found." "$LINENO" 5 + 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 + { { echo "$as_me:$LINENO: error: lpsolve headers not found." >&5 +echo "$as_me: error: lpsolve headers not found." >&2;} + { (exit 1); exit 1; }; } fi # some systems need this. Like Ubuntu.... - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for floor in -lm" >&5 -$as_echo_n "checking for floor in -lm... " >&6; } -if test "${ac_cv_lib_m_floor+set}" = set; then : - $as_echo_n "(cached) " >&6 + +echo "$as_me:$LINENO: checking for floor in -lm" >&5 +echo $ECHO_N "checking for floor in -lm... $ECHO_C" >&6 +if test "${ac_cv_lib_m_floor+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $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 floor (); int main () { -return floor (); +floor (); ; 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_m_floor=yes else - ac_cv_lib_m_floor=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_m_floor=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_m_floor" >&5 -$as_echo "$ac_cv_lib_m_floor" >&6; } -if test "x$ac_cv_lib_m_floor" = x""yes; then : +echo "$as_me:$LINENO: result: $ac_cv_lib_m_floor" >&5 +echo "${ECHO_T}$ac_cv_lib_m_floor" >&6 +if test $ac_cv_lib_m_floor = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF @@ -18859,43 +24964,72 @@ _ACEOF fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 + +echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $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 dlopen (); int main () { -return dlopen (); +dlopen (); ; 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_dl_dlopen=yes else - ac_cv_lib_dl_dlopen=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dl_dlopen=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_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF @@ -18904,43 +25038,72 @@ _ACEOF 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 @@ -18948,176 +25111,559 @@ _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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which libtextcat to use" >&5 -$as_echo_n "checking which libtextcat to use... " >&6; } +echo "$as_me:$LINENO: checking which libtextcat to use" >&5 +echo $ECHO_N "checking which libtextcat to use... $ECHO_C" >&6 if test -n "$with_system_libtextcat" && test "$with_system_libtextcat" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_LIBTEXTCAT=YES - ac_fn_c_check_header_mongrel "$LINENO" "libtextcat/textcat.h" "ac_cv_header_libtextcat_textcat_h" "$ac_includes_default" -if test "x$ac_cv_header_libtextcat_textcat_h" = x""yes; then : + if test "${ac_cv_header_libtextcat_textcat_h+set}" = set; then + echo "$as_me:$LINENO: checking for libtextcat/textcat.h" >&5 +echo $ECHO_N "checking for libtextcat/textcat.h... $ECHO_C" >&6 +if test "${ac_cv_header_libtextcat_textcat_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_libtextcat_textcat_h" >&5 +echo "${ECHO_T}$ac_cv_header_libtextcat_textcat_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking libtextcat/textcat.h usability" >&5 +echo $ECHO_N "checking libtextcat/textcat.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +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 libtextcat/textcat.h presence" >&5 +echo $ECHO_N "checking libtextcat/textcat.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: libtextcat/textcat.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for libtextcat/textcat.h" >&5 +echo $ECHO_N "checking for libtextcat/textcat.h... $ECHO_C" >&6 +if test "${ac_cv_header_libtextcat_textcat_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_libtextcat_textcat_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_libtextcat_textcat_h" >&5 +echo "${ECHO_T}$ac_cv_header_libtextcat_textcat_h" >&6 +fi +if test $ac_cv_header_libtextcat_textcat_h = yes; then + : else - as_fn_error $? "libtextcat headers not found." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: libtextcat headers not found." >&5 +echo "$as_me: error: libtextcat headers not found." >&2;} + { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special_textcat_Init in -ltextcat" >&5 -$as_echo_n "checking for special_textcat_Init in -ltextcat... " >&6; } -if test "${ac_cv_lib_textcat_special_textcat_Init+set}" = set; then : - $as_echo_n "(cached) " >&6 + +echo "$as_me:$LINENO: checking for special_textcat_Init in -ltextcat" >&5 +echo $ECHO_N "checking for special_textcat_Init in -ltextcat... $ECHO_C" >&6 +if test "${ac_cv_lib_textcat_special_textcat_Init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltextcat $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 special_textcat_Init (); int main () { -return special_textcat_Init (); +special_textcat_Init (); ; 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_textcat_special_textcat_Init=yes else - ac_cv_lib_textcat_special_textcat_Init=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_textcat_special_textcat_Init=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_textcat_special_textcat_Init" >&5 +echo "${ECHO_T}$ac_cv_lib_textcat_special_textcat_Init" >&6 +if test $ac_cv_lib_textcat_special_textcat_Init = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBTEXTCAT 1 +_ACEOF + + LIBS="-ltextcat $LIBS" + +else + { { echo "$as_me:$LINENO: error: libtextcat library not found or not suitable. libtextcat typically needs to be patched" >&5 +echo "$as_me: error: libtextcat library not found or not suitable. libtextcat typically needs to be patched" >&2;} + { (exit 1); exit 1; }; } +fi + +else + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 + SYSTEM_LIBTEXTCAT=NO + BUILD_TYPE="$BUILD_TYPE LIBTEXTCAT" +fi + + +echo "$as_me:$LINENO: checking which libtextcat data directory to use" >&5 +echo $ECHO_N "checking which libtextcat data directory to use... $ECHO_C" >&6 +if test -n "$with_system_libtextcat_data" && test "$with_system_libtextcat_data" != "no"; then + if test "$with_system_libtextcat_data" = "yes"; then + SYSTEM_LIBTEXTCAT_DATA=file:///usr/share/libtextcat + else + SYSTEM_LIBTEXTCAT_DATA=file://$with_system_libtextcat_data + fi + echo "$as_me:$LINENO: result: $SYSTEM_LIBTEXTCAT_DATA" >&5 +echo "${ECHO_T}$SYSTEM_LIBTEXTCAT_DATA" >&6 +else + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 + BUILD_TYPE="$BUILD_TYPE LIBTEXTCATDATA" +fi + + +if test "$_os" = "Linux"; then + echo "$as_me:$LINENO: checking whether libc is >= 2.1.1" >&5 +echo $ECHO_N "checking whether libc is >= 2.1.1... $ECHO_C" >&6 + exec 6>/dev/null # no output + echo "$as_me:$LINENO: checking for gnu_get_libc_version in -lc" >&5 +echo $ECHO_N "checking for gnu_get_libc_version in -lc... $ECHO_C" >&6 +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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* 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 () +{ +gnu_get_libc_version (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.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 + 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 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_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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + { { 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" != "WNT"; then + +for ac_func in getopt +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +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 core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_textcat_special_textcat_Init" >&5 -$as_echo "$ac_cv_lib_textcat_special_textcat_Init" >&6; } -if test "x$ac_cv_lib_textcat_special_textcat_Init" = x""yes; then : +echo "$as_me:$LINENO: result: `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 HAVE_LIBTEXTCAT 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF - - LIBS="-ltextcat $LIBS" - + HAVE_GETOPT=YES else - as_fn_error $? "libtextcat library not found or not suitable. libtextcat typically needs to be patched" "$LINENO" 5 + HAVE_GETOPT=NO fi +done -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 -$as_echo "internal" >&6; } - SYSTEM_LIBTEXTCAT=NO - BUILD_TYPE="$BUILD_TYPE LIBTEXTCAT" -fi +for ac_func in readdir_r +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which libtextcat data directory to use" >&5 -$as_echo_n "checking which libtextcat data directory to use... " >&6; } -if test -n "$with_system_libtextcat_data" && test "$with_system_libtextcat_data" != "no"; then - if test "$with_system_libtextcat_data" = "yes"; then - SYSTEM_LIBTEXTCAT_DATA=file:///usr/share/libtextcat - else - SYSTEM_LIBTEXTCAT_DATA=file://$with_system_libtextcat_data - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSTEM_LIBTEXTCAT_DATA" >&5 -$as_echo "$SYSTEM_LIBTEXTCAT_DATA" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 -$as_echo "internal" >&6; } - BUILD_TYPE="$BUILD_TYPE LIBTEXTCATDATA" -fi +/* 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 -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; } - 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 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lc $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +#undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif -char gnu_get_libc_version (); +/* 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 gnu_get_libc_version (); +return f != $ac_func; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_c_gnu_get_libc_version=yes +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 - ac_cv_lib_c_gnu_get_libc_version=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_c_gnu_get_libc_version" >&5 -$as_echo "$ac_cv_lib_c_gnu_get_libc_version" >&6; } -if test "x$ac_cv_lib_c_gnu_get_libc_version" = x""yes; then : - HAVE_LIBC=yes; export HAVE_LIBC -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - 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; } - else - as_fn_error $? "no, upgrade libc" "$LINENO" 5 - fi +eval "$as_ac_var=no" fi - -if test "$_os" != "WNT"; then - for ac_func in getopt -do : - ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt" -if test "x$ac_cv_func_getopt" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETOPT 1 -_ACEOF - HAVE_GETOPT=YES -else - HAVE_GETOPT=NO +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -done - - for ac_func in readdir_r -do : - ac_fn_c_check_func "$LINENO" "readdir_r" "ac_cv_func_readdir_r" -if test "x$ac_cv_func_readdir_r" = x""yes; then : +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_READDIR_R 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF HAVE_READDIR_R=YES else @@ -19138,8 +25684,8 @@ 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` @@ -19160,12 +25706,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" \) \ @@ -19181,36 +25734,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"` @@ -19242,15 +25800,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 @@ -19258,14 +25818,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 [\\/]* | ?:[\\/]*) @@ -19277,29 +25837,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 @@ -19314,24 +25873,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 [\\/]* | ?:[\\/]*) @@ -19343,56 +25902,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 [\\/]* | ?:[\\/]*) @@ -19404,38 +25966,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 [\\/]* | ?:[\\/]*) @@ -19447,31 +26010,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 @@ -19481,17 +26045,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 fi @@ -19501,10 +26069,10 @@ if test -z "$with_gnu_cp"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${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 [\\/]* | ?:[\\/]*) @@ -19516,60 +26084,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_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 from coreutils with preserve= support" >&5 -$as_echo_n "checking whether $GNUCP is GNU cp from coreutils with preserve= support... " >&6; } +echo "$as_me:$LINENO: checking whether $GNUCP is GNU cp from coreutils with preserve= support" >&5 +echo $ECHO_N "checking whether $GNUCP is GNU cp from coreutils with preserve= support... $ECHO_C" >&6 if $GNUCP --version 2>/dev/null | grep "coreutils" >/dev/null 2>/dev/null; then - { $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 GNUCP='' fi if test -z "$GNUCP"; then if test "$_os" = "SunOS" -o "$_os" = "FreeBSD"; then - as_fn_error $? "no, GNU cp from coreutils is needed. install or specify with --with-gnu-cp=/path/to/it" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: no, GNU cp from coreutils is needed. install or specify with --with-gnu-cp=/path/to/it" >&5 +echo "$as_me: error: no, GNU cp from coreutils is needed. install or specify with --with-gnu-cp=/path/to/it" >&2;} + { (exit 1); exit 1; }; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GNU cp from coreutils found - using the system's cp command" >&5 -$as_echo "no GNU cp from coreutils found - using the system's cp command" >&6; } + echo "$as_me:$LINENO: result: no GNU cp from coreutils found - using the system's cp command" >&5 +echo "${ECHO_T}no GNU cp from coreutils found - using the system's cp command" >&6 fi fi @@ -19580,10 +26153,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 [\\/]* | ?:[\\/]*) @@ -19595,29 +26168,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 @@ -19626,18 +26198,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 [\\/]* | ?:[\\/]*) @@ -19649,43 +26221,44 @@ 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" fi fi - { $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 else with_asm_home="NO_ASM_HOME" fi @@ -19705,10 +26278,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 [\\/]* | ?:[\\/]*) @@ -19720,35 +26293,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 [\\/]* | ?:[\\/]*) @@ -19760,69 +26332,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 @@ -19830,21 +26417,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 @@ -19854,11 +26448,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` @@ -19867,21 +26461,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" @@ -19904,31 +26504,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 [\\/]* | ?:[\\/]*) @@ -19940,30 +26540,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 @@ -19974,25 +26573,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="" @@ -20013,33 +26612,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 [\\/]* | ?:[\\/]*) @@ -20051,30 +26652,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 @@ -20085,25 +26685,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="" @@ -20124,7 +26724,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 @@ -20134,10 +26736,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 [\\/]* | ?:[\\/]*) @@ -20149,30 +26751,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 @@ -20183,25 +26784,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="" @@ -20222,13 +26823,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 @@ -20246,10 +26849,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 [\\/]* | ?:[\\/]*) @@ -20261,30 +26864,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 @@ -20295,25 +26897,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="" @@ -20334,7 +26936,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" @@ -20344,22 +26948,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 [\\/]* | ?:[\\/]*) @@ -20371,30 +26975,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 @@ -20405,25 +27008,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="" @@ -20444,33 +27047,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 [\\/]* | ?:[\\/]*) @@ -20482,30 +27089,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 @@ -20516,25 +27122,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="" @@ -20555,12 +27161,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 @@ -20578,8 +27186,8 @@ GSTREAMER_LIBS="" ENABLE_GSTREAMER="" if test "$test_gstreamer" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the GStreamer media backend" >&5 -$as_echo_n "checking whether to build the GStreamer media backend... " >&6; } + echo "$as_me:$LINENO: checking whether to build the GStreamer media backend" >&5 +echo $ECHO_N "checking whether to build the GStreamer media backend... $ECHO_C" >&6 if test "x$enable_gstreamer" != "xno" ; then succeeded=no @@ -20587,10 +27195,10 @@ $as_echo_n "checking whether to build the GStreamer media backend... " >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${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 [\\/]* | ?:[\\/]*) @@ -20602,30 +27210,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 @@ -20636,25 +27243,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 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 " >&5 -$as_echo_n "checking for gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 ... " >&6; } + echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 " >&5 +echo $ECHO_N "checking for gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 ... $ECHO_C" >&6 if $PKG_CONFIG --exists "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 " ; then - { $as_echo "$as_me:${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 GSTREAMER_CFLAGS" >&5 -$as_echo_n "checking GSTREAMER_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking GSTREAMER_CFLAGS" >&5 +echo $ECHO_N "checking GSTREAMER_CFLAGS... $ECHO_C" >&6 GSTREAMER_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 "` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSTREAMER_CFLAGS" >&5 -$as_echo "$GSTREAMER_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $GSTREAMER_CFLAGS" >&5 +echo "${ECHO_T}$GSTREAMER_CFLAGS" >&6 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking GSTREAMER_LIBS" >&5 -$as_echo_n "checking GSTREAMER_LIBS... " >&6; } + echo "$as_me:$LINENO: checking GSTREAMER_LIBS" >&5 +echo $ECHO_N "checking GSTREAMER_LIBS... $ECHO_C" >&6 GSTREAMER_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 "` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSTREAMER_LIBS" >&5 -$as_echo "$GSTREAMER_LIBS" >&6; } + echo "$as_me:$LINENO: result: $GSTREAMER_LIBS" >&5 +echo "${ECHO_T}$GSTREAMER_LIBS" >&6 else GSTREAMER_CFLAGS="" GSTREAMER_LIBS="" @@ -20675,15 +27282,17 @@ $as_echo "$GSTREAMER_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_error $? "requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" >&5 +echo "$as_me: error: requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" >&2;} + { (exit 1); exit 1; }; } fi ENABLE_GSTREAMER="TRUE" - { $as_echo "$as_me:${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 @@ -20698,18 +27307,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 @@ -20718,10 +27327,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 [\\/]* | ?:[\\/]*) @@ -20733,30 +27342,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 @@ -20767,25 +27375,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="" @@ -20806,22 +27414,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 @@ -20835,28 +27452,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 @@ -20872,8 +27504,8 @@ LIBRSVG_CFLAGS="" LIBRSVG_LIBS="" if test "$test_librsvg" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use librsvg" >&5 -$as_echo_n "checking whether to use librsvg... " >&6; } + echo "$as_me:$LINENO: checking whether to use librsvg" >&5 +echo $ECHO_N "checking whether to use librsvg... $ECHO_C" >&6 if test "x$enable_librsvg" != "xno" ; then succeeded=no @@ -20881,10 +27513,10 @@ $as_echo_n "checking whether to use librsvg... " >&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 [\\/]* | ?:[\\/]*) @@ -20896,30 +27528,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 @@ -20930,25 +27561,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 librsvg-2.0 >= 2.14" >&5 -$as_echo_n "checking for librsvg-2.0 >= 2.14... " >&6; } + echo "$as_me:$LINENO: checking for librsvg-2.0 >= 2.14" >&5 +echo $ECHO_N "checking for librsvg-2.0 >= 2.14... $ECHO_C" >&6 if $PKG_CONFIG --exists "librsvg-2.0 >= 2.14" ; 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 LIBRSVG_CFLAGS" >&5 -$as_echo_n "checking LIBRSVG_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking LIBRSVG_CFLAGS" >&5 +echo $ECHO_N "checking LIBRSVG_CFLAGS... $ECHO_C" >&6 LIBRSVG_CFLAGS=`$PKG_CONFIG --cflags "librsvg-2.0 >= 2.14"` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRSVG_CFLAGS" >&5 -$as_echo "$LIBRSVG_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $LIBRSVG_CFLAGS" >&5 +echo "${ECHO_T}$LIBRSVG_CFLAGS" >&6 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRSVG_LIBS" >&5 -$as_echo_n "checking LIBRSVG_LIBS... " >&6; } + echo "$as_me:$LINENO: checking LIBRSVG_LIBS" >&5 +echo $ECHO_N "checking LIBRSVG_LIBS... $ECHO_C" >&6 LIBRSVG_LIBS=`$PKG_CONFIG --libs "librsvg-2.0 >= 2.14"` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRSVG_LIBS" >&5 -$as_echo "$LIBRSVG_LIBS" >&6; } + echo "$as_me:$LINENO: result: $LIBRSVG_LIBS" >&5 +echo "${ECHO_T}$LIBRSVG_LIBS" >&6 else LIBRSVG_CFLAGS="" LIBRSVG_LIBS="" @@ -20969,69 +27600,238 @@ $as_echo "$LIBRSVG_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_error $? "requirements to build with librsvg support not met. Use --disable-librsvg or install the missing packages" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: requirements to build with librsvg support not met. Use --disable-librsvg or install the missing packages" >&5 +echo "$as_me: error: requirements to build with librsvg support not met. Use --disable-librsvg or install the missing packages" >&2;} + { (exit 1); exit 1; }; } + fi + + ENABLE_LIBRSVG="TRUE" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +fi + + + + + + +echo "$as_me:$LINENO: checking whether to build the OpenGL Transitions component" >&5 +echo $ECHO_N "checking whether to build the OpenGL Transitions component... $ECHO_C" >&6 +ENABLE_OPENGL= + +if test "x$enable_opengl" != "xno" ; 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 - - ENABLE_LIBRSVG="TRUE" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - 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 - - - -{ $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; } -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 : - +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 @@ -21039,40 +27839,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 @@ -21080,69 +27911,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 @@ -21150,10 +27983,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 [\\/]* | ?:[\\/]*) @@ -21165,30 +27998,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 @@ -21199,25 +28031,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="" @@ -21238,26 +28070,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 @@ -21266,75 +28102,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -21342,92 +28185,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -21436,70 +28290,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -21508,70 +28371,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -21580,70 +28452,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -21652,70 +28533,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -21724,70 +28614,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -21796,70 +28695,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -21868,70 +28776,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -21940,70 +28857,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -22012,71 +28938,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -22085,49 +29020,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -22148,52 +29088,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 @@ -22202,70 +29148,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -22274,70 +29229,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -22346,71 +29310,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -22419,34 +29392,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 eval "test \"\${$as_ac_File+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; } -if eval test \"x\$"$as_ac_File"\" = 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 @@ -22498,8 +29474,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 @@ -22507,15 +29483,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 @@ -22523,19 +29502,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 [\\/]* | ?:[\\/]*) @@ -22548,37 +29530,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 @@ -22586,15 +29570,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 @@ -22602,11 +29589,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" @@ -22646,8 +29636,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 @@ -22656,14 +29646,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 @@ -22672,19 +29664,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 [\\/]* | ?:[\\/]*) @@ -22697,37 +29691,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 @@ -22735,14 +29731,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 @@ -22751,10 +29749,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" @@ -22764,34 +29764,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 [\\/]* | ?:[\\/]*) @@ -22803,30 +29803,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 @@ -22837,25 +29836,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="" @@ -22876,25 +29875,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' @@ -22902,15 +29903,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 @@ -22921,16 +29927,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' @@ -22940,67 +29961,67 @@ 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 BUILD_TYPE="$BUILD_TYPE AFMS" 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 @@ -23008,13 +30029,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 @@ -23044,13 +30065,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 - as_fn_error $? "Xinerama header not found." "$LINENO" 5 + 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 + { { echo "$as_me:$LINENO: error: Xinerama header not found." >&5 +echo "$as_me: error: Xinerama header not found." >&2;} + { (exit 1); exit 1; }; } fi @@ -23061,43 +30220,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 @@ -23105,16 +30293,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 @@ -23335,10 +30525,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 [\\/]* | ?:[\\/]*) @@ -23350,29 +30540,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 @@ -23384,10 +30573,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 [\\/]* | ?:[\\/]*) @@ -23400,29 +30589,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 @@ -23431,7 +30619,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 @@ -23449,8 +30639,8 @@ else export ANT_HOME 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) { @@ -23474,14 +30664,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 @@ -23494,8 +30684,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 @@ -23508,8 +30698,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 @@ -23525,14 +30715,16 @@ $as_echo_n "checking Ant lib directory... " >&6; } if test -f $ANT_HOME/lib/ant/ant.jar; then ANT_LIB="$ANT_HOME/lib/ant" else - as_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 @@ -23544,8 +30736,8 @@ if test "$ENABLE_MEDIAWIKI" = "YES"; then 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` @@ -23553,18 +30745,20 @@ echo "configure: ant_version $ant_version " >&5 echo "configure: ant_version_major $ant_version_major " >&5 echo "configure: ant_version_minor $ant_version_minor " >&5 if test "$ant_version_major" -ge "2"; then - { $as_echo "$as_me:${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 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 @@ -23596,29 +30790,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 @@ -23634,184 +30830,188 @@ $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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable dependency tracking" >&5 -$as_echo_n "checking whether to enable dependency tracking... " >&6; } +echo "$as_me:$LINENO: checking whether to enable dependency tracking" >&5 +echo $ECHO_N "checking whether to enable dependency tracking... $ECHO_C" >&6 if test "$enable_dependency_tracking" = "no"; then nodep=TRUE - { $as_echo "$as_me:${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 fi @@ -23822,20 +31022,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 @@ -23844,8 +31046,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 @@ -23864,59 +31065,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 @@ -23925,55 +31106,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= -U= 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 @@ -23981,15 +31170,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. @@ -23999,252 +31185,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 : - 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 +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## -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' +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix 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 STATUS 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=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 +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: $2" >&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' @@ -24252,123 +31267,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'" @@ -24377,20 +31417,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.67. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -24398,117 +31449,124 @@ generated by GNU Autoconf 2.67. 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.67, - 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) 2010 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_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= + --*=*) + 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"` ;; - '') as_fn_error $? "missing file argument" ;; - 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 @@ -24522,45 +31580,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 @@ -24570,31 +31614,22 @@ 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" } || { -<<<<<<< local - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -======= tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || @@ -24602,69 +31637,15 @@ $debug || echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } ->>>>>>> other - -<<<<<<< local -# 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" && -======= ->>>>>>> other _ACEOF -<<<<<<< local -======= cat >>$CONFIG_STATUS <<_ACEOF ->>>>>>> other -<<<<<<< local -{ - 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 -======= # # CONFIG_FILES section. # ->>>>>>> other -<<<<<<< local - 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 -======= # 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 @@ -25019,6 +32000,9 @@ 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,@LIBRSVG_CFLAGS@,$LIBRSVG_CFLAGS,;t t +s,@LIBRSVG_LIBS@,$LIBRSVG_LIBS,;t t +s,@ENABLE_LIBRSVG@,$ENABLE_LIBRSVG,;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 @@ -25094,122 +32078,9 @@ s,@BUILD_TYPE@,$BUILD_TYPE,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF ->>>>>>> other - -<<<<<<< local -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 = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -======= ->>>>>>> other _ACEOF -<<<<<<< local -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries 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[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -======= 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. @@ -25247,232 +32118,206 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi ->>>>>>> other fi # test -n "$CONFIG_FILES" - -eval set X " :F $CONFIG_FILES " -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_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 - - 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 1 "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 - - # 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;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_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. @@ -25492,11 +32337,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 1 -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